+api-change:
+ - src/pybind/mgr/dashboard/openapi.yaml
+
build/ops:
- "**/CMakeLists.txt"
- admin/**
set(CMAKE_CXX_LINK_EXECUTABLE
"<CMAKE_CXX_COMPILER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> ${CMAKE_GNULD_IMAGE_VERSION} <LINK_LIBRARIES>")
+ link_directories(${MINGW_LINK_DIRECTORIES})
endif()
option(WITH_CCACHE "Build with ccache.")
EXCLUDES "*.js" "*.css" ".tox" "python-common/build")
add_custom_target(tags DEPENDS ctags)
-set(VERSION 16.2.4)
+set(VERSION 16.2.5)
>=16.0.0
--------
+
+* `ceph-mgr-modules-core` debian package does not recommend `ceph-mgr-rook`
+ anymore. As the latter depends on `python3-numpy` which cannot be imported in
+ different Python sub-interpreters multi-times if the version of
+ `python3-numpy` is older than 1.19. Since `apt-get` installs the `Recommends`
+ packages by default, `ceph-mgr-rook` was always installed along with
+ `ceph-mgr` debian package as an indirect dependency. If your workflow depends
+ on this behavior, you might want to install `ceph-mgr-rook` separately.
+
+* mgr/nfs: ``nfs`` module is moved out of volumes plugin. Prior using the
+ ``ceph nfs`` commands, ``nfs`` mgr module must be enabled.
+
+* volumes/nfs: The ``cephfs`` cluster type has been removed from the
+ ``nfs cluster create`` subcommand. Clusters deployed by cephadm can
+ support an NFS export of both ``rgw`` and ``cephfs`` from a single
+ NFS cluster instance.
+
+* The ``nfs cluster update`` command has been removed. You can modify
+ the placement of an existing NFS service (and/or its associated
+ ingress service) using ``orch ls --export`` and ``orch apply -i
+ ...``.
+
+* The ``orch apply nfs`` command no longer requires a pool or
+ namespace argument. We strongly encourage users to use the defaults
+ so that the ``nfs cluster ls`` and related commands will work
+ properly.
+
+* The ``nfs cluster delete`` and ``nfs export delete`` commands are
+ deprecated and will be removed in a future release. Please use
+ ``nfs cluster rm`` and ``nfs export rm`` instead.
+
+* mgr-pg_autoscaler: Autoscaler will now start out by scaling each
+ pool to have a full complements of pgs from the start and will only
+ decrease it when other pools need more pgs due to increased usage.
+ This improves out of the box performance of Ceph by allowing more PGs
+ to be created for a given pool.
+
* CephFS: Disabling allow_standby_replay on a file system will also stop all
standby-replay daemons for that file system.
# main package definition
#################################################################################
Name: ceph
-Version: 16.2.4
+Version: 16.2.5
Release: 0%{?dist}
%if 0%{?fedora} || 0%{?rhel}
Epoch: 2
Group: System/Filesystems
%endif
URL: http://ceph.com/
-Source0: %{?_remote_tarball_prefix}ceph-16.2.4.tar.bz2
+Source0: %{?_remote_tarball_prefix}ceph-16.2.5.tar.bz2
%if 0%{?suse_version}
# _insert_obs_source_lines_here
ExclusiveArch: x86_64 aarch64 ppc64le s390x
# common
#################################################################################
%prep
-%autosetup -p1 -n ceph-16.2.4
+%autosetup -p1 -n ceph-16.2.5
%build
# LTO can be enabled as soon as the following GCC bug is fixed:
%{_datadir}/ceph/mgr/localpool
%{_datadir}/ceph/mgr/mds_autoscaler
%{_datadir}/ceph/mgr/mirroring
+%{_datadir}/ceph/mgr/nfs
%{_datadir}/ceph/mgr/orchestrator
%{_datadir}/ceph/mgr/osd_perf_query
%{_datadir}/ceph/mgr/osd_support
%{_datadir}/ceph/mgr/localpool
%{_datadir}/ceph/mgr/mds_autoscaler
%{_datadir}/ceph/mgr/mirroring
+%{_datadir}/ceph/mgr/nfs
%{_datadir}/ceph/mgr/orchestrator
%{_datadir}/ceph/mgr/osd_perf_query
%{_datadir}/ceph/mgr/osd_support
-ceph (16.2.4-1focal) focal; urgency=medium
+ceph (16.2.5-1focal) focal; urgency=medium
- -- Jenkins Build Slave User <jenkins-build@braggi18.front.sepia.ceph.com> Thu, 13 May 2021 17:30:29 +0000
+ -- Jenkins Build Slave User <jenkins-build@braggi17.front.sepia.ceph.com> Thu, 08 Jul 2021 14:16:59 +0000
+
+ceph (16.2.5-1) stable; urgency=medium
+
+ * New upstream release
+
+ -- Ceph Release Team <ceph-maintainers@ceph.com> Thu, 08 Jul 2021 14:03:54 +0000
ceph (16.2.4-1) stable; urgency=medium
usr/share/ceph/mgr/iostat
usr/share/ceph/mgr/localpool
usr/share/ceph/mgr/mirroring
+usr/share/ceph/mgr/nfs
usr/share/ceph/mgr/orchestrator
usr/share/ceph/mgr/osd_perf_query
usr/share/ceph/mgr/osd_support
Architecture: linux-any
Depends: ceph-base (= ${binary:Version}),
ceph-mgr-modules-core (= ${binary:Version}),
- libsqlite3-mod-ceph,
python3-bcrypt,
python3-cherrypy3,
python3-distutils,
python3-openssl,
Replaces: ceph-mgr (<< 15.1.0)
Breaks: ceph-mgr (<< 15.1.0)
-Recommends: ceph-mgr-rook
Description: ceph manager modules which are always enabled
Ceph is a massively scalable, open-source, distributed
storage system that runs on commodity hardware and delivers object,
--- /dev/null
+libcephsqlite.so libsqlite3-mod-ceph #MINVER#
+ _ZGVN18SimpleRADOSStriper7biglockB5cxx11E@Base 15.2.0-1
+ _ZGVN18SimpleRADOSStriper8lockdescB5cxx11E@Base 15.2.0-1
+ _ZN18SimpleRADOSStriper10XATTR_EXCLE@Base 15.2.0-1
+ _ZN18SimpleRADOSStriper10XATTR_SIZEE@Base 15.2.0-1
+ _ZN18SimpleRADOSStriper12recover_lockEv@Base 15.2.0-1
+ _ZN18SimpleRADOSStriper12set_metadataEmb@Base 15.2.0-1
+ _ZN18SimpleRADOSStriper12shrink_allocEm@Base 15.2.0-1
+ _ZN18SimpleRADOSStriper13XATTR_VERSIONE@Base 15.2.0-1
+ _ZN18SimpleRADOSStriper13config_loggerEPN4ceph6common11CephContextESt17basic_string_viewIcSt11char_traitsIcEEPSt10shared_ptrINS1_12PerfCountersEE@Base 15.2.0-1
+ _ZN18SimpleRADOSStriper13print_lockersERSo@Base 15.2.0-1
+ _ZN18SimpleRADOSStriper13wait_for_aiosEb@Base 15.2.0-1
+ _ZN18SimpleRADOSStriper15XATTR_ALLOCATEDE@Base 15.2.0-1
+ _ZN18SimpleRADOSStriper16lock_keeper_mainEv@Base 15.2.0-1
+ _ZN18SimpleRADOSStriper18maybe_shrink_allocEv@Base 15.2.0-1
+ _ZN18SimpleRADOSStriper24XATTR_LAYOUT_OBJECT_SIZEE@Base 15.2.0-1
+ _ZN18SimpleRADOSStriper24XATTR_LAYOUT_STRIPE_UNITE@Base 15.2.0-1
+ _ZN18SimpleRADOSStriper25XATTR_LAYOUT_STRIPE_COUNTE@Base 15.2.0-1
+ _ZN18SimpleRADOSStriper4lockEm@Base 15.2.0-1
+ _ZN18SimpleRADOSStriper4openEv@Base 15.2.0-1
+ _ZN18SimpleRADOSStriper4readEPvmm@Base 15.2.0-1
+ _ZN18SimpleRADOSStriper4statEPm@Base 15.2.0-1
+ _ZN18SimpleRADOSStriper5flushEv@Base 15.2.0-1
+ _ZN18SimpleRADOSStriper5writeEPKvmm@Base 15.2.0-1
+ _ZN18SimpleRADOSStriper6createEv@Base 15.2.0-1
+ _ZN18SimpleRADOSStriper6removeEv@Base 15.2.0-1
+ _ZN18SimpleRADOSStriper6str2blESt17basic_string_viewIcSt11char_traitsIcEE@Base 15.2.0-1
+ _ZN18SimpleRADOSStriper6unlockEv@Base 15.2.0-1
+ _ZN18SimpleRADOSStriper7biglockB5cxx11E@Base 15.2.0-1
+ _ZN18SimpleRADOSStriper7uint2blEm@Base 15.2.0-1
+ _ZN18SimpleRADOSStriper8lockdescB5cxx11E@Base 15.2.0-1
+ _ZN18SimpleRADOSStriper8truncateEm@Base 15.2.0-1
+ _ZN18SimpleRADOSStriperD1Ev@Base 15.2.0-1
+ _ZN18SimpleRADOSStriperD2Ev@Base 15.2.0-1
+ _ZNK18SimpleRADOSStriper15get_next_extentEmm@Base 15.2.0-1
+ cephsqlite_setcct@Base 15.2.0-1
+ sqlite3_cephsqlite_init@Base 15.2.0-1
This will perform a ``cephadm check-host`` on each host before adding it;
this check ensures that the host is functioning properly. The IP address
- argument is required only if DNS does not allow you to connect to each host
- by its short name.
+ argument is recommended; if not provided, then the host name will be resolved
+ via DNS.
#. Verify that the adopted monitor and manager daemons are visible:
Compatibility and Stability
===========================
+.. _cephadm-compatibility-with-podman:
+
Compatibility with Podman Versions
----------------------------------
| >= 16.2.1 | False | True | True | False | True |
+-----------+-------+-------+-------+-------+-------+
+.. warning::
+ Only podman versions that are 2.0.0 and higher work with Ceph Pacific, with the exception of podman version 2.2.1, which does not work with Ceph Pacific. kubic stable is known to work with Ceph Pacific, but it must be run with a newer kernel.
+
+
.. _cephadm-stability:
Stability
.. prompt:: bash #
- ceph orch host add *newhost*
+ ceph orch host add *<newhost>* [*<ip>*] [*<label1> ...*]
For example:
.. prompt:: bash #
- ceph orch host add host2
- ceph orch host add host3
-
+ ceph orch host add host2 10.10.0.102
+ ceph orch host add host3 10.10.0.103
+
+ It is best to explicitly provide the host IP address. If an IP is
+ not provided, then the host name will be immediately resolved via
+ DNS and that IP will be used.
+
+ One or more labels can also be included to immediately label the
+ new host. For example, by default the ``_admin`` label will make
+ cephadm maintain a copy of the ``ceph.conf`` file and a
+ ``client.admin`` keyring file in ``/etc/ceph``:
+
+ .. prompt:: bash #
+
+ ceph orch host add host4 10.10.0.104 --labels _admin
+
.. _cephadm-removing-hosts:
Removing Hosts
ceph orch host label rm my_hostname my_label
-
+
+.. _cephadm-special-host-labels:
+
+Special host labels
+-------------------
+
+The following host labels have a special meaning to cephadm. All start with ``_``.
+
+* ``_no_schedule``: *Do not schedule or deploy daemons on this host*.
+
+ This label prevents cephadm from deploying daemons on this host. If it is added to
+ an existing host that already contains Ceph daemons, it will cause cephadm to move
+ those daemons elsewhere (except OSDs, which are not removed automatically).
+
+* ``_no_autotune_memory``: *Do not autotune memory on this host*.
+
+ This label will prevent daemon memory from being tuned even when the
+ ``osd_memory_target_autotune`` or similar option is enabled for one or more daemons
+ on that host.
+
+* ``_admin``: *Distribute client.admin and ceph.conf to this host*.
+
+ By default, an ``_admin`` label is applied to the first host in the cluster (where
+ bootstrap was originally run), and the ``client.admin`` key is set to be distributed
+ to that host via the ``ceph orch client-keyring ...`` function. Adding this label
+ to additional hosts will normally cause cephadm to deploy config and keyring files
+ in ``/etc/ceph``.
+
Maintenance Mode
================
---
service_type: host
- addr: node-00
hostname: node-00
+ addr: 192.168.0.10
labels:
- example1
- example2
---
service_type: host
- addr: node-01
hostname: node-01
+ addr: 192.168.0.11
labels:
- grafana
---
service_type: host
- addr: node-02
hostname: node-02
+ addr: 192.168.0.12
This can be combined with service specifications (below) to create a cluster spec
file to deploy a whole cluster in one command. see ``cephadm bootstrap --apply-spec``
Fully qualified domain names vs bare host names
===============================================
-cephadm has very minimal requirements when it comes to resolving host
-names etc. When cephadm initiates an ssh connection to a remote host,
-the host name can be resolved in four different ways:
-
-- a custom ssh config resolving the name to an IP
-- via an externally maintained ``/etc/hosts``
-- via explicitly providing an IP address to cephadm: ``ceph orch host add <hostname> <IP>``
-- automatic name resolution via DNS.
-
-Ceph itself uses the command ``hostname`` to determine the name of the
-current host.
-
.. note::
cephadm demands that the name of the host given via ``ceph orch host add``
equals the output of ``hostname`` on remote hosts.
-Otherwise cephadm can't be sure, the host names returned by
+Otherwise cephadm can't be sure that names returned by
``ceph * metadata`` match the hosts known to cephadm. This might result
in a :ref:`cephadm-stray-host` warning.
Any modern Linux distribution should be sufficient. Dependencies
are installed automatically by the bootstrap process below.
+See the section :ref:`Compatibility With Podman
+Versions<cephadm-compatibility-with-podman>` for a table of Ceph versions that
+are compatible with Podman. Not every version of Podman is compatible with
+Ceph.
+
+
+
.. _get-cephadm:
Install cephadm
* Although the standalone script is sufficient to get a cluster started, it is
convenient to have the ``cephadm`` command installed on the host. To install
- the packages that provide the ``cephadm`` command for the Octopus release,
- run the following commands:
+ the packages that provide the ``cephadm`` command, run the following
+ commands:
.. prompt:: bash #
:substitutions:
host.
* Generate a new SSH key for the Ceph cluster and add it to the root
user's ``/root/.ssh/authorized_keys`` file.
+* Write a copy of the public key to ``/etc/ceph/ceph.pub``.
* Write a minimal configuration file to ``/etc/ceph/ceph.conf``. This
file is needed to communicate with the new cluster.
* Write a copy of the ``client.admin`` administrative (privileged!)
secret key to ``/etc/ceph/ceph.client.admin.keyring``.
-* Write a copy of the public key to ``/etc/ceph/ceph.pub``.
+* Add the ``_admin`` label to the bootstrap host. By default, any host
+ with this label will (also) get a copy of ``/etc/ceph/ceph.conf`` and
+ ``/etc/ceph/ceph.client.admin.keyring``.
Further information about cephadm bootstrap
-------------------------------------------
* You can pass any initial Ceph configuration options to the new
cluster by putting them in a standard ini-style configuration file
- and using the ``--config *<config-file>*`` option.
+ and using the ``--config *<config-file>*`` option. For example::
+
+ $ cat <<EOF > initial-ceph.conf
+ [global]
+ osd crush chooseleaf type = 0
+ EOF
+ $ ./cephadm bootstrap --config initial-ceph.conf ...
* The ``--ssh-user *<user>*`` option makes it possible to choose which ssh
user cephadm will use to connect to hosts. The associated ssh key will be
Next, add all hosts to the cluster by following :ref:`cephadm-adding-hosts`.
+By default, a ``ceph.conf`` file and a copy of the ``client.admin`` keyring
+are maintained in ``/etc/ceph`` on all hosts with the ``_admin`` label, which is initially
+applied only to the bootstrap host. We usually recommend that one or more other hosts be
+given the ``_admin`` label so that the Ceph CLI (e.g., via ``cephadm shell``) is easily
+accessible on multiple hosts. To add the ``_admin`` label to additional host(s),
+
+ .. prompt:: bash #
+
+ ceph orch host label add *<host>* _admin
+
Adding additional MONs
======================
Deploying monitoring with cephadm
---------------------------------
-By default, bootstrap will deploy a basic monitoring stack. If you
-did not do this (by passing ``--skip-monitoring-stack``, or if you
-converted an existing cluster to cephadm management, you can set up
-monitoring by following the steps below.
+The default behavior of ``cephadm`` is to deploy a basic monitoring stack. It
+is however possible that you have a Ceph cluster without a monitoring stack,
+and you would like to add a monitoring stack to it. (Here are some ways that
+you might have come to have a Ceph cluster without a monitoring stack: You
+might have passed the ``--skip-monitoring stack`` option to ``cephadm`` during
+the installation of the cluster, or you might have converted an existing
+cluster (which had no monitoring stack) to cephadm management.)
-#. Enable the prometheus module in the ceph-mgr daemon. This exposes the internal Ceph metrics so that prometheus can scrape them.
+To set up monitoring on a Ceph cluster that has no monitoring, follow the
+steps below:
- .. code-block:: bash
+#. Enable the Prometheus module in the ceph-mgr daemon. This exposes the internal Ceph metrics so that Prometheus can scrape them:
+
+ .. prompt:: bash #
ceph mgr module enable prometheus
-#. Deploy a node-exporter service on every node of the cluster. The node-exporter provides host-level metrics like CPU and memory utilization.
+#. Deploy a node-exporter service on every node of the cluster. The node-exporter provides host-level metrics like CPU and memory utilization:
- .. code-block:: bash
+ .. prompt:: bash #
ceph orch apply node-exporter '*'
-#. Deploy alertmanager
+#. Deploy alertmanager:
- .. code-block:: bash
+ .. prompt:: bash #
ceph orch apply alertmanager 1
-#. Deploy prometheus. A single prometheus instance is sufficient, but
- for HA you may want to deploy two.
+#. Deploy Prometheus. A single Prometheus instance is sufficient, but
+ for high availablility (HA) you might want to deploy two:
+
+ .. prompt:: bash #
+
+ ceph orch apply prometheus 1
- .. code-block:: bash
+ or
- ceph orch apply prometheus 1 # or 2
+ .. prompt:: bash #
+
+ ceph orch apply prometheus 2
-#. Deploy grafana
+#. Deploy grafana:
- .. code-block:: bash
+ .. prompt:: bash #
ceph orch apply grafana 1
-Cephadm takes care of the configuration of Prometheus, Grafana, and Alertmanager
-automatically.
+Manually setting the Grafana URL
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Cephadm automatically configures Prometheus, Grafana, and Alertmanager in
+all cases except one.
-However, there is one exception to this rule. In a some setups, the Dashboard
-user's browser might not be able to access the Grafana URL configured in Ceph
-Dashboard. One such scenario is when the cluster and the accessing user are each
-in a different DNS zone.
+In a some setups, the Dashboard user's browser might not be able to access the
+Grafana URL that is configured in Ceph Dashboard. This can happen when the
+cluster and the accessing user are in different DNS zones.
-For this case, there is an extra configuration option for Ceph Dashboard, which
-can be used to configure the URL for accessing Grafana by the user's browser.
-This value will never be altered by cephadm. To set this configuration option,
-issue the following command::
+If this is the case, you can use a configuration option for Ceph Dashboard
+to set the URL that the user's browser will use to access Grafana. This
+value will never be altered by cephadm. To set this configuration option,
+issue the following command:
- $ ceph dashboard set-grafana-frontend-api-url <grafana-server-api>
+ .. prompt:: bash $
-It may take a minute or two for services to be deployed. Once
-completed, you should see something like this from ``ceph orch ls``
+ ceph dashboard set-grafana-frontend-api-url <grafana-server-api>
+
+It might take a minute or two for services to be deployed. After the
+services have been deployed, you should see something like this when you issue the command ``ceph orch ls``:
.. code-block:: console
Configuring SSL/TLS for Grafana
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-``cephadm`` will deploy Grafana using the certificate defined in the ceph
-key/value store. If a certificate is not specified, ``cephadm`` will generate a
-self-signed certificate during deployment of the Grafana service.
+``cephadm`` deploys Grafana using the certificate defined in the ceph
+key/value store. If no certificate is specified, ``cephadm`` generates a
+self-signed certificate during the deployment of the Grafana service.
-A custom certificate can be configured using the following commands.
+A custom certificate can be configured using the following commands:
-.. code-block:: bash
+.. prompt:: bash #
ceph config-key set mgr/cephadm/grafana_key -i $PWD/key.pem
ceph config-key set mgr/cephadm/grafana_crt -i $PWD/certificate.pem
-If you already deployed Grafana, you need to ``reconfig`` the service for the
-configuration to be updated.
+If you have already deployed Grafana, run ``reconfig`` on the service to
+update its configuration:
-.. code-block:: bash
+.. prompt:: bash #
ceph orch reconfig grafana
-The ``reconfig`` command also takes care of setting the right URL for Ceph
-Dashboard.
+The ``reconfig`` command also sets the proper URL for Ceph Dashboard.
+
+Networks and Ports
+~~~~~~~~~~~~~~~~~~
+
+All monitoring services can have the network and port they bind to configured with a yaml service specification
+
+example spec file:
+
+.. code-block:: yaml
+
+ service_type: grafana
+ service_name: grafana
+ placement:
+ count: 1
+ networks:
+ - 192.169.142.0/24
+ spec:
+ port: 4200
Using custom images
~~~~~~~~~~~~~~~~~~~
ceph config set mgr mgr/cephadm/container_image_prometheus prom/prometheus:v1.4.1
+If there were already running monitoring stack daemon(s) of the type whose
+image you've changed, you must redeploy the daemon(s) in order to have them
+actually use the new image.
+
+For example, if you had changed the prometheus image
+
+.. prompt:: bash #
+
+ ceph orch redeploy prometheus
+
+
.. note::
By setting a custom image, the default value will be overridden (but not
Disabling monitoring
--------------------
-If you have deployed monitoring and would like to remove it, you can do
-so with
+To disable monitoring and remove the software that supports it, run the following commands:
-.. code-block:: bash
+.. code-block:: console
- ceph orch rm grafana
- ceph orch rm prometheus --force # this will delete metrics data collected so far
- ceph orch rm node-exporter
- ceph orch rm alertmanager
- ceph mgr module disable prometheus
+ $ ceph orch rm grafana
+ $ ceph orch rm prometheus --force # this will delete metrics data collected so far
+ $ ceph orch rm node-exporter
+ $ ceph orch rm alertmanager
+ $ ceph mgr module disable prometheus
Deploying monitoring manually
+.. _deploy-cephadm-nfs-ganesha:
+
===========
NFS Service
===========
.. note:: Only the NFSv4 protocol is supported.
-.. _deploy-cephadm-nfs-ganesha:
+The simplest way to manage NFS is via the ``ceph nfs cluster ...``
+commands; see :ref:`cephfs-nfs`. This document covers how to manage the
+cephadm services directly, which should only be necessary for unusual NFS
+configurations.
Deploying NFS ganesha
=====================
-Cephadm deploys NFS Ganesha using a pre-defined RADOS *pool*
-and optional *namespace*
+Cephadm deploys NFS Ganesha daemon (or set of daemons). The configuration for
+NFS is stored in the ``nfs-ganesha`` pool and exports are managed via the
+``ceph nfs export ...`` commands and via the dashboard.
To deploy a NFS Ganesha gateway, run the following command:
.. prompt:: bash #
- ceph orch apply nfs *<svc_id>* *<pool>* *<namespace>* --placement="*<num-daemons>* [*<host1>* ...]"
+ ceph orch apply nfs *<svc_id>* [--port *<port>*] [--placement ...]
-For example, to deploy NFS with a service id of *foo*, that will use the RADOS
-pool *nfs-ganesha* and namespace *nfs-ns*:
+For example, to deploy NFS with a service id of *foo* on the default
+port 2049 with the default placement of a single daemon:
.. prompt:: bash #
- ceph orch apply nfs foo nfs-ganesha nfs-ns
-
-.. note::
- Create the *nfs-ganesha* pool first if it doesn't exist.
+ ceph orch apply nfs foo
-See :ref:`orchestrator-cli-placement-spec` for details of the placement specification.
+See :ref:`orchestrator-cli-placement-spec` for the details of the placement
+specification.
Service Specification
=====================
-Alternatively, an NFS service can also be applied using a YAML specification.
-
-A service of type ``nfs`` requires a pool name and may contain
-an optional namespace:
+Alternatively, an NFS service can be applied using a YAML specification.
.. code-block:: yaml
- host1
- host2
spec:
- pool: mypool
- namespace: mynamespace
+ port: 12345
-where ``pool`` is a RADOS pool where NFS client recovery data is stored
-and ``namespace`` is a RADOS namespace where NFS client recovery
-data is stored in the pool.
+In this example, we run the server on the non-default ``port`` of
+12345 (instead of the default 2049) on ``host1`` and ``host2``.
-The specification can then be applied using:
+The specification can then be applied by running the following command:
.. prompt:: bash #
ceph orch apply -i nfs.yaml
+
+
+High-availability NFS
+=====================
+
+Deploying an *ingress* service for an existing *nfs* service will provide:
+
+* a stable, virtual IP that can be used to access the NFS server
+* fail-over between hosts if there is a host failure
+* load distribution across multiple NFS gateways (although this is rarely necessary)
+
+Ingress for NFS can be deployed for an existing NFS service
+(``nfs.mynfs`` in this example) with the following specification:
+
+.. code-block:: yaml
+
+ service_type: ingress
+ service_id: nfs.mynfs
+ placement:
+ count: 2
+ spec:
+ backend_service: nfs.mynfs
+ frontend_port: 2049
+ monitor_port: 9000
+ virtual_ip: 10.0.0.123/24
+
+A few notes:
+
+ * The *virtual_ip* must include a CIDR prefix length, as in the
+ example above. The virtual IP will normally be configured on the
+ first identified network interface that has an existing IP in the
+ same subnet. You can also specify a *virtual_interface_networks*
+ property to match against IPs in other networks; see
+ :ref:`ingress-virtual-ip` for more information.
+ * The *monitor_port* is used to access the haproxy load status
+ page. The user is ``admin`` by default, but can be modified by
+ via an *admin* property in the spec. If a password is not
+ specified via a *password* property in the spec, the auto-generated password
+ can be found with:
+
+ .. prompt:: bash #
+
+ ceph config-key get mgr/cephadm/ingress.*{svc_id}*/monitor_password
+
+ For example:
+
+ .. prompt:: bash #
+
+ ceph config-key get mgr/cephadm/ingress.nfs.myfoo/monitor_password
+
+ * The backend service (``nfs.mynfs`` in this example) should include
+ a *port* property that is not 2049 to avoid conflicting with the
+ ingress service, which could be placed on the same host(s).
The OS kernel version (maj.min) is checked for consistency across the hosts. Once again, the
majority of the hosts is used as the basis of identifying anomalies.
-/etc/ceph/ceph.conf
-===================
+Client keyrings and configs
+===========================
+
+Cephadm can distribute copies of the ``ceph.conf`` and client keyring
+files to hosts. For example, it is usually a good idea to store a
+copy of the config and ``client.admin`` keyring on any hosts that will
+be used to administer the cluster via the CLI. By default, cephadm will do
+this for any nodes with the ``_admin`` label (which normally includes the bootstrap
+host).
+
+When a client keyring is placed under management, cephadm will:
+
+ - build a list of target hosts based on the specified placement spec (see :ref:`orchestrator-cli-placement-spec`)
+ - store a copy of the ``/etc/ceph/ceph.conf`` file on the specified host(s)
+ - store a copy of the keyring file on the specified host(s)
+ - update the ``ceph.conf`` file as needed (e.g., due to a change in the cluster monitors)
+ - update the keyring file if the entity's key is changed (e.g., via ``ceph auth ...`` commands)
+ - ensure the keyring file has the specified ownership and mode
+ - remove the keyring file when client keyring management is disabled
+ - remove the keyring file from old hosts if the keyring placement spec is updated (as needed)
+
+To view which client keyrings are currently under management::
+
+ ceph orch client-keyring ls
+
+To place a keyring under management::
-Cephadm distributes a minimized ``ceph.conf`` that only contains
-a minimal set of information to connect to the Ceph cluster.
+ ceph orch client-keyring set <entity> <placement> [--mode=<mode>] [--owner=<uid>.<gid>] [--path=<path>]
-To update the configuration settings, instead of manually editing
-the ``ceph.conf`` file, use the config database instead::
+- By default, the *path* will be ``/etc/ceph/client.{entity}.keyring``, which is where
+ Ceph looks by default. Be careful specifying alternate locations as existing files
+ may be overwritten.
+- A placement of ``*`` (all hosts) is common.
+- The mode defaults to ``0600`` and ownership to ``0:0`` (user root, group root).
- ceph config set ...
+For example, to create and deploy a ``client.rbd`` key to hosts with the ``rbd-client`` label and group readable by uid/gid 107 (qemu),::
-See :ref:`ceph-conf-database` for details.
+ ceph auth get-or-create-key client.rbd mon 'profile rbd' mgr 'profile rbd' osd 'profile rbd pool=my_rbd_pool'
+ ceph orch client-keyring set client.rbd label:rbd-client --owner 107:107 --mode 640
-By default, cephadm does not deploy that minimized ``ceph.conf`` across the
-cluster. To enable the management of ``/etc/ceph/ceph.conf`` files on all
-hosts, please enable this by running::
+The resulting keyring file is::
+
+ -rw-r-----. 1 qemu qemu 156 Apr 21 08:47 /etc/ceph/client.client.rbd.keyring
+
+To disable management of a keyring file::
+
+ ceph orch client-keyring rm <entity>
+
+Note that this will delete any keyring files for this entity that were previously written
+to cluster nodes.
+
+
+/etc/ceph/ceph.conf
+===================
- ceph config set mgr mgr/cephadm/manage_etc_ceph_ceph_conf true
+It may also be useful to distribute ``ceph.conf`` files to hosts without an associated
+client keyring file. By default, cephadm only deploys a ``ceph.conf`` file to hosts where a client keyring
+is also distributed (see above). To write config files to hosts without client keyrings::
-To set up an initial configuration before bootstrapping
-the cluster, create an initial ``ceph.conf`` file. For example::
+ ceph config set mgr mgr/cephadm/manage_etc_ceph_ceph_conf true
- cat <<EOF > /etc/ceph/ceph.conf
- [global]
- osd crush chooseleaf type = 0
- EOF
+By default, the configs are written to all hosts (i.e., those listed
+by ``ceph orch host ls``). To specify which hosts get a ``ceph.conf``::
-Then, run bootstrap referencing this file::
+ ceph config set mgr mgr/cephadm/manage_etc_ceph_ceph_conf_hosts <placement spec>
- cephadm bootstrap -c /root/ceph.conf ...
+For example, to distribute configs to hosts with the ``bare_config`` label,::
+ ceph config set mgr mgr/cephadm/manage_etc_ceph_ceph_conf_hosts label:bare_config
+(See :ref:`orchestrator-cli-placement-spec` for more information about placement specs.)
Declarative State
-----------------
-Note that the effect of ``ceph orch apply`` is persistent; that is, drives which are added to the system
-or become available (say, by zapping) after the command is complete will be automatically found and added to the cluster.
+The effect of ``ceph orch apply`` is persistent. This means that drives that
+are added to the system after the ``ceph orch apply`` command completes will be
+automatically found and added to the cluster. It also means that drives that
+become available (by zapping, for example) after the ``ceph orch apply``
+command completes will be automatically found and added to the cluster.
-That is, after using::
+We will examine the effects of the following command:
- ceph orch apply osd --all-available-devices
+ .. prompt:: bash #
+
+ ceph orch apply osd --all-available-devices
+
+After running the above command:
+
+* If you add new disks to the cluster, they will automatically be used to
+ create new OSDs.
+* If you remove an OSD and clean the LVM physical volume, a new OSD will be
+ created automatically.
-* If you add new disks to the cluster they will automatically be used to create new OSDs.
-* A new OSD will be created automatically if you remove an OSD and clean the LVM physical volume.
+To disable the automatic creation of OSD on available devices, use the
+``unmanaged`` parameter:
If you want to avoid this behavior (disable automatic creation of OSD on available devices), use the ``unmanaged`` parameter:
ceph orch apply osd --all-available-devices --unmanaged=true
+.. note::
+
+ Keep these three facts in mind:
+
+ - The default behavior of ``ceph orch apply`` causes cephadm constantly to reconcile. This means that cephadm creates OSDs as soon as new drives are detected.
+
+ - Setting ``unmanaged: True`` disables the creation of OSDs. If ``unmanaged: True`` is set, nothing will happen even if you apply a new OSD service.
+
+ - ``ceph orch daemon add`` creates OSDs, but does not add an OSD service.
+
* For cephadm, see also :ref:`cephadm-spec-unmanaged`.
.. prompt:: bash #
- ceph orch osd rm stop <svc_id(s)>
+ ceph orch osd rm stop <osd_id(s)>
Example:
.. prompt:: bash #
- orch osd rm <svc_id(s)> --replace [--force]
+ orch osd rm <osd_id(s)> --replace [--force]
Example:
device. To disable this behavior, see :ref:`cephadm-osd-declarative`.
+.. _osd_autotune:
+
+Automatically tuning OSD memory
+===============================
+
+OSD daemons will adjust their memory consumption based on the
+``osd_memory_target`` config option (several gigabytes, by
+default). If Ceph is deployed on dedicated nodes that are not sharing
+memory with other services, cephadm can automatically adjust the per-OSD
+memory consumption based on the total amount of RAM and the number of deployed
+OSDs.
+
+This option is enabled globally with::
+
+ ceph config set osd osd_memory_target_autotune true
+
+Cephadm will start with a fraction
+(``mgr/cephadm/autotune_memory_target_ratio``, which defaults to
+``.7``) of the total RAM in the system, subtract off any memory
+consumed by non-autotuned daemons (non-OSDs, for OSDs for which
+``osd_memory_target_autotune`` is false), and then divide by the
+remaining OSDs.
+
+The final targets are reflected in the config database with options like::
+
+ WHO MASK LEVEL OPTION VALUE
+ osd host:foo basic osd_memory_target 126092301926
+ osd host:bar basic osd_memory_target 6442450944
+
+Both the limits and the current memory consumed by each daemon are visible from
+the ``ceph orch ps`` output in the ``MEM LIMIT`` column::
+
+ NAME HOST PORTS STATUS REFRESHED AGE MEM USED MEM LIMIT VERSION IMAGE ID CONTAINER ID
+ osd.1 dael running (3h) 10s ago 3h 72857k 117.4G 17.0.0-3781-gafaed750 7015fda3cd67 9e183363d39c
+ osd.2 dael running (81m) 10s ago 81m 63989k 117.4G 17.0.0-3781-gafaed750 7015fda3cd67 1f0cc479b051
+ osd.3 dael running (62m) 10s ago 62m 64071k 117.4G 17.0.0-3781-gafaed750 7015fda3cd67 ac5537492f27
+
+To exclude an OSD from memory autotuning, disable the autotune option
+for that OSD and also set a specific memory target. For example,
+
+ .. prompt:: bash #
+
+ ceph config set osd.123 osd_memory_target_autotune false
+ ceph config set osd.123 osd_memory_target 16G
+
+
.. _drivegroups:
Advanced OSD Service Specifications
===================================
-:ref:`orchestrator-cli-service-spec` of type ``osd`` are a way to describe a cluster layout using the properties of disks.
-It gives the user an abstract way tell ceph which disks should turn into an OSD
-with which configuration without knowing the specifics of device names and paths.
+:ref:`orchestrator-cli-service-spec`\s of type ``osd`` are a way to describe a
+cluster layout, using the properties of disks. Service specifications give the
+user an abstract way to tell Ceph which disks should turn into OSDs with which
+configurations, without knowing the specifics of device names and paths.
+
+Service specifications make it possible to define a yaml or json file that can
+be used to reduce the amount of manual work involved in creating OSDs.
-Instead of doing this
+For example, instead of running the following command:
.. prompt:: bash [monitor.1]#
ceph orch daemon add osd *<host>*:*<path-to-device>*
-for each device and each host, we can define a yaml|json file that allows us to describe
-the layout. Here's the most basic example.
+for each device and each host, we can define a yaml or json file that allows us
+to describe the layout. Here's the most basic example.
-Create a file called i.e. osd_spec.yml
+Create a file called (for example) ``osd_spec.yml``:
.. code-block:: yaml
data_devices: <- the type of devices you are applying specs to
all: true <- a filter, check below for a full list
-This would translate to:
+This means :
-Turn any available(ceph-volume decides what 'available' is) into an OSD on all hosts that match
-the glob pattern '*'. (The glob pattern matches against the registered hosts from `host ls`)
-There will be a more detailed section on host_pattern down below.
+#. Turn any available device (ceph-volume decides what 'available' is) into an
+ OSD on all hosts that match the glob pattern '*'. (The glob pattern matches
+ against the registered hosts from `host ls`) A more detailed section on
+ host_pattern is available below.
-and pass it to `osd create` like so
+#. Then pass it to `osd create` like this:
-.. prompt:: bash [monitor.1]#
+ .. prompt:: bash [monitor.1]#
- ceph orch apply osd -i /path/to/osd_spec.yml
+ ceph orch apply osd -i /path/to/osd_spec.yml
-This will go out on all the matching hosts and deploy these OSDs.
+ This instruction will be issued to all the matching hosts, and will deploy
+ these OSDs.
-Since we want to have more complex setups, there are more filters than just the 'all' filter.
+ Setups more complex than the one specified by the ``all`` filter are
+ possible. See :ref:`osd_filters` for details.
-Also, there is a `--dry-run` flag that can be passed to the `apply osd` command, which gives you a synopsis
-of the proposed layout.
+ A ``--dry-run`` flag can be passed to the ``apply osd`` command to display a
+ synopsis of the proposed layout.
Example
.. prompt:: bash [monitor.1]#
- [monitor.1]# ceph orch apply osd -i /path/to/osd_spec.yml --dry-run
+ ceph orch apply osd -i /path/to/osd_spec.yml --dry-run
+
+.. _osd_filters:
Filters
-------
.. note::
- Filters are applied using a `AND` gate by default. This essentially means that a drive needs to fulfill all filter
- criteria in order to get selected.
- If you wish to change this behavior you can adjust this behavior by setting
-
- `filter_logic: OR` # valid arguments are `AND`, `OR`
-
- in the OSD Specification.
+ Filters are applied using an `AND` gate by default. This means that a drive
+ must fulfill all filter criteria in order to get selected. This behavior can
+ be adjusted by setting ``filter_logic: OR`` in the OSD specification.
-You can assign disks to certain groups by their attributes using filters.
+Filters are used to assign disks to groups, using their attributes to group
+them.
-The attributes are based off of ceph-volume's disk query. You can retrieve the information
-with
+The attributes are based off of ceph-volume's disk query. You can retrieve
+information about the attributes with this command:
.. code-block:: bash
ceph-volume inventory </path/to/disk>
-Vendor or Model:
-^^^^^^^^^^^^^^^^
+Vendor or Model
+^^^^^^^^^^^^^^^
-You can target specific disks by their Vendor or by their Model
+Specific disks can be targeted by vendor or model:
.. code-block:: yaml
vendor: disk_vendor_name
-Size:
-^^^^^
+Size
+^^^^
-You can also match by disk `Size`.
+Specific disks can be targeted by `Size`:
.. code-block:: yaml
size: size_spec
-Size specs:
-___________
+Size specs
+__________
-Size specification of format can be of form:
+Size specifications can be of the following forms:
* LOW:HIGH
* :HIGH
Concrete examples:
-Includes disks of an exact size
+To include disks of an exact size
.. code-block:: yaml
size: '10G'
-Includes disks which size is within the range
+To include disks within a given range of size:
.. code-block:: yaml
size: '10G:40G'
-Includes disks less than or equal to 10G in size
+To include disks that are less than or equal to 10G in size:
.. code-block:: yaml
size: ':10G'
-
-Includes disks equal to or greater than 40G in size
+To include disks equal to or greater than 40G in size:
.. code-block:: yaml
size: '40G:'
-Sizes don't have to be exclusively in Gigabyte(G).
+Sizes don't have to be specified exclusively in Gigabytes(G).
-Supported units are Megabyte(M), Gigabyte(G) and Terrabyte(T). Also appending the (B) for byte is supported. MB, GB, TB
+Other units of size are supported: Megabyte(M), Gigabyte(G) and Terrabyte(T).
+Appending the (B) for byte is also supported: ``MB``, ``GB``, ``TB``.
-Rotational:
-^^^^^^^^^^^
+Rotational
+^^^^^^^^^^
This operates on the 'rotational' attribute of the disk.
`0` to match all disks that are non-rotational (SSD, NVME etc)
-All:
-^^^^
+All
+^^^
This will take all disks that are 'available'
all: true
-Limiter:
-^^^^^^^^
+Limiter
+^^^^^^^
-When you specified valid filters but want to limit the amount of matching disks you can use the 'limit' directive.
+If you have specified some valid filters but want to limit the number of disks that they match, use the ``limit`` directive:
.. code-block:: yaml
limit: 2
-For example, if you used `vendor` to match all disks that are from `VendorA` but only want to use the first two
-you could use `limit`.
+For example, if you used `vendor` to match all disks that are from `VendorA`
+but want to use only the first two, you could use `limit`:
.. code-block:: yaml
vendor: VendorA
limit: 2
-Note: Be aware that `limit` is really just a last resort and shouldn't be used if it can be avoided.
+Note: `limit` is a last resort and shouldn't be used if it can be avoided.
Additional Options
The active haproxy acts like a load balancer, distributing all RGW requests
between all the RGW daemons available.
-**Prerequisites:**
+Prerequisites
+-------------
* An existing RGW service, without SSL. (If you want SSL service, the certificate
should be configured on the ingress service, not the RGW service.)
-**Deploy of the high availability service for RGW**
+Deploying
+---------
Use the command::
ceph orch apply -i <ingress_spec_file>
-**Service specification file:**
+Service specification
+---------------------
It is a yaml format file with the following properties:
SSL certificate, if SSL is to be enabled. This must contain the both the certificate and
private key blocks in .pem format.
-**Selecting ethernet interfaces for the virtual IP:**
+.. _ingress-virtual-ip:
+
+Selecting ethernet interfaces for the virtual IP
+------------------------------------------------
You cannot simply provide the name of the network interface on which
to configure the virtual IP because interface names tend to vary
and reference that dummy network in the networks list (see above).
-**Useful hints for ingress:**
+Useful hints for ingress
+------------------------
-* Good to have at least 3 RGW daemons
-* Use at least 3 hosts for the ingress
+* It is good to have at least 3 RGW daemons.
+* We recommend at least 3 hosts for the ingress service.
Service Status
==============
-A service is a group of daemons that are configured together.
+A service is a group of daemons configured together. To see the status of one
+of the services running in the Ceph cluster, do the following:
-Print a list of services known to the orchestrator. The list can be limited to
-services on a particular host with the optional --host parameter and/or
-services of a particular type via optional --type parameter
-(mon, osd, mgr, mds, rgw):
+#. Use the command line to print a list of services.
+#. Locate the service whose status you want to check.
+#. Print the status of the service.
-::
+The following command prints a list of services known to the orchestrator. To
+limit the output to services only on a specified host, use the optional
+``--host`` parameter. To limit the output to services of only a particular
+type, use the optional ``--type`` parameter (mon, osd, mgr, mds, rgw):
- ceph orch ls [--service_type type] [--service_name name] [--export] [--format f] [--refresh]
+ .. prompt:: bash #
-Discover the status of a particular service or daemons::
+ ceph orch ls [--service_type type] [--service_name name] [--export] [--format f] [--refresh]
- ceph orch ls --service_type type --service_name <name> [--refresh]
+Discover the status of a particular service or daemon:
-Export the service specs known to the orchestrator as yaml in format
-that is compatible to ``ceph orch apply -i``::
+ .. prompt:: bash #
- ceph orch ls --export
+ ceph orch ls --service_type type --service_name <name> [--refresh]
-For examples about retrieving specs of single services see :ref:`orchestrator-cli-service-spec-retrieve`.
+To export the service specifications knows to the orchestrator, run the following command.
+
+ .. prompt:: bash #
+
+ ceph orch ls --export
+
+The service specifications exported with this command will be exported as yaml
+and that yaml can be used with the ``ceph orch apply -i`` command.
+
+For information about retrieving the specifications of single services (including examples of commands), see :ref:`orchestrator-cli-service-spec-retrieve`.
Daemon Status
=============
-A daemon is a running systemd unit and is part of a service.
+A daemon is a systemd unit that is running and part of a service.
-Print a list of all daemons known to the orchestrator::
+To see the status of a daemon, do the following:
+
+#. Print a list of all daemons known to the orchestrator.
+#. Query the status of the target daemon.
+
+First, print a list of all daemons known to the orchestrator:
+
+ .. prompt:: bash #
ceph orch ps [--hostname host] [--daemon_type type] [--service_name name] [--daemon_id id] [--format f] [--refresh]
-Query the status of a particular service instance (mon, osd, mds, rgw). For OSDs
-the id is the numeric OSD ID, for MDS services it is the file system name::
+Then query the status of a particular service instance (mon, osd, mds, rgw).
+For OSDs the id is the numeric OSD ID. For MDS services the id is the file
+system name:
+
+ .. prompt:: bash #
ceph orch ps --daemon_type osd --daemon_id 0
Service Specification
=====================
-A *Service Specification* is a data structure
-to specify the deployment of services. For example in YAML:
+A *Service Specification* is a data structure that is used to specify the
+deployment of services. Here is an example of a service specification in YAML:
.. code-block:: yaml
unmanaged: false
...
-where the properties of a service specification are:
+In this example, the properties of this service specification are:
* ``service_type``
The type of the service. Needs to be either a Ceph
The name of the service.
* ``placement``
See :ref:`orchestrator-cli-placement-spec`.
-* ``unmanaged``
- If set to ``true``, the orchestrator will not deploy nor
- remove any daemon associated with this service. Placement and all other
- properties will be ignored. This is useful, if this service should not
- be managed temporarily. For cephadm, See :ref:`cephadm-spec-unmanaged`
+* ``unmanaged`` If set to ``true``, the orchestrator will not deploy nor remove
+ any daemon associated with this service. Placement and all other properties
+ will be ignored. This is useful, if you do not want this service to be
+ managed temporarily. For cephadm, See :ref:`cephadm-spec-unmanaged`
-Each service type can have additional service specific properties.
+Each service type can have additional service-specific properties.
Service specifications of type ``mon``, ``mgr``, and the monitoring
types do not require a ``service_id``.
A service of type ``osd`` is described in :ref:`drivegroups`
-Many service specifications can be applied at once using
-``ceph orch apply -i`` by submitting a multi-document YAML file::
+Many service specifications can be applied at once using ``ceph orch apply -i``
+by submitting a multi-document YAML file::
cat <<EOF | ceph orch apply -i -
service_type: mon
If the services have been started via ``ceph orch apply...``, then directly changing
the Services Specification is complicated. Instead of attempting to directly change
the Services Specification, we suggest exporting the running Service Specification by
-following these instructions::
+following these instructions:
+
+ .. prompt:: bash #
ceph orch ls --service-name rgw.<realm>.<zone> --export > rgw.<realm>.<zone>.yaml
ceph orch ls --service-type mgr --export > mgr.yaml
specification. Placement specifications can either be passed as command line arguments
or in a YAML files.
+.. note::
+
+ cephadm will not deploy daemons on hosts with the ``_no_schedule`` label; see :ref:`cephadm-special-host-labels`.
+
Explicit placements
-------------------
-Daemons can be explicitly placed on hosts by simply specifying them::
+Daemons can be explicitly placed on hosts by simply specifying them:
+
+ .. prompt:: bash #
orch apply prometheus --placement="host1 host2 host3"
- host2
- host3
-MONs and other services may require some enhanced network specifications::
+MONs and other services may require some enhanced network specifications:
+
+ .. prompt:: bash #
- orch daemon add mon --placement="myhost:[v2:1.2.3.4:3300,v1:1.2.3.4:6789]=name"
+ orch daemon add mon --placement="myhost:[v2:1.2.3.4:3300,v1:1.2.3.4:6789]=name"
where ``[v2:1.2.3.4:3300,v1:1.2.3.4:6789]`` is the network address of the monitor
and ``=name`` specifies the name of the new monitor.
Placement by labels
-------------------
-Daemons can be explicitly placed on hosts that match a specific label::
+Daemons can be explicitly placed on hosts that match a specific label:
+
+ .. prompt:: bash #
orch apply prometheus --placement="label:mylabel"
Placement by pattern matching
-----------------------------
-Daemons can be placed on hosts as well::
+Daemons can be placed on hosts as well:
+
+ .. prompt:: bash #
orch apply prometheus --placement='myhost[1-3]'
placement:
host_pattern: "myhost[1-3]"
-To place a service on *all* hosts, use ``"*"``::
+To place a service on *all* hosts, use ``"*"``:
+
+ .. prompt:: bash #
orch apply node-exporter --placement='*'
Setting a limit
---------------
-By specifying ``count``, only that number of daemons will be created::
+By specifying ``count``, only the number of daemons specified will be created:
+
+ .. prompt:: bash #
orch apply prometheus --placement=3
-To deploy *daemons* on a subset of hosts, also specify the count::
+To deploy *daemons* on a subset of hosts, specify the count:
+
+ .. prompt:: bash #
orch apply prometheus --placement="2 host1 host2 host3"
-If the count is bigger than the amount of hosts, cephadm deploys one per host::
+If the count is bigger than the amount of hosts, cephadm deploys one per host:
+
+ .. prompt:: bash #
orch apply prometheus --placement="3 host1 host2"
-results in two Prometheus daemons.
+The command immediately above results in two Prometheus daemons.
-Or in YAML:
+YAML can also be used to specify limits, in the following way:
.. code-block:: yaml
placement:
count: 3
-Or with hosts:
+YAML can also be used to specify limits on hosts:
.. code-block:: yaml
the RGW HTTP port, we need to update the existing
specification.
-1. List the current ``ServiceSpec``::
+1. List the current ``ServiceSpec``:
+
+ .. prompt:: bash #
ceph orch ls --service_name=<service-name> --export > myservice.yaml
-2. Update the yaml file::
+2. Update the yaml file:
+
+ .. prompt:: bash #
vi myservice.yaml
-3. Apply the new ``ServiceSpec``::
+3. Apply the new ``ServiceSpec``:
+
+ .. prompt:: bash #
ceph orch apply -i myservice.yaml [--dry-run]
state consists of a list of service specifications containing placement
specifications (See :ref:`orchestrator-cli-service-spec` ).
-Cephadm constantly compares list of actually running daemons in the cluster
-with the desired service specifications and will either add or remove new
-daemons.
+Cephadm continually compares a list of daemons actually running in the cluster
+against the list in the service specifications. Cephadm adds new daemons and
+removes old daemons as necessary in order to conform to the service
+specifications.
+
+Cephadm does the following to maintain compliance with the service
+specifications.
-First, cephadm will select a list of candidate hosts. It first looks for
-explicit host names and will select those. In case there are no explicit hosts
-defined, cephadm looks for a label specification. If there is no label defined
-in the specification, cephadm will select hosts based on a host pattern. If
-there is no pattern defined, cepham will finally select all known hosts as
-candidates.
+Cephadm first selects a list of candidate hosts. Cephadm seeks explicit host
+names and selects them. If cephadm finds no explicit host names, it looks for
+label specifications. If no label is defined in the specification, cephadm
+selects hosts based on a host pattern. If no host pattern is defined, as a last
+resort, cephadm selects all known hosts as candidates.
-Then, cephadm will consider existing daemons of this services and will try to
-avoid moving any daemons.
+Cephadm is aware of existing daemons running services and tries to avoid moving
+them.
-Cephadm supports the deployment of a specific amount of services. Let's
-consider a service specification like so:
+Cephadm supports the deployment of a specific amount of services.
+Consider the following service specification:
.. code-block:: yaml
count: 3
label: myfs
-This instructs cephadm to deploy three daemons on hosts labeled with
-``myfs`` across the cluster.
+This service specifcation instructs cephadm to deploy three daemons on hosts
+labeled ``myfs`` across the cluster.
-Then, in case there are less than three daemons deployed on the candidate
-hosts, cephadm will then randomly choose hosts for deploying new daemons.
+If there are fewer than three daemons deployed on the candidate hosts, cephadm
+randomly chooses hosts on which to deploy new daemons.
-In case there are more than three daemons deployed, cephadm will remove
-existing daemons.
+If there are more than three daemons deployed on the candidate hosts, cephadm
+removes existing daemons.
-Finally, cephadm will remove daemons on hosts that are outside of the list of
+Finally, cephadm removes daemons on hosts that are outside of the list of
candidate hosts.
-However, there is a special cases that cephadm needs to consider.
+.. note::
+
+ There is a special case that cephadm must consider.
-In case the are fewer hosts selected by the placement specification than
-demanded by ``count``, cephadm will only deploy on selected hosts.
+ If there are fewer hosts selected by the placement specification than
+ demanded by ``count``, cephadm will deploy only on the selected hosts.
.. _cephadm-spec-unmanaged:
-Disable automatic deployment of daemons
-=======================================
+Disabling automatic deployment of daemons
+=========================================
-Cephadm supports disabling the automated deployment and removal of daemons per service. In
-this case, the CLI supports two commands that are dedicated to this mode.
+Cephadm supports disabling the automated deployment and removal of daemons on a
+per service basis. The CLI supports two commands for this.
-To disable the automatic management of dameons, apply
-the :ref:`orchestrator-cli-service-spec` with ``unmanaged=True``.
+Disabling automatic management of daemons
+-----------------------------------------
+
+To disable the automatic management of dameons, set ``unmanaged=True`` in the
+:ref:`orchestrator-cli-service-spec` (``mgr.yaml``).
``mgr.yaml``:
placement:
label: mgr
-.. code-block:: bash
- ceph orch apply -i mgr.yaml
+.. prompt:: bash #
+
+ ceph orch apply -i mgr.yaml
+
.. note::
- cephadm will no longer deploy any new daemons, if the placement
- specification matches additional hosts.
+ After you apply this change in the Service Specification, cephadm will no
+ longer deploy any new daemons (even if the placement specification matches
+ additional hosts).
+
+Deploying a daemon on a host manually
+-------------------------------------
-To manually deploy a daemon on a host, please execute:
+To manually deploy a daemon on a host, run a command of the following form:
-.. code-block:: bash
+ .. prompt:: bash #
- ceph orch daemon add <daemon-type> --placement=<placement spec>
+ ceph orch daemon add <daemon-type> --placement=<placement spec>
-For example
+For example :
-.. code-block:: bash
+ .. prompt:: bash #
- ceph orch daemon add mgr --placement=my_host
+ ceph orch daemon add mgr --placement=my_host
-To manually remove a daemon, please run:
+Removing a daemon from a host manually
+--------------------------------------
-.. code-block:: bash
+To manually remove a daemon, run a command of the following form:
- ceph orch daemon rm <daemon name>... [--force]
+ .. prompt:: bash #
-For example
+ ceph orch daemon rm <daemon name>... [--force]
-.. code-block:: bash
+For example:
- ceph orch daemon rm mgr.my_host.xyzxyz
+ .. prompt:: bash #
+
+ ceph orch daemon rm mgr.my_host.xyzxyz
.. note::
For managed services (``unmanaged=False``), cephadm will automatically
deploy a new daemon a few seconds later.
+
+See also
+--------
* See :ref:`cephadm-osd-declarative` for special handling of unmanaged OSDs.
* See also :ref:`cephadm-pause`
Upgrading Ceph
==============
-Cephadm is capable of safely upgrading Ceph from one bugfix release to
-another. For example, you can upgrade from v15.2.0 (the first Octopus
-release) to the next point release v15.2.1.
+Cephadm can safely upgrade Ceph from one bugfix release to the next. For
+example, you can upgrade from v15.2.0 (the first Octopus release) to the next
+point release, v15.2.1.
The automated upgrade process follows Ceph best practices. For example:
will remain available.
Keep in mind that the Ceph cluster health status is likely to switch to
-`HEALTH_WARNING` during the upgrade.
+``HEALTH_WARNING`` during the upgrade.
Starting the upgrade
====================
-Before you start, you should verify that all hosts are currently online
-and your cluster is healthy.
+Before you begin using cephadm to upgrade Ceph, verify that all hosts are currently online and that your cluster is healthy:
-::
+.. prompt:: bash #
- # ceph -s
+ ceph -s
+
+To upgrade (or downgrade) to a specific release:
-To upgrade (or downgrade) to a specific release::
+.. prompt:: bash #
- # ceph orch upgrade start --ceph-version <version>
+ ceph orch upgrade start --ceph-version <version>
-For example, to upgrade to v15.2.1::
+For example, to upgrade to v15.2.1:
- # ceph orch upgrade start --ceph-version 15.2.1
+.. prompt:: bash #
+
+ ceph orch upgrade start --ceph-version 15.2.1
Monitoring the upgrade
======================
-Determine whether an upgrade is in process and what version the cluster is
-upgrading to with::
+Determine (1) whether an upgrade is in progress and (2) which version the
+cluster is upgrading to by running the following command:
+
+.. prompt:: bash #
- # ceph orch upgrade status
+ ceph orch upgrade status
-While the upgrade is underway, you will see a progress bar in the ceph
-status output. For example::
+Watching the progress bar during a Ceph upgrade
+-----------------------------------------------
+
+During the upgrade, a progress bar is visible in the ceph status output. It
+looks like this:
+
+.. code-block:: console
# ceph -s
+
[...]
progress:
Upgrade to docker.io/ceph/ceph:v15.2.1 (00h 20m 12s)
[=======.....................] (time remaining: 01h 43m 31s)
-You can also watch the cephadm log with::
+Watching the cephadm log during an upgrade
+------------------------------------------
+
+Watch the cephadm log by running the following command:
- # ceph -W cephadm
+.. prompt:: bash #
+
+ ceph -W cephadm
Canceling an upgrade
====================
-You can stop the upgrade process at any time with::
+You can stop the upgrade process at any time with:
+
+.. prompt:: bash #
# ceph orch upgrade stop
UPGRADE_NO_STANDBY_MGR
----------------------
-Ceph requires an active and standby manager daemon in order to proceed, but
-there is currently no standby.
+This alert means that Ceph requires an active and standby manager daemon in
+order to proceed, but there is currently no standby.
+
+You can ensure that Cephadm is configured to run 2 (or more) managers by running the following command:
+
+.. prompt:: bash #
-You can ensure that Cephadm is configured to run 2 (or more) managers with::
+ ceph orch apply mgr 2 # or more
- # ceph orch apply mgr 2 # or more
+You can check the status of existing mgr daemons by running the following command:
-You can check the status of existing mgr daemons with::
+.. prompt:: bash #
- # ceph orch ps --daemon-type mgr
+ ceph orch ps --daemon-type mgr
-If an existing mgr daemon has stopped, you can try restarting it with::
+If an existing mgr daemon has stopped, you can try to restart it by running the following command:
- # ceph orch daemon restart <name>
+.. prompt:: bash #
+
+ ceph orch daemon restart <name>
UPGRADE_FAILED_PULL
-------------------
-Ceph was unable to pull the container image for the target version.
-This can happen if you specify an version or container image that does
-not exist (e.g., 1.2.3), or if the container registry is not reachable from
-one or more hosts in the cluster.
+This alert means that Ceph was unable to pull the container image for the
+target version. This can happen if you specify a version or container image
+that does not exist (e.g. "1.2.3"), or if the container registry can not
+be reached by one or more hosts in the cluster.
-You can cancel the existing upgrade and specify a different target version with::
+To cancel the existing upgrade and to specify a different target version, run the following commands:
- # ceph orch upgrade stop
- # ceph orch upgrade start --ceph-version <version>
+.. prompt:: bash #
+
+ ceph orch upgrade stop
+ ceph orch upgrade start --ceph-version <version>
Using customized container images
=================================
-For most users, simplify specifying the Ceph version is sufficient.
-Cephadm will locate the specific Ceph container image to use by
-combining the ``container_image_base`` configuration option (default:
-``docker.io/ceph/ceph``) with a tag of ``vX.Y.Z``.
+For most users, upgrading requires nothing more complicated than specifying the
+Ceph version number to upgrade to. In such cases, cephadm locates the specific
+Ceph container image to use by combining the ``container_image_base``
+configuration option (default: ``docker.io/ceph/ceph``) with a tag of
+``vX.Y.Z``.
+
+But it is possible to upgrade to an arbitrary container image, if that's what
+you need. For example, the following command upgrades to a development build:
-You can also upgrade to an arbitrary container image. For example, to
-upgrade to a development build::
+.. prompt:: bash #
- # ceph orch upgrade start --image quay.io/ceph-ci/ceph:recent-git-branch-name
+ ceph orch upgrade start --image quay.io/ceph-ci/ceph:recent-git-branch-name
For more information about available container images, see :ref:`containers`.
marked damaged.
-Minimum Client Version
-----------------------
+Required Client Features
+------------------------
-It is sometimes desirable to set the minimum version of Ceph that a client must be
-running to connect to a CephFS cluster. Older clients may sometimes still be
-running with bugs that can cause locking issues between clients (due to
-capability release). CephFS provides a mechanism to set the minimum
-client version:
+It is sometimes desirable to set features that clients must support to talk to
+CephFS. Clients without those features may disrupt other clients or behave in
+surprising ways. Or, you may want to require newer features to prevent older
+and possibly buggy clients from connecting.
-::
-
- fs set <fs name> min_compat_client <release>
-
-For example, to only allow Nautilus clients, use:
-
-::
-
- fs set cephfs min_compat_client nautilus
-
-Clients running an older version will be automatically evicted.
-
-Enforcing minimum version of CephFS client is achieved by setting required
-client features. Commands to manipulate required client features of a file
-system:
+Commands to manipulate required client features of a file system:
::
fs feature ls
+Clients that are missing newly added features will be evicted automatically.
-CephFS features and first release they came out.
+Here are the current CephFS features and first release they came out:
+------------------+--------------+-----------------+
| Feature | Ceph release | Upstream Kernel |
+------------------+--------------+-----------------+
| metric_collect | pacific | N/A |
+------------------+--------------+-----------------+
+| alternate_name | pacific | PLANNED |
++------------------+--------------+-----------------+
CephFS Feature Descriptions
Clients can send performance metric to MDS if MDS support this feature.
+::
+
+ alternate_name
+
+Clients can set and understand "alternate names" for directory entries. This is
+to be used for encrypted file name support.
+
Global settings
---------------
--- /dev/null
+.. _cephfs-mirroring:
+
+=========================
+CephFS Snapshot Mirroring
+=========================
+
+CephFS supports asynchronous replication of snapshots to a remote CephFS file system via
+`cephfs-mirror` tool. Snapshots are synchronized by mirroring snapshot data followed by
+creating a snapshot with the same name (for a given directory on the remote file system) as
+the snapshot being synchronized.
+
+Requirements
+------------
+
+The primary (local) and secondary (remote) Ceph clusters version should be Pacific or later.
+
+Creating Users
+--------------
+
+Start by creating a user (on the primary/local cluster) for the mirror daemon. This user
+requires write capability on the metadata pool to create RADOS objects (index objects)
+for watch/notify operation and read capability on the data pool(s)::
+
+ $ ceph auth get-or-create client.mirror mon 'profile cephfs-mirror' mds 'allow r' osd 'allow rw tag cephfs metadata=*, allow r tag cephfs data=*' mgr 'allow r'
+
+Create a user for each file system peer (on the secondary/remote cluster). This user needs
+to have full capabilities on the MDS (to take snapshots) and the OSDs::
+
+ $ ceph fs authorize <fs_name> client.mirror_remote / rwps
+
+This user should be used (as part of peer specification) when adding a peer.
+
+Starting Mirror Daemon
+----------------------
+
+Mirror daemon should be spawned using `systemctl(1)` unit files::
+
+ $ systemctl enable cephfs-mirror@mirror
+ $ systemctl start cephfs-mirror@mirror
+
+`cephfs-mirror` daemon can be run in foreground using::
+
+ $ cephfs-mirror --id mirror --cluster site-a -f
+
+.. note:: User used here is `mirror` created in the `Creating Users` section.
+
+Interface
+---------
+
+`Mirroring` module (manager plugin) provides interfaces for managing directory snapshot
+mirroring. Manager interfaces are (mostly) wrappers around monitor commands for managing
+file system mirroring and is the recommended control interface.
+
+Mirroring Module
+----------------
+
+The mirroring module is responsible for assigning directories to mirror daemons for
+synchronization. Multiple mirror daemons can be spawned to achieve concurrency in
+directory snapshot synchronization. When mirror daemons are spawned (or terminated)
+, the mirroring module discovers the modified set of mirror daemons and rebalances
+the directory assignment amongst the new set thus providing high-availability.
+
+.. note:: Multiple mirror daemons is currently untested. Only a single mirror daemon
+ is recommended.
+
+Mirroring module is disabled by default. To enable mirroring use::
+
+ $ ceph mgr module enable mirroring
+
+Mirroring module provides a family of commands to control mirroring of directory
+snapshots. To add or remove directories, mirroring needs to be enabled for a given
+file system. To enable mirroring use::
+
+ $ ceph fs snapshot mirror enable <fs_name>
+
+.. note:: Mirroring module commands use `fs snapshot mirror` prefix as compared to
+ the monitor commands which `fs mirror` prefix. Make sure to use module
+ commands.
+
+To disable mirroring, use::
+
+ $ ceph fs snapshot mirror disable <fs_name>
+
+Once mirroring is enabled, add a peer to which directory snapshots are to be mirrored.
+Peers follow `<client>@<cluster>` specification and get assigned a unique-id (UUID)
+when added. See `Creating Users` section on how to create Ceph users for mirroring.
+
+To add a peer use::
+
+ $ ceph fs snapshot mirror peer_add <fs_name> <remote_cluster_spec> [<remote_fs_name>] [<remote_mon_host>] [<cephx_key>]
+
+`<remote_fs_name>` is optional, and defaults to `<fs_name>` (on the remote cluster).
+
+This requires the remote cluster ceph configuration and user keyring to be available in
+the primary cluster. See `Bootstrap Peers` section to avoid this. `peer_add` additionally
+supports passing the remote cluster monitor address and the user key. However, bootstrapping
+a peer is the recommended way to add a peer.
+
+.. note:: Only a single peer is supported right now.
+
+To remove a peer use::
+
+ $ ceph fs snapshot mirror peer_remove <fs_name> <peer_uuid>
+
+To list file system mirror peers use::
+
+ $ ceph fs snapshot mirror peer_list <fs_name>
+
+To configure a directory for mirroring, use::
+
+ $ ceph fs snapshot mirror add <fs_name> <path>
+
+To stop a mirroring directory snapshots use::
+
+ $ ceph fs snapshot mirror remove <fs_name> <path>
+
+Only absolute directory paths are allowed. Also, paths are normalized by the mirroring
+module, therfore, `/a/b/../b` is equivalent to `/a/b`.
+
+ $ mkdir -p /d0/d1/d2
+ $ ceph fs snapshot mirror add cephfs /d0/d1/d2
+ {}
+ $ ceph fs snapshot mirror add cephfs /d0/d1/../d1/d2
+ Error EEXIST: directory /d0/d1/d2 is already tracked
+
+Once a directory is added for mirroring, its subdirectory or ancestor directories are
+disallowed to be added for mirorring::
+
+ $ ceph fs snapshot mirror add cephfs /d0/d1
+ Error EINVAL: /d0/d1 is a ancestor of tracked path /d0/d1/d2
+ $ ceph fs snapshot mirror add cephfs /d0/d1/d2/d3
+ Error EINVAL: /d0/d1/d2/d3 is a subtree of tracked path /d0/d1/d2
+
+Commands to check directory mapping (to mirror daemons) and directory distribution are
+detailed in `Mirroring Status` section.
+
+Bootstrap Peers
+---------------
+
+Adding a peer (via `peer_add`) requires the peer cluster configuration and user keyring
+to be available in the primary cluster (manager host and hosts running the mirror daemon).
+This can be avoided by bootstrapping and importing a peer token. Peer bootstrap involves
+creating a bootstrap token on the peer cluster via::
+
+ $ ceph fs snapshot mirror peer_bootstrap create <fs_name> <client_entity> <site-name>
+
+e.g.::
+
+ $ ceph fs snapshot mirror peer_bootstrap create backup_fs client.mirror_remote site-remote
+ {"token": "eyJmc2lkIjogIjBkZjE3MjE3LWRmY2QtNDAzMC05MDc5LTM2Nzk4NTVkNDJlZiIsICJmaWxlc3lzdGVtIjogImJhY2t1cF9mcyIsICJ1c2VyIjogImNsaWVudC5taXJyb3JfcGVlcl9ib290c3RyYXAiLCAic2l0ZV9uYW1lIjogInNpdGUtcmVtb3RlIiwgImtleSI6ICJBUUFhcDBCZ0xtRmpOeEFBVnNyZXozai9YYUV0T2UrbUJEZlJDZz09IiwgIm1vbl9ob3N0IjogIlt2MjoxOTIuMTY4LjAuNTo0MDkxOCx2MToxOTIuMTY4LjAuNTo0MDkxOV0ifQ=="}
+
+`site-name` refers to a user-defined string to identify the remote filesystem. In context
+of `peer_add` interface, `site-name` is the passed in `cluster` name from `remote_cluster_spec`.
+
+Import the bootstrap token in the primary cluster via::
+
+ $ ceph fs snapshot mirror peer_bootstrap import <fs_name> <token>
+
+e.g.::
+
+ $ ceph fs snapshot mirror peer_bootstrap import cephfs eyJmc2lkIjogIjBkZjE3MjE3LWRmY2QtNDAzMC05MDc5LTM2Nzk4NTVkNDJlZiIsICJmaWxlc3lzdGVtIjogImJhY2t1cF9mcyIsICJ1c2VyIjogImNsaWVudC5taXJyb3JfcGVlcl9ib290c3RyYXAiLCAic2l0ZV9uYW1lIjogInNpdGUtcmVtb3RlIiwgImtleSI6ICJBUUFhcDBCZ0xtRmpOeEFBVnNyZXozai9YYUV0T2UrbUJEZlJDZz09IiwgIm1vbl9ob3N0IjogIlt2MjoxOTIuMTY4LjAuNTo0MDkxOCx2MToxOTIuMTY4LjAuNTo0MDkxOV0ifQ==
+
+Mirroring Status
+----------------
+
+CephFS mirroring module provides `mirror daemon status` interface to check mirror daemon status::
+
+ $ ceph fs snapshot mirror daemon status <fs_name>
+ [
+ {
+ "daemon_id": 284167,
+ "filesystems": [
+ {
+ "filesystem_id": 1,
+ "name": "a",
+ "directory_count": 1,
+ "peers": [
+ {
+ "uuid": "02117353-8cd1-44db-976b-eb20609aa160",
+ "remote": {
+ "client_name": "client.mirror_remote",
+ "cluster_name": "ceph",
+ "fs_name": "backup_fs"
+ },
+ "stats": {
+ "failure_count": 1,
+ "recovery_count": 0
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+
+An entry per mirror daemon instance is displayed along with information such as configured
+peers and basic stats. For more detailed stats, use the admin socket interface as detailed
+below.
+
+CephFS mirror daemons provide admin socket commands for querying mirror status. To check
+available commands for mirror status use::
+
+ $ ceph --admin-daemon /path/to/mirror/daemon/admin/socket help
+ {
+ ....
+ ....
+ "fs mirror status cephfs@360": "get filesystem mirror status",
+ ....
+ ....
+ }
+
+Commands with `fs mirror status` prefix provide mirror status for mirror enabled
+file systems. Note that `cephfs@360` is of format `filesystem-name@filesystem-id`.
+This format is required since mirror daemons get asynchronously notified regarding
+file system mirror status (A file system can be deleted and recreated with the same
+name).
+
+Right now, the command provides minimal information regarding mirror status::
+
+ $ ceph --admin-daemon /var/run/ceph/cephfs-mirror.asok fs mirror status cephfs@360
+ {
+ "rados_inst": "192.168.0.5:0/1476644347",
+ "peers": {
+ "a2dc7784-e7a1-4723-b103-03ee8d8768f8": {
+ "remote": {
+ "client_name": "client.mirror_remote",
+ "cluster_name": "site-a",
+ "fs_name": "backup_fs"
+ }
+ }
+ },
+ "snap_dirs": {
+ "dir_count": 1
+ }
+ }
+
+`Peers` section in the command output above shows the peer information such as unique
+peer-id (UUID) and specification. The peer-id is required to remove an existing peer
+as mentioned in the `Mirror Module and Interface` section.
+
+Command with `fs mirror peer status` prefix provide peer synchronization status. This
+command is of format `filesystem-name@filesystem-id peer-uuid`::
+
+ $ ceph --admin-daemon /var/run/ceph/cephfs-mirror.asok fs mirror peer status cephfs@360 a2dc7784-e7a1-4723-b103-03ee8d8768f8
+ {
+ "/d0": {
+ "state": "idle",
+ "last_synced_snap": {
+ "id": 120,
+ "name": "snap1",
+ "sync_duration": 0.079997898999999997,
+ "sync_time_stamp": "274900.558797s"
+ },
+ "snaps_synced": 2,
+ "snaps_deleted": 0,
+ "snaps_renamed": 0
+ }
+ }
+
+Synchronization stats such as `snaps_synced`, `snaps_deleted` and `snaps_renamed` are reset
+on daemon restart and/or when a directory is reassigned to another mirror daemon (when
+multiple mirror daemons are deployed).
+
+A directory can be in one of the following states::
+
+ - `idle`: The directory is currently not being synchronized
+ - `syncing`: The directory is currently being synchronized
+ - `failed`: The directory has hit upper limit of consecutive failures
+
+When a directory hits a configured number of consecutive synchronization failures, the
+mirror daemon marks it as `failed`. Synchronization for these directories are retried.
+By default, the number of consecutive failures before a directory is marked as failed
+is controlled by `cephfs_mirror_max_consecutive_failures_per_directory` configuration
+option (default: 10) and the retry interval for failed directories is controlled via
+`cephfs_mirror_retry_failed_directories_interval` configuration option (default: 60s).
+
+E.g., adding a regular file for synchronization would result in failed status::
+
+ $ ceph fs snapshot mirror add cephfs /f0
+ $ ceph --admin-daemon /var/run/ceph/cephfs-mirror.asok fs mirror peer status cephfs@360 a2dc7784-e7a1-4723-b103-03ee8d8768f8
+ {
+ "/d0": {
+ "state": "idle",
+ "last_synced_snap": {
+ "id": 120,
+ "name": "snap1",
+ "sync_duration": 0.079997898999999997,
+ "sync_time_stamp": "274900.558797s"
+ },
+ "snaps_synced": 2,
+ "snaps_deleted": 0,
+ "snaps_renamed": 0
+ },
+ "/f0": {
+ "state": "failed",
+ "snaps_synced": 0,
+ "snaps_deleted": 0,
+ "snaps_renamed": 0
+ }
+ }
+
+This allows a user to add a non-existent directory for synchronization. The mirror daemon
+would mark the directory as failed and retry (less frequently). When the directory comes
+to existence, the mirror daemons would unmark the failed state upon successfull snapshot
+synchronization.
+
+When mirroring is disabled, the respective `fs mirror status` command for the file system
+will not show up in command help.
+
+Configuration Options
+---------------------
+
+``cephfs_mirror_max_concurrent_directory_syncs``
+
+:Description: Maximum number of directory snapshots that can be synchronized concurrently by
+ cephfs-mirror daemon. Controls the number of synchronization threads.
+:Type: 64-bit Integer Unsigned
+:Default: ``3``
+
+``cephfs_mirror_action_update_interval``
+
+:Description: Interval in seconds to process pending mirror update actions.
+:Type: Float
+:Default: ``2``
+
+``cephfs_mirror_restart_mirror_on_blocklist_interval``
+
+:Description: Interval in seconds to restart blocklisted mirror instances. Setting to zero (0)
+ disables restarting blocklisted instances.
+:Type: Float
+:Default: ``30``
+
+``cephfs_mirror_max_snapshot_sync_per_cycle``
+
+:Description: Maximum number of snapshots to mirror when a directory is picked up for mirroring
+ by worker threads.
+:Type: 64-bit Integer Unsigned
+:Default: ``3``
+
+``cephfs_mirror_directory_scan_interval``
+
+:Description: Interval in seconds to scan configured directories for snapshot mirroring.
+:Type: 64-bit Integer Unsigned
+:Default: ``10``
+
+``cephfs_mirror_max_consecutive_failures_per_directory``
+
+:Description: Number of consecutive snapshot synchronization failues to mark a directory as
+ "failed". Failed directories are retried for synchronization less frequently.
+:Type: 64-bit Integer Unsigned
+:Default: ``10``
+
+``cephfs_mirror_retry_failed_directories_interval``
+
+:Description: Interval in seconds to retry synchronization for failed directories.
+:Type: 64-bit Integer Unsigned
+:Default: ``60``
+
+``cephfs_mirror_restart_mirror_on_failure_interval``
+
+:Description: Interval in seconds to restart failed mirror instances. Setting to zero (0)
+ disables restarting failed mirror instances.
+:Type: Float
+:Default: ``20``
+
+``cephfs_mirror_mount_timeout``
+
+:Description: Timeout in seconds for mounting primary or secondary (remote) ceph file system
+ by the cephfs-mirror daemon. Setting this to a higher value could result in the
+ mirror daemon getting stalled when mounting a file system if the cluster is not
+ reachable. This option is used to override the usual client_mount_timeout.
+:Type: Float
+:Default: ``10``
+
+
+Re-adding Peers
+---------------
+
+When re-adding (reassigning) a peer to a file system in another cluster, ensure that
+all mirror daemons have stopped synchronization to the peer. This can be checked
+via `fs mirror status` admin socket command (the `Peer UUID` should not show up
+in the command output). Also, it is recommended to purge synchronized directories
+from the peer before re-adding it to another file system (especially those directories
+which might exist in the new primary file system). This is not required if re-adding
+a peer to the same primary file system it was earlier synchronized from.
+.. _cephfs-nfs:
+
=======================
CephFS Exports over NFS
=======================
- ``nfs-ganesha``, ``nfs-ganesha-ceph``, ``nfs-ganesha-rados-grace`` and
``nfs-ganesha-rados-urls`` packages (version 3.3 and above)
+.. note:: From Pacific, the nfs mgr module must be enabled prior to use.
+
Create NFS Ganesha Cluster
==========================
.. code:: bash
- $ ceph nfs cluster create <type> <clusterid> [<placement>]
+ $ ceph nfs cluster create <clusterid> [<placement>] [--ingress --virtual-ip <ip>]
This creates a common recovery pool for all NFS Ganesha daemons, new user based on
``clusterid``, and a common NFS Ganesha config RADOS object.
Currently, NFS Ganesha daemon deployed by cephadm listens on the standard
port. So only one daemon will be deployed on a host.
-``<type>`` signifies the export type, which corresponds to the NFS Ganesha file
-system abstraction layer (FSAL). Permissible values are ``"cephfs`` or
-``rgw``, but currently only ``cephfs`` is supported.
-
``<clusterid>`` is an arbitrary string by which this NFS Ganesha cluster will be
known.
"2 host1,host2"
+To deploy NFS with an HA front-end (virtual IP and load balancer), add the
+``--ingress`` flag and specify a virtual IP address. This will deploy a combination
+of keepalived and haproxy to provide an high-availability NFS frontend for the NFS
+service.
+
For more details, refer :ref:`orchestrator-cli-placement-spec` but keep
in mind that specifying the placement via a YAML file is not supported.
-Update NFS Ganesha Cluster
-==========================
-
-.. code:: bash
-
- $ ceph nfs cluster update <clusterid> <placement>
-
-This updates the deployed cluster according to the placement value.
-
Delete NFS Ganesha Cluster
==========================
.. code:: bash
- $ ceph nfs cluster delete <clusterid>
+ $ ceph nfs cluster rm <clusterid>
This deletes the deployed cluster.
Create CephFS Export
====================
-.. warning:: Currently, the volume/nfs interface is not integrated with dashboard. Both
- dashboard and volume/nfs interface have different export requirements and
+.. warning:: Currently, the nfs interface is not integrated with dashboard. Both
+ dashboard and nfs interface have different export requirements and
create exports differently. Management of dashboard created exports is not
supported.
$ ceph fs subvolume getpath <vol_name> <subvol_name> [--group_name <subvol_group_name>]
+.. note:: Export creation is supported only for NFS Ganesha clusters deployed using nfs interface.
+
Delete CephFS Export
====================
.. code:: bash
- $ ceph nfs export delete <clusterid> <binding>
+ $ ceph nfs export rm <clusterid> <binding>
This deletes an export in an NFS Ganesha cluster, where:
.. note:: Only NFS v4.0+ is supported.
+Troubleshooting
+===============
+
+Checking NFS-Ganesha logs with
+
+1) ``cephadm``
+
+ .. code:: bash
+
+ $ cephadm logs --fsid <fsid> --name nfs.<cluster_id>.hostname
+
+2) ``rook``
+
+ .. code:: bash
+
+ $ kubectl logs -n rook-ceph rook-ceph-nfs-<cluster_id>-<node_id> nfs-ganesha
+
+Log level can be changed using `nfs cluster config set` command.
+
.. _NFS-Ganesha NFS Server: https://github.com/nfs-ganesha/nfs-ganesha/wiki
Upgrading old file systems <upgrading>
CephFS Top Utility <cephfs-top>
Scheduled Snapshots <snap-schedule>
-
+ CephFS Snapshot Mirroring <cephfs-mirroring>
.. raw:: html
Presently, there are two types of ephemeral pinning:
-**Distributed Ephemeral Pins**: This policy indicates that **all** of a
-directory's immediate children should be ephemerally pinned. The canonical
-example would be the ``/home`` directory: we want every user's home directory
-to be spread across the entire MDS cluster. This can be set via:
+**Distributed Ephemeral Pins**: This policy causes a directory to fragment
+(even well below the normal fragmentation thresholds) and distribute its
+fragments as ephemerally pinned subtrees. This has the effect of distributing
+immediate children across a range of MDS ranks. The canonical example use-case
+would be the ``/home`` directory: we want every user's home directory to be
+spread across the entire MDS cluster. This can be set via:
::
The ``home/patrick`` directory and its children will be pinned to rank 2
because its export pin overrides the policy on ``home``.
-
-If a directory has an export pin and an ephemeral pin policy, the export pin
-applies to the directory itself and the policy to its children. So:
-
-::
-
- mkdir -p home/{patrick,john}
- setfattr -n ceph.dir.pin -v 0 home
- setfattr -n ceph.dir.pin.distributed -v 1 home
-
-The home directory inode (and all of its directory fragments) will always be
-located on rank 0. All children including ``home/patrick`` and ``home/john``
-will be ephemerally pinned according to the distributed policy. This may only
-matter for some obscure performance advantages. All the same, it's mentioned
-here so the override policy is clear.
Examples::
ceph fs snap-schedule status /
- ceph fs snap-schedule status /foo/bar format=json
+ ceph fs snap-schedule status /foo/bar --format=json
ceph fs snap-schedule list /
- ceph fs snap-schedule list / recursive=true # list all schedules in the tree
+ ceph fs snap-schedule list / --recursive=true # list all schedules in the tree
Add and remove schedules
ceph fs snap-schedule add / 1h 11:55
ceph fs snap-schedule add / 2h 11:55
ceph fs snap-schedule remove / 1h 11:55 # removes one single schedule
- ceph fs snap-schedule remove / 1h # removes all schedules with repeat=1h
+ ceph fs snap-schedule remove / 1h # removes all schedules with --repeat=1h
ceph fs snap-schedule remove / # removes all schedules on path /
Add and remove retention policies
ceph fs set <fs_name> max_mds <old_max_mds>
+9. Restore setting for ``allow_standby_replay`` (if applicable):
+
+::
+
+ ceph fs set <fs_name> allow_standby_replay true
+
Upgrading pre-Firefly file systems past Jewel
=============================================
- Start a cluster with vstart, with cephadm configured
- Manage any additional daemons with cephadm
+- Requires compiled ceph binaries
In this case, the mon and manager at a minimum are running in the usual
vstart way, not managed by cephadm. But cephadm is enabled and the local
sudo ../src/ckill.sh # or,
sudo ../src/cephadm/cephadm rm-cluster --force --fsid `cat fsid`
+cephadm bootstrap --shared_ceph_folder
+======================================
+
+Cephadm can also be used directly without compiled ceph binaries.
+
+Run cephadm like so::
+
+ sudo ./cephadm bootstrap --mon-ip 127.0.0.1 \
+ --ssh-private-key /home/<user>/.ssh/id_rsa \
+ --skip-mon-network \
+ --skip-monitoring-stack --single-host-defaults \
+ --skip-dashboard \
+ --shared_ceph_folder /home/<user>/path/to/ceph/
+
+- ``~/.ssh/id_rsa`` is used as the cluster key. It is assumed that
+ this key is authorized to ssh with no passphrase to root@`hostname`.
+
+Source code changes made in the ``pybind/mgr/`` directory then
+require a daemon restart to take effect.
+
Note regarding network calls from CLI handlers
==============================================
This means we should do very few synchronous calls to remote hosts.
As a guideline, cephadm should do at most ``O(1)`` network calls in CLI handlers.
Everything else should be done asynchronously in other threads, like ``serve()``.
+
+Kcli: a virtualization management tool to make easy orchestrators development
+=============================================================================
+`Kcli <https://github.com/karmab/kcli>`_ is meant to interact with existing
+virtualization providers (libvirt, KubeVirt, oVirt, OpenStack, VMware vSphere,
+GCP and AWS) and to easily deploy and customize VMs from cloud images.
+
+It allows you to setup an environment with several vms with your preferred
+configuration( memory, cpus, disks) and OS flavor.
+
+main advantages:
+----------------
+ - Is fast. Typically you can have a completely new Ceph cluster ready to debug
+ and develop orchestrator features in less than 5 minutes.
+ - Is a "near production" lab. The lab created with kcli is very near of "real"
+ clusters in QE labs or even in production. So easy to test "real things" in
+ almost "real environment"
+ - Is safe and isolated. Do not depend of the things you have installed in your
+ machine. And the vms are isolated from your environment.
+ - Easy to work "dev" environment. For "not compilated" software pieces,
+ for example any mgr module. It is an environment that allow you to test your
+ changes interactively.
+
+Installation:
+-------------
+Complete documentation in `kcli installation <https://kcli.readthedocs.io/en/latest/#installation>`_
+but we strongly suggest to use the container image approach.
+
+So things to do:
+ - 1. Review `requeriments <https://kcli.readthedocs.io/en/latest/#libvirt-hypervisor-requisites>`_
+ and install/configure whatever you need to meet them.
+ - 2. get the kcli image and create one alias for executing the kcli command
+ ::
+
+ # podman pull quay.io/karmab/kcli
+ # alias kcli='podman run --net host -it --rm --security-opt label=disable -v $HOME/.ssh:/root/.ssh -v $HOME/.kcli:/root/.kcli -v /var/lib/libvirt/images:/var/lib/libvirt/images -v /var/run/libvirt:/var/run/libvirt -v $PWD:/workdir -v /var/tmp:/ignitiondir quay.io/karmab/kcli'
+
+.. note:: /var/lib/libvirt/images can be customized.... be sure that you are
+ using this folder for your OS images
+
+.. note:: Once you have used your kcli tool to create and use different labs, we
+ suggest you to "save" and use your own kcli image.
+ Why?: kcli is alive and it changes (and for the moment only exists one tag ...
+ latest). Because we have more than enough with the current functionality, and
+ what we want is overall stability,
+ we suggest to store the kcli image you are using in a safe place and update
+ your kcli alias to use your own image.
+
+Test your kcli installation:
+----------------------------
+See the kcli `basic usage workflow <https://kcli.readthedocs.io/en/latest/#basic-workflow>`_
+
+Create a Ceph lab cluster
+-------------------------
+In order to make easy this task we are going to use a kcli plan.
+
+A kcli plan is a file where you can define the different settings you want to
+have in a set of vms.
+You can define hardware parameters (cpu, memory, disks ..), operating system and
+it also allows you to automate the installation and configuration of any
+software you want to have.
+
+There is a `repository <https://github.com/karmab/kcli-plans>`_ with a collection of
+plans that can be used for different purposes. And we have predefined plans to
+install Ceph clusters using Ceph ansible or cephadm, lets create our first Ceph
+cluster using cephadm::
+
+# kcli2 create plan -u https://github.com/karmab/kcli-plans/blob/master/ceph/ceph_cluster.yml
+
+This will create a set of three vms using the plan file pointed by the url.
+After a few minutes (depend of your laptop power), lets examine the cluster:
+
+* Take a look to the vms created::
+
+ # kcli list vms
+
+* Enter in the bootstrap node::
+
+ # kcli ssh ceph-node-00
+
+* Take a look to the ceph cluster installed::
+
+ [centos@ceph-node-00 ~]$ sudo -i
+ [root@ceph-node-00 ~]# cephadm version
+ [root@ceph-node-00 ~]# cephadm shell
+ [ceph: root@ceph-node-00 /]# ceph orch host ls
+
+Create a Ceph cluster to make easy developing in mgr modules (Orchestrators and Dashboard)
+------------------------------------------------------------------------------------------
+The cephadm kcli plan (and cephadm) are prepared to do that.
+
+The idea behind this method is to replace several python mgr folders in each of
+the ceph daemons with the source code folders in your host machine.
+This "trick" will allow you to make changes in any orchestrator or dashboard
+module and test them intermediately. (only needed to disable/enable the mgr module)
+
+So in order to create a ceph cluster for development purposes you must use the
+same cephadm plan but with a new parameter pointing your Ceph source code folder::
+
+ # kcli create plan -u https://github.com/karmab/kcli-plans/blob/master/ceph/ceph_cluster.yml -P ceph_dev_folder=/home/mycodefolder/ceph
+
+Ceph Dashboard development
+--------------------------
+Ceph dashboard module is not going to be loaded if previously you have not
+generated the frontend bundle.
+
+For now, in order load properly the Ceph Dashboardmodule and to apply frontend
+changes you have to run "ng build" on your laptop::
+
+ # Start local frontend build with watcher (in background):
+ sudo dnf install -y nodejs
+ cd <path-to-your-ceph-repo>
+ cd src/pybind/mgr/dashboard/frontend
+ sudo chown -R <your-user>:root dist node_modules
+ NG_CLI_ANALYTICS=false npm ci
+ npm run build -- --deleteOutputPath=false --watch &
+
+After saving your changes, the frontend bundle will be built again.
+When completed, you'll see::
+
+ "Localized bundle generation complete."
+
+Then you can reload your Dashboard browser tab.
snapshots. To add or remove directories, mirroring needs to be enabled for a given
file system. To enable mirroring use::
- $ ceph fs snapshot mirror enable <fs>
+ $ ceph fs snapshot mirror enable <fs_name>
.. note:: Mirroring module commands use `fs snapshot mirror` prefix as compared to
the monitor commands which `fs mirror` prefix. Make sure to use module
To disable mirroring, use::
- $ ceph fs snapshot mirror disable <fs>
+ $ ceph fs snapshot mirror disable <fs_name>
Once mirroring is enabled, add a peer to which directory snapshots are to be mirrored.
Peers follow `<client>@<cluster>` specification and get assigned a unique-id (UUID)
To add a peer use::
- $ ceph fs snapshot mirror peer_add <fs> <remote_cluster_spec> [<remote_fs_name>] [<remote_mon_host>] [<cephx_key>]
+ $ ceph fs snapshot mirror peer_add <fs_name> <remote_cluster_spec> [<remote_fs_name>] [<remote_mon_host>] [<cephx_key>]
-`<remote_fs_name>` is optional, and default to `<fs>` (on the remote cluster).
+`<remote_fs_name>` is optional, and default to `<fs_name>` (on the remote cluster).
This requires the remote cluster ceph configuration and user keyring to be available in
the primary cluster. See `Bootstrap Peers` section to avoid this. `peer_add` additionally
To remove a peer use::
- $ ceph fs snapshot mirror peer_remove <fs> <peer_uuid>
+ $ ceph fs snapshot mirror peer_remove <fs_name> <peer_uuid>
.. note:: See `Mirror Daemon Status` section on how to figure out Peer UUID.
To list file system mirror peers use::
- $ ceph fs snapshot mirror peer_list <fs>
+ $ ceph fs snapshot mirror peer_list <fs_name>
To configure a directory for mirroring, use::
- $ ceph fs snapshot mirror add <fs> <path>
+ $ ceph fs snapshot mirror add <fs_name> <path>
To stop a mirroring directory snapshots use::
- $ ceph fs snapshot mirror remove <fs> <path>
+ $ ceph fs snapshot mirror remove <fs_name> <path>
Only absolute directory paths are allowed. Also, paths are normalized by the mirroring
module, therfore, `/a/b/../b` is equivalent to `/a/b`.
--------------------
Mirror daemons get asynchronously notified about changes in file system mirroring status
-and/or peer updates. CephFS mirror daemons provide admin socket commands for querying
-mirror status. To check available commands for mirror status use::
+and/or peer updates.
+
+CephFS mirroring module provides `mirror daemon status` interface to check mirror daemon
+status::
+
+ $ ceph fs snapshot mirror daemon status <fs_name>
+
+E.g::
+
+ $ ceph fs snapshot mirror daemon status a | jq
+ [
+ {
+ "daemon_id": 284167,
+ "filesystems": [
+ {
+ "filesystem_id": 1,
+ "name": "a",
+ "directory_count": 1,
+ "peers": [
+ {
+ "uuid": "02117353-8cd1-44db-976b-eb20609aa160",
+ "remote": {
+ "client_name": "client.mirror_remote",
+ "cluster_name": "ceph",
+ "fs_name": "backup_fs"
+ },
+ "stats": {
+ "failure_count": 1,
+ "recovery_count": 0
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+
+An entry per mirror daemon instance is displayed along with information such as configured
+peers and basic stats. For more detailed stats, use the admin socket interface as detailed
+below.
+
+CephFS mirror daemons provide admin socket commands for querying mirror status. To check
+available commands for mirror status use::
$ ceph --admin-daemon /path/to/mirror/daemon/admin/socket help
{
When using docker, as your device, you might need to run the script with sudo
permissions.
+run-cephadm-e2e-tests.sh
+.........................
+
+``run-cephadm-e2e-tests.sh`` runs a subset of E2E tests to verify that the Dashboard and cephadm as
+Orchestrator backend behave correctly.
+
+Prerequisites: you need to install `KCLI
+<https://kcli.readthedocs.io/en/latest/>`_ in your local machine.
+
+Note:
+ This script is aimed to be run as jenkins job so the cleanup is triggered only in a jenkins
+ environment. In local, the user will shutdown the cluster when desired (i.e. after debugging).
+
+Start E2E tests by running::
+
+ $ cd <your/ceph/repo/dir>
+ $ sudo chown -R $(id -un) src/pybind/mgr/dashboard/frontend/dist src/pybind/mgr/dashboard/frontend/node_modules
+ $ ./src/pybind/mgr/dashboard/ci/cephadm/run-cephadm-e2e-tests.sh
+ $ kcli delete plan -y ceph # After tests finish.
+
Other running options
.....................
| DELETE | Yes | delete | 204 |
+--------------+------------+----------------+-------------+
+To use a custom endpoint for the above listed methods, you can
+use ``@RESTController.MethodMap``
+
+.. code-block:: python
+
+ import cherrypy
+ from ..tools import ApiController, RESTController
+
+ @RESTController.MethodMap(version='0.1')
+ def create(self):
+ return {"msg": "Hello"}
+
+This decorator supports three parameters to customize the
+endpoint:
+
+* ``resource"``: resource id.
+* ``status=200``: set the HTTP status response code
+* ``version``: version
+
How to use a custom API endpoint in a RESTController?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def some_post_endpoint(self, **data):
return {"msg": data}
-Both decorators also support four parameters to customize the
+Both decorators also support five parameters to customize the
endpoint:
* ``method="GET"``: the HTTP method allowed to access this endpoint.
* ``status=200``: set the HTTP status response code
* ``query_params=[]``: list of method parameter names that correspond to URL
query parameters.
+* ``version``: version
How to restrict access to a controller?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Install packages with cephadm
=============================
-#. Download the cephadm script::
+#. Download the cephadm script
- curl --silent --remote-name --location https://github.com/ceph/ceph/raw/octopus/src/cephadm/cephadm
- chmod +x cephadm
+.. prompt:: bash $
+ :substitutions:
+
+ curl --silent --remote-name --location https://github.com/ceph/ceph/raw/|stable-release|/src/cephadm/cephadm
+ chmod +x cephadm
#. Configure the Ceph repository based on the release name::
Perform a selftest. This mode performs a sanity check of ``stats`` module.
+Descriptions of fields
+======================
+
+.. describe:: chit
+
+ cap hit rate
+
+.. describe:: rlat
+
+ read latency
+
+.. describe:: wlat
+
+ write latency
+
+.. describe:: mlat
+
+ metadata latency
+
+.. describe:: dlease
+
+ dentry lease rate
+
+.. describe:: ofiles
+
+ number of opened files
+
+.. describe:: oicaps
+
+ number of pinned caps
+
+.. describe:: oinodes
+
+ number of opened inodes
+
+
Availability
============
MDS Autoscaler Module
=====================
-The MDS Autoscaler Module monitors ``fsmap`` update notifications from the mgr
-daemon and takes action to spawn or kill MDS daemons for a file-system as per
-changes to the:
+The MDS Autoscaler Module monitors file systems to ensure sufficient MDS
+daemons are available. It works by adjusting the placement specification for
+the orchestrator backend of the MDS service. To enable, use:
-- ``max_mds`` config value
-- ``standby_count_wanted`` config value
-- standby promotions to active MDS state in case of active MDS rank death
+.. sh:
-Bumping up the ``max_mds`` config option value causes a standby mds to be promoted
-to hold an active rank. This leads to a drop in standby mds count. The MDS
-Autoscaler module detects this deficit and the orchestrator module is notified
-about the required MDS count. The orchestrator back-end then takes necessary
-measures to spawn standby MDSs.
+ ceph mgr module enable mds_autoscaler
-Dropping the ``max_mds`` config option causes the orchestrator back-end to kill
-standby mds to achieve the new reduced count. Preferably standby mds are chosen
-to be killed when the ``max_mds`` count is dropped.
+The module will monitor the following file system settings to inform
+placement count adjustments:
-An increment and decrement of the ``standby_count_wanted`` config option value
-has a similar effect on the total MDS count. The orchestrator is notified about
-the change and necessary action to spawn or kill standby MDSs is taken.
+- ``max_mds`` file system setting
+- ``standby_count_wanted`` file system setting
-A death of an active MDS rank also causes promotion of a standby mds to occupy
-the required active rank. The MDS Autoscaler notices the change in the standby
-mds count and a message is passed to the orchestrator to maintain the necessary
-MDS count.
+The Ceph monitor daemons are still responsible for promoting or stopping MDS
+according to these settings. The ``mds_autoscaler`` simply adjusts the
+number of MDS which are spawned by the orchestrator.
-NOTE: There is no CLI associated with the MDS Autoscaler Module.
+.. note: There is no CLI or module configurations as of now. Enable or disable
+ the module to turn on or off.
mon-lookup-dns
Heartbeat Settings <mon-osd-interaction>
OSD Settings <osd-config-ref>
+ DmClock Settings <mclock-config-ref>
BlueStore Settings <bluestore-config-ref>
FileStore Settings <filestore-config-ref>
Journal Settings <journal-ref>
--- /dev/null
+========================
+ mClock Config Reference
+========================
+
+.. index:: mclock; configuration
+
+Mclock profiles mask the low level details from users, making it
+easier for them to configure mclock.
+
+To use mclock, you must provide the following input parameters:
+
+* total capacity of each OSD
+
+* an mclock profile to enable
+
+Using the settings in the specified profile, the OSD determines and applies the
+lower-level mclock and Ceph parameters. The parameters applied by the mclock
+profile make it possible to tune the QoS between client I/O, recovery/backfill
+operations, and other background operations (for example, scrub, snap trim, and
+PG deletion). These background activities are considered best-effort internal
+clients of Ceph.
+
+
+.. index:: mclock; profile definition
+
+mClock Profiles - Definition and Purpose
+========================================
+
+A mclock profile is *“a configuration setting that when applied on a running
+Ceph cluster enables the throttling of the operations(IOPS) belonging to
+different client classes (background recovery, scrub, snaptrim, client op,
+osd subop)”*.
+
+The mclock profile uses the capacity limits and the mclock profile selected by
+the user to determine the low-level mclock resource control parameters.
+
+Depending on the profile, lower-level mclock resource-control parameters and
+some Ceph-configuration parameters are transparently applied.
+
+The low-level mclock resource control parameters are the *reservation*,
+*limit*, and *weight* that provide control of the resource shares, as
+described in the :ref:`dmclock-qos` section.
+
+
+.. index:: mclock; profile types
+
+mClock Profile Types
+====================
+
+mclock profiles can be broadly classified into two types,
+
+- **Built-in**: Users can choose between the following built-in profile types:
+
+ - **high_client_ops** (*default*):
+ This profile allocates more reservation and limit to external-client ops
+ as compared to background recoveries and other internal clients within
+ Ceph. This profile is enabled by default.
+ - **high_recovery_ops**:
+ This profile allocates more reservation to background recoveries as
+ compared to external clients and other internal clients within Ceph. For
+ example, an admin may enable this profile temporarily to speed-up background
+ recoveries during non-peak hours.
+ - **balanced**:
+ This profile allocates equal reservation to client ops and background
+ recovery ops.
+
+- **Custom**: This profile gives users complete control over all the mclock
+ configuration parameters. Using this profile is not recommended without
+ a deep understanding of mclock and related Ceph-configuration options.
+
+.. note:: Across the built-in profiles, internal clients of mclock (for example
+ "scrub", "snap trim", and "pg deletion") are given slightly lower
+ reservations, but higher weight and no limit. This ensures that
+ these operations are able to complete quickly if there are no other
+ competing services.
+
+
+.. index:: mclock; built-in profiles
+
+mClock Built-in Profiles
+========================
+
+When a built-in profile is enabled, the mClock scheduler calculates the low
+level mclock parameters [*reservation*, *weight*, *limit*] based on the profile
+enabled for each client type. The mclock parameters are calculated based on
+the max OSD capacity provided beforehand. As a result, the following mclock
+config parameters cannot be modified when using any of the built-in profiles:
+
+- ``osd_mclock_scheduler_client_res``
+- ``osd_mclock_scheduler_client_wgt``
+- ``osd_mclock_scheduler_client_lim``
+- ``osd_mclock_scheduler_background_recovery_res``
+- ``osd_mclock_scheduler_background_recovery_wgt``
+- ``osd_mclock_scheduler_background_recovery_lim``
+- ``osd_mclock_scheduler_background_best_effort_res``
+- ``osd_mclock_scheduler_background_best_effort_wgt``
+- ``osd_mclock_scheduler_background_best_effort_lim``
+
+The following Ceph options will not be modifiable by the user:
+
+- ``osd_max_backfills``
+- ``osd_recovery_max_active``
+
+This is because the above options are internally modified by the mclock
+scheduler in order to maximize the impact of the set profile.
+
+By default, the *high_client_ops* profile is enabled to ensure that a larger
+chunk of the bandwidth allocation goes to client ops. Background recovery ops
+are given lower allocation (and therefore take a longer time to complete). But
+there might be instances that necessitate giving higher allocations to either
+client ops or recovery ops. In order to deal with such a situation, you can
+enable one of the alternate built-in profiles mentioned above.
+
+If any mClock profile (including "custom") is active, the following Ceph config
+sleep options will be disabled,
+
+- ``osd_recovery_sleep``
+- ``osd_recovery_sleep_hdd``
+- ``osd_recovery_sleep_ssd``
+- ``osd_recovery_sleep_hybrid``
+- ``osd_scrub_sleep``
+- ``osd_delete_sleep``
+- ``osd_delete_sleep_hdd``
+- ``osd_delete_sleep_ssd``
+- ``osd_delete_sleep_hybrid``
+- ``osd_snap_trim_sleep``
+- ``osd_snap_trim_sleep_hdd``
+- ``osd_snap_trim_sleep_ssd``
+- ``osd_snap_trim_sleep_hybrid``
+
+The above sleep options are disabled to ensure that mclock scheduler is able to
+determine when to pick the next op from its operation queue and transfer it to
+the operation sequencer. This results in the desired QoS being provided across
+all its clients.
+
+
+.. index:: mclock; enable built-in profile
+
+Steps to Enable mClock Profile
+==============================
+
+The following sections outline the steps required to enable a mclock profile.
+
+Determining OSD Capacity Using Benchmark Tests
+----------------------------------------------
+
+To allow mclock to fulfill its QoS goals across its clients, it is most
+important to have a good understanding of each OSD's capacity in terms of its
+baseline throughputs (IOPS) across the Ceph nodes. To determine this capacity,
+you must perform appropriate benchmarking tests. The steps for performing these
+benchmarking tests are broadly outlined below.
+
+Any existing benchmarking tool can be used for this purpose. The following
+steps use the *Ceph Benchmarking Tool* (cbt_). Regardless of the tool
+used, the steps described below remain the same.
+
+As already described in the :ref:`dmclock-qos` section, the number of
+shards and the bluestore's throttle parameters have an impact on the mclock op
+queues. Therefore, it is critical to set these values carefully in order to
+maximize the impact of the mclock scheduler.
+
+:Number of Operational Shards:
+ We recommend using the default number of shards as defined by the
+ configuration options ``osd_op_num_shards``, ``osd_op_num_shards_hdd``, and
+ ``osd_op_num_shards_ssd``. In general, a lower number of shards will increase
+ the impact of the mclock queues.
+
+:Bluestore Throttle Parameters:
+ We recommend using the default values as defined by
+ ``bluestore_throttle_bytes`` and ``bluestore_throttle_deferred_bytes``. But
+ these parameters may also be determined during the benchmarking phase as
+ described below.
+
+Benchmarking Test Steps Using CBT
+`````````````````````````````````
+
+The steps below use the default shards and detail the steps used to determine the
+correct bluestore throttle values.
+
+.. note:: These steps, although manual in April 2021, will be automated in the future.
+
+1. On the Ceph node hosting the OSDs, download cbt_ from git.
+2. Install cbt and all the dependencies mentioned on the cbt github page.
+3. Construct the Ceph configuration file and the cbt yaml file.
+4. Ensure that the bluestore throttle options ( i.e.
+ ``bluestore_throttle_bytes`` and ``bluestore_throttle_deferred_bytes``) are
+ set to the default values.
+5. Ensure that the test is performed on similar device types to get reliable
+ OSD capacity data.
+6. The OSDs can be grouped together with the desired replication factor for the
+ test to ensure reliability of OSD capacity data.
+7. After ensuring that the OSDs nodes are in the desired configuration, run a
+ simple 4KiB random write workload on the OSD(s) for 300 secs.
+8. Note the overall throughput(IOPS) obtained from the cbt output file. This
+ value is the baseline throughput(IOPS) when the default bluestore
+ throttle options are in effect.
+9. If the intent is to determine the bluestore throttle values for your
+ environment, then set the two options, ``bluestore_throttle_bytes`` and
+ ``bluestore_throttle_deferred_bytes`` to 32 KiB(32768 Bytes) each to begin
+ with. Otherwise, you may skip to the next section.
+10. Run the 4KiB random write workload as before on the OSD(s) for 300 secs.
+11. Note the overall throughput from the cbt log files and compare the value
+ against the baseline throughput in step 8.
+12. If the throughput doesn't match with the baseline, increment the bluestore
+ throttle options by 2x and repeat steps 9 through 11 until the obtained
+ throughput is very close to the baseline value.
+
+For example, during benchmarking on a machine with NVMe SSDs, a value of 256 KiB for
+both bluestore throttle and deferred bytes was determined to maximize the impact
+of mclock. For HDDs, the corresponding value was 40 MiB, where the overall
+throughput was roughly equal to the baseline throughput. Note that in general
+for HDDs, the bluestore throttle values are expected to be higher when compared
+to SSDs.
+
+.. _cbt: https://github.com/ceph/cbt
+
+
+Specifying Max OSD Capacity
+----------------------------
+
+The steps in this section may be performed only if the max osd capacity is
+different from the default values (SSDs: 21500 IOPS and HDDs: 315 IOPS). The
+option ``osd_mclock_max_capacity_iops_[hdd, ssd]`` can be set by specifying it
+in either the **[global]** section or in a specific OSD section (**[osd.x]** of
+your Ceph configuration file).
+
+Alternatively, commands of the following form may be used:
+
+ .. prompt:: bash #
+
+ ceph config set [global, osd] osd_mclock_max_capacity_iops_[hdd,ssd] <value>
+
+For example, the following command sets the max capacity for all the OSDs in a
+Ceph node whose underlying device type is SSDs:
+
+ .. prompt:: bash #
+
+ ceph config set osd osd_mclock_max_capacity_iops_ssd 25000
+
+To set the capacity for a specific OSD (for example "osd.0") whose underlying
+device type is HDD, use a command like this:
+
+ .. prompt:: bash #
+
+ ceph config set osd.0 osd_mclock_max_capacity_iops_hdd 350
+
+
+Specifying Which mClock Profile to Enable
+-----------------------------------------
+
+As already mentioned, the default mclock profile is set to *high_client_ops*.
+The other values for the built-in profiles include *balanced* and
+*high_recovery_ops*.
+
+If there is a requirement to change the default profile, then the option
+``osd_mclock_profile`` may be set in the **[global]** or **[osd]** section of
+your Ceph configuration file before bringing up your cluster.
+
+Alternatively, to change the profile during runtime, use the following command:
+
+ .. prompt:: bash #
+
+ ceph config set [global,osd] osd_mclock_profile <value>
+
+For example, to change the profile to allow faster recoveries, the following
+command can be used to switch to the *high_recovery_ops* profile:
+
+ .. prompt:: bash #
+
+ ceph config set osd osd_mclock_profile high_recovery_ops
+
+.. note:: The *custom* profile is not recommended unless you are an advanced user.
+
+And that's it! You are ready to run workloads on the cluster and check if the
+QoS requirements are being met.
+
+
+.. index:: mclock; config settings
+
+mClock Config Options
+=====================
+
+``osd_mclock_profile``
+
+:Description: This sets the type of mclock profile to use for providing QoS
+ based on operations belonging to different classes (background
+ recovery, scrub, snaptrim, client op, osd subop). Once a built-in
+ profile is enabled, the lower level mclock resource control
+ parameters [*reservation, weight, limit*] and some Ceph
+ configuration parameters are set transparently. Note that the
+ above does not apply for the *custom* profile.
+
+:Type: String
+:Valid Choices: high_client_ops, high_recovery_ops, balanced, custom
+:Default: ``high_client_ops``
+
+``osd_mclock_max_capacity_iops``
+
+:Description: Max IOPS capacity (at 4KiB block size) to consider per OSD
+ (overrides _ssd and _hdd if non-zero)
+
+:Type: Float
+:Default: ``0.0``
+
+``osd_mclock_max_capacity_iops_hdd``
+
+:Description: Max IOPS capacity (at 4KiB block size) to consider per OSD (for
+ rotational media)
+
+:Type: Float
+:Default: ``315.0``
+
+``osd_mclock_max_capacity_iops_ssd``
+
+:Description: Max IOPS capacity (at 4KiB block size) to consider per OSD (for
+ solid state media)
+
+:Type: Float
+:Default: ``21500.0``
+
+``osd_mclock_cost_per_io_usec``
+
+:Description: Cost per IO in microseconds to consider per OSD (overrides _ssd
+ and _hdd if non-zero)
+
+:Type: Float
+:Default: ``0.0``
+
+``osd_mclock_cost_per_io_usec_hdd``
+
+:Description: Cost per IO in microseconds to consider per OSD (for rotational
+ media)
+
+:Type: Float
+:Default: ``25000.0``
+
+``osd_mclock_cost_per_io_usec_ssd``
+
+:Description: Cost per IO in microseconds to consider per OSD (for solid state
+ media)
+
+:Type: Float
+:Default: ``50.0``
+
+``osd_mclock_cost_per_byte_usec``
+
+:Description: Cost per byte in microseconds to consider per OSD (overrides _ssd
+ and _hdd if non-zero)
+
+:Type: Float
+:Default: ``0.0``
+
+``osd_mclock_cost_per_byte_usec_hdd``
+
+:Description: Cost per byte in microseconds to consider per OSD (for rotational
+ media)
+
+:Type: Float
+:Default: ``5.2``
+
+``osd_mclock_cost_per_byte_usec_ssd``
+
+:Description: Cost per byte in microseconds to consider per OSD (for solid state
+ media)
+
+:Type: Float
+:Default: ``0.011``
+
QoS Based on mClock
-------------------
-Ceph's use of mClock is currently experimental and should
-be approached with an exploratory mindset.
+Ceph's use of mClock is now more refined and can be used by following the
+steps as described in `mClock Config Reference`_.
Core Concepts
`````````````
#. weight: the proportional share of capacity if extra capacity or system
oversubscribed.
-In Ceph operations are graded with "cost". And the resources allocated
+In Ceph, operations are graded with "cost". And the resources allocated
for serving various services are consumed by these "costs". So, for
example, the more reservation a services has, the more resource it is
guaranteed to possess, as long as it requires. Assuming there are 2
limit setting, so it can make use of all the resources if there is no
recovery ongoing.
-CURRENT IMPLEMENTATION NOTE: the current experimental implementation
-does not enforce the limit values. As a first approximation we decided
-not to prevent operations that would otherwise enter the operation
-sequencer from doing so.
+CURRENT IMPLEMENTATION NOTE: the current implementation enforces the limit
+values. Therefore, if a service crosses the enforced limit, the op remains
+in the operation queue until the limit is restored.
Subtleties of mClock
````````````````````
small, the calculated tag may never be assigned as it will get a value
of the current time. The ultimate lesson is that values for weight
should not be too large. They should be under the number of requests
-one expects to ve serviced each second.
+one expects to be serviced each second.
Caveats
```````
.. _Pool & PG Config Reference: ../pool-pg-config-ref
.. _Journal Config Reference: ../journal-ref
.. _cache target dirty high ratio: ../../operations/pools#cache-target-dirty-high-ratio
+.. _mClock Config Reference: ../mclock-config-ref
and providing a JSON-encoded ``source-spec`` to describe how to access
the source image data. This ``source-spec`` can either be passed
directly via the `--source-spec` optional, or via a file or STDIN via the
-`--source-spec-file` optional::
+`--source-spec-path` optional::
$ rbd migration prepare --import-only --source-spec "<JSON>" migration_target
rbd persistent cache mode = {cache-mode}
rbd plugins = pwl_cache
-Value of {cache-mode} can be ``rwl`` or ``ssd``. By default it is
-``disabled``
+Value of {cache-mode} can be ``rwl``, ``ssd`` or ``disabled``. By default the
+cache is disabled.
Here are some cache configuration settings:
have DAX enabled (see `DAX`_) when using ``rwl`` mode to avoid performance
degradation.
-- ``rbd_persistent_cache_size`` The cache size per image.
+- ``rbd_persistent_cache_size`` The cache size per image. The minimum cache
+ size is 1 GB.
- ``rbd_persistent_cache_log_periodic_stats`` This is a debug option. It is
- used to emit periodic perf stats to the debug log.
+ used to emit periodic perf stats to the debug log if ``debug rbd pwl`` is
+ set to ``1`` or higher.
The above configurations can be set per-host, per-pool, per-image etc. Eg, to
set per-host, add the overrides to the appropriate `section`_ in the host's
------------
The persistent write-back cache is enabled when the exclusive lock is acquired,
-and it is closed when the exclusive lock is released. To check the transient
-cache status, users may use the command ``rbd status``. ::
+and it is closed when the exclusive lock is released. To check the cache status,
+users may use the command ``rbd status``. ::
rbd status {pool-name}/{image-name}
The status of the cache is shown, including present, clean, cache size and the
-position.
+location. Currently the status is updated only at the time the cache is opened
+and closed and therefore may appear to be out of date (e.g. show that the cache
+is clean when it is actually dirty).
For example::
$ rbd status rbd/foo
Watchers: none
- image cache state:
- clean: false size: 1 GiB host: sceph9 path: /tmp
-
+ Image cache state: {"present":"true","empty":"false","clean":"true","cache_type":"ssd","pwl_host":"sceph9","pwl_path":"/tmp/rbd-pwl.rbd.abcdef123456.pool","pwl_size":1073741824}
Discard Cache
-------------
#!/bin/bash -e
+SCRIPTNAME="$(basename "${0}")"
+BASEDIR="$(readlink -f "$(dirname "${0}")")"
+
if [ ! -d .git ]; then
- echo "no .git present. run this from the base dir of the git checkout."
+ echo "$SCRIPTNAME: Full path to the script: $BASEDIR/$SCRIPTNAME"
+ echo "$SCRIPTNAME: No .git present. Run this from the base dir of the git checkout."
+ exit 1
+fi
+
+# Running the script from a directory containing a colon anywhere in the path
+# will expose us to the dreaded "[BUG] npm run [command] failed if the directory
+# path contains colon" bug https://github.com/npm/cli/issues/633
+# (see https://tracker.ceph.com/issues/39556 for details)
+if [[ "$BASEDIR" == *:* ]] ; then
+ echo "$SCRIPTNAME: Full path to the script: $BASEDIR/$SCRIPTNAME"
+ echo "$SCRIPTNAME: The path to the script contains a colon. Their presence has been known to break the script."
exit 1
fi
"gnetId": null,
"graphTooltip": 0,
"id": null,
- "iteration": 1557386759572,
+ "iteration": 1615564911000,
"links": [],
"panels": [
{
"steppedLine": false,
"targets": [
{
- "expr": "sum by (mode) (\n irate(node_cpu{instance=~\"($ceph_hosts).*\", mode=~\"(irq|nice|softirq|steal|system|user|iowait)\"}[1m]) or\n irate(node_cpu_seconds_total{instance=~\"($ceph_hosts).*\", mode=~\"(irq|nice|softirq|steal|system|user|iowait)\"}[1m])\n) / scalar(\n sum(irate(node_cpu{instance=~\"($ceph_hosts).*\"}[1m]) or\n irate(node_cpu_seconds_total{instance=~\"($ceph_hosts).*\"}[1m]))\n) * 100",
+ "expr": "sum by (mode) (\n irate(node_cpu{instance=~\"($ceph_hosts)([\\\\.:].*)?\", mode=~\"(irq|nice|softirq|steal|system|user|iowait)\"}[1m]) or\n irate(node_cpu_seconds_total{instance=~\"($ceph_hosts)([\\\\.:].*)?\", mode=~\"(irq|nice|softirq|steal|system|user|iowait)\"}[1m])\n) / scalar(\n sum(irate(node_cpu{instance=~\"($ceph_hosts)([\\\\.:].*)?\"}[1m]) or\n irate(node_cpu_seconds_total{instance=~\"($ceph_hosts)([\\\\.:].*)?\"}[1m]))\n) * 100",
"format": "time_series",
"intervalFactor": 2,
"legendFormat": "{{mode}}",
"steppedLine": false,
"targets": [
{
- "expr": "(node_memory_MemTotal{instance=~\"[[ceph_hosts]].*\"} or node_memory_MemTotal_bytes{instance=~\"[[ceph_hosts]].*\"})- (\n (node_memory_MemFree{instance=~\"[[ceph_hosts]].*\"} or node_memory_MemFree_bytes{instance=~\"[[ceph_hosts]].*\"}) + \n (node_memory_Cached{instance=~\"[[ceph_hosts]].*\"} or node_memory_Cached_bytes{instance=~\"[[ceph_hosts]].*\"}) + \n (node_memory_Buffers{instance=~\"[[ceph_hosts]].*\"} or node_memory_Buffers_bytes{instance=~\"[[ceph_hosts]].*\"}) +\n (node_memory_Slab{instance=~\"[[ceph_hosts]].*\"} or node_memory_Slab_bytes{instance=~\"[[ceph_hosts]].*\"})\n )\n \n",
+ "expr": "(node_memory_MemTotal{instance=~\"[[ceph_hosts]]([\\\\.:].*)?\"} or node_memory_MemTotal_bytes{instance=~\"[[ceph_hosts]]([\\\\.:].*)?\"})- (\n (node_memory_MemFree{instance=~\"[[ceph_hosts]]([\\\\.:].*)?\"} or node_memory_MemFree_bytes{instance=~\"[[ceph_hosts]]([\\\\.:].*)?\"}) + \n (node_memory_Cached{instance=~\"[[ceph_hosts]]([\\\\.:].*)?\"} or node_memory_Cached_bytes{instance=~\"[[ceph_hosts]]([\\\\.:].*)?\"}) + \n (node_memory_Buffers{instance=~\"[[ceph_hosts]]([\\\\.:].*)?\"} or node_memory_Buffers_bytes{instance=~\"[[ceph_hosts]]([\\\\.:].*)?\"}) +\n (node_memory_Slab{instance=~\"[[ceph_hosts]]([\\\\.:].*)?\"} or node_memory_Slab_bytes{instance=~\"[[ceph_hosts]]([\\\\.:].*)?\"})\n )\n \n",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "used",
"refId": "D"
},
{
- "expr": "node_memory_MemFree{instance=~\"[[ceph_hosts]].*\"} or node_memory_MemFree_bytes{instance=~\"[[ceph_hosts]].*\"} ",
+ "expr": "node_memory_MemFree{instance=~\"[[ceph_hosts]]([\\\\.:].*)?\"} or node_memory_MemFree_bytes{instance=~\"[[ceph_hosts]]([\\\\.:].*)?\"} ",
"format": "time_series",
"hide": false,
"intervalFactor": 1,
"refId": "A"
},
{
- "expr": "(node_memory_Cached{instance=~\"[[ceph_hosts]].*\"} or node_memory_Cached_bytes{instance=~\"[[ceph_hosts]].*\"}) + \n(node_memory_Buffers{instance=~\"[[ceph_hosts]].*\"} or node_memory_Buffers_bytes{instance=~\"[[ceph_hosts]].*\"}) +\n(node_memory_Slab{instance=~\"[[ceph_hosts]].*\"} or node_memory_Slab_bytes{instance=~\"[[ceph_hosts]].*\"}) \n",
+ "expr": "(node_memory_Cached{instance=~\"[[ceph_hosts]]([\\\\.:].*)?\"} or node_memory_Cached_bytes{instance=~\"[[ceph_hosts]]([\\\\.:].*)?\"}) + \n(node_memory_Buffers{instance=~\"[[ceph_hosts]]([\\\\.:].*)?\"} or node_memory_Buffers_bytes{instance=~\"[[ceph_hosts]]([\\\\.:].*)?\"}) +\n(node_memory_Slab{instance=~\"[[ceph_hosts]]([\\\\.:].*)?\"} or node_memory_Slab_bytes{instance=~\"[[ceph_hosts]]([\\\\.:].*)?\"}) \n",
"format": "time_series",
"hide": false,
"intervalFactor": 1,
"refId": "C"
},
{
- "expr": "node_memory_MemTotal{instance=~\"[[ceph_hosts]].*\"} or node_memory_MemTotal_bytes{instance=~\"[[ceph_hosts]].*\"} ",
+ "expr": "node_memory_MemTotal{instance=~\"[[ceph_hosts]]([\\\\.:].*)?\"} or node_memory_MemTotal_bytes{instance=~\"[[ceph_hosts]]([\\\\.:].*)?\"} ",
"format": "time_series",
"hide": false,
"intervalFactor": 1,
"steppedLine": false,
"targets": [
{
- "expr": "sum by (device) (\n irate(node_network_receive_bytes{instance=~\"($ceph_hosts).*\",device!=\"lo\"}[1m]) or \n irate(node_network_receive_bytes_total{instance=~\"($ceph_hosts).*\",device!=\"lo\"}[1m])\n)",
+ "expr": "sum by (device) (\n irate(node_network_receive_bytes{instance=~\"($ceph_hosts)([\\\\.:].*)?\",device!=\"lo\"}[1m]) or \n irate(node_network_receive_bytes_total{instance=~\"($ceph_hosts)([\\\\.:].*)?\",device!=\"lo\"}[1m])\n)",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{device}}.rx",
"textEditor": true
},
{
- "expr": "sum by (device) (\n irate(node_network_transmit_bytes{instance=~\"($ceph_hosts).*\",device!=\"lo\"}[1m]) or\n irate(node_network_transmit_bytes_total{instance=~\"($ceph_hosts).*\",device!=\"lo\"}[1m])\n)",
+ "expr": "sum by (device) (\n irate(node_network_transmit_bytes{instance=~\"($ceph_hosts)([\\\\.:].*)?\",device!=\"lo\"}[1m]) or\n irate(node_network_transmit_bytes_total{instance=~\"($ceph_hosts)([\\\\.:].*)?\",device!=\"lo\"}[1m])\n)",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{device}}.tx",
"steppedLine": false,
"targets": [
{
- "expr": "irate(node_network_receive_drop{instance=~\"[[ceph_hosts]].*\"}[1m]) or irate(node_network_receive_drop_total{instance=~\"[[ceph_hosts]].*\"}[1m])",
+ "expr": "irate(node_network_receive_drop{instance=~\"[[ceph_hosts]]([\\\\.:].*)?\"}[1m]) or irate(node_network_receive_drop_total{instance=~\"[[ceph_hosts]]([\\\\.:].*)?\"}[1m])",
"format": "time_series",
"instant": false,
"intervalFactor": 1,
"refId": "A"
},
{
- "expr": "irate(node_network_transmit_drop{instance=~\"[[ceph_hosts]].*\"}[1m]) or irate(node_network_transmit_drop_total{instance=~\"[[ceph_hosts]].*\"}[1m])",
+ "expr": "irate(node_network_transmit_drop{instance=~\"[[ceph_hosts]]([\\\\.:].*)?\"}[1m]) or irate(node_network_transmit_drop_total{instance=~\"[[ceph_hosts]]([\\\\.:].*)?\"}[1m])",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{device}}.tx",
"tableColumn": "",
"targets": [
{
- "expr": "sum(ceph_osd_stat_bytes and on (ceph_daemon) ceph_disk_occupation{instance=~\"($ceph_hosts).*\"})",
+ "expr": "sum(ceph_osd_stat_bytes and on (ceph_daemon) ceph_disk_occupation{instance=~\"($ceph_hosts)([\\\\.:].*)?\"})",
"format": "time_series",
"intervalFactor": 2,
"refId": "A",
"steppedLine": false,
"targets": [
{
- "expr": "irate(node_network_receive_errs{instance=~\"[[ceph_hosts]].*\"}[1m]) or irate(node_network_receive_errs_total{instance=~\"[[ceph_hosts]].*\"}[1m])",
+ "expr": "irate(node_network_receive_errs{instance=~\"[[ceph_hosts]]([\\\\.:].*)?\"}[1m]) or irate(node_network_receive_errs_total{instance=~\"[[ceph_hosts]]([\\\\.:].*)?\"}[1m])",
"format": "time_series",
"instant": false,
"intervalFactor": 1,
"refId": "A"
},
{
- "expr": "irate(node_network_transmit_errs{instance=~\"[[ceph_hosts]].*\"}[1m]) or irate(node_network_transmit_errs_total{instance=~\"[[ceph_hosts]].*\"}[1m])",
+ "expr": "irate(node_network_transmit_errs{instance=~\"[[ceph_hosts]]([\\\\.:].*)?\"}[1m]) or irate(node_network_transmit_errs_total{instance=~\"[[ceph_hosts]]([\\\\.:].*)?\"}[1m])",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{device}}.tx",
"steppedLine": false,
"targets": [
{
- "expr": "label_replace(\n (\n irate(node_disk_writes_completed{instance=~\"($ceph_hosts).*\"}[5m]) or\n irate(node_disk_writes_completed_total{instance=~\"($ceph_hosts).*\"}[5m])\n ),\n \"instance\",\n \"$1\",\n \"instance\",\n \"([^:.]*).*\"\n)\n* on(instance, device) group_left(ceph_daemon)\n label_replace(\n label_replace(\n ceph_disk_occupation,\n \"device\",\n \"$1\",\n \"device\",\n \"/dev/(.*)\"\n ),\n \"instance\",\n \"$1\",\n \"instance\",\n \"([^:.]*).*\"\n )",
+ "expr": "label_replace(\n (\n irate(node_disk_writes_completed{instance=~\"($ceph_hosts)([\\\\.:].*)?\"}[5m]) or\n irate(node_disk_writes_completed_total{instance=~\"($ceph_hosts)([\\\\.:].*)?\"}[5m])\n ),\n \"instance\",\n \"$1\",\n \"instance\",\n \"([^:.]*).*\"\n)\n* on(instance, device, ceph_daemon) group_left\n label_replace(\n label_replace(\n ceph_disk_occupation,\n \"device\",\n \"$1\",\n \"device\",\n \"/dev/(.*)\"\n ),\n \"instance\",\n \"$1\",\n \"instance\",\n \"([^:.]*).*\"\n )",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{device}}({{ceph_daemon}}) writes",
"textEditor": true
},
{
- "expr": "label_replace(\n (irate(node_disk_reads_completed{instance=~\"($ceph_hosts).*\"}[5m]) or irate(node_disk_reads_completed_total{instance=~\"($ceph_hosts).*\"}[5m])),\n \"instance\",\n \"$1\",\n \"instance\",\n \"([^:.]*).*\"\n)\n* on(instance, device) group_left(ceph_daemon)\n label_replace(\n label_replace(\n ceph_disk_occupation,\n \"device\",\n \"$1\",\n \"device\",\n \"/dev/(.*)\"\n ),\n \"instance\",\n \"$1\",\n \"instance\",\n \"([^:.]*).*\"\n )",
+ "expr": "label_replace(\n (irate(node_disk_reads_completed{instance=~\"($ceph_hosts)([\\\\.:].*)?\"}[5m]) or irate(node_disk_reads_completed_total{instance=~\"($ceph_hosts)([\\\\.:].*)?\"}[5m])),\n \"instance\",\n \"$1\",\n \"instance\",\n \"([^:.]*).*\"\n)\n* on(instance, device, ceph_daemon) group_left\n label_replace(\n label_replace(\n ceph_disk_occupation,\n \"device\",\n \"$1\",\n \"device\",\n \"/dev/(.*)\"\n ),\n \"instance\",\n \"$1\",\n \"instance\",\n \"([^:.]*).*\"\n )",
"format": "time_series",
"hide": false,
"intervalFactor": 1,
"steppedLine": false,
"targets": [
{
- "expr": "label_replace((irate(node_disk_bytes_written{instance=~\"($ceph_hosts).*\"}[5m]) or irate(node_disk_written_bytes_total{instance=~\"($ceph_hosts).*\"}[5m])), \"instance\", \"$1\", \"instance\", \"([^:.]*).*\") * on(instance, device) group_left(ceph_daemon) label_replace(label_replace(ceph_disk_occupation, \"device\", \"$1\", \"device\", \"/dev/(.*)\"), \"instance\", \"$1\", \"instance\", \"([^:.]*).*\")",
+ "expr": "label_replace((irate(node_disk_bytes_written{instance=~\"($ceph_hosts)([\\\\.:].*)?\"}[5m]) or irate(node_disk_written_bytes_total{instance=~\"($ceph_hosts)([\\\\.:].*)?\"}[5m])), \"instance\", \"$1\", \"instance\", \"([^:.]*).*\") * on(instance, device, ceph_daemon) group_left label_replace(label_replace(ceph_disk_occupation, \"device\", \"$1\", \"device\", \"/dev/(.*)\"), \"instance\", \"$1\", \"instance\", \"([^:.]*).*\")",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{device}}({{ceph_daemon}}) write",
"refId": "B"
},
{
- "expr": "label_replace((irate(node_disk_bytes_read{instance=~\"($ceph_hosts).*\"}[5m]) or irate(node_disk_read_bytes_total{instance=~\"($ceph_hosts).*\"}[5m])), \"instance\", \"$1\", \"instance\", \"([^:.]*).*\") * on(instance, device) group_left(ceph_daemon) label_replace(label_replace(ceph_disk_occupation, \"device\", \"$1\", \"device\", \"/dev/(.*)\"), \"instance\", \"$1\", \"instance\", \"([^:.]*).*\")",
+ "expr": "label_replace((irate(node_disk_bytes_read{instance=~\"($ceph_hosts)([\\\\.:].*)?\"}[5m]) or irate(node_disk_read_bytes_total{instance=~\"($ceph_hosts)([\\\\.:].*)?\"}[5m])), \"instance\", \"$1\", \"instance\", \"([^:.]*).*\") * on(instance, device, ceph_daemon) group_left label_replace(label_replace(ceph_disk_occupation, \"device\", \"$1\", \"device\", \"/dev/(.*)\"), \"instance\", \"$1\", \"instance\", \"([^:.]*).*\")",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{device}}({{ceph_daemon}}) read",
"steppedLine": false,
"targets": [
{
- "expr": "max by(instance,device) (label_replace((irate(node_disk_write_time_seconds_total{ instance=~\"($ceph_hosts).*\"}[5m]) ) / clamp_min(irate(node_disk_writes_completed_total{ instance=~\"($ceph_hosts).*\"}[5m]), 0.001) or (irate(node_disk_read_time_seconds_total{ instance=~\"($ceph_hosts).*\"}[5m]) ) / clamp_min(irate(node_disk_reads_completed_total{ instance=~\"($ceph_hosts).*\"}[5m]), 0.001), \"instance\", \"$1\", \"instance\", \"([^:.]*).*\")) * on(instance,device) group_left(ceph_daemon) label_replace(label_replace(ceph_disk_occupation{instance=~\"($ceph_hosts).*\"}, \"device\", \"$1\", \"device\", \"/dev/(.*)\"), \"instance\", \"$1\", \"instance\", \"([^:.]*).*\")",
+ "expr": "max by(instance,device) (label_replace((irate(node_disk_write_time_seconds_total{ instance=~\"($ceph_hosts)([\\\\.:].*)?\"}[5m]) ) / clamp_min(irate(node_disk_writes_completed_total{ instance=~\"($ceph_hosts)([\\\\.:].*)?\"}[5m]), 0.001) or (irate(node_disk_read_time_seconds_total{ instance=~\"($ceph_hosts)([\\\\.:].*)?\"}[5m]) ) / clamp_min(irate(node_disk_reads_completed_total{ instance=~\"($ceph_hosts)([\\\\.:].*)?\"}[5m]), 0.001), \"instance\", \"$1\", \"instance\", \"([^:.]*).*\")) * on(instance, device, ceph_daemon) group_left label_replace(label_replace(ceph_disk_occupation{instance=~\"($ceph_hosts)([\\\\.:].*)?\"}, \"device\", \"$1\", \"device\", \"/dev/(.*)\"), \"instance\", \"$1\", \"instance\", \"([^:.]*).*\")",
"format": "time_series",
"hide": false,
"intervalFactor": 1,
"steppedLine": false,
"targets": [
{
- "expr": "label_replace(((irate(node_disk_io_time_ms{instance=~\"($ceph_hosts).*\"}[5m]) / 10 ) or irate(node_disk_io_time_seconds_total{instance=~\"($ceph_hosts).*\"}[5m]) * 100), \"instance\", \"$1\", \"instance\", \"([^:.]*).*\") * on(instance, device) group_left(ceph_daemon) label_replace(label_replace(ceph_disk_occupation{instance=~\"($ceph_hosts).*\"}, \"device\", \"$1\", \"device\", \"/dev/(.*)\"), \"instance\", \"$1\", \"instance\", \"([^:.]*).*\")",
+ "expr": "label_replace(((irate(node_disk_io_time_ms{instance=~\"($ceph_hosts)([\\\\.:].*)?\"}[5m]) / 10 ) or irate(node_disk_io_time_seconds_total{instance=~\"($ceph_hosts)([\\\\.:].*)?\"}[5m]) * 100), \"instance\", \"$1\", \"instance\", \"([^:.]*).*\") * on(instance, device, ceph_daemon) group_left label_replace(label_replace(ceph_disk_occupation{instance=~\"($ceph_hosts)([\\\\.:].*)?\"}, \"device\", \"$1\", \"device\", \"/dev/(.*)\"), \"instance\", \"$1\", \"instance\", \"([^:.]*).*\")",
"format": "time_series",
"hide": false,
"intervalFactor": 1,
"#d44a3a"
],
"datasource": "$datasource",
- "decimals": 0,
"description": "Average CPU busy across all hosts (OSD, RGW, MON etc) within the cluster",
"decimals": 2,
"format": "percentunit",
"#d44a3a"
],
"datasource": "$datasource",
- "decimals": 0,
"description": "Average Memory Usage across all hosts in the cluster (excludes buffer/cache usage)",
"decimals": 2,
"format": "percentunit",
"tableColumn": "",
"targets": [
{
- "expr" : "avg (\n label_replace((irate(node_disk_io_time_ms[5m]) / 10 ) or\n (irate(node_disk_io_time_seconds_total[5m]) * 100), \"instance\", \"$1\", \"instance\", \"([^.:]*).*\"\n ) *\n on(instance, device) label_replace(label_replace(ceph_disk_occupation{instance=~\"($osd_hosts).*\"}, \"device\", \"$1\", \"device\", \"/dev/(.*)\"), \"instance\", \"$1\", \"instance\", \"([^.:]*).*\")\n)",
+ "expr" : "avg (\n label_replace((irate(node_disk_io_time_ms[5m]) / 10 ) or\n (irate(node_disk_io_time_seconds_total[5m]) * 100), \"instance\", \"$1\", \"instance\", \"([^.:]*).*\"\n ) *\n on(instance, device, ceph_daemon) label_replace(label_replace(ceph_disk_occupation{instance=~\"($osd_hosts).*\"}, \"device\", \"$1\", \"device\", \"/dev/(.*)\"), \"instance\", \"$1\", \"instance\", \"([^.:]*).*\")\n)",
"format": "time_series",
"instant": true,
"intervalFactor": 1,
"editable": false,
"gnetId": null,
"graphTooltip": 0,
- "iteration": 1551789900270,
+ "id": null,
+ "iteration": 1617656284287,
"links": [],
"panels": [
{
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
+ "cacheTimeout": null,
+ "colorBackground": false,
+ "colorValue": false,
+ "colors": [
+ "#299c46",
+ "rgba(237, 129, 40, 0.89)",
+ "#d44a3a"
+ ],
"datasource": "$datasource",
- "fill": 1,
+ "format": "none",
+ "gauge": {
+ "maxValue": 100,
+ "minValue": 0,
+ "show": false,
+ "thresholdLabels": false,
+ "thresholdMarkers": true
+ },
"gridPos": {
- "h": 7,
- "w": 12,
+ "h": 3,
+ "w": 3,
"x": 0,
- "y": 1
+ "y": 0
},
- "id": 1,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
+ "id": 21,
+ "interval": null,
+ "links": [],
+ "mappingType": 1,
+ "mappingTypes": [
+ {
+ "name": "value to text",
+ "value": 1
+ },
+ {
+ "name": "range to text",
+ "value": 2
+ }
+ ],
+ "maxDataPoints": 100,
+ "nullPointMode": "connected",
+ "nullText": null,
+ "postfix": "",
+ "postfixFontSize": "50%",
+ "prefix": "",
+ "prefixFontSize": "50%",
+ "rangeMaps": [
+ {
+ "from": "null",
+ "text": "N/A",
+ "to": "null"
+ }
+ ],
+ "sparkline": {
+ "fillColor": "rgba(31, 118, 189, 0.18)",
+ "full": false,
+ "lineColor": "rgb(31, 120, 193)",
+ "show": false,
+ "ymax": null,
+ "ymin": null
},
- "lines": true,
- "linewidth": 1,
+ "tableColumn": "",
+ "targets": [
+ {
+ "expr": "count(ceph_pool_metadata)",
+ "format": "table",
+ "instant": true,
+ "interval": "",
+ "legendFormat": "",
+ "refId": "A"
+ }
+ ],
+ "thresholds": "",
+ "timeFrom": null,
+ "timeShift": null,
+ "title": "Pools",
+ "type": "singlestat",
+ "valueFontSize": "80%",
+ "valueMaps": [
+ {
+ "op": "=",
+ "text": "N/A",
+ "value": "null"
+ }
+ ],
+ "valueName": "avg"
+ },
+ {
+ "cacheTimeout": null,
+ "colorBackground": false,
+ "colorValue": false,
+ "colors": [
+ "#299c46",
+ "rgba(237, 129, 40, 0.89)",
+ "#d44a3a"
+ ],
+ "datasource": "$datasource",
+ "description": "Count of the pools that have compression enabled",
+ "format": "none",
+ "gauge": {
+ "maxValue": 100,
+ "minValue": 0,
+ "show": false,
+ "thresholdLabels": false,
+ "thresholdMarkers": true
+ },
+ "gridPos": {
+ "h": 3,
+ "w": 3,
+ "x": 3,
+ "y": 0
+ },
+ "id": 7,
+ "interval": null,
"links": [],
- "minSpan": 12,
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [
+ "mappingType": 1,
+ "mappingTypes": [
+ {
+ "name": "value to text",
+ "value": 1
+ },
{
- "alias": "/.* read/",
- "transform": "negative-Y"
+ "name": "range to text",
+ "value": 2
}
],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
+ "maxDataPoints": 100,
+ "nullPointMode": "connected",
+ "nullText": null,
+ "pluginVersion": "6.7.4",
+ "postfix": "",
+ "postfixFontSize": "50%",
+ "prefix": "",
+ "prefixFontSize": "50%",
+ "rangeMaps": [
+ {
+ "from": "null",
+ "text": "N/A",
+ "to": "null"
+ }
+ ],
+ "sparkline": {
+ "fillColor": "rgba(31, 118, 189, 0.18)",
+ "full": false,
+ "lineColor": "rgb(31, 120, 193)",
+ "show": false,
+ "ymax": null,
+ "ymin": null
+ },
+ "tableColumn": "",
"targets": [
{
- "expr": "topk($topk,rate(ceph_pool_rd[1m]) + on(pool_id) group_left(instance,name) ceph_pool_metadata) ",
- "format": "time_series",
- "hide": false,
- "intervalFactor": 1,
- "legendFormat": "{{name}} - read",
- "refId": "F"
+ "expr": "count(ceph_pool_metadata{compression_mode!=\"none\"})",
+ "interval": "",
+ "legendFormat": "",
+ "refId": "A"
+ }
+ ],
+ "thresholds": "",
+ "timeFrom": null,
+ "timeShift": null,
+ "title": "Pools with Compression",
+ "type": "singlestat",
+ "valueFontSize": "80%",
+ "valueMaps": [
+ {
+ "op": "=",
+ "text": "N/A",
+ "value": "null"
+ }
+ ],
+ "valueName": "current"
+ },
+ {
+ "cacheTimeout": null,
+ "colorBackground": false,
+ "colorValue": false,
+ "colors": [
+ "#299c46",
+ "rgba(237, 129, 40, 0.89)",
+ "#d44a3a"
+ ],
+ "datasource": "$datasource",
+ "decimals": 1,
+ "description": "Total raw capacity available to the cluster",
+ "format": "bytes",
+ "gauge": {
+ "maxValue": 100,
+ "minValue": 0,
+ "show": false,
+ "thresholdLabels": false,
+ "thresholdMarkers": true
+ },
+ "gridPos": {
+ "h": 3,
+ "w": 3,
+ "x": 6,
+ "y": 0
+ },
+ "id": 27,
+ "interval": null,
+ "links": [],
+ "mappingType": 1,
+ "mappingTypes": [
+ {
+ "name": "value to text",
+ "value": 1
},
{
- "expr": "topk($topk,rate(ceph_pool_wr[1m]) + on(pool_id) group_left(instance,name) ceph_pool_metadata) ",
- "format": "time_series",
- "intervalFactor": 1,
- "legendFormat": "{{name}} - write",
+ "name": "range to text",
+ "value": 2
+ }
+ ],
+ "maxDataPoints": 100,
+ "nullPointMode": "connected",
+ "nullText": null,
+ "postfix": "",
+ "postfixFontSize": "50%",
+ "prefix": "",
+ "prefixFontSize": "50%",
+ "rangeMaps": [
+ {
+ "from": "null",
+ "text": "N/A",
+ "to": "null"
+ }
+ ],
+ "sparkline": {
+ "fillColor": "rgba(31, 118, 189, 0.18)",
+ "full": false,
+ "lineColor": "rgb(31, 120, 193)",
+ "show": false,
+ "ymax": null,
+ "ymin": null
+ },
+ "tableColumn": "",
+ "targets": [
+ {
+ "expr": "sum(ceph_osd_stat_bytes)",
+ "interval": "",
+ "legendFormat": "",
"refId": "A"
}
],
- "thresholds": [],
+ "thresholds": "",
"timeFrom": null,
"timeShift": null,
- "title": "Top $topk Client IOPS by Pool",
- "tooltip": {
- "shared": true,
- "sort": 2,
- "value_type": "individual"
+ "title": "Total Raw Capacity",
+ "type": "singlestat",
+ "valueFontSize": "80%",
+ "valueMaps": [
+ {
+ "op": "=",
+ "text": "N/A",
+ "value": "null"
+ }
+ ],
+ "valueName": "current"
+ },
+ {
+ "cacheTimeout": null,
+ "colorBackground": false,
+ "colorValue": false,
+ "colors": [
+ "#299c46",
+ "rgba(237, 129, 40, 0.89)",
+ "#d44a3a"
+ ],
+ "datasource": "$datasource",
+ "description": "Total raw capacity consumed by user data and associated overheads (metadata + redundancy)",
+ "format": "bytes",
+ "gauge": {
+ "maxValue": 100,
+ "minValue": 0,
+ "show": false,
+ "thresholdLabels": false,
+ "thresholdMarkers": true
},
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
+ "gridPos": {
+ "h": 3,
+ "w": 3,
+ "x": 9,
+ "y": 0
},
- "yaxes": [
+ "id": 25,
+ "interval": null,
+ "links": [],
+ "mappingType": 1,
+ "mappingTypes": [
{
- "format": "none",
- "label": "Read (-) / Write (+)",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
+ "name": "value to text",
+ "value": 1
},
{
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": false
+ "name": "range to text",
+ "value": 2
}
],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
+ "maxDataPoints": 100,
+ "nullPointMode": "connected",
+ "nullText": null,
+ "postfix": "",
+ "postfixFontSize": "50%",
+ "prefix": "",
+ "prefixFontSize": "50%",
+ "rangeMaps": [
+ {
+ "from": "null",
+ "text": "N/A",
+ "to": "null"
+ }
+ ],
+ "sparkline": {
+ "fillColor": "rgba(31, 118, 189, 0.18)",
+ "full": false,
+ "lineColor": "rgb(31, 120, 193)",
+ "show": false,
+ "ymax": null,
+ "ymin": null
+ },
+ "tableColumn": "",
+ "targets": [
+ {
+ "expr": "sum(ceph_pool_bytes_used)",
+ "instant": true,
+ "interval": "",
+ "legendFormat": "",
+ "refId": "A"
+ }
+ ],
+ "thresholds": "",
+ "timeFrom": null,
+ "timeShift": null,
+ "title": "Raw Capacity Consumed",
+ "type": "singlestat",
+ "valueFontSize": "80%",
+ "valueMaps": [
+ {
+ "op": "=",
+ "text": "N/A",
+ "value": "null"
+ }
+ ],
+ "valueName": "current",
+ "decimals": 2
},
{
- "aliasColors": {},
- "bars": false,
- "dashLength": 10,
- "dashes": false,
+ "cacheTimeout": null,
+ "colorBackground": false,
+ "colorValue": false,
+ "colors": [
+ "#299c46",
+ "rgba(237, 129, 40, 0.89)",
+ "#d44a3a"
+ ],
"datasource": "$datasource",
- "fill": 1,
+ "decimals": 1,
+ "description": "Total of client data stored in the cluster",
+ "format": "bytes",
+ "gauge": {
+ "maxValue": 100,
+ "minValue": 0,
+ "show": false,
+ "thresholdLabels": false,
+ "thresholdMarkers": true
+ },
"gridPos": {
- "h": 7,
- "w": 12,
+ "h": 3,
+ "w": 3,
"x": 12,
- "y": 1
+ "y": 0
},
- "id": 2,
- "legend": {
- "avg": false,
- "current": false,
- "max": false,
- "min": false,
- "show": true,
- "total": false,
- "values": false
- },
- "lines": true,
- "linewidth": 1,
+ "id": 23,
+ "interval": null,
"links": [],
- "minSpan": 12,
- "nullPointMode": "null",
- "percentage": false,
- "pointradius": 5,
- "points": false,
- "renderer": "flot",
- "seriesOverrides": [
+ "mappingType": 1,
+ "mappingTypes": [
{
- "alias": "/.* read/",
- "transform": "negative-Y"
+ "name": "value to text",
+ "value": 1
+ },
+ {
+ "name": "range to text",
+ "value": 2
}
],
- "spaceLength": 10,
- "stack": false,
- "steppedLine": false,
+ "maxDataPoints": 100,
+ "nullPointMode": "connected",
+ "nullText": null,
+ "postfix": "",
+ "postfixFontSize": "50%",
+ "prefix": "",
+ "prefixFontSize": "50%",
+ "rangeMaps": [
+ {
+ "from": "null",
+ "text": "N/A",
+ "to": "null"
+ }
+ ],
+ "sparkline": {
+ "fillColor": "rgba(31, 118, 189, 0.18)",
+ "full": false,
+ "lineColor": "rgb(31, 120, 193)",
+ "show": false,
+ "ymax": null,
+ "ymin": null
+ },
+ "tableColumn": "",
"targets": [
{
- "expr": "topk($topk,rate(ceph_pool_rd_bytes[1m]) + on(pool_id) group_left(instance,name) ceph_pool_metadata)",
- "format": "time_series",
- "intervalFactor": 1,
- "legendFormat": "{{name}} - read",
- "refId": "A",
- "textEditor": true
+ "expr": "sum(ceph_pool_stored)",
+ "instant": true,
+ "interval": "",
+ "legendFormat": "",
+ "refId": "A"
+ }
+ ],
+ "thresholds": "",
+ "timeFrom": null,
+ "timeShift": null,
+ "title": "Logical Stored ",
+ "type": "singlestat",
+ "valueFontSize": "80%",
+ "valueMaps": [
+ {
+ "op": "=",
+ "text": "N/A",
+ "value": "null"
+ }
+ ],
+ "valueName": "current"
+ },
+ {
+ "cacheTimeout": null,
+ "colorBackground": false,
+ "colorValue": false,
+ "colors": [
+ "#299c46",
+ "rgba(237, 129, 40, 0.89)",
+ "#d44a3a"
+ ],
+ "datasource": "$datasource",
+ "decimals": 1,
+ "description": "A compression saving is determined as the data eligible to be compressed minus the capacity used to store the data after compression",
+ "format": "bytes",
+ "gauge": {
+ "maxValue": 100,
+ "minValue": 0,
+ "show": false,
+ "thresholdLabels": false,
+ "thresholdMarkers": true
+ },
+ "gridPos": {
+ "h": 3,
+ "w": 3,
+ "x": 15,
+ "y": 0
+ },
+ "id": 9,
+ "interval": null,
+ "links": [],
+ "mappingType": 1,
+ "mappingTypes": [
+ {
+ "name": "value to text",
+ "value": 1
},
{
- "expr": "topk($topk,rate(ceph_pool_wr_bytes[1m]) + on(pool_id) group_left(instance,name) ceph_pool_metadata)",
- "format": "time_series",
- "intervalFactor": 1,
- "legendFormat": "{{name}} - write",
- "refId": "B"
+ "name": "range to text",
+ "value": 2
}
],
- "thresholds": [],
+ "maxDataPoints": 100,
+ "nullPointMode": "connected",
+ "nullText": null,
+ "postfix": "",
+ "postfixFontSize": "50%",
+ "prefix": "",
+ "prefixFontSize": "50%",
+ "rangeMaps": [
+ {
+ "from": "null",
+ "text": "N/A",
+ "to": "null"
+ }
+ ],
+ "sparkline": {
+ "fillColor": "rgba(31, 118, 189, 0.18)",
+ "full": false,
+ "lineColor": "rgb(31, 120, 193)",
+ "show": false,
+ "ymax": null,
+ "ymin": null
+ },
+ "tableColumn": "",
+ "targets": [
+ {
+ "expr": "sum(ceph_pool_compress_under_bytes - ceph_pool_compress_bytes_used)",
+ "interval": "",
+ "legendFormat": "",
+ "refId": "A"
+ }
+ ],
+ "thresholds": "",
"timeFrom": null,
"timeShift": null,
- "title": "Top $topk Client Throughput by Pool",
- "tooltip": {
- "shared": true,
- "sort": 2,
- "value_type": "individual"
+ "title": "Compression Savings",
+ "type": "singlestat",
+ "valueFontSize": "80%",
+ "valueMaps": [
+ {
+ "op": "=",
+ "text": "N/A",
+ "value": "null"
+ }
+ ],
+ "valueName": "current"
+ },
+ {
+ "cacheTimeout": null,
+ "colorBackground": false,
+ "colorValue": false,
+ "colors": [
+ "#299c46",
+ "rgba(237, 129, 40, 0.89)",
+ "#d44a3a"
+ ],
+ "datasource": "$datasource",
+ "description": "Indicates how suitable the data is within the pools that are/have been enabled for compression - averaged across all pools holding compressed data\n",
+ "format": "percent",
+ "gauge": {
+ "maxValue": 100,
+ "minValue": 0,
+ "show": false,
+ "thresholdLabels": false,
+ "thresholdMarkers": true
},
- "type": "graph",
- "xaxis": {
- "buckets": null,
- "mode": "time",
- "name": null,
- "show": true,
- "values": []
+ "gridPos": {
+ "h": 3,
+ "w": 3,
+ "x": 18,
+ "y": 0
},
- "yaxes": [
+ "id": 17,
+ "interval": null,
+ "links": [],
+ "mappingType": 1,
+ "mappingTypes": [
{
- "format": "Bps",
- "label": "Read (-) / Writes (+)",
- "logBase": 1,
- "max": null,
- "min": null,
- "show": true
+ "name": "value to text",
+ "value": 1
},
{
- "format": "short",
- "label": null,
- "logBase": 1,
- "max": null,
- "min": null,
- "show": false
+ "name": "range to text",
+ "value": 2
}
],
- "yaxis": {
- "align": false,
- "alignLevel": null
- }
+ "maxDataPoints": 100,
+ "nullPointMode": "connected",
+ "nullText": null,
+ "postfix": "",
+ "postfixFontSize": "50%",
+ "prefix": "",
+ "prefixFontSize": "50%",
+ "rangeMaps": [
+ {
+ "from": "null",
+ "text": "N/A",
+ "to": "null"
+ }
+ ],
+ "sparkline": {
+ "fillColor": "rgba(31, 118, 189, 0.18)",
+ "full": false,
+ "lineColor": "rgb(31, 120, 193)",
+ "show": false,
+ "ymax": null,
+ "ymin": null
+ },
+ "tableColumn": "",
+ "targets": [
+ {
+ "expr": "(sum(ceph_pool_compress_under_bytes > 0) / sum(ceph_pool_stored_raw and ceph_pool_compress_under_bytes > 0)) * 100",
+ "format": "table",
+ "hide": false,
+ "interval": "",
+ "legendFormat": "",
+ "refId": "A"
+ }
+ ],
+ "thresholds": "",
+ "timeFrom": null,
+ "timeShift": null,
+ "title": "Compression Eligibility",
+ "type": "singlestat",
+ "valueFontSize": "80%",
+ "valueMaps": [
+ {
+ "op": "=",
+ "text": "N/A",
+ "value": "null"
+ }
+ ],
+ "valueName": "current"
},
{
- "columns": [
+ "cacheTimeout": null,
+ "colorBackground": false,
+ "colorValue": false,
+ "colors": [
+ "#299c46",
+ "rgba(237, 129, 40, 0.89)",
+ "#d44a3a"
+ ],
+ "datasource": "$datasource",
+ "description": "This factor describes the average ratio of data eligible to be compressed divided by the data actually stored. It does not account for data written that was ineligible for compression (too small, or compression yield too low)",
+ "format": "none",
+ "gauge": {
+ "maxValue": 100,
+ "minValue": 0,
+ "show": false,
+ "thresholdLabels": false,
+ "thresholdMarkers": true
+ },
+ "gridPos": {
+ "h": 3,
+ "w": 3,
+ "x": 21,
+ "y": 0
+ },
+ "id": 15,
+ "interval": null,
+ "links": [],
+ "mappingType": 1,
+ "mappingTypes": [
+ {
+ "name": "value to text",
+ "value": 1
+ },
+ {
+ "name": "range to text",
+ "value": 2
+ }
+ ],
+ "maxDataPoints": 100,
+ "nullPointMode": "connected",
+ "nullText": null,
+ "postfix": "",
+ "postfixFontSize": "80%",
+ "prefix": "",
+ "prefixFontSize": "50%",
+ "rangeMaps": [
+ {
+ "from": "null",
+ "text": "N/A",
+ "to": "null"
+ }
+ ],
+ "sparkline": {
+ "fillColor": "rgba(31, 118, 189, 0.18)",
+ "full": false,
+ "lineColor": "rgb(31, 120, 193)",
+ "show": false,
+ "ymax": null,
+ "ymin": null
+ },
+ "tableColumn": "",
+ "targets": [
+ {
+ "expr": "sum(ceph_pool_compress_under_bytes > 0) / sum(ceph_pool_compress_bytes_used > 0)",
+ "interval": "",
+ "legendFormat": "",
+ "refId": "A"
+ }
+ ],
+ "thresholds": "",
+ "timeFrom": null,
+ "timeShift": null,
+ "title": "Compression Factor",
+ "type": "singlestat",
+ "valueFontSize": "80%",
+ "valueMaps": [
{
- "text": "Current",
- "value": "current"
+ "op": "=",
+ "text": "N/A",
+ "value": "null"
}
],
+ "valueName": "current"
+ },
+ {
+ "columns": [],
"datasource": "$datasource",
"fontSize": "100%",
"gridPos": {
- "h": 7,
- "w": 8,
+ "h": 6,
+ "w": 24,
"x": 0,
- "y": 9
+ "y": 3
},
- "id": 3,
+ "id": 5,
"links": [],
- "minSpan": 12,
+ "maxPerRow": 3,
"pageSize": null,
"scroll": true,
"showHeader": true,
},
"styles": [
{
- "alias": "",
+ "alias": "",
+ "align": "auto",
+ "colorMode": null,
+ "colors": [
+ "rgba(245, 54, 54, 0.9)",
+ "rgba(237, 129, 40, 0.89)",
+ "rgba(50, 172, 45, 0.97)"
+ ],
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
+ "decimals": 2,
+ "pattern": "Time",
+ "thresholds": [],
+ "type": "hidden",
+ "unit": "short"
+ },
+ {
+ "alias": "",
+ "align": "auto",
+ "colorMode": null,
+ "colors": [
+ "rgba(245, 54, 54, 0.9)",
+ "rgba(237, 129, 40, 0.89)",
+ "rgba(50, 172, 45, 0.97)"
+ ],
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
+ "decimals": 2,
+ "pattern": "instance",
+ "thresholds": [],
+ "type": "hidden",
+ "unit": "short"
+ },
+ {
+ "alias": "",
+ "align": "auto",
+ "colorMode": null,
+ "colors": [
+ "rgba(245, 54, 54, 0.9)",
+ "rgba(237, 129, 40, 0.89)",
+ "rgba(50, 172, 45, 0.97)"
+ ],
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
+ "decimals": 2,
+ "pattern": "job",
+ "thresholds": [],
+ "type": "hidden",
+ "unit": "short"
+ },
+ {
+ "alias": "Pool Name",
+ "align": "auto",
+ "colorMode": null,
+ "colors": [
+ "rgba(245, 54, 54, 0.9)",
+ "rgba(237, 129, 40, 0.89)",
+ "rgba(50, 172, 45, 0.97)"
+ ],
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
+ "decimals": 2,
+ "pattern": "name",
+ "thresholds": [],
+ "type": "string",
+ "unit": "short"
+ },
+ {
+ "alias": "Pool ID",
+ "align": "auto",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
- "decimals": 2,
- "pattern": "Time",
+ "decimals": 0,
+ "pattern": "pool_id",
"thresholds": [],
"type": "hidden",
- "unit": "short"
+ "unit": "none"
},
{
- "alias": "",
+ "alias": "Compression Factor",
+ "align": "auto",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
- "decimals": 2,
- "pattern": "id",
+ "decimals": 1,
+ "mappingType": 1,
+ "pattern": "Value #A",
"thresholds": [],
- "type": "hidden",
- "unit": "short"
+ "type": "number",
+ "unit": "none"
},
{
- "alias": "",
+ "alias": "% Used",
+ "align": "auto",
+ "colorMode": "value",
+ "colors": [
+ "rgb(0, 0, 0)",
+ "rgba(237, 129, 40, 0.89)",
+ "rgba(245, 54, 54, 0.9)"
+ ],
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
+ "decimals": 2,
+ "mappingType": 1,
+ "pattern": "Value #D",
+ "thresholds": [
+ "70",
+ "85"
+ ],
+ "type": "number",
+ "unit": "percentunit"
+ },
+ {
+ "alias": "Usable Free",
+ "align": "auto",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
- "pattern": "instance",
+ "mappingType": 1,
+ "pattern": "Value #B",
"thresholds": [],
- "type": "hidden",
- "unit": "short"
+ "type": "number",
+ "unit": "bytes"
},
{
- "alias": "",
+ "alias": "Compression Eligibility",
+ "align": "auto",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
- "decimals": 2,
- "pattern": "job",
+ "decimals": 0,
+ "mappingType": 1,
+ "pattern": "Value #C",
"thresholds": [],
- "type": "hidden",
- "unit": "short"
+ "type": "number",
+ "unit": "percent"
},
{
- "alias": "Pool Name",
+ "alias": "Compression Savings",
+ "align": "auto",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
- "decimals": 2,
- "pattern": "name",
+ "decimals": 1,
+ "mappingType": 1,
+ "pattern": "Value #E",
"thresholds": [],
"type": "number",
- "unit": "short"
+ "unit": "bytes"
},
{
- "alias": "Pool ID",
- "colorMode": null,
+ "alias": "Growth (5d)",
+ "align": "auto",
+ "colorMode": "value",
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(237, 129, 40, 0.89)",
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
- "pattern": "pool_id",
- "thresholds": [],
+ "mappingType": 1,
+ "pattern": "Value #F",
+ "thresholds": [
+ "0",
+ "0"
+ ],
"type": "number",
- "unit": "short"
+ "unit": "bytes"
},
{
- "alias": "IOPS (R+W)",
+ "alias": "IOPS",
+ "align": "auto",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 0,
- "pattern": "Value",
+ "mappingType": 1,
+ "pattern": "Value #G",
"thresholds": [],
"type": "number",
"unit": "none"
- }
- ],
- "targets": [
- {
- "expr": "topk($topk,((irate(ceph_pool_rd[1m]) + irate(ceph_pool_wr[1m])) + on(pool_id) group_left(instance,name) ceph_pool_metadata))",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "refId": "A",
- "textEditor": true
- }
- ],
- "title": "Top $topk Pools by Client IOPS",
- "transform": "table",
- "type": "table"
- },
- {
- "columns": [
- {
- "text": "Current",
- "value": "current"
- }
- ],
- "datasource": "$datasource",
- "fontSize": "100%",
- "gridPos": {
- "h": 7,
- "w": 8,
- "x": 8,
- "y": 9
- },
- "id": 4,
- "links": [],
- "minSpan": 12,
- "pageSize": null,
- "scroll": true,
- "showHeader": true,
- "sort": {
- "col": 5,
- "desc": true
- },
- "styles": [
+ },
{
- "alias": "Time",
+ "alias": "Bandwidth",
+ "align": "auto",
+ "colorMode": null,
+ "colors": [
+ "rgba(245, 54, 54, 0.9)",
+ "rgba(237, 129, 40, 0.89)",
+ "rgba(50, 172, 45, 0.97)"
+ ],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
- "pattern": "Time",
- "type": "hidden"
+ "decimals": 0,
+ "mappingType": 1,
+ "pattern": "Value #H",
+ "thresholds": [],
+ "type": "number",
+ "unit": "Bps"
},
{
"alias": "",
+ "align": "auto",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
- "pattern": "id",
+ "mappingType": 1,
+ "pattern": "__name__",
"thresholds": [],
"type": "hidden",
"unit": "short"
},
{
"alias": "",
+ "align": "auto",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
- "pattern": "instance",
+ "mappingType": 1,
+ "pattern": "type",
"thresholds": [],
"type": "hidden",
"unit": "short"
},
{
"alias": "",
+ "align": "auto",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
- "pattern": "job",
+ "mappingType": 1,
+ "pattern": "compression_mode",
"thresholds": [],
"type": "hidden",
"unit": "short"
},
{
- "alias": "Pool Name",
+ "alias": "Type",
+ "align": "auto",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
- "pattern": "name",
+ "mappingType": 1,
+ "pattern": "description",
"thresholds": [],
- "type": "number",
+ "type": "string",
"unit": "short"
},
{
- "alias": "Pool ID",
+ "alias": "Stored",
+ "align": "auto",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
"rgba(50, 172, 45, 0.97)"
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
- "decimals": 2,
- "pattern": "pool_id",
+ "decimals": 1,
+ "mappingType": 1,
+ "pattern": "Value #J",
"thresholds": [],
"type": "number",
+ "unit": "bytes"
+ },
+ {
+ "alias": "",
+ "align": "auto",
+ "colorMode": null,
+ "colors": [
+ "rgba(245, 54, 54, 0.9)",
+ "rgba(237, 129, 40, 0.89)",
+ "rgba(50, 172, 45, 0.97)"
+ ],
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
+ "decimals": 2,
+ "mappingType": 1,
+ "pattern": "Value #I",
+ "thresholds": [],
+ "type": "hidden",
"unit": "short"
},
{
- "alias": "Throughput",
+ "alias": "Compression",
+ "align": "auto",
"colorMode": null,
"colors": [
"rgba(245, 54, 54, 0.9)",
],
"dateFormat": "YYYY-MM-DD HH:mm:ss",
"decimals": 2,
- "pattern": "Value",
+ "mappingType": 1,
+ "pattern": "Value #K",
"thresholds": [],
- "type": "number",
- "unit": "decbytes"
+ "type": "string",
+ "unit": "short",
+ "valueMaps": [
+ {
+ "text": "ON",
+ "value": "1"
+ }
+ ]
+ }
+ ],
+ "targets": [
+ {
+ "expr": "(ceph_pool_percent_used * on(pool_id) group_left(name) ceph_pool_metadata)",
+ "format": "table",
+ "hide": false,
+ "instant": true,
+ "interval": "",
+ "intervalFactor": 1,
+ "legendFormat": "",
+ "refId": "D"
+ },
+ {
+ "expr": "ceph_pool_stored * on(pool_id) group_left ceph_pool_metadata",
+ "format": "table",
+ "instant": true,
+ "interval": "",
+ "legendFormat": "",
+ "refId": "J"
+ },
+ {
+ "expr": "ceph_pool_max_avail * on(pool_id) group_left(name) ceph_pool_metadata",
+ "format": "table",
+ "instant": true,
+ "interval": "",
+ "legendFormat": "",
+ "refId": "B"
+ },
+ {
+ "expr": "delta(ceph_pool_stored[5d])",
+ "format": "table",
+ "instant": true,
+ "interval": "",
+ "legendFormat": "",
+ "refId": "F"
+ },
+ {
+ "expr": "ceph_pool_metadata",
+ "format": "table",
+ "instant": true,
+ "interval": "",
+ "legendFormat": "",
+ "refId": "I"
+ },
+ {
+ "expr": "ceph_pool_metadata{compression_mode!=\"none\"}",
+ "format": "table",
+ "instant": true,
+ "interval": "",
+ "legendFormat": "",
+ "refId": "K"
+ },
+ {
+ "expr": "(ceph_pool_compress_under_bytes / ceph_pool_compress_bytes_used > 0) and on(pool_id) (((ceph_pool_compress_under_bytes > 0) / ceph_pool_stored_raw) * 100 > 0.5)",
+ "format": "table",
+ "hide": false,
+ "instant": true,
+ "interval": "",
+ "intervalFactor": 1,
+ "legendFormat": "",
+ "refId": "A"
+ },
+ {
+ "expr": "((ceph_pool_compress_under_bytes > 0) / ceph_pool_stored_raw) * 100",
+ "format": "table",
+ "instant": true,
+ "interval": "",
+ "legendFormat": "",
+ "refId": "C"
+ },
+ {
+ "expr": "(ceph_pool_compress_under_bytes - ceph_pool_compress_bytes_used > 0)",
+ "format": "table",
+ "instant": true,
+ "interval": "",
+ "legendFormat": "",
+ "refId": "E"
+ },
+ {
+ "expr": "rate(ceph_pool_rd[30s]) + rate(ceph_pool_wr[30s])",
+ "format": "table",
+ "instant": true,
+ "interval": "",
+ "legendFormat": "",
+ "refId": "G"
+ },
+ {
+ "expr": "rate(ceph_pool_rd_bytes[30s]) + rate(ceph_pool_wr_bytes[30s])",
+ "format": "table",
+ "instant": true,
+ "interval": "",
+ "legendFormat": "",
+ "refId": "H"
+ },
+ {
+ "expr": "",
+ "interval": "",
+ "legendFormat": "",
+ "refId": "L"
}
],
+ "title": "Pool Overview",
+ "transform": "table",
+ "type": "table"
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "$datasource",
+ "description": "This chart shows the sum of read and write IOPS from all clients by pool",
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 9
+ },
+ "hiddenSeries": false,
+ "id": 1,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "links": [],
+ "maxPerRow": 2,
+ "nullPointMode": "null as zero",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 5,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
"targets": [
{
- "expr": "topk($topk,(irate(ceph_pool_rd_bytes[1m]) + irate(ceph_pool_wr_bytes[1m])) + on(pool_id) group_left(instance,name) ceph_pool_metadata) ",
- "format": "table",
- "instant": true,
- "intervalFactor": 2,
- "refId": "A",
- "textEditor": true
+ "expr": "topk($topk,round((rate(ceph_pool_rd[30s]) + rate(ceph_pool_wr[30s])),1) * on(pool_id) group_left(instance,name) ceph_pool_metadata) ",
+ "format": "time_series",
+ "hide": false,
+ "interval": "",
+ "intervalFactor": 1,
+ "legendFormat": "{{name}} ",
+ "refId": "F"
+ },
+ {
+ "expr": "topk($topk,rate(ceph_pool_wr[30s]) + on(pool_id) group_left(instance,name) ceph_pool_metadata) ",
+ "format": "time_series",
+ "hide": true,
+ "interval": "",
+ "intervalFactor": 1,
+ "legendFormat": "{{name}} - write",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Top $topk Client IOPS by Pool",
+ "tooltip": {
+ "shared": true,
+ "sort": 2,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
+ {
+ "decimals": 0,
+ "format": "short",
+ "label": "IOPS",
+ "logBase": 1,
+ "max": null,
+ "min": "0",
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": false
}
],
- "title": "Top $topk Pools by Throughput",
- "transform": "table",
- "type": "table"
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
},
{
- "columns": [],
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
"datasource": "$datasource",
- "fontSize": "100%",
+ "description": "The chart shows the sum of read and write bytes from all clients, by pool",
+ "fill": 1,
+ "fillGradient": 0,
"gridPos": {
- "h": 7,
- "w": 8,
- "x": 16,
+ "h": 8,
+ "w": 12,
+ "x": 12,
"y": 9
},
- "id": 5,
+ "hiddenSeries": false,
+ "id": 2,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 2,
"links": [],
- "minSpan": 8,
- "pageSize": null,
- "scroll": true,
- "showHeader": true,
- "sort": {
- "col": 5,
- "desc": true
+ "maxPerRow": 2,
+ "nullPointMode": "null as zero",
+ "options": {
+ "dataLinks": []
},
- "styles": [
- {
- "alias": "",
- "colorMode": null,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "decimals": 2,
- "pattern": "Time",
- "thresholds": [],
- "type": "hidden",
- "unit": "short"
- },
+ "percentage": false,
+ "pointradius": 5,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": false,
+ "steppedLine": false,
+ "targets": [
{
- "alias": "",
- "colorMode": null,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "decimals": 2,
- "pattern": "instance",
- "thresholds": [],
- "type": "hidden",
- "unit": "short"
- },
+ "expr": "topk($topk,(rate(ceph_pool_rd_bytes[30s]) + rate(ceph_pool_wr_bytes[30s])) * on(pool_id) group_left(instance,name) ceph_pool_metadata)",
+ "format": "time_series",
+ "interval": "",
+ "intervalFactor": 1,
+ "legendFormat": "{{name}}",
+ "refId": "A",
+ "textEditor": true
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": null,
+ "timeRegions": [],
+ "timeShift": null,
+ "title": "Top $topk Client Bandwidth by Pool",
+ "tooltip": {
+ "shared": true,
+ "sort": 2,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
{
- "alias": "",
- "colorMode": null,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "decimals": 2,
- "pattern": "job",
- "thresholds": [],
- "type": "hidden",
- "unit": "short"
+ "format": "Bps",
+ "label": "Throughput",
+ "logBase": 1,
+ "max": null,
+ "min": "0",
+ "show": true
},
{
- "alias": "Pool Name",
- "colorMode": null,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "decimals": 2,
- "pattern": "name",
- "thresholds": [],
- "type": "string",
- "unit": "short"
- },
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": false
+ }
+ ],
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
+ },
+ {
+ "aliasColors": {},
+ "bars": false,
+ "dashLength": 10,
+ "dashes": false,
+ "datasource": "$datasource",
+ "description": "Historical view of capacity usage, to help identify growth and trends in pool consumption",
+ "fill": 1,
+ "fillGradient": 0,
+ "gridPos": {
+ "h": 7,
+ "w": 24,
+ "x": 0,
+ "y": 17
+ },
+ "hiddenSeries": false,
+ "id": 19,
+ "legend": {
+ "avg": false,
+ "current": false,
+ "max": false,
+ "min": false,
+ "show": true,
+ "total": false,
+ "values": false
+ },
+ "lines": true,
+ "linewidth": 1,
+ "nullPointMode": "null",
+ "options": {
+ "dataLinks": []
+ },
+ "percentage": false,
+ "pointradius": 2,
+ "points": false,
+ "renderer": "flot",
+ "seriesOverrides": [],
+ "spaceLength": 10,
+ "stack": true,
+ "steppedLine": false,
+ "targets": [
{
- "alias": "Pool ID",
- "colorMode": null,
- "colors": [
- "rgba(245, 54, 54, 0.9)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(50, 172, 45, 0.97)"
- ],
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "decimals": 2,
- "pattern": "pool_id",
- "thresholds": [],
- "type": "number",
- "unit": "short"
- },
+ "expr": "ceph_pool_bytes_used * on(pool_id) group_right ceph_pool_metadata",
+ "interval": "",
+ "legendFormat": "{{name}}",
+ "refId": "A"
+ }
+ ],
+ "thresholds": [],
+ "timeFrom": "14d",
+ "timeRegions": [
{
- "alias": "Capacity Used",
- "colorMode": "value",
- "colors": [
- "rgba(50, 172, 45, 0.97)",
- "rgba(237, 129, 40, 0.89)",
- "rgba(245, 54, 54, 0.9)"
- ],
- "dateFormat": "YYYY-MM-DD HH:mm:ss",
- "decimals": 2,
- "pattern": "Value",
- "thresholds": [
- "70",
- "85"
- ],
- "type": "number",
- "unit": "percentunit"
+ "colorMode": "background6",
+ "fill": true,
+ "fillColor": "rgba(234, 112, 112, 0.12)",
+ "line": false,
+ "lineColor": "rgba(237, 46, 24, 0.60)",
+ "op": "time"
}
],
- "targets": [
+ "timeShift": null,
+ "title": "Pool Capacity Usage (RAW)",
+ "tooltip": {
+ "shared": true,
+ "sort": 0,
+ "value_type": "individual"
+ },
+ "type": "graph",
+ "xaxis": {
+ "buckets": null,
+ "mode": "time",
+ "name": null,
+ "show": true,
+ "values": []
+ },
+ "yaxes": [
{
- "expr": "topk($topk,((ceph_pool_stored / (ceph_pool_stored + ceph_pool_max_avail)) * on(pool_id) group_left(name) ceph_pool_metadata))",
- "format": "table",
- "hide": false,
- "instant": true,
- "intervalFactor": 1,
- "legendFormat": "",
- "refId": "D"
+ "decimals": 1,
+ "format": "bytes",
+ "label": "Capacity Used",
+ "logBase": 1,
+ "max": null,
+ "min": "0",
+ "show": true
+ },
+ {
+ "format": "short",
+ "label": null,
+ "logBase": 1,
+ "max": null,
+ "min": null,
+ "show": true
}
],
- "title": "Top $topk Pools By Capacity Used",
- "transform": "table",
- "type": "table"
+ "yaxis": {
+ "align": false,
+ "alignLevel": null
+ }
}
],
"refresh": "15s",
- "schemaVersion": 16,
+ "schemaVersion": 22,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
"current": {
- "text": "Prometheus admin.virt1.home.fajerski.name:9090",
- "value": "Prometheus admin.virt1.home.fajerski.name:9090"
+ "selected": false,
+ "text": "Dashboard1",
+ "value": "Dashboard1"
},
"hide": 0,
+ "includeAll": false,
"label": "Data Source",
+ "multi": false,
"name": "datasource",
"options": [],
"query": "prometheus",
"timezone": "browser",
"title": "Ceph Pools Overview",
"uid": "z99hzWtmk",
- "version": 1
+ "variables": {
+ "list": []
+ },
+ "version": 10
}
--- /dev/null
+roles:
+- [mon.a, mgr.x, mds.a, osd.0, client.0]
+openstack:
+- volumes: # attached to each instance
+ count: 1
+ size: 5 # GB
+- machine:
+ disk: 10 # GB
--- /dev/null
+os_type: rhel
+os_version: "8.4"
+overrides:
+ selinux:
+ whitelist:
+ - scontext=system_u:system_r:logrotate_t:s0
-rhel_8.3.yaml
\ No newline at end of file
+rhel_8.4.yaml
\ No newline at end of file
tasks:
- pexec:
all:
+ - sudo cp /etc/containers/registries.conf /etc/containers/registries.conf.backup
- sudo dnf -y module disable container-tools
- sudo dnf -y install 'dnf-command(copr)'
- sudo dnf -y copr enable rhcontainerbot/container-selinux
- sudo curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/CentOS_8/devel:kubic:libcontainers:stable.repo
- sudo dnf remove -y podman
- sudo dnf -y install podman
+ - sudo cp /etc/containers/registries.conf.backup /etc/containers/registries.conf
tasks:
- pexec:
all:
+ - sudo cp /etc/containers/registries.conf /etc/containers/registries.conf.backup
- sudo dnf -y module disable container-tools
- sudo dnf -y install 'dnf-command(copr)'
- sudo dnf -y copr enable rhcontainerbot/container-selinux
- sudo curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/CentOS_8/devel:kubic:libcontainers:stable.repo
- sudo dnf remove -y podman
- sudo dnf -y install podman
+ - sudo cp /etc/containers/registries.conf.backup /etc/containers/registries.conf
tasks:
- pexec:
all:
+ - sudo cp /etc/containers/registries.conf /etc/containers/registries.conf.backup
- curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_18.04/Release.key | sudo apt-key add -
- echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_18.04/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
- sudo apt update
- sudo apt -y install podman
- - echo -e "[[registry]]\nlocation = 'docker.io'\n\n[[registry.mirror]]\nlocation='docker-mirror.front.sepia.ceph.com:5000'\n" | sudo tee /etc/containers/registries.conf
+ - sudo cp /etc/containers/registries.conf.backup /etc/containers/registries.conf
tasks:
- pexec:
all:
+ - sudo cp /etc/containers/registries.conf /etc/containers/registries.conf.backup
- curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/Release.key | sudo apt-key add -
- echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
- sudo apt update
- sudo apt -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install podman containernetworking-plugins
- - echo -e "[[registry]]\nlocation = 'docker.io'\n\n[[registry.mirror]]\nlocation='docker-mirror.front.sepia.ceph.com:5000'\n" | sudo tee /etc/containers/registries.conf
+ - sudo cp /etc/containers/registries.conf.backup /etc/containers/registries.conf
tasks:
- pexec:
all:
+ - sudo cp /etc/containers/registries.conf /etc/containers/registries.conf.backup
- curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/testing/xUbuntu_20.04/Release.key | sudo apt-key add -
- echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/testing/xUbuntu_20.04/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:testing.list
- sudo apt update
- sudo apt -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install podman containernetworking-plugins
- - echo -e "[[registry]]\nlocation = 'docker.io'\n\n[[registry.mirror]]\nlocation='docker-mirror.front.sepia.ceph.com:5000'\n" | sudo tee /etc/containers/registries.conf
+ - sudo cp /etc/containers/registries.conf.backup /etc/containers/registries.conf
-../all/ubuntu_18.04.yaml
\ No newline at end of file
+../all/ubuntu_20.04.yaml
\ No newline at end of file
-../all/ubuntu_18.04.yaml
\ No newline at end of file
+../all/ubuntu_20.04.yaml
\ No newline at end of file
--- /dev/null
+.qa/distros/supported/centos_latest.yaml
\ No newline at end of file
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+.qa/cephfs/begin.yaml
\ No newline at end of file
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+.qa/cephfs/clusters/1-node-1-mds-1-osd.yaml
\ No newline at end of file
--- /dev/null
+.qa/cephfs/conf
\ No newline at end of file
--- /dev/null
+.qa/distros/supported-random-distro$
\ No newline at end of file
--- /dev/null
+tasks:
+ - ceph-fuse:
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+.qa/objectstore/bluestore-bitmap.yaml
\ No newline at end of file
--- /dev/null
+overrides:
+ ceph:
+ conf:
+ mgr:
+ debug client: 20
+ log-ignorelist:
+ - OSD full dropping all updates
+ - OSD near full
+ - pausewr flag
+ - failsafe engaged, dropping updates
+ - failsafe disengaged, no longer dropping
+ - is full \(reached quota
+ - POOL_FULL
+ - POOL_NEARFULL
+ - POOL_BACKFILLFULL
+ - PG_DEGRADED
+ - OSD_OUT_OF_ORDER_FULL
+ - OSD_NEARFULL
+ - OSD_FULL
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+.qa/cephfs/overrides/frag_enable.yaml
\ No newline at end of file
--- /dev/null
+.qa/overrides/no_client_pidfile.yaml
\ No newline at end of file
--- /dev/null
+.qa/cephfs/overrides/whitelist_health.yaml
\ No newline at end of file
--- /dev/null
+.qa/cephfs/overrides/whitelist_wrongly_marked_down.yaml
\ No newline at end of file
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+overrides:
+ ceph:
+ conf:
+ global:
+ osd_pool_default_size: 1
+ osd_pool_default_min_size: 1
+ client:
+ debug ms: 1
+ debug client: 20
+ mds:
+ debug ms: 1
+ debug mds: 20
+ osd: # force bluestore since it's required for ec overwrites
+ osd objectstore: bluestore
+ bluestore block size: 1073741824
+tasks:
+- workunit:
+ cleanup: false
+ clients:
+ client.0:
+ - fs/full/subvolume_rm.sh
+++ /dev/null
-./.qa/cephfs/overrides/whitelist_health.yaml
\ No newline at end of file
--- /dev/null
+overrides:
+ ceph:
+ log-ignorelist:
+ - overall HEALTH_
+ - \(FS_DEGRADED\)
+ - \(MDS_FAILED\)
+ - \(MDS_DEGRADED\)
+ - \(FS_WITH_FAILED_MDS\)
+ - \(MDS_DAMAGE\)
+ - \(MDS_ALL_DOWN\)
+ - \(MDS_UP_LESS_THAN_MAX\)
+ - \(FS_INLINE_DATA_DEPRECATED\)
+ - Reduced data availability
+ - Degraded data redundancy
# Right now, cephfs-shell is only available as a package on Ubuntu
# This overrides the random distribution that's chosen in the other yaml fragments.
os_type: ubuntu
-os_version: "18.04"
+os_version: "20.04"
tasks:
- cephfs_test_runner:
modules:
--- /dev/null
+.qa/distros/supported/centos_latest.yaml
\ No newline at end of file
- ceph-mgr-rook
- ceph-mgr-cephadm
- cephadm
+ - ceph-immutable-object-cache
+ - python3-rados
+ - python3-rgw
+ - python3-rbd
+ - python3-cephfs
extra_packages: ['librados2']
- print: "**** done installing nautilus"
- ceph:
--- /dev/null
+.qa/distros/supported/centos_latest.yaml
\ No newline at end of file
- ceph-mgr-rook
- ceph-mgr-cephadm
- cephadm
+ - ceph-immutable-object-cache
+ - python3-rados
+ - python3-rgw
+ - python3-rbd
+ - python3-cephfs
extra_packages: ['librados2']
- print: "**** done installing nautilus"
- ceph:
- ceph-mgr-rook
- ceph-mgr-cephadm
- cephadm
+ - ceph-immutable-object-cache
+ - python3-rados
+ - python3-rgw
+ - python3-rbd
+ - python3-cephfs
extra_packages: ['librados2']
- print: "**** done installing nautilus"
- ceph:
+++ /dev/null
-.qa/cephfs/overrides/whitelist_health.yaml
\ No newline at end of file
--- /dev/null
+overrides:
+ ceph:
+ log-ignorelist:
+ - overall HEALTH_
+ - \(FS_DEGRADED\)
+ - \(MDS_FAILED\)
+ - \(MDS_DEGRADED\)
+ - \(FS_WITH_FAILED_MDS\)
+ - \(MDS_DAMAGE\)
+ - \(MDS_ALL_DOWN\)
+ - \(MDS_UP_LESS_THAN_MAX\)
+ - \(FS_INLINE_DATA_DEPRECATED\)
+ - Reduced data availability
+ - Degraded data redundancy
+++ /dev/null
-.qa/distros/supported-random-distro$/
\ No newline at end of file
--- /dev/null
+overrides:
+ kclient:
+ mntopts: ["nowsync"]
--- /dev/null
+overrides:
+ kclient:
+ mntopts: ["wsync"]
--- /dev/null
+../.qa
\ No newline at end of file
--- /dev/null
+../.qa
\ No newline at end of file
--- /dev/null
+../.qa
\ No newline at end of file
--- /dev/null
+../.qa
\ No newline at end of file
--- /dev/null
+.qa/distros/podman/centos_8.2_kubic_stable.yaml
\ No newline at end of file
--- /dev/null
+roles:
+# 3 osd roles on host.a is required for cephadm task. It checks if the cluster is healthy.
+# More daemons will be deployed on both hosts in e2e tests.
+- - host.a
+ - osd.0
+ - osd.1
+ - osd.2
+ - mon.a
+ - mgr.a
+ - client.0
+- - host.b
+ - client.1
+tasks:
+- install:
+- cephadm:
+- workunit:
+ clients:
+ client.1:
+ - cephadm/create_iscsi_disks.sh
+- workunit:
+ clients:
+ client.0:
+ - cephadm/test_dashboard_e2e.sh
--- /dev/null
+../.qa
\ No newline at end of file
--- /dev/null
+../smoke/distro
\ No newline at end of file
--- /dev/null
+.qa/clusters/2-node-mgr.yaml
\ No newline at end of file
--- /dev/null
+
+tasks:
+ - install:
+ - ceph:
+ # tests may leave mgrs broken, so don't try and call into them
+ # to invoke e.g. pg dump during teardown.
+ wait-for-scrub: false
+ log-ignorelist:
+ - overall HEALTH_
+ - \(MGR_DOWN\)
+ - \(DEVICE_IDENT_ON\)
+ - \(DEVICE_FAULT_ON\)
+ - \(PG_
+ - replacing it with standby
+ - No standby daemons available
+ - cephfs_test_runner:
+ modules:
+ - tasks.mgr.test_orchestrator_cli
\ No newline at end of file
--- /dev/null
+../.qa
\ No newline at end of file
--- /dev/null
+../smoke/distro
\ No newline at end of file
--- /dev/null
+tasks:
+- cephadm:
+ roleless: true
+- cephadm.shell:
+ host.a:
+ - ceph orch status
+ - ceph orch ps
+ - ceph orch ls
+ - ceph orch host ls
+ - ceph orch device ls
+roles:
+- - host.a
+ - osd.0
+ - osd.1
+ - osd.2
+ - osd.3
+ - client.0
+- - host.b
+ - osd.4
+ - osd.5
+ - osd.6
+ - osd.7
+ - client.1
+openstack:
+- volumes: # attached to each instance
+ count: 4
+ size: 10 # GB
+overrides:
+ ceph:
+ conf:
+ osd:
+ osd shutdown pgref assert: true
--- /dev/null
+tasks:
+- cephadm.shell:
+ host.a:
+ - ceph orch host label add `hostname` foo
+ - ceph auth get-or-create client.foo mon 'allow r'
+ - ceph orch client-keyring set client.foo label:foo --mode 770 --owner 11111:22222
+- exec:
+ host.a:
+ - while ! test -e /etc/ceph/ceph.client.foo.keyring ; do sleep 1 ; done
+ - ls -al /etc/ceph/ceph.client.foo.keyring | grep rwxrwx---
+ - ls -al /etc/ceph/ceph.client.foo.keyring | grep 11111
+ - ls -al /etc/ceph/ceph.client.foo.keyring | grep 22222
+ - test -e /etc/ceph/ceph.conf
+- exec:
+ host.b:
+ - test ! -e /etc/ceph/ceph.client.foo.keyring
+- cephadm.shell:
+ host.b:
+ - ceph orch host label add `hostname` foo
+- exec:
+ host.b:
+ - while ! test -e /etc/ceph/ceph.client.foo.keyring ; do sleep 1 ; done
+ - ls -al /etc/ceph/ceph.client.foo.keyring | grep rwxrwx---
+ - ls -al /etc/ceph/ceph.client.foo.keyring | grep 11111
+ - ls -al /etc/ceph/ceph.client.foo.keyring | grep 22222
+- cephadm.shell:
+ host.b:
+ - ceph orch host label rm `hostname` foo
+- exec:
+ host.b:
+ - while test -e /etc/ceph/ceph.client.foo.keyring ; do sleep 1 ; done
+- exec:
+ host.a:
+ - test -e /etc/ceph/ceph.client.foo.keyring
+- cephadm.shell:
+ host.a:
+ - ceph orch client-keyring rm client.foo
+- exec:
+ host.a:
+ - while test -e /etc/ceph/ceph.client.foo.keyring ; do sleep 1 ; done
--- /dev/null
+tasks:
+- cephadm.shell:
+ host.a:
+ - ceph osd pool create foo
+ - rbd pool init foo
+ - ceph orch apply iscsi foo u p
+- cephadm.wait_for_service:
+ service: iscsi.foo
--- /dev/null
+tasks:
+- cephadm.shell:
+ host.a:
+ - ceph orch apply rbd-mirror "--placement=*"
+ - ceph orch apply cephfs-mirror "--placement=*"
+- cephadm.wait_for_service:
+ service: rbd-mirror
+- cephadm.wait_for_service:
+ service: cephfs-mirror
--- /dev/null
+tasks:
+- vip:
+
+# make sure cephadm notices the new IP
+- cephadm.shell:
+ host.a:
+ - ceph orch device ls --refresh
+
+# stop kernel nfs server, if running
+- vip.exec:
+ all-hosts:
+ - systemctl stop nfs-server
+
+- cephadm.shell:
+ host.a:
+ - ceph fs volume create foofs
+
+# deploy nfs + ingress
+- cephadm.apply:
+ specs:
+ - service_type: nfs
+ service_id: foo
+ placement:
+ count: 2
+ spec:
+ port: 12049
+ - service_type: ingress
+ service_id: nfs.foo
+ spec:
+ backend_service: nfs.foo
+ frontend_port: 2049
+ monitor_port: 9002
+ virtual_ip: "{{VIP0}}/{{VIPPREFIXLEN}}"
+- cephadm.wait_for_service:
+ service: nfs.foo
+- cephadm.wait_for_service:
+ service: ingress.nfs.foo
+
+## export and mount
+
+- cephadm.shell:
+ host.a:
+ - ceph nfs export create cephfs foofs foo --binding /fake
+
+- vip.exec:
+ host.a:
+ - mkdir /mnt/foo
+ - sleep 5
+ - mount -t nfs {{VIP0}}:/fake /mnt/foo
+ - echo test > /mnt/foo/testfile
+ - sync
+
+# take each gateway down in turn and ensure things still work
+- cephadm.shell:
+ volumes:
+ - /mnt/foo:/mnt/foo
+ host.a:
+ - |
+ echo "Check with each haproxy down in turn..."
+ for haproxy in `ceph orch ps | grep ^haproxy.nfs.foo. | awk '{print $1}'`; do
+ ceph orch daemon stop $haproxy
+ while ! ceph orch ps | grep $haproxy | grep stopped; do sleep 1 ; done
+ cat /mnt/foo/testfile
+ echo $haproxy > /mnt/foo/testfile
+ sync
+ ceph orch daemon start $haproxy
+ while ! ceph orch ps | grep $haproxy | grep running; do sleep 1 ; done
+ done
--- /dev/null
+tasks:
+- vip:
+
+# make sure cephadm notices the new IP
+- cephadm.shell:
+ host.a:
+ - ceph orch device ls --refresh
+
+# stop kernel nfs server, if running
+- vip.exec:
+ all-hosts:
+ - systemctl stop nfs-server
+
+- cephadm.shell:
+ host.a:
+ - ceph fs volume create foofs
+ - ceph nfs cluster create foo --ingress --virtual-ip {{VIP0}}/{{VIPPREFIXLEN}}
+ - ceph nfs export create cephfs foofs foo --binding /fake
+
+- cephadm.wait_for_service:
+ service: nfs.foo
+- cephadm.wait_for_service:
+ service: ingress.nfs.foo
+
+## export and mount
+
+- vip.exec:
+ host.a:
+ - mkdir /mnt/foo
+ - sleep 5
+ - mount -t nfs {{VIP0}}:/fake /mnt/foo
+ - echo test > /mnt/foo/testfile
+ - sync
+
+# take each gateway down in turn and ensure things still work
+- cephadm.shell:
+ volumes:
+ - /mnt/foo:/mnt/foo
+ host.a:
+ - |
+ echo "Check with each haproxy down in turn..."
+ for haproxy in `ceph orch ps | grep ^haproxy.nfs.foo. | awk '{print $1}'`; do
+ ceph orch daemon stop $haproxy
+ while ! ceph orch ps | grep $haproxy | grep stopped; do sleep 1 ; done
+ cat /mnt/foo/testfile
+ echo $haproxy > /mnt/foo/testfile
+ sync
+ ceph orch daemon start $haproxy
+ while ! ceph orch ps | grep $haproxy | grep running; do sleep 1 ; done
+ done
--- /dev/null
+tasks:
+
+# stop kernel nfs server, if running
+- vip.exec:
+ all-hosts:
+ - systemctl stop nfs-server
+
+- cephadm.apply:
+ specs:
+ - service_type: nfs
+ service_id: foo
+- cephadm.wait_for_service:
+ service: nfs.foo
--- /dev/null
+tasks:
+
+# stop kernel nfs server, if running
+- vip.exec:
+ all-hosts:
+ - systemctl stop nfs-server
+
+- cephadm.shell:
+ host.a:
+ - ceph nfs cluster create foo
+- cephadm.wait_for_service:
+ service: nfs.foo
--- /dev/null
+tasks:
+- vip:
+
+# make sure cephadm notices the new IP
+- cephadm.shell:
+ host.a:
+ - ceph orch device ls --refresh
+
+# deploy rgw + ingress
+- cephadm.apply:
+ specs:
+ - service_type: rgw
+ service_id: foo
+ placement:
+ count: 4
+ host_pattern: "*"
+ spec:
+ rgw_frontend_port: 8000
+ - service_type: ingress
+ service_id: rgw.foo
+ placement:
+ count: 2
+ spec:
+ backend_service: rgw.foo
+ frontend_port: 9000
+ monitor_port: 9001
+ virtual_ip: "{{VIP0}}/{{VIPPREFIXLEN}}"
+- cephadm.wait_for_service:
+ service: rgw.foo
+- cephadm.wait_for_service:
+ service: ingress.rgw.foo
+
+# take each component down in turn and ensure things still work
+- cephadm.shell:
+ host.a:
+ - |
+ echo "Check while healthy..."
+ curl http://{{VIP0}}:9000/
+
+ # stop each rgw in turn
+ echo "Check with each rgw stopped in turn..."
+ for rgw in `ceph orch ps | grep ^rgw.foo. | awk '{print $1}'`; do
+ ceph orch daemon stop $rgw
+ while ! ceph orch ps | grep $rgw | grep stopped; do sleep 1 ; done
+ while ! curl http://{{VIP0}}:9000/ ; do sleep 1 ; done
+ ceph orch daemon start $rgw
+ while ! ceph orch ps | grep $rgw | grep running; do sleep 1 ; done
+ done
+
+ # stop each haproxy in turn
+ echo "Check with each haproxy down in turn..."
+ for haproxy in `ceph orch ps | grep ^haproxy.rgw.foo. | awk '{print $1}'`; do
+ ceph orch daemon stop $haproxy
+ while ! ceph orch ps | grep $haproxy | grep stopped; do sleep 1 ; done
+ while ! curl http://{{VIP0}}:9000/ ; do sleep 1 ; done
+ ceph orch daemon start $haproxy
+ while ! ceph orch ps | grep $haproxy | grep running; do sleep 1 ; done
+ done
+
+ while ! curl http://{{VIP0}}:9000/ ; do sleep 1 ; done
--- /dev/null
+tasks:
+- cephadm.apply:
+ specs:
+ - service_type: rgw
+ service_id: foo
+ placement:
+ count_per_host: 4
+ host_pattern: "*"
+ spec:
+ rgw_frontend_port: 8000
+- cephadm.wait_for_service:
+ service: rgw.foo
--- /dev/null
+tasks:
+- cephadm.shell:
+ host.a:
+ - ceph orch status
+ - ceph orch ps
+ - ceph orch ls
+ - ceph orch host ls
+ - ceph orch device ls
--- /dev/null
+../smoke/distro
\ No newline at end of file
--- /dev/null
+tasks:
+- cephadm:
+ roleless: true
+ single_host_defaults: true
+- cephadm.shell:
+ host.a:
+ - ceph orch status
+ - ceph orch ps
+ - ceph orch ls
+ - ceph orch host ls
+ - ceph orch device ls
+roles:
+- - host.a
+ - osd.0
+ - osd.1
+ - osd.2
+ - osd.3
+ - client.0
+openstack:
+- volumes: # attached to each instance
+ count: 4
+ size: 10 # GB
+overrides:
+ ceph:
+ conf:
+ osd:
+ osd shutdown pgref assert: true
--- /dev/null
+tasks:
+- cephadm.apply:
+ specs:
+ - service_type: rgw
+ service_id: foo
+ placement:
+ count_per_host: 4
+ host_pattern: "*"
+ spec:
+ rgw_frontend_port: 8000
+- cephadm.wait_for_service:
+ service: rgw.foo
--- /dev/null
+tasks:
+- cephadm.shell:
+ host.a:
+ - ceph orch status
+ - ceph orch ps
+ - ceph orch ls
+ - ceph orch host ls
+ - ceph orch device ls
--- /dev/null
+../.qa
\ No newline at end of file
--- /dev/null
+../.qa
\ No newline at end of file
--- /dev/null
+.qa/distros/podman/centos_8.2_kubic_stable.yaml
\ No newline at end of file
--- /dev/null
+.qa/distros/podman/rhel_8.3_kubic_stable.yaml
\ No newline at end of file
--- /dev/null
+.qa/distros/all/ubuntu_18.04.yaml
\ No newline at end of file
--- /dev/null
+.qa/distros/all/ubuntu_20.04.yaml
\ No newline at end of file
--- /dev/null
+roles:
+- - mon.a
+ - mon.c
+ - mgr.y
+ - osd.0
+ - osd.1
+ - osd.2
+ - osd.3
+ - client.0
+ - ceph.rgw.foo.a
+ - node-exporter.a
+ - alertmanager.a
+- - mon.b
+ - mgr.x
+ - osd.4
+ - osd.5
+ - osd.6
+ - osd.7
+ - client.1
+ - prometheus.a
+ - grafana.a
+ - node-exporter.b
+ - ceph.iscsi.iscsi.a
+openstack:
+- volumes: # attached to each instance
+ count: 4
+ size: 10 # GB
+overrides:
+ ceph:
+ conf:
+ osd:
+ osd shutdown pgref assert: true
--- /dev/null
+.qa/mon_election
\ No newline at end of file
--- /dev/null
+tasks:
+- cephadm:
+ conf:
+ mgr:
+ debug ms: 1
+ debug mgr: 20
+- cephadm.shell:
+ mon.a:
+ - ceph orch status
+ - ceph orch ps
+ - ceph orch ls
+ - ceph orch host ls
+ - ceph orch device ls
+ - ceph orch ls --format yaml
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+.qa/overrides/2-size-2-min-size.yaml
\ No newline at end of file
--- /dev/null
+.qa/overrides/3-size-2-min-size.yaml
\ No newline at end of file
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+overrides:
+ ceph:
+ mon_bind_msgr2: false
+ log-ignorelist:
+ - \(MON_DOWN\)
+ conf:
+ global:
+ ms type: async
+ ms bind msgr2: false
+tasks:
+- install:
+ branch: luminous
+ exclude_packages:
+ - librados3
+ - ceph-mgr-dashboard
+ - ceph-mgr-diskprediction-local
+ - ceph-mgr-rook
+ - ceph-mgr-cephadm
+ - cephadm
+ - ceph-immutable-object-cache
+ - ceph-base
+ - python3-rados
+ - python3-rgw
+ - python3-rbd
+ - python3-cephfs
+ - librados-devel
+ extra_packages:
+ - librados2
+ - python-rados
+ - python-rgw
+ - python-rbd
+ - python-cephfs
--- /dev/null
+overrides:
+ ceph:
+ mon_bind_msgr2: false
+ log-ignorelist:
+ - \(MON_DOWN\)
+ conf:
+ global:
+ mon warn on msgr2 not enabled: false
+tasks:
+- install:
+ branch: luminous
+ exclude_packages:
+ - librados3
+ - ceph-mgr-dashboard
+ - ceph-mgr-diskprediction-local
+ - ceph-mgr-rook
+ - ceph-mgr-cephadm
+ - cephadm
+ - ceph-immutable-object-cache
+ - ceph-base
+ - python3-rados
+ - python3-rgw
+ - python3-rbd
+ - python3-cephfs
+ - librados-devel
+ extra_packages:
+ - librados2
+ - python-rados
+ - python-rgw
+ - python-rbd
+ - python-cephfs
--- /dev/null
+overrides:
+ ceph:
+ mon_bind_msgr2: false
+ log-ignorelist:
+ - \(MON_DOWN\)
+ conf:
+ global:
+ ms type: async
+ ms bind msgr2: false
+tasks:
+- install:
+ branch: mimic
+ exclude_packages:
+ - librados3
+ - ceph-mgr-dashboard
+ - ceph-mgr-diskprediction-local
+ - ceph-mgr-rook
+ - ceph-mgr-cephadm
+ - cephadm
+ - ceph-immutable-object-cache
+ - ceph-base
+ - python3-rados
+ - python3-rgw
+ - python3-rbd
+ - python3-cephfs
+ - librados-devel
+ extra_packages:
+ - librados2
+ - python-rados
+ - python-rgw
+ - python-rbd
+ - python-cephfs
--- /dev/null
+overrides:
+ ceph:
+ mon_bind_msgr2: false
+ log-ignorelist:
+ - \(MON_DOWN\)
+ conf:
+ global:
+ ms type: async
+ mon warn on msgr2 not enabled: false
+tasks:
+- install:
+ branch: mimic
+ exclude_packages:
+ - librados3
+ - ceph-mgr-dashboard
+ - ceph-mgr-diskprediction-local
+ - ceph-mgr-rook
+ - ceph-mgr-cephadm
+ - cephadm
+ - ceph-immutable-object-cache
+ - ceph-base
+ - python3-rados
+ - python3-rgw
+ - python3-rbd
+ - python3-cephfs
+ - librados-devel
+ extra_packages:
+ - librados2
+ - python-rados
+ - python-rgw
+ - python-rbd
+ - python-cephfs
--- /dev/null
+overrides:
+ ceph:
+ mon_bind_msgr2: false
+ log-ignorelist:
+ - \(MON_DOWN\)
+ conf:
+ global:
+ ms type: async
+ ms bind msgr2: false
+tasks:
+- install:
+ branch: nautilus
+ exclude_packages:
+ - cephadm
+ - ceph-mgr-cephadm
+ - ceph-immutable-object-cache
+ - python3-rados
+ - python3-rgw
+ - python3-rbd
+ - python3-cephfs
+ extra_packages:
+ - python-rados
+ - python-rgw
+ - python-rbd
+ - python-cephfs
--- /dev/null
+overrides:
+ ceph:
+ log-ignorelist:
+ - \(MON_DOWN\)
+ conf:
+ global:
+ ms type: async
+ ms bind msgr2: true
+ ms bind msgr1: false
+tasks:
+- install:
+ branch: nautilus
+ exclude_packages:
+ - cephadm
+ - ceph-mgr-cephadm
+ - ceph-immutable-object-cache
+ - python3-rados
+ - python3-rgw
+ - python3-rbd
+ - python3-cephfs
+ extra_packages:
+ - python-rados
+ - python-rgw
+ - python-rbd
+ - python-cephfs
--- /dev/null
+overrides:
+ ceph:
+ log-ignorelist:
+ - \(MON_DOWN\)
+tasks:
+- install:
+ branch: nautilus
+ exclude_packages:
+ - cephadm
+ - ceph-mgr-cephadm
+ - ceph-immutable-object-cache
+ - python3-rados
+ - python3-rgw
+ - python3-rbd
+ - python3-cephfs
+ extra_packages:
+ - python-rados
+ - python-rgw
+ - python-rbd
+ - python-cephfs
--- /dev/null
+overrides:
+ ceph:
+ log-ignorelist:
+ - \(MON_DOWN\)
+tasks:
+- install:
+ branch: octopus
+ exclude_packages:
+ - ceph-mgr-dashboard
+ - ceph-mgr-diskprediction-local
+ - ceph-mgr-rook
+ - ceph-mgr-cephadm
+ - ceph-base-debuginfo
+ - ceph-common-debuginfo
+ - ceph-immutable-object-cache-debuginfo
+ - ceph-radosgw-debuginfo
+ - ceph-test-debuginfo
+ - ceph-base-debuginfo
+ - ceph-mgr-debuginfo
+ - ceph-mds-debuginfo
+ - ceph-mon-debuginfo
+ - ceph-osd-debuginfo
+ - ceph-fuse-debuginfo
+ - librados-devel-debuginfo
+ - libcephfs2-debuginfo
+ - librados2-debuginfo
+ - librbd1-debuginfo
+ - python3-cephfs-debuginfo
+ - python3-rados-debuginfo
+ - python3-rbd-debuginfo
+ - python3-rgw-debuginfo
+ - rbd-fuse-debuginfo
+ - rbd-mirror-debuginfo
+ - rbd-nbd-debuginfo
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+overrides:
+ ceph:
+ conf:
+ osd:
+ osd backoff on peering: true
--- /dev/null
+overrides:
+ ceph:
+ conf:
+ osd:
+ osd backoff on peering: true
+ osd backoff on degraded: true
--- /dev/null
+# Don't verify os + flavor + sha1
+verify_ceph_hash: false
+tasks:
+- cephadm:
+ conf:
+ mon:
+ auth allow insecure global id reclaim: true
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+openstack:
+ - volumes: # attached to each instance
+ count: 4
+ size: 30 # GB
--- /dev/null
+roles:
+- [mon.a, mgr.y, osd.0, osd.1, osd.2, osd.3, client.0]
+- [mon.b, mgr.x, osd.4, osd.5, osd.6, osd.7, client.1]
+- [mon.c, osd.8, osd.9, osd.10, osd.11, client.2]
+openstack:
+- volumes: # attached to each instance
+ count: 4
+ size: 10 # GB
+overrides:
+ ceph:
+ conf:
+ osd:
+ osd shutdown pgref assert: true
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+tasks:
+- exec:
+ mon.a:
+ - while ! ceph balancer status ; do sleep 1 ; done
+ - ceph balancer mode crush-compat
+ - ceph balancer on
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+.qa/distros/all/ubuntu_18.04.yaml
\ No newline at end of file
--- /dev/null
+.qa/mon_election
\ No newline at end of file
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+overrides:
+ ceph:
+ conf:
+ global:
+ ms inject socket failures: 2500
+ ms tcp read timeout: 5
+ mon client directed command retry: 5
+ log-ignorelist:
+ - \(OSD_SLOW_PING_TIME
--- /dev/null
+overrides:
+ ceph:
+ conf:
+ global:
+ ms inject socket failures: 5000
+ mon client directed command retry: 5
+ osd:
+ osd heartbeat use min delay socket: true
+ log-ignorelist:
+ - \(OSD_SLOW_PING_TIME
--- /dev/null
+overrides:
+ ceph:
+ conf:
+ global:
+ ms inject socket failures: 2500
+ ms inject delay type: osd
+ ms inject delay probability: .005
+ ms inject delay max: 1
+ ms inject internal delays: .002
+ mon client directed command retry: 5
+ log-ignorelist:
+ - \(OSD_SLOW_PING_TIME
--- /dev/null
+.qa/config/rados.yaml
\ No newline at end of file
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+overrides:
+ ceph:
+ log-ignorelist:
+ - but it is still running
+ - objects unfound and apparently lost
+ conf:
+ osd:
+ osd debug reject backfill probability: .3
+ osd scrub min interval: 60
+ osd scrub max interval: 120
+ osd max backfills: 3
+ osd snap trim sleep: 2
+ mon:
+ mon min osdmap epochs: 50
+ paxos service trim min: 10
+ # prune full osdmaps regularly
+ mon osdmap full prune min: 15
+ mon osdmap full prune interval: 2
+ mon osdmap full prune txsize: 2
+tasks:
+- thrashosds:
+ timeout: 1200
+ chance_pgnum_grow: 1
+ chance_pgpnum_fix: 1
+ aggressive_pg_num_changes: false
--- /dev/null
+overrides:
+ ceph:
+ log-ignorelist:
+ - but it is still running
+ - objects unfound and apparently lost
+ conf:
+ osd:
+ osd debug reject backfill probability: .3
+ osd scrub min interval: 60
+ osd scrub max interval: 120
+ osd max backfills: 3
+ osd snap trim sleep: 2
+ mon:
+ mon min osdmap epochs: 50
+ paxos service trim min: 10
+ # prune full osdmaps regularly
+ mon osdmap full prune min: 15
+ mon osdmap full prune interval: 2
+ mon osdmap full prune txsize: 2
+tasks:
+- thrashosds:
+ timeout: 1200
+ chance_pgnum_grow: 1
+ chance_pgpnum_fix: 1
--- /dev/null
+overrides:
+ ceph:
+ log-ignorelist:
+ - but it is still running
+ - objects unfound and apparently lost
+ - osd_map_cache_size
+ conf:
+ mon:
+ mon min osdmap epochs: 50
+ paxos service trim min: 10
+ # prune full osdmaps regularly
+ mon osdmap full prune min: 15
+ mon osdmap full prune interval: 2
+ mon osdmap full prune txsize: 2
+ osd:
+ osd map cache size: 1
+ osd scrub min interval: 60
+ osd scrub max interval: 120
+ osd scrub during recovery: false
+ osd max backfills: 6
+tasks:
+- thrashosds:
+ timeout: 1800
+ chance_pgnum_grow: 0.25
+ chance_pgpnum_fix: 0.25
+ chance_test_map_discontinuity: 2
--- /dev/null
+overrides:
+ ceph:
+ conf:
+ osd:
+ osd scrub min interval: 60
+ osd scrub max interval: 120
+ journal throttle high multiple: 2
+ journal throttle max multiple: 10
+ filestore queue throttle high multiple: 2
+ filestore queue throttle max multiple: 10
+ osd max backfills: 9
+ log-ignorelist:
+ - but it is still running
+ - objects unfound and apparently lost
+tasks:
+- thrashosds:
+ timeout: 1200
+ chance_pgnum_grow: 3
+ chance_pgpnum_fix: 1
+openstack:
+- volumes:
+ size: 50
--- /dev/null
+overrides:
+ ceph:
+ log-ignorelist:
+ - but it is still running
+ - objects unfound and apparently lost
+ conf:
+ osd:
+ osd scrub min interval: 60
+ osd scrub max interval: 120
+ filestore odsync write: true
+ osd max backfills: 2
+ osd snap trim sleep: .5
+ mon:
+ mon min osdmap epochs: 50
+ paxos service trim min: 10
+ # prune full osdmaps regularly
+ mon osdmap full prune min: 15
+ mon osdmap full prune interval: 2
+ mon osdmap full prune txsize: 2
+tasks:
+- thrashosds:
+ timeout: 1200
+ chance_pgnum_grow: 2
+ chance_pgpnum_fix: 1
--- /dev/null
+.qa/tasks/thrashosds-health.yaml
\ No newline at end of file
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+overrides:
+ ceph:
+ log-ignorelist:
+ - must scrub before tier agent can activate
+tasks:
+- exec:
+ client.0:
+ - sudo ceph osd pool create base 4
+ - sudo ceph osd pool application enable base rados
+ - sudo ceph osd pool create cache 4
+ - sudo ceph osd tier add base cache
+ - sudo ceph osd tier cache-mode cache writeback
+ - sudo ceph osd tier set-overlay base cache
+ - sudo ceph osd pool set cache hit_set_type bloom
+ - sudo ceph osd pool set cache hit_set_count 8
+ - sudo ceph osd pool set cache hit_set_period 3600
+ - sudo ceph osd pool set cache target_max_objects 250
+ - sudo ceph osd pool set cache min_read_recency_for_promote 2
+- rados:
+ clients: [client.2]
+ pools: [base]
+ ops: 4000
+ objects: 500
+ op_weights:
+ read: 100
+ write: 100
+ delete: 50
+ copy_from: 50
+ cache_flush: 50
+ cache_try_flush: 50
+ cache_evict: 50
+ snap_create: 50
+ snap_remove: 50
+ rollback: 50
--- /dev/null
+overrides:
+ ceph:
+ conf:
+ client.2:
+ debug ms: 1
+ debug objecter: 20
+ debug rados: 20
+tasks:
+- full_sequential:
+ - radosbench:
+ clients: [client.2]
+ time: 90
+ - radosbench:
+ clients: [client.2]
+ time: 90
+ - radosbench:
+ clients: [client.2]
+ time: 90
+ - radosbench:
+ clients: [client.2]
+ time: 90
+ - radosbench:
+ clients: [client.2]
+ time: 90
+ - radosbench:
+ clients: [client.2]
+ time: 90
+ - radosbench:
+ clients: [client.2]
+ time: 90
+ - radosbench:
+ clients: [client.2]
+ time: 90
--- /dev/null
+meta:
+- desc: |
+ rbd object class functional tests
+tasks:
+- exec:
+ client.2:
+ - ceph_test_cls_rbd --gtest_filter=-TestClsRbd.get_features:TestClsRbd.parents:TestClsRbd.mirror
--- /dev/null
+tasks:
+- rados:
+ clients: [client.2]
+ ops: 4000
+ objects: 50
+ op_weights:
+ read: 100
+ write: 100
+ delete: 50
+ snap_create: 50
+ snap_remove: 50
+ rollback: 50
+ copy_from: 50
--- /dev/null
+meta:
+- desc: |
+ librbd C and C++ api tests
+workload:
+- workunit:
+ clients:
+ client.2:
+ - rbd/test_librbd.sh
--- /dev/null
+../.qa
\ No newline at end of file
--- /dev/null
+../workunits/0-distro
\ No newline at end of file
--- /dev/null
+tasks:
+- install:
+- cephadm:
+ conf:
+ mgr:
+ debug ms: 1
+ debug mgr: 20
--- /dev/null
+overrides:
+ ceph:
+ log-ignorelist:
+ - but it is still running
+ - objects unfound and apparently lost
+ conf:
+ osd:
+ osd debug reject backfill probability: .3
+ osd scrub min interval: 60
+ osd scrub max interval: 120
+ osd max backfills: 3
+ osd snap trim sleep: 2
+ osd delete sleep: 1
+ mon:
+ mon min osdmap epochs: 50
+ paxos service trim min: 10
+ # prune full osdmaps regularly
+ mon osdmap full prune min: 15
+ mon osdmap full prune interval: 2
+ mon osdmap full prune txsize: 2
+tasks:
+- thrashosds:
+ timeout: 1200
+ chance_pgnum_grow: 1
+ chance_pgnum_shrink: 1
+ chance_pgpnum_fix: 1
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+.qa/suites/rados/thrash/workloads/rados_api_tests.yaml
\ No newline at end of file
--- /dev/null
+.qa/suites/rados/thrash/workloads/radosbench.yaml
\ No newline at end of file
--- /dev/null
+.qa/suites/rados/thrash/workloads/small-objects.yaml
\ No newline at end of file
--- /dev/null
+.qa/suites/rados/thrash/workloads/snaps-few-objects.yaml
\ No newline at end of file
--- /dev/null
+../smoke/fixed-2.yaml
\ No newline at end of file
--- /dev/null
+.qa/msgr
\ No newline at end of file
--- /dev/null
+overrides:
+ cephadm:
+ cephadm_mode: root
--- /dev/null
+../.qa
\ No newline at end of file
--- /dev/null
+os_type: centos
+os_version: "8.3"
+overrides:
+ selinux:
+ whitelist:
+ - scontext=system_u:system_r:logrotate_t:s0
+
+tasks:
+- cephadm:
+ image: quay.ceph.io/ceph-ci/ceph:octopus
+ cephadm_branch: octopus
+ cephadm_git_url: https://github.com/ceph/ceph
+ # avoid --cap-add=PTRACE + --privileged for older cephadm versions
+ allow_ptrace: false
+ # deploy additional mons the "old" (octopus) way
+ add_mons_via_daemon_add: true
+ avoid_pacific_features: true
+
+
+roles:
+- - mon.a
+ - mon.c
+ - mgr.y
+ - osd.0
+ - osd.1
+ - osd.2
+ - osd.3
+ - client.0
+# - ceph.rgw.realm.zone.a # CLI change in v16 pacific
+ - node-exporter.a
+ - alertmanager.a
+- - mon.b
+ - mgr.x
+ - osd.4
+ - osd.5
+ - osd.6
+ - osd.7
+ - client.1
+ - prometheus.a
+ - grafana.a
+ - node-exporter.b
+ - ceph.iscsi.iscsi.a
--- /dev/null
+os_type: ubuntu
+os_version: "20.04"
+
+tasks:
+- cephadm:
+ image: docker.io/ceph/ceph:v15.2.9
+ cephadm_branch: v15.2.9
+ cephadm_git_url: https://github.com/ceph/ceph
+ # avoid --cap-add=PTRACE + --privileged for older cephadm versions
+ allow_ptrace: false
+ # deploy additional mons the "old" (octopus) way
+ add_mons_via_daemon_add: true
+ avoid_pacific_features: true
+
+roles:
+- - mon.a
+ - mon.c
+ - mgr.y
+ - osd.0
+ - osd.1
+ - osd.2
+ - osd.3
+ - client.0
+# - ceph.rgw.realm.zone.a # CLI change in v16 pacific
+ - node-exporter.a
+ - alertmanager.a
+- - mon.b
+ - mgr.x
+ - osd.4
+ - osd.5
+ - osd.6
+ - osd.7
+ - client.1
+ - prometheus.a
+ - grafana.a
+ - node-exporter.b
+ - ceph.iscsi.iscsi.a
--- /dev/null
+os_type: ubuntu
+os_version: "20.04"
+
+tasks:
+- cephadm:
+ image: docker.io/ceph/ceph:v15.2.0
+ cephadm_branch: v15.2.0
+ cephadm_git_url: https://github.com/ceph/ceph
+ # avoid --cap-add=PTRACE + --privileged for older cephadm versions
+ allow_ptrace: false
+ # deploy additional mons the "old" (octopus) way
+ add_mons_via_daemon_add: true
+ avoid_pacific_features: true
+
+roles:
+- - mon.a
+ - mon.c
+ - mgr.y
+ - osd.0
+ - osd.1
+ - osd.2
+ - osd.3
+ - client.0
+# - ceph.rgw.realm.zone.a # Disabled, needs 15.2.4 as an upgrade start
+ - node-exporter.a
+ - alertmanager.a
+- - mon.b
+ - mgr.x
+ - osd.4
+ - osd.5
+ - osd.6
+ - osd.7
+ - client.1
+ - prometheus.a
+ - grafana.a
+ - node-exporter.b
+# - ceph.iscsi.iscsi.a # needs later start point
--- /dev/null
+tasks:
+- cephadm.shell:
+ mon.a:
+ - ceph config set mgr mgr/cephadm/use_repo_digest false --force
--- /dev/null
+tasks:
+- cephadm.shell:
+ env: [sha1]
+ mon.a:
+ - radosgw-admin realm create --rgw-realm=r --default
+ - radosgw-admin zonegroup create --rgw-zonegroup=default --master --default
+ - radosgw-admin zone create --rgw-zonegroup=default --rgw-zone=z --master --default
+ - radosgw-admin period update --rgw-realm=r --commit
+ - ceph orch apply rgw r z --placement=2 --port=8000
+ - sleep 120
+ - ceph config set mon mon_warn_on_insecure_global_id_reclaim false --force
+ - ceph config set mon mon_warn_on_insecure_global_id_reclaim_allowed false --force
+ - ceph orch upgrade start --image quay.ceph.io/ceph-ci/ceph:$sha1
--- /dev/null
+tasks:
+- cephadm.shell:
+ env: [sha1]
+ mon.a:
+ - while ceph orch upgrade status | jq '.in_progress' | grep true ; do ceph orch ps ; ceph versions ; sleep 30 ; done
+ - ceph orch ps
+ - ceph versions
+ - echo "wait for servicemap items w/ changing names to refresh"
+ - sleep 60
+ - ceph orch ps
+ - ceph versions
+ - ceph versions | jq -e '.overall | length == 1'
+ - ceph versions | jq -e '.overall | keys' | grep $sha1
--- /dev/null
+.qa/mon_election
\ No newline at end of file
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+../smoke/distro/
\ No newline at end of file
--- /dev/null
+../smoke/fixed-2.yaml
\ No newline at end of file
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+overrides:
+ cephadm:
+ cephadm_mode: cephadm-package
+ install:
+ extra_packages: [cephadm]
--- /dev/null
+overrides:
+ cephadm:
+ cephadm_mode: root
--- /dev/null
+.qa/mon_election
\ No newline at end of file
--- /dev/null
+.qa/msgr
\ No newline at end of file
--- /dev/null
+tasks:
+- install:
+- cephadm:
+ conf:
+ mgr:
+ debug ms: 1
+ debug mgr: 20
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+.qa/suites/rados/basic/tasks/rados_api_tests.yaml
\ No newline at end of file
--- /dev/null
+.qa/suites/rados/basic/tasks/rados_python.yaml
\ No newline at end of file
--- /dev/null
+../.qa
\ No newline at end of file
--- /dev/null
+../.qa
\ No newline at end of file
--- /dev/null
+.qa/distros/podman/centos_8.2_kubic_stable.yaml
\ No newline at end of file
--- /dev/null
+.qa/mon_election
\ No newline at end of file
--- /dev/null
+roles:
+- [mon.a, mgr.x, osd.0, client.0]
+tasks:
+- install:
+- exec:
+ mon.a:
+ - yum install -y python3 || apt install -y python3
+- workunit:
+ clients:
+ client.0:
+ - cephadm/test_adoption.sh
--- /dev/null
+roles:
+- [mon.a, mgr.x, osd.0, client.0]
+tasks:
+- install:
+- exec:
+ mon.a:
+ - yum install -y python3 || apt install -y python3
+- workunit:
+ clients:
+ client.0:
+ - cephadm/test_cephadm.sh
--- /dev/null
+roles:
+- [mon.a, mgr.x, osd.0, client.0]
+tasks:
+- workunit:
+ no_coverage_and_limits: true
+ clients:
+ client.0:
+ - cephadm/test_repos.sh
--- /dev/null
+roles:
+- - host.a
+ - osd.0
+ - osd.1
+ - osd.2
+ - mon.a
+ - mgr.a
+ - client.0
+tasks:
+- install:
+- cephadm:
+- cephadm.shell:
+ host.a:
+ - ceph orch apply mds a
+- cephfs_test_runner:
+ modules:
+ - tasks.cephfs.test_nfs
+ - tasks.cephadm_cases.test_cli
--- /dev/null
+../.qa
\ No newline at end of file
--- /dev/null
+../.qa
\ No newline at end of file
--- /dev/null
+../.qa
\ No newline at end of file
--- /dev/null
+os_type: ubuntu
+os_version: "18.04"
--- /dev/null
+os_type: ubuntu
+os_version: "20.04"
--- /dev/null
+tasks:
+- kubeadm:
--- /dev/null
+tasks:
+- rook:
+- rook.shell:
+ - ceph -s
+ - ceph orch status
+ - ceph orch ps
+ - ceph orch ls
--- /dev/null
+tasks:
+- install:
+ host.a:
+- radosbench:
+ clients: [client.a]
--- /dev/null
+tasks:
+- rook.shell:
+ commands:
+ - ceph orch status
+ - ceph orch ps
+ - ceph orch ls
+ - ceph orch host ls
+ - ceph orch device ls
--- /dev/null
+roles:
+- - host.a
+ - client.a
--- /dev/null
+roles:
+- - host.a
+ - client.a
+- - host.b
+ - client.b
+- - host.c
+ - client.c
--- /dev/null
+overrides:
+ kubeadm:
+ version: "1.21"
--- /dev/null
+overrides:
+ kubeadm:
+ pod_network: calico
--- /dev/null
+overrides:
+ rook:
+ rook_image: rook/ceph:v1.6.2
+ rook_branch: v1.6.2
--- /dev/null
+overrides:
+ rook:
+ rook_image: rook/ceph:master
--- /dev/null
+../orch/cephadm
\ No newline at end of file
+++ /dev/null
-../.qa
\ No newline at end of file
+++ /dev/null
-../.qa
\ No newline at end of file
+++ /dev/null
-../.qa
\ No newline at end of file
+++ /dev/null
-.qa/distros/podman/centos_8.2_kubic_stable.yaml
\ No newline at end of file
+++ /dev/null
-roles:
-# 3 osd roles on host.a is required for cephadm task. It checks if the cluster is healthy.
-# More daemons will be deployed on both hosts in e2e tests.
-- - host.a
- - osd.0
- - osd.1
- - osd.2
- - mon.a
- - mgr.a
- - client.0
-- - host.b
- - client.1
-tasks:
-- install:
-- cephadm:
-- workunit:
- clients:
- client.1:
- - cephadm/create_iscsi_disks.sh
-- workunit:
- clients:
- client.0:
- - cephadm/test_dashboard_e2e.sh
+++ /dev/null
-../.qa
\ No newline at end of file
+++ /dev/null
-../smoke/distro
\ No newline at end of file
+++ /dev/null
-.qa/clusters/2-node-mgr.yaml
\ No newline at end of file
+++ /dev/null
-
-tasks:
- - install:
- - ceph:
- # tests may leave mgrs broken, so don't try and call into them
- # to invoke e.g. pg dump during teardown.
- wait-for-scrub: false
- log-ignorelist:
- - overall HEALTH_
- - \(MGR_DOWN\)
- - \(DEVICE_IDENT_ON\)
- - \(DEVICE_FAULT_ON\)
- - \(PG_
- - replacing it with standby
- - No standby daemons available
- - cephfs_test_runner:
- modules:
- - tasks.mgr.test_orchestrator_cli
\ No newline at end of file
+++ /dev/null
-../.qa
\ No newline at end of file
+++ /dev/null
-../smoke/distro
\ No newline at end of file
+++ /dev/null
-tasks:
-- cephadm:
- roleless: true
-- cephadm.shell:
- host.a:
- - ceph orch status
- - ceph orch ps
- - ceph orch ls
- - ceph orch host ls
- - ceph orch device ls
-roles:
-- - host.a
- - osd.0
- - osd.1
- - osd.2
- - osd.3
- - client.0
-- - host.b
- - osd.4
- - osd.5
- - osd.6
- - osd.7
- - client.1
-openstack:
-- volumes: # attached to each instance
- count: 4
- size: 10 # GB
-overrides:
- ceph:
- conf:
- osd:
- osd shutdown pgref assert: true
+++ /dev/null
-tasks:
-- cephadm.shell:
- host.a:
- - ceph osd pool create foo
- - rbd pool init foo
- - ceph orch apply iscsi foo u p
-- cephadm.wait_for_service:
- service: iscsi.foo
+++ /dev/null
-tasks:
-- cephadm.shell:
- host.a:
- - ceph orch apply rbd-mirror "--placement=*"
- - ceph orch apply cephfs-mirror "--placement=*"
-- cephadm.wait_for_service:
- service: rbd-mirror
-- cephadm.wait_for_service:
- service: cephfs-mirror
+++ /dev/null
-tasks:
-- vip:
-
-# make sure cephadm notices the new IP
-- cephadm.shell:
- host.a:
- - ceph orch device ls --refresh
-
-# deploy rgw + ingress
-- cephadm.apply:
- specs:
- - service_type: rgw
- service_id: foo
- placement:
- count: 4
- host_pattern: "*"
- spec:
- rgw_frontend_port: 8000
- - service_type: ingress
- service_id: rgw.foo
- placement:
- count: 2
- spec:
- backend_service: rgw.foo
- frontend_port: 9000
- monitor_port: 9001
- virtual_ip: "{{VIP0}}/{{VIPPREFIXLEN}}"
-- cephadm.wait_for_service:
- service: rgw.foo
-- cephadm.wait_for_service:
- service: ingress.rgw.foo
-
-# take each component down in turn and ensure things still work
-- cephadm.shell:
- host.a:
- - |
- echo "Check while healthy..."
- curl http://{{VIP0}}:9000/
-
- # stop each rgw in turn
- echo "Check with each rgw stopped in turn..."
- for rgw in `ceph orch ps | grep ^rgw.foo. | awk '{print $1}'`; do
- ceph orch daemon stop $rgw
- while ! ceph orch ps | grep $rgw | grep stopped; do sleep 1 ; done
- while ! curl http://{{VIP0}}:9000/ ; do sleep 1 ; done
- ceph orch daemon start $rgw
- while ! ceph orch ps | grep $rgw | grep running; do sleep 1 ; done
- done
-
- # stop each haproxy in turn
- echo "Check with each haproxy down in turn..."
- for haproxy in `ceph orch ps | grep ^haproxy.rgw.foo. | awk '{print $1}'`; do
- ceph orch daemon stop $haproxy
- while ! ceph orch ps | grep $haproxy | grep stopped; do sleep 1 ; done
- while ! curl http://{{VIP0}}:9000/ ; do sleep 1 ; done
- ceph orch daemon start $haproxy
- while ! ceph orch ps | grep $haproxy | grep running; do sleep 1 ; done
- done
-
- while ! curl http://{{VIP0}}:9000/ ; do sleep 1 ; done
+++ /dev/null
-tasks:
-- cephadm.apply:
- specs:
- - service_type: rgw
- service_id: foo
- placement:
- count_per_host: 4
- host_pattern: "*"
- spec:
- rgw_frontend_port: 8000
-- cephadm.wait_for_service:
- service: rgw.foo
+++ /dev/null
-tasks:
-- cephadm.shell:
- host.a:
- - ceph orch status
- - ceph orch ps
- - ceph orch ls
- - ceph orch host ls
- - ceph orch device ls
+++ /dev/null
-../.qa
\ No newline at end of file
+++ /dev/null
-../.qa
\ No newline at end of file
+++ /dev/null
-.qa/distros/podman/centos_8.2_kubic_stable.yaml
\ No newline at end of file
+++ /dev/null
-.qa/distros/podman/rhel_8.3_kubic_stable.yaml
\ No newline at end of file
+++ /dev/null
-.qa/distros/all/ubuntu_18.04.yaml
\ No newline at end of file
+++ /dev/null
-.qa/distros/all/ubuntu_20.04.yaml
\ No newline at end of file
+++ /dev/null
-roles:
-- - mon.a
- - mon.c
- - mgr.y
- - osd.0
- - osd.1
- - osd.2
- - osd.3
- - client.0
- - ceph.rgw.foo.a
- - node-exporter.a
- - alertmanager.a
-- - mon.b
- - mgr.x
- - osd.4
- - osd.5
- - osd.6
- - osd.7
- - client.1
- - prometheus.a
- - grafana.a
- - node-exporter.b
- - ceph.iscsi.iscsi.a
-openstack:
-- volumes: # attached to each instance
- count: 4
- size: 10 # GB
-overrides:
- ceph:
- conf:
- osd:
- osd shutdown pgref assert: true
+++ /dev/null
-.qa/mon_election
\ No newline at end of file
+++ /dev/null
-tasks:
-- cephadm:
- conf:
- mgr:
- debug ms: 1
- debug mgr: 20
-- cephadm.shell:
- mon.a:
- - ceph orch status
- - ceph orch ps
- - ceph orch ls
- - ceph orch host ls
- - ceph orch device ls
- - ceph orch ls --format yaml
+++ /dev/null
-../.qa/
\ No newline at end of file
+++ /dev/null
-../.qa/
\ No newline at end of file
+++ /dev/null
-.qa/overrides/2-size-2-min-size.yaml
\ No newline at end of file
+++ /dev/null
-.qa/overrides/3-size-2-min-size.yaml
\ No newline at end of file
+++ /dev/null
-../.qa/
\ No newline at end of file
+++ /dev/null
-overrides:
- ceph:
- mon_bind_msgr2: false
- log-ignorelist:
- - \(MON_DOWN\)
- conf:
- global:
- ms type: async
- ms bind msgr2: false
-tasks:
-- install:
- branch: luminous
- exclude_packages:
- - librados3
- - ceph-mgr-dashboard
- - ceph-mgr-diskprediction-local
- - ceph-mgr-rook
- - ceph-mgr-cephadm
- - cephadm
- - ceph-immutable-object-cache
- - ceph-base
- - python3-rados
- - python3-rgw
- - python3-rbd
- - python3-cephfs
- - librados-devel
- extra_packages:
- - librados2
- - python-rados
- - python-rgw
- - python-rbd
- - python-cephfs
+++ /dev/null
-overrides:
- ceph:
- mon_bind_msgr2: false
- log-ignorelist:
- - \(MON_DOWN\)
- conf:
- global:
- mon warn on msgr2 not enabled: false
-tasks:
-- install:
- branch: luminous
- exclude_packages:
- - librados3
- - ceph-mgr-dashboard
- - ceph-mgr-diskprediction-local
- - ceph-mgr-rook
- - ceph-mgr-cephadm
- - cephadm
- - ceph-immutable-object-cache
- - ceph-base
- - python3-rados
- - python3-rgw
- - python3-rbd
- - python3-cephfs
- - librados-devel
- extra_packages:
- - librados2
- - python-rados
- - python-rgw
- - python-rbd
- - python-cephfs
+++ /dev/null
-overrides:
- ceph:
- mon_bind_msgr2: false
- log-ignorelist:
- - \(MON_DOWN\)
- conf:
- global:
- ms type: async
- ms bind msgr2: false
-tasks:
-- install:
- branch: mimic
- exclude_packages:
- - librados3
- - ceph-mgr-dashboard
- - ceph-mgr-diskprediction-local
- - ceph-mgr-rook
- - ceph-mgr-cephadm
- - cephadm
- - ceph-immutable-object-cache
- - ceph-base
- - python3-rados
- - python3-rgw
- - python3-rbd
- - python3-cephfs
- - librados-devel
- extra_packages:
- - librados2
- - python-rados
- - python-rgw
- - python-rbd
- - python-cephfs
+++ /dev/null
-overrides:
- ceph:
- mon_bind_msgr2: false
- log-ignorelist:
- - \(MON_DOWN\)
- conf:
- global:
- ms type: async
- mon warn on msgr2 not enabled: false
-tasks:
-- install:
- branch: mimic
- exclude_packages:
- - librados3
- - ceph-mgr-dashboard
- - ceph-mgr-diskprediction-local
- - ceph-mgr-rook
- - ceph-mgr-cephadm
- - cephadm
- - ceph-immutable-object-cache
- - ceph-base
- - python3-rados
- - python3-rgw
- - python3-rbd
- - python3-cephfs
- - librados-devel
- extra_packages:
- - librados2
- - python-rados
- - python-rgw
- - python-rbd
- - python-cephfs
+++ /dev/null
-overrides:
- ceph:
- mon_bind_msgr2: false
- log-ignorelist:
- - \(MON_DOWN\)
- conf:
- global:
- ms type: async
- ms bind msgr2: false
-tasks:
-- install:
- branch: nautilus
- exclude_packages:
- - cephadm
- - ceph-mgr-cephadm
- - ceph-immutable-object-cache
- - python3-rados
- - python3-rgw
- - python3-rbd
- - python3-cephfs
- extra_packages:
- - python-rados
- - python-rgw
- - python-rbd
- - python-cephfs
+++ /dev/null
-overrides:
- ceph:
- log-ignorelist:
- - \(MON_DOWN\)
- conf:
- global:
- ms type: async
- ms bind msgr2: true
- ms bind msgr1: false
-tasks:
-- install:
- branch: nautilus
- exclude_packages:
- - cephadm
- - ceph-mgr-cephadm
- - ceph-immutable-object-cache
- - python3-rados
- - python3-rgw
- - python3-rbd
- - python3-cephfs
- extra_packages:
- - python-rados
- - python-rgw
- - python-rbd
- - python-cephfs
+++ /dev/null
-overrides:
- ceph:
- log-ignorelist:
- - \(MON_DOWN\)
-tasks:
-- install:
- branch: nautilus
- exclude_packages:
- - cephadm
- - ceph-mgr-cephadm
- - ceph-immutable-object-cache
- - python3-rados
- - python3-rgw
- - python3-rbd
- - python3-cephfs
- extra_packages:
- - python-rados
- - python-rgw
- - python-rbd
- - python-cephfs
+++ /dev/null
-overrides:
- ceph:
- log-ignorelist:
- - \(MON_DOWN\)
-tasks:
-- install:
- branch: octopus
- exclude_packages:
- - ceph-mgr-dashboard
- - ceph-mgr-diskprediction-local
- - ceph-mgr-rook
- - ceph-mgr-cephadm
- - ceph-base-debuginfo
- - ceph-common-debuginfo
- - ceph-immutable-object-cache-debuginfo
- - ceph-radosgw-debuginfo
- - ceph-test-debuginfo
- - ceph-base-debuginfo
- - ceph-mgr-debuginfo
- - ceph-mds-debuginfo
- - ceph-mon-debuginfo
- - ceph-osd-debuginfo
- - ceph-fuse-debuginfo
- - librados-devel-debuginfo
- - libcephfs2-debuginfo
- - librados2-debuginfo
- - librbd1-debuginfo
- - python3-cephfs-debuginfo
- - python3-rados-debuginfo
- - python3-rbd-debuginfo
- - python3-rgw-debuginfo
- - rbd-fuse-debuginfo
- - rbd-mirror-debuginfo
- - rbd-nbd-debuginfo
+++ /dev/null
-../.qa/
\ No newline at end of file
+++ /dev/null
-overrides:
- ceph:
- conf:
- osd:
- osd backoff on peering: true
+++ /dev/null
-overrides:
- ceph:
- conf:
- osd:
- osd backoff on peering: true
- osd backoff on degraded: true
+++ /dev/null
-# Don't verify os + flavor + sha1
-verify_ceph_hash: false
-tasks:
-- cephadm:
- conf:
- mon:
- auth allow insecure global id reclaim: true
+++ /dev/null
-../.qa/
\ No newline at end of file
+++ /dev/null
-openstack:
- - volumes: # attached to each instance
- count: 4
- size: 30 # GB
+++ /dev/null
-roles:
-- [mon.a, mgr.y, osd.0, osd.1, osd.2, osd.3, client.0]
-- [mon.b, mgr.x, osd.4, osd.5, osd.6, osd.7, client.1]
-- [mon.c, osd.8, osd.9, osd.10, osd.11, client.2]
-openstack:
-- volumes: # attached to each instance
- count: 4
- size: 10 # GB
-overrides:
- ceph:
- conf:
- osd:
- osd shutdown pgref assert: true
+++ /dev/null
-../.qa/
\ No newline at end of file
+++ /dev/null
-tasks:
-- exec:
- mon.a:
- - while ! ceph balancer status ; do sleep 1 ; done
- - ceph balancer mode crush-compat
- - ceph balancer on
+++ /dev/null
-../.qa/
\ No newline at end of file
+++ /dev/null
-.qa/distros/all/ubuntu_18.04.yaml
\ No newline at end of file
+++ /dev/null
-.qa/mon_election
\ No newline at end of file
+++ /dev/null
-../.qa/
\ No newline at end of file
+++ /dev/null
-overrides:
- ceph:
- conf:
- global:
- ms inject socket failures: 2500
- ms tcp read timeout: 5
- mon client directed command retry: 5
- log-ignorelist:
- - \(OSD_SLOW_PING_TIME
+++ /dev/null
-overrides:
- ceph:
- conf:
- global:
- ms inject socket failures: 5000
- mon client directed command retry: 5
- osd:
- osd heartbeat use min delay socket: true
- log-ignorelist:
- - \(OSD_SLOW_PING_TIME
+++ /dev/null
-overrides:
- ceph:
- conf:
- global:
- ms inject socket failures: 2500
- ms inject delay type: osd
- ms inject delay probability: .005
- ms inject delay max: 1
- ms inject internal delays: .002
- mon client directed command retry: 5
- log-ignorelist:
- - \(OSD_SLOW_PING_TIME
+++ /dev/null
-.qa/config/rados.yaml
\ No newline at end of file
+++ /dev/null
-../.qa/
\ No newline at end of file
+++ /dev/null
-overrides:
- ceph:
- log-ignorelist:
- - but it is still running
- - objects unfound and apparently lost
- conf:
- osd:
- osd debug reject backfill probability: .3
- osd scrub min interval: 60
- osd scrub max interval: 120
- osd max backfills: 3
- osd snap trim sleep: 2
- mon:
- mon min osdmap epochs: 50
- paxos service trim min: 10
- # prune full osdmaps regularly
- mon osdmap full prune min: 15
- mon osdmap full prune interval: 2
- mon osdmap full prune txsize: 2
-tasks:
-- thrashosds:
- timeout: 1200
- chance_pgnum_grow: 1
- chance_pgpnum_fix: 1
- aggressive_pg_num_changes: false
+++ /dev/null
-overrides:
- ceph:
- log-ignorelist:
- - but it is still running
- - objects unfound and apparently lost
- conf:
- osd:
- osd debug reject backfill probability: .3
- osd scrub min interval: 60
- osd scrub max interval: 120
- osd max backfills: 3
- osd snap trim sleep: 2
- mon:
- mon min osdmap epochs: 50
- paxos service trim min: 10
- # prune full osdmaps regularly
- mon osdmap full prune min: 15
- mon osdmap full prune interval: 2
- mon osdmap full prune txsize: 2
-tasks:
-- thrashosds:
- timeout: 1200
- chance_pgnum_grow: 1
- chance_pgpnum_fix: 1
+++ /dev/null
-overrides:
- ceph:
- log-ignorelist:
- - but it is still running
- - objects unfound and apparently lost
- - osd_map_cache_size
- conf:
- mon:
- mon min osdmap epochs: 50
- paxos service trim min: 10
- # prune full osdmaps regularly
- mon osdmap full prune min: 15
- mon osdmap full prune interval: 2
- mon osdmap full prune txsize: 2
- osd:
- osd map cache size: 1
- osd scrub min interval: 60
- osd scrub max interval: 120
- osd scrub during recovery: false
- osd max backfills: 6
-tasks:
-- thrashosds:
- timeout: 1800
- chance_pgnum_grow: 0.25
- chance_pgpnum_fix: 0.25
- chance_test_map_discontinuity: 2
+++ /dev/null
-overrides:
- ceph:
- conf:
- osd:
- osd scrub min interval: 60
- osd scrub max interval: 120
- journal throttle high multiple: 2
- journal throttle max multiple: 10
- filestore queue throttle high multiple: 2
- filestore queue throttle max multiple: 10
- osd max backfills: 9
- log-ignorelist:
- - but it is still running
- - objects unfound and apparently lost
-tasks:
-- thrashosds:
- timeout: 1200
- chance_pgnum_grow: 3
- chance_pgpnum_fix: 1
-openstack:
-- volumes:
- size: 50
+++ /dev/null
-overrides:
- ceph:
- log-ignorelist:
- - but it is still running
- - objects unfound and apparently lost
- conf:
- osd:
- osd scrub min interval: 60
- osd scrub max interval: 120
- filestore odsync write: true
- osd max backfills: 2
- osd snap trim sleep: .5
- mon:
- mon min osdmap epochs: 50
- paxos service trim min: 10
- # prune full osdmaps regularly
- mon osdmap full prune min: 15
- mon osdmap full prune interval: 2
- mon osdmap full prune txsize: 2
-tasks:
-- thrashosds:
- timeout: 1200
- chance_pgnum_grow: 2
- chance_pgpnum_fix: 1
+++ /dev/null
-.qa/tasks/thrashosds-health.yaml
\ No newline at end of file
+++ /dev/null
-../.qa/
\ No newline at end of file
+++ /dev/null
-overrides:
- ceph:
- log-ignorelist:
- - must scrub before tier agent can activate
-tasks:
-- exec:
- client.0:
- - sudo ceph osd pool create base 4
- - sudo ceph osd pool application enable base rados
- - sudo ceph osd pool create cache 4
- - sudo ceph osd tier add base cache
- - sudo ceph osd tier cache-mode cache writeback
- - sudo ceph osd tier set-overlay base cache
- - sudo ceph osd pool set cache hit_set_type bloom
- - sudo ceph osd pool set cache hit_set_count 8
- - sudo ceph osd pool set cache hit_set_period 3600
- - sudo ceph osd pool set cache target_max_objects 250
- - sudo ceph osd pool set cache min_read_recency_for_promote 2
-- rados:
- clients: [client.2]
- pools: [base]
- ops: 4000
- objects: 500
- op_weights:
- read: 100
- write: 100
- delete: 50
- copy_from: 50
- cache_flush: 50
- cache_try_flush: 50
- cache_evict: 50
- snap_create: 50
- snap_remove: 50
- rollback: 50
+++ /dev/null
-overrides:
- ceph:
- conf:
- client.2:
- debug ms: 1
- debug objecter: 20
- debug rados: 20
-tasks:
-- full_sequential:
- - radosbench:
- clients: [client.2]
- time: 90
- - radosbench:
- clients: [client.2]
- time: 90
- - radosbench:
- clients: [client.2]
- time: 90
- - radosbench:
- clients: [client.2]
- time: 90
- - radosbench:
- clients: [client.2]
- time: 90
- - radosbench:
- clients: [client.2]
- time: 90
- - radosbench:
- clients: [client.2]
- time: 90
- - radosbench:
- clients: [client.2]
- time: 90
+++ /dev/null
-meta:
-- desc: |
- rbd object class functional tests
-tasks:
-- exec:
- client.2:
- - ceph_test_cls_rbd --gtest_filter=-TestClsRbd.get_features:TestClsRbd.parents:TestClsRbd.mirror
+++ /dev/null
-tasks:
-- rados:
- clients: [client.2]
- ops: 4000
- objects: 50
- op_weights:
- read: 100
- write: 100
- delete: 50
- snap_create: 50
- snap_remove: 50
- rollback: 50
- copy_from: 50
+++ /dev/null
-meta:
-- desc: |
- librbd C and C++ api tests
-workload:
-- workunit:
- clients:
- client.2:
- - rbd/test_librbd.sh
+++ /dev/null
-../.qa
\ No newline at end of file
+++ /dev/null
-../workunits/0-distro
\ No newline at end of file
+++ /dev/null
-tasks:
-- install:
-- cephadm:
- conf:
- mgr:
- debug ms: 1
- debug mgr: 20
+++ /dev/null
-overrides:
- ceph:
- log-ignorelist:
- - but it is still running
- - objects unfound and apparently lost
- conf:
- osd:
- osd debug reject backfill probability: .3
- osd scrub min interval: 60
- osd scrub max interval: 120
- osd max backfills: 3
- osd snap trim sleep: 2
- osd delete sleep: 1
- mon:
- mon min osdmap epochs: 50
- paxos service trim min: 10
- # prune full osdmaps regularly
- mon osdmap full prune min: 15
- mon osdmap full prune interval: 2
- mon osdmap full prune txsize: 2
-tasks:
-- thrashosds:
- timeout: 1200
- chance_pgnum_grow: 1
- chance_pgnum_shrink: 1
- chance_pgpnum_fix: 1
+++ /dev/null
-../.qa/
\ No newline at end of file
+++ /dev/null
-../../../thrash/workloads/rados_api_tests.yaml
\ No newline at end of file
+++ /dev/null
-../../../thrash/workloads/radosbench.yaml
\ No newline at end of file
+++ /dev/null
-../../../thrash/workloads/small-objects.yaml
\ No newline at end of file
+++ /dev/null
-../../../thrash/workloads/snaps-few-objects.yaml
\ No newline at end of file
+++ /dev/null
-../smoke/fixed-2.yaml
\ No newline at end of file
+++ /dev/null
-.qa/msgr
\ No newline at end of file
+++ /dev/null
-overrides:
- cephadm:
- cephadm_mode: root
+++ /dev/null
-../.qa
\ No newline at end of file
+++ /dev/null
-os_type: centos
-os_version: "8.3"
-overrides:
- selinux:
- whitelist:
- - scontext=system_u:system_r:logrotate_t:s0
-
-tasks:
-- cephadm:
- image: quay.ceph.io/ceph-ci/ceph:octopus
- cephadm_branch: octopus
- cephadm_git_url: https://github.com/ceph/ceph
- # avoid --cap-add=PTRACE + --privileged for older cephadm versions
- allow_ptrace: false
- # deploy additional mons the "old" (octopus) way
- add_mons_via_daemon_add: true
-
-
-roles:
-- - mon.a
- - mon.c
- - mgr.y
- - osd.0
- - osd.1
- - osd.2
- - osd.3
- - client.0
-# - ceph.rgw.realm.zone.a # CLI change in v16 pacific
- - node-exporter.a
- - alertmanager.a
-- - mon.b
- - mgr.x
- - osd.4
- - osd.5
- - osd.6
- - osd.7
- - client.1
- - prometheus.a
- - grafana.a
- - node-exporter.b
- - ceph.iscsi.iscsi.a
+++ /dev/null
-os_type: ubuntu
-os_version: "20.04"
-
-tasks:
-- cephadm:
- image: docker.io/ceph/ceph:v15.2.9
- cephadm_branch: v15.2.9
- cephadm_git_url: https://github.com/ceph/ceph
- # avoid --cap-add=PTRACE + --privileged for older cephadm versions
- allow_ptrace: false
- # deploy additional mons the "old" (octopus) way
- add_mons_via_daemon_add: true
-
-roles:
-- - mon.a
- - mon.c
- - mgr.y
- - osd.0
- - osd.1
- - osd.2
- - osd.3
- - client.0
-# - ceph.rgw.realm.zone.a # CLI change in v16 pacific
- - node-exporter.a
- - alertmanager.a
-- - mon.b
- - mgr.x
- - osd.4
- - osd.5
- - osd.6
- - osd.7
- - client.1
- - prometheus.a
- - grafana.a
- - node-exporter.b
- - ceph.iscsi.iscsi.a
+++ /dev/null
-os_type: ubuntu
-os_version: "20.04"
-
-tasks:
-- cephadm:
- image: docker.io/ceph/ceph:v15.2.0
- cephadm_branch: v15.2.0
- cephadm_git_url: https://github.com/ceph/ceph
- # avoid --cap-add=PTRACE + --privileged for older cephadm versions
- allow_ptrace: false
- # deploy additional mons the "old" (octopus) way
- add_mons_via_daemon_add: true
-
-roles:
-- - mon.a
- - mon.c
- - mgr.y
- - osd.0
- - osd.1
- - osd.2
- - osd.3
- - client.0
-# - ceph.rgw.realm.zone.a # Disabled, needs 15.2.4 as an upgrade start
- - node-exporter.a
- - alertmanager.a
-- - mon.b
- - mgr.x
- - osd.4
- - osd.5
- - osd.6
- - osd.7
- - client.1
- - prometheus.a
- - grafana.a
- - node-exporter.b
-# - ceph.iscsi.iscsi.a # needs later start point
+++ /dev/null
-tasks:
-- cephadm.shell:
- mon.a:
- - ceph config set mgr mgr/cephadm/use_repo_digest false --force
+++ /dev/null
-tasks:
-- cephadm.shell:
- env: [sha1]
- mon.a:
- - radosgw-admin realm create --rgw-realm=r --default
- - radosgw-admin zonegroup create --rgw-zonegroup=default --master --default
- - radosgw-admin zone create --rgw-zonegroup=default --rgw-zone=z --master --default
- - radosgw-admin period update --rgw-realm=r --commit
- - ceph orch apply rgw r z --placement=2 --port=8000
- - sleep 120
- - ceph config set mon mon_warn_on_insecure_global_id_reclaim false --force
- - ceph config set mon mon_warn_on_insecure_global_id_reclaim_allowed false --force
- - ceph orch upgrade start --image quay.ceph.io/ceph-ci/ceph:$sha1
+++ /dev/null
-tasks:
-- cephadm.shell:
- env: [sha1]
- mon.a:
- - while ceph orch upgrade status | jq '.in_progress' | grep true ; do ceph orch ps ; ceph versions ; sleep 30 ; done
- - ceph orch ps
- - ceph versions
- - echo "wait for servicemap items w/ changing names to refresh"
- - sleep 60
- - ceph orch ps
- - ceph versions
- - ceph versions | jq -e '.overall | length == 1'
- - ceph versions | jq -e '.overall | keys' | grep $sha1
+++ /dev/null
-.qa/mon_election
\ No newline at end of file
+++ /dev/null
-../.qa/
\ No newline at end of file
+++ /dev/null
-../smoke/distro/
\ No newline at end of file
+++ /dev/null
-../smoke/fixed-2.yaml
\ No newline at end of file
+++ /dev/null
-../.qa/
\ No newline at end of file
+++ /dev/null
-overrides:
- cephadm:
- cephadm_mode: cephadm-package
- install:
- extra_packages: [cephadm]
+++ /dev/null
-overrides:
- cephadm:
- cephadm_mode: root
+++ /dev/null
-.qa/mon_election
\ No newline at end of file
+++ /dev/null
-.qa/msgr
\ No newline at end of file
+++ /dev/null
-tasks:
-- install:
-- cephadm:
- conf:
- mgr:
- debug ms: 1
- debug mgr: 20
+++ /dev/null
-../.qa/
\ No newline at end of file
+++ /dev/null
-../../../basic/tasks/rados_api_tests.yaml
\ No newline at end of file
+++ /dev/null
-../../../basic/tasks/rados_python.yaml
\ No newline at end of file
+++ /dev/null
-../.qa
\ No newline at end of file
+++ /dev/null
-../.qa
\ No newline at end of file
+++ /dev/null
-.qa/distros/podman/centos_8.2_kubic_stable.yaml
\ No newline at end of file
+++ /dev/null
-.qa/mon_election
\ No newline at end of file
+++ /dev/null
-roles:
-- [mon.a, mgr.x, osd.0, client.0]
-tasks:
-- install:
-- exec:
- mon.a:
- - yum install -y python3 || apt install -y python3
-- workunit:
- clients:
- client.0:
- - cephadm/test_adoption.sh
+++ /dev/null
-roles:
-- [mon.a, mgr.x, osd.0, client.0]
-tasks:
-- install:
-- exec:
- mon.a:
- - yum install -y python3 || apt install -y python3
-- workunit:
- clients:
- client.0:
- - cephadm/test_cephadm.sh
+++ /dev/null
-roles:
-- [mon.a, mgr.x, osd.0, client.0]
-tasks:
-- workunit:
- no_coverage_and_limits: true
- clients:
- client.0:
- - cephadm/test_repos.sh
+++ /dev/null
-roles:
-- - host.a
- - osd.0
- - osd.1
- - osd.2
- - mon.a
- - mgr.a
- - client.0
-tasks:
-- install:
-- cephadm:
-- cephadm.shell:
- host.a:
- - ceph orch apply mds a
-- cephfs_test_runner:
- modules:
- - tasks.cephfs.test_nfs
- - tasks.cephadm_cases.test_cli
--- /dev/null
+../orch/rook
\ No newline at end of file
+++ /dev/null
-.qa/mon_election
\ No newline at end of file
--- /dev/null
+../.qa
\ No newline at end of file
--- /dev/null
+overrides:
+ ceph:
+ conf:
+ osd:
+ osd max scrubs: 2
--- /dev/null
+overrides:
+ ceph:
+ conf:
+ osd:
+ osd max scrubs: 3
--- /dev/null
+overrides:
+ ceph:
+ conf:
+ global:
+ osd debug inject dispatch delay duration: 0.1
+ osd debug inject dispatch delay probability: 0.1
+
osd_class_default_list: "*"
# deploy additional mons the "old" (octopus) way
add_mons_via_daemon_add: true
+ avoid_pacific_features: true
- print: "**** done end installing octopus cephadm ..."
- cephadm.shell:
osd_class_default_list: "*"
# deploy additional mons the "old" (octopus) way
add_mons_via_daemon_add: true
+ avoid_pacific_features: true
- cephadm.shell:
mon.a:
--- /dev/null
+meta:
+- desc: |
+ Run ceph on two nodes, using one of them as a client,
+ with a separate client-only node.
+ Use xfs beneath the osds.
+ install ceph/pacific v16.2.2 and the v16.2.x point versions
+ run workload and upgrade-sequence in parallel
+ (every point release should be tested)
+ run workload and upgrade-sequence in parallel
+ install ceph/pacific latest version
+ run workload and upgrade-sequence in parallel
+ Overall upgrade path is - pacific-latest.point-1 => pacific-latest.point => pacific-latest
+overrides:
+ ceph:
+ log-ignorelist:
+ - reached quota
+ - scrub
+ - osd_map_max_advance
+ - wrongly marked
+ - FS_DEGRADED
+ - POOL_APP_NOT_ENABLED
+ - CACHE_POOL_NO_HIT_SET
+ - POOL_FULL
+ - SMALLER_PG
+ - pool\(s\) full
+ - OSD_DOWN
+ - missing hit_sets
+ - CACHE_POOL_NEAR_FULL
+ - PG_AVAILABILITY
+ - PG_DEGRADED
+ - application not enabled
+ - cache pools at or near target size
+ - filesystem is degraded
+ - OBJECT_MISPLACED
+ ### ref: https://tracker.ceph.com/issues/40251
+ #removed see ^ - failed to encode map
+
+ fs: xfs
+
+ conf:
+ global:
+ mon_warn_on_pool_no_app: false
+ mon:
+ mon debug unsafe allow tier with nonempty snaps: true
+ osd:
+ osd map max advance: 1000
+ osd_class_default_list: "*"
+ osd_class_load_list: "*"
+ client:
+ rgw_crypt_require_ssl: false
+ rgw crypt s3 kms backend: testing
+ rgw crypt s3 kms encryption keys: testkey-1=YmluCmJvb3N0CmJvb3N0LWJ1aWxkCmNlcGguY29uZgo= testkey-2=aWIKTWFrZWZpbGUKbWFuCm91dApzcmMKVGVzdGluZwo=
+roles:
+- - mon.a
+ - mds.a
+ - osd.0
+ - osd.1
+ - osd.2
+ - mgr.x
+- - mon.b
+ - mon.c
+ - osd.3
+ - osd.4
+ - osd.5
+ - client.0
+- - client.1
+openstack:
+- volumes: # attached to each instance
+ count: 3
+ size: 30 # GB
+tasks:
+- print: "**** done pacific v16.2.0 about to install"
+- install:
+ tag: v16.2.2
+ # line below can be removed its from jewel test
+ #exclude_packages: ['ceph-mgr','libcephfs2','libcephfs-devel','libcephfs-dev', 'librgw2']
+- print: "**** done v16.2.2 install"
+- ceph:
+ fs: xfs
+ add_osds_to_crush: true
+- print: "**** done ceph xfs"
+- sequential:
+ - workload
+- print: "**** done workload v16.2.2"
+
+
+####### upgrade to v16.2.3
+- install.upgrade:
+ #exclude_packages: ['ceph-mgr','libcephfs2','libcephfs-devel','libcephfs-dev']
+ mon.a:
+ tag: v16.2.3
+ mon.b:
+ tag: v16.2.3
+- parallel:
+ - workload_pacific
+ - upgrade-sequence_pacific
+- print: "**** done parallel pacific v16.2.3"
+
+#### upgrade to latest pacific
+- install.upgrade:
+ mon.a:
+ mon.b:
+- parallel:
+ - workload_pacific
+ - upgrade-sequence_pacific
+- print: "**** done parallel pacific branch"
+
+#######################
+workload:
+ sequential:
+ - workunit:
+ clients:
+ client.0:
+ - suites/blogbench.sh
+workload_pacific:
+ full_sequential:
+ - workunit:
+ branch: pacific
+ #tag: v16.2.1
+ clients:
+ client.1:
+ - rados/test.sh
+ - cls
+ env:
+ CLS_RBD_GTEST_FILTER: '*:-TestClsRbd.snapshots_namespaces'
+ - print: "**** done rados/test.sh & cls workload_pacific"
+ - sequential:
+ - rgw: [client.0]
+ - print: "**** done rgw workload_pacific"
+ - s3tests:
+ client.0:
+ force-branch: ceph-pacific
+ rgw_server: client.0
+ scan_for_encryption_keys: false
+ - print: "**** done s3tests workload_pacific"
+ - rbd_fsx:
+ clients: [client.0]
+ size: 134217728
+ - print: "**** done rbd_fsx workload_pacific"
+
+upgrade-sequence_pacific:
+ sequential:
+ - print: "**** done branch: pacific install.upgrade"
+ - ceph.restart: [mds.a]
+ - sleep:
+ duration: 60
+ - ceph.restart: [osd.0]
+ - sleep:
+ duration: 30
+ - ceph.restart: [osd.1]
+ - sleep:
+ duration: 30
+ - ceph.restart: [osd.2]
+ - sleep:
+ duration: 30
+ - ceph.restart: [osd.3]
+ - sleep:
+ duration: 30
+ - ceph.restart: [osd.4]
+ - sleep:
+ duration: 30
+ - ceph.restart: [osd.5]
+ - sleep:
+ duration: 60
+ - ceph.restart: [mgr.x]
+ - sleep:
+ duration: 60
+ - ceph.restart: [mon.a]
+ - sleep:
+ duration: 60
+ - ceph.restart: [mon.b]
+ - sleep:
+ duration: 60
+ - ceph.restart: [mon.c]
+ - sleep:
+ duration: 60
+ - print: "**** done ceph.restart all pacific branch mds/osd/mon"
--- /dev/null
+os_type: ubuntu
+os_version: "20.04"
--- /dev/null
+openstack:
+ - machine:
+ disk: 100 # GB
+ - volumes: # attached to each instance
+ count: 4
+ size: 30 # GB
--- /dev/null
+meta:
+- desc: |
+ Run ceph on two nodes,
+ with a separate client-only node.
+ Use xfs beneath the osds.
+overrides:
+ ceph:
+ fs: xfs
+ log-ignorelist:
+ - overall HEALTH_
+ - \(MON_DOWN\)
+ - \(MGR_DOWN\)
+ ### ref: https://tracker.ceph.com/issues/40251
+ #removed see ^ - failed to encode map
+ conf:
+ global:
+ enable experimental unrecoverable data corrupting features: "*"
+ mon:
+ mon warn on osd down out interval zero: false
+roles:
+- - mon.a
+ - mon.b
+ - mon.c
+ - mgr.x
+ - osd.0
+ - osd.1
+ - osd.2
+ - osd.3
+- - osd.4
+ - osd.5
+ - osd.6
+ - osd.7
+- - client.0
--- /dev/null
+meta:
+- desc: |
+ install ceph/pacific v16.2.3
+ Overall upgrade path is - pacific-latest.point => pacific-latest
+tasks:
+- install:
+ tag: v16.2.3
+ exclude_packages: ['librados3']
+ extra_packages: ['librados2']
+- print: "**** done install pacific v16.2.3"
+- ceph:
+- exec:
+ osd.0:
+ - ceph osd require-osd-release pacific
+ - ceph osd set-require-min-compat-client pacific
+- print: "**** done ceph"
+overrides:
+ ceph:
+ conf:
+ mon:
+ mon warn on osd down out interval zero: false
--- /dev/null
+overrides:
+ ceph:
+ conf:
+ global:
+ osd_min_pg_log_entries: 1
+ osd_max_pg_log_entries: 2
--- /dev/null
+meta:
+- desc: |
+ install upgrade ceph/-x on one node only
+ 1st half
+ restart : osd.0,1,2,3
+tasks:
+- install.upgrade:
+ osd.0:
+- print: "**** done install.upgrade osd.0"
+- ceph.restart:
+ daemons: [mon.a,mon.b,mon.c,mgr.x,osd.0,osd.1,osd.2,osd.3]
+ mon-health-to-clog: false
+- print: "**** done ceph.restart 1st half"
--- /dev/null
+meta:
+- desc: |
+ randomly kill and revive osd
+ small chance to increase the number of pgs
+overrides:
+ ceph:
+ log-ignorelist:
+ - but it is still running
+ - wrongly marked me down
+ - objects unfound and apparently lost
+ - log bound mismatch
+ ### ref: https://tracker.ceph.com/issues/40251
+ - failed to encode map
+tasks:
+- parallel:
+ - stress-tasks
+stress-tasks:
+- thrashosds:
+ timeout: 1200
+ chance_pgnum_grow: 1
+ chance_pgpnum_fix: 1
+ chance_thrash_cluster_full: 0
+ chance_thrash_pg_upmap: 0
+ chance_thrash_pg_upmap_items: 0
+ disable_objectstore_tool_tests: true
+ chance_force_recovery: 0
+- print: "**** done thrashosds 3-thrash"
--- /dev/null
+meta:
+- desc: |
+ run basic fsx tests for rbd
+stress-tasks:
+- rbd_fsx:
+ clients: [client.0]
+ size: 134217728
+- print: "**** done rbd_fsx 4-workload"
--- /dev/null
+meta:
+- desc: |
+ run randomized correctness test for rados operations
+ generate write load with rados bench
+stress-tasks:
+- full_sequential:
+ - radosbench:
+ clients: [client.0]
+ time: 90
+ - radosbench:
+ clients: [client.0]
+ time: 90
+ - radosbench:
+ clients: [client.0]
+ time: 90
+ - radosbench:
+ clients: [client.0]
+ time: 90
+ - radosbench:
+ clients: [client.0]
+ time: 90
+ - radosbench:
+ clients: [client.0]
+ time: 90
+ - radosbench:
+ clients: [client.0]
+ time: 90
+ - radosbench:
+ clients: [client.0]
+ time: 90
+ - radosbench:
+ clients: [client.0]
+ time: 90
+ - radosbench:
+ clients: [client.0]
+ time: 90
+ - radosbench:
+ clients: [client.0]
+ time: 90
+ - radosbench:
+ clients: [client.0]
+ time: 90
+ - radosbench:
+ clients: [client.0]
+ time: 90
+ - radosbench:
+ clients: [client.0]
+ time: 90
+ - radosbench:
+ clients: [client.0]
+ time: 90
+- print: "**** done radosbench 4-workload"
--- /dev/null
+meta:
+- desc: |
+ run basic cls tests for rbd
+stress-tasks:
+- workunit:
+ branch: pacific
+ clients:
+ client.0:
+ - cls/test_cls_rbd.sh
+- print: "**** done cls/test_cls_rbd.sh 4-workload"
--- /dev/null
+meta:
+- desc: |
+ run basic import/export cli tests for rbd
+stress-tasks:
+- workunit:
+ branch: pacific
+ clients:
+ client.0:
+ - rbd/import_export.sh
+ env:
+ RBD_CREATE_ARGS: --new-format
+- print: "**** done rbd/import_export.sh 4-workload"
--- /dev/null
+meta:
+- desc: |
+ librbd C and C++ api tests
+stress-tasks:
+- workunit:
+ branch: octopus
+ clients:
+ client.0:
+ - rbd/test_librbd.sh
+- print: "**** done rbd/test_librbd.sh 4-workload"
--- /dev/null
+meta:
+- desc: |
+ randomized correctness test for rados operations on a replicated pool,
+ using only reads, writes, and deletes
+stress-tasks:
+- full_sequential:
+ - rados:
+ clients: [client.0]
+ ops: 4000
+ objects: 500
+ write_append_excl: false
+ op_weights:
+ read: 45
+ write: 45
+ delete: 10
+- print: "**** done rados/readwrite 4-workload"
--- /dev/null
+meta:
+- desc: |
+ randomized correctness test for rados operations on a replicated pool with snapshot operations
+stress-tasks:
+- full_sequential:
+ - rados:
+ clients: [client.0]
+ ops: 4000
+ objects: 50
+ write_append_excl: false
+ op_weights:
+ read: 100
+ write: 100
+ delete: 50
+ snap_create: 50
+ snap_remove: 50
+ rollback: 50
+- print: "**** done rados/snaps-few-objects 4-workload"
--- /dev/null
+tasks:
+- install.upgrade:
+ osd.4:
+ client.0:
+- ceph.restart:
+ daemons: [osd.4, osd.5, osd.6, osd.7]
+ wait-for-healthy: false
+ wait-for-osds-up: true
--- /dev/null
+meta:
+- desc: |
+ librbd python api tests
+tasks:
+- workunit:
+ tag: v16.2.0
+ clients:
+ client.0:
+ - rbd/test_librbd_python.sh
+- print: "**** done rbd/test_librbd_python.sh 7-workload"
--- /dev/null
+meta:
+- desc: |
+ randomized correctness test for rados operations on a replicated pool with snapshot operations
+tasks:
+- rados:
+ clients: [client.0]
+ ops: 4000
+ objects: 500
+ write_append_excl: false
+ op_weights:
+ read: 100
+ write: 100
+ delete: 50
+ snap_create: 50
+ snap_remove: 50
+ rollback: 50
--- /dev/null
+overrides:
+ thrashosds:
+ bdev_inject_crash: 2
+ bdev_inject_crash_probability: .5
+ ceph:
+ fs: xfs
+ conf:
+ osd:
+ osd objectstore: bluestore
+ bluestore block size: 96636764160
+ debug bluestore: 20
+ debug bluefs: 20
+ debug rocksdb: 10
+ bluestore fsck on mount: true
+ bluestore allocator: bitmap
+ # lower the full ratios since we can fill up a 100gb osd so quickly
+ mon osd full ratio: .9
+ mon osd backfillfull_ratio: .85
+ mon osd nearfull ratio: .8
+ osd failsafe full ratio: .95
+# this doesn't work with failures bc the log writes are not atomic across the two backends
+# bluestore bluefs env mirror: true
+ bdev enable discard: true
+ bdev async discard: true
+ ceph-deploy:
+ fs: xfs
+ bluestore: yes
+ conf:
+ osd:
+ osd objectstore: bluestore
+ bluestore block size: 96636764160
+ debug bluestore: 20
+ debug bluefs: 20
+ debug rocksdb: 10
+ bluestore fsck on mount: true
+ # lower the full ratios since we can fill up a 100gb osd so quickly
+ mon osd full ratio: .9
+ mon osd backfillfull_ratio: .85
+ mon osd nearfull ratio: .8
+ osd failsafe full ratio: .95
+ bdev enable discard: true
+ bdev async discard: true
+
--- /dev/null
+overrides:
+ thrashosds:
+ bdev_inject_crash: 2
+ bdev_inject_crash_probability: .5
+ ceph:
+ fs: xfs
+ conf:
+ osd:
+ osd objectstore: bluestore
+ bluestore block size: 96636764160
+ debug bluestore: 20
+ debug bluefs: 20
+ debug rocksdb: 10
+ bluestore compression mode: aggressive
+ bluestore fsck on mount: true
+ # lower the full ratios since we can fill up a 100gb osd so quickly
+ mon osd full ratio: .9
+ mon osd backfillfull_ratio: .85
+ mon osd nearfull ratio: .8
+ osd failsafe full ratio: .95
+
+# this doesn't work with failures bc the log writes are not atomic across the two backends
+# bluestore bluefs env mirror: true
--- /dev/null
+overrides:
+ thrashosds:
+ bdev_inject_crash: 2
+ bdev_inject_crash_probability: .5
+ ceph:
+ fs: xfs
+ conf:
+ osd:
+ osd objectstore: bluestore
+ bluestore block size: 96636764160
+ debug bluestore: 20
+ debug bluefs: 20
+ debug rocksdb: 10
+ bluestore fsck on mount: true
+ bluestore allocator: stupid
+ # lower the full ratios since we can fill up a 100gb osd so quickly
+ mon osd full ratio: .9
+ mon osd backfillfull_ratio: .85
+ mon osd nearfull ratio: .8
+ osd failsafe full ratio: .95
+# this doesn't work with failures bc the log writes are not atomic across the two backends
+# bluestore bluefs env mirror: true
+ bdev enable discard: true
+ bdev async discard: true
+ ceph-deploy:
+ fs: xfs
+ bluestore: yes
+ conf:
+ osd:
+ osd objectstore: bluestore
+ bluestore block size: 96636764160
+ debug bluestore: 20
+ debug bluefs: 20
+ debug rocksdb: 10
+ bluestore fsck on mount: true
+ # lower the full ratios since we can fill up a 100gb osd so quickly
+ mon osd full ratio: .9
+ mon osd backfillfull_ratio: .85
+ mon osd nearfull ratio: .8
+ osd failsafe full ratio: .95
+ bdev enable discard: true
+ bdev async discard: true
+
--- /dev/null
+overrides:
+ ceph:
+ fs: xfs
+ conf:
+ osd:
+ osd objectstore: filestore
+ osd sloppy crc: true
+ ceph-deploy:
+ fs: xfs
+ filestore: True
+ conf:
+ osd:
+ osd objectstore: filestore
+ osd sloppy crc: true
+
--- /dev/null
+os_type: ubuntu
+os_version: "20.04"
--- /dev/null
+overrides:
+ ceph:
+ log-ignorelist:
+ - overall HEALTH_
+ - \(OSDMAP_FLAGS\)
+ - \(OSD_
+ - \(PG_
+ - \(POOL_
+ - \(CACHE_POOL_
+ - \(SMALLER_PGP_NUM\)
+ - \(OBJECT_
+ - \(SLOW_OPS\)
+ - \(REQUEST_SLOW\)
+ - \(TOO_FEW_PGS\)
+ - slow request
if client_config is None:
client_config = {}
# top level overrides
- for k, v in top_overrides.items():
- if v is not None:
- client_config[k] = v
+ misc.deep_merge(client_config, top_overrides)
# mount specific overrides
client_config_overrides = overrides.get(entity)
misc.deep_merge(client_config, client_config_overrides)
**kwargs
)
+# this is for rook clusters
+def toolbox(ctx, cluster_name, args, **kwargs):
+ return ctx.rook[cluster_name].remote.run(
+ args=[
+ 'kubectl',
+ '-n', 'rook-ceph',
+ 'exec',
+ ctx.rook[cluster_name].toolbox,
+ '--',
+ ] + args,
+ **kwargs
+ )
+
+
def write_conf(ctx, conf_path=DEFAULT_CONF_PATH, cluster='ceph'):
conf_fp = BytesIO()
ctx.ceph[cluster].conf.write(conf_fp)
self.logger.info(msg, *args, **kwargs)
def cmd_exists_on_osds(self, cmd):
- if self.ceph_manager.cephadm:
+ if self.ceph_manager.cephadm or self.ceph_manager.rook:
return True
allremotes = self.ceph_manager.ctx.cluster.only(\
teuthology.is_type('osd', self.cluster)).remotes.keys()
wait=True, check_status=False,
stdout=StringIO(),
stderr=StringIO())
+ elif self.ceph_manager.rook:
+ assert False, 'not implemented'
else:
return remote.run(
args=['sudo', 'adjust-ulimits', 'ceph-objectstore-tool'] + cmd,
wait=True, check_status=False,
stdout=StringIO(),
stderr=StringIO())
+ elif self.ceph_manager.rook:
+ assert False, 'not implemented'
else:
return remote.run(
args=['sudo', 'ceph-bluestore-tool', '--err-to-stderr'] + cmd,
'--log-file=/var/log/ceph/objectstore_tool.$pid.log',
]
+ if self.ceph_manager.rook:
+ assert False, 'not implemented'
+
if not self.ceph_manager.cephadm:
# ceph-objectstore-tool might be temporarily absent during an
# upgrade - see http://tracker.ceph.com/issues/18014
"""
def __init__(self, controller, ctx=None, config=None, logger=None,
- cluster='ceph', cephadm=False) -> None:
+ cluster='ceph', cephadm=False, rook=False) -> None:
self.lock = threading.RLock()
self.ctx = ctx
self.config = config
self.next_pool_id = 0
self.cluster = cluster
self.cephadm = cephadm
+ self.rook = rook
if (logger):
self.log = lambda x: logger.info(x)
else:
args=['ceph'] + list(kwargs['args']),
stdout=StringIO(),
check_status=kwargs.get('check_status', True))
+ if self.rook:
+ return toolbox(self.ctx, self.cluster,
+ args=['ceph'] + list(kwargs['args']),
+ stdout=StringIO(),
+ check_status=kwargs.get('check_status', True))
testdir = teuthology.get_testdir(self.ctx)
prefix = ['sudo', 'adjust-ulimits', 'ceph-coverage',
wait=True,
check_status=check_status,
)
+ if self.rook:
+ assert False, 'not implemented'
testdir = teuthology.get_testdir(self.ctx)
args = [
osd map max advance = 10
+osd memory target autotune = true
+
# debugging
osd debug shutdown = true
osd debug op order = true
**kwargs
)
+
def build_initial_config(ctx, config):
cluster_name = config['cluster']
return conf
+
def update_archive_setting(ctx, key, value):
"""
Add logs directory to job's info log file
"""
+ if ctx.archive is None:
+ return
with open(os.path.join(ctx.archive, 'info.yaml'), 'r+') as info_file:
info_yaml = yaml.safe_load(info_file)
info_file.seek(0)
info_yaml['archive'] = {key: value}
yaml.safe_dump(info_yaml, info_file, default_flow_style=False)
+
@contextlib.contextmanager
def normalize_hostnames(ctx):
"""
finally:
pass
+
@contextlib.contextmanager
def download_cephadm(ctx, config, ref):
cluster_name = config['cluster']
ref = config.get('cephadm_branch', ref)
git_url = config.get('cephadm_git_url', teuth_config.get_ceph_git_url())
log.info('Downloading cephadm (repo %s ref %s)...' % (git_url, ref))
- if git_url.startswith('https://github.com/'):
+ if ctx.config.get('redhat'):
+ log.info("Install cephadm using RPM")
+ # cephadm already installed from redhat.install task
+ ctx.cluster.run(
+ args=[
+ 'cp',
+ run.Raw('$(which cephadm)'),
+ ctx.cephadm,
+ run.Raw('&&'),
+ 'ls', '-l',
+ ctx.cephadm,
+ ]
+ )
+ elif git_url.startswith('https://github.com/'):
# git archive doesn't like https:// URLs, which we use with github.
rest = git_url.split('https://github.com/', 1)[1]
rest = re.sub(r'\.git/?$', '', rest).strip() # no .git suffix
],
)
+
@contextlib.contextmanager
def ceph_log(ctx, config):
cluster_name = config['cluster']
except ReadError:
pass
+
@contextlib.contextmanager
def ceph_crash(ctx, config):
"""
except ReadError:
pass
+
@contextlib.contextmanager
def ceph_bootstrap(ctx, config):
"""
'/etc/ceph/{}.client.admin.keyring'.format(cluster_name),
'--output-pub-ssh-key', '{}/{}.pub'.format(testdir, cluster_name),
]
+
+ if config.get('registry-login'):
+ registry = config['registry-login']
+ cmd += [
+ "--registry-url", registry['url'],
+ "--registry-username", registry['username'],
+ "--registry-password", registry['password'],
+ ]
+
if not ctx.ceph[cluster_name].roleless:
cmd += [
'--mon-id', first_mon,
'--orphan-initial-daemons', # we will do it explicitly!
'--skip-monitoring-stack', # we'll provision these explicitly
]
+
if mons[first_mon_role].startswith('['):
cmd += ['--mon-addrv', mons[first_mon_role]]
else:
cmd += ['--skip-dashboard']
if config.get('skip_monitoring_stack'):
cmd += ['--skip-monitoring-stack']
+ if config.get('single_host_defaults'):
+ cmd += ['--single-host-defaults']
+ if not config.get('avoid_pacific_features', False):
+ cmd += ['--skip-admin-label']
# bootstrap makes the keyring root 0600, so +r it for our purposes
cmd += [
run.Raw('&&'),
_shell(ctx, cluster_name, bootstrap_remote,
['ceph', 'config', 'set', 'mgr', 'mgr/cephadm/allow_ptrace', 'true'])
+ if not config.get('avoid_pacific_features', False):
+ log.info('Distributing conf and client.admin keyring to all hosts + 0755')
+ _shell(ctx, cluster_name, bootstrap_remote,
+ ['ceph', 'orch', 'client-keyring', 'set', 'client.admin',
+ '*', '--mode', '0755'],
+ check_status=False)
+
# add other hosts
for remote in ctx.cluster.remotes.keys():
if remote == bootstrap_remote:
continue
+
+ # note: this may be redundant (see above), but it avoids
+ # us having to wait for cephadm to do it.
log.info('Writing (initial) conf and keyring to %s' % remote.shortname)
remote.write_file(
path='/etc/ceph/{}.conf'.format(cluster_name),
'/etc/ceph/{}.client.admin.keyring'.format(cluster_name),
])
+
@contextlib.contextmanager
def ceph_mons(ctx, config):
"""
finally:
pass
+
@contextlib.contextmanager
def ceph_mgrs(ctx, config):
"""
finally:
pass
+
@contextlib.contextmanager
def ceph_osds(ctx, config):
"""
finally:
pass
+
@contextlib.contextmanager
def ceph_mdss(ctx, config):
"""
yield
+
@contextlib.contextmanager
def ceph_monitoring(daemon_type, ctx, config):
"""
yield
+
@contextlib.contextmanager
def ceph_rgw(ctx, config):
"""
yield
+
@contextlib.contextmanager
def ceph_clients(ctx, config):
cluster_name = config['cluster']
remote.sudo_write_file(client_keyring, keyring, mode='0644')
yield
+
@contextlib.contextmanager
def ceph_initial():
try:
finally:
log.info('Teardown complete')
+
## public methods
@contextlib.contextmanager
def stop(ctx, config):
yield
+
def shell(ctx, config):
"""
Execute (shell) commands
"""
cluster_name = config.get('cluster', 'ceph')
- env = []
- if 'env' in config:
- for k in config['env']:
- env.extend(['-e', k + '=' + ctx.config.get(k, '')])
- del config['env']
+ args = []
+ for k in config.pop('env', []):
+ args.extend(['-e', k + '=' + ctx.config.get(k, '')])
+ for k in config.pop('volumes', []):
+ args.extend(['-v', k])
if 'all-roles' in config and len(config) == 1:
a = config['all-roles']
for c in cmd:
_shell(ctx, cluster_name, remote,
['bash', '-c', subst_vip(ctx, c)],
- extra_cephadm_args=env)
+ extra_cephadm_args=args)
else:
assert isinstance(cmd, str)
_shell(ctx, cluster_name, remote,
['bash', '-ex', '-c', subst_vip(ctx, cmd)],
- extra_cephadm_args=env)
+ extra_cephadm_args=args)
def apply(ctx, config):
for option, value in saved_options.items():
manager.inject_args(type_, id_, option, value)
+
@contextlib.contextmanager
def restart(ctx, config):
"""
ctx.managers[cluster].wait_for_all_osds_up()
yield
+
@contextlib.contextmanager
def distribute_config_and_admin_keyring(ctx, config):
"""
'/etc/ceph/{}.client.admin.keyring'.format(cluster_name),
])
+
@contextlib.contextmanager
def crush_setup(ctx, config):
cluster_name = config['cluster']
args=['ceph', 'osd', 'crush', 'tunables', profile])
yield
+
@contextlib.contextmanager
def create_rbd_pool(ctx, config):
if config.get('create_rbd_pool', False):
])
yield
+
@contextlib.contextmanager
def _bypass():
yield
+
@contextlib.contextmanager
def initialize_config(ctx, config):
cluster_name = config['cluster']
ctx.ceph[cluster_name].first_mgr = first_mgr
yield
+
@contextlib.contextmanager
def task(ctx, config):
"""
cephadm:
containers:
image: 'quay.io/ceph-ci/ceph'
+ registry-login:
+ url: registry-url
+ username: registry-user
+ password: registry-password
:param ctx: the argparse.Namespace object
:param config: the config dict
# set up cluster context
if not hasattr(ctx, 'ceph'):
ctx.ceph = {}
- ctx.managers = {}
if 'cluster' not in config:
config['cluster'] = 'ceph'
cluster_name = config['cluster']
containers = config.get('containers', {})
container_image_name = containers.get('image', container_image_name)
-
if not hasattr(ctx.ceph[cluster_name], 'image'):
ctx.ceph[cluster_name].image = config.get('image')
ref = None
lambda: ceph_clients(ctx=ctx, config=config),
lambda: create_rbd_pool(ctx=ctx, config=config),
):
+ if not hasattr(ctx, 'managers'):
+ ctx.managers = {}
ctx.managers[cluster_name] = CephManager(
ctx.ceph[cluster_name].bootstrap_remote,
ctx=ctx,
self._orch_cmd('daemon', 'stop', 'osd.0')
self.wait_for_health('OSD_DOWN', 30)
self._orch_cmd('daemon', 'start', 'osd.0')
- self.wait_for_health_clear(30)
+ self.wait_for_health_clear(90)
self._orch_cmd('daemon', 'restart', 'osd.0')
def test_device_ls_wide(self):
# run scrub to update and make sure rstat.rbytes info in subdir inode and dirfrag
# are matched
- out_json = self.fs.run_scrub(["start", "/subdir", "repair", "recursive"])
+ out_json = self.fs.run_scrub(["start", "/subdir", "repair,recursive"])
self.assertNotEqual(out_json, None)
self.assertEqual(out_json["return_code"], 0)
self.assertEqual(self.fs.wait_until_scrub_complete(tag=out_json["scrub_tag"]), True)
pg_count = self.fs.pgs_per_fs_pool
for pg_n in range(0, pg_count):
- pg_str = "{0}.{1}".format(self.fs.get_data_pool_id(), pg_n)
+ pg_str = "{0}.{1:x}".format(self.fs.get_data_pool_id(), pg_n)
out = self.fs.data_scan(["pg_files", "mydir", pg_str])
lines = [l for l in out.split("\n") if l]
log.info("{0}: {1}".format(pg_str, lines))
def _setup_tree(self, path="tree", export=-1, distributed=False, random=0.0, count=100, wait=True):
return self.mount_a.run_shell_payload(f"""
-set -e
+set -ex
mkdir -p {path}
{f"setfattr -n ceph.dir.pin -v {export} {path}" if export >= 0 else ""}
{f"setfattr -n ceph.dir.pin.distributed -v 1 {path}" if distributed else ""}
That ephemerally pinned subtrees are somewhat evenly distributed.
"""
- self.fs.set_max_mds(3)
+ max_mds = 3
+ frags = 128
+
+ self.fs.set_max_mds(max_mds)
self.status = self.fs.wait_for_daemons()
- self.config_set('mds', 'mds_export_ephemeral_distributed_factor', 63.0 / 3)
+ self.config_set('mds', 'mds_export_ephemeral_distributed_factor', (frags-1) / max_mds)
self._setup_tree(count=1000, distributed=True)
- subtrees = self._wait_distributed_subtrees(64, status=self.status, rank="all")
+ subtrees = self._wait_distributed_subtrees(frags, status=self.status, rank="all")
nsubtrees = len(subtrees)
# Check if distribution is uniform
rank0 = list(filter(lambda x: x['auth_first'] == 0, subtrees))
rank1 = list(filter(lambda x: x['auth_first'] == 1, subtrees))
rank2 = list(filter(lambda x: x['auth_first'] == 2, subtrees))
- self.assertGreaterEqual(len(rank0)/nsubtrees, 0.2)
- self.assertGreaterEqual(len(rank1)/nsubtrees, 0.2)
- self.assertGreaterEqual(len(rank2)/nsubtrees, 0.2)
+ self.assertGreaterEqual(len(rank0)/nsubtrees, 0.15)
+ self.assertGreaterEqual(len(rank1)/nsubtrees, 0.15)
+ self.assertGreaterEqual(len(rank2)/nsubtrees, 0.15)
def test_ephemeral_random(self):
self.mount_a.umount_wait()
with self.assert_cluster_log("inode table repaired", invert_match=True):
- out_json = self.fs.run_scrub(["start", "/", "repair", "recursive"])
+ out_json = self.fs.run_scrub(["start", "/", "repair,recursive"])
self.assertNotEqual(out_json, None)
self.assertEqual(out_json["return_code"], 0)
self.assertEqual(self.fs.wait_until_scrub_complete(tag=out_json["scrub_tag"]), True)
self.fs.wait_for_daemons()
with self.assert_cluster_log("inode table repaired"):
- out_json = self.fs.run_scrub(["start", "/", "repair", "recursive"])
+ out_json = self.fs.run_scrub(["start", "/", "repair,recursive"])
self.assertNotEqual(out_json, None)
self.assertEqual(out_json["return_code"], 0)
self.assertEqual(self.fs.wait_until_scrub_complete(tag=out_json["scrub_tag"]), True)
"oh i'm sorry did i overwrite your xattr?")
with self.assert_cluster_log("bad backtrace on inode"):
- out_json = self.fs.run_scrub(["start", "/", "repair", "recursive"])
+ out_json = self.fs.run_scrub(["start", "/", "repair,recursive"])
self.assertNotEqual(out_json, None)
self.assertEqual(out_json["return_code"], 0)
self.assertEqual(self.fs.wait_until_scrub_complete(tag=out_json["scrub_tag"]), True)
import json
import errno
import logging
+import random
import time
from io import StringIO
+from collections import deque
from tasks.cephfs.cephfs_test_case import CephFSTestCase
from teuthology.exceptions import CommandFailedError
self.primary_fs_name = self.fs.name
self.primary_fs_id = self.fs.id
self.secondary_fs_name = self.backup_fs.name
+ self.secondary_fs_id = self.backup_fs.id
self.enable_mirroring_module()
def tearDown(self):
log.debug(f'command returned={res}')
return json.loads(res)
- def get_mirror_daemon_id(self):
- ceph_status = json.loads(self.fs.mon_manager.raw_cluster_cmd("status", "--format=json"))
- log.debug(f'ceph_status: {ceph_status}')
- daemon_id = None
- for k in ceph_status['servicemap']['services']['cephfs-mirror']['daemons']:
- try:
- daemon_id = int(k)
- break #nit, only a single mirror daemon is expected -- bail out.
- except ValueError:
- pass
-
- log.debug(f'daemon_id: {daemon_id}')
- self.assertTrue(daemon_id is not None)
- return daemon_id
-
- def get_mirror_daemon_status(self, daemon_id, fs_name, fs_id):
+ def get_mirror_daemon_status(self, fs_name, fs_id):
daemon_status = json.loads(self.mgr_cluster.mon_manager.raw_cluster_cmd("fs", "snapshot", "mirror", "daemon", "status", fs_name))
log.debug(f'daemon_status: {daemon_status}')
- status = daemon_status[str(daemon_id)][str(fs_id)]
+ # running a single mirror daemon is supported
+ status = daemon_status[0]
log.debug(f'status: {status}')
return status
def test_cephfs_mirror_service_daemon_status(self):
self.enable_mirroring(self.primary_fs_name, self.primary_fs_id)
self.peer_add(self.primary_fs_name, self.primary_fs_id, "client.mirror_remote@ceph", self.secondary_fs_name)
- peer_uuid = self.get_peer_uuid("client.mirror_remote@ceph")
-
- daemon_id = self.get_mirror_daemon_id()
time.sleep(30)
- status = self.get_mirror_daemon_status(daemon_id, self.primary_fs_name, self.primary_fs_id)
+ status = self.get_mirror_daemon_status(self.primary_fs_name, self.primary_fs_id)
- # we have not added any directories
- self.assertEquals(status['directory_count'], 0)
+ # assumption for this test: mirroring enabled for a single filesystem w/ single
+ # peer
- peer_stats = status['peers'][peer_uuid]['stats']
- self.assertEquals(peer_stats['failure_count'], 0)
- self.assertEquals(peer_stats['recovery_count'], 0)
+ # we have not added any directories
+ peer = status['filesystems'][0]['peers'][0]
+ self.assertEquals(status['filesystems'][0]['directory_count'], 0)
+ self.assertEquals(peer['stats']['failure_count'], 0)
+ self.assertEquals(peer['stats']['recovery_count'], 0)
# add a non-existent directory for synchronization -- check if its reported
# in daemon stats
self.add_directory(self.primary_fs_name, self.primary_fs_id, '/d0')
time.sleep(120)
- status = self.get_mirror_daemon_status(daemon_id, self.primary_fs_name, self.primary_fs_id)
+ status = self.get_mirror_daemon_status(self.primary_fs_name, self.primary_fs_id)
# we added one
- self.assertEquals(status['directory_count'], 1)
- peer_stats = status['peers'][peer_uuid]['stats']
+ peer = status['filesystems'][0]['peers'][0]
+ self.assertEquals(status['filesystems'][0]['directory_count'], 1)
# failure count should be reflected
- self.assertEquals(peer_stats['failure_count'], 1)
- self.assertEquals(peer_stats['recovery_count'], 0)
+ self.assertEquals(peer['stats']['failure_count'], 1)
+ self.assertEquals(peer['stats']['recovery_count'], 0)
# create the directory, mirror daemon would recover
self.mount_a.run_shell(["mkdir", "d0"])
time.sleep(120)
- status = self.get_mirror_daemon_status(daemon_id, self.primary_fs_name, self.primary_fs_id)
- self.assertEquals(status['directory_count'], 1)
- peer_stats = status['peers'][peer_uuid]['stats']
+ status = self.get_mirror_daemon_status(self.primary_fs_name, self.primary_fs_id)
+ peer = status['filesystems'][0]['peers'][0]
+ self.assertEquals(status['filesystems'][0]['directory_count'], 1)
# failure and recovery count should be reflected
- self.assertEquals(peer_stats['failure_count'], 1)
- self.assertEquals(peer_stats['recovery_count'], 1)
+ self.assertEquals(peer['stats']['failure_count'], 1)
+ self.assertEquals(peer['stats']['recovery_count'], 1)
self.disable_mirroring(self.primary_fs_name, self.primary_fs_id)
def test_mirroring_init_failure(self):
"""Test mirror daemon init failure"""
+ # disable mgr mirroring plugin as it would try to load dir map on
+ # on mirroring enabled for a filesystem (an throw up erorrs in
+ # the logs)
+ self.disable_mirroring_module()
+
# enable mirroring through mon interface -- this should result in the mirror daemon
# failing to enable mirroring due to absence of `cephfs_mirorr` index object.
self.mgr_cluster.mon_manager.raw_cluster_cmd("fs", "mirror", "enable", self.primary_fs_name)
self.remove_directory(self.primary_fs_name, self.primary_fs_id, '/d0')
self.disable_mirroring(self.primary_fs_name, self.primary_fs_id)
+
+ def test_cephfs_mirror_with_parent_snapshot(self):
+ """Test snapshot synchronization with parent directory snapshots"""
+ self.mount_a.run_shell(["mkdir", "-p", "d0/d1/d2/d3"])
+
+ self.enable_mirroring(self.primary_fs_name, self.primary_fs_id)
+ self.add_directory(self.primary_fs_name, self.primary_fs_id, '/d0/d1/d2/d3')
+ self.peer_add(self.primary_fs_name, self.primary_fs_id, "client.mirror_remote@ceph", self.secondary_fs_name)
+
+ # take a snapshot
+ self.mount_a.run_shell(["mkdir", "d0/d1/d2/d3/.snap/snap0"])
+
+ time.sleep(30)
+ self.check_peer_status(self.primary_fs_name, self.primary_fs_id,
+ "client.mirror_remote@ceph", '/d0/d1/d2/d3', 'snap0', 1)
+
+ # create snapshots in parent directories
+ self.mount_a.run_shell(["mkdir", "d0/.snap/snap_d0"])
+ self.mount_a.run_shell(["mkdir", "d0/d1/.snap/snap_d1"])
+ self.mount_a.run_shell(["mkdir", "d0/d1/d2/.snap/snap_d2"])
+
+ # try syncing more snapshots
+ self.mount_a.run_shell(["mkdir", "d0/d1/d2/d3/.snap/snap1"])
+ time.sleep(30)
+ self.check_peer_status(self.primary_fs_name, self.primary_fs_id,
+ "client.mirror_remote@ceph", '/d0/d1/d2/d3', 'snap1', 2)
+
+ self.mount_a.run_shell(["rmdir", "d0/d1/d2/d3/.snap/snap0"])
+ self.mount_a.run_shell(["rmdir", "d0/d1/d2/d3/.snap/snap1"])
+ time.sleep(15)
+ self.check_peer_status_deleted_snap(self.primary_fs_name, self.primary_fs_id,
+ "client.mirror_remote@ceph", '/d0/d1/d2/d3', 2)
+
+ self.remove_directory(self.primary_fs_name, self.primary_fs_id, '/d0/d1/d2/d3')
+ self.disable_mirroring(self.primary_fs_name, self.primary_fs_id)
+
+ def test_cephfs_mirror_remove_on_stall(self):
+ self.enable_mirroring(self.primary_fs_name, self.primary_fs_id)
+
+ # fetch rados address for blacklist check
+ rados_inst = self.get_mirror_rados_addr(self.primary_fs_name, self.primary_fs_id)
+
+ # simulate non-responding mirror daemon by sending SIGSTOP
+ pid = self.get_mirror_daemon_pid()
+ log.debug(f'SIGSTOP to cephfs-mirror pid {pid}')
+ self.mount_a.run_shell(['kill', '-SIGSTOP', pid])
+
+ # wait for blocklist timeout -- the manager module would blocklist
+ # the mirror daemon
+ time.sleep(40)
+
+ # make sure the rados addr is blocklisted
+ blocklist = self.get_blocklisted_instances()
+ self.assertTrue(rados_inst in blocklist)
+
+ # now we are sure that there are no "active" mirror daemons -- add a directory path.
+ dir_path_p = "/d0/d1"
+ dir_path = "/d0/d1/d2"
+
+ self.mgr_cluster.mon_manager.raw_cluster_cmd("fs", "snapshot", "mirror", "add", self.primary_fs_name, dir_path)
+
+ time.sleep(10)
+ # this uses an undocumented interface to get dirpath map state
+ res_json = self.mgr_cluster.mon_manager.raw_cluster_cmd("fs", "snapshot", "mirror", "dirmap", self.primary_fs_name, dir_path)
+ res = json.loads(res_json)
+ # there are no mirror daemons
+ self.assertTrue(res['state'], 'stalled')
+
+ self.mgr_cluster.mon_manager.raw_cluster_cmd("fs", "snapshot", "mirror", "remove", self.primary_fs_name, dir_path)
+
+ time.sleep(10)
+ try:
+ self.mgr_cluster.mon_manager.raw_cluster_cmd("fs", "snapshot", "mirror", "dirmap", self.primary_fs_name, dir_path)
+ except CommandFailedError as ce:
+ if ce.exitstatus != errno.ENOENT:
+ raise RuntimeError('invalid errno when checking dirmap status for non-existent directory')
+ else:
+ raise RuntimeError('incorrect errno when checking dirmap state for non-existent directory')
+
+ # adding a parent directory should be allowed
+ self.mgr_cluster.mon_manager.raw_cluster_cmd("fs", "snapshot", "mirror", "add", self.primary_fs_name, dir_path_p)
+
+ time.sleep(10)
+ # however, this directory path should get stalled too
+ res_json = self.mgr_cluster.mon_manager.raw_cluster_cmd("fs", "snapshot", "mirror", "dirmap", self.primary_fs_name, dir_path_p)
+ res = json.loads(res_json)
+ # there are no mirror daemons
+ self.assertTrue(res['state'], 'stalled')
+
+ # wake up the mirror daemon -- at this point, the daemon should know
+ # that it has been blocklisted
+ log.debug('SIGCONT to cephfs-mirror')
+ self.mount_a.run_shell(['kill', '-SIGCONT', pid])
+
+ # wait for restart mirror on blocklist
+ time.sleep(60)
+ res_json = self.mgr_cluster.mon_manager.raw_cluster_cmd("fs", "snapshot", "mirror", "dirmap", self.primary_fs_name, dir_path_p)
+ res = json.loads(res_json)
+ # there are no mirror daemons
+ self.assertTrue(res['state'], 'mapped')
+
+ self.disable_mirroring(self.primary_fs_name, self.primary_fs_id)
+
+ def test_cephfs_mirror_incremental_sync(self):
+ """ Test incremental snapshot synchronization (based on mtime differences)."""
+ log.debug('reconfigure client auth caps')
+ self.mds_cluster.mon_manager.raw_cluster_cmd_result(
+ 'auth', 'caps', "client.{0}".format(self.mount_b.client_id),
+ 'mds', 'allow rw',
+ 'mon', 'allow r',
+ 'osd', 'allow rw pool={0}, allow rw pool={1}'.format(
+ self.backup_fs.get_data_pool_name(), self.backup_fs.get_data_pool_name()))
+ log.debug(f'mounting filesystem {self.secondary_fs_name}')
+ self.mount_b.umount_wait()
+ self.mount_b.mount(cephfs_name=self.secondary_fs_name)
+
+ repo = 'ceph-qa-suite'
+ repo_dir = 'ceph_repo'
+ repo_path = f'{repo_dir}/{repo}'
+
+ def clone_repo():
+ self.mount_a.run_shell([
+ 'git', 'clone', '--branch', 'giant',
+ f'http://github.com/ceph/{repo}', repo_path])
+
+ def exec_git_cmd(cmd_list):
+ self.mount_a.run_shell(['git', '--git-dir', f'{self.mount_a.mountpoint}/{repo_path}/.git', *cmd_list])
+
+ self.mount_a.run_shell(["mkdir", repo_dir])
+ clone_repo()
+
+ self.enable_mirroring(self.primary_fs_name, self.primary_fs_id)
+ self.peer_add(self.primary_fs_name, self.primary_fs_id, "client.mirror_remote@ceph", self.secondary_fs_name)
+
+ self.add_directory(self.primary_fs_name, self.primary_fs_id, f'/{repo_path}')
+ self.mount_a.run_shell(['mkdir', f'{repo_path}/.snap/snap_a'])
+
+ # full copy, takes time
+ time.sleep(500)
+ self.check_peer_status(self.primary_fs_name, self.primary_fs_id,
+ "client.mirror_remote@ceph", f'/{repo_path}', 'snap_a', 1)
+ self.verify_snapshot(repo_path, 'snap_a')
+
+ # create some diff
+ num = random.randint(5, 20)
+ log.debug(f'resetting to HEAD~{num}')
+ exec_git_cmd(["reset", "--hard", f'HEAD~{num}'])
+
+ self.mount_a.run_shell(['mkdir', f'{repo_path}/.snap/snap_b'])
+ # incremental copy, should be fast
+ time.sleep(180)
+ self.check_peer_status(self.primary_fs_name, self.primary_fs_id,
+ "client.mirror_remote@ceph", f'/{repo_path}', 'snap_b', 2)
+ self.verify_snapshot(repo_path, 'snap_b')
+
+ # diff again, this time back to HEAD
+ log.debug('resetting to HEAD')
+ exec_git_cmd(["pull"])
+
+ self.mount_a.run_shell(['mkdir', f'{repo_path}/.snap/snap_c'])
+ # incremental copy, should be fast
+ time.sleep(180)
+ self.check_peer_status(self.primary_fs_name, self.primary_fs_id,
+ "client.mirror_remote@ceph", f'/{repo_path}', 'snap_c', 3)
+ self.verify_snapshot(repo_path, 'snap_c')
+
+ self.disable_mirroring(self.primary_fs_name, self.primary_fs_id)
+
+ def test_cephfs_mirror_incremental_sync_with_type_mixup(self):
+ """ Test incremental snapshot synchronization with file type changes.
+
+ The same filename exist as a different type in subsequent snapshot.
+ This verifies if the mirror daemon can identify file type mismatch and
+ sync snapshots.
+
+ \ snap_0 snap_1 snap_2 snap_3
+ \-----------------------------------------------
+ file_x | reg sym dir reg
+ |
+ file_y | dir reg sym dir
+ |
+ file_z | sym dir reg sym
+ """
+ log.debug('reconfigure client auth caps')
+ self.mds_cluster.mon_manager.raw_cluster_cmd_result(
+ 'auth', 'caps', "client.{0}".format(self.mount_b.client_id),
+ 'mds', 'allow rw',
+ 'mon', 'allow r',
+ 'osd', 'allow rw pool={0}, allow rw pool={1}'.format(
+ self.backup_fs.get_data_pool_name(), self.backup_fs.get_data_pool_name()))
+ log.debug(f'mounting filesystem {self.secondary_fs_name}')
+ self.mount_b.umount_wait()
+ self.mount_b.mount(cephfs_name=self.secondary_fs_name)
+
+ typs = deque(['reg', 'dir', 'sym'])
+ def cleanup_and_create_with_type(dirname, fnames):
+ self.mount_a.run_shell_payload(f"rm -rf {dirname}/*")
+ fidx = 0
+ for t in typs:
+ fname = f'{dirname}/{fnames[fidx]}'
+ log.debug(f'file: {fname} type: {t}')
+ if t == 'reg':
+ self.mount_a.run_shell(["touch", fname])
+ self.mount_a.write_file(fname, data=fname)
+ elif t == 'dir':
+ self.mount_a.run_shell(["mkdir", fname])
+ elif t == 'sym':
+ # verify ELOOP in mirror daemon
+ self.mount_a.run_shell(["ln", "-s", "..", fname])
+ fidx += 1
+
+ def verify_types(dirname, fnames, snap_name):
+ tidx = 0
+ for fname in fnames:
+ t = self.mount_b.run_shell_payload(f"stat -c %F {dirname}/.snap/{snap_name}/{fname}").stdout.getvalue().strip()
+ if typs[tidx] == 'reg':
+ self.assertEquals('regular file', t)
+ elif typs[tidx] == 'dir':
+ self.assertEquals('directory', t)
+ elif typs[tidx] == 'sym':
+ self.assertEquals('symbolic link', t)
+ tidx += 1
+
+ self.enable_mirroring(self.primary_fs_name, self.primary_fs_id)
+ self.peer_add(self.primary_fs_name, self.primary_fs_id, "client.mirror_remote@ceph", self.secondary_fs_name)
+
+ self.mount_a.run_shell(["mkdir", "d0"])
+ self.add_directory(self.primary_fs_name, self.primary_fs_id, '/d0')
+
+ fnames = ['file_x', 'file_y', 'file_z']
+ turns = 0
+ while turns != len(typs):
+ snapname = f'snap_{turns}'
+ cleanup_and_create_with_type('d0', fnames)
+ self.mount_a.run_shell(['mkdir', f'd0/.snap/{snapname}'])
+ time.sleep(30)
+ self.check_peer_status(self.primary_fs_name, self.primary_fs_id,
+ "client.mirror_remote@ceph", '/d0', snapname, turns+1)
+ verify_types('d0', fnames, snapname)
+ # next type
+ typs.rotate(1)
+ turns += 1
+
+ self.disable_mirroring(self.primary_fs_name, self.primary_fs_id)
+
+ def test_cephfs_mirror_sync_with_purged_snapshot(self):
+ """Test snapshot synchronization in midst of snapshot deletes.
+
+ Deleted the previous snapshot when the mirror daemon is figuring out
+ incremental differences between current and previous snaphot. The
+ mirror daemon should identify the purge and switch to using remote
+ comparison to sync the snapshot (in the next iteration of course).
+ """
+
+ log.debug('reconfigure client auth caps')
+ self.mds_cluster.mon_manager.raw_cluster_cmd_result(
+ 'auth', 'caps', "client.{0}".format(self.mount_b.client_id),
+ 'mds', 'allow rw',
+ 'mon', 'allow r',
+ 'osd', 'allow rw pool={0}, allow rw pool={1}'.format(
+ self.backup_fs.get_data_pool_name(), self.backup_fs.get_data_pool_name()))
+ log.debug(f'mounting filesystem {self.secondary_fs_name}')
+ self.mount_b.umount_wait()
+ self.mount_b.mount(cephfs_name=self.secondary_fs_name)
+
+ repo = 'ceph-qa-suite'
+ repo_dir = 'ceph_repo'
+ repo_path = f'{repo_dir}/{repo}'
+
+ def clone_repo():
+ self.mount_a.run_shell([
+ 'git', 'clone', '--branch', 'giant',
+ f'http://github.com/ceph/{repo}', repo_path])
+
+ def exec_git_cmd(cmd_list):
+ self.mount_a.run_shell(['git', '--git-dir', f'{self.mount_a.mountpoint}/{repo_path}/.git', *cmd_list])
+
+ self.mount_a.run_shell(["mkdir", repo_dir])
+ clone_repo()
+
+ self.enable_mirroring(self.primary_fs_name, self.primary_fs_id)
+ self.peer_add(self.primary_fs_name, self.primary_fs_id, "client.mirror_remote@ceph", self.secondary_fs_name)
+
+ self.add_directory(self.primary_fs_name, self.primary_fs_id, f'/{repo_path}')
+ self.mount_a.run_shell(['mkdir', f'{repo_path}/.snap/snap_a'])
+
+ # full copy, takes time
+ time.sleep(500)
+ self.check_peer_status(self.primary_fs_name, self.primary_fs_id,
+ "client.mirror_remote@ceph", f'/{repo_path}', 'snap_a', 1)
+ self.verify_snapshot(repo_path, 'snap_a')
+
+ # create some diff
+ num = random.randint(60, 100)
+ log.debug(f'resetting to HEAD~{num}')
+ exec_git_cmd(["reset", "--hard", f'HEAD~{num}'])
+
+ self.mount_a.run_shell(['mkdir', f'{repo_path}/.snap/snap_b'])
+
+ time.sleep(15)
+ self.mount_a.run_shell(['rmdir', f'{repo_path}/.snap/snap_a'])
+
+ # incremental copy but based on remote dir_root
+ time.sleep(300)
+ self.check_peer_status(self.primary_fs_name, self.primary_fs_id,
+ "client.mirror_remote@ceph", f'/{repo_path}', 'snap_b', 2)
+ self.verify_snapshot(repo_path, 'snap_b')
+
+ self.disable_mirroring(self.primary_fs_name, self.primary_fs_id)
+
+ def test_cephfs_mirror_peer_add_primary(self):
+ self.enable_mirroring(self.primary_fs_name, self.primary_fs_id)
+ self.peer_add(self.primary_fs_name, self.primary_fs_id, "client.mirror_remote@ceph", self.secondary_fs_name)
+
+ # try adding the primary file system as a peer to secondary file
+ # system
+ try:
+ self.peer_add(self.secondary_fs_name, self.secondary_fs_id, "client.mirror_remote@ceph", self.primary_fs_name)
+ except CommandFailedError as ce:
+ if ce.exitstatus != errno.EINVAL:
+ raise RuntimeError('invalid errno when adding a primary file system')
+ else:
+ raise RuntimeError('adding peer should fail')
+
+ self.disable_mirroring(self.primary_fs_name, self.primary_fs_id)
file_obj_name = "{0:x}.00000000".format(ino)
self.fs.radosm(["rmxattr", file_obj_name, "parent"])
- out_json = self.fs.run_scrub(["start", "/d1/d2/d3", "recursive", "force"], 0)
+ out_json = self.fs.run_scrub(["start", "/d1/d2/d3", "recursive,force"], 0)
self.assertNotEqual(out_json, None)
self.assertEqual(out_json["return_code"], 0)
self.assertEqual(self.fs.wait_until_scrub_complete(tag=out_json["scrub_tag"]), True)
file_obj_name = "{0:x}.00000000".format(ino)
self.fs.radosm(["rmxattr", file_obj_name, "parent"])
- out_json = self.fs.run_scrub(["start", "/d1/d2/d3", "recursive", "force"], 0)
+ out_json = self.fs.run_scrub(["start", "/d1/d2/d3", "recursive,force"], 0)
self.assertNotEqual(out_json, None)
res = self.fs.run_scrub(["abort"])
file_obj_name = "{0:x}.00000000".format(ino)
self.fs.radosm(["rmxattr", file_obj_name, "parent"])
- out_json = self.fs.run_scrub(["start", "/d1/d2/d3", "recursive", "force"], 0)
+ out_json = self.fs.run_scrub(["start", "/d1/d2/d3", "recursive,force"], 0)
self.assertNotEqual(out_json, None)
res = self.fs.run_scrub(["pause"])
file_obj_name = "{0:x}.00000000".format(ino)
self.fs.radosm(["rmxattr", file_obj_name, "parent"])
- out_json = self.fs.run_scrub(["start", "/d1/d2/d3", "recursive", "force"], 0)
+ out_json = self.fs.run_scrub(["start", "/d1/d2/d3", "recursive,force"], 0)
self.assertNotEqual(out_json, None)
res = self.fs.run_scrub(["pause"])
def setUp(self):
super(TestNFS, self).setUp()
+ self._load_module('nfs')
self.cluster_id = "test"
self.export_type = "cephfs"
self.pseudo_path = "/cephfs"
'''
# Disable any running nfs ganesha daemon
self._check_nfs_server_status()
- self._nfs_cmd('cluster', 'create', self.export_type, self.cluster_id)
+ self._nfs_cmd('cluster', 'create', self.cluster_id)
# Check for expected status and daemon name (nfs.<cluster_id>)
self._check_nfs_cluster_status('running', 'NFS Ganesha cluster deployment failed')
'''
Test deletion of a single nfs cluster.
'''
- self._nfs_cmd('cluster', 'delete', self.cluster_id)
+ self._nfs_cmd('cluster', 'rm', self.cluster_id)
self._check_nfs_cluster_status('No daemons reported',
'NFS Ganesha cluster could not be deleted')
'''
Delete an export.
'''
- self._nfs_cmd('export', 'delete', self.cluster_id, self.pseudo_path)
+ self._nfs_cmd('export', 'rm', self.cluster_id, self.pseudo_path)
self._check_auth_ls()
def _test_list_export(self):
'''
Return port and ip for a cluster
'''
- #{'test': [{'hostname': 'smithi068', 'ip': ['172.21.15.68'], 'port': 2049}]}
- info_output = json.loads(self._nfs_cmd('cluster', 'info', self.cluster_id))['test'][0]
- return info_output["port"], info_output["ip"][0]
+ #{'test': {'backend': [{'hostname': 'smithi068', 'ip': '172.21.15.68', 'port': 2049}]}}
+ info_output = json.loads(self._nfs_cmd('cluster', 'info', self.cluster_id))['test']['backend'][0]
+ return info_output["port"], info_output["ip"]
def _test_mnt(self, pseudo_path, port, ip, check=True):
'''
'''
Test idempotency of cluster create and delete commands.
'''
- self._test_idempotency(self._test_create_cluster, ['nfs', 'cluster', 'create', self.export_type,
- self.cluster_id])
- self._test_idempotency(self._test_delete_cluster, ['nfs', 'cluster', 'delete', self.cluster_id])
+ self._test_idempotency(self._test_create_cluster, ['nfs', 'cluster', 'create', self.cluster_id])
+ self._test_idempotency(self._test_delete_cluster, ['nfs', 'cluster', 'rm', self.cluster_id])
def test_create_cluster_with_invalid_cluster_id(self):
'''
'''
try:
invalid_cluster_id = '/cluster_test' # Only [A-Za-z0-9-_.] chars are valid
- self._nfs_cmd('cluster', 'create', self.export_type, invalid_cluster_id)
+ self._nfs_cmd('cluster', 'create', invalid_cluster_id)
self.fail(f"Cluster successfully created with invalid cluster id {invalid_cluster_id}")
except CommandFailedError as e:
# Command should fail for test to pass
if e.exitstatus != errno.EINVAL:
raise
- def test_create_cluster_with_invalid_export_type(self):
- '''
- Test nfs cluster deployment failure with invalid export type.
- '''
- try:
- invalid_export_type = 'rgw' # Only cephfs is valid
- self._nfs_cmd('cluster', 'create', invalid_export_type, self.cluster_id)
- self.fail(f"Cluster successfully created with invalid export type {invalid_export_type}")
- except CommandFailedError as e:
- # Command should fail for test to pass
- if e.exitstatus != errno.EINVAL:
- raise
-
def test_create_and_delete_export(self):
'''
Test successful creation and deletion of the cephfs export.
self._test_idempotency(self._create_default_export, ['nfs', 'export', 'create', 'cephfs',
self.fs_name, self.cluster_id,
self.pseudo_path])
- self._test_idempotency(self._delete_export, ['nfs', 'export', 'delete', self.cluster_id,
+ self._test_idempotency(self._delete_export, ['nfs', 'export', 'rm', self.cluster_id,
self.pseudo_path])
self._test_delete_cluster()
'''
self._test_create_cluster()
info_output = json.loads(self._nfs_cmd('cluster', 'info', self.cluster_id))
- info_ip = info_output[self.cluster_id][0].pop("ip")
- host_details = {self.cluster_id: [{
- "hostname": self._sys_cmd(['hostname']).decode("utf-8").strip(),
- "port": 2049
- }]}
+ print(f'info {info_output}')
+ info_ip = info_output[self.cluster_id].get('backend', [])[0].pop("ip")
+ host_details = {
+ self.cluster_id: {
+ 'backend': [
+ {
+ "hostname": self._sys_cmd(['hostname']).decode("utf-8").strip(),
+ "port": 2049
+ }
+ ],
+ "virtual_ip": None,
+ }
+ }
host_ip = self._sys_cmd(['hostname', '-I']).decode("utf-8").split()
+ print(f'host_ip is {host_ip}, info_ip is {info_ip}')
self.assertDictEqual(info_output, host_details)
- self.assertTrue(any([ip in info_ip for ip in host_ip]))
+ self.assertTrue(info_ip in host_ip)
self._test_delete_cluster()
def test_cluster_set_reset_user_config(self):
update_with_invalid_values('user_id', 'testing_export', True)
update_with_invalid_values('fs_name', 'b', True)
self._test_delete_cluster()
+
+ def test_cmds_without_reqd_args(self):
+ '''
+ Test that cmd fails on not passing required arguments
+ '''
+ def exec_cmd_invalid(*cmd):
+ try:
+ self._nfs_cmd(*cmd)
+ self.fail(f"nfs {cmd} command executed successfully without required arguments")
+ except CommandFailedError as e:
+ # Command should fail for test to pass
+ if e.exitstatus != errno.EINVAL:
+ raise
+
+ exec_cmd_invalid('cluster', 'create')
+ exec_cmd_invalid('cluster', 'delete')
+ exec_cmd_invalid('cluster', 'config', 'set')
+ exec_cmd_invalid('cluster', 'config', 'reset')
+ exec_cmd_invalid('export', 'create', 'cephfs')
+ exec_cmd_invalid('export', 'create', 'cephfs', 'a_fs')
+ exec_cmd_invalid('export', 'create', 'cephfs', 'a_fs', 'clusterid')
+ exec_cmd_invalid('export', 'ls')
+ exec_cmd_invalid('export', 'delete')
+ exec_cmd_invalid('export', 'delete', 'clusterid')
+ exec_cmd_invalid('export', 'get')
+ exec_cmd_invalid('export', 'get', 'clusterid')
for rank in self.recovery_fs.get_ranks(status=status):
self.fs.mon_manager.raw_cluster_cmd('tell', "mds." + rank['name'],
'injectargs', '--debug-mds=20')
- self.fs.rank_tell(['scrub', 'start', '/', 'recursive', 'repair'], rank=rank['rank'], status=status)
+ self.fs.rank_tell(['scrub', 'start', '/', 'recursive,repair'], rank=rank['rank'], status=status)
log.info(str(self.mds_cluster.status()))
# Mount a client
self._filesystem.wait_for_daemons()
def validate(self):
- out_json = self._filesystem.run_scrub(["start", "/", "recursive", "repair"])
+ out_json = self._filesystem.run_scrub(["start", "/", "recursive,repair"])
self.assertNotEqual(out_json, None)
self.assertEqual(out_json["return_code"], 0)
self.assertEqual(self._filesystem.wait_until_scrub_complete(tag=out_json["scrub_tag"]), True)
# Apply any data damage the workload wants
workload.damage()
- out_json = self.fs.run_scrub(["start", "/", "recursive", "repair"])
+ out_json = self.fs.run_scrub(["start", "/", "recursive,repair"])
self.assertNotEqual(out_json, None)
self.assertEqual(out_json["return_code"], 0)
self.assertEqual(self.fs.wait_until_scrub_complete(tag=out_json["scrub_tag"]), True)
def _fs_cmd(self, *args):
return self.mgr_cluster.mon_manager.raw_cluster_cmd("fs", *args)
- def fs_snap_schedule_cmd(self, *args):
- args = list(args)
- args.append(f'fs={self.volname}')
+ def fs_snap_schedule_cmd(self, *args, **kwargs):
+ fs = kwargs.pop('fs', self.volname)
+ args += ('--fs', fs)
+ for name, val in kwargs.items():
+ args += (f'--{name}', str(val))
res = self._fs_cmd('snap-schedule', *args)
log.debug(f'res={res}')
return res
def verify_schedule(self, dir_path, schedules, retentions=[]):
log.debug(f'expected_schedule: {schedules}, expected_retention: {retentions}')
- result = self.fs_snap_schedule_cmd('list', f'path={dir_path}', 'format=json')
+ result = self.fs_snap_schedule_cmd('list', path=dir_path, format='json')
json_res = json.loads(result)
log.debug(f'json_res: {json_res}')
def test_non_existent_snap_schedule_list(self):
"""Test listing snap schedules on a non-existing filesystem path failure"""
try:
- self.fs_snap_schedule_cmd('list', f'path={TestSnapSchedules.TEST_DIRECTORY}', 'format=json')
+ self.fs_snap_schedule_cmd('list', path=TestSnapSchedules.TEST_DIRECTORY)
except CommandFailedError as ce:
if ce.exitstatus != errno.ENOENT:
raise RuntimeError('incorrect errno when listing a non-existing snap schedule')
self.mount_a.run_shell(['mkdir', '-p', TestSnapSchedules.TEST_DIRECTORY])
try:
- self.fs_snap_schedule_cmd('list', f'path={TestSnapSchedules.TEST_DIRECTORY}', 'format=json')
+ self.fs_snap_schedule_cmd('list', path=TestSnapSchedules.TEST_DIRECTORY)
except CommandFailedError as ce:
if ce.exitstatus != errno.ENOENT:
raise RuntimeError('incorrect errno when listing a non-existing snap schedule')
"""Test listing snap schedules post removal of a schedule"""
self.mount_a.run_shell(['mkdir', '-p', TestSnapSchedules.TEST_DIRECTORY])
- self.fs_snap_schedule_cmd('add', f'path={TestSnapSchedules.TEST_DIRECTORY}', 'snap-schedule=1h')
+ self.fs_snap_schedule_cmd('add', path=TestSnapSchedules.TEST_DIRECTORY, snap_schedule='1h')
- self.fs_snap_schedule_cmd('remove', f'path={TestSnapSchedules.TEST_DIRECTORY}')
+ self.fs_snap_schedule_cmd('remove', path=TestSnapSchedules.TEST_DIRECTORY)
try:
- self.fs_snap_schedule_cmd('list', f'path={TestSnapSchedules.TEST_DIRECTORY}', 'format=json')
+ self.fs_snap_schedule_cmd('list', path=TestSnapSchedules.TEST_DIRECTORY)
except CommandFailedError as ce:
if ce.exitstatus != errno.ENOENT:
raise RuntimeError('incorrect errno when listing a non-existing snap schedule')
self.mount_a.run_shell(['mkdir', '-p', TestSnapSchedules.TEST_DIRECTORY])
# set a schedule on the dir
- self.fs_snap_schedule_cmd('add', f'path={TestSnapSchedules.TEST_DIRECTORY}', 'snap-schedule=1M')
+ self.fs_snap_schedule_cmd('add', path=TestSnapSchedules.TEST_DIRECTORY, snap_schedule='1M')
exec_time = time.time()
timo, snap_sfx = self.calc_wait_time_and_snap_name(exec_time, '1M')
self.assert_if_not_verified()
# remove snapshot schedule
- self.fs_snap_schedule_cmd('remove', f'path={TestSnapSchedules.TEST_DIRECTORY}')
+ self.fs_snap_schedule_cmd('remove', path=TestSnapSchedules.TEST_DIRECTORY)
# remove all scheduled snapshots
self.remove_snapshots(TestSnapSchedules.TEST_DIRECTORY)
self.mount_a.run_shell(['mkdir', '-p', TestSnapSchedules.TEST_DIRECTORY])
# set schedules on the dir
- self.fs_snap_schedule_cmd('add', f'path={TestSnapSchedules.TEST_DIRECTORY}', 'snap-schedule=1M')
- self.fs_snap_schedule_cmd('add', f'path={TestSnapSchedules.TEST_DIRECTORY}', 'snap-schedule=2M')
+ self.fs_snap_schedule_cmd('add', path=TestSnapSchedules.TEST_DIRECTORY, snap_schedule='1M')
+ self.fs_snap_schedule_cmd('add', path=TestSnapSchedules.TEST_DIRECTORY, snap_schedule='2M')
exec_time = time.time()
timo_1, snap_sfx_1 = self.calc_wait_time_and_snap_name(exec_time, '1M')
self.assert_if_not_verified()
# remove snapshot schedule
- self.fs_snap_schedule_cmd('remove', f'path={TestSnapSchedules.TEST_DIRECTORY}')
+ self.fs_snap_schedule_cmd('remove', path=TestSnapSchedules.TEST_DIRECTORY)
# remove all scheduled snapshots
self.remove_snapshots(TestSnapSchedules.TEST_DIRECTORY)
self.mount_a.run_shell(['mkdir', '-p', TestSnapSchedules.TEST_DIRECTORY])
# set a schedule on the dir
- self.fs_snap_schedule_cmd('add', f'path={TestSnapSchedules.TEST_DIRECTORY}', 'snap-schedule=1M')
- self.fs_snap_schedule_cmd('retention', 'add', f'path={TestSnapSchedules.TEST_DIRECTORY}', 'retention-spec-or-period=1M')
+ self.fs_snap_schedule_cmd('add', path=TestSnapSchedules.TEST_DIRECTORY, snap_schedule='1M')
+ self.fs_snap_schedule_cmd('retention', 'add', path=TestSnapSchedules.TEST_DIRECTORY, retention_spec_or_period='1M')
exec_time = time.time()
timo_1, snap_sfx = self.calc_wait_time_and_snap_name(exec_time, '1M')
self.assert_if_not_verified()
# remove snapshot schedule
- self.fs_snap_schedule_cmd('remove', f'path={TestSnapSchedules.TEST_DIRECTORY}')
+ self.fs_snap_schedule_cmd('remove', path=TestSnapSchedules.TEST_DIRECTORY)
# remove all scheduled snapshots
self.remove_snapshots(TestSnapSchedules.TEST_DIRECTORY)
+from io import StringIO
import json
import logging
import os
ns_in_attr = self.mount_a.getfattr(os.path.join("myprefix", group_id, volume_id), "ceph.dir.layout.pool_namespace")
self.assertEqual(namespace, ns_in_attr)
- objects_in_ns = set(self.fs.rados(["ls"], pool=pool_name, namespace=namespace).split("\n"))
+ objects_in_ns = set(self.fs.rados(["ls"], pool=pool_name, namespace=namespace, stdout=StringIO()).stdout.getvalue().split("\n"))
self.assertNotEqual(objects_in_ns, set())
# De-authorize the guest
obj_data = obj_data
)))
- read_data = self.fs.rados(['get', obj_name, '-'], pool=pool_name)
+ read_data = self.fs.rados(['get', obj_name, '-'], pool=pool_name, stdout=StringIO()).stdout.getvalue()
self.assertEqual(obj_data, read_data)
def test_get_object(self):
obj_name = 'test_vc_ob_2'
pool_name = self.fs.get_data_pool_names()[0]
- self.fs.rados(['put', obj_name, '-'], pool=pool_name, stdin_data=obj_data)
+ self.fs.rados(['put', obj_name, '-'], pool=pool_name, stdin=StringIO(obj_data))
self._volume_client_python(vc_mount, dedent("""
data_read = vc.get_object("{pool_name}", "{obj_name}")
obj_data = 'test_data'
obj_name = 'test_vc_obj'
pool_name = self.fs.get_data_pool_names()[0]
- self.fs.rados(['put', obj_name, '-'], pool=pool_name, stdin_data=obj_data)
+ self.fs.rados(['put', obj_name, '-'], pool=pool_name, stdin=StringIO(obj_data))
self._volume_client_python(vc_mount, dedent("""
data, version_before = vc.get_object_and_version("{pool_name}", "{obj_name}")
obj_data = 'test_data'
obj_name = 'test_vc_ob_2'
pool_name = self.fs.get_data_pool_names()[0]
- self.fs.rados(['put', obj_name, '-'], pool=pool_name, stdin_data=obj_data)
+ self.fs.rados(['put', obj_name, '-'], pool=pool_name, stdin=StringIO(obj_data))
# Test if put_object_versioned() crosschecks the version of the
# given object. Being a negative test, an exception is expected.
obj_name = 'test_vc_obj_3'
pool_name = self.fs.get_data_pool_names()[0]
- self.fs.rados(['put', obj_name, '-'], pool=pool_name, stdin_data=obj_data)
+ self.fs.rados(['put', obj_name, '-'], pool=pool_name, stdin=StringIO(obj_data))
self._volume_client_python(vc_mount, dedent("""
data_read = vc.delete_object("{pool_name}", "{obj_name}")
def bark(self):
self.log("BARK! unmounting mounts and killing all daemons")
- for mount in self.ctx.mounts.values():
- try:
- mount.umount_wait(force=True)
- except:
- self.logger.exception("ignoring exception:")
+ if hasattr(self.ctx, 'mounts'):
+ for mount in self.ctx.mounts.values():
+ try:
+ mount.umount_wait(force=True)
+ except:
+ self.logger.exception("ignoring exception:")
daemons = []
daemons.extend(filter(lambda daemon: daemon.running() and not daemon.proc.finished, self.ctx.daemons.iter_daemons_of_role('osd', cluster=self.cluster)))
daemons.extend(filter(lambda daemon: daemon.running() and not daemon.proc.finished, self.ctx.daemons.iter_daemons_of_role('mds', cluster=self.cluster)))
def _scrub(self, path="/", recursive=True):
self.logger.info(f"scrubbing fs: {self.fs.name}")
- recopt = ["recursive", "force"] if recursive else ["force"]
- out_json = self.fs.run_scrub(["start", path] + recopt)
+ scrubopts = ["force"]
+ if recursive:
+ scrubopts.append("recursive")
+ out_json = self.fs.run_scrub(["start", path, ",".join(scrubopts)])
assert out_json is not None
tag = out_json['scrub_tag']
if client_config is None:
client_config = {}
# top level overrides
- for k, v in top_overrides.items():
- if v is not None:
- client_config[k] = v
+ deep_merge(client_config, top_overrides)
# mount specific overrides
client_config_overrides = overrides.get(entity)
deep_merge(client_config, client_config_overrides)
--- /dev/null
+"""
+Kubernetes cluster task, deployed via kubeadm
+"""
+import argparse
+import contextlib
+import ipaddress
+import logging
+import random
+import yaml
+from io import BytesIO
+
+from teuthology import misc as teuthology
+from teuthology import contextutil
+from teuthology.config import config as teuth_config
+from teuthology.orchestra import run
+
+log = logging.getLogger(__name__)
+
+
+def _kubectl(ctx, config, args, **kwargs):
+ cluster_name = config['cluster']
+ ctx.kubeadm[cluster_name].bootstrap_remote.run(
+ args=['kubectl'] + args,
+ **kwargs,
+ )
+
+
+def kubectl(ctx, config):
+ if isinstance(config, str):
+ config = [config]
+ assert isinstance(config, list)
+ for c in config:
+ if isinstance(c, str):
+ _kubectl(ctx, config, c.split(' '))
+ else:
+ _kubectl(ctx, config, c)
+
+
+@contextlib.contextmanager
+def preflight(ctx, config):
+ run.wait(
+ ctx.cluster.run(
+ args=[
+ 'sudo', 'modprobe', 'br_netfilter',
+ run.Raw('&&'),
+ 'sudo', 'sysctl', 'net.bridge.bridge-nf-call-ip6tables=1',
+ run.Raw('&&'),
+ 'sudo', 'sysctl', 'net.bridge.bridge-nf-call-iptables=1',
+ run.Raw('&&'),
+ 'sudo', 'sysctl', 'net.ipv4.ip_forward=1',
+ run.Raw('&&'),
+ 'sudo', 'swapoff', '-a',
+ ],
+ wait=False,
+ )
+ )
+ yield
+
+
+@contextlib.contextmanager
+def kubeadm_install(ctx, config):
+ version = config.get('version', '1.21')
+
+ os_type = teuthology.get_distro(ctx)
+ os_version = teuthology.get_distro_version(ctx)
+
+ try:
+ if os_type in ['centos', 'rhel']:
+ os = f"CentOS_{os_version.split('.')[0]}"
+ log.info('Installing cri-o')
+ run.wait(
+ ctx.cluster.run(
+ args=[
+ 'sudo',
+ 'curl', '-L', '-o',
+ '/etc/yum.repos.d/devel:kubic:libcontainers:stable.repo',
+ f'https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/{os}/devel:kubic:libcontainers:stable.repo',
+ run.Raw('&&'),
+ 'sudo',
+ 'curl', '-L', '-o',
+ f'/etc/yum.repos.d/devel:kubic:libcontainers:stable:cri-o:{version}.repo',
+ f'https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/{version}/{os}/devel:kubic:libcontainers:stable:cri-o:{version}.repo',
+ run.Raw('&&'),
+ 'sudo', 'dnf', 'install', '-y', 'cri-o',
+ ],
+ wait=False,
+ )
+ )
+
+ log.info('Installing kube{adm,ctl,let}')
+ repo = """[kubernetes]
+name=Kubernetes
+baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-$basearch
+enabled=1
+gpgcheck=1
+repo_gpgcheck=1
+gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
+"""
+ for remote in ctx.cluster.remotes.keys():
+ remote.write_file(
+ '/etc/yum.repos.d/kubernetes.repo',
+ repo,
+ sudo=True,
+ )
+ run.wait(
+ ctx.cluster.run(
+ args=[
+ 'sudo', 'dnf', 'install', '-y',
+ 'kubelet', 'kubeadm', 'kubectl',
+ 'iproute-tc', 'bridge-utils',
+ ],
+ wait=False,
+ )
+ )
+
+ # fix cni config
+ for remote in ctx.cluster.remotes.keys():
+ conf = """# from https://github.com/cri-o/cri-o/blob/master/tutorials/kubernetes.md#flannel-network
+{
+ "name": "crio",
+ "type": "flannel"
+}
+"""
+ remote.write_file('/etc/cni/net.d/10-crio-flannel.conf', conf, sudo=True)
+ remote.run(args=[
+ 'sudo', 'rm', '-f',
+ '/etc/cni/net.d/87-podman-bridge.conflist',
+ '/etc/cni/net.d/100-crio-bridge.conf',
+ ])
+
+ # start crio
+ run.wait(
+ ctx.cluster.run(
+ args=[
+ 'sudo', 'systemctl', 'daemon-reload',
+ run.Raw('&&'),
+ 'sudo', 'systemctl', 'enable', 'crio', '--now',
+ ],
+ wait=False,
+ )
+ )
+
+ elif os_type == 'ubuntu':
+ os = f"xUbuntu_{os_version}"
+ log.info('Installing kube{adm,ctl,let}')
+ run.wait(
+ ctx.cluster.run(
+ args=[
+ 'sudo', 'apt', 'update',
+ run.Raw('&&'),
+ 'sudo', 'apt', 'install', '-y',
+ 'apt-transport-https', 'ca-certificates', 'curl',
+ run.Raw('&&'),
+ 'sudo', 'curl', '-fsSLo',
+ '/usr/share/keyrings/kubernetes-archive-keyring.gpg',
+ 'https://packages.cloud.google.com/apt/doc/apt-key.gpg',
+ run.Raw('&&'),
+ 'echo', 'deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main',
+ run.Raw('|'),
+ 'sudo', 'tee', '/etc/apt/sources.list.d/kubernetes.list',
+ run.Raw('&&'),
+ 'sudo', 'apt', 'update',
+ run.Raw('&&'),
+ 'sudo', 'apt', 'install', '-y',
+ 'kubelet', 'kubeadm', 'kubectl',
+ 'bridge-utils',
+ ],
+ wait=False,
+ )
+ )
+
+ else:
+ raise RuntimeError(f'unsupported distro {os_type} for cri-o')
+
+ run.wait(
+ ctx.cluster.run(
+ args=[
+ 'sudo', 'systemctl', 'enable', '--now', 'kubelet',
+ run.Raw('&&'),
+ 'sudo', 'kubeadm', 'config', 'images', 'pull',
+ ],
+ wait=False,
+ )
+ )
+
+ yield
+
+ finally:
+ if config.get('uninstall', True):
+ log.info('Uninstalling kube{adm,let,ctl}')
+ if os_type in ['centos', 'rhel']:
+ run.wait(
+ ctx.cluster.run(
+ args=[
+ 'sudo', 'rm', '-f',
+ '/etc/yum.repos.d/kubernetes.repo',
+ run.Raw('&&'),
+ 'sudo', 'dnf', 'remove', '-y',
+ 'kubeadm', 'kubelet', 'kubectl', 'cri-o',
+ ],
+ wait=False
+ )
+ )
+ elif os_type == 'ubuntu' and False:
+ run.wait(
+ ctx.cluster.run(
+ args=[
+ 'sudo', 'rm', '-f',
+ '/etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list',
+ f'/etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:{version}.list',
+ '/etc/apt/trusted.gpg.d/libcontainers-cri-o.gpg',
+ run.Raw('&&'),
+ 'sudo', 'apt', 'remove', '-y',
+ 'kkubeadm', 'kubelet', 'kubectl', 'cri-o', 'cri-o-runc',
+ ],
+ wait=False,
+ )
+ )
+
+
+@contextlib.contextmanager
+def kubeadm_init_join(ctx, config):
+ cluster_name = config['cluster']
+
+ bootstrap_remote = None
+ remotes = {} # remote -> ip
+ for remote, roles in ctx.cluster.remotes.items():
+ for role in roles:
+ if role.startswith('host.'):
+ if not bootstrap_remote:
+ bootstrap_remote = remote
+ if remote not in remotes:
+ remotes[remote] = remote.ssh.get_transport().getpeername()[0]
+ if not bootstrap_remote:
+ raise RuntimeError('must define at least one host.something role')
+ ctx.kubeadm[cluster_name].bootstrap_remote = bootstrap_remote
+ ctx.kubeadm[cluster_name].remotes = remotes
+ ctx.kubeadm[cluster_name].token = 'abcdef.' + ''.join([
+ random.choice('0123456789abcdefghijklmnopqrstuvwxyz') for _ in range(16)
+ ])
+ log.info(f'Token: {ctx.kubeadm[cluster_name].token}')
+ log.info(f'Remotes: {ctx.kubeadm[cluster_name].remotes}')
+
+ try:
+ # init
+ cmd = [
+ 'sudo', 'kubeadm', 'init',
+ '--node-name', ctx.kubeadm[cluster_name].bootstrap_remote.shortname,
+ '--token', ctx.kubeadm[cluster_name].token,
+ '--pod-network-cidr', str(ctx.kubeadm[cluster_name].pod_subnet),
+ ]
+ bootstrap_remote.run(args=cmd)
+
+ # join additional nodes
+ joins = []
+ for remote, ip in ctx.kubeadm[cluster_name].remotes.items():
+ if remote == bootstrap_remote:
+ continue
+ cmd = [
+ 'sudo', 'kubeadm', 'join',
+ ctx.kubeadm[cluster_name].remotes[ctx.kubeadm[cluster_name].bootstrap_remote] + ':6443',
+ '--node-name', remote.shortname,
+ '--token', ctx.kubeadm[cluster_name].token,
+ '--discovery-token-unsafe-skip-ca-verification',
+ ]
+ joins.append(remote.run(args=cmd, wait=False))
+ run.wait(joins)
+ yield
+
+ except Exception as e:
+ log.exception(e)
+ raise
+
+ finally:
+ log.info('Cleaning up node')
+ run.wait(
+ ctx.cluster.run(
+ args=['sudo', 'kubeadm', 'reset', 'cleanup-node', '-f'],
+ wait=False,
+ )
+ )
+
+
+@contextlib.contextmanager
+def kubectl_config(ctx, config):
+ cluster_name = config['cluster']
+ bootstrap_remote = ctx.kubeadm[cluster_name].bootstrap_remote
+
+ ctx.kubeadm[cluster_name].admin_conf = \
+ bootstrap_remote.read_file('/etc/kubernetes/admin.conf', sudo=True)
+
+ log.info('Setting up kubectl')
+ try:
+ ctx.cluster.run(args=[
+ 'mkdir', '-p', '.kube',
+ run.Raw('&&'),
+ 'sudo', 'mkdir', '-p', '/root/.kube',
+ ])
+ for remote in ctx.kubeadm[cluster_name].remotes.keys():
+ remote.write_file('.kube/config', ctx.kubeadm[cluster_name].admin_conf)
+ remote.sudo_write_file('/root/.kube/config',
+ ctx.kubeadm[cluster_name].admin_conf)
+ yield
+
+ except Exception as e:
+ log.exception(e)
+ raise
+
+ finally:
+ log.info('Deconfiguring kubectl')
+ ctx.cluster.run(args=[
+ 'rm', '-rf', '.kube',
+ run.Raw('&&'),
+ 'sudo', 'rm', '-rf', '/root/.kube',
+ ])
+
+
+def map_vnet(mip):
+ for mapping in teuth_config.get('vnet', []):
+ mnet = ipaddress.ip_network(mapping['machine_subnet'])
+ vnet = ipaddress.ip_network(mapping['virtual_subnet'])
+ if vnet.prefixlen >= mnet.prefixlen:
+ log.error(f"virtual_subnet {vnet} prefix >= machine_subnet {mnet} prefix")
+ return None
+ if mip in mnet:
+ pos = list(mnet.hosts()).index(mip)
+ log.info(f"{mip} is in {mnet} at pos {pos}")
+ sub = list(vnet.subnets(32 - mnet.prefixlen))[pos]
+ return sub
+ return None
+
+
+@contextlib.contextmanager
+def allocate_pod_subnet(ctx, config):
+ """
+ Allocate a private subnet that will not collide with other test machines/clusters
+ """
+ cluster_name = config['cluster']
+ assert cluster_name == 'kubeadm', 'multiple subnets not yet implemented'
+
+ log.info('Identifying pod subnet')
+ remote = list(ctx.cluster.remotes.keys())[0]
+ ip = remote.ssh.get_transport().getpeername()[0]
+ mip = ipaddress.ip_address(ip)
+ vnet = map_vnet(mip)
+ assert vnet
+ log.info(f'Pod subnet: {vnet}')
+ ctx.kubeadm[cluster_name].pod_subnet = vnet
+ yield
+
+
+@contextlib.contextmanager
+def pod_network(ctx, config):
+ cluster_name = config['cluster']
+ pnet = config.get('pod_network', 'calico')
+ if pnet == 'flannel':
+ r = ctx.kubeadm[cluster_name].bootstrap_remote.run(
+ args=[
+ 'curl',
+ 'https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml',
+ ],
+ stdout=BytesIO(),
+ )
+ assert r.exitstatus == 0
+ flannel = list(yaml.load_all(r.stdout.getvalue(), Loader=yaml.FullLoader))
+ for o in flannel:
+ if o.get('data', {}).get('net-conf.json'):
+ log.info(f'Updating {o}')
+ o['data']['net-conf.json'] = o['data']['net-conf.json'].replace(
+ '10.244.0.0/16',
+ str(ctx.kubeadm[cluster_name].pod_subnet)
+ )
+ log.info(f'Now {o}')
+ flannel_yaml = yaml.dump_all(flannel)
+ log.debug(f'Flannel:\n{flannel_yaml}')
+ _kubectl(ctx, config, ['apply', '-f', '-'], stdin=flannel_yaml)
+
+ elif pnet == 'calico':
+ _kubectl(ctx, config, [
+ 'apply', '-f',
+ 'https://docs.projectcalico.org/manifests/tigera-operator.yaml'
+ ])
+ cr = {
+ 'apiVersion': 'operator.tigera.io/v1',
+ 'kind': 'Installation',
+ 'metadata': {'name': 'default'},
+ 'spec': {
+ 'calicoNetwork': {
+ 'ipPools': [
+ {
+ 'blockSize': 26,
+ 'cidr': str(ctx.kubeadm[cluster_name].pod_subnet),
+ 'encapsulation': 'VXLANCrossSubnet',
+ 'natOutgoing': 'Enabled',
+ 'nodeSelector': 'all()',
+ }
+ ]
+ }
+ }
+ }
+ _kubectl(ctx, config, ['create', '-f', '-'], stdin=yaml.dump(cr))
+
+ else:
+ raise RuntimeError(f'unrecognized pod_network {pnet}')
+
+ try:
+ yield
+
+ finally:
+ if pnet == 'flannel':
+ _kubectl(ctx, config, [
+ 'delete', '-f',
+ 'https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml',
+ ])
+
+ elif pnet == 'calico':
+ _kubectl(ctx, config, ['delete', 'installation', 'default'])
+ _kubectl(ctx, config, [
+ 'delete', '-f',
+ 'https://docs.projectcalico.org/manifests/tigera-operator.yaml'
+ ])
+
+
+@contextlib.contextmanager
+def setup_pvs(ctx, config):
+ """
+ Create PVs for all scratch LVs and set up a trivial provisioner
+ """
+ log.info('Scanning for scratch devices')
+ crs = []
+ for remote in ctx.cluster.remotes.keys():
+ ls = remote.read_file('/scratch_devs').decode('utf-8').strip().splitlines()
+ log.info(f'Scratch devices on {remote.shortname}: {ls}')
+ for dev in ls:
+ devname = dev.split('/')[-1].replace("_", "-")
+ crs.append({
+ 'apiVersion': 'v1',
+ 'kind': 'PersistentVolume',
+ 'metadata': {'name': f'{remote.shortname}-{devname}'},
+ 'spec': {
+ 'volumeMode': 'Block',
+ 'accessModes': ['ReadWriteOnce'],
+ 'capacity': {'storage': '100Gi'}, # doesn't matter?
+ 'persistentVolumeReclaimPolicy': 'Recycle',
+ 'storageClassName': 'scratch',
+ 'local': {'path': dev},
+ 'nodeAffinity': {
+ 'required': {
+ 'nodeSelectorTerms': [
+ {
+ 'matchExpressions': [
+ {
+ 'key': 'kubernetes.io/hostname',
+ 'operator': 'In',
+ 'values': [remote.shortname]
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }
+ })
+ # overwriting first few MB is enough to make k8s happy
+ remote.run(args=[
+ 'sudo', 'dd', 'if=/dev/zero', f'of={dev}', 'bs=1M', 'count=10'
+ ])
+ crs.append({
+ 'kind': 'StorageClass',
+ 'apiVersion': 'storage.k8s.io/v1',
+ 'metadata': {'name': 'scratch'},
+ 'provisioner': 'kubernetes.io/no-provisioner',
+ 'volumeBindingMode': 'WaitForFirstConsumer',
+ })
+ y = yaml.dump_all(crs)
+ log.info('Creating PVs + StorageClass')
+ log.debug(y)
+ _kubectl(ctx, config, ['create', '-f', '-'], stdin=y)
+
+ yield
+
+
+@contextlib.contextmanager
+def final(ctx, config):
+ cluster_name = config['cluster']
+
+ # remove master node taint
+ _kubectl(ctx, config, [
+ 'taint', 'node',
+ ctx.kubeadm[cluster_name].bootstrap_remote.shortname,
+ 'node-role.kubernetes.io/master-',
+ run.Raw('||'),
+ 'true',
+ ])
+
+ yield
+
+
+@contextlib.contextmanager
+def task(ctx, config):
+ if not config:
+ config = {}
+ assert isinstance(config, dict), \
+ "task only supports a dictionary for configuration"
+
+ log.info('Kubeadm start')
+
+ overrides = ctx.config.get('overrides', {})
+ teuthology.deep_merge(config, overrides.get('kubeadm', {}))
+ log.info('Config: ' + str(config))
+
+ # set up cluster context
+ if not hasattr(ctx, 'kubeadm'):
+ ctx.kubeadm = {}
+ if 'cluster' not in config:
+ config['cluster'] = 'kubeadm'
+ cluster_name = config['cluster']
+ if cluster_name not in ctx.kubeadm:
+ ctx.kubeadm[cluster_name] = argparse.Namespace()
+
+ with contextutil.nested(
+ lambda: preflight(ctx, config),
+ lambda: allocate_pod_subnet(ctx, config),
+ lambda: kubeadm_install(ctx, config),
+ lambda: kubeadm_init_join(ctx, config),
+ lambda: kubectl_config(ctx, config),
+ lambda: pod_network(ctx, config),
+ lambda: setup_pvs(ctx, config),
+ lambda: final(ctx, config),
+ ):
+ try:
+ log.info('Kubeadm complete, yielding')
+ yield
+
+ finally:
+ log.info('Tearing down kubeadm')
self.assertStatus(200)
self.assertSchemaBody(JObj({
'names': JList(str),
- 'nodes': JList(JObj({}, allow_unknown=True))
+ 'nodes': JList(JObj({}, allow_unknown=True)),
+ 'roots': JList(int)
}))
class HostControllerNoOrchestratorTest(DashboardTestCase):
def test_host_create(self):
- self._post('/api/host?hostname=foo')
+ self._post('/api/host?hostname=foo', {'status': ''}, version='0.1')
self.assertStatus(503)
self.assertError(code='orchestrator_status_unavailable',
component='orchestrator')
self.assertEqual(data['lock_retention_period_days'], 15)
self.assertEqual(data['lock_retention_period_years'], 0)
self.assertStatus(200)
+
+ # Update: Disabling bucket versioning should fail if object locking enabled
+ self._put('/api/rgw/bucket/teuth-test-bucket',
+ params={
+ 'bucket_id': data['id'],
+ 'uid': 'teuth-test-user',
+ 'versioning_state': 'Suspended'
+ })
+ self.assertStatus(409)
+
# Delete
self._delete('/api/rgw/bucket/teuth-test-bucket')
self.assertStatus(204)
self.wait_until_true(_check_connection, timeout=30)
def test_standby(self):
+ # skip this test if mgr_standby_modules=false
+ if self.mgr_cluster.mon_manager.raw_cluster_cmd(
+ "config", "get", "mgr", "mgr_standby_modules").strip() == "false":
+ log.info("Skipping test_standby since mgr_standby_modules=false")
+ return
+
original_active_id = self.mgr_cluster.get_active_id()
original_uri = self._get_uri("dashboard")
log.info("Originally running manager '{}' at {}".format(
# How long we expect to wait at most between taking an OSD out
# and seeing the progress event pop up.
- EVENT_CREATION_PERIOD = 5
+ EVENT_CREATION_PERIOD = 15
WRITE_PERIOD = 30
--- /dev/null
+[global]
+
+log to file = true
+
+mon clock drift allowed = 1.000
+
+# replicate across OSDs, not hosts
+osd crush chooseleaf type = 0
+
+# enable some debugging
+auth debug = true
+ms die on old message = true
+ms die on bug = true
+debug asserts on shutdown = true
+
+
+[osd]
+# debugging
+osd debug shutdown = true
+osd debug op order = true
+osd debug verify stray on activate = true
+osd debug pg log writeout = true
+osd debug verify cached snaps = true
+osd debug verify missing on start = true
+osd debug misdirected ops = true
+osd op queue = debug_random
+osd op queue cut off = debug_random
+osd shutdown pgref assert = true
+bdev debug aio = true
+osd sloppy crc = true
+
+
+[mon]
+# rotate auth tickets quickly to exercise renewal paths
+auth mon ticket ttl = 660 # 11m
+auth service ticket ttl = 240 # 4m
+
+# don't complain about global id reclaim
+mon_warn_on_insecure_global_id_reclaim = false
+mon_warn_on_insecure_global_id_reclaim_allowed = false
+
--- /dev/null
+"""
+Rook cluster task
+"""
+import argparse
+import configobj
+import contextlib
+import json
+import logging
+import os
+import yaml
+from io import BytesIO
+
+from tarfile import ReadError
+from tasks.ceph_manager import CephManager
+from teuthology import misc as teuthology
+from teuthology.config import config as teuth_config
+from teuthology.contextutil import safe_while
+from teuthology.orchestra import run
+from teuthology import contextutil
+from tasks.ceph import healthy
+from tasks.cephadm import update_archive_setting
+
+log = logging.getLogger(__name__)
+
+
+def _kubectl(ctx, config, args, **kwargs):
+ cluster_name = config.get('cluster', 'ceph')
+ return ctx.rook[cluster_name].remote.run(
+ args=['kubectl'] + args,
+ **kwargs
+ )
+
+
+def shell(ctx, config):
+ """
+ Run command(s) inside the rook tools container.
+
+ tasks:
+ - kubeadm:
+ - rook:
+ - rook.shell:
+ - ceph -s
+
+ or
+
+ tasks:
+ - kubeadm:
+ - rook:
+ - rook.shell:
+ commands:
+ - ceph -s
+
+ """
+ if isinstance(config, list):
+ config = {'commands': config}
+ for cmd in config.get('commands', []):
+ if isinstance(cmd, str):
+ _shell(ctx, config, cmd.split(' '))
+ else:
+ _shell(ctx, config, cmd)
+
+
+def _shell(ctx, config, args, **kwargs):
+ cluster_name = config.get('cluster', 'ceph')
+ return _kubectl(
+ ctx, config,
+ [
+ '-n', 'rook-ceph',
+ 'exec',
+ ctx.rook[cluster_name].toolbox, '--'
+ ] + args,
+ **kwargs
+ )
+
+
+@contextlib.contextmanager
+def rook_operator(ctx, config):
+ cluster_name = config['cluster']
+ rook_branch = config.get('rook_branch', 'master')
+ rook_git_url = config.get('rook_git_url', 'https://github.com/rook/rook')
+
+ log.info(f'Cloning {rook_git_url} branch {rook_branch}')
+ ctx.rook[cluster_name].remote.run(
+ args=[
+ 'rm', '-rf', 'rook',
+ run.Raw('&&'),
+ 'git',
+ 'clone',
+ '--single-branch',
+ '--branch', rook_branch,
+ rook_git_url,
+ 'rook',
+ ]
+ )
+
+ # operator.yaml
+ operator_yaml = ctx.rook[cluster_name].remote.read_file(
+ 'rook/cluster/examples/kubernetes/ceph/operator.yaml'
+ )
+ rook_image = config.get('rook_image')
+ if rook_image:
+ log.info(f'Patching operator to use image {rook_image}')
+ crs = list(yaml.load_all(operator_yaml, Loader=yaml.FullLoader))
+ assert len(crs) == 2
+ crs[1]['spec']['template']['spec']['containers'][0]['image'] = rook_image
+ operator_yaml = yaml.dump_all(crs)
+ ctx.rook[cluster_name].remote.write_file('operator.yaml', operator_yaml)
+
+ op_job = None
+ try:
+ log.info('Deploying operator')
+ _kubectl(ctx, config, [
+ 'create',
+ '-f', 'rook/cluster/examples/kubernetes/ceph/crds.yaml',
+ '-f', 'rook/cluster/examples/kubernetes/ceph/common.yaml',
+ '-f', 'operator.yaml',
+ ])
+
+ # on centos:
+ if teuthology.get_distro(ctx) == 'centos':
+ _kubectl(ctx, config, [
+ '-n', 'rook-ceph',
+ 'set', 'env', 'deploy/rook-ceph-operator',
+ 'ROOK_HOSTPATH_REQUIRES_PRIVILEGED=true'
+ ])
+
+ # wait for operator
+ op_name = None
+ with safe_while(sleep=10, tries=90, action="wait for operator") as proceed:
+ while not op_name and proceed():
+ p = _kubectl(
+ ctx, config,
+ ['-n', 'rook-ceph', 'get', 'pods', '-l', 'app=rook-ceph-operator'],
+ stdout=BytesIO(),
+ )
+ for line in p.stdout.getvalue().decode('utf-8').strip().splitlines():
+ name, ready, status, _ = line.split(None, 3)
+ if status == 'Running':
+ op_name = name
+ break
+
+ # log operator output
+ op_job = _kubectl(
+ ctx,
+ config,
+ ['-n', 'rook-ceph', 'logs', '-f', op_name],
+ wait=False,
+ logger=log.getChild('operator'),
+ )
+
+ yield
+
+ except Exception as e:
+ log.exception(e)
+ raise
+
+ finally:
+ log.info('Cleaning up rook operator')
+ _kubectl(ctx, config, [
+ 'delete',
+ '-f', 'operator.yaml',
+ ])
+ if False:
+ # don't bother since we'll tear down k8s anyway (and this mysteriously
+ # fails sometimes when deleting some of the CRDs... not sure why!)
+ _kubectl(ctx, config, [
+ 'delete',
+ '-f', 'rook/cluster/examples/kubernetes/ceph/common.yaml',
+ ])
+ _kubectl(ctx, config, [
+ 'delete',
+ '-f', 'rook/cluster/examples/kubernetes/ceph/crds.yaml',
+ ])
+ ctx.rook[cluster_name].remote.run(args=['rm', '-rf', 'rook', 'operator.yaml'])
+ if op_job:
+ op_job.wait()
+ run.wait(
+ ctx.cluster.run(
+ args=[
+ 'sudo', 'rm', '-rf', '/var/lib/rook'
+ ]
+ )
+ )
+
+
+@contextlib.contextmanager
+def ceph_log(ctx, config):
+ cluster_name = config['cluster']
+
+ log_dir = '/var/lib/rook/rook-ceph/log'
+ update_archive_setting(ctx, 'log', log_dir)
+
+ try:
+ yield
+
+ except Exception:
+ # we need to know this below
+ ctx.summary['success'] = False
+ raise
+
+ finally:
+ log.info('Checking cluster log for badness...')
+ def first_in_ceph_log(pattern, excludes):
+ """
+ Find the first occurrence of the pattern specified in the Ceph log,
+ Returns None if none found.
+
+ :param pattern: Pattern scanned for.
+ :param excludes: Patterns to ignore.
+ :return: First line of text (or None if not found)
+ """
+ args = [
+ 'sudo',
+ 'egrep', pattern,
+ f'{log_dir}/ceph.log',
+ ]
+ if excludes:
+ for exclude in excludes:
+ args.extend([run.Raw('|'), 'egrep', '-v', exclude])
+ args.extend([
+ run.Raw('|'), 'head', '-n', '1',
+ ])
+ r = ctx.rook[cluster_name].remote.run(
+ stdout=BytesIO(),
+ args=args,
+ )
+ stdout = r.stdout.getvalue().decode()
+ if stdout:
+ return stdout
+ return None
+
+ if first_in_ceph_log('\[ERR\]|\[WRN\]|\[SEC\]',
+ config.get('log-ignorelist')) is not None:
+ log.warning('Found errors (ERR|WRN|SEC) in cluster log')
+ ctx.summary['success'] = False
+ # use the most severe problem as the failure reason
+ if 'failure_reason' not in ctx.summary:
+ for pattern in ['\[SEC\]', '\[ERR\]', '\[WRN\]']:
+ match = first_in_ceph_log(pattern, config['log-ignorelist'])
+ if match is not None:
+ ctx.summary['failure_reason'] = \
+ '"{match}" in cluster log'.format(
+ match=match.rstrip('\n'),
+ )
+ break
+
+ if ctx.archive is not None and \
+ not (ctx.config.get('archive-on-error') and ctx.summary['success']):
+ # and logs
+ log.info('Compressing logs...')
+ run.wait(
+ ctx.cluster.run(
+ args=[
+ 'sudo',
+ 'find',
+ log_dir,
+ '-name',
+ '*.log',
+ '-print0',
+ run.Raw('|'),
+ 'sudo',
+ 'xargs',
+ '-0',
+ '--no-run-if-empty',
+ '--',
+ 'gzip',
+ '--',
+ ],
+ wait=False,
+ ),
+ )
+
+ log.info('Archiving logs...')
+ path = os.path.join(ctx.archive, 'remote')
+ try:
+ os.makedirs(path)
+ except OSError:
+ pass
+ for remote in ctx.cluster.remotes.keys():
+ sub = os.path.join(path, remote.name)
+ try:
+ os.makedirs(sub)
+ except OSError:
+ pass
+ try:
+ teuthology.pull_directory(remote, log_dir,
+ os.path.join(sub, 'log'))
+ except ReadError:
+ pass
+
+
+def build_initial_config(ctx, config):
+ path = os.path.join(os.path.dirname(__file__), 'rook-ceph.conf')
+ conf = configobj.ConfigObj(path, file_error=True)
+
+ # overrides
+ for section, keys in config.get('conf',{}).items():
+ for key, value in keys.items():
+ log.info(" override: [%s] %s = %s" % (section, key, value))
+ if section not in conf:
+ conf[section] = {}
+ conf[section][key] = value
+
+ return conf
+
+
+@contextlib.contextmanager
+def rook_cluster(ctx, config):
+ cluster_name = config['cluster']
+
+ # count how many OSDs we'll create
+ num_devs = 0
+ num_hosts = 0
+ for remote in ctx.cluster.remotes.keys():
+ ls = remote.read_file('/scratch_devs').decode('utf-8').strip().splitlines()
+ num_devs += len(ls)
+ num_hosts += 1
+ ctx.rook[cluster_name].num_osds = num_devs
+
+ # config
+ config = build_initial_config(ctx, config)
+ config_fp = BytesIO()
+ config.write(config_fp)
+ log.info(f'Config:\n{config_fp.getvalue()}')
+ _kubectl(ctx, config, ['create', '-f', '-'], stdin=yaml.dump({
+ 'apiVersion': 'v1',
+ 'kind': 'ConfigMap',
+ 'metadata': {
+ 'name': 'rook-config-override',
+ 'namespace': 'rook-ceph'},
+ 'data': {
+ 'config': config_fp.getvalue()
+ }
+ }))
+
+ # cluster
+ cluster = {
+ 'apiVersion': 'ceph.rook.io/v1',
+ 'kind': 'CephCluster',
+ 'metadata': {'name': 'rook-ceph', 'namespace': 'rook-ceph'},
+ 'spec': {
+ 'cephVersion': {
+ 'image': ctx.rook[cluster_name].image,
+ 'allowUnsupported': True,
+ },
+ 'dataDirHostPath': '/var/lib/rook',
+ 'skipUpgradeChecks': True,
+ 'mgr': {
+ 'count': 1,
+ 'modules': [
+ { 'name': 'rook', 'enabled': True },
+ ],
+ },
+ 'mon': {
+ 'count': num_hosts,
+ 'allowMultiplePerNode': True,
+ },
+ 'storage': {
+ 'storageClassDeviceSets': [
+ {
+ 'name': 'scratch',
+ 'count': num_devs,
+ 'portable': False,
+ 'volumeClaimTemplates': [
+ {
+ 'metadata': {'name': 'data'},
+ 'spec': {
+ 'resources': {
+ 'requests': {
+ 'storage': '10Gi' # <= (lte) the actual PV size
+ }
+ },
+ 'storageClassName': 'scratch',
+ 'volumeMode': 'Block',
+ 'accessModes': ['ReadWriteOnce'],
+ },
+ },
+ ],
+ }
+ ],
+ },
+ }
+ }
+ teuthology.deep_merge(cluster['spec'], config.get('spec', {}))
+
+ cluster_yaml = yaml.dump(cluster)
+ log.info(f'Cluster:\n{cluster_yaml}')
+ try:
+ ctx.rook[cluster_name].remote.write_file('cluster.yaml', cluster_yaml)
+ _kubectl(ctx, config, ['create', '-f', 'cluster.yaml'])
+ yield
+
+ except Exception as e:
+ log.exception(e)
+ raise
+
+ finally:
+ _kubectl(ctx, config, ['delete', '-f', 'cluster.yaml'], check_status=False)
+
+ # wait for cluster to shut down
+ log.info('Waiting for cluster to stop')
+ running = True
+ with safe_while(sleep=5, tries=100, action="wait for teardown") as proceed:
+ while running and proceed():
+ p = _kubectl(
+ ctx, config,
+ ['-n', 'rook-ceph', 'get', 'pods'],
+ stdout=BytesIO(),
+ )
+ running = False
+ for line in p.stdout.getvalue().decode('utf-8').strip().splitlines():
+ name, ready, status, _ = line.split(None, 3)
+ if (
+ name != 'NAME'
+ and not name.startswith('csi-')
+ and not name.startswith('rook-ceph-operator-')
+ and not name.startswith('rook-ceph-tools-')
+ ):
+ running = True
+ break
+
+ _kubectl(
+ ctx, config,
+ ['-n', 'rook-ceph', 'delete', 'configmap', 'rook-config-override'],
+ check_status=False,
+ )
+ ctx.rook[cluster_name].remote.run(args=['rm', '-f', 'cluster.yaml'])
+
+
+@contextlib.contextmanager
+def rook_toolbox(ctx, config):
+ cluster_name = config['cluster']
+ try:
+ _kubectl(ctx, config, [
+ 'create',
+ '-f', 'rook/cluster/examples/kubernetes/ceph/toolbox.yaml',
+ ])
+
+ log.info('Waiting for tools container to start')
+ toolbox = None
+ with safe_while(sleep=5, tries=100, action="wait for toolbox") as proceed:
+ while not toolbox and proceed():
+ p = _kubectl(
+ ctx, config,
+ ['-n', 'rook-ceph', 'get', 'pods', '-l', 'app=rook-ceph-tools'],
+ stdout=BytesIO(),
+ )
+ for line in p.stdout.getvalue().decode('utf-8').strip().splitlines():
+ name, ready, status, _ = line.split(None, 3)
+ if status == 'Running':
+ toolbox = name
+ break
+ ctx.rook[cluster_name].toolbox = toolbox
+ yield
+
+ except Exception as e:
+ log.exception(e)
+ raise
+
+ finally:
+ _kubectl(ctx, config, [
+ 'delete',
+ '-f', 'rook/cluster/examples/kubernetes/ceph/toolbox.yaml',
+ ], check_status=False)
+
+
+@contextlib.contextmanager
+def wait_for_osds(ctx, config):
+ cluster_name = config.get('cluster', 'ceph')
+
+ want = ctx.rook[cluster_name].num_osds
+ log.info(f'Waiting for {want} OSDs')
+ with safe_while(sleep=10, tries=90, action="check osd count") as proceed:
+ while proceed():
+ p = _shell(ctx, config, ['ceph', 'osd', 'stat', '-f', 'json'],
+ stdout=BytesIO(),
+ check_status=False)
+ if p.exitstatus == 0:
+ r = json.loads(p.stdout.getvalue().decode('utf-8'))
+ have = r.get('num_up_osds', 0)
+ if have == want:
+ break
+ log.info(f' have {have}/{want} OSDs')
+
+ yield
+
+
+@contextlib.contextmanager
+def ceph_config_keyring(ctx, config):
+ # get config and push to hosts
+ log.info('Distributing ceph config and client.admin keyring')
+ p = _shell(ctx, config, ['cat', '/etc/ceph/ceph.conf'], stdout=BytesIO())
+ conf = p.stdout.getvalue()
+ p = _shell(ctx, config, ['cat', '/etc/ceph/keyring'], stdout=BytesIO())
+ keyring = p.stdout.getvalue()
+ ctx.cluster.run(args=['sudo', 'mkdir', '-p', '/etc/ceph'])
+ for remote in ctx.cluster.remotes.keys():
+ remote.write_file(
+ '/etc/ceph/ceph.conf',
+ conf,
+ sudo=True,
+ )
+ remote.write_file(
+ '/etc/ceph/keyring',
+ keyring,
+ sudo=True,
+ )
+
+ try:
+ yield
+
+ except Exception as e:
+ log.exception(e)
+ raise
+
+ finally:
+ log.info('Cleaning up config and client.admin keyring')
+ ctx.cluster.run(args=[
+ 'sudo', 'rm', '-f',
+ '/etc/ceph/ceph.conf',
+ '/etc/ceph/ceph.client.admin.keyring'
+ ])
+
+
+@contextlib.contextmanager
+def ceph_clients(ctx, config):
+ cluster_name = config['cluster']
+
+ log.info('Setting up client nodes...')
+ clients = ctx.cluster.only(teuthology.is_type('client', cluster_name))
+ for remote, roles_for_host in clients.remotes.items():
+ for role in teuthology.cluster_roles_of_type(roles_for_host, 'client',
+ cluster_name):
+ name = teuthology.ceph_role(role)
+ client_keyring = '/etc/ceph/{0}.{1}.keyring'.format(cluster_name,
+ name)
+ r = _shell(ctx, config,
+ args=[
+ 'ceph', 'auth',
+ 'get-or-create', name,
+ 'mon', 'allow *',
+ 'osd', 'allow *',
+ 'mds', 'allow *',
+ 'mgr', 'allow *',
+ ],
+ stdout=BytesIO(),
+ )
+ keyring = r.stdout.getvalue()
+ remote.write_file(client_keyring, keyring, sudo=True, mode='0644')
+ yield
+
+
+@contextlib.contextmanager
+def task(ctx, config):
+ """
+ Deploy rook-ceph cluster
+
+ tasks:
+ - kubeadm:
+ - rook:
+ branch: wip-foo
+ spec:
+ mon:
+ count: 1
+
+ The spec item is deep-merged against the cluster.yaml. The branch, sha1, or
+ image items are used to determine the Ceph container image.
+ """
+ if not config:
+ config = {}
+ assert isinstance(config, dict), \
+ "task only supports a dictionary for configuration"
+
+ log.info('Rook start')
+
+ overrides = ctx.config.get('overrides', {})
+ teuthology.deep_merge(config, overrides.get('ceph', {}))
+ teuthology.deep_merge(config, overrides.get('rook', {}))
+ log.info('Config: ' + str(config))
+
+ # set up cluster context
+ if not hasattr(ctx, 'rook'):
+ ctx.rook = {}
+ if 'cluster' not in config:
+ config['cluster'] = 'ceph'
+ cluster_name = config['cluster']
+ if cluster_name not in ctx.rook:
+ ctx.rook[cluster_name] = argparse.Namespace()
+
+ ctx.rook[cluster_name].remote = list(ctx.cluster.remotes.keys())[0]
+
+ # image
+ teuth_defaults = teuth_config.get('defaults', {})
+ cephadm_defaults = teuth_defaults.get('cephadm', {})
+ containers_defaults = cephadm_defaults.get('containers', {})
+ container_image_name = containers_defaults.get('image', None)
+ if 'image' in config:
+ ctx.rook[cluster_name].image = config.get('image')
+ else:
+ sha1 = config.get('sha1')
+ flavor = config.get('flavor', 'default')
+ if sha1:
+ if flavor == "crimson":
+ ctx.rook[cluster_name].image = container_image_name + ':' + sha1 + '-' + flavor
+ else:
+ ctx.rook[cluster_name].image = container_image_name + ':' + sha1
+ else:
+ # hmm, fall back to branch?
+ branch = config.get('branch', 'master')
+ ctx.rook[cluster_name].image = container_image_name + ':' + branch
+ log.info('Ceph image is %s' % ctx.rook[cluster_name].image)
+
+ with contextutil.nested(
+ lambda: rook_operator(ctx, config),
+ lambda: ceph_log(ctx, config),
+ lambda: rook_cluster(ctx, config),
+ lambda: rook_toolbox(ctx, config),
+ lambda: wait_for_osds(ctx, config),
+ lambda: ceph_config_keyring(ctx, config),
+ lambda: ceph_clients(ctx, config),
+ ):
+ if not hasattr(ctx, 'managers'):
+ ctx.managers = {}
+ ctx.managers[cluster_name] = CephManager(
+ ctx.rook[cluster_name].remote,
+ ctx=ctx,
+ logger=log.getChild('ceph_manager.' + cluster_name),
+ cluster=cluster_name,
+ rook=True,
+ )
+ try:
+ if config.get('wait-for-healthy', True):
+ healthy(ctx=ctx, config=config)
+ log.info('Rook complete, yielding')
+ yield
+
+ finally:
+ log.info('Tearing down rook')
#!/usr/bin/env bash
# mount a NFS share for storing logs
+ sed -i 's/archive.ubuntu.com/old-releases.ubuntu.com/' /etc/apt/sources.list
+ sed -i 's/security.ubuntu.com/old-releases.ubuntu.com/' /etc/apt/sources.list
apt-get update
apt-get -y install nfs-common
mkdir /mnt/log
import logging
import re
+from teuthology import misc as teuthology
from teuthology.config import config as teuth_config
log = logging.getLogger(__name__)
log.info(subst_vip(ctx, config))
+def exec(ctx, config):
+ """
+ This is similar to the standard 'exec' task, but does the VIP substitutions.
+ """
+ assert isinstance(config, dict), "task exec got invalid config"
+
+ testdir = teuthology.get_testdir(ctx)
+
+ if 'all-roles' in config and len(config) == 1:
+ a = config['all-roles']
+ roles = teuthology.all_roles(ctx.cluster)
+ config = dict((id_, a) for id_ in roles if not id_.startswith('host.'))
+ elif 'all-hosts' in config and len(config) == 1:
+ a = config['all-hosts']
+ roles = teuthology.all_roles(ctx.cluster)
+ config = dict((id_, a) for id_ in roles if id_.startswith('host.'))
+
+ for role, ls in config.items():
+ (remote,) = ctx.cluster.only(role).remotes.keys()
+ log.info('Running commands on role %s host %s', role, remote.name)
+ for c in ls:
+ c.replace('$TESTDIR', testdir)
+ remote.run(
+ args=[
+ 'sudo',
+ 'TESTDIR={tdir}'.format(tdir=testdir),
+ 'bash',
+ '-c',
+ subst_vip(ctx, c)],
+ )
+
+
def map_vips(mip, count):
for mapping in teuth_config.get('vip', []):
mnet = ipaddress.ip_network(mapping['machine_subnet'])
run.Raw('PATH=$PATH:/usr/sbin'),
run.Raw('CEPH_BASE={dir}'.format(dir=clonedir)),
run.Raw('CEPH_ROOT={dir}'.format(dir=clonedir)),
+ run.Raw('CEPH_MNT={dir}'.format(dir=mnt)),
]
if env is not None:
for var, val in env.items():
# mgr does not
$CEPHADM rm-daemon --fsid $FSID --name mgr.x
+expect_false $CEPHADM zap-osds --fsid $FSID
+$CEPHADM zap-osds --fsid $FSID --force
+
## rm-cluster
-expect_false $CEPHADM rm-cluster --fsid $FSID
-$CEPHADM rm-cluster --fsid $FSID --force
+expect_false $CEPHADM rm-cluster --fsid $FSID --zap-osds
+$CEPHADM rm-cluster --fsid $FSID --force --zap-osds
echo PASS
ceph tell mon.\* injectargs '--mon-allow-pool-delete=true'
ceph osd pool rm device_health_metrics device_health_metrics --yes-i-really-really-mean-it
-# Take `orch device ls` as ground truth.
+# Take `orch device ls` and `orch ps` as ground truth.
ceph orch device ls --refresh
+ceph orch ps --refresh
sleep 10 # the previous call is asynchronous
ceph orch device ls --format=json | tee cypress/fixtures/orchestrator/inventory.json
+ceph orch ps --format=json | tee cypress/fixtures/orchestrator/services.json
DASHBOARD_ADMIN_SECRET_FILE="/tmp/dashboard-admin-secret.txt"
printf 'admin' > "${DASHBOARD_ADMIN_SECRET_FILE}"
cypress_run "orchestrator/01-hosts.e2e-spec.ts"
+ceph orch apply rgw foo --placement=3
+sleep 15
+ceph orch device ls --refresh
+ceph orch ps --refresh
+sleep 10 # the previous call is asynchronous
+ceph orch device ls --format=json | tee cypress/fixtures/orchestrator/inventory.json
+ceph orch ps --format=json | tee cypress/fixtures/orchestrator/services.json
+
+cypress_run "orchestrator/01-hosts-force-maintenance.e2e-spec.ts"
+
# Hosts are removed and added in the previous step. Do a refresh again.
+ceph orch rm rgw.foo
ceph orch device ls --refresh
+ceph orch ps --refresh
sleep 10
ceph orch device ls --format=json | tee cypress/fixtures/orchestrator/inventory.json
+ceph orch ps --format=json | tee cypress/fixtures/orchestrator/services.json
cypress_run "orchestrator/02-hosts-inventory.e2e-spec.ts"
cypress_run "orchestrator/03-inventory.e2e-spec.ts"
--- /dev/null
+#!/usr/bin/env bash
+set -ex
+
+# This testcase tests the scenario of the 'ceph fs subvolume rm' mgr command
+# when the osd is full. The command used to hang. The osd is of the size 1GB.
+# The subvolume is created and 500MB file is written. The full-ratios are
+# set below 500MB such that the osd is treated as full. Now the subvolume is
+# is removed. This should be successful with the introduction of FULL
+# capabilities which the mgr holds.
+
+set -e
+expect_failure() {
+ if "$@"; then return 1; else return 0; fi
+}
+
+ceph fs subvolume create cephfs sub_0
+subvol_path=$(ceph fs subvolume getpath cephfs sub_0 2>/dev/null)
+
+#For debugging
+echo "Before write"
+df -h
+ceph osd df
+
+sudo dd if=/dev/urandom of=$CEPH_MNT$subvol_path/500MB_file-1 status=progress bs=1M count=500
+
+ceph osd set-full-ratio 0.2
+ceph osd set-nearfull-ratio 0.16
+ceph osd set-backfillfull-ratio 0.18
+
+timeout=30
+while [ $timeout -gt 0 ]
+do
+ health=$(ceph health detail)
+ [[ $health = *"OSD_FULL"* ]] && echo "OSD is full" && break
+ echo "Wating for osd to be full: $timeout"
+ sleep 1
+ let "timeout-=1"
+done
+
+#For debugging
+echo "After ratio set"
+df -h
+ceph osd df
+
+#Delete subvolume
+ceph fs subvolume rm cephfs sub_0
+
+#Validate subvolume is deleted
+expect_failure ceph fs subvolume info cephfs sub_0
+
+#Wait for subvolume to delete data
+trashdir=$CEPH_MNT/volumes/_deleting
+timeout=30
+while [ $timeout -gt 0 ]
+do
+ [ -z "$(sudo ls -A $trashdir)" ] && echo "Trash directory $trashdir is empty" && break
+ echo "Wating for trash dir to be empty: $timeout"
+ sleep 1
+ let "timeout-=1"
+done
+
+echo OK
echo "testing trash purge..."
remove_images
+ rbd trash ls | wc -l | grep 0
+ rbd trash purge
+
+ rbd create $RBD_CREATE_ARGS --size 256 testimg1
+ rbd create $RBD_CREATE_ARGS --size 256 testimg2
+ rbd trash mv testimg1
+ rbd trash mv testimg2
+ rbd trash ls | wc -l | grep 2
+ rbd trash purge
+ rbd trash ls | wc -l | grep 0
+
+ rbd create $RBD_CREATE_ARGS --size 256 testimg1
+ rbd create $RBD_CREATE_ARGS --size 256 testimg2
+ rbd trash mv testimg1 --expires-at "1 hour"
+ rbd trash mv testimg2 --expires-at "3 hours"
+ rbd trash ls | wc -l | grep 2
+ rbd trash purge
+ rbd trash ls | wc -l | grep 2
+ rbd trash purge --expired-before "now + 2 hours"
+ rbd trash ls | wc -l | grep 1
+ rbd trash ls | grep testimg2
+ rbd trash purge --expired-before "now + 4 hours"
+ rbd trash ls | wc -l | grep 0
+
+ rbd create $RBD_CREATE_ARGS --size 256 testimg1
+ rbd snap create testimg1@snap # pin testimg1
+ rbd create $RBD_CREATE_ARGS --size 256 testimg2
+ rbd create $RBD_CREATE_ARGS --size 256 testimg3
+ rbd trash mv testimg1
+ rbd trash mv testimg2
+ rbd trash mv testimg3
+ rbd trash ls | wc -l | grep 3
+ rbd trash purge 2>&1 | grep 'some expired images could not be removed'
+ rbd trash ls | wc -l | grep 1
+ rbd trash ls | grep testimg1
+ ID=$(rbd trash ls | awk '{ print $1 }')
+ rbd snap purge --image-id $ID
+ rbd trash purge
+ rbd trash ls | wc -l | grep 0
+
+ rbd create $RBD_CREATE_ARGS --size 256 testimg1
+ rbd create $RBD_CREATE_ARGS --size 256 testimg2
+ rbd snap create testimg2@snap # pin testimg2
+ rbd create $RBD_CREATE_ARGS --size 256 testimg3
+ rbd trash mv testimg1
+ rbd trash mv testimg2
+ rbd trash mv testimg3
+ rbd trash ls | wc -l | grep 3
+ rbd trash purge 2>&1 | grep 'some expired images could not be removed'
+ rbd trash ls | wc -l | grep 1
+ rbd trash ls | grep testimg2
+ ID=$(rbd trash ls | awk '{ print $1 }')
+ rbd snap purge --image-id $ID
rbd trash purge
rbd trash ls | wc -l | grep 0
- rbd create $RBD_CREATE_ARGS foo -s 1
- rbd create $RBD_CREATE_ARGS bar -s 1
+ rbd create $RBD_CREATE_ARGS --size 256 testimg1
+ rbd create $RBD_CREATE_ARGS --size 256 testimg2
+ rbd create $RBD_CREATE_ARGS --size 256 testimg3
+ rbd snap create testimg3@snap # pin testimg3
+ rbd trash mv testimg1
+ rbd trash mv testimg2
+ rbd trash mv testimg3
+ rbd trash ls | wc -l | grep 3
+ rbd trash purge 2>&1 | grep 'some expired images could not be removed'
+ rbd trash ls | wc -l | grep 1
+ rbd trash ls | grep testimg3
+ ID=$(rbd trash ls | awk '{ print $1 }')
+ rbd snap purge --image-id $ID
+ rbd trash purge
+ rbd trash ls | wc -l | grep 0
- rbd trash mv foo --expires-at "10 sec"
- rbd trash mv bar --expires-at "30 sec"
+ # test purging a clone with a chain of parents
+ rbd create $RBD_CREATE_ARGS --size 256 testimg1
+ rbd snap create testimg1@snap
+ rbd clone --rbd-default-clone-format=2 testimg1@snap testimg2
+ rbd snap rm testimg1@snap
+ rbd create $RBD_CREATE_ARGS --size 256 testimg3
+ rbd snap create testimg2@snap
+ rbd clone --rbd-default-clone-format=2 testimg2@snap testimg4
+ rbd clone --rbd-default-clone-format=2 testimg2@snap testimg5
+ rbd snap rm testimg2@snap
+ rbd snap create testimg4@snap
+ rbd clone --rbd-default-clone-format=2 testimg4@snap testimg6
+ rbd snap rm testimg4@snap
+ rbd trash mv testimg1
+ rbd trash mv testimg2
+ rbd trash mv testimg3
+ rbd trash mv testimg4
+ rbd trash ls | wc -l | grep 4
+ rbd trash purge 2>&1 | grep 'some expired images could not be removed'
+ rbd trash ls | wc -l | grep 3
+ rbd trash ls | grep testimg1
+ rbd trash ls | grep testimg2
+ rbd trash ls | grep testimg4
+ rbd trash mv testimg6
+ rbd trash ls | wc -l | grep 4
+ rbd trash purge 2>&1 | grep 'some expired images could not be removed'
+ rbd trash ls | wc -l | grep 2
+ rbd trash ls | grep testimg1
+ rbd trash ls | grep testimg2
+ rbd trash mv testimg5
+ rbd trash ls | wc -l | grep 3
+ rbd trash purge
+ rbd trash ls | wc -l | grep 0
- rbd trash purge --expired-before "now + 10 sec"
- rbd trash ls | grep -v foo | wc -l | grep 1
- rbd trash ls | grep bar
+ rbd create $RBD_CREATE_ARGS --size 256 testimg1
+ rbd snap create testimg1@snap
+ rbd clone --rbd-default-clone-format=2 testimg1@snap testimg2
+ rbd snap rm testimg1@snap
+ rbd create $RBD_CREATE_ARGS --size 256 testimg3
+ rbd snap create testimg3@snap # pin testimg3
+ rbd snap create testimg2@snap
+ rbd clone --rbd-default-clone-format=2 testimg2@snap testimg4
+ rbd clone --rbd-default-clone-format=2 testimg2@snap testimg5
+ rbd snap rm testimg2@snap
+ rbd snap create testimg4@snap
+ rbd clone --rbd-default-clone-format=2 testimg4@snap testimg6
+ rbd snap rm testimg4@snap
+ rbd trash mv testimg1
+ rbd trash mv testimg2
+ rbd trash mv testimg3
+ rbd trash mv testimg4
+ rbd trash ls | wc -l | grep 4
+ rbd trash purge 2>&1 | grep 'some expired images could not be removed'
+ rbd trash ls | wc -l | grep 4
+ rbd trash mv testimg6
+ rbd trash ls | wc -l | grep 5
+ rbd trash purge 2>&1 | grep 'some expired images could not be removed'
+ rbd trash ls | wc -l | grep 3
+ rbd trash ls | grep testimg1
+ rbd trash ls | grep testimg2
+ rbd trash ls | grep testimg3
+ rbd trash mv testimg5
+ rbd trash ls | wc -l | grep 4
+ rbd trash purge 2>&1 | grep 'some expired images could not be removed'
+ rbd trash ls | wc -l | grep 1
+ rbd trash ls | grep testimg3
+ ID=$(rbd trash ls | awk '{ print $1 }')
+ rbd snap purge --image-id $ID
+ rbd trash purge
+ rbd trash ls | wc -l | grep 0
+
+ # test purging a clone with a chain of auto-delete parents
+ rbd create $RBD_CREATE_ARGS --size 256 testimg1
+ rbd snap create testimg1@snap
+ rbd clone --rbd-default-clone-format=2 testimg1@snap testimg2
+ rbd snap rm testimg1@snap
+ rbd create $RBD_CREATE_ARGS --size 256 testimg3
+ rbd snap create testimg2@snap
+ rbd clone --rbd-default-clone-format=2 testimg2@snap testimg4
+ rbd clone --rbd-default-clone-format=2 testimg2@snap testimg5
+ rbd snap rm testimg2@snap
+ rbd snap create testimg4@snap
+ rbd clone --rbd-default-clone-format=2 testimg4@snap testimg6
+ rbd snap rm testimg4@snap
+ rbd rm --rbd_move_parent_to_trash_on_remove=true testimg1
+ rbd rm --rbd_move_parent_to_trash_on_remove=true testimg2
+ rbd trash mv testimg3
+ rbd rm --rbd_move_parent_to_trash_on_remove=true testimg4
+ rbd trash ls | wc -l | grep 4
+ rbd trash purge 2>&1 | grep 'some expired images could not be removed'
+ rbd trash ls | wc -l | grep 3
+ rbd trash ls | grep testimg1
+ rbd trash ls | grep testimg2
+ rbd trash ls | grep testimg4
+ rbd trash mv testimg6
+ rbd trash ls | wc -l | grep 4
+ rbd trash purge 2>&1 | grep 'some expired images could not be removed'
+ rbd trash ls | wc -l | grep 2
+ rbd trash ls | grep testimg1
+ rbd trash ls | grep testimg2
+ rbd trash mv testimg5
+ rbd trash ls | wc -l | grep 3
+ rbd trash purge
+ rbd trash ls | wc -l | grep 0
- LAST_IMG=$(rbd trash ls | grep bar | awk '{print $1;}')
- rbd trash rm $LAST_IMG --force --no-progress | grep -v '.' | wc -l | grep 0
+ rbd create $RBD_CREATE_ARGS --size 256 testimg1
+ rbd snap create testimg1@snap
+ rbd clone --rbd-default-clone-format=2 testimg1@snap testimg2
+ rbd snap rm testimg1@snap
+ rbd create $RBD_CREATE_ARGS --size 256 testimg3
+ rbd snap create testimg3@snap # pin testimg3
+ rbd snap create testimg2@snap
+ rbd clone --rbd-default-clone-format=2 testimg2@snap testimg4
+ rbd clone --rbd-default-clone-format=2 testimg2@snap testimg5
+ rbd snap rm testimg2@snap
+ rbd snap create testimg4@snap
+ rbd clone --rbd-default-clone-format=2 testimg4@snap testimg6
+ rbd snap rm testimg4@snap
+ rbd rm --rbd_move_parent_to_trash_on_remove=true testimg1
+ rbd rm --rbd_move_parent_to_trash_on_remove=true testimg2
+ rbd trash mv testimg3
+ rbd rm --rbd_move_parent_to_trash_on_remove=true testimg4
+ rbd trash ls | wc -l | grep 4
+ rbd trash purge 2>&1 | grep 'some expired images could not be removed'
+ rbd trash ls | wc -l | grep 4
+ rbd trash mv testimg6
+ rbd trash ls | wc -l | grep 5
+ rbd trash purge 2>&1 | grep 'some expired images could not be removed'
+ rbd trash ls | wc -l | grep 3
+ rbd trash ls | grep testimg1
+ rbd trash ls | grep testimg2
+ rbd trash ls | grep testimg3
+ rbd trash mv testimg5
+ rbd trash ls | wc -l | grep 4
+ rbd trash purge 2>&1 | grep 'some expired images could not be removed'
+ rbd trash ls | wc -l | grep 1
+ rbd trash ls | grep testimg3
+ ID=$(rbd trash ls | awk '{ print $1 }')
+ rbd snap purge --image-id $ID
+ rbd trash purge
+ rbd trash ls | wc -l | grep 0
}
test_deep_copy_clone() {
# require the admin ceph user, as there's no way to pass the ceph user
# to qemu-iotests currently.
-testlist='001 002 003 004 005 008 009 010 011 021 025 032 033 055'
+testlist='001 002 003 004 005 008 009 010 011 021 025 032 033'
git clone https://github.com/qemu/qemu.git
cd qemu
-if lsb_release -da 2>&1 | grep -iq 'bionic'; then
+if lsb_release -da 2>&1 | grep -iqE '(bionic|focal)'; then
# Bionic requires a matching test harness
git checkout v2.11.0
elif lsb_release -da 2>&1 | grep -iqE '(xenial|linux release 8)'; then
ln -s /usr/bin/qemu-nbd
else
QEMU='/usr/libexec/qemu-kvm'
-
- # disable test 055 since qemu-kvm (RHEL/CentOS) doesn't support the
- # required QMP commands under EL7 and Python 3 is not supported by
- # the test under EL8
- testlist=$(echo ${testlist} | sed "s/ 055//g")
fi
ln -s $QEMU bin/qemu
#!/usr/bin/env bash
-set -ex
+# set -x
+set -e
# if defined, debug messages will be displayed and prepended with the string
# debug="DEBUG"
-huge_size=2222 # in megabytes
-big_size=6 # in megabytes
+huge_size=5100 # in megabytes
+big_size=7 # in megabytes
huge_obj=/tmp/huge_obj.temp.$$
big_obj=/tmp/big_obj.temp.$$
exit 1
fi
- set -v
local_file="$1"
remote_bkt="$2"
remote_obj="$3"
bkt="incomplete-mp-bkt-1"
mys3cmd mb s3://$bkt
-mys3uploadkill $huge_obj $bkt incomplete-mp-obj-1 $fifo 20
-mys3uploadkill $huge_obj $bkt incomplete-mp-obj-2 $fifo 100
+
+mys3uploadkill $huge_obj $bkt incomplete-mp-obj-c $fifo 20
+
+# generate an incomplete multipart with more than 1,000 parts
+mys3uploadkill $huge_obj $bkt incomplete-mp-obj-b $fifo 1005
+
+# generate more than 1000 incomplet multiparts
+for c in $(seq 1005) ;do
+ mys3uploadkill $huge_obj $bkt incomplete-mp-obj-c-$c $fifo 3
+done
####################################
# resharded bucket
-3cbe25cde3cfa028984618ad32de9edc4c1eaed0
-16.2.4
+0883bdea7337b95e4b611c768c0279868462204a
+16.2.5
set(cephsqlite_srcs libcephsqlite.cc SimpleRADOSStriper.cc)
add_library(cephsqlite ${CEPH_SHARED} ${cephsqlite_srcs})
target_link_libraries(cephsqlite PRIVATE cls_lock_client librados ceph-common SQLite3::SQLite3 ${EXTRALIBS})
+ set_target_properties(cephsqlite PROPERTIES
+ CXX_VISIBILITY_PRESET hidden
+ VISIBILITY_INLINES_HIDDEN ON)
+ if(NOT APPLE AND NOT WIN32)
+ set_property(TARGET cephsqlite APPEND_STRING PROPERTY
+ LINK_FLAGS " -Wl,--exclude-libs,ALL")
+ endif()
install(TARGETS cephsqlite DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif(WITH_LIBCEPHSQLITE)
#include "common/ceph_time.h"
#include "common/perf_counters.h"
-class SimpleRADOSStriper
+class [[gnu::visibility("default")]] SimpleRADOSStriper
{
public:
using aiocompletionptr = std::unique_ptr<librados::AioCompletion>;
requested_slots = fast_slots_per_device
requested_size = getattr(args, '{}_size'.format(type_), 0)
- if requested_size == 0:
+ if not requested_size or requested_size == 0:
# no size argument was specified, check ceph.conf
get_size_fct = getattr(prepare, 'get_{}_size'.format(type_))
requested_size = get_size_fct(lv_format=False)
if requested_size:
if requested_size <= abs_size:
abs_size = requested_size
+ relative_size = int(abs_size) / dev_size
else:
mlogger.error(
'{} was requested for {}, but only {} can be fulfilled'.format(
}
}
+ if (store.exists("mon_sync", "temp_newer_monmap")) {
+ dout(10) << __func__ << " found temp_newer_monmap" << dendl;
+ int err = store.get("mon_sync", "temp_newer_monmap", bl);
+ ceph_assert(err == 0);
+ ceph_assert(bl.length() > 0);
+ return 0;
+ }
+
if (store.exists("mkfs", "monmap")) {
dout(10) << __func__ << " found mkfs monmap" << dendl;
int err = store.get("mkfs", "monmap", bl);
<< " extract the monmap from the local monitor store and exit\n"
<< " --mon-data <directory>\n"
<< " where the mon store and keyring are located\n"
+ << " --set-crush-location <bucket>=<foo>"
+ << " sets monitor's crush bucket location (only for stretch mode)"
<< std::endl;
generic_server_usage();
}
bool compact = false;
bool force_sync = false;
bool yes_really = false;
- std::string osdmapfn, inject_monmap, extract_monmap;
+ std::string osdmapfn, inject_monmap, extract_monmap, crush_loc;
vector<const char*> args;
argv_to_vec(argc, argv, args);
inject_monmap = val;
} else if (ceph_argparse_witharg(args, i, &val, "--extract-monmap", (char*)NULL)) {
extract_monmap = val;
+ } else if (ceph_argparse_witharg(args, i, &val, "--set-crush-location", (char*)NULL)) {
+ crush_loc = val;
} else {
++i;
}
msgr->start();
mgr_msgr->start();
+ mon->set_mon_crush_location(crush_loc);
mon->init();
register_async_signal_handler_oneshot(SIGINT, handle_mon_signal);
LOG_DIR = '/var/log/ceph'
LOCK_DIR = '/run/cephadm'
LOGROTATE_DIR = '/etc/logrotate.d'
+SYSCTL_DIR = '/usr/lib/sysctl.d'
UNIT_DIR = '/etc/systemd/system'
LOG_DIR_MODE = 0o770
DATA_DIR_MODE = 0o700
self.data_dir: str = DATA_DIR
self.log_dir: str = LOG_DIR
self.logrotate_dir: str = LOGROTATE_DIR
+ self.sysctl_dir: str = SYSCTL_DIR
self.unit_dir: str = UNIT_DIR
self.verbose: bool = False
self.timeout: Optional[int] = DEFAULT_TIMEOUT
},
'log_file': {
'level': 'DEBUG',
- 'class': 'logging.handlers.RotatingFileHandler',
+ 'class': 'logging.handlers.WatchedFileHandler',
'formatter': 'cephadm',
'filename': '%s/cephadm.log' % LOG_DIR,
- 'maxBytes': 1024000,
- 'backupCount': 1,
}
},
'loggers': {
##################################
+class OSD(object):
+ @staticmethod
+ def get_sysctl_settings() -> List[str]:
+ return [
+ '# allow a large number of OSDs',
+ 'fs.aio-max-nr = 1048576',
+ 'kernel.pid_max = 4194304',
+ ]
+
+##################################
+
+
class Monitoring(object):
"""Define the configs for the monitoring containers"""
'args': [
'--config.file=/etc/prometheus/prometheus.yml',
'--storage.tsdb.path=/prometheus',
- '--web.listen-address=:{}'.format(port_map['prometheus'][0]),
],
'config-json-files': [
'prometheus.yml',
'cpus': '2',
'memory': '2GB',
'args': [
- '--web.listen-address=:{}'.format(port_map['alertmanager'][0]),
'--cluster.listen-address=:{}'.format(port_map['alertmanager'][1]),
],
'config-json-files': [
config_file = os.path.join(config_dir, fname)
config_content = dict_get_join(config_files, fname)
logger.info('Write file: %s' % (config_file))
- with open(config_file, 'w') as f:
+ with open(config_file, 'w', encoding='utf-8') as f:
os.fchown(f.fileno(), uid, gid)
os.fchmod(f.fileno(), 0o600)
f.write(config_content)
os.fchown(f.fileno(), uid, gid)
f.write(self.rgw.get('keyring', ''))
- def get_rados_grace_container(self, action):
- # type: (str) -> CephContainer
- """Container for a ganesha action on the grace db"""
- entrypoint = '/usr/bin/ganesha-rados-grace'
-
- assert self.pool
- args = ['--pool', self.pool]
- if self.namespace:
- args += ['--ns', self.namespace]
- if self.userid:
- args += ['--userid', self.userid]
- args += [action, self.get_daemon_name()]
-
- data_dir = get_data_dir(self.fsid, self.ctx.data_dir,
- self.daemon_type, self.daemon_id)
- volume_mounts = self.get_container_mounts(data_dir)
- envs = self.get_container_envs()
-
- logger.info('Creating RADOS grace for action: %s' % action)
- c = CephContainer(
- self.ctx,
- image=self.image,
- entrypoint=entrypoint,
- args=args,
- volume_mounts=volume_mounts,
- cname=self.get_container_name(desc='grace-%s' % action),
- envs=envs
- )
- return c
-
##################################
mounts[os.path.join(data_dir, 'haproxy')] = '/var/lib/haproxy'
return mounts
+ @staticmethod
+ def get_sysctl_settings() -> List[str]:
+ return [
+ '# IP forwarding',
+ 'net.ipv4.ip_forward = 1',
+ ]
+
##################################
return envs
@staticmethod
- def get_prestart():
- return (
- '# keepalived needs IP forwarding and non-local bind\n'
- 'sysctl net.ipv4.ip_forward=1\n'
- 'sysctl net.ipv4.ip_nonlocal_bind=1\n'
- )
+ def get_sysctl_settings() -> List[str]:
+ return [
+ '# IP forwarding and non-local bind',
+ 'net.ipv4.ip_forward = 1',
+ 'net.ipv4.ip_nonlocal_bind = 1',
+ ]
def extract_uid_gid_keepalived(self):
# better directory for this?
try:
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
s.bind((address, port))
- except (socket.error, OSError) as e: # py2 and py3
+ except OSError as e:
if e.errno == errno.EADDRINUSE:
msg = 'Cannot bind to IP %s port %d: %s' % (address, port, e)
logger.warning(msg)
raise PortOccupiedError(msg)
else:
- raise e
+ raise Error(e)
+ except Exception as e:
+ raise Error(e)
finally:
s.close()
lock_id, lock_filename, poll_intervall
)
time.sleep(poll_intervall)
- except: # noqa
+ except Exception:
# Something did go wrong, so decrement the counter.
self._lock_counter = max(0, self._lock_counter - 1)
##################################
+def json_loads_retry(cli_func):
+ for sleep_secs in [1, 4, 4]:
+ try:
+ return json.loads(cli_func())
+ except json.JSONDecodeError:
+ logger.debug('Invalid JSON. Retrying in %s seconds...' % sleep_secs)
+ time.sleep(sleep_secs)
+ return json.loads(cli_func())
+
+
def is_available(ctx, what, func):
# type: (CephadmContext, str, Callable[[], bool]) -> None
"""
def is_container_running(ctx: CephadmContext, name: str) -> bool:
- out, err, ret = call_throws(ctx, [
- ctx.container_engine.path, 'ps',
- '--format', '{{.Names}}'])
- return name in out
+ out, err, ret = call(ctx, [
+ ctx.container_engine.path, 'container', 'inspect',
+ '--format', '{{.State.Status}}', name
+ ])
+ return out == 'running'
def get_legacy_config_fsid(cluster, legacy_dir=None):
elif daemon_type in Monitoring.components:
metadata = Monitoring.components[daemon_type]
r += metadata.get('args', list())
+ # set ip and port to bind to for nodeexporter,alertmanager,prometheus
+ if daemon_type != 'grafana':
+ ip = ''
+ port = Monitoring.port_map[daemon_type][0]
+ if 'meta_json' in ctx and ctx.meta_json:
+ meta = json.loads(ctx.meta_json) or {}
+ if 'ip' in meta and meta['ip']:
+ ip = meta['ip']
+ if 'ports' in meta and meta['ports']:
+ port = meta['ports'][0]
+ r += [f'--web.listen-address={ip}:{port}']
if daemon_type == 'alertmanager':
config = get_parm(ctx.config_json)
peers = config.get('peers', list()) # type: ignore
if daemon_type in Monitoring.components.keys():
config_json: Dict[str, Any] = get_parm(ctx.config_json)
- required_files = Monitoring.components[daemon_type].get('config-json-files', list())
# Set up directories specific to the monitoring component
config_dir = ''
makedirs(os.path.join(data_dir_root, config_dir, 'data'), uid, gid, 0o755)
# populate the config directory for the component from the config-json
- for fname in required_files:
- if 'files' in config_json: # type: ignore
+ if 'files' in config_json:
+ for fname in config_json['files']:
content = dict_get_join(config_json['files'], fname)
- with open(os.path.join(data_dir_root, config_dir, fname), 'w') as f:
+ if os.path.isabs(fname):
+ fpath = os.path.join(data_dir_root, fname.lstrip(os.path.sep))
+ else:
+ fpath = os.path.join(data_dir_root, config_dir, fname)
+ with open(fpath, 'w', encoding='utf-8') as f:
os.fchown(f.fileno(), uid, gid)
os.fchmod(f.fileno(), 0o600)
f.write(content)
try:
with open(ctx.config, 'r') as f:
config = f.read()
- except FileNotFoundError:
- raise Error('config file: %s does not exist' % ctx.config)
+ except FileNotFoundError as e:
+ raise Error(e)
if 'key' in ctx and ctx.key:
keyring = '[%s]\n\tkey = %s\n' % (ctx.name, ctx.key)
try:
with open(ctx.keyring, 'r') as f:
keyring = f.read()
- except FileNotFoundError:
- raise Error('keyring file: %s does not exist' % ctx.keyring)
+ except FileNotFoundError as e:
+ raise Error(e)
return config, keyring
# these do not search for their keyrings in a data directory
mounts[data_dir + '/keyring'] = '/etc/ceph/ceph.client.%s.%s.keyring' % (daemon_type, daemon_id)
- if daemon_type in ['mon', 'osd']:
+ if daemon_type in ['mon', 'osd', 'clusterless-ceph-volume']:
mounts['/dev'] = '/dev' # FIXME: narrow this down?
mounts['/run/udev'] = '/run/udev'
- if daemon_type == 'osd':
+ if daemon_type in ['osd', 'clusterless-ceph-volume']:
mounts['/sys'] = '/sys' # for numa.cc, pick_address, cgroups, ...
+ mounts['/run/lvm'] = '/run/lvm'
+ mounts['/run/lock/lvm'] = '/run/lock/lvm'
+ if daemon_type == 'osd':
# selinux-policy in the container may not match the host.
if HostFacts(ctx).selinux_enabled:
selinux_folder = '/var/lib/ceph/%s/selinux' % fsid
if not os.path.exists(selinux_folder):
os.makedirs(selinux_folder, mode=0o755)
mounts[selinux_folder] = '/sys/fs/selinux:ro'
- mounts['/run/lvm'] = '/run/lvm'
- mounts['/run/lock/lvm'] = '/run/lock/lvm'
try:
if ctx.shared_ceph_folder: # make easy manager modules/ceph-volume development
entrypoint: str = ''
name: str = ''
ceph_args: List[str] = []
- envs: List[str] = []
+ envs: List[str] = [
+ 'TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES=134217728',
+ ]
host_network: bool = True
if container_args is None:
ports = ports or []
if any([port_in_use(ctx, port) for port in ports]):
- raise Error("TCP Port(s) '{}' required for {} already in use".format(','.join(map(str, ports)), daemon_type))
+ if daemon_type == 'mgr':
+ # non-fatal for mgr when we are in mgr_standby_modules=false, but we can't
+ # tell whether that is the case here.
+ logger.warning(
+ f"ceph-mgr TCP port(s) {','.join(map(str, ports))} already in use"
+ )
+ else:
+ raise Error("TCP Port(s) '{}' required for {} already in use".format(','.join(map(str, ports)), daemon_type))
data_dir = get_data_dir(fsid, ctx.data_dir, daemon_type, daemon_id)
if reconfig and not os.path.exists(data_dir):
# cmd
data_dir = get_data_dir(fsid, ctx.data_dir, daemon_type, daemon_id)
with open(data_dir + '/unit.run.new', 'w') as f, \
- open(data_dir + '/unit.meta.new', 'w') as metaf:
+ open(data_dir + '/unit.meta.new', 'w') as metaf:
f.write('set -e\n')
if daemon_type in Ceph.daemons:
memory_limit=ctx.memory_limit,
)
_write_container_cmd_to_bash(ctx, f, prestart, 'LVM OSDs use ceph-volume lvm activate')
- elif daemon_type == NFSGanesha.daemon_type:
- # add nfs to the rados grace db
- nfs_ganesha = NFSGanesha.init(ctx, fsid, daemon_id)
- prestart = nfs_ganesha.get_rados_grace_container('add')
- _write_container_cmd_to_bash(ctx, f, prestart, 'add daemon to rados grace')
elif daemon_type == CephIscsi.daemon_type:
f.write(' '.join(CephIscsi.configfs_mount_umount(data_dir, mount=True)) + '\n')
ceph_iscsi = CephIscsi.init(ctx, fsid, daemon_id)
tcmu_container = ceph_iscsi.get_tcmu_runner_container()
_write_container_cmd_to_bash(ctx, f, tcmu_container, 'iscsi tcmu-runnter container', background=True)
- elif daemon_type == Keepalived.daemon_type:
- f.write(Keepalived.get_prestart())
_write_container_cmd_to_bash(ctx, f, c, '%s.%s' % (daemon_type, str(daemon_id)))
daemon_id),
)
_write_container_cmd_to_bash(ctx, f, poststop, 'deactivate osd')
- elif daemon_type == NFSGanesha.daemon_type:
- # remove nfs from the rados grace db
- nfs_ganesha = NFSGanesha.init(ctx, fsid, daemon_id)
- poststop = nfs_ganesha.get_rados_grace_container('remove')
- _write_container_cmd_to_bash(ctx, f, poststop, 'remove daemon from rados grace')
elif daemon_type == CephIscsi.daemon_type:
# make sure we also stop the tcmu container
ceph_iscsi = CephIscsi.init(ctx, fsid, daemon_id)
os.rename(data_dir + '/unit.image.new',
data_dir + '/unit.image')
+ # sysctl
+ install_sysctl(ctx, fsid, daemon_type)
+
# systemd
install_base_units(ctx, fsid)
unit = get_unit_file(ctx, fsid)
def update_firewalld(ctx, daemon_type):
# type: (CephadmContext, str) -> None
firewall = Firewalld(ctx)
-
firewall.enable_service_for(daemon_type)
+ firewall.apply_rules()
- fw_ports = []
- if daemon_type in Monitoring.port_map.keys():
- fw_ports.extend(Monitoring.port_map[daemon_type]) # prometheus etc
+def install_sysctl(ctx: CephadmContext, fsid: str, daemon_type: str) -> None:
+ """
+ Set up sysctl settings
+ """
+ def _write(conf: Path, lines: List[str]) -> None:
+ lines = [
+ '# created by cephadm',
+ '',
+ *lines,
+ '',
+ ]
+ with open(conf, 'w') as f:
+ f.write('\n'.join(lines))
- firewall.open_ports(fw_ports)
- firewall.apply_rules()
+ conf = Path(ctx.sysctl_dir).joinpath(f'90-ceph-{fsid}-{daemon_type}.conf')
+ lines: Optional[List] = None
+
+ if daemon_type == 'osd':
+ lines = OSD.get_sysctl_settings()
+ elif daemon_type == 'haproxy':
+ lines = HAproxy.get_sysctl_settings()
+ elif daemon_type == 'keepalived':
+ lines = Keepalived.get_sysctl_settings()
+
+ # apply the sysctl settings
+ if lines:
+ _write(conf, lines)
+ call_throws(ctx, ['sysctl', '--system'])
def install_base_units(ctx, fsid):
'run',
'--rm',
'--ipc=host',
+ # some containers (ahem, haproxy) override this, but we want a fast
+ # shutdown always (and, more importantly, a successful exit even if we
+ # fall back to SIGKILL).
+ '--stop-signal=SIGTERM',
]
if isinstance(self.ctx.container_engine, Podman):
- # podman adds the container *name* to /etc/hosts (for 127.0.1.1)
- # by default, which makes python's socket.getfqdn() return that
- # instead of a valid hostname.
- cmd_args.append('--no-hosts')
if os.path.exists('/etc/ceph/podman-auth.json'):
cmd_args.append('--authfile=/etc/ceph/podman-auth.json')
if self.host_network:
cmd_args.append('--net=host')
+ if self.ctx.no_hosts:
+ cmd_args.append('--no-hosts')
if self.privileged:
cmd_args.extend([
'--privileged',
# quay.ceph.io/ceph/ceph -> ceph
# docker.io/ubuntu -> no change
bits = digest.split('/')
- if '.' not in bits[0] or len(bits) < 3:
+ if '.' not in bits[0] and len(bits) < 3:
digest = DEFAULT_REGISTRY + '/' + digest
return digest
if not ctx.skip_mon_network:
# make sure IP is configured locally, and then figure out the
# CIDR network
+ errmsg = f'Cannot infer CIDR network for mon IP `{base_ip}`'
for net, ifaces in list_networks(ctx).items():
ips: List[str] = []
for iface, ls in ifaces.items():
ips.extend(ls)
- if ipaddress.ip_address(unwrap_ipv6(base_ip)) in \
- [ipaddress.ip_address(ip) for ip in ips]:
- mon_network = net
- logger.info('Mon IP %s is in CIDR network %s' % (base_ip,
- mon_network))
- break
+ try:
+ if ipaddress.ip_address(unwrap_ipv6(base_ip)) in \
+ [ipaddress.ip_address(ip) for ip in ips]:
+ mon_network = net
+ logger.info(f'Mon IP `{base_ip}` is in CIDR network `{mon_network}`')
+ break
+ except ValueError as e:
+ logger.warning(f'{errmsg}: {e}')
if not mon_network:
- raise Error('Failed to infer CIDR network for mon ip %s; pass '
- '--skip-mon-network to configure it later' % base_ip)
+ raise Error(f'{errmsg}: pass --skip-mon-network to configure it later')
return (addr_arg, ipv6, mon_network)
cp.set('global', 'fsid', fsid)
cp.set('global', 'mon_host', mon_addr)
cp.set('global', 'container_image', image)
+
if not cp.has_section('mon'):
cp.add_section('mon')
if (
and not cp.has_option('mon', 'auth allow insecure global id reclaim')
):
cp.set('mon', 'auth_allow_insecure_global_id_reclaim', 'false')
+
+ if ctx.single_host_defaults:
+ logger.info('Adjusting default settings to suit single-host cluster...')
+ # replicate across osds, not hosts
+ if (
+ not cp.has_option('global', 'osd_crush_choose_leaf_type')
+ and not cp.has_option('global', 'osd crush choose leaf type')
+ ):
+ cp.set('global', 'osd_crush_choose_leaf_type', '0')
+ # replica 2x
+ if (
+ not cp.has_option('global', 'osd_pool_default_size')
+ and not cp.has_option('global', 'osd pool default size')
+ ):
+ cp.set('global', 'osd_pool_default_size', '2')
+ # disable mgr standby modules (so we can colocate multiple mgrs on one host)
+ if not cp.has_section('mgr'):
+ cp.add_section('mgr')
+ if (
+ not cp.has_option('mgr', 'mgr_standby_modules')
+ and not cp.has_option('mgr', 'mgr standby modules')
+ ):
+ cp.set('mgr', 'mgr_standby_modules', 'false')
+
cpf = StringIO()
cp.write(cpf)
config = cpf.getvalue()
except PermissionError:
raise Error(f'Unable to create {dirname} due to permissions failure. Retry with root, or sudo or preallocate the directory.')
+ (user_conf, _) = get_config_and_keyring(ctx)
+
if not ctx.skip_prepare_host:
command_prepare_host(ctx)
else:
# initial vars
fsid = ctx.fsid or make_fsid()
+ if not is_fsid(fsid):
+ raise Error('not an fsid: %s' % fsid)
+ logger.info('Cluster fsid: %s' % fsid)
+
hostname = get_hostname()
if '.' in hostname and not ctx.allow_fqdn_hostname:
raise Error('hostname is a fully qualified domain name (%s); either fix (e.g., "sudo hostname %s" or similar) or pass --allow-fqdn-hostname' % (hostname, hostname.split('.')[0]))
mon_id = ctx.mon_id or hostname
mgr_id = ctx.mgr_id or generate_service_id()
- logger.info('Cluster fsid: %s' % fsid)
lock = FileLock(ctx, fsid)
lock.acquire()
image_ver = CephContainer(ctx, ctx.image, 'ceph', ['--version']).run().strip()
logger.info(f'Ceph version: {image_ver}')
- image_release = image_ver.split()[4]
- if (
- not ctx.allow_mismatched_release
- and image_release not in [DEFAULT_IMAGE_RELEASE, LATEST_STABLE_RELEASE]
- ):
- raise Error(
- f'Container release {image_release} != cephadm release {DEFAULT_IMAGE_RELEASE}; please use matching version of cephadm (pass --allow-mismatched-release to continue anyway)'
- )
+
+ if not ctx.allow_mismatched_release:
+ image_release = image_ver.split()[4]
+ if image_release not in \
+ [DEFAULT_IMAGE_RELEASE, LATEST_STABLE_RELEASE]:
+ raise Error(
+ f'Container release {image_release} != cephadm release {DEFAULT_IMAGE_RELEASE};'
+ ' please use matching version of cephadm (pass --allow-mismatched-release to continue anyway)'
+ )
logger.info('Extracting ceph user uid/gid from container image...')
(uid, gid) = extract_uid_gid(ctx)
# create mgr
create_mgr(ctx, uid, gid, fsid, mgr_id, mgr_key, config, cli)
- def json_loads_retry(cli_func):
- for sleep_secs in [1, 4, 4]:
- try:
- return json.loads(cli_func())
- except json.JSONDecodeError:
- logger.debug('Invalid JSON. Retrying in %s seconds...' % sleep_secs)
- time.sleep(sleep_secs)
- return json.loads(cli_func())
+ if user_conf:
+ # user given config settings were already assimilated earlier
+ # but if the given settings contained any attributes in
+ # the mgr (e.g. mgr/cephadm/container_image_prometheus)
+ # they don't seem to be stored if there isn't a mgr yet.
+ # Since re-assimilating the same conf settings should be
+ # idempotent we can just do it again here.
+ with tempfile.NamedTemporaryFile(buffering=0) as tmp:
+ tmp.write(user_conf.encode('utf-8'))
+ cli(['config', 'assimilate-conf',
+ '-i', '/var/lib/ceph/user.conf'],
+ {tmp.name: '/var/lib/ceph/user.conf:z'})
# wait for mgr to restart (after enabling a module)
def wait_for_mgr_restart():
if not ctx.skip_dashboard:
prepare_dashboard(ctx, uid, gid, cli, wait_for_mgr_restart)
+ if ctx.output_config == '/etc/ceph/ceph.conf' and not ctx.skip_admin_label:
+ logger.info('Enabling client.admin keyring and conf on hosts with "admin" label')
+ try:
+ cli(['orch', 'client-keyring', 'set', 'client.admin', 'label:_admin'])
+ cli(['orch', 'host', 'label', 'add', get_hostname(), '_admin'])
+ except Exception:
+ logger.info('Unable to set up "admin" label; assuming older version of Ceph')
+
if ctx.apply_spec:
logger.info('Applying %s to cluster' % ctx.apply_spec)
elif daemon_type in Monitoring.components:
# monitoring daemon - prometheus, grafana, alertmanager, node-exporter
# Default Checks
- if not ctx.reconfig and not redeploy:
- daemon_ports.extend(Monitoring.port_map[daemon_type])
-
# make sure provided config-json is sufficient
config = get_parm(ctx.config_json) # type: ignore
required_files = Monitoring.components[daemon_type].get('config-json-files', list())
ports=daemon_ports)
elif daemon_type == NFSGanesha.daemon_type:
- if not ctx.reconfig and not redeploy:
- daemon_ports.extend(NFSGanesha.port_map.values())
+ if not ctx.reconfig and not redeploy and not daemon_ports:
+ daemon_ports = list(NFSGanesha.port_map.values())
config, keyring = get_config_and_keyring(ctx)
# TODO: extract ganesha uid/gid (997, 994) ?
os.path.join(home, f))
mounts[home] = '/root'
+ for i in ctx.volume:
+ a, b = i.split(':', 1)
+ mounts[a] = b
+
c = CephContainer(
ctx,
image=ctx.image,
privileged=True,
volume_mounts=mounts,
)
- verbosity = CallVerbosity.VERBOSE if ctx.log_output else CallVerbosity.VERBOSE_ON_FAILURE
- out, err, code = call_throws(ctx, c.run_cmd(), verbosity=verbosity)
+
+ out, err, code = call_throws(ctx, c.run_cmd())
if not code:
print(out)
##################################
+def _zap(ctx, what):
+ mounts = get_container_mounts(ctx, ctx.fsid, 'clusterless-ceph-volume', None)
+ c = CephContainer(
+ ctx,
+ image=ctx.image,
+ entrypoint='/usr/sbin/ceph-volume',
+ envs=ctx.env,
+ args=['lvm', 'zap', '--destroy', what],
+ privileged=True,
+ volume_mounts=mounts,
+ )
+ logger.info(f'Zapping {what}...')
+ out, err, code = call_throws(ctx, c.run_cmd())
+
+
+@infer_image
+def _zap_osds(ctx):
+ # assume fsid lock already held
+
+ # list
+ mounts = get_container_mounts(ctx, ctx.fsid, 'clusterless-ceph-volume', None)
+ c = CephContainer(
+ ctx,
+ image=ctx.image,
+ entrypoint='/usr/sbin/ceph-volume',
+ envs=ctx.env,
+ args=['inventory', '--format', 'json'],
+ privileged=True,
+ volume_mounts=mounts,
+ )
+ out, err, code = call_throws(ctx, c.run_cmd())
+ if code:
+ raise Error('failed to list osd inventory')
+ try:
+ ls = json.loads(out)
+ except ValueError as e:
+ raise Error(f'Invalid JSON in ceph-volume inventory: {e}')
+
+ for i in ls:
+ matches = [lv.get('cluster_fsid') == ctx.fsid for lv in i.get('lvs', [])]
+ if any(matches) and all(matches):
+ _zap(ctx, i.get('path'))
+ elif any(matches):
+ lv_names = [lv['name'] for lv in i.get('lvs', [])]
+ # TODO: we need to map the lv_names back to device paths (the vg
+ # id isn't part of the output here!)
+ logger.warning(f'Not zapping LVs (not implemented): {lv_names}')
+
+
+def command_zap_osds(ctx):
+ if not ctx.force:
+ raise Error('must pass --force to proceed: '
+ 'this command may destroy precious data!')
+
+ lock = FileLock(ctx, ctx.fsid)
+ lock.acquire()
+
+ _zap_osds(ctx)
+
+##################################
+
+
def command_rm_cluster(ctx):
# type: (CephadmContext) -> None
if not ctx.force:
call(ctx, ['systemctl', 'stop', slice_name],
verbosity=CallVerbosity.DEBUG)
+ # osds?
+ if ctx.zap_osds:
+ _zap_osds(ctx)
+
# rm units
- call_throws(ctx, ['rm', '-f', ctx.unit_dir + # noqa: W504
- '/ceph-%s@.service' % ctx.fsid])
- call_throws(ctx, ['rm', '-f', ctx.unit_dir + # noqa: W504
- '/ceph-%s.target' % ctx.fsid])
+ call_throws(ctx, ['rm', '-f', ctx.unit_dir
+ + '/ceph-%s@.service' % ctx.fsid])
+ call_throws(ctx, ['rm', '-f', ctx.unit_dir
+ + '/ceph-%s.target' % ctx.fsid])
call_throws(ctx, ['rm', '-rf',
ctx.unit_dir + '/ceph-%s.target.wants' % ctx.fsid])
# rm data
if not ctx.keep_logs:
# rm logs
call_throws(ctx, ['rm', '-rf', ctx.log_dir + '/' + ctx.fsid])
- call_throws(ctx, ['rm', '-rf', ctx.log_dir + # noqa: W504
- '/*.wants/ceph-%s@*' % ctx.fsid])
+ call_throws(ctx, ['rm', '-rf', ctx.log_dir
+ + '/*.wants/ceph-%s@*' % ctx.fsid])
# rm logrotate config
call_throws(ctx, ['rm', '-f', ctx.logrotate_dir + '/ceph-%s' % ctx.fsid])
+ # rm cephadm logrotate config if last cluster on host
+ if not os.listdir(ctx.data_dir):
+ call_throws(ctx, ['rm', '-f', ctx.logrotate_dir + '/cephadm'])
+
+ # rm sysctl settings
+ sysctl_dir = Path(ctx.sysctl_dir)
+ for p in sysctl_dir.glob(f'90-ceph-{ctx.fsid}-*.conf'):
+ p.unlink()
+
# clean up config, keyring, and pub key files
files = ['/etc/ceph/ceph.conf', '/etc/ceph/ceph.pub', '/etc/ceph/ceph.client.admin.keyring']
if os.path.exists(files[n]):
os.remove(files[n])
+
##################################
if self.ctx.gpg_url:
return self.ctx.gpg_url
if self.stable or self.version:
- return 'https://download.ceph.com/keys/release.asc', 'release'
+ return 'https://download.ceph.com/keys/release.gpg', 'release'
else:
- return 'https://download.ceph.com/keys/autobuild.asc', 'autobuild'
+ return 'https://download.ceph.com/keys/autobuild.gpg', 'autobuild'
def enable_service(self, service):
"""
logger.error('failed to fetch GPG repo key from %s: %s' % (
url, err))
raise Error('failed to fetch GPG key')
- key = response.read().decode('utf-8')
- with open('/etc/apt/trusted.gpg.d/ceph.%s.gpg' % name, 'w') as f:
+ key = response.read()
+ with open('/etc/apt/trusted.gpg.d/ceph.%s.gpg' % name, 'wb') as f:
f.write(key)
if self.version:
with open(self.repo_path(), 'w') as f:
f.write(content)
+ self.update()
+
def rm_repo(self):
for name in ['autobuild', 'release']:
p = '/etc/apt/trusted.gpg.d/ceph.%s.gpg' % name
logger.info('Installing packages %s...' % ls)
call_throws(self.ctx, ['apt-get', 'install', '-y'] + ls)
+ def update(self):
+ logger.info('Updating package list...')
+ call_throws(self.ctx, ['apt-get', 'update'])
+
def install_podman(self):
if self.distro == 'ubuntu':
logger.info('Setting up repo for podman...')
self.add_kubic_repo()
- call_throws(self.ctx, ['apt-get', 'update'])
+ self.update()
logger.info('Attempting podman install...')
try:
'centos': ('centos', 'el'),
'rhel': ('centos', 'el'),
'scientific': ('centos', 'el'),
+ 'rocky': ('centos', 'el'),
'fedora': ('fedora', 'fc'),
}
self.distro_code)
def add_repo(self):
+ if self.distro_code.startswith('fc'):
+ raise Error('Ceph team does not build Fedora specific packages and therefore cannot add repos for this distro')
+ if self.distro_code == 'el7':
+ if self.stable and self.stable >= 'pacific':
+ raise Error('Ceph does not support pacific or later for this version of this linux distro and therefore cannot add a repo for it')
+ if self.version and self.version.split('.')[0] >= '16':
+ raise Error('Ceph does not support 16.y.z or later for this version of this linux distro and therefore cannot add a repo for it')
if self.stable or self.version:
content = ''
for n, t in {
(x, y, z) = ctx.version.split('.')
except Exception:
raise Error('version must be in the form x.y.z (e.g., 15.2.0)')
+ if ctx.release:
+ # Pacific =/= pacific in this case, set to undercase to avoid confision
+ ctx.release = ctx.release.lower()
pkg = create_packager(ctx, stable=ctx.release,
version=ctx.version,
branch=ctx.dev,
commit=ctx.dev_commit)
pkg.add_repo()
+ logger.info('Completed adding repo.')
def command_rm_repo(ctx: CephadmContext):
security['description'] = 'AppArmor: Enabled'
try:
profiles = read_file(['/sys/kernel/security/apparmor/profiles'])
+ if len(profiles) == 0:
+ return {}
except OSError:
pass
else:
host = HostFacts(ctx)
print(host.dump())
-##################################
-
-
-def command_verify_prereqs(ctx: CephadmContext):
- if ctx.service_type == 'haproxy' or ctx.service_type == 'keepalived':
- out, err, code = call(
- ctx, ['sysctl', '-n', 'net.ipv4.ip_nonlocal_bind']
- )
- if out.strip() != '1':
- raise Error('net.ipv4.ip_nonlocal_bind not set to 1')
##################################
The token is installed at deployment time and must be provided to
ensure we only respond to callers who know our token i.e. mgr
"""
+
def wrapper(self, *args, **kwargs):
auth = self.headers.get('Authorization', None)
if auth != 'Bearer ' + self.server.token:
self.send_error(401)
return
f(self, *args, **kwargs)
+
return wrapper
def _help_page(self):
# expects to use
self.ctx.command = 'inventory --format=json'.split()
self.ctx.fsid = self.fsid
- self.ctx.log_output = False
ctr = 0
exception_encountered = False
'--logrotate-dir',
default=LOGROTATE_DIR,
help='location of logrotate configuration files')
+ parser.add_argument(
+ '--sysctl-dir',
+ default=SYSCTL_DIR,
+ help='location of sysctl configuration files')
parser.add_argument(
'--unit-dir',
default=UNIT_DIR,
'--keep-logs',
action='store_true',
help='do not remove log files')
+ parser_rm_cluster.add_argument(
+ '--zap-osds',
+ action='store_true',
+ help='zap OSD devices for this cluster')
parser_run = subparsers.add_parser(
'run', help='run a ceph daemon, in a container, in the foreground')
action='append',
default=[],
help='set environment variable')
+ parser_shell.add_argument(
+ '--volume', '-v',
+ action='append',
+ default=[],
+ help='set environment variable')
parser_shell.add_argument(
'command', nargs=argparse.REMAINDER,
help='command (optional)')
+ parser_shell.add_argument(
+ '--no-hosts',
+ action='store_true',
+ help='dont pass /etc/hosts through to the container')
parser_enter = subparsers.add_parser(
'enter', help='run an interactive shell inside a running daemon container')
parser_ceph_volume.add_argument(
'--keyring', '-k',
help='ceph.keyring to pass through to the container')
- parser_ceph_volume.add_argument(
- '--log-output',
- action='store_true',
- default=True,
- help='suppress ceph volume output from the log')
parser_ceph_volume.add_argument(
'command', nargs=argparse.REMAINDER,
help='command')
+ parser_zap_osds = subparsers.add_parser(
+ 'zap-osds', help='zap all OSDs associated with a particular fsid')
+ parser_zap_osds.set_defaults(func=command_zap_osds)
+ parser_zap_osds.add_argument(
+ '--fsid',
+ required=True,
+ help='cluster FSID')
+ parser_zap_osds.add_argument(
+ '--force',
+ action='store_true',
+ help='proceed, even though this may destroy valuable data')
+
parser_unit = subparsers.add_parser(
'unit', help="operate on the daemon's systemd unit")
parser_unit.set_defaults(func=command_unit)
parser_bootstrap.add_argument(
'--output-pub-ssh-key',
help="location to write the cluster's public SSH key")
+ parser_bootstrap.add_argument(
+ '--skip-admin-label',
+ action='store_true',
+ help='do not create admin label for ceph.conf and client.admin keyring distribution')
parser_bootstrap.add_argument(
'--skip-ssh',
action='store_true',
parser_bootstrap.add_argument(
'--cluster-network',
help='subnet to use for cluster replication, recovery and heartbeats (in CIDR notation network/mask)')
+ parser_bootstrap.add_argument(
+ '--single-host-defaults',
+ action='store_true',
+ help='adjust configuration defaults to suit a single-host cluster')
parser_deploy = subparsers.add_parser(
'deploy', help='deploy a daemon')
help='Maintenance action - enter maintenance, or exit maintenance')
parser_maintenance.set_defaults(func=command_maintenance)
- parser_verify_prereqs = subparsers.add_parser(
- 'verify-prereqs',
- help='verify system prerequisites for a given service are met on this host')
- parser_verify_prereqs.set_defaults(func=command_verify_prereqs)
- parser_verify_prereqs.add_argument(
- '--daemon-type',
- required=True,
- help='service type of service to whose prereqs will be checked')
-
return parser
return args
-def cephadm_init_ctx(args: List[str]) -> Optional[CephadmContext]:
-
+def cephadm_init_ctx(args: List[str]) -> CephadmContext:
ctx = CephadmContext()
ctx.set_args(_parse_args(args))
return ctx
-def cephadm_init(args: List[str]) -> Optional[CephadmContext]:
-
+def cephadm_init(args: List[str]) -> CephadmContext:
global logger
ctx = cephadm_init_ctx(args)
- assert ctx is not None
# Logger configuration
if not os.path.exists(LOG_DIR):
dictConfig(logging_config)
logger = logging.getLogger()
+ if not os.path.exists(ctx.logrotate_dir + '/cephadm'):
+ with open(ctx.logrotate_dir + '/cephadm', 'w') as f:
+ f.write("""# created by cephadm
+/var/log/ceph/cephadm.log {
+ rotate 7
+ daily
+ compress
+ missingok
+ notifempty
+}
+""")
+
if ctx.verbose:
for handler in logger.handlers:
if handler.name == 'console':
handler.setLevel(logging.DEBUG)
- if not ctx.has_function():
- sys.stderr.write('No command specified; pass -h or --help for usage\n')
- return None
-
return ctx
av = sys.argv[1:]
ctx = cephadm_init(av)
- if not ctx: # error, exit
+ if not ctx.has_function():
+ sys.stderr.write('No command specified; pass -h or --help for usage\n')
sys.exit(1)
try:
# podman or docker?
ctx.container_engine = find_container_engine(ctx)
if ctx.func not in \
- [command_check_host, command_prepare_host, command_add_repo]:
+ [command_check_host, command_prepare_host, command_add_repo, command_install]:
check_container_engine(ctx)
# command handler
r = ctx.func(ctx)
-
import mock
-from mock import patch
-import pytest
-
import os
+import pytest
import time
-with patch('builtins.open', create=True):
+from contextlib import contextmanager
+from pyfakefs import fake_filesystem
+
+from typing import Callable, Dict, List, Optional
+
+
+with mock.patch('builtins.open', create=True):
from importlib.machinery import SourceFileLoader
cd = SourceFileLoader('cephadm', 'cephadm').load_module()
+def mock_docker():
+ docker = mock.Mock(cd.Docker)
+ docker.path = '/usr/bin/docker'
+ return docker
+
+
+def mock_podman():
+ podman = mock.Mock(cd.Podman)
+ podman.path = '/usr/bin/podman'
+ podman.version = (2, 1, 0)
+ return podman
+
+
def _daemon_path():
return os.getcwd()
exporter = cd.CephadmDaemon(ctx, fsid='foobar', daemon_id='test')
assert exporter.token == 'MyAccessToken'
yield exporter
+
+
+@pytest.fixture()
+def cephadm_fs(
+ fs: fake_filesystem.FakeFilesystem,
+):
+ """
+ use pyfakefs to stub filesystem calls
+ """
+ uid = os.getuid()
+ gid = os.getgid()
+
+ with mock.patch('os.fchown'), \
+ mock.patch('cephadm.extract_uid_gid', return_value=(uid, gid)):
+
+ fs.create_dir(cd.DATA_DIR)
+ fs.create_dir(cd.LOG_DIR)
+ fs.create_dir(cd.LOCK_DIR)
+ fs.create_dir(cd.LOGROTATE_DIR)
+ fs.create_dir(cd.UNIT_DIR)
+
+ yield fs
+
+
+@contextmanager
+def with_cephadm_ctx(
+ cmd: List[str],
+ container_engine: Callable = mock_podman(),
+ list_networks: Optional[Dict[str,Dict[str,List[str]]]] = None,
+ hostname: Optional[str] = None,
+):
+ """
+ :param cmd: cephadm command argv
+ :param container_engine: container engine mock (podman or docker)
+ :param list_networks: mock 'list-networks' return
+ :param hostname: mock 'socket.gethostname' return
+ """
+ if not list_networks:
+ list_networks = {}
+ if not hostname:
+ hostname = 'host1'
+
+ with mock.patch('cephadm.get_parm'), \
+ mock.patch('cephadm.attempt_bind'), \
+ mock.patch('cephadm.call', return_value=('', '', 0)), \
+ mock.patch('cephadm.find_executable', return_value='foo'), \
+ mock.patch('cephadm.is_available', return_value=True), \
+ mock.patch('cephadm.json_loads_retry', return_value={'epoch' : 1}), \
+ mock.patch('cephadm.list_networks', return_value=list_networks), \
+ mock.patch('socket.gethostname', return_value=hostname):
+ ctx: cd.CephadmContext = cd.cephadm_init_ctx(cmd)
+ ctx.container_engine = container_engine
+ yield ctx
# type: ignore
-from typing import List, Optional
+
+import errno
import mock
-from mock import patch, call
import os
+import pytest
+import socket
import sys
-import unittest
-import threading
import time
-import errno
-import socket
+import threading
+import unittest
+
from http.server import HTTPServer
from urllib.request import Request, urlopen
from urllib.error import HTTPError
-import pytest
+from typing import List, Optional
-from .fixtures import exporter
+from .fixtures import (
+ cephadm_fs,
+ exporter,
+ mock_docker,
+ mock_podman,
+ with_cephadm_ctx,
+)
-with patch('builtins.open', create=True):
+
+with mock.patch('builtins.open', create=True):
from importlib.machinery import SourceFileLoader
cd = SourceFileLoader('cephadm', 'cephadm').load_module()
-class TestCephAdm(object):
-
- @staticmethod
- def mock_docker():
- docker = mock.Mock(cd.Docker)
- docker.path = '/usr/bin/docker'
- return docker
- @staticmethod
- def mock_podman():
- podman = mock.Mock(cd.Podman)
- podman.path = '/usr/bin/podman'
- podman.version = (2, 1, 0)
- return podman
+class TestCephAdm(object):
def test_docker_unit_file(self):
ctx = mock.Mock()
- ctx.container_engine = self.mock_docker()
+ ctx.container_engine = mock_docker()
r = cd.get_unit_file(ctx, '9b9d7609-f4d5-4aba-94c8-effa764d96c9')
assert 'Requires=docker.service' in r
- ctx.container_engine = self.mock_podman()
+ ctx.container_engine = mock_podman()
r = cd.get_unit_file(ctx, '9b9d7609-f4d5-4aba-94c8-effa764d96c9')
assert 'Requires=docker.service' not in r
for side_effect, expected_exception in (
(os_error(errno.EADDRINUSE), cd.PortOccupiedError),
- (os_error(errno.EAFNOSUPPORT), OSError),
- (os_error(errno.EADDRNOTAVAIL), OSError),
+ (os_error(errno.EAFNOSUPPORT), cd.Error),
+ (os_error(errno.EADDRNOTAVAIL), cd.Error),
(None, None),
):
_socket = mock.Mock()
except:
assert False
else:
- assert _socket.call_args == call(address_family, socket.SOCK_STREAM)
+ assert _socket.call_args == mock.call(address_family, socket.SOCK_STREAM)
@mock.patch('socket.socket')
@mock.patch('cephadm.logger')
):
for side_effect, expected_exception in (
(os_error(errno.EADDRINUSE), cd.PortOccupiedError),
- (os_error(errno.EADDRNOTAVAIL), OSError),
- (os_error(errno.EAFNOSUPPORT), OSError),
+ (os_error(errno.EADDRNOTAVAIL), cd.Error),
+ (os_error(errno.EAFNOSUPPORT), cd.Error),
(None, None),
):
mock_socket_obj = mock.Mock()
# test normal valid login with url, username and password specified
call_throws.return_value = '', '', 0
- ctx: Optional[cd.CephadmContext] = cd.cephadm_init_ctx(
+ ctx: cd.CephadmContext = cd.cephadm_init_ctx(
['registry-login', '--registry-url', 'sample-url',
'--registry-username', 'sample-user', '--registry-password',
'sample-pass'])
- ctx.container_engine = self.mock_docker()
- assert ctx
+ ctx.container_engine = mock_docker()
retval = cd.command_registry_login(ctx)
assert retval == 0
# test bad login attempt with invalid arguments given
- ctx: Optional[cd.CephadmContext] = cd.cephadm_init_ctx(
+ ctx: cd.CephadmContext = cd.cephadm_init_ctx(
['registry-login', '--registry-url', 'bad-args-url'])
- assert ctx
with pytest.raises(Exception) as e:
assert cd.command_registry_login(ctx)
assert str(e.value) == ('Invalid custom registry arguments received. To login to a custom registry include '
# test normal valid login with json file
get_parm.return_value = {"url": "sample-url", "username": "sample-username", "password": "sample-password"}
- ctx: Optional[cd.CephadmContext] = cd.cephadm_init_ctx(
+ ctx: cd.CephadmContext = cd.cephadm_init_ctx(
['registry-login', '--registry-json', 'sample-json'])
- ctx.container_engine = self.mock_docker()
- assert ctx
+ ctx.container_engine = mock_docker()
retval = cd.command_registry_login(ctx)
assert retval == 0
# test bad login attempt with bad json file
get_parm.return_value = {"bad-json": "bad-json"}
- ctx: Optional[cd.CephadmContext] = cd.cephadm_init_ctx(
+ ctx: cd.CephadmContext = cd.cephadm_init_ctx(
['registry-login', '--registry-json', 'sample-json'])
- assert ctx
with pytest.raises(Exception) as e:
assert cd.command_registry_login(ctx)
assert str(e.value) == ("json provided for custom registry login did not include all necessary fields. "
# test login attempt with valid arguments where login command fails
call_throws.side_effect = Exception
- ctx: Optional[cd.CephadmContext] = cd.cephadm_init_ctx(
+ ctx: cd.CephadmContext = cd.cephadm_init_ctx(
['registry-login', '--registry-url', 'sample-url',
'--registry-username', 'sample-user', '--registry-password',
'sample-pass'])
- assert ctx
with pytest.raises(Exception) as e:
cd.command_registry_login(ctx)
assert str(e.value) == "Failed to login to custom registry @ sample-url as sample-user with given password"
image = cd._filter_last_local_ceph_image(out)
assert image == 'docker.io/ceph/ceph:v15.2.5'
+ def test_normalize_image_digest(self):
+ s = 'myhostname:5000/ceph/ceph@sha256:753886ad9049004395ae990fbb9b096923b5a518b819283141ee8716ddf55ad1'
+ assert cd.normalize_image_digest(s) == s
+
+ s = 'ceph/ceph:latest'
+ assert cd.normalize_image_digest(s) == f'{cd.DEFAULT_REGISTRY}/{s}'
class TestCustomContainer(unittest.TestCase):
cc: cd.CustomContainer
_call.return_value = '', '{}, version 0.16.1'.format(daemon_type.replace('-', '_')), 0
version = cd.Monitoring.get_version(ctx, 'container_id', daemon_type)
assert version == '0.16.1'
+
+ @mock.patch('cephadm.os.fchown')
+ @mock.patch('cephadm.get_parm')
+ @mock.patch('cephadm.makedirs')
+ @mock.patch('cephadm.open')
+ @mock.patch('cephadm.make_log_dir')
+ @mock.patch('cephadm.make_data_dir')
+ def test_create_daemon_dirs_prometheus(self, make_data_dir, make_log_dir, _open, makedirs,
+ get_parm, fchown):
+ """
+ Ensures the required and optional files given in the configuration are
+ created and mapped correctly inside the container. Tests absolute and
+ relative file paths given in the configuration.
+ """
+
+ fsid = 'aaf5a720-13fe-4a3b-82b9-2d99b7fd9704'
+ daemon_type = 'prometheus'
+ uid, gid = 50, 50
+ daemon_id = 'home'
+ ctx = mock.Mock()
+ ctx.data_dir = '/somedir'
+ files = {
+ 'files': {
+ 'prometheus.yml': 'foo',
+ '/etc/prometheus/alerting/ceph_alerts.yml': 'bar'
+ }
+ }
+ get_parm.return_value = files
+
+ cd.create_daemon_dirs(ctx,
+ fsid,
+ daemon_type,
+ daemon_id,
+ uid,
+ gid,
+ config=None,
+ keyring=None)
+
+ prefix = '{data_dir}/{fsid}/{daemon_type}.{daemon_id}'.format(
+ data_dir=ctx.data_dir,
+ fsid=fsid,
+ daemon_type=daemon_type,
+ daemon_id=daemon_id
+ )
+ assert _open.call_args_list == [
+ mock.call('{}/etc/prometheus/prometheus.yml'.format(prefix), 'w',
+ encoding='utf-8'),
+ mock.call('{}/etc/prometheus/alerting/ceph_alerts.yml'.format(prefix), 'w',
+ encoding='utf-8'),
+ ]
+ assert mock.call().__enter__().write('foo') in _open.mock_calls
+ assert mock.call().__enter__().write('bar') in _open.mock_calls
+
+
+class TestBootstrap(object):
+
+ @staticmethod
+ def _get_cmd(*args):
+ return [
+ 'bootstrap',
+ '--allow-mismatched-release',
+ '--skip-prepare-host',
+ '--skip-dashboard',
+ *args,
+ ]
+
+ def test_config(self, cephadm_fs):
+ conf_file = 'foo'
+ cmd = self._get_cmd(
+ '--mon-ip', '192.168.1.1',
+ '--skip-mon-network',
+ '--config', conf_file,
+ )
+
+ with with_cephadm_ctx(cmd) as ctx:
+ msg = r'No such file or directory'
+ with pytest.raises(cd.Error, match=msg):
+ cd.command_bootstrap(ctx)
+
+ cephadm_fs.create_file(conf_file)
+ with with_cephadm_ctx(cmd) as ctx:
+ retval = cd.command_bootstrap(ctx)
+ assert retval == 0
+
+ def test_no_mon_addr(self, cephadm_fs):
+ cmd = self._get_cmd()
+ with with_cephadm_ctx(cmd) as ctx:
+ msg = r'must specify --mon-ip or --mon-addrv'
+ with pytest.raises(cd.Error, match=msg):
+ cd.command_bootstrap(ctx)
+
+ def test_skip_mon_network(self, cephadm_fs):
+ cmd = self._get_cmd('--mon-ip', '192.168.1.1')
+
+ with with_cephadm_ctx(cmd, list_networks={}) as ctx:
+ msg = r'--skip-mon-network'
+ with pytest.raises(cd.Error, match=msg):
+ cd.command_bootstrap(ctx)
+
+ cmd += ['--skip-mon-network']
+ with with_cephadm_ctx(cmd, list_networks={}) as ctx:
+ retval = cd.command_bootstrap(ctx)
+ assert retval == 0
+
+ @pytest.mark.parametrize('mon_ip, list_networks, result',
+ [
+ # IPv4
+ (
+ 'eth0',
+ {'192.168.1.0/24': {'eth0': ['192.168.1.1']}},
+ False,
+ ),
+ (
+ '0.0.0.0',
+ {'192.168.1.0/24': {'eth0': ['192.168.1.1']}},
+ False,
+ ),
+ (
+ '192.168.1.0',
+ {'192.168.1.0/24': {'eth0': ['192.168.1.1']}},
+ False,
+ ),
+ (
+ '192.168.1.1',
+ {'192.168.1.0/24': {'eth0': ['192.168.1.1']}},
+ True,
+ ),
+ (
+ '192.168.1.1:1234',
+ {'192.168.1.0/24': {'eth0': ['192.168.1.1']}},
+ True,
+ ),
+ # IPv6
+ (
+ '::',
+ {'192.168.1.0/24': {'eth0': ['192.168.1.1']}},
+ False,
+ ),
+ (
+ '::ffff:192.168.1.0',
+ {"ffff::/64": {"eth0": ["::ffff:c0a8:101"]}},
+ False,
+ ),
+ (
+ '::ffff:192.168.1.1',
+ {"ffff::/64": {"eth0": ["::ffff:c0a8:101"]}},
+ True,
+ ),
+ (
+ '::ffff:c0a8:101',
+ {"ffff::/64": {"eth0": ["::ffff:c0a8:101"]}},
+ True,
+ ),
+ (
+ '0000:0000:0000:0000:0000:FFFF:C0A8:0101',
+ {"ffff::/64": {"eth0": ["::ffff:c0a8:101"]}},
+ True,
+ ),
+ ])
+ def test_mon_ip(self, mon_ip, list_networks, result, cephadm_fs):
+ cmd = self._get_cmd('--mon-ip', mon_ip)
+ if not result:
+ with with_cephadm_ctx(cmd, list_networks=list_networks) as ctx:
+ msg = r'--skip-mon-network'
+ with pytest.raises(cd.Error, match=msg):
+ cd.command_bootstrap(ctx)
+ else:
+ with with_cephadm_ctx(cmd, list_networks=list_networks) as ctx:
+ retval = cd.command_bootstrap(ctx)
+ assert retval == 0
+
+ def test_allow_fqdn_hostname(self, cephadm_fs):
+ hostname = 'foo.bar'
+ cmd = self._get_cmd(
+ '--mon-ip', '192.168.1.1',
+ '--skip-mon-network',
+ )
+
+ with with_cephadm_ctx(cmd, hostname=hostname) as ctx:
+ msg = r'--allow-fqdn-hostname'
+ with pytest.raises(cd.Error, match=msg):
+ cd.command_bootstrap(ctx)
+
+ cmd += ['--allow-fqdn-hostname']
+ with with_cephadm_ctx(cmd, hostname=hostname) as ctx:
+ retval = cd.command_bootstrap(ctx)
+ assert retval == 0
+
+ @pytest.mark.parametrize('fsid, err',
+ [
+ ('', None),
+ ('00000000-0000-0000-0000-0000deadbeef', None),
+ ('00000000-0000-0000-0000-0000deadbeez', 'not an fsid'),
+ ])
+ def test_fsid(self, fsid, err, cephadm_fs):
+ cmd = self._get_cmd(
+ '--mon-ip', '192.168.1.1',
+ '--skip-mon-network',
+ '--fsid', fsid,
+ )
+
+ with with_cephadm_ctx(cmd) as ctx:
+ if err:
+ with pytest.raises(cd.Error, match=err):
+ cd.command_bootstrap(ctx)
+ else:
+ retval = cd.command_bootstrap(ctx)
+ assert retval == 0
[tox]
-envlist = py3, mypy, flake8
-skipsdist=true
+envlist =
+ py3
+ mypy
+ fix
+ flake8
+skipsdist = true
+requires = cython
[flake8]
max-line-length = 100
.eggs
statistics = True
+[autopep8]
+addopts =
+ --max-line-length {[flake8]max-line-length}
+ --ignore "{[flake8]ignore}"
+ --exclude "{[flake8]exclude}"
+ --in-place
+ --recursive
+ --ignore-local-config
+
[testenv]
skip_install=true
deps =
- pytest
+ pyfakefs
mock
+ pytest
commands=pytest {posargs}
[testenv:mypy]
deps = mypy==0.790
commands = mypy --config-file ../mypy.ini {posargs:cephadm}
+[testenv:fix]
+basepython = python3
+deps =
+ autopep8
+commands =
+ python --version
+ autopep8 {[autopep8]addopts} {posargs: cephadm}
+
[testenv:flake8]
basepython = python3
deps =
#define DEBUG_GETATTR_CAPS (CEPH_CAP_XATTR_SHARED)
+#ifndef S_IXUGO
+#define S_IXUGO (S_IXUSR|S_IXGRP|S_IXOTH)
+#endif
+
using namespace TOPNSPC::common;
namespace bs = boost::system;
client->flush_set_callback(oset);
}
+bool Client::is_reserved_vino(vinodeno_t &vino) {
+ if (MDS_IS_PRIVATE_INO(vino.ino)) {
+ ldout(cct, -1) << __func__ << " attempt to access reserved inode number " << vino << dendl;
+ return true;
+ }
+ return false;
+}
+
// -------------
// -------------
+int Client::get_fd_inode(int fd, InodeRef *in) {
+ int r = 0;
+ if (fd == CEPHFS_AT_FDCWD) {
+ *in = cwd;
+ } else {
+ Fh *f = get_filehandle(fd);
+ if (!f) {
+ r = -CEPHFS_EBADF;
+ } else {
+ *in = f->inode;
+ }
+ }
+ return r;
+}
+
dir_result_t::dir_result_t(Inode *in, const UserPerm& perms)
: inode(in), offset(0), next_offset(2),
release_count(0), ordered_count(0), cache_index(0), start_shared_gen(0),
// close root ino
ceph_assert(inode_map.size() <= 1 + root_parents.size());
if (root && inode_map.size() == 1 + root_parents.size()) {
- delete root;
- root = 0;
- root_ancestor = 0;
- while (!root_parents.empty())
- root_parents.erase(root_parents.begin());
- inode_map.clear();
- _reset_faked_inos();
+ root.reset();
}
ceph_assert(inode_map.empty());
{
std::scoped_lock l(client_lock);
root->ll_get();
- return root;
+ return root.get();
}
<< (disconnected ? "DISCONNECTED ":"")
<< "inode " << in->ino
<< " " << path
- << " ref " << in->get_num_ref()
+ << " ref " << in->get_nref()
<< " " << *in << dendl;
if (f) {
f->open_array_section("cache");
if (root)
- dump_inode(f, root, did, true);
+ dump_inode(f, root.get(), did, true);
// make a second pass to catch anything disconnected
for (ceph::unordered_map<vinodeno_t, Inode*>::iterator it = inode_map.begin();
_invalidate_kernel_dcache();
// hose root?
- if (lru.lru_get_size() == 0 && root && root->get_num_ref() == 0 && inode_map.size() == 1 + root_parents.size()) {
+ if (lru.lru_get_size() == 0 && root && root->get_nref() == 1 && inode_map.size() == 1 + root_parents.size()) {
ldout(cct, 15) << "trim_cache trimmed root " << root << dendl;
- delete root;
- root = 0;
- root_ancestor = 0;
- while (!root_parents.empty())
- root_parents.erase(root_parents.begin());
- inode_map.clear();
- _reset_faked_inos();
+ root.reset();
}
}
if (!root) {
root = in;
if (use_faked_inos())
- _assign_faked_root(root);
+ _assign_faked_root(root.get());
root_ancestor = in;
cwd = root;
} else if (is_mounting()) {
{
ldout(cct, 10) << __func__ << " on " << *in << " n = " << n << dendl;
- int left = in->_put(n);
- if (left == 0) {
+ int left = in->get_nref();
+ ceph_assert(left >= n + 1);
+ in->iput(n);
+ left -= n;
+ if (left == 1) { // the last one will be held by the inode_map
// release any caps
remove_all_caps(in);
if (use_faked_inos())
_release_faked_ino(in);
- if (in == root) {
- root = 0;
+ if (root == nullptr) {
root_ancestor = 0;
while (!root_parents.empty())
root_parents.erase(root_parents.begin());
}
- delete in;
+ in->iput();
}
}
if ((cap & CEPH_CAP_FILE_BUFFER) &&
in->cap_refs[CEPH_CAP_FILE_BUFFER] == 0) {
ldout(cct, 5) << __func__ << " got first FILE_BUFFER ref on " << *in << dendl;
- in->get();
+ in->iget();
}
if ((cap & CEPH_CAP_FILE_CACHE) &&
in->cap_refs[CEPH_CAP_FILE_CACHE] == 0) {
ldout(cct, 5) << __func__ << " got first FILE_CACHE ref on " << *in << dendl;
- in->get();
+ in->iget();
}
in->get_cap_ref(cap);
}
++q;
if (dn->lru_is_expireable()) {
if (can_invalidate_dentries &&
- dn->dir->parent_inode->ino == MDS_INO_ROOT) {
+ dn->dir->parent_inode->ino == CEPH_INO_ROOT) {
// Only issue one of these per DN for inodes in root: handle
// others more efficiently by calling for root-child DNs at
// the end of this function.
all = false;
}
}
- if (in->ll_ref == 1 && in->ino != MDS_INO_ROOT) {
+ if (in->ll_ref == 1 && in->ino != CEPH_INO_ROOT) {
_schedule_ino_release_callback(in.get());
}
- if (all && in->ino != MDS_INO_ROOT) {
+ if (all && in->ino != CEPH_INO_ROOT) {
ldout(cct, 20) << __func__ << " counting as trimmed: " << *in << dendl;
trimmed++;
}
void Client::_try_to_trim_inode(Inode *in, bool sched_inval)
{
- int ref = in->get_num_ref();
+ int ref = in->get_nref();
ldout(cct, 5) << __func__ << " in " << *in <<dendl;
if (in->dir && !in->dir->dentries.empty()) {
}
}
- if (ref > 0 && (in->flags & I_SNAPDIR_OPEN)) {
+ if (ref > 1 && (in->flags & I_SNAPDIR_OPEN)) {
InodeRef snapdir = open_snapdir(in);
_try_to_trim_inode(snapdir.get(), false);
--ref;
}
- if (ref > 0) {
+ if (ref > 1) {
auto q = in->dentries.begin();
while (q != in->dentries.end()) {
Dentry *dn = *q;
int Client::inode_permission(Inode *in, const UserPerm& perms, unsigned want)
{
- if (perms.uid() == 0)
+ if (perms.uid() == 0) {
+ // Executable are overridable when there is at least one exec bit set
+ if((want & MAY_EXEC) && !(in->mode & S_IXUGO))
+ return -CEPHFS_EACCES;
return 0;
+ }
if (perms.uid() != in->uid && (in->mode & S_IRWXG)) {
int ret = _posix_acl_permission(in, perms, want);
}
ceph_assert(root);
- _ll_get(root);
+ _ll_get(root.get());
// trace?
if (!cct->_conf->client_trace.empty()) {
});
cwd.reset();
+ root.reset();
// clean up any unclosed files
while (!fd_map.empty()) {
}
int Client::path_walk(const filepath& origpath, InodeRef *end,
- const UserPerm& perms, bool followsym, int mask)
+ const UserPerm& perms, bool followsym, int mask, InodeRef dirinode)
{
walk_dentry_result wdr;
- int rc = path_walk(origpath, &wdr, perms, followsym, mask);
+ int rc = path_walk(origpath, &wdr, perms, followsym, mask, dirinode);
*end = std::move(wdr.in);
return rc;
}
-int Client::path_walk(const filepath& origpath, walk_dentry_result* result, const UserPerm& perms, bool followsym, int mask)
+int Client::path_walk(const filepath& origpath, walk_dentry_result* result, const UserPerm& perms,
+ bool followsym, int mask, InodeRef dirinode)
{
filepath path = origpath;
InodeRef cur;
std::string alternate_name;
if (origpath.absolute())
cur = root;
- else
+ else if (!dirinode)
cur = cwd;
+ else {
+ cur = dirinode;
+ }
ceph_assert(cur);
+ ldout(cct, 20) << __func__ << " cur=" << *cur << dendl;
ldout(cct, 10) << __func__ << " " << path << dendl;
int symlinks = 0;
}
int Client::unlink(const char *relpath, const UserPerm& perm)
+{
+ return unlinkat(CEPHFS_AT_FDCWD, relpath, 0, perm);
+}
+
+int Client::unlinkat(int dirfd, const char *relpath, int flags, const UserPerm& perm)
{
RWRef_t mref_reader(mount_state, CLIENT_MOUNTING);
- if (!mref_reader.is_state_satisfied())
+ if (!mref_reader.is_state_satisfied()) {
return -CEPHFS_ENOTCONN;
+ }
tout(cct) << __func__ << std::endl;
+ tout(cct) << dirfd << std::endl;
tout(cct) << relpath << std::endl;
+ tout(cct) << flags << std::endl;
- if (std::string(relpath) == "/")
- return -CEPHFS_EISDIR;
+ if (std::string(relpath) == "/") {
+ return flags & AT_REMOVEDIR ? -CEPHFS_EBUSY : -CEPHFS_EISDIR;
+ }
filepath path(relpath);
string name = path.last_dentry();
InodeRef dir;
std::scoped_lock lock(client_lock);
- int r = path_walk(path, &dir, perm);
- if (r < 0)
+
+ InodeRef dirinode;
+ int r = get_fd_inode(dirfd, &dirinode);
+ if (r < 0) {
+ return r;
+ }
+
+ r = path_walk(path, &dir, perm, true, 0, dirinode);
+ if (r < 0) {
return r;
+ }
if (cct->_conf->client_permissions) {
r = may_delete(dir.get(), name.c_str(), perm);
- if (r < 0)
+ if (r < 0) {
return r;
+ }
}
- return _unlink(dir.get(), name.c_str(), perm);
+ if (flags & AT_REMOVEDIR) {
+ r = _rmdir(dir.get(), name.c_str(), perm);
+ } else {
+ r = _unlink(dir.get(), name.c_str(), perm);
+ }
+ return r;
}
int Client::rename(const char *relfrom, const char *relto, const UserPerm& perm, std::string alternate_name)
// dirs
int Client::mkdir(const char *relpath, mode_t mode, const UserPerm& perm, std::string alternate_name)
+{
+ return mkdirat(CEPHFS_AT_FDCWD, relpath, mode, perm, alternate_name);
+}
+
+int Client::mkdirat(int dirfd, const char *relpath, mode_t mode, const UserPerm& perm,
+ std::string alternate_name)
{
RWRef_t mref_reader(mount_state, CLIENT_MOUNTING);
if (!mref_reader.is_state_satisfied())
return -CEPHFS_ENOTCONN;
tout(cct) << __func__ << std::endl;
+ tout(cct) << dirfd << std::endl;
tout(cct) << relpath << std::endl;
tout(cct) << mode << std::endl;
ldout(cct, 10) << __func__ << ": " << relpath << dendl;
- if (std::string(relpath) == "/")
+ if (std::string(relpath) == "/") {
return -CEPHFS_EEXIST;
+ }
filepath path(relpath);
string name = path.last_dentry();
InodeRef dir;
std::scoped_lock lock(client_lock);
- int r = path_walk(path, &dir, perm);
- if (r < 0)
+
+ InodeRef dirinode;
+ int r = get_fd_inode(dirfd, &dirinode);
+ if (r < 0) {
return r;
+ }
+
+ r = path_walk(path, &dir, perm, true, 0, dirinode);
+ if (r < 0) {
+ return r;
+ }
if (cct->_conf->client_permissions) {
r = may_create(dir.get(), perm);
- if (r < 0)
+ if (r < 0) {
return r;
+ }
}
return _mkdir(dir.get(), name.c_str(), mode, perm, 0, {}, std::move(alternate_name));
}
int Client::rmdir(const char *relpath, const UserPerm& perms)
{
- RWRef_t mref_reader(mount_state, CLIENT_MOUNTING);
- if (!mref_reader.is_state_satisfied())
- return -CEPHFS_ENOTCONN;
-
- tout(cct) << __func__ << std::endl;
- tout(cct) << relpath << std::endl;
-
- if (std::string(relpath) == "/")
- return -CEPHFS_EBUSY;
-
- filepath path(relpath);
- string name = path.last_dentry();
- path.pop_dentry();
- InodeRef dir;
-
- std::scoped_lock lock(client_lock);
- int r = path_walk(path, &dir, perms);
- if (r < 0)
- return r;
- if (cct->_conf->client_permissions) {
- int r = may_delete(dir.get(), name.c_str(), perms);
- if (r < 0)
- return r;
- }
- return _rmdir(dir.get(), name.c_str(), perms);
+ return unlinkat(CEPHFS_AT_FDCWD, relpath, AT_REMOVEDIR, perms);
}
int Client::mknod(const char *relpath, mode_t mode, const UserPerm& perms, dev_t rdev)
// symlinks
int Client::symlink(const char *target, const char *relpath, const UserPerm& perms, std::string alternate_name)
+{
+ return symlinkat(target, CEPHFS_AT_FDCWD, relpath, perms, alternate_name);
+}
+
+int Client::symlinkat(const char *target, int dirfd, const char *relpath, const UserPerm& perms,
+ std::string alternate_name)
{
RWRef_t mref_reader(mount_state, CLIENT_MOUNTING);
- if (!mref_reader.is_state_satisfied())
+ if (!mref_reader.is_state_satisfied()) {
return -CEPHFS_ENOTCONN;
+ }
tout(cct) << __func__ << std::endl;
tout(cct) << target << std::endl;
+ tout(cct) << dirfd << std::endl;
tout(cct) << relpath << std::endl;
- if (std::string(relpath) == "/")
+ if (std::string(relpath) == "/") {
return -CEPHFS_EEXIST;
+ }
filepath path(relpath);
string name = path.last_dentry();
InodeRef dir;
std::scoped_lock lock(client_lock);
- int r = path_walk(path, &dir, perms);
- if (r < 0)
+
+ InodeRef dirinode;
+ int r = get_fd_inode(dirfd, &dirinode);
+ if (r < 0) {
return r;
+ }
+ r = path_walk(path, &dir, perms, true, 0, dirinode);
+ if (r < 0) {
+ return r;
+ }
if (cct->_conf->client_permissions) {
int r = may_create(dir.get(), perms);
- if (r < 0)
+ if (r < 0) {
return r;
+ }
}
return _symlink(dir.get(), name.c_str(), target, perms, std::move(alternate_name));
}
int Client::readlink(const char *relpath, char *buf, loff_t size, const UserPerm& perms)
{
+ return readlinkat(CEPHFS_AT_FDCWD, relpath, buf, size, perms);
+}
+
+int Client::readlinkat(int dirfd, const char *relpath, char *buf, loff_t size, const UserPerm& perms) {
RWRef_t mref_reader(mount_state, CLIENT_MOUNTING);
- if (!mref_reader.is_state_satisfied())
+ if (!mref_reader.is_state_satisfied()) {
return -CEPHFS_ENOTCONN;
+ }
tout(cct) << __func__ << std::endl;
+ tout(cct) << dirfd << std::endl;
tout(cct) << relpath << std::endl;
- filepath path(relpath);
- InodeRef in;
-
+ InodeRef dirinode;
std::scoped_lock lock(client_lock);
- int r = path_walk(path, &in, perms, false);
- if (r < 0)
+ int r = get_fd_inode(dirfd, &dirinode);
+ if (r < 0) {
return r;
+ }
+
+ InodeRef in;
+ filepath path(relpath);
+ r = path_walk(path, &in, perms, false, 0, dirinode);
+ if (r < 0) {
+ return r;
+ }
return _readlink(in.get(), buf, size);
}
const UserPerm& perms,
unsigned int want, unsigned int flags)
{
- RWRef_t mref_reader(mount_state, CLIENT_MOUNTING);
- if (!mref_reader.is_state_satisfied())
- return -CEPHFS_ENOTCONN;
-
- ldout(cct, 3) << __func__ << " enter (relpath " << relpath << " want " << want << ")" << dendl;
- tout(cct) << "statx" << std::endl;
- tout(cct) << relpath << std::endl;
-
- filepath path(relpath);
- InodeRef in;
-
- unsigned mask = statx_to_mask(flags, want);
-
- std::scoped_lock lock(client_lock);
- int r = path_walk(path, &in, perms, !(flags & AT_SYMLINK_NOFOLLOW), mask);
- if (r < 0)
- return r;
-
- r = _getattr(in, mask, perms);
- if (r < 0) {
- ldout(cct, 3) << __func__ << " exit on error!" << dendl;
- return r;
- }
-
- fill_statx(in, mask, stx);
- ldout(cct, 3) << __func__ << " exit (relpath " << relpath << " mask " << stx->stx_mask << ")" << dendl;
- return r;
+ return statxat(CEPHFS_AT_FDCWD, relpath, stx, perms, want, flags);
}
int Client::lstat(const char *relpath, struct stat *stbuf,
int Client::chmod(const char *relpath, mode_t mode, const UserPerm& perms)
{
- RWRef_t mref_reader(mount_state, CLIENT_MOUNTING);
- if (!mref_reader.is_state_satisfied())
- return -CEPHFS_ENOTCONN;
-
- tout(cct) << __func__ << std::endl;
- tout(cct) << relpath << std::endl;
- tout(cct) << mode << std::endl;
-
- filepath path(relpath);
- InodeRef in;
-
- std::scoped_lock lock(client_lock);
- int r = path_walk(path, &in, perms);
- if (r < 0)
- return r;
- struct stat attr;
- attr.st_mode = mode;
- return _setattr(in, &attr, CEPH_SETATTR_MODE, perms);
+ return chmodat(CEPHFS_AT_FDCWD, relpath, mode, 0, perms);
}
int Client::fchmod(int fd, mode_t mode, const UserPerm& perms)
return _setattr(f->inode, &attr, CEPH_SETATTR_MODE, perms);
}
-int Client::lchmod(const char *relpath, mode_t mode, const UserPerm& perms)
-{
+int Client::chmodat(int dirfd, const char *relpath, mode_t mode, int flags,
+ const UserPerm& perms) {
RWRef_t mref_reader(mount_state, CLIENT_MOUNTING);
- if (!mref_reader.is_state_satisfied())
+ if (!mref_reader.is_state_satisfied()) {
return -CEPHFS_ENOTCONN;
+ }
tout(cct) << __func__ << std::endl;
+ tout(cct) << dirfd << std::endl;
tout(cct) << relpath << std::endl;
tout(cct) << mode << std::endl;
+ tout(cct) << flags << std::endl;
filepath path(relpath);
InodeRef in;
+ InodeRef dirinode;
std::scoped_lock lock(client_lock);
- // don't follow symlinks
- int r = path_walk(path, &in, perms, false);
- if (r < 0)
+ int r = get_fd_inode(dirfd, &dirinode);
+ if (r < 0) {
+ return r;
+ }
+
+ r = path_walk(path, &in, perms, !(flags & AT_SYMLINK_NOFOLLOW), 0, dirinode);
+ if (r < 0) {
return r;
+ }
struct stat attr;
attr.st_mode = mode;
return _setattr(in, &attr, CEPH_SETATTR_MODE, perms);
}
+int Client::lchmod(const char *relpath, mode_t mode, const UserPerm& perms)
+{
+ return chmodat(CEPHFS_AT_FDCWD, relpath, mode, AT_SYMLINK_NOFOLLOW, perms);
+}
+
int Client::chown(const char *relpath, uid_t new_uid, gid_t new_gid,
const UserPerm& perms)
{
- RWRef_t mref_reader(mount_state, CLIENT_MOUNTING);
- if (!mref_reader.is_state_satisfied())
- return -CEPHFS_ENOTCONN;
-
- tout(cct) << __func__ << std::endl;
- tout(cct) << relpath << std::endl;
- tout(cct) << new_uid << std::endl;
- tout(cct) << new_gid << std::endl;
-
- filepath path(relpath);
- InodeRef in;
-
- std::scoped_lock lock(client_lock);
- int r = path_walk(path, &in, perms);
- if (r < 0)
- return r;
- struct stat attr;
- attr.st_uid = new_uid;
- attr.st_gid = new_gid;
- return _setattr(in, &attr, CEPH_SETATTR_UID|CEPH_SETATTR_GID, perms);
+ return chownat(CEPHFS_AT_FDCWD, relpath, new_uid, new_gid, 0, perms);
}
int Client::fchown(int fd, uid_t new_uid, gid_t new_gid, const UserPerm& perms)
int Client::lchown(const char *relpath, uid_t new_uid, gid_t new_gid,
const UserPerm& perms)
{
+ return chownat(CEPHFS_AT_FDCWD, relpath, new_uid, new_gid, AT_SYMLINK_NOFOLLOW, perms);
+}
+
+int Client::chownat(int dirfd, const char *relpath, uid_t new_uid, gid_t new_gid,
+ int flags, const UserPerm& perms) {
RWRef_t mref_reader(mount_state, CLIENT_MOUNTING);
- if (!mref_reader.is_state_satisfied())
+ if (!mref_reader.is_state_satisfied()) {
return -CEPHFS_ENOTCONN;
+ }
tout(cct) << __func__ << std::endl;
+ tout(cct) << dirfd << std::endl;
tout(cct) << relpath << std::endl;
tout(cct) << new_uid << std::endl;
tout(cct) << new_gid << std::endl;
+ tout(cct) << flags << std::endl;
filepath path(relpath);
InodeRef in;
+ InodeRef dirinode;
std::scoped_lock lock(client_lock);
- // don't follow symlinks
- int r = path_walk(path, &in, perms, false);
- if (r < 0)
+ int r = get_fd_inode(dirfd, &dirinode);
+ if (r < 0) {
return r;
+ }
+
+ r = path_walk(path, &in, perms, !(flags & AT_SYMLINK_NOFOLLOW), 0, dirinode);
+ if (r < 0) {
+ return r;
+ }
struct stat attr;
attr.st_uid = new_uid;
attr.st_gid = new_gid;
- int mask = 0;
- if (new_uid != static_cast<uid_t>(-1)) mask |= CEPH_SETATTR_UID;
- if (new_gid != static_cast<gid_t>(-1)) mask |= CEPH_SETATTR_GID;
- return _setattr(in, &attr, mask, perms);
+ return _setattr(in, &attr, CEPH_SETATTR_UID|CEPH_SETATTR_GID, perms);
}
static void attr_set_atime_and_mtime(struct stat *attr,
return _setattr(f->inode, &attr, CEPH_SETATTR_MTIME|CEPH_SETATTR_ATIME, perms);
}
+int Client::utimensat(int dirfd, const char *relpath, struct timespec times[2], int flags,
+ const UserPerm& perms) {
+ RWRef_t mref_reader(mount_state, CLIENT_MOUNTING);
+ if (!mref_reader.is_state_satisfied()) {
+ return -CEPHFS_ENOTCONN;
+ }
+
+ tout(cct) << __func__ << std::endl;
+ tout(cct) << dirfd << std::endl;
+ tout(cct) << relpath << std::endl;
+ tout(cct) << "atime: " << times[0].tv_sec << "." << times[0].tv_nsec
+ << std::endl;
+ tout(cct) << "mtime: " << times[1].tv_sec << "." << times[1].tv_nsec
+ << std::endl;
+ tout(cct) << flags << std::endl;
+
+ filepath path(relpath);
+ InodeRef in;
+ InodeRef dirinode;
+
+ std::scoped_lock lock(client_lock);
+ int r = get_fd_inode(dirfd, &dirinode);
+ if (r < 0) {
+ return r;
+ }
+
+#if defined(__linux__) && defined(O_PATH)
+ if (flags & O_PATH) {
+ return -CEPHFS_EBADF;
+ }
+#endif
+
+ r = path_walk(path, &in, perms, !(flags & AT_SYMLINK_NOFOLLOW), 0, dirinode);
+ if (r < 0) {
+ return r;
+ }
+ struct stat attr;
+ utime_t atime(times[0]);
+ utime_t mtime(times[1]);
+
+ attr_set_atime_and_mtime(&attr, atime, mtime);
+ return _setattr(in, &attr, CEPH_SETATTR_MTIME|CEPH_SETATTR_ATIME, perms);
+}
+
int Client::flock(int fd, int operation, uint64_t owner)
{
RWRef_t mref_reader(mount_state, CLIENT_MOUNTING);
return r;
}
+int Client::fdopendir(int dirfd, dir_result_t **dirpp, const UserPerm &perms) {
+ RWRef_t mref_reader(mount_state, CLIENT_MOUNTING);
+ if (!mref_reader.is_state_satisfied()) {
+ return -CEPHFS_ENOTCONN;
+ }
+
+ tout(cct) << __func__ << std::endl;
+ tout(cct) << dirfd << std::endl;
+
+ InodeRef dirinode;
+ std::scoped_lock locker(client_lock);
+ int r = get_fd_inode(dirfd, &dirinode);
+ if (r < 0) {
+ return r;
+ }
+
+ if (cct->_conf->client_permissions) {
+ r = may_open(dirinode.get(), O_RDONLY, perms);
+ if (r < 0) {
+ return r;
+ }
+ }
+ r = _opendir(dirinode.get(), dirpp, perms);
+ /* if ENOTDIR, dirpp will be an uninitialized point and it's very dangerous to access its value */
+ if (r != -CEPHFS_ENOTDIR) {
+ tout(cct) << (uintptr_t)*dirpp << std::endl;
+ }
+ return r;
+}
+
int Client::_opendir(Inode *in, dir_result_t **dirpp, const UserPerm& perms)
{
if (!in->is_dir())
/****** file i/o **********/
-int Client::open(const char *relpath, int flags, const UserPerm& perms,
- mode_t mode, int stripe_unit, int stripe_count,
- int object_size, const char *data_pool, std::string alternate_name)
-{
- RWRef_t mref_reader(mount_state, CLIENT_MOUNTING);
- if (!mref_reader.is_state_satisfied())
- return -CEPHFS_ENOTCONN;
+// common parts for open and openat. call with client_lock locked.
+int Client::create_and_open(std::optional<int> dirfd, const char *relpath, int flags,
+ const UserPerm& perms, mode_t mode, int stripe_unit,
+ int stripe_count, int object_size, const char *data_pool,
+ std::string alternate_name) {
+ ceph_assert(ceph_mutex_is_locked(client_lock));
int cflags = ceph_flags_sys2wire(flags);
-
- ldout(cct, 3) << "open enter(" << relpath << ", " << cflags << "," << mode << ")" << dendl;
- tout(cct) << "open" << std::endl;
- tout(cct) << relpath << std::endl;
tout(cct) << cflags << std::endl;
Fh *fh = NULL;
bool followsym = !((flags & O_NOFOLLOW) || ((flags & O_CREAT) && (flags & O_EXCL)));
int mask = ceph_caps_for_mode(ceph_flags_to_mode(cflags));
- std::scoped_lock lock(client_lock);
- int r = path_walk(path, &in, perms, followsym, mask);
+ InodeRef dirinode = nullptr;
+ if (dirfd) {
+ int r = get_fd_inode(*dirfd, &dirinode);
+ if (r < 0) {
+ return r;
+ }
+ }
+ int r = path_walk(path, &in, perms, followsym, mask, dirinode);
if (r == 0 && (flags & O_CREAT) && (flags & O_EXCL))
return -CEPHFS_EEXIST;
#if defined(__linux__) && defined(O_PATH)
if (r == 0 && in->is_symlink() && (flags & O_NOFOLLOW) && !(flags & O_PATH))
#else
- if (r == 0 && in->is_symlink() && (flags & O_NOFOLLOW))
+ if (r == 0 && in->is_symlink() && (flags & O_NOFOLLOW))
#endif
return -CEPHFS_ELOOP;
dirpath.pop_dentry();
InodeRef dir;
r = path_walk(dirpath, &dir, perms, true,
- cct->_conf->client_permissions ? CEPH_CAP_AUTH_SHARED : 0);
- if (r < 0)
+ cct->_conf->client_permissions ? CEPH_CAP_AUTH_SHARED : 0, dirinode);
+ if (r < 0) {
goto out;
+ }
if (cct->_conf->client_permissions) {
r = may_create(dir.get(), perms);
if (r < 0)
- goto out;
+ goto out;
}
r = _create(dir.get(), dname.c_str(), flags, mode, &in, &fh, stripe_unit,
stripe_count, object_size, data_pool, &created, perms,
if (cct->_conf->client_permissions) {
r = may_open(in.get(), flags, perms);
if (r < 0)
- goto out;
+ goto out;
}
}
}
out:
+ return r;
+}
+
+int Client::open(const char *relpath, int flags, const UserPerm& perms,
+ mode_t mode, int stripe_unit, int stripe_count,
+ int object_size, const char *data_pool, std::string alternate_name)
+{
+ return openat(CEPHFS_AT_FDCWD, relpath, flags, perms, mode, stripe_unit,
+ stripe_count, object_size, data_pool, alternate_name);
+}
+
+int Client::_openat(int dirfd, const char *relpath, int flags, const UserPerm& perms,
+ mode_t mode, std::string alternate_name) {
+ return create_and_open(dirfd, relpath, flags, perms, mode, 0, 0, 0, NULL, alternate_name);
+}
+
+int Client::openat(int dirfd, const char *relpath, int flags, const UserPerm& perms,
+ mode_t mode, int stripe_unit, int stripe_count, int object_size,
+ const char *data_pool, std::string alternate_name) {
+ RWRef_t mref_reader(mount_state, CLIENT_MOUNTING);
+ if (!mref_reader.is_state_satisfied()) {
+ return -CEPHFS_ENOTCONN;
+ }
+
+ ldout(cct, 3) << "openat enter(" << relpath << ")" << dendl;
+ tout(cct) << dirfd << std::endl;
+ tout(cct) << relpath << std::endl;
+ tout(cct) << flags << std::endl;
+ tout(cct) << mode << std::endl;
+
+ std::scoped_lock locker(client_lock);
+ int r = create_and_open(dirfd, relpath, flags, perms, mode, stripe_unit, stripe_count,
+ object_size, data_pool, alternate_name);
+
tout(cct) << r << std::endl;
- ldout(cct, 3) << "open exit(" << path << ", " << cflags << ") = " << r << dendl;
+ ldout(cct, 3) << "openat exit(" << relpath << ")" << dendl;
return r;
}
if (!mref_reader.is_state_satisfied())
return -CEPHFS_ENOTCONN;
+ if (is_reserved_vino(vino))
+ return -CEPHFS_ESTALE;
+
MetaRequest *req = new MetaRequest(CEPH_MDS_OP_LOOKUPINO);
filepath path(vino.ino);
req->set_filepath(path);
return ret;
}
-int Client::close(int fd)
+int Client::_close(int fd)
{
- RWRef_t mref_reader(mount_state, CLIENT_MOUNTING);
- if (!mref_reader.is_state_satisfied())
- return -CEPHFS_ENOTCONN;
-
ldout(cct, 3) << "close enter(" << fd << ")" << dendl;
tout(cct) << "close" << std::endl;
tout(cct) << fd << std::endl;
- std::scoped_lock lock(client_lock);
Fh *fh = get_filehandle(fd);
if (!fh)
return -CEPHFS_EBADF;
return err;
}
+int Client::close(int fd) {
+ RWRef_t mref_reader(mount_state, CLIENT_MOUNTING);
+ if (!mref_reader.is_state_satisfied())
+ return -CEPHFS_ENOTCONN;
+
+ std::scoped_lock lock(client_lock);
+ return _close(fd);
+}
// ------------
// read, write
unsigned mask = statx_to_mask(flags, want);
int r = 0;
- if (mask && !f->inode->caps_issued_mask(mask, true)) {
+ if (mask) {
r = _getattr(f->inode, mask, perms);
if (r < 0) {
ldout(cct, 3) << "fstatx exit on error!" << dendl;
return r;
}
+int Client::statxat(int dirfd, const char *relpath,
+ struct ceph_statx *stx, const UserPerm& perms,
+ unsigned int want, unsigned int flags) {
+ RWRef_t mref_reader(mount_state, CLIENT_MOUNTING);
+ if (!mref_reader.is_state_satisfied()) {
+ return -CEPHFS_ENOTCONN;
+ }
+
+ tout(cct) << __func__ << " flags " << hex << flags << " want " << want << dec << std::endl;
+ tout(cct) << dirfd << std::endl;
+ tout(cct) << relpath << std::endl;
+
+ unsigned mask = statx_to_mask(flags, want);
+
+ InodeRef dirinode;
+ std::scoped_lock lock(client_lock);
+ int r = get_fd_inode(dirfd, &dirinode);
+ if (r < 0) {
+ return r;
+ }
+
+ InodeRef in;
+ filepath path(relpath);
+ r = path_walk(path, &in, perms, !(flags & AT_SYMLINK_NOFOLLOW), mask, dirinode);
+ if (r < 0) {
+ return r;
+ }
+ r = _getattr(in, mask, perms);
+ if (r < 0) {
+ ldout(cct, 3) << __func__ << " exit on error!" << dendl;
+ return r;
+ }
+
+ fill_statx(in, mask, stx);
+ ldout(cct, 3) << __func__ << " dirfd" << dirfd << ", r= " << r << dendl;
+ return r;
+}
+
// not written yet, but i want to link!
int Client::chdir(const char *relpath, std::string &new_cwd,
ldout(cct, 10) << __func__ << " " << *cwd << dendl;
Inode *in = cwd.get();
- while (in != root) {
+ while (in != root.get()) {
ceph_assert(in->dentries.size() < 2); // dirs can't be hard-linked
// A cwd or ancester is unlinked
// quota but we can see a parent of it that does have a quota, we'll
// respect that one instead.
ceph_assert(root != nullptr);
- Inode *quota_root = root->quota.is_enable() ? root : get_quota_root(root, perms);
+ InodeRef quota_root = root->quota.is_enable() ? root : get_quota_root(root.get(), perms);
// get_quota_root should always give us something
// because client quotas are always enabled
if (!mref_reader.is_state_satisfied())
return -CEPHFS_ENOTCONN;
+ if (is_reserved_vino(vino))
+ return -CEPHFS_ESTALE;
+
std::scoped_lock lock(client_lock);
ldout(cct, 3) << __func__ << " " << vino << dendl;
void Client::_ll_get(Inode *in)
{
if (in->ll_ref == 0) {
- in->get();
+ in->iget();
if (in->is_dir() && !in->dentries.empty()) {
ceph_assert(in->dentries.size() == 1); // dirs can't be hard-linked
in->get_first_parent()->get(); // pin dentry
if (!mref_reader.is_state_satisfied())
return NULL;
+ if (is_reserved_vino(vino))
+ return NULL;
+
std::scoped_lock lock(client_lock);
unordered_map<vinodeno_t,Inode*>::iterator p = inode_map.find(vino);
mds_rank_t mds = MDS_RANK_NONE;
MetaSession *s = NULL;
for (auto &p : mds_sessions) {
- if (mdsmap->get_addrs(p.first) == con->get_peer_addrs()) {
+ if (mdsmap->have_inst(p.first) && mdsmap->get_addrs(p.first) == con->get_peer_addrs()) {
mds = p.first;
s = &p.second;
}
void intrusive_ptr_add_ref(Inode *in)
{
- in->get();
+ in->iget();
}
void intrusive_ptr_release(Inode *in)
// namespace ops
int opendir(const char *name, dir_result_t **dirpp, const UserPerm& perms);
+ int fdopendir(int dirfd, dir_result_t **dirpp, const UserPerm& perms);
int closedir(dir_result_t *dirp);
/**
int may_delete(const char *relpath, const UserPerm& perms);
int link(const char *existing, const char *newname, const UserPerm& perm, std::string alternate_name="");
int unlink(const char *path, const UserPerm& perm);
+ int unlinkat(int dirfd, const char *relpath, int flags, const UserPerm& perm);
int rename(const char *from, const char *to, const UserPerm& perm, std::string alternate_name="");
// dirs
int mkdir(const char *path, mode_t mode, const UserPerm& perm, std::string alternate_name="");
+ int mkdirat(int dirfd, const char *relpath, mode_t mode, const UserPerm& perm,
+ std::string alternate_name="");
int mkdirs(const char *path, mode_t mode, const UserPerm& perms);
int rmdir(const char *path, const UserPerm& perms);
// symlinks
int readlink(const char *path, char *buf, loff_t size, const UserPerm& perms);
+ int readlinkat(int dirfd, const char *relpath, char *buf, loff_t size, const UserPerm& perms);
int symlink(const char *existing, const char *newname, const UserPerm& perms, std::string alternate_name="");
+ int symlinkat(const char *target, int dirfd, const char *relpath, const UserPerm& perms,
+ std::string alternate_name="");
// path traversal for high-level interface
int walk(std::string_view path, struct walk_dentry_result* result, const UserPerm& perms, bool followsym=true);
int fsetattrx(int fd, struct ceph_statx *stx, int mask, const UserPerm& perms);
int chmod(const char *path, mode_t mode, const UserPerm& perms);
int fchmod(int fd, mode_t mode, const UserPerm& perms);
+ int chmodat(int dirfd, const char *relpath, mode_t mode, int flags, const UserPerm& perms);
int lchmod(const char *path, mode_t mode, const UserPerm& perms);
int chown(const char *path, uid_t new_uid, gid_t new_gid,
const UserPerm& perms);
int fchown(int fd, uid_t new_uid, gid_t new_gid, const UserPerm& perms);
int lchown(const char *path, uid_t new_uid, gid_t new_gid,
const UserPerm& perms);
+ int chownat(int dirfd, const char *relpath, uid_t new_uid, gid_t new_gid,
+ int flags, const UserPerm& perms);
int utime(const char *path, struct utimbuf *buf, const UserPerm& perms);
int lutime(const char *path, struct utimbuf *buf, const UserPerm& perms);
int futime(int fd, struct utimbuf *buf, const UserPerm& perms);
int lutimes(const char *relpath, struct timeval times[2], const UserPerm& perms);
int futimes(int fd, struct timeval times[2], const UserPerm& perms);
int futimens(int fd, struct timespec times[2], const UserPerm& perms);
+ int utimensat(int dirfd, const char *relpath, struct timespec times[2], int flags,
+ const UserPerm& perms);
int flock(int fd, int operation, uint64_t owner);
int truncate(const char *path, loff_t size, const UserPerm& perms);
// file ops
int mknod(const char *path, mode_t mode, const UserPerm& perms, dev_t rdev=0);
+
+ int create_and_open(std::optional<int> dirfd, const char *relpath, int flags, const UserPerm& perms,
+ mode_t mode, int stripe_unit, int stripe_count, int object_size, const char *data_pool,
+ std::string alternate_name);
int open(const char *path, int flags, const UserPerm& perms, mode_t mode=0, std::string alternate_name="") {
return open(path, flags, perms, mode, 0, 0, 0, NULL, alternate_name);
}
int open(const char *path, int flags, const UserPerm& perms,
mode_t mode, int stripe_unit, int stripe_count, int object_size,
const char *data_pool, std::string alternate_name="");
+ int _openat(int dirfd, const char *relpath, int flags, const UserPerm& perms,
+ mode_t mode=0, std::string alternate_name="");
+ int openat(int dirfd, const char *relpath, int flags, const UserPerm& perms,
+ mode_t mode, int stripe_unit, int stripe_count,
+ int object_size, const char *data_pool, std::string alternate_name);
+ int openat(int dirfd, const char *path, int flags, const UserPerm& perms, mode_t mode=0,
+ std::string alternate_name="") {
+ return openat(dirfd, path, flags, perms, mode, 0, 0, 0, NULL, alternate_name);
+ }
+
int lookup_hash(inodeno_t ino, inodeno_t dirino, const char *name,
const UserPerm& perms);
int lookup_ino(inodeno_t ino, const UserPerm& perms, Inode **inode=NULL);
int lookup_name(Inode *in, Inode *parent, const UserPerm& perms);
+ int _close(int fd);
int close(int fd);
loff_t lseek(int fd, loff_t offset, int whence);
int read(int fd, char *buf, loff_t size, loff_t offset=-1);
int mask=CEPH_STAT_CAP_INODE_ALL);
int fstatx(int fd, struct ceph_statx *stx, const UserPerm& perms,
unsigned int want, unsigned int flags);
+ int statxat(int dirfd, const char *relpath,
+ struct ceph_statx *stx, const UserPerm& perms,
+ unsigned int want, unsigned int flags);
int fallocate(int fd, int mode, loff_t offset, loff_t length);
// full path xattr ops
void handle_client_reply(const MConstRef<MClientReply>& reply);
bool is_dir_operation(MetaRequest *request);
- int path_walk(const filepath& fp, struct walk_dentry_result* result, const UserPerm& perms, bool followsym=true, int mask=0);
+ int path_walk(const filepath& fp, struct walk_dentry_result* result, const UserPerm& perms, bool followsym=true, int mask=0,
+ InodeRef dirinode=nullptr);
int path_walk(const filepath& fp, InodeRef *end, const UserPerm& perms,
- bool followsym=true, int mask=0);
+ bool followsym=true, int mask=0, InodeRef dirinode=nullptr);
// fake inode number for 32-bits ino_t
void _assign_faked_ino(Inode *in);
return NULL;
return it->second;
}
+ int get_fd_inode(int fd, InodeRef *in);
// helpers
void wake_up_session_caps(MetaSession *s, bool reconnect);
std::map<snapid_t, int> ll_snap_ref;
- Inode* root = nullptr;
+ InodeRef root = nullptr;
map<Inode*, InodeRef> root_parents;
Inode* root_ancestor = nullptr;
LRU lru; // lru list of Dentry's in our local metadata cache.
static const VXattr _common_vxattrs[];
+ bool is_reserved_vino(vinodeno_t &vino);
void fill_dirent(struct dirent *de, const char *name, int type, uint64_t ino, loff_t next_off);
{
out << in.vino() << "("
<< "faked_ino=" << in.faked_ino
- << " ref=" << in._ref
+ << " nref=" << in.get_nref()
<< " ll_ref=" << in.ll_ref
<< " cap_refs=" << in.cap_refs
<< " open=" << in.open_by_mode
void Inode::get_open_ref(int mode)
{
client->inc_opened_files();
- if (open_by_mode.count(mode) == 0)
+ if (open_by_mode[mode] == 0) {
client->inc_opened_inodes();
+ }
open_by_mode[mode]++;
break_deleg(!(mode & CEPH_FILE_MODE_WR));
}
{
int c = snap_caps;
int i = 0;
- for (const auto &pair : caps) {
- const Cap &cap = pair.second;
+ for (const auto &[mds, cap] : caps) {
if (cap_is_valid(cap)) {
c |= cap.issued;
i |= cap.implemented;
int Inode::caps_used()
{
int w = 0;
- for (map<int,int>::iterator p = cap_refs.begin();
- p != cap_refs.end();
- ++p)
- if (p->second)
- w |= p->first;
+ for (const auto &[cap, cnt] : cap_refs)
+ if (cnt)
+ w |= cap;
return w;
}
int Inode::caps_file_wanted()
{
int want = 0;
- for (map<int,int>::iterator p = open_by_mode.begin();
- p != open_by_mode.end();
- ++p)
- if (p->second)
- want |= ceph_caps_for_mode(p->first);
+ for (const auto &[mode, cnt] : open_by_mode)
+ if (cnt)
+ want |= ceph_caps_for_mode(mode);
return want;
}
ceph_assert(dentries.size() < 2); // dirs can't be hard-linked
if (!dentries.empty())
get_first_parent()->get(); // pin dentry
- get(); // pin inode
+ iget(); // pin inode
}
return dir;
}
return (mode & want) == want;
}
-void Inode::get() {
- _ref++;
- lsubdout(client->cct, client, 15) << "inode.get on " << this << " " << ino << '.' << snapid
- << " now " << _ref << dendl;
-}
-
-//private method to put a reference; see Client::put_inode()
-int Inode::_put(int n) {
- _ref -= n;
- lsubdout(client->cct, client, 15) << "inode.put on " << this << " " << ino << '.' << snapid
- << " now " << _ref << dendl;
- ceph_assert(_ref >= 0);
- return _ref;
-}
-
-
void Inode::dump(Formatter *f) const
{
f->dump_stream("ino") << ino;
if (requested_max_size != max_size)
f->dump_unsigned("requested_max_size", requested_max_size);
- f->dump_int("ref", _ref);
+ f->dump_int("nref", get_nref());
f->dump_int("ll_ref", ll_ref);
if (!dentries.empty()) {
lsubdout(client->cct, client, 10) << __func__ << " " << *this << " " << ccap_string(dirty_caps) << " -> "
<< ccap_string(dirty_caps | caps) << dendl;
if (caps && !caps_dirty())
- get();
+ iget();
dirty_caps |= caps;
client->get_dirty_list().push_back(&dirty_cap_item);
}
//snapid_t follows; // map key
InodeRef in;
SnapContext context;
- int issued, dirty;
+ int issued = 0, dirty = 0;
- uint64_t size;
+ uint64_t size = 0;
utime_t ctime, btime, mtime, atime;
- version_t time_warp_seq;
- uint64_t change_attr;
- uint32_t mode;
- uid_t uid;
- gid_t gid;
+ version_t time_warp_seq = 0;
+ uint64_t change_attr = 0;
+ uint32_t mode = 0;
+ uid_t uid = 0;
+ gid_t gid = 0;
map<string,bufferptr> xattrs;
- version_t xattr_version;
+ version_t xattr_version = 0;
bufferlist inline_data;
- version_t inline_version;
+ version_t inline_version = 0;
- bool writing, dirty_data;
- uint64_t flush_tid;
+ bool writing = false, dirty_data = false;
+ uint64_t flush_tid = 0;
- int64_t cap_dirtier_uid;
- int64_t cap_dirtier_gid;
+ int64_t cap_dirtier_uid = -1;
+ int64_t cap_dirtier_gid = -1;
explicit CapSnap(Inode *i)
- : in(i), issued(0), dirty(0), size(0), time_warp_seq(0), change_attr(0),
- mode(0), uid(0), gid(0), xattr_version(0), inline_version(0),
- writing(false), dirty_data(false), flush_tid(0), cap_dirtier_uid(-1),
- cap_dirtier_gid(-1)
+ : in(i)
{}
void dump(Formatter *f) const;
#define I_CAP_DROPPED (1 << 4)
#define I_ERROR_FILELOCK (1 << 5)
-struct Inode {
+struct Inode : RefCountedObject {
Client *client;
// -- the actual inode --
inodeno_t ino; // ORDER DEPENDENCY: oset
snapid_t snapid;
- ino_t faked_ino;
+ ino_t faked_ino = 0;
- uint32_t rdev; // if special file
+ uint32_t rdev = 0; // if special file
// affected by any inode change...
utime_t ctime; // inode change time
utime_t btime; // birth time
// perm (namespace permissions)
- uint32_t mode;
- uid_t uid;
- gid_t gid;
+ uint32_t mode = 0;
+ uid_t uid = 0;
+ gid_t gid = 0;
// nlink
- int32_t nlink;
+ int32_t nlink = 0;
// file (data access)
- ceph_dir_layout dir_layout;
+ ceph_dir_layout dir_layout{};
file_layout_t layout;
- uint64_t size; // on directory, # dentries
- uint32_t truncate_seq;
- uint64_t truncate_size;
+ uint64_t size = 0; // on directory, # dentries
+ uint32_t truncate_seq = 1;
+ uint64_t truncate_size = -1;
utime_t mtime; // file data modify time.
utime_t atime; // file data access time.
- uint32_t time_warp_seq; // count of (potential) mtime/atime timewarps (i.e., utimes())
- uint64_t change_attr;
+ uint32_t time_warp_seq = 0; // count of (potential) mtime/atime timewarps (i.e., utimes())
+ uint64_t change_attr = 0;
- uint64_t max_size; // max size we can write to
+ uint64_t max_size = 0; // max size we can write to
// dirfrag, recursive accountin
frag_info_t dirstat;
nest_info_t rstat;
// special stuff
- version_t version; // auth only
- version_t xattr_version;
+ version_t version = 0; // auth only
+ version_t xattr_version = 0;
utime_t snap_btime; // snapshot creation (birth) time
std::map<std::string, std::string> snap_metadata;
// inline data
- version_t inline_version;
+ version_t inline_version = 0;
bufferlist inline_data;
bool fscrypt = false; // fscrypt enabled ?
- bool is_root() const { return ino == MDS_INO_ROOT; }
+ bool is_root() const { return ino == CEPH_INO_ROOT; }
bool is_symlink() const { return (mode & S_IFMT) == S_IFLNK; }
bool is_dir() const { return (mode & S_IFMT) == S_IFDIR; }
bool is_file() const { return (mode & S_IFMT) == S_IFREG; }
return ceph_str_hash(which, dn.data(), dn.length());
}
- unsigned flags;
+ unsigned flags = 0;
quota_info_t quota;
}
// about the dir (if this is one!)
- Dir *dir; // if i'm a dir.
+ Dir *dir = 0; // if i'm a dir.
fragtree_t dirfragtree;
- uint64_t dir_release_count, dir_ordered_count;
- bool dir_hashed, dir_replicated;
+ uint64_t dir_release_count = 1;
+ uint64_t dir_ordered_count = 1;
+ bool dir_hashed = false;
+ bool dir_replicated = false;
// per-mds caps
std::map<mds_rank_t, Cap> caps; // mds -> Cap
- Cap *auth_cap;
- int64_t cap_dirtier_uid;
- int64_t cap_dirtier_gid;
- unsigned dirty_caps, flushing_caps;
+ Cap *auth_cap = 0;
+ int64_t cap_dirtier_uid = -1;
+ int64_t cap_dirtier_gid = -1;
+ unsigned dirty_caps = 0;
+ unsigned flushing_caps = 0;
std::map<ceph_tid_t, int> flushing_cap_tids;
- int shared_gen, cache_gen;
- int snap_caps, snap_cap_refs;
+ int shared_gen = 0;
+ int cache_gen = 0;
+ int snap_caps = 0;
+ int snap_cap_refs = 0;
utime_t hold_caps_until;
xlist<Inode*>::item delay_cap_item, dirty_cap_item, flushing_cap_item;
- SnapRealm *snaprealm;
+ SnapRealm *snaprealm = 0;
xlist<Inode*>::item snaprealm_item;
InodeRef snapdir_parent; // only if we are a snapdir inode
map<snapid_t,CapSnap> cap_snaps; // pending flush to mds
ObjectCacher::ObjectSet oset; // ORDER DEPENDENCY: ino
- uint64_t reported_size, wanted_max_size, requested_max_size;
+ uint64_t reported_size = 0;
+ uint64_t wanted_max_size = 0;
+ uint64_t requested_max_size = 0;
- int _ref; // ref count. 1 for each dentry, fh that links to me.
- uint64_t ll_ref; // separate ref count for ll client
+ uint64_t ll_ref = 0; // separate ref count for ll client
xlist<Dentry *> dentries; // if i'm linked to a dentry.
string symlink; // symlink content, if it's a symlink
map<string,bufferptr> xattrs;
void make_short_path(filepath& p);
void make_nosnap_relative_path(filepath& p);
- void get();
- int _put(int n=1);
-
- int get_num_ref() {
- return _ref;
- }
+ // The ref count. 1 for each dentry, fh, inode_map,
+ // cwd that links to me.
+ void iget() { get(); }
+ void iput(int n=1) { ceph_assert(n >= 0); while (n--) put(); }
void ll_get() {
ll_ref++;
std::set<Fh*> fhs;
- mds_rank_t dir_pin;
+ mds_rank_t dir_pin = MDS_RANK_NONE;
+ Inode() = delete;
Inode(Client *c, vinodeno_t vino, file_layout_t *newlayout)
- : client(c), ino(vino.ino), snapid(vino.snapid), faked_ino(0),
- rdev(0), mode(0), uid(0), gid(0), nlink(0),
- size(0), truncate_seq(1), truncate_size(-1),
- time_warp_seq(0), change_attr(0), max_size(0), version(0),
- xattr_version(0), inline_version(0), flags(0),
- dir(0), dir_release_count(1), dir_ordered_count(1),
- dir_hashed(false), dir_replicated(false), auth_cap(NULL),
- cap_dirtier_uid(-1), cap_dirtier_gid(-1),
- dirty_caps(0), flushing_caps(0), shared_gen(0), cache_gen(0),
- snap_caps(0), snap_cap_refs(0),
- delay_cap_item(this), dirty_cap_item(this), flushing_cap_item(this),
- snaprealm(0), snaprealm_item(this),
- oset((void *)this, newlayout->pool_id, this->ino),
- reported_size(0), wanted_max_size(0), requested_max_size(0),
- _ref(0), ll_ref(0), dir_pin(MDS_RANK_NONE)
- {
- memset(&dir_layout, 0, sizeof(dir_layout));
- }
+ : client(c), ino(vino.ino), snapid(vino.snapid), delay_cap_item(this),
+ dirty_cap_item(this), flushing_cap_item(this), snaprealm_item(this),
+ oset((void *)this, newlayout->pool_id, this->ino) {}
~Inode();
vinodeno_t vino() const { return vinodeno_t(ino, snapid); }
auto iter = in->cbegin();
decode(op, iter);
} catch (const ceph::buffer::error& err) {
- CLS_ERR("ERROR: %s: failed to decode request", __PRETTY_FUNCTION__);
+ CLS_ERR("ERROR: %s: failed to decode request: %s", __PRETTY_FUNCTION__,
+ err.what());
return -EINVAL;
}
int r = cls_cxx_stat2(hctx, &size, nullptr);
if (r < 0 && r != -ENOENT) {
- CLS_ERR("ERROR: %s: cls_cxx_stat2() on obj returned %d", __PRETTY_FUNCTION__, r);
+ CLS_ERR("ERROR: %s: cls_cxx_stat2() on obj returned %d",
+ __PRETTY_FUNCTION__, r);
return r;
}
if (op.exclusive && r == 0) {
- CLS_ERR("%s: exclusive create but queue already exists", __PRETTY_FUNCTION__);
+ CLS_ERR("%s: exclusive create but queue already exists",
+ __PRETTY_FUNCTION__);
return -EEXIST;
}
if (r == 0) {
+ CLS_LOG(5, "%s: FIFO already exists, reading from disk and comparing.",
+ __PRETTY_FUNCTION__);
ceph::buffer::list bl;
r = cls_cxx_read2(hctx, 0, size, &bl, CEPH_OSD_OP_FLAG_FADVISE_WILLNEED);
if (r < 0) {
- CLS_ERR("ERROR: %s: cls_cxx_read2() on obj returned %d", __PRETTY_FUNCTION__, r);
+ CLS_ERR("ERROR: %s: cls_cxx_read2() on obj returned %d",
+ __PRETTY_FUNCTION__, r);
return r;
}
auto iter = bl.cbegin();
decode(header, iter);
} catch (const ceph::buffer::error& err) {
- CLS_ERR("ERROR: %s: failed decoding header", __PRETTY_FUNCTION__);
+ CLS_ERR("ERROR: %s: failed decoding header: %s",
+ __PRETTY_FUNCTION__, err.what());
return -EIO;
}
/* this must be the last index */
"9999_",};
+static const std::string BI_PREFIX_END = string(1, BI_PREFIX_CHAR) +
+ bucket_index_prefixes[BI_BUCKET_LAST_INDEX];
+
static bool bi_is_objs_index(const string& s) {
return ((unsigned char)s[0] != BI_PREFIX_CHAR);
}
}
static int list_plain_entries(cls_method_context_t hctx,
- const string& name,
- const string& marker,
- uint32_t max,
+ const string& filter,
+ const string& start_after_key,
+ const string& end_key,
+ uint32_t max,
list<rgw_cls_bi_entry> *entries,
- bool *pmore)
+ bool *end_key_reached,
+ bool *pmore)
{
- string filter = name;
- string start_after_key = marker;
-
- string end_key; // stop listing at bi_log_prefix
- bi_log_prefix(end_key);
-
int count = 0;
map<string, bufferlist> keys;
int ret = cls_cxx_map_get_vals(hctx, start_after_key, filter, max,
return ret;
}
+ *end_key_reached = false;
+
for (auto iter = keys.begin(); iter != keys.end(); ++iter) {
- if (iter->first >= end_key) {
- /* past the end of plain namespace */
- if (pmore) {
- *pmore = false;
- }
+ if (!end_key.empty() && iter->first >= end_key) {
+ *end_key_reached = true;
+ *pmore = true;
return count;
}
return -EIO;
}
- CLS_LOG(20, "%s(): entry.idx=%s e.key.name=%s", __func__, escape_str(entry.idx).c_str(), escape_str(e.key.name).c_str());
+ CLS_LOG(20, "%s(): entry.idx=%s e.key.name=%s", __func__,
+ escape_str(entry.idx).c_str(), escape_str(e.key.name).c_str());
- if (!name.empty() && e.key.name != name) {
+ if (!filter.empty() && e.key.name != filter) {
/* we are skipping the rest of the entries */
- if (pmore) {
- *pmore = false;
- }
+ *pmore = false;
return count;
}
if (count >= (int)max) {
return count;
}
- start_after_key = entry.idx;
}
return count;
}
+static int list_plain_entries(cls_method_context_t hctx,
+ const string& name,
+ const string& marker,
+ uint32_t max,
+ list<rgw_cls_bi_entry> *entries,
+ bool *pmore) {
+ string start_after_key = marker;
+ string end_key;
+ bi_log_prefix(end_key);
+ int r;
+ bool end_key_reached;
+ bool more;
+
+ if (start_after_key < end_key) {
+ // listing ascii plain namespace
+ int r = list_plain_entries(hctx, name, start_after_key, end_key, max,
+ entries, &end_key_reached, &more);
+ if (r < 0) {
+ return r;
+ }
+ if (r >= (int)max || !end_key_reached || !more) {
+ if (pmore) {
+ *pmore = more;
+ }
+ return r;
+ }
+ start_after_key = BI_PREFIX_END;
+ max = max - r;
+ }
+
+ // listing non-ascii plain namespace
+ r = list_plain_entries(hctx, name, start_after_key, {}, max, entries,
+ &end_key_reached, &more);
+ if (r < 0) {
+ return r;
+ }
+ if (pmore) {
+ *pmore = more;
+ }
+
+ return r;
+}
+
static int list_instance_entries(cls_method_context_t hctx,
const string& name,
const string& marker,
unsigned align,
int mempool = mempool::mempool_buffer_anon)
{
- if (!align)
- align = sizeof(size_t);
+ // posix_memalign() requires a multiple of sizeof(void *)
+ align = std::max<unsigned>(align, sizeof(void *));
size_t rawlen = round_up_to(sizeof(buffer::raw_combined),
alignof(buffer::raw_combined));
size_t datalen = round_up_to(len, alignof(buffer::raw_combined));
MEMPOOL_CLASS_HELPERS();
raw_posix_aligned(unsigned l, unsigned _align) : raw(l) {
- align = _align;
- ceph_assert((align >= sizeof(void *)) && (align & (align - 1)) == 0);
+ // posix_memalign() requires a multiple of sizeof(void *)
+ align = std::max<unsigned>(_align, sizeof(void *));
#ifdef DARWIN
data = (char *) valloc(len);
#else
values.cluster = get_cluster_name(nullptr);
}
// open new conf
- string conffile;
for (auto& fn : get_conffile_paths(values, conf_files_str, warnings, flags)) {
bufferlist bl;
std::string error;
int ret = parse_buffer(values, tracker, bl.c_str(), bl.length(), &oss);
if (ret == 0) {
parse_error.clear();
- conffile = fn;
+ conf_path = fn;
break;
}
parse_error = oss.str();
}
}
// it must have been all ENOENTs, that's the only way we got here
- if (conffile.empty()) {
+ if (conf_path.empty()) {
return -ENOENT;
}
if (values.cluster.empty()) {
- values.cluster = get_cluster_name(conffile.c_str());
+ values.cluster = get_cluster_name(conf_path.c_str());
}
update_legacy_vals(values);
return 0;
const char *conf_files,
std::ostream *warnings,
int flags) const;
+
+ const std::string& get_conf_path() const {
+ return conf_path;
+ }
private:
static std::string get_cluster_name(const char* conffile_path);
// The configuration file we read, or NULL if we haven't read one.
ConfFile cf;
+ std::string conf_path;
public:
std::string parse_error;
private:
std::lock_guard l{lock};
config.get_defaults_bl(values, bl);
}
+ const std::string& get_conf_path() const {
+ return config.get_conf_path();
+ }
};
}
#define ldout(cct, v) dout_impl(cct, dout_subsys, v) dout_prefix
#define lderr(cct) dout_impl(cct, ceph_subsys_, -1) dout_prefix
+#define ldpp_subdout(dpp, sub, v) \
+ if (decltype(auto) pdpp = (dpp); pdpp) /* workaround -Wnonnull-compare for 'this' */ \
+ dout_impl(pdpp->get_cct(), ceph_subsys_##sub, v) \
+ pdpp->gen_prefix(*_dout)
+
#define ldpp_dout(dpp, v) \
if (decltype(auto) pdpp = (dpp); pdpp) /* workaround -Wnonnull-compare for 'this' */ \
dout_impl(pdpp->get_cct(), ceph::dout::need_dynamic(pdpp->get_subsys()), v) \
Option("osd_snap_trim_sleep", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
.set_default(0)
+ .set_flag(Option::FLAG_RUNTIME)
.set_description("Time in seconds to sleep before next snap trim (overrides values below)"),
Option("osd_snap_trim_sleep_hdd", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
.set_default(5)
+ .set_flag(Option::FLAG_RUNTIME)
.set_description("Time in seconds to sleep before next snap trim for HDDs"),
Option("osd_snap_trim_sleep_ssd", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
.set_default(0)
+ .set_flag(Option::FLAG_RUNTIME)
.set_description("Time in seconds to sleep before next snap trim for SSDs"),
Option("osd_snap_trim_sleep_hybrid", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
.set_default(2)
+ .set_flag(Option::FLAG_RUNTIME)
.set_description("Time in seconds to sleep before next snap trim when data is on HDD and journal is on SSD"),
Option("osd_scrub_invalid_stats", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
Option("osd_scrub_sleep", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
.set_default(0)
+ .set_flag(Option::FLAG_RUNTIME)
.set_description("Duration to inject a delay during scrubbing"),
Option("osd_scrub_extended_sleep", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
Option("osd_delete_sleep", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
.set_default(0)
+ .set_flag(Option::FLAG_RUNTIME)
.set_description("Time in seconds to sleep before next removal transaction (overrides values below)"),
Option("osd_delete_sleep_hdd", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
.set_default(5)
+ .set_flag(Option::FLAG_RUNTIME)
.set_description("Time in seconds to sleep before next removal transaction for HDDs"),
Option("osd_delete_sleep_ssd", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
.set_default(1)
+ .set_flag(Option::FLAG_RUNTIME)
.set_description("Time in seconds to sleep before next removal transaction for SSDs"),
Option("osd_delete_sleep_hybrid", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
.set_default(1)
+ .set_flag(Option::FLAG_RUNTIME)
.set_description("Time in seconds to sleep before next removal transaction when data is on HDD and journal is on SSD"),
Option("osd_failsafe_full_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
.add_see_also("bluestore_cache_autotune")
.add_see_also("osd_memory_cache_min")
.add_see_also("osd_memory_base")
+ .add_see_also("osd_memory_target_autotune")
.set_description("When tcmalloc and cache autotuning is enabled, try to keep this many bytes mapped in memory.")
.set_long_description("The minimum value must be at least equal to osd_memory_base + osd_memory_cache_min."),
+ Option("osd_memory_target_autotune", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
+ .set_default(false)
+ .add_see_also("osd_memory_target")
+ .set_description("If enabled, allow orchestrator to automatically tune osd_memory_target"),
+
Option("osd_memory_target_cgroup_limit_ratio", Option::TYPE_FLOAT, Option::LEVEL_ADVANCED)
.set_default(0.8)
.set_min_max(0.0, 1.0)
.set_description("How frequently we trim the bluestore cache"),
Option("bluestore_cache_trim_max_skip_pinned", Option::TYPE_UINT, Option::LEVEL_DEV)
- .set_default(64)
+ .set_default(1000)
.set_description("Max pinned cache entries we consider before giving up"),
Option("bluestore_cache_type", Option::TYPE_STR, Option::LEVEL_DEV)
.add_service("mgr")
.set_description("Filesystem path to manager modules."),
+ Option("mgr_standby_modules", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
+ .set_default(true)
+ .set_description("Start modules in standby (redirect) mode when mgr is standby")
+ .set_long_description(
+ "By default, the standby modules will answer incoming requests with a "
+ "HTTP redirect to the active manager, allowing users to point their browser at any "
+ "mgr node and find their way to an active mgr. However, this mode is problematic "
+ "when using a load balancer because (1) the redirect locations are usually private "
+ "IPs and (2) the load balancer can't identify which mgr is the right one to send "
+ "traffic to. If a load balancer is being used, set this to false."),
+
Option("mgr_disabled_modules", Option::TYPE_STR, Option::LEVEL_ADVANCED)
#ifdef MGR_DISABLED_MODULES
.set_default(MGR_DISABLED_MODULES)
.add_see_also("mgr_module_path"),
Option("mgr_initial_modules", Option::TYPE_STR, Option::LEVEL_BASIC)
- .set_default("restful iostat")
+ .set_default("restful iostat nfs")
.set_flag(Option::FLAG_NO_MON_UPDATE)
.set_flag(Option::FLAG_CLUSTER_CREATE)
.add_service("mon")
.set_min(0)
.set_description("interval to restart failed mirror instances")
.set_long_description("Interval in seconds to restart failed mirror instances. Setting to zero (0) disables restarting failed mirror instances."),
+
+ Option("cephfs_mirror_mount_timeout", Option::TYPE_SECS, Option::LEVEL_ADVANCED)
+ .set_default(10)
+ .set_min(0)
+ .set_description("timeout for mounting primary/seconday ceph file system")
+ .set_long_description("Timeout in seconds for mounting primary or secondary (remote) ceph file system by the cephfs-mirror daemon. Setting this to a higher value could result in the mirror daemon getting stalled when mounting a file system if the cluster is not reachable. This option is used to override the usual client_mount_timeout."),
});
}
__u32 perm_x; /* @x for which *perm is defined */
__u32 perm_n; /* num elements of *perm that are permuted/defined */
__u32 *perm; /* Permutation of the bucket's items */
-};
+} __attribute__ ((packed));
struct crush_work {
struct crush_work_bucket **work; /* Per-bucket working store */
#define CEPH_MONC_PROTOCOL 15 /* server/client */
-#define CEPH_INO_ROOT 1
-#define CEPH_INO_CEPH 2 /* hidden .ceph dir */
-#define CEPH_INO_LOST_AND_FOUND 4 /* reserved ino for use in recovery */
+#define CEPH_INO_ROOT 1
+/*
+ * hidden .ceph dir, which is no longer created but
+ * recognised in existing filesystems so that we
+ * don't try to fragment it.
+ */
+#define CEPH_INO_CEPH 2
+#define CEPH_INO_GLOBAL_SNAPREALM 3
+#define CEPH_INO_LOST_AND_FOUND 4 /* reserved ino for use in recovery */
/* arbitrary limit on max # of monitors (cluster of 3 is typical) */
#define CEPH_MAX_MON 31
*/
int ceph_conf_set(struct ceph_mount_info *cmount, const char *option, const char *value);
+/** Set mount timeout.
+ *
+ * @param cmount mount handle to set the configuration value on
+ * @param timeout mount timeout interval
+ *
+ * @returns 0 on success, negative error code otherwise.
+ */
+int ceph_set_mount_timeout(struct ceph_mount_info *cmount, uint32_t timeout);
+
/**
* Gets the configuration value as a string.
*
*/
int ceph_opendir(struct ceph_mount_info *cmount, const char *name, struct ceph_dir_result **dirpp);
+/**
+ * Open a directory referred to by a file descriptor
+ *
+ * @param cmount the ceph mount handle to use to open the directory
+ * @param dirfd open file descriptor for the directory
+ * @param dirpp the directory result pointer structure to fill in
+ * @returns 0 on success or negative error code otherwise
+ */
+int ceph_fdopendir(struct ceph_mount_info *cmount, int dirfd, struct ceph_dir_result **dirpp);
+
/**
* Close the open directory.
*
*/
int ceph_mkdir(struct ceph_mount_info *cmount, const char *path, mode_t mode);
+/**
+ * Create a directory relative to a file descriptor
+ *
+ * @param cmount the ceph mount handle to use for making the directory.
+ * @param dirfd open file descriptor for a directory (or CEPHFS_AT_FDCWD)
+ * @param relpath the path of the directory to create.
+ * @param mode the permissions the directory should have once created.
+ * @returns 0 on success or a negative return code on error.
+ */
+int ceph_mkdirat(struct ceph_mount_info *cmount, int dirfd, const char *relpath, mode_t mode);
+
/**
* Create a snapshot
*
*/
int ceph_readlink(struct ceph_mount_info *cmount, const char *path, char *buf, int64_t size);
+/**
+ * Read a symbolic link relative to a file descriptor
+ *
+ * @param cmount the ceph mount handle to use for creating the link.
+ * @param dirfd open file descriptor (or CEPHFS_AT_FDCWD)
+ * @param relpath the path to the symlink to read
+ * @param buf the buffer to hold the path of the file that the symlink points to.
+ * @param size the length of the buffer
+ * @returns number of bytes copied on success or negative error code on failure
+ */
+int ceph_readlinkat(struct ceph_mount_info *cmount, int dirfd, const char *relpath, char *buf,
+ int64_t size);
+
/**
* Creates a symbolic link.
*
*/
int ceph_symlink(struct ceph_mount_info *cmount, const char *existing, const char *newname);
+/**
+ * Creates a symbolic link relative to a file descriptor
+ *
+ * @param cmount the ceph mount handle to use for creating the symbolic link.
+ * @param dirfd open file descriptor (or CEPHFS_AT_FDCWD)
+ * @param existing the path to the existing file/directory to link to.
+ * @param newname the path to the new file/directory to link from.
+ * @returns 0 on success or a negative return code on failure.
+ */
+int ceph_symlinkat(struct ceph_mount_info *cmount, const char *existing, int dirfd,
+ const char *newname);
+
/** @} links */
/**
*/
int ceph_unlink(struct ceph_mount_info *cmount, const char *path);
+/**
+ * Removes a file, link, or symbolic link relative to a file descriptor.
+ * If the file/link has multiple links to it, the file will not
+ * disappear from the namespace until all references to it are removed.
+ *
+ * @param cmount the ceph mount handle to use for performing the unlink.
+ * @param dirfd open file descriptor (or CEPHFS_AT_FDCWD)
+ * @param relpath the path of the file or link to unlink.
+ * @param flags bitfield that can be used to set AT_* modifier flags (only AT_REMOVEDIR)
+ * @returns 0 on success or negative error code on failure.
+ */
+int ceph_unlinkat(struct ceph_mount_info *cmount, int dirfd, const char *relpath, int flags);
+
/**
* Rename a file or directory.
*
int ceph_fstatx(struct ceph_mount_info *cmount, int fd, struct ceph_statx *stx,
unsigned int want, unsigned int flags);
+/**
+ * Get attributes of a file relative to a file descriptor
+ *
+ * @param cmount the ceph mount handle to use for performing the stat.
+ * @param dirfd open file descriptor (or CEPHFS_AT_FDCWD)
+ * @param relpath to the file/directory to get statistics of
+ * @param stx the ceph_statx struct that will be filled in with the file's statistics.
+ * @param want bitfield of CEPH_STATX_* flags showing designed attributes
+ * @param flags bitfield that can be used to set AT_* modifier flags (only AT_NO_ATTR_SYNC and AT_SYMLINK_NOFOLLOW)
+ * @returns 0 on success or negative error code on failure.
+ */
+int ceph_statxat(struct ceph_mount_info *cmount, int dirfd, const char *relpath,
+ struct ceph_statx *stx, unsigned int want, unsigned int flags);
+
/**
* Get a file's extended statistics and attributes.
*
*/
int ceph_fchmod(struct ceph_mount_info *cmount, int fd, mode_t mode);
+/**
+ * Change the mode bits (permissions) of a file relative to a file descriptor.
+ *
+ * @param cmount the ceph mount handle to use for performing the chown.
+ * @param dirfd open file descriptor (or CEPHFS_AT_FDCWD)
+ * @param relpath the relpath of the file/directory to change the ownership of.
+ * @param mode the new permissions to set.
+ * @param flags bitfield that can be used to set AT_* modifier flags (AT_SYMLINK_NOFOLLOW)
+ * @returns 0 on success or negative error code on failure.
+ */
+int ceph_chmodat(struct ceph_mount_info *cmount, int dirfd, const char *relpath,
+ mode_t mode, int flags);
+
/**
* Change the ownership of a file/directory.
*
*/
int ceph_lchown(struct ceph_mount_info *cmount, const char *path, int uid, int gid);
+/**
+ * Change the ownership of a file/directory releative to a file descriptor.
+ *
+ * @param cmount the ceph mount handle to use for performing the chown.
+ * @param dirfd open file descriptor (or CEPHFS_AT_FDCWD)
+ * @param relpath the relpath of the file/directory to change the ownership of.
+ * @param uid the user id to set on the file/directory.
+ * @param gid the group id to set on the file/directory.
+ * @param flags bitfield that can be used to set AT_* modifier flags (AT_SYMLINK_NOFOLLOW)
+ * @returns 0 on success or negative error code on failure.
+ */
+int ceph_chownat(struct ceph_mount_info *cmount, int dirfd, const char *relpath,
+ uid_t uid, gid_t gid, int flags);
+
/**
* Change file/directory last access and modification times.
*
*/
int ceph_futimens(struct ceph_mount_info *cmount, int fd, struct timespec times[2]);
+/**
+ * Change file/directory last access and modification times relative
+ * to a file descriptor.
+ *
+ * @param cmount the ceph mount handle to use for performing the utime.
+ * @param dirfd open file descriptor (or CEPHFS_AT_FDCWD)
+ * @param relpath the relpath of the file/directory to change the ownership of.
+ * @param dirfd the fd of the open file/directory to set the time values of.
+ * @param times holding the access and modification times to set on the file.
+ * @param flags bitfield that can be used to set AT_* modifier flags (AT_SYMLINK_NOFOLLOW)
+ * @returns 0 on success or negative error code on failure.
+ */
+int ceph_utimensat(struct ceph_mount_info *cmount, int dirfd, const char *relpath,
+ struct timespec times[2], int flags);
+
/**
* Apply or remove an advisory lock.
*
*/
int ceph_open(struct ceph_mount_info *cmount, const char *path, int flags, mode_t mode);
+/**
+ * Create and/or open a file relative to a directory
+ *
+ * @param cmount the ceph mount handle to use for performing the open.
+ * @param dirfd open file descriptor (or CEPHFS_AT_FDCWD)
+ * @param relpath the path of the file to open. If the flags parameter includes O_CREAT,
+ * the file will first be created before opening.
+ * @param flags a set of option masks that control how the file is created/opened.
+ * @param mode the permissions to place on the file if the file does not exist and O_CREAT
+ * is specified in the flags.
+ * @returns a non-negative file descriptor number on success or a negative error code on failure.
+ */
+int ceph_openat(struct ceph_mount_info *cmount, int dirfd, const char *relpath, int flags, mode_t mode);
+
/**
* Create and/or open a file with a specific file layout.
*
os << "OPENED_INODES";
break;
default:
- ceph_abort();
+ os << "(UNKNOWN:" << static_cast<std::underlying_type<ClientMetricType>::type>(type) << ")";
+ break;
}
return os;
#define CEPHFS_ETIME 62
#define CEPHFS_EOLDSNAPC 85
+// taken from linux kernel: include/uapi/linux/fcntl.h
+#define CEPHFS_AT_FDCWD -100 /* Special value used to indicate
+ openat should use the current
+ working directory. */
// --------------------------------------
// ino
#ifdef _WIN32
# define LIBCEPHSQLITE_API __declspec(dllexport)
#else
-# define LIBCEPHSQLITE_API extern "C"
+# define LIBCEPHSQLITE_API [[gnu::visibility("default")]]
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
/* This is the SQLite entry point when loaded as a dynamic library. You also
* need to ensure SQLite calls this method when using libcephsqlite as a static
* library or a dynamic library linked at compile time. For the latter case,
*/
LIBCEPHSQLITE_API int cephsqlite_setcct(class CephContext* cct, char** ident);
+#ifdef __cplusplus
+}
+#endif
#endif
// Dirt cheap, see:
// https://fossies.org/dox/glibc-2.32/pthread__self_8c_source.html
size_t me = (size_t)pthread_self();
- size_t i = (me >> 12) & ((1 << num_shard_bits) - 1);
+ size_t i = (me >> CEPH_PAGE_SHIFT) & ((1 << num_shard_bits) - 1);
return i;
}
#define LOCK_RW 192
#define AT_SYMLINK_NOFOLLOW 0x100
+#define AT_REMOVEDIR 0x200
#define MAXSYMLINKS 65000
#include "common/version.h"
#include "mon/MonClient.h"
#include "include/str_list.h"
+#include "include/stringify.h"
#include "messages/MMonMap.h"
#include "msg/Messenger.h"
#include "include/ceph_assert.h"
return cmount->conf_get(option, buf, len);
}
+extern "C" int ceph_set_mount_timeout(struct ceph_mount_info *cmount, uint32_t timeout) {
+ if (cmount->is_mounted()) {
+ return -EINVAL;
+ }
+
+ auto timeout_str = stringify(timeout);
+ return ceph_conf_set(cmount, "client_mount_timeout", timeout_str.c_str());
+}
+
extern "C" int ceph_mds_command(struct ceph_mount_info *cmount,
const char *mds_spec,
const char **cmd,
return cmount->get_client()->opendir(name, (dir_result_t **)dirpp, cmount->default_perms);
}
+extern "C" int ceph_fdopendir(struct ceph_mount_info *cmount, int dirfd,
+ struct ceph_dir_result **dirpp)
+{
+ if (!cmount->is_mounted())
+ return -ENOTCONN;
+ return cmount->get_client()->fdopendir(dirfd, (dir_result_t **)dirpp, cmount->default_perms);
+}
+
extern "C" int ceph_closedir(struct ceph_mount_info *cmount, struct ceph_dir_result *dirp)
{
if (!cmount->is_mounted())
return cmount->get_client()->unlink(path, cmount->default_perms);
}
+extern "C" int ceph_unlinkat(struct ceph_mount_info *cmount, int dirfd, const char *relpath, int flags)
+{
+ if (!cmount->is_mounted())
+ return -ENOTCONN;
+ return cmount->get_client()->unlinkat(dirfd, relpath, flags, cmount->default_perms);
+}
+
extern "C" int ceph_rename(struct ceph_mount_info *cmount, const char *from,
const char *to)
{
return cmount->get_client()->mkdir(path, mode, cmount->default_perms);
}
+extern "C" int ceph_mkdirat(struct ceph_mount_info *cmount, int dirfd, const char *relpath,
+ mode_t mode)
+{
+ if (!cmount->is_mounted())
+ return -ENOTCONN;
+ return cmount->get_client()->mkdirat(dirfd, relpath, mode, cmount->default_perms);
+}
+
extern "C" int ceph_mksnap(struct ceph_mount_info *cmount, const char *path, const char *name,
mode_t mode, struct snap_metadata *snap_metadata, size_t nr_snap_metadata)
{
return cmount->get_client()->readlink(path, buf, size, cmount->default_perms);
}
+extern "C" int ceph_readlinkat(struct ceph_mount_info *cmount, int dirfd,
+ const char *relpath, char *buf, int64_t size)
+{
+ if (!cmount->is_mounted())
+ return -ENOTCONN;
+ return cmount->get_client()->readlinkat(dirfd, relpath, buf, size, cmount->default_perms);
+}
+
extern "C" int ceph_symlink(struct ceph_mount_info *cmount, const char *existing,
const char *newname)
{
return cmount->get_client()->symlink(existing, newname, cmount->default_perms);
}
+extern "C" int ceph_symlinkat(struct ceph_mount_info *cmount, const char *existing, int dirfd,
+ const char *newname)
+{
+ if (!cmount->is_mounted())
+ return -ENOTCONN;
+ return cmount->get_client()->symlinkat(existing, dirfd, newname, cmount->default_perms);
+}
+
extern "C" int ceph_fstatx(struct ceph_mount_info *cmount, int fd, struct ceph_statx *stx,
unsigned int want, unsigned int flags)
{
want, flags);
}
+extern "C" int ceph_statxat(struct ceph_mount_info *cmount, int dirfd, const char *relpath,
+ struct ceph_statx *stx, unsigned int want, unsigned int flags)
+{
+ if (!cmount->is_mounted())
+ return -ENOTCONN;
+ if (flags & ~CEPH_REQ_FLAG_MASK)
+ return -EINVAL;
+ return cmount->get_client()->statxat(dirfd, relpath, stx, cmount->default_perms,
+ want, flags);
+}
+
extern "C" int ceph_statx(struct ceph_mount_info *cmount, const char *path,
struct ceph_statx *stx, unsigned int want, unsigned int flags)
{
return -ENOTCONN;
return cmount->get_client()->fchmod(fd, mode, cmount->default_perms);
}
+
+extern "C" int ceph_chmodat(struct ceph_mount_info *cmount, int dirfd, const char *relpath,
+ mode_t mode, int flags) {
+ if (!cmount->is_mounted())
+ return -ENOTCONN;
+ return cmount->get_client()->chmodat(dirfd, relpath, mode, flags, cmount->default_perms);
+}
+
extern "C" int ceph_chown(struct ceph_mount_info *cmount, const char *path,
int uid, int gid)
{
return cmount->get_client()->lchown(path, uid, gid, cmount->default_perms);
}
+extern "C" int ceph_chownat(struct ceph_mount_info *cmount, int dirfd, const char *relpath,
+ uid_t uid, gid_t gid, int flags) {
+ if (!cmount->is_mounted())
+ return -ENOTCONN;
+ return cmount->get_client()->chownat(dirfd, relpath, uid, gid, flags, cmount->default_perms);
+}
extern "C" int ceph_utime(struct ceph_mount_info *cmount, const char *path,
struct utimbuf *buf)
return cmount->get_client()->futimens(fd, times, cmount->default_perms);
}
+extern "C" int ceph_utimensat(struct ceph_mount_info *cmount, int dirfd, const char *relpath,
+ struct timespec times[2], int flags) {
+ if (!cmount->is_mounted())
+ return -ENOTCONN;
+ return cmount->get_client()->utimensat(dirfd, relpath, times, flags, cmount->default_perms);
+}
+
extern "C" int ceph_flock(struct ceph_mount_info *cmount, int fd, int operation,
uint64_t owner)
{
return cmount->get_client()->open(path, flags, cmount->default_perms, mode);
}
+extern "C" int ceph_openat(struct ceph_mount_info *cmount, int dirfd, const char *relpath,
+ int flags, mode_t mode)
+{
+ if (!cmount->is_mounted())
+ return -ENOTCONN;
+ return cmount->get_client()->openat(dirfd, relpath, flags, cmount->default_perms, mode);
+}
+
extern "C" int ceph_open_layout(struct ceph_mount_info *cmount, const char *path, int flags,
mode_t mode, int stripe_unit, int stripe_count, int object_size, const char *data_pool)
{
NoOpProgressContext remove_pctx;
uint64_t list_size = to_be_removed.size(), i = 0;
- for (const auto &entry_id : to_be_removed) {
- r = librbd::api::Trash<I>::remove(io_ctx, entry_id, true, remove_pctx);
- if (r < 0) {
- if (r == -ENOTEMPTY) {
- ldout(cct, 5) << "image has snapshots - these must be deleted "
- << "with 'rbd snap purge' before the image can be "
- << "removed." << dendl;
- } else if (r == -EBUSY) {
- ldout(cct, 5) << "error: image still has watchers" << std::endl
- << "This means the image is still open or the client "
- << "using it crashed. Try again after closing/unmapping "
- << "it or waiting 30s for the crashed client to timeout."
- << dendl;
- } else if (r == -EUCLEAN) {
- ldout(cct, 5) << "Image is not in the expected state. Ensure moving "
- << "the image to the trash completed successfully."
- << dendl;
- } else if (r == -EMLINK) {
- ldout(cct, 5) << "Remove the image from the group and try again."
- << dendl;
- } else {
- lderr(cct) << "remove error: " << cpp_strerror(r) << dendl;
+ int remove_err = 1;
+ while (!to_be_removed.empty() && remove_err == 1) {
+ remove_err = 0;
+ for (auto it = to_be_removed.begin(); it != to_be_removed.end(); ) {
+ trash_image_info_t trash_info;
+ r = Trash<I>::get(io_ctx, *it, &trash_info);
+ if (r == -ENOENT) {
+ // likely RBD_TRASH_IMAGE_SOURCE_USER_PARENT image removed as a side
+ // effect of a preceeding remove (last child detach)
+ pctx.update_progress(++i, list_size);
+ it = to_be_removed.erase(it);
+ continue;
+ } else if (r < 0) {
+ lderr(cct) << "error getting image id " << *it
+ << " info: " << cpp_strerror(r) << dendl;
+ return r;
}
- return r;
+
+ r = Trash<I>::remove(io_ctx, *it, true, remove_pctx);
+ if (r == -ENOTEMPTY || r == -EBUSY || r == -EMLINK || r == -EUCLEAN) {
+ if (!remove_err) {
+ remove_err = r;
+ }
+ ++it;
+ continue;
+ } else if (r < 0) {
+ lderr(cct) << "error removing image id " << *it
+ << ": " << cpp_strerror(r) << dendl;
+ return r;
+ }
+ pctx.update_progress(++i, list_size);
+ it = to_be_removed.erase(it);
+ remove_err = 1;
}
- pctx.update_progress(++i, list_size);
+ ldout(cct, 20) << "remove_err=" << remove_err << dendl;
+ }
+
+ if (!to_be_removed.empty()) {
+ ceph_assert(remove_err < 0);
+ ldout(cct, 10) << "couldn't remove " << to_be_removed.size()
+ << " expired images" << dendl;
+ return remove_err;
}
return 0;
present = (bool)f["present"];
empty = (bool)f["empty"];
clean = (bool)f["clean"];
- host = (string)f["pwl_host"];
- path = (string)f["pwl_path"];
+ cache_type = f["cache_type"];
+ host = f["pwl_host"];
+ path = f["pwl_path"];
uint64_t pwl_size;
std::istringstream iss(f["pwl_size"]);
iss >> pwl_size;
I* image_ctx, plugin::Api<I>& plugin_api, int &r) {
std::string cache_state_str;
ImageCacheState<I>* cache_state = nullptr;
- ldout(image_ctx->cct, 20) << "image_cache_state:" << cache_state_str << dendl;
r = 0;
bool dirty_cache = plugin_api.test_image_features(image_ctx, RBD_FEATURE_DIRTY_CACHE);
IMAGE_CACHE_STATE, &cache_state_str);
}
+ ldout(image_ctx->cct, 20) << "image_cache_state: " << cache_state_str << dendl;
+
bool pwl_enabled = cache::util::is_pwl_enabled(*image_ctx);
bool cache_desired = pwl_enabled;
cache_desired &= !image_ctx->read_only;
}
bool cache_exists = (bool)f["present"];
- int cache_type = (int)f["cache_type"];
-
- switch (cache_type) {
- case IMAGE_CACHE_TYPE_SSD:
- case IMAGE_CACHE_TYPE_RWL:
- if (!cache_exists) {
- cache_state = new ImageCacheState<I>(image_ctx, plugin_api);
- } else {
- cache_state = new ImageCacheState<I>(image_ctx, f, plugin_api);
- }
- break;
- default:
- r = -EINVAL;
+ if (!cache_exists) {
+ cache_state = new ImageCacheState<I>(image_ctx, plugin_api);
+ } else {
+ cache_state = new ImageCacheState<I>(image_ctx, f, plugin_api);
}
}
return cache_state;
unlink_snap_id = 0;
continue;
}
+ // call UnlinkPeerRequest only if the snapshot is linked with this peer
+ // or if it's not linked with any peer (happens if mirroring is enabled
+ // on a pool with no peers configured or if UnlinkPeerRequest gets
+ // interrupted)
+ if (info->mirror_peer_uuids.size() == 0) {
+ peer_uuid = peer;
+ snap_id = snap_it.first;
+ break;
+ }
+ if (info->mirror_peer_uuids.count(peer) == 0) {
+ continue;
+ }
count++;
if (count == 3) {
unlink_snap_id = snap_it.first;
compress
sharedscripts
postrotate
- killall -q -1 ceph-mon ceph-mgr ceph-mds ceph-osd ceph-fuse radosgw rbd-mirror || pkill -1 -x "ceph-mon|ceph-mgr|ceph-mds|ceph-osd|ceph-fuse|radosgw|rbd-mirror" || true
+ killall -q -1 ceph-mon ceph-mgr ceph-mds ceph-osd ceph-fuse radosgw rbd-mirror cephfs-mirror || pkill -1 -x "ceph-mon|ceph-mgr|ceph-mds|ceph-osd|ceph-fuse|radosgw|rbd-mirror|cephfs-mirror" || true
endscript
missingok
notifempty
vector<string> &&r,
mempool::mds_co::compact_set<mempool::mds_co::string> &&stales) :
dir(d), op_prio(pr) {
- metapool = dir->mdcache->mds->mdsmap->get_metadata_pool();
+ metapool = dir->mdcache->mds->get_metadata_pool();
version = dir->get_version();
is_new = dir->is_new();
to_set.swap(s);
m.write_full(bl);
object_t oid = CInode::get_object_name(ino(), frag_t(), ".inode");
- object_locator_t oloc(mdcache->mds->mdsmap->get_metadata_pool());
+ object_locator_t oloc(mdcache->mds->get_metadata_pool());
Context *newfin =
new C_OnFinisher(new C_IO_Inode_Stored(this, get_version(), fin),
C_GatherBuilder gather(g_ceph_context, new C_OnFinisher(c, mdcache->mds->finisher));
object_t oid = CInode::get_object_name(ino(), frag_t(), "");
- object_locator_t oloc(mdcache->mds->mdsmap->get_metadata_pool());
+ object_locator_t oloc(mdcache->mds->get_metadata_pool());
// Old on-disk format: inode stored in xattr of a dirfrag
ObjectOperation rd;
int64_t CInode::get_backtrace_pool() const
{
if (is_dir()) {
- return mdcache->mds->mdsmap->get_metadata_pool();
+ return mdcache->mds->get_metadata_pool();
} else {
// Files are required to have an explicit layout that specifies
// a pool
inodeno_t ino() const { return get_inode()->ino; }
vinodeno_t vino() const { return vinodeno_t(ino(), last); }
int d_type() const { return IFTODT(get_inode()->mode); }
- bool is_root() const { return ino() == MDS_INO_ROOT; }
+ bool is_root() const { return ino() == CEPH_INO_ROOT; }
bool is_stray() const { return MDS_INO_IS_STRAY(ino()); }
mds_rank_t get_stray_owner() const {
return (mds_rank_t)MDS_INO_STRAY_OWNER(ino());
{
// Special cases: damage to these dirfrags is considered fatal to
// the MDS rank that owns them.
- if (
- (MDS_INO_IS_STRAY(ino) && MDS_INO_STRAY_OWNER(ino) == rank)
- ||
- (ino == MDS_INO_ROOT)
- ) {
+ if ((MDS_INO_IS_STRAY(ino) && MDS_INO_STRAY_OWNER(ino) == rank)
+ || (ino == CEPH_INO_ROOT)) {
derr << "Damage to fragment " << frag << " of ino " << ino
<< " is fatal because it is a system directory for this rank" << dendl;
return true;
gather++;
if (lock->is_cached())
invalidate_lock_caches(lock);
+
+ // After a client request is early replied the mdlog won't be flushed
+ // immediately, but before safe replied the request will hold the write
+ // locks. So if the client sends another request to a different MDS
+ // daemon, which then needs to request read lock from current MDS daemon,
+ // then that daemon maybe stuck at most for 5 seconds. Which will lead
+ // the client stuck at most 5 seconds.
+ //
+ // Let's try to flush the mdlog when the write lock is held, which will
+ // release the write locks after mdlog is successfully flushed.
+ mds->mdlog->flush();
}
if (lock->get_parent()->is_replicated() && old_state == LOCK_MIX) {
}
else if (in->state_test(CInode::STATE_NEEDSRECOVER)) {
mds->mdcache->queue_file_recover(in);
+ mds->mdcache->do_file_recover();
}
}
/* we assume that balancer is in the metadata pool */
object_t oid = object_t(mds->mdsmap->get_balancer());
- object_locator_t oloc(mds->mdsmap->get_metadata_pool());
+ object_locator_t oloc(mds->get_metadata_pool());
ceph_tid_t tid = mds->objecter->read(oid, oloc, 0, 0, CEPH_NOSNAP, &lua_src, 0,
new C_SafeCond(lock, cond, &ack, &r));
dout(15) << "launched non-blocking read tid=" << tid
decayrate.set_halflife(g_conf()->mds_decay_halflife);
- upkeeper = std::thread([this]() {
- std::unique_lock lock(upkeep_mutex);
- while (!upkeep_trim_shutdown.load()) {
- auto now = clock::now();
- auto since = now-upkeep_last_trim;
- auto trim_interval = clock::duration(g_conf().get_val<std::chrono::seconds>("mds_cache_trim_interval"));
- if (since >= trim_interval*.90) {
- lock.unlock(); /* mds_lock -> upkeep_mutex */
- std::scoped_lock mds_lock(mds->mds_lock);
- lock.lock();
- if (upkeep_trim_shutdown.load())
- return;
- if (mds->is_cache_trimmable()) {
- dout(20) << "upkeep thread trimming cache; last trim " << since << " ago" << dendl;
- trim_client_leases();
- trim();
- check_memory_usage();
- auto flags = Server::RecallFlags::ENFORCE_MAX|Server::RecallFlags::ENFORCE_LIVENESS;
- mds->server->recall_client_state(nullptr, flags);
- upkeep_last_trim = now = clock::now();
- } else {
- dout(10) << "cache not ready for trimming" << dendl;
- }
- } else {
- trim_interval -= since;
- }
- since = now-upkeep_last_release;
- auto release_interval = clock::duration(g_conf().get_val<std::chrono::seconds>("mds_cache_release_free_interval"));
- if (since >= release_interval*.90) {
- /* XXX not necessary once MDCache uses PriorityCache */
- dout(10) << "releasing free memory" << dendl;
- ceph_heap_release_free_memory();
- upkeep_last_release = clock::now();
- } else {
- release_interval -= since;
- }
- auto interval = std::min(release_interval, trim_interval);
- dout(20) << "upkeep thread waiting interval " << interval << dendl;
- upkeep_cvar.wait_for(lock, interval);
- }
- });
+ upkeeper = std::thread(&MDCache::upkeep_main, this);
}
MDCache::~MDCache()
}
if (in->ino() < MDS_INO_SYSTEM_BASE) {
- if (in->ino() == MDS_INO_ROOT)
+ if (in->ino() == CEPH_INO_ROOT)
root = in;
else if (in->ino() == MDS_INO_MDSDIR(mds->get_nodeid()))
myin = in;
if (in->is_base())
base_inodes.insert(in);
}
-
- if (cache_toofull()) {
- exceeded_size_limit = true;
- }
}
void MDCache::remove_inode(CInode *o)
CInode *MDCache::create_root_inode()
{
- CInode *in = create_system_inode(MDS_INO_ROOT, S_IFDIR|0755);
+ CInode *in = create_system_inode(CEPH_INO_ROOT, S_IFDIR|0755);
auto _inode = in->_get_inode();
_inode->uid = g_conf()->mds_root_ino_uid;
_inode->gid = g_conf()->mds_root_ino_gid;
rootdir->commit(0, gather->new_sub());
root->store(gather->new_sub());
+ root->mark_dirty_parent(mds->mdlog->get_current_segment(), true);
+ root->store_backtrace(gather->new_sub());
}
void MDCache::create_mydir_hierarchy(MDSGather *gather)
{
if (mds->get_nodeid() == mds->mdsmap->get_root()) {
CInode *in;
- in = create_system_inode(MDS_INO_ROOT, S_IFDIR|0755); // initially inaccurate!
+ in = create_system_inode(CEPH_INO_ROOT, S_IFDIR|0755); // initially inaccurate!
in->fetch(c);
} else {
- discover_base_ino(MDS_INO_ROOT, c, mds->mdsmap->get_root());
+ discover_base_ino(CEPH_INO_ROOT, c, mds->mdsmap->get_root());
}
}
show_subtrees();
CDir *root;
- if (dir->ino() == MDS_INO_ROOT) {
+ if (dir->ino() == CEPH_INO_ROOT) {
root = dir; // bootstrap hack.
if (subtrees.count(root) == 0) {
subtrees[root];
void MDCache::start_files_to_recover()
{
+ int count = 0;
for (CInode *in : rejoin_check_q) {
if (in->filelock.get_state() == LOCK_XLOCKSNAP)
mds->locker->issue_caps(in);
mds->locker->check_inode_max_size(in);
+ if (!(++count % 1000))
+ mds->heartbeat_reset();
}
rejoin_check_q.clear();
for (CInode *in : rejoin_recover_q) {
mds->locker->file_recover(&in->filelock);
+ if (!(++count % 1000))
+ mds->heartbeat_reset();
}
if (!rejoin_recover_q.empty()) {
rejoin_recover_q.clear();
unexpirables.clear();
// trim dentries from the LRU until count is reached
- // if mds is in standbyreplay and will trim all inodes which aren't in segments
+ // if mds is in standby_replay and skip trimming the inodes
while (!throttled && (cache_toofull() || count > 0 || is_standby_replay)) {
throttled |= trim_counter_start+trimmed >= trim_threshold;
if (throttled) break;
if (!dn) {
break;
}
- if ((is_standby_replay && dn->get_linkage()->inode &&
- dn->get_linkage()->inode->item_open_file.is_on_list())) {
+ if (is_standby_replay && dn->get_linkage()->inode) {
// we move the inodes that need to be trimmed to the end of the lru queue.
// refer to MDCache::standby_trim_segment
lru.lru_insert_bot(dn);
}
}
-
void MDCache::check_memory_usage()
{
static MemoryModel mm(g_ceph_context);
mds->update_mlogger();
mds->mlogger->set(l_mdm_rss, last.get_rss());
mds->mlogger->set(l_mdm_heap, last.get_heap());
-
- if (cache_toofull()) {
- mds->server->recall_client_state(nullptr, Server::RecallFlags::TRIM);
- }
-
- // If the cache size had exceeded its limit, but we're back in bounds
- // now, free any unused pool memory so that our memory usage isn't
- // permanently bloated.
- if (exceeded_size_limit && !cache_toofull()) {
- // Only do this once we are back in bounds: otherwise the releases would
- // slow down whatever process caused us to exceed bounds to begin with
- if (ceph_using_tcmalloc()) {
- dout(5) << "check_memory_usage: releasing unused space from tcmalloc"
- << dendl;
- ceph_heap_release_free_memory();
- }
- exceeded_size_limit = false;
- }
}
if (mdr)
mdr->snapid = snapid;
- client_t client = (mdr && mdr->reqid.name.is_client()) ? mdr->reqid.name.num() : -1;
+ client_t client = mdr ? mdr->get_client() : -1;
if (mds->logger) mds->logger->inc(l_mds_traverse);
dout(10) << "open_remote_dentry " << *dn << dendl;
CDentry::linkage_t *dnl = projected ? dn->get_projected_linkage() : dn->get_linkage();
inodeno_t ino = dnl->get_remote_ino();
- int64_t pool = dnl->get_remote_d_type() == DT_DIR ? mds->mdsmap->get_metadata_pool() : -1;
+ int64_t pool = dnl->get_remote_d_type() == DT_DIR ? mds->get_metadata_pool() : -1;
open_ino(ino, pool,
new C_MDC_OpenRemoteDentry(this, dn, ino, fin, want_xlocked), true, want_xlocked); // backtrace
}
return;
}
} else if (err == -CEPHFS_ENOENT) {
- int64_t meta_pool = mds->mdsmap->get_metadata_pool();
+ int64_t meta_pool = mds->get_metadata_pool();
if (info.pool != meta_pool) {
dout(10) << " no object in pool " << info.pool
<< ", retrying pool " << meta_pool << dendl;
} else {
ceph_assert(!info.ancestors.empty());
info.checking = mds->get_nodeid();
- open_ino(info.ancestors[0].dirino, mds->mdsmap->get_metadata_pool(),
+ open_ino(info.ancestors[0].dirino, mds->get_metadata_pool(),
new C_MDC_OpenInoParentOpened(this, ino), info.want_replica);
}
}
void MDCache::create_global_snaprealm()
{
CInode *in = new CInode(this); // dummy inode
- create_unlinked_system_inode(in, MDS_INO_GLOBAL_SNAPREALM, S_IFDIR|0755);
+ create_unlinked_system_inode(in, CEPH_INO_GLOBAL_SNAPREALM, S_IFDIR|0755);
add_inode(in);
global_snaprealm = in->snaprealm;
}
in->_decode_base(p);
in->_decode_locks_state_for_replica(p, true);
add_inode(in);
- if (in->ino() == MDS_INO_ROOT)
+ if (in->ino() == CEPH_INO_ROOT)
in->inode_auth.first = 0;
else if (in->is_mdsdir())
in->inode_auth.first = in->ino() - MDS_INO_MDSDIR_OFFSET;
dout(7) << "can_fragment: i won't merge|split anything in stray" << dendl;
return false;
}
- if (diri->is_mdsdir() || diri->ino() == MDS_INO_CEPH) {
+ if (diri->is_mdsdir() || diri->ino() == CEPH_INO_CEPH) {
dout(7) << "can_fragment: i won't fragment mdsdir or .ceph" << dendl;
return false;
}
mds->finisher));
SnapContext nullsnapc;
- object_locator_t oloc(mds->mdsmap->get_metadata_pool());
+ object_locator_t oloc(mds->get_metadata_pool());
for (const auto& fg : uf.old_frags) {
object_t oid = CInode::get_object_name(basedirfrag.ino, fg, "");
ObjectOperation op;
dout(ceph::dout::need_dynamic(dbl)) << indent << "|_" << pad << s
<< " " << auth << *dir << dendl;
- if (dir->ino() == MDS_INO_ROOT)
+ if (dir->ino() == CEPH_INO_ROOT)
ceph_assert(dir->inode == root);
if (dir->ino() == MDS_INO_MDSDIR(mds->get_nodeid()))
ceph_assert(dir->inode == myin);
export_ephemeral_dist_frag_bits = n;
}
}
+
+void MDCache::upkeep_main(void)
+{
+ std::unique_lock lock(upkeep_mutex);
+ while (!upkeep_trim_shutdown.load()) {
+ auto now = clock::now();
+ auto since = now-upkeep_last_trim;
+ auto trim_interval = clock::duration(g_conf().get_val<std::chrono::seconds>("mds_cache_trim_interval"));
+ if (since >= trim_interval*.90) {
+ lock.unlock(); /* mds_lock -> upkeep_mutex */
+ std::scoped_lock mds_lock(mds->mds_lock);
+ lock.lock();
+ if (upkeep_trim_shutdown.load())
+ return;
+ check_memory_usage();
+ if (mds->is_cache_trimmable()) {
+ dout(20) << "upkeep thread trimming cache; last trim " << since << " ago" << dendl;
+ bool active_with_clients = mds->is_active() || mds->is_clientreplay() || mds->is_stopping();
+ if (active_with_clients) {
+ trim_client_leases();
+ }
+ trim();
+ if (active_with_clients) {
+ auto recall_flags = Server::RecallFlags::ENFORCE_MAX|Server::RecallFlags::ENFORCE_LIVENESS;
+ if (cache_toofull()) {
+ recall_flags = recall_flags|Server::RecallFlags::TRIM;
+ }
+ mds->server->recall_client_state(nullptr, recall_flags);
+ }
+ upkeep_last_trim = now = clock::now();
+ } else {
+ dout(10) << "cache not ready for trimming" << dendl;
+ }
+ } else {
+ trim_interval -= since;
+ }
+ since = now-upkeep_last_release;
+ auto release_interval = clock::duration(g_conf().get_val<std::chrono::seconds>("mds_cache_release_free_interval"));
+ if (since >= release_interval*.90) {
+ /* XXX not necessary once MDCache uses PriorityCache */
+ dout(10) << "releasing free memory" << dendl;
+ ceph_heap_release_free_memory();
+ upkeep_last_release = clock::now();
+ } else {
+ release_interval -= since;
+ }
+ auto interval = std::min(release_interval, trim_interval);
+ dout(20) << "upkeep thread waiting interval " << interval << dendl;
+ upkeep_cvar.wait_for(lock, interval);
+ }
+}
std::unique_ptr<PerfCounters> logger;
Filer filer;
- bool exceeded_size_limit = false;
std::array<xlist<ClientLease*>, client_lease_pools> client_leases{};
/* subtree keys and each tree's non-recursive nested subtrees (the "bounds") */
void finish_uncommitted_fragment(dirfrag_t basedirfrag, int op);
void rollback_uncommitted_fragment(dirfrag_t basedirfrag, frag_vec_t&& old_frags);
+ void upkeep_main(void);
+
uint64_t cache_memory_limit;
double cache_reservation;
double cache_health_threshold;
// Instantiate Journaler and start async write to RADOS
ceph_assert(journaler == NULL);
- journaler = new Journaler("mdlog", ino, mds->mdsmap->get_metadata_pool(),
+ journaler = new Journaler("mdlog", ino, mds->get_metadata_pool(),
CEPH_FS_ONDISK_MAGIC, mds->objecter, logger,
l_mdl_jlat, mds->finisher);
ceph_assert(journaler->is_readonly());
journaler->write_head(gather.new_sub());
// Async write JournalPointer to RADOS
- JournalPointer jp(mds->get_nodeid(), mds->mdsmap->get_metadata_pool());
+ JournalPointer jp(mds->get_nodeid(), mds->get_metadata_pool());
jp.front = ino;
jp.back = 0;
jp.save(mds->objecter, gather.new_sub());
// Oh dear, something unreadable in the store for this rank: require
// operator intervention.
- mds->damaged();
+ mds->damaged_unlocked();
ceph_abort(); // damaged should not return
}
// First, read the pointer object.
// If the pointer object is not present, then create it with
// front = default ino and back = null
- JournalPointer jp(mds->get_nodeid(), mds->mdsmap->get_metadata_pool());
+ JournalPointer jp(mds->get_nodeid(), mds->get_metadata_pool());
const int read_result = jp.load(mds->objecter);
if (read_result == -CEPHFS_ENOENT) {
inodeno_t const default_log_ino = MDS_INO_LOG_OFFSET + mds->get_nodeid();
}
dout(1) << "Erasing journal " << jp.back << dendl;
C_SaferCond erase_waiter;
- Journaler back("mdlog", jp.back, mds->mdsmap->get_metadata_pool(),
+ Journaler back("mdlog", jp.back, mds->get_metadata_pool(),
CEPH_FS_ONDISK_MAGIC, mds->objecter, logger, l_mdl_jlat,
mds->finisher);
/* Read the header from the front journal */
Journaler *front_journal = new Journaler("mdlog", jp.front,
- mds->mdsmap->get_metadata_pool(), CEPH_FS_ONDISK_MAGIC, mds->objecter,
+ mds->get_metadata_pool(), CEPH_FS_ONDISK_MAGIC, mds->objecter,
logger, l_mdl_jlat, mds->finisher);
// Assign to ::journaler so that we can be aborted by ::shutdown while
* tolerate replaying old journals until we have to go active. Use front_journal as
* our journaler attribute and complete */
dout(4) << "Recovered journal " << jp.front << " in format " << front_journal->get_stream_format() << dendl;
- journaler->set_write_error_handler(new C_MDL_WriteError(this));
{
std::lock_guard l(mds->mds_lock);
+ journaler->set_write_error_handler(new C_MDL_WriteError(this));
if (mds->is_daemon_stopping()) {
return;
}
/* Create the new Journaler file */
Journaler *new_journal = new Journaler("mdlog", jp.back,
- mds->mdsmap->get_metadata_pool(), CEPH_FS_ONDISK_MAGIC, mds->objecter, logger, l_mdl_jlat, mds->finisher);
+ mds->get_metadata_pool(), CEPH_FS_ONDISK_MAGIC, mds->objecter, logger, l_mdl_jlat, mds->finisher);
dout(4) << "Writing new journal header " << jp.back << dendl;
file_layout_t new_layout = old_journal->get_layout();
new_journal->set_writeable();
ceph_assert(journaler == old_journal);
journaler = NULL;
delete old_journal;
- }
- /* Update the pointer to reflect we're back in clean single journal state. */
- jp.back = 0;
- write_result = jp.save(mds->objecter);
- ceph_assert(write_result == 0);
+ /* Update the pointer to reflect we're back in clean single journal state. */
+ jp.back = 0;
+ write_result = jp.save(mds->objecter);
+ ceph_assert(write_result == 0);
- /* Reset the Journaler object to its default state */
- dout(1) << "Journal rewrite complete, continuing with normal startup" << dendl;
- {
- std::lock_guard l(mds->mds_lock);
+ /* Reset the Journaler object to its default state */
+ dout(1) << "Journal rewrite complete, continuing with normal startup" << dendl;
if (mds->is_daemon_stopping()) {
delete new_journal;
return;
journaler = new_journal;
journaler->set_readonly();
journaler->set_write_error_handler(new C_MDL_WriteError(this));
- }
- /* Trigger completion */
- {
- std::lock_guard l(mds->mds_lock);
+ /* Trigger completion */
if (mds->is_daemon_stopping()) {
return;
}
(fs_name)[_val = phoenix::construct<MDSCapMatch>(std::string(),
_1)]);
- // capspec = * | r[w][p][s]
+ // capspec = * | r[w][f][p][s]
capspec = spaces >> (
lit("*")[_val = MDSCapSpec(MDSCapSpec::ALL)]
|
lit("all")[_val = MDSCapSpec(MDSCapSpec::ALL)]
|
+ (lit("rwfps"))[_val = MDSCapSpec(MDSCapSpec::RWFPS)]
+ |
(lit("rwps"))[_val = MDSCapSpec(MDSCapSpec::RWPS)]
|
+ (lit("rwfp"))[_val = MDSCapSpec(MDSCapSpec::RWFP)]
+ |
+ (lit("rwfs"))[_val = MDSCapSpec(MDSCapSpec::RWFS)]
+ |
(lit("rwp"))[_val = MDSCapSpec(MDSCapSpec::RWP)]
|
(lit("rws"))[_val = MDSCapSpec(MDSCapSpec::RWS)]
|
+ (lit("rwf"))[_val = MDSCapSpec(MDSCapSpec::RWF)]
+ |
(lit("rw"))[_val = MDSCapSpec(MDSCapSpec::RW)]
|
(lit("r"))[_val = MDSCapSpec(MDSCapSpec::READ)]
}
}
+ if (mask & MAY_FULL) {
+ if (!grant.spec.allow_full()) {
+ continue;
+ }
+ }
+
// check unix permissions?
if (grant.match.uid == MDSCapMatch::MDS_AUTH_UID_ANY) {
return true;
if (spec.allow_write()) {
out << "w";
}
+ if (spec.allow_full()) {
+ out << "f";
+ }
if (spec.allow_set_vxattr()) {
out << "p";
}
MAY_CHGRP = (1 << 5),
MAY_SET_VXATTR = (1 << 6),
MAY_SNAPSHOT = (1 << 7),
+ MAY_FULL = (1 << 8),
};
// what we can do
static const unsigned SET_VXATTR = (1 << 3);
// if the capability permits mksnap/rmsnap
static const unsigned SNAPSHOT = (1 << 4);
+ // if the capability permits to bypass osd full check
+ static const unsigned FULL = (1 << 5);
static const unsigned RW = (READ|WRITE);
+ static const unsigned RWF = (READ|WRITE|FULL);
static const unsigned RWP = (READ|WRITE|SET_VXATTR);
static const unsigned RWS = (READ|WRITE|SNAPSHOT);
+ static const unsigned RWFP = (READ|WRITE|FULL|SET_VXATTR);
+ static const unsigned RWFS = (READ|WRITE|FULL|SNAPSHOT);
static const unsigned RWPS = (READ|WRITE|SET_VXATTR|SNAPSHOT);
+ static const unsigned RWFPS = (READ|WRITE|FULL|SET_VXATTR|SNAPSHOT);
MDSCapSpec() = default;
MDSCapSpec(unsigned _caps) : caps(_caps) {
if (caps & ALL)
- caps |= RWPS;
+ caps |= RWFPS;
}
bool allow_all() const {
bool allow_set_vxattr() const {
return (caps & SET_VXATTR);
}
+ bool allow_full() const {
+ return (caps & FULL);
+ }
private:
unsigned caps = 0;
};
return;
}
- if (r == -CEPHFS_EBLOCKLISTED) {
- derr << "MDSIOContextBase: blocklisted! Restarting..." << dendl;
+ // It's possible that the osd op requests will be stuck and then times out
+ // after "rados_osd_op_timeout", the mds won't know what we should it, just
+ // respawn it.
+ if (r == -CEPHFS_EBLOCKLISTED || r == -CEPHFS_ETIMEDOUT) {
+ derr << "MDSIOContextBase: failed with " << r << ", restarting..." << dendl;
mds->respawn();
} else {
MDSContext::complete(r);
heapcmd_vec.push_back(value);
}
ceph_heap_profiler_handle_command(heapcmd_vec, ss);
+ r = 0;
}
} else if (command == "cpu_profiler") {
string arg;
{
hb = g_ceph_context->get_heartbeat_map()->add_worker("MDSRank", pthread_self());
+ // The metadata pool won't change in the whole life time
+ // of the fs, with this we can get rid of the mds_lock
+ // in many places too.
+ metadata_pool = mdsmap->get_metadata_pool();
+
purge_queue.update_op_limit(*mdsmap);
objecter->unset_honor_pool_full();
}
// ...
- if (is_cache_trimmable()) {
+ if (is_clientreplay() || is_active() || is_stopping()) {
server->find_idle_sessions();
server->evict_cap_revoke_non_responders();
locker->tick();
}
};
-int64_t MDSRank::get_metadata_pool()
-{
- return mdsmap->get_metadata_pool();
-}
-
MDSTableClient *MDSRank::get_table_client(int t)
{
switch (t) {
mds_rank_t get_nodeid() const { return whoami; }
std::string_view get_fs_name() const { return fs_name; }
- int64_t get_metadata_pool();
+ int64_t get_metadata_pool() const
+ {
+ return metadata_pool;
+ }
mono_time get_starttime() const {
return starttime;
bool allows_multimds_snaps() const { return mdsmap->allows_multimds_snaps(); }
bool is_cache_trimmable() const {
- return is_clientreplay() || is_active() || is_stopping();
+ return is_standby_replay() || is_clientreplay() || is_active() || is_stopping();
}
void handle_write_error(int err);
private:
bool send_status = true;
+ // The metadata pool won't change in the whole life time of the fs,
+ // with this we can get rid of the mds_lock in many places too.
+ int64_t metadata_pool = -1;
+
// "task" string that gets displayed in ceph status
inline static const std::string SCRUB_STATUS_KEY = "scrub status";
// write (async)
SnapContext snapc;
object_t oid = get_object_name();
- object_locator_t oloc(mds->mdsmap->get_metadata_pool());
+ object_locator_t oloc(mds->get_metadata_pool());
mds->objecter->write_full(oid, oloc,
snapc,
bl, ceph::real_clock::now(), 0,
C_IO_MT_Load *c = new C_IO_MT_Load(this, onfinish);
object_t oid = get_object_name();
- object_locator_t oloc(mds->mdsmap->get_metadata_pool());
+ object_locator_t oloc(mds->get_metadata_pool());
mds->objecter->read_full(oid, oloc, CEPH_NOSNAP, &c->bl, 0,
new C_OnFinisher(c, mds->finisher));
}
bool is_ambiguous_auth = false;
bool is_remote_frozen_authpin = false;
bool is_inode_exporter = false;
+ bool rdonly_checks = false;
std::map<client_t, std::pair<Session*, uint64_t> > imported_session_map;
std::map<CInode*, std::map<client_t,Capability::Export> > cap_imports;
new C_OnFinisher(new C_IO_OFT_Save(this, log_seq, c),
mds->finisher));
SnapContext snapc;
- object_locator_t oloc(mds->mdsmap->get_metadata_pool());
+ object_locator_t oloc(mds->get_metadata_pool());
for (auto& [idx, vops] : ops_map) {
object_t oid = get_object_name(idx);
for (auto& op : vops) {
C_GatherBuilder gather(g_ceph_context);
SnapContext snapc;
- object_locator_t oloc(mds->mdsmap->get_metadata_pool());
+ object_locator_t oloc(mds->get_metadata_pool());
const unsigned max_write_size = mds->mdcache->max_dir_commit_size;
{
object_t oid = get_object_name(idx);
dout(10) << __func__ << ": load from '" << oid << ":" << key << "'" << dendl;
- object_locator_t oloc(mds->mdsmap->get_metadata_pool());
+ object_locator_t oloc(mds->get_metadata_pool());
C_IO_OFT_Load *c = new C_IO_OFT_Load(this, idx, first);
ObjectOperation op;
if (first)
C_GatherBuilder gather(g_ceph_context,
new C_OnFinisher(new C_IO_OFT_Recover(this),
mds->finisher));
- object_locator_t oloc(mds->mdsmap->get_metadata_pool());
+ object_locator_t oloc(mds->get_metadata_pool());
SnapContext snapc;
for (unsigned omap_idx = 0; omap_idx < loaded_journals.size(); omap_idx++) {
int64_t pool;
if (prefetch_state == DIR_INODES)
- pool = mds->mdsmap->get_metadata_pool();
+ pool = mds->get_metadata_pool();
else if (prefetch_state == FILE_INODES)
pool = mds->mdsmap->get_first_data_pool();
else
* using osdmap_full_flag(), because we want to know "is the flag set"
* rather than "does the flag apply to us?" */
mds->objecter->with_osdmap([this](const OSDMap& o) {
- auto pi = o.get_pg_pool(mds->mdsmap->get_metadata_pool());
+ auto pi = o.get_pg_pool(mds->get_metadata_pool());
is_full = pi && pi->has_flag(pg_pool_t::FLAG_FULL);
dout(7) << __func__ << ": full = " << is_full << " epoch = "
<< o.get_epoch() << dendl;
}
if (is_full) {
+ CInode *cur = try_get_auth_inode(mdr, req->get_filepath().get_ino());
+ if (!cur) {
+ respond_to_request(mdr, -EINVAL);
+ return;
+ }
if (req->get_op() == CEPH_MDS_OP_SETLAYOUT ||
req->get_op() == CEPH_MDS_OP_SETDIRLAYOUT ||
req->get_op() == CEPH_MDS_OP_SETLAYOUT ||
(!mdr->has_more() || mdr->more()->witnessed.empty())) // haven't started peer request
) {
- dout(20) << __func__ << ": full, responding CEPHFS_ENOSPC to op " << ceph_mds_op_name(req->get_op()) << dendl;
- respond_to_request(mdr, -CEPHFS_ENOSPC);
- return;
+ if (check_access(mdr, cur, MAY_FULL)) {
+ dout(20) << __func__ << ": full, has FULL caps, permitting op " << ceph_mds_op_name(req->get_op()) << dendl;
+ } else {
+ dout(20) << __func__ << ": full, responding CEPHFS_ENOSPC to op " << ceph_mds_op_name(req->get_op()) << dendl;
+ respond_to_request(mdr, -CEPHFS_ENOSPC);
+ return;
+ }
} else {
dout(20) << __func__ << ": full, permitting op " << ceph_mds_op_name(req->get_op()) << dendl;
}
return _lookup_snap_ino(mdr);
inodeno_t ino = req->get_filepath().get_ino();
+ auto _ino = ino.val;
+
+ /* It's been observed [1] that a client may lookup a private ~mdsdir inode.
+ * I do not have an explanation for how that happened organically but this
+ * check will ensure that the client can no longer do that.
+ *
+ * [1] https://tracker.ceph.com/issues/49922
+ */
+ if (MDS_IS_PRIVATE_INO(_ino)) {
+ respond_to_request(mdr, -CEPHFS_ESTALE);
+ return;
+ }
+
CInode *in = mdcache->get_inode(ino);
if (in && in->state_test(CInode::STATE_PURGING)) {
respond_to_request(mdr, -CEPHFS_ESTALE);
if (parent_ino) {
diri = mdcache->get_inode(parent_ino);
if (!diri) {
- mdcache->open_ino(parent_ino, mds->mdsmap->get_metadata_pool(), new C_MDS_LookupIno2(this, mdr));
+ mdcache->open_ino(parent_ino, mds->get_metadata_pool(), new C_MDS_LookupIno2(this, mdr));
return;
}
respond_to_request(mdr, -CEPHFS_ESTALE);
} else {
- mdcache->open_ino(vino.ino, mds->mdsmap->get_metadata_pool(), new C_MDS_LookupIno2(this, mdr), false);
+ mdcache->open_ino(vino.ino, mds->get_metadata_pool(), new C_MDS_LookupIno2(this, mdr), false);
}
}
return;
}
- if (!xlock_policylock(mdr, cur, false, true))
- return;
+ /* Verify it's not already a subvolume with lighter weight
+ * rdlock.
+ */
+ if (!mdr->more()->rdonly_checks) {
+ if (!(mdr->locking_state & MutationImpl::ALL_LOCKED)) {
+ MutationImpl::LockOpVec lov;
+ lov.add_rdlock(&cur->snaplock);
+ if (!mds->locker->acquire_locks(mdr, lov))
+ return;
+ mdr->locking_state |= MutationImpl::ALL_LOCKED;
+ }
+ SnapRealm *realm = cur->find_snaprealm();
+ const auto srnode = cur->get_projected_srnode();
+ if (val == (srnode && srnode->is_subvolume())) {
+ dout(20) << "already marked subvolume" << dendl;
+ respond_to_request(mdr, 0);
+ return;
+ }
+ mdr->more()->rdonly_checks = true;
+ }
+
+ if ((mdr->locking_state & MutationImpl::ALL_LOCKED) && !mdr->is_xlocked(&cur->snaplock)) {
+ /* drop the rdlock and acquire xlocks */
+ dout(20) << "dropping rdlocks" << dendl;
+ mds->locker->drop_locks(mdr.get());
+ if (!xlock_policylock(mdr, cur, false, true))
+ return;
+ }
+ /* repeat rdonly checks in case changed between rdlock -> xlock */
SnapRealm *realm = cur->find_snaprealm();
if (val) {
inodeno_t subvol_ino = realm->get_subvolume_ino();
return true;
}
- return xattr_name == "ceph.mirror.info";
+ return xattr_name == "ceph.mirror.info" ||
+ xattr_name == "ceph.mirror.dirty_snap_id";
}
void reply_client_request(MDRequestRef& mdr, const ref_t<MClientReply> &reply);
dout(10) << __func__ << ": continue omap load from '"
<< last_key << "'" << dendl;
object_t oid = get_object_name();
- object_locator_t oloc(mds->mdsmap->get_metadata_pool());
+ object_locator_t oloc(mds->get_metadata_pool());
C_IO_SM_Load *c = new C_IO_SM_Load(this, false);
ObjectOperation op;
op.omap_get_vals(last_key, "", g_conf()->mds_sessionmap_keys_per_op,
C_IO_SM_Load *c = new C_IO_SM_Load(this, true);
object_t oid = get_object_name();
- object_locator_t oloc(mds->mdsmap->get_metadata_pool());
+ object_locator_t oloc(mds->get_metadata_pool());
ObjectOperation op;
op.omap_get_header(&c->header_bl, &c->header_r);
C_IO_SM_LoadLegacy *c = new C_IO_SM_LoadLegacy(this);
object_t oid = get_object_name();
- object_locator_t oloc(mds->mdsmap->get_metadata_pool());
+ object_locator_t oloc(mds->get_metadata_pool());
mds->objecter->read_full(oid, oloc, CEPH_NOSNAP, &c->bl, 0,
new C_OnFinisher(c, mds->finisher));
committing = version;
SnapContext snapc;
object_t oid = get_object_name();
- object_locator_t oloc(mds->mdsmap->get_metadata_pool());
+ object_locator_t oloc(mds->get_metadata_pool());
ObjectOperation op;
}
f->dump_float("uptime", get_session_uptime());
f->dump_unsigned("requests_in_flight", get_request_count());
- f->dump_unsigned("completed_requests", get_num_completed_requests());
+ f->dump_unsigned("num_completed_requests", get_num_completed_requests());
+ f->dump_unsigned("num_completed_flushes", get_num_completed_flushes());
f->dump_bool("reconnecting", reconnecting);
f->dump_object("recall_caps", recall_caps);
f->dump_object("release_caps", release_caps);
SnapContext snapc;
object_t oid = get_object_name();
- object_locator_t oloc(mds->mdsmap->get_metadata_pool());
+ object_locator_t oloc(mds->get_metadata_pool());
MDSContext *on_safe = gather_bld->new_sub();
mds->objecter->mutate(oid, oloc, op, snapc,
ceph::real_clock::now(), 0,
SnapRealm::SnapRealm(MDCache *c, CInode *in) :
mdcache(c), inode(in), inodes_with_caps(member_offset(CInode, item_caps))
{
- global = (inode->ino() == MDS_INO_GLOBAL_SNAPREALM);
+ global = (inode->ino() == CEPH_INO_GLOBAL_SNAPREALM);
}
/*
#include "include/interval_set.h"
#include "include/compact_set.h"
#include "include/fs_types.h"
+#include "include/ceph_fs.h"
#include "inode_backtrace.h"
#define MAX_MDS 0x100
#define NUM_STRAY 10
-#define MDS_INO_ROOT 1
-
-// No longer created but recognised in existing filesystems
-// so that we don't try to fragment it.
-#define MDS_INO_CEPH 2
-
-#define MDS_INO_GLOBAL_SNAPREALM 3
+// Inode numbers 1,2 and 4 please see CEPH_INO_* in include/ceph_fs.h
#define MDS_INO_MDSDIR_OFFSET (1*MAX_MDS)
#define MDS_INO_STRAY_OFFSET (6*MAX_MDS)
#define MDS_INO_IS_STRAY(i) ((i) >= MDS_INO_STRAY_OFFSET && (i) < (MDS_INO_STRAY_OFFSET+(MAX_MDS*NUM_STRAY)))
#define MDS_INO_IS_MDSDIR(i) ((i) >= MDS_INO_MDSDIR_OFFSET && (i) < (MDS_INO_MDSDIR_OFFSET+MAX_MDS))
#define MDS_INO_MDSDIR_OWNER(i) (signed ((unsigned (i)) - MDS_INO_MDSDIR_OFFSET))
-#define MDS_INO_IS_BASE(i) ((i) == MDS_INO_ROOT || (i) == MDS_INO_GLOBAL_SNAPREALM || MDS_INO_IS_MDSDIR(i))
+#define MDS_INO_IS_BASE(i) ((i) == CEPH_INO_ROOT || (i) == CEPH_INO_GLOBAL_SNAPREALM || MDS_INO_IS_MDSDIR(i))
#define MDS_INO_STRAY_OWNER(i) (signed (((unsigned (i)) - MDS_INO_STRAY_OFFSET) / NUM_STRAY))
#define MDS_INO_STRAY_INDEX(i) (((unsigned (i)) - MDS_INO_STRAY_OFFSET) % NUM_STRAY)
+#define MDS_IS_PRIVATE_INO(i) ((i) < MDS_INO_SYSTEM_BASE && (i) >= MDS_INO_MDSDIR_OFFSET)
+
typedef int32_t mds_rank_t;
constexpr mds_rank_t MDS_RANK_NONE = -1;
constexpr mds_rank_t MDS_RANK_EPHEMERAL_DIST = -2;
class MMonJoin final : public PaxosServiceMessage {
public:
- static constexpr int HEAD_VERSION = 2;
+ static constexpr int HEAD_VERSION = 3;
static constexpr int COMPAT_VERSION = 2;
uuid_d fsid;
std::string name;
entity_addrvec_t addrs;
+ /* The location members are for stretch mode. crush_loc is the location
+ * (generally just a "datacenter=<foo>" statement) of the monitor. The
+ * force_loc is whether the mon cluster should replace a previously-known
+ * location. Generally the monitor will force an update if it's given a
+ * location from the CLI on boot-up, and then never force again (so that it
+ * can be moved/updated via the ceph tool from elsewhere). */
+ map<string,string> crush_loc;
+ bool force_loc{false};
MMonJoin() : PaxosServiceMessage{MSG_MON_JOIN, 0, HEAD_VERSION, COMPAT_VERSION} {}
MMonJoin(uuid_d &f, std::string n, const entity_addrvec_t& av)
: PaxosServiceMessage{MSG_MON_JOIN, 0, HEAD_VERSION, COMPAT_VERSION},
fsid(f), name(n), addrs(av)
{ }
+ MMonJoin(uuid_d &f, std::string n, const entity_addrvec_t& av, const map<string,string>& cloc, bool force)
+ : PaxosServiceMessage{MSG_MON_JOIN, 0, HEAD_VERSION, COMPAT_VERSION},
+ fsid(f), name(n), addrs(av), crush_loc(cloc), force_loc(force)
+ { }
private:
~MMonJoin() final {}
public:
std::string_view get_type_name() const override { return "mon_join"; }
void print(std::ostream& o) const override {
- o << "mon_join(" << name << " " << addrs << ")";
+ o << "mon_join(" << name << " " << addrs << " " << crush_loc << ")";
}
void encode_payload(uint64_t features) override {
header.version = HEAD_VERSION;
header.compat_version = COMPAT_VERSION;
encode(addrs, payload, features);
+ encode(crush_loc, payload);
+ encode(force_loc, payload);
} else {
header.version = 1;
header.compat_version = 1;
addrs = entity_addrvec_t(addr);
} else {
decode(addrs, p);
+ if (header.version >= 3) {
+ decode(crush_loc, p);
+ decode(force_loc, p);
+ }
}
}
};
class MMonProbe final : public Message {
public:
- static constexpr int HEAD_VERSION = 7;
+ static constexpr int HEAD_VERSION = 8;
static constexpr int COMPAT_VERSION = 5;
enum {
int32_t op = 0;
std::string name;
std::set<int32_t> quorum;
+ int leader = -1;
ceph::buffer::list monmap_bl;
version_t paxos_first_version = 0;
version_t paxos_last_version = 0;
out << "mon_probe(" << get_opname(op) << " " << fsid << " name " << name;
if (quorum.size())
out << " quorum " << quorum;
+ out << " leader " << leader;
if (op == OP_REPLY) {
out << " paxos("
<< " fc " << paxos_first_version
encode(paxos_last_version, payload);
encode(required_features, payload);
encode(mon_release, payload);
+ encode(leader, payload);
}
void decode_payload() override {
using ceph::decode;
decode(mon_release, p);
else
mon_release = ceph_release_t::unknown;
+ if (header.version >= 8) {
+ decode(leader, p);
+ } else if (quorum.size()) {
+ leader = *quorum.begin();
+ }
}
private:
template<class T, typename... Args>
ActivePyModules::~ActivePyModules() = default;
-namespace {
- // because the Python runtime could relinquish the GIL when performing GC
- // and re-acquire it afterwards, we should enforce following locking policy:
- // 1. do not acquire locks when holding the GIL, use a without_gil or
- // without_gil_t to guard the code which acquires non-gil locks.
- // 2. always hold a GIL when calling python functions, for example, when
- // constructing a PyFormatter instance.
- //
- // a wrapper that provides a convenient RAII-style mechinary for acquiring
- // and releasing GIL, like the macros of Py_BEGIN_ALLOW_THREADS and
- // Py_END_ALLOW_THREADS.
- struct without_gil_t {
- without_gil_t()
- {
- assert(PyGILState_Check());
- release_gil();
- }
- ~without_gil_t()
- {
- if (save) {
- acquire_gil();
- }
- }
- private:
- void release_gil() {
- save = PyEval_SaveThread();
- }
- void acquire_gil() {
- assert(save);
- PyEval_RestoreThread(save);
- save = nullptr;
- }
- PyThreadState *save = nullptr;
- friend struct with_gil_t;
- };
- struct with_gil_t {
- with_gil_t(without_gil_t& allow_threads)
- : allow_threads{allow_threads}
- {
- allow_threads.acquire_gil();
- }
- ~with_gil_t() {
- allow_threads.release_gil();
- }
- private:
- without_gil_t& allow_threads;
- };
- // invoke func with GIL acquired
- template<typename Func>
- auto with_gil(without_gil_t& no_gil, Func&& func)
- {
- with_gil_t gil{no_gil};
- return std::invoke(std::forward<Func>(func));
- }
- template<typename Func>
- auto without_gil(Func&& func) {
- without_gil_t no_gil;
- return std::invoke(std::forward<Func>(func));
- }
-}
-
void ActivePyModules::dump_server(const std::string &hostname,
const DaemonStateCollection &dmc,
Formatter *f)
mgr_map.dump(&f);
return f.get();
});
+ } else if (what == "mgr_ips") {
+ entity_addrvec_t myaddrs = server.get_myaddrs();
+ with_gil_t with_gil{no_gil};
+ f.open_array_section("ips");
+ std::set<std::string> did;
+ for (auto& i : myaddrs.v) {
+ std::string ip = i.ip_only_to_str();
+ if (auto [where, inserted] = did.insert(ip); inserted) {
+ f.dump_string("ip", ip);
+ }
+ }
+ f.close_section();
+ return f.get();
} else if (what == "have_local_config_map") {
with_gil_t with_gil{no_gil};
f.dump_bool("have_local_config_map", have_local_config_map);
return PyUnicode_FromString(pretty_version_to_str().c_str());
}
+static PyObject *
+ceph_get_ceph_conf_path(BaseMgrModule *self, PyObject *args)
+{
+ return PyUnicode_FromString(g_conf().get_conf_path().c_str());
+}
+
static PyObject *
ceph_get_release_name(BaseMgrModule *self, PyObject *args)
{
{"_ceph_get_mgr_id", (PyCFunction)ceph_get_mgr_id, METH_NOARGS,
"Get the name of the Mgr daemon where we are running"},
+ {"_ceph_get_ceph_conf_path", (PyCFunction)ceph_get_ceph_conf_path, METH_NOARGS,
+ "Get path to ceph.conf"},
+
{"_ceph_get_option", (PyCFunction)ceph_option_get, METH_VARARGS,
"Get a native configuration option value"},
#include "BaseMgrStandbyModule.h"
#include "StandbyPyModules.h"
+#include "PyFormatter.h"
#define dout_context g_ceph_context
Py_RETURN_NONE;
}
+static PyObject*
+ceph_standby_state_get(BaseMgrStandbyModule *self, PyObject *args)
+{
+ char *whatc = NULL;
+ if (!PyArg_ParseTuple(args, "s:ceph_state_get", &whatc)) {
+ return NULL;
+ }
+ std::string what(whatc);
+
+ PyFormatter f;
+
+ // Drop the GIL, as most of the following blocks will block on
+ // a mutex -- they are all responsible for re-taking the GIL before
+ // touching the PyFormatter instance or returning from the function.
+ without_gil_t no_gil;
+
+ if (what == "mgr_ips") {
+ entity_addrvec_t myaddrs = self->this_module->get_myaddrs();
+ with_gil_t with_gil{no_gil};
+ f.open_array_section("ips");
+ std::set<std::string> did;
+ for (auto& i : myaddrs.v) {
+ std::string ip = i.ip_only_to_str();
+ if (auto [where, inserted] = did.insert(ip); inserted) {
+ f.dump_string("ip", ip);
+ }
+ }
+ f.close_section();
+ return f.get();
+ } else {
+ derr << "Python module requested unknown data '" << what << "'" << dendl;
+ with_gil_t with_gil{no_gil};
+ Py_RETURN_NONE;
+ }
+}
+
+
PyMethodDef BaseMgrStandbyModule_methods[] = {
+ {"_ceph_get", (PyCFunction)ceph_standby_state_get, METH_VARARGS,
+ "Get a cluster object (standby)"},
{"_ceph_get_mgr_id", (PyCFunction)ceph_get_mgr_id, METH_NOARGS,
"Get the name of the Mgr daemon where we are running"},
max_misplaced / 2.0);
unsigned estmax = std::max<unsigned>(
(double)p.get_pg_num() * room, 1u);
+ unsigned next_min = 0;
+ if (p.get_pgp_num() > estmax) {
+ next_min = p.get_pgp_num() - estmax;
+ }
next = std::clamp(target,
- p.get_pgp_num() - estmax,
+ next_min,
p.get_pgp_num() + estmax);
dout(20) << " room " << room << " estmax " << estmax
<< " delta " << (target-p.get_pgp_num())
dout(25) << "GIL released for thread state " << pThreadState.ts << dendl;
}
+without_gil_t::without_gil_t()
+{
+ assert(PyGILState_Check());
+ release_gil();
+}
+
+without_gil_t::~without_gil_t()
+{
+ if (save) {
+ acquire_gil();
+ }
+}
+
+void without_gil_t::release_gil()
+{
+ save = PyEval_SaveThread();
+}
+
+void without_gil_t::acquire_gil()
+{
+ assert(save);
+ PyEval_RestoreThread(save);
+ save = nullptr;
+}
+
+with_gil_t::with_gil_t(without_gil_t& allow_threads)
+ : allow_threads{allow_threads}
+{
+ allow_threads.acquire_gil();
+}
+
+with_gil_t::~with_gil_t()
+{
+ allow_threads.release_gil();
+}
#pragma once
+#include <cassert>
+#include <functional>
+
struct _ts;
typedef struct _ts PyThreadState;
PyThreadState *pNewThreadState = nullptr;
};
+// because the Python runtime could relinquish the GIL when performing GC
+// and re-acquire it afterwards, we should enforce following locking policy:
+// 1. do not acquire locks when holding the GIL, use a without_gil or
+// without_gil_t to guard the code which acquires non-gil locks.
+// 2. always hold a GIL when calling python functions, for example, when
+// constructing a PyFormatter instance.
+//
+// a wrapper that provides a convenient RAII-style mechinary for acquiring
+// and releasing GIL, like the macros of Py_BEGIN_ALLOW_THREADS and
+// Py_END_ALLOW_THREADS.
+struct without_gil_t {
+ without_gil_t();
+ ~without_gil_t();
+private:
+ void release_gil();
+ void acquire_gil();
+ PyThreadState *save = nullptr;
+ friend struct with_gil_t;
+};
+
+struct with_gil_t {
+ with_gil_t(without_gil_t& allow_threads);
+ ~with_gil_t();
+private:
+ without_gil_t& allow_threads;
+};
+
+// invoke func with GIL acquired
+template<typename Func>
+auto with_gil(without_gil_t& no_gil, Func&& func) {
+ with_gil_t gil{no_gil};
+ return std::invoke(std::forward<Func>(func));
+}
+
+template<typename Func>
+auto without_gil(Func&& func) {
+ without_gil_t no_gil;
+ return std::invoke(std::forward<Func>(func));
+}
"clog_to_graylog",
"clog_to_graylog_host",
"clog_to_graylog_port",
+ "mgr_standby_modules",
"host",
"fsid",
NULL
changed.count("fsid")) {
_update_log_config();
}
+ if (changed.count("mgr_standby_modules") && !active_mgr) {
+ if (g_conf().get_val<bool>("mgr_standby_modules") != py_module_registry.have_standby_modules()) {
+ dout(1) << "mgr_standby_modules now "
+ << (int)g_conf().get_val<bool>("mgr_standby_modules")
+ << ", standby modules are "
+ << (py_module_registry.have_standby_modules() ? "":"not ")
+ << "active, respawning"
+ << dendl;
+ respawn();
+ }
+ }
}
int MgrStandby::init()
init_async_signal_handler();
register_async_signal_handler(SIGHUP, sighup_handler);
+ cct->_conf.add_observer(this);
+
std::lock_guard l(lock);
// Start finisher
if (map.active_gid != 0 && map.active_name != g_conf()->name.get_id()) {
// I am the standby and someone else is active, start modules
// in standby mode to do redirects if needed
- if (!py_module_registry.is_standby_running()) {
+ if (!py_module_registry.is_standby_running() &&
+ g_conf().get_val<bool>("mgr_standby_modules")) {
py_module_registry.standby_start(monc, finisher);
}
}
*/
bool handle_mgr_map(const MgrMap &mgr_map_);
+ bool have_standby_modules() const {
+ return !!standby_modules;
+ }
+
void init();
void upgrade_config(
return PyFloat_FromDouble(self->crush->get_item_weightf(item));
}
+static PyObject *crush_find_roots(BasePyCRUSH *self)
+{
+ set<int> roots;
+ self->crush->find_roots(&roots);
+ PyFormatter f;
+ f.open_array_section("roots");
+ for (auto root : roots) {
+ f.dump_int("root", root);
+ }
+ f.close_section();
+ return f.get();
+}
+
static PyObject *crush_find_takes(BasePyCRUSH *self, PyObject *obj)
{
set<int> takes;
"Get item name"},
{"_get_item_weight", (PyCFunction)crush_get_item_weight, METH_VARARGS,
"Get item weight"},
+ {"_find_roots", (PyCFunction)crush_find_roots, METH_NOARGS,
+ "Find all tree roots"},
{"_find_takes", (PyCFunction)crush_find_takes, METH_NOARGS,
"Find distinct TAKE roots"},
{"_get_take_weight_osd_map", (PyCFunction)crush_get_take_weight_osd_map,
bool get_config(const std::string &key, std::string *value) const;
bool get_store(const std::string &key, std::string *value) const;
std::string get_active_uri() const;
+ entity_addrvec_t get_myaddrs() const {
+ return state.get_monc().get_myaddrs();
+ }
int load();
};
mon->store->apply_transaction(t);
//mon->monmon()->paxos->stash_latest(mon->monmap->epoch, em->monmap_bl);
cancel_timer();
+ mon->notify_new_monmap(false);
mon->bootstrap();
return;
}
void notify_rank_changed(int new_rank);
/**
* A peer has been removed so we should clean up state related to it.
+ * This is safe to call even if we haven't joined or are currently
+ * in a quorum.
*/
void notify_rank_removed(int rank_removed);
void notify_strategy_maybe_changed(int strategy);
ss << "version " << val << " is not recognized";
return -EINVAL;
}
+ ss << "WARNING: setting min_compat_client is deprecated"
+ " and may not do what you want.\n"
+ "The oldest release to set is octopus.\n"
+ "Please migrate to `ceph fs required_client_features ...`.";
auto f = [vno](auto&& fs) {
fs->mds_map.set_min_compat_client(vno);
};
<< "'" << dendl;
return;
}
- if (fsmap.filesystems.count(fscid) == 0) {
- // Client asked for a non-existent namespace, send them nothing
- // TODO: something more graceful for when a client has a filesystem
- // mounted, and the fileysstem is deleted. Add a "shut down you fool"
- // flag to MMDSMap?
- dout(1) << "Client subscribed to non-existent namespace '" <<
- fscid << "'" << dendl;
- return;
- }
} else {
// Unqualified request for "mdsmap": give it the one marked
// for use by legacy clients.
return;
}
}
+ if (!fsmap.filesystem_exists(fscid)) {
+ // Client asked for a non-existent namespace, send them nothing
+ // TODO: something more graceful for when a client has a filesystem
+ // mounted, and the fileysstem is deleted. Add a "shut down you fool"
+ // flag to MMDSMap?
+ dout(1) << "Client subscribed to non-existent namespace '" <<
+ fscid << "'" << dendl;
+ return;
+ }
}
dout(10) << __func__ << ": is_mds=" << is_mds << ", fscid= " << fscid << dendl;
until += ceph::make_timespan(timeout);
if (timeout > 0.0)
ldout(cct, 10) << "authenticate will time out at " << until << dendl;
- authenticate_err = 1; // == in progress
while (!active_con && authenticate_err >= 0) {
if (timeout > 0.0) {
auto r = auth_cond.wait_until(lock, until);
_check_auth_tickets();
}
auth_cond.notify_all();
-
- if (!auth_err) {
- Context *cb = nullptr;
- if (session_established_context) {
- cb = session_established_context.release();
- }
- if (cb) {
- monc_lock.unlock();
- cb->complete(0);
- monc_lock.lock();
- }
- }
}
// ---------
active_con.reset();
pending_cons.clear();
+ authenticate_err = 1; // == in progress
+
_start_hunting();
if (rank >= 0) {
return 0;
ldout(cct, 10) << __func__ << " waiting for " << timeout << dendl;
- utime_t now = ceph_clock_now();
- if (auth_cond.wait_for(l, ceph::make_timespan(timeout), [now, this] {
+ utime_t cutoff = ceph_clock_now();
+ cutoff -= std::min(30.0, cct->_conf->auth_service_ticket_ttl / 4.0);
+ if (auth_cond.wait_for(l, ceph::make_timespan(timeout), [this, cutoff] {
return (!auth_principal_needs_rotating_keys(entity_name) ||
- !rotating_secrets->need_new_secrets(now));
+ !rotating_secrets->need_new_secrets(cutoff));
})) {
ldout(cct, 10) << __func__ << " done" << dendl;
return 0;
std::list<MessageRef> waiting_for_session;
utime_t last_rotating_renew_sent;
- std::unique_ptr<Context> session_established_context;
bool had_a_connection;
double reopen_interval_multiplier;
send_mon_message(MessageRef{m, false});
}
void send_mon_message(MessageRef m);
- /**
- * If you specify a callback, you should not call
- * reopen_session() again until it has been triggered. The MonClient
- * will behave, but the first callback could be triggered after
- * the session has been killed and the MonClient has started trying
- * to reconnect to another monitor.
- */
- void reopen_session(Context *cb=NULL) {
+
+ void reopen_session() {
std::lock_guard l(monc_lock);
- if (cb) {
- session_established_context.reset(cb);
- }
_reopen_session();
}
ceph_release());
r->name = name;
r->quorum = quorum;
+ r->leader = leader;
monmap->encode(r->monmap_bl, m->get_connection()->get_features());
r->paxos_first_version = paxos->get_first_committed();
r->paxos_last_version = paxos->get_version();
<< ", mine was " << monmap->get_epoch() << dendl;
delete newmap;
monmap->decode(m->monmap_bl);
+ notify_new_monmap(false);
bootstrap();
return;
<< " vs my version " << paxos->get_version()
<< " (ok)"
<< dendl;
-
- if (monmap->contains(name) &&
- !monmap->get_addrs(name).front().is_blank_ip()) {
+ bool in_map = false;
+ const auto my_info = monmap->mon_info.find(name);
+ const map<string,string> *map_crush_loc{nullptr};
+ if (my_info != monmap->mon_info.end()) {
+ in_map = true;
+ map_crush_loc = &my_info->second.crush_loc;
+ }
+ if (in_map &&
+ !monmap->get_addrs(name).front().is_blank_ip() &&
+ (!need_set_crush_loc || (*map_crush_loc == crush_loc))) {
// i'm part of the cluster; just initiate a new election
start_election();
} else {
- dout(10) << " ready to join, but i'm not in the monmap or my addr is blank, trying to join" << dendl;
- send_mon_message(
- new MMonJoin(monmap->fsid, name, messenger->get_myaddrs()),
- *m->quorum.begin());
+ dout(10) << " ready to join, but i'm not in the monmap/"
+ "my addr is blank/location is wrong, trying to join" << dendl;
+ send_mon_message(new MMonJoin(monmap->fsid, name,
+ messenger->get_myaddrs(), crush_loc,
+ need_set_crush_loc),
+ m->leader);
}
} else {
if (monmap->contains(m->name)) {
authmon()->_set_mon_num_rank(monmap->size(), rank);
}
- // am i named properly?
+ // am i named and located properly?
string cur_name = monmap->get_name(messenger->get_myaddrs());
- if (cur_name != name) {
- dout(10) << " renaming myself from " << cur_name << " -> " << name << dendl;
- send_mon_message(
- new MMonJoin(monmap->fsid, name, messenger->get_myaddrs()),
- *quorum.begin());
+ const auto my_infop = monmap->mon_info.find(cur_name);
+ const map<string,string>& map_crush_loc = my_infop->second.crush_loc;
+
+ if (cur_name != name ||
+ (need_set_crush_loc && map_crush_loc != crush_loc)) {
+ dout(10) << " renaming/moving myself from " << cur_name << "/"
+ << map_crush_loc <<" -> " << name << "/" << crush_loc << dendl;
+ send_mon_message(new MMonJoin(monmap->fsid, name, messenger->get_myaddrs(),
+ crush_loc, need_set_crush_loc),
+ leader);
return;
}
do_stretch_mode_election_work();
dout(10) << "handle_route tid " << m->session_mon_tid << " null" << dendl;
// look it up
- if (m->session_mon_tid) {
- if (routed_requests.count(m->session_mon_tid)) {
- RoutedRequest *rr = routed_requests[m->session_mon_tid];
-
- // reset payload, in case encoding is dependent on target features
- if (m->msg) {
- m->msg->clear_payload();
- rr->con->send_message(m->msg);
- m->msg = NULL;
- }
- if (m->send_osdmap_first) {
- dout(10) << " sending osdmaps from " << m->send_osdmap_first << dendl;
- osdmon()->send_incremental(m->send_osdmap_first, rr->session,
- true, MonOpRequestRef());
- }
- ceph_assert(rr->tid == m->session_mon_tid && rr->session->routed_request_tids.count(m->session_mon_tid));
- routed_requests.erase(m->session_mon_tid);
- rr->session->routed_request_tids.erase(m->session_mon_tid);
- delete rr;
- } else {
- dout(10) << " don't have routed request tid " << m->session_mon_tid << dendl;
- }
- } else {
+ if (!m->session_mon_tid) {
dout(10) << " not a routed request, ignoring" << dendl;
+ return;
+ }
+ auto found = routed_requests.find(m->session_mon_tid);
+ if (found == routed_requests.end()) {
+ dout(10) << " don't have routed request tid " << m->session_mon_tid << dendl;
+ return;
+ }
+ std::unique_ptr<RoutedRequest> rr{found->second};
+ // reset payload, in case encoding is dependent on target features
+ if (m->msg) {
+ m->msg->clear_payload();
+ rr->con->send_message(m->msg);
+ m->msg = NULL;
}
+ if (m->send_osdmap_first) {
+ dout(10) << " sending osdmaps from " << m->send_osdmap_first << dendl;
+ osdmon()->send_incremental(m->send_osdmap_first, rr->session,
+ true, MonOpRequestRef());
+ }
+ ceph_assert(rr->tid == m->session_mon_tid && rr->session->routed_request_tids.count(m->session_mon_tid));
+ routed_requests.erase(found);
+ rr->session->routed_request_tids.erase(m->session_mon_tid);
}
void Monitor::resend_routed_requests()
return ret;
}
-void Monitor::notify_new_monmap()
+void Monitor::set_mon_crush_location(const string& loc)
+{
+ if (loc.empty()) {
+ return;
+ }
+ vector<string> loc_vec;
+ loc_vec.push_back(loc);
+ CrushWrapper::parse_loc_map(loc_vec, &crush_loc);
+ need_set_crush_loc = true;
+}
+
+void Monitor::notify_new_monmap(bool can_change_external_state)
{
+ if (need_set_crush_loc) {
+ auto my_info_i = monmap->mon_info.find(name);
+ if (my_info_i != monmap->mon_info.end() &&
+ my_info_i->second.crush_loc == crush_loc) {
+ need_set_crush_loc = false;
+ }
+ }
elector.notify_strategy_maybe_changed(monmap->strategy);
dout(30) << __func__ << "we have " << monmap->removed_ranks.size() << " removed ranks" << dendl;
for (auto i = monmap->removed_ranks.rbegin();
}
if (monmap->stretch_mode_enabled) {
- maybe_engage_stretch_mode();
+ try_engage_stretch_mode();
}
if (is_stretch_mode()) {
set_degraded_stretch_mode();
}
}
- set_elector_disallowed_leaders(true);
+ set_elector_disallowed_leaders(can_change_external_state);
}
void Monitor::set_elector_disallowed_leaders(bool allow_election)
Monitor *m;
CMonEnableStretchMode(Monitor *mon) : m(mon) {}
void finish(int r) {
- m->maybe_engage_stretch_mode();
+ m->try_engage_stretch_mode();
}
};
-void Monitor::maybe_engage_stretch_mode()
+void Monitor::try_engage_stretch_mode()
{
dout(20) << __func__ << dendl;
if (stretch_mode_engaged) return;
if (!osdmon()->is_writeable()) {
osdmon()->wait_for_writeable_ctx(new CMonGoRecovery(this));
}
+ osdmon()->trigger_recovery_stretch_mode();
+}
+
+void Monitor::set_recovery_stretch_mode()
+{
+ degraded_stretch_mode = true;
recovering_stretch_mode = true;
- osdmon()->trigger_recovery_stretch_mode();
+ osdmon()->set_recovery_stretch_mode();
}
void Monitor::maybe_go_degraded_stretch_mode()
{
degraded_stretch_mode = true;
recovering_stretch_mode = false;
+ osdmon()->set_degraded_stretch_mode();
}
struct CMonGoHealthy : public Context {
}
ceph_assert(osdmon()->osdmap.recovering_stretch_mode);
- set_healthy_stretch_mode();
osdmon()->trigger_healthy_stretch_mode();
monmon()->trigger_healthy_stretch_mode();
}
{
degraded_stretch_mode = false;
recovering_stretch_mode = false;
+ osdmon()->set_healthy_stretch_mode();
}
bool Monitor::session_stretch_allowed(MonSession *s, MonOpRequestRef& op)
bool session_stretch_allowed(MonSession *s, MonOpRequestRef& op);
void disconnect_disallowed_stretch_sessions();
void set_elector_disallowed_leaders(bool allow_election);
+
+ map <string,string> crush_loc;
+ bool need_set_crush_loc{false};
public:
bool is_stretch_mode() { return stretch_mode_engaged; }
bool is_degraded_stretch_mode() { return degraded_stretch_mode; }
bool is_recovering_stretch_mode() { return recovering_stretch_mode; }
- void maybe_engage_stretch_mode();
+
+ /**
+ * This set of functions maintains the in-memory stretch state
+ * and sets up transitions of the map states by calling in to
+ * MonmapMonitor and OSDMonitor.
+ *
+ * The [maybe_]go_* functions are called on the leader to
+ * decide if transitions should happen; the trigger_* functions
+ * set up the map transitions; and the set_* functions actually
+ * change the memory state -- but these are only called
+ * via OSDMonitor::update_from_paxos, to guarantee consistent
+ * updates across the entire cluster.
+ */
+ void try_engage_stretch_mode();
void maybe_go_degraded_stretch_mode();
void trigger_degraded_stretch_mode(const set<string>& dead_mons,
const set<int>& dead_buckets);
void set_degraded_stretch_mode();
void go_recovery_stretch_mode();
+ void set_recovery_stretch_mode();
void trigger_healthy_stretch_mode();
void set_healthy_stretch_mode();
void enable_stretch_mode();
+ void set_mon_crush_location(const string& loc);
private:
void waitlist_or_zap_client(MonOpRequestRef op);
void send_mon_message(Message *m, int rank);
- void notify_new_monmap();
+ /** can_change_external_state if we can do things like
+ * call elections as a result of the new map.
+ */
+ void notify_new_monmap(bool can_change_external_state=false);
public:
struct C_Command : public C_MonOp {
stringify(ceph_release()));
}
- mon.notify_new_monmap();
+ mon.notify_new_monmap(true);
}
void MonmapMonitor::create_pending()
return true;
}
- if (pending_map.contains(join->name) &&
- !pending_map.get_addrs(join->name).front().is_blank_ip()) {
+ const auto name_info_i = pending_map.mon_info.find(join->name);
+ if (name_info_i != pending_map.mon_info.end() &&
+ !name_info_i->second.public_addrs.front().is_blank_ip() &&
+ (!join->force_loc || join->crush_loc == name_info_i->second.crush_loc)) {
dout(10) << " already have " << join->name << dendl;
return true;
}
- if (pending_map.contains(join->addrs) &&
- pending_map.get_name(join->addrs) == join->name) {
+ string addr_name;
+ if (pending_map.contains(join->addrs)) {
+ addr_name = pending_map.get_name(join->addrs);
+ }
+ if (!addr_name.empty() &&
+ addr_name == join->name &&
+ (!join->force_loc || join->crush_loc.empty() ||
+ pending_map.mon_info[addr_name].crush_loc == join->crush_loc)) {
dout(10) << " already have " << join->addrs << dendl;
return true;
}
+ if (pending_map.stretch_mode_enabled &&
+ join->crush_loc.empty() &&
+ (addr_name.empty() ||
+ pending_map.mon_info[addr_name].crush_loc.empty())) {
+ dout(10) << "stretch mode engaged but no source of crush_loc" << dendl;
+ mon.clog->info() << join->name << " attempted to join from " << join->name
+ << ' ' << join->addrs
+ << "; but lacks a crush_location for stretch mode";
+ return true;
+ }
return false;
}
+
bool MonmapMonitor::prepare_join(MonOpRequestRef op)
{
auto join = op->get_req<MMonJoin>();
if (pending_map.contains(join->name))
pending_map.remove(join->name);
pending_map.add(join->name, join->addrs);
- pending_map.mon_info[join->name].crush_loc = existing_loc;
+ pending_map.mon_info[join->name].crush_loc =
+ ((join->force_loc || existing_loc.empty()) ?
+ join->crush_loc : existing_loc);
pending_map.last_changed = ceph_clock_now();
return true;
}
}
if (osdmap.stretch_mode_enabled) {
dout(20) << "Stretch mode enabled in this map" << dendl;
- mon.maybe_engage_stretch_mode();
+ mon.try_engage_stretch_mode();
if (osdmap.degraded_stretch_mode) {
dout(20) << "Degraded stretch mode set in this map" << dendl;
if (!osdmap.recovering_stretch_mode) {
dout(10) << "Enabling recovery stretch mode in this map" << dendl;
mon.go_recovery_stretch_mode();
}
+ } else {
+ mon.set_recovery_stretch_mode();
}
+ } else {
+ mon.set_healthy_stretch_mode();
}
if (marked_osd_down &&
(!osdmap.degraded_stretch_mode || osdmap.recovering_stretch_mode)) {
dout(20) << "Checking degraded stretch mode due to osd changes" << dendl;
mon.maybe_go_degraded_stretch_mode();
}
- if (osdmap.recovering_stretch_mode && stretch_recovery_triggered.is_zero()) {
- stretch_recovery_triggered = ceph_clock_now();
- }
}
}
bool OSDMonitor::check_failures(utime_t now)
{
bool found_failure = false;
- for (map<int,failure_info_t>::iterator p = failure_info.begin();
- p != failure_info.end();
- ++p) {
- if (can_mark_down(p->first)) {
- found_failure |= check_failure(now, p->first, p->second);
+ auto p = failure_info.begin();
+ while (p != failure_info.end()) {
+ auto& [target_osd, fi] = *p;
+ if (can_mark_down(target_osd) &&
+ check_failure(now, target_osd, fi)) {
+ found_failure = true;
+ ++p;
+ } else if (is_failure_stale(now, fi)) {
+ dout(10) << " dropping stale failure_info for osd." << target_osd
+ << " from " << fi.reporters.size() << " reporters"
+ << dendl;
+ p = failure_info.erase(p);
+ } else {
+ ++p;
}
}
return found_failure;
}
+utime_t OSDMonitor::get_grace_time(utime_t now,
+ int target_osd,
+ failure_info_t& fi) const
+{
+ utime_t orig_grace(g_conf()->osd_heartbeat_grace, 0);
+ if (!g_conf()->mon_osd_adjust_heartbeat_grace) {
+ return orig_grace;
+ }
+ utime_t grace = orig_grace;
+ double halflife = (double)g_conf()->mon_osd_laggy_halflife;
+ double decay_k = ::log(.5) / halflife;
+
+ // scale grace period based on historical probability of 'lagginess'
+ // (false positive failures due to slowness).
+ const osd_xinfo_t& xi = osdmap.get_xinfo(target_osd);
+ const utime_t failed_for = now - fi.get_failed_since();
+ double decay = exp((double)failed_for * decay_k);
+ dout(20) << " halflife " << halflife << " decay_k " << decay_k
+ << " failed_for " << failed_for << " decay " << decay << dendl;
+ double my_grace = decay * (double)xi.laggy_interval * xi.laggy_probability;
+ grace += my_grace;
+
+ // consider the peers reporting a failure a proxy for a potential
+ // 'subcluster' over the overall cluster that is similarly
+ // laggy. this is clearly not true in all cases, but will sometimes
+ // help us localize the grace correction to a subset of the system
+ // (say, a rack with a bad switch) that is unhappy.
+ double peer_grace = 0;
+ for (auto& [reporter, report] : fi.reporters) {
+ if (osdmap.exists(reporter)) {
+ const osd_xinfo_t& xi = osdmap.get_xinfo(reporter);
+ utime_t elapsed = now - xi.down_stamp;
+ double decay = exp((double)elapsed * decay_k);
+ peer_grace += decay * (double)xi.laggy_interval * xi.laggy_probability;
+ }
+ }
+ peer_grace /= (double)fi.reporters.size();
+ grace += peer_grace;
+ dout(10) << " osd." << target_osd << " has "
+ << fi.reporters.size() << " reporters, "
+ << grace << " grace (" << orig_grace << " + " << my_grace
+ << " + " << peer_grace << "), max_failed_since " << fi.get_failed_since()
+ << dendl;
+
+ return grace;
+}
+
bool OSDMonitor::check_failure(utime_t now, int target_osd, failure_info_t& fi)
{
// already pending failure?
set<string> reporters_by_subtree;
auto reporter_subtree_level = g_conf().get_val<string>("mon_osd_reporter_subtree_level");
- utime_t orig_grace(g_conf()->osd_heartbeat_grace, 0);
- utime_t max_failed_since = fi.get_failed_since();
- utime_t failed_for = now - max_failed_since;
-
- utime_t grace = orig_grace;
- double my_grace = 0, peer_grace = 0;
- double decay_k = 0;
- if (g_conf()->mon_osd_adjust_heartbeat_grace) {
- double halflife = (double)g_conf()->mon_osd_laggy_halflife;
- decay_k = ::log(.5) / halflife;
-
- // scale grace period based on historical probability of 'lagginess'
- // (false positive failures due to slowness).
- const osd_xinfo_t& xi = osdmap.get_xinfo(target_osd);
- double decay = exp((double)failed_for * decay_k);
- dout(20) << " halflife " << halflife << " decay_k " << decay_k
- << " failed_for " << failed_for << " decay " << decay << dendl;
- my_grace = decay * (double)xi.laggy_interval * xi.laggy_probability;
- grace += my_grace;
- }
-
- // consider the peers reporting a failure a proxy for a potential
- // 'subcluster' over the overall cluster that is similarly
- // laggy. this is clearly not true in all cases, but will sometimes
- // help us localize the grace correction to a subset of the system
- // (say, a rack with a bad switch) that is unhappy.
ceph_assert(fi.reporters.size());
for (auto p = fi.reporters.begin(); p != fi.reporters.end();) {
// get the parent bucket whose type matches with "reporter_subtree_level".
} else {
reporters_by_subtree.insert(iter->second);
}
- if (g_conf()->mon_osd_adjust_heartbeat_grace) {
- const osd_xinfo_t& xi = osdmap.get_xinfo(p->first);
- utime_t elapsed = now - xi.down_stamp;
- double decay = exp((double)elapsed * decay_k);
- peer_grace += decay * (double)xi.laggy_interval * xi.laggy_probability;
- }
++p;
} else {
fi.cancel_report(p->first);;
p = fi.reporters.erase(p);
}
}
-
- if (g_conf()->mon_osd_adjust_heartbeat_grace) {
- peer_grace /= (double)fi.reporters.size();
- grace += peer_grace;
+ if (reporters_by_subtree.size() < g_conf().get_val<uint64_t>("mon_osd_min_down_reporters")) {
+ return false;
}
-
- dout(10) << " osd." << target_osd << " has "
- << fi.reporters.size() << " reporters, "
- << grace << " grace (" << orig_grace << " + " << my_grace
- << " + " << peer_grace << "), max_failed_since " << max_failed_since
- << dendl;
-
- if (failed_for >= grace &&
- reporters_by_subtree.size() >= g_conf().get_val<uint64_t>("mon_osd_min_down_reporters")) {
+ const utime_t failed_for = now - fi.get_failed_since();
+ const utime_t grace = get_grace_time(now, target_osd, fi);
+ if (failed_for >= grace) {
dout(1) << " we have enough reporters to mark osd." << target_osd
<< " down" << dendl;
pending_inc.new_state[target_osd] = CEPH_OSD_UP;
return false;
}
+bool OSDMonitor::is_failure_stale(utime_t now, failure_info_t& fi) const
+{
+ // if it takes too long to either cancel the report to mark the osd down,
+ // some reporters must have failed to cancel their reports. let's just
+ // forget these reports.
+ const utime_t failed_for = now - fi.get_failed_since();
+ auto heartbeat_grace = cct->_conf.get_val<int64_t>("osd_heartbeat_grace");
+ auto heartbeat_stale = cct->_conf.get_val<int64_t>("osd_heartbeat_stale");
+ return failed_for >= (heartbeat_grace + heartbeat_stale);
+}
+
void OSDMonitor::force_failure(int target_osd, int by)
{
// already pending failure?
<< m->get_orig_source();
failure_info_t& fi = failure_info[target_osd];
- MonOpRequestRef old_op = fi.add_report(reporter, failed_since, op);
- if (old_op) {
- mon.no_reply(old_op);
- }
-
+ fi.add_report(reporter, failed_since, op);
return check_failure(now, target_osd, fi);
} else {
// remove the report
<< m->get_orig_source();
if (failure_info.count(target_osd)) {
failure_info_t& fi = failure_info[target_osd];
- MonOpRequestRef report_op = fi.cancel_report(reporter);
- if (report_op) {
- mon.no_reply(report_op);
- }
+ fi.cancel_report(reporter);
if (fi.reporters.empty()) {
dout(10) << " removing last failure_info for osd." << target_osd
<< dendl;
propose_pending();
}
+void OSDMonitor::set_degraded_stretch_mode()
+{
+ stretch_recovery_triggered.set_from_double(0);
+}
+
+void OSDMonitor::set_recovery_stretch_mode()
+{
+ if (stretch_recovery_triggered.is_zero()) {
+ stretch_recovery_triggered = ceph_clock_now();
+ }
+}
+
+void OSDMonitor::set_healthy_stretch_mode()
+{
+ stretch_recovery_triggered.set_from_double(0);
+}
+
void OSDMonitor::notify_new_pg_digest()
{
dout(20) << __func__ << dendl;
MonOpRequestRef op; ///< failure op request
failure_reporter_t() {}
- explicit failure_reporter_t(utime_t s) : failed_since(s) {}
+ failure_reporter_t(utime_t s, MonOpRequestRef op)
+ : failed_since(s), op(op) {}
~failure_reporter_t() { }
};
return max_failed_since;
}
- // set the message for the latest report. return any old op request we had,
- // if any, so we can discard it.
- MonOpRequestRef add_report(int who, utime_t failed_since,
- MonOpRequestRef op) {
- auto p = reporters.find(who);
- if (p == reporters.end()) {
- if (max_failed_since != utime_t() && max_failed_since < failed_since)
+ // set the message for the latest report.
+ void add_report(int who, utime_t failed_since, MonOpRequestRef op) {
+ [[maybe_unused]] auto [it, new_reporter] =
+ reporters.insert_or_assign(who, failure_reporter_t{failed_since, op});
+ if (new_reporter) {
+ if (max_failed_since != utime_t() && max_failed_since < failed_since) {
max_failed_since = failed_since;
- p = reporters.insert(std::map<int, failure_reporter_t>::value_type(who, failure_reporter_t(failed_since))).first;
+ }
}
-
- MonOpRequestRef ret = p->second.op;
- p->second.op = op;
- return ret;
}
void take_report_messages(std::list<MonOpRequestRef>& ls) {
}
}
- MonOpRequestRef cancel_report(int who) {
- auto p = reporters.find(who);
- if (p == reporters.end())
- return MonOpRequestRef();
- MonOpRequestRef ret = p->second.op;
- reporters.erase(p);
+ void cancel_report(int who) {
+ reporters.erase(who);
max_failed_since = utime_t();
- return ret;
}
};
bool check_failures(utime_t now);
bool check_failure(utime_t now, int target_osd, failure_info_t& fi);
+ utime_t get_grace_time(utime_t now, int target_osd, failure_info_t& fi) const;
+ bool is_failure_stale(utime_t now, failure_info_t& fi) const;
void force_failure(int target_osd, int by);
bool _have_pending_crush();
*/
void trigger_degraded_stretch_mode(const set<int>& dead_buckets,
const set<string>& live_zones);
+ /**
+ * This is just to maintain stretch_recovery_triggered; below
+ */
+ void set_degraded_stretch_mode();
/**
* Set recovery stretch mode in the OSDMap, resetting pool size back to normal
*/
void trigger_recovery_stretch_mode();
+ /**
+ * This is just to maintain stretch_recovery_triggered; below
+ */
+ void set_recovery_stretch_mode();
+ /**
+ * This is just to maintain stretch_recovery_triggered; below
+ */
+ void set_healthy_stretch_mode();
/**
* Tells the OSD there's a new pg digest, in case it's interested.
* (It's interested when in recovering stretch mode.)
try {
rx_buffer = ceph::buffer::ptr_node::create(ceph::buffer::create_aligned(
onwire_len, align));
- } catch (std::bad_alloc&) {
+ } catch (const ceph::buffer::bad_alloc&) {
// Catching because of potential issues with satisfying alignment.
ldout(cct, 1) << __func__ << " can't allocate aligned rx_buffer"
<< " len=" << onwire_len
ceph_assert(size > 0);
force_range_size_alloc = true;
}
- /*
- * Find the largest power of 2 block size that evenly divides the
- * requested size. This is used to try to allocate blocks with similar
- * alignment from the same area (i.e. same cursor bucket) but it does
- * not guarantee that other allocations sizes may exist in the same
- * region.
- */
- const uint64_t align = size & -size;
- ceph_assert(align != 0);
- uint64_t *cursor = &lbas[cbits(align) - 1];
const int free_pct = num_free * 100 / num_total;
uint64_t start = 0;
if (force_range_size_alloc ||
max_size < range_size_alloc_threshold ||
free_pct < range_size_alloc_free_pct) {
- *cursor = 0;
+ uint64_t fake_cursor = 0;
do {
- start = _block_picker(range_size_tree, cursor, size, unit);
- if (start != -1ULL || !force_range_size_alloc) {
+ start = _block_picker(range_size_tree, &fake_cursor, size, unit);
+ dout(20) << __func__ << " best fit=" << start << " size=" << size << dendl;
+ if (start != uint64_t(-1ULL)) {
break;
}
// try to collect smaller extents as we could fail to retrieve
size = p2align(size >> 1, unit);
} while (size >= unit);
} else {
- start = _block_picker(range_tree, cursor, size, unit);
+ do {
+ /*
+ * Find the largest power of 2 block size that evenly divides the
+ * requested size. This is used to try to allocate blocks with similar
+ * alignment from the same area (i.e. same cursor bucket) but it does
+ * not guarantee that other allocations sizes may exist in the same
+ * region.
+ */
+ uint64_t align = size & -size;
+ ceph_assert(align != 0);
+ uint64_t* cursor = &lbas[cbits(align) - 1];
+
+ start = _block_picker(range_tree, cursor, size, unit);
+ dout(20) << __func__ << " first fit=" << start << " size=" << size << dendl;
+ if (start != uint64_t(-1ULL)) {
+ break;
+ }
+ // try to collect smaller extents as we could fail to retrieve
+ // that large block due to misaligned extents
+ size = p2align(size >> 1, unit);
+ } while (size >= unit);
}
if (start == -1ULL) {
return -ENOSPC;
void AvlAllocator::init_add_free(uint64_t offset, uint64_t length)
{
+ if (!length)
+ return;
std::lock_guard l(lock);
ldout(cct, 10) << __func__ << std::hex
<< " offset 0x" << offset
void AvlAllocator::init_rm_free(uint64_t offset, uint64_t length)
{
+ if (!length)
+ return;
std::lock_guard l(lock);
ldout(cct, 10) << __func__ << std::hex
<< " offset 0x" << offset
}
int BlueFS::open_for_write(
- const string& dirname,
- const string& filename,
+ std::string_view dirname,
+ std::string_view filename,
FileWriter **h,
bool overwrite)
{
file = ceph::make_ref<File>();
file->fnode.ino = ++ino_last;
file_map[ino_last] = file;
- dir->file_map[filename] = file;
+ dir->file_map[string{filename}] = file;
++file->refs;
create = true;
} else {
}
int BlueFS::open_for_read(
- const string& dirname,
- const string& filename,
+ std::string_view dirname,
+ std::string_view filename,
FileReader **h,
bool random)
{
}
int BlueFS::rename(
- const string& old_dirname, const string& old_filename,
- const string& new_dirname, const string& new_filename)
+ std::string_view old_dirname, std::string_view old_filename,
+ std::string_view new_dirname, std::string_view new_filename)
{
std::lock_guard l(lock);
dout(10) << __func__ << " " << old_dirname << "/" << old_filename
dout(10) << __func__ << " " << new_dirname << "/" << new_filename << " "
<< " " << file->fnode << dendl;
- new_dir->file_map[new_filename] = file;
- old_dir->file_map.erase(old_filename);
+ new_dir->file_map[string{new_filename}] = file;
+ old_dir->file_map.erase(string{old_filename});
log_t.op_dir_link(new_dirname, new_filename, file->fnode.ino);
log_t.op_dir_unlink(old_dirname, old_filename);
return 0;
}
-int BlueFS::mkdir(const string& dirname)
+int BlueFS::mkdir(std::string_view dirname)
{
std::lock_guard l(lock);
dout(10) << __func__ << " " << dirname << dendl;
dout(20) << __func__ << " dir " << dirname << " exists" << dendl;
return -EEXIST;
}
- dir_map[dirname] = ceph::make_ref<Dir>();
+ dir_map[string{dirname}] = ceph::make_ref<Dir>();
log_t.op_dir_create(dirname);
return 0;
}
-int BlueFS::rmdir(const string& dirname)
+int BlueFS::rmdir(std::string_view dirname)
{
std::lock_guard l(lock);
dout(10) << __func__ << " " << dirname << dendl;
- map<string,DirRef>::iterator p = dir_map.find(dirname);
+ auto p = dir_map.find(dirname);
if (p == dir_map.end()) {
dout(20) << __func__ << " dir " << dirname << " does not exist" << dendl;
return -ENOENT;
dout(20) << __func__ << " dir " << dirname << " not empty" << dendl;
return -ENOTEMPTY;
}
- dir_map.erase(dirname);
+ dir_map.erase(string{dirname});
log_t.op_dir_remove(dirname);
return 0;
}
-bool BlueFS::dir_exists(const string& dirname)
+bool BlueFS::dir_exists(std::string_view dirname)
{
std::lock_guard l(lock);
map<string,DirRef>::iterator p = dir_map.find(dirname);
return exists;
}
-int BlueFS::stat(const string& dirname, const string& filename,
+int BlueFS::stat(std::string_view dirname, std::string_view filename,
uint64_t *size, utime_t *mtime)
{
std::lock_guard l(lock);
return 0;
}
-int BlueFS::lock_file(const string& dirname, const string& filename,
+int BlueFS::lock_file(std::string_view dirname, std::string_view filename,
FileLock **plock)
{
std::lock_guard l(lock);
return -ENOENT;
}
DirRef dir = p->second;
- map<string,FileRef>::iterator q = dir->file_map.find(filename);
+ auto q = dir->file_map.find(filename);
FileRef file;
if (q == dir->file_map.end()) {
dout(20) << __func__ << " dir " << dirname << " (" << dir
file->fnode.ino = ++ino_last;
file->fnode.mtime = ceph_clock_now();
file_map[ino_last] = file;
- dir->file_map[filename] = file;
+ dir->file_map[string{filename}] = file;
++file->refs;
log_t.op_file_update(file->fnode);
log_t.op_dir_link(dirname, filename, file->fnode.ino);
return 0;
}
-int BlueFS::readdir(const string& dirname, vector<string> *ls)
+int BlueFS::readdir(std::string_view dirname, vector<string> *ls)
{
+ // dirname may contain a trailing /
+ if (!dirname.empty() && dirname.back() == '/') {
+ dirname.remove_suffix(1);
+ }
std::lock_guard l(lock);
dout(10) << __func__ << " " << dirname << dendl;
if (dirname.empty()) {
return 0;
}
-int BlueFS::unlink(const string& dirname, const string& filename)
+int BlueFS::unlink(std::string_view dirname, std::string_view filename)
{
std::lock_guard l(lock);
dout(10) << __func__ << " " << dirname << "/" << filename << dendl;
<< " is locked" << dendl;
return -EBUSY;
}
- dir->file_map.erase(filename);
+ dir->file_map.erase(string{filename});
log_t.op_dir_unlink(dirname, filename);
_drop_link(file);
return 0;
void* OriginalVolumeSelector::get_hint_for_log() const {
return reinterpret_cast<void*>(BlueFS::BDEV_WAL);
}
-void* OriginalVolumeSelector::get_hint_by_dir(const string& dirname) const {
+void* OriginalVolumeSelector::get_hint_by_dir(std::string_view dirname) const {
uint8_t res = BlueFS::BDEV_DB;
if (dirname.length() > 5) {
// the "db.slow" and "db.wal" directory names are hard-coded at
virtual ~BlueFSVolumeSelector() {
}
virtual void* get_hint_for_log() const = 0;
- virtual void* get_hint_by_dir(const std::string& dirname) const = 0;
+ virtual void* get_hint_by_dir(std::string_view dirname) const = 0;
virtual void add_usage(void* file_hint, const bluefs_fnode_t& fnode) = 0;
virtual void sub_usage(void* file_hint, const bluefs_fnode_t& fnode) = 0;
struct Dir : public RefCountedObject {
MEMPOOL_CLASS_HELPERS();
- mempool::bluefs::map<std::string,FileRef> file_map;
+ mempool::bluefs::map<std::string, FileRef, std::less<>> file_map;
private:
FRIEND_MAKE_REF(Dir);
};
// cache
- mempool::bluefs::map<std::string, DirRef> dir_map; ///< dirname -> Dir
- mempool::bluefs::unordered_map<uint64_t,FileRef> file_map; ///< ino -> File
+ mempool::bluefs::map<std::string, DirRef, std::less<>> dir_map; ///< dirname -> Dir
+ mempool::bluefs::unordered_map<uint64_t, FileRef> file_map; ///< ino -> File
// map of dirty files, files of same dirty_seq are grouped into list.
std::map<uint64_t, dirty_file_list_t> dirty_files;
int get_block_extents(unsigned id, interval_set<uint64_t> *extents);
int open_for_write(
- const std::string& dir,
- const std::string& file,
+ std::string_view dir,
+ std::string_view file,
FileWriter **h,
bool overwrite);
int open_for_read(
- const std::string& dir,
- const std::string& file,
+ std::string_view dir,
+ std::string_view file,
FileReader **h,
bool random = false);
_close_writer(h);
}
- int rename(const std::string& old_dir, const std::string& old_file,
- const std::string& new_dir, const std::string& new_file);
+ int rename(std::string_view old_dir, std::string_view old_file,
+ std::string_view new_dir, std::string_view new_file);
- int readdir(const std::string& dirname, std::vector<std::string> *ls);
+ int readdir(std::string_view dirname, std::vector<std::string> *ls);
- int unlink(const std::string& dirname, const std::string& filename);
- int mkdir(const std::string& dirname);
- int rmdir(const std::string& dirname);
+ int unlink(std::string_view dirname, std::string_view filename);
+ int mkdir(std::string_view dirname);
+ int rmdir(std::string_view dirname);
bool wal_is_rotational();
- bool dir_exists(const std::string& dirname);
- int stat(const std::string& dirname, const std::string& filename,
+ bool dir_exists(std::string_view dirname);
+ int stat(std::string_view dirname, std::string_view filename,
uint64_t *size, utime_t *mtime);
- int lock_file(const std::string& dirname, const std::string& filename, FileLock **p);
+ int lock_file(std::string_view dirname, std::string_view filename, FileLock **p);
int unlock_file(FileLock *l);
void compact_log();
: wal_total(_wal_total), db_total(_db_total), slow_total(_slow_total) {}
void* get_hint_for_log() const override;
- void* get_hint_by_dir(const std::string& dirname) const override;
+ void* get_hint_by_dir(std::string_view dirname) const override;
void add_usage(void* hint, const bluefs_fnode_t& fnode) override {
// do nothing
#include "kv/RocksDBStore.h"
#include "string.h"
+namespace {
+
rocksdb::Status err_to_status(int r)
{
switch (r) {
}
}
+std::pair<std::string_view, std::string_view>
+split(const std::string &fn)
+{
+ size_t slash = fn.rfind('/');
+ assert(slash != fn.npos);
+ size_t file_begin = slash + 1;
+ while (slash && fn[slash - 1] == '/')
+ --slash;
+ return {string_view(fn.data(), slash),
+ string_view(fn.data() + file_begin,
+ fn.size() - file_begin)};
+}
+
+}
+
// A file abstraction for reading sequentially through a file
class BlueRocksSequentialFile : public rocksdb::SequentialFile {
BlueFS *fs;
{
if (fname[0] == '/')
return target()->NewSequentialFile(fname, result, options);
- std::string dir, file;
- split(fname, &dir, &file);
+ auto [dir, file] = split(fname);
BlueFS::FileReader *h;
int r = fs->open_for_read(dir, file, &h, false);
if (r < 0)
std::unique_ptr<rocksdb::RandomAccessFile>* result,
const rocksdb::EnvOptions& options)
{
- std::string dir, file;
- split(fname, &dir, &file);
+ auto [dir, file] = split(fname);
BlueFS::FileReader *h;
int r = fs->open_for_read(dir, file, &h, true);
if (r < 0)
std::unique_ptr<rocksdb::WritableFile>* result,
const rocksdb::EnvOptions& options)
{
- std::string dir, file;
- split(fname, &dir, &file);
+ auto [dir, file] = split(fname);
BlueFS::FileWriter *h;
int r = fs->open_for_write(dir, file, &h, false);
if (r < 0)
std::unique_ptr<rocksdb::WritableFile>* result,
const rocksdb::EnvOptions& options)
{
- std::string old_dir, old_file;
- split(old_fname, &old_dir, &old_file);
- std::string new_dir, new_file;
- split(new_fname, &new_dir, &new_file);
+ auto [old_dir, old_file] = split(old_fname);
+ auto [new_dir, new_file] = split(new_fname);
int r = fs->rename(old_dir, old_file, new_dir, new_file);
if (r < 0)
{
if (fname[0] == '/')
return target()->FileExists(fname);
- std::string dir, file;
- split(fname, &dir, &file);
+ auto [dir, file] = split(fname);
if (fs->stat(dir, file, NULL, NULL) == 0)
return rocksdb::Status::OK();
return err_to_status(-ENOENT);
rocksdb::Status BlueRocksEnv::DeleteFile(const std::string& fname)
{
- std::string dir, file;
- split(fname, &dir, &file);
+ auto [dir, file] = split(fname);
int r = fs->unlink(dir, file);
if (r < 0)
return err_to_status(r);
const std::string& fname,
uint64_t* file_size)
{
- std::string dir, file;
- split(fname, &dir, &file);
+ auto [dir, file] = split(fname);
int r = fs->stat(dir, file, file_size, NULL);
if (r < 0)
return err_to_status(r);
rocksdb::Status BlueRocksEnv::GetFileModificationTime(const std::string& fname,
uint64_t* file_mtime)
{
- std::string dir, file;
- split(fname, &dir, &file);
+ auto [dir, file] = split(fname);
utime_t mtime;
int r = fs->stat(dir, file, NULL, &mtime);
if (r < 0)
const std::string& src,
const std::string& target)
{
- std::string old_dir, old_file;
- split(src, &old_dir, &old_file);
- std::string new_dir, new_file;
- split(target, &new_dir, &new_file);
+ auto [old_dir, old_file] = split(src);
+ auto [new_dir, new_file] = split(target);
int r = fs->rename(old_dir, old_file, new_dir, new_file);
if (r < 0)
if (fs->dir_exists(path)) {
continue;
}
- std::string dir, file;
- split(path, &dir, &file);
+ auto [dir, file] = split(path);
int r = fs->stat(dir, file, nullptr, nullptr);
if (!r) {
continue;
const std::string& fname,
rocksdb::FileLock** lock)
{
- std::string dir, file;
- split(fname, &dir, &file);
+ auto [dir, file] = split(fname);
BlueFS::FileLock *l = NULL;
int r = fs->lock_file(dir, file, &l);
if (r < 0)
class BlueFS;
class BlueRocksEnv : public rocksdb::EnvWrapper {
- void split(const std::string &fn, std::string *dir, std::string *file) {
- size_t slash = fn.rfind('/');
- *file = fn.substr(slash + 1);
- while (slash && fn[slash-1] == '/')
- --slash;
- *dir = fn.substr(0, slash);
- }
-
public:
// Create a brand new sequentially-readable file with the specified name.
// On success, stores a pointer to the new file in *result and returns OK.
bs.set(pos);
});
if (repairer) {
- repairer->get_space_usage_tracker().set_used( e.offset, e.length, cid, oid);
+ repairer->set_space_used(e.offset, e.length, cid, oid);
}
if (e.end() > bdev->get_size()) {
<< " zombie spanning blob(s) found, the first one: "
<< *first_broken << dendl;
if(repairer) {
- auto txn = repairer->fix_spanning_blobs(db);
- _record_onode(o, txn);
+ repairer->fix_spanning_blobs(
+ db,
+ [&](KeyValueDB::Transaction txn) {
+ _record_onode(o, txn);
+ });
}
}
}
if (repair) {
- repairer.get_space_usage_tracker().init(
+ repairer.init_space_usage_tracker(
bdev->get_size(),
min_alloc_size);
}
if (repair && repairer.preprocess_misreference(db)) {
dout(1) << __func__ << " sorting out misreferenced extents" << dendl;
- auto& space_tracker = repairer.get_space_usage_tracker();
auto& misref_extents = repairer.get_misreferences();
interval_set<uint64_t> to_release;
it = db->get_iterator(PREFIX_OBJ, KeyValueDB::ITERATOR_NOCACHE);
ghobject_t oid;
int r = get_key_object(it->key(), &oid);
- if (r < 0 || !space_tracker.is_used(oid)) {
+ if (r < 0 || !repairer.is_used(oid)) {
continue;
}
expected_statfs = &expected_pool_statfs[pool_id];
}
}
- if (!space_tracker.is_used(c->cid)) {
+ if (!repairer.is_used(c->cid)) {
continue;
}
const string& prefix,
const string& key)
{
+ std::lock_guard l(lock);
if (!remove_key_txn) {
remove_key_txn = db->get_transaction();
}
void BlueStoreRepairer::fix_per_pool_omap(KeyValueDB *db, int val)
{
+ std::lock_guard l(lock); // possibly redundant
+ ceph_assert(fix_per_pool_omap_txn == nullptr);
fix_per_pool_omap_txn = db->get_transaction();
++to_repair_cnt;
bufferlist bl;
uint64_t sbid,
const bufferlist* bl)
{
+ std::lock_guard l(lock); // possibly redundant
KeyValueDB::Transaction txn;
if (fix_misreferences_txn) { // reuse this txn
txn = fix_misreferences_txn;
const string& key,
const store_statfs_t& new_statfs)
{
+ std::lock_guard l(lock);
if (!fix_statfs_txn) {
fix_statfs_txn = db->get_transaction();
}
FreelistManager* fm,
uint64_t offset, uint64_t len)
{
+ std::lock_guard l(lock);
if (!fix_fm_leaked_txn) {
fix_fm_leaked_txn = db->get_transaction();
}
FreelistManager* fm,
uint64_t offset, uint64_t len)
{
+ std::lock_guard l(lock);
if (!fix_fm_false_free_txn) {
fix_fm_false_free_txn = db->get_transaction();
}
return true;
}
-KeyValueDB::Transaction BlueStoreRepairer::fix_spanning_blobs(KeyValueDB* db)
+bool BlueStoreRepairer::fix_spanning_blobs(
+ KeyValueDB* db,
+ std::function<void(KeyValueDB::Transaction)> f)
{
+ std::lock_guard l(lock);
if (!fix_onode_txn) {
fix_onode_txn = db->get_transaction();
}
+ f(fix_onode_txn);
++to_repair_cnt;
- return fix_onode_txn;
+ return true;
}
bool BlueStoreRepairer::preprocess_misreference(KeyValueDB *db)
{
+ //NB: not for use in multithreading mode!!!
if (misreferenced_extents.size()) {
size_t n = space_usage_tracker.filter_out(misreferenced_extents);
ceph_assert(n > 0);
unsigned BlueStoreRepairer::apply(KeyValueDB* db)
{
+ //NB: not for use in multithreading mode!!!
if (fix_per_pool_omap_txn) {
db->submit_transaction_sync(fix_per_pool_omap_txn);
fix_per_pool_omap_txn = nullptr;
res.emplace_back(base + ".slow", l_totals[LEVEL_SLOW - LEVEL_FIRST]);
}
-void* RocksDBBlueFSVolumeSelector::get_hint_by_dir(const string& dirname) const {
+void* RocksDBBlueFSVolumeSelector::get_hint_by_dir(std::string_view dirname) const {
uint8_t res = LEVEL_DB;
if (dirname.length() > 5) {
// the "db.slow" and "db.wal" directory names are hard-coded at
class BlueStoreRepairer
{
+ ceph::mutex lock = ceph::make_mutex("BlueStore::BlueStoreRepairer::lock");
+
public:
// to simplify future potential migration to mempools
using fsck_interval = interval_set<uint64_t>;
bool fix_false_free(KeyValueDB *db,
FreelistManager* fm,
uint64_t offset, uint64_t len);
- KeyValueDB::Transaction fix_spanning_blobs(KeyValueDB* db);
-
- void init(uint64_t total_space, uint64_t lres_tracking_unit_size);
+ bool fix_spanning_blobs(
+ KeyValueDB* db,
+ std::function<void(KeyValueDB::Transaction)> f);
bool preprocess_misreference(KeyValueDB *db);
unsigned apply(KeyValueDB* db);
void note_misreference(uint64_t offs, uint64_t len, bool inc_error) {
+ std::lock_guard l(lock);
misreferenced_extents.union_insert(offs, len);
if (inc_error) {
++to_repair_cnt;
++to_repair_cnt;
}
- StoreSpaceTracker& get_space_usage_tracker() {
- return space_usage_tracker;
+ void init_space_usage_tracker(
+ uint64_t total_space, uint64_t lres_tracking_unit_size)
+ {
+ //NB: not for use in multithreading mode!!!
+ space_usage_tracker.init(total_space, lres_tracking_unit_size);
+ }
+ void set_space_used(uint64_t offset, uint64_t len,
+ const coll_t& cid, const ghobject_t& oid) {
+ std::lock_guard l(lock);
+ space_usage_tracker.set_used(offset, len, cid, oid);
}
+ inline bool is_used(const coll_t& cid) const {
+ //NB: not for use in multithreading mode!!!
+ return space_usage_tracker.is_used(cid);
+ }
+ inline bool is_used(const ghobject_t& oid) const {
+ //NB: not for use in multithreading mode!!!
+ return space_usage_tracker.is_used(oid);
+ }
+
const fsck_interval& get_misreferences() const {
+ //NB: not for use in multithreading mode!!!
return misreferenced_extents;
}
KeyValueDB::Transaction get_fix_misreferences_txn() {
+ //NB: not for use in multithreading mode!!!
return fix_misreferences_txn;
}
void* get_hint_for_log() const override {
return reinterpret_cast<void*>(LEVEL_LOG);
}
- void* get_hint_by_dir(const std::string& dirname) const override;
+ void* get_hint_by_dir(std::string_view dirname) const override;
void add_usage(void* hint, const bluefs_fnode_t& fnode) override {
if (hint == nullptr)
void HybridAllocator::init_rm_free(uint64_t offset, uint64_t length)
{
+ if (!length)
+ return;
std::lock_guard l(lock);
ldout(cct, 10) << __func__ << std::hex
<< " offset 0x" << offset
void StupidAllocator::init_add_free(uint64_t offset, uint64_t length)
{
+ if (!length)
+ return;
std::lock_guard l(lock);
ldout(cct, 10) << __func__ << " 0x" << std::hex << offset << "~" << length
<< std::dec << dendl;
void StupidAllocator::init_rm_free(uint64_t offset, uint64_t length)
{
+ if (!length)
+ return;
std::lock_guard l(lock);
ldout(cct, 10) << __func__ << " 0x" << std::hex << offset << "~" << length
<< std::dec << dendl;
using ceph::encode;
encode((__u8)OP_INIT, op_bl);
}
- void op_dir_create(const std::string& dir) {
+ void op_dir_create(std::string_view dir) {
using ceph::encode;
encode((__u8)OP_DIR_CREATE, op_bl);
encode(dir, op_bl);
}
- void op_dir_remove(const std::string& dir) {
+ void op_dir_remove(std::string_view dir) {
using ceph::encode;
encode((__u8)OP_DIR_REMOVE, op_bl);
encode(dir, op_bl);
}
- void op_dir_link(const std::string& dir, const std::string& file, uint64_t ino) {
+ void op_dir_link(std::string_view dir, std::string_view file, uint64_t ino) {
using ceph::encode;
encode((__u8)OP_DIR_LINK, op_bl);
encode(dir, op_bl);
encode(file, op_bl);
encode(ino, op_bl);
}
- void op_dir_unlink(const std::string& dir, const std::string& file) {
+ void op_dir_unlink(std::string_view dir, std::string_view file) {
using ceph::encode;
encode((__u8)OP_DIR_UNLINK, op_bl);
encode(dir, op_bl);
list<string> snaps;
char path[PATH_MAX];
struct dirent *de;
- while ((de = ::readdir(dir))) {
+ while (true) {
+ errno = 0;
+ de = ::readdir(dir);
+ if (de == nullptr) {
+ if (errno != 0) {
+ err = -errno;
+ dout(0) << "list_checkpoints: readdir '" << get_basedir_path() << "' failed: "
+ << cpp_strerror(err) << dendl;
+ }
+ break;
+ }
snprintf(path, sizeof(path), "%s/%s", get_basedir_path().c_str(), de->d_name);
struct stat st;
}
struct dirent *de = nullptr;
- while ((de = ::readdir(dir))) {
+ while (true) {
+ errno = 0;
+ de = ::readdir(dir);
+ if (de == nullptr) {
+ if (errno != 0) {
+ r = -errno;
+ derr << "readdir failed " << fn << ": " << cpp_strerror(-r) << dendl;
+ if (r == -EIO && m_filestore_fail_eio) handle_eio();
+ }
+ break;
+ }
if (de->d_type == DT_UNKNOWN) {
// d_type not supported (non-ext[234], btrfs), must stat
struct stat sb;
int r = 0;
int listed = 0;
bool end = true;
- while ((de = ::readdir(dir))) {
+ while (true) {
+ errno = 0;
+ de = ::readdir(dir);
+ if (de == nullptr) {
+ if (errno != 0) {
+ r = -errno;
+ dout(0) << "readdir failed " << to_list_path << ": "
+ << cpp_strerror(-r) << dendl;
+ goto cleanup;
+ }
+ break;
+ }
end = false;
if (max_objs > 0 && listed >= max_objs) {
break;
return -errno;
struct dirent *de = nullptr;
- while ((de = ::readdir(dir))) {
+ int r = 0;
+ while (true) {
+ errno = 0;
+ de = ::readdir(dir);
+ if (de == nullptr) {
+ if (errno != 0) {
+ r = -errno;
+ dout(0) << "readdir failed " << to_list_path << ": "
+ << cpp_strerror(-r) << dendl;
+ }
+ break;
+ }
string short_name(de->d_name);
string demangled_name;
if (lfn_is_subdir(short_name, &demangled_name)) {
}
::closedir(dir);
- return 0;
+ return r;
}
int LFNIndex::create_path(const vector<string> &to_create)
uint64_t adjust_used)
{
*pratio =
- ((float)new_stat.statfs.get_used()) / ((float)new_stat.statfs.total);
+ ((float)new_stat.statfs.get_used_raw()) / ((float)new_stat.statfs.total);
if (adjust_used) {
dout(20) << __func__ << " Before kb_used() " << new_stat.statfs.kb_used() << dendl;
if (backfill_adjusted) {
dout(20) << __func__ << " backfill adjusted " << new_stat << dendl;
}
- return ((float)new_stat.statfs.get_used()) / ((float)new_stat.statfs.total);
+ return ((float)new_stat.statfs.get_used_raw()) / ((float)new_stat.statfs.total);
}
void OSDService::send_message_osd_cluster(int peer, Message *m, epoch_t from_epoch)
this);
shards.push_back(one_shard);
}
+
+ // override some config options if mclock is enabled on all the shards
+ maybe_override_options_for_qos();
}
OSD::~OSD()
stale -= cct->_conf.get_val<int64_t>("osd_heartbeat_stale");
std::lock_guard l(heartbeat_lock);
for (auto it = heartbeat_peers.begin(); it != heartbeat_peers.end();) {
- HeartbeatInfo& hi = it->second;
+ auto& [peer, hi] = *it;
if (all || hi.is_stale(stale)) {
hi.clear_mark_down();
// stop sending failure_report to mon too
- failure_queue.erase(it->first);
- heartbeat_peers.erase(it++);
+ failure_queue.erase(peer);
+ failure_pending.erase(peer);
+ it = heartbeat_peers.erase(it);
} else {
- it++;
+ ++it;
}
}
}
void OSD::resched_all_scrubs()
{
dout(10) << __func__ << ": start" << dendl;
- OSDService::ScrubJob scrub_job;
- if (service.first_scrub_stamp(&scrub_job)) {
- do {
- dout(20) << __func__ << ": examine " << scrub_job.pgid << dendl;
-
- PGRef pg = _lookup_lock_pg(scrub_job.pgid);
+ const vector<spg_t> pgs = [this] {
+ vector<spg_t> pgs;
+ OSDService::ScrubJob job;
+ if (service.first_scrub_stamp(&job)) {
+ do {
+ pgs.push_back(job.pgid);
+ } while (service.next_scrub_stamp(job, &job));
+ }
+ return pgs;
+ }();
+ for (auto& pgid : pgs) {
+ dout(20) << __func__ << ": examine " << pgid << dendl;
+ PGRef pg = _lookup_lock_pg(pgid);
if (!pg)
continue;
if (!pg->m_planned_scrub.must_scrub && !pg->m_planned_scrub.need_auto) {
- dout(15) << __func__ << ": reschedule " << scrub_job.pgid << dendl;
+ dout(15) << __func__ << ": reschedule " << pgid << dendl;
pg->on_info_history_change();
}
pg->unlock();
- } while (service.next_scrub_stamp(scrub_job, &scrub_job));
}
dout(10) << __func__ << ": done" << dendl;
}
"osd_recovery_sleep_hdd",
"osd_recovery_sleep_ssd",
"osd_recovery_sleep_hybrid",
+ "osd_delete_sleep",
+ "osd_delete_sleep_hdd",
+ "osd_delete_sleep_ssd",
+ "osd_delete_sleep_hybrid",
+ "osd_snap_trim_sleep",
+ "osd_snap_trim_sleep_hdd",
+ "osd_snap_trim_sleep_ssd",
+ "osd_snap_trim_sleep_hybrid"
+ "osd_scrub_sleep",
"osd_recovery_max_active",
"osd_recovery_max_active_hdd",
"osd_recovery_max_active_ssd",
changed.count("osd_recovery_max_active") ||
changed.count("osd_recovery_max_active_hdd") ||
changed.count("osd_recovery_max_active_ssd")) {
- if (cct->_conf.get_val<std::string>("osd_op_queue") == "mclock_scheduler" &&
- cct->_conf.get_val<std::string>("osd_mclock_profile") != "custom") {
- // Set ceph config option to meet QoS goals
- // Set high value for recovery max active
- uint32_t recovery_max_active = 1000;
- if (cct->_conf->osd_recovery_max_active) {
- cct->_conf.set_val(
- "osd_recovery_max_active", std::to_string(recovery_max_active));
- }
- if (store_is_rotational) {
- cct->_conf.set_val(
- "osd_recovery_max_active_hdd", std::to_string(recovery_max_active));
- } else {
- cct->_conf.set_val(
- "osd_recovery_max_active_ssd", std::to_string(recovery_max_active));
- }
- // Set high value for osd_max_backfill
- cct->_conf.set_val("osd_max_backfills", std::to_string(1000));
-
- // Disable recovery sleep
- cct->_conf.set_val("osd_recovery_sleep", std::to_string(0));
- cct->_conf.set_val("osd_recovery_sleep_hdd", std::to_string(0));
- cct->_conf.set_val("osd_recovery_sleep_ssd", std::to_string(0));
- cct->_conf.set_val("osd_recovery_sleep_hybrid", std::to_string(0));
-
- // Disable delete sleep
- cct->_conf.set_val("osd_delete_sleep", std::to_string(0));
- cct->_conf.set_val("osd_delete_sleep_hdd", std::to_string(0));
- cct->_conf.set_val("osd_delete_sleep_ssd", std::to_string(0));
- cct->_conf.set_val("osd_delete_sleep_hybrid", std::to_string(0));
-
- // Disable snap trim sleep
- cct->_conf.set_val("osd_snap_trim_sleep", std::to_string(0));
- cct->_conf.set_val("osd_snap_trim_sleep_hdd", std::to_string(0));
- cct->_conf.set_val("osd_snap_trim_sleep_ssd", std::to_string(0));
- cct->_conf.set_val("osd_snap_trim_sleep_hybrid", std::to_string(0));
-
- // Disable scrub sleep
- cct->_conf.set_val("osd_scrub_sleep", std::to_string(0));
- } else {
+ if (!maybe_override_options_for_qos() &&
+ changed.count("osd_max_backfills")) {
+ // Scheduler is not "mclock". Fallback to earlier behavior
service.local_reserver.set_max(cct->_conf->osd_max_backfills);
service.remote_reserver.set_max(cct->_conf->osd_max_backfills);
}
}
}
+bool OSD::maybe_override_options_for_qos()
+{
+ // If the scheduler enabled is mclock, override the recovery, backfill
+ // and sleep options so that mclock can meet the QoS goals.
+ if (cct->_conf.get_val<std::string>("osd_op_queue") == "mclock_scheduler") {
+ dout(1) << __func__
+ << ": Changing recovery/backfill/sleep settings for QoS" << dendl;
+
+ // Set high value for recovery max active
+ uint32_t rec_max_active = 1000;
+ cct->_conf.set_val(
+ "osd_recovery_max_active", std::to_string(rec_max_active));
+ cct->_conf.set_val(
+ "osd_recovery_max_active_hdd", std::to_string(rec_max_active));
+ cct->_conf.set_val(
+ "osd_recovery_max_active_ssd", std::to_string(rec_max_active));
+
+ // Set high value for osd_max_backfill
+ uint32_t max_backfills = 1000;
+ cct->_conf.set_val("osd_max_backfills", std::to_string(max_backfills));
+ service.local_reserver.set_max(max_backfills);
+ service.remote_reserver.set_max(max_backfills);
+
+ // Disable recovery sleep
+ cct->_conf.set_val("osd_recovery_sleep", std::to_string(0));
+ cct->_conf.set_val("osd_recovery_sleep_hdd", std::to_string(0));
+ cct->_conf.set_val("osd_recovery_sleep_ssd", std::to_string(0));
+ cct->_conf.set_val("osd_recovery_sleep_hybrid", std::to_string(0));
+
+ // Disable delete sleep
+ cct->_conf.set_val("osd_delete_sleep", std::to_string(0));
+ cct->_conf.set_val("osd_delete_sleep_hdd", std::to_string(0));
+ cct->_conf.set_val("osd_delete_sleep_ssd", std::to_string(0));
+ cct->_conf.set_val("osd_delete_sleep_hybrid", std::to_string(0));
+
+ // Disable snap trim sleep
+ cct->_conf.set_val("osd_snap_trim_sleep", std::to_string(0));
+ cct->_conf.set_val("osd_snap_trim_sleep_hdd", std::to_string(0));
+ cct->_conf.set_val("osd_snap_trim_sleep_ssd", std::to_string(0));
+ cct->_conf.set_val("osd_snap_trim_sleep_hybrid", std::to_string(0));
+
+ // Disable scrub sleep
+ cct->_conf.set_val("osd_scrub_sleep", std::to_string(0));
+ return true;
+ }
+ return false;
+}
+
void OSD::update_log_config()
{
map<string,string> log_to_monitors;
std::lock_guard l(sched_scrub_lock);
if (sched_scrub_pg.empty())
return false;
- std::set<ScrubJob>::const_iterator iter = sched_scrub_pg.lower_bound(next);
- if (iter == sched_scrub_pg.cend())
- return false;
- ++iter;
+ std::set<ScrubJob>::const_iterator iter = sched_scrub_pg.upper_bound(next);
if (iter == sched_scrub_pg.cend())
return false;
*out = *iter;
std::vector<uint32_t> hb_front_min;
std::vector<uint32_t> hb_front_max;
- bool is_stale(utime_t stale) {
+ bool is_stale(utime_t stale) const {
if (ping_history.empty()) {
return false;
}
return oldest_deadline <= stale;
}
- bool is_unhealthy(utime_t now) {
+ bool is_unhealthy(utime_t now) const {
if (ping_history.empty()) {
/// we haven't sent a ping yet or we have got all replies,
/// in either way we are safe and healthy for now
return now > oldest_deadline;
}
- bool is_healthy(utime_t now) {
+ bool is_healthy(utime_t now) const {
if (last_rx_front == utime_t() || last_rx_back == utime_t()) {
// only declare to be healthy until we have received the first
// replies from both front/back connections
float get_osd_snap_trim_sleep();
int get_recovery_max_active();
+ bool maybe_override_options_for_qos();
void scrub_purged_snaps();
void probe_smart(const std::string& devid, std::ostream& ss);
target_v = 6;
}
if (change_stretch_mode) {
- ceph_assert(target_v >= 9);
target_v = std::max((uint8_t)10, target_v);
}
ENCODE_START(target_v, 1, bl); // extended, osd-only data
<< (is_active() ? ") <active>" : ") <not-active>")
<< (is_clean() ? " <clean>" : " <not-clean>") << dendl;
ceph_assert(ceph_mutex_is_locked(_lock));
- ceph_assert(!is_scrubbing());
+ if (m_scrubber && m_scrubber->is_scrub_active()) {
+ return false;
+ }
+
if (!is_primary() || !is_active() || !is_clean()) {
return false;
}
&olist,
&next);
if (!olist.empty()) {
- dout(0) << __func__ << " additional unexpected onode list"
- <<" (new onodes has appeared since PG removal started"
- << olist << dendl;
+ for (auto& oid : olist) {
+ if (oid == pgmeta_oid) {
+ dout(20) << __func__ << " removing pgmeta object " << oid << dendl;
+ } else {
+ dout(0) << __func__ << " additional unexpected onode"
+ <<" new onode has appeared since PG removal started"
+ << oid << dendl;
+ }
+ }
}
}
oi.size - op.extent.truncate_size);
ctx->modified_ranges.union_of(trim);
ctx->clean_regions.mark_data_region_dirty(op.extent.truncate_size, oi.size - op.extent.truncate_size);
+ oi.clear_data_digest();
}
if (op.extent.truncate_size != oi.size) {
truncate_update_size_and_usage(ctx->delta_stats,
last_backfill_started = hobject_t();
set<hobject_t>::iterator i = backfills_in_flight.begin();
while (i != backfills_in_flight.end()) {
- ceph_assert(recovering.count(*i));
backfills_in_flight.erase(i++);
}
void pg_stat_t::dump(Formatter *f) const
{
f->dump_stream("version") << version;
- f->dump_stream("reported_seq") << reported_seq;
- f->dump_stream("reported_epoch") << reported_epoch;
+ f->dump_unsigned("reported_seq", reported_seq);
+ f->dump_unsigned("reported_epoch", reported_epoch);
f->dump_string("state", pg_state_string(state));
f->dump_stream("last_fresh") << last_fresh;
f->dump_stream("last_change") << last_change;
// Set the mclock config parameters
set_profile_config();
- // Set recovery specific Ceph options
- set_global_recovery_options();
}
void mClockScheduler::set_profile_config()
std::to_string(best_effort.lim));
}
-void mClockScheduler::set_global_recovery_options()
-{
- // Set high value for recovery max active and max backfill
- int rec_max_active = 1000;
- int max_backfills = 1000;
- cct->_conf.set_val("osd_recovery_max_active", std::to_string(rec_max_active));
- cct->_conf.set_val("osd_max_backfills", std::to_string(max_backfills));
-
- // Disable recovery sleep
- cct->_conf.set_val("osd_recovery_sleep", std::to_string(0));
- cct->_conf.set_val("osd_recovery_sleep_hdd", std::to_string(0));
- cct->_conf.set_val("osd_recovery_sleep_ssd", std::to_string(0));
- cct->_conf.set_val("osd_recovery_sleep_hybrid", std::to_string(0));
-
- // Disable delete sleep
- cct->_conf.set_val("osd_delete_sleep", std::to_string(0));
- cct->_conf.set_val("osd_delete_sleep_hdd", std::to_string(0));
- cct->_conf.set_val("osd_delete_sleep_ssd", std::to_string(0));
- cct->_conf.set_val("osd_delete_sleep_hybrid", std::to_string(0));
-
- // Disable snap trim sleep
- cct->_conf.set_val("osd_snap_trim_sleep", std::to_string(0));
- cct->_conf.set_val("osd_snap_trim_sleep_hdd", std::to_string(0));
- cct->_conf.set_val("osd_snap_trim_sleep_ssd", std::to_string(0));
- cct->_conf.set_val("osd_snap_trim_sleep_hybrid", std::to_string(0));
-
- // Disable scrub sleep
- cct->_conf.set_val("osd_scrub_sleep", std::to_string(0));
-
- // Apply the changes
- cct->_conf.apply_changes(nullptr);
-}
-
int mClockScheduler::calc_scaled_cost(int item_cost)
{
// Calculate total scaled cost in secs
changed.count("osd_mclock_scheduler_client_lim") ||
changed.count("osd_mclock_scheduler_background_recovery_res") ||
changed.count("osd_mclock_scheduler_background_recovery_wgt") ||
- changed.count("osd_mclock_scheduler_background_recovery_lim")) {
+ changed.count("osd_mclock_scheduler_background_recovery_lim") ||
+ changed.count("osd_mclock_scheduler_background_best_effort_res") ||
+ changed.count("osd_mclock_scheduler_background_best_effort_wgt") ||
+ changed.count("osd_mclock_scheduler_background_best_effort_lim")) {
if (mclock_profile == "custom") {
client_registry.update_from_config(conf);
}
// Set mclock config parameter based on allocations
void set_profile_config();
- // Set recovery specific Ceph settings for profiles
- void set_global_recovery_options();
-
// Calculate scale cost per item
int calc_scaled_cost(int cost);
return sigdict
-def validate_one(word, desc, partial=False):
+def validate_one(word, desc, is_kwarg, partial=False):
"""
- validate_one(word, desc, partial=False)
+ validate_one(word, desc, is_kwarg, partial=False)
validate word against the constructed instance of the type
in desc. May raise exception. If it returns false (and doesn't
raise an exception), desc.instance.val will
contain the validated value (in the appropriate type).
"""
- desc.instance.valid(word, partial)
+ vals = []
+ # CephString option might contain "," in it
+ allow_csv = is_kwarg or desc.t is not CephString
+ if desc.N and allow_csv:
+ for part in word.split(','):
+ desc.instance.valid(part, partial)
+ vals.append(desc.instance.val)
+ else:
+ desc.instance.valid(word, partial)
+ vals.append(desc.instance.val)
desc.numseen += 1
if desc.N:
desc.n = desc.numseen + 1
+ return vals
def matchnum(args, signature, partial=False):
# only allow partial matching if we're on the last supplied
# word; avoid matching foo bar and foot bar just because
# partial is set
- validate_one(word, desc, partial and (len(words) == 0))
+ validate_one(word, desc, False, partial and (len(words) == 0))
valid = True
except ArgumentError:
# matchnum doesn't care about type of error
return matchcnt
-ValidatedArgs = Dict[str, Union[bool, int, float, str,
- Tuple[str, str],
- Sequence[str]]]
+ValidatedArg = Union[bool, int, float, str,
+ Tuple[str, str],
+ Sequence[str]]
+ValidatedArgs = Dict[str, ValidatedArg]
-def store_arg(desc: argdesc, d: ValidatedArgs):
+def store_arg(desc: argdesc, args: List[ValidatedArg], d: ValidatedArgs):
'''
Store argument described by, and held in, thanks to valid(),
desc into the dictionary d, keyed by desc.name. Three cases:
- 1) desc.N is set: value in d is a list
+ 1) desc.N is set: use args for arg value in "d", desc.instance.val
+ only contains the last parsed arg in the "args" list
2) prefix: multiple args are joined with ' ' into one d{} item
3) single prefix or other arg: store as simple value
if desc.N:
# value should be a list
if desc.name in d:
- d[desc.name] += [desc.instance.val]
+ d[desc.name] += args
else:
- d[desc.name] = [desc.instance.val]
+ d[desc.name] = args
elif (desc.t == CephPrefix) and (desc.name in d):
# prefixes' values should be a space-joined concatenation
d[desc.name] += ' ' + desc.instance.val
kwarg_desc = None
if kwarg_desc:
- validate_one(kwarg_v, kwarg_desc)
+ args = validate_one(kwarg_v, kwarg_desc, True)
matchcnt += 1
- store_arg(kwarg_desc, d)
+ store_arg(kwarg_desc, args, d)
continue
# Don't handle something as a positional argument if it
# Have an arg; validate it
try:
- validate_one(myarg, desc)
+ args = validate_one(myarg, desc, False)
except ArgumentError as e:
# argument mismatch
if not desc.req:
# Whew, valid arg acquired. Store in dict
matchcnt += 1
- store_arg(desc, d)
+ store_arg(desc, args, d)
# Clear prior exception
save_exception = None
raise ValueError("group ID cannot end with '{0}'.".format(
META_FILE_EXT))
path = self._get_group_path(group_id)
- self._mkdir_p(path, mode)
+ self.fs.mkdirs(path, mode)
def destroy_group(self, group_id):
path = self._get_group_path(group_id)
else:
self.fs.rmdir(path)
- def _mkdir_p(self, path, mode=0o755):
- try:
- self.fs.stat(path)
- except cephfs.ObjectNotFound:
- pass
- else:
- return
-
- parts = path.split(os.path.sep)
-
- for i in range(1, len(parts) + 1):
- subpath = os.path.join(*parts[0:i])
- try:
- self.fs.stat(subpath)
- except cephfs.ObjectNotFound:
- self.fs.mkdir(subpath, mode)
-
def create_volume(self, volume_path, size=None, data_isolated=False, namespace_isolated=True,
mode=0o755):
"""
path = self._get_path(volume_path)
log.info("create_volume: {0}".format(path))
- self._mkdir_p(path, mode)
+ self.fs.mkdirs(path, mode)
if size is not None:
self.fs.setxattr(path, 'ceph.quota.max_bytes', to_bytes(size), 0)
# Create the trash folder if it doesn't already exist
trash = os.path.join(self.volume_prefix, "_deleting")
- self._mkdir_p(trash)
+ self.fs.mkdirs(trash, 0o755)
# We'll move it to here
trashed_volume = os.path.join(trash, volume_path.volume_id)
void ceph_shutdown(ceph_mount_info *cmount)
int ceph_getaddrs(ceph_mount_info* cmount, char** addrs)
+ int64_t ceph_get_fs_cid(ceph_mount_info *cmount)
int ceph_conf_read_file(ceph_mount_info *cmount, const char *path_list)
int ceph_conf_parse_argv(ceph_mount_info *cmount, int argc, const char **argv)
int ceph_conf_get(ceph_mount_info *cmount, const char *option, char *buf, size_t len)
int ceph_conf_set(ceph_mount_info *cmount, const char *option, const char *value)
+ int ceph_set_mount_timeout(ceph_mount_info *cmount, uint32_t timeout)
int ceph_mount(ceph_mount_info *cmount, const char *root)
int ceph_select_filesystem(ceph_mount_info *cmount, const char *fs_name)
for key, value in conf.items():
self.conf_set(key, value)
+ def get_fscid(self):
+ """
+ Return the file system id for this fs client.
+ """
+ self.require_state("mounted")
+ with nogil:
+ ret = ceph_get_fs_cid(self.cluster)
+ if ret < 0:
+ raise make_ex(ret, "error fetching fscid")
+ return ret
+
def get_addrs(self):
"""
Get associated client addresses with this RADOS session.
if ret != 0:
raise make_ex(ret, "error calling conf_set")
+ def set_mount_timeout(self, timeout):
+ """
+ Set mount timeout
+
+ :param timeout: mount timeout
+ """
+ self.require_state("configuring", "initialized")
+ if not isinstance(timeout, int):
+ raise TypeError('timeout must be an integer')
+ if timeout < 0:
+ raise make_ex(CEPHFS_EINVAL, 'timeout must be greater than or equal to 0')
+ cdef:
+ uint32_t _timeout = timeout
+ with nogil:
+ ret = ceph_set_mount_timeout(self.cluster, _timeout)
+ if ret != 0:
+ raise make_ex(ret, "error setting mount timeout")
+
def init(self):
"""
Initialize the filesystem client (but do not mount the filesystem yet)
int ceph_getaddrs(ceph_mount_info* cmount, char** addrs):
pass
+ int64_t ceph_get_fs_cid(ceph_mount_info *cmount):
+ pass
int ceph_conf_read_file(ceph_mount_info *cmount, const char *path_list):
pass
int ceph_conf_parse_argv(ceph_mount_info *cmount, int argc, const char **argv):
pass
int ceph_conf_set(ceph_mount_info *cmount, const char *option, const char *value):
pass
+ int ceph_set_mount_timeout(ceph_mount_info *cmount, uint32_t timeout):
+ pass
int ceph_mount(ceph_mount_info *cmount, const char *root):
pass
def _dump(self):...
def _get_item_weight(self, item):...
def _get_item_name(self, item):...
+ def _find_roots(self):...
def _find_takes(self):...
def _get_take_weight_osd_map(self, root):...
class BaseMgrStandbyModule(object):
def __init__(self, capsule): pass
+ def _ceph_get(self, data_name: str) -> Dict[str, Any]: ...
def _ceph_get_mgr_id(self):...
def _ceph_get_module_option(self, key, prefix=None):...
def _ceph_get_option(self, key):...
inbuf: Optional[str]) -> None: ...
def _ceph_set_health_checks(self, checks: Mapping[str, HealthCheckT]) -> None: ...
def _ceph_get_mgr_id(self) -> str: ...
+ def _ceph_get_ceph_conf_path(self) -> str: ...
def _ceph_get_option(self, key: str) -> OptionValue: ...
def _ceph_get_foreign_option(self, entity: str, key: str) -> OptionValue: ...
def _ceph_get_module_option(self,
--- /dev/null
+import logging
+from typing import List, Optional, Callable, Any, Tuple
+
+from orchestrator._interface import DaemonDescription
+
+logger = logging.getLogger(__name__)
+
+
+class MemoryAutotuner(object):
+
+ min_size_by_type = {
+ 'mds': 4096 * 1048576,
+ 'mgr': 4096 * 1048576,
+ 'mon': 1024 * 1048576,
+ 'crash': 128 * 1048576,
+ 'keepalived': 128 * 1048576,
+ 'haproxy': 128 * 1048576,
+ }
+ default_size = 1024 * 1048576
+
+ def __init__(
+ self,
+ daemons: List[DaemonDescription],
+ config_get: Callable[[str, str], Any],
+ total_mem: int,
+ ):
+ self.daemons = daemons
+ self.config_get = config_get
+ self.total_mem = total_mem
+
+ def tune(self) -> Tuple[Optional[int], List[str]]:
+ tuned_osds: List[str] = []
+ total = self.total_mem
+ for d in self.daemons:
+ if d.daemon_type == 'mds':
+ total -= self.config_get(d.name(), 'mds_cache_memory_limit')
+ continue
+ if d.daemon_type != 'osd':
+ assert d.daemon_type
+ total -= max(
+ self.min_size_by_type.get(d.daemon_type, self.default_size),
+ d.memory_usage or 0
+ )
+ continue
+ if not self.config_get(d.name(), 'osd_memory_target_autotune'):
+ total -= self.config_get(d.name(), 'osd_memory_target')
+ continue
+ tuned_osds.append(d.name())
+ if total < 0:
+ return None, []
+ if not tuned_osds:
+ return None, []
+ per = total // len(tuned_osds)
+ return int(per), tuned_osds
import datetime
from copy import copy
+import ipaddress
import json
import logging
+import socket
from typing import TYPE_CHECKING, Dict, List, Iterator, Optional, Any, Tuple, Set, Mapping, cast, \
- NamedTuple
+ NamedTuple, Type
import orchestrator
from ceph.deployment import inventory
-from ceph.deployment.service_spec import ServiceSpec
+from ceph.deployment.service_spec import ServiceSpec, PlacementSpec
from ceph.utils import str_to_datetime, datetime_to_str, datetime_now
from orchestrator import OrchestratorError, HostSpec, OrchestratorEvent, service_to_daemon_types
+from .utils import resolve_ip
+
if TYPE_CHECKING:
from .module import CephadmOrchestrator
def __init__(self, mgr: 'CephadmOrchestrator'):
self.mgr = mgr
+ adjusted_addrs = False
+
+ def is_valid_ip(ip: str) -> bool:
+ try:
+ ipaddress.ip_address(ip)
+ return True
+ except ValueError:
+ return False
+
# load inventory
i = self.mgr.get_store('inventory')
if i:
for k, v in self._inventory.items():
if 'hostname' not in v:
v['hostname'] = k
+
+ # convert legacy non-IP addr?
+ if is_valid_ip(str(v.get('addr'))):
+ continue
+ if len(self._inventory) > 1:
+ if k == socket.gethostname():
+ # Never try to resolve our own host! This is
+ # fraught and can lead to either a loopback
+ # address (due to podman's futzing with
+ # /etc/hosts) or a private IP based on the CNI
+ # configuration. Instead, wait until the mgr
+ # fails over to another host and let them resolve
+ # this host.
+ continue
+ ip = resolve_ip(cast(str, v.get('addr')))
+ else:
+ # we only have 1 node in the cluster, so we can't
+ # rely on another host doing the lookup. use the
+ # IP the mgr binds to.
+ ip = self.mgr.get_mgr_ip()
+ if is_valid_ip(ip) and not ip.startswith('127.0.'):
+ self.mgr.log.info(
+ f"inventory: adjusted host {v['hostname']} addr '{v['addr']}' -> '{ip}'"
+ )
+ v['addr'] = ip
+ adjusted_addrs = True
+ if adjusted_addrs:
+ self.save()
else:
self._inventory = dict()
logger.debug('Loaded inventory %s' % self._inventory)
self._inventory[host]['labels'].remove(label)
self.save()
+ def has_label(self, host: str, label: str) -> bool:
+ return (
+ host in self._inventory
+ and label in self._inventory[host].get('labels', [])
+ )
+
def get_addr(self, host: str) -> str:
self.assert_host(host)
return self._inventory[host].get('addr', host)
class SpecDescription(NamedTuple):
spec: ServiceSpec
+ rank_map: Optional[Dict[int, Dict[int, Optional[str]]]]
created: datetime.datetime
deleted: Optional[datetime.datetime]
# type: (CephadmOrchestrator) -> None
self.mgr = mgr
self._specs = {} # type: Dict[str, ServiceSpec]
+ # service_name -> rank -> gen -> daemon_id
+ self._rank_maps = {} # type: Dict[str, Dict[int, Dict[int, Optional[str]]]]
self.spec_created = {} # type: Dict[str, datetime.datetime]
self.spec_deleted = {} # type: Dict[str, datetime.datetime]
self.spec_preview = {} # type: Dict[str, ServiceSpec]
if name not in self._specs:
raise OrchestratorError(f'Service {name} not found.')
return SpecDescription(self._specs[name],
+ self._rank_maps.get(name),
self.spec_created[name],
self.spec_deleted.get(name, None))
self._specs[service_name] = spec
self.spec_created[service_name] = created
- if 'deleted' in v:
+ if 'deleted' in j:
deleted = str_to_datetime(cast(str, j['deleted']))
self.spec_deleted[service_name] = deleted
+ if 'rank_map' in j and isinstance(j['rank_map'], dict):
+ self._rank_maps[service_name] = {}
+ for rank_str, m in j['rank_map'].items():
+ try:
+ rank = int(rank_str)
+ except ValueError:
+ logger.exception(f"failed to parse rank in {j['rank_map']}")
+ continue
+ if isinstance(m, dict):
+ self._rank_maps[service_name][rank] = {}
+ for gen_str, name in m.items():
+ try:
+ gen = int(gen_str)
+ except ValueError:
+ logger.exception(f"failed to parse gen in {j['rank_map']}")
+ continue
+ if isinstance(name, str) or m is None:
+ self._rank_maps[service_name][rank][gen] = name
+
self.mgr.log.debug('SpecStore: loaded spec for %s' % (
service_name))
except Exception as e:
service_name, e))
pass
- def save(self, spec: ServiceSpec, update_create: bool = True) -> None:
+ def save(
+ self,
+ spec: ServiceSpec,
+ update_create: bool = True,
+ ) -> None:
name = spec.service_name()
if spec.preview_only:
self.spec_preview[name] = spec
if update_create:
self.spec_created[name] = datetime_now()
+ self._save(name)
- data = {
- 'spec': spec.to_json(),
+ def save_rank_map(self,
+ name: str,
+ rank_map: Dict[int, Dict[int, Optional[str]]]) -> None:
+ self._rank_maps[name] = rank_map
+ self._save(name)
+
+ def _save(self, name: str) -> None:
+ data: Dict[str, Any] = {
+ 'spec': self._specs[name].to_json(),
'created': datetime_to_str(self.spec_created[name]),
}
+ if name in self._rank_maps:
+ data['rank_map'] = self._rank_maps[name]
if name in self.spec_deleted:
data['deleted'] = datetime_to_str(self.spec_deleted[name])
SPEC_STORE_PREFIX + name,
json.dumps(data, sort_keys=True),
)
- self.mgr.events.for_service(spec, OrchestratorEvent.INFO, 'service was created')
+ self.mgr.events.for_service(self._specs[name],
+ OrchestratorEvent.INFO,
+ 'service was created')
def rm(self, service_name: str) -> bool:
if service_name not in self._specs:
found = service_name in self._specs
if found:
del self._specs[service_name]
+ if service_name in self._rank_maps:
+ del self._rank_maps[service_name]
del self.spec_created[service_name]
if service_name in self.spec_deleted:
del self.spec_deleted[service_name]
return self.spec_created.get(spec.service_name())
+class ClientKeyringSpec(object):
+ """
+ A client keyring file that we should maintain
+ """
+
+ def __init__(
+ self,
+ entity: str,
+ placement: PlacementSpec,
+ mode: Optional[int] = None,
+ uid: Optional[int] = None,
+ gid: Optional[int] = None,
+ ) -> None:
+ self.entity = entity
+ self.placement = placement
+ self.mode = mode or 0o600
+ self.uid = uid or 0
+ self.gid = gid or 0
+
+ def validate(self) -> None:
+ pass
+
+ def to_json(self) -> Dict[str, Any]:
+ return {
+ 'entity': self.entity,
+ 'placement': self.placement.to_json(),
+ 'mode': self.mode,
+ 'uid': self.uid,
+ 'gid': self.gid,
+ }
+
+ @property
+ def path(self) -> str:
+ return f'/etc/ceph/ceph.{self.entity}.keyring'
+
+ @classmethod
+ def from_json(cls: Type, data: dict) -> 'ClientKeyringSpec':
+ c = data.copy()
+ if 'placement' in c:
+ c['placement'] = PlacementSpec.from_json(c['placement'])
+ _cls = cls(**c)
+ _cls.validate()
+ return _cls
+
+
+class ClientKeyringStore():
+ """
+ Track client keyring files that we are supposed to maintain
+ """
+
+ def __init__(self, mgr):
+ # type: (CephadmOrchestrator) -> None
+ self.mgr: CephadmOrchestrator = mgr
+ self.mgr = mgr
+ self.keys: Dict[str, ClientKeyringSpec] = {}
+
+ def load(self) -> None:
+ c = self.mgr.get_store('client_keyrings') or b'{}'
+ j = json.loads(c)
+ for e, d in j.items():
+ self.keys[e] = ClientKeyringSpec.from_json(d)
+
+ def save(self) -> None:
+ data = {
+ k: v.to_json() for k, v in self.keys.items()
+ }
+ self.mgr.set_store('client_keyrings', json.dumps(data))
+
+ def update(self, ks: ClientKeyringSpec) -> None:
+ self.keys[ks.entity] = ks
+ self.save()
+
+ def rm(self, entity: str) -> None:
+ if entity in self.keys:
+ del self.keys[entity]
+ self.save()
+
+
class HostCache():
"""
HostCache stores different things:
This is needed in order to deploy MONs. As this is mostly read-only.
- 4. `last_etc_ceph_ceph_conf` O(hosts)
+ 4. `last_client_files` O(hosts)
- Stores the last refresh time for the /etc/ceph/ceph.conf. Used
- to avoid deploying new configs when failing over to a new mgr.
+ Stores the last digest and owner/mode for files we've pushed to /etc/ceph
+ (ceph.conf or client keyrings).
5. `scheduled_daemon_actions`: O(daemons)
self.devices = {} # type: Dict[str, List[inventory.Device]]
self.facts = {} # type: Dict[str, Dict[str, Any]]
self.last_facts_update = {} # type: Dict[str, datetime.datetime]
+ self.last_autotune = {} # type: Dict[str, datetime.datetime]
self.osdspec_previews = {} # type: Dict[str, List[Dict[str, Any]]]
self.osdspec_last_applied = {} # type: Dict[str, Dict[str, datetime.datetime]]
self.networks = {} # type: Dict[str, Dict[str, Dict[str, List[str]]]]
self.daemon_config_deps = {} # type: Dict[str, Dict[str, Dict[str,Any]]]
self.last_host_check = {} # type: Dict[str, datetime.datetime]
self.loading_osdspec_preview = set() # type: Set[str]
- self.last_etc_ceph_ceph_conf: Dict[str, datetime.datetime] = {}
+ self.last_client_files: Dict[str, Dict[str, Tuple[str, int, int, int]]] = {}
self.registry_login_queue: Set[str] = set()
self.scheduled_daemon_actions: Dict[str, Dict[str, str]] = {}
self.devices[host].append(inventory.Device.from_json(d))
self.networks[host] = j.get('networks_and_interfaces', {})
self.osdspec_previews[host] = j.get('osdspec_previews', {})
+ self.last_client_files[host] = j.get('last_client_files', {})
for name, ts in j.get('osdspec_last_applied', {}).items():
self.osdspec_last_applied[host][name] = str_to_datetime(ts)
}
if 'last_host_check' in j:
self.last_host_check[host] = str_to_datetime(j['last_host_check'])
- if 'last_etc_ceph_ceph_conf' in j:
- self.last_etc_ceph_ceph_conf[host] = str_to_datetime(
- j['last_etc_ceph_ceph_conf'])
self.registry_login_queue.add(host)
self.scheduled_daemon_actions[host] = j.get('scheduled_daemon_actions', {})
self.facts[host] = facts
self.last_facts_update[host] = datetime_now()
+ def update_autotune(self, host: str) -> None:
+ self.last_autotune[host] = datetime_now()
+
+ def invalidate_autotune(self, host: str) -> None:
+ if host in self.last_autotune:
+ del self.last_autotune[host]
+
def devices_changed(self, host: str, b: List[inventory.Device]) -> bool:
a = self.devices[host]
if len(a) != len(b):
# type: (str, str, datetime.datetime) -> None
self.osdspec_last_applied[host][service_name] = ts
+ def update_client_file(self,
+ host: str,
+ path: str,
+ digest: str,
+ mode: int,
+ uid: int,
+ gid: int) -> None:
+ if host not in self.last_client_files:
+ self.last_client_files[host] = {}
+ self.last_client_files[host][path] = (digest, mode, uid, gid)
+
+ def removed_client_file(self, host: str, path: str) -> None:
+ if (
+ host in self.last_client_files
+ and path in self.last_client_files[host]
+ ):
+ del self.last_client_files[host][path]
+
def prime_empty_host(self, host):
# type: (str) -> None
"""
self.device_refresh_queue.append(host)
self.osdspec_previews_refresh_queue.append(host)
self.registry_login_queue.add(host)
+ self.last_client_files[host] = {}
def invalidate_host_daemons(self, host):
# type: (str) -> None
if host in self.last_host_check:
j['last_host_check'] = datetime_to_str(self.last_host_check[host])
- if host in self.last_etc_ceph_ceph_conf:
- j['last_etc_ceph_ceph_conf'] = datetime_to_str(self.last_etc_ceph_ceph_conf[host])
+ if host in self.last_client_files:
+ j['last_client_files'] = self.last_client_files[host]
if host in self.scheduled_daemon_actions:
j['scheduled_daemon_actions'] = self.scheduled_daemon_actions[host]
del self.facts[host]
if host in self.last_facts_update:
del self.last_facts_update[host]
+ if host in self.last_autotune:
+ del self.last_autotune[host]
if host in self.osdspec_previews:
del self.osdspec_previews[host]
if host in self.osdspec_last_applied:
del self.daemon_config_deps[host]
if host in self.scheduled_daemon_actions:
del self.scheduled_daemon_actions[host]
+ if host in self.last_client_files:
+ del self.last_client_files[host]
self.mgr.set_store(HOST_CACHE_PREFIX + host, None)
def get_hosts(self):
r.append(host)
return r
+ def get_facts(self, host: str) -> Dict[str, Any]:
+ return self.facts.get(host, {})
+
def get_daemons(self):
# type: () -> List[orchestrator.DaemonDescription]
r = []
r.append(dd)
return r
+ def get_daemons_by_host(self, host: str) -> List[orchestrator.DaemonDescription]:
+ return list(self.daemons.get(host, {}).values())
+
def get_daemon(self, daemon_name: str) -> orchestrator.DaemonDescription:
assert not daemon_name.startswith('ha-rgw.')
for _, dm in self.daemons.items():
if host in self.mgr.offline_hosts:
dd.status = orchestrator.DaemonDescriptionStatus.error
dd.status_desc = 'host is offline'
+ elif self.mgr.inventory._inventory[host].get("status", "").lower() == "maintenance":
+ # We do not refresh daemons on hosts in maintenance mode, so stored daemon statuses
+ # could be wrong. We must assume maintenance is working and daemons are stopped
+ dd.status = orchestrator.DaemonDescriptionStatus.stopped
+ dd.status_desc = 'stopped'
dd.events = self.mgr.events.get_for_daemon(dd.name())
return dd
self.daemon_config_deps[host][name].get('last_config', None)
return None, None
+ def get_host_client_files(self, host: str) -> Dict[str, Tuple[str, int, int, int]]:
+ return self.last_client_files.get(host, {})
+
def host_needs_daemon_refresh(self, host):
# type: (str) -> bool
if host in self.mgr.offline_hosts:
return True
return False
+ def host_needs_autotune_memory(self, host):
+ # type: (str) -> bool
+ if host in self.mgr.offline_hosts:
+ logger.debug(f'Host "{host}" marked as offline. Skipping autotune')
+ return False
+ cutoff = datetime_now() - datetime.timedelta(
+ seconds=self.mgr.autotune_interval)
+ if host not in self.last_autotune or self.last_autotune[host] < cutoff:
+ return True
+ return False
+
def host_had_daemon_refresh(self, host: str) -> bool:
"""
... at least once.
seconds=self.mgr.host_check_interval)
return host not in self.last_host_check or self.last_host_check[host] < cutoff
- def host_needs_new_etc_ceph_ceph_conf(self, host: str) -> bool:
- if not self.mgr.manage_etc_ceph_ceph_conf:
- return False
- if self.mgr.paused:
- return False
- if host in self.mgr.offline_hosts:
- return False
- if not self.mgr.last_monmap:
- return False
- if host not in self.last_etc_ceph_ceph_conf:
- return True
- if self.mgr.last_monmap > self.last_etc_ceph_ceph_conf[host]:
- return True
- if self.mgr.extra_ceph_conf_is_newer(self.last_etc_ceph_ceph_conf[host]):
- return True
- # already up to date:
- return False
-
def osdspec_needs_apply(self, host: str, spec: ServiceSpec) -> bool:
if (
host not in self.devices
return True
return self.osdspec_last_applied[host][spec.service_name()] < self.last_device_change[host]
- def update_last_etc_ceph_ceph_conf(self, host: str) -> None:
- if not self.mgr.last_monmap:
- return
- self.last_etc_ceph_ceph_conf[host] = datetime_now()
-
def host_needs_registry_login(self, host: str) -> bool:
if host in self.mgr.offline_hosts:
return False
NodeExporterService
from .services.exporter import CephadmExporter, CephadmExporterConfig
from .schedule import HostAssignment
-from .inventory import Inventory, SpecStore, HostCache, EventStore
+from .inventory import Inventory, SpecStore, HostCache, EventStore, ClientKeyringStore, ClientKeyringSpec
from .upgrade import CephadmUpgrade
from .template import TemplateMgr
from .utils import CEPH_TYPES, GATEWAY_TYPES, forall_hosts, cephadmNoImage
DEFAULT_NODE_EXPORTER_IMAGE = 'docker.io/prom/node-exporter:v0.18.1'
DEFAULT_GRAFANA_IMAGE = 'docker.io/ceph/ceph-grafana:6.7.4'
DEFAULT_ALERT_MANAGER_IMAGE = 'docker.io/prom/alertmanager:v0.20.0'
+DEFAULT_HAPROXY_IMAGE = 'docker.io/library/haproxy:2.3'
# ------------------------------------------------------------------------------
),
Option(
'container_image_haproxy',
- default='haproxy',
+ default=DEFAULT_HAPROXY_IMAGE,
desc='HAproxy container image',
),
Option(
default=False,
desc='Manage and own /etc/ceph/ceph.conf on the hosts.',
),
+ Option(
+ 'manage_etc_ceph_ceph_conf_hosts',
+ type='str',
+ default='*',
+ desc='PlacementSpec describing on which hosts to manage /etc/ceph/ceph.conf',
+ ),
Option(
'registry_url',
type='str',
default=10,
desc='max number of daemons per service per host',
),
+ Option(
+ 'autotune_memory_target_ratio',
+ type='float',
+ default=.7,
+ desc='ratio of total system memory to divide amongst autotuned daemons'
+ ),
+ Option(
+ 'autotune_interval',
+ type='secs',
+ default=10 * 60,
+ desc='how frequently to autotune daemon memory'
+ ),
]
def __init__(self, *args: Any, **kwargs: Any):
self.migration_current: Optional[int] = None
self.config_dashboard = True
self.manage_etc_ceph_ceph_conf = True
+ self.manage_etc_ceph_ceph_conf_hosts = '*'
self.registry_url: Optional[str] = None
self.registry_username: Optional[str] = None
self.registry_password: Optional[str] = None
self.use_repo_digest = True
self.default_registry = ''
+ self.autotune_memory_target_ratio = 0.0
+ self.autotune_interval = 0
self._cons: Dict[str, Tuple[remoto.backends.BaseConnection,
remoto.backends.LegacyModuleExecute]] = {}
self.spec_store = SpecStore(self)
self.spec_store.load()
+ self.keys = ClientKeyringStore(self)
+ self.keys.load()
+
# ensure the host lists are in sync
for h in self.inventory.keys():
if h not in self.cache.daemons:
# cephadm
self._kick_serve_loop()
- def get_unique_name(self, daemon_type, host, existing, prefix=None,
- forcename=None):
- # type: (str, str, List[orchestrator.DaemonDescription], Optional[str], Optional[str]) -> str
+ def get_unique_name(
+ self,
+ daemon_type: str,
+ host: str,
+ existing: List[orchestrator.DaemonDescription],
+ prefix: Optional[str] = None,
+ forcename: Optional[str] = None,
+ rank: Optional[int] = None,
+ rank_generation: Optional[int] = None,
+ ) -> str:
"""
Generate a unique random service name
"""
suffix = daemon_type not in [
- 'mon', 'crash', 'nfs',
+ 'mon', 'crash',
'prometheus', 'node-exporter', 'grafana', 'alertmanager',
'container', 'cephadm-exporter',
]
name = prefix + '.'
else:
name = ''
+ if rank is not None and rank_generation is not None:
+ name += f'{rank}.{rank_generation}.'
name += host
if suffix:
name += '.' + ''.join(random.choice(string.ascii_lowercase)
return True, err, ret
+ def _validate_and_set_ssh_val(self, what: str, new: Optional[str], old: Optional[str]) -> None:
+ self.set_store(what, new)
+ self._reconfig_ssh()
+ if self.cache.get_hosts():
+ # Can't check anything without hosts
+ host = self.cache.get_hosts()[0]
+ r = CephadmServe(self)._check_host(host)
+ if r is not None:
+ # connection failed reset user
+ self.set_store(what, old)
+ self._reconfig_ssh()
+ raise OrchestratorError('ssh connection %s@%s failed' % (self.ssh_user, host))
+ self.log.info(f'Set ssh {what}')
+
@orchestrator._cli_write_command(
prefix='cephadm set-ssh-config')
def _set_ssh_config(self, inbuf: Optional[str] = None) -> Tuple[int, str, str]:
"""
# Set an ssh_config file provided from stdin
- if inbuf == self.ssh_config:
+ old = self.ssh_config
+ if inbuf == old:
return 0, "value unchanged", ""
self.validate_ssh_config_content(inbuf)
- self.set_store("ssh_config", inbuf)
- self.log.info('Set ssh_config')
- self._reconfig_ssh()
+ self._validate_and_set_ssh_val('ssh_config', inbuf, old)
return 0, "", ""
@orchestrator._cli_write_command('cephadm clear-ssh-config')
"""Set cluster SSH private key (use -i <private_key>)"""
if inbuf is None or len(inbuf) == 0:
return -errno.EINVAL, "", "empty private ssh key provided"
- if inbuf == self.ssh_key:
+ old = self.ssh_key
+ if inbuf == old:
return 0, "value unchanged", ""
- self.set_store("ssh_identity_key", inbuf)
+ self._validate_and_set_ssh_val('ssh_identity_key', inbuf, old)
self.log.info('Set ssh private key')
- self._reconfig_ssh()
return 0, "", ""
@orchestrator._cli_write_command(
"""Set cluster SSH public key (use -i <public_key>)"""
if inbuf is None or len(inbuf) == 0:
return -errno.EINVAL, "", "empty public ssh key provided"
- if inbuf == self.ssh_pub:
+ old = self.ssh_pub
+ if inbuf == old:
return 0, "value unchanged", ""
- self.set_store("ssh_identity_pub", inbuf)
- self.log.info('Set ssh public key')
- self._reconfig_ssh()
+ self._validate_and_set_ssh_val('ssh_identity_pub', inbuf, old)
return 0, "", ""
@orchestrator._cli_write_command(
if user == current_user:
return 0, "value unchanged", ""
- self.set_store('ssh_user', user)
- self._reconfig_ssh()
-
- host = self.cache.get_hosts()[0]
- r = CephadmServe(self)._check_host(host)
- if r is not None:
- # connection failed reset user
- self.set_store('ssh_user', current_user)
- self._reconfig_ssh()
- return -errno.EINVAL, '', 'ssh connection %s@%s failed' % (user, host)
+ self._validate_and_set_ssh_val('ssh_user', user, current_user)
msg = 'ssh user set to %s' % user
if user != 'root':
- msg += ' sudo will be used'
+ msg += '. sudo will be used'
self.log.info(msg)
return 0, msg, ''
return HandleCommandResult(stdout='\n'.join(run(host)))
+ @orchestrator._cli_read_command('orch client-keyring ls')
+ def _client_keyring_ls(self, format: Format = Format.plain) -> HandleCommandResult:
+ if format != Format.plain:
+ output = to_format(self.keys.keys.values(), format, many=True, cls=ClientKeyringSpec)
+ else:
+ table = PrettyTable(
+ ['ENTITY', 'PLACEMENT', 'MODE', 'OWNER', 'PATH'],
+ border=False)
+ table.align = 'l'
+ table.left_padding_width = 0
+ table.right_padding_width = 2
+ for ks in sorted(self.keys.keys.values(), key=lambda ks: ks.entity):
+ table.add_row((
+ ks.entity, ks.placement.pretty_str(),
+ utils.file_mode_to_str(ks.mode),
+ f'{ks.uid}:{ks.gid}',
+ ks.path,
+ ))
+ output = table.get_string()
+ return HandleCommandResult(stdout=output)
+
+ @orchestrator._cli_write_command('orch client-keyring set')
+ def _client_keyring_set(
+ self,
+ entity: str,
+ placement: str,
+ owner: Optional[str] = None,
+ mode: Optional[str] = None,
+ ) -> HandleCommandResult:
+ if not entity.startswith('client.'):
+ raise OrchestratorError('entity must start with client.')
+ if owner:
+ try:
+ uid, gid = map(int, owner.split(':'))
+ except Exception:
+ raise OrchestratorError('owner must look like "<uid>:<gid>", e.g., "0:0"')
+ else:
+ uid = 0
+ gid = 0
+ if mode:
+ try:
+ imode = int(mode, 8)
+ except Exception:
+ raise OrchestratorError('mode must be an octal mode, e.g. "600"')
+ else:
+ imode = 0o600
+ pspec = PlacementSpec.from_string(placement)
+ ks = ClientKeyringSpec(entity, pspec, mode=imode, uid=uid, gid=gid)
+ self.keys.update(ks)
+ self._kick_serve_loop()
+ return HandleCommandResult()
+
+ @orchestrator._cli_write_command('orch client-keyring rm')
+ def _client_keyring_rm(
+ self,
+ entity: str,
+ ) -> HandleCommandResult:
+ self.keys.rm(entity)
+ self._kick_serve_loop()
+ return HandleCommandResult()
+
def _get_connection(self, host: str) -> Tuple['remoto.backends.BaseConnection',
'remoto.backends.LegacyModuleExecute']:
"""
return image
- def _hosts_with_daemon_inventory(self) -> List[HostSpec]:
+ def _schedulable_hosts(self) -> List[HostSpec]:
"""
Returns all usable hosts that went through _refresh_host_daemons().
"""
return [
h for h in self.inventory.all_specs()
- if self.cache.host_had_daemon_refresh(h.hostname)
- and h.status.lower() not in ['maintenance', 'offline']
+ if (
+ self.cache.host_had_daemon_refresh(h.hostname)
+ and h.status.lower() not in ['maintenance', 'offline']
+ and '_no_schedule' not in h.labels
+ )
]
+ def _check_valid_addr(self, host: str, addr: str) -> str:
+ # make sure hostname is resolvable before trying to make a connection
+ try:
+ ip_addr = utils.resolve_ip(addr)
+ except OrchestratorError as e:
+ msg = str(e) + f'''
+You may need to supply an address for {addr}
+
+Please make sure that the host is reachable and accepts connections using the cephadm SSH key
+To add the cephadm SSH key to the host:
+> ceph cephadm get-pub-key > ~/ceph.pub
+> ssh-copy-id -f -i ~/ceph.pub {self.ssh_user}@{addr}
+
+To check that the host is reachable open a new shell with the --no-hosts flag:
+> cephadm shell --no-hosts
+
+Then run the following:
+> ceph cephadm get-ssh-config > ssh_config
+> ceph config-key get mgr/cephadm/ssh_identity_key > ~/cephadm_private_key
+> chmod 0600 ~/cephadm_private_key
+> ssh -F ssh_config -i ~/cephadm_private_key {self.ssh_user}@{addr}'''
+ raise OrchestratorError(msg)
+
+ out, err, code = CephadmServe(self)._run_cephadm(
+ host, cephadmNoImage, 'check-host',
+ ['--expect-hostname', host],
+ addr=addr,
+ error_ok=True, no_fsid=True)
+ if code:
+ # err will contain stdout and stderr, so we filter on the message text to
+ # only show the errors
+ errors = [_i.replace("ERROR: ", "") for _i in err if _i.startswith('ERROR')]
+ raise OrchestratorError('Host %s (%s) failed check(s): %s' % (
+ host, addr, errors))
+ return ip_addr
+
def _add_host(self, spec):
# type: (HostSpec) -> str
"""
:param host: host name
"""
assert_valid_host(spec.hostname)
- out, err, code = CephadmServe(self)._run_cephadm(spec.hostname, cephadmNoImage, 'check-host',
- ['--expect-hostname', spec.hostname],
- addr=spec.addr,
- error_ok=True, no_fsid=True)
- if code:
- # err will contain stdout and stderr, so we filter on the message text to
- # only show the errors
- errors = [_i.replace("ERROR: ", "") for _i in err if _i.startswith('ERROR')]
- raise OrchestratorError('New host %s (%s) failed check(s): %s' % (
- spec.hostname, spec.addr, errors))
+ ip_addr = self._check_valid_addr(spec.hostname, spec.addr)
+ if spec.addr == spec.hostname and ip_addr:
+ spec.addr = ip_addr
+ # prime crush map?
+ if spec.location:
+ self.check_mon_command({
+ 'prefix': 'osd crush add-bucket',
+ 'name': spec.hostname,
+ 'type': 'host',
+ 'args': [f'{k}={v}' for k, v in spec.location.items()],
+ })
+
+ if spec.hostname not in self.inventory:
+ self.cache.prime_empty_host(spec.hostname)
self.inventory.add_host(spec)
- self.cache.prime_empty_host(spec.hostname)
self.offline_hosts_remove(spec.hostname)
self.event.set() # refresh stray health check
self.log.info('Added host %s' % spec.hostname)
- return "Added host '{}'".format(spec.hostname)
+ return "Added host '{}' with addr '{}'".format(spec.hostname, spec.addr)
@handle_orch_error
def add_host(self, spec: HostSpec) -> str:
@handle_orch_error
def update_host_addr(self, host: str, addr: str) -> str:
+ self._check_valid_addr(host, addr)
self.inventory.set_addr(host, addr)
self._reset_con(host)
self.event.set() # refresh stray health check
def add_host_label(self, host: str, label: str) -> str:
self.inventory.add_label(host, label)
self.log.info('Added label %s to host %s' % (label, host))
+ self._kick_serve_loop()
return 'Added label %s to host %s' % (label, host)
@handle_orch_error
def remove_host_label(self, host: str, label: str) -> str:
self.inventory.rm_label(host, label)
self.log.info('Removed label %s to host %s' % (label, host))
+ self._kick_serve_loop()
return 'Removed label %s from host %s' % (label, host)
def _host_ok_to_stop(self, hostname: str, force: bool = False) -> Tuple[int, str]:
refresh: bool = False) -> List[orchestrator.ServiceDescription]:
if refresh:
self._invalidate_daemons_and_kick_serve()
- self.log.info('Kicked serve() loop to refresh all services')
+ self.log.debug('Kicked serve() loop to refresh all services')
sm: Dict[str, orchestrator.ServiceDescription] = {}
continue
sm[nm] = orchestrator.ServiceDescription(
spec=spec,
- size=spec.placement.get_target_count(self.inventory.all_specs()),
+ size=spec.placement.get_target_count(self._schedulable_hosts()),
running=0,
events=self.events.get_for_service(spec.service_name()),
created=self.spec_store.spec_created[nm],
if (
service_type
- and service_type != n
- and not dd.daemon_type.startswith(n + '.')
+ and service_type != daemon_type_to_service(dd.daemon_type)
):
continue
if service_name and service_name != n:
refresh: bool = False) -> List[orchestrator.DaemonDescription]:
if refresh:
self._invalidate_daemons_and_kick_serve(host)
- self.log.info('Kicked serve() loop to refresh all daemons')
+ self.log.debug('Kicked serve() loop to refresh all daemons')
result = []
for h, dm in self.cache.get_daemons_with_volatile_status():
continue
if service_name is not None and service_name != dd.service_name():
continue
+ if not dd.memory_request and dd.daemon_type in ['osd', 'mon']:
+ dd.memory_request = cast(Optional[int], self.get_foreign_ceph_option(
+ dd.name(),
+ f"{dd.daemon_type}_memory_target"
+ ))
result.append(dd)
return result
self._daemon_action_set_image(action, image, daemon_spec.daemon_type,
daemon_spec.daemon_id)
- if action == 'redeploy' and self.daemon_is_self(daemon_spec.daemon_type,
- daemon_spec.daemon_id):
+ if (action == 'redeploy' or action == 'restart') and self.daemon_is_self(daemon_spec.daemon_type,
+ daemon_spec.daemon_id):
self.mgr_service.fail_over()
return '' # unreachable
assert d.daemon_type is not None
assert d.daemon_id is not None
- if action == 'redeploy' and self.daemon_is_self(d.daemon_type, d.daemon_id) \
+ if (action == 'redeploy' or action == 'restart') and self.daemon_is_self(d.daemon_type, d.daemon_id) \
and not self.mgr_service.mgr_map_has_standby():
raise OrchestratorError(
f'Unable to schedule redeploy for {daemon_name}: No standby MGRs')
assert dd.daemon_type is not None
assert dd.daemon_id is not None
assert dd.hostname is not None
- if action == 'redeploy' and self.daemon_is_self(dd.daemon_type, dd.daemon_id) \
+ if (action == 'redeploy' or action == 'restart') and self.daemon_is_self(dd.daemon_type, dd.daemon_id) \
and not self.mgr_service.mgr_map_has_standby():
raise OrchestratorError(
f'Unable to schedule redeploy for {daemon_name}: No standby MGRs')
if self.spec_store[service_name].spec.service_type in ('mon', 'mgr'):
return f'Unable to remove {service_name} service.\n' \
f'Note, you might want to mark the {service_name} service as "unmanaged"'
- found = self.spec_store.rm(service_name)
+
+ # Report list of affected OSDs
+ osds_msg = {}
+ if service_name.startswith('osd.'):
+ for h, dm in self.cache.get_daemons_with_volatile_status():
+ osds_to_remove = []
+ for name, dd in dm.items():
+ if dd.daemon_type == 'osd' and (dd.service_name() == service_name or not dd.osdspec_affinity):
+ osds_to_remove.append(str(dd.daemon_id))
+ if osds_to_remove:
+ osds_msg[h] = osds_to_remove
+
+ found = self.spec_store.rm(service_name) or osds_msg
if found:
self._kick_serve_loop()
- return 'Removed service %s' % service_name
+ if osds_msg:
+ return f'The service {service_name} will be deleted once the following OSDs: {osds_msg} ' \
+ f'will be deleted manually.'
+ else:
+ return f'Removed service {service_name}'
else:
# must be idempotent: still a success.
- return f'Failed to remove service. <{service_name}> was not found.'
+ try:
+ self.cache.get_daemon(service_name)
+ return (f'Failed to remove service <{service_name}>. "{service_name}" is the name of a daemon, not a service. '
+ + 'Running service names can be found with "ceph orch ls"')
+ except OrchestratorError:
+ return f'Failed to remove service. <{service_name}> was not found. Running service names can be found with "ceph orch ls"'
@handle_orch_error
def get_inventory(self, host_filter: Optional[orchestrator.InventoryFilter] = None, refresh: bool = False) -> List[orchestrator.InventoryHost]:
if refresh:
if host_filter and host_filter.hosts:
for h in host_filter.hosts:
+ self.log.debug(f'will refresh {h} devs')
self.cache.invalidate_host_devices(h)
else:
for h in self.cache.get_hosts():
+ self.log.debug(f'will refresh {h} devs')
self.cache.invalidate_host_devices(h)
self.event.set()
- self.log.info('Kicked serve() loop to refresh devices')
+ self.log.debug('Kicked serve() loop to refresh devices')
result = []
for host, dls in self.cache.devices.items():
'service_type': spec.service_type,
'data': self._preview_osdspecs(osdspecs=[cast(DriveGroupSpec, spec)])}
+ svc = self.cephadm_services[spec.service_type]
ha = HostAssignment(
spec=spec,
- hosts=self._hosts_with_daemon_inventory(),
+ hosts=self._schedulable_hosts(),
networks=self.cache.networks,
daemons=self.cache.get_daemons_by_service(spec.service_name()),
- allow_colo=self.cephadm_services[spec.service_type].allow_colo(),
+ allow_colo=svc.allow_colo(),
+ rank_map=self.spec_store[spec.service_name()].rank_map if svc.ranked() else None
)
ha.validate()
hosts, to_add, to_remove = ha.place()
'service_name': spec.service_name(),
'service_type': spec.service_type,
'add': [hs.hostname for hs in to_add],
- 'remove': [d.hostname for d in to_remove]
+ 'remove': [d.name() for d in to_remove]
}
@handle_orch_error
raise OrchestratorError('must specify either image or version')
image_info = CephadmServe(self)._get_container_image_info(target_name)
+
+ ceph_image_version = image_info.ceph_version
+ if not ceph_image_version:
+ return f'Unable to extract ceph version from {target_name}.'
+ if ceph_image_version.startswith('ceph version '):
+ ceph_image_version = ceph_image_version.split(' ')[2]
+ version_error = self.upgrade._check_target_version(ceph_image_version)
+ if version_error:
+ return f'Incompatible upgrade: {version_error}'
+
self.log.debug(f'image info {image} -> {image_info}')
r: dict = {
'target_name': target_name,
return None
+def write_file(path: str, content: bytes, mode: int, uid: int, gid: int,
+ mkdir_p: bool = True) -> Optional[str]:
+ try:
+ if mkdir_p:
+ dirname = os.path.dirname(path)
+ if not os.path.exists(dirname):
+ os.makedirs(dirname)
+ tmp_path = path + '.new'
+ with open(tmp_path, 'wb') as f:
+ os.fchown(f.fileno(), uid, gid)
+ os.fchmod(f.fileno(), mode)
+ f.write(content)
+ os.fsync(f.fileno())
+ os.rename(tmp_path, path)
+ except Exception as e:
+ return str(e)
+ return None
+
+
if __name__ == '__channelexec__':
for item in channel: # type: ignore # noqa: F821
channel.send(eval(item)) # type: ignore # noqa: F821
+import hashlib
import logging
import random
from typing import List, Optional, Callable, TypeVar, Tuple, NamedTuple, Dict
name: str = ''
ip: Optional[str] = None
ports: List[int] = []
+ rank: Optional[int] = None
+ rank_generation: Optional[int] = None
def __str__(self) -> str:
res = self.daemon_type + ':' + self.hostname
other = []
+ if self.rank is not None:
+ other.append(f'rank={self.rank}.{self.rank_generation}')
if self.network:
other.append(f'network={self.network}')
if self.name:
other.append(f'name={self.name}')
if self.ports:
- other.append(f'{self.ip or "*"}:{self.ports[0] if len(self.ports) == 1 else ",".join(map(str, self.ports))}')
+ other.append(f'{self.ip or "*"}:{",".join(map(str, self.ports))}')
if other:
res += '(' + ' '.join(other) + ')'
return res
self.name,
self.ip,
[p + n for p in self.ports],
+ self.rank,
+ self.rank_generation,
+ )
+
+ def assign_rank(self, rank: int, gen: int) -> 'DaemonPlacement':
+ return DaemonPlacement(
+ self.daemon_type,
+ self.hostname,
+ self.network,
+ self.name,
+ self.ip,
+ self.ports,
+ rank,
+ gen,
+ )
+
+ def assign_name(self, name: str) -> 'DaemonPlacement':
+ return DaemonPlacement(
+ self.daemon_type,
+ self.hostname,
+ self.network,
+ name,
+ self.ip,
+ self.ports,
+ self.rank,
+ self.rank_generation,
+ )
+
+ def assign_rank_generation(
+ self,
+ rank: int,
+ rank_map: Dict[int, Dict[int, Optional[str]]]
+ ) -> 'DaemonPlacement':
+ if rank not in rank_map:
+ rank_map[rank] = {}
+ gen = 0
+ else:
+ gen = max(rank_map[rank].keys()) + 1
+ rank_map[rank][gen] = None
+ return DaemonPlacement(
+ self.daemon_type,
+ self.hostname,
+ self.network,
+ self.name,
+ self.ip,
+ self.ports,
+ rank,
+ gen,
)
def matches_daemon(self, dd: DaemonDescription) -> bool:
return False
return True
+ def matches_rank_map(
+ self,
+ dd: DaemonDescription,
+ rank_map: Optional[Dict[int, Dict[int, Optional[str]]]],
+ ranks: List[int]
+ ) -> bool:
+ if rank_map is None:
+ # daemon should have no rank
+ return dd.rank is None
+
+ if dd.rank is None:
+ return False
+
+ if dd.rank not in rank_map:
+ return False
+ if dd.rank not in ranks:
+ return False
+
+ # must be the highest/newest rank_generation
+ if dd.rank_generation != max(rank_map[dd.rank].keys()):
+ return False
+
+ # must be *this* daemon
+ return rank_map[dd.rank][dd.rank_generation] == dd.daemon_id
+
class HostAssignment(object):
allow_colo: bool = False,
primary_daemon_type: Optional[str] = None,
per_host_daemon_type: Optional[str] = None,
+ rank_map: Optional[Dict[int, Dict[int, Optional[str]]]] = None,
):
assert spec
self.spec = spec # type: ServiceSpec
self.allow_colo = allow_colo
self.per_host_daemon_type = per_host_daemon_type
self.ports_start = spec.get_port_start()
+ self.rank_map = rank_map
def hosts_by_label(self, label: str) -> List[orchestrator.HostSpec]:
return [h for h in self.hosts if label in h.labels]
per_host = 1 + ((count - 1) // len(candidates))
candidates = expand_candidates(candidates, per_host)
- # consider active (primary) daemons first
- daemons = [
- d for d in self.daemons if d.is_active and d.daemon_type == self.primary_daemon_type
- ] + [
- d for d in self.daemons if not d.is_active and d.daemon_type == self.primary_daemon_type
- ]
+ # consider (preserve) existing daemons in a particular order...
+ daemons = sorted(
+ [
+ d for d in self.daemons if d.daemon_type == self.primary_daemon_type
+ ],
+ key=lambda d: (
+ not d.is_active, # active before standby
+ d.rank is not None, # ranked first, then non-ranked
+ d.rank, # low ranks
+ 0 - (d.rank_generation or 0), # newer generations first
+ )
+ )
# sort candidates into existing/used slots that already have a
# daemon, and others (the rest)
existing_standby: List[orchestrator.DaemonDescription] = []
existing_slots: List[DaemonPlacement] = []
to_remove: List[orchestrator.DaemonDescription] = []
- others = candidates.copy()
+ ranks: List[int] = list(range(len(candidates)))
+ others: List[DaemonPlacement] = candidates.copy()
for dd in daemons:
found = False
for p in others:
- if p.matches_daemon(dd):
+ if p.matches_daemon(dd) and p.matches_rank_map(dd, self.rank_map, ranks):
others.remove(p)
if dd.is_active:
existing_active.append(dd)
else:
existing_standby.append(dd)
+ if dd.rank is not None:
+ assert dd.rank_generation is not None
+ p = p.assign_rank(dd.rank, dd.rank_generation)
+ ranks.remove(dd.rank)
existing_slots.append(p)
found = True
break
existing = existing_active + existing_standby
- # If we don't have <count> the list of candidates is definitive.
- if count is None:
- logger.debug('Provided hosts: %s' % candidates)
- return self.place_per_host_daemons(candidates, others, to_remove)
+ # build to_add
+ if not count:
+ to_add = others
+ else:
+ # The number of new slots that need to be selected in order to fulfill count
+ need = count - len(existing)
+
+ # we don't need any additional placements
+ if need <= 0:
+ to_remove.extend(existing[count:])
+ del existing_slots[count:]
+ return self.place_per_host_daemons(existing_slots, [], to_remove)
- # The number of new slots that need to be selected in order to fulfill count
- need = count - len(existing)
+ if need > 0:
+ to_add = others[:need]
- # we don't need any additional placements
- if need <= 0:
- to_remove.extend(existing[count:])
- del existing_slots[count:]
- return self.place_per_host_daemons(existing_slots, [], to_remove)
+ if self.rank_map is not None:
+ # assign unused ranks (and rank_generations) to to_add
+ assert len(ranks) >= len(to_add)
+ for i in range(len(to_add)):
+ to_add[i] = to_add[i].assign_rank_generation(ranks[i], self.rank_map)
+
+ # If we don't have <count> the list of candidates is definitive.
+ if count is None:
+ final = existing_slots + to_add
+ logger.debug('Provided hosts: %s' % final)
+ return self.place_per_host_daemons(final, to_add, to_remove)
- # ask the scheduler to select additional slots
- to_add = others[:need]
logger.debug('Combine hosts with existing daemons %s + new hosts %s' % (
existing, to_add))
return self.place_per_host_daemons(existing_slots + to_add, to_add, to_remove)
for h in old:
if self.filter_new_host(h.hostname):
ls.append(h)
- else:
- logger.info(
- f"Filtered out host {h.hostname}: could not verify host allowed virtual ips")
if len(old) > len(ls):
logger.debug('Filtered %s down to %s' % (old, ls))
# shuffle for pseudo random selection
# gen seed off of self.spec to make shuffling deterministic
- seed = hash(self.spec.service_name())
- random.Random(seed).shuffle(ls)
-
+ seed = int(
+ hashlib.sha1(self.spec.service_name().encode('utf-8')).hexdigest(),
+ 16
+ ) % (2 ** 32)
+ final = sorted(ls)
+ random.Random(seed).shuffle(final)
return ls
+import hashlib
import json
import logging
+import uuid
from collections import defaultdict
from contextlib import contextmanager
from typing import TYPE_CHECKING, Optional, List, cast, Dict, Any, Union, Tuple, Iterator
from ceph.deployment import inventory
from ceph.deployment.drive_group import DriveGroupSpec
-from ceph.deployment.service_spec import ServiceSpec, IngressSpec, CustomContainerSpec
+from ceph.deployment.service_spec import ServiceSpec, CustomContainerSpec, PlacementSpec
from ceph.utils import str_to_datetime, datetime_now
import orchestrator
DaemonDescriptionStatus, daemon_type_to_service
from cephadm.services.cephadmservice import CephadmDaemonDeploySpec
from cephadm.schedule import HostAssignment
+from cephadm.autotune import MemoryAutotuner
from cephadm.utils import forall_hosts, cephadmNoImage, is_repo_digest, \
CephadmNoImage, CEPH_TYPES, ContainerInspectInfo
from mgr_module import MonCommandFailed
+from mgr_util import format_bytes
from . import utils
del self.mgr.health_checks['CEPHADM_PAUSED']
self.mgr.set_health_checks(self.mgr.health_checks)
+ def _autotune_host_memory(self, host: str) -> None:
+ total_mem = self.mgr.cache.get_facts(host).get('memory_total_kb', 0)
+ if not total_mem:
+ val = None
+ else:
+ total_mem *= 1024 # kb -> bytes
+ total_mem *= self.mgr.autotune_memory_target_ratio
+ a = MemoryAutotuner(
+ daemons=self.mgr.cache.get_daemons_by_host(host),
+ config_get=self.mgr.get_foreign_ceph_option,
+ total_mem=total_mem,
+ )
+ val, osds = a.tune()
+ any_changed = False
+ for o in osds:
+ if self.mgr.get_foreign_ceph_option(o, 'osd_memory_target') != val:
+ self.mgr.check_mon_command({
+ 'prefix': 'config rm',
+ 'who': o,
+ 'name': 'osd_memory_target',
+ })
+ any_changed = True
+ if val is not None:
+ if any_changed:
+ self.mgr.log.info(
+ f'Adjusting osd_memory_target on {host} to {format_bytes(val, 6)}'
+ )
+ ret, out, err = self.mgr.mon_command({
+ 'prefix': 'config set',
+ 'who': f'osd/host:{host}',
+ 'name': 'osd_memory_target',
+ 'value': str(val),
+ })
+ if ret:
+ self.log.warning(
+ f'Unable to set osd_memory_target on {host} to {val}: {err}'
+ )
+ else:
+ self.mgr.check_mon_command({
+ 'prefix': 'config rm',
+ 'who': f'osd/host:{host}',
+ 'name': 'osd_memory_target',
+ })
+ self.mgr.cache.update_autotune(host)
+
def _refresh_hosts_and_daemons(self) -> None:
bad_hosts = []
failures = []
+ # host -> path -> (mode, uid, gid, content, digest)
+ client_files: Dict[str, Dict[str, Tuple[int, int, int, bytes, str]]] = {}
+
+ # ceph.conf
+ if self.mgr.manage_etc_ceph_ceph_conf or self.mgr.keys.keys:
+ config = self.mgr.get_minimal_ceph_conf().encode('utf-8')
+ config_digest = ''.join('%02x' % c for c in hashlib.sha256(config).digest())
+
+ if self.mgr.manage_etc_ceph_ceph_conf:
+ try:
+ pspec = PlacementSpec.from_string(self.mgr.manage_etc_ceph_ceph_conf_hosts)
+ ha = HostAssignment(
+ spec=ServiceSpec('mon', placement=pspec),
+ hosts=self.mgr._schedulable_hosts(),
+ daemons=[],
+ networks=self.mgr.cache.networks,
+ )
+ all_slots, _, _ = ha.place()
+ for host in {s.hostname for s in all_slots}:
+ if host not in client_files:
+ client_files[host] = {}
+ client_files[host]['/etc/ceph/ceph.conf'] = (
+ 0o644, 0, 0, bytes(config), str(config_digest)
+ )
+ except Exception as e:
+ self.mgr.log.warning(
+ f'unable to calc conf hosts: {self.mgr.manage_etc_ceph_ceph_conf_hosts}: {e}')
+
+ # client keyrings
+ for ks in self.mgr.keys.keys.values():
+ assert config
+ assert config_digest
+ try:
+ ret, keyring, err = self.mgr.mon_command({
+ 'prefix': 'auth get',
+ 'entity': ks.entity,
+ })
+ if ret:
+ self.log.warning(f'unable to fetch keyring for {ks.entity}')
+ continue
+ digest = ''.join('%02x' % c for c in hashlib.sha256(
+ keyring.encode('utf-8')).digest())
+ ha = HostAssignment(
+ spec=ServiceSpec('mon', placement=ks.placement),
+ hosts=self.mgr._schedulable_hosts(),
+ daemons=[],
+ networks=self.mgr.cache.networks,
+ )
+ all_slots, _, _ = ha.place()
+ for host in {s.hostname for s in all_slots}:
+ if host not in client_files:
+ client_files[host] = {}
+ client_files[host]['/etc/ceph/ceph.conf'] = (
+ 0o644, 0, 0, bytes(config), str(config_digest)
+ )
+ client_files[host][ks.path] = (
+ ks.mode, ks.uid, ks.gid, keyring.encode('utf-8'), digest
+ )
+ except Exception as e:
+ self.log.warning(
+ f'unable to calc client keyring {ks.entity} placement {ks.placement}: {e}')
+
@forall_hosts
def refresh(host: str) -> None:
if r:
failures.append(r)
- if self.mgr.cache.host_needs_new_etc_ceph_ceph_conf(host):
- self.log.debug(f"deploying new /etc/ceph/ceph.conf on `{host}`")
- r = self._deploy_etc_ceph_ceph_conf(host)
- if r:
- bad_hosts.append(r)
+ if (
+ self.mgr.cache.host_needs_autotune_memory(host)
+ and not self.mgr.inventory.has_label(host, '_no_autotune_memory')
+ ):
+ self.log.debug(f"autotuning memory for {host}")
+ self._autotune_host_memory(host)
+
+ # client files
+ updated_files = False
+ old_files = self.mgr.cache.get_host_client_files(host).copy()
+ for path, m in client_files.get(host, {}).items():
+ mode, uid, gid, content, digest = m
+ if path in old_files:
+ match = old_files[path] == (digest, mode, uid, gid)
+ del old_files[path]
+ if match:
+ continue
+ self.log.info(f'Updating {host}:{path}')
+ self._write_remote_file(host, path, content, mode, uid, gid)
+ self.mgr.cache.update_client_file(host, path, digest, mode, uid, gid)
+ updated_files = True
+ for path in old_files.keys():
+ self.log.info(f'Removing {host}:{path}')
+ with self._remote_connection(host) as tpl:
+ conn, connr = tpl
+ out, err, code = remoto.process.check(
+ conn,
+ ['rm', '-f', path])
+ updated_files = True
+ self.mgr.cache.removed_client_file(host, path)
+ if updated_files:
+ self.mgr.cache.save_host(host)
refresh(self.mgr.cache.get_hosts())
sd.version = d.get('version')
sd.ports = d.get('ports')
sd.ip = d.get('ip')
+ sd.rank = int(d['rank']) if d.get('rank') is not None else None
+ sd.rank_generation = int(d['rank_generation']) if d.get('rank_generation') is not None else None
if sd.daemon_type == 'osd':
sd.osdspec_affinity = self.mgr.osd_service.get_osdspec_affinity(sd.daemon_id)
if 'state' in d:
# Unset global 'pending' flag for host
self.mgr.cache.loading_osdspec_preview.remove(search_host)
- def _deploy_etc_ceph_ceph_conf(self, host: str) -> Optional[str]:
- config = self.mgr.get_minimal_ceph_conf()
-
- try:
- with self._remote_connection(host) as tpl:
- conn, connr = tpl
- out, err, code = remoto.process.check(
- conn,
- ['mkdir', '-p', '/etc/ceph'])
- if code:
- return f'failed to create /etc/ceph on {host}: {err}'
- out, err, code = remoto.process.check(
- conn,
- ['dd', 'of=/etc/ceph/ceph.conf'],
- stdin=config.encode('utf-8')
- )
- if code:
- return f'failed to create /etc/ceph/ceph.conf on {host}: {err}'
- self.mgr.cache.update_last_etc_ceph_ceph_conf(host)
- self.mgr.cache.save_host(host)
- except OrchestratorError as e:
- return f'failed to create /etc/ceph/ceph.conf on {host}: {str(e)}'
- return None
-
def _check_for_strays(self) -> None:
self.log.debug('_check_for_strays')
for k in ['CEPHADM_STRAY_HOST',
svc = self.mgr.cephadm_services[service_type]
daemons = self.mgr.cache.get_daemons_by_service(service_name)
- public_network = None
+ public_networks: List[str] = []
if service_type == 'mon':
out = str(self.mgr.get_foreign_ceph_option('mon', 'public_network'))
if '/' in out:
- public_network = out.strip()
- self.log.debug('mon public_network is %s' % public_network)
+ public_networks = [x.strip() for x in out.split(',')]
+ self.log.debug('mon public_network(s) is %s' % public_networks)
def matches_network(host):
# type: (str) -> bool
- if not public_network:
- return False
- # make sure we have 1 or more IPs for that network on that
+ # make sure we have 1 or more IPs for any of those networks on that
# host
- return len(self.mgr.cache.networks[host].get(public_network, [])) > 0
+ for network in public_networks:
+ if len(self.mgr.cache.networks[host].get(network, [])) > 0:
+ return True
+ self.log.info(
+ f"Filtered out host {host}: does not belong to mon public_network"
+ f" ({','.join(public_networks)})"
+ )
+ return False
+ rank_map = None
+ if svc.ranked():
+ rank_map = self.mgr.spec_store[spec.service_name()].rank_map or {}
ha = HostAssignment(
spec=spec,
- hosts=self.mgr._hosts_with_daemon_inventory(),
+ hosts=self.mgr._schedulable_hosts(),
daemons=daemons,
networks=self.mgr.cache.networks,
filter_new_host=(
allow_colo=svc.allow_colo(),
primary_daemon_type=svc.primary_daemon_type(),
per_host_daemon_type=svc.per_host_daemon_type(),
+ rank_map=rank_map,
)
try:
all_slots, slots_to_add, daemons_to_remove = ha.place()
+ daemons_to_remove = [d for d in daemons_to_remove if (d.hostname and self.mgr.inventory._inventory[d.hostname].get(
+ 'status', '').lower() not in ['maintenance', 'offline'])]
self.log.debug('Add %s, remove %s' % (slots_to_add, daemons_to_remove))
except OrchestratorError as e:
self.log.error('Failed to apply %s spec %s: %s' % (
self.log.debug('cannot scale mon|mgr below 1)')
return False
+ # progress
+ progress_id = str(uuid.uuid4())
+ delta: List[str] = []
+ if slots_to_add:
+ delta += [f'+{len(slots_to_add)}']
+ if daemons_to_remove:
+ delta += [f'-{len(daemons_to_remove)}']
+ progress_title = f'Updating {spec.service_name()} deployment ({" ".join(delta)} -> {len(all_slots)})'
+ progress_total = len(slots_to_add) + len(daemons_to_remove)
+ progress_done = 0
+
+ def update_progress() -> None:
+ self.mgr.remote(
+ 'progress', 'update', progress_id,
+ ev_msg=progress_title,
+ ev_progress=(progress_done / progress_total),
+ add_to_ceph_s=True,
+ )
+
+ if progress_total:
+ update_progress()
+
# add any?
did_config = False
self.log.debug('Hosts that will receive new daemons: %s' % slots_to_add)
self.log.debug('Daemons that will be removed: %s' % daemons_to_remove)
+ # assign names
+ for i in range(len(slots_to_add)):
+ slot = slots_to_add[i]
+ slot = slot.assign_name(self.mgr.get_unique_name(
+ slot.daemon_type,
+ slot.hostname,
+ daemons,
+ prefix=spec.service_id,
+ forcename=slot.name,
+ rank=slot.rank,
+ rank_generation=slot.rank_generation,
+ ))
+ slots_to_add[i] = slot
+ if rank_map is not None:
+ assert slot.rank is not None
+ assert slot.rank_generation is not None
+ assert rank_map[slot.rank][slot.rank_generation] is None
+ rank_map[slot.rank][slot.rank_generation] = slot.name
+
+ if rank_map:
+ # record the rank_map before we make changes so that if we fail the
+ # next mgr will clean up.
+ self.mgr.spec_store.save_rank_map(spec.service_name(), rank_map)
+
+ # remove daemons now, since we are going to fence them anyway
+ for d in daemons_to_remove:
+ assert d.hostname is not None
+ self._remove_daemon(d.name(), d.hostname)
+ daemons_to_remove = []
+
+ # fence them
+ svc.fence_old_ranks(spec, rank_map, len(all_slots))
+
+ # create daemons
for slot in slots_to_add:
# first remove daemon on conflicting port?
if slot.ports:
# there is only 1 gateway.
self._remove_daemon(d.name(), d.hostname)
daemons_to_remove.remove(d)
+ progress_done += 1
break
# deploy new daemon
- daemon_id = self.mgr.get_unique_name(
- slot.daemon_type,
- slot.hostname,
- daemons,
- prefix=spec.service_id,
- forcename=slot.name)
-
+ daemon_id = slot.name
if not did_config:
svc.config(spec, daemon_id)
did_config = True
daemon_type=slot.daemon_type,
ports=slot.ports,
ip=slot.ip,
+ rank=slot.rank,
+ rank_generation=slot.rank_generation,
)
self.log.debug('Placing %s.%s on host %s' % (
slot.daemon_type, daemon_id, slot.hostname))
daemon_spec = svc.prepare_create(daemon_spec)
self._create_daemon(daemon_spec)
r = True
+ progress_done += 1
+ update_progress()
except (RuntimeError, OrchestratorError) as e:
- self.mgr.events.for_service(
- spec, 'ERROR',
- f"Failed while placing {slot.daemon_type}.{daemon_id} "
- f"on {slot.hostname}: {e}")
+ msg = (f"Failed while placing {slot.daemon_type}.{daemon_id} "
+ f"on {slot.hostname}: {e}")
+ self.mgr.events.for_service(spec, 'ERROR', msg)
+ self.mgr.log.error(msg)
# only return "no change" if no one else has already succeeded.
# later successes will also change to True
if r is None:
r = False
+ progress_done += 1
+ update_progress()
continue
# add to daemon list so next name(s) will also be unique
assert d.hostname is not None
self._remove_daemon(d.name(), d.hostname)
+ progress_done += 1
+ update_progress()
+
+ self.mgr.remote('progress', 'complete', progress_id)
+
if r is None:
r = False
return r
if spec and spec.unmanaged:
continue
+ # ignore daemons for deleted services
+ if dd.service_name() in self.mgr.spec_store.spec_deleted:
+ continue
+
# These daemon types require additional configs after creation
if dd.daemon_type in ['grafana', 'iscsi', 'prometheus', 'alertmanager', 'nfs']:
daemons_post[dd.daemon_type].append(dd)
assert daemon_spec.host
self._deploy_cephadm_binary(daemon_spec.host)
- if daemon_spec.daemon_type == 'haproxy':
- haspec = cast(IngressSpec, self.mgr.spec_store[daemon_spec.service_name].spec)
- if haspec.haproxy_container_image:
- image = haspec.haproxy_container_image
-
- if daemon_spec.daemon_type == 'keepalived':
- haspec = cast(IngressSpec, self.mgr.spec_store[daemon_spec.service_name].spec)
- if haspec.keepalived_container_image:
- image = haspec.keepalived_container_image
-
# TCP port to open in the host firewall
if len(ports) > 0:
daemon_spec.extra_args.extend([
'ports': daemon_spec.ports,
'ip': daemon_spec.ip,
'deployed_by': self.mgr.get_active_mgr_digests(),
+ 'rank': daemon_spec.rank,
+ 'rank_generation': daemon_spec.rank_generation,
}),
'--config-json', '-',
] + daemon_spec.extra_args,
self.log.warning(msg)
raise OrchestratorError(msg)
+ def _write_remote_file(self,
+ host: str,
+ path: str,
+ content: bytes,
+ mode: int,
+ uid: int,
+ gid: int) -> None:
+ with self._remote_connection(host) as tpl:
+ conn, connr = tpl
+ try:
+ errmsg = connr.write_file(path, content, mode, uid, gid)
+ if errmsg is not None:
+ raise OrchestratorError(errmsg)
+ except Exception as e:
+ msg = f"Unable to write {host}:{path}: {e}"
+ self.log.warning(msg)
+ raise OrchestratorError(msg)
+
@contextmanager
def _remote_connection(self,
host: str,
> ceph cephadm get-pub-key > ~/ceph.pub
> ssh-copy-id -f -i ~/ceph.pub {user}@{addr}
-To check that the host is reachable:
+To check that the host is reachable open a new shell with the --no-hosts flag:
+> cephadm shell --no-hosts
+
+Then run the following:
> ceph cephadm get-ssh-config > ssh_config
> ceph config-key get mgr/cephadm/ssh_identity_key > ~/cephadm_private_key
> chmod 0600 ~/cephadm_private_key
extra_files: Optional[Dict[str, Any]] = None,
daemon_type: Optional[str] = None,
ip: Optional[str] = None,
- ports: Optional[List[int]] = None):
+ ports: Optional[List[int]] = None,
+ rank: Optional[int] = None,
+ rank_generation: Optional[int] = None):
"""
A data struction to encapsulate `cephadm deploy ...
"""
self.final_config: Dict[str, Any] = {}
self.deps: List[str] = []
+ self.rank: Optional[int] = rank
+ self.rank_generation: Optional[int] = rank_generation
+
def name(self) -> str:
return '%s.%s' % (self.daemon_type, self.daemon_id)
service_name=dd.service_name(),
ip=dd.ip,
ports=dd.ports,
+ rank=dd.rank,
+ rank_generation=dd.rank_generation,
)
def to_daemon_description(self, status: DaemonDescriptionStatus, status_desc: str) -> DaemonDescription:
return DaemonDescription(
daemon_type=self.daemon_type,
daemon_id=self.daemon_id,
+ service_name=self.service_name,
hostname=self.host,
status=status,
status_desc=status_desc,
ip=self.ip,
ports=self.ports,
+ rank=self.rank,
+ rank_generation=self.rank_generation,
)
self.mgr: "CephadmOrchestrator" = mgr
def allow_colo(self) -> bool:
+ """
+ Return True if multiple daemons of the same type can colocate on
+ the same host.
+ """
return False
+ def primary_daemon_type(self) -> str:
+ """
+ This is the type of the primary (usually only) daemon to be deployed.
+ """
+ return self.TYPE
+
def per_host_daemon_type(self) -> Optional[str]:
+ """
+ If defined, this type of daemon will be deployed once for each host
+ containing one or more daemons of the primary type.
+ """
return None
- def primary_daemon_type(self) -> str:
- return self.TYPE
+ def ranked(self) -> bool:
+ """
+ If True, we will assign a stable rank (0, 1, ...) and monotonically increasing
+ generation (0, 1, ...) to each daemon we create/deploy.
+ """
+ return False
+
+ def fence_old_ranks(self,
+ spec: ServiceSpec,
+ rank_map: Dict[int, Dict[int, Optional[str]]],
+ num_ranks: int) -> None:
+ assert False
def make_daemon_spec(
- self, host: str,
+ self,
+ host: str,
daemon_id: str,
network: str,
spec: ServiceSpecs,
daemon_type: Optional[str] = None,
ports: Optional[List[int]] = None,
ip: Optional[str] = None,
+ rank: Optional[int] = None,
+ rank_generation: Optional[int] = None,
) -> CephadmDaemonDeploySpec:
return CephadmDaemonDeploySpec(
host=host,
daemon_type=daemon_type,
ports=ports,
ip=ip,
+ rank=rank,
+ rank_generation=rank_generation,
)
def prepare_create(self, daemon_spec: CephadmDaemonDeploySpec) -> CephadmDaemonDeploySpec:
class MgrService(CephService):
TYPE = 'mgr'
+ def allow_colo(self) -> bool:
+ if self.mgr.get_ceph_option('mgr_standby_modules'):
+ # traditional mgr mode: standby daemons' modules listen on
+ # ports and redirect to the primary. we must not schedule
+ # multiple mgrs on the same host or else ports will
+ # conflict.
+ return False
+ else:
+ # standby daemons do nothing, and therefore port conflicts
+ # are not a concern.
+ return True
+
def prepare_create(self, daemon_spec: CephadmDaemonDeploySpec) -> CephadmDaemonDeploySpec:
"""
Create a new manager instance on a host.
ret, keyring, err = self.mgr.check_mon_command({
'prefix': 'auth get-or-create',
'entity': self.get_auth_entity(daemon_spec.daemon_id),
- 'caps': ['mon', 'allow r',
+ 'caps': ['mon', 'profile cephfs-mirror',
'mds', 'allow r',
'osd', 'allow rw tag cephfs metadata=*, allow r tag cephfs data=*',
'mgr', 'allow r'],
from ceph.deployment.service_spec import IngressSpec
from cephadm.utils import resolve_ip
-
+from orchestrator import OrchestratorError
from cephadm.services.cephadmservice import CephadmDaemonDeploySpec, CephService
logger = logging.getLogger(__name__)
) -> Tuple[Dict[str, Any], List[str]]:
spec = cast(IngressSpec, self.mgr.spec_store[daemon_spec.service_name].spec)
assert spec.backend_service
+ if spec.backend_service not in self.mgr.spec_store:
+ raise RuntimeError(f'{spec.service_name()} backend service {spec.backend_service} does not exist')
+ backend_spec = self.mgr.spec_store[spec.backend_service].spec
daemons = self.mgr.cache.get_daemons_by_service(spec.backend_service)
deps = [d.name() for d in daemons]
if spec.monitor_password:
password = spec.monitor_password
+ if backend_spec.service_type == 'nfs':
+ mode = 'tcp'
+ by_rank = {d.rank: d for d in daemons if d.rank is not None}
+ servers = []
+
+ # try to establish how many ranks we *should* have
+ num_ranks = backend_spec.placement.count
+ if not num_ranks:
+ num_ranks = 1 + max(by_rank.keys())
+
+ for rank in range(num_ranks):
+ if rank in by_rank:
+ d = by_rank[rank]
+ assert(d.ports)
+ servers.append({
+ 'name': f"{spec.backend_service}.{rank}",
+ 'ip': d.ip or resolve_ip(self.mgr.inventory.get_addr(str(d.hostname))),
+ 'port': d.ports[0],
+ })
+ else:
+ # offline/missing server; leave rank in place
+ servers.append({
+ 'name': f"{spec.backend_service}.{rank}",
+ 'ip': '0.0.0.0',
+ 'port': 0,
+ })
+ else:
+ mode = 'http'
+ servers = [
+ {
+ 'name': d.name(),
+ 'ip': d.ip or resolve_ip(self.mgr.inventory.get_addr(str(d.hostname))),
+ 'port': d.ports[0],
+ } for d in daemons if d.ports
+ ]
+
haproxy_conf = self.mgr.template.render(
'services/ingress/haproxy.cfg.j2',
{
'spec': spec,
- 'servers': [
- {
- 'name': d.name(),
- 'ip': d.ip or resolve_ip(str(d.hostname)),
- 'port': d.ports[0],
- } for d in daemons if d.ports
- ],
+ 'mode': mode,
+ 'servers': servers,
'user': spec.monitor_user or 'admin',
'password': password,
'ip': daemon_spec.ip or '*',
)
break
if not interface:
- interface = 'eth0'
+ raise OrchestratorError(
+ f"Unable to identify interface for {spec.virtual_ip} on {host}"
+ )
# script to monitor health
script = '/usr/bin/false'
# remove host, daemon is being deployed on from hosts list for
# other_ips in conf file and converter to ips
- hosts.remove(host)
- other_ips = [resolve_ip(h) for h in hosts]
+ if host in hosts:
+ hosts.remove(host)
+ other_ips = [resolve_ip(self.mgr.inventory.get_addr(h)) for h in hosts]
keepalived_conf = self.mgr.template.render(
'services/ingress/keepalived.conf.j2',
'interface': interface,
'state': state,
'other_ips': other_ips,
- 'host_ip': resolve_ip(host),
+ 'host_ip': resolve_ip(self.mgr.inventory.get_addr(host)),
}
)
import errno
import json
import logging
+import subprocess
from typing import List, cast, Optional
from ipaddress import ip_address, IPv6Address
if not spec:
logger.warning('No ServiceSpec found for %s', dd)
continue
- ip = utils.resolve_ip(dd.hostname)
+ ip = utils.resolve_ip(self.mgr.inventory.get_addr(dd.hostname))
# IPv6 URL encoding requires square brackets enclosing the ip
if type(ip_address(ip)) is IPv6Address:
ip = f'[{ip}]'
names = [f'{self.TYPE}.{d_id}' for d_id in daemon_ids]
warn_message = f'It is presumed safe to stop {names}'
return HandleCommandResult(0, warn_message, '')
+
+ def post_remove(self, daemon: DaemonDescription) -> None:
+ """
+ Called after the daemon is removed.
+ """
+ logger.debug(f'Post remove daemon {self.TYPE}.{daemon.daemon_id}')
+
+ # remove config for dashboard iscsi gateways
+ ret, out, err = self.mgr.check_mon_command({
+ 'prefix': 'dashboard iscsi-gateway-rm',
+ 'name': daemon.hostname,
+ })
+ logger.info(f'{daemon.hostname} removed from iscsi gateways dashboard config')
+
+ # needed to know if we have ssl stuff for iscsi in ceph config
+ iscsi_config_dict = {}
+ ret, iscsi_config, err = self.mgr.check_mon_command({
+ 'prefix': 'config-key dump',
+ 'key': 'iscsi',
+ })
+ if iscsi_config:
+ iscsi_config_dict = json.loads(iscsi_config)
+
+ # remove iscsi cert and key from ceph config
+ for iscsi_key, value in iscsi_config_dict.items():
+ if f'iscsi/client.{daemon.name()}/' in iscsi_key:
+ ret, out, err = self.mgr.check_mon_command({
+ 'prefix': 'config-key rm',
+ 'key': iscsi_key,
+ })
+ logger.info(f'{iscsi_key} removed from ceph config')
+
+ def purge(self, service_name: str) -> None:
+ """Removes configuration
+ """
+ spec = cast(IscsiServiceSpec, self.mgr.spec_store[service_name].spec)
+ try:
+ # remove service configuration from the pool
+ try:
+ subprocess.run(['rados',
+ '-k', str(self.mgr.get_ceph_option('keyring')),
+ '-n', f'mgr.{self.mgr.get_mgr_id()}',
+ '-p', cast(str, spec.pool),
+ 'rm',
+ 'gateway.conf'],
+ timeout=5)
+ logger.info(f'<gateway.conf> removed from {spec.pool}')
+ except subprocess.CalledProcessError as ex:
+ logger.error(f'Error executing <<{ex.cmd}>>: {ex.output}')
+ except subprocess.TimeoutExpired:
+ logger.error(f'timeout (5s) trying to remove <gateway.conf> from {spec.pool}')
+
+ except Exception:
+ logger.exception(f'failed to purge {service_name}')
prom_services = [] # type: List[str]
for dd in self.mgr.cache.get_daemons_by_service('prometheus'):
assert dd.hostname is not None
- prom_services.append(dd.hostname)
+ addr = dd.ip if dd.ip else self._inventory_get_addr(dd.hostname)
+ port = dd.ports[0] if dd.ports else 9095
+ prom_services.append(addr + ':' + str(port))
deps.append(dd.name())
grafana_data_sources = self.mgr.template.render(
'services/grafana/ceph-dashboard.yml.j2', {'hosts': prom_services})
})
grafana_ini = self.mgr.template.render(
- 'services/grafana/grafana.ini.j2', {'http_port': self.DEFAULT_SERVICE_PORT})
+ 'services/grafana/grafana.ini.j2', {
+ 'http_port': daemon_spec.ports[0] if daemon_spec.ports else self.DEFAULT_SERVICE_PORT,
+ 'http_addr': daemon_spec.ip if daemon_spec.ip else ''
+ })
config_file = {
'files': {
# TODO: signed cert
dd = self.get_active_daemon(daemon_descrs)
assert dd.hostname is not None
- service_url = 'https://{}:{}'.format(
- self._inventory_get_addr(dd.hostname), self.DEFAULT_SERVICE_PORT)
+ addr = dd.ip if dd.ip else self._inventory_get_addr(dd.hostname)
+ port = dd.ports[0] if dd.ports else self.DEFAULT_SERVICE_PORT
+ service_url = 'https://{}:{}'.format(addr, port)
self._set_service_url_on_dashboard(
'Grafana',
'dashboard get-grafana-api-url',
def config_dashboard(self, daemon_descrs: List[DaemonDescription]) -> None:
dd = self.get_active_daemon(daemon_descrs)
assert dd.hostname is not None
- service_url = 'http://{}:{}'.format(self._inventory_get_addr(dd.hostname),
- self.DEFAULT_SERVICE_PORT)
+ addr = dd.ip if dd.ip else self._inventory_get_addr(dd.hostname)
+ port = dd.ports[0] if dd.ports else self.DEFAULT_SERVICE_PORT
+ service_url = 'http://{}:{}'.format(addr, port)
self._set_service_url_on_dashboard(
'AlertManager',
'dashboard get-alertmanager-api-host',
for dd in self.mgr.cache.get_daemons_by_service('node-exporter'):
assert dd.hostname is not None
deps.append(dd.name())
- addr = self.mgr.inventory.get_addr(dd.hostname)
+ addr = dd.ip if dd.ip else self.mgr.inventory.get_addr(dd.hostname)
+ port = str(dd.ports[0]) if dd.ports else '9100'
nodes.append({
'hostname': dd.hostname,
- 'url': addr.split(':')[0] + ':9100'
+ 'url': addr.split(':')[0] + ':' + port
})
# scrape alert managers
for dd in self.mgr.cache.get_daemons_by_service('alertmanager'):
assert dd.hostname is not None
deps.append(dd.name())
- addr = self.mgr.inventory.get_addr(dd.hostname)
- alertmgr_targets.append("'{}:9093'".format(addr.split(':')[0]))
+ addr = dd.ip if dd.ip else self.mgr.inventory.get_addr(dd.hostname)
+ port = str(dd.ports[0]) if dd.ports else '9093'
+ alertmgr_targets.append("'{}:{}'".format(addr.split(':')[0], port))
# scrape haproxies
haproxy_targets = []
def config_dashboard(self, daemon_descrs: List[DaemonDescription]) -> None:
dd = self.get_active_daemon(daemon_descrs)
assert dd.hostname is not None
- service_url = 'http://{}:{}'.format(
- self._inventory_get_addr(dd.hostname), self.DEFAULT_SERVICE_PORT)
+ addr = dd.ip if dd.ip else self._inventory_get_addr(dd.hostname)
+ port = dd.ports[0] if dd.ports else self.DEFAULT_SERVICE_PORT
+ service_url = 'http://{}:{}'.format(addr, port)
self._set_service_url_on_dashboard(
'Prometheus',
'dashboard get-prometheus-api-host',
import errno
import logging
+import os
+import subprocess
+import tempfile
from typing import Dict, Tuple, Any, List, cast, Optional
from mgr_module import HandleCommandResult
-from ceph.deployment.service_spec import NFSServiceSpec
-import rados
+from ceph.deployment.service_spec import ServiceSpec, NFSServiceSpec
from orchestrator import DaemonDescription
class NFSService(CephService):
TYPE = 'nfs'
+ def ranked(self) -> bool:
+ return True
+
+ def fence(self, daemon_id: str) -> None:
+ logger.info(f'Fencing old nfs.{daemon_id}')
+ ret, out, err = self.mgr.mon_command({
+ 'prefix': 'auth rm',
+ 'entity': f'client.nfs.{daemon_id}',
+ })
+
+ # TODO: block/fence this entity (in case it is still running somewhere)
+
+ def fence_old_ranks(self,
+ spec: ServiceSpec,
+ rank_map: Dict[int, Dict[int, Optional[str]]],
+ num_ranks: int) -> None:
+ for rank, m in list(rank_map.items()):
+ if rank >= num_ranks:
+ for daemon_id in m.values():
+ if daemon_id is not None:
+ self.fence(daemon_id)
+ del rank_map[rank]
+ nodeid = f'{spec.service_name()}.{rank}'
+ self.mgr.log.info(f'Removing {nodeid} from the ganesha grace table')
+ self.run_grace_tool(cast(NFSServiceSpec, spec), 'remove', nodeid)
+ self.mgr.spec_store.save_rank_map(spec.service_name(), rank_map)
+ else:
+ max_gen = max(m.keys())
+ for gen, daemon_id in list(m.items()):
+ if gen < max_gen:
+ if daemon_id is not None:
+ self.fence(daemon_id)
+ del rank_map[rank][gen]
+ self.mgr.spec_store.save_rank_map(spec.service_name(), rank_map)
+
def config(self, spec: NFSServiceSpec, daemon_id: str) -> None: # type: ignore
+ from nfs.cluster import create_ganesha_pool
+
assert self.TYPE == spec.service_type
assert spec.pool
- self.mgr._check_pool_exists(spec.pool, spec.service_name())
+ create_ganesha_pool(self.mgr, spec.pool)
def prepare_create(self, daemon_spec: CephadmDaemonDeploySpec) -> CephadmDaemonDeploySpec:
assert self.TYPE == daemon_spec.daemon_type
deps: List[str] = []
+ nodeid = f'{daemon_spec.service_name}.{daemon_spec.rank}'
+
# create the RADOS recovery pool keyring
rados_user = f'{daemon_type}.{daemon_id}'
rados_keyring = self.create_keyring(daemon_spec)
+ # ensure rank is known to ganesha
+ self.mgr.log.info(f'Ensuring {nodeid} is in the ganesha grace table')
+ self.run_grace_tool(spec, 'add', nodeid)
+
# create the rados config object
self.create_rados_config_obj(spec)
# generate the ganesha config
def get_ganesha_conf() -> str:
- context = dict(user=rados_user,
- nodeid=daemon_spec.name(),
- pool=spec.pool,
- namespace=spec.namespace if spec.namespace else '',
- rgw_user=rgw_user,
- url=spec.rados_config_location())
+ context = {
+ "user": rados_user,
+ "nodeid": nodeid,
+ "pool": spec.pool,
+ "namespace": spec.namespace if spec.namespace else '',
+ "rgw_user": rgw_user,
+ "url": spec.rados_config_location(),
+ # fall back to default NFS port if not present in daemon_spec
+ "port": daemon_spec.ports[0] if daemon_spec.ports else 2049,
+ "bind_addr": daemon_spec.ip if daemon_spec.ip else '',
+ }
return self.mgr.template.render('services/nfs/ganesha.conf.j2', context)
# generate the cephadm config json
def create_rados_config_obj(self,
spec: NFSServiceSpec,
clobber: bool = False) -> None:
- with self.mgr.rados.open_ioctx(spec.pool) as ioctx:
- if spec.namespace:
- ioctx.set_namespace(spec.namespace)
-
- obj = spec.rados_config_name()
- exists = True
- try:
- ioctx.stat(obj)
- except rados.ObjectNotFound:
- exists = False
-
- if exists and not clobber:
- # Assume an existing config
- logger.info('Rados config object exists: %s' % obj)
- else:
- # Create an empty config object
- logger.info('Creating rados config object: %s' % obj)
- ioctx.write_full(obj, ''.encode('utf-8'))
+ objname = spec.rados_config_name()
+ cmd = [
+ 'rados',
+ '-n', f"mgr.{self.mgr.get_mgr_id()}",
+ '-k', str(self.mgr.get_ceph_option('keyring')),
+ '-p', cast(str, spec.pool),
+ ]
+ if spec.namespace:
+ cmd += ['--namespace', spec.namespace]
+ result = subprocess.run(
+ cmd + ['get', objname, '-'],
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE,
+ timeout=10)
+ if not result.returncode and not clobber:
+ logger.info('Rados config object exists: %s' % objname)
+ else:
+ logger.info('Creating rados config object: %s' % objname)
+ result = subprocess.run(
+ cmd + ['put', objname, '-'],
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE,
+ timeout=10)
+ if result.returncode:
+ self.mgr.log.warning(
+ f'Unable to create rados config object {objname}: {result.stderr.decode("utf-8")}'
+ )
+ raise RuntimeError(result.stderr.decode("utf-8"))
def create_keyring(self, daemon_spec: CephadmDaemonDeploySpec) -> str:
daemon_id = daemon_spec.daemon_id
return keyring
+ def run_grace_tool(self,
+ spec: NFSServiceSpec,
+ action: str,
+ nodeid: str) -> None:
+ # write a temp keyring and referencing config file. this is a kludge
+ # because the ganesha-grace-tool can only authenticate as a client (and
+ # not a mgr). Also, it doesn't allow you to pass a keyring location via
+ # the command line, nor does it parse the CEPH_ARGS env var.
+ tmp_id = f'mgr.nfs.grace.{spec.service_name()}'
+ entity = AuthEntity(f'client.{tmp_id}')
+ keyring = self.get_keyring_with_caps(
+ entity,
+ ['mon', 'allow r', 'osd', f'allow rwx pool {spec.pool}']
+ )
+ tmp_keyring = tempfile.NamedTemporaryFile(mode='w', prefix='mgr-grace-keyring')
+ os.fchmod(tmp_keyring.fileno(), 0o600)
+ tmp_keyring.write(keyring)
+ tmp_keyring.flush()
+ tmp_conf = tempfile.NamedTemporaryFile(mode='w', prefix='mgr-grace-conf')
+ tmp_conf.write(self.mgr.get_minimal_ceph_conf())
+ tmp_conf.write(f'\tkeyring = {tmp_keyring.name}\n')
+ tmp_conf.flush()
+ try:
+ cmd: List[str] = [
+ 'ganesha-rados-grace',
+ '--cephconf', tmp_conf.name,
+ '--userid', tmp_id,
+ '--pool', cast(str, spec.pool),
+ ]
+ if spec.namespace:
+ cmd += ['--ns', spec.namespace]
+ cmd += [action, nodeid]
+ self.mgr.log.debug(cmd)
+ result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
+ timeout=10)
+ if result.returncode:
+ self.mgr.log.warning(
+ f'ganesha-rados-grace tool failed: {result.stderr.decode("utf-8")}'
+ )
+ raise RuntimeError(f'grace tool failed: {result.stderr.decode("utf-8")}')
+
+ finally:
+ self.mgr.check_mon_command({
+ 'prefix': 'auth rm',
+ 'entity': entity,
+ })
+
def remove_rgw_keyring(self, daemon: DaemonDescription) -> None:
assert daemon.daemon_id is not None
daemon_id: str = daemon.daemon_id
entity: AuthEntity = self.get_auth_entity(f'{daemon_id}-rgw')
logger.info(f'Removing key for {entity}')
- ret, out, err = self.mgr.check_mon_command({
+ self.mgr.check_mon_command({
'prefix': 'auth rm',
'entity': entity,
})
# Provide warning
warn_message = "WARNING: Removing NFS daemons can cause clients to lose connectivity. "
return HandleCommandResult(-errno.EBUSY, '', warn_message)
+
+ def purge(self, service_name: str) -> None:
+ if service_name not in self.mgr.spec_store:
+ return
+ spec = cast(NFSServiceSpec, self.mgr.spec_store[service_name].spec)
+
+ logger.info(f'Removing grace file for {service_name}')
+ cmd = [
+ 'rados',
+ '-n', f"mgr.{self.mgr.get_mgr_id()}",
+ '-k', str(self.mgr.get_ceph_option('keyring')),
+ '-p', cast(str, spec.pool),
+ ]
+ if spec.namespace:
+ cmd += ['--namespace', spec.namespace]
+ cmd += ['rm', 'grace']
+ subprocess.run(
+ cmd,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ timeout=10
+ )
def create_from_spec(self, drive_group: DriveGroupSpec) -> str:
logger.debug(f"Processing DriveGroup {drive_group}")
- osd_id_claims = self.find_destroyed_osds()
- if osd_id_claims:
+ osd_id_claims = OsdIdClaims(self.mgr)
+ if osd_id_claims.get():
logger.info(
- f"Found osd claims for drivegroup {drive_group.service_id} -> {osd_id_claims}")
+ f"Found osd claims for drivegroup {drive_group.service_id} -> {osd_id_claims.get()}")
@forall_hosts
def create_from_spec_one(host: str, drive_selection: DriveSelection) -> Optional[str]:
self.mgr.log.debug("skipping apply of %s on %s (no change)" % (
host, drive_group))
return None
+ # skip this host if we cannot schedule here
+ if self.mgr.inventory.has_label(host, '_no_schedule'):
+ return None
+
+ osd_id_claims_for_host = osd_id_claims.filtered_by_host(host)
cmd = self.driveselection_to_ceph_volume(drive_selection,
- osd_id_claims.get(host, []))
+ osd_id_claims_for_host)
if not cmd:
logger.debug("No data_devices, skipping DriveGroup: {}".format(
drive_group.service_id))
return None
- logger.info('Applying service osd.%s on host %s...' % (
+ logger.debug('Applying service osd.%s on host %s...' % (
drive_group.service_id, host
))
start_ts = datetime_now()
env_vars: List[str] = [f"CEPH_VOLUME_OSDSPEC_AFFINITY={drive_group.service_id}"]
ret_msg = self.create_single_host(
drive_group, host, cmd,
- replace_osd_ids=osd_id_claims.get(host, []), env_vars=env_vars
+ replace_osd_ids=osd_id_claims_for_host, env_vars=env_vars
)
self.mgr.cache.update_osdspec_last_applied(
host, drive_group.service_name(), start_ts
replace_osd_ids: Optional[List[str]] = None) -> str:
if replace_osd_ids is None:
- replace_osd_ids = self.find_destroyed_osds().get(host, [])
+ replace_osd_ids = OsdIdClaims(self.mgr).filtered_by_host(host)
assert replace_osd_ids is not None
# check result
osds_elems: dict = CephadmServe(self.mgr)._run_cephadm_json(
created = []
for osd_id, osds in osds_elems.items():
for osd in osds:
+ if osd['type'] == 'db':
+ continue
if osd['tags']['ceph.cluster_fsid'] != fsid:
logger.debug('mismatched fsid, skipping %s' % osd)
continue
if created:
self.mgr.cache.invalidate_host_devices(host)
+ self.mgr.cache.invalidate_autotune(host)
return "Created osd(s) %s on host '%s'" % (','.join(created), host)
else:
return "Created no osd(s) on host %s; already created?" % host
def prepare_drivegroup(self, drive_group: DriveGroupSpec) -> List[Tuple[str, DriveSelection]]:
# 1) use fn_filter to determine matching_hosts
matching_hosts = drive_group.placement.filter_matching_hostspecs(
- self.mgr.inventory.all_specs())
+ self.mgr._schedulable_hosts())
# 2) Map the inventory to the InventoryHost object
host_ds_map = []
for osdspec in osdspecs:
# populate osd_id_claims
- osd_id_claims = self.find_destroyed_osds()
+ osd_id_claims = OsdIdClaims(self.mgr)
# prepare driveselection
for host, ds in self.prepare_drivegroup(osdspec):
# driveselection for host
cmd = self.driveselection_to_ceph_volume(ds,
- osd_id_claims.get(host, []),
+ osd_id_claims.filtered_by_host(host),
preview=True)
if not cmd:
logger.debug("No data_devices, skipping DriveGroup: {}".format(
if not osdspecs:
self.mgr.log.debug("No OSDSpecs found")
return []
- return sum([spec.placement.filter_matching_hostspecs(self.mgr.inventory.all_specs()) for spec in osdspecs], [])
+ return sum([spec.placement.filter_matching_hostspecs(self.mgr._schedulable_hosts()) for spec in osdspecs], [])
def resolve_osdspecs_for_host(self, host: str,
specs: Optional[List[DriveGroupSpec]] = None) -> List[DriveGroupSpec]:
specs = [cast(DriveGroupSpec, spec) for (sn, spec) in self.mgr.spec_store.spec_preview.items()
if spec.service_type == 'osd']
for spec in specs:
- if host in spec.placement.filter_matching_hostspecs(self.mgr.inventory.all_specs()):
+ if host in spec.placement.filter_matching_hostspecs(self.mgr._schedulable_hosts()):
self.mgr.log.debug(f"Found OSDSpecs for host: <{host}> -> <{spec}>")
matching_specs.append(spec)
return matching_specs
def get_osdspec_affinity(self, osd_id: str) -> str:
return self.mgr.get('osd_metadata').get(osd_id, {}).get('osdspec_affinity', '')
- def find_destroyed_osds(self) -> Dict[str, List[str]]:
- osd_host_map: Dict[str, List[str]] = dict()
+
+class OsdIdClaims(object):
+ """
+ Retrieve and provide osd ids that can be reused in the cluster
+ """
+
+ def __init__(self, mgr: "CephadmOrchestrator") -> None:
+ self.mgr: "CephadmOrchestrator" = mgr
+ self.osd_host_map: Dict[str, List[str]] = dict()
+ self.refresh()
+
+ def refresh(self) -> None:
try:
ret, out, err = self.mgr.check_mon_command({
'prefix': 'osd tree',
tree = json.loads(out)
except ValueError:
logger.exception(f'Cannot decode JSON: \'{out}\'')
- return osd_host_map
+ return
nodes = tree.get('nodes', {})
for node in nodes:
if node.get('type') == 'host':
- osd_host_map.update(
+ self.osd_host_map.update(
{node.get('name'): [str(_id) for _id in node.get('children', list())]}
)
- if osd_host_map:
- self.mgr.log.info(f"Found osd claims -> {osd_host_map}")
- return osd_host_map
+ if self.osd_host_map:
+ self.mgr.log.info(f"Found osd claims -> {self.osd_host_map}")
+
+ def get(self) -> Dict[str, List[str]]:
+ return self.osd_host_map
+
+ def filtered_by_host(self, host: str) -> List[str]:
+ """
+ Return the list of osd ids that can be reused in a host
+
+ OSD id claims in CRUSH map are linked to the bare name of
+ the hostname. In case of FQDN hostnames the host is searched by the
+ bare name
+ """
+ return self.osd_host_map.get(host.split(".")[0], [])
class RemoveUtil(object):
type: 'prometheus'
access: 'proxy'
orgId: 1
- url: 'http://{{ host }}:9095'
+ url: 'http://{{ host }}'
basicAuth: false
isDefault: {{ 'true' if loop.first else 'false' }}
editable: false
cert_file = /etc/grafana/certs/cert_file
cert_key = /etc/grafana/certs/cert_key
http_port = {{ http_port }}
+ http_addr = {{ http_addr }}
[security]
admin_user = admin
admin_password = admin
{% endif %}
defaults
- mode http
+ mode {{ mode }}
log global
+{% if mode == 'http' %}
option httplog
option dontlognull
option http-server-close
option forwardfor except 127.0.0.0/8
option redispatch
retries 3
- timeout http-request 1s
timeout queue 20s
timeout connect 5s
+ timeout http-request 1s
+ timeout http-keep-alive 5s
timeout client 1s
timeout server 1s
- timeout http-keep-alive 5s
timeout check 5s
+{% endif %}
+{% if mode == 'tcp' %}
+ timeout queue 1m
+ timeout connect 10s
+ timeout client 1m
+ timeout server 1m
+ timeout check 10s
+{% endif %}
maxconn 8000
frontend stats
+ mode http
bind {{ ip }}:{{ monitor_port }}
stats enable
stats uri /stats
default_backend backend
backend backend
+{% if mode == 'http' %}
option forwardfor
balance static-rr
option httpchk HEAD / HTTP/1.0
{% for server in servers %}
server {{ server.name }} {{ server.ip }}:{{ server.port }} check weight 100
{% endfor %}
+{% endif %}
+{% if mode == 'tcp' %}
+ mode tcp
+ balance source
+ hash-type consistent
+ {% for server in servers %}
+ server {{ server.name }} {{ server.ip }}:{{ server.port }}
+ {% endfor %}
+{% endif %}
Enable_NLM = false;
Enable_RQUOTA = false;
Protocols = 4;
+ NFS_Port = {{ port }};
+{% if bind_addr %}
+ Bind_addr = {{ bind_addr }};
+{% endif %}
}
MDCACHE {
alerting:
alertmanagers:
- scheme: http
- path_prefix: /alertmanager
static_configs:
- targets: [{{ alertmgr_targets|join(', ') }}]
{% endif %}
{% for haproxy in haproxy_targets %}
- targets: [{{ haproxy.url }}]
labels:
- instance: '{{ haproxy.service }}'
+ instance: '{{ haproxy.service }}'
{% endfor %}
{% endif %}
def _run_cephadm(ret):
- def foo(*args, **kwargs):
+ def foo(s, host, entity, cmd, e, **kwargs):
+ if cmd == 'gather-facts':
+ return '{}', '', 0
return [ret], '', 0
return foo
@contextmanager
-def with_host(m: CephadmOrchestrator, name, refresh_hosts=True):
+def with_host(m: CephadmOrchestrator, name, addr='1.2.3.4', refresh_hosts=True):
# type: (CephadmOrchestrator, str) -> None
- wait(m, m.add_host(HostSpec(hostname=name)))
- if refresh_hosts:
- CephadmServe(m)._refresh_hosts_and_daemons()
- yield
- wait(m, m.remove_host(name))
+ with mock.patch("cephadm.utils.resolve_ip", return_value=addr):
+ wait(m, m.add_host(HostSpec(hostname=name)))
+ if refresh_hosts:
+ CephadmServe(m)._refresh_hosts_and_daemons()
+ yield
+ wait(m, m.remove_host(name))
def assert_rm_service(cephadm: CephadmOrchestrator, srv_name):
--- /dev/null
+# Disable autopep8 for this file:
+
+# fmt: off
+
+import pytest
+
+from cephadm.autotune import MemoryAutotuner
+from orchestrator import DaemonDescription
+
+
+@pytest.mark.parametrize("total,daemons,config,result",
+ [ # noqa: E128
+ (
+ 128 * 1024 * 1024 * 1024,
+ [],
+ {},
+ None,
+ ),
+ (
+ 128 * 1024 * 1024 * 1024,
+ [
+ DaemonDescription('osd', '1', 'host1'),
+ DaemonDescription('osd', '2', 'host1'),
+ ],
+ {},
+ 64 * 1024 * 1024 * 1024,
+ ),
+ (
+ 128 * 1024 * 1024 * 1024,
+ [
+ DaemonDescription('osd', '1', 'host1'),
+ DaemonDescription('osd', '2', 'host1'),
+ DaemonDescription('osd', '3', 'host1'),
+ ],
+ {
+ 'osd.3': 16 * 1024 * 1024 * 1024,
+ },
+ 56 * 1024 * 1024 * 1024,
+ ),
+ (
+ 128 * 1024 * 1024 * 1024,
+ [
+ DaemonDescription('mgr', 'a', 'host1'),
+ DaemonDescription('osd', '1', 'host1'),
+ DaemonDescription('osd', '2', 'host1'),
+ ],
+ {},
+ 62 * 1024 * 1024 * 1024,
+ )
+ ])
+def test_autotune(total, daemons, config, result):
+ def fake_getter(who, opt):
+ if opt == 'osd_memory_target_autotune':
+ if who in config:
+ return False
+ else:
+ return True
+ if opt == 'osd_memory_target':
+ return config.get(who, 4 * 1024 * 1024 * 1024)
+ if opt == 'mds_cache_memory_limit':
+ return 16 * 1024 * 1024 * 1024
+
+ a = MemoryAutotuner(
+ total_mem=total,
+ daemons=daemons,
+ config_get=fake_getter,
+ )
+ val, osds = a.tune()
+ assert val == result
import json
from contextlib import contextmanager
-from unittest.mock import ANY
import pytest
+import yaml
+
from ceph.deployment.drive_group import DriveGroupSpec, DeviceSelection
from cephadm.serve import CephadmServe
-from cephadm.services.osd import OSD, OSDRemovalQueue
+from cephadm.services.osd import OSD, OSDRemovalQueue, OsdIdClaims
try:
from typing import List
def test_host(self, cephadm_module):
assert wait(cephadm_module, cephadm_module.get_hosts()) == []
with with_host(cephadm_module, 'test'):
- assert wait(cephadm_module, cephadm_module.get_hosts()) == [HostSpec('test', 'test')]
+ assert wait(cephadm_module, cephadm_module.get_hosts()) == [HostSpec('test', '1.2.3.4')]
# Be careful with backward compatibility when changing things here:
assert json.loads(cephadm_module.get_store('inventory')) == \
- {"test": {"hostname": "test", "addr": "test", "labels": [], "status": ""}}
+ {"test": {"hostname": "test", "addr": "1.2.3.4", "labels": [], "status": ""}}
- with with_host(cephadm_module, 'second'):
+ with with_host(cephadm_module, 'second', '1.2.3.5'):
assert wait(cephadm_module, cephadm_module.get_hosts()) == [
- HostSpec('test', 'test'),
- HostSpec('second', 'second')
+ HostSpec('test', '1.2.3.4'),
+ HostSpec('second', '1.2.3.5')
]
- assert wait(cephadm_module, cephadm_module.get_hosts()) == [HostSpec('test', 'test')]
+ assert wait(cephadm_module, cephadm_module.get_hosts()) == [HostSpec('test', '1.2.3.4')]
assert wait(cephadm_module, cephadm_module.get_hosts()) == []
@mock.patch("cephadm.serve.CephadmServe._run_cephadm", _run_cephadm('[]'))
assert [remove_id_events(dd) for dd in wait(cephadm_module, c)] == [
{
+ 'service_name': 'mds.name',
'daemon_type': 'mds',
'hostname': 'test',
'status': 1,
del o['events'] # delete it, as it contains a timestamp
assert out == expected
+ @mock.patch("cephadm.serve.CephadmServe._run_cephadm", _run_cephadm('[]'))
+ def test_service_ls_service_type_flag(self, cephadm_module):
+ with with_host(cephadm_module, 'host1'):
+ with with_host(cephadm_module, 'host2'):
+ with with_service(cephadm_module, ServiceSpec('mgr', placement=PlacementSpec(count=2)), CephadmOrchestrator.apply_mgr, ''):
+ with with_service(cephadm_module, ServiceSpec('mds', 'test-id', placement=PlacementSpec(count=2)), CephadmOrchestrator.apply_mds, ''):
+
+ # with no service-type. Should provide info fot both services
+ c = cephadm_module.describe_service()
+ out = [dict(o.to_json()) for o in wait(cephadm_module, c)]
+ expected = [
+ {
+ 'placement': {'count': 2},
+ 'service_name': 'mgr',
+ 'service_type': 'mgr',
+ 'status': {'created': mock.ANY,
+ 'running': 2,
+ 'size': 2}
+ },
+ {
+ 'placement': {'count': 2},
+ 'service_id': 'test-id',
+ 'service_name': 'mds.test-id',
+ 'service_type': 'mds',
+ 'status': {'created': mock.ANY,
+ 'running': 2,
+ 'size': 2}
+ },
+ ]
+
+ for o in out:
+ if 'events' in o:
+ del o['events'] # delete it, as it contains a timestamp
+ assert out == expected
+
+ # with service-type. Should provide info fot only mds
+ c = cephadm_module.describe_service(service_type='mds')
+ out = [dict(o.to_json()) for o in wait(cephadm_module, c)]
+ expected = [
+ {
+ 'placement': {'count': 2},
+ 'service_id': 'test-id',
+ 'service_name': 'mds.test-id',
+ 'service_type': 'mds',
+ 'status': {'created': mock.ANY,
+ 'running': 2,
+ 'size': 2}
+ },
+ ]
+
+ for o in out:
+ if 'events' in o:
+ del o['events'] # delete it, as it contains a timestamp
+ assert out == expected
+
+ # service-type should not match with service names
+ c = cephadm_module.describe_service(service_type='mds.test-id')
+ out = [dict(o.to_json()) for o in wait(cephadm_module, c)]
+ assert out == []
+
@mock.patch("cephadm.serve.CephadmServe._run_cephadm", _run_cephadm('[]'))
def test_device_ls(self, cephadm_module):
with with_host(cephadm_module, 'test'):
_run_cephadm.assert_called_with(
'test', 'mon.test', 'deploy', [
'--name', 'mon.test',
- '--meta-json', '{"service_name": "mon", "ports": [], "ip": null, "deployed_by": []}',
+ '--meta-json', '{"service_name": "mon", "ports": [], "ip": null, "deployed_by": [], "rank": null, "rank_generation": null}',
'--config-json', '-',
'--reconfig',
],
+ '"keyring": "", "files": {"config": "[mon.test]\\npublic network = 127.0.0.0/8\\n"}}',
image='')
+ @mock.patch("cephadm.serve.CephadmServe._run_cephadm")
+ def test_monitoring_ports(self, _run_cephadm, cephadm_module: CephadmOrchestrator):
+ _run_cephadm.return_value = ('{}', '', 0)
+
+ with with_host(cephadm_module, 'test'):
+
+ yaml_str = """service_type: alertmanager
+service_name: alertmanager
+placement:
+ count: 1
+spec:
+ port: 4200
+"""
+ yaml_file = yaml.safe_load(yaml_str)
+ spec = ServiceSpec.from_json(yaml_file)
+
+ with mock.patch("cephadm.services.monitoring.AlertmanagerService.generate_config", return_value=({}, [])):
+ with with_service(cephadm_module, spec):
+
+ CephadmServe(cephadm_module)._check_daemons()
+
+ _run_cephadm.assert_called_with(
+ 'test', 'alertmanager.test', 'deploy', [
+ '--name', 'alertmanager.test',
+ '--meta-json', '{"service_name": "alertmanager", "ports": [4200, 9094], "ip": null, "deployed_by": [], "rank": null, "rank_generation": null}',
+ '--config-json', '-',
+ '--tcp-ports', '4200 9094',
+ '--reconfig'
+ ],
+ stdin='{}',
+ image='')
+
@mock.patch("cephadm.serve.CephadmServe._run_cephadm", _run_cephadm('{}'))
def test_daemon_check_post(self, cephadm_module: CephadmOrchestrator):
with with_host(cephadm_module, 'test'):
with mock.patch("cephadm.module.CephadmOrchestrator.mon_command") as _mon_cmd:
CephadmServe(cephadm_module)._check_daemons()
_mon_cmd.assert_any_call(
- {'prefix': 'dashboard set-grafana-api-url', 'value': 'https://test:3000'},
+ {'prefix': 'dashboard set-grafana-api-url', 'value': 'https://1.2.3.4:3000'},
None)
@mock.patch("cephadm.serve.CephadmServe._run_cephadm", _run_cephadm('[]'))
}
json_out = json.dumps(dict_out)
_mon_cmd.return_value = (0, json_out, '')
- out = cephadm_module.osd_service.find_destroyed_osds()
- assert out == {'host1': ['0']}
+ osd_claims = OsdIdClaims(cephadm_module)
+ assert osd_claims.get() == {'host1': ['0']}
+ assert osd_claims.filtered_by_host('host1') == ['0']
+ assert osd_claims.filtered_by_host('host1.domain.com') == ['0']
@ pytest.mark.parametrize(
"ceph_services, cephadm_daemons, strays_expected, metadata",
def test_find_destroyed_osds_cmd_failure(self, _mon_cmd, cephadm_module):
_mon_cmd.return_value = (1, "", "fail_msg")
with pytest.raises(OrchestratorError):
- cephadm_module.osd_service.find_destroyed_osds()
+ OsdIdClaims(cephadm_module)
@mock.patch("cephadm.serve.CephadmServe._run_cephadm")
def test_apply_osd_save(self, _run_cephadm, cephadm_module: CephadmOrchestrator):
})
@mock.patch("cephadm.serve.CephadmServe._run_cephadm", _run_cephadm('{}'))
- @mock.patch("cephadm.module.CephadmOrchestrator.rados", mock.MagicMock())
+ @mock.patch("cephadm.services.nfs.NFSService.run_grace_tool", mock.MagicMock())
+ @mock.patch("cephadm.services.nfs.NFSService.purge", mock.MagicMock())
+ @mock.patch("cephadm.services.nfs.NFSService.create_rados_config_obj", mock.MagicMock())
def test_nfs(self, cephadm_module):
with with_host(cephadm_module, 'test'):
ps = PlacementSpec(hosts=['test'], count=1)
assert_rm_daemon(cephadm_module, 'nfs.name.test', 'test')
@mock.patch("cephadm.serve.CephadmServe._run_cephadm", _run_cephadm('{}'))
+ @mock.patch("subprocess.run", None)
@mock.patch("cephadm.module.CephadmOrchestrator.rados", mock.MagicMock())
def test_iscsi(self, cephadm_module):
with with_host(cephadm_module, 'test'):
]
)
@mock.patch("cephadm.serve.CephadmServe._deploy_cephadm_binary", _deploy_cephadm_binary('test'))
+ @mock.patch("subprocess.run", None)
@mock.patch("cephadm.serve.CephadmServe._run_cephadm", _run_cephadm('{}'))
+ @mock.patch("cephadm.services.nfs.NFSService.run_grace_tool", mock.MagicMock())
+ @mock.patch("cephadm.services.nfs.NFSService.create_rados_config_obj", mock.MagicMock())
+ @mock.patch("cephadm.services.nfs.NFSService.purge", mock.MagicMock())
+ @mock.patch("subprocess.run", mock.MagicMock())
def test_apply_save(self, spec: ServiceSpec, meth, cephadm_module: CephadmOrchestrator):
with with_host(cephadm_module, 'test'):
with with_service(cephadm_module, spec, meth, 'test'):
assert "Host 'test' not found" in err
out = wait(cephadm_module, cephadm_module.get_hosts())[0].to_json()
- assert out == HostSpec('test', 'test', status='Offline').to_json()
+ assert out == HostSpec('test', '1.2.3.4', status='Offline').to_json()
_get_connection.side_effect = None
assert CephadmServe(cephadm_module)._check_host('test') is None
out = wait(cephadm_module, cephadm_module.get_hosts())[0].to_json()
- assert out == HostSpec('test', 'test').to_json()
+ assert out == HostSpec('test', '1.2.3.4').to_json()
+
+ @mock.patch("cephadm.serve.CephadmServe._run_cephadm", _run_cephadm('{}'))
+ def test_dont_touch_offline_or_maintenance_host_daemons(self, cephadm_module):
+ # test daemons on offline/maint hosts not removed when applying specs
+ # test daemons not added to hosts in maint/offline state
+ with with_host(cephadm_module, 'test1'):
+ with with_host(cephadm_module, 'test2'):
+ with with_host(cephadm_module, 'test3'):
+ with with_service(cephadm_module, ServiceSpec('mgr', placement=PlacementSpec(host_pattern='*'))):
+ # should get a mgr on all 3 hosts
+ # CephadmServe(cephadm_module)._apply_all_services()
+ assert len(cephadm_module.cache.get_daemons_by_type('mgr')) == 3
+
+ # put one host in offline state and one host in maintenance state
+ cephadm_module.inventory._inventory['test2']['status'] = 'offline'
+ cephadm_module.inventory._inventory['test3']['status'] = 'maintenance'
+ cephadm_module.inventory.save()
+
+ # being in offline/maint mode should disqualify hosts from being
+ # candidates for scheduling
+ candidates = [
+ h.hostname for h in cephadm_module._schedulable_hosts()]
+ assert 'test2' not in candidates
+ assert 'test3' not in candidates
+
+ with with_service(cephadm_module, ServiceSpec('crash', placement=PlacementSpec(host_pattern='*'))):
+ # re-apply services. No mgr should be removed from maint/offline hosts
+ # crash daemon should only be on host not in maint/offline mode
+ CephadmServe(cephadm_module)._apply_all_services()
+ assert len(cephadm_module.cache.get_daemons_by_type('mgr')) == 3
+ assert len(cephadm_module.cache.get_daemons_by_type('crash')) == 1
def test_stale_connections(self, cephadm_module):
class Connection(object):
@mock.patch("cephadm.module.CephadmOrchestrator._get_connection")
@mock.patch("remoto.process.check")
- def test_etc_ceph(self, _check, _get_connection, cephadm_module):
+ @mock.patch("cephadm.module.CephadmServe._write_remote_file")
+ def test_etc_ceph(self, _write_file, _check, _get_connection, cephadm_module):
_get_connection.return_value = mock.Mock(), mock.Mock()
_check.return_value = '{}', '', 0
+ _write_file.return_value = None
assert cephadm_module.manage_etc_ceph_ceph_conf is False
with with_host(cephadm_module, 'test'):
- assert not cephadm_module.cache.host_needs_new_etc_ceph_ceph_conf('test')
+ assert '/etc/ceph/ceph.conf' not in cephadm_module.cache.get_host_client_files('test')
with with_host(cephadm_module, 'test'):
cephadm_module.set_module_option('manage_etc_ceph_ceph_conf', True)
assert cephadm_module.manage_etc_ceph_ceph_conf is True
CephadmServe(cephadm_module)._refresh_hosts_and_daemons()
- _check.assert_called_with(ANY, ['dd', 'of=/etc/ceph/ceph.conf'], stdin=b'')
+ _write_file.assert_called_with('test', '/etc/ceph/ceph.conf', b'',
+ 0o644, 0, 0)
- assert not cephadm_module.cache.host_needs_new_etc_ceph_ceph_conf('test')
+ assert '/etc/ceph/ceph.conf' in cephadm_module.cache.get_host_client_files('test')
# set extra config and expect that we deploy another ceph.conf
cephadm_module._set_extra_ceph_conf('[mon]\nk=v')
CephadmServe(cephadm_module)._refresh_hosts_and_daemons()
- _check.assert_called_with(
- ANY, ['dd', 'of=/etc/ceph/ceph.conf'], stdin=b'\n\n[mon]\nk=v\n')
+ _write_file.assert_called_with('test', '/etc/ceph/ceph.conf',
+ b'\n\n[mon]\nk=v\n', 0o644, 0, 0)
# reload
- cephadm_module.cache.last_etc_ceph_ceph_conf = {}
+ cephadm_module.cache.last_client_files = {}
cephadm_module.cache.load()
- assert not cephadm_module.cache.host_needs_new_etc_ceph_ceph_conf('test')
+ assert '/etc/ceph/ceph.conf' in cephadm_module.cache.get_host_client_files('test')
# Make sure, _check_daemons does a redeploy due to monmap change:
- cephadm_module.mock_store_set('_ceph_get', 'mon_map', {
- 'modified': datetime_to_str(datetime_now()),
- 'fsid': 'foobar',
- })
- cephadm_module.notify('mon_map', mock.MagicMock())
- assert cephadm_module.cache.host_needs_new_etc_ceph_ceph_conf('test')
- cephadm_module.cache.last_etc_ceph_ceph_conf = {}
- cephadm_module.cache.load()
- assert cephadm_module.cache.host_needs_new_etc_ceph_ceph_conf('test')
+ before_digest = cephadm_module.cache.get_host_client_files('test')[
+ '/etc/ceph/ceph.conf'][0]
+ cephadm_module._set_extra_ceph_conf('[mon]\nk2=v2')
+ CephadmServe(cephadm_module)._refresh_hosts_and_daemons()
+ after_digest = cephadm_module.cache.get_host_client_files('test')[
+ '/etc/ceph/ceph.conf'][0]
+ assert before_digest != after_digest
def test_etc_ceph_init(self):
with with_cephadm_module({'manage_etc_ceph_ceph_conf': True}) as m:
]
@mock.patch("cephadm.serve.CephadmServe._run_cephadm")
- def test_osd_activate(self, _run_cephadm, cephadm_module: CephadmOrchestrator):
+ def test_osd_activate_datadevice(self, _run_cephadm, cephadm_module: CephadmOrchestrator):
_run_cephadm.return_value = ('{}', '', 0)
with with_host(cephadm_module, 'test', refresh_hosts=False):
cephadm_module.mock_store_set('_ceph_get', 'osd_map', {
'tags': {
'ceph.cluster_fsid': cephadm_module._cluster_fsid,
'ceph.osd_fsid': 'uuid'
+ },
+ 'type': 'data'
+ }]
+ }
+ _run_cephadm.return_value = (json.dumps(ceph_volume_lvm_list), '', 0)
+ _run_cephadm.reset_mock()
+ assert cephadm_module._osd_activate(
+ ['test']).stdout == "Created osd(s) 1 on host 'test'"
+ assert _run_cephadm.mock_calls == [
+ mock.call('test', 'osd', 'ceph-volume',
+ ['--', 'lvm', 'list', '--format', 'json'], no_fsid=False, image=''),
+ mock.call('test', 'osd.1', 'deploy',
+ ['--name', 'osd.1', '--meta-json', mock.ANY,
+ '--config-json', '-', '--osd-fsid', 'uuid'],
+ stdin=mock.ANY, image=''),
+ ]
+
+ @mock.patch("cephadm.serve.CephadmServe._run_cephadm")
+ def test_osd_activate_datadevice_dbdevice(self, _run_cephadm, cephadm_module: CephadmOrchestrator):
+ _run_cephadm.return_value = ('{}', '', 0)
+ with with_host(cephadm_module, 'test', refresh_hosts=False):
+ cephadm_module.mock_store_set('_ceph_get', 'osd_map', {
+ 'osds': [
+ {
+ 'osd': 1,
+ 'up_from': 0,
+ 'uuid': 'uuid'
}
+ ]
+ })
+
+ ceph_volume_lvm_list = {
+ '1': [{
+ 'tags': {
+ 'ceph.cluster_fsid': cephadm_module._cluster_fsid,
+ 'ceph.osd_fsid': 'uuid'
+ },
+ 'type': 'data'
+ }, {
+ 'tags': {
+ 'ceph.cluster_fsid': cephadm_module._cluster_fsid,
+ 'ceph.osd_fsid': 'uuid'
+ },
+ 'type': 'db'
}]
}
_run_cephadm.return_value = (json.dumps(ceph_volume_lvm_list), '', 0)
+ _run_cephadm.reset_mock()
assert cephadm_module._osd_activate(
['test']).stdout == "Created osd(s) 1 on host 'test'"
+ assert _run_cephadm.mock_calls == [
+ mock.call('test', 'osd', 'ceph-volume',
+ ['--', 'lvm', 'list', '--format', 'json'], no_fsid=False, image=''),
+ mock.call('test', 'osd.1', 'deploy',
+ ['--name', 'osd.1', '--meta-json', mock.ANY,
+ '--config-json', '-', '--osd-fsid', 'uuid'],
+ stdin=mock.ANY, image=''),
+ ]
# fmt: off
-from typing import NamedTuple, List, Dict
+from typing import NamedTuple, List, Dict, Optional
import pytest
from ceph.deployment.hostspec import HostSpec
placement: PlacementSpec
hosts: List[str]
daemons: List[DaemonDescription]
+ rank_map: Optional[Dict[int, Dict[int, Optional[str]]]]
+ post_rank_map: Optional[Dict[int, Dict[int, Optional[str]]]]
expected: List[str]
expected_add: List[str]
expected_remove: List[DaemonDescription]
-@pytest.mark.parametrize("service_type,placement,hosts,daemons,expected,expected_add,expected_remove",
+@pytest.mark.parametrize("service_type,placement,hosts,daemons,rank_map,post_rank_map,expected,expected_add,expected_remove",
[ # noqa: E128
# just hosts
NodeAssignmentTest(
PlacementSpec(hosts=['smithi060']),
['smithi060'],
[],
+ None, None,
['mgr:smithi060'], ['mgr:smithi060'], []
),
# all_hosts
DaemonDescription('mgr', 'a', 'host1'),
DaemonDescription('mgr', 'b', 'host2'),
],
+ None, None,
['mgr:host1', 'mgr:host2', 'mgr:host3'],
['mgr:host3'],
[]
DaemonDescription('mds', 'a', 'host1'),
DaemonDescription('mds', 'b', 'host2'),
],
+ None, None,
['mds:host1', 'mds:host2', 'mds:host3', 'mds:host1', 'mds:host2', 'mds:host3'],
['mds:host3', 'mds:host1', 'mds:host2', 'mds:host3'],
[]
PlacementSpec(count=4),
'host1 host2 host3'.split(),
[],
+ None, None,
['mgr:host1', 'mgr:host2', 'mgr:host3'],
['mgr:host1', 'mgr:host2', 'mgr:host3'],
[]
PlacementSpec(count=6),
'host1 host2 host3'.split(),
[],
+ None, None,
['mds:host1', 'mds:host2', 'mds:host3', 'mds:host1', 'mds:host2', 'mds:host3'],
['mds:host1', 'mds:host2', 'mds:host3', 'mds:host1', 'mds:host2', 'mds:host3'],
[]
DaemonDescription('mgr', 'a', 'host1'),
DaemonDescription('mgr', 'b', 'host2'),
],
+ None, None,
['mgr:host3'],
['mgr:host3'],
['mgr.a', 'mgr.b']
DaemonDescription('mds', 'a', 'host1'),
DaemonDescription('mds', 'b', 'host2'),
],
+ None, None,
['mds:host3', 'mds:host3', 'mds:host3'],
['mds:host3', 'mds:host3', 'mds:host3'],
['mds.a', 'mds.b']
DaemonDescription('mgr', 'a', 'host1'),
DaemonDescription('mgr', 'b', 'host2'),
],
+ None, None,
['mgr:host3'],
['mgr:host3'],
['mgr.a', 'mgr.b']
[
DaemonDescription('mgr', 'a', 'host1'),
],
+ None, None,
['mgr:host3'],
['mgr:host3'],
['mgr.a']
[
DaemonDescription('mgr', 'a', 'host1'),
],
+ None, None,
['mgr:host1'],
[],
[]
[
DaemonDescription('mgr', 'a', 'host2'),
],
+ None, None,
['mgr:host1'],
['mgr:host1'],
['mgr.a']
PlacementSpec(label='foo'),
'host1 host2 host3'.split(),
[],
+ None, None,
['mgr:host1', 'mgr:host2', 'mgr:host3'],
['mgr:host1', 'mgr:host2', 'mgr:host3'],
[]
PlacementSpec(count=4, label='foo'),
'host1 host2 host3'.split(),
[],
+ None, None,
['mgr:host1', 'mgr:host2', 'mgr:host3'],
['mgr:host1', 'mgr:host2', 'mgr:host3'],
[]
PlacementSpec(count=6, label='foo'),
'host1 host2 host3'.split(),
[],
+ None, None,
['mds:host1', 'mds:host2', 'mds:host3', 'mds:host1', 'mds:host2', 'mds:host3'],
['mds:host1', 'mds:host2', 'mds:host3', 'mds:host1', 'mds:host2', 'mds:host3'],
[]
PlacementSpec(label='foo', count_per_host=3),
'host1 host2 host3'.split(),
[],
+ None, None,
['mds:host1', 'mds:host2', 'mds:host3', 'mds:host1', 'mds:host2', 'mds:host3',
'mds:host1', 'mds:host2', 'mds:host3'],
['mds:host1', 'mds:host2', 'mds:host3', 'mds:host1', 'mds:host2', 'mds:host3',
PlacementSpec(host_pattern='mgr*'),
'mgrhost1 mgrhost2 datahost'.split(),
[],
+ None, None,
['mgr:mgrhost1', 'mgr:mgrhost2'],
['mgr:mgrhost1', 'mgr:mgrhost2'],
[]
PlacementSpec(host_pattern='mds*', count_per_host=3),
'mdshost1 mdshost2 datahost'.split(),
[],
+ None, None,
['mds:mdshost1', 'mds:mdshost2', 'mds:mdshost1', 'mds:mdshost2', 'mds:mdshost1', 'mds:mdshost2'],
['mds:mdshost1', 'mds:mdshost2', 'mds:mdshost1', 'mds:mdshost2', 'mds:mdshost1', 'mds:mdshost2'],
[]
PlacementSpec(count=6, label='foo'),
'host1 host2 host3'.split(),
[],
+ None, None,
['rgw:host1(*:80)', 'rgw:host2(*:80)', 'rgw:host3(*:80)',
'rgw:host1(*:81)', 'rgw:host2(*:81)', 'rgw:host3(*:81)'],
['rgw:host1(*:80)', 'rgw:host2(*:80)', 'rgw:host3(*:80)',
DaemonDescription('rgw', 'b', 'host2', ports=[80]),
DaemonDescription('rgw', 'c', 'host1', ports=[82]),
],
+ None, None,
['rgw:host1(*:80)', 'rgw:host2(*:80)', 'rgw:host3(*:80)',
'rgw:host1(*:81)', 'rgw:host2(*:81)', 'rgw:host3(*:81)'],
['rgw:host1(*:80)', 'rgw:host3(*:80)',
DaemonDescription('mgr', 'y', 'host1'),
DaemonDescription('mgr', 'x', 'host2'),
],
+ None, None,
['mgr:host1(name=y)', 'mgr:host2(name=x)'],
[], []
),
+
+ # note: host -> rank mapping is psuedo-random based on svc name, so these
+ # host/rank pairs may seem random but they match the nfs.mynfs seed used by
+ # the test.
+
+ # ranked, fresh
+ NodeAssignmentTest(
+ 'nfs',
+ PlacementSpec(count=3),
+ 'host1 host2 host3'.split(),
+ [],
+ {},
+ {0: {0: None}, 1: {0: None}, 2: {0: None}},
+ ['nfs:host1(rank=0.0)', 'nfs:host2(rank=1.0)', 'nfs:host3(rank=2.0)'],
+ ['nfs:host1(rank=0.0)', 'nfs:host2(rank=1.0)', 'nfs:host3(rank=2.0)'],
+ []
+ ),
+ # 21: ranked, exist
+ NodeAssignmentTest(
+ 'nfs',
+ PlacementSpec(count=3),
+ 'host1 host2 host3'.split(),
+ [
+ DaemonDescription('nfs', '0.1', 'host1', rank=0, rank_generation=1),
+ ],
+ {0: {1: '0.1'}},
+ {0: {1: '0.1'}, 1: {0: None}, 2: {0: None}},
+ ['nfs:host1(rank=0.1)', 'nfs:host2(rank=1.0)', 'nfs:host3(rank=2.0)'],
+ ['nfs:host2(rank=1.0)', 'nfs:host3(rank=2.0)'],
+ []
+ ),
+ # ranked, exist, different ranks
+ NodeAssignmentTest(
+ 'nfs',
+ PlacementSpec(count=3),
+ 'host1 host2 host3'.split(),
+ [
+ DaemonDescription('nfs', '0.1', 'host1', rank=0, rank_generation=1),
+ DaemonDescription('nfs', '1.1', 'host2', rank=1, rank_generation=1),
+ ],
+ {0: {1: '0.1'}, 1: {1: '1.1'}},
+ {0: {1: '0.1'}, 1: {1: '1.1'}, 2: {0: None}},
+ ['nfs:host1(rank=0.1)', 'nfs:host2(rank=1.1)', 'nfs:host3(rank=2.0)'],
+ ['nfs:host3(rank=2.0)'],
+ []
+ ),
+ # ranked, exist, different ranks (2)
+ NodeAssignmentTest(
+ 'nfs',
+ PlacementSpec(count=3),
+ 'host1 host2 host3'.split(),
+ [
+ DaemonDescription('nfs', '0.1', 'host1', rank=0, rank_generation=1),
+ DaemonDescription('nfs', '1.1', 'host3', rank=1, rank_generation=1),
+ ],
+ {0: {1: '0.1'}, 1: {1: '1.1'}},
+ {0: {1: '0.1'}, 1: {1: '1.1'}, 2: {0: None}},
+ ['nfs:host1(rank=0.1)', 'nfs:host3(rank=1.1)', 'nfs:host2(rank=2.0)'],
+ ['nfs:host2(rank=2.0)'],
+ []
+ ),
+ # ranked, exist, extra ranks
+ NodeAssignmentTest(
+ 'nfs',
+ PlacementSpec(count=3),
+ 'host1 host2 host3'.split(),
+ [
+ DaemonDescription('nfs', '0.5', 'host1', rank=0, rank_generation=5),
+ DaemonDescription('nfs', '1.5', 'host2', rank=1, rank_generation=5),
+ DaemonDescription('nfs', '4.5', 'host2', rank=4, rank_generation=5),
+ ],
+ {0: {5: '0.5'}, 1: {5: '1.5'}},
+ {0: {5: '0.5'}, 1: {5: '1.5'}, 2: {0: None}},
+ ['nfs:host1(rank=0.5)', 'nfs:host2(rank=1.5)', 'nfs:host3(rank=2.0)'],
+ ['nfs:host3(rank=2.0)'],
+ ['nfs.4.5']
+ ),
+ # 25: ranked, exist, extra ranks (scale down: kill off high rank)
+ NodeAssignmentTest(
+ 'nfs',
+ PlacementSpec(count=2),
+ 'host3 host2 host1'.split(),
+ [
+ DaemonDescription('nfs', '0.5', 'host1', rank=0, rank_generation=5),
+ DaemonDescription('nfs', '1.5', 'host2', rank=1, rank_generation=5),
+ DaemonDescription('nfs', '2.5', 'host3', rank=2, rank_generation=5),
+ ],
+ {0: {5: '0.5'}, 1: {5: '1.5'}, 2: {5: '2.5'}},
+ {0: {5: '0.5'}, 1: {5: '1.5'}, 2: {5: '2.5'}},
+ ['nfs:host1(rank=0.5)', 'nfs:host2(rank=1.5)'],
+ [],
+ ['nfs.2.5']
+ ),
+ # ranked, exist, extra ranks (scale down hosts)
+ NodeAssignmentTest(
+ 'nfs',
+ PlacementSpec(count=2),
+ 'host1 host3'.split(),
+ [
+ DaemonDescription('nfs', '0.5', 'host1', rank=0, rank_generation=5),
+ DaemonDescription('nfs', '1.5', 'host2', rank=1, rank_generation=5),
+ DaemonDescription('nfs', '2.5', 'host3', rank=4, rank_generation=5),
+ ],
+ {0: {5: '0.5'}, 1: {5: '1.5'}, 2: {5: '2.5'}},
+ {0: {5: '0.5'}, 1: {5: '1.5', 6: None}, 2: {5: '2.5'}},
+ ['nfs:host1(rank=0.5)', 'nfs:host3(rank=1.6)'],
+ ['nfs:host3(rank=1.6)'],
+ ['nfs.2.5', 'nfs.1.5']
+ ),
+ # ranked, exist, duplicate rank
+ NodeAssignmentTest(
+ 'nfs',
+ PlacementSpec(count=3),
+ 'host1 host2 host3'.split(),
+ [
+ DaemonDescription('nfs', '0.0', 'host1', rank=0, rank_generation=0),
+ DaemonDescription('nfs', '1.1', 'host2', rank=1, rank_generation=1),
+ DaemonDescription('nfs', '1.2', 'host3', rank=1, rank_generation=2),
+ ],
+ {0: {0: '0.0'}, 1: {2: '1.2'}},
+ {0: {0: '0.0'}, 1: {2: '1.2'}, 2: {0: None}},
+ ['nfs:host1(rank=0.0)', 'nfs:host3(rank=1.2)', 'nfs:host2(rank=2.0)'],
+ ['nfs:host2(rank=2.0)'],
+ ['nfs.1.1']
+ ),
+ # 28: ranked, all gens stale (failure during update cycle)
+ NodeAssignmentTest(
+ 'nfs',
+ PlacementSpec(count=2),
+ 'host1 host2 host3'.split(),
+ [
+ DaemonDescription('nfs', '0.2', 'host1', rank=0, rank_generation=2),
+ DaemonDescription('nfs', '1.2', 'host2', rank=1, rank_generation=2),
+ ],
+ {0: {2: '0.2'}, 1: {2: '1.2', 3: '1.3'}},
+ {0: {2: '0.2'}, 1: {2: '1.2', 3: '1.3', 4: None}},
+ ['nfs:host1(rank=0.2)', 'nfs:host2(rank=1.4)'],
+ ['nfs:host2(rank=1.4)'],
+ ['nfs.1.2']
+ ),
+ # ranked, not enough hosts
+ NodeAssignmentTest(
+ 'nfs',
+ PlacementSpec(count=4),
+ 'host1 host2 host3'.split(),
+ [
+ DaemonDescription('nfs', '0.2', 'host1', rank=0, rank_generation=2),
+ DaemonDescription('nfs', '1.2', 'host2', rank=1, rank_generation=2),
+ ],
+ {0: {2: '0.2'}, 1: {2: '1.2'}},
+ {0: {2: '0.2'}, 1: {2: '1.2'}, 2: {0: None}},
+ ['nfs:host1(rank=0.2)', 'nfs:host2(rank=1.2)', 'nfs:host3(rank=2.0)'],
+ ['nfs:host3(rank=2.0)'],
+ []
+ ),
+ # ranked, scale down
+ NodeAssignmentTest(
+ 'nfs',
+ PlacementSpec(hosts=['host2']),
+ 'host1 host2'.split(),
+ [
+ DaemonDescription('nfs', '0.2', 'host1', rank=0, rank_generation=2),
+ DaemonDescription('nfs', '1.2', 'host2', rank=1, rank_generation=2),
+ DaemonDescription('nfs', '2.2', 'host3', rank=2, rank_generation=2),
+ ],
+ {0: {2: '0.2'}, 1: {2: '1.2'}, 2: {2: '2.2'}},
+ {0: {2: '0.2', 3: None}, 1: {2: '1.2'}, 2: {2: '2.2'}},
+ ['nfs:host2(rank=0.3)'],
+ ['nfs:host2(rank=0.3)'],
+ ['nfs.0.2', 'nfs.1.2', 'nfs.2.2']
+ ),
+
])
-def test_node_assignment(service_type, placement, hosts, daemons,
+def test_node_assignment(service_type, placement, hosts, daemons, rank_map, post_rank_map,
expected, expected_add, expected_remove):
+ spec = None
service_id = None
allow_colo = False
if service_type == 'rgw':
elif service_type == 'mds':
service_id = 'myfs'
allow_colo = True
-
- spec = ServiceSpec(service_type=service_type,
- service_id=service_id,
- placement=placement)
+ elif service_type == 'nfs':
+ service_id = 'mynfs'
+ spec = ServiceSpec(service_type=service_type,
+ service_id=service_id,
+ placement=placement,
+ pool='foo')
+
+ if not spec:
+ spec = ServiceSpec(service_type=service_type,
+ service_id=service_id,
+ placement=placement)
all_slots, to_add, to_remove = HostAssignment(
spec=spec,
hosts=[HostSpec(h, labels=['foo']) for h in hosts],
daemons=daemons,
allow_colo=allow_colo,
+ rank_map=rank_map,
).place()
+ assert rank_map == post_rank_map
+
got = [str(p) for p in all_slots]
num_wildcard = 0
for i in expected:
from orchestrator._interface import DaemonDescription
+class FakeInventory:
+ def get_addr(self, name: str) -> str:
+ return '1.2.3.4'
+
+
class FakeMgr:
def __init__(self):
self.config = ''
self.mon_command = MagicMock(side_effect=self._check_mon_command)
self.template = MagicMock()
self.log = MagicMock()
+ self.inventory = FakeInventory()
def _check_mon_command(self, cmd_dict, inbuf=None):
prefix = cmd_dict.get('prefix')
from cephadm import CephadmOrchestrator
from cephadm.upgrade import CephadmUpgrade
from cephadm.serve import CephadmServe
+from orchestrator import OrchestratorError, DaemonDescription
from .fixtures import _run_cephadm, wait, with_host, with_service
@mock.patch("cephadm.serve.CephadmServe._run_cephadm", _run_cephadm('{}'))
def test_upgrade_start(cephadm_module: CephadmOrchestrator):
with with_host(cephadm_module, 'test'):
- assert wait(cephadm_module, cephadm_module.upgrade_start(
- 'image_id', None)) == 'Initiating upgrade to docker.io/image_id'
+ with with_host(cephadm_module, 'test2'):
+ with with_service(cephadm_module, ServiceSpec('mgr', placement=PlacementSpec(count=2))):
+ assert wait(cephadm_module, cephadm_module.upgrade_start(
+ 'image_id', None)) == 'Initiating upgrade to docker.io/image_id'
- assert wait(cephadm_module, cephadm_module.upgrade_status()).target_image == 'docker.io/image_id'
+ assert wait(cephadm_module, cephadm_module.upgrade_status()
+ ).target_image == 'docker.io/image_id'
- assert wait(cephadm_module, cephadm_module.upgrade_pause()) == 'Paused upgrade to docker.io/image_id'
+ assert wait(cephadm_module, cephadm_module.upgrade_pause()
+ ) == 'Paused upgrade to docker.io/image_id'
- assert wait(cephadm_module, cephadm_module.upgrade_resume()
- ) == 'Resumed upgrade to docker.io/image_id'
+ assert wait(cephadm_module, cephadm_module.upgrade_resume()
+ ) == 'Resumed upgrade to docker.io/image_id'
- assert wait(cephadm_module, cephadm_module.upgrade_stop()) == 'Stopped upgrade to docker.io/image_id'
+ assert wait(cephadm_module, cephadm_module.upgrade_stop()
+ ) == 'Stopped upgrade to docker.io/image_id'
@mock.patch("cephadm.serve.CephadmServe._run_cephadm", _run_cephadm('{}'))
cephadm_module.set_store('upgrade_state', 'null')
CephadmUpgrade(cephadm_module)
assert CephadmUpgrade(cephadm_module).upgrade_state is None
+
+
+@mock.patch("cephadm.serve.CephadmServe._run_cephadm", _run_cephadm('{}'))
+def test_not_enough_mgrs(cephadm_module: CephadmOrchestrator):
+ with with_host(cephadm_module, 'host1'):
+ with with_service(cephadm_module, ServiceSpec('mgr', placement=PlacementSpec(count=1)), CephadmOrchestrator.apply_mgr, ''):
+ with pytest.raises(OrchestratorError):
+ wait(cephadm_module, cephadm_module.upgrade_start('image_id', None))
+
+
+@mock.patch("cephadm.serve.CephadmServe._run_cephadm", _run_cephadm('{}'))
+@mock.patch("cephadm.CephadmOrchestrator.check_mon_command")
+def test_enough_mons_for_ok_to_stop(check_mon_command, cephadm_module: CephadmOrchestrator):
+ # only 2 monitors, not enough for ok-to-stop to ever pass
+ check_mon_command.return_value = (
+ 0, '{"monmap": {"mons": [{"name": "mon.1"}, {"name": "mon.2"}]}}', '')
+ assert not cephadm_module.upgrade._enough_mons_for_ok_to_stop()
+
+ # 3 monitors, ok-to-stop should work fine
+ check_mon_command.return_value = (
+ 0, '{"monmap": {"mons": [{"name": "mon.1"}, {"name": "mon.2"}, {"name": "mon.3"}]}}', '')
+ assert cephadm_module.upgrade._enough_mons_for_ok_to_stop()
+
+
+@mock.patch("cephadm.serve.CephadmServe._run_cephadm", _run_cephadm('{}'))
+@mock.patch("cephadm.module.HostCache.get_daemons_by_service")
+@mock.patch("cephadm.CephadmOrchestrator.get")
+def test_enough_mds_for_ok_to_stop(get, get_daemons_by_service, cephadm_module: CephadmOrchestrator):
+ get.side_effect = [{'filesystems': [{'mdsmap': {'fs_name': 'test', 'max_mds': 1}}]}]
+ get_daemons_by_service.side_effect = [[DaemonDescription()]]
+ assert not cephadm_module.upgrade._enough_mds_for_ok_to_stop(
+ DaemonDescription(daemon_type='mds', daemon_id='test.host1.gfknd', service_name='mds.test'))
+
+ get.side_effect = [{'filesystems': [{'mdsmap': {'fs_name': 'myfs.test', 'max_mds': 2}}]}]
+ get_daemons_by_service.side_effect = [[DaemonDescription(), DaemonDescription()]]
+ assert not cephadm_module.upgrade._enough_mds_for_ok_to_stop(
+ DaemonDescription(daemon_type='mds', daemon_id='myfs.test.host1.gfknd', service_name='mds.myfs.test'))
+
+ get.side_effect = [{'filesystems': [{'mdsmap': {'fs_name': 'myfs.test', 'max_mds': 1}}]}]
+ get_daemons_by_service.side_effect = [[DaemonDescription(), DaemonDescription()]]
+ assert cephadm_module.upgrade._enough_mds_for_ok_to_stop(
+ DaemonDescription(daemon_type='mds', daemon_id='myfs.test.host1.gfknd', service_name='mds.myfs.test'))
from cephadm.serve import CephadmServe
from cephadm.services.cephadmservice import CephadmDaemonDeploySpec
from cephadm.utils import ceph_release_to_major, name_to_config_section, CEPH_UPGRADE_ORDER, MONITORING_STACK_TYPES
-from orchestrator import OrchestratorError, DaemonDescription, daemon_type_to_service
+from orchestrator import OrchestratorError, DaemonDescription, DaemonDescriptionStatus, daemon_type_to_service
if TYPE_CHECKING:
from .module import CephadmOrchestrator
self._save_upgrade_state()
return 'Resumed upgrade to %s' % self.target_image
return 'Upgrade to %s in progress' % self.target_image
+
+ running_mgr_count = len([daemon for daemon in self.mgr.cache.get_daemons_by_type(
+ 'mgr') if daemon.status == DaemonDescriptionStatus.running])
+
+ if running_mgr_count < 2:
+ raise OrchestratorError('Need at least 2 running mgr daemons for upgrade')
+
self.mgr.log.info('Upgrade: Started with target %s' % target_name)
self.upgrade_state = UpgradeState(
target_name=target_name,
return continue_upgrade
+ def _enough_mons_for_ok_to_stop(self) -> bool:
+ # type () -> bool
+ ret, out, err = self.mgr.check_mon_command({
+ 'prefix': 'quorum_status',
+ })
+ try:
+ j = json.loads(out)
+ except Exception:
+ raise OrchestratorError('failed to parse quorum status')
+
+ mons = [m['name'] for m in j['monmap']['mons']]
+ return len(mons) > 2
+
+ def _enough_mds_for_ok_to_stop(self, mds_daemon: DaemonDescription) -> bool:
+ # type (DaemonDescription) -> bool
+
+ # find fs this mds daemon belongs to
+ fsmap = self.mgr.get("fs_map")
+ for i in fsmap.get('filesystems', []):
+ fs = i["mdsmap"]
+ fs_name = fs["fs_name"]
+
+ assert mds_daemon.daemon_id
+ if fs_name != mds_daemon.service_name().split('.', 1)[1]:
+ # wrong fs for this mds daemon
+ continue
+
+ # get number of mds daemons for this fs
+ mds_count = len(
+ [daemon for daemon in self.mgr.cache.get_daemons_by_service(mds_daemon.service_name())])
+
+ # standby mds daemons for this fs?
+ if fs["max_mds"] < mds_count:
+ return True
+ return False
+
+ return True # if mds has no fs it should pass ok-to-stop
+
def _do_upgrade(self):
# type: () -> None
if not self.upgrade_state:
to_upgrade.append(d_entry)
continue
- if d.daemon_type in ['mon', 'osd', 'mds']:
+ if d.daemon_type == 'osd':
# NOTE: known_ok_to_stop is an output argument for
# _wait_for_ok_to_stop
if not self._wait_for_ok_to_stop(d, known_ok_to_stop):
return
+ if d.daemon_type == 'mon' and self._enough_mons_for_ok_to_stop():
+ if not self._wait_for_ok_to_stop(d, known_ok_to_stop):
+ return
+
+ if d.daemon_type == 'mds' and self._enough_mds_for_ok_to_stop(d):
+ if not self._wait_for_ok_to_stop(d, known_ok_to_stop):
+ return
+
to_upgrade.append(d_entry)
# if we don't have a list of others to consider, stop now
def ceph_release_to_major(release: str) -> int:
return ord(release[0]) - ord('a') + 1
+
+
+def file_mode_to_str(mode: int) -> str:
+ r = ''
+ for shift in range(0, 9, 3):
+ r = (
+ f'{"r" if (mode >> shift) & 4 else "-"}'
+ f'{"w" if (mode >> shift) & 2 else "-"}'
+ f'{"x" if (mode >> shift) & 1 else "-"}'
+ ) + r
+ return r
--- /dev/null
+#!/usr/bin/env bash
+
+export PATH=/root/bin:$PATH
+mkdir /root/bin
+{% if ceph_dev_folder is defined %}
+ cp /mnt/{{ ceph_dev_folder }}/src/cephadm/cephadm /root/bin/cephadm
+{% else %}
+ cd /root/bin
+ curl --silent --remote-name --location https://raw.githubusercontent.com/ceph/ceph/master/src/cephadm/cephadm
+{% endif %}
+chmod +x /root/bin/cephadm
+mkdir -p /etc/ceph
+mon_ip=$(ifconfig eth0 | grep 'inet ' | awk '{ print $2}')
+{% if ceph_dev_folder is defined %}
+ cephadm bootstrap --mon-ip $mon_ip --initial-dashboard-password {{ admin_password }} --allow-fqdn-hostname --dashboard-password-noupdate --shared_ceph_folder /mnt/{{ ceph_dev_folder }}
+{% else %}
+ cephadm bootstrap --mon-ip $mon_ip --initial-dashboard-password {{ admin_password }} --allow-fqdn-hostname --dashboard-password-noupdate
+{% endif %}
+fsid=$(cat /etc/ceph/ceph.conf | grep fsid | awk '{ print $3}')
+{% for number in range(1, nodes) %}
+ ssh-copy-id -f -i /etc/ceph/ceph.pub -o StrictHostKeyChecking=no root@{{ prefix }}-node-0{{ number }}.{{ domain }}
+{% endfor %}
--- /dev/null
+parameters:
+ nodes: 3
+ pool: default
+ network: default
+ domain: cephlab.com
+ prefix: ceph
+ numcpus: 1
+ memory: 2048
+ image: fedora34
+ notify: false
+ admin_password: password
+ disks:
+ - 15
+ - 5
+
+{% for number in range(0, nodes) %}
+{{ prefix }}-node-0{{ number }}:
+ image: {{ image }}
+ numcpus: {{ numcpus }}
+ memory: {{ memory }}
+ reserveip: true
+ reservedns: true
+ sharedkey: true
+ domain: {{ domain }}
+ nets:
+ - {{ network }}
+ disks: {{ disks }}
+ pool: {{ pool }}
+ {% if ceph_dev_folder is defined %}
+ sharedfolders: [{{ ceph_dev_folder }}]
+ {% endif %}
+ cmds:
+ - dnf -y install python3 chrony lvm2 podman
+ - sed -i "s/SELINUX=enforcing/SELINUX=permissive/" /etc/selinux/config
+ - setenforce 0
+ {% if number == 0 %}
+ scripts:
+ - bootstrap-cluster.sh
+ {% endif %}
+{% endfor %}
--- /dev/null
+#!/usr/bin/env bash
+
+set -ex
+
+cleanup() {
+ if [[ -n "$JENKINS_HOME" ]]; then
+ printf "\n\nStarting cleanup...\n\n"
+ kcli delete plan -y ceph || true
+ sudo podman container prune -f
+ printf "\n\nCleanup completed.\n\n"
+ fi
+}
+
+on_error() {
+ if [ "$1" != "0" ]; then
+ printf "\n\nERROR $1 thrown on line $2\n\n"
+ printf "\n\nCollecting info...\n\n"
+ for vm_id in 0 1 2
+ do
+ local vm="ceph-node-0${vm_id}"
+ printf "\n\nDisplaying journalctl from VM ${vm}:\n\n"
+ kcli ssh -u root -- ${vm} 'journalctl --no-tail --no-pager -t cloud-init' || true
+ printf "\n\nEnd of journalctl from VM ${vm}\n\n"
+ printf "\n\nDisplaying podman logs:\n\n"
+ kcli ssh -u root -- ${vm} 'podman logs --names --since 30s $(podman ps -aq)' || true
+ done
+ printf "\n\nTEST FAILED.\n\n"
+ fi
+}
+
+trap 'on_error $? $LINENO' ERR
+trap 'cleanup $? $LINENO' EXIT
+
+sed -i '/ceph-node-/d' $HOME/.ssh/known_hosts
+
+: ${CEPH_DEV_FOLDER:=${PWD}}
+
+# Required to start dashboard.
+cd ${CEPH_DEV_FOLDER}/src/pybind/mgr/dashboard/frontend
+NG_CLI_ANALYTICS=false npm ci
+npm run build
+
+cd ${CEPH_DEV_FOLDER}
+kcli delete plan -y ceph || true
+kcli create plan -f ./src/pybind/mgr/dashboard/ci/cephadm/ceph_cluster.yml -P ceph_dev_folder=${CEPH_DEV_FOLDER} ceph
+
+while [[ -z $(kcli ssh -u root -- ceph-node-00 'journalctl --no-tail --no-pager -t cloud-init' | grep "Dashboard is now available") ]]; do
+ sleep 30
+ kcli list vm
+ # Uncomment for debugging purposes.
+ #kcli ssh -u root -- ceph-node-00 'podman ps -a'
+ #kcli ssh -u root -- ceph-node-00 'podman logs --names --since 30s $(podman ps -aq)'
+ kcli ssh -u root -- ceph-node-00 'journalctl -n 100 --no-pager -t cloud-init'
+done
+
+cd ${CEPH_DEV_FOLDER}/src/pybind/mgr/dashboard/frontend
+npx cypress info
+
+: ${CYPRESS_BASE_URL:=''}
+: ${CYPRESS_LOGIN_USER:='admin'}
+: ${CYPRESS_LOGIN_PWD:='password'}
+: ${CYPRESS_ARGS:=''}
+
+if [[ -z "${CYPRESS_BASE_URL}" ]]; then
+ CYPRESS_BASE_URL="https://$(kcli info vm ceph-node-00 -f ip -v | sed -e 's/[^0-9.]//'):8443"
+fi
+
+export CYPRESS_BASE_URL CYPRESS_LOGIN_USER CYPRESS_LOGIN_PWD
+
+cypress_run () {
+ local specs="$1"
+ local timeout="$2"
+ local override_config="ignoreTestFiles=*.po.ts,retries=0,testFiles=${specs}"
+
+ if [[ -n "$timeout" ]]; then
+ override_config="${override_config},defaultCommandTimeout=${timeout}"
+ fi
+ npx cypress run ${CYPRESS_ARGS} --browser chrome --headless --config "$override_config"
+}
+
+cypress_run "orchestrator/workflow/*-spec.ts"
json_files = get_files(base_dir, 'json')
dashboards = {}
for json_file in json_files:
- with open(json_file) as f:
- dashboard_config = json.load(f)
- uid = dashboard_config.get('uid')
-
- # Grafana dashboard checks
- title = dashboard_config['title']
- assert len(title) > 0, \
- "Title not found in '{}'".format(json_file)
- assert len(dashboard_config.get('links', [])) == 0, \
- "Links found in '{}'".format(json_file)
- if not uid:
- continue
- if uid in dashboards:
- # duplicated uids
- error_msg = 'Duplicated UID {} found, already defined in {}'.\
- format(uid, dashboards[uid]['file'])
- exit(error_msg)
-
- dashboards[uid] = {
- 'file': json_file,
- 'title': title
- }
+ try:
+ with open(json_file) as f:
+ dashboard_config = json.load(f)
+ uid = dashboard_config.get('uid')
+ assert dashboard_config['id'] is None, \
+ "'id' not null: '{}'".format(dashboard_config['id'])
+
+ # Grafana dashboard checks
+ title = dashboard_config['title']
+ assert len(title) > 0, \
+ "Title not found in '{}'".format(json_file)
+ assert len(dashboard_config.get('links', [])) == 0, \
+ "Links found in '{}'".format(json_file)
+ if not uid:
+ continue
+ if uid in dashboards:
+ # duplicated uids
+ error_msg = 'Duplicated UID {} found, already defined in {}'.\
+ format(uid, dashboards[uid]['file'])
+ exit(error_msg)
+
+ dashboards[uid] = {
+ 'file': json_file,
+ 'title': title
+ }
+ except Exception as e:
+ print(f"Error in file {json_file}")
+ raise e
return dashboards
}
_method_mapping = collections.OrderedDict([
- ('list', {'method': 'GET', 'resource': False, 'status': 200}),
- ('create', {'method': 'POST', 'resource': False, 'status': 201}),
- ('bulk_set', {'method': 'PUT', 'resource': False, 'status': 200}),
- ('bulk_delete', {'method': 'DELETE', 'resource': False, 'status': 204}),
- ('get', {'method': 'GET', 'resource': True, 'status': 200}),
- ('delete', {'method': 'DELETE', 'resource': True, 'status': 204}),
- ('set', {'method': 'PUT', 'resource': True, 'status': 200}),
- ('singleton_set', {'method': 'PUT', 'resource': False, 'status': 200})
+ ('list', {'method': 'GET', 'resource': False, 'status': 200, 'version': DEFAULT_VERSION}),
+ ('create', {'method': 'POST', 'resource': False, 'status': 201, 'version': DEFAULT_VERSION}), # noqa E501 #pylint: disable=line-too-long
+ ('bulk_set', {'method': 'PUT', 'resource': False, 'status': 200, 'version': DEFAULT_VERSION}), # noqa E501 #pylint: disable=line-too-long
+ ('bulk_delete', {'method': 'DELETE', 'resource': False, 'status': 204, 'version': DEFAULT_VERSION}), # noqa E501 #pylint: disable=line-too-long
+ ('get', {'method': 'GET', 'resource': True, 'status': 200, 'version': DEFAULT_VERSION}),
+ ('delete', {'method': 'DELETE', 'resource': True, 'status': 204, 'version': DEFAULT_VERSION}), # noqa E501 #pylint: disable=line-too-long
+ ('set', {'method': 'PUT', 'resource': True, 'status': 200, 'version': DEFAULT_VERSION}),
+ ('singleton_set', {'method': 'PUT', 'resource': False, 'status': 200, 'version': DEFAULT_VERSION}) # noqa E501 #pylint: disable=line-too-long
])
@classmethod
status = meth['status']
method = meth['method']
+ if hasattr(func, "__method_map_method__"):
+ version = func.__method_map_method__['version']
if not sec_permissions:
permission = cls._permission_map[method]
- elif hasattr(func, "_collection_method_"):
- if func._collection_method_['path']:
- path = func._collection_method_['path']
+ elif hasattr(func, "__collection_method__"):
+ if func.__collection_method__['path']:
+ path = func.__collection_method__['path']
else:
path = "/{}".format(func.__name__)
- status = func._collection_method_['status']
- method = func._collection_method_['method']
- query_params = func._collection_method_['query_params']
- version = func._collection_method_['version']
+ status = func.__collection_method__['status']
+ method = func.__collection_method__['method']
+ query_params = func.__collection_method__['query_params']
+ version = func.__collection_method__['version']
if not sec_permissions:
permission = cls._permission_map[method]
- elif hasattr(func, "_resource_method_"):
+ elif hasattr(func, "__resource_method__"):
if not res_id_params:
no_resource_id_params = True
else:
path_params = ["{{{}}}".format(p) for p in res_id_params]
path += "/{}".format("/".join(path_params))
- if func._resource_method_['path']:
- path += func._resource_method_['path']
+ if func.__resource_method__['path']:
+ path += func.__resource_method__['path']
else:
path += "/{}".format(func.__name__)
- status = func._resource_method_['status']
- method = func._resource_method_['method']
- version = func._resource_method_['version']
- query_params = func._resource_method_['query_params']
+ status = func.__resource_method__['status']
+ method = func.__resource_method__['method']
+ version = func.__resource_method__['version']
+ query_params = func.__resource_method__['query_params']
if not sec_permissions:
permission = cls._permission_map[method]
status = 200
def _wrapper(func):
- func._resource_method_ = {
+ func.__resource_method__ = {
'method': method,
'path': path,
'status': status,
return func
return _wrapper
+ @staticmethod
+ def MethodMap(resource=False, status=None, version=DEFAULT_VERSION): # noqa: N802
+
+ if status is None:
+ status = 200
+
+ def _wrapper(func):
+ func.__method_map_method__ = {
+ 'resource': resource,
+ 'status': status,
+ 'version': version
+ }
+ return func
+ return _wrapper
+
@staticmethod
def Collection(method=None, path=None, status=None, query_params=None, # noqa: N802
version=DEFAULT_VERSION):
status = 200
def _wrapper(func):
- func._collection_method_ = {
+ func.__collection_method__ = {
'method': method,
'path': path,
'status': status,
@ReadPermission
def info(self):
'''Used for crush rule creation modal'''
+ osd_map = mgr.get_osdmap()
+ crush = osd_map.get_crush()
+ crush.dump()
return {
'names': [r['rule_name'] for r in mgr.get('osd_map_crush')['rules']],
- 'nodes': mgr.get('osd_map_tree')['nodes']
+ 'nodes': mgr.get('osd_map_tree')['nodes'],
+ 'roots': crush.find_roots()
}
return schema.as_dict()
@classmethod
- def _gen_responses(cls, method, resp_object=None):
+ def _gen_responses(cls, method, resp_object=None, version=None):
resp: Dict[str, Dict[str, Union[str, Any]]] = {
'400': {
"description": "Operation exception. Please check the "
"response body for the stack trace."
}
}
+
+ if not version:
+ version = DEFAULT_VERSION
+
if method.lower() == 'get':
resp['200'] = {'description': "OK",
- 'content': {'application/vnd.ceph.api.v{}+json'.format(DEFAULT_VERSION):
+ 'content': {'application/vnd.ceph.api.v{}+json'.format(version):
{'type': 'object'}}}
if method.lower() == 'post':
resp['201'] = {'description': "Resource created.",
- 'content': {'application/vnd.ceph.api.v{}+json'.format(DEFAULT_VERSION):
+ 'content': {'application/vnd.ceph.api.v{}+json'.format(version):
{'type': 'object'}}}
if method.lower() == 'put':
resp['200'] = {'description': "Resource updated.",
- 'content': {'application/vnd.ceph.api.v{}+json'.format(DEFAULT_VERSION):
+ 'content': {'application/vnd.ceph.api.v{}+json'.format(version):
{'type': 'object'}}}
if method.lower() == 'delete':
resp['204'] = {'description': "Resource deleted.",
- 'content': {'application/vnd.ceph.api.v{}+json'.format(DEFAULT_VERSION):
+ 'content': {'application/vnd.ceph.api.v{}+json'.format(version):
{'type': 'object'}}}
if method.lower() in ['post', 'put', 'delete']:
resp['202'] = {'description': "Operation is still executing."
" Please check the task queue.",
- 'content': {'application/vnd.ceph.api.v{}+json'.format(DEFAULT_VERSION):
+ 'content': {'application/vnd.ceph.api.v{}+json'.format(version):
{'type': 'object'}}}
if resp_object:
if status_code in resp:
resp[status_code].update({
'content': {
- 'application/vnd.ceph.api.v{}+json'.format(DEFAULT_VERSION): {
+ 'application/vnd.ceph.api.v{}+json'.format(version): {
'schema': cls._gen_schema_for_content(response_body)}}})
return resp
return parameters
@classmethod
- def _gen_paths(cls, all_endpoints):
+ def gen_paths(cls, all_endpoints):
# pylint: disable=R0912
method_order = ['get', 'post', 'put', 'delete']
paths = {}
func = endpoint.func
summary = ''
+ version = ''
resp = {}
p_info = []
+
+ if hasattr(func, '__method_map_method__'):
+ version = func.__method_map_method__['version']
+
+ elif hasattr(func, '__resource_method__'):
+ version = func.__resource_method__['version']
+
+ elif hasattr(func, '__collection_method__'):
+ version = func.__collection_method__['version']
+
if hasattr(func, 'doc_info'):
if func.doc_info['summary']:
summary = func.doc_info['summary']
'tags': [cls._get_tag(endpoint)],
'description': func.__doc__,
'parameters': params,
- 'responses': cls._gen_responses(method, resp)
+ 'responses': cls._gen_responses(method, resp, version)
}
if summary:
methods[method.lower()]['summary'] = summary
host = cherrypy.request.base.split('://', 1)[1] if not offline else 'example.com'
logger.debug("Host: %s", host)
- paths = cls._gen_paths(all_endpoints)
+ paths = cls.gen_paths(all_endpoints)
if not base_url:
base_url = "/"
return inventory_hosts
+@allow_empty_body
+def add_host(hostname: str, addr: Optional[str] = None,
+ labels: Optional[List[str]] = None,
+ status: Optional[str] = None):
+ orch_client = OrchClient.instance()
+ host = Host()
+ host.check_orchestrator_host_op(orch_client, hostname)
+ orch_client.hosts.add(hostname, addr, labels)
+ if status == 'maintenance':
+ orch_client.hosts.enter_maintenance(hostname)
+
+
@ApiController('/host', Scope.HOSTS)
@ControllerDoc("Get Host Details", "Host")
class Host(RESTController):
@raise_if_no_orchestrator([OrchFeature.HOST_LIST, OrchFeature.HOST_CREATE])
@handle_orchestrator_error('host')
@host_task('create', {'hostname': '{hostname}'})
- def create(self, hostname): # pragma: no cover - requires realtime env
- orch_client = OrchClient.instance()
- self._check_orchestrator_host_op(orch_client, hostname, True)
- orch_client.hosts.add(hostname)
- create._cp_config = {'tools.json_in.force': False} # pylint: disable=W0212
+ @EndpointDoc('',
+ parameters={
+ 'hostname': (str, 'Hostname'),
+ 'addr': (str, 'Network Address'),
+ 'labels': ([str], 'Host Labels'),
+ 'status': (str, 'Host Status'),
+ },
+ responses={200: None, 204: None})
+ @RESTController.MethodMap(version='0.1')
+ def create(self, hostname: str,
+ addr: Optional[str] = None,
+ labels: Optional[List[str]] = None,
+ status: Optional[str] = None): # pragma: no cover - requires realtime env
+ add_host(hostname, addr, labels, status)
@raise_if_no_orchestrator([OrchFeature.HOST_LIST, OrchFeature.HOST_DELETE])
@handle_orchestrator_error('host')
@allow_empty_body
def delete(self, hostname): # pragma: no cover - requires realtime env
orch_client = OrchClient.instance()
- self._check_orchestrator_host_op(orch_client, hostname, False)
+ self.check_orchestrator_host_op(orch_client, hostname, False)
orch_client.hosts.remove(hostname)
- def _check_orchestrator_host_op(self, orch_client, hostname, add_host=True): # pragma:no cover
+ def check_orchestrator_host_op(self, orch_client, hostname, add=True): # pragma:no cover
"""Check if we can adding or removing a host with orchestrator
:param orch_client: Orchestrator client
:raise DashboardException
"""
host = orch_client.hosts.get(hostname)
- if add_host and host:
+ if add and host:
raise DashboardException(
code='orchestrator_add_existed_host',
msg='{} is already in orchestrator'.format(hostname),
component='orchestrator')
- if not add_host and not host:
+ if not add and not host:
raise DashboardException(
code='orchestrator_remove_nonexistent_host',
- msg='Remove a non-existent host {} from orchestrator'.format(
- hostname),
+ msg='Remove a non-existent host {} from orchestrator'.format(hostname),
component='orchestrator')
@RESTController.Resource('GET')
def daemons(self, hostname: str) -> List[dict]:
orch = OrchClient.instance()
daemons = orch.services.list_daemons(hostname=hostname)
- return [d.to_json() for d in daemons]
+ return [d.to_dict() for d in daemons]
@handle_orchestrator_error('host')
def get(self, hostname: str) -> Dict:
'force': (bool, 'Force Enter Maintenance')
},
responses={200: None, 204: None})
+ @RESTController.MethodMap(version='0.1')
def set(self, hostname: str, update_labels: bool = False,
labels: List[str] = None, maintenance: bool = False,
force: bool = False):
"""
notifications = []
- @Endpoint('POST', path='/')
+ @Endpoint('POST', path='/', version=None)
def fetch_alert(self, **notification):
notification['notified'] = datetime.now().isoformat()
notification['id'] = str(len(self.notifications))
retention_period_days, retention_period_years):
rgw_client = RgwClient.instance(owner, daemon_name)
return rgw_client.set_bucket_locking(bucket_name, mode,
- int(retention_period_days),
- int(retention_period_years))
+ retention_period_days,
+ retention_period_years)
@staticmethod
def strip_tenant_from_bucket_name(bucket_name):
uid_tenant = uid[:uid.find('$')] if uid.find('$') >= 0 else None
bucket_name = RgwBucket.get_s3_bucket_name(bucket, uid_tenant)
+ locking = self._get_locking(uid, daemon_name, bucket_name)
if versioning_state:
+ if versioning_state == 'Suspended' and locking['lock_enabled']:
+ raise DashboardException(msg='Bucket versioning cannot be disabled/suspended '
+ 'on buckets with object lock enabled ',
+ http_status_code=409, component='rgw')
self._set_versioning(uid, daemon_name, bucket_name, versioning_state,
mfa_delete, mfa_token_serial, mfa_token_pin)
# Update locking if it is enabled.
- locking = self._get_locking(uid, daemon_name, bucket_name)
if locking['lock_enabled']:
self._set_locking(uid, daemon_name, bucket_name, lock_mode,
lock_retention_period_days,
@raise_if_no_orchestrator([OrchFeature.SERVICE_LIST])
def list(self, service_name: Optional[str] = None) -> List[dict]:
orch = OrchClient.instance()
- return [service.to_json() for service in orch.services.list(service_name=service_name)]
+ return [service.to_dict() for service in orch.services.list(service_name=service_name)]
@raise_if_no_orchestrator([OrchFeature.SERVICE_LIST])
def get(self, service_name: str) -> List[dict]:
def daemons(self, service_name: str) -> List[dict]:
orch = OrchClient.instance()
daemons = orch.services.list_daemons(service_name=service_name)
- return [d.to_json() for d in daemons]
+ return [d.to_dict() for d in daemons]
@CreatePermission
@raise_if_no_orchestrator([OrchFeature.SERVICE_CREATE])
"supportFile": "cypress/support/index.ts",
"video": false,
"defaultCommandTimeout": 120000,
+ "responseTimeout": 45000,
"viewportHeight": 1080,
"viewportWidth": 1920,
"projectId": "k7ab29",
--- /dev/null
+[
+ {
+ "container_id": "9fa324d32bc8",
+ "container_image_digests": [
+ "docker.io/prom/alertmanager@sha256:7e4e9f7a0954b45736d149c40e9620a6664036bb05f0dce447bef5042b139f5d",
+ "docker.io/prom/alertmanager@sha256:b9323917a2eda265bec69e59a457f001c529facbbc8166df277f4850cdac61a0"
+ ],
+ "container_image_id": "0881eb8f169f5556a292b4e2c01d683172b12830a62a9225a98a8e206bb734f0",
+ "container_image_name": "docker.io/prom/alertmanager:v0.20.0",
+ "created": "2021-04-04T14:20:55.872521Z",
+ "daemon_id": "ceph-node-00",
+ "daemon_type": "alertmanager",
+ "events": [
+ "2021-04-04T14:20:55.970128Z daemon:alertmanager.ceph-node-00 [INFO] \"Deployed alertmanager.ceph-node-00 on host 'ceph-node-00.cephlab.com'\"",
+ "2021-04-04T14:25:37.637716Z daemon:alertmanager.ceph-node-00 [INFO] \"Reconfigured alertmanager.ceph-node-00 on host 'ceph-node-00.cephlab.com'\""
+ ],
+ "hostname": "ceph-node-00.cephlab.com",
+ "is_active": true,
+ "last_refresh": "2021-04-04T14:27:38.610198Z",
+ "memory_usage": 10471079,
+ "ports": [
+ 9093,
+ 9094
+ ],
+ "started": "2021-04-04T14:25:36.837872Z",
+ "status": 1,
+ "status_desc": "running",
+ "version": "0.20.0"
+ },
+ {
+ "container_id": "44add59a53bc",
+ "container_image_digests": [
+ "quay.ceph.io/ceph-ci/ceph@sha256:cfd9dc4a437e11894a9a0d930ed1221ccc4e939b943981f6dfbdc611816904d4"
+ ],
+ "container_image_id": "f72dfde44435bedf5e4c8be05c8194cc57f5f654b9bb146b73e81f1c5358b4c5",
+ "container_image_name": "quay.ceph.io/ceph-ci/ceph@sha256:cfd9dc4a437e11894a9a0d930ed1221ccc4e939b943981f6dfbdc611816904d4",
+ "created": "2021-04-04T14:21:00.330646Z",
+ "daemon_id": "ceph-node-00",
+ "daemon_type": "crash",
+ "events": [
+ "2021-04-04T14:21:00.456022Z daemon:crash.ceph-node-00 [INFO] \"Deployed crash.ceph-node-00 on host 'ceph-node-00.cephlab.com'\"",
+ "2021-04-04T14:25:41.234986Z daemon:crash.ceph-node-00 [INFO] \"Reconfigured crash.ceph-node-00 on host 'ceph-node-00.cephlab.com'\""
+ ],
+ "hostname": "ceph-node-00.cephlab.com",
+ "is_active": false,
+ "last_refresh": "2021-04-04T14:27:38.610356Z",
+ "memory_usage": 7190085,
+ "ports": [],
+ "started": "2021-04-04T14:20:59.550334Z",
+ "status": 1,
+ "status_desc": "running",
+ "version": "17.0.0-2786-g7fb0569e"
+ },
+ {
+ "container_id": "4a2180e2e4ae",
+ "container_image_digests": [
+ "quay.ceph.io/ceph-ci/ceph@sha256:cfd9dc4a437e11894a9a0d930ed1221ccc4e939b943981f6dfbdc611816904d4"
+ ],
+ "container_image_id": "f72dfde44435bedf5e4c8be05c8194cc57f5f654b9bb146b73e81f1c5358b4c5",
+ "container_image_name": "quay.ceph.io/ceph-ci/ceph@sha256:cfd9dc4a437e11894a9a0d930ed1221ccc4e939b943981f6dfbdc611816904d4",
+ "created": "2021-04-04T14:24:23.552501Z",
+ "daemon_id": "ceph-node-01",
+ "daemon_type": "crash",
+ "events": [
+ "2021-04-04T14:24:23.591035Z daemon:crash.ceph-node-01 [INFO] \"Deployed crash.ceph-node-01 on host 'ceph-node-01.cephlab.com'\"",
+ "2021-04-04T14:25:42.677262Z daemon:crash.ceph-node-01 [INFO] \"Reconfigured crash.ceph-node-01 on host 'ceph-node-01.cephlab.com'\""
+ ],
+ "hostname": "ceph-node-01.cephlab.com",
+ "is_active": false,
+ "last_refresh": "2021-04-04T14:26:25.839645Z",
+ "memory_usage": 7147094,
+ "ports": [],
+ "started": "2021-04-04T14:24:23.188059Z",
+ "status": 1,
+ "status_desc": "running",
+ "version": "17.0.0-2786-g7fb0569e"
+ },
+ {
+ "container_id": "2eb2f0a13f46",
+ "container_image_digests": [
+ "quay.ceph.io/ceph-ci/ceph@sha256:cfd9dc4a437e11894a9a0d930ed1221ccc4e939b943981f6dfbdc611816904d4"
+ ],
+ "container_image_id": "f72dfde44435bedf5e4c8be05c8194cc57f5f654b9bb146b73e81f1c5358b4c5",
+ "container_image_name": "quay.ceph.io/ceph-ci/ceph@sha256:cfd9dc4a437e11894a9a0d930ed1221ccc4e939b943981f6dfbdc611816904d4",
+ "created": "2021-04-04T14:24:21.012014Z",
+ "daemon_id": "ceph-node-02",
+ "daemon_type": "crash",
+ "events": [
+ "2021-04-04T14:24:21.047797Z daemon:crash.ceph-node-02 [INFO] \"Deployed crash.ceph-node-02 on host 'ceph-node-02.cephlab.com'\"",
+ "2021-04-04T14:25:43.974052Z daemon:crash.ceph-node-02 [INFO] \"Reconfigured crash.ceph-node-02 on host 'ceph-node-02.cephlab.com'\""
+ ],
+ "hostname": "ceph-node-02.cephlab.com",
+ "is_active": false,
+ "last_refresh": "2021-04-04T14:27:37.470841Z",
+ "memory_usage": 8018460,
+ "ports": [],
+ "started": "2021-04-04T14:24:20.664558Z",
+ "status": 1,
+ "status_desc": "running",
+ "version": "17.0.0-2786-g7fb0569e"
+ },
+ {
+ "container_id": "10359b995638",
+ "container_image_digests": [
+ "docker.io/ceph/ceph-grafana@sha256:44f6f2bfa52724d4db9a2ce343b299ff70a18dc21f1420548d5643df4ee18a6b"
+ ],
+ "container_image_id": "80728b29ad3f603cb306daeb6b0fb6c4c388e29e7eaac82cd3d3582ffd96b931",
+ "container_image_name": "docker.io/ceph/ceph-grafana:6.7.4",
+ "created": "2021-04-04T14:21:41.602878Z",
+ "daemon_id": "ceph-node-00",
+ "daemon_type": "grafana",
+ "events": [
+ "2021-04-04T14:21:41.651390Z daemon:grafana.ceph-node-00 [INFO] \"Deployed grafana.ceph-node-00 on host 'ceph-node-00.cephlab.com'\"",
+ "2021-04-04T14:25:26.705257Z daemon:grafana.ceph-node-00 [INFO] \"Reconfigured grafana.ceph-node-00 on host 'ceph-node-00.cephlab.com'\""
+ ],
+ "hostname": "ceph-node-00.cephlab.com",
+ "is_active": true,
+ "last_refresh": "2021-04-04T14:27:38.609816Z",
+ "memory_usage": 27797749,
+ "ports": [
+ 3000
+ ],
+ "started": "2021-04-04T14:25:26.020123Z",
+ "status": 1,
+ "status_desc": "running",
+ "version": "6.7.4"
+ },
+ {
+ "container_id": "04e86dfde3ae",
+ "container_image_digests": [
+ "quay.ceph.io/ceph-ci/ceph@sha256:cfd9dc4a437e11894a9a0d930ed1221ccc4e939b943981f6dfbdc611816904d4"
+ ],
+ "container_image_id": "f72dfde44435bedf5e4c8be05c8194cc57f5f654b9bb146b73e81f1c5358b4c5",
+ "container_image_name": "quay.ceph.io/ceph-ci/ceph:master",
+ "created": "2021-04-04T14:17:17.458301Z",
+ "daemon_id": "ceph-node-00.cephlab.com.qqwcpr",
+ "daemon_type": "mgr",
+ "events": [
+ "2021-04-04T14:25:24.076974Z daemon:mgr.ceph-node-00.cephlab.com.qqwcpr [ERROR] \"\"",
+ "2021-04-04T14:25:39.425312Z daemon:mgr.ceph-node-00.cephlab.com.qqwcpr [INFO] \"Reconfigured mgr.ceph-node-00.cephlab.com.qqwcpr on host 'ceph-node-00.cephlab.com'\""
+ ],
+ "hostname": "",
+ "is_active": true,
+ "last_refresh": "2021-04-04T14:20:21.353502Z",
+ "memory_usage": 411670937,
+ "ports": [
+ 9283
+ ],
+ "started": "2021-04-04T14:17:16.779682Z",
+ "status": 1,
+ "status_desc": "running",
+ "version": "17.0.0-2786-g7fb0569e"
+ },
+ {
+ "container_id": "04e86dfde3ae",
+ "container_image_digests": [
+ "quay.ceph.io/ceph-ci/ceph@sha256:cfd9dc4a437e11894a9a0d930ed1221ccc4e939b943981f6dfbdc611816904d4"
+ ],
+ "container_image_id": "f72dfde44435bedf5e4c8be05c8194cc57f5f654b9bb146b73e81f1c5358b4c5",
+ "container_image_name": "quay.ceph.io/ceph-ci/ceph:master",
+ "created": "2021-04-04T14:17:17.458301Z",
+ "daemon_id": "ceph-node-00.cephlab.com.qqwcpr",
+ "daemon_type": "mgr",
+ "events": [
+ "2021-04-04T14:25:24.076974Z daemon:mgr.ceph-node-00.cephlab.com.qqwcpr [ERROR] \"\"",
+ "2021-04-04T14:25:39.425312Z daemon:mgr.ceph-node-00.cephlab.com.qqwcpr [INFO] \"Reconfigured mgr.ceph-node-00.cephlab.com.qqwcpr on host 'ceph-node-00.cephlab.com'\""
+ ],
+ "hostname": "ceph-node-00.cephlab.com",
+ "is_active": true,
+ "last_refresh": "2021-04-04T14:27:38.610265Z",
+ "memory_usage": 468608614,
+ "ports": [
+ 9283
+ ],
+ "started": "2021-04-04T14:17:16.779682Z",
+ "status": 1,
+ "status_desc": "running",
+ "version": "17.0.0-2786-g7fb0569e"
+ },
+ {
+ "container_id": "7bfba45507ab",
+ "container_image_digests": [
+ "quay.ceph.io/ceph-ci/ceph@sha256:cfd9dc4a437e11894a9a0d930ed1221ccc4e939b943981f6dfbdc611816904d4"
+ ],
+ "container_image_id": "f72dfde44435bedf5e4c8be05c8194cc57f5f654b9bb146b73e81f1c5358b4c5",
+ "container_image_name": "quay.ceph.io/ceph-ci/ceph@sha256:cfd9dc4a437e11894a9a0d930ed1221ccc4e939b943981f6dfbdc611816904d4",
+ "created": "2021-04-04T14:24:25.445135Z",
+ "daemon_id": "ceph-node-02.mywsmi",
+ "daemon_type": "mgr",
+ "events": [
+ "2021-04-04T14:24:25.484361Z daemon:mgr.ceph-node-02.mywsmi [INFO] \"Deployed mgr.ceph-node-02.mywsmi on host 'ceph-node-02.cephlab.com'\"",
+ "2021-04-04T14:25:46.457476Z daemon:mgr.ceph-node-02.mywsmi [INFO] \"Reconfigured mgr.ceph-node-02.mywsmi on host 'ceph-node-02.cephlab.com'\""
+ ],
+ "hostname": "ceph-node-02.cephlab.com",
+ "is_active": false,
+ "last_refresh": "2021-04-04T14:27:37.471837Z",
+ "memory_usage": 384617676,
+ "ports": [
+ 8443,
+ 9283
+ ],
+ "started": "2021-04-04T14:24:25.142998Z",
+ "status": 1,
+ "status_desc": "running",
+ "version": "17.0.0-2786-g7fb0569e"
+ },
+ {
+ "container_id": "6045be766e88",
+ "container_image_digests": [
+ "quay.ceph.io/ceph-ci/ceph@sha256:cfd9dc4a437e11894a9a0d930ed1221ccc4e939b943981f6dfbdc611816904d4"
+ ],
+ "container_image_id": "f72dfde44435bedf5e4c8be05c8194cc57f5f654b9bb146b73e81f1c5358b4c5",
+ "container_image_name": "quay.ceph.io/ceph-ci/ceph:master",
+ "created": "2021-04-04T14:17:07.904023Z",
+ "daemon_id": "ceph-node-00.cephlab.com",
+ "daemon_type": "mon",
+ "events": [
+ "2021-04-04T14:25:24.076865Z daemon:mon.ceph-node-00.cephlab.com [ERROR] \"\"",
+ "2021-04-04T14:25:28.250425Z daemon:mon.ceph-node-00.cephlab.com [INFO] \"Reconfigured mon.ceph-node-00.cephlab.com on host 'ceph-node-00.cephlab.com'\""
+ ],
+ "hostname": "",
+ "is_active": false,
+ "last_refresh": "2021-04-04T14:20:21.353077Z",
+ "memory_usage": 35871784,
+ "ports": [],
+ "started": "2021-04-04T14:17:13.608122Z",
+ "status": 1,
+ "status_desc": "running",
+ "version": "17.0.0-2786-g7fb0569e"
+ },
+ {
+ "container_id": "6045be766e88",
+ "container_image_digests": [
+ "quay.ceph.io/ceph-ci/ceph@sha256:cfd9dc4a437e11894a9a0d930ed1221ccc4e939b943981f6dfbdc611816904d4"
+ ],
+ "container_image_id": "f72dfde44435bedf5e4c8be05c8194cc57f5f654b9bb146b73e81f1c5358b4c5",
+ "container_image_name": "quay.ceph.io/ceph-ci/ceph:master",
+ "created": "2021-04-04T14:17:07.904023Z",
+ "daemon_id": "ceph-node-00.cephlab.com",
+ "daemon_type": "mon",
+ "events": [
+ "2021-04-04T14:25:24.076865Z daemon:mon.ceph-node-00.cephlab.com [ERROR] \"\"",
+ "2021-04-04T14:25:28.250425Z daemon:mon.ceph-node-00.cephlab.com [INFO] \"Reconfigured mon.ceph-node-00.cephlab.com on host 'ceph-node-00.cephlab.com'\""
+ ],
+ "hostname": "ceph-node-00.cephlab.com",
+ "is_active": false,
+ "last_refresh": "2021-04-04T14:27:38.609967Z",
+ "memory_usage": 74826383,
+ "ports": [],
+ "started": "2021-04-04T14:17:13.608122Z",
+ "status": 1,
+ "status_desc": "running",
+ "version": "17.0.0-2786-g7fb0569e"
+ },
+ {
+ "container_id": "d2d261f4eb17",
+ "container_image_digests": [
+ "quay.ceph.io/ceph-ci/ceph@sha256:cfd9dc4a437e11894a9a0d930ed1221ccc4e939b943981f6dfbdc611816904d4"
+ ],
+ "container_image_id": "f72dfde44435bedf5e4c8be05c8194cc57f5f654b9bb146b73e81f1c5358b4c5",
+ "container_image_name": "quay.ceph.io/ceph-ci/ceph@sha256:cfd9dc4a437e11894a9a0d930ed1221ccc4e939b943981f6dfbdc611816904d4",
+ "created": "2021-04-04T14:24:28.269212Z",
+ "daemon_id": "ceph-node-02",
+ "daemon_type": "mon",
+ "events": [
+ "2021-04-04T14:24:28.314782Z daemon:mon.ceph-node-02 [INFO] \"Deployed mon.ceph-node-02 on host 'ceph-node-02.cephlab.com'\"",
+ "2021-04-04T14:25:45.448194Z daemon:mon.ceph-node-02 [INFO] \"Reconfigured mon.ceph-node-02 on host 'ceph-node-02.cephlab.com'\""
+ ],
+ "hostname": "ceph-node-02.cephlab.com",
+ "is_active": false,
+ "last_refresh": "2021-04-04T14:27:37.471665Z",
+ "memory_usage": 65515028,
+ "ports": [],
+ "started": "2021-04-04T14:24:28.147109Z",
+ "status": 1,
+ "status_desc": "running",
+ "version": "17.0.0-2786-g7fb0569e"
+ },
+ {
+ "container_id": "51c04231de4c",
+ "container_image_digests": [
+ "docker.io/prom/node-exporter@sha256:a2f29256e53cc3e0b64d7a472512600b2e9410347d53cdc85b49f659c17e02ee",
+ "docker.io/prom/node-exporter@sha256:b630fb29d99b3483c73a2a7db5fc01a967392a3d7ad754c8eccf9f4a67e7ee31"
+ ],
+ "container_image_id": "e5a616e4b9cf68dfcad7782b78e118be4310022e874d52da85c55923fb615f87",
+ "container_image_name": "docker.io/prom/node-exporter:v0.18.1",
+ "created": "2021-04-04T14:21:52.336199Z",
+ "daemon_id": "ceph-node-00",
+ "daemon_type": "node-exporter",
+ "events": [
+ "2021-04-04T14:21:52.372374Z daemon:node-exporter.ceph-node-00 [INFO] \"Deployed node-exporter.ceph-node-00 on host 'ceph-node-00.cephlab.com'\""
+ ],
+ "hostname": "ceph-node-00.cephlab.com",
+ "is_active": false,
+ "last_refresh": "2021-04-04T14:27:38.610044Z",
+ "memory_usage": 8001683,
+ "ports": [
+ 9100
+ ],
+ "started": "2021-04-04T14:21:52.044759Z",
+ "status": 1,
+ "status_desc": "running",
+ "version": "0.18.1"
+ },
+ {
+ "container_id": "ac9e1d055972",
+ "container_image_digests": [
+ "docker.io/prom/node-exporter@sha256:a2f29256e53cc3e0b64d7a472512600b2e9410347d53cdc85b49f659c17e02ee",
+ "docker.io/prom/node-exporter@sha256:b630fb29d99b3483c73a2a7db5fc01a967392a3d7ad754c8eccf9f4a67e7ee31"
+ ],
+ "container_image_id": "e5a616e4b9cf68dfcad7782b78e118be4310022e874d52da85c55923fb615f87",
+ "container_image_name": "docker.io/prom/node-exporter:v0.18.1",
+ "created": "2021-04-04T14:24:39.469923Z",
+ "daemon_id": "ceph-node-01",
+ "daemon_type": "node-exporter",
+ "events": [
+ "2021-04-04T14:24:39.508244Z daemon:node-exporter.ceph-node-01 [INFO] \"Deployed node-exporter.ceph-node-01 on host 'ceph-node-01.cephlab.com'\""
+ ],
+ "hostname": "ceph-node-01.cephlab.com",
+ "is_active": false,
+ "last_refresh": "2021-04-04T14:26:25.839072Z",
+ "memory_usage": 7052722,
+ "ports": [
+ 9100
+ ],
+ "started": "2021-04-04T14:24:39.156587Z",
+ "status": 1,
+ "status_desc": "running",
+ "version": "0.18.1"
+ },
+ {
+ "container_id": "b133dbf9cff8",
+ "container_image_digests": [
+ "docker.io/prom/node-exporter@sha256:a2f29256e53cc3e0b64d7a472512600b2e9410347d53cdc85b49f659c17e02ee",
+ "docker.io/prom/node-exporter@sha256:b630fb29d99b3483c73a2a7db5fc01a967392a3d7ad754c8eccf9f4a67e7ee31"
+ ],
+ "container_image_id": "e5a616e4b9cf68dfcad7782b78e118be4310022e874d52da85c55923fb615f87",
+ "container_image_name": "docker.io/prom/node-exporter:v0.18.1",
+ "created": "2021-04-04T14:24:49.840797Z",
+ "daemon_id": "ceph-node-02",
+ "daemon_type": "node-exporter",
+ "events": [
+ "2021-04-04T14:24:49.901437Z daemon:node-exporter.ceph-node-02 [INFO] \"Deployed node-exporter.ceph-node-02 on host 'ceph-node-02.cephlab.com'\""
+ ],
+ "hostname": "ceph-node-02.cephlab.com",
+ "is_active": false,
+ "last_refresh": "2021-04-04T14:27:37.471349Z",
+ "memory_usage": 7696547,
+ "ports": [
+ 9100
+ ],
+ "started": "2021-04-04T14:24:49.524299Z",
+ "status": 1,
+ "status_desc": "running",
+ "version": "0.18.1"
+ },
+ {
+ "container_id": "51d864a583df",
+ "container_image_digests": [
+ "quay.ceph.io/ceph-ci/ceph@sha256:cfd9dc4a437e11894a9a0d930ed1221ccc4e939b943981f6dfbdc611816904d4"
+ ],
+ "container_image_id": "f72dfde44435bedf5e4c8be05c8194cc57f5f654b9bb146b73e81f1c5358b4c5",
+ "container_image_name": "quay.ceph.io/ceph-ci/ceph@sha256:cfd9dc4a437e11894a9a0d930ed1221ccc4e939b943981f6dfbdc611816904d4",
+ "created": "2021-04-04T14:25:03.086634Z",
+ "daemon_id": "0",
+ "daemon_type": "osd",
+ "events": [
+ "2021-04-04T14:25:03.152770Z daemon:osd.0 [INFO] \"Deployed osd.0 on host 'ceph-node-00.cephlab.com'\""
+ ],
+ "hostname": "ceph-node-00.cephlab.com",
+ "is_active": false,
+ "last_refresh": "2021-04-04T14:27:38.610426Z",
+ "memory_usage": 63826821,
+ "osdspec_affinity": "all-available-devices",
+ "ports": [],
+ "started": "2021-04-04T14:25:02.948826Z",
+ "status": 1,
+ "status_desc": "running",
+ "version": "17.0.0-2786-g7fb0569e"
+ },
+ {
+ "container_id": "7a141557611e",
+ "container_image_digests": [
+ "quay.ceph.io/ceph-ci/ceph@sha256:cfd9dc4a437e11894a9a0d930ed1221ccc4e939b943981f6dfbdc611816904d4"
+ ],
+ "container_image_id": "f72dfde44435bedf5e4c8be05c8194cc57f5f654b9bb146b73e81f1c5358b4c5",
+ "container_image_name": "quay.ceph.io/ceph-ci/ceph@sha256:cfd9dc4a437e11894a9a0d930ed1221ccc4e939b943981f6dfbdc611816904d4",
+ "created": "2021-04-04T14:25:02.803534Z",
+ "daemon_id": "1",
+ "daemon_type": "osd",
+ "events": [
+ "2021-04-04T14:25:02.905863Z daemon:osd.1 [INFO] \"Deployed osd.1 on host 'ceph-node-01.cephlab.com'\""
+ ],
+ "hostname": "ceph-node-01.cephlab.com",
+ "is_active": false,
+ "last_refresh": "2021-04-04T14:26:25.839343Z",
+ "memory_usage": 44155535,
+ "osdspec_affinity": "all-available-devices",
+ "ports": [],
+ "started": "2021-04-04T14:25:02.650699Z",
+ "status": 1,
+ "status_desc": "running",
+ "version": "17.0.0-2786-g7fb0569e"
+ },
+ {
+ "container_id": "bbf4cc5b870a",
+ "container_image_digests": [
+ "quay.ceph.io/ceph-ci/ceph@sha256:cfd9dc4a437e11894a9a0d930ed1221ccc4e939b943981f6dfbdc611816904d4"
+ ],
+ "container_image_id": "f72dfde44435bedf5e4c8be05c8194cc57f5f654b9bb146b73e81f1c5358b4c5",
+ "container_image_name": "quay.ceph.io/ceph-ci/ceph@sha256:cfd9dc4a437e11894a9a0d930ed1221ccc4e939b943981f6dfbdc611816904d4",
+ "created": "2021-04-04T14:25:03.771174Z",
+ "daemon_id": "2",
+ "daemon_type": "osd",
+ "events": [
+ "2021-04-04T14:25:03.827365Z daemon:osd.2 [INFO] \"Deployed osd.2 on host 'ceph-node-02.cephlab.com'\""
+ ],
+ "hostname": "ceph-node-02.cephlab.com",
+ "is_active": false,
+ "last_refresh": "2021-04-04T14:27:37.471996Z",
+ "memory_usage": 62495129,
+ "osdspec_affinity": "all-available-devices",
+ "ports": [],
+ "started": "2021-04-04T14:25:08.134780Z",
+ "status": 1,
+ "status_desc": "running",
+ "version": "17.0.0-2786-g7fb0569e"
+ },
+ {
+ "container_id": "e36d84e5608b",
+ "container_image_digests": [
+ "docker.io/prom/prometheus@sha256:5880ec936055fad18ccee798d2a63f64ed85bd28e8e0af17c6923a090b686c3d",
+ "docker.io/prom/prometheus@sha256:b4e6cd0275a26750505e539f8528e891053434ebd3972be02645bed5f02f0795"
+ ],
+ "container_image_id": "de242295e2257c37c8cadfd962369228f8f10b2d48a44259b65fef44ad4f6490",
+ "container_image_name": "docker.io/prom/prometheus:v2.18.1",
+ "created": "2021-04-04T14:22:11.310763Z",
+ "daemon_id": "ceph-node-00",
+ "daemon_type": "prometheus",
+ "events": [
+ "2021-04-04T14:22:11.356043Z daemon:prometheus.ceph-node-00 [INFO] \"Deployed prometheus.ceph-node-00 on host 'ceph-node-00.cephlab.com'\"",
+ "2021-04-04T14:25:33.086106Z daemon:prometheus.ceph-node-00 [INFO] \"Reconfigured prometheus.ceph-node-00 on host 'ceph-node-00.cephlab.com'\""
+ ],
+ "hostname": "ceph-node-00.cephlab.com",
+ "is_active": true,
+ "last_refresh": "2021-04-04T14:27:38.610128Z",
+ "memory_usage": 27724349,
+ "ports": [
+ 9095
+ ],
+ "started": "2021-04-04T14:25:32.344156Z",
+ "status": 1,
+ "status_desc": "running",
+ "version": "2.18.1"
+ },
+ {
+ "container_id": "5cdeb705c7f6",
+ "container_image_digests": [
+ "quay.ceph.io/ceph-ci/ceph@sha256:cfd9dc4a437e11894a9a0d930ed1221ccc4e939b943981f6dfbdc611816904d4"
+ ],
+ "container_image_id": "f72dfde44435bedf5e4c8be05c8194cc57f5f654b9bb146b73e81f1c5358b4c5",
+ "container_image_name": "quay.ceph.io/ceph-ci/ceph@sha256:cfd9dc4a437e11894a9a0d930ed1221ccc4e939b943981f6dfbdc611816904d4",
+ "created": "2021-04-04T14:27:26.775628Z",
+ "daemon_id": "foo.ceph-node-00.qknfoh",
+ "daemon_type": "rgw",
+ "events": [
+ "2021-04-04T14:27:26.824821Z daemon:rgw.foo.ceph-node-00.qknfoh [INFO] \"Deployed rgw.foo.ceph-node-00.qknfoh on host 'ceph-node-00.cephlab.com'\""
+ ],
+ "hostname": "ceph-node-00.cephlab.com",
+ "is_active": false,
+ "last_refresh": "2021-04-04T14:27:38.610617Z",
+ "memory_usage": 53309603,
+ "ports": [
+ 80
+ ],
+ "started": "2021-04-04T14:27:26.350981Z",
+ "status": 1,
+ "status_desc": "running",
+ "version": "17.0.0-2786-g7fb0569e"
+ },
+ {
+ "container_id": "18a2179a35c0",
+ "container_image_digests": [
+ "quay.ceph.io/ceph-ci/ceph@sha256:cfd9dc4a437e11894a9a0d930ed1221ccc4e939b943981f6dfbdc611816904d4"
+ ],
+ "container_image_id": "f72dfde44435bedf5e4c8be05c8194cc57f5f654b9bb146b73e81f1c5358b4c5",
+ "container_image_name": "quay.ceph.io/ceph-ci/ceph@sha256:cfd9dc4a437e11894a9a0d930ed1221ccc4e939b943981f6dfbdc611816904d4",
+ "created": "2021-04-04T14:27:24.200977Z",
+ "daemon_id": "foo.ceph-node-02.fgzmmm",
+ "daemon_type": "rgw",
+ "events": [
+ "2021-04-04T14:27:24.300473Z daemon:rgw.foo.ceph-node-02.fgzmmm [INFO] \"Deployed rgw.foo.ceph-node-02.fgzmmm on host 'ceph-node-02.cephlab.com'\""
+ ],
+ "hostname": "ceph-node-02.cephlab.com",
+ "is_active": false,
+ "last_refresh": "2021-04-04T14:27:37.471149Z",
+ "memory_usage": 53487861,
+ "ports": [
+ 80
+ ],
+ "started": "2021-04-04T14:27:23.793957Z",
+ "status": 1,
+ "status_desc": "running",
+ "version": "17.0.0-2786-g7fb0569e"
+ },
+ {
+ "container_image_name": "quay.ceph.io/ceph-ci/ceph@sha256:cfd9dc4a437e11894a9a0d930ed1221ccc4e939b943981f6dfbdc611816904d4",
+ "created": "2021-04-04T14:27:30.048136Z",
+ "daemon_id": "foo.ceph-node-02.hqjyla",
+ "daemon_type": "rgw",
+ "events": [
+ "2021-04-04T14:27:30.115692Z daemon:rgw.foo.ceph-node-02.hqjyla [INFO] \"Deployed rgw.foo.ceph-node-02.hqjyla on host 'ceph-node-02.cephlab.com'\""
+ ],
+ "hostname": "ceph-node-02.cephlab.com",
+ "is_active": false,
+ "last_refresh": "2021-04-04T14:27:37.471564Z",
+ "ports": [
+ 80
+ ],
+ "status": -1,
+ "status_desc": "unknown"
+ }
+]
\ No newline at end of file
crushmap.getPageTitle().should('equal', 'CRUSH map viewer');
// Check that title appears once OSD is clicked
- crushmap.getCrushNode(1).click();
+ crushmap.getCrushNode(0).click();
crushmap
.getLegends()
.invoke('text')
.then((legend) => {
- crushmap.getCrushNode(1).should('have.text', legend);
+ crushmap.getCrushNode(0).should('have.text', legend);
});
// Check that table appears once OSD is clicked
}
@PageHelper.restrictTo(pages.create.url)
- add(hostname: string, exist?: boolean) {
+ add(hostname: string, exist?: boolean, maintenance?: boolean) {
cy.get(`${this.pages.create.id}`).within(() => {
cy.get('#hostname').type(hostname);
+ if (maintenance) {
+ cy.get('label[for=maintenance]').click();
+ }
cy.get('cd-submit-button').click();
});
if (exist) {
}
@PageHelper.restrictTo(pages.index.url)
- maintenance(hostname: string, exit = false) {
- let services: string[];
- let runTest = false;
- this.getTableCell(this.columnIndex.hostname, hostname)
- .parent()
- .find(`datatable-body-cell:nth-child(${this.columnIndex.services}) a`)
- .should(($el) => {
- services = $el.text().split(', ');
- if (services.length < 2 && services[0].includes('osd')) {
- runTest = true;
- }
- });
- if (runTest) {
+ maintenance(hostname: string, exit = false, force = false) {
+ if (force) {
this.getTableCell(this.columnIndex.hostname, hostname).click();
- if (exit) {
- this.clickActionButton('exit-maintenance');
-
- this.getTableCell(this.columnIndex.hostname, hostname)
- .parent()
- .find(`datatable-body-cell:nth-child(${this.columnIndex.status}) .badge`)
- .should(($ele) => {
- const status = $ele.toArray().map((v) => v.innerText);
- expect(status).to.not.include('maintenance');
- });
- } else {
- this.clickActionButton('enter-maintenance');
-
- this.getTableCell(this.columnIndex.hostname, hostname)
- .parent()
- .find(`datatable-body-cell:nth-child(${this.columnIndex.status}) .badge`)
- .should(($ele) => {
- const status = $ele.toArray().map((v) => v.innerText);
- expect(status).to.include('maintenance');
- });
- }
+ this.clickActionButton('enter-maintenance');
+
+ cy.contains('cd-modal button', 'Continue').click();
+
+ this.getTableCell(this.columnIndex.hostname, hostname)
+ .parent()
+ .find(`datatable-body-cell:nth-child(${this.columnIndex.status}) .badge`)
+ .should(($ele) => {
+ const status = $ele.toArray().map((v) => v.innerText);
+ expect(status).to.include('maintenance');
+ });
+ }
+ if (exit) {
+ this.getTableCell(this.columnIndex.hostname, hostname)
+ .click()
+ .parent()
+ .find(`datatable-body-cell:nth-child(${this.columnIndex.status})`)
+ .then(($ele) => {
+ const status = $ele.toArray().map((v) => v.innerText);
+ if (status[0].includes('maintenance')) {
+ this.clickActionButton('exit-maintenance');
+ }
+ });
+
+ this.getTableCell(this.columnIndex.hostname, hostname)
+ .parent()
+ .find(`datatable-body-cell:nth-child(${this.columnIndex.status})`)
+ .should(($ele) => {
+ const status = $ele.toArray().map((v) => v.innerText);
+ expect(status).to.not.include('maintenance');
+ });
+ } else {
+ this.getTableCell(this.columnIndex.hostname, hostname).click();
+ this.clickActionButton('enter-maintenance');
+
+ this.getTableCell(this.columnIndex.hostname, hostname)
+ .parent()
+ .find(`datatable-body-cell:nth-child(${this.columnIndex.status}) .badge`)
+ .should(($ele) => {
+ const status = $ele.toArray().map((v) => v.innerText);
+ expect(status).to.include('maintenance');
+ });
}
}
}
--- /dev/null
+import { PageHelper } from '../page-helper.po';
+
+const pages = {
+ index: { url: '#/services', id: 'cd-services' },
+ create: { url: '#/services/create', id: 'cd-service-form' }
+};
+
+export class ServicesPageHelper extends PageHelper {
+ pages = pages;
+
+ columnIndex = {
+ service_name: 2,
+ placement: 3,
+ running: 4,
+ size: 5,
+ last_refresh: 6
+ };
+
+ check_for_service() {
+ this.getTableCount('total').should('not.be.eq', 0);
+ }
+
+ private selectServiceType(serviceType: string) {
+ return this.selectOption('service_type', serviceType);
+ }
+
+ @PageHelper.restrictTo(pages.create.url)
+ addService(serviceType: string, exist?: boolean) {
+ cy.get(`${this.pages.create.id}`).within(() => {
+ this.selectServiceType(serviceType);
+ if (serviceType === 'rgw') {
+ cy.get('#service_id').type('rgw.foo');
+ cy.get('#count').type('1');
+ } else if (serviceType === 'ingress') {
+ this.selectOption('backend_service', 'rgw.rgw.foo');
+ cy.get('#service_id').should('have.value', 'rgw.rgw.foo');
+ cy.get('#virtual_ip').type('192.168.20.1/24');
+ cy.get('#frontend_port').type('8081');
+ cy.get('#monitor_port').type('8082');
+ }
+
+ cy.get('cd-submit-button').click();
+ });
+ if (exist) {
+ cy.get('#service_id').should('have.class', 'ng-invalid');
+ } else {
+ // back to service list
+ cy.get(`${this.pages.index.id}`);
+ }
+ }
+
+ @PageHelper.restrictTo(pages.index.url)
+ checkExist(serviceName: string, exist: boolean) {
+ this.getTableCell(this.columnIndex.service_name, serviceName).should(($elements) => {
+ const services = $elements.map((_, el) => el.textContent).get();
+ if (exist) {
+ expect(services).to.include(serviceName);
+ } else {
+ expect(services).to.not.include(serviceName);
+ }
+ });
+ }
+
+ @PageHelper.restrictTo(pages.index.url)
+ deleteService(serviceName: string, wait: number) {
+ const getRow = this.getTableCell.bind(this, this.columnIndex.service_name);
+ getRow(serviceName).click();
+
+ // Clicks on table Delete button
+ this.clickActionButton('delete');
+
+ // Confirms deletion
+ cy.get('cd-modal .custom-control-label').click();
+ cy.contains('cd-modal button', 'Delete').click();
+
+ // Wait for modal to close
+ cy.get('cd-modal').should('not.exist');
+
+ // wait for delete operation to complete: tearing down the service daemons
+ cy.wait(wait);
+
+ this.checkExist(serviceName, false);
+ }
+}
import { FilesystemsPageHelper } from './filesystems.po';
-describe('Filesystems page', () => {
+describe('File Systems page', () => {
const filesystems = new FilesystemsPageHelper();
beforeEach(() => {
describe('breadcrumb test', () => {
it('should open and show breadcrumb', () => {
- filesystems.expectBreadcrumbText('Filesystems');
+ filesystems.expectBreadcrumbText('File Systems');
});
});
});
--- /dev/null
+import { HostsPageHelper } from '../cluster/hosts.po';
+
+describe('Hosts page', () => {
+ const hosts = new HostsPageHelper();
+
+ beforeEach(() => {
+ cy.login();
+ Cypress.Cookies.preserveOnce('token');
+ hosts.navigateTo();
+ });
+
+ describe('when Orchestrator is available', () => {
+ beforeEach(function () {
+ cy.fixture('orchestrator/inventory.json').as('hosts');
+ cy.fixture('orchestrator/services.json').as('services');
+ });
+
+ it('should force enter host into maintenance', function () {
+ const hostname = Cypress._.sample(this.hosts).name;
+ const serviceList = new Array();
+ this.services.forEach((service: any) => {
+ if (hostname === service.hostname) {
+ serviceList.push(service.daemon_type);
+ }
+ });
+
+ let enterMaintenance = true;
+ serviceList.forEach((service: string) => {
+ if (service === 'mgr' || service === 'alertmanager') {
+ enterMaintenance = false;
+ }
+ });
+
+ if (enterMaintenance) {
+ hosts.maintenance(hostname, true, true);
+ }
+ });
+ });
+});
describe('when Orchestrator is available', () => {
beforeEach(function () {
cy.fixture('orchestrator/inventory.json').as('hosts');
+ cy.fixture('orchestrator/services.json').as('services');
});
it('should not add an exsiting host', function () {
it('should enter host into maintenance', function () {
const hostname = Cypress._.sample(this.hosts).name;
- hosts.maintenance(hostname);
+ const serviceList = new Array();
+ this.services.forEach((service: any) => {
+ if (hostname === service.hostname) {
+ serviceList.push(service.daemon_type);
+ }
+ });
+ let enterMaintenance = true;
+ serviceList.forEach((service: string) => {
+ if (service === 'mgr' || service === 'alertmanager') {
+ enterMaintenance = false;
+ }
+ });
+ if (enterMaintenance) {
+ hosts.maintenance(hostname);
+ }
});
it('should exit host from maintenance', function () {
--- /dev/null
+import { ServicesPageHelper } from '../cluster/services.po';
+
+describe('Services page', () => {
+ const services = new ServicesPageHelper();
+
+ beforeEach(() => {
+ cy.login();
+ Cypress.Cookies.preserveOnce('token');
+ services.navigateTo();
+ });
+
+ describe('when Orchestrator is available', () => {
+ it('should create an rgw service', () => {
+ services.navigateTo('create');
+ services.addService('rgw');
+
+ services.checkExist('rgw.rgw.foo', true);
+ });
+
+ it('should create and delete an ingress service', () => {
+ services.navigateTo('create');
+ services.addService('ingress');
+
+ services.checkExist('ingress.rgw.rgw.foo', true);
+
+ services.deleteService('ingress.rgw.rgw.foo', 5000);
+ });
+ });
+});
--- /dev/null
+import { HostsPageHelper } from 'cypress/integration/cluster/hosts.po';
+
+describe('Hosts page', () => {
+ const hosts = new HostsPageHelper();
+ const hostnames = ['ceph-node-00.cephlab.com', 'ceph-node-01.cephlab.com'];
+ const addHost = (hostname: string, exist?: boolean, maintenance?: boolean) => {
+ hosts.navigateTo('create');
+ hosts.add(hostname, exist, maintenance);
+ hosts.checkExist(hostname, true);
+ };
+
+ beforeEach(() => {
+ cy.login();
+ Cypress.Cookies.preserveOnce('token');
+ hosts.navigateTo();
+ });
+
+ describe('when Orchestrator is available', () => {
+ it('should display inventory', function () {
+ hosts.clickHostTab(hostnames[0], 'Physical Disks');
+ cy.get('cd-host-details').within(() => {
+ hosts.getTableCount('total').should('be.gte', 0);
+ });
+ });
+
+ it('should display daemons', function () {
+ hosts.clickHostTab(hostnames[0], 'Daemons');
+ cy.get('cd-host-details').within(() => {
+ hosts.getTableCount('total').should('be.gte', 0);
+ });
+ });
+
+ it('should edit host labels', function () {
+ const labels = ['foo', 'bar'];
+ hosts.editLabels(hostnames[0], labels, true);
+ hosts.editLabels(hostnames[0], labels, false);
+ });
+
+ it('should not add an existing host', function () {
+ hosts.navigateTo('create');
+ hosts.add(hostnames[0], true);
+ });
+
+ it('should add a host in maintenance mode', function () {
+ addHost(hostnames[1], false, true);
+ });
+
+ it('should delete a host and add it back', function () {
+ hosts.delete(hostnames[1]);
+ addHost(hostnames[1], false, true);
+ });
+
+ it('should exit host from maintenance', function () {
+ hosts.maintenance(hostnames[1], true);
+ });
+ });
+});
it('should delete bucket', () => {
buckets.delete(bucket_name);
});
+
+ it('should create bucket with object locking enabled', () => {
+ buckets.navigateTo('create');
+ buckets.create(
+ bucket_name,
+ '0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef',
+ 'default-placement',
+ true
+ );
+ buckets.getFirstTableCell(bucket_name).should('exist');
+ });
+
+ it('should not allow to edit versioning if object locking is enabled', () => {
+ buckets.edit(bucket_name, 'dev', true);
+ buckets.getDataTables().should('contain.text', 'dev');
+
+ buckets.delete(bucket_name);
+ });
});
describe('Invalid Input in Create and Edit tests', () => {
return this.selectOption('placement-target', placementTarget);
}
+ private selectLockMode(lockMode: string) {
+ return this.selectOption('lock_mode', lockMode);
+ }
+
@PageHelper.restrictTo(pages.create.url)
- create(name: string, owner: string, placementTarget: string) {
+ create(name: string, owner: string, placementTarget: string, isLocking = false) {
// Enter in bucket name
cy.get('#bid').type(name);
this.selectPlacementTarget(placementTarget);
cy.get('#placement-target').should('have.class', 'ng-valid');
+ if (isLocking) {
+ cy.get('#lock_enabled').click({ force: true });
+ // Select lock mode:
+ this.selectLockMode('Compliance');
+ cy.get('#lock_mode').should('have.class', 'ng-valid');
+ cy.get('#lock_retention_period_days').type('3');
+ }
+
// Click the create button and wait for bucket to be made
cy.contains('button', 'Create Bucket').click();
}
@PageHelper.restrictTo(pages.index.url)
- edit(name: string, new_owner: string) {
+ edit(name: string, new_owner: string, isLocking = false) {
this.navigateEdit(name);
cy.get('input[name=placement-target]').should('have.value', 'default-placement');
this.selectOwner(new_owner);
+ // If object locking is enabled versioning shouldn't be visible
+ if (isLocking) {
+ cy.get('input[id=versioning]').should('be.disabled');
+ cy.contains('button', 'Edit Bucket').click();
+
+ // wait to be back on buckets page with table visible and click
+ this.getExpandCollapseElement(name).click();
+
+ // check its details table for edited owner field
+ cy.get('.table.table-striped.table-bordered')
+ .first()
+ .should('contains.text', new_owner)
+ .as('bucketDataTable');
+
+ // Check versioning enabled:
+ cy.get('@bucketDataTable').find('tr').its(2).find('td').last().should('have.text', new_owner);
+ cy.get('@bucketDataTable').find('tr').its(11).find('td').last().as('versioningValueCell');
+
+ return cy.get('@versioningValueCell').should('have.text', this.versioningStateEnabled);
+ }
// Enable versioning
cy.get('input[id=versioning]').should('not.be.checked');
cy.get('label[for=versioning]').click();
.and('have.class', 'ng-invalid');
// Check that error message was printed under name input field
- cy.get('#bid + .invalid-feedback').should('have.text', 'The value is not valid.');
+ cy.get('#bid + .invalid-feedback').should(
+ 'have.text',
+ 'Bucket names must be 3 to 63 characters long.'
+ );
// Test invalid owner input
// select some valid option. The owner drop down error message will not appear unless a valid user was selected at
{ menu: 'iSCSI', component: 'cd-iscsi' }
]
},
- { menu: 'Filesystem', component: 'cd-cephfs-list' }
+ { menu: 'File Systems', component: 'cd-cephfs-list' }
];
getVerticalMenu() {
+++ /dev/null
-(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{aAWM:function(e,t,a){"use strict";a.d(t,"a",(function(){return M}));var i=a("uIqm"),o=a("PhyI"),s=a("8Y7J");let n=(()=>{class e{transform(e){return{0:"global",1:"pool",2:"image"}[e]}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=s.Lb({name:"rbdConfigurationSource",type:e,pure:!0}),e})();var r=a("aXbf"),c=a("o8EM"),l=a("SVse"),b=a("IzCI"),d=a("dEH0"),p=a("BQkM");const m=["configurationSourceTpl"],u=["configurationValueTpl"],f=["poolConfTable"];function h(e,t){1&e&&(s.Sb(0,"span"),s.Wb(1,6),s.Rb())}function g(e,t){1&e&&(s.Sb(0,"strong"),s.Wb(1,7),s.Rb())}function S(e,t){1&e&&(s.Sb(0,"strong"),s.Wb(1,8),s.Rb())}function v(e,t){1&e&&(s.Sb(0,"div",4),s.Mc(1,h,2,0,"span",5),s.Mc(2,g,2,0,"strong",5),s.Mc(3,S,2,0,"strong",5),s.Rb()),2&e&&(s.pc("ngSwitch",t.value),s.yb(1),s.pc("ngSwitchCase","global"),s.yb(1),s.pc("ngSwitchCase","image"),s.yb(1),s.pc("ngSwitchCase","pool"))}function y(e,t){if(1&e&&(s.Sb(0,"span"),s.Oc(1),s.jc(2,"dimlessBinaryPerSecond"),s.Rb()),2&e){const e=s.ic().value;s.yb(1),s.Pc(s.kc(2,1,e))}}function R(e,t){if(1&e&&(s.Sb(0,"span"),s.Oc(1),s.jc(2,"milliseconds"),s.Rb()),2&e){const e=s.ic().value;s.yb(1),s.Pc(s.kc(2,1,e))}}function w(e,t){if(1&e&&(s.Sb(0,"span"),s.Oc(1),s.jc(2,"iops"),s.Rb()),2&e){const e=s.ic().value;s.yb(1),s.Pc(s.kc(2,1,e))}}function _(e,t){if(1&e&&(s.Sb(0,"span"),s.Oc(1),s.Rb()),2&e){const e=s.ic().value;s.yb(1),s.Pc(e)}}function k(e,t){if(1&e&&(s.Sb(0,"div",4),s.Mc(1,y,3,3,"span",5),s.Mc(2,R,3,3,"span",5),s.Mc(3,w,3,3,"span",5),s.Mc(4,_,2,1,"span",9),s.Rb()),2&e){const e=t.row,a=s.ic();s.pc("ngSwitch",e.type),s.yb(1),s.pc("ngSwitchCase",a.typeField.bps),s.yb(1),s.pc("ngSwitchCase",a.typeField.milliseconds),s.yb(1),s.pc("ngSwitchCase",a.typeField.iops)}}let M=(()=>{class e{constructor(e,t){this.formatterService=e,this.rbdConfigurationService=t,this.sourceField=o.a,this.typeField=o.b}ngOnInit(){this.poolConfigurationColumns=[{prop:"displayName",name:"Name"},{prop:"description",name:"Description"},{prop:"name",name:"Key"},{prop:"source",name:"Source",cellTemplate:this.configurationSourceTpl,pipe:new n},{prop:"value",name:"Value",cellTemplate:this.configurationValueTpl}]}ngOnChanges(){this.data&&(this.data=this.data.filter(e=>this.rbdConfigurationService.getOptionFields().map(e=>e.name).includes(e.name)))}}return e.\u0275fac=function(t){return new(t||e)(s.Mb(r.a),s.Mb(c.a))},e.\u0275cmp=s.Gb({type:e,selectors:[["cd-rbd-configuration-table"]],viewQuery:function(e,t){var a;1&e&&(s.Jc(m,!0),s.Jc(u,!0),s.Jc(f,!0)),2&e&&(s.zc(a=s.hc())&&(t.configurationSourceTpl=a.first),s.zc(a=s.hc())&&(t.configurationValueTpl=a.first),s.zc(a=s.hc())&&(t.poolConfTable=a.first))},inputs:{data:"data"},features:[s.wb],decls:6,vars:2,consts:function(){return[["identifier","name",3,"data","columns"],["poolConfTable",""],["configurationSourceTpl",""],["configurationValueTpl",""],[3,"ngSwitch"],[4,"ngSwitchCase"],"Global","Image","Pool",[4,"ngSwitchDefault"]]},template:function(e,t){1&e&&(s.Nb(0,"cd-table",0,1),s.Mc(2,v,4,4,"ng-template",null,2,s.Nc),s.Mc(4,k,5,4,"ng-template",null,3,s.Nc)),2&e&&s.pc("data",t.data)("columns",t.poolConfigurationColumns)},directives:[i.a,l.t,l.u,l.v],pipes:[b.a,d.a,p.a],styles:[""]}),e})()},"k/xb":function(e,t,a){"use strict";a.r(t),a.d(t,"BlockModule",(function(){return sn})),a.d(t,"RoutedBlockModule",(function(){return rn}));var i=a("SVse"),o=a("s7LF"),s=a("iInd"),n=a("ohO+"),r=a("G0yt"),c=a("zWsK"),l=a("sne2"),b=a("Vhfg"),d=a("PCNd"),p=a("LvDl"),m=a.n(p),u=a("cp0P"),f=a("mrSG"),h=a("IheW"),g=a("xTzq"),S=a("8Y7J");let v=(()=>{let e=class{constructor(e){this.http=e}listTargets(){return this.http.get("api/iscsi/target")}getTarget(e){return this.http.get("api/iscsi/target/"+e)}updateTarget(e,t){return this.http.put("api/iscsi/target/"+e,t,{observe:"response"})}status(){return this.http.get("ui-api/iscsi/status")}settings(){return this.http.get("ui-api/iscsi/settings")}version(){return this.http.get("ui-api/iscsi/version")}portals(){return this.http.get("ui-api/iscsi/portals")}createTarget(e){return this.http.post("api/iscsi/target",e,{observe:"response"})}deleteTarget(e){return this.http.delete("api/iscsi/target/"+e,{observe:"response"})}getDiscovery(){return this.http.get("api/iscsi/discoveryauth")}updateDiscovery(e){return this.http.put("api/iscsi/discoveryauth",e)}overview(){return this.http.get("ui-api/iscsi/overview")}};return e.\u0275fac=function(t){return new(t||e)(S.dc(h.b))},e.\u0275prov=S.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e=Object(f.b)([g.a,Object(f.d)("design:paramtypes",[h.b])],e),e})();var y=a("lJxs"),R=a("jVDg"),w=a("o8EM");let _=(()=>{let e=class{constructor(e,t){this.http=e,this.rbdConfigurationService=t}isRBDPool(e){return-1!==m.a.indexOf(e.application_metadata,"rbd")&&!e.pool_name.includes("/")}create(e){return this.http.post("api/block/image",e,{observe:"response"})}delete(e){return this.http.delete("api/block/image/"+e.toStringEncoded(),{observe:"response"})}update(e,t){return this.http.put("api/block/image/"+e.toStringEncoded(),t,{observe:"response"})}get(e){return this.http.get("api/block/image/"+e.toStringEncoded())}list(){return this.http.get("api/block/image").pipe(Object(y.a)(e=>e.map(e=>(e.value.map(e=>e.configuration?(e.configuration.map(e=>Object.assign(e,this.rbdConfigurationService.getOptionByName(e.name))),e):e),e))))}copy(e,t){return this.http.post(`api/block/image/${e.toStringEncoded()}/copy`,t,{observe:"response"})}flatten(e){return this.http.post(`api/block/image/${e.toStringEncoded()}/flatten`,null,{observe:"response"})}defaultFeatures(){return this.http.get("api/block/image/default_features")}cloneFormatVersion(){return this.http.get("api/block/image/clone_format_version")}createSnapshot(e,t){const a={snapshot_name:t};return this.http.post(`api/block/image/${e.toStringEncoded()}/snap`,a,{observe:"response"})}renameSnapshot(e,t,a){const i={new_snap_name:a};return this.http.put(`api/block/image/${e.toStringEncoded()}/snap/${t}`,i,{observe:"response"})}protectSnapshot(e,t,a){const i={is_protected:a};return this.http.put(`api/block/image/${e.toStringEncoded()}/snap/${t}`,i,{observe:"response"})}rollbackSnapshot(e,t){return this.http.post(`api/block/image/${e.toStringEncoded()}/snap/${t}/rollback`,null,{observe:"response"})}cloneSnapshot(e,t,a){return this.http.post(`api/block/image/${e.toStringEncoded()}/snap/${t}/clone`,a,{observe:"response"})}deleteSnapshot(e,t){return this.http.delete(`api/block/image/${e.toStringEncoded()}/snap/${t}`,{observe:"response"})}listTrash(){return this.http.get("api/block/image/trash/")}createNamespace(e,t){return this.http.post(`api/block/pool/${e}/namespace`,{namespace:t},{observe:"response"})}listNamespaces(e){return this.http.get(`api/block/pool/${e}/namespace/`)}deleteNamespace(e,t){return this.http.delete(`api/block/pool/${e}/namespace/${t}`,{observe:"response"})}moveTrash(e,t){return this.http.post(`api/block/image/${e.toStringEncoded()}/move_trash`,{delay:t},{observe:"response"})}purgeTrash(e){return this.http.post("api/block/image/trash/purge/?pool_name="+e,null,{observe:"response"})}restoreTrash(e,t){return this.http.post(`api/block/image/trash/${e.toStringEncoded()}/restore`,{new_image_name:t},{observe:"response"})}removeTrash(e,t=!1){return this.http.delete(`api/block/image/trash/${e.toStringEncoded()}/?force=${t}`,{observe:"response"})}};return e.\u0275fac=function(t){return new(t||e)(S.dc(h.b),S.dc(w.a))},e.\u0275prov=S.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),Object(f.b)([Object(f.e)(1,g.b),Object(f.d)("design:type",Function),Object(f.d)("design:paramtypes",[R.a,String]),Object(f.d)("design:returntype",void 0)],e.prototype,"createSnapshot",null),Object(f.b)([Object(f.e)(2,g.b),Object(f.d)("design:type",Function),Object(f.d)("design:paramtypes",[R.a,String,String]),Object(f.d)("design:returntype",void 0)],e.prototype,"renameSnapshot",null),Object(f.b)([Object(f.e)(2,g.b),Object(f.d)("design:type",Function),Object(f.d)("design:paramtypes",[R.a,String,Boolean]),Object(f.d)("design:returntype",void 0)],e.prototype,"protectSnapshot",null),Object(f.b)([Object(f.e)(1,g.b),Object(f.d)("design:type",Function),Object(f.d)("design:paramtypes",[R.a,String]),Object(f.d)("design:returntype",void 0)],e.prototype,"restoreTrash",null),e=Object(f.b)([g.a,Object(f.d)("design:paramtypes",[h.b,w.a])],e),e})();var k=a("DNAf"),M=a("a96k"),N=a("oxzT"),I=a("spCT"),$=a("QFaf"),T=a("1Ni5"),F=a("kvvV"),P=a("JK/P"),z=a("kn/O"),E=a("ajRT"),C=a("NwgZ"),D=a("ocLN"),O=a("ANnk"),A=a("f69J"),x=a("6+kj");function V(e,t){if(1&e&&(S.Sb(0,"option",6),S.Oc(1),S.Rb()),2&e){const e=t.$implicit;S.pc("ngValue",e),S.yb(1),S.Pc(e)}}function W(e,t){if(1&e&&(S.Sb(0,"select",5),S.Nb(1,"option",6),S.Mc(2,V,2,2,"option",7),S.Rb()),2&e){const e=S.ic();S.qc("id",e.setting),S.qc("name",e.setting),S.pc("formControlName",e.setting),S.yb(1),S.pc("ngValue",null),S.yb(1),S.pc("ngForOf",e.limits.values)}}function q(e,t){if(1&e&&S.Nb(0,"input",10),2&e){const e=S.ic(2);S.pc("formControlName",e.setting)}}function B(e,t){if(1&e&&S.Nb(0,"input",11),2&e){const e=S.ic(2);S.pc("formControlName",e.setting)}}function G(e,t){if(1&e&&(S.Qb(0),S.Nb(1,"br"),S.Sb(2,"div",12),S.Nb(3,"input",13),S.Sb(4,"label",14),S.Oc(5,"Yes"),S.Rb(),S.Rb(),S.Sb(6,"div",12),S.Nb(7,"input",13),S.Sb(8,"label",14),S.Oc(9,"No"),S.Rb(),S.Rb(),S.Pb()),2&e){const e=S.ic(2);S.yb(3),S.pc("id",e.setting+"True")("value",!0)("formControlName",e.setting),S.yb(1),S.pc("for",e.setting+"True"),S.yb(3),S.pc("id",e.setting+"False")("value",!1)("formControlName",e.setting),S.yb(1),S.pc("for",e.setting+"False")}}function L(e,t){if(1&e&&(S.Sb(0,"span"),S.Mc(1,q,1,1,"input",8),S.Mc(2,B,1,1,"input",9),S.Mc(3,G,10,8,"ng-container",3),S.Rb()),2&e){const e=S.ic();S.yb(1),S.pc("ngIf","int"===e.limits.type),S.yb(1),S.pc("ngIf","str"===e.limits.type),S.yb(1),S.pc("ngIf","bool"===e.limits.type)}}function j(e,t){if(1&e&&(S.Sb(0,"span",15),S.Qb(1),S.Wb(2,16),S.Pb(),S.Rb()),2&e){const e=S.ic();S.yb(2),S.ac(e.limits.min),S.Xb(2)}}function Q(e,t){if(1&e&&(S.Sb(0,"span",15),S.Qb(1),S.Wb(2,17),S.Pb(),S.Rb()),2&e){const e=S.ic();S.yb(2),S.ac(e.limits.max),S.Xb(2)}}let U=(()=>{class e{ngOnInit(){const e=[];"min"in this.limits&&e.push(o.A.min(this.limits.min)),"max"in this.limits&&e.push(o.A.max(this.limits.max)),this.settingsForm.get(this.setting).setValidators(e)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-iscsi-setting"]],inputs:{settingsForm:"settingsForm",formDir:"formDir",setting:"setting",limits:"limits"},decls:7,vars:7,consts:function(){return[[1,"form-group",3,"formGroup"],[1,"col-form-label",3,"for"],["class","form-control custom-select",3,"id","name","formControlName",4,"ngIf"],[4,"ngIf"],["class","invalid-feedback",4,"ngIf"],[1,"form-control","custom-select",3,"id","name","formControlName"],[3,"ngValue"],[3,"ngValue",4,"ngFor","ngForOf"],["type","number","class","form-control",3,"formControlName",4,"ngIf"],["type","text","class","form-control",3,"formControlName",4,"ngIf"],["type","number",1,"form-control",3,"formControlName"],["type","text",1,"form-control",3,"formControlName"],[1,"custom-control","custom-radio","custom-control-inline"],["type","radio",1,"custom-control-input",3,"id","value","formControlName"],[1,"custom-control-label",3,"for"],[1,"invalid-feedback"],"Must be greater than or equal to " + "\ufffd0\ufffd" + ".","Must be less than or equal to " + "\ufffd0\ufffd" + "."]},template:function(e,t){1&e&&(S.Sb(0,"div",0),S.Sb(1,"label",1),S.Oc(2),S.Rb(),S.Mc(3,W,3,5,"select",2),S.Mc(4,L,4,3,"span",3),S.Mc(5,j,3,1,"span",4),S.Mc(6,Q,3,1,"span",4),S.Rb()),2&e&&(S.pc("formGroup",t.settingsForm),S.yb(1),S.qc("for",t.setting),S.yb(1),S.Pc(t.setting),S.yb(1),S.pc("ngIf","enum"===t.limits.type),S.yb(1),S.pc("ngIf","enum"!==t.limits.type),S.yb(1),S.pc("ngIf",t.settingsForm.showError(t.setting,t.formDir,"min")),S.yb(1),S.pc("ngIf",t.settingsForm.showError(t.setting,t.formDir,"max")))},directives:[D.a,o.r,o.k,C.a,i.r,O.a,o.z,A.a,o.q,o.i,o.u,o.B,i.q,o.v,o.d,o.w],styles:[""]}),e})();var Y=a("uYzU");function K(e,t){1&e&&(S.Sb(0,"span",29),S.Wb(1,30),S.Rb())}function J(e,t){if(1&e&&(S.Sb(0,"span"),S.Sb(1,"legend",10),S.Wb(2,21),S.Rb(),S.Sb(3,"div",12),S.Sb(4,"div",13),S.Sb(5,"label",22),S.Wb(6,23),S.Rb(),S.Nb(7,"input",24),S.Mc(8,K,2,0,"span",25),S.Rb(),S.Rb(),S.Sb(9,"div",12),S.Sb(10,"div",13),S.Sb(11,"label",26),S.Wb(12,27),S.Rb(),S.Nb(13,"input",28),S.Rb(),S.Rb(),S.Rb()),2&e){const e=S.ic(),t=S.Ac(9);S.yb(8),S.pc("ngIf",e.settingsForm.showError("lun",t,"required"))}}function X(e,t){if(1&e&&(S.Sb(0,"option",31),S.Oc(1),S.jc(2,"iscsiBackstore"),S.Rb()),2&e){const e=t.$implicit;S.pc("value",e),S.yb(1),S.Pc(S.kc(2,2,e))}}function H(e,t){if(1&e&&(S.Sb(0,"div",12),S.Sb(1,"div",13),S.Nb(2,"cd-iscsi-setting",33),S.Rb(),S.Rb()),2&e){const e=t.$implicit,a=S.ic(2).$implicit,i=S.ic(),o=S.Ac(9);S.yb(2),S.pc("settingsForm",i.settingsForm)("formDir",o)("setting",e.key)("limits",i.getDiskControlLimits(a,e.key))}}function Z(e,t){if(1&e&&(S.Qb(0),S.Mc(1,H,3,4,"div",32),S.jc(2,"keyvalue"),S.Pb()),2&e){const e=S.ic().$implicit,t=S.ic();S.yb(1),S.pc("ngForOf",S.kc(2,1,t.disk_default_controls[e]))}}function ee(e,t){if(1&e&&(S.Qb(0),S.Mc(1,Z,3,3,"ng-container",9),S.Pb()),2&e){const e=t.$implicit,a=S.ic();S.yb(1),S.pc("ngIf",a.settingsForm.value.backstore===e)}}let te=(()=>{class e{constructor(e,t,a){this.activeModal=e,this.iscsiService=t,this.actionLabels=a}ngOnInit(){const e={backstore:new o.h(this.imagesSettings[this.image].backstore),lun:new o.h(this.imagesSettings[this.image].lun),wwn:new o.h(this.imagesSettings[this.image].wwn)};m.a.forEach(this.backstores,t=>{const a=this.imagesSettings[this.image][t]||{};m.a.forIn(this.disk_default_controls[t],(t,i)=>{e[i]=new o.h(a[i])})}),this.settingsForm=new $.a(e)}getDiskControlLimits(e,t){return this.disk_controls_limits?this.disk_controls_limits[e][t]:{type:"int"}}save(){const e=this.settingsForm.controls.backstore.value,t=this.settingsForm.controls.lun.value,a=this.settingsForm.controls.wwn.value,i={};m.a.forIn(this.settingsForm.controls,(t,a)=>{""!==t.value&&null!==t.value&&a in this.disk_default_controls[this.settingsForm.value.backstore]&&(i[a]=t.value,m.a.forEach(this.backstores,i=>{i!==e&&a in(this.imagesSettings[this.image][i]||{})&&(this.imagesSettings[this.image][i][a]=t.value)}))}),this.imagesSettings[this.image].backstore=e,this.imagesSettings[this.image].lun=t,this.imagesSettings[this.image].wwn=a,this.imagesSettings[this.image][e]=i,this.imagesSettings=Object.assign({},this.imagesSettings),this.control.updateValueAndValidity({emitEvent:!1}),this.activeModal.close()}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(r.a),S.Mb(v),S.Mb(l.b))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-iscsi-target-image-settings-modal"]],decls:25,vars:8,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"Configure",[1,"modal-content"],["name","settingsForm","novalidate","",1,"form",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],[1,"alert-warning"],"Changing these parameters from their default values is usually not necessary.",[4,"ngIf"],[1,"cd-header"],"Settings",[1,"form-group","row"],[1,"col-sm-12"],[1,"col-form-label"],"Backstore",["id","backstore","name","backstore","formControlName","backstore",1,"form-control","custom-select"],[3,"value",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],"Identifier",["for","lun",1,"col-form-label","required"],"lun",["type","number","id","lun","name","lun","formControlName","lun",1,"form-control"],["class","invalid-feedback",4,"ngIf"],["for","wwn",1,"col-form-label"],"wwn",["type","text","id","wwn","name","wwn","formControlName","wwn",1,"form-control"],[1,"invalid-feedback"],"This field is required.",[3,"value"],["class","form-group row",4,"ngFor","ngForOf"],[3,"settingsForm","formDir","setting","limits"]]},template:function(e,t){1&e&&(S.Sb(0,"cd-modal",0),S.Qb(1,1),S.Qb(2),S.Wb(3,2),S.Pb(),S.Oc(4,"\xa0 "),S.Sb(5,"small"),S.Oc(6),S.Rb(),S.Pb(),S.Qb(7,3),S.Sb(8,"form",4,5),S.Sb(10,"div",6),S.Sb(11,"p",7),S.Wb(12,8),S.Rb(),S.Mc(13,J,14,1,"span",9),S.Sb(14,"legend",10),S.Wb(15,11),S.Rb(),S.Sb(16,"div",12),S.Sb(17,"div",13),S.Sb(18,"label",14),S.Wb(19,15),S.Rb(),S.Sb(20,"select",16),S.Mc(21,X,3,4,"option",17),S.Rb(),S.Rb(),S.Rb(),S.Mc(22,ee,2,1,"ng-container",18),S.Rb(),S.Sb(23,"div",19),S.Sb(24,"cd-form-button-panel",20),S.gc("submitActionEvent",(function(){return t.save()})),S.Rb(),S.Rb(),S.Rb(),S.Pb(),S.Rb()),2&e&&(S.pc("modalRef",t.activeModal),S.yb(6),S.Pc(t.image),S.yb(2),S.pc("formGroup",t.settingsForm),S.yb(5),S.pc("ngIf",t.api_version>=1),S.yb(8),S.pc("ngForOf",t.backstores),S.yb(1),S.pc("ngForOf",t.backstores),S.yb(2),S.pc("form",t.settingsForm)("submitText",t.actionLabels.UPDATE))},directives:[E.a,o.C,o.r,o.k,C.a,i.r,D.a,O.a,o.z,A.a,o.q,o.i,i.q,x.a,o.v,o.d,o.u,o.B,U],pipes:[Y.a,i.k],styles:[""]}),e})();function ae(e,t){if(1&e&&(S.Sb(0,"div",12),S.Sb(1,"div",13),S.Nb(2,"cd-iscsi-setting",14),S.Rb(),S.Rb()),2&e){const e=t.$implicit,a=S.ic(),i=S.Ac(5);S.yb(2),S.pc("settingsForm",a.settingsForm)("formDir",i)("setting",e.key)("limits",a.getTargetControlLimits(e.key))}}let ie=(()=>{class e{constructor(e,t,a){this.activeModal=e,this.iscsiService=t,this.actionLabels=a}ngOnInit(){const e={};m.a.forIn(this.target_default_controls,(t,a)=>{e[a]=new o.h(this.target_controls.value[a])}),this.settingsForm=new $.a(e)}save(){const e={};m.a.forIn(this.settingsForm.controls,(t,a)=>{""!==t.value&&null!==t.value&&(e[a]=t.value)}),this.target_controls.setValue(e),this.activeModal.close()}getTargetControlLimits(e){return this.target_controls_limits?this.target_controls_limits[e]:["Yes","No"].includes(this.target_default_controls[e])?{type:"bool"}:{type:"int"}}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(r.a),S.Mb(v),S.Mb(l.b))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-iscsi-target-iqn-settings-modal"]],decls:13,vars:7,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"Advanced Settings",[1,"modal-content"],["name","settingsForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],[1,"alert-warning"],"Changing these parameters from their default values is usually not necessary.",["class","form-group row",4,"ngFor","ngForOf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[1,"form-group","row"],[1,"col-sm-12"],[3,"settingsForm","formDir","setting","limits"]]},template:function(e,t){1&e&&(S.Sb(0,"cd-modal",0),S.Qb(1,1),S.Wb(2,2),S.Pb(),S.Qb(3,3),S.Sb(4,"form",4,5),S.Sb(6,"div",6),S.Sb(7,"p",7),S.Wb(8,8),S.Rb(),S.Mc(9,ae,3,4,"div",9),S.jc(10,"keyvalue"),S.Rb(),S.Sb(11,"div",10),S.Sb(12,"cd-form-button-panel",11),S.gc("submitActionEvent",(function(){return t.save()})),S.Rb(),S.Rb(),S.Rb(),S.Pb(),S.Rb()),2&e&&(S.pc("modalRef",t.activeModal),S.yb(4),S.pc("formGroup",t.settingsForm),S.yb(5),S.pc("ngForOf",S.kc(10,5,t.settingsForm.controls)),S.yb(3),S.pc("form",t.settingsForm)("submitText",t.actionLabels.UPDATE))},directives:[E.a,o.C,o.r,o.k,C.a,i.q,x.a,D.a,U],pipes:[i.k],styles:[""]}),e})();var oe=a("zc8c");let se=(()=>{class e{constructor(e){this.ngControl=e}onInput(e){this.setValue(e)}setValue(e){e=m.a.isString(e)?e.trim():e,this.ngControl.control.setValue(e)}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(o.p))},e.\u0275dir=S.Hb({type:e,selectors:[["","cdTrim",""]],hostBindings:function(e,t){1&e&&S.gc("input",(function(e){return t.onInput(e.target.value)}))}}),e})();var ne=a("wnGv"),re=a("D4zM"),ce=a("cEzo"),le=a("8xTl");function be(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,42),S.Rb())}function de(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,43),S.Rb())}function pe(e,t){1&e&&(S.Sb(0,"span",41),S.Qb(1),S.Wb(2,44),S.Pb(),S.Nb(3,"br"),S.Qb(4),S.Wb(5,45),S.Pb(),S.Nb(6,"br"),S.Sb(7,"a",46),S.Wb(8,47),S.Rb(),S.Rb())}function me(e,t){1&e&&(S.Sb(0,"span",48),S.Wb(1,49),S.Rb())}const ue=function(e){return[e]};function fe(e,t){if(1&e){const e=S.Tb();S.Qb(0),S.Sb(1,"div",50),S.Nb(2,"input",51),S.Sb(3,"span",14),S.Sb(4,"button",52),S.gc("click",(function(){S.Dc(e);const a=t.index,i=t.$implicit;return S.ic(2).removePortal(a,i)})),S.Nb(5,"i",16),S.Rb(),S.Rb(),S.Rb(),S.Pb()}if(2&e){const e=t.$implicit,a=S.ic(2);S.yb(2),S.pc("value",e),S.yb(3),S.pc("ngClass",S.uc(2,ue,a.icons.destroy))}}function he(e,t){if(1&e&&(S.Sb(0,"span",41),S.Wb(1,53),S.Rb()),2&e){const e=S.ic(2);S.yb(1),S.ac(e.minimum_gateways),S.Xb(1)}}function ge(e,t){if(1&e&&(S.Sb(0,"div",56),S.Oc(1),S.Rb()),2&e){const e=S.ic().$implicit,t=S.ic(2);S.yb(1),S.Qc("lun: ",t.imagesSettings[e].lun,"")}}function Se(e,t){if(1&e&&(S.Qb(0),S.Wb(1,57),S.jc(2,"iscsiBackstore"),S.Pb()),2&e){const e=S.ic().$implicit,t=S.ic(2);S.yb(2),S.ac(S.kc(2,1,t.imagesSettings[e].backstore)),S.Xb(1)}}function ve(e,t){1&e&&(S.Qb(0),S.Wb(1,58),S.Pb())}function ye(e,t){if(1&e){const e=S.Tb();S.Qb(0),S.Sb(1,"div",50),S.Nb(2,"input",51),S.Sb(3,"span",14),S.Mc(4,ge,2,1,"div",54),S.Sb(5,"button",52),S.gc("click",(function(){S.Dc(e);const a=t.$implicit;return S.ic(2).imageSettingsModal(a)})),S.Nb(6,"i",16),S.Rb(),S.Sb(7,"button",52),S.gc("click",(function(){S.Dc(e);const a=t.index,i=t.$implicit;return S.ic(2).removeImage(a,i)})),S.Nb(8,"i",16),S.Rb(),S.Rb(),S.Rb(),S.Sb(9,"span",48),S.Mc(10,Se,3,3,"ng-container",55),S.Mc(11,ve,2,0,"ng-container",55),S.Rb(),S.Pb()}if(2&e){const e=t.$implicit,a=S.ic(2);S.yb(2),S.pc("value",e),S.yb(2),S.pc("ngIf",a.api_version>=1),S.yb(2),S.pc("ngClass",S.uc(6,ue,a.icons.deepCheck)),S.yb(2),S.pc("ngClass",S.uc(8,ue,a.icons.destroy)),S.yb(2),S.pc("ngIf",a.backstores.length>1),S.yb(1),S.pc("ngIf",a.hasAdvancedSettings(a.imagesSettings[e][a.imagesSettings[e].backstore]))}}function Re(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,59),S.Rb())}function we(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,60),S.Rb())}function _e(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,78),S.Rb())}function ke(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,79),S.Rb())}function Me(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,80),S.Rb())}function Ne(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,81),S.Rb())}function Ie(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,82),S.Rb())}function $e(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,83),S.Rb())}function Te(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,84),S.Rb())}function Fe(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,85),S.Rb())}function Pe(e,t){if(1&e&&(S.Sb(0,"div",61),S.Sb(1,"div",8),S.Sb(2,"label",62),S.Qb(3),S.Wb(4,63),S.Pb(),S.Rb(),S.Sb(5,"div",11),S.Nb(6,"input",64),S.Mc(7,_e,2,0,"span",17),S.Mc(8,ke,2,0,"span",17),S.Rb(),S.Rb(),S.Sb(9,"div",8),S.Sb(10,"label",65),S.Qb(11),S.Wb(12,66),S.Pb(),S.Rb(),S.Sb(13,"div",11),S.Sb(14,"div",12),S.Nb(15,"input",67),S.Sb(16,"span",14),S.Nb(17,"button",68),S.Nb(18,"cd-copy-2-clipboard-button",69),S.Rb(),S.Rb(),S.Mc(19,Me,2,0,"span",17),S.Mc(20,Ne,2,0,"span",17),S.Rb(),S.Rb(),S.Sb(21,"div",8),S.Sb(22,"label",70),S.Qb(23),S.Wb(24,71),S.Pb(),S.Rb(),S.Sb(25,"div",11),S.Nb(26,"input",72),S.Mc(27,Ie,2,0,"span",17),S.Mc(28,$e,2,0,"span",17),S.Rb(),S.Rb(),S.Sb(29,"div",8),S.Sb(30,"label",73),S.Qb(31),S.Wb(32,74),S.Pb(),S.Rb(),S.Sb(33,"div",11),S.Sb(34,"div",12),S.Nb(35,"input",75),S.Sb(36,"span",14),S.Nb(37,"button",76),S.Nb(38,"cd-copy-2-clipboard-button",77),S.Rb(),S.Rb(),S.Mc(39,Te,2,0,"span",17),S.Mc(40,Fe,2,0,"span",17),S.Rb(),S.Rb(),S.Rb()),2&e){S.ic();const e=S.Ac(2),t=S.ic();S.yb(7),S.pc("ngIf",t.targetForm.showError("user",e,"required")),S.yb(1),S.pc("ngIf",t.targetForm.showError("user",e,"pattern")),S.yb(11),S.pc("ngIf",t.targetForm.showError("password",e,"required")),S.yb(1),S.pc("ngIf",t.targetForm.showError("password",e,"pattern")),S.yb(7),S.pc("ngIf",t.targetForm.showError("mutual_user",e,"required")),S.yb(1),S.pc("ngIf",t.targetForm.showError("mutual_user",e,"pattern")),S.yb(11),S.pc("ngIf",t.targetForm.showError("mutual_password",e,"required")),S.yb(1),S.pc("ngIf",t.targetForm.showError("mutual_password",e,"pattern"))}}function ze(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,115),S.Rb())}function Ee(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,116),S.Rb())}function Ce(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,117),S.Rb())}function De(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,118),S.Rb())}function Oe(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,119),S.Rb())}function Ae(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,120),S.Rb())}function xe(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,121),S.Rb())}function Ve(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,122),S.Rb())}function We(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,123),S.Rb())}function qe(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,124),S.Rb())}function Be(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,125),S.Rb())}function Ge(e,t){if(1&e){const e=S.Tb();S.Qb(0),S.Sb(1,"div",50),S.Nb(2,"input",51),S.Sb(3,"span",14),S.Sb(4,"button",52),S.gc("click",(function(){S.Dc(e);const a=t.index,i=t.$implicit,o=S.ic(),s=o.$implicit,n=o.index;return S.ic(3).removeInitiatorImage(s,a,n,i)})),S.Nb(5,"i",16),S.Rb(),S.Rb(),S.Rb(),S.Pb()}if(2&e){const e=t.$implicit,a=S.ic(4);S.yb(2),S.pc("value",e),S.yb(3),S.pc("ngClass",S.uc(2,ue,a.icons.destroy))}}function Le(e,t){1&e&&(S.Sb(0,"span"),S.Wb(1,126),S.Rb())}function je(e,t){if(1&e&&(S.Sb(0,"div",22),S.Sb(1,"div",23),S.Sb(2,"cd-select",127),S.Nb(3,"i",25),S.Qb(4),S.Wb(5,128),S.Pb(),S.Rb(),S.Rb(),S.Rb()),2&e){const e=S.ic(),t=e.$implicit,a=e.index,i=S.ic(3);S.yb(2),S.pc("data",t.getValue("luns"))("options",i.imagesInitiatorSelections[a])("messages",i.messages.initiatorImage),S.yb(1),S.pc("ngClass",S.uc(4,ue,i.icons.add))}}function Qe(e,t){if(1&e){const e=S.Tb();S.Sb(0,"div",92),S.Sb(1,"div",5),S.Qb(2),S.Wb(3,93),S.Pb(),S.Oc(4),S.Sb(5,"button",94),S.gc("click",(function(){S.Dc(e);const a=t.index;return S.ic(3).removeInitiator(a)})),S.Nb(6,"i",25),S.Rb(),S.Rb(),S.Sb(7,"div",7),S.Sb(8,"div",8),S.Sb(9,"label",95),S.Wb(10,96),S.Rb(),S.Sb(11,"div",11),S.Sb(12,"input",97),S.gc("blur",(function(){return S.Dc(e),S.ic(3).updatedInitiatorSelector()})),S.Rb(),S.Mc(13,ze,2,0,"span",17),S.Mc(14,Ee,2,0,"span",17),S.Mc(15,Ce,2,0,"span",17),S.Rb(),S.Rb(),S.Qb(16,61),S.Sb(17,"div",8),S.Sb(18,"label",98),S.Wb(19,99),S.Rb(),S.Sb(20,"div",11),S.Nb(21,"input",100),S.Mc(22,De,2,0,"span",17),S.Mc(23,Oe,2,0,"span",17),S.Rb(),S.Rb(),S.Sb(24,"div",8),S.Sb(25,"label",101),S.Wb(26,102),S.Rb(),S.Sb(27,"div",11),S.Sb(28,"div",12),S.Nb(29,"input",103),S.Sb(30,"span",14),S.Nb(31,"button",104),S.Nb(32,"cd-copy-2-clipboard-button",105),S.Rb(),S.Rb(),S.Mc(33,Ae,2,0,"span",17),S.Mc(34,xe,2,0,"span",17),S.Rb(),S.Rb(),S.Sb(35,"div",8),S.Sb(36,"label",106),S.Qb(37),S.Wb(38,107),S.Pb(),S.Rb(),S.Sb(39,"div",11),S.Nb(40,"input",108),S.Mc(41,Ve,2,0,"span",17),S.Mc(42,We,2,0,"span",17),S.Rb(),S.Rb(),S.Sb(43,"div",8),S.Sb(44,"label",109),S.Wb(45,110),S.Rb(),S.Sb(46,"div",11),S.Sb(47,"div",12),S.Nb(48,"input",111),S.Sb(49,"span",14),S.Nb(50,"button",104),S.Nb(51,"cd-copy-2-clipboard-button",105),S.Rb(),S.Rb(),S.Mc(52,qe,2,0,"span",17),S.Mc(53,Be,2,0,"span",17),S.Rb(),S.Rb(),S.Pb(),S.Sb(54,"div",8),S.Sb(55,"label",112),S.Wb(56,113),S.Rb(),S.Sb(57,"div",11),S.Mc(58,Ge,6,4,"ng-container",21),S.Mc(59,Le,2,0,"span",55),S.Mc(60,je,6,6,"div",114),S.Rb(),S.Rb(),S.Rb(),S.Rb()}if(2&e){const e=t.$implicit,a=t.index;S.ic(2);const i=S.Ac(2),o=S.ic();S.pc("formGroupName",a),S.yb(4),S.Qc(": ",e.getValue("client_iqn")," "),S.yb(2),S.pc("ngClass",S.uc(25,ue,o.icons.destroy)),S.yb(7),S.pc("ngIf",e.showError("client_iqn",i,"notUnique")),S.yb(1),S.pc("ngIf",e.showError("client_iqn",i,"required")),S.yb(1),S.pc("ngIf",e.showError("client_iqn",i,"pattern")),S.yb(6),S.pc("id","user"+a),S.yb(1),S.pc("ngIf",e.showError("user",i,"required")),S.yb(1),S.pc("ngIf",e.showError("user",i,"pattern")),S.yb(6),S.pc("id","password"+a),S.yb(2),S.pc("cdPasswordButton","password"+a),S.yb(1),S.pc("source","password"+a),S.yb(1),S.pc("ngIf",e.showError("password",i,"required")),S.yb(1),S.pc("ngIf",e.showError("password",i,"pattern")),S.yb(6),S.pc("id","mutual_user"+a),S.yb(1),S.pc("ngIf",e.showError("mutual_user",i,"required")),S.yb(1),S.pc("ngIf",e.showError("mutual_user",i,"pattern")),S.yb(6),S.pc("id","mutual_password"+a),S.yb(2),S.pc("cdPasswordButton","mutual_password"+a),S.yb(1),S.pc("source","mutual_password"+a),S.yb(1),S.pc("ngIf",e.showError("mutual_password",i,"required")),S.yb(1),S.pc("ngIf",e.showError("mutual_password",i,"pattern")),S.yb(5),S.pc("ngForOf",e.getValue("luns")),S.yb(1),S.pc("ngIf",e.getValue("cdIsInGroup")),S.yb(1),S.pc("ngIf",!e.getValue("cdIsInGroup"))}}function Ue(e,t){1&e&&(S.Sb(0,"span",48),S.Wb(1,129),S.Rb())}function Ye(e,t){if(1&e){const e=S.Tb();S.Sb(0,"div",8),S.Sb(1,"label",86),S.Wb(2,87),S.Rb(),S.Sb(3,"div",88),S.Mc(4,Qe,61,27,"div",89),S.Sb(5,"div",22),S.Sb(6,"div",23),S.Mc(7,Ue,2,0,"span",18),S.Sb(8,"button",90),S.gc("click",(function(){return S.Dc(e),S.ic(2).addInitiator(),!1})),S.Nb(9,"i",25),S.Qb(10),S.Wb(11,91),S.Pb(),S.Rb(),S.Rb(),S.Rb(),S.Nb(12,"hr"),S.Rb(),S.Rb()}if(2&e){const e=S.ic(2);S.yb(4),S.pc("ngForOf",e.initiators.controls),S.yb(3),S.pc("ngIf",0===e.initiators.controls.length),S.yb(2),S.pc("ngClass",S.uc(3,ue,e.icons.add))}}function Ke(e,t){if(1&e){const e=S.Tb();S.Qb(0),S.Sb(1,"div",50),S.Nb(2,"input",51),S.Sb(3,"span",14),S.Sb(4,"button",52),S.gc("click",(function(){S.Dc(e);const a=t.index,i=S.ic(),o=i.$implicit,s=i.index;return S.ic(3).removeGroupInitiator(o,a,s)})),S.Nb(5,"i",16),S.Rb(),S.Rb(),S.Rb(),S.Pb()}if(2&e){const e=t.$implicit,a=S.ic(4);S.yb(2),S.pc("value",e),S.yb(3),S.pc("ngClass",S.uc(2,ue,a.icons.destroy))}}function Je(e,t){if(1&e){const e=S.Tb();S.Qb(0),S.Sb(1,"div",50),S.Nb(2,"input",51),S.Sb(3,"span",14),S.Sb(4,"button",52),S.gc("click",(function(){S.Dc(e);const a=t.index,i=S.ic(),o=i.$implicit,s=i.index;return S.ic(3).removeGroupDisk(o,a,s)})),S.Nb(5,"i",16),S.Rb(),S.Rb(),S.Rb(),S.Pb()}if(2&e){const e=t.$implicit,a=S.ic(4);S.yb(2),S.pc("value",e),S.yb(3),S.pc("ngClass",S.uc(2,ue,a.icons.destroy))}}function Xe(e,t){if(1&e){const e=S.Tb();S.Sb(0,"div",92),S.Sb(1,"div",5),S.Qb(2),S.Wb(3,133),S.Pb(),S.Oc(4),S.Sb(5,"button",94),S.gc("click",(function(){S.Dc(e);const a=t.index;return S.ic(3).removeGroup(a)})),S.Nb(6,"i",25),S.Rb(),S.Rb(),S.Sb(7,"div",7),S.Sb(8,"div",8),S.Sb(9,"label",134),S.Wb(10,135),S.Rb(),S.Sb(11,"div",11),S.Nb(12,"input",136),S.Rb(),S.Rb(),S.Sb(13,"div",8),S.Sb(14,"label",137),S.Qb(15),S.Wb(16,138),S.Pb(),S.Rb(),S.Sb(17,"div",11),S.Mc(18,Ke,6,4,"ng-container",21),S.Sb(19,"div",22),S.Sb(20,"div",23),S.Sb(21,"cd-select",24),S.gc("selection",(function(a){S.Dc(e);const i=t.index;return S.ic(3).onGroupMemberSelection(a,i)})),S.Nb(22,"i",25),S.Qb(23),S.Wb(24,139),S.Pb(),S.Rb(),S.Rb(),S.Rb(),S.Nb(25,"hr"),S.Rb(),S.Rb(),S.Sb(26,"div",8),S.Sb(27,"label",28),S.Qb(28),S.Wb(29,140),S.Pb(),S.Rb(),S.Sb(30,"div",11),S.Mc(31,Je,6,4,"ng-container",21),S.Sb(32,"div",22),S.Sb(33,"div",23),S.Sb(34,"cd-select",127),S.Nb(35,"i",25),S.Qb(36),S.Wb(37,141),S.Pb(),S.Rb(),S.Rb(),S.Rb(),S.Nb(38,"hr"),S.Rb(),S.Rb(),S.Rb(),S.Rb()}if(2&e){const e=t.$implicit,a=t.index,i=S.ic(3);S.pc("formGroupName",a),S.yb(4),S.Qc(": ",e.getValue("group_id")," "),S.yb(2),S.pc("ngClass",S.uc(13,ue,i.icons.destroy)),S.yb(12),S.pc("ngForOf",e.getValue("members")),S.yb(3),S.pc("data",e.getValue("members"))("options",i.groupMembersSelections[a])("messages",i.messages.groupInitiator),S.yb(1),S.pc("ngClass",S.uc(15,ue,i.icons.add)),S.yb(9),S.pc("ngForOf",e.getValue("disks")),S.yb(3),S.pc("data",e.getValue("disks"))("options",i.groupDiskSelections[a])("messages",i.messages.initiatorImage),S.yb(1),S.pc("ngClass",S.uc(17,ue,i.icons.add))}}function He(e,t){1&e&&(S.Sb(0,"span",48),S.Wb(1,142),S.Rb())}function Ze(e,t){if(1&e){const e=S.Tb();S.Sb(0,"div",8),S.Sb(1,"label",86),S.Wb(2,130),S.Rb(),S.Sb(3,"div",131),S.Mc(4,Xe,39,19,"div",89),S.Sb(5,"div",22),S.Sb(6,"div",23),S.Mc(7,He,2,0,"span",18),S.Sb(8,"button",90),S.gc("click",(function(){return S.Dc(e),S.ic(2).addGroup(),!1})),S.Nb(9,"i",25),S.Qb(10),S.Wb(11,132),S.Pb(),S.Rb(),S.Rb(),S.Rb(),S.Rb(),S.Rb()}if(2&e){const e=S.ic(2);S.yb(4),S.pc("ngForOf",e.groups.controls),S.yb(3),S.pc("ngIf",0===e.groups.controls.length),S.yb(2),S.pc("ngClass",S.uc(3,ue,e.icons.add))}}function et(e,t){if(1&e){const e=S.Tb();S.Sb(0,"div",1),S.Sb(1,"form",2,3),S.Sb(3,"div",4),S.Sb(4,"div",5),S.Wb(5,6),S.jc(6,"titlecase"),S.jc(7,"upperFirst"),S.Rb(),S.Sb(8,"div",7),S.Sb(9,"div",8),S.Sb(10,"label",9),S.Wb(11,10),S.Rb(),S.Sb(12,"div",11),S.Sb(13,"div",12),S.Nb(14,"input",13),S.Sb(15,"span",14),S.Sb(16,"button",15),S.gc("click",(function(){return S.Dc(e),S.ic().targetSettingsModal()})),S.Nb(17,"i",16),S.Rb(),S.Rb(),S.Rb(),S.Mc(18,be,2,0,"span",17),S.Mc(19,de,2,0,"span",17),S.Mc(20,pe,9,0,"span",17),S.Mc(21,me,2,0,"span",18),S.Nb(22,"hr"),S.Rb(),S.Rb(),S.Sb(23,"div",8),S.Sb(24,"label",19),S.Wb(25,20),S.Rb(),S.Sb(26,"div",11),S.Mc(27,fe,6,4,"ng-container",21),S.Sb(28,"div",22),S.Sb(29,"div",23),S.Sb(30,"cd-select",24),S.gc("selection",(function(t){return S.Dc(e),S.ic().onPortalSelection(t)})),S.Nb(31,"i",25),S.Qb(32),S.Wb(33,26),S.Pb(),S.Rb(),S.Rb(),S.Rb(),S.Nb(34,"input",27),S.Mc(35,he,2,1,"span",17),S.Nb(36,"hr"),S.Rb(),S.Rb(),S.Sb(37,"div",8),S.Sb(38,"label",28),S.Wb(39,29),S.Rb(),S.Sb(40,"div",11),S.Mc(41,ye,12,10,"ng-container",21),S.Nb(42,"input",30),S.Mc(43,Re,2,0,"span",17),S.Mc(44,we,2,0,"span",17),S.Sb(45,"div",22),S.Sb(46,"div",23),S.Sb(47,"cd-select",24),S.gc("selection",(function(t){return S.Dc(e),S.ic().onImageSelection(t)})),S.Nb(48,"i",25),S.Qb(49),S.Wb(50,31),S.Pb(),S.Rb(),S.Rb(),S.Rb(),S.Nb(51,"hr"),S.Rb(),S.Rb(),S.Sb(52,"div",8),S.Sb(53,"div",32),S.Sb(54,"div",33),S.Nb(55,"input",34),S.Sb(56,"label",35),S.Wb(57,36),S.Rb(),S.Rb(),S.Nb(58,"hr"),S.Rb(),S.Rb(),S.Mc(59,Pe,41,8,"div",37),S.Mc(60,Ye,13,5,"div",38),S.Mc(61,Ze,12,5,"div",38),S.Rb(),S.Sb(62,"div",39),S.Sb(63,"cd-form-button-panel",40),S.gc("submitActionEvent",(function(){return S.Dc(e),S.ic().submit()})),S.jc(64,"titlecase"),S.jc(65,"upperFirst"),S.Rb(),S.Rb(),S.Rb(),S.Rb(),S.Rb()}if(2&e){const e=S.Ac(2),t=S.ic();S.yb(1),S.pc("formGroup",t.targetForm),S.yb(6),S.ac(S.kc(6,26,t.action))(S.kc(7,28,t.resource)),S.Xb(5),S.yb(10),S.pc("ngClass",S.uc(34,ue,t.icons.deepCheck)),S.yb(1),S.pc("ngIf",t.targetForm.showError("target_iqn",e,"required")),S.yb(1),S.pc("ngIf",t.targetForm.showError("target_iqn",e,"pattern")),S.yb(1),S.pc("ngIf",t.targetForm.showError("target_iqn",e,"iqn")),S.yb(1),S.pc("ngIf",t.hasAdvancedSettings(t.targetForm.getValue("target_controls"))),S.yb(6),S.pc("ngForOf",t.portals.value),S.yb(3),S.pc("data",t.portals.value)("options",t.portalsSelections)("messages",t.messages.portals),S.yb(1),S.pc("ngClass",S.uc(36,ue,t.icons.add)),S.yb(4),S.pc("ngIf",t.targetForm.showError("portals",e,"minGateways")),S.yb(6),S.pc("ngForOf",t.targetForm.getValue("disks")),S.yb(2),S.pc("ngIf",t.targetForm.showError("disks",e,"dupLunId")),S.yb(1),S.pc("ngIf",t.targetForm.showError("disks",e,"dupWwn")),S.yb(3),S.pc("data",t.disks.value)("options",t.imagesSelections)("messages",t.messages.images),S.yb(1),S.pc("ngClass",S.uc(38,ue,t.icons.add)),S.yb(11),S.pc("ngIf",t.cephIscsiConfigVersion>10&&!t.targetForm.getValue("acl_enabled")),S.yb(1),S.pc("ngIf",t.targetForm.getValue("acl_enabled")),S.yb(1),S.pc("ngIf",t.targetForm.getValue("acl_enabled")),S.yb(2),S.pc("form",t.targetForm)("submitText",S.kc(64,30,t.action)+" "+S.kc(65,32,t.resource))}}let tt=(()=>{class e extends I.a{constructor(e,t,a,i,o,s,n){super(),this.iscsiService=e,this.modalService=t,this.rbdService=a,this.router=i,this.route=o,this.taskWrapper=s,this.actionLabels=n,this.api_version=0,this.minimum_gateways=1,this.icons=N.a,this.isEdit=!1,this.portalsSelections=[],this.imagesInitiatorSelections=[],this.groupDiskSelections=[],this.groupMembersSelections=[],this.imagesSettings={},this.messages={portals:new k.a({noOptions:"There are no portals available."}),images:new k.a({noOptions:"There are no images available."}),initiatorImage:new k.a({noOptions:"There are no images available. Please make sure you add an image to the target."}),groupInitiator:new k.a({noOptions:"There are no initiators available. Please make sure you add an initiator to the target."})},this.IQN_REGEX=/^iqn\.(19|20)\d\d-(0[1-9]|1[0-2])\.\D{2,3}(\.[A-Za-z0-9-]+)+(:[A-Za-z0-9-\.]+)*$/,this.USER_REGEX=/^[\w\.:@_-]{8,64}$/,this.PASSWORD_REGEX=/^[\w@\-_\/]{12,16}$/,this.resource="target"}ngOnInit(){const e=[this.iscsiService.listTargets(),this.rbdService.list(),this.iscsiService.portals(),this.iscsiService.settings(),this.iscsiService.version()];this.router.url.startsWith("/block/iscsi/targets/edit")&&(this.isEdit=!0,this.route.params.subscribe(t=>{this.target_iqn=decodeURIComponent(t.target_iqn),e.push(this.iscsiService.getTarget(this.target_iqn))})),this.action=this.isEdit?this.actionLabels.EDIT:this.actionLabels.CREATE,Object(u.a)(e).subscribe(e=>{const t=m()(e[0]).filter(e=>e.target_iqn!==this.target_iqn).flatMap(e=>e.disks).map(e=>`${e.pool}/${e.image}`).value();"api_version"in e[3]&&(this.api_version=e[3].api_version),this.minimum_gateways=e[3].config.minimum_gateways,this.target_default_controls=e[3].target_default_controls,this.target_controls_limits=e[3].target_controls_limits,this.disk_default_controls=e[3].disk_default_controls,this.disk_controls_limits=e[3].disk_controls_limits,this.backstores=e[3].backstores,this.default_backstore=e[3].default_backstore,this.unsupported_rbd_features=e[3].unsupported_rbd_features,this.required_rbd_features=e[3].required_rbd_features,this.imagesAll=m()(e[1]).flatMap(e=>e.value).filter(e=>!e.namespace&&-1===t.indexOf(`${e.pool_name}/${e.name}`)&&0!==this.getValidBackstores(e).length).value(),this.imagesSelections=this.imagesAll.map(e=>new M.a(!1,`${e.pool_name}/${e.name}`,""));const a=[];e[2].forEach(e=>{e.ip_addresses.forEach(t=>{a.push(new M.a(!1,e.name+":"+t,""))})}),this.portalsSelections=[...a],this.cephIscsiConfigVersion=e[4].ceph_iscsi_config_version,this.createForm(),e[5]&&this.resolveModel(e[5]),this.loadingReady()})}createForm(){if(this.targetForm=new $.a({target_iqn:new o.h("iqn.2001-07.com.ceph:"+Date.now(),{validators:[o.A.required,o.A.pattern(this.IQN_REGEX)]}),target_controls:new o.h({}),portals:new o.h([],{validators:[T.a.custom("minGateways",e=>m.a.uniq(e.map(e=>e.split(":")[0])).length<Math.max(1,this.minimum_gateways))]}),disks:new o.h([],{validators:[T.a.custom("dupLunId",e=>{const t=this.getLunIds(e);return t.length!==m.a.uniq(t).length}),T.a.custom("dupWwn",e=>{const t=this.getWwns(e);return t.length!==m.a.uniq(t).length})]}),initiators:new o.e([]),groups:new o.e([]),acl_enabled:new o.h(!1)}),this.cephIscsiConfigVersion>10){const e=new $.a({user:new o.h(""),password:new o.h(""),mutual_user:new o.h(""),mutual_password:new o.h("")});this.setAuthValidator(e),this.targetForm.addControl("auth",e)}}resolveModel(e){this.targetForm.patchValue({target_iqn:e.target_iqn,target_controls:e.target_controls,acl_enabled:e.acl_enabled}),this.cephIscsiConfigVersion>10&&this.targetForm.patchValue({auth:e.auth});const t=[];m.a.forEach(e.portals,e=>{t.push(`${e.host}:${e.ip}`)}),this.targetForm.patchValue({portals:t});const a=[];m.a.forEach(e.disks,e=>{const t=`${e.pool}/${e.image}`;a.push(t),this.imagesSettings[t]={backstore:e.backstore},this.imagesSettings[t][e.backstore]=e.controls,"lun"in e&&(this.imagesSettings[t].lun=e.lun),"wwn"in e&&(this.imagesSettings[t].wwn=e.wwn),this.onImageSelection({option:{name:t,selected:!0}})}),this.targetForm.patchValue({disks:a}),m.a.forEach(e.clients,e=>{const t=this.addInitiator();e.luns=m.a.map(e.luns,e=>`${e.pool}/${e.image}`),t.patchValue(e)}),e.groups.forEach((e,t)=>{const a=this.addGroup();e.disks=m.a.map(e.disks,e=>`${e.pool}/${e.image}`),a.patchValue(e),m.a.forEach(e.members,e=>{this.onGroupMemberSelection({option:new M.a(!0,e,"")},t)})})}hasAdvancedSettings(e){return Object.values(e).length>0}get portals(){return this.targetForm.get("portals")}onPortalSelection(){this.portals.setValue(this.portals.value)}removePortal(e,t){return this.portalsSelections.forEach(e=>{e.name===t&&(e.selected=!1)}),this.portals.value.splice(e,1),this.portals.setValue(this.portals.value),!1}get disks(){return this.targetForm.get("disks")}removeImage(e,t){return this.imagesSelections.forEach(e=>{e.name===t&&(e.selected=!1)}),this.disks.value.splice(e,1),this.removeImageRefs(t),this.targetForm.get("disks").updateValueAndValidity({emitEvent:!1}),!1}removeImageRefs(e){this.initiators.controls.forEach(t=>{const a=t.value.luns.filter(t=>t!==e);t.get("luns").setValue(a)}),this.groups.controls.forEach(t=>{const a=t.value.disks.filter(t=>t!==e);t.get("disks").setValue(a)}),m.a.forEach(this.imagesInitiatorSelections,(t,a)=>{this.imagesInitiatorSelections[a]=t.filter(t=>t.name!==e)}),m.a.forEach(this.groupDiskSelections,(t,a)=>{this.groupDiskSelections[a]=t.filter(t=>t.name!==e)})}getDefaultBackstore(e){let t=this.default_backstore;const a=this.getImageById(e);return this.validFeatures(a,this.default_backstore)||this.backstores.forEach(e=>{e!==this.default_backstore&&this.validFeatures(a,e)&&(t=e)}),t}isLunIdInUse(e,t){const a=this.disks.value.filter(e=>e!==t);return this.getLunIds(a).includes(e)}getLunIds(e){return m.a.map(e,e=>this.imagesSettings[e].lun)}nextLunId(e){const t=this.disks.value.filter(t=>t!==e),a=this.getLunIds(t);let i=0;for(;a.includes(i);)i++;return i}getWwns(e){return m.a.map(e,e=>this.imagesSettings[e].wwn).filter(e=>m.a.isString(e)&&""!==e)}onImageSelection(e){const t=e.option;if(t.selected){if(this.imagesSettings[t.name])this.isLunIdInUse(this.imagesSettings[t.name].lun,t.name)&&(this.imagesSettings[t.name].lun=this.nextLunId(t.name));else{const e=this.getDefaultBackstore(t.name);this.imagesSettings[t.name]={backstore:e,lun:this.nextLunId(t.name)},this.imagesSettings[t.name][e]={}}m.a.forEach(this.imagesInitiatorSelections,(e,a)=>{e.push(new M.a(!1,t.name,"")),this.imagesInitiatorSelections[a]=[...e]}),m.a.forEach(this.groupDiskSelections,(e,a)=>{e.push(new M.a(!1,t.name,"")),this.groupDiskSelections[a]=[...e]})}else this.removeImageRefs(t.name);this.targetForm.get("disks").updateValueAndValidity({emitEvent:!1})}get initiators(){return this.targetForm.get("initiators")}addInitiator(){const e=new $.a({client_iqn:new o.h("",{validators:[o.A.required,T.a.custom("notUnique",e=>{const t=this.initiators.controls.reduce((function(e,t){return e.concat(t.value.client_iqn)}),[]);return t.indexOf(e)!==t.lastIndexOf(e)}),o.A.pattern(this.IQN_REGEX)]}),auth:new $.a({user:new o.h(""),password:new o.h(""),mutual_user:new o.h(""),mutual_password:new o.h("")}),luns:new o.h([]),cdIsInGroup:new o.h(!1)});this.setAuthValidator(e),this.initiators.push(e),m.a.forEach(this.groupMembersSelections,(e,t)=>{e.push(new M.a(!1,"","")),this.groupMembersSelections[t]=[...e]});const t=m.a.map(this.targetForm.getValue("disks"),e=>new M.a(!1,e,""));return this.imagesInitiatorSelections.push(t),e}setAuthValidator(e){T.a.validateIf(e.get("user"),()=>e.getValue("password")||e.getValue("mutual_user")||e.getValue("mutual_password"),[o.A.required],[o.A.pattern(this.USER_REGEX)],[e.get("password"),e.get("mutual_user"),e.get("mutual_password")]),T.a.validateIf(e.get("password"),()=>e.getValue("user")||e.getValue("mutual_user")||e.getValue("mutual_password"),[o.A.required],[o.A.pattern(this.PASSWORD_REGEX)],[e.get("user"),e.get("mutual_user"),e.get("mutual_password")]),T.a.validateIf(e.get("mutual_user"),()=>e.getValue("mutual_password"),[o.A.required],[o.A.pattern(this.USER_REGEX)],[e.get("user"),e.get("password"),e.get("mutual_password")]),T.a.validateIf(e.get("mutual_password"),()=>e.getValue("mutual_user"),[o.A.required],[o.A.pattern(this.PASSWORD_REGEX)],[e.get("user"),e.get("password"),e.get("mutual_user")])}removeInitiator(e){const t=this.initiators.value[e];this.initiators.removeAt(e),m.a.forEach(this.groupMembersSelections,(t,a)=>{t.splice(e,1),this.groupMembersSelections[a]=[...t]}),this.groups.controls.forEach(e=>{const a=e.value.members.filter(e=>e!==t.client_iqn);e.get("members").setValue(a)}),this.imagesInitiatorSelections.splice(e,1)}updatedInitiatorSelector(){this.initiators.controls.forEach(e=>{e.get("client_iqn").updateValueAndValidity({emitEvent:!1})}),m.a.forEach(this.groupMembersSelections,(e,t)=>{m.a.forEach(e,(e,t)=>{const a=e.name;e.name=this.initiators.controls[t].value.client_iqn,this.groups.controls.forEach(t=>{const i=t.value.members,o=i.indexOf(a);-1!==o&&(i[o]=e.name),t.get("members").setValue(i)})}),this.groupMembersSelections[t]=[...this.groupMembersSelections[t]]})}removeInitiatorImage(e,t,a,i){const o=e.getValue("luns");return o.splice(t,1),e.patchValue({luns:o}),this.imagesInitiatorSelections[a].forEach(e=>{e.name===i&&(e.selected=!1)}),!1}get groups(){return this.targetForm.get("groups")}addGroup(){const e=new $.a({group_id:new o.h("",{validators:[o.A.required]}),members:new o.h([]),disks:new o.h([])});this.groups.push(e);const t=m.a.map(this.targetForm.getValue("disks"),e=>new M.a(!1,e,""));this.groupDiskSelections.push(t);const a=m.a.map(this.initiators.value,e=>new M.a(!1,e.client_iqn,"",!e.cdIsInGroup));return this.groupMembersSelections.push(a),e}removeGroup(e){this.groups.removeAt(e),this.groupMembersSelections[e].filter(e=>e.selected).forEach(t=>{t.selected=!1,this.onGroupMemberSelection({option:t},e)}),this.groupMembersSelections.splice(e,1),this.groupDiskSelections.splice(e,1)}onGroupMemberSelection(e,t){const a=e.option;let i=[];if(!a.selected){const e=this.groupDiskSelections[t].filter(e=>e.selected);i=e.map(e=>e.name)}this.initiators.controls.forEach((e,t)=>{e.value.client_iqn===a.name&&(e.patchValue({luns:i}),e.get("cdIsInGroup").setValue(a.selected),m.a.forEach(this.groupMembersSelections,e=>{e[t].enabled=!a.selected}),this.imagesInitiatorSelections[t].forEach(e=>{e.selected=i.includes(e.name)}))})}removeGroupInitiator(e,t,a){const i=e.getValue("members")[t];e.getValue("members").splice(t,1),this.onGroupMemberSelection({option:new M.a(!1,i,"")},a)}removeGroupDisk(e,t,a){const i=e.getValue("disks")[t];e.getValue("disks").splice(t,1),this.groupDiskSelections[a].forEach(e=>{e.name===i&&(e.selected=!1)}),this.groupDiskSelections[a]=[...this.groupDiskSelections[a]]}submit(){const e=m.a.cloneDeep(this.targetForm.value),t={target_iqn:this.targetForm.getValue("target_iqn"),target_controls:this.targetForm.getValue("target_controls"),acl_enabled:this.targetForm.getValue("acl_enabled"),portals:[],disks:[],clients:[],groups:[]};if(this.cephIscsiConfigVersion>10){const e=this.targetForm.get("auth");e.getValue("user")||e.get("user").setValue(""),e.getValue("password")||e.get("password").setValue(""),e.getValue("mutual_user")||e.get("mutual_user").setValue(""),e.getValue("mutual_password")||e.get("mutual_password").setValue("");const a=this.targetForm.getValue("acl_enabled");t.auth={user:a?"":e.getValue("user"),password:a?"":e.getValue("password"),mutual_user:a?"":e.getValue("mutual_user"),mutual_password:a?"":e.getValue("mutual_password")}}let a;e.disks.forEach(e=>{const a=e.split("/"),i=this.imagesSettings[e].backstore;t.disks.push({pool:a[0],image:a[1],backstore:i,controls:this.imagesSettings[e][i],lun:this.imagesSettings[e].lun,wwn:this.imagesSettings[e].wwn})}),e.portals.forEach(e=>{const a=e.indexOf(":");t.portals.push({host:e.substring(0,a),ip:e.substring(a+1)})}),t.acl_enabled&&(e.initiators.forEach(e=>{e.auth.user||(e.auth.user=""),e.auth.password||(e.auth.password=""),e.auth.mutual_user||(e.auth.mutual_user=""),e.auth.mutual_password||(e.auth.mutual_password=""),delete e.cdIsInGroup;const t=[];e.luns.forEach(e=>{const a=e.split("/");t.push({pool:a[0],image:a[1]})}),e.luns=t}),t.clients=e.initiators),t.acl_enabled&&(e.groups.forEach(e=>{const t=[];e.disks.forEach(e=>{const a=e.split("/");t.push({pool:a[0],image:a[1]})}),e.disks=t}),t.groups=e.groups),this.isEdit?(t.new_target_iqn=t.target_iqn,t.target_iqn=this.target_iqn,a=this.taskWrapper.wrapTaskAroundCall({task:new F.a("iscsi/target/edit",{target_iqn:t.target_iqn}),call:this.iscsiService.updateTarget(this.target_iqn,t)})):a=this.taskWrapper.wrapTaskAroundCall({task:new F.a("iscsi/target/create",{target_iqn:t.target_iqn}),call:this.iscsiService.createTarget(t)}),a.subscribe({error:()=>{this.targetForm.setErrors({cdSubmitButton:!0})},complete:()=>this.router.navigate(["/block/iscsi/targets"])})}targetSettingsModal(){const e={target_controls:this.targetForm.get("target_controls"),target_default_controls:this.target_default_controls,target_controls_limits:this.target_controls_limits};this.modalRef=this.modalService.show(ie,e)}imageSettingsModal(e){const t={imagesSettings:this.imagesSettings,image:e,api_version:this.api_version,disk_default_controls:this.disk_default_controls,disk_controls_limits:this.disk_controls_limits,backstores:this.getValidBackstores(this.getImageById(e)),control:this.targetForm.get("disks")};this.modalRef=this.modalService.show(te,t)}validFeatures(e,t){const a=e.features,i=this.required_rbd_features[t];return(a&i)===i&&0==(a&this.unsupported_rbd_features[t])}getImageById(e){return this.imagesAll.find(t=>e===`${t.pool_name}/${t.name}`)}getValidBackstores(e){return this.backstores.filter(t=>this.validFeatures(e,t))}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(v),S.Mb(P.a),S.Mb(_),S.Mb(s.e),S.Mb(s.a),S.Mb(z.a),S.Mb(l.b))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-iscsi-target-form"]],features:[S.vb],decls:1,vars:1,consts:function(){return[["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],["name","targetForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"card"],[1,"card-header"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"card-body"],[1,"form-group","row"],["for","target_iqn",1,"cd-col-form-label","required"],"Target IQN",[1,"cd-col-form-input"],[1,"input-group"],["type","text","id","target_iqn","name","target_iqn","formControlName","target_iqn","cdTrim","",1,"form-control"],[1,"input-group-append"],["id","ecp-info-button","type","button",1,"btn","btn-light",3,"click"],["aria-hidden","true",3,"ngClass"],["class","invalid-feedback",4,"ngIf"],["class","form-text text-muted",4,"ngIf"],["for","portals",1,"cd-col-form-label","required"],"Portals",[4,"ngFor","ngForOf"],[1,"row"],[1,"col-md-12"],["elemClass","btn btn-light float-right",3,"data","options","messages","selection"],[3,"ngClass"],"Add portal",["type","hidden","id","portals","name","portals","formControlName","portals",1,"form-control"],["for","disks",1,"cd-col-form-label"],"Images",["type","hidden","id","disks","name","disks","formControlName","disks",1,"form-control"],"Add image",[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["type","checkbox","formControlName","acl_enabled","name","acl_enabled","id","acl_enabled",1,"custom-control-input"],["for","acl_enabled",1,"custom-control-label"],"ACL authentication",["formGroupName","auth",4,"ngIf"],["class","form-group row",4,"ngIf"],[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required.","IQN has wrong pattern.","An IQN has the following notation 'iqn.$year-$month.$reversedAddress:$definedName'","For example: iqn.2016-06.org.dashboard:storage:disk.sn-a8675309",["target","_blank","href","https://en.wikipedia.org/wiki/ISCSI#Addressing"],"More information",[1,"form-text","text-muted"],"This target has modified advanced settings.",[1,"input-group","cd-mb"],["type","text","disabled","",1,"cd-form-control",3,"value"],["type","button",1,"btn","btn-light",3,"click"],"At least " + "\ufffd0\ufffd" + " gateways are required.",["class","input-group-text",4,"ngIf"],[4,"ngIf"],[1,"input-group-text"],"Backstore: " + "\ufffd0\ufffd" + ".\xA0","This image has modified settings.","Duplicated LUN numbers.","Duplicated WWN.",["formGroupName","auth"],["for","target_user",1,"cd-col-form-label"],"User",["type","text","autocomplete","off","id","target_user","name","target_user","formControlName","user",1,"form-control"],["for","target_password",1,"cd-col-form-label"],"Password",["type","password","autocomplete","new-password","id","target_password","name","target_password","formControlName","password",1,"form-control"],["type","button","cdPasswordButton","target_password",1,"btn","btn-light"],["source","target_password"],["for","target_mutual_user",1,"cd-col-form-label"],"Mutual User",["type","text","autocomplete","off","id","target_mutual_user","name","target_mutual_user","formControlName","mutual_user",1,"form-control"],["for","target_mutual_password",1,"cd-col-form-label"],"Mutual Password",["type","password","autocomplete","new-password","id","target_mutual_password","name","target_mutual_password","formControlName","mutual_password",1,"form-control"],["type","button","cdPasswordButton","target_mutual_password",1,"btn","btn-light"],["source","target_mutual_password"],"This field is required.","User names must have a length of 8 to 64 characters and can contain alphanumeric characters, '.', '@', '-', '_' or ':'.","This field is required.","Passwords must have a length of 12 to 16 characters and can contain alphanumeric characters, '@', '-', '_' or '/'.","This field is required.","User names must have a length of 8 to 64 characters and can contain alphanumeric characters, '.', '@', '-', '_' or ':'.","This field is required.","Passwords must have a length of 12 to 16 characters and can contain alphanumeric characters, '@', '-', '_' or '/'.",["for","initiators",1,"cd-col-form-label"],"Initiators",["formArrayName","initiators",1,"cd-col-form-input"],["class","card mb-2",3,"formGroupName",4,"ngFor","ngForOf"],[1,"btn","btn-light","float-right",3,"click"],"Add initiator",[1,"card","mb-2",3,"formGroupName"],"Initiator",["type","button",1,"close",3,"click"],["for","client_iqn",1,"cd-col-form-label","required"],"Client IQN",["type","text","formControlName","client_iqn","cdTrim","",1,"form-control",3,"blur"],["for","user",1,"cd-col-form-label"],"User",["formControlName","user","autocomplete","off","type","text",1,"form-control",3,"id"],["for","password",1,"cd-col-form-label"],"Password",["formControlName","password","autocomplete","new-password","type","password",1,"form-control",3,"id"],["type","button",1,"btn","btn-light",3,"cdPasswordButton"],[3,"source"],["for","mutual_user",1,"cd-col-form-label"],"Mutual User",["formControlName","mutual_user","autocomplete","off","type","text",1,"form-control",3,"id"],["for","mutual_password",1,"cd-col-form-label"],"Mutual Password",["formControlName","mutual_password","autocomplete","new-password","type","password",1,"form-control",3,"id"],["for","luns",1,"cd-col-form-label"],"Images",["class","row",4,"ngIf"],"Initiator IQN needs to be unique.","This field is required.","IQN has wrong pattern.","This field is required.","User names must have a length of 8 to 64 characters and can contain alphanumeric characters, '.', '@', '-', '_' or ':'.","This field is required.","Passwords must have a length of 12 to 16 characters and can contain alphanumeric characters, '@', '-', '_' or '/'.","This field is required.","User names must have a length of 8 to 64 characters and can contain alphanumeric characters, '.', '@', '-', '_' or ':'.","This field is required.","Passwords must have a length of 12 to 16 characters and can contain alphanumeric characters, '@', '-', '_' or '/'.","Initiator belongs to a group. Images will be configure in the group.",["elemClass","btn btn-light float-right",3,"data","options","messages"],"Add image","No items added.","Groups",["formArrayName","groups",1,"cd-col-form-input"],"Add group","Group",["for","group_id",1,"cd-col-form-label","required"],"Name",["type","text","formControlName","group_id",1,"form-control"],["for","members",1,"cd-col-form-label"],"Initiators","Add initiator","Images","Add image","No items added."]},template:function(e,t){1&e&&S.Mc(0,et,66,40,"div",0),2&e&&S.pc("cdFormLoading",t.loading)},directives:[oe.a,o.C,o.r,o.k,C.a,D.a,O.a,o.d,A.a,o.q,o.i,se,i.p,i.r,i.q,ne.a,o.b,x.a,o.l,re.a,ce.a,o.f],pipes:[i.A,le.a,Y.a],styles:[".cd-mb[_ngcontent-%COMP%]{margin-bottom:10px}"]}),e})();var at=a("+fVR"),it=a("0+/T"),ot=a("uIqm"),st=a("x38r"),nt=a("vCyI"),rt=a("FFMq"),ct=a("G1/K"),lt=a("aexS"),bt=a("VTlA"),dt=a("mtw6"),pt=a("9nlD");function mt(e,t){1&e&&(S.Sb(0,"span",30),S.Wb(1,31),S.Rb())}function ut(e,t){1&e&&(S.Sb(0,"span",30),S.Wb(1,32),S.Rb())}function ft(e,t){1&e&&(S.Sb(0,"span",30),S.Wb(1,33),S.Rb())}function ht(e,t){1&e&&(S.Sb(0,"span",30),S.Wb(1,34),S.Rb())}function gt(e,t){1&e&&(S.Sb(0,"span",30),S.Wb(1,35),S.Rb())}function St(e,t){1&e&&(S.Sb(0,"span",30),S.Wb(1,36),S.Rb())}function vt(e,t){1&e&&(S.Sb(0,"span",30),S.Wb(1,37),S.Rb())}function yt(e,t){1&e&&(S.Sb(0,"span",30),S.Wb(1,38),S.Rb())}let Rt=(()=>{class e{constructor(e,t,a,i,o){this.authStorageService=e,this.activeModal=t,this.actionLabels=a,this.iscsiService=i,this.notificationService=o,this.USER_REGEX=/^[\w\.:@_-]{8,64}$/,this.PASSWORD_REGEX=/^[\w@\-_\/]{12,16}$/,this.permission=this.authStorageService.getPermissions().iscsi}ngOnInit(){this.hasPermission=this.permission.update,this.createForm(),this.iscsiService.getDiscovery().subscribe(e=>{this.discoveryForm.patchValue(e)})}createForm(){this.discoveryForm=new $.a({user:new o.h({value:"",disabled:!this.hasPermission}),password:new o.h({value:"",disabled:!this.hasPermission}),mutual_user:new o.h({value:"",disabled:!this.hasPermission}),mutual_password:new o.h({value:"",disabled:!this.hasPermission})}),T.a.validateIf(this.discoveryForm.get("user"),()=>this.discoveryForm.getValue("password")||this.discoveryForm.getValue("mutual_user")||this.discoveryForm.getValue("mutual_password"),[o.A.required],[o.A.pattern(this.USER_REGEX)],[this.discoveryForm.get("password"),this.discoveryForm.get("mutual_user"),this.discoveryForm.get("mutual_password")]),T.a.validateIf(this.discoveryForm.get("password"),()=>this.discoveryForm.getValue("user")||this.discoveryForm.getValue("mutual_user")||this.discoveryForm.getValue("mutual_password"),[o.A.required],[o.A.pattern(this.PASSWORD_REGEX)],[this.discoveryForm.get("user"),this.discoveryForm.get("mutual_user"),this.discoveryForm.get("mutual_password")]),T.a.validateIf(this.discoveryForm.get("mutual_user"),()=>this.discoveryForm.getValue("mutual_password"),[o.A.required],[o.A.pattern(this.USER_REGEX)],[this.discoveryForm.get("user"),this.discoveryForm.get("password"),this.discoveryForm.get("mutual_password")]),T.a.validateIf(this.discoveryForm.get("mutual_password"),()=>this.discoveryForm.getValue("mutual_user"),[o.A.required],[o.A.pattern(this.PASSWORD_REGEX)],[this.discoveryForm.get("user"),this.discoveryForm.get("password"),this.discoveryForm.get("mutual_user")])}submitAction(){this.iscsiService.updateDiscovery(this.discoveryForm.value).subscribe(()=>{this.notificationService.show(dt.a.success,"Updated discovery authentication"),this.activeModal.close()},()=>{this.discoveryForm.setErrors({cdSubmitButton:!0})})}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(lt.a),S.Mb(r.a),S.Mb(l.b),S.Mb(v),S.Mb(pt.a))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-iscsi-target-discovery-modal"]],decls:46,vars:13,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"Discovery Authentication",[1,"modal-content"],["name","discoveryForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","user",1,"cd-col-form-label"],"User",[1,"cd-col-form-input"],["id","user","formControlName","user","type","text","autocomplete","off",1,"form-control"],["class","invalid-feedback",4,"ngIf"],["for","password",1,"cd-col-form-label"],"Password",[1,"input-group"],["id","password","formControlName","password","type","password","autocomplete","new-password",1,"form-control"],[1,"input-group-append"],["type","button","cdPasswordButton","password",1,"btn","btn-light"],["source","password"],["for","mutual_user",1,"cd-col-form-label"],"Mutual User",["id","mutual_user","formControlName","mutual_user","type","text","autocomplete","off",1,"form-control"],["for","mutual_password",1,"cd-col-form-label"],"Mutual Password",["id","mutual_password","formControlName","mutual_password","type","password","autocomplete","new-password",1,"form-control"],["type","button","cdPasswordButton","mutual_password",1,"btn","btn-light"],["source","mutual_password"],[1,"modal-footer"],[3,"form","showSubmit","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required.","User names must have a length of 8 to 64 characters and can contain alphanumeric characters, '.', '@', '-', '_' or ':'.","This field is required.","Passwords must have a length of 12 to 16 characters and can contain alphanumeric characters, '@', '-', '_' or '/'.","This field is required.","User names must have a length of 8 to 64 characters and can contain alphanumeric characters, '.', '@', '-', '_' or ':'.","This field is required.","Passwords must have a length of 12 to 16 characters and can contain alphanumeric characters, '@', '-', '_' or '/'."]},template:function(e,t){if(1&e&&(S.Sb(0,"cd-modal",0),S.Qb(1,1),S.Wb(2,2),S.Pb(),S.Qb(3,3),S.Sb(4,"form",4,5),S.Sb(6,"div",6),S.Sb(7,"div",7),S.Sb(8,"label",8),S.Wb(9,9),S.Rb(),S.Sb(10,"div",10),S.Nb(11,"input",11),S.Mc(12,mt,2,0,"span",12),S.Mc(13,ut,2,0,"span",12),S.Rb(),S.Rb(),S.Sb(14,"div",7),S.Sb(15,"label",13),S.Wb(16,14),S.Rb(),S.Sb(17,"div",10),S.Sb(18,"div",15),S.Nb(19,"input",16),S.Sb(20,"span",17),S.Nb(21,"button",18),S.Nb(22,"cd-copy-2-clipboard-button",19),S.Rb(),S.Rb(),S.Mc(23,ft,2,0,"span",12),S.Mc(24,ht,2,0,"span",12),S.Rb(),S.Rb(),S.Sb(25,"div",7),S.Sb(26,"label",20),S.Qb(27),S.Wb(28,21),S.Pb(),S.Rb(),S.Sb(29,"div",10),S.Nb(30,"input",22),S.Mc(31,gt,2,0,"span",12),S.Mc(32,St,2,0,"span",12),S.Rb(),S.Rb(),S.Sb(33,"div",7),S.Sb(34,"label",23),S.Wb(35,24),S.Rb(),S.Sb(36,"div",10),S.Sb(37,"div",15),S.Nb(38,"input",25),S.Sb(39,"span",17),S.Nb(40,"button",26),S.Nb(41,"cd-copy-2-clipboard-button",27),S.Rb(),S.Rb(),S.Mc(42,vt,2,0,"span",12),S.Mc(43,yt,2,0,"span",12),S.Rb(),S.Rb(),S.Rb(),S.Sb(44,"div",28),S.Sb(45,"cd-form-button-panel",29),S.gc("submitActionEvent",(function(){return t.submitAction()})),S.Rb(),S.Rb(),S.Rb(),S.Pb(),S.Rb()),2&e){const e=S.Ac(5);S.pc("modalRef",t.activeModal),S.yb(4),S.pc("formGroup",t.discoveryForm),S.yb(8),S.pc("ngIf",t.discoveryForm.showError("user",e,"required")),S.yb(1),S.pc("ngIf",t.discoveryForm.showError("user",e,"pattern")),S.yb(10),S.pc("ngIf",t.discoveryForm.showError("password",e,"required")),S.yb(1),S.pc("ngIf",t.discoveryForm.showError("password",e,"pattern")),S.yb(7),S.pc("ngIf",t.discoveryForm.showError("mutual_user",e,"required")),S.yb(1),S.pc("ngIf",t.discoveryForm.showError("mutual_user",e,"pattern")),S.yb(10),S.pc("ngIf",t.discoveryForm.showError("mutual_password",e,"required")),S.yb(1),S.pc("ngIf",t.discoveryForm.showError("mutual_password",e,"pattern")),S.yb(2),S.pc("form",t.discoveryForm)("showSubmit",t.hasPermission)("submitText",t.actionLabels.SUBMIT)}},directives:[E.a,o.C,o.r,o.k,C.a,D.a,O.a,o.d,A.a,o.q,o.i,i.r,re.a,ce.a,x.a],styles:[""]}),e})(),wt=(()=>{class e{constructor(e){this.router=e}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(s.e))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-iscsi-tabs"]],decls:8,vars:1,consts:function(){return[["ngbNav","",1,"nav-tabs",3,"activeId","navChange"],["nav","ngbNav"],["ngbNavItem","/block/iscsi/overview"],["ngbNavLink",""],"Overview",["ngbNavItem","/block/iscsi/targets"],"Targets"]},template:function(e,t){1&e&&(S.Sb(0,"ul",0,1),S.gc("navChange",(function(e){return t.router.navigate([e.nextId])})),S.Sb(2,"li",2),S.Sb(3,"a",3),S.Wb(4,4),S.Rb(),S.Rb(),S.Sb(5,"li",5),S.Sb(6,"a",3),S.Wb(7,6),S.Rb(),S.Rb(),S.Rb()),2&e&&S.pc("activeId",t.router.url)},directives:[r.p,r.r,r.s],styles:[""]}),e})();var _t=a("/NlG"),kt=a("6qls"),Mt=a("S7zO"),Nt=a("iExv");const It=["highlightTpl"],$t=["detailTable"],Tt=["tree"],Ft=function(){return["logged_in"]},Pt=function(){return["logged_out"]},zt=function(e,t){return{"badge-success":e,"badge-danger":t}};function Et(e,t){if(1&e&&(S.Nb(0,"i"),S.Sb(1,"span"),S.Oc(2),S.Rb(),S.Oc(3," \xa0 "),S.Sb(4,"span",8),S.Oc(5),S.Rb()),2&e){const e=t.$implicit;S.Ab(e.data.cdIcon),S.yb(2),S.Pc(e.data.name),S.yb(2),S.pc("ngClass",S.vc(7,zt,S.tc(5,Ft).includes(e.data.status),S.tc(6,Pt).includes(e.data.status))),S.yb(1),S.Qc(" ",e.data.status," ")}}function Ct(e,t){if(1&e&&(S.Sb(0,"div",9),S.Sb(1,"legend"),S.Oc(2),S.Rb(),S.Nb(3,"cd-table",10,11),S.Rb()),2&e){const e=S.ic();S.yb(2),S.Pc(e.title),S.yb(1),S.pc("data",e.data)("columns",e.columns)("limit",0)}}function Dt(e,t){if(1&e&&(S.Sb(0,"span"),S.Oc(1),S.Rb()),2&e){const e=S.ic().value;S.yb(1),S.Pc(e)}}function Ot(e,t){if(1&e&&(S.Sb(0,"strong"),S.Oc(1),S.Rb()),2&e){const e=S.ic().value;S.yb(1),S.Pc(e)}}function At(e,t){if(1&e&&(S.Mc(0,Dt,2,1,"span",12),S.Mc(1,Ot,2,1,"strong",12)),2&e){const e=t.row;S.pc("ngIf",void 0===e.default||e.default===e.current),S.yb(1),S.pc("ngIf",void 0!==e.default&&e.default!==e.current)}}let xt=(()=>{class e{constructor(e,t){this.iscsiBackstorePipe=e,this.booleanTextPipe=t,this.icons=N.a,this.metadata={},this.nodes=[],this.treeOptions={useVirtualScroll:!0,actionMapping:{mouse:{click:this.onNodeSelected.bind(this)}}}}set content(e){this.detailTable=e,e&&e.updateColumns()}ngOnInit(){this.columns=[{prop:"displayName",name:"Name",flexGrow:1,cellTemplate:this.highlightTpl},{prop:"current",name:"Current",flexGrow:1,cellTemplate:this.highlightTpl},{prop:"default",name:"Default",flexGrow:1,cellTemplate:this.highlightTpl}]}ngOnChanges(){this.selection&&(this.selectedItem=this.selection,this.generateTree()),this.data=void 0}generateTree(){const e=m.a.cloneDeep(this.selectedItem.target_controls);this.cephIscsiConfigVersion>10&&m.a.extend(e,m.a.cloneDeep(this.selectedItem.auth)),this.metadata={root:e};const t={target:{expanded:m.a.join(this.selectedItem.cdExecuting?[N.a.large,N.a.spinner,N.a.spin]:[N.a.large,N.a.bullseye]," ")},initiators:{expanded:m.a.join([N.a.large,N.a.user]," "),leaf:m.a.join([N.a.user]," ")},groups:{expanded:m.a.join([N.a.large,N.a.users]," "),leaf:m.a.join([N.a.users]," ")},disks:{expanded:m.a.join([N.a.large,N.a.disk]," "),leaf:m.a.join([N.a.disk]," ")},portals:{expanded:m.a.join([N.a.large,N.a.server]," "),leaf:m.a.join([N.a.server]," ")}},a=[];m.a.forEach(this.selectedItem.disks,e=>{const i="disk_"+e.pool+"_"+e.image;this.metadata[i]={controls:e.controls,backstore:e.backstore},["wwn","lun"].forEach(t=>{t in e&&(this.metadata[i][t]=e[t])}),a.push({name:`${e.pool}/${e.image}`,cdId:i,cdIcon:t.disks.leaf})});const i=[];m.a.forEach(this.selectedItem.portals,e=>{i.push({name:`${e.host}:${e.ip}`,cdIcon:t.portals.leaf})});const o=[];m.a.forEach(this.selectedItem.clients,e=>{const a=m.a.cloneDeep(e.auth);e.info&&(m.a.extend(a,e.info),delete a.state,m.a.forEach(Object.keys(e.info.state),t=>{a[t.toLowerCase()]=e.info.state[t]})),this.metadata["client_"+e.client_iqn]=a;const i=[];e.luns.forEach(e=>{i.push({name:`${e.pool}/${e.image}`,cdId:"disk_"+e.pool+"_"+e.image,cdIcon:t.disks.leaf})});let s="";e.info&&(s=Object.keys(e.info.state).includes("LOGGED_IN")?"logged_in":"logged_out"),o.push({name:e.client_iqn,status:s,cdId:"client_"+e.client_iqn,children:i,cdIcon:t.initiators.leaf})});const s=[];m.a.forEach(this.selectedItem.groups,e=>{const a=[];e.disks.forEach(e=>{a.push({name:`${e.pool}/${e.image}`,cdId:"disk_"+e.pool+"_"+e.image,cdIcon:t.disks.leaf})});const i=[];e.members.forEach(e=>{i.push({name:e,cdId:"client_"+e})}),s.push({name:e.group_id,cdIcon:t.groups.leaf,children:[{name:"Disks",children:a,cdIcon:t.disks.expanded},{name:"Initiators",children:i,cdIcon:t.initiators.expanded}]})}),this.nodes=[{name:this.selectedItem.target_iqn,cdId:"root",isExpanded:!0,cdIcon:t.target.expanded,children:[{name:"Disks",isExpanded:!0,children:a,cdIcon:t.disks.expanded},{name:"Portals",isExpanded:!0,children:i,cdIcon:t.portals.expanded},{name:"Initiators",isExpanded:!0,children:o,cdIcon:t.initiators.expanded},{name:"Groups",isExpanded:!0,children:s,cdIcon:t.groups.expanded}]}]}format(e){return"boolean"==typeof e?this.booleanTextPipe.transform(e):e}onNodeSelected(e,t){var a,i,o,s;if(n.a.ACTIVATE(e,t,!0),t.data.cdId){this.title=t.data.name;const e=this.metadata[t.data.cdId]||{};"root"===t.data.cdId?(null===(a=this.detailTable)||void 0===a||a.toggleColumn({prop:"default",isHidden:!0}),this.data=m.a.map(this.settings.target_default_controls,(t,a)=>({displayName:a,default:t=this.format(t),current:m.a.isUndefined(e[a])?t:this.format(e[a])})),this.cephIscsiConfigVersion>10&&["user","password","mutual_user","mutual_password"].forEach(t=>{this.data.push({displayName:t,default:null,current:e[t]})})):t.data.cdId.toString().startsWith("disk_")?(null===(i=this.detailTable)||void 0===i||i.toggleColumn({prop:"default",isHidden:!0}),this.data=m.a.map(this.settings.disk_default_controls[e.backstore],(t,a)=>({displayName:a,default:t=this.format(t),current:m.a.isUndefined(e.controls[a])?t:this.format(e.controls[a])})),this.data.push({displayName:"backstore",default:this.iscsiBackstorePipe.transform(this.settings.default_backstore),current:this.iscsiBackstorePipe.transform(e.backstore)}),["wwn","lun"].forEach(t=>{t in e&&this.data.push({displayName:t,default:void 0,current:e[t]})})):(null===(o=this.detailTable)||void 0===o||o.toggleColumn({prop:"default",isHidden:!1}),this.data=m.a.map(e,(e,t)=>({displayName:t,default:void 0,current:this.format(e)})))}else this.data=void 0;null===(s=this.detailTable)||void 0===s||s.updateColumns()}onUpdateData(){this.tree.treeModel.expandAll()}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(Y.a),S.Mb(Nt.a))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-iscsi-target-details"]],viewQuery:function(e,t){var a;1&e&&(S.Jc(It,!0),S.Tc($t,!0),S.Tc(Tt,!0)),2&e&&(S.zc(a=S.hc())&&(t.highlightTpl=a.first),S.zc(a=S.hc())&&(t.content=a.first),S.zc(a=S.hc())&&(t.tree=a.first))},inputs:{selection:"selection",settings:"settings",cephIscsiConfigVersion:"cephIscsiConfigVersion"},features:[S.wb],decls:11,vars:3,consts:function(){return[[1,"row"],[1,"col-6"],"iSCSI Topology",[3,"nodes","options","updateData"],["tree",""],["treeNodeTemplate",""],["class","col-6 metadata",4,"ngIf"],["highlightTpl",""],[1,"badge",3,"ngClass"],[1,"col-6","metadata"],["columnMode","flex",3,"data","columns","limit"],["detailTable",""],[4,"ngIf"]]},template:function(e,t){1&e&&(S.Sb(0,"div",0),S.Sb(1,"div",1),S.Sb(2,"legend"),S.Wb(3,2),S.Rb(),S.Sb(4,"tree-root",3,4),S.gc("updateData",(function(){return t.onUpdateData()})),S.Mc(6,Et,6,10,"ng-template",null,5,S.Nc),S.Rb(),S.Rb(),S.Mc(8,Ct,5,4,"div",6),S.Rb(),S.Mc(9,At,2,2,"ng-template",null,7,S.Nc)),2&e&&(S.yb(4),S.pc("nodes",t.nodes)("options",t.treeOptions),S.yb(4),S.pc("ngIf",t.data))},directives:[n.b,i.r,i.p,ot.a],styles:[""]}),e})();function Vt(e,t){if(1&e&&(S.Qb(0),S.Nb(1,"br"),S.Sb(2,"span"),S.Wb(3,7),S.Rb(),S.Sb(4,"pre"),S.Oc(5),S.Rb(),S.Pb()),2&e){const e=S.ic(2);S.yb(5),S.Pc(e.status)}}function Wt(e,t){if(1&e&&(S.Sb(0,"cd-alert-panel",2),S.Yb(1,3),S.Qb(2),S.cc(3,4),S.Nb(4,"cd-doc",5),S.Zb(),S.Pb(),S.Mc(5,Vt,6,1,"ng-container",6),S.Rb()),2&e){const e=S.ic();S.yb(5),S.pc("ngIf",e.status)}}function qt(e,t){if(1&e&&S.Nb(0,"cd-iscsi-target-details",16),2&e){const e=S.ic(2);S.pc("cephIscsiConfigVersion",e.cephIscsiConfigVersion)("selection",e.expandedRow)("settings",e.settings)}}const Bt=function(e){return[e]};function Gt(e,t){if(1&e){const e=S.Tb();S.Sb(0,"cd-table",8,9),S.gc("setExpandedRow",(function(t){return S.Dc(e),S.ic().setExpandedRow(t)}))("updateSelection",(function(t){return S.Dc(e),S.ic().updateSelection(t)})),S.Sb(2,"div",10),S.Nb(3,"cd-table-actions",11),S.Sb(4,"button",12),S.gc("click",(function(){return S.Dc(e),S.ic().configureDiscoveryAuth()})),S.Nb(5,"i",13),S.Qb(6),S.Wb(7,14),S.Pb(),S.Rb(),S.Rb(),S.Mc(8,qt,1,3,"cd-iscsi-target-details",15),S.Rb()}if(2&e){const e=S.ic();S.pc("data",e.targets)("columns",e.columns)("hasDetails",!0),S.yb(3),S.pc("permission",e.permission)("selection",e.selection)("tableActions",e.tableActions),S.yb(2),S.pc("ngClass",S.uc(8,Bt,e.icons.key)),S.yb(3),S.pc("ngIf",e.expandedRow)}}let Lt=(()=>{class e extends at.a{constructor(e,t,a,i,o,s,n,r){super(),this.authStorageService=e,this.iscsiService=t,this.joinPipe=a,this.taskListService=i,this.notAvailablePipe=o,this.modalService=s,this.taskWrapper=n,this.actionLabels=r,this.available=void 0,this.selection=new nt.a,this.targets=[],this.icons=N.a,this.builders={"iscsi/target/create":e=>({target_iqn:e.target_iqn})},this.permission=this.authStorageService.getPermissions().iscsi,this.tableActions=[{permission:"create",icon:N.a.add,routerLink:()=>"/block/iscsi/targets/create",name:this.actionLabels.CREATE},{permission:"update",icon:N.a.edit,routerLink:()=>"/block/iscsi/targets/edit/"+this.selection.first().target_iqn,name:this.actionLabels.EDIT,disable:()=>this.getEditDisableDesc()},{permission:"delete",icon:N.a.destroy,click:()=>this.deleteIscsiTargetModal(),name:this.actionLabels.DELETE,disable:()=>this.getDeleteDisableDesc()}]}ngOnInit(){this.columns=[{name:"Target",prop:"target_iqn",flexGrow:2,cellTransformation:st.a.executing},{name:"Portals",prop:"cdPortals",pipe:this.joinPipe,flexGrow:2},{name:"Images",prop:"cdImages",pipe:this.joinPipe,flexGrow:2},{name:"# Sessions",prop:"info.num_sessions",pipe:this.notAvailablePipe,flexGrow:1}],this.iscsiService.status().subscribe(e=>{this.available=e.available,e.available?(this.iscsiService.version().subscribe(e=>{this.cephIscsiConfigVersion=e.ceph_iscsi_config_version,this.taskListService.init(()=>this.iscsiService.listTargets(),e=>this.prepareResponse(e),e=>this.targets=e,()=>this.onFetchError(),this.taskFilter,this.itemFilter,this.builders)}),this.iscsiService.settings().subscribe(e=>{this.settings=e})):this.status=e.message})}ngOnDestroy(){this.summaryDataSubscription&&this.summaryDataSubscription.unsubscribe()}getEditDisableDesc(){const e=this.selection.first();return e&&(null==e?void 0:e.cdExecuting)?e.cdExecuting:e&&m.a.isUndefined(null==e?void 0:e.info)?"Unavailable gateway(s)":!e}getDeleteDisableDesc(){var e;const t=this.selection.first();return(null==t?void 0:t.cdExecuting)?t.cdExecuting:t&&m.a.isUndefined(null==t?void 0:t.info)?"Unavailable gateway(s)":t&&(null===(e=null==t?void 0:t.info)||void 0===e?void 0:e.num_sessions)?"Target has active sessions":!t}prepareResponse(e){return e.forEach(e=>{e.cdPortals=e.portals.map(e=>`${e.host}:${e.ip}`),e.cdImages=e.disks.map(e=>`${e.pool}/${e.image}`)}),e}onFetchError(){this.table.reset()}itemFilter(e,t){return e.target_iqn===t.metadata.target_iqn}taskFilter(e){return["iscsi/target/create","iscsi/target/edit","iscsi/target/delete"].includes(e.name)}updateSelection(e){this.selection=e}deleteIscsiTargetModal(){const e=this.selection.first().target_iqn;this.modalRef=this.modalService.show(it.a,{itemDescription:"iSCSI target",itemNames:[e],submitActionObservable:()=>this.taskWrapper.wrapTaskAroundCall({task:new F.a("iscsi/target/delete",{target_iqn:e}),call:this.iscsiService.deleteTarget(e)})})}configureDiscoveryAuth(){this.modalService.show(Rt)}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(lt.a),S.Mb(v),S.Mb(rt.a),S.Mb(bt.a),S.Mb(ct.a),S.Mb(P.a),S.Mb(z.a),S.Mb(l.b))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-iscsi-target-list"]],viewQuery:function(e,t){var a;1&e&&S.Tc(ot.a,!0),2&e&&S.zc(a=S.hc())&&(t.table=a.first)},features:[S.xb([bt.a]),S.vb],decls:3,vars:2,consts:function(){return[["type","info",4,"ngIf",6,"title"],["columnMode","flex","identifier","target_iqn","forceIdentifier","true","selectionType","single",3,"data","columns","hasDetails","setExpandedRow","updateSelection",4,"ngIf"],["type","info",6,"title"],["title","iSCSI Targets not available"],"Please consult the " + "\ufffd#4\ufffd" + "" + "\ufffd/#4\ufffd" + " on how to configure and enable the iSCSI Targets management functionality.",["section","iscsi"],[4,"ngIf"],"Available information:",["columnMode","flex","identifier","target_iqn","forceIdentifier","true","selectionType","single",3,"data","columns","hasDetails","setExpandedRow","updateSelection"],["table",""],[1,"table-actions","btn-toolbar"],[1,"btn-group",3,"permission","selection","tableActions"],["type","button",1,"btn","btn-light",3,"click"],["aria-hidden","true",3,"ngClass"],"Discovery authentication",["cdTableDetail","",3,"cephIscsiConfigVersion","selection","settings",4,"ngIf"],["cdTableDetail","",3,"cephIscsiConfigVersion","selection","settings"]]},template:function(e,t){1&e&&(S.Nb(0,"cd-iscsi-tabs"),S.Mc(1,Wt,6,1,"cd-alert-panel",0),S.Mc(2,Gt,9,10,"cd-table",1)),2&e&&(S.yb(1),S.pc("ngIf",!1===t.available),S.yb(1),S.pc("ngIf",!0===t.available))},directives:[wt,i.r,_t.a,kt.a,ot.a,Mt.a,O.a,i.p,xt],styles:[""]}),e})();var jt=a("o4+5"),Qt=a("dgut"),Ut=a("Dwqy");const Yt=["iscsiSparklineTpl"],Kt=["iscsiPerSecondTpl"],Jt=["iscsiRelativeDateTpl"];function Xt(e,t){if(1&e&&(S.Sb(0,"span"),S.Nb(1,"cd-sparkline",9),S.Rb()),2&e){const e=S.ic(),t=e.value,a=e.row;S.yb(1),S.pc("data",t)("isBinary",a.cdIsBinary)}}function Ht(e,t){1&e&&(S.Sb(0,"span",10),S.Oc(1," n/a "),S.Rb())}function Zt(e,t){if(1&e&&(S.Mc(0,Xt,2,2,"span",7),S.Mc(1,Ht,2,0,"span",8)),2&e){const e=t.row;S.pc("ngIf","user:rbd"===e.backstore),S.yb(1),S.pc("ngIf","user:rbd"!==e.backstore)}}function ea(e,t){if(1&e&&(S.Sb(0,"span"),S.Oc(1),S.Rb()),2&e){const e=S.ic().value;S.yb(1),S.Qc(" ",e," /s ")}}function ta(e,t){1&e&&(S.Sb(0,"span",10),S.Oc(1," n/a "),S.Rb())}function aa(e,t){if(1&e&&(S.Mc(0,ea,2,1,"span",7),S.Mc(1,ta,2,0,"span",8)),2&e){const e=t.row;S.pc("ngIf","user:rbd"===e.backstore),S.yb(1),S.pc("ngIf","user:rbd"!==e.backstore)}}function ia(e,t){if(1&e&&(S.Sb(0,"span"),S.Oc(1),S.jc(2,"notAvailable"),S.jc(3,"relativeDate"),S.Rb()),2&e){const e=S.ic().value;S.yb(1),S.Qc(" ",S.kc(2,1,S.kc(3,3,e))," ")}}function oa(e,t){1&e&&(S.Sb(0,"span",10),S.Oc(1," n/a "),S.Rb())}function sa(e,t){if(1&e&&(S.Mc(0,ia,4,5,"span",7),S.Mc(1,oa,2,0,"span",8)),2&e){const e=t.row;S.pc("ngIf","user:rbd"===e.backstore),S.yb(1),S.pc("ngIf","user:rbd"!==e.backstore)}}let na=(()=>{class e{constructor(e,t,a){this.iscsiService=e,this.dimlessPipe=t,this.iscsiBackstorePipe=a,this.gateways=[],this.images=[]}ngOnInit(){this.gatewaysColumns=[{name:"Name",prop:"name"},{name:"State",prop:"state",flexGrow:1,cellTransformation:st.a.badge,customTemplateConfig:{map:{up:{class:"badge-success"},down:{class:"badge-danger"}}}},{name:"# Targets",prop:"num_targets"},{name:"# Sessions",prop:"num_sessions"}],this.imagesColumns=[{name:"Pool",prop:"pool"},{name:"Image",prop:"image"},{name:"Backstore",prop:"backstore",pipe:this.iscsiBackstorePipe},{name:"Read Bytes",prop:"stats_history.rd_bytes",cellTemplate:this.iscsiSparklineTpl},{name:"Write Bytes",prop:"stats_history.wr_bytes",cellTemplate:this.iscsiSparklineTpl},{name:"Read Ops",prop:"stats.rd",pipe:this.dimlessPipe,cellTemplate:this.iscsiPerSecondTpl},{name:"Write Ops",prop:"stats.wr",pipe:this.dimlessPipe,cellTemplate:this.iscsiPerSecondTpl},{name:"A/O Since",prop:"optimized_since",cellTemplate:this.iscsiRelativeDateTpl}]}refresh(){this.iscsiService.overview().subscribe(e=>{this.gateways=e.gateways,this.images=e.images,this.images.map(e=>(e.stats_history&&(e.stats_history.rd_bytes=e.stats_history.rd_bytes.map(e=>e[1]),e.stats_history.wr_bytes=e.stats_history.wr_bytes.map(e=>e[1])),e.cdIsBinary=!0,e))})}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(v),S.Mb(jt.a),S.Mb(Y.a))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-iscsi"]],viewQuery:function(e,t){var a;1&e&&(S.Jc(Yt,!0),S.Jc(Kt,!0),S.Jc(Jt,!0)),2&e&&(S.zc(a=S.hc())&&(t.iscsiSparklineTpl=a.first),S.zc(a=S.hc())&&(t.iscsiPerSecondTpl=a.first),S.zc(a=S.hc())&&(t.iscsiRelativeDateTpl=a.first))},decls:13,vars:4,consts:function(){return["Gateways",[3,"data","columns","fetchData"],"Images",[3,"data","columns"],["iscsiSparklineTpl",""],["iscsiPerSecondTpl",""],["iscsiRelativeDateTpl",""],[4,"ngIf"],["class","text-muted",4,"ngIf"],[3,"data","isBinary"],[1,"text-muted"]]},template:function(e,t){1&e&&(S.Nb(0,"cd-iscsi-tabs"),S.Sb(1,"legend"),S.Wb(2,0),S.Rb(),S.Sb(3,"cd-table",1),S.gc("fetchData",(function(){return t.refresh()})),S.Rb(),S.Sb(4,"legend"),S.Wb(5,2),S.Rb(),S.Nb(6,"cd-table",3),S.Mc(7,Zt,2,2,"ng-template",null,4,S.Nc),S.Mc(9,aa,2,2,"ng-template",null,5,S.Nc),S.Mc(11,sa,2,2,"ng-template",null,6,S.Nc)),2&e&&(S.yb(3),S.pc("data",t.gateways)("columns",t.gatewaysColumns),S.yb(3),S.pc("data",t.images)("columns",t.imagesColumns))},directives:[wt,ot.a,i.r,Qt.a],pipes:[ct.a,Ut.a],styles:[""]}),e})(),ra=(()=>{class e{}return e.\u0275mod=S.Kb({type:e}),e.\u0275inj=S.Jb({factory:function(t){return new(t||e)},imports:[[i.c,d.a,r.t,s.i,o.m,o.x,r.A]]}),e})();var ca=a("quSY"),la=a("2Vo4"),ba=a("pLZG"),da=a("lOp/");let pa=(()=>{let e=class{constructor(e,t){this.http=e,this.timerService=t,this.REFRESH_INTERVAL=3e4,this.summaryDataSource=new la.a(null),this.summaryData$=this.summaryDataSource.asObservable()}startPolling(){return this.timerService.get(()=>this.retrieveSummaryObservable(),this.REFRESH_INTERVAL).subscribe(this.retrieveSummaryObserver())}refresh(){return this.retrieveSummaryObservable().subscribe(this.retrieveSummaryObserver())}retrieveSummaryObservable(){return this.http.get("api/block/mirroring/summary")}retrieveSummaryObserver(){return e=>{this.summaryDataSource.next(e)}}subscribeSummary(e,t){return this.summaryData$.pipe(Object(ba.a)(e=>!!e)).subscribe(e,t)}getPool(e){return this.http.get("api/block/mirroring/pool/"+e)}updatePool(e,t){return this.http.put("api/block/mirroring/pool/"+e,t,{observe:"response"})}getSiteName(){return this.http.get("api/block/mirroring/site_name")}setSiteName(e){return this.http.put("api/block/mirroring/site_name",{site_name:e},{observe:"response"})}createBootstrapToken(e){return this.http.post(`api/block/mirroring/pool/${e}/bootstrap/token`,{})}importBootstrapToken(e,t,a){return this.http.post(`api/block/mirroring/pool/${e}/bootstrap/peer`,{direction:t,token:a},{observe:"response"})}getPeer(e,t){return this.http.get(`api/block/mirroring/pool/${e}/peer/${t}`)}addPeer(e,t){return this.http.post(`api/block/mirroring/pool/${e}/peer`,t,{observe:"response"})}updatePeer(e,t,a){return this.http.put(`api/block/mirroring/pool/${e}/peer/${t}`,a,{observe:"response"})}deletePeer(e,t){return this.http.delete(`api/block/mirroring/pool/${e}/peer/${t}`,{observe:"response"})}};return e.\u0275fac=function(t){return new(t||e)(S.dc(h.b),S.dc(da.a))},e.\u0275prov=S.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),Object(f.b)([Object(f.e)(0,g.b),Object(f.d)("design:type",Function),Object(f.d)("design:paramtypes",[String]),Object(f.d)("design:returntype",void 0)],e.prototype,"setSiteName",null),Object(f.b)([Object(f.e)(1,g.b),Object(f.e)(2,g.b),Object(f.d)("design:type",Function),Object(f.d)("design:paramtypes",[String,String,String]),Object(f.d)("design:returntype",void 0)],e.prototype,"importBootstrapToken",null),e=Object(f.b)([g.a,Object(f.d)("design:paramtypes",[h.b,da.a])],e),e})();var ma=a("GyhO"),ua=a("vkgz"),fa=a("NJ9Y"),ha=a("IZUe"),ga=a("sb0X"),Sa=a("Z21x");function va(e,t){1&e&&(S.Sb(0,"span",28),S.Wb(1,29),S.Rb())}function ya(e,t){if(1&e&&(S.Sb(0,"div",30),S.Nb(1,"input",31),S.Sb(2,"label",32),S.Oc(3),S.Rb(),S.Rb()),2&e){const e=t.$implicit;S.yb(1),S.qc("id",e.name),S.qc("name",e.name),S.qc("formControlName",e.name),S.yb(1),S.qc("for",e.name),S.yb(1),S.Pc(e.name)}}function Ra(e,t){1&e&&(S.Sb(0,"span",28),S.Wb(1,33),S.Rb())}let wa=(()=>{class e{constructor(e,t,a){this.activeModal=e,this.rbdMirroringService=t,this.taskWrapper=a,this.pools=[],this.createForm()}createForm(){this.createBootstrapForm=new $.a({siteName:new o.h("",{validators:[o.A.required]}),pools:new o.j({},{validators:[this.validatePools()]}),token:new o.h("",{})})}ngOnInit(){this.createBootstrapForm.get("siteName").setValue(this.siteName),this.rbdMirroringService.getSiteName().subscribe(e=>{this.createBootstrapForm.get("siteName").setValue(e.site_name)}),this.subs=this.rbdMirroringService.subscribeSummary(e=>{this.pools=e.content_data.pools.reduce((e,t)=>(e.push({name:t.name,mirror_mode:t.mirror_mode}),e),[]);const t=this.createBootstrapForm.get("pools");m.a.each(this.pools,e=>{const a=e.name,i="disabled"===e.mirror_mode,s=t.controls[a];s?i&&s.disabled?s.enable():!i&&s.enabled&&(s.disable(),s.setValue(!0)):t.addControl(a,new o.h({value:!i,disabled:!i}))})})}ngOnDestroy(){this.subs&&this.subs.unsubscribe()}validatePools(){return e=>{let t=0;return m.a.each(e.controls,e=>{!0===e.value&&++t}),t>0?null:{requirePool:!0}}}generate(){this.createBootstrapForm.get("token").setValue("");let e="";const t=[],a=this.createBootstrapForm.get("pools");m.a.each(a.controls,(a,i)=>{!0===a.value&&(e=i,a.disabled||t.push(i))});const i={mirror_mode:"image"},o=Object(ma.a)(this.rbdMirroringService.setSiteName(this.createBootstrapForm.getValue("siteName")),Object(u.a)(t.map(e=>this.rbdMirroringService.updatePool(e,i))),this.rbdMirroringService.createBootstrapToken(e).pipe(Object(ua.a)(e=>this.createBootstrapForm.get("token").setValue(e.token)))).pipe(Object(fa.a)()),s=()=>{this.rbdMirroringService.refresh(),this.createBootstrapForm.setErrors({cdSubmitButton:!0})};this.taskWrapper.wrapTaskAroundCall({task:new F.a("rbd/mirroring/bootstrap/create",{}),call:o}).subscribe({error:s,complete:s})}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(r.a),S.Mb(pa),S.Mb(z.a))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-bootstrap-create-modal"]],decls:35,vars:6,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"Create Bootstrap Token",[1,"modal-content"],["name","createBootstrapForm","novalidate","",1,"form",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],"To create a bootstrap token which can be imported by a peer site cluster, provide the local site's name, select which pools will have mirroring enabled, and click\xA0 " + "\ufffd#10\ufffd" + "Generate" + "\ufffd/#10\ufffd" + ".",[1,"form-group"],["for","siteName",1,"col-form-label","required"],"Site Name",["type","text","id","siteName","name","siteName","formControlName","siteName","autofocus","",1,"form-control",6,"placeholder"],["placeholder","Name..."],["class","invalid-feedback",4,"ngIf"],["formGroupName","pools",1,"form-group"],["for","pools",1,"col-form-label","required"],"Pools",["class","custom-control custom-checkbox",4,"ngFor","ngForOf"],[1,"mb-4","float-right",3,"form","submitAction"],"Generate",["for","token",1,"col-form-label"],"Token",["id","token","formControlName","token","readonly","",1,"form-control","resize-vertical",6,"placeholder"],["placeholder","Generated token..."],["source","token",1,"float-right"],[1,"modal-footer"],[3,"backAction",6,"name"],["name","Close"],[1,"invalid-feedback"],"This field is required.",[1,"custom-control","custom-checkbox"],["type","checkbox",1,"custom-control-input",3,"id","name","formControlName"],[1,"custom-control-label",3,"for"],"At least one pool is required."]},template:function(e,t){if(1&e&&(S.Sb(0,"cd-modal",0),S.Qb(1,1),S.Wb(2,2),S.Pb(),S.Qb(3,3),S.Sb(4,"form",4,5),S.Sb(6,"div",6),S.Sb(7,"p"),S.Qb(8),S.cc(9,7),S.Nb(10,"kbd"),S.Zb(),S.Pb(),S.Rb(),S.Sb(11,"div",8),S.Sb(12,"label",9),S.Wb(13,10),S.Rb(),S.Sb(14,"input",11),S.Yb(15,12),S.Rb(),S.Mc(16,va,2,0,"span",13),S.Rb(),S.Sb(17,"div",14),S.Sb(18,"label",15),S.Wb(19,16),S.Rb(),S.Mc(20,ya,4,5,"div",17),S.Mc(21,Ra,2,0,"span",13),S.Rb(),S.Sb(22,"cd-submit-button",18),S.gc("submitAction",(function(){return t.generate()})),S.Wb(23,19),S.Rb(),S.Sb(24,"div",8),S.Sb(25,"label",20),S.Sb(26,"span"),S.Wb(27,21),S.Rb(),S.Rb(),S.Sb(28,"textarea",22),S.Yb(29,23),S.Oc(30," "),S.Rb(),S.Rb(),S.Nb(31,"cd-copy-2-clipboard-button",24),S.Rb(),S.Sb(32,"div",25),S.Sb(33,"cd-back-button",26),S.Yb(34,27),S.gc("backAction",(function(){return t.activeModal.close()})),S.Rb(),S.Rb(),S.Rb(),S.Pb(),S.Rb()),2&e){const e=S.Ac(5);S.pc("modalRef",t.activeModal),S.yb(4),S.pc("formGroup",t.createBootstrapForm),S.yb(12),S.pc("ngIf",t.createBootstrapForm.showError("siteName",e,"required")),S.yb(4),S.pc("ngForOf",t.pools),S.yb(1),S.pc("ngIf",t.createBootstrapForm.showError("pools",e,"requirePool")),S.yb(1),S.pc("form",t.createBootstrapForm)}},directives:[E.a,o.C,o.r,C.a,o.k,D.a,O.a,o.d,A.a,o.q,o.i,ha.a,i.r,o.l,i.q,ga.a,ce.a,Sa.a,o.b],styles:[".form-group.ng-invalid[_ngcontent-%COMP%] .invalid-feedback[_ngcontent-%COMP%]{display:block}"]}),e})();function _a(e,t){1&e&&(S.Sb(0,"span",28),S.Wb(1,29),S.Rb())}function ka(e,t){if(1&e&&(S.Sb(0,"option",30),S.Oc(1),S.Rb()),2&e){const e=t.$implicit;S.pc("value",e.key),S.yb(1),S.Pc(e.desc)}}function Ma(e,t){if(1&e&&(S.Sb(0,"div",31),S.Nb(1,"input",32),S.Sb(2,"label",33),S.Oc(3),S.Rb(),S.Rb()),2&e){const e=t.$implicit;S.yb(1),S.qc("id",e.name),S.qc("name",e.name),S.qc("formControlName",e.name),S.yb(1),S.qc("for",e.name),S.yb(1),S.Pc(e.name)}}function Na(e,t){1&e&&(S.Sb(0,"span",28),S.Wb(1,34),S.Rb())}function Ia(e,t){1&e&&(S.Sb(0,"span",28),S.Wb(1,35),S.Rb())}function $a(e,t){1&e&&(S.Sb(0,"span",28),S.Wb(1,36),S.Rb())}let Ta=(()=>{class e{constructor(e,t,a,i){this.activeModal=e,this.actionLabels=t,this.rbdMirroringService=a,this.taskWrapper=i,this.pools=[],this.directions=[{key:"rx-tx",desc:"Bidirectional"},{key:"rx",desc:"Unidirectional (receive-only)"}],this.createForm()}createForm(){this.importBootstrapForm=new $.a({siteName:new o.h("",{validators:[o.A.required]}),direction:new o.h("rx-tx",{}),pools:new o.j({},{validators:[this.validatePools()]}),token:new o.h("",{validators:[o.A.required,this.validateToken()]})})}ngOnInit(){this.rbdMirroringService.getSiteName().subscribe(e=>{this.importBootstrapForm.get("siteName").setValue(e.site_name)}),this.subs=this.rbdMirroringService.subscribeSummary(e=>{this.pools=e.content_data.pools.reduce((e,t)=>(e.push({name:t.name,mirror_mode:t.mirror_mode}),e),[]);const t=this.importBootstrapForm.get("pools");m.a.each(this.pools,e=>{const a=e.name,i="disabled"===e.mirror_mode,s=t.controls[a];s?i&&s.disabled?s.enable():!i&&s.enabled&&(s.disable(),s.setValue(!0)):t.addControl(a,new o.h({value:!i,disabled:!i}))})})}ngOnDestroy(){this.subs&&this.subs.unsubscribe()}validatePools(){return e=>{let t=0;return m.a.each(e.controls,e=>{!0===e.value&&++t}),t>0?null:{requirePool:!0}}}validateToken(){return e=>{try{if(JSON.parse(atob(e.value)))return null}catch(t){}return{invalidToken:!0}}}import(){const e=[],t=[],a=this.importBootstrapForm.get("pools");m.a.each(a.controls,(a,i)=>{!0===a.value&&(e.push(i),a.disabled||t.push(i))});const i={mirror_mode:"image"};let o=Object(ma.a)(this.rbdMirroringService.setSiteName(this.importBootstrapForm.getValue("siteName")),Object(u.a)(t.map(e=>this.rbdMirroringService.updatePool(e,i))));o=e.reduce((e,t)=>Object(ma.a)(e,this.rbdMirroringService.importBootstrapToken(t,this.importBootstrapForm.getValue("direction"),this.importBootstrapForm.getValue("token"))),o).pipe(Object(fa.a)());const s=()=>{this.rbdMirroringService.refresh(),this.importBootstrapForm.setErrors({cdSubmitButton:!0})};this.taskWrapper.wrapTaskAroundCall({task:new F.a("rbd/mirroring/bootstrap/import",{}),call:o}).subscribe({error:s,complete:()=>{s(),this.activeModal.close()}})}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(r.a),S.Mb(l.b),S.Mb(pa),S.Mb(z.a))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-bootstrap-import-modal"]],decls:38,vars:10,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"Import Bootstrap Token",[1,"modal-content"],["name","importBootstrapForm","novalidate","",1,"form",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],"To import a bootstrap token which was created by a peer site cluster, provide the local site's name, select which pools will have mirroring enabled, provide the generated token, and click\xA0" + "\ufffd#10\ufffd" + "Import" + "\ufffd/#10\ufffd" + ".",[1,"form-group"],["for","siteName",1,"col-form-label","required"],"Site Name",["type","text","id","siteName","name","siteName","formControlName","siteName","autofocus","",1,"form-control",6,"placeholder"],["placeholder","Name..."],["class","invalid-feedback",4,"ngIf"],["for","direction",1,"col-form-label"],"Direction",["id","direction","name","direction","formControlName","direction",1,"form-control","custom-select"],[3,"value",4,"ngFor","ngForOf"],["formGroupName","pools",1,"form-group"],["for","pools",1,"col-form-label","required"],"Pools",["class","custom-control custom-checkbox",4,"ngFor","ngForOf"],["for","token",1,"col-form-label","required"],"Token",["id","token","formControlName","token",1,"form-control","resize-vertical",6,"placeholder"],["placeholder","Generated token..."],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required.",[3,"value"],[1,"custom-control","custom-checkbox"],["type","checkbox",1,"custom-control-input",3,"id","name","formControlName"],[1,"custom-control-label",3,"for"],"At least one pool is required.","This field is required.","The token is invalid."]},template:function(e,t){if(1&e&&(S.Sb(0,"cd-modal",0),S.Qb(1,1),S.Wb(2,2),S.Pb(),S.Qb(3,3),S.Sb(4,"form",4,5),S.Sb(6,"div",6),S.Sb(7,"p"),S.Qb(8),S.cc(9,7),S.Nb(10,"kbd"),S.Zb(),S.Pb(),S.Rb(),S.Sb(11,"div",8),S.Sb(12,"label",9),S.Wb(13,10),S.Rb(),S.Sb(14,"input",11),S.Yb(15,12),S.Rb(),S.Mc(16,_a,2,0,"span",13),S.Rb(),S.Sb(17,"div",8),S.Sb(18,"label",14),S.Sb(19,"span"),S.Wb(20,15),S.Rb(),S.Rb(),S.Sb(21,"select",16),S.Mc(22,ka,2,2,"option",17),S.Rb(),S.Rb(),S.Sb(23,"div",18),S.Sb(24,"label",19),S.Wb(25,20),S.Rb(),S.Mc(26,Ma,4,5,"div",21),S.Mc(27,Na,2,0,"span",13),S.Rb(),S.Sb(28,"div",8),S.Sb(29,"label",22),S.Wb(30,23),S.Rb(),S.Sb(31,"textarea",24),S.Yb(32,25),S.Oc(33," "),S.Rb(),S.Mc(34,Ia,2,0,"span",13),S.Mc(35,$a,2,0,"span",13),S.Rb(),S.Rb(),S.Sb(36,"div",26),S.Sb(37,"cd-form-button-panel",27),S.gc("submitActionEvent",(function(){return t.import()})),S.Rb(),S.Rb(),S.Rb(),S.Pb(),S.Rb()),2&e){const e=S.Ac(5);S.pc("modalRef",t.activeModal),S.yb(4),S.pc("formGroup",t.importBootstrapForm),S.yb(12),S.pc("ngIf",t.importBootstrapForm.showError("siteName",e,"required")),S.yb(6),S.pc("ngForOf",t.directions),S.yb(4),S.pc("ngForOf",t.pools),S.yb(1),S.pc("ngIf",t.importBootstrapForm.showError("pools",e,"requirePool")),S.yb(7),S.pc("ngIf",t.importBootstrapForm.showError("token",e,"required")),S.yb(1),S.pc("ngIf",t.importBootstrapForm.showError("token",e,"invalidToken")),S.yb(2),S.pc("form",t.importBootstrapForm)("submitText",t.actionLabels.SUBMIT)}},directives:[E.a,o.C,o.r,C.a,o.k,D.a,O.a,o.d,A.a,o.q,o.i,ha.a,i.r,o.z,i.q,o.l,x.a,o.u,o.B,o.b],styles:[""]}),e})(),Fa=(()=>{class e{constructor(e,t,a,i){this.activeModal=e,this.actionLabels=t,this.rbdMirroringService=a,this.taskWrapper=i,this.createForm()}createForm(){this.editSiteNameForm=new $.a({siteName:new o.h("",{})})}ngOnInit(){this.editSiteNameForm.get("siteName").setValue(this.siteName),this.rbdMirroringService.getSiteName().subscribe(e=>{this.editSiteNameForm.get("siteName").setValue(e.site_name)})}update(){this.taskWrapper.wrapTaskAroundCall({task:new F.a("rbd/mirroring/site_name/edit",{}),call:this.rbdMirroringService.setSiteName(this.editSiteNameForm.getValue("siteName"))}).subscribe({error:()=>this.editSiteNameForm.setErrors({cdSubmitButton:!0}),complete:()=>{this.rbdMirroringService.refresh(),this.activeModal.close()}})}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(r.a),S.Mb(l.b),S.Mb(pa),S.Mb(z.a))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-edit-site-mode-modal"]],decls:18,vars:4,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"Edit site name",[1,"modal-content"],["name","editSiteNameForm","novalidate","",1,"form",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],"Edit the site name and click\xA0 " + "\ufffd#10\ufffd" + "Update" + "\ufffd/#10\ufffd" + ".",[1,"form-group"],["for","siteName",1,"col-form-label","required"],"Site Name",["type","text","id","siteName","name","siteName","formControlName","siteName","autofocus","",1,"form-control",6,"placeholder"],["placeholder","Name..."],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"]]},template:function(e,t){1&e&&(S.Sb(0,"cd-modal",0),S.Qb(1,1),S.Wb(2,2),S.Pb(),S.Qb(3,3),S.Sb(4,"form",4,5),S.Sb(6,"div",6),S.Sb(7,"p"),S.Qb(8),S.cc(9,7),S.Nb(10,"kbd"),S.Zb(),S.Pb(),S.Rb(),S.Sb(11,"div",8),S.Sb(12,"label",9),S.Wb(13,10),S.Rb(),S.Sb(14,"input",11),S.Yb(15,12),S.Rb(),S.Rb(),S.Rb(),S.Sb(16,"div",13),S.Sb(17,"cd-form-button-panel",14),S.gc("submitActionEvent",(function(){return t.update()})),S.Rb(),S.Rb(),S.Rb(),S.Pb(),S.Rb()),2&e&&(S.pc("modalRef",t.activeModal),S.yb(4),S.pc("formGroup",t.editSiteNameForm),S.yb(13),S.pc("form",t.editSiteNameForm)("submitText",t.actionLabels.UPDATE))},directives:[E.a,o.C,o.r,C.a,o.k,D.a,O.a,o.d,A.a,o.q,o.i,ha.a,x.a],styles:[""]}),e})();var Pa=a("VxPD"),za=a("85J/");let Ea=(()=>{class e{transform(e){return"warning"===e?"badge badge-warning":"error"===e?"badge badge-danger":"success"===e?"badge badge-success":"badge badge-info"}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=S.Lb({name:"mirrorHealthColor",type:e,pure:!0}),e})();const Ca=["healthTmpl"];function Da(e,t){if(1&e&&(S.Sb(0,"span",2),S.jc(1,"mirrorHealthColor"),S.Oc(2),S.Rb()),2&e){const e=t.value;S.pc("ngClass",S.kc(1,2,t.row.health_color)),S.yb(2),S.Pc(e)}}let Oa=(()=>{class e{constructor(e,t){this.rbdMirroringService=e,this.cephShortVersionPipe=t,this.tableStatus=new Pa.a}ngOnInit(){this.columns=[{prop:"instance_id",name:"Instance",flexGrow:2},{prop:"id",name:"ID",flexGrow:2},{prop:"server_hostname",name:"Hostname",flexGrow:2},{prop:"version",name:"Version",pipe:this.cephShortVersionPipe,flexGrow:2},{prop:"health",name:"Health",cellTemplate:this.healthTmpl,flexGrow:1}],this.subs=this.rbdMirroringService.subscribeSummary(e=>{this.data=e.content_data.daemons,this.tableStatus=new Pa.a(e.status)})}ngOnDestroy(){this.subs.unsubscribe()}refresh(){this.rbdMirroringService.refresh()}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(pa),S.Mb(za.a))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-mirroring-daemons"]],viewQuery:function(e,t){var a;1&e&&S.Jc(Ca,!0),2&e&&S.zc(a=S.hc())&&(t.healthTmpl=a.first)},decls:3,vars:4,consts:[["columnMode","flex",3,"data","columns","autoReload","status","fetchData"],["healthTmpl",""],[3,"ngClass"]],template:function(e,t){1&e&&(S.Sb(0,"cd-table",0),S.gc("fetchData",(function(){return t.refresh()})),S.Rb(),S.Mc(1,Da,3,4,"ng-template",null,1,S.Nc)),2&e&&S.pc("data",t.data)("columns",t.columns)("autoReload",-1)("status",t.tableStatus)},directives:[ot.a,i.p],pipes:[Ea],styles:[""]}),e})();var Aa=a("HDdC");class xa{}function Va(e,t){if(1&e&&(S.Sb(0,"option",16),S.Oc(1),S.Rb()),2&e){const e=t.$implicit;S.pc("value",e.id),S.yb(1),S.Pc(e.name)}}function Wa(e,t){1&e&&(S.Sb(0,"span",17),S.Wb(1,18),S.Rb())}let qa=(()=>{class e{constructor(e,t,a,i){this.activeModal=e,this.actionLabels=t,this.rbdMirroringService=a,this.taskWrapper=i,this.bsConfig={containerClass:"theme-default"},this.peerExists=!1,this.mirrorModes=[{id:"disabled",name:"Disabled"},{id:"pool",name:"Pool"},{id:"image",name:"Image"}],this.createForm()}createForm(){this.editModeForm=new $.a({mirrorMode:new o.h("",{validators:[o.A.required,this.validateMode.bind(this)]})})}ngOnInit(){this.pattern=""+this.poolName,this.rbdMirroringService.getPool(this.poolName).subscribe(e=>{this.setResponse(e)}),this.subs=this.rbdMirroringService.subscribeSummary(e=>{this.peerExists=!1;const t=e.content_data.pools.find(e=>this.poolName===e.name);this.peerExists=t&&t.peer_uuids.length})}ngOnDestroy(){this.subs.unsubscribe()}validateMode(e){return"disabled"===e.value&&this.peerExists?{cannotDisable:{value:e.value}}:null}setResponse(e){this.editModeForm.get("mirrorMode").setValue(e.mirror_mode)}update(){const e=new xa;e.mirror_mode=this.editModeForm.getValue("mirrorMode"),this.taskWrapper.wrapTaskAroundCall({task:new F.a("rbd/mirroring/pool/edit",{pool_name:this.poolName}),call:this.rbdMirroringService.updatePool(this.poolName,e)}).subscribe({error:()=>this.editModeForm.setErrors({cdSubmitButton:!0}),complete:()=>{this.rbdMirroringService.refresh(),this.activeModal.close()}})}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(r.a),S.Mb(l.b),S.Mb(pa),S.Mb(z.a))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-pool-edit-mode-modal"]],decls:21,vars:7,consts:function(){var e,t;return e="Edit pool mirror mode",t="To edit the mirror mode for pool\xA0 " + "[\ufffd#10\ufffd|\ufffd#11\ufffd]" + "" + "\ufffd0\ufffd" + "" + "[\ufffd/#10\ufffd|\ufffd/#11\ufffd]" + ", select a new mode from the list and click\xA0 " + "[\ufffd#10\ufffd|\ufffd#11\ufffd]" + "Update" + "[\ufffd/#10\ufffd|\ufffd/#11\ufffd]" + ".",[[3,"modalRef"],[1,"modal-title"],e,[1,"modal-content"],["name","editModeForm","novalidate","",1,"form",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],t=S.bc(t),[1,"form-group"],["for","mirrorMode",1,"col-form-label"],"Mode",["id","mirrorMode","name","mirrorMode","formControlName","mirrorMode",1,"form-control","custom-select"],[3,"value",4,"ngFor","ngForOf"],["class","invalid-feedback",4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[3,"value"],[1,"invalid-feedback"],"Peer clusters must be removed prior to disabling mirror."]},template:function(e,t){if(1&e&&(S.Sb(0,"cd-modal",0),S.Qb(1,1),S.Wb(2,2),S.Pb(),S.Qb(3,3),S.Sb(4,"form",4,5),S.Sb(6,"div",6),S.Sb(7,"p"),S.Qb(8),S.cc(9,7),S.Nb(10,"kbd"),S.Nb(11,"kbd"),S.Zb(),S.Pb(),S.Rb(),S.Sb(12,"div",8),S.Sb(13,"label",9),S.Sb(14,"span"),S.Wb(15,10),S.Rb(),S.Rb(),S.Sb(16,"select",11),S.Mc(17,Va,2,2,"option",12),S.Rb(),S.Mc(18,Wa,2,0,"span",13),S.Rb(),S.Rb(),S.Sb(19,"div",14),S.Sb(20,"cd-form-button-panel",15),S.gc("submitActionEvent",(function(){return t.update()})),S.Rb(),S.Rb(),S.Rb(),S.Pb(),S.Rb()),2&e){const e=S.Ac(5);S.pc("modalRef",t.activeModal),S.yb(4),S.pc("formGroup",t.editModeForm),S.yb(7),S.ac(t.poolName),S.Xb(9),S.yb(6),S.pc("ngForOf",t.mirrorModes),S.yb(1),S.pc("ngIf",t.editModeForm.showError("mirrorMode",e,"cannotDisable")),S.yb(2),S.pc("form",t.editModeForm)("submitText",t.actionLabels.UPDATE)}},directives:[E.a,o.C,o.r,C.a,o.k,D.a,O.a,o.z,A.a,o.q,o.i,i.q,i.r,x.a,o.u,o.B],styles:[""]}),e})();class Ba{}function Ga(e,t){1&e&&(S.Sb(0,"span",28),S.Wb(1,29),S.Rb())}function La(e,t){1&e&&(S.Sb(0,"span",28),S.Wb(1,30),S.Rb())}function ja(e,t){1&e&&(S.Sb(0,"span",28),S.Wb(1,31),S.Rb())}function Qa(e,t){1&e&&(S.Sb(0,"span",28),S.Wb(1,32),S.Rb())}function Ua(e,t){1&e&&(S.Sb(0,"span",28),S.Wb(1,33),S.Rb())}function Ya(e,t){1&e&&(S.Sb(0,"span",28),S.Wb(1,34),S.Rb())}let Ka=(()=>{class e{constructor(e,t,a,i){this.activeModal=e,this.actionLabels=t,this.rbdMirroringService=a,this.taskWrapper=i,this.bsConfig={containerClass:"theme-default"},this.createForm()}createForm(){this.editPeerForm=new $.a({clusterName:new o.h("",{validators:[o.A.required,this.validateClusterName]}),clientID:new o.h("",{validators:[o.A.required,this.validateClientID]}),monAddr:new o.h("",{validators:[this.validateMonAddr]}),key:new o.h("",{validators:[this.validateKey]})})}ngOnInit(){this.pattern=`${this.poolName}/${this.peerUUID}`,"edit"===this.mode&&this.rbdMirroringService.getPeer(this.poolName,this.peerUUID).subscribe(e=>{this.setResponse(e)})}validateClusterName(e){if(!e.value.match(/^[\w\-_]*$/))return{invalidClusterName:{value:e.value}}}validateClientID(e){if(!e.value.match(/^(?!client\.)[\w\-_.]*$/))return{invalidClientID:{value:e.value}}}validateMonAddr(e){if(!e.value.match(/^[,; ]*([\w.\-_\[\]]+(:[\d]+)?[,; ]*)*$/))return{invalidMonAddr:{value:e.value}}}validateKey(e){try{if(""===e.value||atob(e.value))return null}catch(t){}return{invalidKey:{value:e.value}}}setResponse(e){this.response=e,this.editPeerForm.get("clusterName").setValue(e.cluster_name),this.editPeerForm.get("clientID").setValue(e.client_id),this.editPeerForm.get("monAddr").setValue(e.mon_host),this.editPeerForm.get("key").setValue(e.key)}update(){const e=new Ba;let t;e.cluster_name=this.editPeerForm.getValue("clusterName"),e.client_id=this.editPeerForm.getValue("clientID"),e.mon_host=this.editPeerForm.getValue("monAddr"),e.key=this.editPeerForm.getValue("key"),t=this.taskWrapper.wrapTaskAroundCall("edit"===this.mode?{task:new F.a("rbd/mirroring/peer/edit",{pool_name:this.poolName}),call:this.rbdMirroringService.updatePeer(this.poolName,this.peerUUID,e)}:{task:new F.a("rbd/mirroring/peer/add",{pool_name:this.poolName}),call:this.rbdMirroringService.addPeer(this.poolName,e)}),t.subscribe({error:()=>this.editPeerForm.setErrors({cdSubmitButton:!0}),complete:()=>{this.rbdMirroringService.refresh(),this.activeModal.close()}})}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(r.a),S.Mb(l.b),S.Mb(pa),S.Mb(z.a))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-pool-edit-peer-modal"]],decls:42,vars:13,consts:function(){var e,t,a,i;return e="{VAR_SELECT, select, edit {Edit} other {Add}}",e=S.bc(e,{VAR_SELECT:"\ufffd0\ufffd"}),t="" + e + " pool mirror peer",a="{VAR_SELECT, select, edit {Edit} other {Add}}",a=S.bc(a,{VAR_SELECT:"\ufffd0\ufffd"}),i="" + a + " the pool mirror peer attributes for pool " + "[\ufffd#10\ufffd|\ufffd#11\ufffd]" + "" + "\ufffd1\ufffd" + "" + "[\ufffd/#10\ufffd|\ufffd/#11\ufffd]" + " and click " + "[\ufffd#10\ufffd|\ufffd#11\ufffd]" + "Submit" + "[\ufffd/#10\ufffd|\ufffd/#11\ufffd]" + ".",[[3,"modalRef"],[1,"modal-title"],t,[1,"modal-content"],["name","editPeerForm","novalidate","",1,"form",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],i=S.bc(i),[1,"form-group"],["for","clusterName",1,"col-form-label","required"],"Cluster Name",["type","text","id","clusterName","name","clusterName","formControlName","clusterName","autofocus","",1,"form-control",6,"placeholder"],["placeholder","Name..."],["class","invalid-feedback",4,"ngIf"],["for","clientID",1,"col-form-label","required"],"CephX ID",["type","text","id","clientID","name","clientID","formControlName","clientID",1,"form-control",6,"placeholder"],["placeholder","CephX ID..."],["for","monAddr",1,"col-form-label"],"Monitor Addresses",["type","text","id","monAddr","name","monAddr","formControlName","monAddr",1,"form-control",6,"placeholder"],["placeholder","Comma-delimited addresses..."],["for","key",1,"col-form-label"],"CephX Key",["type","text","id","key","name","key","formControlName","key",1,"form-control",6,"placeholder"],["placeholder","Base64-encoded key..."],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required.","The cluster name is not valid.","This field is required.","The CephX ID is not valid.","The monitory address is not valid.","CephX key must be base64 encoded."]},template:function(e,t){if(1&e&&(S.Sb(0,"cd-modal",0),S.Sb(1,"span",1),S.Wb(2,2),S.Rb(),S.Qb(3,3),S.Sb(4,"form",4,5),S.Sb(6,"div",6),S.Sb(7,"p"),S.Sb(8,"span"),S.cc(9,7),S.Nb(10,"kbd"),S.Nb(11,"kbd"),S.Zb(),S.Rb(),S.Rb(),S.Sb(12,"div",8),S.Sb(13,"label",9),S.Wb(14,10),S.Rb(),S.Sb(15,"input",11),S.Yb(16,12),S.Rb(),S.Mc(17,Ga,2,0,"span",13),S.Mc(18,La,2,0,"span",13),S.Rb(),S.Sb(19,"div",8),S.Sb(20,"label",14),S.Wb(21,15),S.Rb(),S.Sb(22,"input",16),S.Yb(23,17),S.Rb(),S.Mc(24,ja,2,0,"span",13),S.Mc(25,Qa,2,0,"span",13),S.Rb(),S.Sb(26,"div",8),S.Sb(27,"label",18),S.Sb(28,"span"),S.Wb(29,19),S.Rb(),S.Rb(),S.Sb(30,"input",20),S.Yb(31,21),S.Rb(),S.Mc(32,Ua,2,0,"span",13),S.Rb(),S.Sb(33,"div",8),S.Sb(34,"label",22),S.Sb(35,"span"),S.Wb(36,23),S.Rb(),S.Rb(),S.Sb(37,"input",24),S.Yb(38,25),S.Rb(),S.Mc(39,Ya,2,0,"span",13),S.Rb(),S.Rb(),S.Sb(40,"div",26),S.Sb(41,"cd-form-button-panel",27),S.gc("submitActionEvent",(function(){return t.update()})),S.Rb(),S.Rb(),S.Rb(),S.Pb(),S.Rb()),2&e){const e=S.Ac(5);S.pc("modalRef",t.activeModal),S.yb(2),S.ac(t.mode),S.Xb(2),S.yb(2),S.pc("formGroup",t.editPeerForm),S.yb(7),S.ac(t.mode)(t.poolName),S.Xb(9),S.yb(6),S.pc("ngIf",t.editPeerForm.showError("clusterName",e,"required")),S.yb(1),S.pc("ngIf",t.editPeerForm.showError("clusterName",e,"invalidClusterName")),S.yb(6),S.pc("ngIf",t.editPeerForm.showError("clientID",e,"required")),S.yb(1),S.pc("ngIf",t.editPeerForm.showError("clientID",e,"invalidClientID")),S.yb(7),S.pc("ngIf",t.editPeerForm.showError("monAddr",e,"invalidMonAddr")),S.yb(7),S.pc("ngIf",t.editPeerForm.showError("key",e,"invalidKey")),S.yb(2),S.pc("form",t.editPeerForm)("submitText",t.actionLabels.SUBMIT)}},directives:[E.a,o.C,o.r,C.a,o.k,D.a,O.a,o.d,A.a,o.q,o.i,ha.a,i.r,x.a],styles:[""]}),e})();const Ja=["healthTmpl"];function Xa(e,t){if(1&e&&(S.Sb(0,"span",3),S.jc(1,"mirrorHealthColor"),S.Oc(2),S.Rb()),2&e){const e=t.value;S.pc("ngClass",S.kc(1,2,t.row.health_color)),S.yb(2),S.Pc(e)}}let Ha=(()=>{class e{constructor(e,t,a,i){this.authStorageService=e,this.rbdMirroringService=t,this.modalService=a,this.taskWrapper=i,this.selection=new nt.a,this.tableStatus=new Pa.a,this.data=[],this.permission=this.authStorageService.getPermissions().rbdMirroring;const o={permission:"update",icon:N.a.edit,click:()=>this.editModeModal(),name:"Edit Mode",canBePrimary:()=>!0},s={permission:"create",icon:N.a.add,name:"Add Peer",click:()=>this.editPeersModal("add"),disable:()=>!this.selection.first()||"disabled"===this.selection.first().mirror_mode,visible:()=>!this.getPeerUUID(),canBePrimary:()=>!1},n={permission:"update",icon:N.a.exchange,name:"Edit Peer",click:()=>this.editPeersModal("edit"),visible:()=>!!this.getPeerUUID()},r={permission:"delete",icon:N.a.destroy,name:"Delete Peer",click:()=>this.deletePeersModal(),visible:()=>!!this.getPeerUUID()};this.tableActions=[o,s,n,r]}ngOnInit(){this.columns=[{prop:"name",name:"Name",flexGrow:2},{prop:"mirror_mode",name:"Mode",flexGrow:2},{prop:"leader_id",name:"Leader",flexGrow:2},{prop:"image_local_count",name:"# Local",flexGrow:2},{prop:"image_remote_count",name:"# Remote",flexGrow:2},{prop:"health",name:"Health",cellTemplate:this.healthTmpl,flexGrow:1}],this.subs=this.rbdMirroringService.subscribeSummary(e=>{this.data=e.content_data.pools,this.tableStatus=new Pa.a(e.status)})}ngOnDestroy(){this.subs.unsubscribe()}refresh(){this.rbdMirroringService.refresh()}editModeModal(){const e={poolName:this.selection.first().name};this.modalRef=this.modalService.show(qa,e)}editPeersModal(e){const t={poolName:this.selection.first().name,mode:e};"edit"===e&&(t.peerUUID=this.getPeerUUID()),this.modalRef=this.modalService.show(Ka,t)}deletePeersModal(){const e=this.selection.first().name,t=this.getPeerUUID();this.modalRef=this.modalService.show(it.a,{itemDescription:"mirror peer",itemNames:[`${e} (${t})`],submitActionObservable:()=>new Aa.a(a=>{this.taskWrapper.wrapTaskAroundCall({task:new F.a("rbd/mirroring/peer/delete",{pool_name:e}),call:this.rbdMirroringService.deletePeer(e,t)}).subscribe({error:e=>a.error(e),complete:()=>{this.rbdMirroringService.refresh(),a.complete()}})})})}getPeerUUID(){const e=this.selection.first(),t=this.data.find(t=>e&&e.name===t.name);if(t&&t.peer_uuids)return t.peer_uuids[0]}updateSelection(e){this.selection=e}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(lt.a),S.Mb(pa),S.Mb(P.a),S.Mb(z.a))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-mirroring-pools"]],viewQuery:function(e,t){var a;1&e&&S.Jc(Ja,!0),2&e&&S.zc(a=S.hc())&&(t.healthTmpl=a.first)},decls:4,vars:7,consts:[["columnMode","flex","identifier","name","forceIdentifier","true","selectionType","single",3,"data","columns","autoReload","status","fetchData","updateSelection"],[1,"table-actions",3,"permission","selection","tableActions"],["healthTmpl",""],[3,"ngClass"]],template:function(e,t){1&e&&(S.Sb(0,"cd-table",0),S.gc("fetchData",(function(){return t.refresh()}))("updateSelection",(function(e){return t.updateSelection(e)})),S.Nb(1,"cd-table-actions",1),S.Rb(),S.Mc(2,Xa,3,4,"ng-template",null,2,S.Nc)),2&e&&(S.pc("data",t.data)("columns",t.columns)("autoReload",-1)("status",t.tableStatus),S.yb(1),S.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions))},directives:[ot.a,Mt.a,i.p],pipes:[Ea],styles:[""]}),e})();var Za=a("JP8w");const ei=["stateTmpl"],ti=["syncTmpl"],ai=["progressTmpl"];function ii(e,t){if(1&e){const e=S.Tb();S.Sb(0,"cd-table",14),S.gc("fetchData",(function(){return S.Dc(e),S.ic().refresh()})),S.Rb()}if(2&e){const e=S.ic();S.pc("data",e.image_error.data)("columns",e.image_error.columns)("autoReload",-1)("status",e.tableStatus)}}function oi(e,t){if(1&e){const e=S.Tb();S.Sb(0,"cd-table",14),S.gc("fetchData",(function(){return S.Dc(e),S.ic().refresh()})),S.Rb()}if(2&e){const e=S.ic();S.pc("data",e.image_syncing.data)("columns",e.image_syncing.columns)("autoReload",-1)("status",e.tableStatus)}}function si(e,t){if(1&e){const e=S.Tb();S.Sb(0,"cd-table",14),S.gc("fetchData",(function(){return S.Dc(e),S.ic().refresh()})),S.Rb()}if(2&e){const e=S.ic();S.pc("data",e.image_ready.data)("columns",e.image_ready.columns)("autoReload",-1)("status",e.tableStatus)}}function ni(e,t){if(1&e&&(S.Sb(0,"span",15),S.jc(1,"mirrorHealthColor"),S.Oc(2),S.Rb()),2&e){const e=t.value;S.pc("ngClass",S.kc(1,2,t.row.state_color)),S.yb(2),S.Pc(e)}}function ri(e,t){1&e&&(S.Sb(0,"span",16),S.Wb(1,17),S.Rb())}function ci(e,t){1&e&&S.Nb(0,"ngb-progressbar",18),2&e&&S.pc("value",t.value)("showValue",!0)}let li=(()=>{class e{constructor(e){this.rbdMirroringService=e,this.image_error={data:[],columns:{}},this.image_syncing={data:[],columns:{}},this.image_ready={data:[],columns:{}},this.tableStatus=new Pa.a}ngOnInit(){this.image_error.columns=[{prop:"pool_name",name:"Pool",flexGrow:2},{prop:"name",name:"Image",flexGrow:2},{prop:"description",name:"Issue",flexGrow:4},{prop:"state",name:"State",cellTemplate:this.stateTmpl,flexGrow:1}],this.image_syncing.columns=[{prop:"pool_name",name:"Pool",flexGrow:2},{prop:"name",name:"Image",flexGrow:2},{prop:"progress",name:"Progress",cellTemplate:this.progressTmpl,flexGrow:2},{prop:"state",name:"State",cellTemplate:this.syncTmpl,flexGrow:1}],this.image_ready.columns=[{prop:"pool_name",name:"Pool",flexGrow:2},{prop:"name",name:"Image",flexGrow:2},{prop:"description",name:"Description",flexGrow:4},{prop:"state",name:"State",cellTemplate:this.stateTmpl,flexGrow:1}],this.subs=this.rbdMirroringService.subscribeSummary(e=>{this.image_error.data=e.content_data.image_error,this.image_syncing.data=e.content_data.image_syncing,this.image_ready.data=e.content_data.image_ready,this.tableStatus=new Pa.a(e.status)})}ngOnDestroy(){this.subs.unsubscribe()}refresh(){this.rbdMirroringService.refresh()}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(pa))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-mirroring-images"]],viewQuery:function(e,t){var a;1&e&&(S.Jc(ei,!0),S.Jc(ti,!0),S.Jc(ai,!0)),2&e&&(S.zc(a=S.hc())&&(t.stateTmpl=a.first),S.zc(a=S.hc())&&(t.syncTmpl=a.first),S.zc(a=S.hc())&&(t.progressTmpl=a.first))},decls:21,vars:1,consts:function(){return[["ngbNav","","cdStatefulTab","image-list",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem","issues"],["ngbNavLink",""],"Issues",["ngbNavContent",""],["ngbNavItem","syncing"],"Syncing",["ngbNavItem","ready"],"Ready",[3,"ngbNavOutlet"],["stateTmpl",""],["syncTmpl",""],["progressTmpl",""],["columnMode","flex",3,"data","columns","autoReload","status","fetchData"],[3,"ngClass"],[1,"badge","badge-info"],"Syncing",["type","info",3,"value","showValue"]]},template:function(e,t){if(1&e&&(S.Sb(0,"ul",0,1),S.Sb(2,"li",2),S.Sb(3,"a",3),S.Wb(4,4),S.Rb(),S.Mc(5,ii,1,4,"ng-template",5),S.Rb(),S.Sb(6,"li",6),S.Sb(7,"a",3),S.Wb(8,7),S.Rb(),S.Mc(9,oi,1,4,"ng-template",5),S.Rb(),S.Sb(10,"li",8),S.Sb(11,"a",3),S.Wb(12,9),S.Rb(),S.Mc(13,si,1,4,"ng-template",5),S.Rb(),S.Rb(),S.Nb(14,"div",10),S.Mc(15,ni,3,4,"ng-template",null,11,S.Nc),S.Mc(17,ri,2,0,"ng-template",null,12,S.Nc),S.Mc(19,ci,1,2,"ng-template",null,13,S.Nc)),2&e){const e=S.Ac(1);S.yb(14),S.pc("ngbNavOutlet",e)}},directives:[r.p,Za.a,r.r,r.s,r.q,r.u,ot.a,i.p,r.z],pipes:[Ea],styles:[""]}),e})(),bi=(()=>{class e{constructor(e,t,a){this.authStorageService=e,this.rbdMirroringService=t,this.modalService=a,this.selection=new nt.a,this.peersExist=!0,this.subs=new ca.a,this.permission=this.authStorageService.getPermissions().rbdMirroring;const i={permission:"update",icon:N.a.edit,click:()=>this.editSiteNameModal(),name:"Edit Site Name",canBePrimary:()=>!0,disable:()=>!1},o={permission:"update",icon:N.a.upload,click:()=>this.createBootstrapModal(),name:"Create Bootstrap Token",disable:()=>!1},s={permission:"update",icon:N.a.download,click:()=>this.importBootstrapModal(),name:"Import Bootstrap Token",disable:()=>this.peersExist};this.tableActions=[i,o,s]}ngOnInit(){this.subs.add(this.rbdMirroringService.startPolling()),this.subs.add(this.rbdMirroringService.subscribeSummary(e=>{this.status=e.content_data.status,this.siteName=e.site_name,this.peersExist=!!e.content_data.pools.find(e=>e.peer_uuids.length>0)}))}ngOnDestroy(){this.subs.unsubscribe()}editSiteNameModal(){this.modalRef=this.modalService.show(Fa,{siteName:this.siteName})}createBootstrapModal(){this.modalRef=this.modalService.show(wa,{siteName:this.siteName})}importBootstrapModal(){this.modalRef=this.modalService.show(Ta,{siteName:this.siteName})}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(lt.a),S.Mb(pa),S.Mb(P.a))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-mirroring"]],decls:21,vars:4,consts:function(){return[[1,"row"],[1,"col-md-12"],"Site Name:",[1,"table-actions","float-right",3,"permission","selection","tableActions"],[1,"col-sm-6"],"Daemons","Pools","Images"]},template:function(e,t){1&e&&(S.Sb(0,"div",0),S.Sb(1,"div",1),S.Sb(2,"span"),S.Sb(3,"strong"),S.Wb(4,2),S.Rb(),S.Oc(5),S.Rb(),S.Nb(6,"cd-table-actions",3),S.Rb(),S.Rb(),S.Sb(7,"div",0),S.Sb(8,"div",4),S.Sb(9,"legend"),S.Wb(10,5),S.Rb(),S.Nb(11,"cd-mirroring-daemons"),S.Rb(),S.Sb(12,"div",4),S.Sb(13,"legend"),S.Wb(14,6),S.Rb(),S.Nb(15,"cd-mirroring-pools"),S.Rb(),S.Rb(),S.Sb(16,"div",0),S.Sb(17,"div",1),S.Sb(18,"legend"),S.Wb(19,7),S.Rb(),S.Nb(20,"cd-mirroring-images"),S.Rb(),S.Rb()),2&e&&(S.yb(5),S.Qc(" ",t.siteName,""),S.yb(1),S.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions))},directives:[Mt.a,Oa,Ha,li],styles:[""]}),e})();var di=a("jtHE"),pi=a("SxV6"),mi=a("eIep"),ui=a("Ekvf"),fi=a("PhyI"),hi=a("Fgil"),gi=a("aXbf");class Si{}var vi=function(e){return e[e.V1=1]="V1",e[e.V2=2]="V2",e}({});class yi{constructor(){this.features=[]}}class Ri{constructor(){this.features=[]}}class wi extends class{}{constructor(){super(...arguments),this.features=[]}}class _i{constructor(){this.features=[]}}var ki=function(e){return e.editing="editing",e.cloning="cloning",e.copying="copying",e}({}),Mi=a("EmSq"),Ni=a("rFfW"),Ii=a("p4Cf");function $i(e,t){if(1&e&&(S.Sb(0,"div",9),S.Sb(1,"label",57),S.Wb(2,58),S.jc(3,"titlecase"),S.Rb(),S.Sb(4,"div",12),S.Nb(5,"input",59),S.Nb(6,"hr"),S.Rb(),S.Rb()),2&e){const e=S.ic(2);S.yb(3),S.ac(S.kc(3,1,e.action)),S.Xb(2)}}function Ti(e,t){1&e&&(S.Sb(0,"span",60),S.Qb(1),S.Wb(2,61),S.Pb(),S.Rb())}function Fi(e,t){1&e&&(S.Sb(0,"span",60),S.Qb(1),S.Wb(2,62),S.Pb(),S.Rb())}function Pi(e,t){1&e&&S.Nb(0,"input",63)}function zi(e,t){1&e&&(S.Sb(0,"option",49),S.Wb(1,66),S.Rb()),2&e&&S.pc("ngValue",null)}function Ei(e,t){1&e&&(S.Sb(0,"option",49),S.Wb(1,67),S.Rb()),2&e&&S.pc("ngValue",null)}function Ci(e,t){1&e&&(S.Sb(0,"option",49),S.Wb(1,68),S.Rb()),2&e&&S.pc("ngValue",null)}function Di(e,t){if(1&e&&(S.Sb(0,"option",69),S.Oc(1),S.Rb()),2&e){const e=t.$implicit;S.pc("value",e.pool_name),S.yb(1),S.Pc(e.pool_name)}}function Oi(e,t){if(1&e&&(S.Sb(0,"select",64),S.Mc(1,zi,2,1,"option",65),S.Mc(2,Ei,2,1,"option",65),S.Mc(3,Ci,2,1,"option",65),S.Mc(4,Di,2,2,"option",45),S.Rb()),2&e){const e=S.ic(2);S.yb(1),S.pc("ngIf",null===e.pools),S.yb(1),S.pc("ngIf",null!==e.pools&&0===e.pools.length),S.yb(1),S.pc("ngIf",null!==e.pools&&e.pools.length>0),S.yb(1),S.pc("ngForOf",e.pools)}}function Ai(e,t){1&e&&(S.Sb(0,"span",60),S.Wb(1,70),S.Rb())}const xi=function(e,t){return[e,t]};function Vi(e,t){if(1&e&&(S.Sb(0,"div",9),S.Sb(1,"div",20),S.Nb(2,"i",71),S.Rb(),S.Rb()),2&e){const e=S.ic(2);S.yb(2),S.pc("ngClass",S.vc(1,xi,e.icons.spinner,e.icons.spin))}}function Wi(e,t){1&e&&S.Nb(0,"input",75)}function qi(e,t){1&e&&(S.Sb(0,"option",49),S.Wb(1,77),S.Rb()),2&e&&S.pc("ngValue",null)}function Bi(e,t){1&e&&(S.Sb(0,"option",49),S.Wb(1,78),S.Rb()),2&e&&S.pc("ngValue",null)}function Gi(e,t){1&e&&(S.Sb(0,"option",49),S.Wb(1,79),S.Rb()),2&e&&S.pc("ngValue",null)}function Li(e,t){if(1&e&&(S.Sb(0,"option",69),S.Oc(1),S.Rb()),2&e){const e=t.$implicit;S.pc("value",e),S.yb(1),S.Pc(e)}}function ji(e,t){if(1&e&&(S.Sb(0,"select",76),S.Mc(1,qi,2,1,"option",65),S.Mc(2,Bi,2,1,"option",65),S.Mc(3,Gi,2,1,"option",65),S.Mc(4,Li,2,2,"option",45),S.Rb()),2&e){const e=S.ic(3);S.yb(1),S.pc("ngIf",null===e.pools),S.yb(1),S.pc("ngIf",null!==e.pools&&0===e.pools.length),S.yb(1),S.pc("ngIf",null!==e.pools&&e.pools.length>0),S.yb(1),S.pc("ngForOf",e.namespaces)}}function Qi(e,t){if(1&e&&(S.Sb(0,"div",9),S.Sb(1,"label",72),S.Oc(2," Namespace "),S.Rb(),S.Sb(3,"div",12),S.Mc(4,Wi,1,0,"input",73),S.Mc(5,ji,5,4,"select",74),S.Rb(),S.Rb()),2&e){const e=S.ic(2);S.yb(4),S.pc("ngIf","editing"===e.mode||!e.poolPermission.read),S.yb(1),S.pc("ngIf","editing"!==e.mode&&e.poolPermission.read)}}function Ui(e,t){1&e&&(S.Sb(0,"cd-helper"),S.Sb(1,"span"),S.Wb(2,80),S.Rb(),S.Rb())}function Yi(e,t){1&e&&S.Nb(0,"input",87)}function Ki(e,t){1&e&&(S.Sb(0,"option",49),S.Wb(1,89),S.Rb()),2&e&&S.pc("ngValue",null)}function Ji(e,t){1&e&&(S.Sb(0,"option",49),S.Wb(1,90),S.Rb()),2&e&&S.pc("ngValue",null)}function Xi(e,t){1&e&&(S.Sb(0,"option",49),S.Oc(1,"-- Select a data pool -- "),S.Rb()),2&e&&S.pc("ngValue",null)}function Hi(e,t){if(1&e&&(S.Sb(0,"option",69),S.Oc(1),S.Rb()),2&e){const e=t.$implicit;S.pc("value",e.pool_name),S.yb(1),S.Pc(e.pool_name)}}function Zi(e,t){if(1&e){const e=S.Tb();S.Sb(0,"select",88),S.gc("change",(function(t){return S.Dc(e),S.ic(3).onDataPoolChange(t.target.value)})),S.Mc(1,Ki,2,1,"option",65),S.Mc(2,Ji,2,1,"option",65),S.Mc(3,Xi,2,1,"option",65),S.Mc(4,Hi,2,2,"option",45),S.Rb()}if(2&e){const e=S.ic(3);S.yb(1),S.pc("ngIf",null===e.dataPools),S.yb(1),S.pc("ngIf",null!==e.dataPools&&0===e.dataPools.length),S.yb(1),S.pc("ngIf",null!==e.dataPools&&e.dataPools.length>0),S.yb(1),S.pc("ngForOf",e.dataPools)}}function eo(e,t){1&e&&(S.Sb(0,"span",60),S.Wb(1,91),S.Rb())}const to=function(e){return{required:e}};function ao(e,t){if(1&e&&(S.Sb(0,"div",9),S.Sb(1,"label",81),S.Sb(2,"span",71),S.Wb(3,82),S.Rb(),S.Sb(4,"cd-helper",83),S.Yb(5,84),S.Rb(),S.Rb(),S.Sb(6,"div",12),S.Mc(7,Yi,1,0,"input",85),S.Mc(8,Zi,5,4,"select",86),S.Mc(9,eo,2,0,"span",14),S.Rb(),S.Rb()),2&e){S.ic();const e=S.Ac(2),t=S.ic();S.yb(2),S.pc("ngClass",S.uc(4,to,"editing"!==t.mode)),S.yb(5),S.pc("ngIf","editing"===t.mode||!t.poolPermission.read),S.yb(1),S.pc("ngIf","editing"!==t.mode&&t.poolPermission.read),S.yb(1),S.pc("ngIf",t.rbdForm.showError("dataPool",e,"required"))}}function io(e,t){1&e&&(S.Sb(0,"span",60),S.Wb(1,92),S.Rb())}function oo(e,t){1&e&&(S.Sb(0,"span",60),S.Wb(1,93),S.Rb())}function so(e,t){if(1&e&&S.Nb(0,"cd-helper",97),2&e){const e=S.ic().$implicit;S.qc("html",e.helperHtml)}}function no(e,t){if(1&e&&(S.Sb(0,"div",21),S.Nb(1,"input",94),S.Sb(2,"label",95),S.Oc(3),S.Rb(),S.Mc(4,so,1,1,"cd-helper",96),S.Rb()),2&e){const e=t.$implicit;S.yb(1),S.qc("id",e.key),S.qc("name",e.key),S.qc("formControlName",e.key),S.yb(1),S.qc("for",e.key),S.yb(1),S.Pc(e.desc),S.yb(1),S.pc("ngIf",e.helperHtml)}}function ro(e,t){if(1&e){const e=S.Tb();S.Sb(0,"a",98),S.gc("click",(function(){return S.Dc(e),S.ic(2).advancedEnabled=!0,!1})),S.Wb(1,99),S.Rb()}}function co(e,t){if(1&e&&(S.Sb(0,"option",69),S.Oc(1),S.Rb()),2&e){const e=t.$implicit;S.pc("value",e),S.yb(1),S.Pc(e)}}function lo(e,t){if(1&e&&(S.Sb(0,"option",69),S.Oc(1),S.Rb()),2&e){const e=t.$implicit;S.pc("value",e),S.yb(1),S.Pc(e)}}function bo(e,t){1&e&&(S.Sb(0,"span",60),S.Wb(1,100),S.Rb())}function po(e,t){1&e&&(S.Sb(0,"span",60),S.Wb(1,101),S.Rb())}function mo(e,t){1&e&&(S.Sb(0,"span",60),S.Wb(1,102),S.Rb())}function uo(e,t){1&e&&(S.Sb(0,"span",60),S.Wb(1,103),S.Rb())}function fo(e,t){if(1&e){const e=S.Tb();S.Sb(0,"div",1),S.Sb(1,"form",2,3),S.Sb(3,"div",4),S.Sb(4,"div",5),S.Wb(5,6),S.jc(6,"titlecase"),S.jc(7,"upperFirst"),S.Rb(),S.Sb(8,"div",7),S.Mc(9,$i,7,3,"div",8),S.Sb(10,"div",9),S.Sb(11,"label",10),S.Wb(12,11),S.Rb(),S.Sb(13,"div",12),S.Nb(14,"input",13),S.Mc(15,Ti,3,0,"span",14),S.Mc(16,Fi,3,0,"span",14),S.Rb(),S.Rb(),S.Sb(17,"div",15),S.gc("change",(function(t){return S.Dc(e),S.ic().onPoolChange(t.target.value)})),S.Sb(18,"label",16),S.Wb(19,17),S.Rb(),S.Sb(20,"div",12),S.Mc(21,Pi,1,0,"input",18),S.Mc(22,Oi,5,4,"select",19),S.Mc(23,Ai,2,0,"span",14),S.Rb(),S.Rb(),S.Mc(24,Vi,3,4,"div",8),S.Mc(25,Qi,6,2,"div",8),S.Sb(26,"div",9),S.Sb(27,"div",20),S.Sb(28,"div",21),S.Sb(29,"input",22),S.gc("change",(function(){return S.Dc(e),S.ic().onUseDataPoolChange()})),S.Rb(),S.Sb(30,"label",23),S.Wb(31,24),S.Rb(),S.Mc(32,Ui,3,0,"cd-helper",25),S.Rb(),S.Rb(),S.Rb(),S.Mc(33,ao,10,6,"div",8),S.Sb(34,"div",9),S.Sb(35,"label",26),S.Wb(36,27),S.Rb(),S.Sb(37,"div",12),S.Sb(38,"input",28),S.Yb(39,29),S.Rb(),S.Mc(40,io,2,0,"span",14),S.Mc(41,oo,2,0,"span",14),S.Rb(),S.Rb(),S.Sb(42,"div",30),S.Sb(43,"label",31),S.Wb(44,32),S.Rb(),S.Sb(45,"div",12),S.Mc(46,no,5,6,"div",33),S.Rb(),S.Rb(),S.Sb(47,"div",34),S.Sb(48,"div",35),S.Mc(49,ro,2,0,"a",36),S.Rb(),S.Rb(),S.Sb(50,"div",37),S.Sb(51,"legend",38),S.Wb(52,39),S.Rb(),S.Sb(53,"div",40),S.Sb(54,"h4",38),S.Wb(55,41),S.Rb(),S.Sb(56,"div",9),S.Sb(57,"label",42),S.Wb(58,43),S.Rb(),S.Sb(59,"div",12),S.Sb(60,"select",44),S.Mc(61,co,2,2,"option",45),S.Rb(),S.Rb(),S.Rb(),S.Sb(62,"div",9),S.Sb(63,"label",46),S.Wb(64,47),S.Rb(),S.Sb(65,"div",12),S.Sb(66,"select",48),S.Sb(67,"option",49),S.Wb(68,50),S.Rb(),S.Mc(69,lo,2,2,"option",45),S.Rb(),S.Mc(70,bo,2,0,"span",14),S.Mc(71,po,2,0,"span",14),S.Rb(),S.Rb(),S.Sb(72,"div",9),S.Sb(73,"label",51),S.Wb(74,52),S.Rb(),S.Sb(75,"div",12),S.Nb(76,"input",53),S.Mc(77,mo,2,0,"span",14),S.Mc(78,uo,2,0,"span",14),S.Rb(),S.Rb(),S.Rb(),S.Sb(79,"cd-rbd-configuration-form",54),S.gc("changes",(function(t){return S.Dc(e),S.ic().getDirtyConfigurationValues=t})),S.Rb(),S.Rb(),S.Rb(),S.Sb(80,"div",55),S.Sb(81,"cd-form-button-panel",56),S.gc("submitActionEvent",(function(){return S.Dc(e),S.ic().submit()})),S.jc(82,"titlecase"),S.jc(83,"upperFirst"),S.Rb(),S.Rb(),S.Rb(),S.Rb(),S.Rb()}if(2&e){const e=S.Ac(2),t=S.ic();S.yb(1),S.pc("formGroup",t.rbdForm),S.yb(6),S.ac(S.kc(6,32,t.action))(S.kc(7,34,t.resource)),S.Xb(5),S.yb(2),S.pc("ngIf",t.rbdForm.getValue("parent")),S.yb(6),S.pc("ngIf",t.rbdForm.showError("name",e,"required")),S.yb(1),S.pc("ngIf",t.rbdForm.showError("name",e,"pattern")),S.yb(2),S.pc("ngClass",S.uc(40,to,"editing"!==t.mode)),S.yb(3),S.pc("ngIf","editing"===t.mode||!t.poolPermission.read),S.yb(1),S.pc("ngIf","editing"!==t.mode&&t.poolPermission.read),S.yb(1),S.pc("ngIf",t.rbdForm.showError("pool",e,"required")),S.yb(1),S.pc("ngIf","editing"!==t.mode&&t.rbdForm.getValue("pool")&&null===t.namespaces),S.yb(1),S.pc("ngIf","editing"===t.mode&&t.rbdForm.getValue("namespace")||"editing"!==t.mode&&(t.namespaces&&t.namespaces.length>0||!t.poolPermission.read)),S.yb(7),S.pc("ngIf",t.allDataPools.length<=1),S.yb(1),S.pc("ngIf",t.rbdForm.getValue("useDataPool")),S.yb(7),S.pc("ngIf",t.rbdForm.showError("size",e,"required")),S.yb(1),S.pc("ngIf",t.rbdForm.showError("size",e,"invalidSizeObject")),S.yb(5),S.pc("ngForOf",t.featuresList),S.yb(3),S.pc("ngIf",!t.advancedEnabled),S.yb(1),S.pc("hidden",!t.advancedEnabled),S.yb(11),S.pc("ngForOf",t.objectSizes),S.yb(2),S.pc("ngClass",S.uc(42,to,t.rbdForm.getValue("stripingCount"))),S.yb(4),S.pc("ngValue",null),S.yb(2),S.pc("ngForOf",t.objectSizes),S.yb(1),S.pc("ngIf",t.rbdForm.showError("stripingUnit",e,"required")),S.yb(1),S.pc("ngIf",t.rbdForm.showError("stripingUnit",e,"invalidStripingUnit")),S.yb(2),S.pc("ngClass",S.uc(44,to,t.rbdForm.getValue("stripingUnit"))),S.yb(4),S.pc("ngIf",t.rbdForm.showError("stripingCount",e,"required")),S.yb(1),S.pc("ngIf",t.rbdForm.showError("stripingCount",e,"min")),S.yb(1),S.pc("form",t.rbdForm)("initializeData",t.initializeConfigData),S.yb(2),S.pc("form",e)("submitText",S.kc(82,36,t.action)+" "+S.kc(83,38,t.resource))}}let ho=(()=>{class e extends I.a{constructor(e,t,a,i,o,s,n,r,c){super(),this.authStorageService=e,this.route=t,this.poolService=a,this.rbdService=i,this.formatter=o,this.taskWrapper=s,this.dimlessBinaryPipe=n,this.actionLabels=r,this.router=c,this.namespaces=[],this.namespacesByPoolCache={},this.pools=null,this.allPools=null,this.dataPools=null,this.allDataPools=[],this.featuresList=[],this.initializeConfigData=new di.a(1),this.advancedEnabled=!1,this.rbdFormMode=ki,this.defaultObjectSize="4 MiB",this.objectSizes=["4 KiB","8 KiB","16 KiB","32 KiB","64 KiB","128 KiB","256 KiB","512 KiB","1 MiB","2 MiB","4 MiB","8 MiB","16 MiB","32 MiB"],this.rbdImage=new di.a(1),this.icons=N.a,this.routerUrl=this.router.url,this.poolPermission=this.authStorageService.getPermissions().pool,this.resource="RBD",this.features={"deep-flatten":{desc:"Deep flatten",requires:null,allowEnable:!1,allowDisable:!0},layering:{desc:"Layering",requires:null,allowEnable:!1,allowDisable:!1},"exclusive-lock":{desc:"Exclusive lock",requires:null,allowEnable:!0,allowDisable:!0},"object-map":{desc:"Object map (requires exclusive-lock)",requires:"exclusive-lock",allowEnable:!0,allowDisable:!0,initDisabled:!0},journaling:{desc:"Journaling (requires exclusive-lock)",requires:"exclusive-lock",allowEnable:!0,allowDisable:!0,initDisabled:!0},"fast-diff":{desc:"Fast diff (interlocked with object-map)",requires:"object-map",allowEnable:!0,allowDisable:!0,interlockedWith:"object-map",initDisabled:!0}},this.featuresList=this.objToArray(this.features),this.createForm()}objToArray(e){return m.a.map(e,(e,t)=>Object.assign(e,{key:t}))}createForm(){this.rbdForm=new $.a({parent:new o.h(""),name:new o.h("",{validators:[o.A.required,o.A.pattern(/^[^@/]+?$/)]}),pool:new o.h(null,{validators:[o.A.required]}),namespace:new o.h(null),useDataPool:new o.h(!1),dataPool:new o.h(null),size:new o.h(null,{updateOn:"blur"}),obj_size:new o.h(this.defaultObjectSize),features:new $.a(this.featuresList.reduce((e,t)=>(e[t.key]=new o.h({value:!1,disabled:!!t.initDisabled}),e),{})),stripingUnit:new o.h(null),stripingCount:new o.h(null,{updateOn:"blur"})},this.validateRbdForm(this.formatter))}disableForEdit(){this.rbdForm.get("parent").disable(),this.rbdForm.get("pool").disable(),this.rbdForm.get("namespace").disable(),this.rbdForm.get("useDataPool").disable(),this.rbdForm.get("dataPool").disable(),this.rbdForm.get("obj_size").disable(),this.rbdForm.get("stripingUnit").disable(),this.rbdForm.get("stripingCount").disable(),this.rbdImage.subscribe(e=>{e.image_format===vi.V1&&(this.rbdForm.get("deep-flatten").disable(),this.rbdForm.get("layering").disable(),this.rbdForm.get("exclusive-lock").disable())})}disableForClone(){this.rbdForm.get("parent").disable(),this.rbdForm.get("size").disable()}disableForCopy(){this.rbdForm.get("parent").disable(),this.rbdForm.get("size").disable()}ngOnInit(){this.prepareFormForAction(),this.gatherNeededData().subscribe(this.handleExternalData.bind(this))}prepareFormForAction(){const e=this.routerUrl;e.startsWith("/block/rbd/edit")?(this.mode=this.rbdFormMode.editing,this.action=this.actionLabels.EDIT,this.disableForEdit()):e.startsWith("/block/rbd/clone")?(this.mode=this.rbdFormMode.cloning,this.disableForClone(),this.action=this.actionLabels.CLONE):e.startsWith("/block/rbd/copy")?(this.mode=this.rbdFormMode.copying,this.action=this.actionLabels.COPY,this.disableForCopy()):this.action=this.actionLabels.CREATE,m.a.each(this.features,e=>{this.rbdForm.get("features").get(e.key).valueChanges.subscribe(t=>this.featureFormUpdate(e.key,t))})}gatherNeededData(){const e={};return this.mode?this.route.params.subscribe(t=>{const a=R.a.fromString(decodeURIComponent(t.image_spec));t.snap&&(this.snapName=decodeURIComponent(t.snap)),e.rbd=this.rbdService.get(a)}):e.defaultFeatures=this.rbdService.defaultFeatures(),this.mode!==this.rbdFormMode.editing&&this.poolPermission.read&&(e.pools=this.poolService.list(["pool_name","type","flags_names","application_metadata"])),Object(u.a)(e)}handleExternalData(e){if(this.handlePoolData(e.pools),e.defaultFeatures&&this.setFeatures(e.defaultFeatures),e.rbd){const t=e.rbd;this.setResponse(t,this.snapName),this.rbdImage.next(t)}this.loadingReady()}handlePoolData(e){if(!e)return;const t=[],a=[];for(const i of e)this.rbdService.isRBDPool(i)&&("replicated"===i.type?(t.push(i),a.push(i)):"erasure"===i.type&&-1!==i.flags_names.indexOf("ec_overwrites")&&a.push(i));if(this.pools=t,this.allPools=t,this.dataPools=a,this.allDataPools=a,1===this.pools.length){const e=this.pools[0].pool_name;this.rbdForm.get("pool").setValue(e),this.onPoolChange(e)}this.allDataPools.length<=1&&this.rbdForm.get("useDataPool").disable()}onPoolChange(e){const t=this.rbdForm.get("dataPool");t.value===e&&t.setValue(null),this.dataPools=this.allDataPools?this.allDataPools.filter(t=>t.pool_name!==e):[],this.namespaces=null,e in this.namespacesByPoolCache?this.namespaces=this.namespacesByPoolCache[e]:this.rbdService.listNamespaces(e).subscribe(t=>{t=t.map(e=>e.namespace),this.namespacesByPoolCache[e]=t,this.namespaces=t}),this.rbdForm.get("namespace").setValue(null)}onUseDataPoolChange(){this.rbdForm.getValue("useDataPool")||(this.rbdForm.get("dataPool").setValue(null),this.onDataPoolChange(null))}onDataPoolChange(e){const t=this.allPools.filter(t=>t.pool_name!==e);this.rbdForm.getValue("pool")===e&&this.rbdForm.get("pool").setValue(null),this.pools=t}validateRbdForm(e){return t=>{const a=t.get("useDataPool"),i=t.get("dataPool");let o=null;a.value&&null==i.value&&(o={required:!0}),i.setErrors(o);const s=t.get("size"),n=t.get("obj_size"),r=e.toBytes(null!=n.value?n.value:this.defaultObjectSize),c=t.get("stripingCount"),l=null!=c.value?c.value:1;let b=null;null===s.value?b={required:!0}:l*r>e.toBytes(s.value)&&(b={invalidSizeObject:!0}),s.setErrors(b);const d=t.get("stripingUnit");let p=null;null===d.value&&null!==c.value?p={required:!0}:null!==d.value&&e.toBytes(d.value)>r&&(p={invalidStripingUnit:!0}),d.setErrors(p);let m=null;return null===c.value&&null!==d.value?m={required:!0}:l<1&&(m={min:!0}),c.setErrors(m),null}}deepBoxCheck(e,t){this.getDependentChildFeatures(e).forEach(e=>{const a=this.rbdForm.get(e.key);t?a.enable({emitEvent:!1}):(a.disable({emitEvent:!1}),a.setValue(!1,{emitEvent:!1}),this.deepBoxCheck(e.key,t));const i=this.rbdForm.get("features");this.mode===this.rbdFormMode.editing&&i.get(e.key).enabled&&((-1===this.response.features_name.indexOf(e.key)||e.allowDisable)&&(-1!==this.response.features_name.indexOf(e.key)||e.allowEnable)||i.get(e.key).disable())})}getDependentChildFeatures(e){return m.a.filter(this.features,t=>t.requires===e)||[]}interlockCheck(e,t){const a=this.featuresList.find(t=>t.key===e);if(this.response){const e=null!=a.interlockedWith,t=this.featuresList.find(e=>e.interlockedWith===a.key),i=!!this.response.features_name.find(e=>e===a.key);if(e){if(i!==!!this.response.features_name.find(e=>e===a.interlockedWith))return}else if(t&&!!this.response.features_name.find(e=>e===t.key)!==i)return}t?m.a.filter(this.features,t=>t.interlockedWith===e).forEach(e=>this.rbdForm.get(e.key).setValue(!0,{emitEvent:!1})):a.interlockedWith&&this.rbdForm.get("features").get(a.interlockedWith).setValue(!1)}featureFormUpdate(e,t){if(t){const t=this.features[e].requires;if(t&&!this.rbdForm.getValue(t))return void this.rbdForm.get("features."+e).setValue(!1)}this.deepBoxCheck(e,t),this.interlockCheck(e,t)}setFeatures(e){const t=this.rbdForm.get("features");m.a.forIn(this.features,a=>{-1!==e.indexOf(a.key)&&t.get(a.key).setValue(!0),this.featureFormUpdate(a.key,t.get(a.key).value)})}setResponse(e,t){this.response=e;const a=new R.a(e.pool_name,e.namespace,e.name).toString();if(this.mode===this.rbdFormMode.cloning)this.rbdForm.get("parent").setValue(`${a}@${t}`);else if(this.mode===this.rbdFormMode.copying)t?this.rbdForm.get("parent").setValue(`${a}@${t}`):this.rbdForm.get("parent").setValue(""+a);else if(e.parent){const t=e.parent;this.rbdForm.get("parent").setValue(`${t.pool_name}/${t.image_name}@${t.snap_name}`)}this.mode===this.rbdFormMode.editing&&this.rbdForm.get("name").setValue(e.name),this.rbdForm.get("pool").setValue(e.pool_name),this.onPoolChange(e.pool_name),this.rbdForm.get("namespace").setValue(e.namespace),e.data_pool&&(this.rbdForm.get("useDataPool").setValue(!0),this.rbdForm.get("dataPool").setValue(e.data_pool)),this.rbdForm.get("size").setValue(this.dimlessBinaryPipe.transform(e.size)),this.rbdForm.get("obj_size").setValue(this.dimlessBinaryPipe.transform(e.obj_size)),this.setFeatures(e.features_name),this.rbdForm.get("stripingUnit").setValue(this.dimlessBinaryPipe.transform(e.stripe_unit)),this.rbdForm.get("stripingCount").setValue(e.stripe_count),this.initializeConfigData.next({initialData:this.response.configuration,sourceType:fi.a.image})}createRequest(){const e=new wi;return e.pool_name=this.rbdForm.getValue("pool"),e.namespace=this.rbdForm.getValue("namespace"),e.name=this.rbdForm.getValue("name"),e.size=this.formatter.toBytes(this.rbdForm.getValue("size")),this.addObjectSizeAndStripingToRequest(e),e.configuration=this.getDirtyConfigurationValues(),e}addObjectSizeAndStripingToRequest(e){e.obj_size=this.formatter.toBytes(this.rbdForm.getValue("obj_size")),m.a.forIn(this.features,t=>{this.rbdForm.getValue(t.key)&&e.features.push(t.key)}),e.stripe_unit=this.formatter.toBytes(this.rbdForm.getValue("stripingUnit")),e.stripe_count=this.rbdForm.getValue("stripingCount"),e.data_pool=this.rbdForm.getValue("dataPool")}createAction(){const e=this.createRequest();return this.taskWrapper.wrapTaskAroundCall({task:new F.a("rbd/create",{pool_name:e.pool_name,namespace:e.namespace,image_name:e.name}),call:this.rbdService.create(e)})}editRequest(){const e=new _i;return e.name=this.rbdForm.getValue("name"),e.size=this.formatter.toBytes(this.rbdForm.getValue("size")),m.a.forIn(this.features,t=>{this.rbdForm.getValue(t.key)&&e.features.push(t.key)}),e.configuration=this.getDirtyConfigurationValues(),e}cloneRequest(){const e=new yi;return e.child_pool_name=this.rbdForm.getValue("pool"),e.child_namespace=this.rbdForm.getValue("namespace"),e.child_image_name=this.rbdForm.getValue("name"),this.addObjectSizeAndStripingToRequest(e),e.configuration=this.getDirtyConfigurationValues(!0,fi.a.image),e}editAction(){const e=new R.a(this.response.pool_name,this.response.namespace,this.response.name);return this.taskWrapper.wrapTaskAroundCall({task:new F.a("rbd/edit",{image_spec:e.toString()}),call:this.rbdService.update(e,this.editRequest())})}cloneAction(){const e=this.cloneRequest(),t=new R.a(this.response.pool_name,this.response.namespace,this.response.name);return this.taskWrapper.wrapTaskAroundCall({task:new F.a("rbd/clone",{parent_image_spec:t.toString(),parent_snap_name:this.snapName,child_pool_name:e.child_pool_name,child_namespace:e.child_namespace,child_image_name:e.child_image_name}),call:this.rbdService.cloneSnapshot(t,this.snapName,e)})}copyRequest(){const e=new Ri;return this.snapName&&(e.snapshot_name=this.snapName),e.dest_pool_name=this.rbdForm.getValue("pool"),e.dest_namespace=this.rbdForm.getValue("namespace"),e.dest_image_name=this.rbdForm.getValue("name"),this.addObjectSizeAndStripingToRequest(e),e.configuration=this.getDirtyConfigurationValues(!0,fi.a.image),e}copyAction(){const e=this.copyRequest(),t=new R.a(this.response.pool_name,this.response.namespace,this.response.name);return this.taskWrapper.wrapTaskAroundCall({task:new F.a("rbd/copy",{src_image_spec:t.toString(),dest_pool_name:e.dest_pool_name,dest_namespace:e.dest_namespace,dest_image_name:e.dest_image_name}),call:this.rbdService.copy(t,e)})}submit(){this.mode||this.rbdImage.next("create"),this.rbdImage.pipe(Object(pi.a)(),Object(mi.a)(()=>this.mode===this.rbdFormMode.editing?this.editAction():this.mode===this.rbdFormMode.cloning?this.cloneAction():this.mode===this.rbdFormMode.copying?this.copyAction():this.createAction())).subscribe(()=>{},()=>this.rbdForm.setErrors({cdSubmitButton:!0}),()=>this.router.navigate(["/block/rbd"]))}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(lt.a),S.Mb(s.a),S.Mb(ui.a),S.Mb(_),S.Mb(gi.a),S.Mb(z.a),S.Mb(hi.a),S.Mb(l.b),S.Mb(s.e))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-rbd-form"]],features:[S.vb],decls:1,vars:1,consts:function(){return[["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],["name","rbdForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"card"],[1,"card-header"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"card-body"],["class","form-group row",4,"ngIf"],[1,"form-group","row"],["for","name",1,"cd-col-form-label","required"],"Name",[1,"cd-col-form-input"],["type","text","placeholder","Name...","id","name","name","name","formControlName","name","autofocus","",1,"form-control"],["class","invalid-feedback",4,"ngIf"],[1,"form-group","row",3,"change"],["for","pool",1,"cd-col-form-label",3,"ngClass"],"Pool",["class","form-control","type","text","placeholder","Pool name...","id","pool","name","pool","formControlName","pool",4,"ngIf"],["id","pool","name","pool","class","form-control custom-select","formControlName","pool",4,"ngIf"],[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["type","checkbox","id","useDataPool","name","useDataPool","formControlName","useDataPool",1,"custom-control-input",3,"change"],["for","useDataPool",1,"custom-control-label"],"Use a dedicated data pool",[4,"ngIf"],["for","size",1,"cd-col-form-label","required"],"Size",["id","size","name","size","type","text","formControlName","size","defaultUnit","GiB","cdDimlessBinary","",1,"form-control",6,"placeholder"],["placeholder","e.g., 10GiB"],["formGroupName","features",1,"form-group","row"],["for","features",1,"cd-col-form-label"],"Features",["class","custom-control custom-checkbox",4,"ngFor","ngForOf"],[1,"row"],[1,"col-sm-12"],["class","float-right margin-right-md","href","",3,"click",4,"ngIf"],[3,"hidden"],[1,"cd-header"],"Advanced",[1,"col-md-12"],"Striping",["for","size",1,"cd-col-form-label"],"Object size",["id","obj_size","name","obj_size","formControlName","obj_size",1,"form-control","custom-select"],[3,"value",4,"ngFor","ngForOf"],["for","stripingUnit",1,"cd-col-form-label",3,"ngClass"],"Stripe unit",["id","stripingUnit","name","stripingUnit","formControlName","stripingUnit",1,"form-control","custom-select"],[3,"ngValue"],"-- Select stripe unit --",["for","stripingCount",1,"cd-col-form-label",3,"ngClass"],"Stripe count",["id","stripingCount","name","stripingCount","formControlName","stripingCount","type","number",1,"form-control"],[3,"form","initializeData","changes"],[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],["for","name",1,"cd-col-form-label"],"" + "\ufffd0\ufffd" + " from",["type","text","id","parent","name","parent","formControlName","parent",1,"form-control"],[1,"invalid-feedback"],"This field is required.","'/' and '@' are not allowed.",["type","text","placeholder","Pool name...","id","pool","name","pool","formControlName","pool",1,"form-control"],["id","pool","name","pool","formControlName","pool",1,"form-control","custom-select"],[3,"ngValue",4,"ngIf"],"Loading...","-- No rbd pools available --","-- Select a pool --",[3,"value"],"This field is required.",[3,"ngClass"],["for","pool",1,"cd-col-form-label"],["class","form-control","type","text","placeholder","Namespace...","id","namespace","name","namespace","formControlName","namespace",4,"ngIf"],["id","namespace","name","namespace","class","form-control custom-select","formControlName","namespace",4,"ngIf"],["type","text","placeholder","Namespace...","id","namespace","name","namespace","formControlName","namespace",1,"form-control"],["id","namespace","name","namespace","formControlName","namespace",1,"form-control","custom-select"],"Loading...","-- No namespaces available --","-- Select a namespace --","You need more than one pool with the rbd application label use to use a dedicated data pool.",["for","dataPool",1,"cd-col-form-label"],"Data pool",[6,"html"],["html","Dedicated pool that stores the object-data of the RBD."],["class","form-control","type","text","placeholder","Data pool name...","id","dataPool","name","dataPool","formControlName","dataPool",4,"ngIf"],["id","dataPool","name","dataPool","class","form-control custom-select","formControlName","dataPool",3,"change",4,"ngIf"],["type","text","placeholder","Data pool name...","id","dataPool","name","dataPool","formControlName","dataPool",1,"form-control"],["id","dataPool","name","dataPool","formControlName","dataPool",1,"form-control","custom-select",3,"change"],"Loading...","-- No data pools available --","This field is required.","This field is required.","You have to increase the size.",["type","checkbox",1,"custom-control-input",3,"id","name","formControlName"],[1,"custom-control-label",3,"for"],[3,"html",4,"ngIf"],[3,"html"],["href","",1,"float-right","margin-right-md",3,"click"],"Advanced...","This field is required because stripe count is defined!","Stripe unit is greater than object size.","This field is required because stripe unit is defined!","Stripe count must be greater than 0."]},template:function(e,t){1&e&&S.Mc(0,fo,84,46,"div",0),2&e&&S.pc("cdFormLoading",t.loading)},directives:[oe.a,o.C,o.r,o.k,C.a,i.r,D.a,O.a,o.d,A.a,o.q,o.i,ha.a,i.p,o.b,Mi.a,o.l,i.q,o.z,o.u,o.B,o.v,Ni.a,x.a,Ii.a],pipes:[i.A,le.a],styles:[""]}),e})();var go=a("OLbh"),So=a("yJti"),vo=a("EgGo"),yo=a("wd/R"),Ro=a.n(yo),wo=a("2EZI"),_o=a("MAOJ");function ko(e,t){1&e&&(S.Sb(0,"div",19),S.Sb(1,"span"),S.Wb(2,20),S.Rb(),S.Rb())}function Mo(e,t){1&e&&(S.Sb(0,"span",21),S.Wb(1,22),S.Rb())}function No(e,t){1&e&&(S.Sb(0,"span",21),S.Wb(1,23),S.Rb())}function Io(e,t){if(1&e&&S.Nb(0,"cd-date-time-picker",24),2&e){const e=S.ic();S.pc("control",e.moveForm.get("expiresAt"))}}let $o=(()=>{class e{constructor(e,t,a,i,o){this.rbdService=e,this.activeModal=t,this.actionLabels=a,this.fb=i,this.taskWrapper=o,this.createForm()}createForm(){this.moveForm=this.fb.group({expiresAt:["",[T.a.custom("format",e=>!(""===e||Ro()(e,"YYYY-MM-DD HH:mm:ss").isValid())),T.a.custom("expired",e=>Ro()().isAfter(e))]]})}ngOnInit(){this.imageSpec=new R.a(this.poolName,this.namespace,this.imageName),this.imageSpecStr=this.imageSpec.toString(),this.pattern=`${this.poolName}/${this.imageName}`}moveImage(){let e=0;const t=this.moveForm.getValue("expiresAt");t&&(e=Ro()(t,"YYYY-MM-DD HH:mm:ss").diff(Ro()(),"seconds",!0)),e<0&&(e=0),this.taskWrapper.wrapTaskAroundCall({task:new F.a("rbd/trash/move",{image_spec:this.imageSpecStr}),call:this.rbdService.moveTrash(this.imageSpec,e)}).subscribe({complete:()=>{this.activeModal.close()}})}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(_),S.Mb(r.a),S.Mb(l.b),S.Mb(wo.a),S.Mb(z.a))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-rbd-trash-move-modal"]],decls:24,vars:9,consts:function(){var e,t;return e="Move an image to trash",t="To move " + "[\ufffd#10\ufffd|\ufffd#11\ufffd]" + "" + "\ufffd0\ufffd" + "" + "[\ufffd/#10\ufffd|\ufffd/#11\ufffd]" + " to trash, click " + "[\ufffd#10\ufffd|\ufffd#11\ufffd]" + "Move" + "[\ufffd/#10\ufffd|\ufffd/#11\ufffd]" + ". Optionally, you can pick an expiration date.",[[3,"modalRef"],[1,"modal-title"],e,[1,"modal-content"],["name","moveForm","novalidate","",1,"form",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],["class","alert alert-warning","role","alert",4,"ngIf"],t=S.bc(t),[1,"form-group"],["for","expiresAt",1,"col-form-label"],"Protection expires at",["type","text","formControlName","expiresAt","triggers","manual",1,"form-control",3,"ngbPopover","click","keypress",6,"placeholder"],["p","ngbPopover"],["placeholder","NOT PROTECTED"],["class","invalid-feedback",4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],["popContent",""],["role","alert",1,"alert","alert-warning"],"This image contains snapshot(s), which will prevent it from being removed after moved to trash.",[1,"invalid-feedback"],"Wrong date format. Please use \"YYYY-MM-DD HH:mm:ss\".","Protection has already expired. Please pick a future date or leave it empty.",[3,"control"]]},template:function(e,t){if(1&e){const e=S.Tb();S.Sb(0,"cd-modal",0),S.Qb(1,1),S.Wb(2,2),S.Pb(),S.Qb(3,3),S.Sb(4,"form",4,5),S.Sb(6,"div",6),S.Mc(7,ko,3,0,"div",7),S.Sb(8,"p"),S.cc(9,8),S.Nb(10,"kbd"),S.Nb(11,"kbd"),S.Zb(),S.Rb(),S.Sb(12,"div",9),S.Sb(13,"label",10),S.Wb(14,11),S.Rb(),S.Sb(15,"input",12,13),S.Yb(17,14),S.gc("click",(function(){return S.Dc(e),S.Ac(16).open()}))("keypress",(function(){return S.Dc(e),S.Ac(16).close()})),S.Rb(),S.Mc(18,Mo,2,0,"span",15),S.Mc(19,No,2,0,"span",15),S.Rb(),S.Rb(),S.Sb(20,"div",16),S.Sb(21,"cd-form-button-panel",17),S.gc("submitActionEvent",(function(){return t.moveImage()})),S.Rb(),S.Rb(),S.Rb(),S.Pb(),S.Rb(),S.Mc(22,Io,1,1,"ng-template",null,18,S.Nc)}if(2&e){const e=S.Ac(5),a=S.Ac(23);S.pc("modalRef",t.activeModal),S.yb(4),S.pc("formGroup",t.moveForm),S.yb(3),S.pc("ngIf",t.hasSnapshots),S.yb(4),S.ac(t.imageSpecStr),S.Xb(9),S.yb(4),S.pc("ngbPopover",a),S.yb(3),S.pc("ngIf",t.moveForm.showError("expiresAt",e,"format")),S.yb(1),S.pc("ngIf",t.moveForm.showError("expiresAt",e,"expired")),S.yb(2),S.pc("form",t.moveForm)("submitText",t.actionLabels.MOVE)}},directives:[E.a,o.C,o.r,o.k,C.a,i.r,D.a,O.a,o.d,A.a,o.q,o.i,r.w,x.a,_o.a],styles:[""]}),e})();function To(e,t){1&e&&(S.Sb(0,"li",10),S.Sb(1,"a",3),S.Wb(2,11),S.Rb(),S.Rb())}let Fo=(()=>{class e{constructor(e,t){this.authStorageService=e,this.router=t,this.grafanaPermission=this.authStorageService.getPermissions().grafana}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(lt.a),S.Mb(s.e))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-rbd-tabs"]],decls:12,vars:2,consts:function(){return[["ngbNav","",1,"nav-tabs",3,"activeId","navChange"],["nav","ngbNav"],["ngbNavItem","/block/rbd"],["ngbNavLink",""],"Images",["ngbNavItem","/block/rbd/namespaces"],"Namespaces",["ngbNavItem","/block/rbd/trash"],"Trash",["ngbNavItem","/block/rbd/performance",4,"ngIf"],["ngbNavItem","/block/rbd/performance"],"Overall Performance"]},template:function(e,t){1&e&&(S.Sb(0,"ul",0,1),S.gc("navChange",(function(e){return t.router.navigate([e.nextId])})),S.Sb(2,"li",2),S.Sb(3,"a",3),S.Wb(4,4),S.Rb(),S.Rb(),S.Sb(5,"li",5),S.Sb(6,"a",3),S.Wb(7,6),S.Rb(),S.Rb(),S.Sb(8,"li",7),S.Sb(9,"a",3),S.Wb(10,8),S.Rb(),S.Rb(),S.Mc(11,To,3,0,"li",9),S.Rb()),2&e&&(S.pc("activeId",t.router.url),S.yb(11),S.pc("ngIf",t.grafanaPermission.read))},directives:[r.p,r.r,r.s,i.r],styles:[""]}),e})();var Po=a("LRne"),zo=a("nQ07"),Eo=a("QTAa"),Co=a("a0VL"),Do=a("mSOc"),Oo=a("VXsX"),Ao=a("XNiG");function xo(e,t){1&e&&(S.Sb(0,"span",15),S.Wb(1,16),S.Rb())}let Vo=(()=>{class e{constructor(e,t,a,i,o){this.activeModal=e,this.rbdService=t,this.taskManagerService=a,this.notificationService=i,this.actionLabels=o,this.editing=!1,this.onSubmit=new Ao.a,this.action=this.actionLabels.CREATE,this.resource="RBD Snapshot",this.createForm()}createForm(){this.snapshotForm=new $.a({snapshotName:new o.h("",{validators:[o.A.required]})})}setSnapName(e){this.snapName=e,this.snapshotForm.get("snapshotName").setValue(e)}setEditing(e=!0){this.editing=e,this.action=this.editing?this.actionLabels.RENAME:this.actionLabels.CREATE}editAction(){const e=this.snapshotForm.getValue("snapshotName"),t=new R.a(this.poolName,this.namespace,this.imageName),a=new F.a;a.name="rbd/snap/edit",a.metadata={image_spec:t.toString(),snapshot_name:e},this.rbdService.renameSnapshot(t,this.snapName,e).toPromise().then(()=>{this.taskManagerService.subscribe(a.name,a.metadata,e=>{this.notificationService.notifyTask(e)}),this.activeModal.close(),this.onSubmit.next(this.snapName)}).catch(()=>{this.snapshotForm.setErrors({cdSubmitButton:!0})})}createAction(){const e=this.snapshotForm.getValue("snapshotName"),t=new R.a(this.poolName,this.namespace,this.imageName),a=new F.a;a.name="rbd/snap/create",a.metadata={image_spec:t.toString(),snapshot_name:e},this.rbdService.createSnapshot(t,e).toPromise().then(()=>{this.taskManagerService.subscribe(a.name,a.metadata,e=>{this.notificationService.notifyTask(e)}),this.activeModal.close(),this.onSubmit.next(e)}).catch(()=>{this.snapshotForm.setErrors({cdSubmitButton:!0})})}submit(){this.editing?this.editAction():this.createAction()}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(r.a),S.Mb(_),S.Mb(Oo.a),S.Mb(pt.a),S.Mb(l.b))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-rbd-snapshot-form-modal"]],decls:19,vars:15,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"modal-content"],["name","snapshotForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","snapshotName",1,"cd-col-form-label","required"],"Name",[1,"cd-col-form-input"],["type","text","placeholder","Snapshot name...","id","snapshotName","name","snapshotName","formControlName","snapshotName","autofocus","",1,"form-control"],["class","invalid-feedback",4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required."]},template:function(e,t){if(1&e&&(S.Sb(0,"cd-modal",0),S.Qb(1,1),S.Wb(2,2),S.jc(3,"titlecase"),S.jc(4,"upperFirst"),S.Pb(),S.Qb(5,3),S.Sb(6,"form",4,5),S.Sb(8,"div",6),S.Sb(9,"div",7),S.Sb(10,"label",8),S.Wb(11,9),S.Rb(),S.Sb(12,"div",10),S.Nb(13,"input",11),S.Mc(14,xo,2,0,"span",12),S.Rb(),S.Rb(),S.Rb(),S.Sb(15,"div",13),S.Sb(16,"cd-form-button-panel",14),S.gc("submitActionEvent",(function(){return t.submit()})),S.jc(17,"titlecase"),S.jc(18,"upperFirst"),S.Rb(),S.Rb(),S.Rb(),S.Pb(),S.Rb()),2&e){const e=S.Ac(7);S.pc("modalRef",t.activeModal),S.yb(4),S.ac(S.kc(3,7,t.action))(S.kc(4,9,t.resource)),S.Xb(2),S.yb(2),S.pc("formGroup",t.snapshotForm),S.yb(8),S.pc("ngIf",t.snapshotForm.showError("snapshotName",e,"required")),S.yb(2),S.pc("form",t.snapshotForm)("submitText",S.kc(17,11,t.action)+" "+S.kc(18,13,t.resource))}},directives:[E.a,o.C,o.r,o.k,C.a,D.a,O.a,o.d,A.a,o.q,o.i,ha.a,i.r,x.a],pipes:[i.A,le.a],styles:[""]}),e})();class Wo{constructor(e,t,a){this.featuresName=t,this.cloneFormatVersion=1,a.cloneFormatVersion().subscribe(e=>{this.cloneFormatVersion=e}),this.create={permission:"create",icon:N.a.add,name:e.CREATE},this.rename={permission:"update",icon:N.a.edit,name:e.RENAME},this.protect={permission:"update",icon:N.a.lock,visible:e=>e.hasSingleSelection&&!e.first().is_protected,name:e.PROTECT},this.unprotect={permission:"update",icon:N.a.unlock,visible:e=>e.hasSingleSelection&&e.first().is_protected,name:e.UNPROTECT},this.clone={permission:"create",canBePrimary:e=>e.hasSingleSelection,disable:e=>this.getCloneDisableDesc(e,this.featuresName),icon:N.a.clone,name:e.CLONE},this.copy={permission:"create",canBePrimary:e=>e.hasSingleSelection,disable:e=>!e.hasSingleSelection||e.first().cdExecuting,icon:N.a.copy,name:e.COPY},this.rollback={permission:"update",icon:N.a.undo,name:e.ROLLBACK},this.deleteSnap={permission:"delete",icon:N.a.destroy,disable:e=>{const t=e.first();return!e.hasSingleSelection||t.cdExecuting||t.is_protected},name:e.DELETE},this.ordering=[this.create,this.rename,this.protect,this.unprotect,this.clone,this.copy,this.rollback,this.deleteSnap]}getCloneDisableDesc(e,t){return!(e.hasSingleSelection&&!e.first().cdExecuting)||((null==t?void 0:t.includes("layering"))?1===this.cloneFormatVersion&&!e.first().is_protected&&"Snapshot must be protected in order to clone.":"Parent image must support Layering")}}class qo{}const Bo=["nameTpl"],Go=["rollbackTpl"];function Lo(e,t){if(1&e&&(S.Qb(0),S.Wb(1,3),S.Pb(),S.Sb(2,"strong"),S.Oc(3),S.Rb(),S.Oc(4,".\n")),2&e){const e=t.$implicit;S.yb(3),S.Qc(" ",e.snapName,"")}}let jo=(()=>{class e{constructor(e,t,a,i,o,s,n,r,c,l,b){this.authStorageService=e,this.modalService=t,this.dimlessBinaryPipe=a,this.cdDatePipe=i,this.rbdService=o,this.taskManagerService=s,this.notificationService=n,this.summaryService=r,this.taskListService=c,this.actionLabels=l,this.cdr=b,this.snapshots=[],this.selection=new nt.a,this.builders={"rbd/snap/create":e=>{const t=new qo;return t.name=e.snapshot_name,t}},this.permission=this.authStorageService.getPermissions().rbdImage}ngOnInit(){this.columns=[{name:"Name",prop:"name",cellTransformation:st.a.executing,flexGrow:2},{name:"Size",prop:"size",flexGrow:1,cellClass:"text-right",pipe:this.dimlessBinaryPipe},{name:"Provisioned",prop:"disk_usage",flexGrow:1,cellClass:"text-right",pipe:this.dimlessBinaryPipe},{name:"State",prop:"is_protected",flexGrow:1,cellTransformation:st.a.badge,customTemplateConfig:{map:{true:{value:"PROTECTED",class:"badge-success"},false:{value:"UNPROTECTED",class:"badge-info"}}}},{name:"Created",prop:"timestamp",flexGrow:1,pipe:this.cdDatePipe}],this.imageSpec=new R.a(this.poolName,this.namespace,this.rbdName),this.rbdTableActions=new Wo(this.actionLabels,this.featuresName,this.rbdService),this.rbdTableActions.create.click=()=>this.openCreateSnapshotModal(),this.rbdTableActions.rename.click=()=>this.openEditSnapshotModal(),this.rbdTableActions.protect.click=()=>this.toggleProtection(),this.rbdTableActions.unprotect.click=()=>this.toggleProtection();const e=()=>this.selection.first()&&`${this.imageSpec.toStringEncoded()}/${encodeURIComponent(this.selection.first().name)}`;this.rbdTableActions.clone.routerLink=()=>"/block/rbd/clone/"+e(),this.rbdTableActions.copy.routerLink=()=>"/block/rbd/copy/"+e(),this.rbdTableActions.rollback.click=()=>this.rollbackModal(),this.rbdTableActions.deleteSnap.click=()=>this.deleteSnapshotModal(),this.tableActions=this.rbdTableActions.ordering,this.taskListService.init(()=>Object(Po.a)(this.snapshots),null,e=>{zo.a.updateChanged(this,{data:e})&&(this.cdr.detectChanges(),this.data=[...this.data])},()=>{zo.a.updateChanged(this,{data:this.snapshots})&&(this.cdr.detectChanges(),this.data=[...this.data])},e=>["rbd/snap/create","rbd/snap/delete","rbd/snap/edit","rbd/snap/rollback"].includes(e.name)&&this.imageSpec.toString()===e.metadata.image_spec,(e,t)=>e.name===t.metadata.snapshot_name,this.builders)}ngOnChanges(){this.columns&&(this.imageSpec=new R.a(this.poolName,this.namespace,this.rbdName),this.rbdTableActions&&(this.rbdTableActions.featuresName=this.featuresName),this.taskListService.fetch())}openSnapshotModal(e,t=null){this.modalRef=this.modalService.show(Vo),this.modalRef.componentInstance.poolName=this.poolName,this.modalRef.componentInstance.imageName=this.rbdName,this.modalRef.componentInstance.namespace=this.namespace,t?this.modalRef.componentInstance.setEditing():t=`${this.rbdName}_${Ro()().toISOString(!0)}`,this.modalRef.componentInstance.setSnapName(t),this.modalRef.componentInstance.onSubmit.subscribe(t=>{const a=new Eo.a;a.name=e,a.metadata={image_spec:this.imageSpec.toString(),snapshot_name:t},this.summaryService.addRunningTask(a)})}openCreateSnapshotModal(){this.openSnapshotModal("rbd/snap/create")}openEditSnapshotModal(){this.openSnapshotModal("rbd/snap/edit",this.selection.first().name)}toggleProtection(){const e=this.selection.first().name,t=this.selection.first().is_protected,a=new F.a;a.name="rbd/snap/edit";const i=new R.a(this.poolName,this.namespace,this.rbdName);a.metadata={image_spec:i.toString(),snapshot_name:e},this.rbdService.protectSnapshot(i,e,!t).toPromise().then(()=>{const e=new Eo.a;e.name=a.name,e.metadata=a.metadata,this.summaryService.addRunningTask(e),this.taskManagerService.subscribe(a.name,a.metadata,e=>{this.notificationService.notifyTask(e)})})}_asyncTask(e,t,a){const i=new F.a;i.name=t,i.metadata={image_spec:new R.a(this.poolName,this.namespace,this.rbdName).toString(),snapshot_name:a};const o=new R.a(this.poolName,this.namespace,this.rbdName);this.rbdService[e](o,a).toPromise().then(()=>{const e=new Eo.a;e.name=i.name,e.metadata=i.metadata,this.summaryService.addRunningTask(e),this.modalRef.close(),this.taskManagerService.subscribe(e.name,e.metadata,e=>{this.notificationService.notifyTask(e)})}).catch(()=>{this.modalRef.componentInstance.stopLoadingSpinner()})}rollbackModal(){const e=this.selection.selected[0].name,t=new R.a(this.poolName,this.namespace,this.rbdName).toString(),a={titleText:"RBD snapshot rollback",buttonText:"Rollback",bodyTpl:this.rollbackTpl,bodyData:{snapName:`${t}@${e}`},onSubmit:()=>{this._asyncTask("rollbackSnapshot","rbd/snap/rollback",e)}};this.modalRef=this.modalService.show(go.a,a)}deleteSnapshotModal(){const e=this.selection.selected[0].name;this.modalRef=this.modalService.show(it.a,{itemDescription:"RBD snapshot",itemNames:[e],submitAction:()=>this._asyncTask("deleteSnapshot","rbd/snap/delete",e)})}updateSelection(e){this.selection=e}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(lt.a),S.Mb(P.a),S.Mb(hi.a),S.Mb(Co.a),S.Mb(_),S.Mb(Oo.a),S.Mb(pt.a),S.Mb(Do.a),S.Mb(bt.a),S.Mb(l.b),S.Mb(S.h))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-rbd-snapshot-list"]],viewQuery:function(e,t){var a;1&e&&(S.Tc(Bo,!0),S.Jc(Go,!0)),2&e&&(S.zc(a=S.hc())&&(t.nameTpl=a.first),S.zc(a=S.hc())&&(t.rollbackTpl=a.first))},inputs:{snapshots:"snapshots",featuresName:"featuresName",poolName:"poolName",namespace:"namespace",rbdName:"rbdName"},features:[S.xb([bt.a]),S.wb],decls:4,vars:5,consts:function(){return[["columnMode","flex","selectionType","single",3,"data","columns","updateSelection"],[1,"table-actions",3,"permission","selection","tableActions"],["rollbackTpl",""],"You are about to rollback"]},template:function(e,t){1&e&&(S.Sb(0,"cd-table",0),S.gc("updateSelection",(function(e){return t.updateSelection(e)})),S.Nb(1,"cd-table-actions",1),S.Rb(),S.Mc(2,Lo,5,1,"ng-template",null,2,S.Nc)),2&e&&(S.pc("data",t.data)("columns",t.columns),S.yb(1),S.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions))},directives:[ot.a,Mt.a],styles:[""],changeDetection:0}),e})();var Qo=a("aAWM"),Uo=a("insk"),Yo=a("nSDx");const Ko=["poolConfigurationSourceTpl"];function Jo(e,t){1&e&&(S.Qb(0),S.cc(1,3),S.Nb(2,"strong"),S.Zb(),S.Pb())}function Xo(e,t){if(1&e&&(S.Sb(0,"span"),S.Sb(1,"span",38),S.Oc(2),S.Rb(),S.Rb()),2&e){const e=t.$implicit;S.yb(2),S.Pc(e)}}function Ho(e,t){if(1&e&&(S.Sb(0,"span"),S.Sb(1,"span",39),S.Wb(2,40),S.Rb(),S.Rb()),2&e){S.ic(3);const e=S.Ac(1);S.yb(1),S.pc("ngbTooltip",e)}}function Zo(e,t){if(1&e&&(S.Sb(0,"span"),S.Oc(1),S.jc(2,"dimlessBinary"),S.Rb()),2&e){const e=S.ic(3);S.yb(1),S.Qc(" ",S.kc(2,1,e.selection.disk_usage)," ")}}function es(e,t){if(1&e&&(S.Sb(0,"span"),S.Sb(1,"span",39),S.Wb(2,41),S.Rb(),S.Rb()),2&e){S.ic(3);const e=S.Ac(1);S.yb(1),S.pc("ngbTooltip",e)}}function ts(e,t){if(1&e&&(S.Sb(0,"span"),S.Oc(1),S.jc(2,"dimlessBinary"),S.Rb()),2&e){const e=S.ic(3);S.yb(1),S.Qc(" ",S.kc(2,1,e.selection.total_disk_usage)," ")}}function as(e,t){if(1&e&&(S.Sb(0,"span"),S.Oc(1),S.Rb()),2&e){const e=S.ic(4);S.yb(1),S.Qc("/",e.selection.parent.pool_namespace,"")}}function is(e,t){if(1&e&&(S.Sb(0,"span"),S.Oc(1),S.Mc(2,as,2,1,"span",1),S.Oc(3),S.Rb()),2&e){const e=S.ic(3);S.yb(1),S.Pc(e.selection.parent.pool_name),S.yb(1),S.pc("ngIf",e.selection.parent.pool_namespace),S.yb(1),S.Rc("/",e.selection.parent.image_name,"@",e.selection.parent.snap_name,"")}}function os(e,t){1&e&&(S.Sb(0,"span"),S.Oc(1,"-"),S.Rb())}function ss(e,t){if(1&e&&(S.Sb(0,"table",17),S.Sb(1,"tbody"),S.Sb(2,"tr"),S.Sb(3,"td",18),S.Wb(4,19),S.Rb(),S.Sb(5,"td",20),S.Oc(6),S.Rb(),S.Rb(),S.Sb(7,"tr"),S.Sb(8,"td",21),S.Wb(9,22),S.Rb(),S.Sb(10,"td"),S.Oc(11),S.Rb(),S.Rb(),S.Sb(12,"tr"),S.Sb(13,"td",21),S.Wb(14,23),S.Rb(),S.Sb(15,"td"),S.Oc(16),S.jc(17,"empty"),S.Rb(),S.Rb(),S.Sb(18,"tr"),S.Sb(19,"td",21),S.Wb(20,24),S.Rb(),S.Sb(21,"td"),S.Oc(22),S.jc(23,"cdDate"),S.Rb(),S.Rb(),S.Sb(24,"tr"),S.Sb(25,"td",21),S.Wb(26,25),S.Rb(),S.Sb(27,"td"),S.Oc(28),S.jc(29,"dimlessBinary"),S.Rb(),S.Rb(),S.Sb(30,"tr"),S.Sb(31,"td",21),S.Wb(32,26),S.Rb(),S.Sb(33,"td"),S.Oc(34),S.jc(35,"dimless"),S.Rb(),S.Rb(),S.Sb(36,"tr"),S.Sb(37,"td",21),S.Wb(38,27),S.Rb(),S.Sb(39,"td"),S.Oc(40),S.jc(41,"dimlessBinary"),S.Rb(),S.Rb(),S.Sb(42,"tr"),S.Sb(43,"td",21),S.Wb(44,28),S.Rb(),S.Sb(45,"td"),S.Mc(46,Xo,3,1,"span",29),S.Rb(),S.Rb(),S.Sb(47,"tr"),S.Sb(48,"td",21),S.Wb(49,30),S.Rb(),S.Sb(50,"td"),S.Mc(51,Ho,3,1,"span",1),S.Mc(52,Zo,3,3,"span",1),S.Rb(),S.Rb(),S.Sb(53,"tr"),S.Sb(54,"td",21),S.Wb(55,31),S.Rb(),S.Sb(56,"td"),S.Mc(57,es,3,1,"span",1),S.Mc(58,ts,3,3,"span",1),S.Rb(),S.Rb(),S.Sb(59,"tr"),S.Sb(60,"td",21),S.Wb(61,32),S.Rb(),S.Sb(62,"td"),S.Oc(63),S.jc(64,"dimlessBinary"),S.Rb(),S.Rb(),S.Sb(65,"tr"),S.Sb(66,"td",21),S.Wb(67,33),S.Rb(),S.Sb(68,"td"),S.Oc(69),S.Rb(),S.Rb(),S.Sb(70,"tr"),S.Sb(71,"td",21),S.Wb(72,34),S.Rb(),S.Sb(73,"td"),S.Mc(74,is,4,4,"span",1),S.Mc(75,os,2,0,"span",1),S.Rb(),S.Rb(),S.Sb(76,"tr"),S.Sb(77,"td",21),S.Wb(78,35),S.Rb(),S.Sb(79,"td"),S.Oc(80),S.Rb(),S.Rb(),S.Sb(81,"tr"),S.Sb(82,"td",21),S.Wb(83,36),S.Rb(),S.Sb(84,"td"),S.Oc(85),S.Rb(),S.Rb(),S.Sb(86,"tr"),S.Sb(87,"td",21),S.Wb(88,37),S.Rb(),S.Sb(89,"td"),S.Oc(90),S.Rb(),S.Rb(),S.Rb(),S.Rb()),2&e){const e=S.ic(2);S.yb(6),S.Pc(e.selection.name),S.yb(5),S.Pc(e.selection.pool_name),S.yb(5),S.Pc(S.kc(17,19,e.selection.data_pool)),S.yb(6),S.Pc(S.kc(23,21,e.selection.timestamp)),S.yb(6),S.Pc(S.kc(29,23,e.selection.size)),S.yb(6),S.Pc(S.kc(35,25,e.selection.num_objs)),S.yb(6),S.Pc(S.kc(41,27,e.selection.obj_size)),S.yb(6),S.pc("ngForOf",e.selection.features_name),S.yb(5),S.pc("ngIf",-1===(null==e.selection.features_name?null:e.selection.features_name.indexOf("fast-diff"))),S.yb(1),S.pc("ngIf",-1!==(null==e.selection.features_name?null:e.selection.features_name.indexOf("fast-diff"))),S.yb(5),S.pc("ngIf",-1===(null==e.selection.features_name?null:e.selection.features_name.indexOf("fast-diff"))),S.yb(1),S.pc("ngIf",-1!==(null==e.selection.features_name?null:e.selection.features_name.indexOf("fast-diff"))),S.yb(5),S.Pc(S.kc(64,29,e.selection.stripe_unit)),S.yb(6),S.Pc(e.selection.stripe_count),S.yb(5),S.pc("ngIf",e.selection.parent),S.yb(1),S.pc("ngIf",!e.selection.parent),S.yb(5),S.Pc(e.selection.block_name_prefix),S.yb(5),S.Pc(e.selection.order),S.yb(5),S.Pc(e.selection.image_format)}}function ns(e,t){if(1&e&&S.Nb(0,"cd-rbd-snapshot-list",42),2&e){const e=S.ic(2);S.pc("snapshots",e.selection.snapshots)("featuresName",e.selection.features_name)("poolName",e.selection.pool_name)("namespace",e.selection.namespace)("rbdName",e.selection.name)}}function rs(e,t){if(1&e&&S.Nb(0,"cd-rbd-configuration-table",43),2&e){const e=S.ic(2);S.pc("data",e.selection.configuration)}}function cs(e,t){if(1&e&&S.Nb(0,"cd-grafana",44),2&e){const e=S.ic(2);S.pc("grafanaPath",e.rbdDashboardUrl)}}function ls(e,t){if(1&e&&(S.Qb(0),S.Sb(1,"ul",4,5),S.Sb(3,"li",6),S.Sb(4,"a",7),S.Wb(5,8),S.Rb(),S.Mc(6,ss,91,31,"ng-template",9),S.Rb(),S.Sb(7,"li",10),S.Sb(8,"a",7),S.Wb(9,11),S.Rb(),S.Mc(10,ns,1,5,"ng-template",9),S.Rb(),S.Sb(11,"li",12),S.Sb(12,"a",7),S.Wb(13,13),S.Rb(),S.Mc(14,rs,1,1,"ng-template",9),S.Rb(),S.Sb(15,"li",14),S.Sb(16,"a",7),S.Wb(17,15),S.Rb(),S.Mc(18,cs,1,1,"ng-template",9),S.Rb(),S.Rb(),S.Nb(19,"div",16),S.Pb()),2&e){const e=S.Ac(2);S.yb(19),S.pc("ngbNavOutlet",e)}}function bs(e,t){1&e&&(S.Qb(0),S.Sb(1,"strong",47),S.Yb(2,48),S.Wb(3,49),S.Rb(),S.Pb())}function ds(e,t){1&e&&(S.Sb(0,"span",47),S.Yb(1,50),S.Wb(2,51),S.Rb())}function ps(e,t){if(1&e&&(S.Mc(0,bs,4,0,"ng-container",45),S.Mc(1,ds,3,0,"ng-template",null,46,S.Nc)),2&e){const e=t.value,a=S.Ac(2);S.pc("ngIf",+e)("ngIfElse",a)}}let ms=(()=>{class e{ngOnChanges(){this.selection&&(this.rbdDashboardUrl=`rbd-details?var-Pool=${this.selection.pool_name}&var-Image=${this.selection.name}`)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-rbd-details"]],viewQuery:function(e,t){var a;1&e&&(S.Jc(Ko,!0),S.Jc(r.p,!0)),2&e&&(S.zc(a=S.hc())&&(t.poolConfigurationSourceTpl=a.first),S.zc(a=S.hc())&&(t.nav=a.first))},inputs:{selection:"selection",images:"images"},features:[S.wb],decls:5,vars:1,consts:function(){return[["usageNotAvailableTooltipTpl",""],[4,"ngIf"],["poolConfigurationSourceTpl",""],"Only available for RBD images with " + "\ufffd#2\ufffd" + "fast-diff" + "\ufffd/#2\ufffd" + " enabled",["ngbNav","","cdStatefulTab","rbd-details",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem","details"],["ngbNavLink",""],"Details",["ngbNavContent",""],["ngbNavItem","snapshots"],"Snapshots",["ngbNavItem","configuration"],"Configuration",["ngbNavItem","performance"],"Performance",[3,"ngbNavOutlet"],[1,"table","table-striped","table-bordered"],[1,"bold","w-25"],"Name",[1,"w-75"],[1,"bold"],"Pool","Data Pool","Created","Size","Objects","Object size","Features",[4,"ngFor","ngForOf"],"Provisioned","Total provisioned","Striping unit","Striping count","Parent","Block name prefix","Order","Format Version",[1,"badge","badge-dark","mr-2"],["placement","top",1,"form-text","text-muted",3,"ngbTooltip"],"N/A","N/A",[3,"snapshots","featuresName","poolName","namespace","rbdName"],[3,"data"],["uid","YhCYGcuZz","grafanaStyle","one",3,"grafanaPath"],[4,"ngIf","ngIfElse"],["global",""],[6,"ngbTooltip"],["ngbTooltip","This setting overrides the global value"],"Image",["ngbTooltip","This is the global value. No value for this option has been set for this image."],"Global"]},template:function(e,t){1&e&&(S.Mc(0,Jo,3,0,"ng-template",null,0,S.Nc),S.Mc(2,ls,20,1,"ng-container",1),S.Mc(3,ps,3,2,"ng-template",null,2,S.Nc)),2&e&&(S.yb(2),S.pc("ngIf",t.selection))},directives:[i.r,r.p,Za.a,r.r,r.s,r.q,r.u,i.q,r.D,jo,Qo.a,Uo.a],pipes:[Yo.a,Co.a,hi.a,jt.a],styles:[""]}),e})();const us=["usageTpl"],fs=["parentTpl"],hs=["nameTpl"],gs=["flattenTpl"],Ss=["deleteTpl"];function vs(e,t){1&e&&S.Nb(0,"div",8),2&e&&S.pc("innerHtml","Only available for RBD images with <strong>fast-diff</strong> enabled",S.Ec)}function ys(e,t){if(1&e&&(S.Sb(0,"span"),S.Oc(1),S.Rb()),2&e){const e=S.ic(2).value;S.yb(1),S.Qc("/",e.pool_namespace,"")}}function Rs(e,t){if(1&e&&(S.Sb(0,"span"),S.Oc(1),S.Mc(2,ys,2,1,"span",9),S.Oc(3),S.Rb()),2&e){const e=S.ic().value;S.yb(1),S.Pc(e.pool_name),S.yb(1),S.pc("ngIf",e.pool_namespace),S.yb(1),S.Rc("/",e.image_name,"@",e.snap_name,"")}}function ws(e,t){1&e&&(S.Sb(0,"span"),S.Oc(1,"-"),S.Rb())}function _s(e,t){if(1&e&&(S.Mc(0,Rs,4,4,"span",9),S.Mc(1,ws,2,0,"span",9)),2&e){const e=t.value;S.pc("ngIf",e),S.yb(1),S.pc("ngIf",!e)}}function ks(e,t){if(1&e&&(S.Oc(0," You are about to flatten "),S.Sb(1,"strong"),S.Oc(2),S.Rb(),S.Oc(3,". "),S.Nb(4,"br"),S.Nb(5,"br"),S.Oc(6," All blocks will be copied from parent "),S.Sb(7,"strong"),S.Oc(8),S.Rb(),S.Oc(9," to child "),S.Sb(10,"strong"),S.Oc(11),S.Rb(),S.Oc(12,".\n")),2&e){const e=t.$implicit;S.yb(2),S.Pc(e.child),S.yb(6),S.Pc(e.parent),S.yb(3),S.Pc(e.child)}}function Ms(e,t){if(1&e&&(S.Sb(0,"li"),S.Oc(1),S.Rb()),2&e){const e=t.$implicit;S.yb(1),S.Pc(e)}}function Ns(e,t){if(1&e&&(S.Qb(0),S.Sb(1,"span"),S.Wb(2,13),S.Rb(),S.Sb(3,"ul"),S.Mc(4,Ms,2,1,"li",14),S.Rb(),S.Pb()),2&e){const e=S.ic(2).snapshots;S.yb(4),S.pc("ngForOf",e)}}function Is(e,t){if(1&e&&(S.Sb(0,"div",11),S.Sb(1,"span"),S.Wb(2,12),S.Rb(),S.Nb(3,"br"),S.Mc(4,Ns,5,1,"ng-container",9),S.Rb()),2&e){const e=S.ic().snapshots;S.yb(4),S.pc("ngIf",e.length>0)}}function $s(e,t){1&e&&S.Mc(0,Is,5,1,"div",10),2&e&&S.pc("ngIf",t.hasSnapshots)}let Ts=(()=>{class e extends at.a{constructor(e,t,a,i,o,s,n,r,c){super(),this.authStorageService=e,this.rbdService=t,this.dimlessBinaryPipe=a,this.dimlessPipe=i,this.modalService=o,this.taskWrapper=s,this.taskListService=n,this.urlBuilder=r,this.actionLabels=c,this.tableStatus=new Pa.a,this.selection=new nt.a,this.builders={"rbd/create":e=>this.createRbdFromTask(e.pool_name,e.namespace,e.image_name),"rbd/delete":e=>this.createRbdFromTaskImageSpec(e.image_spec),"rbd/clone":e=>this.createRbdFromTask(e.child_pool_name,e.child_namespace,e.child_image_name),"rbd/copy":e=>this.createRbdFromTask(e.dest_pool_name,e.dest_namespace,e.dest_image_name)},this.permission=this.authStorageService.getPermissions().rbdImage;const l=()=>this.selection.first()&&new R.a(this.selection.first().pool_name,this.selection.first().namespace,this.selection.first().name).toStringEncoded();this.tableActions=[{permission:"create",icon:N.a.add,routerLink:()=>this.urlBuilder.getCreate(),canBePrimary:e=>!e.hasSingleSelection,name:this.actionLabels.CREATE},{permission:"update",icon:N.a.edit,routerLink:()=>this.urlBuilder.getEdit(l()),name:this.actionLabels.EDIT,disable:this.getInvalidNameDisable},{permission:"create",canBePrimary:e=>e.hasSingleSelection,disable:e=>this.getInvalidNameDisable(e)||!!e.first().cdExecuting,icon:N.a.copy,routerLink:()=>"/block/rbd/copy/"+l(),name:this.actionLabels.COPY},{permission:"update",disable:e=>this.getInvalidNameDisable(e)||e.first().cdExecuting||!e.first().parent,icon:N.a.flatten,click:()=>this.flattenRbdModal(),name:this.actionLabels.FLATTEN},{permission:"delete",icon:N.a.destroy,click:()=>this.deleteRbdModal(),name:this.actionLabels.DELETE,disable:e=>this.getDeleteDisableDesc(e)},{permission:"delete",icon:N.a.trash,click:()=>this.trashRbdModal(),name:this.actionLabels.TRASH,disable:e=>this.getInvalidNameDisable(e)||e.first().image_format===vi.V1}]}createRbdFromTaskImageSpec(e){const t=R.a.fromString(e);return this.createRbdFromTask(t.poolName,t.namespace,t.imageName)}createRbdFromTask(e,t,a){const i=new Si;return i.id="-1",i.unique_id="-1",i.name=a,i.namespace=t,i.pool_name=e,i.image_format=vi.V2,i}ngOnInit(){this.columns=[{name:"Name",prop:"name",flexGrow:2,cellTransformation:st.a.executing},{name:"Pool",prop:"pool_name",flexGrow:2},{name:"Namespace",prop:"namespace",flexGrow:2},{name:"Size",prop:"size",flexGrow:1,cellClass:"text-right",pipe:this.dimlessBinaryPipe},{name:"Objects",prop:"num_objs",flexGrow:1,cellClass:"text-right",pipe:this.dimlessPipe},{name:"Object size",prop:"obj_size",flexGrow:1,cellClass:"text-right",pipe:this.dimlessBinaryPipe},{name:"Provisioned",prop:"disk_usage",cellClass:"text-center",flexGrow:1,pipe:this.dimlessBinaryPipe},{name:"Total provisioned",prop:"total_disk_usage",cellClass:"text-center",flexGrow:1,pipe:this.dimlessBinaryPipe},{name:"Parent",prop:"parent",flexGrow:2,cellTemplate:this.parentTpl}],this.taskListService.init(()=>this.rbdService.list(),e=>this.prepareResponse(e),e=>this.images=e,()=>this.onFetchError(),e=>["rbd/clone","rbd/copy","rbd/create","rbd/delete","rbd/edit","rbd/flatten","rbd/trash/move"].includes(e.name),(e,t)=>{let a;switch(t.name){case"rbd/copy":a=new R.a(t.metadata.dest_pool_name,t.metadata.dest_namespace,t.metadata.dest_image_name).toString();break;case"rbd/clone":a=new R.a(t.metadata.child_pool_name,t.metadata.child_namespace,t.metadata.child_image_name).toString();break;case"rbd/create":a=new R.a(t.metadata.pool_name,t.metadata.namespace,t.metadata.image_name).toString();break;default:a=t.metadata.image_spec}return a===new R.a(e.pool_name,e.namespace,e.name).toString()},this.builders)}onFetchError(){this.table.reset(),this.tableStatus=new Pa.a(So.a.ValueException)}prepareResponse(e){let t=[];const a={};let i;if(e.forEach(e=>{m.a.isUndefined(a[e.status])&&(a[e.status]=[]),a[e.status].push(e.pool_name),t=t.concat(e.value)}),a[So.a.ValueException]?i=So.a.ValueException:a[So.a.ValueStale]?i=So.a.ValueStale:a[So.a.ValueNone]&&(i=So.a.ValueNone),i){const e=(a[i].length>1?"pools ":"pool ")+a[i].join();this.tableStatus=new Pa.a(i,e)}else this.tableStatus=new Pa.a;return t}updateSelection(e){this.selection=e}deleteRbdModal(){const e=this.selection.first().pool_name,t=this.selection.first().namespace,a=this.selection.first().name,i=new R.a(e,t,a);this.modalRef=this.modalService.show(it.a,{itemDescription:"RBD",itemNames:[i],bodyTemplate:this.deleteTpl,bodyContext:{hasSnapshots:this.hasSnapshots(),snapshots:this.listProtectedSnapshots()},submitActionObservable:()=>this.taskWrapper.wrapTaskAroundCall({task:new F.a("rbd/delete",{image_spec:i.toString()}),call:this.rbdService.delete(i)})})}trashRbdModal(){const e={poolName:this.selection.first().pool_name,namespace:this.selection.first().namespace,imageName:this.selection.first().name,hasSnapshots:this.hasSnapshots()};this.modalRef=this.modalService.show($o,e)}flattenRbd(e){this.taskWrapper.wrapTaskAroundCall({task:new F.a("rbd/flatten",{image_spec:e.toString()}),call:this.rbdService.flatten(e)}).subscribe({complete:()=>{this.modalRef.close()}})}flattenRbdModal(){const e=this.selection.first().pool_name,t=this.selection.first().namespace,a=this.selection.first().name,i=this.selection.first().parent,o=new R.a(i.pool_name,i.pool_namespace,i.image_name),s=new R.a(e,t,a),n={titleText:"RBD flatten",buttonText:"Flatten",bodyTpl:this.flattenTpl,bodyData:{parent:`${o}@${i.snap_name}`,child:s.toString()},onSubmit:()=>{this.flattenRbd(s)}};this.modalRef=this.modalService.show(go.a,n)}hasSnapshots(){return(this.selection.first().snapshots||[]).length>0}hasClonedSnapshots(e){return(e.snapshots||[]).some(e=>e.children&&e.children.length>0)}listProtectedSnapshots(){return this.selection.first().snapshots.reduce((e,t)=>(t.is_protected&&e.push(t.name),e),[])}getDeleteDisableDesc(e){const t=e.first();return t&&this.hasClonedSnapshots(t)?"This RBD has cloned snapshots. Please delete related RBDs before deleting this RBD.":this.getInvalidNameDisable(e)||this.hasClonedSnapshots(e.first())}getInvalidNameDisable(e){var t;const a=e.first();return(null===(t=null==a?void 0:a.name)||void 0===t?void 0:t.match(/[@/]/))?"This RBD image has an invalid name and can't be managed by ceph.":!e.first()||!e.hasSingleSelection}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(lt.a),S.Mb(_),S.Mb(hi.a),S.Mb(jt.a),S.Mb(P.a),S.Mb(z.a),S.Mb(bt.a),S.Mb(vo.a),S.Mb(l.b))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-rbd-list"]],viewQuery:function(e,t){var a;1&e&&(S.Jc(ot.a,!0),S.Tc(us,!0),S.Jc(fs,!0),S.Tc(hs,!0),S.Jc(gs,!0),S.Jc(Ss,!0)),2&e&&(S.zc(a=S.hc())&&(t.table=a.first),S.zc(a=S.hc())&&(t.usageTpl=a.first),S.zc(a=S.hc())&&(t.parentTpl=a.first),S.zc(a=S.hc())&&(t.nameTpl=a.first),S.zc(a=S.hc())&&(t.flattenTpl=a.first),S.zc(a=S.hc())&&(t.deleteTpl=a.first))},features:[S.xb([bt.a,{provide:vo.a,useValue:new vo.a("block/rbd")}]),S.vb],decls:13,vars:10,consts:function(){return[["columnMode","flex","identifier","unique_id","forceIdentifier","true","selectionType","single",3,"data","columns","searchableObjects","hasDetails","status","autoReload","fetchData","setExpandedRow","updateSelection"],["table",""],[1,"table-actions",3,"permission","selection","tableActions"],["cdTableDetail","",3,"selection"],["usageNotAvailableTooltipTpl",""],["parentTpl",""],["flattenTpl",""],["deleteTpl",""],[3,"innerHtml"],[4,"ngIf"],["class","alert alert-warning","role","alert",4,"ngIf"],["role","alert",1,"alert","alert-warning"],"Deleting this image will also delete all its snapshots.","The following snapshots are currently protected and will be removed:",[4,"ngFor","ngForOf"]]},template:function(e,t){1&e&&(S.Nb(0,"cd-rbd-tabs"),S.Sb(1,"cd-table",0,1),S.gc("fetchData",(function(){return t.taskListService.fetch()}))("setExpandedRow",(function(e){return t.setExpandedRow(e)}))("updateSelection",(function(e){return t.updateSelection(e)})),S.Nb(3,"cd-table-actions",2),S.Nb(4,"cd-rbd-details",3),S.Rb(),S.Mc(5,vs,1,1,"ng-template",null,4,S.Nc),S.Mc(7,_s,2,2,"ng-template",null,5,S.Nc),S.Mc(9,ks,13,3,"ng-template",null,6,S.Nc),S.Mc(11,$s,1,1,"ng-template",null,7,S.Nc)),2&e&&(S.yb(1),S.pc("data",t.images)("columns",t.columns)("searchableObjects",!0)("hasDetails",!0)("status",t.tableStatus)("autoReload",-1),S.yb(2),S.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions),S.yb(1),S.pc("selection",t.expandedRow))},directives:[Fo,ot.a,Mt.a,ms,i.r,i.q],styles:[""]}),e})();function Fs(e,t){1&e&&S.Nb(0,"input",19)}function Ps(e,t){1&e&&(S.Sb(0,"option",23),S.Wb(1,24),S.Rb()),2&e&&S.pc("ngValue",null)}function zs(e,t){1&e&&(S.Sb(0,"option",23),S.Wb(1,25),S.Rb()),2&e&&S.pc("ngValue",null)}function Es(e,t){1&e&&(S.Sb(0,"option",23),S.Wb(1,26),S.Rb()),2&e&&S.pc("ngValue",null)}function Cs(e,t){if(1&e&&(S.Sb(0,"option",27),S.Oc(1),S.Rb()),2&e){const e=t.$implicit;S.pc("value",e.pool_name),S.yb(1),S.Pc(e.pool_name)}}function Ds(e,t){if(1&e&&(S.Sb(0,"select",20),S.Mc(1,Ps,2,1,"option",21),S.Mc(2,zs,2,1,"option",21),S.Mc(3,Es,2,1,"option",21),S.Mc(4,Cs,2,2,"option",22),S.Rb()),2&e){const e=S.ic();S.yb(1),S.pc("ngIf",null===e.pools),S.yb(1),S.pc("ngIf",null!==e.pools&&0===e.pools.length),S.yb(1),S.pc("ngIf",null!==e.pools&&e.pools.length>0),S.yb(1),S.pc("ngForOf",e.pools)}}function Os(e,t){1&e&&(S.Sb(0,"span",28),S.Wb(1,29),S.Rb())}function As(e,t){1&e&&(S.Sb(0,"span",28),S.Wb(1,30),S.Rb())}function xs(e,t){1&e&&(S.Sb(0,"span",28),S.Wb(1,31),S.Rb())}let Vs=(()=>{class e{constructor(e,t,a,i,o,s){this.activeModal=e,this.actionLabels=t,this.authStorageService=a,this.notificationService=i,this.poolService=o,this.rbdService=s,this.pools=null,this.editing=!1,this.poolPermission=this.authStorageService.getPermissions().pool,this.createForm()}createForm(){this.namespaceForm=new $.a({pool:new o.h(""),namespace:new o.h("")},this.validator(),this.asyncValidator())}validator(){return e=>{const t=e.get("pool"),a=e.get("namespace");let i=null;t.value||(i={required:!0}),t.setErrors(i);let o=null;return a.value||(o={required:!0}),a.setErrors(o),null}}asyncValidator(){return e=>new Promise(t=>{const a=e.get("pool"),i=e.get("namespace");this.rbdService.listNamespaces(a.value).subscribe(e=>{if(e.some(e=>e.namespace===i.value)){const e={namespaceExists:!0};i.setErrors(e),t(e)}else t(null)})})}ngOnInit(){this.onSubmit=new Ao.a,this.poolPermission.read&&this.poolService.list(["pool_name","type","application_metadata"]).then(e=>{const t=[];for(const a of e)this.rbdService.isRBDPool(a)&&"replicated"===a.type&&t.push(a);if(this.pools=t,1===this.pools.length){const e=this.pools[0].pool_name;this.namespaceForm.get("pool").setValue(e)}})}submit(){const e=this.namespaceForm.getValue("pool"),t=this.namespaceForm.getValue("namespace"),a=new F.a;a.name="rbd/namespace/create",a.metadata={pool:e,namespace:t},this.rbdService.createNamespace(e,t).toPromise().then(()=>{this.notificationService.show(dt.a.success,"Created namespace '" + e + "/" + t + "'"),this.activeModal.close(),this.onSubmit.next()}).catch(()=>{this.namespaceForm.setErrors({cdSubmitButton:!0})})}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(r.a),S.Mb(l.b),S.Mb(lt.a),S.Mb(pt.a),S.Mb(ui.a),S.Mb(_))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-rbd-namespace-form-modal"]],decls:23,vars:9,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"Create Namespace",[1,"modal-content"],["name","namespaceForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","pool",1,"cd-col-form-label","required"],"Pool",[1,"cd-col-form-input"],["class","form-control","type","text","placeholder","Pool name...","id","pool","name","pool","formControlName","pool",4,"ngIf"],["id","pool","name","pool","class","form-control custom-select","formControlName","pool",4,"ngIf"],["class","invalid-feedback",4,"ngIf"],["for","namespace",1,"cd-col-form-label","required"],"Name",["type","text","placeholder","Namespace name...","id","namespace","name","namespace","formControlName","namespace","autofocus","",1,"form-control"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],["type","text","placeholder","Pool name...","id","pool","name","pool","formControlName","pool",1,"form-control"],["id","pool","name","pool","formControlName","pool",1,"form-control","custom-select"],[3,"ngValue",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"ngValue"],"Loading...","-- No rbd pools available --","-- Select a pool --",[3,"value"],[1,"invalid-feedback"],"This field is required.","This field is required.","Namespace already exists."]},template:function(e,t){if(1&e&&(S.Sb(0,"cd-modal",0),S.Qb(1,1),S.Wb(2,2),S.Pb(),S.Qb(3,3),S.Sb(4,"form",4,5),S.Sb(6,"div",6),S.Sb(7,"div",7),S.Sb(8,"label",8),S.Wb(9,9),S.Rb(),S.Sb(10,"div",10),S.Mc(11,Fs,1,0,"input",11),S.Mc(12,Ds,5,4,"select",12),S.Mc(13,Os,2,0,"span",13),S.Rb(),S.Rb(),S.Sb(14,"div",7),S.Sb(15,"label",14),S.Wb(16,15),S.Rb(),S.Sb(17,"div",10),S.Nb(18,"input",16),S.Mc(19,As,2,0,"span",13),S.Mc(20,xs,2,0,"span",13),S.Rb(),S.Rb(),S.Rb(),S.Sb(21,"div",17),S.Sb(22,"cd-form-button-panel",18),S.gc("submitActionEvent",(function(){return t.submit()})),S.Rb(),S.Rb(),S.Rb(),S.Pb(),S.Rb()),2&e){const e=S.Ac(5);S.pc("modalRef",t.activeModal),S.yb(4),S.pc("formGroup",t.namespaceForm),S.yb(7),S.pc("ngIf",!t.poolPermission.read),S.yb(1),S.pc("ngIf",t.poolPermission.read),S.yb(1),S.pc("ngIf",t.namespaceForm.showError("pool",e,"required")),S.yb(6),S.pc("ngIf",t.namespaceForm.showError("namespace",e,"required")),S.yb(1),S.pc("ngIf",t.namespaceForm.showError("namespace",e,"namespaceExists")),S.yb(2),S.pc("form",t.namespaceForm)("submitText",t.actionLabels.CREATE)}},directives:[E.a,o.C,o.r,o.k,C.a,D.a,i.r,O.a,o.d,A.a,o.q,o.i,ha.a,x.a,o.z,i.q,o.u,o.B],styles:[""]}),e})(),Ws=(()=>{class e{constructor(e,t,a,i,o,s){this.authStorageService=e,this.rbdService=t,this.poolService=a,this.modalService=i,this.notificationService=o,this.actionLabels=s,this.selection=new nt.a,this.permission=this.authStorageService.getPermissions().rbdImage,this.tableActions=[{permission:"create",icon:N.a.add,click:()=>this.createModal(),name:this.actionLabels.CREATE},{permission:"delete",icon:N.a.destroy,click:()=>this.deleteModal(),name:this.actionLabels.DELETE,disable:()=>this.getDeleteDisableDesc()}]}ngOnInit(){this.columns=[{name:"Namespace",prop:"namespace",flexGrow:1},{name:"Pool",prop:"pool",flexGrow:1},{name:"Total images",prop:"num_images",flexGrow:1}],this.refresh()}refresh(){this.poolService.list(["pool_name","type","application_metadata"]).then(e=>{e=e.filter(e=>this.rbdService.isRBDPool(e)&&"replicated"===e.type);const t=[];e.forEach(e=>{t.push(this.rbdService.listNamespaces(e.pool_name))}),t.length>0?Object(u.a)(t).subscribe(t=>{const a=[];for(let i=0;i<t.length;i++){const o=e[i].pool_name;t[i].forEach(e=>{a.push({id:`${o}/${e.namespace}`,pool:o,namespace:e.namespace,num_images:e.num_images})})}this.namespaces=a}):this.namespaces=[]})}updateSelection(e){this.selection=e}createModal(){this.modalRef=this.modalService.show(Vs),this.modalRef.componentInstance.onSubmit.subscribe(()=>{this.refresh()})}deleteModal(){const e=this.selection.first().pool,t=this.selection.first().namespace;this.modalRef=this.modalService.show(it.a,{itemDescription:"Namespace",itemNames:[`${e}/${t}`],submitAction:()=>this.rbdService.deleteNamespace(e,t).subscribe(()=>{this.notificationService.show(dt.a.success,"Deleted namespace '" + e + "/" + t + "'"),this.modalRef.close(),this.refresh()},()=>{this.modalRef.componentInstance.stopLoadingSpinner()})})}getDeleteDisableDesc(){var e;const t=this.selection.first();return(null==t?void 0:t.num_images)>0?"Namespace contains images":!(null===(e=this.selection)||void 0===e?void 0:e.first())}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(lt.a),S.Mb(_),S.Mb(ui.a),S.Mb(P.a),S.Mb(pt.a),S.Mb(l.b))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-rbd-namespace-list"]],features:[S.xb([bt.a])],decls:4,vars:5,consts:[["columnMode","flex","identifier","id","forceIdentifier","true","selectionType","single",3,"data","columns","fetchData","updateSelection"],[1,"table-actions","btn-toolbar"],[1,"btn-group",3,"permission","selection","tableActions"]],template:function(e,t){1&e&&(S.Nb(0,"cd-rbd-tabs"),S.Sb(1,"cd-table",0),S.gc("fetchData",(function(){return t.refresh()}))("updateSelection",(function(e){return t.updateSelection(e)})),S.Sb(2,"div",1),S.Nb(3,"cd-table-actions",2),S.Rb(),S.Rb()),2&e&&(S.yb(1),S.pc("data",t.namespaces)("columns",t.columns),S.yb(2),S.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions))},directives:[Fo,ot.a,Mt.a],styles:[""]}),e})(),qs=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-rbd-performance"]],decls:2,vars:1,consts:[["uid","41FrpeUiz","grafanaStyle","two",3,"grafanaPath"]],template:function(e,t){1&e&&(S.Nb(0,"cd-rbd-tabs"),S.Nb(1,"cd-grafana",0)),2&e&&(S.yb(1),S.pc("grafanaPath","rbd-overview?"))},directives:[Fo,Uo.a],styles:[""]}),e})();function Bs(e,t){1&e&&(S.Sb(0,"input",15),S.Yb(1,16),S.Rb())}function Gs(e,t){if(1&e&&(S.Sb(0,"option",21),S.Oc(1),S.Rb()),2&e){const e=t.$implicit;S.pc("value",e),S.yb(1),S.Pc(e)}}function Ls(e,t){if(1&e&&(S.Sb(0,"select",17),S.Sb(1,"option",18),S.Wb(2,19),S.Rb(),S.Mc(3,Gs,2,2,"option",20),S.Rb()),2&e){const e=S.ic();S.yb(3),S.pc("ngForOf",e.pools)}}let js=(()=>{class e{constructor(e,t,a,i,o,s,n){this.authStorageService=e,this.rbdService=t,this.activeModal=a,this.actionLabels=i,this.fb=o,this.poolService=s,this.taskWrapper=n,this.poolPermission=this.authStorageService.getPermissions().pool}createForm(){this.purgeForm=this.fb.group({poolName:""})}ngOnInit(){this.poolPermission.read&&this.poolService.list(["pool_name","application_metadata"]).then(e=>{this.pools=e.filter(e=>e.application_metadata.includes("rbd")).map(e=>e.pool_name)}),this.createForm()}purge(){const e=this.purgeForm.getValue("poolName")||"";this.taskWrapper.wrapTaskAroundCall({task:new F.a("rbd/trash/purge",{pool_name:e}),call:this.rbdService.purgeTrash(e)}).subscribe({error:()=>{this.purgeForm.setErrors({cdSubmitButton:!0})},complete:()=>{this.activeModal.close()}})}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(lt.a),S.Mb(_),S.Mb(r.a),S.Mb(l.b),S.Mb(wo.a),S.Mb(ui.a),S.Mb(z.a))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-rbd-trash-purge-modal"]],decls:18,vars:6,consts:function(){var e,t;return e="Purge Trash",t="To purge, select\xA0 " + "[\ufffd#9\ufffd|\ufffd#10\ufffd]" + "All" + "[\ufffd/#9\ufffd|\ufffd/#10\ufffd]" + "\xA0 or one pool and click\xA0 " + "[\ufffd#9\ufffd|\ufffd#10\ufffd]" + "Purge" + "[\ufffd/#9\ufffd|\ufffd/#10\ufffd]" + ".\xA0",[[3,"modalRef"],[1,"modal-title"],e,[1,"modal-content"],["name","purgeForm","novalidate","",1,"form",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],t=S.bc(t),[1,"form-group"],[1,"col-form-label","mx-auto"],"Pool:",["class","form-control","type","text","formControlName","poolName",4,"ngIf",6,"placeholder"],["id","poolName","name","poolName","class","form-control custom-select","formControlName","poolName",4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],["type","text","formControlName","poolName",1,"form-control",6,"placeholder"],["placeholder","Pool name..."],["id","poolName","name","poolName","formControlName","poolName",1,"form-control","custom-select"],["value",""],"All",[3,"value",4,"ngFor","ngForOf"],[3,"value"]]},template:function(e,t){1&e&&(S.Sb(0,"cd-modal",0),S.Qb(1,1),S.Wb(2,2),S.Pb(),S.Qb(3,3),S.Sb(4,"form",4,5),S.Sb(6,"div",6),S.Sb(7,"p"),S.cc(8,7),S.Nb(9,"kbd"),S.Nb(10,"kbd"),S.Zb(),S.Rb(),S.Sb(11,"div",8),S.Sb(12,"label",9),S.Wb(13,10),S.Rb(),S.Mc(14,Bs,2,0,"input",11),S.Mc(15,Ls,4,1,"select",12),S.Rb(),S.Rb(),S.Sb(16,"div",13),S.Sb(17,"cd-form-button-panel",14),S.gc("submitActionEvent",(function(){return t.purge()})),S.Rb(),S.Rb(),S.Rb(),S.Pb(),S.Rb()),2&e&&(S.pc("modalRef",t.activeModal),S.yb(4),S.pc("formGroup",t.purgeForm),S.yb(10),S.pc("ngIf",!t.poolPermission.read),S.yb(1),S.pc("ngIf",t.poolPermission.read),S.yb(2),S.pc("form",t.purgeForm)("submitText",t.actionLabels.PURGE))},directives:[E.a,o.C,o.r,o.k,C.a,D.a,i.r,x.a,O.a,o.d,A.a,o.q,o.i,o.z,o.u,o.B,i.q],styles:[""]}),e})();function Qs(e,t){1&e&&(S.Sb(0,"span",15),S.Wb(1,16),S.Rb())}let Us=(()=>{class e{constructor(e,t,a,i,o){this.rbdService=e,this.activeModal=t,this.actionLabels=a,this.fb=i,this.taskWrapper=o}ngOnInit(){this.imageSpec=new R.a(this.poolName,this.namespace,this.imageName).toString(),this.restoreForm=this.fb.group({name:this.imageName})}restore(){const e=this.restoreForm.getValue("name"),t=new R.a(this.poolName,this.namespace,this.imageId);this.taskWrapper.wrapTaskAroundCall({task:new F.a("rbd/trash/restore",{image_id_spec:t.toString(),new_image_name:e}),call:this.rbdService.restoreTrash(t,e)}).subscribe({error:()=>{this.restoreForm.setErrors({cdSubmitButton:!0})},complete:()=>{this.activeModal.close()}})}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(_),S.Mb(r.a),S.Mb(l.b),S.Mb(wo.a),S.Mb(z.a))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-rbd-trash-restore-modal"]],decls:18,vars:7,consts:function(){var e,t;return e="Restore Image",t="To restore\xA0 " + "[\ufffd#9\ufffd|\ufffd#10\ufffd]" + "" + "\ufffd0\ufffd" + "@" + "\ufffd1\ufffd" + "" + "[\ufffd/#9\ufffd|\ufffd/#10\ufffd]" + ",\xA0 type the image's new name and click\xA0 " + "[\ufffd#9\ufffd|\ufffd#10\ufffd]" + "Restore" + "[\ufffd/#9\ufffd|\ufffd/#10\ufffd]" + ".",[[3,"modalRef"],[1,"modal-title"],e,[1,"modal-content"],["name","restoreForm","novalidate","",1,"form",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],t=S.bc(t),[1,"form-group"],["for","name",1,"col-form-label"],"New Name",["type","text","name","name","id","name","autocomplete","off","formControlName","name","autofocus","",1,"form-control"],["class","invalid-feedback",4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required."]},template:function(e,t){if(1&e&&(S.Sb(0,"cd-modal",0),S.Qb(1,1),S.Wb(2,2),S.Pb(),S.Qb(3,3),S.Sb(4,"form",4,5),S.Sb(6,"div",6),S.Sb(7,"p"),S.cc(8,7),S.Nb(9,"kbd"),S.Nb(10,"kbd"),S.Zb(),S.Rb(),S.Sb(11,"div",8),S.Sb(12,"label",9),S.Wb(13,10),S.Rb(),S.Nb(14,"input",11),S.Mc(15,Qs,2,0,"span",12),S.Rb(),S.Rb(),S.Sb(16,"div",13),S.Sb(17,"cd-form-button-panel",14),S.gc("submitActionEvent",(function(){return t.restore()})),S.Rb(),S.Rb(),S.Rb(),S.Pb(),S.Rb()),2&e){const e=S.Ac(5);S.pc("modalRef",t.activeModal),S.yb(4),S.pc("formGroup",t.restoreForm),S.yb(6),S.ac(t.imageSpec)(t.imageId),S.Xb(8),S.yb(5),S.pc("ngIf",t.restoreForm.showError("name",e,"required")),S.yb(2),S.pc("form",t.restoreForm)("submitText",t.actionLabels.RESTORE)}},directives:[E.a,o.C,o.r,o.k,C.a,D.a,O.a,o.d,A.a,o.q,o.i,ha.a,i.r,x.a],styles:[""]}),e})();const Ys=["expiresTpl"],Ks=["deleteTpl"],Js=function(e){return[e]};function Xs(e,t){if(1&e){const e=S.Tb();S.Sb(0,"button",6),S.gc("click",(function(){return S.Dc(e),S.ic().purgeModal()})),S.Nb(1,"i",7),S.Qb(2),S.Wb(3,8),S.Pb(),S.Rb()}if(2&e){const e=S.ic();S.pc("disabled",e.disablePurgeBtn),S.yb(1),S.pc("ngClass",S.uc(2,Js,e.icons.destroy))}}function Hs(e,t){1&e&&(S.Qb(0),S.Wb(1,10),S.Pb())}function Zs(e,t){1&e&&(S.Qb(0),S.Wb(1,11),S.Pb())}function en(e,t){if(1&e&&(S.Mc(0,Hs,2,0,"ng-container",9),S.Mc(1,Zs,2,0,"ng-container",9),S.Oc(2),S.jc(3,"cdDate")),2&e){const e=t.row,a=t.value;S.pc("ngIf",e.cdIsExpired),S.yb(1),S.pc("ngIf",!e.cdIsExpired),S.yb(1),S.Qc(" ",S.kc(3,3,a),"\n")}}function tn(e,t){if(1&e&&(S.Sb(0,"p",13),S.Sb(1,"strong"),S.Qb(2),S.Wb(3,14),S.jc(4,"cdDate"),S.Pb(),S.Rb(),S.Rb()),2&e){const e=S.ic().expiresAt;S.yb(4),S.ac(S.kc(4,1,e)),S.Xb(3)}}function an(e,t){1&e&&S.Mc(0,tn,5,3,"p",12),2&e&&S.pc("ngIf",!t.isExpired)}let on=(()=>{class e{constructor(e,t,a,i,o,s,n){this.authStorageService=e,this.rbdService=t,this.modalService=a,this.cdDatePipe=i,this.taskListService=o,this.taskWrapper=s,this.actionLabels=n,this.icons=N.a,this.executingTasks=[],this.selection=new nt.a,this.tableStatus=new Pa.a,this.disablePurgeBtn=!0,this.permission=this.authStorageService.getPermissions().rbdImage,this.tableActions=[{permission:"update",icon:N.a.undo,click:()=>this.restoreModal(),name:this.actionLabels.RESTORE},{permission:"delete",icon:N.a.destroy,click:()=>this.deleteModal(),name:this.actionLabels.DELETE}]}ngOnInit(){this.columns=[{name:"ID",prop:"id",flexGrow:1,cellTransformation:st.a.executing},{name:"Name",prop:"name",flexGrow:1},{name:"Pool",prop:"pool_name",flexGrow:1},{name:"Namespace",prop:"namespace",flexGrow:1},{name:"Status",prop:"deferment_end_time",flexGrow:1,cellTemplate:this.expiresTpl},{name:"Deleted At",prop:"deletion_time",flexGrow:1,pipe:this.cdDatePipe}],this.taskListService.init(()=>this.rbdService.listTrash(),e=>this.prepareResponse(e),e=>this.images=e,()=>this.onFetchError(),e=>["rbd/trash/remove","rbd/trash/restore"].includes(e.name),(e,t)=>new R.a(e.pool_name,e.namespace,e.id).toString()===t.metadata.image_id_spec,void 0)}prepareResponse(e){let t=[];const a={};let i;if(e.forEach(e=>{m.a.isUndefined(a[e.status])&&(a[e.status]=[]),a[e.status].push(e.pool_name),t=t.concat(e.value),this.disablePurgeBtn=!t.length}),a[3]?i=3:a[1]?i=1:a[2]&&(i=2),i){const e=(a[i].length>1?"pools ":"pool ")+a[i].join();this.tableStatus=new Pa.a(i,e)}else this.tableStatus=new Pa.a;return t.forEach(e=>{e.cdIsExpired=Ro()().isAfter(e.deferment_end_time)}),t}onFetchError(){this.table.reset(),this.tableStatus=new Pa.a(So.a.ValueException)}updateSelection(e){this.selection=e}restoreModal(){const e={poolName:this.selection.first().pool_name,namespace:this.selection.first().namespace,imageName:this.selection.first().name,imageId:this.selection.first().id};this.modalRef=this.modalService.show(Us,e)}deleteModal(){const e=this.selection.first().pool_name,t=this.selection.first().namespace,a=this.selection.first().id,i=this.selection.first().deferment_end_time,o=Ro()().isAfter(i),s=new R.a(e,t,a);this.modalRef=this.modalService.show(it.a,{itemDescription:"RBD",itemNames:[s],bodyTemplate:this.deleteTpl,bodyContext:{expiresAt:i,isExpired:o},submitActionObservable:()=>this.taskWrapper.wrapTaskAroundCall({task:new F.a("rbd/trash/remove",{image_id_spec:s.toString()}),call:this.rbdService.removeTrash(s,!0)})})}purgeModal(){this.modalService.show(js)}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(lt.a),S.Mb(_),S.Mb(P.a),S.Mb(Co.a),S.Mb(bt.a),S.Mb(z.a),S.Mb(l.b))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-rbd-trash-list"]],viewQuery:function(e,t){var a;1&e&&(S.Jc(ot.a,!0),S.Jc(Ys,!0),S.Jc(Ks,!0)),2&e&&(S.zc(a=S.hc())&&(t.table=a.first),S.zc(a=S.hc())&&(t.expiresTpl=a.first),S.zc(a=S.hc())&&(t.deleteTpl=a.first))},features:[S.xb([bt.a])],decls:9,vars:8,consts:function(){return[["columnMode","flex","identifier","id","forceIdentifier","true","selectionType","single",3,"data","columns","status","autoReload","fetchData","updateSelection"],[1,"table-actions","btn-toolbar"],[1,"btn-group",3,"permission","selection","tableActions"],["class","btn btn-light","type","button",3,"disabled","click",4,"ngIf"],["expiresTpl",""],["deleteTpl",""],["type","button",1,"btn","btn-light",3,"disabled","click"],["aria-hidden","true",3,"ngClass"],"Purge Trash",[4,"ngIf"],"Expired at","Protected until",["class","text-danger",4,"ngIf"],[1,"text-danger"],"This image is protected until " + "\ufffd0\ufffd" + "."]},template:function(e,t){1&e&&(S.Nb(0,"cd-rbd-tabs"),S.Sb(1,"cd-table",0),S.gc("fetchData",(function(){return t.taskListService.fetch()}))("updateSelection",(function(e){return t.updateSelection(e)})),S.Sb(2,"div",1),S.Nb(3,"cd-table-actions",2),S.Mc(4,Xs,4,4,"button",3),S.Rb(),S.Rb(),S.Mc(5,en,4,5,"ng-template",null,4,S.Nc),S.Mc(7,an,1,1,"ng-template",null,5,S.Nc)),2&e&&(S.yb(1),S.pc("data",t.images)("columns",t.columns)("status",t.tableStatus)("autoReload",-1),S.yb(2),S.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions),S.yb(1),S.pc("ngIf",t.permission.delete))},directives:[Fo,ot.a,Mt.a,i.r,O.a,i.p],pipes:[Co.a],styles:[""]}),e})(),sn=(()=>{class e{}return e.\u0275mod=S.Kb({type:e}),e.\u0275inj=S.Jb({factory:function(t){return new(t||e)},imports:[[i.c,ra,o.m,o.x,r.t,r.y,r.F,c.a,d.a,s.i,n.c]]}),e})();const nn=[{path:"",redirectTo:"rbd",pathMatch:"full"},{path:"rbd",canActivate:[b.a],data:{breadcrumbs:"Images"},children:[{path:"",component:Ts},{path:"namespaces",component:Ws,data:{breadcrumbs:"Namespaces"}},{path:"trash",component:on,data:{breadcrumbs:"Trash"}},{path:"performance",component:qs,data:{breadcrumbs:"Overall Performance"}},{path:l.e.CREATE,component:ho,data:{breadcrumbs:l.a.CREATE}},{path:l.e.EDIT+"/:image_spec",component:ho,data:{breadcrumbs:l.a.EDIT}},{path:l.e.CLONE+"/:image_spec/:snap",component:ho,data:{breadcrumbs:l.a.CLONE}},{path:l.e.COPY+"/:image_spec",component:ho,data:{breadcrumbs:l.a.COPY}},{path:l.e.COPY+"/:image_spec/:snap",component:ho,data:{breadcrumbs:l.a.COPY}}]},{path:"mirroring",component:bi,canActivate:[b.a],data:{breadcrumbs:"Mirroring"}},{path:"iscsi",canActivate:[b.a],data:{breadcrumbs:"iSCSI"},children:[{path:"",redirectTo:"overview",pathMatch:"full"},{path:"overview",component:na,data:{breadcrumbs:"Overview"}},{path:"targets",data:{breadcrumbs:"Targets"},children:[{path:"",component:Lt},{path:l.e.CREATE,component:tt,data:{breadcrumbs:l.a.CREATE}},{path:l.e.EDIT+"/:target_iqn",component:tt,data:{breadcrumbs:l.a.EDIT}}]}]}];let rn=(()=>{class e{}return e.\u0275mod=S.Kb({type:e}),e.\u0275inj=S.Jb({factory:function(t){return new(t||e)},imports:[[sn,s.i.forChild(nn)]]}),e})()},nQ07:function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var i=a("LvDl");class o{static updateChanged(e,t){let a=!1;return Object.keys(t).forEach(o=>{const s=t[o];i.isEqual(s,e[o])||(e[o]=s,a=!0)}),a}}},rFfW:function(e,t,a){"use strict";a.d(t,"a",(function(){return P}));var i=a("8Y7J"),o=a("s7LF"),s=a("LvDl"),n=a.n(s),r=a("jtHE"),c=a("oxzT"),l=a("QFaf"),b=a("PhyI"),d=a("aXbf"),p=a("o8EM"),m=a("NwgZ"),u=a("SVse"),f=a("ocLN"),h=a("p4Cf"),g=a("ANnk"),S=a("f69J");let v=(()=>{class e{constructor(e,t){this.control=e,this.formatter=t}setValue(e){const t=this.formatter.toMilliseconds(e);this.control.control.setValue(t+" ms")}ngOnInit(){this.setValue(this.control.value),this.ngDataReady&&this.ngDataReady.subscribe(()=>this.setValue(this.control.value))}onUpdate(e){this.setValue(e)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(o.p),i.Mb(d.a))},e.\u0275dir=i.Hb({type:e,selectors:[["","cdMilliseconds",""]],hostBindings:function(e,t){1&e&&i.gc("blur",(function(e){return t.onUpdate(e.target.value)}))},inputs:{ngDataReady:"ngDataReady"}}),e})();var y=a("IzCI");let R=(()=>{class e{constructor(e,t,a,o){this.elementRef=e,this.control=t,this.dimlessBinaryPerSecondPipe=a,this.formatter=o,this.ngModelChange=new i.o,this.el=this.elementRef.nativeElement}ngOnInit(){this.setValue(this.el.value),this.ngDataReady&&this.ngDataReady.subscribe(()=>this.setValue(this.el.value))}setValue(e){/^[\d.]+$/.test(e)&&(e+=this.defaultUnit||"m");const t=this.formatter.toBytes(e,0),a=this.round(t);this.el.value=this.dimlessBinaryPerSecondPipe.transform(a),null!==t?(this.ngModelChange.emit(this.el.value),this.control.control.setValue(this.el.value)):(this.ngModelChange.emit(null),this.control.control.setValue(null))}round(e){if(null!==e&&0!==e){if(!n.a.isUndefined(this.minBytes)&&e<this.minBytes)return this.minBytes;if(!n.a.isUndefined(this.maxBytes)&&e>this.maxBytes)return this.maxBytes;if(!n.a.isUndefined(this.roundPower)){const t=Math.round(Math.log(e)/Math.log(this.roundPower));return Math.pow(this.roundPower,t)}}return e}onBlur(e){this.setValue(e)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(o.p),i.Mb(y.a),i.Mb(d.a))},e.\u0275dir=i.Hb({type:e,selectors:[["","cdDimlessBinaryPerSecond",""]],hostBindings:function(e,t){1&e&&i.gc("blur",(function(e){return t.onBlur(e.target.value)}))},inputs:{ngDataReady:"ngDataReady",minBytes:"minBytes",maxBytes:"maxBytes",roundPower:"roundPower",defaultUnit:"defaultUnit"},outputs:{ngModelChange:"ngModelChange"}}),e})(),w=(()=>{class e{constructor(e,t){this.formatter=e,this.ngControl=t}setValue(e){const t=this.formatter.toIops(e);this.ngControl.control.setValue(t+" IOPS")}ngOnInit(){this.setValue(this.ngControl.value),this.ngDataReady&&this.ngDataReady.subscribe(()=>this.setValue(this.ngControl.value))}onUpdate(e){this.setValue(e)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(d.a),i.Mb(o.p))},e.\u0275dir=i.Hb({type:e,selectors:[["","cdIops",""]],hostBindings:function(e,t){1&e&&i.gc("blur",(function(e){return t.onUpdate(e.target.value)}))},inputs:{ngDataReady:"ngDataReady"}}),e})();function _(e,t){if(1&e&&(i.Qb(0),i.Nb(1,"input",19),i.Pb()),2&e){const e=i.ic().$implicit,t=i.ic(2);i.yb(1),i.pc("id",e.name)("name",e.name)("formControlName",e.name)("ngDataReady",t.ngDataReady)}}function k(e,t){if(1&e&&(i.Qb(0),i.Nb(1,"input",20),i.Pb()),2&e){const e=i.ic().$implicit,t=i.ic(2);i.yb(1),i.pc("id",e.name)("name",e.name)("formControlName",e.name)("ngDataReady",t.ngDataReady)}}function M(e,t){if(1&e&&(i.Qb(0),i.Nb(1,"input",21),i.Pb()),2&e){const e=i.ic().$implicit,t=i.ic(2);i.yb(1),i.pc("id",e.name)("name",e.name)("formControlName",e.name)("ngDataReady",t.ngDataReady)}}function N(e,t){1&e&&(i.Sb(0,"span",22),i.Wb(1,23),i.Rb())}const I=function(e){return{active:e}},$=function(e){return[e]};function T(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",10),i.Sb(1,"label",11),i.Oc(2),i.Sb(3,"cd-helper"),i.Oc(4),i.Rb(),i.Rb(),i.Sb(5,"div"),i.Sb(6,"div",12),i.Qb(7,13),i.Mc(8,_,2,4,"ng-container",14),i.Mc(9,k,2,4,"ng-container",14),i.Mc(10,M,2,4,"ng-container",14),i.Pb(),i.Sb(11,"span",15),i.Sb(12,"button",16),i.Yb(13,17),i.gc("click",(function(){i.Dc(e);const a=t.$implicit;return i.ic(2).reset(a.name)})),i.Nb(14,"i",7),i.Rb(),i.Rb(),i.Rb(),i.Mc(15,N,2,0,"span",18),i.Rb(),i.Rb()}if(2&e){const e=t.$implicit,a=i.ic().$implicit,o=i.ic(),s=i.Ac(1);i.yb(1),i.pc("for",e.name),i.yb(1),i.Pc(e.displayName),i.yb(2),i.Pc(e.description),i.yb(1),i.Bb("cd-col-form-input ",a.heading,""),i.yb(2),i.pc("ngSwitch",e.type),i.yb(1),i.pc("ngSwitchCase",o.configurationType.milliseconds),i.yb(1),i.pc("ngSwitchCase",o.configurationType.bps),i.yb(1),i.pc("ngSwitchCase",o.configurationType.iops),i.yb(2),i.pc("ngClass",i.uc(13,I,o.isDisabled(e.name))),i.yb(2),i.pc("ngClass",i.uc(15,$,o.icons.erase)),i.yb(1),i.pc("ngIf",o.form.showError("configuration."+e.name,s,"min"))}}function F(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",4),i.Sb(1,"h4",5),i.Sb(2,"span",6),i.gc("click",(function(){i.Dc(e);const a=t.$implicit;return i.ic().toggleSectionVisibility(a.class)})),i.Oc(3),i.Nb(4,"i",7),i.Rb(),i.Rb(),i.Sb(5,"div",8),i.Mc(6,T,16,17,"div",9),i.Rb(),i.Rb()}if(2&e){const e=t.$implicit,a=i.ic();i.yb(3),i.Qc(" ",e.heading," "),i.yb(1),i.pc("ngClass",a.sectionVisibility[e.class]?a.icons.minusCircle:a.icons.addCircle),i.yb(1),i.Ab(e.class),i.pc("hidden",!a.sectionVisibility[e.class]),i.yb(1),i.pc("ngForOf",e.options)}}let P=(()=>{class e{constructor(e,t){this.formatterService=e,this.rbdConfigurationService=t,this.initializeData=new r.a(1),this.changes=new i.o,this.icons=c.a,this.ngDataReady=new i.o,this.configurationType=b.b,this.sectionVisibility={}}ngOnInit(){const e=this.createConfigurationFormGroup();this.form.addControl("configuration",e),e.valueChanges.subscribe(()=>{this.changes.emit(this.getDirtyValues.bind(this))}),this.initializeData&&this.initializeData.subscribe(e=>{this.initialData=e.initialData;const t=e.sourceType;this.rbdConfigurationService.getWritableOptionFields().forEach(a=>{const i=e.initialData.filter(e=>e.name===a.name).pop();i&&i.source===t&&this.form.get("configuration."+a.name).setValue(i.value)}),this.ngDataReady.emit()}),this.rbdConfigurationService.getWritableSections().forEach(e=>this.sectionVisibility[e.class]=!1)}getDirtyValues(e=!1,t){if(e&&!t)throw new Error("ProgrammingError: If local values shall be included, a proper localFieldType argument has to be provided, too");const a={};return this.rbdConfigurationService.getWritableOptionFields().forEach(i=>{const o=this.form.get("configuration").get(i.name);this.initialData&&this.initialData[i.name]===o.value||(o.dirty||e&&o.source===t)&&(a[i.name]=null===o.value?o.value:i.type===b.b.bps?this.formatterService.toBytes(o.value):i.type===b.b.milliseconds?this.formatterService.toMilliseconds(o.value):i.type===b.b.iops?this.formatterService.toIops(o.value):o.value)}),a}createConfigurationFormGroup(){const e=new l.a({});return this.rbdConfigurationService.getWritableOptionFields().forEach(t=>{let a;if(t.type!==b.b.milliseconds&&t.type!==b.b.iops&&t.type!==b.b.bps)throw new Error(`Type ${t.type} is unknown, you may need to add it to RbdConfiguration class`);{let e=0;n.a.forEach(this.initialData,a=>{a.name===t.name&&(e=a.value)}),a=new o.h(e,o.A.min(0))}e.addControl(t.name,a)}),e}reset(e){const t=this.form.get("configuration").get(e);t.disabled?(t.setValue(t.previousValue||0),t.enable(),t.previousValue||t.markAsPristine()):(t.previousValue=t.value,t.setValue(null),t.markAsDirty(),t.disable())}isDisabled(e){return this.form.get("configuration").get(e).disabled}toggleSectionVisibility(e){this.sectionVisibility[e]=!this.sectionVisibility[e]}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(d.a),i.Mb(p.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-rbd-configuration-form"]],inputs:{form:"form",initializeData:"initializeData"},outputs:{changes:"changes"},decls:5,vars:2,consts:function(){return[[3,"formGroup"],["cfgFormGroup",""],"RBD Configuration",["class","col-12",4,"ngFor","ngForOf"],[1,"col-12"],[1,"cd-header"],[1,"collapsible",3,"click"],["aria-hidden","true",3,"ngClass"],[3,"hidden"],["class","form-group row",4,"ngFor","ngForOf"],[1,"form-group","row"],[1,"cd-col-form-label",3,"for"],[1,"input-group"],[3,"ngSwitch"],[4,"ngSwitchCase"],[1,"input-group-append"],["type","button","data-toggle","button",1,"btn","btn-light",3,"ngClass","click",6,"title"],["title","Remove the local configuration value. The parent configuration value will be inherited and used instead."],["class","invalid-feedback",4,"ngIf"],["type","text","cdMilliseconds","",1,"form-control",3,"id","name","formControlName","ngDataReady"],["type","text","defaultUnit","b","cdDimlessBinaryPerSecond","",1,"form-control",3,"id","name","formControlName","ngDataReady"],["type","text","cdIops","",1,"form-control",3,"id","name","formControlName","ngDataReady"],[1,"invalid-feedback"],"The minimum value is 0"]},template:function(e,t){1&e&&(i.Sb(0,"fieldset",0,1),i.Sb(2,"legend"),i.Wb(3,2),i.Rb(),i.Mc(4,F,7,7,"div",3),i.Rb()),2&e&&(i.pc("formGroup",t.form.get("configuration")),i.yb(4),i.pc("ngForOf",t.rbdConfigurationService.sections))},directives:[o.r,o.k,m.a,u.q,u.p,f.a,h.a,u.t,u.u,g.a,u.r,o.d,S.a,v,o.q,o.i,R,w],styles:[".collapsible[_ngcontent-%COMP%]{cursor:pointer;user-select:none}"]}),e})()}}]);
\ No newline at end of file
--- /dev/null
+(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{aAWM:function(e,t,a){"use strict";a.d(t,"a",(function(){return M}));var i=a("uIqm"),o=a("PhyI"),s=a("8Y7J");let n=(()=>{class e{transform(e){return{0:"global",1:"pool",2:"image"}[e]}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=s.Lb({name:"rbdConfigurationSource",type:e,pure:!0}),e})();var r=a("aXbf"),c=a("o8EM"),l=a("SVse"),b=a("IzCI"),d=a("dEH0"),p=a("BQkM");const m=["configurationSourceTpl"],u=["configurationValueTpl"],f=["poolConfTable"];function h(e,t){1&e&&(s.Sb(0,"span"),s.Wb(1,6),s.Rb())}function g(e,t){1&e&&(s.Sb(0,"strong"),s.Wb(1,7),s.Rb())}function S(e,t){1&e&&(s.Sb(0,"strong"),s.Wb(1,8),s.Rb())}function v(e,t){1&e&&(s.Sb(0,"div",4),s.Mc(1,h,2,0,"span",5),s.Mc(2,g,2,0,"strong",5),s.Mc(3,S,2,0,"strong",5),s.Rb()),2&e&&(s.pc("ngSwitch",t.value),s.yb(1),s.pc("ngSwitchCase","global"),s.yb(1),s.pc("ngSwitchCase","image"),s.yb(1),s.pc("ngSwitchCase","pool"))}function y(e,t){if(1&e&&(s.Sb(0,"span"),s.Oc(1),s.jc(2,"dimlessBinaryPerSecond"),s.Rb()),2&e){const e=s.ic().value;s.yb(1),s.Pc(s.kc(2,1,e))}}function R(e,t){if(1&e&&(s.Sb(0,"span"),s.Oc(1),s.jc(2,"milliseconds"),s.Rb()),2&e){const e=s.ic().value;s.yb(1),s.Pc(s.kc(2,1,e))}}function w(e,t){if(1&e&&(s.Sb(0,"span"),s.Oc(1),s.jc(2,"iops"),s.Rb()),2&e){const e=s.ic().value;s.yb(1),s.Pc(s.kc(2,1,e))}}function _(e,t){if(1&e&&(s.Sb(0,"span"),s.Oc(1),s.Rb()),2&e){const e=s.ic().value;s.yb(1),s.Pc(e)}}function k(e,t){if(1&e&&(s.Sb(0,"div",4),s.Mc(1,y,3,3,"span",5),s.Mc(2,R,3,3,"span",5),s.Mc(3,w,3,3,"span",5),s.Mc(4,_,2,1,"span",9),s.Rb()),2&e){const e=t.row,a=s.ic();s.pc("ngSwitch",e.type),s.yb(1),s.pc("ngSwitchCase",a.typeField.bps),s.yb(1),s.pc("ngSwitchCase",a.typeField.milliseconds),s.yb(1),s.pc("ngSwitchCase",a.typeField.iops)}}let M=(()=>{class e{constructor(e,t){this.formatterService=e,this.rbdConfigurationService=t,this.sourceField=o.a,this.typeField=o.b}ngOnInit(){this.poolConfigurationColumns=[{prop:"displayName",name:"Name"},{prop:"description",name:"Description"},{prop:"name",name:"Key"},{prop:"source",name:"Source",cellTemplate:this.configurationSourceTpl,pipe:new n},{prop:"value",name:"Value",cellTemplate:this.configurationValueTpl}]}ngOnChanges(){this.data&&(this.data=this.data.filter(e=>this.rbdConfigurationService.getOptionFields().map(e=>e.name).includes(e.name)))}}return e.\u0275fac=function(t){return new(t||e)(s.Mb(r.a),s.Mb(c.a))},e.\u0275cmp=s.Gb({type:e,selectors:[["cd-rbd-configuration-table"]],viewQuery:function(e,t){var a;1&e&&(s.Jc(m,!0),s.Jc(u,!0),s.Jc(f,!0)),2&e&&(s.zc(a=s.hc())&&(t.configurationSourceTpl=a.first),s.zc(a=s.hc())&&(t.configurationValueTpl=a.first),s.zc(a=s.hc())&&(t.poolConfTable=a.first))},inputs:{data:"data"},features:[s.wb],decls:6,vars:2,consts:function(){return[["identifier","name",3,"data","columns"],["poolConfTable",""],["configurationSourceTpl",""],["configurationValueTpl",""],[3,"ngSwitch"],[4,"ngSwitchCase"],"Global","Image","Pool",[4,"ngSwitchDefault"]]},template:function(e,t){1&e&&(s.Nb(0,"cd-table",0,1),s.Mc(2,v,4,4,"ng-template",null,2,s.Nc),s.Mc(4,k,5,4,"ng-template",null,3,s.Nc)),2&e&&s.pc("data",t.data)("columns",t.poolConfigurationColumns)},directives:[i.a,l.t,l.u,l.v],pipes:[b.a,d.a,p.a],styles:[""]}),e})()},"k/xb":function(e,t,a){"use strict";a.r(t),a.d(t,"BlockModule",(function(){return pn})),a.d(t,"RoutedBlockModule",(function(){return un}));var i=a("SVse"),o=a("s7LF"),s=a("iInd"),n=a("ohO+"),r=a("G0yt"),c=a("zWsK"),l=a("sne2"),b=a("Vhfg"),d=a("PCNd"),p=a("LvDl"),m=a.n(p),u=a("cp0P"),f=a("mrSG"),h=a("IheW"),g=a("xTzq"),S=a("8Y7J");let v=(()=>{let e=class{constructor(e){this.http=e}listTargets(){return this.http.get("api/iscsi/target")}getTarget(e){return this.http.get("api/iscsi/target/"+e)}updateTarget(e,t){return this.http.put("api/iscsi/target/"+e,t,{observe:"response"})}status(){return this.http.get("ui-api/iscsi/status")}settings(){return this.http.get("ui-api/iscsi/settings")}version(){return this.http.get("ui-api/iscsi/version")}portals(){return this.http.get("ui-api/iscsi/portals")}createTarget(e){return this.http.post("api/iscsi/target",e,{observe:"response"})}deleteTarget(e){return this.http.delete("api/iscsi/target/"+e,{observe:"response"})}getDiscovery(){return this.http.get("api/iscsi/discoveryauth")}updateDiscovery(e){return this.http.put("api/iscsi/discoveryauth",e)}overview(){return this.http.get("ui-api/iscsi/overview")}};return e.\u0275fac=function(t){return new(t||e)(S.dc(h.b))},e.\u0275prov=S.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e=Object(f.b)([g.a,Object(f.d)("design:paramtypes",[h.b])],e),e})();var y=a("lJxs"),R=a("jVDg"),w=a("o8EM");let _=(()=>{let e=class{constructor(e,t){this.http=e,this.rbdConfigurationService=t}isRBDPool(e){return-1!==m.a.indexOf(e.application_metadata,"rbd")&&!e.pool_name.includes("/")}create(e){return this.http.post("api/block/image",e,{observe:"response"})}delete(e){return this.http.delete("api/block/image/"+e.toStringEncoded(),{observe:"response"})}update(e,t){return this.http.put("api/block/image/"+e.toStringEncoded(),t,{observe:"response"})}get(e){return this.http.get("api/block/image/"+e.toStringEncoded())}list(){return this.http.get("api/block/image").pipe(Object(y.a)(e=>e.map(e=>(e.value.map(e=>e.configuration?(e.configuration.map(e=>Object.assign(e,this.rbdConfigurationService.getOptionByName(e.name))),e):e),e))))}copy(e,t){return this.http.post(`api/block/image/${e.toStringEncoded()}/copy`,t,{observe:"response"})}flatten(e){return this.http.post(`api/block/image/${e.toStringEncoded()}/flatten`,null,{observe:"response"})}defaultFeatures(){return this.http.get("api/block/image/default_features")}cloneFormatVersion(){return this.http.get("api/block/image/clone_format_version")}createSnapshot(e,t){const a={snapshot_name:t};return this.http.post(`api/block/image/${e.toStringEncoded()}/snap`,a,{observe:"response"})}renameSnapshot(e,t,a){const i={new_snap_name:a};return this.http.put(`api/block/image/${e.toStringEncoded()}/snap/${t}`,i,{observe:"response"})}protectSnapshot(e,t,a){const i={is_protected:a};return this.http.put(`api/block/image/${e.toStringEncoded()}/snap/${t}`,i,{observe:"response"})}rollbackSnapshot(e,t){return this.http.post(`api/block/image/${e.toStringEncoded()}/snap/${t}/rollback`,null,{observe:"response"})}cloneSnapshot(e,t,a){return this.http.post(`api/block/image/${e.toStringEncoded()}/snap/${t}/clone`,a,{observe:"response"})}deleteSnapshot(e,t){return this.http.delete(`api/block/image/${e.toStringEncoded()}/snap/${t}`,{observe:"response"})}listTrash(){return this.http.get("api/block/image/trash/")}createNamespace(e,t){return this.http.post(`api/block/pool/${e}/namespace`,{namespace:t},{observe:"response"})}listNamespaces(e){return this.http.get(`api/block/pool/${e}/namespace/`)}deleteNamespace(e,t){return this.http.delete(`api/block/pool/${e}/namespace/${t}`,{observe:"response"})}moveTrash(e,t){return this.http.post(`api/block/image/${e.toStringEncoded()}/move_trash`,{delay:t},{observe:"response"})}purgeTrash(e){return this.http.post("api/block/image/trash/purge/?pool_name="+e,null,{observe:"response"})}restoreTrash(e,t){return this.http.post(`api/block/image/trash/${e.toStringEncoded()}/restore`,{new_image_name:t},{observe:"response"})}removeTrash(e,t=!1){return this.http.delete(`api/block/image/trash/${e.toStringEncoded()}/?force=${t}`,{observe:"response"})}};return e.\u0275fac=function(t){return new(t||e)(S.dc(h.b),S.dc(w.a))},e.\u0275prov=S.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),Object(f.b)([Object(f.e)(1,g.b),Object(f.d)("design:type",Function),Object(f.d)("design:paramtypes",[R.a,String]),Object(f.d)("design:returntype",void 0)],e.prototype,"createSnapshot",null),Object(f.b)([Object(f.e)(2,g.b),Object(f.d)("design:type",Function),Object(f.d)("design:paramtypes",[R.a,String,String]),Object(f.d)("design:returntype",void 0)],e.prototype,"renameSnapshot",null),Object(f.b)([Object(f.e)(2,g.b),Object(f.d)("design:type",Function),Object(f.d)("design:paramtypes",[R.a,String,Boolean]),Object(f.d)("design:returntype",void 0)],e.prototype,"protectSnapshot",null),Object(f.b)([Object(f.e)(1,g.b),Object(f.d)("design:type",Function),Object(f.d)("design:paramtypes",[R.a,String]),Object(f.d)("design:returntype",void 0)],e.prototype,"restoreTrash",null),e=Object(f.b)([g.a,Object(f.d)("design:paramtypes",[h.b,w.a])],e),e})();var k=a("DNAf"),M=a("a96k"),N=a("oxzT"),I=a("spCT"),$=a("QFaf"),T=a("1Ni5"),F=a("kvvV"),P=a("JK/P"),z=a("kn/O"),E=a("ajRT"),C=a("NwgZ"),D=a("ocLN"),O=a("ANnk"),A=a("f69J"),x=a("6+kj");function V(e,t){if(1&e&&(S.Sb(0,"option",6),S.Oc(1),S.Rb()),2&e){const e=t.$implicit;S.pc("ngValue",e),S.yb(1),S.Pc(e)}}function W(e,t){if(1&e&&(S.Sb(0,"select",5),S.Nb(1,"option",6),S.Mc(2,V,2,2,"option",7),S.Rb()),2&e){const e=S.ic();S.qc("id",e.setting),S.qc("name",e.setting),S.pc("formControlName",e.setting),S.yb(1),S.pc("ngValue",null),S.yb(1),S.pc("ngForOf",e.limits.values)}}function q(e,t){if(1&e&&S.Nb(0,"input",10),2&e){const e=S.ic(2);S.pc("formControlName",e.setting)}}function B(e,t){if(1&e&&S.Nb(0,"input",11),2&e){const e=S.ic(2);S.pc("formControlName",e.setting)}}function G(e,t){if(1&e&&(S.Qb(0),S.Nb(1,"br"),S.Sb(2,"div",12),S.Nb(3,"input",13),S.Sb(4,"label",14),S.Oc(5,"Yes"),S.Rb(),S.Rb(),S.Sb(6,"div",12),S.Nb(7,"input",13),S.Sb(8,"label",14),S.Oc(9,"No"),S.Rb(),S.Rb(),S.Pb()),2&e){const e=S.ic(2);S.yb(3),S.pc("id",e.setting+"True")("value",!0)("formControlName",e.setting),S.yb(1),S.pc("for",e.setting+"True"),S.yb(3),S.pc("id",e.setting+"False")("value",!1)("formControlName",e.setting),S.yb(1),S.pc("for",e.setting+"False")}}function L(e,t){if(1&e&&(S.Sb(0,"span"),S.Mc(1,q,1,1,"input",8),S.Mc(2,B,1,1,"input",9),S.Mc(3,G,10,8,"ng-container",3),S.Rb()),2&e){const e=S.ic();S.yb(1),S.pc("ngIf","int"===e.limits.type),S.yb(1),S.pc("ngIf","str"===e.limits.type),S.yb(1),S.pc("ngIf","bool"===e.limits.type)}}function j(e,t){if(1&e&&(S.Sb(0,"span",15),S.Qb(1),S.Wb(2,16),S.Pb(),S.Rb()),2&e){const e=S.ic();S.yb(2),S.ac(e.limits.min),S.Xb(2)}}function Q(e,t){if(1&e&&(S.Sb(0,"span",15),S.Qb(1),S.Wb(2,17),S.Pb(),S.Rb()),2&e){const e=S.ic();S.yb(2),S.ac(e.limits.max),S.Xb(2)}}let U=(()=>{class e{ngOnInit(){const e=[];"min"in this.limits&&e.push(o.A.min(this.limits.min)),"max"in this.limits&&e.push(o.A.max(this.limits.max)),this.settingsForm.get(this.setting).setValidators(e)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-iscsi-setting"]],inputs:{settingsForm:"settingsForm",formDir:"formDir",setting:"setting",limits:"limits"},decls:7,vars:7,consts:function(){return[[1,"form-group",3,"formGroup"],[1,"col-form-label",3,"for"],["class","form-control custom-select",3,"id","name","formControlName",4,"ngIf"],[4,"ngIf"],["class","invalid-feedback",4,"ngIf"],[1,"form-control","custom-select",3,"id","name","formControlName"],[3,"ngValue"],[3,"ngValue",4,"ngFor","ngForOf"],["type","number","class","form-control",3,"formControlName",4,"ngIf"],["type","text","class","form-control",3,"formControlName",4,"ngIf"],["type","number",1,"form-control",3,"formControlName"],["type","text",1,"form-control",3,"formControlName"],[1,"custom-control","custom-radio","custom-control-inline"],["type","radio",1,"custom-control-input",3,"id","value","formControlName"],[1,"custom-control-label",3,"for"],[1,"invalid-feedback"],"Must be greater than or equal to " + "\ufffd0\ufffd" + ".","Must be less than or equal to " + "\ufffd0\ufffd" + "."]},template:function(e,t){1&e&&(S.Sb(0,"div",0),S.Sb(1,"label",1),S.Oc(2),S.Rb(),S.Mc(3,W,3,5,"select",2),S.Mc(4,L,4,3,"span",3),S.Mc(5,j,3,1,"span",4),S.Mc(6,Q,3,1,"span",4),S.Rb()),2&e&&(S.pc("formGroup",t.settingsForm),S.yb(1),S.qc("for",t.setting),S.yb(1),S.Pc(t.setting),S.yb(1),S.pc("ngIf","enum"===t.limits.type),S.yb(1),S.pc("ngIf","enum"!==t.limits.type),S.yb(1),S.pc("ngIf",t.settingsForm.showError(t.setting,t.formDir,"min")),S.yb(1),S.pc("ngIf",t.settingsForm.showError(t.setting,t.formDir,"max")))},directives:[D.a,o.r,o.k,C.a,i.r,O.a,o.z,A.a,o.q,o.i,o.u,o.B,i.q,o.v,o.d,o.w],styles:[""]}),e})();var Y=a("uYzU");function K(e,t){1&e&&(S.Sb(0,"span",29),S.Wb(1,30),S.Rb())}function J(e,t){if(1&e&&(S.Sb(0,"span"),S.Sb(1,"legend",10),S.Wb(2,21),S.Rb(),S.Sb(3,"div",12),S.Sb(4,"div",13),S.Sb(5,"label",22),S.Wb(6,23),S.Rb(),S.Nb(7,"input",24),S.Mc(8,K,2,0,"span",25),S.Rb(),S.Rb(),S.Sb(9,"div",12),S.Sb(10,"div",13),S.Sb(11,"label",26),S.Wb(12,27),S.Rb(),S.Nb(13,"input",28),S.Rb(),S.Rb(),S.Rb()),2&e){const e=S.ic(),t=S.Ac(9);S.yb(8),S.pc("ngIf",e.settingsForm.showError("lun",t,"required"))}}function X(e,t){if(1&e&&(S.Sb(0,"option",31),S.Oc(1),S.jc(2,"iscsiBackstore"),S.Rb()),2&e){const e=t.$implicit;S.pc("value",e),S.yb(1),S.Pc(S.kc(2,2,e))}}function H(e,t){if(1&e&&(S.Sb(0,"div",12),S.Sb(1,"div",13),S.Nb(2,"cd-iscsi-setting",33),S.Rb(),S.Rb()),2&e){const e=t.$implicit,a=S.ic(2).$implicit,i=S.ic(),o=S.Ac(9);S.yb(2),S.pc("settingsForm",i.settingsForm)("formDir",o)("setting",e.key)("limits",i.getDiskControlLimits(a,e.key))}}function Z(e,t){if(1&e&&(S.Qb(0),S.Mc(1,H,3,4,"div",32),S.jc(2,"keyvalue"),S.Pb()),2&e){const e=S.ic().$implicit,t=S.ic();S.yb(1),S.pc("ngForOf",S.kc(2,1,t.disk_default_controls[e]))}}function ee(e,t){if(1&e&&(S.Qb(0),S.Mc(1,Z,3,3,"ng-container",9),S.Pb()),2&e){const e=t.$implicit,a=S.ic();S.yb(1),S.pc("ngIf",a.settingsForm.value.backstore===e)}}let te=(()=>{class e{constructor(e,t,a){this.activeModal=e,this.iscsiService=t,this.actionLabels=a}ngOnInit(){const e={backstore:new o.h(this.imagesSettings[this.image].backstore),lun:new o.h(this.imagesSettings[this.image].lun),wwn:new o.h(this.imagesSettings[this.image].wwn)};m.a.forEach(this.backstores,t=>{const a=this.imagesSettings[this.image][t]||{};m.a.forIn(this.disk_default_controls[t],(t,i)=>{e[i]=new o.h(a[i])})}),this.settingsForm=new $.a(e)}getDiskControlLimits(e,t){return this.disk_controls_limits?this.disk_controls_limits[e][t]:{type:"int"}}save(){const e=this.settingsForm.controls.backstore.value,t=this.settingsForm.controls.lun.value,a=this.settingsForm.controls.wwn.value,i={};m.a.forIn(this.settingsForm.controls,(t,a)=>{""!==t.value&&null!==t.value&&a in this.disk_default_controls[this.settingsForm.value.backstore]&&(i[a]=t.value,m.a.forEach(this.backstores,i=>{i!==e&&a in(this.imagesSettings[this.image][i]||{})&&(this.imagesSettings[this.image][i][a]=t.value)}))}),this.imagesSettings[this.image].backstore=e,this.imagesSettings[this.image].lun=t,this.imagesSettings[this.image].wwn=a,this.imagesSettings[this.image][e]=i,this.imagesSettings=Object.assign({},this.imagesSettings),this.control.updateValueAndValidity({emitEvent:!1}),this.activeModal.close()}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(r.a),S.Mb(v),S.Mb(l.b))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-iscsi-target-image-settings-modal"]],decls:25,vars:8,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"Configure",[1,"modal-content"],["name","settingsForm","novalidate","",1,"form",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],[1,"alert-warning"],"Changing these parameters from their default values is usually not necessary.",[4,"ngIf"],[1,"cd-header"],"Settings",[1,"form-group","row"],[1,"col-sm-12"],[1,"col-form-label"],"Backstore",["id","backstore","name","backstore","formControlName","backstore",1,"form-control","custom-select"],[3,"value",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],"Identifier",["for","lun",1,"col-form-label","required"],"lun",["type","number","id","lun","name","lun","formControlName","lun",1,"form-control"],["class","invalid-feedback",4,"ngIf"],["for","wwn",1,"col-form-label"],"wwn",["type","text","id","wwn","name","wwn","formControlName","wwn",1,"form-control"],[1,"invalid-feedback"],"This field is required.",[3,"value"],["class","form-group row",4,"ngFor","ngForOf"],[3,"settingsForm","formDir","setting","limits"]]},template:function(e,t){1&e&&(S.Sb(0,"cd-modal",0),S.Qb(1,1),S.Qb(2),S.Wb(3,2),S.Pb(),S.Oc(4,"\xa0 "),S.Sb(5,"small"),S.Oc(6),S.Rb(),S.Pb(),S.Qb(7,3),S.Sb(8,"form",4,5),S.Sb(10,"div",6),S.Sb(11,"p",7),S.Wb(12,8),S.Rb(),S.Mc(13,J,14,1,"span",9),S.Sb(14,"legend",10),S.Wb(15,11),S.Rb(),S.Sb(16,"div",12),S.Sb(17,"div",13),S.Sb(18,"label",14),S.Wb(19,15),S.Rb(),S.Sb(20,"select",16),S.Mc(21,X,3,4,"option",17),S.Rb(),S.Rb(),S.Rb(),S.Mc(22,ee,2,1,"ng-container",18),S.Rb(),S.Sb(23,"div",19),S.Sb(24,"cd-form-button-panel",20),S.gc("submitActionEvent",(function(){return t.save()})),S.Rb(),S.Rb(),S.Rb(),S.Pb(),S.Rb()),2&e&&(S.pc("modalRef",t.activeModal),S.yb(6),S.Pc(t.image),S.yb(2),S.pc("formGroup",t.settingsForm),S.yb(5),S.pc("ngIf",t.api_version>=1),S.yb(8),S.pc("ngForOf",t.backstores),S.yb(1),S.pc("ngForOf",t.backstores),S.yb(2),S.pc("form",t.settingsForm)("submitText",t.actionLabels.UPDATE))},directives:[E.a,o.C,o.r,o.k,C.a,i.r,D.a,O.a,o.z,A.a,o.q,o.i,i.q,x.a,o.v,o.d,o.u,o.B,U],pipes:[Y.a,i.k],styles:[""]}),e})();function ae(e,t){if(1&e&&(S.Sb(0,"div",12),S.Sb(1,"div",13),S.Nb(2,"cd-iscsi-setting",14),S.Rb(),S.Rb()),2&e){const e=t.$implicit,a=S.ic(),i=S.Ac(5);S.yb(2),S.pc("settingsForm",a.settingsForm)("formDir",i)("setting",e.key)("limits",a.getTargetControlLimits(e.key))}}let ie=(()=>{class e{constructor(e,t,a){this.activeModal=e,this.iscsiService=t,this.actionLabels=a}ngOnInit(){const e={};m.a.forIn(this.target_default_controls,(t,a)=>{e[a]=new o.h(this.target_controls.value[a])}),this.settingsForm=new $.a(e)}save(){const e={};m.a.forIn(this.settingsForm.controls,(t,a)=>{""!==t.value&&null!==t.value&&(e[a]=t.value)}),this.target_controls.setValue(e),this.activeModal.close()}getTargetControlLimits(e){return this.target_controls_limits?this.target_controls_limits[e]:["Yes","No"].includes(this.target_default_controls[e])?{type:"bool"}:{type:"int"}}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(r.a),S.Mb(v),S.Mb(l.b))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-iscsi-target-iqn-settings-modal"]],decls:13,vars:7,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"Advanced Settings",[1,"modal-content"],["name","settingsForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],[1,"alert-warning"],"Changing these parameters from their default values is usually not necessary.",["class","form-group row",4,"ngFor","ngForOf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[1,"form-group","row"],[1,"col-sm-12"],[3,"settingsForm","formDir","setting","limits"]]},template:function(e,t){1&e&&(S.Sb(0,"cd-modal",0),S.Qb(1,1),S.Wb(2,2),S.Pb(),S.Qb(3,3),S.Sb(4,"form",4,5),S.Sb(6,"div",6),S.Sb(7,"p",7),S.Wb(8,8),S.Rb(),S.Mc(9,ae,3,4,"div",9),S.jc(10,"keyvalue"),S.Rb(),S.Sb(11,"div",10),S.Sb(12,"cd-form-button-panel",11),S.gc("submitActionEvent",(function(){return t.save()})),S.Rb(),S.Rb(),S.Rb(),S.Pb(),S.Rb()),2&e&&(S.pc("modalRef",t.activeModal),S.yb(4),S.pc("formGroup",t.settingsForm),S.yb(5),S.pc("ngForOf",S.kc(10,5,t.settingsForm.controls)),S.yb(3),S.pc("form",t.settingsForm)("submitText",t.actionLabels.UPDATE))},directives:[E.a,o.C,o.r,o.k,C.a,i.q,x.a,D.a,U],pipes:[i.k],styles:[""]}),e})();var oe=a("zc8c");let se=(()=>{class e{constructor(e){this.ngControl=e}onInput(e){this.setValue(e)}setValue(e){e=m.a.isString(e)?e.trim():e,this.ngControl.control.setValue(e)}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(o.p))},e.\u0275dir=S.Hb({type:e,selectors:[["","cdTrim",""]],hostBindings:function(e,t){1&e&&S.gc("input",(function(e){return t.onInput(e.target.value)}))}}),e})();var ne=a("wnGv"),re=a("D4zM"),ce=a("cEzo"),le=a("8xTl");function be(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,42),S.Rb())}function de(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,43),S.Rb())}function pe(e,t){1&e&&(S.Sb(0,"span",41),S.Qb(1),S.Wb(2,44),S.Pb(),S.Nb(3,"br"),S.Qb(4),S.Wb(5,45),S.Pb(),S.Nb(6,"br"),S.Sb(7,"a",46),S.Wb(8,47),S.Rb(),S.Rb())}function me(e,t){1&e&&(S.Sb(0,"span",48),S.Wb(1,49),S.Rb())}const ue=function(e){return[e]};function fe(e,t){if(1&e){const e=S.Tb();S.Qb(0),S.Sb(1,"div",50),S.Nb(2,"input",51),S.Sb(3,"span",14),S.Sb(4,"button",52),S.gc("click",(function(){S.Dc(e);const a=t.index,i=t.$implicit;return S.ic(2).removePortal(a,i)})),S.Nb(5,"i",16),S.Rb(),S.Rb(),S.Rb(),S.Pb()}if(2&e){const e=t.$implicit,a=S.ic(2);S.yb(2),S.pc("value",e),S.yb(3),S.pc("ngClass",S.uc(2,ue,a.icons.destroy))}}function he(e,t){if(1&e&&(S.Sb(0,"span",41),S.Wb(1,53),S.Rb()),2&e){const e=S.ic(2);S.yb(1),S.ac(e.minimum_gateways),S.Xb(1)}}function ge(e,t){if(1&e&&(S.Sb(0,"div",56),S.Oc(1),S.Rb()),2&e){const e=S.ic().$implicit,t=S.ic(2);S.yb(1),S.Qc("lun: ",t.imagesSettings[e].lun,"")}}function Se(e,t){if(1&e&&(S.Qb(0),S.Wb(1,57),S.jc(2,"iscsiBackstore"),S.Pb()),2&e){const e=S.ic().$implicit,t=S.ic(2);S.yb(2),S.ac(S.kc(2,1,t.imagesSettings[e].backstore)),S.Xb(1)}}function ve(e,t){1&e&&(S.Qb(0),S.Wb(1,58),S.Pb())}function ye(e,t){if(1&e){const e=S.Tb();S.Qb(0),S.Sb(1,"div",50),S.Nb(2,"input",51),S.Sb(3,"span",14),S.Mc(4,ge,2,1,"div",54),S.Sb(5,"button",52),S.gc("click",(function(){S.Dc(e);const a=t.$implicit;return S.ic(2).imageSettingsModal(a)})),S.Nb(6,"i",16),S.Rb(),S.Sb(7,"button",52),S.gc("click",(function(){S.Dc(e);const a=t.index,i=t.$implicit;return S.ic(2).removeImage(a,i)})),S.Nb(8,"i",16),S.Rb(),S.Rb(),S.Rb(),S.Sb(9,"span",48),S.Mc(10,Se,3,3,"ng-container",55),S.Mc(11,ve,2,0,"ng-container",55),S.Rb(),S.Pb()}if(2&e){const e=t.$implicit,a=S.ic(2);S.yb(2),S.pc("value",e),S.yb(2),S.pc("ngIf",a.api_version>=1),S.yb(2),S.pc("ngClass",S.uc(6,ue,a.icons.deepCheck)),S.yb(2),S.pc("ngClass",S.uc(8,ue,a.icons.destroy)),S.yb(2),S.pc("ngIf",a.backstores.length>1),S.yb(1),S.pc("ngIf",a.hasAdvancedSettings(a.imagesSettings[e][a.imagesSettings[e].backstore]))}}function Re(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,59),S.Rb())}function we(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,60),S.Rb())}function _e(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,78),S.Rb())}function ke(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,79),S.Rb())}function Me(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,80),S.Rb())}function Ne(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,81),S.Rb())}function Ie(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,82),S.Rb())}function $e(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,83),S.Rb())}function Te(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,84),S.Rb())}function Fe(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,85),S.Rb())}function Pe(e,t){if(1&e&&(S.Sb(0,"div",61),S.Sb(1,"div",8),S.Sb(2,"label",62),S.Qb(3),S.Wb(4,63),S.Pb(),S.Rb(),S.Sb(5,"div",11),S.Nb(6,"input",64),S.Mc(7,_e,2,0,"span",17),S.Mc(8,ke,2,0,"span",17),S.Rb(),S.Rb(),S.Sb(9,"div",8),S.Sb(10,"label",65),S.Qb(11),S.Wb(12,66),S.Pb(),S.Rb(),S.Sb(13,"div",11),S.Sb(14,"div",12),S.Nb(15,"input",67),S.Sb(16,"span",14),S.Nb(17,"button",68),S.Nb(18,"cd-copy-2-clipboard-button",69),S.Rb(),S.Rb(),S.Mc(19,Me,2,0,"span",17),S.Mc(20,Ne,2,0,"span",17),S.Rb(),S.Rb(),S.Sb(21,"div",8),S.Sb(22,"label",70),S.Qb(23),S.Wb(24,71),S.Pb(),S.Rb(),S.Sb(25,"div",11),S.Nb(26,"input",72),S.Mc(27,Ie,2,0,"span",17),S.Mc(28,$e,2,0,"span",17),S.Rb(),S.Rb(),S.Sb(29,"div",8),S.Sb(30,"label",73),S.Qb(31),S.Wb(32,74),S.Pb(),S.Rb(),S.Sb(33,"div",11),S.Sb(34,"div",12),S.Nb(35,"input",75),S.Sb(36,"span",14),S.Nb(37,"button",76),S.Nb(38,"cd-copy-2-clipboard-button",77),S.Rb(),S.Rb(),S.Mc(39,Te,2,0,"span",17),S.Mc(40,Fe,2,0,"span",17),S.Rb(),S.Rb(),S.Rb()),2&e){S.ic();const e=S.Ac(2),t=S.ic();S.yb(7),S.pc("ngIf",t.targetForm.showError("user",e,"required")),S.yb(1),S.pc("ngIf",t.targetForm.showError("user",e,"pattern")),S.yb(11),S.pc("ngIf",t.targetForm.showError("password",e,"required")),S.yb(1),S.pc("ngIf",t.targetForm.showError("password",e,"pattern")),S.yb(7),S.pc("ngIf",t.targetForm.showError("mutual_user",e,"required")),S.yb(1),S.pc("ngIf",t.targetForm.showError("mutual_user",e,"pattern")),S.yb(11),S.pc("ngIf",t.targetForm.showError("mutual_password",e,"required")),S.yb(1),S.pc("ngIf",t.targetForm.showError("mutual_password",e,"pattern"))}}function ze(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,115),S.Rb())}function Ee(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,116),S.Rb())}function Ce(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,117),S.Rb())}function De(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,118),S.Rb())}function Oe(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,119),S.Rb())}function Ae(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,120),S.Rb())}function xe(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,121),S.Rb())}function Ve(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,122),S.Rb())}function We(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,123),S.Rb())}function qe(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,124),S.Rb())}function Be(e,t){1&e&&(S.Sb(0,"span",41),S.Wb(1,125),S.Rb())}function Ge(e,t){if(1&e){const e=S.Tb();S.Qb(0),S.Sb(1,"div",50),S.Nb(2,"input",51),S.Sb(3,"span",14),S.Sb(4,"button",52),S.gc("click",(function(){S.Dc(e);const a=t.index,i=t.$implicit,o=S.ic(),s=o.$implicit,n=o.index;return S.ic(3).removeInitiatorImage(s,a,n,i)})),S.Nb(5,"i",16),S.Rb(),S.Rb(),S.Rb(),S.Pb()}if(2&e){const e=t.$implicit,a=S.ic(4);S.yb(2),S.pc("value",e),S.yb(3),S.pc("ngClass",S.uc(2,ue,a.icons.destroy))}}function Le(e,t){1&e&&(S.Sb(0,"span"),S.Wb(1,126),S.Rb())}function je(e,t){if(1&e&&(S.Sb(0,"div",22),S.Sb(1,"div",23),S.Sb(2,"cd-select",127),S.Nb(3,"i",25),S.Qb(4),S.Wb(5,128),S.Pb(),S.Rb(),S.Rb(),S.Rb()),2&e){const e=S.ic(),t=e.$implicit,a=e.index,i=S.ic(3);S.yb(2),S.pc("data",t.getValue("luns"))("options",i.imagesInitiatorSelections[a])("messages",i.messages.initiatorImage),S.yb(1),S.pc("ngClass",S.uc(4,ue,i.icons.add))}}function Qe(e,t){if(1&e){const e=S.Tb();S.Sb(0,"div",92),S.Sb(1,"div",5),S.Qb(2),S.Wb(3,93),S.Pb(),S.Oc(4),S.Sb(5,"button",94),S.gc("click",(function(){S.Dc(e);const a=t.index;return S.ic(3).removeInitiator(a)})),S.Nb(6,"i",25),S.Rb(),S.Rb(),S.Sb(7,"div",7),S.Sb(8,"div",8),S.Sb(9,"label",95),S.Wb(10,96),S.Rb(),S.Sb(11,"div",11),S.Sb(12,"input",97),S.gc("blur",(function(){return S.Dc(e),S.ic(3).updatedInitiatorSelector()})),S.Rb(),S.Mc(13,ze,2,0,"span",17),S.Mc(14,Ee,2,0,"span",17),S.Mc(15,Ce,2,0,"span",17),S.Rb(),S.Rb(),S.Qb(16,61),S.Sb(17,"div",8),S.Sb(18,"label",98),S.Wb(19,99),S.Rb(),S.Sb(20,"div",11),S.Nb(21,"input",100),S.Mc(22,De,2,0,"span",17),S.Mc(23,Oe,2,0,"span",17),S.Rb(),S.Rb(),S.Sb(24,"div",8),S.Sb(25,"label",101),S.Wb(26,102),S.Rb(),S.Sb(27,"div",11),S.Sb(28,"div",12),S.Nb(29,"input",103),S.Sb(30,"span",14),S.Nb(31,"button",104),S.Nb(32,"cd-copy-2-clipboard-button",105),S.Rb(),S.Rb(),S.Mc(33,Ae,2,0,"span",17),S.Mc(34,xe,2,0,"span",17),S.Rb(),S.Rb(),S.Sb(35,"div",8),S.Sb(36,"label",106),S.Qb(37),S.Wb(38,107),S.Pb(),S.Rb(),S.Sb(39,"div",11),S.Nb(40,"input",108),S.Mc(41,Ve,2,0,"span",17),S.Mc(42,We,2,0,"span",17),S.Rb(),S.Rb(),S.Sb(43,"div",8),S.Sb(44,"label",109),S.Wb(45,110),S.Rb(),S.Sb(46,"div",11),S.Sb(47,"div",12),S.Nb(48,"input",111),S.Sb(49,"span",14),S.Nb(50,"button",104),S.Nb(51,"cd-copy-2-clipboard-button",105),S.Rb(),S.Rb(),S.Mc(52,qe,2,0,"span",17),S.Mc(53,Be,2,0,"span",17),S.Rb(),S.Rb(),S.Pb(),S.Sb(54,"div",8),S.Sb(55,"label",112),S.Wb(56,113),S.Rb(),S.Sb(57,"div",11),S.Mc(58,Ge,6,4,"ng-container",21),S.Mc(59,Le,2,0,"span",55),S.Mc(60,je,6,6,"div",114),S.Rb(),S.Rb(),S.Rb(),S.Rb()}if(2&e){const e=t.$implicit,a=t.index;S.ic(2);const i=S.Ac(2),o=S.ic();S.pc("formGroupName",a),S.yb(4),S.Qc(": ",e.getValue("client_iqn")," "),S.yb(2),S.pc("ngClass",S.uc(25,ue,o.icons.destroy)),S.yb(7),S.pc("ngIf",e.showError("client_iqn",i,"notUnique")),S.yb(1),S.pc("ngIf",e.showError("client_iqn",i,"required")),S.yb(1),S.pc("ngIf",e.showError("client_iqn",i,"pattern")),S.yb(6),S.pc("id","user"+a),S.yb(1),S.pc("ngIf",e.showError("user",i,"required")),S.yb(1),S.pc("ngIf",e.showError("user",i,"pattern")),S.yb(6),S.pc("id","password"+a),S.yb(2),S.pc("cdPasswordButton","password"+a),S.yb(1),S.pc("source","password"+a),S.yb(1),S.pc("ngIf",e.showError("password",i,"required")),S.yb(1),S.pc("ngIf",e.showError("password",i,"pattern")),S.yb(6),S.pc("id","mutual_user"+a),S.yb(1),S.pc("ngIf",e.showError("mutual_user",i,"required")),S.yb(1),S.pc("ngIf",e.showError("mutual_user",i,"pattern")),S.yb(6),S.pc("id","mutual_password"+a),S.yb(2),S.pc("cdPasswordButton","mutual_password"+a),S.yb(1),S.pc("source","mutual_password"+a),S.yb(1),S.pc("ngIf",e.showError("mutual_password",i,"required")),S.yb(1),S.pc("ngIf",e.showError("mutual_password",i,"pattern")),S.yb(5),S.pc("ngForOf",e.getValue("luns")),S.yb(1),S.pc("ngIf",e.getValue("cdIsInGroup")),S.yb(1),S.pc("ngIf",!e.getValue("cdIsInGroup"))}}function Ue(e,t){1&e&&(S.Sb(0,"span",48),S.Wb(1,129),S.Rb())}function Ye(e,t){if(1&e){const e=S.Tb();S.Sb(0,"div",8),S.Sb(1,"label",86),S.Wb(2,87),S.Rb(),S.Sb(3,"div",88),S.Mc(4,Qe,61,27,"div",89),S.Sb(5,"div",22),S.Sb(6,"div",23),S.Mc(7,Ue,2,0,"span",18),S.Sb(8,"button",90),S.gc("click",(function(){return S.Dc(e),S.ic(2).addInitiator(),!1})),S.Nb(9,"i",25),S.Qb(10),S.Wb(11,91),S.Pb(),S.Rb(),S.Rb(),S.Rb(),S.Nb(12,"hr"),S.Rb(),S.Rb()}if(2&e){const e=S.ic(2);S.yb(4),S.pc("ngForOf",e.initiators.controls),S.yb(3),S.pc("ngIf",0===e.initiators.controls.length),S.yb(2),S.pc("ngClass",S.uc(3,ue,e.icons.add))}}function Ke(e,t){if(1&e){const e=S.Tb();S.Qb(0),S.Sb(1,"div",50),S.Nb(2,"input",51),S.Sb(3,"span",14),S.Sb(4,"button",52),S.gc("click",(function(){S.Dc(e);const a=t.index,i=S.ic(),o=i.$implicit,s=i.index;return S.ic(3).removeGroupInitiator(o,a,s)})),S.Nb(5,"i",16),S.Rb(),S.Rb(),S.Rb(),S.Pb()}if(2&e){const e=t.$implicit,a=S.ic(4);S.yb(2),S.pc("value",e),S.yb(3),S.pc("ngClass",S.uc(2,ue,a.icons.destroy))}}function Je(e,t){if(1&e){const e=S.Tb();S.Qb(0),S.Sb(1,"div",50),S.Nb(2,"input",51),S.Sb(3,"span",14),S.Sb(4,"button",52),S.gc("click",(function(){S.Dc(e);const a=t.index,i=S.ic(),o=i.$implicit,s=i.index;return S.ic(3).removeGroupDisk(o,a,s)})),S.Nb(5,"i",16),S.Rb(),S.Rb(),S.Rb(),S.Pb()}if(2&e){const e=t.$implicit,a=S.ic(4);S.yb(2),S.pc("value",e),S.yb(3),S.pc("ngClass",S.uc(2,ue,a.icons.destroy))}}function Xe(e,t){if(1&e){const e=S.Tb();S.Sb(0,"div",92),S.Sb(1,"div",5),S.Qb(2),S.Wb(3,133),S.Pb(),S.Oc(4),S.Sb(5,"button",94),S.gc("click",(function(){S.Dc(e);const a=t.index;return S.ic(3).removeGroup(a)})),S.Nb(6,"i",25),S.Rb(),S.Rb(),S.Sb(7,"div",7),S.Sb(8,"div",8),S.Sb(9,"label",134),S.Wb(10,135),S.Rb(),S.Sb(11,"div",11),S.Nb(12,"input",136),S.Rb(),S.Rb(),S.Sb(13,"div",8),S.Sb(14,"label",137),S.Qb(15),S.Wb(16,138),S.Pb(),S.Rb(),S.Sb(17,"div",11),S.Mc(18,Ke,6,4,"ng-container",21),S.Sb(19,"div",22),S.Sb(20,"div",23),S.Sb(21,"cd-select",24),S.gc("selection",(function(a){S.Dc(e);const i=t.index;return S.ic(3).onGroupMemberSelection(a,i)})),S.Nb(22,"i",25),S.Qb(23),S.Wb(24,139),S.Pb(),S.Rb(),S.Rb(),S.Rb(),S.Nb(25,"hr"),S.Rb(),S.Rb(),S.Sb(26,"div",8),S.Sb(27,"label",28),S.Qb(28),S.Wb(29,140),S.Pb(),S.Rb(),S.Sb(30,"div",11),S.Mc(31,Je,6,4,"ng-container",21),S.Sb(32,"div",22),S.Sb(33,"div",23),S.Sb(34,"cd-select",127),S.Nb(35,"i",25),S.Qb(36),S.Wb(37,141),S.Pb(),S.Rb(),S.Rb(),S.Rb(),S.Nb(38,"hr"),S.Rb(),S.Rb(),S.Rb(),S.Rb()}if(2&e){const e=t.$implicit,a=t.index,i=S.ic(3);S.pc("formGroupName",a),S.yb(4),S.Qc(": ",e.getValue("group_id")," "),S.yb(2),S.pc("ngClass",S.uc(13,ue,i.icons.destroy)),S.yb(12),S.pc("ngForOf",e.getValue("members")),S.yb(3),S.pc("data",e.getValue("members"))("options",i.groupMembersSelections[a])("messages",i.messages.groupInitiator),S.yb(1),S.pc("ngClass",S.uc(15,ue,i.icons.add)),S.yb(9),S.pc("ngForOf",e.getValue("disks")),S.yb(3),S.pc("data",e.getValue("disks"))("options",i.groupDiskSelections[a])("messages",i.messages.initiatorImage),S.yb(1),S.pc("ngClass",S.uc(17,ue,i.icons.add))}}function He(e,t){1&e&&(S.Sb(0,"span",48),S.Wb(1,142),S.Rb())}function Ze(e,t){if(1&e){const e=S.Tb();S.Sb(0,"div",8),S.Sb(1,"label",86),S.Wb(2,130),S.Rb(),S.Sb(3,"div",131),S.Mc(4,Xe,39,19,"div",89),S.Sb(5,"div",22),S.Sb(6,"div",23),S.Mc(7,He,2,0,"span",18),S.Sb(8,"button",90),S.gc("click",(function(){return S.Dc(e),S.ic(2).addGroup(),!1})),S.Nb(9,"i",25),S.Qb(10),S.Wb(11,132),S.Pb(),S.Rb(),S.Rb(),S.Rb(),S.Rb(),S.Rb()}if(2&e){const e=S.ic(2);S.yb(4),S.pc("ngForOf",e.groups.controls),S.yb(3),S.pc("ngIf",0===e.groups.controls.length),S.yb(2),S.pc("ngClass",S.uc(3,ue,e.icons.add))}}function et(e,t){if(1&e){const e=S.Tb();S.Sb(0,"div",1),S.Sb(1,"form",2,3),S.Sb(3,"div",4),S.Sb(4,"div",5),S.Wb(5,6),S.jc(6,"titlecase"),S.jc(7,"upperFirst"),S.Rb(),S.Sb(8,"div",7),S.Sb(9,"div",8),S.Sb(10,"label",9),S.Wb(11,10),S.Rb(),S.Sb(12,"div",11),S.Sb(13,"div",12),S.Nb(14,"input",13),S.Sb(15,"span",14),S.Sb(16,"button",15),S.gc("click",(function(){return S.Dc(e),S.ic().targetSettingsModal()})),S.Nb(17,"i",16),S.Rb(),S.Rb(),S.Rb(),S.Mc(18,be,2,0,"span",17),S.Mc(19,de,2,0,"span",17),S.Mc(20,pe,9,0,"span",17),S.Mc(21,me,2,0,"span",18),S.Nb(22,"hr"),S.Rb(),S.Rb(),S.Sb(23,"div",8),S.Sb(24,"label",19),S.Wb(25,20),S.Rb(),S.Sb(26,"div",11),S.Mc(27,fe,6,4,"ng-container",21),S.Sb(28,"div",22),S.Sb(29,"div",23),S.Sb(30,"cd-select",24),S.gc("selection",(function(t){return S.Dc(e),S.ic().onPortalSelection(t)})),S.Nb(31,"i",25),S.Qb(32),S.Wb(33,26),S.Pb(),S.Rb(),S.Rb(),S.Rb(),S.Nb(34,"input",27),S.Mc(35,he,2,1,"span",17),S.Nb(36,"hr"),S.Rb(),S.Rb(),S.Sb(37,"div",8),S.Sb(38,"label",28),S.Wb(39,29),S.Rb(),S.Sb(40,"div",11),S.Mc(41,ye,12,10,"ng-container",21),S.Nb(42,"input",30),S.Mc(43,Re,2,0,"span",17),S.Mc(44,we,2,0,"span",17),S.Sb(45,"div",22),S.Sb(46,"div",23),S.Sb(47,"cd-select",24),S.gc("selection",(function(t){return S.Dc(e),S.ic().onImageSelection(t)})),S.Nb(48,"i",25),S.Qb(49),S.Wb(50,31),S.Pb(),S.Rb(),S.Rb(),S.Rb(),S.Nb(51,"hr"),S.Rb(),S.Rb(),S.Sb(52,"div",8),S.Sb(53,"div",32),S.Sb(54,"div",33),S.Nb(55,"input",34),S.Sb(56,"label",35),S.Wb(57,36),S.Rb(),S.Rb(),S.Nb(58,"hr"),S.Rb(),S.Rb(),S.Mc(59,Pe,41,8,"div",37),S.Mc(60,Ye,13,5,"div",38),S.Mc(61,Ze,12,5,"div",38),S.Rb(),S.Sb(62,"div",39),S.Sb(63,"cd-form-button-panel",40),S.gc("submitActionEvent",(function(){return S.Dc(e),S.ic().submit()})),S.jc(64,"titlecase"),S.jc(65,"upperFirst"),S.Rb(),S.Rb(),S.Rb(),S.Rb(),S.Rb()}if(2&e){const e=S.Ac(2),t=S.ic();S.yb(1),S.pc("formGroup",t.targetForm),S.yb(6),S.ac(S.kc(6,26,t.action))(S.kc(7,28,t.resource)),S.Xb(5),S.yb(10),S.pc("ngClass",S.uc(34,ue,t.icons.deepCheck)),S.yb(1),S.pc("ngIf",t.targetForm.showError("target_iqn",e,"required")),S.yb(1),S.pc("ngIf",t.targetForm.showError("target_iqn",e,"pattern")),S.yb(1),S.pc("ngIf",t.targetForm.showError("target_iqn",e,"iqn")),S.yb(1),S.pc("ngIf",t.hasAdvancedSettings(t.targetForm.getValue("target_controls"))),S.yb(6),S.pc("ngForOf",t.portals.value),S.yb(3),S.pc("data",t.portals.value)("options",t.portalsSelections)("messages",t.messages.portals),S.yb(1),S.pc("ngClass",S.uc(36,ue,t.icons.add)),S.yb(4),S.pc("ngIf",t.targetForm.showError("portals",e,"minGateways")),S.yb(6),S.pc("ngForOf",t.targetForm.getValue("disks")),S.yb(2),S.pc("ngIf",t.targetForm.showError("disks",e,"dupLunId")),S.yb(1),S.pc("ngIf",t.targetForm.showError("disks",e,"dupWwn")),S.yb(3),S.pc("data",t.disks.value)("options",t.imagesSelections)("messages",t.messages.images),S.yb(1),S.pc("ngClass",S.uc(38,ue,t.icons.add)),S.yb(11),S.pc("ngIf",t.cephIscsiConfigVersion>10&&!t.targetForm.getValue("acl_enabled")),S.yb(1),S.pc("ngIf",t.targetForm.getValue("acl_enabled")),S.yb(1),S.pc("ngIf",t.targetForm.getValue("acl_enabled")),S.yb(2),S.pc("form",t.targetForm)("submitText",S.kc(64,30,t.action)+" "+S.kc(65,32,t.resource))}}let tt=(()=>{class e extends I.a{constructor(e,t,a,i,o,s,n){super(),this.iscsiService=e,this.modalService=t,this.rbdService=a,this.router=i,this.route=o,this.taskWrapper=s,this.actionLabels=n,this.api_version=0,this.minimum_gateways=1,this.icons=N.a,this.isEdit=!1,this.portalsSelections=[],this.imagesInitiatorSelections=[],this.groupDiskSelections=[],this.groupMembersSelections=[],this.imagesSettings={},this.messages={portals:new k.a({noOptions:"There are no portals available."}),images:new k.a({noOptions:"There are no images available."}),initiatorImage:new k.a({noOptions:"There are no images available. Please make sure you add an image to the target."}),groupInitiator:new k.a({noOptions:"There are no initiators available. Please make sure you add an initiator to the target."})},this.IQN_REGEX=/^iqn\.(19|20)\d\d-(0[1-9]|1[0-2])\.\D{2,3}(\.[A-Za-z0-9-]+)+(:[A-Za-z0-9-\.]+)*$/,this.USER_REGEX=/^[\w\.:@_-]{8,64}$/,this.PASSWORD_REGEX=/^[\w@\-_\/]{12,16}$/,this.resource="target"}ngOnInit(){const e=[this.iscsiService.listTargets(),this.rbdService.list(),this.iscsiService.portals(),this.iscsiService.settings(),this.iscsiService.version()];this.router.url.startsWith("/block/iscsi/targets/edit")&&(this.isEdit=!0,this.route.params.subscribe(t=>{this.target_iqn=decodeURIComponent(t.target_iqn),e.push(this.iscsiService.getTarget(this.target_iqn))})),this.action=this.isEdit?this.actionLabels.EDIT:this.actionLabels.CREATE,Object(u.a)(e).subscribe(e=>{const t=m()(e[0]).filter(e=>e.target_iqn!==this.target_iqn).flatMap(e=>e.disks).map(e=>`${e.pool}/${e.image}`).value();"api_version"in e[3]&&(this.api_version=e[3].api_version),this.minimum_gateways=e[3].config.minimum_gateways,this.target_default_controls=e[3].target_default_controls,this.target_controls_limits=e[3].target_controls_limits,this.disk_default_controls=e[3].disk_default_controls,this.disk_controls_limits=e[3].disk_controls_limits,this.backstores=e[3].backstores,this.default_backstore=e[3].default_backstore,this.unsupported_rbd_features=e[3].unsupported_rbd_features,this.required_rbd_features=e[3].required_rbd_features,this.imagesAll=m()(e[1]).flatMap(e=>e.value).filter(e=>!e.namespace&&-1===t.indexOf(`${e.pool_name}/${e.name}`)&&0!==this.getValidBackstores(e).length).value(),this.imagesSelections=this.imagesAll.map(e=>new M.a(!1,`${e.pool_name}/${e.name}`,""));const a=[];e[2].forEach(e=>{e.ip_addresses.forEach(t=>{a.push(new M.a(!1,e.name+":"+t,""))})}),this.portalsSelections=[...a],this.cephIscsiConfigVersion=e[4].ceph_iscsi_config_version,this.createForm(),e[5]&&this.resolveModel(e[5]),this.loadingReady()})}createForm(){if(this.targetForm=new $.a({target_iqn:new o.h("iqn.2001-07.com.ceph:"+Date.now(),{validators:[o.A.required,o.A.pattern(this.IQN_REGEX)]}),target_controls:new o.h({}),portals:new o.h([],{validators:[T.a.custom("minGateways",e=>m.a.uniq(e.map(e=>e.split(":")[0])).length<Math.max(1,this.minimum_gateways))]}),disks:new o.h([],{validators:[T.a.custom("dupLunId",e=>{const t=this.getLunIds(e);return t.length!==m.a.uniq(t).length}),T.a.custom("dupWwn",e=>{const t=this.getWwns(e);return t.length!==m.a.uniq(t).length})]}),initiators:new o.e([]),groups:new o.e([]),acl_enabled:new o.h(!1)}),this.cephIscsiConfigVersion>10){const e=new $.a({user:new o.h(""),password:new o.h(""),mutual_user:new o.h(""),mutual_password:new o.h("")});this.setAuthValidator(e),this.targetForm.addControl("auth",e)}}resolveModel(e){this.targetForm.patchValue({target_iqn:e.target_iqn,target_controls:e.target_controls,acl_enabled:e.acl_enabled}),this.cephIscsiConfigVersion>10&&this.targetForm.patchValue({auth:e.auth});const t=[];m.a.forEach(e.portals,e=>{t.push(`${e.host}:${e.ip}`)}),this.targetForm.patchValue({portals:t});const a=[];m.a.forEach(e.disks,e=>{const t=`${e.pool}/${e.image}`;a.push(t),this.imagesSettings[t]={backstore:e.backstore},this.imagesSettings[t][e.backstore]=e.controls,"lun"in e&&(this.imagesSettings[t].lun=e.lun),"wwn"in e&&(this.imagesSettings[t].wwn=e.wwn),this.onImageSelection({option:{name:t,selected:!0}})}),this.targetForm.patchValue({disks:a}),m.a.forEach(e.clients,e=>{const t=this.addInitiator();e.luns=m.a.map(e.luns,e=>`${e.pool}/${e.image}`),t.patchValue(e)}),e.groups.forEach((e,t)=>{const a=this.addGroup();e.disks=m.a.map(e.disks,e=>`${e.pool}/${e.image}`),a.patchValue(e),m.a.forEach(e.members,e=>{this.onGroupMemberSelection({option:new M.a(!0,e,"")},t)})})}hasAdvancedSettings(e){return Object.values(e).length>0}get portals(){return this.targetForm.get("portals")}onPortalSelection(){this.portals.setValue(this.portals.value)}removePortal(e,t){return this.portalsSelections.forEach(e=>{e.name===t&&(e.selected=!1)}),this.portals.value.splice(e,1),this.portals.setValue(this.portals.value),!1}get disks(){return this.targetForm.get("disks")}removeImage(e,t){return this.imagesSelections.forEach(e=>{e.name===t&&(e.selected=!1)}),this.disks.value.splice(e,1),this.removeImageRefs(t),this.targetForm.get("disks").updateValueAndValidity({emitEvent:!1}),!1}removeImageRefs(e){this.initiators.controls.forEach(t=>{const a=t.value.luns.filter(t=>t!==e);t.get("luns").setValue(a)}),this.groups.controls.forEach(t=>{const a=t.value.disks.filter(t=>t!==e);t.get("disks").setValue(a)}),m.a.forEach(this.imagesInitiatorSelections,(t,a)=>{this.imagesInitiatorSelections[a]=t.filter(t=>t.name!==e)}),m.a.forEach(this.groupDiskSelections,(t,a)=>{this.groupDiskSelections[a]=t.filter(t=>t.name!==e)})}getDefaultBackstore(e){let t=this.default_backstore;const a=this.getImageById(e);return this.validFeatures(a,this.default_backstore)||this.backstores.forEach(e=>{e!==this.default_backstore&&this.validFeatures(a,e)&&(t=e)}),t}isLunIdInUse(e,t){const a=this.disks.value.filter(e=>e!==t);return this.getLunIds(a).includes(e)}getLunIds(e){return m.a.map(e,e=>this.imagesSettings[e].lun)}nextLunId(e){const t=this.disks.value.filter(t=>t!==e),a=this.getLunIds(t);let i=0;for(;a.includes(i);)i++;return i}getWwns(e){return m.a.map(e,e=>this.imagesSettings[e].wwn).filter(e=>m.a.isString(e)&&""!==e)}onImageSelection(e){const t=e.option;if(t.selected){if(this.imagesSettings[t.name])this.isLunIdInUse(this.imagesSettings[t.name].lun,t.name)&&(this.imagesSettings[t.name].lun=this.nextLunId(t.name));else{const e=this.getDefaultBackstore(t.name);this.imagesSettings[t.name]={backstore:e,lun:this.nextLunId(t.name)},this.imagesSettings[t.name][e]={}}m.a.forEach(this.imagesInitiatorSelections,(e,a)=>{e.push(new M.a(!1,t.name,"")),this.imagesInitiatorSelections[a]=[...e]}),m.a.forEach(this.groupDiskSelections,(e,a)=>{e.push(new M.a(!1,t.name,"")),this.groupDiskSelections[a]=[...e]})}else this.removeImageRefs(t.name);this.targetForm.get("disks").updateValueAndValidity({emitEvent:!1})}get initiators(){return this.targetForm.get("initiators")}addInitiator(){const e=new $.a({client_iqn:new o.h("",{validators:[o.A.required,T.a.custom("notUnique",e=>{const t=this.initiators.controls.reduce((function(e,t){return e.concat(t.value.client_iqn)}),[]);return t.indexOf(e)!==t.lastIndexOf(e)}),o.A.pattern(this.IQN_REGEX)]}),auth:new $.a({user:new o.h(""),password:new o.h(""),mutual_user:new o.h(""),mutual_password:new o.h("")}),luns:new o.h([]),cdIsInGroup:new o.h(!1)});this.setAuthValidator(e),this.initiators.push(e),m.a.forEach(this.groupMembersSelections,(e,t)=>{e.push(new M.a(!1,"","")),this.groupMembersSelections[t]=[...e]});const t=m.a.map(this.targetForm.getValue("disks"),e=>new M.a(!1,e,""));return this.imagesInitiatorSelections.push(t),e}setAuthValidator(e){T.a.validateIf(e.get("user"),()=>e.getValue("password")||e.getValue("mutual_user")||e.getValue("mutual_password"),[o.A.required],[o.A.pattern(this.USER_REGEX)],[e.get("password"),e.get("mutual_user"),e.get("mutual_password")]),T.a.validateIf(e.get("password"),()=>e.getValue("user")||e.getValue("mutual_user")||e.getValue("mutual_password"),[o.A.required],[o.A.pattern(this.PASSWORD_REGEX)],[e.get("user"),e.get("mutual_user"),e.get("mutual_password")]),T.a.validateIf(e.get("mutual_user"),()=>e.getValue("mutual_password"),[o.A.required],[o.A.pattern(this.USER_REGEX)],[e.get("user"),e.get("password"),e.get("mutual_password")]),T.a.validateIf(e.get("mutual_password"),()=>e.getValue("mutual_user"),[o.A.required],[o.A.pattern(this.PASSWORD_REGEX)],[e.get("user"),e.get("password"),e.get("mutual_user")])}removeInitiator(e){const t=this.initiators.value[e];this.initiators.removeAt(e),m.a.forEach(this.groupMembersSelections,(t,a)=>{t.splice(e,1),this.groupMembersSelections[a]=[...t]}),this.groups.controls.forEach(e=>{const a=e.value.members.filter(e=>e!==t.client_iqn);e.get("members").setValue(a)}),this.imagesInitiatorSelections.splice(e,1)}updatedInitiatorSelector(){this.initiators.controls.forEach(e=>{e.get("client_iqn").updateValueAndValidity({emitEvent:!1})}),m.a.forEach(this.groupMembersSelections,(e,t)=>{m.a.forEach(e,(e,t)=>{const a=e.name;e.name=this.initiators.controls[t].value.client_iqn,this.groups.controls.forEach(t=>{const i=t.value.members,o=i.indexOf(a);-1!==o&&(i[o]=e.name),t.get("members").setValue(i)})}),this.groupMembersSelections[t]=[...this.groupMembersSelections[t]]})}removeInitiatorImage(e,t,a,i){const o=e.getValue("luns");return o.splice(t,1),e.patchValue({luns:o}),this.imagesInitiatorSelections[a].forEach(e=>{e.name===i&&(e.selected=!1)}),!1}get groups(){return this.targetForm.get("groups")}addGroup(){const e=new $.a({group_id:new o.h("",{validators:[o.A.required]}),members:new o.h([]),disks:new o.h([])});this.groups.push(e);const t=m.a.map(this.targetForm.getValue("disks"),e=>new M.a(!1,e,""));this.groupDiskSelections.push(t);const a=m.a.map(this.initiators.value,e=>new M.a(!1,e.client_iqn,"",!e.cdIsInGroup));return this.groupMembersSelections.push(a),e}removeGroup(e){this.groups.removeAt(e),this.groupMembersSelections[e].filter(e=>e.selected).forEach(t=>{t.selected=!1,this.onGroupMemberSelection({option:t},e)}),this.groupMembersSelections.splice(e,1),this.groupDiskSelections.splice(e,1)}onGroupMemberSelection(e,t){const a=e.option;let i=[];if(!a.selected){const e=this.groupDiskSelections[t].filter(e=>e.selected);i=e.map(e=>e.name)}this.initiators.controls.forEach((e,t)=>{e.value.client_iqn===a.name&&(e.patchValue({luns:i}),e.get("cdIsInGroup").setValue(a.selected),m.a.forEach(this.groupMembersSelections,e=>{e[t].enabled=!a.selected}),this.imagesInitiatorSelections[t].forEach(e=>{e.selected=i.includes(e.name)}))})}removeGroupInitiator(e,t,a){const i=e.getValue("members")[t];e.getValue("members").splice(t,1),this.onGroupMemberSelection({option:new M.a(!1,i,"")},a)}removeGroupDisk(e,t,a){const i=e.getValue("disks")[t];e.getValue("disks").splice(t,1),this.groupDiskSelections[a].forEach(e=>{e.name===i&&(e.selected=!1)}),this.groupDiskSelections[a]=[...this.groupDiskSelections[a]]}submit(){const e=m.a.cloneDeep(this.targetForm.value),t={target_iqn:this.targetForm.getValue("target_iqn"),target_controls:this.targetForm.getValue("target_controls"),acl_enabled:this.targetForm.getValue("acl_enabled"),portals:[],disks:[],clients:[],groups:[]};if(this.cephIscsiConfigVersion>10){const e=this.targetForm.get("auth");e.getValue("user")||e.get("user").setValue(""),e.getValue("password")||e.get("password").setValue(""),e.getValue("mutual_user")||e.get("mutual_user").setValue(""),e.getValue("mutual_password")||e.get("mutual_password").setValue("");const a=this.targetForm.getValue("acl_enabled");t.auth={user:a?"":e.getValue("user"),password:a?"":e.getValue("password"),mutual_user:a?"":e.getValue("mutual_user"),mutual_password:a?"":e.getValue("mutual_password")}}let a;e.disks.forEach(e=>{const a=e.split("/"),i=this.imagesSettings[e].backstore;t.disks.push({pool:a[0],image:a[1],backstore:i,controls:this.imagesSettings[e][i],lun:this.imagesSettings[e].lun,wwn:this.imagesSettings[e].wwn})}),e.portals.forEach(e=>{const a=e.indexOf(":");t.portals.push({host:e.substring(0,a),ip:e.substring(a+1)})}),t.acl_enabled&&(e.initiators.forEach(e=>{e.auth.user||(e.auth.user=""),e.auth.password||(e.auth.password=""),e.auth.mutual_user||(e.auth.mutual_user=""),e.auth.mutual_password||(e.auth.mutual_password=""),delete e.cdIsInGroup;const t=[];e.luns.forEach(e=>{const a=e.split("/");t.push({pool:a[0],image:a[1]})}),e.luns=t}),t.clients=e.initiators),t.acl_enabled&&(e.groups.forEach(e=>{const t=[];e.disks.forEach(e=>{const a=e.split("/");t.push({pool:a[0],image:a[1]})}),e.disks=t}),t.groups=e.groups),this.isEdit?(t.new_target_iqn=t.target_iqn,t.target_iqn=this.target_iqn,a=this.taskWrapper.wrapTaskAroundCall({task:new F.a("iscsi/target/edit",{target_iqn:t.target_iqn}),call:this.iscsiService.updateTarget(this.target_iqn,t)})):a=this.taskWrapper.wrapTaskAroundCall({task:new F.a("iscsi/target/create",{target_iqn:t.target_iqn}),call:this.iscsiService.createTarget(t)}),a.subscribe({error:()=>{this.targetForm.setErrors({cdSubmitButton:!0})},complete:()=>this.router.navigate(["/block/iscsi/targets"])})}targetSettingsModal(){const e={target_controls:this.targetForm.get("target_controls"),target_default_controls:this.target_default_controls,target_controls_limits:this.target_controls_limits};this.modalRef=this.modalService.show(ie,e)}imageSettingsModal(e){const t={imagesSettings:this.imagesSettings,image:e,api_version:this.api_version,disk_default_controls:this.disk_default_controls,disk_controls_limits:this.disk_controls_limits,backstores:this.getValidBackstores(this.getImageById(e)),control:this.targetForm.get("disks")};this.modalRef=this.modalService.show(te,t)}validFeatures(e,t){const a=e.features,i=this.required_rbd_features[t];return(a&i)===i&&0==(a&this.unsupported_rbd_features[t])}getImageById(e){return this.imagesAll.find(t=>e===`${t.pool_name}/${t.name}`)}getValidBackstores(e){return this.backstores.filter(t=>this.validFeatures(e,t))}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(v),S.Mb(P.a),S.Mb(_),S.Mb(s.e),S.Mb(s.a),S.Mb(z.a),S.Mb(l.b))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-iscsi-target-form"]],features:[S.vb],decls:1,vars:1,consts:function(){return[["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],["name","targetForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"card"],[1,"card-header"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"card-body"],[1,"form-group","row"],["for","target_iqn",1,"cd-col-form-label","required"],"Target IQN",[1,"cd-col-form-input"],[1,"input-group"],["type","text","id","target_iqn","name","target_iqn","formControlName","target_iqn","cdTrim","",1,"form-control"],[1,"input-group-append"],["id","ecp-info-button","type","button",1,"btn","btn-light",3,"click"],["aria-hidden","true",3,"ngClass"],["class","invalid-feedback",4,"ngIf"],["class","form-text text-muted",4,"ngIf"],["for","portals",1,"cd-col-form-label","required"],"Portals",[4,"ngFor","ngForOf"],[1,"row"],[1,"col-md-12"],["elemClass","btn btn-light float-right",3,"data","options","messages","selection"],[3,"ngClass"],"Add portal",["type","hidden","id","portals","name","portals","formControlName","portals",1,"form-control"],["for","disks",1,"cd-col-form-label"],"Images",["type","hidden","id","disks","name","disks","formControlName","disks",1,"form-control"],"Add image",[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["type","checkbox","formControlName","acl_enabled","name","acl_enabled","id","acl_enabled",1,"custom-control-input"],["for","acl_enabled",1,"custom-control-label"],"ACL authentication",["formGroupName","auth",4,"ngIf"],["class","form-group row",4,"ngIf"],[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required.","IQN has wrong pattern.","An IQN has the following notation 'iqn.$year-$month.$reversedAddress:$definedName'","For example: iqn.2016-06.org.dashboard:storage:disk.sn-a8675309",["target","_blank","href","https://en.wikipedia.org/wiki/ISCSI#Addressing"],"More information",[1,"form-text","text-muted"],"This target has modified advanced settings.",[1,"input-group","cd-mb"],["type","text","disabled","",1,"cd-form-control",3,"value"],["type","button",1,"btn","btn-light",3,"click"],"At least " + "\ufffd0\ufffd" + " gateways are required.",["class","input-group-text",4,"ngIf"],[4,"ngIf"],[1,"input-group-text"],"Backstore: " + "\ufffd0\ufffd" + ".\xA0","This image has modified settings.","Duplicated LUN numbers.","Duplicated WWN.",["formGroupName","auth"],["for","target_user",1,"cd-col-form-label"],"User",["type","text","autocomplete","off","id","target_user","name","target_user","formControlName","user",1,"form-control"],["for","target_password",1,"cd-col-form-label"],"Password",["type","password","autocomplete","new-password","id","target_password","name","target_password","formControlName","password",1,"form-control"],["type","button","cdPasswordButton","target_password",1,"btn","btn-light"],["source","target_password"],["for","target_mutual_user",1,"cd-col-form-label"],"Mutual User",["type","text","autocomplete","off","id","target_mutual_user","name","target_mutual_user","formControlName","mutual_user",1,"form-control"],["for","target_mutual_password",1,"cd-col-form-label"],"Mutual Password",["type","password","autocomplete","new-password","id","target_mutual_password","name","target_mutual_password","formControlName","mutual_password",1,"form-control"],["type","button","cdPasswordButton","target_mutual_password",1,"btn","btn-light"],["source","target_mutual_password"],"This field is required.","User names must have a length of 8 to 64 characters and can contain alphanumeric characters, '.', '@', '-', '_' or ':'.","This field is required.","Passwords must have a length of 12 to 16 characters and can contain alphanumeric characters, '@', '-', '_' or '/'.","This field is required.","User names must have a length of 8 to 64 characters and can contain alphanumeric characters, '.', '@', '-', '_' or ':'.","This field is required.","Passwords must have a length of 12 to 16 characters and can contain alphanumeric characters, '@', '-', '_' or '/'.",["for","initiators",1,"cd-col-form-label"],"Initiators",["formArrayName","initiators",1,"cd-col-form-input"],["class","card mb-2",3,"formGroupName",4,"ngFor","ngForOf"],[1,"btn","btn-light","float-right",3,"click"],"Add initiator",[1,"card","mb-2",3,"formGroupName"],"Initiator",["type","button",1,"close",3,"click"],["for","client_iqn",1,"cd-col-form-label","required"],"Client IQN",["type","text","formControlName","client_iqn","cdTrim","",1,"form-control",3,"blur"],["for","user",1,"cd-col-form-label"],"User",["formControlName","user","autocomplete","off","type","text",1,"form-control",3,"id"],["for","password",1,"cd-col-form-label"],"Password",["formControlName","password","autocomplete","new-password","type","password",1,"form-control",3,"id"],["type","button",1,"btn","btn-light",3,"cdPasswordButton"],[3,"source"],["for","mutual_user",1,"cd-col-form-label"],"Mutual User",["formControlName","mutual_user","autocomplete","off","type","text",1,"form-control",3,"id"],["for","mutual_password",1,"cd-col-form-label"],"Mutual Password",["formControlName","mutual_password","autocomplete","new-password","type","password",1,"form-control",3,"id"],["for","luns",1,"cd-col-form-label"],"Images",["class","row",4,"ngIf"],"Initiator IQN needs to be unique.","This field is required.","IQN has wrong pattern.","This field is required.","User names must have a length of 8 to 64 characters and can contain alphanumeric characters, '.', '@', '-', '_' or ':'.","This field is required.","Passwords must have a length of 12 to 16 characters and can contain alphanumeric characters, '@', '-', '_' or '/'.","This field is required.","User names must have a length of 8 to 64 characters and can contain alphanumeric characters, '.', '@', '-', '_' or ':'.","This field is required.","Passwords must have a length of 12 to 16 characters and can contain alphanumeric characters, '@', '-', '_' or '/'.","Initiator belongs to a group. Images will be configure in the group.",["elemClass","btn btn-light float-right",3,"data","options","messages"],"Add image","No items added.","Groups",["formArrayName","groups",1,"cd-col-form-input"],"Add group","Group",["for","group_id",1,"cd-col-form-label","required"],"Name",["type","text","formControlName","group_id",1,"form-control"],["for","members",1,"cd-col-form-label"],"Initiators","Add initiator","Images","Add image","No items added."]},template:function(e,t){1&e&&S.Mc(0,et,66,40,"div",0),2&e&&S.pc("cdFormLoading",t.loading)},directives:[oe.a,o.C,o.r,o.k,C.a,D.a,O.a,o.d,A.a,o.q,o.i,se,i.p,i.r,i.q,ne.a,o.b,x.a,o.l,re.a,ce.a,o.f],pipes:[i.A,le.a,Y.a],styles:[".cd-mb[_ngcontent-%COMP%]{margin-bottom:10px}"]}),e})();var at=a("+fVR"),it=a("0+/T"),ot=a("uIqm"),st=a("x38r"),nt=a("vCyI"),rt=a("FFMq"),ct=a("G1/K"),lt=a("aexS"),bt=a("VTlA"),dt=a("mtw6"),pt=a("9nlD");function mt(e,t){1&e&&(S.Sb(0,"span",30),S.Wb(1,31),S.Rb())}function ut(e,t){1&e&&(S.Sb(0,"span",30),S.Wb(1,32),S.Rb())}function ft(e,t){1&e&&(S.Sb(0,"span",30),S.Wb(1,33),S.Rb())}function ht(e,t){1&e&&(S.Sb(0,"span",30),S.Wb(1,34),S.Rb())}function gt(e,t){1&e&&(S.Sb(0,"span",30),S.Wb(1,35),S.Rb())}function St(e,t){1&e&&(S.Sb(0,"span",30),S.Wb(1,36),S.Rb())}function vt(e,t){1&e&&(S.Sb(0,"span",30),S.Wb(1,37),S.Rb())}function yt(e,t){1&e&&(S.Sb(0,"span",30),S.Wb(1,38),S.Rb())}let Rt=(()=>{class e{constructor(e,t,a,i,o){this.authStorageService=e,this.activeModal=t,this.actionLabels=a,this.iscsiService=i,this.notificationService=o,this.USER_REGEX=/^[\w\.:@_-]{8,64}$/,this.PASSWORD_REGEX=/^[\w@\-_\/]{12,16}$/,this.permission=this.authStorageService.getPermissions().iscsi}ngOnInit(){this.hasPermission=this.permission.update,this.createForm(),this.iscsiService.getDiscovery().subscribe(e=>{this.discoveryForm.patchValue(e)})}createForm(){this.discoveryForm=new $.a({user:new o.h({value:"",disabled:!this.hasPermission}),password:new o.h({value:"",disabled:!this.hasPermission}),mutual_user:new o.h({value:"",disabled:!this.hasPermission}),mutual_password:new o.h({value:"",disabled:!this.hasPermission})}),T.a.validateIf(this.discoveryForm.get("user"),()=>this.discoveryForm.getValue("password")||this.discoveryForm.getValue("mutual_user")||this.discoveryForm.getValue("mutual_password"),[o.A.required],[o.A.pattern(this.USER_REGEX)],[this.discoveryForm.get("password"),this.discoveryForm.get("mutual_user"),this.discoveryForm.get("mutual_password")]),T.a.validateIf(this.discoveryForm.get("password"),()=>this.discoveryForm.getValue("user")||this.discoveryForm.getValue("mutual_user")||this.discoveryForm.getValue("mutual_password"),[o.A.required],[o.A.pattern(this.PASSWORD_REGEX)],[this.discoveryForm.get("user"),this.discoveryForm.get("mutual_user"),this.discoveryForm.get("mutual_password")]),T.a.validateIf(this.discoveryForm.get("mutual_user"),()=>this.discoveryForm.getValue("mutual_password"),[o.A.required],[o.A.pattern(this.USER_REGEX)],[this.discoveryForm.get("user"),this.discoveryForm.get("password"),this.discoveryForm.get("mutual_password")]),T.a.validateIf(this.discoveryForm.get("mutual_password"),()=>this.discoveryForm.getValue("mutual_user"),[o.A.required],[o.A.pattern(this.PASSWORD_REGEX)],[this.discoveryForm.get("user"),this.discoveryForm.get("password"),this.discoveryForm.get("mutual_user")])}submitAction(){this.iscsiService.updateDiscovery(this.discoveryForm.value).subscribe(()=>{this.notificationService.show(dt.a.success,"Updated discovery authentication"),this.activeModal.close()},()=>{this.discoveryForm.setErrors({cdSubmitButton:!0})})}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(lt.a),S.Mb(r.a),S.Mb(l.b),S.Mb(v),S.Mb(pt.a))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-iscsi-target-discovery-modal"]],decls:46,vars:13,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"Discovery Authentication",[1,"modal-content"],["name","discoveryForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","user",1,"cd-col-form-label"],"User",[1,"cd-col-form-input"],["id","user","formControlName","user","type","text","autocomplete","off",1,"form-control"],["class","invalid-feedback",4,"ngIf"],["for","password",1,"cd-col-form-label"],"Password",[1,"input-group"],["id","password","formControlName","password","type","password","autocomplete","new-password",1,"form-control"],[1,"input-group-append"],["type","button","cdPasswordButton","password",1,"btn","btn-light"],["source","password"],["for","mutual_user",1,"cd-col-form-label"],"Mutual User",["id","mutual_user","formControlName","mutual_user","type","text","autocomplete","off",1,"form-control"],["for","mutual_password",1,"cd-col-form-label"],"Mutual Password",["id","mutual_password","formControlName","mutual_password","type","password","autocomplete","new-password",1,"form-control"],["type","button","cdPasswordButton","mutual_password",1,"btn","btn-light"],["source","mutual_password"],[1,"modal-footer"],[3,"form","showSubmit","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required.","User names must have a length of 8 to 64 characters and can contain alphanumeric characters, '.', '@', '-', '_' or ':'.","This field is required.","Passwords must have a length of 12 to 16 characters and can contain alphanumeric characters, '@', '-', '_' or '/'.","This field is required.","User names must have a length of 8 to 64 characters and can contain alphanumeric characters, '.', '@', '-', '_' or ':'.","This field is required.","Passwords must have a length of 12 to 16 characters and can contain alphanumeric characters, '@', '-', '_' or '/'."]},template:function(e,t){if(1&e&&(S.Sb(0,"cd-modal",0),S.Qb(1,1),S.Wb(2,2),S.Pb(),S.Qb(3,3),S.Sb(4,"form",4,5),S.Sb(6,"div",6),S.Sb(7,"div",7),S.Sb(8,"label",8),S.Wb(9,9),S.Rb(),S.Sb(10,"div",10),S.Nb(11,"input",11),S.Mc(12,mt,2,0,"span",12),S.Mc(13,ut,2,0,"span",12),S.Rb(),S.Rb(),S.Sb(14,"div",7),S.Sb(15,"label",13),S.Wb(16,14),S.Rb(),S.Sb(17,"div",10),S.Sb(18,"div",15),S.Nb(19,"input",16),S.Sb(20,"span",17),S.Nb(21,"button",18),S.Nb(22,"cd-copy-2-clipboard-button",19),S.Rb(),S.Rb(),S.Mc(23,ft,2,0,"span",12),S.Mc(24,ht,2,0,"span",12),S.Rb(),S.Rb(),S.Sb(25,"div",7),S.Sb(26,"label",20),S.Qb(27),S.Wb(28,21),S.Pb(),S.Rb(),S.Sb(29,"div",10),S.Nb(30,"input",22),S.Mc(31,gt,2,0,"span",12),S.Mc(32,St,2,0,"span",12),S.Rb(),S.Rb(),S.Sb(33,"div",7),S.Sb(34,"label",23),S.Wb(35,24),S.Rb(),S.Sb(36,"div",10),S.Sb(37,"div",15),S.Nb(38,"input",25),S.Sb(39,"span",17),S.Nb(40,"button",26),S.Nb(41,"cd-copy-2-clipboard-button",27),S.Rb(),S.Rb(),S.Mc(42,vt,2,0,"span",12),S.Mc(43,yt,2,0,"span",12),S.Rb(),S.Rb(),S.Rb(),S.Sb(44,"div",28),S.Sb(45,"cd-form-button-panel",29),S.gc("submitActionEvent",(function(){return t.submitAction()})),S.Rb(),S.Rb(),S.Rb(),S.Pb(),S.Rb()),2&e){const e=S.Ac(5);S.pc("modalRef",t.activeModal),S.yb(4),S.pc("formGroup",t.discoveryForm),S.yb(8),S.pc("ngIf",t.discoveryForm.showError("user",e,"required")),S.yb(1),S.pc("ngIf",t.discoveryForm.showError("user",e,"pattern")),S.yb(10),S.pc("ngIf",t.discoveryForm.showError("password",e,"required")),S.yb(1),S.pc("ngIf",t.discoveryForm.showError("password",e,"pattern")),S.yb(7),S.pc("ngIf",t.discoveryForm.showError("mutual_user",e,"required")),S.yb(1),S.pc("ngIf",t.discoveryForm.showError("mutual_user",e,"pattern")),S.yb(10),S.pc("ngIf",t.discoveryForm.showError("mutual_password",e,"required")),S.yb(1),S.pc("ngIf",t.discoveryForm.showError("mutual_password",e,"pattern")),S.yb(2),S.pc("form",t.discoveryForm)("showSubmit",t.hasPermission)("submitText",t.actionLabels.SUBMIT)}},directives:[E.a,o.C,o.r,o.k,C.a,D.a,O.a,o.d,A.a,o.q,o.i,i.r,re.a,ce.a,x.a],styles:[""]}),e})(),wt=(()=>{class e{constructor(e){this.router=e}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(s.e))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-iscsi-tabs"]],decls:8,vars:1,consts:function(){return[["ngbNav","",1,"nav-tabs",3,"activeId","navChange"],["nav","ngbNav"],["ngbNavItem","/block/iscsi/overview"],["ngbNavLink",""],"Overview",["ngbNavItem","/block/iscsi/targets"],"Targets"]},template:function(e,t){1&e&&(S.Sb(0,"ul",0,1),S.gc("navChange",(function(e){return t.router.navigate([e.nextId])})),S.Sb(2,"li",2),S.Sb(3,"a",3),S.Wb(4,4),S.Rb(),S.Rb(),S.Sb(5,"li",5),S.Sb(6,"a",3),S.Wb(7,6),S.Rb(),S.Rb(),S.Rb()),2&e&&S.pc("activeId",t.router.url)},directives:[r.p,r.r,r.s],styles:[""]}),e})();var _t=a("/NlG"),kt=a("6qls"),Mt=a("S7zO"),Nt=a("iExv");const It=["highlightTpl"],$t=["detailTable"],Tt=["tree"],Ft=function(){return["logged_in"]},Pt=function(){return["logged_out"]},zt=function(e,t){return{"badge-success":e,"badge-danger":t}};function Et(e,t){if(1&e&&(S.Nb(0,"i"),S.Sb(1,"span"),S.Oc(2),S.Rb(),S.Oc(3," \xa0 "),S.Sb(4,"span",8),S.Oc(5),S.Rb()),2&e){const e=t.$implicit;S.Ab(e.data.cdIcon),S.yb(2),S.Pc(e.data.name),S.yb(2),S.pc("ngClass",S.vc(7,zt,S.tc(5,Ft).includes(e.data.status),S.tc(6,Pt).includes(e.data.status))),S.yb(1),S.Qc(" ",e.data.status," ")}}function Ct(e,t){if(1&e&&(S.Sb(0,"div",9),S.Sb(1,"legend"),S.Oc(2),S.Rb(),S.Nb(3,"cd-table",10,11),S.Rb()),2&e){const e=S.ic();S.yb(2),S.Pc(e.title),S.yb(1),S.pc("data",e.data)("columns",e.columns)("limit",0)}}function Dt(e,t){if(1&e&&(S.Sb(0,"span"),S.Oc(1),S.Rb()),2&e){const e=S.ic().value;S.yb(1),S.Pc(e)}}function Ot(e,t){if(1&e&&(S.Sb(0,"strong"),S.Oc(1),S.Rb()),2&e){const e=S.ic().value;S.yb(1),S.Pc(e)}}function At(e,t){if(1&e&&(S.Mc(0,Dt,2,1,"span",12),S.Mc(1,Ot,2,1,"strong",12)),2&e){const e=t.row;S.pc("ngIf",void 0===e.default||e.default===e.current),S.yb(1),S.pc("ngIf",void 0!==e.default&&e.default!==e.current)}}let xt=(()=>{class e{constructor(e,t){this.iscsiBackstorePipe=e,this.booleanTextPipe=t,this.icons=N.a,this.metadata={},this.nodes=[],this.treeOptions={useVirtualScroll:!0,actionMapping:{mouse:{click:this.onNodeSelected.bind(this)}}}}set content(e){this.detailTable=e,e&&e.updateColumns()}ngOnInit(){this.columns=[{prop:"displayName",name:"Name",flexGrow:1,cellTemplate:this.highlightTpl},{prop:"current",name:"Current",flexGrow:1,cellTemplate:this.highlightTpl},{prop:"default",name:"Default",flexGrow:1,cellTemplate:this.highlightTpl}]}ngOnChanges(){this.selection&&(this.selectedItem=this.selection,this.generateTree()),this.data=void 0}generateTree(){const e=m.a.cloneDeep(this.selectedItem.target_controls);this.cephIscsiConfigVersion>10&&m.a.extend(e,m.a.cloneDeep(this.selectedItem.auth)),this.metadata={root:e};const t={target:{expanded:m.a.join(this.selectedItem.cdExecuting?[N.a.large,N.a.spinner,N.a.spin]:[N.a.large,N.a.bullseye]," ")},initiators:{expanded:m.a.join([N.a.large,N.a.user]," "),leaf:m.a.join([N.a.user]," ")},groups:{expanded:m.a.join([N.a.large,N.a.users]," "),leaf:m.a.join([N.a.users]," ")},disks:{expanded:m.a.join([N.a.large,N.a.disk]," "),leaf:m.a.join([N.a.disk]," ")},portals:{expanded:m.a.join([N.a.large,N.a.server]," "),leaf:m.a.join([N.a.server]," ")}},a=[];m.a.forEach(this.selectedItem.disks,e=>{const i="disk_"+e.pool+"_"+e.image;this.metadata[i]={controls:e.controls,backstore:e.backstore},["wwn","lun"].forEach(t=>{t in e&&(this.metadata[i][t]=e[t])}),a.push({name:`${e.pool}/${e.image}`,cdId:i,cdIcon:t.disks.leaf})});const i=[];m.a.forEach(this.selectedItem.portals,e=>{i.push({name:`${e.host}:${e.ip}`,cdIcon:t.portals.leaf})});const o=[];m.a.forEach(this.selectedItem.clients,e=>{const a=m.a.cloneDeep(e.auth);e.info&&(m.a.extend(a,e.info),delete a.state,m.a.forEach(Object.keys(e.info.state),t=>{a[t.toLowerCase()]=e.info.state[t]})),this.metadata["client_"+e.client_iqn]=a;const i=[];e.luns.forEach(e=>{i.push({name:`${e.pool}/${e.image}`,cdId:"disk_"+e.pool+"_"+e.image,cdIcon:t.disks.leaf})});let s="";e.info&&(s=Object.keys(e.info.state).includes("LOGGED_IN")?"logged_in":"logged_out"),o.push({name:e.client_iqn,status:s,cdId:"client_"+e.client_iqn,children:i,cdIcon:t.initiators.leaf})});const s=[];m.a.forEach(this.selectedItem.groups,e=>{const a=[];e.disks.forEach(e=>{a.push({name:`${e.pool}/${e.image}`,cdId:"disk_"+e.pool+"_"+e.image,cdIcon:t.disks.leaf})});const i=[];e.members.forEach(e=>{i.push({name:e,cdId:"client_"+e})}),s.push({name:e.group_id,cdIcon:t.groups.leaf,children:[{name:"Disks",children:a,cdIcon:t.disks.expanded},{name:"Initiators",children:i,cdIcon:t.initiators.expanded}]})}),this.nodes=[{name:this.selectedItem.target_iqn,cdId:"root",isExpanded:!0,cdIcon:t.target.expanded,children:[{name:"Disks",isExpanded:!0,children:a,cdIcon:t.disks.expanded},{name:"Portals",isExpanded:!0,children:i,cdIcon:t.portals.expanded},{name:"Initiators",isExpanded:!0,children:o,cdIcon:t.initiators.expanded},{name:"Groups",isExpanded:!0,children:s,cdIcon:t.groups.expanded}]}]}format(e){return"boolean"==typeof e?this.booleanTextPipe.transform(e):e}onNodeSelected(e,t){var a,i,o,s;if(n.a.ACTIVATE(e,t,!0),t.data.cdId){this.title=t.data.name;const e=this.metadata[t.data.cdId]||{};"root"===t.data.cdId?(null===(a=this.detailTable)||void 0===a||a.toggleColumn({prop:"default",isHidden:!0}),this.data=m.a.map(this.settings.target_default_controls,(t,a)=>({displayName:a,default:t=this.format(t),current:m.a.isUndefined(e[a])?t:this.format(e[a])})),this.cephIscsiConfigVersion>10&&["user","password","mutual_user","mutual_password"].forEach(t=>{this.data.push({displayName:t,default:null,current:e[t]})})):t.data.cdId.toString().startsWith("disk_")?(null===(i=this.detailTable)||void 0===i||i.toggleColumn({prop:"default",isHidden:!0}),this.data=m.a.map(this.settings.disk_default_controls[e.backstore],(t,a)=>({displayName:a,default:t=this.format(t),current:m.a.isUndefined(e.controls[a])?t:this.format(e.controls[a])})),this.data.push({displayName:"backstore",default:this.iscsiBackstorePipe.transform(this.settings.default_backstore),current:this.iscsiBackstorePipe.transform(e.backstore)}),["wwn","lun"].forEach(t=>{t in e&&this.data.push({displayName:t,default:void 0,current:e[t]})})):(null===(o=this.detailTable)||void 0===o||o.toggleColumn({prop:"default",isHidden:!1}),this.data=m.a.map(e,(e,t)=>({displayName:t,default:void 0,current:this.format(e)})))}else this.data=void 0;null===(s=this.detailTable)||void 0===s||s.updateColumns()}onUpdateData(){this.tree.treeModel.expandAll()}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(Y.a),S.Mb(Nt.a))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-iscsi-target-details"]],viewQuery:function(e,t){var a;1&e&&(S.Jc(It,!0),S.Tc($t,!0),S.Tc(Tt,!0)),2&e&&(S.zc(a=S.hc())&&(t.highlightTpl=a.first),S.zc(a=S.hc())&&(t.content=a.first),S.zc(a=S.hc())&&(t.tree=a.first))},inputs:{selection:"selection",settings:"settings",cephIscsiConfigVersion:"cephIscsiConfigVersion"},features:[S.wb],decls:11,vars:3,consts:function(){return[[1,"row"],[1,"col-6"],"iSCSI Topology",[3,"nodes","options","updateData"],["tree",""],["treeNodeTemplate",""],["class","col-6 metadata",4,"ngIf"],["highlightTpl",""],[1,"badge",3,"ngClass"],[1,"col-6","metadata"],["columnMode","flex",3,"data","columns","limit"],["detailTable",""],[4,"ngIf"]]},template:function(e,t){1&e&&(S.Sb(0,"div",0),S.Sb(1,"div",1),S.Sb(2,"legend"),S.Wb(3,2),S.Rb(),S.Sb(4,"tree-root",3,4),S.gc("updateData",(function(){return t.onUpdateData()})),S.Mc(6,Et,6,10,"ng-template",null,5,S.Nc),S.Rb(),S.Rb(),S.Mc(8,Ct,5,4,"div",6),S.Rb(),S.Mc(9,At,2,2,"ng-template",null,7,S.Nc)),2&e&&(S.yb(4),S.pc("nodes",t.nodes)("options",t.treeOptions),S.yb(4),S.pc("ngIf",t.data))},directives:[n.b,i.r,i.p,ot.a],styles:[""]}),e})();function Vt(e,t){if(1&e&&(S.Qb(0),S.Nb(1,"br"),S.Sb(2,"span"),S.Wb(3,7),S.Rb(),S.Sb(4,"pre"),S.Oc(5),S.Rb(),S.Pb()),2&e){const e=S.ic(2);S.yb(5),S.Pc(e.status)}}function Wt(e,t){if(1&e&&(S.Sb(0,"cd-alert-panel",2),S.Yb(1,3),S.Qb(2),S.cc(3,4),S.Nb(4,"cd-doc",5),S.Zb(),S.Pb(),S.Mc(5,Vt,6,1,"ng-container",6),S.Rb()),2&e){const e=S.ic();S.yb(5),S.pc("ngIf",e.status)}}function qt(e,t){if(1&e&&S.Nb(0,"cd-iscsi-target-details",16),2&e){const e=S.ic(2);S.pc("cephIscsiConfigVersion",e.cephIscsiConfigVersion)("selection",e.expandedRow)("settings",e.settings)}}const Bt=function(e){return[e]};function Gt(e,t){if(1&e){const e=S.Tb();S.Sb(0,"cd-table",8,9),S.gc("setExpandedRow",(function(t){return S.Dc(e),S.ic().setExpandedRow(t)}))("updateSelection",(function(t){return S.Dc(e),S.ic().updateSelection(t)})),S.Sb(2,"div",10),S.Nb(3,"cd-table-actions",11),S.Sb(4,"button",12),S.gc("click",(function(){return S.Dc(e),S.ic().configureDiscoveryAuth()})),S.Nb(5,"i",13),S.Qb(6),S.Wb(7,14),S.Pb(),S.Rb(),S.Rb(),S.Mc(8,qt,1,3,"cd-iscsi-target-details",15),S.Rb()}if(2&e){const e=S.ic();S.pc("data",e.targets)("columns",e.columns)("hasDetails",!0),S.yb(3),S.pc("permission",e.permission)("selection",e.selection)("tableActions",e.tableActions),S.yb(2),S.pc("ngClass",S.uc(8,Bt,e.icons.key)),S.yb(3),S.pc("ngIf",e.expandedRow)}}let Lt=(()=>{class e extends at.a{constructor(e,t,a,i,o,s,n,r){super(),this.authStorageService=e,this.iscsiService=t,this.joinPipe=a,this.taskListService=i,this.notAvailablePipe=o,this.modalService=s,this.taskWrapper=n,this.actionLabels=r,this.available=void 0,this.selection=new nt.a,this.targets=[],this.icons=N.a,this.builders={"iscsi/target/create":e=>({target_iqn:e.target_iqn})},this.permission=this.authStorageService.getPermissions().iscsi,this.tableActions=[{permission:"create",icon:N.a.add,routerLink:()=>"/block/iscsi/targets/create",name:this.actionLabels.CREATE},{permission:"update",icon:N.a.edit,routerLink:()=>"/block/iscsi/targets/edit/"+this.selection.first().target_iqn,name:this.actionLabels.EDIT,disable:()=>this.getEditDisableDesc()},{permission:"delete",icon:N.a.destroy,click:()=>this.deleteIscsiTargetModal(),name:this.actionLabels.DELETE,disable:()=>this.getDeleteDisableDesc()}]}ngOnInit(){this.columns=[{name:"Target",prop:"target_iqn",flexGrow:2,cellTransformation:st.a.executing},{name:"Portals",prop:"cdPortals",pipe:this.joinPipe,flexGrow:2},{name:"Images",prop:"cdImages",pipe:this.joinPipe,flexGrow:2},{name:"# Sessions",prop:"info.num_sessions",pipe:this.notAvailablePipe,flexGrow:1}],this.iscsiService.status().subscribe(e=>{this.available=e.available,e.available?(this.iscsiService.version().subscribe(e=>{this.cephIscsiConfigVersion=e.ceph_iscsi_config_version,this.taskListService.init(()=>this.iscsiService.listTargets(),e=>this.prepareResponse(e),e=>this.targets=e,()=>this.onFetchError(),this.taskFilter,this.itemFilter,this.builders)}),this.iscsiService.settings().subscribe(e=>{this.settings=e})):this.status=e.message})}ngOnDestroy(){this.summaryDataSubscription&&this.summaryDataSubscription.unsubscribe()}getEditDisableDesc(){const e=this.selection.first();return e&&(null==e?void 0:e.cdExecuting)?e.cdExecuting:e&&m.a.isUndefined(null==e?void 0:e.info)?"Unavailable gateway(s)":!e}getDeleteDisableDesc(){var e;const t=this.selection.first();return(null==t?void 0:t.cdExecuting)?t.cdExecuting:t&&m.a.isUndefined(null==t?void 0:t.info)?"Unavailable gateway(s)":t&&(null===(e=null==t?void 0:t.info)||void 0===e?void 0:e.num_sessions)?"Target has active sessions":!t}prepareResponse(e){return e.forEach(e=>{e.cdPortals=e.portals.map(e=>`${e.host}:${e.ip}`),e.cdImages=e.disks.map(e=>`${e.pool}/${e.image}`)}),e}onFetchError(){this.table.reset()}itemFilter(e,t){return e.target_iqn===t.metadata.target_iqn}taskFilter(e){return["iscsi/target/create","iscsi/target/edit","iscsi/target/delete"].includes(e.name)}updateSelection(e){this.selection=e}deleteIscsiTargetModal(){const e=this.selection.first().target_iqn;this.modalRef=this.modalService.show(it.a,{itemDescription:"iSCSI target",itemNames:[e],submitActionObservable:()=>this.taskWrapper.wrapTaskAroundCall({task:new F.a("iscsi/target/delete",{target_iqn:e}),call:this.iscsiService.deleteTarget(e)})})}configureDiscoveryAuth(){this.modalService.show(Rt)}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(lt.a),S.Mb(v),S.Mb(rt.a),S.Mb(bt.a),S.Mb(ct.a),S.Mb(P.a),S.Mb(z.a),S.Mb(l.b))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-iscsi-target-list"]],viewQuery:function(e,t){var a;1&e&&S.Tc(ot.a,!0),2&e&&S.zc(a=S.hc())&&(t.table=a.first)},features:[S.xb([bt.a]),S.vb],decls:3,vars:2,consts:function(){return[["type","info",4,"ngIf",6,"title"],["columnMode","flex","identifier","target_iqn","forceIdentifier","true","selectionType","single",3,"data","columns","hasDetails","setExpandedRow","updateSelection",4,"ngIf"],["type","info",6,"title"],["title","iSCSI Targets not available"],"Please consult the " + "\ufffd#4\ufffd" + "" + "\ufffd/#4\ufffd" + " on how to configure and enable the iSCSI Targets management functionality.",["section","iscsi"],[4,"ngIf"],"Available information:",["columnMode","flex","identifier","target_iqn","forceIdentifier","true","selectionType","single",3,"data","columns","hasDetails","setExpandedRow","updateSelection"],["table",""],[1,"table-actions","btn-toolbar"],[1,"btn-group",3,"permission","selection","tableActions"],["type","button",1,"btn","btn-light",3,"click"],["aria-hidden","true",3,"ngClass"],"Discovery authentication",["cdTableDetail","",3,"cephIscsiConfigVersion","selection","settings",4,"ngIf"],["cdTableDetail","",3,"cephIscsiConfigVersion","selection","settings"]]},template:function(e,t){1&e&&(S.Nb(0,"cd-iscsi-tabs"),S.Mc(1,Wt,6,1,"cd-alert-panel",0),S.Mc(2,Gt,9,10,"cd-table",1)),2&e&&(S.yb(1),S.pc("ngIf",!1===t.available),S.yb(1),S.pc("ngIf",!0===t.available))},directives:[wt,i.r,_t.a,kt.a,ot.a,Mt.a,O.a,i.p,xt],styles:[""]}),e})();var jt=a("o4+5"),Qt=a("dgut"),Ut=a("Dwqy");const Yt=["iscsiSparklineTpl"],Kt=["iscsiPerSecondTpl"],Jt=["iscsiRelativeDateTpl"];function Xt(e,t){if(1&e&&(S.Sb(0,"span"),S.Nb(1,"cd-sparkline",9),S.Rb()),2&e){const e=S.ic(),t=e.value,a=e.row;S.yb(1),S.pc("data",t)("isBinary",a.cdIsBinary)}}function Ht(e,t){1&e&&(S.Sb(0,"span",10),S.Oc(1," n/a "),S.Rb())}function Zt(e,t){if(1&e&&(S.Mc(0,Xt,2,2,"span",7),S.Mc(1,Ht,2,0,"span",8)),2&e){const e=t.row;S.pc("ngIf","user:rbd"===e.backstore),S.yb(1),S.pc("ngIf","user:rbd"!==e.backstore)}}function ea(e,t){if(1&e&&(S.Sb(0,"span"),S.Oc(1),S.Rb()),2&e){const e=S.ic().value;S.yb(1),S.Qc(" ",e," /s ")}}function ta(e,t){1&e&&(S.Sb(0,"span",10),S.Oc(1," n/a "),S.Rb())}function aa(e,t){if(1&e&&(S.Mc(0,ea,2,1,"span",7),S.Mc(1,ta,2,0,"span",8)),2&e){const e=t.row;S.pc("ngIf","user:rbd"===e.backstore),S.yb(1),S.pc("ngIf","user:rbd"!==e.backstore)}}function ia(e,t){if(1&e&&(S.Sb(0,"span"),S.Oc(1),S.jc(2,"notAvailable"),S.jc(3,"relativeDate"),S.Rb()),2&e){const e=S.ic().value;S.yb(1),S.Qc(" ",S.kc(2,1,S.kc(3,3,e))," ")}}function oa(e,t){1&e&&(S.Sb(0,"span",10),S.Oc(1," n/a "),S.Rb())}function sa(e,t){if(1&e&&(S.Mc(0,ia,4,5,"span",7),S.Mc(1,oa,2,0,"span",8)),2&e){const e=t.row;S.pc("ngIf","user:rbd"===e.backstore),S.yb(1),S.pc("ngIf","user:rbd"!==e.backstore)}}let na=(()=>{class e{constructor(e,t,a){this.iscsiService=e,this.dimlessPipe=t,this.iscsiBackstorePipe=a,this.gateways=[],this.images=[]}ngOnInit(){this.gatewaysColumns=[{name:"Name",prop:"name"},{name:"State",prop:"state",flexGrow:1,cellTransformation:st.a.badge,customTemplateConfig:{map:{up:{class:"badge-success"},down:{class:"badge-danger"}}}},{name:"# Targets",prop:"num_targets"},{name:"# Sessions",prop:"num_sessions"}],this.imagesColumns=[{name:"Pool",prop:"pool"},{name:"Image",prop:"image"},{name:"Backstore",prop:"backstore",pipe:this.iscsiBackstorePipe},{name:"Read Bytes",prop:"stats_history.rd_bytes",cellTemplate:this.iscsiSparklineTpl},{name:"Write Bytes",prop:"stats_history.wr_bytes",cellTemplate:this.iscsiSparklineTpl},{name:"Read Ops",prop:"stats.rd",pipe:this.dimlessPipe,cellTemplate:this.iscsiPerSecondTpl},{name:"Write Ops",prop:"stats.wr",pipe:this.dimlessPipe,cellTemplate:this.iscsiPerSecondTpl},{name:"A/O Since",prop:"optimized_since",cellTemplate:this.iscsiRelativeDateTpl}]}refresh(){this.iscsiService.overview().subscribe(e=>{this.gateways=e.gateways,this.images=e.images,this.images.map(e=>(e.stats_history&&(e.stats_history.rd_bytes=e.stats_history.rd_bytes.map(e=>e[1]),e.stats_history.wr_bytes=e.stats_history.wr_bytes.map(e=>e[1])),e.cdIsBinary=!0,e))})}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(v),S.Mb(jt.a),S.Mb(Y.a))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-iscsi"]],viewQuery:function(e,t){var a;1&e&&(S.Jc(Yt,!0),S.Jc(Kt,!0),S.Jc(Jt,!0)),2&e&&(S.zc(a=S.hc())&&(t.iscsiSparklineTpl=a.first),S.zc(a=S.hc())&&(t.iscsiPerSecondTpl=a.first),S.zc(a=S.hc())&&(t.iscsiRelativeDateTpl=a.first))},decls:13,vars:4,consts:function(){return["Gateways",[3,"data","columns","fetchData"],"Images",[3,"data","columns"],["iscsiSparklineTpl",""],["iscsiPerSecondTpl",""],["iscsiRelativeDateTpl",""],[4,"ngIf"],["class","text-muted",4,"ngIf"],[3,"data","isBinary"],[1,"text-muted"]]},template:function(e,t){1&e&&(S.Nb(0,"cd-iscsi-tabs"),S.Sb(1,"legend"),S.Wb(2,0),S.Rb(),S.Sb(3,"cd-table",1),S.gc("fetchData",(function(){return t.refresh()})),S.Rb(),S.Sb(4,"legend"),S.Wb(5,2),S.Rb(),S.Nb(6,"cd-table",3),S.Mc(7,Zt,2,2,"ng-template",null,4,S.Nc),S.Mc(9,aa,2,2,"ng-template",null,5,S.Nc),S.Mc(11,sa,2,2,"ng-template",null,6,S.Nc)),2&e&&(S.yb(3),S.pc("data",t.gateways)("columns",t.gatewaysColumns),S.yb(3),S.pc("data",t.images)("columns",t.imagesColumns))},directives:[wt,ot.a,i.r,Qt.a],pipes:[ct.a,Ut.a],styles:[""]}),e})(),ra=(()=>{class e{}return e.\u0275mod=S.Kb({type:e}),e.\u0275inj=S.Jb({factory:function(t){return new(t||e)},imports:[[i.c,d.a,r.t,s.i,o.m,o.x,r.A]]}),e})();var ca=a("quSY"),la=a("2Vo4"),ba=a("pLZG"),da=a("lOp/");let pa=(()=>{let e=class{constructor(e,t){this.http=e,this.timerService=t,this.REFRESH_INTERVAL=3e4,this.summaryDataSource=new la.a(null),this.summaryData$=this.summaryDataSource.asObservable()}startPolling(){return this.timerService.get(()=>this.retrieveSummaryObservable(),this.REFRESH_INTERVAL).subscribe(this.retrieveSummaryObserver())}refresh(){return this.retrieveSummaryObservable().subscribe(this.retrieveSummaryObserver())}retrieveSummaryObservable(){return this.http.get("api/block/mirroring/summary")}retrieveSummaryObserver(){return e=>{this.summaryDataSource.next(e)}}subscribeSummary(e,t){return this.summaryData$.pipe(Object(ba.a)(e=>!!e)).subscribe(e,t)}getPool(e){return this.http.get("api/block/mirroring/pool/"+e)}updatePool(e,t){return this.http.put("api/block/mirroring/pool/"+e,t,{observe:"response"})}getSiteName(){return this.http.get("api/block/mirroring/site_name")}setSiteName(e){return this.http.put("api/block/mirroring/site_name",{site_name:e},{observe:"response"})}createBootstrapToken(e){return this.http.post(`api/block/mirroring/pool/${e}/bootstrap/token`,{})}importBootstrapToken(e,t,a){return this.http.post(`api/block/mirroring/pool/${e}/bootstrap/peer`,{direction:t,token:a},{observe:"response"})}getPeer(e,t){return this.http.get(`api/block/mirroring/pool/${e}/peer/${t}`)}addPeer(e,t){return this.http.post(`api/block/mirroring/pool/${e}/peer`,t,{observe:"response"})}updatePeer(e,t,a){return this.http.put(`api/block/mirroring/pool/${e}/peer/${t}`,a,{observe:"response"})}deletePeer(e,t){return this.http.delete(`api/block/mirroring/pool/${e}/peer/${t}`,{observe:"response"})}};return e.\u0275fac=function(t){return new(t||e)(S.dc(h.b),S.dc(da.a))},e.\u0275prov=S.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),Object(f.b)([Object(f.e)(0,g.b),Object(f.d)("design:type",Function),Object(f.d)("design:paramtypes",[String]),Object(f.d)("design:returntype",void 0)],e.prototype,"setSiteName",null),Object(f.b)([Object(f.e)(1,g.b),Object(f.e)(2,g.b),Object(f.d)("design:type",Function),Object(f.d)("design:paramtypes",[String,String,String]),Object(f.d)("design:returntype",void 0)],e.prototype,"importBootstrapToken",null),e=Object(f.b)([g.a,Object(f.d)("design:paramtypes",[h.b,da.a])],e),e})();var ma=a("GyhO"),ua=a("vkgz"),fa=a("NJ9Y"),ha=a("IZUe"),ga=a("sb0X"),Sa=a("Z21x");function va(e,t){1&e&&(S.Sb(0,"span",28),S.Wb(1,29),S.Rb())}function ya(e,t){if(1&e&&(S.Sb(0,"div",30),S.Nb(1,"input",31),S.Sb(2,"label",32),S.Oc(3),S.Rb(),S.Rb()),2&e){const e=t.$implicit;S.yb(1),S.qc("id",e.name),S.qc("name",e.name),S.qc("formControlName",e.name),S.yb(1),S.qc("for",e.name),S.yb(1),S.Pc(e.name)}}function Ra(e,t){1&e&&(S.Sb(0,"span",28),S.Wb(1,33),S.Rb())}let wa=(()=>{class e{constructor(e,t,a){this.activeModal=e,this.rbdMirroringService=t,this.taskWrapper=a,this.pools=[],this.createForm()}createForm(){this.createBootstrapForm=new $.a({siteName:new o.h("",{validators:[o.A.required]}),pools:new o.j({},{validators:[this.validatePools()]}),token:new o.h("",{})})}ngOnInit(){this.createBootstrapForm.get("siteName").setValue(this.siteName),this.rbdMirroringService.getSiteName().subscribe(e=>{this.createBootstrapForm.get("siteName").setValue(e.site_name)}),this.subs=this.rbdMirroringService.subscribeSummary(e=>{this.pools=e.content_data.pools.reduce((e,t)=>(e.push({name:t.name,mirror_mode:t.mirror_mode}),e),[]);const t=this.createBootstrapForm.get("pools");m.a.each(this.pools,e=>{const a=e.name,i="disabled"===e.mirror_mode,s=t.controls[a];s?i&&s.disabled?s.enable():!i&&s.enabled&&(s.disable(),s.setValue(!0)):t.addControl(a,new o.h({value:!i,disabled:!i}))})})}ngOnDestroy(){this.subs&&this.subs.unsubscribe()}validatePools(){return e=>{let t=0;return m.a.each(e.controls,e=>{!0===e.value&&++t}),t>0?null:{requirePool:!0}}}generate(){this.createBootstrapForm.get("token").setValue("");let e="";const t=[],a=this.createBootstrapForm.get("pools");m.a.each(a.controls,(a,i)=>{!0===a.value&&(e=i,a.disabled||t.push(i))});const i={mirror_mode:"image"},o=Object(ma.a)(this.rbdMirroringService.setSiteName(this.createBootstrapForm.getValue("siteName")),Object(u.a)(t.map(e=>this.rbdMirroringService.updatePool(e,i))),this.rbdMirroringService.createBootstrapToken(e).pipe(Object(ua.a)(e=>this.createBootstrapForm.get("token").setValue(e.token)))).pipe(Object(fa.a)()),s=()=>{this.rbdMirroringService.refresh(),this.createBootstrapForm.setErrors({cdSubmitButton:!0})};this.taskWrapper.wrapTaskAroundCall({task:new F.a("rbd/mirroring/bootstrap/create",{}),call:o}).subscribe({error:s,complete:s})}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(r.a),S.Mb(pa),S.Mb(z.a))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-bootstrap-create-modal"]],decls:35,vars:6,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"Create Bootstrap Token",[1,"modal-content"],["name","createBootstrapForm","novalidate","",1,"form",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],"To create a bootstrap token which can be imported by a peer site cluster, provide the local site's name, select which pools will have mirroring enabled, and click\xA0 " + "\ufffd#10\ufffd" + "Generate" + "\ufffd/#10\ufffd" + ".",[1,"form-group"],["for","siteName",1,"col-form-label","required"],"Site Name",["type","text","id","siteName","name","siteName","formControlName","siteName","autofocus","",1,"form-control",6,"placeholder"],["placeholder","Name..."],["class","invalid-feedback",4,"ngIf"],["formGroupName","pools",1,"form-group"],["for","pools",1,"col-form-label","required"],"Pools",["class","custom-control custom-checkbox",4,"ngFor","ngForOf"],[1,"mb-4","float-right",3,"form","submitAction"],"Generate",["for","token",1,"col-form-label"],"Token",["id","token","formControlName","token","readonly","",1,"form-control","resize-vertical",6,"placeholder"],["placeholder","Generated token..."],["source","token",1,"float-right"],[1,"modal-footer"],[3,"backAction",6,"name"],["name","Close"],[1,"invalid-feedback"],"This field is required.",[1,"custom-control","custom-checkbox"],["type","checkbox",1,"custom-control-input",3,"id","name","formControlName"],[1,"custom-control-label",3,"for"],"At least one pool is required."]},template:function(e,t){if(1&e&&(S.Sb(0,"cd-modal",0),S.Qb(1,1),S.Wb(2,2),S.Pb(),S.Qb(3,3),S.Sb(4,"form",4,5),S.Sb(6,"div",6),S.Sb(7,"p"),S.Qb(8),S.cc(9,7),S.Nb(10,"kbd"),S.Zb(),S.Pb(),S.Rb(),S.Sb(11,"div",8),S.Sb(12,"label",9),S.Wb(13,10),S.Rb(),S.Sb(14,"input",11),S.Yb(15,12),S.Rb(),S.Mc(16,va,2,0,"span",13),S.Rb(),S.Sb(17,"div",14),S.Sb(18,"label",15),S.Wb(19,16),S.Rb(),S.Mc(20,ya,4,5,"div",17),S.Mc(21,Ra,2,0,"span",13),S.Rb(),S.Sb(22,"cd-submit-button",18),S.gc("submitAction",(function(){return t.generate()})),S.Wb(23,19),S.Rb(),S.Sb(24,"div",8),S.Sb(25,"label",20),S.Sb(26,"span"),S.Wb(27,21),S.Rb(),S.Rb(),S.Sb(28,"textarea",22),S.Yb(29,23),S.Oc(30," "),S.Rb(),S.Rb(),S.Nb(31,"cd-copy-2-clipboard-button",24),S.Rb(),S.Sb(32,"div",25),S.Sb(33,"cd-back-button",26),S.Yb(34,27),S.gc("backAction",(function(){return t.activeModal.close()})),S.Rb(),S.Rb(),S.Rb(),S.Pb(),S.Rb()),2&e){const e=S.Ac(5);S.pc("modalRef",t.activeModal),S.yb(4),S.pc("formGroup",t.createBootstrapForm),S.yb(12),S.pc("ngIf",t.createBootstrapForm.showError("siteName",e,"required")),S.yb(4),S.pc("ngForOf",t.pools),S.yb(1),S.pc("ngIf",t.createBootstrapForm.showError("pools",e,"requirePool")),S.yb(1),S.pc("form",t.createBootstrapForm)}},directives:[E.a,o.C,o.r,C.a,o.k,D.a,O.a,o.d,A.a,o.q,o.i,ha.a,i.r,o.l,i.q,ga.a,ce.a,Sa.a,o.b],styles:[".form-group.ng-invalid[_ngcontent-%COMP%] .invalid-feedback[_ngcontent-%COMP%]{display:block}"]}),e})();function _a(e,t){1&e&&(S.Sb(0,"span",28),S.Wb(1,29),S.Rb())}function ka(e,t){if(1&e&&(S.Sb(0,"option",30),S.Oc(1),S.Rb()),2&e){const e=t.$implicit;S.pc("value",e.key),S.yb(1),S.Pc(e.desc)}}function Ma(e,t){if(1&e&&(S.Sb(0,"div",31),S.Nb(1,"input",32),S.Sb(2,"label",33),S.Oc(3),S.Rb(),S.Rb()),2&e){const e=t.$implicit;S.yb(1),S.qc("id",e.name),S.qc("name",e.name),S.qc("formControlName",e.name),S.yb(1),S.qc("for",e.name),S.yb(1),S.Pc(e.name)}}function Na(e,t){1&e&&(S.Sb(0,"span",28),S.Wb(1,34),S.Rb())}function Ia(e,t){1&e&&(S.Sb(0,"span",28),S.Wb(1,35),S.Rb())}function $a(e,t){1&e&&(S.Sb(0,"span",28),S.Wb(1,36),S.Rb())}let Ta=(()=>{class e{constructor(e,t,a,i){this.activeModal=e,this.actionLabels=t,this.rbdMirroringService=a,this.taskWrapper=i,this.pools=[],this.directions=[{key:"rx-tx",desc:"Bidirectional"},{key:"rx",desc:"Unidirectional (receive-only)"}],this.createForm()}createForm(){this.importBootstrapForm=new $.a({siteName:new o.h("",{validators:[o.A.required]}),direction:new o.h("rx-tx",{}),pools:new o.j({},{validators:[this.validatePools()]}),token:new o.h("",{validators:[o.A.required,this.validateToken()]})})}ngOnInit(){this.rbdMirroringService.getSiteName().subscribe(e=>{this.importBootstrapForm.get("siteName").setValue(e.site_name)}),this.subs=this.rbdMirroringService.subscribeSummary(e=>{this.pools=e.content_data.pools.reduce((e,t)=>(e.push({name:t.name,mirror_mode:t.mirror_mode}),e),[]);const t=this.importBootstrapForm.get("pools");m.a.each(this.pools,e=>{const a=e.name,i="disabled"===e.mirror_mode,s=t.controls[a];s?i&&s.disabled?s.enable():!i&&s.enabled&&(s.disable(),s.setValue(!0)):t.addControl(a,new o.h({value:!i,disabled:!i}))})})}ngOnDestroy(){this.subs&&this.subs.unsubscribe()}validatePools(){return e=>{let t=0;return m.a.each(e.controls,e=>{!0===e.value&&++t}),t>0?null:{requirePool:!0}}}validateToken(){return e=>{try{if(JSON.parse(atob(e.value)))return null}catch(t){}return{invalidToken:!0}}}import(){const e=[],t=[],a=this.importBootstrapForm.get("pools");m.a.each(a.controls,(a,i)=>{!0===a.value&&(e.push(i),a.disabled||t.push(i))});const i={mirror_mode:"image"};let o=Object(ma.a)(this.rbdMirroringService.setSiteName(this.importBootstrapForm.getValue("siteName")),Object(u.a)(t.map(e=>this.rbdMirroringService.updatePool(e,i))));o=e.reduce((e,t)=>Object(ma.a)(e,this.rbdMirroringService.importBootstrapToken(t,this.importBootstrapForm.getValue("direction"),this.importBootstrapForm.getValue("token"))),o).pipe(Object(fa.a)());const s=()=>{this.rbdMirroringService.refresh(),this.importBootstrapForm.setErrors({cdSubmitButton:!0})};this.taskWrapper.wrapTaskAroundCall({task:new F.a("rbd/mirroring/bootstrap/import",{}),call:o}).subscribe({error:s,complete:()=>{s(),this.activeModal.close()}})}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(r.a),S.Mb(l.b),S.Mb(pa),S.Mb(z.a))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-bootstrap-import-modal"]],decls:38,vars:10,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"Import Bootstrap Token",[1,"modal-content"],["name","importBootstrapForm","novalidate","",1,"form",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],"To import a bootstrap token which was created by a peer site cluster, provide the local site's name, select which pools will have mirroring enabled, provide the generated token, and click\xA0" + "\ufffd#10\ufffd" + "Import" + "\ufffd/#10\ufffd" + ".",[1,"form-group"],["for","siteName",1,"col-form-label","required"],"Site Name",["type","text","id","siteName","name","siteName","formControlName","siteName","autofocus","",1,"form-control",6,"placeholder"],["placeholder","Name..."],["class","invalid-feedback",4,"ngIf"],["for","direction",1,"col-form-label"],"Direction",["id","direction","name","direction","formControlName","direction",1,"form-control","custom-select"],[3,"value",4,"ngFor","ngForOf"],["formGroupName","pools",1,"form-group"],["for","pools",1,"col-form-label","required"],"Pools",["class","custom-control custom-checkbox",4,"ngFor","ngForOf"],["for","token",1,"col-form-label","required"],"Token",["id","token","formControlName","token",1,"form-control","resize-vertical",6,"placeholder"],["placeholder","Generated token..."],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required.",[3,"value"],[1,"custom-control","custom-checkbox"],["type","checkbox",1,"custom-control-input",3,"id","name","formControlName"],[1,"custom-control-label",3,"for"],"At least one pool is required.","This field is required.","The token is invalid."]},template:function(e,t){if(1&e&&(S.Sb(0,"cd-modal",0),S.Qb(1,1),S.Wb(2,2),S.Pb(),S.Qb(3,3),S.Sb(4,"form",4,5),S.Sb(6,"div",6),S.Sb(7,"p"),S.Qb(8),S.cc(9,7),S.Nb(10,"kbd"),S.Zb(),S.Pb(),S.Rb(),S.Sb(11,"div",8),S.Sb(12,"label",9),S.Wb(13,10),S.Rb(),S.Sb(14,"input",11),S.Yb(15,12),S.Rb(),S.Mc(16,_a,2,0,"span",13),S.Rb(),S.Sb(17,"div",8),S.Sb(18,"label",14),S.Sb(19,"span"),S.Wb(20,15),S.Rb(),S.Rb(),S.Sb(21,"select",16),S.Mc(22,ka,2,2,"option",17),S.Rb(),S.Rb(),S.Sb(23,"div",18),S.Sb(24,"label",19),S.Wb(25,20),S.Rb(),S.Mc(26,Ma,4,5,"div",21),S.Mc(27,Na,2,0,"span",13),S.Rb(),S.Sb(28,"div",8),S.Sb(29,"label",22),S.Wb(30,23),S.Rb(),S.Sb(31,"textarea",24),S.Yb(32,25),S.Oc(33," "),S.Rb(),S.Mc(34,Ia,2,0,"span",13),S.Mc(35,$a,2,0,"span",13),S.Rb(),S.Rb(),S.Sb(36,"div",26),S.Sb(37,"cd-form-button-panel",27),S.gc("submitActionEvent",(function(){return t.import()})),S.Rb(),S.Rb(),S.Rb(),S.Pb(),S.Rb()),2&e){const e=S.Ac(5);S.pc("modalRef",t.activeModal),S.yb(4),S.pc("formGroup",t.importBootstrapForm),S.yb(12),S.pc("ngIf",t.importBootstrapForm.showError("siteName",e,"required")),S.yb(6),S.pc("ngForOf",t.directions),S.yb(4),S.pc("ngForOf",t.pools),S.yb(1),S.pc("ngIf",t.importBootstrapForm.showError("pools",e,"requirePool")),S.yb(7),S.pc("ngIf",t.importBootstrapForm.showError("token",e,"required")),S.yb(1),S.pc("ngIf",t.importBootstrapForm.showError("token",e,"invalidToken")),S.yb(2),S.pc("form",t.importBootstrapForm)("submitText",t.actionLabels.SUBMIT)}},directives:[E.a,o.C,o.r,C.a,o.k,D.a,O.a,o.d,A.a,o.q,o.i,ha.a,i.r,o.z,i.q,o.l,x.a,o.u,o.B,o.b],styles:[""]}),e})(),Fa=(()=>{class e{constructor(e,t,a,i){this.activeModal=e,this.actionLabels=t,this.rbdMirroringService=a,this.taskWrapper=i,this.createForm()}createForm(){this.editSiteNameForm=new $.a({siteName:new o.h("",{})})}ngOnInit(){this.editSiteNameForm.get("siteName").setValue(this.siteName),this.rbdMirroringService.getSiteName().subscribe(e=>{this.editSiteNameForm.get("siteName").setValue(e.site_name)})}update(){this.taskWrapper.wrapTaskAroundCall({task:new F.a("rbd/mirroring/site_name/edit",{}),call:this.rbdMirroringService.setSiteName(this.editSiteNameForm.getValue("siteName"))}).subscribe({error:()=>this.editSiteNameForm.setErrors({cdSubmitButton:!0}),complete:()=>{this.rbdMirroringService.refresh(),this.activeModal.close()}})}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(r.a),S.Mb(l.b),S.Mb(pa),S.Mb(z.a))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-edit-site-mode-modal"]],decls:18,vars:4,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"Edit site name",[1,"modal-content"],["name","editSiteNameForm","novalidate","",1,"form",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],"Edit the site name and click\xA0 " + "\ufffd#10\ufffd" + "Update" + "\ufffd/#10\ufffd" + ".",[1,"form-group"],["for","siteName",1,"col-form-label","required"],"Site Name",["type","text","id","siteName","name","siteName","formControlName","siteName","autofocus","",1,"form-control",6,"placeholder"],["placeholder","Name..."],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"]]},template:function(e,t){1&e&&(S.Sb(0,"cd-modal",0),S.Qb(1,1),S.Wb(2,2),S.Pb(),S.Qb(3,3),S.Sb(4,"form",4,5),S.Sb(6,"div",6),S.Sb(7,"p"),S.Qb(8),S.cc(9,7),S.Nb(10,"kbd"),S.Zb(),S.Pb(),S.Rb(),S.Sb(11,"div",8),S.Sb(12,"label",9),S.Wb(13,10),S.Rb(),S.Sb(14,"input",11),S.Yb(15,12),S.Rb(),S.Rb(),S.Rb(),S.Sb(16,"div",13),S.Sb(17,"cd-form-button-panel",14),S.gc("submitActionEvent",(function(){return t.update()})),S.Rb(),S.Rb(),S.Rb(),S.Pb(),S.Rb()),2&e&&(S.pc("modalRef",t.activeModal),S.yb(4),S.pc("formGroup",t.editSiteNameForm),S.yb(13),S.pc("form",t.editSiteNameForm)("submitText",t.actionLabels.UPDATE))},directives:[E.a,o.C,o.r,C.a,o.k,D.a,O.a,o.d,A.a,o.q,o.i,ha.a,x.a],styles:[""]}),e})();var Pa=a("VxPD"),za=a("85J/");let Ea=(()=>{class e{transform(e){return"warning"===e?"badge badge-warning":"error"===e?"badge badge-danger":"success"===e?"badge badge-success":"badge badge-info"}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=S.Lb({name:"mirrorHealthColor",type:e,pure:!0}),e})();const Ca=["healthTmpl"];function Da(e,t){if(1&e&&(S.Sb(0,"span",2),S.jc(1,"mirrorHealthColor"),S.Oc(2),S.Rb()),2&e){const e=t.value;S.pc("ngClass",S.kc(1,2,t.row.health_color)),S.yb(2),S.Pc(e)}}let Oa=(()=>{class e{constructor(e,t){this.rbdMirroringService=e,this.cephShortVersionPipe=t,this.tableStatus=new Pa.a}ngOnInit(){this.columns=[{prop:"instance_id",name:"Instance",flexGrow:2},{prop:"id",name:"ID",flexGrow:2},{prop:"server_hostname",name:"Hostname",flexGrow:2},{prop:"version",name:"Version",pipe:this.cephShortVersionPipe,flexGrow:2},{prop:"health",name:"Health",cellTemplate:this.healthTmpl,flexGrow:1}],this.subs=this.rbdMirroringService.subscribeSummary(e=>{this.data=e.content_data.daemons,this.tableStatus=new Pa.a(e.status)})}ngOnDestroy(){this.subs.unsubscribe()}refresh(){this.rbdMirroringService.refresh()}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(pa),S.Mb(za.a))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-mirroring-daemons"]],viewQuery:function(e,t){var a;1&e&&S.Jc(Ca,!0),2&e&&S.zc(a=S.hc())&&(t.healthTmpl=a.first)},decls:3,vars:4,consts:[["columnMode","flex",3,"data","columns","autoReload","status","fetchData"],["healthTmpl",""],[3,"ngClass"]],template:function(e,t){1&e&&(S.Sb(0,"cd-table",0),S.gc("fetchData",(function(){return t.refresh()})),S.Rb(),S.Mc(1,Da,3,4,"ng-template",null,1,S.Nc)),2&e&&S.pc("data",t.data)("columns",t.columns)("autoReload",-1)("status",t.tableStatus)},directives:[ot.a,i.p],pipes:[Ea],styles:[""]}),e})();var Aa=a("HDdC");class xa{}function Va(e,t){if(1&e&&(S.Sb(0,"option",16),S.Oc(1),S.Rb()),2&e){const e=t.$implicit;S.pc("value",e.id),S.yb(1),S.Pc(e.name)}}function Wa(e,t){1&e&&(S.Sb(0,"span",17),S.Wb(1,18),S.Rb())}let qa=(()=>{class e{constructor(e,t,a,i){this.activeModal=e,this.actionLabels=t,this.rbdMirroringService=a,this.taskWrapper=i,this.bsConfig={containerClass:"theme-default"},this.peerExists=!1,this.mirrorModes=[{id:"disabled",name:"Disabled"},{id:"pool",name:"Pool"},{id:"image",name:"Image"}],this.createForm()}createForm(){this.editModeForm=new $.a({mirrorMode:new o.h("",{validators:[o.A.required,this.validateMode.bind(this)]})})}ngOnInit(){this.pattern=""+this.poolName,this.rbdMirroringService.getPool(this.poolName).subscribe(e=>{this.setResponse(e)}),this.subs=this.rbdMirroringService.subscribeSummary(e=>{this.peerExists=!1;const t=e.content_data.pools.find(e=>this.poolName===e.name);this.peerExists=t&&t.peer_uuids.length})}ngOnDestroy(){this.subs.unsubscribe()}validateMode(e){return"disabled"===e.value&&this.peerExists?{cannotDisable:{value:e.value}}:null}setResponse(e){this.editModeForm.get("mirrorMode").setValue(e.mirror_mode)}update(){const e=new xa;e.mirror_mode=this.editModeForm.getValue("mirrorMode"),this.taskWrapper.wrapTaskAroundCall({task:new F.a("rbd/mirroring/pool/edit",{pool_name:this.poolName}),call:this.rbdMirroringService.updatePool(this.poolName,e)}).subscribe({error:()=>this.editModeForm.setErrors({cdSubmitButton:!0}),complete:()=>{this.rbdMirroringService.refresh(),this.activeModal.close()}})}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(r.a),S.Mb(l.b),S.Mb(pa),S.Mb(z.a))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-pool-edit-mode-modal"]],decls:21,vars:7,consts:function(){var e,t;return e="Edit pool mirror mode",t="To edit the mirror mode for pool\xA0 " + "[\ufffd#10\ufffd|\ufffd#11\ufffd]" + "" + "\ufffd0\ufffd" + "" + "[\ufffd/#10\ufffd|\ufffd/#11\ufffd]" + ", select a new mode from the list and click\xA0 " + "[\ufffd#10\ufffd|\ufffd#11\ufffd]" + "Update" + "[\ufffd/#10\ufffd|\ufffd/#11\ufffd]" + ".",[[3,"modalRef"],[1,"modal-title"],e,[1,"modal-content"],["name","editModeForm","novalidate","",1,"form",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],t=S.bc(t),[1,"form-group"],["for","mirrorMode",1,"col-form-label"],"Mode",["id","mirrorMode","name","mirrorMode","formControlName","mirrorMode",1,"form-control","custom-select"],[3,"value",4,"ngFor","ngForOf"],["class","invalid-feedback",4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[3,"value"],[1,"invalid-feedback"],"Peer clusters must be removed prior to disabling mirror."]},template:function(e,t){if(1&e&&(S.Sb(0,"cd-modal",0),S.Qb(1,1),S.Wb(2,2),S.Pb(),S.Qb(3,3),S.Sb(4,"form",4,5),S.Sb(6,"div",6),S.Sb(7,"p"),S.Qb(8),S.cc(9,7),S.Nb(10,"kbd"),S.Nb(11,"kbd"),S.Zb(),S.Pb(),S.Rb(),S.Sb(12,"div",8),S.Sb(13,"label",9),S.Sb(14,"span"),S.Wb(15,10),S.Rb(),S.Rb(),S.Sb(16,"select",11),S.Mc(17,Va,2,2,"option",12),S.Rb(),S.Mc(18,Wa,2,0,"span",13),S.Rb(),S.Rb(),S.Sb(19,"div",14),S.Sb(20,"cd-form-button-panel",15),S.gc("submitActionEvent",(function(){return t.update()})),S.Rb(),S.Rb(),S.Rb(),S.Pb(),S.Rb()),2&e){const e=S.Ac(5);S.pc("modalRef",t.activeModal),S.yb(4),S.pc("formGroup",t.editModeForm),S.yb(7),S.ac(t.poolName),S.Xb(9),S.yb(6),S.pc("ngForOf",t.mirrorModes),S.yb(1),S.pc("ngIf",t.editModeForm.showError("mirrorMode",e,"cannotDisable")),S.yb(2),S.pc("form",t.editModeForm)("submitText",t.actionLabels.UPDATE)}},directives:[E.a,o.C,o.r,C.a,o.k,D.a,O.a,o.z,A.a,o.q,o.i,i.q,i.r,x.a,o.u,o.B],styles:[""]}),e})();class Ba{}function Ga(e,t){1&e&&(S.Sb(0,"span",28),S.Wb(1,29),S.Rb())}function La(e,t){1&e&&(S.Sb(0,"span",28),S.Wb(1,30),S.Rb())}function ja(e,t){1&e&&(S.Sb(0,"span",28),S.Wb(1,31),S.Rb())}function Qa(e,t){1&e&&(S.Sb(0,"span",28),S.Wb(1,32),S.Rb())}function Ua(e,t){1&e&&(S.Sb(0,"span",28),S.Wb(1,33),S.Rb())}function Ya(e,t){1&e&&(S.Sb(0,"span",28),S.Wb(1,34),S.Rb())}let Ka=(()=>{class e{constructor(e,t,a,i){this.activeModal=e,this.actionLabels=t,this.rbdMirroringService=a,this.taskWrapper=i,this.bsConfig={containerClass:"theme-default"},this.createForm()}createForm(){this.editPeerForm=new $.a({clusterName:new o.h("",{validators:[o.A.required,this.validateClusterName]}),clientID:new o.h("",{validators:[o.A.required,this.validateClientID]}),monAddr:new o.h("",{validators:[this.validateMonAddr]}),key:new o.h("",{validators:[this.validateKey]})})}ngOnInit(){this.pattern=`${this.poolName}/${this.peerUUID}`,"edit"===this.mode&&this.rbdMirroringService.getPeer(this.poolName,this.peerUUID).subscribe(e=>{this.setResponse(e)})}validateClusterName(e){if(!e.value.match(/^[\w\-_]*$/))return{invalidClusterName:{value:e.value}}}validateClientID(e){if(!e.value.match(/^(?!client\.)[\w\-_.]*$/))return{invalidClientID:{value:e.value}}}validateMonAddr(e){if(!e.value.match(/^[,; ]*([\w.\-_\[\]]+(:[\d]+)?[,; ]*)*$/))return{invalidMonAddr:{value:e.value}}}validateKey(e){try{if(""===e.value||atob(e.value))return null}catch(t){}return{invalidKey:{value:e.value}}}setResponse(e){this.response=e,this.editPeerForm.get("clusterName").setValue(e.cluster_name),this.editPeerForm.get("clientID").setValue(e.client_id),this.editPeerForm.get("monAddr").setValue(e.mon_host),this.editPeerForm.get("key").setValue(e.key)}update(){const e=new Ba;let t;e.cluster_name=this.editPeerForm.getValue("clusterName"),e.client_id=this.editPeerForm.getValue("clientID"),e.mon_host=this.editPeerForm.getValue("monAddr"),e.key=this.editPeerForm.getValue("key"),t=this.taskWrapper.wrapTaskAroundCall("edit"===this.mode?{task:new F.a("rbd/mirroring/peer/edit",{pool_name:this.poolName}),call:this.rbdMirroringService.updatePeer(this.poolName,this.peerUUID,e)}:{task:new F.a("rbd/mirroring/peer/add",{pool_name:this.poolName}),call:this.rbdMirroringService.addPeer(this.poolName,e)}),t.subscribe({error:()=>this.editPeerForm.setErrors({cdSubmitButton:!0}),complete:()=>{this.rbdMirroringService.refresh(),this.activeModal.close()}})}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(r.a),S.Mb(l.b),S.Mb(pa),S.Mb(z.a))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-pool-edit-peer-modal"]],decls:42,vars:13,consts:function(){var e,t,a,i;return e="{VAR_SELECT, select, edit {Edit} other {Add}}",e=S.bc(e,{VAR_SELECT:"\ufffd0\ufffd"}),t="" + e + " pool mirror peer",a="{VAR_SELECT, select, edit {Edit} other {Add}}",a=S.bc(a,{VAR_SELECT:"\ufffd0\ufffd"}),i="" + a + " the pool mirror peer attributes for pool " + "[\ufffd#10\ufffd|\ufffd#11\ufffd]" + "" + "\ufffd1\ufffd" + "" + "[\ufffd/#10\ufffd|\ufffd/#11\ufffd]" + " and click " + "[\ufffd#10\ufffd|\ufffd#11\ufffd]" + "Submit" + "[\ufffd/#10\ufffd|\ufffd/#11\ufffd]" + ".",[[3,"modalRef"],[1,"modal-title"],t,[1,"modal-content"],["name","editPeerForm","novalidate","",1,"form",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],i=S.bc(i),[1,"form-group"],["for","clusterName",1,"col-form-label","required"],"Cluster Name",["type","text","id","clusterName","name","clusterName","formControlName","clusterName","autofocus","",1,"form-control",6,"placeholder"],["placeholder","Name..."],["class","invalid-feedback",4,"ngIf"],["for","clientID",1,"col-form-label","required"],"CephX ID",["type","text","id","clientID","name","clientID","formControlName","clientID",1,"form-control",6,"placeholder"],["placeholder","CephX ID..."],["for","monAddr",1,"col-form-label"],"Monitor Addresses",["type","text","id","monAddr","name","monAddr","formControlName","monAddr",1,"form-control",6,"placeholder"],["placeholder","Comma-delimited addresses..."],["for","key",1,"col-form-label"],"CephX Key",["type","text","id","key","name","key","formControlName","key",1,"form-control",6,"placeholder"],["placeholder","Base64-encoded key..."],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required.","The cluster name is not valid.","This field is required.","The CephX ID is not valid.","The monitory address is not valid.","CephX key must be base64 encoded."]},template:function(e,t){if(1&e&&(S.Sb(0,"cd-modal",0),S.Sb(1,"span",1),S.Wb(2,2),S.Rb(),S.Qb(3,3),S.Sb(4,"form",4,5),S.Sb(6,"div",6),S.Sb(7,"p"),S.Sb(8,"span"),S.cc(9,7),S.Nb(10,"kbd"),S.Nb(11,"kbd"),S.Zb(),S.Rb(),S.Rb(),S.Sb(12,"div",8),S.Sb(13,"label",9),S.Wb(14,10),S.Rb(),S.Sb(15,"input",11),S.Yb(16,12),S.Rb(),S.Mc(17,Ga,2,0,"span",13),S.Mc(18,La,2,0,"span",13),S.Rb(),S.Sb(19,"div",8),S.Sb(20,"label",14),S.Wb(21,15),S.Rb(),S.Sb(22,"input",16),S.Yb(23,17),S.Rb(),S.Mc(24,ja,2,0,"span",13),S.Mc(25,Qa,2,0,"span",13),S.Rb(),S.Sb(26,"div",8),S.Sb(27,"label",18),S.Sb(28,"span"),S.Wb(29,19),S.Rb(),S.Rb(),S.Sb(30,"input",20),S.Yb(31,21),S.Rb(),S.Mc(32,Ua,2,0,"span",13),S.Rb(),S.Sb(33,"div",8),S.Sb(34,"label",22),S.Sb(35,"span"),S.Wb(36,23),S.Rb(),S.Rb(),S.Sb(37,"input",24),S.Yb(38,25),S.Rb(),S.Mc(39,Ya,2,0,"span",13),S.Rb(),S.Rb(),S.Sb(40,"div",26),S.Sb(41,"cd-form-button-panel",27),S.gc("submitActionEvent",(function(){return t.update()})),S.Rb(),S.Rb(),S.Rb(),S.Pb(),S.Rb()),2&e){const e=S.Ac(5);S.pc("modalRef",t.activeModal),S.yb(2),S.ac(t.mode),S.Xb(2),S.yb(2),S.pc("formGroup",t.editPeerForm),S.yb(7),S.ac(t.mode)(t.poolName),S.Xb(9),S.yb(6),S.pc("ngIf",t.editPeerForm.showError("clusterName",e,"required")),S.yb(1),S.pc("ngIf",t.editPeerForm.showError("clusterName",e,"invalidClusterName")),S.yb(6),S.pc("ngIf",t.editPeerForm.showError("clientID",e,"required")),S.yb(1),S.pc("ngIf",t.editPeerForm.showError("clientID",e,"invalidClientID")),S.yb(7),S.pc("ngIf",t.editPeerForm.showError("monAddr",e,"invalidMonAddr")),S.yb(7),S.pc("ngIf",t.editPeerForm.showError("key",e,"invalidKey")),S.yb(2),S.pc("form",t.editPeerForm)("submitText",t.actionLabels.SUBMIT)}},directives:[E.a,o.C,o.r,C.a,o.k,D.a,O.a,o.d,A.a,o.q,o.i,ha.a,i.r,x.a],styles:[""]}),e})();const Ja=["healthTmpl"];function Xa(e,t){if(1&e&&(S.Sb(0,"span",3),S.jc(1,"mirrorHealthColor"),S.Oc(2),S.Rb()),2&e){const e=t.value;S.pc("ngClass",S.kc(1,2,t.row.health_color)),S.yb(2),S.Pc(e)}}let Ha=(()=>{class e{constructor(e,t,a,i){this.authStorageService=e,this.rbdMirroringService=t,this.modalService=a,this.taskWrapper=i,this.selection=new nt.a,this.tableStatus=new Pa.a,this.data=[],this.permission=this.authStorageService.getPermissions().rbdMirroring;const o={permission:"update",icon:N.a.edit,click:()=>this.editModeModal(),name:"Edit Mode",canBePrimary:()=>!0},s={permission:"create",icon:N.a.add,name:"Add Peer",click:()=>this.editPeersModal("add"),disable:()=>!this.selection.first()||"disabled"===this.selection.first().mirror_mode,visible:()=>!this.getPeerUUID(),canBePrimary:()=>!1},n={permission:"update",icon:N.a.exchange,name:"Edit Peer",click:()=>this.editPeersModal("edit"),visible:()=>!!this.getPeerUUID()},r={permission:"delete",icon:N.a.destroy,name:"Delete Peer",click:()=>this.deletePeersModal(),visible:()=>!!this.getPeerUUID()};this.tableActions=[o,s,n,r]}ngOnInit(){this.columns=[{prop:"name",name:"Name",flexGrow:2},{prop:"mirror_mode",name:"Mode",flexGrow:2},{prop:"leader_id",name:"Leader",flexGrow:2},{prop:"image_local_count",name:"# Local",flexGrow:2},{prop:"image_remote_count",name:"# Remote",flexGrow:2},{prop:"health",name:"Health",cellTemplate:this.healthTmpl,flexGrow:1}],this.subs=this.rbdMirroringService.subscribeSummary(e=>{this.data=e.content_data.pools,this.tableStatus=new Pa.a(e.status)})}ngOnDestroy(){this.subs.unsubscribe()}refresh(){this.rbdMirroringService.refresh()}editModeModal(){const e={poolName:this.selection.first().name};this.modalRef=this.modalService.show(qa,e)}editPeersModal(e){const t={poolName:this.selection.first().name,mode:e};"edit"===e&&(t.peerUUID=this.getPeerUUID()),this.modalRef=this.modalService.show(Ka,t)}deletePeersModal(){const e=this.selection.first().name,t=this.getPeerUUID();this.modalRef=this.modalService.show(it.a,{itemDescription:"mirror peer",itemNames:[`${e} (${t})`],submitActionObservable:()=>new Aa.a(a=>{this.taskWrapper.wrapTaskAroundCall({task:new F.a("rbd/mirroring/peer/delete",{pool_name:e}),call:this.rbdMirroringService.deletePeer(e,t)}).subscribe({error:e=>a.error(e),complete:()=>{this.rbdMirroringService.refresh(),a.complete()}})})})}getPeerUUID(){const e=this.selection.first(),t=this.data.find(t=>e&&e.name===t.name);if(t&&t.peer_uuids)return t.peer_uuids[0]}updateSelection(e){this.selection=e}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(lt.a),S.Mb(pa),S.Mb(P.a),S.Mb(z.a))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-mirroring-pools"]],viewQuery:function(e,t){var a;1&e&&S.Jc(Ja,!0),2&e&&S.zc(a=S.hc())&&(t.healthTmpl=a.first)},decls:4,vars:7,consts:[["columnMode","flex","identifier","name","forceIdentifier","true","selectionType","single",3,"data","columns","autoReload","status","fetchData","updateSelection"],[1,"table-actions",3,"permission","selection","tableActions"],["healthTmpl",""],[3,"ngClass"]],template:function(e,t){1&e&&(S.Sb(0,"cd-table",0),S.gc("fetchData",(function(){return t.refresh()}))("updateSelection",(function(e){return t.updateSelection(e)})),S.Nb(1,"cd-table-actions",1),S.Rb(),S.Mc(2,Xa,3,4,"ng-template",null,2,S.Nc)),2&e&&(S.pc("data",t.data)("columns",t.columns)("autoReload",-1)("status",t.tableStatus),S.yb(1),S.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions))},directives:[ot.a,Mt.a,i.p],pipes:[Ea],styles:[""]}),e})();var Za=a("JP8w");const ei=["stateTmpl"],ti=["syncTmpl"],ai=["progressTmpl"];function ii(e,t){if(1&e){const e=S.Tb();S.Sb(0,"cd-table",14),S.gc("fetchData",(function(){return S.Dc(e),S.ic().refresh()})),S.Rb()}if(2&e){const e=S.ic();S.pc("data",e.image_error.data)("columns",e.image_error.columns)("autoReload",-1)("status",e.tableStatus)}}function oi(e,t){if(1&e){const e=S.Tb();S.Sb(0,"cd-table",14),S.gc("fetchData",(function(){return S.Dc(e),S.ic().refresh()})),S.Rb()}if(2&e){const e=S.ic();S.pc("data",e.image_syncing.data)("columns",e.image_syncing.columns)("autoReload",-1)("status",e.tableStatus)}}function si(e,t){if(1&e){const e=S.Tb();S.Sb(0,"cd-table",14),S.gc("fetchData",(function(){return S.Dc(e),S.ic().refresh()})),S.Rb()}if(2&e){const e=S.ic();S.pc("data",e.image_ready.data)("columns",e.image_ready.columns)("autoReload",-1)("status",e.tableStatus)}}function ni(e,t){if(1&e&&(S.Sb(0,"span",15),S.jc(1,"mirrorHealthColor"),S.Oc(2),S.Rb()),2&e){const e=t.value;S.pc("ngClass",S.kc(1,2,t.row.state_color)),S.yb(2),S.Pc(e)}}function ri(e,t){1&e&&(S.Sb(0,"span",16),S.Wb(1,17),S.Rb())}function ci(e,t){1&e&&S.Nb(0,"ngb-progressbar",18),2&e&&S.pc("value",t.value)("showValue",!0)}let li=(()=>{class e{constructor(e){this.rbdMirroringService=e,this.image_error={data:[],columns:{}},this.image_syncing={data:[],columns:{}},this.image_ready={data:[],columns:{}},this.tableStatus=new Pa.a}ngOnInit(){this.image_error.columns=[{prop:"pool_name",name:"Pool",flexGrow:2},{prop:"name",name:"Image",flexGrow:2},{prop:"description",name:"Issue",flexGrow:4},{prop:"state",name:"State",cellTemplate:this.stateTmpl,flexGrow:1}],this.image_syncing.columns=[{prop:"pool_name",name:"Pool",flexGrow:2},{prop:"name",name:"Image",flexGrow:2},{prop:"progress",name:"Progress",cellTemplate:this.progressTmpl,flexGrow:2},{prop:"state",name:"State",cellTemplate:this.syncTmpl,flexGrow:1}],this.image_ready.columns=[{prop:"pool_name",name:"Pool",flexGrow:2},{prop:"name",name:"Image",flexGrow:2},{prop:"description",name:"Description",flexGrow:4},{prop:"state",name:"State",cellTemplate:this.stateTmpl,flexGrow:1}],this.subs=this.rbdMirroringService.subscribeSummary(e=>{this.image_error.data=e.content_data.image_error,this.image_syncing.data=e.content_data.image_syncing,this.image_ready.data=e.content_data.image_ready,this.tableStatus=new Pa.a(e.status)})}ngOnDestroy(){this.subs.unsubscribe()}refresh(){this.rbdMirroringService.refresh()}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(pa))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-mirroring-images"]],viewQuery:function(e,t){var a;1&e&&(S.Jc(ei,!0),S.Jc(ti,!0),S.Jc(ai,!0)),2&e&&(S.zc(a=S.hc())&&(t.stateTmpl=a.first),S.zc(a=S.hc())&&(t.syncTmpl=a.first),S.zc(a=S.hc())&&(t.progressTmpl=a.first))},decls:21,vars:1,consts:function(){return[["ngbNav","","cdStatefulTab","image-list",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem","issues"],["ngbNavLink",""],"Issues",["ngbNavContent",""],["ngbNavItem","syncing"],"Syncing",["ngbNavItem","ready"],"Ready",[3,"ngbNavOutlet"],["stateTmpl",""],["syncTmpl",""],["progressTmpl",""],["columnMode","flex",3,"data","columns","autoReload","status","fetchData"],[3,"ngClass"],[1,"badge","badge-info"],"Syncing",["type","info",3,"value","showValue"]]},template:function(e,t){if(1&e&&(S.Sb(0,"ul",0,1),S.Sb(2,"li",2),S.Sb(3,"a",3),S.Wb(4,4),S.Rb(),S.Mc(5,ii,1,4,"ng-template",5),S.Rb(),S.Sb(6,"li",6),S.Sb(7,"a",3),S.Wb(8,7),S.Rb(),S.Mc(9,oi,1,4,"ng-template",5),S.Rb(),S.Sb(10,"li",8),S.Sb(11,"a",3),S.Wb(12,9),S.Rb(),S.Mc(13,si,1,4,"ng-template",5),S.Rb(),S.Rb(),S.Nb(14,"div",10),S.Mc(15,ni,3,4,"ng-template",null,11,S.Nc),S.Mc(17,ri,2,0,"ng-template",null,12,S.Nc),S.Mc(19,ci,1,2,"ng-template",null,13,S.Nc)),2&e){const e=S.Ac(1);S.yb(14),S.pc("ngbNavOutlet",e)}},directives:[r.p,Za.a,r.r,r.s,r.q,r.u,ot.a,i.p,r.z],pipes:[Ea],styles:[""]}),e})(),bi=(()=>{class e{constructor(e,t,a){this.authStorageService=e,this.rbdMirroringService=t,this.modalService=a,this.selection=new nt.a,this.peersExist=!0,this.subs=new ca.a,this.permission=this.authStorageService.getPermissions().rbdMirroring;const i={permission:"update",icon:N.a.edit,click:()=>this.editSiteNameModal(),name:"Edit Site Name",canBePrimary:()=>!0,disable:()=>!1},o={permission:"update",icon:N.a.upload,click:()=>this.createBootstrapModal(),name:"Create Bootstrap Token",disable:()=>!1},s={permission:"update",icon:N.a.download,click:()=>this.importBootstrapModal(),name:"Import Bootstrap Token",disable:()=>this.peersExist};this.tableActions=[i,o,s]}ngOnInit(){this.subs.add(this.rbdMirroringService.startPolling()),this.subs.add(this.rbdMirroringService.subscribeSummary(e=>{this.status=e.content_data.status,this.siteName=e.site_name,this.peersExist=!!e.content_data.pools.find(e=>e.peer_uuids.length>0)}))}ngOnDestroy(){this.subs.unsubscribe()}editSiteNameModal(){this.modalRef=this.modalService.show(Fa,{siteName:this.siteName})}createBootstrapModal(){this.modalRef=this.modalService.show(wa,{siteName:this.siteName})}importBootstrapModal(){this.modalRef=this.modalService.show(Ta,{siteName:this.siteName})}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(lt.a),S.Mb(pa),S.Mb(P.a))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-mirroring"]],decls:21,vars:4,consts:function(){return[[1,"row"],[1,"col-md-12"],"Site Name:",[1,"table-actions","float-right",3,"permission","selection","tableActions"],[1,"col-sm-6"],"Daemons","Pools","Images"]},template:function(e,t){1&e&&(S.Sb(0,"div",0),S.Sb(1,"div",1),S.Sb(2,"span"),S.Sb(3,"strong"),S.Wb(4,2),S.Rb(),S.Oc(5),S.Rb(),S.Nb(6,"cd-table-actions",3),S.Rb(),S.Rb(),S.Sb(7,"div",0),S.Sb(8,"div",4),S.Sb(9,"legend"),S.Wb(10,5),S.Rb(),S.Nb(11,"cd-mirroring-daemons"),S.Rb(),S.Sb(12,"div",4),S.Sb(13,"legend"),S.Wb(14,6),S.Rb(),S.Nb(15,"cd-mirroring-pools"),S.Rb(),S.Rb(),S.Sb(16,"div",0),S.Sb(17,"div",1),S.Sb(18,"legend"),S.Wb(19,7),S.Rb(),S.Nb(20,"cd-mirroring-images"),S.Rb(),S.Rb()),2&e&&(S.yb(5),S.Qc(" ",t.siteName,""),S.yb(1),S.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions))},directives:[Mt.a,Oa,Ha,li],styles:[""]}),e})();var di=a("jtHE"),pi=a("SxV6"),mi=a("eIep"),ui=a("Ekvf"),fi=a("PhyI"),hi=a("Fgil"),gi=a("aXbf");class Si{}var vi=function(e){return e[e.V1=1]="V1",e[e.V2=2]="V2",e}({});class yi{constructor(){this.features=[]}}class Ri{constructor(){this.features=[]}}class wi extends class{}{constructor(){super(...arguments),this.features=[]}}class _i{constructor(){this.features=[]}}var ki=function(e){return e.editing="editing",e.cloning="cloning",e.copying="copying",e}({}),Mi=a("EmSq"),Ni=a("rFfW"),Ii=a("p4Cf");function $i(e,t){if(1&e&&(S.Sb(0,"div",9),S.Sb(1,"label",57),S.Wb(2,58),S.jc(3,"titlecase"),S.Rb(),S.Sb(4,"div",12),S.Nb(5,"input",59),S.Nb(6,"hr"),S.Rb(),S.Rb()),2&e){const e=S.ic(2);S.yb(3),S.ac(S.kc(3,1,e.action)),S.Xb(2)}}function Ti(e,t){1&e&&(S.Sb(0,"span",60),S.Qb(1),S.Wb(2,61),S.Pb(),S.Rb())}function Fi(e,t){1&e&&(S.Sb(0,"span",60),S.Qb(1),S.Wb(2,62),S.Pb(),S.Rb())}function Pi(e,t){1&e&&S.Nb(0,"input",63)}function zi(e,t){1&e&&(S.Sb(0,"option",49),S.Wb(1,66),S.Rb()),2&e&&S.pc("ngValue",null)}function Ei(e,t){1&e&&(S.Sb(0,"option",49),S.Wb(1,67),S.Rb()),2&e&&S.pc("ngValue",null)}function Ci(e,t){1&e&&(S.Sb(0,"option",49),S.Wb(1,68),S.Rb()),2&e&&S.pc("ngValue",null)}function Di(e,t){if(1&e&&(S.Sb(0,"option",69),S.Oc(1),S.Rb()),2&e){const e=t.$implicit;S.pc("value",e.pool_name),S.yb(1),S.Pc(e.pool_name)}}function Oi(e,t){if(1&e&&(S.Sb(0,"select",64),S.Mc(1,zi,2,1,"option",65),S.Mc(2,Ei,2,1,"option",65),S.Mc(3,Ci,2,1,"option",65),S.Mc(4,Di,2,2,"option",45),S.Rb()),2&e){const e=S.ic(2);S.yb(1),S.pc("ngIf",null===e.pools),S.yb(1),S.pc("ngIf",null!==e.pools&&0===e.pools.length),S.yb(1),S.pc("ngIf",null!==e.pools&&e.pools.length>0),S.yb(1),S.pc("ngForOf",e.pools)}}function Ai(e,t){1&e&&(S.Sb(0,"span",60),S.Wb(1,70),S.Rb())}const xi=function(e,t){return[e,t]};function Vi(e,t){if(1&e&&(S.Sb(0,"div",9),S.Sb(1,"div",20),S.Nb(2,"i",71),S.Rb(),S.Rb()),2&e){const e=S.ic(2);S.yb(2),S.pc("ngClass",S.vc(1,xi,e.icons.spinner,e.icons.spin))}}function Wi(e,t){1&e&&S.Nb(0,"input",75)}function qi(e,t){1&e&&(S.Sb(0,"option",49),S.Wb(1,77),S.Rb()),2&e&&S.pc("ngValue",null)}function Bi(e,t){1&e&&(S.Sb(0,"option",49),S.Wb(1,78),S.Rb()),2&e&&S.pc("ngValue",null)}function Gi(e,t){1&e&&(S.Sb(0,"option",49),S.Wb(1,79),S.Rb()),2&e&&S.pc("ngValue",null)}function Li(e,t){if(1&e&&(S.Sb(0,"option",69),S.Oc(1),S.Rb()),2&e){const e=t.$implicit;S.pc("value",e),S.yb(1),S.Pc(e)}}function ji(e,t){if(1&e&&(S.Sb(0,"select",76),S.Mc(1,qi,2,1,"option",65),S.Mc(2,Bi,2,1,"option",65),S.Mc(3,Gi,2,1,"option",65),S.Mc(4,Li,2,2,"option",45),S.Rb()),2&e){const e=S.ic(3);S.yb(1),S.pc("ngIf",null===e.pools),S.yb(1),S.pc("ngIf",null!==e.pools&&0===e.pools.length),S.yb(1),S.pc("ngIf",null!==e.pools&&e.pools.length>0),S.yb(1),S.pc("ngForOf",e.namespaces)}}function Qi(e,t){if(1&e&&(S.Sb(0,"div",9),S.Sb(1,"label",72),S.Oc(2," Namespace "),S.Rb(),S.Sb(3,"div",12),S.Mc(4,Wi,1,0,"input",73),S.Mc(5,ji,5,4,"select",74),S.Rb(),S.Rb()),2&e){const e=S.ic(2);S.yb(4),S.pc("ngIf","editing"===e.mode||!e.poolPermission.read),S.yb(1),S.pc("ngIf","editing"!==e.mode&&e.poolPermission.read)}}function Ui(e,t){1&e&&(S.Sb(0,"cd-helper"),S.Sb(1,"span"),S.Wb(2,80),S.Rb(),S.Rb())}function Yi(e,t){1&e&&S.Nb(0,"input",87)}function Ki(e,t){1&e&&(S.Sb(0,"option",49),S.Wb(1,89),S.Rb()),2&e&&S.pc("ngValue",null)}function Ji(e,t){1&e&&(S.Sb(0,"option",49),S.Wb(1,90),S.Rb()),2&e&&S.pc("ngValue",null)}function Xi(e,t){1&e&&(S.Sb(0,"option",49),S.Oc(1,"-- Select a data pool -- "),S.Rb()),2&e&&S.pc("ngValue",null)}function Hi(e,t){if(1&e&&(S.Sb(0,"option",69),S.Oc(1),S.Rb()),2&e){const e=t.$implicit;S.pc("value",e.pool_name),S.yb(1),S.Pc(e.pool_name)}}function Zi(e,t){if(1&e){const e=S.Tb();S.Sb(0,"select",88),S.gc("change",(function(t){return S.Dc(e),S.ic(3).onDataPoolChange(t.target.value)})),S.Mc(1,Ki,2,1,"option",65),S.Mc(2,Ji,2,1,"option",65),S.Mc(3,Xi,2,1,"option",65),S.Mc(4,Hi,2,2,"option",45),S.Rb()}if(2&e){const e=S.ic(3);S.yb(1),S.pc("ngIf",null===e.dataPools),S.yb(1),S.pc("ngIf",null!==e.dataPools&&0===e.dataPools.length),S.yb(1),S.pc("ngIf",null!==e.dataPools&&e.dataPools.length>0),S.yb(1),S.pc("ngForOf",e.dataPools)}}function eo(e,t){1&e&&(S.Sb(0,"span",60),S.Wb(1,91),S.Rb())}const to=function(e){return{required:e}};function ao(e,t){if(1&e&&(S.Sb(0,"div",9),S.Sb(1,"label",81),S.Sb(2,"span",71),S.Wb(3,82),S.Rb(),S.Sb(4,"cd-helper",83),S.Yb(5,84),S.Rb(),S.Rb(),S.Sb(6,"div",12),S.Mc(7,Yi,1,0,"input",85),S.Mc(8,Zi,5,4,"select",86),S.Mc(9,eo,2,0,"span",14),S.Rb(),S.Rb()),2&e){S.ic();const e=S.Ac(2),t=S.ic();S.yb(2),S.pc("ngClass",S.uc(4,to,"editing"!==t.mode)),S.yb(5),S.pc("ngIf","editing"===t.mode||!t.poolPermission.read),S.yb(1),S.pc("ngIf","editing"!==t.mode&&t.poolPermission.read),S.yb(1),S.pc("ngIf",t.rbdForm.showError("dataPool",e,"required"))}}function io(e,t){1&e&&(S.Sb(0,"span",60),S.Wb(1,92),S.Rb())}function oo(e,t){1&e&&(S.Sb(0,"span",60),S.Wb(1,93),S.Rb())}function so(e,t){if(1&e&&S.Nb(0,"cd-helper",97),2&e){const e=S.ic().$implicit;S.qc("html",e.helperHtml)}}function no(e,t){if(1&e&&(S.Sb(0,"div",21),S.Nb(1,"input",94),S.Sb(2,"label",95),S.Oc(3),S.Rb(),S.Mc(4,so,1,1,"cd-helper",96),S.Rb()),2&e){const e=t.$implicit;S.yb(1),S.qc("id",e.key),S.qc("name",e.key),S.qc("formControlName",e.key),S.yb(1),S.qc("for",e.key),S.yb(1),S.Pc(e.desc),S.yb(1),S.pc("ngIf",e.helperHtml)}}function ro(e,t){if(1&e){const e=S.Tb();S.Sb(0,"a",98),S.gc("click",(function(){return S.Dc(e),S.ic(2).advancedEnabled=!0,!1})),S.Wb(1,99),S.Rb()}}function co(e,t){if(1&e&&(S.Sb(0,"option",69),S.Oc(1),S.Rb()),2&e){const e=t.$implicit;S.pc("value",e),S.yb(1),S.Pc(e)}}function lo(e,t){if(1&e&&(S.Sb(0,"option",69),S.Oc(1),S.Rb()),2&e){const e=t.$implicit;S.pc("value",e),S.yb(1),S.Pc(e)}}function bo(e,t){1&e&&(S.Sb(0,"span",60),S.Wb(1,100),S.Rb())}function po(e,t){1&e&&(S.Sb(0,"span",60),S.Wb(1,101),S.Rb())}function mo(e,t){1&e&&(S.Sb(0,"span",60),S.Wb(1,102),S.Rb())}function uo(e,t){1&e&&(S.Sb(0,"span",60),S.Wb(1,103),S.Rb())}function fo(e,t){if(1&e){const e=S.Tb();S.Sb(0,"div",1),S.Sb(1,"form",2,3),S.Sb(3,"div",4),S.Sb(4,"div",5),S.Wb(5,6),S.jc(6,"titlecase"),S.jc(7,"upperFirst"),S.Rb(),S.Sb(8,"div",7),S.Mc(9,$i,7,3,"div",8),S.Sb(10,"div",9),S.Sb(11,"label",10),S.Wb(12,11),S.Rb(),S.Sb(13,"div",12),S.Nb(14,"input",13),S.Mc(15,Ti,3,0,"span",14),S.Mc(16,Fi,3,0,"span",14),S.Rb(),S.Rb(),S.Sb(17,"div",15),S.gc("change",(function(t){return S.Dc(e),S.ic().onPoolChange(t.target.value)})),S.Sb(18,"label",16),S.Wb(19,17),S.Rb(),S.Sb(20,"div",12),S.Mc(21,Pi,1,0,"input",18),S.Mc(22,Oi,5,4,"select",19),S.Mc(23,Ai,2,0,"span",14),S.Rb(),S.Rb(),S.Mc(24,Vi,3,4,"div",8),S.Mc(25,Qi,6,2,"div",8),S.Sb(26,"div",9),S.Sb(27,"div",20),S.Sb(28,"div",21),S.Sb(29,"input",22),S.gc("change",(function(){return S.Dc(e),S.ic().onUseDataPoolChange()})),S.Rb(),S.Sb(30,"label",23),S.Wb(31,24),S.Rb(),S.Mc(32,Ui,3,0,"cd-helper",25),S.Rb(),S.Rb(),S.Rb(),S.Mc(33,ao,10,6,"div",8),S.Sb(34,"div",9),S.Sb(35,"label",26),S.Wb(36,27),S.Rb(),S.Sb(37,"div",12),S.Sb(38,"input",28),S.Yb(39,29),S.Rb(),S.Mc(40,io,2,0,"span",14),S.Mc(41,oo,2,0,"span",14),S.Rb(),S.Rb(),S.Sb(42,"div",30),S.Sb(43,"label",31),S.Wb(44,32),S.Rb(),S.Sb(45,"div",12),S.Mc(46,no,5,6,"div",33),S.Rb(),S.Rb(),S.Sb(47,"div",34),S.Sb(48,"div",35),S.Mc(49,ro,2,0,"a",36),S.Rb(),S.Rb(),S.Sb(50,"div",37),S.Sb(51,"legend",38),S.Wb(52,39),S.Rb(),S.Sb(53,"div",40),S.Sb(54,"h4",38),S.Wb(55,41),S.Rb(),S.Sb(56,"div",9),S.Sb(57,"label",42),S.Wb(58,43),S.Rb(),S.Sb(59,"div",12),S.Sb(60,"select",44),S.Mc(61,co,2,2,"option",45),S.Rb(),S.Rb(),S.Rb(),S.Sb(62,"div",9),S.Sb(63,"label",46),S.Wb(64,47),S.Rb(),S.Sb(65,"div",12),S.Sb(66,"select",48),S.Sb(67,"option",49),S.Wb(68,50),S.Rb(),S.Mc(69,lo,2,2,"option",45),S.Rb(),S.Mc(70,bo,2,0,"span",14),S.Mc(71,po,2,0,"span",14),S.Rb(),S.Rb(),S.Sb(72,"div",9),S.Sb(73,"label",51),S.Wb(74,52),S.Rb(),S.Sb(75,"div",12),S.Nb(76,"input",53),S.Mc(77,mo,2,0,"span",14),S.Mc(78,uo,2,0,"span",14),S.Rb(),S.Rb(),S.Rb(),S.Sb(79,"cd-rbd-configuration-form",54),S.gc("changes",(function(t){return S.Dc(e),S.ic().getDirtyConfigurationValues=t})),S.Rb(),S.Rb(),S.Rb(),S.Sb(80,"div",55),S.Sb(81,"cd-form-button-panel",56),S.gc("submitActionEvent",(function(){return S.Dc(e),S.ic().submit()})),S.jc(82,"titlecase"),S.jc(83,"upperFirst"),S.Rb(),S.Rb(),S.Rb(),S.Rb(),S.Rb()}if(2&e){const e=S.Ac(2),t=S.ic();S.yb(1),S.pc("formGroup",t.rbdForm),S.yb(6),S.ac(S.kc(6,32,t.action))(S.kc(7,34,t.resource)),S.Xb(5),S.yb(2),S.pc("ngIf",t.rbdForm.getValue("parent")),S.yb(6),S.pc("ngIf",t.rbdForm.showError("name",e,"required")),S.yb(1),S.pc("ngIf",t.rbdForm.showError("name",e,"pattern")),S.yb(2),S.pc("ngClass",S.uc(40,to,"editing"!==t.mode)),S.yb(3),S.pc("ngIf","editing"===t.mode||!t.poolPermission.read),S.yb(1),S.pc("ngIf","editing"!==t.mode&&t.poolPermission.read),S.yb(1),S.pc("ngIf",t.rbdForm.showError("pool",e,"required")),S.yb(1),S.pc("ngIf","editing"!==t.mode&&t.rbdForm.getValue("pool")&&null===t.namespaces),S.yb(1),S.pc("ngIf","editing"===t.mode&&t.rbdForm.getValue("namespace")||"editing"!==t.mode&&(t.namespaces&&t.namespaces.length>0||!t.poolPermission.read)),S.yb(7),S.pc("ngIf",t.allDataPools.length<=1),S.yb(1),S.pc("ngIf",t.rbdForm.getValue("useDataPool")),S.yb(7),S.pc("ngIf",t.rbdForm.showError("size",e,"required")),S.yb(1),S.pc("ngIf",t.rbdForm.showError("size",e,"invalidSizeObject")),S.yb(5),S.pc("ngForOf",t.featuresList),S.yb(3),S.pc("ngIf",!t.advancedEnabled),S.yb(1),S.pc("hidden",!t.advancedEnabled),S.yb(11),S.pc("ngForOf",t.objectSizes),S.yb(2),S.pc("ngClass",S.uc(42,to,t.rbdForm.getValue("stripingCount"))),S.yb(4),S.pc("ngValue",null),S.yb(2),S.pc("ngForOf",t.objectSizes),S.yb(1),S.pc("ngIf",t.rbdForm.showError("stripingUnit",e,"required")),S.yb(1),S.pc("ngIf",t.rbdForm.showError("stripingUnit",e,"invalidStripingUnit")),S.yb(2),S.pc("ngClass",S.uc(44,to,t.rbdForm.getValue("stripingUnit"))),S.yb(4),S.pc("ngIf",t.rbdForm.showError("stripingCount",e,"required")),S.yb(1),S.pc("ngIf",t.rbdForm.showError("stripingCount",e,"min")),S.yb(1),S.pc("form",t.rbdForm)("initializeData",t.initializeConfigData),S.yb(2),S.pc("form",e)("submitText",S.kc(82,36,t.action)+" "+S.kc(83,38,t.resource))}}let ho=(()=>{class e extends I.a{constructor(e,t,a,i,o,s,n,r,c){super(),this.authStorageService=e,this.route=t,this.poolService=a,this.rbdService=i,this.formatter=o,this.taskWrapper=s,this.dimlessBinaryPipe=n,this.actionLabels=r,this.router=c,this.namespaces=[],this.namespacesByPoolCache={},this.pools=null,this.allPools=null,this.dataPools=null,this.allDataPools=[],this.featuresList=[],this.initializeConfigData=new di.a(1),this.advancedEnabled=!1,this.rbdFormMode=ki,this.defaultObjectSize="4 MiB",this.objectSizes=["4 KiB","8 KiB","16 KiB","32 KiB","64 KiB","128 KiB","256 KiB","512 KiB","1 MiB","2 MiB","4 MiB","8 MiB","16 MiB","32 MiB"],this.rbdImage=new di.a(1),this.icons=N.a,this.routerUrl=this.router.url,this.poolPermission=this.authStorageService.getPermissions().pool,this.resource="RBD",this.features={"deep-flatten":{desc:"Deep flatten",requires:null,allowEnable:!1,allowDisable:!0},layering:{desc:"Layering",requires:null,allowEnable:!1,allowDisable:!1},"exclusive-lock":{desc:"Exclusive lock",requires:null,allowEnable:!0,allowDisable:!0},"object-map":{desc:"Object map (requires exclusive-lock)",requires:"exclusive-lock",allowEnable:!0,allowDisable:!0,initDisabled:!0},journaling:{desc:"Journaling (requires exclusive-lock)",requires:"exclusive-lock",allowEnable:!0,allowDisable:!0,initDisabled:!0},"fast-diff":{desc:"Fast diff (interlocked with object-map)",requires:"object-map",allowEnable:!0,allowDisable:!0,interlockedWith:"object-map",initDisabled:!0}},this.featuresList=this.objToArray(this.features),this.createForm()}objToArray(e){return m.a.map(e,(e,t)=>Object.assign(e,{key:t}))}createForm(){this.rbdForm=new $.a({parent:new o.h(""),name:new o.h("",{validators:[o.A.required,o.A.pattern(/^[^@/]+?$/)]}),pool:new o.h(null,{validators:[o.A.required]}),namespace:new o.h(null),useDataPool:new o.h(!1),dataPool:new o.h(null),size:new o.h(null,{updateOn:"blur"}),obj_size:new o.h(this.defaultObjectSize),features:new $.a(this.featuresList.reduce((e,t)=>(e[t.key]=new o.h({value:!1,disabled:!!t.initDisabled}),e),{})),stripingUnit:new o.h(null),stripingCount:new o.h(null,{updateOn:"blur"})},this.validateRbdForm(this.formatter))}disableForEdit(){this.rbdForm.get("parent").disable(),this.rbdForm.get("pool").disable(),this.rbdForm.get("namespace").disable(),this.rbdForm.get("useDataPool").disable(),this.rbdForm.get("dataPool").disable(),this.rbdForm.get("obj_size").disable(),this.rbdForm.get("stripingUnit").disable(),this.rbdForm.get("stripingCount").disable(),this.rbdImage.subscribe(e=>{e.image_format===vi.V1&&(this.rbdForm.get("deep-flatten").disable(),this.rbdForm.get("layering").disable(),this.rbdForm.get("exclusive-lock").disable())})}disableForClone(){this.rbdForm.get("parent").disable(),this.rbdForm.get("size").disable()}disableForCopy(){this.rbdForm.get("parent").disable(),this.rbdForm.get("size").disable()}ngOnInit(){this.prepareFormForAction(),this.gatherNeededData().subscribe(this.handleExternalData.bind(this))}prepareFormForAction(){const e=this.routerUrl;e.startsWith("/block/rbd/edit")?(this.mode=this.rbdFormMode.editing,this.action=this.actionLabels.EDIT,this.disableForEdit()):e.startsWith("/block/rbd/clone")?(this.mode=this.rbdFormMode.cloning,this.disableForClone(),this.action=this.actionLabels.CLONE):e.startsWith("/block/rbd/copy")?(this.mode=this.rbdFormMode.copying,this.action=this.actionLabels.COPY,this.disableForCopy()):this.action=this.actionLabels.CREATE,m.a.each(this.features,e=>{this.rbdForm.get("features").get(e.key).valueChanges.subscribe(t=>this.featureFormUpdate(e.key,t))})}gatherNeededData(){const e={};return this.mode?this.route.params.subscribe(t=>{const a=R.a.fromString(decodeURIComponent(t.image_spec));t.snap&&(this.snapName=decodeURIComponent(t.snap)),e.rbd=this.rbdService.get(a)}):e.defaultFeatures=this.rbdService.defaultFeatures(),this.mode!==this.rbdFormMode.editing&&this.poolPermission.read&&(e.pools=this.poolService.list(["pool_name","type","flags_names","application_metadata"])),Object(u.a)(e)}handleExternalData(e){if(this.handlePoolData(e.pools),e.defaultFeatures&&this.setFeatures(e.defaultFeatures),e.rbd){const t=e.rbd;this.setResponse(t,this.snapName),this.rbdImage.next(t)}this.loadingReady()}handlePoolData(e){if(!e)return;const t=[],a=[];for(const i of e)this.rbdService.isRBDPool(i)&&("replicated"===i.type?(t.push(i),a.push(i)):"erasure"===i.type&&-1!==i.flags_names.indexOf("ec_overwrites")&&a.push(i));if(this.pools=t,this.allPools=t,this.dataPools=a,this.allDataPools=a,1===this.pools.length){const e=this.pools[0].pool_name;this.rbdForm.get("pool").setValue(e),this.onPoolChange(e)}this.allDataPools.length<=1&&this.rbdForm.get("useDataPool").disable()}onPoolChange(e){const t=this.rbdForm.get("dataPool");t.value===e&&t.setValue(null),this.dataPools=this.allDataPools?this.allDataPools.filter(t=>t.pool_name!==e):[],this.namespaces=null,e in this.namespacesByPoolCache?this.namespaces=this.namespacesByPoolCache[e]:this.rbdService.listNamespaces(e).subscribe(t=>{t=t.map(e=>e.namespace),this.namespacesByPoolCache[e]=t,this.namespaces=t}),this.rbdForm.get("namespace").setValue(null)}onUseDataPoolChange(){this.rbdForm.getValue("useDataPool")||(this.rbdForm.get("dataPool").setValue(null),this.onDataPoolChange(null))}onDataPoolChange(e){const t=this.allPools.filter(t=>t.pool_name!==e);this.rbdForm.getValue("pool")===e&&this.rbdForm.get("pool").setValue(null),this.pools=t}validateRbdForm(e){return t=>{const a=t.get("useDataPool"),i=t.get("dataPool");let o=null;a.value&&null==i.value&&(o={required:!0}),i.setErrors(o);const s=t.get("size"),n=t.get("obj_size"),r=e.toBytes(null!=n.value?n.value:this.defaultObjectSize),c=t.get("stripingCount"),l=null!=c.value?c.value:1;let b=null;null===s.value?b={required:!0}:l*r>e.toBytes(s.value)&&(b={invalidSizeObject:!0}),s.setErrors(b);const d=t.get("stripingUnit");let p=null;null===d.value&&null!==c.value?p={required:!0}:null!==d.value&&e.toBytes(d.value)>r&&(p={invalidStripingUnit:!0}),d.setErrors(p);let m=null;return null===c.value&&null!==d.value?m={required:!0}:l<1&&(m={min:!0}),c.setErrors(m),null}}deepBoxCheck(e,t){this.getDependentChildFeatures(e).forEach(e=>{const a=this.rbdForm.get(e.key);t?a.enable({emitEvent:!1}):(a.disable({emitEvent:!1}),a.setValue(!1,{emitEvent:!1}),this.deepBoxCheck(e.key,t));const i=this.rbdForm.get("features");this.mode===this.rbdFormMode.editing&&i.get(e.key).enabled&&((-1===this.response.features_name.indexOf(e.key)||e.allowDisable)&&(-1!==this.response.features_name.indexOf(e.key)||e.allowEnable)||i.get(e.key).disable())})}getDependentChildFeatures(e){return m.a.filter(this.features,t=>t.requires===e)||[]}interlockCheck(e,t){const a=this.featuresList.find(t=>t.key===e);if(this.response){const e=null!=a.interlockedWith,t=this.featuresList.find(e=>e.interlockedWith===a.key),i=!!this.response.features_name.find(e=>e===a.key);if(e){if(i!==!!this.response.features_name.find(e=>e===a.interlockedWith))return}else if(t&&!!this.response.features_name.find(e=>e===t.key)!==i)return}t?m.a.filter(this.features,t=>t.interlockedWith===e).forEach(e=>this.rbdForm.get(e.key).setValue(!0,{emitEvent:!1})):a.interlockedWith&&this.rbdForm.get("features").get(a.interlockedWith).setValue(!1)}featureFormUpdate(e,t){if(t){const t=this.features[e].requires;if(t&&!this.rbdForm.getValue(t))return void this.rbdForm.get("features."+e).setValue(!1)}this.deepBoxCheck(e,t),this.interlockCheck(e,t)}setFeatures(e){const t=this.rbdForm.get("features");m.a.forIn(this.features,a=>{-1!==e.indexOf(a.key)&&t.get(a.key).setValue(!0),this.featureFormUpdate(a.key,t.get(a.key).value)})}setResponse(e,t){this.response=e;const a=new R.a(e.pool_name,e.namespace,e.name).toString();if(this.mode===this.rbdFormMode.cloning)this.rbdForm.get("parent").setValue(`${a}@${t}`);else if(this.mode===this.rbdFormMode.copying)t?this.rbdForm.get("parent").setValue(`${a}@${t}`):this.rbdForm.get("parent").setValue(""+a);else if(e.parent){const t=e.parent;this.rbdForm.get("parent").setValue(`${t.pool_name}/${t.image_name}@${t.snap_name}`)}this.mode===this.rbdFormMode.editing&&this.rbdForm.get("name").setValue(e.name),this.rbdForm.get("pool").setValue(e.pool_name),this.onPoolChange(e.pool_name),this.rbdForm.get("namespace").setValue(e.namespace),e.data_pool&&(this.rbdForm.get("useDataPool").setValue(!0),this.rbdForm.get("dataPool").setValue(e.data_pool)),this.rbdForm.get("size").setValue(this.dimlessBinaryPipe.transform(e.size)),this.rbdForm.get("obj_size").setValue(this.dimlessBinaryPipe.transform(e.obj_size)),this.setFeatures(e.features_name),this.rbdForm.get("stripingUnit").setValue(this.dimlessBinaryPipe.transform(e.stripe_unit)),this.rbdForm.get("stripingCount").setValue(e.stripe_count),this.initializeConfigData.next({initialData:this.response.configuration,sourceType:fi.a.image})}createRequest(){const e=new wi;return e.pool_name=this.rbdForm.getValue("pool"),e.namespace=this.rbdForm.getValue("namespace"),e.name=this.rbdForm.getValue("name"),e.size=this.formatter.toBytes(this.rbdForm.getValue("size")),this.addObjectSizeAndStripingToRequest(e),e.configuration=this.getDirtyConfigurationValues(),e}addObjectSizeAndStripingToRequest(e){e.obj_size=this.formatter.toBytes(this.rbdForm.getValue("obj_size")),m.a.forIn(this.features,t=>{this.rbdForm.getValue(t.key)&&e.features.push(t.key)}),e.stripe_unit=this.formatter.toBytes(this.rbdForm.getValue("stripingUnit")),e.stripe_count=this.rbdForm.getValue("stripingCount"),e.data_pool=this.rbdForm.getValue("dataPool")}createAction(){const e=this.createRequest();return this.taskWrapper.wrapTaskAroundCall({task:new F.a("rbd/create",{pool_name:e.pool_name,namespace:e.namespace,image_name:e.name}),call:this.rbdService.create(e)})}editRequest(){const e=new _i;return e.name=this.rbdForm.getValue("name"),e.size=this.formatter.toBytes(this.rbdForm.getValue("size")),m.a.forIn(this.features,t=>{this.rbdForm.getValue(t.key)&&e.features.push(t.key)}),e.configuration=this.getDirtyConfigurationValues(),e}cloneRequest(){const e=new yi;return e.child_pool_name=this.rbdForm.getValue("pool"),e.child_namespace=this.rbdForm.getValue("namespace"),e.child_image_name=this.rbdForm.getValue("name"),this.addObjectSizeAndStripingToRequest(e),e.configuration=this.getDirtyConfigurationValues(!0,fi.a.image),e}editAction(){const e=new R.a(this.response.pool_name,this.response.namespace,this.response.name);return this.taskWrapper.wrapTaskAroundCall({task:new F.a("rbd/edit",{image_spec:e.toString()}),call:this.rbdService.update(e,this.editRequest())})}cloneAction(){const e=this.cloneRequest(),t=new R.a(this.response.pool_name,this.response.namespace,this.response.name);return this.taskWrapper.wrapTaskAroundCall({task:new F.a("rbd/clone",{parent_image_spec:t.toString(),parent_snap_name:this.snapName,child_pool_name:e.child_pool_name,child_namespace:e.child_namespace,child_image_name:e.child_image_name}),call:this.rbdService.cloneSnapshot(t,this.snapName,e)})}copyRequest(){const e=new Ri;return this.snapName&&(e.snapshot_name=this.snapName),e.dest_pool_name=this.rbdForm.getValue("pool"),e.dest_namespace=this.rbdForm.getValue("namespace"),e.dest_image_name=this.rbdForm.getValue("name"),this.addObjectSizeAndStripingToRequest(e),e.configuration=this.getDirtyConfigurationValues(!0,fi.a.image),e}copyAction(){const e=this.copyRequest(),t=new R.a(this.response.pool_name,this.response.namespace,this.response.name);return this.taskWrapper.wrapTaskAroundCall({task:new F.a("rbd/copy",{src_image_spec:t.toString(),dest_pool_name:e.dest_pool_name,dest_namespace:e.dest_namespace,dest_image_name:e.dest_image_name}),call:this.rbdService.copy(t,e)})}submit(){this.mode||this.rbdImage.next("create"),this.rbdImage.pipe(Object(pi.a)(),Object(mi.a)(()=>this.mode===this.rbdFormMode.editing?this.editAction():this.mode===this.rbdFormMode.cloning?this.cloneAction():this.mode===this.rbdFormMode.copying?this.copyAction():this.createAction())).subscribe(()=>{},()=>this.rbdForm.setErrors({cdSubmitButton:!0}),()=>this.router.navigate(["/block/rbd"]))}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(lt.a),S.Mb(s.a),S.Mb(ui.a),S.Mb(_),S.Mb(gi.a),S.Mb(z.a),S.Mb(hi.a),S.Mb(l.b),S.Mb(s.e))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-rbd-form"]],features:[S.vb],decls:1,vars:1,consts:function(){return[["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],["name","rbdForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"card"],[1,"card-header"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"card-body"],["class","form-group row",4,"ngIf"],[1,"form-group","row"],["for","name",1,"cd-col-form-label","required"],"Name",[1,"cd-col-form-input"],["type","text","placeholder","Name...","id","name","name","name","formControlName","name","autofocus","",1,"form-control"],["class","invalid-feedback",4,"ngIf"],[1,"form-group","row",3,"change"],["for","pool",1,"cd-col-form-label",3,"ngClass"],"Pool",["class","form-control","type","text","placeholder","Pool name...","id","pool","name","pool","formControlName","pool",4,"ngIf"],["id","pool","name","pool","class","form-control custom-select","formControlName","pool",4,"ngIf"],[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["type","checkbox","id","useDataPool","name","useDataPool","formControlName","useDataPool",1,"custom-control-input",3,"change"],["for","useDataPool",1,"custom-control-label"],"Use a dedicated data pool",[4,"ngIf"],["for","size",1,"cd-col-form-label","required"],"Size",["id","size","name","size","type","text","formControlName","size","defaultUnit","GiB","cdDimlessBinary","",1,"form-control",6,"placeholder"],["placeholder","e.g., 10GiB"],["formGroupName","features",1,"form-group","row"],["for","features",1,"cd-col-form-label"],"Features",["class","custom-control custom-checkbox",4,"ngFor","ngForOf"],[1,"row"],[1,"col-sm-12"],["class","float-right margin-right-md","href","",3,"click",4,"ngIf"],[3,"hidden"],[1,"cd-header"],"Advanced",[1,"col-md-12"],"Striping",["for","size",1,"cd-col-form-label"],"Object size",["id","obj_size","name","obj_size","formControlName","obj_size",1,"form-control","custom-select"],[3,"value",4,"ngFor","ngForOf"],["for","stripingUnit",1,"cd-col-form-label",3,"ngClass"],"Stripe unit",["id","stripingUnit","name","stripingUnit","formControlName","stripingUnit",1,"form-control","custom-select"],[3,"ngValue"],"-- Select stripe unit --",["for","stripingCount",1,"cd-col-form-label",3,"ngClass"],"Stripe count",["id","stripingCount","name","stripingCount","formControlName","stripingCount","type","number",1,"form-control"],[3,"form","initializeData","changes"],[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],["for","name",1,"cd-col-form-label"],"" + "\ufffd0\ufffd" + " from",["type","text","id","parent","name","parent","formControlName","parent",1,"form-control"],[1,"invalid-feedback"],"This field is required.","'/' and '@' are not allowed.",["type","text","placeholder","Pool name...","id","pool","name","pool","formControlName","pool",1,"form-control"],["id","pool","name","pool","formControlName","pool",1,"form-control","custom-select"],[3,"ngValue",4,"ngIf"],"Loading...","-- No rbd pools available --","-- Select a pool --",[3,"value"],"This field is required.",[3,"ngClass"],["for","pool",1,"cd-col-form-label"],["class","form-control","type","text","placeholder","Namespace...","id","namespace","name","namespace","formControlName","namespace",4,"ngIf"],["id","namespace","name","namespace","class","form-control custom-select","formControlName","namespace",4,"ngIf"],["type","text","placeholder","Namespace...","id","namespace","name","namespace","formControlName","namespace",1,"form-control"],["id","namespace","name","namespace","formControlName","namespace",1,"form-control","custom-select"],"Loading...","-- No namespaces available --","-- Select a namespace --","You need more than one pool with the rbd application label use to use a dedicated data pool.",["for","dataPool",1,"cd-col-form-label"],"Data pool",[6,"html"],["html","Dedicated pool that stores the object-data of the RBD."],["class","form-control","type","text","placeholder","Data pool name...","id","dataPool","name","dataPool","formControlName","dataPool",4,"ngIf"],["id","dataPool","name","dataPool","class","form-control custom-select","formControlName","dataPool",3,"change",4,"ngIf"],["type","text","placeholder","Data pool name...","id","dataPool","name","dataPool","formControlName","dataPool",1,"form-control"],["id","dataPool","name","dataPool","formControlName","dataPool",1,"form-control","custom-select",3,"change"],"Loading...","-- No data pools available --","This field is required.","This field is required.","You have to increase the size.",["type","checkbox",1,"custom-control-input",3,"id","name","formControlName"],[1,"custom-control-label",3,"for"],[3,"html",4,"ngIf"],[3,"html"],["href","",1,"float-right","margin-right-md",3,"click"],"Advanced...","This field is required because stripe count is defined!","Stripe unit is greater than object size.","This field is required because stripe unit is defined!","Stripe count must be greater than 0."]},template:function(e,t){1&e&&S.Mc(0,fo,84,46,"div",0),2&e&&S.pc("cdFormLoading",t.loading)},directives:[oe.a,o.C,o.r,o.k,C.a,i.r,D.a,O.a,o.d,A.a,o.q,o.i,ha.a,i.p,o.b,Mi.a,o.l,i.q,o.z,o.u,o.B,o.v,Ni.a,x.a,Ii.a],pipes:[i.A,le.a],styles:[""]}),e})();var go=a("OLbh"),So=a("yJti"),vo=a("EgGo"),yo=a("wd/R"),Ro=a.n(yo),wo=a("2EZI"),_o=a("MAOJ");function ko(e,t){1&e&&(S.Sb(0,"div",19),S.Sb(1,"span"),S.Wb(2,20),S.Rb(),S.Rb())}function Mo(e,t){1&e&&(S.Sb(0,"span",21),S.Wb(1,22),S.Rb())}function No(e,t){1&e&&(S.Sb(0,"span",21),S.Wb(1,23),S.Rb())}function Io(e,t){if(1&e&&S.Nb(0,"cd-date-time-picker",24),2&e){const e=S.ic();S.pc("control",e.moveForm.get("expiresAt"))}}let $o=(()=>{class e{constructor(e,t,a,i,o){this.rbdService=e,this.activeModal=t,this.actionLabels=a,this.fb=i,this.taskWrapper=o,this.createForm()}createForm(){this.moveForm=this.fb.group({expiresAt:["",[T.a.custom("format",e=>!(""===e||Ro()(e,"YYYY-MM-DD HH:mm:ss").isValid())),T.a.custom("expired",e=>Ro()().isAfter(e))]]})}ngOnInit(){this.imageSpec=new R.a(this.poolName,this.namespace,this.imageName),this.imageSpecStr=this.imageSpec.toString(),this.pattern=`${this.poolName}/${this.imageName}`}moveImage(){let e=0;const t=this.moveForm.getValue("expiresAt");t&&(e=Ro()(t,"YYYY-MM-DD HH:mm:ss").diff(Ro()(),"seconds",!0)),e<0&&(e=0),this.taskWrapper.wrapTaskAroundCall({task:new F.a("rbd/trash/move",{image_spec:this.imageSpecStr}),call:this.rbdService.moveTrash(this.imageSpec,e)}).subscribe({complete:()=>{this.activeModal.close()}})}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(_),S.Mb(r.a),S.Mb(l.b),S.Mb(wo.a),S.Mb(z.a))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-rbd-trash-move-modal"]],decls:24,vars:9,consts:function(){var e,t;return e="Move an image to trash",t="To move " + "[\ufffd#10\ufffd|\ufffd#11\ufffd]" + "" + "\ufffd0\ufffd" + "" + "[\ufffd/#10\ufffd|\ufffd/#11\ufffd]" + " to trash, click " + "[\ufffd#10\ufffd|\ufffd#11\ufffd]" + "Move" + "[\ufffd/#10\ufffd|\ufffd/#11\ufffd]" + ". Optionally, you can pick an expiration date.",[[3,"modalRef"],[1,"modal-title"],e,[1,"modal-content"],["name","moveForm","novalidate","",1,"form",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],["class","alert alert-warning","role","alert",4,"ngIf"],t=S.bc(t),[1,"form-group"],["for","expiresAt",1,"col-form-label"],"Protection expires at",["type","text","formControlName","expiresAt","triggers","manual",1,"form-control",3,"ngbPopover","click","keypress",6,"placeholder"],["p","ngbPopover"],["placeholder","NOT PROTECTED"],["class","invalid-feedback",4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],["popContent",""],["role","alert",1,"alert","alert-warning"],"This image contains snapshot(s), which will prevent it from being removed after moved to trash.",[1,"invalid-feedback"],"Wrong date format. Please use \"YYYY-MM-DD HH:mm:ss\".","Protection has already expired. Please pick a future date or leave it empty.",[3,"control"]]},template:function(e,t){if(1&e){const e=S.Tb();S.Sb(0,"cd-modal",0),S.Qb(1,1),S.Wb(2,2),S.Pb(),S.Qb(3,3),S.Sb(4,"form",4,5),S.Sb(6,"div",6),S.Mc(7,ko,3,0,"div",7),S.Sb(8,"p"),S.cc(9,8),S.Nb(10,"kbd"),S.Nb(11,"kbd"),S.Zb(),S.Rb(),S.Sb(12,"div",9),S.Sb(13,"label",10),S.Wb(14,11),S.Rb(),S.Sb(15,"input",12,13),S.Yb(17,14),S.gc("click",(function(){return S.Dc(e),S.Ac(16).open()}))("keypress",(function(){return S.Dc(e),S.Ac(16).close()})),S.Rb(),S.Mc(18,Mo,2,0,"span",15),S.Mc(19,No,2,0,"span",15),S.Rb(),S.Rb(),S.Sb(20,"div",16),S.Sb(21,"cd-form-button-panel",17),S.gc("submitActionEvent",(function(){return t.moveImage()})),S.Rb(),S.Rb(),S.Rb(),S.Pb(),S.Rb(),S.Mc(22,Io,1,1,"ng-template",null,18,S.Nc)}if(2&e){const e=S.Ac(5),a=S.Ac(23);S.pc("modalRef",t.activeModal),S.yb(4),S.pc("formGroup",t.moveForm),S.yb(3),S.pc("ngIf",t.hasSnapshots),S.yb(4),S.ac(t.imageSpecStr),S.Xb(9),S.yb(4),S.pc("ngbPopover",a),S.yb(3),S.pc("ngIf",t.moveForm.showError("expiresAt",e,"format")),S.yb(1),S.pc("ngIf",t.moveForm.showError("expiresAt",e,"expired")),S.yb(2),S.pc("form",t.moveForm)("submitText",t.actionLabels.MOVE)}},directives:[E.a,o.C,o.r,o.k,C.a,i.r,D.a,O.a,o.d,A.a,o.q,o.i,r.w,x.a,_o.a],styles:[""]}),e})();function To(e,t){1&e&&(S.Sb(0,"li",10),S.Sb(1,"a",3),S.Wb(2,11),S.Rb(),S.Rb())}let Fo=(()=>{class e{constructor(e,t){this.authStorageService=e,this.router=t,this.grafanaPermission=this.authStorageService.getPermissions().grafana}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(lt.a),S.Mb(s.e))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-rbd-tabs"]],decls:12,vars:2,consts:function(){return[["ngbNav","",1,"nav-tabs",3,"activeId","navChange"],["nav","ngbNav"],["ngbNavItem","/block/rbd"],["ngbNavLink",""],"Images",["ngbNavItem","/block/rbd/namespaces"],"Namespaces",["ngbNavItem","/block/rbd/trash"],"Trash",["ngbNavItem","/block/rbd/performance",4,"ngIf"],["ngbNavItem","/block/rbd/performance"],"Overall Performance"]},template:function(e,t){1&e&&(S.Sb(0,"ul",0,1),S.gc("navChange",(function(e){return t.router.navigate([e.nextId])})),S.Sb(2,"li",2),S.Sb(3,"a",3),S.Wb(4,4),S.Rb(),S.Rb(),S.Sb(5,"li",5),S.Sb(6,"a",3),S.Wb(7,6),S.Rb(),S.Rb(),S.Sb(8,"li",7),S.Sb(9,"a",3),S.Wb(10,8),S.Rb(),S.Rb(),S.Mc(11,To,3,0,"li",9),S.Rb()),2&e&&(S.pc("activeId",t.router.url),S.yb(11),S.pc("ngIf",t.grafanaPermission.read))},directives:[r.p,r.r,r.s,i.r],styles:[""]}),e})();var Po=a("LRne"),zo=a("nQ07"),Eo=a("QTAa"),Co=a("a0VL"),Do=a("mSOc"),Oo=a("VXsX"),Ao=a("XNiG");function xo(e,t){1&e&&(S.Sb(0,"span",15),S.Wb(1,16),S.Rb())}let Vo=(()=>{class e{constructor(e,t,a,i,o){this.activeModal=e,this.rbdService=t,this.taskManagerService=a,this.notificationService=i,this.actionLabels=o,this.editing=!1,this.onSubmit=new Ao.a,this.action=this.actionLabels.CREATE,this.resource="RBD Snapshot",this.createForm()}createForm(){this.snapshotForm=new $.a({snapshotName:new o.h("",{validators:[o.A.required]})})}setSnapName(e){this.snapName=e,this.snapshotForm.get("snapshotName").setValue(e)}setEditing(e=!0){this.editing=e,this.action=this.editing?this.actionLabels.RENAME:this.actionLabels.CREATE}editAction(){const e=this.snapshotForm.getValue("snapshotName"),t=new R.a(this.poolName,this.namespace,this.imageName),a=new F.a;a.name="rbd/snap/edit",a.metadata={image_spec:t.toString(),snapshot_name:e},this.rbdService.renameSnapshot(t,this.snapName,e).toPromise().then(()=>{this.taskManagerService.subscribe(a.name,a.metadata,e=>{this.notificationService.notifyTask(e)}),this.activeModal.close(),this.onSubmit.next(this.snapName)}).catch(()=>{this.snapshotForm.setErrors({cdSubmitButton:!0})})}createAction(){const e=this.snapshotForm.getValue("snapshotName"),t=new R.a(this.poolName,this.namespace,this.imageName),a=new F.a;a.name="rbd/snap/create",a.metadata={image_spec:t.toString(),snapshot_name:e},this.rbdService.createSnapshot(t,e).toPromise().then(()=>{this.taskManagerService.subscribe(a.name,a.metadata,e=>{this.notificationService.notifyTask(e)}),this.activeModal.close(),this.onSubmit.next(e)}).catch(()=>{this.snapshotForm.setErrors({cdSubmitButton:!0})})}submit(){this.editing?this.editAction():this.createAction()}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(r.a),S.Mb(_),S.Mb(Oo.a),S.Mb(pt.a),S.Mb(l.b))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-rbd-snapshot-form-modal"]],decls:19,vars:15,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"modal-content"],["name","snapshotForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","snapshotName",1,"cd-col-form-label","required"],"Name",[1,"cd-col-form-input"],["type","text","placeholder","Snapshot name...","id","snapshotName","name","snapshotName","formControlName","snapshotName","autofocus","",1,"form-control"],["class","invalid-feedback",4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required."]},template:function(e,t){if(1&e&&(S.Sb(0,"cd-modal",0),S.Qb(1,1),S.Wb(2,2),S.jc(3,"titlecase"),S.jc(4,"upperFirst"),S.Pb(),S.Qb(5,3),S.Sb(6,"form",4,5),S.Sb(8,"div",6),S.Sb(9,"div",7),S.Sb(10,"label",8),S.Wb(11,9),S.Rb(),S.Sb(12,"div",10),S.Nb(13,"input",11),S.Mc(14,xo,2,0,"span",12),S.Rb(),S.Rb(),S.Rb(),S.Sb(15,"div",13),S.Sb(16,"cd-form-button-panel",14),S.gc("submitActionEvent",(function(){return t.submit()})),S.jc(17,"titlecase"),S.jc(18,"upperFirst"),S.Rb(),S.Rb(),S.Rb(),S.Pb(),S.Rb()),2&e){const e=S.Ac(7);S.pc("modalRef",t.activeModal),S.yb(4),S.ac(S.kc(3,7,t.action))(S.kc(4,9,t.resource)),S.Xb(2),S.yb(2),S.pc("formGroup",t.snapshotForm),S.yb(8),S.pc("ngIf",t.snapshotForm.showError("snapshotName",e,"required")),S.yb(2),S.pc("form",t.snapshotForm)("submitText",S.kc(17,11,t.action)+" "+S.kc(18,13,t.resource))}},directives:[E.a,o.C,o.r,o.k,C.a,D.a,O.a,o.d,A.a,o.q,o.i,ha.a,i.r,x.a],pipes:[i.A,le.a],styles:[""]}),e})();class Wo{constructor(e,t,a){this.featuresName=t,this.cloneFormatVersion=1,a.cloneFormatVersion().subscribe(e=>{this.cloneFormatVersion=e}),this.create={permission:"create",icon:N.a.add,name:e.CREATE},this.rename={permission:"update",icon:N.a.edit,name:e.RENAME},this.protect={permission:"update",icon:N.a.lock,visible:e=>e.hasSingleSelection&&!e.first().is_protected,name:e.PROTECT},this.unprotect={permission:"update",icon:N.a.unlock,visible:e=>e.hasSingleSelection&&e.first().is_protected,name:e.UNPROTECT},this.clone={permission:"create",canBePrimary:e=>e.hasSingleSelection,disable:e=>this.getCloneDisableDesc(e,this.featuresName),icon:N.a.clone,name:e.CLONE},this.copy={permission:"create",canBePrimary:e=>e.hasSingleSelection,disable:e=>!e.hasSingleSelection||e.first().cdExecuting,icon:N.a.copy,name:e.COPY},this.rollback={permission:"update",icon:N.a.undo,name:e.ROLLBACK},this.deleteSnap={permission:"delete",icon:N.a.destroy,disable:e=>{const t=e.first();return!e.hasSingleSelection||t.cdExecuting||t.is_protected},name:e.DELETE},this.ordering=[this.create,this.rename,this.protect,this.unprotect,this.clone,this.copy,this.rollback,this.deleteSnap]}getCloneDisableDesc(e,t){return!(e.hasSingleSelection&&!e.first().cdExecuting)||((null==t?void 0:t.includes("layering"))?1===this.cloneFormatVersion&&!e.first().is_protected&&"Snapshot must be protected in order to clone.":"Parent image must support Layering")}}class qo{}const Bo=["nameTpl"],Go=["rollbackTpl"];function Lo(e,t){if(1&e&&(S.Qb(0),S.Wb(1,3),S.Pb(),S.Sb(2,"strong"),S.Oc(3),S.Rb(),S.Oc(4,".\n")),2&e){const e=t.$implicit;S.yb(3),S.Qc(" ",e.snapName,"")}}let jo=(()=>{class e{constructor(e,t,a,i,o,s,n,r,c,l,b){this.authStorageService=e,this.modalService=t,this.dimlessBinaryPipe=a,this.cdDatePipe=i,this.rbdService=o,this.taskManagerService=s,this.notificationService=n,this.summaryService=r,this.taskListService=c,this.actionLabels=l,this.cdr=b,this.snapshots=[],this.selection=new nt.a,this.builders={"rbd/snap/create":e=>{const t=new qo;return t.name=e.snapshot_name,t}},this.permission=this.authStorageService.getPermissions().rbdImage}ngOnInit(){this.columns=[{name:"Name",prop:"name",cellTransformation:st.a.executing,flexGrow:2},{name:"Size",prop:"size",flexGrow:1,cellClass:"text-right",pipe:this.dimlessBinaryPipe},{name:"Provisioned",prop:"disk_usage",flexGrow:1,cellClass:"text-right",pipe:this.dimlessBinaryPipe},{name:"State",prop:"is_protected",flexGrow:1,cellTransformation:st.a.badge,customTemplateConfig:{map:{true:{value:"PROTECTED",class:"badge-success"},false:{value:"UNPROTECTED",class:"badge-info"}}}},{name:"Created",prop:"timestamp",flexGrow:1,pipe:this.cdDatePipe}],this.imageSpec=new R.a(this.poolName,this.namespace,this.rbdName),this.rbdTableActions=new Wo(this.actionLabels,this.featuresName,this.rbdService),this.rbdTableActions.create.click=()=>this.openCreateSnapshotModal(),this.rbdTableActions.rename.click=()=>this.openEditSnapshotModal(),this.rbdTableActions.protect.click=()=>this.toggleProtection(),this.rbdTableActions.unprotect.click=()=>this.toggleProtection();const e=()=>this.selection.first()&&`${this.imageSpec.toStringEncoded()}/${encodeURIComponent(this.selection.first().name)}`;this.rbdTableActions.clone.routerLink=()=>"/block/rbd/clone/"+e(),this.rbdTableActions.copy.routerLink=()=>"/block/rbd/copy/"+e(),this.rbdTableActions.rollback.click=()=>this.rollbackModal(),this.rbdTableActions.deleteSnap.click=()=>this.deleteSnapshotModal(),this.tableActions=this.rbdTableActions.ordering,this.taskListService.init(()=>Object(Po.a)(this.snapshots),null,e=>{zo.a.updateChanged(this,{data:e})&&(this.cdr.detectChanges(),this.data=[...this.data])},()=>{zo.a.updateChanged(this,{data:this.snapshots})&&(this.cdr.detectChanges(),this.data=[...this.data])},e=>["rbd/snap/create","rbd/snap/delete","rbd/snap/edit","rbd/snap/rollback"].includes(e.name)&&this.imageSpec.toString()===e.metadata.image_spec,(e,t)=>e.name===t.metadata.snapshot_name,this.builders)}ngOnChanges(){this.columns&&(this.imageSpec=new R.a(this.poolName,this.namespace,this.rbdName),this.rbdTableActions&&(this.rbdTableActions.featuresName=this.featuresName),this.taskListService.fetch())}openSnapshotModal(e,t=null){this.modalRef=this.modalService.show(Vo),this.modalRef.componentInstance.poolName=this.poolName,this.modalRef.componentInstance.imageName=this.rbdName,this.modalRef.componentInstance.namespace=this.namespace,t?this.modalRef.componentInstance.setEditing():t=`${this.rbdName}_${Ro()().toISOString(!0)}`,this.modalRef.componentInstance.setSnapName(t),this.modalRef.componentInstance.onSubmit.subscribe(t=>{const a=new Eo.a;a.name=e,a.metadata={image_spec:this.imageSpec.toString(),snapshot_name:t},this.summaryService.addRunningTask(a)})}openCreateSnapshotModal(){this.openSnapshotModal("rbd/snap/create")}openEditSnapshotModal(){this.openSnapshotModal("rbd/snap/edit",this.selection.first().name)}toggleProtection(){const e=this.selection.first().name,t=this.selection.first().is_protected,a=new F.a;a.name="rbd/snap/edit";const i=new R.a(this.poolName,this.namespace,this.rbdName);a.metadata={image_spec:i.toString(),snapshot_name:e},this.rbdService.protectSnapshot(i,e,!t).toPromise().then(()=>{const e=new Eo.a;e.name=a.name,e.metadata=a.metadata,this.summaryService.addRunningTask(e),this.taskManagerService.subscribe(a.name,a.metadata,e=>{this.notificationService.notifyTask(e)})})}_asyncTask(e,t,a){const i=new F.a;i.name=t,i.metadata={image_spec:new R.a(this.poolName,this.namespace,this.rbdName).toString(),snapshot_name:a};const o=new R.a(this.poolName,this.namespace,this.rbdName);this.rbdService[e](o,a).toPromise().then(()=>{const e=new Eo.a;e.name=i.name,e.metadata=i.metadata,this.summaryService.addRunningTask(e),this.modalRef.close(),this.taskManagerService.subscribe(e.name,e.metadata,e=>{this.notificationService.notifyTask(e)})}).catch(()=>{this.modalRef.componentInstance.stopLoadingSpinner()})}rollbackModal(){const e=this.selection.selected[0].name,t=new R.a(this.poolName,this.namespace,this.rbdName).toString(),a={titleText:"RBD snapshot rollback",buttonText:"Rollback",bodyTpl:this.rollbackTpl,bodyData:{snapName:`${t}@${e}`},onSubmit:()=>{this._asyncTask("rollbackSnapshot","rbd/snap/rollback",e)}};this.modalRef=this.modalService.show(go.a,a)}deleteSnapshotModal(){const e=this.selection.selected[0].name;this.modalRef=this.modalService.show(it.a,{itemDescription:"RBD snapshot",itemNames:[e],submitAction:()=>this._asyncTask("deleteSnapshot","rbd/snap/delete",e)})}updateSelection(e){this.selection=e}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(lt.a),S.Mb(P.a),S.Mb(hi.a),S.Mb(Co.a),S.Mb(_),S.Mb(Oo.a),S.Mb(pt.a),S.Mb(Do.a),S.Mb(bt.a),S.Mb(l.b),S.Mb(S.h))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-rbd-snapshot-list"]],viewQuery:function(e,t){var a;1&e&&(S.Tc(Bo,!0),S.Jc(Go,!0)),2&e&&(S.zc(a=S.hc())&&(t.nameTpl=a.first),S.zc(a=S.hc())&&(t.rollbackTpl=a.first))},inputs:{snapshots:"snapshots",featuresName:"featuresName",poolName:"poolName",namespace:"namespace",rbdName:"rbdName"},features:[S.xb([bt.a]),S.wb],decls:4,vars:5,consts:function(){return[["columnMode","flex","selectionType","single",3,"data","columns","updateSelection"],[1,"table-actions",3,"permission","selection","tableActions"],["rollbackTpl",""],"You are about to rollback"]},template:function(e,t){1&e&&(S.Sb(0,"cd-table",0),S.gc("updateSelection",(function(e){return t.updateSelection(e)})),S.Nb(1,"cd-table-actions",1),S.Rb(),S.Mc(2,Lo,5,1,"ng-template",null,2,S.Nc)),2&e&&(S.pc("data",t.data)("columns",t.columns),S.yb(1),S.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions))},directives:[ot.a,Mt.a],styles:[""],changeDetection:0}),e})();var Qo=a("aAWM"),Uo=a("insk"),Yo=a("nSDx");const Ko=["poolConfigurationSourceTpl"];function Jo(e,t){1&e&&(S.Qb(0),S.cc(1,3),S.Nb(2,"strong"),S.Zb(),S.Pb())}function Xo(e,t){if(1&e&&(S.Sb(0,"span"),S.Sb(1,"span",38),S.Oc(2),S.Rb(),S.Rb()),2&e){const e=t.$implicit;S.yb(2),S.Pc(e)}}function Ho(e,t){if(1&e&&(S.Sb(0,"span"),S.Sb(1,"span",39),S.Wb(2,40),S.Rb(),S.Rb()),2&e){S.ic(3);const e=S.Ac(1);S.yb(1),S.pc("ngbTooltip",e)}}function Zo(e,t){if(1&e&&(S.Sb(0,"span"),S.Oc(1),S.jc(2,"dimlessBinary"),S.Rb()),2&e){const e=S.ic(3);S.yb(1),S.Qc(" ",S.kc(2,1,e.selection.disk_usage)," ")}}function es(e,t){if(1&e&&(S.Sb(0,"span"),S.Sb(1,"span",39),S.Wb(2,41),S.Rb(),S.Rb()),2&e){S.ic(3);const e=S.Ac(1);S.yb(1),S.pc("ngbTooltip",e)}}function ts(e,t){if(1&e&&(S.Sb(0,"span"),S.Oc(1),S.jc(2,"dimlessBinary"),S.Rb()),2&e){const e=S.ic(3);S.yb(1),S.Qc(" ",S.kc(2,1,e.selection.total_disk_usage)," ")}}function as(e,t){if(1&e&&(S.Sb(0,"span"),S.Oc(1),S.Rb()),2&e){const e=S.ic(4);S.yb(1),S.Qc("/",e.selection.parent.pool_namespace,"")}}function is(e,t){if(1&e&&(S.Sb(0,"span"),S.Oc(1),S.Mc(2,as,2,1,"span",1),S.Oc(3),S.Rb()),2&e){const e=S.ic(3);S.yb(1),S.Pc(e.selection.parent.pool_name),S.yb(1),S.pc("ngIf",e.selection.parent.pool_namespace),S.yb(1),S.Rc("/",e.selection.parent.image_name,"@",e.selection.parent.snap_name,"")}}function os(e,t){1&e&&(S.Sb(0,"span"),S.Oc(1,"-"),S.Rb())}function ss(e,t){if(1&e&&(S.Sb(0,"table",17),S.Sb(1,"tbody"),S.Sb(2,"tr"),S.Sb(3,"td",18),S.Wb(4,19),S.Rb(),S.Sb(5,"td",20),S.Oc(6),S.Rb(),S.Rb(),S.Sb(7,"tr"),S.Sb(8,"td",21),S.Wb(9,22),S.Rb(),S.Sb(10,"td"),S.Oc(11),S.Rb(),S.Rb(),S.Sb(12,"tr"),S.Sb(13,"td",21),S.Wb(14,23),S.Rb(),S.Sb(15,"td"),S.Oc(16),S.jc(17,"empty"),S.Rb(),S.Rb(),S.Sb(18,"tr"),S.Sb(19,"td",21),S.Wb(20,24),S.Rb(),S.Sb(21,"td"),S.Oc(22),S.jc(23,"cdDate"),S.Rb(),S.Rb(),S.Sb(24,"tr"),S.Sb(25,"td",21),S.Wb(26,25),S.Rb(),S.Sb(27,"td"),S.Oc(28),S.jc(29,"dimlessBinary"),S.Rb(),S.Rb(),S.Sb(30,"tr"),S.Sb(31,"td",21),S.Wb(32,26),S.Rb(),S.Sb(33,"td"),S.Oc(34),S.jc(35,"dimless"),S.Rb(),S.Rb(),S.Sb(36,"tr"),S.Sb(37,"td",21),S.Wb(38,27),S.Rb(),S.Sb(39,"td"),S.Oc(40),S.jc(41,"dimlessBinary"),S.Rb(),S.Rb(),S.Sb(42,"tr"),S.Sb(43,"td",21),S.Wb(44,28),S.Rb(),S.Sb(45,"td"),S.Mc(46,Xo,3,1,"span",29),S.Rb(),S.Rb(),S.Sb(47,"tr"),S.Sb(48,"td",21),S.Wb(49,30),S.Rb(),S.Sb(50,"td"),S.Mc(51,Ho,3,1,"span",1),S.Mc(52,Zo,3,3,"span",1),S.Rb(),S.Rb(),S.Sb(53,"tr"),S.Sb(54,"td",21),S.Wb(55,31),S.Rb(),S.Sb(56,"td"),S.Mc(57,es,3,1,"span",1),S.Mc(58,ts,3,3,"span",1),S.Rb(),S.Rb(),S.Sb(59,"tr"),S.Sb(60,"td",21),S.Wb(61,32),S.Rb(),S.Sb(62,"td"),S.Oc(63),S.jc(64,"dimlessBinary"),S.Rb(),S.Rb(),S.Sb(65,"tr"),S.Sb(66,"td",21),S.Wb(67,33),S.Rb(),S.Sb(68,"td"),S.Oc(69),S.Rb(),S.Rb(),S.Sb(70,"tr"),S.Sb(71,"td",21),S.Wb(72,34),S.Rb(),S.Sb(73,"td"),S.Mc(74,is,4,4,"span",1),S.Mc(75,os,2,0,"span",1),S.Rb(),S.Rb(),S.Sb(76,"tr"),S.Sb(77,"td",21),S.Wb(78,35),S.Rb(),S.Sb(79,"td"),S.Oc(80),S.Rb(),S.Rb(),S.Sb(81,"tr"),S.Sb(82,"td",21),S.Wb(83,36),S.Rb(),S.Sb(84,"td"),S.Oc(85),S.Rb(),S.Rb(),S.Sb(86,"tr"),S.Sb(87,"td",21),S.Wb(88,37),S.Rb(),S.Sb(89,"td"),S.Oc(90),S.Rb(),S.Rb(),S.Rb(),S.Rb()),2&e){const e=S.ic(2);S.yb(6),S.Pc(e.selection.name),S.yb(5),S.Pc(e.selection.pool_name),S.yb(5),S.Pc(S.kc(17,19,e.selection.data_pool)),S.yb(6),S.Pc(S.kc(23,21,e.selection.timestamp)),S.yb(6),S.Pc(S.kc(29,23,e.selection.size)),S.yb(6),S.Pc(S.kc(35,25,e.selection.num_objs)),S.yb(6),S.Pc(S.kc(41,27,e.selection.obj_size)),S.yb(6),S.pc("ngForOf",e.selection.features_name),S.yb(5),S.pc("ngIf",-1===(null==e.selection.features_name?null:e.selection.features_name.indexOf("fast-diff"))),S.yb(1),S.pc("ngIf",-1!==(null==e.selection.features_name?null:e.selection.features_name.indexOf("fast-diff"))),S.yb(5),S.pc("ngIf",-1===(null==e.selection.features_name?null:e.selection.features_name.indexOf("fast-diff"))),S.yb(1),S.pc("ngIf",-1!==(null==e.selection.features_name?null:e.selection.features_name.indexOf("fast-diff"))),S.yb(5),S.Pc(S.kc(64,29,e.selection.stripe_unit)),S.yb(6),S.Pc(e.selection.stripe_count),S.yb(5),S.pc("ngIf",e.selection.parent),S.yb(1),S.pc("ngIf",!e.selection.parent),S.yb(5),S.Pc(e.selection.block_name_prefix),S.yb(5),S.Pc(e.selection.order),S.yb(5),S.Pc(e.selection.image_format)}}function ns(e,t){if(1&e&&S.Nb(0,"cd-rbd-snapshot-list",42),2&e){const e=S.ic(2);S.pc("snapshots",e.selection.snapshots)("featuresName",e.selection.features_name)("poolName",e.selection.pool_name)("namespace",e.selection.namespace)("rbdName",e.selection.name)}}function rs(e,t){if(1&e&&S.Nb(0,"cd-rbd-configuration-table",43),2&e){const e=S.ic(2);S.pc("data",e.selection.configuration)}}function cs(e,t){if(1&e&&S.Nb(0,"cd-grafana",44),2&e){const e=S.ic(2);S.pc("grafanaPath",e.rbdDashboardUrl)}}function ls(e,t){if(1&e&&(S.Qb(0),S.Sb(1,"ul",4,5),S.Sb(3,"li",6),S.Sb(4,"a",7),S.Wb(5,8),S.Rb(),S.Mc(6,ss,91,31,"ng-template",9),S.Rb(),S.Sb(7,"li",10),S.Sb(8,"a",7),S.Wb(9,11),S.Rb(),S.Mc(10,ns,1,5,"ng-template",9),S.Rb(),S.Sb(11,"li",12),S.Sb(12,"a",7),S.Wb(13,13),S.Rb(),S.Mc(14,rs,1,1,"ng-template",9),S.Rb(),S.Sb(15,"li",14),S.Sb(16,"a",7),S.Wb(17,15),S.Rb(),S.Mc(18,cs,1,1,"ng-template",9),S.Rb(),S.Rb(),S.Nb(19,"div",16),S.Pb()),2&e){const e=S.Ac(2);S.yb(19),S.pc("ngbNavOutlet",e)}}function bs(e,t){1&e&&(S.Qb(0),S.Sb(1,"cd-alert-panel",45),S.Wb(2,46),S.Rb(),S.Pb())}function ds(e,t){1&e&&(S.Qb(0),S.Sb(1,"strong",49),S.Yb(2,50),S.Wb(3,51),S.Rb(),S.Pb())}function ps(e,t){1&e&&(S.Sb(0,"span",49),S.Yb(1,52),S.Wb(2,53),S.Rb())}function ms(e,t){if(1&e&&(S.Mc(0,ds,4,0,"ng-container",47),S.Mc(1,ps,3,0,"ng-template",null,48,S.Nc)),2&e){const e=t.value,a=S.Ac(2);S.pc("ngIf",+e)("ngIfElse",a)}}let us=(()=>{class e{ngOnChanges(){this.selection&&(this.rbdDashboardUrl=`rbd-details?var-Pool=${this.selection.pool_name}&var-Image=${this.selection.name}`)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-rbd-details"]],viewQuery:function(e,t){var a;1&e&&(S.Jc(Ko,!0),S.Jc(r.p,!0)),2&e&&(S.zc(a=S.hc())&&(t.poolConfigurationSourceTpl=a.first),S.zc(a=S.hc())&&(t.nav=a.first))},inputs:{selection:"selection",images:"images"},features:[S.wb],decls:6,vars:2,consts:function(){return[["usageNotAvailableTooltipTpl",""],[4,"ngIf"],["poolConfigurationSourceTpl",""],"Only available for RBD images with " + "\ufffd#2\ufffd" + "fast-diff" + "\ufffd/#2\ufffd" + " enabled",["ngbNav","","cdStatefulTab","rbd-details",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem","details"],["ngbNavLink",""],"Details",["ngbNavContent",""],["ngbNavItem","snapshots"],"Snapshots",["ngbNavItem","configuration"],"Configuration",["ngbNavItem","performance"],"Performance",[3,"ngbNavOutlet"],[1,"table","table-striped","table-bordered"],[1,"bold","w-25"],"Name",[1,"w-75"],[1,"bold"],"Pool","Data Pool","Created","Size","Objects","Object size","Features",[4,"ngFor","ngForOf"],"Provisioned","Total provisioned","Striping unit","Striping count","Parent","Block name prefix","Order","Format Version",[1,"badge","badge-dark","mr-2"],["placement","top",1,"form-text","text-muted",3,"ngbTooltip"],"N/A","N/A",[3,"snapshots","featuresName","poolName","namespace","rbdName"],[3,"data"],["uid","YhCYGcuZz","grafanaStyle","one",3,"grafanaPath"],["type","warning"],"Information can not be displayed for RBD in status 'Removing'.",[4,"ngIf","ngIfElse"],["global",""],[6,"ngbTooltip"],["ngbTooltip","This setting overrides the global value"],"Image",["ngbTooltip","This is the global value. No value for this option has been set for this image."],"Global"]},template:function(e,t){1&e&&(S.Mc(0,Jo,3,0,"ng-template",null,0,S.Nc),S.Mc(2,ls,20,1,"ng-container",1),S.Mc(3,bs,3,0,"ng-container",1),S.Mc(4,ms,3,2,"ng-template",null,2,S.Nc)),2&e&&(S.yb(2),S.pc("ngIf",t.selection&&"REMOVING"!==t.selection.source),S.yb(1),S.pc("ngIf",t.selection&&"REMOVING"===t.selection.source))},directives:[i.r,r.p,Za.a,r.r,r.s,r.q,r.u,i.q,r.D,jo,Qo.a,Uo.a,_t.a],pipes:[Yo.a,Co.a,hi.a,jt.a],styles:[""]}),e})();const fs=["usageTpl"],hs=["parentTpl"],gs=["nameTpl"],Ss=["flattenTpl"],vs=["deleteTpl"],ys=["removingStatTpl"];function Rs(e,t){1&e&&S.Nb(0,"div",9),2&e&&S.pc("innerHtml","Only available for RBD images with <strong>fast-diff</strong> enabled",S.Ec)}function ws(e,t){if(1&e&&(S.Sb(0,"span"),S.Oc(1),S.Rb()),2&e){const e=S.ic(2).value;S.yb(1),S.Qc("/",e.pool_namespace,"")}}function _s(e,t){if(1&e&&(S.Sb(0,"span"),S.Oc(1),S.Mc(2,ws,2,1,"span",10),S.Oc(3),S.Rb()),2&e){const e=S.ic().value;S.yb(1),S.Pc(e.pool_name),S.yb(1),S.pc("ngIf",e.pool_namespace),S.yb(1),S.Rc("/",e.image_name,"@",e.snap_name,"")}}function ks(e,t){1&e&&(S.Sb(0,"span"),S.Oc(1,"-"),S.Rb())}function Ms(e,t){if(1&e&&(S.Mc(0,_s,4,4,"span",10),S.Mc(1,ks,2,0,"span",10)),2&e){const e=t.value;S.pc("ngIf",e),S.yb(1),S.pc("ngIf",!e)}}function Ns(e,t){if(1&e&&(S.Oc(0," You are about to flatten "),S.Sb(1,"strong"),S.Oc(2),S.Rb(),S.Oc(3,". "),S.Nb(4,"br"),S.Nb(5,"br"),S.Oc(6," All blocks will be copied from parent "),S.Sb(7,"strong"),S.Oc(8),S.Rb(),S.Oc(9," to child "),S.Sb(10,"strong"),S.Oc(11),S.Rb(),S.Oc(12,".\n")),2&e){const e=t.$implicit;S.yb(2),S.Pc(e.child),S.yb(6),S.Pc(e.parent),S.yb(3),S.Pc(e.child)}}function Is(e,t){if(1&e&&(S.Sb(0,"li"),S.Oc(1),S.Rb()),2&e){const e=t.$implicit;S.yb(1),S.Pc(e)}}function $s(e,t){if(1&e&&(S.Qb(0),S.Sb(1,"span"),S.Wb(2,14),S.Rb(),S.Sb(3,"ul"),S.Mc(4,Is,2,1,"li",15),S.Rb(),S.Pb()),2&e){const e=S.ic(2).snapshots;S.yb(4),S.pc("ngForOf",e)}}function Ts(e,t){if(1&e&&(S.Sb(0,"div",12),S.Sb(1,"span"),S.Wb(2,13),S.Rb(),S.Nb(3,"br"),S.Mc(4,$s,5,1,"ng-container",10),S.Rb()),2&e){const e=S.ic().snapshots;S.yb(4),S.pc("ngIf",e.length>0)}}function Fs(e,t){1&e&&S.Mc(0,Ts,5,1,"div",11),2&e&&S.pc("ngIf",t.hasSnapshots)}const Ps=function(e,t){return[e,t]};function zs(e,t){if(1&e&&S.Nb(0,"i",17),2&e){const e=S.ic(2);S.pc("ngClass",S.vc(1,Ps,e.icons.spinner,e.icons.spin))}}function Es(e,t){if(1&e&&(S.Sb(0,"span",17),S.Oc(1),S.Rb()),2&e){const e=S.ic(),t=e.column,a=e.row;S.pc("ngClass",null!=t&&null!=t.customTemplateConfig&&t.customTemplateConfig.executingClass?t.customTemplateConfig.executingClass:"text-muted italic"),S.yb(1),S.Qc(" (",a.cdExecuting,") ")}}function Cs(e,t){if(1&e&&(S.Sb(0,"i",19),S.Yb(1,20),S.Rb()),2&e){const e=S.ic(2);S.Bb("",e.icons.warning," warn")}}function Ds(e,t){if(1&e&&(S.Mc(0,zs,1,4,"i",16),S.Sb(1,"span",17),S.Oc(2),S.Rb(),S.Mc(3,Es,2,2,"span",16),S.Mc(4,Cs,2,3,"i",18)),2&e){const e=t.column,a=t.value,i=t.row;S.pc("ngIf",i.cdExecuting),S.yb(1),S.pc("ngClass",null==e||null==e.customTemplateConfig?null:e.customTemplateConfig.valueClass),S.yb(1),S.Qc(" ",a," "),S.yb(1),S.pc("ngIf",i.cdExecuting),S.yb(1),S.pc("ngIf",i.source&&"REMOVING"===i.source)}}let Os=(()=>{class e extends at.a{constructor(e,t,a,i,o,s,n,r,c){super(),this.authStorageService=e,this.rbdService=t,this.dimlessBinaryPipe=a,this.dimlessPipe=i,this.modalService=o,this.taskWrapper=s,this.taskListService=n,this.urlBuilder=r,this.actionLabels=c,this.tableStatus=new Pa.a,this.selection=new nt.a,this.icons=N.a,this.builders={"rbd/create":e=>this.createRbdFromTask(e.pool_name,e.namespace,e.image_name),"rbd/delete":e=>this.createRbdFromTaskImageSpec(e.image_spec),"rbd/clone":e=>this.createRbdFromTask(e.child_pool_name,e.child_namespace,e.child_image_name),"rbd/copy":e=>this.createRbdFromTask(e.dest_pool_name,e.dest_namespace,e.dest_image_name)},this.permission=this.authStorageService.getPermissions().rbdImage;const l=()=>this.selection.first()&&new R.a(this.selection.first().pool_name,this.selection.first().namespace,this.selection.first().name).toStringEncoded();this.tableActions=[{permission:"create",icon:N.a.add,routerLink:()=>this.urlBuilder.getCreate(),canBePrimary:e=>!e.hasSingleSelection,name:this.actionLabels.CREATE},{permission:"update",icon:N.a.edit,routerLink:()=>this.urlBuilder.getEdit(l()),name:this.actionLabels.EDIT,disable:e=>this.getRemovingStatusDesc(e)||this.getInvalidNameDisable(e)},{permission:"create",canBePrimary:e=>e.hasSingleSelection,disable:e=>this.getRemovingStatusDesc(e)||this.getInvalidNameDisable(e)||!!e.first().cdExecuting,icon:N.a.copy,routerLink:()=>"/block/rbd/copy/"+l(),name:this.actionLabels.COPY},{permission:"update",disable:e=>this.getRemovingStatusDesc(e)||this.getInvalidNameDisable(e)||e.first().cdExecuting||!e.first().parent,icon:N.a.flatten,click:()=>this.flattenRbdModal(),name:this.actionLabels.FLATTEN},{permission:"delete",icon:N.a.destroy,click:()=>this.deleteRbdModal(),name:this.actionLabels.DELETE,disable:e=>this.getDeleteDisableDesc(e)},{permission:"delete",icon:N.a.trash,click:()=>this.trashRbdModal(),name:this.actionLabels.TRASH,disable:e=>this.getRemovingStatusDesc(e)||this.getInvalidNameDisable(e)||e.first().image_format===vi.V1}]}createRbdFromTaskImageSpec(e){const t=R.a.fromString(e);return this.createRbdFromTask(t.poolName,t.namespace,t.imageName)}createRbdFromTask(e,t,a){const i=new Si;return i.id="-1",i.unique_id="-1",i.name=a,i.namespace=t,i.pool_name=e,i.image_format=vi.V2,i}ngOnInit(){this.columns=[{name:"Name",prop:"name",flexGrow:2,cellTemplate:this.removingStatTpl},{name:"Pool",prop:"pool_name",flexGrow:2},{name:"Namespace",prop:"namespace",flexGrow:2},{name:"Size",prop:"size",flexGrow:1,cellClass:"text-right",pipe:this.dimlessBinaryPipe},{name:"Objects",prop:"num_objs",flexGrow:1,cellClass:"text-right",pipe:this.dimlessPipe},{name:"Object size",prop:"obj_size",flexGrow:1,cellClass:"text-right",pipe:this.dimlessBinaryPipe},{name:"Provisioned",prop:"disk_usage",cellClass:"text-center",flexGrow:1,pipe:this.dimlessBinaryPipe},{name:"Total provisioned",prop:"total_disk_usage",cellClass:"text-center",flexGrow:1,pipe:this.dimlessBinaryPipe},{name:"Parent",prop:"parent",flexGrow:2,cellTemplate:this.parentTpl}],this.taskListService.init(()=>this.rbdService.list(),e=>this.prepareResponse(e),e=>this.images=e,()=>this.onFetchError(),e=>["rbd/clone","rbd/copy","rbd/create","rbd/delete","rbd/edit","rbd/flatten","rbd/trash/move"].includes(e.name),(e,t)=>{let a;switch(t.name){case"rbd/copy":a=new R.a(t.metadata.dest_pool_name,t.metadata.dest_namespace,t.metadata.dest_image_name).toString();break;case"rbd/clone":a=new R.a(t.metadata.child_pool_name,t.metadata.child_namespace,t.metadata.child_image_name).toString();break;case"rbd/create":a=new R.a(t.metadata.pool_name,t.metadata.namespace,t.metadata.image_name).toString();break;default:a=t.metadata.image_spec}return a===new R.a(e.pool_name,e.namespace,e.name).toString()},this.builders)}onFetchError(){this.table.reset(),this.tableStatus=new Pa.a(So.a.ValueException)}prepareResponse(e){let t=[];const a={};let i;if(e.forEach(e=>{m.a.isUndefined(a[e.status])&&(a[e.status]=[]),a[e.status].push(e.pool_name),t=t.concat(e.value)}),a[So.a.ValueException]?i=So.a.ValueException:a[So.a.ValueStale]?i=So.a.ValueStale:a[So.a.ValueNone]&&(i=So.a.ValueNone),i){const e=(a[i].length>1?"pools ":"pool ")+a[i].join();this.tableStatus=new Pa.a(i,e)}else this.tableStatus=new Pa.a;return t}updateSelection(e){this.selection=e}deleteRbdModal(){const e=this.selection.first().pool_name,t=this.selection.first().namespace,a=this.selection.first().name,i=new R.a(e,t,a);this.modalRef=this.modalService.show(it.a,{itemDescription:"RBD",itemNames:[i],bodyTemplate:this.deleteTpl,bodyContext:{hasSnapshots:this.hasSnapshots(),snapshots:this.listProtectedSnapshots()},submitActionObservable:()=>this.taskWrapper.wrapTaskAroundCall({task:new F.a("rbd/delete",{image_spec:i.toString()}),call:this.rbdService.delete(i)})})}trashRbdModal(){const e={poolName:this.selection.first().pool_name,namespace:this.selection.first().namespace,imageName:this.selection.first().name,hasSnapshots:this.hasSnapshots()};this.modalRef=this.modalService.show($o,e)}flattenRbd(e){this.taskWrapper.wrapTaskAroundCall({task:new F.a("rbd/flatten",{image_spec:e.toString()}),call:this.rbdService.flatten(e)}).subscribe({complete:()=>{this.modalRef.close()}})}flattenRbdModal(){const e=this.selection.first().pool_name,t=this.selection.first().namespace,a=this.selection.first().name,i=this.selection.first().parent,o=new R.a(i.pool_name,i.pool_namespace,i.image_name),s=new R.a(e,t,a),n={titleText:"RBD flatten",buttonText:"Flatten",bodyTpl:this.flattenTpl,bodyData:{parent:`${o}@${i.snap_name}`,child:s.toString()},onSubmit:()=>{this.flattenRbd(s)}};this.modalRef=this.modalService.show(go.a,n)}hasSnapshots(){return(this.selection.first().snapshots||[]).length>0}hasClonedSnapshots(e){return(e.snapshots||[]).some(e=>e.children&&e.children.length>0)}listProtectedSnapshots(){return this.selection.first().snapshots.reduce((e,t)=>(t.is_protected&&e.push(t.name),e),[])}getDeleteDisableDesc(e){const t=e.first();return t&&this.hasClonedSnapshots(t)?"This RBD has cloned snapshots. Please delete related RBDs before deleting this RBD.":this.getInvalidNameDisable(e)||this.hasClonedSnapshots(e.first())}getInvalidNameDisable(e){var t;const a=e.first();return(null===(t=null==a?void 0:a.name)||void 0===t?void 0:t.match(/[@/]/))?"This RBD image has an invalid name and can't be managed by ceph.":!e.first()||!e.hasSingleSelection}getRemovingStatusDesc(e){const t=e.first();return"REMOVING"===(null==t?void 0:t.source)&&"Action not possible for an RBD in status 'Removing'"}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(lt.a),S.Mb(_),S.Mb(hi.a),S.Mb(jt.a),S.Mb(P.a),S.Mb(z.a),S.Mb(bt.a),S.Mb(vo.a),S.Mb(l.b))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-rbd-list"]],viewQuery:function(e,t){var a;1&e&&(S.Jc(ot.a,!0),S.Tc(fs,!0),S.Jc(hs,!0),S.Tc(gs,!0),S.Jc(Ss,!0),S.Jc(vs,!0),S.Jc(ys,!0)),2&e&&(S.zc(a=S.hc())&&(t.table=a.first),S.zc(a=S.hc())&&(t.usageTpl=a.first),S.zc(a=S.hc())&&(t.parentTpl=a.first),S.zc(a=S.hc())&&(t.nameTpl=a.first),S.zc(a=S.hc())&&(t.flattenTpl=a.first),S.zc(a=S.hc())&&(t.deleteTpl=a.first),S.zc(a=S.hc())&&(t.removingStatTpl=a.first))},features:[S.xb([bt.a,{provide:vo.a,useValue:new vo.a("block/rbd")}]),S.vb],decls:15,vars:10,consts:function(){return[["columnMode","flex","identifier","unique_id","forceIdentifier","true","selectionType","single",3,"data","columns","searchableObjects","hasDetails","status","autoReload","fetchData","setExpandedRow","updateSelection"],["table",""],[1,"table-actions",3,"permission","selection","tableActions"],["cdTableDetail","",3,"selection"],["usageNotAvailableTooltipTpl",""],["parentTpl",""],["flattenTpl",""],["deleteTpl",""],["removingStatTpl",""],[3,"innerHtml"],[4,"ngIf"],["class","alert alert-warning","role","alert",4,"ngIf"],["role","alert",1,"alert","alert-warning"],"Deleting this image will also delete all its snapshots.","The following snapshots are currently protected and will be removed:",[4,"ngFor","ngForOf"],[3,"ngClass",4,"ngIf"],[3,"ngClass"],[3,"class",4,"ngIf",6,"title"],[6,"title"],["title","RBD in status 'Removing'"]]},template:function(e,t){1&e&&(S.Nb(0,"cd-rbd-tabs"),S.Sb(1,"cd-table",0,1),S.gc("fetchData",(function(){return t.taskListService.fetch()}))("setExpandedRow",(function(e){return t.setExpandedRow(e)}))("updateSelection",(function(e){return t.updateSelection(e)})),S.Nb(3,"cd-table-actions",2),S.Nb(4,"cd-rbd-details",3),S.Rb(),S.Mc(5,Rs,1,1,"ng-template",null,4,S.Nc),S.Mc(7,Ms,2,2,"ng-template",null,5,S.Nc),S.Mc(9,Ns,13,3,"ng-template",null,6,S.Nc),S.Mc(11,Fs,1,1,"ng-template",null,7,S.Nc),S.Mc(13,Ds,5,5,"ng-template",null,8,S.Nc)),2&e&&(S.yb(1),S.pc("data",t.images)("columns",t.columns)("searchableObjects",!0)("hasDetails",!0)("status",t.tableStatus)("autoReload",-1),S.yb(2),S.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions),S.yb(1),S.pc("selection",t.expandedRow))},directives:[Fo,ot.a,Mt.a,us,i.r,i.q,i.p],styles:[".warn[_ngcontent-%COMP%]{color:#ffc200}"]}),e})();function As(e,t){1&e&&S.Nb(0,"input",19)}function xs(e,t){1&e&&(S.Sb(0,"option",23),S.Wb(1,24),S.Rb()),2&e&&S.pc("ngValue",null)}function Vs(e,t){1&e&&(S.Sb(0,"option",23),S.Wb(1,25),S.Rb()),2&e&&S.pc("ngValue",null)}function Ws(e,t){1&e&&(S.Sb(0,"option",23),S.Wb(1,26),S.Rb()),2&e&&S.pc("ngValue",null)}function qs(e,t){if(1&e&&(S.Sb(0,"option",27),S.Oc(1),S.Rb()),2&e){const e=t.$implicit;S.pc("value",e.pool_name),S.yb(1),S.Pc(e.pool_name)}}function Bs(e,t){if(1&e&&(S.Sb(0,"select",20),S.Mc(1,xs,2,1,"option",21),S.Mc(2,Vs,2,1,"option",21),S.Mc(3,Ws,2,1,"option",21),S.Mc(4,qs,2,2,"option",22),S.Rb()),2&e){const e=S.ic();S.yb(1),S.pc("ngIf",null===e.pools),S.yb(1),S.pc("ngIf",null!==e.pools&&0===e.pools.length),S.yb(1),S.pc("ngIf",null!==e.pools&&e.pools.length>0),S.yb(1),S.pc("ngForOf",e.pools)}}function Gs(e,t){1&e&&(S.Sb(0,"span",28),S.Wb(1,29),S.Rb())}function Ls(e,t){1&e&&(S.Sb(0,"span",28),S.Wb(1,30),S.Rb())}function js(e,t){1&e&&(S.Sb(0,"span",28),S.Wb(1,31),S.Rb())}let Qs=(()=>{class e{constructor(e,t,a,i,o,s){this.activeModal=e,this.actionLabels=t,this.authStorageService=a,this.notificationService=i,this.poolService=o,this.rbdService=s,this.pools=null,this.editing=!1,this.poolPermission=this.authStorageService.getPermissions().pool,this.createForm()}createForm(){this.namespaceForm=new $.a({pool:new o.h(""),namespace:new o.h("")},this.validator(),this.asyncValidator())}validator(){return e=>{const t=e.get("pool"),a=e.get("namespace");let i=null;t.value||(i={required:!0}),t.setErrors(i);let o=null;return a.value||(o={required:!0}),a.setErrors(o),null}}asyncValidator(){return e=>new Promise(t=>{const a=e.get("pool"),i=e.get("namespace");this.rbdService.listNamespaces(a.value).subscribe(e=>{if(e.some(e=>e.namespace===i.value)){const e={namespaceExists:!0};i.setErrors(e),t(e)}else t(null)})})}ngOnInit(){this.onSubmit=new Ao.a,this.poolPermission.read&&this.poolService.list(["pool_name","type","application_metadata"]).then(e=>{const t=[];for(const a of e)this.rbdService.isRBDPool(a)&&"replicated"===a.type&&t.push(a);if(this.pools=t,1===this.pools.length){const e=this.pools[0].pool_name;this.namespaceForm.get("pool").setValue(e)}})}submit(){const e=this.namespaceForm.getValue("pool"),t=this.namespaceForm.getValue("namespace"),a=new F.a;a.name="rbd/namespace/create",a.metadata={pool:e,namespace:t},this.rbdService.createNamespace(e,t).toPromise().then(()=>{this.notificationService.show(dt.a.success,"Created namespace '" + e + "/" + t + "'"),this.activeModal.close(),this.onSubmit.next()}).catch(()=>{this.namespaceForm.setErrors({cdSubmitButton:!0})})}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(r.a),S.Mb(l.b),S.Mb(lt.a),S.Mb(pt.a),S.Mb(ui.a),S.Mb(_))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-rbd-namespace-form-modal"]],decls:23,vars:9,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"Create Namespace",[1,"modal-content"],["name","namespaceForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","pool",1,"cd-col-form-label","required"],"Pool",[1,"cd-col-form-input"],["class","form-control","type","text","placeholder","Pool name...","id","pool","name","pool","formControlName","pool",4,"ngIf"],["id","pool","name","pool","class","form-control custom-select","formControlName","pool",4,"ngIf"],["class","invalid-feedback",4,"ngIf"],["for","namespace",1,"cd-col-form-label","required"],"Name",["type","text","placeholder","Namespace name...","id","namespace","name","namespace","formControlName","namespace","autofocus","",1,"form-control"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],["type","text","placeholder","Pool name...","id","pool","name","pool","formControlName","pool",1,"form-control"],["id","pool","name","pool","formControlName","pool",1,"form-control","custom-select"],[3,"ngValue",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"ngValue"],"Loading...","-- No rbd pools available --","-- Select a pool --",[3,"value"],[1,"invalid-feedback"],"This field is required.","This field is required.","Namespace already exists."]},template:function(e,t){if(1&e&&(S.Sb(0,"cd-modal",0),S.Qb(1,1),S.Wb(2,2),S.Pb(),S.Qb(3,3),S.Sb(4,"form",4,5),S.Sb(6,"div",6),S.Sb(7,"div",7),S.Sb(8,"label",8),S.Wb(9,9),S.Rb(),S.Sb(10,"div",10),S.Mc(11,As,1,0,"input",11),S.Mc(12,Bs,5,4,"select",12),S.Mc(13,Gs,2,0,"span",13),S.Rb(),S.Rb(),S.Sb(14,"div",7),S.Sb(15,"label",14),S.Wb(16,15),S.Rb(),S.Sb(17,"div",10),S.Nb(18,"input",16),S.Mc(19,Ls,2,0,"span",13),S.Mc(20,js,2,0,"span",13),S.Rb(),S.Rb(),S.Rb(),S.Sb(21,"div",17),S.Sb(22,"cd-form-button-panel",18),S.gc("submitActionEvent",(function(){return t.submit()})),S.Rb(),S.Rb(),S.Rb(),S.Pb(),S.Rb()),2&e){const e=S.Ac(5);S.pc("modalRef",t.activeModal),S.yb(4),S.pc("formGroup",t.namespaceForm),S.yb(7),S.pc("ngIf",!t.poolPermission.read),S.yb(1),S.pc("ngIf",t.poolPermission.read),S.yb(1),S.pc("ngIf",t.namespaceForm.showError("pool",e,"required")),S.yb(6),S.pc("ngIf",t.namespaceForm.showError("namespace",e,"required")),S.yb(1),S.pc("ngIf",t.namespaceForm.showError("namespace",e,"namespaceExists")),S.yb(2),S.pc("form",t.namespaceForm)("submitText",t.actionLabels.CREATE)}},directives:[E.a,o.C,o.r,o.k,C.a,D.a,i.r,O.a,o.d,A.a,o.q,o.i,ha.a,x.a,o.z,i.q,o.u,o.B],styles:[""]}),e})(),Us=(()=>{class e{constructor(e,t,a,i,o,s){this.authStorageService=e,this.rbdService=t,this.poolService=a,this.modalService=i,this.notificationService=o,this.actionLabels=s,this.selection=new nt.a,this.permission=this.authStorageService.getPermissions().rbdImage,this.tableActions=[{permission:"create",icon:N.a.add,click:()=>this.createModal(),name:this.actionLabels.CREATE},{permission:"delete",icon:N.a.destroy,click:()=>this.deleteModal(),name:this.actionLabels.DELETE,disable:()=>this.getDeleteDisableDesc()}]}ngOnInit(){this.columns=[{name:"Namespace",prop:"namespace",flexGrow:1},{name:"Pool",prop:"pool",flexGrow:1},{name:"Total images",prop:"num_images",flexGrow:1}],this.refresh()}refresh(){this.poolService.list(["pool_name","type","application_metadata"]).then(e=>{e=e.filter(e=>this.rbdService.isRBDPool(e)&&"replicated"===e.type);const t=[];e.forEach(e=>{t.push(this.rbdService.listNamespaces(e.pool_name))}),t.length>0?Object(u.a)(t).subscribe(t=>{const a=[];for(let i=0;i<t.length;i++){const o=e[i].pool_name;t[i].forEach(e=>{a.push({id:`${o}/${e.namespace}`,pool:o,namespace:e.namespace,num_images:e.num_images})})}this.namespaces=a}):this.namespaces=[]})}updateSelection(e){this.selection=e}createModal(){this.modalRef=this.modalService.show(Qs),this.modalRef.componentInstance.onSubmit.subscribe(()=>{this.refresh()})}deleteModal(){const e=this.selection.first().pool,t=this.selection.first().namespace;this.modalRef=this.modalService.show(it.a,{itemDescription:"Namespace",itemNames:[`${e}/${t}`],submitAction:()=>this.rbdService.deleteNamespace(e,t).subscribe(()=>{this.notificationService.show(dt.a.success,"Deleted namespace '" + e + "/" + t + "'"),this.modalRef.close(),this.refresh()},()=>{this.modalRef.componentInstance.stopLoadingSpinner()})})}getDeleteDisableDesc(){var e;const t=this.selection.first();return(null==t?void 0:t.num_images)>0?"Namespace contains images":!(null===(e=this.selection)||void 0===e?void 0:e.first())}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(lt.a),S.Mb(_),S.Mb(ui.a),S.Mb(P.a),S.Mb(pt.a),S.Mb(l.b))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-rbd-namespace-list"]],features:[S.xb([bt.a])],decls:4,vars:5,consts:[["columnMode","flex","identifier","id","forceIdentifier","true","selectionType","single",3,"data","columns","fetchData","updateSelection"],[1,"table-actions","btn-toolbar"],[1,"btn-group",3,"permission","selection","tableActions"]],template:function(e,t){1&e&&(S.Nb(0,"cd-rbd-tabs"),S.Sb(1,"cd-table",0),S.gc("fetchData",(function(){return t.refresh()}))("updateSelection",(function(e){return t.updateSelection(e)})),S.Sb(2,"div",1),S.Nb(3,"cd-table-actions",2),S.Rb(),S.Rb()),2&e&&(S.yb(1),S.pc("data",t.namespaces)("columns",t.columns),S.yb(2),S.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions))},directives:[Fo,ot.a,Mt.a],styles:[""]}),e})(),Ys=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-rbd-performance"]],decls:2,vars:1,consts:[["uid","41FrpeUiz","grafanaStyle","two",3,"grafanaPath"]],template:function(e,t){1&e&&(S.Nb(0,"cd-rbd-tabs"),S.Nb(1,"cd-grafana",0)),2&e&&(S.yb(1),S.pc("grafanaPath","rbd-overview?"))},directives:[Fo,Uo.a],styles:[""]}),e})();function Ks(e,t){1&e&&(S.Sb(0,"input",15),S.Yb(1,16),S.Rb())}function Js(e,t){if(1&e&&(S.Sb(0,"option",21),S.Oc(1),S.Rb()),2&e){const e=t.$implicit;S.pc("value",e),S.yb(1),S.Pc(e)}}function Xs(e,t){if(1&e&&(S.Sb(0,"select",17),S.Sb(1,"option",18),S.Wb(2,19),S.Rb(),S.Mc(3,Js,2,2,"option",20),S.Rb()),2&e){const e=S.ic();S.yb(3),S.pc("ngForOf",e.pools)}}let Hs=(()=>{class e{constructor(e,t,a,i,o,s,n){this.authStorageService=e,this.rbdService=t,this.activeModal=a,this.actionLabels=i,this.fb=o,this.poolService=s,this.taskWrapper=n,this.poolPermission=this.authStorageService.getPermissions().pool}createForm(){this.purgeForm=this.fb.group({poolName:""})}ngOnInit(){this.poolPermission.read&&this.poolService.list(["pool_name","application_metadata"]).then(e=>{this.pools=e.filter(e=>e.application_metadata.includes("rbd")).map(e=>e.pool_name)}),this.createForm()}purge(){const e=this.purgeForm.getValue("poolName")||"";this.taskWrapper.wrapTaskAroundCall({task:new F.a("rbd/trash/purge",{pool_name:e}),call:this.rbdService.purgeTrash(e)}).subscribe({error:()=>{this.purgeForm.setErrors({cdSubmitButton:!0})},complete:()=>{this.activeModal.close()}})}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(lt.a),S.Mb(_),S.Mb(r.a),S.Mb(l.b),S.Mb(wo.a),S.Mb(ui.a),S.Mb(z.a))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-rbd-trash-purge-modal"]],decls:18,vars:6,consts:function(){var e,t;return e="Purge Trash",t="To purge, select\xA0 " + "[\ufffd#9\ufffd|\ufffd#10\ufffd]" + "All" + "[\ufffd/#9\ufffd|\ufffd/#10\ufffd]" + "\xA0 or one pool and click\xA0 " + "[\ufffd#9\ufffd|\ufffd#10\ufffd]" + "Purge" + "[\ufffd/#9\ufffd|\ufffd/#10\ufffd]" + ".\xA0",[[3,"modalRef"],[1,"modal-title"],e,[1,"modal-content"],["name","purgeForm","novalidate","",1,"form",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],t=S.bc(t),[1,"form-group"],[1,"col-form-label","mx-auto"],"Pool:",["class","form-control","type","text","formControlName","poolName",4,"ngIf",6,"placeholder"],["id","poolName","name","poolName","class","form-control custom-select","formControlName","poolName",4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],["type","text","formControlName","poolName",1,"form-control",6,"placeholder"],["placeholder","Pool name..."],["id","poolName","name","poolName","formControlName","poolName",1,"form-control","custom-select"],["value",""],"All",[3,"value",4,"ngFor","ngForOf"],[3,"value"]]},template:function(e,t){1&e&&(S.Sb(0,"cd-modal",0),S.Qb(1,1),S.Wb(2,2),S.Pb(),S.Qb(3,3),S.Sb(4,"form",4,5),S.Sb(6,"div",6),S.Sb(7,"p"),S.cc(8,7),S.Nb(9,"kbd"),S.Nb(10,"kbd"),S.Zb(),S.Rb(),S.Sb(11,"div",8),S.Sb(12,"label",9),S.Wb(13,10),S.Rb(),S.Mc(14,Ks,2,0,"input",11),S.Mc(15,Xs,4,1,"select",12),S.Rb(),S.Rb(),S.Sb(16,"div",13),S.Sb(17,"cd-form-button-panel",14),S.gc("submitActionEvent",(function(){return t.purge()})),S.Rb(),S.Rb(),S.Rb(),S.Pb(),S.Rb()),2&e&&(S.pc("modalRef",t.activeModal),S.yb(4),S.pc("formGroup",t.purgeForm),S.yb(10),S.pc("ngIf",!t.poolPermission.read),S.yb(1),S.pc("ngIf",t.poolPermission.read),S.yb(2),S.pc("form",t.purgeForm)("submitText",t.actionLabels.PURGE))},directives:[E.a,o.C,o.r,o.k,C.a,D.a,i.r,x.a,O.a,o.d,A.a,o.q,o.i,o.z,o.u,o.B,i.q],styles:[""]}),e})();function Zs(e,t){1&e&&(S.Sb(0,"span",15),S.Wb(1,16),S.Rb())}let en=(()=>{class e{constructor(e,t,a,i,o){this.rbdService=e,this.activeModal=t,this.actionLabels=a,this.fb=i,this.taskWrapper=o}ngOnInit(){this.imageSpec=new R.a(this.poolName,this.namespace,this.imageName).toString(),this.restoreForm=this.fb.group({name:this.imageName})}restore(){const e=this.restoreForm.getValue("name"),t=new R.a(this.poolName,this.namespace,this.imageId);this.taskWrapper.wrapTaskAroundCall({task:new F.a("rbd/trash/restore",{image_id_spec:t.toString(),new_image_name:e}),call:this.rbdService.restoreTrash(t,e)}).subscribe({error:()=>{this.restoreForm.setErrors({cdSubmitButton:!0})},complete:()=>{this.activeModal.close()}})}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(_),S.Mb(r.a),S.Mb(l.b),S.Mb(wo.a),S.Mb(z.a))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-rbd-trash-restore-modal"]],decls:18,vars:7,consts:function(){var e,t;return e="Restore Image",t="To restore\xA0 " + "[\ufffd#9\ufffd|\ufffd#10\ufffd]" + "" + "\ufffd0\ufffd" + "@" + "\ufffd1\ufffd" + "" + "[\ufffd/#9\ufffd|\ufffd/#10\ufffd]" + ",\xA0 type the image's new name and click\xA0 " + "[\ufffd#9\ufffd|\ufffd#10\ufffd]" + "Restore" + "[\ufffd/#9\ufffd|\ufffd/#10\ufffd]" + ".",[[3,"modalRef"],[1,"modal-title"],e,[1,"modal-content"],["name","restoreForm","novalidate","",1,"form",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],t=S.bc(t),[1,"form-group"],["for","name",1,"col-form-label"],"New Name",["type","text","name","name","id","name","autocomplete","off","formControlName","name","autofocus","",1,"form-control"],["class","invalid-feedback",4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required."]},template:function(e,t){if(1&e&&(S.Sb(0,"cd-modal",0),S.Qb(1,1),S.Wb(2,2),S.Pb(),S.Qb(3,3),S.Sb(4,"form",4,5),S.Sb(6,"div",6),S.Sb(7,"p"),S.cc(8,7),S.Nb(9,"kbd"),S.Nb(10,"kbd"),S.Zb(),S.Rb(),S.Sb(11,"div",8),S.Sb(12,"label",9),S.Wb(13,10),S.Rb(),S.Nb(14,"input",11),S.Mc(15,Zs,2,0,"span",12),S.Rb(),S.Rb(),S.Sb(16,"div",13),S.Sb(17,"cd-form-button-panel",14),S.gc("submitActionEvent",(function(){return t.restore()})),S.Rb(),S.Rb(),S.Rb(),S.Pb(),S.Rb()),2&e){const e=S.Ac(5);S.pc("modalRef",t.activeModal),S.yb(4),S.pc("formGroup",t.restoreForm),S.yb(6),S.ac(t.imageSpec)(t.imageId),S.Xb(8),S.yb(5),S.pc("ngIf",t.restoreForm.showError("name",e,"required")),S.yb(2),S.pc("form",t.restoreForm)("submitText",t.actionLabels.RESTORE)}},directives:[E.a,o.C,o.r,o.k,C.a,D.a,O.a,o.d,A.a,o.q,o.i,ha.a,i.r,x.a],styles:[""]}),e})();const tn=["expiresTpl"],an=["deleteTpl"],on=function(e){return[e]};function sn(e,t){if(1&e){const e=S.Tb();S.Sb(0,"button",6),S.gc("click",(function(){return S.Dc(e),S.ic().purgeModal()})),S.Nb(1,"i",7),S.Qb(2),S.Wb(3,8),S.Pb(),S.Rb()}if(2&e){const e=S.ic();S.pc("disabled",e.disablePurgeBtn),S.yb(1),S.pc("ngClass",S.uc(2,on,e.icons.destroy))}}function nn(e,t){1&e&&(S.Qb(0),S.Wb(1,10),S.Pb())}function rn(e,t){1&e&&(S.Qb(0),S.Wb(1,11),S.Pb())}function cn(e,t){if(1&e&&(S.Mc(0,nn,2,0,"ng-container",9),S.Mc(1,rn,2,0,"ng-container",9),S.Oc(2),S.jc(3,"cdDate")),2&e){const e=t.row,a=t.value;S.pc("ngIf",e.cdIsExpired),S.yb(1),S.pc("ngIf",!e.cdIsExpired),S.yb(1),S.Qc(" ",S.kc(3,3,a),"\n")}}function ln(e,t){if(1&e&&(S.Sb(0,"p",13),S.Sb(1,"strong"),S.Qb(2),S.Wb(3,14),S.jc(4,"cdDate"),S.Pb(),S.Rb(),S.Rb()),2&e){const e=S.ic().expiresAt;S.yb(4),S.ac(S.kc(4,1,e)),S.Xb(3)}}function bn(e,t){1&e&&S.Mc(0,ln,5,3,"p",12),2&e&&S.pc("ngIf",!t.isExpired)}let dn=(()=>{class e{constructor(e,t,a,i,o,s,n){this.authStorageService=e,this.rbdService=t,this.modalService=a,this.cdDatePipe=i,this.taskListService=o,this.taskWrapper=s,this.actionLabels=n,this.icons=N.a,this.executingTasks=[],this.selection=new nt.a,this.tableStatus=new Pa.a,this.disablePurgeBtn=!0,this.permission=this.authStorageService.getPermissions().rbdImage,this.tableActions=[{permission:"update",icon:N.a.undo,click:()=>this.restoreModal(),name:this.actionLabels.RESTORE},{permission:"delete",icon:N.a.destroy,click:()=>this.deleteModal(),name:this.actionLabels.DELETE}]}ngOnInit(){this.columns=[{name:"ID",prop:"id",flexGrow:1,cellTransformation:st.a.executing},{name:"Name",prop:"name",flexGrow:1},{name:"Pool",prop:"pool_name",flexGrow:1},{name:"Namespace",prop:"namespace",flexGrow:1},{name:"Status",prop:"deferment_end_time",flexGrow:1,cellTemplate:this.expiresTpl},{name:"Deleted At",prop:"deletion_time",flexGrow:1,pipe:this.cdDatePipe}],this.taskListService.init(()=>this.rbdService.listTrash(),e=>this.prepareResponse(e),e=>this.images=e,()=>this.onFetchError(),e=>["rbd/trash/remove","rbd/trash/restore"].includes(e.name),(e,t)=>new R.a(e.pool_name,e.namespace,e.id).toString()===t.metadata.image_id_spec,void 0)}prepareResponse(e){let t=[];const a={};let i;if(e.forEach(e=>{m.a.isUndefined(a[e.status])&&(a[e.status]=[]),a[e.status].push(e.pool_name),t=t.concat(e.value),this.disablePurgeBtn=!t.length}),a[3]?i=3:a[1]?i=1:a[2]&&(i=2),i){const e=(a[i].length>1?"pools ":"pool ")+a[i].join();this.tableStatus=new Pa.a(i,e)}else this.tableStatus=new Pa.a;return t.forEach(e=>{e.cdIsExpired=Ro()().isAfter(e.deferment_end_time)}),t}onFetchError(){this.table.reset(),this.tableStatus=new Pa.a(So.a.ValueException)}updateSelection(e){this.selection=e}restoreModal(){const e={poolName:this.selection.first().pool_name,namespace:this.selection.first().namespace,imageName:this.selection.first().name,imageId:this.selection.first().id};this.modalRef=this.modalService.show(en,e)}deleteModal(){const e=this.selection.first().pool_name,t=this.selection.first().namespace,a=this.selection.first().id,i=this.selection.first().deferment_end_time,o=Ro()().isAfter(i),s=new R.a(e,t,a);this.modalRef=this.modalService.show(it.a,{itemDescription:"RBD",itemNames:[s],bodyTemplate:this.deleteTpl,bodyContext:{expiresAt:i,isExpired:o},submitActionObservable:()=>this.taskWrapper.wrapTaskAroundCall({task:new F.a("rbd/trash/remove",{image_id_spec:s.toString()}),call:this.rbdService.removeTrash(s,!0)})})}purgeModal(){this.modalService.show(Hs)}}return e.\u0275fac=function(t){return new(t||e)(S.Mb(lt.a),S.Mb(_),S.Mb(P.a),S.Mb(Co.a),S.Mb(bt.a),S.Mb(z.a),S.Mb(l.b))},e.\u0275cmp=S.Gb({type:e,selectors:[["cd-rbd-trash-list"]],viewQuery:function(e,t){var a;1&e&&(S.Jc(ot.a,!0),S.Jc(tn,!0),S.Jc(an,!0)),2&e&&(S.zc(a=S.hc())&&(t.table=a.first),S.zc(a=S.hc())&&(t.expiresTpl=a.first),S.zc(a=S.hc())&&(t.deleteTpl=a.first))},features:[S.xb([bt.a])],decls:9,vars:8,consts:function(){return[["columnMode","flex","identifier","id","forceIdentifier","true","selectionType","single",3,"data","columns","status","autoReload","fetchData","updateSelection"],[1,"table-actions","btn-toolbar"],[1,"btn-group",3,"permission","selection","tableActions"],["class","btn btn-light","type","button",3,"disabled","click",4,"ngIf"],["expiresTpl",""],["deleteTpl",""],["type","button",1,"btn","btn-light",3,"disabled","click"],["aria-hidden","true",3,"ngClass"],"Purge Trash",[4,"ngIf"],"Expired at","Protected until",["class","text-danger",4,"ngIf"],[1,"text-danger"],"This image is protected until " + "\ufffd0\ufffd" + "."]},template:function(e,t){1&e&&(S.Nb(0,"cd-rbd-tabs"),S.Sb(1,"cd-table",0),S.gc("fetchData",(function(){return t.taskListService.fetch()}))("updateSelection",(function(e){return t.updateSelection(e)})),S.Sb(2,"div",1),S.Nb(3,"cd-table-actions",2),S.Mc(4,sn,4,4,"button",3),S.Rb(),S.Rb(),S.Mc(5,cn,4,5,"ng-template",null,4,S.Nc),S.Mc(7,bn,1,1,"ng-template",null,5,S.Nc)),2&e&&(S.yb(1),S.pc("data",t.images)("columns",t.columns)("status",t.tableStatus)("autoReload",-1),S.yb(2),S.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions),S.yb(1),S.pc("ngIf",t.permission.delete))},directives:[Fo,ot.a,Mt.a,i.r,O.a,i.p],pipes:[Co.a],styles:[""]}),e})(),pn=(()=>{class e{}return e.\u0275mod=S.Kb({type:e}),e.\u0275inj=S.Jb({factory:function(t){return new(t||e)},imports:[[i.c,ra,o.m,o.x,r.t,r.y,r.F,c.a,d.a,s.i,n.c]]}),e})();const mn=[{path:"",redirectTo:"rbd",pathMatch:"full"},{path:"rbd",canActivate:[b.a],data:{breadcrumbs:"Images"},children:[{path:"",component:Os},{path:"namespaces",component:Us,data:{breadcrumbs:"Namespaces"}},{path:"trash",component:dn,data:{breadcrumbs:"Trash"}},{path:"performance",component:Ys,data:{breadcrumbs:"Overall Performance"}},{path:l.e.CREATE,component:ho,data:{breadcrumbs:l.a.CREATE}},{path:l.e.EDIT+"/:image_spec",component:ho,data:{breadcrumbs:l.a.EDIT}},{path:l.e.CLONE+"/:image_spec/:snap",component:ho,data:{breadcrumbs:l.a.CLONE}},{path:l.e.COPY+"/:image_spec",component:ho,data:{breadcrumbs:l.a.COPY}},{path:l.e.COPY+"/:image_spec/:snap",component:ho,data:{breadcrumbs:l.a.COPY}}]},{path:"mirroring",component:bi,canActivate:[b.a],data:{breadcrumbs:"Mirroring"}},{path:"iscsi",canActivate:[b.a],data:{breadcrumbs:"iSCSI"},children:[{path:"",redirectTo:"overview",pathMatch:"full"},{path:"overview",component:na,data:{breadcrumbs:"Overview"}},{path:"targets",data:{breadcrumbs:"Targets"},children:[{path:"",component:Lt},{path:l.e.CREATE,component:tt,data:{breadcrumbs:l.a.CREATE}},{path:l.e.EDIT+"/:target_iqn",component:tt,data:{breadcrumbs:l.a.EDIT}}]}]}];let un=(()=>{class e{}return e.\u0275mod=S.Kb({type:e}),e.\u0275inj=S.Jb({factory:function(t){return new(t||e)},imports:[[pn,s.i.forChild(mn)]]}),e})()},nQ07:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var i=a("LvDl"),o=a.n(i);class s{static updateChanged(e,t){let a=!1;return Object.keys(t).forEach(i=>{const s=t[i];o.a.isEqual(s,e[i])||(e[i]=s,a=!0)}),a}}},rFfW:function(e,t,a){"use strict";a.d(t,"a",(function(){return P}));var i=a("8Y7J"),o=a("s7LF"),s=a("LvDl"),n=a.n(s),r=a("jtHE"),c=a("oxzT"),l=a("QFaf"),b=a("PhyI"),d=a("aXbf"),p=a("o8EM"),m=a("NwgZ"),u=a("SVse"),f=a("ocLN"),h=a("p4Cf"),g=a("ANnk"),S=a("f69J");let v=(()=>{class e{constructor(e,t){this.control=e,this.formatter=t}setValue(e){const t=this.formatter.toMilliseconds(e);this.control.control.setValue(t+" ms")}ngOnInit(){this.setValue(this.control.value),this.ngDataReady&&this.ngDataReady.subscribe(()=>this.setValue(this.control.value))}onUpdate(e){this.setValue(e)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(o.p),i.Mb(d.a))},e.\u0275dir=i.Hb({type:e,selectors:[["","cdMilliseconds",""]],hostBindings:function(e,t){1&e&&i.gc("blur",(function(e){return t.onUpdate(e.target.value)}))},inputs:{ngDataReady:"ngDataReady"}}),e})();var y=a("IzCI");let R=(()=>{class e{constructor(e,t,a,o){this.elementRef=e,this.control=t,this.dimlessBinaryPerSecondPipe=a,this.formatter=o,this.ngModelChange=new i.o,this.el=this.elementRef.nativeElement}ngOnInit(){this.setValue(this.el.value),this.ngDataReady&&this.ngDataReady.subscribe(()=>this.setValue(this.el.value))}setValue(e){/^[\d.]+$/.test(e)&&(e+=this.defaultUnit||"m");const t=this.formatter.toBytes(e,0),a=this.round(t);this.el.value=this.dimlessBinaryPerSecondPipe.transform(a),null!==t?(this.ngModelChange.emit(this.el.value),this.control.control.setValue(this.el.value)):(this.ngModelChange.emit(null),this.control.control.setValue(null))}round(e){if(null!==e&&0!==e){if(!n.a.isUndefined(this.minBytes)&&e<this.minBytes)return this.minBytes;if(!n.a.isUndefined(this.maxBytes)&&e>this.maxBytes)return this.maxBytes;if(!n.a.isUndefined(this.roundPower)){const t=Math.round(Math.log(e)/Math.log(this.roundPower));return Math.pow(this.roundPower,t)}}return e}onBlur(e){this.setValue(e)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(o.p),i.Mb(y.a),i.Mb(d.a))},e.\u0275dir=i.Hb({type:e,selectors:[["","cdDimlessBinaryPerSecond",""]],hostBindings:function(e,t){1&e&&i.gc("blur",(function(e){return t.onBlur(e.target.value)}))},inputs:{ngDataReady:"ngDataReady",minBytes:"minBytes",maxBytes:"maxBytes",roundPower:"roundPower",defaultUnit:"defaultUnit"},outputs:{ngModelChange:"ngModelChange"}}),e})(),w=(()=>{class e{constructor(e,t){this.formatter=e,this.ngControl=t}setValue(e){const t=this.formatter.toIops(e);this.ngControl.control.setValue(t+" IOPS")}ngOnInit(){this.setValue(this.ngControl.value),this.ngDataReady&&this.ngDataReady.subscribe(()=>this.setValue(this.ngControl.value))}onUpdate(e){this.setValue(e)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(d.a),i.Mb(o.p))},e.\u0275dir=i.Hb({type:e,selectors:[["","cdIops",""]],hostBindings:function(e,t){1&e&&i.gc("blur",(function(e){return t.onUpdate(e.target.value)}))},inputs:{ngDataReady:"ngDataReady"}}),e})();function _(e,t){if(1&e&&(i.Qb(0),i.Nb(1,"input",19),i.Pb()),2&e){const e=i.ic().$implicit,t=i.ic(2);i.yb(1),i.pc("id",e.name)("name",e.name)("formControlName",e.name)("ngDataReady",t.ngDataReady)}}function k(e,t){if(1&e&&(i.Qb(0),i.Nb(1,"input",20),i.Pb()),2&e){const e=i.ic().$implicit,t=i.ic(2);i.yb(1),i.pc("id",e.name)("name",e.name)("formControlName",e.name)("ngDataReady",t.ngDataReady)}}function M(e,t){if(1&e&&(i.Qb(0),i.Nb(1,"input",21),i.Pb()),2&e){const e=i.ic().$implicit,t=i.ic(2);i.yb(1),i.pc("id",e.name)("name",e.name)("formControlName",e.name)("ngDataReady",t.ngDataReady)}}function N(e,t){1&e&&(i.Sb(0,"span",22),i.Wb(1,23),i.Rb())}const I=function(e){return{active:e}},$=function(e){return[e]};function T(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",10),i.Sb(1,"label",11),i.Oc(2),i.Sb(3,"cd-helper"),i.Oc(4),i.Rb(),i.Rb(),i.Sb(5,"div"),i.Sb(6,"div",12),i.Qb(7,13),i.Mc(8,_,2,4,"ng-container",14),i.Mc(9,k,2,4,"ng-container",14),i.Mc(10,M,2,4,"ng-container",14),i.Pb(),i.Sb(11,"span",15),i.Sb(12,"button",16),i.Yb(13,17),i.gc("click",(function(){i.Dc(e);const a=t.$implicit;return i.ic(2).reset(a.name)})),i.Nb(14,"i",7),i.Rb(),i.Rb(),i.Rb(),i.Mc(15,N,2,0,"span",18),i.Rb(),i.Rb()}if(2&e){const e=t.$implicit,a=i.ic().$implicit,o=i.ic(),s=i.Ac(1);i.yb(1),i.pc("for",e.name),i.yb(1),i.Pc(e.displayName),i.yb(2),i.Pc(e.description),i.yb(1),i.Bb("cd-col-form-input ",a.heading,""),i.yb(2),i.pc("ngSwitch",e.type),i.yb(1),i.pc("ngSwitchCase",o.configurationType.milliseconds),i.yb(1),i.pc("ngSwitchCase",o.configurationType.bps),i.yb(1),i.pc("ngSwitchCase",o.configurationType.iops),i.yb(2),i.pc("ngClass",i.uc(13,I,o.isDisabled(e.name))),i.yb(2),i.pc("ngClass",i.uc(15,$,o.icons.erase)),i.yb(1),i.pc("ngIf",o.form.showError("configuration."+e.name,s,"min"))}}function F(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",4),i.Sb(1,"h4",5),i.Sb(2,"span",6),i.gc("click",(function(){i.Dc(e);const a=t.$implicit;return i.ic().toggleSectionVisibility(a.class)})),i.Oc(3),i.Nb(4,"i",7),i.Rb(),i.Rb(),i.Sb(5,"div",8),i.Mc(6,T,16,17,"div",9),i.Rb(),i.Rb()}if(2&e){const e=t.$implicit,a=i.ic();i.yb(3),i.Qc(" ",e.heading," "),i.yb(1),i.pc("ngClass",a.sectionVisibility[e.class]?a.icons.minusCircle:a.icons.addCircle),i.yb(1),i.Ab(e.class),i.pc("hidden",!a.sectionVisibility[e.class]),i.yb(1),i.pc("ngForOf",e.options)}}let P=(()=>{class e{constructor(e,t){this.formatterService=e,this.rbdConfigurationService=t,this.initializeData=new r.a(1),this.changes=new i.o,this.icons=c.a,this.ngDataReady=new i.o,this.configurationType=b.b,this.sectionVisibility={}}ngOnInit(){const e=this.createConfigurationFormGroup();this.form.addControl("configuration",e),e.valueChanges.subscribe(()=>{this.changes.emit(this.getDirtyValues.bind(this))}),this.initializeData&&this.initializeData.subscribe(e=>{this.initialData=e.initialData;const t=e.sourceType;this.rbdConfigurationService.getWritableOptionFields().forEach(a=>{const i=e.initialData.filter(e=>e.name===a.name).pop();i&&i.source===t&&this.form.get("configuration."+a.name).setValue(i.value)}),this.ngDataReady.emit()}),this.rbdConfigurationService.getWritableSections().forEach(e=>this.sectionVisibility[e.class]=!1)}getDirtyValues(e=!1,t){if(e&&!t)throw new Error("ProgrammingError: If local values shall be included, a proper localFieldType argument has to be provided, too");const a={};return this.rbdConfigurationService.getWritableOptionFields().forEach(i=>{const o=this.form.get("configuration").get(i.name);this.initialData&&this.initialData[i.name]===o.value||(o.dirty||e&&o.source===t)&&(a[i.name]=null===o.value?o.value:i.type===b.b.bps?this.formatterService.toBytes(o.value):i.type===b.b.milliseconds?this.formatterService.toMilliseconds(o.value):i.type===b.b.iops?this.formatterService.toIops(o.value):o.value)}),a}createConfigurationFormGroup(){const e=new l.a({});return this.rbdConfigurationService.getWritableOptionFields().forEach(t=>{let a;if(t.type!==b.b.milliseconds&&t.type!==b.b.iops&&t.type!==b.b.bps)throw new Error(`Type ${t.type} is unknown, you may need to add it to RbdConfiguration class`);{let e=0;n.a.forEach(this.initialData,a=>{a.name===t.name&&(e=a.value)}),a=new o.h(e,o.A.min(0))}e.addControl(t.name,a)}),e}reset(e){const t=this.form.get("configuration").get(e);t.disabled?(t.setValue(t.previousValue||0),t.enable(),t.previousValue||t.markAsPristine()):(t.previousValue=t.value,t.setValue(null),t.markAsDirty(),t.disable())}isDisabled(e){return this.form.get("configuration").get(e).disabled}toggleSectionVisibility(e){this.sectionVisibility[e]=!this.sectionVisibility[e]}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(d.a),i.Mb(p.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-rbd-configuration-form"]],inputs:{form:"form",initializeData:"initializeData"},outputs:{changes:"changes"},decls:5,vars:2,consts:function(){return[[3,"formGroup"],["cfgFormGroup",""],"RBD Configuration",["class","col-12",4,"ngFor","ngForOf"],[1,"col-12"],[1,"cd-header"],[1,"collapsible",3,"click"],["aria-hidden","true",3,"ngClass"],[3,"hidden"],["class","form-group row",4,"ngFor","ngForOf"],[1,"form-group","row"],[1,"cd-col-form-label",3,"for"],[1,"input-group"],[3,"ngSwitch"],[4,"ngSwitchCase"],[1,"input-group-append"],["type","button","data-toggle","button",1,"btn","btn-light",3,"ngClass","click",6,"title"],["title","Remove the local configuration value. The parent configuration value will be inherited and used instead."],["class","invalid-feedback",4,"ngIf"],["type","text","cdMilliseconds","",1,"form-control",3,"id","name","formControlName","ngDataReady"],["type","text","defaultUnit","b","cdDimlessBinaryPerSecond","",1,"form-control",3,"id","name","formControlName","ngDataReady"],["type","text","cdIops","",1,"form-control",3,"id","name","formControlName","ngDataReady"],[1,"invalid-feedback"],"The minimum value is 0"]},template:function(e,t){1&e&&(i.Sb(0,"fieldset",0,1),i.Sb(2,"legend"),i.Wb(3,2),i.Rb(),i.Mc(4,F,7,7,"div",3),i.Rb()),2&e&&(i.pc("formGroup",t.form.get("configuration")),i.yb(4),i.pc("ngForOf",t.rbdConfigurationService.sections))},directives:[o.r,o.k,m.a,u.q,u.p,f.a,h.a,u.t,u.u,g.a,u.r,o.d,S.a,v,o.q,o.i,R,w],styles:[".collapsible[_ngcontent-%COMP%]{cursor:pointer;user-select:none}"]}),e})()}}]);
\ No newline at end of file
core-js
MIT
-Copyright (c) 2014-2020 Denis Pushkarev
+Copyright (c) 2014-2021 Denis Pushkarev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
--- /dev/null
+(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{"5azF":function(e,t,i){"use strict";i.r(t),i.d(t,"PoolModule",(function(){return ta})),i.d(t,"RoutedPoolModule",(function(){return aa}));var a=i("SVse"),o=i("s7LF"),s=i("iInd"),c=i("G0yt"),n=i("sne2"),l=i("PCNd"),r=i("k/xb"),b=i("kJI8"),d=i("LvDl"),u=i.n(d),f=i("jtHE"),p=i("WE5d"),h=i("st4c"),m=i("8Y7J"),g=i("IheW");let S=(()=>{class e{constructor(e){this.http=e,this.apiPath="api/erasure_code_profile",this.formTooltips={k:"Each object is split in data-chunks parts, each stored on a different OSD.",m:"Compute coding chunks for each object and store them on different OSDs.\n The number of coding chunks is also the number of OSDs that can be down without losing data.",plugins:{jerasure:{description:"The jerasure plugin is the most generic and flexible plugin,\n it is also the default for Ceph erasure coded pools.",technique:"The more flexible technique is reed_sol_van : it is enough to set k\n and m. The cauchy_good technique can be faster but you need to chose the packetsize\n carefully. All of reed_sol_r6_op, liberation, blaum_roth, liber8tion are RAID6 equivalents\n in the sense that they can only be configured with m=2.",packetSize:"The encoding will be done on packets of bytes size at a time.\n Choosing the right packet size is difficult.\n The jerasure documentation contains extensive information on this topic."},lrc:{description:"With the jerasure plugin, when an erasure coded object is stored on\n multiple OSDs, recovering from the loss of one OSD requires reading from all the others.\n For instance if jerasure is configured with k=8 and m=4, losing one OSD requires reading\n from the eleven others to repair.\n\n The lrc erasure code plugin creates local parity chunks to be able to recover using\n less OSDs. For instance if lrc is configured with k=8, m=4 and l=4, it will create\n an additional parity chunk for every four OSDs. When a single OSD is lost, it can be\n recovered with only four OSDs instead of eleven.",l:"Group the coding and data chunks into sets of size locality. For instance,\n for k=4 and m=2, when locality=3 two groups of three are created. Each set can\n be recovered without reading chunks from another set.",crushLocality:"The type of the crush bucket in which each set of chunks defined\n by l will be stored. For instance, if it is set to rack, each group of l chunks will be\n placed in a different rack. It is used to create a CRUSH rule step such as step choose\n rack. If it is not set, no such grouping is done."},isa:{description:"The isa plugin encapsulates the ISA library. It only runs on Intel processors.",technique:"The ISA plugin comes in two Reed Solomon forms.\n If reed_sol_van is set, it is Vandermonde, if cauchy is set, it is Cauchy."},shec:{description:"The shec plugin encapsulates the multiple SHEC library.\n It allows ceph to recover data more efficiently than Reed Solomon codes.",c:"The number of parity chunks each of which includes each data chunk in its\n calculation range. The number is used as a durability estimator. For instance, if c=2,\n 2 OSDs can be down without losing data."},clay:{description:"CLAY (short for coupled-layer) codes are erasure codes designed to\n bring about significant savings in terms of network bandwidth and disk IO when a failed\n node/OSD/rack is being repaired.",d:"Number of OSDs requested to send data during recovery of a single chunk.\n d needs to be chosen such that k+1 <= d <= k+m-1. The larger the d, the better\n the savings.",scalar_mds:"scalar_mds specifies the plugin that is used as a building block\n in the layered construction. It can be one of jerasure, isa, shec.",technique:"technique specifies the technique that will be picked\n within the 'scalar_mds' plugin specified. Supported techniques\n are 'reed_sol_van', 'reed_sol_r6_op', 'cauchy_orig',\n 'cauchy_good', 'liber8tion' for jerasure, 'reed_sol_van',\n 'cauchy' for isa and 'single', 'multiple' for shec."}},crushRoot:"The name of the crush bucket used for the first step of the CRUSH rule.\n For instance step take default.",crushFailureDomain:"Ensure that no two chunks are in a bucket with the same failure\n domain. For instance, if the failure domain is host no two chunks will be stored on the same\n host. It is used to create a CRUSH rule step such as step chooseleaf host.",crushDeviceClass:"Restrict placement to devices of a specific class\n (e.g., ssd or hdd), using the crush device class names in the CRUSH map.",directory:"Set the directory name from which the erasure code plugin is loaded."}}list(){return this.http.get(this.apiPath)}create(e){return this.http.post(this.apiPath,e,{observe:"response"})}delete(e){return this.http.delete(`${this.apiPath}/${e}`,{observe:"response"})}getInfo(){return this.http.get(`ui-${this.apiPath}/info`)}}return e.\u0275fac=function(t){return new(t||e)(m.dc(g.b))},e.\u0275prov=m.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var R=i("Ekvf");class v{constructor(){this.nodes=[],this.idTree={},this.allDevices=[],this.buckets=[],this.failureDomains={},this.failureDomainKeys=[],this.devices=[],this.deviceCount=0}static searchFailureDomains(e,t){return this.getFailureDomains(this.search(e,t))}static search(e,t){const[i,a]=t.split("~"),o=e.find(e=>["name","id","type"].some(t=>e[t]===i));return o?(e=this.getSubNodes(o,this.createIdTreeFromNodes(e)),a&&(e=this.filterNodesByDeviceType(e,a)),e):[]}static createIdTreeFromNodes(e){const t={};return e.forEach(e=>{t[e.id]=e}),t}static getSubNodes(e,t){let i=[e];return e.children?(e.children.forEach(e=>{i=i.concat(this.getSubNodes(t[e],t))}),i):i}static filterNodesByDeviceType(e,t){let i,a=e.filter(e=>e.device_class&&e.device_class!==t).map(e=>e.id),o=a;do{i=!1,e=e.filter(e=>!a.includes(e.id));const t=[];e.forEach(e=>{e.children&&e.children.every(e=>a.includes(e))&&(t.push(e.id),i=!0)}),i&&(a=t,o=o.concat(t))}while(i);return(e=u.a.cloneDeep(e)).map(e=>e.children?(e.children=e.children.filter(e=>!o.includes(e)),e):e)}static getFailureDomains(e){const t={};return e.forEach(e=>{const i=e.type;t[i]||(t[i]=[]),t[i].push(e)}),t}initCrushNodeSelection(e,t,i,a){this.nodes=e,this.idTree=v.createIdTreeFromNodes(e),e.forEach(e=>{this.idTree[e.id]=e}),this.buckets=u.a.sortBy(e.filter(e=>e.children),"name"),this.controls={root:t,failure:i,device:a},this.preSelectRoot(),this.controls.root.valueChanges.subscribe(()=>this.onRootChange()),this.controls.failure.valueChanges.subscribe(()=>this.onFailureDomainChange()),this.controls.device.valueChanges.subscribe(()=>this.onDeviceChange())}preSelectRoot(){const e=this.nodes.find(e=>"root"===e.type);this.silentSet(this.controls.root,e),this.onRootChange()}silentSet(e,t){e.setValue(t,{emitEvent:!1})}onRootChange(){const e=v.getSubNodes(this.controls.root.value,this.idTree),t=v.getFailureDomains(e);Object.keys(t).forEach(e=>{t[e].length<=1&&delete t[e]}),this.failureDomains=t,this.failureDomainKeys=Object.keys(t).sort(),this.updateFailureDomain()}updateFailureDomain(){let e=this.getIncludedCustomValue(this.controls.failure,Object.keys(this.failureDomains));""===e&&(e=this.setMostCommonDomain(this.controls.failure)),this.updateDevices(e)}getIncludedCustomValue(e,t){return e.dirty&&t.includes(e.value)?e.value:""}setMostCommonDomain(e){let t={n:0,type:""};return Object.keys(this.failureDomains).forEach(e=>{const i=this.failureDomains[e].length;t.n<i&&(t={n:i,type:e})}),this.silentSet(e,t.type),t.type}onFailureDomainChange(){this.updateDevices()}updateDevices(e=this.controls.failure.value){const t=u.a.flatten(this.failureDomains[e].map(e=>v.getSubNodes(e,this.idTree)));this.allDevices=t.filter(e=>e.device_class).map(e=>e.device_class),this.devices=u.a.uniq(this.allDevices).sort();const i=1===this.devices.length?this.devices[0]:this.getIncludedCustomValue(this.controls.device,this.devices);this.silentSet(this.controls.device,i),this.onDeviceChange(i)}onDeviceChange(e=this.controls.device.value){this.deviceCount=""===e?this.allDevices.length:this.allDevices.filter(t=>t===e).length}}var y=i("0+/T"),z=i("a96k"),C=i("oxzT"),I=i("spCT"),N=i("QFaf"),_=i("1Ni5"),M=i("PhyI"),T=i("kvvV"),w=i("Fgil"),$=i("aexS"),D=i("aXbf"),E=i("JK/P"),k=i("kn/O"),P=i("2EZI"),x=i("ajRT"),A=i("NwgZ"),O=i("ocLN"),V=i("ANnk"),W=i("f69J"),F=i("IZUe"),L=i("p4Cf"),q=i("6+kj"),B=i("8xTl");function U(e,t){1&e&&(m.Sb(0,"span",30),m.Wb(1,31),m.Rb())}function G(e,t){1&e&&(m.Sb(0,"span",30),m.Wb(1,32),m.Rb())}function j(e,t){1&e&&(m.Sb(0,"span",30),m.Wb(1,33),m.Rb())}function Q(e,t){1&e&&(m.Sb(0,"option",26),m.Wb(1,34),m.Rb())}function J(e,t){if(1&e&&(m.Sb(0,"option",35),m.Oc(1),m.Rb()),2&e){const e=t.$implicit;m.pc("ngValue",e),m.yb(1),m.Qc(" ",e.name," ")}}function K(e,t){1&e&&(m.Sb(0,"span",30),m.Wb(1,36),m.Rb())}function Y(e,t){1&e&&(m.Sb(0,"option",26),m.Wb(1,37),m.Rb())}function X(e,t){if(1&e&&(m.Sb(0,"option",35),m.Oc(1),m.Rb()),2&e){const e=t.$implicit,i=m.ic();m.pc("ngValue",e),m.yb(1),m.Rc(" ",e," ( ",i.failureDomains[e].length," ) ")}}function H(e,t){1&e&&(m.Sb(0,"span",30),m.Wb(1,38),m.Rb())}function Z(e,t){if(1&e&&(m.Sb(0,"option",35),m.Oc(1),m.Rb()),2&e){const e=t.$implicit;m.pc("ngValue",e),m.yb(1),m.Qc(" ",e," ")}}let ee=(()=>{class e extends v{constructor(e,t,i,a,o){super(),this.formBuilder=e,this.activeModal=t,this.taskWrapper=i,this.crushRuleService=a,this.actionLabels=o,this.submitAction=new m.o,this.tooltips=this.crushRuleService.formTooltips,this.action=this.actionLabels.CREATE,this.resource="Crush Rule",this.createForm()}createForm(){this.form=this.formBuilder.group({name:["",[o.A.required,o.A.pattern("[A-Za-z0-9_-]+"),_.a.custom("uniqueName",e=>this.names&&-1!==this.names.indexOf(e))]],root:null,failure_domain:"",device_class:""})}ngOnInit(){this.crushRuleService.getInfo().subscribe(({names:e,nodes:t})=>{this.initCrushNodeSelection(t,this.form.get("root"),this.form.get("failure_domain"),this.form.get("device_class")),this.names=e})}onSubmit(){if(this.form.invalid)return void this.form.setErrors({cdSubmitButton:!0});const e=u.a.cloneDeep(this.form.value);e.root=e.root.name,""===e.device_class&&delete e.device_class,this.taskWrapper.wrapTaskAroundCall({task:new T.a("crushRule/create",e),call:this.crushRuleService.create(e)}).subscribe({error:()=>{this.form.setErrors({cdSubmitButton:!0})},complete:()=>{this.activeModal.close(),this.submitAction.emit(e)}})}}return e.\u0275fac=function(t){return new(t||e)(m.Mb(P.a),m.Mb(c.a),m.Mb(k.a),m.Mb(h.a),m.Mb(n.b))},e.\u0275cmp=m.Gb({type:e,selectors:[["cd-crush-rule-form-modal"]],outputs:{submitAction:"submitAction"},features:[m.vb],decls:55,vars:27,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"modal-content"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","name",1,"cd-col-form-label"],"Name",[1,"required"],[1,"cd-col-form-input"],["type","text","id","name","name","name","placeholder","Name...","formControlName","name","autofocus","",1,"form-control"],["class","invalid-feedback",4,"ngIf"],["for","root",1,"cd-col-form-label"],"Root",[3,"html"],["id","root","name","root","formControlName","root",1,"form-control","custom-select"],["ngValue","",4,"ngIf"],[3,"ngValue",4,"ngFor","ngForOf"],["for","failure_domain",1,"cd-col-form-label"],"Failure domain type",["id","failure_domain","name","failure_domain","formControlName","failure_domain",1,"form-control","custom-select"],["for","device_class",1,"cd-col-form-label"],"Device class",["id","device_class","name","device_class","formControlName","device_class",1,"form-control","custom-select"],["ngValue",""],"Let Ceph decide",[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required!","The name can only consist of alphanumeric characters, dashes and underscores.","The chosen erasure code profile name is already in use.","Loading...",[3,"ngValue"],"This field is required!","Loading...","This field is required!"]},template:function(e,t){if(1&e&&(m.Sb(0,"cd-modal",0),m.Qb(1,1),m.Wb(2,2),m.jc(3,"titlecase"),m.jc(4,"upperFirst"),m.Pb(),m.Qb(5,3),m.Sb(6,"form",4,5),m.Sb(8,"div",6),m.Sb(9,"div",7),m.Sb(10,"label",8),m.Qb(11),m.Wb(12,9),m.Pb(),m.Nb(13,"span",10),m.Rb(),m.Sb(14,"div",11),m.Nb(15,"input",12),m.Mc(16,U,2,0,"span",13),m.Mc(17,G,2,0,"span",13),m.Mc(18,j,2,0,"span",13),m.Rb(),m.Rb(),m.Sb(19,"div",7),m.Sb(20,"label",14),m.Qb(21),m.Wb(22,15),m.Pb(),m.Nb(23,"cd-helper",16),m.Nb(24,"span",10),m.Rb(),m.Sb(25,"div",11),m.Sb(26,"select",17),m.Mc(27,Q,2,0,"option",18),m.Mc(28,J,2,2,"option",19),m.Rb(),m.Mc(29,K,2,0,"span",13),m.Rb(),m.Rb(),m.Sb(30,"div",7),m.Sb(31,"label",20),m.Qb(32),m.Wb(33,21),m.Pb(),m.Nb(34,"cd-helper",16),m.Nb(35,"span",10),m.Rb(),m.Sb(36,"div",11),m.Sb(37,"select",22),m.Mc(38,Y,2,0,"option",18),m.Mc(39,X,2,3,"option",19),m.Rb(),m.Mc(40,H,2,0,"span",13),m.Rb(),m.Rb(),m.Sb(41,"div",7),m.Sb(42,"label",23),m.Qb(43),m.Wb(44,24),m.Pb(),m.Nb(45,"cd-helper",16),m.Rb(),m.Sb(46,"div",11),m.Sb(47,"select",25),m.Sb(48,"option",26),m.Wb(49,27),m.Rb(),m.Mc(50,Z,2,2,"option",19),m.Rb(),m.Rb(),m.Rb(),m.Rb(),m.Sb(51,"div",28),m.Sb(52,"cd-form-button-panel",29),m.gc("submitActionEvent",(function(){return t.onSubmit()})),m.jc(53,"titlecase"),m.jc(54,"upperFirst"),m.Rb(),m.Rb(),m.Rb(),m.Pb(),m.Rb()),2&e){const e=m.Ac(7);m.pc("modalRef",t.activeModal),m.yb(4),m.ac(m.kc(3,19,t.action))(m.kc(4,21,t.resource)),m.Xb(2),m.yb(2),m.pc("formGroup",t.form),m.yb(10),m.pc("ngIf",t.form.showError("name",e,"required")),m.yb(1),m.pc("ngIf",t.form.showError("name",e,"pattern")),m.yb(1),m.pc("ngIf",t.form.showError("name",e,"uniqueName")),m.yb(5),m.pc("html",t.tooltips.root),m.yb(4),m.pc("ngIf",!t.buckets),m.yb(1),m.pc("ngForOf",t.buckets),m.yb(1),m.pc("ngIf",t.form.showError("root",e,"required")),m.yb(5),m.pc("html",t.tooltips.failure_domain),m.yb(4),m.pc("ngIf",!t.failureDomains),m.yb(1),m.pc("ngForOf",t.failureDomainKeys),m.yb(1),m.pc("ngIf",t.form.showError("failure_domain",e,"required")),m.yb(5),m.pc("html",t.tooltips.device_class),m.yb(5),m.pc("ngForOf",t.devices),m.yb(2),m.pc("form",t.form)("submitText",m.kc(53,23,t.action)+" "+m.kc(54,25,t.resource))}},directives:[x.a,o.C,o.r,A.a,o.k,O.a,V.a,o.d,W.a,o.q,o.i,F.a,a.r,L.a,o.z,a.q,o.u,o.B,q.a],pipes:[a.A,B.a],styles:[""]}),e})();class te{}function ie(e,t){1&e&&(m.Sb(0,"span",46),m.Wb(1,47),m.Rb())}function ae(e,t){1&e&&(m.Sb(0,"span",46),m.Wb(1,48),m.Rb())}function oe(e,t){1&e&&(m.Sb(0,"span",46),m.Wb(1,49),m.Rb())}function se(e,t){1&e&&(m.Sb(0,"option",37),m.Wb(1,50),m.Rb())}function ce(e,t){if(1&e&&(m.Sb(0,"option",51),m.Oc(1),m.Rb()),2&e){const e=t.$implicit;m.pc("ngValue",e),m.yb(1),m.Qc(" ",e," ")}}function ne(e,t){1&e&&(m.Sb(0,"span",46),m.Wb(1,52),m.Rb())}function le(e,t){1&e&&(m.Sb(0,"span",46),m.Wb(1,53),m.Rb())}function re(e,t){1&e&&(m.Sb(0,"span",46),m.Wb(1,54),m.Rb())}function be(e,t){if(1&e&&(m.Sb(0,"span",46),m.Wb(1,55),m.Rb()),2&e){const e=m.ic();m.yb(1),m.ac(e.deviceCount),m.Xb(1)}}function de(e,t){1&e&&(m.Sb(0,"span",46),m.Wb(1,56),m.Rb())}function ue(e,t){1&e&&(m.Sb(0,"span",46),m.Wb(1,57),m.Rb())}function fe(e,t){if(1&e&&(m.Sb(0,"span",39),m.Wb(1,58),m.Rb()),2&e){const e=m.ic();m.yb(1),m.ac(e.lrcMultiK),m.Xb(1)}}function pe(e,t){1&e&&(m.Sb(0,"span",46),m.Wb(1,59),m.Rb())}function he(e,t){1&e&&(m.Sb(0,"span",46),m.Wb(1,60),m.Rb())}function me(e,t){if(1&e&&(m.Sb(0,"span",46),m.Wb(1,61),m.Rb()),2&e){const e=m.ic();m.yb(1),m.ac(e.deviceCount),m.Xb(1)}}function ge(e,t){1&e&&(m.Sb(0,"span",46),m.Wb(1,65),m.Rb())}function Se(e,t){1&e&&(m.Sb(0,"span",46),m.Wb(1,66),m.Rb())}function Re(e,t){if(1&e&&(m.Sb(0,"div",7),m.Sb(1,"label",62),m.Sb(2,"span",14),m.Wb(3,63),m.Rb(),m.Nb(4,"cd-helper",16),m.Rb(),m.Sb(5,"div",10),m.Nb(6,"input",64),m.Mc(7,ge,2,0,"span",12),m.Mc(8,Se,2,0,"span",12),m.Rb(),m.Rb()),2&e){const e=m.ic(),t=m.Ac(7);m.yb(4),m.pc("html",e.tooltips.plugins.shec.c),m.yb(3),m.pc("ngIf",e.form.showError("c",t,"min")),m.yb(1),m.pc("ngIf",e.form.showError("c",t,"cGreaterM"))}}function ve(e,t){1&e&&(m.Sb(0,"span",39),m.Wb(1,76),m.Rb())}function ye(e,t){if(1&e&&(m.Sb(0,"span",39),m.Wb(1,77),m.Rb()),2&e){const e=m.ic(3);m.yb(1),m.ac(e.getDMin())(e.getDMax()),m.Xb(1)}}function ze(e,t){if(1&e&&(m.Sb(0,"span",39),m.Wb(1,78),m.Rb()),2&e){const e=m.ic(3);m.yb(1),m.ac(e.getDMax()),m.Xb(1)}}function Ce(e,t){if(1&e&&(m.Qb(0),m.Mc(1,ye,2,2,"span",23),m.Mc(2,ze,2,1,"span",23),m.Pb()),2&e){const e=m.ic(2);m.yb(1),m.pc("ngIf",e.getDMin()<e.getDMax()),m.yb(1),m.pc("ngIf",e.getDMin()===e.getDMax())}}function Ie(e,t){if(1&e&&(m.Sb(0,"span",46),m.Wb(1,79),m.Rb()),2&e){const e=m.ic(2);m.yb(1),m.ac(e.getDMin()),m.Xb(1)}}function Ne(e,t){if(1&e&&(m.Sb(0,"span",46),m.Wb(1,80),m.Rb()),2&e){const e=m.ic(2);m.yb(1),m.ac(e.getDMax()),m.Xb(1)}}function _e(e,t){if(1&e){const e=m.Tb();m.Sb(0,"div",7),m.Sb(1,"label",67),m.Sb(2,"span",14),m.Wb(3,68),m.Rb(),m.Nb(4,"cd-helper",16),m.Rb(),m.Sb(5,"div",10),m.Sb(6,"div",69),m.Nb(7,"input",70),m.Sb(8,"span",71),m.Sb(9,"button",72),m.Yb(10,73),m.gc("click",(function(){return m.Dc(e),m.ic().toggleDCalc()})),m.Nb(11,"i",74),m.Rb(),m.Rb(),m.Rb(),m.Mc(12,ve,2,0,"span",23),m.Mc(13,Ce,3,2,"ng-container",75),m.Mc(14,Ie,2,1,"span",12),m.Mc(15,Ne,2,1,"span",12),m.Rb(),m.Rb()}if(2&e){const e=m.ic(),t=m.Ac(7);m.yb(4),m.pc("html",e.tooltips.plugins.clay.d),m.yb(7),m.pc("ngClass",e.dCalc?e.icons.unlock:e.icons.lock),m.yb(1),m.pc("ngIf",e.dCalc),m.yb(1),m.pc("ngIf",!e.dCalc),m.yb(1),m.pc("ngIf",e.form.showError("d",t,"dMin")),m.yb(1),m.pc("ngIf",e.form.showError("d",t,"dMax"))}}function Me(e,t){1&e&&(m.Sb(0,"span",46),m.Wb(1,85),m.Rb())}function Te(e,t){1&e&&(m.Sb(0,"span",46),m.Wb(1,86),m.Rb())}function we(e,t){1&e&&(m.Sb(0,"span",46),m.Wb(1,87),m.Rb())}function $e(e,t){if(1&e&&(m.Sb(0,"div",7),m.Sb(1,"label",81),m.Sb(2,"span",14),m.Wb(3,82),m.Rb(),m.Nb(4,"cd-helper",16),m.Rb(),m.Sb(5,"div",10),m.Nb(6,"input",83),m.Mc(7,Me,2,0,"span",12),m.Mc(8,Te,2,0,"span",12),m.Mc(9,we,2,0,"span",12),m.Sb(10,"span",39),m.Wb(11,84),m.Rb(),m.Rb(),m.Rb()),2&e){const e=m.ic(),t=m.Ac(7);m.yb(4),m.pc("html",e.tooltips.plugins.lrc.l),m.yb(3),m.pc("ngIf",e.form.showError("l",t,"required")),m.yb(1),m.pc("ngIf",e.form.showError("l",t,"min")),m.yb(1),m.pc("ngIf",e.form.showError("l",t,"unequal")),m.yb(2),m.ac(e.lrcGroups),m.Xb(11)}}function De(e,t){1&e&&(m.Sb(0,"option",37),m.Wb(1,88),m.Rb())}function Ee(e,t){if(1&e&&(m.Sb(0,"option",51),m.Oc(1),m.Rb()),2&e){const e=t.$implicit,i=m.ic();m.pc("ngValue",e),m.yb(1),m.Rc(" ",e," ( ",i.failureDomains[e].length," ) ")}}function ke(e,t){1&e&&(m.Sb(0,"option",37),m.Wb(1,92),m.Rb())}function Pe(e,t){1&e&&(m.Sb(0,"option",37),m.Wb(1,93),m.Rb())}function xe(e,t){if(1&e&&(m.Sb(0,"option",51),m.Oc(1),m.Rb()),2&e){const e=t.$implicit,i=m.ic(2);m.pc("ngValue",e),m.yb(1),m.Rc(" ",e," ( ",i.failureDomains[e].length," ) ")}}function Ae(e,t){if(1&e&&(m.Sb(0,"div",7),m.Sb(1,"label",89),m.Qb(2),m.Wb(3,90),m.Pb(),m.Nb(4,"cd-helper",16),m.Rb(),m.Sb(5,"div",10),m.Sb(6,"select",91),m.Mc(7,ke,2,0,"option",18),m.Mc(8,Pe,2,0,"option",18),m.Mc(9,xe,2,3,"option",19),m.Rb(),m.Rb(),m.Rb()),2&e){const e=m.ic();m.yb(4),m.pc("html",e.tooltips.plugins.lrc.crushLocality),m.yb(3),m.pc("ngIf",!e.failureDomains),m.yb(1),m.pc("ngIf",e.failureDomainKeys.length>0),m.yb(1),m.pc("ngForOf",e.failureDomainKeys)}}function Oe(e,t){if(1&e&&(m.Sb(0,"option",51),m.Oc(1),m.Rb()),2&e){const e=t.$implicit;m.pc("ngValue",e),m.yb(1),m.Qc(" ",e," ")}}const Ve=function(e,t,i){return[e,t,i]};function We(e,t){if(1&e&&(m.Sb(0,"div",7),m.Sb(1,"label",94),m.Qb(2),m.Wb(3,95),m.Pb(),m.Nb(4,"cd-helper",16),m.Rb(),m.Sb(5,"div",10),m.Sb(6,"select",96),m.Mc(7,Oe,2,2,"option",19),m.Rb(),m.Rb(),m.Rb()),2&e){const e=m.ic();m.yb(4),m.pc("html",e.tooltips.plugins.clay.scalar_mds),m.yb(3),m.pc("ngForOf",m.wc(2,Ve,e.PLUGIN.JERASURE,e.PLUGIN.ISA,e.PLUGIN.SHEC))}}function Fe(e,t){if(1&e&&(m.Sb(0,"option",51),m.Oc(1),m.Rb()),2&e){const e=t.$implicit;m.pc("ngValue",e),m.yb(1),m.Qc(" ",e," ")}}function Le(e,t){if(1&e&&(m.Sb(0,"div",7),m.Sb(1,"label",97),m.Qb(2),m.Wb(3,98),m.Pb(),m.Nb(4,"cd-helper",16),m.Rb(),m.Sb(5,"div",10),m.Sb(6,"select",99),m.Mc(7,Fe,2,2,"option",19),m.Rb(),m.Rb(),m.Rb()),2&e){const e=m.ic();m.yb(4),m.pc("html",e.tooltips.plugins[e.plugin].technique),m.yb(3),m.pc("ngForOf",e.techniques)}}function qe(e,t){1&e&&(m.Sb(0,"span",46),m.Wb(1,103),m.Rb())}function Be(e,t){if(1&e&&(m.Sb(0,"div",7),m.Sb(1,"label",100),m.Qb(2),m.Wb(3,101),m.Pb(),m.Nb(4,"cd-helper",16),m.Rb(),m.Sb(5,"div",10),m.Nb(6,"input",102),m.Mc(7,qe,2,0,"span",12),m.Rb(),m.Rb()),2&e){const e=m.ic(),t=m.Ac(7);m.yb(4),m.pc("html",e.tooltips.plugins.jerasure.packetSize),m.yb(3),m.pc("ngIf",e.form.showError("packetSize",t,"min"))}}function Ue(e,t){1&e&&(m.Sb(0,"option",37),m.Wb(1,104),m.Rb())}function Ge(e,t){if(1&e&&(m.Sb(0,"option",51),m.Oc(1),m.Rb()),2&e){const e=t.$implicit;m.pc("ngValue",e),m.yb(1),m.Qc(" ",e.name," ")}}function je(e,t){if(1&e&&(m.Sb(0,"option",51),m.Oc(1),m.Rb()),2&e){const e=t.$implicit;m.pc("ngValue",e),m.yb(1),m.Qc(" ",e," ")}}let Qe=(()=>{class e extends v{constructor(e,t,i,a,o){super(),this.formBuilder=e,this.activeModal=t,this.taskWrapper=i,this.ecpService=a,this.actionLabels=o,this.submitAction=new m.o,this.tooltips=this.ecpService.formTooltips,this.PLUGIN={LRC:"lrc",SHEC:"shec",CLAY:"clay",JERASURE:"jerasure",ISA:"isa"},this.plugin=this.PLUGIN.JERASURE,this.icons=C.a,this.action=this.actionLabels.CREATE,this.resource="EC Profile",this.createForm(),this.setJerasureDefaults()}createForm(){this.form=this.formBuilder.group({name:[null,[o.A.required,o.A.pattern("[A-Za-z0-9_-]+"),_.a.custom("uniqueName",e=>this.names&&-1!==this.names.indexOf(e))]],plugin:[this.PLUGIN.JERASURE,[o.A.required]],k:[4,[o.A.required,o.A.min(2),_.a.custom("max",()=>this.baseValueValidation(!0)),_.a.custom("unequal",e=>this.lrcDataValidation(e)),_.a.custom("kLowerM",e=>this.shecDataValidation(e))]],m:[2,[o.A.required,o.A.min(1),_.a.custom("max",()=>this.baseValueValidation())]],crushFailureDomain:"",crushRoot:null,crushDeviceClass:"",directory:"",technique:"reed_sol_van",packetSize:[2048,[o.A.min(1)]],l:[3,[o.A.required,o.A.min(1),_.a.custom("unequal",e=>this.lrcLocalityValidation(e))]],crushLocality:"",c:[2,[o.A.required,o.A.min(1),_.a.custom("cGreaterM",e=>this.shecDurabilityValidation(e))]],d:[5,[o.A.required,_.a.custom("dMin",e=>this.dMinValidation(e)),_.a.custom("dMax",e=>this.dMaxValidation(e))]],scalar_mds:[this.PLUGIN.JERASURE,[o.A.required]]}),this.toggleDCalc(),this.form.get("k").valueChanges.subscribe(()=>this.updateValidityOnChange(["m","l","d"])),this.form.get("m").valueChanges.subscribe(()=>this.updateValidityOnChange(["k","l","c","d"])),this.form.get("l").valueChanges.subscribe(()=>this.updateValidityOnChange(["k","m"])),this.form.get("plugin").valueChanges.subscribe(e=>this.onPluginChange(e)),this.form.get("scalar_mds").valueChanges.subscribe(()=>this.setClayDefaultsForScalar())}baseValueValidation(e=!1){return this.validValidation(()=>this.getKMSum()>this.deviceCount&&this.form.getValue("k")>this.form.getValue("m")===e)}validValidation(e,t){return!((!this.form||t)&&this.plugin!==t)&&e()}getKMSum(){return this.form.getValue("k")+this.form.getValue("m")}lrcDataValidation(e){return this.validValidation(()=>{const t=this.form.getValue("m"),i=this.form.getValue("l"),a=e+t;return this.lrcMultiK=e/(a/i),e%(a/i)!=0},"lrc")}shecDataValidation(e){return this.validValidation(()=>this.form.getValue("m")>e,"shec")}lrcLocalityValidation(e){return this.validValidation(()=>{const t=this.getKMSum();return this.lrcGroups=e>0?t/e:0,e>0&&t%e!=0},"lrc")}shecDurabilityValidation(e){return this.validValidation(()=>{const t=this.form.getValue("m");return e>t},"shec")}dMinValidation(e){return this.validValidation(()=>this.getDMin()>e,"clay")}getDMin(){return this.form.getValue("k")+1}dMaxValidation(e){return this.validValidation(()=>e>this.getDMax(),"clay")}getDMax(){const e=this.form.getValue("m");return this.form.getValue("k")+e-1}toggleDCalc(){this.dCalc=!this.dCalc,this.form.get("d")[this.dCalc?"disable":"enable"](),this.calculateD()}calculateD(){this.plugin===this.PLUGIN.CLAY&&this.dCalc&&this.form.silentSet("d",this.getDMax())}updateValidityOnChange(e){e.forEach(e=>{"d"===e&&this.calculateD(),this.form.get(e).updateValueAndValidity({emitEvent:!1})})}onPluginChange(e){this.plugin=e,e===this.PLUGIN.JERASURE?this.setJerasureDefaults():e===this.PLUGIN.LRC?this.setLrcDefaults():e===this.PLUGIN.ISA?this.setIsaDefaults():e===this.PLUGIN.SHEC?this.setShecDefaults():e===this.PLUGIN.CLAY&&this.setClayDefaults(),this.updateValidityOnChange(["m"])}setJerasureDefaults(){this.techniques=["reed_sol_van","reed_sol_r6_op","cauchy_orig","cauchy_good","liberation","blaum_roth","liber8tion"],this.setDefaults({k:4,m:2,technique:"reed_sol_van"})}setLrcDefaults(){this.setDefaults({k:4,m:2,l:3})}setIsaDefaults(){this.techniques=["reed_sol_van","cauchy"],this.setDefaults({k:7,m:3,technique:"reed_sol_van"})}setShecDefaults(){this.setDefaults({k:4,m:3,c:2})}setClayDefaults(){this.setDefaults({k:4,m:2,scalar_mds:this.PLUGIN.JERASURE}),this.setClayDefaultsForScalar()}setClayDefaultsForScalar(){const e=this.form.getValue("scalar_mds");let t="reed_sol_van";e===this.PLUGIN.JERASURE?this.techniques=["reed_sol_van","reed_sol_r6_op","cauchy_orig","cauchy_good","liber8tion"]:e===this.PLUGIN.ISA?this.techniques=["reed_sol_van","cauchy"]:(t="single",this.techniques=["single","multiple"]),this.setDefaults({technique:t})}setDefaults(e){Object.keys(e).forEach(t=>{const i=this.form.get(t),a=i.value;i.pristine||"technique"===t&&!this.techniques.includes(a)||"k"===t&&[4,7].includes(a)||"m"===t&&[2,3].includes(a)?i.setValue(e[t]):i.updateValueAndValidity()})}ngOnInit(){this.ecpService.getInfo().subscribe(({plugins:e,names:t,directory:i,nodes:a})=>{this.initCrushNodeSelection(a,this.form.get("crushRoot"),this.form.get("crushFailureDomain"),this.form.get("crushDeviceClass")),this.plugins=e,this.names=t,this.form.silentSet("directory",i),this.preValidateNumericInputFields()})}preValidateNumericInputFields(){const e=["k","m","l","c","d"].map(e=>this.form.get(e));e.forEach(e=>{e.markAsTouched(),e.markAsDirty()}),e[1].updateValueAndValidity()}onSubmit(){if(this.form.invalid)return void this.form.setErrors({cdSubmitButton:!0});const e=this.createJson();this.taskWrapper.wrapTaskAroundCall({task:new T.a("ecp/create",{name:e.name}),call:this.ecpService.create(e)}).subscribe({error:()=>{this.form.setErrors({cdSubmitButton:!0})},complete:()=>{this.activeModal.close(),this.submitAction.emit(e)}})}createJson(){const e={technique:[this.PLUGIN.ISA,this.PLUGIN.JERASURE,this.PLUGIN.CLAY],packetSize:[this.PLUGIN.JERASURE],l:[this.PLUGIN.LRC],crushLocality:[this.PLUGIN.LRC],c:[this.PLUGIN.SHEC],d:[this.PLUGIN.CLAY],scalar_mds:[this.PLUGIN.CLAY]},t=new te,i=this.form.getValue("plugin");return Object.keys(this.form.controls).filter(t=>{const a=e[t],o=this.form.getValue(t);return(a&&a.includes(i)||!a)&&o&&""!==o}).forEach(e=>{this.extendJson(e,t)}),t}extendJson(e,t){const i=this.form.getValue(e);t[{crushFailureDomain:"crush-failure-domain",crushRoot:"crush-root",crushDeviceClass:"crush-device-class",packetSize:"packetsize",crushLocality:"crush-locality"}[e]||e]="crushRoot"===e?i.name:i}}return e.\u0275fac=function(t){return new(t||e)(m.Mb(P.a),m.Mb(c.a),m.Mb(k.a),m.Mb(S),m.Mb(n.b))},e.\u0275cmp=m.Gb({type:e,selectors:[["cd-erasure-code-profile-form-modal"]],outputs:{submitAction:"submitAction"},features:[m.vb],decls:98,vars:53,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"modal-content"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","name",1,"cd-col-form-label"],"Name",[1,"cd-col-form-input"],["type","text","id","name","name","name","placeholder","Name...","formControlName","name","autofocus","",1,"form-control"],["class","invalid-feedback",4,"ngIf"],["for","plugin",1,"cd-col-form-label"],[1,"required"],"Plugin",[3,"html"],["id","plugin","name","plugin","formControlName","plugin",1,"form-control","custom-select"],["ngValue","",4,"ngIf"],[3,"ngValue",4,"ngFor","ngForOf"],["for","k",1,"cd-col-form-label"],"Data chunks (k)",["type","number","id","k","name","k","ng-model","$ctrl.erasureCodeProfile.k","placeholder","Data chunks...","formControlName","k",1,"form-control"],["class","form-text text-muted",4,"ngIf"],["for","m",1,"cd-col-form-label"],"Coding chunks (m)",["type","number","id","m","name","m","placeholder","Coding chunks...","formControlName","m",1,"form-control"],["class","form-group row",4,"ngIf"],["for","crushFailureDomain",1,"cd-col-form-label"],"Crush failure domain",["id","crushFailureDomain","name","crushFailureDomain","formControlName","crushFailureDomain",1,"form-control","custom-select"],["for","crushRoot",1,"cd-col-form-label"],"Crush root",["id","crushRoot","name","crushRoot","formControlName","crushRoot",1,"form-control","custom-select"],["for","crushDeviceClass",1,"cd-col-form-label"],"Crush device class",["id","crushDeviceClass","name","crushDeviceClass","formControlName","crushDeviceClass",1,"form-control","custom-select"],["ngValue",""],"Let Ceph decide",[1,"form-text","text-muted"],"Available OSDs: " + "\ufffd0\ufffd" + "",["for","directory",1,"cd-col-form-label"],"Directory",["type","text","id","directory","name","directory","placeholder","Path...","formControlName","directory",1,"form-control"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required!","The name can only consist of alphanumeric characters, dashes and underscores.","The chosen erasure code profile name is already in use.","Loading...",[3,"ngValue"],"This field is required!","This field is required!","Must be equal to or greater than 2.","Chunks (k+m) have exceeded the available OSDs of " + "\ufffd0\ufffd" + ".","For an equal distribution k has to be a multiple of (k+m)/l.","K has to be equal to or greater than m in order to recover data correctly through c.","Distribution factor: " + "\ufffd0\ufffd" + "","This field is required!","Must be equal to or greater than 1.","Chunks (k+m) have exceeded the available OSDs of " + "\ufffd0\ufffd" + ".",["for","c",1,"cd-col-form-label"],"Durability estimator (c)",["type","number","id","c","name","c","placeholder","Coding chunks...","formControlName","c",1,"form-control"],"Must be equal to or greater than 1.","C has to be equal to or lower than m as m defines the amount of chunks that can be used.",["for","d",1,"cd-col-form-label"],"Helper chunks (d)",[1,"input-group"],["type","number","id","d","name","d","placeholder","Helper chunks...","formControlName","d",1,"form-control"],[1,"input-group-append"],["id","d-calc-btn","type","button",1,"btn","btn-light",3,"click",6,"ngbTooltip"],["ngbTooltip","Set d manually or use the plugin's default calculation that maximizes d."],["aria-hidden","true",3,"ngClass"],[4,"ngIf"],"D is automatically updated on k and m changes","D can be set from " + "\ufffd0\ufffd" + " to " + "\ufffd1\ufffd" + "","D can only be set to " + "\ufffd0\ufffd" + "","D has to be greater than k (" + "\ufffd0\ufffd" + ").","D has to be lower than k + m (" + "\ufffd0\ufffd" + ").",["for","l",1,"cd-col-form-label"],"Locality (l)",["type","number","id","l","name","l","placeholder","Coding chunks...","formControlName","l",1,"form-control"],"Locality groups: " + "\ufffd0\ufffd" + "","This field is required!","Must be equal to or greater than 1.","Can't split up chunks (k+m) correctly with the current locality.","Loading...",["for","crushLocality",1,"cd-col-form-label"],"Crush Locality",["id","crushLocality","name","crushLocality","formControlName","crushLocality",1,"form-control","custom-select"],"Loading...","None",["for","scalar_mds",1,"cd-col-form-label"],"Scalar mds",["id","scalar_mds","name","scalar_mds","formControlName","scalar_mds",1,"form-control","custom-select"],["for","technique",1,"cd-col-form-label"],"Technique",["id","technique","name","technique","formControlName","technique",1,"form-control","custom-select"],["for","packetSize",1,"cd-col-form-label"],"Packetsize",["type","number","id","packetSize","name","packetSize","placeholder","Packetsize...","formControlName","packetSize",1,"form-control"],"Must be equal to or greater than 1.","Loading..."]},template:function(e,t){if(1&e&&(m.Sb(0,"cd-modal",0),m.Qb(1,1),m.Wb(2,2),m.jc(3,"titlecase"),m.jc(4,"upperFirst"),m.Pb(),m.Qb(5,3),m.Sb(6,"form",4,5),m.Sb(8,"div",6),m.Sb(9,"div",7),m.Sb(10,"label",8),m.Wb(11,9),m.Rb(),m.Sb(12,"div",10),m.Nb(13,"input",11),m.Mc(14,ie,2,0,"span",12),m.Mc(15,ae,2,0,"span",12),m.Mc(16,oe,2,0,"span",12),m.Rb(),m.Rb(),m.Sb(17,"div",7),m.Sb(18,"label",13),m.Sb(19,"span",14),m.Wb(20,15),m.Rb(),m.Nb(21,"cd-helper",16),m.Rb(),m.Sb(22,"div",10),m.Sb(23,"select",17),m.Mc(24,se,2,0,"option",18),m.Mc(25,ce,2,2,"option",19),m.Rb(),m.Mc(26,ne,2,0,"span",12),m.Rb(),m.Rb(),m.Sb(27,"div",7),m.Sb(28,"label",20),m.Sb(29,"span",14),m.Wb(30,21),m.Rb(),m.Nb(31,"cd-helper",16),m.Rb(),m.Sb(32,"div",10),m.Nb(33,"input",22),m.Mc(34,le,2,0,"span",12),m.Mc(35,re,2,0,"span",12),m.Mc(36,be,2,1,"span",12),m.Mc(37,de,2,0,"span",12),m.Mc(38,ue,2,0,"span",12),m.Mc(39,fe,2,1,"span",23),m.Rb(),m.Rb(),m.Sb(40,"div",7),m.Sb(41,"label",24),m.Sb(42,"span",14),m.Wb(43,25),m.Rb(),m.Nb(44,"cd-helper",16),m.Rb(),m.Sb(45,"div",10),m.Nb(46,"input",26),m.Mc(47,pe,2,0,"span",12),m.Mc(48,he,2,0,"span",12),m.Mc(49,me,2,1,"span",12),m.Rb(),m.Rb(),m.Mc(50,Re,9,3,"div",27),m.Mc(51,_e,16,6,"div",27),m.Mc(52,$e,12,5,"div",27),m.Sb(53,"div",7),m.Sb(54,"label",28),m.Qb(55),m.Wb(56,29),m.Pb(),m.Nb(57,"cd-helper",16),m.Rb(),m.Sb(58,"div",10),m.Sb(59,"select",30),m.Mc(60,De,2,0,"option",18),m.Mc(61,Ee,2,3,"option",19),m.Rb(),m.Rb(),m.Rb(),m.Mc(62,Ae,10,4,"div",27),m.Mc(63,We,8,6,"div",27),m.Mc(64,Le,8,2,"div",27),m.Mc(65,Be,8,2,"div",27),m.Sb(66,"div",7),m.Sb(67,"label",31),m.Qb(68),m.Wb(69,32),m.Pb(),m.Nb(70,"cd-helper",16),m.Rb(),m.Sb(71,"div",10),m.Sb(72,"select",33),m.Mc(73,Ue,2,0,"option",18),m.Mc(74,Ge,2,2,"option",19),m.Rb(),m.Rb(),m.Rb(),m.Sb(75,"div",7),m.Sb(76,"label",34),m.Qb(77),m.Wb(78,35),m.Pb(),m.Nb(79,"cd-helper",16),m.Rb(),m.Sb(80,"div",10),m.Sb(81,"select",36),m.Sb(82,"option",37),m.Wb(83,38),m.Rb(),m.Mc(84,je,2,2,"option",19),m.Rb(),m.Sb(85,"span",39),m.Wb(86,40),m.Rb(),m.Rb(),m.Rb(),m.Sb(87,"div",7),m.Sb(88,"label",41),m.Qb(89),m.Wb(90,42),m.Pb(),m.Nb(91,"cd-helper",16),m.Rb(),m.Sb(92,"div",10),m.Nb(93,"input",43),m.Rb(),m.Rb(),m.Rb(),m.Sb(94,"div",44),m.Sb(95,"cd-form-button-panel",45),m.gc("submitActionEvent",(function(){return t.onSubmit()})),m.jc(96,"titlecase"),m.jc(97,"upperFirst"),m.Rb(),m.Rb(),m.Rb(),m.Pb(),m.Rb()),2&e){const e=m.Ac(7);m.pc("modalRef",t.activeModal),m.yb(4),m.ac(m.kc(3,41,t.action))(m.kc(4,43,t.resource)),m.Xb(2),m.yb(2),m.pc("formGroup",t.form),m.yb(8),m.pc("ngIf",t.form.showError("name",e,"required")),m.yb(1),m.pc("ngIf",t.form.showError("name",e,"pattern")),m.yb(1),m.pc("ngIf",t.form.showError("name",e,"uniqueName")),m.yb(5),m.pc("html",t.tooltips.plugins[t.plugin].description),m.yb(3),m.pc("ngIf",!t.plugins),m.yb(1),m.pc("ngForOf",t.plugins),m.yb(1),m.pc("ngIf",t.form.showError("name",e,"required")),m.yb(5),m.pc("html",t.tooltips.k),m.yb(3),m.pc("ngIf",t.form.showError("k",e,"required")),m.yb(1),m.pc("ngIf",t.form.showError("k",e,"min")),m.yb(1),m.pc("ngIf",t.form.showError("k",e,"max")),m.yb(1),m.pc("ngIf",t.form.showError("k",e,"unequal")),m.yb(1),m.pc("ngIf",t.form.showError("k",e,"kLowerM")),m.yb(1),m.pc("ngIf","lrc"===t.plugin),m.yb(5),m.pc("html",t.tooltips.m),m.yb(3),m.pc("ngIf",t.form.showError("m",e,"required")),m.yb(1),m.pc("ngIf",t.form.showError("m",e,"min")),m.yb(1),m.pc("ngIf",t.form.showError("m",e,"max")),m.yb(1),m.pc("ngIf","shec"===t.plugin),m.yb(1),m.pc("ngIf","clay"===t.plugin),m.yb(1),m.pc("ngIf",t.plugin===t.PLUGIN.LRC),m.yb(5),m.pc("html",t.tooltips.crushFailureDomain),m.yb(3),m.pc("ngIf",!t.failureDomains),m.yb(1),m.pc("ngForOf",t.failureDomainKeys),m.yb(1),m.pc("ngIf",t.plugin===t.PLUGIN.LRC),m.yb(1),m.pc("ngIf",t.PLUGIN.CLAY===t.plugin),m.yb(1),m.pc("ngIf",m.wc(49,Ve,t.PLUGIN.JERASURE,t.PLUGIN.ISA,t.PLUGIN.CLAY).includes(t.plugin)),m.yb(1),m.pc("ngIf",t.plugin===t.PLUGIN.JERASURE),m.yb(5),m.pc("html",t.tooltips.crushRoot),m.yb(3),m.pc("ngIf",!t.buckets),m.yb(1),m.pc("ngForOf",t.buckets),m.yb(5),m.pc("html",t.tooltips.crushDeviceClass),m.yb(5),m.pc("ngForOf",t.devices),m.yb(2),m.ac(t.deviceCount),m.Xb(86),m.yb(5),m.pc("html",t.tooltips.directory),m.yb(4),m.pc("form",t.form)("submitText",m.kc(96,45,t.action)+" "+m.kc(97,47,t.resource))}},directives:[x.a,o.C,o.r,A.a,o.k,O.a,V.a,o.d,W.a,o.q,o.i,F.a,a.r,L.a,o.z,a.q,o.v,o.u,o.B,q.a,c.D,a.p],pipes:[a.A,B.a],styles:[""]}),e})();var Je=i("DNAf");class Ke{constructor(){this.erasureInfo=!1,this.crushInfo=!1,this.pgs=1,this.poolTypes=["erasure","replicated"],this.applications={selected:[],default:["cephfs","rbd","rgw"],available:[],validators:[o.A.pattern("[A-Za-z0-9_]+"),o.A.maxLength(128)],messages:new Je.a({empty:"No applications added",selectionLimit:{text:"Applications limit reached",tooltip:"A pool can only have up to four applications definitions."},customValidations:{pattern:"Allowed characters '_a-zA-Z0-9'",maxlength:"Maximum length is 128 characters"},filter:"Filter or add applications'",add:"Add application"})}}}var Ye=i("zc8c"),Xe=i("ppaS"),He=i("EmSq"),Ze=i("rFfW"),et=i("6qls"),tt=i("FSuO");const it=["crushInfoTabs"],at=["crushDeletionBtn"],ot=["ecpInfoTabs"],st=["ecpDeletionBtn"];function ct(e,t){1&e&&(m.Sb(0,"span",42),m.Wb(1,43),m.Rb())}function nt(e,t){1&e&&(m.Sb(0,"span",42),m.Wb(1,44),m.Rb())}function lt(e,t){1&e&&(m.Sb(0,"span",42),m.Wb(1,45),m.Rb())}function rt(e,t){1&e&&(m.Sb(0,"span",42),m.Wb(1,46),m.Rb())}function bt(e,t){if(1&e&&(m.Sb(0,"option",47),m.Oc(1),m.Rb()),2&e){const e=t.$implicit;m.pc("value",e),m.yb(1),m.Qc(" ",e," ")}}function dt(e,t){1&e&&(m.Sb(0,"span",42),m.Wb(1,48),m.Rb())}function ut(e,t){if(1&e&&(m.Sb(0,"option",47),m.Oc(1),m.Rb()),2&e){const e=t.$implicit;m.pc("value",e),m.yb(1),m.Qc(" ",e," ")}}function ft(e,t){1&e&&(m.Sb(0,"span",42),m.Wb(1,60),m.Rb())}function pt(e,t){1&e&&(m.Sb(0,"span",42),m.Wb(1,61),m.Rb())}function ht(e,t){1&e&&(m.Sb(0,"span",42),m.Wb(1,62),m.Rb())}function mt(e,t){1&e&&(m.Sb(0,"span",56),m.Wb(1,63),m.Rb())}function gt(e,t){if(1&e){const e=m.Tb();m.Sb(0,"div",8),m.Sb(1,"label",53),m.Wb(2,54),m.Rb(),m.Sb(3,"div",11),m.Sb(4,"input",55),m.gc("focus",(function(){return m.Dc(e),m.ic(3).externalPgChange=!1}))("blur",(function(){return m.Dc(e),m.ic(3).alignPgs()})),m.Rb(),m.Mc(5,ft,2,0,"span",14),m.Mc(6,pt,2,0,"span",14),m.Mc(7,ht,2,0,"span",14),m.Sb(8,"span",56),m.Sb(9,"cd-doc",57),m.Yb(10,58),m.Rb(),m.Rb(),m.Mc(11,mt,2,0,"span",59),m.Rb(),m.Rb()}if(2&e){m.ic(2);const e=m.Ac(2),t=m.ic();m.yb(5),m.pc("ngIf",t.form.showError("pgNum",e,"required")),m.yb(1),m.pc("ngIf",t.form.showError("pgNum",e,"min")),m.yb(1),m.pc("ngIf",t.form.showError("pgNum",e,"34")),m.yb(4),m.pc("ngIf",t.externalPgChange)}}function St(e,t){if(1&e&&(m.Sb(0,"span",42),m.Sb(1,"ul",68),m.Sb(2,"li"),m.Wb(3,69),m.Rb(),m.Sb(4,"li"),m.Wb(5,70),m.Rb(),m.Rb(),m.Rb()),2&e){const e=m.ic(4);m.yb(3),m.ac(e.getMinSize()),m.Xb(3),m.yb(2),m.ac(e.getMaxSize()),m.Xb(5)}}function Rt(e,t){if(1&e&&(m.Sb(0,"span",42),m.Wb(1,71),m.Rb()),2&e){const e=m.ic(4);m.yb(1),m.ac(e.getMinSize())(e.getMaxSize()),m.Xb(1)}}function vt(e,t){1&e&&(m.Sb(0,"span",72),m.Wb(1,73),m.Rb())}function yt(e,t){if(1&e&&(m.Sb(0,"div",8),m.Sb(1,"label",64),m.Wb(2,65),m.Rb(),m.Sb(3,"div",11),m.Nb(4,"input",66),m.Mc(5,St,6,2,"span",14),m.Mc(6,Rt,2,2,"span",14),m.Mc(7,vt,2,0,"span",67),m.Rb(),m.Rb()),2&e){m.ic(2);const e=m.Ac(2),t=m.ic();m.yb(4),m.pc("max",t.getMaxSize())("min",t.getMinSize()),m.yb(1),m.pc("ngIf",t.form.showError("size",e)),m.yb(1),m.pc("ngIf",t.form.showError("size",e)),m.yb(1),m.pc("ngIf",1===t.form.getValue("size"))}}function zt(e,t){1&e&&(m.Sb(0,"div",8),m.Sb(1,"label",74),m.Wb(2,75),m.Rb(),m.Sb(3,"div",11),m.Sb(4,"div",76),m.Nb(5,"input",77),m.Sb(6,"label",78),m.Wb(7,79),m.Rb(),m.Rb(),m.Rb(),m.Rb())}function Ct(e,t){if(1&e&&(m.Sb(0,"div"),m.Sb(1,"div",8),m.Sb(2,"label",49),m.Wb(3,50),m.Rb(),m.Sb(4,"div",11),m.Sb(5,"select",51),m.Mc(6,ut,2,2,"option",20),m.Rb(),m.Rb(),m.Rb(),m.Mc(7,gt,12,4,"div",52),m.Mc(8,yt,8,5,"div",52),m.Mc(9,zt,8,0,"div",52),m.Rb()),2&e){const e=m.ic(2);m.yb(6),m.pc("ngForOf",e.pgAutoscaleModes),m.yb(1),m.pc("ngIf","on"!==e.form.getValue("pgAutoscaleMode")),m.yb(1),m.pc("ngIf",e.isReplicated),m.yb(1),m.pc("ngIf",e.info.is_all_bluestore&&e.isErasure)}}function It(e,t){1&e&&(m.Sb(0,"option",18),m.Wb(1,94),m.Rb())}function Nt(e,t){1&e&&(m.Sb(0,"option",95),m.Wb(1,96),m.Rb()),2&e&&m.pc("ngValue",null)}function _t(e,t){1&e&&(m.Sb(0,"option",95),m.Wb(1,97),m.Rb()),2&e&&m.pc("ngValue",null)}function Mt(e,t){if(1&e&&(m.Sb(0,"option",95),m.Oc(1),m.Rb()),2&e){const e=t.$implicit;m.pc("ngValue",e),m.yb(1),m.Qc(" ",e.name," ")}}const Tt=function(e){return[e]};function wt(e,t){if(1&e){const e=m.Tb();m.Sb(0,"button",98),m.gc("click",(function(){return m.Dc(e),m.ic(4).addErasureCodeProfile()})),m.Nb(1,"i",90),m.Rb()}if(2&e){const e=m.ic(4);m.yb(1),m.pc("ngClass",m.uc(1,Tt,e.icons.add))}}function $t(e,t){if(1&e){const e=m.Tb();m.Sb(0,"button",99,100),m.Yb(2,101),m.gc("click",(function(){return m.Dc(e),m.ic(4).deleteErasureCodeProfile()})),m.Nb(3,"i",90),m.Rb()}if(2&e){const e=m.ic(4);m.yb(3),m.pc("ngClass",m.uc(1,Tt,e.icons.trash))}}const Dt=function(){return["name"]};function Et(e,t){if(1&e&&m.Nb(0,"cd-table-key-value",112),2&e){const e=m.ic(5);m.pc("renderObjects",!0)("hideKeys",m.tc(4,Dt))("data",e.form.getValue("erasureProfile"))("autoReload",!1)}}function kt(e,t){1&e&&(m.Sb(0,"span"),m.Wb(1,115),m.Rb())}function Pt(e,t){if(1&e&&(m.Sb(0,"li"),m.Oc(1),m.Rb()),2&e){const e=t.$implicit;m.yb(1),m.Qc(" ",e," ")}}function xt(e,t){if(1&e&&(m.Sb(0,"ul"),m.Mc(1,Pt,2,1,"li",116),m.Rb()),2&e){const e=m.ic(6);m.yb(1),m.pc("ngForOf",e.ecpUsage)}}function At(e,t){if(1&e&&(m.Mc(0,kt,2,0,"ng-template",null,113,m.Nc),m.Mc(2,xt,2,1,"ul",114)),2&e){const e=m.Ac(1),t=m.ic(5);m.yb(2),m.pc("ngIf",t.ecpUsage)("ngIfElse",e)}}function Ot(e,t){if(1&e&&(m.Sb(0,"span",102),m.Sb(1,"ul",103,104),m.Sb(3,"li",105),m.Sb(4,"a",106),m.Wb(5,107),m.Rb(),m.Mc(6,Et,1,5,"ng-template",108),m.Rb(),m.Sb(7,"li",109),m.Sb(8,"a",106),m.Wb(9,110),m.Rb(),m.Mc(10,At,3,2,"ng-template",108),m.Rb(),m.Rb(),m.Nb(11,"div",111),m.Rb()),2&e){const e=m.Ac(2);m.yb(11),m.pc("ngbNavOutlet",e)}}const Vt=function(e){return{active:e}};function Wt(e,t){if(1&e){const e=m.Tb();m.Sb(0,"div",8),m.Sb(1,"label",81),m.Wb(2,82),m.Rb(),m.Sb(3,"div",11),m.Sb(4,"div",83),m.Sb(5,"select",84),m.Mc(6,It,2,0,"option",85),m.Mc(7,Nt,2,1,"option",86),m.Mc(8,_t,2,1,"option",86),m.Mc(9,Mt,2,2,"option",87),m.Rb(),m.Sb(10,"span",88),m.Sb(11,"button",89),m.gc("click",(function(){m.Dc(e);const t=m.ic(3);return t.data.erasureInfo=!t.data.erasureInfo})),m.Nb(12,"i",90),m.Rb(),m.Mc(13,wt,2,3,"button",91),m.Mc(14,$t,4,3,"button",92),m.Rb(),m.Rb(),m.Mc(15,Ot,12,1,"span",93),m.Rb(),m.Rb()}if(2&e){const e=m.ic(3);m.yb(6),m.pc("ngIf",!e.ecProfiles),m.yb(1),m.pc("ngIf",e.ecProfiles&&0===e.ecProfiles.length),m.yb(1),m.pc("ngIf",e.ecProfiles&&e.ecProfiles.length>0),m.yb(1),m.pc("ngForOf",e.ecProfiles),m.yb(2),m.pc("ngClass",m.uc(9,Vt,e.data.erasureInfo)),m.yb(1),m.pc("ngClass",m.uc(11,Tt,e.icons.questionCircle)),m.yb(1),m.pc("ngIf",!e.editing),m.yb(1),m.pc("ngIf",!e.editing),m.yb(1),m.pc("ngIf",e.data.erasureInfo&&e.form.getValue("erasureProfile"))}}function Ft(e,t){1&e&&(m.Sb(0,"div",8),m.Sb(1,"label",117),m.Wb(2,118),m.Rb(),m.Sb(3,"div",11),m.Sb(4,"span",56),m.Wb(5,119),m.Rb(),m.Rb(),m.Rb())}function Lt(e,t){1&e&&(m.Sb(0,"span",56),m.Sb(1,"span"),m.Wb(2,122),m.Rb(),m.Oc(3,"\xa0 "),m.Rb())}function qt(e,t){if(1&e&&(m.Sb(0,"option",95),m.Oc(1),m.Rb()),2&e){const e=t.$implicit;m.pc("ngValue",e),m.yb(1),m.Qc(" ",e.rule_name," ")}}function Bt(e,t){if(1&e){const e=m.Tb();m.Sb(0,"button",98),m.gc("click",(function(){return m.Dc(e),m.ic(5).addCrushRule()})),m.Nb(1,"i",90),m.Rb()}if(2&e){const e=m.ic(5);m.yb(1),m.pc("ngClass",m.uc(1,Tt,e.icons.add))}}function Ut(e,t){if(1&e){const e=m.Tb();m.Sb(0,"button",99,128),m.Yb(2,129),m.gc("click",(function(){return m.Dc(e),m.ic(5).deleteCrushRule()})),m.Nb(3,"i",90),m.Rb()}if(2&e){const e=m.ic(5);m.yb(3),m.pc("ngClass",m.uc(1,Tt,e.icons.trash))}}const Gt=function(){return["steps","ruleset","type","rule_name"]};function jt(e,t){if(1&e&&m.Nb(0,"cd-table-key-value",112),2&e){const e=m.ic(6);m.pc("renderObjects",!1)("hideKeys",m.tc(4,Gt))("data",e.form.getValue("crushRule"))("autoReload",!1)}}function Qt(e,t){if(1&e&&(m.Sb(0,"li"),m.Oc(1),m.Rb()),2&e){const e=t.$implicit,i=m.ic(7);m.yb(1),m.Qc(" ",i.describeCrushStep(e)," ")}}function Jt(e,t){if(1&e&&(m.Sb(0,"ol"),m.Mc(1,Qt,2,1,"li",116),m.Rb()),2&e){const e=m.ic(6);m.yb(1),m.pc("ngForOf",e.form.get("crushRule").value.steps)}}function Kt(e,t){1&e&&(m.Sb(0,"span"),m.Wb(1,138),m.Rb())}function Yt(e,t){if(1&e&&(m.Sb(0,"li"),m.Oc(1),m.Rb()),2&e){const e=t.$implicit;m.yb(1),m.Qc(" ",e," ")}}function Xt(e,t){if(1&e&&(m.Sb(0,"ul"),m.Mc(1,Yt,2,1,"li",116),m.Rb()),2&e){const e=m.ic(7);m.yb(1),m.pc("ngForOf",e.crushUsage)}}function Ht(e,t){if(1&e&&(m.Mc(0,Kt,2,0,"ng-template",null,137,m.Nc),m.Mc(2,Xt,2,1,"ul",114)),2&e){const e=m.Ac(1),t=m.ic(6);m.yb(2),m.pc("ngIf",t.crushUsage)("ngIfElse",e)}}function Zt(e,t){if(1&e&&(m.Sb(0,"div",130),m.Sb(1,"ul",103,131),m.Sb(3,"li",132),m.Sb(4,"a",106),m.Wb(5,133),m.Rb(),m.Mc(6,jt,1,5,"ng-template",108),m.Rb(),m.Sb(7,"li",134),m.Sb(8,"a",106),m.Wb(9,135),m.Rb(),m.Mc(10,Jt,2,1,"ng-template",108),m.Rb(),m.Sb(11,"li",109),m.Sb(12,"a",106),m.Wb(13,136),m.Rb(),m.Mc(14,Ht,3,2,"ng-template",108),m.Rb(),m.Rb(),m.Nb(15,"div",111),m.Rb()),2&e){const e=m.Ac(2);m.yb(15),m.pc("ngbNavOutlet",e)}}function ei(e,t){1&e&&(m.Sb(0,"span",42),m.Wb(1,139),m.Rb())}function ti(e,t){1&e&&(m.Sb(0,"span",42),m.Wb(1,140),m.Rb())}function ii(e,t){if(1&e){const e=m.Tb();m.Sb(0,"div"),m.Sb(1,"div",83),m.Sb(2,"select",123),m.Sb(3,"option",95),m.Wb(4,124),m.Rb(),m.Mc(5,qt,2,2,"option",87),m.Rb(),m.Sb(6,"span",88),m.Sb(7,"button",125),m.Yb(8,126),m.gc("click",(function(){m.Dc(e);const t=m.ic(4);return t.data.crushInfo=!t.data.crushInfo})),m.Nb(9,"i",90),m.Rb(),m.Mc(10,Bt,2,3,"button",91),m.Mc(11,Ut,4,3,"button",92),m.Rb(),m.Rb(),m.Mc(12,Zt,16,1,"div",127),m.Mc(13,ei,2,0,"span",14),m.Mc(14,ti,2,0,"span",14),m.Rb()}if(2&e){m.ic(3);const e=m.Ac(2),t=m.ic();m.yb(3),m.pc("ngValue",null),m.yb(2),m.pc("ngForOf",t.current.rules),m.yb(2),m.pc("ngClass",m.uc(9,Vt,t.data.crushInfo)),m.yb(2),m.pc("ngClass",m.uc(11,Tt,t.icons.questionCircle)),m.yb(1),m.pc("ngIf",t.isReplicated&&!t.editing),m.yb(1),m.pc("ngIf",t.isReplicated&&!t.editing),m.yb(1),m.pc("ngIf",t.data.crushInfo&&t.form.getValue("crushRule")),m.yb(1),m.pc("ngIf",t.form.showError("crushRule",e,"required")),m.yb(1),m.pc("ngIf",t.form.showError("crushRule",e,"tooFewOsds"))}}function ai(e,t){if(1&e&&(m.Sb(0,"div",8),m.Sb(1,"label",117),m.Wb(2,120),m.Rb(),m.Sb(3,"div",11),m.Mc(4,Lt,4,0,"ng-template",null,121,m.Nc),m.Mc(6,ii,15,13,"div",114),m.Rb(),m.Rb()),2&e){const e=m.Ac(5),t=m.ic(3);m.yb(6),m.pc("ngIf",t.current.rules.length>0)("ngIfElse",e)}}function oi(e,t){if(1&e&&(m.Sb(0,"div"),m.Sb(1,"legend"),m.Wb(2,80),m.Rb(),m.Mc(3,Wt,16,13,"div",52),m.Mc(4,Ft,6,0,"div",52),m.Mc(5,ai,7,2,"div",52),m.Rb()),2&e){const e=m.ic(2);m.yb(3),m.pc("ngIf",e.isErasure),m.yb(1),m.pc("ngIf",e.isErasure&&!e.editing),m.yb(1),m.pc("ngIf",e.isReplicated||e.editing)}}function si(e,t){if(1&e&&(m.Sb(0,"option",47),m.Oc(1),m.Rb()),2&e){const e=t.$implicit;m.pc("value",e),m.yb(1),m.Qc(" ",e," ")}}function ci(e,t){1&e&&(m.Sb(0,"option",18),m.Wb(1,161),m.Rb())}function ni(e,t){1&e&&(m.Sb(0,"option",18),m.Wb(1,162),m.Rb())}function li(e,t){if(1&e&&(m.Sb(0,"option",47),m.Oc(1),m.Rb()),2&e){const e=t.$implicit;m.pc("value",e),m.yb(1),m.Qc(" ",e," ")}}function ri(e,t){1&e&&(m.Sb(0,"span",42),m.Wb(1,163),m.Rb())}function bi(e,t){1&e&&(m.Sb(0,"span",42),m.Wb(1,164),m.Rb())}function di(e,t){1&e&&(m.Sb(0,"span",42),m.Wb(1,165),m.Rb())}function ui(e,t){1&e&&(m.Sb(0,"span",42),m.Wb(1,166),m.Rb())}function fi(e,t){1&e&&(m.Sb(0,"span",42),m.Wb(1,167),m.Rb())}function pi(e,t){if(1&e&&(m.Sb(0,"div"),m.Sb(1,"div",8),m.Sb(2,"label",146),m.Wb(3,147),m.Rb(),m.Sb(4,"div",11),m.Sb(5,"select",148),m.Mc(6,ci,2,0,"option",85),m.Mc(7,ni,2,0,"option",85),m.Mc(8,li,2,2,"option",20),m.Rb(),m.Rb(),m.Rb(),m.Sb(9,"div",8),m.Sb(10,"label",149),m.Wb(11,150),m.Rb(),m.Sb(12,"div",11),m.Sb(13,"input",151),m.Yb(14,152),m.Rb(),m.Mc(15,ri,2,0,"span",14),m.Mc(16,bi,2,0,"span",14),m.Rb(),m.Rb(),m.Sb(17,"div",8),m.Sb(18,"label",153),m.Wb(19,154),m.Rb(),m.Sb(20,"div",11),m.Sb(21,"input",155),m.Yb(22,156),m.Rb(),m.Mc(23,di,2,0,"span",14),m.Mc(24,ui,2,0,"span",14),m.Rb(),m.Rb(),m.Sb(25,"div",8),m.Sb(26,"label",157),m.Wb(27,158),m.Rb(),m.Sb(28,"div",11),m.Sb(29,"input",159),m.Yb(30,160),m.Rb(),m.Mc(31,fi,2,0,"span",14),m.Rb(),m.Rb(),m.Rb()),2&e){m.ic(2);const e=m.Ac(2),t=m.ic();m.yb(6),m.pc("ngIf",!t.info.compression_algorithms),m.yb(1),m.pc("ngIf",t.info.compression_algorithms&&0===t.info.compression_algorithms.length),m.yb(1),m.pc("ngForOf",t.info.compression_algorithms),m.yb(7),m.pc("ngIf",t.form.showError("minBlobSize",e,"min")),m.yb(1),m.pc("ngIf",t.form.showError("minBlobSize",e,"maximum")),m.yb(7),m.pc("ngIf",t.form.showError("maxBlobSize",e,"min")),m.yb(1),m.pc("ngIf",t.form.showError("maxBlobSize",e,"minimum")),m.yb(7),m.pc("ngIf",t.form.showError("ratio",e,"min")||t.form.showError("ratio",e,"max"))}}function hi(e,t){if(1&e&&(m.Sb(0,"div",141),m.Sb(1,"legend"),m.Wb(2,142),m.Rb(),m.Sb(3,"div",8),m.Sb(4,"label",143),m.Wb(5,144),m.Rb(),m.Sb(6,"div",11),m.Sb(7,"select",145),m.Mc(8,si,2,2,"option",20),m.Rb(),m.Rb(),m.Rb(),m.Mc(9,pi,32,8,"div",21),m.Rb()),2&e){const e=m.ic(2);m.yb(8),m.pc("ngForOf",e.info.compression_modes),m.yb(1),m.pc("ngIf",e.hasCompressionEnabled())}}function mi(e,t){1&e&&(m.Sb(0,"span",42),m.Wb(1,168),m.Rb())}function gi(e,t){if(1&e){const e=m.Tb();m.Sb(0,"div",1),m.Sb(1,"form",2,3),m.Sb(3,"div",4),m.Sb(4,"div",5),m.Wb(5,6),m.jc(6,"titlecase"),m.jc(7,"upperFirst"),m.Rb(),m.Sb(8,"div",7),m.Sb(9,"div",8),m.Sb(10,"label",9),m.Wb(11,10),m.Rb(),m.Sb(12,"div",11),m.Sb(13,"input",12),m.Yb(14,13),m.Rb(),m.Mc(15,ct,2,0,"span",14),m.Mc(16,nt,2,0,"span",14),m.Mc(17,lt,2,0,"span",14),m.Mc(18,rt,2,0,"span",14),m.Rb(),m.Rb(),m.Sb(19,"div",8),m.Sb(20,"label",15),m.Wb(21,16),m.Rb(),m.Sb(22,"div",11),m.Sb(23,"select",17),m.Sb(24,"option",18),m.Wb(25,19),m.Rb(),m.Mc(26,bt,2,2,"option",20),m.Rb(),m.Mc(27,dt,2,0,"span",14),m.Rb(),m.Rb(),m.Mc(28,Ct,10,4,"div",21),m.Sb(29,"div",8),m.Sb(30,"label",22),m.Wb(31,23),m.Rb(),m.Sb(32,"div",11),m.Sb(33,"cd-select-badges",24),m.gc("selection",(function(){return m.Dc(e),m.ic().appSelection()})),m.Rb(),m.Rb(),m.Rb(),m.Mc(34,oi,6,3,"div",21),m.Mc(35,hi,10,2,"div",25),m.Sb(36,"div"),m.Sb(37,"legend"),m.Wb(38,26),m.Rb(),m.Sb(39,"div",8),m.Sb(40,"label",27),m.Qb(41),m.Wb(42,28),m.Pb(),m.Sb(43,"cd-helper"),m.Sb(44,"span"),m.Wb(45,29),m.Rb(),m.Nb(46,"br"),m.Sb(47,"span"),m.Wb(48,30),m.Rb(),m.Rb(),m.Rb(),m.Sb(49,"div",11),m.Sb(50,"input",31),m.Yb(51,32),m.Rb(),m.Rb(),m.Rb(),m.Sb(52,"div",8),m.Sb(53,"label",33),m.Qb(54),m.Wb(55,34),m.Pb(),m.Sb(56,"cd-helper"),m.Sb(57,"span"),m.Wb(58,35),m.Rb(),m.Nb(59,"br"),m.Sb(60,"span"),m.Wb(61,36),m.Rb(),m.Rb(),m.Rb(),m.Sb(62,"div",11),m.Nb(63,"input",37),m.Mc(64,mi,2,0,"span",14),m.Rb(),m.Rb(),m.Rb(),m.Sb(65,"div",38),m.Sb(66,"cd-rbd-configuration-form",39),m.gc("changes",(function(t){return m.Dc(e),m.ic().currentConfigurationValues=t()})),m.Rb(),m.Rb(),m.Rb(),m.Sb(67,"div",40),m.Sb(68,"cd-form-button-panel",41),m.gc("submitActionEvent",(function(){return m.Dc(e),m.ic().submit()})),m.jc(69,"titlecase"),m.jc(70,"upperFirst"),m.Rb(),m.Rb(),m.Rb(),m.Rb(),m.Rb()}if(2&e){const e=m.Ac(2),t=m.ic();m.yb(1),m.pc("formGroup",t.form),m.yb(6),m.ac(m.kc(6,24,t.action))(m.kc(7,26,t.resource)),m.Xb(5),m.yb(8),m.pc("ngIf",t.form.showError("name",e,"required")),m.yb(1),m.pc("ngIf",t.form.showError("name",e,"uniqueName")),m.yb(1),m.pc("ngIf",t.form.showError("name",e,"rbdPool")),m.yb(1),m.pc("ngIf",t.form.showError("name",e,"pattern")),m.yb(8),m.pc("ngForOf",t.data.poolTypes),m.yb(1),m.pc("ngIf",t.form.showError("poolType",e,"required")),m.yb(1),m.pc("ngIf",t.isReplicated||t.isErasure),m.yb(5),m.pc("customBadges",!0)("customBadgeValidators",t.data.applications.validators)("messages",t.data.applications.messages)("data",t.data.applications.selected)("options",t.data.applications.available)("selectionLimit",4),m.yb(1),m.pc("ngIf",t.isErasure||t.isReplicated),m.yb(1),m.pc("ngIf",t.info.is_all_bluestore),m.yb(29),m.pc("ngIf",t.form.showError("max_objects",e,"min")),m.yb(1),m.pc("hidden",t.isErasure||-1===t.data.applications.selected.indexOf("rbd")),m.yb(1),m.pc("form",t.form)("initializeData",t.initializeConfigData),m.yb(2),m.pc("form",t.form)("submitText",m.kc(69,28,t.action)+" "+m.kc(70,30,t.resource))}}let Si=(()=>{class e extends I.a{constructor(e,t,i,a,o,s,c,l,r,b,d){super(),this.dimlessBinaryPipe=e,this.route=t,this.router=i,this.modalService=a,this.poolService=o,this.authStorageService=s,this.formatter=c,this.taskWrapper=l,this.ecpService=r,this.crushRuleService=b,this.actionLabels=d,this.editing=!1,this.isReplicated=!1,this.isErasure=!1,this.data=new Ke,this.externalPgChange=!1,this.current={rules:[]},this.initializeConfigData=new f.a(1),this.currentConfigurationValues={},this.icons=C.a,this.crushUsage=void 0,this.ecpUsage=void 0,this.editing=this.router.url.startsWith("/pool/"+n.e.EDIT),this.action=this.editing?this.actionLabels.EDIT:this.actionLabels.CREATE,this.resource="pool",this.authenticate(),this.createForm()}authenticate(){if(this.permission=this.authStorageService.getPermissions().pool,!this.permission.read||!this.permission.update&&this.editing||!this.permission.create&&!this.editing)throw new p.b}createForm(){const e=new N.a({mode:new o.h("none"),algorithm:new o.h(""),minBlobSize:new o.h("",{updateOn:"blur"}),maxBlobSize:new o.h("",{updateOn:"blur"}),ratio:new o.h("",{updateOn:"blur"})});this.form=new N.a({name:new o.h("",{validators:[o.A.pattern(/^[.A-Za-z0-9_/-]+$/),o.A.required,_.a.custom("rbdPool",()=>this.form&&this.form.getValue("name").includes("/")&&this.data&&-1!==this.data.applications.selected.indexOf("rbd"))]}),poolType:new o.h("",{validators:[o.A.required]}),crushRule:new o.h(null,{validators:[_.a.custom("tooFewOsds",e=>this.info&&e&&this.info.osd_count<e.min_size),_.a.custom("required",e=>this.isReplicated&&this.info.crush_rules_replicated.length>0&&!e)]}),size:new o.h("",{updateOn:"blur"}),erasureProfile:new o.h(null),pgNum:new o.h("",{validators:[o.A.required,o.A.min(1)]}),pgAutoscaleMode:new o.h(null),ecOverwrites:new o.h(!1),compression:e,max_bytes:new o.h(""),max_objects:new o.h(0,{validators:[o.A.min(0)]})},[_.a.custom("form",()=>null)])}ngOnInit(){this.poolService.getInfo().subscribe(e=>{this.initInfo(e),this.editing?this.initEditMode():(this.setAvailableApps(),this.loadingReady()),this.listenToChanges(),this.setComplexValidators()})}initInfo(e){this.pgAutoscaleModes=e.pg_autoscale_modes,this.form.silentSet("pgAutoscaleMode",e.pg_autoscale_default_mode),this.form.silentSet("algorithm",e.bluestore_compression_algorithm),this.info=e,this.initEcp(e.erasure_code_profiles)}initEcp(e){this.setListControlStatus("erasureProfile",e),this.ecProfiles=e}setListControlStatus(e,t){const i=this.form.get(e),a=i.value;1!==t.length||a&&u.a.isEqual(a,t[0])?0===t.length&&a&&i.setValue(null):i.setValue(t[0]),t.length<=1?i.enabled&&i.disable():i.disabled&&i.enable()}initEditMode(){this.disableForEdit(),this.routeParamsSubscribe=this.route.params.subscribe(e=>this.poolService.get(e.name).subscribe(e=>{this.data.pool=e,this.initEditFormData(e),this.loadingReady()}))}disableForEdit(){["poolType","crushRule","size","erasureProfile","ecOverwrites"].forEach(e=>this.form.get(e).disable())}initEditFormData(e){this.initializeConfigData.next({initialData:e.configuration,sourceType:M.a.pool}),this.poolTypeChange(e.type);const t=this.info.crush_rules_replicated.concat(this.info.crush_rules_erasure),i={name:e.pool_name,poolType:e.type,crushRule:t.find(t=>t.rule_name===e.crush_rule),size:e.size,erasureProfile:this.ecProfiles.find(t=>t.name===e.erasure_code_profile),pgAutoscaleMode:e.pg_autoscale_mode,pgNum:e.pg_num,ecOverwrites:e.flags_names.includes("ec_overwrites"),mode:e.options.compression_mode,algorithm:e.options.compression_algorithm,minBlobSize:this.dimlessBinaryPipe.transform(e.options.compression_min_blob_size),maxBlobSize:this.dimlessBinaryPipe.transform(e.options.compression_max_blob_size),ratio:e.options.compression_required_ratio,max_bytes:this.dimlessBinaryPipe.transform(e.quota_max_bytes),max_objects:e.quota_max_objects};Object.keys(i).forEach(e=>{const t=i[e];u.a.isUndefined(t)||""===t||this.form.silentSet(e,t)}),this.data.pgs=this.form.getValue("pgNum"),this.setAvailableApps(this.data.applications.default.concat(e.application_metadata)),this.data.applications.selected=e.application_metadata}setAvailableApps(e=this.data.applications.default){this.data.applications.available=u.a.uniq(e.sort()).map(e=>new z.a(!1,e,""))}listenToChanges(){this.listenToChangesDuringAddEdit(),this.editing||this.listenToChangesDuringAdd()}listenToChangesDuringAddEdit(){this.form.get("pgNum").valueChanges.subscribe(e=>{const t=e-this.data.pgs;1===Math.abs(t)&&2!==e?this.doPgPowerJump(t):this.data.pgs=e})}doPgPowerJump(e){const t=this.calculatePgPower()+e;this.setPgs(-1===e?Math.round(t):Math.floor(t))}calculatePgPower(e=this.form.getValue("pgNum")){return Math.log(e)/Math.log(2)}setPgs(e){const t=Math.pow(2,e<0?0:e);this.data.pgs=t,this.form.silentSet("pgNum",t)}listenToChangesDuringAdd(){this.form.get("poolType").valueChanges.subscribe(e=>{this.poolTypeChange(e)}),this.form.get("crushRule").valueChanges.subscribe(e=>{this.crushDeletionBtn&&this.crushDeletionBtn.isOpen()&&this.crushDeletionBtn.close(),e&&(this.setCorrectMaxSize(e),this.crushRuleIsUsedBy(e.rule_name),this.replicatedRuleChange(),this.pgCalc())}),this.form.get("size").valueChanges.subscribe(()=>{this.pgCalc()}),this.form.get("erasureProfile").valueChanges.subscribe(e=>{this.ecpDeletionBtn&&this.ecpDeletionBtn.isOpen()&&this.ecpDeletionBtn.close(),e&&(this.ecpIsUsedBy(e.name),this.pgCalc())}),this.form.get("mode").valueChanges.subscribe(()=>{["minBlobSize","maxBlobSize","ratio"].forEach(e=>{this.form.get(e).updateValueAndValidity({emitEvent:!1})})}),this.form.get("minBlobSize").valueChanges.subscribe(()=>{this.form.get("maxBlobSize").updateValueAndValidity({emitEvent:!1})}),this.form.get("maxBlobSize").valueChanges.subscribe(()=>{this.form.get("minBlobSize").updateValueAndValidity({emitEvent:!1})})}poolTypeChange(e){if("replicated"===e?this.setTypeBooleans(!0,!1):this.setTypeBooleans(!1,"erasure"===e),!e||!this.info)return void(this.current.rules=[]);const t=this.info["crush_rules_"+e]||[];this.current.rules=t,this.editing||(this.isReplicated&&this.setListControlStatus("crushRule",t),this.replicatedRuleChange(),this.pgCalc())}setTypeBooleans(e,t){this.isReplicated=e,this.isErasure=t}replicatedRuleChange(){if(!this.isReplicated)return;const e=this.form.get("size");let t=this.form.getValue("size")||3;const i=this.getMinSize(),a=this.getMaxSize();t<i?t=i:t>a&&(t=a),t!==e.value&&this.form.silentSet("size",t)}getMinSize(){if(!this.info||this.info.osd_count<1)return 0;const e=this.form.getValue("crushRule");return e?e.min_size:1}getMaxSize(){const e=this.form.getValue("crushRule");return this.info?e?e.usable_size:Math.min(this.info.osd_count,3):0}pgCalc(){const e=this.form.getValue("poolType");if(!this.info||this.form.get("pgNum").dirty||!e)return;const t=100*this.info.osd_count,i=this.isReplicated?this.replicatedPgCalc(t):this.erasurePgCalc(t);if(!i)return;const a=this.data.pgs;this.alignPgs(i),this.externalPgChange||(this.externalPgChange=a!==this.data.pgs)}setCorrectMaxSize(e=this.form.getValue("crushRule")){if(!e)return;const t=v.searchFailureDomains(this.info.nodes,e.steps[0].item_name)[e.steps[1].type];e.usable_size=Math.min(t?t.length:e.max_size,e.max_size)}replicatedPgCalc(e){const t=this.form.get("size"),i=t.value;return t.valid&&i>0?e/i:0}erasurePgCalc(e){const t=this.form.get("erasureProfile"),i=t.value;return(t.valid||t.disabled)&&i?e/(i.k+i.m):0}alignPgs(e=this.form.getValue("pgNum")){this.setPgs(Math.round(this.calculatePgPower(e<1?1:e)))}setComplexValidators(){this.editing?this.form.get("name").setValidators([this.form.get("name").validator,_.a.custom("uniqueName",e=>this.data.pool&&this.info&&-1!==this.info.pool_names.indexOf(e)&&this.info.pool_names.indexOf(e)!==this.info.pool_names.indexOf(this.data.pool.pool_name))]):(_.a.validateIf(this.form.get("size"),()=>this.isReplicated,[_.a.custom("min",e=>this.form.getValue("size")&&e<this.getMinSize()),_.a.custom("max",e=>this.form.getValue("size")&&this.getMaxSize()<e)]),this.form.get("name").setValidators([this.form.get("name").validator,_.a.custom("uniqueName",e=>this.info&&-1!==this.info.pool_names.indexOf(e))])),this.setCompressionValidators()}setCompressionValidators(){_.a.validateIf(this.form.get("minBlobSize"),()=>this.hasCompressionEnabled(),[o.A.min(0),_.a.custom("maximum",e=>this.oddBlobSize(e,this.form.getValue("maxBlobSize")))]),_.a.validateIf(this.form.get("maxBlobSize"),()=>this.hasCompressionEnabled(),[o.A.min(0),_.a.custom("minimum",e=>this.oddBlobSize(this.form.getValue("minBlobSize"),e))]),_.a.validateIf(this.form.get("ratio"),()=>this.hasCompressionEnabled(),[o.A.min(0),o.A.max(1)])}oddBlobSize(e,t){const i=this.formatter.toBytes(e),a=this.formatter.toBytes(t);return Boolean(i&&a&&i>=a)}hasCompressionEnabled(){return this.form.getValue("mode")&&"none"!==this.form.get("mode").value.toLowerCase()}describeCrushStep(e){return[e.op.replace("_"," "),e.item_name||"",e.type?e.num+" type "+e.type:""].join(" ")}addErasureCodeProfile(){this.addModal(Qe,e=>this.reloadECPs(e))}addModal(e,t){this.hideOpenTooltips(),this.modalService.show(e).componentInstance.submitAction.subscribe(e=>{t(e.name)})}hideOpenTooltips(){const e=e=>e&&e.isOpen()&&e.close();e(this.ecpDeletionBtn),e(this.crushDeletionBtn)}reloadECPs(e){this.reloadList({newItemName:e,getInfo:()=>this.ecpService.list(),initInfo:e=>this.initEcp(e),findNewItem:()=>this.ecProfiles.find(t=>t.name===e),controlName:"erasureProfile"})}reloadList({newItemName:e,getInfo:t,initInfo:i,findNewItem:a,controlName:o}){this.modalSubscription&&this.modalSubscription.unsubscribe(),t().subscribe(t=>{if(i(t),!e)return;const s=a();s&&this.form.get(o).setValue(s)})}deleteErasureCodeProfile(){this.deletionModal({value:this.form.getValue("erasureProfile"),usage:this.ecpUsage,deletionBtn:this.ecpDeletionBtn,dataName:"erasureInfo",getTabs:()=>this.ecpInfoTabs,tabPosition:"used-by-pools",nameAttribute:"name",itemDescription:"erasure code profile",reloadFn:()=>this.reloadECPs(),deleteFn:e=>this.ecpService.delete(e),taskName:"ecp/delete"})}deletionModal({value:e,usage:t,deletionBtn:i,dataName:a,getTabs:o,tabPosition:s,nameAttribute:c,itemDescription:n,reloadFn:l,deleteFn:r,taskName:b}){if(!e)return;if(t)return i.toggle(),this.data[a]=!0,void setTimeout(()=>{const e=o();e&&e.select(s)},50);const d=e[c];this.modalService.show(y.a,{itemDescription:n,itemNames:[d],submitActionObservable:()=>{const e=r(d);return e.subscribe(()=>l()),this.taskWrapper.wrapTaskAroundCall({task:new T.a(b,{name:d}),call:e})}})}addCrushRule(){this.addModal(ee,e=>this.reloadCrushRules(e))}reloadCrushRules(e){this.reloadList({newItemName:e,getInfo:()=>this.poolService.getInfo(),initInfo:e=>{this.initInfo(e),this.poolTypeChange("replicated")},findNewItem:()=>this.info.crush_rules_replicated.find(t=>t.rule_name===e),controlName:"crushRule"})}deleteCrushRule(){this.deletionModal({value:this.form.getValue("crushRule"),usage:this.crushUsage,deletionBtn:this.crushDeletionBtn,dataName:"crushInfo",getTabs:()=>this.crushInfoTabs,tabPosition:"used-by-pools",nameAttribute:"rule_name",itemDescription:"crush rule",reloadFn:()=>this.reloadCrushRules(),deleteFn:e=>this.crushRuleService.delete(e),taskName:"crushRule/delete"})}crushRuleIsUsedBy(e){this.crushUsage=e?this.info.used_rules[e]:void 0}ecpIsUsedBy(e){this.ecpUsage=e?this.info.used_profiles[e]:void 0}submit(){if(this.form.invalid)return void this.form.setErrors({cdSubmitButton:!0});const e={pool:this.form.getValue("name")};this.assignFormFields(e,[{externalFieldName:"pool_type",formControlName:"poolType"},{externalFieldName:"pg_autoscale_mode",formControlName:"pgAutoscaleMode",editable:!0},{externalFieldName:"pg_num",formControlName:"pgNum",replaceFn:e=>"on"===this.form.getValue("pgAutoscaleMode")?1:e,editable:!0},this.isReplicated?{externalFieldName:"size",formControlName:"size"}:{externalFieldName:"erasure_code_profile",formControlName:"erasureProfile",attr:"name"},{externalFieldName:"rule_name",formControlName:"crushRule",replaceFn:e=>this.isReplicated?e&&e.rule_name:void 0},{externalFieldName:"quota_max_bytes",formControlName:"max_bytes",replaceFn:this.formatter.toBytes,editable:!0,resetValue:this.editing?0:void 0},{externalFieldName:"quota_max_objects",formControlName:"max_objects",editable:!0,resetValue:this.editing?0:void 0}]),this.info.is_all_bluestore&&(this.assignFormField(e,{externalFieldName:"flags",formControlName:"ecOverwrites",replaceFn:()=>this.isErasure?["ec_overwrites"]:void 0}),"none"!==this.form.getValue("mode")?this.assignFormFields(e,[{externalFieldName:"compression_mode",formControlName:"mode",editable:!0,replaceFn:e=>this.hasCompressionEnabled()&&e},{externalFieldName:"compression_algorithm",formControlName:"algorithm",editable:!0},{externalFieldName:"compression_min_blob_size",formControlName:"minBlobSize",replaceFn:this.formatter.toBytes,editable:!0,resetValue:0},{externalFieldName:"compression_max_blob_size",formControlName:"maxBlobSize",replaceFn:this.formatter.toBytes,editable:!0,resetValue:0},{externalFieldName:"compression_required_ratio",formControlName:"ratio",editable:!0,resetValue:0}]):this.editing&&this.assignFormFields(e,[{externalFieldName:"compression_mode",formControlName:"mode",editable:!0,replaceFn:()=>"unset"},{externalFieldName:"srcpool",formControlName:"name",editable:!0,replaceFn:()=>this.data.pool.pool_name}]));const t=this.data.applications.selected;(t.length>0||this.editing)&&(e.application_metadata=t),this.isReplicated&&!u.a.isEmpty(this.currentConfigurationValues)&&(e.configuration=this.currentConfigurationValues),this.triggerApiTask(e)}assignFormFields(e,t){t.forEach(t=>this.assignFormField(e,t))}assignFormField(e,{externalFieldName:t,formControlName:i,attr:a,replaceFn:o,editable:s,resetValue:c}){if(this.editing&&(!s||this.form.get(i).pristine))return;const n=this.form.getValue(i);let l=o?o(n):a?u.a.get(n,a):n;if(!n||!l){if(!s||u.a.isUndefined(c))return;l=c}e[t]=l}triggerApiTask(e){this.taskWrapper.wrapTaskAroundCall({task:new T.a("pool/"+(this.editing?n.e.EDIT:n.e.CREATE),{pool_name:e.hasOwnProperty("srcpool")?e.srcpool:e.pool}),call:this.poolService[this.editing?n.e.UPDATE:n.e.CREATE](e)}).subscribe({error:e=>{u.a.isObject(e.error)&&"34"===e.error.code&&this.form.get("pgNum").setErrors({34:!0}),this.form.setErrors({cdSubmitButton:!0})},complete:()=>this.router.navigate(["/pool"])})}appSelection(){this.form.get("name").updateValueAndValidity({emitEvent:!1,onlySelf:!0})}}return e.\u0275fac=function(t){return new(t||e)(m.Mb(w.a),m.Mb(s.a),m.Mb(s.e),m.Mb(E.a),m.Mb(R.a),m.Mb($.a),m.Mb(D.a),m.Mb(k.a),m.Mb(S),m.Mb(h.a),m.Mb(n.b))},e.\u0275cmp=m.Gb({type:e,selectors:[["cd-pool-form"]],viewQuery:function(e,t){var i;1&e&&(m.Tc(it,!0),m.Tc(at,!0),m.Tc(ot,!0),m.Tc(st,!0)),2&e&&(m.zc(i=m.hc())&&(t.crushInfoTabs=i.first),m.zc(i=m.hc())&&(t.crushDeletionBtn=i.first),m.zc(i=m.hc())&&(t.ecpInfoTabs=i.first),m.zc(i=m.hc())&&(t.ecpDeletionBtn=i.first))},features:[m.vb],decls:1,vars:1,consts:function(){return[["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],["name","form","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"card"],[1,"card-header"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"card-body"],[1,"form-group","row"],["for","name",1,"cd-col-form-label","required"],"Name",[1,"cd-col-form-input"],["id","name","name","name","type","text","formControlName","name","autofocus","",1,"form-control",6,"placeholder"],["placeholder","Name..."],["class","invalid-feedback",4,"ngIf"],["for","poolType",1,"cd-col-form-label","required"],"Pool type",["id","poolType","formControlName","poolType","name","poolType",1,"form-control","custom-select"],["ngValue",""],"-- Select a pool type --",[3,"value",4,"ngFor","ngForOf"],[4,"ngIf"],["for","applications",1,"cd-col-form-label"],"Applications",["id","applications",3,"customBadges","customBadgeValidators","messages","data","options","selectionLimit","selection"],["formGroupName","compression",4,"ngIf"],"Quotas",["for","max_bytes",1,"cd-col-form-label"],"Max bytes","Leave it blank or specify 0 to disable this quota.","A valid quota should be greater than 0.",["id","max_bytes","name","max_bytes","type","text","formControlName","max_bytes","defaultUnit","GiB","cdDimlessBinary","",1,"form-control",6,"placeholder"],["placeholder","e.g., 10GiB"],["for","max_objects",1,"cd-col-form-label"],"Max objects","Leave it blank or specify 0 to disable this quota.","A valid quota should be greater than 0.",["id","max_objects","min","0","name","max_objects","type","number","formControlName","max_objects",1,"form-control"],[3,"hidden"],[3,"form","initializeData","changes"],[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required!","The chosen Ceph pool name is already in use.","It's not possible to create an RBD pool with '/' in the name. Please change the name or remove 'rbd' from the applications list.","Pool name can only contain letters, numbers, '.', '-', '_' or '/'.",[3,"value"],"This field is required!",["for","pgAutoscaleMode",1,"cd-col-form-label"],"PG Autoscale",["id","pgAutoscaleMode","name","pgAutoscaleMode","formControlName","pgAutoscaleMode",1,"form-control","custom-select"],["class","form-group row",4,"ngIf"],["for","pgNum",1,"cd-col-form-label","required"],"Placement groups",["id","pgNum","name","pgNum","formControlName","pgNum","min","1","type","number","required","",1,"form-control",3,"focus","blur"],[1,"form-text","text-muted"],["section","pgs",6,"docText"],["docText","Calculation help"],["class","form-text text-muted",4,"ngIf"],"This field is required!","At least one placement group is needed!","Your cluster can't handle this many PGs. Please recalculate the PG amount needed.","The current PGs settings were calculated for you, you should make sure the values suit your needs before submit.",["for","size",1,"cd-col-form-label","required"],"Replicated size",["id","size","name","size","type","number","formControlName","size",1,"form-control",3,"max","min"],["class","text-warning-dark",4,"ngIf"],[1,"list-inline"],"Minimum: " + "\ufffd0\ufffd" + "","Maximum: " + "\ufffd0\ufffd" + "","The size specified is out of range. A value from " + "\ufffd0\ufffd" + " to " + "\ufffd1\ufffd" + " is usable.",[1,"text-warning-dark"],"A size of 1 will not create a replication of the object. The 'Replicated size' includes the object itself.",[1,"cd-col-form-label"],"Flags",[1,"custom-control","custom-checkbox"],["type","checkbox","id","ec-overwrites","formControlName","ecOverwrites",1,"custom-control-input"],["for","ec-overwrites",1,"custom-control-label"],"EC Overwrites","CRUSH",["for","erasureProfile",1,"cd-col-form-label"],"Erasure code profile",[1,"input-group"],["id","erasureProfile","name","erasureProfile","formControlName","erasureProfile",1,"form-control","custom-select"],["ngValue","",4,"ngIf"],[3,"ngValue",4,"ngIf"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"input-group-append"],["id","ecp-info-button","type","button",1,"btn","btn-light",3,"ngClass","click"],["aria-hidden","true",3,"ngClass"],["class","btn btn-light","type","button",3,"click",4,"ngIf"],["class","btn btn-light","type","button","triggers","manual",3,"click",4,"ngIf",6,"ngbTooltip"],["class","form-text text-muted","id","ecp-info-block",4,"ngIf"],"Loading...",[3,"ngValue"],"-- No erasure code profile available --","-- Select an erasure code profile --",["type","button",1,"btn","btn-light",3,"click"],["type","button","triggers","manual",1,"btn","btn-light",3,"click",6,"ngbTooltip"],["ecpDeletionBtn","ngbTooltip"],["ngbTooltip","This profile can't be deleted as it is in use."],["id","ecp-info-block",1,"form-text","text-muted"],["ngbNav","",1,"nav-tabs"],["ecpInfoTabs","ngbNav"],["ngbNavItem","ecp-info"],["ngbNavLink",""],"Profile",["ngbNavContent",""],["ngbNavItem","used-by-pools"],"Used by pools",[3,"ngbNavOutlet"],[3,"renderObjects","hideKeys","data","autoReload"],["ecpIsNotUsed",""],[4,"ngIf","ngIfElse"],"Profile is not in use.",[4,"ngFor","ngForOf"],["for","crushRule",1,"cd-col-form-label"],"Crush ruleset","A new crush ruleset will be implicitly created.","Crush ruleset",["noRules",""],"There are no rules.",["id","crushRule","formControlName","crushRule","name","crushSet",1,"form-control","custom-select"],"-- Select a crush rule --",["id","crush-info-button","type","button",1,"btn","btn-light",3,"ngClass","click",6,"ngbTooltip"],["ngbTooltip","Placement and\n replication strategies or distribution policies that allow to\n specify how CRUSH places data replicas."],["class","form-text text-muted","id","crush-info-block",4,"ngIf"],["crushDeletionBtn","ngbTooltip"],["ngbTooltip","This rule can't be deleted as it is in use."],["id","crush-info-block",1,"form-text","text-muted"],["crushInfoTabs","ngbNav"],["ngbNavItem","crush-rule-info"],"Crush rule",["ngbNavItem","crush-rule-steps"],"Crush steps","Used by pools",["ruleIsNotUsed",""],"Rule is not in use.","This field is required!","The rule can't be used in the current cluster as it has too few OSDs to meet the minimum required OSD by this rule.",["formGroupName","compression"],"Compression",["for","mode",1,"cd-col-form-label"],"Mode",["id","mode","name","mode","formControlName","mode",1,"form-control","custom-select"],["for","algorithm",1,"cd-col-form-label"],"Algorithm",["id","algorithm","name","algorithm","formControlName","algorithm",1,"form-control","custom-select"],["for","minBlobSize",1,"cd-col-form-label"],"Minimum blob size",["id","minBlobSize","name","minBlobSize","formControlName","minBlobSize","type","text","min","0","defaultUnit","KiB","cdDimlessBinary","",1,"form-control",6,"placeholder"],["placeholder","e.g., 128KiB"],["for","maxBlobSize",1,"cd-col-form-label"],"Maximum blob size",["id","maxBlobSize","type","text","min","0","formControlName","maxBlobSize","defaultUnit","KiB","cdDimlessBinary","",1,"form-control",6,"placeholder"],["placeholder","e.g., 512KiB"],["for","ratio",1,"cd-col-form-label"],"Ratio",["id","ratio","name","ratio","formControlName","ratio","type","number","min","0","max","1","step","0.1",1,"form-control",6,"placeholder"],["placeholder","Compression ratio"],"Loading...","-- No erasure compression algorithm available --","Value should be greater than 0","Value should be less than the maximum blob size","Value should be greater than 0","Value should be greater than the minimum blob size","Value should be between 0.0 and 1.0","The value should be greater or equal to 0"]},template:function(e,t){1&e&&m.Mc(0,gi,71,32,"div",0),2&e&&m.pc("cdFormLoading",t.loading)},directives:[Ye.a,o.C,o.r,A.a,o.k,O.a,V.a,o.d,W.a,o.q,o.i,F.a,a.r,o.z,o.u,o.B,a.q,Xe.a,L.a,He.a,o.v,Ze.a,q.a,o.y,et.a,o.b,a.p,c.D,c.p,c.r,c.s,c.q,c.u,tt.a,o.l],pipes:[a.A,B.a],styles:[""]}),e})();var Ri=i("5+tZ"),vi=i("d+Og"),yi=i("MuvH"),zi=i("+fVR"),Ci=i("VxPD"),Ii=i("uIqm"),Ni=i("x38r"),_i=i("yJti"),Mi=i("vCyI"),Ti=i("o4+5"),wi=i("VTlA"),$i=i("EgGo");class Di{constructor(e){this.pool_name=e}}var Ei=i("S7zO"),ki=i("nQ07"),Pi=(i("jKX/"),i("JP8w")),xi=i("insk"),Ai=i("aAWM");function Oi(e,t){if(1&e&&m.Nb(0,"cd-table-key-value",12),2&e){const e=m.ic(2);m.pc("renderObjects",!0)("data",e.poolDetails)("autoReload",!1)}}function Vi(e,t){if(1&e&&m.Nb(0,"cd-grafana",15),2&e){const e=m.ic(3);m.rc("grafanaPath","ceph-pool-detail?var-pool_name=",e.selection.pool_name,"")}}function Wi(e,t){1&e&&(m.Sb(0,"li",13),m.Sb(1,"a",5),m.Wb(2,14),m.Rb(),m.Mc(3,Vi,1,1,"ng-template",7),m.Rb())}function Fi(e,t){if(1&e&&m.Nb(0,"cd-rbd-configuration-table",18),2&e){const e=m.ic(3);m.pc("data",e.selectedPoolConfiguration)}}function Li(e,t){1&e&&(m.Sb(0,"li",16),m.Sb(1,"a",5),m.Wb(2,17),m.Rb(),m.Mc(3,Fi,1,1,"ng-template",7),m.Rb())}function qi(e,t){if(1&e&&m.Nb(0,"cd-table",21),2&e){const e=m.ic(3);m.pc("data",e.cacheTiers)("columns",e.cacheTierColumns)("autoSave",!1)}}function Bi(e,t){1&e&&(m.Sb(0,"li",19),m.Sb(1,"a",5),m.Wb(2,20),m.Rb(),m.Mc(3,qi,1,3,"ng-template",7),m.Rb())}function Ui(e,t){if(1&e&&(m.Qb(0,1),m.Sb(1,"ul",2,3),m.Sb(3,"li",4),m.Sb(4,"a",5),m.Wb(5,6),m.Rb(),m.Mc(6,Oi,1,3,"ng-template",7),m.Rb(),m.Mc(7,Wi,4,0,"li",8),m.Mc(8,Li,4,0,"li",9),m.Mc(9,Bi,4,0,"li",10),m.Rb(),m.Nb(10,"div",11),m.Pb()),2&e){const e=m.Ac(2),t=m.ic();m.yb(7),m.pc("ngIf",t.permissions.grafana.read),m.yb(1),m.pc("ngIf","replicated"===t.selection.type),m.yb(1),m.pc("ngIf",(null==t.selection.tiers?null:t.selection.tiers.length)>0),m.yb(1),m.pc("ngbNavOutlet",e)}}let Gi=(()=>{class e{constructor(e){this.poolService=e,this.cacheTierColumns=[],this.omittedPoolAttributes=["cdExecuting","cdIsBinary","stats"],this.cacheTierColumns=[{prop:"pool_name",name:"Name",flexGrow:3},{prop:"cache_mode",name:"Cache Mode",flexGrow:2},{prop:"cache_min_evict_age",name:"Min Evict Age",flexGrow:2},{prop:"cache_min_flush_age",name:"Min Flush Age",flexGrow:2},{prop:"target_max_bytes",name:"Target Max Bytes",flexGrow:2},{prop:"target_max_objects",name:"Target Max Objects",flexGrow:2}]}ngOnChanges(){this.selection&&(this.poolService.getConfiguration(this.selection.pool_name).subscribe(e=>{ki.a.updateChanged(this,{selectedPoolConfiguration:e})}),ki.a.updateChanged(this,{poolDetails:u.a.omit(this.selection,this.omittedPoolAttributes)}))}}return e.\u0275fac=function(t){return new(t||e)(m.Mb(R.a))},e.\u0275cmp=m.Gb({type:e,selectors:[["cd-pool-details"]],inputs:{cacheTiers:"cacheTiers",permissions:"permissions",selection:"selection"},features:[m.wb],decls:1,vars:1,consts:function(){return[["cdTableDetail","",4,"ngIf"],["cdTableDetail",""],["ngbNav","","cdStatefulTab","pool-details",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem","details"],["ngbNavLink",""],"Details",["ngbNavContent",""],["ngbNavItem","performance-details",4,"ngIf"],["ngbNavItem","configuration",4,"ngIf"],["ngbNavItem","cache-tiers-details",4,"ngIf"],[3,"ngbNavOutlet"],[3,"renderObjects","data","autoReload"],["ngbNavItem","performance-details"],"Performance Details",["uid","-xyV8KCiz","grafanaStyle","three",3,"grafanaPath"],["ngbNavItem","configuration"],"Configuration",[3,"data"],["ngbNavItem","cache-tiers-details"],"Cache Tiers Details",["columnMode","flex",3,"data","columns","autoSave"]]},template:function(e,t){1&e&&m.Mc(0,Ui,11,4,"ng-container",0),2&e&&m.pc("ngIf",t.selection)},directives:[a.r,c.p,Pi.a,c.r,c.s,c.q,c.u,tt.a,xi.a,Ai.a,Ii.a],styles:[""],changeDetection:0}),e})();var ji=i("GgAd");const Qi=["poolUsageTpl"],Ji=["poolConfigurationSourceTpl"];function Ki(e,t){if(1&e){const e=m.Tb();m.Sb(0,"cd-table",9,10),m.gc("fetchData",(function(){return m.Dc(e),m.ic().taskListService.fetch()}))("setExpandedRow",(function(t){return m.Dc(e),m.ic().setExpandedRow(t)}))("updateSelection",(function(t){return m.Dc(e),m.ic().updateSelection(t)})),m.Nb(2,"cd-table-actions",11),m.Nb(3,"cd-pool-details",12),m.Rb()}if(2&e){const e=m.ic();m.pc("data",e.pools)("columns",e.columns)("hasDetails",!0)("status",e.tableStatus)("autoReload",-1),m.yb(2),m.pc("permission",e.permissions.pool)("selection",e.selection)("tableActions",e.tableActions),m.yb(1),m.pc("selection",e.expandedRow)("permissions",e.permissions)("cacheTiers",e.cacheTiers)}}function Yi(e,t){1&e&&m.Nb(0,"cd-grafana",14),2&e&&m.pc("grafanaPath","ceph-pools-overview?")}function Xi(e,t){1&e&&(m.Sb(0,"li",2),m.Sb(1,"a",3),m.Wb(2,13),m.Rb(),m.Mc(3,Yi,1,1,"ng-template",5),m.Rb())}function Hi(e,t){if(1&e&&m.Nb(0,"cd-usage-bar",16),2&e){const e=m.ic().row;m.pc("total",e.stats.bytes_used.latest+e.stats.avail_raw.latest)("used",e.stats.bytes_used.latest)}}function Zi(e,t){if(1&e&&m.Mc(0,Hi,1,2,"cd-usage-bar",15),2&e){const e=t.row;m.pc("ngIf",null==e.stats||null==e.stats.avail_raw?null:e.stats.avail_raw.latest)}}let ea=(()=>{class e extends zi.a{constructor(e,t,i,a,o,s,c,n,l,r,b){super(),this.poolService=e,this.taskWrapper=t,this.ecpService=i,this.authStorageService=a,this.taskListService=o,this.modalService=s,this.pgCategoryService=c,this.dimlessPipe=n,this.urlBuilder=l,this.configurationService=r,this.actionLabels=b,this.selection=new Mi.a,this.executingTasks=[],this.tableStatus=new Ci.a,this.cacheTiers=[],this.monAllowPoolDelete=!1,this.permissions=this.authStorageService.getPermissions(),this.tableActions=[{permission:"create",icon:C.a.add,routerLink:()=>this.urlBuilder.getCreate(),name:this.actionLabels.CREATE},{permission:"update",icon:C.a.edit,routerLink:()=>this.urlBuilder.getEdit(encodeURIComponent(this.selection.first().pool_name)),name:this.actionLabels.EDIT},{permission:"delete",icon:C.a.destroy,click:()=>this.deletePoolModal(),name:this.actionLabels.DELETE,disable:this.getDisableDesc.bind(this)}],this.permissions.configOpt.read&&this.configurationService.get("mon_allow_pool_delete").subscribe(e=>{if(u.a.has(e,"value")){const t=u.a.find(e.value,e=>"mon"===e.section)||{value:!1};this.monAllowPoolDelete="true"===t.value}})}ngOnInit(){const e=(e,t,i)=>u.a.get(t,e)>u.a.get(i,e)?1:-1;this.columns=[{prop:"pool_name",name:"Name",flexGrow:4,cellTransformation:Ni.a.executing},{prop:"data_protection",name:"Data Protection",cellTransformation:Ni.a.badge,customTemplateConfig:{class:"badge-background-gray"},flexGrow:1.3},{prop:"application_metadata",name:"Applications",cellTransformation:Ni.a.badge,customTemplateConfig:{class:"badge-background-primary"},flexGrow:1.5},{prop:"pg_status",name:"PG Status",flexGrow:1.2,cellClass:({row:e,column:t,value:i})=>this.getPgStatusCellClass(e,t,i)},{prop:"crush_rule",name:"Crush Ruleset",isHidden:!0,flexGrow:2},{name:"Usage",prop:"usage",cellTemplate:this.poolUsageTpl,flexGrow:1.2},{prop:"stats.rd_bytes.rates",name:"Read bytes",comparator:(t,i,a,o)=>e("stats.rd_bytes.latest",a,o),cellTransformation:Ni.a.sparkline,flexGrow:1.5},{prop:"stats.wr_bytes.rates",name:"Write bytes",comparator:(t,i,a,o)=>e("stats.wr_bytes.latest",a,o),cellTransformation:Ni.a.sparkline,flexGrow:1.5},{prop:"stats.rd.rate",name:"Read ops",flexGrow:1,pipe:this.dimlessPipe,cellTransformation:Ni.a.perSecond},{prop:"stats.wr.rate",name:"Write ops",flexGrow:1,pipe:this.dimlessPipe,cellTransformation:Ni.a.perSecond}],this.taskListService.init(()=>this.ecpService.list().pipe(Object(Ri.a)(e=>(this.ecProfileList=e,this.poolService.getList()))),void 0,e=>{this.pools=this.transformPoolsData(e),this.tableStatus=new Ci.a},()=>{this.table.reset(),this.tableStatus=new Ci.a(_i.a.ValueException)},e=>e.name.startsWith("pool/"),(e,t)=>t.metadata.pool_name===e.pool_name,{default:e=>new Di(e.pool_name)})}updateSelection(e){this.selection=e}deletePoolModal(){const e=this.selection.first().pool_name;this.modalService.show(y.a,{itemDescription:"Pool",itemNames:[e],submitActionObservable:()=>this.taskWrapper.wrapTaskAroundCall({task:new T.a("pool/"+n.e.DELETE,{pool_name:e}),call:this.poolService.delete(e)})})}getPgStatusCellClass(e,t,i){return{"text-right":!0,["pg-"+this.pgCategoryService.getTypeByStates(i)]:!0}}getErasureCodeProfile(e){let t="";return u.a.forEach(this.ecProfileList,i=>{i.name===e&&(t=`EC: ${i.k}+${i.m}`)}),t}transformPoolsData(e){const t=["bytes_used","max_avail","avail_raw","percent_used","rd_bytes","wr_bytes","rd","wr"],i={latest:0,rate:0,rates:[]};return u.a.forEach(e,e=>{e.pg_status=this.transformPgStatus(e.pg_status);const a={};u.a.forEach(t,t=>{a[t]=e.stats&&e.stats[t]?e.stats[t]:i}),e.stats=a,e.usage=a.percent_used.latest,e.cdExecuting||e.pg_num+e.pg_placement_num===e.pg_num_target+e.pg_placement_num_target||(e.cdExecuting="Updating"),["rd_bytes","wr_bytes"].forEach(t=>{e.stats[t].rates=e.stats[t].rates.map(e=>e[1])}),e.cdIsBinary=!0,"erasure"===e.type&&(e.data_protection=this.getErasureCodeProfile(e.erasure_code_profile)),"replicated"===e.type&&(e.data_protection="replica: \xd7"+e.size)}),e}transformPgStatus(e){const t=[];return u.a.forEach(e,(e,i)=>{t.push(`${e} ${i}`)}),t.join(", ")}getSelectionTiers(){if(void 0!==this.expandedRow){const e=this.expandedRow.tiers;this.cacheTiers=this.pools.filter(t=>e.includes(t.pool))}}getDisableDesc(){var e;return!(null===(e=this.selection)||void 0===e?void 0:e.hasSelection)||!this.monAllowPoolDelete&&"Pool deletion is disabled by the mon_allow_pool_delete configuration setting."}setExpandedRow(e){super.setExpandedRow(e),this.getSelectionTiers()}}return e.\u0275fac=function(t){return new(t||e)(m.Mb(R.a),m.Mb(k.a),m.Mb(S),m.Mb($.a),m.Mb(wi.a),m.Mb(E.a),m.Mb(vi.a),m.Mb(Ti.a),m.Mb($i.a),m.Mb(yi.a),m.Mb(n.b))},e.\u0275cmp=m.Gb({type:e,selectors:[["cd-pool-list"]],viewQuery:function(e,t){var i;1&e&&(m.Tc(Ii.a,!0),m.Jc(Qi,!0),m.Tc(Ji,!0)),2&e&&(m.zc(i=m.hc())&&(t.table=i.first),m.zc(i=m.hc())&&(t.poolUsageTpl=i.first),m.zc(i=m.hc())&&(t.poolConfigurationSourceTpl=i.first))},features:[m.xb([wi.a,{provide:$i.a,useValue:new $i.a("pool")}]),m.vb],decls:10,vars:2,consts:function(){return[["ngbNav","",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem",""],["ngbNavLink",""],"Pools List",["ngbNavContent",""],["ngbNavItem","",4,"ngIf"],[3,"ngbNavOutlet"],["poolUsageTpl",""],["id","pool-list","selectionType","single",3,"data","columns","hasDetails","status","autoReload","fetchData","setExpandedRow","updateSelection"],["table",""],["id","pool-list-actions",1,"table-actions",3,"permission","selection","tableActions"],["cdTableDetail","","id","pool-list-details",3,"selection","permissions","cacheTiers"],"Overall Performance",["uid","z99hzWtmk","grafanaStyle","two",3,"grafanaPath"],["decimals","2",3,"total","used",4,"ngIf"],["decimals","2",3,"total","used"]]},template:function(e,t){if(1&e&&(m.Sb(0,"ul",0,1),m.Sb(2,"li",2),m.Sb(3,"a",3),m.Wb(4,4),m.Rb(),m.Mc(5,Ki,4,11,"ng-template",5),m.Rb(),m.Mc(6,Xi,4,0,"li",6),m.Rb(),m.Nb(7,"div",7),m.Mc(8,Zi,1,1,"ng-template",null,8,m.Nc)),2&e){const e=m.Ac(1);m.yb(6),m.pc("ngIf",t.permissions.grafana.read),m.yb(1),m.pc("ngbNavOutlet",e)}},directives:[c.p,c.r,c.s,c.q,a.r,c.u,Ii.a,Ei.a,Gi,xi.a,ji.a],styles:["cd-pool-list .pg-clean{color:#0b0} cd-pool-list .pg-working{color:#2b99a8} cd-pool-list .pg-warning{color:#ffc200} cd-pool-list .pg-unknown{color:#ef5c55}"]}),e})(),ta=(()=>{class e{}return e.\u0275mod=m.Kb({type:e}),e.\u0275inj=m.Jb({factory:function(t){return new(t||e)},imports:[[b.a,a.c,c.t,l.a,s.i,o.x,c.F,r.BlockModule]]}),e})();const ia=[{path:"",component:ea},{path:n.e.CREATE,component:Si,data:{breadcrumbs:n.a.CREATE}},{path:n.e.EDIT+"/:name",component:Si,data:{breadcrumbs:n.a.EDIT}}];let aa=(()=>{class e{}return e.\u0275mod=m.Kb({type:e}),e.\u0275inj=m.Jb({factory:function(t){return new(t||e)},imports:[[ta,s.i.forChild(ia)]]}),e})()}}]);
\ No newline at end of file
+++ /dev/null
-(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{"5azF":function(e,t,i){"use strict";i.r(t),i.d(t,"PoolModule",(function(){return ta})),i.d(t,"RoutedPoolModule",(function(){return aa}));var a=i("SVse"),o=i("s7LF"),s=i("iInd"),c=i("G0yt"),n=i("sne2"),l=i("PCNd"),r=i("k/xb"),b=i("kJI8"),d=i("LvDl"),u=i.n(d),f=i("jtHE"),p=i("WE5d"),h=i("8Y7J"),m=i("IheW");let g=(()=>{class e{constructor(e){this.http=e,this.apiPath="api/crush_rule",this.formTooltips={root:"The name of the node under which data should be placed.",failure_domain:"The type of CRUSH nodes across which we should separate replicas.",device_class:"The device class data should be placed on."}}create(e){return this.http.post(this.apiPath,e,{observe:"response"})}delete(e){return this.http.delete(`${this.apiPath}/${e}`,{observe:"response"})}getInfo(){return this.http.get(`ui-${this.apiPath}/info`)}}return e.\u0275fac=function(t){return new(t||e)(h.dc(m.b))},e.\u0275prov=h.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),S=(()=>{class e{constructor(e){this.http=e,this.apiPath="api/erasure_code_profile",this.formTooltips={k:"Each object is split in data-chunks parts, each stored on a different OSD.",m:"Compute coding chunks for each object and store them on different OSDs.\n The number of coding chunks is also the number of OSDs that can be down without losing data.",plugins:{jerasure:{description:"The jerasure plugin is the most generic and flexible plugin,\n it is also the default for Ceph erasure coded pools.",technique:"The more flexible technique is reed_sol_van : it is enough to set k\n and m. The cauchy_good technique can be faster but you need to chose the packetsize\n carefully. All of reed_sol_r6_op, liberation, blaum_roth, liber8tion are RAID6 equivalents\n in the sense that they can only be configured with m=2.",packetSize:"The encoding will be done on packets of bytes size at a time.\n Choosing the right packet size is difficult.\n The jerasure documentation contains extensive information on this topic."},lrc:{description:"With the jerasure plugin, when an erasure coded object is stored on\n multiple OSDs, recovering from the loss of one OSD requires reading from all the others.\n For instance if jerasure is configured with k=8 and m=4, losing one OSD requires reading\n from the eleven others to repair.\n\n The lrc erasure code plugin creates local parity chunks to be able to recover using\n less OSDs. For instance if lrc is configured with k=8, m=4 and l=4, it will create\n an additional parity chunk for every four OSDs. When a single OSD is lost, it can be\n recovered with only four OSDs instead of eleven.",l:"Group the coding and data chunks into sets of size locality. For instance,\n for k=4 and m=2, when locality=3 two groups of three are created. Each set can\n be recovered without reading chunks from another set.",crushLocality:"The type of the crush bucket in which each set of chunks defined\n by l will be stored. For instance, if it is set to rack, each group of l chunks will be\n placed in a different rack. It is used to create a CRUSH rule step such as step choose\n rack. If it is not set, no such grouping is done."},isa:{description:"The isa plugin encapsulates the ISA library. It only runs on Intel processors.",technique:"The ISA plugin comes in two Reed Solomon forms.\n If reed_sol_van is set, it is Vandermonde, if cauchy is set, it is Cauchy."},shec:{description:"The shec plugin encapsulates the multiple SHEC library.\n It allows ceph to recover data more efficiently than Reed Solomon codes.",c:"The number of parity chunks each of which includes each data chunk in its\n calculation range. The number is used as a durability estimator. For instance, if c=2,\n 2 OSDs can be down without losing data."},clay:{description:"CLAY (short for coupled-layer) codes are erasure codes designed to\n bring about significant savings in terms of network bandwidth and disk IO when a failed\n node/OSD/rack is being repaired.",d:"Number of OSDs requested to send data during recovery of a single chunk.\n d needs to be chosen such that k+1 <= d <= k+m-1. The larger the d, the better\n the savings.",scalar_mds:"scalar_mds specifies the plugin that is used as a building block\n in the layered construction. It can be one of jerasure, isa, shec.",technique:"technique specifies the technique that will be picked\n within the 'scalar_mds' plugin specified. Supported techniques\n are 'reed_sol_van', 'reed_sol_r6_op', 'cauchy_orig',\n 'cauchy_good', 'liber8tion' for jerasure, 'reed_sol_van',\n 'cauchy' for isa and 'single', 'multiple' for shec."}},crushRoot:"The name of the crush bucket used for the first step of the CRUSH rule.\n For instance step take default.",crushFailureDomain:"Ensure that no two chunks are in a bucket with the same failure\n domain. For instance, if the failure domain is host no two chunks will be stored on the same\n host. It is used to create a CRUSH rule step such as step chooseleaf host.",crushDeviceClass:"Restrict placement to devices of a specific class\n (e.g., ssd or hdd), using the crush device class names in the CRUSH map.",directory:"Set the directory name from which the erasure code plugin is loaded."}}list(){return this.http.get(this.apiPath)}create(e){return this.http.post(this.apiPath,e,{observe:"response"})}delete(e){return this.http.delete(`${this.apiPath}/${e}`,{observe:"response"})}getInfo(){return this.http.get(`ui-${this.apiPath}/info`)}}return e.\u0275fac=function(t){return new(t||e)(h.dc(m.b))},e.\u0275prov=h.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var v=i("Ekvf");class R{constructor(){this.nodes=[],this.idTree={},this.allDevices=[],this.buckets=[],this.failureDomains={},this.failureDomainKeys=[],this.devices=[],this.deviceCount=0}static searchFailureDomains(e,t){return this.getFailureDomains(this.search(e,t))}static search(e,t){const[i,a]=t.split("~"),o=e.find(e=>["name","id","type"].some(t=>e[t]===i));return o?(e=this.getSubNodes(o,this.createIdTreeFromNodes(e)),a&&(e=this.filterNodesByDeviceType(e,a)),e):[]}static createIdTreeFromNodes(e){const t={};return e.forEach(e=>{t[e.id]=e}),t}static getSubNodes(e,t){let i=[e];return e.children?(e.children.forEach(e=>{i=i.concat(this.getSubNodes(t[e],t))}),i):i}static filterNodesByDeviceType(e,t){let i,a=e.filter(e=>e.device_class&&e.device_class!==t).map(e=>e.id),o=a;do{i=!1,e=e.filter(e=>!a.includes(e.id));const t=[];e.forEach(e=>{e.children&&e.children.every(e=>a.includes(e))&&(t.push(e.id),i=!0)}),i&&(a=t,o=o.concat(t))}while(i);return(e=u.a.cloneDeep(e)).map(e=>e.children?(e.children=e.children.filter(e=>!o.includes(e)),e):e)}static getFailureDomains(e){const t={};return e.forEach(e=>{const i=e.type;t[i]||(t[i]=[]),t[i].push(e)}),t}initCrushNodeSelection(e,t,i,a){this.nodes=e,this.idTree=R.createIdTreeFromNodes(e),e.forEach(e=>{this.idTree[e.id]=e}),this.buckets=u.a.sortBy(e.filter(e=>e.children),"name"),this.controls={root:t,failure:i,device:a},this.preSelectRoot(),this.controls.root.valueChanges.subscribe(()=>this.onRootChange()),this.controls.failure.valueChanges.subscribe(()=>this.onFailureDomainChange()),this.controls.device.valueChanges.subscribe(()=>this.onDeviceChange())}preSelectRoot(){const e=this.nodes.find(e=>"root"===e.type);this.silentSet(this.controls.root,e),this.onRootChange()}silentSet(e,t){e.setValue(t,{emitEvent:!1})}onRootChange(){const e=R.getSubNodes(this.controls.root.value,this.idTree),t=R.getFailureDomains(e);Object.keys(t).forEach(e=>{t[e].length<=1&&delete t[e]}),this.failureDomains=t,this.failureDomainKeys=Object.keys(t).sort(),this.updateFailureDomain()}updateFailureDomain(){let e=this.getIncludedCustomValue(this.controls.failure,Object.keys(this.failureDomains));""===e&&(e=this.setMostCommonDomain(this.controls.failure)),this.updateDevices(e)}getIncludedCustomValue(e,t){return e.dirty&&t.includes(e.value)?e.value:""}setMostCommonDomain(e){let t={n:0,type:""};return Object.keys(this.failureDomains).forEach(e=>{const i=this.failureDomains[e].length;t.n<i&&(t={n:i,type:e})}),this.silentSet(e,t.type),t.type}onFailureDomainChange(){this.updateDevices()}updateDevices(e=this.controls.failure.value){const t=u.a.flatten(this.failureDomains[e].map(e=>R.getSubNodes(e,this.idTree)));this.allDevices=t.filter(e=>e.device_class).map(e=>e.device_class),this.devices=u.a.uniq(this.allDevices).sort();const i=1===this.devices.length?this.devices[0]:this.getIncludedCustomValue(this.controls.device,this.devices);this.silentSet(this.controls.device,i),this.onDeviceChange(i)}onDeviceChange(e=this.controls.device.value){this.deviceCount=""===e?this.allDevices.length:this.allDevices.filter(t=>t===e).length}}var y=i("0+/T"),z=i("a96k"),C=i("oxzT"),I=i("spCT"),N=i("QFaf"),_=i("1Ni5"),M=i("PhyI"),T=i("kvvV"),$=i("Fgil"),w=i("aexS"),D=i("aXbf"),E=i("JK/P"),k=i("kn/O"),P=i("2EZI"),x=i("ajRT"),A=i("NwgZ"),O=i("ocLN"),V=i("ANnk"),W=i("f69J"),F=i("IZUe"),L=i("p4Cf"),q=i("6+kj"),B=i("8xTl");function U(e,t){1&e&&(h.Sb(0,"span",30),h.Wb(1,31),h.Rb())}function G(e,t){1&e&&(h.Sb(0,"span",30),h.Wb(1,32),h.Rb())}function j(e,t){1&e&&(h.Sb(0,"span",30),h.Wb(1,33),h.Rb())}function Q(e,t){1&e&&(h.Sb(0,"option",26),h.Wb(1,34),h.Rb())}function J(e,t){if(1&e&&(h.Sb(0,"option",35),h.Oc(1),h.Rb()),2&e){const e=t.$implicit;h.pc("ngValue",e),h.yb(1),h.Qc(" ",e.name," ")}}function K(e,t){1&e&&(h.Sb(0,"span",30),h.Wb(1,36),h.Rb())}function Y(e,t){1&e&&(h.Sb(0,"option",26),h.Wb(1,37),h.Rb())}function H(e,t){if(1&e&&(h.Sb(0,"option",35),h.Oc(1),h.Rb()),2&e){const e=t.$implicit,i=h.ic();h.pc("ngValue",e),h.yb(1),h.Rc(" ",e," ( ",i.failureDomains[e].length," ) ")}}function X(e,t){1&e&&(h.Sb(0,"span",30),h.Wb(1,38),h.Rb())}function Z(e,t){if(1&e&&(h.Sb(0,"option",35),h.Oc(1),h.Rb()),2&e){const e=t.$implicit;h.pc("ngValue",e),h.yb(1),h.Qc(" ",e," ")}}let ee=(()=>{class e extends R{constructor(e,t,i,a,o){super(),this.formBuilder=e,this.activeModal=t,this.taskWrapper=i,this.crushRuleService=a,this.actionLabels=o,this.submitAction=new h.o,this.tooltips=this.crushRuleService.formTooltips,this.action=this.actionLabels.CREATE,this.resource="Crush Rule",this.createForm()}createForm(){this.form=this.formBuilder.group({name:["",[o.A.required,o.A.pattern("[A-Za-z0-9_-]+"),_.a.custom("uniqueName",e=>this.names&&-1!==this.names.indexOf(e))]],root:null,failure_domain:"",device_class:""})}ngOnInit(){this.crushRuleService.getInfo().subscribe(({names:e,nodes:t})=>{this.initCrushNodeSelection(t,this.form.get("root"),this.form.get("failure_domain"),this.form.get("device_class")),this.names=e})}onSubmit(){if(this.form.invalid)return void this.form.setErrors({cdSubmitButton:!0});const e=u.a.cloneDeep(this.form.value);e.root=e.root.name,""===e.device_class&&delete e.device_class,this.taskWrapper.wrapTaskAroundCall({task:new T.a("crushRule/create",e),call:this.crushRuleService.create(e)}).subscribe({error:()=>{this.form.setErrors({cdSubmitButton:!0})},complete:()=>{this.activeModal.close(),this.submitAction.emit(e)}})}}return e.\u0275fac=function(t){return new(t||e)(h.Mb(P.a),h.Mb(c.a),h.Mb(k.a),h.Mb(g),h.Mb(n.b))},e.\u0275cmp=h.Gb({type:e,selectors:[["cd-crush-rule-form-modal"]],outputs:{submitAction:"submitAction"},features:[h.vb],decls:55,vars:27,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"modal-content"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","name",1,"cd-col-form-label"],"Name",[1,"required"],[1,"cd-col-form-input"],["type","text","id","name","name","name","placeholder","Name...","formControlName","name","autofocus","",1,"form-control"],["class","invalid-feedback",4,"ngIf"],["for","root",1,"cd-col-form-label"],"Root",[3,"html"],["id","root","name","root","formControlName","root",1,"form-control","custom-select"],["ngValue","",4,"ngIf"],[3,"ngValue",4,"ngFor","ngForOf"],["for","failure_domain",1,"cd-col-form-label"],"Failure domain type",["id","failure_domain","name","failure_domain","formControlName","failure_domain",1,"form-control","custom-select"],["for","device_class",1,"cd-col-form-label"],"Device class",["id","device_class","name","device_class","formControlName","device_class",1,"form-control","custom-select"],["ngValue",""],"Let Ceph decide",[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required!","The name can only consist of alphanumeric characters, dashes and underscores.","The chosen erasure code profile name is already in use.","Loading...",[3,"ngValue"],"This field is required!","Loading...","This field is required!"]},template:function(e,t){if(1&e&&(h.Sb(0,"cd-modal",0),h.Qb(1,1),h.Wb(2,2),h.jc(3,"titlecase"),h.jc(4,"upperFirst"),h.Pb(),h.Qb(5,3),h.Sb(6,"form",4,5),h.Sb(8,"div",6),h.Sb(9,"div",7),h.Sb(10,"label",8),h.Qb(11),h.Wb(12,9),h.Pb(),h.Nb(13,"span",10),h.Rb(),h.Sb(14,"div",11),h.Nb(15,"input",12),h.Mc(16,U,2,0,"span",13),h.Mc(17,G,2,0,"span",13),h.Mc(18,j,2,0,"span",13),h.Rb(),h.Rb(),h.Sb(19,"div",7),h.Sb(20,"label",14),h.Qb(21),h.Wb(22,15),h.Pb(),h.Nb(23,"cd-helper",16),h.Nb(24,"span",10),h.Rb(),h.Sb(25,"div",11),h.Sb(26,"select",17),h.Mc(27,Q,2,0,"option",18),h.Mc(28,J,2,2,"option",19),h.Rb(),h.Mc(29,K,2,0,"span",13),h.Rb(),h.Rb(),h.Sb(30,"div",7),h.Sb(31,"label",20),h.Qb(32),h.Wb(33,21),h.Pb(),h.Nb(34,"cd-helper",16),h.Nb(35,"span",10),h.Rb(),h.Sb(36,"div",11),h.Sb(37,"select",22),h.Mc(38,Y,2,0,"option",18),h.Mc(39,H,2,3,"option",19),h.Rb(),h.Mc(40,X,2,0,"span",13),h.Rb(),h.Rb(),h.Sb(41,"div",7),h.Sb(42,"label",23),h.Qb(43),h.Wb(44,24),h.Pb(),h.Nb(45,"cd-helper",16),h.Rb(),h.Sb(46,"div",11),h.Sb(47,"select",25),h.Sb(48,"option",26),h.Wb(49,27),h.Rb(),h.Mc(50,Z,2,2,"option",19),h.Rb(),h.Rb(),h.Rb(),h.Rb(),h.Sb(51,"div",28),h.Sb(52,"cd-form-button-panel",29),h.gc("submitActionEvent",(function(){return t.onSubmit()})),h.jc(53,"titlecase"),h.jc(54,"upperFirst"),h.Rb(),h.Rb(),h.Rb(),h.Pb(),h.Rb()),2&e){const e=h.Ac(7);h.pc("modalRef",t.activeModal),h.yb(4),h.ac(h.kc(3,19,t.action))(h.kc(4,21,t.resource)),h.Xb(2),h.yb(2),h.pc("formGroup",t.form),h.yb(10),h.pc("ngIf",t.form.showError("name",e,"required")),h.yb(1),h.pc("ngIf",t.form.showError("name",e,"pattern")),h.yb(1),h.pc("ngIf",t.form.showError("name",e,"uniqueName")),h.yb(5),h.pc("html",t.tooltips.root),h.yb(4),h.pc("ngIf",!t.buckets),h.yb(1),h.pc("ngForOf",t.buckets),h.yb(1),h.pc("ngIf",t.form.showError("root",e,"required")),h.yb(5),h.pc("html",t.tooltips.failure_domain),h.yb(4),h.pc("ngIf",!t.failureDomains),h.yb(1),h.pc("ngForOf",t.failureDomainKeys),h.yb(1),h.pc("ngIf",t.form.showError("failure_domain",e,"required")),h.yb(5),h.pc("html",t.tooltips.device_class),h.yb(5),h.pc("ngForOf",t.devices),h.yb(2),h.pc("form",t.form)("submitText",h.kc(53,23,t.action)+" "+h.kc(54,25,t.resource))}},directives:[x.a,o.C,o.r,A.a,o.k,O.a,V.a,o.d,W.a,o.q,o.i,F.a,a.r,L.a,o.z,a.q,o.u,o.B,q.a],pipes:[a.A,B.a],styles:[""]}),e})();class te{}function ie(e,t){1&e&&(h.Sb(0,"span",46),h.Wb(1,47),h.Rb())}function ae(e,t){1&e&&(h.Sb(0,"span",46),h.Wb(1,48),h.Rb())}function oe(e,t){1&e&&(h.Sb(0,"span",46),h.Wb(1,49),h.Rb())}function se(e,t){1&e&&(h.Sb(0,"option",37),h.Wb(1,50),h.Rb())}function ce(e,t){if(1&e&&(h.Sb(0,"option",51),h.Oc(1),h.Rb()),2&e){const e=t.$implicit;h.pc("ngValue",e),h.yb(1),h.Qc(" ",e," ")}}function ne(e,t){1&e&&(h.Sb(0,"span",46),h.Wb(1,52),h.Rb())}function le(e,t){1&e&&(h.Sb(0,"span",46),h.Wb(1,53),h.Rb())}function re(e,t){1&e&&(h.Sb(0,"span",46),h.Wb(1,54),h.Rb())}function be(e,t){if(1&e&&(h.Sb(0,"span",46),h.Wb(1,55),h.Rb()),2&e){const e=h.ic();h.yb(1),h.ac(e.deviceCount),h.Xb(1)}}function de(e,t){1&e&&(h.Sb(0,"span",46),h.Wb(1,56),h.Rb())}function ue(e,t){1&e&&(h.Sb(0,"span",46),h.Wb(1,57),h.Rb())}function fe(e,t){if(1&e&&(h.Sb(0,"span",39),h.Wb(1,58),h.Rb()),2&e){const e=h.ic();h.yb(1),h.ac(e.lrcMultiK),h.Xb(1)}}function pe(e,t){1&e&&(h.Sb(0,"span",46),h.Wb(1,59),h.Rb())}function he(e,t){1&e&&(h.Sb(0,"span",46),h.Wb(1,60),h.Rb())}function me(e,t){if(1&e&&(h.Sb(0,"span",46),h.Wb(1,61),h.Rb()),2&e){const e=h.ic();h.yb(1),h.ac(e.deviceCount),h.Xb(1)}}function ge(e,t){1&e&&(h.Sb(0,"span",46),h.Wb(1,65),h.Rb())}function Se(e,t){1&e&&(h.Sb(0,"span",46),h.Wb(1,66),h.Rb())}function ve(e,t){if(1&e&&(h.Sb(0,"div",7),h.Sb(1,"label",62),h.Sb(2,"span",14),h.Wb(3,63),h.Rb(),h.Nb(4,"cd-helper",16),h.Rb(),h.Sb(5,"div",10),h.Nb(6,"input",64),h.Mc(7,ge,2,0,"span",12),h.Mc(8,Se,2,0,"span",12),h.Rb(),h.Rb()),2&e){const e=h.ic(),t=h.Ac(7);h.yb(4),h.pc("html",e.tooltips.plugins.shec.c),h.yb(3),h.pc("ngIf",e.form.showError("c",t,"min")),h.yb(1),h.pc("ngIf",e.form.showError("c",t,"cGreaterM"))}}function Re(e,t){1&e&&(h.Sb(0,"span",39),h.Wb(1,76),h.Rb())}function ye(e,t){if(1&e&&(h.Sb(0,"span",39),h.Wb(1,77),h.Rb()),2&e){const e=h.ic(3);h.yb(1),h.ac(e.getDMin())(e.getDMax()),h.Xb(1)}}function ze(e,t){if(1&e&&(h.Sb(0,"span",39),h.Wb(1,78),h.Rb()),2&e){const e=h.ic(3);h.yb(1),h.ac(e.getDMax()),h.Xb(1)}}function Ce(e,t){if(1&e&&(h.Qb(0),h.Mc(1,ye,2,2,"span",23),h.Mc(2,ze,2,1,"span",23),h.Pb()),2&e){const e=h.ic(2);h.yb(1),h.pc("ngIf",e.getDMin()<e.getDMax()),h.yb(1),h.pc("ngIf",e.getDMin()===e.getDMax())}}function Ie(e,t){if(1&e&&(h.Sb(0,"span",46),h.Wb(1,79),h.Rb()),2&e){const e=h.ic(2);h.yb(1),h.ac(e.getDMin()),h.Xb(1)}}function Ne(e,t){if(1&e&&(h.Sb(0,"span",46),h.Wb(1,80),h.Rb()),2&e){const e=h.ic(2);h.yb(1),h.ac(e.getDMax()),h.Xb(1)}}function _e(e,t){if(1&e){const e=h.Tb();h.Sb(0,"div",7),h.Sb(1,"label",67),h.Sb(2,"span",14),h.Wb(3,68),h.Rb(),h.Nb(4,"cd-helper",16),h.Rb(),h.Sb(5,"div",10),h.Sb(6,"div",69),h.Nb(7,"input",70),h.Sb(8,"span",71),h.Sb(9,"button",72),h.Yb(10,73),h.gc("click",(function(){return h.Dc(e),h.ic().toggleDCalc()})),h.Nb(11,"i",74),h.Rb(),h.Rb(),h.Rb(),h.Mc(12,Re,2,0,"span",23),h.Mc(13,Ce,3,2,"ng-container",75),h.Mc(14,Ie,2,1,"span",12),h.Mc(15,Ne,2,1,"span",12),h.Rb(),h.Rb()}if(2&e){const e=h.ic(),t=h.Ac(7);h.yb(4),h.pc("html",e.tooltips.plugins.clay.d),h.yb(7),h.pc("ngClass",e.dCalc?e.icons.unlock:e.icons.lock),h.yb(1),h.pc("ngIf",e.dCalc),h.yb(1),h.pc("ngIf",!e.dCalc),h.yb(1),h.pc("ngIf",e.form.showError("d",t,"dMin")),h.yb(1),h.pc("ngIf",e.form.showError("d",t,"dMax"))}}function Me(e,t){1&e&&(h.Sb(0,"span",46),h.Wb(1,85),h.Rb())}function Te(e,t){1&e&&(h.Sb(0,"span",46),h.Wb(1,86),h.Rb())}function $e(e,t){1&e&&(h.Sb(0,"span",46),h.Wb(1,87),h.Rb())}function we(e,t){if(1&e&&(h.Sb(0,"div",7),h.Sb(1,"label",81),h.Sb(2,"span",14),h.Wb(3,82),h.Rb(),h.Nb(4,"cd-helper",16),h.Rb(),h.Sb(5,"div",10),h.Nb(6,"input",83),h.Mc(7,Me,2,0,"span",12),h.Mc(8,Te,2,0,"span",12),h.Mc(9,$e,2,0,"span",12),h.Sb(10,"span",39),h.Wb(11,84),h.Rb(),h.Rb(),h.Rb()),2&e){const e=h.ic(),t=h.Ac(7);h.yb(4),h.pc("html",e.tooltips.plugins.lrc.l),h.yb(3),h.pc("ngIf",e.form.showError("l",t,"required")),h.yb(1),h.pc("ngIf",e.form.showError("l",t,"min")),h.yb(1),h.pc("ngIf",e.form.showError("l",t,"unequal")),h.yb(2),h.ac(e.lrcGroups),h.Xb(11)}}function De(e,t){1&e&&(h.Sb(0,"option",37),h.Wb(1,88),h.Rb())}function Ee(e,t){if(1&e&&(h.Sb(0,"option",51),h.Oc(1),h.Rb()),2&e){const e=t.$implicit,i=h.ic();h.pc("ngValue",e),h.yb(1),h.Rc(" ",e," ( ",i.failureDomains[e].length," ) ")}}function ke(e,t){1&e&&(h.Sb(0,"option",37),h.Wb(1,92),h.Rb())}function Pe(e,t){1&e&&(h.Sb(0,"option",37),h.Wb(1,93),h.Rb())}function xe(e,t){if(1&e&&(h.Sb(0,"option",51),h.Oc(1),h.Rb()),2&e){const e=t.$implicit,i=h.ic(2);h.pc("ngValue",e),h.yb(1),h.Rc(" ",e," ( ",i.failureDomains[e].length," ) ")}}function Ae(e,t){if(1&e&&(h.Sb(0,"div",7),h.Sb(1,"label",89),h.Qb(2),h.Wb(3,90),h.Pb(),h.Nb(4,"cd-helper",16),h.Rb(),h.Sb(5,"div",10),h.Sb(6,"select",91),h.Mc(7,ke,2,0,"option",18),h.Mc(8,Pe,2,0,"option",18),h.Mc(9,xe,2,3,"option",19),h.Rb(),h.Rb(),h.Rb()),2&e){const e=h.ic();h.yb(4),h.pc("html",e.tooltips.plugins.lrc.crushLocality),h.yb(3),h.pc("ngIf",!e.failureDomains),h.yb(1),h.pc("ngIf",e.failureDomainKeys.length>0),h.yb(1),h.pc("ngForOf",e.failureDomainKeys)}}function Oe(e,t){if(1&e&&(h.Sb(0,"option",51),h.Oc(1),h.Rb()),2&e){const e=t.$implicit;h.pc("ngValue",e),h.yb(1),h.Qc(" ",e," ")}}const Ve=function(e,t,i){return[e,t,i]};function We(e,t){if(1&e&&(h.Sb(0,"div",7),h.Sb(1,"label",94),h.Qb(2),h.Wb(3,95),h.Pb(),h.Nb(4,"cd-helper",16),h.Rb(),h.Sb(5,"div",10),h.Sb(6,"select",96),h.Mc(7,Oe,2,2,"option",19),h.Rb(),h.Rb(),h.Rb()),2&e){const e=h.ic();h.yb(4),h.pc("html",e.tooltips.plugins.clay.scalar_mds),h.yb(3),h.pc("ngForOf",h.wc(2,Ve,e.PLUGIN.JERASURE,e.PLUGIN.ISA,e.PLUGIN.SHEC))}}function Fe(e,t){if(1&e&&(h.Sb(0,"option",51),h.Oc(1),h.Rb()),2&e){const e=t.$implicit;h.pc("ngValue",e),h.yb(1),h.Qc(" ",e," ")}}function Le(e,t){if(1&e&&(h.Sb(0,"div",7),h.Sb(1,"label",97),h.Qb(2),h.Wb(3,98),h.Pb(),h.Nb(4,"cd-helper",16),h.Rb(),h.Sb(5,"div",10),h.Sb(6,"select",99),h.Mc(7,Fe,2,2,"option",19),h.Rb(),h.Rb(),h.Rb()),2&e){const e=h.ic();h.yb(4),h.pc("html",e.tooltips.plugins[e.plugin].technique),h.yb(3),h.pc("ngForOf",e.techniques)}}function qe(e,t){1&e&&(h.Sb(0,"span",46),h.Wb(1,103),h.Rb())}function Be(e,t){if(1&e&&(h.Sb(0,"div",7),h.Sb(1,"label",100),h.Qb(2),h.Wb(3,101),h.Pb(),h.Nb(4,"cd-helper",16),h.Rb(),h.Sb(5,"div",10),h.Nb(6,"input",102),h.Mc(7,qe,2,0,"span",12),h.Rb(),h.Rb()),2&e){const e=h.ic(),t=h.Ac(7);h.yb(4),h.pc("html",e.tooltips.plugins.jerasure.packetSize),h.yb(3),h.pc("ngIf",e.form.showError("packetSize",t,"min"))}}function Ue(e,t){1&e&&(h.Sb(0,"option",37),h.Wb(1,104),h.Rb())}function Ge(e,t){if(1&e&&(h.Sb(0,"option",51),h.Oc(1),h.Rb()),2&e){const e=t.$implicit;h.pc("ngValue",e),h.yb(1),h.Qc(" ",e.name," ")}}function je(e,t){if(1&e&&(h.Sb(0,"option",51),h.Oc(1),h.Rb()),2&e){const e=t.$implicit;h.pc("ngValue",e),h.yb(1),h.Qc(" ",e," ")}}let Qe=(()=>{class e extends R{constructor(e,t,i,a,o){super(),this.formBuilder=e,this.activeModal=t,this.taskWrapper=i,this.ecpService=a,this.actionLabels=o,this.submitAction=new h.o,this.tooltips=this.ecpService.formTooltips,this.PLUGIN={LRC:"lrc",SHEC:"shec",CLAY:"clay",JERASURE:"jerasure",ISA:"isa"},this.plugin=this.PLUGIN.JERASURE,this.icons=C.a,this.action=this.actionLabels.CREATE,this.resource="EC Profile",this.createForm(),this.setJerasureDefaults()}createForm(){this.form=this.formBuilder.group({name:[null,[o.A.required,o.A.pattern("[A-Za-z0-9_-]+"),_.a.custom("uniqueName",e=>this.names&&-1!==this.names.indexOf(e))]],plugin:[this.PLUGIN.JERASURE,[o.A.required]],k:[4,[o.A.required,o.A.min(2),_.a.custom("max",()=>this.baseValueValidation(!0)),_.a.custom("unequal",e=>this.lrcDataValidation(e)),_.a.custom("kLowerM",e=>this.shecDataValidation(e))]],m:[2,[o.A.required,o.A.min(1),_.a.custom("max",()=>this.baseValueValidation())]],crushFailureDomain:"",crushRoot:null,crushDeviceClass:"",directory:"",technique:"reed_sol_van",packetSize:[2048,[o.A.min(1)]],l:[3,[o.A.required,o.A.min(1),_.a.custom("unequal",e=>this.lrcLocalityValidation(e))]],crushLocality:"",c:[2,[o.A.required,o.A.min(1),_.a.custom("cGreaterM",e=>this.shecDurabilityValidation(e))]],d:[5,[o.A.required,_.a.custom("dMin",e=>this.dMinValidation(e)),_.a.custom("dMax",e=>this.dMaxValidation(e))]],scalar_mds:[this.PLUGIN.JERASURE,[o.A.required]]}),this.toggleDCalc(),this.form.get("k").valueChanges.subscribe(()=>this.updateValidityOnChange(["m","l","d"])),this.form.get("m").valueChanges.subscribe(()=>this.updateValidityOnChange(["k","l","c","d"])),this.form.get("l").valueChanges.subscribe(()=>this.updateValidityOnChange(["k","m"])),this.form.get("plugin").valueChanges.subscribe(e=>this.onPluginChange(e)),this.form.get("scalar_mds").valueChanges.subscribe(()=>this.setClayDefaultsForScalar())}baseValueValidation(e=!1){return this.validValidation(()=>this.getKMSum()>this.deviceCount&&this.form.getValue("k")>this.form.getValue("m")===e)}validValidation(e,t){return!((!this.form||t)&&this.plugin!==t)&&e()}getKMSum(){return this.form.getValue("k")+this.form.getValue("m")}lrcDataValidation(e){return this.validValidation(()=>{const t=this.form.getValue("m"),i=this.form.getValue("l"),a=e+t;return this.lrcMultiK=e/(a/i),e%(a/i)!=0},"lrc")}shecDataValidation(e){return this.validValidation(()=>this.form.getValue("m")>e,"shec")}lrcLocalityValidation(e){return this.validValidation(()=>{const t=this.getKMSum();return this.lrcGroups=e>0?t/e:0,e>0&&t%e!=0},"lrc")}shecDurabilityValidation(e){return this.validValidation(()=>{const t=this.form.getValue("m");return e>t},"shec")}dMinValidation(e){return this.validValidation(()=>this.getDMin()>e,"clay")}getDMin(){return this.form.getValue("k")+1}dMaxValidation(e){return this.validValidation(()=>e>this.getDMax(),"clay")}getDMax(){const e=this.form.getValue("m");return this.form.getValue("k")+e-1}toggleDCalc(){this.dCalc=!this.dCalc,this.form.get("d")[this.dCalc?"disable":"enable"](),this.calculateD()}calculateD(){this.plugin===this.PLUGIN.CLAY&&this.dCalc&&this.form.silentSet("d",this.getDMax())}updateValidityOnChange(e){e.forEach(e=>{"d"===e&&this.calculateD(),this.form.get(e).updateValueAndValidity({emitEvent:!1})})}onPluginChange(e){this.plugin=e,e===this.PLUGIN.JERASURE?this.setJerasureDefaults():e===this.PLUGIN.LRC?this.setLrcDefaults():e===this.PLUGIN.ISA?this.setIsaDefaults():e===this.PLUGIN.SHEC?this.setShecDefaults():e===this.PLUGIN.CLAY&&this.setClayDefaults(),this.updateValidityOnChange(["m"])}setJerasureDefaults(){this.techniques=["reed_sol_van","reed_sol_r6_op","cauchy_orig","cauchy_good","liberation","blaum_roth","liber8tion"],this.setDefaults({k:4,m:2,technique:"reed_sol_van"})}setLrcDefaults(){this.setDefaults({k:4,m:2,l:3})}setIsaDefaults(){this.techniques=["reed_sol_van","cauchy"],this.setDefaults({k:7,m:3,technique:"reed_sol_van"})}setShecDefaults(){this.setDefaults({k:4,m:3,c:2})}setClayDefaults(){this.setDefaults({k:4,m:2,scalar_mds:this.PLUGIN.JERASURE}),this.setClayDefaultsForScalar()}setClayDefaultsForScalar(){const e=this.form.getValue("scalar_mds");let t="reed_sol_van";e===this.PLUGIN.JERASURE?this.techniques=["reed_sol_van","reed_sol_r6_op","cauchy_orig","cauchy_good","liber8tion"]:e===this.PLUGIN.ISA?this.techniques=["reed_sol_van","cauchy"]:(t="single",this.techniques=["single","multiple"]),this.setDefaults({technique:t})}setDefaults(e){Object.keys(e).forEach(t=>{const i=this.form.get(t),a=i.value;i.pristine||"technique"===t&&!this.techniques.includes(a)||"k"===t&&[4,7].includes(a)||"m"===t&&[2,3].includes(a)?i.setValue(e[t]):i.updateValueAndValidity()})}ngOnInit(){this.ecpService.getInfo().subscribe(({plugins:e,names:t,directory:i,nodes:a})=>{this.initCrushNodeSelection(a,this.form.get("crushRoot"),this.form.get("crushFailureDomain"),this.form.get("crushDeviceClass")),this.plugins=e,this.names=t,this.form.silentSet("directory",i),this.preValidateNumericInputFields()})}preValidateNumericInputFields(){const e=["k","m","l","c","d"].map(e=>this.form.get(e));e.forEach(e=>{e.markAsTouched(),e.markAsDirty()}),e[1].updateValueAndValidity()}onSubmit(){if(this.form.invalid)return void this.form.setErrors({cdSubmitButton:!0});const e=this.createJson();this.taskWrapper.wrapTaskAroundCall({task:new T.a("ecp/create",{name:e.name}),call:this.ecpService.create(e)}).subscribe({error:()=>{this.form.setErrors({cdSubmitButton:!0})},complete:()=>{this.activeModal.close(),this.submitAction.emit(e)}})}createJson(){const e={technique:[this.PLUGIN.ISA,this.PLUGIN.JERASURE,this.PLUGIN.CLAY],packetSize:[this.PLUGIN.JERASURE],l:[this.PLUGIN.LRC],crushLocality:[this.PLUGIN.LRC],c:[this.PLUGIN.SHEC],d:[this.PLUGIN.CLAY],scalar_mds:[this.PLUGIN.CLAY]},t=new te,i=this.form.getValue("plugin");return Object.keys(this.form.controls).filter(t=>{const a=e[t],o=this.form.getValue(t);return(a&&a.includes(i)||!a)&&o&&""!==o}).forEach(e=>{this.extendJson(e,t)}),t}extendJson(e,t){const i=this.form.getValue(e);t[{crushFailureDomain:"crush-failure-domain",crushRoot:"crush-root",crushDeviceClass:"crush-device-class",packetSize:"packetsize",crushLocality:"crush-locality"}[e]||e]="crushRoot"===e?i.name:i}}return e.\u0275fac=function(t){return new(t||e)(h.Mb(P.a),h.Mb(c.a),h.Mb(k.a),h.Mb(S),h.Mb(n.b))},e.\u0275cmp=h.Gb({type:e,selectors:[["cd-erasure-code-profile-form-modal"]],outputs:{submitAction:"submitAction"},features:[h.vb],decls:98,vars:53,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"modal-content"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","name",1,"cd-col-form-label"],"Name",[1,"cd-col-form-input"],["type","text","id","name","name","name","placeholder","Name...","formControlName","name","autofocus","",1,"form-control"],["class","invalid-feedback",4,"ngIf"],["for","plugin",1,"cd-col-form-label"],[1,"required"],"Plugin",[3,"html"],["id","plugin","name","plugin","formControlName","plugin",1,"form-control","custom-select"],["ngValue","",4,"ngIf"],[3,"ngValue",4,"ngFor","ngForOf"],["for","k",1,"cd-col-form-label"],"Data chunks (k)",["type","number","id","k","name","k","ng-model","$ctrl.erasureCodeProfile.k","placeholder","Data chunks...","formControlName","k",1,"form-control"],["class","form-text text-muted",4,"ngIf"],["for","m",1,"cd-col-form-label"],"Coding chunks (m)",["type","number","id","m","name","m","placeholder","Coding chunks...","formControlName","m",1,"form-control"],["class","form-group row",4,"ngIf"],["for","crushFailureDomain",1,"cd-col-form-label"],"Crush failure domain",["id","crushFailureDomain","name","crushFailureDomain","formControlName","crushFailureDomain",1,"form-control","custom-select"],["for","crushRoot",1,"cd-col-form-label"],"Crush root",["id","crushRoot","name","crushRoot","formControlName","crushRoot",1,"form-control","custom-select"],["for","crushDeviceClass",1,"cd-col-form-label"],"Crush device class",["id","crushDeviceClass","name","crushDeviceClass","formControlName","crushDeviceClass",1,"form-control","custom-select"],["ngValue",""],"Let Ceph decide",[1,"form-text","text-muted"],"Available OSDs: " + "\ufffd0\ufffd" + "",["for","directory",1,"cd-col-form-label"],"Directory",["type","text","id","directory","name","directory","placeholder","Path...","formControlName","directory",1,"form-control"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required!","The name can only consist of alphanumeric characters, dashes and underscores.","The chosen erasure code profile name is already in use.","Loading...",[3,"ngValue"],"This field is required!","This field is required!","Must be equal to or greater than 2.","Chunks (k+m) have exceeded the available OSDs of " + "\ufffd0\ufffd" + ".","For an equal distribution k has to be a multiple of (k+m)/l.","K has to be equal to or greater than m in order to recover data correctly through c.","Distribution factor: " + "\ufffd0\ufffd" + "","This field is required!","Must be equal to or greater than 1.","Chunks (k+m) have exceeded the available OSDs of " + "\ufffd0\ufffd" + ".",["for","c",1,"cd-col-form-label"],"Durability estimator (c)",["type","number","id","c","name","c","placeholder","Coding chunks...","formControlName","c",1,"form-control"],"Must be equal to or greater than 1.","C has to be equal to or lower than m as m defines the amount of chunks that can be used.",["for","d",1,"cd-col-form-label"],"Helper chunks (d)",[1,"input-group"],["type","number","id","d","name","d","placeholder","Helper chunks...","formControlName","d",1,"form-control"],[1,"input-group-append"],["id","d-calc-btn","type","button",1,"btn","btn-light",3,"click",6,"ngbTooltip"],["ngbTooltip","Set d manually or use the plugin's default calculation that maximizes d."],["aria-hidden","true",3,"ngClass"],[4,"ngIf"],"D is automatically updated on k and m changes","D can be set from " + "\ufffd0\ufffd" + " to " + "\ufffd1\ufffd" + "","D can only be set to " + "\ufffd0\ufffd" + "","D has to be greater than k (" + "\ufffd0\ufffd" + ").","D has to be lower than k + m (" + "\ufffd0\ufffd" + ").",["for","l",1,"cd-col-form-label"],"Locality (l)",["type","number","id","l","name","l","placeholder","Coding chunks...","formControlName","l",1,"form-control"],"Locality groups: " + "\ufffd0\ufffd" + "","This field is required!","Must be equal to or greater than 1.","Can't split up chunks (k+m) correctly with the current locality.","Loading...",["for","crushLocality",1,"cd-col-form-label"],"Crush Locality",["id","crushLocality","name","crushLocality","formControlName","crushLocality",1,"form-control","custom-select"],"Loading...","None",["for","scalar_mds",1,"cd-col-form-label"],"Scalar mds",["id","scalar_mds","name","scalar_mds","formControlName","scalar_mds",1,"form-control","custom-select"],["for","technique",1,"cd-col-form-label"],"Technique",["id","technique","name","technique","formControlName","technique",1,"form-control","custom-select"],["for","packetSize",1,"cd-col-form-label"],"Packetsize",["type","number","id","packetSize","name","packetSize","placeholder","Packetsize...","formControlName","packetSize",1,"form-control"],"Must be equal to or greater than 1.","Loading..."]},template:function(e,t){if(1&e&&(h.Sb(0,"cd-modal",0),h.Qb(1,1),h.Wb(2,2),h.jc(3,"titlecase"),h.jc(4,"upperFirst"),h.Pb(),h.Qb(5,3),h.Sb(6,"form",4,5),h.Sb(8,"div",6),h.Sb(9,"div",7),h.Sb(10,"label",8),h.Wb(11,9),h.Rb(),h.Sb(12,"div",10),h.Nb(13,"input",11),h.Mc(14,ie,2,0,"span",12),h.Mc(15,ae,2,0,"span",12),h.Mc(16,oe,2,0,"span",12),h.Rb(),h.Rb(),h.Sb(17,"div",7),h.Sb(18,"label",13),h.Sb(19,"span",14),h.Wb(20,15),h.Rb(),h.Nb(21,"cd-helper",16),h.Rb(),h.Sb(22,"div",10),h.Sb(23,"select",17),h.Mc(24,se,2,0,"option",18),h.Mc(25,ce,2,2,"option",19),h.Rb(),h.Mc(26,ne,2,0,"span",12),h.Rb(),h.Rb(),h.Sb(27,"div",7),h.Sb(28,"label",20),h.Sb(29,"span",14),h.Wb(30,21),h.Rb(),h.Nb(31,"cd-helper",16),h.Rb(),h.Sb(32,"div",10),h.Nb(33,"input",22),h.Mc(34,le,2,0,"span",12),h.Mc(35,re,2,0,"span",12),h.Mc(36,be,2,1,"span",12),h.Mc(37,de,2,0,"span",12),h.Mc(38,ue,2,0,"span",12),h.Mc(39,fe,2,1,"span",23),h.Rb(),h.Rb(),h.Sb(40,"div",7),h.Sb(41,"label",24),h.Sb(42,"span",14),h.Wb(43,25),h.Rb(),h.Nb(44,"cd-helper",16),h.Rb(),h.Sb(45,"div",10),h.Nb(46,"input",26),h.Mc(47,pe,2,0,"span",12),h.Mc(48,he,2,0,"span",12),h.Mc(49,me,2,1,"span",12),h.Rb(),h.Rb(),h.Mc(50,ve,9,3,"div",27),h.Mc(51,_e,16,6,"div",27),h.Mc(52,we,12,5,"div",27),h.Sb(53,"div",7),h.Sb(54,"label",28),h.Qb(55),h.Wb(56,29),h.Pb(),h.Nb(57,"cd-helper",16),h.Rb(),h.Sb(58,"div",10),h.Sb(59,"select",30),h.Mc(60,De,2,0,"option",18),h.Mc(61,Ee,2,3,"option",19),h.Rb(),h.Rb(),h.Rb(),h.Mc(62,Ae,10,4,"div",27),h.Mc(63,We,8,6,"div",27),h.Mc(64,Le,8,2,"div",27),h.Mc(65,Be,8,2,"div",27),h.Sb(66,"div",7),h.Sb(67,"label",31),h.Qb(68),h.Wb(69,32),h.Pb(),h.Nb(70,"cd-helper",16),h.Rb(),h.Sb(71,"div",10),h.Sb(72,"select",33),h.Mc(73,Ue,2,0,"option",18),h.Mc(74,Ge,2,2,"option",19),h.Rb(),h.Rb(),h.Rb(),h.Sb(75,"div",7),h.Sb(76,"label",34),h.Qb(77),h.Wb(78,35),h.Pb(),h.Nb(79,"cd-helper",16),h.Rb(),h.Sb(80,"div",10),h.Sb(81,"select",36),h.Sb(82,"option",37),h.Wb(83,38),h.Rb(),h.Mc(84,je,2,2,"option",19),h.Rb(),h.Sb(85,"span",39),h.Wb(86,40),h.Rb(),h.Rb(),h.Rb(),h.Sb(87,"div",7),h.Sb(88,"label",41),h.Qb(89),h.Wb(90,42),h.Pb(),h.Nb(91,"cd-helper",16),h.Rb(),h.Sb(92,"div",10),h.Nb(93,"input",43),h.Rb(),h.Rb(),h.Rb(),h.Sb(94,"div",44),h.Sb(95,"cd-form-button-panel",45),h.gc("submitActionEvent",(function(){return t.onSubmit()})),h.jc(96,"titlecase"),h.jc(97,"upperFirst"),h.Rb(),h.Rb(),h.Rb(),h.Pb(),h.Rb()),2&e){const e=h.Ac(7);h.pc("modalRef",t.activeModal),h.yb(4),h.ac(h.kc(3,41,t.action))(h.kc(4,43,t.resource)),h.Xb(2),h.yb(2),h.pc("formGroup",t.form),h.yb(8),h.pc("ngIf",t.form.showError("name",e,"required")),h.yb(1),h.pc("ngIf",t.form.showError("name",e,"pattern")),h.yb(1),h.pc("ngIf",t.form.showError("name",e,"uniqueName")),h.yb(5),h.pc("html",t.tooltips.plugins[t.plugin].description),h.yb(3),h.pc("ngIf",!t.plugins),h.yb(1),h.pc("ngForOf",t.plugins),h.yb(1),h.pc("ngIf",t.form.showError("name",e,"required")),h.yb(5),h.pc("html",t.tooltips.k),h.yb(3),h.pc("ngIf",t.form.showError("k",e,"required")),h.yb(1),h.pc("ngIf",t.form.showError("k",e,"min")),h.yb(1),h.pc("ngIf",t.form.showError("k",e,"max")),h.yb(1),h.pc("ngIf",t.form.showError("k",e,"unequal")),h.yb(1),h.pc("ngIf",t.form.showError("k",e,"kLowerM")),h.yb(1),h.pc("ngIf","lrc"===t.plugin),h.yb(5),h.pc("html",t.tooltips.m),h.yb(3),h.pc("ngIf",t.form.showError("m",e,"required")),h.yb(1),h.pc("ngIf",t.form.showError("m",e,"min")),h.yb(1),h.pc("ngIf",t.form.showError("m",e,"max")),h.yb(1),h.pc("ngIf","shec"===t.plugin),h.yb(1),h.pc("ngIf","clay"===t.plugin),h.yb(1),h.pc("ngIf",t.plugin===t.PLUGIN.LRC),h.yb(5),h.pc("html",t.tooltips.crushFailureDomain),h.yb(3),h.pc("ngIf",!t.failureDomains),h.yb(1),h.pc("ngForOf",t.failureDomainKeys),h.yb(1),h.pc("ngIf",t.plugin===t.PLUGIN.LRC),h.yb(1),h.pc("ngIf",t.PLUGIN.CLAY===t.plugin),h.yb(1),h.pc("ngIf",h.wc(49,Ve,t.PLUGIN.JERASURE,t.PLUGIN.ISA,t.PLUGIN.CLAY).includes(t.plugin)),h.yb(1),h.pc("ngIf",t.plugin===t.PLUGIN.JERASURE),h.yb(5),h.pc("html",t.tooltips.crushRoot),h.yb(3),h.pc("ngIf",!t.buckets),h.yb(1),h.pc("ngForOf",t.buckets),h.yb(5),h.pc("html",t.tooltips.crushDeviceClass),h.yb(5),h.pc("ngForOf",t.devices),h.yb(2),h.ac(t.deviceCount),h.Xb(86),h.yb(5),h.pc("html",t.tooltips.directory),h.yb(4),h.pc("form",t.form)("submitText",h.kc(96,45,t.action)+" "+h.kc(97,47,t.resource))}},directives:[x.a,o.C,o.r,A.a,o.k,O.a,V.a,o.d,W.a,o.q,o.i,F.a,a.r,L.a,o.z,a.q,o.v,o.u,o.B,q.a,c.D,a.p],pipes:[a.A,B.a],styles:[""]}),e})();var Je=i("DNAf");class Ke{constructor(){this.erasureInfo=!1,this.crushInfo=!1,this.pgs=1,this.poolTypes=["erasure","replicated"],this.applications={selected:[],default:["cephfs","rbd","rgw"],available:[],validators:[o.A.pattern("[A-Za-z0-9_]+"),o.A.maxLength(128)],messages:new Je.a({empty:"No applications added",selectionLimit:{text:"Applications limit reached",tooltip:"A pool can only have up to four applications definitions."},customValidations:{pattern:"Allowed characters '_a-zA-Z0-9'",maxlength:"Maximum length is 128 characters"},filter:"Filter or add applications'",add:"Add application"})}}}var Ye=i("zc8c"),He=i("ppaS"),Xe=i("EmSq"),Ze=i("rFfW"),et=i("6qls"),tt=i("FSuO");const it=["crushInfoTabs"],at=["crushDeletionBtn"],ot=["ecpInfoTabs"],st=["ecpDeletionBtn"];function ct(e,t){1&e&&(h.Sb(0,"span",42),h.Wb(1,43),h.Rb())}function nt(e,t){1&e&&(h.Sb(0,"span",42),h.Wb(1,44),h.Rb())}function lt(e,t){1&e&&(h.Sb(0,"span",42),h.Wb(1,45),h.Rb())}function rt(e,t){1&e&&(h.Sb(0,"span",42),h.Wb(1,46),h.Rb())}function bt(e,t){if(1&e&&(h.Sb(0,"option",47),h.Oc(1),h.Rb()),2&e){const e=t.$implicit;h.pc("value",e),h.yb(1),h.Qc(" ",e," ")}}function dt(e,t){1&e&&(h.Sb(0,"span",42),h.Wb(1,48),h.Rb())}function ut(e,t){if(1&e&&(h.Sb(0,"option",47),h.Oc(1),h.Rb()),2&e){const e=t.$implicit;h.pc("value",e),h.yb(1),h.Qc(" ",e," ")}}function ft(e,t){1&e&&(h.Sb(0,"span",42),h.Wb(1,60),h.Rb())}function pt(e,t){1&e&&(h.Sb(0,"span",42),h.Wb(1,61),h.Rb())}function ht(e,t){1&e&&(h.Sb(0,"span",42),h.Wb(1,62),h.Rb())}function mt(e,t){1&e&&(h.Sb(0,"span",56),h.Wb(1,63),h.Rb())}function gt(e,t){if(1&e){const e=h.Tb();h.Sb(0,"div",8),h.Sb(1,"label",53),h.Wb(2,54),h.Rb(),h.Sb(3,"div",11),h.Sb(4,"input",55),h.gc("focus",(function(){return h.Dc(e),h.ic(3).externalPgChange=!1}))("blur",(function(){return h.Dc(e),h.ic(3).alignPgs()})),h.Rb(),h.Mc(5,ft,2,0,"span",14),h.Mc(6,pt,2,0,"span",14),h.Mc(7,ht,2,0,"span",14),h.Sb(8,"span",56),h.Sb(9,"cd-doc",57),h.Yb(10,58),h.Rb(),h.Rb(),h.Mc(11,mt,2,0,"span",59),h.Rb(),h.Rb()}if(2&e){h.ic(2);const e=h.Ac(2),t=h.ic();h.yb(5),h.pc("ngIf",t.form.showError("pgNum",e,"required")),h.yb(1),h.pc("ngIf",t.form.showError("pgNum",e,"min")),h.yb(1),h.pc("ngIf",t.form.showError("pgNum",e,"34")),h.yb(4),h.pc("ngIf",t.externalPgChange)}}function St(e,t){if(1&e&&(h.Sb(0,"span",42),h.Sb(1,"ul",68),h.Sb(2,"li"),h.Wb(3,69),h.Rb(),h.Sb(4,"li"),h.Wb(5,70),h.Rb(),h.Rb(),h.Rb()),2&e){const e=h.ic(4);h.yb(3),h.ac(e.getMinSize()),h.Xb(3),h.yb(2),h.ac(e.getMaxSize()),h.Xb(5)}}function vt(e,t){if(1&e&&(h.Sb(0,"span",42),h.Wb(1,71),h.Rb()),2&e){const e=h.ic(4);h.yb(1),h.ac(e.getMinSize())(e.getMaxSize()),h.Xb(1)}}function Rt(e,t){1&e&&(h.Sb(0,"span",72),h.Wb(1,73),h.Rb())}function yt(e,t){if(1&e&&(h.Sb(0,"div",8),h.Sb(1,"label",64),h.Wb(2,65),h.Rb(),h.Sb(3,"div",11),h.Nb(4,"input",66),h.Mc(5,St,6,2,"span",14),h.Mc(6,vt,2,2,"span",14),h.Mc(7,Rt,2,0,"span",67),h.Rb(),h.Rb()),2&e){h.ic(2);const e=h.Ac(2),t=h.ic();h.yb(4),h.pc("max",t.getMaxSize())("min",t.getMinSize()),h.yb(1),h.pc("ngIf",t.form.showError("size",e)),h.yb(1),h.pc("ngIf",t.form.showError("size",e)),h.yb(1),h.pc("ngIf",1===t.form.getValue("size"))}}function zt(e,t){1&e&&(h.Sb(0,"div",8),h.Sb(1,"label",74),h.Wb(2,75),h.Rb(),h.Sb(3,"div",11),h.Sb(4,"div",76),h.Nb(5,"input",77),h.Sb(6,"label",78),h.Wb(7,79),h.Rb(),h.Rb(),h.Rb(),h.Rb())}function Ct(e,t){if(1&e&&(h.Sb(0,"div"),h.Sb(1,"div",8),h.Sb(2,"label",49),h.Wb(3,50),h.Rb(),h.Sb(4,"div",11),h.Sb(5,"select",51),h.Mc(6,ut,2,2,"option",20),h.Rb(),h.Rb(),h.Rb(),h.Mc(7,gt,12,4,"div",52),h.Mc(8,yt,8,5,"div",52),h.Mc(9,zt,8,0,"div",52),h.Rb()),2&e){const e=h.ic(2);h.yb(6),h.pc("ngForOf",e.pgAutoscaleModes),h.yb(1),h.pc("ngIf","on"!==e.form.getValue("pgAutoscaleMode")),h.yb(1),h.pc("ngIf",e.isReplicated),h.yb(1),h.pc("ngIf",e.info.is_all_bluestore&&e.isErasure)}}function It(e,t){1&e&&(h.Sb(0,"option",18),h.Wb(1,94),h.Rb())}function Nt(e,t){1&e&&(h.Sb(0,"option",95),h.Wb(1,96),h.Rb()),2&e&&h.pc("ngValue",null)}function _t(e,t){1&e&&(h.Sb(0,"option",95),h.Wb(1,97),h.Rb()),2&e&&h.pc("ngValue",null)}function Mt(e,t){if(1&e&&(h.Sb(0,"option",95),h.Oc(1),h.Rb()),2&e){const e=t.$implicit;h.pc("ngValue",e),h.yb(1),h.Qc(" ",e.name," ")}}const Tt=function(e){return[e]};function $t(e,t){if(1&e){const e=h.Tb();h.Sb(0,"button",98),h.gc("click",(function(){return h.Dc(e),h.ic(4).addErasureCodeProfile()})),h.Nb(1,"i",90),h.Rb()}if(2&e){const e=h.ic(4);h.yb(1),h.pc("ngClass",h.uc(1,Tt,e.icons.add))}}function wt(e,t){if(1&e){const e=h.Tb();h.Sb(0,"button",99,100),h.Yb(2,101),h.gc("click",(function(){return h.Dc(e),h.ic(4).deleteErasureCodeProfile()})),h.Nb(3,"i",90),h.Rb()}if(2&e){const e=h.ic(4);h.yb(3),h.pc("ngClass",h.uc(1,Tt,e.icons.trash))}}const Dt=function(){return["name"]};function Et(e,t){if(1&e&&h.Nb(0,"cd-table-key-value",112),2&e){const e=h.ic(5);h.pc("renderObjects",!0)("hideKeys",h.tc(4,Dt))("data",e.form.getValue("erasureProfile"))("autoReload",!1)}}function kt(e,t){1&e&&(h.Sb(0,"span"),h.Wb(1,115),h.Rb())}function Pt(e,t){if(1&e&&(h.Sb(0,"li"),h.Oc(1),h.Rb()),2&e){const e=t.$implicit;h.yb(1),h.Qc(" ",e," ")}}function xt(e,t){if(1&e&&(h.Sb(0,"ul"),h.Mc(1,Pt,2,1,"li",116),h.Rb()),2&e){const e=h.ic(6);h.yb(1),h.pc("ngForOf",e.ecpUsage)}}function At(e,t){if(1&e&&(h.Mc(0,kt,2,0,"ng-template",null,113,h.Nc),h.Mc(2,xt,2,1,"ul",114)),2&e){const e=h.Ac(1),t=h.ic(5);h.yb(2),h.pc("ngIf",t.ecpUsage)("ngIfElse",e)}}function Ot(e,t){if(1&e&&(h.Sb(0,"span",102),h.Sb(1,"ul",103,104),h.Sb(3,"li",105),h.Sb(4,"a",106),h.Wb(5,107),h.Rb(),h.Mc(6,Et,1,5,"ng-template",108),h.Rb(),h.Sb(7,"li",109),h.Sb(8,"a",106),h.Wb(9,110),h.Rb(),h.Mc(10,At,3,2,"ng-template",108),h.Rb(),h.Rb(),h.Nb(11,"div",111),h.Rb()),2&e){const e=h.Ac(2);h.yb(11),h.pc("ngbNavOutlet",e)}}const Vt=function(e){return{active:e}};function Wt(e,t){if(1&e){const e=h.Tb();h.Sb(0,"div",8),h.Sb(1,"label",81),h.Wb(2,82),h.Rb(),h.Sb(3,"div",11),h.Sb(4,"div",83),h.Sb(5,"select",84),h.Mc(6,It,2,0,"option",85),h.Mc(7,Nt,2,1,"option",86),h.Mc(8,_t,2,1,"option",86),h.Mc(9,Mt,2,2,"option",87),h.Rb(),h.Sb(10,"span",88),h.Sb(11,"button",89),h.gc("click",(function(){h.Dc(e);const t=h.ic(3);return t.data.erasureInfo=!t.data.erasureInfo})),h.Nb(12,"i",90),h.Rb(),h.Mc(13,$t,2,3,"button",91),h.Mc(14,wt,4,3,"button",92),h.Rb(),h.Rb(),h.Mc(15,Ot,12,1,"span",93),h.Rb(),h.Rb()}if(2&e){const e=h.ic(3);h.yb(6),h.pc("ngIf",!e.ecProfiles),h.yb(1),h.pc("ngIf",e.ecProfiles&&0===e.ecProfiles.length),h.yb(1),h.pc("ngIf",e.ecProfiles&&e.ecProfiles.length>0),h.yb(1),h.pc("ngForOf",e.ecProfiles),h.yb(2),h.pc("ngClass",h.uc(9,Vt,e.data.erasureInfo)),h.yb(1),h.pc("ngClass",h.uc(11,Tt,e.icons.questionCircle)),h.yb(1),h.pc("ngIf",!e.editing),h.yb(1),h.pc("ngIf",!e.editing),h.yb(1),h.pc("ngIf",e.data.erasureInfo&&e.form.getValue("erasureProfile"))}}function Ft(e,t){1&e&&(h.Sb(0,"div",8),h.Sb(1,"label",117),h.Wb(2,118),h.Rb(),h.Sb(3,"div",11),h.Sb(4,"span",56),h.Wb(5,119),h.Rb(),h.Rb(),h.Rb())}function Lt(e,t){1&e&&(h.Sb(0,"span",56),h.Sb(1,"span"),h.Wb(2,122),h.Rb(),h.Oc(3,"\xa0 "),h.Rb())}function qt(e,t){if(1&e&&(h.Sb(0,"option",95),h.Oc(1),h.Rb()),2&e){const e=t.$implicit;h.pc("ngValue",e),h.yb(1),h.Qc(" ",e.rule_name," ")}}function Bt(e,t){if(1&e){const e=h.Tb();h.Sb(0,"button",98),h.gc("click",(function(){return h.Dc(e),h.ic(5).addCrushRule()})),h.Nb(1,"i",90),h.Rb()}if(2&e){const e=h.ic(5);h.yb(1),h.pc("ngClass",h.uc(1,Tt,e.icons.add))}}function Ut(e,t){if(1&e){const e=h.Tb();h.Sb(0,"button",99,128),h.Yb(2,129),h.gc("click",(function(){return h.Dc(e),h.ic(5).deleteCrushRule()})),h.Nb(3,"i",90),h.Rb()}if(2&e){const e=h.ic(5);h.yb(3),h.pc("ngClass",h.uc(1,Tt,e.icons.trash))}}const Gt=function(){return["steps","ruleset","type","rule_name"]};function jt(e,t){if(1&e&&h.Nb(0,"cd-table-key-value",112),2&e){const e=h.ic(6);h.pc("renderObjects",!1)("hideKeys",h.tc(4,Gt))("data",e.form.getValue("crushRule"))("autoReload",!1)}}function Qt(e,t){if(1&e&&(h.Sb(0,"li"),h.Oc(1),h.Rb()),2&e){const e=t.$implicit,i=h.ic(7);h.yb(1),h.Qc(" ",i.describeCrushStep(e)," ")}}function Jt(e,t){if(1&e&&(h.Sb(0,"ol"),h.Mc(1,Qt,2,1,"li",116),h.Rb()),2&e){const e=h.ic(6);h.yb(1),h.pc("ngForOf",e.form.get("crushRule").value.steps)}}function Kt(e,t){1&e&&(h.Sb(0,"span"),h.Wb(1,138),h.Rb())}function Yt(e,t){if(1&e&&(h.Sb(0,"li"),h.Oc(1),h.Rb()),2&e){const e=t.$implicit;h.yb(1),h.Qc(" ",e," ")}}function Ht(e,t){if(1&e&&(h.Sb(0,"ul"),h.Mc(1,Yt,2,1,"li",116),h.Rb()),2&e){const e=h.ic(7);h.yb(1),h.pc("ngForOf",e.crushUsage)}}function Xt(e,t){if(1&e&&(h.Mc(0,Kt,2,0,"ng-template",null,137,h.Nc),h.Mc(2,Ht,2,1,"ul",114)),2&e){const e=h.Ac(1),t=h.ic(6);h.yb(2),h.pc("ngIf",t.crushUsage)("ngIfElse",e)}}function Zt(e,t){if(1&e&&(h.Sb(0,"div",130),h.Sb(1,"ul",103,131),h.Sb(3,"li",132),h.Sb(4,"a",106),h.Wb(5,133),h.Rb(),h.Mc(6,jt,1,5,"ng-template",108),h.Rb(),h.Sb(7,"li",134),h.Sb(8,"a",106),h.Wb(9,135),h.Rb(),h.Mc(10,Jt,2,1,"ng-template",108),h.Rb(),h.Sb(11,"li",109),h.Sb(12,"a",106),h.Wb(13,136),h.Rb(),h.Mc(14,Xt,3,2,"ng-template",108),h.Rb(),h.Rb(),h.Nb(15,"div",111),h.Rb()),2&e){const e=h.Ac(2);h.yb(15),h.pc("ngbNavOutlet",e)}}function ei(e,t){1&e&&(h.Sb(0,"span",42),h.Wb(1,139),h.Rb())}function ti(e,t){1&e&&(h.Sb(0,"span",42),h.Wb(1,140),h.Rb())}function ii(e,t){if(1&e){const e=h.Tb();h.Sb(0,"div"),h.Sb(1,"div",83),h.Sb(2,"select",123),h.Sb(3,"option",95),h.Wb(4,124),h.Rb(),h.Mc(5,qt,2,2,"option",87),h.Rb(),h.Sb(6,"span",88),h.Sb(7,"button",125),h.Yb(8,126),h.gc("click",(function(){h.Dc(e);const t=h.ic(4);return t.data.crushInfo=!t.data.crushInfo})),h.Nb(9,"i",90),h.Rb(),h.Mc(10,Bt,2,3,"button",91),h.Mc(11,Ut,4,3,"button",92),h.Rb(),h.Rb(),h.Mc(12,Zt,16,1,"div",127),h.Mc(13,ei,2,0,"span",14),h.Mc(14,ti,2,0,"span",14),h.Rb()}if(2&e){h.ic(3);const e=h.Ac(2),t=h.ic();h.yb(3),h.pc("ngValue",null),h.yb(2),h.pc("ngForOf",t.current.rules),h.yb(2),h.pc("ngClass",h.uc(9,Vt,t.data.crushInfo)),h.yb(2),h.pc("ngClass",h.uc(11,Tt,t.icons.questionCircle)),h.yb(1),h.pc("ngIf",t.isReplicated&&!t.editing),h.yb(1),h.pc("ngIf",t.isReplicated&&!t.editing),h.yb(1),h.pc("ngIf",t.data.crushInfo&&t.form.getValue("crushRule")),h.yb(1),h.pc("ngIf",t.form.showError("crushRule",e,"required")),h.yb(1),h.pc("ngIf",t.form.showError("crushRule",e,"tooFewOsds"))}}function ai(e,t){if(1&e&&(h.Sb(0,"div",8),h.Sb(1,"label",117),h.Wb(2,120),h.Rb(),h.Sb(3,"div",11),h.Mc(4,Lt,4,0,"ng-template",null,121,h.Nc),h.Mc(6,ii,15,13,"div",114),h.Rb(),h.Rb()),2&e){const e=h.Ac(5),t=h.ic(3);h.yb(6),h.pc("ngIf",t.current.rules.length>0)("ngIfElse",e)}}function oi(e,t){if(1&e&&(h.Sb(0,"div"),h.Sb(1,"legend"),h.Wb(2,80),h.Rb(),h.Mc(3,Wt,16,13,"div",52),h.Mc(4,Ft,6,0,"div",52),h.Mc(5,ai,7,2,"div",52),h.Rb()),2&e){const e=h.ic(2);h.yb(3),h.pc("ngIf",e.isErasure),h.yb(1),h.pc("ngIf",e.isErasure&&!e.editing),h.yb(1),h.pc("ngIf",e.isReplicated||e.editing)}}function si(e,t){if(1&e&&(h.Sb(0,"option",47),h.Oc(1),h.Rb()),2&e){const e=t.$implicit;h.pc("value",e),h.yb(1),h.Qc(" ",e," ")}}function ci(e,t){1&e&&(h.Sb(0,"option",18),h.Wb(1,161),h.Rb())}function ni(e,t){1&e&&(h.Sb(0,"option",18),h.Wb(1,162),h.Rb())}function li(e,t){if(1&e&&(h.Sb(0,"option",47),h.Oc(1),h.Rb()),2&e){const e=t.$implicit;h.pc("value",e),h.yb(1),h.Qc(" ",e," ")}}function ri(e,t){1&e&&(h.Sb(0,"span",42),h.Wb(1,163),h.Rb())}function bi(e,t){1&e&&(h.Sb(0,"span",42),h.Wb(1,164),h.Rb())}function di(e,t){1&e&&(h.Sb(0,"span",42),h.Wb(1,165),h.Rb())}function ui(e,t){1&e&&(h.Sb(0,"span",42),h.Wb(1,166),h.Rb())}function fi(e,t){1&e&&(h.Sb(0,"span",42),h.Wb(1,167),h.Rb())}function pi(e,t){if(1&e&&(h.Sb(0,"div"),h.Sb(1,"div",8),h.Sb(2,"label",146),h.Wb(3,147),h.Rb(),h.Sb(4,"div",11),h.Sb(5,"select",148),h.Mc(6,ci,2,0,"option",85),h.Mc(7,ni,2,0,"option",85),h.Mc(8,li,2,2,"option",20),h.Rb(),h.Rb(),h.Rb(),h.Sb(9,"div",8),h.Sb(10,"label",149),h.Wb(11,150),h.Rb(),h.Sb(12,"div",11),h.Sb(13,"input",151),h.Yb(14,152),h.Rb(),h.Mc(15,ri,2,0,"span",14),h.Mc(16,bi,2,0,"span",14),h.Rb(),h.Rb(),h.Sb(17,"div",8),h.Sb(18,"label",153),h.Wb(19,154),h.Rb(),h.Sb(20,"div",11),h.Sb(21,"input",155),h.Yb(22,156),h.Rb(),h.Mc(23,di,2,0,"span",14),h.Mc(24,ui,2,0,"span",14),h.Rb(),h.Rb(),h.Sb(25,"div",8),h.Sb(26,"label",157),h.Wb(27,158),h.Rb(),h.Sb(28,"div",11),h.Sb(29,"input",159),h.Yb(30,160),h.Rb(),h.Mc(31,fi,2,0,"span",14),h.Rb(),h.Rb(),h.Rb()),2&e){h.ic(2);const e=h.Ac(2),t=h.ic();h.yb(6),h.pc("ngIf",!t.info.compression_algorithms),h.yb(1),h.pc("ngIf",t.info.compression_algorithms&&0===t.info.compression_algorithms.length),h.yb(1),h.pc("ngForOf",t.info.compression_algorithms),h.yb(7),h.pc("ngIf",t.form.showError("minBlobSize",e,"min")),h.yb(1),h.pc("ngIf",t.form.showError("minBlobSize",e,"maximum")),h.yb(7),h.pc("ngIf",t.form.showError("maxBlobSize",e,"min")),h.yb(1),h.pc("ngIf",t.form.showError("maxBlobSize",e,"minimum")),h.yb(7),h.pc("ngIf",t.form.showError("ratio",e,"min")||t.form.showError("ratio",e,"max"))}}function hi(e,t){if(1&e&&(h.Sb(0,"div",141),h.Sb(1,"legend"),h.Wb(2,142),h.Rb(),h.Sb(3,"div",8),h.Sb(4,"label",143),h.Wb(5,144),h.Rb(),h.Sb(6,"div",11),h.Sb(7,"select",145),h.Mc(8,si,2,2,"option",20),h.Rb(),h.Rb(),h.Rb(),h.Mc(9,pi,32,8,"div",21),h.Rb()),2&e){const e=h.ic(2);h.yb(8),h.pc("ngForOf",e.info.compression_modes),h.yb(1),h.pc("ngIf",e.hasCompressionEnabled())}}function mi(e,t){1&e&&(h.Sb(0,"span",42),h.Wb(1,168),h.Rb())}function gi(e,t){if(1&e){const e=h.Tb();h.Sb(0,"div",1),h.Sb(1,"form",2,3),h.Sb(3,"div",4),h.Sb(4,"div",5),h.Wb(5,6),h.jc(6,"titlecase"),h.jc(7,"upperFirst"),h.Rb(),h.Sb(8,"div",7),h.Sb(9,"div",8),h.Sb(10,"label",9),h.Wb(11,10),h.Rb(),h.Sb(12,"div",11),h.Sb(13,"input",12),h.Yb(14,13),h.Rb(),h.Mc(15,ct,2,0,"span",14),h.Mc(16,nt,2,0,"span",14),h.Mc(17,lt,2,0,"span",14),h.Mc(18,rt,2,0,"span",14),h.Rb(),h.Rb(),h.Sb(19,"div",8),h.Sb(20,"label",15),h.Wb(21,16),h.Rb(),h.Sb(22,"div",11),h.Sb(23,"select",17),h.Sb(24,"option",18),h.Wb(25,19),h.Rb(),h.Mc(26,bt,2,2,"option",20),h.Rb(),h.Mc(27,dt,2,0,"span",14),h.Rb(),h.Rb(),h.Mc(28,Ct,10,4,"div",21),h.Sb(29,"div",8),h.Sb(30,"label",22),h.Wb(31,23),h.Rb(),h.Sb(32,"div",11),h.Sb(33,"cd-select-badges",24),h.gc("selection",(function(){return h.Dc(e),h.ic().appSelection()})),h.Rb(),h.Rb(),h.Rb(),h.Mc(34,oi,6,3,"div",21),h.Mc(35,hi,10,2,"div",25),h.Sb(36,"div"),h.Sb(37,"legend"),h.Wb(38,26),h.Rb(),h.Sb(39,"div",8),h.Sb(40,"label",27),h.Qb(41),h.Wb(42,28),h.Pb(),h.Sb(43,"cd-helper"),h.Sb(44,"span"),h.Wb(45,29),h.Rb(),h.Nb(46,"br"),h.Sb(47,"span"),h.Wb(48,30),h.Rb(),h.Rb(),h.Rb(),h.Sb(49,"div",11),h.Sb(50,"input",31),h.Yb(51,32),h.Rb(),h.Rb(),h.Rb(),h.Sb(52,"div",8),h.Sb(53,"label",33),h.Qb(54),h.Wb(55,34),h.Pb(),h.Sb(56,"cd-helper"),h.Sb(57,"span"),h.Wb(58,35),h.Rb(),h.Nb(59,"br"),h.Sb(60,"span"),h.Wb(61,36),h.Rb(),h.Rb(),h.Rb(),h.Sb(62,"div",11),h.Nb(63,"input",37),h.Mc(64,mi,2,0,"span",14),h.Rb(),h.Rb(),h.Rb(),h.Sb(65,"div",38),h.Sb(66,"cd-rbd-configuration-form",39),h.gc("changes",(function(t){return h.Dc(e),h.ic().currentConfigurationValues=t()})),h.Rb(),h.Rb(),h.Rb(),h.Sb(67,"div",40),h.Sb(68,"cd-form-button-panel",41),h.gc("submitActionEvent",(function(){return h.Dc(e),h.ic().submit()})),h.jc(69,"titlecase"),h.jc(70,"upperFirst"),h.Rb(),h.Rb(),h.Rb(),h.Rb(),h.Rb()}if(2&e){const e=h.Ac(2),t=h.ic();h.yb(1),h.pc("formGroup",t.form),h.yb(6),h.ac(h.kc(6,24,t.action))(h.kc(7,26,t.resource)),h.Xb(5),h.yb(8),h.pc("ngIf",t.form.showError("name",e,"required")),h.yb(1),h.pc("ngIf",t.form.showError("name",e,"uniqueName")),h.yb(1),h.pc("ngIf",t.form.showError("name",e,"rbdPool")),h.yb(1),h.pc("ngIf",t.form.showError("name",e,"pattern")),h.yb(8),h.pc("ngForOf",t.data.poolTypes),h.yb(1),h.pc("ngIf",t.form.showError("poolType",e,"required")),h.yb(1),h.pc("ngIf",t.isReplicated||t.isErasure),h.yb(5),h.pc("customBadges",!0)("customBadgeValidators",t.data.applications.validators)("messages",t.data.applications.messages)("data",t.data.applications.selected)("options",t.data.applications.available)("selectionLimit",4),h.yb(1),h.pc("ngIf",t.isErasure||t.isReplicated),h.yb(1),h.pc("ngIf",t.info.is_all_bluestore),h.yb(29),h.pc("ngIf",t.form.showError("max_objects",e,"min")),h.yb(1),h.pc("hidden",t.isErasure||-1===t.data.applications.selected.indexOf("rbd")),h.yb(1),h.pc("form",t.form)("initializeData",t.initializeConfigData),h.yb(2),h.pc("form",t.form)("submitText",h.kc(69,28,t.action)+" "+h.kc(70,30,t.resource))}}let Si=(()=>{class e extends I.a{constructor(e,t,i,a,o,s,c,l,r,b,d){super(),this.dimlessBinaryPipe=e,this.route=t,this.router=i,this.modalService=a,this.poolService=o,this.authStorageService=s,this.formatter=c,this.taskWrapper=l,this.ecpService=r,this.crushRuleService=b,this.actionLabels=d,this.editing=!1,this.isReplicated=!1,this.isErasure=!1,this.data=new Ke,this.externalPgChange=!1,this.current={rules:[]},this.initializeConfigData=new f.a(1),this.currentConfigurationValues={},this.icons=C.a,this.crushUsage=void 0,this.ecpUsage=void 0,this.editing=this.router.url.startsWith("/pool/"+n.e.EDIT),this.action=this.editing?this.actionLabels.EDIT:this.actionLabels.CREATE,this.resource="pool",this.authenticate(),this.createForm()}authenticate(){if(this.permission=this.authStorageService.getPermissions().pool,!this.permission.read||!this.permission.update&&this.editing||!this.permission.create&&!this.editing)throw new p.b}createForm(){const e=new N.a({mode:new o.h("none"),algorithm:new o.h(""),minBlobSize:new o.h("",{updateOn:"blur"}),maxBlobSize:new o.h("",{updateOn:"blur"}),ratio:new o.h("",{updateOn:"blur"})});this.form=new N.a({name:new o.h("",{validators:[o.A.pattern(/^[.A-Za-z0-9_/-]+$/),o.A.required,_.a.custom("rbdPool",()=>this.form&&this.form.getValue("name").includes("/")&&this.data&&-1!==this.data.applications.selected.indexOf("rbd"))]}),poolType:new o.h("",{validators:[o.A.required]}),crushRule:new o.h(null,{validators:[_.a.custom("tooFewOsds",e=>this.info&&e&&this.info.osd_count<e.min_size),_.a.custom("required",e=>this.isReplicated&&this.info.crush_rules_replicated.length>0&&!e)]}),size:new o.h("",{updateOn:"blur"}),erasureProfile:new o.h(null),pgNum:new o.h("",{validators:[o.A.required,o.A.min(1)]}),pgAutoscaleMode:new o.h(null),ecOverwrites:new o.h(!1),compression:e,max_bytes:new o.h(""),max_objects:new o.h(0,{validators:[o.A.min(0)]})},[_.a.custom("form",()=>null)])}ngOnInit(){this.poolService.getInfo().subscribe(e=>{this.initInfo(e),this.editing?this.initEditMode():(this.setAvailableApps(),this.loadingReady()),this.listenToChanges(),this.setComplexValidators()})}initInfo(e){this.pgAutoscaleModes=e.pg_autoscale_modes,this.form.silentSet("pgAutoscaleMode",e.pg_autoscale_default_mode),this.form.silentSet("algorithm",e.bluestore_compression_algorithm),this.info=e,this.initEcp(e.erasure_code_profiles)}initEcp(e){this.setListControlStatus("erasureProfile",e),this.ecProfiles=e}setListControlStatus(e,t){const i=this.form.get(e),a=i.value;1!==t.length||a&&u.a.isEqual(a,t[0])?0===t.length&&a&&i.setValue(null):i.setValue(t[0]),t.length<=1?i.enabled&&i.disable():i.disabled&&i.enable()}initEditMode(){this.disableForEdit(),this.routeParamsSubscribe=this.route.params.subscribe(e=>this.poolService.get(e.name).subscribe(e=>{this.data.pool=e,this.initEditFormData(e),this.loadingReady()}))}disableForEdit(){["poolType","crushRule","size","erasureProfile","ecOverwrites"].forEach(e=>this.form.get(e).disable())}initEditFormData(e){this.initializeConfigData.next({initialData:e.configuration,sourceType:M.a.pool}),this.poolTypeChange(e.type);const t=this.info.crush_rules_replicated.concat(this.info.crush_rules_erasure),i={name:e.pool_name,poolType:e.type,crushRule:t.find(t=>t.rule_name===e.crush_rule),size:e.size,erasureProfile:this.ecProfiles.find(t=>t.name===e.erasure_code_profile),pgAutoscaleMode:e.pg_autoscale_mode,pgNum:e.pg_num,ecOverwrites:e.flags_names.includes("ec_overwrites"),mode:e.options.compression_mode,algorithm:e.options.compression_algorithm,minBlobSize:this.dimlessBinaryPipe.transform(e.options.compression_min_blob_size),maxBlobSize:this.dimlessBinaryPipe.transform(e.options.compression_max_blob_size),ratio:e.options.compression_required_ratio,max_bytes:this.dimlessBinaryPipe.transform(e.quota_max_bytes),max_objects:e.quota_max_objects};Object.keys(i).forEach(e=>{const t=i[e];u.a.isUndefined(t)||""===t||this.form.silentSet(e,t)}),this.data.pgs=this.form.getValue("pgNum"),this.setAvailableApps(this.data.applications.default.concat(e.application_metadata)),this.data.applications.selected=e.application_metadata}setAvailableApps(e=this.data.applications.default){this.data.applications.available=u.a.uniq(e.sort()).map(e=>new z.a(!1,e,""))}listenToChanges(){this.listenToChangesDuringAddEdit(),this.editing||this.listenToChangesDuringAdd()}listenToChangesDuringAddEdit(){this.form.get("pgNum").valueChanges.subscribe(e=>{const t=e-this.data.pgs;1===Math.abs(t)&&2!==e?this.doPgPowerJump(t):this.data.pgs=e})}doPgPowerJump(e){const t=this.calculatePgPower()+e;this.setPgs(-1===e?Math.round(t):Math.floor(t))}calculatePgPower(e=this.form.getValue("pgNum")){return Math.log(e)/Math.log(2)}setPgs(e){const t=Math.pow(2,e<0?0:e);this.data.pgs=t,this.form.silentSet("pgNum",t)}listenToChangesDuringAdd(){this.form.get("poolType").valueChanges.subscribe(e=>{this.poolTypeChange(e)}),this.form.get("crushRule").valueChanges.subscribe(e=>{this.crushDeletionBtn&&this.crushDeletionBtn.isOpen()&&this.crushDeletionBtn.close(),e&&(this.setCorrectMaxSize(e),this.crushRuleIsUsedBy(e.rule_name),this.replicatedRuleChange(),this.pgCalc())}),this.form.get("size").valueChanges.subscribe(()=>{this.pgCalc()}),this.form.get("erasureProfile").valueChanges.subscribe(e=>{this.ecpDeletionBtn&&this.ecpDeletionBtn.isOpen()&&this.ecpDeletionBtn.close(),e&&(this.ecpIsUsedBy(e.name),this.pgCalc())}),this.form.get("mode").valueChanges.subscribe(()=>{["minBlobSize","maxBlobSize","ratio"].forEach(e=>{this.form.get(e).updateValueAndValidity({emitEvent:!1})})}),this.form.get("minBlobSize").valueChanges.subscribe(()=>{this.form.get("maxBlobSize").updateValueAndValidity({emitEvent:!1})}),this.form.get("maxBlobSize").valueChanges.subscribe(()=>{this.form.get("minBlobSize").updateValueAndValidity({emitEvent:!1})})}poolTypeChange(e){if("replicated"===e?this.setTypeBooleans(!0,!1):this.setTypeBooleans(!1,"erasure"===e),!e||!this.info)return void(this.current.rules=[]);const t=this.info["crush_rules_"+e]||[];this.current.rules=t,this.editing||(this.isReplicated&&this.setListControlStatus("crushRule",t),this.replicatedRuleChange(),this.pgCalc())}setTypeBooleans(e,t){this.isReplicated=e,this.isErasure=t}replicatedRuleChange(){if(!this.isReplicated)return;const e=this.form.get("size");let t=this.form.getValue("size")||3;const i=this.getMinSize(),a=this.getMaxSize();t<i?t=i:t>a&&(t=a),t!==e.value&&this.form.silentSet("size",t)}getMinSize(){if(!this.info||this.info.osd_count<1)return 0;const e=this.form.getValue("crushRule");return e?e.min_size:1}getMaxSize(){const e=this.form.getValue("crushRule");return this.info?e?e.usable_size:Math.min(this.info.osd_count,3):0}pgCalc(){const e=this.form.getValue("poolType");if(!this.info||this.form.get("pgNum").dirty||!e)return;const t=100*this.info.osd_count,i=this.isReplicated?this.replicatedPgCalc(t):this.erasurePgCalc(t);if(!i)return;const a=this.data.pgs;this.alignPgs(i),this.externalPgChange||(this.externalPgChange=a!==this.data.pgs)}setCorrectMaxSize(e=this.form.getValue("crushRule")){if(!e)return;const t=R.searchFailureDomains(this.info.nodes,e.steps[0].item_name)[e.steps[1].type];e.usable_size=Math.min(t?t.length:e.max_size,e.max_size)}replicatedPgCalc(e){const t=this.form.get("size"),i=t.value;return t.valid&&i>0?e/i:0}erasurePgCalc(e){const t=this.form.get("erasureProfile"),i=t.value;return(t.valid||t.disabled)&&i?e/(i.k+i.m):0}alignPgs(e=this.form.getValue("pgNum")){this.setPgs(Math.round(this.calculatePgPower(e<1?1:e)))}setComplexValidators(){this.editing?this.form.get("name").setValidators([this.form.get("name").validator,_.a.custom("uniqueName",e=>this.data.pool&&this.info&&-1!==this.info.pool_names.indexOf(e)&&this.info.pool_names.indexOf(e)!==this.info.pool_names.indexOf(this.data.pool.pool_name))]):(_.a.validateIf(this.form.get("size"),()=>this.isReplicated,[_.a.custom("min",e=>this.form.getValue("size")&&e<this.getMinSize()),_.a.custom("max",e=>this.form.getValue("size")&&this.getMaxSize()<e)]),this.form.get("name").setValidators([this.form.get("name").validator,_.a.custom("uniqueName",e=>this.info&&-1!==this.info.pool_names.indexOf(e))])),this.setCompressionValidators()}setCompressionValidators(){_.a.validateIf(this.form.get("minBlobSize"),()=>this.hasCompressionEnabled(),[o.A.min(0),_.a.custom("maximum",e=>this.oddBlobSize(e,this.form.getValue("maxBlobSize")))]),_.a.validateIf(this.form.get("maxBlobSize"),()=>this.hasCompressionEnabled(),[o.A.min(0),_.a.custom("minimum",e=>this.oddBlobSize(this.form.getValue("minBlobSize"),e))]),_.a.validateIf(this.form.get("ratio"),()=>this.hasCompressionEnabled(),[o.A.min(0),o.A.max(1)])}oddBlobSize(e,t){const i=this.formatter.toBytes(e),a=this.formatter.toBytes(t);return Boolean(i&&a&&i>=a)}hasCompressionEnabled(){return this.form.getValue("mode")&&"none"!==this.form.get("mode").value.toLowerCase()}describeCrushStep(e){return[e.op.replace("_"," "),e.item_name||"",e.type?e.num+" type "+e.type:""].join(" ")}addErasureCodeProfile(){this.addModal(Qe,e=>this.reloadECPs(e))}addModal(e,t){this.hideOpenTooltips(),this.modalService.show(e).componentInstance.submitAction.subscribe(e=>{t(e.name)})}hideOpenTooltips(){const e=e=>e&&e.isOpen()&&e.close();e(this.ecpDeletionBtn),e(this.crushDeletionBtn)}reloadECPs(e){this.reloadList({newItemName:e,getInfo:()=>this.ecpService.list(),initInfo:e=>this.initEcp(e),findNewItem:()=>this.ecProfiles.find(t=>t.name===e),controlName:"erasureProfile"})}reloadList({newItemName:e,getInfo:t,initInfo:i,findNewItem:a,controlName:o}){this.modalSubscription&&this.modalSubscription.unsubscribe(),t().subscribe(t=>{if(i(t),!e)return;const s=a();s&&this.form.get(o).setValue(s)})}deleteErasureCodeProfile(){this.deletionModal({value:this.form.getValue("erasureProfile"),usage:this.ecpUsage,deletionBtn:this.ecpDeletionBtn,dataName:"erasureInfo",getTabs:()=>this.ecpInfoTabs,tabPosition:"used-by-pools",nameAttribute:"name",itemDescription:"erasure code profile",reloadFn:()=>this.reloadECPs(),deleteFn:e=>this.ecpService.delete(e),taskName:"ecp/delete"})}deletionModal({value:e,usage:t,deletionBtn:i,dataName:a,getTabs:o,tabPosition:s,nameAttribute:c,itemDescription:n,reloadFn:l,deleteFn:r,taskName:b}){if(!e)return;if(t)return i.toggle(),this.data[a]=!0,void setTimeout(()=>{const e=o();e&&e.select(s)},50);const d=e[c];this.modalService.show(y.a,{itemDescription:n,itemNames:[d],submitActionObservable:()=>{const e=r(d);return e.subscribe(()=>l()),this.taskWrapper.wrapTaskAroundCall({task:new T.a(b,{name:d}),call:e})}})}addCrushRule(){this.addModal(ee,e=>this.reloadCrushRules(e))}reloadCrushRules(e){this.reloadList({newItemName:e,getInfo:()=>this.poolService.getInfo(),initInfo:e=>{this.initInfo(e),this.poolTypeChange("replicated")},findNewItem:()=>this.info.crush_rules_replicated.find(t=>t.rule_name===e),controlName:"crushRule"})}deleteCrushRule(){this.deletionModal({value:this.form.getValue("crushRule"),usage:this.crushUsage,deletionBtn:this.crushDeletionBtn,dataName:"crushInfo",getTabs:()=>this.crushInfoTabs,tabPosition:"used-by-pools",nameAttribute:"rule_name",itemDescription:"crush rule",reloadFn:()=>this.reloadCrushRules(),deleteFn:e=>this.crushRuleService.delete(e),taskName:"crushRule/delete"})}crushRuleIsUsedBy(e){this.crushUsage=e?this.info.used_rules[e]:void 0}ecpIsUsedBy(e){this.ecpUsage=e?this.info.used_profiles[e]:void 0}submit(){if(this.form.invalid)return void this.form.setErrors({cdSubmitButton:!0});const e={pool:this.form.getValue("name")};this.assignFormFields(e,[{externalFieldName:"pool_type",formControlName:"poolType"},{externalFieldName:"pg_autoscale_mode",formControlName:"pgAutoscaleMode",editable:!0},{externalFieldName:"pg_num",formControlName:"pgNum",replaceFn:e=>"on"===this.form.getValue("pgAutoscaleMode")?1:e,editable:!0},this.isReplicated?{externalFieldName:"size",formControlName:"size"}:{externalFieldName:"erasure_code_profile",formControlName:"erasureProfile",attr:"name"},{externalFieldName:"rule_name",formControlName:"crushRule",replaceFn:e=>this.isReplicated?e&&e.rule_name:void 0},{externalFieldName:"quota_max_bytes",formControlName:"max_bytes",replaceFn:this.formatter.toBytes,editable:!0,resetValue:this.editing?0:void 0},{externalFieldName:"quota_max_objects",formControlName:"max_objects",editable:!0,resetValue:this.editing?0:void 0}]),this.info.is_all_bluestore&&(this.assignFormField(e,{externalFieldName:"flags",formControlName:"ecOverwrites",replaceFn:()=>this.isErasure?["ec_overwrites"]:void 0}),"none"!==this.form.getValue("mode")?this.assignFormFields(e,[{externalFieldName:"compression_mode",formControlName:"mode",editable:!0,replaceFn:e=>this.hasCompressionEnabled()&&e},{externalFieldName:"compression_algorithm",formControlName:"algorithm",editable:!0},{externalFieldName:"compression_min_blob_size",formControlName:"minBlobSize",replaceFn:this.formatter.toBytes,editable:!0,resetValue:0},{externalFieldName:"compression_max_blob_size",formControlName:"maxBlobSize",replaceFn:this.formatter.toBytes,editable:!0,resetValue:0},{externalFieldName:"compression_required_ratio",formControlName:"ratio",editable:!0,resetValue:0}]):this.editing&&this.assignFormFields(e,[{externalFieldName:"compression_mode",formControlName:"mode",editable:!0,replaceFn:()=>"unset"},{externalFieldName:"srcpool",formControlName:"name",editable:!0,replaceFn:()=>this.data.pool.pool_name}]));const t=this.data.applications.selected;(t.length>0||this.editing)&&(e.application_metadata=t),this.isReplicated&&!u.a.isEmpty(this.currentConfigurationValues)&&(e.configuration=this.currentConfigurationValues),this.triggerApiTask(e)}assignFormFields(e,t){t.forEach(t=>this.assignFormField(e,t))}assignFormField(e,{externalFieldName:t,formControlName:i,attr:a,replaceFn:o,editable:s,resetValue:c}){if(this.editing&&(!s||this.form.get(i).pristine))return;const n=this.form.getValue(i);let l=o?o(n):a?u.a.get(n,a):n;if(!n||!l){if(!s||u.a.isUndefined(c))return;l=c}e[t]=l}triggerApiTask(e){this.taskWrapper.wrapTaskAroundCall({task:new T.a("pool/"+(this.editing?n.e.EDIT:n.e.CREATE),{pool_name:e.hasOwnProperty("srcpool")?e.srcpool:e.pool}),call:this.poolService[this.editing?n.e.UPDATE:n.e.CREATE](e)}).subscribe({error:e=>{u.a.isObject(e.error)&&"34"===e.error.code&&this.form.get("pgNum").setErrors({34:!0}),this.form.setErrors({cdSubmitButton:!0})},complete:()=>this.router.navigate(["/pool"])})}appSelection(){this.form.get("name").updateValueAndValidity({emitEvent:!1,onlySelf:!0})}}return e.\u0275fac=function(t){return new(t||e)(h.Mb($.a),h.Mb(s.a),h.Mb(s.e),h.Mb(E.a),h.Mb(v.a),h.Mb(w.a),h.Mb(D.a),h.Mb(k.a),h.Mb(S),h.Mb(g),h.Mb(n.b))},e.\u0275cmp=h.Gb({type:e,selectors:[["cd-pool-form"]],viewQuery:function(e,t){var i;1&e&&(h.Tc(it,!0),h.Tc(at,!0),h.Tc(ot,!0),h.Tc(st,!0)),2&e&&(h.zc(i=h.hc())&&(t.crushInfoTabs=i.first),h.zc(i=h.hc())&&(t.crushDeletionBtn=i.first),h.zc(i=h.hc())&&(t.ecpInfoTabs=i.first),h.zc(i=h.hc())&&(t.ecpDeletionBtn=i.first))},features:[h.vb],decls:1,vars:1,consts:function(){return[["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],["name","form","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"card"],[1,"card-header"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"card-body"],[1,"form-group","row"],["for","name",1,"cd-col-form-label","required"],"Name",[1,"cd-col-form-input"],["id","name","name","name","type","text","formControlName","name","autofocus","",1,"form-control",6,"placeholder"],["placeholder","Name..."],["class","invalid-feedback",4,"ngIf"],["for","poolType",1,"cd-col-form-label","required"],"Pool type",["id","poolType","formControlName","poolType","name","poolType",1,"form-control","custom-select"],["ngValue",""],"-- Select a pool type --",[3,"value",4,"ngFor","ngForOf"],[4,"ngIf"],["for","applications",1,"cd-col-form-label"],"Applications",["id","applications",3,"customBadges","customBadgeValidators","messages","data","options","selectionLimit","selection"],["formGroupName","compression",4,"ngIf"],"Quotas",["for","max_bytes",1,"cd-col-form-label"],"Max bytes","Leave it blank or specify 0 to disable this quota.","A valid quota should be greater than 0.",["id","max_bytes","name","max_bytes","type","text","formControlName","max_bytes","defaultUnit","GiB","cdDimlessBinary","",1,"form-control",6,"placeholder"],["placeholder","e.g., 10GiB"],["for","max_objects",1,"cd-col-form-label"],"Max objects","Leave it blank or specify 0 to disable this quota.","A valid quota should be greater than 0.",["id","max_objects","min","0","name","max_objects","type","number","formControlName","max_objects",1,"form-control"],[3,"hidden"],[3,"form","initializeData","changes"],[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required!","The chosen Ceph pool name is already in use.","It's not possible to create an RBD pool with '/' in the name. Please change the name or remove 'rbd' from the applications list.","Pool name can only contain letters, numbers, '.', '-', '_' or '/'.",[3,"value"],"This field is required!",["for","pgAutoscaleMode",1,"cd-col-form-label"],"PG Autoscale",["id","pgAutoscaleMode","name","pgAutoscaleMode","formControlName","pgAutoscaleMode",1,"form-control","custom-select"],["class","form-group row",4,"ngIf"],["for","pgNum",1,"cd-col-form-label","required"],"Placement groups",["id","pgNum","name","pgNum","formControlName","pgNum","min","1","type","number","required","",1,"form-control",3,"focus","blur"],[1,"form-text","text-muted"],["section","pgs",6,"docText"],["docText","Calculation help"],["class","form-text text-muted",4,"ngIf"],"This field is required!","At least one placement group is needed!","Your cluster can't handle this many PGs. Please recalculate the PG amount needed.","The current PGs settings were calculated for you, you should make sure the values suit your needs before submit.",["for","size",1,"cd-col-form-label","required"],"Replicated size",["id","size","name","size","type","number","formControlName","size",1,"form-control",3,"max","min"],["class","text-warning-dark",4,"ngIf"],[1,"list-inline"],"Minimum: " + "\ufffd0\ufffd" + "","Maximum: " + "\ufffd0\ufffd" + "","The size specified is out of range. A value from " + "\ufffd0\ufffd" + " to " + "\ufffd1\ufffd" + " is usable.",[1,"text-warning-dark"],"A size of 1 will not create a replication of the object. The 'Replicated size' includes the object itself.",[1,"cd-col-form-label"],"Flags",[1,"custom-control","custom-checkbox"],["type","checkbox","id","ec-overwrites","formControlName","ecOverwrites",1,"custom-control-input"],["for","ec-overwrites",1,"custom-control-label"],"EC Overwrites","CRUSH",["for","erasureProfile",1,"cd-col-form-label"],"Erasure code profile",[1,"input-group"],["id","erasureProfile","name","erasureProfile","formControlName","erasureProfile",1,"form-control","custom-select"],["ngValue","",4,"ngIf"],[3,"ngValue",4,"ngIf"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"input-group-append"],["id","ecp-info-button","type","button",1,"btn","btn-light",3,"ngClass","click"],["aria-hidden","true",3,"ngClass"],["class","btn btn-light","type","button",3,"click",4,"ngIf"],["class","btn btn-light","type","button","triggers","manual",3,"click",4,"ngIf",6,"ngbTooltip"],["class","form-text text-muted","id","ecp-info-block",4,"ngIf"],"Loading...",[3,"ngValue"],"-- No erasure code profile available --","-- Select an erasure code profile --",["type","button",1,"btn","btn-light",3,"click"],["type","button","triggers","manual",1,"btn","btn-light",3,"click",6,"ngbTooltip"],["ecpDeletionBtn","ngbTooltip"],["ngbTooltip","This profile can't be deleted as it is in use."],["id","ecp-info-block",1,"form-text","text-muted"],["ngbNav","",1,"nav-tabs"],["ecpInfoTabs","ngbNav"],["ngbNavItem","ecp-info"],["ngbNavLink",""],"Profile",["ngbNavContent",""],["ngbNavItem","used-by-pools"],"Used by pools",[3,"ngbNavOutlet"],[3,"renderObjects","hideKeys","data","autoReload"],["ecpIsNotUsed",""],[4,"ngIf","ngIfElse"],"Profile is not in use.",[4,"ngFor","ngForOf"],["for","crushRule",1,"cd-col-form-label"],"Crush ruleset","A new crush ruleset will be implicitly created.","Crush ruleset",["noRules",""],"There are no rules.",["id","crushRule","formControlName","crushRule","name","crushSet",1,"form-control","custom-select"],"-- Select a crush rule --",["id","crush-info-button","type","button",1,"btn","btn-light",3,"ngClass","click",6,"ngbTooltip"],["ngbTooltip","Placement and\n replication strategies or distribution policies that allow to\n specify how CRUSH places data replicas."],["class","form-text text-muted","id","crush-info-block",4,"ngIf"],["crushDeletionBtn","ngbTooltip"],["ngbTooltip","This rule can't be deleted as it is in use."],["id","crush-info-block",1,"form-text","text-muted"],["crushInfoTabs","ngbNav"],["ngbNavItem","crush-rule-info"],"Crush rule",["ngbNavItem","crush-rule-steps"],"Crush steps","Used by pools",["ruleIsNotUsed",""],"Rule is not in use.","This field is required!","The rule can't be used in the current cluster as it has too few OSDs to meet the minimum required OSD by this rule.",["formGroupName","compression"],"Compression",["for","mode",1,"cd-col-form-label"],"Mode",["id","mode","name","mode","formControlName","mode",1,"form-control","custom-select"],["for","algorithm",1,"cd-col-form-label"],"Algorithm",["id","algorithm","name","algorithm","formControlName","algorithm",1,"form-control","custom-select"],["for","minBlobSize",1,"cd-col-form-label"],"Minimum blob size",["id","minBlobSize","name","minBlobSize","formControlName","minBlobSize","type","text","min","0","defaultUnit","KiB","cdDimlessBinary","",1,"form-control",6,"placeholder"],["placeholder","e.g., 128KiB"],["for","maxBlobSize",1,"cd-col-form-label"],"Maximum blob size",["id","maxBlobSize","type","text","min","0","formControlName","maxBlobSize","defaultUnit","KiB","cdDimlessBinary","",1,"form-control",6,"placeholder"],["placeholder","e.g., 512KiB"],["for","ratio",1,"cd-col-form-label"],"Ratio",["id","ratio","name","ratio","formControlName","ratio","type","number","min","0","max","1","step","0.1",1,"form-control",6,"placeholder"],["placeholder","Compression ratio"],"Loading...","-- No erasure compression algorithm available --","Value should be greater than 0","Value should be less than the maximum blob size","Value should be greater than 0","Value should be greater than the minimum blob size","Value should be between 0.0 and 1.0","The value should be greater or equal to 0"]},template:function(e,t){1&e&&h.Mc(0,gi,71,32,"div",0),2&e&&h.pc("cdFormLoading",t.loading)},directives:[Ye.a,o.C,o.r,A.a,o.k,O.a,V.a,o.d,W.a,o.q,o.i,F.a,a.r,o.z,o.u,o.B,a.q,He.a,L.a,Xe.a,o.v,Ze.a,q.a,o.y,et.a,o.b,a.p,c.D,c.p,c.r,c.s,c.q,c.u,tt.a,o.l],pipes:[a.A,B.a],styles:[""]}),e})();var vi=i("5+tZ"),Ri=i("d+Og"),yi=i("MuvH"),zi=i("+fVR"),Ci=i("VxPD"),Ii=i("uIqm"),Ni=i("x38r"),_i=i("yJti"),Mi=i("vCyI"),Ti=i("o4+5"),$i=i("VTlA"),wi=i("EgGo");class Di{constructor(e){this.pool_name=e}}var Ei=i("S7zO"),ki=i("nQ07"),Pi=(i("jKX/"),i("JP8w")),xi=i("insk"),Ai=i("aAWM");function Oi(e,t){if(1&e&&h.Nb(0,"cd-table-key-value",12),2&e){const e=h.ic(2);h.pc("renderObjects",!0)("data",e.poolDetails)("autoReload",!1)}}function Vi(e,t){if(1&e&&h.Nb(0,"cd-grafana",15),2&e){const e=h.ic(3);h.rc("grafanaPath","ceph-pool-detail?var-pool_name=",e.selection.pool_name,"")}}function Wi(e,t){1&e&&(h.Sb(0,"li",13),h.Sb(1,"a",5),h.Wb(2,14),h.Rb(),h.Mc(3,Vi,1,1,"ng-template",7),h.Rb())}function Fi(e,t){if(1&e&&h.Nb(0,"cd-rbd-configuration-table",18),2&e){const e=h.ic(3);h.pc("data",e.selectedPoolConfiguration)}}function Li(e,t){1&e&&(h.Sb(0,"li",16),h.Sb(1,"a",5),h.Wb(2,17),h.Rb(),h.Mc(3,Fi,1,1,"ng-template",7),h.Rb())}function qi(e,t){if(1&e&&h.Nb(0,"cd-table",21),2&e){const e=h.ic(3);h.pc("data",e.cacheTiers)("columns",e.cacheTierColumns)("autoSave",!1)}}function Bi(e,t){1&e&&(h.Sb(0,"li",19),h.Sb(1,"a",5),h.Wb(2,20),h.Rb(),h.Mc(3,qi,1,3,"ng-template",7),h.Rb())}function Ui(e,t){if(1&e&&(h.Qb(0,1),h.Sb(1,"ul",2,3),h.Sb(3,"li",4),h.Sb(4,"a",5),h.Wb(5,6),h.Rb(),h.Mc(6,Oi,1,3,"ng-template",7),h.Rb(),h.Mc(7,Wi,4,0,"li",8),h.Mc(8,Li,4,0,"li",9),h.Mc(9,Bi,4,0,"li",10),h.Rb(),h.Nb(10,"div",11),h.Pb()),2&e){const e=h.Ac(2),t=h.ic();h.yb(7),h.pc("ngIf",t.permissions.grafana.read),h.yb(1),h.pc("ngIf","replicated"===t.selection.type),h.yb(1),h.pc("ngIf",(null==t.selection.tiers?null:t.selection.tiers.length)>0),h.yb(1),h.pc("ngbNavOutlet",e)}}let Gi=(()=>{class e{constructor(e){this.poolService=e,this.cacheTierColumns=[],this.omittedPoolAttributes=["cdExecuting","cdIsBinary","stats"],this.cacheTierColumns=[{prop:"pool_name",name:"Name",flexGrow:3},{prop:"cache_mode",name:"Cache Mode",flexGrow:2},{prop:"cache_min_evict_age",name:"Min Evict Age",flexGrow:2},{prop:"cache_min_flush_age",name:"Min Flush Age",flexGrow:2},{prop:"target_max_bytes",name:"Target Max Bytes",flexGrow:2},{prop:"target_max_objects",name:"Target Max Objects",flexGrow:2}]}ngOnChanges(){this.selection&&(this.poolService.getConfiguration(this.selection.pool_name).subscribe(e=>{ki.a.updateChanged(this,{selectedPoolConfiguration:e})}),ki.a.updateChanged(this,{poolDetails:u.a.omit(this.selection,this.omittedPoolAttributes)}))}}return e.\u0275fac=function(t){return new(t||e)(h.Mb(v.a))},e.\u0275cmp=h.Gb({type:e,selectors:[["cd-pool-details"]],inputs:{cacheTiers:"cacheTiers",permissions:"permissions",selection:"selection"},features:[h.wb],decls:1,vars:1,consts:function(){return[["cdTableDetail","",4,"ngIf"],["cdTableDetail",""],["ngbNav","","cdStatefulTab","pool-details",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem","details"],["ngbNavLink",""],"Details",["ngbNavContent",""],["ngbNavItem","performance-details",4,"ngIf"],["ngbNavItem","configuration",4,"ngIf"],["ngbNavItem","cache-tiers-details",4,"ngIf"],[3,"ngbNavOutlet"],[3,"renderObjects","data","autoReload"],["ngbNavItem","performance-details"],"Performance Details",["uid","-xyV8KCiz","grafanaStyle","three",3,"grafanaPath"],["ngbNavItem","configuration"],"Configuration",[3,"data"],["ngbNavItem","cache-tiers-details"],"Cache Tiers Details",["columnMode","flex",3,"data","columns","autoSave"]]},template:function(e,t){1&e&&h.Mc(0,Ui,11,4,"ng-container",0),2&e&&h.pc("ngIf",t.selection)},directives:[a.r,c.p,Pi.a,c.r,c.s,c.q,c.u,tt.a,xi.a,Ai.a,Ii.a],styles:[""],changeDetection:0}),e})();var ji=i("GgAd");const Qi=["poolUsageTpl"],Ji=["poolConfigurationSourceTpl"];function Ki(e,t){if(1&e){const e=h.Tb();h.Sb(0,"cd-table",9,10),h.gc("fetchData",(function(){return h.Dc(e),h.ic().taskListService.fetch()}))("setExpandedRow",(function(t){return h.Dc(e),h.ic().setExpandedRow(t)}))("updateSelection",(function(t){return h.Dc(e),h.ic().updateSelection(t)})),h.Nb(2,"cd-table-actions",11),h.Nb(3,"cd-pool-details",12),h.Rb()}if(2&e){const e=h.ic();h.pc("data",e.pools)("columns",e.columns)("hasDetails",!0)("status",e.tableStatus)("autoReload",-1),h.yb(2),h.pc("permission",e.permissions.pool)("selection",e.selection)("tableActions",e.tableActions),h.yb(1),h.pc("selection",e.expandedRow)("permissions",e.permissions)("cacheTiers",e.cacheTiers)}}function Yi(e,t){1&e&&h.Nb(0,"cd-grafana",14),2&e&&h.pc("grafanaPath","ceph-pools-overview?")}function Hi(e,t){1&e&&(h.Sb(0,"li",2),h.Sb(1,"a",3),h.Wb(2,13),h.Rb(),h.Mc(3,Yi,1,1,"ng-template",5),h.Rb())}function Xi(e,t){if(1&e&&h.Nb(0,"cd-usage-bar",16),2&e){const e=h.ic().row;h.pc("total",e.stats.bytes_used.latest+e.stats.avail_raw.latest)("used",e.stats.bytes_used.latest)}}function Zi(e,t){if(1&e&&h.Mc(0,Xi,1,2,"cd-usage-bar",15),2&e){const e=t.row;h.pc("ngIf",null==e.stats||null==e.stats.avail_raw?null:e.stats.avail_raw.latest)}}let ea=(()=>{class e extends zi.a{constructor(e,t,i,a,o,s,c,n,l,r,b){super(),this.poolService=e,this.taskWrapper=t,this.ecpService=i,this.authStorageService=a,this.taskListService=o,this.modalService=s,this.pgCategoryService=c,this.dimlessPipe=n,this.urlBuilder=l,this.configurationService=r,this.actionLabels=b,this.selection=new Mi.a,this.executingTasks=[],this.tableStatus=new Ci.a,this.cacheTiers=[],this.monAllowPoolDelete=!1,this.permissions=this.authStorageService.getPermissions(),this.tableActions=[{permission:"create",icon:C.a.add,routerLink:()=>this.urlBuilder.getCreate(),name:this.actionLabels.CREATE},{permission:"update",icon:C.a.edit,routerLink:()=>this.urlBuilder.getEdit(encodeURIComponent(this.selection.first().pool_name)),name:this.actionLabels.EDIT},{permission:"delete",icon:C.a.destroy,click:()=>this.deletePoolModal(),name:this.actionLabels.DELETE,disable:this.getDisableDesc.bind(this)}],this.permissions.configOpt.read&&this.configurationService.get("mon_allow_pool_delete").subscribe(e=>{if(u.a.has(e,"value")){const t=u.a.find(e.value,e=>"mon"===e.section)||{value:!1};this.monAllowPoolDelete="true"===t.value}})}ngOnInit(){const e=(e,t,i)=>u.a.get(t,e)>u.a.get(i,e)?1:-1;this.columns=[{prop:"pool_name",name:"Name",flexGrow:4,cellTransformation:Ni.a.executing},{prop:"data_protection",name:"Data Protection",cellTransformation:Ni.a.badge,customTemplateConfig:{class:"badge-background-gray"},flexGrow:1.3},{prop:"application_metadata",name:"Applications",cellTransformation:Ni.a.badge,customTemplateConfig:{class:"badge-background-primary"},flexGrow:1.5},{prop:"pg_status",name:"PG Status",flexGrow:1.2,cellClass:({row:e,column:t,value:i})=>this.getPgStatusCellClass(e,t,i)},{prop:"crush_rule",name:"Crush Ruleset",isHidden:!0,flexGrow:2},{name:"Usage",prop:"usage",cellTemplate:this.poolUsageTpl,flexGrow:1.2},{prop:"stats.rd_bytes.rates",name:"Read bytes",comparator:(t,i,a,o)=>e("stats.rd_bytes.latest",a,o),cellTransformation:Ni.a.sparkline,flexGrow:1.5},{prop:"stats.wr_bytes.rates",name:"Write bytes",comparator:(t,i,a,o)=>e("stats.wr_bytes.latest",a,o),cellTransformation:Ni.a.sparkline,flexGrow:1.5},{prop:"stats.rd.rate",name:"Read ops",flexGrow:1,pipe:this.dimlessPipe,cellTransformation:Ni.a.perSecond},{prop:"stats.wr.rate",name:"Write ops",flexGrow:1,pipe:this.dimlessPipe,cellTransformation:Ni.a.perSecond}],this.taskListService.init(()=>this.ecpService.list().pipe(Object(vi.a)(e=>(this.ecProfileList=e,this.poolService.getList()))),void 0,e=>{this.pools=this.transformPoolsData(e),this.tableStatus=new Ci.a},()=>{this.table.reset(),this.tableStatus=new Ci.a(_i.a.ValueException)},e=>e.name.startsWith("pool/"),(e,t)=>t.metadata.pool_name===e.pool_name,{default:e=>new Di(e.pool_name)})}updateSelection(e){this.selection=e}deletePoolModal(){const e=this.selection.first().pool_name;this.modalService.show(y.a,{itemDescription:"Pool",itemNames:[e],submitActionObservable:()=>this.taskWrapper.wrapTaskAroundCall({task:new T.a("pool/"+n.e.DELETE,{pool_name:e}),call:this.poolService.delete(e)})})}getPgStatusCellClass(e,t,i){return{"text-right":!0,["pg-"+this.pgCategoryService.getTypeByStates(i)]:!0}}getErasureCodeProfile(e){let t="";return u.a.forEach(this.ecProfileList,i=>{i.name===e&&(t=`EC: ${i.k}+${i.m}`)}),t}transformPoolsData(e){const t=["bytes_used","max_avail","avail_raw","percent_used","rd_bytes","wr_bytes","rd","wr"],i={latest:0,rate:0,rates:[]};return u.a.forEach(e,e=>{e.pg_status=this.transformPgStatus(e.pg_status);const a={};u.a.forEach(t,t=>{a[t]=e.stats&&e.stats[t]?e.stats[t]:i}),e.stats=a,e.usage=a.percent_used.latest,e.cdExecuting||e.pg_num+e.pg_placement_num===e.pg_num_target+e.pg_placement_num_target||(e.cdExecuting="Updating"),["rd_bytes","wr_bytes"].forEach(t=>{e.stats[t].rates=e.stats[t].rates.map(e=>e[1])}),e.cdIsBinary=!0,"erasure"===e.type&&(e.data_protection=this.getErasureCodeProfile(e.erasure_code_profile)),"replicated"===e.type&&(e.data_protection="replica: \xd7"+e.size)}),e}transformPgStatus(e){const t=[];return u.a.forEach(e,(e,i)=>{t.push(`${e} ${i}`)}),t.join(", ")}getSelectionTiers(){if(void 0!==this.expandedRow){const e=this.expandedRow.tiers;this.cacheTiers=this.pools.filter(t=>e.includes(t.pool))}}getDisableDesc(){var e;return!(null===(e=this.selection)||void 0===e?void 0:e.hasSelection)||!this.monAllowPoolDelete&&"Pool deletion is disabled by the mon_allow_pool_delete configuration setting."}setExpandedRow(e){super.setExpandedRow(e),this.getSelectionTiers()}}return e.\u0275fac=function(t){return new(t||e)(h.Mb(v.a),h.Mb(k.a),h.Mb(S),h.Mb(w.a),h.Mb($i.a),h.Mb(E.a),h.Mb(Ri.a),h.Mb(Ti.a),h.Mb(wi.a),h.Mb(yi.a),h.Mb(n.b))},e.\u0275cmp=h.Gb({type:e,selectors:[["cd-pool-list"]],viewQuery:function(e,t){var i;1&e&&(h.Tc(Ii.a,!0),h.Jc(Qi,!0),h.Tc(Ji,!0)),2&e&&(h.zc(i=h.hc())&&(t.table=i.first),h.zc(i=h.hc())&&(t.poolUsageTpl=i.first),h.zc(i=h.hc())&&(t.poolConfigurationSourceTpl=i.first))},features:[h.xb([$i.a,{provide:wi.a,useValue:new wi.a("pool")}]),h.vb],decls:10,vars:2,consts:function(){return[["ngbNav","",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem",""],["ngbNavLink",""],"Pools List",["ngbNavContent",""],["ngbNavItem","",4,"ngIf"],[3,"ngbNavOutlet"],["poolUsageTpl",""],["id","pool-list","selectionType","single",3,"data","columns","hasDetails","status","autoReload","fetchData","setExpandedRow","updateSelection"],["table",""],["id","pool-list-actions",1,"table-actions",3,"permission","selection","tableActions"],["cdTableDetail","","id","pool-list-details",3,"selection","permissions","cacheTiers"],"Overall Performance",["uid","z99hzWtmk","grafanaStyle","two",3,"grafanaPath"],["decimals","2",3,"total","used",4,"ngIf"],["decimals","2",3,"total","used"]]},template:function(e,t){if(1&e&&(h.Sb(0,"ul",0,1),h.Sb(2,"li",2),h.Sb(3,"a",3),h.Wb(4,4),h.Rb(),h.Mc(5,Ki,4,11,"ng-template",5),h.Rb(),h.Mc(6,Hi,4,0,"li",6),h.Rb(),h.Nb(7,"div",7),h.Mc(8,Zi,1,1,"ng-template",null,8,h.Nc)),2&e){const e=h.Ac(1);h.yb(6),h.pc("ngIf",t.permissions.grafana.read),h.yb(1),h.pc("ngbNavOutlet",e)}},directives:[c.p,c.r,c.s,c.q,a.r,c.u,Ii.a,Ei.a,Gi,xi.a,ji.a],styles:["cd-pool-list .pg-clean{color:#0b0} cd-pool-list .pg-working{color:#2b99a8} cd-pool-list .pg-warning{color:#ffc200} cd-pool-list .pg-unknown{color:#ef5c55}"]}),e})(),ta=(()=>{class e{}return e.\u0275mod=h.Kb({type:e}),e.\u0275inj=h.Jb({factory:function(t){return new(t||e)},imports:[[b.a,a.c,c.t,l.a,s.i,o.x,c.F,r.BlockModule]]}),e})();const ia=[{path:"",component:ea},{path:n.e.CREATE,component:Si,data:{breadcrumbs:n.a.CREATE}},{path:n.e.EDIT+"/:name",component:Si,data:{breadcrumbs:n.a.EDIT}}];let aa=(()=>{class e{}return e.\u0275mod=h.Kb({type:e}),e.\u0275inj=h.Jb({factory:function(t){return new(t||e)},imports:[[ta,s.i.forChild(ia)]]}),e})()}}]);
\ No newline at end of file
+++ /dev/null
-(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{OkK6:function(e,t,c){"use strict";c.r(t),c.d(t,"RgwModule",(function(){return Wa})),c.d(t,"RoutedRgwModule",(function(){return Fa}));var a=c("SVse"),i=c("s7LF"),s=c("iInd"),o=c("G0yt"),b=c("zWsK"),n=c("sne2"),r=c("PCNd"),l=c("G6Q+"),u=c("LvDl"),d=c.n(u),f=c("cp0P"),m=c("mrSG"),p=c("IheW"),g=c("LRne"),h=c("5+tZ"),S=c("9xzX"),y=c("xTzq"),_=c("8Y7J");let R=(()=>{let e=class{constructor(e,t){this.http=e,this.rgwDaemonService=t,this.url="api/rgw/bucket"}list(){return this.rgwDaemonService.request(e=>(e=e.append("stats","true"),this.http.get(this.url,{params:e})))}enumerate(){return this.rgwDaemonService.request(e=>this.http.get(this.url,{params:e}))}get(e){return this.rgwDaemonService.request(t=>this.http.get(`${this.url}/${e}`,{params:t}))}create(e,t,c,a,i,s,o,b){return this.rgwDaemonService.request(n=>this.http.post(this.url,null,{params:new p.e({fromObject:{bucket:e,uid:t,zonegroup:c,placement_target:a,lock_enabled:String(i),lock_mode:s,lock_retention_period_days:o,lock_retention_period_years:b,daemon_name:n.get("daemon_name")}})}))}update(e,t,c,a,i,s,o,b,n,r){return this.rgwDaemonService.request(l=>(l=(l=(l=(l=(l=(l=(l=(l=(l=l.append("bucket_id",t)).append("uid",c)).append("versioning_state",a)).append("mfa_delete",i)).append("mfa_token_serial",s)).append("mfa_token_pin",o)).append("lock_mode",b)).append("lock_retention_period_days",n)).append("lock_retention_period_years",r),this.http.put(`${this.url}/${e}`,null,{params:l})))}delete(e,t=!0){return this.rgwDaemonService.request(c=>(c=c.append("purge_objects",t?"true":"false"),this.http.delete(`${this.url}/${e}`,{params:c})))}exists(e){return this.enumerate().pipe(Object(h.a)(t=>{const c=d.a.indexOf(t,e);return Object(g.a)(-1!==c)}))}};return e.\u0275fac=function(t){return new(t||e)(_.dc(p.b),_.dc(S.a))},e.\u0275prov=_.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e=Object(m.b)([y.a,Object(m.d)("design:paramtypes",[p.b,S.a])],e),e})(),k=(()=>{let e=class{constructor(e,t){this.http=e,this.rgwDaemonService=t,this.url="api/rgw/site"}get(e){return this.rgwDaemonService.request(t=>(e&&(t=t.append("query",e)),this.http.get(this.url,{params:t})))}};return e.\u0275fac=function(t){return new(t||e)(_.dc(p.b),_.dc(S.a))},e.\u0275prov=_.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e=Object(m.b)([y.a,Object(m.d)("design:paramtypes",[p.b,S.a])],e),e})();var v=c("P8lu"),w=c("oxzT"),z=c("mtw6"),x=c("spCT"),I=c("2EZI"),M=c("1Ni5"),$=c("9nlD"),q=function(e){return e.ENABLED="Enabled",e.DISABLED="Disabled",e}({}),N=function(e){return e.ENABLED="Enabled",e.SUSPENDED="Suspended",e}({}),T=c("zc8c"),E=c("NwgZ"),A=c("ocLN"),W=c("ANnk"),C=c("f69J"),F=c("IZUe"),O=c("p4Cf"),D=c("6+kj"),j=c("8xTl");function P(e,t){1&e&&(_.Sb(0,"div",9),_.Sb(1,"label",36),_.Wb(2,37),_.Rb(),_.Sb(3,"div",12),_.Nb(4,"input",38),_.Rb(),_.Rb())}function V(e,t){1&e&&(_.Sb(0,"span",39),_.Wb(1,40),_.Rb())}function B(e,t){1&e&&(_.Sb(0,"span",39),_.Wb(1,41),_.Rb())}function L(e,t){1&e&&(_.Sb(0,"span",39),_.Wb(1,42),_.Rb())}function U(e,t){1&e&&(_.Sb(0,"option",43),_.Wb(1,44),_.Rb()),2&e&&_.pc("ngValue",null)}function G(e,t){1&e&&(_.Sb(0,"option",43),_.Wb(1,45),_.Rb()),2&e&&_.pc("ngValue",null)}function K(e,t){if(1&e&&(_.Sb(0,"option",46),_.Oc(1),_.Rb()),2&e){const e=t.$implicit;_.pc("value",e),_.yb(1),_.Pc(e)}}function Q(e,t){1&e&&(_.Sb(0,"span",39),_.Wb(1,47),_.Rb())}function Z(e,t){1&e&&(_.Sb(0,"option",43),_.Wb(1,49),_.Rb()),2&e&&_.pc("ngValue",null)}function Y(e,t){1&e&&(_.Sb(0,"option",43),_.Wb(1,50),_.Rb()),2&e&&_.pc("ngValue",null)}function J(e,t){if(1&e&&(_.Sb(0,"option",46),_.Oc(1),_.Rb()),2&e){const e=t.$implicit;_.pc("value",e.name),_.yb(1),_.Pc(e.description)}}function X(e,t){1&e&&(_.Sb(0,"span",39),_.Wb(1,51),_.Rb())}function H(e,t){if(1&e&&(_.Sb(0,"select",48),_.Mc(1,Z,2,1,"option",19),_.Mc(2,Y,2,1,"option",19),_.Mc(3,J,2,2,"option",20),_.Rb(),_.Mc(4,X,2,0,"span",15)),2&e){_.ic();const e=_.Ac(2),t=_.ic();_.yb(1),_.pc("ngIf",null===t.placementTargets),_.yb(1),_.pc("ngIf",null!==t.placementTargets),_.yb(1),_.pc("ngForOf",t.placementTargets),_.yb(1),_.pc("ngIf",t.bucketForm.showError("placement-target",e,"required"))}}function ee(e,t){1&e&&(_.Qb(0),_.Nb(1,"input",52),_.Pb())}function te(e,t){if(1&e){const e=_.Tb();_.Sb(0,"fieldset"),_.Sb(1,"legend",26),_.Wb(2,53),_.Rb(),_.Sb(3,"div",9),_.Sb(4,"div",28),_.Sb(5,"div",29),_.Sb(6,"input",54),_.gc("change",(function(){return _.Dc(e),_.ic(2).setMfaDeleteValidators()})),_.Rb(),_.Sb(7,"label",55),_.Wb(8,56),_.Rb(),_.Sb(9,"cd-helper"),_.Sb(10,"span"),_.Wb(11,57),_.Rb(),_.Rb(),_.Rb(),_.Rb(),_.Rb(),_.Rb()}}function ce(e,t){1&e&&(_.Sb(0,"span",39),_.Wb(1,66),_.Rb())}function ae(e,t){if(1&e&&(_.Sb(0,"div",9),_.Sb(1,"label",63),_.Wb(2,64),_.Rb(),_.Sb(3,"div",12),_.Nb(4,"input",65),_.Mc(5,ce,2,0,"span",15),_.Rb(),_.Rb()),2&e){_.ic(2);const e=_.Ac(2),t=_.ic();_.yb(5),_.pc("ngIf",t.bucketForm.showError("mfa-token-serial",e,"required"))}}function ie(e,t){1&e&&(_.Sb(0,"span",39),_.Wb(1,70),_.Rb())}function se(e,t){if(1&e&&(_.Sb(0,"div",9),_.Sb(1,"label",67),_.Wb(2,68),_.Rb(),_.Sb(3,"div",12),_.Nb(4,"input",69),_.Mc(5,ie,2,0,"span",15),_.Rb(),_.Rb()),2&e){_.ic(2);const e=_.Ac(2),t=_.ic();_.yb(5),_.pc("ngIf",t.bucketForm.showError("mfa-token-pin",e,"required"))}}function oe(e,t){if(1&e){const e=_.Tb();_.Sb(0,"fieldset"),_.Sb(1,"legend",26),_.Wb(2,58),_.Rb(),_.Sb(3,"div",9),_.Sb(4,"div",28),_.Sb(5,"div",29),_.Sb(6,"input",59),_.gc("change",(function(){return _.Dc(e),_.ic(2).setMfaDeleteValidators()})),_.Rb(),_.Sb(7,"label",60),_.Wb(8,61),_.Rb(),_.Sb(9,"cd-helper"),_.Sb(10,"span"),_.Wb(11,62),_.Rb(),_.Rb(),_.Rb(),_.Rb(),_.Rb(),_.Mc(12,ae,6,1,"div",8),_.Mc(13,se,6,1,"div",8),_.Rb()}if(2&e){const e=_.ic(2);_.yb(12),_.pc("ngIf",e.areMfaCredentialsRequired()),_.yb(1),_.pc("ngIf",e.areMfaCredentialsRequired())}}function be(e,t){1&e&&(_.Sb(0,"div",9),_.Sb(1,"label",71),_.Wb(2,72),_.Rb(),_.Sb(3,"div",12),_.Sb(4,"select",73),_.Sb(5,"option",74),_.Wb(6,75),_.Rb(),_.Sb(7,"option",76),_.Wb(8,77),_.Rb(),_.Rb(),_.Rb(),_.Rb())}function ne(e,t){1&e&&(_.Sb(0,"span",39),_.Wb(1,82),_.Rb())}function re(e,t){1&e&&(_.Sb(0,"span",39),_.Wb(1,83),_.Rb())}function le(e,t){if(1&e&&(_.Sb(0,"div",9),_.Sb(1,"label",78),_.Qb(2),_.Wb(3,79),_.Pb(),_.Sb(4,"cd-helper"),_.Wb(5,80),_.Rb(),_.Rb(),_.Sb(6,"div",12),_.Nb(7,"input",81),_.Mc(8,ne,2,0,"span",15),_.Mc(9,re,2,0,"span",15),_.Rb(),_.Rb()),2&e){_.ic();const e=_.Ac(2),t=_.ic();_.yb(8),_.pc("ngIf",t.bucketForm.showError("lock_retention_period_days",e,"pattern")),_.yb(1),_.pc("ngIf",t.bucketForm.showError("lock_retention_period_days",e,"eitherDaysOrYears"))}}function ue(e,t){1&e&&(_.Sb(0,"span",39),_.Wb(1,88),_.Rb())}function de(e,t){1&e&&(_.Sb(0,"span",39),_.Wb(1,89),_.Rb())}function fe(e,t){if(1&e&&(_.Sb(0,"div",9),_.Sb(1,"label",84),_.Qb(2),_.Wb(3,85),_.Pb(),_.Sb(4,"cd-helper"),_.Wb(5,86),_.Rb(),_.Rb(),_.Sb(6,"div",12),_.Nb(7,"input",87),_.Mc(8,ue,2,0,"span",15),_.Mc(9,de,2,0,"span",15),_.Rb(),_.Rb()),2&e){_.ic();const e=_.Ac(2),t=_.ic();_.yb(8),_.pc("ngIf",t.bucketForm.showError("lock_retention_period_days",e,"pattern")),_.yb(1),_.pc("ngIf",t.bucketForm.showError("lock_retention_period_years",e,"eitherDaysOrYears"))}}const me=function(e){return{required:e}};function pe(e,t){if(1&e){const e=_.Tb();_.Sb(0,"div",1),_.Sb(1,"form",2,3),_.Sb(3,"div",4),_.Sb(4,"div",5),_.Wb(5,6),_.jc(6,"titlecase"),_.jc(7,"upperFirst"),_.Rb(),_.Sb(8,"div",7),_.Mc(9,P,5,0,"div",8),_.Sb(10,"div",9),_.Sb(11,"label",10),_.Wb(12,11),_.Rb(),_.Sb(13,"div",12),_.Sb(14,"input",13),_.Yb(15,14),_.Rb(),_.Mc(16,V,2,0,"span",15),_.Mc(17,B,2,0,"span",15),_.Mc(18,L,2,0,"span",15),_.Rb(),_.Rb(),_.Sb(19,"div",9),_.Sb(20,"label",16),_.Wb(21,17),_.Rb(),_.Sb(22,"div",12),_.Sb(23,"select",18),_.Mc(24,U,2,1,"option",19),_.Mc(25,G,2,1,"option",19),_.Mc(26,K,2,2,"option",20),_.Rb(),_.Mc(27,Q,2,0,"span",15),_.Rb(),_.Rb(),_.Sb(28,"div",9),_.Sb(29,"label",21),_.Wb(30,22),_.Rb(),_.Sb(31,"div",12),_.Mc(32,H,5,4,"ng-template",null,23,_.Nc),_.Mc(34,ee,2,0,"ng-container",24),_.Rb(),_.Rb(),_.Mc(35,te,12,0,"fieldset",25),_.Mc(36,oe,14,2,"fieldset",25),_.Sb(37,"fieldset"),_.Sb(38,"legend",26),_.Wb(39,27),_.Rb(),_.Sb(40,"div",9),_.Sb(41,"div",28),_.Sb(42,"div",29),_.Nb(43,"input",30),_.Sb(44,"label",31),_.Wb(45,32),_.Rb(),_.Sb(46,"cd-helper"),_.Sb(47,"span"),_.Wb(48,33),_.Rb(),_.Rb(),_.Rb(),_.Rb(),_.Rb(),_.Mc(49,be,9,0,"div",8),_.Mc(50,le,10,2,"div",8),_.Mc(51,fe,10,2,"div",8),_.Rb(),_.Rb(),_.Sb(52,"div",34),_.Sb(53,"cd-form-button-panel",35),_.gc("submitActionEvent",(function(){return _.Dc(e),_.ic().submit()})),_.jc(54,"titlecase"),_.jc(55,"upperFirst"),_.Rb(),_.Rb(),_.Rb(),_.Rb(),_.Rb()}if(2&e){const e=_.Ac(2),t=_.Ac(33),c=_.ic();_.yb(1),_.pc("formGroup",c.bucketForm),_.yb(6),_.ac(_.kc(6,25,c.action))(_.kc(7,27,c.resource)),_.Xb(5),_.yb(2),_.pc("ngIf",c.editing),_.yb(2),_.pc("ngClass",_.uc(33,me,!c.editing)),_.yb(3),_.pc("readonly",c.editing)("autofocus",!c.editing),_.yb(2),_.pc("ngIf",c.bucketForm.showError("bid",e,"required")),_.yb(1),_.pc("ngIf",c.bucketForm.showError("bid",e,"bucketNameInvalid")),_.yb(1),_.pc("ngIf",c.bucketForm.showError("bid",e,"bucketNameExists")),_.yb(5),_.pc("autofocus",c.editing),_.yb(1),_.pc("ngIf",null===c.owners),_.yb(1),_.pc("ngIf",null!==c.owners),_.yb(1),_.pc("ngForOf",c.owners),_.yb(1),_.pc("ngIf",c.bucketForm.showError("owner",e,"required")),_.yb(2),_.pc("ngClass",_.uc(35,me,!c.editing)),_.yb(5),_.pc("ngIf",c.editing)("ngIfElse",t),_.yb(1),_.pc("ngIf",c.editing),_.yb(1),_.pc("ngIf",c.editing),_.yb(13),_.pc("ngIf",c.bucketForm.getValue("lock_enabled")),_.yb(1),_.pc("ngIf",c.bucketForm.getValue("lock_enabled")),_.yb(1),_.pc("ngIf",c.bucketForm.getValue("lock_enabled")),_.yb(2),_.pc("form",c.bucketForm)("submitText",_.kc(54,29,c.action)+" "+_.kc(55,31,c.resource))}}let ge=(()=>{class e extends x.a{constructor(e,t,c,a,i,s,o,b){super(),this.route=e,this.router=t,this.formBuilder=c,this.rgwBucketService=a,this.rgwSiteService=i,this.rgwUserService=s,this.notificationService=o,this.actionLabels=b,this.editing=!1,this.owners=null,this.placementTargets=[],this.isVersioningAlreadyEnabled=!1,this.isMfaDeleteAlreadyEnabled=!1,this.icons=w.a,this.editing=this.router.url.startsWith("/rgw/bucket/"+n.e.EDIT),this.action=this.editing?this.actionLabels.EDIT:this.actionLabels.CREATE,this.resource="bucket",this.createForm()}get isVersioningEnabled(){return this.bucketForm.getValue("versioning")}get isMfaDeleteEnabled(){return this.bucketForm.getValue("mfa-delete")}createForm(){const e=this,t=M.a.custom("eitherDaysOrYears",()=>{if(!e.bucketForm||!d.a.get(e.bucketForm.getRawValue(),"lock_enabled"))return!1;const t=e.bucketForm.getValue("lock_retention_period_years"),c=e.bucketForm.getValue("lock_retention_period_days");return c>0&&t>0||0===c&&0===t}),c=[0,[M.a.number(!1),t]];this.bucketForm=this.formBuilder.group({id:[null],bid:[null,[i.A.required],this.editing?[]:[this.bucketNameValidator()]],owner:[null,[i.A.required]],"placement-target":[null,this.editing?[]:[i.A.required]],versioning:[null],"mfa-delete":[null],"mfa-token-serial":[""],"mfa-token-pin":[""],lock_enabled:[{value:!1,disabled:this.editing}],lock_mode:["COMPLIANCE"],lock_retention_period_days:c,lock_retention_period_years:c})}ngOnInit(){const e={owners:this.rgwUserService.enumerate()};this.editing||(e.getPlacementTargets=this.rgwSiteService.get("placement-targets")),this.route.params.subscribe(t=>{if(t.hasOwnProperty("bid")){const c=decodeURIComponent(t.bid);e.getBid=this.rgwBucketService.get(c)}Object(f.a)(e).subscribe(e=>{if(this.owners=e.owners.sort(),e.getPlacementTargets){const t=e.getPlacementTargets;this.zonegroup=t.zonegroup,d.a.forEach(t.placement_targets,e=>{e.description=`${e.name} (${"pool"}: ${e.data_pool})`,this.placementTargets.push(e)}),1===this.placementTargets.length&&this.bucketForm.get("placement-target").setValue(this.placementTargets[0].name)}if(e.getBid){const t=e.getBid,c=d.a.clone(this.bucketForm.getRawValue());let a=d.a.pick(t,d.a.keys(c));a["placement-target"]=t.placement_rule,a.versioning=t.versioning===N.ENABLED,a["mfa-delete"]=t.mfa_delete===q.ENABLED,a=d.a.merge(c,a),this.bucketForm.setValue(a),this.editing&&(this.isVersioningAlreadyEnabled=this.isVersioningEnabled,this.isMfaDeleteAlreadyEnabled=this.isMfaDeleteEnabled,this.setMfaDeleteValidators())}this.loadingReady()})})}goToListView(){this.router.navigate(["/rgw/bucket"])}submit(){if(this.bucketForm.pristine)return void this.goToListView();const e=this.bucketForm.value;if(this.editing){const t=this.getVersioningStatus(),c=this.getMfaDeleteStatus();this.rgwBucketService.update(e.bid,e.id,e.owner,t,c,e["mfa-token-serial"],e["mfa-token-pin"],e.lock_mode,e.lock_retention_period_days,e.lock_retention_period_years).subscribe(()=>{this.notificationService.show(z.a.success,"Updated Object Gateway bucket '" + e.bid + "'."),this.goToListView()},()=>{this.bucketForm.setErrors({cdSubmitButton:!0})})}else this.rgwBucketService.create(e.bid,e.owner,this.zonegroup,e["placement-target"],e.lock_enabled,e.lock_mode,e.lock_retention_period_days,e.lock_retention_period_years).subscribe(()=>{this.notificationService.show(z.a.success,"Created Object Gateway bucket '" + e.bid + "'"),this.goToListView()},()=>{this.bucketForm.setErrors({cdSubmitButton:!0})})}bucketNameValidator(){const e=this.rgwBucketService;return t=>new Promise(c=>{if(t.pristine||""===t.value)return void c(null);const a=[];a.push(e=>!M.a.ip()(e)),a.push(e=>d.a.inRange(e.length,3,64)),a.push(e=>{const t=d.a.split(e,".");return d.a.every(t,e=>e===d.a.toLower(e)&&!e.includes("_")&&!!/[0-9a-z-]/.test(e)&&d.a.every([0,e.length],t=>/[a-z]/.test(e[t])||d.a.isInteger(d.a.parseInt(e[t]))))}),d.a.every(a,e=>e(t.value))?e.exists(t.value).subscribe(e=>{c(e?{bucketNameExists:!0}:null)}):c({bucketNameInvalid:!0})})}areMfaCredentialsRequired(){return this.isMfaDeleteEnabled!==this.isMfaDeleteAlreadyEnabled||this.isMfaDeleteAlreadyEnabled&&this.isVersioningEnabled!==this.isVersioningAlreadyEnabled}setMfaDeleteValidators(){const e=this.bucketForm.get("mfa-token-serial"),t=this.bucketForm.get("mfa-token-pin");this.areMfaCredentialsRequired()?(e.setValidators(i.A.required),t.setValidators(i.A.required)):(e.setValidators(null),t.setValidators(null)),e.updateValueAndValidity(),t.updateValueAndValidity()}getVersioningStatus(){return this.isVersioningEnabled?N.ENABLED:N.SUSPENDED}getMfaDeleteStatus(){return this.isMfaDeleteEnabled?q.ENABLED:q.DISABLED}}return e.\u0275fac=function(t){return new(t||e)(_.Mb(s.a),_.Mb(s.e),_.Mb(I.a),_.Mb(R),_.Mb(k),_.Mb(v.a),_.Mb($.a),_.Mb(n.b))},e.\u0275cmp=_.Gb({type:e,selectors:[["cd-rgw-bucket-form"]],features:[_.vb],decls:1,vars:1,consts:function(){return[["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],["name","bucketForm","novalidate","",3,"formGroup"],["frm","ngForm"],[1,"card"],[1,"card-header"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"card-body"],["class","form-group row",4,"ngIf"],[1,"form-group","row"],["for","bid",1,"cd-col-form-label",3,"ngClass"],"Name",[1,"cd-col-form-input"],["id","bid","name","bid","type","text","formControlName","bid",1,"form-control",3,"readonly","autofocus",6,"placeholder"],["placeholder","Name..."],["class","invalid-feedback",4,"ngIf"],["for","owner",1,"cd-col-form-label","required"],"Owner",["id","owner","name","owner","formControlName","owner",1,"form-control","custom-select",3,"autofocus"],[3,"ngValue",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],["for","placement-target",1,"cd-col-form-label",3,"ngClass"],"Placement target",["placementTargetSelect",""],[4,"ngIf","ngIfElse"],[4,"ngIf"],[1,"cd-header"],"Locking",[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["id","lock_enabled","formControlName","lock_enabled","type","checkbox",1,"custom-control-input"],["for","lock_enabled",1,"custom-control-label"],"Enabled","Enables locking for the objects in the bucket. Locking can only be enabled while creating a bucket.",[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],["for","id",1,"cd-col-form-label"],"Id",["id","id","name","id","type","text","formControlName","id","readonly","",1,"form-control"],[1,"invalid-feedback"],"This field is required.","The value is not valid.","The chosen name is already in use.",[3,"ngValue"],"Loading...","-- Select a user --",[3,"value"],"This field is required.",["id","placement-target","name","placement-target","formControlName","placement-target",1,"form-control","custom-select"],"Loading...","-- Select a placement target --","This field is required.",["id","placement-target","name","placement-target","formControlName","placement-target","type","text","readonly","",1,"form-control"],"Versioning",["type","checkbox","id","versioning","name","versioning","formControlName","versioning",1,"custom-control-input",3,"change"],["for","versioning",1,"custom-control-label"],"Enabled","Enables versioning for the objects in the bucket.","Multi-Factor Authentication",["type","checkbox","id","mfa-delete","name","mfa-delete","formControlName","mfa-delete",1,"custom-control-input",3,"change"],["for","mfa-delete",1,"custom-control-label"],"Delete enabled","Enables MFA (multi-factor authentication) Delete, which requires additional authentication for changing the bucket versioning state.",["for","mfa-token-serial",1,"cd-col-form-label"],"Token Serial Number",["type","text","id","mfa-token-serial","name","mfa-token-serial","formControlName","mfa-token-serial",1,"form-control"],"This field is required.",["for","mfa-token-pin",1,"cd-col-form-label"],"Token PIN",["type","text","id","mfa-token-pin","name","mfa-token-pin","formControlName","mfa-token-pin",1,"form-control"],"This field is required.",["for","lock_mode",1,"cd-col-form-label"],"Mode",["formControlName","lock_mode","name","lock_mode","id","lock_mode",1,"form-control","custom-select"],["value","COMPLIANCE"],"Compliance",["value","GOVERNANCE"],"Governance",["for","lock_retention_period_days",1,"cd-col-form-label"],"Days","The number of days that you want to specify for the default retention period that will be applied to new objects placed in this bucket.",["type","number","id","lock_retention_period_days","formControlName","lock_retention_period_days","min","0",1,"form-control"],"The entered value must be a positive integer.","Retention period requires either Days or Years.",["for","lock_retention_period_years",1,"cd-col-form-label"],"Years","The number of years that you want to specify for the default retention period that will be applied to new objects placed in this bucket.",["type","number","id","lock_retention_period_years","formControlName","lock_retention_period_years","min","0",1,"form-control"],"The entered value must be a positive integer.","Retention period requires either Days or Years."]},template:function(e,t){1&e&&_.Mc(0,pe,56,37,"div",0),2&e&&_.pc("cdFormLoading",t.loading)},directives:[T.a,i.C,i.r,E.a,i.k,a.r,A.a,a.p,W.a,i.d,C.a,i.q,i.i,F.a,i.z,a.q,i.b,O.a,D.a,i.u,i.B,i.v],pipes:[a.A,j.a],styles:[""]}),e})();var he=c("HDdC"),Se=c("+fVR"),ye=c("e2NH"),_e=c("0+/T"),Re=c("uIqm"),ke=c("vCyI"),ve=c("Fgil"),we=c("o4+5"),ze=c("aexS"),xe=c("JK/P"),Ie=c("EgGo"),Me=c("S7zO"),$e=c("a0VL"),qe=c("iExv");function Ne(e,t){1&e&&(_.Sb(0,"td"),_.Wb(1,24),_.Rb())}function Te(e,t){if(1&e&&(_.Sb(0,"td"),_.Oc(1),_.jc(2,"dimless"),_.Rb()),2&e){const e=_.ic(3);_.yb(1),_.Qc(" ",_.kc(2,1,e.selection.bucket_quota.max_size)," ")}}function Ee(e,t){1&e&&(_.Sb(0,"td"),_.Wb(1,25),_.Rb())}function Ae(e,t){if(1&e&&(_.Sb(0,"td"),_.Oc(1),_.Rb()),2&e){const e=_.ic(3);_.yb(1),_.Qc(" ",e.selection.bucket_quota.max_objects," ")}}function We(e,t){if(1&e&&(_.Sb(0,"div"),_.Sb(1,"legend"),_.Wb(2,20),_.Rb(),_.Sb(3,"table",1),_.Sb(4,"tbody"),_.Sb(5,"tr"),_.Sb(6,"td",2),_.Wb(7,21),_.Rb(),_.Sb(8,"td",4),_.Oc(9),_.jc(10,"booleanText"),_.Rb(),_.Rb(),_.Sb(11,"tr"),_.Sb(12,"td",5),_.Wb(13,22),_.Rb(),_.Mc(14,Ne,2,0,"td",0),_.Mc(15,Te,3,3,"td",0),_.Rb(),_.Sb(16,"tr"),_.Sb(17,"td",5),_.Wb(18,23),_.Rb(),_.Mc(19,Ee,2,0,"td",0),_.Mc(20,Ae,2,1,"td",0),_.Rb(),_.Rb(),_.Rb(),_.Rb()),2&e){const e=_.ic(2);_.yb(9),_.Pc(_.kc(10,5,e.selection.bucket_quota.enabled)),_.yb(5),_.pc("ngIf",e.selection.bucket_quota.max_size<=-1),_.yb(1),_.pc("ngIf",e.selection.bucket_quota.max_size>-1),_.yb(4),_.pc("ngIf",e.selection.bucket_quota.max_objects<=-1),_.yb(1),_.pc("ngIf",e.selection.bucket_quota.max_objects>-1)}}function Ce(e,t){if(1&e&&(_.Qb(0),_.Sb(1,"tr"),_.Sb(2,"td",5),_.Wb(3,26),_.Rb(),_.Sb(4,"td"),_.Oc(5),_.Rb(),_.Rb(),_.Sb(6,"tr"),_.Sb(7,"td",5),_.Wb(8,27),_.Rb(),_.Sb(9,"td"),_.Oc(10),_.Rb(),_.Rb(),_.Sb(11,"tr"),_.Sb(12,"td",5),_.Wb(13,28),_.Rb(),_.Sb(14,"td"),_.Oc(15),_.Rb(),_.Rb(),_.Pb()),2&e){const e=_.ic(2);_.yb(5),_.Pc(e.selection.lock_mode),_.yb(5),_.Pc(e.selection.lock_retention_period_days),_.yb(5),_.Pc(e.selection.lock_retention_period_years)}}function Fe(e,t){if(1&e&&(_.Qb(0),_.Sb(1,"table",1),_.Sb(2,"tbody"),_.Sb(3,"tr"),_.Sb(4,"td",2),_.Wb(5,3),_.Rb(),_.Sb(6,"td",4),_.Oc(7),_.Rb(),_.Rb(),_.Sb(8,"tr"),_.Sb(9,"td",5),_.Wb(10,6),_.Rb(),_.Sb(11,"td"),_.Oc(12),_.Rb(),_.Rb(),_.Sb(13,"tr"),_.Sb(14,"td",5),_.Wb(15,7),_.Rb(),_.Sb(16,"td"),_.Oc(17),_.Rb(),_.Rb(),_.Sb(18,"tr"),_.Sb(19,"td",5),_.Wb(20,8),_.Rb(),_.Sb(21,"td"),_.Oc(22),_.Rb(),_.Rb(),_.Sb(23,"tr"),_.Sb(24,"td",5),_.Wb(25,9),_.Rb(),_.Sb(26,"td"),_.Oc(27),_.Rb(),_.Rb(),_.Sb(28,"tr"),_.Sb(29,"td",5),_.Wb(30,10),_.Rb(),_.Sb(31,"td"),_.Oc(32),_.Rb(),_.Rb(),_.Sb(33,"tr"),_.Sb(34,"td",5),_.Wb(35,11),_.Rb(),_.Sb(36,"td"),_.Oc(37),_.Rb(),_.Rb(),_.Sb(38,"tr"),_.Sb(39,"td",5),_.Wb(40,12),_.Rb(),_.Sb(41,"td"),_.Oc(42),_.Rb(),_.Rb(),_.Sb(43,"tr"),_.Sb(44,"td",5),_.Wb(45,13),_.Rb(),_.Sb(46,"td"),_.Oc(47),_.Rb(),_.Rb(),_.Sb(48,"tr"),_.Sb(49,"td",5),_.Wb(50,14),_.Rb(),_.Sb(51,"td"),_.Oc(52),_.jc(53,"cdDate"),_.Rb(),_.Rb(),_.Sb(54,"tr"),_.Sb(55,"td",5),_.Wb(56,15),_.Rb(),_.Sb(57,"td"),_.Oc(58),_.Rb(),_.Rb(),_.Sb(59,"tr"),_.Sb(60,"td",5),_.Wb(61,16),_.Rb(),_.Sb(62,"td"),_.Oc(63),_.Rb(),_.Rb(),_.Sb(64,"tr"),_.Sb(65,"td",5),_.Wb(66,17),_.Rb(),_.Sb(67,"td"),_.Oc(68),_.Rb(),_.Rb(),_.Rb(),_.Rb(),_.Mc(69,We,21,7,"div",0),_.Sb(70,"legend"),_.Wb(71,18),_.Rb(),_.Sb(72,"table",1),_.Sb(73,"tbody"),_.Sb(74,"tr"),_.Sb(75,"td",2),_.Wb(76,19),_.Rb(),_.Sb(77,"td",4),_.Oc(78),_.jc(79,"booleanText"),_.Rb(),_.Rb(),_.Mc(80,Ce,16,3,"ng-container",0),_.Rb(),_.Rb(),_.Pb()),2&e){const e=_.ic();_.yb(7),_.Pc(e.selection.bid),_.yb(5),_.Pc(e.selection.id),_.yb(5),_.Pc(e.selection.owner),_.yb(5),_.Pc(e.selection.index_type),_.yb(5),_.Pc(e.selection.placement_rule),_.yb(5),_.Pc(e.selection.marker),_.yb(5),_.Pc(e.selection.max_marker),_.yb(5),_.Pc(e.selection.ver),_.yb(5),_.Pc(e.selection.master_ver),_.yb(5),_.Pc(_.kc(53,16,e.selection.mtime)),_.yb(6),_.Pc(e.selection.zonegroup),_.yb(5),_.Pc(e.selection.versioning),_.yb(5),_.Pc(e.selection.mfa_delete),_.yb(1),_.pc("ngIf",e.selection.bucket_quota),_.yb(9),_.Pc(_.kc(79,18,e.selection.lock_enabled)),_.yb(2),_.pc("ngIf",e.selection.lock_enabled)}}let Oe=(()=>{class e{constructor(e){this.rgwBucketService=e}ngOnChanges(){this.selection&&this.rgwBucketService.get(this.selection.bid).subscribe(e=>{this.selection=e})}}return e.\u0275fac=function(t){return new(t||e)(_.Mb(R))},e.\u0275cmp=_.Gb({type:e,selectors:[["cd-rgw-bucket-details"]],inputs:{selection:"selection"},features:[_.wb],decls:1,vars:1,consts:function(){return[[4,"ngIf"],[1,"table","table-striped","table-bordered"],[1,"bold","w-25"],"Name",[1,"w-75"],[1,"bold"],"ID","Owner","Index type","Placement rule","Marker","Maximum marker","Version","Master version","Modification time","Zonegroup","Versioning","MFA Delete","Locking","Enabled","Bucket quota","Enabled","Maximum size","Maximum objects","Unlimited","Unlimited","Mode","Days","Years"]},template:function(e,t){1&e&&_.Mc(0,Fe,81,20,"ng-container",0),2&e&&_.pc("ngIf",t.selection)},directives:[a.r],pipes:[$e.a,qe.a,we.a],styles:["table[_ngcontent-%COMP%]{table-layout:fixed}table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{word-wrap:break-word}"]}),e})();var De=c("GgAd");const je=["bucketSizeTpl"],Pe=["bucketObjectTpl"];function Ve(e,t){if(1&e&&_.Nb(0,"cd-usage-bar",8),2&e){const e=_.ic().row;_.pc("total",e.bucket_quota.max_size)("used",e.bucket_size)}}function Be(e,t){1&e&&_.Wb(0,9)}function Le(e,t){if(1&e&&(_.Mc(0,Ve,1,2,"cd-usage-bar",6),_.Mc(1,Be,1,0,"ng-template",null,7,_.Nc)),2&e){const e=t.row,c=_.Ac(2);_.pc("ngIf",e.bucket_quota.max_size>0&&e.bucket_quota.enabled)("ngIfElse",c)}}function Ue(e,t){if(1&e&&_.Nb(0,"cd-usage-bar",12),2&e){const e=_.ic().row;_.pc("total",e.bucket_quota.max_objects)("used",e.num_objects)("isBinary",!1)}}function Ge(e,t){1&e&&_.Wb(0,13)}function Ke(e,t){if(1&e&&(_.Mc(0,Ue,1,3,"cd-usage-bar",10),_.Mc(1,Ge,1,0,"ng-template",null,11,_.Nc)),2&e){const e=t.row,c=_.Ac(2);_.pc("ngIf",e.bucket_quota.max_objects>0&&e.bucket_quota.enabled)("ngIfElse",c)}}let Qe=(()=>{class e extends Se.a{constructor(e,t,c,a,i,s,o,b){super(),this.authStorageService=e,this.dimlessBinaryPipe=t,this.dimlessPipe=c,this.rgwBucketService=a,this.modalService=i,this.urlBuilder=s,this.actionLabels=o,this.ngZone=b,this.columns=[],this.buckets=[],this.selection=new ke.a,this.tableStatus=new ye.a}ngOnInit(){this.permission=this.authStorageService.getPermissions().rgw,this.columns=[{name:"Name",prop:"bid",flexGrow:2},{name:"Owner",prop:"owner",flexGrow:2.5},{name:"Used Capacity",prop:"bucket_size",flexGrow:.6,pipe:this.dimlessBinaryPipe},{name:"Capacity Limit %",prop:"size_usage",cellTemplate:this.bucketSizeTpl,flexGrow:.8},{name:"Objects",prop:"num_objects",flexGrow:.6,pipe:this.dimlessPipe},{name:"Object Limit %",prop:"object_usage",cellTemplate:this.bucketObjectTpl,flexGrow:.8}];const e=()=>this.selection.first()&&""+encodeURIComponent(this.selection.first().bid);this.tableActions=[{permission:"create",icon:w.a.add,routerLink:()=>this.urlBuilder.getCreate(),name:this.actionLabels.CREATE,canBePrimary:e=>!e.hasSelection},{permission:"update",icon:w.a.edit,routerLink:()=>this.urlBuilder.getEdit(e()),name:this.actionLabels.EDIT},{permission:"delete",icon:w.a.destroy,click:()=>this.deleteAction(),disable:()=>!this.selection.hasSelection,name:this.actionLabels.DELETE,canBePrimary:e=>e.hasMultiSelection}],this.timeConditionReached()}transformBucketData(){d.a.forEach(this.buckets,e=>{const t=e.bucket_quota.max_size,c=e.bucket_quota.max_objects;let a=0,i=0;d.a.forEach(e.usage,e=>{a+=e.size_actual,i+=e.num_objects}),e.bucket_size=a,e.num_objects=i,e.size_usage=t>0?a/t:void 0,e.object_usage=c>0?i/c:void 0})}timeConditionReached(){clearTimeout(this.staleTimeout),this.ngZone.runOutsideAngular(()=>{this.staleTimeout=window.setTimeout(()=>{this.ngZone.run(()=>{this.tableStatus=new ye.a("warning","The bucket list data might be stale. If needed, you can manually reload it.")})},1e4)})}getBucketList(e){this.tableStatus=new ye.a,this.timeConditionReached(),this.rgwBucketService.list().subscribe(e=>{this.buckets=e,this.transformBucketData()},()=>{e.error()})}updateSelection(e){this.selection=e}deleteAction(){this.modalService.show(_e.a,{itemDescription:this.selection.hasSingleSelection?"bucket":"buckets",itemNames:this.selection.selected.map(e=>e.bid),submitActionObservable:()=>new he.a(e=>{Object(f.a)(this.selection.selected.map(e=>this.rgwBucketService.delete(e.bid))).subscribe({error:t=>{e.error(t),this.table.refreshBtn()},complete:()=>{e.complete(),this.table.refreshBtn()}})})})}}return e.\u0275fac=function(t){return new(t||e)(_.Mb(ze.a),_.Mb(ve.a),_.Mb(we.a),_.Mb(R),_.Mb(xe.a),_.Mb(Ie.a),_.Mb(n.b),_.Mb(_.A))},e.\u0275cmp=_.Gb({type:e,selectors:[["cd-rgw-bucket-list"]],viewQuery:function(e,t){var c;1&e&&(_.Jc(Re.a,!0),_.Jc(je,!0),_.Jc(Pe,!0)),2&e&&(_.zc(c=_.hc())&&(t.table=c.first),_.zc(c=_.hc())&&(t.bucketSizeTpl=c.first),_.zc(c=_.hc())&&(t.bucketObjectTpl=c.first))},features:[_.xb([{provide:Ie.a,useValue:new Ie.a("rgw/bucket")}]),_.vb],decls:8,vars:9,consts:function(){return[["columnMode","flex","selectionType","multiClick","identifier","bid",3,"autoReload","data","columns","hasDetails","status","setExpandedRow","updateSelection","fetchData"],["table",""],[1,"table-actions",3,"permission","selection","tableActions"],["cdTableDetail","",3,"selection"],["bucketSizeTpl",""],["bucketObjectTpl",""],[3,"total","used",4,"ngIf","ngIfElse"],["noSizeQuota",""],[3,"total","used"],"No Limit",[3,"total","used","isBinary",4,"ngIf","ngIfElse"],["noObjectQuota",""],[3,"total","used","isBinary"],"No Limit"]},template:function(e,t){1&e&&(_.Sb(0,"cd-table",0,1),_.gc("setExpandedRow",(function(e){return t.setExpandedRow(e)}))("updateSelection",(function(e){return t.updateSelection(e)}))("fetchData",(function(e){return t.getBucketList(e)})),_.Nb(2,"cd-table-actions",2),_.Nb(3,"cd-rgw-bucket-details",3),_.Rb(),_.Mc(4,Le,3,2,"ng-template",null,4,_.Nc),_.Mc(6,Ke,3,2,"ng-template",null,5,_.Nc)),2&e&&(_.pc("autoReload",!1)("data",t.buckets)("columns",t.columns)("hasDetails",!0)("status",t.tableStatus),_.yb(2),_.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions),_.yb(1),_.pc("selection",t.expandedRow))},directives:[Re.a,Me.a,Oe,a.r,De.a],styles:[""]}),e})();var Ze=c("IzEk"),Ye=c("85J/"),Je=c("JP8w"),Xe=c("FSuO"),He=c("b5OY"),et=c("insk");function tt(e,t){if(1&e){const e=_.Tb();_.Sb(0,"cd-table-key-value",11),_.gc("fetchData",(function(){return _.Dc(e),_.ic(2).getMetaData()})),_.Rb()}if(2&e){const e=_.ic(2);_.pc("data",e.metadata)}}function ct(e,t){if(1&e&&_.Nb(0,"cd-table-performance-counter",12),2&e){const e=_.ic(2);_.pc("serviceId",e.serviceId)}}function at(e,t){if(1&e&&_.Nb(0,"cd-grafana",15),2&e){const e=_.ic(3);_.pc("grafanaPath","rgw-instance-detail?var-rgw_servers=rgw."+e.serviceId)}}function it(e,t){1&e&&(_.Sb(0,"li",13),_.Sb(1,"a",4),_.Wb(2,14),_.Rb(),_.Mc(3,at,1,1,"ng-template",6),_.Rb())}function st(e,t){if(1&e&&(_.Qb(0),_.Sb(1,"ul",1,2),_.Sb(3,"li",3),_.Sb(4,"a",4),_.Wb(5,5),_.Rb(),_.Mc(6,tt,1,1,"ng-template",6),_.Rb(),_.Sb(7,"li",7),_.Sb(8,"a",4),_.Wb(9,8),_.Rb(),_.Mc(10,ct,1,1,"ng-template",6),_.Rb(),_.Mc(11,it,4,0,"li",9),_.Rb(),_.Nb(12,"div",10),_.Pb()),2&e){const e=_.Ac(2),t=_.ic();_.yb(11),_.pc("ngIf",t.grafanaPermission.read),_.yb(1),_.pc("ngbNavOutlet",e)}}let ot=(()=>{class e{constructor(e,t){this.rgwDaemonService=e,this.authStorageService=t,this.serviceId="",this.grafanaPermission=this.authStorageService.getPermissions().grafana}ngOnChanges(){this.selection&&(this.serviceId=this.selection.id)}getMetaData(){d.a.isEmpty(this.serviceId)||this.rgwDaemonService.get(this.serviceId).subscribe(e=>{this.metadata=e.rgw_metadata})}}return e.\u0275fac=function(t){return new(t||e)(_.Mb(S.a),_.Mb(ze.a))},e.\u0275cmp=_.Gb({type:e,selectors:[["cd-rgw-daemon-details"]],inputs:{selection:"selection"},features:[_.wb],decls:1,vars:1,consts:function(){return[[4,"ngIf"],["ngbNav","","cdStatefulTab","rgw-daemon-details",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem","details"],["ngbNavLink",""],"Details",["ngbNavContent",""],["ngbNavItem","performance-counters"],"Performance Counters",["ngbNavItem","performance-details",4,"ngIf"],[3,"ngbNavOutlet"],[3,"data","fetchData"],["serviceType","rgw",3,"serviceId"],["ngbNavItem","performance-details"],"Performance Details",["uid","x5ARzZtmk","grafanaStyle","one",3,"grafanaPath"]]},template:function(e,t){1&e&&_.Mc(0,st,13,2,"ng-container",0),2&e&&_.pc("ngIf",t.selection)},directives:[a.r,o.p,Je.a,o.r,o.s,o.q,o.u,Xe.a,He.a,et.a],styles:[""]}),e})();function bt(e,t){if(1&e){const e=_.Tb();_.Sb(0,"cd-table",8),_.gc("setExpandedRow",(function(t){return _.Dc(e),_.ic().setExpandedRow(t)}))("fetchData",(function(t){return _.Dc(e),_.ic().getDaemonList(t)})),_.Nb(1,"cd-rgw-daemon-details",9),_.Rb()}if(2&e){const e=_.ic();_.pc("data",e.daemons)("columns",e.columns)("hasDetails",!0),_.yb(1),_.pc("selection",e.expandedRow)}}function nt(e,t){1&e&&_.Nb(0,"cd-grafana",11),2&e&&_.pc("grafanaPath","rgw-overview?")}function rt(e,t){1&e&&(_.Sb(0,"li",2),_.Sb(1,"a",3),_.Wb(2,10),_.Rb(),_.Mc(3,nt,1,1,"ng-template",5),_.Rb())}function lt(e,t){1&e&&_.Nb(0,"cd-grafana",13),2&e&&_.pc("grafanaPath","radosgw-sync-overview?")}function ut(e,t){1&e&&(_.Sb(0,"li",2),_.Sb(1,"a",3),_.Wb(2,12),_.Rb(),_.Mc(3,lt,1,1,"ng-template",5),_.Rb())}let dt=(()=>{class e extends Se.a{constructor(e,t,c,a){super(),this.rgwDaemonService=e,this.authStorageService=t,this.cephShortVersionPipe=c,this.rgwSiteService=a,this.columns=[],this.daemons=[]}ngOnInit(){this.grafanaPermission=this.authStorageService.getPermissions().grafana,this.columns=[{name:"ID",prop:"id",flexGrow:2},{name:"Hostname",prop:"server_hostname",flexGrow:2},{name:"Zone Group",prop:"zonegroup_name",flexGrow:2},{name:"Zone",prop:"zone_name",flexGrow:2},{name:"Version",prop:"version",flexGrow:1,pipe:this.cephShortVersionPipe}],this.rgwSiteService.get("realms").subscribe(e=>this.isMultiSite=e.length>0)}getDaemonList(e){this.rgwDaemonService.daemons$.pipe(Object(Ze.a)(1)).subscribe(e=>{this.daemons=e},()=>{e.error()})}}return e.\u0275fac=function(t){return new(t||e)(_.Mb(S.a),_.Mb(ze.a),_.Mb(Ye.a),_.Mb(k))},e.\u0275cmp=_.Gb({type:e,selectors:[["cd-rgw-daemon-list"]],features:[_.vb],decls:9,vars:3,consts:function(){return[["ngbNav","",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem",""],["ngbNavLink",""],"Daemons List",["ngbNavContent",""],["ngbNavItem","",4,"ngIf"],[3,"ngbNavOutlet"],["columnMode","flex",3,"data","columns","hasDetails","setExpandedRow","fetchData"],["cdTableDetail","",3,"selection"],"Overall Performance",["uid","WAkugZpiz","grafanaStyle","two",3,"grafanaPath"],"Sync Performance",["uid","rgw-sync-overview","grafanaStyle","two",3,"grafanaPath"]]},template:function(e,t){if(1&e&&(_.Sb(0,"ul",0,1),_.Sb(2,"li",2),_.Sb(3,"a",3),_.Wb(4,4),_.Rb(),_.Mc(5,bt,2,4,"ng-template",5),_.Rb(),_.Mc(6,rt,4,0,"li",6),_.Mc(7,ut,4,0,"li",6),_.Rb(),_.Nb(8,"div",7)),2&e){const e=_.Ac(1);_.yb(6),_.pc("ngIf",t.grafanaPermission.read),_.yb(1),_.pc("ngIf",t.grafanaPermission.read&&t.isMultiSite),_.yb(1),_.pc("ngbNavOutlet",e)}},directives:[o.p,o.r,o.s,o.q,a.r,o.u,Re.a,ot,et.a],styles:[""]}),e})();var ft=c("GyhO"),mt=c("aXbf"),pt=function(e){return e.USERS="users",e.BUCKETS="buckets",e.METADATA="metadata",e.USAGE="usage",e.ZONE="zone",e}({});let gt=(()=>{class e{static getAll(){return Object.values(e.capabilities)}}return e.capabilities=pt,e})();var ht=c("ajRT");function St(e,t){1&e&&_.Nb(0,"input",22),2&e&&_.pc("readonly",!0)}function yt(e,t){1&e&&(_.Sb(0,"option",17),_.Wb(1,25),_.Rb()),2&e&&_.pc("ngValue",null)}function _t(e,t){if(1&e&&(_.Sb(0,"option",26),_.Oc(1),_.Rb()),2&e){const e=t.$implicit;_.pc("value",e),_.yb(1),_.Pc(e)}}function Rt(e,t){if(1&e&&(_.Sb(0,"select",23),_.Mc(1,yt,2,1,"option",24),_.Mc(2,_t,2,2,"option",19),_.Rb()),2&e){const e=_.ic();_.yb(1),_.pc("ngIf",null!==e.types),_.yb(1),_.pc("ngForOf",e.types)}}function kt(e,t){1&e&&(_.Sb(0,"span",27),_.Wb(1,28),_.Rb())}function vt(e,t){if(1&e&&(_.Sb(0,"option",26),_.Oc(1),_.Rb()),2&e){const e=t.$implicit;_.pc("value",e),_.yb(1),_.Qc(" ",e," ")}}function wt(e,t){1&e&&(_.Sb(0,"span",27),_.Wb(1,29),_.Rb())}const zt=function(e){return{required:e}},xt=function(){return["read","write","*"]};let It=(()=>{class e{constructor(e,t,c){this.formBuilder=e,this.activeModal=t,this.actionLabels=c,this.submitAction=new _.o,this.editing=!0,this.types=[],this.resource="capability",this.createForm()}createForm(){this.formGroup=this.formBuilder.group({type:[null,[i.A.required]],perm:[null,[i.A.required]]})}setEditing(e=!0){this.editing=e,this.action=this.editing?this.actionLabels.EDIT:this.actionLabels.ADD}setValues(e,t){this.formGroup.setValue({type:e,perm:t})}setCapabilities(e){const t=[];e.forEach(e=>{t.push(e.type)}),this.types=[],gt.getAll().forEach(e=>{-1===d.a.indexOf(t,e)&&this.types.push(e)})}onSubmit(){this.submitAction.emit(this.formGroup.value),this.activeModal.close()}}return e.\u0275fac=function(t){return new(t||e)(_.Mb(I.a),_.Mb(o.a),_.Mb(n.b))},e.\u0275cmp=_.Gb({type:e,selectors:[["cd-rgw-user-capability-modal"]],outputs:{submitAction:"submitAction"},decls:29,vars:24,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"modal-content"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","type",1,"cd-col-form-label",3,"ngClass"],"Type",[1,"cd-col-form-input"],["id","type","class","form-control","type","text","formControlName","type",3,"readonly",4,"ngIf"],["id","type","class","form-control custom-select","formControlName","type","autofocus","",4,"ngIf"],["class","invalid-feedback",4,"ngIf"],["for","perm",1,"cd-col-form-label","required"],"Permission",["id","perm","formControlName","perm",1,"form-control","custom-select"],[3,"ngValue"],"-- Select a permission --",[3,"value",4,"ngFor","ngForOf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],["id","type","type","text","formControlName","type",1,"form-control",3,"readonly"],["id","type","formControlName","type","autofocus","",1,"form-control","custom-select"],[3,"ngValue",4,"ngIf"],"-- Select a type --",[3,"value"],[1,"invalid-feedback"],"This field is required.","This field is required."]},template:function(e,t){if(1&e&&(_.Sb(0,"cd-modal",0),_.Qb(1,1),_.Wb(2,2),_.jc(3,"titlecase"),_.jc(4,"upperFirst"),_.Pb(),_.Qb(5,3),_.Sb(6,"form",4,5),_.Sb(8,"div",6),_.Sb(9,"div",7),_.Sb(10,"label",8),_.Wb(11,9),_.Rb(),_.Sb(12,"div",10),_.Mc(13,St,1,1,"input",11),_.Mc(14,Rt,3,2,"select",12),_.Mc(15,kt,2,0,"span",13),_.Rb(),_.Rb(),_.Sb(16,"div",7),_.Sb(17,"label",14),_.Wb(18,15),_.Rb(),_.Sb(19,"div",10),_.Sb(20,"select",16),_.Sb(21,"option",17),_.Wb(22,18),_.Rb(),_.Mc(23,vt,2,2,"option",19),_.Rb(),_.Mc(24,wt,2,0,"span",13),_.Rb(),_.Rb(),_.Rb(),_.Sb(25,"div",20),_.Sb(26,"cd-form-button-panel",21),_.gc("submitActionEvent",(function(){return t.onSubmit()})),_.jc(27,"titlecase"),_.jc(28,"upperFirst"),_.Rb(),_.Rb(),_.Rb(),_.Pb(),_.Rb()),2&e){const e=_.Ac(7);_.pc("modalRef",t.activeModal),_.yb(4),_.ac(_.kc(3,13,t.action))(_.kc(4,15,t.resource)),_.Xb(2),_.yb(2),_.pc("formGroup",t.formGroup),_.yb(4),_.pc("ngClass",_.uc(21,zt,!t.editing)),_.yb(3),_.pc("ngIf",t.editing),_.yb(1),_.pc("ngIf",!t.editing),_.yb(1),_.pc("ngIf",t.formGroup.showError("type",e,"required")),_.yb(6),_.pc("ngValue",null),_.yb(2),_.pc("ngForOf",_.tc(23,xt)),_.yb(1),_.pc("ngIf",t.formGroup.showError("perm",e,"required")),_.yb(2),_.pc("form",t.formGroup)("submitText",_.kc(27,17,t.action)+" "+_.kc(28,19,t.resource))}},directives:[ht.a,i.C,i.r,E.a,i.k,A.a,a.p,a.r,W.a,i.z,C.a,i.q,i.i,i.u,i.B,a.q,D.a,i.d,F.a],pipes:[a.A,j.a],styles:[""]}),e})();var Mt=c("D4zM"),$t=c("cEzo");function qt(e,t){1&e&&_.Nb(0,"input",17),2&e&&_.pc("readonly",!0)}function Nt(e,t){1&e&&(_.Sb(0,"option",21),_.Wb(1,22),_.Rb()),2&e&&_.pc("ngValue",null)}function Tt(e,t){if(1&e&&(_.Sb(0,"option",23),_.Oc(1),_.Rb()),2&e){const e=t.$implicit;_.pc("value",e),_.yb(1),_.Pc(e)}}function Et(e,t){if(1&e&&(_.Sb(0,"select",18),_.Mc(1,Nt,2,1,"option",19),_.Mc(2,Tt,2,2,"option",20),_.Rb()),2&e){const e=_.ic();_.yb(1),_.pc("ngIf",null!==e.userCandidates),_.yb(1),_.pc("ngForOf",e.userCandidates)}}function At(e,t){1&e&&(_.Sb(0,"span",24),_.Wb(1,25),_.Rb())}function Wt(e,t){1&e&&(_.Sb(0,"div",7),_.Sb(1,"div",26),_.Sb(2,"div",27),_.Nb(3,"input",28),_.Sb(4,"label",29),_.Wb(5,30),_.Rb(),_.Rb(),_.Rb(),_.Rb())}function Ct(e,t){1&e&&(_.Sb(0,"span",24),_.Wb(1,38),_.Rb())}const Ft=function(e){return{required:e}};function Ot(e,t){if(1&e&&(_.Sb(0,"div",7),_.Sb(1,"label",31),_.Wb(2,32),_.Rb(),_.Sb(3,"div",10),_.Sb(4,"div",33),_.Nb(5,"input",34),_.Sb(6,"span",35),_.Nb(7,"button",36),_.Nb(8,"cd-copy-2-clipboard-button",37),_.Rb(),_.Rb(),_.Mc(9,Ct,2,0,"span",13),_.Rb(),_.Rb()),2&e){const e=_.ic(),t=_.Ac(7);_.yb(1),_.pc("ngClass",_.uc(3,Ft,!e.viewing)),_.yb(4),_.pc("readonly",e.viewing),_.yb(4),_.pc("ngIf",e.formGroup.showError("access_key",t,"required"))}}function Dt(e,t){1&e&&(_.Sb(0,"span",24),_.Wb(1,44),_.Rb())}function jt(e,t){if(1&e&&(_.Sb(0,"div",7),_.Sb(1,"label",39),_.Wb(2,40),_.Rb(),_.Sb(3,"div",10),_.Sb(4,"div",33),_.Nb(5,"input",41),_.Sb(6,"span",35),_.Nb(7,"button",42),_.Nb(8,"cd-copy-2-clipboard-button",43),_.Rb(),_.Rb(),_.Mc(9,Dt,2,0,"span",13),_.Rb(),_.Rb()),2&e){const e=_.ic(),t=_.Ac(7);_.yb(1),_.pc("ngClass",_.uc(3,Ft,!e.viewing)),_.yb(4),_.pc("readonly",e.viewing),_.yb(4),_.pc("ngIf",e.formGroup.showError("secret_key",t,"required"))}}let Pt=(()=>{class e{constructor(e,t,c){this.formBuilder=e,this.activeModal=t,this.actionLabels=c,this.submitAction=new _.o,this.viewing=!0,this.userCandidates=[],this.resource="S3 Key",this.createForm()}createForm(){this.formGroup=this.formBuilder.group({user:[null,[i.A.required]],generate_key:[!0],access_key:[null,[M.a.requiredIf({generate_key:!1})]],secret_key:[null,[M.a.requiredIf({generate_key:!1})]]})}setViewing(e=!0){this.viewing=e,this.action=this.viewing?this.actionLabels.SHOW:this.actionLabels.CREATE}setValues(e,t,c){this.formGroup.setValue({user:e,generate_key:d.a.isEmpty(t),access_key:t,secret_key:c})}setUserCandidates(e){this.userCandidates=e}onSubmit(){this.submitAction.emit(this.formGroup.value),this.activeModal.close()}}return e.\u0275fac=function(t){return new(t||e)(_.Mb(I.a),_.Mb(o.a),_.Mb(n.b))},e.\u0275cmp=_.Gb({type:e,selectors:[["cd-rgw-user-s3-key-modal"]],outputs:{submitAction:"submitAction"},decls:23,vars:24,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"modal-content"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","user",1,"cd-col-form-label",3,"ngClass"],"Username",[1,"cd-col-form-input"],["id","user","class","form-control","type","text","formControlName","user",3,"readonly",4,"ngIf"],["id","user","class","form-control custom-select","formControlName","user","autofocus","",4,"ngIf"],["class","invalid-feedback",4,"ngIf"],["class","form-group row",4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","showSubmit","submitActionEvent"],["id","user","type","text","formControlName","user",1,"form-control",3,"readonly"],["id","user","formControlName","user","autofocus","",1,"form-control","custom-select"],[3,"ngValue",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"ngValue"],"-- Select a username --",[3,"value"],[1,"invalid-feedback"],"This field is required.",[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["id","generate_key","type","checkbox","formControlName","generate_key",1,"custom-control-input"],["for","generate_key",1,"custom-control-label"],"Auto-generate key",["for","access_key",1,"cd-col-form-label",3,"ngClass"],"Access key",[1,"input-group"],["id","access_key","type","password","formControlName","access_key",1,"form-control",3,"readonly"],[1,"input-group-append"],["type","button","cdPasswordButton","access_key",1,"btn","btn-light"],["source","access_key"],"This field is required.",["for","secret_key",1,"cd-col-form-label",3,"ngClass"],"Secret key",["id","secret_key","type","password","formControlName","secret_key",1,"form-control",3,"readonly"],["type","button","cdPasswordButton","secret_key",1,"btn","btn-light"],["source","secret_key"],"This field is required."]},template:function(e,t){if(1&e&&(_.Sb(0,"cd-modal",0),_.Qb(1,1),_.Wb(2,2),_.jc(3,"titlecase"),_.jc(4,"upperFirst"),_.Pb(),_.Qb(5,3),_.Sb(6,"form",4,5),_.Sb(8,"div",6),_.Sb(9,"div",7),_.Sb(10,"label",8),_.Wb(11,9),_.Rb(),_.Sb(12,"div",10),_.Mc(13,qt,1,1,"input",11),_.Mc(14,Et,3,2,"select",12),_.Mc(15,At,2,0,"span",13),_.Rb(),_.Rb(),_.Mc(16,Wt,6,0,"div",14),_.Mc(17,Ot,10,5,"div",14),_.Mc(18,jt,10,5,"div",14),_.Rb(),_.Sb(19,"div",15),_.Sb(20,"cd-form-button-panel",16),_.gc("submitActionEvent",(function(){return t.onSubmit()})),_.jc(21,"titlecase"),_.jc(22,"upperFirst"),_.Rb(),_.Rb(),_.Rb(),_.Pb(),_.Rb()),2&e){const e=_.Ac(7);_.pc("modalRef",t.activeModal),_.yb(4),_.ac(_.kc(3,14,t.action))(_.kc(4,16,t.resource)),_.Xb(2),_.yb(2),_.pc("formGroup",t.formGroup),_.yb(4),_.pc("ngClass",_.uc(22,Ft,!t.viewing)),_.yb(3),_.pc("ngIf",t.viewing),_.yb(1),_.pc("ngIf",!t.viewing),_.yb(1),_.pc("ngIf",t.formGroup.showError("user",e,"required")),_.yb(1),_.pc("ngIf",!t.viewing),_.yb(1),_.pc("ngIf",!t.formGroup.getValue("generate_key")),_.yb(1),_.pc("ngIf",!t.formGroup.getValue("generate_key")),_.yb(2),_.pc("form",t.formGroup)("submitText",_.kc(21,18,t.action)+" "+_.kc(22,20,t.resource))("showSubmit",!t.viewing)}},directives:[ht.a,i.C,i.r,E.a,i.k,A.a,a.p,a.r,D.a,W.a,i.d,C.a,i.q,i.i,i.z,F.a,a.q,i.u,i.B,i.b,Mt.a,$t.a],pipes:[a.A,j.a],styles:[""]}),e})();class Vt{}function Bt(e,t){1&e&&(_.Sb(0,"span",29),_.Wb(1,30),_.Rb())}function Lt(e,t){1&e&&(_.Sb(0,"span",29),_.Wb(1,31),_.Rb())}function Ut(e,t){if(1&e&&(_.Sb(0,"option",32),_.Oc(1),_.Rb()),2&e){const e=t.$implicit;_.pc("value",e),_.yb(1),_.Qc(" ",e," ")}}function Gt(e,t){1&e&&(_.Sb(0,"span",29),_.Wb(1,33),_.Rb())}function Kt(e,t){1&e&&(_.Sb(0,"span",29),_.Wb(1,48),_.Rb())}function Qt(e,t){if(1&e&&(_.Sb(0,"div",7),_.Sb(1,"label",41),_.Wb(2,42),_.Rb(),_.Sb(3,"div",10),_.Sb(4,"div",43),_.Nb(5,"input",44),_.Sb(6,"span",45),_.Nb(7,"button",46),_.Nb(8,"cd-copy-2-clipboard-button",47),_.Rb(),_.Rb(),_.Mc(9,Kt,2,0,"span",15),_.Rb(),_.Rb()),2&e){const e=_.ic(2),t=_.Ac(7);_.yb(9),_.pc("ngIf",e.formGroup.showError("secret_key",t,"required"))}}function Zt(e,t){if(1&e&&(_.Sb(0,"fieldset"),_.Sb(1,"legend"),_.Wb(2,34),_.Rb(),_.Sb(3,"div",7),_.Sb(4,"div",35),_.Sb(5,"div",36),_.Nb(6,"input",37),_.Sb(7,"label",38),_.Wb(8,39),_.Rb(),_.Rb(),_.Rb(),_.Rb(),_.Mc(9,Qt,10,1,"div",40),_.Rb()),2&e){const e=_.ic();_.yb(9),_.pc("ngIf",!e.editing&&!e.formGroup.getValue("generate_secret"))}}const Yt=function(e){return{required:e}},Jt=function(){return["read","write"]};let Xt=(()=>{class e{constructor(e,t,c){this.formBuilder=e,this.bsModalRef=t,this.actionLabels=c,this.submitAction=new _.o,this.editing=!0,this.subusers=[],this.resource="Subuser",this.createForm()}createForm(){this.formGroup=this.formBuilder.group({uid:[null],subuid:[null,[i.A.required,this.subuserValidator()]],perm:[null,[i.A.required]],generate_secret:[!0],secret_key:[null,[M.a.requiredIf({generate_secret:!1})]]})}subuserValidator(){const e=this;return t=>e.editing||Object(M.b)(t.value)?null:e.subusers.some(c=>d.a.isEqual(e.getSubuserName(c.id),t.value))?{subuserIdExists:!0}:null}getSubuserName(e){if(d.a.isEmpty(e))return e;const t=e.match(/([^:]+)(:(.+))?/);return d.a.isUndefined(t[3])?t[1]:t[3]}setEditing(e=!0){this.editing=e,this.action=this.editing?this.actionLabels.EDIT:this.actionLabels.CREATE}setValues(e,t="",c=""){this.formGroup.setValue({uid:e,subuid:this.getSubuserName(t),perm:c,generate_secret:!0,secret_key:null})}setSubusers(e){this.subusers=e}onSubmit(){const e=this.formGroup.value,t=new Vt;t.id=`${e.uid}:${e.subuid}`,t.permissions=e.perm,t.generate_secret=e.generate_secret,t.secret_key=e.secret_key,this.submitAction.emit(t),this.bsModalRef.close()}}return e.\u0275fac=function(t){return new(t||e)(_.Mb(I.a),_.Mb(o.a),_.Mb(n.b))},e.\u0275cmp=_.Gb({type:e,selectors:[["cd-rgw-user-subuser-modal"]],outputs:{submitAction:"submitAction"},decls:39,vars:26,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"modal-content"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","uid",1,"cd-col-form-label"],"Username",[1,"cd-col-form-input"],["id","uid","type","text","formControlName","uid",1,"form-control",3,"readonly"],["for","subuid",1,"cd-col-form-label",3,"ngClass"],"Subuser",["id","subuid","type","text","formControlName","subuid","autofocus","",1,"form-control",3,"readonly"],["class","invalid-feedback",4,"ngIf"],["for","perm",1,"cd-col-form-label","required"],"Permission",["id","perm","formControlName","perm",1,"form-control","custom-select"],[3,"ngValue"],"-- Select a permission --",[3,"value",4,"ngFor","ngForOf"],["value","read-write"],"read, write",["value","full-control"],"full",[4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required.","The chosen subuser ID is already in use.",[3,"value"],"This field is required.","Swift key",[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["id","generate_secret","type","checkbox","formControlName","generate_secret",1,"custom-control-input"],["for","generate_secret",1,"custom-control-label"],"Auto-generate secret",["class","form-group row",4,"ngIf"],["for","secret_key",1,"cd-col-form-label","required"],"Secret key",[1,"input-group"],["id","secret_key","type","password","formControlName","secret_key",1,"form-control"],[1,"input-group-append"],["type","button","cdPasswordButton","secret_key",1,"btn","btn-light"],["source","secret_key"],"This field is required."]},template:function(e,t){if(1&e&&(_.Sb(0,"cd-modal",0),_.Qb(1,1),_.Wb(2,2),_.jc(3,"titlecase"),_.jc(4,"upperFirst"),_.Pb(),_.Qb(5,3),_.Sb(6,"form",4,5),_.Sb(8,"div",6),_.Sb(9,"div",7),_.Sb(10,"label",8),_.Wb(11,9),_.Rb(),_.Sb(12,"div",10),_.Nb(13,"input",11),_.Rb(),_.Rb(),_.Sb(14,"div",7),_.Sb(15,"label",12),_.Wb(16,13),_.Rb(),_.Sb(17,"div",10),_.Nb(18,"input",14),_.Mc(19,Bt,2,0,"span",15),_.Mc(20,Lt,2,0,"span",15),_.Rb(),_.Rb(),_.Sb(21,"div",7),_.Sb(22,"label",16),_.Wb(23,17),_.Rb(),_.Sb(24,"div",10),_.Sb(25,"select",18),_.Sb(26,"option",19),_.Wb(27,20),_.Rb(),_.Mc(28,Ut,2,2,"option",21),_.Sb(29,"option",22),_.Wb(30,23),_.Rb(),_.Sb(31,"option",24),_.Wb(32,25),_.Rb(),_.Rb(),_.Mc(33,Gt,2,0,"span",15),_.Rb(),_.Rb(),_.Mc(34,Zt,10,1,"fieldset",26),_.Rb(),_.Sb(35,"div",27),_.Sb(36,"cd-form-button-panel",28),_.gc("submitActionEvent",(function(){return t.onSubmit()})),_.jc(37,"titlecase"),_.jc(38,"upperFirst"),_.Rb(),_.Rb(),_.Rb(),_.Pb(),_.Rb()),2&e){const e=_.Ac(7);_.pc("modalRef",t.bsModalRef),_.yb(4),_.ac(_.kc(3,15,t.action))(_.kc(4,17,t.resource)),_.Xb(2),_.yb(2),_.pc("formGroup",t.formGroup),_.yb(7),_.pc("readonly",!0),_.yb(2),_.pc("ngClass",_.uc(23,Yt,!t.editing)),_.yb(3),_.pc("readonly",t.editing),_.yb(1),_.pc("ngIf",t.formGroup.showError("subuid",e,"required")),_.yb(1),_.pc("ngIf",t.formGroup.showError("subuid",e,"subuserIdExists")),_.yb(6),_.pc("ngValue",null),_.yb(2),_.pc("ngForOf",_.tc(25,Jt)),_.yb(5),_.pc("ngIf",t.formGroup.showError("perm",e,"required")),_.yb(1),_.pc("ngIf",!t.editing),_.yb(2),_.pc("form",t.formGroup)("submitText",_.kc(37,19,t.action)+" "+_.kc(38,21,t.resource))}},directives:[ht.a,i.C,i.r,E.a,i.k,A.a,W.a,i.d,C.a,i.q,i.i,a.p,F.a,a.r,i.z,i.u,i.B,a.q,D.a,i.b,Mt.a,$t.a],pipes:[a.A,j.a],styles:[""]}),e})();var Ht=c("Z21x");let ec=(()=>{class e{constructor(e,t){this.activeModal=e,this.actionLabels=t,this.resource="Swift Key",this.action=this.actionLabels.SHOW}setValues(e,t){this.user=e,this.secret_key=t}}return e.\u0275fac=function(t){return new(t||e)(_.Mb(o.a),_.Mb(n.b))},e.\u0275cmp=_.Gb({type:e,selectors:[["cd-rgw-user-swift-key-modal"]],decls:24,vars:11,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + " ",[1,"modal-content"],[1,"modal-body"],["novalidate",""],[1,"form-group","row"],["for","user",1,"cd-col-form-label"],"Username",[1,"cd-col-form-input"],["id","user","name","user","type","text",1,"form-control",3,"readonly","ngModel","ngModelChange"],["for","secret_key",1,"cd-col-form-label"],"Secret key",[1,"input-group"],["id","secret_key","name","secret_key","type","password",1,"form-control",3,"ngModel","readonly","ngModelChange"],[1,"input-group-append"],["type","button","cdPasswordButton","secret_key",1,"btn","btn-light"],["source","secret_key"],[1,"modal-footer"],[3,"backAction"]]},template:function(e,t){1&e&&(_.Sb(0,"cd-modal",0),_.Qb(1,1),_.Wb(2,2),_.jc(3,"titlecase"),_.jc(4,"upperFirst"),_.Pb(),_.Qb(5,3),_.Sb(6,"div",4),_.Sb(7,"form",5),_.Sb(8,"div",6),_.Sb(9,"label",7),_.Wb(10,8),_.Rb(),_.Sb(11,"div",9),_.Sb(12,"input",10),_.gc("ngModelChange",(function(e){return t.user=e})),_.Rb(),_.Rb(),_.Rb(),_.Sb(13,"div",6),_.Sb(14,"label",11),_.Wb(15,12),_.Rb(),_.Sb(16,"div",9),_.Sb(17,"div",13),_.Sb(18,"input",14),_.gc("ngModelChange",(function(e){return t.secret_key=e})),_.Rb(),_.Sb(19,"span",15),_.Nb(20,"button",16),_.Nb(21,"cd-copy-2-clipboard-button",17),_.Rb(),_.Rb(),_.Rb(),_.Rb(),_.Rb(),_.Rb(),_.Sb(22,"div",18),_.Sb(23,"cd-back-button",19),_.gc("backAction",(function(){return t.activeModal.close()})),_.Rb(),_.Rb(),_.Pb(),_.Rb()),2&e&&(_.pc("modalRef",t.activeModal),_.yb(4),_.ac(_.kc(3,7,t.action))(_.kc(4,9,t.resource)),_.Xb(2),_.yb(8),_.pc("readonly",!0)("ngModel",t.user),_.yb(6),_.pc("ngModel",t.secret_key)("readonly",!0))},directives:[ht.a,i.C,i.r,i.s,A.a,W.a,i.d,C.a,i.q,i.t,Mt.a,$t.a,Ht.a],pipes:[a.A,j.a],styles:[""]}),e})();var tc=c("EmSq");function cc(e,t){1&e&&(_.Sb(0,"span",49),_.Wb(1,50),_.Rb())}function ac(e,t){1&e&&(_.Sb(0,"span",49),_.Wb(1,51),_.Rb())}function ic(e,t){1&e&&(_.Sb(0,"span",49),_.Wb(1,52),_.Rb())}function sc(e,t){1&e&&(_.Sb(0,"span",49),_.Wb(1,56),_.Rb())}function oc(e,t){1&e&&(_.Sb(0,"span",49),_.Wb(1,57),_.Rb())}function bc(e,t){if(1&e&&(_.Sb(0,"div",8),_.Sb(1,"label",53),_.Wb(2,54),_.Rb(),_.Sb(3,"div",11),_.Nb(4,"input",55),_.Mc(5,sc,2,0,"span",13),_.Mc(6,oc,2,0,"span",13),_.Rb(),_.Rb()),2&e){_.ic();const e=_.Ac(2),t=_.ic();_.yb(4),_.pc("readonly",t.editing),_.yb(1),_.pc("ngIf",t.userForm.showError("tenant",e,"pattern")),_.yb(1),_.pc("ngIf",t.userForm.showError("tenant",e,"notUnique"))}}function nc(e,t){1&e&&(_.Sb(0,"span",49),_.Wb(1,58),_.Rb())}function rc(e,t){1&e&&(_.Sb(0,"span",49),_.Wb(1,59),_.Rb())}function lc(e,t){1&e&&(_.Sb(0,"span",49),_.Wb(1,60),_.Rb())}function uc(e,t){1&e&&(_.Sb(0,"span",49),_.Wb(1,63),_.Rb())}function dc(e,t){1&e&&(_.Sb(0,"span",49),_.Wb(1,64),_.Rb())}function fc(e,t){if(1&e&&(_.Sb(0,"div",8),_.Nb(1,"label",61),_.Sb(2,"div",11),_.Nb(3,"input",62),_.Mc(4,uc,2,0,"span",13),_.Mc(5,dc,2,0,"span",13),_.Rb(),_.Rb()),2&e){_.ic();const e=_.Ac(2),t=_.ic();_.yb(4),_.pc("ngIf",t.userForm.showError("max_buckets",e,"required")),_.yb(1),_.pc("ngIf",t.userForm.showError("max_buckets",e,"min"))}}function mc(e,t){1&e&&(_.Sb(0,"span",49),_.Wb(1,76),_.Rb())}function pc(e,t){if(1&e&&(_.Sb(0,"div",8),_.Sb(1,"label",69),_.Wb(2,70),_.Rb(),_.Sb(3,"div",11),_.Sb(4,"div",71),_.Nb(5,"input",72),_.Sb(6,"span",73),_.Nb(7,"button",74),_.Nb(8,"cd-copy-2-clipboard-button",75),_.Rb(),_.Rb(),_.Mc(9,mc,2,0,"span",13),_.Rb(),_.Rb()),2&e){_.ic(2);const e=_.Ac(2),t=_.ic();_.yb(9),_.pc("ngIf",t.userForm.showError("access_key",e,"required"))}}function gc(e,t){1&e&&(_.Sb(0,"span",49),_.Wb(1,82),_.Rb())}function hc(e,t){if(1&e&&(_.Sb(0,"div",8),_.Sb(1,"label",77),_.Wb(2,78),_.Rb(),_.Sb(3,"div",11),_.Sb(4,"div",71),_.Nb(5,"input",79),_.Sb(6,"span",73),_.Nb(7,"button",80),_.Nb(8,"cd-copy-2-clipboard-button",81),_.Rb(),_.Rb(),_.Mc(9,gc,2,0,"span",13),_.Rb(),_.Rb()),2&e){_.ic(2);const e=_.Ac(2),t=_.ic();_.yb(9),_.pc("ngIf",t.userForm.showError("secret_key",e,"required"))}}function Sc(e,t){if(1&e&&(_.Sb(0,"fieldset"),_.Sb(1,"legend"),_.Wb(2,65),_.Rb(),_.Sb(3,"div",8),_.Sb(4,"div",14),_.Sb(5,"div",15),_.Nb(6,"input",66),_.Sb(7,"label",67),_.Wb(8,68),_.Rb(),_.Rb(),_.Rb(),_.Rb(),_.Mc(9,pc,10,1,"div",19),_.Mc(10,hc,10,1,"div",19),_.Rb()),2&e){const e=_.ic(2);_.yb(9),_.pc("ngIf",!e.editing&&!e.userForm.getValue("generate_key")),_.yb(1),_.pc("ngIf",!e.editing&&!e.userForm.getValue("generate_key"))}}function yc(e,t){1&e&&(_.Sb(0,"span",92),_.Sb(1,"span",93),_.Wb(2,94),_.Rb(),_.Rb())}const _c=function(e){return[e]};function Rc(e,t){if(1&e){const e=_.Tb();_.Sb(0,"span"),_.Sb(1,"div",71),_.Sb(2,"div",95),_.Sb(3,"span",96),_.Nb(4,"i"),_.Rb(),_.Rb(),_.Nb(5,"input",97),_.Sb(6,"div",98),_.Sb(7,"span",96),_.Nb(8,"i"),_.Rb(),_.Rb(),_.Nb(9,"input",97),_.Sb(10,"span",73),_.Sb(11,"button",99),_.Yb(12,100),_.gc("click",(function(){_.Dc(e);const c=t.index;return _.ic(3).showSubuserModal(c)})),_.Nb(13,"i",89),_.Rb(),_.Sb(14,"button",101),_.Yb(15,102),_.gc("click",(function(){_.Dc(e);const c=t.index;return _.ic(3).deleteSubuser(c)})),_.Nb(16,"i",89),_.Rb(),_.Rb(),_.Rb(),_.Nb(17,"span",93),_.Rb()}if(2&e){const e=t.$implicit,c=_.ic(3);_.yb(4),_.Ab(c.icons.user),_.yb(1),_.qc("value",e.id),_.yb(3),_.Ab(c.icons.share),_.yb(1),_.qc("value","full-control"===e.permissions?"full":e.permissions),_.yb(4),_.pc("ngClass",_.uc(10,_c,c.icons.edit)),_.yb(3),_.pc("ngClass",_.uc(12,_c,c.icons.destroy))}}function kc(e,t){if(1&e){const e=_.Tb();_.Sb(0,"fieldset"),_.Sb(1,"legend"),_.Wb(2,83),_.Rb(),_.Sb(3,"div",84),_.Sb(4,"div",14),_.Mc(5,yc,3,0,"span",85),_.Mc(6,Rc,18,14,"span",86),_.Sb(7,"div",84),_.Sb(8,"div",87),_.Sb(9,"button",88),_.gc("click",(function(){return _.Dc(e),_.ic(2).showSubuserModal()})),_.Nb(10,"i",89),_.Qb(11),_.Wb(12,90),_.jc(13,"titlecase"),_.jc(14,"upperFirst"),_.Pb(),_.Rb(),_.Rb(),_.Rb(),_.Nb(15,"span",91),_.Rb(),_.Rb(),_.Rb()}if(2&e){const e=_.ic(2);_.yb(5),_.pc("ngIf",0===e.subusers.length),_.yb(1),_.pc("ngForOf",e.subusers),_.yb(4),_.pc("ngClass",_.uc(9,_c,e.icons.add)),_.yb(4),_.ac(_.kc(13,5,e.actionLabels.CREATE))(_.kc(14,7,e.subuserLabel)),_.Xb(12)}}function vc(e,t){1&e&&(_.Sb(0,"span",92),_.Sb(1,"span",93),_.Wb(2,108),_.Rb(),_.Rb())}function wc(e,t){if(1&e){const e=_.Tb();_.Sb(0,"span"),_.Sb(1,"div",71),_.Sb(2,"div",95),_.Sb(3,"div",96),_.Nb(4,"i"),_.Rb(),_.Rb(),_.Nb(5,"input",97),_.Sb(6,"span",73),_.Sb(7,"button",109),_.Yb(8,110),_.gc("click",(function(){_.Dc(e);const c=t.index;return _.ic(3).showS3KeyModal(c)})),_.Nb(9,"i",89),_.Rb(),_.Sb(10,"button",111),_.Yb(11,112),_.gc("click",(function(){_.Dc(e);const c=t.index;return _.ic(3).deleteS3Key(c)})),_.Nb(12,"i",89),_.Rb(),_.Rb(),_.Rb(),_.Nb(13,"span",93),_.Rb()}if(2&e){const e=t.$implicit,c=_.ic(3);_.yb(4),_.Ab(c.icons.key),_.yb(1),_.qc("value",e.user),_.yb(4),_.pc("ngClass",_.uc(6,_c,c.icons.show)),_.yb(3),_.pc("ngClass",_.uc(8,_c,c.icons.destroy))}}function zc(e,t){1&e&&(_.Sb(0,"span",92),_.Sb(1,"span",93),_.Wb(2,113),_.Rb(),_.Rb())}function xc(e,t){if(1&e){const e=_.Tb();_.Sb(0,"span"),_.Sb(1,"div",71),_.Sb(2,"div",95),_.Sb(3,"span",96),_.Nb(4,"i"),_.Rb(),_.Rb(),_.Nb(5,"input",97),_.Sb(6,"span",73),_.Sb(7,"button",114),_.Yb(8,115),_.gc("click",(function(){_.Dc(e);const c=t.index;return _.ic(3).showSwiftKeyModal(c)})),_.Nb(9,"i",89),_.Rb(),_.Rb(),_.Rb(),_.Nb(10,"span",93),_.Rb()}if(2&e){const e=t.$implicit,c=_.ic(3);_.yb(4),_.Ab(c.icons.key),_.yb(1),_.qc("value",e.user),_.yb(4),_.pc("ngClass",_.uc(5,_c,c.icons.show))}}function Ic(e,t){if(1&e){const e=_.Tb();_.Sb(0,"fieldset"),_.Sb(1,"legend"),_.Wb(2,103),_.Rb(),_.Sb(3,"div",8),_.Sb(4,"label",61),_.Wb(5,104),_.Rb(),_.Sb(6,"div",11),_.Mc(7,vc,3,0,"span",85),_.Mc(8,wc,14,10,"span",86),_.Sb(9,"div",84),_.Sb(10,"div",87),_.Sb(11,"button",105),_.gc("click",(function(){return _.Dc(e),_.ic(2).showS3KeyModal()})),_.Nb(12,"i",89),_.Qb(13),_.Wb(14,106),_.jc(15,"titlecase"),_.jc(16,"upperFirst"),_.Pb(),_.Rb(),_.Rb(),_.Rb(),_.Nb(17,"span",91),_.Rb(),_.Nb(18,"hr"),_.Rb(),_.Sb(19,"div",8),_.Sb(20,"label",61),_.Wb(21,107),_.Rb(),_.Sb(22,"div",11),_.Mc(23,zc,3,0,"span",85),_.Mc(24,xc,11,7,"span",86),_.Rb(),_.Rb(),_.Rb()}if(2&e){const e=_.ic(2);_.yb(7),_.pc("ngIf",0===e.s3Keys.length),_.yb(1),_.pc("ngForOf",e.s3Keys),_.yb(4),_.pc("ngClass",_.uc(11,_c,e.icons.add)),_.yb(4),_.ac(_.kc(15,7,e.actionLabels.CREATE))(_.kc(16,9,e.s3keyLabel)),_.Xb(14),_.yb(7),_.pc("ngIf",0===e.swiftKeys.length),_.yb(1),_.pc("ngForOf",e.swiftKeys)}}function Mc(e,t){1&e&&(_.Sb(0,"span",92),_.Sb(1,"span",93),_.Wb(2,120),_.Rb(),_.Rb())}function $c(e,t){if(1&e){const e=_.Tb();_.Sb(0,"span"),_.Sb(1,"div",71),_.Sb(2,"span",95),_.Sb(3,"div",96),_.Nb(4,"i"),_.Rb(),_.Rb(),_.Nb(5,"input",97),_.Sb(6,"span",73),_.Sb(7,"button",121),_.Yb(8,122),_.gc("click",(function(){_.Dc(e);const c=t.index;return _.ic(3).showCapabilityModal(c)})),_.Nb(9,"i",89),_.Rb(),_.Sb(10,"button",123),_.Yb(11,124),_.gc("click",(function(){_.Dc(e);const c=t.index;return _.ic(3).deleteCapability(c)})),_.Nb(12,"i",89),_.Rb(),_.Rb(),_.Rb(),_.Nb(13,"span",93),_.Rb()}if(2&e){const e=t.$implicit,c=_.ic(3);_.yb(4),_.Ab(c.icons.share),_.yb(1),_.sc("value","",e.type,":",e.perm,""),_.yb(4),_.pc("ngClass",_.uc(7,_c,c.icons.edit)),_.yb(3),_.pc("ngClass",_.uc(9,_c,c.icons.destroy))}}function qc(e,t){if(1&e){const e=_.Tb();_.Sb(0,"fieldset"),_.Sb(1,"legend"),_.Wb(2,116),_.Rb(),_.Sb(3,"div",8),_.Sb(4,"div",14),_.Mc(5,Mc,3,0,"span",85),_.Mc(6,$c,14,11,"span",86),_.Sb(7,"div",84),_.Sb(8,"div",87),_.Sb(9,"button",117),_.Yb(10,118),_.gc("click",(function(){return _.Dc(e),_.ic(2).showCapabilityModal()})),_.jc(11,"pipeFunction"),_.jc(12,"pipeFunction"),_.Nb(13,"i",89),_.Qb(14),_.Wb(15,119),_.jc(16,"titlecase"),_.jc(17,"upperFirst"),_.Pb(),_.Rb(),_.Rb(),_.Rb(),_.Nb(18,"span",91),_.Rb(),_.Rb(),_.Rb()}if(2&e){const e=_.ic(2);_.yb(5),_.pc("ngIf",0===e.capabilities.length),_.yb(1),_.pc("ngForOf",e.capabilities),_.yb(3),_.pc("disabled",_.lc(11,7,e.capabilities,e.hasAllCapabilities))("disableTooltip",!_.lc(12,10,e.capabilities,e.hasAllCapabilities)),_.yb(4),_.pc("ngClass",_.uc(17,_c,e.icons.add)),_.yb(4),_.ac(_.kc(16,13,e.actionLabels.ADD))(_.kc(17,15,e.capabilityLabel)),_.Xb(15)}}function Nc(e,t){1&e&&(_.Sb(0,"div",8),_.Sb(1,"div",14),_.Sb(2,"div",15),_.Nb(3,"input",125),_.Sb(4,"label",126),_.Wb(5,127),_.Rb(),_.Rb(),_.Rb(),_.Rb())}function Tc(e,t){1&e&&(_.Sb(0,"span",49),_.Wb(1,131),_.Rb())}function Ec(e,t){1&e&&(_.Sb(0,"span",49),_.Wb(1,132),_.Rb())}function Ac(e,t){if(1&e&&(_.Sb(0,"div",8),_.Sb(1,"label",128),_.Wb(2,129),_.Rb(),_.Sb(3,"div",11),_.Nb(4,"input",130),_.Mc(5,Tc,2,0,"span",13),_.Mc(6,Ec,2,0,"span",13),_.Rb(),_.Rb()),2&e){_.ic();const e=_.Ac(2),t=_.ic();_.yb(5),_.pc("ngIf",t.userForm.showError("user_quota_max_size",e,"required")),_.yb(1),_.pc("ngIf",t.userForm.showError("user_quota_max_size",e,"quotaMaxSize"))}}function Wc(e,t){1&e&&(_.Sb(0,"div",8),_.Sb(1,"div",14),_.Sb(2,"div",15),_.Nb(3,"input",133),_.Sb(4,"label",134),_.Wb(5,135),_.Rb(),_.Rb(),_.Rb(),_.Rb())}function Cc(e,t){1&e&&(_.Sb(0,"span",49),_.Wb(1,139),_.Rb())}function Fc(e,t){1&e&&(_.Sb(0,"span",49),_.Wb(1,140),_.Rb())}function Oc(e,t){if(1&e&&(_.Sb(0,"div",8),_.Sb(1,"label",136),_.Wb(2,137),_.Rb(),_.Sb(3,"div",11),_.Nb(4,"input",138),_.Mc(5,Cc,2,0,"span",13),_.Mc(6,Fc,2,0,"span",13),_.Rb(),_.Rb()),2&e){_.ic();const e=_.Ac(2),t=_.ic();_.yb(5),_.pc("ngIf",t.userForm.showError("user_quota_max_objects",e,"required")),_.yb(1),_.pc("ngIf",t.userForm.showError("user_quota_max_objects",e,"min"))}}function Dc(e,t){1&e&&(_.Sb(0,"div",8),_.Sb(1,"div",14),_.Sb(2,"div",15),_.Nb(3,"input",141),_.Sb(4,"label",142),_.Wb(5,143),_.Rb(),_.Rb(),_.Rb(),_.Rb())}function jc(e,t){1&e&&(_.Sb(0,"span",49),_.Wb(1,147),_.Rb())}function Pc(e,t){1&e&&(_.Sb(0,"span",49),_.Wb(1,148),_.Rb())}function Vc(e,t){if(1&e&&(_.Sb(0,"div",8),_.Sb(1,"label",144),_.Wb(2,145),_.Rb(),_.Sb(3,"div",11),_.Nb(4,"input",146),_.Mc(5,jc,2,0,"span",13),_.Mc(6,Pc,2,0,"span",13),_.Rb(),_.Rb()),2&e){_.ic();const e=_.Ac(2),t=_.ic();_.yb(5),_.pc("ngIf",t.userForm.showError("bucket_quota_max_size",e,"required")),_.yb(1),_.pc("ngIf",t.userForm.showError("bucket_quota_max_size",e,"quotaMaxSize"))}}function Bc(e,t){1&e&&(_.Sb(0,"div",8),_.Sb(1,"div",14),_.Sb(2,"div",15),_.Nb(3,"input",149),_.Sb(4,"label",150),_.Wb(5,151),_.Rb(),_.Rb(),_.Rb(),_.Rb())}function Lc(e,t){1&e&&(_.Sb(0,"span",49),_.Wb(1,155),_.Rb())}function Uc(e,t){1&e&&(_.Sb(0,"span",49),_.Wb(1,156),_.Rb())}function Gc(e,t){if(1&e&&(_.Sb(0,"div",8),_.Sb(1,"label",152),_.Wb(2,153),_.Rb(),_.Sb(3,"div",11),_.Nb(4,"input",154),_.Mc(5,Lc,2,0,"span",13),_.Mc(6,Uc,2,0,"span",13),_.Rb(),_.Rb()),2&e){_.ic();const e=_.Ac(2),t=_.ic();_.yb(5),_.pc("ngIf",t.userForm.showError("bucket_quota_max_objects",e,"required")),_.yb(1),_.pc("ngIf",t.userForm.showError("bucket_quota_max_objects",e,"min"))}}const Kc=function(e){return{required:e}};function Qc(e,t){if(1&e){const e=_.Tb();_.Sb(0,"div",1),_.Sb(1,"form",2,3),_.Sb(3,"div",4),_.Sb(4,"div",5),_.Wb(5,6),_.jc(6,"titlecase"),_.jc(7,"upperFirst"),_.Rb(),_.Sb(8,"div",7),_.Sb(9,"div",8),_.Sb(10,"label",9),_.Wb(11,10),_.Rb(),_.Sb(12,"div",11),_.Nb(13,"input",12),_.Mc(14,cc,2,0,"span",13),_.Mc(15,ac,2,0,"span",13),_.Mc(16,ic,2,0,"span",13),_.Rb(),_.Rb(),_.Sb(17,"div",8),_.Sb(18,"div",14),_.Sb(19,"div",15),_.Sb(20,"input",16),_.gc("click",(function(){return _.Dc(e),_.ic().updateFieldsWhenTenanted()})),_.Rb(),_.Sb(21,"label",17),_.Wb(22,18),_.Rb(),_.Rb(),_.Rb(),_.Rb(),_.Mc(23,bc,7,3,"div",19),_.Sb(24,"div",8),_.Sb(25,"label",20),_.Wb(26,21),_.Rb(),_.Sb(27,"div",11),_.Nb(28,"input",22),_.Mc(29,nc,2,0,"span",13),_.Rb(),_.Rb(),_.Sb(30,"div",8),_.Sb(31,"label",23),_.Wb(32,24),_.Rb(),_.Sb(33,"div",11),_.Nb(34,"input",25),_.Mc(35,rc,2,0,"span",13),_.Mc(36,lc,2,0,"span",13),_.Rb(),_.Rb(),_.Sb(37,"div",8),_.Sb(38,"label",26),_.Wb(39,27),_.Rb(),_.Sb(40,"div",11),_.Sb(41,"select",28),_.gc("change",(function(t){return _.Dc(e),_.ic().onMaxBucketsModeChange(t.target.value)})),_.Sb(42,"option",29),_.Wb(43,30),_.Rb(),_.Sb(44,"option",31),_.Wb(45,32),_.Rb(),_.Sb(46,"option",33),_.Wb(47,34),_.Rb(),_.Rb(),_.Rb(),_.Rb(),_.Mc(48,fc,6,2,"div",19),_.Sb(49,"div",8),_.Sb(50,"div",14),_.Sb(51,"div",15),_.Nb(52,"input",35),_.Sb(53,"label",36),_.Wb(54,37),_.Rb(),_.Rb(),_.Rb(),_.Rb(),_.Mc(55,Sc,11,2,"fieldset",38),_.Mc(56,kc,16,11,"fieldset",38),_.Mc(57,Ic,25,13,"fieldset",38),_.Mc(58,qc,19,19,"fieldset",38),_.Sb(59,"fieldset"),_.Sb(60,"legend"),_.Wb(61,39),_.Rb(),_.Sb(62,"div",8),_.Sb(63,"div",14),_.Sb(64,"div",15),_.Nb(65,"input",40),_.Sb(66,"label",41),_.Wb(67,42),_.Rb(),_.Rb(),_.Rb(),_.Rb(),_.Mc(68,Nc,6,0,"div",19),_.Mc(69,Ac,7,2,"div",19),_.Mc(70,Wc,6,0,"div",19),_.Mc(71,Oc,7,2,"div",19),_.Rb(),_.Sb(72,"fieldset"),_.Sb(73,"legend"),_.Wb(74,43),_.Rb(),_.Sb(75,"div",8),_.Sb(76,"div",14),_.Sb(77,"div",15),_.Nb(78,"input",44),_.Sb(79,"label",45),_.Wb(80,46),_.Rb(),_.Rb(),_.Rb(),_.Rb(),_.Mc(81,Dc,6,0,"div",19),_.Mc(82,Vc,7,2,"div",19),_.Mc(83,Bc,6,0,"div",19),_.Mc(84,Gc,7,2,"div",19),_.Rb(),_.Rb(),_.Sb(85,"div",47),_.Sb(86,"cd-form-button-panel",48),_.gc("submitActionEvent",(function(){return _.Dc(e),_.ic().onSubmit()})),_.jc(87,"titlecase"),_.jc(88,"upperFirst"),_.Rb(),_.Rb(),_.Rb(),_.Rb(),_.Rb()}if(2&e){const e=_.Ac(2),t=_.ic();_.yb(1),_.pc("formGroup",t.userForm),_.yb(6),_.ac(_.kc(6,29,t.action))(_.kc(7,31,t.resource)),_.Xb(5),_.yb(3),_.pc("ngClass",_.uc(37,Kc,!t.editing)),_.yb(3),_.pc("readonly",t.editing),_.yb(1),_.pc("ngIf",t.userForm.showError("user_id",e,"required")),_.yb(1),_.pc("ngIf",t.userForm.showError("user_id",e,"pattern")),_.yb(1),_.pc("ngIf",!t.userForm.getValue("show_tenant")&&t.userForm.showError("user_id",e,"notUnique")),_.yb(4),_.pc("readonly",!0),_.yb(3),_.pc("ngIf",t.userForm.getValue("show_tenant")),_.yb(2),_.pc("ngClass",_.uc(39,Kc,!t.editing)),_.yb(4),_.pc("ngIf",t.userForm.showError("display_name",e,"required")),_.yb(6),_.pc("ngIf",t.userForm.showError("email",e,"email")),_.yb(1),_.pc("ngIf",t.userForm.showError("email",e,"notUnique")),_.yb(12),_.pc("ngIf",1==t.userForm.get("max_buckets_mode").value),_.yb(7),_.pc("ngIf",!t.editing),_.yb(1),_.pc("ngIf",t.editing),_.yb(1),_.pc("ngIf",t.editing),_.yb(1),_.pc("ngIf",t.editing),_.yb(10),_.pc("ngIf",t.userForm.controls.user_quota_enabled.value),_.yb(1),_.pc("ngIf",t.userForm.controls.user_quota_enabled.value&&!t.userForm.getValue("user_quota_max_size_unlimited")),_.yb(1),_.pc("ngIf",t.userForm.controls.user_quota_enabled.value),_.yb(1),_.pc("ngIf",t.userForm.controls.user_quota_enabled.value&&!t.userForm.getValue("user_quota_max_objects_unlimited")),_.yb(10),_.pc("ngIf",t.userForm.controls.bucket_quota_enabled.value),_.yb(1),_.pc("ngIf",t.userForm.controls.bucket_quota_enabled.value&&!t.userForm.getValue("bucket_quota_max_size_unlimited")),_.yb(1),_.pc("ngIf",t.userForm.controls.bucket_quota_enabled.value),_.yb(1),_.pc("ngIf",t.userForm.controls.bucket_quota_enabled.value&&!t.userForm.getValue("bucket_quota_max_objects_unlimited")),_.yb(2),_.pc("form",t.userForm)("submitText",_.kc(87,33,t.action)+" "+_.kc(88,35,t.resource))}}let Zc=(()=>{class e extends x.a{constructor(e,t,c,a,i,s,o){super(),this.formBuilder=e,this.route=t,this.router=c,this.rgwUserService=a,this.modalService=i,this.notificationService=s,this.actionLabels=o,this.editing=!1,this.submitObservables=[],this.icons=w.a,this.subusers=[],this.s3Keys=[],this.swiftKeys=[],this.capabilities=[],this.showTenant=!1,this.previousTenant=null,this.resource="user",this.subuserLabel="subuser",this.s3keyLabel="S3 Key",this.capabilityLabel="capability",this.editing=this.router.url.startsWith("/rgw/user/"+n.e.EDIT),this.action=this.editing?this.actionLabels.EDIT:this.actionLabels.CREATE,this.createForm()}createForm(){this.userForm=this.formBuilder.group({user_id:[null,[i.A.required,i.A.pattern(/^[a-zA-Z0-9!@#%^&*()_-]+$/)],this.editing?[]:[M.a.unique(this.rgwUserService.exists,this.rgwUserService,()=>this.userForm.getValue("tenant"))]],show_tenant:[this.editing],tenant:[null,[i.A.pattern(/^[a-zA-Z0-9!@#%^&*()_-]+$/)],this.editing?[]:[M.a.unique(this.rgwUserService.exists,this.rgwUserService,()=>this.userForm.getValue("user_id"),!0)]],display_name:[null,[i.A.required]],email:[null,[M.a.email],[M.a.unique(this.rgwUserService.emailExists,this.rgwUserService)]],max_buckets_mode:[1],max_buckets:[1e3,[M.a.requiredIf({max_buckets_mode:"1"}),M.a.number(!1),i.A.min(1)]],suspended:[!1],generate_key:[!0],access_key:[null,[M.a.requiredIf({generate_key:!1})]],secret_key:[null,[M.a.requiredIf({generate_key:!1})]],user_quota_enabled:[!1],user_quota_max_size_unlimited:[!0],user_quota_max_size:[null,[M.a.composeIf({user_quota_enabled:!0,user_quota_max_size_unlimited:!1},[i.A.required,this.quotaMaxSizeValidator])]],user_quota_max_objects_unlimited:[!0],user_quota_max_objects:[null,[i.A.min(0),M.a.requiredIf({user_quota_enabled:!0,user_quota_max_objects_unlimited:!1})]],bucket_quota_enabled:[!1],bucket_quota_max_size_unlimited:[!0],bucket_quota_max_size:[null,[M.a.composeIf({bucket_quota_enabled:!0,bucket_quota_max_size_unlimited:!1},[i.A.required,this.quotaMaxSizeValidator])]],bucket_quota_max_objects_unlimited:[!0],bucket_quota_max_objects:[null,[i.A.min(0),M.a.requiredIf({bucket_quota_enabled:!0,bucket_quota_max_objects_unlimited:!1})]]})}ngOnInit(){this.route.params.subscribe(e=>{if(!e.hasOwnProperty("uid"))return void this.loadingReady();const t=decodeURIComponent(e.uid),c=[];c.push(this.rgwUserService.get(t)),c.push(this.rgwUserService.getQuota(t)),Object(f.a)(c).subscribe(e=>{const t=d.a.clone(this.userForm.value);let c=d.a.pick(e[0],d.a.keys(this.userForm.value));switch(c.max_buckets){case-1:c.max_buckets_mode=-1,c.max_buckets="";break;case 0:c.max_buckets_mode=0,c.max_buckets="";break;default:c.max_buckets_mode=1}["user","bucket"].forEach(t=>{const a=e[1][t+"_quota"];c[t+"_quota_enabled"]=a.enabled,a.max_size<0?(c[t+"_quota_max_size_unlimited"]=!0,c[t+"_quota_max_size"]=null):(c[t+"_quota_max_size_unlimited"]=!1,c[t+"_quota_max_size"]=a.max_size+" B"),a.max_objects<0?(c[t+"_quota_max_objects_unlimited"]=!0,c[t+"_quota_max_objects"]=null):(c[t+"_quota_max_objects_unlimited"]=!1,c[t+"_quota_max_objects"]=a.max_objects)}),c=d.a.merge(t,c),this.userForm.setValue(c),this.subusers=e[0].subusers,this.s3Keys=e[0].keys,this.swiftKeys=e[0].swift_keys;const a={"read, write":"*"};e[0].caps.forEach(e=>{e.perm in a&&(e.perm=a[e.perm])}),this.capabilities=e[0].caps,this.loadingReady()},()=>{this.loadingError()})})}goToListView(){this.router.navigate(["/rgw/user"])}onSubmit(){let e;if(this.userForm.pristine)return void this.goToListView();const t=this.getUID();if(this.editing){if(this._isGeneralDirty()){const e=this._getUpdateArgs();this.submitObservables.push(this.rgwUserService.update(t,e))}e="Updated Object Gateway user '" + t + "'"}else{const c=this._getCreateArgs();this.submitObservables.push(this.rgwUserService.create(c)),e="Created Object Gateway user '" + t + "'"}if(this._isUserQuotaDirty()){const e=this._getUserQuotaArgs();this.submitObservables.push(this.rgwUserService.updateQuota(t,e))}if(this._isBucketQuotaDirty()){const e=this._getBucketQuotaArgs();this.submitObservables.push(this.rgwUserService.updateQuota(t,e))}Object(ft.a)(...this.submitObservables).subscribe({error:()=>{this.userForm.setErrors({cdSubmitButton:!0})},complete:()=>{this.notificationService.show(z.a.success,e),this.goToListView()}})}updateFieldsWhenTenanted(){this.showTenant=this.userForm.getValue("show_tenant"),this.showTenant?(this.userForm.get("user_id").markAsTouched(),this.previousTenant=this.userForm.get("tenant").value,this.userForm.get("tenant").patchValue(null)):(this.userForm.get("user_id").markAsUntouched(),this.userForm.get("tenant").patchValue(this.previousTenant))}getUID(){var e;let t=this.userForm.getValue("user_id");const c=null===(e=this.userForm)||void 0===e?void 0:e.getValue("tenant");return c&&c.length>0&&(t=`${this.userForm.getValue("tenant")}$${t}`),t}quotaMaxSizeValidator(e){return Object(M.b)(e.value)?null:null===RegExp("^(\\d+(\\.\\d+)?)\\s*(B|K(B|iB)?|M(B|iB)?|G(B|iB)?|T(B|iB)?)?$","i").exec(e.value)||(new mt.a).toBytes(e.value)<1024?{quotaMaxSize:!0}:null}setSubuser(e,t){const c={"full-control":"full","read-write":"readwrite"},a=this.getUID();this.submitObservables.push(this.rgwUserService.createSubuser(a,{subuser:e.id,access:e.permissions in c?c[e.permissions]:e.permissions,key_type:"swift",secret_key:e.secret_key,generate_secret:e.generate_secret?"true":"false"})),d.a.isNumber(t)?this.subusers[t]=e:(this.subusers.push(e),this.swiftKeys.push({user:e.id,secret_key:e.generate_secret?"Apply your changes first...":e.secret_key})),this.userForm.markAsDirty()}deleteSubuser(e){const t=this.subusers[e];this.submitObservables.push(this.rgwUserService.deleteSubuser(this.getUID(),t.id)),this.s3Keys=this.s3Keys.filter(e=>e.user!==t.id),this.swiftKeys=this.swiftKeys.filter(e=>e.user!==t.id),this.subusers.splice(e,1),this.userForm.markAsDirty()}setCapability(e,t){const c=this.getUID();if(d.a.isNumber(t)){const a=this.capabilities[t];this.submitObservables.push(this.rgwUserService.deleteCapability(c,a.type,a.perm)),this.submitObservables.push(this.rgwUserService.addCapability(c,e.type,e.perm)),this.capabilities[t]=e}else this.submitObservables.push(this.rgwUserService.addCapability(c,e.type,e.perm)),this.capabilities=[...this.capabilities,e];this.userForm.markAsDirty()}deleteCapability(e){const t=this.capabilities[e];this.submitObservables.push(this.rgwUserService.deleteCapability(this.getUID(),t.type,t.perm)),this.capabilities.splice(e,1),this.capabilities=[...this.capabilities],this.userForm.markAsDirty()}hasAllCapabilities(e){return!d.a.difference(gt.getAll(),d.a.map(e,"type")).length}setS3Key(e,t){if(d.a.isNumber(t));else{const t=e.user.match(/([^:]+)(:(.+))?/),c=t[1],a={subuser:t[2]?t[3]:"",generate_key:e.generate_key?"true":"false"};"false"===a.generate_key&&(d.a.isNil(e.access_key)||(a.access_key=e.access_key),d.a.isNil(e.secret_key)||(a.secret_key=e.secret_key)),this.submitObservables.push(this.rgwUserService.addS3Key(c,a)),this.s3Keys.push({user:e.user,access_key:e.generate_key?"Apply your changes first...":e.access_key,secret_key:e.generate_key?"Apply your changes first...":e.secret_key})}this.userForm.markAsDirty()}deleteS3Key(e){const t=this.s3Keys[e];this.submitObservables.push(this.rgwUserService.deleteS3Key(this.getUID(),t.access_key)),this.s3Keys.splice(e,1),this.userForm.markAsDirty()}showSubuserModal(e){const t=this.getUID(),c=this.modalService.show(Xt);if(d.a.isNumber(e)){const a=this.subusers[e];c.componentInstance.setEditing(),c.componentInstance.setValues(t,a.id,a.permissions)}else c.componentInstance.setEditing(!1),c.componentInstance.setValues(t),c.componentInstance.setSubusers(this.subusers);c.componentInstance.submitAction.subscribe(t=>{this.setSubuser(t,e)})}showS3KeyModal(e){const t=this.modalService.show(Pt);if(d.a.isNumber(e)){const c=this.s3Keys[e];t.componentInstance.setViewing(),t.componentInstance.setValues(c.user,c.access_key,c.secret_key)}else{const e=this._getS3KeyUserCandidates();t.componentInstance.setViewing(!1),t.componentInstance.setUserCandidates(e),t.componentInstance.submitAction.subscribe(e=>{this.setS3Key(e)})}}showSwiftKeyModal(e){const t=this.modalService.show(ec),c=this.swiftKeys[e];t.componentInstance.setValues(c.user,c.secret_key)}showCapabilityModal(e){const t=this.modalService.show(It);if(d.a.isNumber(e)){const c=this.capabilities[e];t.componentInstance.setEditing(),t.componentInstance.setValues(c.type,c.perm)}else t.componentInstance.setEditing(!1),t.componentInstance.setCapabilities(this.capabilities);t.componentInstance.submitAction.subscribe(t=>{this.setCapability(t,e)})}_isGeneralDirty(){return["display_name","email","max_buckets_mode","max_buckets","suspended"].some(e=>this.userForm.get(e).dirty)}_isUserQuotaDirty(){return["user_quota_enabled","user_quota_max_size_unlimited","user_quota_max_size","user_quota_max_objects_unlimited","user_quota_max_objects"].some(e=>this.userForm.get(e).dirty)}_isBucketQuotaDirty(){return["bucket_quota_enabled","bucket_quota_max_size_unlimited","bucket_quota_max_size","bucket_quota_max_objects_unlimited","bucket_quota_max_objects"].some(e=>this.userForm.get(e).dirty)}_getCreateArgs(){const e={uid:this.getUID(),display_name:this.userForm.getValue("display_name"),suspended:this.userForm.getValue("suspended"),email:"",max_buckets:this.userForm.getValue("max_buckets"),generate_key:this.userForm.getValue("generate_key"),access_key:"",secret_key:""},t=this.userForm.getValue("email");d.a.isString(t)&&t.length>0&&d.a.merge(e,{email:t}),this.userForm.getValue("generate_key")||d.a.merge(e,{generate_key:!1,access_key:this.userForm.getValue("access_key"),secret_key:this.userForm.getValue("secret_key")});const c=parseInt(this.userForm.getValue("max_buckets_mode"),10);return d.a.includes([-1,0],c)&&d.a.merge(e,{max_buckets:c}),e}_getUpdateArgs(){const e={},t=["display_name","email","max_buckets","suspended"];for(const a of t)e[a]=this.userForm.getValue(a);const c=parseInt(this.userForm.getValue("max_buckets_mode"),10);return d.a.includes([-1,0],c)&&(e.max_buckets=c),e}_getUserQuotaArgs(){const e={quota_type:"user",enabled:this.userForm.getValue("user_quota_enabled"),max_size_kb:-1,max_objects:-1};if(!this.userForm.getValue("user_quota_max_size_unlimited")){const t=(new mt.a).toBytes(this.userForm.getValue("user_quota_max_size"));e.max_size_kb=(t/1024).toFixed(0)}return this.userForm.getValue("user_quota_max_objects_unlimited")||(e.max_objects=this.userForm.getValue("user_quota_max_objects")),e}_getBucketQuotaArgs(){const e={quota_type:"bucket",enabled:this.userForm.getValue("bucket_quota_enabled"),max_size_kb:-1,max_objects:-1};if(!this.userForm.getValue("bucket_quota_max_size_unlimited")){const t=(new mt.a).toBytes(this.userForm.getValue("bucket_quota_max_size"));e.max_size_kb=(t/1024).toFixed(0)}return this.userForm.getValue("bucket_quota_max_objects_unlimited")||(e.max_objects=this.userForm.getValue("bucket_quota_max_objects")),e}_getS3KeyUserCandidates(){let e=[];const t=this.getUID();return d.a.isString(t)&&!d.a.isEmpty(t)&&e.push(t),this.subusers.forEach(t=>{e.push(t.id)}),this.s3Keys.forEach(t=>{e.push(t.user)}),e=d.a.uniq(e),e}onMaxBucketsModeChange(e){"1"===e&&(this.userForm.get("max_buckets").valid||this.userForm.patchValue({max_buckets:1e3}))}}return e.\u0275fac=function(t){return new(t||e)(_.Mb(I.a),_.Mb(s.a),_.Mb(s.e),_.Mb(v.a),_.Mb(xe.a),_.Mb($.a),_.Mb(n.b))},e.\u0275cmp=_.Gb({type:e,selectors:[["cd-rgw-user-form"]],features:[_.vb],decls:1,vars:1,consts:function(){return[["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"card"],[1,"card-header"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"card-body"],[1,"form-group","row"],["for","user_id",1,"cd-col-form-label",3,"ngClass"],"User ID",[1,"cd-col-form-input"],["id","user_id","type","text","formControlName","user_id",1,"form-control",3,"readonly"],["class","invalid-feedback",4,"ngIf"],[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["id","show_tenant","type","checkbox","formControlName","show_tenant",1,"custom-control-input",3,"readonly","click"],["for","show_tenant",1,"custom-control-label"],"Show Tenant",["class","form-group row",4,"ngIf"],["for","display_name",1,"cd-col-form-label",3,"ngClass"],"Full name",["id","display_name","type","text","formControlName","display_name",1,"form-control"],["for","email",1,"cd-col-form-label"],"Email address",["id","email","type","text","formControlName","email",1,"form-control"],["for","max_buckets_mode",1,"cd-col-form-label"],"Max. buckets",["formControlName","max_buckets_mode","name","max_buckets_mode","id","max_buckets_mode",1,"form-control","custom-select",3,"change"],["value","-1"],"Disabled",["value","0"],"Unlimited",["value","1"],"Custom",["id","suspended","type","checkbox","formControlName","suspended",1,"custom-control-input"],["for","suspended",1,"custom-control-label"],"Suspended",[4,"ngIf"],"User quota",["id","user_quota_enabled","type","checkbox","formControlName","user_quota_enabled",1,"custom-control-input"],["for","user_quota_enabled",1,"custom-control-label"],"Enabled","Bucket quota",["id","bucket_quota_enabled","type","checkbox","formControlName","bucket_quota_enabled",1,"custom-control-input"],["for","bucket_quota_enabled",1,"custom-control-label"],"Enabled",[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required.","The value is not valid.","The chosen user ID is already in use.",["for","tenant",1,"cd-col-form-label"],"Tenant",["id","tenant","type","text","formControlName","tenant","autofocus","",1,"form-control",3,"readonly"],"The value is not valid.","The chosen user ID exists in this tenant.","This field is required.","This is not a valid email address.","The chosen email address is already in use.",[1,"cd-col-form-label"],["id","max_buckets","type","number","formControlName","max_buckets","min","1",1,"form-control"],"This field is required.","The entered value must be >= 1.","S3 key",["id","generate_key","type","checkbox","formControlName","generate_key",1,"custom-control-input"],["for","generate_key",1,"custom-control-label"],"Auto-generate key",["for","access_key",1,"cd-col-form-label","required"],"Access key",[1,"input-group"],["id","access_key","type","password","formControlName","access_key",1,"form-control"],[1,"input-group-append"],["type","button","cdPasswordButton","access_key",1,"btn","btn-light"],["source","access_key"],"This field is required.",["for","secret_key",1,"cd-col-form-label","required"],"Secret key",["id","secret_key","type","password","formControlName","secret_key",1,"form-control"],["type","button","cdPasswordButton","secret_key",1,"btn","btn-light"],["source","secret_key"],"This field is required.","Subusers",[1,"row"],["class","no-border",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"col-12"],["type","button",1,"btn","btn-light","float-right","tc_addSubuserButton",3,"click"],[3,"ngClass"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"help-block"],[1,"no-border"],[1,"form-text","text-muted"],"There are no subusers.",[1,"input-group-prepend"],[1,"input-group-text"],["type","text","readonly","",1,"cd-form-control",3,"value"],[1,"input-group-prepend","border-left-0","border-right-0"],["type","button",1,"btn","btn-light","tc_showSubuserButton",3,"click",6,"ngbTooltip"],["ngbTooltip","Edit"],["type","button",1,"btn","btn-light","tc_deleteSubuserButton",3,"click",6,"ngbTooltip"],["ngbTooltip","Delete"],"Keys","S3",["type","button",1,"btn","btn-light","float-right","tc_addS3KeyButton",3,"click"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "","Swift","There are no keys.",["type","button",1,"btn","btn-light","tc_showS3KeyButton",3,"click",6,"ngbTooltip"],["ngbTooltip","Show"],["type","button",1,"btn","btn-light","tc_deleteS3KeyButton",3,"click",6,"ngbTooltip"],["ngbTooltip","Delete"],"There are no keys.",["type","button",1,"btn","btn-light","tc_showSwiftKeyButton",3,"click",6,"ngbTooltip"],["ngbTooltip","Show"],"Capabilities",["type","button","triggers","pointerenter:pointerleave",1,"btn","btn-light","float-right","tc_addCapButton",3,"disabled","disableTooltip","click",6,"ngbTooltip"],["ngbTooltip","All capabilities are already added."],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "","There are no capabilities.",["type","button",1,"btn","btn-light","tc_editCapButton",3,"click",6,"ngbTooltip"],["ngbTooltip","Edit"],["type","button",1,"btn","btn-light","tc_deleteCapButton",3,"click",6,"ngbTooltip"],["ngbTooltip","Delete"],["id","user_quota_max_size_unlimited","type","checkbox","formControlName","user_quota_max_size_unlimited",1,"custom-control-input"],["for","user_quota_max_size_unlimited",1,"custom-control-label"],"Unlimited size",["for","user_quota_max_size",1,"cd-col-form-label","required"],"Max. size",["id","user_quota_max_size","type","text","formControlName","user_quota_max_size","cdDimlessBinary","",1,"form-control"],"This field is required.","The value is not valid.",["id","user_quota_max_objects_unlimited","type","checkbox","formControlName","user_quota_max_objects_unlimited",1,"custom-control-input"],["for","user_quota_max_objects_unlimited",1,"custom-control-label"],"Unlimited objects",["for","user_quota_max_objects",1,"cd-col-form-label","required"],"Max. objects",["id","user_quota_max_objects","type","number","formControlName","user_quota_max_objects",1,"form-control"],"This field is required.","The entered value must be >= 0.",["id","bucket_quota_max_size_unlimited","type","checkbox","formControlName","bucket_quota_max_size_unlimited",1,"custom-control-input"],["for","bucket_quota_max_size_unlimited",1,"custom-control-label"],"Unlimited size",["for","bucket_quota_max_size",1,"cd-col-form-label","required"],"Max. size",["id","bucket_quota_max_size","type","text","formControlName","bucket_quota_max_size","cdDimlessBinary","",1,"form-control"],"This field is required.","The value is not valid.",["id","bucket_quota_max_objects_unlimited","type","checkbox","formControlName","bucket_quota_max_objects_unlimited",1,"custom-control-input"],["for","bucket_quota_max_objects_unlimited",1,"custom-control-label"],"Unlimited objects",["for","bucket_quota_max_objects",1,"cd-col-form-label","required"],"Max. objects",["id","bucket_quota_max_objects","type","number","formControlName","bucket_quota_max_objects",1,"form-control"],"This field is required.","The entered value must be >= 0."]},template:function(e,t){1&e&&_.Mc(0,Qc,89,41,"div",0),2&e&&_.pc("cdFormLoading",t.loading)},directives:[T.a,i.C,i.r,E.a,i.k,A.a,a.p,W.a,i.d,C.a,i.q,i.i,a.r,i.b,i.z,i.u,i.B,D.a,F.a,i.v,Mt.a,$t.a,a.q,o.D,tc.a],pipes:[a.A,j.a,b.b],styles:[""]}),e})();var Yc=c("x38r"),Jc=c("TJUb");const Xc=["accessKeyTpl"],Hc=["secretKeyTpl"];function ea(e,t){if(1&e&&(_.Sb(0,"tr"),_.Sb(1,"td",15),_.Wb(2,20),_.Rb(),_.Sb(3,"td"),_.Oc(4),_.Rb(),_.Rb()),2&e){const e=_.ic(4);_.yb(4),_.Pc(e.user.email)}}function ta(e,t){if(1&e&&(_.Sb(0,"div"),_.Oc(1),_.Rb()),2&e){const e=t.$implicit;_.yb(1),_.Rc(" ",e.id," (",e.permissions,") ")}}function ca(e,t){if(1&e&&(_.Sb(0,"tr"),_.Sb(1,"td",15),_.Wb(2,21),_.Rb(),_.Sb(3,"td"),_.Mc(4,ta,2,2,"div",22),_.Rb(),_.Rb()),2&e){const e=_.ic(4);_.yb(4),_.pc("ngForOf",e.user.subusers)}}function aa(e,t){if(1&e&&(_.Sb(0,"div"),_.Oc(1),_.Rb()),2&e){const e=t.$implicit;_.yb(1),_.Rc(" ",e.type," (",e.perm,") ")}}function ia(e,t){if(1&e&&(_.Sb(0,"tr"),_.Sb(1,"td",15),_.Wb(2,23),_.Rb(),_.Sb(3,"td"),_.Mc(4,aa,2,2,"div",22),_.Rb(),_.Rb()),2&e){const e=_.ic(4);_.yb(4),_.pc("ngForOf",e.user.caps)}}function sa(e,t){1&e&&(_.Sb(0,"td"),_.Oc(1,"-"),_.Rb())}function oa(e,t){1&e&&(_.Sb(0,"td"),_.Wb(1,28),_.Rb())}function ba(e,t){if(1&e&&(_.Sb(0,"td"),_.Oc(1),_.jc(2,"dimlessBinary"),_.Rb()),2&e){const e=_.ic(5);_.yb(1),_.Qc(" ",_.kc(2,1,e.user.user_quota.max_size)," ")}}function na(e,t){1&e&&(_.Sb(0,"td"),_.Oc(1,"-"),_.Rb())}function ra(e,t){1&e&&(_.Sb(0,"td"),_.Wb(1,29),_.Rb())}function la(e,t){if(1&e&&(_.Sb(0,"td"),_.Oc(1),_.Rb()),2&e){const e=_.ic(5);_.yb(1),_.Qc(" ",e.user.user_quota.max_objects," ")}}function ua(e,t){if(1&e&&(_.Sb(0,"div"),_.Sb(1,"legend"),_.Wb(2,24),_.Rb(),_.Sb(3,"table",9),_.Sb(4,"tbody"),_.Sb(5,"tr"),_.Sb(6,"td",10),_.Wb(7,25),_.Rb(),_.Sb(8,"td",12),_.Oc(9),_.jc(10,"booleanText"),_.Rb(),_.Rb(),_.Sb(11,"tr"),_.Sb(12,"td",15),_.Wb(13,26),_.Rb(),_.Mc(14,sa,2,0,"td",0),_.Mc(15,oa,2,0,"td",0),_.Mc(16,ba,3,3,"td",0),_.Rb(),_.Sb(17,"tr"),_.Sb(18,"td",15),_.Wb(19,27),_.Rb(),_.Mc(20,na,2,0,"td",0),_.Mc(21,ra,2,0,"td",0),_.Mc(22,la,2,1,"td",0),_.Rb(),_.Rb(),_.Rb(),_.Rb()),2&e){const e=_.ic(4);_.yb(9),_.Pc(_.kc(10,7,e.user.user_quota.enabled)),_.yb(5),_.pc("ngIf",!e.user.user_quota.enabled),_.yb(1),_.pc("ngIf",e.user.user_quota.enabled&&e.user.user_quota.max_size<=-1),_.yb(1),_.pc("ngIf",e.user.user_quota.enabled&&e.user.user_quota.max_size>-1),_.yb(4),_.pc("ngIf",!e.user.user_quota.enabled),_.yb(1),_.pc("ngIf",e.user.user_quota.enabled&&e.user.user_quota.max_objects<=-1),_.yb(1),_.pc("ngIf",e.user.user_quota.enabled&&e.user.user_quota.max_objects>-1)}}function da(e,t){1&e&&(_.Sb(0,"td"),_.Oc(1,"-"),_.Rb())}function fa(e,t){1&e&&(_.Sb(0,"td"),_.Wb(1,34),_.Rb())}function ma(e,t){if(1&e&&(_.Sb(0,"td"),_.Oc(1),_.jc(2,"dimlessBinary"),_.Rb()),2&e){const e=_.ic(5);_.yb(1),_.Qc(" ",_.kc(2,1,e.user.bucket_quota.max_size)," ")}}function pa(e,t){1&e&&(_.Sb(0,"td"),_.Oc(1,"-"),_.Rb())}function ga(e,t){1&e&&(_.Sb(0,"td"),_.Wb(1,35),_.Rb())}function ha(e,t){if(1&e&&(_.Sb(0,"td"),_.Oc(1),_.Rb()),2&e){const e=_.ic(5);_.yb(1),_.Qc(" ",e.user.bucket_quota.max_objects," ")}}function Sa(e,t){if(1&e&&(_.Sb(0,"div"),_.Sb(1,"legend"),_.Wb(2,30),_.Rb(),_.Sb(3,"table",9),_.Sb(4,"tbody"),_.Sb(5,"tr"),_.Sb(6,"td",10),_.Wb(7,31),_.Rb(),_.Sb(8,"td",12),_.Oc(9),_.jc(10,"booleanText"),_.Rb(),_.Rb(),_.Sb(11,"tr"),_.Sb(12,"td",15),_.Wb(13,32),_.Rb(),_.Mc(14,da,2,0,"td",0),_.Mc(15,fa,2,0,"td",0),_.Mc(16,ma,3,3,"td",0),_.Rb(),_.Sb(17,"tr"),_.Sb(18,"td",15),_.Wb(19,33),_.Rb(),_.Mc(20,pa,2,0,"td",0),_.Mc(21,ga,2,0,"td",0),_.Mc(22,ha,2,1,"td",0),_.Rb(),_.Rb(),_.Rb(),_.Rb()),2&e){const e=_.ic(4);_.yb(9),_.Pc(_.kc(10,7,e.user.bucket_quota.enabled)),_.yb(5),_.pc("ngIf",!e.user.bucket_quota.enabled),_.yb(1),_.pc("ngIf",e.user.bucket_quota.enabled&&e.user.bucket_quota.max_size<=-1),_.yb(1),_.pc("ngIf",e.user.bucket_quota.enabled&&e.user.bucket_quota.max_size>-1),_.yb(4),_.pc("ngIf",!e.user.bucket_quota.enabled),_.yb(1),_.pc("ngIf",e.user.bucket_quota.enabled&&e.user.bucket_quota.max_objects<=-1),_.yb(1),_.pc("ngIf",e.user.bucket_quota.enabled&&e.user.bucket_quota.max_objects>-1)}}function ya(e,t){if(1&e&&(_.Sb(0,"div"),_.Sb(1,"table",9),_.Sb(2,"tbody"),_.Sb(3,"tr"),_.Sb(4,"td",10),_.Wb(5,11),_.Rb(),_.Sb(6,"td",12),_.Oc(7),_.Rb(),_.Rb(),_.Sb(8,"tr"),_.Sb(9,"td",10),_.Wb(10,13),_.Rb(),_.Sb(11,"td",12),_.Oc(12),_.Rb(),_.Rb(),_.Sb(13,"tr"),_.Sb(14,"td",10),_.Wb(15,14),_.Rb(),_.Sb(16,"td",12),_.Oc(17),_.Rb(),_.Rb(),_.Sb(18,"tr"),_.Sb(19,"td",15),_.Wb(20,16),_.Rb(),_.Sb(21,"td"),_.Oc(22),_.Rb(),_.Rb(),_.Mc(23,ea,5,1,"tr",0),_.Sb(24,"tr"),_.Sb(25,"td",15),_.Wb(26,17),_.Rb(),_.Sb(27,"td"),_.Oc(28),_.jc(29,"booleanText"),_.Rb(),_.Rb(),_.Sb(30,"tr"),_.Sb(31,"td",15),_.Wb(32,18),_.Rb(),_.Sb(33,"td"),_.Oc(34),_.jc(35,"booleanText"),_.Rb(),_.Rb(),_.Sb(36,"tr"),_.Sb(37,"td",15),_.Wb(38,19),_.Rb(),_.Sb(39,"td"),_.Oc(40),_.jc(41,"map"),_.Rb(),_.Rb(),_.Mc(42,ca,5,1,"tr",0),_.Mc(43,ia,5,1,"tr",0),_.Rb(),_.Rb(),_.Mc(44,ua,23,9,"div",0),_.Mc(45,Sa,23,9,"div",0),_.Rb()),2&e){const e=_.ic(3);_.yb(7),_.Pc(e.user.tenant),_.yb(5),_.Pc(e.user.user_id),_.yb(5),_.Pc(e.user.uid),_.yb(5),_.Pc(e.user.display_name),_.yb(1),_.pc("ngIf",null==e.user.email?null:e.user.email.length),_.yb(5),_.Pc(_.kc(29,12,e.user.suspended)),_.yb(6),_.Pc(_.kc(35,14,"true"===e.user.system)),_.yb(6),_.Pc(_.lc(41,16,e.user.max_buckets,e.maxBucketsMap)),_.yb(2),_.pc("ngIf",e.user.subusers&&e.user.subusers.length),_.yb(1),_.pc("ngIf",e.user.caps&&e.user.caps.length),_.yb(1),_.pc("ngIf",e.user.user_quota),_.yb(1),_.pc("ngIf",e.user.bucket_quota)}}function _a(e,t){if(1&e&&_.Mc(0,ya,46,19,"div",0),2&e){const e=_.ic(2);_.pc("ngIf",e.user)}}const Ra=function(e){return[e]};function ka(e,t){if(1&e){const e=_.Tb();_.Sb(0,"cd-table",38),_.gc("updateSelection",(function(t){return _.Dc(e),_.ic(3).updateKeysSelection(t)})),_.Sb(1,"div",39),_.Sb(2,"div",40),_.Sb(3,"button",41),_.gc("click",(function(){return _.Dc(e),_.ic(3).showKeyModal()})),_.Nb(4,"i",42),_.Qb(5),_.Wb(6,43),_.Pb(),_.Rb(),_.Rb(),_.Rb(),_.Rb()}if(2&e){const e=_.ic(3);_.pc("data",e.keys)("columns",e.keysColumns),_.yb(3),_.pc("disabled",!e.keysSelection.hasSingleSelection),_.yb(1),_.pc("ngClass",_.uc(4,Ra,e.icons.show))}}function va(e,t){1&e&&(_.Sb(0,"li",36),_.Sb(1,"a",4),_.Wb(2,37),_.Rb(),_.Mc(3,ka,7,6,"ng-template",6),_.Rb())}function wa(e,t){if(1&e&&(_.Qb(0),_.Sb(1,"ul",1,2),_.Sb(3,"li",3),_.Sb(4,"a",4),_.Wb(5,5),_.Rb(),_.Mc(6,_a,1,1,"ng-template",6),_.Rb(),_.Mc(7,va,4,0,"li",7),_.Rb(),_.Nb(8,"div",8),_.Pb()),2&e){const e=_.Ac(2),t=_.ic();_.yb(7),_.pc("ngIf",t.keys.length),_.yb(1),_.pc("ngbNavOutlet",e)}}let za=(()=>{class e{constructor(e,t){this.rgwUserService=e,this.modalService=t,this.keys=[],this.keysColumns=[],this.keysSelection=new ke.a,this.icons=w.a}ngOnInit(){this.keysColumns=[{name:"Username",prop:"username",flexGrow:1},{name:"Type",prop:"type",flexGrow:1}],this.maxBucketsMap={"-1":"Disabled",0:"Unlimited"}}ngOnChanges(){this.selection&&(this.user=this.selection,this.user.subusers=d.a.sortBy(this.user.subusers,"id"),this.user.caps=d.a.sortBy(this.user.caps,"type"),this.rgwUserService.getQuota(this.user.uid).subscribe(e=>{d.a.extend(this.user,e)}),this.keys=[],this.user.keys&&this.user.keys.forEach(e=>{this.keys.push({id:this.keys.length+1,type:"S3",username:e.user,ref:e})}),this.user.swift_keys&&this.user.swift_keys.forEach(e=>{this.keys.push({id:this.keys.length+1,type:"Swift",username:e.user,ref:e})}),this.keys=d.a.sortBy(this.keys,"user"))}updateKeysSelection(e){this.keysSelection=e}showKeyModal(){const e=this.keysSelection.first(),t=this.modalService.show("S3"===e.type?Pt:ec);switch(e.type){case"S3":t.componentInstance.setViewing(),t.componentInstance.setValues(e.ref.user,e.ref.access_key,e.ref.secret_key);break;case"Swift":t.componentInstance.setValues(e.ref.user,e.ref.secret_key)}}}return e.\u0275fac=function(t){return new(t||e)(_.Mb(v.a),_.Mb(xe.a))},e.\u0275cmp=_.Gb({type:e,selectors:[["cd-rgw-user-details"]],viewQuery:function(e,t){var c;1&e&&(_.Tc(Xc,!0),_.Tc(Hc,!0)),2&e&&(_.zc(c=_.hc())&&(t.accessKeyTpl=c.first),_.zc(c=_.hc())&&(t.secretKeyTpl=c.first))},inputs:{selection:"selection"},features:[_.wb],decls:1,vars:1,consts:function(){return[[4,"ngIf"],["ngbNav","","cdStatefulTab","rgw-user-details",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem","details"],["ngbNavLink",""],"Details",["ngbNavContent",""],["ngbNavItem","keys",4,"ngIf"],[3,"ngbNavOutlet"],[1,"table","table-striped","table-bordered"],[1,"bold","w-25"],"Tenant",[1,"w-75"],"User ID","Username",[1,"bold"],"Full name","Suspended","System","Maximum buckets","Email address","Subusers",[4,"ngFor","ngForOf"],"Capabilities","User quota","Enabled","Maximum size","Maximum objects","Unlimited","Unlimited","Bucket quota","Enabled","Maximum size","Maximum objects","Unlimited","Unlimited",["ngbNavItem","keys"],"Keys",["columnMode","flex","selectionType","multi","forceIdentifier","true",3,"data","columns","updateSelection"],[1,"table-actions"],["dropdown","",1,"btn-group"],["type","button",1,"btn","btn-accent",3,"disabled","click"],[3,"ngClass"],"Show"]},template:function(e,t){1&e&&_.Mc(0,wa,9,2,"ng-container",0),2&e&&_.pc("ngIf",t.selection)},directives:[a.r,o.p,Je.a,o.r,o.s,o.q,o.u,a.q,Re.a,W.a,a.p],pipes:[qe.a,Jc.a,ve.a],styles:[""]}),e})();const xa=["userSizeTpl"],Ia=["userObjectTpl"];function Ma(e,t){if(1&e&&_.Nb(0,"cd-usage-bar",8),2&e){const e=_.ic().row;_.pc("total",e.user_quota.max_size)("used",e.stats.size_actual)}}function $a(e,t){1&e&&_.Wb(0,9)}function qa(e,t){if(1&e&&(_.Mc(0,Ma,1,2,"cd-usage-bar",6),_.Mc(1,$a,1,0,"ng-template",null,7,_.Nc)),2&e){const e=t.row,c=_.Ac(2);_.pc("ngIf",e.user_quota.max_size>0&&e.user_quota.enabled)("ngIfElse",c)}}function Na(e,t){if(1&e&&_.Nb(0,"cd-usage-bar",12),2&e){const e=_.ic().row;_.pc("total",e.user_quota.max_objects)("used",e.stats.num_objects)("isBinary",!1)}}function Ta(e,t){1&e&&_.Wb(0,13)}function Ea(e,t){if(1&e&&(_.Mc(0,Na,1,3,"cd-usage-bar",10),_.Mc(1,Ta,1,0,"ng-template",null,11,_.Nc)),2&e){const e=t.row,c=_.Ac(2);_.pc("ngIf",e.user_quota.max_objects>0&&e.user_quota.enabled)("ngIfElse",c)}}let Aa=(()=>{class e extends Se.a{constructor(e,t,c,a,i,s){super(),this.authStorageService=e,this.rgwUserService=t,this.modalService=c,this.urlBuilder=a,this.actionLabels=i,this.ngZone=s,this.columns=[],this.users=[],this.selection=new ke.a,this.tableStatus=new ye.a}ngOnInit(){this.permission=this.authStorageService.getPermissions().rgw,this.columns=[{name:"Username",prop:"uid",flexGrow:1},{name:"Tenant",prop:"tenant",flexGrow:1},{name:"Full name",prop:"display_name",flexGrow:1},{name:"Email address",prop:"email",flexGrow:1},{name:"Suspended",prop:"suspended",flexGrow:1,cellClass:"text-center",cellTransformation:Yc.a.checkIcon},{name:"Max. buckets",prop:"max_buckets",flexGrow:1,cellTransformation:Yc.a.map,customTemplateConfig:{"-1":"Disabled",0:"Unlimited"}},{name:"Capacity Limit %",prop:"size_usage",cellTemplate:this.userSizeTpl,flexGrow:.8},{name:"Object Limit %",prop:"object_usage",cellTemplate:this.userObjectTpl,flexGrow:.8}];const e=()=>this.selection.first()&&""+encodeURIComponent(this.selection.first().uid);this.tableActions=[{permission:"create",icon:w.a.add,routerLink:()=>this.urlBuilder.getCreate(),name:this.actionLabels.CREATE,canBePrimary:e=>!e.hasSelection},{permission:"update",icon:w.a.edit,routerLink:()=>this.urlBuilder.getEdit(e()),name:this.actionLabels.EDIT},{permission:"delete",icon:w.a.destroy,click:()=>this.deleteAction(),disable:()=>!this.selection.hasSelection,name:this.actionLabels.DELETE,canBePrimary:e=>e.hasMultiSelection}],this.timeConditionReached()}timeConditionReached(){clearTimeout(this.staleTimeout),this.ngZone.runOutsideAngular(()=>{this.staleTimeout=window.setTimeout(()=>{this.ngZone.run(()=>{this.tableStatus=new ye.a("warning","The user list data might be stale. If needed, you can manually reload it.")})},1e4)})}getUserList(e){this.tableStatus=new ye.a,this.timeConditionReached(),this.rgwUserService.list().subscribe(e=>{this.users=e},()=>{e.error()})}updateSelection(e){this.selection=e}deleteAction(){this.modalService.show(_e.a,{itemDescription:this.selection.hasSingleSelection?"user":"users",itemNames:this.selection.selected.map(e=>e.uid),submitActionObservable:()=>new he.a(e=>{Object(f.a)(this.selection.selected.map(e=>this.rgwUserService.delete(e.uid))).subscribe({error:t=>{e.error(t),this.table.refreshBtn()},complete:()=>{e.complete(),this.table.refreshBtn()}})})})}}return e.\u0275fac=function(t){return new(t||e)(_.Mb(ze.a),_.Mb(v.a),_.Mb(xe.a),_.Mb(Ie.a),_.Mb(n.b),_.Mb(_.A))},e.\u0275cmp=_.Gb({type:e,selectors:[["cd-rgw-user-list"]],viewQuery:function(e,t){var c;1&e&&(_.Jc(Re.a,!0),_.Jc(xa,!0),_.Jc(Ia,!0)),2&e&&(_.zc(c=_.hc())&&(t.table=c.first),_.zc(c=_.hc())&&(t.userSizeTpl=c.first),_.zc(c=_.hc())&&(t.userObjectTpl=c.first))},features:[_.xb([{provide:Ie.a,useValue:new Ie.a("rgw/user")}]),_.vb],decls:8,vars:9,consts:function(){return[["columnMode","flex","selectionType","multiClick","identifier","uid",3,"autoReload","data","columns","hasDetails","status","setExpandedRow","updateSelection","fetchData"],["table",""],[1,"table-actions",3,"permission","selection","tableActions"],["cdTableDetail","",3,"selection"],["userSizeTpl",""],["userObjectTpl",""],[3,"total","used",4,"ngIf","ngIfElse"],["noSizeQuota",""],[3,"total","used"],"No Limit",[3,"total","used","isBinary",4,"ngIf","ngIfElse"],["noObjectQuota",""],[3,"total","used","isBinary"],"No Limit"]},template:function(e,t){1&e&&(_.Sb(0,"cd-table",0,1),_.gc("setExpandedRow",(function(e){return t.setExpandedRow(e)}))("updateSelection",(function(e){return t.updateSelection(e)}))("fetchData",(function(e){return t.getUserList(e)})),_.Nb(2,"cd-table-actions",2),_.Nb(3,"cd-rgw-user-details",3),_.Rb(),_.Mc(4,qa,3,2,"ng-template",null,4,_.Nc),_.Mc(6,Ea,3,2,"ng-template",null,5,_.Nc)),2&e&&(_.pc("autoReload",!1)("data",t.users)("columns",t.columns)("hasDetails",!0)("status",t.tableStatus),_.yb(2),_.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions),_.yb(1),_.pc("selection",t.expandedRow))},directives:[Re.a,Me.a,za,a.r,De.a],styles:[""]}),e})(),Wa=(()=>{class e{}return e.\u0275mod=_.Kb({type:e}),e.\u0275inj=_.Jb({factory:function(t){return new(t||e)},imports:[[a.c,r.a,i.m,i.x,l.a,o.t,s.i,o.F,b.a]]}),e})();const Ca=[{path:""},{path:"daemon",component:dt,data:{breadcrumbs:"Daemons"}},{path:"user",data:{breadcrumbs:"Users"},children:[{path:"",component:Aa},{path:n.e.CREATE,component:Zc,data:{breadcrumbs:n.a.CREATE}},{path:n.e.EDIT+"/:uid",component:Zc,data:{breadcrumbs:n.a.EDIT}}]},{path:"bucket",data:{breadcrumbs:"Buckets"},children:[{path:"",component:Qe},{path:n.e.CREATE,component:ge,data:{breadcrumbs:n.a.CREATE}},{path:n.e.EDIT+"/:bid",component:ge,data:{breadcrumbs:n.a.EDIT}}]}];let Fa=(()=>{class e{}return e.\u0275mod=_.Kb({type:e}),e.\u0275inj=_.Jb({factory:function(t){return new(t||e)},imports:[[Wa,s.i.forChild(Ca)]]}),e})()}}]);
\ No newline at end of file
--- /dev/null
+(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{OkK6:function(e,t,c){"use strict";c.r(t),c.d(t,"RgwModule",(function(){return Pa})),c.d(t,"RoutedRgwModule",(function(){return Ba}));var a=c("SVse"),i=c("s7LF"),s=c("iInd"),b=c("G0yt"),o=c("zWsK"),n=c("sne2"),r=c("PCNd"),l=c("G6Q+"),u=c("LvDl"),d=c.n(u),f=c("cp0P"),m=c("LRne"),p=c("PqYM"),g=c("lJxs"),h=c("aGrj"),S=c("mrSG"),y=c("IheW"),_=c("CqXF"),R=c("JIr8"),k=c("9xzX"),v=c("xTzq"),w=c("8Y7J");let z=(()=>{let e=class{constructor(e,t){this.http=e,this.rgwDaemonService=t,this.url="api/rgw/bucket"}list(){return this.rgwDaemonService.request(e=>(e=e.append("stats","true"),this.http.get(this.url,{params:e})))}get(e){return this.rgwDaemonService.request(t=>this.http.get(`${this.url}/${e}`,{params:t}))}create(e,t,c,a,i,s,b){return this.rgwDaemonService.request(o=>this.http.post(this.url,null,{params:new y.e({fromObject:{bucket:e,uid:t,zonegroup:c,placement_target:a,lock_enabled:String(i),lock_mode:s,lock_retention_period_days:b,daemon_name:o.get("daemon_name")}})}))}update(e,t,c,a,i,s,b,o,n){return this.rgwDaemonService.request(r=>(r=(r=(r=(r=(r=(r=(r=(r=r.append("bucket_id",t)).append("uid",c)).append("versioning_state",a)).append("mfa_delete",i)).append("mfa_token_serial",s)).append("mfa_token_pin",b)).append("lock_mode",o)).append("lock_retention_period_days",n),this.http.put(`${this.url}/${e}`,null,{params:r})))}delete(e,t=!0){return this.rgwDaemonService.request(c=>(c=c.append("purge_objects",t?"true":"false"),this.http.delete(`${this.url}/${e}`,{params:c})))}exists(e){return this.get(e).pipe(Object(_.a)(!0),Object(R.a)(e=>(d.a.isFunction(e.preventDefault)&&e.preventDefault(),Object(m.a)(!1))))}getLockDays(e){return e.lock_retention_period_years>0?Math.floor(365.242*e.lock_retention_period_years):e.lock_retention_period_days||0}};return e.\u0275fac=function(t){return new(t||e)(w.dc(y.b),w.dc(k.a))},e.\u0275prov=w.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e=Object(S.b)([v.a,Object(S.d)("design:paramtypes",[y.b,k.a])],e),e})(),I=(()=>{let e=class{constructor(e,t){this.http=e,this.rgwDaemonService=t,this.url="api/rgw/site"}get(e){return this.rgwDaemonService.request(t=>(e&&(t=t.append("query",e)),this.http.get(this.url,{params:t})))}};return e.\u0275fac=function(t){return new(t||e)(w.dc(y.b),w.dc(k.a))},e.\u0275prov=w.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e=Object(S.b)([v.a,Object(S.d)("design:paramtypes",[y.b,k.a])],e),e})();var x=c("P8lu"),M=c("oxzT"),$=c("mtw6"),q=c("spCT"),N=c("2EZI"),T=c("1Ni5"),E=c("9nlD"),C=function(e){return e.ENABLED="Enabled",e.DISABLED="Disabled",e}({}),A=function(e){return e.ENABLED="Enabled",e.SUSPENDED="Suspended",e}({}),F=c("zc8c"),W=c("NwgZ"),O=c("ocLN"),D=c("ANnk"),j=c("f69J"),P=c("IZUe"),V=c("p4Cf"),B=c("6+kj"),L=c("8xTl");function U(e,t){1&e&&(w.Sb(0,"div",9),w.Sb(1,"label",36),w.Wb(2,37),w.Rb(),w.Sb(3,"div",12),w.Nb(4,"input",38),w.Rb(),w.Rb())}function G(e,t){1&e&&(w.Sb(0,"span",39),w.Wb(1,40),w.Rb())}function K(e,t){1&e&&(w.Sb(0,"span",39),w.Wb(1,41),w.Rb())}function Q(e,t){1&e&&(w.Sb(0,"span",39),w.Wb(1,42),w.Rb())}function J(e,t){1&e&&(w.Sb(0,"span",39),w.Wb(1,43),w.Rb())}function Z(e,t){1&e&&(w.Sb(0,"span",39),w.Wb(1,44),w.Rb())}function X(e,t){1&e&&(w.Sb(0,"span",39),w.Wb(1,45),w.Rb())}function Y(e,t){1&e&&(w.Sb(0,"span",39),w.Wb(1,46),w.Rb())}function H(e,t){1&e&&(w.Sb(0,"span",39),w.Wb(1,47),w.Rb())}function ee(e,t){1&e&&(w.Sb(0,"option",48),w.Wb(1,49),w.Rb()),2&e&&w.pc("ngValue",null)}function te(e,t){1&e&&(w.Sb(0,"option",48),w.Wb(1,50),w.Rb()),2&e&&w.pc("ngValue",null)}function ce(e,t){if(1&e&&(w.Sb(0,"option",51),w.Oc(1),w.Rb()),2&e){const e=t.$implicit;w.pc("value",e),w.yb(1),w.Pc(e)}}function ae(e,t){1&e&&(w.Sb(0,"span",39),w.Wb(1,52),w.Rb())}function ie(e,t){1&e&&(w.Sb(0,"option",48),w.Wb(1,54),w.Rb()),2&e&&w.pc("ngValue",null)}function se(e,t){1&e&&(w.Sb(0,"option",48),w.Wb(1,55),w.Rb()),2&e&&w.pc("ngValue",null)}function be(e,t){if(1&e&&(w.Sb(0,"option",51),w.Oc(1),w.Rb()),2&e){const e=t.$implicit;w.pc("value",e.name),w.yb(1),w.Pc(e.description)}}function oe(e,t){1&e&&(w.Sb(0,"span",39),w.Wb(1,56),w.Rb())}function ne(e,t){if(1&e&&(w.Sb(0,"select",53),w.Mc(1,ie,2,1,"option",19),w.Mc(2,se,2,1,"option",19),w.Mc(3,be,2,2,"option",20),w.Rb(),w.Mc(4,oe,2,0,"span",15)),2&e){w.ic();const e=w.Ac(2),t=w.ic();w.yb(1),w.pc("ngIf",null===t.placementTargets),w.yb(1),w.pc("ngIf",null!==t.placementTargets),w.yb(1),w.pc("ngForOf",t.placementTargets),w.yb(1),w.pc("ngIf",t.bucketForm.showError("placement-target",e,"required"))}}function re(e,t){1&e&&(w.Qb(0),w.Nb(1,"input",57),w.Pb())}function le(e,t){if(1&e){const e=w.Tb();w.Sb(0,"fieldset"),w.Sb(1,"legend",26),w.Wb(2,58),w.Rb(),w.Sb(3,"div",9),w.Sb(4,"div",28),w.Sb(5,"div",29),w.Sb(6,"input",59),w.gc("change",(function(){return w.Dc(e),w.ic(2).setMfaDeleteValidators()})),w.Rb(),w.Sb(7,"label",60),w.Wb(8,61),w.Rb(),w.Sb(9,"cd-helper"),w.Sb(10,"span"),w.Wb(11,62),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Rb()}}function ue(e,t){1&e&&(w.Sb(0,"span",39),w.Wb(1,71),w.Rb())}function de(e,t){if(1&e&&(w.Sb(0,"div",9),w.Sb(1,"label",68),w.Wb(2,69),w.Rb(),w.Sb(3,"div",12),w.Nb(4,"input",70),w.Mc(5,ue,2,0,"span",15),w.Rb(),w.Rb()),2&e){w.ic(2);const e=w.Ac(2),t=w.ic();w.yb(5),w.pc("ngIf",t.bucketForm.showError("mfa-token-serial",e,"required"))}}function fe(e,t){1&e&&(w.Sb(0,"span",39),w.Wb(1,75),w.Rb())}function me(e,t){if(1&e&&(w.Sb(0,"div",9),w.Sb(1,"label",72),w.Wb(2,73),w.Rb(),w.Sb(3,"div",12),w.Nb(4,"input",74),w.Mc(5,fe,2,0,"span",15),w.Rb(),w.Rb()),2&e){w.ic(2);const e=w.Ac(2),t=w.ic();w.yb(5),w.pc("ngIf",t.bucketForm.showError("mfa-token-pin",e,"required"))}}function pe(e,t){if(1&e){const e=w.Tb();w.Sb(0,"fieldset"),w.Sb(1,"legend",26),w.Wb(2,63),w.Rb(),w.Sb(3,"div",9),w.Sb(4,"div",28),w.Sb(5,"div",29),w.Sb(6,"input",64),w.gc("change",(function(){return w.Dc(e),w.ic(2).setMfaDeleteValidators()})),w.Rb(),w.Sb(7,"label",65),w.Wb(8,66),w.Rb(),w.Sb(9,"cd-helper"),w.Sb(10,"span"),w.Wb(11,67),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Mc(12,de,6,1,"div",8),w.Mc(13,me,6,1,"div",8),w.Rb()}if(2&e){const e=w.ic(2);w.yb(12),w.pc("ngIf",e.areMfaCredentialsRequired()),w.yb(1),w.pc("ngIf",e.areMfaCredentialsRequired())}}function ge(e,t){1&e&&(w.Sb(0,"div",9),w.Sb(1,"label",76),w.Wb(2,77),w.Rb(),w.Sb(3,"div",12),w.Sb(4,"select",78),w.Sb(5,"option",79),w.Wb(6,80),w.Rb(),w.Sb(7,"option",81),w.Wb(8,82),w.Rb(),w.Rb(),w.Rb(),w.Rb())}function he(e,t){1&e&&(w.Sb(0,"span",39),w.Wb(1,87),w.Rb())}function Se(e,t){1&e&&(w.Sb(0,"span",39),w.Wb(1,88),w.Rb())}function ye(e,t){if(1&e&&(w.Sb(0,"div",9),w.Sb(1,"label",83),w.Qb(2),w.Wb(3,84),w.Pb(),w.Sb(4,"cd-helper"),w.Wb(5,85),w.Rb(),w.Rb(),w.Sb(6,"div",12),w.Nb(7,"input",86),w.Mc(8,he,2,0,"span",15),w.Mc(9,Se,2,0,"span",15),w.Rb(),w.Rb()),2&e){w.ic();const e=w.Ac(2),t=w.ic();w.yb(8),w.pc("ngIf",t.bucketForm.showError("lock_retention_period_days",e,"pattern")),w.yb(1),w.pc("ngIf",t.bucketForm.showError("lock_retention_period_days",e,"lockDays"))}}const _e=function(e){return{required:e}};function Re(e,t){if(1&e){const e=w.Tb();w.Sb(0,"div",1),w.Sb(1,"form",2,3),w.Sb(3,"div",4),w.Sb(4,"div",5),w.Wb(5,6),w.jc(6,"titlecase"),w.jc(7,"upperFirst"),w.Rb(),w.Sb(8,"div",7),w.Mc(9,U,5,0,"div",8),w.Sb(10,"div",9),w.Sb(11,"label",10),w.Wb(12,11),w.Rb(),w.Sb(13,"div",12),w.Sb(14,"input",13),w.Yb(15,14),w.Rb(),w.Mc(16,G,2,0,"span",15),w.Mc(17,K,2,0,"span",15),w.Mc(18,Q,2,0,"span",15),w.Mc(19,J,2,0,"span",15),w.Mc(20,Z,2,0,"span",15),w.Mc(21,X,2,0,"span",15),w.Mc(22,Y,2,0,"span",15),w.Mc(23,H,2,0,"span",15),w.Rb(),w.Rb(),w.Sb(24,"div",9),w.Sb(25,"label",16),w.Wb(26,17),w.Rb(),w.Sb(27,"div",12),w.Sb(28,"select",18),w.Mc(29,ee,2,1,"option",19),w.Mc(30,te,2,1,"option",19),w.Mc(31,ce,2,2,"option",20),w.Rb(),w.Mc(32,ae,2,0,"span",15),w.Rb(),w.Rb(),w.Sb(33,"div",9),w.Sb(34,"label",21),w.Wb(35,22),w.Rb(),w.Sb(36,"div",12),w.Mc(37,ne,5,4,"ng-template",null,23,w.Nc),w.Mc(39,re,2,0,"ng-container",24),w.Rb(),w.Rb(),w.Mc(40,le,12,0,"fieldset",25),w.Mc(41,pe,14,2,"fieldset",25),w.Sb(42,"fieldset"),w.Sb(43,"legend",26),w.Wb(44,27),w.Rb(),w.Sb(45,"div",9),w.Sb(46,"div",28),w.Sb(47,"div",29),w.Nb(48,"input",30),w.Sb(49,"label",31),w.Wb(50,32),w.Rb(),w.Sb(51,"cd-helper"),w.Sb(52,"span"),w.Wb(53,33),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Mc(54,ge,9,0,"div",8),w.Mc(55,ye,10,2,"div",8),w.Rb(),w.Rb(),w.Sb(56,"div",34),w.Sb(57,"cd-form-button-panel",35),w.gc("submitActionEvent",(function(){return w.Dc(e),w.ic().submit()})),w.jc(58,"titlecase"),w.jc(59,"upperFirst"),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Rb()}if(2&e){const e=w.Ac(2),t=w.Ac(38),c=w.ic();w.yb(1),w.pc("formGroup",c.bucketForm),w.yb(6),w.ac(w.kc(6,29,c.action))(w.kc(7,31,c.resource)),w.Xb(5),w.yb(2),w.pc("ngIf",c.editing),w.yb(2),w.pc("ngClass",w.uc(37,_e,!c.editing)),w.yb(3),w.pc("readonly",c.editing)("autofocus",!c.editing),w.yb(2),w.pc("ngIf",c.bucketForm.showError("bid",e,"required")),w.yb(1),w.pc("ngIf",c.bucketForm.showError("bid",e,"bucketNameInvalid")),w.yb(1),w.pc("ngIf",c.bucketForm.showError("bid",e,"bucketNameExists")),w.yb(1),w.pc("ngIf",c.bucketForm.showError("bid",e,"containsUpperCase")),w.yb(1),w.pc("ngIf",c.bucketForm.showError("bid",e,"lowerCaseOrNumber")),w.yb(1),w.pc("ngIf",c.bucketForm.showError("bid",e,"ipAddress")),w.yb(1),w.pc("ngIf",c.bucketForm.showError("bid",e,"onlyLowerCaseAndNumbers")),w.yb(1),w.pc("ngIf",c.bucketForm.showError("bid",e,"shouldBeInRange")),w.yb(5),w.pc("autofocus",c.editing),w.yb(1),w.pc("ngIf",null===c.owners),w.yb(1),w.pc("ngIf",null!==c.owners),w.yb(1),w.pc("ngForOf",c.owners),w.yb(1),w.pc("ngIf",c.bucketForm.showError("owner",e,"required")),w.yb(2),w.pc("ngClass",w.uc(39,_e,!c.editing)),w.yb(5),w.pc("ngIf",c.editing)("ngIfElse",t),w.yb(1),w.pc("ngIf",c.editing),w.yb(1),w.pc("ngIf",c.editing),w.yb(13),w.pc("ngIf",c.bucketForm.getValue("lock_enabled")),w.yb(1),w.pc("ngIf",c.bucketForm.getValue("lock_enabled")),w.yb(2),w.pc("form",c.bucketForm)("submitText",w.kc(58,33,c.action)+" "+w.kc(59,35,c.resource))}}let ke=(()=>{class e extends q.a{constructor(e,t,c,a,i,s,b,o){super(),this.route=e,this.router=t,this.formBuilder=c,this.rgwBucketService=a,this.rgwSiteService=i,this.rgwUserService=s,this.notificationService=b,this.actionLabels=o,this.editing=!1,this.owners=null,this.placementTargets=[],this.isVersioningAlreadyEnabled=!1,this.isMfaDeleteAlreadyEnabled=!1,this.icons=M.a,this.editing=this.router.url.startsWith("/rgw/bucket/"+n.e.EDIT),this.action=this.editing?this.actionLabels.EDIT:this.actionLabels.CREATE,this.resource="bucket",this.createForm()}get isVersioningEnabled(){return this.bucketForm.getValue("versioning")}get isMfaDeleteEnabled(){return this.bucketForm.getValue("mfa-delete")}createForm(){const e=this,t=T.a.custom("lockDays",()=>{if(!e.bucketForm||!d.a.get(e.bucketForm.getRawValue(),"lock_enabled"))return!1;const t=Number(e.bucketForm.getValue("lock_retention_period_days"));return!Number.isInteger(t)||0===t});this.bucketForm=this.formBuilder.group({id:[null],bid:[null,[i.A.required],this.editing?[]:[this.bucketNameValidator()]],owner:[null,[i.A.required]],"placement-target":[null,this.editing?[]:[i.A.required]],versioning:[null],"mfa-delete":[null],"mfa-token-serial":[""],"mfa-token-pin":[""],lock_enabled:[{value:!1,disabled:this.editing}],lock_mode:["COMPLIANCE"],lock_retention_period_days:[0,[T.a.number(!1),t]]})}ngOnInit(){const e={owners:this.rgwUserService.enumerate()};this.editing||(e.getPlacementTargets=this.rgwSiteService.get("placement-targets")),this.route.params.subscribe(t=>{if(t.hasOwnProperty("bid")){const c=decodeURIComponent(t.bid);e.getBid=this.rgwBucketService.get(c)}Object(f.a)(e).subscribe(e=>{if(this.owners=e.owners.sort(),e.getPlacementTargets){const t=e.getPlacementTargets;this.zonegroup=t.zonegroup,d.a.forEach(t.placement_targets,e=>{e.description=`${e.name} (${"pool"}: ${e.data_pool})`,this.placementTargets.push(e)}),1===this.placementTargets.length&&this.bucketForm.get("placement-target").setValue(this.placementTargets[0].name)}if(e.getBid){const t=e.getBid,c=d.a.clone(this.bucketForm.getRawValue());let a=d.a.pick(t,d.a.keys(c));a.lock_retention_period_days=this.rgwBucketService.getLockDays(t),a["placement-target"]=t.placement_rule,a.versioning=t.versioning===A.ENABLED,a["mfa-delete"]=t.mfa_delete===C.ENABLED,a=d.a.merge(c,a),this.bucketForm.setValue(a),this.editing&&(this.isVersioningAlreadyEnabled=this.isVersioningEnabled,this.isMfaDeleteAlreadyEnabled=this.isMfaDeleteEnabled,this.setMfaDeleteValidators(),a.lock_enabled&&this.bucketForm.controls.versioning.disable())}this.loadingReady()})})}goToListView(){this.router.navigate(["/rgw/bucket"])}submit(){if(this.bucketForm.pristine)return void this.goToListView();const e=this.bucketForm.value;if(this.editing){const t=this.getVersioningStatus(),c=this.getMfaDeleteStatus();this.rgwBucketService.update(e.bid,e.id,e.owner,t,c,e["mfa-token-serial"],e["mfa-token-pin"],e.lock_mode,e.lock_retention_period_days).subscribe(()=>{this.notificationService.show($.a.success,"Updated Object Gateway bucket '" + e.bid + "'."),this.goToListView()},()=>{this.bucketForm.setErrors({cdSubmitButton:!0})})}else this.rgwBucketService.create(e.bid,e.owner,this.zonegroup,e["placement-target"],e.lock_enabled,e.lock_mode,e.lock_retention_period_days).subscribe(()=>{this.notificationService.show($.a.success,"Created Object Gateway bucket '" + e.bid + "'"),this.goToListView()},()=>{this.bucketForm.setErrors({cdSubmitButton:!0})})}bucketNameValidator(){return e=>{if(e.pristine||""===e.value)return Object(m.a)(null);const t=[];let c;return t.push(()=>{const e=this.bucketForm.get("bid").value;let t=!0;return(/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i.test(e)||/^(?:[a-f0-9]{1,4}:){7}[a-f0-9]{1,4}$/i.test(e))&&(c="ipAddress",t=!1),t}),t.push(e=>!!d.a.inRange(e.length,3,64)||(c="shouldBeInRange",!1)),t.push(e=>{const t=d.a.split(e,".");return d.a.every(t,t=>t!==d.a.toLower(t)||t.includes("_")?(c="containsUpperCase",!1):/^\S*$/.test(e)&&/[0-9a-z-]/.test(t)?d.a.every([0,t.length-1],e=>(c="lowerCaseOrNumber",/[a-z]/.test(t[e])||d.a.isInteger(d.a.parseInt(t[e])))):(c="onlyLowerCaseAndNumbers",!1))}),d.a.every(t,t=>t(e.value))?Object(p.a)().pipe(Object(h.a)(this.rgwBucketService.exists.call(this.rgwBucketService,e.value)),Object(g.a)(e=>e?{bucketNameExists:!0}:null)):Object(p.a)().pipe(Object(g.a)(()=>{switch(c){case"onlyLowerCaseAndNumbers":return{onlyLowerCaseAndNumbers:!0};case"shouldBeInRange":return{shouldBeInRange:!0};case"ipAddress":return{ipAddress:!0};case"containsUpperCase":return{containsUpperCase:!0};case"lowerCaseOrNumber":return{lowerCaseOrNumber:!0};default:return{bucketNameInvalid:!0}}}))}}areMfaCredentialsRequired(){return this.isMfaDeleteEnabled!==this.isMfaDeleteAlreadyEnabled||this.isMfaDeleteAlreadyEnabled&&this.isVersioningEnabled!==this.isVersioningAlreadyEnabled}setMfaDeleteValidators(){const e=this.bucketForm.get("mfa-token-serial"),t=this.bucketForm.get("mfa-token-pin");this.areMfaCredentialsRequired()?(e.setValidators(i.A.required),t.setValidators(i.A.required)):(e.setValidators(null),t.setValidators(null)),e.updateValueAndValidity(),t.updateValueAndValidity()}getVersioningStatus(){return this.isVersioningEnabled?A.ENABLED:A.SUSPENDED}getMfaDeleteStatus(){return this.isMfaDeleteEnabled?C.ENABLED:C.DISABLED}}return e.\u0275fac=function(t){return new(t||e)(w.Mb(s.a),w.Mb(s.e),w.Mb(N.a),w.Mb(z),w.Mb(I),w.Mb(x.a),w.Mb(E.a),w.Mb(n.b))},e.\u0275cmp=w.Gb({type:e,selectors:[["cd-rgw-bucket-form"]],features:[w.vb],decls:1,vars:1,consts:function(){return[["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],["name","bucketForm","novalidate","",3,"formGroup"],["frm","ngForm"],[1,"card"],[1,"card-header"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"card-body"],["class","form-group row",4,"ngIf"],[1,"form-group","row"],["for","bid",1,"cd-col-form-label",3,"ngClass"],"Name",[1,"cd-col-form-input"],["id","bid","name","bid","type","text","formControlName","bid",1,"form-control",3,"readonly","autofocus",6,"placeholder"],["placeholder","Name..."],["class","invalid-feedback",4,"ngIf"],["for","owner",1,"cd-col-form-label","required"],"Owner",["id","owner","name","owner","formControlName","owner",1,"form-control","custom-select",3,"autofocus"],[3,"ngValue",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],["for","placement-target",1,"cd-col-form-label",3,"ngClass"],"Placement target",["placementTargetSelect",""],[4,"ngIf","ngIfElse"],[4,"ngIf"],[1,"cd-header"],"Locking",[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["id","lock_enabled","formControlName","lock_enabled","type","checkbox",1,"custom-control-input"],["for","lock_enabled",1,"custom-control-label"],"Enabled","Enables locking for the objects in the bucket. Locking can only be enabled while creating a bucket.",[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],["for","id",1,"cd-col-form-label"],"Id",["id","id","name","id","type","text","formControlName","id","readonly","",1,"form-control"],[1,"invalid-feedback"],"This field is required.","The value is not valid.","The chosen name is already in use.","Bucket names must not contain uppercase characters or underscores.","Each label must start and end with a lowercase letter or a number.","Bucket names cannot be formatted as IP address.","Bucket names can only contain lowercase letters, numbers, and hyphens.","Bucket names must be 3 to 63 characters long.",[3,"ngValue"],"Loading...","-- Select a user --",[3,"value"],"This field is required.",["id","placement-target","name","placement-target","formControlName","placement-target",1,"form-control","custom-select"],"Loading...","-- Select a placement target --","This field is required.",["id","placement-target","name","placement-target","formControlName","placement-target","type","text","readonly","",1,"form-control"],"Versioning",["type","checkbox","id","versioning","name","versioning","formControlName","versioning",1,"custom-control-input",3,"change"],["for","versioning",1,"custom-control-label"],"Enabled","Enables versioning for the objects in the bucket.","Multi-Factor Authentication",["type","checkbox","id","mfa-delete","name","mfa-delete","formControlName","mfa-delete",1,"custom-control-input",3,"change"],["for","mfa-delete",1,"custom-control-label"],"Delete enabled","Enables MFA (multi-factor authentication) Delete, which requires additional authentication for changing the bucket versioning state.",["for","mfa-token-serial",1,"cd-col-form-label"],"Token Serial Number",["type","text","id","mfa-token-serial","name","mfa-token-serial","formControlName","mfa-token-serial",1,"form-control"],"This field is required.",["for","mfa-token-pin",1,"cd-col-form-label"],"Token PIN",["type","text","id","mfa-token-pin","name","mfa-token-pin","formControlName","mfa-token-pin",1,"form-control"],"This field is required.",["for","lock_mode",1,"cd-col-form-label"],"Mode",["formControlName","lock_mode","name","lock_mode","id","lock_mode",1,"form-control","custom-select"],["value","COMPLIANCE"],"Compliance",["value","GOVERNANCE"],"Governance",["for","lock_retention_period_days",1,"cd-col-form-label"],"Days","The number of days that you want to specify for the default retention period that will be applied to new objects placed in this bucket.",["type","number","id","lock_retention_period_days","formControlName","lock_retention_period_days","min","0",1,"form-control"],"The entered value must be a positive integer.","Retention Days must be a positive integer."]},template:function(e,t){1&e&&w.Mc(0,Re,60,41,"div",0),2&e&&w.pc("cdFormLoading",t.loading)},directives:[F.a,i.C,i.r,W.a,i.k,a.r,O.a,a.p,D.a,i.d,j.a,i.q,i.i,P.a,i.z,a.q,i.b,V.a,B.a,i.u,i.B,i.v],pipes:[a.A,L.a],styles:[""]}),e})();var ve=c("HDdC"),we=c("+fVR"),ze=c("e2NH"),Ie=c("0+/T"),xe=c("uIqm"),Me=c("vCyI"),$e=c("Fgil"),qe=c("o4+5"),Ne=c("aexS"),Te=c("JK/P"),Ee=c("EgGo"),Ce=c("S7zO"),Ae=c("a0VL"),Fe=c("iExv");function We(e,t){1&e&&(w.Sb(0,"td"),w.Wb(1,24),w.Rb())}function Oe(e,t){if(1&e&&(w.Sb(0,"td"),w.Oc(1),w.jc(2,"dimless"),w.Rb()),2&e){const e=w.ic(3);w.yb(1),w.Qc(" ",w.kc(2,1,e.selection.bucket_quota.max_size)," ")}}function De(e,t){1&e&&(w.Sb(0,"td"),w.Wb(1,25),w.Rb())}function je(e,t){if(1&e&&(w.Sb(0,"td"),w.Oc(1),w.Rb()),2&e){const e=w.ic(3);w.yb(1),w.Qc(" ",e.selection.bucket_quota.max_objects," ")}}function Pe(e,t){if(1&e&&(w.Sb(0,"div"),w.Sb(1,"legend"),w.Wb(2,20),w.Rb(),w.Sb(3,"table",1),w.Sb(4,"tbody"),w.Sb(5,"tr"),w.Sb(6,"td",2),w.Wb(7,21),w.Rb(),w.Sb(8,"td",4),w.Oc(9),w.jc(10,"booleanText"),w.Rb(),w.Rb(),w.Sb(11,"tr"),w.Sb(12,"td",5),w.Wb(13,22),w.Rb(),w.Mc(14,We,2,0,"td",0),w.Mc(15,Oe,3,3,"td",0),w.Rb(),w.Sb(16,"tr"),w.Sb(17,"td",5),w.Wb(18,23),w.Rb(),w.Mc(19,De,2,0,"td",0),w.Mc(20,je,2,1,"td",0),w.Rb(),w.Rb(),w.Rb(),w.Rb()),2&e){const e=w.ic(2);w.yb(9),w.Pc(w.kc(10,5,e.selection.bucket_quota.enabled)),w.yb(5),w.pc("ngIf",e.selection.bucket_quota.max_size<=-1),w.yb(1),w.pc("ngIf",e.selection.bucket_quota.max_size>-1),w.yb(4),w.pc("ngIf",e.selection.bucket_quota.max_objects<=-1),w.yb(1),w.pc("ngIf",e.selection.bucket_quota.max_objects>-1)}}function Ve(e,t){if(1&e&&(w.Qb(0),w.Sb(1,"tr"),w.Sb(2,"td",5),w.Wb(3,26),w.Rb(),w.Sb(4,"td"),w.Oc(5),w.Rb(),w.Rb(),w.Sb(6,"tr"),w.Sb(7,"td",5),w.Wb(8,27),w.Rb(),w.Sb(9,"td"),w.Oc(10),w.Rb(),w.Rb(),w.Pb()),2&e){const e=w.ic(2);w.yb(5),w.Pc(e.selection.lock_mode),w.yb(5),w.Pc(e.selection.lock_retention_period_days)}}function Be(e,t){if(1&e&&(w.Qb(0),w.Sb(1,"table",1),w.Sb(2,"tbody"),w.Sb(3,"tr"),w.Sb(4,"td",2),w.Wb(5,3),w.Rb(),w.Sb(6,"td",4),w.Oc(7),w.Rb(),w.Rb(),w.Sb(8,"tr"),w.Sb(9,"td",5),w.Wb(10,6),w.Rb(),w.Sb(11,"td"),w.Oc(12),w.Rb(),w.Rb(),w.Sb(13,"tr"),w.Sb(14,"td",5),w.Wb(15,7),w.Rb(),w.Sb(16,"td"),w.Oc(17),w.Rb(),w.Rb(),w.Sb(18,"tr"),w.Sb(19,"td",5),w.Wb(20,8),w.Rb(),w.Sb(21,"td"),w.Oc(22),w.Rb(),w.Rb(),w.Sb(23,"tr"),w.Sb(24,"td",5),w.Wb(25,9),w.Rb(),w.Sb(26,"td"),w.Oc(27),w.Rb(),w.Rb(),w.Sb(28,"tr"),w.Sb(29,"td",5),w.Wb(30,10),w.Rb(),w.Sb(31,"td"),w.Oc(32),w.Rb(),w.Rb(),w.Sb(33,"tr"),w.Sb(34,"td",5),w.Wb(35,11),w.Rb(),w.Sb(36,"td"),w.Oc(37),w.Rb(),w.Rb(),w.Sb(38,"tr"),w.Sb(39,"td",5),w.Wb(40,12),w.Rb(),w.Sb(41,"td"),w.Oc(42),w.Rb(),w.Rb(),w.Sb(43,"tr"),w.Sb(44,"td",5),w.Wb(45,13),w.Rb(),w.Sb(46,"td"),w.Oc(47),w.Rb(),w.Rb(),w.Sb(48,"tr"),w.Sb(49,"td",5),w.Wb(50,14),w.Rb(),w.Sb(51,"td"),w.Oc(52),w.jc(53,"cdDate"),w.Rb(),w.Rb(),w.Sb(54,"tr"),w.Sb(55,"td",5),w.Wb(56,15),w.Rb(),w.Sb(57,"td"),w.Oc(58),w.Rb(),w.Rb(),w.Sb(59,"tr"),w.Sb(60,"td",5),w.Wb(61,16),w.Rb(),w.Sb(62,"td"),w.Oc(63),w.Rb(),w.Rb(),w.Sb(64,"tr"),w.Sb(65,"td",5),w.Wb(66,17),w.Rb(),w.Sb(67,"td"),w.Oc(68),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Mc(69,Pe,21,7,"div",0),w.Sb(70,"legend"),w.Wb(71,18),w.Rb(),w.Sb(72,"table",1),w.Sb(73,"tbody"),w.Sb(74,"tr"),w.Sb(75,"td",2),w.Wb(76,19),w.Rb(),w.Sb(77,"td",4),w.Oc(78),w.jc(79,"booleanText"),w.Rb(),w.Rb(),w.Mc(80,Ve,11,2,"ng-container",0),w.Rb(),w.Rb(),w.Pb()),2&e){const e=w.ic();w.yb(7),w.Pc(e.selection.bid),w.yb(5),w.Pc(e.selection.id),w.yb(5),w.Pc(e.selection.owner),w.yb(5),w.Pc(e.selection.index_type),w.yb(5),w.Pc(e.selection.placement_rule),w.yb(5),w.Pc(e.selection.marker),w.yb(5),w.Pc(e.selection.max_marker),w.yb(5),w.Pc(e.selection.ver),w.yb(5),w.Pc(e.selection.master_ver),w.yb(5),w.Pc(w.kc(53,16,e.selection.mtime)),w.yb(6),w.Pc(e.selection.zonegroup),w.yb(5),w.Pc(e.selection.versioning),w.yb(5),w.Pc(e.selection.mfa_delete),w.yb(1),w.pc("ngIf",e.selection.bucket_quota),w.yb(9),w.Pc(w.kc(79,18,e.selection.lock_enabled)),w.yb(2),w.pc("ngIf",e.selection.lock_enabled)}}let Le=(()=>{class e{constructor(e){this.rgwBucketService=e}ngOnChanges(){this.selection&&this.rgwBucketService.get(this.selection.bid).subscribe(e=>{e.lock_retention_period_days=this.rgwBucketService.getLockDays(e),this.selection=e})}}return e.\u0275fac=function(t){return new(t||e)(w.Mb(z))},e.\u0275cmp=w.Gb({type:e,selectors:[["cd-rgw-bucket-details"]],inputs:{selection:"selection"},features:[w.wb],decls:1,vars:1,consts:function(){return[[4,"ngIf"],[1,"table","table-striped","table-bordered"],[1,"bold","w-25"],"Name",[1,"w-75"],[1,"bold"],"ID","Owner","Index type","Placement rule","Marker","Maximum marker","Version","Master version","Modification time","Zonegroup","Versioning","MFA Delete","Locking","Enabled","Bucket quota","Enabled","Maximum size","Maximum objects","Unlimited","Unlimited","Mode","Days"]},template:function(e,t){1&e&&w.Mc(0,Be,81,20,"ng-container",0),2&e&&w.pc("ngIf",t.selection)},directives:[a.r],pipes:[Ae.a,Fe.a,qe.a],styles:["table[_ngcontent-%COMP%]{table-layout:fixed}table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{word-wrap:break-word}"]}),e})();var Ue=c("GgAd");const Ge=["bucketSizeTpl"],Ke=["bucketObjectTpl"];function Qe(e,t){if(1&e&&w.Nb(0,"cd-usage-bar",8),2&e){const e=w.ic().row;w.pc("total",e.bucket_quota.max_size)("used",e.bucket_size)}}function Je(e,t){1&e&&w.Wb(0,9)}function Ze(e,t){if(1&e&&(w.Mc(0,Qe,1,2,"cd-usage-bar",6),w.Mc(1,Je,1,0,"ng-template",null,7,w.Nc)),2&e){const e=t.row,c=w.Ac(2);w.pc("ngIf",e.bucket_quota.max_size>0&&e.bucket_quota.enabled)("ngIfElse",c)}}function Xe(e,t){if(1&e&&w.Nb(0,"cd-usage-bar",12),2&e){const e=w.ic().row;w.pc("total",e.bucket_quota.max_objects)("used",e.num_objects)("isBinary",!1)}}function Ye(e,t){1&e&&w.Wb(0,13)}function He(e,t){if(1&e&&(w.Mc(0,Xe,1,3,"cd-usage-bar",10),w.Mc(1,Ye,1,0,"ng-template",null,11,w.Nc)),2&e){const e=t.row,c=w.Ac(2);w.pc("ngIf",e.bucket_quota.max_objects>0&&e.bucket_quota.enabled)("ngIfElse",c)}}let et=(()=>{class e extends we.a{constructor(e,t,c,a,i,s,b,o){super(),this.authStorageService=e,this.dimlessBinaryPipe=t,this.dimlessPipe=c,this.rgwBucketService=a,this.modalService=i,this.urlBuilder=s,this.actionLabels=b,this.ngZone=o,this.columns=[],this.buckets=[],this.selection=new Me.a,this.tableStatus=new ze.a}ngOnInit(){this.permission=this.authStorageService.getPermissions().rgw,this.columns=[{name:"Name",prop:"bid",flexGrow:2},{name:"Owner",prop:"owner",flexGrow:2.5},{name:"Used Capacity",prop:"bucket_size",flexGrow:.6,pipe:this.dimlessBinaryPipe},{name:"Capacity Limit %",prop:"size_usage",cellTemplate:this.bucketSizeTpl,flexGrow:.8},{name:"Objects",prop:"num_objects",flexGrow:.6,pipe:this.dimlessPipe},{name:"Object Limit %",prop:"object_usage",cellTemplate:this.bucketObjectTpl,flexGrow:.8}];const e=()=>this.selection.first()&&""+encodeURIComponent(this.selection.first().bid);this.tableActions=[{permission:"create",icon:M.a.add,routerLink:()=>this.urlBuilder.getCreate(),name:this.actionLabels.CREATE,canBePrimary:e=>!e.hasSelection},{permission:"update",icon:M.a.edit,routerLink:()=>this.urlBuilder.getEdit(e()),name:this.actionLabels.EDIT},{permission:"delete",icon:M.a.destroy,click:()=>this.deleteAction(),disable:()=>!this.selection.hasSelection,name:this.actionLabels.DELETE,canBePrimary:e=>e.hasMultiSelection}],this.timeConditionReached()}transformBucketData(){d.a.forEach(this.buckets,e=>{const t=e.bucket_quota.max_size,c=e.bucket_quota.max_objects;e.bucket_size=0,e.num_objects=0,d.a.isEmpty(e.usage)||(e.bucket_size=e.usage["rgw.main"].size_actual,e.num_objects=e.usage["rgw.main"].num_objects),e.size_usage=t>0?e.bucket_size/t:void 0,e.object_usage=c>0?e.num_objects/c:void 0})}timeConditionReached(){clearTimeout(this.staleTimeout),this.ngZone.runOutsideAngular(()=>{this.staleTimeout=window.setTimeout(()=>{this.ngZone.run(()=>{this.tableStatus=new ze.a("warning","The bucket list data might be stale. If needed, you can manually reload it.")})},1e4)})}getBucketList(e){this.tableStatus=new ze.a,this.timeConditionReached(),this.rgwBucketService.list().subscribe(e=>{this.buckets=e,this.transformBucketData()},()=>{e.error()})}updateSelection(e){this.selection=e}deleteAction(){this.modalService.show(Ie.a,{itemDescription:this.selection.hasSingleSelection?"bucket":"buckets",itemNames:this.selection.selected.map(e=>e.bid),submitActionObservable:()=>new ve.a(e=>{Object(f.a)(this.selection.selected.map(e=>this.rgwBucketService.delete(e.bid))).subscribe({error:t=>{e.error(t),this.table.refreshBtn()},complete:()=>{e.complete(),this.table.refreshBtn()}})})})}}return e.\u0275fac=function(t){return new(t||e)(w.Mb(Ne.a),w.Mb($e.a),w.Mb(qe.a),w.Mb(z),w.Mb(Te.a),w.Mb(Ee.a),w.Mb(n.b),w.Mb(w.A))},e.\u0275cmp=w.Gb({type:e,selectors:[["cd-rgw-bucket-list"]],viewQuery:function(e,t){var c;1&e&&(w.Jc(xe.a,!0),w.Jc(Ge,!0),w.Jc(Ke,!0)),2&e&&(w.zc(c=w.hc())&&(t.table=c.first),w.zc(c=w.hc())&&(t.bucketSizeTpl=c.first),w.zc(c=w.hc())&&(t.bucketObjectTpl=c.first))},features:[w.xb([{provide:Ee.a,useValue:new Ee.a("rgw/bucket")}]),w.vb],decls:8,vars:9,consts:function(){return[["columnMode","flex","selectionType","multiClick","identifier","bid",3,"autoReload","data","columns","hasDetails","status","setExpandedRow","updateSelection","fetchData"],["table",""],[1,"table-actions",3,"permission","selection","tableActions"],["cdTableDetail","",3,"selection"],["bucketSizeTpl",""],["bucketObjectTpl",""],[3,"total","used",4,"ngIf","ngIfElse"],["noSizeQuota",""],[3,"total","used"],"No Limit",[3,"total","used","isBinary",4,"ngIf","ngIfElse"],["noObjectQuota",""],[3,"total","used","isBinary"],"No Limit"]},template:function(e,t){1&e&&(w.Sb(0,"cd-table",0,1),w.gc("setExpandedRow",(function(e){return t.setExpandedRow(e)}))("updateSelection",(function(e){return t.updateSelection(e)}))("fetchData",(function(e){return t.getBucketList(e)})),w.Nb(2,"cd-table-actions",2),w.Nb(3,"cd-rgw-bucket-details",3),w.Rb(),w.Mc(4,Ze,3,2,"ng-template",null,4,w.Nc),w.Mc(6,He,3,2,"ng-template",null,5,w.Nc)),2&e&&(w.pc("autoReload",!1)("data",t.buckets)("columns",t.columns)("hasDetails",!0)("status",t.tableStatus),w.yb(2),w.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions),w.yb(1),w.pc("selection",t.expandedRow))},directives:[xe.a,Ce.a,Le,a.r,Ue.a],styles:[""]}),e})();var tt=c("IzEk"),ct=c("85J/"),at=c("JP8w"),it=c("FSuO"),st=c("b5OY"),bt=c("insk");function ot(e,t){if(1&e){const e=w.Tb();w.Sb(0,"cd-table-key-value",11),w.gc("fetchData",(function(){return w.Dc(e),w.ic(2).getMetaData()})),w.Rb()}if(2&e){const e=w.ic(2);w.pc("data",e.metadata)}}function nt(e,t){if(1&e&&w.Nb(0,"cd-table-performance-counter",12),2&e){const e=w.ic(2);w.pc("serviceId",e.serviceId)}}function rt(e,t){if(1&e&&w.Nb(0,"cd-grafana",15),2&e){const e=w.ic(3);w.pc("grafanaPath","rgw-instance-detail?var-rgw_servers=rgw."+e.serviceId)}}function lt(e,t){1&e&&(w.Sb(0,"li",13),w.Sb(1,"a",4),w.Wb(2,14),w.Rb(),w.Mc(3,rt,1,1,"ng-template",6),w.Rb())}function ut(e,t){if(1&e&&(w.Qb(0),w.Sb(1,"ul",1,2),w.Sb(3,"li",3),w.Sb(4,"a",4),w.Wb(5,5),w.Rb(),w.Mc(6,ot,1,1,"ng-template",6),w.Rb(),w.Sb(7,"li",7),w.Sb(8,"a",4),w.Wb(9,8),w.Rb(),w.Mc(10,nt,1,1,"ng-template",6),w.Rb(),w.Mc(11,lt,4,0,"li",9),w.Rb(),w.Nb(12,"div",10),w.Pb()),2&e){const e=w.Ac(2),t=w.ic();w.yb(11),w.pc("ngIf",t.grafanaPermission.read),w.yb(1),w.pc("ngbNavOutlet",e)}}let dt=(()=>{class e{constructor(e,t){this.rgwDaemonService=e,this.authStorageService=t,this.serviceId="",this.grafanaPermission=this.authStorageService.getPermissions().grafana}ngOnChanges(){this.selection&&(this.serviceId=this.selection.id)}getMetaData(){d.a.isEmpty(this.serviceId)||this.rgwDaemonService.get(this.serviceId).subscribe(e=>{this.metadata=e.rgw_metadata})}}return e.\u0275fac=function(t){return new(t||e)(w.Mb(k.a),w.Mb(Ne.a))},e.\u0275cmp=w.Gb({type:e,selectors:[["cd-rgw-daemon-details"]],inputs:{selection:"selection"},features:[w.wb],decls:1,vars:1,consts:function(){return[[4,"ngIf"],["ngbNav","","cdStatefulTab","rgw-daemon-details",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem","details"],["ngbNavLink",""],"Details",["ngbNavContent",""],["ngbNavItem","performance-counters"],"Performance Counters",["ngbNavItem","performance-details",4,"ngIf"],[3,"ngbNavOutlet"],[3,"data","fetchData"],["serviceType","rgw",3,"serviceId"],["ngbNavItem","performance-details"],"Performance Details",["uid","x5ARzZtmk","grafanaStyle","one",3,"grafanaPath"]]},template:function(e,t){1&e&&w.Mc(0,ut,13,2,"ng-container",0),2&e&&w.pc("ngIf",t.selection)},directives:[a.r,b.p,at.a,b.r,b.s,b.q,b.u,it.a,st.a,bt.a],styles:[""]}),e})();function ft(e,t){if(1&e){const e=w.Tb();w.Sb(0,"cd-table",8),w.gc("setExpandedRow",(function(t){return w.Dc(e),w.ic().setExpandedRow(t)}))("fetchData",(function(t){return w.Dc(e),w.ic().getDaemonList(t)})),w.Nb(1,"cd-rgw-daemon-details",9),w.Rb()}if(2&e){const e=w.ic();w.pc("data",e.daemons)("columns",e.columns)("hasDetails",!0),w.yb(1),w.pc("selection",e.expandedRow)}}function mt(e,t){1&e&&w.Nb(0,"cd-grafana",11),2&e&&w.pc("grafanaPath","rgw-overview?")}function pt(e,t){1&e&&(w.Sb(0,"li",2),w.Sb(1,"a",3),w.Wb(2,10),w.Rb(),w.Mc(3,mt,1,1,"ng-template",5),w.Rb())}function gt(e,t){1&e&&w.Nb(0,"cd-grafana",13),2&e&&w.pc("grafanaPath","radosgw-sync-overview?")}function ht(e,t){1&e&&(w.Sb(0,"li",2),w.Sb(1,"a",3),w.Wb(2,12),w.Rb(),w.Mc(3,gt,1,1,"ng-template",5),w.Rb())}let St=(()=>{class e extends we.a{constructor(e,t,c,a){super(),this.rgwDaemonService=e,this.authStorageService=t,this.cephShortVersionPipe=c,this.rgwSiteService=a,this.columns=[],this.daemons=[]}ngOnInit(){this.grafanaPermission=this.authStorageService.getPermissions().grafana,this.columns=[{name:"ID",prop:"id",flexGrow:2},{name:"Hostname",prop:"server_hostname",flexGrow:2},{name:"Zone Group",prop:"zonegroup_name",flexGrow:2},{name:"Zone",prop:"zone_name",flexGrow:2},{name:"Version",prop:"version",flexGrow:1,pipe:this.cephShortVersionPipe}],this.rgwSiteService.get("realms").subscribe(e=>this.isMultiSite=e.length>0)}getDaemonList(e){this.rgwDaemonService.daemons$.pipe(Object(tt.a)(1)).subscribe(e=>{this.daemons=e},()=>{e.error()})}}return e.\u0275fac=function(t){return new(t||e)(w.Mb(k.a),w.Mb(Ne.a),w.Mb(ct.a),w.Mb(I))},e.\u0275cmp=w.Gb({type:e,selectors:[["cd-rgw-daemon-list"]],features:[w.vb],decls:9,vars:3,consts:function(){return[["ngbNav","",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem",""],["ngbNavLink",""],"Daemons List",["ngbNavContent",""],["ngbNavItem","",4,"ngIf"],[3,"ngbNavOutlet"],["columnMode","flex",3,"data","columns","hasDetails","setExpandedRow","fetchData"],["cdTableDetail","",3,"selection"],"Overall Performance",["uid","WAkugZpiz","grafanaStyle","two",3,"grafanaPath"],"Sync Performance",["uid","rgw-sync-overview","grafanaStyle","two",3,"grafanaPath"]]},template:function(e,t){if(1&e&&(w.Sb(0,"ul",0,1),w.Sb(2,"li",2),w.Sb(3,"a",3),w.Wb(4,4),w.Rb(),w.Mc(5,ft,2,4,"ng-template",5),w.Rb(),w.Mc(6,pt,4,0,"li",6),w.Mc(7,ht,4,0,"li",6),w.Rb(),w.Nb(8,"div",7)),2&e){const e=w.Ac(1);w.yb(6),w.pc("ngIf",t.grafanaPermission.read),w.yb(1),w.pc("ngIf",t.grafanaPermission.read&&t.isMultiSite),w.yb(1),w.pc("ngbNavOutlet",e)}},directives:[b.p,b.r,b.s,b.q,a.r,b.u,xe.a,dt,bt.a],styles:[""]}),e})();var yt=c("GyhO"),_t=c("aXbf"),Rt=function(e){return e.USERS="users",e.BUCKETS="buckets",e.METADATA="metadata",e.USAGE="usage",e.ZONE="zone",e}({});let kt=(()=>{class e{static getAll(){return Object.values(e.capabilities)}}return e.capabilities=Rt,e})();var vt=c("ajRT");function wt(e,t){1&e&&w.Nb(0,"input",22),2&e&&w.pc("readonly",!0)}function zt(e,t){1&e&&(w.Sb(0,"option",17),w.Wb(1,25),w.Rb()),2&e&&w.pc("ngValue",null)}function It(e,t){if(1&e&&(w.Sb(0,"option",26),w.Oc(1),w.Rb()),2&e){const e=t.$implicit;w.pc("value",e),w.yb(1),w.Pc(e)}}function xt(e,t){if(1&e&&(w.Sb(0,"select",23),w.Mc(1,zt,2,1,"option",24),w.Mc(2,It,2,2,"option",19),w.Rb()),2&e){const e=w.ic();w.yb(1),w.pc("ngIf",null!==e.types),w.yb(1),w.pc("ngForOf",e.types)}}function Mt(e,t){1&e&&(w.Sb(0,"span",27),w.Wb(1,28),w.Rb())}function $t(e,t){if(1&e&&(w.Sb(0,"option",26),w.Oc(1),w.Rb()),2&e){const e=t.$implicit;w.pc("value",e),w.yb(1),w.Qc(" ",e," ")}}function qt(e,t){1&e&&(w.Sb(0,"span",27),w.Wb(1,29),w.Rb())}const Nt=function(e){return{required:e}},Tt=function(){return["read","write","*"]};let Et=(()=>{class e{constructor(e,t,c){this.formBuilder=e,this.activeModal=t,this.actionLabels=c,this.submitAction=new w.o,this.editing=!0,this.types=[],this.resource="capability",this.createForm()}createForm(){this.formGroup=this.formBuilder.group({type:[null,[i.A.required]],perm:[null,[i.A.required]]})}setEditing(e=!0){this.editing=e,this.action=this.editing?this.actionLabels.EDIT:this.actionLabels.ADD}setValues(e,t){this.formGroup.setValue({type:e,perm:t})}setCapabilities(e){const t=[];e.forEach(e=>{t.push(e.type)}),this.types=[],kt.getAll().forEach(e=>{-1===d.a.indexOf(t,e)&&this.types.push(e)})}onSubmit(){this.submitAction.emit(this.formGroup.value),this.activeModal.close()}}return e.\u0275fac=function(t){return new(t||e)(w.Mb(N.a),w.Mb(b.a),w.Mb(n.b))},e.\u0275cmp=w.Gb({type:e,selectors:[["cd-rgw-user-capability-modal"]],outputs:{submitAction:"submitAction"},decls:29,vars:24,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"modal-content"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","type",1,"cd-col-form-label",3,"ngClass"],"Type",[1,"cd-col-form-input"],["id","type","class","form-control","type","text","formControlName","type",3,"readonly",4,"ngIf"],["id","type","class","form-control custom-select","formControlName","type","autofocus","",4,"ngIf"],["class","invalid-feedback",4,"ngIf"],["for","perm",1,"cd-col-form-label","required"],"Permission",["id","perm","formControlName","perm",1,"form-control","custom-select"],[3,"ngValue"],"-- Select a permission --",[3,"value",4,"ngFor","ngForOf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],["id","type","type","text","formControlName","type",1,"form-control",3,"readonly"],["id","type","formControlName","type","autofocus","",1,"form-control","custom-select"],[3,"ngValue",4,"ngIf"],"-- Select a type --",[3,"value"],[1,"invalid-feedback"],"This field is required.","This field is required."]},template:function(e,t){if(1&e&&(w.Sb(0,"cd-modal",0),w.Qb(1,1),w.Wb(2,2),w.jc(3,"titlecase"),w.jc(4,"upperFirst"),w.Pb(),w.Qb(5,3),w.Sb(6,"form",4,5),w.Sb(8,"div",6),w.Sb(9,"div",7),w.Sb(10,"label",8),w.Wb(11,9),w.Rb(),w.Sb(12,"div",10),w.Mc(13,wt,1,1,"input",11),w.Mc(14,xt,3,2,"select",12),w.Mc(15,Mt,2,0,"span",13),w.Rb(),w.Rb(),w.Sb(16,"div",7),w.Sb(17,"label",14),w.Wb(18,15),w.Rb(),w.Sb(19,"div",10),w.Sb(20,"select",16),w.Sb(21,"option",17),w.Wb(22,18),w.Rb(),w.Mc(23,$t,2,2,"option",19),w.Rb(),w.Mc(24,qt,2,0,"span",13),w.Rb(),w.Rb(),w.Rb(),w.Sb(25,"div",20),w.Sb(26,"cd-form-button-panel",21),w.gc("submitActionEvent",(function(){return t.onSubmit()})),w.jc(27,"titlecase"),w.jc(28,"upperFirst"),w.Rb(),w.Rb(),w.Rb(),w.Pb(),w.Rb()),2&e){const e=w.Ac(7);w.pc("modalRef",t.activeModal),w.yb(4),w.ac(w.kc(3,13,t.action))(w.kc(4,15,t.resource)),w.Xb(2),w.yb(2),w.pc("formGroup",t.formGroup),w.yb(4),w.pc("ngClass",w.uc(21,Nt,!t.editing)),w.yb(3),w.pc("ngIf",t.editing),w.yb(1),w.pc("ngIf",!t.editing),w.yb(1),w.pc("ngIf",t.formGroup.showError("type",e,"required")),w.yb(6),w.pc("ngValue",null),w.yb(2),w.pc("ngForOf",w.tc(23,Tt)),w.yb(1),w.pc("ngIf",t.formGroup.showError("perm",e,"required")),w.yb(2),w.pc("form",t.formGroup)("submitText",w.kc(27,17,t.action)+" "+w.kc(28,19,t.resource))}},directives:[vt.a,i.C,i.r,W.a,i.k,O.a,a.p,a.r,D.a,i.z,j.a,i.q,i.i,i.u,i.B,a.q,B.a,i.d,P.a],pipes:[a.A,L.a],styles:[""]}),e})();var Ct=c("D4zM"),At=c("cEzo");function Ft(e,t){1&e&&w.Nb(0,"input",17),2&e&&w.pc("readonly",!0)}function Wt(e,t){1&e&&(w.Sb(0,"option",21),w.Wb(1,22),w.Rb()),2&e&&w.pc("ngValue",null)}function Ot(e,t){if(1&e&&(w.Sb(0,"option",23),w.Oc(1),w.Rb()),2&e){const e=t.$implicit;w.pc("value",e),w.yb(1),w.Pc(e)}}function Dt(e,t){if(1&e&&(w.Sb(0,"select",18),w.Mc(1,Wt,2,1,"option",19),w.Mc(2,Ot,2,2,"option",20),w.Rb()),2&e){const e=w.ic();w.yb(1),w.pc("ngIf",null!==e.userCandidates),w.yb(1),w.pc("ngForOf",e.userCandidates)}}function jt(e,t){1&e&&(w.Sb(0,"span",24),w.Wb(1,25),w.Rb())}function Pt(e,t){1&e&&(w.Sb(0,"div",7),w.Sb(1,"div",26),w.Sb(2,"div",27),w.Nb(3,"input",28),w.Sb(4,"label",29),w.Wb(5,30),w.Rb(),w.Rb(),w.Rb(),w.Rb())}function Vt(e,t){1&e&&(w.Sb(0,"span",24),w.Wb(1,38),w.Rb())}const Bt=function(e){return{required:e}};function Lt(e,t){if(1&e&&(w.Sb(0,"div",7),w.Sb(1,"label",31),w.Wb(2,32),w.Rb(),w.Sb(3,"div",10),w.Sb(4,"div",33),w.Nb(5,"input",34),w.Sb(6,"span",35),w.Nb(7,"button",36),w.Nb(8,"cd-copy-2-clipboard-button",37),w.Rb(),w.Rb(),w.Mc(9,Vt,2,0,"span",13),w.Rb(),w.Rb()),2&e){const e=w.ic(),t=w.Ac(7);w.yb(1),w.pc("ngClass",w.uc(3,Bt,!e.viewing)),w.yb(4),w.pc("readonly",e.viewing),w.yb(4),w.pc("ngIf",e.formGroup.showError("access_key",t,"required"))}}function Ut(e,t){1&e&&(w.Sb(0,"span",24),w.Wb(1,44),w.Rb())}function Gt(e,t){if(1&e&&(w.Sb(0,"div",7),w.Sb(1,"label",39),w.Wb(2,40),w.Rb(),w.Sb(3,"div",10),w.Sb(4,"div",33),w.Nb(5,"input",41),w.Sb(6,"span",35),w.Nb(7,"button",42),w.Nb(8,"cd-copy-2-clipboard-button",43),w.Rb(),w.Rb(),w.Mc(9,Ut,2,0,"span",13),w.Rb(),w.Rb()),2&e){const e=w.ic(),t=w.Ac(7);w.yb(1),w.pc("ngClass",w.uc(3,Bt,!e.viewing)),w.yb(4),w.pc("readonly",e.viewing),w.yb(4),w.pc("ngIf",e.formGroup.showError("secret_key",t,"required"))}}let Kt=(()=>{class e{constructor(e,t,c){this.formBuilder=e,this.activeModal=t,this.actionLabels=c,this.submitAction=new w.o,this.viewing=!0,this.userCandidates=[],this.resource="S3 Key",this.createForm()}createForm(){this.formGroup=this.formBuilder.group({user:[null,[i.A.required]],generate_key:[!0],access_key:[null,[T.a.requiredIf({generate_key:!1})]],secret_key:[null,[T.a.requiredIf({generate_key:!1})]]})}setViewing(e=!0){this.viewing=e,this.action=this.viewing?this.actionLabels.SHOW:this.actionLabels.CREATE}setValues(e,t,c){this.formGroup.setValue({user:e,generate_key:d.a.isEmpty(t),access_key:t,secret_key:c})}setUserCandidates(e){this.userCandidates=e}onSubmit(){this.submitAction.emit(this.formGroup.value),this.activeModal.close()}}return e.\u0275fac=function(t){return new(t||e)(w.Mb(N.a),w.Mb(b.a),w.Mb(n.b))},e.\u0275cmp=w.Gb({type:e,selectors:[["cd-rgw-user-s3-key-modal"]],outputs:{submitAction:"submitAction"},decls:23,vars:24,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"modal-content"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","user",1,"cd-col-form-label",3,"ngClass"],"Username",[1,"cd-col-form-input"],["id","user","class","form-control","type","text","formControlName","user",3,"readonly",4,"ngIf"],["id","user","class","form-control custom-select","formControlName","user","autofocus","",4,"ngIf"],["class","invalid-feedback",4,"ngIf"],["class","form-group row",4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","showSubmit","submitActionEvent"],["id","user","type","text","formControlName","user",1,"form-control",3,"readonly"],["id","user","formControlName","user","autofocus","",1,"form-control","custom-select"],[3,"ngValue",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"ngValue"],"-- Select a username --",[3,"value"],[1,"invalid-feedback"],"This field is required.",[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["id","generate_key","type","checkbox","formControlName","generate_key",1,"custom-control-input"],["for","generate_key",1,"custom-control-label"],"Auto-generate key",["for","access_key",1,"cd-col-form-label",3,"ngClass"],"Access key",[1,"input-group"],["id","access_key","type","password","formControlName","access_key",1,"form-control",3,"readonly"],[1,"input-group-append"],["type","button","cdPasswordButton","access_key",1,"btn","btn-light"],["source","access_key"],"This field is required.",["for","secret_key",1,"cd-col-form-label",3,"ngClass"],"Secret key",["id","secret_key","type","password","formControlName","secret_key",1,"form-control",3,"readonly"],["type","button","cdPasswordButton","secret_key",1,"btn","btn-light"],["source","secret_key"],"This field is required."]},template:function(e,t){if(1&e&&(w.Sb(0,"cd-modal",0),w.Qb(1,1),w.Wb(2,2),w.jc(3,"titlecase"),w.jc(4,"upperFirst"),w.Pb(),w.Qb(5,3),w.Sb(6,"form",4,5),w.Sb(8,"div",6),w.Sb(9,"div",7),w.Sb(10,"label",8),w.Wb(11,9),w.Rb(),w.Sb(12,"div",10),w.Mc(13,Ft,1,1,"input",11),w.Mc(14,Dt,3,2,"select",12),w.Mc(15,jt,2,0,"span",13),w.Rb(),w.Rb(),w.Mc(16,Pt,6,0,"div",14),w.Mc(17,Lt,10,5,"div",14),w.Mc(18,Gt,10,5,"div",14),w.Rb(),w.Sb(19,"div",15),w.Sb(20,"cd-form-button-panel",16),w.gc("submitActionEvent",(function(){return t.onSubmit()})),w.jc(21,"titlecase"),w.jc(22,"upperFirst"),w.Rb(),w.Rb(),w.Rb(),w.Pb(),w.Rb()),2&e){const e=w.Ac(7);w.pc("modalRef",t.activeModal),w.yb(4),w.ac(w.kc(3,14,t.action))(w.kc(4,16,t.resource)),w.Xb(2),w.yb(2),w.pc("formGroup",t.formGroup),w.yb(4),w.pc("ngClass",w.uc(22,Bt,!t.viewing)),w.yb(3),w.pc("ngIf",t.viewing),w.yb(1),w.pc("ngIf",!t.viewing),w.yb(1),w.pc("ngIf",t.formGroup.showError("user",e,"required")),w.yb(1),w.pc("ngIf",!t.viewing),w.yb(1),w.pc("ngIf",!t.formGroup.getValue("generate_key")),w.yb(1),w.pc("ngIf",!t.formGroup.getValue("generate_key")),w.yb(2),w.pc("form",t.formGroup)("submitText",w.kc(21,18,t.action)+" "+w.kc(22,20,t.resource))("showSubmit",!t.viewing)}},directives:[vt.a,i.C,i.r,W.a,i.k,O.a,a.p,a.r,B.a,D.a,i.d,j.a,i.q,i.i,i.z,P.a,a.q,i.u,i.B,i.b,Ct.a,At.a],pipes:[a.A,L.a],styles:[""]}),e})();class Qt{}function Jt(e,t){1&e&&(w.Sb(0,"span",29),w.Wb(1,30),w.Rb())}function Zt(e,t){1&e&&(w.Sb(0,"span",29),w.Wb(1,31),w.Rb())}function Xt(e,t){if(1&e&&(w.Sb(0,"option",32),w.Oc(1),w.Rb()),2&e){const e=t.$implicit;w.pc("value",e),w.yb(1),w.Qc(" ",e," ")}}function Yt(e,t){1&e&&(w.Sb(0,"span",29),w.Wb(1,33),w.Rb())}function Ht(e,t){1&e&&(w.Sb(0,"span",29),w.Wb(1,48),w.Rb())}function ec(e,t){if(1&e&&(w.Sb(0,"div",7),w.Sb(1,"label",41),w.Wb(2,42),w.Rb(),w.Sb(3,"div",10),w.Sb(4,"div",43),w.Nb(5,"input",44),w.Sb(6,"span",45),w.Nb(7,"button",46),w.Nb(8,"cd-copy-2-clipboard-button",47),w.Rb(),w.Rb(),w.Mc(9,Ht,2,0,"span",15),w.Rb(),w.Rb()),2&e){const e=w.ic(2),t=w.Ac(7);w.yb(9),w.pc("ngIf",e.formGroup.showError("secret_key",t,"required"))}}function tc(e,t){if(1&e&&(w.Sb(0,"fieldset"),w.Sb(1,"legend"),w.Wb(2,34),w.Rb(),w.Sb(3,"div",7),w.Sb(4,"div",35),w.Sb(5,"div",36),w.Nb(6,"input",37),w.Sb(7,"label",38),w.Wb(8,39),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Mc(9,ec,10,1,"div",40),w.Rb()),2&e){const e=w.ic();w.yb(9),w.pc("ngIf",!e.editing&&!e.formGroup.getValue("generate_secret"))}}const cc=function(e){return{required:e}},ac=function(){return["read","write"]};let ic=(()=>{class e{constructor(e,t,c){this.formBuilder=e,this.bsModalRef=t,this.actionLabels=c,this.submitAction=new w.o,this.editing=!0,this.subusers=[],this.resource="Subuser",this.createForm()}createForm(){this.formGroup=this.formBuilder.group({uid:[null],subuid:[null,[i.A.required,this.subuserValidator()]],perm:[null,[i.A.required]],generate_secret:[!0],secret_key:[null,[T.a.requiredIf({generate_secret:!1})]]})}subuserValidator(){const e=this;return t=>e.editing||Object(T.b)(t.value)?null:e.subusers.some(c=>d.a.isEqual(e.getSubuserName(c.id),t.value))?{subuserIdExists:!0}:null}getSubuserName(e){if(d.a.isEmpty(e))return e;const t=e.match(/([^:]+)(:(.+))?/);return d.a.isUndefined(t[3])?t[1]:t[3]}setEditing(e=!0){this.editing=e,this.action=this.editing?this.actionLabels.EDIT:this.actionLabels.CREATE}setValues(e,t="",c=""){this.formGroup.setValue({uid:e,subuid:this.getSubuserName(t),perm:c,generate_secret:!0,secret_key:null})}setSubusers(e){this.subusers=e}onSubmit(){const e=this.formGroup.value,t=new Qt;t.id=`${e.uid}:${e.subuid}`,t.permissions=e.perm,t.generate_secret=e.generate_secret,t.secret_key=e.secret_key,this.submitAction.emit(t),this.bsModalRef.close()}}return e.\u0275fac=function(t){return new(t||e)(w.Mb(N.a),w.Mb(b.a),w.Mb(n.b))},e.\u0275cmp=w.Gb({type:e,selectors:[["cd-rgw-user-subuser-modal"]],outputs:{submitAction:"submitAction"},decls:39,vars:26,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"modal-content"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","uid",1,"cd-col-form-label"],"Username",[1,"cd-col-form-input"],["id","uid","type","text","formControlName","uid",1,"form-control",3,"readonly"],["for","subuid",1,"cd-col-form-label",3,"ngClass"],"Subuser",["id","subuid","type","text","formControlName","subuid","autofocus","",1,"form-control",3,"readonly"],["class","invalid-feedback",4,"ngIf"],["for","perm",1,"cd-col-form-label","required"],"Permission",["id","perm","formControlName","perm",1,"form-control","custom-select"],[3,"ngValue"],"-- Select a permission --",[3,"value",4,"ngFor","ngForOf"],["value","read-write"],"read, write",["value","full-control"],"full",[4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required.","The chosen subuser ID is already in use.",[3,"value"],"This field is required.","Swift key",[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["id","generate_secret","type","checkbox","formControlName","generate_secret",1,"custom-control-input"],["for","generate_secret",1,"custom-control-label"],"Auto-generate secret",["class","form-group row",4,"ngIf"],["for","secret_key",1,"cd-col-form-label","required"],"Secret key",[1,"input-group"],["id","secret_key","type","password","formControlName","secret_key",1,"form-control"],[1,"input-group-append"],["type","button","cdPasswordButton","secret_key",1,"btn","btn-light"],["source","secret_key"],"This field is required."]},template:function(e,t){if(1&e&&(w.Sb(0,"cd-modal",0),w.Qb(1,1),w.Wb(2,2),w.jc(3,"titlecase"),w.jc(4,"upperFirst"),w.Pb(),w.Qb(5,3),w.Sb(6,"form",4,5),w.Sb(8,"div",6),w.Sb(9,"div",7),w.Sb(10,"label",8),w.Wb(11,9),w.Rb(),w.Sb(12,"div",10),w.Nb(13,"input",11),w.Rb(),w.Rb(),w.Sb(14,"div",7),w.Sb(15,"label",12),w.Wb(16,13),w.Rb(),w.Sb(17,"div",10),w.Nb(18,"input",14),w.Mc(19,Jt,2,0,"span",15),w.Mc(20,Zt,2,0,"span",15),w.Rb(),w.Rb(),w.Sb(21,"div",7),w.Sb(22,"label",16),w.Wb(23,17),w.Rb(),w.Sb(24,"div",10),w.Sb(25,"select",18),w.Sb(26,"option",19),w.Wb(27,20),w.Rb(),w.Mc(28,Xt,2,2,"option",21),w.Sb(29,"option",22),w.Wb(30,23),w.Rb(),w.Sb(31,"option",24),w.Wb(32,25),w.Rb(),w.Rb(),w.Mc(33,Yt,2,0,"span",15),w.Rb(),w.Rb(),w.Mc(34,tc,10,1,"fieldset",26),w.Rb(),w.Sb(35,"div",27),w.Sb(36,"cd-form-button-panel",28),w.gc("submitActionEvent",(function(){return t.onSubmit()})),w.jc(37,"titlecase"),w.jc(38,"upperFirst"),w.Rb(),w.Rb(),w.Rb(),w.Pb(),w.Rb()),2&e){const e=w.Ac(7);w.pc("modalRef",t.bsModalRef),w.yb(4),w.ac(w.kc(3,15,t.action))(w.kc(4,17,t.resource)),w.Xb(2),w.yb(2),w.pc("formGroup",t.formGroup),w.yb(7),w.pc("readonly",!0),w.yb(2),w.pc("ngClass",w.uc(23,cc,!t.editing)),w.yb(3),w.pc("readonly",t.editing),w.yb(1),w.pc("ngIf",t.formGroup.showError("subuid",e,"required")),w.yb(1),w.pc("ngIf",t.formGroup.showError("subuid",e,"subuserIdExists")),w.yb(6),w.pc("ngValue",null),w.yb(2),w.pc("ngForOf",w.tc(25,ac)),w.yb(5),w.pc("ngIf",t.formGroup.showError("perm",e,"required")),w.yb(1),w.pc("ngIf",!t.editing),w.yb(2),w.pc("form",t.formGroup)("submitText",w.kc(37,19,t.action)+" "+w.kc(38,21,t.resource))}},directives:[vt.a,i.C,i.r,W.a,i.k,O.a,D.a,i.d,j.a,i.q,i.i,a.p,P.a,a.r,i.z,i.u,i.B,a.q,B.a,i.b,Ct.a,At.a],pipes:[a.A,L.a],styles:[""]}),e})();var sc=c("Z21x");let bc=(()=>{class e{constructor(e,t){this.activeModal=e,this.actionLabels=t,this.resource="Swift Key",this.action=this.actionLabels.SHOW}setValues(e,t){this.user=e,this.secret_key=t}}return e.\u0275fac=function(t){return new(t||e)(w.Mb(b.a),w.Mb(n.b))},e.\u0275cmp=w.Gb({type:e,selectors:[["cd-rgw-user-swift-key-modal"]],decls:24,vars:11,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + " ",[1,"modal-content"],[1,"modal-body"],["novalidate",""],[1,"form-group","row"],["for","user",1,"cd-col-form-label"],"Username",[1,"cd-col-form-input"],["id","user","name","user","type","text",1,"form-control",3,"readonly","ngModel","ngModelChange"],["for","secret_key",1,"cd-col-form-label"],"Secret key",[1,"input-group"],["id","secret_key","name","secret_key","type","password",1,"form-control",3,"ngModel","readonly","ngModelChange"],[1,"input-group-append"],["type","button","cdPasswordButton","secret_key",1,"btn","btn-light"],["source","secret_key"],[1,"modal-footer"],[3,"backAction"]]},template:function(e,t){1&e&&(w.Sb(0,"cd-modal",0),w.Qb(1,1),w.Wb(2,2),w.jc(3,"titlecase"),w.jc(4,"upperFirst"),w.Pb(),w.Qb(5,3),w.Sb(6,"div",4),w.Sb(7,"form",5),w.Sb(8,"div",6),w.Sb(9,"label",7),w.Wb(10,8),w.Rb(),w.Sb(11,"div",9),w.Sb(12,"input",10),w.gc("ngModelChange",(function(e){return t.user=e})),w.Rb(),w.Rb(),w.Rb(),w.Sb(13,"div",6),w.Sb(14,"label",11),w.Wb(15,12),w.Rb(),w.Sb(16,"div",9),w.Sb(17,"div",13),w.Sb(18,"input",14),w.gc("ngModelChange",(function(e){return t.secret_key=e})),w.Rb(),w.Sb(19,"span",15),w.Nb(20,"button",16),w.Nb(21,"cd-copy-2-clipboard-button",17),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Sb(22,"div",18),w.Sb(23,"cd-back-button",19),w.gc("backAction",(function(){return t.activeModal.close()})),w.Rb(),w.Rb(),w.Pb(),w.Rb()),2&e&&(w.pc("modalRef",t.activeModal),w.yb(4),w.ac(w.kc(3,7,t.action))(w.kc(4,9,t.resource)),w.Xb(2),w.yb(8),w.pc("readonly",!0)("ngModel",t.user),w.yb(6),w.pc("ngModel",t.secret_key)("readonly",!0))},directives:[vt.a,i.C,i.r,i.s,O.a,D.a,i.d,j.a,i.q,i.t,Ct.a,At.a,sc.a],pipes:[a.A,L.a],styles:[""]}),e})();var oc=c("EmSq");function nc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,50),w.Rb())}function rc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,51),w.Rb())}function lc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,52),w.Rb())}function uc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,56),w.Rb())}function dc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,57),w.Rb())}function fc(e,t){if(1&e&&(w.Sb(0,"div",8),w.Sb(1,"label",53),w.Wb(2,54),w.Rb(),w.Sb(3,"div",11),w.Nb(4,"input",55),w.Mc(5,uc,2,0,"span",13),w.Mc(6,dc,2,0,"span",13),w.Rb(),w.Rb()),2&e){w.ic();const e=w.Ac(2),t=w.ic();w.yb(4),w.pc("readonly",t.editing),w.yb(1),w.pc("ngIf",t.userForm.showError("tenant",e,"pattern")),w.yb(1),w.pc("ngIf",t.userForm.showError("tenant",e,"notUnique"))}}function mc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,58),w.Rb())}function pc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,59),w.Rb())}function gc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,60),w.Rb())}function hc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,63),w.Rb())}function Sc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,64),w.Rb())}function yc(e,t){if(1&e&&(w.Sb(0,"div",8),w.Nb(1,"label",61),w.Sb(2,"div",11),w.Nb(3,"input",62),w.Mc(4,hc,2,0,"span",13),w.Mc(5,Sc,2,0,"span",13),w.Rb(),w.Rb()),2&e){w.ic();const e=w.Ac(2),t=w.ic();w.yb(4),w.pc("ngIf",t.userForm.showError("max_buckets",e,"required")),w.yb(1),w.pc("ngIf",t.userForm.showError("max_buckets",e,"min"))}}function _c(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,76),w.Rb())}function Rc(e,t){if(1&e&&(w.Sb(0,"div",8),w.Sb(1,"label",69),w.Wb(2,70),w.Rb(),w.Sb(3,"div",11),w.Sb(4,"div",71),w.Nb(5,"input",72),w.Sb(6,"span",73),w.Nb(7,"button",74),w.Nb(8,"cd-copy-2-clipboard-button",75),w.Rb(),w.Rb(),w.Mc(9,_c,2,0,"span",13),w.Rb(),w.Rb()),2&e){w.ic(2);const e=w.Ac(2),t=w.ic();w.yb(9),w.pc("ngIf",t.userForm.showError("access_key",e,"required"))}}function kc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,82),w.Rb())}function vc(e,t){if(1&e&&(w.Sb(0,"div",8),w.Sb(1,"label",77),w.Wb(2,78),w.Rb(),w.Sb(3,"div",11),w.Sb(4,"div",71),w.Nb(5,"input",79),w.Sb(6,"span",73),w.Nb(7,"button",80),w.Nb(8,"cd-copy-2-clipboard-button",81),w.Rb(),w.Rb(),w.Mc(9,kc,2,0,"span",13),w.Rb(),w.Rb()),2&e){w.ic(2);const e=w.Ac(2),t=w.ic();w.yb(9),w.pc("ngIf",t.userForm.showError("secret_key",e,"required"))}}function wc(e,t){if(1&e&&(w.Sb(0,"fieldset"),w.Sb(1,"legend"),w.Wb(2,65),w.Rb(),w.Sb(3,"div",8),w.Sb(4,"div",14),w.Sb(5,"div",15),w.Nb(6,"input",66),w.Sb(7,"label",67),w.Wb(8,68),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Mc(9,Rc,10,1,"div",19),w.Mc(10,vc,10,1,"div",19),w.Rb()),2&e){const e=w.ic(2);w.yb(9),w.pc("ngIf",!e.editing&&!e.userForm.getValue("generate_key")),w.yb(1),w.pc("ngIf",!e.editing&&!e.userForm.getValue("generate_key"))}}function zc(e,t){1&e&&(w.Sb(0,"span",92),w.Sb(1,"span",93),w.Wb(2,94),w.Rb(),w.Rb())}const Ic=function(e){return[e]};function xc(e,t){if(1&e){const e=w.Tb();w.Sb(0,"span"),w.Sb(1,"div",71),w.Sb(2,"div",95),w.Sb(3,"span",96),w.Nb(4,"i"),w.Rb(),w.Rb(),w.Nb(5,"input",97),w.Sb(6,"div",98),w.Sb(7,"span",96),w.Nb(8,"i"),w.Rb(),w.Rb(),w.Nb(9,"input",97),w.Sb(10,"span",73),w.Sb(11,"button",99),w.Yb(12,100),w.gc("click",(function(){w.Dc(e);const c=t.index;return w.ic(3).showSubuserModal(c)})),w.Nb(13,"i",89),w.Rb(),w.Sb(14,"button",101),w.Yb(15,102),w.gc("click",(function(){w.Dc(e);const c=t.index;return w.ic(3).deleteSubuser(c)})),w.Nb(16,"i",89),w.Rb(),w.Rb(),w.Rb(),w.Nb(17,"span",93),w.Rb()}if(2&e){const e=t.$implicit,c=w.ic(3);w.yb(4),w.Ab(c.icons.user),w.yb(1),w.qc("value",e.id),w.yb(3),w.Ab(c.icons.share),w.yb(1),w.qc("value","full-control"===e.permissions?"full":e.permissions),w.yb(4),w.pc("ngClass",w.uc(10,Ic,c.icons.edit)),w.yb(3),w.pc("ngClass",w.uc(12,Ic,c.icons.destroy))}}function Mc(e,t){if(1&e){const e=w.Tb();w.Sb(0,"fieldset"),w.Sb(1,"legend"),w.Wb(2,83),w.Rb(),w.Sb(3,"div",84),w.Sb(4,"div",14),w.Mc(5,zc,3,0,"span",85),w.Mc(6,xc,18,14,"span",86),w.Sb(7,"div",84),w.Sb(8,"div",87),w.Sb(9,"button",88),w.gc("click",(function(){return w.Dc(e),w.ic(2).showSubuserModal()})),w.Nb(10,"i",89),w.Qb(11),w.Wb(12,90),w.jc(13,"titlecase"),w.jc(14,"upperFirst"),w.Pb(),w.Rb(),w.Rb(),w.Rb(),w.Nb(15,"span",91),w.Rb(),w.Rb(),w.Rb()}if(2&e){const e=w.ic(2);w.yb(5),w.pc("ngIf",0===e.subusers.length),w.yb(1),w.pc("ngForOf",e.subusers),w.yb(4),w.pc("ngClass",w.uc(9,Ic,e.icons.add)),w.yb(4),w.ac(w.kc(13,5,e.actionLabels.CREATE))(w.kc(14,7,e.subuserLabel)),w.Xb(12)}}function $c(e,t){1&e&&(w.Sb(0,"span",92),w.Sb(1,"span",93),w.Wb(2,108),w.Rb(),w.Rb())}function qc(e,t){if(1&e){const e=w.Tb();w.Sb(0,"span"),w.Sb(1,"div",71),w.Sb(2,"div",95),w.Sb(3,"div",96),w.Nb(4,"i"),w.Rb(),w.Rb(),w.Nb(5,"input",97),w.Sb(6,"span",73),w.Sb(7,"button",109),w.Yb(8,110),w.gc("click",(function(){w.Dc(e);const c=t.index;return w.ic(3).showS3KeyModal(c)})),w.Nb(9,"i",89),w.Rb(),w.Sb(10,"button",111),w.Yb(11,112),w.gc("click",(function(){w.Dc(e);const c=t.index;return w.ic(3).deleteS3Key(c)})),w.Nb(12,"i",89),w.Rb(),w.Rb(),w.Rb(),w.Nb(13,"span",93),w.Rb()}if(2&e){const e=t.$implicit,c=w.ic(3);w.yb(4),w.Ab(c.icons.key),w.yb(1),w.qc("value",e.user),w.yb(4),w.pc("ngClass",w.uc(6,Ic,c.icons.show)),w.yb(3),w.pc("ngClass",w.uc(8,Ic,c.icons.destroy))}}function Nc(e,t){1&e&&(w.Sb(0,"span",92),w.Sb(1,"span",93),w.Wb(2,113),w.Rb(),w.Rb())}function Tc(e,t){if(1&e){const e=w.Tb();w.Sb(0,"span"),w.Sb(1,"div",71),w.Sb(2,"div",95),w.Sb(3,"span",96),w.Nb(4,"i"),w.Rb(),w.Rb(),w.Nb(5,"input",97),w.Sb(6,"span",73),w.Sb(7,"button",114),w.Yb(8,115),w.gc("click",(function(){w.Dc(e);const c=t.index;return w.ic(3).showSwiftKeyModal(c)})),w.Nb(9,"i",89),w.Rb(),w.Rb(),w.Rb(),w.Nb(10,"span",93),w.Rb()}if(2&e){const e=t.$implicit,c=w.ic(3);w.yb(4),w.Ab(c.icons.key),w.yb(1),w.qc("value",e.user),w.yb(4),w.pc("ngClass",w.uc(5,Ic,c.icons.show))}}function Ec(e,t){if(1&e){const e=w.Tb();w.Sb(0,"fieldset"),w.Sb(1,"legend"),w.Wb(2,103),w.Rb(),w.Sb(3,"div",8),w.Sb(4,"label",61),w.Wb(5,104),w.Rb(),w.Sb(6,"div",11),w.Mc(7,$c,3,0,"span",85),w.Mc(8,qc,14,10,"span",86),w.Sb(9,"div",84),w.Sb(10,"div",87),w.Sb(11,"button",105),w.gc("click",(function(){return w.Dc(e),w.ic(2).showS3KeyModal()})),w.Nb(12,"i",89),w.Qb(13),w.Wb(14,106),w.jc(15,"titlecase"),w.jc(16,"upperFirst"),w.Pb(),w.Rb(),w.Rb(),w.Rb(),w.Nb(17,"span",91),w.Rb(),w.Nb(18,"hr"),w.Rb(),w.Sb(19,"div",8),w.Sb(20,"label",61),w.Wb(21,107),w.Rb(),w.Sb(22,"div",11),w.Mc(23,Nc,3,0,"span",85),w.Mc(24,Tc,11,7,"span",86),w.Rb(),w.Rb(),w.Rb()}if(2&e){const e=w.ic(2);w.yb(7),w.pc("ngIf",0===e.s3Keys.length),w.yb(1),w.pc("ngForOf",e.s3Keys),w.yb(4),w.pc("ngClass",w.uc(11,Ic,e.icons.add)),w.yb(4),w.ac(w.kc(15,7,e.actionLabels.CREATE))(w.kc(16,9,e.s3keyLabel)),w.Xb(14),w.yb(7),w.pc("ngIf",0===e.swiftKeys.length),w.yb(1),w.pc("ngForOf",e.swiftKeys)}}function Cc(e,t){1&e&&(w.Sb(0,"span",92),w.Sb(1,"span",93),w.Wb(2,120),w.Rb(),w.Rb())}function Ac(e,t){if(1&e){const e=w.Tb();w.Sb(0,"span"),w.Sb(1,"div",71),w.Sb(2,"span",95),w.Sb(3,"div",96),w.Nb(4,"i"),w.Rb(),w.Rb(),w.Nb(5,"input",97),w.Sb(6,"span",73),w.Sb(7,"button",121),w.Yb(8,122),w.gc("click",(function(){w.Dc(e);const c=t.index;return w.ic(3).showCapabilityModal(c)})),w.Nb(9,"i",89),w.Rb(),w.Sb(10,"button",123),w.Yb(11,124),w.gc("click",(function(){w.Dc(e);const c=t.index;return w.ic(3).deleteCapability(c)})),w.Nb(12,"i",89),w.Rb(),w.Rb(),w.Rb(),w.Nb(13,"span",93),w.Rb()}if(2&e){const e=t.$implicit,c=w.ic(3);w.yb(4),w.Ab(c.icons.share),w.yb(1),w.sc("value","",e.type,":",e.perm,""),w.yb(4),w.pc("ngClass",w.uc(7,Ic,c.icons.edit)),w.yb(3),w.pc("ngClass",w.uc(9,Ic,c.icons.destroy))}}function Fc(e,t){if(1&e){const e=w.Tb();w.Sb(0,"fieldset"),w.Sb(1,"legend"),w.Wb(2,116),w.Rb(),w.Sb(3,"div",8),w.Sb(4,"div",14),w.Mc(5,Cc,3,0,"span",85),w.Mc(6,Ac,14,11,"span",86),w.Sb(7,"div",84),w.Sb(8,"div",87),w.Sb(9,"button",117),w.Yb(10,118),w.gc("click",(function(){return w.Dc(e),w.ic(2).showCapabilityModal()})),w.jc(11,"pipeFunction"),w.jc(12,"pipeFunction"),w.Nb(13,"i",89),w.Qb(14),w.Wb(15,119),w.jc(16,"titlecase"),w.jc(17,"upperFirst"),w.Pb(),w.Rb(),w.Rb(),w.Rb(),w.Nb(18,"span",91),w.Rb(),w.Rb(),w.Rb()}if(2&e){const e=w.ic(2);w.yb(5),w.pc("ngIf",0===e.capabilities.length),w.yb(1),w.pc("ngForOf",e.capabilities),w.yb(3),w.pc("disabled",w.lc(11,7,e.capabilities,e.hasAllCapabilities))("disableTooltip",!w.lc(12,10,e.capabilities,e.hasAllCapabilities)),w.yb(4),w.pc("ngClass",w.uc(17,Ic,e.icons.add)),w.yb(4),w.ac(w.kc(16,13,e.actionLabels.ADD))(w.kc(17,15,e.capabilityLabel)),w.Xb(15)}}function Wc(e,t){1&e&&(w.Sb(0,"div",8),w.Sb(1,"div",14),w.Sb(2,"div",15),w.Nb(3,"input",125),w.Sb(4,"label",126),w.Wb(5,127),w.Rb(),w.Rb(),w.Rb(),w.Rb())}function Oc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,131),w.Rb())}function Dc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,132),w.Rb())}function jc(e,t){if(1&e&&(w.Sb(0,"div",8),w.Sb(1,"label",128),w.Wb(2,129),w.Rb(),w.Sb(3,"div",11),w.Nb(4,"input",130),w.Mc(5,Oc,2,0,"span",13),w.Mc(6,Dc,2,0,"span",13),w.Rb(),w.Rb()),2&e){w.ic();const e=w.Ac(2),t=w.ic();w.yb(5),w.pc("ngIf",t.userForm.showError("user_quota_max_size",e,"required")),w.yb(1),w.pc("ngIf",t.userForm.showError("user_quota_max_size",e,"quotaMaxSize"))}}function Pc(e,t){1&e&&(w.Sb(0,"div",8),w.Sb(1,"div",14),w.Sb(2,"div",15),w.Nb(3,"input",133),w.Sb(4,"label",134),w.Wb(5,135),w.Rb(),w.Rb(),w.Rb(),w.Rb())}function Vc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,139),w.Rb())}function Bc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,140),w.Rb())}function Lc(e,t){if(1&e&&(w.Sb(0,"div",8),w.Sb(1,"label",136),w.Wb(2,137),w.Rb(),w.Sb(3,"div",11),w.Nb(4,"input",138),w.Mc(5,Vc,2,0,"span",13),w.Mc(6,Bc,2,0,"span",13),w.Rb(),w.Rb()),2&e){w.ic();const e=w.Ac(2),t=w.ic();w.yb(5),w.pc("ngIf",t.userForm.showError("user_quota_max_objects",e,"required")),w.yb(1),w.pc("ngIf",t.userForm.showError("user_quota_max_objects",e,"min"))}}function Uc(e,t){1&e&&(w.Sb(0,"div",8),w.Sb(1,"div",14),w.Sb(2,"div",15),w.Nb(3,"input",141),w.Sb(4,"label",142),w.Wb(5,143),w.Rb(),w.Rb(),w.Rb(),w.Rb())}function Gc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,147),w.Rb())}function Kc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,148),w.Rb())}function Qc(e,t){if(1&e&&(w.Sb(0,"div",8),w.Sb(1,"label",144),w.Wb(2,145),w.Rb(),w.Sb(3,"div",11),w.Nb(4,"input",146),w.Mc(5,Gc,2,0,"span",13),w.Mc(6,Kc,2,0,"span",13),w.Rb(),w.Rb()),2&e){w.ic();const e=w.Ac(2),t=w.ic();w.yb(5),w.pc("ngIf",t.userForm.showError("bucket_quota_max_size",e,"required")),w.yb(1),w.pc("ngIf",t.userForm.showError("bucket_quota_max_size",e,"quotaMaxSize"))}}function Jc(e,t){1&e&&(w.Sb(0,"div",8),w.Sb(1,"div",14),w.Sb(2,"div",15),w.Nb(3,"input",149),w.Sb(4,"label",150),w.Wb(5,151),w.Rb(),w.Rb(),w.Rb(),w.Rb())}function Zc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,155),w.Rb())}function Xc(e,t){1&e&&(w.Sb(0,"span",49),w.Wb(1,156),w.Rb())}function Yc(e,t){if(1&e&&(w.Sb(0,"div",8),w.Sb(1,"label",152),w.Wb(2,153),w.Rb(),w.Sb(3,"div",11),w.Nb(4,"input",154),w.Mc(5,Zc,2,0,"span",13),w.Mc(6,Xc,2,0,"span",13),w.Rb(),w.Rb()),2&e){w.ic();const e=w.Ac(2),t=w.ic();w.yb(5),w.pc("ngIf",t.userForm.showError("bucket_quota_max_objects",e,"required")),w.yb(1),w.pc("ngIf",t.userForm.showError("bucket_quota_max_objects",e,"min"))}}const Hc=function(e){return{required:e}};function ea(e,t){if(1&e){const e=w.Tb();w.Sb(0,"div",1),w.Sb(1,"form",2,3),w.Sb(3,"div",4),w.Sb(4,"div",5),w.Wb(5,6),w.jc(6,"titlecase"),w.jc(7,"upperFirst"),w.Rb(),w.Sb(8,"div",7),w.Sb(9,"div",8),w.Sb(10,"label",9),w.Wb(11,10),w.Rb(),w.Sb(12,"div",11),w.Nb(13,"input",12),w.Mc(14,nc,2,0,"span",13),w.Mc(15,rc,2,0,"span",13),w.Mc(16,lc,2,0,"span",13),w.Rb(),w.Rb(),w.Sb(17,"div",8),w.Sb(18,"div",14),w.Sb(19,"div",15),w.Sb(20,"input",16),w.gc("click",(function(){return w.Dc(e),w.ic().updateFieldsWhenTenanted()})),w.Rb(),w.Sb(21,"label",17),w.Wb(22,18),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Mc(23,fc,7,3,"div",19),w.Sb(24,"div",8),w.Sb(25,"label",20),w.Wb(26,21),w.Rb(),w.Sb(27,"div",11),w.Nb(28,"input",22),w.Mc(29,mc,2,0,"span",13),w.Rb(),w.Rb(),w.Sb(30,"div",8),w.Sb(31,"label",23),w.Wb(32,24),w.Rb(),w.Sb(33,"div",11),w.Nb(34,"input",25),w.Mc(35,pc,2,0,"span",13),w.Mc(36,gc,2,0,"span",13),w.Rb(),w.Rb(),w.Sb(37,"div",8),w.Sb(38,"label",26),w.Wb(39,27),w.Rb(),w.Sb(40,"div",11),w.Sb(41,"select",28),w.gc("change",(function(t){return w.Dc(e),w.ic().onMaxBucketsModeChange(t.target.value)})),w.Sb(42,"option",29),w.Wb(43,30),w.Rb(),w.Sb(44,"option",31),w.Wb(45,32),w.Rb(),w.Sb(46,"option",33),w.Wb(47,34),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Mc(48,yc,6,2,"div",19),w.Sb(49,"div",8),w.Sb(50,"div",14),w.Sb(51,"div",15),w.Nb(52,"input",35),w.Sb(53,"label",36),w.Wb(54,37),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Mc(55,wc,11,2,"fieldset",38),w.Mc(56,Mc,16,11,"fieldset",38),w.Mc(57,Ec,25,13,"fieldset",38),w.Mc(58,Fc,19,19,"fieldset",38),w.Sb(59,"fieldset"),w.Sb(60,"legend"),w.Wb(61,39),w.Rb(),w.Sb(62,"div",8),w.Sb(63,"div",14),w.Sb(64,"div",15),w.Nb(65,"input",40),w.Sb(66,"label",41),w.Wb(67,42),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Mc(68,Wc,6,0,"div",19),w.Mc(69,jc,7,2,"div",19),w.Mc(70,Pc,6,0,"div",19),w.Mc(71,Lc,7,2,"div",19),w.Rb(),w.Sb(72,"fieldset"),w.Sb(73,"legend"),w.Wb(74,43),w.Rb(),w.Sb(75,"div",8),w.Sb(76,"div",14),w.Sb(77,"div",15),w.Nb(78,"input",44),w.Sb(79,"label",45),w.Wb(80,46),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Mc(81,Uc,6,0,"div",19),w.Mc(82,Qc,7,2,"div",19),w.Mc(83,Jc,6,0,"div",19),w.Mc(84,Yc,7,2,"div",19),w.Rb(),w.Rb(),w.Sb(85,"div",47),w.Sb(86,"cd-form-button-panel",48),w.gc("submitActionEvent",(function(){return w.Dc(e),w.ic().onSubmit()})),w.jc(87,"titlecase"),w.jc(88,"upperFirst"),w.Rb(),w.Rb(),w.Rb(),w.Rb(),w.Rb()}if(2&e){const e=w.Ac(2),t=w.ic();w.yb(1),w.pc("formGroup",t.userForm),w.yb(6),w.ac(w.kc(6,29,t.action))(w.kc(7,31,t.resource)),w.Xb(5),w.yb(3),w.pc("ngClass",w.uc(37,Hc,!t.editing)),w.yb(3),w.pc("readonly",t.editing),w.yb(1),w.pc("ngIf",t.userForm.showError("user_id",e,"required")),w.yb(1),w.pc("ngIf",t.userForm.showError("user_id",e,"pattern")),w.yb(1),w.pc("ngIf",!t.userForm.getValue("show_tenant")&&t.userForm.showError("user_id",e,"notUnique")),w.yb(4),w.pc("readonly",!0),w.yb(3),w.pc("ngIf",t.userForm.getValue("show_tenant")),w.yb(2),w.pc("ngClass",w.uc(39,Hc,!t.editing)),w.yb(4),w.pc("ngIf",t.userForm.showError("display_name",e,"required")),w.yb(6),w.pc("ngIf",t.userForm.showError("email",e,"email")),w.yb(1),w.pc("ngIf",t.userForm.showError("email",e,"notUnique")),w.yb(12),w.pc("ngIf",1==t.userForm.get("max_buckets_mode").value),w.yb(7),w.pc("ngIf",!t.editing),w.yb(1),w.pc("ngIf",t.editing),w.yb(1),w.pc("ngIf",t.editing),w.yb(1),w.pc("ngIf",t.editing),w.yb(10),w.pc("ngIf",t.userForm.controls.user_quota_enabled.value),w.yb(1),w.pc("ngIf",t.userForm.controls.user_quota_enabled.value&&!t.userForm.getValue("user_quota_max_size_unlimited")),w.yb(1),w.pc("ngIf",t.userForm.controls.user_quota_enabled.value),w.yb(1),w.pc("ngIf",t.userForm.controls.user_quota_enabled.value&&!t.userForm.getValue("user_quota_max_objects_unlimited")),w.yb(10),w.pc("ngIf",t.userForm.controls.bucket_quota_enabled.value),w.yb(1),w.pc("ngIf",t.userForm.controls.bucket_quota_enabled.value&&!t.userForm.getValue("bucket_quota_max_size_unlimited")),w.yb(1),w.pc("ngIf",t.userForm.controls.bucket_quota_enabled.value),w.yb(1),w.pc("ngIf",t.userForm.controls.bucket_quota_enabled.value&&!t.userForm.getValue("bucket_quota_max_objects_unlimited")),w.yb(2),w.pc("form",t.userForm)("submitText",w.kc(87,33,t.action)+" "+w.kc(88,35,t.resource))}}let ta=(()=>{class e extends q.a{constructor(e,t,c,a,i,s,b){super(),this.formBuilder=e,this.route=t,this.router=c,this.rgwUserService=a,this.modalService=i,this.notificationService=s,this.actionLabels=b,this.editing=!1,this.submitObservables=[],this.icons=M.a,this.subusers=[],this.s3Keys=[],this.swiftKeys=[],this.capabilities=[],this.showTenant=!1,this.previousTenant=null,this.resource="user",this.subuserLabel="subuser",this.s3keyLabel="S3 Key",this.capabilityLabel="capability",this.editing=this.router.url.startsWith("/rgw/user/"+n.e.EDIT),this.action=this.editing?this.actionLabels.EDIT:this.actionLabels.CREATE,this.createForm()}createForm(){this.userForm=this.formBuilder.group({user_id:[null,[i.A.required,i.A.pattern(/^[a-zA-Z0-9!@#%^&*()_-]+$/)],this.editing?[]:[T.a.unique(this.rgwUserService.exists,this.rgwUserService,()=>this.userForm.getValue("tenant"))]],show_tenant:[this.editing],tenant:[null,[i.A.pattern(/^[a-zA-Z0-9!@#%^&*()_-]+$/)],this.editing?[]:[T.a.unique(this.rgwUserService.exists,this.rgwUserService,()=>this.userForm.getValue("user_id"),!0)]],display_name:[null,[i.A.required]],email:[null,[T.a.email],[T.a.unique(this.rgwUserService.emailExists,this.rgwUserService)]],max_buckets_mode:[1],max_buckets:[1e3,[T.a.requiredIf({max_buckets_mode:"1"}),T.a.number(!1),i.A.min(1)]],suspended:[!1],generate_key:[!0],access_key:[null,[T.a.requiredIf({generate_key:!1})]],secret_key:[null,[T.a.requiredIf({generate_key:!1})]],user_quota_enabled:[!1],user_quota_max_size_unlimited:[!0],user_quota_max_size:[null,[T.a.composeIf({user_quota_enabled:!0,user_quota_max_size_unlimited:!1},[i.A.required,this.quotaMaxSizeValidator])]],user_quota_max_objects_unlimited:[!0],user_quota_max_objects:[null,[i.A.min(0),T.a.requiredIf({user_quota_enabled:!0,user_quota_max_objects_unlimited:!1})]],bucket_quota_enabled:[!1],bucket_quota_max_size_unlimited:[!0],bucket_quota_max_size:[null,[T.a.composeIf({bucket_quota_enabled:!0,bucket_quota_max_size_unlimited:!1},[i.A.required,this.quotaMaxSizeValidator])]],bucket_quota_max_objects_unlimited:[!0],bucket_quota_max_objects:[null,[i.A.min(0),T.a.requiredIf({bucket_quota_enabled:!0,bucket_quota_max_objects_unlimited:!1})]]})}ngOnInit(){this.route.params.subscribe(e=>{if(!e.hasOwnProperty("uid"))return void this.loadingReady();const t=decodeURIComponent(e.uid),c=[];c.push(this.rgwUserService.get(t)),c.push(this.rgwUserService.getQuota(t)),Object(f.a)(c).subscribe(e=>{const t=d.a.clone(this.userForm.value);let c=d.a.pick(e[0],d.a.keys(this.userForm.value));switch(c.max_buckets){case-1:c.max_buckets_mode=-1,c.max_buckets="";break;case 0:c.max_buckets_mode=0,c.max_buckets="";break;default:c.max_buckets_mode=1}["user","bucket"].forEach(t=>{const a=e[1][t+"_quota"];c[t+"_quota_enabled"]=a.enabled,a.max_size<0?(c[t+"_quota_max_size_unlimited"]=!0,c[t+"_quota_max_size"]=null):(c[t+"_quota_max_size_unlimited"]=!1,c[t+"_quota_max_size"]=a.max_size+" B"),a.max_objects<0?(c[t+"_quota_max_objects_unlimited"]=!0,c[t+"_quota_max_objects"]=null):(c[t+"_quota_max_objects_unlimited"]=!1,c[t+"_quota_max_objects"]=a.max_objects)}),c=d.a.merge(t,c),this.userForm.setValue(c),this.subusers=e[0].subusers,this.s3Keys=e[0].keys,this.swiftKeys=e[0].swift_keys;const a={"read, write":"*"};e[0].caps.forEach(e=>{e.perm in a&&(e.perm=a[e.perm])}),this.capabilities=e[0].caps,this.loadingReady()},()=>{this.loadingError()})})}goToListView(){this.router.navigate(["/rgw/user"])}onSubmit(){let e;if(this.userForm.pristine)return void this.goToListView();const t=this.getUID();if(this.editing){if(this._isGeneralDirty()){const e=this._getUpdateArgs();this.submitObservables.push(this.rgwUserService.update(t,e))}e="Updated Object Gateway user '" + t + "'"}else{const c=this._getCreateArgs();this.submitObservables.push(this.rgwUserService.create(c)),e="Created Object Gateway user '" + t + "'"}if(this._isUserQuotaDirty()){const e=this._getUserQuotaArgs();this.submitObservables.push(this.rgwUserService.updateQuota(t,e))}if(this._isBucketQuotaDirty()){const e=this._getBucketQuotaArgs();this.submitObservables.push(this.rgwUserService.updateQuota(t,e))}Object(yt.a)(...this.submitObservables).subscribe({error:()=>{this.userForm.setErrors({cdSubmitButton:!0})},complete:()=>{this.notificationService.show($.a.success,e),this.goToListView()}})}updateFieldsWhenTenanted(){this.showTenant=this.userForm.getValue("show_tenant"),this.showTenant?(this.userForm.get("user_id").markAsTouched(),this.previousTenant=this.userForm.get("tenant").value,this.userForm.get("tenant").patchValue(null)):(this.userForm.get("user_id").markAsUntouched(),this.userForm.get("tenant").patchValue(this.previousTenant))}getUID(){var e;let t=this.userForm.getValue("user_id");const c=null===(e=this.userForm)||void 0===e?void 0:e.getValue("tenant");return c&&c.length>0&&(t=`${this.userForm.getValue("tenant")}$${t}`),t}quotaMaxSizeValidator(e){return Object(T.b)(e.value)?null:null===RegExp("^(\\d+(\\.\\d+)?)\\s*(B|K(B|iB)?|M(B|iB)?|G(B|iB)?|T(B|iB)?)?$","i").exec(e.value)||(new _t.a).toBytes(e.value)<1024?{quotaMaxSize:!0}:null}setSubuser(e,t){const c={"full-control":"full","read-write":"readwrite"},a=this.getUID();this.submitObservables.push(this.rgwUserService.createSubuser(a,{subuser:e.id,access:e.permissions in c?c[e.permissions]:e.permissions,key_type:"swift",secret_key:e.secret_key,generate_secret:e.generate_secret?"true":"false"})),d.a.isNumber(t)?this.subusers[t]=e:(this.subusers.push(e),this.swiftKeys.push({user:e.id,secret_key:e.generate_secret?"Apply your changes first...":e.secret_key})),this.userForm.markAsDirty()}deleteSubuser(e){const t=this.subusers[e];this.submitObservables.push(this.rgwUserService.deleteSubuser(this.getUID(),t.id)),this.s3Keys=this.s3Keys.filter(e=>e.user!==t.id),this.swiftKeys=this.swiftKeys.filter(e=>e.user!==t.id),this.subusers.splice(e,1),this.userForm.markAsDirty()}setCapability(e,t){const c=this.getUID();if(d.a.isNumber(t)){const a=this.capabilities[t];this.submitObservables.push(this.rgwUserService.deleteCapability(c,a.type,a.perm)),this.submitObservables.push(this.rgwUserService.addCapability(c,e.type,e.perm)),this.capabilities[t]=e}else this.submitObservables.push(this.rgwUserService.addCapability(c,e.type,e.perm)),this.capabilities=[...this.capabilities,e];this.userForm.markAsDirty()}deleteCapability(e){const t=this.capabilities[e];this.submitObservables.push(this.rgwUserService.deleteCapability(this.getUID(),t.type,t.perm)),this.capabilities.splice(e,1),this.capabilities=[...this.capabilities],this.userForm.markAsDirty()}hasAllCapabilities(e){return!d.a.difference(kt.getAll(),d.a.map(e,"type")).length}setS3Key(e,t){if(d.a.isNumber(t));else{const t=e.user.match(/([^:]+)(:(.+))?/),c=t[1],a={subuser:t[2]?t[3]:"",generate_key:e.generate_key?"true":"false"};"false"===a.generate_key&&(d.a.isNil(e.access_key)||(a.access_key=e.access_key),d.a.isNil(e.secret_key)||(a.secret_key=e.secret_key)),this.submitObservables.push(this.rgwUserService.addS3Key(c,a)),this.s3Keys.push({user:e.user,access_key:e.generate_key?"Apply your changes first...":e.access_key,secret_key:e.generate_key?"Apply your changes first...":e.secret_key})}this.userForm.markAsDirty()}deleteS3Key(e){const t=this.s3Keys[e];this.submitObservables.push(this.rgwUserService.deleteS3Key(this.getUID(),t.access_key)),this.s3Keys.splice(e,1),this.userForm.markAsDirty()}showSubuserModal(e){const t=this.getUID(),c=this.modalService.show(ic);if(d.a.isNumber(e)){const a=this.subusers[e];c.componentInstance.setEditing(),c.componentInstance.setValues(t,a.id,a.permissions)}else c.componentInstance.setEditing(!1),c.componentInstance.setValues(t),c.componentInstance.setSubusers(this.subusers);c.componentInstance.submitAction.subscribe(t=>{this.setSubuser(t,e)})}showS3KeyModal(e){const t=this.modalService.show(Kt);if(d.a.isNumber(e)){const c=this.s3Keys[e];t.componentInstance.setViewing(),t.componentInstance.setValues(c.user,c.access_key,c.secret_key)}else{const e=this._getS3KeyUserCandidates();t.componentInstance.setViewing(!1),t.componentInstance.setUserCandidates(e),t.componentInstance.submitAction.subscribe(e=>{this.setS3Key(e)})}}showSwiftKeyModal(e){const t=this.modalService.show(bc),c=this.swiftKeys[e];t.componentInstance.setValues(c.user,c.secret_key)}showCapabilityModal(e){const t=this.modalService.show(Et);if(d.a.isNumber(e)){const c=this.capabilities[e];t.componentInstance.setEditing(),t.componentInstance.setValues(c.type,c.perm)}else t.componentInstance.setEditing(!1),t.componentInstance.setCapabilities(this.capabilities);t.componentInstance.submitAction.subscribe(t=>{this.setCapability(t,e)})}_isGeneralDirty(){return["display_name","email","max_buckets_mode","max_buckets","suspended"].some(e=>this.userForm.get(e).dirty)}_isUserQuotaDirty(){return["user_quota_enabled","user_quota_max_size_unlimited","user_quota_max_size","user_quota_max_objects_unlimited","user_quota_max_objects"].some(e=>this.userForm.get(e).dirty)}_isBucketQuotaDirty(){return["bucket_quota_enabled","bucket_quota_max_size_unlimited","bucket_quota_max_size","bucket_quota_max_objects_unlimited","bucket_quota_max_objects"].some(e=>this.userForm.get(e).dirty)}_getCreateArgs(){const e={uid:this.getUID(),display_name:this.userForm.getValue("display_name"),suspended:this.userForm.getValue("suspended"),email:"",max_buckets:this.userForm.getValue("max_buckets"),generate_key:this.userForm.getValue("generate_key"),access_key:"",secret_key:""},t=this.userForm.getValue("email");d.a.isString(t)&&t.length>0&&d.a.merge(e,{email:t}),this.userForm.getValue("generate_key")||d.a.merge(e,{generate_key:!1,access_key:this.userForm.getValue("access_key"),secret_key:this.userForm.getValue("secret_key")});const c=parseInt(this.userForm.getValue("max_buckets_mode"),10);return d.a.includes([-1,0],c)&&d.a.merge(e,{max_buckets:c}),e}_getUpdateArgs(){const e={},t=["display_name","email","max_buckets","suspended"];for(const a of t)e[a]=this.userForm.getValue(a);const c=parseInt(this.userForm.getValue("max_buckets_mode"),10);return d.a.includes([-1,0],c)&&(e.max_buckets=c),e}_getUserQuotaArgs(){const e={quota_type:"user",enabled:this.userForm.getValue("user_quota_enabled"),max_size_kb:-1,max_objects:-1};if(!this.userForm.getValue("user_quota_max_size_unlimited")){const t=(new _t.a).toBytes(this.userForm.getValue("user_quota_max_size"));e.max_size_kb=(t/1024).toFixed(0)}return this.userForm.getValue("user_quota_max_objects_unlimited")||(e.max_objects=this.userForm.getValue("user_quota_max_objects")),e}_getBucketQuotaArgs(){const e={quota_type:"bucket",enabled:this.userForm.getValue("bucket_quota_enabled"),max_size_kb:-1,max_objects:-1};if(!this.userForm.getValue("bucket_quota_max_size_unlimited")){const t=(new _t.a).toBytes(this.userForm.getValue("bucket_quota_max_size"));e.max_size_kb=(t/1024).toFixed(0)}return this.userForm.getValue("bucket_quota_max_objects_unlimited")||(e.max_objects=this.userForm.getValue("bucket_quota_max_objects")),e}_getS3KeyUserCandidates(){let e=[];const t=this.getUID();return d.a.isString(t)&&!d.a.isEmpty(t)&&e.push(t),this.subusers.forEach(t=>{e.push(t.id)}),this.s3Keys.forEach(t=>{e.push(t.user)}),e=d.a.uniq(e),e}onMaxBucketsModeChange(e){"1"===e&&(this.userForm.get("max_buckets").valid||this.userForm.patchValue({max_buckets:1e3}))}}return e.\u0275fac=function(t){return new(t||e)(w.Mb(N.a),w.Mb(s.a),w.Mb(s.e),w.Mb(x.a),w.Mb(Te.a),w.Mb(E.a),w.Mb(n.b))},e.\u0275cmp=w.Gb({type:e,selectors:[["cd-rgw-user-form"]],features:[w.vb],decls:1,vars:1,consts:function(){return[["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"card"],[1,"card-header"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"card-body"],[1,"form-group","row"],["for","user_id",1,"cd-col-form-label",3,"ngClass"],"User ID",[1,"cd-col-form-input"],["id","user_id","type","text","formControlName","user_id",1,"form-control",3,"readonly"],["class","invalid-feedback",4,"ngIf"],[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["id","show_tenant","type","checkbox","formControlName","show_tenant",1,"custom-control-input",3,"readonly","click"],["for","show_tenant",1,"custom-control-label"],"Show Tenant",["class","form-group row",4,"ngIf"],["for","display_name",1,"cd-col-form-label",3,"ngClass"],"Full name",["id","display_name","type","text","formControlName","display_name",1,"form-control"],["for","email",1,"cd-col-form-label"],"Email address",["id","email","type","text","formControlName","email",1,"form-control"],["for","max_buckets_mode",1,"cd-col-form-label"],"Max. buckets",["formControlName","max_buckets_mode","name","max_buckets_mode","id","max_buckets_mode",1,"form-control","custom-select",3,"change"],["value","-1"],"Disabled",["value","0"],"Unlimited",["value","1"],"Custom",["id","suspended","type","checkbox","formControlName","suspended",1,"custom-control-input"],["for","suspended",1,"custom-control-label"],"Suspended",[4,"ngIf"],"User quota",["id","user_quota_enabled","type","checkbox","formControlName","user_quota_enabled",1,"custom-control-input"],["for","user_quota_enabled",1,"custom-control-label"],"Enabled","Bucket quota",["id","bucket_quota_enabled","type","checkbox","formControlName","bucket_quota_enabled",1,"custom-control-input"],["for","bucket_quota_enabled",1,"custom-control-label"],"Enabled",[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required.","The value is not valid.","The chosen user ID is already in use.",["for","tenant",1,"cd-col-form-label"],"Tenant",["id","tenant","type","text","formControlName","tenant","autofocus","",1,"form-control",3,"readonly"],"The value is not valid.","The chosen user ID exists in this tenant.","This field is required.","This is not a valid email address.","The chosen email address is already in use.",[1,"cd-col-form-label"],["id","max_buckets","type","number","formControlName","max_buckets","min","1",1,"form-control"],"This field is required.","The entered value must be >= 1.","S3 key",["id","generate_key","type","checkbox","formControlName","generate_key",1,"custom-control-input"],["for","generate_key",1,"custom-control-label"],"Auto-generate key",["for","access_key",1,"cd-col-form-label","required"],"Access key",[1,"input-group"],["id","access_key","type","password","formControlName","access_key",1,"form-control"],[1,"input-group-append"],["type","button","cdPasswordButton","access_key",1,"btn","btn-light"],["source","access_key"],"This field is required.",["for","secret_key",1,"cd-col-form-label","required"],"Secret key",["id","secret_key","type","password","formControlName","secret_key",1,"form-control"],["type","button","cdPasswordButton","secret_key",1,"btn","btn-light"],["source","secret_key"],"This field is required.","Subusers",[1,"row"],["class","no-border",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"col-12"],["type","button",1,"btn","btn-light","float-right","tc_addSubuserButton",3,"click"],[3,"ngClass"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"help-block"],[1,"no-border"],[1,"form-text","text-muted"],"There are no subusers.",[1,"input-group-prepend"],[1,"input-group-text"],["type","text","readonly","",1,"cd-form-control",3,"value"],[1,"input-group-prepend","border-left-0","border-right-0"],["type","button",1,"btn","btn-light","tc_showSubuserButton",3,"click",6,"ngbTooltip"],["ngbTooltip","Edit"],["type","button",1,"btn","btn-light","tc_deleteSubuserButton",3,"click",6,"ngbTooltip"],["ngbTooltip","Delete"],"Keys","S3",["type","button",1,"btn","btn-light","float-right","tc_addS3KeyButton",3,"click"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "","Swift","There are no keys.",["type","button",1,"btn","btn-light","tc_showS3KeyButton",3,"click",6,"ngbTooltip"],["ngbTooltip","Show"],["type","button",1,"btn","btn-light","tc_deleteS3KeyButton",3,"click",6,"ngbTooltip"],["ngbTooltip","Delete"],"There are no keys.",["type","button",1,"btn","btn-light","tc_showSwiftKeyButton",3,"click",6,"ngbTooltip"],["ngbTooltip","Show"],"Capabilities",["type","button","triggers","pointerenter:pointerleave",1,"btn","btn-light","float-right","tc_addCapButton",3,"disabled","disableTooltip","click",6,"ngbTooltip"],["ngbTooltip","All capabilities are already added."],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "","There are no capabilities.",["type","button",1,"btn","btn-light","tc_editCapButton",3,"click",6,"ngbTooltip"],["ngbTooltip","Edit"],["type","button",1,"btn","btn-light","tc_deleteCapButton",3,"click",6,"ngbTooltip"],["ngbTooltip","Delete"],["id","user_quota_max_size_unlimited","type","checkbox","formControlName","user_quota_max_size_unlimited",1,"custom-control-input"],["for","user_quota_max_size_unlimited",1,"custom-control-label"],"Unlimited size",["for","user_quota_max_size",1,"cd-col-form-label","required"],"Max. size",["id","user_quota_max_size","type","text","formControlName","user_quota_max_size","cdDimlessBinary","",1,"form-control"],"This field is required.","The value is not valid.",["id","user_quota_max_objects_unlimited","type","checkbox","formControlName","user_quota_max_objects_unlimited",1,"custom-control-input"],["for","user_quota_max_objects_unlimited",1,"custom-control-label"],"Unlimited objects",["for","user_quota_max_objects",1,"cd-col-form-label","required"],"Max. objects",["id","user_quota_max_objects","type","number","formControlName","user_quota_max_objects",1,"form-control"],"This field is required.","The entered value must be >= 0.",["id","bucket_quota_max_size_unlimited","type","checkbox","formControlName","bucket_quota_max_size_unlimited",1,"custom-control-input"],["for","bucket_quota_max_size_unlimited",1,"custom-control-label"],"Unlimited size",["for","bucket_quota_max_size",1,"cd-col-form-label","required"],"Max. size",["id","bucket_quota_max_size","type","text","formControlName","bucket_quota_max_size","cdDimlessBinary","",1,"form-control"],"This field is required.","The value is not valid.",["id","bucket_quota_max_objects_unlimited","type","checkbox","formControlName","bucket_quota_max_objects_unlimited",1,"custom-control-input"],["for","bucket_quota_max_objects_unlimited",1,"custom-control-label"],"Unlimited objects",["for","bucket_quota_max_objects",1,"cd-col-form-label","required"],"Max. objects",["id","bucket_quota_max_objects","type","number","formControlName","bucket_quota_max_objects",1,"form-control"],"This field is required.","The entered value must be >= 0."]},template:function(e,t){1&e&&w.Mc(0,ea,89,41,"div",0),2&e&&w.pc("cdFormLoading",t.loading)},directives:[F.a,i.C,i.r,W.a,i.k,O.a,a.p,D.a,i.d,j.a,i.q,i.i,a.r,i.b,i.z,i.u,i.B,B.a,P.a,i.v,Ct.a,At.a,a.q,b.D,oc.a],pipes:[a.A,L.a,o.b],styles:[""]}),e})();var ca=c("x38r"),aa=c("TJUb");const ia=["accessKeyTpl"],sa=["secretKeyTpl"];function ba(e,t){if(1&e&&(w.Sb(0,"tr"),w.Sb(1,"td",15),w.Wb(2,20),w.Rb(),w.Sb(3,"td"),w.Oc(4),w.Rb(),w.Rb()),2&e){const e=w.ic(4);w.yb(4),w.Pc(e.user.email)}}function oa(e,t){if(1&e&&(w.Sb(0,"div"),w.Oc(1),w.Rb()),2&e){const e=t.$implicit;w.yb(1),w.Rc(" ",e.id," (",e.permissions,") ")}}function na(e,t){if(1&e&&(w.Sb(0,"tr"),w.Sb(1,"td",15),w.Wb(2,21),w.Rb(),w.Sb(3,"td"),w.Mc(4,oa,2,2,"div",22),w.Rb(),w.Rb()),2&e){const e=w.ic(4);w.yb(4),w.pc("ngForOf",e.user.subusers)}}function ra(e,t){if(1&e&&(w.Sb(0,"div"),w.Oc(1),w.Rb()),2&e){const e=t.$implicit;w.yb(1),w.Rc(" ",e.type," (",e.perm,") ")}}function la(e,t){if(1&e&&(w.Sb(0,"tr"),w.Sb(1,"td",15),w.Wb(2,23),w.Rb(),w.Sb(3,"td"),w.Mc(4,ra,2,2,"div",22),w.Rb(),w.Rb()),2&e){const e=w.ic(4);w.yb(4),w.pc("ngForOf",e.user.caps)}}function ua(e,t){1&e&&(w.Sb(0,"td"),w.Oc(1,"-"),w.Rb())}function da(e,t){1&e&&(w.Sb(0,"td"),w.Wb(1,28),w.Rb())}function fa(e,t){if(1&e&&(w.Sb(0,"td"),w.Oc(1),w.jc(2,"dimlessBinary"),w.Rb()),2&e){const e=w.ic(5);w.yb(1),w.Qc(" ",w.kc(2,1,e.user.user_quota.max_size)," ")}}function ma(e,t){1&e&&(w.Sb(0,"td"),w.Oc(1,"-"),w.Rb())}function pa(e,t){1&e&&(w.Sb(0,"td"),w.Wb(1,29),w.Rb())}function ga(e,t){if(1&e&&(w.Sb(0,"td"),w.Oc(1),w.Rb()),2&e){const e=w.ic(5);w.yb(1),w.Qc(" ",e.user.user_quota.max_objects," ")}}function ha(e,t){if(1&e&&(w.Sb(0,"div"),w.Sb(1,"legend"),w.Wb(2,24),w.Rb(),w.Sb(3,"table",9),w.Sb(4,"tbody"),w.Sb(5,"tr"),w.Sb(6,"td",10),w.Wb(7,25),w.Rb(),w.Sb(8,"td",12),w.Oc(9),w.jc(10,"booleanText"),w.Rb(),w.Rb(),w.Sb(11,"tr"),w.Sb(12,"td",15),w.Wb(13,26),w.Rb(),w.Mc(14,ua,2,0,"td",0),w.Mc(15,da,2,0,"td",0),w.Mc(16,fa,3,3,"td",0),w.Rb(),w.Sb(17,"tr"),w.Sb(18,"td",15),w.Wb(19,27),w.Rb(),w.Mc(20,ma,2,0,"td",0),w.Mc(21,pa,2,0,"td",0),w.Mc(22,ga,2,1,"td",0),w.Rb(),w.Rb(),w.Rb(),w.Rb()),2&e){const e=w.ic(4);w.yb(9),w.Pc(w.kc(10,7,e.user.user_quota.enabled)),w.yb(5),w.pc("ngIf",!e.user.user_quota.enabled),w.yb(1),w.pc("ngIf",e.user.user_quota.enabled&&e.user.user_quota.max_size<=-1),w.yb(1),w.pc("ngIf",e.user.user_quota.enabled&&e.user.user_quota.max_size>-1),w.yb(4),w.pc("ngIf",!e.user.user_quota.enabled),w.yb(1),w.pc("ngIf",e.user.user_quota.enabled&&e.user.user_quota.max_objects<=-1),w.yb(1),w.pc("ngIf",e.user.user_quota.enabled&&e.user.user_quota.max_objects>-1)}}function Sa(e,t){1&e&&(w.Sb(0,"td"),w.Oc(1,"-"),w.Rb())}function ya(e,t){1&e&&(w.Sb(0,"td"),w.Wb(1,34),w.Rb())}function _a(e,t){if(1&e&&(w.Sb(0,"td"),w.Oc(1),w.jc(2,"dimlessBinary"),w.Rb()),2&e){const e=w.ic(5);w.yb(1),w.Qc(" ",w.kc(2,1,e.user.bucket_quota.max_size)," ")}}function Ra(e,t){1&e&&(w.Sb(0,"td"),w.Oc(1,"-"),w.Rb())}function ka(e,t){1&e&&(w.Sb(0,"td"),w.Wb(1,35),w.Rb())}function va(e,t){if(1&e&&(w.Sb(0,"td"),w.Oc(1),w.Rb()),2&e){const e=w.ic(5);w.yb(1),w.Qc(" ",e.user.bucket_quota.max_objects," ")}}function wa(e,t){if(1&e&&(w.Sb(0,"div"),w.Sb(1,"legend"),w.Wb(2,30),w.Rb(),w.Sb(3,"table",9),w.Sb(4,"tbody"),w.Sb(5,"tr"),w.Sb(6,"td",10),w.Wb(7,31),w.Rb(),w.Sb(8,"td",12),w.Oc(9),w.jc(10,"booleanText"),w.Rb(),w.Rb(),w.Sb(11,"tr"),w.Sb(12,"td",15),w.Wb(13,32),w.Rb(),w.Mc(14,Sa,2,0,"td",0),w.Mc(15,ya,2,0,"td",0),w.Mc(16,_a,3,3,"td",0),w.Rb(),w.Sb(17,"tr"),w.Sb(18,"td",15),w.Wb(19,33),w.Rb(),w.Mc(20,Ra,2,0,"td",0),w.Mc(21,ka,2,0,"td",0),w.Mc(22,va,2,1,"td",0),w.Rb(),w.Rb(),w.Rb(),w.Rb()),2&e){const e=w.ic(4);w.yb(9),w.Pc(w.kc(10,7,e.user.bucket_quota.enabled)),w.yb(5),w.pc("ngIf",!e.user.bucket_quota.enabled),w.yb(1),w.pc("ngIf",e.user.bucket_quota.enabled&&e.user.bucket_quota.max_size<=-1),w.yb(1),w.pc("ngIf",e.user.bucket_quota.enabled&&e.user.bucket_quota.max_size>-1),w.yb(4),w.pc("ngIf",!e.user.bucket_quota.enabled),w.yb(1),w.pc("ngIf",e.user.bucket_quota.enabled&&e.user.bucket_quota.max_objects<=-1),w.yb(1),w.pc("ngIf",e.user.bucket_quota.enabled&&e.user.bucket_quota.max_objects>-1)}}function za(e,t){if(1&e&&(w.Sb(0,"div"),w.Sb(1,"table",9),w.Sb(2,"tbody"),w.Sb(3,"tr"),w.Sb(4,"td",10),w.Wb(5,11),w.Rb(),w.Sb(6,"td",12),w.Oc(7),w.Rb(),w.Rb(),w.Sb(8,"tr"),w.Sb(9,"td",10),w.Wb(10,13),w.Rb(),w.Sb(11,"td",12),w.Oc(12),w.Rb(),w.Rb(),w.Sb(13,"tr"),w.Sb(14,"td",10),w.Wb(15,14),w.Rb(),w.Sb(16,"td",12),w.Oc(17),w.Rb(),w.Rb(),w.Sb(18,"tr"),w.Sb(19,"td",15),w.Wb(20,16),w.Rb(),w.Sb(21,"td"),w.Oc(22),w.Rb(),w.Rb(),w.Mc(23,ba,5,1,"tr",0),w.Sb(24,"tr"),w.Sb(25,"td",15),w.Wb(26,17),w.Rb(),w.Sb(27,"td"),w.Oc(28),w.jc(29,"booleanText"),w.Rb(),w.Rb(),w.Sb(30,"tr"),w.Sb(31,"td",15),w.Wb(32,18),w.Rb(),w.Sb(33,"td"),w.Oc(34),w.jc(35,"booleanText"),w.Rb(),w.Rb(),w.Sb(36,"tr"),w.Sb(37,"td",15),w.Wb(38,19),w.Rb(),w.Sb(39,"td"),w.Oc(40),w.jc(41,"map"),w.Rb(),w.Rb(),w.Mc(42,na,5,1,"tr",0),w.Mc(43,la,5,1,"tr",0),w.Rb(),w.Rb(),w.Mc(44,ha,23,9,"div",0),w.Mc(45,wa,23,9,"div",0),w.Rb()),2&e){const e=w.ic(3);w.yb(7),w.Pc(e.user.tenant),w.yb(5),w.Pc(e.user.user_id),w.yb(5),w.Pc(e.user.uid),w.yb(5),w.Pc(e.user.display_name),w.yb(1),w.pc("ngIf",null==e.user.email?null:e.user.email.length),w.yb(5),w.Pc(w.kc(29,12,e.user.suspended)),w.yb(6),w.Pc(w.kc(35,14,"true"===e.user.system)),w.yb(6),w.Pc(w.lc(41,16,e.user.max_buckets,e.maxBucketsMap)),w.yb(2),w.pc("ngIf",e.user.subusers&&e.user.subusers.length),w.yb(1),w.pc("ngIf",e.user.caps&&e.user.caps.length),w.yb(1),w.pc("ngIf",e.user.user_quota),w.yb(1),w.pc("ngIf",e.user.bucket_quota)}}function Ia(e,t){if(1&e&&w.Mc(0,za,46,19,"div",0),2&e){const e=w.ic(2);w.pc("ngIf",e.user)}}const xa=function(e){return[e]};function Ma(e,t){if(1&e){const e=w.Tb();w.Sb(0,"cd-table",38),w.gc("updateSelection",(function(t){return w.Dc(e),w.ic(3).updateKeysSelection(t)})),w.Sb(1,"div",39),w.Sb(2,"div",40),w.Sb(3,"button",41),w.gc("click",(function(){return w.Dc(e),w.ic(3).showKeyModal()})),w.Nb(4,"i",42),w.Qb(5),w.Wb(6,43),w.Pb(),w.Rb(),w.Rb(),w.Rb(),w.Rb()}if(2&e){const e=w.ic(3);w.pc("data",e.keys)("columns",e.keysColumns),w.yb(3),w.pc("disabled",!e.keysSelection.hasSingleSelection),w.yb(1),w.pc("ngClass",w.uc(4,xa,e.icons.show))}}function $a(e,t){1&e&&(w.Sb(0,"li",36),w.Sb(1,"a",4),w.Wb(2,37),w.Rb(),w.Mc(3,Ma,7,6,"ng-template",6),w.Rb())}function qa(e,t){if(1&e&&(w.Qb(0),w.Sb(1,"ul",1,2),w.Sb(3,"li",3),w.Sb(4,"a",4),w.Wb(5,5),w.Rb(),w.Mc(6,Ia,1,1,"ng-template",6),w.Rb(),w.Mc(7,$a,4,0,"li",7),w.Rb(),w.Nb(8,"div",8),w.Pb()),2&e){const e=w.Ac(2),t=w.ic();w.yb(7),w.pc("ngIf",t.keys.length),w.yb(1),w.pc("ngbNavOutlet",e)}}let Na=(()=>{class e{constructor(e,t){this.rgwUserService=e,this.modalService=t,this.keys=[],this.keysColumns=[],this.keysSelection=new Me.a,this.icons=M.a}ngOnInit(){this.keysColumns=[{name:"Username",prop:"username",flexGrow:1},{name:"Type",prop:"type",flexGrow:1}],this.maxBucketsMap={"-1":"Disabled",0:"Unlimited"}}ngOnChanges(){this.selection&&(this.user=this.selection,this.user.subusers=d.a.sortBy(this.user.subusers,"id"),this.user.caps=d.a.sortBy(this.user.caps,"type"),this.rgwUserService.getQuota(this.user.uid).subscribe(e=>{d.a.extend(this.user,e)}),this.keys=[],this.user.keys&&this.user.keys.forEach(e=>{this.keys.push({id:this.keys.length+1,type:"S3",username:e.user,ref:e})}),this.user.swift_keys&&this.user.swift_keys.forEach(e=>{this.keys.push({id:this.keys.length+1,type:"Swift",username:e.user,ref:e})}),this.keys=d.a.sortBy(this.keys,"user"))}updateKeysSelection(e){this.keysSelection=e}showKeyModal(){const e=this.keysSelection.first(),t=this.modalService.show("S3"===e.type?Kt:bc);switch(e.type){case"S3":t.componentInstance.setViewing(),t.componentInstance.setValues(e.ref.user,e.ref.access_key,e.ref.secret_key);break;case"Swift":t.componentInstance.setValues(e.ref.user,e.ref.secret_key)}}}return e.\u0275fac=function(t){return new(t||e)(w.Mb(x.a),w.Mb(Te.a))},e.\u0275cmp=w.Gb({type:e,selectors:[["cd-rgw-user-details"]],viewQuery:function(e,t){var c;1&e&&(w.Tc(ia,!0),w.Tc(sa,!0)),2&e&&(w.zc(c=w.hc())&&(t.accessKeyTpl=c.first),w.zc(c=w.hc())&&(t.secretKeyTpl=c.first))},inputs:{selection:"selection"},features:[w.wb],decls:1,vars:1,consts:function(){return[[4,"ngIf"],["ngbNav","","cdStatefulTab","rgw-user-details",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem","details"],["ngbNavLink",""],"Details",["ngbNavContent",""],["ngbNavItem","keys",4,"ngIf"],[3,"ngbNavOutlet"],[1,"table","table-striped","table-bordered"],[1,"bold","w-25"],"Tenant",[1,"w-75"],"User ID","Username",[1,"bold"],"Full name","Suspended","System","Maximum buckets","Email address","Subusers",[4,"ngFor","ngForOf"],"Capabilities","User quota","Enabled","Maximum size","Maximum objects","Unlimited","Unlimited","Bucket quota","Enabled","Maximum size","Maximum objects","Unlimited","Unlimited",["ngbNavItem","keys"],"Keys",["columnMode","flex","selectionType","multi","forceIdentifier","true",3,"data","columns","updateSelection"],[1,"table-actions"],["dropdown","",1,"btn-group"],["type","button",1,"btn","btn-accent",3,"disabled","click"],[3,"ngClass"],"Show"]},template:function(e,t){1&e&&w.Mc(0,qa,9,2,"ng-container",0),2&e&&w.pc("ngIf",t.selection)},directives:[a.r,b.p,at.a,b.r,b.s,b.q,b.u,a.q,xe.a,D.a,a.p],pipes:[Fe.a,aa.a,$e.a],styles:[""]}),e})();const Ta=["userSizeTpl"],Ea=["userObjectTpl"];function Ca(e,t){if(1&e&&w.Nb(0,"cd-usage-bar",8),2&e){const e=w.ic().row;w.pc("total",e.user_quota.max_size)("used",e.stats.size_actual)}}function Aa(e,t){1&e&&w.Wb(0,9)}function Fa(e,t){if(1&e&&(w.Mc(0,Ca,1,2,"cd-usage-bar",6),w.Mc(1,Aa,1,0,"ng-template",null,7,w.Nc)),2&e){const e=t.row,c=w.Ac(2);w.pc("ngIf",e.user_quota.max_size>0&&e.user_quota.enabled)("ngIfElse",c)}}function Wa(e,t){if(1&e&&w.Nb(0,"cd-usage-bar",12),2&e){const e=w.ic().row;w.pc("total",e.user_quota.max_objects)("used",e.stats.num_objects)("isBinary",!1)}}function Oa(e,t){1&e&&w.Wb(0,13)}function Da(e,t){if(1&e&&(w.Mc(0,Wa,1,3,"cd-usage-bar",10),w.Mc(1,Oa,1,0,"ng-template",null,11,w.Nc)),2&e){const e=t.row,c=w.Ac(2);w.pc("ngIf",e.user_quota.max_objects>0&&e.user_quota.enabled)("ngIfElse",c)}}let ja=(()=>{class e extends we.a{constructor(e,t,c,a,i,s){super(),this.authStorageService=e,this.rgwUserService=t,this.modalService=c,this.urlBuilder=a,this.actionLabels=i,this.ngZone=s,this.columns=[],this.users=[],this.selection=new Me.a,this.tableStatus=new ze.a}ngOnInit(){this.permission=this.authStorageService.getPermissions().rgw,this.columns=[{name:"Username",prop:"uid",flexGrow:1},{name:"Tenant",prop:"tenant",flexGrow:1},{name:"Full name",prop:"display_name",flexGrow:1},{name:"Email address",prop:"email",flexGrow:1},{name:"Suspended",prop:"suspended",flexGrow:1,cellClass:"text-center",cellTransformation:ca.a.checkIcon},{name:"Max. buckets",prop:"max_buckets",flexGrow:1,cellTransformation:ca.a.map,customTemplateConfig:{"-1":"Disabled",0:"Unlimited"}},{name:"Capacity Limit %",prop:"size_usage",cellTemplate:this.userSizeTpl,flexGrow:.8},{name:"Object Limit %",prop:"object_usage",cellTemplate:this.userObjectTpl,flexGrow:.8}];const e=()=>this.selection.first()&&""+encodeURIComponent(this.selection.first().uid);this.tableActions=[{permission:"create",icon:M.a.add,routerLink:()=>this.urlBuilder.getCreate(),name:this.actionLabels.CREATE,canBePrimary:e=>!e.hasSelection},{permission:"update",icon:M.a.edit,routerLink:()=>this.urlBuilder.getEdit(e()),name:this.actionLabels.EDIT},{permission:"delete",icon:M.a.destroy,click:()=>this.deleteAction(),disable:()=>!this.selection.hasSelection,name:this.actionLabels.DELETE,canBePrimary:e=>e.hasMultiSelection}],this.timeConditionReached()}timeConditionReached(){clearTimeout(this.staleTimeout),this.ngZone.runOutsideAngular(()=>{this.staleTimeout=window.setTimeout(()=>{this.ngZone.run(()=>{this.tableStatus=new ze.a("warning","The user list data might be stale. If needed, you can manually reload it.")})},1e4)})}getUserList(e){this.tableStatus=new ze.a,this.timeConditionReached(),this.rgwUserService.list().subscribe(e=>{this.users=e},()=>{e.error()})}updateSelection(e){this.selection=e}deleteAction(){this.modalService.show(Ie.a,{itemDescription:this.selection.hasSingleSelection?"user":"users",itemNames:this.selection.selected.map(e=>e.uid),submitActionObservable:()=>new ve.a(e=>{Object(f.a)(this.selection.selected.map(e=>this.rgwUserService.delete(e.uid))).subscribe({error:t=>{e.error(t),this.table.refreshBtn()},complete:()=>{e.complete(),this.table.refreshBtn()}})})})}}return e.\u0275fac=function(t){return new(t||e)(w.Mb(Ne.a),w.Mb(x.a),w.Mb(Te.a),w.Mb(Ee.a),w.Mb(n.b),w.Mb(w.A))},e.\u0275cmp=w.Gb({type:e,selectors:[["cd-rgw-user-list"]],viewQuery:function(e,t){var c;1&e&&(w.Jc(xe.a,!0),w.Jc(Ta,!0),w.Jc(Ea,!0)),2&e&&(w.zc(c=w.hc())&&(t.table=c.first),w.zc(c=w.hc())&&(t.userSizeTpl=c.first),w.zc(c=w.hc())&&(t.userObjectTpl=c.first))},features:[w.xb([{provide:Ee.a,useValue:new Ee.a("rgw/user")}]),w.vb],decls:8,vars:9,consts:function(){return[["columnMode","flex","selectionType","multiClick","identifier","uid",3,"autoReload","data","columns","hasDetails","status","setExpandedRow","updateSelection","fetchData"],["table",""],[1,"table-actions",3,"permission","selection","tableActions"],["cdTableDetail","",3,"selection"],["userSizeTpl",""],["userObjectTpl",""],[3,"total","used",4,"ngIf","ngIfElse"],["noSizeQuota",""],[3,"total","used"],"No Limit",[3,"total","used","isBinary",4,"ngIf","ngIfElse"],["noObjectQuota",""],[3,"total","used","isBinary"],"No Limit"]},template:function(e,t){1&e&&(w.Sb(0,"cd-table",0,1),w.gc("setExpandedRow",(function(e){return t.setExpandedRow(e)}))("updateSelection",(function(e){return t.updateSelection(e)}))("fetchData",(function(e){return t.getUserList(e)})),w.Nb(2,"cd-table-actions",2),w.Nb(3,"cd-rgw-user-details",3),w.Rb(),w.Mc(4,Fa,3,2,"ng-template",null,4,w.Nc),w.Mc(6,Da,3,2,"ng-template",null,5,w.Nc)),2&e&&(w.pc("autoReload",!1)("data",t.users)("columns",t.columns)("hasDetails",!0)("status",t.tableStatus),w.yb(2),w.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions),w.yb(1),w.pc("selection",t.expandedRow))},directives:[xe.a,Ce.a,Na,a.r,Ue.a],styles:[""]}),e})(),Pa=(()=>{class e{}return e.\u0275mod=w.Kb({type:e}),e.\u0275inj=w.Jb({factory:function(t){return new(t||e)},imports:[[a.c,r.a,i.m,i.x,l.a,b.t,s.i,b.F,o.a]]}),e})();const Va=[{path:""},{path:"daemon",component:St,data:{breadcrumbs:"Daemons"}},{path:"user",data:{breadcrumbs:"Users"},children:[{path:"",component:ja},{path:n.e.CREATE,component:ta,data:{breadcrumbs:n.a.CREATE}},{path:n.e.EDIT+"/:uid",component:ta,data:{breadcrumbs:n.a.EDIT}}]},{path:"bucket",data:{breadcrumbs:"Buckets"},children:[{path:"",component:et},{path:n.e.CREATE,component:ke,data:{breadcrumbs:n.a.CREATE}},{path:n.e.EDIT+"/:bid",component:ke,data:{breadcrumbs:n.a.EDIT}}]}];let Ba=(()=>{class e{}return e.\u0275mod=w.Kb({type:e}),e.\u0275inj=w.Jb({factory:function(t){return new(t||e)},imports:[[Pa,s.i.forChild(Va)]]}),e})()}}]);
\ No newline at end of file
<meta charset="utf-8">
<title>Ceph</title>
- <script>
- document.write('<base href="' + document.location+ '" />');
- </script>
-
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="icon" type="image/x-icon" id="cdFavicon" href="favicon.ico">
-<link rel="stylesheet" href="styles.0b9eb5355e15caa2c87d.css"><link rel="stylesheet" href="main.e73fdb683302952f5ca0.css"></head>
+<link rel="stylesheet" href="styles.7918cb8dc788b3eedc95.css"></head>
<body>
<noscript>
<div class="noscript container"
</noscript>
<cd-root></cd-root>
-<script src="runtime.8d55cba33eadfad4c77c.js" defer></script><script src="polyfills.b66d1515aae6fe3887b1.js" defer></script><script src="scripts.38cee5fbd56812617717.js" defer></script><script src="main.abdc8ba4d5af20b6adbf.js" defer></script></body>
+<script src="runtime.95ade215c318c70e8872.js" defer></script><script src="polyfills.b66d1515aae6fe3887b1.js" defer></script><script src="scripts.6bda3fa7e09a87cd4228.js" defer></script><script src="main.686c64fd8301e15fd70a.js" defer></script></body>
</html>
--- /dev/null
+var $localize=Object.assign(void 0===$localize?{}:$localize,{locale:"en-US"});
+"use strict";(function(global){global.ng=global.ng||{};global.ng.common=global.ng.common||{};global.ng.common.locales=global.ng.common.locales||{};const u=undefined;function plural(n){let i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;if(i===1&&v===0)return 1;return 5}global.ng.common.locales["en-us-posix"]=["en-US-POSIX",[["a","p"],["AM","PM"],u],[["AM","PM"],u,u],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],u,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],u,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",u,"{1} 'at' {0}",u],[".",",",";","%","+","-","E","\xD7","0/00","INF","NaN",":"],["0.######","0%","\xA4\xA00.00","0.000000E+000"],"USD","$","US Dollar",{},"ltr",plural,[[["mi","n","in the morning","in the afternoon","in the evening","at night"],["midnight","noon","in the morning","in the afternoon","in the evening","at night"],u],[["midnight","noon","morning","afternoon","evening","night"],u,u],["00:00","12:00",["06:00","12:00"],["12:00","18:00"],["18:00","21:00"],["21:00","06:00"]]]]})(typeof globalThis!=="undefined"&&globalThis||typeof global!=="undefined"&&global||typeof window!=="undefined"&&window);;
+(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{"+0ag":function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("8Y7J");let r=(()=>{class e{transform(e){const t=/ceph version\s+[^ ]+\s+\(.+\)\s+(.+)\s+\((.+)\)/.exec(e);return t?"dev"===t[2]?"master":t[1]:e}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"cephReleaseName",type:e,pure:!0}),e})()},"+EKe":function(e,t,n){"use strict";var i=n("23KU"),r=n("uE2L");t.a=function(e,t,n,s){var o=!n;n||(n={});for(var a=-1,c=t.length;++a<c;){var l=t[a],u=s?s(n[l],e[l],l,n,e):void 0;void 0===u&&(u=e[l]),o?Object(r.a)(n,l,u):Object(i.a)(n,l,u)}return n}},"+fVR":function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));class i{setExpandedRow(e){this.expandedRow=e}}},"+s0g":function(e,t,n){!function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),i=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],r=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,i){return e?/-MMM-/.test(i)?n[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"\xe9\xe9n minuut",mm:"%d minuten",h:"\xe9\xe9n uur",hh:"%d uur",d:"\xe9\xe9n dag",dd:"%d dagen",w:"\xe9\xe9n week",ww:"%d weken",M:"\xe9\xe9n maand",MM:"%d maanden",y:"\xe9\xe9n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n("wd/R"))},"//9w":function(e,t,n){!function(e){"use strict";e.defineLocale("se",{months:"o\u0111\u0111ajagem\xe1nnu_guovvam\xe1nnu_njuk\u010dam\xe1nnu_cuo\u014bom\xe1nnu_miessem\xe1nnu_geassem\xe1nnu_suoidnem\xe1nnu_borgem\xe1nnu_\u010dak\u010dam\xe1nnu_golggotm\xe1nnu_sk\xe1bmam\xe1nnu_juovlam\xe1nnu".split("_"),monthsShort:"o\u0111\u0111j_guov_njuk_cuo_mies_geas_suoi_borg_\u010dak\u010d_golg_sk\xe1b_juov".split("_"),weekdays:"sotnabeaivi_vuoss\xe1rga_ma\u014b\u014beb\xe1rga_gaskavahkku_duorastat_bearjadat_l\xe1vvardat".split("_"),weekdaysShort:"sotn_vuos_ma\u014b_gask_duor_bear_l\xe1v".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s gea\u017ees",past:"ma\u014bit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta m\xe1nnu",MM:"%d m\xe1nut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},"/1FC":function(e,t,n){"use strict";t.a=Array.isArray},"/GqU":function(e,t,n){var i=n("RK3t"),r=n("HYAF");e.exports=function(e){return i(r(e))}},"/NlG":function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var i=n("oxzT"),r=n("8Y7J"),s=n("G0yt"),o=n("SVse");const a=function(e){return[e]};function c(e,t){if(1&e&&(r.Sb(0,"td",8),r.Nb(1,"i",9),r.Rb()),2&e){const e=r.ic(2);r.yb(1),r.Cb("alert-",e.bootstrapClass," ",e.typeIcon,""),r.pc("ngClass",r.uc(5,a,e.icons.large3x))}}function l(e,t){if(1&e&&(r.Sb(0,"td",10),r.Oc(1),r.Rb()),2&e){const e=r.ic(2);r.yb(1),r.Pc(e.title)}}function u(e,t){1&e&&r.Ob(0)}function d(e,t){if(1&e&&(r.Qb(0),r.Sb(1,"tr"),r.Mc(2,c,2,7,"td",4),r.Mc(3,l,2,1,"td",5),r.Rb(),r.Sb(4,"tr"),r.Sb(5,"td",6),r.Mc(6,u,1,0,"ng-container",7),r.Rb(),r.Rb(),r.Pb()),2&e){const e=r.ic(),t=r.Ac(6);r.yb(2),r.pc("ngIf",e.showIcon),r.yb(1),r.pc("ngIf",e.showTitle),r.yb(3),r.pc("ngTemplateOutlet",t)}}function h(e,t){if(1&e&&(r.Sb(0,"td",12),r.Nb(1,"i",13),r.Rb()),2&e){const e=r.ic(2);r.yb(1),r.Cb("alert-",e.bootstrapClass," ",e.typeIcon,"")}}function f(e,t){if(1&e&&(r.Sb(0,"td",10),r.Oc(1),r.Rb()),2&e){const e=r.ic(2);r.yb(1),r.Pc(e.title)}}function p(e,t){1&e&&r.Ob(0)}function m(e,t){if(1&e&&(r.Sb(0,"tr"),r.Mc(1,h,2,4,"td",11),r.Mc(2,f,2,1,"td",5),r.Sb(3,"td",6),r.Mc(4,p,1,0,"ng-container",7),r.Rb(),r.Rb()),2&e){const e=r.ic(),t=r.Ac(6);r.yb(1),r.pc("ngIf",e.showIcon),r.yb(1),r.pc("ngIf",e.showTitle),r.yb(2),r.pc("ngTemplateOutlet",t)}}function b(e,t){1&e&&r.nc(0)}const g=["*"];let _=(()=>{class e{constructor(){this.title="",this.bootstrapClass="",this.size="normal",this.showIcon=!0,this.showTitle=!0,this.icons=i.a}ngOnInit(){switch(this.type){case"warning":this.title=this.title||"Warning",this.typeIcon=this.typeIcon||i.a.warning,this.bootstrapClass=this.bootstrapClass||"warning";break;case"error":this.title=this.title||"Error",this.typeIcon=this.typeIcon||i.a.destroyCircle,this.bootstrapClass=this.bootstrapClass||"danger";break;case"info":this.title=this.title||"Information",this.typeIcon=this.typeIcon||i.a.infoCircle,this.bootstrapClass=this.bootstrapClass||"info";break;case"success":this.title=this.title||"Success",this.typeIcon=this.typeIcon||i.a.check,this.bootstrapClass=this.bootstrapClass||"success"}}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=r.Gb({type:e,selectors:[["cd-alert-panel"]],inputs:{title:"title",bootstrapClass:"bootstrapClass",type:"type",typeIcon:"typeIcon",size:"size",showIcon:"showIcon",showTitle:"showTitle"},ngContentSelectors:g,decls:7,vars:4,consts:[[3,"type","dismissible"],[4,"ngIf","ngIfElse"],["slim",""],["content",""],["rowspan","2","class","alert-panel-icon",4,"ngIf"],["class","alert-panel-title",4,"ngIf"],[1,"alert-panel-text"],[4,"ngTemplateOutlet"],["rowspan","2",1,"alert-panel-icon"],["aria-hidden","true",3,"ngClass"],[1,"alert-panel-title"],["class","alert-panel-icon",4,"ngIf"],[1,"alert-panel-icon"],["aria-hidden","true"]],template:function(e,t){if(1&e&&(r.oc(),r.Sb(0,"ngb-alert",0),r.Sb(1,"table"),r.Mc(2,d,7,3,"ng-container",1),r.Mc(3,m,5,3,"ng-template",null,2,r.Nc),r.Rb(),r.Rb(),r.Mc(5,b,1,0,"ng-template",null,3,r.Nc)),2&e){const e=r.Ac(4);r.qc("type",t.bootstrapClass),r.pc("dismissible",!1),r.yb(2),r.pc("ngIf","normal"===t.size)("ngIfElse",e)}},directives:[s.b,o.r,o.w,o.p],styles:[".alert-panel-icon[_ngcontent-%COMP%]{padding-right:.5em;vertical-align:top}.alert-panel-title[_ngcontent-%COMP%]{font-weight:700}"]}),e})()},"/X5v":function(e,t,n){!function(e){"use strict";e.defineLocale("x-pseudo",{months:"J~\xe1\xf1\xfa\xe1~r\xfd_F~\xe9br\xfa~\xe1r\xfd_~M\xe1rc~h_\xc1p~r\xedl_~M\xe1\xfd_~J\xfa\xf1\xe9~_J\xfal~\xfd_\xc1\xfa~g\xfast~_S\xe9p~t\xe9mb~\xe9r_\xd3~ct\xf3b~\xe9r_\xd1~\xf3v\xe9m~b\xe9r_~D\xe9c\xe9~mb\xe9r".split("_"),monthsShort:"J~\xe1\xf1_~F\xe9b_~M\xe1r_~\xc1pr_~M\xe1\xfd_~J\xfa\xf1_~J\xfal_~\xc1\xfag_~S\xe9p_~\xd3ct_~\xd1\xf3v_~D\xe9c".split("_"),monthsParseExact:!0,weekdays:"S~\xfa\xf1d\xe1~\xfd_M\xf3~\xf1d\xe1\xfd~_T\xfa\xe9~sd\xe1\xfd~_W\xe9d~\xf1\xe9sd~\xe1\xfd_T~h\xfars~d\xe1\xfd_~Fr\xedd~\xe1\xfd_S~\xe1t\xfar~d\xe1\xfd".split("_"),weekdaysShort:"S~\xfa\xf1_~M\xf3\xf1_~T\xfa\xe9_~W\xe9d_~Th\xfa_~Fr\xed_~S\xe1t".split("_"),weekdaysMin:"S~\xfa_M\xf3~_T\xfa_~W\xe9_T~h_Fr~_S\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~\xf3d\xe1~\xfd \xe1t] LT",nextDay:"[T~\xf3m\xf3~rr\xf3~w \xe1t] LT",nextWeek:"dddd [\xe1t] LT",lastDay:"[\xdd~\xe9st~\xe9rd\xe1~\xfd \xe1t] LT",lastWeek:"[L~\xe1st] dddd [\xe1t] LT",sameElse:"L"},relativeTime:{future:"\xed~\xf1 %s",past:"%s \xe1~g\xf3",s:"\xe1 ~f\xe9w ~s\xe9c\xf3~\xf1ds",ss:"%d s~\xe9c\xf3\xf1~ds",m:"\xe1 ~m\xed\xf1~\xfat\xe9",mm:"%d m~\xed\xf1\xfa~t\xe9s",h:"\xe1~\xf1 h\xf3~\xfar",hh:"%d h~\xf3\xfars",d:"\xe1 ~d\xe1\xfd",dd:"%d d~\xe1\xfds",M:"\xe1 ~m\xf3\xf1~th",MM:"%d m~\xf3\xf1t~hs",y:"\xe1 ~\xfd\xe9\xe1r",yy:"%d \xfd~\xe9\xe1rs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n("wd/R"))},"/b8u":function(e,t,n){var i=n("STAE");e.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},"/byt":function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},"/uUt":function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("7o/Q");function r(e,t){return n=>n.lift(new s(e,t))}class s{constructor(e,t){this.compare=e,this.keySelector=t}call(e,t){return t.subscribe(new o(e,this.compare,this.keySelector))}}class o extends i.a{constructor(e,t,n){super(e),this.keySelector=n,this.hasKey=!1,"function"==typeof t&&(this.compare=t)}compare(e,t){return e===t}_next(e){let t;try{const{keySelector:n}=this;t=n?n(e):e}catch(i){return this.destination.error(i)}let n=!1;if(this.hasKey)try{const{compare:e}=this;n=e(this.key,t)}catch(i){return this.destination.error(i)}else this.hasKey=!0;n||(this.key=t,this.destination.next(e))}}},0:function(e,t,n){e.exports=n("zUnb")},"0+/T":function(e,t,n){"use strict";n.d(t,"a",(function(){return D}));var i=n("s7LF"),r=n("QFaf"),s=n("sb0X"),o=n("8Y7J"),a=n("G0yt"),c=n("ajRT"),l=n("SVse"),u=n("NwgZ"),d=n("ocLN"),h=n("ANnk"),f=n("f69J"),p=n("IZUe"),m=n("6+kj");function b(e,t){1&e&&o.Ob(0)}function g(e,t){1&e&&o.Ob(0)}function _(e,t){if(1&e&&(o.Sb(0,"p"),o.cc(1,21),o.jc(2,"lowercase"),o.Nb(3,"strong"),o.Zb(),o.Rb()),2&e){const e=o.ic(2);o.yb(3),o.ac(o.kc(2,2,e.actionDescription))(e.itemNames[0]),o.Xb(1)}}function y(e,t){if(1&e&&(o.Sb(0,"li"),o.Sb(1,"strong"),o.Oc(2),o.Rb(),o.Rb()),2&e){const e=t.$implicit;o.yb(2),o.Pc(e)}}function v(e,t){if(1&e&&(o.Sb(0,"p"),o.Wb(1,22),o.jc(2,"lowercase"),o.Rb(),o.Sb(3,"ul"),o.Mc(4,y,3,1,"li",23),o.Rb()),2&e){const e=o.ic(2);o.yb(2),o.ac(o.kc(2,2,e.actionDescription)),o.Xb(1),o.yb(2),o.pc("ngForOf",e.itemNames)}}function w(e,t){if(1&e&&(o.Sb(0,"span"),o.Mc(1,_,4,4,"p",10),o.Mc(2,v,5,4,"ng-template",null,20,o.Nc),o.Rb()),2&e){const e=o.Ac(3),t=o.ic();o.yb(1),o.pc("ngIf",1===t.itemNames.length)("ngIfElse",e)}}function S(e,t){if(1&e&&(o.Sb(0,"p"),o.Wb(1,24),o.jc(2,"lowercase"),o.Rb()),2&e){const e=o.ic();o.yb(2),o.ac(o.kc(2,2,e.actionDescription))(e.itemDescription),o.Xb(1)}}function M(e,t){1&e&&o.Ob(0)}function x(e,t){if(1&e&&(o.Oc(0),o.jc(1,"titlecase")),2&e){const e=o.ic();o.Rc(" ",o.kc(1,2,e.actionDescription)," ",e.itemDescription,"\n")}}const k=function(e){return{form:e}};let D=(()=>{class e{constructor(e){this.activeModal=e,this.actionDescription="delete"}ngOnInit(){const e={confirmation:new i.h(!1,[i.A.requiredTrue])};if(this.childFormGroup&&(e.child=this.childFormGroup),this.deletionForm=new r.a(e),!this.submitAction&&!this.submitActionObservable)throw new Error("No submit action defined")}callSubmitAction(){this.submitActionObservable?this.submitActionObservable().subscribe({error:this.stopLoadingSpinner.bind(this),complete:this.hideModal.bind(this)}):this.submitAction()}hideModal(){this.activeModal.close()}stopLoadingSpinner(){this.deletionForm.setErrors({cdSubmitButton:!0})}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(a.a))},e.\u0275cmp=o.Gb({type:e,selectors:[["cd-deletion-modal"]],viewQuery:function(e,t){var n;1&e&&o.Jc(s.a,!0),2&e&&o.zc(n=o.hc())&&(t.submitButton=n.first)},decls:24,vars:15,consts:function(){return[[3,"modalRef"],["modal",""],[1,"modal-title"],[4,"ngTemplateOutlet"],[1,"modal-content"],["name","deletionForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"question"],[4,"ngIf","ngIfElse"],["noNames",""],[1,"form-group"],[1,"custom-control","custom-checkbox"],["type","checkbox","name","confirmation","id","confirmation","formControlName","confirmation","autofocus","",1,"custom-control-input"],["for","confirmation",1,"custom-control-label"],"Yes, I am sure.",[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],["deletionHeading",""],["manyNames",""],"Are you sure that you want to " + "\ufffd0\ufffd" + " " + "\ufffd#3\ufffd" + "" + "\ufffd1\ufffd" + "" + "\ufffd/#3\ufffd" + "?","Are you sure that you want to " + "\ufffd0\ufffd" + " the selected items?",[4,"ngFor","ngForOf"],"Are you sure that you want to " + "\ufffd0\ufffd" + " the selected " + "\ufffd1\ufffd" + "?"]},template:function(e,t){if(1&e&&(o.Sb(0,"cd-modal",0,1),o.Qb(2,2),o.Mc(3,b,1,0,"ng-container",3),o.Pb(),o.Qb(4,4),o.Sb(5,"form",5,6),o.Sb(7,"div",7),o.Mc(8,g,1,0,"ng-container",8),o.Sb(9,"div",9),o.Mc(10,w,4,2,"span",10),o.Mc(11,S,3,4,"ng-template",null,11,o.Nc),o.Mc(13,M,1,0,"ng-container",8),o.Sb(14,"div",12),o.Sb(15,"div",13),o.Nb(16,"input",14),o.Sb(17,"label",15),o.Wb(18,16),o.Rb(),o.Rb(),o.Rb(),o.Rb(),o.Rb(),o.Sb(19,"div",17),o.Sb(20,"cd-form-button-panel",18),o.gc("submitActionEvent",(function(){return t.callSubmitAction()})),o.jc(21,"titlecase"),o.Rb(),o.Rb(),o.Rb(),o.Pb(),o.Rb(),o.Mc(22,x,2,4,"ng-template",null,19,o.Nc)),2&e){const e=o.Ac(12),n=o.Ac(23);o.pc("modalRef",t.activeModal),o.yb(3),o.pc("ngTemplateOutlet",n),o.yb(2),o.pc("formGroup",t.deletionForm),o.yb(3),o.pc("ngTemplateOutlet",t.bodyTemplate)("ngTemplateOutletContext",t.bodyContext),o.yb(2),o.pc("ngIf",t.itemNames)("ngIfElse",e),o.yb(3),o.pc("ngTemplateOutlet",t.childFormGroupTemplate)("ngTemplateOutletContext",o.uc(13,k,t.deletionForm)),o.yb(7),o.pc("form",t.deletionForm)("submitText",o.kc(21,11,t.actionDescription)+" "+t.itemDescription)}},directives:[c.a,l.w,i.C,i.r,i.k,u.a,l.r,d.a,h.a,i.b,f.a,i.q,i.i,p.a,m.a,l.q],pipes:[l.A,l.o],styles:[".modal-body[_ngcontent-%COMP%] .question[_ngcontent-%COMP%]{margin-top:1em}.modal-body[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-weight:700}.modal-body[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .form-check[_ngcontent-%COMP%]{padding-top:7px}"]}),e})()},"07d7":function(e,t,n){var i=n("AO7/"),r=n("busE"),s=n("sEFX");i||r(Object.prototype,"toString",s,{unsafe:!0})},"0BK2":function(e,t){e.exports={}},"0Dky":function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},"0EUg":function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("bHdf");function r(){return Object(i.a)(1)}},"0GbY":function(e,t,n){var i=n("Qo9l"),r=n("2oRo"),s=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?s(i[e])||s(r[e]):i[e]&&i[e][t]||r[e]&&r[e][t]}},"0eef":function(e,t,n){"use strict";var i={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,s=r&&!i.call({1:2},1);t.f=s?function(e){var t=r(this,e);return!!t&&t.enumerable}:i},"0mo+":function(e,t,n){!function(e){"use strict";var t={1:"\u0f21",2:"\u0f22",3:"\u0f23",4:"\u0f24",5:"\u0f25",6:"\u0f26",7:"\u0f27",8:"\u0f28",9:"\u0f29",0:"\u0f20"},n={"\u0f21":"1","\u0f22":"2","\u0f23":"3","\u0f24":"4","\u0f25":"5","\u0f26":"6","\u0f27":"7","\u0f28":"8","\u0f29":"9","\u0f20":"0"};e.defineLocale("bo",{months:"\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f44\u0f0b\u0f54\u0f7c_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f66\u0f74\u0f58\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f5e\u0f72\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f63\u0f94\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0fb2\u0f74\u0f42\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f62\u0f92\u0fb1\u0f51\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f42\u0f74\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f45\u0f72\u0f42\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54".split("_"),monthsShort:"\u0f5f\u0fb3\u0f0b1_\u0f5f\u0fb3\u0f0b2_\u0f5f\u0fb3\u0f0b3_\u0f5f\u0fb3\u0f0b4_\u0f5f\u0fb3\u0f0b5_\u0f5f\u0fb3\u0f0b6_\u0f5f\u0fb3\u0f0b7_\u0f5f\u0fb3\u0f0b8_\u0f5f\u0fb3\u0f0b9_\u0f5f\u0fb3\u0f0b10_\u0f5f\u0fb3\u0f0b11_\u0f5f\u0fb3\u0f0b12".split("_"),monthsShortRegex:/^(\u0f5f\u0fb3\u0f0b\d{1,2})/,monthsParseExact:!0,weekdays:"\u0f42\u0f5f\u0f60\u0f0b\u0f49\u0f72\u0f0b\u0f58\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74_\u0f42\u0f5f\u0f60\u0f0b\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b".split("_"),weekdaysShort:"\u0f49\u0f72\u0f0b\u0f58\u0f0b_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b_\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b_\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b_\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74_\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b_\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b".split("_"),weekdaysMin:"\u0f49\u0f72_\u0f5f\u0fb3_\u0f58\u0f72\u0f42_\u0f63\u0fb7\u0f42_\u0f55\u0f74\u0f62_\u0f66\u0f44\u0f66_\u0f66\u0fa4\u0f7a\u0f53".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[\u0f51\u0f72\u0f0b\u0f62\u0f72\u0f44] LT",nextDay:"[\u0f66\u0f44\u0f0b\u0f49\u0f72\u0f53] LT",nextWeek:"[\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f55\u0fb2\u0f42\u0f0b\u0f62\u0f97\u0f7a\u0f66\u0f0b\u0f58], LT",lastDay:"[\u0f41\u0f0b\u0f66\u0f44] LT",lastWeek:"[\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f55\u0fb2\u0f42\u0f0b\u0f58\u0f50\u0f60\u0f0b\u0f58] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0f63\u0f0b",past:"%s \u0f66\u0f94\u0f53\u0f0b\u0f63",s:"\u0f63\u0f58\u0f0b\u0f66\u0f44",ss:"%d \u0f66\u0f90\u0f62\u0f0b\u0f46\u0f0d",m:"\u0f66\u0f90\u0f62\u0f0b\u0f58\u0f0b\u0f42\u0f45\u0f72\u0f42",mm:"%d \u0f66\u0f90\u0f62\u0f0b\u0f58",h:"\u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51\u0f0b\u0f42\u0f45\u0f72\u0f42",hh:"%d \u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51",d:"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f45\u0f72\u0f42",dd:"%d \u0f49\u0f72\u0f53\u0f0b",M:"\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f45\u0f72\u0f42",MM:"%d \u0f5f\u0fb3\u0f0b\u0f56",y:"\u0f63\u0f7c\u0f0b\u0f42\u0f45\u0f72\u0f42",yy:"%d \u0f63\u0f7c"},preparse:function(e){return e.replace(/[\u0f21\u0f22\u0f23\u0f24\u0f25\u0f26\u0f27\u0f28\u0f29\u0f20]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c|\u0f5e\u0f7c\u0f42\u0f66\u0f0b\u0f40\u0f66|\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44|\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42|\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c"===t&&e>=4||"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44"===t&&e<5||"\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42"===t?e+12:e},meridiem:function(e,t,n){return e<4?"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c":e<10?"\u0f5e\u0f7c\u0f42\u0f66\u0f0b\u0f40\u0f66":e<17?"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44":e<20?"\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42":"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c"},week:{dow:0,doy:6}})}(n("wd/R"))},"0rvr":function(e,t,n){var i=n("glrk"),r=n("O741");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(s){}return function(n,s){return i(n),r(s),t?e.call(n,s):n.__proto__=s,n}}():void 0)},"0tRk":function(e,t,n){!function(e){"use strict";e.defineLocale("pt-br",{months:"janeiro_fevereiro_mar\xe7o_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_ter\xe7a-feira_quarta-feira_quinta-feira_sexta-feira_s\xe1bado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_s\xe1b".split("_"),weekdaysMin:"do_2\xaa_3\xaa_4\xaa_5\xaa_6\xaa_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [\xe0s] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [\xe0s] HH:mm"},calendar:{sameDay:"[Hoje \xe0s] LT",nextDay:"[Amanh\xe3 \xe0s] LT",nextWeek:"dddd [\xe0s] LT",lastDay:"[Ontem \xe0s] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[\xdaltimo] dddd [\xe0s] LT":"[\xdaltima] dddd [\xe0s] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"h\xe1 %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um m\xeas",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",invalidDate:"Data inv\xe1lida"})}(n("wd/R"))},"14Sl":function(e,t,n){"use strict";n("rB9j");var i=n("busE"),r=n("kmMV"),s=n("0Dky"),o=n("tiKp"),a=n("kRJp"),c=o("species"),l=RegExp.prototype,u=!s((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),d="$0"==="a".replace(/./,"$0"),h=o("replace"),f=!!/./[h]&&""===/./[h]("a","$0"),p=!s((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,h){var m=o(e),b=!s((function(){var t={};return t[m]=function(){return 7},7!=""[e](t)})),g=b&&!s((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[c]=function(){return n},n.flags="",n[m]=/./[m]),n.exec=function(){return t=!0,null},n[m](""),!t}));if(!b||!g||"replace"===e&&(!u||!d||f)||"split"===e&&!p){var _=/./[m],y=n(m,""[e],(function(e,t,n,i,s){var o=t.exec;return o===r||o===l.exec?b&&!s?{done:!0,value:_.call(t,n,i)}:{done:!0,value:e.call(n,t,i)}:{done:!1}}),{REPLACE_KEEPS_$0:d,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:f}),v=y[1];i(String.prototype,e,y[0]),i(l,m,2==t?function(e,t){return v.call(e,this,t)}:function(e){return v.call(e,this)})}h&&a(l[m],"sham",!0)}},"1E5z":function(e,t,n){var i=n("m/L8").f,r=n("UTVS"),s=n("tiKp")("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,s)&&i(e,s,{configurable:!0,value:t})}},"1G5W":function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("zx2A");function r(e){return t=>t.lift(new s(e))}class s{constructor(e){this.notifier=e}call(e,t){const n=new o(e),r=Object(i.c)(this.notifier,new i.a(n));return r&&!n.seenValue?(n.add(r),t.subscribe(n)):n}}class o extends i.b{constructor(e){super(e),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}},"1Ni5":function(e,t,n){"use strict";n.d(t,"b",(function(){return f})),n.d(t,"a",(function(){return p}));var i=n("s7LF"),r=n("LvDl"),s=n.n(r),o=n("LRne"),a=n("PqYM"),c=n("aGrj"),l=n("lJxs"),u=n("IzEk"),d=n("Fgil"),h=n("aXbf");function f(e){return null==e||0===e.length}class p{static email(e){return f(e.value)?null:i.A.email(e)}static ip(e=0){const t=/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i,n=/^(?:[a-f0-9]{1,4}:){7}[a-f0-9]{1,4}$/i;return i.A.pattern(4===e?t:6===e?n:new RegExp(t.source+"|"+n.source))}static number(e=!0){return i.A.pattern(e?/^-?[0-9]+$/i:/^[0-9]+$/i)}static decimalNumber(e=!0){return i.A.pattern(e?/^-?[0-9]+(.[0-9]+)?$/i:/^[0-9]+(.[0-9]+)?$/i)}static sslCert(){return i.A.pattern(/^-----BEGIN CERTIFICATE-----(\n|\r|\f)((.+)?((\n|\r|\f).+)*)(\n|\r|\f)-----END CERTIFICATE-----[\n\r\f]*$/)}static sslPrivKey(){return i.A.pattern(/^-----BEGIN RSA PRIVATE KEY-----(\n|\r|\f)((.+)?((\n|\r|\f).+)*)(\n|\r|\f)-----END RSA PRIVATE KEY-----[\n\r\f]*$/)}static requiredIf(e,t){let n=!1;return i=>(!n&&i.parent&&(Object.keys(e).forEach(e=>{i.parent.get(e).valueChanges.subscribe(()=>{i.updateValueAndValidity({emitEvent:!1})})}),n=!0),Object.keys(e).every(t=>{if(!i.parent)return!1;const n=i.parent.get(t).value,r=e[t];if(s.a.isObjectLike(r)){let e=!1;switch(r.op){case"empty":e=s.a.isEmpty(n);break;case"!empty":e=!s.a.isEmpty(n);break;case"equal":e=n===r.arg1;break;case"!equal":e=n!==r.arg1;break;case"minLength":s.a.isString(n)&&(e=n.length>=r.arg1)}return e}return n===r})&&(s.a.isFunction(t)?t.call(t,i.value):f(i.value))?{required:!0}:null)}static composeIf(e,t){let n=!1;return r=>(!n&&r.parent&&(Object.keys(e).forEach(e=>{r.parent.get(e).valueChanges.subscribe(()=>{r.updateValueAndValidity({emitEvent:!1})})}),n=!0),Object.keys(e).every(t=>r.parent&&r.parent.get(t).value===e[t])?i.A.compose(t)(r):null)}static custom(e,t){return n=>{const i=t.call(this,n.value);return i?{[e]:i}:null}}static validateIf(e,t,n,r=[],s=[]){n=n.concat(r),e.setValidators(e=>t.call(this)?i.A.compose(n)(e):r.length>0?i.A.compose(r)(e):null),s.forEach(t=>{t.valueChanges.subscribe(()=>{e.updateValueAndValidity({emitEvent:!1})})})}static match(e,t){return n=>{const i=n.get(e),r=n.get(t);if(!i||!r)return null;if(i.value!==r.value)r.setErrors({match:!0});else if(r.hasError("match")){const e=r.errors;s.a.unset(e,"match"),r.setErrors(s.a.isEmpty(s.a.keys(e))?null:e)}return null}}static unique(e,t=null,n,i=!1){let r;return d=>d.pristine||f(d.value)?Object(o.a)(null):(r=d.value,s.a.isFunction(n)&&null!==n()&&""!==n()&&(r=i?`${d.value}$${n()}`:`${n()}$${d.value}`),Object(a.a)().pipe(Object(c.a)(e.call(t,r)),Object(l.a)(e=>e?{notUnique:!0}:null),Object(u.a)(1)))}static uuid(e=!1){const t=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;return n=>n.pristine&&n.untouched?null:e||n.value?t.test(n.value)?null:{invalidUuid:"This is not a valid UUID"}:null}static binaryMin(e){return t=>{const n=new h.a,i=(new h.a).toBytes(t.value);if(e<=i)return null;const r=new d.a(n).transform(e);return{binaryMin:()=>"Size has to be at least " + r + " or more"}}}static binaryMax(e){return t=>{const n=new h.a,i=n.toBytes(t.value);if(e>=i)return null;const r=new d.a(n).transform(e);return{binaryMax:()=>"Size has to be at most " + r + " or less"}}}static passwordPolicy(e,t,n){return i=>{if(i.pristine||""===i.value)return s.a.isFunction(n)&&n(!0,0),Object(o.a)(null);let r;return s.a.isFunction(t)&&(r=t()),Object(a.a)(500).pipe(Object(c.a)(s.a.invoke(e,"validatePassword",i.value,r)),Object(l.a)(e=>(s.a.isFunction(n)&&n(e.valid,e.credits,e.valuation),e.valid?null:{passwordPolicy:!0})),Object(u.a)(1))}}}},"1Y/n":function(e,t,n){var i=n("HAuM"),r=n("ewvW"),s=n("RK3t"),o=n("UMSQ"),a=function(e){return function(t,n,a,c){i(n);var l=r(t),u=s(l),d=o(l.length),h=e?d-1:0,f=e?-1:1;if(a<2)for(;;){if(h in u){c=u[h],h+=f;break}if(h+=f,e?h<0:d<=h)throw TypeError("Reduce of empty array with no initial value")}for(;e?h>=0:d>h;h+=f)h in u&&(c=n(c,u[h],h,l));return c}};e.exports={left:a(!1),right:a(!0)}},"1nQr":function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i=n("LvDl"),r=n.n(i),s=n("lJxs"),o=n("20UP");class a{constructor(e){this.pwdPolicyEnabled=e.pwd_policy_enabled,this.pwdPolicyMinLength=e.pwd_policy_min_length,this.pwdPolicyCheckLengthEnabled=e.pwd_policy_check_length_enabled,this.pwdPolicyCheckOldpwdEnabled=e.pwd_policy_check_oldpwd_enabled,this.pwdPolicyCheckUsernameEnabled=e.pwd_policy_check_username_enabled,this.pwdPolicyCheckExclusionListEnabled=e.pwd_policy_check_exclusion_list_enabled,this.pwdPolicyCheckRepetitiveCharsEnabled=e.pwd_policy_check_repetitive_chars_enabled,this.pwdPolicyCheckSequentialCharsEnabled=e.pwd_policy_check_sequential_chars_enabled,this.pwdPolicyCheckComplexityEnabled=e.pwd_policy_check_complexity_enabled}}var c=n("8Y7J");let l=(()=>{class e{constructor(e){this.settingsService=e}getHelpText(){return this.settingsService.getStandardSettings().pipe(Object(s.a)(e=>{const t=new a(e);let n=[];if(t.pwdPolicyEnabled){n.push("Required rules for passwords:");const e={pwdPolicyCheckLengthEnabled:"Must contain at least " + t.pwdPolicyMinLength + " characters",pwdPolicyCheckOldpwdEnabled:"Must not be the same as the previous one",pwdPolicyCheckUsernameEnabled:"Cannot contain the username",pwdPolicyCheckExclusionListEnabled:"Cannot contain any configured keyword",pwdPolicyCheckRepetitiveCharsEnabled:"Cannot contain any repetitive characters e.g. \"aaa\"",pwdPolicyCheckSequentialCharsEnabled:"Cannot contain any sequential characters e.g. \"abc\"",pwdPolicyCheckComplexityEnabled:"Must consist of characters from the following groups:\n * Alphabetic a-z, A-Z\n * Numbers 0-9\n * Special chars: !\"#$%& '()*+,-./:;<=>?@[\\]^_`{{|}}~\n * Any other characters (signs)"};n=n.concat(r.a.keys(e).filter(e=>r.a.get(t,e)).map(t=>"- "+r.a.get(e,t)))}return n.join("\n")}))}mapCreditsToCssClass(e){let t="very-strong";return e<10?t="too-weak":e<15?t="weak":e<20?t="ok":e<25&&(t="strong"),t}}return e.\u0275fac=function(t){return new(t||e)(c.dc(o.a))},e.\u0275prov=c.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},"1ppg":function(e,t,n){!function(e){"use strict";e.defineLocale("fil",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n("wd/R"))},"1rYy":function(e,t,n){!function(e){"use strict";e.defineLocale("hy-am",{months:{format:"\u0570\u0578\u0582\u0576\u057e\u0561\u0580\u056b_\u0583\u0565\u057f\u0580\u057e\u0561\u0580\u056b_\u0574\u0561\u0580\u057f\u056b_\u0561\u057a\u0580\u056b\u056c\u056b_\u0574\u0561\u0575\u056b\u057d\u056b_\u0570\u0578\u0582\u0576\u056b\u057d\u056b_\u0570\u0578\u0582\u056c\u056b\u057d\u056b_\u0585\u0563\u0578\u057d\u057f\u0578\u057d\u056b_\u057d\u0565\u057a\u057f\u0565\u0574\u0562\u0565\u0580\u056b_\u0570\u0578\u056f\u057f\u0565\u0574\u0562\u0565\u0580\u056b_\u0576\u0578\u0575\u0565\u0574\u0562\u0565\u0580\u056b_\u0564\u0565\u056f\u057f\u0565\u0574\u0562\u0565\u0580\u056b".split("_"),standalone:"\u0570\u0578\u0582\u0576\u057e\u0561\u0580_\u0583\u0565\u057f\u0580\u057e\u0561\u0580_\u0574\u0561\u0580\u057f_\u0561\u057a\u0580\u056b\u056c_\u0574\u0561\u0575\u056b\u057d_\u0570\u0578\u0582\u0576\u056b\u057d_\u0570\u0578\u0582\u056c\u056b\u057d_\u0585\u0563\u0578\u057d\u057f\u0578\u057d_\u057d\u0565\u057a\u057f\u0565\u0574\u0562\u0565\u0580_\u0570\u0578\u056f\u057f\u0565\u0574\u0562\u0565\u0580_\u0576\u0578\u0575\u0565\u0574\u0562\u0565\u0580_\u0564\u0565\u056f\u057f\u0565\u0574\u0562\u0565\u0580".split("_")},monthsShort:"\u0570\u0576\u057e_\u0583\u057f\u0580_\u0574\u0580\u057f_\u0561\u057a\u0580_\u0574\u0575\u057d_\u0570\u0576\u057d_\u0570\u056c\u057d_\u0585\u0563\u057d_\u057d\u057a\u057f_\u0570\u056f\u057f_\u0576\u0574\u0562_\u0564\u056f\u057f".split("_"),weekdays:"\u056f\u056b\u0580\u0561\u056f\u056b_\u0565\u0580\u056f\u0578\u0582\u0577\u0561\u0562\u0569\u056b_\u0565\u0580\u0565\u0584\u0577\u0561\u0562\u0569\u056b_\u0579\u0578\u0580\u0565\u0584\u0577\u0561\u0562\u0569\u056b_\u0570\u056b\u0576\u0563\u0577\u0561\u0562\u0569\u056b_\u0578\u0582\u0580\u0562\u0561\u0569_\u0577\u0561\u0562\u0561\u0569".split("_"),weekdaysShort:"\u056f\u0580\u056f_\u0565\u0580\u056f_\u0565\u0580\u0584_\u0579\u0580\u0584_\u0570\u0576\u0563_\u0578\u0582\u0580\u0562_\u0577\u0562\u0569".split("_"),weekdaysMin:"\u056f\u0580\u056f_\u0565\u0580\u056f_\u0565\u0580\u0584_\u0579\u0580\u0584_\u0570\u0576\u0563_\u0578\u0582\u0580\u0562_\u0577\u0562\u0569".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0569.",LLL:"D MMMM YYYY \u0569., HH:mm",LLLL:"dddd, D MMMM YYYY \u0569., HH:mm"},calendar:{sameDay:"[\u0561\u0575\u057d\u0585\u0580] LT",nextDay:"[\u057e\u0561\u0572\u0568] LT",lastDay:"[\u0565\u0580\u0565\u056f] LT",nextWeek:function(){return"dddd [\u0585\u0580\u0568 \u056a\u0561\u0574\u0568] LT"},lastWeek:function(){return"[\u0561\u0576\u0581\u0561\u056e] dddd [\u0585\u0580\u0568 \u056a\u0561\u0574\u0568] LT"},sameElse:"L"},relativeTime:{future:"%s \u0570\u0565\u057f\u0578",past:"%s \u0561\u057c\u0561\u057b",s:"\u0574\u056b \u0584\u0561\u0576\u056b \u057e\u0561\u0575\u0580\u056f\u0575\u0561\u0576",ss:"%d \u057e\u0561\u0575\u0580\u056f\u0575\u0561\u0576",m:"\u0580\u0578\u057a\u0565",mm:"%d \u0580\u0578\u057a\u0565",h:"\u056a\u0561\u0574",hh:"%d \u056a\u0561\u0574",d:"\u0585\u0580",dd:"%d \u0585\u0580",M:"\u0561\u0574\u056b\u057d",MM:"%d \u0561\u0574\u056b\u057d",y:"\u057f\u0561\u0580\u056b",yy:"%d \u057f\u0561\u0580\u056b"},meridiemParse:/\u0563\u056b\u0577\u0565\u0580\u057e\u0561|\u0561\u057c\u0561\u057e\u0578\u057f\u057e\u0561|\u0581\u0565\u0580\u0565\u056f\u057e\u0561|\u0565\u0580\u0565\u056f\u0578\u0575\u0561\u0576/,isPM:function(e){return/^(\u0581\u0565\u0580\u0565\u056f\u057e\u0561|\u0565\u0580\u0565\u056f\u0578\u0575\u0561\u0576)$/.test(e)},meridiem:function(e){return e<4?"\u0563\u056b\u0577\u0565\u0580\u057e\u0561":e<12?"\u0561\u057c\u0561\u057e\u0578\u057f\u057e\u0561":e<17?"\u0581\u0565\u0580\u0565\u056f\u057e\u0561":"\u0565\u0580\u0565\u056f\u0578\u0575\u0561\u0576"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(\u056b\u0576|\u0580\u0564)/,ordinal:function(e,t){switch(t){case"DDD":case"w":case"W":case"DDDo":return 1===e?e+"-\u056b\u0576":e+"-\u0580\u0564";default:return e}},week:{dow:1,doy:7}})}(n("wd/R"))},"1xZ4":function(e,t,n){!function(e){"use strict";e.defineLocale("ca",{months:{standalone:"gener_febrer_mar\xe7_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de mar\xe7_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._mar\xe7_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[dem\xe0 a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aqu\xed %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|\xe8|a)/,ordinal:function(e,t){var n=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"\xe8";return"w"!==t&&"W"!==t||(n="a"),e+n},week:{dow:1,doy:4}})}(n("wd/R"))},"20UP":function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i=n("LvDl"),r=n.n(i),s=n("lJxs"),o=n("8Y7J"),a=n("IheW");let c=(()=>{class e{constructor(e){this.http=e,this.settings={}}getValues(e){return r.a.isArray(e)&&(e=e.join(",")),this.http.get("api/settings?names="+e).pipe(Object(s.a)(e=>{const t={};return r.a.forEach(e,e=>{r.a.set(t,e.name,e.value)}),t}))}ifSettingConfigured(e,t,n){const i=this.settings[e];void 0===i?this.http.get(e).subscribe(i=>{this.settings[e]=this.getSettingsValue(i),this.ifSettingConfigured(e,t,n)},t=>{401!==t.status&&(this.settings[e]="")}):""!==i?t(i):n&&n()}disableSetting(e){this.settings[e]=""}getSettingsValue(e){return e.value||e.instance||""}validateGrafanaDashboardUrl(e){return this.http.get("api/grafana/validation/"+e)}getStandardSettings(){return this.http.get("ui-api/standard_settings")}}return e.\u0275fac=function(t){return new(t||e)(o.dc(a.b))},e.\u0275prov=o.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},"23KU":function(e,t,n){"use strict";var i=n("uE2L"),r=n("YHEm"),s=Object.prototype.hasOwnProperty;t.a=function(e,t,n){var o=e[t];s.call(e,t)&&Object(r.a)(o,n)&&(void 0!==n||t in e)||Object(i.a)(e,t,n)}},"25cm":function(e,t,n){"use strict";var i=n("tPH9"),r=n("/1FC");t.a=function(e,t,n){var s=t(e);return Object(r.a)(e)?s:Object(i.a)(s,n(e))}},"2EZI":function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("s7LF"),r=n("QFaf"),s=n("8Y7J");let o=(()=>{class e extends i.g{group(e,t=null){const n=super.group(e,t);return new r.a(n.controls,n.validator,n.asyncValidator)}}return e.\u0275fac=function(t){return a(t||e)},e.\u0275prov=s.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();const a=s.Ub(o)},"2QA8":function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const i=(()=>"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random())()},"2Vo4":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("XNiG"),r=n("9ppp");class s extends i.a{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){const t=super._subscribe(e);return t&&!t.closed&&e.next(this._value),t}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new r.a;return this._value}next(e){super.next(this._value=e)}}},"2fFW":function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));let i=!1;const r={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){if(e){const e=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+e.stack)}else i&&console.log("RxJS: Back to a better error behavior. Thank you. <3");i=e},get useDeprecatedSynchronousErrorHandling(){return i}}},"2fjn":function(e,t,n){!function(e){"use strict";e.defineLocale("fr-ca",{months:"janvier_f\xe9vrier_mars_avril_mai_juin_juillet_ao\xfbt_septembre_octobre_novembre_d\xe9cembre".split("_"),monthsShort:"janv._f\xe9vr._mars_avr._mai_juin_juil._ao\xfbt_sept._oct._nov._d\xe9c.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd\u2019hui \xe0] LT",nextDay:"[Demain \xe0] LT",nextWeek:"dddd [\xe0] LT",lastDay:"[Hier \xe0] LT",lastWeek:"dddd [dernier \xe0] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}}})}(n("wd/R"))},"2oRo":function(e,t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof global&&global)||function(){return this}()||Function("return this")()},"2ykv":function(e,t,n){!function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),i=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],r=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,i){return e?/-MMM-/.test(i)?n[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"\xe9\xe9n minuut",mm:"%d minuten",h:"\xe9\xe9n uur",hh:"%d uur",d:"\xe9\xe9n dag",dd:"%d dagen",M:"\xe9\xe9n maand",MM:"%d maanden",y:"\xe9\xe9n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n("wd/R"))},"3/ER":function(e,t,n){"use strict";(function(e){var i=n("Ju5/"),r="object"==typeof exports&&exports&&!exports.nodeType&&exports,s=r&&"object"==typeof e&&e&&!e.nodeType&&e,o=s&&s.exports===r?i.a.Buffer:void 0,a=o?o.allocUnsafe:void 0;t.a=function(e,t){if(t)return e.slice();var n=e.length,i=a?a(n):new e.constructor(n);return e.copy(i),i}}).call(this,n("3UD+")(e))},"33Wh":function(e,t,n){var i=n("yoRg"),r=n("eDl+");e.exports=Object.keys||function(e){return i(e,r)}},"3E0/":function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("D0XW"),r=n("7o/Q"),s=n("WMd4");function o(e,t=i.a){var n;const r=(n=e)instanceof Date&&!isNaN(+n)?+e-t.now():Math.abs(e);return e=>e.lift(new a(r,t))}class a{constructor(e,t){this.delay=e,this.scheduler=t}call(e,t){return t.subscribe(new c(e,this.delay,this.scheduler))}}class c extends r.a{constructor(e,t,n){super(e),this.delay=t,this.scheduler=n,this.queue=[],this.active=!1,this.errored=!1}static dispatch(e){const t=e.source,n=t.queue,i=e.scheduler,r=e.destination;for(;n.length>0&&n[0].time-i.now()<=0;)n.shift().notification.observe(r);if(n.length>0){const t=Math.max(0,n[0].time-i.now());this.schedule(e,t)}else this.unsubscribe(),t.active=!1}_schedule(e){this.active=!0,this.destination.add(e.schedule(c.dispatch,this.delay,{source:this,destination:this.destination,scheduler:e}))}scheduleNotification(e){if(!0===this.errored)return;const t=this.scheduler,n=new l(t.now()+this.delay,e);this.queue.push(n),!1===this.active&&this._schedule(t)}_next(e){this.scheduleNotification(s.a.createNext(e))}_error(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()}_complete(){this.scheduleNotification(s.a.createComplete()),this.unsubscribe()}}class l{constructor(e,t){this.time=e,this.notification=t}}},"3E1r":function(e,t,n){!function(e){"use strict";var t={1:"\u0967",2:"\u0968",3:"\u0969",4:"\u096a",5:"\u096b",6:"\u096c",7:"\u096d",8:"\u096e",9:"\u096f",0:"\u0966"},n={"\u0967":"1","\u0968":"2","\u0969":"3","\u096a":"4","\u096b":"5","\u096c":"6","\u096d":"7","\u096e":"8","\u096f":"9","\u0966":"0"},i=[/^\u091c\u0928/i,/^\u092b\u093c\u0930|\u092b\u0930/i,/^\u092e\u093e\u0930\u094d\u091a/i,/^\u0905\u092a\u094d\u0930\u0948/i,/^\u092e\u0908/i,/^\u091c\u0942\u0928/i,/^\u091c\u0941\u0932/i,/^\u0905\u0917/i,/^\u0938\u093f\u0924\u0902|\u0938\u093f\u0924/i,/^\u0905\u0915\u094d\u091f\u0942/i,/^\u0928\u0935|\u0928\u0935\u0902/i,/^\u0926\u093f\u0938\u0902|\u0926\u093f\u0938/i];e.defineLocale("hi",{months:{format:"\u091c\u0928\u0935\u0930\u0940_\u092b\u093c\u0930\u0935\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u0948\u0932_\u092e\u0908_\u091c\u0942\u0928_\u091c\u0941\u0932\u093e\u0908_\u0905\u0917\u0938\u094d\u0924_\u0938\u093f\u0924\u092e\u094d\u092c\u0930_\u0905\u0915\u094d\u091f\u0942\u092c\u0930_\u0928\u0935\u092e\u094d\u092c\u0930_\u0926\u093f\u0938\u092e\u094d\u092c\u0930".split("_"),standalone:"\u091c\u0928\u0935\u0930\u0940_\u092b\u0930\u0935\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u0948\u0932_\u092e\u0908_\u091c\u0942\u0928_\u091c\u0941\u0932\u093e\u0908_\u0905\u0917\u0938\u094d\u0924_\u0938\u093f\u0924\u0902\u092c\u0930_\u0905\u0915\u094d\u091f\u0942\u092c\u0930_\u0928\u0935\u0902\u092c\u0930_\u0926\u093f\u0938\u0902\u092c\u0930".split("_")},monthsShort:"\u091c\u0928._\u092b\u093c\u0930._\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u0948._\u092e\u0908_\u091c\u0942\u0928_\u091c\u0941\u0932._\u0905\u0917._\u0938\u093f\u0924._\u0905\u0915\u094d\u091f\u0942._\u0928\u0935._\u0926\u093f\u0938.".split("_"),weekdays:"\u0930\u0935\u093f\u0935\u093e\u0930_\u0938\u094b\u092e\u0935\u093e\u0930_\u092e\u0902\u0917\u0932\u0935\u093e\u0930_\u092c\u0941\u0927\u0935\u093e\u0930_\u0917\u0941\u0930\u0942\u0935\u093e\u0930_\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930_\u0936\u0928\u093f\u0935\u093e\u0930".split("_"),weekdaysShort:"\u0930\u0935\u093f_\u0938\u094b\u092e_\u092e\u0902\u0917\u0932_\u092c\u0941\u0927_\u0917\u0941\u0930\u0942_\u0936\u0941\u0915\u094d\u0930_\u0936\u0928\u093f".split("_"),weekdaysMin:"\u0930_\u0938\u094b_\u092e\u0902_\u092c\u0941_\u0917\u0941_\u0936\u0941_\u0936".split("_"),longDateFormat:{LT:"A h:mm \u092c\u091c\u0947",LTS:"A h:mm:ss \u092c\u091c\u0947",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u092c\u091c\u0947",LLLL:"dddd, D MMMM YYYY, A h:mm \u092c\u091c\u0947"},monthsParse:i,longMonthsParse:i,shortMonthsParse:[/^\u091c\u0928/i,/^\u092b\u093c\u0930/i,/^\u092e\u093e\u0930\u094d\u091a/i,/^\u0905\u092a\u094d\u0930\u0948/i,/^\u092e\u0908/i,/^\u091c\u0942\u0928/i,/^\u091c\u0941\u0932/i,/^\u0905\u0917/i,/^\u0938\u093f\u0924/i,/^\u0905\u0915\u094d\u091f\u0942/i,/^\u0928\u0935/i,/^\u0926\u093f\u0938/i],monthsRegex:/^(\u091c\u0928\u0935\u0930\u0940|\u091c\u0928\.?|\u092b\u093c\u0930\u0935\u0930\u0940|\u092b\u0930\u0935\u0930\u0940|\u092b\u093c\u0930\.?|\u092e\u093e\u0930\u094d\u091a?|\u0905\u092a\u094d\u0930\u0948\u0932|\u0905\u092a\u094d\u0930\u0948\.?|\u092e\u0908?|\u091c\u0942\u0928?|\u091c\u0941\u0932\u093e\u0908|\u091c\u0941\u0932\.?|\u0905\u0917\u0938\u094d\u0924|\u0905\u0917\.?|\u0938\u093f\u0924\u092e\u094d\u092c\u0930|\u0938\u093f\u0924\u0902\u092c\u0930|\u0938\u093f\u0924\.?|\u0905\u0915\u094d\u091f\u0942\u092c\u0930|\u0905\u0915\u094d\u091f\u0942\.?|\u0928\u0935\u092e\u094d\u092c\u0930|\u0928\u0935\u0902\u092c\u0930|\u0928\u0935\.?|\u0926\u093f\u0938\u092e\u094d\u092c\u0930|\u0926\u093f\u0938\u0902\u092c\u0930|\u0926\u093f\u0938\.?)/i,monthsShortRegex:/^(\u091c\u0928\u0935\u0930\u0940|\u091c\u0928\.?|\u092b\u093c\u0930\u0935\u0930\u0940|\u092b\u0930\u0935\u0930\u0940|\u092b\u093c\u0930\.?|\u092e\u093e\u0930\u094d\u091a?|\u0905\u092a\u094d\u0930\u0948\u0932|\u0905\u092a\u094d\u0930\u0948\.?|\u092e\u0908?|\u091c\u0942\u0928?|\u091c\u0941\u0932\u093e\u0908|\u091c\u0941\u0932\.?|\u0905\u0917\u0938\u094d\u0924|\u0905\u0917\.?|\u0938\u093f\u0924\u092e\u094d\u092c\u0930|\u0938\u093f\u0924\u0902\u092c\u0930|\u0938\u093f\u0924\.?|\u0905\u0915\u094d\u091f\u0942\u092c\u0930|\u0905\u0915\u094d\u091f\u0942\.?|\u0928\u0935\u092e\u094d\u092c\u0930|\u0928\u0935\u0902\u092c\u0930|\u0928\u0935\.?|\u0926\u093f\u0938\u092e\u094d\u092c\u0930|\u0926\u093f\u0938\u0902\u092c\u0930|\u0926\u093f\u0938\.?)/i,monthsStrictRegex:/^(\u091c\u0928\u0935\u0930\u0940?|\u092b\u093c\u0930\u0935\u0930\u0940|\u092b\u0930\u0935\u0930\u0940?|\u092e\u093e\u0930\u094d\u091a?|\u0905\u092a\u094d\u0930\u0948\u0932?|\u092e\u0908?|\u091c\u0942\u0928?|\u091c\u0941\u0932\u093e\u0908?|\u0905\u0917\u0938\u094d\u0924?|\u0938\u093f\u0924\u092e\u094d\u092c\u0930|\u0938\u093f\u0924\u0902\u092c\u0930|\u0938\u093f\u0924?\.?|\u0905\u0915\u094d\u091f\u0942\u092c\u0930|\u0905\u0915\u094d\u091f\u0942\.?|\u0928\u0935\u092e\u094d\u092c\u0930|\u0928\u0935\u0902\u092c\u0930?|\u0926\u093f\u0938\u092e\u094d\u092c\u0930|\u0926\u093f\u0938\u0902\u092c\u0930?)/i,monthsShortStrictRegex:/^(\u091c\u0928\.?|\u092b\u093c\u0930\.?|\u092e\u093e\u0930\u094d\u091a?|\u0905\u092a\u094d\u0930\u0948\.?|\u092e\u0908?|\u091c\u0942\u0928?|\u091c\u0941\u0932\.?|\u0905\u0917\.?|\u0938\u093f\u0924\.?|\u0905\u0915\u094d\u091f\u0942\.?|\u0928\u0935\.?|\u0926\u093f\u0938\.?)/i,calendar:{sameDay:"[\u0906\u091c] LT",nextDay:"[\u0915\u0932] LT",nextWeek:"dddd, LT",lastDay:"[\u0915\u0932] LT",lastWeek:"[\u092a\u093f\u091b\u0932\u0947] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u092e\u0947\u0902",past:"%s \u092a\u0939\u0932\u0947",s:"\u0915\u0941\u091b \u0939\u0940 \u0915\u094d\u0937\u0923",ss:"%d \u0938\u0947\u0915\u0902\u0921",m:"\u090f\u0915 \u092e\u093f\u0928\u091f",mm:"%d \u092e\u093f\u0928\u091f",h:"\u090f\u0915 \u0918\u0902\u091f\u093e",hh:"%d \u0918\u0902\u091f\u0947",d:"\u090f\u0915 \u0926\u093f\u0928",dd:"%d \u0926\u093f\u0928",M:"\u090f\u0915 \u092e\u0939\u0940\u0928\u0947",MM:"%d \u092e\u0939\u0940\u0928\u0947",y:"\u090f\u0915 \u0935\u0930\u094d\u0937",yy:"%d \u0935\u0930\u094d\u0937"},preparse:function(e){return e.replace(/[\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f\u0966]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/\u0930\u093e\u0924|\u0938\u0941\u092c\u0939|\u0926\u094b\u092a\u0939\u0930|\u0936\u093e\u092e/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u0930\u093e\u0924"===t?e<4?e:e+12:"\u0938\u0941\u092c\u0939"===t?e:"\u0926\u094b\u092a\u0939\u0930"===t?e>=10?e:e+12:"\u0936\u093e\u092e"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"\u0930\u093e\u0924":e<10?"\u0938\u0941\u092c\u0939":e<17?"\u0926\u094b\u092a\u0939\u0930":e<20?"\u0936\u093e\u092e":"\u0930\u093e\u0924"},week:{dow:0,doy:6}})}(n("wd/R"))},"3N8a":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("quSY");class r extends i.a{constructor(e,t){super()}schedule(e,t=0){return this}}class s extends r{constructor(e,t){super(e,t),this.scheduler=e,this.work=t,this.pending=!1}schedule(e,t=0){if(this.closed)return this;this.state=e;const n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(i,this.id,t),this}requestAsyncId(e,t,n=0){return setInterval(e.flush.bind(e,this),n)}recycleAsyncId(e,t,n=0){if(null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)}execute(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,t){let n=!1,i=void 0;try{this.work(e)}catch(r){n=!0,i=!!r&&r||new Error(r)}if(n)return this.unsubscribe(),i}_unsubscribe(){const e=this.id,t=this.scheduler,n=t.actions,i=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&n.splice(i,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null}}},"3UD+":function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},"3bBZ":function(e,t,n){var i=n("2oRo"),r=n("/byt"),s=n("4mDm"),o=n("kRJp"),a=n("tiKp"),c=a("iterator"),l=a("toStringTag"),u=s.values;for(var d in r){var h=i[d],f=h&&h.prototype;if(f){if(f[c]!==u)try{o(f,c,u)}catch(m){f[c]=u}if(f[l]||o(f,l,d),r[d])for(var p in s)if(f[p]!==s[p])try{o(f,p,s[p])}catch(m){f[p]=s[p]}}}},"3cmB":function(e,t,n){"use strict";var i=n("Y7yP"),r=n("Ju5/"),s=Object(i.a)(r.a,"Map");t.a=s},"4/q3":function(e,t,n){"use strict";var i=n("7gMY"),r=n("IzLi"),s=n("pyRK"),o=Object.prototype.hasOwnProperty,a=n("5WsY");t.a=function(e){return Object(a.a)(e)?Object(i.a)(e,!0):function(e){if(!Object(r.a)(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=Object(s.a)(e),n=[];for(var i in e)("constructor"!=i||!t&&o.call(e,i))&&n.push(i);return n}(e)}},"4DD9":function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("8Y7J");let r=(()=>{class e{transform(e){let t=!1;switch(e){case!0:case 1:case"y":case"yes":case"t":case"true":case"on":case"1":t=!0}return t}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"boolean",type:e,pure:!0}),e})()},"4I5i":function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const i=(()=>{function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e})()},"4MV3":function(e,t,n){!function(e){"use strict";var t={1:"\u0ae7",2:"\u0ae8",3:"\u0ae9",4:"\u0aea",5:"\u0aeb",6:"\u0aec",7:"\u0aed",8:"\u0aee",9:"\u0aef",0:"\u0ae6"},n={"\u0ae7":"1","\u0ae8":"2","\u0ae9":"3","\u0aea":"4","\u0aeb":"5","\u0aec":"6","\u0aed":"7","\u0aee":"8","\u0aef":"9","\u0ae6":"0"};e.defineLocale("gu",{months:"\u0a9c\u0abe\u0aa8\u0acd\u0aaf\u0ac1\u0a86\u0ab0\u0ac0_\u0aab\u0ac7\u0aac\u0acd\u0ab0\u0ac1\u0a86\u0ab0\u0ac0_\u0aae\u0abe\u0ab0\u0acd\u0a9a_\u0a8f\u0aaa\u0acd\u0ab0\u0abf\u0ab2_\u0aae\u0ac7_\u0a9c\u0ac2\u0aa8_\u0a9c\u0ac1\u0ab2\u0abe\u0a88_\u0a91\u0a97\u0ab8\u0acd\u0a9f_\u0ab8\u0aaa\u0acd\u0a9f\u0ac7\u0aae\u0acd\u0aac\u0ab0_\u0a91\u0a95\u0acd\u0a9f\u0acd\u0aac\u0ab0_\u0aa8\u0ab5\u0ac7\u0aae\u0acd\u0aac\u0ab0_\u0aa1\u0abf\u0ab8\u0ac7\u0aae\u0acd\u0aac\u0ab0".split("_"),monthsShort:"\u0a9c\u0abe\u0aa8\u0acd\u0aaf\u0ac1._\u0aab\u0ac7\u0aac\u0acd\u0ab0\u0ac1._\u0aae\u0abe\u0ab0\u0acd\u0a9a_\u0a8f\u0aaa\u0acd\u0ab0\u0abf._\u0aae\u0ac7_\u0a9c\u0ac2\u0aa8_\u0a9c\u0ac1\u0ab2\u0abe._\u0a91\u0a97._\u0ab8\u0aaa\u0acd\u0a9f\u0ac7._\u0a91\u0a95\u0acd\u0a9f\u0acd._\u0aa8\u0ab5\u0ac7._\u0aa1\u0abf\u0ab8\u0ac7.".split("_"),monthsParseExact:!0,weekdays:"\u0ab0\u0ab5\u0abf\u0ab5\u0abe\u0ab0_\u0ab8\u0acb\u0aae\u0ab5\u0abe\u0ab0_\u0aae\u0a82\u0a97\u0ab3\u0ab5\u0abe\u0ab0_\u0aac\u0ac1\u0aa7\u0acd\u0ab5\u0abe\u0ab0_\u0a97\u0ac1\u0ab0\u0ac1\u0ab5\u0abe\u0ab0_\u0ab6\u0ac1\u0a95\u0acd\u0ab0\u0ab5\u0abe\u0ab0_\u0ab6\u0aa8\u0abf\u0ab5\u0abe\u0ab0".split("_"),weekdaysShort:"\u0ab0\u0ab5\u0abf_\u0ab8\u0acb\u0aae_\u0aae\u0a82\u0a97\u0ab3_\u0aac\u0ac1\u0aa7\u0acd_\u0a97\u0ac1\u0ab0\u0ac1_\u0ab6\u0ac1\u0a95\u0acd\u0ab0_\u0ab6\u0aa8\u0abf".split("_"),weekdaysMin:"\u0ab0_\u0ab8\u0acb_\u0aae\u0a82_\u0aac\u0ac1_\u0a97\u0ac1_\u0ab6\u0ac1_\u0ab6".split("_"),longDateFormat:{LT:"A h:mm \u0ab5\u0abe\u0a97\u0acd\u0aaf\u0ac7",LTS:"A h:mm:ss \u0ab5\u0abe\u0a97\u0acd\u0aaf\u0ac7",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u0ab5\u0abe\u0a97\u0acd\u0aaf\u0ac7",LLLL:"dddd, D MMMM YYYY, A h:mm \u0ab5\u0abe\u0a97\u0acd\u0aaf\u0ac7"},calendar:{sameDay:"[\u0a86\u0a9c] LT",nextDay:"[\u0a95\u0abe\u0ab2\u0ac7] LT",nextWeek:"dddd, LT",lastDay:"[\u0a97\u0a87\u0a95\u0abe\u0ab2\u0ac7] LT",lastWeek:"[\u0aaa\u0abe\u0a9b\u0ab2\u0abe] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0aae\u0abe",past:"%s \u0aaa\u0ab9\u0ac7\u0ab2\u0abe",s:"\u0a85\u0aae\u0ac1\u0a95 \u0aaa\u0ab3\u0acb",ss:"%d \u0ab8\u0ac7\u0a95\u0a82\u0aa1",m:"\u0a8f\u0a95 \u0aae\u0abf\u0aa8\u0abf\u0a9f",mm:"%d \u0aae\u0abf\u0aa8\u0abf\u0a9f",h:"\u0a8f\u0a95 \u0a95\u0ab2\u0abe\u0a95",hh:"%d \u0a95\u0ab2\u0abe\u0a95",d:"\u0a8f\u0a95 \u0aa6\u0abf\u0ab5\u0ab8",dd:"%d \u0aa6\u0abf\u0ab5\u0ab8",M:"\u0a8f\u0a95 \u0aae\u0ab9\u0abf\u0aa8\u0acb",MM:"%d \u0aae\u0ab9\u0abf\u0aa8\u0acb",y:"\u0a8f\u0a95 \u0ab5\u0ab0\u0acd\u0ab7",yy:"%d \u0ab5\u0ab0\u0acd\u0ab7"},preparse:function(e){return e.replace(/[\u0ae7\u0ae8\u0ae9\u0aea\u0aeb\u0aec\u0aed\u0aee\u0aef\u0ae6]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/\u0ab0\u0abe\u0aa4|\u0aac\u0aaa\u0acb\u0ab0|\u0ab8\u0ab5\u0abe\u0ab0|\u0ab8\u0abe\u0a82\u0a9c/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u0ab0\u0abe\u0aa4"===t?e<4?e:e+12:"\u0ab8\u0ab5\u0abe\u0ab0"===t?e:"\u0aac\u0aaa\u0acb\u0ab0"===t?e>=10?e:e+12:"\u0ab8\u0abe\u0a82\u0a9c"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"\u0ab0\u0abe\u0aa4":e<10?"\u0ab8\u0ab5\u0abe\u0ab0":e<17?"\u0aac\u0aaa\u0acb\u0ab0":e<20?"\u0ab8\u0abe\u0a82\u0a9c":"\u0ab0\u0abe\u0aa4"},week:{dow:0,doy:6}})}(n("wd/R"))},"4WOD":function(e,t,n){var i=n("UTVS"),r=n("ewvW"),s=n("93I0"),o=n("4Xet"),a=s("IE_PROTO"),c=Object.prototype;e.exports=o?Object.getPrototypeOf:function(e){return e=r(e),i(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?c:null}},"4Xet":function(e,t,n){var i=n("0Dky");e.exports=!i((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},"4dOw":function(e,t,n){!function(e){"use strict";e.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n("wd/R"))},"4l63":function(e,t,n){var i=n("I+eb"),r=n("wg0c");i({global:!0,forced:parseInt!=r},{parseInt:r})},"4mDm":function(e,t,n){"use strict";var i=n("/GqU"),r=n("RNIs"),s=n("P4y1"),o=n("afO8"),a=n("fdAy"),c="Array Iterator",l=o.set,u=o.getterFor(c);e.exports=a(Array,"Array",(function(e,t){l(this,{type:c,target:i(e),index:0,kind:t})}),(function(){var e=u(this),t=e.target,n=e.kind,i=e.index++;return!t||i>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:i,done:!1}:"values"==n?{value:t[i],done:!1}:{value:[i,t[i]],done:!1}}),"values"),s.Arguments=s.Array,r("keys"),r("values"),r("entries")},"4syw":function(e,t,n){var i=n("busE");e.exports=function(e,t,n){for(var r in t)i(e,r,t[r],n);return e}},"5+tZ":function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("lJxs"),r=n("Cfvw"),s=n("zx2A");function o(e,t,n=Number.POSITIVE_INFINITY){return"function"==typeof t?s=>s.pipe(o((n,s)=>Object(r.a)(e(n,s)).pipe(Object(i.a)((e,i)=>t(n,e,s,i))),n)):("number"==typeof t&&(n=t),t=>t.lift(new a(e,n)))}class a{constructor(e,t=Number.POSITIVE_INFINITY){this.project=e,this.concurrent=t}call(e,t){return t.subscribe(new c(e,this.project,this.concurrent))}}class c extends s.b{constructor(e,t,n=Number.POSITIVE_INFINITY){super(e),this.project=t,this.concurrent=n,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)}_tryNext(e){let t;const n=this.index++;try{t=this.project(e,n)}catch(i){return void this.destination.error(i)}this.active++,this._innerSub(t)}_innerSub(e){const t=new s.a(this),n=this.destination;n.add(t);const i=Object(s.c)(e,t);i!==t&&n.add(i)}_complete(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()}notifyNext(e){this.destination.next(e)}notifyComplete(){const e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}},"5WsY":function(e,t,n){"use strict";var i=n("vJtL"),r=n("Js68");t.a=function(e){return null!=e&&Object(r.a)(e.length)&&!Object(i.a)(e)}},"5yfJ":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("HDdC"),r=n("KqfI");const s=new i.a(r.a)},"6+QB":function(e,t,n){!function(e){"use strict";e.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(n("wd/R"))},"6+kj":function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var i=n("8Y7J"),r=n("sne2"),s=n("JK/P"),o=n("sb0X"),a=n("SVse"),c=n("Z21x");function l(e,t){if(1&e){const e=i.Tb();i.Sb(0,"cd-submit-button",2),i.gc("submitAction",(function(){return i.Dc(e),i.ic().submitAction()})),i.Oc(1),i.Rb()}if(2&e){const e=i.ic();i.pc("disabled",e.disabled)("form",e.form),i.yb(1),i.Pc(e.submitText)}}let u=(()=>{class e{constructor(e,t,n){this.location=e,this.actionLabels=t,this.modalService=n,this.submitActionEvent=new i.o,this.backActionEvent=new i.o,this.showSubmit=!0,this.wrappingClass="",this.btnClass="",this.submitText=this.actionLabels.CREATE,this.cancelText=this.actionLabels.CANCEL,this.disabled=!1}submitAction(){this.submitActionEvent.emit()}backAction(){0===this.backActionEvent.observers.length?this.modalService.hasOpenModals()?this.modalService.dismissAll():this.location.back():this.backActionEvent.emit()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(a.m),i.Mb(r.b),i.Mb(s.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-form-button-panel"]],viewQuery:function(e,t){var n;1&e&&i.Tc(o.a,!0),2&e&&i.zc(n=i.hc())&&(t.submitButton=n.first)},inputs:{form:"form",showSubmit:"showSubmit",wrappingClass:"wrappingClass",btnClass:"btnClass",submitText:"submitText",cancelText:"cancelText",disabled:"disabled"},outputs:{submitActionEvent:"submitActionEvent",backActionEvent:"backActionEvent"},decls:3,vars:4,consts:[[1,"m-2",3,"name","backAction"],["data-cy","submitBtn",3,"disabled","form","submitAction",4,"ngIf"],["data-cy","submitBtn",3,"disabled","form","submitAction"]],template:function(e,t){1&e&&(i.Sb(0,"div"),i.Sb(1,"cd-back-button",0),i.gc("backAction",(function(){return t.backAction()})),i.Rb(),i.Mc(2,l,2,3,"cd-submit-button",1),i.Rb()),2&e&&(i.Ab(t.wrappingClass),i.yb(1),i.pc("name",t.cancelText),i.yb(1),i.pc("ngIf",t.showSubmit))},directives:[c.a,a.r,o.a],styles:[""]}),e})()},"6B0Y":function(e,t,n){!function(e){"use strict";var t={1:"\u17e1",2:"\u17e2",3:"\u17e3",4:"\u17e4",5:"\u17e5",6:"\u17e6",7:"\u17e7",8:"\u17e8",9:"\u17e9",0:"\u17e0"},n={"\u17e1":"1","\u17e2":"2","\u17e3":"3","\u17e4":"4","\u17e5":"5","\u17e6":"6","\u17e7":"7","\u17e8":"8","\u17e9":"9","\u17e0":"0"};e.defineLocale("km",{months:"\u1798\u1780\u179a\u17b6_\u1780\u17bb\u1798\u17d2\u1797\u17c8_\u1798\u17b8\u1793\u17b6_\u1798\u17c1\u179f\u17b6_\u17a7\u179f\u1797\u17b6_\u1798\u17b7\u1790\u17bb\u1793\u17b6_\u1780\u1780\u17d2\u1780\u178a\u17b6_\u179f\u17b8\u17a0\u17b6_\u1780\u1789\u17d2\u1789\u17b6_\u178f\u17bb\u179b\u17b6_\u179c\u17b7\u1785\u17d2\u1786\u17b7\u1780\u17b6_\u1792\u17d2\u1793\u17bc".split("_"),monthsShort:"\u1798\u1780\u179a\u17b6_\u1780\u17bb\u1798\u17d2\u1797\u17c8_\u1798\u17b8\u1793\u17b6_\u1798\u17c1\u179f\u17b6_\u17a7\u179f\u1797\u17b6_\u1798\u17b7\u1790\u17bb\u1793\u17b6_\u1780\u1780\u17d2\u1780\u178a\u17b6_\u179f\u17b8\u17a0\u17b6_\u1780\u1789\u17d2\u1789\u17b6_\u178f\u17bb\u179b\u17b6_\u179c\u17b7\u1785\u17d2\u1786\u17b7\u1780\u17b6_\u1792\u17d2\u1793\u17bc".split("_"),weekdays:"\u17a2\u17b6\u1791\u17b7\u178f\u17d2\u1799_\u1785\u17d0\u1793\u17d2\u1791_\u17a2\u1784\u17d2\u1782\u17b6\u179a_\u1796\u17bb\u1792_\u1796\u17d2\u179a\u17a0\u179f\u17d2\u1794\u178f\u17b7\u17cd_\u179f\u17bb\u1780\u17d2\u179a_\u179f\u17c5\u179a\u17cd".split("_"),weekdaysShort:"\u17a2\u17b6_\u1785_\u17a2_\u1796_\u1796\u17d2\u179a_\u179f\u17bb_\u179f".split("_"),weekdaysMin:"\u17a2\u17b6_\u1785_\u17a2_\u1796_\u1796\u17d2\u179a_\u179f\u17bb_\u179f".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/\u1796\u17d2\u179a\u17b9\u1780|\u179b\u17d2\u1784\u17b6\u1785/,isPM:function(e){return"\u179b\u17d2\u1784\u17b6\u1785"===e},meridiem:function(e,t,n){return e<12?"\u1796\u17d2\u179a\u17b9\u1780":"\u179b\u17d2\u1784\u17b6\u1785"},calendar:{sameDay:"[\u1790\u17d2\u1784\u17c3\u1793\u17c1\u17c7 \u1798\u17c9\u17c4\u1784] LT",nextDay:"[\u179f\u17d2\u17a2\u17c2\u1780 \u1798\u17c9\u17c4\u1784] LT",nextWeek:"dddd [\u1798\u17c9\u17c4\u1784] LT",lastDay:"[\u1798\u17d2\u179f\u17b7\u179b\u1798\u17b7\u1789 \u1798\u17c9\u17c4\u1784] LT",lastWeek:"dddd [\u179f\u1794\u17d2\u178f\u17b6\u17a0\u17cd\u1798\u17bb\u1793] [\u1798\u17c9\u17c4\u1784] LT",sameElse:"L"},relativeTime:{future:"%s\u1791\u17c0\u178f",past:"%s\u1798\u17bb\u1793",s:"\u1794\u17c9\u17bb\u1793\u17d2\u1798\u17b6\u1793\u179c\u17b7\u1793\u17b6\u1791\u17b8",ss:"%d \u179c\u17b7\u1793\u17b6\u1791\u17b8",m:"\u1798\u17bd\u1799\u1793\u17b6\u1791\u17b8",mm:"%d \u1793\u17b6\u1791\u17b8",h:"\u1798\u17bd\u1799\u1798\u17c9\u17c4\u1784",hh:"%d \u1798\u17c9\u17c4\u1784",d:"\u1798\u17bd\u1799\u1790\u17d2\u1784\u17c3",dd:"%d \u1790\u17d2\u1784\u17c3",M:"\u1798\u17bd\u1799\u1781\u17c2",MM:"%d \u1781\u17c2",y:"\u1798\u17bd\u1799\u1786\u17d2\u1793\u17b6\u17c6",yy:"%d \u1786\u17d2\u1793\u17b6\u17c6"},dayOfMonthOrdinalParse:/\u1791\u17b8\d{1,2}/,ordinal:"\u1791\u17b8%d",preparse:function(e){return e.replace(/[\u17e1\u17e2\u17e3\u17e4\u17e5\u17e6\u17e7\u17e8\u17e9\u17e0]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}})}(n("wd/R"))},"6JNq":function(e,t,n){var i=n("UTVS"),r=n("Vu81"),s=n("Bs8V"),o=n("m/L8");e.exports=function(e,t){for(var n=r(t),a=o.f,c=s.f,l=0;l<n.length;l++){var u=n[l];i(e,u)||a(e,u,c(t,u))}}},"6LWA":function(e,t,n){var i=n("xrYK");e.exports=Array.isArray||function(e){return"Array"==i(e)}},"6VoE":function(e,t,n){var i=n("tiKp"),r=n("P4y1"),s=i("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[s]===e)}},"6qls":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("tz6c"),r=n("8Y7J");let s=(()=>{class e{constructor(e){this.docService=e,this.docText="documentation"}ngOnInit(){this.noSubscribe?this.docUrl=this.docService.urlGenerator(this.section):this.docService.subscribeOnce(this.section,e=>{this.docUrl=e})}}return e.\u0275fac=function(t){return new(t||e)(r.Mb(i.a))},e.\u0275cmp=r.Gb({type:e,selectors:[["cd-doc"]],inputs:{section:"section",docText:"docText",noSubscribe:"noSubscribe"},decls:2,vars:2,consts:[["target","_blank",3,"href"]],template:function(e,t){1&e&&(r.Sb(0,"a",0),r.Oc(1),r.Rb()),2&e&&(r.qc("href",t.docUrl,r.Gc),r.yb(1),r.Pc(t.docText))},styles:[""]}),e})()},"7BjC":function(e,t,n){!function(e){"use strict";function t(e,t,n,i){var r={s:["m\xf5ne sekundi","m\xf5ni sekund","paar sekundit"],ss:[e+"sekundi",e+"sekundit"],m:["\xfche minuti","\xfcks minut"],mm:[e+" minuti",e+" minutit"],h:["\xfche tunni","tund aega","\xfcks tund"],hh:[e+" tunni",e+" tundi"],d:["\xfche p\xe4eva","\xfcks p\xe4ev"],M:["kuu aja","kuu aega","\xfcks kuu"],MM:[e+" kuu",e+" kuud"],y:["\xfche aasta","aasta","\xfcks aasta"],yy:[e+" aasta",e+" aastat"]};return t?r[n][2]?r[n][2]:r[n][1]:i?r[n][0]:r[n][1]}e.defineLocale("et",{months:"jaanuar_veebruar_m\xe4rts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_m\xe4rts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"p\xfchap\xe4ev_esmasp\xe4ev_teisip\xe4ev_kolmap\xe4ev_neljap\xe4ev_reede_laup\xe4ev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[T\xe4na,] LT",nextDay:"[Homme,] LT",nextWeek:"[J\xe4rgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s p\xe4rast",past:"%s tagasi",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:"%d p\xe4eva",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},"7C5Q":function(e,t,n){!function(e){"use strict";e.defineLocale("en-in",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:0,doy:6}})}(n("wd/R"))},"7aV9":function(e,t,n){!function(e){"use strict";e.defineLocale("si",{months:"\u0da2\u0db1\u0dc0\u0dcf\u0dbb\u0dd2_\u0db4\u0dd9\u0db6\u0dbb\u0dc0\u0dcf\u0dbb\u0dd2_\u0db8\u0dcf\u0dbb\u0dca\u0dad\u0dd4_\u0d85\u0db4\u0dca\u200d\u0dbb\u0dda\u0dbd\u0dca_\u0db8\u0dd0\u0dba\u0dd2_\u0da2\u0dd6\u0db1\u0dd2_\u0da2\u0dd6\u0dbd\u0dd2_\u0d85\u0d9c\u0ddd\u0dc3\u0dca\u0dad\u0dd4_\u0dc3\u0dd0\u0db4\u0dca\u0dad\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca_\u0d94\u0d9a\u0dca\u0dad\u0ddd\u0db6\u0dbb\u0dca_\u0db1\u0ddc\u0dc0\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca_\u0daf\u0dd9\u0dc3\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca".split("_"),monthsShort:"\u0da2\u0db1_\u0db4\u0dd9\u0db6_\u0db8\u0dcf\u0dbb\u0dca_\u0d85\u0db4\u0dca_\u0db8\u0dd0\u0dba\u0dd2_\u0da2\u0dd6\u0db1\u0dd2_\u0da2\u0dd6\u0dbd\u0dd2_\u0d85\u0d9c\u0ddd_\u0dc3\u0dd0\u0db4\u0dca_\u0d94\u0d9a\u0dca_\u0db1\u0ddc\u0dc0\u0dd0_\u0daf\u0dd9\u0dc3\u0dd0".split("_"),weekdays:"\u0d89\u0dbb\u0dd2\u0daf\u0dcf_\u0dc3\u0db3\u0dd4\u0daf\u0dcf_\u0d85\u0d9f\u0dc4\u0dbb\u0dd4\u0dc0\u0dcf\u0daf\u0dcf_\u0db6\u0daf\u0dcf\u0daf\u0dcf_\u0db6\u0dca\u200d\u0dbb\u0dc4\u0dc3\u0dca\u0db4\u0dad\u0dd2\u0db1\u0dca\u0daf\u0dcf_\u0dc3\u0dd2\u0d9a\u0dd4\u0dbb\u0dcf\u0daf\u0dcf_\u0dc3\u0dd9\u0db1\u0dc3\u0dd4\u0dbb\u0dcf\u0daf\u0dcf".split("_"),weekdaysShort:"\u0d89\u0dbb\u0dd2_\u0dc3\u0db3\u0dd4_\u0d85\u0d9f_\u0db6\u0daf\u0dcf_\u0db6\u0dca\u200d\u0dbb\u0dc4_\u0dc3\u0dd2\u0d9a\u0dd4_\u0dc3\u0dd9\u0db1".split("_"),weekdaysMin:"\u0d89_\u0dc3_\u0d85_\u0db6_\u0db6\u0dca\u200d\u0dbb_\u0dc3\u0dd2_\u0dc3\u0dd9".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [\u0dc0\u0dd0\u0db1\u0dd2] dddd, a h:mm:ss"},calendar:{sameDay:"[\u0d85\u0daf] LT[\u0da7]",nextDay:"[\u0dc4\u0dd9\u0da7] LT[\u0da7]",nextWeek:"dddd LT[\u0da7]",lastDay:"[\u0d8a\u0dba\u0dda] LT[\u0da7]",lastWeek:"[\u0db4\u0dc3\u0dd4\u0d9c\u0dd2\u0dba] dddd LT[\u0da7]",sameElse:"L"},relativeTime:{future:"%s\u0d9a\u0dd2\u0db1\u0dca",past:"%s\u0d9a\u0da7 \u0db4\u0dd9\u0dbb",s:"\u0dad\u0dad\u0dca\u0db4\u0dbb \u0d9a\u0dd2\u0dc4\u0dd2\u0db4\u0dba",ss:"\u0dad\u0dad\u0dca\u0db4\u0dbb %d",m:"\u0db8\u0dd2\u0db1\u0dd2\u0dad\u0dca\u0dad\u0dd4\u0dc0",mm:"\u0db8\u0dd2\u0db1\u0dd2\u0dad\u0dca\u0dad\u0dd4 %d",h:"\u0db4\u0dd0\u0dba",hh:"\u0db4\u0dd0\u0dba %d",d:"\u0daf\u0dd2\u0db1\u0dba",dd:"\u0daf\u0dd2\u0db1 %d",M:"\u0db8\u0dcf\u0dc3\u0dba",MM:"\u0db8\u0dcf\u0dc3 %d",y:"\u0dc0\u0dc3\u0dbb",yy:"\u0dc0\u0dc3\u0dbb %d"},dayOfMonthOrdinalParse:/\d{1,2} \u0dc0\u0dd0\u0db1\u0dd2/,ordinal:function(e){return e+" \u0dc0\u0dd0\u0db1\u0dd2"},meridiemParse:/\u0db4\u0dd9\u0dbb \u0dc0\u0dbb\u0dd4|\u0db4\u0dc3\u0dca \u0dc0\u0dbb\u0dd4|\u0db4\u0dd9.\u0dc0|\u0db4.\u0dc0./,isPM:function(e){return"\u0db4.\u0dc0."===e||"\u0db4\u0dc3\u0dca \u0dc0\u0dbb\u0dd4"===e},meridiem:function(e,t,n){return e>11?n?"\u0db4.\u0dc0.":"\u0db4\u0dc3\u0dca \u0dc0\u0dbb\u0dd4":n?"\u0db4\u0dd9.\u0dc0.":"\u0db4\u0dd9\u0dbb \u0dc0\u0dbb\u0dd4"}})}(n("wd/R"))},"7gMY":function(e,t,n){"use strict";var i=n("9f76"),r=n("/1FC"),s=n("WOAq"),o=n("cSlR"),a=n("oYcn"),c=Object.prototype.hasOwnProperty;t.a=function(e,t){var n=Object(r.a)(e),l=!n&&Object(i.a)(e),u=!n&&!l&&Object(s.a)(e),d=!n&&!l&&!u&&Object(a.a)(e),h=n||l||u||d,f=h?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],p=f.length;for(var m in e)!t&&!c.call(e,m)||h&&("length"==m||u&&("offset"==m||"parent"==m)||d&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||Object(o.a)(m,p))||f.push(m);return f}},"7o/Q":function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i=n("n6bG"),r=n("gRHU"),s=n("quSY"),o=n("2QA8"),a=n("2fFW"),c=n("NJ4a");class l extends s.a{constructor(e,t,n){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=r.a;break;case 1:if(!e){this.destination=r.a;break}if("object"==typeof e){e instanceof l?(this.syncErrorThrowable=e.syncErrorThrowable,this.destination=e,e.add(this)):(this.syncErrorThrowable=!0,this.destination=new u(this,e));break}default:this.syncErrorThrowable=!0,this.destination=new u(this,e,t,n)}}[o.a](){return this}static create(e,t,n){const i=new l(e,t,n);return i.syncErrorThrowable=!1,i}next(e){this.isStopped||this._next(e)}error(e){this.isStopped||(this.isStopped=!0,this._error(e))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(e){this.destination.next(e)}_error(e){this.destination.error(e),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:e}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this}}class u extends l{constructor(e,t,n,s){let o;super(),this._parentSubscriber=e;let a=this;Object(i.a)(t)?o=t:t&&(o=t.next,n=t.error,s=t.complete,t!==r.a&&(a=Object.create(t),Object(i.a)(a.unsubscribe)&&this.add(a.unsubscribe.bind(a)),a.unsubscribe=this.unsubscribe.bind(this))),this._context=a,this._next=o,this._error=n,this._complete=s}next(e){if(!this.isStopped&&this._next){const{_parentSubscriber:t}=this;a.a.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}}error(e){if(!this.isStopped){const{_parentSubscriber:t}=this,{useDeprecatedSynchronousErrorHandling:n}=a.a;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):Object(c.a)(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;Object(c.a)(e)}}}complete(){if(!this.isStopped){const{_parentSubscriber:e}=this;if(this._complete){const t=()=>this._complete.call(this._context);a.a.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,t),this.unsubscribe()):(this.__tryOrUnsub(t),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(e,t){try{e.call(this._context,t)}catch(n){if(this.unsubscribe(),a.a.useDeprecatedSynchronousErrorHandling)throw n;Object(c.a)(n)}}__tryOrSetError(e,t,n){if(!a.a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(i){return a.a.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=i,e.syncErrorThrown=!0,!0):(Object(c.a)(i),!0)}return!1}_unsubscribe(){const{_parentSubscriber:e}=this;this._context=null,this._parentSubscriber=null,e.unsubscribe()}}},"8/+R":function(e,t,n){!function(e){"use strict";var t={1:"\u0a67",2:"\u0a68",3:"\u0a69",4:"\u0a6a",5:"\u0a6b",6:"\u0a6c",7:"\u0a6d",8:"\u0a6e",9:"\u0a6f",0:"\u0a66"},n={"\u0a67":"1","\u0a68":"2","\u0a69":"3","\u0a6a":"4","\u0a6b":"5","\u0a6c":"6","\u0a6d":"7","\u0a6e":"8","\u0a6f":"9","\u0a66":"0"};e.defineLocale("pa-in",{months:"\u0a1c\u0a28\u0a35\u0a30\u0a40_\u0a2b\u0a3c\u0a30\u0a35\u0a30\u0a40_\u0a2e\u0a3e\u0a30\u0a1a_\u0a05\u0a2a\u0a4d\u0a30\u0a48\u0a32_\u0a2e\u0a08_\u0a1c\u0a42\u0a28_\u0a1c\u0a41\u0a32\u0a3e\u0a08_\u0a05\u0a17\u0a38\u0a24_\u0a38\u0a24\u0a70\u0a2c\u0a30_\u0a05\u0a15\u0a24\u0a42\u0a2c\u0a30_\u0a28\u0a35\u0a70\u0a2c\u0a30_\u0a26\u0a38\u0a70\u0a2c\u0a30".split("_"),monthsShort:"\u0a1c\u0a28\u0a35\u0a30\u0a40_\u0a2b\u0a3c\u0a30\u0a35\u0a30\u0a40_\u0a2e\u0a3e\u0a30\u0a1a_\u0a05\u0a2a\u0a4d\u0a30\u0a48\u0a32_\u0a2e\u0a08_\u0a1c\u0a42\u0a28_\u0a1c\u0a41\u0a32\u0a3e\u0a08_\u0a05\u0a17\u0a38\u0a24_\u0a38\u0a24\u0a70\u0a2c\u0a30_\u0a05\u0a15\u0a24\u0a42\u0a2c\u0a30_\u0a28\u0a35\u0a70\u0a2c\u0a30_\u0a26\u0a38\u0a70\u0a2c\u0a30".split("_"),weekdays:"\u0a10\u0a24\u0a35\u0a3e\u0a30_\u0a38\u0a4b\u0a2e\u0a35\u0a3e\u0a30_\u0a2e\u0a70\u0a17\u0a32\u0a35\u0a3e\u0a30_\u0a2c\u0a41\u0a27\u0a35\u0a3e\u0a30_\u0a35\u0a40\u0a30\u0a35\u0a3e\u0a30_\u0a38\u0a3c\u0a41\u0a71\u0a15\u0a30\u0a35\u0a3e\u0a30_\u0a38\u0a3c\u0a28\u0a40\u0a1a\u0a30\u0a35\u0a3e\u0a30".split("_"),weekdaysShort:"\u0a10\u0a24_\u0a38\u0a4b\u0a2e_\u0a2e\u0a70\u0a17\u0a32_\u0a2c\u0a41\u0a27_\u0a35\u0a40\u0a30_\u0a38\u0a3c\u0a41\u0a15\u0a30_\u0a38\u0a3c\u0a28\u0a40".split("_"),weekdaysMin:"\u0a10\u0a24_\u0a38\u0a4b\u0a2e_\u0a2e\u0a70\u0a17\u0a32_\u0a2c\u0a41\u0a27_\u0a35\u0a40\u0a30_\u0a38\u0a3c\u0a41\u0a15\u0a30_\u0a38\u0a3c\u0a28\u0a40".split("_"),longDateFormat:{LT:"A h:mm \u0a35\u0a1c\u0a47",LTS:"A h:mm:ss \u0a35\u0a1c\u0a47",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u0a35\u0a1c\u0a47",LLLL:"dddd, D MMMM YYYY, A h:mm \u0a35\u0a1c\u0a47"},calendar:{sameDay:"[\u0a05\u0a1c] LT",nextDay:"[\u0a15\u0a32] LT",nextWeek:"[\u0a05\u0a17\u0a32\u0a3e] dddd, LT",lastDay:"[\u0a15\u0a32] LT",lastWeek:"[\u0a2a\u0a3f\u0a1b\u0a32\u0a47] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0a35\u0a3f\u0a71\u0a1a",past:"%s \u0a2a\u0a3f\u0a1b\u0a32\u0a47",s:"\u0a15\u0a41\u0a1d \u0a38\u0a15\u0a3f\u0a70\u0a1f",ss:"%d \u0a38\u0a15\u0a3f\u0a70\u0a1f",m:"\u0a07\u0a15 \u0a2e\u0a3f\u0a70\u0a1f",mm:"%d \u0a2e\u0a3f\u0a70\u0a1f",h:"\u0a07\u0a71\u0a15 \u0a18\u0a70\u0a1f\u0a3e",hh:"%d \u0a18\u0a70\u0a1f\u0a47",d:"\u0a07\u0a71\u0a15 \u0a26\u0a3f\u0a28",dd:"%d \u0a26\u0a3f\u0a28",M:"\u0a07\u0a71\u0a15 \u0a2e\u0a39\u0a40\u0a28\u0a3e",MM:"%d \u0a2e\u0a39\u0a40\u0a28\u0a47",y:"\u0a07\u0a71\u0a15 \u0a38\u0a3e\u0a32",yy:"%d \u0a38\u0a3e\u0a32"},preparse:function(e){return e.replace(/[\u0a67\u0a68\u0a69\u0a6a\u0a6b\u0a6c\u0a6d\u0a6e\u0a6f\u0a66]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/\u0a30\u0a3e\u0a24|\u0a38\u0a35\u0a47\u0a30|\u0a26\u0a41\u0a2a\u0a39\u0a3f\u0a30|\u0a38\u0a3c\u0a3e\u0a2e/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u0a30\u0a3e\u0a24"===t?e<4?e:e+12:"\u0a38\u0a35\u0a47\u0a30"===t?e:"\u0a26\u0a41\u0a2a\u0a39\u0a3f\u0a30"===t?e>=10?e:e+12:"\u0a38\u0a3c\u0a3e\u0a2e"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"\u0a30\u0a3e\u0a24":e<10?"\u0a38\u0a35\u0a47\u0a30":e<17?"\u0a26\u0a41\u0a2a\u0a39\u0a3f\u0a30":e<20?"\u0a38\u0a3c\u0a3e\u0a2e":"\u0a30\u0a3e\u0a24"},week:{dow:0,doy:6}})}(n("wd/R"))},"85J/":function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("8Y7J");let r=(()=>{class e{transform(e){const t=/ceph version\s+([^ ]+)\s+\(.+\)/.exec(e);return t?t[1]:e}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"cephShortVersion",type:e,pure:!0}),e})()},"8M4i":function(e,t,n){"use strict";var i=n("ylTp"),r=Object.prototype,s=r.hasOwnProperty,o=r.toString,a=i.a?i.a.toStringTag:void 0,c=Object.prototype.toString,l=i.a?i.a.toStringTag:void 0;t.a=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":l&&l in Object(e)?function(e){var t=s.call(e,a),n=e[a];try{e[a]=void 0;var i=!0}catch(c){}var r=o.call(e);return i&&(t?e[a]=n:delete e[a]),r}(e):function(e){return c.call(e)}(e)}},"8Y7J":function(e,t,n){"use strict";n.d(t,"a",(function(){return Is})),n.d(t,"b",(function(){return eu})),n.d(t,"c",(function(){return Jl})),n.d(t,"d",(function(){return ql})),n.d(t,"e",(function(){return Gl})),n.d(t,"f",(function(){return Vu})),n.d(t,"g",(function(){return Iu})),n.d(t,"h",(function(){return bs})),n.d(t,"i",(function(){return du})),n.d(t,"j",(function(){return _a})),n.d(t,"k",(function(){return ma})),n.d(t,"l",(function(){return iu})),n.d(t,"m",(function(){return ya})),n.d(t,"n",(function(){return En})),n.d(t,"o",(function(){return Ml})),n.d(t,"p",(function(){return q})),n.d(t,"q",(function(){return d})),n.d(t,"r",(function(){return U})),n.d(t,"s",(function(){return As})),n.d(t,"t",(function(){return Fa})),n.d(t,"u",(function(){return Ya})),n.d(t,"v",(function(){return nu})),n.d(t,"w",(function(){return ce})),n.d(t,"x",(function(){return ju})),n.d(t,"y",(function(){return ae})),n.d(t,"z",(function(){return Ou})),n.d(t,"A",(function(){return pu})),n.d(t,"B",(function(){return h})),n.d(t,"C",(function(){return Xl})),n.d(t,"D",(function(){return Zl})),n.d(t,"E",(function(){return Ma})),n.d(t,"F",(function(){return wa})),n.d(t,"G",(function(){return Sa})),n.d(t,"H",(function(){return ka})),n.d(t,"I",(function(){return Si})),n.d(t,"J",(function(){return p})),n.d(t,"K",(function(){return Yu})),n.d(t,"L",(function(){return Wa})),n.d(t,"M",(function(){return Su})),n.d(t,"N",(function(){return _s})),n.d(t,"O",(function(){return Da})),n.d(t,"P",(function(){return Ba})),n.d(t,"Q",(function(){return _e})),n.d(t,"R",(function(){return Lu})),n.d(t,"S",(function(){return Qn})),n.d(t,"T",(function(){return R})),n.d(t,"U",(function(){return Jn})),n.d(t,"V",(function(){return Hu})),n.d(t,"W",(function(){return ku})),n.d(t,"X",(function(){return tu})),n.d(t,"Y",(function(){return ys})),n.d(t,"Z",(function(){return ac})),n.d(t,"ab",(function(){return vi})),n.d(t,"bb",(function(){return ni})),n.d(t,"cb",(function(){return zn})),n.d(t,"db",(function(){return Hn})),n.d(t,"eb",(function(){return Un})),n.d(t,"fb",(function(){return Vn})),n.d(t,"gb",(function(){return Wn})),n.d(t,"hb",(function(){return Bn})),n.d(t,"ib",(function(){return ic})),n.d(t,"jb",(function(){return $u})),n.d(t,"kb",(function(){return rc})),n.d(t,"lb",(function(){return sc})),n.d(t,"mb",(function(){return $n})),n.d(t,"nb",(function(){return F})),n.d(t,"ob",(function(){return Bs})),n.d(t,"pb",(function(){return go})),n.d(t,"qb",(function(){return bo})),n.d(t,"rb",(function(){return nc})),n.d(t,"sb",(function(){return Qe})),n.d(t,"tb",(function(){return C})),n.d(t,"ub",(function(){return Yn})),n.d(t,"vb",(function(){return Ns})),n.d(t,"wb",(function(){return Ve})),n.d(t,"xb",(function(){return pa})),n.d(t,"yb",(function(){return Bi})),n.d(t,"zb",(function(){return Xs})),n.d(t,"Ab",(function(){return Yo})),n.d(t,"Bb",(function(){return na})),n.d(t,"Cb",(function(){return ia})),n.d(t,"Db",(function(){return ra})),n.d(t,"Eb",(function(){return Fo})),n.d(t,"Fb",(function(){return Fl})),n.d(t,"Gb",(function(){return Se})),n.d(t,"Hb",(function(){return Oe})),n.d(t,"Ib",(function(){return _})),n.d(t,"Jb",(function(){return y})),n.d(t,"Kb",(function(){return De})),n.d(t,"Lb",(function(){return Le})),n.d(t,"Mb",(function(){return ro})),n.d(t,"Nb",(function(){return uo})),n.d(t,"Ob",(function(){return po})),n.d(t,"Pb",(function(){return fo})),n.d(t,"Qb",(function(){return ho})),n.d(t,"Rb",(function(){return lo})),n.d(t,"Sb",(function(){return co})),n.d(t,"Tb",(function(){return mo})),n.d(t,"Ub",(function(){return Cn})),n.d(t,"Vb",(function(){return sa})),n.d(t,"Wb",(function(){return Xc})),n.d(t,"Xb",(function(){return nl})),n.d(t,"Yb",(function(){return el})),n.d(t,"Zb",(function(){return Zc})),n.d(t,"ac",(function(){return tl})),n.d(t,"bc",(function(){return il})),n.d(t,"cc",(function(){return Kc})),n.d(t,"dc",(function(){return ie})),n.d(t,"ec",(function(){return so})),n.d(t,"fc",(function(){return Ul})),n.d(t,"gc",(function(){return _o})),n.d(t,"hc",(function(){return $l})),n.d(t,"ic",(function(){return wo})),n.d(t,"jc",(function(){return gl})),n.d(t,"kc",(function(){return _l})),n.d(t,"lc",(function(){return yl})),n.d(t,"mc",(function(){return vl})),n.d(t,"nc",(function(){return Do})),n.d(t,"oc",(function(){return Mo})),n.d(t,"pc",(function(){return oo})),n.d(t,"qc",(function(){return To})),n.d(t,"rc",(function(){return Co})),n.d(t,"sc",(function(){return Oo})),n.d(t,"tc",(function(){return al})),n.d(t,"uc",(function(){return cl})),n.d(t,"vc",(function(){return ll})),n.d(t,"wc",(function(){return ul})),n.d(t,"xc",(function(){return dl})),n.d(t,"yc",(function(){return hl})),n.d(t,"zc",(function(){return Il})),n.d(t,"Ac",(function(){return io})),n.d(t,"Bc",(function(){return ln})),n.d(t,"Cc",(function(){return cn})),n.d(t,"Dc",(function(){return bt})),n.d(t,"Ec",(function(){return Mi})),n.d(t,"Fc",(function(){return ki})),n.d(t,"Gc",(function(){return xi})),n.d(t,"Hc",(function(){return Te})),n.d(t,"Ic",(function(){return Yl})),n.d(t,"Jc",(function(){return Pl})),n.d(t,"Kc",(function(){return No})),n.d(t,"Lc",(function(){return oa})),n.d(t,"Mc",(function(){return no})),n.d(t,"Nc",(function(){return Bl})),n.d(t,"Oc",(function(){return Ko})),n.d(t,"Pc",(function(){return Zo})),n.d(t,"Qc",(function(){return Xo})),n.d(t,"Rc",(function(){return ea})),n.d(t,"Sc",(function(){return ta})),n.d(t,"Tc",(function(){return jl}));var i=n("XNiG"),r=n("quSY"),s=n("HDdC"),o=n("VRyK"),a=n("w1tV");function c(e){return{toString:e}.toString()}const l="__parameters__";function u(e,t,n){return c(()=>{const i=function(e){return function(...t){if(e){const n=e(...t);for(const e in n)this[e]=n[e]}}}(t);function r(...e){if(this instanceof r)return i.apply(this,e),this;const t=new r(...e);return n.annotation=t,n;function n(e,n,i){const r=e.hasOwnProperty(l)?e[l]:Object.defineProperty(e,l,{value:[]})[l];for(;r.length<=i;)r.push(null);return(r[i]=r[i]||[]).push(t),e}}return n&&(r.prototype=Object.create(n.prototype)),r.prototype.ngMetadataName=e,r.annotationCls=r,r})}const d=u("Inject",e=>({token:e})),h=u("Optional"),f=u("Self"),p=u("SkipSelf");var m=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}({});function b(e){for(let t in e)if(e[t]===b)return t;throw Error("Could not find renamed property on target object.")}function g(e,t){for(const n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function _(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function y(e){return{factory:e.factory,providers:e.providers||[],imports:e.imports||[]}}function v(e){return w(e,e[M])||w(e,e[D])}function w(e,t){return t&&t.token===e?t:null}function S(e){return e&&(e.hasOwnProperty(x)||e.hasOwnProperty(T))?e[x]:null}const M=b({"\u0275prov":b}),x=b({"\u0275inj":b}),k=b({"\u0275provFallback":b}),D=b({ngInjectableDef:b}),T=b({ngInjectorDef:b});function C(e){if("string"==typeof e)return e;if(Array.isArray(e))return"["+e.map(C).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return""+e.overriddenName;if(e.name)return""+e.name;const t=e.toString();if(null==t)return""+t;const n=t.indexOf("\n");return-1===n?t:t.substring(0,n)}function O(e,t){return null==e||""===e?null===t?"":t:null==t||""===t?e:e+" "+t}const L=b({__forward_ref__:b});function R(e){return e.__forward_ref__=R,e.toString=function(){return C(this())},e}function E(e){return A(e)?e():e}function A(e){return"function"==typeof e&&e.hasOwnProperty(L)&&e.__forward_ref__===R}const I="undefined"!=typeof globalThis&&globalThis,P="undefined"!=typeof window&&window,j="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,N="undefined"!=typeof global&&global,F=I||N||P||j,Y=b({"\u0275cmp":b}),z=b({"\u0275dir":b}),$=b({"\u0275pipe":b}),H=b({"\u0275mod":b}),W=b({"\u0275loc":b}),V=b({"\u0275fac":b}),B=b({__NG_ELEMENT_ID__:b});class U{constructor(e,t){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof t?this.__NG_ELEMENT_ID__=t:void 0!==t&&(this.\u0275prov=_({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}toString(){return"InjectionToken "+this._desc}}const q=new U("INJECTOR",-1),G={},J=/\n/gm,Q="__source",K=b({provide:String,useValue:b});let Z,X=void 0;function ee(e){const t=X;return X=e,t}function te(e){const t=Z;return Z=e,t}function ne(e,t=m.Default){if(void 0===X)throw new Error("inject() must be called from an injection context");return null===X?re(e,void 0,t):X.get(e,t&m.Optional?null:void 0,t)}function ie(e,t=m.Default){return(Z||ne)(E(e),t)}function re(e,t,n){const i=v(e);if(i&&"root"==i.providedIn)return void 0===i.value?i.value=i.factory():i.value;if(n&m.Optional)return null;if(void 0!==t)return t;throw new Error(`Injector: NOT_FOUND [${C(e)}]`)}function se(e){const t=[];for(let n=0;n<e.length;n++){const i=E(e[n]);if(Array.isArray(i)){if(0===i.length)throw new Error("Arguments array must have arguments.");let e=void 0,n=m.Default;for(let t=0;t<i.length;t++){const r=i[t];r instanceof h||"Optional"===r.ngMetadataName||r===h?n|=m.Optional:r instanceof p||"SkipSelf"===r.ngMetadataName||r===p?n|=m.SkipSelf:r instanceof f||"Self"===r.ngMetadataName||r===f?n|=m.Self:e=r instanceof d||r===d?r.token:r}t.push(ie(e,n))}else t.push(ie(i))}return t}class oe{get(e,t=G){if(t===G){const t=new Error(`NullInjectorError: No provider for ${C(e)}!`);throw t.name="NullInjectorError",t}return t}}class ae{}class ce{}function le(e,t){for(let n=0;n<e.length;n++)t.push(e[n])}function ue(e,t){e.forEach(e=>Array.isArray(e)?ue(e,t):t(e))}function de(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function he(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function fe(e,t){const n=[];for(let i=0;i<e;i++)n.push(t);return n}function pe(e,t,n){let i=be(e,t);return i>=0?e[1|i]=n:(i=~i,function(e,t,n,i){let r=e.length;if(r==t)e.push(n,i);else if(1===r)e.push(i,e[0]),e[0]=n;else{for(r--,e.push(e[r-1],e[r]);r>t;)e[r]=e[r-2],r--;e[t]=n,e[t+1]=i}}(e,i,t,n)),i}function me(e,t){const n=be(e,t);if(n>=0)return e[1|n]}function be(e,t){return function(e,t,n){let i=0,r=e.length>>1;for(;r!==i;){const n=i+(r-i>>1),s=e[n<<1];if(t===s)return n<<1;s>t?r=n:i=n+1}return~(r<<1)}(e,t)}var ge=function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e}({}),_e=function(e){return e[e.Emulated=0]="Emulated",e[e.Native=1]="Native",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",e}({});const ye={},ve=[];let we=0;function Se(e){return c(()=>{const t={},n={type:e.type,providersResolver:null,decls:e.decls,vars:e.vars,factory:null,template:e.template||null,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputs:null,outputs:null,exportAs:e.exportAs||null,onPush:e.changeDetection===ge.OnPush,directiveDefs:null,pipeDefs:null,selectors:e.selectors||ve,viewQuery:e.viewQuery||null,features:e.features||null,data:e.data||{},encapsulation:e.encapsulation||_e.Emulated,id:"c",styles:e.styles||ve,_:null,setInput:null,schemas:e.schemas||null,tView:null},i=e.directives,r=e.features,s=e.pipes;return n.id+=we++,n.inputs=Ce(e.inputs,t),n.outputs=Ce(e.outputs),r&&r.forEach(e=>e(n)),n.directiveDefs=i?()=>("function"==typeof i?i():i).map(Me):null,n.pipeDefs=s?()=>("function"==typeof s?s():s).map(xe):null,n})}function Me(e){return Re(e)||function(e){return e[z]||null}(e)}function xe(e){return function(e){return e[$]||null}(e)}const ke={};function De(e){const t={type:e.type,bootstrap:e.bootstrap||ve,declarations:e.declarations||ve,imports:e.imports||ve,exports:e.exports||ve,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null};return null!=e.id&&c(()=>{ke[e.id]=e.type}),t}function Te(e,t){return c(()=>{const n=Ae(e,!0);n.declarations=t.declarations||ve,n.imports=t.imports||ve,n.exports=t.exports||ve})}function Ce(e,t){if(null==e)return ye;const n={};for(const i in e)if(e.hasOwnProperty(i)){let r=e[i],s=r;Array.isArray(r)&&(s=r[1],r=r[0]),n[r]=i,t&&(t[r]=s)}return n}const Oe=Se;function Le(e){return{type:e.type,name:e.name,factory:null,pure:!1!==e.pure,onDestroy:e.type.prototype.ngOnDestroy||null}}function Re(e){return e[Y]||null}function Ee(e,t){return e.hasOwnProperty(V)?e[V]:null}function Ae(e,t){const n=e[H]||null;if(!n&&!0===t)throw new Error(`Type ${C(e)} does not have '\u0275mod' property.`);return n}const Ie=20,Pe=10;function je(e){return Array.isArray(e)&&"object"==typeof e[1]}function Ne(e){return Array.isArray(e)&&!0===e[1]}function Fe(e){return 0!=(8&e.flags)}function Ye(e){return 2==(2&e.flags)}function ze(e){return 1==(1&e.flags)}function $e(e){return null!==e.template}function He(e){return 0!=(512&e[2])}class We{constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}}function Ve(){return Be}function Be(e){return e.type.prototype.ngOnChanges&&(e.setInput=qe),Ue}function Ue(){const e=Ge(this),t=null==e?void 0:e.current;if(t){const n=e.previous;if(n===ye)e.previous=t;else for(let e in t)n[e]=t[e];e.current=null,this.ngOnChanges(t)}}function qe(e,t,n,i){const r=Ge(e)||function(e,t){return e.__ngSimpleChanges__=t}(e,{previous:ye,current:null}),s=r.current||(r.current={}),o=r.previous,a=this.declaredInputs[n],c=o[a];s[a]=new We(c&&c.currentValue,t,o===ye),e[i]=t}function Ge(e){return e.__ngSimpleChanges__||null}Ve.ngInherit=!0;let Je=void 0;function Qe(e){Je=e}function Ke(){return void 0!==Je?Je:"undefined"!=typeof document?document:void 0}function Ze(e){return!!e.listen}const Xe={createRenderer:(e,t)=>Ke()};function et(e){for(;Array.isArray(e);)e=e[0];return e}function tt(e,t){return et(t[e+Ie])}function nt(e,t){return et(t[e.index])}function it(e,t){return e.data[t+Ie]}function rt(e,t){return e[t+Ie]}function st(e,t){const n=t[e];return je(n)?n:n[0]}function ot(e){const t=function(e){return e.__ngContext__||null}(e);return t?Array.isArray(t)?t:t.lView:null}function at(e){return 4==(4&e[2])}function ct(e){return 128==(128&e[2])}function lt(e,t){return null===e||null==t?null:e[t]}function ut(e){e[18]=0}function dt(e,t){e[5]+=t;let n=e,i=e[3];for(;null!==i&&(1===t&&1===n[5]||-1===t&&0===n[5]);)i[5]+=t,n=i,i=i[3]}const ht={lFrame:Pt(null),bindingsEnabled:!0,checkNoChangesMode:!1};function ft(){return ht.bindingsEnabled}function pt(){return ht.lFrame.lView}function mt(){return ht.lFrame.tView}function bt(e){ht.lFrame.contextLView=e}function gt(){return ht.lFrame.currentTNode}function _t(e,t){ht.lFrame.currentTNode=e,ht.lFrame.isParent=t}function yt(){return ht.lFrame.isParent}function vt(){ht.lFrame.isParent=!1}function wt(){return ht.checkNoChangesMode}function St(e){ht.checkNoChangesMode=e}function Mt(){const e=ht.lFrame;let t=e.bindingRootIndex;return-1===t&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function xt(){return ht.lFrame.bindingIndex}function kt(){return ht.lFrame.bindingIndex++}function Dt(e){const t=ht.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function Tt(e,t){const n=ht.lFrame;n.bindingIndex=n.bindingRootIndex=e,Ct(t)}function Ct(e){ht.lFrame.currentDirectiveIndex=e}function Ot(e){const t=ht.lFrame.currentDirectiveIndex;return-1===t?null:e[t]}function Lt(){return ht.lFrame.currentQueryIndex}function Rt(e){ht.lFrame.currentQueryIndex=e}function Et(e,t){const n=It();ht.lFrame=n,n.currentTNode=t,n.lView=e}function At(e){const t=It(),n=e[1];ht.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex}function It(){const e=ht.lFrame,t=null===e?null:e.child;return null===t?Pt(e):t}function Pt(e){const t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:0,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null};return null!==e&&(e.child=t),t}function jt(){const e=ht.lFrame;return ht.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}const Nt=jt;function Ft(){const e=jt();e.isParent=!0,e.tView=null,e.selectedIndex=0,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function Yt(){return ht.lFrame.selectedIndex}function zt(e){ht.lFrame.selectedIndex=e}function $t(){const e=ht.lFrame;return it(e.tView,e.selectedIndex)}function Ht(e,t){for(let n=t.directiveStart,i=t.directiveEnd;n<i;n++){const t=e.data[n].type.prototype,{ngAfterContentInit:i,ngAfterContentChecked:r,ngAfterViewInit:s,ngAfterViewChecked:o,ngOnDestroy:a}=t;i&&(e.contentHooks||(e.contentHooks=[])).push(-n,i),r&&((e.contentHooks||(e.contentHooks=[])).push(n,r),(e.contentCheckHooks||(e.contentCheckHooks=[])).push(n,r)),s&&(e.viewHooks||(e.viewHooks=[])).push(-n,s),o&&((e.viewHooks||(e.viewHooks=[])).push(n,o),(e.viewCheckHooks||(e.viewCheckHooks=[])).push(n,o)),null!=a&&(e.destroyHooks||(e.destroyHooks=[])).push(n,a)}}function Wt(e,t,n){Ut(e,t,3,n)}function Vt(e,t,n,i){(3&e[2])===n&&Ut(e,t,n,i)}function Bt(e,t){let n=e[2];(3&n)===t&&(n&=2047,n+=1,e[2]=n)}function Ut(e,t,n,i){const r=null!=i?i:-1;let s=0;for(let o=void 0!==i?65535&e[18]:0;o<t.length;o++)if("number"==typeof t[o+1]){if(s=t[o],null!=i&&s>=i)break}else t[o]<0&&(e[18]+=65536),(s<r||-1==r)&&(qt(e,n,t,o),e[18]=(4294901760&e[18])+o+2),o++}function qt(e,t,n,i){const r=n[i]<0,s=n[i+1],o=e[r?-n[i]:n[i]];r?e[2]>>11<e[18]>>16&&(3&e[2])===t&&(e[2]+=2048,s.call(o)):s.call(o)}const Gt=-1;class Jt{constructor(e,t,n){this.factory=e,this.resolving=!1,this.canSeeViewProviders=t,this.injectImpl=n}}function Qt(e,t,n){const i=Ze(e);let r=0;for(;r<n.length;){const s=n[r];if("number"==typeof s){if(0!==s)break;r++;const o=n[r++],a=n[r++],c=n[r++];i?e.setAttribute(t,a,c,o):t.setAttributeNS(o,a,c)}else{const o=s,a=n[++r];Zt(o)?i&&e.setProperty(t,o,a):i?e.setAttribute(t,o,a):t.setAttribute(o,a),r++}}return r}function Kt(e){return 3===e||4===e||6===e}function Zt(e){return 64===e.charCodeAt(0)}function Xt(e,t){if(null===t||0===t.length);else if(null===e||0===e.length)e=t.slice();else{let n=-1;for(let i=0;i<t.length;i++){const r=t[i];"number"==typeof r?n=r:0===n||en(e,n,r,null,-1===n||2===n?t[++i]:null)}}return e}function en(e,t,n,i,r){let s=0,o=e.length;if(-1===t)o=-1;else for(;s<e.length;){const n=e[s++];if("number"==typeof n){if(n===t){o=-1;break}if(n>t){o=s-1;break}}}for(;s<e.length;){const t=e[s];if("number"==typeof t)break;if(t===n){if(null===i)return void(null!==r&&(e[s+1]=r));if(i===e[s+1])return void(e[s+2]=r)}s++,null!==i&&s++,null!==r&&s++}-1!==o&&(e.splice(o,0,t),s=o+1),e.splice(s++,0,n),null!==i&&e.splice(s++,0,i),null!==r&&e.splice(s++,0,r)}function tn(e){return e!==Gt}function nn(e){return 32767&e}function rn(e,t){let n=e>>16,i=t;for(;n>0;)i=i[15],n--;return i}function sn(e){return"string"==typeof e?e:null==e?"":""+e}function on(e){return"function"==typeof e?e.name||e.toString():"object"==typeof e&&null!=e&&"function"==typeof e.type?e.type.name||e.type.toString():sn(e)}const an=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(F))();function cn(e){return{name:"window",target:e.ownerDocument.defaultView}}function ln(e){return{name:"body",target:e.ownerDocument.body}}function un(e){return e instanceof Function?e():e}let dn=!0;function hn(e){const t=dn;return dn=e,t}let fn=0;function pn(e,t){const n=bn(e,t);if(-1!==n)return n;const i=t[1];i.firstCreatePass&&(e.injectorIndex=t.length,mn(i.data,e),mn(t,null),mn(i.blueprint,null));const r=gn(e,t),s=e.injectorIndex;if(tn(r)){const e=nn(r),n=rn(r,t),i=n[1].data;for(let r=0;r<8;r++)t[s+r]=n[e+r]|i[e+r]}return t[s+8]=r,s}function mn(e,t){e.push(0,0,0,0,0,0,0,0,t)}function bn(e,t){return-1===e.injectorIndex||e.parent&&e.parent.injectorIndex===e.injectorIndex||null===t[e.injectorIndex+8]?-1:e.injectorIndex}function gn(e,t){if(e.parent&&-1!==e.parent.injectorIndex)return e.parent.injectorIndex;let n=0,i=null,r=t;for(;null!==r;){const e=r[1],t=e.type;if(i=2===t?e.declTNode:1===t?r[6]:null,null===i)return Gt;if(n++,r=r[15],-1!==i.injectorIndex)return i.injectorIndex|n<<16}return Gt}function _n(e,t,n){!function(e,t,n){let i;"string"==typeof n?i=n.charCodeAt(0)||0:n.hasOwnProperty(B)&&(i=n[B]),null==i&&(i=n[B]=fn++);const r=255&i,s=1<<r,o=64&r,a=32&r,c=t.data;128&r?o?a?c[e+7]|=s:c[e+6]|=s:a?c[e+5]|=s:c[e+4]|=s:o?a?c[e+3]|=s:c[e+2]|=s:a?c[e+1]|=s:c[e]|=s}(e,t,n)}function yn(e,t,n,i=m.Default,r){if(null!==e){const r=function(e){if("string"==typeof e)return e.charCodeAt(0)||0;const t=e.hasOwnProperty(B)?e[B]:void 0;return"number"==typeof t&&t>0?255&t:t}(n);if("function"==typeof r){Et(t,e);try{const e=r();if(null!=e||i&m.Optional)return e;throw new Error(`No provider for ${on(n)}!`)}finally{Nt()}}else if("number"==typeof r){if(-1===r)return new Dn(e,t);let s=null,o=bn(e,t),a=Gt,c=i&m.Host?t[16][6]:null;for((-1===o||i&m.SkipSelf)&&(a=-1===o?gn(e,t):t[o+8],a!==Gt&&kn(i,!1)?(s=t[1],o=nn(a),t=rn(a,t)):o=-1);-1!==o;){const e=t[1];if(xn(r,o,e.data)){const e=wn(o,t,n,s,i,c);if(e!==vn)return e}a=t[o+8],a!==Gt&&kn(i,t[1].data[o+8]===c)&&xn(r,o,t)?(s=e,o=nn(a),t=rn(a,t)):o=-1}}}if(i&m.Optional&&void 0===r&&(r=null),0==(i&(m.Self|m.Host))){const e=t[9],s=te(void 0);try{return e?e.get(n,r,i&m.Optional):re(n,r,i&m.Optional)}finally{te(s)}}if(i&m.Optional)return r;throw new Error(`NodeInjector: NOT_FOUND [${on(n)}]`)}const vn={};function wn(e,t,n,i,r,s){const o=t[1],a=o.data[e+8],c=Sn(a,o,n,null==i?Ye(a)&&dn:i!=o&&2===a.type,r&m.Host&&s===a);return null!==c?Mn(t,o,c,a):vn}function Sn(e,t,n,i,r){const s=e.providerIndexes,o=t.data,a=1048575&s,c=e.directiveStart,l=s>>20,u=r?a+l:e.directiveEnd;for(let d=i?a:a+l;d<u;d++){const e=o[d];if(d<c&&n===e||d>=c&&e.type===n)return d}if(r){const e=o[c];if(e&&$e(e)&&e.type===n)return c}return null}function Mn(e,t,n,i){let r=e[n];const s=t.data;if(r instanceof Jt){const o=r;if(o.resolving)throw new Error("Circular dep for "+on(s[n]));const a=hn(o.canSeeViewProviders);o.resolving=!0;const c=o.injectImpl?te(o.injectImpl):null;Et(e,i);try{r=e[n]=o.factory(void 0,s,e,i),t.firstCreatePass&&n>=i.directiveStart&&function(e,t,n){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:s}=t.type.prototype;if(i){const i=Be(t);(n.preOrderHooks||(n.preOrderHooks=[])).push(e,i),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(e,i)}r&&(n.preOrderHooks||(n.preOrderHooks=[])).push(0-e,r),s&&((n.preOrderHooks||(n.preOrderHooks=[])).push(e,s),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(e,s))}(n,s[n],t)}finally{null!==c&&te(c),hn(a),o.resolving=!1,Nt()}}return r}function xn(e,t,n){const i=64&e,r=32&e;let s;return s=128&e?i?r?n[t+7]:n[t+6]:r?n[t+5]:n[t+4]:i?r?n[t+3]:n[t+2]:r?n[t+1]:n[t],!!(s&1<<e)}function kn(e,t){return!(e&m.Self||e&m.Host&&t)}class Dn{constructor(e,t){this._tNode=e,this._lView=t}get(e,t){return yn(this._tNode,this._lView,e,void 0,t)}}function Tn(e){const t=e;if(A(e))return()=>{const e=Tn(E(t));return e?e():null};let n=Ee(t);if(null===n){const e=S(t);n=e&&e.factory}return n||null}function Cn(e){return c(()=>{const t=e.prototype.constructor,n=t[V]||Tn(t),i=Object.prototype;let r=Object.getPrototypeOf(e.prototype).constructor;for(;r&&r!==i;){const e=r[V]||Tn(r);if(e&&e!==n)return e;r=Object.getPrototypeOf(r)}return e=>new e})}function On(e){return e.ngDebugContext}function Ln(e){return e.ngOriginalError}function Rn(e,...t){e.error(...t)}class En{constructor(){this._console=console}handleError(e){const t=this._findOriginalError(e),n=this._findContext(e),i=function(e){return e.ngErrorLogger||Rn}(e);i(this._console,"ERROR",e),t&&i(this._console,"ORIGINAL ERROR",t),n&&i(this._console,"ERROR CONTEXT",n)}_findContext(e){return e?On(e)?On(e):this._findContext(Ln(e)):null}_findOriginalError(e){let t=Ln(e);for(;t&&Ln(t);)t=Ln(t);return t}}class An{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return"SafeValue must use [property]=binding: "+this.changingThisBreaksApplicationSecurity+" (see http://g.co/ng/security#xss)"}}class In extends An{getTypeName(){return"HTML"}}class Pn extends An{getTypeName(){return"Style"}}class jn extends An{getTypeName(){return"Script"}}class Nn extends An{getTypeName(){return"URL"}}class Fn extends An{getTypeName(){return"ResourceURL"}}function Yn(e){return e instanceof An?e.changingThisBreaksApplicationSecurity:e}function zn(e,t){const n=$n(e);if(null!=n&&n!==t){if("ResourceURL"===n&&"URL"===t)return!0;throw new Error(`Required a safe ${t}, got a ${n} (see http://g.co/ng/security#xss)`)}return n===t}function $n(e){return e instanceof An&&e.getTypeName()||null}function Hn(e){return new In(e)}function Wn(e){return new Pn(e)}function Vn(e){return new jn(e)}function Bn(e){return new Nn(e)}function Un(e){return new Fn(e)}let qn=!0,Gn=!1;function Jn(){return Gn=!0,qn}function Qn(){if(Gn)throw new Error("Cannot enable prod mode after platform setup.");qn=!1}function Kn(e){return function(){try{return!!(new window.DOMParser).parseFromString("","text/html")}catch(e){return!1}}()?new Zn:new Xn(e)}class Zn{getInertBodyElement(e){e="<body><remove></remove>"+e;try{const t=(new window.DOMParser).parseFromString(e,"text/html").body;return t.removeChild(t.firstChild),t}catch(t){return null}}}class Xn{constructor(e){if(this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const e=this.inertDocument.createElement("html");this.inertDocument.appendChild(e);const t=this.inertDocument.createElement("body");e.appendChild(t)}}getInertBodyElement(e){const t=this.inertDocument.createElement("template");if("content"in t)return t.innerHTML=e,t;const n=this.inertDocument.createElement("body");return n.innerHTML=e,this.defaultDoc.documentMode&&this.stripCustomNsAttrs(n),n}stripCustomNsAttrs(e){const t=e.attributes;for(let i=t.length-1;0<i;i--){const n=t.item(i).name;"xmlns:ns1"!==n&&0!==n.indexOf("ns1:")||e.removeAttribute(n)}let n=e.firstChild;for(;n;)n.nodeType===Node.ELEMENT_NODE&&this.stripCustomNsAttrs(n),n=n.nextSibling}}const ei=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi,ti=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;function ni(e){return(e=String(e)).match(ei)||e.match(ti)?e:(Jn()&&console.warn(`WARNING: sanitizing unsafe URL value ${e} (see http://g.co/ng/security#xss)`),"unsafe:"+e)}function ii(e){return(e=String(e)).split(",").map(e=>ni(e.trim())).join(", ")}function ri(e){const t={};for(const n of e.split(","))t[n]=!0;return t}function si(...e){const t={};for(const n of e)for(const e in n)n.hasOwnProperty(e)&&(t[e]=!0);return t}const oi=ri("area,br,col,hr,img,wbr"),ai=ri("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),ci=ri("rp,rt"),li=si(ci,ai),ui=si(oi,si(ai,ri("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),si(ci,ri("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),li),di=ri("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),hi=ri("srcset"),fi=si(di,hi,ri("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),ri("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),pi=ri("script,style,template");class mi{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(e){let t=e.firstChild,n=!0;for(;t;)if(t.nodeType===Node.ELEMENT_NODE?n=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,n&&t.firstChild)t=t.firstChild;else for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let e=this.checkClobberedElement(t,t.nextSibling);if(e){t=e;break}t=this.checkClobberedElement(t,t.parentNode)}return this.buf.join("")}startElement(e){const t=e.nodeName.toLowerCase();if(!ui.hasOwnProperty(t))return this.sanitizedSomething=!0,!pi.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);const n=e.attributes;for(let i=0;i<n.length;i++){const e=n.item(i),t=e.name,r=t.toLowerCase();if(!fi.hasOwnProperty(r)){this.sanitizedSomething=!0;continue}let s=e.value;di[r]&&(s=ni(s)),hi[r]&&(s=ii(s)),this.buf.push(" ",t,'="',_i(s),'"')}return this.buf.push(">"),!0}endElement(e){const t=e.nodeName.toLowerCase();ui.hasOwnProperty(t)&&!oi.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(_i(e))}checkClobberedElement(e,t){if(t&&(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: "+e.outerHTML);return t}}const bi=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,gi=/([^\#-~ |!])/g;function _i(e){return e.replace(/&/g,"&").replace(bi,(function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"})).replace(gi,(function(e){return"&#"+e.charCodeAt(0)+";"})).replace(/</g,"<").replace(/>/g,">")}let yi;function vi(e,t){let n=null;try{yi=yi||Kn(e);let i=t?String(t):"";n=yi.getInertBodyElement(i);let r=5,s=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=s,s=n.innerHTML,n=yi.getInertBodyElement(i)}while(i!==s);const o=new mi,a=o.sanitizeChildren(wi(n)||n);return Jn()&&o.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss"),a}finally{if(n){const e=wi(n)||n;for(;e.firstChild;)e.removeChild(e.firstChild)}}}function wi(e){return"content"in e&&function(e){return e.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===e.nodeName}(e)?e.content:null}var Si=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}({});function Mi(e){const t=Di();return t?t.sanitize(Si.HTML,e)||"":zn(e,"HTML")?Yn(e):vi(Ke(),sn(e))}function xi(e){const t=Di();return t?t.sanitize(Si.URL,e)||"":zn(e,"URL")?Yn(e):ni(sn(e))}function ki(e){const t=Di();if(t)return t.sanitize(Si.RESOURCE_URL,e)||"";if(zn(e,"ResourceURL"))return Yn(e);throw new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)")}function Di(){const e=pt();return e&&e[12]}function Ti(e,t){e.__ngContext__=t}function Ci(e,t,n){let i=e.length;for(;;){const r=e.indexOf(t,n);if(-1===r)return r;if(0===r||e.charCodeAt(r-1)<=32){const n=t.length;if(r+n===i||e.charCodeAt(r+n)<=32)return r}n=r+1}}const Oi="ng-template";function Li(e,t,n){let i=0;for(;i<e.length;){let r=e[i++];if(n&&"class"===r){if(r=e[i],-1!==Ci(r.toLowerCase(),t,0))return!0}else if(1===r){for(;i<e.length&&"string"==typeof(r=e[i++]);)if(r.toLowerCase()===t)return!0;return!1}}return!1}function Ri(e){return 0===e.type&&e.tagName!==Oi}function Ei(e,t,n){return t===(0!==e.type||n?e.tagName:Oi)}function Ai(e,t,n){let i=4;const r=e.attrs||[],s=function(e){for(let t=0;t<e.length;t++)if(Kt(e[t]))return t;return e.length}(r);let o=!1;for(let a=0;a<t.length;a++){const c=t[a];if("number"!=typeof c){if(!o)if(4&i){if(i=2|1&i,""!==c&&!Ei(e,c,n)||""===c&&1===t.length){if(Ii(i))return!1;o=!0}}else{const l=8&i?c:t[++a];if(8&i&&null!==e.attrs){if(!Li(e.attrs,l,n)){if(Ii(i))return!1;o=!0}continue}const u=Pi(8&i?"class":c,r,Ri(e),n);if(-1===u){if(Ii(i))return!1;o=!0;continue}if(""!==l){let e;e=u>s?"":r[u+1].toLowerCase();const t=8&i?e:null;if(t&&-1!==Ci(t,l,0)||2&i&&l!==e){if(Ii(i))return!1;o=!0}}}}else{if(!o&&!Ii(i)&&!Ii(c))return!1;if(o&&Ii(c))continue;o=!1,i=c|1&i}}return Ii(i)||o}function Ii(e){return 0==(1&e)}function Pi(e,t,n,i){if(null===t)return-1;let r=0;if(i||!n){let n=!1;for(;r<t.length;){const i=t[r];if(i===e)return r;if(3===i||6===i)n=!0;else{if(1===i||2===i){let e=t[++r];for(;"string"==typeof e;)e=t[++r];continue}if(4===i)break;if(0===i){r+=4;continue}}r+=n?1:2}return-1}return function(e,t){let n=e.indexOf(4);if(n>-1)for(n++;n<e.length;){const i=e[n];if("number"==typeof i)return-1;if(i===t)return n;n++}return-1}(t,e)}function ji(e,t,n=!1){for(let i=0;i<t.length;i++)if(Ai(e,t[i],n))return!0;return!1}function Ni(e,t){e:for(let n=0;n<t.length;n++){const i=t[n];if(e.length===i.length){for(let t=0;t<e.length;t++)if(e[t]!==i[t])continue e;return!0}}return!1}function Fi(e,t){return e?":not("+t.trim()+")":t}function Yi(e){let t=e[0],n=1,i=2,r="",s=!1;for(;n<e.length;){let o=e[n];if("string"==typeof o)if(2&i){const t=e[++n];r+="["+o+(t.length>0?'="'+t+'"':"")+"]"}else 8&i?r+="."+o:4&i&&(r+=" "+o);else""===r||Ii(o)||(t+=Fi(s,r),r=""),i=o,s=s||!Ii(i);n++}return""!==r&&(t+=Fi(s,r)),t}const zi={};function $i(e){const t=e[3];return Ne(t)?t[3]:t}function Hi(e){return Vi(e[13])}function Wi(e){return Vi(e[4])}function Vi(e){for(;null!==e&&!Ne(e);)e=e[4];return e}function Bi(e){Ui(mt(),pt(),Yt()+e,wt())}function Ui(e,t,n,i){if(!i)if(3==(3&t[2])){const i=e.preOrderCheckHooks;null!==i&&Wt(t,i,n)}else{const i=e.preOrderHooks;null!==i&&Vt(t,i,0,n)}zt(n)}function qi(e,t){return e<<17|t<<2}function Gi(e){return e>>17&32767}function Ji(e){return 2|e}function Qi(e){return(131068&e)>>2}function Ki(e,t){return-131069&e|t<<2}function Zi(e){return 1|e}function Xi(e,t){const n=e.contentQueries;if(null!==n)for(let i=0;i<n.length;i+=2){const r=n[i],s=n[i+1];if(-1!==s){const n=e.data[s];Rt(r),n.contentQueries(2,t[s],s)}}}function er(e,t,n){return Ze(t)?t.createElement(e,n):null===n?t.createElement(e):t.createElementNS(n,e)}function tr(e,t,n,i,r,s,o,a,c,l){const u=t.blueprint.slice();return u[0]=r,u[2]=140|i,ut(u),u[3]=u[15]=e,u[8]=n,u[10]=o||e&&e[10],u[11]=a||e&&e[11],u[12]=c||e&&e[12]||null,u[9]=l||e&&e[9]||null,u[6]=s,u[16]=2==t.type?e[16]:u,u}function nr(e,t,n,i,r){const s=t+Ie,o=e.data[s]||function(e,t,n,i,r){const s=gt(),o=yt(),a=e.data[t]=function(e,t,n,i,r,s){return{type:n,index:i,injectorIndex:t?t.injectorIndex:-1,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,propertyBindings:null,flags:0,providerIndexes:0,tagName:r,attrs:s,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tViews:null,next:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}(0,o?s:s&&s.parent,n,t,i,r);return null===e.firstChild&&(e.firstChild=a),null!==s&&(o&&null==s.child&&null!==a.parent?s.child=a:o||(s.next=a)),a}(e,s,n,i,r);return _t(o,!0),o}function ir(e,t,n){At(t);try{const i=e.viewQuery;null!==i&&Pr(1,i,n);const r=e.template;null!==r&&or(e,t,r,1,n),e.firstCreatePass&&(e.firstCreatePass=!1),e.staticContentQueries&&Xi(e,t),e.staticViewQueries&&Pr(2,e.viewQuery,n);const s=e.components;null!==s&&function(e,t){for(let n=0;n<t.length;n++)Lr(e,t[n])}(t,s)}catch(i){throw e.firstCreatePass&&(e.incompleteFirstPass=!0),i}finally{t[2]&=-5,Ft()}}function rr(e,t,n,i){const r=t[2];if(256==(256&r))return;At(t);const s=wt();try{ut(t),ht.lFrame.bindingIndex=e.bindingStartIndex,null!==n&&or(e,t,n,2,i);const o=3==(3&r);if(!s)if(o){const n=e.preOrderCheckHooks;null!==n&&Wt(t,n,null)}else{const n=e.preOrderHooks;null!==n&&Vt(t,n,0,null),Bt(t,0)}if(function(e){for(let t=Hi(e);null!==t;t=Wi(t)){if(!t[2])continue;const e=t[9];for(let t=0;t<e.length;t++){const n=e[t],i=n[3];0==(1024&n[2])&&dt(i,1),n[2]|=1024}}}(t),function(e){for(let t=Hi(e);null!==t;t=Wi(t))for(let e=Pe;e<t.length;e++){const n=t[e],i=n[1];ct(n)&&rr(i,n,i.template,n[8])}}(t),null!==e.contentQueries&&Xi(e,t),!s)if(o){const n=e.contentCheckHooks;null!==n&&Wt(t,n)}else{const n=e.contentHooks;null!==n&&Vt(t,n,1),Bt(t,1)}!function(e,t){try{const n=e.expandoInstructions;if(null!==n){let i=e.expandoStartIndex,r=-1,s=-1;for(let e=0;e<n.length;e++){const o=n[e];"number"==typeof o?o<=0?(s=0-o,zt(s),i+=9+n[++e],r=i):i+=o:(null!==o&&(Tt(i,r),o(2,t[r])),r++)}}}finally{zt(-1)}}(e,t);const a=e.components;null!==a&&function(e,t){for(let n=0;n<t.length;n++)Or(e,t[n])}(t,a);const c=e.viewQuery;if(null!==c&&Pr(2,c,i),!s)if(o){const n=e.viewCheckHooks;null!==n&&Wt(t,n)}else{const n=e.viewHooks;null!==n&&Vt(t,n,2),Bt(t,2)}!0===e.firstUpdatePass&&(e.firstUpdatePass=!1),s||(t[2]&=-73),1024&t[2]&&(t[2]&=-1025,dt(t[3],-1))}finally{Ft()}}function sr(e,t,n,i){const r=t[10],s=!wt(),o=at(t);try{s&&!o&&r.begin&&r.begin(),o&&ir(e,t,i),rr(e,t,n,i)}finally{s&&!o&&r.end&&r.end()}}function or(e,t,n,i,r){const s=Yt();try{zt(-1),2&i&&t.length>Ie&&Ui(e,t,0,wt()),n(i,r)}finally{zt(s)}}function ar(e,t,n){if(Fe(t)){const i=t.directiveEnd;for(let r=t.directiveStart;r<i;r++){const t=e.data[r];t.contentQueries&&t.contentQueries(1,n[r],r)}}}function cr(e,t,n){ft()&&(function(e,t,n,i){const r=n.directiveStart,s=n.directiveEnd;e.firstCreatePass||pn(n,t),Ti(i,t);const o=n.initialInputs;for(let a=r;a<s;a++){const i=e.data[a],s=$e(i);s&&xr(t,n,i);const c=Mn(t,e,a,n);Ti(c,t),null!==o&&Dr(0,a-r,c,i,0,o),s&&(st(n.index,t)[8]=c)}}(e,t,n,nt(n,t)),128==(128&n.flags)&&function(e,t,n){const i=n.directiveStart,r=n.directiveEnd,s=e.expandoInstructions,o=e.firstCreatePass,a=n.index-Ie,c=ht.lFrame.currentDirectiveIndex;try{zt(a);for(let n=i;n<r;n++){const i=e.data[n],r=t[n];Ct(n),null!==i.hostBindings||0!==i.hostVars||null!==i.hostAttrs?_r(i,r):o&&s.push(null)}}finally{zt(-1),Ct(c)}}(e,t,n))}function lr(e,t,n=nt){const i=t.localNames;if(null!==i){let r=t.index+1;for(let s=0;s<i.length;s+=2){const o=i[s+1],a=-1===o?n(t,e):e[o];e[r++]=a}}}function ur(e){const t=e.tView;return null===t||t.incompleteFirstPass?e.tView=dr(1,null,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts):t}function dr(e,t,n,i,r,s,o,a,c,l){const u=Ie+i,d=u+r,h=function(e,t){const n=[];for(let i=0;i<t;i++)n.push(i<e?null:zi);return n}(u,d),f="function"==typeof l?l():l;return h[1]={type:e,blueprint:h,template:n,queries:null,viewQuery:a,declTNode:t,data:h.slice().fill(null,u),bindingStartIndex:u,expandoStartIndex:d,expandoInstructions:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof s?s():s,pipeRegistry:"function"==typeof o?o():o,firstChild:null,schemas:c,consts:f,incompleteFirstPass:!1}}function hr(e,t,n,i){const r=Nr(t);r.push(n),e.firstCreatePass&&function(e){return e.cleanup||(e.cleanup=[])}(e).push(i,r.length-1)}function fr(e,t,n){for(let i in e)if(e.hasOwnProperty(i)){const r=e[i];(n=null===n?{}:n).hasOwnProperty(i)?n[i].push(t,r):n[i]=[t,r]}return n}function pr(e,t,n,i,r,s,o,a){const c=nt(t,n);let l,u=t.inputs;var d;!a&&null!=u&&(l=u[i])?(Yr(e,n,l,i,r),Ye(t)&&function(e,t){const n=st(t,e);16&n[2]||(n[2]|=64)}(n,t.index)):2===t.type&&(i="class"===(d=i)?"className":"for"===d?"htmlFor":"formaction"===d?"formAction":"innerHtml"===d?"innerHTML":"readonly"===d?"readOnly":"tabindex"===d?"tabIndex":d,r=null!=o?o(r,t.tagName||"",i):r,Ze(s)?s.setProperty(c,i,r):Zt(i)||(c.setProperty?c.setProperty(i,r):c[i]=r))}function mr(e,t,n,i){let r=!1;if(ft()){const s=function(e,t,n){const i=e.directiveRegistry;let r=null;if(i)for(let s=0;s<i.length;s++){const o=i[s];ji(n,o.selectors,!1)&&(r||(r=[]),_n(pn(n,t),e,o.type),$e(o)?(vr(e,n),r.unshift(o)):r.push(o))}return r}(e,t,n),o=null===i?null:{"":-1};if(null!==s){let i=0;r=!0,Sr(n,e.data.length,s.length);for(let e=0;e<s.length;e++){const t=s[e];t.providersResolver&&t.providersResolver(t)}yr(e,n,s.length);let a=!1,c=!1;for(let r=0;r<s.length;r++){const l=s[r];n.mergedAttrs=Xt(n.mergedAttrs,l.hostAttrs),Mr(e,t,l),wr(e.data.length-1,l,o),null!==l.contentQueries&&(n.flags|=8),null===l.hostBindings&&null===l.hostAttrs&&0===l.hostVars||(n.flags|=128);const u=l.type.prototype;!a&&(u.ngOnChanges||u.ngOnInit||u.ngDoCheck)&&((e.preOrderHooks||(e.preOrderHooks=[])).push(n.index-Ie),a=!0),c||!u.ngOnChanges&&!u.ngDoCheck||((e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(n.index-Ie),c=!0),br(e,l),i+=l.hostVars}!function(e,t){const n=t.directiveEnd,i=e.data,r=t.attrs,s=[];let o=null,a=null;for(let c=t.directiveStart;c<n;c++){const e=i[c],n=e.inputs,l=null===r||Ri(t)?null:Tr(n,r);s.push(l),o=fr(n,c,o),a=fr(e.outputs,c,a)}null!==o&&(o.hasOwnProperty("class")&&(t.flags|=16),o.hasOwnProperty("style")&&(t.flags|=32)),t.initialInputs=s,t.inputs=o,t.outputs=a}(e,n),gr(e,t,i)}o&&function(e,t,n){if(t){const i=e.localNames=[];for(let e=0;e<t.length;e+=2){const r=n[t[e+1]];if(null==r)throw new Error(`Export of name '${t[e+1]}' not found!`);i.push(t[e],r)}}}(n,i,o)}return n.mergedAttrs=Xt(n.mergedAttrs,n.attrs),r}function br(e,t){const n=e.expandoInstructions;n.push(t.hostBindings),0!==t.hostVars&&n.push(t.hostVars)}function gr(e,t,n){for(let i=0;i<n;i++)t.push(zi),e.blueprint.push(zi),e.data.push(null)}function _r(e,t){null!==e.hostBindings&&e.hostBindings(1,t)}function yr(e,t,n){const i=Ie-t.index,r=e.data.length-(1048575&t.providerIndexes);(e.expandoInstructions||(e.expandoInstructions=[])).push(i,r,n)}function vr(e,t){t.flags|=2,(e.components||(e.components=[])).push(t.index)}function wr(e,t,n){if(n){if(t.exportAs)for(let i=0;i<t.exportAs.length;i++)n[t.exportAs[i]]=e;$e(t)&&(n[""]=e)}}function Sr(e,t,n){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+n,e.providerIndexes=t}function Mr(e,t,n){e.data.push(n);const i=n.factory||(n.factory=Ee(n.type)),r=new Jt(i,$e(n),null);e.blueprint.push(r),t.push(r)}function xr(e,t,n){const i=nt(t,e),r=ur(n),s=e[10],o=Rr(e,tr(e,r,null,n.onPush?64:16,i,t,s,s.createRenderer(i,n),null,null));e[t.index]=o}function kr(e,t,n,i,r,s){const o=nt(e,t),a=t[11];if(null==i)Ze(a)?a.removeAttribute(o,n,s):o.removeAttribute(n);else{const t=null==r?sn(i):r(i,e.tagName||"",n);Ze(a)?a.setAttribute(o,n,t,s):s?o.setAttributeNS(s,n,t):o.setAttribute(n,t)}}function Dr(e,t,n,i,r,s){const o=s[t];if(null!==o){const e=i.setInput;for(let t=0;t<o.length;){const r=o[t++],s=o[t++],a=o[t++];null!==e?i.setInput(n,a,r,s):n[s]=a}}}function Tr(e,t){let n=null,i=0;for(;i<t.length;){const r=t[i];if(0!==r)if(5!==r){if("number"==typeof r)break;e.hasOwnProperty(r)&&(null===n&&(n=[]),n.push(r,e[r],t[i+1])),i+=2}else i+=2;else i+=4}return n}function Cr(e,t,n,i){return new Array(e,!0,!1,t,null,0,i,n,null,null)}function Or(e,t){const n=st(t,e);if(ct(n)){const e=n[1];80&n[2]?rr(e,n,e.template,n[8]):n[5]>0&&function e(t){for(let i=Hi(t);null!==i;i=Wi(i))for(let t=Pe;t<i.length;t++){const n=i[t];if(1024&n[2]){const e=n[1];rr(e,n,e.template,n[8])}else n[5]>0&&e(n)}const n=t[1].components;if(null!==n)for(let i=0;i<n.length;i++){const r=st(n[i],t);ct(r)&&r[5]>0&&e(r)}}(n)}}function Lr(e,t){const n=st(t,e),i=n[1];!function(e,t){for(let n=t.length;n<e.blueprint.length;n++)t.push(e.blueprint[n])}(i,n),ir(i,n,n[8])}function Rr(e,t){return e[13]?e[14][4]=t:e[13]=t,e[14]=t,t}function Er(e){for(;e;){e[2]|=64;const t=$i(e);if(He(e)&&!t)return e;e=t}return null}function Ar(e,t,n){const i=t[10];i.begin&&i.begin();try{rr(e,t,e.template,n)}catch(r){throw Fr(t,r),r}finally{i.end&&i.end()}}function Ir(e){!function(e){for(let t=0;t<e.components.length;t++){const n=e.components[t],i=ot(n),r=i[1];sr(r,i,r.template,n)}}(e[8])}function Pr(e,t,n){Rt(0),t(e,n)}const jr=(()=>Promise.resolve(null))();function Nr(e){return e[7]||(e[7]=[])}function Fr(e,t){const n=e[9],i=n?n.get(En,null):null;i&&i.handleError(t)}function Yr(e,t,n,i,r){for(let s=0;s<n.length;){const o=n[s++],a=n[s++],c=t[o],l=e.data[o];null!==l.setInput?l.setInput(c,r,i,a):c[a]=r}}function zr(e,t,n){const i=tt(t,e),r=e[11];Ze(r)?r.setValue(i,n):i.textContent=n}function $r(e,t,n,i,r){if(null!=i){let s,o=!1;Ne(i)?s=i:je(i)&&(o=!0,i=i[0]);const a=et(i);0===e&&null!==n?null==r?Jr(t,n,a):Gr(t,n,a,r||null):1===e&&null!==n?Gr(t,n,a,r||null):2===e?es(t,a,o):3===e&&t.destroyNode(a),null!=s&&function(e,t,n,i,r){const s=n[7];s!==et(n)&&$r(t,e,i,s,r);for(let o=Pe;o<n.length;o++){const r=n[o];ns(r[1],r,e,t,i,s)}}(t,e,s,n,r)}}function Hr(e,t){return Ze(t)?t.createText(e):t.createTextNode(e)}function Wr(e,t){const n=e[9],i=n.indexOf(t),r=t[3];1024&t[2]&&(t[2]&=-1025,dt(r,-1)),n.splice(i,1)}function Vr(e,t){if(e.length<=Pe)return;const n=Pe+t,i=e[n];if(i){const s=i[17];null!==s&&s!==e&&Wr(s,i),t>0&&(e[n-1][4]=i[4]);const o=he(e,Pe+t);ns(i[1],r=i,r[11],2,null,null),r[0]=null,r[6]=null;const a=o[19];null!==a&&a.detachView(o[1]),i[3]=null,i[4]=null,i[2]&=-129}var r;return i}function Br(e,t){if(!(256&t[2])){const n=t[11];Ze(n)&&n.destroyNode&&ns(e,t,n,3,null,null),function(e){let t=e[13];if(!t)return Ur(e[1],e);for(;t;){let n=null;if(je(t))n=t[13];else{const e=t[10];e&&(n=e)}if(!n){for(;t&&!t[4]&&t!==e;)je(t)&&Ur(t[1],t),t=t[3];null===t&&(t=e),je(t)&&Ur(t[1],t),n=t&&t[4]}t=n}}(t)}}function Ur(e,t){if(!(256&t[2])){t[2]&=-129,t[2]|=256,function(e,t){let n;if(null!=e&&null!=(n=e.destroyHooks))for(let i=0;i<n.length;i+=2){const e=t[n[i]];if(!(e instanceof Jt)){const t=n[i+1];if(Array.isArray(t))for(let n=0;n<t.length;n+=2)t[n+1].call(e[t[n]]);else t.call(e)}}}(e,t),function(e,t){const n=e.cleanup;if(null!==n){const e=t[7];for(let i=0;i<n.length-1;i+=2)if("string"==typeof n[i]){const r=n[i+1],s="function"==typeof r?r(t):et(t[r]),o=e[n[i+2]],a=n[i+3];"boolean"==typeof a?s.removeEventListener(n[i],o,a):a>=0?e[a]():e[-a].unsubscribe(),i+=2}else n[i].call(e[n[i+1]]);t[7]=null}}(e,t),1===t[1].type&&Ze(t[11])&&t[11].destroy();const n=t[17];if(null!==n&&Ne(t[3])){n!==t[3]&&Wr(n,t);const i=t[19];null!==i&&i.detachView(e)}}}function qr(e,t,n){let i=t.parent;for(;null!=i&&(3===i.type||4===i.type);)i=(t=i).parent;if(null===i)return n[0];if(t&&4===t.type&&4&t.flags)return nt(t,n).parentNode;if(2&i.flags){const t=e.data,n=t[t[i.index].directiveStart].encapsulation;if(n!==_e.ShadowDom&&n!==_e.Native)return null}return nt(i,n)}function Gr(e,t,n,i){Ze(e)?e.insertBefore(t,n,i):t.insertBefore(n,i,!0)}function Jr(e,t,n){Ze(e)?e.appendChild(t,n):t.appendChild(n)}function Qr(e,t,n,i){null!==i?Gr(e,t,n,i):Jr(e,t,n)}function Kr(e,t){return Ze(e)?e.parentNode(t):t.parentNode}function Zr(e,t){return 3===e.type||4===e.type?nt(e,t):null}function Xr(e,t,n,i){const r=qr(e,i,t);if(null!=r){const e=t[11],s=Zr(i.parent||t[6],t);if(Array.isArray(n))for(let t=0;t<n.length;t++)Qr(e,r,n[t],s);else Qr(e,r,n,s)}}function es(e,t,n){const i=Kr(e,t);i&&function(e,t,n,i){Ze(e)?e.removeChild(t,n,i):t.removeChild(n)}(e,i,t,n)}function ts(e,t,n,i,r,s,o){for(;null!=n;){const a=i[n.index],c=n.type;o&&0===t&&(a&&Ti(et(a),i),n.flags|=4),64!=(64&n.flags)&&(3===c||4===c?(ts(e,t,n.child,i,r,s,!1),$r(t,e,r,a,s)):1===c?rs(e,t,i,n,r,s):$r(t,e,r,a,s)),n=o?n.projectionNext:n.next}}function ns(e,t,n,i,r,s){ts(n,i,e.firstChild,t,r,s,!1)}function is(e,t,n){rs(t[11],0,t,n,qr(e,n,t),Zr(n.parent||t[6],t))}function rs(e,t,n,i,r,s){const o=n[16],a=o[6].projection[i.projection];if(Array.isArray(a))for(let c=0;c<a.length;c++)$r(t,e,r,a[c],s);else ts(e,t,a,o[3],r,s,!0)}function ss(e,t,n){Ze(e)?e.setAttribute(t,"style",n):t.style.cssText=n}function os(e,t,n){Ze(e)?""===n?e.removeAttribute(t,"class"):e.setAttribute(t,"class",n):t.className=n}class as{constructor(e,t){this._lView=e,this._cdRefInjectingView=t,this._appRef=null,this._viewContainerRef=null}get rootNodes(){const e=this._lView,t=e[1];return function e(t,n,i,r,s=!1){for(;null!==i;){const o=n[i.index];if(null!==o&&r.push(et(o)),Ne(o))for(let t=Pe;t<o.length;t++){const n=o[t],i=n[1].firstChild;null!==i&&e(n[1],n,i,r)}const a=i.type;if(3===a||4===a)e(t,n,i.child,r);else if(1===a){const t=n[16],s=t[6].projection[i.projection];if(Array.isArray(s))r.push(...s);else{const n=$i(t);e(n[1],n,s,r,!0)}}i=s?i.projectionNext:i.next}return r}(t,e,t.firstChild,[])}get context(){return this._lView[8]}get destroyed(){return 256==(256&this._lView[2])}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._viewContainerRef){const e=this._viewContainerRef.indexOf(this);e>-1&&this._viewContainerRef.detach(e),this._viewContainerRef=null}Br(this._lView[1],this._lView)}onDestroy(e){hr(this._lView[1],this._lView,null,e)}markForCheck(){Er(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){Ar(this._lView[1],this._lView,this.context)}checkNoChanges(){!function(e,t,n){St(!0);try{Ar(e,t,n)}finally{St(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(e){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=e}detachFromAppRef(){var e;this._appRef=null,ns(this._lView[1],e=this._lView,e[11],2,null,null)}attachToAppRef(e){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=e}}class cs extends as{constructor(e){super(e),this._view=e}detectChanges(){Ir(this._view)}checkNoChanges(){!function(e){St(!0);try{Ir(e)}finally{St(!1)}}(this._view)}get context(){return null}}let ls,us,ds;function hs(e,t,n){return ls||(ls=class extends e{}),new ls(nt(t,n))}function fs(e,t,n,i){return us||(us=class extends e{constructor(e,t,n){super(),this._declarationView=e,this._declarationTContainer=t,this.elementRef=n}createEmbeddedView(e){const t=this._declarationTContainer.tViews,n=tr(this._declarationView,t,e,16,null,t.declTNode,null,null,null,null);n[17]=this._declarationView[this._declarationTContainer.index];const i=this._declarationView[19];return null!==i&&(n[19]=i.createEmbeddedView(t)),ir(t,n,e),new as(n)}}),0===n.type?new us(i,n,hs(t,n,i)):null}function ps(e,t,n,i){let r;ds||(ds=class extends e{constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostView=n}get element(){return hs(t,this._hostTNode,this._hostView)}get injector(){return new Dn(this._hostTNode,this._hostView)}get parentInjector(){const e=gn(this._hostTNode,this._hostView);if(tn(e)){const t=rn(e,this._hostView),n=nn(e);return new Dn(t[1].data[n+8],t)}return new Dn(null,this._hostView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){return null!==this._lContainer[8]&&this._lContainer[8][e]||null}get length(){return this._lContainer.length-Pe}createEmbeddedView(e,t,n){const i=e.createEmbeddedView(t||{});return this.insert(i,n),i}createComponent(e,t,n,i,r){const s=n||this.parentInjector;if(!r&&null==e.ngModule&&s){const e=s.get(ae,null);e&&(r=e)}const o=e.create(s,i,void 0,r);return this.insert(o.hostView,t),o}insert(e,t){const n=e._lView,i=n[1];if(e.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");if(this.allocateContainerIfNeeded(),Ne(n[3])){const t=this.indexOf(e);if(-1!==t)this.detach(t);else{const t=n[3],i=new ds(t,t[6],t[3]);i.detach(i.indexOf(e))}}const r=this._adjustIndex(t),s=this._lContainer;!function(e,t,n,i){const r=Pe+i,s=n.length;i>0&&(n[r-1][4]=t),i<s-Pe?(t[4]=n[r],de(n,Pe+i,t)):(n.push(t),t[4]=null),t[3]=n;const o=t[17];null!==o&&n!==o&&function(e,t){const n=e[9];t[16]!==t[3][3][16]&&(e[2]=!0),null===n?e[9]=[t]:n.push(t)}(o,t);const a=t[19];null!==a&&a.insertView(e),t[2]|=128}(i,n,s,r);const o=function e(t,n){const i=Pe+t+1;if(i<n.length){const t=n[i],r=t[1].firstChild;if(null!==r)return function t(n,i){if(null!==i){const r=i.type;if(2===r)return nt(i,n);if(0===r)return e(-1,n[i.index]);if(3===r||4===r){const r=i.child;if(null!==r)return t(n,r);{const t=n[i.index];return Ne(t)?e(-1,t):et(t)}}{const e=n[16],r=e[6],s=$i(e),o=r.projection[i.projection];return null!=o?t(s,o):t(n,i.next)}}return null}(t,r)}return n[7]}(r,s),a=n[11],c=Kr(a,s[7]);return null!==c&&function(e,t,n,i,r,s){i[0]=r,i[6]=t,ns(e,i,n,1,r,s)}(i,s[6],a,n,c,o),e.attachToViewContainerRef(this),de(s[8],r,e),e}move(e,t){if(e.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");return this.insert(e,t)}indexOf(e){const t=this._lContainer[8];return null!==t?t.indexOf(e):-1}remove(e){this.allocateContainerIfNeeded();const t=this._adjustIndex(e,-1),n=Vr(this._lContainer,t);n&&(he(this._lContainer[8],t),Br(n[1],n))}detach(e){this.allocateContainerIfNeeded();const t=this._adjustIndex(e,-1),n=Vr(this._lContainer,t);return n&&null!=he(this._lContainer[8],t)?new as(n):null}_adjustIndex(e,t=0){return null==e?this.length+t:e}allocateContainerIfNeeded(){null===this._lContainer[8]&&(this._lContainer[8]=[])}});const s=i[n.index];if(Ne(s))r=s;else{let e;if(3===n.type)e=et(s);else if(e=i[11].createComment(""),He(i)){const t=i[11],r=nt(n,i);Gr(t,Kr(t,r),e,function(e,t){return Ze(e)?e.nextSibling(t):t.nextSibling}(t,r))}else Xr(i[1],i,e,n);i[n.index]=r=Cr(s,i,e,n),Rr(i,r)}return new ds(r,n,i)}function ms(e=!1){return function(e,t,n){if(!n&&Ye(e)){const n=st(e.index,t);return new as(n,n)}return 2===e.type||0===e.type||3===e.type||4===e.type?new as(t[16],t):null}(gt(),pt(),e)}let bs=(()=>{class e{}return e.__NG_ELEMENT_ID__=()=>gs(),e})();const gs=ms,_s=Function,ys=new U("Set Injector scope."),vs={},ws={},Ss=[];let Ms=void 0;function xs(){return void 0===Ms&&(Ms=new oe),Ms}function ks(e,t=null,n=null,i){return new Ds(e,n,t||xs(),i)}class Ds{constructor(e,t,n,i=null){this.parent=n,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;const r=[];t&&ue(t,n=>this.processProvider(n,e,t)),ue([e],e=>this.processInjectorType(e,[],r)),this.records.set(q,Os(void 0,this));const s=this.records.get(ys);this.scope=null!=s?s.value:null,this.source=i||("object"==typeof e?null:C(e))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(e=>e.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(e,t=G,n=m.Default){this.assertNotDestroyed();const i=ee(this);try{if(!(n&m.SkipSelf)){let t=this.records.get(e);if(void 0===t){const n=("function"==typeof(r=e)||"object"==typeof r&&r instanceof U)&&v(e);t=n&&this.injectableDefInScope(n)?Os(Ts(e),vs):null,this.records.set(e,t)}if(null!=t)return this.hydrate(e,t)}return(n&m.Self?xs():this.parent).get(e,t=n&m.Optional&&t===G?null:t)}catch(s){if("NullInjectorError"===s.name){if((s.ngTempTokenPath=s.ngTempTokenPath||[]).unshift(C(e)),i)throw s;return function(e,t,n,i){const r=e.ngTempTokenPath;throw t[Q]&&r.unshift(t[Q]),e.message=function(e,t,n,i=null){e=e&&"\n"===e.charAt(0)&&"\u0275"==e.charAt(1)?e.substr(2):e;let r=C(t);if(Array.isArray(t))r=t.map(C).join(" -> ");else if("object"==typeof t){let e=[];for(let n in t)if(t.hasOwnProperty(n)){let i=t[n];e.push(n+":"+("string"==typeof i?JSON.stringify(i):C(i)))}r=`{${e.join(", ")}}`}return`${n}${i?"("+i+")":""}[${r}]: ${e.replace(J,"\n ")}`}("\n"+e.message,r,n,i),e.ngTokenPath=r,e.ngTempTokenPath=null,e}(s,e,"R3InjectorError",this.source)}throw s}finally{ee(i)}var r}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(e=>this.get(e))}toString(){const e=[];return this.records.forEach((t,n)=>e.push(C(n))),`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}processInjectorType(e,t,n){if(!(e=E(e)))return!1;let i=S(e);const r=null==i&&e.ngModule||void 0,s=void 0===r?e:r,o=-1!==n.indexOf(s);if(void 0!==r&&(i=S(r)),null==i)return!1;if(null!=i.imports&&!o){let e;n.push(s);try{ue(i.imports,i=>{this.processInjectorType(i,t,n)&&(void 0===e&&(e=[]),e.push(i))})}finally{}if(void 0!==e)for(let t=0;t<e.length;t++){const{ngModule:n,providers:i}=e[t];ue(i,e=>this.processProvider(e,n,i||Ss))}}this.injectorDefTypes.add(s),this.records.set(s,Os(i.factory,vs));const a=i.providers;if(null!=a&&!o){const t=e;ue(a,e=>this.processProvider(e,t,a))}return void 0!==r&&void 0!==e.providers}processProvider(e,t,n){let i=Rs(e=E(e))?e:E(e&&e.provide);const r=function(e,t,n){return Ls(e)?Os(void 0,e.useValue):Os(Cs(e),vs)}(e);if(Rs(e)||!0!==e.multi)this.records.get(i);else{let t=this.records.get(i);t||(t=Os(void 0,vs,!0),t.factory=()=>se(t.multi),this.records.set(i,t)),i=e,t.multi.push(e)}this.records.set(i,r)}hydrate(e,t){var n;return t.value===vs&&(t.value=ws,t.value=t.factory()),"object"==typeof t.value&&t.value&&null!==(n=t.value)&&"object"==typeof n&&"function"==typeof n.ngOnDestroy&&this.onDestroy.add(t.value),t.value}injectableDefInScope(e){return!!e.providedIn&&("string"==typeof e.providedIn?"any"===e.providedIn||e.providedIn===this.scope:this.injectorDefTypes.has(e.providedIn))}}function Ts(e){const t=v(e),n=null!==t?t.factory:Ee(e);if(null!==n)return n;const i=S(e);if(null!==i)return i.factory;if(e instanceof U)throw new Error(`Token ${C(e)} is missing a \u0275prov definition.`);if(e instanceof Function)return function(e){const t=e.length;if(t>0){const n=fe(t,"?");throw new Error(`Can't resolve all parameters for ${C(e)}: (${n.join(", ")}).`)}const n=function(e){const t=e&&(e[M]||e[D]||e[k]&&e[k]());if(t){const n=function(e){if(e.hasOwnProperty("name"))return e.name;const t=(""+e).match(/^function\s*([^\s(]+)/);return null===t?"":t[1]}(e);return console.warn(`DEPRECATED: DI is instantiating a token "${n}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${n}" class.`),t}return null}(e);return null!==n?()=>n.factory(e):()=>new e}(e);throw new Error("unreachable")}function Cs(e,t,n){let i=void 0;if(Rs(e)){const t=E(e);return Ee(t)||Ts(t)}if(Ls(e))i=()=>E(e.useValue);else if((r=e)&&r.useFactory)i=()=>e.useFactory(...se(e.deps||[]));else if(function(e){return!(!e||!e.useExisting)}(e))i=()=>ie(E(e.useExisting));else{const t=E(e&&(e.useClass||e.provide));if(!function(e){return!!e.deps}(e))return Ee(t)||Ts(t);i=()=>new t(...se(e.deps))}var r;return i}function Os(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function Ls(e){return null!==e&&"object"==typeof e&&K in e}function Rs(e){return"function"==typeof e}const Es=function(e,t,n){return function(e,t=null,n=null,i){const r=ks(e,t,n,i);return r._resolveInjectorDefTypes(),r}({name:n},t,e,n)};let As=(()=>{class e{static create(e,t){return Array.isArray(e)?Es(e,t,""):Es(e.providers,e.parent,e.name||"")}}return e.THROW_IF_NOT_FOUND=G,e.NULL=new oe,e.\u0275prov=_({token:e,providedIn:"any",factory:()=>ie(q)}),e.__NG_ELEMENT_ID__=-1,e})();const Is=new U("AnalyzeForEntryComponents");function Ps(e,t,n){let i=n?e.styles:null,r=n?e.classes:null,s=0;if(null!==t)for(let o=0;o<t.length;o++){const e=t[o];"number"==typeof e?s=e:1==s?r=O(r,e):2==s&&(i=O(i,e+": "+t[++o]+";"))}n?e.styles=i:e.stylesWithoutHost=i,n?e.classes=r:e.classesWithoutHost=r}function js(e,t){const n=ot(e)[1],i=n.data.length-1;Ht(n,{directiveStart:i,directiveEnd:i+1})}function Ns(e){let t=Object.getPrototypeOf(e.type.prototype).constructor,n=!0;const i=[e];for(;t;){let r=void 0;if($e(e))r=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new Error("Directives cannot inherit Components");r=t.\u0275dir}if(r){if(n){i.push(r);const t=e;t.inputs=Fs(e.inputs),t.declaredInputs=Fs(e.declaredInputs),t.outputs=Fs(e.outputs);const n=r.hostBindings;n&&$s(e,n);const s=r.viewQuery,o=r.contentQueries;if(s&&Ys(e,s),o&&zs(e,o),g(e.inputs,r.inputs),g(e.declaredInputs,r.declaredInputs),g(e.outputs,r.outputs),$e(r)&&r.data.animation){const t=e.data;t.animation=(t.animation||[]).concat(r.data.animation)}}const t=r.features;if(t)for(let i=0;i<t.length;i++){const r=t[i];r&&r.ngInherit&&r(e),r===Ns&&(n=!1)}}t=Object.getPrototypeOf(t)}!function(e){let t=0,n=null;for(let i=e.length-1;i>=0;i--){const r=e[i];r.hostVars=t+=r.hostVars,r.hostAttrs=Xt(r.hostAttrs,n=Xt(n,r.hostAttrs))}}(i)}function Fs(e){return e===ye?{}:e===ve?[]:e}function Ys(e,t){const n=e.viewQuery;e.viewQuery=n?(e,i)=>{t(e,i),n(e,i)}:t}function zs(e,t){const n=e.contentQueries;e.contentQueries=n?(e,i,r)=>{t(e,i,r),n(e,i,r)}:t}function $s(e,t){const n=e.hostBindings;e.hostBindings=n?(e,i)=>{t(e,i),n(e,i)}:t}let Hs=null;function Ws(){if(!Hs){const e=F.Symbol;if(e&&e.iterator)Hs=e.iterator;else{const e=Object.getOwnPropertyNames(Map.prototype);for(let t=0;t<e.length;++t){const n=e[t];"entries"!==n&&"size"!==n&&Map.prototype[n]===Map.prototype.entries&&(Hs=n)}}}return Hs}class Vs{constructor(e){this.wrapped=e}static wrap(e){return new Vs(e)}static unwrap(e){return Vs.isWrapped(e)?e.wrapped:e}static isWrapped(e){return e instanceof Vs}}function Bs(e){return!!Us(e)&&(Array.isArray(e)||!(e instanceof Map)&&Ws()in e)}function Us(e){return null!==e&&("function"==typeof e||"object"==typeof e)}function qs(e,t,n){return e[t]=n}function Gs(e,t){return e[t]}function Js(e,t,n){return!Object.is(e[t],n)&&(e[t]=n,!0)}function Qs(e,t,n,i){const r=Js(e,t,n);return Js(e,t+1,i)||r}function Ks(e,t,n,i,r){const s=Qs(e,t,n,i);return Js(e,t+2,r)||s}function Zs(e,t,n,i,r,s){const o=Qs(e,t,n,i);return Qs(e,t+2,r,s)||o}function Xs(e,t,n,i){const r=pt();return Js(r,kt(),t)&&(mt(),kr($t(),r,e,t,n,i)),Xs}function eo(e,t,n,i){return Js(e,kt(),n)?t+sn(n)+i:zi}function to(e,t,n,i,r,s){const o=Qs(e,xt(),n,r);return Dt(2),o?t+sn(n)+i+sn(r)+s:zi}function no(e,t,n,i,r,s,o,a){const c=pt(),l=mt(),u=e+Ie,d=l.firstCreatePass?function(e,t,n,i,r,s,o,a,c){const l=t.consts,u=nr(t,e,0,o||null,lt(l,a));mr(t,n,u,lt(l,c)),Ht(t,u);const d=u.tViews=dr(2,u,i,r,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,l);return null!==t.queries&&(t.queries.template(t,u),d.queries=t.queries.embeddedTView(u)),u}(e,l,c,t,n,i,r,s,o):l.data[u];_t(d,!1);const h=c[11].createComment("");Xr(l,c,h,d),Ti(h,c),Rr(c,c[u]=Cr(h,c,h,d)),ze(d)&&cr(l,c,d),null!=o&&lr(c,d,a)}function io(e){return rt(ht.lFrame.contextLView,e)}function ro(e,t=m.Default){const n=pt();return null===n?ie(e,t):yn(gt(),n,E(e),t)}function so(e){return function(e,t){if("class"===t)return e.classes;if("style"===t)return e.styles;const n=e.attrs;if(n){const e=n.length;let i=0;for(;i<e;){const r=n[i];if(Kt(r))break;if(0===r)i+=2;else if("number"==typeof r)for(i++;i<e&&"string"==typeof n[i];)i++;else{if(r===t)return n[i+1];i+=2}}}return null}(gt(),e)}function oo(e,t,n){const i=pt();return Js(i,kt(),t)&&pr(mt(),$t(),i,e,t,i[11],n,!1),oo}function ao(e,t,n,i,r){const s=r?"class":"style";Yr(e,n,t.inputs[s],s,i)}function co(e,t,n,i){const r=pt(),s=mt(),o=Ie+e,a=r[11],c=r[o]=er(t,a,ht.lFrame.currentNamespace),l=s.firstCreatePass?function(e,t,n,i,r,s,o){const a=t.consts,c=nr(t,e,2,r,lt(a,s));return mr(t,n,c,lt(a,o)),null!==c.attrs&&Ps(c,c.attrs,!1),null!==c.mergedAttrs&&Ps(c,c.mergedAttrs,!0),null!==t.queries&&t.queries.elementStart(t,c),c}(e,s,r,0,t,n,i):s.data[o];_t(l,!0);const u=l.mergedAttrs;null!==u&&Qt(a,c,u);const d=l.classes;null!==d&&os(a,c,d);const h=l.styles;null!==h&&ss(a,c,h),Xr(s,r,c,l),0===ht.lFrame.elementDepthCount&&Ti(c,r),ht.lFrame.elementDepthCount++,ze(l)&&(cr(s,r,l),ar(s,l,r)),null!==i&&lr(r,l)}function lo(){let e=gt();yt()?vt():(e=e.parent,_t(e,!1));const t=e;ht.lFrame.elementDepthCount--;const n=mt();n.firstCreatePass&&(Ht(n,e),Fe(e)&&n.queries.elementEnd(e)),null!=t.classesWithoutHost&&function(e){return 0!=(16&e.flags)}(t)&&ao(n,t,pt(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function(e){return 0!=(32&e.flags)}(t)&&ao(n,t,pt(),t.stylesWithoutHost,!1)}function uo(e,t,n,i){co(e,t,n,i),lo()}function ho(e,t,n){const i=pt(),r=mt(),s=e+Ie,o=r.firstCreatePass?function(e,t,n,i,r){const s=t.consts,o=lt(s,i),a=nr(t,e,3,"ng-container",o);return null!==o&&Ps(a,o,!0),mr(t,n,a,lt(s,r)),null!==t.queries&&t.queries.elementStart(t,a),a}(e,r,i,t,n):r.data[s];_t(o,!0);const a=i[s]=i[11].createComment("");Xr(r,i,a,o),Ti(a,i),ze(o)&&(cr(r,i,o),ar(r,o,i)),null!=n&&lr(i,o)}function fo(){let e=gt();const t=mt();yt()?vt():(e=e.parent,_t(e,!1)),t.firstCreatePass&&(Ht(t,e),Fe(e)&&t.queries.elementEnd(e))}function po(e,t,n){ho(e,t,n),fo()}function mo(){return pt()}function bo(e){return!!e&&"function"==typeof e.then}function go(e){return!!e&&"function"==typeof e.subscribe}function _o(e,t,n=!1,i){const r=pt(),s=mt(),o=gt();return function(e,t,n,i,r,s,o=!1,a){const c=ze(i),l=e.firstCreatePass&&(e.cleanup||(e.cleanup=[])),u=Nr(t);let d=!0;if(2===i.type){const h=nt(i,t),f=a?a(h):ye,p=f.target||h,m=u.length,b=a?e=>a(et(e[i.index])).target:i.index;if(Ze(n)){let o=null;if(!a&&c&&(o=function(e,t,n,i){const r=e.cleanup;if(null!=r)for(let s=0;s<r.length-1;s+=2){const e=r[s];if(e===n&&r[s+1]===i){const e=t[7],n=r[s+2];return e.length>n?e[n]:null}"string"==typeof e&&(s+=2)}return null}(e,t,r,i.index)),null!==o)(o.__ngLastListenerFn__||o).__ngNextListenerFn__=s,o.__ngLastListenerFn__=s,d=!1;else{s=vo(i,t,s,!1);const e=n.listen(f.name||p,r,s);u.push(s,e),l&&l.push(r,b,m,m+1)}}else s=vo(i,t,s,!0),p.addEventListener(r,s,o),u.push(s),l&&l.push(r,b,m,o)}const h=i.outputs;let f;if(d&&null!==h&&(f=h[r])){const e=f.length;if(e)for(let n=0;n<e;n+=2){const e=t[f[n]][f[n+1]].subscribe(s),o=u.length;u.push(s,e),l&&l.push(r,i.index,o,-(o+1))}}}(s,r,r[11],o,e,t,n,i),_o}function yo(e,t,n){try{return!1!==t(n)}catch(i){return Fr(e,i),!1}}function vo(e,t,n,i){return function r(s){if(s===Function)return n;const o=2&e.flags?st(e.index,t):t;0==(32&t[2])&&Er(o);let a=yo(t,n,s),c=r.__ngNextListenerFn__;for(;c;)a=yo(t,c,s)&&a,c=c.__ngNextListenerFn__;return i&&!1===a&&(s.preventDefault(),s.returnValue=!1),a}}function wo(e=1){return function(e){return(ht.lFrame.contextLView=function(e,t){for(;e>0;)t=t[15],e--;return t}(e,ht.lFrame.contextLView))[8]}(e)}function So(e,t){let n=null;const i=function(e){const t=e.attrs;if(null!=t){const e=t.indexOf(5);if(0==(1&e))return t[e+1]}return null}(e);for(let r=0;r<t.length;r++){const s=t[r];if("*"!==s){if(null===i?ji(e,s,!0):Ni(i,s))return r}else n=r}return n}function Mo(e){const t=pt()[16][6];if(!t.projection){const n=t.projection=fe(e?e.length:1,null),i=n.slice();let r=t.child;for(;null!==r;){const t=e?So(r,e):0;null!==t&&(i[t]?i[t].projectionNext=r:n[t]=r,i[t]=r),r=r.next}}}let xo=!1;function ko(e){xo=e}function Do(e,t=0,n){const i=pt(),r=mt(),s=nr(r,e,1,null,n||null);null===s.projection&&(s.projection=t),vt(),xo||is(r,i,s)}function To(e,t,n){return Co(e,"",t,"",n),To}function Co(e,t,n,i,r){const s=pt(),o=eo(s,t,n,i);return o!==zi&&pr(mt(),$t(),s,e,o,s[11],r,!1),Co}function Oo(e,t,n,i,r,s,o){const a=pt(),c=to(a,t,n,i,r,s);return c!==zi&&pr(mt(),$t(),a,e,c,a[11],o,!1),Oo}const Lo=[];function Ro(e,t,n,i,r){const s=e[n+1],o=null===t;let a=i?Gi(s):Qi(s),c=!1;for(;0!==a&&(!1===c||o);){const n=e[a+1];Eo(e[a],t)&&(c=!0,e[a+1]=i?Zi(n):Ji(n)),a=i?Gi(n):Qi(n)}c&&(e[n+1]=i?Ji(s):Zi(s))}function Eo(e,t){return null===e||null==t||(Array.isArray(e)?e[1]:e)===t||!(!Array.isArray(e)||"string"!=typeof t)&&be(e,t)>=0}const Ao={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Io(e){return e.substring(Ao.key,Ao.keyEnd)}function Po(e,t){const n=Ao.textEnd;return n===t?-1:(t=Ao.keyEnd=function(e,t,n){for(;t<n&&e.charCodeAt(t)>32;)t++;return t}(e,Ao.key=t,n),jo(e,t,n))}function jo(e,t,n){for(;t<n&&e.charCodeAt(t)<=32;)t++;return t}function No(e,t,n){return $o(e,t,n,!1),No}function Fo(e,t){return $o(e,t,null,!0),Fo}function Yo(e){Ho(pe,zo,e,!0)}function zo(e,t){for(let n=function(e){return function(e){Ao.key=0,Ao.keyEnd=0,Ao.value=0,Ao.valueEnd=0,Ao.textEnd=e.length}(e),Po(e,jo(e,0,Ao.textEnd))}(t);n>=0;n=Po(t,n))pe(e,Io(t),!0)}function $o(e,t,n,i){const r=pt(),s=mt(),o=Dt(2);s.firstUpdatePass&&Vo(s,e,o,i),t!==zi&&Js(r,o,t)&&qo(s,s.data[Yt()+Ie],r,r[11],e,r[o+1]=function(e,t){return null==e||("string"==typeof t?e+=t:"object"==typeof e&&(e=C(Yn(e)))),e}(t,n),i,o)}function Ho(e,t,n,i){const r=mt(),s=Dt(2);r.firstUpdatePass&&Vo(r,null,s,i);const o=pt();if(n!==zi&&Js(o,s,n)){const a=r.data[Yt()+Ie];if(Qo(a,i)&&!Wo(r,s)){let e=i?a.classesWithoutHost:a.stylesWithoutHost;null!==e&&(n=O(e,n||"")),ao(r,a,o,n,i)}else!function(e,t,n,i,r,s,o,a){r===zi&&(r=Lo);let c=0,l=0,u=0<r.length?r[0]:null,d=0<s.length?s[0]:null;for(;null!==u||null!==d;){const h=c<r.length?r[c+1]:void 0,f=l<s.length?s[l+1]:void 0;let p=null,m=void 0;u===d?(c+=2,l+=2,h!==f&&(p=d,m=f)):null===d||null!==u&&u<d?(c+=2,p=u):(l+=2,p=d,m=f),null!==p&&qo(e,t,n,i,p,m,o,a),u=c<r.length?r[c]:null,d=l<s.length?s[l]:null}}(r,a,o,o[11],o[s+1],o[s+1]=function(e,t,n){if(null==n||""===n)return Lo;const i=[],r=Yn(n);if(Array.isArray(r))for(let s=0;s<r.length;s++)e(i,r[s],!0);else if("object"==typeof r)for(const s in r)r.hasOwnProperty(s)&&e(i,s,r[s]);else"string"==typeof r&&t(i,r);return i}(e,t,n),i,s)}}function Wo(e,t){return t>=e.expandoStartIndex}function Vo(e,t,n,i){const r=e.data;if(null===r[n+1]){const s=r[Yt()+Ie],o=Wo(e,n);Qo(s,i)&&null===t&&!o&&(t=!1),t=function(e,t,n,i){const r=Ot(e);let s=i?t.residualClasses:t.residualStyles;if(null===r)0===(i?t.classBindings:t.styleBindings)&&(n=Uo(n=Bo(null,e,t,n,i),t.attrs,i),s=null);else{const o=t.directiveStylingLast;if(-1===o||e[o]!==r)if(n=Bo(r,e,t,n,i),null===s){let n=function(e,t,n){const i=n?t.classBindings:t.styleBindings;if(0!==Qi(i))return e[Gi(i)]}(e,t,i);void 0!==n&&Array.isArray(n)&&(n=Bo(null,e,t,n[1],i),n=Uo(n,t.attrs,i),function(e,t,n,i){e[Gi(n?t.classBindings:t.styleBindings)]=i}(e,t,i,n))}else s=function(e,t,n){let i=void 0;const r=t.directiveEnd;for(let s=1+t.directiveStylingLast;s<r;s++)i=Uo(i,e[s].hostAttrs,n);return Uo(i,t.attrs,n)}(e,t,i)}return void 0!==s&&(i?t.residualClasses=s:t.residualStyles=s),n}(r,s,t,i),function(e,t,n,i,r,s){let o=s?t.classBindings:t.styleBindings,a=Gi(o),c=Qi(o);e[i]=n;let l,u=!1;if(Array.isArray(n)){const e=n;l=e[1],(null===l||be(e,l)>0)&&(u=!0)}else l=n;if(r)if(0!==c){const t=Gi(e[a+1]);e[i+1]=qi(t,a),0!==t&&(e[t+1]=Ki(e[t+1],i)),e[a+1]=131071&e[a+1]|i<<17}else e[i+1]=qi(a,0),0!==a&&(e[a+1]=Ki(e[a+1],i)),a=i;else e[i+1]=qi(c,0),0===a?a=i:e[c+1]=Ki(e[c+1],i),c=i;u&&(e[i+1]=Ji(e[i+1])),Ro(e,l,i,!0),Ro(e,l,i,!1),function(e,t,n,i,r){const s=r?e.residualClasses:e.residualStyles;null!=s&&"string"==typeof t&&be(s,t)>=0&&(n[i+1]=Zi(n[i+1]))}(t,l,e,i,s),o=qi(a,c),s?t.classBindings=o:t.styleBindings=o}(r,s,t,n,o,i)}}function Bo(e,t,n,i,r){let s=null;const o=n.directiveEnd;let a=n.directiveStylingLast;for(-1===a?a=n.directiveStart:a++;a<o&&(s=t[a],i=Uo(i,s.hostAttrs,r),s!==e);)a++;return null!==e&&(n.directiveStylingLast=a),i}function Uo(e,t,n){const i=n?1:2;let r=-1;if(null!==t)for(let s=0;s<t.length;s++){const o=t[s];"number"==typeof o?r=o:r===i&&(Array.isArray(e)||(e=void 0===e?[]:["",e]),pe(e,o,!!n||t[++s]))}return void 0===e?null:e}function qo(e,t,n,i,r,s,o,a){if(2!==t.type)return;const c=e.data,l=c[a+1];Jo(1==(1&l)?Go(c,t,n,r,Qi(l),o):void 0)||(Jo(s)||2==(2&l)&&(s=Go(c,null,n,r,a,o)),function(e,t,n,i,r){const s=Ze(e);if(t)r?s?e.addClass(n,i):n.classList.add(i):s?e.removeClass(n,i):n.classList.remove(i);else{const t=-1==i.indexOf("-")?void 0:2;null==r?s?e.removeStyle(n,i,t):n.style.removeProperty(i):s?e.setStyle(n,i,r,t):n.style.setProperty(i,r)}}(i,o,tt(Yt(),n),r,s))}function Go(e,t,n,i,r,s){const o=null===t;let a=void 0;for(;r>0;){const t=e[r],s=Array.isArray(t),c=s?t[1]:t,l=null===c;let u=n[r+1];u===zi&&(u=l?Lo:void 0);let d=l?me(u,i):c===i?u:void 0;if(s&&!Jo(d)&&(d=me(t,i)),Jo(d)&&(a=d,o))return a;const h=e[r+1];r=o?Gi(h):Qi(h)}if(null!==t){let e=s?t.residualClasses:t.residualStyles;null!=e&&(a=me(e,i))}return a}function Jo(e){return void 0!==e}function Qo(e,t){return 0!=(e.flags&(t?16:32))}function Ko(e,t=""){const n=pt(),i=mt(),r=e+Ie,s=i.firstCreatePass?nr(i,e,2,null,null):i.data[r],o=n[r]=Hr(t,n[11]);Xr(i,n,o,s),_t(s,!1)}function Zo(e){return Xo("",e,""),Zo}function Xo(e,t,n){const i=pt(),r=eo(i,e,t,n);return r!==zi&&zr(i,Yt(),r),Xo}function ea(e,t,n,i,r){const s=pt(),o=to(s,e,t,n,i,r);return o!==zi&&zr(s,Yt(),o),ea}function ta(e,t,n,i,r,s,o){const a=pt(),c=function(e,t,n,i,r,s,o,a){const c=Ks(e,xt(),n,r,o);return Dt(3),c?t+sn(n)+i+sn(r)+s+sn(o)+a:zi}(a,e,t,n,i,r,s,o);return c!==zi&&zr(a,Yt(),c),ta}function na(e,t,n){Ho(pe,zo,eo(pt(),e,t,n),!0)}function ia(e,t,n,i,r){Ho(pe,zo,to(pt(),e,t,n,i,r),!0)}function ra(e,t,n,i,r,s,o,a,c){Ho(pe,zo,function(e,t,n,i,r,s,o,a,c,l){const u=Zs(e,xt(),n,r,o,c);return Dt(4),u?t+sn(n)+i+sn(r)+s+sn(o)+a+sn(c)+l:zi}(pt(),e,t,n,i,r,s,o,a,c),!0)}function sa(e,t,n){const i=pt();return Js(i,kt(),t)&&pr(mt(),$t(),i,e,t,i[11],n,!0),sa}function oa(e,t,n){const i=pt();if(Js(i,kt(),t)){const r=mt(),s=$t();pr(r,s,i,e,t,function(e,t,n){return(null===e||$e(e))&&(n=function(e){for(;Array.isArray(e);){if("object"==typeof e[1])return e;e=e[0]}return null}(n[t.index])),n[11]}(Ot(r.data),s,i),n,!0)}return oa}function aa(e,t,n,i,r){if(e=E(e),Array.isArray(e))for(let s=0;s<e.length;s++)aa(e[s],t,n,i,r);else{const s=mt(),o=pt();let a=Rs(e)?e:E(e.provide),c=Cs(e);const l=gt(),u=1048575&l.providerIndexes,d=l.directiveStart,h=l.providerIndexes>>20;if(Rs(e)||!e.multi){const i=new Jt(c,r,ro),f=ua(a,t,r?u:u+h,d);-1===f?(_n(pn(l,o),s,a),ca(s,e,t.length),t.push(a),l.directiveStart++,l.directiveEnd++,r&&(l.providerIndexes+=1048576),n.push(i),o.push(i)):(n[f]=i,o[f]=i)}else{const f=ua(a,t,u+h,d),p=ua(a,t,u,u+h),m=f>=0&&n[f],b=p>=0&&n[p];if(r&&!b||!r&&!m){_n(pn(l,o),s,a);const u=function(e,t,n,i,r){const s=new Jt(e,n,ro);return s.multi=[],s.index=t,s.componentProviders=0,la(s,r,i&&!n),s}(r?ha:da,n.length,r,i,c);!r&&b&&(n[p].providerFactory=u),ca(s,e,t.length,0),t.push(a),l.directiveStart++,l.directiveEnd++,r&&(l.providerIndexes+=1048576),n.push(u),o.push(u)}else ca(s,e,f>-1?f:p,la(n[r?p:f],c,!r&&i));!r&&i&&b&&n[p].componentProviders++}}}function ca(e,t,n,i){const r=Rs(t);if(r||t.useClass){const s=(t.useClass||t).prototype.ngOnDestroy;if(s){const o=e.destroyHooks||(e.destroyHooks=[]);if(!r&&t.multi){const e=o.indexOf(n);-1===e?o.push(n,[i,s]):o[e+1].push(i,s)}else o.push(n,s)}}}function la(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function ua(e,t,n,i){for(let r=n;r<i;r++)if(t[r]===e)return r;return-1}function da(e,t,n,i){return fa(this.multi,[])}function ha(e,t,n,i){const r=this.multi;let s;if(this.providerFactory){const e=this.providerFactory.componentProviders,t=Mn(n,n[1],this.providerFactory.index,i);s=t.slice(0,e),fa(r,s);for(let n=e;n<t.length;n++)s.push(t[n])}else s=[],fa(r,s);return s}function fa(e,t){for(let n=0;n<e.length;n++)t.push((0,e[n])());return t}function pa(e,t=[]){return n=>{n.providersResolver=(n,i)=>function(e,t,n){const i=mt();if(i.firstCreatePass){const r=$e(e);aa(n,i.data,i.blueprint,r,!0),aa(t,i.data,i.blueprint,r,!1)}}(n,i?i(e):e,t)}}class ma{}class ba{}class ga{resolveComponentFactory(e){throw function(e){const t=Error(`No component factory found for ${C(e)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=e,t}(e)}}let _a=(()=>{class e{}return e.NULL=new ga,e})(),ya=(()=>{class e{constructor(e){this.nativeElement=e}}return e.__NG_ELEMENT_ID__=()=>va(e),e})();const va=function(e){return hs(e,gt(),pt())};class wa{}var Sa=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}({});let Ma=(()=>{class e{}return e.__NG_ELEMENT_ID__=()=>xa(),e})();const xa=function(){const e=pt(),t=st(gt().index,e);return function(e){const t=e[11];if(Ze(t))return t;throw new Error("Cannot inject Renderer2 when the application uses Renderer3!")}(je(t)?t:e)};let ka=(()=>{class e{}return e.\u0275prov=_({token:e,providedIn:"root",factory:()=>null}),e})();class Da{constructor(e){this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")}}const Ta=new Da("10.1.5");class Ca{constructor(){}supports(e){return Bs(e)}create(e){return new La(e)}}const Oa=(e,t)=>t;class La{constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||Oa}forEachItem(e){let t;for(t=this._itHead;null!==t;t=t._next)e(t)}forEachOperation(e){let t=this._itHead,n=this._removalsHead,i=0,r=null;for(;t||n;){const s=!n||t&&t.currentIndex<Ia(n,i,r)?t:n,o=Ia(s,i,r),a=s.currentIndex;if(s===n)i--,n=n._nextRemoved;else if(t=t._next,null==s.previousIndex)i++;else{r||(r=[]);const e=o-i,t=a-i;if(e!=t){for(let n=0;n<e;n++){const i=n<r.length?r[n]:r[n]=0,s=i+n;t<=s&&s<e&&(r[n]=i+1)}r[s.previousIndex]=t-e}}o!==a&&e(s,o,a)}}forEachPreviousItem(e){let t;for(t=this._previousItHead;null!==t;t=t._nextPrevious)e(t)}forEachAddedItem(e){let t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)}forEachMovedItem(e){let t;for(t=this._movesHead;null!==t;t=t._nextMoved)e(t)}forEachRemovedItem(e){let t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)}forEachIdentityChange(e){let t;for(t=this._identityChangesHead;null!==t;t=t._nextIdentityChange)e(t)}diff(e){if(null==e&&(e=[]),!Bs(e))throw new Error(`Error trying to diff '${C(e)}'. Only arrays and iterables are allowed`);return this.check(e)?this:null}onDestroy(){}check(e){this._reset();let t,n,i,r=this._itHead,s=!1;if(Array.isArray(e)){this.length=e.length;for(let t=0;t<this.length;t++)n=e[t],i=this._trackByFn(t,n),null!==r&&Object.is(r.trackById,i)?(s&&(r=this._verifyReinsertion(r,n,i,t)),Object.is(r.item,n)||this._addIdentityChange(r,n)):(r=this._mismatch(r,n,i,t),s=!0),r=r._next}else t=0,function(e,t){if(Array.isArray(e))for(let n=0;n<e.length;n++)t(e[n]);else{const n=e[Ws()]();let i;for(;!(i=n.next()).done;)t(i.value)}}(e,e=>{i=this._trackByFn(t,e),null!==r&&Object.is(r.trackById,i)?(s&&(r=this._verifyReinsertion(r,e,i,t)),Object.is(r.item,e)||this._addIdentityChange(r,e)):(r=this._mismatch(r,e,i,t),s=!0),r=r._next,t++}),this.length=t;return this._truncate(r),this.collection=e,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,t,n,i){let r;return null===e?r=this._itTail:(r=e._prev,this._remove(e)),null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(n,i))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,r,i)):null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,r,i)):e=this._addAfter(new Ra(t,n),r,i),e}_verifyReinsertion(e,t,n,i){let r=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==r?e=this._reinsertAfter(r,e._prev,i):e.currentIndex!=i&&(e.currentIndex=i,this._addToMoves(e,i)),e}_truncate(e){for(;null!==e;){const t=e._next;this._addToRemovals(this._unlink(e)),e=t}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,t,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);const i=e._prevRemoved,r=e._nextRemoved;return null===i?this._removalsHead=r:i._nextRemoved=r,null===r?this._removalsTail=i:r._prevRemoved=i,this._insertAfter(e,t,n),this._addToMoves(e,n),e}_moveAfter(e,t,n){return this._unlink(e),this._insertAfter(e,t,n),this._addToMoves(e,n),e}_addAfter(e,t,n){return this._insertAfter(e,t,n),this._additionsTail=null===this._additionsTail?this._additionsHead=e:this._additionsTail._nextAdded=e,e}_insertAfter(e,t,n){const i=null===t?this._itHead:t._next;return e._next=i,e._prev=t,null===i?this._itTail=e:i._prev=e,null===t?this._itHead=e:t._next=e,null===this._linkedRecords&&(this._linkedRecords=new Aa),this._linkedRecords.put(e),e.currentIndex=n,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);const t=e._prev,n=e._next;return null===t?this._itHead=n:t._next=n,null===n?this._itTail=t:n._prev=t,e}_addToMoves(e,t){return e.previousIndex===t||(this._movesTail=null===this._movesTail?this._movesHead=e:this._movesTail._nextMoved=e),e}_addToRemovals(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new Aa),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,t){return e.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=e:this._identityChangesTail._nextIdentityChange=e,e}}class Ra{constructor(e,t){this.item=e,this.trackById=t,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class Ea{constructor(){this._head=null,this._tail=null}add(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,t){let n;for(n=this._head;null!==n;n=n._nextDup)if((null===t||t<=n.currentIndex)&&Object.is(n.trackById,e))return n;return null}remove(e){const t=e._prevDup,n=e._nextDup;return null===t?this._head=n:t._nextDup=n,null===n?this._tail=t:n._prevDup=t,null===this._head}}class Aa{constructor(){this.map=new Map}put(e){const t=e.trackById;let n=this.map.get(t);n||(n=new Ea,this.map.set(t,n)),n.add(e)}get(e,t){const n=this.map.get(e);return n?n.get(e,t):null}remove(e){const t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function Ia(e,t,n){const i=e.previousIndex;if(null===i)return i;let r=0;return n&&i<n.length&&(r=n[i]),i+t+r}class Pa{constructor(){}supports(e){return e instanceof Map||Us(e)}create(){return new ja}}class ja{constructor(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}get isDirty(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead}forEachItem(e){let t;for(t=this._mapHead;null!==t;t=t._next)e(t)}forEachPreviousItem(e){let t;for(t=this._previousMapHead;null!==t;t=t._nextPrevious)e(t)}forEachChangedItem(e){let t;for(t=this._changesHead;null!==t;t=t._nextChanged)e(t)}forEachAddedItem(e){let t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)}forEachRemovedItem(e){let t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)}diff(e){if(e){if(!(e instanceof Map||Us(e)))throw new Error(`Error trying to diff '${C(e)}'. Only maps and objects are allowed`)}else e=new Map;return this.check(e)?this:null}onDestroy(){}check(e){this._reset();let t=this._mapHead;if(this._appendAfter=null,this._forEach(e,(e,n)=>{if(t&&t.key===n)this._maybeAddToChanges(t,e),this._appendAfter=t,t=t._next;else{const i=this._getOrCreateRecordForKey(n,e);t=this._insertBeforeOrAppend(t,i)}}),t){t._prev&&(t._prev._next=null),this._removalsHead=t;for(let e=t;null!==e;e=e._nextRemoved)e===this._mapHead&&(this._mapHead=null),this._records.delete(e.key),e._nextRemoved=e._next,e.previousValue=e.currentValue,e.currentValue=null,e._prev=null,e._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,t){if(e){const n=e._prev;return t._next=e,t._prev=n,e._prev=t,n&&(n._next=t),e===this._mapHead&&(this._mapHead=t),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}_getOrCreateRecordForKey(e,t){if(this._records.has(e)){const n=this._records.get(e);this._maybeAddToChanges(n,t);const i=n._prev,r=n._next;return i&&(i._next=r),r&&(r._prev=i),n._next=null,n._prev=null,n}const n=new Na(e);return this._records.set(e,n),n.currentValue=t,this._addToAdditions(n),n}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,t){Object.is(t,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=t,this._addToChanges(e))}_addToAdditions(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,t){e instanceof Map?e.forEach(t):Object.keys(e).forEach(n=>t(e[n],n))}}class Na{constructor(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}let Fa=(()=>{class e{constructor(e){this.factories=e}static create(t,n){if(null!=n){const e=n.factories.slice();t=t.concat(e)}return new e(t)}static extend(t){return{provide:e,useFactory:n=>{if(!n)throw new Error("Cannot extend IterableDiffers without a parent injector");return e.create(t,n)},deps:[[e,new p,new h]]}}find(e){const t=this.factories.find(t=>t.supports(e));if(null!=t)return t;throw new Error(`Cannot find a differ supporting object '${e}' of type '${n=e,n.name||typeof n}'`);var n}}return e.\u0275prov=_({token:e,providedIn:"root",factory:()=>new e([new Ca])}),e})(),Ya=(()=>{class e{constructor(e){this.factories=e}static create(t,n){if(n){const e=n.factories.slice();t=t.concat(e)}return new e(t)}static extend(t){return{provide:e,useFactory:n=>{if(!n)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return e.create(t,n)},deps:[[e,new p,new h]]}}find(e){const t=this.factories.find(t=>t.supports(e));if(t)return t;throw new Error(`Cannot find a differ supporting object '${e}'`)}}return e.\u0275prov=_({token:e,providedIn:"root",factory:()=>new e([new Pa])}),e})();const za=[new Pa],$a=new Fa([new Ca]),Ha=new Ya(za);let Wa=(()=>{class e{}return e.__NG_ELEMENT_ID__=()=>Va(e,ya),e})();const Va=function(e,t){return fs(e,t,gt(),pt())};let Ba=(()=>{class e{}return e.__NG_ELEMENT_ID__=()=>Ua(e,ya),e})();const Ua=function(e,t){return ps(e,t,gt(),pt())},qa={};class Ga extends _a{constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){const t=Re(e);return new Ka(t,this.ngModule)}}function Ja(e){const t=[];for(let n in e)e.hasOwnProperty(n)&&t.push({propName:e[n],templateName:n});return t}const Qa=new U("SCHEDULER_TOKEN",{providedIn:"root",factory:()=>an});class Ka extends ba{constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=e.selectors.map(Yi).join(","),this.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],this.isBoundToModule=!!t}get inputs(){return Ja(this.componentDef.inputs)}get outputs(){return Ja(this.componentDef.outputs)}create(e,t,n,i){const r=(i=i||this.ngModule)?function(e,t){return{get:(n,i,r)=>{const s=e.get(n,qa,r);return s!==qa||i===qa?s:t.get(n,i,r)}}}(e,i.injector):e,s=r.get(wa,Xe),o=r.get(ka,null),a=s.createRenderer(null,this.componentDef),c=this.componentDef.selectors[0][0]||"div",l=n?function(e,t,n){if(Ze(e))return e.selectRootElement(t,n===_e.ShadowDom);let i="string"==typeof t?e.querySelector(t):t;return i.textContent="",i}(a,n,this.componentDef.encapsulation):er(c,s.createRenderer(null,this.componentDef),function(e){const t=e.toLowerCase();return"svg"===t?"http://www.w3.org/2000/svg":"math"===t?"http://www.w3.org/1998/MathML/":null}(c)),u=this.componentDef.onPush?576:528,d={components:[],scheduler:an,clean:jr,playerHandler:null,flags:0},h=dr(0,null,null,1,0,null,null,null,null,null),f=tr(null,h,d,u,null,null,s,a,o,r);let p,m;At(f);try{const e=function(e,t,n,i,r,s){const o=n[1];n[20]=e;const a=nr(o,0,2,null,null),c=a.mergedAttrs=t.hostAttrs;null!==c&&(Ps(a,c,!0),null!==e&&(Qt(r,e,c),null!==a.classes&&os(r,e,a.classes),null!==a.styles&&ss(r,e,a.styles)));const l=i.createRenderer(e,t),u=tr(n,ur(t),null,t.onPush?64:16,n[20],a,i,l,null,null);return o.firstCreatePass&&(_n(pn(a,n),o,t.type),vr(o,a),Sr(a,n.length,1)),Rr(n,u),n[20]=u}(l,this.componentDef,f,s,a);if(l)if(n)Qt(a,l,["ng-version",Ta.full]);else{const{attrs:e,classes:t}=function(e){const t=[],n=[];let i=1,r=2;for(;i<e.length;){let s=e[i];if("string"==typeof s)2===r?""!==s&&t.push(s,e[++i]):8===r&&n.push(s);else{if(!Ii(r))break;r=s}i++}return{attrs:t,classes:n}}(this.componentDef.selectors[0]);e&&Qt(a,l,e),t&&t.length>0&&os(a,l,t.join(" "))}if(m=it(h,0),void 0!==t){const e=m.projection=[];for(let n=0;n<this.ngContentSelectors.length;n++){const i=t[n];e.push(null!=i?Array.from(i):null)}}p=function(e,t,n,i,r){const s=n[1],o=function(e,t,n){const i=gt();e.firstCreatePass&&(n.providersResolver&&n.providersResolver(n),yr(e,i,1),Mr(e,t,n));const r=Mn(t,e,t.length-1,i);Ti(r,t);const s=nt(i,t);return s&&Ti(s,t),r}(s,n,t);i.components.push(o),e[8]=o,r&&r.forEach(e=>e(o,t)),t.contentQueries&&t.contentQueries(1,o,n.length-1);const a=gt();if(s.firstCreatePass&&(null!==t.hostBindings||null!==t.hostAttrs)){zt(a.index-Ie);const e=n[1];br(e,t),gr(e,n,t.hostVars),_r(t,o)}return o}(e,this.componentDef,f,d,[js]),ir(h,f,null)}finally{Ft()}return new Za(this.componentType,p,hs(ya,m,f),f,m)}}class Za extends ma{constructor(e,t,n,i,r){super(),this.location=n,this._rootLView=i,this._tNode=r,this.destroyCbs=[],this.instance=t,this.hostView=this.changeDetectorRef=new cs(i),this.componentType=e}get injector(){return new Dn(this._tNode,this._rootLView)}destroy(){this.destroyCbs&&(this.destroyCbs.forEach(e=>e()),this.destroyCbs=null,!this.hostView.destroyed&&this.hostView.destroy())}onDestroy(e){this.destroyCbs&&this.destroyCbs.push(e)}}const Xa=void 0;var ec=["en",[["a","p"],["AM","PM"],Xa],[["AM","PM"],Xa,Xa],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Xa,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Xa,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Xa,"{1} 'at' {0}",Xa],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===n?1:5}];let tc={};function nc(e,t,n){"string"!=typeof t&&(n=t,t=e[ac.LocaleId]),t=t.toLowerCase().replace(/_/g,"-"),tc[t]=e,n&&(tc[t][ac.ExtraData]=n)}function ic(e){const t=function(e){return e.toLowerCase().replace(/_/g,"-")}(e);let n=oc(t);if(n)return n;const i=t.split("-")[0];if(n=oc(i),n)return n;if("en"===i)return ec;throw new Error(`Missing locale data for the locale "${e}".`)}function rc(e){return ic(e)[ac.CurrencyCode]||null}function sc(e){return ic(e)[ac.PluralCase]}function oc(e){return e in tc||(tc[e]=F.ng&&F.ng.common&&F.ng.common.locales&&F.ng.common.locales[e]),tc[e]}var ac=function(e){return e[e.LocaleId=0]="LocaleId",e[e.DayPeriodsFormat=1]="DayPeriodsFormat",e[e.DayPeriodsStandalone=2]="DayPeriodsStandalone",e[e.DaysFormat=3]="DaysFormat",e[e.DaysStandalone=4]="DaysStandalone",e[e.MonthsFormat=5]="MonthsFormat",e[e.MonthsStandalone=6]="MonthsStandalone",e[e.Eras=7]="Eras",e[e.FirstDayOfWeek=8]="FirstDayOfWeek",e[e.WeekendRange=9]="WeekendRange",e[e.DateFormat=10]="DateFormat",e[e.TimeFormat=11]="TimeFormat",e[e.DateTimeFormat=12]="DateTimeFormat",e[e.NumberSymbols=13]="NumberSymbols",e[e.NumberFormats=14]="NumberFormats",e[e.CurrencyCode=15]="CurrencyCode",e[e.CurrencySymbol=16]="CurrencySymbol",e[e.CurrencyName=17]="CurrencyName",e[e.Currencies=18]="Currencies",e[e.Directionality=19]="Directionality",e[e.PluralCase=20]="PluralCase",e[e.ExtraData=21]="ExtraData",e}({});const cc=["zero","one","two","few","many"],lc="en-US";let uc=lc;function dc(e){var t,n;n="Expected localeId to be defined",null==(t=e)&&function(e,t,n,i){throw new Error("ASSERTION ERROR: "+e+` [Expected=> null != ${t} <=Actual]`)}(n,t),"string"==typeof e&&(uc=e.toLowerCase().replace(/_/g,"-"))}const hc={marker:"element"},fc={marker:"comment"},pc=[];let mc=-1,bc=0,gc=0;function _c(e,t,n,i){const r=i[11];let s=null,o=null;const a=[];for(let c=0;c<n.length;c++){const l=n[c];if("string"==typeof l){const t=Hr(l,r),u=n[++c];o=s,s=xc(e,i,u,2,t,null),a.push(u),vt()}else if("number"==typeof l)switch(7&l){case 1:const r=l>>>17;let u;u=r===t?i[6]:it(e,r),o=Sc(e,s,u,o,i);break;case 0:const d=l>=0,h=(d?l:~l)>>>3;a.push(h),o=s,s=it(e,h),s&&_t(s,d);break;case 5:o=s=it(e,l>>>3),_t(s,!1);break;case 4:const f=n[++c],p=n[++c];kr(it(e,l>>>3),i,f,p,null,null);break;default:throw new Error(`Unable to determine the type of mutate operation for "${l}"`)}else switch(l){case fc:const t=n[++c],u=n[++c],d=r.createComment(t);o=s,s=xc(e,i,u,4,d,null),a.push(u),Ti(d,i),vt();break;case hc:const h=n[++c],f=n[++c];o=s,s=xc(e,i,f,2,r.createElement(h),h),a.push(f);break;default:throw new Error(`Unable to determine the type of mutate operation for "${l}"`)}}return vt(),a}function yc(e,t,n,i,r,s){let o=!1;for(let a=0;a<i.length;a++){const c=i[a],l=i[++a];if(c&s){let s="";for(let c=a+1;c<=a+l;c++){const a=i[c];if("string"==typeof a)s+=a;else if("number"==typeof a)if(a<0)s+=sn(n[r-a]);else{const l=a>>>2;switch(3&a){case 1:const a=i[++c],u=i[++c];pr(e,it(e,l),n,a,s,n[11],u,!1);break;case 0:zr(n,l,s);break;case 2:o=wc(e,t,i[++c],n,s);break;case 3:vc(e,t,i[++c],r,n,o)}}}}a+=l}}function vc(e,t,n,i,r,s){const o=t[n],a=r[o.currentCaseLViewIndex];null!==a&&yc(e,t,r,o.update[a],i,s?-1:bc)}function wc(e,t,n,i,r){!function e(t,n,i,r){const s=n[i],o=r[s.currentCaseLViewIndex];if(null!==o){const i=s.remove[o];for(let s=0;s<i.length;s++){const o=i[s],a=o>>>3;switch(7&o){case 3:Mc(t,r,a,!1);break;case 6:e(t,n,a,r)}}}}(e,t,n,i);let s=!1;const o=t[n],a=function(e,t){let n=e.cases.indexOf(t);if(-1===n)switch(e.type){case 1:{const i=function(e,t){const n=sc(t)(parseInt(e,10)),i=cc[n];return void 0!==i?i:"other"}(t,uc);n=e.cases.indexOf(i),-1===n&&"other"!==i&&(n=e.cases.indexOf("other"));break}case 0:n=e.cases.indexOf("other")}return n}(o,r);return i[o.currentCaseLViewIndex]=-1!==a?a:null,a>-1&&(_c(e,-1,o.create[a],i),s=!0),s}function Sc(e,t,n,i,r){const s=t.next;i||(i=n),i===n&&t!==n.child?(t.next=n.child,null===t.parent?e.firstChild=t:n.child=t):i!==n&&t!==i.next?(t.next=i.next,i.next=t):t.next=null,n!==r[6]&&(t.parent=n);let o=t.next;for(;o;)o.next===t&&(o.next=s),o=o.next;if(1===t.type)return is(e,r,t),t;Xr(e,r,nt(t,r),t);const a=r[t.index];return 0!==t.type&&Ne(a)&&Xr(e,r,a[7],t),t}function Mc(e,t,n,i){const r=it(e,n),s=tt(n,t);s&&es(t[11],s);const o=rt(t,n);if(Ne(o)){const e=o;0!==r.type&&es(t[11],e[7])}i&&r&&(r.flags|=64)}function xc(e,t,n,i,r,s){const o=gt();t[n+Ie]=r;const a=nr(e,n,i,s,null);return o&&o.next===a&&(o.next=null),a}const kc=/\ufffd(\d+):?\d*\ufffd/gi,Dc=/({\s*\ufffd\d+:?\d*\ufffd\s*,\s*\S{6}\s*,[\s\S]*})/gi,Tc=/\ufffd(\d+)\ufffd/,Cc=/^\s*(\ufffd\d+:?\d*\ufffd)\s*,\s*(select|plural)\s*,/;let Oc;const Lc=[],Rc=/\ufffd\/?\*(\d+:\d+)\ufffd/gi,Ec=/\ufffd(\/?[#*!]\d+):?\d*\ufffd/gi,Ac=/\uE500/g;function Ic(e,t,n,i=null){const r=[null,null],s=e.split(kc);let o=0;for(let a=0;a<s.length;a++){const e=s[a];if(1&a){const t=parseInt(e,10);r.push(-1-t),o|=Nc(t)}else""!==e&&r.push(e)}return r.push(t<<2|(n?1:0)),n&&r.push(n,i),r[0]=o,r[1]=r.length-2,r}function Pc(e,t=0){let n;t|=Nc(e.mainBinding);for(let i=0;i<e.values.length;i++){const r=e.values[i];for(let e=0;e<r.length;e++){const i=r[e];if("string"==typeof i)for(;n=kc.exec(i);)t|=Nc(parseInt(n[1],10));else t=Pc(i,t)}}return t}function jc(e){return e+Oc++}function Nc(e){return 1<<Math.min(e,31)}function Fc(e){return void 0===e}function Yc(e){let t,n,i="",r=0,s=!1;for(;null!==(t=Rc.exec(e));)s?t[0]===`\ufffd/*${n}\ufffd`&&(r=t.index,s=!1):(i+=e.substring(r,t.index+t[0].length),n=t[1],s=!0);return i+=e.substr(r),i}function zc(e,t,n,i){const r=[],s=[],o=[],a=[],c=[],l=t.values;for(let u=0;u<l.length;u++){const t=l[u],d=[];for(let e=0;e<t.length;e++){const n=t[e];if("string"!=typeof n){const i=d.push(n)-1;t[e]=`\x3c!--\ufffd${i}\ufffd--\x3e`}}const h=Hc(t.join(""),n,d,e,i);r.push(h.create),s.push(h.remove),o.push(h.update),a.push(h.vars),c.push(h.childIcus)}e.push({type:t.type,vars:a,currentCaseLViewIndex:Ie+i+1,childIcus:c,cases:t.cases,create:r,remove:s,update:o}),Oc+=Math.max(...a)}function $c(e){const t=[],n=[];let i=1,r=0;const s=Wc(e=e.replace(Cc,(function(e,t,n){return i="select"===n?0:1,r=parseInt(t.substr(1),10),""})));for(let o=0;o<s.length;){let e=s[o++].trim();1===i&&(e=e.replace(/\s*(?:=)?(\w+)\s*/,"$1")),e.length&&t.push(e);const r=Wc(s[o++]);t.length>n.length&&n.push(r)}return{type:i,mainBinding:r,cases:t,values:n}}function Hc(e,t,n,i,r){const s=Kn(Ke()).getInertBodyElement(e);if(!s)throw new Error("Unable to generate inert body element");const o={vars:1,childIcus:[],create:[],remove:[],update:[]};return function e(t,n,i,r,s,o){if(t){const a=[];for(;t;){const c=t.nextSibling,l=o+ ++n.vars;switch(t.nodeType){case Node.ELEMENT_NODE:const c=t,u=c.tagName.toLowerCase();if(ui.hasOwnProperty(u)){n.create.push(hc,u,l,i<<17|1);const a=c.attributes;for(let e=0;e<a.length;e++){const t=a.item(e),i=t.name.toLowerCase();t.value.match(kc)?fi.hasOwnProperty(i)&&le(di[i]?Ic(t.value,l,t.name,ni):hi[i]?Ic(t.value,l,t.name,ii):Ic(t.value,l,t.name),n.update):n.create.push(l<<3|4,t.name,t.value)}e(t.firstChild,n,l,r,s,o),n.remove.push(l<<3|3)}else n.vars--;break;case Node.TEXT_NODE:const d=t.textContent||"",h=d.match(kc);n.create.push(h?"":d,l,i<<17|1),n.remove.push(l<<3|3),h&&le(Ic(d,l),n.update);break;case Node.COMMENT_NODE:const f=Tc.exec(t.textContent||"");if(f){const e=parseInt(f[1],10);n.create.push(fc,"",l,i<<17|1),a.push([r[e],l])}else n.vars--;break;default:n.vars--}t=c}for(let e=0;e<a.length;e++){const t=a[e][0],i=a[e][1];zc(s,t,i,o+n.vars);const r=s.length-1;n.vars+=Math.max(...s[r].vars),n.childIcus.push(r);const c=Pc(t);n.update.push(Nc(t.mainBinding),3,-1-t.mainBinding,i<<2|2,r,c,2,i<<2|3,r),n.remove.push(r<<3|6,i<<3|3)}}}((wi(s)||s).firstChild,o,t,n,i,r),o}function Wc(e){if(!e)return[];let t=0;const n=[],i=[],r=/[{}]/g;let s;for(r.lastIndex=0;s=r.exec(e);){const r=s.index;if("}"==s[0]){if(n.pop(),0==n.length){const n=e.substring(t,r);Cc.test(n)?i.push($c(n)):i.push(n),t=r+1}}else{if(0==n.length){const n=e.substring(t,r);i.push(n),t=r+1}n.push("{")}}const o=e.substring(t);return i.push(o),i}const Vc=/\[(\ufffd.+?\ufffd?)\]/,Bc=/\[(\ufffd.+?\ufffd?)\]|(\ufffd\/?\*\d+:\d+\ufffd)/g,Uc=/({\s*)(VAR_(PLURAL|SELECT)(_\d+)?)(\s*,)/g,qc=/{([A-Z0-9_]+)}/g,Gc=/\ufffdI18N_EXP_(ICU(_\d+)?)\ufffd/g,Jc=/\/\*/,Qc=/\d+\:(\d+)/;function Kc(e,t,n){const i=mt(),r=lt(i.consts,t);!function(e){pc[++mc]=e}(e),ko(!0),i.firstCreatePass&&null===i.data[e+Ie]&&function(e,t,n,i,r){const s=t.blueprint.length-Ie;Oc=0;const o=gt(),a=yt()?o:o&&o.parent;let c=a&&a!==e[6]?a.index-Ie:n,l=0;Lc[l]=c;const u=[];if(n>0&&o!==a){let e=o.index-Ie;yt()||(e=~e),u.push(e<<3|0)}const d=[],h=[];if(""===i&&Fc(r))u.push(i,jc(s),c<<17|1);else{const e=function(e,t){if(Fc(t))return Yc(e);{const n=e.indexOf(`:${t}\ufffd`)+2+t.toString().length,i=e.search(new RegExp(`\ufffd\\/\\*\\d+:${t}\ufffd`));return Yc(e.substring(n,i))}}(i,r),t=(f=e,f.replace(Ac," ")).split(Ec);for(let n=0;n<t.length;n++){let i=t[n];if(1&n)if("/"===i.charAt(0)){if("#"===i.charAt(1)){const e=parseInt(i.substr(2),10);c=Lc[--l],u.push(e<<3|5)}}else{const e=parseInt(i.substr(1),10),t="#"===i.charAt(0);u.push((t?e:~e)<<3|0,c<<17|1),t&&(Lc[++l]=c=e)}else{const t=Wc(i);for(let n=0;n<t.length;n++)if(1&n){const i=t[n];if("object"!=typeof i)throw new Error(`Unable to parse ICU expression in "${e}" message.`);const r=jc(s);u.push(fc,"",r,c<<17|1);const o=Pc(i);zc(h,i,r,r);const a=h.length-1;d.push(Nc(i.mainBinding),3,-1-i.mainBinding,r<<2|2,a,o,2,r<<2|3,a)}else if(""!==t[n]){const e=t[n],i=e.match(kc),r=jc(s);u.push(i?"":e,r,c<<17|1),i&&le(Ic(e,r),d)}}}}var f;Oc>0&&function(e,t,n){if(n>0&&e.firstCreatePass){for(let i=0;i<n;i++)e.blueprint.push(null),e.data.push(null),t.push(null);e.expandoInstructions?e.expandoInstructions.push(n):e.expandoStartIndex+=n}}(t,e,Oc),t.data[n+Ie]={vars:Oc,create:u,update:d,icus:h.length?h:null}}(pt(),i,e,r,n)}function Zc(){const e=pt();(function(e,t){const n=pc[mc--],i=e.data[n+Ie],r=gt(),s=_c(e,n,i.create,t);let o=n+1;for(;null!==r&&o<=r.index-Ie;){-1===s.indexOf(o)&&Mc(e,t,o,!0);const n=it(e,o);!n||0!==n.type&&2!==n.type&&3!==n.type||null===n.localNames||(o+=n.localNames.length>>1),o++}})(mt(),e),ko(!1)}function Xc(e,t,n){Kc(e,t,n),Zc()}function el(e,t){const n=pt(),i=mt();!function(e,t,n,i){const r=gt().index-Ie,s=[];for(let o=0;o<i.length;o+=2){const a=i[o],c=i[o+1].split(Dc);for(let i=0;i<c.length;i++){const o=c[i];if(1&i)throw new Error("ICU expressions are not yet supported in attributes");if(""!==o)if(o.match(kc))t.firstCreatePass&&null===t.data[n+Ie]&&le(Ic(o,r,a),s);else{const n=it(t,r);2===n.type&&kr(n,e,a,o,null,null);const i=null!==n.inputs&&n.inputs[a];i&&Yr(t,e,i,a,o)}}}t.firstCreatePass&&null===t.data[n+Ie]&&(t.data[n+Ie]=s)}(n,i,e,lt(i.consts,t))}function tl(e){return Js(pt(),kt(),e)&&(bc|=1<<gc),gc++,tl}function nl(e){!function(e,t,n){if(gc>0){const i=e.data[n+Ie];let r,s=null;Array.isArray(i)?r=i:(r=i.update,s=i.icus),yc(e,s,t,r,xt()-gc-1,bc),bc=0,gc=0}}(mt(),pt(),e)}function il(e,t={}){return function(e,t={}){let n=e;if(Vc.test(e)){const e={},t=[0];n=n.replace(Bc,(n,i,r)=>{const s=i||r,o=e[s]||[];if(o.length||(s.split("|").forEach(e=>{const t=e.match(Qc),n=t?parseInt(t[1],10):0,i=Jc.test(e);o.push([n,i,e])}),e[s]=o),!o.length)throw new Error("i18n postprocess: unmatched placeholder - "+s);const a=t[t.length-1];let c=0;for(let e=0;e<o.length;e++)if(o[e][0]===a){c=e;break}const[l,u,d]=o[c];return u?t.pop():a!==l&&t.push(l),o.splice(c,1),d})}return Object.keys(t).length?(n=n.replace(Uc,(e,n,i,r,s,o)=>t.hasOwnProperty(i)?`${n}${t[i]}${o}`:e),n=n.replace(qc,(e,n)=>t.hasOwnProperty(n)?t[n]:e),n=n.replace(Gc,(e,n)=>{if(t.hasOwnProperty(n)){const i=t[n];if(!i.length)throw new Error(`i18n postprocess: unmatched ICU - ${e} with key: ${n}`);return i.shift()}return e}),n):n}(e,t)}const rl=new Map;class sl extends ae{constructor(e,t){super(),this._parent=t,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new Ga(this);const n=Ae(e),i=e[W]||null;i&&dc(i),this._bootstrapComponents=un(n.bootstrap),this._r3Injector=ks(e,t,[{provide:ae,useValue:this},{provide:_a,useValue:this.componentFactoryResolver}],C(e)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(e)}get(e,t=As.THROW_IF_NOT_FOUND,n=m.Default){return e===As||e===ae||e===q?this:this._r3Injector.get(e,t,n)}destroy(){const e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}}class ol extends ce{constructor(e){super(),this.moduleType=e,null!==Ae(e)&&function e(t){if(null!==t.\u0275mod.id){const e=t.\u0275mod.id;(function(e,t,n){if(t&&t!==n)throw new Error(`Duplicate module registered for ${e} - ${C(t)} vs ${C(t.name)}`)})(e,rl.get(e),t),rl.set(e,t)}let n=t.\u0275mod.imports;n instanceof Function&&(n=n()),n&&n.forEach(t=>e(t))}(e)}create(e){return new sl(this.moduleType,e)}}function al(e,t,n){const i=Mt()+e,r=pt();return r[i]===zi?qs(r,i,n?t.call(n):t()):Gs(r,i)}function cl(e,t,n,i){return pl(pt(),Mt(),e,t,n,i)}function ll(e,t,n,i,r){return ml(pt(),Mt(),e,t,n,i,r)}function ul(e,t,n,i,r,s){return bl(pt(),Mt(),e,t,n,i,r,s)}function dl(e,t,n,i,r,s,o){return function(e,t,n,i,r,s,o,a,c){const l=t+n;return Zs(e,l,r,s,o,a)?qs(e,l+4,c?i.call(c,r,s,o,a):i(r,s,o,a)):fl(e,l+4)}(pt(),Mt(),e,t,n,i,r,s,o)}function hl(e,t,n,i,r,s,o,a){const c=Mt()+e,l=pt(),u=Zs(l,c,n,i,r,s);return Js(l,c+4,o)||u?qs(l,c+5,a?t.call(a,n,i,r,s,o):t(n,i,r,s,o)):Gs(l,c+5)}function fl(e,t){const n=e[t];return n===zi?void 0:n}function pl(e,t,n,i,r,s){const o=t+n;return Js(e,o,r)?qs(e,o+1,s?i.call(s,r):i(r)):fl(e,o+1)}function ml(e,t,n,i,r,s,o){const a=t+n;return Qs(e,a,r,s)?qs(e,a+2,o?i.call(o,r,s):i(r,s)):fl(e,a+2)}function bl(e,t,n,i,r,s,o,a){const c=t+n;return Ks(e,c,r,s,o)?qs(e,c+3,a?i.call(a,r,s,o):i(r,s,o)):fl(e,c+3)}function gl(e,t){const n=mt();let i;const r=e+Ie;n.firstCreatePass?(i=function(e,t){if(t)for(let n=t.length-1;n>=0;n--){const i=t[n];if(e===i.name)return i}throw new Error(`The pipe '${e}' could not be found!`)}(t,n.pipeRegistry),n.data[r]=i,i.onDestroy&&(n.destroyHooks||(n.destroyHooks=[])).push(r,i.onDestroy)):i=n.data[r];const s=i.factory||(i.factory=Ee(i.type)),o=te(ro);try{const t=hn(!1),i=s();return hn(t),function(e,t,n,i){const r=n+Ie;r>=e.data.length&&(e.data[r]=null,e.blueprint[r]=null),t[r]=i}(n,pt(),e,i),i}finally{te(o)}}function _l(e,t,n){const i=pt(),r=rt(i,e);return Sl(i,wl(i,e)?pl(i,Mt(),t,r.transform,n,r):r.transform(n))}function yl(e,t,n,i){const r=pt(),s=rt(r,e);return Sl(r,wl(r,e)?ml(r,Mt(),t,s.transform,n,i,s):s.transform(n,i))}function vl(e,t,n,i,r){const s=pt(),o=rt(s,e);return Sl(s,wl(s,e)?bl(s,Mt(),t,o.transform,n,i,r,o):o.transform(n,i,r))}function wl(e,t){return e[1].data[t+Ie].pure}function Sl(e,t){return Vs.isWrapped(t)&&(t=Vs.unwrap(t),e[xt()]=zi),t}const Ml=class extends i.a{constructor(e=!1){super(),this.__isAsync=e}emit(e){super.next(e)}subscribe(e,t,n){let i,s=e=>null,o=()=>null;e&&"object"==typeof e?(i=this.__isAsync?t=>{setTimeout(()=>e.next(t))}:t=>{e.next(t)},e.error&&(s=this.__isAsync?t=>{setTimeout(()=>e.error(t))}:t=>{e.error(t)}),e.complete&&(o=this.__isAsync?()=>{setTimeout(()=>e.complete())}:()=>{e.complete()})):(i=this.__isAsync?t=>{setTimeout(()=>e(t))}:t=>{e(t)},t&&(s=this.__isAsync?e=>{setTimeout(()=>t(e))}:e=>{t(e)}),n&&(o=this.__isAsync?()=>{setTimeout(()=>n())}:()=>{n()}));const a=super.subscribe(i,s,o);return e instanceof r.a&&e.add(a),a}};function xl(){return this._results[Ws()]()}class kl{constructor(){this.dirty=!0,this._results=[],this.changes=new Ml,this.length=0;const e=Ws(),t=kl.prototype;t[e]||(t[e]=xl)}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e){this._results=function e(t,n){void 0===n&&(n=t);for(let i=0;i<t.length;i++){let r=t[i];Array.isArray(r)?(n===t&&(n=t.slice(0,i)),e(r,n)):n!==t&&n.push(r)}return n}(e),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]}notifyOnChanges(){this.changes.emit(this)}setDirty(){this.dirty=!0}destroy(){this.changes.complete(),this.changes.unsubscribe()}}class Dl{constructor(e){this.queryList=e,this.matches=null}clone(){return new Dl(this.queryList)}setDirty(){this.queryList.setDirty()}}class Tl{constructor(e=[]){this.queries=e}createEmbeddedView(e){const t=e.queries;if(null!==t){const n=null!==e.contentQueries?e.contentQueries[0]:t.length,i=[];for(let e=0;e<n;e++){const n=t.getByIndex(e);i.push(this.queries[n.indexInDeclarationView].clone())}return new Tl(i)}return null}insertView(e){this.dirtyQueriesWithMatches(e)}detachView(e){this.dirtyQueriesWithMatches(e)}dirtyQueriesWithMatches(e){for(let t=0;t<this.queries.length;t++)null!==Vl(e,t).matches&&this.queries[t].setDirty()}}class Cl{constructor(e,t,n,i=null){this.predicate=e,this.descendants=t,this.isStatic=n,this.read=i}}class Ol{constructor(e=[]){this.queries=e}elementStart(e,t){for(let n=0;n<this.queries.length;n++)this.queries[n].elementStart(e,t)}elementEnd(e){for(let t=0;t<this.queries.length;t++)this.queries[t].elementEnd(e)}embeddedTView(e){let t=null;for(let n=0;n<this.length;n++){const i=null!==t?t.length:0,r=this.getByIndex(n).embeddedTView(e,i);r&&(r.indexInDeclarationView=n,null!==t?t.push(r):t=[r])}return null!==t?new Ol(t):null}template(e,t){for(let n=0;n<this.queries.length;n++)this.queries[n].template(e,t)}getByIndex(e){return this.queries[e]}get length(){return this.queries.length}track(e){this.queries.push(e)}}class Ll{constructor(e,t=-1){this.metadata=e,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=t}elementStart(e,t){this.isApplyingToNode(t)&&this.matchTNode(e,t)}elementEnd(e){this._declarationNodeIndex===e.index&&(this._appliesToNextNode=!1)}template(e,t){this.elementStart(e,t)}embeddedTView(e,t){return this.isApplyingToNode(e)?(this.crossesNgTemplate=!0,this.addMatch(-e.index,t),new Ll(this.metadata)):null}isApplyingToNode(e){if(this._appliesToNextNode&&!1===this.metadata.descendants){const t=this._declarationNodeIndex;let n=e.parent;for(;null!==n&&3===n.type&&n.index!==t;)n=n.parent;return t===(null!==n?n.index:-1)}return this._appliesToNextNode}matchTNode(e,t){const n=this.metadata.predicate;if(Array.isArray(n))for(let i=0;i<n.length;i++){const r=n[i];this.matchTNodeWithReadOption(e,t,Rl(t,r)),this.matchTNodeWithReadOption(e,t,Sn(t,e,r,!1,!1))}else n===Wa?0===t.type&&this.matchTNodeWithReadOption(e,t,-1):this.matchTNodeWithReadOption(e,t,Sn(t,e,n,!1,!1))}matchTNodeWithReadOption(e,t,n){if(null!==n){const i=this.metadata.read;if(null!==i)if(i===ya||i===Ba||i===Wa&&0===t.type)this.addMatch(t.index,-2);else{const n=Sn(t,e,i,!1,!1);null!==n&&this.addMatch(t.index,n)}else this.addMatch(t.index,n)}}addMatch(e,t){null===this.matches?this.matches=[e,t]:this.matches.push(e,t)}}function Rl(e,t){const n=e.localNames;if(null!==n)for(let i=0;i<n.length;i+=2)if(n[i]===t)return n[i+1];return null}function El(e,t,n,i){return-1===n?function(e,t){return 2===e.type||3===e.type?hs(ya,e,t):0===e.type?fs(Wa,ya,e,t):null}(t,e):-2===n?function(e,t,n){return n===ya?hs(ya,t,e):n===Wa?fs(Wa,ya,t,e):n===Ba?ps(Ba,ya,t,e):void 0}(e,t,i):Mn(e,e[1],n,t)}function Al(e,t,n,i){const r=t[19].queries[i];if(null===r.matches){const i=e.data,s=n.matches,o=[];for(let e=0;e<s.length;e+=2){const r=s[e];o.push(r<0?null:El(t,i[r],s[e+1],n.metadata.read))}r.matches=o}return r.matches}function Il(e){const t=pt(),n=mt(),i=Lt();Rt(i+1);const r=Vl(n,i);if(e.dirty&&at(t)===r.metadata.isStatic){if(null===r.matches)e.reset([]);else{const s=r.crossesNgTemplate?function e(t,n,i,r){const s=t.queries.getByIndex(i),o=s.matches;if(null!==o){const a=Al(t,n,s,i);for(let t=0;t<o.length;t+=2){const i=o[t];if(i>0)r.push(a[t/2]);else{const s=o[t+1],a=n[-i];for(let t=Pe;t<a.length;t++){const n=a[t];n[17]===n[3]&&e(n[1],n,s,r)}if(null!==a[9]){const t=a[9];for(let n=0;n<t.length;n++){const i=t[n];e(i[1],i,s,r)}}}}}return r}(n,t,i,[]):Al(n,t,r,i);e.reset(s),e.notifyOnChanges()}return!0}return!1}function Pl(e,t,n){Nl(mt(),pt(),e,t,n,!0)}function jl(e,t,n){Nl(mt(),pt(),e,t,n,!1)}function Nl(e,t,n,i,r,s){e.firstCreatePass&&(Wl(e,new Cl(n,i,s,r),-1),s&&(e.staticViewQueries=!0)),Hl(e,t)}function Fl(e,t,n,i){zl(mt(),pt(),t,n,i,!1,gt(),e)}function Yl(e,t,n,i){zl(mt(),pt(),t,n,i,!0,gt(),e)}function zl(e,t,n,i,r,s,o,a){e.firstCreatePass&&(Wl(e,new Cl(n,i,s,r),o.index),function(e,t){const n=e.contentQueries||(e.contentQueries=[]);t!==(e.contentQueries.length?n[n.length-1]:-1)&&n.push(e.queries.length-1,t)}(e,a),s&&(e.staticContentQueries=!0)),Hl(e,t)}function $l(){return e=pt(),t=Lt(),e[19].queries[t].queryList;var e,t}function Hl(e,t){const n=new kl;hr(e,t,n,n.destroy),null===t[19]&&(t[19]=new Tl),t[19].queries.push(new Dl(n))}function Wl(e,t,n){null===e.queries&&(e.queries=new Ol),e.queries.track(new Ll(t,n))}function Vl(e,t){return e.queries.getByIndex(t)}function Bl(e,t){return fs(Wa,ya,e,t)}function Ul(e=m.Default){const t=ms(!0);if(null!=t||e&m.Optional)return t;throw new Error("No provider for ChangeDetectorRef!")}const ql=new U("Application Initializer");let Gl=(()=>{class e{constructor(e){this.appInits=e,this.initialized=!1,this.done=!1,this.donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}runInitializers(){if(this.initialized)return;const e=[],t=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let n=0;n<this.appInits.length;n++){const t=this.appInits[n]();bo(t)&&e.push(t)}Promise.all(e).then(()=>{t()}).catch(e=>{this.reject(e)}),0===e.length&&t(),this.initialized=!0}}return e.\u0275fac=function(t){return new(t||e)(ie(ql,8))},e.\u0275prov=_({token:e,factory:e.\u0275fac}),e})();const Jl=new U("AppId"),Ql={provide:Jl,useFactory:function(){return`${Kl()}${Kl()}${Kl()}`},deps:[]};function Kl(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const Zl=new U("Platform Initializer"),Xl=new U("Platform ID"),eu=new U("appBootstrapListener");let tu=(()=>{class e{log(e){console.log(e)}warn(e){console.warn(e)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=_({token:e,factory:e.\u0275fac}),e})();const nu=new U("LocaleId"),iu=new U("DefaultCurrencyCode");class ru{constructor(e,t){this.ngModuleFactory=e,this.componentFactories=t}}const su=function(e){return new ol(e)},ou=su,au=function(e){return Promise.resolve(su(e))},cu=function(e){const t=su(e),n=un(Ae(e).declarations).reduce((e,t)=>{const n=Re(t);return n&&e.push(new Ka(n)),e},[]);return new ru(t,n)},lu=cu,uu=function(e){return Promise.resolve(cu(e))};let du=(()=>{class e{constructor(){this.compileModuleSync=ou,this.compileModuleAsync=au,this.compileModuleAndAllComponentsSync=lu,this.compileModuleAndAllComponentsAsync=uu}clearCache(){}clearCacheFor(e){}getModuleId(e){}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=_({token:e,factory:e.\u0275fac}),e})();const hu=(()=>Promise.resolve(0))();function fu(e){"undefined"==typeof Zone?hu.then(()=>{e&&e.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",e)}class pu{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:t=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Ml(!1),this.onMicrotaskEmpty=new Ml(!1),this.onStable=new Ml(!1),this.onError=new Ml(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched();const n=this;n._nesting=0,n._outer=n._inner=Zone.current,Zone.wtfZoneSpec&&(n._inner=n._inner.fork(Zone.wtfZoneSpec)),Zone.TaskTrackingZoneSpec&&(n._inner=n._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(n._inner=n._inner.fork(Zone.longStackTraceZoneSpec)),n.shouldCoalesceEventChangeDetection=t,n.lastRequestAnimationFrameId=-1,n.nativeRequestAnimationFrame=function(){let e=F.requestAnimationFrame,t=F.cancelAnimationFrame;if("undefined"!=typeof Zone&&e&&t){const n=e[Zone.__symbol__("OriginalDelegate")];n&&(e=n);const i=t[Zone.__symbol__("OriginalDelegate")];i&&(t=i)}return{nativeRequestAnimationFrame:e,nativeCancelAnimationFrame:t}}().nativeRequestAnimationFrame,function(e){const t=!!e.shouldCoalesceEventChangeDetection&&e.nativeRequestAnimationFrame&&(()=>{!function(e){-1===e.lastRequestAnimationFrameId&&(e.lastRequestAnimationFrameId=e.nativeRequestAnimationFrame.call(F,()=>{e.fakeTopEventTask||(e.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{e.lastRequestAnimationFrameId=-1,_u(e),gu(e)},void 0,()=>{},()=>{})),e.fakeTopEventTask.invoke()}),_u(e))}(e)});e._inner=e._inner.fork({name:"angular",properties:{isAngularZone:!0,maybeDelayChangeDetection:t},onInvokeTask:(n,i,r,s,o,a)=>{try{return yu(e),n.invokeTask(r,s,o,a)}finally{t&&"eventTask"===s.type&&t(),vu(e)}},onInvoke:(t,n,i,r,s,o,a)=>{try{return yu(e),t.invoke(i,r,s,o,a)}finally{vu(e)}},onHasTask:(t,n,i,r)=>{t.hasTask(i,r),n===i&&("microTask"==r.change?(e._hasPendingMicrotasks=r.microTask,_u(e),gu(e)):"macroTask"==r.change&&(e.hasPendingMacrotasks=r.macroTask))},onHandleError:(t,n,i,r)=>(t.handleError(i,r),e.runOutsideAngular(()=>e.onError.emit(r)),!1)})}(n)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!pu.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(pu.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(e,t,n){return this._inner.run(e,t,n)}runTask(e,t,n,i){const r=this._inner,s=r.scheduleEventTask("NgZoneEvent: "+i,e,bu,mu,mu);try{return r.runTask(s,t,n)}finally{r.cancelTask(s)}}runGuarded(e,t,n){return this._inner.runGuarded(e,t,n)}runOutsideAngular(e){return this._outer.run(e)}}function mu(){}const bu={};function gu(e){if(0==e._nesting&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function _u(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||e.shouldCoalesceEventChangeDetection&&-1!==e.lastRequestAnimationFrameId)}function yu(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function vu(e){e._nesting--,gu(e)}class wu{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Ml,this.onMicrotaskEmpty=new Ml,this.onStable=new Ml,this.onError=new Ml}run(e,t,n){return e.apply(t,n)}runGuarded(e,t,n){return e.apply(t,n)}runOutsideAngular(e){return e()}runTask(e,t,n,i){return e.apply(t,n)}}let Su=(()=>{class e{constructor(e){this._ngZone=e,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{pu.assertNotInAngularZone(),fu(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())fu(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(t=>!t.updateCb||!t.updateCb(e)||(clearTimeout(t.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,t,n){let i=-1;t&&t>0&&(i=setTimeout(()=>{this._callbacks=this._callbacks.filter(e=>e.timeoutId!==i),e(this._didWork,this.getPendingTasks())},t)),this._callbacks.push({doneCb:e,timeoutId:i,updateCb:n})}whenStable(e,t,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(e,t,n),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(e,t,n){return[]}}return e.\u0275fac=function(t){return new(t||e)(ie(pu))},e.\u0275prov=_({token:e,factory:e.\u0275fac}),e})(),Mu=(()=>{class e{constructor(){this._applications=new Map,Tu.addToWindow(this)}registerApplication(e,t){this._applications.set(e,t)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,t=!0){return Tu.findTestabilityInTree(this,e,t)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=_({token:e,factory:e.\u0275fac}),e})();class xu{addToWindow(e){}findTestabilityInTree(e,t,n){return null}}function ku(e){Tu=e}let Du,Tu=new xu;const Cu=new U("AllowMultipleToken");class Ou{constructor(e,t){this.name=e,this.token=t}}function Lu(e,t,n=[]){const i="Platform: "+t,r=new U(i);return(t=[])=>{let s=Ru();if(!s||s.injector.get(Cu,!1))if(e)e(n.concat(t).concat({provide:r,useValue:!0}));else{const e=n.concat(t).concat({provide:r,useValue:!0},{provide:ys,useValue:"platform"});!function(e){if(Du&&!Du.destroyed&&!Du.injector.get(Cu,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Du=e.get(Eu);const t=e.get(Zl,null);t&&t.forEach(e=>e())}(As.create({providers:e,name:i}))}return function(e){const t=Ru();if(!t)throw new Error("No platform exists!");if(!t.injector.get(e,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return t}(r)}}function Ru(){return Du&&!Du.destroyed?Du:null}let Eu=(()=>{class e{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,t){const n=function(e,t){let n;return n="noop"===e?new wu:("zone.js"===e?void 0:e)||new pu({enableLongStackTrace:Jn(),shouldCoalesceEventChangeDetection:t}),n}(t?t.ngZone:void 0,t&&t.ngZoneEventCoalescing||!1),i=[{provide:pu,useValue:n}];return n.run(()=>{const t=As.create({providers:i,parent:this.injector,name:e.moduleType.name}),r=e.create(t),s=r.injector.get(En,null);if(!s)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return r.onDestroy(()=>Pu(this._modules,r)),n.runOutsideAngular(()=>n.onError.subscribe({next:e=>{s.handleError(e)}})),function(e,t,n){try{const i=n();return bo(i)?i.catch(n=>{throw t.runOutsideAngular(()=>e.handleError(n)),n}):i}catch(i){throw t.runOutsideAngular(()=>e.handleError(i)),i}}(s,n,()=>{const e=r.injector.get(Gl);return e.runInitializers(),e.donePromise.then(()=>(dc(r.injector.get(nu,lc)||lc),this._moduleDoBootstrap(r),r))})})}bootstrapModule(e,t=[]){const n=Au({},t);return function(e,t,n){const i=new ol(n);return Promise.resolve(i)}(0,0,e).then(e=>this.bootstrapModuleFactory(e,n))}_moduleDoBootstrap(e){const t=e.injector.get(Iu);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(e=>t.bootstrap(e));else{if(!e.instance.ngDoBootstrap)throw new Error(`The module ${C(e.instance.constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.`);e.instance.ngDoBootstrap(t)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(e=>e.destroy()),this._destroyListeners.forEach(e=>e()),this._destroyed=!0}get destroyed(){return this._destroyed}}return e.\u0275fac=function(t){return new(t||e)(ie(As))},e.\u0275prov=_({token:e,factory:e.\u0275fac}),e})();function Au(e,t){return Array.isArray(t)?t.reduce(Au,e):Object.assign(Object.assign({},e),t)}let Iu=(()=>{class e{constructor(e,t,n,i,r,c){this._zone=e,this._console=t,this._injector=n,this._exceptionHandler=i,this._componentFactoryResolver=r,this._initStatus=c,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=Jn(),this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const l=new s.a(e=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{e.next(this._stable),e.complete()})}),u=new s.a(e=>{let t;this._zone.runOutsideAngular(()=>{t=this._zone.onStable.subscribe(()=>{pu.assertNotInAngularZone(),fu(()=>{this._stable||this._zone.hasPendingMacrotasks||this._zone.hasPendingMicrotasks||(this._stable=!0,e.next(!0))})})});const n=this._zone.onUnstable.subscribe(()=>{pu.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{e.next(!1)}))});return()=>{t.unsubscribe(),n.unsubscribe()}});this.isStable=Object(o.a)(l,u.pipe(Object(a.a)()))}bootstrap(e,t){if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");let n;n=e instanceof ba?e:this._componentFactoryResolver.resolveComponentFactory(e),this.componentTypes.push(n.componentType);const i=n.isBoundToModule?void 0:this._injector.get(ae),r=n.create(As.NULL,[],t||n.selector,i);r.onDestroy(()=>{this._unloadComponent(r)});const s=r.injector.get(Su,null);return s&&r.injector.get(Mu).registerApplication(r.location.nativeElement,s),this._loadComponent(r),Jn()&&this._console.log("Angular is running in development mode. Call enableProdMode() to enable production mode."),r}tick(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;for(let e of this._views)e.detectChanges();if(this._enforceNoNewChanges)for(let e of this._views)e.checkNoChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const t=e;this._views.push(t),t.attachToAppRef(this)}detachView(e){const t=e;Pu(this._views,t),t.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e),this._injector.get(eu,[]).concat(this._bootstrapListeners).forEach(t=>t(e))}_unloadComponent(e){this.detachView(e.hostView),Pu(this.components,e)}ngOnDestroy(){this._views.slice().forEach(e=>e.destroy())}get viewCount(){return this._views.length}}return e.\u0275fac=function(t){return new(t||e)(ie(pu),ie(tu),ie(As),ie(En),ie(_a),ie(Gl))},e.\u0275prov=_({token:e,factory:e.\u0275fac}),e})();function Pu(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class ju{}class Nu{}const Fu={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"};let Yu=(()=>{class e{constructor(e,t){this._compiler=e,this._config=t||Fu}load(e){return this.loadAndCompile(e)}loadAndCompile(e){let[t,i]=e.split("#");return void 0===i&&(i="default"),n("zn8P")(t).then(e=>e[i]).then(e=>zu(e,t,i)).then(e=>this._compiler.compileModuleAsync(e))}loadFactory(e){let[t,i]=e.split("#"),r="NgFactory";return void 0===i&&(i="default",r=""),n("zn8P")(this._config.factoryPathPrefix+t+this._config.factoryPathSuffix).then(e=>e[i+r]).then(e=>zu(e,t,i))}}return e.\u0275fac=function(t){return new(t||e)(ie(du),ie(Nu,8))},e.\u0275prov=_({token:e,factory:e.\u0275fac}),e})();function zu(e,t,n){if(!e)throw new Error(`Cannot find '${n}' in '${t}'`);return e}const $u=function(e){return null},Hu=Lu(null,"core",[{provide:Xl,useValue:"unknown"},{provide:Eu,deps:[As]},{provide:Mu,deps:[]},{provide:tu,deps:[]}]),Wu=[{provide:Iu,useClass:Iu,deps:[pu,tu,As,En,_a,Gl]},{provide:Qa,deps:[pu],useFactory:function(e){let t=[];return e.onStable.subscribe(()=>{for(;t.length;)t.pop()()}),function(e){t.push(e)}}},{provide:Gl,useClass:Gl,deps:[[new h,ql]]},{provide:du,useClass:du,deps:[]},Ql,{provide:Fa,useFactory:function(){return $a},deps:[]},{provide:Ya,useFactory:function(){return Ha},deps:[]},{provide:nu,useFactory:function(e){return dc(e=e||"undefined"!=typeof $localize&&$localize.locale||lc),e},deps:[[new d(nu),new h,new p]]},{provide:iu,useValue:"USD"}];let Vu=(()=>{class e{constructor(e){}}return e.\u0275mod=De({type:e}),e.\u0275inj=y({factory:function(t){return new(t||e)(ie(Iu))},providers:Wu}),e})()},"8YOa":function(e,t,n){var i=n("0BK2"),r=n("hh1v"),s=n("UTVS"),o=n("m/L8").f,a=n("kOOl"),c=n("uy83"),l=a("meta"),u=0,d=Object.isExtensible||function(){return!0},h=function(e){o(e,l,{value:{objectID:"O"+ ++u,weakData:{}}})},f=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!r(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,l)){if(!d(e))return"F";if(!t)return"E";h(e)}return e[l].objectID},getWeakData:function(e,t){if(!s(e,l)){if(!d(e))return!0;if(!t)return!1;h(e)}return e[l].weakData},onFreeze:function(e){return c&&f.REQUIRED&&d(e)&&!s(e,l)&&h(e),e}};i[l]=!0},"8mBD":function(e,t,n){!function(e){"use strict";e.defineLocale("pt",{months:"janeiro_fevereiro_mar\xe7o_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"Domingo_Segunda-feira_Ter\xe7a-feira_Quarta-feira_Quinta-feira_Sexta-feira_S\xe1bado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_S\xe1b".split("_"),weekdaysMin:"Do_2\xaa_3\xaa_4\xaa_5\xaa_6\xaa_S\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje \xe0s] LT",nextDay:"[Amanh\xe3 \xe0s] LT",nextWeek:"dddd [\xe0s] LT",lastDay:"[Ontem \xe0s] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[\xdaltimo] dddd [\xe0s] LT":"[\xdaltima] dddd [\xe0s] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"h\xe1 %s",s:"segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",w:"uma semana",ww:"%d semanas",M:"um m\xeas",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}})}(n("wd/R"))},"8xTl":function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("LvDl"),r=n.n(i),s=n("8Y7J");let o=(()=>{class e{transform(e){return r.a.upperFirst(e)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=s.Lb({name:"upperFirst",type:e,pure:!0}),e})()},"9/5/":function(e,t){var n=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,s=/^0o[0-7]+$/i,o=parseInt,a="object"==typeof global&&global&&global.Object===Object&&global,c="object"==typeof self&&self&&self.Object===Object&&self,l=a||c||Function("return this")(),u=Object.prototype.toString,d=Math.max,h=Math.min,f=function(){return l.Date.now()};function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(e))return NaN;if(p(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=p(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var a=r.test(e);return a||s.test(e)?o(e.slice(2),a?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var i,r,s,o,a,c,l=0,u=!1,b=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function _(t){var n=i,s=r;return i=r=void 0,l=t,o=e.apply(s,n)}function y(e){return l=e,a=setTimeout(w,t),u?_(e):o}function v(e){var n=e-c;return void 0===c||n>=t||n<0||b&&e-l>=s}function w(){var e=f();if(v(e))return S(e);a=setTimeout(w,function(e){var n=t-(e-c);return b?h(n,s-(e-l)):n}(e))}function S(e){return a=void 0,g&&i?_(e):(i=r=void 0,o)}function M(){var e=f(),n=v(e);if(i=arguments,r=this,c=e,n){if(void 0===a)return y(c);if(b)return a=setTimeout(w,t),_(c)}return void 0===a&&(a=setTimeout(w,t)),o}return t=m(t)||0,p(n)&&(u=!!n.leading,s=(b="maxWait"in n)?d(m(n.maxWait)||0,t):s,g="trailing"in n?!!n.trailing:g),M.cancel=function(){void 0!==a&&clearTimeout(a),l=0,i=c=r=a=void 0},M.flush=function(){return void 0===a?o:S(f())},M}},"93I0":function(e,t,n){var i=n("VpIT"),r=n("kOOl"),s=i("keys");e.exports=function(e){return s[e]||(s[e]=r(e))}},"9Xeq":function(e,t,n){"use strict";n.d(t,"a",(function(){return T}));var i=n("SVse"),r=n("yT6U"),s=n("iExv"),o=n("4DD9"),a=n("a0VL"),c=n("+0ag"),l=n("85J/"),u=n("IzCI"),d=n("Fgil"),h=n("o4+5"),f=n("nSDx"),p=n("8Y7J");let m=(()=>{class e{transform(e){return encodeURIComponent(e)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=p.Lb({name:"encodeUri",type:e,pure:!0}),e})();var b=n("BQkM"),g=n("uYzU"),_=n("FFMq"),y=n("E2fk"),v=n("TJUb"),w=n("dEH0"),S=n("G1/K"),M=n("TYzs"),x=n("Dwqy"),k=n("efK2"),D=n("8xTl");let T=(()=>{class e{}return e.\u0275mod=p.Kb({type:e}),e.\u0275inj=p.Jb({factory:function(t){return new(t||e)},providers:[r.a,o.a,s.a,i.e,l.a,c.a,d.a,u.a,h.a,x.a,g.a,_.a,y.a,a.a,f.a,m,M.a,b.a,w.a,S.a,D.a,v.a,k.a],imports:[[i.c]]}),e})()},"9d/t":function(e,t,n){var i=n("AO7/"),r=n("xrYK"),s=n("tiKp")("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=i?r:function(e){var t,n,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=Object(e),s))?n:o?r(t):"Object"==(i=r(t))&&"function"==typeof t.callee?"Arguments":i}},"9f76":function(e,t,n){"use strict";var i=n("8M4i"),r=n("EUcb"),s=function(e){return Object(r.a)(e)&&"[object Arguments]"==Object(i.a)(e)},o=Object.prototype,a=o.hasOwnProperty,c=o.propertyIsEnumerable,l=s(function(){return arguments}())?s:function(e){return Object(r.a)(e)&&a.call(e,"callee")&&!c.call(e,"callee")};t.a=l},"9nlD":function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var i=n("LvDl"),r=n.n(i),s=n("2Vo4"),o=n("XNiG"),a=n("mtw6"),c=n("G1I9"),l=n("a0VL"),u=n("ufoC"),d=n("8Y7J"),h=n("EApP");let f=(()=>{class e{constructor(e,t,n){this.toastr=e,this.taskMessageService=t,this.cdDatePipe=n,this.hideToasties=!1,this.dataSource=new s.a([]),this.data$=this.dataSource.asObservable(),this.sidebarSubject=new o.a,this.queued=[],this.KEY="cdNotifications";const i=localStorage.getItem(this.KEY);let a=[];r.a.isString(i)&&(a=JSON.parse(i,(e,t)=>r.a.isPlainObject(t)?r.a.assign(new c.a,t):t)),this.dataSource.next(a)}removeAll(){localStorage.removeItem(this.KEY),this.dataSource.next([])}remove(e){const t=this.dataSource.getValue();t.splice(e,1),this.dataSource.next(t),localStorage.setItem(this.KEY,JSON.stringify(t))}save(e){const t=this.dataSource.getValue();for(t.push(e),t.sort((e,t)=>e.timestamp>t.timestamp?-1:1);t.length>10;)t.pop();this.dataSource.next(t),localStorage.setItem(this.KEY,JSON.stringify(t))}show(e,t,n,i,s){return window.setTimeout(()=>{let o;o=r.a.isFunction(e)?e():r.a.isObject(e)?e:new c.b(e,t,n,i,s),this.queueToShow(o)},10)}queueToShow(e){this.cancel(this.queuedTimeoutId),this.queued.find(t=>r.a.isEqual(t,e))||this.queued.push(e),this.queuedTimeoutId=window.setTimeout(()=>{this.showQueued()},500)}showQueued(){this.getUnifiedTitleQueue().forEach(e=>{const t=new c.a(e);t.isFinishedTask||this.save(t),this.showToasty(t)})}getUnifiedTitleQueue(){return Object.values(this.queueShiftByTitle()).map(e=>{const t=e[0];return e.length>1&&(t.message="<ul>"+e.map(e=>`<li>${e.message}</li>`).join("")+"</ul>"),t})}queueShiftByTitle(){const e={};let t;for(;t=this.queued.shift();)e[t.title]||(e[t.title]=[]),e[t.title].push(t);return e}showToasty(e){this.hideToasties||this.toastr[["error","info","success"][e.type]]((e.message?e.message+"<br>":"")+this.renderTimeAndApplicationHtml(e),e.title,e.options)}renderTimeAndApplicationHtml(e){return`<small class="date">${this.cdDatePipe.transform(e.timestamp)}</small><i class="float-right custom-icon ${e.applicationClass}" title="${e.application}"></i>`}notifyTask(e,t=!0){const n=this.finishedTaskToNotification(e,t);return n.isFinishedTask=!0,this.show(n)}finishedTaskToNotification(e,t=!0){let n;return n=e.success&&t?new c.b(a.a.success,this.taskMessageService.getSuccessTitle(e)):new c.b(a.a.error,this.taskMessageService.getErrorTitle(e),this.taskMessageService.getErrorMessage(e)),n.isFinishedTask=!0,n}cancel(e){window.clearTimeout(e)}suspendToasties(e){this.hideToasties=e}toggleSidebar(e=!1){this.sidebarSubject.next(e)}}return e.\u0275fac=function(t){return new(t||e)(d.dc(h.b),d.dc(u.a),d.dc(l.a))},e.\u0275prov=d.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},"9ppp":function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const i=(()=>{function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e})()},"9rRi":function(e,t,n){!function(e){"use strict";e.defineLocale("gd",{months:["Am Faoilleach","An Gearran","Am M\xe0rt","An Giblean","An C\xe8itean","An t-\xd2gmhios","An t-Iuchar","An L\xf9nastal","An t-Sultain","An D\xe0mhair","An t-Samhain","An D\xf9bhlachd"],monthsShort:["Faoi","Gear","M\xe0rt","Gibl","C\xe8it","\xd2gmh","Iuch","L\xf9n","Sult","D\xe0mh","Samh","D\xf9bh"],monthsParseExact:!0,weekdays:["Did\xf2mhnaich","Diluain","Dim\xe0irt","Diciadain","Diardaoin","Dihaoine","Disathairne"],weekdaysShort:["Did","Dil","Dim","Dic","Dia","Dih","Dis"],weekdaysMin:["D\xf2","Lu","M\xe0","Ci","Ar","Ha","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-m\xe0ireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-d\xe8 aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"m\xecos",MM:"%d m\xecosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})}(n("wd/R"))},"9xzX":function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var i=n("mrSG"),r=n("IheW"),s=n("LvDl"),o=n.n(s),a=n("2Vo4"),c=n("z6cu"),l=n("LRne"),u=n("vkgz"),d=n("5+tZ"),h=n("XNiG"),f=n("zx2A");class p{constructor(e,t){this.notifier=e,this.source=t}call(e,t){return t.subscribe(new m(e,this.notifier,this.source))}}class m extends f.b{constructor(e,t,n){super(e),this.notifier=t,this.source=n}error(e){if(!this.isStopped){let n=this.errors,i=this.retries,r=this.retriesSubscription;if(i)this.errors=void 0,this.retriesSubscription=void 0;else{n=new h.a;try{const{notifier:e}=this;i=e(n)}catch(t){return super.error(t)}r=Object(f.c)(i,new f.a(this))}this._unsubscribeAndRecycle(),this.errors=n,this.retries=i,this.retriesSubscription=r,n.next(e)}}_unsubscribe(){const{errors:e,retriesSubscription:t}=this;e&&(e.unsubscribe(),this.errors=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0}notifyNext(){const{_unsubscribe:e}=this;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=e,this.source.subscribe(this)}}var b=n("IzEk"),g=n("xTzq"),_=n("8Y7J");let y=(()=>{let e=class{constructor(e){this.http=e,this.url="api/rgw/daemon",this.daemons=new a.a([]),this.daemons$=this.daemons.asObservable(),this.selectedDaemon=new a.a(null),this.selectedDaemon$=this.selectedDaemon.asObservable()}list(){return this.http.get(this.url).pipe(Object(u.a)(e=>{this.daemons.next(e),o.a.isEmpty(this.selectedDaemon.getValue())&&this.selectDefaultDaemon(e)}))}get(e){return this.http.get(`${this.url}/${e}`)}selectDaemon(e){this.selectedDaemon.next(e)}selectDefaultDaemon(e){if(0===e.length)return null;for(const t of e)if(t.default)return this.selectDaemon(t),t;return this.selectDaemon(e[0]),e[0]}request(e){return this.selectedDaemon.pipe(Object(d.a)(e=>o.a.isEmpty(e)?this.list().pipe(Object(d.a)(e=>Object(c.a)(!o.a.isEmpty(e)))):Object(l.a)(e)),(t=e=>e.pipe(Object(d.a)(t=>t?e:Object(c.a)("No RGW daemons found!"))),e=>e.lift(new p(t,e))),Object(b.a)(1),Object(d.a)(t=>{let n=new r.e;return n=n.append("daemon_name",t.id),e(n)}));var t}};return e.\u0275fac=function(t){return new(t||e)(_.dc(r.b))},e.\u0275prov=_.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e=Object(i.b)([g.a,Object(i.d)("design:paramtypes",[r.b])],e),e})()},"A+xa":function(e,t,n){!function(e){"use strict";e.defineLocale("cv",{months:"\u043a\u04d1\u0440\u043b\u0430\u0447_\u043d\u0430\u0440\u04d1\u0441_\u043f\u0443\u0448_\u0430\u043a\u0430_\u043c\u0430\u0439_\u04ab\u04d7\u0440\u0442\u043c\u0435_\u0443\u0442\u04d1_\u04ab\u0443\u0440\u043b\u0430_\u0430\u0432\u04d1\u043d_\u044e\u043f\u0430_\u0447\u04f3\u043a_\u0440\u0430\u0448\u0442\u0430\u0432".split("_"),monthsShort:"\u043a\u04d1\u0440_\u043d\u0430\u0440_\u043f\u0443\u0448_\u0430\u043a\u0430_\u043c\u0430\u0439_\u04ab\u04d7\u0440_\u0443\u0442\u04d1_\u04ab\u0443\u0440_\u0430\u0432\u043d_\u044e\u043f\u0430_\u0447\u04f3\u043a_\u0440\u0430\u0448".split("_"),weekdays:"\u0432\u044b\u0440\u0441\u0430\u0440\u043d\u0438\u043a\u0443\u043d_\u0442\u0443\u043d\u0442\u0438\u043a\u0443\u043d_\u044b\u0442\u043b\u0430\u0440\u0438\u043a\u0443\u043d_\u044e\u043d\u043a\u0443\u043d_\u043a\u04d7\u04ab\u043d\u0435\u0440\u043d\u0438\u043a\u0443\u043d_\u044d\u0440\u043d\u0435\u043a\u0443\u043d_\u0448\u04d1\u043c\u0430\u0442\u043a\u0443\u043d".split("_"),weekdaysShort:"\u0432\u044b\u0440_\u0442\u0443\u043d_\u044b\u0442\u043b_\u044e\u043d_\u043a\u04d7\u04ab_\u044d\u0440\u043d_\u0448\u04d1\u043c".split("_"),weekdaysMin:"\u0432\u0440_\u0442\u043d_\u044b\u0442_\u044e\u043d_\u043a\u04ab_\u044d\u0440_\u0448\u043c".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [\u04ab\u0443\u043b\u0445\u0438] MMMM [\u0443\u0439\u04d1\u0445\u04d7\u043d] D[-\u043c\u04d7\u0448\u04d7]",LLL:"YYYY [\u04ab\u0443\u043b\u0445\u0438] MMMM [\u0443\u0439\u04d1\u0445\u04d7\u043d] D[-\u043c\u04d7\u0448\u04d7], HH:mm",LLLL:"dddd, YYYY [\u04ab\u0443\u043b\u0445\u0438] MMMM [\u0443\u0439\u04d1\u0445\u04d7\u043d] D[-\u043c\u04d7\u0448\u04d7], HH:mm"},calendar:{sameDay:"[\u041f\u0430\u044f\u043d] LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",nextDay:"[\u042b\u0440\u0430\u043d] LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",lastDay:"[\u04d6\u043d\u0435\u0440] LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",nextWeek:"[\u04aa\u0438\u0442\u0435\u0441] dddd LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",lastWeek:"[\u0418\u0440\u0442\u043d\u04d7] dddd LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",sameElse:"L"},relativeTime:{future:function(e){return e+(/\u0441\u0435\u0445\u0435\u0442$/i.exec(e)?"\u0440\u0435\u043d":/\u04ab\u0443\u043b$/i.exec(e)?"\u0442\u0430\u043d":"\u0440\u0430\u043d")},past:"%s \u043a\u0430\u044f\u043b\u043b\u0430",s:"\u043f\u04d7\u0440-\u0438\u043a \u04ab\u0435\u043a\u043a\u0443\u043d\u0442",ss:"%d \u04ab\u0435\u043a\u043a\u0443\u043d\u0442",m:"\u043f\u04d7\u0440 \u043c\u0438\u043d\u0443\u0442",mm:"%d \u043c\u0438\u043d\u0443\u0442",h:"\u043f\u04d7\u0440 \u0441\u0435\u0445\u0435\u0442",hh:"%d \u0441\u0435\u0445\u0435\u0442",d:"\u043f\u04d7\u0440 \u043a\u0443\u043d",dd:"%d \u043a\u0443\u043d",M:"\u043f\u04d7\u0440 \u0443\u0439\u04d1\u0445",MM:"%d \u0443\u0439\u04d1\u0445",y:"\u043f\u04d7\u0440 \u04ab\u0443\u043b",yy:"%d \u04ab\u0443\u043b"},dayOfMonthOrdinalParse:/\d{1,2}-\u043c\u04d7\u0448/,ordinal:"%d-\u043c\u04d7\u0448",week:{dow:1,doy:7}})}(n("wd/R"))},A2ZE:function(e,t,n){var i=n("HAuM");e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,r){return e.call(t,n,i,r)}}return function(){return e.apply(t,arguments)}}},ANnk:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("aexS"),r=n("f/UV"),s=n("8Y7J");let o=(()=>{class e{constructor(e,t,n){this.formScope=e,this.authStorageService=t,this.elementRef=n}ngAfterViewInit(){var e,t,n;this.permissions=this.authStorageService.getPermissions();const i=null===(e=this.formScope)||void 0===e?void 0:e.cdFormScope;i&&!(null===(n=null===(t=this.permissions)||void 0===t?void 0:t[i])||void 0===n?void 0:n.update)&&(this.elementRef.nativeElement.disabled=!0)}}return e.\u0275fac=function(t){return new(t||e)(s.Mb(r.a,8),s.Mb(i.a),s.Mb(s.m))},e.\u0275dir=s.Hb({type:e,selectors:[["input",3,"cdNoFormInputDisable",""],["select",3,"cdNoFormInputDisable",""],["button",3,"cdNoFormInputDisable",""],["","cdFormInputDisable",""]]}),e})()},"AO7/":function(e,t,n){var i={};i[n("tiKp")("toStringTag")]="z",e.exports="[object z]"===String(i)},AQ68:function(e,t,n){!function(e){"use strict";e.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}})}(n("wd/R"))},Avrn:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("aexS"),r=n("8Y7J"),s=n("iInd");let o=(()=>{class e{constructor(e,t){this.router=e,this.authStorageService=t}canActivate(e,t){return!!this.authStorageService.isLoggedIn()||(this.router.navigate(["/login"],{queryParams:{returnUrl:t.url}}),!1)}canActivateChild(e,t){return this.canActivate(e,t)}}return e.\u0275fac=function(t){return new(t||e)(r.dc(s.e),r.dc(i.a))},e.\u0275prov=r.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},AvvY:function(e,t,n){!function(e){"use strict";e.defineLocale("ml",{months:"\u0d1c\u0d28\u0d41\u0d35\u0d30\u0d3f_\u0d2b\u0d46\u0d2c\u0d4d\u0d30\u0d41\u0d35\u0d30\u0d3f_\u0d2e\u0d3e\u0d7c\u0d1a\u0d4d\u0d1a\u0d4d_\u0d0f\u0d2a\u0d4d\u0d30\u0d3f\u0d7d_\u0d2e\u0d47\u0d2f\u0d4d_\u0d1c\u0d42\u0d7a_\u0d1c\u0d42\u0d32\u0d48_\u0d13\u0d17\u0d38\u0d4d\u0d31\u0d4d\u0d31\u0d4d_\u0d38\u0d46\u0d2a\u0d4d\u0d31\u0d4d\u0d31\u0d02\u0d2c\u0d7c_\u0d12\u0d15\u0d4d\u0d1f\u0d4b\u0d2c\u0d7c_\u0d28\u0d35\u0d02\u0d2c\u0d7c_\u0d21\u0d3f\u0d38\u0d02\u0d2c\u0d7c".split("_"),monthsShort:"\u0d1c\u0d28\u0d41._\u0d2b\u0d46\u0d2c\u0d4d\u0d30\u0d41._\u0d2e\u0d3e\u0d7c._\u0d0f\u0d2a\u0d4d\u0d30\u0d3f._\u0d2e\u0d47\u0d2f\u0d4d_\u0d1c\u0d42\u0d7a_\u0d1c\u0d42\u0d32\u0d48._\u0d13\u0d17._\u0d38\u0d46\u0d2a\u0d4d\u0d31\u0d4d\u0d31._\u0d12\u0d15\u0d4d\u0d1f\u0d4b._\u0d28\u0d35\u0d02._\u0d21\u0d3f\u0d38\u0d02.".split("_"),monthsParseExact:!0,weekdays:"\u0d1e\u0d3e\u0d2f\u0d31\u0d3e\u0d34\u0d4d\u0d1a_\u0d24\u0d3f\u0d19\u0d4d\u0d15\u0d33\u0d3e\u0d34\u0d4d\u0d1a_\u0d1a\u0d4a\u0d35\u0d4d\u0d35\u0d3e\u0d34\u0d4d\u0d1a_\u0d2c\u0d41\u0d27\u0d28\u0d3e\u0d34\u0d4d\u0d1a_\u0d35\u0d4d\u0d2f\u0d3e\u0d34\u0d3e\u0d34\u0d4d\u0d1a_\u0d35\u0d46\u0d33\u0d4d\u0d33\u0d3f\u0d2f\u0d3e\u0d34\u0d4d\u0d1a_\u0d36\u0d28\u0d3f\u0d2f\u0d3e\u0d34\u0d4d\u0d1a".split("_"),weekdaysShort:"\u0d1e\u0d3e\u0d2f\u0d7c_\u0d24\u0d3f\u0d19\u0d4d\u0d15\u0d7e_\u0d1a\u0d4a\u0d35\u0d4d\u0d35_\u0d2c\u0d41\u0d27\u0d7b_\u0d35\u0d4d\u0d2f\u0d3e\u0d34\u0d02_\u0d35\u0d46\u0d33\u0d4d\u0d33\u0d3f_\u0d36\u0d28\u0d3f".split("_"),weekdaysMin:"\u0d1e\u0d3e_\u0d24\u0d3f_\u0d1a\u0d4a_\u0d2c\u0d41_\u0d35\u0d4d\u0d2f\u0d3e_\u0d35\u0d46_\u0d36".split("_"),longDateFormat:{LT:"A h:mm -\u0d28\u0d41",LTS:"A h:mm:ss -\u0d28\u0d41",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -\u0d28\u0d41",LLLL:"dddd, D MMMM YYYY, A h:mm -\u0d28\u0d41"},calendar:{sameDay:"[\u0d07\u0d28\u0d4d\u0d28\u0d4d] LT",nextDay:"[\u0d28\u0d3e\u0d33\u0d46] LT",nextWeek:"dddd, LT",lastDay:"[\u0d07\u0d28\u0d4d\u0d28\u0d32\u0d46] LT",lastWeek:"[\u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d4d",past:"%s \u0d2e\u0d41\u0d7b\u0d2a\u0d4d",s:"\u0d05\u0d7d\u0d2a \u0d28\u0d3f\u0d2e\u0d3f\u0d37\u0d19\u0d4d\u0d19\u0d7e",ss:"%d \u0d38\u0d46\u0d15\u0d4d\u0d15\u0d7b\u0d21\u0d4d",m:"\u0d12\u0d30\u0d41 \u0d2e\u0d3f\u0d28\u0d3f\u0d31\u0d4d\u0d31\u0d4d",mm:"%d \u0d2e\u0d3f\u0d28\u0d3f\u0d31\u0d4d\u0d31\u0d4d",h:"\u0d12\u0d30\u0d41 \u0d2e\u0d23\u0d3f\u0d15\u0d4d\u0d15\u0d42\u0d7c",hh:"%d \u0d2e\u0d23\u0d3f\u0d15\u0d4d\u0d15\u0d42\u0d7c",d:"\u0d12\u0d30\u0d41 \u0d26\u0d3f\u0d35\u0d38\u0d02",dd:"%d \u0d26\u0d3f\u0d35\u0d38\u0d02",M:"\u0d12\u0d30\u0d41 \u0d2e\u0d3e\u0d38\u0d02",MM:"%d \u0d2e\u0d3e\u0d38\u0d02",y:"\u0d12\u0d30\u0d41 \u0d35\u0d7c\u0d37\u0d02",yy:"%d \u0d35\u0d7c\u0d37\u0d02"},meridiemParse:/\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f|\u0d30\u0d3e\u0d35\u0d3f\u0d32\u0d46|\u0d09\u0d1a\u0d4d\u0d1a \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d4d|\u0d35\u0d48\u0d15\u0d41\u0d28\u0d4d\u0d28\u0d47\u0d30\u0d02|\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f/i,meridiemHour:function(e,t){return 12===e&&(e=0),"\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f"===t&&e>=4||"\u0d09\u0d1a\u0d4d\u0d1a \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d4d"===t||"\u0d35\u0d48\u0d15\u0d41\u0d28\u0d4d\u0d28\u0d47\u0d30\u0d02"===t?e+12:e},meridiem:function(e,t,n){return e<4?"\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f":e<12?"\u0d30\u0d3e\u0d35\u0d3f\u0d32\u0d46":e<17?"\u0d09\u0d1a\u0d4d\u0d1a \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d4d":e<20?"\u0d35\u0d48\u0d15\u0d41\u0d28\u0d4d\u0d28\u0d47\u0d30\u0d02":"\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f"}})}(n("wd/R"))},AwXo:function(e,t,n){"use strict";var i=n("Y7yP"),r=function(){try{var e=Object(i.a)(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();t.a=r},AxL3:function(e,t){var n=!("undefined"==typeof window||!window.document||!window.document.createElement);e.exports=n},AytR:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const i={default_lang:"en-US",production:!0,year:"2021"}},B55N:function(e,t,n){!function(e){"use strict";e.defineLocale("ja",{eras:[{since:"2019-05-01",offset:1,name:"\u4ee4\u548c",narrow:"\u32ff",abbr:"R"},{since:"1989-01-08",until:"2019-04-30",offset:1,name:"\u5e73\u6210",narrow:"\u337b",abbr:"H"},{since:"1926-12-25",until:"1989-01-07",offset:1,name:"\u662d\u548c",narrow:"\u337c",abbr:"S"},{since:"1912-07-30",until:"1926-12-24",offset:1,name:"\u5927\u6b63",narrow:"\u337d",abbr:"T"},{since:"1873-01-01",until:"1912-07-29",offset:6,name:"\u660e\u6cbb",narrow:"\u337e",abbr:"M"},{since:"0001-01-01",until:"1873-12-31",offset:1,name:"\u897f\u66a6",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"\u7d00\u5143\u524d",narrow:"BC",abbr:"BC"}],eraYearOrdinalRegex:/(\u5143|\d+)\u5e74/,eraYearOrdinalParse:function(e,t){return"\u5143"===t[1]?1:parseInt(t[1]||e,10)},months:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u65e5\u66dc\u65e5_\u6708\u66dc\u65e5_\u706b\u66dc\u65e5_\u6c34\u66dc\u65e5_\u6728\u66dc\u65e5_\u91d1\u66dc\u65e5_\u571f\u66dc\u65e5".split("_"),weekdaysShort:"\u65e5_\u6708_\u706b_\u6c34_\u6728_\u91d1_\u571f".split("_"),weekdaysMin:"\u65e5_\u6708_\u706b_\u6c34_\u6728_\u91d1_\u571f".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5 HH:mm",LLLL:"YYYY\u5e74M\u6708D\u65e5 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5(ddd) HH:mm"},meridiemParse:/\u5348\u524d|\u5348\u5f8c/i,isPM:function(e){return"\u5348\u5f8c"===e},meridiem:function(e,t,n){return e<12?"\u5348\u524d":"\u5348\u5f8c"},calendar:{sameDay:"[\u4eca\u65e5] LT",nextDay:"[\u660e\u65e5] LT",nextWeek:function(e){return e.week()!==this.week()?"[\u6765\u9031]dddd LT":"dddd LT"},lastDay:"[\u6628\u65e5] LT",lastWeek:function(e){return this.week()!==e.week()?"[\u5148\u9031]dddd LT":"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}\u65e5/,ordinal:function(e,t){switch(t){case"y":return 1===e?"\u5143\u5e74":e+"\u5e74";case"d":case"D":case"DDD":return e+"\u65e5";default:return e}},relativeTime:{future:"%s\u5f8c",past:"%s\u524d",s:"\u6570\u79d2",ss:"%d\u79d2",m:"1\u5206",mm:"%d\u5206",h:"1\u6642\u9593",hh:"%d\u6642\u9593",d:"1\u65e5",dd:"%d\u65e5",M:"1\u30f6\u6708",MM:"%d\u30f6\u6708",y:"1\u5e74",yy:"%d\u5e74"}})}(n("wd/R"))},BFxc:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("7o/Q"),r=n("4I5i"),s=n("EY2u");function o(e){return function(t){return 0===e?Object(s.b)():t.lift(new a(e))}}class a{constructor(e){if(this.total=e,this.total<0)throw new r.a}call(e,t){return t.subscribe(new c(e,this.total))}}class c extends i.a{constructor(e,t){super(e),this.total=t,this.ring=new Array,this.count=0}_next(e){const t=this.ring,n=this.total,i=this.count++;t.length<n?t.push(e):t[i%n]=e}_complete(){const e=this.destination;let t=this.count;if(t>0){const n=this.count>=this.total?this.total:this.count,i=this.ring;for(let r=0;r<n;r++){const r=t++%n;e.next(i[r])}}e.complete()}}},BQkM:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("8Y7J");let r=(()=>{class e{transform(e){return e+" IOPS"}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"iops",type:e,pure:!0}),e})()},BVg3:function(e,t,n){!function(e){"use strict";function t(e){return e%100==11||e%10!=1}function n(e,n,i,r){var s=e+" ";switch(i){case"s":return n||r?"nokkrar sek\xfandur":"nokkrum sek\xfandum";case"ss":return t(e)?s+(n||r?"sek\xfandur":"sek\xfandum"):s+"sek\xfanda";case"m":return n?"m\xedn\xfata":"m\xedn\xfatu";case"mm":return t(e)?s+(n||r?"m\xedn\xfatur":"m\xedn\xfatum"):n?s+"m\xedn\xfata":s+"m\xedn\xfatu";case"hh":return t(e)?s+(n||r?"klukkustundir":"klukkustundum"):s+"klukkustund";case"d":return n?"dagur":r?"dag":"degi";case"dd":return t(e)?n?s+"dagar":s+(r?"daga":"d\xf6gum"):n?s+"dagur":s+(r?"dag":"degi");case"M":return n?"m\xe1nu\xf0ur":r?"m\xe1nu\xf0":"m\xe1nu\xf0i";case"MM":return t(e)?n?s+"m\xe1nu\xf0ir":s+(r?"m\xe1nu\xf0i":"m\xe1nu\xf0um"):n?s+"m\xe1nu\xf0ur":s+(r?"m\xe1nu\xf0":"m\xe1nu\xf0i");case"y":return n||r?"\xe1r":"\xe1ri";case"yy":return t(e)?s+(n||r?"\xe1r":"\xe1rum"):s+(n||r?"\xe1r":"\xe1ri")}}e.defineLocale("is",{months:"jan\xfaar_febr\xfaar_mars_apr\xedl_ma\xed_j\xfan\xed_j\xfal\xed_\xe1g\xfast_september_okt\xf3ber_n\xf3vember_desember".split("_"),monthsShort:"jan_feb_mar_apr_ma\xed_j\xfan_j\xfal_\xe1g\xfa_sep_okt_n\xf3v_des".split("_"),weekdays:"sunnudagur_m\xe1nudagur_\xferi\xf0judagur_mi\xf0vikudagur_fimmtudagur_f\xf6studagur_laugardagur".split("_"),weekdaysShort:"sun_m\xe1n_\xferi_mi\xf0_fim_f\xf6s_lau".split("_"),weekdaysMin:"Su_M\xe1_\xder_Mi_Fi_F\xf6_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[\xed dag kl.] LT",nextDay:"[\xe1 morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[\xed g\xe6r kl.] LT",lastWeek:"[s\xed\xf0asta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s s\xed\xf0an",s:n,ss:n,m:n,mm:n,h:"klukkustund",hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},Bs8V:function(e,t,n){var i=n("g6v/"),r=n("0eef"),s=n("XGwC"),o=n("/GqU"),a=n("wE6v"),c=n("UTVS"),l=n("DPsx"),u=Object.getOwnPropertyDescriptor;t.f=i?u:function(e,t){if(e=o(e),t=a(t,!0),l)try{return u(e,t)}catch(n){}if(c(e,t))return s(!r.f.call(e,t),e[t])}},ByF4:function(e,t,n){!function(e){"use strict";e.defineLocale("fo",{months:"januar_februar_mars_apr\xedl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_m\xe1nadagur_t\xfdsdagur_mikudagur_h\xf3sdagur_fr\xedggjadagur_leygardagur".split("_"),weekdaysShort:"sun_m\xe1n_t\xfds_mik_h\xf3s_fr\xed_ley".split("_"),weekdaysMin:"su_m\xe1_t\xfd_mi_h\xf3_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[\xcd dag kl.] LT",nextDay:"[\xcd morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[\xcd gj\xe1r kl.] LT",lastWeek:"[s\xed\xf0stu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s s\xed\xf0ani",s:"f\xe1 sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein t\xedmi",hh:"%d t\xedmar",d:"ein dagur",dd:"%d dagar",M:"ein m\xe1na\xf0ur",MM:"%d m\xe1na\xf0ir",y:"eitt \xe1r",yy:"%d \xe1r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},Ce4a:function(e,t,n){"use strict";var i=n("Ju5/");t.a=i.a.Uint8Array},CfRg:function(e,t,n){"use strict";var i=n("oSzE"),r=n("23KU"),s=n("+EKe"),o=n("mkut"),a=n("4/q3"),c=n("3/ER"),l=n("eAQQ"),u=n("jN84"),d=n("n561"),h=n("TFwu"),f=n("TnHx"),p=n("YM6B"),m=Object.prototype.hasOwnProperty,b=n("lkxz"),g=/\w*$/,_=n("ylTp"),y=_.a?_.a.prototype:void 0,v=y?y.valueOf:void 0,w=n("G4mU"),S=n("hYPf"),M=n("/1FC"),x=n("WOAq"),k=n("EUcb"),D=n("ovuK"),T=n("xutz"),C=T.a&&T.a.isMap,O=C?Object(D.a)(C):function(e){return Object(k.a)(e)&&"[object Map]"==Object(p.a)(e)},L=n("IzLi"),R=T.a&&T.a.isSet,E=R?Object(D.a)(R):function(e){return Object(k.a)(e)&&"[object Set]"==Object(p.a)(e)},A="[object Arguments]",I="[object Function]",P="[object Object]",j={};j[A]=j["[object Array]"]=j["[object ArrayBuffer]"]=j["[object DataView]"]=j["[object Boolean]"]=j["[object Date]"]=j["[object Float32Array]"]=j["[object Float64Array]"]=j["[object Int8Array]"]=j["[object Int16Array]"]=j["[object Int32Array]"]=j["[object Map]"]=j["[object Number]"]=j[P]=j["[object RegExp]"]=j["[object Set]"]=j["[object String]"]=j["[object Symbol]"]=j["[object Uint8Array]"]=j["[object Uint8ClampedArray]"]=j["[object Uint16Array]"]=j["[object Uint32Array]"]=!0,j["[object Error]"]=j[I]=j["[object WeakMap]"]=!1,t.a=function e(t,n,_,y,k,D){var T,C=1&n,R=2&n,N=4&n;if(_&&(T=k?_(t,y,k,D):_(t)),void 0!==T)return T;if(!Object(L.a)(t))return t;var F=Object(M.a)(t);if(F){if(T=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&m.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(t),!C)return Object(l.a)(t,T)}else{var Y=Object(p.a)(t),z=Y==I||"[object GeneratorFunction]"==Y;if(Object(x.a)(t))return Object(c.a)(t,C);if(Y==P||Y==A||z&&!k){if(T=R||z?{}:Object(S.a)(t),!C)return R?function(e,t){return Object(s.a)(e,Object(d.a)(e),t)}(t,function(e,t){return e&&Object(s.a)(t,Object(a.a)(t),e)}(T,t)):function(e,t){return Object(s.a)(e,Object(u.a)(e),t)}(t,function(e,t){return e&&Object(s.a)(t,Object(o.a)(t),e)}(T,t))}else{if(!j[Y])return k?t:{};T=function(e,t,n){var i,r,s=e.constructor;switch(t){case"[object ArrayBuffer]":return Object(b.a)(e);case"[object Boolean]":case"[object Date]":return new s(+e);case"[object DataView]":return function(e,t){var n=t?Object(b.a)(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Object(w.a)(e,n);case"[object Map]":return new s;case"[object Number]":case"[object String]":return new s(e);case"[object RegExp]":return(r=new(i=e).constructor(i.source,g.exec(i))).lastIndex=i.lastIndex,r;case"[object Set]":return new s;case"[object Symbol]":return v?Object(v.call(e)):{}}}(t,Y,C)}}D||(D=new i.a);var $=D.get(t);if($)return $;D.set(t,T),E(t)?t.forEach((function(i){T.add(e(i,n,_,i,t,D))})):O(t)&&t.forEach((function(i,r){T.set(r,e(i,n,_,r,t,D))}));var H=F?void 0:(N?R?f.a:h.a:R?a.a:o.a)(t);return function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n););}(H||t,(function(i,s){H&&(i=t[s=i]),Object(r.a)(T,s,e(i,n,_,s,t,D))})),T}},Cfvw:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var i=n("HDdC"),r=n("SeVD"),s=n("quSY"),o=n("kJWO"),a=n("jZKg"),c=n("Lhse"),l=n("c2HN"),u=n("I55L");function d(e,t){return t?function(e,t){if(null!=e){if(function(e){return e&&"function"==typeof e[o.a]}(e))return function(e,t){return new i.a(n=>{const i=new s.a;return i.add(t.schedule(()=>{const r=e[o.a]();i.add(r.subscribe({next(e){i.add(t.schedule(()=>n.next(e)))},error(e){i.add(t.schedule(()=>n.error(e)))},complete(){i.add(t.schedule(()=>n.complete()))}}))})),i})}(e,t);if(Object(l.a)(e))return function(e,t){return new i.a(n=>{const i=new s.a;return i.add(t.schedule(()=>e.then(e=>{i.add(t.schedule(()=>{n.next(e),i.add(t.schedule(()=>n.complete()))}))},e=>{i.add(t.schedule(()=>n.error(e)))}))),i})}(e,t);if(Object(u.a)(e))return Object(a.a)(e,t);if(function(e){return e&&"function"==typeof e[c.a]}(e)||"string"==typeof e)return function(e,t){if(!e)throw new Error("Iterable cannot be null");return new i.a(n=>{const i=new s.a;let r;return i.add(()=>{r&&"function"==typeof r.return&&r.return()}),i.add(t.schedule(()=>{r=e[c.a](),i.add(t.schedule((function(){if(n.closed)return;let e,t;try{const n=r.next();e=n.value,t=n.done}catch(i){return void n.error(i)}t?n.complete():(n.next(e),this.schedule())})))})),i})}(e,t)}throw new TypeError((null!==e&&typeof e||e)+" is not observable")}(e,t):e instanceof i.a?e:new i.a(Object(r.a)(e))}},ChqD:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var i=n("SVse"),r=n("s7LF"),s=n("iInd"),o=n("G0yt"),a=n("w9WL"),c=n("zWsK"),l=n("V/fk"),u=n("9Xeq"),d=n("8Y7J");let h=(()=>{class e{}return e.\u0275mod=d.Kb({type:e}),e.\u0275inj=d.Jb({factory:function(t){return new(t||e)},imports:[[i.c,a.h,c.a,r.m,o.l,o.F,u.a,l.a,s.i],a.h]}),e})()},CjzT:function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),i=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],r=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,i){return e?/-MMM-/.test(i)?n[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"domingo_lunes_martes_mi\xe9rcoles_jueves_viernes_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xe9._jue._vie._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[ma\xf1ana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un d\xeda",dd:"%d d\xedas",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un a\xf1o",yy:"%d a\xf1os"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}})}(n("wd/R"))},CoRJ:function(e,t,n){!function(e){"use strict";e.defineLocale("ar-ma",{months:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),monthsShort:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0627\u062d\u062f_\u0627\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:1,doy:4}})}(n("wd/R"))},CqXF:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("7o/Q");function r(e){return t=>t.lift(new s(e))}class s{constructor(e){this.value=e}call(e,t){return t.subscribe(new o(e,this.value))}}class o extends i.a{constructor(e,t){super(e),this.value=t}_next(e){this.destination.next(this.value)}}},"D/JM":function(e,t,n){!function(e){"use strict";e.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",ss:"%d segundo",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n("wd/R"))},D0XW:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return s}));var i=n("3N8a");const r=new(n("IjjT").a)(i.a),s=r},D4zM:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("8Y7J");let r=(()=>{class e{constructor(e,t){this.elementRef=e,this.renderer=t}ngOnInit(){this.renderer.setAttribute(this.elementRef.nativeElement,"tabindex","-1"),this.iElement=this.renderer.createElement("i"),this.renderer.addClass(this.iElement,"fa"),this.renderer.appendChild(this.elementRef.nativeElement,this.iElement),this.update()}getInputElement(){return document.getElementById(this.cdPasswordButton)}update(){const e=this.getInputElement();e&&"text"===e.type?(this.renderer.removeClass(this.iElement,"fa-eye"),this.renderer.addClass(this.iElement,"fa-eye-slash")):(this.renderer.removeClass(this.iElement,"fa-eye-slash"),this.renderer.addClass(this.iElement,"fa-eye"))}onClick(){const e=this.getInputElement();e.type="password"===e.type?"text":"password",this.update()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(i.E))},e.\u0275dir=i.Hb({type:e,selectors:[["","cdPasswordButton",""]],hostBindings:function(e,t){1&e&&i.gc("click",(function(){return t.onClick()}))},inputs:{cdPasswordButton:"cdPasswordButton"}}),e})()},DH7j:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const i=(()=>Array.isArray||(e=>e&&"number"==typeof e.length))()},"DKr+":function(e,t,n){!function(e){"use strict";function t(e,t,n,i){var r={s:["thoddea sekondamni","thodde sekond"],ss:[e+" sekondamni",e+" sekond"],m:["eka mintan","ek minut"],mm:[e+" mintamni",e+" mintam"],h:["eka voran","ek vor"],hh:[e+" voramni",e+" voram"],d:["eka disan","ek dis"],dd:[e+" disamni",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineamni",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsamni",e+" vorsam"]};return i?r[n][0]:r[n][1]}e.defineLocale("gom-latn",{months:{standalone:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),format:"Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Fuddlo] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fattlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,t){switch(t){case"D":return e+"er";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:0,doy:3},meridiemParse:/rati|sokallim|donparam|sanje/,meridiemHour:function(e,t){return 12===e&&(e=0),"rati"===t?e<4?e:e+12:"sokallim"===t?e:"donparam"===t?e>12?e:e+12:"sanje"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"rati":e<12?"sokallim":e<16?"donparam":e<20?"sanje":"rati"}})}(n("wd/R"))},DLK6:function(e,t,n){var i=n("ewvW"),r=Math.floor,s="".replace,o=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,a=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,c,l,u){var d=n+e.length,h=c.length,f=a;return void 0!==l&&(l=i(l),f=o),s.call(u,f,(function(i,s){var o;switch(s.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(d);case"<":o=l[s.slice(1,-1)];break;default:var a=+s;if(0===a)return i;if(a>h){var u=r(a/10);return 0===u?i:u<=h?void 0===c[u-1]?s.charAt(1):c[u-1]+s.charAt(1):i}o=c[a-1]}return void 0===o?"":o}))}},DNAf:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("LvDl"),r=n.n(i);class s{constructor(e){this.customValidations={},this.empty="No items selected.",this.selectionLimit={tooltip:"Deselect item to select again",text:"Selection limit reached"},this.filter="Filter tags",this.add="Add badge",this.noOptions="There are no items available.",r.a.merge(this,e)}}},DPsx:function(e,t,n){var i=n("g6v/"),r=n("0Dky"),s=n("zBJ4");e.exports=!i&&!r((function(){return 7!=Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a}))},DSvg:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i=n("LvDl"),r=n("vkgz"),s=n("aexS"),o=n("8Y7J"),a=n("IheW"),c=n("iInd");let l=(()=>{class e{constructor(e,t,n,i){this.authStorageService=e,this.http=t,this.router=n,this.route=i}check(e){return this.http.post("api/auth/check",{token:e})}login(e){return this.http.post("api/auth",e).pipe(Object(r.a)(e=>{this.authStorageService.set(e.username,e.permissions,e.sso,e.pwdExpirationDate,e.pwdUpdateRequired)}))}logout(e=null){return this.http.post("api/auth/logout",null).subscribe(t=>{this.authStorageService.remove();const n=i.get(this.route.snapshot.queryParams,"returnUrl","/login");this.router.navigate([n],{skipLocationChange:!0}),e&&e(),window.location.replace(t.redirect_url)})}}return e.\u0275fac=function(t){return new(t||e)(o.dc(s.a),o.dc(a.b),o.dc(c.e),o.dc(c.a))},e.\u0275prov=o.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},Dkky:function(e,t,n){!function(e){"use strict";e.defineLocale("fr-ch",{months:"janvier_f\xe9vrier_mars_avril_mai_juin_juillet_ao\xfbt_septembre_octobre_novembre_d\xe9cembre".split("_"),monthsShort:"janv._f\xe9vr._mars_avr._mai_juin_juil._ao\xfbt_sept._oct._nov._d\xe9c.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd\u2019hui \xe0] LT",nextDay:"[Demain \xe0] LT",nextWeek:"dddd [\xe0] LT",lastDay:"[Hier \xe0] LT",lastWeek:"dddd [dernier \xe0] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})}(n("wd/R"))},DlmY:function(e,t,n){"use strict";var i=n("Y7yP"),r=Object(i.a)(Object,"create"),s=Object.prototype.hasOwnProperty,o=Object.prototype.hasOwnProperty;function a(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}a.prototype.clear=function(){this.__data__=r?r(null):{},this.size=0},a.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},a.prototype.get=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return s.call(t,e)?t[e]:void 0},a.prototype.has=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)},a.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this};var c=a,l=n("nLtN"),u=n("3cmB"),d=function(e,t){var n,i,r=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof t?"string":"hash"]:r.map};function h(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}h.prototype.clear=function(){this.size=0,this.__data__={hash:new c,map:new(u.a||l.a),string:new c}},h.prototype.delete=function(e){var t=d(this,e).delete(e);return this.size-=t?1:0,t},h.prototype.get=function(e){return d(this,e).get(e)},h.prototype.has=function(e){return d(this,e).has(e)},h.prototype.set=function(e,t){var n=d(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},t.a=h},Dmvi:function(e,t,n){!function(e){"use strict";e.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:0,doy:4}})}(n("wd/R"))},DoHr:function(e,t,n){!function(e){"use strict";var t={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'\xfcnc\xfc",4:"'\xfcnc\xfc",100:"'\xfcnc\xfc",6:"'nc\u0131",9:"'uncu",10:"'uncu",30:"'uncu",60:"'\u0131nc\u0131",90:"'\u0131nc\u0131"};e.defineLocale("tr",{months:"Ocak_\u015eubat_Mart_Nisan_May\u0131s_Haziran_Temmuz_A\u011fustos_Eyl\xfcl_Ekim_Kas\u0131m_Aral\u0131k".split("_"),monthsShort:"Oca_\u015eub_Mar_Nis_May_Haz_Tem_A\u011fu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Sal\u0131_\xc7ar\u015famba_Per\u015fembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_\xc7ar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_\xc7a_Pe_Cu_Ct".split("_"),meridiem:function(e,t,n){return e<12?n?"\xf6\xf6":"\xd6\xd6":n?"\xf6s":"\xd6S"},meridiemParse:/\xf6\xf6|\xd6\xd6|\xf6s|\xd6S/,isPM:function(e){return"\xf6s"===e||"\xd6S"===e},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bug\xfcn saat] LT",nextDay:"[yar\u0131n saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[d\xfcn] LT",lastWeek:"[ge\xe7en] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s \xf6nce",s:"birka\xe7 saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir g\xfcn",dd:"%d g\xfcn",w:"bir hafta",ww:"%d hafta",M:"bir ay",MM:"%d ay",y:"bir y\u0131l",yy:"%d y\u0131l"},ordinal:function(e,n){switch(n){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'\u0131nc\u0131";var i=e%10;return e+(t[i]||t[e%100-i]||t[e>=100?100:null])}},week:{dow:1,doy:7}})}(n("wd/R"))},Dwqy:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i=n("LvDl"),r=n.n(i),s=n("wd/R"),o=n.n(s),a=n("8Y7J");o.a.updateLocale("en",{relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"}});let c=(()=>{class e{transform(e,t=!0){let n;if(n=r.a.isNumber(e)?o.a.unix(e):o()(e),!n.isValid())return"";let i=n.fromNow();return t&&(i=r.a.upperFirst(i)),i}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=a.Lb({name:"relativeDate",type:e,pure:!1}),e})()},DxQv:function(e,t,n){!function(e){"use strict";e.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"s\xf8ndag_mandag_tirsdag_onsdag_torsdag_fredag_l\xf8rdag".split("_"),weekdaysShort:"s\xf8n_man_tir_ons_tor_fre_l\xf8r".split("_"),weekdaysMin:"s\xf8_ma_ti_on_to_fr_l\xf8".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"p\xe5 dddd [kl.] LT",lastDay:"[i g\xe5r kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"f\xe5 sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en m\xe5ned",MM:"%d m\xe5neder",y:"et \xe5r",yy:"%d \xe5r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},Dzi0:function(e,t,n){!function(e){"use strict";e.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n("wd/R"))},"E+lV":function(e,t,n){!function(e){"use strict";var t={words:{ss:["\u0441\u0435\u043a\u0443\u043d\u0434\u0430","\u0441\u0435\u043a\u0443\u043d\u0434\u0435","\u0441\u0435\u043a\u0443\u043d\u0434\u0438"],m:["\u0458\u0435\u0434\u0430\u043d \u043c\u0438\u043d\u0443\u0442","\u0458\u0435\u0434\u043d\u0435 \u043c\u0438\u043d\u0443\u0442\u0435"],mm:["\u043c\u0438\u043d\u0443\u0442","\u043c\u0438\u043d\u0443\u0442\u0435","\u043c\u0438\u043d\u0443\u0442\u0430"],h:["\u0458\u0435\u0434\u0430\u043d \u0441\u0430\u0442","\u0458\u0435\u0434\u043d\u043e\u0433 \u0441\u0430\u0442\u0430"],hh:["\u0441\u0430\u0442","\u0441\u0430\u0442\u0430","\u0441\u0430\u0442\u0438"],dd:["\u0434\u0430\u043d","\u0434\u0430\u043d\u0430","\u0434\u0430\u043d\u0430"],MM:["\u043c\u0435\u0441\u0435\u0446","\u043c\u0435\u0441\u0435\u0446\u0430","\u043c\u0435\u0441\u0435\u0446\u0438"],yy:["\u0433\u043e\u0434\u0438\u043d\u0430","\u0433\u043e\u0434\u0438\u043d\u0435","\u0433\u043e\u0434\u0438\u043d\u0430"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,i){var r=t.words[i];return 1===i.length?n?r[0]:r[1]:e+" "+t.correctGrammaticalCase(e,r)}};e.defineLocale("sr-cyrl",{months:"\u0458\u0430\u043d\u0443\u0430\u0440_\u0444\u0435\u0431\u0440\u0443\u0430\u0440_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0438\u043b_\u043c\u0430\u0458_\u0458\u0443\u043d_\u0458\u0443\u043b_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440_\u043e\u043a\u0442\u043e\u0431\u0430\u0440_\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440_\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440".split("_"),monthsShort:"\u0458\u0430\u043d._\u0444\u0435\u0431._\u043c\u0430\u0440._\u0430\u043f\u0440._\u043c\u0430\u0458_\u0458\u0443\u043d_\u0458\u0443\u043b_\u0430\u0432\u0433._\u0441\u0435\u043f._\u043e\u043a\u0442._\u043d\u043e\u0432._\u0434\u0435\u0446.".split("_"),monthsParseExact:!0,weekdays:"\u043d\u0435\u0434\u0435\u0459\u0430_\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u0430\u043a_\u0443\u0442\u043e\u0440\u0430\u043a_\u0441\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043a_\u043f\u0435\u0442\u0430\u043a_\u0441\u0443\u0431\u043e\u0442\u0430".split("_"),weekdaysShort:"\u043d\u0435\u0434._\u043f\u043e\u043d._\u0443\u0442\u043e._\u0441\u0440\u0435._\u0447\u0435\u0442._\u043f\u0435\u0442._\u0441\u0443\u0431.".split("_"),weekdaysMin:"\u043d\u0435_\u043f\u043e_\u0443\u0442_\u0441\u0440_\u0447\u0435_\u043f\u0435_\u0441\u0443".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[\u0434\u0430\u043d\u0430\u0441 \u0443] LT",nextDay:"[\u0441\u0443\u0442\u0440\u0430 \u0443] LT",nextWeek:function(){switch(this.day()){case 0:return"[\u0443] [\u043d\u0435\u0434\u0435\u0459\u0443] [\u0443] LT";case 3:return"[\u0443] [\u0441\u0440\u0435\u0434\u0443] [\u0443] LT";case 6:return"[\u0443] [\u0441\u0443\u0431\u043e\u0442\u0443] [\u0443] LT";case 1:case 2:case 4:case 5:return"[\u0443] dddd [\u0443] LT"}},lastDay:"[\u0458\u0443\u0447\u0435 \u0443] LT",lastWeek:function(){return["[\u043f\u0440\u043e\u0448\u043b\u0435] [\u043d\u0435\u0434\u0435\u0459\u0435] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u043e\u0433] [\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u043a\u0430] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u043e\u0433] [\u0443\u0442\u043e\u0440\u043a\u0430] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u0435] [\u0441\u0440\u0435\u0434\u0435] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u043e\u0433] [\u0447\u0435\u0442\u0432\u0440\u0442\u043a\u0430] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u043e\u0433] [\u043f\u0435\u0442\u043a\u0430] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u0435] [\u0441\u0443\u0431\u043e\u0442\u0435] [\u0443] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"\u0437\u0430 %s",past:"\u043f\u0440\u0435 %s",s:"\u043d\u0435\u043a\u043e\u043b\u0438\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434\u0438",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"\u0434\u0430\u043d",dd:t.translate,M:"\u043c\u0435\u0441\u0435\u0446",MM:t.translate,y:"\u0433\u043e\u0434\u0438\u043d\u0443",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n("wd/R"))},E2fk:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("8Y7J");let r=(()=>{class e{transform(e){return"[DBG]"===e?"debug":"[INF]"===e?"info":"[WRN]"===e?"warn":"[ERR]"===e?"err":""}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"logPriority",type:e,pure:!0}),e})()},E9XD:function(e,t,n){"use strict";var i=n("I+eb"),r=n("1Y/n").left,s=n("pkCn"),o=n("LQDL"),a=n("YF1G");i({target:"Array",proto:!0,forced:!s("reduce")||!a&&o>79&&o<83},{reduce:function(e){return r(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},EApP:function(e,t,n){"use strict";n.d(t,"a",(function(){return C})),n.d(t,"b",(function(){return k}));var i=n("8Y7J"),r=n("GS7A"),s=n("XNiG"),o=n("cUpR"),a=n("SVse");const c=["toast-component",""];function l(e,t){if(1&e){const e=i.Tb();i.Sb(0,"button",5),i.gc("click",(function(){return i.Dc(e),i.ic().remove()})),i.Sb(1,"span",6),i.Oc(2,"\xd7"),i.Rb(),i.Rb()}}function u(e,t){if(1&e&&(i.Qb(0),i.Oc(1),i.Pb()),2&e){const e=i.ic(2);i.yb(1),i.Qc("[",e.duplicatesCount+1,"]")}}function d(e,t){if(1&e&&(i.Sb(0,"div"),i.Oc(1),i.Mc(2,u,2,1,"ng-container",4),i.Rb()),2&e){const e=i.ic();i.Ab(e.options.titleClass),i.zb("aria-label",e.title),i.yb(1),i.Qc(" ",e.title," "),i.yb(1),i.pc("ngIf",e.duplicatesCount)}}function h(e,t){if(1&e&&i.Nb(0,"div",7),2&e){const e=i.ic();i.Ab(e.options.messageClass),i.pc("innerHTML",e.message,i.Ec)}}function f(e,t){if(1&e&&(i.Sb(0,"div",8),i.Oc(1),i.Rb()),2&e){const e=i.ic();i.Ab(e.options.messageClass),i.zb("aria-label",e.message),i.yb(1),i.Qc(" ",e.message," ")}}function p(e,t){if(1&e&&(i.Sb(0,"div"),i.Nb(1,"div",9),i.Rb()),2&e){const e=i.ic();i.yb(1),i.Kc("width",e.width+"%")}}class m{constructor(e,t,n,i,r,o){this.toastId=e,this.config=t,this.message=n,this.title=i,this.toastType=r,this.toastRef=o,this._onTap=new s.a,this._onAction=new s.a,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(e){this._onAction.next(e)}onAction(){return this._onAction.asObservable()}}const b={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing"},g=new i.r("ToastConfig");class _{constructor(e,t){this.component=e,this.injector=t}attach(e,t){return this._attachedHost=e,e.attach(this,t)}detach(){const e=this._attachedHost;if(e)return this._attachedHost=void 0,e.detach()}get isAttached(){return null!=this._attachedHost}setAttachedHost(e){this._attachedHost=e}}class y extends class{attach(e,t){return this._attachedPortal=e,this.attachComponentPortal(e,t)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(e){this._disposeFn=e}}{constructor(e,t,n){super(),this._hostDomElement=e,this._componentFactoryResolver=t,this._appRef=n}attachComponentPortal(e,t){const n=this._componentFactoryResolver.resolveComponentFactory(e.component);let i;return i=n.create(e.injector),this._appRef.attachView(i.hostView),this.setDisposeFn(()=>{this._appRef.detachView(i.hostView),i.destroy()}),t?this._hostDomElement.insertBefore(this._getComponentRootNode(i),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(i)),i}_getComponentRootNode(e){return e.hostView.rootNodes[0]}}let v=(()=>{class e{constructor(e){this._document=e}ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const e=this._document.createElement("div");e.classList.add("overlay-container"),this._document.body.appendChild(e),this._containerElement=e}}return e.\u0275fac=function(t){return new(t||e)(i.dc(a.d))},e.\u0275prov=Object(i.Ib)({factory:function(){return new e(Object(i.dc)(a.d))},token:e,providedIn:"root"}),e})();class w{constructor(e){this._portalHost=e}attach(e,t=!0){return this._portalHost.attach(e,t)}detach(){return this._portalHost.detach()}}let S=(()=>{class e{constructor(e,t,n,i){this._overlayContainer=e,this._componentFactoryResolver=t,this._appRef=n,this._document=i,this._paneElements=new Map}create(e,t){return this._createOverlayRef(this.getPaneElement(e,t))}getPaneElement(e="",t){return this._paneElements.get(t)||this._paneElements.set(t,{}),this._paneElements.get(t)[e]||(this._paneElements.get(t)[e]=this._createPaneElement(e,t)),this._paneElements.get(t)[e]}_createPaneElement(e,t){const n=this._document.createElement("div");return n.id="toast-container",n.classList.add(e),n.classList.add("toast-container"),t?t.getContainerElement().appendChild(n):this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalHost(e){return new y(e,this._componentFactoryResolver,this._appRef)}_createOverlayRef(e){return new w(this._createPortalHost(e))}}return e.\u0275fac=function(t){return new(t||e)(i.dc(v),i.dc(i.j),i.dc(i.g),i.dc(a.d))},e.\u0275prov=Object(i.Ib)({factory:function(){return new e(Object(i.dc)(v),Object(i.dc)(i.j),Object(i.dc)(i.g),Object(i.dc)(a.d))},token:e,providedIn:"root"}),e})();class M{constructor(e){this._overlayRef=e,this.duplicatesCount=0,this._afterClosed=new s.a,this._activate=new s.a,this._manualClose=new s.a,this._resetTimeout=new s.a,this._countDuplicate=new s.a}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(e,t){e&&this._resetTimeout.next(),t&&this._countDuplicate.next(++this.duplicatesCount)}}class x{constructor(e,t){this._toastPackage=e,this._parentInjector=t}get(e,t,n){return e===m?this._toastPackage:this._parentInjector.get(e,t,n)}}let k=(()=>{class e{constructor(e,t,n,i,r){this.overlay=t,this._injector=n,this.sanitizer=i,this.ngZone=r,this.currentlyActive=0,this.toasts=[],this.index=0,this.toastrConfig=Object.assign(Object.assign({},e.default),e.config),e.config.iconClasses&&(this.toastrConfig.iconClasses=Object.assign(Object.assign({},e.default.iconClasses),e.config.iconClasses))}show(e,t,n={},i=""){return this._preBuildNotification(i,e,t,this.applyConfig(n))}success(e,t,n={}){return this._preBuildNotification(this.toastrConfig.iconClasses.success||"",e,t,this.applyConfig(n))}error(e,t,n={}){return this._preBuildNotification(this.toastrConfig.iconClasses.error||"",e,t,this.applyConfig(n))}info(e,t,n={}){return this._preBuildNotification(this.toastrConfig.iconClasses.info||"",e,t,this.applyConfig(n))}warning(e,t,n={}){return this._preBuildNotification(this.toastrConfig.iconClasses.warning||"",e,t,this.applyConfig(n))}clear(e){for(const t of this.toasts)if(void 0!==e){if(t.toastId===e)return void t.toastRef.manualClose()}else t.toastRef.manualClose()}remove(e){const t=this._findToast(e);if(!t)return!1;if(t.activeToast.toastRef.close(),this.toasts.splice(t.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length)return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){const e=this.toasts[this.currentlyActive].toastRef;e.isInactive()||(this.currentlyActive=this.currentlyActive+1,e.activate())}return!0}findDuplicate(e="",t="",n,i){const{includeTitleDuplicates:r}=this.toastrConfig;for(const s of this.toasts){const o=r&&s.title===e;if((!r||o)&&s.message===t)return s.toastRef.onDuplicate(n,i),s}return null}applyConfig(e={}){return Object.assign(Object.assign({},this.toastrConfig),e)}_findToast(e){for(let t=0;t<this.toasts.length;t++)if(this.toasts[t].toastId===e)return{index:t,activeToast:this.toasts[t]};return null}_preBuildNotification(e,t,n,i){return i.onActivateTick?this.ngZone.run(()=>this._buildNotification(e,t,n,i)):this._buildNotification(e,t,n,i)}_buildNotification(e,t,n,r){if(!r.toastComponent)throw new Error("toastComponent required");const s=this.findDuplicate(n,t,this.toastrConfig.resetTimeoutOnDuplicate&&r.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&n||t)&&this.toastrConfig.preventDuplicates&&null!==s)return s;this.previousToastMessage=t;let o=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(o=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));const a=this.overlay.create(r.positionClass,this.overlayContainer);this.index=this.index+1;let c=t;t&&r.enableHtml&&(c=this.sanitizer.sanitize(i.I.HTML,t));const l=new M(a),u=new m(this.index,r,c,n,e,l),d=new x(u,this._injector),h=new _(r.toastComponent,d),f=a.attach(h,this.toastrConfig.newestOnTop);l.componentInstance=f.instance;const p={toastId:this.index,title:n||"",message:t||"",toastRef:l,onShown:l.afterActivate(),onHidden:l.afterClosed(),onTap:u.onTap(),onAction:u.onAction(),portal:f};return o||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{p.toastRef.activate()})),this.toasts.push(p),p}}return e.\u0275fac=function(t){return new(t||e)(i.dc(g),i.dc(S),i.dc(i.s),i.dc(o.b),i.dc(i.A))},e.\u0275prov=Object(i.Ib)({factory:function(){return new e(Object(i.dc)(g),Object(i.dc)(S),Object(i.dc)(i.p),Object(i.dc)(o.b),Object(i.dc)(i.A))},token:e,providedIn:"root"}),e})(),D=(()=>{class e{constructor(e,t,n){this.toastrService=e,this.toastPackage=t,this.ngZone=n,this.width=-1,this.toastClasses="",this.state={value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}},this.message=t.message,this.title=t.title,this.options=t.config,this.originalTimeout=t.config.timeOut,this.toastClasses=`${t.toastType} ${t.config.toastClass}`,this.sub=t.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=t.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=t.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=t.toastRef.countDuplicate().subscribe(e=>{this.duplicatesCount=e})}get displayStyle(){if("inactive"===this.state.value)return"none"}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state=Object.assign(Object.assign({},this.state),{value:"active"}),!0!==this.options.disableTimeOut&&"timeOut"!==this.options.disableTimeOut&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=(new Date).getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(0===this.width||100===this.width||!this.options.timeOut)return;const e=(new Date).getTime();this.width=(this.hideTime-e)/this.options.timeOut*100,"increasing"===this.options.progressAnimation&&(this.width=100-this.width),this.width<=0&&(this.width=0),this.width>=100&&(this.width=100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state=Object.assign(Object.assign({},this.state),{value:"active"}),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=(new Date).getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){"removed"!==this.state.value&&(clearTimeout(this.timeout),this.state=Object.assign(Object.assign({},this.state),{value:"removed"}),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){"removed"!==this.state.value&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){"removed"!==this.state.value&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width=0)}delayedHideToast(){!0!==this.options.disableTimeOut&&"extendedTimeOut"!==this.options.disableTimeOut&&0!==this.options.extendedTimeOut&&"removed"!==this.state.value&&(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=(new Date).getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(e,t){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(e),t)):this.timeout=setTimeout(()=>e(),t)}outsideInterval(e,t){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(e),t)):this.intervalId=setInterval(()=>e(),t)}runInsideAngular(e){this.ngZone?this.ngZone.run(()=>e()):e()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(k),i.Mb(m),i.Mb(i.A))},e.\u0275cmp=i.Gb({type:e,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(e,t){1&e&&i.gc("click",(function(){return t.tapToast()}))("mouseenter",(function(){return t.stickAround()}))("mouseleave",(function(){return t.delayedHideToast()})),2&e&&(i.Lc("@flyInOut",t.state),i.Ab(t.toastClasses),i.Kc("display",t.displayStyle))},attrs:c,decls:5,vars:5,consts:[["class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alertdialog","aria-live","polite",3,"class","innerHTML",4,"ngIf"],["role","alertdialog","aria-live","polite",3,"class",4,"ngIf"],[4,"ngIf"],["aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alertdialog","aria-live","polite",3,"innerHTML"],["role","alertdialog","aria-live","polite"],[1,"toast-progress"]],template:function(e,t){1&e&&(i.Mc(0,l,3,0,"button",0),i.Mc(1,d,3,5,"div",1),i.Mc(2,h,1,3,"div",2),i.Mc(3,f,2,4,"div",3),i.Mc(4,p,2,2,"div",4)),2&e&&(i.pc("ngIf",t.options.closeButton),i.yb(1),i.pc("ngIf",t.title),i.yb(1),i.pc("ngIf",t.message&&t.options.enableHtml),i.yb(1),i.pc("ngIf",t.message&&!t.options.enableHtml),i.yb(1),i.pc("ngIf",t.options.progressBar))},directives:[a.r],encapsulation:2,data:{animation:[Object(r.j)("flyInOut",[Object(r.g)("inactive",Object(r.h)({opacity:0})),Object(r.g)("active",Object(r.h)({opacity:1})),Object(r.g)("removed",Object(r.h)({opacity:0})),Object(r.i)("inactive => active",Object(r.e)("{{ easeTime }}ms {{ easing }}")),Object(r.i)("active => removed",Object(r.e)("{{ easeTime }}ms {{ easing }}"))])]}}),e})();const T=Object.assign(Object.assign({},b),{toastComponent:D});let C=(()=>{class e{static forRoot(t={}){return{ngModule:e,providers:[{provide:g,useValue:{default:T,config:t}}]}}}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[a.c]]}),e})()},ENF9:function(e,t,n){"use strict";var i,r=n("2oRo"),s=n("4syw"),o=n("8YOa"),a=n("bWFh"),c=n("rKzb"),l=n("hh1v"),u=n("afO8").enforce,d=n("f5p1"),h=!r.ActiveXObject&&"ActiveXObject"in r,f=Object.isExtensible,p=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},m=e.exports=a("WeakMap",p,c);if(d&&h){i=c.getConstructor(p,"WeakMap",!0),o.REQUIRED=!0;var b=m.prototype,g=b.delete,_=b.has,y=b.get,v=b.set;s(b,{delete:function(e){if(l(e)&&!f(e)){var t=u(this);return t.frozen||(t.frozen=new i),g.call(this,e)||t.frozen.delete(e)}return g.call(this,e)},has:function(e){if(l(e)&&!f(e)){var t=u(this);return t.frozen||(t.frozen=new i),_.call(this,e)||t.frozen.has(e)}return _.call(this,e)},get:function(e){if(l(e)&&!f(e)){var t=u(this);return t.frozen||(t.frozen=new i),_.call(this,e)?y.call(this,e):t.frozen.get(e)}return y.call(this,e)},set:function(e,t){if(l(e)&&!f(e)){var n=u(this);n.frozen||(n.frozen=new i),_.call(this,e)?v.call(this,e,t):n.frozen.set(e,t)}else v.call(this,e,t);return this}})}},EOgW:function(e,t,n){!function(e){"use strict";e.defineLocale("th",{months:"\u0e21\u0e01\u0e23\u0e32\u0e04\u0e21_\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c_\u0e21\u0e35\u0e19\u0e32\u0e04\u0e21_\u0e40\u0e21\u0e29\u0e32\u0e22\u0e19_\u0e1e\u0e24\u0e29\u0e20\u0e32\u0e04\u0e21_\u0e21\u0e34\u0e16\u0e38\u0e19\u0e32\u0e22\u0e19_\u0e01\u0e23\u0e01\u0e0e\u0e32\u0e04\u0e21_\u0e2a\u0e34\u0e07\u0e2b\u0e32\u0e04\u0e21_\u0e01\u0e31\u0e19\u0e22\u0e32\u0e22\u0e19_\u0e15\u0e38\u0e25\u0e32\u0e04\u0e21_\u0e1e\u0e24\u0e28\u0e08\u0e34\u0e01\u0e32\u0e22\u0e19_\u0e18\u0e31\u0e19\u0e27\u0e32\u0e04\u0e21".split("_"),monthsShort:"\u0e21.\u0e04._\u0e01.\u0e1e._\u0e21\u0e35.\u0e04._\u0e40\u0e21.\u0e22._\u0e1e.\u0e04._\u0e21\u0e34.\u0e22._\u0e01.\u0e04._\u0e2a.\u0e04._\u0e01.\u0e22._\u0e15.\u0e04._\u0e1e.\u0e22._\u0e18.\u0e04.".split("_"),monthsParseExact:!0,weekdays:"\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c_\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c_\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23_\u0e1e\u0e38\u0e18_\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e1a\u0e14\u0e35_\u0e28\u0e38\u0e01\u0e23\u0e4c_\u0e40\u0e2a\u0e32\u0e23\u0e4c".split("_"),weekdaysShort:"\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c_\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c_\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23_\u0e1e\u0e38\u0e18_\u0e1e\u0e24\u0e2b\u0e31\u0e2a_\u0e28\u0e38\u0e01\u0e23\u0e4c_\u0e40\u0e2a\u0e32\u0e23\u0e4c".split("_"),weekdaysMin:"\u0e2d\u0e32._\u0e08._\u0e2d._\u0e1e._\u0e1e\u0e24._\u0e28._\u0e2a.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY \u0e40\u0e27\u0e25\u0e32 H:mm",LLLL:"\u0e27\u0e31\u0e19dddd\u0e17\u0e35\u0e48 D MMMM YYYY \u0e40\u0e27\u0e25\u0e32 H:mm"},meridiemParse:/\u0e01\u0e48\u0e2d\u0e19\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07|\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07/,isPM:function(e){return"\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07"===e},meridiem:function(e,t,n){return e<12?"\u0e01\u0e48\u0e2d\u0e19\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07":"\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07"},calendar:{sameDay:"[\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49 \u0e40\u0e27\u0e25\u0e32] LT",nextDay:"[\u0e1e\u0e23\u0e38\u0e48\u0e07\u0e19\u0e35\u0e49 \u0e40\u0e27\u0e25\u0e32] LT",nextWeek:"dddd[\u0e2b\u0e19\u0e49\u0e32 \u0e40\u0e27\u0e25\u0e32] LT",lastDay:"[\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e27\u0e32\u0e19\u0e19\u0e35\u0e49 \u0e40\u0e27\u0e25\u0e32] LT",lastWeek:"[\u0e27\u0e31\u0e19]dddd[\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27 \u0e40\u0e27\u0e25\u0e32] LT",sameElse:"L"},relativeTime:{future:"\u0e2d\u0e35\u0e01 %s",past:"%s\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27",s:"\u0e44\u0e21\u0e48\u0e01\u0e35\u0e48\u0e27\u0e34\u0e19\u0e32\u0e17\u0e35",ss:"%d \u0e27\u0e34\u0e19\u0e32\u0e17\u0e35",m:"1 \u0e19\u0e32\u0e17\u0e35",mm:"%d \u0e19\u0e32\u0e17\u0e35",h:"1 \u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07",hh:"%d \u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07",d:"1 \u0e27\u0e31\u0e19",dd:"%d \u0e27\u0e31\u0e19",w:"1 \u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c",ww:"%d \u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c",M:"1 \u0e40\u0e14\u0e37\u0e2d\u0e19",MM:"%d \u0e40\u0e14\u0e37\u0e2d\u0e19",y:"1 \u0e1b\u0e35",yy:"%d \u0e1b\u0e35"}})}(n("wd/R"))},EUcb:function(e,t,n){"use strict";t.a=function(e){return null!=e&&"object"==typeof e}},EY2u:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return s}));var i=n("HDdC");const r=new i.a(e=>e.complete());function s(e){return e?function(e){return new i.a(t=>e.schedule(()=>t.complete()))}(e):r}},EgGo:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("SVse"),r=n("sne2");class s{constructor(e){this.base=e}static concatURLSegments(e){return e.reduce(i.m.joinWithSlash)}static buildURL(e,...t){return s.concatURLSegments([...e?["/"]:[],...t])}getURL(e,t=!0,...n){return s.buildURL(t,this.base,e,...n)}getCreate(e=!0){return this.getURL(r.e.CREATE,e)}getCreateFrom(e,t=!0){return this.getURL(r.e.CREATE,t,e)}getDelete(e=!0){return this.getURL(r.e.DELETE,e)}getEdit(e,t=!0){return this.getURL(r.e.EDIT,t,e)}getUpdate(e,t=!0){return this.getURL(r.e.UPDATE,t,e)}getAdd(e=!0){return this.getURL(r.e.ADD,e)}getRemove(e=!0){return this.getURL(r.e.REMOVE,e)}getRecreate(e,t=!0){return this.getURL(r.e.RECREATE,t,e)}}},Ekvf:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i=n("mrSG"),r=n("IheW"),s=n("lJxs"),o=n("xTzq"),a=n("o8EM"),c=n("8Y7J");let l=(()=>{let e=class{constructor(e,t){this.http=e,this.rbdConfigurationService=t,this.apiPath="api/pool"}create(e){return this.http.post(this.apiPath,e,{observe:"response"})}update(e){let t;return e.hasOwnProperty("srcpool")?(t=e.srcpool,delete e.srcpool):(t=e.pool,delete e.pool),this.http.put(`${this.apiPath}/${encodeURIComponent(t)}`,e,{observe:"response"})}delete(e){return this.http.delete(`${this.apiPath}/${e}`,{observe:"response"})}get(e){return this.http.get(`${this.apiPath}/${e}`)}getList(){return this.http.get(this.apiPath+"?stats=true")}getConfiguration(e){return this.http.get(`${this.apiPath}/${e}/configuration`).pipe(Object(s.a)(e=>e.map(e=>Object.assign(e,this.rbdConfigurationService.getOptionByName(e.name)))))}getInfo(){return this.http.get(`ui-${this.apiPath}/info`)}list(e=[]){const t=e.join(",");return this.http.get(`${this.apiPath}?attrs=${t}`).toPromise().then(e=>e)}};return e.\u0275fac=function(t){return new(t||e)(c.dc(r.b),c.dc(a.a))},e.\u0275prov=c.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e=Object(i.b)([o.a,Object(i.d)("design:paramtypes",[r.b,a.a])],e),e})()},EmSq:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i=n("8Y7J"),r=n("LvDl"),s=n.n(r),o=n("Fgil"),a=n("aXbf"),c=n("s7LF");let l=(()=>{class e{constructor(e,t,n,r){this.elementRef=e,this.control=t,this.dimlessBinaryPipe=n,this.formatter=r,this.ngModelChange=new i.o,this.el=this.elementRef.nativeElement}ngOnInit(){this.setValue(this.el.value)}setValue(e){/^[\d.]+$/.test(e)&&(e+=this.defaultUnit||"m");const t=this.formatter.toBytes(e),n=this.round(t);this.el.value=this.dimlessBinaryPipe.transform(n),null!==t?(this.ngModelChange.emit(this.el.value),this.control.control.setValue(this.el.value)):(this.ngModelChange.emit(null),this.control.control.setValue(null))}round(e){if(null!==e&&0!==e){if(!s.a.isUndefined(this.minBytes)&&e<this.minBytes)return this.minBytes;if(!s.a.isUndefined(this.maxBytes)&&e>this.maxBytes)return this.maxBytes;if(!s.a.isUndefined(this.roundPower)){const t=Math.round(Math.log(e)/Math.log(this.roundPower));return Math.pow(this.roundPower,t)}}return e}onBlur(e){this.setValue(e)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(c.p),i.Mb(o.a),i.Mb(a.a))},e.\u0275dir=i.Hb({type:e,selectors:[["","cdDimlessBinary",""]],hostBindings:function(e,t){1&e&&i.gc("blur",(function(e){return t.onBlur(e.target.value)}))},inputs:{minBytes:"minBytes",maxBytes:"maxBytes",roundPower:"roundPower",defaultUnit:"defaultUnit"},outputs:{ngModelChange:"ngModelChange"}}),e})()},F8JR:function(e,t,n){"use strict";var i=n("tycR").forEach,r=n("pkCn")("forEach");e.exports=r?[].forEach:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}},FFMq:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("8Y7J");let r=(()=>{class e{transform(e){return e.join(", ")}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"join",type:e,pure:!0}),e})()},FMNM:function(e,t,n){var i=n("xrYK"),r=n("kmMV");e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var s=n.call(e,t);if("object"!=typeof s)throw TypeError("RegExp exec method returned something other than an Object or null");return s}if("RegExp"!==i(e))throw TypeError("RegExp#exec called on incompatible receiver");return r.call(e,t)}},FSuO:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i=n("8Y7J"),r=n("LvDl"),s=n.n(r),o=n("x38r"),a=n("a0VL"),c=n("uIqm");let l=(()=>{class e{constructor(e){this.datePipe=e,this.autoReload=5e3,this.renderObjects=!1,this.appendParentKey=!0,this.hideEmpty=!1,this.hideKeys=[],this.columns=[],this.fetchData=new i.o}ngOnInit(){this.columns=[{prop:"key",flexGrow:1,cellTransformation:o.a.bold},{prop:"value",flexGrow:3}],this.customCss&&(this.columns[1].cellTransformation=o.a.classAdding),this.fetchData.observers.length>0&&this.table.fetchData.subscribe(()=>{this.fetchData.emit()}),this.useData()}ngOnChanges(){this.useData()}useData(){if(!this.data)return;let e=this.makePairs(this.data);this.hideKeys&&(e=e.filter(e=>!this.hideKeys.includes(e.key))),this.tableData=e}makePairs(e){let t=[];if(e){if(s.a.isArray(e))t=this.makePairsFromArray(e);else{if(!s.a.isObject(e))throw new Error("Wrong data format");t=this.makePairsFromObject(e)}return t=t.map(e=>(e.value=this.convertValue(e.value),e)).filter(e=>null!==e.value),s.a.sortBy(this.renderObjects?this.insertFlattenObjects(t):t,"key")}}makePairsFromArray(e){let t=[];const n=e[0];if(s.a.isArray(n)){if(2!==n.length)throw new Error(`Array contains too many elements (${n.length}). Needs to be of type [string, any][]`);t=e.map(e=>({key:e[0],value:e[1]}))}else s.a.isObject(n)&&(t=s.a.has(n,"key")&&s.a.has(n,"value")?[...e]:e.reduce((e,t)=>e.concat(this.makePairsFromObject(t)),t));return t}makePairsFromObject(e){return Object.keys(e).map(t=>({key:t,value:e[t]}))}insertFlattenObjects(e){return s.a.flattenDeep(e.map(e=>{const t=e.value,n=s.a.isObject(t);return!n||s.a.isEmpty(t)?(n&&(e.value=""),e):this.splitItemIntoItems(e)}))}splitItemIntoItems(e){return this.makePairs(e.value).map(t=>(this.appendParentKey&&(t.key=e.key+" "+t.key),t))}convertValue(e){if(s.a.isArray(e)){if(s.a.isEmpty(e)&&this.hideEmpty)return null;e=e.map(e=>s.a.isObject(e)?JSON.stringify(e):e).join(", ")}else if(s.a.isObject(e)){if(this.hideEmpty&&s.a.isEmpty(e)||!this.renderObjects)return null}else if(s.a.isString(e)){if(""===e&&this.hideEmpty)return null;this.isDate(e)&&(e=this.datePipe.transform(e)||e)}return e}isDate(e){const t="[ -:.TZ]",n="\\d{2}"+t;return e.match(new RegExp("^\\d{4}"+t+n+n+n+n+n+"\\d*Z?$"))}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(a.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-table-key-value"]],viewQuery:function(e,t){var n;1&e&&i.Jc(c.a,!0),2&e&&i.zc(n=i.hc())&&(t.table=n.first)},inputs:{data:"data",autoReload:"autoReload",renderObjects:"renderObjects",appendParentKey:"appendParentKey",hideEmpty:"hideEmpty",hideKeys:"hideKeys",customCss:"customCss"},outputs:{fetchData:"fetchData"},features:[i.wb],decls:2,vars:9,consts:[["columnMode","flex",3,"data","columns","toolHeader","autoReload","customCss","autoSave","header","footer","limit"],["table",""]],template:function(e,t){1&e&&i.Nb(0,"cd-table",0,1),2&e&&i.pc("data",t.tableData)("columns",t.columns)("toolHeader",!1)("autoReload",t.autoReload)("customCss",t.customCss)("autoSave",!1)("header",!1)("footer",!1)("limit",0)},directives:[c.a],styles:[""]}),e})()},Fgil:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("aXbf"),r=n("8Y7J");let s=(()=>{class e{constructor(e){this.formatter=e}transform(e){return this.formatter.format_number(e,1024,["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"])}}return e.\u0275fac=function(t){return new(t||e)(r.Mb(i.a))},e.\u0275pipe=r.Lb({name:"dimlessBinary",type:e,pure:!0}),e})()},Fnuy:function(e,t,n){!function(e){"use strict";e.defineLocale("oc-lnc",{months:{standalone:"geni\xe8r_febri\xe8r_mar\xe7_abril_mai_junh_julhet_agost_setembre_oct\xf2bre_novembre_decembre".split("_"),format:"de geni\xe8r_de febri\xe8r_de mar\xe7_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'oct\xf2bre_de novembre_de decembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._mar\xe7_abr._mai_junh_julh._ago._set._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"dimenge_diluns_dimars_dim\xe8cres_dij\xf2us_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dm._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dm_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:"[u\xe8i a] LT",nextDay:"[deman a] LT",nextWeek:"dddd [a] LT",lastDay:"[i\xe8r a] LT",lastWeek:"dddd [passat a] LT",sameElse:"L"},relativeTime:{future:"d'aqu\xed %s",past:"fa %s",s:"unas segondas",ss:"%d segondas",m:"una minuta",mm:"%d minutas",h:"una ora",hh:"%d oras",d:"un jorn",dd:"%d jorns",M:"un mes",MM:"%d meses",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|\xe8|a)/,ordinal:function(e,t){var n=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"\xe8";return"w"!==t&&"W"!==t||(n="a"),e+n},week:{dow:1,doy:4}})}(n("wd/R"))},"G+Rx":function(e,t,n){var i=n("0GbY");e.exports=i("document","documentElement")},G0Uy:function(e,t,n){!function(e){"use strict";e.defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_\u0120unju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Di\u010bembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_\u0120un_Lul_Aww_Set_Ott_Nov_Di\u010b".split("_"),weekdays:"Il-\u0126add_It-Tnejn_It-Tlieta_L-Erbg\u0127a_Il-\u0126amis_Il-\u0120img\u0127a_Is-Sibt".split("_"),weekdaysShort:"\u0126ad_Tne_Tli_Erb_\u0126am_\u0120im_Sib".split("_"),weekdaysMin:"\u0126a_Tn_Tl_Er_\u0126a_\u0120i_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Illum fil-]LT",nextDay:"[G\u0127ada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-biera\u0127 fil-]LT",lastWeek:"dddd [li g\u0127adda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f\u2019 %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"sieg\u0127a",hh:"%d sieg\u0127at",d:"\u0121urnata",dd:"%d \u0121ranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}})}(n("wd/R"))},G0yt:function(e,t,n){"use strict";n.d(t,"a",(function(){return Xt})),n.d(t,"b",(function(){return He})),n.d(t,"c",(function(){return We})),n.d(t,"d",(function(){return Qe})),n.d(t,"e",(function(){return Ve})),n.d(t,"f",(function(){return Be})),n.d(t,"g",(function(){return ht})),n.d(t,"h",(function(){return Nt})),n.d(t,"i",(function(){return Bt})),n.d(t,"j",(function(){return $t})),n.d(t,"k",(function(){return Ht})),n.d(t,"l",(function(){return Ut})),n.d(t,"m",(function(){return Vt})),n.d(t,"n",(function(){return It})),n.d(t,"o",(function(){return sn})),n.d(t,"p",(function(){return dn})),n.d(t,"q",(function(){return ln})),n.d(t,"r",(function(){return un})),n.d(t,"s",(function(){return hn})),n.d(t,"t",(function(){return pn})),n.d(t,"u",(function(){return fn})),n.d(t,"v",(function(){return zt})),n.d(t,"w",(function(){return Sn})),n.d(t,"x",(function(){return yn})),n.d(t,"y",(function(){return Mn})),n.d(t,"z",(function(){return kn})),n.d(t,"A",(function(){return Dn})),n.d(t,"B",(function(){return jn})),n.d(t,"C",(function(){return Nn})),n.d(t,"D",(function(){return $n})),n.d(t,"E",(function(){return Fn})),n.d(t,"F",(function(){return Hn})),n.d(t,"G",(function(){return Kn})),n.d(t,"H",(function(){return Zn}));var i=n("8Y7J"),r=n("SVse"),s=n("s7LF"),o=n("XNiG"),a=n("2Vo4"),c=(n("itXk"),n("PqYM"),n("5yfJ"),n("xgIS")),l=n("VRyK"),u=n("DH7j"),d=n("yCtX"),h=n("l7GE"),f=n("ZUHj");class p{call(e,t){return t.subscribe(new m(e))}}class m extends h.a{constructor(e){super(e),this.hasFirst=!1,this.observables=[],this.subscriptions=[]}_next(e){this.observables.push(e)}_complete(){const e=this.observables,t=e.length;if(0===t)this.destination.complete();else{for(let n=0;n<t&&!this.hasFirst;n++){const t=e[n],i=Object(f.a)(this,t,void 0,n);this.subscriptions&&this.subscriptions.push(i),this.add(i)}this.observables=null}}notifyNext(e,t,n){if(!this.hasFirst){this.hasFirst=!0;for(let e=0;e<this.subscriptions.length;e++)if(e!==n){let t=this.subscriptions[e];t.unsubscribe(),this.remove(t)}this.subscriptions=null}this.destination.next(t)}}var b=n("HDdC"),g=n("lJxs"),_=(n("JX91"),n("/uUt"),n("eIep")),y=n("1G5W"),v=n("pLZG"),w=n("IzEk"),S=n("vkgz");function M(...e){return t=>{let n;return"function"==typeof e[e.length-1]&&(n=e.pop()),t.lift(new x(e,n))}}class x{constructor(e,t){this.observables=e,this.project=t}call(e,t){return t.subscribe(new k(e,this.observables,this.project))}}class k extends h.a{constructor(e,t,n){super(e),this.observables=t,this.project=n,this.toRespond=[];const i=t.length;this.values=new Array(i);for(let r=0;r<i;r++)this.toRespond.push(r);for(let r=0;r<i;r++){let e=t[r];this.add(Object(f.a)(this,e,void 0,r))}}notifyNext(e,t,n){this.values[n]=t;const i=this.toRespond;if(i.length>0){const e=i.indexOf(n);-1!==e&&i.splice(e,1)}}notifyComplete(){}_next(e){if(0===this.toRespond.length){const t=[e,...this.values];this.project?this._tryProject(t):this.destination.next(t)}}_tryProject(e){let t;try{t=this.project.apply(this,e)}catch(n){return void this.destination.error(n)}this.destination.next(t)}}var D=n("3E0/"),T=n("w1tV");function C(e,t){if(1&e){const e=i.Tb();i.Sb(0,"button",1),i.Yb(1,2),i.gc("click",(function(){return i.Dc(e),i.ic().closeHandler()})),i.Sb(2,"span",3),i.Oc(3,"\xd7"),i.Rb(),i.Rb()}}const O=["*"],L=["defaultDayTemplate"],R=["content"];function E(e,t){if(1&e&&i.Nb(0,"div",7),2&e){const e=t.currentMonth,n=t.selected,r=t.disabled,s=t.focused;i.pc("date",t.date)("currentMonth",e)("selected",n)("disabled",r)("focused",s)}}function A(e,t){if(1&e&&(i.Sb(0,"div",12),i.Oc(1),i.Rb()),2&e){const e=i.ic().$implicit,t=i.ic(2);i.yb(1),i.Rc(" ",t.i18n.getMonthFullName(e.number,e.year)," ",t.i18n.getYearNumerals(e.year)," ")}}function I(e,t){if(1&e&&(i.Sb(0,"div",9),i.Mc(1,A,2,2,"div",10),i.Nb(2,"ngb-datepicker-month",11),i.Rb()),2&e){const e=t.$implicit,n=i.ic(2);i.yb(1),i.pc("ngIf","none"===n.navigation||n.displayMonths>1&&"select"===n.navigation),i.yb(1),i.pc("month",e.firstDate)}}function P(e,t){if(1&e&&i.Mc(0,I,3,2,"div",8),2&e){const e=i.ic();i.pc("ngForOf",e.model.months)}}function j(e,t){if(1&e){const e=i.Tb();i.Sb(0,"ngb-datepicker-navigation",13),i.gc("navigate",(function(t){return i.Dc(e),i.ic().onNavigateEvent(t)}))("select",(function(t){return i.Dc(e),i.ic().onNavigateDateSelect(t)})),i.Rb()}if(2&e){const e=i.ic();i.pc("date",e.model.firstDate)("months",e.model.months)("disabled",e.model.disabled)("showSelect","select"===e.model.navigation)("prevDisabled",e.model.prevDisabled)("nextDisabled",e.model.nextDisabled)("selectBoxes",e.model.selectBoxes)}}function N(e,t){}function F(e,t){}function Y(e,t){1&e&&i.Nb(0,"div",5)}function z(e,t){if(1&e&&(i.Sb(0,"div",6),i.Oc(1),i.Rb()),2&e){const e=t.$implicit,n=i.ic(2);i.yb(1),i.Qc(" ",n.i18n.getWeekdayShortName(e)," ")}}function $(e,t){if(1&e&&(i.Sb(0,"div",2),i.Mc(1,Y,1,0,"div",3),i.Mc(2,z,2,1,"div",4),i.Rb()),2&e){const e=i.ic();i.yb(1),i.pc("ngIf",e.datepicker.showWeekNumbers),i.yb(1),i.pc("ngForOf",e.viewModel.weekdays)}}function H(e,t){if(1&e&&(i.Sb(0,"div",11),i.Oc(1),i.Rb()),2&e){const e=i.ic(2).$implicit,t=i.ic();i.yb(1),i.Pc(t.i18n.getWeekNumerals(e.number))}}function W(e,t){}function V(e,t){if(1&e&&i.Mc(0,W,0,0,"ng-template",14),2&e){const e=i.ic().$implicit,t=i.ic(3);i.pc("ngTemplateOutlet",t.datepicker.dayTemplate)("ngTemplateOutletContext",e.context)}}function B(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",12),i.gc("click",(function(n){i.Dc(e);const r=t.$implicit;return i.ic(3).doSelect(r),n.preventDefault()})),i.Mc(1,V,1,2,"ng-template",13),i.Rb()}if(2&e){const e=t.$implicit;i.Eb("disabled",e.context.disabled)("hidden",e.hidden)("ngb-dp-today",e.context.today),i.pc("tabindex",e.tabindex),i.zb("aria-label",e.ariaLabel),i.yb(1),i.pc("ngIf",!e.hidden)}}function U(e,t){if(1&e&&(i.Sb(0,"div",8),i.Mc(1,H,2,1,"div",9),i.Mc(2,B,2,9,"div",10),i.Rb()),2&e){const e=i.ic().$implicit,t=i.ic();i.yb(1),i.pc("ngIf",t.datepicker.showWeekNumbers),i.yb(1),i.pc("ngForOf",e.days)}}function q(e,t){1&e&&i.Mc(0,U,3,2,"div",7),2&e&&i.pc("ngIf",!t.$implicit.collapsed)}function G(e,t){if(1&e){const e=i.Tb();i.Sb(0,"ngb-datepicker-navigation-select",8),i.gc("select",(function(t){return i.Dc(e),i.ic().select.emit(t)})),i.Rb()}if(2&e){const e=i.ic();i.pc("date",e.date)("disabled",e.disabled)("months",e.selectBoxes.months)("years",e.selectBoxes.years)}}function J(e,t){1&e&&i.Nb(0,"div",0)}function Q(e,t){1&e&&i.Nb(0,"div",0)}function K(e,t){if(1&e&&(i.Mc(0,J,1,0,"div",10),i.Sb(1,"div",11),i.Oc(2),i.Rb(),i.Mc(3,Q,1,0,"div",10)),2&e){const e=t.$implicit,n=t.index,r=i.ic(2);i.pc("ngIf",n>0),i.yb(2),i.Rc(" ",r.i18n.getMonthFullName(e.number,e.year)," ",r.i18n.getYearNumerals(e.year)," "),i.yb(1),i.pc("ngIf",n!==r.months.length-1)}}function Z(e,t){if(1&e&&i.Mc(0,K,4,4,"ng-template",9),2&e){const e=i.ic();i.pc("ngForOf",e.months)}}const X=["ngbDatepickerDayView",""],ee=["month"],te=["year"];function ne(e,t){if(1&e&&(i.Sb(0,"option",6),i.Oc(1),i.Rb()),2&e){const e=t.$implicit,n=i.ic();i.pc("value",e),i.zb("aria-label",n.i18n.getMonthFullName(e,null==n.date?null:n.date.year)),i.yb(1),i.Pc(n.i18n.getMonthShortName(e,null==n.date?null:n.date.year))}}function ie(e,t){if(1&e&&(i.Sb(0,"option",6),i.Oc(1),i.Rb()),2&e){const e=t.$implicit,n=i.ic();i.pc("value",e),i.yb(1),i.Pc(n.i18n.getYearNumerals(e))}}const re=["dialog"],se=["ngbNavOutlet",""];function oe(e,t){}const ae=function(e){return{$implicit:e}};function ce(e,t){if(1&e&&(i.Sb(0,"div",2),i.Mc(1,oe,0,0,"ng-template",3),i.Rb()),2&e){const e=i.ic().$implicit,t=i.ic();i.Eb("active",e.active),i.pc("id",e.panelDomId),i.zb("role",t.paneRole?t.paneRole:t.nav.roles?"tabpanel":void 0)("aria-labelledby",e.domId),i.yb(1),i.pc("ngTemplateOutlet",(null==e.contentTpl?null:e.contentTpl.templateRef)||null)("ngTemplateOutletContext",i.uc(7,ae,e.active))}}function le(e,t){1&e&&i.Mc(0,ce,2,9,"div",1),2&e&&i.pc("ngIf",t.$implicit.isPanelInDom())}function ue(e,t){if(1&e&&i.Oc(0),2&e){const e=i.ic(2);i.Pc(e.title)}}function de(e,t){}function he(e,t){if(1&e&&(i.Sb(0,"h3",3),i.Mc(1,ue,1,1,"ng-template",null,4,i.Nc),i.Mc(3,de,0,0,"ng-template",5),i.Rb()),2&e){const e=i.Ac(2),t=i.ic();i.yb(3),i.pc("ngTemplateOutlet",t.isTitleTemplate()?t.title:e)("ngTemplateOutletContext",t.context)}}function fe(e,t){if(1&e&&(i.Sb(0,"span"),i.Wb(1,3),i.jc(2,"percent"),i.Rb()),2&e){const e=i.ic();i.yb(2),i.ac(i.kc(2,1,e.getValue()/e.max)),i.Xb(1)}}function pe(e,t){if(1&e){const e=i.Tb();i.Sb(0,"button",12),i.gc("click",(function(){i.Dc(e);const t=i.ic();return t.changeHour(t.hourStep)})),i.Nb(1,"span",13),i.Sb(2,"span",14),i.Wb(3,15),i.Rb(),i.Rb()}if(2&e){const e=i.ic();i.Eb("btn-sm",e.isSmallSize)("btn-lg",e.isLargeSize)("disabled",e.disabled),i.pc("disabled",e.disabled)}}function me(e,t){if(1&e){const e=i.Tb();i.Sb(0,"button",12),i.gc("click",(function(){i.Dc(e);const t=i.ic();return t.changeHour(-t.hourStep)})),i.Nb(1,"span",16),i.Sb(2,"span",14),i.Wb(3,17),i.Rb(),i.Rb()}if(2&e){const e=i.ic();i.Eb("btn-sm",e.isSmallSize)("btn-lg",e.isLargeSize)("disabled",e.disabled),i.pc("disabled",e.disabled)}}function be(e,t){if(1&e){const e=i.Tb();i.Sb(0,"button",12),i.gc("click",(function(){i.Dc(e);const t=i.ic();return t.changeMinute(t.minuteStep)})),i.Nb(1,"span",13),i.Sb(2,"span",14),i.Wb(3,18),i.Rb(),i.Rb()}if(2&e){const e=i.ic();i.Eb("btn-sm",e.isSmallSize)("btn-lg",e.isLargeSize)("disabled",e.disabled),i.pc("disabled",e.disabled)}}function ge(e,t){if(1&e){const e=i.Tb();i.Sb(0,"button",12),i.gc("click",(function(){i.Dc(e);const t=i.ic();return t.changeMinute(-t.minuteStep)})),i.Nb(1,"span",16),i.Sb(2,"span",14),i.Wb(3,19),i.Rb(),i.Rb()}if(2&e){const e=i.ic();i.Eb("btn-sm",e.isSmallSize)("btn-lg",e.isLargeSize)("disabled",e.disabled),i.pc("disabled",e.disabled)}}function _e(e,t){1&e&&(i.Sb(0,"div",6),i.Oc(1,":"),i.Rb())}function ye(e,t){if(1&e){const e=i.Tb();i.Sb(0,"button",12),i.gc("click",(function(){i.Dc(e);const t=i.ic(2);return t.changeSecond(t.secondStep)})),i.Nb(1,"span",13),i.Sb(2,"span",14),i.Wb(3,22),i.Rb(),i.Rb()}if(2&e){const e=i.ic(2);i.Eb("btn-sm",e.isSmallSize)("btn-lg",e.isLargeSize)("disabled",e.disabled),i.pc("disabled",e.disabled)}}function ve(e,t){if(1&e){const e=i.Tb();i.Sb(0,"button",12),i.gc("click",(function(){i.Dc(e);const t=i.ic(2);return t.changeSecond(-t.secondStep)})),i.Nb(1,"span",16),i.Sb(2,"span",14),i.Wb(3,23),i.Rb(),i.Rb()}if(2&e){const e=i.ic(2);i.Eb("btn-sm",e.isSmallSize)("btn-lg",e.isLargeSize)("disabled",e.disabled),i.pc("disabled",e.disabled)}}function we(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",20),i.Mc(1,ye,4,7,"button",3),i.Sb(2,"input",4),i.Yb(3,21),i.gc("change",(function(t){return i.Dc(e),i.ic().updateSecond(t.target.value)}))("input",(function(t){return i.Dc(e),i.ic().formatInput(t.target)}))("keydown.ArrowUp",(function(t){i.Dc(e);const n=i.ic();return n.changeSecond(n.secondStep),t.preventDefault()}))("keydown.ArrowDown",(function(t){i.Dc(e);const n=i.ic();return n.changeSecond(-n.secondStep),t.preventDefault()})),i.Rb(),i.Mc(4,ve,4,7,"button",3),i.Rb()}if(2&e){const e=i.ic();i.yb(1),i.pc("ngIf",e.spinners),i.yb(1),i.Eb("form-control-sm",e.isSmallSize)("form-control-lg",e.isLargeSize),i.pc("value",e.formatMinSec(null==e.model?null:e.model.second))("readOnly",e.readonlyInputs)("disabled",e.disabled),i.yb(2),i.pc("ngIf",e.spinners)}}function Se(e,t){1&e&&i.Nb(0,"div",6)}function Me(e,t){if(1&e&&(i.Qb(0),i.Wb(1,28),i.Pb()),2&e){const e=i.ic(2);i.yb(1),i.ac(e.i18n.getAfternoonPeriod()),i.Xb(1)}}function xe(e,t){if(1&e&&i.Wb(0,29),2&e){const e=i.ic(2);i.ac(e.i18n.getMorningPeriod()),i.Xb(0)}}function ke(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",24),i.Sb(1,"button",25),i.gc("click",(function(){return i.Dc(e),i.ic().toggleMeridian()})),i.Mc(2,Me,2,1,"ng-container",26),i.Mc(3,xe,1,1,"ng-template",null,27,i.Nc),i.Rb(),i.Rb()}if(2&e){const e=i.Ac(4),t=i.ic();i.yb(1),i.Eb("btn-sm",t.isSmallSize)("btn-lg",t.isLargeSize)("disabled",t.disabled),i.pc("disabled",t.disabled),i.yb(1),i.pc("ngIf",t.model&&t.model.hour>=12)("ngIfElse",e)}}function De(e,t){if(1&e&&(i.Sb(0,"span"),i.Oc(1),i.Rb()),2&e){const e=i.ic().$implicit,t=i.ic();i.Ab(t.highlightClass),i.yb(1),i.Pc(e)}}function Te(e,t){if(1&e&&i.Oc(0),2&e){const e=i.ic().$implicit;i.Pc(e)}}function Ce(e,t){if(1&e&&(i.Mc(0,De,2,3,"span",1),i.Mc(1,Te,1,1,"ng-template",null,2,i.Nc)),2&e){const e=t.odd,n=i.Ac(2);i.pc("ngIf",e)("ngIfElse",n)}}function Oe(e,t){if(1&e&&i.Nb(0,"ngb-highlight",2),2&e){const e=t.term;i.pc("result",(0,t.formatter)(t.result))("term",e)}}function Le(e,t){}const Re=function(e,t,n){return{result:e,term:t,formatter:n}};function Ee(e,t){if(1&e){const e=i.Tb();i.Sb(0,"button",3),i.gc("mouseenter",(function(){i.Dc(e);const n=t.index;return i.ic().markActive(n)}))("click",(function(){i.Dc(e);const n=t.$implicit;return i.ic().select(n)})),i.Mc(1,Le,0,0,"ng-template",4),i.Rb()}if(2&e){const e=t.$implicit,n=t.index,r=i.ic(),s=i.Ac(1);i.Eb("active",n===r.activeIdx),i.pc("id",r.id+"-"+n),i.yb(1),i.pc("ngTemplateOutlet",r.resultTemplate||s)("ngTemplateOutletContext",i.wc(5,Re,e,r.term,r.formatter))}}function Ae(e){return parseInt(""+e,10)}function Ie(e){return null!=e?""+e:""}function Pe(e){return"string"==typeof e}function je(e){return!isNaN(Ae(e))}function Ne(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}function Fe(e){return null!=e}function Ye(e){return je(e)?("0"+e).slice(-2):""}function ze(e,t){return e&&e.className&&e.className.split&&e.className.split(/\s+/).indexOf(t)>=0}"undefined"==typeof Element||Element.prototype.closest||(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest=function(e){let t=this;if(!document.documentElement.contains(t))return null;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null});let $e=(()=>{let e=class{constructor(){this.dismissible=!0,this.type="warning"}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return new e},token:e,providedIn:"root"}),e})(),He=(()=>{let e=class{constructor(e,t,n){this._renderer=t,this._element=n,this.close=new i.o,this.dismissible=e.dismissible,this.type=e.type}closeHandler(){this.close.emit()}ngOnChanges(e){const t=e.type;t&&!t.firstChange&&(this._renderer.removeClass(this._element.nativeElement,"alert-"+t.previousValue),this._renderer.addClass(this._element.nativeElement,"alert-"+t.currentValue))}ngOnInit(){this._renderer.addClass(this._element.nativeElement,"alert-"+this.type)}};return e.\u0275fac=function(t){return new(t||e)(i.Mb($e),i.Mb(i.E),i.Mb(i.m))},e.\u0275cmp=i.Gb({type:e,selectors:[["ngb-alert"]],hostAttrs:["role","alert",1,"alert"],hostVars:2,hostBindings:function(e,t){2&e&&i.Eb("alert-dismissible",t.dismissible)},inputs:{dismissible:"dismissible",type:"type"},outputs:{close:"close"},features:[i.wb],ngContentSelectors:O,decls:2,vars:1,consts:function(){return[["type","button","class","close",3,"click",4,"ngIf",6,"aria-label"],["type","button",1,"close",3,"click",6,"aria-label"],["aria-label","Close"],["aria-hidden","true"]]},template:function(e,t){1&e&&(i.oc(),i.nc(0),i.Mc(1,C,4,0,"button",0)),2&e&&(i.yb(1),i.pc("ngIf",t.dismissible))},directives:[r.r],styles:["ngb-alert{display:block}"],encapsulation:2,changeDetection:0}),e})(),We=(()=>{let e=class{};return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[r.c]]}),e})(),Ve=(()=>{let e=class{constructor(){this.collapsed=!1}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=i.Hb({type:e,selectors:[["","ngbCollapse",""]],hostVars:4,hostBindings:function(e,t){2&e&&i.Eb("collapse",!0)("show",!t.collapsed)},inputs:{collapsed:["ngbCollapse","collapsed"]},exportAs:["ngbCollapse"]}),e})(),Be=(()=>{let e=class{};return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)}}),e})();class Ue{constructor(e,t,n){this.year=Ne(e)?e:null,this.month=Ne(t)?t:null,this.day=Ne(n)?n:null}static from(e){return e instanceof Ue?e:e?new Ue(e.year,e.month,e.day):null}equals(e){return null!=e&&this.year===e.year&&this.month===e.month&&this.day===e.day}before(e){return!!e&&(this.year===e.year?this.month===e.month?this.day!==e.day&&this.day<e.day:this.month<e.month:this.year<e.year)}after(e){return!!e&&(this.year===e.year?this.month===e.month?this.day!==e.day&&this.day>e.day:this.month>e.month:this.year>e.year)}}function qe(e){return new Ue(e.getFullYear(),e.getMonth()+1,e.getDate())}function Ge(e){const t=new Date(e.year,e.month-1,e.day,12);return isNaN(t.getTime())||t.setFullYear(e.year),t}function Je(){return new Ke}let Qe=(()=>{let e=class{};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:Je,token:e,providedIn:"root"}),e})(),Ke=(()=>{let e=class extends Qe{getDaysPerWeek(){return 7}getMonths(){return[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}getNext(e,t="d",n=1){let i=Ge(e),r=!0,s=i.getMonth();switch(t){case"y":i.setFullYear(i.getFullYear()+n);break;case"m":s+=n,i.setMonth(s),s%=12,s<0&&(s+=12);break;case"d":i.setDate(i.getDate()+n),r=!1;break;default:return e}return r&&i.getMonth()!==s&&i.setDate(0),qe(i)}getPrev(e,t="d",n=1){return this.getNext(e,t,-n)}getWeekday(e){let t=Ge(e).getDay();return 0===t?7:t}getWeekNumber(e,t){7===t&&(t=0);const n=Ge(e[(11-t)%7]);n.setDate(n.getDate()+4-(n.getDay()||7));const i=n.getTime();return n.setMonth(0),n.setDate(1),Math.floor(Math.round((i-n.getTime())/864e5)/7)+1}getToday(){return qe(new Date)}isValid(e){if(!(e&&Ne(e.year)&&Ne(e.month)&&Ne(e.day)))return!1;if(0===e.year)return!1;const t=Ge(e);return!isNaN(t.getTime())&&t.getFullYear()===e.year&&t.getMonth()+1===e.month&&t.getDate()===e.day}};return e.\u0275fac=function(t){return Xn(t||e)},e.\u0275prov=i.Ib({token:e,factory:function(t){return e.\u0275fac(t)}}),e})();function Ze(e,t){return!function(e,t){return!e&&!t||!!e&&!!t&&e.equals(t)}(e,t)}function Xe(e,t){return!(!e&&!t||e&&t&&e.year===t.year&&e.month===t.month)}function et(e,t,n){return e&&t&&e.before(t)?t:e&&n&&e.after(n)?n:e||null}function tt(e,t){const{minDate:n,maxDate:i,disabled:r,markDisabled:s}=t;return!(null==e||r||s&&s(e,{year:e.year,month:e.month})||n&&e.before(n)||i&&e.after(i))}let nt=(()=>{let e=class{getDayNumerals(e){return""+e.day}getWeekNumerals(e){return""+e}getYearNumerals(e){return""+e}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return e=Object(i.dc)(i.v),new it(e);var e},token:e,providedIn:"root"}),e})(),it=(()=>{let e=class extends nt{constructor(e){super(),this._locale=e;const t=Object(r.F)(e,r.g.Standalone,r.B.Short);this._weekdaysShort=t.map((e,n)=>t[(n+1)%7]),this._monthsShort=Object(r.H)(e,r.g.Standalone,r.B.Abbreviated),this._monthsFull=Object(r.H)(e,r.g.Standalone,r.B.Wide)}getWeekdayShortName(e){return this._weekdaysShort[e-1]||""}getMonthShortName(e){return this._monthsShort[e-1]||""}getMonthFullName(e){return this._monthsFull[e-1]||""}getDayAriaLabel(e){const t=new Date(e.year,e.month-1,e.day);return Object(r.E)(t,"fullDate",this._locale)}};return e.\u0275fac=function(t){return new(t||e)(i.dc(i.v))},e.\u0275prov=i.Ib({token:e,factory:function(t){return e.\u0275fac(t)}}),e})(),rt=(()=>{let e=class{constructor(e,t){this._calendar=e,this._i18n=t,this._VALIDATORS={dayTemplateData:e=>{if(this._state.dayTemplateData!==e)return{dayTemplateData:e}},displayMonths:e=>{if(Ne(e=Ae(e))&&e>0&&this._state.displayMonths!==e)return{displayMonths:e}},disabled:e=>{if(this._state.disabled!==e)return{disabled:e}},firstDayOfWeek:e=>{if(Ne(e=Ae(e))&&e>=0&&this._state.firstDayOfWeek!==e)return{firstDayOfWeek:e}},focusVisible:e=>{if(this._state.focusVisible!==e&&!this._state.disabled)return{focusVisible:e}},markDisabled:e=>{if(this._state.markDisabled!==e)return{markDisabled:e}},maxDate:e=>{const t=this.toValidDate(e,null);if(Ze(this._state.maxDate,t))return{maxDate:t}},minDate:e=>{const t=this.toValidDate(e,null);if(Ze(this._state.minDate,t))return{minDate:t}},navigation:e=>{if(this._state.navigation!==e)return{navigation:e}},outsideDays:e=>{if(this._state.outsideDays!==e)return{outsideDays:e}}},this._model$=new o.a,this._dateSelect$=new o.a,this._state={dayTemplateData:null,markDisabled:null,maxDate:null,minDate:null,disabled:!1,displayMonths:1,firstDate:null,firstDayOfWeek:1,lastDate:null,focusDate:null,focusVisible:!1,months:[],navigation:"select",outsideDays:"visible",prevDisabled:!1,nextDisabled:!1,selectedDate:null,selectBoxes:{years:[],months:[]}}}get model$(){return this._model$.pipe(Object(v.a)(e=>e.months.length>0))}get dateSelect$(){return this._dateSelect$.pipe(Object(v.a)(e=>null!==e))}set(e){let t=Object.keys(e).map(t=>this._VALIDATORS[t](e[t])).reduce((e,t)=>Object.assign(Object.assign({},e),t),{});Object.keys(t).length>0&&this._nextState(t)}focus(e){const t=this.toValidDate(e,null);null!=t&&!this._state.disabled&&Ze(this._state.focusDate,t)&&this._nextState({focusDate:e})}focusSelect(){tt(this._state.focusDate,this._state)&&this.select(this._state.focusDate,{emitEvent:!0})}open(e){const t=this.toValidDate(e,this._calendar.getToday());null==t||this._state.disabled||this._state.firstDate&&!Xe(this._state.firstDate,t)||this._nextState({firstDate:t})}select(e,t={}){const n=this.toValidDate(e,null);null==n||this._state.disabled||(Ze(this._state.selectedDate,n)&&this._nextState({selectedDate:n}),t.emitEvent&&tt(n,this._state)&&this._dateSelect$.next(n))}toValidDate(e,t){const n=Ue.from(e);return void 0===t&&(t=this._calendar.getToday()),this._calendar.isValid(n)?n:t}getMonth(e){for(let t of this._state.months)if(e.month===t.number&&e.year===t.year)return t;throw new Error(`month ${e.month} of year ${e.year} not found`)}_nextState(e){const t=this._updateState(e);this._patchContexts(t),this._state=t,this._model$.next(this._state)}_patchContexts(e){const{months:t,displayMonths:n,selectedDate:i,focusDate:r,focusVisible:s,disabled:o,outsideDays:a}=e;e.months.forEach(e=>{e.weeks.forEach(c=>{c.days.forEach(c=>{r&&(c.context.focused=r.equals(c.date)&&s),c.tabindex=!o&&r&&c.date.equals(r)&&r.month===e.number?0:-1,!0===o&&(c.context.disabled=!0),void 0!==i&&(c.context.selected=null!==i&&i.equals(c.date)),e.number!==c.date.month&&(c.hidden="hidden"===a||"collapsed"===a||n>1&&c.date.after(t[0].firstDate)&&c.date.before(t[n-1].lastDate))})})})}_updateState(e){const t=Object.assign({},this._state,e);let n=t.firstDate;if(("minDate"in e||"maxDate"in e)&&(function(e,t){if(t&&e&&t.before(e))throw new Error(`'maxDate' ${t} should be greater than 'minDate' ${e}`)}(t.minDate,t.maxDate),t.focusDate=et(t.focusDate,t.minDate,t.maxDate),t.firstDate=et(t.firstDate,t.minDate,t.maxDate),n=t.focusDate),"disabled"in e&&(t.focusVisible=!1),"selectedDate"in e&&0===this._state.months.length&&(n=t.selectedDate),"focusVisible"in e)return t;if("focusDate"in e&&(t.focusDate=et(t.focusDate,t.minDate,t.maxDate),n=t.focusDate,0!==t.months.length&&t.focusDate&&!t.focusDate.before(t.firstDate)&&!t.focusDate.after(t.lastDate)))return t;if("firstDate"in e&&(t.firstDate=et(t.firstDate,t.minDate,t.maxDate),n=t.firstDate),n){const i=function(e,t,n,i,r){const{displayMonths:s,months:o}=n,a=o.splice(0,o.length);return Array.from({length:s},(n,i)=>{const s=Object.assign(e.getNext(t,"m",i),{day:1});if(o[i]=null,!r){const e=a.findIndex(e=>e.firstDate.equals(s));-1!==e&&(o[i]=a.splice(e,1)[0])}return s}).forEach((t,r)=>{null===o[r]&&(o[r]=function(e,t,n,i,r={}){const{dayTemplateData:s,minDate:o,maxDate:a,firstDayOfWeek:c,markDisabled:l,outsideDays:u}=n,d=e.getToday();r.firstDate=null,r.lastDate=null,r.number=t.month,r.year=t.year,r.weeks=r.weeks||[],r.weekdays=r.weekdays||[],t=function(e,t,n){const i=e.getDaysPerWeek(),r=new Ue(t.year,t.month,1),s=e.getWeekday(r)%i;return e.getPrev(r,"d",(i+s-n)%i)}(e,t,c);for(let h=0;h<e.getWeeksPerMonth();h++){let n=r.weeks[h];n||(n=r.weeks[h]={number:0,days:[],collapsed:!0});const f=n.days;for(let c=0;c<e.getDaysPerWeek();c++){0===h&&(r.weekdays[c]=e.getWeekday(t));const n=new Ue(t.year,t.month,t.day),u=e.getNext(n),p=i.getDayAriaLabel(n);let m=!!(o&&n.before(o)||a&&n.after(a));!m&&l&&(m=l(n,{month:r.number,year:r.year}));let b=n.equals(d),g=s?s(n,{month:r.number,year:r.year}):void 0;null===r.firstDate&&n.month===r.number&&(r.firstDate=n),n.month===r.number&&u.month!==r.number&&(r.lastDate=n);let _=f[c];_||(_=f[c]={}),_.date=n,_.context=Object.assign(_.context||{},{$implicit:n,date:n,data:g,currentMonth:r.number,currentYear:r.year,disabled:m,focused:!1,selected:!1,today:b}),_.tabindex=-1,_.ariaLabel=p,_.hidden=!1,t=u}n.number=e.getWeekNumber(f.map(e=>e.date),c),n.collapsed="collapsed"===u&&f[0].date.month!==r.number&&f[f.length-1].date.month!==r.number}return r}(e,t,n,i,a.shift()||{}))}),o}(this._calendar,n,t,this._i18n,"dayTemplateData"in e||"firstDayOfWeek"in e||"markDisabled"in e||"minDate"in e||"maxDate"in e||"disabled"in e||"outsideDays"in e);t.months=i,t.firstDate=i[0].firstDate,t.lastDate=i[i.length-1].lastDate,"selectedDate"in e&&!tt(t.selectedDate,t)&&(t.selectedDate=null),"firstDate"in e&&(!t.focusDate||t.focusDate.before(t.firstDate)||t.focusDate.after(t.lastDate))&&(t.focusDate=n);const r=!this._state.firstDate||this._state.firstDate.year!==t.firstDate.year,s=!this._state.firstDate||this._state.firstDate.month!==t.firstDate.month;"select"===t.navigation?(("minDate"in e||"maxDate"in e||0===t.selectBoxes.years.length||r)&&(t.selectBoxes.years=function(e,t,n){if(!e)return[];const i=t?Math.max(t.year,e.year-500):e.year-10,r=(n?Math.min(n.year,e.year+500):e.year+10)-i+1,s=Array(r);for(let o=0;o<r;o++)s[o]=i+o;return s}(t.firstDate,t.minDate,t.maxDate)),("minDate"in e||"maxDate"in e||0===t.selectBoxes.months.length||r)&&(t.selectBoxes.months=function(e,t,n,i){if(!t)return[];let r=e.getMonths(t.year);if(n&&t.year===n.year){const e=r.findIndex(e=>e===n.month);r=r.slice(e)}if(i&&t.year===i.year){const e=r.findIndex(e=>e===i.month);r=r.slice(0,e+1)}return r}(this._calendar,t.firstDate,t.minDate,t.maxDate))):t.selectBoxes={years:[],months:[]},"arrows"!==t.navigation&&"select"!==t.navigation||!(s||r||"minDate"in e||"maxDate"in e||"disabled"in e)||(t.prevDisabled=t.disabled||function(e,t,n){const i=Object.assign(e.getPrev(t,"m"),{day:1});return null!=n&&(i.year===n.year&&i.month<n.month||i.year<n.year&&1===n.month)}(this._calendar,t.firstDate,t.minDate),t.nextDisabled=t.disabled||function(e,t,n){const i=Object.assign(e.getNext(t,"m"),{day:1});return null!=n&&i.after(n)}(this._calendar,t.lastDate,t.maxDate))}return t}};return e.\u0275fac=function(t){return new(t||e)(i.dc(Qe),i.dc(nt))},e.\u0275prov=i.Ib({token:e,factory:function(t){return e.\u0275fac(t)}}),e})();var st=function(e){return e[e.PREV=0]="PREV",e[e.NEXT=1]="NEXT",e}({});let ot=(()=>{let e=class{constructor(){this.displayMonths=1,this.firstDayOfWeek=1,this.navigation="select",this.outsideDays="visible",this.showWeekdays=!0,this.showWeekNumbers=!1}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return new e},token:e,providedIn:"root"}),e})();function at(){return new lt}let ct=(()=>{let e=class{};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:at,token:e,providedIn:"root"}),e})(),lt=(()=>{let e=class extends ct{fromModel(e){return e&&Ne(e.year)&&Ne(e.month)&&Ne(e.day)?{year:e.year,month:e.month,day:e.day}:null}toModel(e){return e&&Ne(e.year)&&Ne(e.month)&&Ne(e.day)?{year:e.year,month:e.month,day:e.day}:null}};return e.\u0275fac=function(t){return ei(t||e)},e.\u0275prov=i.Ib({token:e,factory:function(t){return e.\u0275fac(t)}}),e})();const ut={provide:s.o,useExisting:Object(i.T)(()=>ht),multi:!0};let dt=(()=>{let e=class{constructor(e){this.templateRef=e}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.L))},e.\u0275dir=i.Hb({type:e,selectors:[["ng-template","ngbDatepickerContent",""]]}),e})(),ht=(()=>{let e=class{constructor(e,t,n,r,s,a,c,l){this._service=e,this._calendar=t,this.i18n=n,this._elementRef=a,this._ngbDateAdapter=c,this._ngZone=l,this._controlValue=null,this._destroyed$=new o.a,this._publicState={},this.navigate=new i.o,this.dateSelect=new i.o,this.select=this.dateSelect,this.onChange=e=>{},this.onTouched=()=>{},["dayTemplate","dayTemplateData","displayMonths","firstDayOfWeek","footerTemplate","markDisabled","minDate","maxDate","navigation","outsideDays","showWeekdays","showWeekNumbers","startDate"].forEach(e=>this[e]=r[e]),e.dateSelect$.pipe(Object(y.a)(this._destroyed$)).subscribe(e=>{this.dateSelect.emit(e)}),e.model$.pipe(Object(y.a)(this._destroyed$)).subscribe(e=>{const t=e.firstDate,n=this.model?this.model.firstDate:null;this._publicState={maxDate:e.maxDate,minDate:e.minDate,firstDate:e.firstDate,lastDate:e.lastDate,focusedDate:e.focusDate,months:e.months.map(e=>e.firstDate)};let i=!1;if(!t.equals(n)&&(this.navigate.emit({current:n?{year:n.year,month:n.month}:null,next:{year:t.year,month:t.month},preventDefault:()=>i=!0}),i&&null!==n))return void this._service.open(n);const r=e.selectedDate,o=e.focusDate,a=this.model?this.model.focusDate:null;this.model=e,Ze(r,this._controlValue)&&(this._controlValue=r,this.onTouched(),this.onChange(this._ngbDateAdapter.toModel(r))),Ze(o,a)&&a&&e.focusVisible&&this.focus(),s.markForCheck()})}get state(){return this._publicState}get calendar(){return this._calendar}focusDate(e){this._service.focus(Ue.from(e))}focusSelect(){this._service.focusSelect()}focus(){this._ngZone.onStable.asObservable().pipe(Object(w.a)(1)).subscribe(()=>{const e=this._elementRef.nativeElement.querySelector('div.ngb-dp-day[tabindex="0"]');e&&e.focus()})}navigateTo(e){this._service.open(Ue.from(e?e.day?e:Object.assign(Object.assign({},e),{day:1}):null))}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{const e=Object(c.a)(this._contentEl.nativeElement,"focusin"),t=Object(c.a)(this._contentEl.nativeElement,"focusout"),{nativeElement:n}=this._elementRef;Object(l.a)(e,t).pipe(Object(v.a)(({target:e,relatedTarget:t})=>!(ze(e,"ngb-dp-day")&&ze(t,"ngb-dp-day")&&n.contains(e)&&n.contains(t))),Object(y.a)(this._destroyed$)).subscribe(({type:e})=>this._ngZone.run(()=>this._service.set({focusVisible:"focusin"===e})))})}ngOnDestroy(){this._destroyed$.next()}ngOnInit(){if(void 0===this.model){const e={};["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays"].forEach(t=>e[t]=this[t]),this._service.set(e),this.navigateTo(this.startDate)}this.dayTemplate||(this.dayTemplate=this._defaultDayTemplate)}ngOnChanges(e){const t={};if(["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays"].filter(t=>t in e).forEach(e=>t[e]=this[e]),this._service.set(t),"startDate"in e){const{currentValue:t,previousValue:n}=e.startDate;Xe(n,t)&&this.navigateTo(this.startDate)}}onDateSelect(e){this._service.focus(e),this._service.select(e,{emitEvent:!0})}onNavigateDateSelect(e){this._service.open(e)}onNavigateEvent(e){switch(e){case st.PREV:this._service.open(this._calendar.getPrev(this.model.firstDate,"m",1));break;case st.NEXT:this._service.open(this._calendar.getNext(this.model.firstDate,"m",1))}}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._service.set({disabled:e})}writeValue(e){this._controlValue=Ue.from(this._ngbDateAdapter.fromModel(e)),this._service.select(this._controlValue)}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(rt),i.Mb(Qe),i.Mb(nt),i.Mb(ot),i.Mb(i.h),i.Mb(i.m),i.Mb(ct),i.Mb(i.A))},e.\u0275cmp=i.Gb({type:e,selectors:[["ngb-datepicker"]],contentQueries:function(e,t,n){var r;1&e&&i.Ic(n,dt,!0),2&e&&i.zc(r=i.hc())&&(t.contentTemplate=r.first)},viewQuery:function(e,t){var n;1&e&&(i.Jc(L,!0),i.Jc(R,!0)),2&e&&(i.zc(n=i.hc())&&(t._defaultDayTemplate=n.first),i.zc(n=i.hc())&&(t._contentEl=n.first))},inputs:{dayTemplate:"dayTemplate",dayTemplateData:"dayTemplateData",displayMonths:"displayMonths",firstDayOfWeek:"firstDayOfWeek",footerTemplate:"footerTemplate",markDisabled:"markDisabled",maxDate:"maxDate",minDate:"minDate",navigation:"navigation",outsideDays:"outsideDays",showWeekdays:"showWeekdays",showWeekNumbers:"showWeekNumbers",startDate:"startDate"},outputs:{navigate:"navigate",dateSelect:"dateSelect",select:"select"},exportAs:["ngbDatepicker"],features:[i.xb([ut,rt]),i.wb],decls:10,vars:5,consts:[["defaultDayTemplate",""],["defaultContentTemplate",""],[1,"ngb-dp-header"],[3,"date","months","disabled","showSelect","prevDisabled","nextDisabled","selectBoxes","navigate","select",4,"ngIf"],[1,"ngb-dp-content"],["content",""],[3,"ngTemplateOutlet"],["ngbDatepickerDayView","",3,"date","currentMonth","selected","disabled","focused"],["class","ngb-dp-month",4,"ngFor","ngForOf"],[1,"ngb-dp-month"],["class","ngb-dp-month-name",4,"ngIf"],[3,"month"],[1,"ngb-dp-month-name"],[3,"date","months","disabled","showSelect","prevDisabled","nextDisabled","selectBoxes","navigate","select"]],template:function(e,t){if(1&e&&(i.Mc(0,E,1,5,"ng-template",null,0,i.Nc),i.Mc(2,P,1,1,"ng-template",null,1,i.Nc),i.Sb(4,"div",2),i.Mc(5,j,1,7,"ngb-datepicker-navigation",3),i.Rb(),i.Sb(6,"div",4,5),i.Mc(8,N,0,0,"ng-template",6),i.Rb(),i.Mc(9,F,0,0,"ng-template",6)),2&e){const e=i.Ac(3);i.yb(5),i.pc("ngIf","none"!==t.navigation),i.yb(1),i.Eb("ngb-dp-months",!t.contentTemplate),i.yb(2),i.pc("ngTemplateOutlet",(null==t.contentTemplate?null:t.contentTemplate.templateRef)||e),i.yb(1),i.pc("ngTemplateOutlet",t.footerTemplate)}},directives:function(){return[r.r,r.w,Pt,r.q,mt,bt]},styles:["ngb-datepicker{border:1px solid #dfdfdf;border-radius:.25rem;display:inline-block}ngb-datepicker-month{pointer-events:auto}ngb-datepicker.dropdown-menu{padding:0}.ngb-dp-body{z-index:1050}.ngb-dp-header{border-bottom:0;border-radius:.25rem .25rem 0 0;padding-top:.25rem;background-color:#f8f9fa;background-color:var(--light)}.ngb-dp-months{display:-ms-flexbox;display:flex}.ngb-dp-month{pointer-events:none}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center;background-color:#f8f9fa;background-color:var(--light)}.ngb-dp-month+.ngb-dp-month .ngb-dp-month-name,.ngb-dp-month+.ngb-dp-month .ngb-dp-week{padding-left:1rem}.ngb-dp-month:last-child .ngb-dp-week{padding-right:.25rem}.ngb-dp-month:first-child .ngb-dp-week{padding-left:.25rem}.ngb-dp-month .ngb-dp-week:last-child{padding-bottom:.25rem}"],encapsulation:2,changeDetection:0}),e})();var ft=function(e){return e[e.Tab=9]="Tab",e[e.Enter=13]="Enter",e[e.Escape=27]="Escape",e[e.Space=32]="Space",e[e.PageUp=33]="PageUp",e[e.PageDown=34]="PageDown",e[e.End=35]="End",e[e.Home=36]="Home",e[e.ArrowLeft=37]="ArrowLeft",e[e.ArrowUp=38]="ArrowUp",e[e.ArrowRight=39]="ArrowRight",e[e.ArrowDown=40]="ArrowDown",e}({});let pt=(()=>{let e=class{processKey(e,t){const{state:n,calendar:i}=t;switch(e.which){case ft.PageUp:t.focusDate(i.getPrev(n.focusedDate,e.shiftKey?"y":"m",1));break;case ft.PageDown:t.focusDate(i.getNext(n.focusedDate,e.shiftKey?"y":"m",1));break;case ft.End:t.focusDate(e.shiftKey?n.maxDate:n.lastDate);break;case ft.Home:t.focusDate(e.shiftKey?n.minDate:n.firstDate);break;case ft.ArrowLeft:t.focusDate(i.getPrev(n.focusedDate,"d",1));break;case ft.ArrowUp:t.focusDate(i.getPrev(n.focusedDate,"d",i.getDaysPerWeek()));break;case ft.ArrowRight:t.focusDate(i.getNext(n.focusedDate,"d",1));break;case ft.ArrowDown:t.focusDate(i.getNext(n.focusedDate,"d",i.getDaysPerWeek()));break;case ft.Enter:case ft.Space:t.focusSelect();break;default:return}e.preventDefault(),e.stopPropagation()}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return new e},token:e,providedIn:"root"}),e})(),mt=(()=>{let e=class{constructor(e,t,n,i){this.i18n=e,this.datepicker=t,this._keyboardService=n,this._service=i}set month(e){this.viewModel=this._service.getMonth(e)}onKeyDown(e){this._keyboardService.processKey(e,this.datepicker)}doSelect(e){e.context.disabled||e.hidden||this.datepicker.onDateSelect(e.date)}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(nt),i.Mb(ht),i.Mb(pt),i.Mb(rt))},e.\u0275cmp=i.Gb({type:e,selectors:[["ngb-datepicker-month"]],hostAttrs:["role","grid"],hostBindings:function(e,t){1&e&&i.gc("keydown",(function(e){return t.onKeyDown(e)}))},inputs:{month:"month"},decls:2,vars:2,consts:[["class","ngb-dp-week ngb-dp-weekdays","role","row",4,"ngIf"],["ngFor","",3,"ngForOf"],["role","row",1,"ngb-dp-week","ngb-dp-weekdays"],["class","ngb-dp-weekday ngb-dp-showweek",4,"ngIf"],["class","ngb-dp-weekday small","role","columnheader",4,"ngFor","ngForOf"],[1,"ngb-dp-weekday","ngb-dp-showweek"],["role","columnheader",1,"ngb-dp-weekday","small"],["class","ngb-dp-week","role","row",4,"ngIf"],["role","row",1,"ngb-dp-week"],["class","ngb-dp-week-number small text-muted",4,"ngIf"],["class","ngb-dp-day","role","gridcell",3,"disabled","tabindex","hidden","ngb-dp-today","click",4,"ngFor","ngForOf"],[1,"ngb-dp-week-number","small","text-muted"],["role","gridcell",1,"ngb-dp-day",3,"tabindex","click"],[3,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,t){1&e&&(i.Mc(0,$,3,2,"div",0),i.Mc(1,q,1,1,"ng-template",1)),2&e&&(i.pc("ngIf",t.datepicker.showWeekdays),i.yb(1),i.pc("ngForOf",t.viewModel.weeks))},directives:[r.r,r.q,r.w],styles:['ngb-datepicker-month{display:block}.ngb-dp-week-number,.ngb-dp-weekday{line-height:2rem;text-align:center;font-style:italic}.ngb-dp-weekday{color:#5bc0de;color:var(--info)}.ngb-dp-week{border-radius:.25rem;display:-ms-flexbox;display:flex}.ngb-dp-weekdays{border-bottom:1px solid rgba(0,0,0,.125);border-radius:0;background-color:#f8f9fa;background-color:var(--light)}.ngb-dp-day,.ngb-dp-week-number,.ngb-dp-weekday{width:2rem;height:2rem}.ngb-dp-day{cursor:pointer}.ngb-dp-day.disabled,.ngb-dp-day.hidden{cursor:default;pointer-events:none}.ngb-dp-day[tabindex="0"]{z-index:1}'],encapsulation:2}),e})(),bt=(()=>{let e=class{constructor(e){this.i18n=e,this.navigation=st,this.months=[],this.navigate=new i.o,this.select=new i.o}onClickPrev(e){e.currentTarget.focus(),this.navigate.emit(this.navigation.PREV)}onClickNext(e){e.currentTarget.focus(),this.navigate.emit(this.navigation.NEXT)}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(nt))},e.\u0275cmp=i.Gb({type:e,selectors:[["ngb-datepicker-navigation"]],inputs:{months:"months",date:"date",disabled:"disabled",showSelect:"showSelect",prevDisabled:"prevDisabled",nextDisabled:"nextDisabled",selectBoxes:"selectBoxes"},outputs:{navigate:"navigate",select:"select"},decls:10,vars:4,consts:function(){return[[1,"ngb-dp-arrow"],["type","button",1,"btn","btn-link","ngb-dp-arrow-btn",3,"disabled","click",6,"aria-label","title"],["aria-label","Previous month","title","Previous month"],[1,"ngb-dp-navigation-chevron"],["class","ngb-dp-navigation-select",3,"date","disabled","months","years","select",4,"ngIf"],[4,"ngIf"],[1,"ngb-dp-arrow","right"],["aria-label","Next month","title","Next month"],[1,"ngb-dp-navigation-select",3,"date","disabled","months","years","select"],["ngFor","",3,"ngForOf"],["class","ngb-dp-arrow",4,"ngIf"],[1,"ngb-dp-month-name"]]},template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Sb(1,"button",1),i.Yb(2,2),i.gc("click",(function(e){return t.onClickPrev(e)})),i.Nb(3,"span",3),i.Rb(),i.Rb(),i.Mc(4,G,1,4,"ngb-datepicker-navigation-select",4),i.Mc(5,Z,1,1,void 0,5),i.Sb(6,"div",6),i.Sb(7,"button",1),i.Yb(8,7),i.gc("click",(function(e){return t.onClickNext(e)})),i.Nb(9,"span",3),i.Rb(),i.Rb()),2&e&&(i.yb(1),i.pc("disabled",t.prevDisabled),i.yb(3),i.pc("ngIf",t.showSelect),i.yb(1),i.pc("ngIf",!t.showSelect),i.yb(2),i.pc("disabled",t.nextDisabled))},directives:function(){return[r.r,jt,r.q]},styles:["ngb-datepicker-navigation{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.ngb-dp-navigation-chevron{border-style:solid;border-width:.2em .2em 0 0;display:inline-block;width:.75em;height:.75em;margin-left:.25em;margin-right:.15em;-webkit-transform:rotate(-135deg);transform:rotate(-135deg)}.right .ngb-dp-navigation-chevron{-webkit-transform:rotate(45deg);transform:rotate(45deg);margin-left:.15em;margin-right:.25em}.ngb-dp-arrow{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;padding-right:0;padding-left:0;margin:0;width:2rem;height:2rem}.ngb-dp-arrow.right{-ms-flex-pack:end;justify-content:flex-end}.ngb-dp-arrow-btn{padding:0 .25rem;margin:0 .5rem;border:none;background-color:transparent;z-index:1}.ngb-dp-arrow-btn:focus{outline-width:1px;outline-style:auto}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.ngb-dp-arrow-btn:focus{outline-style:solid}}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center}.ngb-dp-navigation-select{display:-ms-flexbox;display:flex;-ms-flex:1 1 9rem;flex:1 1 9rem}"],encapsulation:2,changeDetection:0}),e})();const gt=(e,t)=>!!t&&t.some(t=>t.contains(e)),_t=(e,t)=>!t||null!=function(e,t){return t?void 0===e.closest?null:e.closest(t):null}(e,t),yt=(()=>"undefined"!=typeof navigator&&!!navigator.userAgent&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2||/Android/.test(navigator.userAgent)))();function vt(e,t,n,i,r,s,o,a){var l;n&&e.runOutsideAngular((l=()=>{const l=Object(c.a)(t,"keydown").pipe(Object(y.a)(r),Object(v.a)(e=>e.which===ft.Escape),Object(S.a)(e=>e.preventDefault())),h=Object(c.a)(t,"mousedown").pipe(Object(g.a)(e=>{const t=e.target;return 2!==e.button&&!gt(t,o)&&("inside"===n?gt(t,s)&&_t(t,a):"outside"===n?!gt(t,s):_t(t,a)||!gt(t,s))}),Object(y.a)(r)),f=Object(c.a)(t,"mouseup").pipe(M(h),Object(v.a)(([e,t])=>t),Object(D.a)(0),Object(y.a)(r));(function(...e){if(1===e.length){if(!Object(u.a)(e[0]))return e[0];e=e[0]}return Object(d.a)(e,void 0).lift(new p)})([l.pipe(Object(g.a)(e=>0)),f.pipe(Object(g.a)(e=>1))]).subscribe(t=>e.run(()=>i(t)))},yt?()=>setTimeout(()=>l(),100):l))}const wt=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function St(e){const t=Array.from(e.querySelectorAll(wt)).filter(e=>-1!==e.tabIndex);return[t[0],t[t.length-1]]}const Mt=(e,t,n,i=!1)=>{e.runOutsideAngular(()=>{const e=Object(c.a)(t,"focusin").pipe(Object(y.a)(n),Object(g.a)(e=>e.target));Object(c.a)(t,"keydown").pipe(Object(y.a)(n),Object(v.a)(e=>e.which===ft.Tab),M(e)).subscribe(([e,n])=>{const[i,r]=St(t);n!==i&&n!==t||!e.shiftKey||(r.focus(),e.preventDefault()),n!==r||e.shiftKey||(i.focus(),e.preventDefault())}),i&&Object(c.a)(t,"click").pipe(Object(y.a)(n),M(e),Object(g.a)(e=>e[1])).subscribe(e=>e.focus())})};class xt{getAllStyles(e){return window.getComputedStyle(e)}getStyle(e,t){return this.getAllStyles(e)[t]}isStaticPositioned(e){return"static"===(this.getStyle(e,"position")||"static")}offsetParent(e){let t=e.offsetParent||document.documentElement;for(;t&&t!==document.documentElement&&this.isStaticPositioned(t);)t=t.offsetParent;return t||document.documentElement}position(e,t=!0){let n,i={width:0,height:0,top:0,bottom:0,left:0,right:0};if("fixed"===this.getStyle(e,"position"))n=e.getBoundingClientRect(),n={top:n.top,bottom:n.bottom,left:n.left,right:n.right,height:n.height,width:n.width};else{const t=this.offsetParent(e);n=this.offset(e,!1),t!==document.documentElement&&(i=this.offset(t,!1)),i.top+=t.clientTop,i.left+=t.clientLeft}return n.top-=i.top,n.bottom-=i.top,n.left-=i.left,n.right-=i.left,t&&(n.top=Math.round(n.top),n.bottom=Math.round(n.bottom),n.left=Math.round(n.left),n.right=Math.round(n.right)),n}offset(e,t=!0){const n=e.getBoundingClientRect(),i=window.pageYOffset-document.documentElement.clientTop,r=window.pageXOffset-document.documentElement.clientLeft;let s={height:n.height||e.offsetHeight,width:n.width||e.offsetWidth,top:n.top+i,bottom:n.bottom+i,left:n.left+r,right:n.right+r};return t&&(s.height=Math.round(s.height),s.width=Math.round(s.width),s.top=Math.round(s.top),s.bottom=Math.round(s.bottom),s.left=Math.round(s.left),s.right=Math.round(s.right)),s}positionElements(e,t,n,i){const[r="top",s="center"]=n.split("-"),o=i?this.offset(e,!1):this.position(e,!1),a=this.getAllStyles(t),c=parseFloat(a.marginTop),l=parseFloat(a.marginBottom),u=parseFloat(a.marginLeft),d=parseFloat(a.marginRight);let h=0,f=0;switch(r){case"top":h=o.top-(t.offsetHeight+c+l);break;case"bottom":h=o.top+o.height;break;case"left":f=o.left-(t.offsetWidth+u+d);break;case"right":f=o.left+o.width}switch(s){case"top":h=o.top;break;case"bottom":h=o.top+o.height-t.offsetHeight;break;case"left":f=o.left;break;case"right":f=o.left+o.width-t.offsetWidth;break;case"center":"top"===r||"bottom"===r?f=o.left+o.width/2-t.offsetWidth/2:h=o.top+o.height/2-t.offsetHeight/2}t.style.transform=`translate(${Math.round(f)}px, ${Math.round(h)}px)`;const p=t.getBoundingClientRect(),m=document.documentElement,b=window.innerHeight||m.clientHeight,g=window.innerWidth||m.clientWidth;return p.left>=0&&p.top>=0&&p.right<=g&&p.bottom<=b}}const kt=/\s+/,Dt=new xt;function Tt(e,t,n,i,r){let s=Array.isArray(n)?n:n.split(kt);const o=["top","bottom","left","right","top-left","top-right","bottom-left","bottom-right","left-top","left-bottom","right-top","right-bottom"],a=t.classList,c=e=>{const[t,n]=e.split("-"),i=[];return r&&(i.push(`${r}-${t}`),n&&i.push(`${r}-${t}-${n}`),i.forEach(e=>{a.add(e)})),i};r&&o.forEach(e=>{a.remove(`${r}-${e}`)});let l=s.findIndex(e=>"auto"===e);l>=0&&o.forEach((function(e){null==s.find(t=>-1!==t.search("^"+e))&&s.splice(l++,1,e)}));const u=t.style;u.position="absolute",u.top="0",u.left="0",u["will-change"]="transform";let d=null,h=!1;for(d of s){let n=c(d);if(Dt.positionElements(e,t,d,i)){h=!0;break}r&&n.forEach(e=>{a.remove(e)})}return h||(d=s[0],c(d),Dt.positionElements(e,t,d,i)),d}function Ct(){return new Lt}let Ot=(()=>{let e=class{};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:Ct,token:e,providedIn:"root"}),e})(),Lt=(()=>{let e=class extends Ot{parse(e){if(null!=e){const t=e.trim().split("-");if(1===t.length&&je(t[0]))return{year:Ae(t[0]),month:null,day:null};if(2===t.length&&je(t[0])&&je(t[1]))return{year:Ae(t[0]),month:Ae(t[1]),day:null};if(3===t.length&&je(t[0])&&je(t[1])&&je(t[2]))return{year:Ae(t[0]),month:Ae(t[1]),day:Ae(t[2])}}return null}format(e){return e?`${e.year}-${je(e.month)?Ye(e.month):""}-${je(e.day)?Ye(e.day):""}`:""}};return e.\u0275fac=function(t){return ti(t||e)},e.\u0275prov=i.Ib({token:e,factory:function(t){return e.\u0275fac(t)}}),e})(),Rt=(()=>{let e=class extends ot{constructor(){super(...arguments),this.autoClose=!0,this.placement=["bottom-left","bottom-right","top-left","top-right"],this.restoreFocus=!0}};return e.\u0275fac=function(t){return ni(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return new e},token:e,providedIn:"root"}),e})();const Et={provide:s.o,useExisting:Object(i.T)(()=>It),multi:!0},At={provide:s.n,useExisting:Object(i.T)(()=>It),multi:!0};let It=(()=>{let e=class{constructor(e,t,n,r,s,o,a,c,l,u,d){this._parserFormatter=e,this._elRef=t,this._vcRef=n,this._renderer=r,this._cfr=s,this._ngZone=o,this._calendar=a,this._dateAdapter=c,this._document=l,this._changeDetector=u,this._cRef=null,this._disabled=!1,this._elWithFocus=null,this._model=null,this.dateSelect=new i.o,this.navigate=new i.o,this.closed=new i.o,this._onChange=e=>{},this._onTouched=()=>{},this._validatorChange=()=>{},["autoClose","container","positionTarget","placement"].forEach(e=>this[e]=d[e]),this._zoneSubscription=o.onStable.subscribe(()=>this._updatePopupPosition())}get disabled(){return this._disabled}set disabled(e){this._disabled=""===e||e&&"false"!==e,this.isOpen()&&this._cRef.instance.setDisabledState(this._disabled)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}registerOnValidatorChange(e){this._validatorChange=e}setDisabledState(e){this.disabled=e}validate(e){const{value:t}=e;if(null!=t){const e=this._fromDateStruct(this._dateAdapter.fromModel(t));if(!e)return{ngbDate:{invalid:t}};if(this.minDate&&e.before(Ue.from(this.minDate)))return{ngbDate:{minDate:{minDate:this.minDate,actual:t}}};if(this.maxDate&&e.after(Ue.from(this.maxDate)))return{ngbDate:{maxDate:{maxDate:this.maxDate,actual:t}}}}return null}writeValue(e){this._model=this._fromDateStruct(this._dateAdapter.fromModel(e)),this._writeModelValue(this._model)}manualDateChange(e,t=!1){const n=e!==this._inputValue;n&&(this._inputValue=e,this._model=this._fromDateStruct(this._parserFormatter.parse(e))),!n&&t||this._onChange(this._model?this._dateAdapter.toModel(this._model):""===e?null:e),t&&this._model&&this._writeModelValue(this._model)}isOpen(){return!!this._cRef}open(){if(!this.isOpen()){const e=this._cfr.resolveComponentFactory(ht);this._cRef=this._vcRef.createComponent(e),this._applyPopupStyling(this._cRef.location.nativeElement),this._applyDatepickerInputs(this._cRef.instance),this._subscribeForDatepickerOutputs(this._cRef.instance),this._cRef.instance.ngOnInit(),this._cRef.instance.writeValue(this._dateAdapter.toModel(this._model)),this._cRef.instance.registerOnChange(e=>{this.writeValue(e),this._onChange(e),this._onTouched()}),this._cRef.changeDetectorRef.detectChanges(),this._cRef.instance.setDisabledState(this.disabled),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._cRef.location.nativeElement),this._elWithFocus=this._document.activeElement,Mt(this._ngZone,this._cRef.location.nativeElement,this.closed,!0),this._cRef.instance.focus(),vt(this._ngZone,this._document,this.autoClose,()=>this.close(),this.closed,[],[this._elRef.nativeElement,this._cRef.location.nativeElement])}}close(){if(this.isOpen()){this._vcRef.remove(this._vcRef.indexOf(this._cRef.hostView)),this._cRef=null,this.closed.emit(),this._changeDetector.markForCheck();let e=this._elWithFocus;Pe(this.restoreFocus)?e=this._document.querySelector(this.restoreFocus):void 0!==this.restoreFocus&&(e=this.restoreFocus),e&&e.focus?e.focus():this._document.body.focus()}}toggle(){this.isOpen()?this.close():this.open()}navigateTo(e){this.isOpen()&&this._cRef.instance.navigateTo(e)}onBlur(){this._onTouched()}onFocus(){this._elWithFocus=this._elRef.nativeElement}ngOnChanges(e){(e.minDate||e.maxDate)&&(this._validatorChange(),this.isOpen()&&(e.minDate&&(this._cRef.instance.minDate=this.minDate),e.maxDate&&(this._cRef.instance.maxDate=this.maxDate),this._cRef.instance.ngOnChanges(e)))}ngOnDestroy(){this.close(),this._zoneSubscription.unsubscribe()}_applyDatepickerInputs(e){["dayTemplate","dayTemplateData","displayMonths","firstDayOfWeek","footerTemplate","markDisabled","minDate","maxDate","navigation","outsideDays","showNavigation","showWeekdays","showWeekNumbers"].forEach(t=>{void 0!==this[t]&&(e[t]=this[t])}),e.startDate=this.startDate||this._model}_applyPopupStyling(e){this._renderer.addClass(e,"dropdown-menu"),this._renderer.addClass(e,"show"),"body"===this.container&&this._renderer.addClass(e,"ngb-dp-body")}_subscribeForDatepickerOutputs(e){e.navigate.subscribe(e=>this.navigate.emit(e)),e.dateSelect.subscribe(e=>{this.dateSelect.emit(e),!0!==this.autoClose&&"inside"!==this.autoClose||this.close()})}_writeModelValue(e){const t=this._parserFormatter.format(e);this._inputValue=t,this._renderer.setProperty(this._elRef.nativeElement,"value",t),this.isOpen()&&(this._cRef.instance.writeValue(this._dateAdapter.toModel(e)),this._onTouched())}_fromDateStruct(e){const t=e?new Ue(e.year,e.month,e.day):null;return this._calendar.isValid(t)?t:null}_updatePopupPosition(){if(!this._cRef)return;let e;if(e=Pe(this.positionTarget)?this._document.querySelector(this.positionTarget):this.positionTarget instanceof HTMLElement?this.positionTarget:this._elRef.nativeElement,this.positionTarget&&!e)throw new Error("ngbDatepicker could not find element declared in [positionTarget] to position against.");Tt(e,this._cRef.location.nativeElement,this.placement,"body"===this.container)}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(Ot),i.Mb(i.m),i.Mb(i.P),i.Mb(i.E),i.Mb(i.j),i.Mb(i.A),i.Mb(Qe),i.Mb(ct),i.Mb(r.d),i.Mb(i.h),i.Mb(Rt))},e.\u0275dir=i.Hb({type:e,selectors:[["input","ngbDatepicker",""]],hostVars:1,hostBindings:function(e,t){1&e&&i.gc("input",(function(e){return t.manualDateChange(e.target.value)}))("change",(function(e){return t.manualDateChange(e.target.value,!0)}))("focus",(function(){return t.onFocus()}))("blur",(function(){return t.onBlur()})),2&e&&i.Vb("disabled",t.disabled)},inputs:{disabled:"disabled",autoClose:"autoClose",dayTemplate:"dayTemplate",dayTemplateData:"dayTemplateData",displayMonths:"displayMonths",firstDayOfWeek:"firstDayOfWeek",footerTemplate:"footerTemplate",markDisabled:"markDisabled",minDate:"minDate",maxDate:"maxDate",navigation:"navigation",outsideDays:"outsideDays",placement:"placement",restoreFocus:"restoreFocus",showWeekdays:"showWeekdays",showWeekNumbers:"showWeekNumbers",startDate:"startDate",container:"container",positionTarget:"positionTarget"},outputs:{dateSelect:"dateSelect",navigate:"navigate",closed:"closed"},exportAs:["ngbDatepicker"],features:[i.xb([Et,At,{provide:ot,useExisting:Rt}]),i.wb]}),e})(),Pt=(()=>{let e=class{constructor(e){this.i18n=e}isMuted(){return!this.selected&&(this.date.month!==this.currentMonth||this.disabled)}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(nt))},e.\u0275cmp=i.Gb({type:e,selectors:[["","ngbDatepickerDayView",""]],hostAttrs:[1,"btn-light"],hostVars:10,hostBindings:function(e,t){2&e&&i.Eb("bg-primary",t.selected)("text-white",t.selected)("text-muted",t.isMuted())("outside",t.isMuted())("active",t.focused)},inputs:{currentMonth:"currentMonth",date:"date",disabled:"disabled",focused:"focused",selected:"selected"},attrs:X,decls:1,vars:1,template:function(e,t){1&e&&i.Oc(0),2&e&&i.Pc(t.i18n.getDayNumerals(t.date))},styles:["[ngbDatepickerDayView]{text-align:center;width:2rem;height:2rem;line-height:2rem;border-radius:.25rem;background:0 0}[ngbDatepickerDayView].outside{opacity:.5}"],encapsulation:2,changeDetection:0}),e})(),jt=(()=>{let e=class{constructor(e,t){this.i18n=e,this._renderer=t,this.select=new i.o,this._month=-1,this._year=-1}changeMonth(e){this.select.emit(new Ue(this.date.year,Ae(e),1))}changeYear(e){this.select.emit(new Ue(Ae(e),this.date.month,1))}ngAfterViewChecked(){this.date&&(this.date.month!==this._month&&(this._month=this.date.month,this._renderer.setProperty(this.monthSelect.nativeElement,"value",this._month)),this.date.year!==this._year&&(this._year=this.date.year,this._renderer.setProperty(this.yearSelect.nativeElement,"value",this._year)))}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(nt),i.Mb(i.E))},e.\u0275cmp=i.Gb({type:e,selectors:[["ngb-datepicker-navigation-select"]],viewQuery:function(e,t){var n;1&e&&(i.Jc(ee,!0,i.m),i.Jc(te,!0,i.m)),2&e&&(i.zc(n=i.hc())&&(t.monthSelect=n.first),i.zc(n=i.hc())&&(t.yearSelect=n.first))},inputs:{date:"date",disabled:"disabled",months:"months",years:"years"},outputs:{select:"select"},decls:8,vars:4,consts:function(){return[[1,"custom-select",3,"disabled","change",6,"aria-label","title"],["month",""],["aria-label","Select month","title","Select month"],[3,"value",4,"ngFor","ngForOf"],["year",""],["aria-label","Select year","title","Select year"],[3,"value"]]},template:function(e,t){1&e&&(i.Sb(0,"select",0,1),i.Yb(2,2),i.gc("change",(function(e){return t.changeMonth(e.target.value)})),i.Mc(3,ne,2,3,"option",3),i.Rb(),i.Sb(4,"select",0,4),i.Yb(6,5),i.gc("change",(function(e){return t.changeYear(e.target.value)})),i.Mc(7,ie,2,2,"option",3),i.Rb()),2&e&&(i.pc("disabled",t.disabled),i.yb(3),i.pc("ngForOf",t.months),i.yb(1),i.pc("disabled",t.disabled),i.yb(3),i.pc("ngForOf",t.years))},directives:[r.q,s.u,s.B],styles:["ngb-datepicker-navigation-select>.custom-select{-ms-flex:1 1 auto;flex:1 1 auto;padding:0 .5rem;font-size:.875rem;height:1.85rem}ngb-datepicker-navigation-select>.custom-select:focus{z-index:1}ngb-datepicker-navigation-select>.custom-select::-ms-value{background-color:transparent!important}"],encapsulation:2,changeDetection:0}),e})(),Nt=(()=>{let e=class{};return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[r.c,s.m]]}),e})(),Ft=(()=>{let e=class{constructor(){this.autoClose=!0,this.placement=["bottom-left","bottom-right","top-left","top-right"]}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return new e},token:e,providedIn:"root"}),e})();var Yt;let zt=(()=>{let e=class{};return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=i.Hb({type:e,selectors:[["",8,"navbar"]]}),e})(),$t=(()=>{let e=class{constructor(e){this.elementRef=e,this._disabled=!1}set disabled(e){this._disabled=""===e||!0===e}get disabled(){return this._disabled}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngbDropdownItem",""]],hostAttrs:[1,"dropdown-item"],hostVars:2,hostBindings:function(e,t){2&e&&i.Eb("disabled",t.disabled)},inputs:{disabled:"disabled"}}),e})(),Ht=(()=>{let e=class{constructor(e,t){this.dropdown=e,this.placement="bottom",this.isOpen=!1,this.nativeElement=t.nativeElement}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(Object(i.T)(()=>Bt)),i.Mb(i.m))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngbDropdownMenu",""]],contentQueries:function(e,t,n){var r;1&e&&i.Fb(n,$t,!1),2&e&&i.zc(r=i.hc())&&(t.menuItems=r)},hostVars:5,hostBindings:function(e,t){1&e&&i.gc("keydown.ArrowUp",(function(e){return t.dropdown.onKeyDown(e)}))("keydown.ArrowDown",(function(e){return t.dropdown.onKeyDown(e)}))("keydown.Home",(function(e){return t.dropdown.onKeyDown(e)}))("keydown.End",(function(e){return t.dropdown.onKeyDown(e)}))("keydown.Enter",(function(e){return t.dropdown.onKeyDown(e)}))("keydown.Space",(function(e){return t.dropdown.onKeyDown(e)}))("keydown.Tab",(function(e){return t.dropdown.onKeyDown(e)}))("keydown.Shift.Tab",(function(e){return t.dropdown.onKeyDown(e)})),2&e&&(i.zb("x-placement",t.placement),i.Eb("dropdown-menu",!0)("show",t.dropdown.isOpen()))}}),e})(),Wt=(()=>{let e=class{constructor(e,t){this.dropdown=e,this.nativeElement=t.nativeElement}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(Object(i.T)(()=>Bt)),i.Mb(i.m))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngbDropdownAnchor",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:1,hostBindings:function(e,t){2&e&&i.zb("aria-expanded",t.dropdown.isOpen())}}),e})(),Vt=(()=>{let e=Yt=class extends Wt{constructor(e,t){super(e,t)}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(Object(i.T)(()=>Bt)),i.Mb(i.m))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngbDropdownToggle",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:1,hostBindings:function(e,t){1&e&&i.gc("click",(function(){return t.dropdown.toggle()}))("keydown.ArrowUp",(function(e){return t.dropdown.onKeyDown(e)}))("keydown.ArrowDown",(function(e){return t.dropdown.onKeyDown(e)}))("keydown.Home",(function(e){return t.dropdown.onKeyDown(e)}))("keydown.End",(function(e){return t.dropdown.onKeyDown(e)}))("keydown.Tab",(function(e){return t.dropdown.onKeyDown(e)}))("keydown.Shift.Tab",(function(e){return t.dropdown.onKeyDown(e)})),2&e&&i.zb("aria-expanded",t.dropdown.isOpen())},features:[i.xb([{provide:Wt,useExisting:Object(i.T)(()=>Yt)}]),i.vb]}),e})(),Bt=(()=>{let e=class{constructor(e,t,n,r,s,a,c){this._changeDetector=e,this._document=n,this._ngZone=r,this._elementRef=s,this._renderer=a,this._closed$=new o.a,this._bodyContainer=null,this._open=!1,this.openChange=new i.o,this.placement=t.placement,this.container=t.container,this.autoClose=t.autoClose,this.display=c?"static":"dynamic",this._zoneSubscription=r.onStable.subscribe(()=>{this._positionMenu()})}ngAfterContentInit(){this._ngZone.onStable.pipe(Object(w.a)(1)).subscribe(()=>{this._applyPlacementClasses(),this._open&&this._setCloseHandlers()})}ngOnChanges(e){e.container&&this._open&&this._applyContainer(this.container),e.placement&&!e.placement.isFirstChange&&this._applyPlacementClasses()}isOpen(){return this._open}open(){this._open||(this._open=!0,this._applyContainer(this.container),this.openChange.emit(!0),this._setCloseHandlers(),this._anchor&&this._anchor.nativeElement.focus())}_setCloseHandlers(){vt(this._ngZone,this._document,this.autoClose,e=>{this.close(),0===e&&this._anchor.nativeElement.focus()},this._closed$,this._menu?[this._menu.nativeElement]:[],this._anchor?[this._anchor.nativeElement]:[],".dropdown-item,.dropdown-divider")}close(){this._open&&(this._open=!1,this._resetContainer(),this._closed$.next(),this.openChange.emit(!1),this._changeDetector.markForCheck())}toggle(){this.isOpen()?this.close():this.open()}ngOnDestroy(){this._resetContainer(),this._closed$.next(),this._zoneSubscription.unsubscribe()}onKeyDown(e){const t=e.which,n=this._getMenuElements();let i=-1,r=null;const s=this._isEventFromToggle(e);if(!s&&n.length&&n.forEach((t,n)=>{t.contains(e.target)&&(r=t),t===this._document.activeElement&&(i=n)}),t!==ft.Space&&t!==ft.Enter){if(t!==ft.Tab){if(s||r){if(this.open(),n.length){switch(t){case ft.ArrowDown:i=Math.min(i+1,n.length-1);break;case ft.ArrowUp:if(this._isDropup()&&-1===i){i=n.length-1;break}i=Math.max(i-1,0);break;case ft.Home:i=0;break;case ft.End:i=n.length-1}n[i].focus()}e.preventDefault()}}else if(e.target&&this.isOpen()&&this.autoClose){if(this._anchor.nativeElement===e.target)return void("body"!==this.container||e.shiftKey?e.shiftKey&&this.close():(this._renderer.setAttribute(this._menu.nativeElement,"tabindex","0"),this._menu.nativeElement.focus(),this._renderer.removeAttribute(this._menu.nativeElement,"tabindex")));if("body"===this.container){const t=this._menu.nativeElement.querySelectorAll(wt);e.shiftKey&&e.target===t[0]?(this._anchor.nativeElement.focus(),e.preventDefault()):e.shiftKey||e.target!==t[t.length-1]||(this._anchor.nativeElement.focus(),this.close())}else Object(c.a)(e.target,"focusout").pipe(Object(w.a)(1)).subscribe(({relatedTarget:e})=>{this._elementRef.nativeElement.contains(e)||this.close()})}}else!r||!0!==this.autoClose&&"inside"!==this.autoClose||Object(c.a)(r,"click").pipe(Object(w.a)(1)).subscribe(()=>this.close())}_isDropup(){return this._elementRef.nativeElement.classList.contains("dropup")}_isEventFromToggle(e){return this._anchor.nativeElement.contains(e.target)}_getMenuElements(){const e=this._menu;return null==e?[]:e.menuItems.filter(e=>!e.disabled).map(e=>e.elementRef.nativeElement)}_positionMenu(){const e=this._menu;this.isOpen()&&e&&this._applyPlacementClasses("dynamic"===this.display?Tt(this._anchor.nativeElement,this._bodyContainer||this._menu.nativeElement,this.placement,"body"===this.container):this._getFirstPlacement(this.placement))}_getFirstPlacement(e){return Array.isArray(e)?e[0]:e.split(" ")[0]}_resetContainer(){const e=this._renderer;if(this._menu){const t=this._menu.nativeElement;e.appendChild(this._elementRef.nativeElement,t),e.removeStyle(t,"position"),e.removeStyle(t,"transform")}this._bodyContainer&&(e.removeChild(this._document.body,this._bodyContainer),this._bodyContainer=null)}_applyContainer(e=null){if(this._resetContainer(),"body"===e){const e=this._renderer,t=this._menu.nativeElement,n=this._bodyContainer=this._bodyContainer||e.createElement("div");e.setStyle(n,"position","absolute"),e.setStyle(t,"position","static"),e.setStyle(n,"z-index","1050"),e.appendChild(n,t),e.appendChild(this._document.body,n)}}_applyPlacementClasses(e){const t=this._menu;if(t){e||(e=this._getFirstPlacement(this.placement));const n=this._renderer,i=this._elementRef.nativeElement;n.removeClass(i,"dropup"),n.removeClass(i,"dropdown"),t.placement="static"===this.display?null:e;const r=-1!==e.search("^top")?"dropup":"dropdown";n.addClass(i,r);const s=this._bodyContainer;s&&(n.removeClass(s,"dropup"),n.removeClass(s,"dropdown"),n.addClass(s,r))}}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.h),i.Mb(Ft),i.Mb(r.d),i.Mb(i.A),i.Mb(i.m),i.Mb(i.E),i.Mb(zt,8))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngbDropdown",""]],contentQueries:function(e,t,n){var r;1&e&&(i.Fb(n,Ht,!0),i.Fb(n,Wt,!0)),2&e&&(i.zc(r=i.hc())&&(t._menu=r.first),i.zc(r=i.hc())&&(t._anchor=r.first))},hostVars:2,hostBindings:function(e,t){2&e&&i.Eb("show",t.isOpen())},inputs:{_open:["open","_open"],placement:"placement",container:"container",autoClose:"autoClose",display:"display"},outputs:{openChange:"openChange"},exportAs:["ngbDropdown"],features:[i.wb]}),e})(),Ut=(()=>{let e=class{};return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)}}),e})(),qt=(()=>{let e=class{constructor(){this.backdrop=!0,this.keyboard=!0}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return new e},token:e,providedIn:"root"}),e})();class Gt{constructor(e,t,n){this.nodes=e,this.viewRef=t,this.componentRef=n}}class Jt{constructor(e,t,n,i,r,s){this._type=e,this._injector=t,this._viewContainerRef=n,this._renderer=i,this._componentFactoryResolver=r,this._applicationRef=s,this._windowRef=null,this._contentRef=null}open(e,t){return this._windowRef||(this._contentRef=this._getContentRef(e,t),this._windowRef=this._viewContainerRef.createComponent(this._componentFactoryResolver.resolveComponentFactory(this._type),this._viewContainerRef.length,this._injector,this._contentRef.nodes)),this._windowRef}close(){var e;this._windowRef&&(this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._windowRef.hostView)),this._windowRef=null,(null===(e=this._contentRef)||void 0===e?void 0:e.viewRef)&&(this._applicationRef.detachView(this._contentRef.viewRef),this._contentRef.viewRef.destroy(),this._contentRef=null))}_getContentRef(e,t){if(e){if(e instanceof i.L){const n=e.createEmbeddedView(t);return this._applicationRef.attachView(n),new Gt([n.rootNodes],n)}return new Gt([[this._renderer.createText(""+e)]])}return new Gt([])}}const Qt=()=>{};let Kt=(()=>{let e=class{constructor(e){this._document=e}compensate(){const e=this._getWidth();return this._isPresent(e)?this._adjustBody(e):Qt}_adjustBody(e){const t=this._document.body,n=t.style.paddingRight,i=parseFloat(window.getComputedStyle(t)["padding-right"]);return t.style["padding-right"]=i+e+"px",()=>t.style["padding-right"]=n}_isPresent(e){const t=this._document.body.getBoundingClientRect();return window.innerWidth-(t.left+t.right)>=e-.1*e}_getWidth(){const e=this._document.createElement("div");e.className="modal-scrollbar-measure";const t=this._document.body;t.appendChild(e);const n=e.getBoundingClientRect().width-e.clientWidth;return t.removeChild(e),n}};return e.\u0275fac=function(t){return new(t||e)(i.dc(r.d))},e.\u0275prov=Object(i.Ib)({factory:function(){return new e(Object(i.dc)(r.d))},token:e,providedIn:"root"}),e})(),Zt=(()=>{let e=class{};return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1050"],hostVars:2,hostBindings:function(e,t){2&e&&i.Ab("modal-backdrop fade show"+(t.backdropClass?" "+t.backdropClass:""))},inputs:{backdropClass:"backdropClass"},decls:0,vars:0,template:function(e,t){},encapsulation:2}),e})();class Xt{close(e){}dismiss(e){}}class en{constructor(e,t,n,i){this._windowCmptRef=e,this._contentRef=t,this._backdropCmptRef=n,this._beforeDismiss=i,e.instance.dismissEvent.subscribe(e=>{this.dismiss(e)}),this.result=new Promise((e,t)=>{this._resolve=e,this._reject=t}),this.result.then(null,()=>{})}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}close(e){this._windowCmptRef&&(this._resolve(e),this._removeModalElements())}_dismiss(e){this._reject(e),this._removeModalElements()}dismiss(e){if(this._windowCmptRef)if(this._beforeDismiss){const t=this._beforeDismiss();t&&t.then?t.then(t=>{!1!==t&&this._dismiss(e)},()=>{}):!1!==t&&this._dismiss(e)}else this._dismiss(e)}_removeModalElements(){const e=this._windowCmptRef.location.nativeElement;if(e.parentNode.removeChild(e),this._windowCmptRef.destroy(),this._backdropCmptRef){const e=this._backdropCmptRef.location.nativeElement;e.parentNode.removeChild(e),this._backdropCmptRef.destroy()}this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._windowCmptRef=null,this._backdropCmptRef=null,this._contentRef=null}}var tn=function(e){return e[e.BACKDROP_CLICK=0]="BACKDROP_CLICK",e[e.ESC=1]="ESC",e}({});let nn=(()=>{let e=class{constructor(e,t,n){this._document=e,this._elRef=t,this._zone=n,this._closed$=new o.a,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new i.o}dismiss(e){this.dismissEvent.emit(e)}ngOnInit(){this._elWithFocus=this._document.activeElement}ngAfterViewInit(){const{nativeElement:e}=this._elRef;if(this._zone.runOutsideAngular(()=>{Object(c.a)(e,"keydown").pipe(Object(y.a)(this._closed$),Object(v.a)(e=>e.which===ft.Escape&&this.keyboard)).subscribe(e=>requestAnimationFrame(()=>{e.defaultPrevented||this._zone.run(()=>this.dismiss(tn.ESC))}));let t=!1;Object(c.a)(this._dialogEl.nativeElement,"mousedown").pipe(Object(y.a)(this._closed$),Object(S.a)(()=>t=!1),Object(_.a)(()=>Object(c.a)(e,"mouseup").pipe(Object(y.a)(this._closed$),Object(w.a)(1))),Object(v.a)(({target:t})=>e===t)).subscribe(()=>{t=!0}),Object(c.a)(e,"click").pipe(Object(y.a)(this._closed$)).subscribe(({target:n})=>{!0!==this.backdrop||e!==n||t||this._zone.run(()=>this.dismiss(tn.BACKDROP_CLICK)),t=!1})}),!e.contains(document.activeElement)){const t=e.querySelector("[ngbAutofocus]"),n=St(e)[0];(t||n||e).focus()}}ngOnDestroy(){const e=this._document.body,t=this._elWithFocus;let n;n=t&&t.focus&&e.contains(t)?t:e,this._zone.runOutsideAngular(()=>{setTimeout(()=>n.focus()),this._elWithFocus=null}),this._closed$.next()}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(r.d),i.Mb(i.m),i.Mb(i.A))},e.\u0275cmp=i.Gb({type:e,selectors:[["ngb-modal-window"]],viewQuery:function(e,t){var n;1&e&&i.Jc(re,!0),2&e&&i.zc(n=i.hc())&&(t._dialogEl=n.first)},hostAttrs:["role","dialog","tabindex","-1"],hostVars:5,hostBindings:function(e,t){2&e&&(i.zb("aria-modal",!0)("aria-labelledby",t.ariaLabelledBy)("aria-describedby",t.ariaDescribedBy),i.Ab("modal fade show d-block"+(t.windowClass?" "+t.windowClass:"")))},inputs:{backdrop:"backdrop",keyboard:"keyboard",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",centered:"centered",scrollable:"scrollable",size:"size",windowClass:"windowClass"},outputs:{dismissEvent:"dismiss"},ngContentSelectors:O,decls:4,vars:2,consts:[["role","document"],["dialog",""],[1,"modal-content"]],template:function(e,t){1&e&&(i.oc(),i.Sb(0,"div",0,1),i.Sb(2,"div",2),i.nc(3),i.Rb(),i.Rb()),2&e&&i.Ab("modal-dialog"+(t.size?" modal-"+t.size:"")+(t.centered?" modal-dialog-centered":"")+(t.scrollable?" modal-dialog-scrollable":""))},styles:["ngb-modal-window .component-host-scrollable{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:hidden}"],encapsulation:2}),e})(),rn=(()=>{let e=class{constructor(e,t,n,r,s,a){this._applicationRef=e,this._injector=t,this._document=n,this._scrollBar=r,this._rendererFactory=s,this._ngZone=a,this._activeWindowCmptHasChanged=new o.a,this._ariaHiddenValues=new Map,this._backdropAttributes=["backdropClass"],this._modalRefs=[],this._windowAttributes=["ariaLabelledBy","ariaDescribedBy","backdrop","centered","keyboard","scrollable","size","windowClass"],this._windowCmpts=[],this._activeInstances=new i.o,this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){const e=this._windowCmpts[this._windowCmpts.length-1];Mt(this._ngZone,e.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(e.location.nativeElement)}})}open(e,t,n,i){const r=i.container instanceof HTMLElement?i.container:Fe(i.container)?this._document.querySelector(i.container):this._document.body,s=this._rendererFactory.createRenderer(null,null),o=this._scrollBar.compensate(),a=()=>{this._modalRefs.length||(s.removeClass(this._document.body,"modal-open"),this._revertAriaHidden())};if(!r)throw new Error(`The specified modal container "${i.container||"body"}" was not found in the DOM.`);const c=new Xt,l=this._getContentRef(e,i.injector||t,n,c,i);let u=!1!==i.backdrop?this._attachBackdrop(e,r):void 0,d=this._attachWindowComponent(e,r,l),h=new en(d,l,u,i.beforeDismiss);return this._registerModalRef(h),this._registerWindowCmpt(d),h.result.then(o,o),h.result.then(a,a),c.close=e=>{h.close(e)},c.dismiss=e=>{h.dismiss(e)},this._applyWindowOptions(d.instance,i),1===this._modalRefs.length&&s.addClass(this._document.body,"modal-open"),u&&u.instance&&this._applyBackdropOptions(u.instance,i),h}get activeInstances(){return this._activeInstances}dismissAll(e){this._modalRefs.forEach(t=>t.dismiss(e))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(e,t){let n=e.resolveComponentFactory(Zt).create(this._injector);return this._applicationRef.attachView(n.hostView),t.appendChild(n.location.nativeElement),n}_attachWindowComponent(e,t,n){let i=e.resolveComponentFactory(nn).create(this._injector,n.nodes);return this._applicationRef.attachView(i.hostView),t.appendChild(i.location.nativeElement),i}_applyWindowOptions(e,t){this._windowAttributes.forEach(n=>{Fe(t[n])&&(e[n]=t[n])})}_applyBackdropOptions(e,t){this._backdropAttributes.forEach(n=>{Fe(t[n])&&(e[n]=t[n])})}_getContentRef(e,t,n,r,s){return n?n instanceof i.L?this._createFromTemplateRef(n,r):Pe(n)?this._createFromString(n):this._createFromComponent(e,t,n,r,s):new Gt([])}_createFromTemplateRef(e,t){const n=e.createEmbeddedView({$implicit:t,close(e){t.close(e)},dismiss(e){t.dismiss(e)}});return this._applicationRef.attachView(n),new Gt([n.rootNodes],n)}_createFromString(e){const t=this._document.createTextNode(""+e);return new Gt([[t]])}_createFromComponent(e,t,n,r,s){const o=e.resolveComponentFactory(n),a=i.s.create({providers:[{provide:Xt,useValue:r}],parent:t}),c=o.create(a),l=c.location.nativeElement;return s.scrollable&&l.classList.add("component-host-scrollable"),this._applicationRef.attachView(c.hostView),new Gt([[l]],c.hostView,c)}_setAriaHidden(e){const t=e.parentElement;t&&e!==this._document.body&&(Array.from(t.children).forEach(t=>{t!==e&&"SCRIPT"!==t.nodeName&&(this._ariaHiddenValues.set(t,t.getAttribute("aria-hidden")),t.setAttribute("aria-hidden","true"))}),this._setAriaHidden(t))}_revertAriaHidden(){this._ariaHiddenValues.forEach((e,t)=>{e?t.setAttribute("aria-hidden",e):t.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(e){const t=()=>{const t=this._modalRefs.indexOf(e);t>-1&&(this._modalRefs.splice(t,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(e),this._activeInstances.emit(this._modalRefs),e.result.then(t,t)}_registerWindowCmpt(e){this._windowCmpts.push(e),this._activeWindowCmptHasChanged.next(),e.onDestroy(()=>{const t=this._windowCmpts.indexOf(e);t>-1&&(this._windowCmpts.splice(t,1),this._activeWindowCmptHasChanged.next())})}};return e.\u0275fac=function(t){return new(t||e)(i.dc(i.g),i.dc(i.s),i.dc(r.d),i.dc(Kt),i.dc(i.F),i.dc(i.A))},e.\u0275prov=Object(i.Ib)({factory:function(){return new e(Object(i.dc)(i.g),Object(i.dc)(i.p),Object(i.dc)(r.d),Object(i.dc)(Kt),Object(i.dc)(i.F),Object(i.dc)(i.A))},token:e,providedIn:"root"}),e})(),sn=(()=>{let e=class{constructor(e,t,n,i){this._moduleCFR=e,this._injector=t,this._modalStack=n,this._config=i}open(e,t={}){const n=Object.assign({},this._config,t);return this._modalStack.open(this._moduleCFR,this._injector,e,n)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(e){this._modalStack.dismissAll(e)}hasOpenModals(){return this._modalStack.hasOpenModals()}};return e.\u0275fac=function(t){return new(t||e)(i.dc(i.j),i.dc(i.s),i.dc(rn),i.dc(qt))},e.\u0275prov=Object(i.Ib)({factory:function(){return new e(Object(i.dc)(i.j),Object(i.dc)(i.p),Object(i.dc)(rn),Object(i.dc)(qt))},token:e,providedIn:"root"}),e})(),on=(()=>{let e=class{constructor(){this.destroyOnHide=!0,this.orientation="horizontal",this.roles="tablist",this.keyboard=!1}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return new e},token:e,providedIn:"root"}),e})();const an=e=>Fe(e)&&""!==e;let cn=0,ln=(()=>{let e=class{constructor(e){this.templateRef=e}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.L))},e.\u0275dir=i.Hb({type:e,selectors:[["ng-template","ngbNavContent",""]]}),e})(),un=(()=>{let e=class{constructor(e,t){this.elementRef=t,this.disabled=!1,this._nav=e}ngAfterContentChecked(){this.contentTpl=this.contentTpls.first}ngOnInit(){Fe(this.domId)||(this.domId="ngb-nav-"+cn++)}get active(){return this._nav.activeId===this.id}get id(){return an(this._id)?this._id:this.domId}get panelDomId(){return this.domId+"-panel"}isPanelInDom(){return(Fe(this.destroyOnHide)?!this.destroyOnHide:!this._nav.destroyOnHide)||this.active}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(Object(i.T)(()=>dn)),i.Mb(i.m))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngbNavItem",""]],contentQueries:function(e,t,n){var r;1&e&&i.Fb(n,ln,!1),2&e&&i.zc(r=i.hc())&&(t.contentTpls=r)},hostVars:2,hostBindings:function(e,t){2&e&&i.Eb("nav-item",!0)},inputs:{disabled:"disabled",domId:"domId",destroyOnHide:"destroyOnHide",_id:["ngbNavItem","_id"]},exportAs:["ngbNavItem"]}),e})(),dn=(()=>{let e=class{constructor(e,t,n,r){this.role=e,this._cd=n,this._document=r,this.activeIdChange=new i.o,this.navChange=new i.o,this.destroyOnHide=t.destroyOnHide,this.orientation=t.orientation,this.roles=t.roles,this.keyboard=t.keyboard}click(e){e.disabled||this._updateActiveId(e.id)}onKeyDown(e){if("tablist"!==this.roles||!this.keyboard)return;const t=e.which,n=this.links.filter(e=>!e.navItem.disabled),{length:i}=n;let r=-1;if(n.forEach((e,t)=>{e.elRef.nativeElement===this._document.activeElement&&(r=t)}),i){switch(t){case ft.ArrowLeft:if("vertical"===this.orientation)return;r=(r-1+i)%i;break;case ft.ArrowRight:if("vertical"===this.orientation)return;r=(r+1)%i;break;case ft.ArrowDown:if("horizontal"===this.orientation)return;r=(r+1)%i;break;case ft.ArrowUp:if("horizontal"===this.orientation)return;r=(r-1+i)%i;break;case ft.Home:r=0;break;case ft.End:r=i-1}"changeWithArrows"===this.keyboard&&this.select(n[r].navItem.id),n[r].elRef.nativeElement.focus(),e.preventDefault()}}select(e){this._updateActiveId(e,!1)}ngAfterContentInit(){if(!Fe(this.activeId)){const e=this.items.first?this.items.first.id:null;an(e)&&(this._updateActiveId(e,!1),this._cd.detectChanges())}}_updateActiveId(e,t=!0){if(this.activeId!==e){let n=!1;t&&this.navChange.emit({activeId:this.activeId,nextId:e,preventDefault:()=>{n=!0}}),n||(this.activeId=e,this.activeIdChange.emit(e))}}};return e.\u0275fac=function(t){return new(t||e)(i.ec("role"),i.Mb(on),i.Mb(i.h),i.Mb(r.d))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngbNav",""]],contentQueries:function(e,t,n){var r;1&e&&(i.Fb(n,un,!1),i.Fb(n,hn,!0)),2&e&&(i.zc(r=i.hc())&&(t.items=r),i.zc(r=i.hc())&&(t.links=r))},hostVars:6,hostBindings:function(e,t){1&e&&i.gc("keydown.arrowLeft",(function(e){return t.onKeyDown(e)}))("keydown.arrowRight",(function(e){return t.onKeyDown(e)}))("keydown.arrowDown",(function(e){return t.onKeyDown(e)}))("keydown.arrowUp",(function(e){return t.onKeyDown(e)}))("keydown.Home",(function(e){return t.onKeyDown(e)}))("keydown.End",(function(e){return t.onKeyDown(e)})),2&e&&(i.zb("aria-orientation","vertical"===t.orientation&&"tablist"===t.roles?"vertical":void 0)("role",t.role?t.role:t.roles?"tablist":void 0),i.Eb("nav",!0)("flex-column","vertical"===t.orientation))},inputs:{destroyOnHide:"destroyOnHide",orientation:"orientation",roles:"roles",keyboard:"keyboard",activeId:"activeId"},outputs:{activeIdChange:"activeIdChange",navChange:"navChange"},exportAs:["ngbNav"]}),e})(),hn=(()=>{let e=class{constructor(e,t,n,i){this.role=e,this.navItem=t,this.nav=n,this.elRef=i}hasNavItemClass(){return this.navItem.elementRef.nativeElement.nodeType===Node.COMMENT_NODE}};return e.\u0275fac=function(t){return new(t||e)(i.ec("role"),i.Mb(un),i.Mb(dn),i.Mb(i.m))},e.\u0275dir=i.Hb({type:e,selectors:[["a","ngbNavLink",""]],hostAttrs:["href",""],hostVars:14,hostBindings:function(e,t){1&e&&i.gc("click",(function(e){return t.nav.click(t.navItem),e.preventDefault()})),2&e&&(i.Vb("id",t.navItem.domId),i.zb("role",t.role?t.role:t.nav.roles?"tab":void 0)("tabindex",t.navItem.disabled?-1:void 0)("aria-controls",t.navItem.isPanelInDom()?t.navItem.panelDomId:null)("aria-selected",t.navItem.active)("aria-disabled",t.navItem.disabled),i.Eb("nav-link",!0)("nav-item",t.hasNavItemClass())("active",t.navItem.active)("disabled",t.navItem.disabled))}}),e})(),fn=(()=>{let e=class{};return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["","ngbNavOutlet",""]],hostVars:2,hostBindings:function(e,t){2&e&&i.Eb("tab-content",!0)},inputs:{paneRole:"paneRole",nav:["ngbNavOutlet","nav"]},attrs:se,decls:1,vars:1,consts:[["ngFor","",3,"ngForOf"],["class","tab-pane",3,"id","active",4,"ngIf"],[1,"tab-pane",3,"id"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,t){1&e&&i.Mc(0,le,1,1,"ng-template",0),2&e&&i.pc("ngForOf",t.nav.items)},directives:[r.q,r.r,r.w],encapsulation:2}),e})(),pn=(()=>{let e=class{};return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[r.c]]}),e})();class mn{constructor(e,t){this.open=e,this.close=t,t||(this.close=e)}isManual(){return"manual"===this.open||"manual"===this.close}}const bn={hover:["mouseenter","mouseleave"],focus:["focusin","focusout"]},gn=e=>e>0?Object(D.a)(e):e=>e;function _n(e,t,n,i,r,s,o=0,a=0){const c=function(e,t=bn){const n=(e||"").trim();if(0===n.length)return[];const i=n.split(/\s+/).map(e=>e.split(":")).map(e=>{let n=t[e[0]]||e;return new mn(n[0],n[1])}),r=i.filter(e=>e.isManual());if(r.length>1)throw"Triggers parse error: only one manual trigger is allowed";if(1===r.length&&i.length>1)throw"Triggers parse error: manual trigger can't be mixed with other triggers";return i}(n);if(1===c.length&&c[0].isManual())return()=>{};const u=function(e,t,n,i){return new b.a(r=>{const s=[],o=()=>r.next(!0),a=()=>r.next(!1),c=()=>r.next(!i());return n.forEach(n=>{n.open===n.close?s.push(e.listen(t,n.open,c)):s.push(e.listen(t,n.open,o),e.listen(t,n.close,a))}),()=>{s.forEach(e=>e())}})}(e,t,c,i).pipe(function(e,t,n){return i=>{let r=null;const s=i.pipe(Object(g.a)(e=>({open:e})),Object(v.a)(e=>{const t=n();return t===e.open||r&&r.open!==t?(r&&r.open!==e.open&&(r=null),!1):(r=e,!0)}),Object(T.a)()),o=s.pipe(Object(v.a)(e=>e.open),gn(e)),a=s.pipe(Object(v.a)(e=>!e.open),gn(t));return Object(l.a)(o,a).pipe(Object(v.a)(e=>e===r&&(r=null,e.open!==n())),Object(g.a)(e=>e.open))}}(o,a,i)).subscribe(e=>e?r():s());return()=>u.unsubscribe()}let yn=(()=>{let e=class{constructor(){this.autoClose=!0,this.placement="auto",this.triggers="click",this.disablePopover=!1,this.openDelay=0,this.closeDelay=0}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return new e},token:e,providedIn:"root"}),e})(),vn=0,wn=(()=>{let e=class{isTitleTemplate(){return this.title instanceof i.L}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["ngb-popover-window"]],hostAttrs:["role","tooltip"],hostVars:3,hostBindings:function(e,t){2&e&&(i.Vb("id",t.id),i.Ab("popover"+(t.popoverClass?" "+t.popoverClass:"")))},inputs:{title:"title",id:"id",popoverClass:"popoverClass",context:"context"},ngContentSelectors:O,decls:4,vars:1,consts:[[1,"arrow"],["class","popover-header",4,"ngIf"],[1,"popover-body"],[1,"popover-header"],["simpleTitle",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,t){1&e&&(i.oc(),i.Nb(0,"div",0),i.Mc(1,he,4,2,"h3",1),i.Sb(2,"div",2),i.nc(3),i.Rb()),2&e&&(i.yb(1),i.pc("ngIf",null!=t.title))},directives:[r.r,r.w],styles:["ngb-popover-window.bs-popover-bottom>.arrow,ngb-popover-window.bs-popover-top>.arrow{left:50%;margin-left:-.5rem}ngb-popover-window.bs-popover-bottom-left>.arrow,ngb-popover-window.bs-popover-top-left>.arrow{left:2em}ngb-popover-window.bs-popover-bottom-right>.arrow,ngb-popover-window.bs-popover-top-right>.arrow{left:auto;right:2em}ngb-popover-window.bs-popover-left>.arrow,ngb-popover-window.bs-popover-right>.arrow{top:50%;margin-top:-.5rem}ngb-popover-window.bs-popover-left-top>.arrow,ngb-popover-window.bs-popover-right-top>.arrow{top:.7em}ngb-popover-window.bs-popover-left-bottom>.arrow,ngb-popover-window.bs-popover-right-bottom>.arrow{top:auto;bottom:.7em}"],encapsulation:2,changeDetection:0}),e})(),Sn=(()=>{let e=class{constructor(e,t,n,r,s,o,a,c,l,u){this._elementRef=e,this._renderer=t,this._ngZone=a,this._document=c,this._changeDetector=l,this.shown=new i.o,this.hidden=new i.o,this._ngbPopoverWindowId="ngb-popover-"+vn++,this._windowRef=null,this.autoClose=o.autoClose,this.placement=o.placement,this.triggers=o.triggers,this.container=o.container,this.disablePopover=o.disablePopover,this.popoverClass=o.popoverClass,this.openDelay=o.openDelay,this.closeDelay=o.closeDelay,this._popupService=new Jt(wn,n,s,t,r,u),this._zoneSubscription=a.onStable.subscribe(()=>{this._windowRef&&Tt(this._elementRef.nativeElement,this._windowRef.location.nativeElement,this.placement,"body"===this.container,"bs-popover")})}_isDisabled(){return!!this.disablePopover||!this.ngbPopover&&!this.popoverTitle}open(e){this._windowRef||this._isDisabled()||(this._windowRef=this._popupService.open(this.ngbPopover,e),this._windowRef.instance.title=this.popoverTitle,this._windowRef.instance.context=e,this._windowRef.instance.popoverClass=this.popoverClass,this._windowRef.instance.id=this._ngbPopoverWindowId,this._renderer.setAttribute(this._elementRef.nativeElement,"aria-describedby",this._ngbPopoverWindowId),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement),this._windowRef.changeDetectorRef.detectChanges(),this._windowRef.changeDetectorRef.markForCheck(),vt(this._ngZone,this._document,this.autoClose,()=>this.close(),this.hidden,[this._windowRef.location.nativeElement]),this.shown.emit())}close(){this._windowRef&&(this._renderer.removeAttribute(this._elementRef.nativeElement,"aria-describedby"),this._popupService.close(),this._windowRef=null,this.hidden.emit(),this._changeDetector.markForCheck())}toggle(){this._windowRef?this.close():this.open()}isOpen(){return null!=this._windowRef}ngOnInit(){this._unregisterListenersFn=_n(this._renderer,this._elementRef.nativeElement,this.triggers,this.isOpen.bind(this),this.open.bind(this),this.close.bind(this),+this.openDelay,+this.closeDelay)}ngOnChanges({ngbPopover:e,popoverTitle:t,disablePopover:n,popoverClass:i}){i&&this.isOpen()&&(this._windowRef.instance.popoverClass=i.currentValue),(e||t||n)&&this._isDisabled()&&this.close()}ngOnDestroy(){this.close(),this._unregisterListenersFn&&this._unregisterListenersFn(),this._zoneSubscription.unsubscribe()}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(i.E),i.Mb(i.s),i.Mb(i.j),i.Mb(i.P),i.Mb(yn),i.Mb(i.A),i.Mb(r.d),i.Mb(i.h),i.Mb(i.g))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngbPopover",""]],inputs:{autoClose:"autoClose",placement:"placement",triggers:"triggers",container:"container",disablePopover:"disablePopover",popoverClass:"popoverClass",openDelay:"openDelay",closeDelay:"closeDelay",ngbPopover:"ngbPopover",popoverTitle:"popoverTitle"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbPopover"],features:[i.wb]}),e})(),Mn=(()=>{let e=class{};return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[r.c]]}),e})(),xn=(()=>{let e=class{constructor(){this.max=100,this.animated=!1,this.striped=!1,this.showValue=!1}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return new e},token:e,providedIn:"root"}),e})(),kn=(()=>{let e=class{constructor(e){this.value=0,this.max=e.max,this.animated=e.animated,this.striped=e.striped,this.textType=e.textType,this.type=e.type,this.showValue=e.showValue,this.height=e.height}set max(e){this._max=!je(e)||e<=0?100:e}get max(){return this._max}getValue(){return function(e,t,n=0){return Math.max(Math.min(e,t),n)}(this.value,this.max)}getPercentValue(){return 100*this.getValue()/this.max}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(xn))},e.\u0275cmp=i.Gb({type:e,selectors:[["ngb-progressbar"]],inputs:{value:"value",max:"max",animated:"animated",striped:"striped",textType:"textType",type:"type",showValue:"showValue",height:"height"},ngContentSelectors:O,decls:4,vars:13,consts:function(){return[[1,"progress"],["role","progressbar","aria-valuemin","0"],[4,"ngIf"],"" + "\ufffd0\ufffd" + ""]},template:function(e,t){1&e&&(i.oc(),i.Sb(0,"div",0),i.Sb(1,"div",1),i.Mc(2,fe,3,3,"span",2),i.nc(3),i.Rb(),i.Rb()),2&e&&(i.Kc("height",t.height),i.yb(1),i.Db("progress-bar",t.type?" bg-"+t.type:"","",t.textType?" text-"+t.textType:"","\n ",t.animated?" progress-bar-animated":"","",t.striped?" progress-bar-striped":"",""),i.Kc("width",t.getPercentValue(),"%"),i.zb("aria-valuenow",t.getValue())("aria-valuemax",t.max),i.yb(1),i.pc("ngIf",t.showValue))},directives:[r.r],pipes:[r.y],encapsulation:2,changeDetection:0}),e})(),Dn=(()=>{let e=class{};return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[r.c]]}),e})();class Tn{constructor(e,t,n){this.hour=Ae(e),this.minute=Ae(t),this.second=Ae(n)}changeHour(e=1){this.updateHour((isNaN(this.hour)?0:this.hour)+e)}updateHour(e){this.hour=je(e)?(e<0?24+e:e)%24:NaN}changeMinute(e=1){this.updateMinute((isNaN(this.minute)?0:this.minute)+e)}updateMinute(e){je(e)?(this.minute=e%60<0?60+e%60:e%60,this.changeHour(Math.floor(e/60))):this.minute=NaN}changeSecond(e=1){this.updateSecond((isNaN(this.second)?0:this.second)+e)}updateSecond(e){je(e)?(this.second=e<0?60+e%60:e%60,this.changeMinute(Math.floor(e/60))):this.second=NaN}isValid(e=!0){return je(this.hour)&&je(this.minute)&&(!e||je(this.second))}toString(){return`${this.hour||0}:${this.minute||0}:${this.second||0}`}}let Cn=(()=>{let e=class{constructor(){this.meridian=!1,this.spinners=!0,this.seconds=!1,this.hourStep=1,this.minuteStep=1,this.secondStep=1,this.disabled=!1,this.readonlyInputs=!1,this.size="medium"}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return new e},token:e,providedIn:"root"}),e})();function On(){return new Rn}let Ln=(()=>{let e=class{};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:On,token:e,providedIn:"root"}),e})(),Rn=(()=>{let e=class extends Ln{fromModel(e){return e&&Ne(e.hour)&&Ne(e.minute)?{hour:e.hour,minute:e.minute,second:Ne(e.second)?e.second:null}:null}toModel(e){return e&&Ne(e.hour)&&Ne(e.minute)?{hour:e.hour,minute:e.minute,second:Ne(e.second)?e.second:null}:null}};return e.\u0275fac=function(t){return ii(t||e)},e.\u0275prov=i.Ib({token:e,factory:function(t){return e.\u0275fac(t)}}),e})(),En=(()=>{let e=class{};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return e=Object(i.dc)(i.v),new An(e);var e},token:e,providedIn:"root"}),e})(),An=(()=>{let e=class extends En{constructor(e){super(),this._periods=Object(r.G)(e,r.g.Standalone,r.B.Narrow)}getMorningPeriod(){return this._periods[0]}getAfternoonPeriod(){return this._periods[1]}};return e.\u0275fac=function(t){return new(t||e)(i.dc(i.v))},e.\u0275prov=i.Ib({token:e,factory:function(t){return e.\u0275fac(t)}}),e})();const In=/[^0-9]/g,Pn={provide:s.o,useExisting:Object(i.T)(()=>jn),multi:!0};let jn=(()=>{let e=class{constructor(e,t,n,i){this._config=e,this._ngbTimeAdapter=t,this._cd=n,this.i18n=i,this.onChange=e=>{},this.onTouched=()=>{},this.meridian=e.meridian,this.spinners=e.spinners,this.seconds=e.seconds,this.hourStep=e.hourStep,this.minuteStep=e.minuteStep,this.secondStep=e.secondStep,this.disabled=e.disabled,this.readonlyInputs=e.readonlyInputs,this.size=e.size}set hourStep(e){this._hourStep=Ne(e)?e:this._config.hourStep}get hourStep(){return this._hourStep}set minuteStep(e){this._minuteStep=Ne(e)?e:this._config.minuteStep}get minuteStep(){return this._minuteStep}set secondStep(e){this._secondStep=Ne(e)?e:this._config.secondStep}get secondStep(){return this._secondStep}writeValue(e){const t=this._ngbTimeAdapter.fromModel(e);this.model=t?new Tn(t.hour,t.minute,t.second):new Tn,this.seconds||t&&je(t.second)||(this.model.second=0),this._cd.markForCheck()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e}changeHour(e){this.model.changeHour(e),this.propagateModelChange()}changeMinute(e){this.model.changeMinute(e),this.propagateModelChange()}changeSecond(e){this.model.changeSecond(e),this.propagateModelChange()}updateHour(e){const t=this.model.hour>=12,n=Ae(e);this.model.updateHour(this.meridian&&(t&&n<12||!t&&12===n)?n+12:n),this.propagateModelChange()}updateMinute(e){this.model.updateMinute(Ae(e)),this.propagateModelChange()}updateSecond(e){this.model.updateSecond(Ae(e)),this.propagateModelChange()}toggleMeridian(){this.meridian&&this.changeHour(12)}formatInput(e){e.value=e.value.replace(In,"")}formatHour(e){return je(e)?Ye(this.meridian?e%12==0?12:e%12:e%24):Ye(NaN)}formatMinSec(e){return Ye(je(e)?e:NaN)}get isSmallSize(){return"small"===this.size}get isLargeSize(){return"large"===this.size}ngOnChanges(e){e.seconds&&!this.seconds&&this.model&&!je(this.model.second)&&(this.model.second=0,this.propagateModelChange(!1))}propagateModelChange(e=!0){e&&this.onTouched(),this.model.isValid(this.seconds)?this.onChange(this._ngbTimeAdapter.toModel({hour:this.model.hour,minute:this.model.minute,second:this.model.second})):this.onChange(this._ngbTimeAdapter.toModel(null))}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(Cn),i.Mb(Ln),i.Mb(i.h),i.Mb(En))},e.\u0275cmp=i.Gb({type:e,selectors:[["ngb-timepicker"]],inputs:{meridian:"meridian",spinners:"spinners",seconds:"seconds",hourStep:"hourStep",minuteStep:"minuteStep",secondStep:"secondStep",readonlyInputs:"readonlyInputs",size:"size"},features:[i.xb([Pn]),i.wb],decls:18,vars:25,consts:function(){return[[3,"disabled"],[1,"ngb-tp"],[1,"ngb-tp-input-container","ngb-tp-hour"],["tabindex","-1","type","button","class","btn btn-link",3,"btn-sm","btn-lg","disabled","click",4,"ngIf"],["type","text","maxlength","2","inputmode","numeric",1,"ngb-tp-input","form-control",3,"value","readOnly","disabled","change","input","keydown.ArrowUp","keydown.ArrowDown",6,"placeholder","aria-label"],["placeholder","HH","aria-label","Hours"],[1,"ngb-tp-spacer"],[1,"ngb-tp-input-container","ngb-tp-minute"],["placeholder","MM","aria-label","Minutes"],["class","ngb-tp-spacer",4,"ngIf"],["class","ngb-tp-input-container ngb-tp-second",4,"ngIf"],["class","ngb-tp-meridian",4,"ngIf"],["tabindex","-1","type","button",1,"btn","btn-link",3,"disabled","click"],[1,"chevron","ngb-tp-chevron"],[1,"sr-only"],"Increment hours",[1,"chevron","ngb-tp-chevron","bottom"],"Decrement hours","Increment minutes","Decrement minutes",[1,"ngb-tp-input-container","ngb-tp-second"],["placeholder","SS","aria-label","Seconds"],"Increment seconds","Decrement seconds",[1,"ngb-tp-meridian"],["type","button",1,"btn","btn-outline-primary",3,"disabled","click"],[4,"ngIf","ngIfElse"],["am",""],"" + "\ufffd0\ufffd" + "","" + "\ufffd0\ufffd" + ""]},template:function(e,t){1&e&&(i.Sb(0,"fieldset",0),i.Sb(1,"div",1),i.Sb(2,"div",2),i.Mc(3,pe,4,7,"button",3),i.Sb(4,"input",4),i.Yb(5,5),i.gc("change",(function(e){return t.updateHour(e.target.value)}))("input",(function(e){return t.formatInput(e.target)}))("keydown.ArrowUp",(function(e){return t.changeHour(t.hourStep),e.preventDefault()}))("keydown.ArrowDown",(function(e){return t.changeHour(-t.hourStep),e.preventDefault()})),i.Rb(),i.Mc(6,me,4,7,"button",3),i.Rb(),i.Sb(7,"div",6),i.Oc(8,":"),i.Rb(),i.Sb(9,"div",7),i.Mc(10,be,4,7,"button",3),i.Sb(11,"input",4),i.Yb(12,8),i.gc("change",(function(e){return t.updateMinute(e.target.value)}))("input",(function(e){return t.formatInput(e.target)}))("keydown.ArrowUp",(function(e){return t.changeMinute(t.minuteStep),e.preventDefault()}))("keydown.ArrowDown",(function(e){return t.changeMinute(-t.minuteStep),e.preventDefault()})),i.Rb(),i.Mc(13,ge,4,7,"button",3),i.Rb(),i.Mc(14,_e,2,0,"div",9),i.Mc(15,we,5,9,"div",10),i.Mc(16,Se,1,0,"div",9),i.Mc(17,ke,5,9,"div",11),i.Rb(),i.Rb()),2&e&&(i.Eb("disabled",t.disabled),i.pc("disabled",t.disabled),i.yb(3),i.pc("ngIf",t.spinners),i.yb(1),i.Eb("form-control-sm",t.isSmallSize)("form-control-lg",t.isLargeSize),i.pc("value",t.formatHour(null==t.model?null:t.model.hour))("readOnly",t.readonlyInputs)("disabled",t.disabled),i.yb(2),i.pc("ngIf",t.spinners),i.yb(4),i.pc("ngIf",t.spinners),i.yb(1),i.Eb("form-control-sm",t.isSmallSize)("form-control-lg",t.isLargeSize),i.pc("value",t.formatMinSec(null==t.model?null:t.model.minute))("readOnly",t.readonlyInputs)("disabled",t.disabled),i.yb(2),i.pc("ngIf",t.spinners),i.yb(1),i.pc("ngIf",t.seconds),i.yb(1),i.pc("ngIf",t.seconds),i.yb(1),i.pc("ngIf",t.meridian),i.yb(1),i.pc("ngIf",t.meridian))},directives:[r.r],styles:['ngb-timepicker{font-size:1rem}.ngb-tp{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.ngb-tp-input-container{width:4em}.ngb-tp-chevron::before{border-style:solid;border-width:.29em .29em 0 0;content:"";display:inline-block;height:.69em;left:.05em;position:relative;top:.15em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);vertical-align:middle;width:.69em}.ngb-tp-chevron.bottom:before{top:-.3em;-webkit-transform:rotate(135deg);transform:rotate(135deg)}.ngb-tp-input{text-align:center}.ngb-tp-hour,.ngb-tp-meridian,.ngb-tp-minute,.ngb-tp-second{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:distribute;justify-content:space-around}.ngb-tp-spacer{width:1em;text-align:center}'],encapsulation:2}),e})(),Nn=(()=>{let e=class{};return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[r.c]]}),e})(),Fn=(()=>{let e=class{constructor(){this.autoClose=!0,this.placement="auto",this.triggers="hover focus",this.disableTooltip=!1,this.openDelay=0,this.closeDelay=0}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return new e},token:e,providedIn:"root"}),e})(),Yn=0,zn=(()=>{let e=class{};return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["ngb-tooltip-window"]],hostAttrs:["role","tooltip"],hostVars:3,hostBindings:function(e,t){2&e&&(i.Vb("id",t.id),i.Ab("tooltip show"+(t.tooltipClass?" "+t.tooltipClass:"")))},inputs:{id:"id",tooltipClass:"tooltipClass"},ngContentSelectors:O,decls:3,vars:0,consts:[[1,"arrow"],[1,"tooltip-inner"]],template:function(e,t){1&e&&(i.oc(),i.Nb(0,"div",0),i.Sb(1,"div",1),i.nc(2),i.Rb())},styles:["ngb-tooltip-window.bs-tooltip-bottom .arrow,ngb-tooltip-window.bs-tooltip-top .arrow{left:calc(50% - .4rem)}ngb-tooltip-window.bs-tooltip-bottom-left .arrow,ngb-tooltip-window.bs-tooltip-top-left .arrow{left:1em}ngb-tooltip-window.bs-tooltip-bottom-right .arrow,ngb-tooltip-window.bs-tooltip-top-right .arrow{left:auto;right:.8rem}ngb-tooltip-window.bs-tooltip-left .arrow,ngb-tooltip-window.bs-tooltip-right .arrow{top:calc(50% - .4rem)}ngb-tooltip-window.bs-tooltip-left-top .arrow,ngb-tooltip-window.bs-tooltip-right-top .arrow{top:.4rem}ngb-tooltip-window.bs-tooltip-left-bottom .arrow,ngb-tooltip-window.bs-tooltip-right-bottom .arrow{top:auto;bottom:.4rem}"],encapsulation:2,changeDetection:0}),e})(),$n=(()=>{let e=class{constructor(e,t,n,r,s,o,a,c,l,u){this._elementRef=e,this._renderer=t,this._ngZone=a,this._document=c,this._changeDetector=l,this.shown=new i.o,this.hidden=new i.o,this._ngbTooltipWindowId="ngb-tooltip-"+Yn++,this._windowRef=null,this.autoClose=o.autoClose,this.placement=o.placement,this.triggers=o.triggers,this.container=o.container,this.disableTooltip=o.disableTooltip,this.tooltipClass=o.tooltipClass,this.openDelay=o.openDelay,this.closeDelay=o.closeDelay,this._popupService=new Jt(zn,n,s,t,r,u),this._zoneSubscription=a.onStable.subscribe(()=>{this._windowRef&&Tt(this._elementRef.nativeElement,this._windowRef.location.nativeElement,this.placement,"body"===this.container,"bs-tooltip")})}set ngbTooltip(e){this._ngbTooltip=e,!e&&this._windowRef&&this.close()}get ngbTooltip(){return this._ngbTooltip}open(e){this._windowRef||!this._ngbTooltip||this.disableTooltip||(this._windowRef=this._popupService.open(this._ngbTooltip,e),this._windowRef.instance.tooltipClass=this.tooltipClass,this._windowRef.instance.id=this._ngbTooltipWindowId,this._renderer.setAttribute(this._elementRef.nativeElement,"aria-describedby",this._ngbTooltipWindowId),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement),this._windowRef.changeDetectorRef.detectChanges(),this._windowRef.changeDetectorRef.markForCheck(),vt(this._ngZone,this._document,this.autoClose,()=>this.close(),this.hidden,[this._windowRef.location.nativeElement]),this.shown.emit())}close(){null!=this._windowRef&&(this._renderer.removeAttribute(this._elementRef.nativeElement,"aria-describedby"),this._popupService.close(),this._windowRef=null,this.hidden.emit(),this._changeDetector.markForCheck())}toggle(){this._windowRef?this.close():this.open()}isOpen(){return null!=this._windowRef}ngOnInit(){this._unregisterListenersFn=_n(this._renderer,this._elementRef.nativeElement,this.triggers,this.isOpen.bind(this),this.open.bind(this),this.close.bind(this),+this.openDelay,+this.closeDelay)}ngOnChanges({tooltipClass:e}){e&&this.isOpen()&&(this._windowRef.instance.tooltipClass=e.currentValue)}ngOnDestroy(){this.close(),this._unregisterListenersFn&&this._unregisterListenersFn(),this._zoneSubscription.unsubscribe()}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(i.E),i.Mb(i.s),i.Mb(i.j),i.Mb(i.P),i.Mb(Fn),i.Mb(i.A),i.Mb(r.d),i.Mb(i.h),i.Mb(i.g))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngbTooltip",""]],inputs:{autoClose:"autoClose",placement:"placement",triggers:"triggers",container:"container",disableTooltip:"disableTooltip",tooltipClass:"tooltipClass",openDelay:"openDelay",closeDelay:"closeDelay",ngbTooltip:"ngbTooltip"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbTooltip"],features:[i.wb]}),e})(),Hn=(()=>{let e=class{};return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)}}),e})(),Wn=(()=>{let e=class{constructor(){this.highlightClass="ngb-highlight"}ngOnChanges(e){const t=Ie(this.result),n=(Array.isArray(this.term)?this.term:[this.term]).map(e=>Ie(e).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")).filter(e=>e);this.parts=n.length?t.split(new RegExp(`(${n.join("|")})`,"gmi")):[t]}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["ngb-highlight"]],inputs:{highlightClass:"highlightClass",result:"result",term:"term"},features:[i.wb],decls:1,vars:1,consts:[["ngFor","",3,"ngForOf"],[3,"class",4,"ngIf","ngIfElse"],["even",""]],template:function(e,t){1&e&&i.Mc(0,Ce,3,2,"ng-template",0),2&e&&i.pc("ngForOf",t.parts)},directives:[r.q,r.r],styles:[".ngb-highlight{font-weight:700}"],encapsulation:2,changeDetection:0}),e})(),Vn=(()=>{let e=class{constructor(){this.activeIdx=0,this.focusFirst=!0,this.formatter=Ie,this.selectEvent=new i.o,this.activeChangeEvent=new i.o}hasActive(){return this.activeIdx>-1&&this.activeIdx<this.results.length}getActive(){return this.results[this.activeIdx]}markActive(e){this.activeIdx=e,this._activeChanged()}next(){this.activeIdx===this.results.length-1?this.activeIdx=this.focusFirst?(this.activeIdx+1)%this.results.length:-1:this.activeIdx++,this._activeChanged()}prev(){this.activeIdx<0?this.activeIdx=this.results.length-1:0===this.activeIdx?this.activeIdx=this.focusFirst?this.results.length-1:-1:this.activeIdx--,this._activeChanged()}resetActive(){this.activeIdx=this.focusFirst?0:-1,this._activeChanged()}select(e){this.selectEvent.emit(e)}ngOnInit(){this.resetActive()}_activeChanged(){this.activeChangeEvent.emit(this.activeIdx>=0?this.id+"-"+this.activeIdx:void 0)}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["ngb-typeahead-window"]],hostAttrs:["role","listbox",1,"dropdown-menu","show"],hostVars:1,hostBindings:function(e,t){1&e&&i.gc("mousedown",(function(e){return e.preventDefault()})),2&e&&i.Vb("id",t.id)},inputs:{focusFirst:"focusFirst",formatter:"formatter",id:"id",results:"results",term:"term",resultTemplate:"resultTemplate"},outputs:{selectEvent:"select",activeChangeEvent:"activeChange"},exportAs:["ngbTypeaheadWindow"],decls:3,vars:1,consts:[["rt",""],["ngFor","",3,"ngForOf"],[3,"result","term"],["type","button","role","option",1,"dropdown-item",3,"id","mouseenter","click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,t){1&e&&(i.Mc(0,Oe,1,2,"ng-template",null,0,i.Nc),i.Mc(2,Ee,2,9,"ng-template",1)),2&e&&(i.yb(2),i.pc("ngForOf",t.results))},directives:[r.q,Wn,r.w],encapsulation:2}),e})();const Bn=new i.r("live announcer delay",{providedIn:"root",factory:function(){return 100}});function Un(e,t=!1){let n=e.body.querySelector("#ngb-live");return null==n&&t&&(n=e.createElement("div"),n.setAttribute("id","ngb-live"),n.setAttribute("aria-live","polite"),n.setAttribute("aria-atomic","true"),n.classList.add("sr-only"),e.body.appendChild(n)),n}let qn=(()=>{let e=class{constructor(e,t){this._document=e,this._delay=t}ngOnDestroy(){const e=Un(this._document);e&&e.parentElement.removeChild(e)}say(e){const t=Un(this._document,!0),n=this._delay;if(null!=t){t.textContent="";const i=()=>t.textContent=e;null===n?i():setTimeout(i,n)}}};return e.\u0275fac=function(t){return new(t||e)(i.dc(r.d),i.dc(Bn))},e.\u0275prov=Object(i.Ib)({factory:function(){return new e(Object(i.dc)(r.d),Object(i.dc)(Bn))},token:e,providedIn:"root"}),e})(),Gn=(()=>{let e=class{constructor(){this.editable=!0,this.focusFirst=!0,this.showHint=!1,this.placement=["bottom-left","bottom-right","top-left","top-right"]}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return new e},token:e,providedIn:"root"}),e})();const Jn={provide:s.o,useExisting:Object(i.T)(()=>Kn),multi:!0};let Qn=0,Kn=(()=>{let e=class{constructor(e,t,n,r,s,l,u,d,h,f,p,m){this._elementRef=e,this._renderer=n,this._live=d,this._document=h,this._ngZone=f,this._changeDetector=p,this._subscription=null,this._closed$=new o.a,this._inputValueBackup=null,this._windowRef=null,this.autocomplete="off",this.placement="bottom-left",this.selectItem=new i.o,this.activeDescendant=null,this.popupId="ngb-typeahead-"+Qn++,this._onTouched=()=>{},this._onChange=e=>{},this.container=l.container,this.editable=l.editable,this.focusFirst=l.focusFirst,this.showHint=l.showHint,this.placement=l.placement,this._valueChanges=Object(c.a)(e.nativeElement,"input").pipe(Object(g.a)(e=>e.target.value)),this._resubscribeTypeahead=new a.a(null),this._popupService=new Jt(Vn,r,t,n,s,m),this._zoneSubscription=u.onStable.subscribe(()=>{this.isPopupOpen()&&Tt(this._elementRef.nativeElement,this._windowRef.location.nativeElement,this.placement,"body"===this.container)})}ngOnInit(){const e=this._valueChanges.pipe(Object(S.a)(e=>{this._inputValueBackup=this.showHint?e:null,this._onChange(this.editable?e:void 0)})).pipe(this.ngbTypeahead),t=this._resubscribeTypeahead.pipe(Object(_.a)(()=>e));this._subscription=this._subscribeToUserInput(t)}ngOnDestroy(){this._closePopup(),this._unsubscribeFromUserInput(),this._zoneSubscription.unsubscribe()}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}writeValue(e){this._writeInputValue(this._formatItemForInput(e)),this.showHint&&(this._inputValueBackup=e)}setDisabledState(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}dismissPopup(){this.isPopupOpen()&&(this._resubscribeTypeahead.next(null),this._closePopup(),this.showHint&&null!==this._inputValueBackup&&this._writeInputValue(this._inputValueBackup),this._changeDetector.markForCheck())}isPopupOpen(){return null!=this._windowRef}handleBlur(){this._resubscribeTypeahead.next(null),this._onTouched()}handleKeyDown(e){if(this.isPopupOpen())switch(e.which){case ft.ArrowDown:e.preventDefault(),this._windowRef.instance.next(),this._showHint();break;case ft.ArrowUp:e.preventDefault(),this._windowRef.instance.prev(),this._showHint();break;case ft.Enter:case ft.Tab:const t=this._windowRef.instance.getActive();Fe(t)&&(e.preventDefault(),e.stopPropagation(),this._selectResult(t)),this._closePopup()}}_openPopup(){this.isPopupOpen()||(this._inputValueBackup=this._elementRef.nativeElement.value,this._windowRef=this._popupService.open(),this._windowRef.instance.id=this.popupId,this._windowRef.instance.selectEvent.subscribe(e=>this._selectResultClosePopup(e)),this._windowRef.instance.activeChangeEvent.subscribe(e=>this.activeDescendant=e),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement),this._changeDetector.markForCheck(),vt(this._ngZone,this._document,"outside",()=>this.dismissPopup(),this._closed$,[this._elementRef.nativeElement,this._windowRef.location.nativeElement]))}_closePopup(){this._closed$.next(),this._popupService.close(),this._windowRef=null,this.activeDescendant=null}_selectResult(e){let t=!1;this.selectItem.emit({item:e,preventDefault:()=>{t=!0}}),this._resubscribeTypeahead.next(null),t||(this.writeValue(e),this._onChange(e))}_selectResultClosePopup(e){this._selectResult(e),this._closePopup()}_showHint(){var e;if(this.showHint&&(null===(e=this._windowRef)||void 0===e?void 0:e.instance.hasActive())&&null!=this._inputValueBackup){const e=this._inputValueBackup.toLowerCase(),t=this._formatItemForInput(this._windowRef.instance.getActive());e===t.substr(0,this._inputValueBackup.length).toLowerCase()?(this._writeInputValue(this._inputValueBackup+t.substr(this._inputValueBackup.length)),this._elementRef.nativeElement.setSelectionRange.apply(this._elementRef.nativeElement,[this._inputValueBackup.length,t.length])):this._writeInputValue(t)}}_formatItemForInput(e){return null!=e&&this.inputFormatter?this.inputFormatter(e):Ie(e)}_writeInputValue(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",Ie(e))}_subscribeToUserInput(e){return e.subscribe(e=>{e&&0!==e.length?(this._openPopup(),this._windowRef.instance.focusFirst=this.focusFirst,this._windowRef.instance.results=e,this._windowRef.instance.term=this._elementRef.nativeElement.value,this.resultFormatter&&(this._windowRef.instance.formatter=this.resultFormatter),this.resultTemplate&&(this._windowRef.instance.resultTemplate=this.resultTemplate),this._windowRef.instance.resetActive(),this._windowRef.changeDetectorRef.detectChanges(),this._showHint()):this._closePopup();const t=e?e.length:0;this._live.say(0===t?"No results available":`${t} result${1===t?"":"s"} available`)})}_unsubscribeFromUserInput(){this._subscription&&this._subscription.unsubscribe(),this._subscription=null}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(i.P),i.Mb(i.E),i.Mb(i.s),i.Mb(i.j),i.Mb(Gn),i.Mb(i.A),i.Mb(qn),i.Mb(r.d),i.Mb(i.A),i.Mb(i.h),i.Mb(i.g))},e.\u0275dir=i.Hb({type:e,selectors:[["input","ngbTypeahead",""]],hostAttrs:["autocapitalize","off","autocorrect","off","role","combobox","aria-multiline","false"],hostVars:7,hostBindings:function(e,t){1&e&&i.gc("blur",(function(){return t.handleBlur()}))("keydown",(function(e){return t.handleKeyDown(e)})),2&e&&(i.Vb("autocomplete",t.autocomplete),i.zb("aria-autocomplete",t.showHint?"both":"list")("aria-activedescendant",t.activeDescendant)("aria-owns",t.isPopupOpen()?t.popupId:null)("aria-expanded",t.isPopupOpen()),i.Eb("open",t.isPopupOpen()))},inputs:{autocomplete:"autocomplete",placement:"placement",container:"container",editable:"editable",focusFirst:"focusFirst",showHint:"showHint",inputFormatter:"inputFormatter",ngbTypeahead:"ngbTypeahead",resultFormatter:"resultFormatter",resultTemplate:"resultTemplate"},outputs:{selectItem:"selectItem"},exportAs:["ngbTypeahead"],features:[i.xb([Jn])]}),e})(),Zn=(()=>{let e=class{};return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[r.c]]}),e})();const Xn=i.Ub(Ke),ei=i.Ub(lt),ti=i.Ub(Lt),ni=i.Ub(Rt),ii=i.Ub(Rn)},"G1/K":function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("LvDl"),r=n.n(i),s=n("8Y7J");let o=(()=>{class e{transform(e,t){return""===e?r.a.defaultTo(t,"n/a"):e}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=s.Lb({name:"notAvailable",type:e,pure:!0}),e})()},G1I9:function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return o}));var i=n("oxzT"),r=n("mtw6");class s{constructor(e=r.a.info,t,n,i,s="Ceph"){this.type=e,this.title=t,this.message=n,this.options=i,this.application=s,this.isFinishedTask=!1,this.classes={Ceph:"ceph-icon",Prometheus:"prometheus-icon"},this.applicationClass=this.classes[this.application]}}class o extends s{constructor(e=new s){super(e.type,e.title,e.message,e.options,e.application),this.config=e,this.textClasses=["text-danger","text-info","text-success"],this.iconClasses=[i.a.warning,i.a.info,i.a.check],this.borderClasses=["border-danger","border-info","border-success"],delete this.config,this.timestamp=(new Date).toJSON(),this.iconClass=this.iconClasses[this.type],this.textClass=this.textClasses[this.type],this.borderClass=this.borderClasses[this.type],this.isFinishedTask=e.isFinishedTask}}},G4mU:function(e,t,n){"use strict";var i=n("lkxz");t.a=function(e,t){var n=t?Object(i.a)(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},"G6Q+":function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n("SVse"),r=n("iInd"),s=n("PCNd"),o=n("8Y7J");let a=(()=>{class e{}return e.\u0275mod=o.Kb({type:e}),e.\u0275inj=o.Jb({factory:function(t){return new(t||e)},imports:[[i.c,s.a,r.i]]}),e})()},GS7A:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return r})),n.d(t,"d",(function(){return f})),n.d(t,"e",(function(){return a})),n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return u})),n.d(t,"h",(function(){return l})),n.d(t,"i",(function(){return d})),n.d(t,"j",(function(){return o})),n.d(t,"k",(function(){return p})),n.d(t,"l",(function(){return m}));class i{}class r{}const s="*";function o(e,t){return{type:7,name:e,definitions:t,options:{}}}function a(e,t=null){return{type:4,styles:t,timings:e}}function c(e,t=null){return{type:2,steps:e,options:t}}function l(e){return{type:6,styles:e,offset:null}}function u(e,t,n){return{type:0,name:e,styles:t,options:n}}function d(e,t,n=null){return{type:1,expr:e,animation:t,options:n}}function h(e){Promise.resolve(null).then(e)}class f{constructor(e=0,t=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this.parentPlayer=null,this.totalTime=e+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}onStart(e){this._onStartFns.push(e)}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){h(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(e=>e()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){}setPosition(e){}getPosition(){return 0}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}}class p{constructor(e){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=e;let t=0,n=0,i=0;const r=this.players.length;0==r?h(()=>this._onFinish()):this.players.forEach(e=>{e.onDone(()=>{++t==r&&this._onFinish()}),e.onDestroy(()=>{++n==r&&this._onDestroy()}),e.onStart(()=>{++i==r&&this._onStart()})}),this.totalTime=this.players.reduce((e,t)=>Math.max(e,t.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this.players.forEach(e=>e.init())}onStart(e){this._onStartFns.push(e)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(e=>e()),this._onStartFns=[])}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(e=>e.play())}pause(){this.players.forEach(e=>e.pause())}restart(){this.players.forEach(e=>e.restart())}finish(){this._onFinish(),this.players.forEach(e=>e.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(e=>e.destroy()),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this.players.forEach(e=>e.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(e){const t=e*this.totalTime;this.players.forEach(e=>{const n=e.totalTime?Math.min(1,t/e.totalTime):1;e.setPosition(n)})}getPosition(){let e=0;return this.players.forEach(t=>{const n=t.getPosition();e=Math.min(n,e)}),e}beforeDestroy(){this.players.forEach(e=>{e.beforeDestroy&&e.beforeDestroy()})}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}}const m="!"},GarU:function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},GgAd:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i=n("8Y7J"),r=n("G0yt"),s=n("SVse"),o=n("Fgil"),a=n("o4+5");function c(e,t){if(1&e&&(i.Sb(0,"table"),i.Sb(1,"tr"),i.Sb(2,"td",4),i.Oc(3,"Used:\xa0"),i.Rb(),i.Sb(4,"td",5),i.Sb(5,"strong"),i.Oc(6),i.jc(7,"dimlessBinary"),i.jc(8,"dimless"),i.Rb(),i.Rb(),i.Rb(),i.Sb(9,"tr"),i.Sb(10,"td",4),i.Oc(11,"Free:\xa0"),i.Rb(),i.Sb(12,"td",6),i.Sb(13,"strong"),i.Oc(14),i.jc(15,"dimlessBinary"),i.jc(16,"dimless"),i.Rb(),i.Rb(),i.Rb(),i.Rb()),2&e){const e=i.ic();i.yb(6),i.Qc(" ",e.isBinary?i.kc(7,2,e.used):i.kc(8,4,e.used),""),i.yb(8),i.Pc(e.isBinary?i.kc(15,6,e.total-e.used):i.kc(16,8,e.total-e.used))}}let l=(()=>{class e{constructor(){this.isBinary=!0,this.decimals=0}ngOnChanges(){this.usedPercentage=this.total>0?this.used/this.total*100:0,this.freePercentage=100-this.usedPercentage}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-usage-bar"]],inputs:{total:"total",used:"used",isBinary:"isBinary",decimals:"decimals"},features:[i.wb],decls:8,vars:9,consts:[["usageTooltipTpl",""],["data-placement","left",1,"progress",3,"ngbTooltip"],["role","progressbar",1,"progress-bar","bg-info"],["role","progressbar",1,"progress-bar","bg-freespace"],[1,"text-left"],[1,"text-right"],[1,"'text-right"]],template:function(e,t){if(1&e&&(i.Mc(0,c,17,10,"ng-template",null,0,i.Nc),i.Sb(2,"div",1),i.Sb(3,"div",2),i.Sb(4,"span"),i.Oc(5),i.jc(6,"number"),i.Rb(),i.Rb(),i.Nb(7,"div",3),i.Rb()),2&e){const e=i.Ac(1);i.yb(2),i.pc("ngbTooltip",e),i.yb(1),i.Kc("width",t.usedPercentage+"%"),i.yb(2),i.Qc("",i.lc(6,6,t.usedPercentage,"1.0-"+t.decimals),"%"),i.yb(2),i.Kc("width",t.freePercentage+"%")}},directives:[r.D],pipes:[s.f,o.a,a.a],styles:[".bg-info[_ngcontent-%COMP%]{background-color:#2b99a8!important}.bg-freespace[_ngcontent-%COMP%]{background-color:#ced4da!important}.progress[_ngcontent-%COMP%]{height:20px;margin-bottom:0;position:relative}.progress[_ngcontent-%COMP%] div.progress-bar[_ngcontent-%COMP%]{position:static}.progress[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#000;display:block;font-weight:400;position:absolute;width:100%}"]}),e})()},GyhO:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("LRne"),r=n("0EUg");function s(...e){return Object(r.a)()(Object(i.a)(...e))}},H8ED:function(e,t,n){!function(e){"use strict";function t(e,t,n){return"m"===n?t?"\u0445\u0432\u0456\u043b\u0456\u043d\u0430":"\u0445\u0432\u0456\u043b\u0456\u043d\u0443":"h"===n?t?"\u0433\u0430\u0434\u0437\u0456\u043d\u0430":"\u0433\u0430\u0434\u0437\u0456\u043d\u0443":e+" "+(i=+e,r={ss:t?"\u0441\u0435\u043a\u0443\u043d\u0434\u0430_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434":"\u0441\u0435\u043a\u0443\u043d\u0434\u0443_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434",mm:t?"\u0445\u0432\u0456\u043b\u0456\u043d\u0430_\u0445\u0432\u0456\u043b\u0456\u043d\u044b_\u0445\u0432\u0456\u043b\u0456\u043d":"\u0445\u0432\u0456\u043b\u0456\u043d\u0443_\u0445\u0432\u0456\u043b\u0456\u043d\u044b_\u0445\u0432\u0456\u043b\u0456\u043d",hh:t?"\u0433\u0430\u0434\u0437\u0456\u043d\u0430_\u0433\u0430\u0434\u0437\u0456\u043d\u044b_\u0433\u0430\u0434\u0437\u0456\u043d":"\u0433\u0430\u0434\u0437\u0456\u043d\u0443_\u0433\u0430\u0434\u0437\u0456\u043d\u044b_\u0433\u0430\u0434\u0437\u0456\u043d",dd:"\u0434\u0437\u0435\u043d\u044c_\u0434\u043d\u0456_\u0434\u0437\u0451\u043d",MM:"\u043c\u0435\u0441\u044f\u0446_\u043c\u0435\u0441\u044f\u0446\u044b_\u043c\u0435\u0441\u044f\u0446\u0430\u045e",yy:"\u0433\u043e\u0434_\u0433\u0430\u0434\u044b_\u0433\u0430\u0434\u043e\u045e"}[n].split("_"),i%10==1&&i%100!=11?r[0]:i%10>=2&&i%10<=4&&(i%100<10||i%100>=20)?r[1]:r[2]);var i,r}e.defineLocale("be",{months:{format:"\u0441\u0442\u0443\u0434\u0437\u0435\u043d\u044f_\u043b\u044e\u0442\u0430\u0433\u0430_\u0441\u0430\u043a\u0430\u0432\u0456\u043a\u0430_\u043a\u0440\u0430\u0441\u0430\u0432\u0456\u043a\u0430_\u0442\u0440\u0430\u045e\u043d\u044f_\u0447\u044d\u0440\u0432\u0435\u043d\u044f_\u043b\u0456\u043f\u0435\u043d\u044f_\u0436\u043d\u0456\u045e\u043d\u044f_\u0432\u0435\u0440\u0430\u0441\u043d\u044f_\u043a\u0430\u0441\u0442\u0440\u044b\u0447\u043d\u0456\u043a\u0430_\u043b\u0456\u0441\u0442\u0430\u043f\u0430\u0434\u0430_\u0441\u043d\u0435\u0436\u043d\u044f".split("_"),standalone:"\u0441\u0442\u0443\u0434\u0437\u0435\u043d\u044c_\u043b\u044e\u0442\u044b_\u0441\u0430\u043a\u0430\u0432\u0456\u043a_\u043a\u0440\u0430\u0441\u0430\u0432\u0456\u043a_\u0442\u0440\u0430\u0432\u0435\u043d\u044c_\u0447\u044d\u0440\u0432\u0435\u043d\u044c_\u043b\u0456\u043f\u0435\u043d\u044c_\u0436\u043d\u0456\u0432\u0435\u043d\u044c_\u0432\u0435\u0440\u0430\u0441\u0435\u043d\u044c_\u043a\u0430\u0441\u0442\u0440\u044b\u0447\u043d\u0456\u043a_\u043b\u0456\u0441\u0442\u0430\u043f\u0430\u0434_\u0441\u043d\u0435\u0436\u0430\u043d\u044c".split("_")},monthsShort:"\u0441\u0442\u0443\u0434_\u043b\u044e\u0442_\u0441\u0430\u043a_\u043a\u0440\u0430\u0441_\u0442\u0440\u0430\u0432_\u0447\u044d\u0440\u0432_\u043b\u0456\u043f_\u0436\u043d\u0456\u0432_\u0432\u0435\u0440_\u043a\u0430\u0441\u0442_\u043b\u0456\u0441\u0442_\u0441\u043d\u0435\u0436".split("_"),weekdays:{format:"\u043d\u044f\u0434\u0437\u0435\u043b\u044e_\u043f\u0430\u043d\u044f\u0434\u0437\u0435\u043b\u0430\u043a_\u0430\u045e\u0442\u043e\u0440\u0430\u043a_\u0441\u0435\u0440\u0430\u0434\u0443_\u0447\u0430\u0446\u0432\u0435\u0440_\u043f\u044f\u0442\u043d\u0456\u0446\u0443_\u0441\u0443\u0431\u043e\u0442\u0443".split("_"),standalone:"\u043d\u044f\u0434\u0437\u0435\u043b\u044f_\u043f\u0430\u043d\u044f\u0434\u0437\u0435\u043b\u0430\u043a_\u0430\u045e\u0442\u043e\u0440\u0430\u043a_\u0441\u0435\u0440\u0430\u0434\u0430_\u0447\u0430\u0446\u0432\u0435\u0440_\u043f\u044f\u0442\u043d\u0456\u0446\u0430_\u0441\u0443\u0431\u043e\u0442\u0430".split("_"),isFormat:/\[ ?[\u0423\u0443\u045e] ?(?:\u043c\u0456\u043d\u0443\u043b\u0443\u044e|\u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0443\u044e)? ?\] ?dddd/},weekdaysShort:"\u043d\u0434_\u043f\u043d_\u0430\u0442_\u0441\u0440_\u0447\u0446_\u043f\u0442_\u0441\u0431".split("_"),weekdaysMin:"\u043d\u0434_\u043f\u043d_\u0430\u0442_\u0441\u0440_\u0447\u0446_\u043f\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0433.",LLL:"D MMMM YYYY \u0433., HH:mm",LLLL:"dddd, D MMMM YYYY \u0433., HH:mm"},calendar:{sameDay:"[\u0421\u0451\u043d\u043d\u044f \u045e] LT",nextDay:"[\u0417\u0430\u045e\u0442\u0440\u0430 \u045e] LT",lastDay:"[\u0423\u0447\u043e\u0440\u0430 \u045e] LT",nextWeek:function(){return"[\u0423] dddd [\u045e] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[\u0423 \u043c\u0456\u043d\u0443\u043b\u0443\u044e] dddd [\u045e] LT";case 1:case 2:case 4:return"[\u0423 \u043c\u0456\u043d\u0443\u043b\u044b] dddd [\u045e] LT"}},sameElse:"L"},relativeTime:{future:"\u043f\u0440\u0430\u0437 %s",past:"%s \u0442\u0430\u043c\u0443",s:"\u043d\u0435\u043a\u0430\u043b\u044c\u043a\u0456 \u0441\u0435\u043a\u0443\u043d\u0434",m:t,mm:t,h:t,hh:t,d:"\u0434\u0437\u0435\u043d\u044c",dd:t,M:"\u043c\u0435\u0441\u044f\u0446",MM:t,y:"\u0433\u043e\u0434",yy:t},meridiemParse:/\u043d\u043e\u0447\u044b|\u0440\u0430\u043d\u0456\u0446\u044b|\u0434\u043d\u044f|\u0432\u0435\u0447\u0430\u0440\u0430/,isPM:function(e){return/^(\u0434\u043d\u044f|\u0432\u0435\u0447\u0430\u0440\u0430)$/.test(e)},meridiem:function(e,t,n){return e<4?"\u043d\u043e\u0447\u044b":e<12?"\u0440\u0430\u043d\u0456\u0446\u044b":e<17?"\u0434\u043d\u044f":"\u0432\u0435\u0447\u0430\u0440\u0430"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0456|\u044b|\u0433\u0430)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e%10!=2&&e%10!=3||e%100==12||e%100==13?e+"-\u044b":e+"-\u0456";case"D":return e+"-\u0433\u0430";default:return e}},week:{dow:1,doy:7}})}(n("wd/R"))},HAuM:function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},HDdC:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i=n("7o/Q"),r=n("2QA8"),s=n("gRHU"),o=n("kJWO"),a=n("mCNh"),c=n("2fFW");let l=(()=>{class e{constructor(e){this._isScalar=!1,e&&(this._subscribe=e)}lift(t){const n=new e;return n.source=this,n.operator=t,n}subscribe(e,t,n){const{operator:o}=this,a=function(e,t,n){if(e){if(e instanceof i.a)return e;if(e[r.a])return e[r.a]()}return e||t||n?new i.a(e,t,n):new i.a(s.a)}(e,t,n);if(a.add(o?o.call(a,this.source):this.source||c.a.useDeprecatedSynchronousErrorHandling&&!a.syncErrorThrowable?this._subscribe(a):this._trySubscribe(a)),c.a.useDeprecatedSynchronousErrorHandling&&a.syncErrorThrowable&&(a.syncErrorThrowable=!1,a.syncErrorThrown))throw a.syncErrorValue;return a}_trySubscribe(e){try{return this._subscribe(e)}catch(t){c.a.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),function(e){for(;e;){const{closed:t,destination:n,isStopped:r}=e;if(t||r)return!1;e=n&&n instanceof i.a?n:null}return!0}(e)?e.error(t):console.warn(t)}}forEach(e,t){return new(t=u(t))((t,n)=>{let i;i=this.subscribe(t=>{try{e(t)}catch(r){n(r),i&&i.unsubscribe()}},n,t)})}_subscribe(e){const{source:t}=this;return t&&t.subscribe(e)}[o.a](){return this}pipe(...e){return 0===e.length?this:Object(a.b)(e)(this)}toPromise(e){return new(e=u(e))((e,t)=>{let n;this.subscribe(e=>n=e,e=>t(e),()=>e(n))})}}return e.create=t=>new e(t),e})();function u(e){if(e||(e=c.a.Promise||Promise),!e)throw new Error("no Promise impl found");return e}},HH4o:function(e,t,n){var i=n("tiKp")("iterator"),r=!1;try{var s=0,o={next:function(){return{done:!!s++}},return:function(){r=!0}};o[i]=function(){return this},Array.from(o,(function(){throw 2}))}catch(a){}e.exports=function(e,t){if(!t&&!r)return!1;var n=!1;try{var s={};s[i]=function(){return{next:function(){return{done:n=!0}}}},e(s)}catch(a){}return n}},HP3h:function(e,t,n){!function(e){"use strict";var t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},n=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},i={s:["\u0623\u0642\u0644 \u0645\u0646 \u062b\u0627\u0646\u064a\u0629","\u062b\u0627\u0646\u064a\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062b\u0627\u0646\u064a\u062a\u0627\u0646","\u062b\u0627\u0646\u064a\u062a\u064a\u0646"],"%d \u062b\u0648\u0627\u0646","%d \u062b\u0627\u0646\u064a\u0629","%d \u062b\u0627\u0646\u064a\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062f\u0642\u064a\u0642\u0629","\u062f\u0642\u064a\u0642\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062f\u0642\u064a\u0642\u062a\u0627\u0646","\u062f\u0642\u064a\u0642\u062a\u064a\u0646"],"%d \u062f\u0642\u0627\u0626\u0642","%d \u062f\u0642\u064a\u0642\u0629","%d \u062f\u0642\u064a\u0642\u0629"],h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062d\u062f\u0629",["\u0633\u0627\u0639\u062a\u0627\u0646","\u0633\u0627\u0639\u062a\u064a\u0646"],"%d \u0633\u0627\u0639\u0627\u062a","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064a\u0648\u0645","\u064a\u0648\u0645 \u0648\u0627\u062d\u062f",["\u064a\u0648\u0645\u0627\u0646","\u064a\u0648\u0645\u064a\u0646"],"%d \u0623\u064a\u0627\u0645","%d \u064a\u0648\u0645\u064b\u0627","%d \u064a\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062d\u062f",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064a\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062d\u062f",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064a\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064b\u0627","%d \u0639\u0627\u0645"]},r=function(e){return function(t,r,s,o){var a=n(t),c=i[e][n(t)];return 2===a&&(c=c[r?0:1]),c.replace(/%d/i,t)}},s=["\u064a\u0646\u0627\u064a\u0631","\u0641\u0628\u0631\u0627\u064a\u0631","\u0645\u0627\u0631\u0633","\u0623\u0628\u0631\u064a\u0644","\u0645\u0627\u064a\u0648","\u064a\u0648\u0646\u064a\u0648","\u064a\u0648\u0644\u064a\u0648","\u0623\u063a\u0633\u0637\u0633","\u0633\u0628\u062a\u0645\u0628\u0631","\u0623\u0643\u062a\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062f\u064a\u0633\u0645\u0628\u0631"];e.defineLocale("ar-ly",{months:s,monthsShort:s,weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200fM/\u200fYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,t,n){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u064b\u0627 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062f %s",past:"\u0645\u0646\u0630 %s",s:r("s"),ss:r("s"),m:r("m"),mm:r("m"),h:r("h"),hh:r("h"),d:r("d"),dd:r("d"),M:r("M"),MM:r("M"),y:r("y"),yy:r("y")},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"\u060c")},week:{dow:6,doy:12}})}(n("wd/R"))},HYAF:function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},Hd5f:function(e,t,n){var i=n("0Dky"),r=n("tiKp"),s=n("LQDL"),o=r("species");e.exports=function(e){return s>=51||!i((function(){var t=[];return(t.constructor={})[o]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},Hicy:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return o}));var i=n("8Y7J"),r=n("SVse"),s=function(){function e(e,t,n){this._el=e,this._ngZone=t,this.platformId=n,this.clickOutsideEnabled=!0,this.attachOutsideOnClick=!1,this.delayClickOutsideInit=!1,this.emitOnBlur=!1,this.exclude="",this.excludeBeforeClick=!1,this.clickOutsideEvents="",this.clickOutside=new i.o,this._nodesExcluded=[],this._events=["click"],this._initOnClickBody=this._initOnClickBody.bind(this),this._onClickBody=this._onClickBody.bind(this),this._onWindowBlur=this._onWindowBlur.bind(this)}return e.prototype.ngOnInit=function(){Object(r.I)(this.platformId)&&this._init()},e.prototype.ngOnDestroy=function(){Object(r.I)(this.platformId)&&(this._removeClickOutsideListener(),this._removeAttachOutsideOnClickListener(),this._removeWindowBlurListener())},e.prototype.ngOnChanges=function(e){Object(r.I)(this.platformId)&&(e.attachOutsideOnClick||e.exclude||e.emitOnBlur)&&this._init()},e.prototype._init=function(){""!==this.clickOutsideEvents&&(this._events=this.clickOutsideEvents.split(",").map((function(e){return e.trim()}))),this._excludeCheck(),this.attachOutsideOnClick?this._initAttachOutsideOnClickListener():this._initOnClickBody(),this.emitOnBlur&&this._initWindowBlurListener()},e.prototype._initOnClickBody=function(){this.delayClickOutsideInit?setTimeout(this._initClickOutsideListener.bind(this)):this._initClickOutsideListener()},e.prototype._excludeCheck=function(){if(this.exclude)try{var e=Array.from(document.querySelectorAll(this.exclude));e&&(this._nodesExcluded=e)}catch(t){console.error("[ng-click-outside] Check your exclude selector syntax.",t)}},e.prototype._onClickBody=function(e){this.clickOutsideEnabled&&(this.excludeBeforeClick&&this._excludeCheck(),this._el.nativeElement.contains(e.target)||this._shouldExclude(e.target)||(this._emit(e),this.attachOutsideOnClick&&this._removeClickOutsideListener()))},e.prototype._onWindowBlur=function(e){var t=this;setTimeout((function(){document.hidden||t._emit(e)}))},e.prototype._emit=function(e){var t=this;this.clickOutsideEnabled&&this._ngZone.run((function(){return t.clickOutside.emit(e)}))},e.prototype._shouldExclude=function(e){for(var t=0,n=this._nodesExcluded;t<n.length;t++)if(n[t].contains(e))return!0;return!1},e.prototype._initClickOutsideListener=function(){var e=this;this._ngZone.runOutsideAngular((function(){e._events.forEach((function(t){return document.addEventListener(t,e._onClickBody)}))}))},e.prototype._removeClickOutsideListener=function(){var e=this;this._ngZone.runOutsideAngular((function(){e._events.forEach((function(t){return document.removeEventListener(t,e._onClickBody)}))}))},e.prototype._initAttachOutsideOnClickListener=function(){var e=this;this._ngZone.runOutsideAngular((function(){e._events.forEach((function(t){return e._el.nativeElement.addEventListener(t,e._initOnClickBody)}))}))},e.prototype._removeAttachOutsideOnClickListener=function(){var e=this;this._ngZone.runOutsideAngular((function(){e._events.forEach((function(t){return e._el.nativeElement.removeEventListener(t,e._initOnClickBody)}))}))},e.prototype._initWindowBlurListener=function(){var e=this;this._ngZone.runOutsideAngular((function(){window.addEventListener("blur",e._onWindowBlur)}))},e.prototype._removeWindowBlurListener=function(){var e=this;this._ngZone.runOutsideAngular((function(){window.removeEventListener("blur",e._onWindowBlur)}))},e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(i.A),i.Mb(i.C))},e.\u0275dir=i.Hb({type:e,selectors:[["","clickOutside",""]],inputs:{clickOutsideEnabled:"clickOutsideEnabled",attachOutsideOnClick:"attachOutsideOnClick",delayClickOutsideInit:"delayClickOutsideInit",emitOnBlur:"emitOnBlur",exclude:"exclude",excludeBeforeClick:"excludeBeforeClick",clickOutsideEvents:"clickOutsideEvents"},outputs:{clickOutside:"clickOutside"},features:[i.wb]}),e.\u0275prov=i.Ib({token:e,factory:function(t){return e.\u0275fac(t)}}),e}(),o=function(){function e(){}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)}}),e}()},"I+eb":function(e,t,n){var i=n("2oRo"),r=n("Bs8V").f,s=n("kRJp"),o=n("busE"),a=n("zk60"),c=n("6JNq"),l=n("lMq5");e.exports=function(e,t){var n,u,d,h,f,p=e.target,m=e.global,b=e.stat;if(n=m?i:b?i[p]||a(p,{}):(i[p]||{}).prototype)for(u in t){if(h=t[u],d=e.noTargetGet?(f=r(n,u))&&f.value:n[u],!l(m?u:p+(b?".":"#")+u,e.forced)&&void 0!==d){if(typeof h==typeof d)continue;c(h,d)}(e.sham||d&&d.sham)&&s(h,"sham",!0),o(n,u,h,e)}}},I55L:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const i=e=>e&&"number"==typeof e.length&&"function"!=typeof e},I8vh:function(e,t,n){var i=n("ppGB"),r=Math.max,s=Math.min;e.exports=function(e,t){var n=i(e);return n<0?r(n+t,0):s(n,t)}},IBtZ:function(e,t,n){!function(e){"use strict";e.defineLocale("ka",{months:"\u10d8\u10d0\u10dc\u10d5\u10d0\u10e0\u10d8_\u10d7\u10d4\u10d1\u10d4\u10e0\u10d5\u10d0\u10da\u10d8_\u10db\u10d0\u10e0\u10e2\u10d8_\u10d0\u10de\u10e0\u10d8\u10da\u10d8_\u10db\u10d0\u10d8\u10e1\u10d8_\u10d8\u10d5\u10dc\u10d8\u10e1\u10d8_\u10d8\u10d5\u10da\u10d8\u10e1\u10d8_\u10d0\u10d2\u10d5\u10d8\u10e1\u10e2\u10dd_\u10e1\u10d4\u10e5\u10e2\u10d4\u10db\u10d1\u10d4\u10e0\u10d8_\u10dd\u10e5\u10e2\u10dd\u10db\u10d1\u10d4\u10e0\u10d8_\u10dc\u10dd\u10d4\u10db\u10d1\u10d4\u10e0\u10d8_\u10d3\u10d4\u10d9\u10d4\u10db\u10d1\u10d4\u10e0\u10d8".split("_"),monthsShort:"\u10d8\u10d0\u10dc_\u10d7\u10d4\u10d1_\u10db\u10d0\u10e0_\u10d0\u10de\u10e0_\u10db\u10d0\u10d8_\u10d8\u10d5\u10dc_\u10d8\u10d5\u10da_\u10d0\u10d2\u10d5_\u10e1\u10d4\u10e5_\u10dd\u10e5\u10e2_\u10dc\u10dd\u10d4_\u10d3\u10d4\u10d9".split("_"),weekdays:{standalone:"\u10d9\u10d5\u10d8\u10e0\u10d0_\u10dd\u10e0\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8_\u10e1\u10d0\u10db\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8_\u10dd\u10d7\u10ee\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8_\u10ee\u10e3\u10d7\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8_\u10de\u10d0\u10e0\u10d0\u10e1\u10d9\u10d4\u10d5\u10d8_\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8".split("_"),format:"\u10d9\u10d5\u10d8\u10e0\u10d0\u10e1_\u10dd\u10e0\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1_\u10e1\u10d0\u10db\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1_\u10dd\u10d7\u10ee\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1_\u10ee\u10e3\u10d7\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1_\u10de\u10d0\u10e0\u10d0\u10e1\u10d9\u10d4\u10d5\u10e1_\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1".split("_"),isFormat:/(\u10ec\u10d8\u10dc\u10d0|\u10e8\u10d4\u10db\u10d3\u10d4\u10d2)/},weekdaysShort:"\u10d9\u10d5\u10d8_\u10dd\u10e0\u10e8_\u10e1\u10d0\u10db_\u10dd\u10d7\u10ee_\u10ee\u10e3\u10d7_\u10de\u10d0\u10e0_\u10e8\u10d0\u10d1".split("_"),weekdaysMin:"\u10d9\u10d5_\u10dd\u10e0_\u10e1\u10d0_\u10dd\u10d7_\u10ee\u10e3_\u10de\u10d0_\u10e8\u10d0".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u10d3\u10e6\u10d4\u10e1] LT[-\u10d6\u10d4]",nextDay:"[\u10ee\u10d5\u10d0\u10da] LT[-\u10d6\u10d4]",lastDay:"[\u10d2\u10e3\u10e8\u10d8\u10dc] LT[-\u10d6\u10d4]",nextWeek:"[\u10e8\u10d4\u10db\u10d3\u10d4\u10d2] dddd LT[-\u10d6\u10d4]",lastWeek:"[\u10ec\u10d8\u10dc\u10d0] dddd LT-\u10d6\u10d4",sameElse:"L"},relativeTime:{future:function(e){return e.replace(/(\u10ec\u10d0\u10db|\u10ec\u10e3\u10d7|\u10e1\u10d0\u10d0\u10d7|\u10ec\u10d4\u10da|\u10d3\u10e6|\u10d7\u10d5)(\u10d8|\u10d4)/,(function(e,t,n){return"\u10d8"===n?t+"\u10e8\u10d8":t+n+"\u10e8\u10d8"}))},past:function(e){return/(\u10ec\u10d0\u10db\u10d8|\u10ec\u10e3\u10d7\u10d8|\u10e1\u10d0\u10d0\u10d7\u10d8|\u10d3\u10e6\u10d4|\u10d7\u10d5\u10d4)/.test(e)?e.replace(/(\u10d8|\u10d4)$/,"\u10d8\u10e1 \u10ec\u10d8\u10dc"):/\u10ec\u10d4\u10da\u10d8/.test(e)?e.replace(/\u10ec\u10d4\u10da\u10d8$/,"\u10ec\u10da\u10d8\u10e1 \u10ec\u10d8\u10dc"):e},s:"\u10e0\u10d0\u10db\u10d3\u10d4\u10dc\u10d8\u10db\u10d4 \u10ec\u10d0\u10db\u10d8",ss:"%d \u10ec\u10d0\u10db\u10d8",m:"\u10ec\u10e3\u10d7\u10d8",mm:"%d \u10ec\u10e3\u10d7\u10d8",h:"\u10e1\u10d0\u10d0\u10d7\u10d8",hh:"%d \u10e1\u10d0\u10d0\u10d7\u10d8",d:"\u10d3\u10e6\u10d4",dd:"%d \u10d3\u10e6\u10d4",M:"\u10d7\u10d5\u10d4",MM:"%d \u10d7\u10d5\u10d4",y:"\u10ec\u10d4\u10da\u10d8",yy:"%d \u10ec\u10d4\u10da\u10d8"},dayOfMonthOrdinalParse:/0|1-\u10da\u10d8|\u10db\u10d4-\d{1,2}|\d{1,2}-\u10d4/,ordinal:function(e){return 0===e?e:1===e?e+"-\u10da\u10d8":e<20||e<=100&&e%20==0||e%100==0?"\u10db\u10d4-"+e:e+"-\u10d4"},week:{dow:1,doy:7}})}(n("wd/R"))},IZUe:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("LvDl"),r=n.n(i),s=n("8Y7J");let o=(()=>{class e{constructor(e){this.elementRef=e,this.focus=!0}ngAfterViewInit(){const e=this.elementRef.nativeElement;this.focus&&r.a.isFunction(e.focus)&&e.focus()}set autofocus(e){r.a.isBoolean(e)?this.focus=e:r.a.isFunction(e)&&(this.focus=e())}}return e.\u0275fac=function(t){return new(t||e)(s.Mb(s.m))},e.\u0275dir=s.Hb({type:e,selectors:[["","autofocus",""]],inputs:{autofocus:"autofocus"}}),e})()},Iab2:function(e,t,n){var i,r;void 0===(r="function"==typeof(i=function(){"use strict";function t(e,t,n){var i=new XMLHttpRequest;i.open("GET",e),i.responseType="blob",i.onload=function(){s(i.response,t,n)},i.onerror=function(){console.error("could not download file")},i.send()}function n(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function i(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(t){var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(n)}}var r="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,s=r.saveAs||("object"!=typeof window||window!==r?function(){}:"download"in HTMLAnchorElement.prototype?function(e,s,o){var a=r.URL||r.webkitURL,c=document.createElement("a");c.download=s=s||e.name||"download",c.rel="noopener","string"==typeof e?(c.href=e,c.origin===location.origin?i(c):n(c.href)?t(e,s,o):i(c,c.target="_blank")):(c.href=a.createObjectURL(e),setTimeout((function(){a.revokeObjectURL(c.href)}),4e4),setTimeout((function(){i(c)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,r,s){if(r=r||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,s),r);else if(n(e))t(e,r,s);else{var o=document.createElement("a");o.href=e,o.target="_blank",setTimeout((function(){i(o)}))}}:function(e,n,i,s){if((s=s||open("","_blank"))&&(s.document.title=s.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,i);var o="application/octet-stream"===e.type,a=/constructor/i.test(r.HTMLElement)||r.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||o&&a)&&"object"==typeof FileReader){var l=new FileReader;l.onloadend=function(){var e=l.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),s?s.location.href=e:location=e,s=null},l.readAsDataURL(e)}else{var u=r.URL||r.webkitURL,d=u.createObjectURL(e);s?s.location=d:location.href=d,s=null,setTimeout((function(){u.revokeObjectURL(d)}),4e4)}});r.saveAs=s.saveAs=s,e.exports=s})?i.apply(t,[]):i)||(e.exports=r)},IheW:function(e,t,n){"use strict";n.d(t,"a",(function(){return C})),n.d(t,"b",(function(){return D})),n.d(t,"c",(function(){return $})),n.d(t,"d",(function(){return x})),n.d(t,"e",(function(){return m}));var i=n("8Y7J"),r=n("LRne"),s=n("HDdC"),o=n("bOdf"),a=n("pLZG"),c=n("lJxs"),l=n("SVse");class u{}class d{}class h{constructor(e){this.normalizedNames=new Map,this.lazyUpdate=null,e?this.lazyInit="string"==typeof e?()=>{this.headers=new Map,e.split("\n").forEach(e=>{const t=e.indexOf(":");if(t>0){const n=e.slice(0,t),i=n.toLowerCase(),r=e.slice(t+1).trim();this.maybeSetNormalizedName(n,i),this.headers.has(i)?this.headers.get(i).push(r):this.headers.set(i,[r])}})}:()=>{this.headers=new Map,Object.keys(e).forEach(t=>{let n=e[t];const i=t.toLowerCase();"string"==typeof n&&(n=[n]),n.length>0&&(this.headers.set(i,n),this.maybeSetNormalizedName(t,i))})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();const t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof h?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))})}clone(e){const t=new h;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof h?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){const t=e.name.toLowerCase();switch(e.op){case"a":case"s":let n=e.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(e.name,t);const i=("a"===e.op?this.headers.get(t):void 0)||[];i.push(...n),this.headers.set(t,i);break;case"d":const r=e.value;if(r){let e=this.headers.get(t);if(!e)return;e=e.filter(e=>-1===r.indexOf(e)),0===e.length?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,e)}else this.headers.delete(t),this.normalizedNames.delete(t)}}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}}class f{encodeKey(e){return p(e)}encodeValue(e){return p(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}}function p(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}class m{constructor(e={}){if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new f,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function(e,t){const n=new Map;return e.length>0&&e.split("&").forEach(e=>{const i=e.indexOf("="),[r,s]=-1==i?[t.decodeKey(e),""]:[t.decodeKey(e.slice(0,i)),t.decodeValue(e.slice(i+1))],o=n.get(r)||[];o.push(s),n.set(r,o)}),n}(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{const n=e.fromObject[t];this.map.set(t,Array.isArray(n)?n:[n])})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();const t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{const t=this.encoder.encodeKey(e);return this.map.get(e).map(e=>t+"="+this.encoder.encodeValue(e)).join("&")}).filter(e=>""!==e).join("&")}clone(e){const t=new m({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat([e]),t}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":const t=("a"===e.op?this.map.get(e.param):void 0)||[];t.push(e.value),this.map.set(e.param,t);break;case"d":if(void 0===e.value){this.map.delete(e.param);break}{let t=this.map.get(e.param)||[];const n=t.indexOf(e.value);-1!==n&&t.splice(n,1),t.length>0?this.map.set(e.param,t):this.map.delete(e.param)}}}),this.cloneFrom=this.updates=null)}}function b(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer}function g(e){return"undefined"!=typeof Blob&&e instanceof Blob}function _(e){return"undefined"!=typeof FormData&&e instanceof FormData}class y{constructor(e,t,n,i){let r;if(this.url=t,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase(),function(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||i?(this.body=void 0!==n?n:null,r=i):r=n,r&&(this.reportProgress=!!r.reportProgress,this.withCredentials=!!r.withCredentials,r.responseType&&(this.responseType=r.responseType),r.headers&&(this.headers=r.headers),r.params&&(this.params=r.params)),this.headers||(this.headers=new h),this.params){const e=this.params.toString();if(0===e.length)this.urlWithParams=t;else{const n=t.indexOf("?");this.urlWithParams=t+(-1===n?"?":n<t.length-1?"&":"")+e}}else this.params=new m,this.urlWithParams=t}serializeBody(){return null===this.body?null:b(this.body)||g(this.body)||_(this.body)||"string"==typeof this.body?this.body:this.body instanceof m?this.body.toString():"object"==typeof this.body||"boolean"==typeof this.body||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return null===this.body||_(this.body)?null:g(this.body)?this.body.type||null:b(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof m?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||Array.isArray(this.body)?"application/json":null}clone(e={}){const t=e.method||this.method,n=e.url||this.url,i=e.responseType||this.responseType,r=void 0!==e.body?e.body:this.body,s=void 0!==e.withCredentials?e.withCredentials:this.withCredentials,o=void 0!==e.reportProgress?e.reportProgress:this.reportProgress;let a=e.headers||this.headers,c=e.params||this.params;return void 0!==e.setHeaders&&(a=Object.keys(e.setHeaders).reduce((t,n)=>t.set(n,e.setHeaders[n]),a)),e.setParams&&(c=Object.keys(e.setParams).reduce((t,n)=>t.set(n,e.setParams[n]),c)),new y(t,n,r,{params:c,headers:a,reportProgress:o,responseType:i,withCredentials:s})}}var v=function(e){return e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User",e}({});class w{constructor(e,t=200,n="OK"){this.headers=e.headers||new h,this.status=void 0!==e.status?e.status:t,this.statusText=e.statusText||n,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}}class S extends w{constructor(e={}){super(e),this.type=v.ResponseHeader}clone(e={}){return new S({headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}class M extends w{constructor(e={}){super(e),this.type=v.Response,this.body=void 0!==e.body?e.body:null}clone(e={}){return new M({body:void 0!==e.body?e.body:this.body,headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}class x extends w{constructor(e){super(e,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?"Http failure during parsing for "+(e.url||"(unknown url)"):`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}}function k(e,t){return{body:t,headers:e.headers,observe:e.observe,params:e.params,reportProgress:e.reportProgress,responseType:e.responseType,withCredentials:e.withCredentials}}let D=(()=>{class e{constructor(e){this.handler=e}request(e,t,n={}){let i;if(e instanceof y)i=e;else{let r=void 0;r=n.headers instanceof h?n.headers:new h(n.headers);let s=void 0;n.params&&(s=n.params instanceof m?n.params:new m({fromObject:n.params})),i=new y(e,t,void 0!==n.body?n.body:null,{headers:r,params:s,reportProgress:n.reportProgress,responseType:n.responseType||"json",withCredentials:n.withCredentials})}const s=Object(r.a)(i).pipe(Object(o.a)(e=>this.handler.handle(e)));if(e instanceof y||"events"===n.observe)return s;const l=s.pipe(Object(a.a)(e=>e instanceof M));switch(n.observe||"body"){case"body":switch(i.responseType){case"arraybuffer":return l.pipe(Object(c.a)(e=>{if(null!==e.body&&!(e.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return e.body}));case"blob":return l.pipe(Object(c.a)(e=>{if(null!==e.body&&!(e.body instanceof Blob))throw new Error("Response is not a Blob.");return e.body}));case"text":return l.pipe(Object(c.a)(e=>{if(null!==e.body&&"string"!=typeof e.body)throw new Error("Response is not a string.");return e.body}));case"json":default:return l.pipe(Object(c.a)(e=>e.body))}case"response":return l;default:throw new Error(`Unreachable: unhandled observe type ${n.observe}}`)}}delete(e,t={}){return this.request("DELETE",e,t)}get(e,t={}){return this.request("GET",e,t)}head(e,t={}){return this.request("HEAD",e,t)}jsonp(e,t){return this.request("JSONP",e,{params:(new m).append(t,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,t={}){return this.request("OPTIONS",e,t)}patch(e,t,n={}){return this.request("PATCH",e,k(n,t))}post(e,t,n={}){return this.request("POST",e,k(n,t))}put(e,t,n={}){return this.request("PUT",e,k(n,t))}}return e.\u0275fac=function(t){return new(t||e)(i.dc(u))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})();class T{constructor(e,t){this.next=e,this.interceptor=t}handle(e){return this.interceptor.intercept(e,this.next)}}const C=new i.r("HTTP_INTERCEPTORS");let O=(()=>{class e{intercept(e,t){return t.handle(e)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})();const L=/^\)\]\}',?\n/;class R{}let E=(()=>{class e{constructor(){}build(){return new XMLHttpRequest}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})(),A=(()=>{class e{constructor(e){this.xhrFactory=e}handle(e){if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new s.a(t=>{const n=this.xhrFactory.build();if(n.open(e.method,e.urlWithParams),e.withCredentials&&(n.withCredentials=!0),e.headers.forEach((e,t)=>n.setRequestHeader(e,t.join(","))),e.headers.has("Accept")||n.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){const t=e.detectContentTypeHeader();null!==t&&n.setRequestHeader("Content-Type",t)}if(e.responseType){const t=e.responseType.toLowerCase();n.responseType="json"!==t?t:"text"}const i=e.serializeBody();let r=null;const s=()=>{if(null!==r)return r;const t=1223===n.status?204:n.status,i=n.statusText||"OK",s=new h(n.getAllResponseHeaders()),o=function(e){return"responseURL"in e&&e.responseURL?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):null}(n)||e.url;return r=new S({headers:s,status:t,statusText:i,url:o}),r},o=()=>{let{headers:i,status:r,statusText:o,url:a}=s(),c=null;204!==r&&(c=void 0===n.response?n.responseText:n.response),0===r&&(r=c?200:0);let l=r>=200&&r<300;if("json"===e.responseType&&"string"==typeof c){const e=c;c=c.replace(L,"");try{c=""!==c?JSON.parse(c):null}catch(u){c=e,l&&(l=!1,c={error:u,text:c})}}l?(t.next(new M({body:c,headers:i,status:r,statusText:o,url:a||void 0})),t.complete()):t.error(new x({error:c,headers:i,status:r,statusText:o,url:a||void 0}))},a=e=>{const{url:i}=s(),r=new x({error:e,status:n.status||0,statusText:n.statusText||"Unknown Error",url:i||void 0});t.error(r)};let c=!1;const l=i=>{c||(t.next(s()),c=!0);let r={type:v.DownloadProgress,loaded:i.loaded};i.lengthComputable&&(r.total=i.total),"text"===e.responseType&&n.responseText&&(r.partialText=n.responseText),t.next(r)},u=e=>{let n={type:v.UploadProgress,loaded:e.loaded};e.lengthComputable&&(n.total=e.total),t.next(n)};return n.addEventListener("load",o),n.addEventListener("error",a),e.reportProgress&&(n.addEventListener("progress",l),null!==i&&n.upload&&n.upload.addEventListener("progress",u)),n.send(i),t.next({type:v.Sent}),()=>{n.removeEventListener("error",a),n.removeEventListener("load",o),e.reportProgress&&(n.removeEventListener("progress",l),null!==i&&n.upload&&n.upload.removeEventListener("progress",u)),n.readyState!==n.DONE&&n.abort()}})}}return e.\u0275fac=function(t){return new(t||e)(i.dc(R))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})();const I=new i.r("XSRF_COOKIE_NAME"),P=new i.r("XSRF_HEADER_NAME");class j{}let N=(()=>{class e{constructor(e,t,n){this.doc=e,this.platform=t,this.cookieName=n,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=Object(l.M)(e,this.cookieName),this.lastCookieString=e),this.lastToken}}return e.\u0275fac=function(t){return new(t||e)(i.dc(l.d),i.dc(i.C),i.dc(I))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})(),F=(()=>{class e{constructor(e,t){this.tokenService=e,this.headerName=t}intercept(e,t){const n=e.url.toLowerCase();if("GET"===e.method||"HEAD"===e.method||n.startsWith("http://")||n.startsWith("https://"))return t.handle(e);const i=this.tokenService.getToken();return null===i||e.headers.has(this.headerName)||(e=e.clone({headers:e.headers.set(this.headerName,i)})),t.handle(e)}}return e.\u0275fac=function(t){return new(t||e)(i.dc(j),i.dc(P))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})(),Y=(()=>{class e{constructor(e,t){this.backend=e,this.injector=t,this.chain=null}handle(e){if(null===this.chain){const e=this.injector.get(C,[]);this.chain=e.reduceRight((e,t)=>new T(e,t),this.backend)}return this.chain.handle(e)}}return e.\u0275fac=function(t){return new(t||e)(i.dc(d),i.dc(i.s))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})(),z=(()=>{class e{static disable(){return{ngModule:e,providers:[{provide:F,useClass:O}]}}static withOptions(t={}){return{ngModule:e,providers:[t.cookieName?{provide:I,useValue:t.cookieName}:[],t.headerName?{provide:P,useValue:t.headerName}:[]]}}}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},providers:[F,{provide:C,useExisting:F,multi:!0},{provide:j,useClass:N},{provide:I,useValue:"XSRF-TOKEN"},{provide:P,useValue:"X-XSRF-TOKEN"}]}),e})(),$=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},providers:[D,{provide:u,useClass:Y},A,{provide:d,useExisting:A},E,{provide:R,useExisting:E}],imports:[[z.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),e})()},IjjT:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));let i=(()=>{class e{constructor(t,n=e.now){this.SchedulerAction=t,this.now=n}schedule(e,t=0,n){return new this.SchedulerAction(this,e).schedule(n,t)}}return e.now=()=>Date.now(),e})();class r extends i{constructor(e,t=i.now){super(e,()=>r.delegate&&r.delegate!==this?r.delegate.now():t()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(e,t=0,n){return r.delegate&&r.delegate!==this?r.delegate.schedule(e,t,n):super.schedule(e,t,n)}flush(e){const{actions:t}=this;if(this.active)return void t.push(e);let n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}}},ImZN:function(e,t,n){var i=n("glrk"),r=n("6VoE"),s=n("UMSQ"),o=n("A2ZE"),a=n("NaFW"),c=n("KmKo"),l=function(e,t){this.stopped=e,this.result=t};e.exports=function(e,t,n){var u,d,h,f,p,m,b,g=!(!n||!n.AS_ENTRIES),_=!(!n||!n.IS_ITERATOR),y=!(!n||!n.INTERRUPTED),v=o(t,n&&n.that,1+g+y),w=function(e){return u&&c(u),new l(!0,e)},S=function(e){return g?(i(e),y?v(e[0],e[1],w):v(e[0],e[1])):y?v(e,w):v(e)};if(_)u=e;else{if("function"!=typeof(d=a(e)))throw TypeError("Target is not iterable");if(r(d)){for(h=0,f=s(e.length);f>h;h++)if((p=S(e[h]))&&p instanceof l)return p;return new l(!1)}u=d.call(e)}for(m=u.next;!(b=m.call(u)).done;){try{p=S(b.value)}catch(M){throw c(u),M}if("object"==typeof p&&p&&p instanceof l)return p}return new l(!1)}},"Ivi+":function(e,t,n){!function(e){"use strict";e.defineLocale("ko",{months:"1\uc6d4_2\uc6d4_3\uc6d4_4\uc6d4_5\uc6d4_6\uc6d4_7\uc6d4_8\uc6d4_9\uc6d4_10\uc6d4_11\uc6d4_12\uc6d4".split("_"),monthsShort:"1\uc6d4_2\uc6d4_3\uc6d4_4\uc6d4_5\uc6d4_6\uc6d4_7\uc6d4_8\uc6d4_9\uc6d4_10\uc6d4_11\uc6d4_12\uc6d4".split("_"),weekdays:"\uc77c\uc694\uc77c_\uc6d4\uc694\uc77c_\ud654\uc694\uc77c_\uc218\uc694\uc77c_\ubaa9\uc694\uc77c_\uae08\uc694\uc77c_\ud1a0\uc694\uc77c".split("_"),weekdaysShort:"\uc77c_\uc6d4_\ud654_\uc218_\ubaa9_\uae08_\ud1a0".split("_"),weekdaysMin:"\uc77c_\uc6d4_\ud654_\uc218_\ubaa9_\uae08_\ud1a0".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY\ub144 MMMM D\uc77c",LLL:"YYYY\ub144 MMMM D\uc77c A h:mm",LLLL:"YYYY\ub144 MMMM D\uc77c dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY\ub144 MMMM D\uc77c",lll:"YYYY\ub144 MMMM D\uc77c A h:mm",llll:"YYYY\ub144 MMMM D\uc77c dddd A h:mm"},calendar:{sameDay:"\uc624\ub298 LT",nextDay:"\ub0b4\uc77c LT",nextWeek:"dddd LT",lastDay:"\uc5b4\uc81c LT",lastWeek:"\uc9c0\ub09c\uc8fc dddd LT",sameElse:"L"},relativeTime:{future:"%s \ud6c4",past:"%s \uc804",s:"\uba87 \ucd08",ss:"%d\ucd08",m:"1\ubd84",mm:"%d\ubd84",h:"\ud55c \uc2dc\uac04",hh:"%d\uc2dc\uac04",d:"\ud558\ub8e8",dd:"%d\uc77c",M:"\ud55c \ub2ec",MM:"%d\ub2ec",y:"\uc77c \ub144",yy:"%d\ub144"},dayOfMonthOrdinalParse:/\d{1,2}(\uc77c|\uc6d4|\uc8fc)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"\uc77c";case"M":return e+"\uc6d4";case"w":case"W":return e+"\uc8fc";default:return e}},meridiemParse:/\uc624\uc804|\uc624\ud6c4/,isPM:function(e){return"\uc624\ud6c4"===e},meridiem:function(e,t,n){return e<12?"\uc624\uc804":"\uc624\ud6c4"}})}(n("wd/R"))},IzCI:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("aXbf"),r=n("8Y7J");let s=(()=>{class e{constructor(e){this.formatter=e}transform(e){return this.formatter.format_number(e,1024,["B/s","kB/s","MB/s","GB/s","TB/s","PB/s","EB/s","ZB/s","YB/s"])}}return e.\u0275fac=function(t){return new(t||e)(r.Mb(i.a))},e.\u0275pipe=r.Lb({name:"dimlessBinaryPerSecond",type:e,pure:!0}),e})()},IzEk:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("7o/Q"),r=n("4I5i"),s=n("EY2u");function o(e){return t=>0===e?Object(s.b)():t.lift(new a(e))}class a{constructor(e){if(this.total=e,this.total<0)throw new r.a}call(e,t){return t.subscribe(new c(e,this.total))}}class c extends i.a{constructor(e,t){super(e),this.total=t,this.count=0}_next(e){const t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))}}},IzLi:function(e,t,n){"use strict";t.a=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},JBy8:function(e,t,n){var i=n("yoRg"),r=n("eDl+").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,r)}},"JCF/":function(e,t,n){!function(e){"use strict";var t={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},n={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"},i=["\u06a9\u0627\u0646\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645","\u0634\u0648\u0628\u0627\u062a","\u0626\u0627\u0632\u0627\u0631","\u0646\u06cc\u0633\u0627\u0646","\u0626\u0627\u06cc\u0627\u0631","\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646","\u062a\u06d5\u0645\u0645\u0648\u0632","\u0626\u0627\u0628","\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644","\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u0643\u06d5\u0645","\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645","\u0643\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645"];e.defineLocale("ku",{months:i,monthsShort:i,weekdays:"\u06cc\u0647\u200c\u0643\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u062f\u0648\u0648\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u0633\u06ce\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u0686\u0648\u0627\u0631\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u067e\u06ce\u0646\u062c\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u0647\u0647\u200c\u06cc\u0646\u06cc_\u0634\u0647\u200c\u0645\u0645\u0647\u200c".split("_"),weekdaysShort:"\u06cc\u0647\u200c\u0643\u0634\u0647\u200c\u0645_\u062f\u0648\u0648\u0634\u0647\u200c\u0645_\u0633\u06ce\u0634\u0647\u200c\u0645_\u0686\u0648\u0627\u0631\u0634\u0647\u200c\u0645_\u067e\u06ce\u0646\u062c\u0634\u0647\u200c\u0645_\u0647\u0647\u200c\u06cc\u0646\u06cc_\u0634\u0647\u200c\u0645\u0645\u0647\u200c".split("_"),weekdaysMin:"\u06cc_\u062f_\u0633_\u0686_\u067e_\u0647_\u0634".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/\u0626\u06ce\u0648\u0627\u0631\u0647\u200c|\u0628\u0647\u200c\u06cc\u0627\u0646\u06cc/,isPM:function(e){return/\u0626\u06ce\u0648\u0627\u0631\u0647\u200c/.test(e)},meridiem:function(e,t,n){return e<12?"\u0628\u0647\u200c\u06cc\u0627\u0646\u06cc":"\u0626\u06ce\u0648\u0627\u0631\u0647\u200c"},calendar:{sameDay:"[\u0626\u0647\u200c\u0645\u0631\u06c6 \u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",nextDay:"[\u0628\u0647\u200c\u06cc\u0627\u0646\u06cc \u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",nextWeek:"dddd [\u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",lastDay:"[\u062f\u0648\u06ce\u0646\u06ce \u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",lastWeek:"dddd [\u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",sameElse:"L"},relativeTime:{future:"\u0644\u0647\u200c %s",past:"%s",s:"\u0686\u0647\u200c\u0646\u062f \u0686\u0631\u0643\u0647\u200c\u06cc\u0647\u200c\u0643",ss:"\u0686\u0631\u0643\u0647\u200c %d",m:"\u06cc\u0647\u200c\u0643 \u062e\u0648\u0644\u0647\u200c\u0643",mm:"%d \u062e\u0648\u0644\u0647\u200c\u0643",h:"\u06cc\u0647\u200c\u0643 \u0643\u0627\u062a\u0698\u0645\u06ce\u0631",hh:"%d \u0643\u0627\u062a\u0698\u0645\u06ce\u0631",d:"\u06cc\u0647\u200c\u0643 \u0695\u06c6\u0698",dd:"%d \u0695\u06c6\u0698",M:"\u06cc\u0647\u200c\u0643 \u0645\u0627\u0646\u06af",MM:"%d \u0645\u0627\u0646\u06af",y:"\u06cc\u0647\u200c\u0643 \u0633\u0627\u06b5",yy:"%d \u0633\u0627\u06b5"},preparse:function(e){return e.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,(function(e){return n[e]})).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"\u060c")},week:{dow:6,doy:12}})}(n("wd/R"))},JIr8:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("zx2A");function r(e){return function(t){const n=new s(e),i=t.lift(n);return n.caught=i}}class s{constructor(e){this.selector=e}call(e,t){return t.subscribe(new o(e,this.selector,this.caught))}}class o extends i.b{constructor(e,t,n){super(e),this.selector=t,this.caught=n}error(e){if(!this.isStopped){let n;try{n=this.selector(e,this.caught)}catch(t){return void super.error(t)}this._unsubscribeAndRecycle();const r=new i.a(this);this.add(r);const s=Object(i.c)(n,r);s!==r&&this.add(s)}}}},"JK/P":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("8Y7J"),r=n("G0yt");let s=(()=>{class e{constructor(e){this.modal=e}show(e,t,n){const i=this.modal.open(e,n);return t&&Object.assign(i.componentInstance,t),i}dismissAll(){this.modal.dismissAll()}hasOpenModals(){return this.modal.hasOpenModals()}}return e.\u0275fac=function(t){return new(t||e)(i.dc(r.o))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},JP8w:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("8Y7J"),r=n("G0yt");let s=(()=>{class e{constructor(e){this.nav=e,this.localStorage=window.localStorage}ngOnInit(){const e=this.localStorage.getItem("tabset_"+this.cdStatefulTab);e&&this.nav.select(e)}onNavChange(e){this.cdStatefulTab&&e.nextId&&this.localStorage.setItem("tabset_"+this.cdStatefulTab,e.nextId)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(r.p,9))},e.\u0275dir=i.Hb({type:e,selectors:[["","cdStatefulTab",""]],hostBindings:function(e,t){1&e&&i.gc("navChange",(function(e){return t.onNavChange(e)}))},inputs:{cdStatefulTab:"cdStatefulTab"}}),e})()},JVSJ:function(e,t,n){!function(e){"use strict";function t(e,t,n){var i=e+" ";switch(n){case"ss":return i+(1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi");case"m":return t?"jedna minuta":"jedne minute";case"mm":return i+(1===e?"minuta":2===e||3===e||4===e?"minute":"minuta");case"h":return t?"jedan sat":"jednog sata";case"hh":return i+(1===e?"sat":2===e||3===e||4===e?"sata":"sati");case"dd":return i+(1===e?"dan":"dana");case"MM":return i+(1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci");case"yy":return i+(1===e?"godina":2===e||3===e||4===e?"godine":"godina")}}e.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_\u010detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._\u010det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010de_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[ju\u010der u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[pro\u0161lu] dddd [u] LT";case 6:return"[pro\u0161le] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[pro\u0161li] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n("wd/R"))},JX91:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("GyhO"),r=n("z+Ro");function s(...e){const t=e[e.length-1];return Object(r.a)(t)?(e.pop(),n=>Object(i.a)(e,n,t)):t=>Object(i.a)(e,t)}},Js68:function(e,t,n){"use strict";t.a=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},"Ju5/":function(e,t,n){"use strict";var i=n("XqMk"),r="object"==typeof self&&self&&self.Object===Object&&self,s=i.a||r||Function("return this")();t.a=s},JvlW:function(e,t,n){!function(e){"use strict";var t={ss:"sekund\u0117_sekund\u017ei\u0173_sekundes",m:"minut\u0117_minut\u0117s_minut\u0119",mm:"minut\u0117s_minu\u010di\u0173_minutes",h:"valanda_valandos_valand\u0105",hh:"valandos_valand\u0173_valandas",d:"diena_dienos_dien\u0105",dd:"dienos_dien\u0173_dienas",M:"m\u0117nuo_m\u0117nesio_m\u0117nes\u012f",MM:"m\u0117nesiai_m\u0117nesi\u0173_m\u0117nesius",y:"metai_met\u0173_metus",yy:"metai_met\u0173_metus"};function n(e,t,n,i){return t?r(n)[0]:i?r(n)[1]:r(n)[2]}function i(e){return e%10==0||e>10&&e<20}function r(e){return t[e].split("_")}function s(e,t,s,o){var a=e+" ";return 1===e?a+n(0,t,s[0],o):t?a+(i(e)?r(s)[1]:r(s)[0]):o?a+r(s)[1]:a+(i(e)?r(s)[1]:r(s)[2])}e.defineLocale("lt",{months:{format:"sausio_vasario_kovo_baland\u017eio_gegu\u017e\u0117s_bir\u017eelio_liepos_rugpj\u016b\u010dio_rugs\u0117jo_spalio_lapkri\u010dio_gruod\u017eio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegu\u017e\u0117_bir\u017eelis_liepa_rugpj\u016btis_rugs\u0117jis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadien\u012f_pirmadien\u012f_antradien\u012f_tre\u010diadien\u012f_ketvirtadien\u012f_penktadien\u012f_\u0161e\u0161tadien\u012f".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_tre\u010diadienis_ketvirtadienis_penktadienis_\u0161e\u0161tadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_\u0160e\u0161".split("_"),weekdaysMin:"S_P_A_T_K_Pn_\u0160".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[\u0160iandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Pra\u0117jus\u012f] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prie\u0161 %s",s:function(e,t,n,i){return t?"kelios sekund\u0117s":i?"keli\u0173 sekund\u017ei\u0173":"kelias sekundes"},ss:s,m:n,mm:s,h:n,hh:s,d:n,dd:s,M:n,MM:s,y:n,yy:s},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}})}(n("wd/R"))},"K/tc":function(e,t,n){!function(e){"use strict";e.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"vm":"VM":n?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[M\xf4re om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n("wd/R"))},KSF8:function(e,t,n){!function(e){"use strict";e.defineLocale("vi",{months:"th\xe1ng 1_th\xe1ng 2_th\xe1ng 3_th\xe1ng 4_th\xe1ng 5_th\xe1ng 6_th\xe1ng 7_th\xe1ng 8_th\xe1ng 9_th\xe1ng 10_th\xe1ng 11_th\xe1ng 12".split("_"),monthsShort:"Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12".split("_"),monthsParseExact:!0,weekdays:"ch\u1ee7 nh\u1eadt_th\u1ee9 hai_th\u1ee9 ba_th\u1ee9 t\u01b0_th\u1ee9 n\u0103m_th\u1ee9 s\xe1u_th\u1ee9 b\u1ea3y".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"sa":"SA":n?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [n\u0103m] YYYY",LLL:"D MMMM [n\u0103m] YYYY HH:mm",LLLL:"dddd, D MMMM [n\u0103m] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[H\xf4m nay l\xfac] LT",nextDay:"[Ng\xe0y mai l\xfac] LT",nextWeek:"dddd [tu\u1ea7n t\u1edbi l\xfac] LT",lastDay:"[H\xf4m qua l\xfac] LT",lastWeek:"dddd [tu\u1ea7n tr\u01b0\u1edbc l\xfac] LT",sameElse:"L"},relativeTime:{future:"%s t\u1edbi",past:"%s tr\u01b0\u1edbc",s:"v\xe0i gi\xe2y",ss:"%d gi\xe2y",m:"m\u1ed9t ph\xfat",mm:"%d ph\xfat",h:"m\u1ed9t gi\u1edd",hh:"%d gi\u1edd",d:"m\u1ed9t ng\xe0y",dd:"%d ng\xe0y",w:"m\u1ed9t tu\u1ea7n",ww:"%d tu\u1ea7n",M:"m\u1ed9t th\xe1ng",MM:"%d th\xe1ng",y:"m\u1ed9t n\u0103m",yy:"%d n\u0103m"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n("wd/R"))},KTz0:function(e,t,n){!function(e){"use strict";var t={words:{ss:["sekund","sekunda","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,i){var r=t.words[i];return 1===i.length?n?r[0]:r[1]:e+" "+t.correctGrammaticalCase(e,r)}};e.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_\u010detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._\u010det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010de_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[ju\u010de u] LT",lastWeek:function(){return["[pro\u0161le] [nedjelje] [u] LT","[pro\u0161log] [ponedjeljka] [u] LT","[pro\u0161log] [utorka] [u] LT","[pro\u0161le] [srijede] [u] LT","[pro\u0161log] [\u010detvrtka] [u] LT","[pro\u0161log] [petka] [u] LT","[pro\u0161le] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mjesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n("wd/R"))},KmKo:function(e,t,n){var i=n("glrk");e.exports=function(e){var t=e.return;if(void 0!==t)return i(t.call(e)).value}},Kqap:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("7o/Q");function r(e,t){let n=!1;return arguments.length>=2&&(n=!0),function(i){return i.lift(new s(e,t,n))}}class s{constructor(e,t,n=!1){this.accumulator=e,this.seed=t,this.hasSeed=n}call(e,t){return t.subscribe(new o(e,this.accumulator,this.seed,this.hasSeed))}}class o extends i.a{constructor(e,t,n,i){super(e),this.accumulator=t,this._seed=n,this.hasSeed=i,this.index=0}get seed(){return this._seed}set seed(e){this.hasSeed=!0,this._seed=e}_next(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)}_tryNext(e){const t=this.index++;let n;try{n=this.accumulator(this.seed,e,t)}catch(i){this.destination.error(i)}this.seed=n,this.destination.next(n)}}},KqfI:function(e,t,n){"use strict";function i(){}n.d(t,"a",(function(){return i}))},L3Qv:function(e,t,n){"use strict";t.a=function(){return!1}},LQDL:function(e,t,n){var i,r,s=n("2oRo"),o=n("NC/Y"),a=s.process,c=a&&a.versions,l=c&&c.v8;l?r=(i=l.split("."))[0]<4?1:i[0]+i[1]:o&&(!(i=o.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=o.match(/Chrome\/(\d+)/))&&(r=i[1]),e.exports=r&&+r},LRne:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("z+Ro"),r=n("yCtX"),s=n("jZKg");function o(...e){let t=e[e.length-1];return Object(i.a)(t)?(e.pop(),Object(s.a)(e,t)):Object(r.a)(e)}},LceX:function(e,t,n){"use strict";n.r(t),n.d(t,"AuthModule",(function(){return Qe})),n.d(t,"RoutedAuthModule",(function(){return Ze}));var i=n("SVse"),r=n("s7LF"),s=n("iInd"),o=n("G0yt"),a=n("zWsK"),c=n("sne2"),l=n("PCNd"),u=n("LvDl"),d=n.n(u),h=n("cp0P"),f=n("LRne"),p=n("5+tZ"),m=n("8Y7J"),b=n("IheW");let g=(()=>{class e{constructor(e){this.http=e}list(){return this.http.get("api/role")}delete(e){return this.http.delete("api/role/"+e)}get(e){return this.http.get("api/role/"+e)}create(e){return this.http.post("api/role",e)}clone(e,t){return this.http.post(`api/role/${e}/clone`,{new_name:t})}update(e){return this.http.put("api/role/"+e.name,e)}exists(e){return this.list().pipe(Object(p.a)(t=>{const n=t.some(t=>t.name===e);return Object(f.a)(n)}))}}return e.\u0275fac=function(t){return new(t||e)(m.dc(b.b))},e.\u0275prov=m.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),_=(()=>{class e{constructor(e){this.http=e}list(){return this.http.get("ui-api/scope")}}return e.\u0275fac=function(t){return new(t||e)(m.dc(b.b))},e.\u0275prov=m.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var y=n("mtw6"),v=n("spCT"),w=n("QFaf"),S=n("1Ni5"),M=n("9nlD"),x=function(e){return e.editing="editing",e}({});class k{}var D=n("zc8c"),T=n("NwgZ"),C=n("ocLN"),O=n("ANnk"),L=n("f69J"),R=n("IZUe"),E=n("uIqm"),A=n("6+kj"),I=n("8xTl");const P=["headerPermissionCheckboxTpl"],j=["cellScopeCheckboxTpl"],N=["cellPermissionCheckboxTpl"];function F(e,t){1&e&&(m.Sb(0,"span",27),m.Wb(1,28),m.Rb())}function Y(e,t){1&e&&(m.Sb(0,"span",27),m.Wb(1,29),m.Rb())}const z=function(e){return{required:e}};function $(e,t){if(1&e){const e=m.Tb();m.Sb(0,"div",4),m.Sb(1,"form",5,6),m.Sb(3,"div",7),m.Sb(4,"div",8),m.Wb(5,9),m.jc(6,"titlecase"),m.jc(7,"upperFirst"),m.Rb(),m.Sb(8,"div",10),m.Sb(9,"div",11),m.Sb(10,"label",12),m.Wb(11,13),m.Rb(),m.Sb(12,"div",14),m.Sb(13,"input",15),m.Yb(14,16),m.Rb(),m.Mc(15,F,2,0,"span",17),m.Mc(16,Y,2,0,"span",17),m.Rb(),m.Rb(),m.Sb(17,"div",11),m.Sb(18,"label",18),m.Wb(19,19),m.Rb(),m.Sb(20,"div",14),m.Sb(21,"input",20),m.Yb(22,21),m.Rb(),m.Rb(),m.Rb(),m.Sb(23,"div",11),m.Sb(24,"label",22),m.Wb(25,23),m.Rb(),m.Sb(26,"div",14),m.Nb(27,"cd-table",24),m.Rb(),m.Rb(),m.Rb(),m.Sb(28,"div",25),m.Sb(29,"cd-form-button-panel",26),m.gc("submitActionEvent",(function(){return m.Dc(e),m.ic().submit()})),m.jc(30,"titlecase"),m.jc(31,"upperFirst"),m.Rb(),m.Rb(),m.Rb(),m.Rb(),m.Rb()}if(2&e){const e=m.Ac(2),t=m.ic();m.yb(1),m.pc("formGroup",t.roleForm),m.yb(6),m.ac(m.kc(6,15,t.action))(m.kc(7,17,t.resource)),m.Xb(5),m.yb(3),m.pc("ngClass",m.uc(23,z,t.mode!==t.roleFormMode.editing)),m.yb(5),m.pc("ngIf",t.roleForm.showError("name",e,"required")),m.yb(1),m.pc("ngIf",t.roleForm.showError("name",e,"notUnique")),m.yb(11),m.pc("data",t.scopes_permissions)("columns",t.columns)("toolHeader",!1)("autoReload",!1)("autoSave",!1)("footer",!1)("limit",0),m.yb(2),m.pc("form",t.roleForm)("submitText",m.kc(30,19,t.action)+" "+m.kc(31,21,t.resource))}}function H(e,t){if(1&e){const e=m.Tb();m.Sb(0,"div",30),m.Sb(1,"input",31),m.gc("change",(function(n){m.Dc(e);const i=t.row,r=t.column;return m.ic().onClickCellCheckbox(i.scope,r.prop,n)})),m.Rb(),m.Sb(2,"label",32),m.Oc(3),m.Rb(),m.Rb()}if(2&e){const e=t.row,n=t.value,i=m.ic();m.yb(1),m.rc("id","scope_",e.scope,""),m.pc("checked",i.isRowChecked(e.scope)),m.yb(1),m.rc("for","scope_",e.scope,""),m.yb(1),m.Pc(n)}}function W(e,t){if(1&e){const e=m.Tb();m.Sb(0,"div",30),m.Sb(1,"input",33),m.gc("change",(function(n){m.Dc(e);const i=t.row,r=t.column;return m.ic().onClickCellCheckbox(i.scope,r.prop,n)})),m.Rb(),m.Nb(2,"label",34),m.Rb()}if(2&e){const e=t.column,n=t.row,i=t.value;m.yb(1),m.pc("checked",i)("id",n.scope+"-"+e.prop),m.yb(1),m.pc("for",n.scope+"-"+e.prop)}}function V(e,t){if(1&e){const e=m.Tb();m.Sb(0,"div",30),m.Sb(1,"input",31),m.gc("change",(function(n){m.Dc(e);const i=t.column;return m.ic().onClickHeaderCheckbox(i.prop,n)})),m.Rb(),m.Sb(2,"label",35),m.Oc(3),m.Rb(),m.Rb()}if(2&e){const e=t.column,n=m.ic();m.yb(1),m.rc("id","header_",e.prop,""),m.pc("checked",n.isHeaderChecked(e.prop)),m.yb(1),m.rc("for","header_",e.prop,""),m.yb(1),m.Pc(e.name)}}let B=(()=>{class e extends v.a{constructor(e,t,n,i,r,s){super(),this.route=e,this.router=t,this.roleService=n,this.scopeService=i,this.notificationService=r,this.actionLabels=s,this.scopes=[],this.scopes_permissions=[],this.roleFormMode=x,this.resource="role",this.createForm(),this.listenToChanges()}createForm(){this.roleForm=new w.a({name:new r.h("",{validators:[r.A.required],asyncValidators:[S.a.unique(this.roleService.exists,this.roleService)]}),description:new r.h(""),scopes_permissions:new r.h({})})}ngOnInit(){this.columns=[{prop:"scope",name:"All",flexGrow:2,cellTemplate:this.cellScopeCheckboxTpl,headerTemplate:this.headerPermissionCheckboxTpl},{prop:"read",name:"Read",flexGrow:1,cellClass:"text-center",cellTemplate:this.cellPermissionCheckboxTpl,headerTemplate:this.headerPermissionCheckboxTpl},{prop:"create",name:"Create",flexGrow:1,cellClass:"text-center",cellTemplate:this.cellPermissionCheckboxTpl,headerTemplate:this.headerPermissionCheckboxTpl},{prop:"update",name:"Update",flexGrow:1,cellClass:"text-center",cellTemplate:this.cellPermissionCheckboxTpl,headerTemplate:this.headerPermissionCheckboxTpl},{prop:"delete",name:"Delete",flexGrow:1,cellClass:"text-center",cellTemplate:this.cellPermissionCheckboxTpl,headerTemplate:this.headerPermissionCheckboxTpl}],this.router.url.startsWith("/user-management/roles/edit")?(this.mode=this.roleFormMode.editing,this.action=this.actionLabels.EDIT):this.action=this.actionLabels.CREATE,this.mode===this.roleFormMode.editing?this.initEdit():this.initCreate()}initCreate(){this.scopeService.list().subscribe(e=>{this.scopes=e,this.roleForm.get("scopes_permissions").setValue({}),this.loadingReady()})}initEdit(){this.roleForm.get("name").disable(),this.route.params.subscribe(e=>{const t=[];t.push(this.scopeService.list()),t.push(this.roleService.get(e.name)),Object(h.a)(t).subscribe(e=>{this.scopes=e[0],["name","description","scopes_permissions"].forEach(t=>this.roleForm.get(t).setValue(e[1][t])),this.loadingReady()})})}listenToChanges(){this.roleForm.get("scopes_permissions").valueChanges.subscribe(e=>{const t=[];d.a.each(this.scopes,n=>{const i={read:!1,create:!1,update:!1,delete:!1};i.scope=n,n in e&&d.a.each(e[n],e=>{i[e]=!0}),t.push(i)}),this.scopes_permissions=t})}isRowChecked(e){const t=d.a.find(this.scopes_permissions,t=>t.scope===e);return!d.a.isUndefined(t)&&t.read&&t.create&&t.update&&t.delete}isHeaderChecked(e){let t=[e];return"scope"===e&&(t=["read","create","update","delete"]),t.every(e=>this.scopes_permissions.every(t=>t[e]))}onClickCellCheckbox(e,t,n=null){const i=d.a.cloneDeep(this.roleForm.getValue("scopes_permissions"));let r=[t];"scope"===t&&(r=["read","create","update","delete"]),e in i||(i[e]=[]),n&&n.target.checked||!d.a.isEqual(r.sort(),d.a.intersection(i[e],r).sort())?i[e]=d.a.union(i[e],r):(i[e]=d.a.difference(i[e],r),d.a.isEmpty(i[e])&&d.a.unset(i,e)),this.roleForm.get("scopes_permissions").setValue(i)}onClickHeaderCheckbox(e,t){const n=d.a.cloneDeep(this.roleForm.getValue("scopes_permissions"));let i=[e];"scope"===e&&(i=["read","create","update","delete"]),d.a.each(i,e=>{d.a.each(this.scopes,i=>{t.target.checked?n[i]=d.a.union(n[i],[e]):(n[i]=d.a.difference(n[i],[e]),d.a.isEmpty(n[i])&&d.a.unset(n,i))})}),this.roleForm.get("scopes_permissions").setValue(n)}getRequest(){const e=new k;return["name","description","scopes_permissions"].forEach(t=>e[t]=this.roleForm.get(t).value),e}createAction(){const e=this.getRequest();this.roleService.create(e).subscribe(()=>{this.notificationService.show(y.a.success,"Created role '" + e.name + "'"),this.router.navigate(["/user-management/roles"])},()=>{this.roleForm.setErrors({cdSubmitButton:!0})})}editAction(){const e=this.getRequest();this.roleService.update(e).subscribe(()=>{this.notificationService.show(y.a.success,"Updated role '" + e.name + "'"),this.router.navigate(["/user-management/roles"])},()=>{this.roleForm.setErrors({cdSubmitButton:!0})})}submit(){this.mode===this.roleFormMode.editing?this.editAction():this.createAction()}}return e.\u0275fac=function(t){return new(t||e)(m.Mb(s.a),m.Mb(s.e),m.Mb(g),m.Mb(_),m.Mb(M.a),m.Mb(c.b))},e.\u0275cmp=m.Gb({type:e,selectors:[["cd-role-form"]],viewQuery:function(e,t){var n;1&e&&(m.Jc(P,!0),m.Jc(j,!0),m.Jc(N,!0)),2&e&&(m.zc(n=m.hc())&&(t.headerPermissionCheckboxTpl=n.first),m.zc(n=m.hc())&&(t.cellScopeCheckboxTpl=n.first),m.zc(n=m.hc())&&(t.cellPermissionCheckboxTpl=n.first))},features:[m.vb],decls:7,vars:1,consts:function(){return[["class","cd-col-form",4,"cdFormLoading"],["cellScopeCheckboxTpl",""],["cellPermissionCheckboxTpl",""],["headerPermissionCheckboxTpl",""],[1,"cd-col-form"],["name","roleForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"card"],[1,"card-header"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"card-body"],[1,"form-group","row"],["for","name",1,"cd-col-form-label",3,"ngClass"],"Name",[1,"cd-col-form-input"],["type","text","id","name","name","name","formControlName","name","autofocus","",1,"form-control",6,"placeholder"],["placeholder","Name..."],["class","invalid-feedback",4,"ngIf"],["for","description",1,"cd-col-form-label"],"Description",["type","text","id","description","name","description","formControlName","description",1,"form-control",6,"placeholder"],["placeholder","Description..."],[1,"cd-col-form-label"],"Permissions",["columnMode","flex",3,"data","columns","toolHeader","autoReload","autoSave","footer","limit"],[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required.","The chosen name is already in use.",[1,"custom-control","custom-checkbox"],["type","checkbox",1,"custom-control-input",3,"id","checked","change"],[1,"datatable-permissions-scope-cell-label","custom-control-label",3,"for"],["type","checkbox",1,"custom-control-input",3,"checked","id","change"],[1,"custom-control-label",3,"for"],[1,"datatable-permissions-header-cell-label","custom-control-label",3,"for"]]},template:function(e,t){1&e&&(m.Mc(0,$,32,25,"div",0),m.Mc(1,H,4,4,"ng-template",null,1,m.Nc),m.Mc(3,W,3,3,"ng-template",null,2,m.Nc),m.Mc(5,V,4,4,"ng-template",null,3,m.Nc)),2&e&&m.pc("cdFormLoading",t.loading)},directives:[D.a,r.C,r.r,r.k,T.a,C.a,i.p,O.a,r.d,L.a,r.q,r.i,R.a,i.r,E.a,A.a],pipes:[i.A,I.a],styles:[".datatable-permissions-header-cell-label[_ngcontent-%COMP%], .datatable-permissions-scope-cell-label[_ngcontent-%COMP%]{font-weight:700}"]}),e})();var U=n("+fVR"),q=n("0+/T"),G=n("Rf2I"),J=n("x38r"),Q=n("oxzT"),K=n("vCyI"),Z=n("nSDx"),X=n("aexS"),ee=n("JK/P"),te=n("EgGo");let ne=(()=>{class e{constructor(e){this.router=e}}return e.\u0275fac=function(t){return new(t||e)(m.Mb(s.e))},e.\u0275cmp=m.Gb({type:e,selectors:[["cd-user-tabs"]],decls:8,vars:1,consts:function(){return[["ngbNav","",1,"nav-tabs",3,"activeId","navChange"],["nav","ngbNav"],["ngbNavItem","/user-management/users"],["ngbNavLink",""],"Users",["ngbNavItem","/user-management/roles"],"Roles"]},template:function(e,t){1&e&&(m.Sb(0,"ul",0,1),m.gc("navChange",(function(e){return t.router.navigate([e.nextId])})),m.Sb(2,"li",2),m.Sb(3,"a",3),m.Wb(4,4),m.Rb(),m.Rb(),m.Sb(5,"li",5),m.Sb(6,"a",3),m.Wb(7,6),m.Rb(),m.Rb(),m.Rb()),2&e&&m.pc("activeId",t.router.url)},directives:[o.p,o.r,o.s],styles:[""]}),e})();var ie=n("S7zO");function re(e,t){if(1&e&&(m.Qb(0),m.Nb(1,"cd-table",1),m.Pb()),2&e){const e=m.ic();m.yb(1),m.pc("data",e.scopes_permissions)("columns",e.columns)("toolHeader",!1)("autoReload",!1)("autoSave",!1)("footer",!1)("limit",0)}}let se=(()=>{class e{constructor(){this.scopes_permissions=[]}ngOnInit(){this.columns=[{prop:"scope",name:"Scope",flexGrow:2},{prop:"read",name:"Read",flexGrow:1,cellClass:"text-center",cellTransformation:J.a.checkIcon},{prop:"create",name:"Create",flexGrow:1,cellClass:"text-center",cellTransformation:J.a.checkIcon},{prop:"update",name:"Update",flexGrow:1,cellClass:"text-center",cellTransformation:J.a.checkIcon},{prop:"delete",name:"Delete",flexGrow:1,cellClass:"text-center",cellTransformation:J.a.checkIcon}]}ngOnChanges(){if(this.selection){this.selectedItem=this.selection;const e=[];d.a.each(this.scopes,t=>{const n={read:!1,create:!1,update:!1,delete:!1};n.scope=t,t in this.selectedItem.scopes_permissions&&d.a.each(this.selectedItem.scopes_permissions[t],e=>{n[e]=!0}),e.push(n)}),this.scopes_permissions=e}}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=m.Gb({type:e,selectors:[["cd-role-details"]],inputs:{selection:"selection",scopes:"scopes"},features:[m.wb],decls:1,vars:1,consts:[[4,"ngIf"],["columnMode","flex",3,"data","columns","toolHeader","autoReload","autoSave","footer","limit"]],template:function(e,t){1&e&&m.Mc(0,re,2,7,"ng-container",0),2&e&&m.pc("ngIf",t.selection)},directives:[i.r,E.a],styles:[".fa[_ngcontent-%COMP%]{font-size:large}.fa.fa-square-o[_ngcontent-%COMP%]{color:#ced4da}"]}),e})(),oe=(()=>{class e extends U.a{constructor(e,t,n,i,r,s,o,a){super(),this.roleService=e,this.scopeService=t,this.emptyPipe=n,this.authStorageService=i,this.modalService=r,this.notificationService=s,this.urlBuilder=o,this.actionLabels=a,this.selection=new K.a,this.permission=this.authStorageService.getPermissions().user,this.tableActions=[{permission:"create",icon:Q.a.add,routerLink:()=>this.urlBuilder.getCreate(),name:this.actionLabels.CREATE},{permission:"create",icon:Q.a.clone,name:this.actionLabels.CLONE,disable:()=>!this.selection.hasSingleSelection,click:()=>this.cloneRole()},{permission:"update",icon:Q.a.edit,disable:()=>!this.selection.hasSingleSelection||this.selection.first().system,routerLink:()=>this.selection.first()&&this.urlBuilder.getEdit(this.selection.first().name),name:this.actionLabels.EDIT},{permission:"delete",icon:Q.a.destroy,disable:()=>!this.selection.hasSingleSelection||this.selection.first().system,click:()=>this.deleteRoleModal(),name:this.actionLabels.DELETE}]}ngOnInit(){this.columns=[{name:"Name",prop:"name",flexGrow:3},{name:"Description",prop:"description",flexGrow:5,pipe:this.emptyPipe},{name:"System Role",prop:"system",cellClass:"text-center",flexGrow:1,cellTransformation:J.a.checkIcon}]}getRoles(){Object(h.a)([this.roleService.list(),this.scopeService.list()]).subscribe(e=>{this.roles=e[0],this.scopes=e[1]})}updateSelection(e){this.selection=e}deleteRole(e){this.roleService.delete(e).subscribe(()=>{this.getRoles(),this.modalRef.close(),this.notificationService.show(y.a.success,"Deleted role '" + e + "'")},()=>{this.modalRef.componentInstance.stopLoadingSpinner()})}deleteRoleModal(){const e=this.selection.first().name;this.modalRef=this.modalService.show(q.a,{itemDescription:"Role",itemNames:[e],submitAction:()=>this.deleteRole(e)})}cloneRole(){const e=this.selection.first().name;this.modalRef=this.modalService.show(G.a,{fields:[{type:"text",name:"newName",value:e+"_clone",label:"New name",required:!0}],titleText:"Clone Role",submitButtonText:"Clone Role",onSubmit:t=>{this.roleService.clone(e,t.newName).subscribe(()=>{this.getRoles(),this.notificationService.show(y.a.success,"Cloned role '" + t.newName + "' from '" + e + "'")})}})}}return e.\u0275fac=function(t){return new(t||e)(m.Mb(g),m.Mb(_),m.Mb(Z.a),m.Mb(X.a),m.Mb(ee.a),m.Mb(M.a),m.Mb(te.a),m.Mb(c.b))},e.\u0275cmp=m.Gb({type:e,selectors:[["cd-role-list"]],features:[m.xb([{provide:te.a,useValue:new te.a("user-management/roles")}]),m.vb],decls:4,vars:8,consts:[["columnMode","flex","identifier","name","selectionType","single",3,"data","columns","hasDetails","setExpandedRow","fetchData","updateSelection"],[1,"table-actions",3,"permission","selection","tableActions"],["cdTableDetail","",3,"selection","scopes"]],template:function(e,t){1&e&&(m.Nb(0,"cd-user-tabs"),m.Sb(1,"cd-table",0),m.gc("setExpandedRow",(function(e){return t.setExpandedRow(e)}))("fetchData",(function(){return t.getRoles()}))("updateSelection",(function(e){return t.updateSelection(e)})),m.Nb(2,"cd-table-actions",1),m.Nb(3,"cd-role-details",2),m.Rb()),2&e&&(m.yb(1),m.pc("data",t.roles)("columns",t.columns)("hasDetails",!0),m.yb(1),m.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions),m.yb(1),m.pc("selection",t.expandedRow)("scopes",t.scopes))},directives:[ne,E.a,ie.a,se],styles:[""]}),e})();var ae=n("wd/R"),ce=n.n(ae),le=n("DSvg"),ue=n("20UP"),de=n("Mxhz"),he=n("OLbh"),fe=n("DNAf"),pe=n("2EZI"),me=n("oMSZ"),be=n("1nQr"),ge=function(e){return e.editing="editing",e}({});class _e{}var ye=n("D4zM"),ve=n("p4Cf"),we=n("ppaS"),Se=n("MAOJ");const Me=["removeSelfUserReadUpdatePermissionTpl"];function xe(e,t){1&e&&(m.Sb(0,"span",28),m.Wb(1,29),m.Rb())}function ke(e,t){1&e&&(m.Sb(0,"span",28),m.Wb(1,30),m.Rb())}function De(e,t){if(1&e&&m.Nb(0,"cd-helper",40),2&e){const e=m.ic(3);m.qc("html",e.passwordPolicyHelpText)}}function Te(e,t){1&e&&(m.Sb(0,"span",28),m.Wb(1,41),m.Rb())}function Ce(e,t){if(1&e&&(m.Sb(0,"span",28),m.Oc(1),m.Rb()),2&e){const e=m.ic(3);m.yb(1),m.Qc(" ",e.passwordValuation," ")}}function Oe(e,t){if(1&e&&(m.Sb(0,"div",10),m.Sb(1,"label",31),m.Qb(2),m.Wb(3,32),m.Pb(),m.Mc(4,De,1,1,"cd-helper",33),m.Rb(),m.Sb(5,"div",13),m.Sb(6,"div",34),m.Nb(7,"input",35),m.Sb(8,"span",36),m.Nb(9,"button",37),m.Rb(),m.Rb(),m.Sb(10,"div",38),m.Nb(11,"div",39),m.Rb(),m.Mc(12,Te,2,0,"span",15),m.Mc(13,Ce,2,1,"span",15),m.Rb(),m.Rb()),2&e){m.ic();const e=m.Ac(2),t=m.ic();m.yb(4),m.pc("ngIf",t.passwordPolicyHelpText.length>0),m.yb(7),m.Ab(t.passwordStrengthLevelClass),m.qc("title",t.passwordValuation),m.yb(1),m.pc("ngIf",t.userForm.showError("password",e,"required")),m.yb(1),m.pc("ngIf",t.userForm.showError("password",e,"passwordPolicy"))}}function Le(e,t){1&e&&(m.Sb(0,"span",28),m.Wb(1,46),m.Rb())}function Re(e,t){1&e&&(m.Sb(0,"span",28),m.Wb(1,47),m.Rb())}function Ee(e,t){if(1&e&&(m.Sb(0,"div",10),m.Sb(1,"label",42),m.Wb(2,43),m.Rb(),m.Sb(3,"div",13),m.Sb(4,"div",34),m.Nb(5,"input",44),m.Sb(6,"span",36),m.Nb(7,"button",45),m.Rb(),m.Mc(8,Le,2,0,"span",15),m.Rb(),m.Mc(9,Re,2,0,"span",15),m.Rb(),m.Rb()),2&e){m.ic();const e=m.Ac(2),t=m.ic();m.yb(8),m.pc("ngIf",t.userForm.showError("confirmpassword",e,"match")),m.yb(1),m.pc("ngIf",t.userForm.showError("confirmpassword",e,"required"))}}function Ae(e,t){1&e&&(m.Sb(0,"cd-helper",55),m.Sb(1,"p"),m.Oc(2," The Dashboard setting defining the expiration interval of passwords is currently set to "),m.Sb(3,"strong"),m.Oc(4,"0"),m.Rb(),m.Oc(5,". This means if a date is set, the user password will only expire once. "),m.Rb(),m.Sb(6,"p"),m.Oc(7," Consider configuring the Dashboard setting "),m.Sb(8,"a",56),m.Oc(9,"USER_PWD_EXPIRATION_SPAN"),m.Rb(),m.Oc(10," in order to let passwords expire periodically. "),m.Rb(),m.Rb())}function Ie(e,t){1&e&&(m.Sb(0,"span",28),m.Wb(1,57),m.Rb())}const Pe=function(e){return{required:e}};function je(e,t){if(1&e){const e=m.Tb();m.Sb(0,"div",10),m.Sb(1,"label",48),m.Qb(2),m.Wb(3,49),m.Pb(),m.Mc(4,Ae,11,0,"cd-helper",50),m.Rb(),m.Sb(5,"div",13),m.Sb(6,"div",34),m.Sb(7,"input",51,52),m.Yb(9,53),m.gc("click",(function(){return m.Dc(e),m.Ac(8).open()}))("keypress",(function(){return m.Dc(e),m.Ac(8).close()})),m.Rb(),m.Sb(10,"span",36),m.Sb(11,"button",54),m.gc("click",(function(){return m.Dc(e),m.ic(2).clearExpirationDate()})),m.Nb(12,"i"),m.Rb(),m.Rb(),m.Mc(13,Ie,2,0,"span",15),m.Rb(),m.Rb(),m.Rb()}if(2&e){m.ic();const e=m.Ac(2),t=m.ic(),n=m.Ac(4);m.yb(1),m.pc("ngClass",m.uc(7,Pe,t.pwdExpirationSettings.pwdExpirationSpan>0)),m.yb(3),m.pc("ngIf",0==t.pwdExpirationSettings.pwdExpirationSpan),m.yb(3),m.pc("ngbPopover",n),m.yb(5),m.Bb("icon-prepend ",t.icons.destroy,""),m.yb(1),m.pc("ngIf",t.userForm.showError("pwdExpirationDate",e,"required"))}}function Ne(e,t){1&e&&(m.Sb(0,"span",28),m.Wb(1,58),m.Rb())}function Fe(e,t){if(1&e&&(m.Sb(0,"span",59),m.Nb(1,"cd-select-badges",60),m.Rb()),2&e){const e=m.ic(2);m.yb(1),m.pc("data",e.userForm.controls.roles.value)("options",e.allRoles)("messages",e.messages)}}function Ye(e,t){1&e&&(m.Sb(0,"div",10),m.Sb(1,"div",61),m.Sb(2,"div",62),m.Nb(3,"input",63),m.Sb(4,"label",64),m.Wb(5,65),m.Rb(),m.Rb(),m.Rb(),m.Rb())}function ze(e,t){1&e&&(m.Sb(0,"div",10),m.Sb(1,"div",61),m.Sb(2,"div",62),m.Nb(3,"input",66),m.Sb(4,"label",67),m.Wb(5,68),m.Rb(),m.Rb(),m.Rb(),m.Rb())}function $e(e,t){if(1&e){const e=m.Tb();m.Sb(0,"div",3),m.Sb(1,"form",4,5),m.Sb(3,"div",6),m.Sb(4,"div",7),m.Wb(5,8),m.jc(6,"titlecase"),m.jc(7,"upperFirst"),m.Rb(),m.Sb(8,"div",9),m.Sb(9,"div",10),m.Sb(10,"label",11),m.Wb(11,12),m.Rb(),m.Sb(12,"div",13),m.Nb(13,"input",14),m.Mc(14,xe,2,0,"span",15),m.Mc(15,ke,2,0,"span",15),m.Rb(),m.Rb(),m.Mc(16,Oe,14,7,"div",16),m.Mc(17,Ee,10,2,"div",16),m.Mc(18,je,14,9,"div",16),m.Sb(19,"div",10),m.Sb(20,"label",17),m.Wb(21,18),m.Rb(),m.Sb(22,"div",13),m.Nb(23,"input",19),m.Rb(),m.Rb(),m.Sb(24,"div",10),m.Sb(25,"label",20),m.Wb(26,21),m.Rb(),m.Sb(27,"div",13),m.Nb(28,"input",22),m.Mc(29,Ne,2,0,"span",15),m.Rb(),m.Rb(),m.Sb(30,"div",10),m.Sb(31,"label",23),m.Wb(32,24),m.Rb(),m.Sb(33,"div",13),m.Mc(34,Fe,2,3,"span",25),m.Rb(),m.Rb(),m.Mc(35,Ye,6,0,"div",16),m.Mc(36,ze,6,0,"div",16),m.Rb(),m.Sb(37,"div",26),m.Sb(38,"cd-form-button-panel",27),m.gc("submitActionEvent",(function(){return m.Dc(e),m.ic().submit()})),m.jc(39,"titlecase"),m.jc(40,"upperFirst"),m.Rb(),m.Rb(),m.Rb(),m.Rb(),m.Rb()}if(2&e){const e=m.Ac(2),t=m.ic();m.yb(1),m.pc("formGroup",t.userForm),m.yb(6),m.ac(m.kc(6,15,t.action))(m.kc(7,17,t.resource)),m.Xb(5),m.yb(3),m.pc("ngClass",m.uc(23,Pe,t.mode!==t.userFormMode.editing)),m.yb(4),m.pc("ngIf",t.userForm.showError("username",e,"required")),m.yb(1),m.pc("ngIf",t.userForm.showError("username",e,"notUnique")),m.yb(1),m.pc("ngIf",!t.authStorageService.isSSO()),m.yb(1),m.pc("ngIf",!t.authStorageService.isSSO()),m.yb(1),m.pc("ngIf",!t.authStorageService.isSSO()),m.yb(11),m.pc("ngIf",t.userForm.showError("email",e,"email")),m.yb(5),m.pc("ngIf",t.allRoles),m.yb(1),m.pc("ngIf",!t.isCurrentUser()),m.yb(1),m.pc("ngIf",!t.isCurrentUser()&&!t.authStorageService.isSSO()),m.yb(2),m.pc("form",t.userForm)("submitText",m.kc(39,19,t.action)+" "+m.kc(40,21,t.resource))}}function He(e,t){1&e&&(m.Sb(0,"p"),m.Sb(1,"strong"),m.Wb(2,69),m.Rb(),m.Rb(),m.Nb(3,"br"),m.Sb(4,"p"),m.Wb(5,70),m.Rb(),m.Qb(6),m.Wb(7,71),m.Pb())}function We(e,t){if(1&e&&m.Nb(0,"cd-date-time-picker",72),2&e){const e=m.ic();m.pc("control",e.userForm.get("pwdExpirationDate"))("hasTime",!1)}}let Ve=(()=>{class e extends v.a{constructor(e,t,n,i,r,s,o,a,c,l,u,d){super(),this.authService=e,this.authStorageService=t,this.route=n,this.router=i,this.modalService=r,this.roleService=s,this.userService=o,this.notificationService=a,this.actionLabels=c,this.passwordPolicyService=l,this.formBuilder=u,this.settingsService=d,this.userFormMode=ge,this.messages=new fe.a({empty:"There are no roles."}),this.passwordPolicyHelpText="",this.icons=Q.a,this.pwdExpirationFormat="YYYY-MM-DD",this.resource="user",this.createForm(),this.messages=new fe.a({empty:"There are no roles."})}createForm(){this.passwordPolicyService.getHelpText().subscribe(e=>{this.passwordPolicyHelpText=e}),this.userForm=this.formBuilder.group({username:["",[r.A.required],[S.a.unique(this.userService.validateUserName,this.userService)]],name:[""],password:["",[],[S.a.passwordPolicy(this.userService,()=>this.userForm.getValue("username"),(e,t,n)=>{this.passwordStrengthLevelClass=this.passwordPolicyService.mapCreditsToCssClass(t),this.passwordValuation=d.a.defaultTo(n,"")})]],confirmpassword:[""],pwdExpirationDate:[void 0],email:["",[S.a.email]],roles:[[]],enabled:[!0,[r.A.required]],pwdUpdateRequired:[!0]},{validators:[S.a.match("password","confirmpassword")]})}ngOnInit(){this.router.url.startsWith("/user-management/users/edit")?(this.mode=this.userFormMode.editing,this.action=this.actionLabels.EDIT):this.action=this.actionLabels.CREATE;const e=[this.roleService.list(),this.settingsService.getStandardSettings()];Object(h.a)(e).subscribe(e=>{if(this.allRoles=d.a.map(e[0],e=>(e.enabled=!0,e)),this.pwdExpirationSettings=new me.a(e[1]),this.mode===this.userFormMode.editing)this.initEdit();else{if(this.pwdExpirationSettings.pwdExpirationSpan>0){const e=this.userForm.get("pwdExpirationDate"),t=ce()();t.add(this.pwdExpirationSettings.pwdExpirationSpan,"day"),e.setValue(t.format(this.pwdExpirationFormat)),e.setValidators([r.A.required])}this.loadingReady()}})}initEdit(){this.disableForEdit(),this.route.params.subscribe(e=>{this.userService.get(e.username).subscribe(e=>{this.response=d.a.cloneDeep(e),this.setResponse(e),this.loadingReady()})})}disableForEdit(){this.userForm.get("username").disable()}setResponse(e){["username","name","email","roles","enabled","pwdUpdateRequired"].forEach(t=>this.userForm.get(t).setValue(e[t]));const t=e.pwdExpirationDate;t&&this.userForm.get("pwdExpirationDate").setValue(ce()(1e3*t).format(this.pwdExpirationFormat))}getRequest(){const e=new _e;["username","password","name","email","roles","enabled","pwdUpdateRequired"].forEach(t=>e[t]=this.userForm.get(t).value);const t=this.userForm.get("pwdExpirationDate").value;if(t){const n=ce()(t,this.pwdExpirationFormat);this.mode===this.userFormMode.editing&&this.response.pwdExpirationDate===n.unix()||n.set({hour:23,minute:59,second:59}),e.pwdExpirationDate=n.unix()}return e}createAction(){const e=this.getRequest();this.userService.create(e).subscribe(()=>{this.notificationService.show(y.a.success,"Created user '" + e.username + "'"),this.router.navigate(["/user-management/users"])},()=>{this.userForm.setErrors({cdSubmitButton:!0})})}editAction(){if(this.isUserRemovingNeededRolePermissions()){const e={titleText:"Update user",buttonText:"Continue",bodyTpl:this.removeSelfUserReadUpdatePermissionTpl,onSubmit:()=>{this.modalRef.close(),this.doEditAction()},onCancel:()=>{this.userForm.setErrors({cdSubmitButton:!0}),this.userForm.get("roles").reset(this.userForm.get("roles").value)}};this.modalRef=this.modalService.show(he.a,e)}else this.doEditAction()}isCurrentUser(){return this.authStorageService.getUsername()===this.userForm.getValue("username")}isUserChangingRoles(){return this.isCurrentUser()&&this.response&&!d.a.isEqual(this.response.roles,this.userForm.getValue("roles"))}isUserRemovingNeededRolePermissions(){return this.isCurrentUser()&&!this.hasUserReadUpdatePermissions(this.userForm.getValue("roles"))}hasUserReadUpdatePermissions(e=[]){for(const t of this.allRoles)if(-1!==e.indexOf(t.name)&&t.scopes_permissions.user){const e=t.scopes_permissions.user;return["read","update"].every(t=>-1!==e.indexOf(t))}return!1}doEditAction(){const e=this.getRequest();this.userService.update(e).subscribe(()=>{this.isUserChangingRoles()?this.authService.logout(()=>{this.notificationService.show(y.a.info,"You were automatically logged out because your roles have been changed.")}):(this.notificationService.show(y.a.success,"Updated user '" + e.username + "'"),this.router.navigate(["/user-management/users"]))},()=>{this.userForm.setErrors({cdSubmitButton:!0})})}clearExpirationDate(){this.userForm.get("pwdExpirationDate").setValue(void 0)}submit(){this.mode===this.userFormMode.editing?this.editAction():this.createAction()}}return e.\u0275fac=function(t){return new(t||e)(m.Mb(le.a),m.Mb(X.a),m.Mb(s.a),m.Mb(s.e),m.Mb(ee.a),m.Mb(g),m.Mb(de.a),m.Mb(M.a),m.Mb(c.b),m.Mb(be.a),m.Mb(pe.a),m.Mb(ue.a))},e.\u0275cmp=m.Gb({type:e,selectors:[["cd-user-form"]],viewQuery:function(e,t){var n;1&e&&m.Jc(Me,!0),2&e&&m.zc(n=m.hc())&&(t.removeSelfUserReadUpdatePermissionTpl=n.first)},features:[m.vb],decls:5,vars:1,consts:function(){return[["class","cd-col-form",4,"cdFormLoading"],["removeSelfUserReadUpdatePermissionTpl",""],["popContent",""],[1,"cd-col-form"],["name","userForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"card"],[1,"card-header"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"card-body"],[1,"form-group","row"],["for","username",1,"cd-col-form-label",3,"ngClass"],"Username",[1,"cd-col-form-input"],["type","text","placeholder","Username...","id","username","name","username","formControlName","username","autocomplete","off","autofocus","",1,"form-control"],["class","invalid-feedback",4,"ngIf"],["class","form-group row",4,"ngIf"],["for","name",1,"cd-col-form-label"],"Full name",["type","text","placeholder","Full name...","id","name","name","name","formControlName","name",1,"form-control"],["for","email",1,"cd-col-form-label"],"Email",["type","email","placeholder","Email...","id","email","name","email","formControlName","email",1,"form-control"],[1,"cd-col-form-label"],"Roles",["class","no-border full-height",4,"ngIf"],[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required.","The username already exists.",["for","password",1,"cd-col-form-label"],"Password",["class","text-pre-wrap",3,"html",4,"ngIf"],[1,"input-group"],["type","password","placeholder","Password...","id","password","name","password","autocomplete","new-password","formControlName","password",1,"form-control"],[1,"input-group-append"],["type","button","cdPasswordButton","password",1,"btn","btn-light"],[1,"password-strength-level"],["data-toggle","tooltip",3,"title"],[1,"text-pre-wrap",3,"html"],"This field is required.",["for","confirmpassword",1,"cd-col-form-label"],"Confirm password",["type","password","placeholder","Confirm password...","id","confirmpassword","name","confirmpassword","autocomplete","new-password","formControlName","confirmpassword",1,"form-control"],["type","button","cdPasswordButton","confirmpassword",1,"btn","btn-light"],"Password confirmation doesn't match the password.","This field is required.",["for","pwdExpirationDate",1,"cd-col-form-label",3,"ngClass"],"Password expiration date",["class","text-pre-wrap",4,"ngIf"],["id","pwdExpirationDate","name","pwdExpirationDate","formControlName","pwdExpirationDate","triggers","manual",1,"form-control",3,"ngbPopover","click","keypress",6,"placeholder"],["p","ngbPopover"],["placeholder","Password expiration date..."],["type","button",1,"btn","btn-light",3,"click"],[1,"text-pre-wrap"],["routerLink","/mgr-modules/edit/dashboard",1,"alert-link"],"This field is required.","Invalid email.",[1,"no-border","full-height"],[3,"data","options","messages"],[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["type","checkbox","id","enabled","name","enabled","formControlName","enabled",1,"custom-control-input"],["for","enabled",1,"custom-control-label"],"Enabled",["type","checkbox","id","pwdUpdateRequired","name","pwdUpdateRequired","formControlName","pwdUpdateRequired",1,"custom-control-input"],["for","pwdUpdateRequired",1,"custom-control-label"],"User must change password at next logon","You are about to remove \"user read / update\" permissions from your own user.","If you continue, you will no longer be able to add or remove roles from any user.","Are you sure you want to continue?",[3,"control","hasTime"]]},template:function(e,t){1&e&&(m.Mc(0,$e,41,25,"div",0),m.Mc(1,He,8,0,"ng-template",null,1,m.Nc),m.Mc(3,We,1,2,"ng-template",null,2,m.Nc)),2&e&&m.pc("cdFormLoading",t.loading)},directives:[D.a,r.C,r.r,r.k,T.a,C.a,i.p,O.a,r.d,L.a,r.q,r.i,R.a,i.r,A.a,ye.a,ve.a,o.w,s.h,we.a,r.b,Se.a],pipes:[i.A,I.a],styles:[""]}),e})();var Be=n("a0VL");const Ue=["userRolesTpl"];function qe(e,t){if(1&e&&(m.Sb(0,"span"),m.Oc(1),m.Rb()),2&e){const e=t.$implicit,n=t.last;m.yb(1),m.Rc(" ",e,"",n?"":", "," ")}}function Ge(e,t){1&e&&m.Mc(0,qe,2,2,"span",3),2&e&&m.pc("ngForOf",t.value)}let Je=(()=>{class e{constructor(e,t,n,i,r,s,o,a){this.userService=e,this.emptyPipe=t,this.modalService=n,this.notificationService=i,this.authStorageService=r,this.urlBuilder=s,this.cdDatePipe=o,this.actionLabels=a,this.selection=new K.a,this.permission=this.authStorageService.getPermissions().user,this.tableActions=[{permission:"create",icon:Q.a.add,routerLink:()=>this.urlBuilder.getCreate(),name:this.actionLabels.CREATE},{permission:"update",icon:Q.a.edit,routerLink:()=>this.selection.first()&&this.urlBuilder.getEdit(this.selection.first().username),name:this.actionLabels.EDIT},{permission:"delete",icon:Q.a.destroy,click:()=>this.deleteUserModal(),name:this.actionLabels.DELETE}]}ngOnInit(){this.columns=[{name:"Username",prop:"username",flexGrow:1},{name:"Name",prop:"name",flexGrow:1,pipe:this.emptyPipe},{name:"Email",prop:"email",flexGrow:1,pipe:this.emptyPipe},{name:"Roles",prop:"roles",flexGrow:1,cellTemplate:this.userRolesTpl},{name:"Enabled",prop:"enabled",flexGrow:1,cellTransformation:J.a.checkIcon},{name:"Password expiration date",prop:"pwdExpirationDate",flexGrow:1,pipe:this.cdDatePipe}]}getUsers(){this.userService.list().subscribe(e=>{e.forEach(e=>{e.pwdExpirationDate&&e.pwdExpirationDate>0&&(e.pwdExpirationDate=1e3*e.pwdExpirationDate)}),this.users=e})}updateSelection(e){this.selection=e}deleteUser(e){this.userService.delete(e).subscribe(()=>{this.getUsers(),this.modalRef.close(),this.notificationService.show(y.a.success,"Deleted user '" + e + "'")},()=>{this.modalRef.componentInstance.stopLoadingSpinner()})}deleteUserModal(){const e=this.authStorageService.getUsername(),t=this.selection.first().username;e!==t?this.modalRef=this.modalService.show(q.a,{itemDescription:"User",itemNames:[t],submitAction:()=>this.deleteUser(t)}):this.notificationService.show(y.a.error,"Failed to delete user '" + t + "'","You are currently logged in as '" + t + "'.")}}return e.\u0275fac=function(t){return new(t||e)(m.Mb(de.a),m.Mb(Z.a),m.Mb(ee.a),m.Mb(M.a),m.Mb(X.a),m.Mb(te.a),m.Mb(Be.a),m.Mb(c.b))},e.\u0275cmp=m.Gb({type:e,selectors:[["cd-user-list"]],viewQuery:function(e,t){var n;1&e&&m.Jc(Ue,!0),2&e&&m.zc(n=m.hc())&&(t.userRolesTpl=n.first)},features:[m.xb([{provide:te.a,useValue:new te.a("user-management/users")}])],decls:5,vars:5,consts:[["columnMode","flex","identifier","username","selectionType","single",3,"data","columns","fetchData","updateSelection"],[1,"table-actions",3,"permission","selection","tableActions"],["userRolesTpl",""],[4,"ngFor","ngForOf"]],template:function(e,t){1&e&&(m.Nb(0,"cd-user-tabs"),m.Sb(1,"cd-table",0),m.gc("fetchData",(function(){return t.getUsers()}))("updateSelection",(function(e){return t.updateSelection(e)})),m.Nb(2,"cd-table-actions",1),m.Rb(),m.Mc(3,Ge,1,1,"ng-template",null,2,m.Nc)),2&e&&(m.yb(1),m.pc("data",t.users)("columns",t.columns),m.yb(1),m.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions))},directives:[ne,E.a,ie.a,i.q],styles:[""]}),e})(),Qe=(()=>{class e{}return e.\u0275mod=m.Kb({type:e}),e.\u0275inj=m.Jb({factory:function(t){return new(t||e)},imports:[[i.c,r.m,r.x,l.a,o.t,o.y,a.a,s.i]]}),e})();const Ke=[{path:"",redirectTo:"users",pathMatch:"full"},{path:"users",data:{breadcrumbs:"Users"},children:[{path:"",component:Je},{path:c.e.CREATE,component:Ve,data:{breadcrumbs:c.a.CREATE}},{path:c.e.EDIT+"/:username",component:Ve,data:{breadcrumbs:c.a.EDIT}}]},{path:"roles",data:{breadcrumbs:"Roles"},children:[{path:"",component:oe},{path:c.e.CREATE,component:B,data:{breadcrumbs:c.a.CREATE}},{path:c.e.EDIT+"/:name",component:B,data:{breadcrumbs:c.a.EDIT}}]}];let Ze=(()=>{class e{}return e.\u0275mod=m.Kb({type:e}),e.\u0275inj=m.Jb({factory:function(t){return new(t||e)},imports:[[Qe,s.i.forChild(Ke)]]}),e})()},Lhse:function(e,t,n){"use strict";function i(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}n.d(t,"a",(function(){return r}));const r=i()},Loxo:function(e,t,n){!function(e){"use strict";e.defineLocale("uz",{months:"\u044f\u043d\u0432\u0430\u0440_\u0444\u0435\u0432\u0440\u0430\u043b_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0435\u043b_\u043c\u0430\u0439_\u0438\u044e\u043d_\u0438\u044e\u043b_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043d\u0442\u044f\u0431\u0440_\u043e\u043a\u0442\u044f\u0431\u0440_\u043d\u043e\u044f\u0431\u0440_\u0434\u0435\u043a\u0430\u0431\u0440".split("_"),monthsShort:"\u044f\u043d\u0432_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0439_\u0438\u044e\u043d_\u0438\u044e\u043b_\u0430\u0432\u0433_\u0441\u0435\u043d_\u043e\u043a\u0442_\u043d\u043e\u044f_\u0434\u0435\u043a".split("_"),weekdays:"\u042f\u043a\u0448\u0430\u043d\u0431\u0430_\u0414\u0443\u0448\u0430\u043d\u0431\u0430_\u0421\u0435\u0448\u0430\u043d\u0431\u0430_\u0427\u043e\u0440\u0448\u0430\u043d\u0431\u0430_\u041f\u0430\u0439\u0448\u0430\u043d\u0431\u0430_\u0416\u0443\u043c\u0430_\u0428\u0430\u043d\u0431\u0430".split("_"),weekdaysShort:"\u042f\u043a\u0448_\u0414\u0443\u0448_\u0421\u0435\u0448_\u0427\u043e\u0440_\u041f\u0430\u0439_\u0416\u0443\u043c_\u0428\u0430\u043d".split("_"),weekdaysMin:"\u042f\u043a_\u0414\u0443_\u0421\u0435_\u0427\u043e_\u041f\u0430_\u0416\u0443_\u0428\u0430".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[\u0411\u0443\u0433\u0443\u043d \u0441\u043e\u0430\u0442] LT [\u0434\u0430]",nextDay:"[\u042d\u0440\u0442\u0430\u0433\u0430] LT [\u0434\u0430]",nextWeek:"dddd [\u043a\u0443\u043d\u0438 \u0441\u043e\u0430\u0442] LT [\u0434\u0430]",lastDay:"[\u041a\u0435\u0447\u0430 \u0441\u043e\u0430\u0442] LT [\u0434\u0430]",lastWeek:"[\u0423\u0442\u0433\u0430\u043d] dddd [\u043a\u0443\u043d\u0438 \u0441\u043e\u0430\u0442] LT [\u0434\u0430]",sameElse:"L"},relativeTime:{future:"\u042f\u043a\u0438\u043d %s \u0438\u0447\u0438\u0434\u0430",past:"\u0411\u0438\u0440 \u043d\u0435\u0447\u0430 %s \u043e\u043b\u0434\u0438\u043d",s:"\u0444\u0443\u0440\u0441\u0430\u0442",ss:"%d \u0444\u0443\u0440\u0441\u0430\u0442",m:"\u0431\u0438\u0440 \u0434\u0430\u043a\u0438\u043a\u0430",mm:"%d \u0434\u0430\u043a\u0438\u043a\u0430",h:"\u0431\u0438\u0440 \u0441\u043e\u0430\u0442",hh:"%d \u0441\u043e\u0430\u0442",d:"\u0431\u0438\u0440 \u043a\u0443\u043d",dd:"%d \u043a\u0443\u043d",M:"\u0431\u0438\u0440 \u043e\u0439",MM:"%d \u043e\u0439",y:"\u0431\u0438\u0440 \u0439\u0438\u043b",yy:"%d \u0439\u0438\u043b"},week:{dow:1,doy:7}})}(n("wd/R"))},LvDl:function(e,t,n){(function(e){var i;(function(){var r,s="Expected a function",o="__lodash_hash_undefined__",a="__lodash_placeholder__",c=32,l=128,u=1/0,d=9007199254740991,h=NaN,f=4294967295,p=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",c],["partialRight",64],["rearg",256]],m="[object Arguments]",b="[object Array]",g="[object Boolean]",_="[object Date]",y="[object Error]",v="[object Function]",w="[object GeneratorFunction]",S="[object Map]",M="[object Number]",x="[object Object]",k="[object Promise]",D="[object RegExp]",T="[object Set]",C="[object String]",O="[object Symbol]",L="[object WeakMap]",R="[object ArrayBuffer]",E="[object DataView]",A="[object Float32Array]",I="[object Float64Array]",P="[object Int8Array]",j="[object Int16Array]",N="[object Int32Array]",F="[object Uint8Array]",Y="[object Uint8ClampedArray]",z="[object Uint16Array]",$="[object Uint32Array]",H=/\b__p \+= '';/g,W=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,B=/&(?:amp|lt|gt|quot|#39);/g,U=/[&<>"']/g,q=RegExp(B.source),G=RegExp(U.source),J=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,K=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),ie=/^\s+/,re=/\s/,se=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,oe=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ce=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,ue=/\\(\\)?/g,de=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,fe=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,me=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,ge=/^(?:0|[1-9]\d*)$/,_e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ye=/($^)/,ve=/['\n\r\u2028\u2029\\]/g,we="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="a-z\\xdf-\\xf6\\xf8-\\xff",Me="A-Z\\xc0-\\xd6\\xd8-\\xde",xe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ke="["+xe+"]",De="["+we+"]",Te="\\d+",Ce="["+Se+"]",Oe="[^\\ud800-\\udfff"+xe+Te+"\\u2700-\\u27bf"+Se+Me+"]",Le="\\ud83c[\\udffb-\\udfff]",Re="[^\\ud800-\\udfff]",Ee="(?:\\ud83c[\\udde6-\\uddff]){2}",Ae="[\\ud800-\\udbff][\\udc00-\\udfff]",Ie="["+Me+"]",Pe="(?:"+Ce+"|"+Oe+")",je="(?:"+Ie+"|"+Oe+")",Ne="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Fe="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Ye="(?:"+De+"|"+Le+")?",ze="[\\ufe0e\\ufe0f]?",$e=ze+Ye+"(?:\\u200d(?:"+[Re,Ee,Ae].join("|")+")"+ze+Ye+")*",He="(?:"+["[\\u2700-\\u27bf]",Ee,Ae].join("|")+")"+$e,We="(?:"+[Re+De+"?",De,Ee,Ae,"[\\ud800-\\udfff]"].join("|")+")",Ve=RegExp("['\u2019]","g"),Be=RegExp(De,"g"),Ue=RegExp(Le+"(?="+Le+")|"+We+$e,"g"),qe=RegExp([Ie+"?"+Ce+"+"+Ne+"(?="+[ke,Ie,"$"].join("|")+")",je+"+"+Fe+"(?="+[ke,Ie+Pe,"$"].join("|")+")",Ie+"?"+Pe+"+"+Ne,Ie+"+"+Fe,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Te,He].join("|"),"g"),Ge=RegExp("[\\u200d\\ud800-\\udfff"+we+"\\ufe0e\\ufe0f]"),Je=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Qe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ke=-1,Ze={};Ze[A]=Ze[I]=Ze[P]=Ze[j]=Ze[N]=Ze[F]=Ze[Y]=Ze[z]=Ze[$]=!0,Ze[m]=Ze[b]=Ze[R]=Ze[g]=Ze[E]=Ze[_]=Ze[y]=Ze[v]=Ze[S]=Ze[M]=Ze[x]=Ze[D]=Ze[T]=Ze[C]=Ze[L]=!1;var Xe={};Xe[m]=Xe[b]=Xe[R]=Xe[E]=Xe[g]=Xe[_]=Xe[A]=Xe[I]=Xe[P]=Xe[j]=Xe[N]=Xe[S]=Xe[M]=Xe[x]=Xe[D]=Xe[T]=Xe[C]=Xe[O]=Xe[F]=Xe[Y]=Xe[z]=Xe[$]=!0,Xe[y]=Xe[v]=Xe[L]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,nt=parseInt,it="object"==typeof global&&global&&global.Object===Object&&global,rt="object"==typeof self&&self&&self.Object===Object&&self,st=it||rt||Function("return this")(),ot=t&&!t.nodeType&&t,at=ot&&"object"==typeof e&&e&&!e.nodeType&&e,ct=at&&at.exports===ot,lt=ct&&it.process,ut=function(){try{return at&&at.require&&at.require("util").types||lt&<.binding&<.binding("util")}catch(e){}}(),dt=ut&&ut.isArrayBuffer,ht=ut&&ut.isDate,ft=ut&&ut.isMap,pt=ut&&ut.isRegExp,mt=ut&&ut.isSet,bt=ut&&ut.isTypedArray;function gt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function _t(e,t,n,i){for(var r=-1,s=null==e?0:e.length;++r<s;){var o=e[r];t(i,o,n(o),e)}return i}function yt(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e}function vt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function wt(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(!t(e[n],n,e))return!1;return!0}function St(e,t){for(var n=-1,i=null==e?0:e.length,r=0,s=[];++n<i;){var o=e[n];t(o,n,e)&&(s[r++]=o)}return s}function Mt(e,t){return!(null==e||!e.length)&&At(e,t,0)>-1}function xt(e,t,n){for(var i=-1,r=null==e?0:e.length;++i<r;)if(n(t,e[i]))return!0;return!1}function kt(e,t){for(var n=-1,i=null==e?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}function Dt(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}function Tt(e,t,n,i){var r=-1,s=null==e?0:e.length;for(i&&s&&(n=e[++r]);++r<s;)n=t(n,e[r],r,e);return n}function Ct(e,t,n,i){var r=null==e?0:e.length;for(i&&r&&(n=e[--r]);r--;)n=t(n,e[r],r,e);return n}function Ot(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}var Lt=Nt("length");function Rt(e,t,n){var i;return n(e,(function(e,n,r){if(t(e,n,r))return i=n,!1})),i}function Et(e,t,n,i){for(var r=e.length,s=n+(i?1:-1);i?s--:++s<r;)if(t(e[s],s,e))return s;return-1}function At(e,t,n){return t==t?function(e,t,n){for(var i=n-1,r=e.length;++i<r;)if(e[i]===t)return i;return-1}(e,t,n):Et(e,Pt,n)}function It(e,t,n,i){for(var r=n-1,s=e.length;++r<s;)if(i(e[r],t))return r;return-1}function Pt(e){return e!=e}function jt(e,t){var n=null==e?0:e.length;return n?zt(e,t)/n:h}function Nt(e){return function(t){return null==t?r:t[e]}}function Ft(e){return function(t){return null==e?r:e[t]}}function Yt(e,t,n,i,r){return r(e,(function(e,r,s){n=i?(i=!1,e):t(n,e,r,s)})),n}function zt(e,t){for(var n,i=-1,s=e.length;++i<s;){var o=t(e[i]);o!==r&&(n=n===r?o:n+o)}return n}function $t(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}function Ht(e){return e?e.slice(0,an(e)+1).replace(ie,""):e}function Wt(e){return function(t){return e(t)}}function Vt(e,t){return kt(t,(function(t){return e[t]}))}function Bt(e,t){return e.has(t)}function Ut(e,t){for(var n=-1,i=e.length;++n<i&&At(t,e[n],0)>-1;);return n}function qt(e,t){for(var n=e.length;n--&&At(t,e[n],0)>-1;);return n}function Gt(e,t){for(var n=e.length,i=0;n--;)e[n]===t&&++i;return i}var Jt=Ft({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),Qt=Ft({"&":"&","<":"<",">":">",'"':""","'":"'"});function Kt(e){return"\\"+et[e]}function Zt(e){return Ge.test(e)}function Xt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function en(e,t){return function(n){return e(t(n))}}function tn(e,t){for(var n=-1,i=e.length,r=0,s=[];++n<i;){var o=e[n];o!==t&&o!==a||(e[n]=a,s[r++]=n)}return s}function nn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function rn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function sn(e){return Zt(e)?function(e){for(var t=Ue.lastIndex=0;Ue.test(e);)++t;return t}(e):Lt(e)}function on(e){return Zt(e)?function(e){return e.match(Ue)||[]}(e):function(e){return e.split("")}(e)}function an(e){for(var t=e.length;t--&&re.test(e.charAt(t)););return t}var cn=Ft({"&":"&","<":"<",">":">",""":'"',"'":"'"}),ln=function e(t){var n,i=(t=null==t?st:ln.defaults(st.Object(),t,ln.pick(st,Qe))).Array,re=t.Date,we=t.Error,Se=t.Function,Me=t.Math,xe=t.Object,ke=t.RegExp,De=t.String,Te=t.TypeError,Ce=i.prototype,Oe=xe.prototype,Le=t["__core-js_shared__"],Re=Se.prototype.toString,Ee=Oe.hasOwnProperty,Ae=0,Ie=(n=/[^.]+$/.exec(Le&&Le.keys&&Le.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Pe=Oe.toString,je=Re.call(xe),Ne=st._,Fe=ke("^"+Re.call(Ee).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ye=ct?t.Buffer:r,ze=t.Symbol,$e=t.Uint8Array,He=Ye?Ye.allocUnsafe:r,We=en(xe.getPrototypeOf,xe),Ue=xe.create,Ge=Oe.propertyIsEnumerable,et=Ce.splice,it=ze?ze.isConcatSpreadable:r,rt=ze?ze.iterator:r,ot=ze?ze.toStringTag:r,at=function(){try{var e=cs(xe,"defineProperty");return e({},"",{}),e}catch(t){}}(),lt=t.clearTimeout!==st.clearTimeout&&t.clearTimeout,ut=re&&re.now!==st.Date.now&&re.now,Lt=t.setTimeout!==st.setTimeout&&t.setTimeout,Ft=Me.ceil,un=Me.floor,dn=xe.getOwnPropertySymbols,hn=Ye?Ye.isBuffer:r,fn=t.isFinite,pn=Ce.join,mn=en(xe.keys,xe),bn=Me.max,gn=Me.min,_n=re.now,yn=t.parseInt,vn=Me.random,wn=Ce.reverse,Sn=cs(t,"DataView"),Mn=cs(t,"Map"),xn=cs(t,"Promise"),kn=cs(t,"Set"),Dn=cs(t,"WeakMap"),Tn=cs(xe,"create"),Cn=Dn&&new Dn,On={},Ln=Ns(Sn),Rn=Ns(Mn),En=Ns(xn),An=Ns(kn),In=Ns(Dn),Pn=ze?ze.prototype:r,jn=Pn?Pn.valueOf:r,Nn=Pn?Pn.toString:r;function Fn(e){if(ta(e)&&!Vo(e)&&!(e instanceof Hn)){if(e instanceof $n)return e;if(Ee.call(e,"__wrapped__"))return Fs(e)}return new $n(e)}var Yn=function(){function e(){}return function(t){if(!ea(t))return{};if(Ue)return Ue(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function zn(){}function $n(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}function Hn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Bn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Un(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Bn;++t<n;)this.add(e[t])}function qn(e){var t=this.__data__=new Vn(e);this.size=t.size}function Gn(e,t){var n=Vo(e),i=!n&&Wo(e),r=!n&&!i&&Go(e),s=!n&&!i&&!r&&la(e),o=n||i||r||s,a=o?$t(e.length,De):[],c=a.length;for(var l in e)!t&&!Ee.call(e,l)||o&&("length"==l||r&&("offset"==l||"parent"==l)||s&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||ms(l,c))||a.push(l);return a}function Jn(e){var t=e.length;return t?e[Bi(0,t-1)]:r}function Qn(e,t){return Es(Dr(e),si(t,0,e.length))}function Kn(e){return Es(Dr(e))}function Zn(e,t,n){(n!==r&&!zo(e[t],n)||n===r&&!(t in e))&&ii(e,t,n)}function Xn(e,t,n){var i=e[t];Ee.call(e,t)&&zo(i,n)&&(n!==r||t in e)||ii(e,t,n)}function ei(e,t){for(var n=e.length;n--;)if(zo(e[n][0],t))return n;return-1}function ti(e,t,n,i){return ui(e,(function(e,r,s){t(i,e,n(e),s)})),i}function ni(e,t){return e&&Tr(t,Ra(t),e)}function ii(e,t,n){"__proto__"==t&&at?at(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ri(e,t){for(var n=-1,s=t.length,o=i(s),a=null==e;++n<s;)o[n]=a?r:Da(e,t[n]);return o}function si(e,t,n){return e==e&&(n!==r&&(e=e<=n?e:n),t!==r&&(e=e>=t?e:t)),e}function oi(e,t,n,i,s,o){var a,c=1&t,l=2&t,u=4&t;if(n&&(a=s?n(e,i,s,o):n(e)),a!==r)return a;if(!ea(e))return e;var d=Vo(e);if(d){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ee.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!c)return Dr(e,a)}else{var h=ds(e),f=h==v||h==w;if(Go(e))return vr(e,c);if(h==x||h==m||f&&!s){if(a=l||f?{}:fs(e),!c)return l?function(e,t){return Tr(e,us(e),t)}(e,function(e,t){return e&&Tr(t,Ea(t),e)}(a,e)):function(e,t){return Tr(e,ls(e),t)}(e,ni(a,e))}else{if(!Xe[h])return s?e:{};a=function(e,t,n){var i=e.constructor;switch(t){case R:return wr(e);case g:case _:return new i(+e);case E:return function(e,t){var n=t?wr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case A:case I:case P:case j:case N:case F:case Y:case z:case $:return Sr(e,n);case S:return new i;case M:case C:return new i(e);case D:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case T:return new i;case O:return jn?xe(jn.call(e)):{}}}(e,h,c)}}o||(o=new qn);var p=o.get(e);if(p)return p;o.set(e,a),oa(e)?e.forEach((function(i){a.add(oi(i,t,n,i,e,o))})):na(e)&&e.forEach((function(i,r){a.set(r,oi(i,t,n,r,e,o))}));var b=d?r:(u?l?ts:es:l?Ea:Ra)(e);return yt(b||e,(function(i,r){b&&(i=e[r=i]),Xn(a,r,oi(i,t,n,r,e,o))})),a}function ai(e,t,n){var i=n.length;if(null==e)return!i;for(e=xe(e);i--;){var s=n[i],o=e[s];if(o===r&&!(s in e)||!(0,t[s])(o))return!1}return!0}function ci(e,t,n){if("function"!=typeof e)throw new Te(s);return Cs((function(){e.apply(r,n)}),t)}function li(e,t,n,i){var r=-1,s=Mt,o=!0,a=e.length,c=[],l=t.length;if(!a)return c;n&&(t=kt(t,Wt(n))),i?(s=xt,o=!1):t.length>=200&&(s=Bt,o=!1,t=new Un(t));e:for(;++r<a;){var u=e[r],d=null==n?u:n(u);if(u=i||0!==u?u:0,o&&d==d){for(var h=l;h--;)if(t[h]===d)continue e;c.push(u)}else s(t,d,i)||c.push(u)}return c}Fn.templateSettings={escape:J,evaluate:Q,interpolate:K,variable:"",imports:{_:Fn}},(Fn.prototype=zn.prototype).constructor=Fn,($n.prototype=Yn(zn.prototype)).constructor=$n,(Hn.prototype=Yn(zn.prototype)).constructor=Hn,Wn.prototype.clear=function(){this.__data__=Tn?Tn(null):{},this.size=0},Wn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Wn.prototype.get=function(e){var t=this.__data__;if(Tn){var n=t[e];return n===o?r:n}return Ee.call(t,e)?t[e]:r},Wn.prototype.has=function(e){var t=this.__data__;return Tn?t[e]!==r:Ee.call(t,e)},Wn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Tn&&t===r?o:t,this},Vn.prototype.clear=function(){this.__data__=[],this.size=0},Vn.prototype.delete=function(e){var t=this.__data__,n=ei(t,e);return!(n<0||(n==t.length-1?t.pop():et.call(t,n,1),--this.size,0))},Vn.prototype.get=function(e){var t=this.__data__,n=ei(t,e);return n<0?r:t[n][1]},Vn.prototype.has=function(e){return ei(this.__data__,e)>-1},Vn.prototype.set=function(e,t){var n=this.__data__,i=ei(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},Bn.prototype.clear=function(){this.size=0,this.__data__={hash:new Wn,map:new(Mn||Vn),string:new Wn}},Bn.prototype.delete=function(e){var t=os(this,e).delete(e);return this.size-=t?1:0,t},Bn.prototype.get=function(e){return os(this,e).get(e)},Bn.prototype.has=function(e){return os(this,e).has(e)},Bn.prototype.set=function(e,t){var n=os(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},Un.prototype.add=Un.prototype.push=function(e){return this.__data__.set(e,o),this},Un.prototype.has=function(e){return this.__data__.has(e)},qn.prototype.clear=function(){this.__data__=new Vn,this.size=0},qn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},qn.prototype.get=function(e){return this.__data__.get(e)},qn.prototype.has=function(e){return this.__data__.has(e)},qn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Vn){var i=n.__data__;if(!Mn||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Bn(i)}return n.set(e,t),this.size=n.size,this};var ui=Lr(_i),di=Lr(yi,!0);function hi(e,t){var n=!0;return ui(e,(function(e,i,r){return n=!!t(e,i,r)})),n}function fi(e,t,n){for(var i=-1,s=e.length;++i<s;){var o=e[i],a=t(o);if(null!=a&&(c===r?a==a&&!ca(a):n(a,c)))var c=a,l=o}return l}function pi(e,t){var n=[];return ui(e,(function(e,i,r){t(e,i,r)&&n.push(e)})),n}function mi(e,t,n,i,r){var s=-1,o=e.length;for(n||(n=ps),r||(r=[]);++s<o;){var a=e[s];t>0&&n(a)?t>1?mi(a,t-1,n,i,r):Dt(r,a):i||(r[r.length]=a)}return r}var bi=Rr(),gi=Rr(!0);function _i(e,t){return e&&bi(e,t,Ra)}function yi(e,t){return e&&gi(e,t,Ra)}function vi(e,t){return St(t,(function(t){return Ko(e[t])}))}function wi(e,t){for(var n=0,i=(t=br(t,e)).length;null!=e&&n<i;)e=e[js(t[n++])];return n&&n==i?e:r}function Si(e,t,n){var i=t(e);return Vo(e)?i:Dt(i,n(e))}function Mi(e){return null==e?e===r?"[object Undefined]":"[object Null]":ot&&ot in xe(e)?function(e){var t=Ee.call(e,ot),n=e[ot];try{e[ot]=r;var i=!0}catch(o){}var s=Pe.call(e);return i&&(t?e[ot]=n:delete e[ot]),s}(e):function(e){return Pe.call(e)}(e)}function xi(e,t){return e>t}function ki(e,t){return null!=e&&Ee.call(e,t)}function Di(e,t){return null!=e&&t in xe(e)}function Ti(e,t,n){for(var s=n?xt:Mt,o=e[0].length,a=e.length,c=a,l=i(a),u=1/0,d=[];c--;){var h=e[c];c&&t&&(h=kt(h,Wt(t))),u=gn(h.length,u),l[c]=!n&&(t||o>=120&&h.length>=120)?new Un(c&&h):r}h=e[0];var f=-1,p=l[0];e:for(;++f<o&&d.length<u;){var m=h[f],b=t?t(m):m;if(m=n||0!==m?m:0,!(p?Bt(p,b):s(d,b,n))){for(c=a;--c;){var g=l[c];if(!(g?Bt(g,b):s(e[c],b,n)))continue e}p&&p.push(b),d.push(m)}}return d}function Ci(e,t,n){var i=null==(e=xs(e,t=br(t,e)))?e:e[js(Js(t))];return null==i?r:gt(i,e,n)}function Oi(e){return ta(e)&&Mi(e)==m}function Li(e,t,n,i,s){return e===t||(null==e||null==t||!ta(e)&&!ta(t)?e!=e&&t!=t:function(e,t,n,i,s,o){var a=Vo(e),c=Vo(t),l=a?b:ds(e),u=c?b:ds(t),d=(l=l==m?x:l)==x,h=(u=u==m?x:u)==x,f=l==u;if(f&&Go(e)){if(!Go(t))return!1;a=!0,d=!1}if(f&&!d)return o||(o=new qn),a||la(e)?Zr(e,t,n,i,s,o):function(e,t,n,i,r,s,o){switch(n){case E:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case R:return!(e.byteLength!=t.byteLength||!s(new $e(e),new $e(t)));case g:case _:case M:return zo(+e,+t);case y:return e.name==t.name&&e.message==t.message;case D:case C:return e==t+"";case S:var a=Xt;case T:if(a||(a=nn),e.size!=t.size&&!(1&i))return!1;var c=o.get(e);if(c)return c==t;i|=2,o.set(e,t);var l=Zr(a(e),a(t),i,r,s,o);return o.delete(e),l;case O:if(jn)return jn.call(e)==jn.call(t)}return!1}(e,t,l,n,i,s,o);if(!(1&n)){var p=d&&Ee.call(e,"__wrapped__"),v=h&&Ee.call(t,"__wrapped__");if(p||v){var w=p?e.value():e,k=v?t.value():t;return o||(o=new qn),s(w,k,n,i,o)}}return!!f&&(o||(o=new qn),function(e,t,n,i,s,o){var a=1&n,c=es(e),l=c.length;if(l!=es(t).length&&!a)return!1;for(var u=l;u--;){var d=c[u];if(!(a?d in t:Ee.call(t,d)))return!1}var h=o.get(e),f=o.get(t);if(h&&f)return h==t&&f==e;var p=!0;o.set(e,t),o.set(t,e);for(var m=a;++u<l;){var b=e[d=c[u]],g=t[d];if(i)var _=a?i(g,b,d,t,e,o):i(b,g,d,e,t,o);if(!(_===r?b===g||s(b,g,n,i,o):_)){p=!1;break}m||(m="constructor"==d)}if(p&&!m){var y=e.constructor,v=t.constructor;y==v||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof v&&v instanceof v||(p=!1)}return o.delete(e),o.delete(t),p}(e,t,n,i,s,o))}(e,t,n,i,Li,s))}function Ri(e,t,n,i){var s=n.length,o=s,a=!i;if(null==e)return!o;for(e=xe(e);s--;){var c=n[s];if(a&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++s<o;){var l=(c=n[s])[0],u=e[l],d=c[1];if(a&&c[2]){if(u===r&&!(l in e))return!1}else{var h=new qn;if(i)var f=i(u,d,l,e,t,h);if(!(f===r?Li(d,u,3,i,h):f))return!1}}return!0}function Ei(e){return!(!ea(e)||(t=e,Ie&&Ie in t))&&(Ko(e)?Fe:me).test(Ns(e));var t}function Ai(e){return"function"==typeof e?e:null==e?ic:"object"==typeof e?Vo(e)?Fi(e[0],e[1]):Ni(e):hc(e)}function Ii(e){if(!vs(e))return mn(e);var t=[];for(var n in xe(e))Ee.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Pi(e,t){return e<t}function ji(e,t){var n=-1,r=Uo(e)?i(e.length):[];return ui(e,(function(e,i,s){r[++n]=t(e,i,s)})),r}function Ni(e){var t=as(e);return 1==t.length&&t[0][2]?Ss(t[0][0],t[0][1]):function(n){return n===e||Ri(n,e,t)}}function Fi(e,t){return gs(e)&&ws(t)?Ss(js(e),t):function(n){var i=Da(n,e);return i===r&&i===t?Ta(n,e):Li(t,i,3)}}function Yi(e,t,n,i,s){e!==t&&bi(t,(function(o,a){if(s||(s=new qn),ea(o))!function(e,t,n,i,s,o,a){var c=Ds(e,n),l=Ds(t,n),u=a.get(l);if(u)Zn(e,n,u);else{var d=o?o(c,l,n+"",e,t,a):r,h=d===r;if(h){var f=Vo(l),p=!f&&Go(l),m=!f&&!p&&la(l);d=l,f||p||m?Vo(c)?d=c:qo(c)?d=Dr(c):p?(h=!1,d=vr(l,!0)):m?(h=!1,d=Sr(l,!0)):d=[]:ra(l)||Wo(l)?(d=c,Wo(c)?d=ga(c):ea(c)&&!Ko(c)||(d=fs(l))):h=!1}h&&(a.set(l,d),s(d,l,i,o,a),a.delete(l)),Zn(e,n,d)}}(e,t,a,n,Yi,i,s);else{var c=i?i(Ds(e,a),o,a+"",e,t,s):r;c===r&&(c=o),Zn(e,a,c)}}),Ea)}function zi(e,t){var n=e.length;if(n)return ms(t+=t<0?n:0,n)?e[t]:r}function $i(e,t,n){t=t.length?kt(t,(function(e){return Vo(e)?function(t){return wi(t,1===e.length?e[0]:e)}:e})):[ic];var i=-1;return t=kt(t,Wt(ss())),function(e,t){var i=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var i=-1,r=e.criteria,s=t.criteria,o=r.length,a=n.length;++i<o;){var c=Mr(r[i],s[i]);if(c)return i>=a?c:c*("desc"==n[i]?-1:1)}return e.index-t.index}(e,t,n)}));i--;)e[i]=e[i].value;return e}(ji(e,(function(e,n,r){return{criteria:kt(t,(function(t){return t(e)})),index:++i,value:e}})))}function Hi(e,t,n){for(var i=-1,r=t.length,s={};++i<r;){var o=t[i],a=wi(e,o);n(a,o)&&Qi(s,br(o,e),a)}return s}function Wi(e,t,n,i){var r=i?It:At,s=-1,o=t.length,a=e;for(e===t&&(t=Dr(t)),n&&(a=kt(e,Wt(n)));++s<o;)for(var c=0,l=t[s],u=n?n(l):l;(c=r(a,u,c,i))>-1;)a!==e&&et.call(a,c,1),et.call(e,c,1);return e}function Vi(e,t){for(var n=e?t.length:0,i=n-1;n--;){var r=t[n];if(n==i||r!==s){var s=r;ms(r)?et.call(e,r,1):cr(e,r)}}return e}function Bi(e,t){return e+un(vn()*(t-e+1))}function Ui(e,t){var n="";if(!e||t<1||t>d)return n;do{t%2&&(n+=e),(t=un(t/2))&&(e+=e)}while(t);return n}function qi(e,t){return Os(Ms(e,t,ic),e+"")}function Gi(e){return Jn(za(e))}function Ji(e,t){var n=za(e);return Es(n,si(t,0,n.length))}function Qi(e,t,n,i){if(!ea(e))return e;for(var s=-1,o=(t=br(t,e)).length,a=o-1,c=e;null!=c&&++s<o;){var l=js(t[s]),u=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(s!=a){var d=c[l];(u=i?i(d,l,c):r)===r&&(u=ea(d)?d:ms(t[s+1])?[]:{})}Xn(c,l,u),c=c[l]}return e}var Ki=Cn?function(e,t){return Cn.set(e,t),e}:ic,Zi=at?function(e,t){return at(e,"toString",{configurable:!0,enumerable:!1,value:ec(t),writable:!0})}:ic;function Xi(e){return Es(za(e))}function er(e,t,n){var r=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(n=n>s?s:n)<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var o=i(s);++r<s;)o[r]=e[r+t];return o}function tr(e,t){var n;return ui(e,(function(e,i,r){return!(n=t(e,i,r))})),!!n}function nr(e,t,n){var i=0,r=null==e?i:e.length;if("number"==typeof t&&t==t&&r<=2147483647){for(;i<r;){var s=i+r>>>1,o=e[s];null!==o&&!ca(o)&&(n?o<=t:o<t)?i=s+1:r=s}return r}return ir(e,t,ic,n)}function ir(e,t,n,i){var s=0,o=null==e?0:e.length;if(0===o)return 0;for(var a=(t=n(t))!=t,c=null===t,l=ca(t),u=t===r;s<o;){var d=un((s+o)/2),h=n(e[d]),f=h!==r,p=null===h,m=h==h,b=ca(h);if(a)var g=i||m;else g=u?m&&(i||f):c?m&&f&&(i||!p):l?m&&f&&!p&&(i||!b):!p&&!b&&(i?h<=t:h<t);g?s=d+1:o=d}return gn(o,4294967294)}function rr(e,t){for(var n=-1,i=e.length,r=0,s=[];++n<i;){var o=e[n],a=t?t(o):o;if(!n||!zo(a,c)){var c=a;s[r++]=0===o?0:o}}return s}function sr(e){return"number"==typeof e?e:ca(e)?h:+e}function or(e){if("string"==typeof e)return e;if(Vo(e))return kt(e,or)+"";if(ca(e))return Nn?Nn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ar(e,t,n){var i=-1,r=Mt,s=e.length,o=!0,a=[],c=a;if(n)o=!1,r=xt;else if(s>=200){var l=t?null:Ur(e);if(l)return nn(l);o=!1,r=Bt,c=new Un}else c=t?[]:a;e:for(;++i<s;){var u=e[i],d=t?t(u):u;if(u=n||0!==u?u:0,o&&d==d){for(var h=c.length;h--;)if(c[h]===d)continue e;t&&c.push(d),a.push(u)}else r(c,d,n)||(c!==a&&c.push(d),a.push(u))}return a}function cr(e,t){return null==(e=xs(e,t=br(t,e)))||delete e[js(Js(t))]}function lr(e,t,n,i){return Qi(e,t,n(wi(e,t)),i)}function ur(e,t,n,i){for(var r=e.length,s=i?r:-1;(i?s--:++s<r)&&t(e[s],s,e););return n?er(e,i?0:s,i?s+1:r):er(e,i?s+1:0,i?r:s)}function dr(e,t){var n=e;return n instanceof Hn&&(n=n.value()),Tt(t,(function(e,t){return t.func.apply(t.thisArg,Dt([e],t.args))}),n)}function hr(e,t,n){var r=e.length;if(r<2)return r?ar(e[0]):[];for(var s=-1,o=i(r);++s<r;)for(var a=e[s],c=-1;++c<r;)c!=s&&(o[s]=li(o[s]||a,e[c],t,n));return ar(mi(o,1),t,n)}function fr(e,t,n){for(var i=-1,s=e.length,o=t.length,a={};++i<s;)n(a,e[i],i<o?t[i]:r);return a}function pr(e){return qo(e)?e:[]}function mr(e){return"function"==typeof e?e:ic}function br(e,t){return Vo(e)?e:gs(e,t)?[e]:Ps(_a(e))}var gr=qi;function _r(e,t,n){var i=e.length;return n=n===r?i:n,!t&&n>=i?e:er(e,t,n)}var yr=lt||function(e){return st.clearTimeout(e)};function vr(e,t){if(t)return e.slice();var n=e.length,i=He?He(n):new e.constructor(n);return e.copy(i),i}function wr(e){var t=new e.constructor(e.byteLength);return new $e(t).set(new $e(e)),t}function Sr(e,t){var n=t?wr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Mr(e,t){if(e!==t){var n=e!==r,i=null===e,s=e==e,o=ca(e),a=t!==r,c=null===t,l=t==t,u=ca(t);if(!c&&!u&&!o&&e>t||o&&a&&l&&!c&&!u||i&&a&&l||!n&&l||!s)return 1;if(!i&&!o&&!u&&e<t||u&&n&&s&&!i&&!o||c&&n&&s||!a&&s||!l)return-1}return 0}function xr(e,t,n,r){for(var s=-1,o=e.length,a=n.length,c=-1,l=t.length,u=bn(o-a,0),d=i(l+u),h=!r;++c<l;)d[c]=t[c];for(;++s<a;)(h||s<o)&&(d[n[s]]=e[s]);for(;u--;)d[c++]=e[s++];return d}function kr(e,t,n,r){for(var s=-1,o=e.length,a=-1,c=n.length,l=-1,u=t.length,d=bn(o-c,0),h=i(d+u),f=!r;++s<d;)h[s]=e[s];for(var p=s;++l<u;)h[p+l]=t[l];for(;++a<c;)(f||s<o)&&(h[p+n[a]]=e[s++]);return h}function Dr(e,t){var n=-1,r=e.length;for(t||(t=i(r));++n<r;)t[n]=e[n];return t}function Tr(e,t,n,i){var s=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var c=t[o],l=i?i(n[c],e[c],c,n,e):r;l===r&&(l=e[c]),s?ii(n,c,l):Xn(n,c,l)}return n}function Cr(e,t){return function(n,i){var r=Vo(n)?_t:ti,s=t?t():{};return r(n,e,ss(i,2),s)}}function Or(e){return qi((function(t,n){var i=-1,s=n.length,o=s>1?n[s-1]:r,a=s>2?n[2]:r;for(o=e.length>3&&"function"==typeof o?(s--,o):r,a&&bs(n[0],n[1],a)&&(o=s<3?r:o,s=1),t=xe(t);++i<s;){var c=n[i];c&&e(t,c,i,o)}return t}))}function Lr(e,t){return function(n,i){if(null==n)return n;if(!Uo(n))return e(n,i);for(var r=n.length,s=t?r:-1,o=xe(n);(t?s--:++s<r)&&!1!==i(o[s],s,o););return n}}function Rr(e){return function(t,n,i){for(var r=-1,s=xe(t),o=i(t),a=o.length;a--;){var c=o[e?a:++r];if(!1===n(s[c],c,s))break}return t}}function Er(e){return function(t){var n=Zt(t=_a(t))?on(t):r,i=n?n[0]:t.charAt(0),s=n?_r(n,1).join(""):t.slice(1);return i[e]()+s}}function Ar(e){return function(t){return Tt(Ka(Wa(t).replace(Ve,"")),e,"")}}function Ir(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Yn(e.prototype),i=e.apply(n,t);return ea(i)?i:n}}function Pr(e){return function(t,n,i){var s=xe(t);if(!Uo(t)){var o=ss(n,3);t=Ra(t),n=function(e){return o(s[e],e,s)}}var a=e(t,n,i);return a>-1?s[o?t[a]:a]:r}}function jr(e){return Xr((function(t){var n=t.length,i=n,o=$n.prototype.thru;for(e&&t.reverse();i--;){var a=t[i];if("function"!=typeof a)throw new Te(s);if(o&&!c&&"wrapper"==is(a))var c=new $n([],!0)}for(i=c?i:n;++i<n;){var l=is(a=t[i]),u="wrapper"==l?ns(a):r;c=u&&_s(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?c[is(u[0])].apply(c,u[3]):1==a.length&&_s(a)?c[l]():c.thru(a)}return function(){var e=arguments,i=e[0];if(c&&1==e.length&&Vo(i))return c.plant(i).value();for(var r=0,s=n?t[r].apply(this,e):i;++r<n;)s=t[r].call(this,s);return s}}))}function Nr(e,t,n,s,o,a,c,u,d,h){var f=t&l,p=1&t,m=2&t,b=24&t,g=512&t,_=m?r:Ir(e);return function r(){for(var l=arguments.length,y=i(l),v=l;v--;)y[v]=arguments[v];if(b)var w=rs(r),S=Gt(y,w);if(s&&(y=xr(y,s,o,b)),a&&(y=kr(y,a,c,b)),l-=S,b&&l<h){var M=tn(y,w);return Vr(e,t,Nr,r.placeholder,n,y,M,u,d,h-l)}var x=p?n:this,k=m?x[e]:e;return l=y.length,u?y=ks(y,u):g&&l>1&&y.reverse(),f&&d<l&&(y.length=d),this&&this!==st&&this instanceof r&&(k=_||Ir(k)),k.apply(x,y)}}function Fr(e,t){return function(n,i){return function(e,t,n,i){return _i(e,(function(e,r,s){t(i,n(e),r,s)})),i}(n,e,t(i),{})}}function Yr(e,t){return function(n,i){var s;if(n===r&&i===r)return t;if(n!==r&&(s=n),i!==r){if(s===r)return i;"string"==typeof n||"string"==typeof i?(n=or(n),i=or(i)):(n=sr(n),i=sr(i)),s=e(n,i)}return s}}function zr(e){return Xr((function(t){return t=kt(t,Wt(ss())),qi((function(n){var i=this;return e(t,(function(e){return gt(e,i,n)}))}))}))}function $r(e,t){var n=(t=t===r?" ":or(t)).length;if(n<2)return n?Ui(t,e):t;var i=Ui(t,Ft(e/sn(t)));return Zt(t)?_r(on(i),0,e).join(""):i.slice(0,e)}function Hr(e){return function(t,n,s){return s&&"number"!=typeof s&&bs(t,n,s)&&(n=s=r),t=fa(t),n===r?(n=t,t=0):n=fa(n),function(e,t,n,r){for(var s=-1,o=bn(Ft((t-e)/(n||1)),0),a=i(o);o--;)a[r?o:++s]=e,e+=n;return a}(t,n,s=s===r?t<n?1:-1:fa(s),e)}}function Wr(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ba(t),n=ba(n)),e(t,n)}}function Vr(e,t,n,i,s,o,a,l,u,d){var h=8&t;t|=h?c:64,4&(t&=~(h?64:c))||(t&=-4);var f=[e,t,s,h?o:r,h?a:r,h?r:o,h?r:a,l,u,d],p=n.apply(r,f);return _s(e)&&Ts(p,f),p.placeholder=i,Ls(p,e,t)}function Br(e){var t=Me[e];return function(e,n){if(e=ba(e),(n=null==n?0:gn(pa(n),292))&&fn(e)){var i=(_a(e)+"e").split("e");return+((i=(_a(t(i[0]+"e"+(+i[1]+n)))+"e").split("e"))[0]+"e"+(+i[1]-n))}return t(e)}}var Ur=kn&&1/nn(new kn([,-0]))[1]==u?function(e){return new kn(e)}:cc;function qr(e){return function(t){var n=ds(t);return n==S?Xt(t):n==T?rn(t):function(e,t){return kt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Gr(e,t,n,o,u,d,h,f){var p=2&t;if(!p&&"function"!=typeof e)throw new Te(s);var m=o?o.length:0;if(m||(t&=-97,o=u=r),h=h===r?h:bn(pa(h),0),f=f===r?f:pa(f),m-=u?u.length:0,64&t){var b=o,g=u;o=u=r}var _=p?r:ns(e),y=[e,t,n,o,u,b,g,d,h,f];if(_&&function(e,t){var n=e[1],i=t[1],r=n|i;if(!(r<131||i==l&&8==n||i==l&&256==n&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==n))return e;1&i&&(e[2]=t[2],r|=1&n?0:4);var s=t[3];if(s){var o=e[3];e[3]=o?xr(o,s,t[4]):s,e[4]=o?tn(e[3],a):t[4]}(s=t[5])&&(e[5]=(o=e[5])?kr(o,s,t[6]):s,e[6]=o?tn(e[5],a):t[6]),(s=t[7])&&(e[7]=s),i&l&&(e[8]=null==e[8]?t[8]:gn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=r}(y,_),e=y[0],t=y[1],n=y[2],o=y[3],u=y[4],!(f=y[9]=y[9]===r?p?0:e.length:bn(y[9]-m,0))&&24&t&&(t&=-25),t&&1!=t)v=8==t||16==t?function(e,t,n){var s=Ir(e);return function o(){for(var a=arguments.length,c=i(a),l=a,u=rs(o);l--;)c[l]=arguments[l];var d=a<3&&c[0]!==u&&c[a-1]!==u?[]:tn(c,u);return(a-=d.length)<n?Vr(e,t,Nr,o.placeholder,r,c,d,r,r,n-a):gt(this&&this!==st&&this instanceof o?s:e,this,c)}}(e,t,f):t!=c&&33!=t||u.length?Nr.apply(r,y):function(e,t,n,r){var s=1&t,o=Ir(e);return function t(){for(var a=-1,c=arguments.length,l=-1,u=r.length,d=i(u+c),h=this&&this!==st&&this instanceof t?o:e;++l<u;)d[l]=r[l];for(;c--;)d[l++]=arguments[++a];return gt(h,s?n:this,d)}}(e,t,n,o);else var v=function(e,t,n){var i=1&t,r=Ir(e);return function t(){return(this&&this!==st&&this instanceof t?r:e).apply(i?n:this,arguments)}}(e,t,n);return Ls((_?Ki:Ts)(v,y),e,t)}function Jr(e,t,n,i){return e===r||zo(e,Oe[n])&&!Ee.call(i,n)?t:e}function Qr(e,t,n,i,s,o){return ea(e)&&ea(t)&&(o.set(t,e),Yi(e,t,r,Qr,o),o.delete(t)),e}function Kr(e){return ra(e)?r:e}function Zr(e,t,n,i,s,o){var a=1&n,c=e.length,l=t.length;if(c!=l&&!(a&&l>c))return!1;var u=o.get(e),d=o.get(t);if(u&&d)return u==t&&d==e;var h=-1,f=!0,p=2&n?new Un:r;for(o.set(e,t),o.set(t,e);++h<c;){var m=e[h],b=t[h];if(i)var g=a?i(b,m,h,t,e,o):i(m,b,h,e,t,o);if(g!==r){if(g)continue;f=!1;break}if(p){if(!Ot(t,(function(e,t){if(!Bt(p,t)&&(m===e||s(m,e,n,i,o)))return p.push(t)}))){f=!1;break}}else if(m!==b&&!s(m,b,n,i,o)){f=!1;break}}return o.delete(e),o.delete(t),f}function Xr(e){return Os(Ms(e,r,Vs),e+"")}function es(e){return Si(e,Ra,ls)}function ts(e){return Si(e,Ea,us)}var ns=Cn?function(e){return Cn.get(e)}:cc;function is(e){for(var t=e.name+"",n=On[t],i=Ee.call(On,t)?n.length:0;i--;){var r=n[i],s=r.func;if(null==s||s==e)return r.name}return t}function rs(e){return(Ee.call(Fn,"placeholder")?Fn:e).placeholder}function ss(){var e=Fn.iteratee||rc;return e=e===rc?Ai:e,arguments.length?e(arguments[0],arguments[1]):e}function os(e,t){var n,i,r=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof t?"string":"hash"]:r.map}function as(e){for(var t=Ra(e),n=t.length;n--;){var i=t[n],r=e[i];t[n]=[i,r,ws(r)]}return t}function cs(e,t){var n=function(e,t){return null==e?r:e[t]}(e,t);return Ei(n)?n:r}var ls=dn?function(e){return null==e?[]:(e=xe(e),St(dn(e),(function(t){return Ge.call(e,t)})))}:mc,us=dn?function(e){for(var t=[];e;)Dt(t,ls(e)),e=We(e);return t}:mc,ds=Mi;function hs(e,t,n){for(var i=-1,r=(t=br(t,e)).length,s=!1;++i<r;){var o=js(t[i]);if(!(s=null!=e&&n(e,o)))break;e=e[o]}return s||++i!=r?s:!!(r=null==e?0:e.length)&&Xo(r)&&ms(o,r)&&(Vo(e)||Wo(e))}function fs(e){return"function"!=typeof e.constructor||vs(e)?{}:Yn(We(e))}function ps(e){return Vo(e)||Wo(e)||!!(it&&e&&e[it])}function ms(e,t){var n=typeof e;return!!(t=null==t?d:t)&&("number"==n||"symbol"!=n&&ge.test(e))&&e>-1&&e%1==0&&e<t}function bs(e,t,n){if(!ea(n))return!1;var i=typeof t;return!!("number"==i?Uo(n)&&ms(t,n.length):"string"==i&&t in n)&&zo(n[t],e)}function gs(e,t){if(Vo(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ca(e))||X.test(e)||!Z.test(e)||null!=t&&e in xe(t)}function _s(e){var t=is(e),n=Fn[t];if("function"!=typeof n||!(t in Hn.prototype))return!1;if(e===n)return!0;var i=ns(n);return!!i&&e===i[0]}(Sn&&ds(new Sn(new ArrayBuffer(1)))!=E||Mn&&ds(new Mn)!=S||xn&&ds(xn.resolve())!=k||kn&&ds(new kn)!=T||Dn&&ds(new Dn)!=L)&&(ds=function(e){var t=Mi(e),n=t==x?e.constructor:r,i=n?Ns(n):"";if(i)switch(i){case Ln:return E;case Rn:return S;case En:return k;case An:return T;case In:return L}return t});var ys=Le?Ko:bc;function vs(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Oe)}function ws(e){return e==e&&!ea(e)}function Ss(e,t){return function(n){return null!=n&&n[e]===t&&(t!==r||e in xe(n))}}function Ms(e,t,n){return t=bn(t===r?e.length-1:t,0),function(){for(var r=arguments,s=-1,o=bn(r.length-t,0),a=i(o);++s<o;)a[s]=r[t+s];s=-1;for(var c=i(t+1);++s<t;)c[s]=r[s];return c[t]=n(a),gt(e,this,c)}}function xs(e,t){return t.length<2?e:wi(e,er(t,0,-1))}function ks(e,t){for(var n=e.length,i=gn(t.length,n),s=Dr(e);i--;){var o=t[i];e[i]=ms(o,n)?s[o]:r}return e}function Ds(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ts=Rs(Ki),Cs=Lt||function(e,t){return st.setTimeout(e,t)},Os=Rs(Zi);function Ls(e,t,n){var i=t+"";return Os(e,function(e,t){var n=t.length;if(!n)return e;var i=n-1;return t[i]=(n>1?"& ":"")+t[i],t=t.join(n>2?", ":" "),e.replace(se,"{\n/* [wrapped with "+t+"] */\n")}(i,function(e,t){return yt(p,(function(n){var i="_."+n[0];t&n[1]&&!Mt(e,i)&&e.push(i)})),e.sort()}(function(e){var t=e.match(oe);return t?t[1].split(ae):[]}(i),n)))}function Rs(e){var t=0,n=0;return function(){var i=_n(),s=16-(i-n);if(n=i,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(r,arguments)}}function Es(e,t){var n=-1,i=e.length,s=i-1;for(t=t===r?i:t;++n<t;){var o=Bi(n,s),a=e[o];e[o]=e[n],e[n]=a}return e.length=t,e}var As,Is,Ps=(As=Io((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,i,r){t.push(i?r.replace(ue,"$1"):n||e)})),t}),(function(e){return 500===Is.size&&Is.clear(),e})),Is=As.cache,As);function js(e){if("string"==typeof e||ca(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ns(e){if(null!=e){try{return Re.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Fs(e){if(e instanceof Hn)return e.clone();var t=new $n(e.__wrapped__,e.__chain__);return t.__actions__=Dr(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Ys=qi((function(e,t){return qo(e)?li(e,mi(t,1,qo,!0)):[]})),zs=qi((function(e,t){var n=Js(t);return qo(n)&&(n=r),qo(e)?li(e,mi(t,1,qo,!0),ss(n,2)):[]})),$s=qi((function(e,t){var n=Js(t);return qo(n)&&(n=r),qo(e)?li(e,mi(t,1,qo,!0),r,n):[]}));function Hs(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=null==n?0:pa(n);return r<0&&(r=bn(i+r,0)),Et(e,ss(t,3),r)}function Ws(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var s=i-1;return n!==r&&(s=pa(n),s=n<0?bn(i+s,0):gn(s,i-1)),Et(e,ss(t,3),s,!0)}function Vs(e){return null!=e&&e.length?mi(e,1):[]}function Bs(e){return e&&e.length?e[0]:r}var Us=qi((function(e){var t=kt(e,pr);return t.length&&t[0]===e[0]?Ti(t):[]})),qs=qi((function(e){var t=Js(e),n=kt(e,pr);return t===Js(n)?t=r:n.pop(),n.length&&n[0]===e[0]?Ti(n,ss(t,2)):[]})),Gs=qi((function(e){var t=Js(e),n=kt(e,pr);return(t="function"==typeof t?t:r)&&n.pop(),n.length&&n[0]===e[0]?Ti(n,r,t):[]}));function Js(e){var t=null==e?0:e.length;return t?e[t-1]:r}var Qs=qi(Ks);function Ks(e,t){return e&&e.length&&t&&t.length?Wi(e,t):e}var Zs=Xr((function(e,t){var n=null==e?0:e.length,i=ri(e,t);return Vi(e,kt(t,(function(e){return ms(e,n)?+e:e})).sort(Mr)),i}));function Xs(e){return null==e?e:wn.call(e)}var eo=qi((function(e){return ar(mi(e,1,qo,!0))})),to=qi((function(e){var t=Js(e);return qo(t)&&(t=r),ar(mi(e,1,qo,!0),ss(t,2))})),no=qi((function(e){var t=Js(e);return t="function"==typeof t?t:r,ar(mi(e,1,qo,!0),r,t)}));function io(e){if(!e||!e.length)return[];var t=0;return e=St(e,(function(e){if(qo(e))return t=bn(e.length,t),!0})),$t(t,(function(t){return kt(e,Nt(t))}))}function ro(e,t){if(!e||!e.length)return[];var n=io(e);return null==t?n:kt(n,(function(e){return gt(t,r,e)}))}var so=qi((function(e,t){return qo(e)?li(e,t):[]})),oo=qi((function(e){return hr(St(e,qo))})),ao=qi((function(e){var t=Js(e);return qo(t)&&(t=r),hr(St(e,qo),ss(t,2))})),co=qi((function(e){var t=Js(e);return t="function"==typeof t?t:r,hr(St(e,qo),r,t)})),lo=qi(io),uo=qi((function(e){var t=e.length,n=t>1?e[t-1]:r;return n="function"==typeof n?(e.pop(),n):r,ro(e,n)}));function ho(e){var t=Fn(e);return t.__chain__=!0,t}function fo(e,t){return t(e)}var po=Xr((function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,s=function(t){return ri(t,e)};return!(t>1||this.__actions__.length)&&i instanceof Hn&&ms(n)?((i=i.slice(n,+n+(t?1:0))).__actions__.push({func:fo,args:[s],thisArg:r}),new $n(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(r),e}))):this.thru(s)})),mo=Cr((function(e,t,n){Ee.call(e,n)?++e[n]:ii(e,n,1)})),bo=Pr(Hs),go=Pr(Ws);function _o(e,t){return(Vo(e)?yt:ui)(e,ss(t,3))}function yo(e,t){return(Vo(e)?vt:di)(e,ss(t,3))}var vo=Cr((function(e,t,n){Ee.call(e,n)?e[n].push(t):ii(e,n,[t])})),wo=qi((function(e,t,n){var r=-1,s="function"==typeof t,o=Uo(e)?i(e.length):[];return ui(e,(function(e){o[++r]=s?gt(t,e,n):Ci(e,t,n)})),o})),So=Cr((function(e,t,n){ii(e,n,t)}));function Mo(e,t){return(Vo(e)?kt:ji)(e,ss(t,3))}var xo=Cr((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),ko=qi((function(e,t){if(null==e)return[];var n=t.length;return n>1&&bs(e,t[0],t[1])?t=[]:n>2&&bs(t[0],t[1],t[2])&&(t=[t[0]]),$i(e,mi(t,1),[])})),Do=ut||function(){return st.Date.now()};function To(e,t,n){return t=n?r:t,Gr(e,l,r,r,r,r,t=e&&null==t?e.length:t)}function Co(e,t){var n;if("function"!=typeof t)throw new Te(s);return e=pa(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=r),n}}var Oo=qi((function(e,t,n){var i=1;if(n.length){var r=tn(n,rs(Oo));i|=c}return Gr(e,i,t,n,r)})),Lo=qi((function(e,t,n){var i=3;if(n.length){var r=tn(n,rs(Lo));i|=c}return Gr(t,i,e,n,r)}));function Ro(e,t,n){var i,o,a,c,l,u,d=0,h=!1,f=!1,p=!0;if("function"!=typeof e)throw new Te(s);function m(t){var n=i,s=o;return i=o=r,d=t,c=e.apply(s,n)}function b(e){return d=e,l=Cs(_,t),h?m(e):c}function g(e){var n=e-u;return u===r||n>=t||n<0||f&&e-d>=a}function _(){var e=Do();if(g(e))return y(e);l=Cs(_,function(e){var n=t-(e-u);return f?gn(n,a-(e-d)):n}(e))}function y(e){return l=r,p&&i?m(e):(i=o=r,c)}function v(){var e=Do(),n=g(e);if(i=arguments,o=this,u=e,n){if(l===r)return b(u);if(f)return yr(l),l=Cs(_,t),m(u)}return l===r&&(l=Cs(_,t)),c}return t=ba(t)||0,ea(n)&&(h=!!n.leading,a=(f="maxWait"in n)?bn(ba(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),v.cancel=function(){l!==r&&yr(l),d=0,i=u=o=l=r},v.flush=function(){return l===r?c:y(Do())},v}var Eo=qi((function(e,t){return ci(e,1,t)})),Ao=qi((function(e,t,n){return ci(e,ba(t)||0,n)}));function Io(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Te(s);var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],s=n.cache;if(s.has(r))return s.get(r);var o=e.apply(this,i);return n.cache=s.set(r,o)||s,o};return n.cache=new(Io.Cache||Bn),n}function Po(e){if("function"!=typeof e)throw new Te(s);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Io.Cache=Bn;var jo=gr((function(e,t){var n=(t=1==t.length&&Vo(t[0])?kt(t[0],Wt(ss())):kt(mi(t,1),Wt(ss()))).length;return qi((function(i){for(var r=-1,s=gn(i.length,n);++r<s;)i[r]=t[r].call(this,i[r]);return gt(e,this,i)}))})),No=qi((function(e,t){var n=tn(t,rs(No));return Gr(e,c,r,t,n)})),Fo=qi((function(e,t){var n=tn(t,rs(Fo));return Gr(e,64,r,t,n)})),Yo=Xr((function(e,t){return Gr(e,256,r,r,r,t)}));function zo(e,t){return e===t||e!=e&&t!=t}var $o=Wr(xi),Ho=Wr((function(e,t){return e>=t})),Wo=Oi(function(){return arguments}())?Oi:function(e){return ta(e)&&Ee.call(e,"callee")&&!Ge.call(e,"callee")},Vo=i.isArray,Bo=dt?Wt(dt):function(e){return ta(e)&&Mi(e)==R};function Uo(e){return null!=e&&Xo(e.length)&&!Ko(e)}function qo(e){return ta(e)&&Uo(e)}var Go=hn||bc,Jo=ht?Wt(ht):function(e){return ta(e)&&Mi(e)==_};function Qo(e){if(!ta(e))return!1;var t=Mi(e);return t==y||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ra(e)}function Ko(e){if(!ea(e))return!1;var t=Mi(e);return t==v||t==w||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Zo(e){return"number"==typeof e&&e==pa(e)}function Xo(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=d}function ea(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ta(e){return null!=e&&"object"==typeof e}var na=ft?Wt(ft):function(e){return ta(e)&&ds(e)==S};function ia(e){return"number"==typeof e||ta(e)&&Mi(e)==M}function ra(e){if(!ta(e)||Mi(e)!=x)return!1;var t=We(e);if(null===t)return!0;var n=Ee.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Re.call(n)==je}var sa=pt?Wt(pt):function(e){return ta(e)&&Mi(e)==D},oa=mt?Wt(mt):function(e){return ta(e)&&ds(e)==T};function aa(e){return"string"==typeof e||!Vo(e)&&ta(e)&&Mi(e)==C}function ca(e){return"symbol"==typeof e||ta(e)&&Mi(e)==O}var la=bt?Wt(bt):function(e){return ta(e)&&Xo(e.length)&&!!Ze[Mi(e)]},ua=Wr(Pi),da=Wr((function(e,t){return e<=t}));function ha(e){if(!e)return[];if(Uo(e))return aa(e)?on(e):Dr(e);if(rt&&e[rt])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[rt]());var t=ds(e);return(t==S?Xt:t==T?nn:za)(e)}function fa(e){return e?(e=ba(e))===u||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function pa(e){var t=fa(e),n=t%1;return t==t?n?t-n:t:0}function ma(e){return e?si(pa(e),0,f):0}function ba(e){if("number"==typeof e)return e;if(ca(e))return h;if(ea(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ea(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ht(e);var n=pe.test(e);return n||be.test(e)?nt(e.slice(2),n?2:8):fe.test(e)?h:+e}function ga(e){return Tr(e,Ea(e))}function _a(e){return null==e?"":or(e)}var ya=Or((function(e,t){if(vs(t)||Uo(t))Tr(t,Ra(t),e);else for(var n in t)Ee.call(t,n)&&Xn(e,n,t[n])})),va=Or((function(e,t){Tr(t,Ea(t),e)})),wa=Or((function(e,t,n,i){Tr(t,Ea(t),e,i)})),Sa=Or((function(e,t,n,i){Tr(t,Ra(t),e,i)})),Ma=Xr(ri),xa=qi((function(e,t){e=xe(e);var n=-1,i=t.length,s=i>2?t[2]:r;for(s&&bs(t[0],t[1],s)&&(i=1);++n<i;)for(var o=t[n],a=Ea(o),c=-1,l=a.length;++c<l;){var u=a[c],d=e[u];(d===r||zo(d,Oe[u])&&!Ee.call(e,u))&&(e[u]=o[u])}return e})),ka=qi((function(e){return e.push(r,Qr),gt(Ia,r,e)}));function Da(e,t,n){var i=null==e?r:wi(e,t);return i===r?n:i}function Ta(e,t){return null!=e&&hs(e,t,Di)}var Ca=Fr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Pe.call(t)),e[t]=n}),ec(ic)),Oa=Fr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Pe.call(t)),Ee.call(e,t)?e[t].push(n):e[t]=[n]}),ss),La=qi(Ci);function Ra(e){return Uo(e)?Gn(e):Ii(e)}function Ea(e){return Uo(e)?Gn(e,!0):function(e){if(!ea(e))return function(e){var t=[];if(null!=e)for(var n in xe(e))t.push(n);return t}(e);var t=vs(e),n=[];for(var i in e)("constructor"!=i||!t&&Ee.call(e,i))&&n.push(i);return n}(e)}var Aa=Or((function(e,t,n){Yi(e,t,n)})),Ia=Or((function(e,t,n,i){Yi(e,t,n,i)})),Pa=Xr((function(e,t){var n={};if(null==e)return n;var i=!1;t=kt(t,(function(t){return t=br(t,e),i||(i=t.length>1),t})),Tr(e,ts(e),n),i&&(n=oi(n,7,Kr));for(var r=t.length;r--;)cr(n,t[r]);return n})),ja=Xr((function(e,t){return null==e?{}:function(e,t){return Hi(e,t,(function(t,n){return Ta(e,n)}))}(e,t)}));function Na(e,t){if(null==e)return{};var n=kt(ts(e),(function(e){return[e]}));return t=ss(t),Hi(e,n,(function(e,n){return t(e,n[0])}))}var Fa=qr(Ra),Ya=qr(Ea);function za(e){return null==e?[]:Vt(e,Ra(e))}var $a=Ar((function(e,t,n){return t=t.toLowerCase(),e+(n?Ha(t):t)}));function Ha(e){return Qa(_a(e).toLowerCase())}function Wa(e){return(e=_a(e))&&e.replace(_e,Jt).replace(Be,"")}var Va=Ar((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ba=Ar((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ua=Er("toLowerCase"),qa=Ar((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Ga=Ar((function(e,t,n){return e+(n?" ":"")+Qa(t)})),Ja=Ar((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Qa=Er("toUpperCase");function Ka(e,t,n){return e=_a(e),(t=n?r:t)===r?function(e){return Je.test(e)}(e)?function(e){return e.match(qe)||[]}(e):function(e){return e.match(ce)||[]}(e):e.match(t)||[]}var Za=qi((function(e,t){try{return gt(e,r,t)}catch(n){return Qo(n)?n:new we(n)}})),Xa=Xr((function(e,t){return yt(t,(function(t){t=js(t),ii(e,t,Oo(e[t],e))})),e}));function ec(e){return function(){return e}}var tc=jr(),nc=jr(!0);function ic(e){return e}function rc(e){return Ai("function"==typeof e?e:oi(e,1))}var sc=qi((function(e,t){return function(n){return Ci(n,e,t)}})),oc=qi((function(e,t){return function(n){return Ci(e,n,t)}}));function ac(e,t,n){var i=Ra(t),r=vi(t,i);null!=n||ea(t)&&(r.length||!i.length)||(n=t,t=e,e=this,r=vi(t,Ra(t)));var s=!(ea(n)&&"chain"in n&&!n.chain),o=Ko(e);return yt(r,(function(n){var i=t[n];e[n]=i,o&&(e.prototype[n]=function(){var t=this.__chain__;if(s||t){var n=e(this.__wrapped__),r=n.__actions__=Dr(this.__actions__);return r.push({func:i,args:arguments,thisArg:e}),n.__chain__=t,n}return i.apply(e,Dt([this.value()],arguments))})})),e}function cc(){}var lc=zr(kt),uc=zr(wt),dc=zr(Ot);function hc(e){return gs(e)?Nt(js(e)):function(e){return function(t){return wi(t,e)}}(e)}var fc=Hr(),pc=Hr(!0);function mc(){return[]}function bc(){return!1}var gc,_c=Yr((function(e,t){return e+t}),0),yc=Br("ceil"),vc=Yr((function(e,t){return e/t}),1),wc=Br("floor"),Sc=Yr((function(e,t){return e*t}),1),Mc=Br("round"),xc=Yr((function(e,t){return e-t}),0);return Fn.after=function(e,t){if("function"!=typeof t)throw new Te(s);return e=pa(e),function(){if(--e<1)return t.apply(this,arguments)}},Fn.ary=To,Fn.assign=ya,Fn.assignIn=va,Fn.assignInWith=wa,Fn.assignWith=Sa,Fn.at=Ma,Fn.before=Co,Fn.bind=Oo,Fn.bindAll=Xa,Fn.bindKey=Lo,Fn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Vo(e)?e:[e]},Fn.chain=ho,Fn.chunk=function(e,t,n){t=(n?bs(e,t,n):t===r)?1:bn(pa(t),0);var s=null==e?0:e.length;if(!s||t<1)return[];for(var o=0,a=0,c=i(Ft(s/t));o<s;)c[a++]=er(e,o,o+=t);return c},Fn.compact=function(e){for(var t=-1,n=null==e?0:e.length,i=0,r=[];++t<n;){var s=e[t];s&&(r[i++]=s)}return r},Fn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=i(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Dt(Vo(n)?Dr(n):[n],mi(t,1))},Fn.cond=function(e){var t=null==e?0:e.length,n=ss();return e=t?kt(e,(function(e){if("function"!=typeof e[1])throw new Te(s);return[n(e[0]),e[1]]})):[],qi((function(n){for(var i=-1;++i<t;){var r=e[i];if(gt(r[0],this,n))return gt(r[1],this,n)}}))},Fn.conforms=function(e){return function(e){var t=Ra(e);return function(n){return ai(n,e,t)}}(oi(e,1))},Fn.constant=ec,Fn.countBy=mo,Fn.create=function(e,t){var n=Yn(e);return null==t?n:ni(n,t)},Fn.curry=function e(t,n,i){var s=Gr(t,8,r,r,r,r,r,n=i?r:n);return s.placeholder=e.placeholder,s},Fn.curryRight=function e(t,n,i){var s=Gr(t,16,r,r,r,r,r,n=i?r:n);return s.placeholder=e.placeholder,s},Fn.debounce=Ro,Fn.defaults=xa,Fn.defaultsDeep=ka,Fn.defer=Eo,Fn.delay=Ao,Fn.difference=Ys,Fn.differenceBy=zs,Fn.differenceWith=$s,Fn.drop=function(e,t,n){var i=null==e?0:e.length;return i?er(e,(t=n||t===r?1:pa(t))<0?0:t,i):[]},Fn.dropRight=function(e,t,n){var i=null==e?0:e.length;return i?er(e,0,(t=i-(t=n||t===r?1:pa(t)))<0?0:t):[]},Fn.dropRightWhile=function(e,t){return e&&e.length?ur(e,ss(t,3),!0,!0):[]},Fn.dropWhile=function(e,t){return e&&e.length?ur(e,ss(t,3),!0):[]},Fn.fill=function(e,t,n,i){var s=null==e?0:e.length;return s?(n&&"number"!=typeof n&&bs(e,t,n)&&(n=0,i=s),function(e,t,n,i){var s=e.length;for((n=pa(n))<0&&(n=-n>s?0:s+n),(i=i===r||i>s?s:pa(i))<0&&(i+=s),i=n>i?0:ma(i);n<i;)e[n++]=t;return e}(e,t,n,i)):[]},Fn.filter=function(e,t){return(Vo(e)?St:pi)(e,ss(t,3))},Fn.flatMap=function(e,t){return mi(Mo(e,t),1)},Fn.flatMapDeep=function(e,t){return mi(Mo(e,t),u)},Fn.flatMapDepth=function(e,t,n){return n=n===r?1:pa(n),mi(Mo(e,t),n)},Fn.flatten=Vs,Fn.flattenDeep=function(e){return null!=e&&e.length?mi(e,u):[]},Fn.flattenDepth=function(e,t){return null!=e&&e.length?mi(e,t=t===r?1:pa(t)):[]},Fn.flip=function(e){return Gr(e,512)},Fn.flow=tc,Fn.flowRight=nc,Fn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,i={};++t<n;){var r=e[t];i[r[0]]=r[1]}return i},Fn.functions=function(e){return null==e?[]:vi(e,Ra(e))},Fn.functionsIn=function(e){return null==e?[]:vi(e,Ea(e))},Fn.groupBy=vo,Fn.initial=function(e){return null!=e&&e.length?er(e,0,-1):[]},Fn.intersection=Us,Fn.intersectionBy=qs,Fn.intersectionWith=Gs,Fn.invert=Ca,Fn.invertBy=Oa,Fn.invokeMap=wo,Fn.iteratee=rc,Fn.keyBy=So,Fn.keys=Ra,Fn.keysIn=Ea,Fn.map=Mo,Fn.mapKeys=function(e,t){var n={};return t=ss(t,3),_i(e,(function(e,i,r){ii(n,t(e,i,r),e)})),n},Fn.mapValues=function(e,t){var n={};return t=ss(t,3),_i(e,(function(e,i,r){ii(n,i,t(e,i,r))})),n},Fn.matches=function(e){return Ni(oi(e,1))},Fn.matchesProperty=function(e,t){return Fi(e,oi(t,1))},Fn.memoize=Io,Fn.merge=Aa,Fn.mergeWith=Ia,Fn.method=sc,Fn.methodOf=oc,Fn.mixin=ac,Fn.negate=Po,Fn.nthArg=function(e){return e=pa(e),qi((function(t){return zi(t,e)}))},Fn.omit=Pa,Fn.omitBy=function(e,t){return Na(e,Po(ss(t)))},Fn.once=function(e){return Co(2,e)},Fn.orderBy=function(e,t,n,i){return null==e?[]:(Vo(t)||(t=null==t?[]:[t]),Vo(n=i?r:n)||(n=null==n?[]:[n]),$i(e,t,n))},Fn.over=lc,Fn.overArgs=jo,Fn.overEvery=uc,Fn.overSome=dc,Fn.partial=No,Fn.partialRight=Fo,Fn.partition=xo,Fn.pick=ja,Fn.pickBy=Na,Fn.property=hc,Fn.propertyOf=function(e){return function(t){return null==e?r:wi(e,t)}},Fn.pull=Qs,Fn.pullAll=Ks,Fn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Wi(e,t,ss(n,2)):e},Fn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Wi(e,t,r,n):e},Fn.pullAt=Zs,Fn.range=fc,Fn.rangeRight=pc,Fn.rearg=Yo,Fn.reject=function(e,t){return(Vo(e)?St:pi)(e,Po(ss(t,3)))},Fn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var i=-1,r=[],s=e.length;for(t=ss(t,3);++i<s;){var o=e[i];t(o,i,e)&&(n.push(o),r.push(i))}return Vi(e,r),n},Fn.rest=function(e,t){if("function"!=typeof e)throw new Te(s);return qi(e,t=t===r?t:pa(t))},Fn.reverse=Xs,Fn.sampleSize=function(e,t,n){return t=(n?bs(e,t,n):t===r)?1:pa(t),(Vo(e)?Qn:Ji)(e,t)},Fn.set=function(e,t,n){return null==e?e:Qi(e,t,n)},Fn.setWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:Qi(e,t,n,i)},Fn.shuffle=function(e){return(Vo(e)?Kn:Xi)(e)},Fn.slice=function(e,t,n){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&bs(e,t,n)?(t=0,n=i):(t=null==t?0:pa(t),n=n===r?i:pa(n)),er(e,t,n)):[]},Fn.sortBy=ko,Fn.sortedUniq=function(e){return e&&e.length?rr(e):[]},Fn.sortedUniqBy=function(e,t){return e&&e.length?rr(e,ss(t,2)):[]},Fn.split=function(e,t,n){return n&&"number"!=typeof n&&bs(e,t,n)&&(t=n=r),(n=n===r?f:n>>>0)?(e=_a(e))&&("string"==typeof t||null!=t&&!sa(t))&&!(t=or(t))&&Zt(e)?_r(on(e),0,n):e.split(t,n):[]},Fn.spread=function(e,t){if("function"!=typeof e)throw new Te(s);return t=null==t?0:bn(pa(t),0),qi((function(n){var i=n[t],r=_r(n,0,t);return i&&Dt(r,i),gt(e,this,r)}))},Fn.tail=function(e){var t=null==e?0:e.length;return t?er(e,1,t):[]},Fn.take=function(e,t,n){return e&&e.length?er(e,0,(t=n||t===r?1:pa(t))<0?0:t):[]},Fn.takeRight=function(e,t,n){var i=null==e?0:e.length;return i?er(e,(t=i-(t=n||t===r?1:pa(t)))<0?0:t,i):[]},Fn.takeRightWhile=function(e,t){return e&&e.length?ur(e,ss(t,3),!1,!0):[]},Fn.takeWhile=function(e,t){return e&&e.length?ur(e,ss(t,3)):[]},Fn.tap=function(e,t){return t(e),e},Fn.throttle=function(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new Te(s);return ea(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),Ro(e,t,{leading:i,maxWait:t,trailing:r})},Fn.thru=fo,Fn.toArray=ha,Fn.toPairs=Fa,Fn.toPairsIn=Ya,Fn.toPath=function(e){return Vo(e)?kt(e,js):ca(e)?[e]:Dr(Ps(_a(e)))},Fn.toPlainObject=ga,Fn.transform=function(e,t,n){var i=Vo(e),r=i||Go(e)||la(e);if(t=ss(t,4),null==n){var s=e&&e.constructor;n=r?i?new s:[]:ea(e)&&Ko(s)?Yn(We(e)):{}}return(r?yt:_i)(e,(function(e,i,r){return t(n,e,i,r)})),n},Fn.unary=function(e){return To(e,1)},Fn.union=eo,Fn.unionBy=to,Fn.unionWith=no,Fn.uniq=function(e){return e&&e.length?ar(e):[]},Fn.uniqBy=function(e,t){return e&&e.length?ar(e,ss(t,2)):[]},Fn.uniqWith=function(e,t){return t="function"==typeof t?t:r,e&&e.length?ar(e,r,t):[]},Fn.unset=function(e,t){return null==e||cr(e,t)},Fn.unzip=io,Fn.unzipWith=ro,Fn.update=function(e,t,n){return null==e?e:lr(e,t,mr(n))},Fn.updateWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:lr(e,t,mr(n),i)},Fn.values=za,Fn.valuesIn=function(e){return null==e?[]:Vt(e,Ea(e))},Fn.without=so,Fn.words=Ka,Fn.wrap=function(e,t){return No(mr(t),e)},Fn.xor=oo,Fn.xorBy=ao,Fn.xorWith=co,Fn.zip=lo,Fn.zipObject=function(e,t){return fr(e||[],t||[],Xn)},Fn.zipObjectDeep=function(e,t){return fr(e||[],t||[],Qi)},Fn.zipWith=uo,Fn.entries=Fa,Fn.entriesIn=Ya,Fn.extend=va,Fn.extendWith=wa,ac(Fn,Fn),Fn.add=_c,Fn.attempt=Za,Fn.camelCase=$a,Fn.capitalize=Ha,Fn.ceil=yc,Fn.clamp=function(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=(n=ba(n))==n?n:0),t!==r&&(t=(t=ba(t))==t?t:0),si(ba(e),t,n)},Fn.clone=function(e){return oi(e,4)},Fn.cloneDeep=function(e){return oi(e,5)},Fn.cloneDeepWith=function(e,t){return oi(e,5,t="function"==typeof t?t:r)},Fn.cloneWith=function(e,t){return oi(e,4,t="function"==typeof t?t:r)},Fn.conformsTo=function(e,t){return null==t||ai(e,t,Ra(t))},Fn.deburr=Wa,Fn.defaultTo=function(e,t){return null==e||e!=e?t:e},Fn.divide=vc,Fn.endsWith=function(e,t,n){e=_a(e),t=or(t);var i=e.length,s=n=n===r?i:si(pa(n),0,i);return(n-=t.length)>=0&&e.slice(n,s)==t},Fn.eq=zo,Fn.escape=function(e){return(e=_a(e))&&G.test(e)?e.replace(U,Qt):e},Fn.escapeRegExp=function(e){return(e=_a(e))&&ne.test(e)?e.replace(te,"\\$&"):e},Fn.every=function(e,t,n){var i=Vo(e)?wt:hi;return n&&bs(e,t,n)&&(t=r),i(e,ss(t,3))},Fn.find=bo,Fn.findIndex=Hs,Fn.findKey=function(e,t){return Rt(e,ss(t,3),_i)},Fn.findLast=go,Fn.findLastIndex=Ws,Fn.findLastKey=function(e,t){return Rt(e,ss(t,3),yi)},Fn.floor=wc,Fn.forEach=_o,Fn.forEachRight=yo,Fn.forIn=function(e,t){return null==e?e:bi(e,ss(t,3),Ea)},Fn.forInRight=function(e,t){return null==e?e:gi(e,ss(t,3),Ea)},Fn.forOwn=function(e,t){return e&&_i(e,ss(t,3))},Fn.forOwnRight=function(e,t){return e&&yi(e,ss(t,3))},Fn.get=Da,Fn.gt=$o,Fn.gte=Ho,Fn.has=function(e,t){return null!=e&&hs(e,t,ki)},Fn.hasIn=Ta,Fn.head=Bs,Fn.identity=ic,Fn.includes=function(e,t,n,i){e=Uo(e)?e:za(e),n=n&&!i?pa(n):0;var r=e.length;return n<0&&(n=bn(r+n,0)),aa(e)?n<=r&&e.indexOf(t,n)>-1:!!r&&At(e,t,n)>-1},Fn.indexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=null==n?0:pa(n);return r<0&&(r=bn(i+r,0)),At(e,t,r)},Fn.inRange=function(e,t,n){return t=fa(t),n===r?(n=t,t=0):n=fa(n),function(e,t,n){return e>=gn(t,n)&&e<bn(t,n)}(e=ba(e),t,n)},Fn.invoke=La,Fn.isArguments=Wo,Fn.isArray=Vo,Fn.isArrayBuffer=Bo,Fn.isArrayLike=Uo,Fn.isArrayLikeObject=qo,Fn.isBoolean=function(e){return!0===e||!1===e||ta(e)&&Mi(e)==g},Fn.isBuffer=Go,Fn.isDate=Jo,Fn.isElement=function(e){return ta(e)&&1===e.nodeType&&!ra(e)},Fn.isEmpty=function(e){if(null==e)return!0;if(Uo(e)&&(Vo(e)||"string"==typeof e||"function"==typeof e.splice||Go(e)||la(e)||Wo(e)))return!e.length;var t=ds(e);if(t==S||t==T)return!e.size;if(vs(e))return!Ii(e).length;for(var n in e)if(Ee.call(e,n))return!1;return!0},Fn.isEqual=function(e,t){return Li(e,t)},Fn.isEqualWith=function(e,t,n){var i=(n="function"==typeof n?n:r)?n(e,t):r;return i===r?Li(e,t,r,n):!!i},Fn.isError=Qo,Fn.isFinite=function(e){return"number"==typeof e&&fn(e)},Fn.isFunction=Ko,Fn.isInteger=Zo,Fn.isLength=Xo,Fn.isMap=na,Fn.isMatch=function(e,t){return e===t||Ri(e,t,as(t))},Fn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:r,Ri(e,t,as(t),n)},Fn.isNaN=function(e){return ia(e)&&e!=+e},Fn.isNative=function(e){if(ys(e))throw new we("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ei(e)},Fn.isNil=function(e){return null==e},Fn.isNull=function(e){return null===e},Fn.isNumber=ia,Fn.isObject=ea,Fn.isObjectLike=ta,Fn.isPlainObject=ra,Fn.isRegExp=sa,Fn.isSafeInteger=function(e){return Zo(e)&&e>=-9007199254740991&&e<=d},Fn.isSet=oa,Fn.isString=aa,Fn.isSymbol=ca,Fn.isTypedArray=la,Fn.isUndefined=function(e){return e===r},Fn.isWeakMap=function(e){return ta(e)&&ds(e)==L},Fn.isWeakSet=function(e){return ta(e)&&"[object WeakSet]"==Mi(e)},Fn.join=function(e,t){return null==e?"":pn.call(e,t)},Fn.kebabCase=Va,Fn.last=Js,Fn.lastIndexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var s=i;return n!==r&&(s=(s=pa(n))<0?bn(i+s,0):gn(s,i-1)),t==t?function(e,t,n){for(var i=n+1;i--;)if(e[i]===t)return i;return i}(e,t,s):Et(e,Pt,s,!0)},Fn.lowerCase=Ba,Fn.lowerFirst=Ua,Fn.lt=ua,Fn.lte=da,Fn.max=function(e){return e&&e.length?fi(e,ic,xi):r},Fn.maxBy=function(e,t){return e&&e.length?fi(e,ss(t,2),xi):r},Fn.mean=function(e){return jt(e,ic)},Fn.meanBy=function(e,t){return jt(e,ss(t,2))},Fn.min=function(e){return e&&e.length?fi(e,ic,Pi):r},Fn.minBy=function(e,t){return e&&e.length?fi(e,ss(t,2),Pi):r},Fn.stubArray=mc,Fn.stubFalse=bc,Fn.stubObject=function(){return{}},Fn.stubString=function(){return""},Fn.stubTrue=function(){return!0},Fn.multiply=Sc,Fn.nth=function(e,t){return e&&e.length?zi(e,pa(t)):r},Fn.noConflict=function(){return st._===this&&(st._=Ne),this},Fn.noop=cc,Fn.now=Do,Fn.pad=function(e,t,n){e=_a(e);var i=(t=pa(t))?sn(e):0;if(!t||i>=t)return e;var r=(t-i)/2;return $r(un(r),n)+e+$r(Ft(r),n)},Fn.padEnd=function(e,t,n){e=_a(e);var i=(t=pa(t))?sn(e):0;return t&&i<t?e+$r(t-i,n):e},Fn.padStart=function(e,t,n){e=_a(e);var i=(t=pa(t))?sn(e):0;return t&&i<t?$r(t-i,n)+e:e},Fn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),yn(_a(e).replace(ie,""),t||0)},Fn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&bs(e,t,n)&&(t=n=r),n===r&&("boolean"==typeof t?(n=t,t=r):"boolean"==typeof e&&(n=e,e=r)),e===r&&t===r?(e=0,t=1):(e=fa(e),t===r?(t=e,e=0):t=fa(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var s=vn();return gn(e+s*(t-e+tt("1e-"+((s+"").length-1))),t)}return Bi(e,t)},Fn.reduce=function(e,t,n){var i=Vo(e)?Tt:Yt,r=arguments.length<3;return i(e,ss(t,4),n,r,ui)},Fn.reduceRight=function(e,t,n){var i=Vo(e)?Ct:Yt,r=arguments.length<3;return i(e,ss(t,4),n,r,di)},Fn.repeat=function(e,t,n){return t=(n?bs(e,t,n):t===r)?1:pa(t),Ui(_a(e),t)},Fn.replace=function(){var e=arguments,t=_a(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Fn.result=function(e,t,n){var i=-1,s=(t=br(t,e)).length;for(s||(s=1,e=r);++i<s;){var o=null==e?r:e[js(t[i])];o===r&&(i=s,o=n),e=Ko(o)?o.call(e):o}return e},Fn.round=Mc,Fn.runInContext=e,Fn.sample=function(e){return(Vo(e)?Jn:Gi)(e)},Fn.size=function(e){if(null==e)return 0;if(Uo(e))return aa(e)?sn(e):e.length;var t=ds(e);return t==S||t==T?e.size:Ii(e).length},Fn.snakeCase=qa,Fn.some=function(e,t,n){var i=Vo(e)?Ot:tr;return n&&bs(e,t,n)&&(t=r),i(e,ss(t,3))},Fn.sortedIndex=function(e,t){return nr(e,t)},Fn.sortedIndexBy=function(e,t,n){return ir(e,t,ss(n,2))},Fn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var i=nr(e,t);if(i<n&&zo(e[i],t))return i}return-1},Fn.sortedLastIndex=function(e,t){return nr(e,t,!0)},Fn.sortedLastIndexBy=function(e,t,n){return ir(e,t,ss(n,2),!0)},Fn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=nr(e,t,!0)-1;if(zo(e[n],t))return n}return-1},Fn.startCase=Ga,Fn.startsWith=function(e,t,n){return e=_a(e),n=null==n?0:si(pa(n),0,e.length),t=or(t),e.slice(n,n+t.length)==t},Fn.subtract=xc,Fn.sum=function(e){return e&&e.length?zt(e,ic):0},Fn.sumBy=function(e,t){return e&&e.length?zt(e,ss(t,2)):0},Fn.template=function(e,t,n){var i=Fn.templateSettings;n&&bs(e,t,n)&&(t=r),e=_a(e),t=wa({},t,i,Jr);var s,o,a=wa({},t.imports,i.imports,Jr),c=Ra(a),l=Vt(a,c),u=0,d=t.interpolate||ye,h="__p += '",f=ke((t.escape||ye).source+"|"+d.source+"|"+(d===K?de:ye).source+"|"+(t.evaluate||ye).source+"|$","g"),p="//# sourceURL="+(Ee.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ke+"]")+"\n";e.replace(f,(function(t,n,i,r,a,c){return i||(i=r),h+=e.slice(u,c).replace(ve,Kt),n&&(s=!0,h+="' +\n__e("+n+") +\n'"),a&&(o=!0,h+="';\n"+a+";\n__p += '"),i&&(h+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),u=c+t.length,t})),h+="';\n";var m=Ee.call(t,"variable")&&t.variable;if(m){if(le.test(m))throw new we("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(o?h.replace(H,""):h).replace(W,"$1").replace(V,"$1;"),h="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var b=Za((function(){return Se(c,p+"return "+h).apply(r,l)}));if(b.source=h,Qo(b))throw b;return b},Fn.times=function(e,t){if((e=pa(e))<1||e>d)return[];var n=f,i=gn(e,f);t=ss(t),e-=f;for(var r=$t(i,t);++n<e;)t(n);return r},Fn.toFinite=fa,Fn.toInteger=pa,Fn.toLength=ma,Fn.toLower=function(e){return _a(e).toLowerCase()},Fn.toNumber=ba,Fn.toSafeInteger=function(e){return e?si(pa(e),-9007199254740991,d):0===e?e:0},Fn.toString=_a,Fn.toUpper=function(e){return _a(e).toUpperCase()},Fn.trim=function(e,t,n){if((e=_a(e))&&(n||t===r))return Ht(e);if(!e||!(t=or(t)))return e;var i=on(e),s=on(t);return _r(i,Ut(i,s),qt(i,s)+1).join("")},Fn.trimEnd=function(e,t,n){if((e=_a(e))&&(n||t===r))return e.slice(0,an(e)+1);if(!e||!(t=or(t)))return e;var i=on(e);return _r(i,0,qt(i,on(t))+1).join("")},Fn.trimStart=function(e,t,n){if((e=_a(e))&&(n||t===r))return e.replace(ie,"");if(!e||!(t=or(t)))return e;var i=on(e);return _r(i,Ut(i,on(t))).join("")},Fn.truncate=function(e,t){var n=30,i="...";if(ea(t)){var s="separator"in t?t.separator:s;n="length"in t?pa(t.length):n,i="omission"in t?or(t.omission):i}var o=(e=_a(e)).length;if(Zt(e)){var a=on(e);o=a.length}if(n>=o)return e;var c=n-sn(i);if(c<1)return i;var l=a?_r(a,0,c).join(""):e.slice(0,c);if(s===r)return l+i;if(a&&(c+=l.length-c),sa(s)){if(e.slice(c).search(s)){var u,d=l;for(s.global||(s=ke(s.source,_a(he.exec(s))+"g")),s.lastIndex=0;u=s.exec(d);)var h=u.index;l=l.slice(0,h===r?c:h)}}else if(e.indexOf(or(s),c)!=c){var f=l.lastIndexOf(s);f>-1&&(l=l.slice(0,f))}return l+i},Fn.unescape=function(e){return(e=_a(e))&&q.test(e)?e.replace(B,cn):e},Fn.uniqueId=function(e){var t=++Ae;return _a(e)+t},Fn.upperCase=Ja,Fn.upperFirst=Qa,Fn.each=_o,Fn.eachRight=yo,Fn.first=Bs,ac(Fn,(gc={},_i(Fn,(function(e,t){Ee.call(Fn.prototype,t)||(gc[t]=e)})),gc),{chain:!1}),Fn.VERSION="4.17.21",yt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Fn[e].placeholder=Fn})),yt(["drop","take"],(function(e,t){Hn.prototype[e]=function(n){n=n===r?1:bn(pa(n),0);var i=this.__filtered__&&!t?new Hn(this):this.clone();return i.__filtered__?i.__takeCount__=gn(n,i.__takeCount__):i.__views__.push({size:gn(n,f),type:e+(i.__dir__<0?"Right":"")}),i},Hn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),yt(["filter","map","takeWhile"],(function(e,t){var n=t+1,i=1==n||3==n;Hn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ss(e,3),type:n}),t.__filtered__=t.__filtered__||i,t}})),yt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Hn.prototype[e]=function(){return this[n](1).value()[0]}})),yt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Hn.prototype[e]=function(){return this.__filtered__?new Hn(this):this[n](1)}})),Hn.prototype.compact=function(){return this.filter(ic)},Hn.prototype.find=function(e){return this.filter(e).head()},Hn.prototype.findLast=function(e){return this.reverse().find(e)},Hn.prototype.invokeMap=qi((function(e,t){return"function"==typeof e?new Hn(this):this.map((function(n){return Ci(n,e,t)}))})),Hn.prototype.reject=function(e){return this.filter(Po(ss(e)))},Hn.prototype.slice=function(e,t){e=pa(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Hn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(n=(t=pa(t))<0?n.dropRight(-t):n.take(t-e)),n)},Hn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Hn.prototype.toArray=function(){return this.take(f)},_i(Hn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),s=Fn[i?"take"+("last"==t?"Right":""):t],o=i||/^find/.test(t);s&&(Fn.prototype[t]=function(){var t=this.__wrapped__,a=i?[1]:arguments,c=t instanceof Hn,l=a[0],u=c||Vo(t),d=function(e){var t=s.apply(Fn,Dt([e],a));return i&&h?t[0]:t};u&&n&&"function"==typeof l&&1!=l.length&&(c=u=!1);var h=this.__chain__,f=!!this.__actions__.length,p=o&&!h,m=c&&!f;if(!o&&u){t=m?t:new Hn(this);var b=e.apply(t,a);return b.__actions__.push({func:fo,args:[d],thisArg:r}),new $n(b,h)}return p&&m?e.apply(this,a):(b=this.thru(d),p?i?b.value()[0]:b.value():b)})})),yt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ce[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);Fn.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var r=this.value();return t.apply(Vo(r)?r:[],e)}return this[n]((function(n){return t.apply(Vo(n)?n:[],e)}))}})),_i(Hn.prototype,(function(e,t){var n=Fn[t];if(n){var i=n.name+"";Ee.call(On,i)||(On[i]=[]),On[i].push({name:t,func:n})}})),On[Nr(r,2).name]=[{name:"wrapper",func:r}],Hn.prototype.clone=function(){var e=new Hn(this.__wrapped__);return e.__actions__=Dr(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Dr(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Dr(this.__views__),e},Hn.prototype.reverse=function(){if(this.__filtered__){var e=new Hn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Hn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Vo(e),i=t<0,r=n?e.length:0,s=function(e,t,n){for(var i=-1,r=n.length;++i<r;){var s=n[i],o=s.size;switch(s.type){case"drop":e+=o;break;case"dropRight":t-=o;break;case"take":t=gn(t,e+o);break;case"takeRight":e=bn(e,t-o)}}return{start:e,end:t}}(0,r,this.__views__),o=s.start,a=s.end,c=a-o,l=i?a:o-1,u=this.__iteratees__,d=u.length,h=0,f=gn(c,this.__takeCount__);if(!n||!i&&r==c&&f==c)return dr(e,this.__actions__);var p=[];e:for(;c--&&h<f;){for(var m=-1,b=e[l+=t];++m<d;){var g=u[m],_=g.type,y=(0,g.iteratee)(b);if(2==_)b=y;else if(!y){if(1==_)continue e;break e}}p[h++]=b}return p},Fn.prototype.at=po,Fn.prototype.chain=function(){return ho(this)},Fn.prototype.commit=function(){return new $n(this.value(),this.__chain__)},Fn.prototype.next=function(){this.__values__===r&&(this.__values__=ha(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?r:this.__values__[this.__index__++]}},Fn.prototype.plant=function(e){for(var t,n=this;n instanceof zn;){var i=Fs(n);i.__index__=0,i.__values__=r,t?s.__wrapped__=i:t=i;var s=i;n=n.__wrapped__}return s.__wrapped__=e,t},Fn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Hn){var t=e;return this.__actions__.length&&(t=new Hn(this)),(t=t.reverse()).__actions__.push({func:fo,args:[Xs],thisArg:r}),new $n(t,this.__chain__)}return this.thru(Xs)},Fn.prototype.toJSON=Fn.prototype.valueOf=Fn.prototype.value=function(){return dr(this.__wrapped__,this.__actions__)},Fn.prototype.first=Fn.prototype.head,rt&&(Fn.prototype[rt]=function(){return this}),Fn}();st._=ln,(i=(function(){return ln}).call(t,n,t,e))===r||(e.exports=i)}).call(this)}).call(this,n("YuTi")(e))},MAOJ:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var i=n("wd/R"),r=n.n(i),s=n("8Y7J"),o=n("G0yt"),a=n("s7LF"),c=n("SVse");function l(e,t){if(1&e){const e=s.Tb();s.Sb(0,"div",0),s.Sb(1,"ngb-timepicker",4),s.gc("ngModelChange",(function(t){return s.Dc(e),s.ic().time=t}))("ngModelChange",(function(){return s.Dc(e),s.ic().onModelChange()})),s.Rb(),s.Rb()}if(2&e){const e=s.ic();s.yb(1),s.pc("seconds",e.hasSeconds)("ngModel",e.time)}}let u=(()=>{class e{constructor(e){this.calendar=e,this.hasSeconds=!0,this.hasTime=!0}ngOnInit(){var e;this.minDate=this.calendar.getToday(),this.format=this.hasTime?this.hasSeconds?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD HH:mm":"YYYY-MM-DD";let t=r()(null===(e=this.control)||void 0===e?void 0:e.value,this.format);t.isValid()&&!t.isBefore(r()())||(t=r()()),this.date={year:t.year(),month:t.month()+1,day:t.date()},this.time={hour:t.hour(),minute:t.minute(),second:t.second()},this.onModelChange()}onModelChange(){if(this.date){const e=Object.assign({},this.date,this.time);e.month--,setTimeout(()=>{this.control.setValue(r()(e).format(this.format))})}else setTimeout(()=>{this.control.setValue("")})}}return e.\u0275fac=function(t){return new(t||e)(s.Mb(o.d))},e.\u0275cmp=s.Gb({type:e,selectors:[["cd-date-time-picker"]],inputs:{control:"control",hasSeconds:"hasSeconds",hasTime:"hasTime"},decls:4,vars:3,consts:[[1,"d-flex","justify-content-center"],[3,"ngModel","minDate","ngModelChange"],["dp",""],["class","d-flex justify-content-center",4,"ngIf"],[3,"seconds","ngModel","ngModelChange"]],template:function(e,t){1&e&&(s.Sb(0,"div",0),s.Sb(1,"ngb-datepicker",1,2),s.gc("ngModelChange",(function(e){return t.date=e}))("ngModelChange",(function(){return t.onModelChange()})),s.Rb(),s.Rb(),s.Mc(3,l,2,2,"div",3)),2&e&&(s.yb(1),s.pc("ngModel",t.date)("minDate",t.minDate),s.yb(2),s.pc("ngIf",t.hasTime))},directives:[o.g,a.q,a.t,c.r,o.B],styles:[""]}),e})()},"MO+k":function(e,t,n){e.exports=function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var t={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},n=function(e,n){return function(e){var n={};for(var i in t)t.hasOwnProperty(i)&&(n[t[i]]=i);var r=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var s in r)if(r.hasOwnProperty(s)){if(!("channels"in r[s]))throw new Error("missing channels property: "+s);if(!("labels"in r[s]))throw new Error("missing channel labels property: "+s);if(r[s].labels.length!==r[s].channels)throw new Error("channel and label counts mismatch: "+s);var o=r[s].channels,a=r[s].labels;delete r[s].channels,delete r[s].labels,Object.defineProperty(r[s],"channels",{value:o}),Object.defineProperty(r[s],"labels",{value:a})}r.rgb.hsl=function(e){var t,n,i=e[0]/255,r=e[1]/255,s=e[2]/255,o=Math.min(i,r,s),a=Math.max(i,r,s),c=a-o;return a===o?t=0:i===a?t=(r-s)/c:r===a?t=2+(s-i)/c:s===a&&(t=4+(i-r)/c),(t=Math.min(60*t,360))<0&&(t+=360),n=(o+a)/2,[t,100*(a===o?0:n<=.5?c/(a+o):c/(2-a-o)),100*n]},r.rgb.hsv=function(e){var t,n,i,r,s,o=e[0]/255,a=e[1]/255,c=e[2]/255,l=Math.max(o,a,c),u=l-Math.min(o,a,c),d=function(e){return(l-e)/6/u+.5};return 0===u?r=s=0:(s=u/l,t=d(o),n=d(a),i=d(c),o===l?r=i-n:a===l?r=1/3+t-i:c===l&&(r=2/3+n-t),r<0?r+=1:r>1&&(r-=1)),[360*r,100*s,100*l]},r.rgb.hwb=function(e){var t=e[0],n=e[1],i=e[2];return[r.rgb.hsl(e)[0],1/255*Math.min(t,Math.min(n,i))*100,100*(i=1-1/255*Math.max(t,Math.max(n,i)))]},r.rgb.cmyk=function(e){var t,n=e[0]/255,i=e[1]/255,r=e[2]/255;return[100*((1-n-(t=Math.min(1-n,1-i,1-r)))/(1-t)||0),100*((1-i-t)/(1-t)||0),100*((1-r-t)/(1-t)||0),100*t]},r.rgb.keyword=function(e){var i=n[e];if(i)return i;var r,s,o,a=1/0;for(var c in t)if(t.hasOwnProperty(c)){var l=(s=e,o=t[c],Math.pow(s[0]-o[0],2)+Math.pow(s[1]-o[1],2)+Math.pow(s[2]-o[2],2));l<a&&(a=l,r=c)}return r},r.keyword.rgb=function(e){return t[e]},r.rgb.xyz=function(e){var t=e[0]/255,n=e[1]/255,i=e[2]/255;return[100*(.4124*(t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)),100*(.2126*t+.7152*n+.0722*i),100*(.0193*t+.1192*n+.9505*i)]},r.rgb.lab=function(e){var t=r.rgb.xyz(e),n=t[0],i=t[1],s=t[2];return i/=100,s/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(n-i),200*(i-(s=s>.008856?Math.pow(s,1/3):7.787*s+16/116))]},r.hsl.rgb=function(e){var t,n,i,r,s,o=e[0]/360,a=e[1]/100,c=e[2]/100;if(0===a)return[s=255*c,s,s];t=2*c-(n=c<.5?c*(1+a):c+a-c*a),r=[0,0,0];for(var l=0;l<3;l++)(i=o+1/3*-(l-1))<0&&i++,i>1&&i--,r[l]=255*(s=6*i<1?t+6*(n-t)*i:2*i<1?n:3*i<2?t+(n-t)*(2/3-i)*6:t);return r},r.hsl.hsv=function(e){var t=e[0],n=e[1]/100,i=e[2]/100,r=n,s=Math.max(i,.01);return n*=(i*=2)<=1?i:2-i,r*=s<=1?s:2-s,[t,100*(0===i?2*r/(s+r):2*n/(i+n)),(i+n)/2*100]},r.hsv.rgb=function(e){var t=e[0]/60,n=e[1]/100,i=e[2]/100,r=Math.floor(t)%6,s=t-Math.floor(t),o=255*i*(1-n),a=255*i*(1-n*s),c=255*i*(1-n*(1-s));switch(i*=255,r){case 0:return[i,c,o];case 1:return[a,i,o];case 2:return[o,i,c];case 3:return[o,a,i];case 4:return[c,o,i];case 5:return[i,o,a]}},r.hsv.hsl=function(e){var t,n,i,r=e[0],s=e[1]/100,o=e[2]/100,a=Math.max(o,.01);return i=(2-s)*o,n=s*a,[r,100*(n=(n/=(t=(2-s)*a)<=1?t:2-t)||0),100*(i/=2)]},r.hwb.rgb=function(e){var t,n,i,r,s,o,a,c=e[0]/360,l=e[1]/100,u=e[2]/100,d=l+u;switch(d>1&&(l/=d,u/=d),i=6*c-(t=Math.floor(6*c)),0!=(1&t)&&(i=1-i),r=l+i*((n=1-u)-l),t){default:case 6:case 0:s=n,o=r,a=l;break;case 1:s=r,o=n,a=l;break;case 2:s=l,o=n,a=r;break;case 3:s=l,o=r,a=n;break;case 4:s=r,o=l,a=n;break;case 5:s=n,o=l,a=r}return[255*s,255*o,255*a]},r.cmyk.rgb=function(e){var t=e[1]/100,n=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,e[0]/100*(1-i)+i)),255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i))]},r.xyz.rgb=function(e){var t,n,i,r=e[0]/100,s=e[1]/100,o=e[2]/100;return n=-.9689*r+1.8758*s+.0415*o,i=.0557*r+-.204*s+1.057*o,t=(t=3.2406*r+-1.5372*s+-.4986*o)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:12.92*i,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(i=Math.min(Math.max(0,i),1))]},r.xyz.lab=function(e){var t=e[0],n=e[1],i=e[2];return n/=100,i/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},r.lab.xyz=function(e){var t,n,i;t=e[1]/500+(n=(e[0]+16)/116),i=n-e[2]/200;var r=Math.pow(n,3),s=Math.pow(t,3),o=Math.pow(i,3);return n=r>.008856?r:(n-16/116)/7.787,t=s>.008856?s:(t-16/116)/7.787,i=o>.008856?o:(i-16/116)/7.787,[t*=95.047,n*=100,i*=108.883]},r.lab.lch=function(e){var t,n=e[0],i=e[1],r=e[2];return(t=360*Math.atan2(r,i)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(i*i+r*r),t]},r.lch.lab=function(e){var t,n=e[1];return t=e[2]/360*2*Math.PI,[e[0],n*Math.cos(t),n*Math.sin(t)]},r.rgb.ansi16=function(e){var t=e[0],n=e[1],i=e[2],s=1 in arguments?arguments[1]:r.rgb.hsv(e)[2];if(0===(s=Math.round(s/50)))return 30;var o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(t/255));return 2===s&&(o+=60),o},r.hsv.ansi16=function(e){return r.rgb.ansi16(r.hsv.rgb(e),e[2])},r.rgb.ansi256=function(e){var t=e[0],n=e[1],i=e[2];return t===n&&n===i?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},r.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},r.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var n;return e-=16,[Math.floor(e/36)/5*255,Math.floor((n=e%36)/6)/5*255,n%6/5*255]},r.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},r.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map((function(e){return e+e})).join(""));var i=parseInt(n,16);return[i>>16&255,i>>8&255,255&i]},r.rgb.hcg=function(e){var t,n=e[0]/255,i=e[1]/255,r=e[2]/255,s=Math.max(Math.max(n,i),r),o=Math.min(Math.min(n,i),r),a=s-o;return t=a<=0?0:s===n?(i-r)/a%6:s===i?2+(r-n)/a:4+(n-i)/a+4,t/=6,[360*(t%=1),100*a,100*(a<1?o/(1-a):0)]},r.hsl.hcg=function(e){var t,n=e[1]/100,i=e[2]/100,r=0;return(t=i<.5?2*n*i:2*n*(1-i))<1&&(r=(i-.5*t)/(1-t)),[e[0],100*t,100*r]},r.hsv.hcg=function(e){var t=e[2]/100,n=e[1]/100*t,i=0;return n<1&&(i=(t-n)/(1-n)),[e[0],100*n,100*i]},r.hcg.rgb=function(e){var t=e[1]/100,n=e[2]/100;if(0===t)return[255*n,255*n,255*n];var i,r=[0,0,0],s=e[0]/360%1*6,o=s%1,a=1-o;switch(Math.floor(s)){case 0:r[0]=1,r[1]=o,r[2]=0;break;case 1:r[0]=a,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=o;break;case 3:r[0]=0,r[1]=a,r[2]=1;break;case 4:r[0]=o,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=a}return[255*(t*r[0]+(i=(1-t)*n)),255*(t*r[1]+i),255*(t*r[2]+i)]},r.hcg.hsv=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t),i=0;return n>0&&(i=t/n),[e[0],100*i,100*n]},r.hcg.hsl=function(e){var t=e[1]/100,n=e[2]/100*(1-t)+.5*t,i=0;return n>0&&n<.5?i=t/(2*n):n>=.5&&n<1&&(i=t/(2*(1-n))),[e[0],100*i,100*n]},r.hcg.hwb=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},r.hwb.hcg=function(e){var t=1-e[2]/100,n=t-e[1]/100,i=0;return n<1&&(i=(t-n)/(1-n)),[e[0],100*n,100*i]},r.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},r.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},r.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},r.gray.hsl=r.gray.hsv=function(e){return[0,0,e[0]]},r.gray.hwb=function(e){return[0,100,e[0]]},r.gray.cmyk=function(e){return[0,0,0,e[0]]},r.gray.lab=function(e){return[e[0],0,0]},r.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},r.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}}(n={exports:{}}),n.exports}();function i(e,t){return function(n){return t(e(n))}}function r(e,t){for(var r=[t[e].parent,e],s=n[t[e].parent][e],o=t[e].parent;t[o].parent;)r.unshift(t[o].parent),s=i(n[t[o].parent][o],s),o=t[o].parent;return s.conversion=r,s}var s={};Object.keys(n).forEach((function(e){s[e]={},Object.defineProperty(s[e],"channels",{value:n[e].channels}),Object.defineProperty(s[e],"labels",{value:n[e].labels});var t=function(e){for(var t=function(e){var t=function(){for(var e={},t=Object.keys(n),i=t.length,r=0;r<i;r++)e[t[r]]={distance:-1,parent:null};return e}(),i=[e];for(t[e].distance=0;i.length;)for(var r=i.pop(),s=Object.keys(n[r]),o=s.length,a=0;a<o;a++){var c=s[a],l=t[c];-1===l.distance&&(l.distance=t[r].distance+1,l.parent=r,i.unshift(c))}return t}(e),i={},s=Object.keys(t),o=s.length,a=0;a<o;a++){var c=s[a];null!==t[c].parent&&(i[c]=r(c,t))}return i}(e);Object.keys(t).forEach((function(n){var i=t[n];s[e][n]=function(e){var t=function(t){if(null==t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var n=e(t);if("object"==typeof n)for(var i=n.length,r=0;r<i;r++)n[r]=Math.round(n[r]);return n};return"conversion"in e&&(t.conversion=e.conversion),t}(i),s[e][n].raw=function(e){var t=function(t){return null==t?t:(arguments.length>1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(i)}))}));var o=s,a={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},c={getRgba:l,getHsla:u,getRgb:function(e){var t=l(e);return t&&t.slice(0,3)},getHsl:function(e){var t=u(e);return t&&t.slice(0,3)},getHwb:d,getAlpha:function(e){var t=l(e);return t||(t=u(e))||(t=d(e))?t[3]:void 0},hexString:function(e,t){return t=void 0!==t&&3===e.length?t:e[3],"#"+b(e[0])+b(e[1])+b(e[2])+(t>=0&&t<1?b(Math.round(255*t)):"")},rgbString:function(e,t){return t<1||e[3]&&e[3]<1?h(e,t):"rgb("+e[0]+", "+e[1]+", "+e[2]+")"},rgbaString:h,percentString:function(e,t){return t<1||e[3]&&e[3]<1?f(e,t):"rgb("+Math.round(e[0]/255*100)+"%, "+Math.round(e[1]/255*100)+"%, "+Math.round(e[2]/255*100)+"%)"},percentaString:f,hslString:function(e,t){return t<1||e[3]&&e[3]<1?p(e,t):"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)"},hslaString:p,hwbString:function(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+(void 0!==t&&1!==t?", "+t:"")+")"},keyword:function(e){return g[e.slice(0,3)]}};function l(e){if(e){var t=[0,0,0],n=1,i=e.match(/^#([a-fA-F0-9]{3,4})$/i),r="";if(i){r=(i=i[1])[3];for(var s=0;s<t.length;s++)t[s]=parseInt(i[s]+i[s],16);r&&(n=Math.round(parseInt(r+r,16)/255*100)/100)}else if(i=e.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){for(r=i[2],i=i[1],s=0;s<t.length;s++)t[s]=parseInt(i.slice(2*s,2*s+2),16);r&&(n=Math.round(parseInt(r,16)/255*100)/100)}else if(i=e.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(s=0;s<t.length;s++)t[s]=parseInt(i[s+1]);n=parseFloat(i[4])}else if(i=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(s=0;s<t.length;s++)t[s]=Math.round(2.55*parseFloat(i[s+1]));n=parseFloat(i[4])}else if(i=e.match(/(\w+)/)){if("transparent"==i[1])return[0,0,0,0];if(!(t=a[i[1]]))return}for(s=0;s<t.length;s++)t[s]=m(t[s],0,255);return n=n||0==n?m(n,0,1):1,t[3]=n,t}}function u(e){if(e){var t=e.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(t){var n=parseFloat(t[4]);return[m(parseInt(t[1]),0,360),m(parseFloat(t[2]),0,100),m(parseFloat(t[3]),0,100),m(isNaN(n)?1:n,0,1)]}}}function d(e){if(e){var t=e.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(t){var n=parseFloat(t[4]);return[m(parseInt(t[1]),0,360),m(parseFloat(t[2]),0,100),m(parseFloat(t[3]),0,100),m(isNaN(n)?1:n,0,1)]}}}function h(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+t+")"}function f(e,t){return"rgba("+Math.round(e[0]/255*100)+"%, "+Math.round(e[1]/255*100)+"%, "+Math.round(e[2]/255*100)+"%, "+(t||e[3]||1)+")"}function p(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+t+")"}function m(e,t,n){return Math.min(Math.max(t,e),n)}function b(e){var t=e.toString(16).toUpperCase();return t.length<2?"0"+t:t}var g={};for(var _ in a)g[a[_]]=_;var y=function(e){return e instanceof y?e:this instanceof y?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof e?(t=c.getRgba(e))?this.setValues("rgb",t):(t=c.getHsla(e))?this.setValues("hsl",t):(t=c.getHwb(e))&&this.setValues("hwb",t):"object"==typeof e&&(void 0!==(t=e).r||void 0!==t.red?this.setValues("rgb",t):void 0!==t.l||void 0!==t.lightness?this.setValues("hsl",t):void 0!==t.v||void 0!==t.value?this.setValues("hsv",t):void 0!==t.w||void 0!==t.whiteness?this.setValues("hwb",t):void 0===t.c&&void 0===t.cyan||this.setValues("cmyk",t)))):new y(e);var t};y.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var e=this.values;return 1!==e.alpha?e.hwb.concat([e.alpha]):e.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var e=this.values;return e.rgb.concat([e.alpha])},hslaArray:function(){var e=this.values;return e.hsl.concat([e.alpha])},alpha:function(e){return void 0===e?this.values.alpha:(this.setValues("alpha",e),this)},red:function(e){return this.setChannel("rgb",0,e)},green:function(e){return this.setChannel("rgb",1,e)},blue:function(e){return this.setChannel("rgb",2,e)},hue:function(e){return e&&(e=(e%=360)<0?360+e:e),this.setChannel("hsl",0,e)},saturation:function(e){return this.setChannel("hsl",1,e)},lightness:function(e){return this.setChannel("hsl",2,e)},saturationv:function(e){return this.setChannel("hsv",1,e)},whiteness:function(e){return this.setChannel("hwb",1,e)},blackness:function(e){return this.setChannel("hwb",2,e)},value:function(e){return this.setChannel("hsv",2,e)},cyan:function(e){return this.setChannel("cmyk",0,e)},magenta:function(e){return this.setChannel("cmyk",1,e)},yellow:function(e){return this.setChannel("cmyk",2,e)},black:function(e){return this.setChannel("cmyk",3,e)},hexString:function(){return c.hexString(this.values.rgb)},rgbString:function(){return c.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return c.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return c.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return c.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return c.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return c.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return c.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var e=this.values.rgb;return e[0]<<16|e[1]<<8|e[2]},luminosity:function(){for(var e=this.values.rgb,t=[],n=0;n<e.length;n++){var i=e[n]/255;t[n]=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast:function(e){var t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},dark:function(){var e=this.values.rgb;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var e=[],t=0;t<3;t++)e[t]=255-this.values.rgb[t];return this.setValues("rgb",e),this},lighten:function(e){var t=this.values.hsl;return t[2]+=t[2]*e,this.setValues("hsl",t),this},darken:function(e){var t=this.values.hsl;return t[2]-=t[2]*e,this.setValues("hsl",t),this},saturate:function(e){var t=this.values.hsl;return t[1]+=t[1]*e,this.setValues("hsl",t),this},desaturate:function(e){var t=this.values.hsl;return t[1]-=t[1]*e,this.setValues("hsl",t),this},whiten:function(e){var t=this.values.hwb;return t[1]+=t[1]*e,this.setValues("hwb",t),this},blacken:function(e){var t=this.values.hwb;return t[2]+=t[2]*e,this.setValues("hwb",t),this},greyscale:function(){var e=this.values.rgb,t=.3*e[0]+.59*e[1]+.11*e[2];return this.setValues("rgb",[t,t,t]),this},clearer:function(e){var t=this.values.alpha;return this.setValues("alpha",t-t*e),this},opaquer:function(e){var t=this.values.alpha;return this.setValues("alpha",t+t*e),this},rotate:function(e){var t=this.values.hsl,n=(t[0]+e)%360;return t[0]=n<0?360+n:n,this.setValues("hsl",t),this},mix:function(e,t){var n=this,i=e,r=void 0===t?.5:t,s=2*r-1,o=n.alpha()-i.alpha(),a=((s*o==-1?s:(s+o)/(1+s*o))+1)/2,c=1-a;return this.rgb(a*n.red()+c*i.red(),a*n.green()+c*i.green(),a*n.blue()+c*i.blue()).alpha(n.alpha()*r+i.alpha()*(1-r))},toJSON:function(){return this.rgb()},clone:function(){var e,t,n=new y,i=this.values,r=n.values;for(var s in i)i.hasOwnProperty(s)&&("[object Array]"===(t={}.toString.call(e=i[s]))?r[s]=e.slice(0):"[object Number]"===t?r[s]=e:console.error("unexpected color value:",e));return n}},y.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},y.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},y.prototype.getValues=function(e){for(var t=this.values,n={},i=0;i<e.length;i++)n[e.charAt(i)]=t[e][i];return 1!==t.alpha&&(n.a=t.alpha),n},y.prototype.setValues=function(e,t){var n,i,r=this.values,s=this.spaces,a=this.maxes,c=1;if(this.valid=!0,"alpha"===e)c=t;else if(t.length)r[e]=t.slice(0,e.length),c=t[e.length];else if(void 0!==t[e.charAt(0)]){for(n=0;n<e.length;n++)r[e][n]=t[e.charAt(n)];c=t.a}else if(void 0!==t[s[e][0]]){var l=s[e];for(n=0;n<e.length;n++)r[e][n]=t[l[n]];c=t.alpha}if(r.alpha=Math.max(0,Math.min(1,void 0===c?r.alpha:c)),"alpha"===e)return!1;for(n=0;n<e.length;n++)i=Math.max(0,Math.min(a[e][n],r[e][n])),r[e][n]=Math.round(i);for(var u in s)u!==e&&(r[u]=o[e][u](r[e]));return!0},y.prototype.setSpace=function(e,t){var n=t[0];return void 0===n?this.getValues(e):("number"==typeof n&&(n=Array.prototype.slice.call(t)),this.setValues(e,n),this)},y.prototype.setChannel=function(e,t,n){var i=this.values[e];return void 0===n?i[t]:(n===i[t]||(i[t]=n,this.setValues(e,i)),this)},"undefined"!=typeof window&&(window.Color=y);var v=y;function w(e){return-1===["__proto__","prototype","constructor"].indexOf(e)}var S,M={noop:function(){},uid:(S=0,function(){return S++}),isNullOrUndef:function(e){return null==e},isArray:function(e){if(Array.isArray&&Array.isArray(e))return!0;var t=Object.prototype.toString.call(e);return"[object"===t.substr(0,7)&&"Array]"===t.substr(-6)},isObject:function(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)},isFinite:function(e){return("number"==typeof e||e instanceof Number)&&isFinite(e)},valueOrDefault:function(e,t){return void 0===e?t:e},valueAtIndexOrDefault:function(e,t,n){return M.valueOrDefault(M.isArray(e)?e[t]:e,n)},callback:function(e,t,n){if(e&&"function"==typeof e.call)return e.apply(n,t)},each:function(e,t,n,i){var r,s,o;if(M.isArray(e))if(s=e.length,i)for(r=s-1;r>=0;r--)t.call(n,e[r],r);else for(r=0;r<s;r++)t.call(n,e[r],r);else if(M.isObject(e))for(s=(o=Object.keys(e)).length,r=0;r<s;r++)t.call(n,e[o[r]],o[r])},arrayEquals:function(e,t){var n,i,r,s;if(!e||!t||e.length!==t.length)return!1;for(n=0,i=e.length;n<i;++n)if(s=t[n],(r=e[n])instanceof Array&&s instanceof Array){if(!M.arrayEquals(r,s))return!1}else if(r!==s)return!1;return!0},clone:function(e){if(M.isArray(e))return e.map(M.clone);if(M.isObject(e)){for(var t=Object.create(e),n=Object.keys(e),i=n.length,r=0;r<i;++r)t[n[r]]=M.clone(e[n[r]]);return t}return e},_merger:function(e,t,n,i){if(w(e)){var r=t[e],s=n[e];M.isObject(r)&&M.isObject(s)?M.merge(r,s,i):t[e]=M.clone(s)}},_mergerIf:function(e,t,n){if(w(e)){var i=t[e],r=n[e];M.isObject(i)&&M.isObject(r)?M.mergeIf(i,r):t.hasOwnProperty(e)||(t[e]=M.clone(r))}},merge:function(e,t,n){var i,r,s,o,a,c=M.isArray(t)?t:[t],l=c.length;if(!M.isObject(e))return e;for(i=(n=n||{}).merger||M._merger,r=0;r<l;++r)if(M.isObject(t=c[r]))for(a=0,o=(s=Object.keys(t)).length;a<o;++a)i(s[a],e,t,n);return e},mergeIf:function(e,t){return M.merge(e,t,{merger:M._mergerIf})},extend:Object.assign||function(e){return M.merge(e,[].slice.call(arguments,1),{merger:function(e,t,n){t[e]=n[e]}})},inherits:function(e){var t=this,n=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return t.apply(this,arguments)},i=function(){this.constructor=n};return i.prototype=t.prototype,n.prototype=new i,n.extend=M.inherits,e&&M.extend(n.prototype,e),n.__super__=t.prototype,n},_deprecated:function(e,t,n,i){void 0!==t&&console.warn(e+': "'+n+'" is deprecated. Please use "'+i+'" instead')}},x=M;M.callCallback=M.callback,M.indexOf=function(e,t,n){return Array.prototype.indexOf.call(e,t,n)},M.getValueOrDefault=M.valueOrDefault,M.getValueAtIndexOrDefault=M.valueAtIndexOrDefault;var k={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return-e*(e-2)},easeInOutQuad:function(e){return(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1)},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return(e-=1)*e*e+1},easeInOutCubic:function(e){return(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return-((e-=1)*e*e*e-1)},easeInOutQuart:function(e){return(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return(e-=1)*e*e*e*e+1},easeInOutQuint:function(e){return(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},easeInSine:function(e){return 1-Math.cos(e*(Math.PI/2))},easeOutSine:function(e){return Math.sin(e*(Math.PI/2))},easeInOutSine:function(e){return-.5*(Math.cos(Math.PI*e)-1)},easeInExpo:function(e){return 0===e?0:Math.pow(2,10*(e-1))},easeOutExpo:function(e){return 1===e?1:1-Math.pow(2,-10*e)},easeInOutExpo:function(e){return 0===e?0:1===e?1:(e/=.5)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*--e))},easeInCirc:function(e){return e>=1?e:-(Math.sqrt(1-e*e)-1)},easeOutCirc:function(e){return Math.sqrt(1-(e-=1)*e)},easeInOutCirc:function(e){return(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},easeInElastic:function(e){var t=1.70158,n=0,i=1;return 0===e?0:1===e?1:(n||(n=.3),i<1?(i=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/i),-i*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n))},easeOutElastic:function(e){var t=1.70158,n=0,i=1;return 0===e?0:1===e?1:(n||(n=.3),i<1?(i=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/n)+1)},easeInOutElastic:function(e){var t=1.70158,n=0,i=1;return 0===e?0:2==(e/=.5)?1:(n||(n=.45),i<1?(i=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/i),e<1?i*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.5+1)},easeInBack:function(e){var t=1.70158;return e*e*((t+1)*e-t)},easeOutBack:function(e){var t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack:function(e){var t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:function(e){return 1-k.easeOutBounce(1-e)},easeOutBounce:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:function(e){return e<.5?.5*k.easeInBounce(2*e):.5*k.easeOutBounce(2*e-1)+.5}},D={effects:k};x.easingEffects=k;var T=Math.PI,C=T/180,O=2*T,L=T/2,R=T/4,E=2*T/3,A={clear:function(e){e.ctx.clearRect(0,0,e.width,e.height)},roundedRect:function(e,t,n,i,r,s){if(s){var o=Math.min(s,r/2,i/2),a=t+o,c=n+o,l=t+i-o,u=n+r-o;e.moveTo(t,c),a<l&&c<u?(e.arc(a,c,o,-T,-L),e.arc(l,c,o,-L,0),e.arc(l,u,o,0,L),e.arc(a,u,o,L,T)):a<l?(e.moveTo(a,n),e.arc(l,c,o,-L,L),e.arc(a,c,o,L,T+L)):c<u?(e.arc(a,c,o,-T,0),e.arc(a,u,o,0,T)):e.arc(a,c,o,-T,T),e.closePath(),e.moveTo(t,n)}else e.rect(t,n,i,r)},drawPoint:function(e,t,n,i,r,s){var o,a,c,l,u,d=(s||0)*C;if(t&&"object"==typeof t&&("[object HTMLImageElement]"===(o=t.toString())||"[object HTMLCanvasElement]"===o))return e.save(),e.translate(i,r),e.rotate(d),e.drawImage(t,-t.width/2,-t.height/2,t.width,t.height),void e.restore();if(!(isNaN(n)||n<=0)){switch(e.beginPath(),t){default:e.arc(i,r,n,0,O),e.closePath();break;case"triangle":e.moveTo(i+Math.sin(d)*n,r-Math.cos(d)*n),d+=E,e.lineTo(i+Math.sin(d)*n,r-Math.cos(d)*n),d+=E,e.lineTo(i+Math.sin(d)*n,r-Math.cos(d)*n),e.closePath();break;case"rectRounded":l=n-(u=.516*n),a=Math.cos(d+R)*l,c=Math.sin(d+R)*l,e.arc(i-a,r-c,u,d-T,d-L),e.arc(i+c,r-a,u,d-L,d),e.arc(i+a,r+c,u,d,d+L),e.arc(i-c,r+a,u,d+L,d+T),e.closePath();break;case"rect":if(!s){l=Math.SQRT1_2*n,e.rect(i-l,r-l,2*l,2*l);break}d+=R;case"rectRot":a=Math.cos(d)*n,c=Math.sin(d)*n,e.moveTo(i-a,r-c),e.lineTo(i+c,r-a),e.lineTo(i+a,r+c),e.lineTo(i-c,r+a),e.closePath();break;case"crossRot":d+=R;case"cross":a=Math.cos(d)*n,c=Math.sin(d)*n,e.moveTo(i-a,r-c),e.lineTo(i+a,r+c),e.moveTo(i+c,r-a),e.lineTo(i-c,r+a);break;case"star":a=Math.cos(d)*n,c=Math.sin(d)*n,e.moveTo(i-a,r-c),e.lineTo(i+a,r+c),e.moveTo(i+c,r-a),e.lineTo(i-c,r+a),d+=R,a=Math.cos(d)*n,c=Math.sin(d)*n,e.moveTo(i-a,r-c),e.lineTo(i+a,r+c),e.moveTo(i+c,r-a),e.lineTo(i-c,r+a);break;case"line":a=Math.cos(d)*n,c=Math.sin(d)*n,e.moveTo(i-a,r-c),e.lineTo(i+a,r+c);break;case"dash":e.moveTo(i,r),e.lineTo(i+Math.cos(d)*n,r+Math.sin(d)*n)}e.fill(),e.stroke()}},_isPointInArea:function(e,t){var n=1e-6;return e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n},clipArea:function(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()},unclipArea:function(e){e.restore()},lineTo:function(e,t,n,i){var r=n.steppedLine;if(r){if("middle"===r){var s=(t.x+n.x)/2;e.lineTo(s,i?n.y:t.y),e.lineTo(s,i?t.y:n.y)}else"after"===r&&!i||"after"!==r&&i?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}else n.tension?e.bezierCurveTo(i?t.controlPointPreviousX:t.controlPointNextX,i?t.controlPointPreviousY:t.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):e.lineTo(n.x,n.y)}},I=A;x.clear=A.clear,x.drawRoundedRectangle=function(e){e.beginPath(),A.roundedRect.apply(A,arguments)};var P={_set:function(e,t){return x.merge(this[e]||(this[e]={}),t)}};P._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0});var j=P,N=x.valueOrDefault,F={toLineHeight:function(e,t){var n=(""+e).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||"normal"===n[1])return 1.2*t;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100}return t*e},toPadding:function(e){var t,n,i,r;return x.isObject(e)?(t=+e.top||0,n=+e.right||0,i=+e.bottom||0,r=+e.left||0):t=n=i=r=+e||0,{top:t,right:n,bottom:i,left:r,height:t+i,width:r+n}},_parseFont:function(e){var t=j.global,n=N(e.fontSize,t.defaultFontSize),i={family:N(e.fontFamily,t.defaultFontFamily),lineHeight:x.options.toLineHeight(N(e.lineHeight,t.defaultLineHeight),n),size:n,style:N(e.fontStyle,t.defaultFontStyle),weight:null,string:""};return i.string=function(e){return!e||x.isNullOrUndef(e.size)||x.isNullOrUndef(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}(i),i},resolve:function(e,t,n,i){var r,s,o,a=!0;for(r=0,s=e.length;r<s;++r)if(void 0!==(o=e[r])&&(void 0!==t&&"function"==typeof o&&(o=o(t),a=!1),void 0!==n&&x.isArray(o)&&(o=o[n],a=!1),void 0!==o))return i&&!a&&(i.cacheable=!1),o}},Y={_factorize:function(e){var t,n=[],i=Math.sqrt(e);for(t=1;t<i;t++)e%t==0&&(n.push(t),n.push(e/t));return i===(0|i)&&n.push(i),n.sort((function(e,t){return e-t})).pop(),n},log10:Math.log10||function(e){var t=Math.log(e)*Math.LOG10E,n=Math.round(t);return e===Math.pow(10,n)?n:t}},z=Y;x.log10=Y.log10;var $=x,H=I,W=F,V=z;$.easing=D,$.canvas=H,$.options=W,$.math=V,$.rtl={getRtlAdapter:function(e,t,n){return e?function(e,t){return{x:function(n){return e+e+t-n},setWidth:function(e){t=e},textAlign:function(e){return"center"===e?e:"right"===e?"left":"right"},xPlus:function(e,t){return e-t},leftForLtr:function(e,t){return e-t}}}(t,n):{x:function(e){return e},setWidth:function(e){},textAlign:function(e){return e},xPlus:function(e,t){return e+t},leftForLtr:function(e,t){return e}}},overrideTextDirection:function(e,t){var n,i;"ltr"!==t&&"rtl"!==t||(i=[(n=e.canvas.style).getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=i)},restoreTextDirection:function(e){var t=e.prevTextDirection;void 0!==t&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}};var B=function(e){$.extend(this,e),this.initialize.apply(this,arguments)};$.extend(B.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){var e=this;return e._view||(e._view=$.extend({},e._model)),e._start={},e},transition:function(e){var t=this,n=t._model,i=t._start,r=t._view;return n&&1!==e?(r||(r=t._view={}),i||(i=t._start={}),function(e,t,n,i){var r,s,o,a,c,l,u,d,h,f=Object.keys(n);for(r=0,s=f.length;r<s;++r)if(l=n[o=f[r]],t.hasOwnProperty(o)||(t[o]=l),(a=t[o])!==l&&"_"!==o[0]){if(e.hasOwnProperty(o)||(e[o]=a),(u=typeof l)==typeof(c=e[o]))if("string"===u){if((d=v(c)).valid&&(h=v(l)).valid){t[o]=h.mix(d,i).rgbString();continue}}else if($.isFinite(c)&&$.isFinite(l)){t[o]=c+(l-c)*i;continue}t[o]=l}}(i,r,n,e),t):(t._view=$.extend({},n),t._start=null,t)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return $.isNumber(this._model.x)&&$.isNumber(this._model.y)}}),B.extend=$.inherits;var U=B,q=U.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),G=q;Object.defineProperty(q.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(q.prototype,"chartInstance",{get:function(){return this.chart},set:function(e){this.chart=e}}),j._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:$.noop,onComplete:$.noop}});var J={animations:[],request:null,addAnimation:function(e,t,n,i){var r,s,o=this.animations;for(t.chart=e,t.startTime=Date.now(),t.duration=n,i||(e.animating=!0),r=0,s=o.length;r<s;++r)if(o[r].chart===e)return void(o[r]=t);o.push(t),1===o.length&&this.requestAnimationFrame()},cancelAnimation:function(e){var t=$.findIndex(this.animations,(function(t){return t.chart===e}));-1!==t&&(this.animations.splice(t,1),e.animating=!1)},requestAnimationFrame:function(){var e=this;null===e.request&&(e.request=$.requestAnimFrame.call(window,(function(){e.request=null,e.startDigest()})))},startDigest:function(){var e=this;e.advance(),e.animations.length>0&&e.requestAnimationFrame()},advance:function(){for(var e,t,n,i,r=this.animations,s=0;s<r.length;)t=(e=r[s]).chart,n=e.numSteps,i=Math.floor((Date.now()-e.startTime)/e.duration*n)+1,e.currentStep=Math.min(i,n),$.callback(e.render,[t,e],t),$.callback(e.onAnimationProgress,[e],t),e.currentStep>=n?($.callback(e.onAnimationComplete,[e],t),t.animating=!1,r.splice(s,1)):++s}},Q=$.options.resolve,K=["push","pop","shift","splice","unshift"];function Z(e,t){var n=e._chartjs;if(n){var i=n.listeners,r=i.indexOf(t);-1!==r&&i.splice(r,1),i.length>0||(K.forEach((function(t){delete e[t]})),delete e._chartjs)}}var X=function(e,t){this.initialize(e,t)};$.extend(X.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(e,t){var n=this;n.chart=e,n.index=t,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(e){this.index=e},linkScales:function(){var e=this,t=e.getMeta(),n=e.chart,i=n.scales,r=e.getDataset(),s=n.options.scales;null!==t.xAxisID&&t.xAxisID in i&&!r.xAxisID||(t.xAxisID=r.xAxisID||s.xAxes[0].id),null!==t.yAxisID&&t.yAxisID in i&&!r.yAxisID||(t.yAxisID=r.yAxisID||s.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(e){return this.chart.scales[e]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&Z(this._data,this)},createMetaDataset:function(){var e=this,t=e.datasetElementType;return t&&new t({_chart:e.chart,_datasetIndex:e.index})},createMetaData:function(e){var t=this,n=t.dataElementType;return n&&new n({_chart:t.chart,_datasetIndex:t.index,_index:e})},addElements:function(){var e,t,n=this,i=n.getMeta(),r=n.getDataset().data||[],s=i.data;for(e=0,t=r.length;e<t;++e)s[e]=s[e]||n.createMetaData(e);i.dataset=i.dataset||n.createMetaDataset()},addElementAndReset:function(e){var t=this.createMetaData(e);this.getMeta().data.splice(e,0,t),this.updateElement(t,e,!0)},buildOrUpdateElements:function(){var e,t,n=this,i=n.getDataset(),r=i.data||(i.data=[]);n._data!==r&&(n._data&&Z(n._data,n),r&&Object.isExtensible(r)&&(t=n,(e=r)._chartjs?e._chartjs.listeners.push(t):(Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),K.forEach((function(t){var n="onData"+t.charAt(0).toUpperCase()+t.slice(1),i=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:function(){var t=Array.prototype.slice.call(arguments),r=i.apply(this,t);return $.each(e._chartjs.listeners,(function(e){"function"==typeof e[n]&&e[n].apply(e,t)})),r}})})))),n._data=r),n.resyncElements()},_configure:function(){var e=this;e._config=$.merge(Object.create(null),[e.chart.options.datasets[e._type],e.getDataset()],{merger:function(e,t,n){"_meta"!==e&&"data"!==e&&$._merger(e,t,n)}})},_update:function(e){var t=this;t._configure(),t._cachedDataOpts=null,t.update(e)},update:$.noop,transition:function(e){for(var t=this.getMeta(),n=t.data||[],i=n.length,r=0;r<i;++r)n[r].transition(e);t.dataset&&t.dataset.transition(e)},draw:function(){var e=this.getMeta(),t=e.data||[],n=t.length,i=0;for(e.dataset&&e.dataset.draw();i<n;++i)t[i].draw()},getStyle:function(e){var t,n=this,i=n.getMeta(),r=i.dataset;return n._configure(),!1!==(t=r&&void 0===e?n._resolveDatasetElementOptions(r||{}):n._resolveDataElementOptions(i.data[e=e||0]||{},e)).fill&&null!==t.fill||(t.backgroundColor=t.borderColor),t},_resolveDatasetElementOptions:function(e,t){var n,i,r,s,o=this,a=o.chart,c=o._config,l=e.custom||{},u=a.options.elements[o.datasetElementType.prototype._type]||{},d=o._datasetElementOptions,h={},f={chart:a,dataset:o.getDataset(),datasetIndex:o.index,hover:t};for(n=0,i=d.length;n<i;++n)r=d[n],s=t?"hover"+r.charAt(0).toUpperCase()+r.slice(1):r,h[r]=Q([l[s],c[s],u[s]],f);return h},_resolveDataElementOptions:function(e,t){var n=this,i=e&&e.custom,r=n._cachedDataOpts;if(r&&!i)return r;var s,o,a,c,l=n.chart,u=n._config,d=l.options.elements[n.dataElementType.prototype._type]||{},h=n._dataElementOptions,f={},p={chart:l,dataIndex:t,dataset:n.getDataset(),datasetIndex:n.index},m={cacheable:!i};if(i=i||{},$.isArray(h))for(o=0,a=h.length;o<a;++o)f[c=h[o]]=Q([i[c],u[c],d[c]],p,t,m);else for(o=0,a=(s=Object.keys(h)).length;o<a;++o)f[c=s[o]]=Q([i[c],u[h[c]],u[c],d[c]],p,t,m);return m.cacheable&&(n._cachedDataOpts=Object.freeze(f)),f},removeHoverStyle:function(e){$.merge(e._model,e.$previousStyle||{}),delete e.$previousStyle},setHoverStyle:function(e){var t=this.chart.data.datasets[e._datasetIndex],n=e._index,i=e.custom||{},r=e._model,s=$.getHoverColor;e.$previousStyle={backgroundColor:r.backgroundColor,borderColor:r.borderColor,borderWidth:r.borderWidth},r.backgroundColor=Q([i.hoverBackgroundColor,t.hoverBackgroundColor,s(r.backgroundColor)],void 0,n),r.borderColor=Q([i.hoverBorderColor,t.hoverBorderColor,s(r.borderColor)],void 0,n),r.borderWidth=Q([i.hoverBorderWidth,t.hoverBorderWidth,r.borderWidth],void 0,n)},_removeDatasetHoverStyle:function(){var e=this.getMeta().dataset;e&&this.removeHoverStyle(e)},_setDatasetHoverStyle:function(){var e,t,n,i,r,s,o=this.getMeta().dataset,a={};if(o){for(s=o._model,r=this._resolveDatasetElementOptions(o,!0),e=0,t=(i=Object.keys(r)).length;e<t;++e)a[n=i[e]]=s[n],s[n]=r[n];o.$previousStyle=a}},resyncElements:function(){var e=this,t=e.getMeta(),n=e.getDataset().data,i=t.data.length,r=n.length;r<i?t.data.splice(r,i-r):r>i&&e.insertElements(i,r-i)},insertElements:function(e,t){for(var n=0;n<t;++n)this.addElementAndReset(e+n)},onDataPush:function(){var e=arguments.length;this.insertElements(this.getDataset().data.length-e,e)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(e,t){this.getMeta().data.splice(e,t),this.insertElements(e,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),X.extend=$.inherits;var ee=X,te=2*Math.PI;function ne(e,t){var n=t.startAngle,i=t.endAngle,r=t.pixelMargin,s=r/t.outerRadius,o=t.x,a=t.y;e.beginPath(),e.arc(o,a,t.outerRadius,n-s,i+s),t.innerRadius>r?e.arc(o,a,t.innerRadius-r,i+(s=r/t.innerRadius),n-s,!0):e.arc(o,a,r,i+Math.PI/2,n-Math.PI/2),e.closePath(),e.clip()}j._set("global",{elements:{arc:{backgroundColor:j.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var ie=U.extend({_type:"arc",inLabelRange:function(e){var t=this._view;return!!t&&Math.pow(e-t.x,2)<Math.pow(t.radius+t.hoverRadius,2)},inRange:function(e,t){var n=this._view;if(n){for(var i=$.getAngleFromPoint(n,{x:e,y:t}),r=i.angle,s=i.distance,o=n.startAngle,a=n.endAngle;a<o;)a+=te;for(;r>a;)r-=te;for(;r<o;)r+=te;return r>=o&&r<=a&&s>=n.innerRadius&&s<=n.outerRadius}return!1},getCenterPoint:function(){var e=this._view,t=(e.startAngle+e.endAngle)/2,n=(e.innerRadius+e.outerRadius)/2;return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}},getArea:function(){var e=this._view;return Math.PI*((e.endAngle-e.startAngle)/(2*Math.PI))*(Math.pow(e.outerRadius,2)-Math.pow(e.innerRadius,2))},tooltipPosition:function(){var e=this._view,t=e.startAngle+(e.endAngle-e.startAngle)/2,n=(e.outerRadius-e.innerRadius)/2+e.innerRadius;return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}},draw:function(){var e,t=this._chart.ctx,n=this._view,i="inner"===n.borderAlign?.33:0,r={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-i,0),pixelMargin:i,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/te)};if(t.save(),t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,r.fullCircles){for(r.endAngle=r.startAngle+te,t.beginPath(),t.arc(r.x,r.y,r.outerRadius,r.startAngle,r.endAngle),t.arc(r.x,r.y,r.innerRadius,r.endAngle,r.startAngle,!0),t.closePath(),e=0;e<r.fullCircles;++e)t.fill();r.endAngle=r.startAngle+n.circumference%te}t.beginPath(),t.arc(r.x,r.y,r.outerRadius,r.startAngle,r.endAngle),t.arc(r.x,r.y,r.innerRadius,r.endAngle,r.startAngle,!0),t.closePath(),t.fill(),n.borderWidth&&function(e,t,n){var i="inner"===t.borderAlign;i?(e.lineWidth=2*t.borderWidth,e.lineJoin="round"):(e.lineWidth=t.borderWidth,e.lineJoin="bevel"),n.fullCircles&&function(e,t,n,i){var r,s=n.endAngle;for(i&&(n.endAngle=n.startAngle+te,ne(e,n),n.endAngle=s,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=te,n.fullCircles--)),e.beginPath(),e.arc(n.x,n.y,n.innerRadius,n.startAngle+te,n.startAngle,!0),r=0;r<n.fullCircles;++r)e.stroke();for(e.beginPath(),e.arc(n.x,n.y,t.outerRadius,n.startAngle,n.startAngle+te),r=0;r<n.fullCircles;++r)e.stroke()}(e,t,n,i),i&&ne(e,n),e.beginPath(),e.arc(n.x,n.y,t.outerRadius,n.startAngle,n.endAngle),e.arc(n.x,n.y,n.innerRadius,n.endAngle,n.startAngle,!0),e.closePath(),e.stroke()}(t,n,r),t.restore()}}),re=$.valueOrDefault,se=j.global.defaultColor;j._set("global",{elements:{line:{tension:.4,backgroundColor:se,borderWidth:3,borderColor:se,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var oe=U.extend({_type:"line",draw:function(){var e,t,n,i=this,r=i._view,s=i._chart.ctx,o=r.spanGaps,a=i._children.slice(),c=j.global,l=c.elements.line,u=-1,d=i._loop;if(a.length){if(i._loop){for(e=0;e<a.length;++e)if(t=$.previousItem(a,e),!a[e]._view.skip&&t._view.skip){a=a.slice(e).concat(a.slice(0,e)),d=o;break}d&&a.push(a[0])}for(s.save(),s.lineCap=r.borderCapStyle||l.borderCapStyle,s.setLineDash&&s.setLineDash(r.borderDash||l.borderDash),s.lineDashOffset=re(r.borderDashOffset,l.borderDashOffset),s.lineJoin=r.borderJoinStyle||l.borderJoinStyle,s.lineWidth=re(r.borderWidth,l.borderWidth),s.strokeStyle=r.borderColor||c.defaultColor,s.beginPath(),(n=a[0]._view).skip||(s.moveTo(n.x,n.y),u=0),e=1;e<a.length;++e)n=a[e]._view,t=-1===u?$.previousItem(a,e):a[u],n.skip||(u!==e-1&&!o||-1===u?s.moveTo(n.x,n.y):$.canvas.lineTo(s,t._view,n),u=e);d&&s.closePath(),s.stroke(),s.restore()}}}),ae=$.valueOrDefault,ce=j.global.defaultColor;function le(e){var t=this._view;return!!t&&Math.abs(e-t.x)<t.radius+t.hitRadius}j._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:ce,borderColor:ce,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var ue=U.extend({_type:"point",inRange:function(e,t){var n=this._view;return!!n&&Math.pow(e-n.x,2)+Math.pow(t-n.y,2)<Math.pow(n.hitRadius+n.radius,2)},inLabelRange:le,inXRange:le,inYRange:function(e){var t=this._view;return!!t&&Math.abs(e-t.y)<t.radius+t.hitRadius},getCenterPoint:function(){var e=this._view;return{x:e.x,y:e.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y,padding:e.radius+e.borderWidth}},draw:function(e){var t=this._view,n=this._chart.ctx,i=t.pointStyle,r=t.rotation,s=t.radius,o=t.x,a=t.y,c=j.global,l=c.defaultColor;t.skip||(void 0===e||$.canvas._isPointInArea(t,e))&&(n.strokeStyle=t.borderColor||l,n.lineWidth=ae(t.borderWidth,c.elements.point.borderWidth),n.fillStyle=t.backgroundColor||l,$.canvas.drawPoint(n,i,s,o,a,r))}}),de=j.global.defaultColor;function he(e){return e&&void 0!==e.width}function fe(e){var t,n,i,r,s;return he(e)?(t=e.x-(s=e.width/2),n=e.x+s,i=Math.min(e.y,e.base),r=Math.max(e.y,e.base)):(s=e.height/2,t=Math.min(e.x,e.base),n=Math.max(e.x,e.base),i=e.y-s,r=e.y+s),{left:t,top:i,right:n,bottom:r}}function pe(e,t,n){return e===t?n:e===n?t:e}function me(e,t,n){var i=null===t,r=null===n,s=!(!e||i&&r)&&fe(e);return s&&(i||t>=s.left&&t<=s.right)&&(r||n>=s.top&&n<=s.bottom)}j._set("global",{elements:{rectangle:{backgroundColor:de,borderColor:de,borderSkipped:"bottom",borderWidth:0}}});var be=U.extend({_type:"rectangle",draw:function(){var e=this._chart.ctx,t=this._view,n=function(e){var t=fe(e),n=t.right-t.left,i=t.bottom-t.top,r=function(e,t,n){var i,r,s,o,a=e.borderWidth,c=function(e){var t=e.borderSkipped,n={};return t?(e.horizontal?e.base>e.x&&(t=pe(t,"left","right")):e.base<e.y&&(t=pe(t,"bottom","top")),n[t]=!0,n):n}(e);return $.isObject(a)?(i=+a.top||0,r=+a.right||0,s=+a.bottom||0,o=+a.left||0):i=r=s=o=+a||0,{t:c.top||i<0?0:i>n?n:i,r:c.right||r<0?0:r>t?t:r,b:c.bottom||s<0?0:s>n?n:s,l:c.left||o<0?0:o>t?t:o}}(e,n/2,i/2);return{outer:{x:t.left,y:t.top,w:n,h:i},inner:{x:t.left+r.l,y:t.top+r.t,w:n-r.l-r.r,h:i-r.t-r.b}}}(t),i=n.outer,r=n.inner;e.fillStyle=t.backgroundColor,e.fillRect(i.x,i.y,i.w,i.h),i.w===r.w&&i.h===r.h||(e.save(),e.beginPath(),e.rect(i.x,i.y,i.w,i.h),e.clip(),e.fillStyle=t.borderColor,e.rect(r.x,r.y,r.w,r.h),e.fill("evenodd"),e.restore())},height:function(){var e=this._view;return e.base-e.y},inRange:function(e,t){return me(this._view,e,t)},inLabelRange:function(e,t){var n=this._view;return he(n)?me(n,e,null):me(n,null,t)},inXRange:function(e){return me(this._view,e,null)},inYRange:function(e){return me(this._view,null,e)},getCenterPoint:function(){var e,t,n=this._view;return he(n)?(e=n.x,t=(n.y+n.base)/2):(e=(n.x+n.base)/2,t=n.y),{x:e,y:t}},getArea:function(){var e=this._view;return he(e)?e.width*Math.abs(e.y-e.base):e.height*Math.abs(e.x-e.base)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y}}}),ge={},_e=oe,ye=ue,ve=be;ge.Arc=ie,ge.Line=_e,ge.Point=ye,ge.Rectangle=ve;var we=$._deprecated,Se=$.valueOrDefault;j._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),j._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var Me=ee.extend({dataElementType:ge.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var e,t,n=this;ee.prototype.initialize.apply(n,arguments),(e=n.getMeta()).stack=n.getDataset().stack,e.bar=!0,t=n._getIndexScale().options,we("bar chart",t.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),we("bar chart",t.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),we("bar chart",t.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),we("bar chart",n._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),we("bar chart",t.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(e){var t,n,i=this,r=i.getMeta().data;for(i._ruler=i.getRuler(),t=0,n=r.length;t<n;++t)i.updateElement(r[t],t,e)},updateElement:function(e,t,n){var i=this,r=i.getMeta(),s=i.getDataset(),o=i._resolveDataElementOptions(e,t);e._xScale=i.getScaleForId(r.xAxisID),e._yScale=i.getScaleForId(r.yAxisID),e._datasetIndex=i.index,e._index=t,e._model={backgroundColor:o.backgroundColor,borderColor:o.borderColor,borderSkipped:o.borderSkipped,borderWidth:o.borderWidth,datasetLabel:s.label,label:i.chart.data.labels[t]},$.isArray(s.data[t])&&(e._model.borderSkipped=null),i._updateElementGeometry(e,t,n,o),e.pivot()},_updateElementGeometry:function(e,t,n,i){var r=this,s=e._model,o=r._getValueScale(),a=o.getBasePixel(),c=o.isHorizontal(),l=r._ruler||r.getRuler(),u=r.calculateBarValuePixels(r.index,t,i),d=r.calculateBarIndexPixels(r.index,t,l,i);s.horizontal=c,s.base=n?a:u.base,s.x=c?n?a:u.head:d.center,s.y=c?d.center:n?a:u.head,s.height=c?d.size:void 0,s.width=c?void 0:d.size},_getStacks:function(e){var t,n,i=this._getIndexScale(),r=i._getMatchingVisibleMetas(this._type),s=i.options.stacked,o=r.length,a=[];for(t=0;t<o&&(n=r[t],(!1===s||-1===a.indexOf(n.stack)||void 0===s&&void 0===n.stack)&&a.push(n.stack),n.index!==e);++t);return a},getStackCount:function(){return this._getStacks().length},getStackIndex:function(e,t){var n=this._getStacks(e),i=void 0!==t?n.indexOf(t):-1;return-1===i?n.length-1:i},getRuler:function(){var e,t,n=this,i=n._getIndexScale(),r=[];for(e=0,t=n.getMeta().data.length;e<t;++e)r.push(i.getPixelForValue(null,e,n.index));return{pixels:r,start:i._startPixel,end:i._endPixel,stackCount:n.getStackCount(),scale:i}},calculateBarValuePixels:function(e,t,n){var i,r,s,o,a,c,l,u=this,d=u.chart,h=u._getValueScale(),f=h.isHorizontal(),p=d.data.datasets,m=h._getMatchingVisibleMetas(u._type),b=h._parseValue(p[e].data[t]),g=n.minBarLength,_=h.options.stacked,y=u.getMeta().stack,v=void 0===b.start?0:b.max>=0&&b.min>=0?b.min:b.max,w=void 0===b.start?b.end:b.max>=0&&b.min>=0?b.max-b.min:b.min-b.max,S=m.length;if(_||void 0===_&&void 0!==y)for(i=0;i<S&&(r=m[i]).index!==e;++i)r.stack===y&&(s=void 0===(l=h._parseValue(p[r.index].data[t])).start?l.end:l.min>=0&&l.max>=0?l.max:l.min,(b.min<0&&s<0||b.max>=0&&s>0)&&(v+=s));return o=h.getPixelForValue(v),c=(a=h.getPixelForValue(v+w))-o,void 0!==g&&Math.abs(c)<g&&(c=g,a=w>=0&&!f||w<0&&f?o-g:o+g),{size:c,base:o,head:a,center:a+c/2}},calculateBarIndexPixels:function(e,t,n,i){var r="flex"===i.barThickness?function(e,t,n){var i,r=t.pixels,s=r[e],o=e>0?r[e-1]:null,a=e<r.length-1?r[e+1]:null,c=n.categoryPercentage;return null===o&&(o=s-(null===a?t.end-t.start:a-s)),null===a&&(a=s+s-o),i=s-(s-Math.min(o,a))/2*c,{chunk:Math.abs(a-o)/2*c/t.stackCount,ratio:n.barPercentage,start:i}}(t,n,i):function(e,t,n){var i,r,s=n.barThickness,o=t.stackCount,a=t.pixels[e],c=$.isNullOrUndef(s)?function(e,t){var n,i,r,s,o=e._length;for(r=1,s=t.length;r<s;++r)o=Math.min(o,Math.abs(t[r]-t[r-1]));for(r=0,s=e.getTicks().length;r<s;++r)i=e.getPixelForTick(r),o=r>0?Math.min(o,Math.abs(i-n)):o,n=i;return o}(t.scale,t.pixels):-1;return $.isNullOrUndef(s)?(i=c*n.categoryPercentage,r=n.barPercentage):(i=s*o,r=1),{chunk:i/o,ratio:r,start:a-i/2}}(t,n,i),s=this.getStackIndex(e,this.getMeta().stack),o=r.start+r.chunk*s+r.chunk/2,a=Math.min(Se(i.maxBarThickness,1/0),r.chunk*r.ratio);return{base:o-a/2,head:o+a/2,center:o,size:a}},draw:function(){var e=this,t=e.chart,n=e._getValueScale(),i=e.getMeta().data,r=e.getDataset(),s=i.length,o=0;for($.canvas.clipArea(t.ctx,t.chartArea);o<s;++o){var a=n._parseValue(r.data[o]);isNaN(a.min)||isNaN(a.max)||i[o].draw()}$.canvas.unclipArea(t.ctx)},_resolveDataElementOptions:function(){var e=this,t=$.extend({},ee.prototype._resolveDataElementOptions.apply(e,arguments)),n=e._getIndexScale().options,i=e._getValueScale().options;return t.barPercentage=Se(n.barPercentage,t.barPercentage),t.barThickness=Se(n.barThickness,t.barThickness),t.categoryPercentage=Se(n.categoryPercentage,t.categoryPercentage),t.maxBarThickness=Se(n.maxBarThickness,t.maxBarThickness),t.minBarLength=Se(i.minBarLength,t.minBarLength),t}}),xe=$.valueOrDefault,ke=$.options.resolve;j._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(e,t){return(t.datasets[e.datasetIndex].label||"")+": ("+e.xLabel+", "+e.yLabel+", "+t.datasets[e.datasetIndex].data[e.index].r+")"}}}});var De=ee.extend({dataElementType:ge.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(e){var t=this,n=t.getMeta();$.each(n.data,(function(n,i){t.updateElement(n,i,e)}))},updateElement:function(e,t,n){var i=this,r=i.getMeta(),s=e.custom||{},o=i.getScaleForId(r.xAxisID),a=i.getScaleForId(r.yAxisID),c=i._resolveDataElementOptions(e,t),l=i.getDataset().data[t],u=i.index,d=n?o.getPixelForDecimal(.5):o.getPixelForValue("object"==typeof l?l:NaN,t,u),h=n?a.getBasePixel():a.getPixelForValue(l,t,u);e._xScale=o,e._yScale=a,e._options=c,e._datasetIndex=u,e._index=t,e._model={backgroundColor:c.backgroundColor,borderColor:c.borderColor,borderWidth:c.borderWidth,hitRadius:c.hitRadius,pointStyle:c.pointStyle,rotation:c.rotation,radius:n?0:c.radius,skip:s.skip||isNaN(d)||isNaN(h),x:d,y:h},e.pivot()},setHoverStyle:function(e){var t=e._model,n=e._options,i=$.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=xe(n.hoverBackgroundColor,i(n.backgroundColor)),t.borderColor=xe(n.hoverBorderColor,i(n.borderColor)),t.borderWidth=xe(n.hoverBorderWidth,n.borderWidth),t.radius=n.radius+n.hoverRadius},_resolveDataElementOptions:function(e,t){var n=this,i=n.chart,r=n.getDataset(),s=e.custom||{},o=r.data[t]||{},a=ee.prototype._resolveDataElementOptions.apply(n,arguments),c={chart:i,dataIndex:t,dataset:r,datasetIndex:n.index};return n._cachedDataOpts===a&&(a=$.extend({},a)),a.radius=ke([s.radius,o.r,n._config.radius,i.options.elements.point.radius],c,t),a}}),Te=$.valueOrDefault,Ce=Math.PI,Oe=2*Ce,Le=Ce/2;j._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(e){var t,n,i,r=document.createElement("ul"),s=e.data,o=s.datasets,a=s.labels;if(r.setAttribute("class",e.id+"-legend"),o.length)for(t=0,n=o[0].data.length;t<n;++t)(i=r.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[t],a[t]&&i.appendChild(document.createTextNode(a[t]));return r.outerHTML},legend:{labels:{generateLabels:function(e){var t=e.data;return t.labels.length&&t.datasets.length?t.labels.map((function(n,i){var r=e.getDatasetMeta(0),s=r.controller.getStyle(i);return{text:n,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,lineWidth:s.borderWidth,hidden:isNaN(t.datasets[0].data[i])||r.data[i].hidden,index:i}})):[]}},onClick:function(e,t){var n,i,r,s=t.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n<i;++n)(r=o.getDatasetMeta(n)).data[s]&&(r.data[s].hidden=!r.data[s].hidden);o.update()}},cutoutPercentage:50,rotation:-Le,circumference:Oe,tooltips:{callbacks:{title:function(){return""},label:function(e,t){var n=t.labels[e.index],i=": "+t.datasets[e.datasetIndex].data[e.index];return $.isArray(n)?(n=n.slice())[0]+=i:n+=i,n}}}});var Re=ee.extend({dataElementType:ge.Arc,linkScales:$.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function(e){for(var t=0,n=0;n<e;++n)this.chart.isDatasetVisible(n)&&++t;return t},update:function(e){var t,n,i=this,r=i.chart,s=r.chartArea,o=r.options,a=1,c=1,l=0,u=0,d=i.getMeta(),h=d.data,f=o.cutoutPercentage/100||0,p=o.circumference,m=i._getRingWeight(i.index);if(p<Oe){var b=o.rotation%Oe,g=(b+=b>=Ce?-Oe:b<-Ce?Oe:0)+p,_=Math.cos(b),y=Math.sin(b),v=Math.cos(g),w=Math.sin(g),S=b<=0&&g>=0||g>=Oe,M=b<=Le&&g>=Le||g>=Oe+Le,x=b<=-Le&&g>=-Le||g>=Ce+Le,k=b===-Ce||g>=Ce?-1:Math.min(_,_*f,v,v*f),D=x?-1:Math.min(y,y*f,w,w*f),T=S?1:Math.max(_,_*f,v,v*f),C=M?1:Math.max(y,y*f,w,w*f);a=(T-k)/2,c=(C-D)/2,l=-(T+k)/2,u=-(C+D)/2}for(t=0,n=h.length;t<n;++t)h[t]._options=i._resolveDataElementOptions(h[t],t);for(r.borderWidth=i.getMaxBorderWidth(),r.outerRadius=Math.max(Math.min((s.right-s.left-r.borderWidth)/a,(s.bottom-s.top-r.borderWidth)/c)/2,0),r.innerRadius=Math.max(r.outerRadius*f,0),r.radiusLength=(r.outerRadius-r.innerRadius)/(i._getVisibleDatasetWeightTotal()||1),r.offsetX=l*r.outerRadius,r.offsetY=u*r.outerRadius,d.total=i.calculateTotal(),i.outerRadius=r.outerRadius-r.radiusLength*i._getRingWeightOffset(i.index),i.innerRadius=Math.max(i.outerRadius-r.radiusLength*m,0),t=0,n=h.length;t<n;++t)i.updateElement(h[t],t,e)},updateElement:function(e,t,n){var i=this,r=i.chart,s=r.chartArea,o=r.options,a=o.animation,c=(s.left+s.right)/2,l=(s.top+s.bottom)/2,u=o.rotation,d=o.rotation,h=i.getDataset(),f=n&&a.animateRotate||e.hidden?0:i.calculateCircumference(h.data[t])*(o.circumference/Oe),p=e._options||{};$.extend(e,{_datasetIndex:i.index,_index:t,_model:{backgroundColor:p.backgroundColor,borderColor:p.borderColor,borderWidth:p.borderWidth,borderAlign:p.borderAlign,x:c+r.offsetX,y:l+r.offsetY,startAngle:u,endAngle:d,circumference:f,outerRadius:n&&a.animateScale?0:i.outerRadius,innerRadius:n&&a.animateScale?0:i.innerRadius,label:$.valueAtIndexOrDefault(h.label,t,r.data.labels[t])}});var m=e._model;n&&a.animateRotate||(m.startAngle=0===t?o.rotation:i.getMeta().data[t-1]._model.endAngle,m.endAngle=m.startAngle+m.circumference),e.pivot()},calculateTotal:function(){var e,t=this.getDataset(),n=this.getMeta(),i=0;return $.each(n.data,(function(n,r){e=t.data[r],isNaN(e)||n.hidden||(i+=Math.abs(e))})),i},calculateCircumference:function(e){var t=this.getMeta().total;return t>0&&!isNaN(e)?Oe*(Math.abs(e)/t):0},getMaxBorderWidth:function(e){var t,n,i,r,s,o,a,c,l=0,u=this.chart;if(!e)for(t=0,n=u.data.datasets.length;t<n;++t)if(u.isDatasetVisible(t)){e=(i=u.getDatasetMeta(t)).data,t!==this.index&&(s=i.controller);break}if(!e)return 0;for(t=0,n=e.length;t<n;++t)r=e[t],s?(s._configure(),o=s._resolveDataElementOptions(r,t)):o=r._options,"inner"!==o.borderAlign&&(l=(c=o.hoverBorderWidth)>(l=(a=o.borderWidth)>l?a:l)?c:l);return l},setHoverStyle:function(e){var t=e._model,n=e._options,i=$.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=Te(n.hoverBackgroundColor,i(n.backgroundColor)),t.borderColor=Te(n.hoverBorderColor,i(n.borderColor)),t.borderWidth=Te(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(e){for(var t=0,n=0;n<e;++n)this.chart.isDatasetVisible(n)&&(t+=this._getRingWeight(n));return t},_getRingWeight:function(e){return Math.max(Te(this.chart.data.datasets[e].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});j._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}}),j._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var Ee=Me.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),Ae=$.valueOrDefault,Ie=$.options.resolve,Pe=$.canvas._isPointInArea;function je(e,t){var n=e&&e.options.ticks||{},i=n.reverse,r=void 0===n.min?t:0,s=void 0===n.max?t:0;return{start:i?s:r,end:i?r:s}}function Ne(e,t,n){var i=n/2,r=je(e,i),s=je(t,i);return{top:s.end,right:r.end,bottom:s.start,left:r.start}}function Fe(e){var t,n,i,r;return $.isObject(e)?(t=e.top,n=e.right,i=e.bottom,r=e.left):t=n=i=r=e,{top:t,right:n,bottom:i,left:r}}j._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var Ye=ee.extend({datasetElementType:ge.Line,dataElementType:ge.Point,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth","cubicInterpolationMode","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},update:function(e){var t,n,i=this,r=i.getMeta(),s=r.dataset,o=r.data||[],a=i._config,c=i._showLine=Ae(a.showLine,i.chart.options.showLines);for(i._xScale=i.getScaleForId(r.xAxisID),i._yScale=i.getScaleForId(r.yAxisID),c&&(void 0!==a.tension&&void 0===a.lineTension&&(a.lineTension=a.tension),s._scale=i._yScale,s._datasetIndex=i.index,s._children=o,s._model=i._resolveDatasetElementOptions(s),s.pivot()),t=0,n=o.length;t<n;++t)i.updateElement(o[t],t,e);for(c&&0!==s._model.tension&&i.updateBezierControlPoints(),t=0,n=o.length;t<n;++t)o[t].pivot()},updateElement:function(e,t,n){var i,r,s=this,o=s.getMeta(),a=e.custom||{},c=s.getDataset(),l=s.index,u=c.data[t],d=s._xScale,h=s._yScale,f=o.dataset._model,p=s._resolveDataElementOptions(e,t);i=d.getPixelForValue("object"==typeof u?u:NaN,t,l),r=n?h.getBasePixel():s.calculatePointY(u,t,l),e._xScale=d,e._yScale=h,e._options=p,e._datasetIndex=l,e._index=t,e._model={x:i,y:r,skip:a.skip||isNaN(i)||isNaN(r),radius:p.radius,pointStyle:p.pointStyle,rotation:p.rotation,backgroundColor:p.backgroundColor,borderColor:p.borderColor,borderWidth:p.borderWidth,tension:Ae(a.tension,f?f.tension:0),steppedLine:!!f&&f.steppedLine,hitRadius:p.hitRadius}},_resolveDatasetElementOptions:function(e){var t=this,n=t._config,i=e.custom||{},r=t.chart.options,s=r.elements.line,o=ee.prototype._resolveDatasetElementOptions.apply(t,arguments);return o.spanGaps=Ae(n.spanGaps,r.spanGaps),o.tension=Ae(n.lineTension,s.tension),o.steppedLine=Ie([i.steppedLine,n.steppedLine,s.stepped]),o.clip=Fe(Ae(n.clip,Ne(t._xScale,t._yScale,o.borderWidth))),o},calculatePointY:function(e,t,n){var i,r,s,o,a,c,l=this.chart,u=this._yScale,d=0,h=0;if(u.options.stacked){for(o=+u.getRightValue(e),c=(a=l._getSortedVisibleDatasetMetas()).length,i=0;i<c&&(r=a[i]).index!==n;++i)"line"===r.type&&r.yAxisID===u.id&&((s=+u.getRightValue(l.data.datasets[r.index].data[t]))<0?h+=s||0:d+=s||0);return u.getPixelForValue(o<0?h+o:d+o)}return u.getPixelForValue(e)},updateBezierControlPoints:function(){var e,t,n,i,r=this.chart,s=this.getMeta(),o=s.dataset._model,a=r.chartArea,c=s.data||[];function l(e,t,n){return Math.max(Math.min(e,n),t)}if(o.spanGaps&&(c=c.filter((function(e){return!e._model.skip}))),"monotone"===o.cubicInterpolationMode)$.splineCurveMonotone(c);else for(e=0,t=c.length;e<t;++e)n=c[e]._model,i=$.splineCurve($.previousItem(c,e)._model,n,$.nextItem(c,e)._model,o.tension),n.controlPointPreviousX=i.previous.x,n.controlPointPreviousY=i.previous.y,n.controlPointNextX=i.next.x,n.controlPointNextY=i.next.y;if(r.options.elements.line.capBezierPoints)for(e=0,t=c.length;e<t;++e)Pe(n=c[e]._model,a)&&(e>0&&Pe(c[e-1]._model,a)&&(n.controlPointPreviousX=l(n.controlPointPreviousX,a.left,a.right),n.controlPointPreviousY=l(n.controlPointPreviousY,a.top,a.bottom)),e<c.length-1&&Pe(c[e+1]._model,a)&&(n.controlPointNextX=l(n.controlPointNextX,a.left,a.right),n.controlPointNextY=l(n.controlPointNextY,a.top,a.bottom)))},draw:function(){var e,t=this,n=t.chart,i=t.getMeta(),r=i.data||[],s=n.chartArea,o=n.canvas,a=0,c=r.length;for(t._showLine&&($.canvas.clipArea(n.ctx,{left:!1===(e=i.dataset._model.clip).left?0:s.left-e.left,right:!1===e.right?o.width:s.right+e.right,top:!1===e.top?0:s.top-e.top,bottom:!1===e.bottom?o.height:s.bottom+e.bottom}),i.dataset.draw(),$.canvas.unclipArea(n.ctx));a<c;++a)r[a].draw(s)},setHoverStyle:function(e){var t=e._model,n=e._options,i=$.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=Ae(n.hoverBackgroundColor,i(n.backgroundColor)),t.borderColor=Ae(n.hoverBorderColor,i(n.borderColor)),t.borderWidth=Ae(n.hoverBorderWidth,n.borderWidth),t.radius=Ae(n.hoverRadius,n.radius)}}),ze=$.options.resolve;j._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(e){var t,n,i,r=document.createElement("ul"),s=e.data,o=s.datasets,a=s.labels;if(r.setAttribute("class",e.id+"-legend"),o.length)for(t=0,n=o[0].data.length;t<n;++t)(i=r.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[t],a[t]&&i.appendChild(document.createTextNode(a[t]));return r.outerHTML},legend:{labels:{generateLabels:function(e){var t=e.data;return t.labels.length&&t.datasets.length?t.labels.map((function(n,i){var r=e.getDatasetMeta(0),s=r.controller.getStyle(i);return{text:n,fillStyle:s.backgroundColor,strokeStyle:s.borderColor,lineWidth:s.borderWidth,hidden:isNaN(t.datasets[0].data[i])||r.data[i].hidden,index:i}})):[]}},onClick:function(e,t){var n,i,r,s=t.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n<i;++n)(r=o.getDatasetMeta(n)).data[s].hidden=!r.data[s].hidden;o.update()}},tooltips:{callbacks:{title:function(){return""},label:function(e,t){return t.labels[e.index]+": "+e.yLabel}}}});var $e=ee.extend({dataElementType:ge.Arc,linkScales:$.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(e){var t,n,i,r=this,s=r.getDataset(),o=r.getMeta(),a=r.chart.options.startAngle||0,c=r._starts=[],l=r._angles=[],u=o.data;for(r._updateRadius(),o.count=r.countVisibleElements(),t=0,n=s.data.length;t<n;t++)c[t]=a,i=r._computeAngle(t),l[t]=i,a+=i;for(t=0,n=u.length;t<n;++t)u[t]._options=r._resolveDataElementOptions(u[t],t),r.updateElement(u[t],t,e)},_updateRadius:function(){var e=this,t=e.chart,n=t.chartArea,i=t.options,r=Math.min(n.right-n.left,n.bottom-n.top);t.outerRadius=Math.max(r/2,0),t.innerRadius=Math.max(i.cutoutPercentage?t.outerRadius/100*i.cutoutPercentage:1,0),t.radiusLength=(t.outerRadius-t.innerRadius)/t.getVisibleDatasetCount(),e.outerRadius=t.outerRadius-t.radiusLength*e.index,e.innerRadius=e.outerRadius-t.radiusLength},updateElement:function(e,t,n){var i=this,r=i.chart,s=i.getDataset(),o=r.options,a=o.animation,c=r.scale,l=r.data.labels,u=c.xCenter,d=c.yCenter,h=o.startAngle,f=e.hidden?0:c.getDistanceFromCenterForValue(s.data[t]),p=i._starts[t],m=p+(e.hidden?0:i._angles[t]),b=a.animateScale?0:c.getDistanceFromCenterForValue(s.data[t]),g=e._options||{};$.extend(e,{_datasetIndex:i.index,_index:t,_scale:c,_model:{backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,borderAlign:g.borderAlign,x:u,y:d,innerRadius:0,outerRadius:n?b:f,startAngle:n&&a.animateRotate?h:p,endAngle:n&&a.animateRotate?h:m,label:$.valueAtIndexOrDefault(l,t,l[t])}}),e.pivot()},countVisibleElements:function(){var e=this.getDataset(),t=this.getMeta(),n=0;return $.each(t.data,(function(t,i){isNaN(e.data[i])||t.hidden||n++})),n},setHoverStyle:function(e){var t=e._model,n=e._options,i=$.getHoverColor,r=$.valueOrDefault;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=r(n.hoverBackgroundColor,i(n.backgroundColor)),t.borderColor=r(n.hoverBorderColor,i(n.borderColor)),t.borderWidth=r(n.hoverBorderWidth,n.borderWidth)},_computeAngle:function(e){var t=this,n=this.getMeta().count,i=t.getDataset(),r=t.getMeta();return isNaN(i.data[e])||r.data[e].hidden?0:ze([t.chart.options.elements.arc.angle,2*Math.PI/n],{chart:t.chart,dataIndex:e,dataset:i,datasetIndex:t.index},e)}});j._set("pie",$.clone(j.doughnut)),j._set("pie",{cutoutPercentage:0});var He=Re,We=$.valueOrDefault;j._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var Ve=ee.extend({datasetElementType:ge.Line,dataElementType:ge.Point,linkScales:$.noop,_datasetElementOptions:["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(e){var t,n,i=this,r=i.getMeta(),s=r.dataset,o=r.data||[],a=i.chart.scale,c=i._config;for(void 0!==c.tension&&void 0===c.lineTension&&(c.lineTension=c.tension),s._scale=a,s._datasetIndex=i.index,s._children=o,s._loop=!0,s._model=i._resolveDatasetElementOptions(s),s.pivot(),t=0,n=o.length;t<n;++t)i.updateElement(o[t],t,e);for(i.updateBezierControlPoints(),t=0,n=o.length;t<n;++t)o[t].pivot()},updateElement:function(e,t,n){var i=this,r=e.custom||{},s=i.getDataset(),o=i.chart.scale,a=o.getPointPositionForValue(t,s.data[t]),c=i._resolveDataElementOptions(e,t),l=i.getMeta().dataset._model,u=n?o.xCenter:a.x,d=n?o.yCenter:a.y;e._scale=o,e._options=c,e._datasetIndex=i.index,e._index=t,e._model={x:u,y:d,skip:r.skip||isNaN(u)||isNaN(d),radius:c.radius,pointStyle:c.pointStyle,rotation:c.rotation,backgroundColor:c.backgroundColor,borderColor:c.borderColor,borderWidth:c.borderWidth,tension:We(r.tension,l?l.tension:0),hitRadius:c.hitRadius}},_resolveDatasetElementOptions:function(){var e=this,t=e._config,n=e.chart.options,i=ee.prototype._resolveDatasetElementOptions.apply(e,arguments);return i.spanGaps=We(t.spanGaps,n.spanGaps),i.tension=We(t.lineTension,n.elements.line.tension),i},updateBezierControlPoints:function(){var e,t,n,i,r=this.getMeta(),s=this.chart.chartArea,o=r.data||[];function a(e,t,n){return Math.max(Math.min(e,n),t)}for(r.dataset._model.spanGaps&&(o=o.filter((function(e){return!e._model.skip}))),e=0,t=o.length;e<t;++e)n=o[e]._model,i=$.splineCurve($.previousItem(o,e,!0)._model,n,$.nextItem(o,e,!0)._model,n.tension),n.controlPointPreviousX=a(i.previous.x,s.left,s.right),n.controlPointPreviousY=a(i.previous.y,s.top,s.bottom),n.controlPointNextX=a(i.next.x,s.left,s.right),n.controlPointNextY=a(i.next.y,s.top,s.bottom)},setHoverStyle:function(e){var t=e._model,n=e._options,i=$.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=We(n.hoverBackgroundColor,i(n.backgroundColor)),t.borderColor=We(n.hoverBorderColor,i(n.borderColor)),t.borderWidth=We(n.hoverBorderWidth,n.borderWidth),t.radius=We(n.hoverRadius,n.radius)}});j._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},tooltips:{callbacks:{title:function(){return""},label:function(e){return"("+e.xLabel+", "+e.yLabel+")"}}}}),j._set("global",{datasets:{scatter:{showLine:!1}}});var Be={bar:Me,bubble:De,doughnut:Re,horizontalBar:Ee,line:Ye,polarArea:$e,pie:He,radar:Ve,scatter:Ye};function Ue(e,t){return e.native?{x:e.x,y:e.y}:$.getRelativePosition(e,t)}function qe(e,t){var n,i,r,s,o,a,c=e._getSortedVisibleDatasetMetas();for(i=0,s=c.length;i<s;++i)for(r=0,o=(n=c[i].data).length;r<o;++r)(a=n[r])._view.skip||t(a)}function Ge(e,t){var n=[];return qe(e,(function(e){e.inRange(t.x,t.y)&&n.push(e)})),n}function Je(e,t,n,i){var r=Number.POSITIVE_INFINITY,s=[];return qe(e,(function(e){if(!n||e.inRange(t.x,t.y)){var o=e.getCenterPoint(),a=i(t,o);a<r?(s=[e],r=a):a===r&&s.push(e)}})),s}function Qe(e){var t=-1!==e.indexOf("x"),n=-1!==e.indexOf("y");return function(e,i){var r=t?Math.abs(e.x-i.x):0,s=n?Math.abs(e.y-i.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(s,2))}}function Ke(e,t,n){var i=Ue(t,e);n.axis=n.axis||"x";var r=Qe(n.axis),s=n.intersect?Ge(e,i):Je(e,i,!1,r),o=[];return s.length?(e._getSortedVisibleDatasetMetas().forEach((function(e){var t=e.data[s[0]._index];t&&!t._view.skip&&o.push(t)})),o):[]}var Ze={modes:{single:function(e,t){var n=Ue(t,e),i=[];return qe(e,(function(e){if(e.inRange(n.x,n.y))return i.push(e),i})),i.slice(0,1)},label:Ke,index:Ke,dataset:function(e,t,n){var i=Ue(t,e);n.axis=n.axis||"xy";var r=Qe(n.axis),s=n.intersect?Ge(e,i):Je(e,i,!1,r);return s.length>0&&(s=e.getDatasetMeta(s[0]._datasetIndex).data),s},"x-axis":function(e,t){return Ke(e,t,{intersect:!1})},point:function(e,t){return Ge(e,Ue(t,e))},nearest:function(e,t,n){var i=Ue(t,e);n.axis=n.axis||"xy";var r=Qe(n.axis);return Je(e,i,n.intersect,r)},x:function(e,t,n){var i=Ue(t,e),r=[],s=!1;return qe(e,(function(e){e.inXRange(i.x)&&r.push(e),e.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r},y:function(e,t,n){var i=Ue(t,e),r=[],s=!1;return qe(e,(function(e){e.inYRange(i.y)&&r.push(e),e.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r}}},Xe=$.extend;function et(e,t){return $.where(e,(function(e){return e.pos===t}))}function tt(e,t){return e.sort((function(e,n){var i=t?n:e,r=t?e:n;return i.weight===r.weight?i.index-r.index:i.weight-r.weight}))}function nt(e,t,n,i){return Math.max(e[n],t[n])+Math.max(e[i],t[i])}function it(e,t,n){var i,r,s=n.box,o=e.maxPadding;if(n.size&&(e[n.pos]-=n.size),n.size=n.horizontal?s.height:s.width,e[n.pos]+=n.size,s.getPadding){var a=s.getPadding();o.top=Math.max(o.top,a.top),o.left=Math.max(o.left,a.left),o.bottom=Math.max(o.bottom,a.bottom),o.right=Math.max(o.right,a.right)}if(i=t.outerWidth-nt(o,e,"left","right"),r=t.outerHeight-nt(o,e,"top","bottom"),i!==e.w||r!==e.h){e.w=i,e.h=r;var c=n.horizontal?[i,e.w]:[r,e.h];return!(c[0]===c[1]||isNaN(c[0])&&isNaN(c[1]))}}function rt(e,t){var n,i=t.maxPadding;return n={left:0,top:0,right:0,bottom:0},(e?["left","right"]:["top","bottom"]).forEach((function(e){n[e]=Math.max(t[e],i[e])})),n}function st(e,t,n){var i,r,s,o,a,c,l=[];for(i=0,r=e.length;i<r;++i)(o=(s=e[i]).box).update(s.width||t.w,s.height||t.h,rt(s.horizontal,t)),it(t,n,s)&&(c=!0,l.length&&(a=!0)),o.fullWidth||l.push(s);return a&&st(l,t,n)||c}function ot(e,t,n){var i,r,s,o,a=n.padding,c=t.x,l=t.y;for(i=0,r=e.length;i<r;++i)o=(s=e[i]).box,s.horizontal?(o.left=o.fullWidth?a.left:t.left,o.right=o.fullWidth?n.outerWidth-a.right:t.left+t.w,o.top=l,o.bottom=l+o.height,o.width=o.right-o.left,l=o.bottom):(o.left=c,o.right=c+o.width,o.top=t.top,o.bottom=t.top+t.h,o.height=o.bottom-o.top,c=o.right);t.x=c,t.y=l}j._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var at,ct={defaults:{},addBox:function(e,t){e.boxes||(e.boxes=[]),t.fullWidth=t.fullWidth||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw:function(){t.draw.apply(t,arguments)}}]},e.boxes.push(t)},removeBox:function(e,t){var n=e.boxes?e.boxes.indexOf(t):-1;-1!==n&&e.boxes.splice(n,1)},configure:function(e,t,n){for(var i,r=["fullWidth","position","weight"],s=r.length,o=0;o<s;++o)n.hasOwnProperty(i=r[o])&&(t[i]=n[i])},update:function(e,t,n){if(e){var i=$.options.toPadding((e.options.layout||{}).padding),r=t-i.width,s=n-i.height,o=function(e){var t=function(e){var t,n,i,r=[];for(t=0,n=(e||[]).length;t<n;++t)r.push({index:t,box:i=e[t],pos:i.position,horizontal:i.isHorizontal(),weight:i.weight});return r}(e),n=tt(et(t,"left"),!0),i=tt(et(t,"right")),r=tt(et(t,"top"),!0),s=tt(et(t,"bottom"));return{leftAndTop:n.concat(r),rightAndBottom:i.concat(s),chartArea:et(t,"chartArea"),vertical:n.concat(i),horizontal:r.concat(s)}}(e.boxes),a=o.vertical,c=o.horizontal,l=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:r,vBoxMaxWidth:r/2/a.length,hBoxMaxHeight:s/2}),u=Xe({maxPadding:Xe({},i),w:r,h:s,x:i.left,y:i.top},i);(function(e,t){var n,i,r;for(n=0,i=e.length;n<i;++n)(r=e[n]).width=r.horizontal?r.box.fullWidth&&t.availableWidth:t.vBoxMaxWidth,r.height=r.horizontal&&t.hBoxMaxHeight})(a.concat(c),l),st(a,u,l),st(c,u,l)&&st(a,u,l),function(e){var t=e.maxPadding;function n(n){var i=Math.max(t[n]-e[n],0);return e[n]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}(u),ot(o.leftAndTop,u,l),u.x+=u.w,u.y+=u.h,ot(o.rightAndBottom,u,l),e.chartArea={left:u.left,top:u.top,right:u.left+u.w,bottom:u.top+u.h},$.each(o.chartArea,(function(t){var n=t.box;Xe(n,e.chartArea),n.update(u.w,u.h)}))}}},lt=(at=Object.freeze({__proto__:null,default:"/*\r\n * DOM element rendering detection\r\n * https://davidwalsh.name/detect-node-insertion\r\n */\r\n@keyframes chartjs-render-animation {\r\n\tfrom { opacity: 0.99; }\r\n\tto { opacity: 1; }\r\n}\r\n\r\n.chartjs-render-monitor {\r\n\tanimation: chartjs-render-animation 0.001s;\r\n}\r\n\r\n/*\r\n * DOM element resizing detection\r\n * https://github.com/marcj/css-element-queries\r\n */\r\n.chartjs-size-monitor,\r\n.chartjs-size-monitor-expand,\r\n.chartjs-size-monitor-shrink {\r\n\tposition: absolute;\r\n\tdirection: ltr;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n\toverflow: hidden;\r\n\tpointer-events: none;\r\n\tvisibility: hidden;\r\n\tz-index: -1;\r\n}\r\n\r\n.chartjs-size-monitor-expand > div {\r\n\tposition: absolute;\r\n\twidth: 1000000px;\r\n\theight: 1000000px;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n\r\n.chartjs-size-monitor-shrink > div {\r\n\tposition: absolute;\r\n\twidth: 200%;\r\n\theight: 200%;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n"}))&&at.default||at,ut="chartjs-size-monitor",dt="chartjs-render-monitor",ht=["animationstart","webkitAnimationStart"],ft={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function pt(e,t){var n=$.getStyle(e,t),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?Number(i[1]):void 0}var mt=!!function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("e",null,t)}catch(n){}return e}()&&{passive:!0};function bt(e,t,n){e.addEventListener(t,n,mt)}function gt(e,t,n){e.removeEventListener(t,n,mt)}function _t(e,t,n,i,r){return{type:e,chart:t,native:r||null,x:void 0!==n?n:null,y:void 0!==i?i:null}}function yt(e){var t=document.createElement("div");return t.className=e||"",t}var vt={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(e){if(!this.disableCSSInjection){var t=e.getRootNode?e.getRootNode():document;!function(e,t){var n=e.$chartjs||(e.$chartjs={});if(!n.containsStyles){n.containsStyles=!0,t="/* Chart.js */\n"+t;var i=document.createElement("style");i.setAttribute("type","text/css"),i.appendChild(document.createTextNode(t)),e.appendChild(i)}}(t.host?t:document.head,lt)}},acquireContext:function(e,t){"string"==typeof e?e=document.getElementById(e):e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas);var n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(this._ensureLoaded(e),function(e,t){var n=e.style,i=e.getAttribute("height"),r=e.getAttribute("width");if(e.$chartjs={initial:{height:i,width:r,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===r||""===r){var s=pt(e,"width");void 0!==s&&(e.width=s)}if(null===i||""===i)if(""===e.style.height)e.height=e.width/(t.options.aspectRatio||2);else{var o=pt(e,"height");void 0!==s&&(e.height=o)}}(e,t),n):null},releaseContext:function(e){var t=e.canvas;if(t.$chartjs){var n=t.$chartjs.initial;["height","width"].forEach((function(e){var i=n[e];$.isNullOrUndef(i)?t.removeAttribute(e):t.setAttribute(e,i)})),$.each(n.style||{},(function(e,n){t.style[n]=e})),t.width=t.width,delete t.$chartjs}},addEventListener:function(e,t,n){var i=e.canvas;if("resize"!==t){var r=n.$chartjs||(n.$chartjs={});bt(i,t,(r.proxies||(r.proxies={}))[e.id+"_"+t]=function(t){n(function(e,t){var n=ft[e.type]||e.type,i=$.getRelativePosition(e,t);return _t(n,t,i.x,i.y,e)}(t,e))})}else!function(e,t,n){var i,r,s,o,a=e.$chartjs||(e.$chartjs={}),c=a.resizer=function(e){var t=1e6,n=yt(ut),i=yt(ut+"-expand"),r=yt(ut+"-shrink");i.appendChild(yt()),r.appendChild(yt()),n.appendChild(i),n.appendChild(r),n._reset=function(){i.scrollLeft=t,i.scrollTop=t,r.scrollLeft=t,r.scrollTop=t};var s=function(){n._reset(),e()};return bt(i,"scroll",s.bind(i,"expand")),bt(r,"scroll",s.bind(r,"shrink")),n}((i=function(){if(a.resizer){var i=n.options.maintainAspectRatio&&e.parentNode,r=i?i.clientWidth:0;t(_t("resize",n)),i&&i.clientWidth<r&&n.canvas&&t(_t("resize",n))}},s=!1,o=[],function(){o=Array.prototype.slice.call(arguments),r=r||this,s||(s=!0,$.requestAnimFrame.call(window,(function(){s=!1,i.apply(r,o)})))}));!function(e,t){var n=e.$chartjs||(e.$chartjs={}),i=n.renderProxy=function(e){"chartjs-render-animation"===e.animationName&&t()};$.each(ht,(function(t){bt(e,t,i)})),n.reflow=!!e.offsetParent,e.classList.add(dt)}(e,(function(){if(a.resizer){var t=e.parentNode;t&&t!==c.parentNode&&t.insertBefore(c,t.firstChild),c._reset()}}))}(i,n,e)},removeEventListener:function(e,t,n){var i,r,s,o=e.canvas;if("resize"!==t){var a=((n.$chartjs||{}).proxies||{})[e.id+"_"+t];a&>(o,t,a)}else s=(r=(i=o).$chartjs||{}).resizer,delete r.resizer,function(e){var t=e.$chartjs||{},n=t.renderProxy;n&&($.each(ht,(function(t){gt(e,t,n)})),delete t.renderProxy),e.classList.remove(dt)}(i),s&&s.parentNode&&s.parentNode.removeChild(s)}};$.addEvent=bt,$.removeEvent=gt;var wt=$.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},vt._enabled?vt:{acquireContext:function(e){return e&&e.canvas&&(e=e.canvas),e&&e.getContext("2d")||null}});j._set("global",{plugins:{}});var St={_plugins:[],_cacheId:0,register:function(e){var t=this._plugins;[].concat(e).forEach((function(e){-1===t.indexOf(e)&&t.push(e)})),this._cacheId++},unregister:function(e){var t=this._plugins;[].concat(e).forEach((function(e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)})),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(e,t,n){var i,r,s,o,a,c=this.descriptors(e),l=c.length;for(i=0;i<l;++i)if("function"==typeof(a=(s=(r=c[i]).plugin)[t])&&((o=[e].concat(n||[])).push(r.options),!1===a.apply(s,o)))return!1;return!0},descriptors:function(e){var t=e.$plugins||(e.$plugins={});if(t.id===this._cacheId)return t.descriptors;var n=[],i=[],r=e&&e.config||{},s=r.options&&r.options.plugins||{};return this._plugins.concat(r.plugins||[]).forEach((function(e){if(-1===n.indexOf(e)){var t=e.id,r=s[t];!1!==r&&(!0===r&&(r=$.clone(j.global.plugins[t])),n.push(e),i.push({plugin:e,options:r||{}}))}})),t.descriptors=i,t.id=this._cacheId,i},_invalidate:function(e){delete e.$plugins}},Mt={constructors:{},defaults:{},registerScaleType:function(e,t,n){this.constructors[e]=t,this.defaults[e]=$.clone(n)},getScaleConstructor:function(e){return this.constructors.hasOwnProperty(e)?this.constructors[e]:void 0},getScaleDefaults:function(e){return this.defaults.hasOwnProperty(e)?$.merge(Object.create(null),[j.scale,this.defaults[e]]):{}},updateScaleDefaults:function(e,t){var n=this;n.defaults.hasOwnProperty(e)&&(n.defaults[e]=$.extend(n.defaults[e],t))},addScalesToLayout:function(e){$.each(e.scales,(function(t){t.fullWidth=t.options.fullWidth,t.position=t.options.position,t.weight=t.options.weight,ct.addBox(e,t)}))}},xt=$.valueOrDefault,kt=$.rtl.getRtlAdapter;j._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:$.noop,title:function(e,t){var n="",i=t.labels,r=i?i.length:0;if(e.length>0){var s=e[0];s.label?n=s.label:s.xLabel?n=s.xLabel:r>0&&s.index<r&&(n=i[s.index])}return n},afterTitle:$.noop,beforeBody:$.noop,beforeLabel:$.noop,label:function(e,t){var n=t.datasets[e.datasetIndex].label||"";return n&&(n+=": "),$.isNullOrUndef(e.value)?n+=e.yLabel:n+=e.value,n},labelColor:function(e,t){var n=t.getDatasetMeta(e.datasetIndex).data[e.index]._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:$.noop,afterBody:$.noop,beforeFooter:$.noop,footer:$.noop,afterFooter:$.noop}}});var Dt={average:function(e){if(!e.length)return!1;var t,n,i=0,r=0,s=0;for(t=0,n=e.length;t<n;++t){var o=e[t];if(o&&o.hasValue()){var a=o.tooltipPosition();i+=a.x,r+=a.y,++s}}return{x:i/s,y:r/s}},nearest:function(e,t){var n,i,r,s=t.x,o=t.y,a=Number.POSITIVE_INFINITY;for(n=0,i=e.length;n<i;++n){var c=e[n];if(c&&c.hasValue()){var l=c.getCenterPoint(),u=$.distanceBetweenPoints(t,l);u<a&&(a=u,r=c)}}if(r){var d=r.tooltipPosition();s=d.x,o=d.y}return{x:s,y:o}}};function Tt(e,t){return t&&($.isArray(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Ct(e){return("string"==typeof e||e instanceof String)&&e.indexOf("\n")>-1?e.split("\n"):e}function Ot(e){var t=j.global;return{xPadding:e.xPadding,yPadding:e.yPadding,xAlign:e.xAlign,yAlign:e.yAlign,rtl:e.rtl,textDirection:e.textDirection,bodyFontColor:e.bodyFontColor,_bodyFontFamily:xt(e.bodyFontFamily,t.defaultFontFamily),_bodyFontStyle:xt(e.bodyFontStyle,t.defaultFontStyle),_bodyAlign:e.bodyAlign,bodyFontSize:xt(e.bodyFontSize,t.defaultFontSize),bodySpacing:e.bodySpacing,titleFontColor:e.titleFontColor,_titleFontFamily:xt(e.titleFontFamily,t.defaultFontFamily),_titleFontStyle:xt(e.titleFontStyle,t.defaultFontStyle),titleFontSize:xt(e.titleFontSize,t.defaultFontSize),_titleAlign:e.titleAlign,titleSpacing:e.titleSpacing,titleMarginBottom:e.titleMarginBottom,footerFontColor:e.footerFontColor,_footerFontFamily:xt(e.footerFontFamily,t.defaultFontFamily),_footerFontStyle:xt(e.footerFontStyle,t.defaultFontStyle),footerFontSize:xt(e.footerFontSize,t.defaultFontSize),_footerAlign:e.footerAlign,footerSpacing:e.footerSpacing,footerMarginTop:e.footerMarginTop,caretSize:e.caretSize,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,opacity:0,legendColorBackground:e.multiKeyBackground,displayColors:e.displayColors,borderColor:e.borderColor,borderWidth:e.borderWidth}}function Lt(e,t){return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-e.xPadding:e.x+e.xPadding}function Rt(e){return Tt([],Ct(e))}var Et=U.extend({initialize:function(){this._model=Ot(this._options),this._lastActive=[]},getTitle:function(){var e=this,t=e._options.callbacks,n=t.beforeTitle.apply(e,arguments),i=t.title.apply(e,arguments),r=t.afterTitle.apply(e,arguments),s=[];return s=Tt(s,Ct(n)),s=Tt(s,Ct(i)),Tt(s,Ct(r))},getBeforeBody:function(){return Rt(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(e,t){var n=this,i=n._options.callbacks,r=[];return $.each(e,(function(e){var s={before:[],lines:[],after:[]};Tt(s.before,Ct(i.beforeLabel.call(n,e,t))),Tt(s.lines,i.label.call(n,e,t)),Tt(s.after,Ct(i.afterLabel.call(n,e,t))),r.push(s)})),r},getAfterBody:function(){return Rt(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var e=this,t=e._options.callbacks,n=t.beforeFooter.apply(e,arguments),i=t.footer.apply(e,arguments),r=t.afterFooter.apply(e,arguments),s=[];return s=Tt(s,Ct(n)),s=Tt(s,Ct(i)),Tt(s,Ct(r))},update:function(e){var t,n,i,r,s,o,a,c,l,u,d=this,h=d._options,f=d._model,p=d._model=Ot(h),m=d._active,b=d._data,g={xAlign:f.xAlign,yAlign:f.yAlign},_={x:f.x,y:f.y},y={width:f.width,height:f.height},v={x:f.caretX,y:f.caretY};if(m.length){p.opacity=1;var w=[],S=[];v=Dt[h.position].call(d,m,d._eventPosition);var M=[];for(t=0,n=m.length;t<n;++t)M.push((r=void 0,s=void 0,void 0,void 0,c=void 0,l=void 0,u=void 0,r=(i=m[t])._xScale,s=i._yScale||i._scale,o=i._index,l=(c=i._chart.getDatasetMeta(a=i._datasetIndex).controller)._getIndexScale(),u=c._getValueScale(),{xLabel:r?r.getLabelForIndex(o,a):"",yLabel:s?s.getLabelForIndex(o,a):"",label:l?""+l.getLabelForIndex(o,a):"",value:u?""+u.getLabelForIndex(o,a):"",index:o,datasetIndex:a,x:i._model.x,y:i._model.y}));h.filter&&(M=M.filter((function(e){return h.filter(e,b)}))),h.itemSort&&(M=M.sort((function(e,t){return h.itemSort(e,t,b)}))),$.each(M,(function(e){w.push(h.callbacks.labelColor.call(d,e,d._chart)),S.push(h.callbacks.labelTextColor.call(d,e,d._chart))})),p.title=d.getTitle(M,b),p.beforeBody=d.getBeforeBody(M,b),p.body=d.getBody(M,b),p.afterBody=d.getAfterBody(M,b),p.footer=d.getFooter(M,b),p.x=v.x,p.y=v.y,p.caretPadding=h.caretPadding,p.labelColors=w,p.labelTextColors=S,p.dataPoints=M,_=function(e,t,n,i){var r=e.x,s=e.y,o=e.caretPadding,a=n.xAlign,c=n.yAlign,l=e.caretSize+o,u=e.cornerRadius+o;return"right"===a?r-=t.width:"center"===a&&((r-=t.width/2)+t.width>i.width&&(r=i.width-t.width),r<0&&(r=0)),"top"===c?s+=l:s-="bottom"===c?t.height+l:t.height/2,"center"===c?"left"===a?r+=l:"right"===a&&(r-=l):"left"===a?r-=u:"right"===a&&(r+=u),{x:r,y:s}}(p,y=function(e,t){var n=e._chart.ctx,i=2*t.yPadding,r=0,s=t.body,o=s.reduce((function(e,t){return e+t.before.length+t.lines.length+t.after.length}),0),a=t.title.length,c=t.footer.length,l=t.titleFontSize,u=t.bodyFontSize,d=t.footerFontSize;i+=a*l,i+=a?(a-1)*t.titleSpacing:0,i+=a?t.titleMarginBottom:0,i+=(o+=t.beforeBody.length+t.afterBody.length)*u,i+=o?(o-1)*t.bodySpacing:0,i+=c?t.footerMarginTop:0,i+=c*d,i+=c?(c-1)*t.footerSpacing:0;var h=0,f=function(e){r=Math.max(r,n.measureText(e).width+h)};return n.font=$.fontString(l,t._titleFontStyle,t._titleFontFamily),$.each(t.title,f),n.font=$.fontString(u,t._bodyFontStyle,t._bodyFontFamily),$.each(t.beforeBody.concat(t.afterBody),f),h=t.displayColors?u+2:0,$.each(s,(function(e){$.each(e.before,f),$.each(e.lines,f),$.each(e.after,f)})),h=0,n.font=$.fontString(d,t._footerFontStyle,t._footerFontFamily),$.each(t.footer,f),{width:r+=2*t.xPadding,height:i}}(this,p),g=function(e,t){var n,i,r,s,o,a=e._model,c=e._chart,l=e._chart.chartArea,u="center",d="center";a.y<t.height?d="top":a.y>c.height-t.height&&(d="bottom");var h=(l.left+l.right)/2,f=(l.top+l.bottom)/2;"center"===d?(n=function(e){return e<=h},i=function(e){return e>h}):(n=function(e){return e<=t.width/2},i=function(e){return e>=c.width-t.width/2}),r=function(e){return e+t.width+a.caretSize+a.caretPadding>c.width},s=function(e){return e-t.width-a.caretSize-a.caretPadding<0},o=function(e){return e<=f?"top":"bottom"},n(a.x)?(u="left",r(a.x)&&(u="center",d=o(a.y))):i(a.x)&&(u="right",s(a.x)&&(u="center",d=o(a.y)));var p=e._options;return{xAlign:p.xAlign?p.xAlign:u,yAlign:p.yAlign?p.yAlign:d}}(this,y),d._chart)}else p.opacity=0;return p.xAlign=g.xAlign,p.yAlign=g.yAlign,p.x=_.x,p.y=_.y,p.width=y.width,p.height=y.height,p.caretX=v.x,p.caretY=v.y,d._model=p,e&&h.custom&&h.custom.call(d,p),d},drawCaret:function(e,t){var n=this._chart.ctx,i=this.getCaretPosition(e,t,this._view);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)},getCaretPosition:function(e,t,n){var i,r,s,o,a,c,l=n.caretSize,u=n.cornerRadius,d=n.xAlign,h=n.yAlign,f=e.x,p=e.y,m=t.width,b=t.height;if("center"===h)a=p+b/2,"left"===d?(r=(i=f)-l,s=i,o=a+l,c=a-l):(r=(i=f+m)+l,s=i,o=a-l,c=a+l);else if("left"===d?(i=(r=f+u+l)-l,s=r+l):"right"===d?(i=(r=f+m-u-l)-l,s=r+l):(i=(r=n.caretX)-l,s=r+l),"top"===h)a=(o=p)-l,c=o;else{a=(o=p+b)+l,c=o;var g=s;s=i,i=g}return{x1:i,x2:r,x3:s,y1:o,y2:a,y3:c}},drawTitle:function(e,t,n){var i,r,s,o=t.title,a=o.length;if(a){var c=kt(t.rtl,t.x,t.width);for(e.x=Lt(t,t._titleAlign),n.textAlign=c.textAlign(t._titleAlign),n.textBaseline="middle",i=t.titleFontSize,r=t.titleSpacing,n.fillStyle=t.titleFontColor,n.font=$.fontString(i,t._titleFontStyle,t._titleFontFamily),s=0;s<a;++s)n.fillText(o[s],c.x(e.x),e.y+i/2),e.y+=i+r,s+1===a&&(e.y+=t.titleMarginBottom-r)}},drawBody:function(e,t,n){var i,r,s,o,a,c,l,u,d=t.bodyFontSize,h=t.bodySpacing,f=t._bodyAlign,p=t.body,m=t.displayColors,b=0,g=m?Lt(t,"left"):0,_=kt(t.rtl,t.x,t.width),y=function(t){n.fillText(t,_.x(e.x+b),e.y+d/2),e.y+=d+h},v=_.textAlign(f);for(n.textAlign=f,n.textBaseline="middle",n.font=$.fontString(d,t._bodyFontStyle,t._bodyFontFamily),e.x=Lt(t,v),n.fillStyle=t.bodyFontColor,$.each(t.beforeBody,y),b=m&&"right"!==v?"center"===f?d/2+1:d+2:0,a=0,l=p.length;a<l;++a){for(i=p[a],s=t.labelColors[a],n.fillStyle=r=t.labelTextColors[a],$.each(i.before,y),c=0,u=(o=i.lines).length;c<u;++c){if(m){var w=_.x(g);n.fillStyle=t.legendColorBackground,n.fillRect(_.leftForLtr(w,d),e.y,d,d),n.lineWidth=1,n.strokeStyle=s.borderColor,n.strokeRect(_.leftForLtr(w,d),e.y,d,d),n.fillStyle=s.backgroundColor,n.fillRect(_.leftForLtr(_.xPlus(w,1),d-2),e.y+1,d-2,d-2),n.fillStyle=r}y(o[c])}$.each(i.after,y)}b=0,$.each(t.afterBody,y),e.y-=h},drawFooter:function(e,t,n){var i,r,s=t.footer,o=s.length;if(o){var a=kt(t.rtl,t.x,t.width);for(e.x=Lt(t,t._footerAlign),e.y+=t.footerMarginTop,n.textAlign=a.textAlign(t._footerAlign),n.textBaseline="middle",i=t.footerFontSize,n.fillStyle=t.footerFontColor,n.font=$.fontString(i,t._footerFontStyle,t._footerFontFamily),r=0;r<o;++r)n.fillText(s[r],a.x(e.x),e.y+i/2),e.y+=i+t.footerSpacing}},drawBackground:function(e,t,n,i){n.fillStyle=t.backgroundColor,n.strokeStyle=t.borderColor,n.lineWidth=t.borderWidth;var r=t.xAlign,s=t.yAlign,o=e.x,a=e.y,c=i.width,l=i.height,u=t.cornerRadius;n.beginPath(),n.moveTo(o+u,a),"top"===s&&this.drawCaret(e,i),n.lineTo(o+c-u,a),n.quadraticCurveTo(o+c,a,o+c,a+u),"center"===s&&"right"===r&&this.drawCaret(e,i),n.lineTo(o+c,a+l-u),n.quadraticCurveTo(o+c,a+l,o+c-u,a+l),"bottom"===s&&this.drawCaret(e,i),n.lineTo(o+u,a+l),n.quadraticCurveTo(o,a+l,o,a+l-u),"center"===s&&"left"===r&&this.drawCaret(e,i),n.lineTo(o,a+u),n.quadraticCurveTo(o,a,o+u,a),n.closePath(),n.fill(),t.borderWidth>0&&n.stroke()},draw:function(){var e=this._chart.ctx,t=this._view;if(0!==t.opacity){var n={width:t.width,height:t.height},i={x:t.x,y:t.y},r=Math.abs(t.opacity<.001)?0:t.opacity;this._options.enabled&&(t.title.length||t.beforeBody.length||t.body.length||t.afterBody.length||t.footer.length)&&(e.save(),e.globalAlpha=r,this.drawBackground(i,t,e,n),i.y+=t.yPadding,$.rtl.overrideTextDirection(e,t.textDirection),this.drawTitle(i,t,e),this.drawBody(i,t,e),this.drawFooter(i,t,e),$.rtl.restoreTextDirection(e,t.textDirection),e.restore())}},handleEvent:function(e){var t,n=this,i=n._options;return n._lastActive=n._lastActive||[],"mouseout"===e.type?n._active=[]:(n._active=n._chart.getElementsAtEventForMode(e,i.mode,i),i.reverse&&n._active.reverse()),(t=!$.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(i.enabled||i.custom)&&(n._eventPosition={x:e.x,y:e.y},n.update(!0),n.pivot())),t}});Et.positioners=Dt;var At=$.valueOrDefault;function It(){return $.merge(Object.create(null),[].slice.call(arguments),{merger:function(e,t,n,i){if("xAxes"===e||"yAxes"===e){var r,s,o,a=n[e].length;for(t[e]||(t[e]=[]),r=0;r<a;++r)s=At((o=n[e][r]).type,"xAxes"===e?"category":"linear"),r>=t[e].length&&t[e].push({}),$.merge(t[e][r],!t[e][r].type||o.type&&o.type!==t[e][r].type?[Mt.getScaleDefaults(s),o]:o)}else $._merger(e,t,n,i)}})}function Pt(){return $.merge(Object.create(null),[].slice.call(arguments),{merger:function(e,t,n,i){var r=t[e]||Object.create(null),s=n[e];"scales"===e?t[e]=It(r,s):"scale"===e?t[e]=$.merge(r,[Mt.getScaleDefaults(s.type),s]):$._merger(e,t,n,i)}})}function jt(e){var t=e.options;$.each(e.scales,(function(t){ct.removeBox(e,t)})),t=Pt(j.global,j[e.config.type],t),e.options=e.config.options=t,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=t.tooltips,e.tooltip.initialize()}function Nt(e,t,n){var i,r=function(e){return e.id===i};do{i=t+n++}while($.findIndex(e,r)>=0);return i}function Ft(e){return"top"===e||"bottom"===e}function Yt(e,t){return function(n,i){return n[e]===i[e]?n[t]-i[t]:n[e]-i[e]}}j._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var zt=function(e,t){return this.construct(e,t),this};$.extend(zt.prototype,{construct:function(e,t){var n=this;t=function(e){var t=(e=e||Object.create(null)).data=e.data||{};return t.datasets=t.datasets||[],t.labels=t.labels||[],e.options=Pt(j.global,j[e.type],e.options||{}),e}(t);var i=wt.acquireContext(e,t),r=i&&i.canvas,s=r&&r.height,o=r&&r.width;n.id=$.uid(),n.ctx=i,n.canvas=r,n.config=t,n.width=o,n.height=s,n.aspectRatio=s?o/s:null,n.options=t.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,zt.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(e){n.config.data=e}}),i&&r?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var e=this;return St.notify(e,"beforeInit"),$.retinaScale(e,e.options.devicePixelRatio),e.bindEvents(),e.options.responsive&&e.resize(!0),e.initToolTip(),St.notify(e,"afterInit"),e},clear:function(){return $.canvas.clear(this),this},stop:function(){return J.cancelAnimation(this),this},resize:function(e){var t=this,n=t.options,i=t.canvas,r=n.maintainAspectRatio&&t.aspectRatio||null,s=Math.max(0,Math.floor($.getMaximumWidth(i))),o=Math.max(0,Math.floor(r?s/r:$.getMaximumHeight(i)));if((t.width!==s||t.height!==o)&&(i.width=t.width=s,i.height=t.height=o,i.style.width=s+"px",i.style.height=o+"px",$.retinaScale(t,n.devicePixelRatio),!e)){var a={width:s,height:o};St.notify(t,"resize",[a]),n.onResize&&n.onResize(t,a),t.stop(),t.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var e=this.options,t=e.scales||{},n=e.scale;$.each(t.xAxes,(function(e,n){e.id||(e.id=Nt(t.xAxes,"x-axis-",n))})),$.each(t.yAxes,(function(e,n){e.id||(e.id=Nt(t.yAxes,"y-axis-",n))})),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var e=this,t=e.options,n=e.scales||{},i=[],r=Object.keys(n).reduce((function(e,t){return e[t]=!1,e}),{});t.scales&&(i=i.concat((t.scales.xAxes||[]).map((function(e){return{options:e,dtype:"category",dposition:"bottom"}})),(t.scales.yAxes||[]).map((function(e){return{options:e,dtype:"linear",dposition:"left"}})))),t.scale&&i.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),$.each(i,(function(t){var i=t.options,s=i.id,o=At(i.type,t.dtype);Ft(i.position)!==Ft(t.dposition)&&(i.position=t.dposition),r[s]=!0;var a=null;if(s in n&&n[s].type===o)(a=n[s]).options=i,a.ctx=e.ctx,a.chart=e;else{var c=Mt.getScaleConstructor(o);if(!c)return;a=new c({id:s,type:o,options:i,ctx:e.ctx,chart:e}),n[a.id]=a}a.mergeTicksOptions(),t.isDefault&&(e.scale=a)})),$.each(r,(function(e,t){e||delete n[t]})),e.scales=n,Mt.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e,t,n=this,i=[],r=n.data.datasets;for(e=0,t=r.length;e<t;e++){var s=r[e],o=n.getDatasetMeta(e),a=s.type||n.config.type;if(o.type&&o.type!==a&&(n.destroyDatasetMeta(e),o=n.getDatasetMeta(e)),o.type=a,o.order=s.order||0,o.index=e,o.controller)o.controller.updateIndex(e),o.controller.linkScales();else{var c=Be[o.type];if(void 0===c)throw new Error('"'+o.type+'" is not a chart type.');o.controller=new c(n,e),i.push(o.controller)}}return i},resetElements:function(){var e=this;$.each(e.data.datasets,(function(t,n){e.getDatasetMeta(n).controller.reset()}),e)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(e){var t,n,i=this;if(e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]}),jt(i),St._invalidate(i),!1!==St.notify(i,"beforeUpdate")){i.tooltip._data=i.data;var r=i.buildOrUpdateControllers();for(t=0,n=i.data.datasets.length;t<n;t++)i.getDatasetMeta(t).controller.buildOrUpdateElements();i.updateLayout(),i.options.animation&&i.options.animation.duration&&$.each(r,(function(e){e.reset()})),i.updateDatasets(),i.tooltip.initialize(),i.lastActive=[],St.notify(i,"afterUpdate"),i._layers.sort(Yt("z","_idx")),i._bufferedRender?i._bufferedRequest={duration:e.duration,easing:e.easing,lazy:e.lazy}:i.render(e)}},updateLayout:function(){var e=this;!1!==St.notify(e,"beforeLayout")&&(ct.update(this,this.width,this.height),e._layers=[],$.each(e.boxes,(function(t){t._configure&&t._configure(),e._layers.push.apply(e._layers,t._layers())}),e),e._layers.forEach((function(e,t){e._idx=t})),St.notify(e,"afterScaleUpdate"),St.notify(e,"afterLayout"))},updateDatasets:function(){var e=this;if(!1!==St.notify(e,"beforeDatasetsUpdate")){for(var t=0,n=e.data.datasets.length;t<n;++t)e.updateDataset(t);St.notify(e,"afterDatasetsUpdate")}},updateDataset:function(e){var t=this,n=t.getDatasetMeta(e),i={meta:n,index:e};!1!==St.notify(t,"beforeDatasetUpdate",[i])&&(n.controller._update(),St.notify(t,"afterDatasetUpdate",[i]))},render:function(e){var t=this;e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]});var n=t.options.animation,i=At(e.duration,n&&n.duration),r=e.lazy;if(!1!==St.notify(t,"beforeRender")){var s=function(e){St.notify(t,"afterRender"),$.callback(n&&n.onComplete,[e],t)};if(n&&i){var o=new G({numSteps:i/16.66,easing:e.easing||n.easing,render:function(e,t){var n=t.currentStep,i=n/t.numSteps;e.draw((0,$.easing.effects[t.easing])(i),i,n)},onAnimationProgress:n.onProgress,onAnimationComplete:s});J.addAnimation(t,o,i,r)}else t.draw(),s(new G({numSteps:0,chart:t}));return t}},draw:function(e){var t,n,i=this;if(i.clear(),$.isNullOrUndef(e)&&(e=1),i.transition(e),!(i.width<=0||i.height<=0)&&!1!==St.notify(i,"beforeDraw",[e])){for(n=i._layers,t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(i.chartArea);for(i.drawDatasets(e);t<n.length;++t)n[t].draw(i.chartArea);i._drawTooltip(e),St.notify(i,"afterDraw",[e])}},transition:function(e){for(var t=this,n=0,i=(t.data.datasets||[]).length;n<i;++n)t.isDatasetVisible(n)&&t.getDatasetMeta(n).controller.transition(e);t.tooltip.transition(e)},_getSortedDatasetMetas:function(e){var t,n,i=this,r=[];for(t=0,n=(i.data.datasets||[]).length;t<n;++t)e&&!i.isDatasetVisible(t)||r.push(i.getDatasetMeta(t));return r.sort(Yt("order","index")),r},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(e){var t,n,i=this;if(!1!==St.notify(i,"beforeDatasetsDraw",[e])){for(n=(t=i._getSortedVisibleDatasetMetas()).length-1;n>=0;--n)i.drawDataset(t[n],e);St.notify(i,"afterDatasetsDraw",[e])}},drawDataset:function(e,t){var n={meta:e,index:e.index,easingValue:t};!1!==St.notify(this,"beforeDatasetDraw",[n])&&(e.controller.draw(t),St.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(e){var t=this,n=t.tooltip,i={tooltip:n,easingValue:e};!1!==St.notify(t,"beforeTooltipDraw",[i])&&(n.draw(),St.notify(t,"afterTooltipDraw",[i]))},getElementAtEvent:function(e){return Ze.modes.single(this,e)},getElementsAtEvent:function(e){return Ze.modes.label(this,e,{intersect:!0})},getElementsAtXAxis:function(e){return Ze.modes["x-axis"](this,e,{intersect:!0})},getElementsAtEventForMode:function(e,t,n){var i=Ze.modes[t];return"function"==typeof i?i(this,e,n):[]},getDatasetAtEvent:function(e){return Ze.modes.dataset(this,e,{intersect:!0})},getDatasetMeta:function(e){var t=this,n=t.data.datasets[e];n._meta||(n._meta={});var i=n._meta[t.id];return i||(i=n._meta[t.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n.order||0,index:e}),i},getVisibleDatasetCount:function(){for(var e=0,t=0,n=this.data.datasets.length;t<n;++t)this.isDatasetVisible(t)&&e++;return e},isDatasetVisible:function(e){var t=this.getDatasetMeta(e);return"boolean"==typeof t.hidden?!t.hidden:!this.data.datasets[e].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(e){var t=this.id,n=this.data.datasets[e],i=n._meta&&n._meta[t];i&&(i.controller.destroy(),delete n._meta[t])},destroy:function(){var e,t,n=this,i=n.canvas;for(n.stop(),e=0,t=n.data.datasets.length;e<t;++e)n.destroyDatasetMeta(e);i&&(n.unbindEvents(),$.canvas.clear(n),wt.releaseContext(n.ctx),n.canvas=null,n.ctx=null),St.notify(n,"destroy"),delete zt.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var e=this;e.tooltip=new Et({_chart:e,_chartInstance:e,_data:e.data,_options:e.options.tooltips},e)},bindEvents:function(){var e=this,t=e._listeners={},n=function(){e.eventHandler.apply(e,arguments)};$.each(e.options.events,(function(i){wt.addEventListener(e,i,n),t[i]=n})),e.options.responsive&&(n=function(){e.resize()},wt.addEventListener(e,"resize",n),t.resize=n)},unbindEvents:function(){var e=this,t=e._listeners;t&&(delete e._listeners,$.each(t,(function(t,n){wt.removeEventListener(e,n,t)})))},updateHoverStyle:function(e,t,n){var i,r,s,o=n?"set":"remove";for(r=0,s=e.length;r<s;++r)(i=e[r])&&this.getDatasetMeta(i._datasetIndex).controller[o+"HoverStyle"](i);"dataset"===t&&this.getDatasetMeta(e[0]._datasetIndex).controller["_"+o+"DatasetHoverStyle"]()},eventHandler:function(e){var t=this,n=t.tooltip;if(!1!==St.notify(t,"beforeEvent",[e])){t._bufferedRender=!0,t._bufferedRequest=null;var i=t.handleEvent(e);n&&(i=n._start?n.handleEvent(e):i|n.handleEvent(e)),St.notify(t,"afterEvent",[e]);var r=t._bufferedRequest;return r?t.render(r):i&&!t.animating&&(t.stop(),t.render({duration:t.options.hover.animationDuration,lazy:!0})),t._bufferedRender=!1,t._bufferedRequest=null,t}},handleEvent:function(e){var t,n=this,i=n.options||{},r=i.hover;return n.lastActive=n.lastActive||[],n.active="mouseout"===e.type?[]:n.getElementsAtEventForMode(e,r.mode,r),$.callback(i.onHover||i.hover.onHover,[e.native,n.active],n),"mouseup"!==e.type&&"click"!==e.type||i.onClick&&i.onClick.call(n,e.native,n.active),n.lastActive.length&&n.updateHoverStyle(n.lastActive,r.mode,!1),n.active.length&&r.mode&&n.updateHoverStyle(n.active,r.mode,!0),t=!$.arrayEquals(n.active,n.lastActive),n.lastActive=n.active,t}}),zt.instances={};var $t=zt;function Ht(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function Wt(e){this.options=e||{}}zt.Controller=zt,zt.types={},$.configMerge=Pt,$.scaleMerge=It,$.extend(Wt.prototype,{formats:Ht,parse:Ht,format:Ht,add:Ht,diff:Ht,startOf:Ht,endOf:Ht,_create:function(e){return e}}),Wt.override=function(e){$.extend(Wt.prototype,e)};var Vt={_date:Wt},Bt={formatters:{values:function(e){return $.isArray(e)?e:""+e},linear:function(e,t,n){var i=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(i)>1&&e!==Math.floor(e)&&(i=e-Math.floor(e));var r=$.log10(Math.abs(i)),s="";if(0!==e)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var o=$.log10(Math.abs(e)),a=Math.floor(o)-Math.floor(r);a=Math.max(Math.min(a,20),0),s=e.toExponential(a)}else{var c=-1*Math.floor(r);c=Math.max(Math.min(c,20),0),s=e.toFixed(c)}else s="0";return s},logarithmic:function(e,t,n){var i=e/Math.pow(10,Math.floor($.log10(e)));return 0===e?"0":1===i||2===i||5===i||0===t||t===n.length-1?e.toExponential():""}}},Ut=$.isArray,qt=$.isNullOrUndef,Gt=$.valueOrDefault,Jt=$.valueAtIndexOrDefault;function Qt(e,t,n){var i,r=e.getTicks().length,s=Math.min(t,r-1),o=e.getPixelForTick(s),a=e._startPixel,c=e._endPixel,l=1e-6;if(!(n&&(i=1===r?Math.max(o-a,c-o):0===t?(e.getPixelForTick(1)-o)/2:(o-e.getPixelForTick(s-1))/2,(o+=s<t?i:-i)<a-l||o>c+l)))return o}function Kt(e){return e.drawTicks?e.tickMarkLength:0}function Zt(e){var t,n;return e.display?(t=$.options._parseFont(e),n=$.options.toPadding(e.padding),t.lineHeight+n.height):0}function Xt(e,t){return $.extend($.options._parseFont({fontFamily:Gt(t.fontFamily,e.fontFamily),fontSize:Gt(t.fontSize,e.fontSize),fontStyle:Gt(t.fontStyle,e.fontStyle),lineHeight:Gt(t.lineHeight,e.lineHeight)}),{color:$.options.resolve([t.fontColor,e.fontColor,j.global.defaultFontColor])})}function en(e){var t=Xt(e,e.minor);return{minor:t,major:e.major.enabled?Xt(e,e.major):t}}function tn(e){var t,n,i,r=[];for(n=0,i=e.length;n<i;++n)void 0!==(t=e[n])._index&&r.push(t);return r}function nn(e,t,n,i){var r,s,o,a,c=Gt(n,0),l=Math.min(Gt(i,e.length),e.length),u=0;for(t=Math.ceil(t),i&&(t=(r=i-n)/Math.floor(r/t)),a=c;a<0;)u++,a=Math.round(c+u*t);for(s=Math.max(c,0);s<l;s++)o=e[s],s===a?(o._index=s,u++,a=Math.round(c+u*t)):delete o.label}j._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:Bt.formatters.values,minor:{},major:{}}});var rn=U.extend({zeroLineIndex:0,getPadding:function(){var e=this;return{left:e.paddingLeft||0,top:e.paddingTop||0,right:e.paddingRight||0,bottom:e.paddingBottom||0}},getTicks:function(){return this._ticks},_getLabels:function(){var e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){$.callback(this.options.beforeUpdate,[this])},update:function(e,t,n){var i,r,s,o,a,c=this,l=c.options.ticks,u=l.sampleSize;if(c.beforeUpdate(),c.maxWidth=e,c.maxHeight=t,c.margins=$.extend({left:0,right:0,top:0,bottom:0},n),c._ticks=null,c.ticks=null,c._labelSizes=null,c._maxLabelLines=0,c.longestLabelWidth=0,c.longestTextCache=c.longestTextCache||{},c._gridLineItems=null,c._labelItems=null,c.beforeSetDimensions(),c.setDimensions(),c.afterSetDimensions(),c.beforeDataLimits(),c.determineDataLimits(),c.afterDataLimits(),c.beforeBuildTicks(),o=c.buildTicks()||[],(!(o=c.afterBuildTicks(o)||o)||!o.length)&&c.ticks)for(o=[],i=0,r=c.ticks.length;i<r;++i)o.push({value:c.ticks[i],major:!1});return c._ticks=o,s=c._convertTicksToLabels((a=u<o.length)?function(e,t){for(var n=[],i=e.length/t,r=0,s=e.length;r<s;r+=i)n.push(e[Math.floor(r)]);return n}(o,u):o),c._configure(),c.beforeCalculateTickRotation(),c.calculateTickRotation(),c.afterCalculateTickRotation(),c.beforeFit(),c.fit(),c.afterFit(),c._ticksToDraw=l.display&&(l.autoSkip||"auto"===l.source)?c._autoSkip(o):o,a&&(s=c._convertTicksToLabels(c._ticksToDraw)),c.ticks=s,c.afterUpdate(),c.minSize},_configure:function(){var e,t,n=this,i=n.options.ticks.reverse;n.isHorizontal()?(e=n.left,t=n.right):(e=n.top,t=n.bottom,i=!i),n._startPixel=e,n._endPixel=t,n._reversePixels=i,n._length=t-e},afterUpdate:function(){$.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){$.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0},afterSetDimensions:function(){$.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){$.callback(this.options.beforeDataLimits,[this])},determineDataLimits:$.noop,afterDataLimits:function(){$.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){$.callback(this.options.beforeBuildTicks,[this])},buildTicks:$.noop,afterBuildTicks:function(e){var t=this;return Ut(e)&&e.length?$.callback(t.options.afterBuildTicks,[t,e]):(t.ticks=$.callback(t.options.afterBuildTicks,[t,t.ticks])||t.ticks,e)},beforeTickToLabelConversion:function(){$.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var e=this,t=e.options.ticks;e.ticks=e.ticks.map(t.userCallback||t.callback,this)},afterTickToLabelConversion:function(){$.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){$.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var e,t,n,i,r,s,o,a=this,c=a.options,l=c.ticks,u=a.getTicks().length,d=l.minRotation||0,h=l.maxRotation,f=d;!a._isVisible()||!l.display||d>=h||u<=1||!a.isHorizontal()?a.labelRotation=d:(t=(e=a._getLabelSizes()).widest.width,n=e.highest.height-e.highest.offset,i=Math.min(a.maxWidth,a.chart.width-t),t+6>(r=c.offset?a.maxWidth/u:i/(u-1))&&(r=i/(u-(c.offset?.5:1)),s=a.maxHeight-Kt(c.gridLines)-l.padding-Zt(c.scaleLabel),o=Math.sqrt(t*t+n*n),f=$.toDegrees(Math.min(Math.asin(Math.min((e.highest.height+6)/r,1)),Math.asin(Math.min(s/o,1))-Math.asin(n/o))),f=Math.max(d,Math.min(h,f))),a.labelRotation=f)},afterCalculateTickRotation:function(){$.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){$.callback(this.options.beforeFit,[this])},fit:function(){var e=this,t=e.minSize={width:0,height:0},n=e.chart,i=e.options,r=i.ticks,s=i.scaleLabel,o=i.gridLines,a=e._isVisible(),c="bottom"===i.position,l=e.isHorizontal();if(l?t.width=e.maxWidth:a&&(t.width=Kt(o)+Zt(s)),l?a&&(t.height=Kt(o)+Zt(s)):t.height=e.maxHeight,r.display&&a){var u=en(r),d=e._getLabelSizes(),h=d.first,f=d.last,p=d.widest,m=d.highest,b=.4*u.minor.lineHeight,g=r.padding;if(l){var _=0!==e.labelRotation,y=$.toRadians(e.labelRotation),v=Math.cos(y),w=Math.sin(y);t.height=Math.min(e.maxHeight,t.height+(w*p.width+v*(m.height-(_?m.offset:0))+(_?0:b))+g);var S,M,x=e.getPixelForTick(0)-e.left,k=e.right-e.getPixelForTick(e.getTicks().length-1);_?(S=c?v*h.width+w*h.offset:w*(h.height-h.offset),M=c?w*(f.height-f.offset):v*f.width+w*f.offset):(S=h.width/2,M=f.width/2),e.paddingLeft=Math.max((S-x)*e.width/(e.width-x),0)+3,e.paddingRight=Math.max((M-k)*e.width/(e.width-k),0)+3}else t.width=Math.min(e.maxWidth,t.width+(r.mirror?0:p.width+g+b)),e.paddingTop=h.height/2,e.paddingBottom=f.height/2}e.handleMargins(),l?(e.width=e._length=n.width-e.margins.left-e.margins.right,e.height=t.height):(e.width=t.width,e.height=e._length=n.height-e.margins.top-e.margins.bottom)},handleMargins:function(){var e=this;e.margins&&(e.margins.left=Math.max(e.paddingLeft,e.margins.left),e.margins.top=Math.max(e.paddingTop,e.margins.top),e.margins.right=Math.max(e.paddingRight,e.margins.right),e.margins.bottom=Math.max(e.paddingBottom,e.margins.bottom))},afterFit:function(){$.callback(this.options.afterFit,[this])},isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(e){if(qt(e))return NaN;if(("number"==typeof e||e instanceof Number)&&!isFinite(e))return NaN;if(e)if(this.isHorizontal()){if(void 0!==e.x)return this.getRightValue(e.x)}else if(void 0!==e.y)return this.getRightValue(e.y);return e},_convertTicksToLabels:function(e){var t,n,i,r=this;for(r.ticks=e.map((function(e){return e.value})),r.beforeTickToLabelConversion(),t=r.convertTicksToLabels(e)||r.ticks,r.afterTickToLabelConversion(),n=0,i=e.length;n<i;++n)e[n].label=t[n];return t},_getLabelSizes:function(){var e=this,t=e._labelSizes;return t||(e._labelSizes=t=function(e,t,n,i){var r,s,o,a,c,l,u,d,h,f,p,m,b,g=n.length,_=[],y=[],v=[],w=0,S=0;for(r=0;r<g;++r){if(a=n[r].label,e.font=l=(c=n[r].major?t.major:t.minor).string,u=i[l]=i[l]||{data:{},gc:[]},d=c.lineHeight,h=f=0,qt(a)||Ut(a)){if(Ut(a))for(s=0,o=a.length;s<o;++s)qt(p=a[s])||Ut(p)||(h=$.measureText(e,u.data,u.gc,h,p),f+=d)}else h=$.measureText(e,u.data,u.gc,h,a),f=d;_.push(h),y.push(f),v.push(d/2),w=Math.max(h,w),S=Math.max(f,S)}function M(e){return{width:_[e]||0,height:y[e]||0,offset:v[e]||0}}return function(e,t){$.each(e,(function(e){var n,i=e.gc,r=i.length/2;if(r>t){for(n=0;n<r;++n)delete e.data[i[n]];i.splice(0,r)}}))}(i,g),m=_.indexOf(w),b=y.indexOf(S),{first:M(0),last:M(g-1),widest:M(m),highest:M(b)}}(e.ctx,en(e.options.ticks),e.getTicks(),e.longestTextCache),e.longestLabelWidth=t.widest.width),t},_parseValue:function(e){var t,n,i,r;return Ut(e)?(t=+this.getRightValue(e[0]),n=+this.getRightValue(e[1]),i=Math.min(t,n),r=Math.max(t,n)):(t=void 0,n=e=+this.getRightValue(e),i=e,r=e),{min:i,max:r,start:t,end:n}},_getScaleLabel:function(e){var t=this._parseValue(e);return void 0!==t.start?"["+t.start+", "+t.end+"]":+this.getRightValue(e)},getLabelForIndex:$.noop,getPixelForValue:$.noop,getValueForPixel:$.noop,getPixelForTick:function(e){var t=this,n=t.options.offset,i=t._ticks.length,r=1/Math.max(i-(n?0:1),1);return e<0||e>i-1?null:t.getPixelForDecimal(e*r+(n?r/2:0))},getPixelForDecimal:function(e){var t=this;return t._reversePixels&&(e=1-e),t._startPixel+e*t._length},getDecimalForPixel:function(e){var t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var e=this,t=e.min,n=e.max;return e.beginAtZero?0:t<0&&n<0?n:t>0&&n>0?t:0},_autoSkip:function(e){var t,n,i,r,s=this,o=s.options.ticks,a=o.maxTicksLimit||s._length/s._tickSize()+1,c=o.major.enabled?function(e){var t,n,i=[];for(t=0,n=e.length;t<n;t++)e[t].major&&i.push(t);return i}(e):[],l=c.length,u=c[0],d=c[l-1];if(l>a)return function(e,t,n){var i,r,s=0,o=t[0];for(n=Math.ceil(n),i=0;i<e.length;i++)r=e[i],i===o?(r._index=i,o=t[++s*n]):delete r.label}(e,c,l/a),tn(e);if(i=function(e,t,n,i){var r,s,o,a,c=function(e){var t,n,i=e.length;if(i<2)return!1;for(n=e[0],t=1;t<i;++t)if(e[t]-e[t-1]!==n)return!1;return n}(e),l=(t.length-1)/i;if(!c)return Math.max(l,1);for(o=0,a=(r=$.math._factorize(c)).length-1;o<a;o++)if((s=r[o])>l)return s;return Math.max(l,1)}(c,e,0,a),l>0){for(t=0,n=l-1;t<n;t++)nn(e,i,c[t],c[t+1]);return nn(e,i,$.isNullOrUndef(r=l>1?(d-u)/(l-1):null)?0:u-r,u),nn(e,i,d,$.isNullOrUndef(r)?e.length:d+r),tn(e)}return nn(e,i),tn(e)},_tickSize:function(){var e=this,t=e.options.ticks,n=$.toRadians(e.labelRotation),i=Math.abs(Math.cos(n)),r=Math.abs(Math.sin(n)),s=e._getLabelSizes(),o=t.autoSkipPadding||0,a=s?s.widest.width+o:0,c=s?s.highest.height+o:0;return e.isHorizontal()?c*i>a*r?a/i:c/r:c*r<a*i?c/i:a/r},_isVisible:function(){var e,t,n,i=this,r=i.chart,s=i.options.display;if("auto"!==s)return!!s;for(e=0,t=r.data.datasets.length;e<t;++e)if(r.isDatasetVisible(e)&&((n=r.getDatasetMeta(e)).xAxisID===i.id||n.yAxisID===i.id))return!0;return!1},_computeGridLineItems:function(e){var t,n,i,r,s,o,a,c,l,u,d,h,f,p,m,b,g,_=this,y=_.chart,v=_.options,w=v.gridLines,S=v.position,M=w.offsetGridLines,x=_.isHorizontal(),k=_._ticksToDraw,D=k.length+(M?1:0),T=Kt(w),C=[],O=w.drawBorder?Jt(w.lineWidth,0,0):0,L=O/2,R=$._alignPixel,E=function(e){return R(y,e,O)};for("top"===S?(t=E(_.bottom),a=_.bottom-T,l=t-L,d=E(e.top)+L,f=e.bottom):"bottom"===S?(t=E(_.top),d=e.top,f=E(e.bottom)-L,a=t+L,l=_.top+T):"left"===S?(t=E(_.right),o=_.right-T,c=t-L,u=E(e.left)+L,h=e.right):(t=E(_.left),u=e.left,h=E(e.right)-L,o=t+L,c=_.left+T),n=0;n<D;++n)qt((i=k[n]||{}).label)&&n<k.length||(n===_.zeroLineIndex&&v.offset===M?(p=w.zeroLineWidth,m=w.zeroLineColor,b=w.zeroLineBorderDash||[],g=w.zeroLineBorderDashOffset||0):(p=Jt(w.lineWidth,n,1),m=Jt(w.color,n,"rgba(0,0,0,0.1)"),b=w.borderDash||[],g=w.borderDashOffset||0),void 0!==(r=Qt(_,i._index||n,M))&&(s=R(y,r,p),x?o=c=u=h=s:a=l=d=f=s,C.push({tx1:o,ty1:a,tx2:c,ty2:l,x1:u,y1:d,x2:h,y2:f,width:p,color:m,borderDash:b,borderDashOffset:g})));return C.ticksLength=D,C.borderValue=t,C},_computeLabelItems:function(){var e,t,n,i,r,s,o,a,c,l,u,d,h=this,f=h.options,p=f.ticks,m=f.position,b=p.mirror,g=h.isHorizontal(),_=h._ticksToDraw,y=en(p),v=p.padding,w=Kt(f.gridLines),S=-$.toRadians(h.labelRotation),M=[];for("top"===m?(s=h.bottom-w-v,o=S?"left":"center"):"bottom"===m?(s=h.top+w+v,o=S?"right":"center"):"left"===m?(r=h.right-(b?0:w)-v,o=b?"left":"right"):(r=h.left+(b?0:w)+v,o=b?"right":"left"),e=0,t=_.length;e<t;++e)qt(i=(n=_[e]).label)||(a=h.getPixelForTick(n._index||e)+p.labelOffset,l=(c=n.major?y.major:y.minor).lineHeight,u=Ut(i)?i.length:1,g?(r=a,d="top"===m?((S?1:.5)-u)*l:(S?0:.5)*l):(s=a,d=(1-u)*l/2),M.push({x:r,y:s,rotation:S,label:i,font:c,textOffset:d,textAlign:o}));return M},_drawGrid:function(e){var t=this,n=t.options.gridLines;if(n.display){var i,r,s,o,a,c=t.ctx,l=t.chart,u=$._alignPixel,d=n.drawBorder?Jt(n.lineWidth,0,0):0,h=t._gridLineItems||(t._gridLineItems=t._computeGridLineItems(e));for(s=0,o=h.length;s<o;++s)r=(a=h[s]).color,(i=a.width)&&r&&(c.save(),c.lineWidth=i,c.strokeStyle=r,c.setLineDash&&(c.setLineDash(a.borderDash),c.lineDashOffset=a.borderDashOffset),c.beginPath(),n.drawTicks&&(c.moveTo(a.tx1,a.ty1),c.lineTo(a.tx2,a.ty2)),n.drawOnChartArea&&(c.moveTo(a.x1,a.y1),c.lineTo(a.x2,a.y2)),c.stroke(),c.restore());if(d){var f,p,m,b,g=d,_=Jt(n.lineWidth,h.ticksLength-1,1),y=h.borderValue;t.isHorizontal()?(f=u(l,t.left,g)-g/2,p=u(l,t.right,_)+_/2,m=b=y):(m=u(l,t.top,g)-g/2,b=u(l,t.bottom,_)+_/2,f=p=y),c.lineWidth=d,c.strokeStyle=Jt(n.color,0),c.beginPath(),c.moveTo(f,m),c.lineTo(p,b),c.stroke()}}},_drawLabels:function(){var e=this;if(e.options.ticks.display){var t,n,i,r,s,o,a,c,l=e.ctx,u=e._labelItems||(e._labelItems=e._computeLabelItems());for(t=0,i=u.length;t<i;++t){if(o=(s=u[t]).font,l.save(),l.translate(s.x,s.y),l.rotate(s.rotation),l.font=o.string,l.fillStyle=o.color,l.textBaseline="middle",l.textAlign=s.textAlign,c=s.textOffset,Ut(a=s.label))for(n=0,r=a.length;n<r;++n)l.fillText(""+a[n],0,c),c+=o.lineHeight;else l.fillText(a,0,c);l.restore()}}},_drawTitle:function(){var e=this,t=e.ctx,n=e.options,i=n.scaleLabel;if(i.display){var r,s,o=Gt(i.fontColor,j.global.defaultFontColor),a=$.options._parseFont(i),c=$.options.toPadding(i.padding),l=a.lineHeight/2,u=n.position,d=0;if(e.isHorizontal())r=e.left+e.width/2,s="bottom"===u?e.bottom-l-c.bottom:e.top+l+c.top;else{var h="left"===u;r=h?e.left+l+c.top:e.right-l-c.top,s=e.top+e.height/2,d=h?-.5*Math.PI:.5*Math.PI}t.save(),t.translate(r,s),t.rotate(d),t.textAlign="center",t.textBaseline="middle",t.fillStyle=o,t.font=a.string,t.fillText(i.labelString,0,0),t.restore()}},draw:function(e){var t=this;t._isVisible()&&(t._drawGrid(e),t._drawTitle(),t._drawLabels())},_layers:function(){var e=this,t=e.options,n=t.ticks&&t.ticks.z||0,i=t.gridLines&&t.gridLines.z||0;return e._isVisible()&&n!==i&&e.draw===e._draw?[{z:i,draw:function(){e._drawGrid.apply(e,arguments),e._drawTitle.apply(e,arguments)}},{z:n,draw:function(){e._drawLabels.apply(e,arguments)}}]:[{z:n,draw:function(){e.draw.apply(e,arguments)}}]},_getMatchingVisibleMetas:function(e){var t=this,n=t.isHorizontal();return t.chart._getSortedVisibleDatasetMetas().filter((function(i){return(!e||i.type===e)&&(n?i.xAxisID===t.id:i.yAxisID===t.id)}))}});rn.prototype._draw=rn.prototype.draw;var sn=rn,on=$.isNullOrUndef,an=sn.extend({determineDataLimits:function(){var e,t=this,n=t._getLabels(),i=t.options.ticks,r=i.min,s=i.max,o=0,a=n.length-1;void 0!==r&&(e=n.indexOf(r))>=0&&(o=e),void 0!==s&&(e=n.indexOf(s))>=0&&(a=e),t.minIndex=o,t.maxIndex=a,t.min=n[o],t.max=n[a]},buildTicks:function(){var e=this,t=e._getLabels(),n=e.minIndex,i=e.maxIndex;e.ticks=0===n&&i===t.length-1?t:t.slice(n,i+1)},getLabelForIndex:function(e,t){var n=this,i=n.chart;return i.getDatasetMeta(t).controller._getValueScaleId()===n.id?n.getRightValue(i.data.datasets[t].data[e]):n._getLabels()[e]},_configure:function(){var e=this,t=e.options.offset,n=e.ticks;sn.prototype._configure.call(e),e.isHorizontal()||(e._reversePixels=!e._reversePixels),n&&(e._startValue=e.minIndex-(t?.5:0),e._valueRange=Math.max(n.length-(t?0:1),1))},getPixelForValue:function(e,t,n){var i,r,s,o=this;return on(t)||on(n)||(e=o.chart.data.datasets[n].data[t]),on(e)||(i=o.isHorizontal()?e.x:e.y),(void 0!==i||void 0!==e&&isNaN(t))&&(r=o._getLabels(),e=$.valueOrDefault(i,e),t=-1!==(s=r.indexOf(e))?s:t,isNaN(t)&&(t=e)),o.getPixelForDecimal((t-o._startValue)/o._valueRange)},getPixelForTick:function(e){var t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e],e+this.minIndex)},getValueForPixel:function(e){var t=this,n=Math.round(t._startValue+t.getDecimalForPixel(e)*t._valueRange);return Math.min(Math.max(n,0),t.ticks.length-1)},getBasePixel:function(){return this.bottom}});an._defaults={position:"bottom"};var cn=$.isNullOrUndef,ln=sn.extend({getRightValue:function(e){return"string"==typeof e?+e:sn.prototype.getRightValue.call(this,e)},handleTickRangeOptions:function(){var e=this,t=e.options.ticks;if(t.beginAtZero){var n=$.sign(e.min),i=$.sign(e.max);n<0&&i<0?e.max=0:n>0&&i>0&&(e.min=0)}var r=void 0!==t.min||void 0!==t.suggestedMin,s=void 0!==t.max||void 0!==t.suggestedMax;void 0!==t.min?e.min=t.min:void 0!==t.suggestedMin&&(e.min=null===e.min?t.suggestedMin:Math.min(e.min,t.suggestedMin)),void 0!==t.max?e.max=t.max:void 0!==t.suggestedMax&&(e.max=null===e.max?t.suggestedMax:Math.max(e.max,t.suggestedMax)),r!==s&&e.min>=e.max&&(r?e.max=e.min+1:e.min=e.max-1),e.min===e.max&&(e.max++,t.beginAtZero||e.min--)},getTickLimit:function(){var e,t=this,n=t.options.ticks,i=n.stepSize,r=n.maxTicksLimit;return i?e=Math.ceil(t.max/i)-Math.floor(t.min/i)+1:(e=t._computeTickLimit(),r=r||11),r&&(e=Math.min(r,e)),e},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:$.noop,buildTicks:function(){var e=this,t=e.options.ticks,n=e.getTickLimit(),i={maxTicks:n=Math.max(2,n),min:t.min,max:t.max,precision:t.precision,stepSize:$.valueOrDefault(t.fixedStepSize,t.stepSize)},r=e.ticks=function(e,t){var n,i,r,s,o=[],a=e.stepSize,c=a||1,l=e.maxTicks-1,u=e.min,d=e.max,h=e.precision,f=t.min,p=t.max,m=$.niceNum((p-f)/l/c)*c;if(m<1e-14&&cn(u)&&cn(d))return[f,p];(s=Math.ceil(p/m)-Math.floor(f/m))>l&&(m=$.niceNum(s*m/l/c)*c),a||cn(h)?n=Math.pow(10,$._decimalPlaces(m)):(n=Math.pow(10,h),m=Math.ceil(m*n)/n),i=Math.floor(f/m)*m,r=Math.ceil(p/m)*m,a&&(!cn(u)&&$.almostWhole(u/m,m/1e3)&&(i=u),!cn(d)&&$.almostWhole(d/m,m/1e3)&&(r=d)),s=$.almostEquals(s=(r-i)/m,Math.round(s),m/1e3)?Math.round(s):Math.ceil(s),i=Math.round(i*n)/n,r=Math.round(r*n)/n,o.push(cn(u)?i:u);for(var b=1;b<s;++b)o.push(Math.round((i+b*m)*n)/n);return o.push(cn(d)?r:d),o}(i,e);e.handleDirectionalChanges(),e.max=$.max(r),e.min=$.min(r),t.reverse?(r.reverse(),e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),sn.prototype.convertTicksToLabels.call(e)},_configure:function(){var e,t=this,n=t.getTicks(),i=t.min,r=t.max;sn.prototype._configure.call(t),t.options.offset&&n.length&&(i-=e=(r-i)/Math.max(n.length-1,1)/2,r+=e),t._startValue=i,t._endValue=r,t._valueRange=r-i}}),un={position:"left",ticks:{callback:Bt.formatters.linear}};function dn(e,t,n,i){var r,s,o=e.options,a=function(e,t,n){var i=[n.type,void 0===t&&void 0===n.stack?n.index:"",n.stack].join(".");return void 0===e[i]&&(e[i]={pos:[],neg:[]}),e[i]}(t,o.stacked,n),c=a.pos,l=a.neg,u=i.length;for(r=0;r<u;++r)s=e._parseValue(i[r]),isNaN(s.min)||isNaN(s.max)||n.data[r].hidden||(c[r]=c[r]||0,l[r]=l[r]||0,o.relativePoints?c[r]=100:s.min<0||s.max<0?l[r]+=s.min:c[r]+=s.max)}function hn(e,t,n){var i,r,s=n.length;for(i=0;i<s;++i)r=e._parseValue(n[i]),isNaN(r.min)||isNaN(r.max)||t.data[i].hidden||(e.min=Math.min(e.min,r.min),e.max=Math.max(e.max,r.max))}var fn=ln.extend({determineDataLimits:function(){var e,t,n,i,r=this,s=r.options,o=r.chart.data.datasets,a=r._getMatchingVisibleMetas(),c=s.stacked,l={},u=a.length;if(r.min=Number.POSITIVE_INFINITY,r.max=Number.NEGATIVE_INFINITY,void 0===c)for(e=0;!c&&e<u;++e)c=void 0!==(t=a[e]).stack;for(e=0;e<u;++e)n=o[(t=a[e]).index].data,c?dn(r,l,t,n):hn(r,t,n);$.each(l,(function(e){i=e.pos.concat(e.neg),r.min=Math.min(r.min,$.min(i)),r.max=Math.max(r.max,$.max(i))})),r.min=$.isFinite(r.min)&&!isNaN(r.min)?r.min:0,r.max=$.isFinite(r.max)&&!isNaN(r.max)?r.max:1,r.handleTickRangeOptions()},_computeTickLimit:function(){var e,t=this;return t.isHorizontal()?Math.ceil(t.width/40):(e=$.options._parseFont(t.options.ticks),Math.ceil(t.height/e.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(e,t){return this._getScaleLabel(this.chart.data.datasets[t].data[e])},getPixelForValue:function(e){var t=this;return t.getPixelForDecimal((+t.getRightValue(e)-t._startValue)/t._valueRange)},getValueForPixel:function(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange},getPixelForTick:function(e){var t=this.ticksAsNumbers;return e<0||e>t.length-1?null:this.getPixelForValue(t[e])}});fn._defaults=un;var pn=$.valueOrDefault,mn=$.math.log10,bn={position:"left",ticks:{callback:Bt.formatters.logarithmic}};function gn(e,t){return $.isFinite(e)&&e>=0?e:t}var _n=sn.extend({determineDataLimits:function(){var e,t,n,i,r,s,o=this,a=o.options,c=o.chart,l=c.data.datasets,u=o.isHorizontal();function d(e){return u?e.xAxisID===o.id:e.yAxisID===o.id}o.min=Number.POSITIVE_INFINITY,o.max=Number.NEGATIVE_INFINITY,o.minNotZero=Number.POSITIVE_INFINITY;var h=a.stacked;if(void 0===h)for(e=0;e<l.length;e++)if(t=c.getDatasetMeta(e),c.isDatasetVisible(e)&&d(t)&&void 0!==t.stack){h=!0;break}if(a.stacked||h){var f={};for(e=0;e<l.length;e++){var p=[(t=c.getDatasetMeta(e)).type,void 0===a.stacked&&void 0===t.stack?e:"",t.stack].join(".");if(c.isDatasetVisible(e)&&d(t))for(void 0===f[p]&&(f[p]=[]),r=0,s=(i=l[e].data).length;r<s;r++){var m=f[p];n=o._parseValue(i[r]),isNaN(n.min)||isNaN(n.max)||t.data[r].hidden||n.min<0||n.max<0||(m[r]=m[r]||0,m[r]+=n.max)}}$.each(f,(function(e){if(e.length>0){var t=$.min(e),n=$.max(e);o.min=Math.min(o.min,t),o.max=Math.max(o.max,n)}}))}else for(e=0;e<l.length;e++)if(t=c.getDatasetMeta(e),c.isDatasetVisible(e)&&d(t))for(r=0,s=(i=l[e].data).length;r<s;r++)n=o._parseValue(i[r]),isNaN(n.min)||isNaN(n.max)||t.data[r].hidden||n.min<0||n.max<0||(o.min=Math.min(n.min,o.min),o.max=Math.max(n.max,o.max),0!==n.min&&(o.minNotZero=Math.min(n.min,o.minNotZero)));o.min=$.isFinite(o.min)?o.min:null,o.max=$.isFinite(o.max)?o.max:null,o.minNotZero=$.isFinite(o.minNotZero)?o.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var e=this,t=e.options.ticks;e.min=gn(t.min,e.min),e.max=gn(t.max,e.max),e.min===e.max&&(0!==e.min&&null!==e.min?(e.min=Math.pow(10,Math.floor(mn(e.min))-1),e.max=Math.pow(10,Math.floor(mn(e.max))+1)):(e.min=1,e.max=10)),null===e.min&&(e.min=Math.pow(10,Math.floor(mn(e.max))-1)),null===e.max&&(e.max=0!==e.min?Math.pow(10,Math.floor(mn(e.min))+1):10),null===e.minNotZero&&(e.minNotZero=e.min>0?e.min:e.max<1?Math.pow(10,Math.floor(mn(e.max))):1)},buildTicks:function(){var e=this,t=e.options.ticks,n=!e.isHorizontal(),i={min:gn(t.min),max:gn(t.max)},r=e.ticks=function(e,t){var n,i,r=[],s=pn(e.min,Math.pow(10,Math.floor(mn(t.min)))),o=Math.floor(mn(t.max)),a=Math.ceil(t.max/Math.pow(10,o));0===s?(n=Math.floor(mn(t.minNotZero)),i=Math.floor(t.minNotZero/Math.pow(10,n)),r.push(s),s=i*Math.pow(10,n)):(n=Math.floor(mn(s)),i=Math.floor(s/Math.pow(10,n)));var c=n<0?Math.pow(10,Math.abs(n)):1;do{r.push(s),10==++i&&(i=1,c=++n>=0?1:c),s=Math.round(i*Math.pow(10,n)*c)/c}while(n<o||n===o&&i<a);var l=pn(e.max,s);return r.push(l),r}(i,e);e.max=$.max(r),e.min=$.min(r),t.reverse?(n=!n,e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max),n&&r.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),sn.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(e,t){return this._getScaleLabel(this.chart.data.datasets[t].data[e])},getPixelForTick:function(e){var t=this.tickValues;return e<0||e>t.length-1?null:this.getPixelForValue(t[e])},_getFirstTickValue:function(e){var t=Math.floor(mn(e));return Math.floor(e/Math.pow(10,t))*Math.pow(10,t)},_configure:function(){var e=this,t=e.min,n=0;sn.prototype._configure.call(e),0===t&&(t=e._getFirstTickValue(e.minNotZero),n=pn(e.options.ticks.fontSize,j.global.defaultFontSize)/e._length),e._startValue=mn(t),e._valueOffset=n,e._valueRange=(mn(e.max)-mn(t))/(1-n)},getPixelForValue:function(e){var t=this,n=0;return(e=+t.getRightValue(e))>t.min&&e>0&&(n=(mn(e)-t._startValue)/t._valueRange+t._valueOffset),t.getPixelForDecimal(n)},getValueForPixel:function(e){var t=this,n=t.getDecimalForPixel(e);return 0===n&&0===t.min?0:Math.pow(10,t._startValue+(n-t._valueOffset)*t._valueRange)}});_n._defaults=bn;var yn=$.valueOrDefault,vn=$.valueAtIndexOrDefault,wn=$.options.resolve,Sn={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:Bt.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(e){return e}}};function Mn(e){var t=e.ticks;return t.display&&e.display?yn(t.fontSize,j.global.defaultFontSize)+2*t.backdropPaddingY:0}function xn(e,t,n,i,r){return e===i||e===r?{start:t-n/2,end:t+n/2}:e<i||e>r?{start:t-n,end:t}:{start:t,end:t+n}}function kn(e){return 0===e||180===e?"center":e<180?"left":"right"}function Dn(e,t,n,i){var r,s,o=n.y+i/2;if($.isArray(t))for(r=0,s=t.length;r<s;++r)e.fillText(t[r],n.x,o),o+=i;else e.fillText(t,n.x,o)}function Tn(e,t,n){90===e||270===e?n.y-=t.h/2:(e>270||e<90)&&(n.y-=t.h)}function Cn(e){return $.isNumber(e)?e:0}var On=ln.extend({setDimensions:function(){var e=this;e.width=e.maxWidth,e.height=e.maxHeight,e.paddingTop=Mn(e.options)/2,e.xCenter=Math.floor(e.width/2),e.yCenter=Math.floor((e.height-e.paddingTop)/2),e.drawingArea=Math.min(e.height-e.paddingTop,e.width)/2},determineDataLimits:function(){var e=this,t=e.chart,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;$.each(t.data.datasets,(function(r,s){if(t.isDatasetVisible(s)){var o=t.getDatasetMeta(s);$.each(r.data,(function(t,r){var s=+e.getRightValue(t);isNaN(s)||o.data[r].hidden||(n=Math.min(s,n),i=Math.max(s,i))}))}})),e.min=n===Number.POSITIVE_INFINITY?0:n,e.max=i===Number.NEGATIVE_INFINITY?0:i,e.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Mn(this.options))},convertTicksToLabels:function(){var e=this;ln.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map((function(){var t=$.callback(e.options.pointLabels.callback,arguments,e);return t||0===t?t:""}))},getLabelForIndex:function(e,t){return+this.getRightValue(this.chart.data.datasets[t].data[e])},fit:function(){var e=this,t=e.options;t.display&&t.pointLabels.display?function(e){var t,n,i,r=$.options._parseFont(e.options.pointLabels),s={l:0,r:e.width,t:0,b:e.height-e.paddingTop},o={};e.ctx.font=r.string,e._pointLabelSizes=[];var a,c,l,u=e.chart.data.labels.length;for(t=0;t<u;t++){i=e.getPointPosition(t,e.drawingArea+5),a=e.ctx,c=r.lineHeight,n=$.isArray(l=e.pointLabels[t])?{w:$.longestText(a,a.font,l),h:l.length*c}:{w:a.measureText(l).width,h:c},e._pointLabelSizes[t]=n;var d=e.getIndexAngle(t),h=$.toDegrees(d)%360,f=xn(h,i.x,n.w,0,180),p=xn(h,i.y,n.h,90,270);f.start<s.l&&(s.l=f.start,o.l=d),f.end>s.r&&(s.r=f.end,o.r=d),p.start<s.t&&(s.t=p.start,o.t=d),p.end>s.b&&(s.b=p.end,o.b=d)}e.setReductions(e.drawingArea,s,o)}(e):e.setCenterPoint(0,0,0,0)},setReductions:function(e,t,n){var i=this,r=t.l/Math.sin(n.l),s=Math.max(t.r-i.width,0)/Math.sin(n.r),o=-t.t/Math.cos(n.t),a=-Math.max(t.b-(i.height-i.paddingTop),0)/Math.cos(n.b);r=Cn(r),s=Cn(s),o=Cn(o),a=Cn(a),i.drawingArea=Math.min(Math.floor(e-(r+s)/2),Math.floor(e-(o+a)/2)),i.setCenterPoint(r,s,o,a)},setCenterPoint:function(e,t,n,i){var r=this,s=n+r.drawingArea,o=r.height-r.paddingTop-i-r.drawingArea;r.xCenter=Math.floor((e+r.drawingArea+(r.width-t-r.drawingArea))/2+r.left),r.yCenter=Math.floor((s+o)/2+r.top+r.paddingTop)},getIndexAngle:function(e){var t=this.chart,n=(e*(360/t.data.labels.length)+((t.options||{}).startAngle||0))%360;return(n<0?n+360:n)*Math.PI*2/360},getDistanceFromCenterForValue:function(e){var t=this;if($.isNullOrUndef(e))return NaN;var n=t.drawingArea/(t.max-t.min);return t.options.ticks.reverse?(t.max-e)*n:(e-t.min)*n},getPointPosition:function(e,t){var n=this,i=n.getIndexAngle(e)-Math.PI/2;return{x:Math.cos(i)*t+n.xCenter,y:Math.sin(i)*t+n.yCenter}},getPointPositionForValue:function(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))},getBasePosition:function(e){var t=this,n=t.min,i=t.max;return t.getPointPositionForValue(e||0,t.beginAtZero?0:n<0&&i<0?i:n>0&&i>0?n:0)},_drawGrid:function(){var e,t,n,i=this,r=i.ctx,s=i.options,o=s.gridLines,a=s.angleLines,c=yn(a.lineWidth,o.lineWidth),l=yn(a.color,o.color);if(s.pointLabels.display&&function(e){var t=e.ctx,n=e.options,i=n.pointLabels,r=Mn(n),s=e.getDistanceFromCenterForValue(n.ticks.reverse?e.min:e.max),o=$.options._parseFont(i);t.save(),t.font=o.string,t.textBaseline="middle";for(var a=e.chart.data.labels.length-1;a>=0;a--){var c=e.getPointPosition(a,s+(0===a?r/2:0)+5),l=vn(i.fontColor,a,j.global.defaultFontColor);t.fillStyle=l;var u=e.getIndexAngle(a),d=$.toDegrees(u);t.textAlign=kn(d),Tn(d,e._pointLabelSizes[a],c),Dn(t,e.pointLabels[a],c,o.lineHeight)}t.restore()}(i),o.display&&$.each(i.ticks,(function(e,n){0!==n&&(t=i.getDistanceFromCenterForValue(i.ticksAsNumbers[n]),function(e,t,n,i){var r,s=e.ctx,o=t.circular,a=e.chart.data.labels.length,c=vn(t.color,i-1),l=vn(t.lineWidth,i-1);if((o||a)&&c&&l){if(s.save(),s.strokeStyle=c,s.lineWidth=l,s.setLineDash&&(s.setLineDash(t.borderDash||[]),s.lineDashOffset=t.borderDashOffset||0),s.beginPath(),o)s.arc(e.xCenter,e.yCenter,n,0,2*Math.PI);else{r=e.getPointPosition(0,n),s.moveTo(r.x,r.y);for(var u=1;u<a;u++)r=e.getPointPosition(u,n),s.lineTo(r.x,r.y)}s.closePath(),s.stroke(),s.restore()}}(i,o,t,n))})),a.display&&c&&l){for(r.save(),r.lineWidth=c,r.strokeStyle=l,r.setLineDash&&(r.setLineDash(wn([a.borderDash,o.borderDash,[]])),r.lineDashOffset=wn([a.borderDashOffset,o.borderDashOffset,0])),e=i.chart.data.labels.length-1;e>=0;e--)t=i.getDistanceFromCenterForValue(s.ticks.reverse?i.min:i.max),n=i.getPointPosition(e,t),r.beginPath(),r.moveTo(i.xCenter,i.yCenter),r.lineTo(n.x,n.y),r.stroke();r.restore()}},_drawLabels:function(){var e=this,t=e.ctx,n=e.options.ticks;if(n.display){var i,r,s=e.getIndexAngle(0),o=$.options._parseFont(n),a=yn(n.fontColor,j.global.defaultFontColor);t.save(),t.font=o.string,t.translate(e.xCenter,e.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",$.each(e.ticks,(function(s,c){(0!==c||n.reverse)&&(i=e.getDistanceFromCenterForValue(e.ticksAsNumbers[c]),n.showLabelBackdrop&&(r=t.measureText(s).width,t.fillStyle=n.backdropColor,t.fillRect(-r/2-n.backdropPaddingX,-i-o.size/2-n.backdropPaddingY,r+2*n.backdropPaddingX,o.size+2*n.backdropPaddingY)),t.fillStyle=a,t.fillText(s,0,-i))})),t.restore()}},_drawTitle:$.noop});On._defaults=Sn;var Ln=$._deprecated,Rn=$.options.resolve,En=$.valueOrDefault,An=Number.MIN_SAFE_INTEGER||-9007199254740991,In=Number.MAX_SAFE_INTEGER||9007199254740991,Pn={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},jn=Object.keys(Pn);function Nn(e,t){return e-t}function Fn(e){return $.valueOrDefault(e.time.min,e.ticks.min)}function Yn(e){return $.valueOrDefault(e.time.max,e.ticks.max)}function zn(e,t,n,i){var r=function(e,t,n){for(var i,r,s,o=0,a=e.length-1;o>=0&&o<=a;){if(s=e[i=o+a>>1],!(r=e[i-1]||null))return{lo:null,hi:s};if(s[t]<n)o=i+1;else{if(!(r[t]>n))return{lo:r,hi:s};a=i-1}}return{lo:s,hi:null}}(e,t,n),s=r.lo?r.hi?r.lo:e[e.length-2]:e[0],o=r.lo?r.hi?r.hi:e[e.length-1]:e[1],a=o[t]-s[t];return s[i]+(o[i]-s[i])*(a?(n-s[t])/a:0)}function $n(e,t){var n=e._adapter,i=e.options.time,r=i.parser,s=r||i.format,o=t;return"function"==typeof r&&(o=r(o)),$.isFinite(o)||(o="string"==typeof s?n.parse(o,s):n.parse(o)),null!==o?+o:(r||"function"!=typeof s||(o=s(t),$.isFinite(o)||(o=n.parse(o))),o)}function Hn(e,t){if($.isNullOrUndef(t))return null;var n=e.options.time,i=$n(e,e.getRightValue(t));return null===i||n.round&&(i=+e._adapter.startOf(i,n.round)),i}function Wn(e,t,n,i){var r,s,o=jn.length;for(r=jn.indexOf(e);r<o-1;++r)if((s=Pn[jn[r]]).common&&Math.ceil((n-t)/((s.steps?s.steps:In)*s.size))<=i)return jn[r];return jn[o-1]}function Vn(e,t,n){var i,r,s=[],o={},a=t.length;for(i=0;i<a;++i)o[r=t[i]]=i,s.push({value:r,major:!1});return 0!==a&&n?function(e,t,n,i){var r,s,o=e._adapter,a=+o.startOf(t[0].value,i),c=t[t.length-1].value;for(r=a;r<=c;r=+o.add(r,1,i))(s=n[r])>=0&&(t[s].major=!0);return t}(e,s,o,n):s}var Bn=sn.extend({initialize:function(){this.mergeTicksOptions(),sn.prototype.initialize.call(this)},update:function(){var e=this,t=e.options,n=t.time||(t.time={}),i=e._adapter=new Vt._date(t.adapters.date);return Ln("time scale",n.format,"time.format","time.parser"),Ln("time scale",n.min,"time.min","ticks.min"),Ln("time scale",n.max,"time.max","ticks.max"),$.mergeIf(n.displayFormats,i.formats()),sn.prototype.update.apply(e,arguments)},getRightValue:function(e){return e&&void 0!==e.t&&(e=e.t),sn.prototype.getRightValue.call(this,e)},determineDataLimits:function(){var e,t,n,i,r,s,o,a=this,c=a.chart,l=a._adapter,u=a.options,d=u.time.unit||"day",h=In,f=An,p=[],m=[],b=[],g=a._getLabels();for(e=0,n=g.length;e<n;++e)b.push(Hn(a,g[e]));for(e=0,n=(c.data.datasets||[]).length;e<n;++e)if(c.isDatasetVisible(e))if($.isObject((r=c.data.datasets[e].data)[0]))for(m[e]=[],t=0,i=r.length;t<i;++t)s=Hn(a,r[t]),p.push(s),m[e][t]=s;else m[e]=b.slice(0),o||(p=p.concat(b),o=!0);else m[e]=[];b.length&&(h=Math.min(h,b[0]),f=Math.max(f,b[b.length-1])),p.length&&(p=n>1?function(e){var t,n,i,r={},s=[];for(t=0,n=e.length;t<n;++t)r[i=e[t]]||(r[i]=!0,s.push(i));return s}(p).sort(Nn):p.sort(Nn),h=Math.min(h,p[0]),f=Math.max(f,p[p.length-1])),h=Hn(a,Fn(u))||h,f=Hn(a,Yn(u))||f,h=h===In?+l.startOf(Date.now(),d):h,f=f===An?+l.endOf(Date.now(),d)+1:f,a.min=Math.min(h,f),a.max=Math.max(h+1,f),a._table=[],a._timestamps={data:p,datasets:m,labels:b}},buildTicks:function(){var e,t,n,i=this,r=i.min,s=i.max,o=i.options,a=o.ticks,c=o.time,l=i._timestamps,u=[],d=i.getLabelCapacity(r),h=a.source,f=o.distribution;for(l="data"===h||"auto"===h&&"series"===f?l.data:"labels"===h?l.labels:function(e,t,n,i){var r,s=e._adapter,o=e.options,a=o.time,c=a.unit||Wn(a.minUnit,t,n,i),l=Rn([a.stepSize,a.unitStepSize,1]),u="week"===c&&a.isoWeekday,d=t,h=[];if(u&&(d=+s.startOf(d,"isoWeek",u)),d=+s.startOf(d,u?"day":c),s.diff(n,t,c)>1e5*l)throw t+" and "+n+" are too far apart with stepSize of "+l+" "+c;for(r=d;r<n;r=+s.add(r,l,c))h.push(r);return r!==n&&"ticks"!==o.bounds||h.push(r),h}(i,r,s,d),"ticks"===o.bounds&&l.length&&(r=l[0],s=l[l.length-1]),r=Hn(i,Fn(o))||r,s=Hn(i,Yn(o))||s,e=0,t=l.length;e<t;++e)(n=l[e])>=r&&n<=s&&u.push(n);return i.min=r,i.max=s,i._unit=c.unit||(a.autoSkip?Wn(c.minUnit,i.min,i.max,d):function(e,t,n,i,r){var s,o;for(s=jn.length-1;s>=jn.indexOf(n);s--)if(Pn[o=jn[s]].common&&e._adapter.diff(r,i,o)>=t-1)return o;return jn[n?jn.indexOf(n):0]}(i,u.length,c.minUnit,i.min,i.max)),i._majorUnit=a.major.enabled&&"year"!==i._unit?function(e){for(var t=jn.indexOf(e)+1,n=jn.length;t<n;++t)if(Pn[jn[t]].common)return jn[t]}(i._unit):void 0,i._table=function(e,t,n,i){if("linear"===i||!e.length)return[{time:t,pos:0},{time:n,pos:1}];var r,s,o,a,c,l=[],u=[t];for(r=0,s=e.length;r<s;++r)(a=e[r])>t&&a<n&&u.push(a);for(u.push(n),r=0,s=u.length;r<s;++r)c=u[r+1],a=u[r],void 0!==(o=u[r-1])&&void 0!==c&&Math.round((c+o)/2)===a||l.push({time:a,pos:r/(s-1)});return l}(i._timestamps.data,r,s,f),i._offsets=function(e,t,n,i,r){var s,o,a=0,c=0;return r.offset&&t.length&&(s=zn(e,"time",t[0],"pos"),a=1===t.length?1-s:(zn(e,"time",t[1],"pos")-s)/2,o=zn(e,"time",t[t.length-1],"pos"),c=1===t.length?o:(o-zn(e,"time",t[t.length-2],"pos"))/2),{start:a,end:c,factor:1/(a+1+c)}}(i._table,u,0,0,o),a.reverse&&u.reverse(),Vn(i,u,i._majorUnit)},getLabelForIndex:function(e,t){var n=this,i=n._adapter,r=n.chart.data,s=n.options.time,o=r.labels&&e<r.labels.length?r.labels[e]:"",a=r.datasets[t].data[e];return $.isObject(a)&&(o=n.getRightValue(a)),s.tooltipFormat?i.format($n(n,o),s.tooltipFormat):"string"==typeof o?o:i.format($n(n,o),s.displayFormats.datetime)},tickFormatFunction:function(e,t,n,i){var r=this,s=r.options,o=s.time.displayFormats,a=r._majorUnit,c=o[a],l=n[t],u=s.ticks,d=a&&c&&l&&l.major,h=r._adapter.format(e,i||(d?c:o[r._unit])),f=d?u.major:u.minor,p=Rn([f.callback,f.userCallback,u.callback,u.userCallback]);return p?p(h,t,n):h},convertTicksToLabels:function(e){var t,n,i=[];for(t=0,n=e.length;t<n;++t)i.push(this.tickFormatFunction(e[t].value,t,e));return i},getPixelForOffset:function(e){var t=this,n=t._offsets,i=zn(t._table,"time",e,"pos");return t.getPixelForDecimal((n.start+i)*n.factor)},getPixelForValue:function(e,t,n){var i=this,r=null;if(void 0!==t&&void 0!==n&&(r=i._timestamps.datasets[n][t]),null===r&&(r=Hn(i,e)),null!==r)return i.getPixelForOffset(r)},getPixelForTick:function(e){var t=this.getTicks();return e>=0&&e<t.length?this.getPixelForOffset(t[e].value):null},getValueForPixel:function(e){var t=this,n=t._offsets,i=t.getDecimalForPixel(e)/n.factor-n.end,r=zn(t._table,"pos",i,"time");return t._adapter._create(r)},_getLabelSize:function(e){var t=this,n=t.options.ticks,i=t.ctx.measureText(e).width,r=$.toRadians(t.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(r),o=Math.sin(r),a=En(n.fontSize,j.global.defaultFontSize);return{w:i*s+a*o,h:i*o+a*s}},getLabelWidth:function(e){return this._getLabelSize(e).w},getLabelCapacity:function(e){var t=this,n=t.options.time,i=n.displayFormats,r=i[n.unit]||i.millisecond,s=t.tickFormatFunction(e,0,Vn(t,[e],t._majorUnit),r),o=t._getLabelSize(s),a=Math.floor(t.isHorizontal()?t.width/o.w:t.height/o.h);return t.options.offset&&a--,a>0?a:1}});Bn._defaults={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};var Un={category:an,linear:fn,logarithmic:_n,radialLinear:On,time:Bn},qn={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};Vt._date.override("function"==typeof e?{_id:"moment",formats:function(){return qn},parse:function(t,n){return"string"==typeof t&&"string"==typeof n?t=e(t,n):t instanceof e||(t=e(t)),t.isValid()?t.valueOf():null},format:function(t,n){return e(t).format(n)},add:function(t,n,i){return e(t).add(n,i).valueOf()},diff:function(t,n,i){return e(t).diff(e(n),i)},startOf:function(t,n,i){return t=e(t),"isoWeek"===n?t.isoWeekday(i).valueOf():t.startOf(n).valueOf()},endOf:function(t,n){return e(t).endOf(n).valueOf()},_create:function(t){return e(t)}}:{}),j._set("global",{plugins:{filler:{propagate:!0}}});var Gn={dataset:function(e){var t=e.fill,n=e.chart,i=n.getDatasetMeta(t),r=i&&n.isDatasetVisible(t)&&i.dataset._children||[],s=r.length||0;return s?function(e,t){return t<s&&r[t]._view||null}:null},boundary:function(e){var t=e.boundary,n=t?t.x:null,i=t?t.y:null;return $.isArray(t)?function(e,n){return t[n]}:function(e){return{x:null===n?e.x:n,y:null===i?e.y:i}}}};function Jn(e,t,n){var i,r=e._model||{},s=r.fill;if(void 0===s&&(s=!!r.backgroundColor),!1===s||null===s)return!1;if(!0===s)return"origin";if(i=parseFloat(s,10),isFinite(i)&&Math.floor(i)===i)return"-"!==s[0]&&"+"!==s[0]||(i=t+i),!(i===t||i<0||i>=n)&&i;switch(s){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return s;default:return!1}}function Qn(e){return(e.el._scale||{}).getPointPositionForValue?function(e){var t,n,i,r,s,o=e.el._scale,a=o.options,c=o.chart.data.labels.length,l=e.fill,u=[];if(!c)return null;for(n=a.ticks.reverse?o.min:o.max,i=o.getPointPositionForValue(0,t=a.ticks.reverse?o.max:o.min),r=0;r<c;++r)s="start"===l||"end"===l?o.getPointPositionForValue(r,"start"===l?t:n):o.getBasePosition(r),a.gridLines.circular&&(s.cx=i.x,s.cy=i.y,s.angle=o.getIndexAngle(r)-Math.PI/2),u.push(s);return u}(e):function(e){var t,n=e.el._model||{},i=e.el._scale||{},r=e.fill,s=null;if(isFinite(r))return null;if("start"===r?s=void 0===n.scaleBottom?i.bottom:n.scaleBottom:"end"===r?s=void 0===n.scaleTop?i.top:n.scaleTop:void 0!==n.scaleZero?s=n.scaleZero:i.getBasePixel&&(s=i.getBasePixel()),null!=s){if(void 0!==s.x&&void 0!==s.y)return s;if($.isFinite(s))return{x:(t=i.isHorizontal())?s:null,y:t?null:s}}return null}(e)}function Kn(e,t,n){var i,r=e[t].fill,s=[t];if(!n)return r;for(;!1!==r&&-1===s.indexOf(r);){if(!isFinite(r))return r;if(!(i=e[r]))return!1;if(i.visible)return r;s.push(r),r=i.fill}return!1}function Zn(e){var t=e.fill,n="dataset";return!1===t?null:(isFinite(t)||(n="boundary"),Gn[n](e))}function Xn(e){return e&&!e.skip}function ei(e,t,n,i,r){var s,o,a,c;if(i&&r){for(e.moveTo(t[0].x,t[0].y),s=1;s<i;++s)$.canvas.lineTo(e,t[s-1],t[s]);if(void 0===n[0].angle)for(e.lineTo(n[r-1].x,n[r-1].y),s=r-1;s>0;--s)$.canvas.lineTo(e,n[s],n[s-1],!0);else for(o=n[0].cx,a=n[0].cy,c=Math.sqrt(Math.pow(n[0].x-o,2)+Math.pow(n[0].y-a,2)),s=r-1;s>0;--s)e.arc(o,a,c,n[s].angle,n[s-1].angle,!0)}}function ti(e,t,n,i,r,s){var o,a,c,l,u,d,h,f,p=t.length,m=i.spanGaps,b=[],g=[],_=0,y=0;for(e.beginPath(),o=0,a=p;o<a;++o)u=n(l=t[c=o%p]._view,c,i),d=Xn(l),h=Xn(u),s&&void 0===f&&d&&(a=p+(f=o+1)),d&&h?(_=b.push(l),y=g.push(u)):_&&y&&(m?(d&&b.push(l),h&&g.push(u)):(ei(e,b,g,_,y),_=y=0,b=[],g=[]));ei(e,b,g,_,y),e.closePath(),e.fillStyle=r,e.fill()}var ni={id:"filler",afterDatasetsUpdate:function(e,t){var n,i,r,s,o=(e.data.datasets||[]).length,a=t.propagate,c=[];for(i=0;i<o;++i)s=null,(r=(n=e.getDatasetMeta(i)).dataset)&&r._model&&r instanceof ge.Line&&(s={visible:e.isDatasetVisible(i),fill:Jn(r,i,o),chart:e,el:r}),n.$filler=s,c.push(s);for(i=0;i<o;++i)(s=c[i])&&(s.fill=Kn(c,i,a),s.boundary=Qn(s),s.mapper=Zn(s))},beforeDatasetsDraw:function(e){var t,n,i,r,s,o,a,c=e._getSortedVisibleDatasetMetas(),l=e.ctx;for(n=c.length-1;n>=0;--n)(t=c[n].$filler)&&t.visible&&(s=(i=t.el)._children||[],a=(r=i._view).backgroundColor||j.global.defaultColor,(o=t.mapper)&&a&&s.length&&($.canvas.clipArea(l,e.chartArea),ti(l,s,o,r,a,i._loop),$.canvas.unclipArea(l)))}},ii=$.rtl.getRtlAdapter,ri=$.noop,si=$.valueOrDefault;function oi(e,t){return e.usePointStyle&&e.boxWidth>t?t:e.boxWidth}j._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(e,t){var n=t.datasetIndex,i=this.chart,r=i.getDatasetMeta(n);r.hidden=null===r.hidden?!i.data.datasets[n].hidden:null,i.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(e){var t=e.data.datasets,n=e.options.legend||{},i=n.labels&&n.labels.usePointStyle;return e._getSortedDatasetMetas().map((function(n){var r=n.controller.getStyle(i?0:void 0);return{text:t[n.index].label,fillStyle:r.backgroundColor,hidden:!e.isDatasetVisible(n.index),lineCap:r.borderCapStyle,lineDash:r.borderDash,lineDashOffset:r.borderDashOffset,lineJoin:r.borderJoinStyle,lineWidth:r.borderWidth,strokeStyle:r.borderColor,pointStyle:r.pointStyle,rotation:r.rotation,datasetIndex:n.index}}),this)}}},legendCallback:function(e){var t,n,i,r=document.createElement("ul"),s=e.data.datasets;for(r.setAttribute("class",e.id+"-legend"),t=0,n=s.length;t<n;t++)(i=r.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=s[t].backgroundColor,s[t].label&&i.appendChild(document.createTextNode(s[t].label));return r.outerHTML}});var ai=U.extend({initialize:function(e){var t=this;$.extend(t,e),t.legendHitBoxes=[],t._hoveredItem=null,t.doughnutMode=!1},beforeUpdate:ri,update:function(e,t,n){var i=this;return i.beforeUpdate(),i.maxWidth=e,i.maxHeight=t,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:ri,beforeSetDimensions:ri,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:ri,beforeBuildLabels:ri,buildLabels:function(){var e=this,t=e.options.labels||{},n=$.callback(t.generateLabels,[e.chart],e)||[];t.filter&&(n=n.filter((function(n){return t.filter(n,e.chart.data)}))),e.options.reverse&&n.reverse(),e.legendItems=n},afterBuildLabels:ri,beforeFit:ri,fit:function(){var e=this,t=e.options,n=t.labels,i=t.display,r=e.ctx,s=$.options._parseFont(n),o=s.size,a=e.legendHitBoxes=[],c=e.minSize,l=e.isHorizontal();if(l?(c.width=e.maxWidth,c.height=i?10:0):(c.width=i?10:0,c.height=e.maxHeight),i){if(r.font=s.string,l){var u=e.lineWidths=[0],d=0;r.textAlign="left",r.textBaseline="middle",$.each(e.legendItems,(function(e,t){var i=oi(n,o)+o/2+r.measureText(e.text).width;(0===t||u[u.length-1]+i+2*n.padding>c.width)&&(d+=o+n.padding,u[u.length-(t>0?0:1)]=0),a[t]={left:0,top:0,width:i,height:o},u[u.length-1]+=i+n.padding})),c.height+=d}else{var h=n.padding,f=e.columnWidths=[],p=e.columnHeights=[],m=n.padding,b=0,g=0;$.each(e.legendItems,(function(e,t){var i=oi(n,o)+o/2+r.measureText(e.text).width;t>0&&g+o+2*h>c.height&&(m+=b+n.padding,f.push(b),p.push(g),b=0,g=0),b=Math.max(b,i),g+=o+h,a[t]={left:0,top:0,width:i,height:o}})),m+=b,f.push(b),p.push(g),c.width+=m}e.width=c.width,e.height=c.height}else e.width=c.width=e.height=c.height=0},afterFit:ri,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var e=this,t=e.options,n=t.labels,i=j.global,r=i.defaultColor,s=i.elements.line,o=e.height,a=e.columnHeights,c=e.width,l=e.lineWidths;if(t.display){var u,d=ii(t.rtl,e.left,e.minSize.width),h=e.ctx,f=si(n.fontColor,i.defaultFontColor),p=$.options._parseFont(n),m=p.size;h.textAlign=d.textAlign("left"),h.textBaseline="middle",h.lineWidth=.5,h.strokeStyle=f,h.fillStyle=f,h.font=p.string;var b=oi(n,m),g=e.legendHitBoxes,_=function(e,i){switch(t.align){case"start":return n.padding;case"end":return e-i;default:return(e-i+n.padding)/2}},y=e.isHorizontal();u=y?{x:e.left+_(c,l[0]),y:e.top+n.padding,line:0}:{x:e.left+n.padding,y:e.top+_(o,a[0]),line:0},$.rtl.overrideTextDirection(e.ctx,t.textDirection);var v=m+n.padding;$.each(e.legendItems,(function(t,i){var f=h.measureText(t.text).width,p=b+m/2+f,w=u.x,S=u.y;d.setWidth(e.minSize.width),y?i>0&&w+p+n.padding>e.left+e.minSize.width&&(S=u.y+=v,u.line++,w=u.x=e.left+_(c,l[u.line])):i>0&&S+v>e.top+e.minSize.height&&(w=u.x=w+e.columnWidths[u.line]+n.padding,u.line++,S=u.y=e.top+_(o,a[u.line]));var M=d.x(w);(function(e,t,i){if(!(isNaN(b)||b<=0)){h.save();var o=si(i.lineWidth,s.borderWidth);if(h.fillStyle=si(i.fillStyle,r),h.lineCap=si(i.lineCap,s.borderCapStyle),h.lineDashOffset=si(i.lineDashOffset,s.borderDashOffset),h.lineJoin=si(i.lineJoin,s.borderJoinStyle),h.lineWidth=o,h.strokeStyle=si(i.strokeStyle,r),h.setLineDash&&h.setLineDash(si(i.lineDash,s.borderDash)),n&&n.usePointStyle){var a=b*Math.SQRT2/2,c=d.xPlus(e,b/2);$.canvas.drawPoint(h,i.pointStyle,a,c,t+m/2,i.rotation)}else h.fillRect(d.leftForLtr(e,b),t,b,m),0!==o&&h.strokeRect(d.leftForLtr(e,b),t,b,m);h.restore()}})(M,S,t),g[i].left=d.leftForLtr(M,g[i].width),g[i].top=S,function(e,t,n,i){var r=m/2,s=d.xPlus(e,b+r),o=t+r;h.fillText(n.text,s,o),n.hidden&&(h.beginPath(),h.lineWidth=2,h.moveTo(s,o),h.lineTo(d.xPlus(s,i),o),h.stroke())}(M,S,t,f),y?u.x+=p+n.padding:u.y+=v})),$.rtl.restoreTextDirection(e.ctx,t.textDirection)}},_getLegendItemAt:function(e,t){var n,i,r,s=this;if(e>=s.left&&e<=s.right&&t>=s.top&&t<=s.bottom)for(r=s.legendHitBoxes,n=0;n<r.length;++n)if(e>=(i=r[n]).left&&e<=i.left+i.width&&t>=i.top&&t<=i.top+i.height)return s.legendItems[n];return null},handleEvent:function(e){var t,n=this,i=n.options,r="mouseup"===e.type?"click":e.type;if("mousemove"===r){if(!i.onHover&&!i.onLeave)return}else{if("click"!==r)return;if(!i.onClick)return}t=n._getLegendItemAt(e.x,e.y),"click"===r?t&&i.onClick&&i.onClick.call(n,e.native,t):(i.onLeave&&t!==n._hoveredItem&&(n._hoveredItem&&i.onLeave.call(n,e.native,n._hoveredItem),n._hoveredItem=t),i.onHover&&t&&i.onHover.call(n,e.native,t))}});function ci(e,t){var n=new ai({ctx:e.ctx,options:t,chart:e});ct.configure(e,n,t),ct.addBox(e,n),e.legend=n}var li={id:"legend",_element:ai,beforeInit:function(e){var t=e.options.legend;t&&ci(e,t)},beforeUpdate:function(e){var t=e.options.legend,n=e.legend;t?($.mergeIf(t,j.global.legend),n?(ct.configure(e,n,t),n.options=t):ci(e,t)):n&&(ct.removeBox(e,n),delete e.legend)},afterEvent:function(e,t){var n=e.legend;n&&n.handleEvent(t)}},ui=$.noop;j._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var di=U.extend({initialize:function(e){$.extend(this,e),this.legendHitBoxes=[]},beforeUpdate:ui,update:function(e,t,n){var i=this;return i.beforeUpdate(),i.maxWidth=e,i.maxHeight=t,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:ui,beforeSetDimensions:ui,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:ui,beforeBuildLabels:ui,buildLabels:ui,afterBuildLabels:ui,beforeFit:ui,fit:function(){var e,t=this,n=t.options,i=t.minSize={},r=t.isHorizontal();n.display?(e=($.isArray(n.text)?n.text.length:1)*$.options._parseFont(n).lineHeight+2*n.padding,t.width=i.width=r?t.maxWidth:e,t.height=i.height=r?e:t.maxHeight):t.width=i.width=t.height=i.height=0},afterFit:ui,isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},draw:function(){var e=this,t=e.ctx,n=e.options;if(n.display){var i,r,s,o=$.options._parseFont(n),a=o.lineHeight,c=a/2+n.padding,l=0,u=e.top,d=e.left,h=e.bottom,f=e.right;t.fillStyle=$.valueOrDefault(n.fontColor,j.global.defaultFontColor),t.font=o.string,e.isHorizontal()?(r=d+(f-d)/2,s=u+c,i=f-d):(r="left"===n.position?d+c:f-c,s=u+(h-u)/2,i=h-u,l=Math.PI*("left"===n.position?-.5:.5)),t.save(),t.translate(r,s),t.rotate(l),t.textAlign="center",t.textBaseline="middle";var p=n.text;if($.isArray(p))for(var m=0,b=0;b<p.length;++b)t.fillText(p[b],0,m,i),m+=a;else t.fillText(p,0,0,i);t.restore()}}});function hi(e,t){var n=new di({ctx:e.ctx,options:t,chart:e});ct.configure(e,n,t),ct.addBox(e,n),e.titleBlock=n}var fi={},pi=ni,mi=li,bi={id:"title",_element:di,beforeInit:function(e){var t=e.options.title;t&&hi(e,t)},beforeUpdate:function(e){var t=e.options.title,n=e.titleBlock;t?($.mergeIf(t,j.global.title),n?(ct.configure(e,n,t),n.options=t):hi(e,t)):n&&(ct.removeBox(e,n),delete e.titleBlock)}};for(var gi in fi.filler=pi,fi.legend=mi,fi.title=bi,$t.helpers=$,function(){function e(e,t,n){var i;return"string"==typeof e?(i=parseInt(e,10),-1!==e.indexOf("%")&&(i=i/100*t.parentNode[n])):i=e,i}function t(e){return null!=e&&"none"!==e}function n(n,i,r){var s=document.defaultView,o=$._getParentNode(n),a=s.getComputedStyle(n)[i],c=s.getComputedStyle(o)[i],l=t(a),u=t(c),d=Number.POSITIVE_INFINITY;return l||u?Math.min(l?e(a,n,r):d,u?e(c,o,r):d):"none"}$.where=function(e,t){if($.isArray(e)&&Array.prototype.filter)return e.filter(t);var n=[];return $.each(e,(function(e){t(e)&&n.push(e)})),n},$.findIndex=Array.prototype.findIndex?function(e,t,n){return e.findIndex(t,n)}:function(e,t,n){n=void 0===n?e:n;for(var i=0,r=e.length;i<r;++i)if(t.call(n,e[i],i,e))return i;return-1},$.findNextWhere=function(e,t,n){$.isNullOrUndef(n)&&(n=-1);for(var i=n+1;i<e.length;i++){var r=e[i];if(t(r))return r}},$.findPreviousWhere=function(e,t,n){$.isNullOrUndef(n)&&(n=e.length);for(var i=n-1;i>=0;i--){var r=e[i];if(t(r))return r}},$.isNumber=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},$.almostEquals=function(e,t,n){return Math.abs(e-t)<n},$.almostWhole=function(e,t){var n=Math.round(e);return n-t<=e&&n+t>=e},$.max=function(e){return e.reduce((function(e,t){return isNaN(t)?e:Math.max(e,t)}),Number.NEGATIVE_INFINITY)},$.min=function(e){return e.reduce((function(e,t){return isNaN(t)?e:Math.min(e,t)}),Number.POSITIVE_INFINITY)},$.sign=Math.sign?function(e){return Math.sign(e)}:function(e){return 0==(e=+e)||isNaN(e)?e:e>0?1:-1},$.toRadians=function(e){return e*(Math.PI/180)},$.toDegrees=function(e){return e*(180/Math.PI)},$._decimalPlaces=function(e){if($.isFinite(e)){for(var t=1,n=0;Math.round(e*t)/t!==e;)t*=10,n++;return n}},$.getAngleFromPoint=function(e,t){var n=t.x-e.x,i=t.y-e.y,r=Math.sqrt(n*n+i*i),s=Math.atan2(i,n);return s<-.5*Math.PI&&(s+=2*Math.PI),{angle:s,distance:r}},$.distanceBetweenPoints=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},$.aliasPixel=function(e){return e%2==0?0:.5},$._alignPixel=function(e,t,n){var i=e.currentDevicePixelRatio,r=n/2;return Math.round((t-r)*i)/i+r},$.splineCurve=function(e,t,n,i){var r=e.skip?t:e,s=t,o=n.skip?t:n,a=Math.sqrt(Math.pow(s.x-r.x,2)+Math.pow(s.y-r.y,2)),c=Math.sqrt(Math.pow(o.x-s.x,2)+Math.pow(o.y-s.y,2)),l=a/(a+c),u=c/(a+c),d=i*(l=isNaN(l)?0:l),h=i*(u=isNaN(u)?0:u);return{previous:{x:s.x-d*(o.x-r.x),y:s.y-d*(o.y-r.y)},next:{x:s.x+h*(o.x-r.x),y:s.y+h*(o.y-r.y)}}},$.EPSILON=Number.EPSILON||1e-14,$.splineCurveMonotone=function(e){var t,n,i,r,s,o,a,c,l,u=(e||[]).map((function(e){return{model:e._model,deltaK:0,mK:0}})),d=u.length;for(t=0;t<d;++t)if(!(i=u[t]).model.skip){if(n=t>0?u[t-1]:null,(r=t<d-1?u[t+1]:null)&&!r.model.skip){var h=r.model.x-i.model.x;i.deltaK=0!==h?(r.model.y-i.model.y)/h:0}i.mK=!n||n.model.skip?i.deltaK:!r||r.model.skip?n.deltaK:this.sign(n.deltaK)!==this.sign(i.deltaK)?0:(n.deltaK+i.deltaK)/2}for(t=0;t<d-1;++t)r=u[t+1],(i=u[t]).model.skip||r.model.skip||($.almostEquals(i.deltaK,0,this.EPSILON)?i.mK=r.mK=0:(s=i.mK/i.deltaK,o=r.mK/i.deltaK,(c=Math.pow(s,2)+Math.pow(o,2))<=9||(a=3/Math.sqrt(c),i.mK=s*a*i.deltaK,r.mK=o*a*i.deltaK)));for(t=0;t<d;++t)(i=u[t]).model.skip||(r=t<d-1?u[t+1]:null,(n=t>0?u[t-1]:null)&&!n.model.skip&&(i.model.controlPointPreviousX=i.model.x-(l=(i.model.x-n.model.x)/3),i.model.controlPointPreviousY=i.model.y-l*i.mK),r&&!r.model.skip&&(i.model.controlPointNextX=i.model.x+(l=(r.model.x-i.model.x)/3),i.model.controlPointNextY=i.model.y+l*i.mK))},$.nextItem=function(e,t,n){return n?t>=e.length-1?e[0]:e[t+1]:t>=e.length-1?e[e.length-1]:e[t+1]},$.previousItem=function(e,t,n){return n?t<=0?e[e.length-1]:e[t-1]:t<=0?e[0]:e[t-1]},$.niceNum=function(e,t){var n=Math.floor($.log10(e)),i=e/Math.pow(10,n);return(t?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,n)},$.requestAnimFrame="undefined"==typeof window?function(e){e()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return window.setTimeout(e,1e3/60)},$.getRelativePosition=function(e,t){var n,i,r=e.originalEvent||e,s=e.target||e.srcElement,o=s.getBoundingClientRect(),a=r.touches;a&&a.length>0?(n=a[0].clientX,i=a[0].clientY):(n=r.clientX,i=r.clientY);var c=parseFloat($.getStyle(s,"padding-left")),l=parseFloat($.getStyle(s,"padding-top")),u=parseFloat($.getStyle(s,"padding-right")),d=parseFloat($.getStyle(s,"padding-bottom")),h=o.bottom-o.top-l-d;return{x:n=Math.round((n-o.left-c)/(o.right-o.left-c-u)*s.width/t.currentDevicePixelRatio),y:i=Math.round((i-o.top-l)/h*s.height/t.currentDevicePixelRatio)}},$.getConstraintWidth=function(e){return n(e,"max-width","clientWidth")},$.getConstraintHeight=function(e){return n(e,"max-height","clientHeight")},$._calculatePadding=function(e,t,n){return(t=$.getStyle(e,t)).indexOf("%")>-1?n*parseInt(t,10)/100:parseInt(t,10)},$._getParentNode=function(e){var t=e.parentNode;return t&&"[object ShadowRoot]"===t.toString()&&(t=t.host),t},$.getMaximumWidth=function(e){var t=$._getParentNode(e);if(!t)return e.clientWidth;var n=t.clientWidth,i=n-$._calculatePadding(t,"padding-left",n)-$._calculatePadding(t,"padding-right",n),r=$.getConstraintWidth(e);return isNaN(r)?i:Math.min(i,r)},$.getMaximumHeight=function(e){var t=$._getParentNode(e);if(!t)return e.clientHeight;var n=t.clientHeight,i=n-$._calculatePadding(t,"padding-top",n)-$._calculatePadding(t,"padding-bottom",n),r=$.getConstraintHeight(e);return isNaN(r)?i:Math.min(i,r)},$.getStyle=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,null).getPropertyValue(t)},$.retinaScale=function(e,t){var n=e.currentDevicePixelRatio=t||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var i=e.canvas,r=e.height,s=e.width;i.height=r*n,i.width=s*n,e.ctx.scale(n,n),i.style.height||i.style.width||(i.style.height=r+"px",i.style.width=s+"px")}},$.fontString=function(e,t,n){return t+" "+e+"px "+n},$.longestText=function(e,t,n,i){var r=(i=i||{}).data=i.data||{},s=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(r=i.data={},s=i.garbageCollect=[],i.font=t),e.font=t;var o,a,c,l,u,d=0,h=n.length;for(o=0;o<h;o++)if(null!=(l=n[o])&&!0!==$.isArray(l))d=$.measureText(e,r,s,d,l);else if($.isArray(l))for(a=0,c=l.length;a<c;a++)null==(u=l[a])||$.isArray(u)||(d=$.measureText(e,r,s,d,u));var f=s.length/2;if(f>n.length){for(o=0;o<f;o++)delete r[s[o]];s.splice(0,f)}return d},$.measureText=function(e,t,n,i,r){var s=t[r];return s||(s=t[r]=e.measureText(r).width,n.push(r)),s>i&&(i=s),i},$.numberOfLabelLines=function(e){var t=1;return $.each(e,(function(e){$.isArray(e)&&e.length>t&&(t=e.length)})),t},$.color=v?function(e){return e instanceof CanvasGradient&&(e=j.global.defaultColor),v(e)}:function(e){return console.error("Color.js not found!"),e},$.getHoverColor=function(e){return e instanceof CanvasPattern||e instanceof CanvasGradient?e:$.color(e).saturate(.5).darken(.1).rgbString()}}(),$t._adapters=Vt,$t.Animation=G,$t.animationService=J,$t.controllers=Be,$t.DatasetController=ee,$t.defaults=j,$t.Element=U,$t.elements=ge,$t.Interaction=Ze,$t.layouts=ct,$t.platform=wt,$t.plugins=St,$t.Scale=sn,$t.scaleService=Mt,$t.Ticks=Bt,$t.Tooltip=Et,$t.helpers.each(Un,(function(e,t){$t.scaleService.registerScaleType(t,e,e._defaults)})),fi)fi.hasOwnProperty(gi)&&$t.plugins.register(fi[gi]);$t.platform.initialize();var _i=$t;return"undefined"!=typeof window&&(window.Chart=$t),$t.Chart=$t,$t.Legend=fi.legend._element,$t.Title=fi.title._element,$t.pluginService=$t.plugins,$t.PluginBase=$t.Element.extend({}),$t.canvasHelpers=$t.helpers.canvas,$t.layoutService=$t.layouts,$t.LinearScaleBase=ln,$t.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],(function(e){$t[e]=function(t,n){return new $t(t,$t.helpers.merge(n||{},{type:e.charAt(0).toLowerCase()+e.slice(1)}))}})),_i}(function(){try{return n("wd/R")}catch(e){}}())},MuvH:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("8Y7J"),r=n("IheW");let s=(()=>{class e{constructor(e){this.http=e}findValue(e,t){if(e.value)return e.value.find(e=>e.section===t)}getValue(e,t){let n=this.findValue(e,t);if(!n){const i=t.indexOf(".");-1!==i&&(n=this.findValue(e,t.substring(0,i)))}return n||(n=this.findValue(e,"global")),n?n.value:e.default}getConfigData(){return this.http.get("api/cluster_conf/")}get(e){return this.http.get("api/cluster_conf/"+e)}filter(e){return this.http.get("api/cluster_conf/filter?names="+e.join(","))}create(e){return this.http.post("api/cluster_conf/",e)}delete(e,t){return this.http.delete(`api/cluster_conf/${e}?section=${t}`)}bulkCreate(e){return this.http.put("api/cluster_conf/",e)}}return e.\u0275fac=function(t){return new(t||e)(i.dc(r.b))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},Mxhz:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i=n("LRne"),r=n("CqXF"),s=n("JIr8"),o=n("8Y7J"),a=n("IheW");let c=(()=>{class e{constructor(e){this.http=e}list(){return this.http.get("api/user")}delete(e){return this.http.delete("api/user/"+e)}get(e){return this.http.get("api/user/"+e)}create(e){return this.http.post("api/user",e)}update(e){return this.http.put("api/user/"+e.username,e)}changePassword(e,t,n){return this.http.post(`api/user/${e}/change_password`,{old_password:t,new_password:n})}validateUserName(e){return this.get(e).pipe(Object(r.a)(!0),Object(s.a)(e=>(e.preventDefault(),Object(i.a)(!1))))}validatePassword(e,t=null,n=null){return this.http.post("api/user/validate_password",{password:e,username:t,old_password:n})}}return e.\u0275fac=function(t){return new(t||e)(o.dc(a.b))},e.\u0275prov=o.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},"N+g0":function(e,t,n){var i=n("g6v/"),r=n("m/L8"),s=n("glrk"),o=n("33Wh");e.exports=i?Object.defineProperties:function(e,t){s(e);for(var n,i=o(t),a=i.length,c=0;a>c;)r.f(e,n=i[c++],t[n]);return e}},"NC/Y":function(e,t,n){var i=n("0GbY");e.exports=i("navigator","userAgent")||""},NEZu:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));class i{constructor(e,t,n,i){this.customColors={backgroundColor:void 0,borderColor:void 0},this.checkOffset=!1,this.chartEl=e.nativeElement,this.getStyleLeft=n,this.getStyleTop=i,this.tooltipEl=t.nativeElement}customTooltips(e){if(0===e.opacity)return void(this.tooltipEl.style.opacity=0);if(this.tooltipEl.classList.remove("above","below","no-transform"),this.tooltipEl.classList.add(e.yAlign?e.yAlign:"no-transform"),e.body){const t=e.title||[],n=e.body.map(e=>e.lines);let i="<thead>";t.forEach(e=>{i+="<tr><th>"+this.getTitle(e)+"</th></tr>"}),i+="</thead><tbody>",n.forEach((t,n)=>{const r=e.labelColors[n];let s="background:"+(this.customColors.backgroundColor||r.backgroundColor);s+="; border-color:"+(this.customColors.borderColor||r.borderColor),s+="; border-width: 2px",i+='<tr><td nowrap><span class="chartjs-tooltip-key" style="'+s+'"></span>'+this.getBody(t)+"</td></tr>"}),i+="</tbody>",this.tooltipEl.querySelector("table").innerHTML=i}const t=this.chartEl.offsetTop,n=this.chartEl.offsetLeft;if(this.checkOffset){const t=e.width/2;this.tooltipEl.classList.remove("transform-left"),this.tooltipEl.classList.remove("transform-right"),e.caretX-t<0?this.tooltipEl.classList.add("transform-left"):e.caretX+t>this.chartEl.width&&this.tooltipEl.classList.add("transform-right")}this.tooltipEl.style.left=this.getStyleLeft(e,n),this.tooltipEl.style.top=this.getStyleTop(e,t),this.tooltipEl.style.opacity=1,this.tooltipEl.style.fontFamily=e._fontFamily,this.tooltipEl.style.fontSize=e.fontSize,this.tooltipEl.style.fontStyle=e._fontStyle,this.tooltipEl.style.padding=e.yPadding+"px "+e.xPadding+"px"}getBody(e){return e}getTitle(e){return e}}},NJ4a:function(e,t,n){"use strict";function i(e){setTimeout(()=>{throw e},0)}n.d(t,"a",(function(){return i}))},NJ9Y:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i=n("sVev"),r=n("pLZG"),s=n("BFxc"),o=n("XDbj"),a=n("xbPD"),c=n("SpAZ");function l(e,t){const n=arguments.length>=2;return l=>l.pipe(e?Object(r.a)((t,n)=>e(t,n,l)):c.a,Object(s.a)(1),n?Object(a.a)(t):Object(o.a)(()=>new i.a))}},NaFW:function(e,t,n){var i=n("9d/t"),r=n("P4y1"),s=n("tiKp")("iterator");e.exports=function(e){if(null!=e)return e[s]||e["@@iterator"]||r[i(e)]}},NwgZ:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("8Y7J"),r=n("s7LF");let s=(()=>{class e{constructor(){this.validSubmit=new i.o}onSubmit(){this.markAsTouchedAndDirty(this.formGroup),this.formGroup.valid&&this.validSubmit.emit(this.formGroup.value)}markAsTouchedAndDirty(e){e instanceof r.j?Object.keys(e.controls).forEach(t=>this.markAsTouchedAndDirty(e.controls[t])):e instanceof r.e?e.controls.forEach(e=>this.markAsTouchedAndDirty(e)):e instanceof r.h&&e.enabled&&(e.markAsDirty(),e.markAsTouched(),e.updateValueAndValidity())}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=i.Hb({type:e,selectors:[["","formGroup",""]],hostBindings:function(e,t){1&e&&i.gc("submit",(function(){return t.onSubmit()}))},inputs:{formGroup:"formGroup"},outputs:{validSubmit:"validSubmit"}}),e})()},O741:function(e,t,n){var i=n("hh1v");e.exports=function(e){if(!i(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},OIYi:function(e,t,n){!function(e){"use strict";e.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})}(n("wd/R"))},OLbh:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var i=n("s7LF"),r=n("8Y7J"),s=n("G0yt"),o=n("ajRT"),a=n("SVse"),c=n("NwgZ"),l=n("6+kj");function u(e,t){1&e&&(r.Sb(0,"span",11),r.Nb(1,"i",12),r.Rb())}function d(e,t){1&e&&r.Ob(0)}function h(e,t){if(1&e&&(r.Sb(0,"p"),r.Oc(1),r.Rb()),2&e){const e=r.ic();r.yb(1),r.Qc(" ",e.description," ")}}let f=(()=>{class e{constructor(e){this.activeModal=e,this.warning=!1,this.showSubmit=!0,this.boundCancel=this.cancel.bind(this),this.canceled=!1,this.confirmationForm=new i.j({})}ngOnInit(){if(this.bodyContext=this.bodyContext||{},this.bodyContext.$implicit=this.bodyData,!this.onSubmit)throw new Error("No submit action defined");if(!this.buttonText)throw new Error("No action name defined");if(!this.titleText)throw new Error("No title defined");if(!this.bodyTpl&&!this.description)throw new Error("No description defined")}ngOnDestroy(){this.onCancel&&this.canceled&&this.onCancel()}cancel(){this.canceled=!0,this.activeModal.close()}stopLoadingSpinner(){this.confirmationForm.setErrors({cdSubmitButton:!0})}}return e.\u0275fac=function(t){return new(t||e)(r.Mb(s.a))},e.\u0275cmp=r.Gb({type:e,selectors:[["cd-confirmation-modal"]],decls:12,vars:9,consts:[[3,"hide"],[1,"modal-title"],["class","text-warning",4,"ngIf"],[1,"modal-content"],["name","confirmationForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","showSubmit","submitActionEvent","backActionEvent"],[1,"text-warning"],[1,"fa","fa-exclamation-triangle","fa-1x"]],template:function(e,t){1&e&&(r.Sb(0,"cd-modal",0),r.gc("hide",(function(){return t.cancel()})),r.Qb(1,1),r.Mc(2,u,2,0,"span",2),r.Oc(3),r.Pb(),r.Qb(4,3),r.Sb(5,"form",4,5),r.Sb(7,"div",6),r.Mc(8,d,1,0,"ng-container",7),r.Mc(9,h,2,1,"p",8),r.Rb(),r.Sb(10,"div",9),r.Sb(11,"cd-form-button-panel",10),r.gc("submitActionEvent",(function(){return t.onSubmit(t.confirmationForm.value)}))("backActionEvent",(function(){return t.boundCancel()})),r.Rb(),r.Rb(),r.Rb(),r.Pb(),r.Rb()),2&e&&(r.yb(2),r.pc("ngIf",t.warning),r.yb(1),r.Pc(t.titleText),r.yb(2),r.pc("formGroup",t.confirmationForm),r.yb(3),r.pc("ngTemplateOutlet",t.bodyTpl)("ngTemplateOutletContext",t.bodyContext),r.yb(1),r.pc("ngIf",t.description),r.yb(2),r.pc("form",t.confirmationForm)("submitText",t.buttonText)("showSubmit",t.showSubmit))},directives:[o.a,a.r,i.C,i.r,i.k,c.a,a.w,l.a],styles:[""]}),e})()},Oaa7:function(e,t,n){!function(e){"use strict";e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n("wd/R"))},Ob0Z:function(e,t,n){!function(e){"use strict";var t={1:"\u0967",2:"\u0968",3:"\u0969",4:"\u096a",5:"\u096b",6:"\u096c",7:"\u096d",8:"\u096e",9:"\u096f",0:"\u0966"},n={"\u0967":"1","\u0968":"2","\u0969":"3","\u096a":"4","\u096b":"5","\u096c":"6","\u096d":"7","\u096e":"8","\u096f":"9","\u0966":"0"};function i(e,t,n,i){var r="";if(t)switch(n){case"s":r="\u0915\u093e\u0939\u0940 \u0938\u0947\u0915\u0902\u0926";break;case"ss":r="%d \u0938\u0947\u0915\u0902\u0926";break;case"m":r="\u090f\u0915 \u092e\u093f\u0928\u093f\u091f";break;case"mm":r="%d \u092e\u093f\u0928\u093f\u091f\u0947";break;case"h":r="\u090f\u0915 \u0924\u093e\u0938";break;case"hh":r="%d \u0924\u093e\u0938";break;case"d":r="\u090f\u0915 \u0926\u093f\u0935\u0938";break;case"dd":r="%d \u0926\u093f\u0935\u0938";break;case"M":r="\u090f\u0915 \u092e\u0939\u093f\u0928\u093e";break;case"MM":r="%d \u092e\u0939\u093f\u0928\u0947";break;case"y":r="\u090f\u0915 \u0935\u0930\u094d\u0937";break;case"yy":r="%d \u0935\u0930\u094d\u0937\u0947"}else switch(n){case"s":r="\u0915\u093e\u0939\u0940 \u0938\u0947\u0915\u0902\u0926\u093e\u0902";break;case"ss":r="%d \u0938\u0947\u0915\u0902\u0926\u093e\u0902";break;case"m":r="\u090f\u0915\u093e \u092e\u093f\u0928\u093f\u091f\u093e";break;case"mm":r="%d \u092e\u093f\u0928\u093f\u091f\u093e\u0902";break;case"h":r="\u090f\u0915\u093e \u0924\u093e\u0938\u093e";break;case"hh":r="%d \u0924\u093e\u0938\u093e\u0902";break;case"d":r="\u090f\u0915\u093e \u0926\u093f\u0935\u0938\u093e";break;case"dd":r="%d \u0926\u093f\u0935\u0938\u093e\u0902";break;case"M":r="\u090f\u0915\u093e \u092e\u0939\u093f\u0928\u094d\u092f\u093e";break;case"MM":r="%d \u092e\u0939\u093f\u0928\u094d\u092f\u093e\u0902";break;case"y":r="\u090f\u0915\u093e \u0935\u0930\u094d\u0937\u093e";break;case"yy":r="%d \u0935\u0930\u094d\u0937\u093e\u0902"}return r.replace(/%d/i,e)}e.defineLocale("mr",{months:"\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940_\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u090f\u092a\u094d\u0930\u093f\u0932_\u092e\u0947_\u091c\u0942\u0928_\u091c\u0941\u0932\u0948_\u0911\u0917\u0938\u094d\u091f_\u0938\u092a\u094d\u091f\u0947\u0902\u092c\u0930_\u0911\u0915\u094d\u091f\u094b\u092c\u0930_\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930_\u0921\u093f\u0938\u0947\u0902\u092c\u0930".split("_"),monthsShort:"\u091c\u093e\u0928\u0947._\u092b\u0947\u092c\u094d\u0930\u0941._\u092e\u093e\u0930\u094d\u091a._\u090f\u092a\u094d\u0930\u093f._\u092e\u0947._\u091c\u0942\u0928._\u091c\u0941\u0932\u0948._\u0911\u0917._\u0938\u092a\u094d\u091f\u0947\u0902._\u0911\u0915\u094d\u091f\u094b._\u0928\u094b\u0935\u094d\u0939\u0947\u0902._\u0921\u093f\u0938\u0947\u0902.".split("_"),monthsParseExact:!0,weekdays:"\u0930\u0935\u093f\u0935\u093e\u0930_\u0938\u094b\u092e\u0935\u093e\u0930_\u092e\u0902\u0917\u0933\u0935\u093e\u0930_\u092c\u0941\u0927\u0935\u093e\u0930_\u0917\u0941\u0930\u0942\u0935\u093e\u0930_\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930_\u0936\u0928\u093f\u0935\u093e\u0930".split("_"),weekdaysShort:"\u0930\u0935\u093f_\u0938\u094b\u092e_\u092e\u0902\u0917\u0933_\u092c\u0941\u0927_\u0917\u0941\u0930\u0942_\u0936\u0941\u0915\u094d\u0930_\u0936\u0928\u093f".split("_"),weekdaysMin:"\u0930_\u0938\u094b_\u092e\u0902_\u092c\u0941_\u0917\u0941_\u0936\u0941_\u0936".split("_"),longDateFormat:{LT:"A h:mm \u0935\u093e\u091c\u0924\u093e",LTS:"A h:mm:ss \u0935\u093e\u091c\u0924\u093e",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u0935\u093e\u091c\u0924\u093e",LLLL:"dddd, D MMMM YYYY, A h:mm \u0935\u093e\u091c\u0924\u093e"},calendar:{sameDay:"[\u0906\u091c] LT",nextDay:"[\u0909\u0926\u094d\u092f\u093e] LT",nextWeek:"dddd, LT",lastDay:"[\u0915\u093e\u0932] LT",lastWeek:"[\u092e\u093e\u0917\u0940\u0932] dddd, LT",sameElse:"L"},relativeTime:{future:"%s\u092e\u0927\u094d\u092f\u0947",past:"%s\u092a\u0942\u0930\u094d\u0935\u0940",s:i,ss:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},preparse:function(e){return e.replace(/[\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f\u0966]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/\u092a\u0939\u093e\u091f\u0947|\u0938\u0915\u093e\u0933\u0940|\u0926\u0941\u092a\u093e\u0930\u0940|\u0938\u093e\u092f\u0902\u0915\u093e\u0933\u0940|\u0930\u093e\u0924\u094d\u0930\u0940/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u092a\u0939\u093e\u091f\u0947"===t||"\u0938\u0915\u093e\u0933\u0940"===t?e:"\u0926\u0941\u092a\u093e\u0930\u0940"===t||"\u0938\u093e\u092f\u0902\u0915\u093e\u0933\u0940"===t||"\u0930\u093e\u0924\u094d\u0930\u0940"===t?e>=12?e:e+12:void 0},meridiem:function(e,t,n){return e>=0&&e<6?"\u092a\u0939\u093e\u091f\u0947":e<12?"\u0938\u0915\u093e\u0933\u0940":e<17?"\u0926\u0941\u092a\u093e\u0930\u0940":e<20?"\u0938\u093e\u092f\u0902\u0915\u093e\u0933\u0940":"\u0930\u093e\u0924\u094d\u0930\u0940"},week:{dow:0,doy:6}})}(n("wd/R"))},OjkT:function(e,t,n){!function(e){"use strict";var t={1:"\u0967",2:"\u0968",3:"\u0969",4:"\u096a",5:"\u096b",6:"\u096c",7:"\u096d",8:"\u096e",9:"\u096f",0:"\u0966"},n={"\u0967":"1","\u0968":"2","\u0969":"3","\u096a":"4","\u096b":"5","\u096c":"6","\u096d":"7","\u096e":"8","\u096f":"9","\u0966":"0"};e.defineLocale("ne",{months:"\u091c\u0928\u0935\u0930\u0940_\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u093f\u0932_\u092e\u0908_\u091c\u0941\u0928_\u091c\u0941\u0932\u093e\u0908_\u0905\u0917\u0937\u094d\u091f_\u0938\u0947\u092a\u094d\u091f\u0947\u092e\u094d\u092c\u0930_\u0905\u0915\u094d\u091f\u094b\u092c\u0930_\u0928\u094b\u092d\u0947\u092e\u094d\u092c\u0930_\u0921\u093f\u0938\u0947\u092e\u094d\u092c\u0930".split("_"),monthsShort:"\u091c\u0928._\u092b\u0947\u092c\u094d\u0930\u0941._\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u093f._\u092e\u0908_\u091c\u0941\u0928_\u091c\u0941\u0932\u093e\u0908._\u0905\u0917._\u0938\u0947\u092a\u094d\u091f._\u0905\u0915\u094d\u091f\u094b._\u0928\u094b\u092d\u0947._\u0921\u093f\u0938\u0947.".split("_"),monthsParseExact:!0,weekdays:"\u0906\u0907\u0924\u092c\u093e\u0930_\u0938\u094b\u092e\u092c\u093e\u0930_\u092e\u0919\u094d\u0917\u0932\u092c\u093e\u0930_\u092c\u0941\u0927\u092c\u093e\u0930_\u092c\u093f\u0939\u093f\u092c\u093e\u0930_\u0936\u0941\u0915\u094d\u0930\u092c\u093e\u0930_\u0936\u0928\u093f\u092c\u093e\u0930".split("_"),weekdaysShort:"\u0906\u0907\u0924._\u0938\u094b\u092e._\u092e\u0919\u094d\u0917\u0932._\u092c\u0941\u0927._\u092c\u093f\u0939\u093f._\u0936\u0941\u0915\u094d\u0930._\u0936\u0928\u093f.".split("_"),weekdaysMin:"\u0906._\u0938\u094b._\u092e\u0902._\u092c\u0941._\u092c\u093f._\u0936\u0941._\u0936.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A\u0915\u094b h:mm \u092c\u091c\u0947",LTS:"A\u0915\u094b h:mm:ss \u092c\u091c\u0947",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A\u0915\u094b h:mm \u092c\u091c\u0947",LLLL:"dddd, D MMMM YYYY, A\u0915\u094b h:mm \u092c\u091c\u0947"},preparse:function(e){return e.replace(/[\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f\u0966]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/\u0930\u093e\u0924\u093f|\u092c\u093f\u0939\u093e\u0928|\u0926\u093f\u0909\u0901\u0938\u094b|\u0938\u093e\u0901\u091d/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u0930\u093e\u0924\u093f"===t?e<4?e:e+12:"\u092c\u093f\u0939\u093e\u0928"===t?e:"\u0926\u093f\u0909\u0901\u0938\u094b"===t?e>=10?e:e+12:"\u0938\u093e\u0901\u091d"===t?e+12:void 0},meridiem:function(e,t,n){return e<3?"\u0930\u093e\u0924\u093f":e<12?"\u092c\u093f\u0939\u093e\u0928":e<16?"\u0926\u093f\u0909\u0901\u0938\u094b":e<20?"\u0938\u093e\u0901\u091d":"\u0930\u093e\u0924\u093f"},calendar:{sameDay:"[\u0906\u091c] LT",nextDay:"[\u092d\u094b\u0932\u093f] LT",nextWeek:"[\u0906\u0909\u0901\u0926\u094b] dddd[,] LT",lastDay:"[\u0939\u093f\u091c\u094b] LT",lastWeek:"[\u0917\u090f\u0915\u094b] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s\u092e\u093e",past:"%s \u0905\u0917\u093e\u0921\u093f",s:"\u0915\u0947\u0939\u0940 \u0915\u094d\u0937\u0923",ss:"%d \u0938\u0947\u0915\u0947\u0923\u094d\u0921",m:"\u090f\u0915 \u092e\u093f\u0928\u0947\u091f",mm:"%d \u092e\u093f\u0928\u0947\u091f",h:"\u090f\u0915 \u0918\u0923\u094d\u091f\u093e",hh:"%d \u0918\u0923\u094d\u091f\u093e",d:"\u090f\u0915 \u0926\u093f\u0928",dd:"%d \u0926\u093f\u0928",M:"\u090f\u0915 \u092e\u0939\u093f\u0928\u093e",MM:"%d \u092e\u0939\u093f\u0928\u093e",y:"\u090f\u0915 \u092c\u0930\u094d\u0937",yy:"%d \u092c\u0930\u094d\u0937"},week:{dow:0,doy:6}})}(n("wd/R"))},OmwH:function(e,t,n){!function(e){"use strict";e.defineLocale("zh-mo",{months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u9031\u65e5_\u9031\u4e00_\u9031\u4e8c_\u9031\u4e09_\u9031\u56db_\u9031\u4e94_\u9031\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5 HH:mm",LLLL:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm",l:"D/M/YYYY",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u51cc\u6668"===t||"\u65e9\u4e0a"===t||"\u4e0a\u5348"===t?e:"\u4e2d\u5348"===t?e>=11?e:e+12:"\u4e0b\u5348"===t||"\u665a\u4e0a"===t?e+12:void 0},meridiem:function(e,t,n){var i=100*e+t;return i<600?"\u51cc\u6668":i<900?"\u65e9\u4e0a":i<1130?"\u4e0a\u5348":i<1230?"\u4e2d\u5348":i<1800?"\u4e0b\u5348":"\u665a\u4e0a"},calendar:{sameDay:"[\u4eca\u5929] LT",nextDay:"[\u660e\u5929] LT",nextWeek:"[\u4e0b]dddd LT",lastDay:"[\u6628\u5929] LT",lastWeek:"[\u4e0a]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u9031)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"\u65e5";case"M":return e+"\u6708";case"w":case"W":return e+"\u9031";default:return e}},relativeTime:{future:"%s\u5167",past:"%s\u524d",s:"\u5e7e\u79d2",ss:"%d \u79d2",m:"1 \u5206\u9418",mm:"%d \u5206\u9418",h:"1 \u5c0f\u6642",hh:"%d \u5c0f\u6642",d:"1 \u5929",dd:"%d \u5929",M:"1 \u500b\u6708",MM:"%d \u500b\u6708",y:"1 \u5e74",yy:"%d \u5e74"}})}(n("wd/R"))},Oxv6:function(e,t,n){!function(e){"use strict";var t={0:"-\u0443\u043c",1:"-\u0443\u043c",2:"-\u044e\u043c",3:"-\u044e\u043c",4:"-\u0443\u043c",5:"-\u0443\u043c",6:"-\u0443\u043c",7:"-\u0443\u043c",8:"-\u0443\u043c",9:"-\u0443\u043c",10:"-\u0443\u043c",12:"-\u0443\u043c",13:"-\u0443\u043c",20:"-\u0443\u043c",30:"-\u044e\u043c",40:"-\u0443\u043c",50:"-\u0443\u043c",60:"-\u0443\u043c",70:"-\u0443\u043c",80:"-\u0443\u043c",90:"-\u0443\u043c",100:"-\u0443\u043c"};e.defineLocale("tg",{months:{format:"\u044f\u043d\u0432\u0430\u0440\u0438_\u0444\u0435\u0432\u0440\u0430\u043b\u0438_\u043c\u0430\u0440\u0442\u0438_\u0430\u043f\u0440\u0435\u043b\u0438_\u043c\u0430\u0439\u0438_\u0438\u044e\u043d\u0438_\u0438\u044e\u043b\u0438_\u0430\u0432\u0433\u0443\u0441\u0442\u0438_\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u0438_\u043e\u043a\u0442\u044f\u0431\u0440\u0438_\u043d\u043e\u044f\u0431\u0440\u0438_\u0434\u0435\u043a\u0430\u0431\u0440\u0438".split("_"),standalone:"\u044f\u043d\u0432\u0430\u0440_\u0444\u0435\u0432\u0440\u0430\u043b_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0435\u043b_\u043c\u0430\u0439_\u0438\u044e\u043d_\u0438\u044e\u043b_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043d\u0442\u044f\u0431\u0440_\u043e\u043a\u0442\u044f\u0431\u0440_\u043d\u043e\u044f\u0431\u0440_\u0434\u0435\u043a\u0430\u0431\u0440".split("_")},monthsShort:"\u044f\u043d\u0432_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0439_\u0438\u044e\u043d_\u0438\u044e\u043b_\u0430\u0432\u0433_\u0441\u0435\u043d_\u043e\u043a\u0442_\u043d\u043e\u044f_\u0434\u0435\u043a".split("_"),weekdays:"\u044f\u043a\u0448\u0430\u043d\u0431\u0435_\u0434\u0443\u0448\u0430\u043d\u0431\u0435_\u0441\u0435\u0448\u0430\u043d\u0431\u0435_\u0447\u043e\u0440\u0448\u0430\u043d\u0431\u0435_\u043f\u0430\u043d\u04b7\u0448\u0430\u043d\u0431\u0435_\u04b7\u0443\u043c\u044a\u0430_\u0448\u0430\u043d\u0431\u0435".split("_"),weekdaysShort:"\u044f\u0448\u0431_\u0434\u0448\u0431_\u0441\u0448\u0431_\u0447\u0448\u0431_\u043f\u0448\u0431_\u04b7\u0443\u043c_\u0448\u043d\u0431".split("_"),weekdaysMin:"\u044f\u0448_\u0434\u0448_\u0441\u0448_\u0447\u0448_\u043f\u0448_\u04b7\u043c_\u0448\u0431".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0418\u043c\u0440\u04ef\u0437 \u0441\u043e\u0430\u0442\u0438] LT",nextDay:"[\u0424\u0430\u0440\u0434\u043e \u0441\u043e\u0430\u0442\u0438] LT",lastDay:"[\u0414\u0438\u0440\u04ef\u0437 \u0441\u043e\u0430\u0442\u0438] LT",nextWeek:"dddd[\u0438] [\u04b3\u0430\u0444\u0442\u0430\u0438 \u043e\u044f\u043d\u0434\u0430 \u0441\u043e\u0430\u0442\u0438] LT",lastWeek:"dddd[\u0438] [\u04b3\u0430\u0444\u0442\u0430\u0438 \u0433\u0443\u0437\u0430\u0448\u0442\u0430 \u0441\u043e\u0430\u0442\u0438] LT",sameElse:"L"},relativeTime:{future:"\u0431\u0430\u044a\u0434\u0438 %s",past:"%s \u043f\u0435\u0448",s:"\u044f\u043a\u0447\u0430\u043d\u0434 \u0441\u043e\u043d\u0438\u044f",m:"\u044f\u043a \u0434\u0430\u049b\u0438\u049b\u0430",mm:"%d \u0434\u0430\u049b\u0438\u049b\u0430",h:"\u044f\u043a \u0441\u043e\u0430\u0442",hh:"%d \u0441\u043e\u0430\u0442",d:"\u044f\u043a \u0440\u04ef\u0437",dd:"%d \u0440\u04ef\u0437",M:"\u044f\u043a \u043c\u043e\u04b3",MM:"%d \u043c\u043e\u04b3",y:"\u044f\u043a \u0441\u043e\u043b",yy:"%d \u0441\u043e\u043b"},meridiemParse:/\u0448\u0430\u0431|\u0441\u0443\u0431\u04b3|\u0440\u04ef\u0437|\u0431\u0435\u0433\u043e\u04b3/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u0448\u0430\u0431"===t?e<4?e:e+12:"\u0441\u0443\u0431\u04b3"===t?e:"\u0440\u04ef\u0437"===t?e>=11?e:e+12:"\u0431\u0435\u0433\u043e\u04b3"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"\u0448\u0430\u0431":e<11?"\u0441\u0443\u0431\u04b3":e<16?"\u0440\u04ef\u0437":e<19?"\u0431\u0435\u0433\u043e\u04b3":"\u0448\u0430\u0431"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0443\u043c|\u044e\u043c)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n("wd/R"))},P4y1:function(e,t){e.exports={}},P8lu:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var i=n("mrSG"),r=n("IheW"),s=n("LvDl"),o=n.n(s),a=n("cp0P"),c=n("LRne"),l=n("5+tZ"),u=n("CqXF"),d=n("JIr8"),h=n("9xzX"),f=n("xTzq"),p=n("8Y7J");let m=(()=>{let e=class{constructor(e,t){this.http=e,this.rgwDaemonService=t,this.url="api/rgw/user"}list(){return this.enumerate().pipe(Object(l.a)(e=>e.length>0?Object(a.a)(e.map(e=>this.get(e))):Object(c.a)([])))}enumerate(){return this.rgwDaemonService.request(e=>this.http.get(this.url,{params:e}))}enumerateEmail(){return this.rgwDaemonService.request(e=>this.http.get(this.url+"/get_emails",{params:e}))}get(e){return this.rgwDaemonService.request(t=>this.http.get(`${this.url}/${e}`,{params:t}))}getQuota(e){return this.rgwDaemonService.request(t=>this.http.get(`${this.url}/${e}/quota`,{params:t}))}create(e){return this.rgwDaemonService.request(t=>(o.a.keys(e).forEach(n=>{t=t.append(n,e[n])}),this.http.post(this.url,null,{params:t})))}update(e,t){return this.rgwDaemonService.request(n=>(o.a.keys(t).forEach(e=>{n=n.append(e,t[e])}),this.http.put(`${this.url}/${e}`,null,{params:n})))}updateQuota(e,t){return this.rgwDaemonService.request(n=>(o.a.keys(t).forEach(e=>{n=n.append(e,t[e])}),this.http.put(`${this.url}/${e}/quota`,null,{params:n})))}delete(e){return this.rgwDaemonService.request(t=>this.http.delete(`${this.url}/${e}`,{params:t}))}createSubuser(e,t){return this.rgwDaemonService.request(n=>(o.a.keys(t).forEach(e=>{n=n.append(e,t[e])}),this.http.post(`${this.url}/${e}/subuser`,null,{params:n})))}deleteSubuser(e,t){return this.rgwDaemonService.request(n=>this.http.delete(`${this.url}/${e}/subuser/${t}`,{params:n}))}addCapability(e,t,n){return this.rgwDaemonService.request(i=>(i=(i=i.append("type",t)).append("perm",n),this.http.post(`${this.url}/${e}/capability`,null,{params:i})))}deleteCapability(e,t,n){return this.rgwDaemonService.request(i=>(i=(i=i.append("type",t)).append("perm",n),this.http.delete(`${this.url}/${e}/capability`,{params:i})))}addS3Key(e,t){return this.rgwDaemonService.request(n=>(n=n.append("key_type","s3"),o.a.keys(t).forEach(e=>{n=n.append(e,t[e])}),this.http.post(`${this.url}/${e}/key`,null,{params:n})))}deleteS3Key(e,t){return this.rgwDaemonService.request(n=>(n=(n=n.append("key_type","s3")).append("access_key",t),this.http.delete(`${this.url}/${e}/key`,{params:n})))}exists(e){return this.get(e).pipe(Object(u.a)(!0),Object(d.a)(e=>(o.a.isFunction(e.preventDefault)&&e.preventDefault(),Object(c.a)(!1))))}emailExists(e){return e=decodeURIComponent(e),this.enumerateEmail().pipe(Object(l.a)(t=>{const n=o.a.indexOf(t,e);return Object(c.a)(-1!==n)}))}};return e.\u0275fac=function(t){return new(t||e)(p.dc(r.b),p.dc(h.a))},e.\u0275prov=p.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e=Object(i.b)([f.a,Object(i.d)("design:paramtypes",[r.b,h.a])],e),e})()},PA2r:function(e,t,n){!function(e){"use strict";var t="leden_\xfanor_b\u0159ezen_duben_kv\u011bten_\u010derven_\u010dervenec_srpen_z\xe1\u0159\xed_\u0159\xedjen_listopad_prosinec".split("_"),n="led_\xfano_b\u0159e_dub_kv\u011b_\u010dvn_\u010dvc_srp_z\xe1\u0159_\u0159\xedj_lis_pro".split("_"),i=[/^led/i,/^\xfano/i,/^b\u0159e/i,/^dub/i,/^kv\u011b/i,/^(\u010dvn|\u010derven$|\u010dervna)/i,/^(\u010dvc|\u010dervenec|\u010dervence)/i,/^srp/i,/^z\xe1\u0159/i,/^\u0159\xedj/i,/^lis/i,/^pro/i],r=/^(leden|\xfanor|b\u0159ezen|duben|kv\u011bten|\u010dervenec|\u010dervence|\u010derven|\u010dervna|srpen|z\xe1\u0159\xed|\u0159\xedjen|listopad|prosinec|led|\xfano|b\u0159e|dub|kv\u011b|\u010dvn|\u010dvc|srp|z\xe1\u0159|\u0159\xedj|lis|pro)/i;function s(e){return e>1&&e<5&&1!=~~(e/10)}function o(e,t,n,i){var r=e+" ";switch(n){case"s":return t||i?"p\xe1r sekund":"p\xe1r sekundami";case"ss":return t||i?r+(s(e)?"sekundy":"sekund"):r+"sekundami";case"m":return t?"minuta":i?"minutu":"minutou";case"mm":return t||i?r+(s(e)?"minuty":"minut"):r+"minutami";case"h":return t?"hodina":i?"hodinu":"hodinou";case"hh":return t||i?r+(s(e)?"hodiny":"hodin"):r+"hodinami";case"d":return t||i?"den":"dnem";case"dd":return t||i?r+(s(e)?"dny":"dn\xed"):r+"dny";case"M":return t||i?"m\u011bs\xedc":"m\u011bs\xedcem";case"MM":return t||i?r+(s(e)?"m\u011bs\xedce":"m\u011bs\xedc\u016f"):r+"m\u011bs\xedci";case"y":return t||i?"rok":"rokem";case"yy":return t||i?r+(s(e)?"roky":"let"):r+"lety"}}e.defineLocale("cs",{months:t,monthsShort:n,monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(leden|ledna|\xfanora|\xfanor|b\u0159ezen|b\u0159ezna|duben|dubna|kv\u011bten|kv\u011btna|\u010dervenec|\u010dervence|\u010derven|\u010dervna|srpen|srpna|z\xe1\u0159\xed|\u0159\xedjen|\u0159\xedjna|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|\xfano|b\u0159e|dub|kv\u011b|\u010dvn|\u010dvc|srp|z\xe1\u0159|\u0159\xedj|lis|pro)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"ned\u011ble_pond\u011bl\xed_\xfater\xfd_st\u0159eda_\u010dtvrtek_p\xe1tek_sobota".split("_"),weekdaysShort:"ne_po_\xfat_st_\u010dt_p\xe1_so".split("_"),weekdaysMin:"ne_po_\xfat_st_\u010dt_p\xe1_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[z\xedtra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v ned\u011bli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve st\u0159edu v] LT";case 4:return"[ve \u010dtvrtek v] LT";case 5:return"[v p\xe1tek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[v\u010dera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou ned\u011bli v] LT";case 1:case 2:return"[minul\xe9] dddd [v] LT";case 3:return"[minulou st\u0159edu v] LT";case 4:case 5:return"[minul\xfd] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"p\u0159ed %s",s:o,ss:o,m:o,mm:o,h:o,hh:o,d:o,dd:o,M:o,MM:o,y:o,yy:o},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},PCNd:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var i=n("SVse"),r=n("TKcr"),s=n("V/fk"),o=n("ChqD"),a=n("yGOH"),c=n("9Xeq"),l=n("Avrn"),u=n("aexS"),d=n("aXbf"),h=n("8Y7J");let f=(()=>{class e{}return e.\u0275mod=h.Kb({type:e}),e.\u0275inj=h.Jb({factory:function(t){return new(t||e)},providers:[u.a,l.a,d.a,r.a],imports:[[i.c,c.a,s.a,o.a,a.a],s.a,c.a,o.a,a.a]}),e})()},PKPk:function(e,t,n){"use strict";var i=n("ZUd8").charAt,r=n("afO8"),s=n("fdAy"),o="String Iterator",a=r.set,c=r.getterFor(o);s(String,"String",(function(e){a(this,{type:o,string:String(e),index:0})}),(function(){var e,t=c(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=i(n,r),t.index+=e.length,{value:e,done:!1})}))},PeUW:function(e,t,n){!function(e){"use strict";var t={1:"\u0be7",2:"\u0be8",3:"\u0be9",4:"\u0bea",5:"\u0beb",6:"\u0bec",7:"\u0bed",8:"\u0bee",9:"\u0bef",0:"\u0be6"},n={"\u0be7":"1","\u0be8":"2","\u0be9":"3","\u0bea":"4","\u0beb":"5","\u0bec":"6","\u0bed":"7","\u0bee":"8","\u0bef":"9","\u0be6":"0"};e.defineLocale("ta",{months:"\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf_\u0baa\u0bbf\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf_\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd_\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd_\u0bae\u0bc7_\u0b9c\u0bc2\u0ba9\u0bcd_\u0b9c\u0bc2\u0bb2\u0bc8_\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd_\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bc6\u0bae\u0bcd\u0baa\u0bb0\u0bcd_\u0b85\u0b95\u0bcd\u0b9f\u0bc7\u0bbe\u0baa\u0bb0\u0bcd_\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd_\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcd".split("_"),monthsShort:"\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf_\u0baa\u0bbf\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf_\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd_\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd_\u0bae\u0bc7_\u0b9c\u0bc2\u0ba9\u0bcd_\u0b9c\u0bc2\u0bb2\u0bc8_\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd_\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bc6\u0bae\u0bcd\u0baa\u0bb0\u0bcd_\u0b85\u0b95\u0bcd\u0b9f\u0bc7\u0bbe\u0baa\u0bb0\u0bcd_\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd_\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcd".split("_"),weekdays:"\u0b9e\u0bbe\u0baf\u0bbf\u0bb1\u0bcd\u0bb1\u0bc1\u0b95\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0ba4\u0bbf\u0b99\u0bcd\u0b95\u0b9f\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0b9a\u0bc6\u0bb5\u0bcd\u0bb5\u0bbe\u0baf\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0baa\u0bc1\u0ba4\u0ba9\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0bb5\u0bbf\u0baf\u0bbe\u0bb4\u0b95\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0bb5\u0bc6\u0bb3\u0bcd\u0bb3\u0bbf\u0b95\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0b9a\u0ba9\u0bbf\u0b95\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8".split("_"),weekdaysShort:"\u0b9e\u0bbe\u0baf\u0bbf\u0bb1\u0bc1_\u0ba4\u0bbf\u0b99\u0bcd\u0b95\u0bb3\u0bcd_\u0b9a\u0bc6\u0bb5\u0bcd\u0bb5\u0bbe\u0baf\u0bcd_\u0baa\u0bc1\u0ba4\u0ba9\u0bcd_\u0bb5\u0bbf\u0baf\u0bbe\u0bb4\u0ba9\u0bcd_\u0bb5\u0bc6\u0bb3\u0bcd\u0bb3\u0bbf_\u0b9a\u0ba9\u0bbf".split("_"),weekdaysMin:"\u0b9e\u0bbe_\u0ba4\u0bbf_\u0b9a\u0bc6_\u0baa\u0bc1_\u0bb5\u0bbf_\u0bb5\u0bc6_\u0b9a".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[\u0b87\u0ba9\u0bcd\u0bb1\u0bc1] LT",nextDay:"[\u0ba8\u0bbe\u0bb3\u0bc8] LT",nextWeek:"dddd, LT",lastDay:"[\u0ba8\u0bc7\u0bb1\u0bcd\u0bb1\u0bc1] LT",lastWeek:"[\u0b95\u0b9f\u0ba8\u0bcd\u0ba4 \u0bb5\u0bbe\u0bb0\u0bae\u0bcd] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0b87\u0bb2\u0bcd",past:"%s \u0bae\u0bc1\u0ba9\u0bcd",s:"\u0b92\u0bb0\u0bc1 \u0b9a\u0bbf\u0bb2 \u0bb5\u0bbf\u0ba8\u0bbe\u0b9f\u0bbf\u0b95\u0bb3\u0bcd",ss:"%d \u0bb5\u0bbf\u0ba8\u0bbe\u0b9f\u0bbf\u0b95\u0bb3\u0bcd",m:"\u0b92\u0bb0\u0bc1 \u0ba8\u0bbf\u0bae\u0bbf\u0b9f\u0bae\u0bcd",mm:"%d \u0ba8\u0bbf\u0bae\u0bbf\u0b9f\u0b99\u0bcd\u0b95\u0bb3\u0bcd",h:"\u0b92\u0bb0\u0bc1 \u0bae\u0ba3\u0bbf \u0ba8\u0bc7\u0bb0\u0bae\u0bcd",hh:"%d \u0bae\u0ba3\u0bbf \u0ba8\u0bc7\u0bb0\u0bae\u0bcd",d:"\u0b92\u0bb0\u0bc1 \u0ba8\u0bbe\u0bb3\u0bcd",dd:"%d \u0ba8\u0bbe\u0b9f\u0bcd\u0b95\u0bb3\u0bcd",M:"\u0b92\u0bb0\u0bc1 \u0bae\u0bbe\u0ba4\u0bae\u0bcd",MM:"%d \u0bae\u0bbe\u0ba4\u0b99\u0bcd\u0b95\u0bb3\u0bcd",y:"\u0b92\u0bb0\u0bc1 \u0bb5\u0bb0\u0bc1\u0b9f\u0bae\u0bcd",yy:"%d \u0b86\u0ba3\u0bcd\u0b9f\u0bc1\u0b95\u0bb3\u0bcd"},dayOfMonthOrdinalParse:/\d{1,2}\u0bb5\u0ba4\u0bc1/,ordinal:function(e){return e+"\u0bb5\u0ba4\u0bc1"},preparse:function(e){return e.replace(/[\u0be7\u0be8\u0be9\u0bea\u0beb\u0bec\u0bed\u0bee\u0bef\u0be6]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/\u0baf\u0bbe\u0bae\u0bae\u0bcd|\u0bb5\u0bc8\u0b95\u0bb1\u0bc8|\u0b95\u0bbe\u0bb2\u0bc8|\u0ba8\u0ba3\u0bcd\u0baa\u0b95\u0bb2\u0bcd|\u0b8e\u0bb1\u0bcd\u0baa\u0bbe\u0b9f\u0bc1|\u0bae\u0bbe\u0bb2\u0bc8/,meridiem:function(e,t,n){return e<2?" \u0baf\u0bbe\u0bae\u0bae\u0bcd":e<6?" \u0bb5\u0bc8\u0b95\u0bb1\u0bc8":e<10?" \u0b95\u0bbe\u0bb2\u0bc8":e<14?" \u0ba8\u0ba3\u0bcd\u0baa\u0b95\u0bb2\u0bcd":e<18?" \u0b8e\u0bb1\u0bcd\u0baa\u0bbe\u0b9f\u0bc1":e<22?" \u0bae\u0bbe\u0bb2\u0bc8":" \u0baf\u0bbe\u0bae\u0bae\u0bcd"},meridiemHour:function(e,t){return 12===e&&(e=0),"\u0baf\u0bbe\u0bae\u0bae\u0bcd"===t?e<2?e:e+12:"\u0bb5\u0bc8\u0b95\u0bb1\u0bc8"===t||"\u0b95\u0bbe\u0bb2\u0bc8"===t||"\u0ba8\u0ba3\u0bcd\u0baa\u0b95\u0bb2\u0bcd"===t&&e>=10?e:e+12},week:{dow:0,doy:6}})}(n("wd/R"))},PhyI:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return r}));var i=function(e){return e[e.global=0]="global",e[e.pool=1]="pool",e[e.image=2]="image",e}({}),r=function(e){return e[e.bps=0]="bps",e[e.iops=1]="iops",e[e.milliseconds=2]="milliseconds",e}({})},PpIw:function(e,t,n){!function(e){"use strict";var t={1:"\u0ce7",2:"\u0ce8",3:"\u0ce9",4:"\u0cea",5:"\u0ceb",6:"\u0cec",7:"\u0ced",8:"\u0cee",9:"\u0cef",0:"\u0ce6"},n={"\u0ce7":"1","\u0ce8":"2","\u0ce9":"3","\u0cea":"4","\u0ceb":"5","\u0cec":"6","\u0ced":"7","\u0cee":"8","\u0cef":"9","\u0ce6":"0"};e.defineLocale("kn",{months:"\u0c9c\u0ca8\u0cb5\u0cb0\u0cbf_\u0cab\u0cc6\u0cac\u0ccd\u0cb0\u0cb5\u0cb0\u0cbf_\u0cae\u0cbe\u0cb0\u0ccd\u0c9a\u0ccd_\u0c8f\u0caa\u0ccd\u0cb0\u0cbf\u0cb2\u0ccd_\u0cae\u0cc6\u0cd5_\u0c9c\u0cc2\u0ca8\u0ccd_\u0c9c\u0cc1\u0cb2\u0cc6\u0cd6_\u0c86\u0c97\u0cb8\u0ccd\u0c9f\u0ccd_\u0cb8\u0cc6\u0caa\u0ccd\u0c9f\u0cc6\u0c82\u0cac\u0cb0\u0ccd_\u0c85\u0c95\u0ccd\u0c9f\u0cc6\u0cc2\u0cd5\u0cac\u0cb0\u0ccd_\u0ca8\u0cb5\u0cc6\u0c82\u0cac\u0cb0\u0ccd_\u0ca1\u0cbf\u0cb8\u0cc6\u0c82\u0cac\u0cb0\u0ccd".split("_"),monthsShort:"\u0c9c\u0ca8_\u0cab\u0cc6\u0cac\u0ccd\u0cb0_\u0cae\u0cbe\u0cb0\u0ccd\u0c9a\u0ccd_\u0c8f\u0caa\u0ccd\u0cb0\u0cbf\u0cb2\u0ccd_\u0cae\u0cc6\u0cd5_\u0c9c\u0cc2\u0ca8\u0ccd_\u0c9c\u0cc1\u0cb2\u0cc6\u0cd6_\u0c86\u0c97\u0cb8\u0ccd\u0c9f\u0ccd_\u0cb8\u0cc6\u0caa\u0ccd\u0c9f\u0cc6\u0c82_\u0c85\u0c95\u0ccd\u0c9f\u0cc6\u0cc2\u0cd5_\u0ca8\u0cb5\u0cc6\u0c82_\u0ca1\u0cbf\u0cb8\u0cc6\u0c82".split("_"),monthsParseExact:!0,weekdays:"\u0cad\u0cbe\u0ca8\u0cc1\u0cb5\u0cbe\u0cb0_\u0cb8\u0cc6\u0cc2\u0cd5\u0cae\u0cb5\u0cbe\u0cb0_\u0cae\u0c82\u0c97\u0cb3\u0cb5\u0cbe\u0cb0_\u0cac\u0cc1\u0ca7\u0cb5\u0cbe\u0cb0_\u0c97\u0cc1\u0cb0\u0cc1\u0cb5\u0cbe\u0cb0_\u0cb6\u0cc1\u0c95\u0ccd\u0cb0\u0cb5\u0cbe\u0cb0_\u0cb6\u0ca8\u0cbf\u0cb5\u0cbe\u0cb0".split("_"),weekdaysShort:"\u0cad\u0cbe\u0ca8\u0cc1_\u0cb8\u0cc6\u0cc2\u0cd5\u0cae_\u0cae\u0c82\u0c97\u0cb3_\u0cac\u0cc1\u0ca7_\u0c97\u0cc1\u0cb0\u0cc1_\u0cb6\u0cc1\u0c95\u0ccd\u0cb0_\u0cb6\u0ca8\u0cbf".split("_"),weekdaysMin:"\u0cad\u0cbe_\u0cb8\u0cc6\u0cc2\u0cd5_\u0cae\u0c82_\u0cac\u0cc1_\u0c97\u0cc1_\u0cb6\u0cc1_\u0cb6".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[\u0c87\u0c82\u0ca6\u0cc1] LT",nextDay:"[\u0ca8\u0cbe\u0cb3\u0cc6] LT",nextWeek:"dddd, LT",lastDay:"[\u0ca8\u0cbf\u0ca8\u0ccd\u0ca8\u0cc6] LT",lastWeek:"[\u0c95\u0cc6\u0cc2\u0ca8\u0cc6\u0caf] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0ca8\u0c82\u0ca4\u0cb0",past:"%s \u0cb9\u0cbf\u0c82\u0ca6\u0cc6",s:"\u0c95\u0cc6\u0cb2\u0cb5\u0cc1 \u0c95\u0ccd\u0cb7\u0ca3\u0c97\u0cb3\u0cc1",ss:"%d \u0cb8\u0cc6\u0c95\u0cc6\u0c82\u0ca1\u0cc1\u0c97\u0cb3\u0cc1",m:"\u0c92\u0c82\u0ca6\u0cc1 \u0ca8\u0cbf\u0cae\u0cbf\u0cb7",mm:"%d \u0ca8\u0cbf\u0cae\u0cbf\u0cb7",h:"\u0c92\u0c82\u0ca6\u0cc1 \u0c97\u0c82\u0c9f\u0cc6",hh:"%d \u0c97\u0c82\u0c9f\u0cc6",d:"\u0c92\u0c82\u0ca6\u0cc1 \u0ca6\u0cbf\u0ca8",dd:"%d \u0ca6\u0cbf\u0ca8",M:"\u0c92\u0c82\u0ca6\u0cc1 \u0ca4\u0cbf\u0c82\u0c97\u0cb3\u0cc1",MM:"%d \u0ca4\u0cbf\u0c82\u0c97\u0cb3\u0cc1",y:"\u0c92\u0c82\u0ca6\u0cc1 \u0cb5\u0cb0\u0ccd\u0cb7",yy:"%d \u0cb5\u0cb0\u0ccd\u0cb7"},preparse:function(e){return e.replace(/[\u0ce7\u0ce8\u0ce9\u0cea\u0ceb\u0cec\u0ced\u0cee\u0cef\u0ce6]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/\u0cb0\u0cbe\u0ca4\u0ccd\u0cb0\u0cbf|\u0cac\u0cc6\u0cb3\u0cbf\u0c97\u0ccd\u0c97\u0cc6|\u0cae\u0ca7\u0ccd\u0caf\u0cbe\u0cb9\u0ccd\u0ca8|\u0cb8\u0c82\u0c9c\u0cc6/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u0cb0\u0cbe\u0ca4\u0ccd\u0cb0\u0cbf"===t?e<4?e:e+12:"\u0cac\u0cc6\u0cb3\u0cbf\u0c97\u0ccd\u0c97\u0cc6"===t?e:"\u0cae\u0ca7\u0ccd\u0caf\u0cbe\u0cb9\u0ccd\u0ca8"===t?e>=10?e:e+12:"\u0cb8\u0c82\u0c9c\u0cc6"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"\u0cb0\u0cbe\u0ca4\u0ccd\u0cb0\u0cbf":e<10?"\u0cac\u0cc6\u0cb3\u0cbf\u0c97\u0ccd\u0c97\u0cc6":e<17?"\u0cae\u0ca7\u0ccd\u0caf\u0cbe\u0cb9\u0ccd\u0ca8":e<20?"\u0cb8\u0c82\u0c9c\u0cc6":"\u0cb0\u0cbe\u0ca4\u0ccd\u0cb0\u0cbf"},dayOfMonthOrdinalParse:/\d{1,2}(\u0ca8\u0cc6\u0cd5)/,ordinal:function(e){return e+"\u0ca8\u0cc6\u0cd5"},week:{dow:0,doy:6}})}(n("wd/R"))},PqYM:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n("HDdC"),r=n("D0XW"),s=n("Y7HM"),o=n("z+Ro");function a(e=0,t,n){let a=-1;return Object(s.a)(t)?a=Number(t)<1?1:Number(t):Object(o.a)(t)&&(n=t),Object(o.a)(n)||(n=r.a),new i.a(t=>{const i=Object(s.a)(e)?e:+e-n.now();return n.schedule(c,i,{index:0,period:a,subscriber:t})})}function c(e){const{index:t,period:n,subscriber:i}=e;if(i.next(t),!i.closed){if(-1===n)return i.complete();e.index=t+1,this.schedule(e,n)}}},QFaf:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("s7LF");class r extends i.j{constructor(e,t,n){super(e,t,n),this.controls=e}get(e){const t=this._get(e);if(!t)throw new Error(`Control '${e}' could not be found!`);return t}_get(e){return super.get(e)||Object.values(this.controls).filter(e=>e.get).map(t=>t instanceof r?t._get(e):t.get(e)).find(e=>Boolean(e))}getValue(e){return this.get(e).value}silentSet(e,t){this.get(e).setValue(t,{emitEvent:!1})}showError(e,t,n){const i=this.get(e);return(t.submitted||i.dirty)&&(n?i.hasError(n):i.invalid)}}},QTAa:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("t/zF");class r extends i.a{}},QWBl:function(e,t,n){"use strict";var i=n("I+eb"),r=n("F8JR");i({target:"Array",proto:!0,forced:[].forEach!=r},{forEach:r})},Qj4J:function(e,t,n){!function(e){"use strict";e.defineLocale("ar-kw",{months:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),monthsShort:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062a\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0627\u062d\u062f_\u0627\u062a\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:0,doy:12}})}(n("wd/R"))},Qo9l:function(e,t,n){var i=n("2oRo");e.exports=i},RAwQ:function(e,t,n){!function(e){"use strict";function t(e,t,n,i){var r={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return t?r[n][0]:r[n][1]}function n(e){if(e=parseInt(e,10),isNaN(e))return!1;if(e<0)return!0;if(e<10)return 4<=e&&e<=7;if(e<100){var t=e%10;return n(0===t?e/10:t)}if(e<1e4){for(;e>=10;)e/=10;return n(e)}return n(e/=1e3)}e.defineLocale("lb",{months:"Januar_Februar_M\xe4erz_Abr\xebll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_M\xe9indeg_D\xebnschdeg_M\xebttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._M\xe9._D\xeb._M\xeb._Do._Fr._Sa.".split("_"),weekdaysMin:"So_M\xe9_D\xeb_M\xeb_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[G\xebschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:function(e){return n(e.substr(0,e.indexOf(" ")))?"a "+e:"an "+e},past:function(e){return n(e.substr(0,e.indexOf(" ")))?"viru "+e:"virun "+e},s:"e puer Sekonnen",ss:"%d Sekonnen",m:t,mm:"%d Minutten",h:t,hh:"%d Stonnen",d:t,dd:"%d Deeg",M:t,MM:"%d M\xe9int",y:t,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},RK3t:function(e,t,n){var i=n("0Dky"),r=n("xrYK"),s="".split;e.exports=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==r(e)?s.call(e,""):Object(e)}:Object},RNIs:function(e,t,n){var i=n("tiKp"),r=n("fHMY"),s=n("m/L8"),o=i("unscopables"),a=Array.prototype;null==a[o]&&s.f(a,o,{configurable:!0,value:r(null)}),e.exports=function(e){a[o][e]=!0}},Rf2I:function(e,t,n){"use strict";n.d(t,"a",(function(){return A}));var i=n("s7LF"),r=n("LvDl"),s=n.n(r),o=n("2EZI"),a=n("Fgil"),c=n("aXbf"),l=n("8Y7J"),u=n("G0yt"),d=n("ajRT"),h=n("SVse"),f=n("NwgZ"),p=n("6+kj"),m=n("ANnk"),b=n("f69J"),g=n("EmSq"),_=n("ppaS");function y(e,t){if(1&e&&(l.Qb(0,10),l.Oc(1),l.Pb()),2&e){const e=l.ic();l.yb(1),l.Qc(" ",e.titleText," ")}}function v(e,t){if(1&e&&(l.Sb(0,"p"),l.Oc(1),l.Rb()),2&e){const e=l.ic();l.yb(1),l.Pc(e.message)}}const w=function(e){return{required:e}};function S(e,t){if(1&e&&(l.Sb(0,"label",18),l.Oc(1),l.Rb()),2&e){const e=l.ic().$implicit;l.pc("ngClass",l.uc(3,w,!0===(null==e?null:e.required)))("for",e.name),l.yb(1),l.Qc(" ",e.label," ")}}function M(e,t){if(1&e&&l.Nb(0,"input",19),2&e){const e=l.ic().$implicit;l.pc("type",e.type)("id",e.name)("name",e.name)("formControlName",e.name)}}function x(e,t){if(1&e&&l.Nb(0,"input",20),2&e){const e=l.ic().$implicit;l.pc("id",e.name)("name",e.name)("formControlName",e.name)}}function k(e,t){if(1&e&&(l.Sb(0,"option",24),l.Oc(1),l.Rb()),2&e){const e=l.ic(2).$implicit;l.pc("ngValue",null),l.yb(1),l.Qc(" ",null==e||null==e.typeConfig?null:e.typeConfig.placeholder," ")}}function D(e,t){if(1&e&&(l.Sb(0,"option",25),l.Oc(1),l.Rb()),2&e){const e=t.$implicit;l.pc("value",e.value),l.yb(1),l.Qc(" ",e.text," ")}}function T(e,t){if(1&e&&(l.Sb(0,"select",21),l.Mc(1,k,2,2,"option",22),l.Mc(2,D,2,2,"option",23),l.Rb()),2&e){const e=l.ic().$implicit;l.pc("id",e.name)("formControlName",e.name),l.yb(1),l.pc("ngIf",null==e||null==e.typeConfig?null:e.typeConfig.placeholder),l.yb(1),l.pc("ngForOf",null==e||null==e.typeConfig?null:e.typeConfig.options)}}function C(e,t){if(1&e&&l.Nb(0,"cd-select-badges",26),2&e){const e=l.ic().$implicit;l.pc("id",e.name)("data",e.value)("customBadges",null==e||null==e.typeConfig?null:e.typeConfig.customBadges)("options",null==e||null==e.typeConfig?null:e.typeConfig.options)("messages",null==e||null==e.typeConfig?null:e.typeConfig.messages)}}function O(e,t){if(1&e&&(l.Sb(0,"span",27),l.Oc(1),l.Rb()),2&e){const e=l.ic().$implicit,t=l.ic();l.yb(1),l.Qc(" ",t.getError(e)," ")}}const L=function(e,t){return{"cd-col-form-input":e,"col-sm-12":t}},R=function(){return["text","number"]};function E(e,t){if(1&e&&(l.Qb(0),l.Sb(1,"div"),l.Mc(2,S,2,5,"label",11),l.Sb(3,"div",12),l.Mc(4,M,1,4,"input",13),l.Mc(5,x,1,3,"input",14),l.Mc(6,T,3,4,"select",15),l.Mc(7,C,1,5,"cd-select-badges",16),l.Mc(8,O,2,1,"span",17),l.Rb(),l.Rb(),l.Pb()),2&e){const e=t.$implicit,n=l.ic(),i=l.Ac(4);l.yb(1),l.Bb("form-group row cd-",e.name,"-form-group"),l.yb(1),l.pc("ngIf",e.label),l.yb(1),l.pc("ngClass",l.vc(10,L,e.label,!e.label)),l.yb(1),l.pc("ngIf",l.tc(13,R).includes(e.type)),l.yb(1),l.pc("ngIf","binary"===e.type),l.yb(1),l.pc("ngIf","select"===e.type),l.yb(1),l.pc("ngIf","select-badges"===e.type),l.yb(1),l.pc("ngIf",n.formGroup.showError(e.name,i))}}let A=(()=>{class e{constructor(e,t,n,i){this.activeModal=e,this.formBuilder=t,this.formatter=n,this.dimlessBinaryPipe=i}ngOnInit(){this.createForm()}createForm(){const e={};this.fields.forEach(t=>{e[t.name]=this.createFormControl(t)}),this.formGroup=this.formBuilder.group(e)}createFormControl(e){let t=[];return s.a.isBoolean(e.required)&&e.required&&t.push(i.A.required),e.validators&&(t=t.concat(e.validators)),new i.h(s.a.defaultTo("binary"===e.type?this.dimlessBinaryPipe.transform(e.value):e.value,null),{validators:t})}getError(e){const t=this.formGroup.get(e.name).errors;return Object.keys(t).map(n=>this.getErrorMessage(n,t[n],e.errors)).join("<br>")}getErrorMessage(e,t,n){if(n){const t=n[e];if(t)return t}return["binaryMin","binaryMax"].includes(e)?t():"required"===e?"This field is required.":"An error occurred."}onSubmitForm(e){this.fields.filter(e=>"binary"===e.type).map(e=>e.name).forEach(t=>{const n=e[t];n&&(e[t]=this.formatter.toBytes(n))}),this.activeModal.close(),s.a.isFunction(this.onSubmit)&&this.onSubmit(e)}}return e.\u0275fac=function(t){return new(t||e)(l.Mb(u.a),l.Mb(o.a),l.Mb(c.a),l.Mb(a.a))},e.\u0275cmp=l.Gb({type:e,selectors:[["cd-form-modal"]],decls:10,vars:7,consts:[[3,"modalRef"],["class","modal-title",4,"ngIf"],[1,"modal-content"],["novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[1,"modal-title"],["class","cd-col-form-label",3,"ngClass","for",4,"ngIf"],[3,"ngClass"],["class","form-control",3,"type","id","name","formControlName",4,"ngIf"],["type","text","class","form-control","cdDimlessBinary","",3,"id","name","formControlName",4,"ngIf"],["class","form-control custom-select",3,"id","formControlName",4,"ngIf"],[3,"id","data","customBadges","options","messages",4,"ngIf"],["class","invalid-feedback",4,"ngIf"],[1,"cd-col-form-label",3,"ngClass","for"],[1,"form-control",3,"type","id","name","formControlName"],["type","text","cdDimlessBinary","",1,"form-control",3,"id","name","formControlName"],[1,"form-control","custom-select",3,"id","formControlName"],[3,"ngValue",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"ngValue"],[3,"value"],[3,"id","data","customBadges","options","messages"],[1,"invalid-feedback"]],template:function(e,t){1&e&&(l.Sb(0,"cd-modal",0),l.Mc(1,y,2,1,"ng-container",1),l.Qb(2,2),l.Sb(3,"form",3,4),l.Sb(5,"div",5),l.Mc(6,v,2,1,"p",6),l.Mc(7,E,9,14,"ng-container",7),l.Rb(),l.Sb(8,"div",8),l.Sb(9,"cd-form-button-panel",9),l.gc("submitActionEvent",(function(){return t.onSubmitForm(t.formGroup.value)})),l.Rb(),l.Rb(),l.Rb(),l.Pb(),l.Rb()),2&e&&(l.pc("modalRef",t.activeModal),l.yb(1),l.pc("ngIf",t.titleText),l.yb(2),l.pc("formGroup",t.formGroup),l.yb(3),l.pc("ngIf",t.message),l.yb(1),l.pc("ngForOf",t.fields),l.yb(2),l.pc("form",t.formGroup)("submitText",t.submitButtonText))},directives:[d.a,h.r,i.C,i.r,i.k,f.a,h.q,p.a,h.p,m.a,i.d,b.a,i.q,i.i,g.a,i.z,i.u,i.B,_.a],styles:[""]}),e})()},Rm1S:function(e,t,n){"use strict";var i=n("14Sl"),r=n("glrk"),s=n("UMSQ"),o=n("HYAF"),a=n("iqWW"),c=n("FMNM");i("match",1,(function(e,t,n){return[function(t){var n=o(this),i=null==t?void 0:t[e];return void 0!==i?i.call(t,n):new RegExp(t)[e](String(n))},function(e){var i=n(t,e,this);if(i.done)return i.value;var o=r(e),l=String(this);if(!o.global)return c(o,l);var u=o.unicode;o.lastIndex=0;for(var d,h=[],f=0;null!==(d=c(o,l));){var p=String(d[0]);h[f]=p,""===p&&(o.lastIndex=a(l,s(o.lastIndex),u)),f++}return 0===f?null:h}]}))},RnhZ:function(e,t,n){var i={"./af":"K/tc","./af.js":"K/tc","./ar":"jnO4","./ar-dz":"o1bE","./ar-dz.js":"o1bE","./ar-kw":"Qj4J","./ar-kw.js":"Qj4J","./ar-ly":"HP3h","./ar-ly.js":"HP3h","./ar-ma":"CoRJ","./ar-ma.js":"CoRJ","./ar-sa":"gjCT","./ar-sa.js":"gjCT","./ar-tn":"bYM6","./ar-tn.js":"bYM6","./ar.js":"jnO4","./az":"SFxW","./az.js":"SFxW","./be":"H8ED","./be.js":"H8ED","./bg":"hKrs","./bg.js":"hKrs","./bm":"p/rL","./bm.js":"p/rL","./bn":"kEOa","./bn-bd":"loYQ","./bn-bd.js":"loYQ","./bn.js":"kEOa","./bo":"0mo+","./bo.js":"0mo+","./br":"aIdf","./br.js":"aIdf","./bs":"JVSJ","./bs.js":"JVSJ","./ca":"1xZ4","./ca.js":"1xZ4","./cs":"PA2r","./cs.js":"PA2r","./cv":"A+xa","./cv.js":"A+xa","./cy":"l5ep","./cy.js":"l5ep","./da":"DxQv","./da.js":"DxQv","./de":"tGlX","./de-at":"s+uk","./de-at.js":"s+uk","./de-ch":"u3GI","./de-ch.js":"u3GI","./de.js":"tGlX","./dv":"WYrj","./dv.js":"WYrj","./el":"jUeY","./el.js":"jUeY","./en-au":"Dmvi","./en-au.js":"Dmvi","./en-ca":"OIYi","./en-ca.js":"OIYi","./en-gb":"Oaa7","./en-gb.js":"Oaa7","./en-ie":"4dOw","./en-ie.js":"4dOw","./en-il":"czMo","./en-il.js":"czMo","./en-in":"7C5Q","./en-in.js":"7C5Q","./en-nz":"b1Dy","./en-nz.js":"b1Dy","./en-sg":"t+mt","./en-sg.js":"t+mt","./eo":"Zduo","./eo.js":"Zduo","./es":"iYuL","./es-do":"CjzT","./es-do.js":"CjzT","./es-mx":"tbfe","./es-mx.js":"tbfe","./es-us":"Vclq","./es-us.js":"Vclq","./es.js":"iYuL","./et":"7BjC","./et.js":"7BjC","./eu":"D/JM","./eu.js":"D/JM","./fa":"jfSC","./fa.js":"jfSC","./fi":"gekB","./fi.js":"gekB","./fil":"1ppg","./fil.js":"1ppg","./fo":"ByF4","./fo.js":"ByF4","./fr":"nyYc","./fr-ca":"2fjn","./fr-ca.js":"2fjn","./fr-ch":"Dkky","./fr-ch.js":"Dkky","./fr.js":"nyYc","./fy":"cRix","./fy.js":"cRix","./ga":"USCx","./ga.js":"USCx","./gd":"9rRi","./gd.js":"9rRi","./gl":"iEDd","./gl.js":"iEDd","./gom-deva":"qvJo","./gom-deva.js":"qvJo","./gom-latn":"DKr+","./gom-latn.js":"DKr+","./gu":"4MV3","./gu.js":"4MV3","./he":"x6pH","./he.js":"x6pH","./hi":"3E1r","./hi.js":"3E1r","./hr":"S6ln","./hr.js":"S6ln","./hu":"WxRl","./hu.js":"WxRl","./hy-am":"1rYy","./hy-am.js":"1rYy","./id":"UDhR","./id.js":"UDhR","./is":"BVg3","./is.js":"BVg3","./it":"bpih","./it-ch":"bxKX","./it-ch.js":"bxKX","./it.js":"bpih","./ja":"B55N","./ja.js":"B55N","./jv":"tUCv","./jv.js":"tUCv","./ka":"IBtZ","./ka.js":"IBtZ","./kk":"bXm7","./kk.js":"bXm7","./km":"6B0Y","./km.js":"6B0Y","./kn":"PpIw","./kn.js":"PpIw","./ko":"Ivi+","./ko.js":"Ivi+","./ku":"JCF/","./ku.js":"JCF/","./ky":"lgnt","./ky.js":"lgnt","./lb":"RAwQ","./lb.js":"RAwQ","./lo":"sp3z","./lo.js":"sp3z","./lt":"JvlW","./lt.js":"JvlW","./lv":"uXwI","./lv.js":"uXwI","./me":"KTz0","./me.js":"KTz0","./mi":"aIsn","./mi.js":"aIsn","./mk":"aQkU","./mk.js":"aQkU","./ml":"AvvY","./ml.js":"AvvY","./mn":"lYtQ","./mn.js":"lYtQ","./mr":"Ob0Z","./mr.js":"Ob0Z","./ms":"6+QB","./ms-my":"ZAMP","./ms-my.js":"ZAMP","./ms.js":"6+QB","./mt":"G0Uy","./mt.js":"G0Uy","./my":"honF","./my.js":"honF","./nb":"bOMt","./nb.js":"bOMt","./ne":"OjkT","./ne.js":"OjkT","./nl":"+s0g","./nl-be":"2ykv","./nl-be.js":"2ykv","./nl.js":"+s0g","./nn":"uEye","./nn.js":"uEye","./oc-lnc":"Fnuy","./oc-lnc.js":"Fnuy","./pa-in":"8/+R","./pa-in.js":"8/+R","./pl":"jVdC","./pl.js":"jVdC","./pt":"8mBD","./pt-br":"0tRk","./pt-br.js":"0tRk","./pt.js":"8mBD","./ro":"lyxo","./ro.js":"lyxo","./ru":"lXzo","./ru.js":"lXzo","./sd":"Z4QM","./sd.js":"Z4QM","./se":"//9w","./se.js":"//9w","./si":"7aV9","./si.js":"7aV9","./sk":"e+ae","./sk.js":"e+ae","./sl":"gVVK","./sl.js":"gVVK","./sq":"yPMs","./sq.js":"yPMs","./sr":"zx6S","./sr-cyrl":"E+lV","./sr-cyrl.js":"E+lV","./sr.js":"zx6S","./ss":"Ur1D","./ss.js":"Ur1D","./sv":"X709","./sv.js":"X709","./sw":"dNwA","./sw.js":"dNwA","./ta":"PeUW","./ta.js":"PeUW","./te":"XLvN","./te.js":"XLvN","./tet":"V2x9","./tet.js":"V2x9","./tg":"Oxv6","./tg.js":"Oxv6","./th":"EOgW","./th.js":"EOgW","./tk":"Wv91","./tk.js":"Wv91","./tl-ph":"Dzi0","./tl-ph.js":"Dzi0","./tlh":"z3Vd","./tlh.js":"z3Vd","./tr":"DoHr","./tr.js":"DoHr","./tzl":"z1FC","./tzl.js":"z1FC","./tzm":"wQk9","./tzm-latn":"tT3J","./tzm-latn.js":"tT3J","./tzm.js":"wQk9","./ug-cn":"YRex","./ug-cn.js":"YRex","./uk":"raLr","./uk.js":"raLr","./ur":"UpQW","./ur.js":"UpQW","./uz":"Loxo","./uz-latn":"AQ68","./uz-latn.js":"AQ68","./uz.js":"Loxo","./vi":"KSF8","./vi.js":"KSF8","./x-pseudo":"/X5v","./x-pseudo.js":"/X5v","./yo":"fzPg","./yo.js":"fzPg","./zh-cn":"XDpg","./zh-cn.js":"XDpg","./zh-hk":"SatO","./zh-hk.js":"SatO","./zh-mo":"OmwH","./zh-mo.js":"OmwH","./zh-tw":"kOpN","./zh-tw.js":"kOpN"};function r(e){var t=s(e);return n(t)}function s(e){if(!n.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}r.keys=function(){return Object.keys(i)},r.resolve=s,e.exports=r,r.id="RnhZ"},S6ln:function(e,t,n){!function(e){"use strict";function t(e,t,n){var i=e+" ";switch(n){case"ss":return i+(1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi");case"m":return t?"jedna minuta":"jedne minute";case"mm":return i+(1===e?"minuta":2===e||3===e||4===e?"minute":"minuta");case"h":return t?"jedan sat":"jednog sata";case"hh":return i+(1===e?"sat":2===e||3===e||4===e?"sata":"sati");case"dd":return i+(1===e?"dan":"dana");case"MM":return i+(1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci");case"yy":return i+(1===e?"godina":2===e||3===e||4===e?"godine":"godina")}}e.defineLocale("hr",{months:{format:"sije\u010dnja_velja\u010de_o\u017eujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"sije\u010danj_velja\u010da_o\u017eujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._o\u017eu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_\u010detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._\u010det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010de_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"Do MMMM YYYY",LLL:"Do MMMM YYYY H:mm",LLLL:"dddd, Do MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[ju\u010der u] LT",lastWeek:function(){switch(this.day()){case 0:return"[pro\u0161lu] [nedjelju] [u] LT";case 3:return"[pro\u0161lu] [srijedu] [u] LT";case 6:return"[pro\u0161le] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[pro\u0161li] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n("wd/R"))},S7zO:function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var i=n("LvDl"),r=n.n(i),s=n("oxzT"),o=(n("vCyI"),n("jKX/"),n("8Y7J")),a=n("SVse"),c=n("iInd"),l=n("G0yt");const u=function(e){return{disabled:e}},d=function(e){return[e]};function h(e,t){if(1&e){const e=o.Tb();o.Qb(0),o.Sb(1,"button",3),o.gc("click",(function(){o.Dc(e);const t=o.ic();return t.useClickAction(t.currentAction)})),o.Nb(2,"i",4),o.Sb(3,"span"),o.Oc(4),o.Rb(),o.Rb(),o.Pb()}if(2&e){const e=o.ic();o.yb(1),o.Bb("btn btn-",e.btnColor,""),o.qc("title",e.useDisableDesc(e.currentAction)),o.pc("ngClass",o.uc(9,u,e.disableSelectionAction(e.currentAction)))("routerLink",e.useRouterLink(e.currentAction))("preserveFragment",e.currentAction.preserveFragment?"":null),o.yb(1),o.pc("ngClass",o.uc(11,d,e.currentAction.icon)),o.yb(2),o.Pc(e.currentAction.name)}}function f(e,t){if(1&e&&(o.Qb(0),o.Oc(1),o.Pb()),2&e){const e=o.ic(2);o.yb(1),o.Qc("",e.dropDownOnly," ")}}function p(e,t){1&e&&o.Nb(0,"span",10)}function m(e,t){if(1&e){const e=o.Tb();o.Qb(0),o.Sb(1,"button",11),o.gc("click",(function(){o.Dc(e);const n=t.$implicit;return o.ic(2).useClickAction(n)})),o.Nb(2,"i",4),o.Sb(3,"span"),o.Oc(4),o.Rb(),o.Rb(),o.Pb()}if(2&e){const e=t.$implicit,n=o.ic(2);o.yb(1),o.Ab(n.toClassName(e)),o.qc("title",n.useDisableDesc(e)),o.pc("routerLink",n.useRouterLink(e))("preserveFragment",e.preserveFragment?"":null)("disabled",n.disableSelectionAction(e)),o.yb(1),o.pc("ngClass",o.uc(9,d,e.icon)),o.yb(2),o.Pc(e.name)}}function b(e,t){if(1&e&&(o.Sb(0,"div",5),o.Sb(1,"button",6),o.Mc(2,f,2,1,"ng-container",1),o.Mc(3,p,1,0,"span",7),o.Rb(),o.Sb(4,"div",8),o.Mc(5,m,5,11,"ng-container",9),o.Rb(),o.Rb()),2&e){const e=o.ic();o.yb(1),o.Bb("btn btn-",e.btnColor," dropdown-toggle-split"),o.yb(1),o.pc("ngIf",e.dropDownOnly),o.yb(1),o.pc("ngIf",!e.dropDownOnly),o.yb(2),o.pc("ngForOf",e.dropDownActions)}}let g=(()=>{class e{constructor(){this.btnColor="accent",this.dropDownActions=[],this.icons=s.a}ngOnInit(){this.removeActionsWithNoPermissions(),this.onSelectionChange()}ngOnChanges(e){e.selection&&this.onSelectionChange()}onSelectionChange(){this.updateDropDownActions(),this.updateCurrentAction()}toClassName(e){return e.name.replace(/ /g,"-").replace(/[^a-z-]/gi,"").toLowerCase()}removeActionsWithNoPermissions(){if(!this.permission)return void(this.tableActions=[]);const e=Object.keys(this.permission).filter(e=>this.permission[e]);this.tableActions=this.tableActions.filter(t=>e.includes(t.permission))}updateDropDownActions(){this.dropDownActions=this.tableActions.filter(e=>e.visible?e.visible(this.selection):e)}updateCurrentAction(){if(this.dropDownOnly)return void(this.currentAction=void 0);let e=this.dropDownActions.find(e=>this.showableAction(e));!e&&this.dropDownActions.length>0&&(e=this.dropDownActions[0]),this.currentAction=e}showableAction(e){const t=e.canBePrimary,n=this.selection.hasSingleSelection,i="create"===e.permission?!n:n;return t&&t(this.selection)||!t&&i}useRouterLink(e){if(e.routerLink&&!this.disableSelectionAction(e))return r.a.isString(e.routerLink)?e.routerLink:e.routerLink()}disableSelectionAction(e){const t=e.disable;if(t)return Boolean(t(this.selection));const n=e.permission,i=this.selection.hasSingleSelection&&this.selection.first();return Boolean(["update","delete"].includes(n)&&(!i||i.cdExecuting))}useClickAction(e){return!this.disableSelectionAction(e)&&e.click&&e.click()}useDisableDesc(e){if(e.disable){const t=e.disable(this.selection);return r.a.isString(t)?t:void 0}}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Gb({type:e,selectors:[["cd-table-actions"]],inputs:{permission:"permission",selection:"selection",tableActions:"tableActions",btnColor:"btnColor",dropDownOnly:"dropDownOnly"},features:[o.wb],decls:3,vars:2,consts:[[1,"btn-group"],[4,"ngIf"],["class","btn-group","ngbDropdown","","role","group","aria-label","Button group with nested dropdown",4,"ngIf"],["type","button",3,"title","ngClass","routerLink","preserveFragment","click"],[3,"ngClass"],["ngbDropdown","","role","group","aria-label","Button group with nested dropdown",1,"btn-group"],["ngbDropdownToggle",""],["class","sr-only",4,"ngIf"],["ngbDropdownMenu","",1,"dropdown-menu"],[4,"ngFor","ngForOf"],[1,"sr-only"],["ngbDropdownItem","",3,"title","routerLink","preserveFragment","disabled","click"]],template:function(e,t){1&e&&(o.Sb(0,"div",0),o.Mc(1,h,5,13,"ng-container",1),o.Mc(2,b,6,6,"div",2),o.Rb()),2&e&&(o.yb(1),o.pc("ngIf",t.currentAction),o.yb(1),o.pc("ngIf",t.dropDownActions.length>1))},directives:[a.r,a.p,c.f,l.i,l.m,l.k,a.q,l.j],styles:["button.disabled[_ngcontent-%COMP%]{cursor:default!important;pointer-events:auto}"]}),e})()},SFxW:function(e,t,n){!function(e){"use strict";var t={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-\xfcnc\xfc",4:"-\xfcnc\xfc",100:"-\xfcnc\xfc",6:"-nc\u0131",9:"-uncu",10:"-uncu",30:"-uncu",60:"-\u0131nc\u0131",90:"-\u0131nc\u0131"};e.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ert\u0259si_\xc7\u0259r\u015f\u0259nb\u0259 ax\u015fam\u0131_\xc7\u0259r\u015f\u0259nb\u0259_C\xfcm\u0259 ax\u015fam\u0131_C\xfcm\u0259_\u015e\u0259nb\u0259".split("_"),weekdaysShort:"Baz_BzE_\xc7Ax_\xc7\u0259r_CAx_C\xfcm_\u015e\u0259n".split("_"),weekdaysMin:"Bz_BE_\xc7A_\xc7\u0259_CA_C\xfc_\u015e\u0259".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bug\xfcn saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[g\u0259l\u0259n h\u0259ft\u0259] dddd [saat] LT",lastDay:"[d\xfcn\u0259n] LT",lastWeek:"[ke\xe7\u0259n h\u0259ft\u0259] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s \u0259vv\u0259l",s:"bir ne\xe7\u0259 saniy\u0259",ss:"%d saniy\u0259",m:"bir d\u0259qiq\u0259",mm:"%d d\u0259qiq\u0259",h:"bir saat",hh:"%d saat",d:"bir g\xfcn",dd:"%d g\xfcn",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gec\u0259|s\u0259h\u0259r|g\xfcnd\xfcz|ax\u015fam/,isPM:function(e){return/^(g\xfcnd\xfcz|ax\u015fam)$/.test(e)},meridiem:function(e,t,n){return e<4?"gec\u0259":e<12?"s\u0259h\u0259r":e<17?"g\xfcnd\xfcz":"ax\u015fam"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0131nc\u0131|inci|nci|\xfcnc\xfc|nc\u0131|uncu)/,ordinal:function(e){if(0===e)return e+"-\u0131nc\u0131";var n=e%10;return e+(t[n]||t[e%100-n]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n("wd/R"))},STAE:function(e,t,n){var i=n("LQDL"),r=n("0Dky");e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())||!Symbol.sham&&i&&i<41}))},SVse:function(e,t,n){"use strict";n.d(t,"a",(function(){return v})),n.d(t,"b",(function(){return Ae})),n.d(t,"c",(function(){return Ge})),n.d(t,"d",(function(){return c})),n.d(t,"e",(function(){return Fe})),n.d(t,"f",(function(){return Ve})),n.d(t,"g",(function(){return C})),n.d(t,"h",(function(){return S})),n.d(t,"i",(function(){return ze})),n.d(t,"j",(function(){return $e})),n.d(t,"k",(function(){return He})),n.d(t,"l",(function(){return d})),n.d(t,"m",(function(){return M})),n.d(t,"n",(function(){return _})),n.d(t,"o",(function(){return Ie})),n.d(t,"p",(function(){return me})),n.d(t,"q",(function(){return ge})),n.d(t,"r",(function(){return ye})),n.d(t,"s",(function(){return De})),n.d(t,"t",(function(){return Me})),n.d(t,"u",(function(){return xe})),n.d(t,"v",(function(){return ke})),n.d(t,"w",(function(){return Te})),n.d(t,"x",(function(){return w})),n.d(t,"y",(function(){return Be})),n.d(t,"z",(function(){return l})),n.d(t,"A",(function(){return je})),n.d(t,"B",(function(){return O})),n.d(t,"C",(function(){return Ne})),n.d(t,"D",(function(){return Ke})),n.d(t,"E",(function(){return Q})),n.d(t,"F",(function(){return A})),n.d(t,"G",(function(){return E})),n.d(t,"H",(function(){return I})),n.d(t,"I",(function(){return Qe})),n.d(t,"J",(function(){return a})),n.d(t,"K",(function(){return Je})),n.d(t,"L",(function(){return s})),n.d(t,"M",(function(){return pe})),n.d(t,"N",(function(){return o}));var i=n("8Y7J");let r=null;function s(){return r}function o(e){r||(r=e)}class a{}const c=new i.r("DocumentToken");let l=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:u,token:e,providedIn:"platform"}),e})();function u(){return Object(i.dc)(h)}const d=new i.r("Location Initialized");let h=(()=>{class e extends l{constructor(e){super(),this._doc=e,this._init()}_init(){this.location=s().getLocation(),this._history=s().getHistory()}getBaseHrefFromDOM(){return s().getBaseHref(this._doc)}onPopState(e){s().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",e,!1)}onHashChange(e){s().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",e,!1)}get href(){return this.location.href}get protocol(){return this.location.protocol}get hostname(){return this.location.hostname}get port(){return this.location.port}get pathname(){return this.location.pathname}get search(){return this.location.search}get hash(){return this.location.hash}set pathname(e){this.location.pathname=e}pushState(e,t,n){f()?this._history.pushState(e,t,n):this.location.hash=n}replaceState(e,t,n){f()?this._history.replaceState(e,t,n):this.location.hash=n}forward(){this._history.forward()}back(){this._history.back()}getState(){return this._history.state}}return e.\u0275fac=function(t){return new(t||e)(i.dc(c))},e.\u0275prov=Object(i.Ib)({factory:p,token:e,providedIn:"platform"}),e})();function f(){return!!window.history.pushState}function p(){return new h(Object(i.dc)(c))}function m(e,t){if(0==e.length)return t;if(0==t.length)return e;let n=0;return e.endsWith("/")&&n++,t.startsWith("/")&&n++,2==n?e+t.substring(1):1==n?e+t:e+"/"+t}function b(e){const t=e.match(/#|\?|$/),n=t&&t.index||e.length;return e.slice(0,n-("/"===e[n-1]?1:0))+e.slice(n)}function g(e){return e&&"?"!==e[0]?"?"+e:e}let _=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:y,token:e,providedIn:"root"}),e})();function y(e){const t=Object(i.dc)(c).location;return new w(Object(i.dc)(l),t&&t.origin||"")}const v=new i.r("appBaseHref");let w=(()=>{class e extends _{constructor(e,t){if(super(),this._platformLocation=e,null==t&&(t=this._platformLocation.getBaseHrefFromDOM()),null==t)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");this._baseHref=t}onPopState(e){this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e)}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return m(this._baseHref,e)}path(e=!1){const t=this._platformLocation.pathname+g(this._platformLocation.search),n=this._platformLocation.hash;return n&&e?`${t}${n}`:t}pushState(e,t,n,i){const r=this.prepareExternalUrl(n+g(i));this._platformLocation.pushState(e,t,r)}replaceState(e,t,n,i){const r=this.prepareExternalUrl(n+g(i));this._platformLocation.replaceState(e,t,r)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}}return e.\u0275fac=function(t){return new(t||e)(i.dc(l),i.dc(v,8))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})(),S=(()=>{class e extends _{constructor(e,t){super(),this._platformLocation=e,this._baseHref="",null!=t&&(this._baseHref=t)}onPopState(e){this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e)}getBaseHref(){return this._baseHref}path(e=!1){let t=this._platformLocation.hash;return null==t&&(t="#"),t.length>0?t.substring(1):t}prepareExternalUrl(e){const t=m(this._baseHref,e);return t.length>0?"#"+t:t}pushState(e,t,n,i){let r=this.prepareExternalUrl(n+g(i));0==r.length&&(r=this._platformLocation.pathname),this._platformLocation.pushState(e,t,r)}replaceState(e,t,n,i){let r=this.prepareExternalUrl(n+g(i));0==r.length&&(r=this._platformLocation.pathname),this._platformLocation.replaceState(e,t,r)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}}return e.\u0275fac=function(t){return new(t||e)(i.dc(l),i.dc(v,8))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})(),M=(()=>{class e{constructor(e,t){this._subject=new i.o,this._urlChangeListeners=[],this._platformStrategy=e;const n=this._platformStrategy.getBaseHref();this._platformLocation=t,this._baseHref=b(k(n)),this._platformStrategy.onPopState(e=>{this._subject.emit({url:this.path(!0),pop:!0,state:e.state,type:e.type})})}path(e=!1){return this.normalize(this._platformStrategy.path(e))}getState(){return this._platformLocation.getState()}isCurrentPathEqualTo(e,t=""){return this.path()==this.normalize(e+g(t))}normalize(t){return e.stripTrailingSlash(function(e,t){return e&&t.startsWith(e)?t.substring(e.length):t}(this._baseHref,k(t)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._platformStrategy.prepareExternalUrl(e)}go(e,t="",n=null){this._platformStrategy.pushState(n,"",e,t),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+g(t)),n)}replaceState(e,t="",n=null){this._platformStrategy.replaceState(n,"",e,t),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+g(t)),n)}forward(){this._platformStrategy.forward()}back(){this._platformStrategy.back()}onUrlChange(e){this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(e=>{this._notifyUrlChangeListeners(e.url,e.state)}))}_notifyUrlChangeListeners(e="",t){this._urlChangeListeners.forEach(n=>n(e,t))}subscribe(e,t,n){return this._subject.subscribe({next:e,error:t,complete:n})}}return e.\u0275fac=function(t){return new(t||e)(i.dc(_),i.dc(l))},e.normalizeQueryParams=g,e.joinWithSlash=m,e.stripTrailingSlash=b,e.\u0275prov=Object(i.Ib)({factory:x,token:e,providedIn:"root"}),e})();function x(){return new M(Object(i.dc)(_),Object(i.dc)(l))}function k(e){return e.replace(/\/index.html$/,"")}var D=function(e){return e[e.Decimal=0]="Decimal",e[e.Percent=1]="Percent",e[e.Currency=2]="Currency",e[e.Scientific=3]="Scientific",e}({}),T=function(e){return e[e.Zero=0]="Zero",e[e.One=1]="One",e[e.Two=2]="Two",e[e.Few=3]="Few",e[e.Many=4]="Many",e[e.Other=5]="Other",e}({}),C=function(e){return e[e.Format=0]="Format",e[e.Standalone=1]="Standalone",e}({}),O=function(e){return e[e.Narrow=0]="Narrow",e[e.Abbreviated=1]="Abbreviated",e[e.Wide=2]="Wide",e[e.Short=3]="Short",e}({}),L=function(e){return e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e[e.Full=3]="Full",e}({}),R=function(e){return e[e.Decimal=0]="Decimal",e[e.Group=1]="Group",e[e.List=2]="List",e[e.PercentSign=3]="PercentSign",e[e.PlusSign=4]="PlusSign",e[e.MinusSign=5]="MinusSign",e[e.Exponential=6]="Exponential",e[e.SuperscriptingExponent=7]="SuperscriptingExponent",e[e.PerMille=8]="PerMille",e[e[1/0]=9]="Infinity",e[e.NaN=10]="NaN",e[e.TimeSeparator=11]="TimeSeparator",e[e.CurrencyDecimal=12]="CurrencyDecimal",e[e.CurrencyGroup=13]="CurrencyGroup",e}({});function E(e,t,n){const r=Object(i.ib)(e),s=H([r[i.Z.DayPeriodsFormat],r[i.Z.DayPeriodsStandalone]],t);return H(s,n)}function A(e,t,n){const r=Object(i.ib)(e),s=H([r[i.Z.DaysFormat],r[i.Z.DaysStandalone]],t);return H(s,n)}function I(e,t,n){const r=Object(i.ib)(e),s=H([r[i.Z.MonthsFormat],r[i.Z.MonthsStandalone]],t);return H(s,n)}function P(e,t){return H(Object(i.ib)(e)[i.Z.DateFormat],t)}function j(e,t){return H(Object(i.ib)(e)[i.Z.TimeFormat],t)}function N(e,t){return H(Object(i.ib)(e)[i.Z.DateTimeFormat],t)}function F(e,t){const n=Object(i.ib)(e),r=n[i.Z.NumberSymbols][t];if(void 0===r){if(t===R.CurrencyDecimal)return n[i.Z.NumberSymbols][R.Decimal];if(t===R.CurrencyGroup)return n[i.Z.NumberSymbols][R.Group]}return r}function Y(e,t){return Object(i.ib)(e)[i.Z.NumberFormats][t]}const z=i.lb;function $(e){if(!e[i.Z.ExtraData])throw new Error(`Missing extra locale data for the locale "${e[i.Z.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function H(e,t){for(let n=t;n>-1;n--)if(void 0!==e[n])return e[n];throw new Error("Locale data API: locale data undefined")}function W(e){const[t,n]=e.split(":");return{hours:+t,minutes:+n}}const V=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,B={},U=/((?:[^GyMLwWdEabBhHmsSzZO']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var q=function(e){return e[e.Short=0]="Short",e[e.ShortGMT=1]="ShortGMT",e[e.Long=2]="Long",e[e.Extended=3]="Extended",e}({}),G=function(e){return e[e.FullYear=0]="FullYear",e[e.Month=1]="Month",e[e.Date=2]="Date",e[e.Hours=3]="Hours",e[e.Minutes=4]="Minutes",e[e.Seconds=5]="Seconds",e[e.FractionalSeconds=6]="FractionalSeconds",e[e.Day=7]="Day",e}({}),J=function(e){return e[e.DayPeriods=0]="DayPeriods",e[e.Days=1]="Days",e[e.Months=2]="Months",e[e.Eras=3]="Eras",e}({});function Q(e,t,n,r){let s=function(e){if(se(e))return e;if("number"==typeof e&&!isNaN(e))return new Date(e);if("string"==typeof e){e=e.trim();const t=parseFloat(e);if(!isNaN(e-t))return new Date(t);if(/^(\d{4}-\d{1,2}-\d{1,2})$/.test(e)){const[t,n,i]=e.split("-").map(e=>+e);return new Date(t,n-1,i)}let n;if(n=e.match(V))return function(e){const t=new Date(0);let n=0,i=0;const r=e[8]?t.setUTCFullYear:t.setFullYear,s=e[8]?t.setUTCHours:t.setHours;e[9]&&(n=Number(e[9]+e[10]),i=Number(e[9]+e[11])),r.call(t,Number(e[1]),Number(e[2])-1,Number(e[3]));const o=Number(e[4]||0)-n,a=Number(e[5]||0)-i,c=Number(e[6]||0),l=Math.round(1e3*parseFloat("0."+(e[7]||0)));return s.call(t,o,a,c,l),t}(n)}const t=new Date(e);if(!se(t))throw new Error(`Unable to convert "${e}" into a date`);return t}(e);t=function e(t,n){const r=function(e){return Object(i.ib)(e)[i.Z.LocaleId]}(t);if(B[r]=B[r]||{},B[r][n])return B[r][n];let s="";switch(n){case"shortDate":s=P(t,L.Short);break;case"mediumDate":s=P(t,L.Medium);break;case"longDate":s=P(t,L.Long);break;case"fullDate":s=P(t,L.Full);break;case"shortTime":s=j(t,L.Short);break;case"mediumTime":s=j(t,L.Medium);break;case"longTime":s=j(t,L.Long);break;case"fullTime":s=j(t,L.Full);break;case"short":const n=e(t,"shortTime"),i=e(t,"shortDate");s=K(N(t,L.Short),[n,i]);break;case"medium":const r=e(t,"mediumTime"),o=e(t,"mediumDate");s=K(N(t,L.Medium),[r,o]);break;case"long":const a=e(t,"longTime"),c=e(t,"longDate");s=K(N(t,L.Long),[a,c]);break;case"full":const l=e(t,"fullTime"),u=e(t,"fullDate");s=K(N(t,L.Full),[l,u])}return s&&(B[r][n]=s),s}(n,t)||t;let o,a=[];for(;t;){if(o=U.exec(t),!o){a.push(t);break}{a=a.concat(o.slice(1));const e=a.pop();if(!e)break;t=e}}let c=s.getTimezoneOffset();r&&(c=re(r,c),s=function(e,t,n){const i=e.getTimezoneOffset();return function(e,t){return(e=new Date(e.getTime())).setMinutes(e.getMinutes()+t),e}(e,-1*(re(t,i)-i))}(s,r));let l="";return a.forEach(e=>{const t=function(e){if(ie[e])return ie[e];let t;switch(e){case"G":case"GG":case"GGG":t=ee(J.Eras,O.Abbreviated);break;case"GGGG":t=ee(J.Eras,O.Wide);break;case"GGGGG":t=ee(J.Eras,O.Narrow);break;case"y":t=X(G.FullYear,1,0,!1,!0);break;case"yy":t=X(G.FullYear,2,0,!0,!0);break;case"yyy":t=X(G.FullYear,3,0,!1,!0);break;case"yyyy":t=X(G.FullYear,4,0,!1,!0);break;case"M":case"L":t=X(G.Month,1,1);break;case"MM":case"LL":t=X(G.Month,2,1);break;case"MMM":t=ee(J.Months,O.Abbreviated);break;case"MMMM":t=ee(J.Months,O.Wide);break;case"MMMMM":t=ee(J.Months,O.Narrow);break;case"LLL":t=ee(J.Months,O.Abbreviated,C.Standalone);break;case"LLLL":t=ee(J.Months,O.Wide,C.Standalone);break;case"LLLLL":t=ee(J.Months,O.Narrow,C.Standalone);break;case"w":t=ne(1);break;case"ww":t=ne(2);break;case"W":t=ne(1,!0);break;case"d":t=X(G.Date,1);break;case"dd":t=X(G.Date,2);break;case"E":case"EE":case"EEE":t=ee(J.Days,O.Abbreviated);break;case"EEEE":t=ee(J.Days,O.Wide);break;case"EEEEE":t=ee(J.Days,O.Narrow);break;case"EEEEEE":t=ee(J.Days,O.Short);break;case"a":case"aa":case"aaa":t=ee(J.DayPeriods,O.Abbreviated);break;case"aaaa":t=ee(J.DayPeriods,O.Wide);break;case"aaaaa":t=ee(J.DayPeriods,O.Narrow);break;case"b":case"bb":case"bbb":t=ee(J.DayPeriods,O.Abbreviated,C.Standalone,!0);break;case"bbbb":t=ee(J.DayPeriods,O.Wide,C.Standalone,!0);break;case"bbbbb":t=ee(J.DayPeriods,O.Narrow,C.Standalone,!0);break;case"B":case"BB":case"BBB":t=ee(J.DayPeriods,O.Abbreviated,C.Format,!0);break;case"BBBB":t=ee(J.DayPeriods,O.Wide,C.Format,!0);break;case"BBBBB":t=ee(J.DayPeriods,O.Narrow,C.Format,!0);break;case"h":t=X(G.Hours,1,-12);break;case"hh":t=X(G.Hours,2,-12);break;case"H":t=X(G.Hours,1);break;case"HH":t=X(G.Hours,2);break;case"m":t=X(G.Minutes,1);break;case"mm":t=X(G.Minutes,2);break;case"s":t=X(G.Seconds,1);break;case"ss":t=X(G.Seconds,2);break;case"S":t=X(G.FractionalSeconds,1);break;case"SS":t=X(G.FractionalSeconds,2);break;case"SSS":t=X(G.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":t=te(q.Short);break;case"ZZZZZ":t=te(q.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":t=te(q.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":t=te(q.Long);break;default:return null}return ie[e]=t,t}(e);l+=t?t(s,n,c):"''"===e?"'":e.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}function K(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,(function(e,n){return null!=t&&n in t?t[n]:e}))),e}function Z(e,t,n="-",i,r){let s="";(e<0||r&&e<=0)&&(r?e=1-e:(e=-e,s=n));let o=String(e);for(;o.length<t;)o="0"+o;return i&&(o=o.substr(o.length-t)),s+o}function X(e,t,n=0,i=!1,r=!1){return function(s,o){let a=function(e,t){switch(e){case G.FullYear:return t.getFullYear();case G.Month:return t.getMonth();case G.Date:return t.getDate();case G.Hours:return t.getHours();case G.Minutes:return t.getMinutes();case G.Seconds:return t.getSeconds();case G.FractionalSeconds:return t.getMilliseconds();case G.Day:return t.getDay();default:throw new Error(`Unknown DateType value "${e}".`)}}(e,s);if((n>0||a>-n)&&(a+=n),e===G.Hours)0===a&&-12===n&&(a=12);else if(e===G.FractionalSeconds)return c=t,Z(a,3).substr(0,c);var c;const l=F(o,R.MinusSign);return Z(a,t,l,i,r)}}function ee(e,t,n=C.Format,r=!1){return function(s,o){return function(e,t,n,r,s,o){switch(n){case J.Months:return I(t,s,r)[e.getMonth()];case J.Days:return A(t,s,r)[e.getDay()];case J.DayPeriods:const a=e.getHours(),c=e.getMinutes();if(o){const e=function(e){const t=Object(i.ib)(e);return $(t),(t[i.Z.ExtraData][2]||[]).map(e=>"string"==typeof e?W(e):[W(e[0]),W(e[1])])}(t),n=function(e,t,n){const r=Object(i.ib)(e);$(r);const s=H([r[i.Z.ExtraData][0],r[i.Z.ExtraData][1]],t)||[];return H(s,n)||[]}(t,s,r),o=e.findIndex(e=>{if(Array.isArray(e)){const[t,n]=e,i=a>=t.hours&&c>=t.minutes,r=a<n.hours||a===n.hours&&c<n.minutes;if(t.hours<n.hours){if(i&&r)return!0}else if(i||r)return!0}else if(e.hours===a&&e.minutes===c)return!0;return!1});if(-1!==o)return n[o]}return E(t,s,r)[a<12?0:1];case J.Eras:return function(e,t){return H(Object(i.ib)(e)[i.Z.Eras],t)}(t,r)[e.getFullYear()<=0?0:1];default:throw new Error("unexpected translation type "+n)}}(s,o,e,t,n,r)}}function te(e){return function(t,n,i){const r=-1*i,s=F(n,R.MinusSign),o=r>0?Math.floor(r/60):Math.ceil(r/60);switch(e){case q.Short:return(r>=0?"+":"")+Z(o,2,s)+Z(Math.abs(r%60),2,s);case q.ShortGMT:return"GMT"+(r>=0?"+":"")+Z(o,1,s);case q.Long:return"GMT"+(r>=0?"+":"")+Z(o,2,s)+":"+Z(Math.abs(r%60),2,s);case q.Extended:return 0===i?"Z":(r>=0?"+":"")+Z(o,2,s)+":"+Z(Math.abs(r%60),2,s);default:throw new Error(`Unknown zone width "${e}"`)}}}function ne(e,t=!1){return function(n,i){let r;if(t){const e=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,t=n.getDate();r=1+Math.floor((t+e)/7)}else{const e=(s=n,new Date(s.getFullYear(),s.getMonth(),s.getDate()+(4-s.getDay()))),t=function(e){const t=new Date(e,0,1).getDay();return new Date(e,0,1+(t<=4?4:11)-t)}(e.getFullYear()),i=e.getTime()-t.getTime();r=1+Math.round(i/6048e5)}var s;return Z(r,e,F(i,R.MinusSign))}}const ie={};function re(e,t){e=e.replace(/:/g,"");const n=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(n)?t:n}function se(e){return e instanceof Date&&!isNaN(e.valueOf())}const oe=/^(\d+)?\.((\d+)(-(\d+))?)?$/,ae=".",ce="0";function le(e,t,n,i,r,s,o=!1){let a="",c=!1;if(isFinite(e)){let l=function(e){let t,n,i,r,s,o=Math.abs(e)+"",a=0;for((n=o.indexOf(ae))>-1&&(o=o.replace(ae,"")),(i=o.search(/e/i))>0?(n<0&&(n=i),n+=+o.slice(i+1),o=o.substring(0,i)):n<0&&(n=o.length),i=0;o.charAt(i)===ce;i++);if(i===(s=o.length))t=[0],n=1;else{for(s--;o.charAt(s)===ce;)s--;for(n-=i,t=[],r=0;i<=s;i++,r++)t[r]=Number(o.charAt(i))}return n>22&&(t=t.splice(0,21),a=n-1,n=1),{digits:t,exponent:a,integerLen:n}}(e);o&&(l=function(e){if(0===e.digits[0])return e;const t=e.digits.length-e.integerLen;return e.exponent?e.exponent+=2:(0===t?e.digits.push(0,0):1===t&&e.digits.push(0),e.integerLen+=2),e}(l));let u=t.minInt,d=t.minFrac,h=t.maxFrac;if(s){const e=s.match(oe);if(null===e)throw new Error(s+" is not a valid digit info");const t=e[1],n=e[3],i=e[5];null!=t&&(u=de(t)),null!=n&&(d=de(n)),null!=i?h=de(i):null!=n&&d>h&&(h=d)}!function(e,t,n){if(t>n)throw new Error(`The minimum number of digits after fraction (${t}) is higher than the maximum (${n}).`);let i=e.digits,r=i.length-e.integerLen;const s=Math.min(Math.max(t,r),n);let o=s+e.integerLen,a=i[o];if(o>0){i.splice(Math.max(e.integerLen,o));for(let e=o;e<i.length;e++)i[e]=0}else{r=Math.max(0,r),e.integerLen=1,i.length=Math.max(1,o=s+1),i[0]=0;for(let e=1;e<o;e++)i[e]=0}if(a>=5)if(o-1<0){for(let t=0;t>o;t--)i.unshift(0),e.integerLen++;i.unshift(1),e.integerLen++}else i[o-1]++;for(;r<Math.max(0,s);r++)i.push(0);let c=0!==s;const l=t+e.integerLen,u=i.reduceRight((function(e,t,n,i){return i[n]=(t+=e)<10?t:t-10,c&&(0===i[n]&&n>=l?i.pop():c=!1),t>=10?1:0}),0);u&&(i.unshift(u),e.integerLen++)}(l,d,h);let f=l.digits,p=l.integerLen;const m=l.exponent;let b=[];for(c=f.every(e=>!e);p<u;p++)f.unshift(0);for(;p<0;p++)f.unshift(0);p>0?b=f.splice(p,f.length):(b=f,f=[0]);const g=[];for(f.length>=t.lgSize&&g.unshift(f.splice(-t.lgSize,f.length).join(""));f.length>t.gSize;)g.unshift(f.splice(-t.gSize,f.length).join(""));f.length&&g.unshift(f.join("")),a=g.join(F(n,i)),b.length&&(a+=F(n,r)+b.join("")),m&&(a+=F(n,R.Exponential)+"+"+m)}else a=F(n,R.Infinity);return a=e<0&&!c?t.negPre+a+t.negSuf:t.posPre+a+t.posSuf,a}function ue(e,t="-"){const n={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},i=e.split(";"),r=i[0],s=i[1],o=-1!==r.indexOf(ae)?r.split(ae):[r.substring(0,r.lastIndexOf(ce)+1),r.substring(r.lastIndexOf(ce)+1)],a=o[0],c=o[1]||"";n.posPre=a.substr(0,a.indexOf("#"));for(let u=0;u<c.length;u++){const e=c.charAt(u);e===ce?n.minFrac=n.maxFrac=u+1:"#"===e?n.maxFrac=u+1:n.posSuf+=e}const l=a.split(",");if(n.gSize=l[1]?l[1].length:0,n.lgSize=l[2]||l[1]?(l[2]||l[1]).length:0,s){const e=r.length-n.posPre.length-n.posSuf.length,t=s.indexOf("#");n.negPre=s.substr(0,t).replace(/'/g,""),n.negSuf=s.substr(t+e).replace(/'/g,"")}else n.negPre=t+n.posPre,n.negSuf=n.posSuf;return n}function de(e){const t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t}class he{}let fe=(()=>{class e extends he{constructor(e){super(),this.locale=e}getPluralCategory(e,t){switch(z(t||this.locale)(e)){case T.Zero:return"zero";case T.One:return"one";case T.Two:return"two";case T.Few:return"few";case T.Many:return"many";default:return"other"}}}return e.\u0275fac=function(t){return new(t||e)(i.dc(i.v))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})();function pe(e,t){t=encodeURIComponent(t);for(const n of e.split(";")){const e=n.indexOf("="),[i,r]=-1==e?[n,""]:[n.slice(0,e),n.slice(e+1)];if(i.trim()===t)return decodeURIComponent(r)}return null}let me=(()=>{class e{constructor(e,t,n,i){this._iterableDiffers=e,this._keyValueDiffers=t,this._ngEl=n,this._renderer=i,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}set klass(e){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof e?e.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}set ngClass(e){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof e?e.split(/\s+/):e,this._rawClass&&(Object(i.ob)(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}ngDoCheck(){if(this._iterableDiffer){const e=this._iterableDiffer.diff(this._rawClass);e&&this._applyIterableChanges(e)}else if(this._keyValueDiffer){const e=this._keyValueDiffer.diff(this._rawClass);e&&this._applyKeyValueChanges(e)}}_applyKeyValueChanges(e){e.forEachAddedItem(e=>this._toggleClass(e.key,e.currentValue)),e.forEachChangedItem(e=>this._toggleClass(e.key,e.currentValue)),e.forEachRemovedItem(e=>{e.previousValue&&this._toggleClass(e.key,!1)})}_applyIterableChanges(e){e.forEachAddedItem(e=>{if("string"!=typeof e.item)throw new Error("NgClass can only toggle CSS classes expressed as strings, got "+Object(i.tb)(e.item));this._toggleClass(e.item,!0)}),e.forEachRemovedItem(e=>this._toggleClass(e.item,!1))}_applyClasses(e){e&&(Array.isArray(e)||e instanceof Set?e.forEach(e=>this._toggleClass(e,!0)):Object.keys(e).forEach(t=>this._toggleClass(t,!!e[t])))}_removeClasses(e){e&&(Array.isArray(e)||e instanceof Set?e.forEach(e=>this._toggleClass(e,!1)):Object.keys(e).forEach(e=>this._toggleClass(e,!1)))}_toggleClass(e,t){(e=e.trim())&&e.split(/\s+/g).forEach(e=>{t?this._renderer.addClass(this._ngEl.nativeElement,e):this._renderer.removeClass(this._ngEl.nativeElement,e)})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.t),i.Mb(i.u),i.Mb(i.m),i.Mb(i.E))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),e})();class be{constructor(e,t,n,i){this.$implicit=e,this.ngForOf=t,this.index=n,this.count=i}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let ge=(()=>{class e{constructor(e,t,n){this._viewContainer=e,this._template=t,this._differs=n,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){Object(i.U)()&&null!=e&&"function"!=typeof e&&console&&console.warn&&console.warn(`trackBy must be a function, but received ${JSON.stringify(e)}. See https://angular.io/api/common/NgForOf#change-propagation for more information.`),this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const n=this._ngForOf;if(!this._differ&&n)try{this._differ=this._differs.find(n).create(this.ngForTrackBy)}catch(t){throw new Error(`Cannot find a differ supporting object '${n}' of type '${e=n,e.name||typeof e}'. NgFor only supports binding to Iterables such as Arrays.`)}}var e;if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const t=[];e.forEachOperation((e,n,i)=>{if(null==e.previousIndex){const n=this._viewContainer.createEmbeddedView(this._template,new be(null,this._ngForOf,-1,-1),null===i?void 0:i),r=new _e(e,n);t.push(r)}else if(null==i)this._viewContainer.remove(null===n?void 0:n);else if(null!==n){const r=this._viewContainer.get(n);this._viewContainer.move(r,i);const s=new _e(e,r);t.push(s)}});for(let n=0;n<t.length;n++)this._perViewChange(t[n].view,t[n].record);for(let n=0,i=this._viewContainer.length;n<i;n++){const e=this._viewContainer.get(n);e.context.index=n,e.context.count=i,e.context.ngForOf=this._ngForOf}e.forEachIdentityChange(e=>{this._viewContainer.get(e.currentIndex).context.$implicit=e.item})}_perViewChange(e,t){e.context.$implicit=t.item}static ngTemplateContextGuard(e,t){return!0}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.P),i.Mb(i.L),i.Mb(i.t))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),e})();class _e{constructor(e,t){this.record=e,this.view=t}}let ye=(()=>{class e{constructor(e,t){this._viewContainer=e,this._context=new ve,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=t}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){we("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){we("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,t){return!0}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.P),i.Mb(i.L))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),e})();class ve{constructor(){this.$implicit=null,this.ngIf=null}}function we(e,t){if(t&&!t.createEmbeddedView)throw new Error(`${e} must be a TemplateRef, but received '${Object(i.tb)(t)}'.`)}class Se{constructor(e,t){this._viewContainerRef=e,this._templateRef=t,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(e){e&&!this._created?this.create():!e&&this._created&&this.destroy()}}let Me=(()=>{class e{constructor(){this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews||(this._defaultViews=[]),this._defaultViews.push(e)}_matchCase(e){const t=e==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||t,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),t}_updateDefaultCases(e){if(this._defaultViews&&e!==this._defaultUsed){this._defaultUsed=e;for(let t=0;t<this._defaultViews.length;t++)this._defaultViews[t].enforceState(e)}}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=i.Hb({type:e,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"}}),e})(),xe=(()=>{class e{constructor(e,t,n){this.ngSwitch=n,n._addCase(),this._view=new Se(e,t)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.P),i.Mb(i.L),i.Mb(Me,1))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"}}),e})(),ke=(()=>{class e{constructor(e,t,n){n._addDefault(new Se(e,t))}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.P),i.Mb(i.L),i.Mb(Me,1))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngSwitchDefault",""]]}),e})(),De=(()=>{class e{constructor(e,t,n){this._ngEl=e,this._differs=t,this._renderer=n,this._ngStyle=null,this._differ=null}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){const e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,t){const[n,i]=e.split(".");null!=(t=null!=t&&i?`${t}${i}`:t)?this._renderer.setStyle(this._ngEl.nativeElement,n,t):this._renderer.removeStyle(this._ngEl.nativeElement,n)}_applyChanges(e){e.forEachRemovedItem(e=>this._setStyle(e.key,null)),e.forEachAddedItem(e=>this._setStyle(e.key,e.currentValue)),e.forEachChangedItem(e=>this._setStyle(e.key,e.currentValue))}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(i.u),i.Mb(i.E))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}}),e})(),Te=(()=>{class e{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null}ngOnChanges(e){if(this._shouldRecreateView(e)){const e=this._viewContainerRef;this._viewRef&&e.remove(e.indexOf(this._viewRef)),this._viewRef=this.ngTemplateOutlet?e.createEmbeddedView(this.ngTemplateOutlet,this.ngTemplateOutletContext):null}else this._viewRef&&this.ngTemplateOutletContext&&this._updateExistingContext(this.ngTemplateOutletContext)}_shouldRecreateView(e){const t=e.ngTemplateOutletContext;return!!e.ngTemplateOutlet||t&&this._hasContextShapeChanged(t)}_hasContextShapeChanged(e){const t=Object.keys(e.previousValue||{}),n=Object.keys(e.currentValue||{});if(t.length===n.length){for(let e of n)if(-1===t.indexOf(e))return!0;return!1}return!0}_updateExistingContext(e){for(let t of Object.keys(e))this._viewRef.context[t]=this.ngTemplateOutletContext[t]}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.P))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet"},features:[i.wb]}),e})();function Ce(e,t){return Error(`InvalidPipeArgument: '${t}' for pipe '${Object(i.tb)(e)}'`)}class Oe{createSubscription(e,t){return e.subscribe({next:t,error:e=>{throw e}})}dispose(e){e.unsubscribe()}onDestroy(e){e.unsubscribe()}}class Le{createSubscription(e,t){return e.then(t,e=>{throw e})}dispose(e){}onDestroy(e){}}const Re=new Le,Ee=new Oe;let Ae=(()=>{class e{constructor(e){this._ref=e,this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null}ngOnDestroy(){this._subscription&&this._dispose()}transform(e){return this._obj?e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue:(e&&this._subscribe(e),this._latestValue)}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,t=>this._updateLatestValue(e,t))}_selectStrategy(t){if(Object(i.qb)(t))return Re;if(Object(i.pb)(t))return Ee;throw Ce(e,t)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,t){e===this._obj&&(this._latestValue=t,this._ref.markForCheck())}}return e.\u0275fac=function(t){return new(t||e)(i.fc())},e.\u0275pipe=i.Lb({name:"async",type:e,pure:!1}),e})(),Ie=(()=>{class e{transform(t){if(!t)return t;if("string"!=typeof t)throw Ce(e,t);return t.toLowerCase()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"lowercase",type:e,pure:!0}),e})();const Pe=/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\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\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\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\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\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-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\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\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\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-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\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\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\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]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D])\S*/g;let je=(()=>{class e{transform(t){if(!t)return t;if("string"!=typeof t)throw Ce(e,t);return t.replace(Pe,e=>e[0].toUpperCase()+e.substr(1).toLowerCase())}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"titlecase",type:e,pure:!0}),e})(),Ne=(()=>{class e{transform(t){if(!t)return t;if("string"!=typeof t)throw Ce(e,t);return t.toUpperCase()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"uppercase",type:e,pure:!0}),e})(),Fe=(()=>{class e{constructor(e){this.locale=e}transform(t,n="mediumDate",i,r){if(null==t||""===t||t!=t)return null;try{return Q(t,n,r||this.locale,i)}catch(s){throw Ce(e,s.message)}}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.v))},e.\u0275pipe=i.Lb({name:"date",type:e,pure:!0}),e})();const Ye=/#/g;let ze=(()=>{class e{constructor(e){this._localization=e}transform(t,n,i){if(null==t)return"";if("object"!=typeof n||null===n)throw Ce(e,n);return n[function(e,t,n,i){let r="="+e;if(t.indexOf(r)>-1)return r;if(r=n.getPluralCategory(e,i),t.indexOf(r)>-1)return r;if(t.indexOf("other")>-1)return"other";throw new Error(`No plural message found for value "${e}"`)}(t,Object.keys(n),this._localization,i)].replace(Ye,t.toString())}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(he))},e.\u0275pipe=i.Lb({name:"i18nPlural",type:e,pure:!0}),e})(),$e=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"json",type:e,pure:!1}),e})(),He=(()=>{class e{constructor(e){this.differs=e,this.keyValues=[]}transform(e,t=We){if(!e||!(e instanceof Map)&&"object"!=typeof e)return null;this.differ||(this.differ=this.differs.find(e).create());const n=this.differ.diff(e);return n&&(this.keyValues=[],n.forEachItem(e=>{this.keyValues.push({key:e.key,value:e.currentValue})}),this.keyValues.sort(t)),this.keyValues}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.u))},e.\u0275pipe=i.Lb({name:"keyvalue",type:e,pure:!1}),e})();function We(e,t){const n=e.key,i=t.key;if(n===i)return 0;if(void 0===n)return 1;if(void 0===i)return-1;if(null===n)return 1;if(null===i)return-1;if("string"==typeof n&&"string"==typeof i)return n<i?-1:1;if("number"==typeof n&&"number"==typeof i)return n-i;if("boolean"==typeof n&&"boolean"==typeof i)return n<i?-1:1;const r=String(n),s=String(i);return r==s?0:r<s?-1:1}let Ve=(()=>{class e{constructor(e){this._locale=e}transform(t,n,i){if(Ue(t))return null;i=i||this._locale;try{return function(e,t,n){return le(e,ue(Y(t,D.Decimal),F(t,R.MinusSign)),t,R.Group,R.Decimal,n)}(qe(t),i,n)}catch(r){throw Ce(e,r.message)}}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.v))},e.\u0275pipe=i.Lb({name:"number",type:e,pure:!0}),e})(),Be=(()=>{class e{constructor(e){this._locale=e}transform(t,n,i){if(Ue(t))return null;i=i||this._locale;try{return function(e,t,n){return le(e,ue(Y(t,D.Percent),F(t,R.MinusSign)),t,R.Group,R.Decimal,n,!0).replace(new RegExp("%","g"),F(t,R.PercentSign))}(qe(t),i,n)}catch(r){throw Ce(e,r.message)}}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.v))},e.\u0275pipe=i.Lb({name:"percent",type:e,pure:!0}),e})();function Ue(e){return null==e||""===e||e!=e}function qe(e){if("string"==typeof e&&!isNaN(Number(e)-parseFloat(e)))return Number(e);if("number"!=typeof e)throw new Error(e+" is not a number");return e}let Ge=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},providers:[{provide:he,useClass:fe}]}),e})();const Je="browser";function Qe(e){return e===Je}let Ke=(()=>{class e{}return e.\u0275prov=Object(i.Ib)({token:e,providedIn:"root",factory:()=>new Ze(Object(i.dc)(c),window,Object(i.dc)(i.n))}),e})();class Ze{constructor(e,t,n){this.document=e,this.window=t,this.errorHandler=n,this.offset=()=>[0,0]}setOffset(e){this.offset=Array.isArray(e)?()=>e:e}getScrollPosition(){return this.supportsScrolling()?[this.window.scrollX,this.window.scrollY]:[0,0]}scrollToPosition(e){this.supportsScrolling()&&this.window.scrollTo(e[0],e[1])}scrollToAnchor(e){if(this.supportsScrolling()){const t=this.document.getElementById(e)||this.document.getElementsByName(e)[0];t&&this.scrollToElement(t)}}setHistoryScrollRestoration(e){if(this.supportScrollRestoration()){const t=this.window.history;t&&t.scrollRestoration&&(t.scrollRestoration=e)}}scrollToElement(e){const t=e.getBoundingClientRect(),n=t.left+this.window.pageXOffset,i=t.top+this.window.pageYOffset,r=this.offset();this.window.scrollTo(n-r[0],i-r[1])}supportScrollRestoration(){try{if(!this.window||!this.window.scrollTo)return!1;const e=Xe(this.window.history)||Xe(Object.getPrototypeOf(this.window.history));return!(!e||!e.writable&&!e.set)}catch(e){return!1}}supportsScrolling(){try{return!!this.window.scrollTo}catch(e){return!1}}}function Xe(e){return Object.getOwnPropertyDescriptor(e,"scrollRestoration")}},SatO:function(e,t,n){!function(e){"use strict";e.defineLocale("zh-hk",{months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u9031\u65e5_\u9031\u4e00_\u9031\u4e8c_\u9031\u4e09_\u9031\u56db_\u9031\u4e94_\u9031\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5 HH:mm",LLLL:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm",l:"YYYY/M/D",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u51cc\u6668"===t||"\u65e9\u4e0a"===t||"\u4e0a\u5348"===t?e:"\u4e2d\u5348"===t?e>=11?e:e+12:"\u4e0b\u5348"===t||"\u665a\u4e0a"===t?e+12:void 0},meridiem:function(e,t,n){var i=100*e+t;return i<600?"\u51cc\u6668":i<900?"\u65e9\u4e0a":i<1200?"\u4e0a\u5348":1200===i?"\u4e2d\u5348":i<1800?"\u4e0b\u5348":"\u665a\u4e0a"},calendar:{sameDay:"[\u4eca\u5929]LT",nextDay:"[\u660e\u5929]LT",nextWeek:"[\u4e0b]ddddLT",lastDay:"[\u6628\u5929]LT",lastWeek:"[\u4e0a]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u9031)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"\u65e5";case"M":return e+"\u6708";case"w":case"W":return e+"\u9031";default:return e}},relativeTime:{future:"%s\u5f8c",past:"%s\u524d",s:"\u5e7e\u79d2",ss:"%d \u79d2",m:"1 \u5206\u9418",mm:"%d \u5206\u9418",h:"1 \u5c0f\u6642",hh:"%d \u5c0f\u6642",d:"1 \u5929",dd:"%d \u5929",M:"1 \u500b\u6708",MM:"%d \u500b\u6708",y:"1 \u5e74",yy:"%d \u5e74"}})}(n("wd/R"))},SeVD:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var i=n("ngJS"),r=n("NJ4a"),s=n("Lhse"),o=n("kJWO"),a=n("I55L"),c=n("c2HN"),l=n("XoHu");const u=e=>{if(e&&"function"==typeof e[o.a])return u=e,e=>{const t=u[o.a]();if("function"!=typeof t.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(e)};if(Object(a.a)(e))return Object(i.a)(e);if(Object(c.a)(e))return n=e,e=>(n.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,r.a),e);if(e&&"function"==typeof e[s.a])return t=e,e=>{const n=t[s.a]();for(;;){let t;try{t=n.next()}catch(i){return e.error(i),e}if(t.done){e.complete();break}if(e.next(t.value),e.closed)break}return"function"==typeof n.return&&e.add(()=>{n.return&&n.return()}),e};{const t=Object(l.a)(e)?"an invalid object":`'${e}'`;throw new TypeError(`You provided ${t} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`)}var t,n,u}},SpAZ:function(e,t,n){"use strict";function i(e){return e}n.d(t,"a",(function(){return i}))},SxV6:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i=n("sVev"),r=n("pLZG"),s=n("IzEk"),o=n("xbPD"),a=n("XDbj"),c=n("SpAZ");function l(e,t){const n=arguments.length>=2;return l=>l.pipe(e?Object(r.a)((t,n)=>e(t,n,l)):c.a,Object(s.a)(1),n?Object(o.a)(t):Object(a.a)(()=>new i.a))}},TFwu:function(e,t,n){"use strict";var i=n("25cm"),r=n("jN84"),s=n("mkut");t.a=function(e){return Object(i.a)(e,s.a,r.a)}},TJUb:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("LvDl"),r=n.n(i),s=n("8Y7J");let o=(()=>{class e{transform(e,t){return r.a.isPlainObject(t)?r.a.get(t,e,e):e}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=s.Lb({name:"map",type:e,pure:!0}),e})()},TKcr:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));class i{propertyValue(e){return getComputedStyle(document.body).getPropertyValue("--"+e)}}},TWQb:function(e,t,n){var i=n("/GqU"),r=n("UMSQ"),s=n("I8vh"),o=function(e){return function(t,n,o){var a,c=i(t),l=r(c.length),u=s(o,l);if(e&&n!=n){for(;l>u;)if((a=c[u++])!=a)return!0}else for(;l>u;u++)if((e||u in c)&&c[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},TYzs:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("8Y7J");let r=(()=>{class e{transform(e){const t=parseInt(e,10);return isNaN(t)?e:e+(1===Math.floor(t/10)?"th":t%10==1?"st":t%10==2?"nd":t%10==3?"rd":"th")}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"ordinal",type:e,pure:!0}),e})()},TeQF:function(e,t,n){"use strict";var i=n("I+eb"),r=n("tycR").filter;i({target:"Array",proto:!0,forced:!n("Hd5f")("filter")},{filter:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},TnHx:function(e,t,n){"use strict";var i=n("25cm"),r=n("n561"),s=n("4/q3");t.a=function(e){return Object(i.a)(e,s.a,r.a)}},U6JX:function(e,t,n){"use strict";t.a=function(e,t){return function(n){return e(t(n))}}},UDhR:function(e,t,n){!function(e){"use strict";e.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"siang"===t?e>=11?e:e+12:"sore"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"siang":e<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",ss:"%d detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:0,doy:6}})}(n("wd/R"))},UMSQ:function(e,t,n){var i=n("ppGB"),r=Math.min;e.exports=function(e){return e>0?r(i(e),9007199254740991):0}},USCx:function(e,t,n){!function(e){"use strict";e.defineLocale("ga",{months:["Ean\xe1ir","Feabhra","M\xe1rta","Aibre\xe1n","Bealtaine","Meitheamh","I\xfail","L\xfanasa","Me\xe1n F\xf3mhair","Deireadh F\xf3mhair","Samhain","Nollaig"],monthsShort:["Ean","Feabh","M\xe1rt","Aib","Beal","Meith","I\xfail","L\xfan","M.F.","D.F.","Samh","Noll"],monthsParseExact:!0,weekdays:["D\xe9 Domhnaigh","D\xe9 Luain","D\xe9 M\xe1irt","D\xe9 C\xe9adaoin","D\xe9ardaoin","D\xe9 hAoine","D\xe9 Sathairn"],weekdaysShort:["Domh","Luan","M\xe1irt","C\xe9ad","D\xe9ar","Aoine","Sath"],weekdaysMin:["Do","Lu","M\xe1","C\xe9","D\xe9","A","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Inniu ag] LT",nextDay:"[Am\xe1rach ag] LT",nextWeek:"dddd [ag] LT",lastDay:"[Inn\xe9 ag] LT",lastWeek:"dddd [seo caite] [ag] LT",sameElse:"L"},relativeTime:{future:"i %s",past:"%s \xf3 shin",s:"c\xfapla soicind",ss:"%d soicind",m:"n\xf3im\xe9ad",mm:"%d n\xf3im\xe9ad",h:"uair an chloig",hh:"%d uair an chloig",d:"l\xe1",dd:"%d l\xe1",M:"m\xed",MM:"%d m\xedonna",y:"bliain",yy:"%d bliain"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})}(n("wd/R"))},UTVS:function(e,t,n){var i=n("ewvW"),r={}.hasOwnProperty;e.exports=function(e,t){return r.call(i(e),t)}},UpQW:function(e,t,n){!function(e){"use strict";var t=["\u062c\u0646\u0648\u0631\u06cc","\u0641\u0631\u0648\u0631\u06cc","\u0645\u0627\u0631\u0686","\u0627\u067e\u0631\u06cc\u0644","\u0645\u0626\u06cc","\u062c\u0648\u0646","\u062c\u0648\u0644\u0627\u0626\u06cc","\u0627\u06af\u0633\u062a","\u0633\u062a\u0645\u0628\u0631","\u0627\u06a9\u062a\u0648\u0628\u0631","\u0646\u0648\u0645\u0628\u0631","\u062f\u0633\u0645\u0628\u0631"],n=["\u0627\u062a\u0648\u0627\u0631","\u067e\u06cc\u0631","\u0645\u0646\u06af\u0644","\u0628\u062f\u06be","\u062c\u0645\u0639\u0631\u0627\u062a","\u062c\u0645\u0639\u06c1","\u06c1\u0641\u062a\u06c1"];e.defineLocale("ur",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd\u060c D MMMM YYYY HH:mm"},meridiemParse:/\u0635\u0628\u062d|\u0634\u0627\u0645/,isPM:function(e){return"\u0634\u0627\u0645"===e},meridiem:function(e,t,n){return e<12?"\u0635\u0628\u062d":"\u0634\u0627\u0645"},calendar:{sameDay:"[\u0622\u062c \u0628\u0648\u0642\u062a] LT",nextDay:"[\u06a9\u0644 \u0628\u0648\u0642\u062a] LT",nextWeek:"dddd [\u0628\u0648\u0642\u062a] LT",lastDay:"[\u06af\u0630\u0634\u062a\u06c1 \u0631\u0648\u0632 \u0628\u0648\u0642\u062a] LT",lastWeek:"[\u06af\u0630\u0634\u062a\u06c1] dddd [\u0628\u0648\u0642\u062a] LT",sameElse:"L"},relativeTime:{future:"%s \u0628\u0639\u062f",past:"%s \u0642\u0628\u0644",s:"\u0686\u0646\u062f \u0633\u06cc\u06a9\u0646\u0688",ss:"%d \u0633\u06cc\u06a9\u0646\u0688",m:"\u0627\u06cc\u06a9 \u0645\u0646\u0679",mm:"%d \u0645\u0646\u0679",h:"\u0627\u06cc\u06a9 \u06af\u06be\u0646\u0679\u06c1",hh:"%d \u06af\u06be\u0646\u0679\u06d2",d:"\u0627\u06cc\u06a9 \u062f\u0646",dd:"%d \u062f\u0646",M:"\u0627\u06cc\u06a9 \u0645\u0627\u06c1",MM:"%d \u0645\u0627\u06c1",y:"\u0627\u06cc\u06a9 \u0633\u0627\u0644",yy:"%d \u0633\u0627\u0644"},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"\u060c")},week:{dow:1,doy:4}})}(n("wd/R"))},Ur1D:function(e,t,n){!function(e){"use strict";e.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,t,n){return e<11?"ekuseni":e<15?"emini":e<19?"entsambama":"ebusuku"},meridiemHour:function(e,t){return 12===e&&(e=0),"ekuseni"===t?e:"emini"===t?e>=11?e:e+12:"entsambama"===t||"ebusuku"===t?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}})}(n("wd/R"))},UudT:function(e,t,n){"use strict";var i=n("U6JX"),r=Object(i.a)(Object.getPrototypeOf,Object);t.a=r},UxlC:function(e,t,n){"use strict";var i=n("14Sl"),r=n("glrk"),s=n("UMSQ"),o=n("ppGB"),a=n("HYAF"),c=n("iqWW"),l=n("DLK6"),u=n("FMNM"),d=Math.max,h=Math.min;i("replace",2,(function(e,t,n,i){var f=i.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,p=i.REPLACE_KEEPS_$0,m=f?"$":"$0";return[function(n,i){var r=a(this),s=null==n?void 0:n[e];return void 0!==s?s.call(n,r,i):t.call(String(r),n,i)},function(e,i){if(!f&&p||"string"==typeof i&&-1===i.indexOf(m)){var a=n(t,e,this,i);if(a.done)return a.value}var b=r(e),g=String(this),_="function"==typeof i;_||(i=String(i));var y=b.global;if(y){var v=b.unicode;b.lastIndex=0}for(var w=[];;){var S=u(b,g);if(null===S)break;if(w.push(S),!y)break;""===String(S[0])&&(b.lastIndex=c(g,s(b.lastIndex),v))}for(var M,x="",k=0,D=0;D<w.length;D++){S=w[D];for(var T=String(S[0]),C=d(h(o(S.index),g.length),0),O=[],L=1;L<S.length;L++)O.push(void 0===(M=S[L])?M:String(M));var R=S.groups;if(_){var E=[T].concat(O,C,g);void 0!==R&&E.push(R);var A=String(i.apply(void 0,E))}else A=l(T,g,C,O,R,i);C>=k&&(x+=g.slice(k,C)+A,k=C+T.length)}return x+g.slice(k)}]}))},"V/fk":function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var i=n("SVse"),r=n("s7LF"),s=n("iInd"),o=n("G0yt"),a=n("Hicy"),c=n("hrfs"),l=n("WF9J"),u=n("yGOH"),d=n("9Xeq"),h=n("8Y7J");let f=(()=>{class e{}return e.\u0275mod=h.Kb({type:e}),e.\u0275inj=h.Jb({factory:function(t){return new(t||e)},providers:[],imports:[[i.c,r.m,r.x,o.c,o.y,o.A,o.F,c.b,r.x,d.a,u.a,o.l,a.b,l.b,s.i,o.h,o.C]]}),e})()},V2x9:function(e,t,n){!function(e){"use strict";e.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Ju\xf1u_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sest_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Ses_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"segundu balun",ss:"segundu %d",m:"minutu ida",mm:"minutu %d",h:"oras ida",hh:"oras %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n("wd/R"))},VRyK:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n("HDdC"),r=n("z+Ro"),s=n("bHdf"),o=n("yCtX");function a(...e){let t=Number.POSITIVE_INFINITY,n=null,a=e[e.length-1];return Object(r.a)(a)?(n=e.pop(),e.length>1&&"number"==typeof e[e.length-1]&&(t=e.pop())):"number"==typeof a&&(t=e.pop()),null===n&&1===e.length&&e[0]instanceof i.a?e[0]:Object(s.a)(t)(Object(o.a)(e,n))}},VTlA:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("mSOc"),r=n("ufoC"),s=n("8Y7J");let o=(()=>{class e{constructor(e,t){this.taskMessageService=e,this.summaryService=t}init(e,t,n,i,r,s,o){this.getUpdate=e,this.preProcessing=t,this.setList=n,this.onFetchError=i,this.taskFilter=r,this.itemFilter=s,this.builders=o||{},this.summaryDataSubscription=this.summaryService.subscribe(e=>{this.summary=e,this.fetch()},this.onFetchError)}fetch(){this.getUpdate().subscribe(e=>{this.updateData(e,this.summary.executing_tasks.filter(this.taskFilter))},this.onFetchError)}updateData(e,t){const n=this.preProcessing?this.preProcessing(e):e;this.addMissing(n,t),n.forEach(e=>{const n=t.filter(t=>this.itemFilter(e,t));e.cdExecuting=this.getTaskAction(n)}),this.setList(n)}addMissing(e,t){const n=this.builders.default;t.forEach(t=>{const i=e.find(e=>this.itemFilter(e,t)),r=this.builders[t.name];i||!r&&!n||e.push(r?r(t.metadata):n(t.metadata))})}getTaskAction(e){if(0!==e.length)return e.map(e=>{const t=e.progress?` ${e.progress}%`:"";return this.taskMessageService.getRunningText(e)+"..."+t}).join(", ")}ngOnDestroy(){this.summaryDataSubscription&&this.summaryDataSubscription.unsubscribe()}}return e.\u0275fac=function(t){return new(t||e)(s.dc(r.a),s.dc(i.a))},e.\u0275prov=s.Ib({token:e,factory:e.\u0275fac}),e})()},VXsX:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n("LvDl"),r=n.n(i),s=n("8Y7J");class o{constructor(e,t,n){this.name=e,this.metadata=t,this.onTaskFinished=n}}let a=(()=>{class e{constructor(){this.subscriptions=[]}init(e){return e.subscribe(e=>{const t=e.executing_tasks,n=e.finished_tasks,i=[];for(const r of this.subscriptions){const e=this._getTask(r,n),s=this._getTask(r,t);null!==e&&null===s&&r.onTaskFinished(e),null!==s&&i.push(r),this.subscriptions=i}})}subscribe(e,t,n){this.subscriptions.push(new o(e,t,n))}_getTask(e,t){for(const n of t)if(n.name===e.name&&r.a.isEqual(n.metadata,e.metadata))return n;return null}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=s.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},Vclq:function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),i=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],r=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,i){return e?/-MMM-/.test(i)?n[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"domingo_lunes_martes_mi\xe9rcoles_jueves_viernes_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xe9._jue._vie._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[ma\xf1ana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un d\xeda",dd:"%d d\xedas",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un a\xf1o",yy:"%d a\xf1os"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:0,doy:6}})}(n("wd/R"))},Vhfg:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n("lJxs"),r=n("WE5d"),s=n("ej+x"),o=n("8Y7J");let a=(()=>{class e{constructor(e){this.featureToggles=e}canActivate(e){return this.featureToggles.get().pipe(Object(i.a)(t=>{if(!1===t[e.routeConfig.path])throw new r.b;return!0}))}canActivateChild(e){return this.canActivate(e.parent)}}return e.\u0275fac=function(t){return new(t||e)(o.dc(s.a))},e.\u0275prov=o.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},VpIT:function(e,t,n){var i=n("xDBR"),r=n("xs3f");(e.exports=function(e,t){return r[e]||(r[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.12.1",mode:i?"pure":"global",copyright:"\xa9 2021 Denis Pushkarev (zloirock.ru)"})},Vu81:function(e,t,n){var i=n("0GbY"),r=n("JBy8"),s=n("dBg+"),o=n("glrk");e.exports=i("Reflect","ownKeys")||function(e){var t=r.f(o(e)),n=s.f;return n?t.concat(n(e)):t}},VxPD:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("yJti"),r=n("e2NH");class s extends r.a{constructor(e=i.a.ValueOk,t=""){switch(super(),e){case i.a.ValueOk:this.type="light",this.msg="";break;case i.a.ValueNone:this.type="info",this.msg=(t?"Retrieving data for " + t + ".":"Retrieving data.")+" "+"Please wait...";break;case i.a.ValueStale:this.type="warning",this.msg=t?"Displaying previously cached data for " + t + ".":"Displaying previously cached data.";break;case i.a.ValueException:this.type="danger",this.msg=(t?"Could not load data for " + t + ".":"Could not load data.")+" "+"Please check the cluster health."}}}},WE5d:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return o}));var i=n("oxzT");class r extends Error{}class s extends r{constructor(){super(...arguments),this.header="Page Not Found",this.message="Sorry, we couldn\u2019t find what you were looking for.\n The page you requested may have been changed or moved.",this.icon=i.a.warning}}class o extends r{constructor(){super(...arguments),this.header="User Denied",this.message="Sorry, the user does not exist in Ceph.\n You'll be logged out from the Identity Provider when you retry logging in.",this.icon=i.a.warning}}},WF9J:function(e,t,n){"use strict";n.d(t,"a",(function(){return z})),n.d(t,"b",(function(){return $})),n("TeQF"),n("QWBl"),n("4mDm"),n("zKZe"),n("07d7"),n("4l63"),n("PKPk"),n("ENF9"),n("3bBZ");var i=n("hKI/"),r=n.n(i),s=n("9/5/"),o=n.n(s),a=n("uyHG"),c=n.n(a),l=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,i){return e[0]===t&&(n=i,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),i=this.__entries__[n];return i&&i[1]},t.prototype.set=function(t,n){var i=e(this.__entries__,t);~i?this.__entries__[i][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,i=e(n,t);~i&&n.splice(i,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,i=this.__entries__;n<i.length;n++){var r=i[n];e.call(t,r[1],r[0])}},t}()}(),u="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,d="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),h="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(d):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)},f=["top","right","bottom","left","width","height","size","weight"],p="undefined"!=typeof MutationObserver,m=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,i=!1,r=0;function s(){n&&(n=!1,e()),i&&a()}function o(){h(s)}function a(){var e=Date.now();if(n){if(e-r<2)return;i=!0}else n=!0,i=!1,setTimeout(o,20);r=e}return a}(this.refresh.bind(this))}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){u&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),p?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){u&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;f.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),b=function(e,t){for(var n=0,i=Object.keys(t);n<i.length;n++){var r=i[n];Object.defineProperty(e,r,{value:t[r],enumerable:!1,writable:!1,configurable:!0})}return e},g=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||d},_=S(0,0,0,0);function y(e){return parseFloat(e)||0}function v(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+y(e["border-"+n+"-width"])}),0)}var w="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof g(e).SVGGraphicsElement}:function(e){return e instanceof g(e).SVGElement&&"function"==typeof e.getBBox};function S(e,t,n,i){return{x:e,y:t,width:n,height:i}}var M=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=S(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e,t=(e=this.target,u?w(e)?function(e){var t=e.getBBox();return S(0,0,t.width,t.height)}(e):function(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return _;var i=g(e).getComputedStyle(e),r=function(e){for(var t={},n=0,i=["top","right","bottom","left"];n<i.length;n++){var r=i[n];t[r]=y(e["padding-"+r])}return t}(i),s=r.left+r.right,o=r.top+r.bottom,a=y(i.width),c=y(i.height);if("border-box"===i.boxSizing&&(Math.round(a+s)!==t&&(a-=v(i,"left","right")+s),Math.round(c+o)!==n&&(c-=v(i,"top","bottom")+o)),!function(e){return e===g(e).document.documentElement}(e)){var l=Math.round(a+s)-t,u=Math.round(c+o)-n;1!==Math.abs(l)&&(a-=l),1!==Math.abs(u)&&(c-=u)}return S(r.left,r.top,a,c)}(e):_);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),x=function(e,t){var n,i,r,s,o,a,c,l=(i=(n=t).x,r=n.y,s=n.width,o=n.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,c=Object.create(a.prototype),b(c,{x:i,y:r,width:s,height:o,top:r,right:i+s,bottom:o+r,left:i}),c);b(this,{target:e,contentRect:l})},k=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new l,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof g(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new M(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof g(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new x(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),D="undefined"!=typeof WeakMap?new WeakMap:new l,T=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=m.getInstance(),i=new k(t,n,this);D.set(this,i)};["observe","unobserve","disconnect"].forEach((function(e){T.prototype[e]=function(){var t;return(t=D.get(this))[e].apply(t,arguments)}}));var C=void 0!==d.ResizeObserver?d.ResizeObserver:T,O=n("AxL3"),L=n.n(O);function R(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window}function E(e){return e&&e.ownerDocument?e.ownerDocument:document}n("E9XD"),n("sMBO"),n("rB9j"),n("Rm1S"),n("UxlC");var A=null,I=null;function P(e){if(null===A){var t=E(e);if(void 0===t)return A=0;var n=t.body,i=t.createElement("div");i.classList.add("simplebar-hide-scrollbar"),n.appendChild(i);var r=i.getBoundingClientRect().right;n.removeChild(i),A=r}return A}L.a&&window.addEventListener("resize",(function(){I!==window.devicePixelRatio&&(I=window.devicePixelRatio,A=null)}));var j=function(){function e(t,n){var i=this;this.onScroll=function(){var e=R(i.el);i.scrollXTicking||(e.requestAnimationFrame(i.scrollX),i.scrollXTicking=!0),i.scrollYTicking||(e.requestAnimationFrame(i.scrollY),i.scrollYTicking=!0)},this.scrollX=function(){i.axis.x.isOverflowing&&(i.showScrollbar("x"),i.positionScrollbar("x")),i.scrollXTicking=!1},this.scrollY=function(){i.axis.y.isOverflowing&&(i.showScrollbar("y"),i.positionScrollbar("y")),i.scrollYTicking=!1},this.onMouseEnter=function(){i.showScrollbar("x"),i.showScrollbar("y")},this.onMouseMove=function(e){i.mouseX=e.clientX,i.mouseY=e.clientY,(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&i.onMouseMoveForAxis("x"),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&i.onMouseMoveForAxis("y")},this.onMouseLeave=function(){i.onMouseMove.cancel(),(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&i.onMouseLeaveForAxis("x"),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&i.onMouseLeaveForAxis("y"),i.mouseX=-1,i.mouseY=-1},this.onWindowResize=function(){i.scrollbarWidth=i.getScrollbarWidth(),i.hideNativeScrollbar()},this.hideScrollbars=function(){i.axis.x.track.rect=i.axis.x.track.el.getBoundingClientRect(),i.axis.y.track.rect=i.axis.y.track.el.getBoundingClientRect(),i.isWithinBounds(i.axis.y.track.rect)||(i.axis.y.scrollbar.el.classList.remove(i.classNames.visible),i.axis.y.isVisible=!1),i.isWithinBounds(i.axis.x.track.rect)||(i.axis.x.scrollbar.el.classList.remove(i.classNames.visible),i.axis.x.isVisible=!1)},this.onPointerEvent=function(e){var t,n;i.axis.x.track.rect=i.axis.x.track.el.getBoundingClientRect(),i.axis.y.track.rect=i.axis.y.track.el.getBoundingClientRect(),(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&(t=i.isWithinBounds(i.axis.x.track.rect)),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&(n=i.isWithinBounds(i.axis.y.track.rect)),(t||n)&&(e.preventDefault(),e.stopPropagation(),"mousedown"===e.type&&(t&&(i.axis.x.scrollbar.rect=i.axis.x.scrollbar.el.getBoundingClientRect(),i.isWithinBounds(i.axis.x.scrollbar.rect)?i.onDragStart(e,"x"):i.onTrackClick(e,"x")),n&&(i.axis.y.scrollbar.rect=i.axis.y.scrollbar.el.getBoundingClientRect(),i.isWithinBounds(i.axis.y.scrollbar.rect)?i.onDragStart(e,"y"):i.onTrackClick(e,"y"))))},this.drag=function(t){var n=i.axis[i.draggedAxis].track,r=n.rect[i.axis[i.draggedAxis].sizeAttr],s=i.axis[i.draggedAxis].scrollbar,o=i.contentWrapperEl[i.axis[i.draggedAxis].scrollSizeAttr],a=parseInt(i.elStyles[i.axis[i.draggedAxis].sizeAttr],10);t.preventDefault(),t.stopPropagation();var c=(("y"===i.draggedAxis?t.pageY:t.pageX)-n.rect[i.axis[i.draggedAxis].offsetAttr]-i.axis[i.draggedAxis].dragOffset)/(r-s.size)*(o-a);"x"===i.draggedAxis&&(c=i.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?c-(r+s.size):c,c=i.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-c:c),i.contentWrapperEl[i.axis[i.draggedAxis].scrollOffsetAttr]=c},this.onEndDrag=function(e){var t=E(i.el),n=R(i.el);e.preventDefault(),e.stopPropagation(),i.el.classList.remove(i.classNames.dragging),t.removeEventListener("mousemove",i.drag,!0),t.removeEventListener("mouseup",i.onEndDrag,!0),i.removePreventClickId=n.setTimeout((function(){t.removeEventListener("click",i.preventClick,!0),t.removeEventListener("dblclick",i.preventClick,!0),i.removePreventClickId=null}))},this.preventClick=function(e){e.preventDefault(),e.stopPropagation()},this.el=t,this.minScrollbarWidth=20,this.options=Object.assign({},e.defaultOptions,{},n),this.classNames=Object.assign({},e.defaultOptions.classNames,{},this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,e.instances.has(this.el)||(this.recalculate=r()(this.recalculate.bind(this),64),this.onMouseMove=r()(this.onMouseMove.bind(this),64),this.hideScrollbars=o()(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=o()(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=c()(e.getRtlHelpers),this.init())}e.getRtlHelpers=function(){var t=document.createElement("div");t.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var n=t.firstElementChild;document.body.appendChild(n);var i=n.firstElementChild;n.scrollLeft=0;var r=e.getOffset(n),s=e.getOffset(i);n.scrollLeft=999;var o=e.getOffset(i);return{isRtlScrollingInverted:r.left!==s.left&&s.left-o.left!=0,isRtlScrollbarInverted:r.left!==s.left}},e.getOffset=function(e){var t=e.getBoundingClientRect(),n=E(e),i=R(e);return{top:t.top+(i.pageYOffset||n.documentElement.scrollTop),left:t.left+(i.pageXOffset||n.documentElement.scrollLeft)}};var t=e.prototype;return t.init=function(){e.instances.set(this.el,this),L.a&&(this.initDOM(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},t.initDOM=function(){var e=this;if(Array.prototype.filter.call(this.el.children,(function(t){return t.classList.contains(e.classNames.wrapper)})).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var t=document.createElement("div"),n=document.createElement("div");t.classList.add(this.classNames.track),n.classList.add(this.classNames.scrollbar),t.appendChild(n),this.axis.x.track.el=t.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=t.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},t.initListeners=function(){var e=this,t=R(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(t){e.el.addEventListener(t,e.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(t){e.el.addEventListener(t,e.onPointerEvent,{capture:!0,passive:!0})})),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),t.addEventListener("resize",this.onWindowResize);var n=!1;this.resizeObserver=new(t.ResizeObserver||C)((function(){n&&e.recalculate()})),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),t.requestAnimationFrame((function(){n=!0})),this.mutationObserver=new t.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},t.recalculate=function(){var e=R(this.el);this.elStyles=e.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction;var t=this.heightAutoObserverEl.offsetHeight<=1,n=this.heightAutoObserverEl.offsetWidth<=1,i=this.contentEl.offsetWidth,r=this.contentWrapperEl.offsetWidth,s=this.elStyles.overflowX,o=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var a=this.contentEl.scrollHeight,c=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=t?"auto":"100%",this.placeholderEl.style.width=n?i+"px":"auto",this.placeholderEl.style.height=a+"px";var l=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=c>i,this.axis.y.isOverflowing=a>l,this.axis.x.isOverflowing="hidden"!==s&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==o&&this.axis.y.isOverflowing,this.axis.x.forceVisible="x"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.y.forceVisible="y"===this.options.forceVisible||!0===this.options.forceVisible,this.hideNativeScrollbar();var u=this.axis.x.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&c>r-(this.axis.y.isOverflowing?this.scrollbarWidth:0),this.axis.y.isOverflowing=this.axis.y.isOverflowing&&a>l-u,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},t.getScrollbarSize=function(e){if(void 0===e&&(e="y"),!this.axis[e].isOverflowing)return 0;var t,n=this.axis[e].track.el[this.axis[e].offsetSizeAttr];return t=Math.max(~~(n/this.contentEl[this.axis[e].scrollSizeAttr]*n),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(t=Math.min(t,this.options.scrollbarMaxSize)),t},t.positionScrollbar=function(t){if(void 0===t&&(t="y"),this.axis[t].isOverflowing){var n=this.contentWrapperEl[this.axis[t].scrollSizeAttr],i=this.axis[t].track.el[this.axis[t].offsetSizeAttr],r=parseInt(this.elStyles[this.axis[t].sizeAttr],10),s=this.axis[t].scrollbar,o=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],a=~~((o="x"===t&&this.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-o:o)/(n-r)*(i-s.size));a="x"===t&&this.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?a+(i-s.size):a,s.el.style.transform="x"===t?"translate3d("+a+"px, 0, 0)":"translate3d(0, "+a+"px, 0)"}},t.toggleTrackVisibility=function(e){void 0===e&&(e="y");var t=this.axis[e].track.el,n=this.axis[e].scrollbar.el;this.axis[e].isOverflowing||this.axis[e].forceVisible?(t.style.visibility="visible",this.contentWrapperEl.style[this.axis[e].overflowAttr]="scroll"):(t.style.visibility="hidden",this.contentWrapperEl.style[this.axis[e].overflowAttr]="hidden"),n.style.display=this.axis[e].isOverflowing?"block":"none"},t.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},t.onMouseMoveForAxis=function(e){void 0===e&&(e="y"),this.axis[e].track.rect=this.axis[e].track.el.getBoundingClientRect(),this.axis[e].scrollbar.rect=this.axis[e].scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis[e].scrollbar.rect)?this.axis[e].scrollbar.el.classList.add(this.classNames.hover):this.axis[e].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[e].track.rect)?(this.showScrollbar(e),this.axis[e].track.el.classList.add(this.classNames.hover)):this.axis[e].track.el.classList.remove(this.classNames.hover)},t.onMouseLeaveForAxis=function(e){void 0===e&&(e="y"),this.axis[e].track.el.classList.remove(this.classNames.hover),this.axis[e].scrollbar.el.classList.remove(this.classNames.hover)},t.showScrollbar=function(e){void 0===e&&(e="y"),this.axis[e].isVisible||(this.axis[e].scrollbar.el.classList.add(this.classNames.visible),this.axis[e].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},t.onDragStart=function(e,t){void 0===t&&(t="y");var n=E(this.el),i=R(this.el);this.axis[t].dragOffset=("y"===t?e.pageY:e.pageX)-this.axis[t].scrollbar.rect[this.axis[t].offsetAttr],this.draggedAxis=t,this.el.classList.add(this.classNames.dragging),n.addEventListener("mousemove",this.drag,!0),n.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(n.addEventListener("click",this.preventClick,!0),n.addEventListener("dblclick",this.preventClick,!0)):(i.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},t.onTrackClick=function(e,t){var n=this;if(void 0===t&&(t="y"),this.options.clickOnTrack){var i=R(this.el);this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect();var r=this.axis[t].scrollbar.rect[this.axis[t].offsetAttr],s=parseInt(this.elStyles[this.axis[t].sizeAttr],10),o=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],a=("y"===t?this.mouseY-r:this.mouseX-r)<0?-1:1,c=-1===a?o-s:o+s;!function e(){var r,s;-1===a?o>c&&(n.contentWrapperEl.scrollTo(((r={})[n.axis[t].offsetAttr]=o-=n.options.clickOnTrackSpeed,r)),i.requestAnimationFrame(e)):o<c&&(n.contentWrapperEl.scrollTo(((s={})[n.axis[t].offsetAttr]=o+=n.options.clickOnTrackSpeed,s)),i.requestAnimationFrame(e))}()}},t.getContentElement=function(){return this.contentEl},t.getScrollElement=function(){return this.contentWrapperEl},t.getScrollbarWidth=function(){try{return"none"===getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:P(this.el)}catch(e){return P(this.el)}},t.removeListeners=function(){var e=this,t=R(this.el);this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(t){e.el.removeEventListener(t,e.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(t){e.el.removeEventListener(t,e.onPointerEvent,{capture:!0,passive:!0})})),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()},t.unMount=function(){this.removeListeners(),e.instances.delete(this.el)},t.isWithinBounds=function(e){return this.mouseX>=e.left&&this.mouseX<=e.left+e.width&&this.mouseY>=e.top&&this.mouseY<=e.top+e.height},t.findChild=function(e,t){var n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;return Array.prototype.filter.call(e.children,(function(e){return n.call(e,t)}))[0]},e}();j.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,clickOnTrackSpeed:40,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3},j.instances=new WeakMap;var N=j,F=n("8Y7J");const Y=["*"];let z=(()=>{class e{constructor(e){this.elRef=e}ngOnInit(){}ngAfterViewInit(){this.SimpleBar=new N(this.elRef.nativeElement,this.options||{})}ngOnDestroy(){this.SimpleBar.unMount(),this.SimpleBar=null}}return e.\u0275fac=function(t){return new(t||e)(F.Mb(F.m))},e.\u0275cmp=F.Gb({type:e,selectors:[["ngx-simplebar"]],hostAttrs:["data-simplebar","init"],inputs:{options:"options"},ngContentSelectors:Y,decls:13,vars:0,consts:[[1,"simplebar-wrapper"],[1,"simplebar-height-auto-observer-wrapper"],[1,"simplebar-height-auto-observer"],[1,"simplebar-mask"],[1,"simplebar-offset"],[1,"simplebar-content-wrapper"],[1,"simplebar-content"],[1,"simplebar-placeholder"],[1,"simplebar-track","simplebar-horizontal"],[1,"simplebar-scrollbar"],[1,"simplebar-track","simplebar-vertical"]],template:function(e,t){1&e&&(F.oc(),F.Sb(0,"div",0),F.Sb(1,"div",1),F.Nb(2,"div",2),F.Rb(),F.Sb(3,"div",3),F.Sb(4,"div",4),F.Sb(5,"div",5),F.Sb(6,"div",6),F.nc(7),F.Rb(),F.Rb(),F.Rb(),F.Rb(),F.Nb(8,"div",7),F.Rb(),F.Sb(9,"div",8),F.Nb(10,"div",9),F.Rb(),F.Sb(11,"div",10),F.Nb(12,"div",9),F.Rb())},styles:["[data-simplebar]{position:relative;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;flex-wrap:wrap;-webkit-box-pack:start;justify-content:flex-start;align-content:flex-start;-webkit-box-align:start;align-items:flex-start}.simplebar-wrapper{overflow:hidden;width:inherit;height:inherit;max-width:inherit;max-height:inherit}.simplebar-mask{direction:inherit;position:absolute;overflow:hidden;padding:0;margin:0;left:0;top:0;bottom:0;right:0;width:auto!important;height:auto!important;z-index:0}.simplebar-offset{direction:inherit!important;box-sizing:inherit!important;resize:none!important;position:absolute;top:0;left:0;bottom:0;right:0;padding:0;margin:0;-webkit-overflow-scrolling:touch}.simplebar-content-wrapper{direction:inherit;box-sizing:border-box!important;position:relative;display:block;height:100%;width:auto;max-width:100%;max-height:100%;scrollbar-width:none;-ms-overflow-style:none}.simplebar-content-wrapper::-webkit-scrollbar,.simplebar-hide-scrollbar::-webkit-scrollbar{width:0;height:0}.simplebar-content:after,.simplebar-content:before{content:' ';display:table}.simplebar-placeholder{max-height:100%;max-width:100%;width:100%;pointer-events:none}.simplebar-height-auto-observer-wrapper{box-sizing:inherit!important;height:100%;width:100%;max-width:1px;position:relative;float:left;max-height:1px;overflow:hidden;z-index:-1;padding:0;margin:0;pointer-events:none;-webkit-box-flex:inherit;flex-grow:inherit;flex-shrink:0;flex-basis:0}.simplebar-height-auto-observer{box-sizing:inherit;display:block;opacity:0;position:absolute;top:0;left:0;height:1000%;width:1000%;min-height:1px;min-width:1px;overflow:hidden;pointer-events:none;z-index:-1}.simplebar-track{z-index:1;position:absolute;right:0;bottom:0;pointer-events:none;overflow:hidden}[data-simplebar].simplebar-dragging .simplebar-content{pointer-events:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none}[data-simplebar].simplebar-dragging .simplebar-track{pointer-events:all}.simplebar-scrollbar{position:absolute;left:0;right:0;min-height:10px}.simplebar-scrollbar:before{position:absolute;content:'';background:#000;border-radius:7px;left:2px;right:2px;opacity:0;-webkit-transition:opacity .2s linear;transition:opacity .2s linear}.simplebar-scrollbar.simplebar-visible:before{opacity:.5;-webkit-transition:opacity linear;transition:opacity linear}.simplebar-track.simplebar-vertical{top:0;width:11px}.simplebar-track.simplebar-vertical .simplebar-scrollbar:before{top:2px;bottom:2px}.simplebar-track.simplebar-horizontal{left:0;height:11px}.simplebar-track.simplebar-horizontal .simplebar-scrollbar:before{height:100%;left:2px;right:2px}.simplebar-track.simplebar-horizontal .simplebar-scrollbar{right:auto;left:0;top:2px;height:7px;min-height:0;min-width:10px;width:auto}[data-simplebar-direction=rtl] .simplebar-track.simplebar-vertical{right:auto;left:0}.hs-dummy-scrollbar-size{direction:rtl;position:fixed;opacity:0;visibility:hidden;height:500px;width:500px;overflow-y:hidden;overflow-x:scroll}.simplebar-hide-scrollbar{position:fixed;left:0;visibility:hidden;overflow-y:scroll;scrollbar-width:none;-ms-overflow-style:none}","ngx-simplebar{display:block}"],encapsulation:2}),e})(),$=(()=>{class e{}return e.\u0275mod=F.Kb({type:e}),e.\u0275inj=F.Jb({factory:function(t){return new(t||e)},imports:[[]]}),e})()},WJ6P:function(e,t,n){"use strict";t.a=function(){return[]}},WJkJ:function(e,t){e.exports="\t\n\v\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"},WKiH:function(e,t,n){var i=n("HYAF"),r="["+n("WJkJ")+"]",s=RegExp("^"+r+r+"*"),o=RegExp(r+r+"*$"),a=function(e){return function(t){var n=String(i(t));return 1&e&&(n=n.replace(s,"")),2&e&&(n=n.replace(o,"")),n}};e.exports={start:a(1),end:a(2),trim:a(3)}},WMd4:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("EY2u"),r=n("LRne"),s=n("z6cu");let o=(()=>{class e{constructor(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue="N"===e}observe(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}}do(e,t,n){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return n&&n()}}accept(e,t,n){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,n)}toObservable(){switch(this.kind){case"N":return Object(r.a)(this.value);case"E":return Object(s.a)(this.error);case"C":return Object(i.b)()}throw new Error("unexpected notification kind value")}static createNext(t){return void 0!==t?new e("N",t):e.undefinedValueNotification}static createError(t){return new e("E",void 0,t)}static createComplete(){return e.completeNotification}}return e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e})()},WOAq:function(e,t,n){"use strict";(function(e){var i=n("Ju5/"),r=n("L3Qv"),s="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=s&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===s?i.a.Buffer:void 0;t.a=(a?a.isBuffer:void 0)||r.a}).call(this,n("3UD+")(e))},WYrj:function(e,t,n){!function(e){"use strict";var t=["\u0796\u07ac\u0782\u07aa\u0787\u07a6\u0783\u07a9","\u078a\u07ac\u0784\u07b0\u0783\u07aa\u0787\u07a6\u0783\u07a9","\u0789\u07a7\u0783\u07a8\u0797\u07aa","\u0787\u07ad\u0795\u07b0\u0783\u07a9\u078d\u07aa","\u0789\u07ad","\u0796\u07ab\u0782\u07b0","\u0796\u07aa\u078d\u07a6\u0787\u07a8","\u0787\u07af\u078e\u07a6\u0790\u07b0\u0793\u07aa","\u0790\u07ac\u0795\u07b0\u0793\u07ac\u0789\u07b0\u0784\u07a6\u0783\u07aa","\u0787\u07ae\u0786\u07b0\u0793\u07af\u0784\u07a6\u0783\u07aa","\u0782\u07ae\u0788\u07ac\u0789\u07b0\u0784\u07a6\u0783\u07aa","\u0791\u07a8\u0790\u07ac\u0789\u07b0\u0784\u07a6\u0783\u07aa"],n=["\u0787\u07a7\u078b\u07a8\u0787\u07b0\u078c\u07a6","\u0780\u07af\u0789\u07a6","\u0787\u07a6\u0782\u07b0\u078e\u07a7\u0783\u07a6","\u0784\u07aa\u078b\u07a6","\u0784\u07aa\u0783\u07a7\u0790\u07b0\u078a\u07a6\u078c\u07a8","\u0780\u07aa\u0786\u07aa\u0783\u07aa","\u0780\u07ae\u0782\u07a8\u0780\u07a8\u0783\u07aa"];e.defineLocale("dv",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:"\u0787\u07a7\u078b\u07a8_\u0780\u07af\u0789\u07a6_\u0787\u07a6\u0782\u07b0_\u0784\u07aa\u078b\u07a6_\u0784\u07aa\u0783\u07a7_\u0780\u07aa\u0786\u07aa_\u0780\u07ae\u0782\u07a8".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0789\u0786|\u0789\u078a/,isPM:function(e){return"\u0789\u078a"===e},meridiem:function(e,t,n){return e<12?"\u0789\u0786":"\u0789\u078a"},calendar:{sameDay:"[\u0789\u07a8\u0787\u07a6\u078b\u07aa] LT",nextDay:"[\u0789\u07a7\u078b\u07a6\u0789\u07a7] LT",nextWeek:"dddd LT",lastDay:"[\u0787\u07a8\u0787\u07b0\u0794\u07ac] LT",lastWeek:"[\u078a\u07a7\u0787\u07a8\u078c\u07aa\u0788\u07a8] dddd LT",sameElse:"L"},relativeTime:{future:"\u078c\u07ac\u0783\u07ad\u078e\u07a6\u0787\u07a8 %s",past:"\u0786\u07aa\u0783\u07a8\u0782\u07b0 %s",s:"\u0790\u07a8\u0786\u07aa\u0782\u07b0\u078c\u07aa\u0786\u07ae\u0785\u07ac\u0787\u07b0",ss:"d% \u0790\u07a8\u0786\u07aa\u0782\u07b0\u078c\u07aa",m:"\u0789\u07a8\u0782\u07a8\u0793\u07ac\u0787\u07b0",mm:"\u0789\u07a8\u0782\u07a8\u0793\u07aa %d",h:"\u078e\u07a6\u0791\u07a8\u0787\u07a8\u0783\u07ac\u0787\u07b0",hh:"\u078e\u07a6\u0791\u07a8\u0787\u07a8\u0783\u07aa %d",d:"\u078b\u07aa\u0788\u07a6\u0780\u07ac\u0787\u07b0",dd:"\u078b\u07aa\u0788\u07a6\u0790\u07b0 %d",M:"\u0789\u07a6\u0780\u07ac\u0787\u07b0",MM:"\u0789\u07a6\u0790\u07b0 %d",y:"\u0787\u07a6\u0780\u07a6\u0783\u07ac\u0787\u07b0",yy:"\u0787\u07a6\u0780\u07a6\u0783\u07aa %d"},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"\u060c")},week:{dow:7,doy:12}})}(n("wd/R"))},Wv91:function(e,t,n){!function(e){"use strict";var t={1:"'inji",5:"'inji",8:"'inji",70:"'inji",80:"'inji",2:"'nji",7:"'nji",20:"'nji",50:"'nji",3:"'\xfcnji",4:"'\xfcnji",100:"'\xfcnji",6:"'njy",9:"'unjy",10:"'unjy",30:"'unjy",60:"'ynjy",90:"'ynjy"};e.defineLocale("tk",{months:"\xddanwar_Fewral_Mart_Aprel_Ma\xfd_I\xfdun_I\xfdul_Awgust_Sent\xfdabr_Okt\xfdabr_No\xfdabr_Dekabr".split("_"),monthsShort:"\xddan_Few_Mar_Apr_Ma\xfd_I\xfdn_I\xfdl_Awg_Sen_Okt_No\xfd_Dek".split("_"),weekdays:"\xddek\u015fenbe_Du\u015fenbe_Si\u015fenbe_\xc7ar\u015fenbe_Pen\u015fenbe_Anna_\u015eenbe".split("_"),weekdaysShort:"\xddek_Du\u015f_Si\u015f_\xc7ar_Pen_Ann_\u015een".split("_"),weekdaysMin:"\xddk_D\u015f_S\u015f_\xc7r_Pn_An_\u015en".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bug\xfcn sagat] LT",nextDay:"[ertir sagat] LT",nextWeek:"[indiki] dddd [sagat] LT",lastDay:"[d\xfc\xfdn] LT",lastWeek:"[ge\xe7en] dddd [sagat] LT",sameElse:"L"},relativeTime:{future:"%s so\u0148",past:"%s \xf6\u0148",s:"birn\xe4\xe7e sekunt",m:"bir minut",mm:"%d minut",h:"bir sagat",hh:"%d sagat",d:"bir g\xfcn",dd:"%d g\xfcn",M:"bir a\xfd",MM:"%d a\xfd",y:"bir \xfdyl",yy:"%d \xfdyl"},ordinal:function(e,n){switch(n){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'unjy";var i=e%10;return e+(t[i]||t[e%100-i]||t[e>=100?100:null])}},week:{dow:1,doy:7}})}(n("wd/R"))},WxRl:function(e,t,n){!function(e){"use strict";var t="vas\xe1rnap h\xe9tf\u0151n kedden szerd\xe1n cs\xfct\xf6rt\xf6k\xf6n p\xe9nteken szombaton".split(" ");function n(e,t,n,i){var r=e;switch(n){case"s":return i||t?"n\xe9h\xe1ny m\xe1sodperc":"n\xe9h\xe1ny m\xe1sodperce";case"ss":return r+(i||t)?" m\xe1sodperc":" m\xe1sodperce";case"m":return"egy"+(i||t?" perc":" perce");case"mm":return r+(i||t?" perc":" perce");case"h":return"egy"+(i||t?" \xf3ra":" \xf3r\xe1ja");case"hh":return r+(i||t?" \xf3ra":" \xf3r\xe1ja");case"d":return"egy"+(i||t?" nap":" napja");case"dd":return r+(i||t?" nap":" napja");case"M":return"egy"+(i||t?" h\xf3nap":" h\xf3napja");case"MM":return r+(i||t?" h\xf3nap":" h\xf3napja");case"y":return"egy"+(i||t?" \xe9v":" \xe9ve");case"yy":return r+(i||t?" \xe9v":" \xe9ve")}return""}function i(e){return(e?"":"[m\xfalt] ")+"["+t[this.day()]+"] LT[-kor]"}e.defineLocale("hu",{months:"janu\xe1r_febru\xe1r_m\xe1rcius_\xe1prilis_m\xe1jus_j\xfanius_j\xfalius_augusztus_szeptember_okt\xf3ber_november_december".split("_"),monthsShort:"jan._feb._m\xe1rc._\xe1pr._m\xe1j._j\xfan._j\xfal._aug._szept._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"vas\xe1rnap_h\xe9tf\u0151_kedd_szerda_cs\xfct\xf6rt\xf6k_p\xe9ntek_szombat".split("_"),weekdaysShort:"vas_h\xe9t_kedd_sze_cs\xfct_p\xe9n_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,t,n){return e<12?!0===n?"de":"DE":!0===n?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return i.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return i.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s m\xfalva",past:"%s",s:n,ss:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},X709:function(e,t,n){!function(e){"use strict";e.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"s\xf6ndag_m\xe5ndag_tisdag_onsdag_torsdag_fredag_l\xf6rdag".split("_"),weekdaysShort:"s\xf6n_m\xe5n_tis_ons_tor_fre_l\xf6r".split("_"),weekdaysMin:"s\xf6_m\xe5_ti_on_to_fr_l\xf6".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Ig\xe5r] LT",nextWeek:"[P\xe5] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"f\xf6r %s sedan",s:"n\xe5gra sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en m\xe5nad",MM:"%d m\xe5nader",y:"ett \xe5r",yy:"%d \xe5r"},dayOfMonthOrdinalParse:/\d{1,2}(\:e|\:a)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?":e":1===t||2===t?":a":":e")},week:{dow:1,doy:4}})}(n("wd/R"))},XDbj:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("sVev"),r=n("7o/Q");function s(e=c){return t=>t.lift(new o(e))}class o{constructor(e){this.errorFactory=e}call(e,t){return t.subscribe(new a(e,this.errorFactory))}}class a extends r.a{constructor(e,t){super(e),this.errorFactory=t,this.hasValue=!1}_next(e){this.hasValue=!0,this.destination.next(e)}_complete(){if(this.hasValue)return this.destination.complete();{let t;try{t=this.errorFactory()}catch(e){t=e}this.destination.error(t)}}}function c(){return new i.a}},XDpg:function(e,t,n){!function(e){"use strict";e.defineLocale("zh-cn",{months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u5468\u65e5_\u5468\u4e00_\u5468\u4e8c_\u5468\u4e09_\u5468\u56db_\u5468\u4e94_\u5468\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5Ah\u70b9mm\u5206",LLLL:"YYYY\u5e74M\u6708D\u65e5ddddAh\u70b9mm\u5206",l:"YYYY/M/D",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u51cc\u6668"===t||"\u65e9\u4e0a"===t||"\u4e0a\u5348"===t?e:"\u4e0b\u5348"===t||"\u665a\u4e0a"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var i=100*e+t;return i<600?"\u51cc\u6668":i<900?"\u65e9\u4e0a":i<1130?"\u4e0a\u5348":i<1230?"\u4e2d\u5348":i<1800?"\u4e0b\u5348":"\u665a\u4e0a"},calendar:{sameDay:"[\u4eca\u5929]LT",nextDay:"[\u660e\u5929]LT",nextWeek:function(e){return e.week()!==this.week()?"[\u4e0b]dddLT":"[\u672c]dddLT"},lastDay:"[\u6628\u5929]LT",lastWeek:function(e){return this.week()!==e.week()?"[\u4e0a]dddLT":"[\u672c]dddLT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u5468)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"\u65e5";case"M":return e+"\u6708";case"w":case"W":return e+"\u5468";default:return e}},relativeTime:{future:"%s\u540e",past:"%s\u524d",s:"\u51e0\u79d2",ss:"%d \u79d2",m:"1 \u5206\u949f",mm:"%d \u5206\u949f",h:"1 \u5c0f\u65f6",hh:"%d \u5c0f\u65f6",d:"1 \u5929",dd:"%d \u5929",w:"1 \u5468",ww:"%d \u5468",M:"1 \u4e2a\u6708",MM:"%d \u4e2a\u6708",y:"1 \u5e74",yy:"%d \u5e74"},week:{dow:1,doy:4}})}(n("wd/R"))},XFyV:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i=n("oxzT"),r=n("8Y7J"),s=n("G0yt"),o=n("SVse");const a=function(e,t){return[e,t]},c=["*"];let l=(()=>{class e{constructor(){this.icons=i.a}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=r.Gb({type:e,selectors:[["cd-loading-panel"]],ngContentSelectors:c,decls:4,vars:5,consts:[["type","info",3,"dismissible"],["aria-hidden","true",1,"mr-2",3,"ngClass"]],template:function(e,t){1&e&&(r.oc(),r.Sb(0,"ngb-alert",0),r.Sb(1,"strong"),r.Nb(2,"i",1),r.Rb(),r.nc(3),r.Rb()),2&e&&(r.pc("dismissible",!1),r.yb(2),r.pc("ngClass",r.vc(2,a,t.icons.spinner,t.icons.spin)))},directives:[s.b,o.p],styles:[""]}),e})()},XGwC:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},XLvN:function(e,t,n){!function(e){"use strict";e.defineLocale("te",{months:"\u0c1c\u0c28\u0c35\u0c30\u0c3f_\u0c2b\u0c3f\u0c2c\u0c4d\u0c30\u0c35\u0c30\u0c3f_\u0c2e\u0c3e\u0c30\u0c4d\u0c1a\u0c3f_\u0c0f\u0c2a\u0c4d\u0c30\u0c3f\u0c32\u0c4d_\u0c2e\u0c47_\u0c1c\u0c42\u0c28\u0c4d_\u0c1c\u0c41\u0c32\u0c48_\u0c06\u0c17\u0c38\u0c4d\u0c1f\u0c41_\u0c38\u0c46\u0c2a\u0c4d\u0c1f\u0c46\u0c02\u0c2c\u0c30\u0c4d_\u0c05\u0c15\u0c4d\u0c1f\u0c4b\u0c2c\u0c30\u0c4d_\u0c28\u0c35\u0c02\u0c2c\u0c30\u0c4d_\u0c21\u0c3f\u0c38\u0c46\u0c02\u0c2c\u0c30\u0c4d".split("_"),monthsShort:"\u0c1c\u0c28._\u0c2b\u0c3f\u0c2c\u0c4d\u0c30._\u0c2e\u0c3e\u0c30\u0c4d\u0c1a\u0c3f_\u0c0f\u0c2a\u0c4d\u0c30\u0c3f._\u0c2e\u0c47_\u0c1c\u0c42\u0c28\u0c4d_\u0c1c\u0c41\u0c32\u0c48_\u0c06\u0c17._\u0c38\u0c46\u0c2a\u0c4d._\u0c05\u0c15\u0c4d\u0c1f\u0c4b._\u0c28\u0c35._\u0c21\u0c3f\u0c38\u0c46.".split("_"),monthsParseExact:!0,weekdays:"\u0c06\u0c26\u0c3f\u0c35\u0c3e\u0c30\u0c02_\u0c38\u0c4b\u0c2e\u0c35\u0c3e\u0c30\u0c02_\u0c2e\u0c02\u0c17\u0c33\u0c35\u0c3e\u0c30\u0c02_\u0c2c\u0c41\u0c27\u0c35\u0c3e\u0c30\u0c02_\u0c17\u0c41\u0c30\u0c41\u0c35\u0c3e\u0c30\u0c02_\u0c36\u0c41\u0c15\u0c4d\u0c30\u0c35\u0c3e\u0c30\u0c02_\u0c36\u0c28\u0c3f\u0c35\u0c3e\u0c30\u0c02".split("_"),weekdaysShort:"\u0c06\u0c26\u0c3f_\u0c38\u0c4b\u0c2e_\u0c2e\u0c02\u0c17\u0c33_\u0c2c\u0c41\u0c27_\u0c17\u0c41\u0c30\u0c41_\u0c36\u0c41\u0c15\u0c4d\u0c30_\u0c36\u0c28\u0c3f".split("_"),weekdaysMin:"\u0c06_\u0c38\u0c4b_\u0c2e\u0c02_\u0c2c\u0c41_\u0c17\u0c41_\u0c36\u0c41_\u0c36".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[\u0c28\u0c47\u0c21\u0c41] LT",nextDay:"[\u0c30\u0c47\u0c2a\u0c41] LT",nextWeek:"dddd, LT",lastDay:"[\u0c28\u0c3f\u0c28\u0c4d\u0c28] LT",lastWeek:"[\u0c17\u0c24] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0c32\u0c4b",past:"%s \u0c15\u0c4d\u0c30\u0c3f\u0c24\u0c02",s:"\u0c15\u0c4a\u0c28\u0c4d\u0c28\u0c3f \u0c15\u0c4d\u0c37\u0c23\u0c3e\u0c32\u0c41",ss:"%d \u0c38\u0c46\u0c15\u0c28\u0c4d\u0c32\u0c41",m:"\u0c12\u0c15 \u0c28\u0c3f\u0c2e\u0c3f\u0c37\u0c02",mm:"%d \u0c28\u0c3f\u0c2e\u0c3f\u0c37\u0c3e\u0c32\u0c41",h:"\u0c12\u0c15 \u0c17\u0c02\u0c1f",hh:"%d \u0c17\u0c02\u0c1f\u0c32\u0c41",d:"\u0c12\u0c15 \u0c30\u0c4b\u0c1c\u0c41",dd:"%d \u0c30\u0c4b\u0c1c\u0c41\u0c32\u0c41",M:"\u0c12\u0c15 \u0c28\u0c46\u0c32",MM:"%d \u0c28\u0c46\u0c32\u0c32\u0c41",y:"\u0c12\u0c15 \u0c38\u0c02\u0c35\u0c24\u0c4d\u0c38\u0c30\u0c02",yy:"%d \u0c38\u0c02\u0c35\u0c24\u0c4d\u0c38\u0c30\u0c3e\u0c32\u0c41"},dayOfMonthOrdinalParse:/\d{1,2}\u0c35/,ordinal:"%d\u0c35",meridiemParse:/\u0c30\u0c3e\u0c24\u0c4d\u0c30\u0c3f|\u0c09\u0c26\u0c2f\u0c02|\u0c2e\u0c27\u0c4d\u0c2f\u0c3e\u0c39\u0c4d\u0c28\u0c02|\u0c38\u0c3e\u0c2f\u0c02\u0c24\u0c4d\u0c30\u0c02/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u0c30\u0c3e\u0c24\u0c4d\u0c30\u0c3f"===t?e<4?e:e+12:"\u0c09\u0c26\u0c2f\u0c02"===t?e:"\u0c2e\u0c27\u0c4d\u0c2f\u0c3e\u0c39\u0c4d\u0c28\u0c02"===t?e>=10?e:e+12:"\u0c38\u0c3e\u0c2f\u0c02\u0c24\u0c4d\u0c30\u0c02"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"\u0c30\u0c3e\u0c24\u0c4d\u0c30\u0c3f":e<10?"\u0c09\u0c26\u0c2f\u0c02":e<17?"\u0c2e\u0c27\u0c4d\u0c2f\u0c3e\u0c39\u0c4d\u0c28\u0c02":e<20?"\u0c38\u0c3e\u0c2f\u0c02\u0c24\u0c4d\u0c30\u0c02":"\u0c30\u0c3e\u0c24\u0c4d\u0c30\u0c3f"},week:{dow:0,doy:6}})}(n("wd/R"))},XNiG:function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return u}));var i=n("HDdC"),r=n("7o/Q"),s=n("quSY"),o=n("9ppp"),a=n("Ylt2"),c=n("2QA8");class l extends r.a{constructor(e){super(e),this.destination=e}}let u=(()=>{class e extends i.a{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[c.a](){return new l(this)}lift(e){const t=new d(this,this);return t.operator=e,t}next(e){if(this.closed)throw new o.a;if(!this.isStopped){const{observers:t}=this,n=t.length,i=t.slice();for(let r=0;r<n;r++)i[r].next(e)}}error(e){if(this.closed)throw new o.a;this.hasError=!0,this.thrownError=e,this.isStopped=!0;const{observers:t}=this,n=t.length,i=t.slice();for(let r=0;r<n;r++)i[r].error(e);this.observers.length=0}complete(){if(this.closed)throw new o.a;this.isStopped=!0;const{observers:e}=this,t=e.length,n=e.slice();for(let i=0;i<t;i++)n[i].complete();this.observers.length=0}unsubscribe(){this.isStopped=!0,this.closed=!0,this.observers=null}_trySubscribe(e){if(this.closed)throw new o.a;return super._trySubscribe(e)}_subscribe(e){if(this.closed)throw new o.a;return this.hasError?(e.error(this.thrownError),s.a.EMPTY):this.isStopped?(e.complete(),s.a.EMPTY):(this.observers.push(e),new a.a(this,e))}asObservable(){const e=new i.a;return e.source=this,e}}return e.create=(e,t)=>new d(e,t),e})();class d extends u{constructor(e,t){super(),this.destination=e,this.source=t}next(e){const{destination:t}=this;t&&t.next&&t.next(e)}error(e){const{destination:t}=this;t&&t.error&&this.destination.error(e)}complete(){const{destination:e}=this;e&&e.complete&&this.destination.complete()}_subscribe(e){const{source:t}=this;return t?this.source.subscribe(e):s.a.EMPTY}}},XoHu:function(e,t,n){"use strict";function i(e){return null!==e&&"object"==typeof e}n.d(t,"a",(function(){return i}))},XqMk:function(e,t,n){"use strict";var i="object"==typeof global&&global&&global.Object===Object&&global;t.a=i},Y7HM:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("DH7j");function r(e){return!Object(i.a)(e)&&e-parseFloat(e)+1>=0}},Y7yP:function(e,t,n){"use strict";var i,r=n("vJtL"),s=n("Ju5/").a["__core-js_shared__"],o=(i=/[^.]+$/.exec(s&&s.keys&&s.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"",a=n("IzLi"),c=n("dLWn"),l=/^\[object .+?Constructor\]$/,u=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.a=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Object(a.a)(e)||(t=e,o&&o in t))&&(Object(r.a)(e)?u:l).test(Object(c.a)(e));var t}(n)?n:void 0}},YF1G:function(e,t,n){var i=n("xrYK"),r=n("2oRo");e.exports="process"==i(r.process)},YHEm:function(e,t,n){"use strict";t.a=function(e,t){return e===t||e!=e&&t!=t}},YM6B:function(e,t,n){"use strict";var i=n("Y7yP"),r=n("Ju5/"),s=Object(i.a)(r.a,"DataView"),o=n("3cmB"),a=Object(i.a)(r.a,"Promise"),c=Object(i.a)(r.a,"Set"),l=Object(i.a)(r.a,"WeakMap"),u=n("8M4i"),d=n("dLWn"),h="[object Map]",f="[object Promise]",p="[object Set]",m="[object WeakMap]",b="[object DataView]",g=Object(d.a)(s),_=Object(d.a)(o.a),y=Object(d.a)(a),v=Object(d.a)(c),w=Object(d.a)(l),S=u.a;(s&&S(new s(new ArrayBuffer(1)))!=b||o.a&&S(new o.a)!=h||a&&S(a.resolve())!=f||c&&S(new c)!=p||l&&S(new l)!=m)&&(S=function(e){var t=Object(u.a)(e),n="[object Object]"==t?e.constructor:void 0,i=n?Object(d.a)(n):"";if(i)switch(i){case g:return b;case _:return h;case y:return f;case v:return p;case w:return m}return t}),t.a=S},YNrV:function(e,t,n){"use strict";var i=n("g6v/"),r=n("0Dky"),s=n("33Wh"),o=n("dBg+"),a=n("0eef"),c=n("ewvW"),l=n("RK3t"),u=Object.assign,d=Object.defineProperty;e.exports=!u||r((function(){if(i&&1!==u({b:1},u(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=u({},e)[n]||s(u({},t)).join("")!=r}))?function(e,t){for(var n=c(e),r=arguments.length,u=1,d=o.f,h=a.f;r>u;)for(var f,p=l(arguments[u++]),m=d?s(p).concat(d(p)):s(p),b=m.length,g=0;b>g;)f=m[g++],i&&!h.call(p,f)||(n[f]=p[f]);return n}:u},YRex:function(e,t,n){!function(e){"use strict";e.defineLocale("ug-cn",{months:"\u064a\u0627\u0646\u06cb\u0627\u0631_\u0641\u06d0\u06cb\u0631\u0627\u0644_\u0645\u0627\u0631\u062a_\u0626\u0627\u067e\u0631\u06d0\u0644_\u0645\u0627\u064a_\u0626\u0649\u064a\u06c7\u0646_\u0626\u0649\u064a\u06c7\u0644_\u0626\u0627\u06cb\u063a\u06c7\u0633\u062a_\u0633\u06d0\u0646\u062a\u06d5\u0628\u0649\u0631_\u0626\u06c6\u0643\u062a\u06d5\u0628\u0649\u0631_\u0646\u0648\u064a\u0627\u0628\u0649\u0631_\u062f\u06d0\u0643\u0627\u0628\u0649\u0631".split("_"),monthsShort:"\u064a\u0627\u0646\u06cb\u0627\u0631_\u0641\u06d0\u06cb\u0631\u0627\u0644_\u0645\u0627\u0631\u062a_\u0626\u0627\u067e\u0631\u06d0\u0644_\u0645\u0627\u064a_\u0626\u0649\u064a\u06c7\u0646_\u0626\u0649\u064a\u06c7\u0644_\u0626\u0627\u06cb\u063a\u06c7\u0633\u062a_\u0633\u06d0\u0646\u062a\u06d5\u0628\u0649\u0631_\u0626\u06c6\u0643\u062a\u06d5\u0628\u0649\u0631_\u0646\u0648\u064a\u0627\u0628\u0649\u0631_\u062f\u06d0\u0643\u0627\u0628\u0649\u0631".split("_"),weekdays:"\u064a\u06d5\u0643\u0634\u06d5\u0646\u0628\u06d5_\u062f\u06c8\u0634\u06d5\u0646\u0628\u06d5_\u0633\u06d5\u064a\u0634\u06d5\u0646\u0628\u06d5_\u0686\u0627\u0631\u0634\u06d5\u0646\u0628\u06d5_\u067e\u06d5\u064a\u0634\u06d5\u0646\u0628\u06d5_\u062c\u06c8\u0645\u06d5_\u0634\u06d5\u0646\u0628\u06d5".split("_"),weekdaysShort:"\u064a\u06d5_\u062f\u06c8_\u0633\u06d5_\u0686\u0627_\u067e\u06d5_\u062c\u06c8_\u0634\u06d5".split("_"),weekdaysMin:"\u064a\u06d5_\u062f\u06c8_\u0633\u06d5_\u0686\u0627_\u067e\u06d5_\u062c\u06c8_\u0634\u06d5".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY-\u064a\u0649\u0644\u0649M-\u0626\u0627\u064a\u0646\u0649\u06adD-\u0643\u06c8\u0646\u0649",LLL:"YYYY-\u064a\u0649\u0644\u0649M-\u0626\u0627\u064a\u0646\u0649\u06adD-\u0643\u06c8\u0646\u0649\u060c HH:mm",LLLL:"dddd\u060c YYYY-\u064a\u0649\u0644\u0649M-\u0626\u0627\u064a\u0646\u0649\u06adD-\u0643\u06c8\u0646\u0649\u060c HH:mm"},meridiemParse:/\u064a\u06d0\u0631\u0649\u0645 \u0643\u06d0\u0686\u06d5|\u0633\u06d5\u06be\u06d5\u0631|\u0686\u06c8\u0634\u062a\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646|\u0686\u06c8\u0634|\u0686\u06c8\u0634\u062a\u0649\u0646 \u0643\u06d0\u064a\u0649\u0646|\u0643\u06d5\u0686/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u064a\u06d0\u0631\u0649\u0645 \u0643\u06d0\u0686\u06d5"===t||"\u0633\u06d5\u06be\u06d5\u0631"===t||"\u0686\u06c8\u0634\u062a\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646"===t?e:"\u0686\u06c8\u0634\u062a\u0649\u0646 \u0643\u06d0\u064a\u0649\u0646"===t||"\u0643\u06d5\u0686"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var i=100*e+t;return i<600?"\u064a\u06d0\u0631\u0649\u0645 \u0643\u06d0\u0686\u06d5":i<900?"\u0633\u06d5\u06be\u06d5\u0631":i<1130?"\u0686\u06c8\u0634\u062a\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646":i<1230?"\u0686\u06c8\u0634":i<1800?"\u0686\u06c8\u0634\u062a\u0649\u0646 \u0643\u06d0\u064a\u0649\u0646":"\u0643\u06d5\u0686"},calendar:{sameDay:"[\u0628\u06c8\u06af\u06c8\u0646 \u0633\u0627\u0626\u06d5\u062a] LT",nextDay:"[\u0626\u06d5\u062a\u06d5 \u0633\u0627\u0626\u06d5\u062a] LT",nextWeek:"[\u0643\u06d0\u0644\u06d5\u0631\u0643\u0649] dddd [\u0633\u0627\u0626\u06d5\u062a] LT",lastDay:"[\u062a\u06c6\u0646\u06c8\u06af\u06c8\u0646] LT",lastWeek:"[\u0626\u0627\u0644\u062f\u0649\u0646\u0642\u0649] dddd [\u0633\u0627\u0626\u06d5\u062a] LT",sameElse:"L"},relativeTime:{future:"%s \u0643\u06d0\u064a\u0649\u0646",past:"%s \u0628\u06c7\u0631\u06c7\u0646",s:"\u0646\u06d5\u0686\u0686\u06d5 \u0633\u06d0\u0643\u0648\u0646\u062a",ss:"%d \u0633\u06d0\u0643\u0648\u0646\u062a",m:"\u0628\u0649\u0631 \u0645\u0649\u0646\u06c7\u062a",mm:"%d \u0645\u0649\u0646\u06c7\u062a",h:"\u0628\u0649\u0631 \u0633\u0627\u0626\u06d5\u062a",hh:"%d \u0633\u0627\u0626\u06d5\u062a",d:"\u0628\u0649\u0631 \u0643\u06c8\u0646",dd:"%d \u0643\u06c8\u0646",M:"\u0628\u0649\u0631 \u0626\u0627\u064a",MM:"%d \u0626\u0627\u064a",y:"\u0628\u0649\u0631 \u064a\u0649\u0644",yy:"%d \u064a\u0649\u0644"},dayOfMonthOrdinalParse:/\d{1,2}(-\u0643\u06c8\u0646\u0649|-\u0626\u0627\u064a|-\u06be\u06d5\u067e\u062a\u06d5)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"-\u0643\u06c8\u0646\u0649";case"w":case"W":return e+"-\u06be\u06d5\u067e\u062a\u06d5";default:return e}},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"\u060c")},week:{dow:1,doy:7}})}(n("wd/R"))},Ylt2:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("quSY");class r extends i.a{constructor(e,t){super(),this.subject=e,this.subscriber=t,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const e=this.subject,t=e.observers;if(this.subject=null,!t||0===t.length||e.isStopped||e.closed)return;const n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}},YuTi:function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},Z21x:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n("8Y7J"),r=n("sne2"),s=n("SVse"),o=n("ANnk");let a=(()=>{class e{constructor(e,t){this.location=e,this.actionLabels=t,this.backAction=new i.o,this.name=this.actionLabels.CANCEL}back(){0===this.backAction.observers.length?this.location.back():this.backAction.emit()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(s.m),i.Mb(r.b))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-back-button"]],inputs:{name:"name"},outputs:{backAction:"backAction"},decls:2,vars:1,consts:[["type","button",1,"btn","btn-light","tc_backButton",3,"click"]],template:function(e,t){1&e&&(i.Sb(0,"button",0),i.gc("click",(function(){return t.back()})),i.Oc(1),i.Rb()),2&e&&(i.yb(1),i.Qc(" ",t.name,"\n"))},directives:[o.a],styles:[""]}),e})()},Z4QM:function(e,t,n){!function(e){"use strict";var t=["\u062c\u0646\u0648\u0631\u064a","\u0641\u064a\u0628\u0631\u0648\u0631\u064a","\u0645\u0627\u0631\u0686","\u0627\u067e\u0631\u064a\u0644","\u0645\u0626\u064a","\u062c\u0648\u0646","\u062c\u0648\u0644\u0627\u0621\u0650","\u0622\u06af\u0633\u067d","\u0633\u064a\u067e\u067d\u0645\u0628\u0631","\u0622\u06aa\u067d\u0648\u0628\u0631","\u0646\u0648\u0645\u0628\u0631","\u068a\u0633\u0645\u0628\u0631"],n=["\u0622\u0686\u0631","\u0633\u0648\u0645\u0631","\u0627\u06b1\u0627\u0631\u0648","\u0627\u0631\u0628\u0639","\u062e\u0645\u064a\u0633","\u062c\u0645\u0639","\u0687\u0646\u0687\u0631"];e.defineLocale("sd",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd\u060c D MMMM YYYY HH:mm"},meridiemParse:/\u0635\u0628\u062d|\u0634\u0627\u0645/,isPM:function(e){return"\u0634\u0627\u0645"===e},meridiem:function(e,t,n){return e<12?"\u0635\u0628\u062d":"\u0634\u0627\u0645"},calendar:{sameDay:"[\u0627\u0684] LT",nextDay:"[\u0633\u0680\u0627\u06bb\u064a] LT",nextWeek:"dddd [\u0627\u06b3\u064a\u0646 \u0647\u0641\u062a\u064a \u062a\u064a] LT",lastDay:"[\u06aa\u0627\u0644\u0647\u0647] LT",lastWeek:"[\u06af\u0632\u0631\u064a\u0644 \u0647\u0641\u062a\u064a] dddd [\u062a\u064a] LT",sameElse:"L"},relativeTime:{future:"%s \u067e\u0648\u0621",past:"%s \u0627\u06b3",s:"\u0686\u0646\u062f \u0633\u064a\u06aa\u0646\u068a",ss:"%d \u0633\u064a\u06aa\u0646\u068a",m:"\u0647\u06aa \u0645\u0646\u067d",mm:"%d \u0645\u0646\u067d",h:"\u0647\u06aa \u06aa\u0644\u0627\u06aa",hh:"%d \u06aa\u0644\u0627\u06aa",d:"\u0647\u06aa \u068f\u064a\u0646\u0647\u0646",dd:"%d \u068f\u064a\u0646\u0647\u0646",M:"\u0647\u06aa \u0645\u0647\u064a\u0646\u0648",MM:"%d \u0645\u0647\u064a\u0646\u0627",y:"\u0647\u06aa \u0633\u0627\u0644",yy:"%d \u0633\u0627\u0644"},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"\u060c")},week:{dow:1,doy:4}})}(n("wd/R"))},ZAMP:function(e,t,n){!function(e){"use strict";e.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(n("wd/R"))},ZUHj:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n("7o/Q");class r extends i.a{constructor(e,t,n){super(),this.parent=e,this.outerValue=t,this.outerIndex=n,this.index=0}_next(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)}_error(e){this.parent.notifyError(e,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}var s=n("SeVD"),o=n("HDdC");function a(e,t,n,i,a=new r(e,n,i)){if(!a.closed)return t instanceof o.a?t.subscribe(a):Object(s.a)(t)(a)}},ZUd8:function(e,t,n){var i=n("ppGB"),r=n("HYAF"),s=function(e){return function(t,n){var s,o,a=String(r(t)),c=i(n),l=a.length;return c<0||c>=l?e?"":void 0:(s=a.charCodeAt(c))<55296||s>56319||c+1===l||(o=a.charCodeAt(c+1))<56320||o>57343?e?a.charAt(c):s:e?a.slice(c,c+2):o-56320+(s-55296<<10)+65536}};e.exports={codeAt:s(!1),charAt:s(!0)}},Zduo:function(e,t,n){!function(e){"use strict";e.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_a\u016dgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mart_apr_maj_jun_jul_a\u016dg_sept_okt_nov_dec".split("_"),weekdays:"diman\u0109o_lundo_mardo_merkredo_\u0135a\u016ddo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_\u0135a\u016d_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_\u0135a_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"[la] D[-an de] MMMM, YYYY",LLL:"[la] D[-an de] MMMM, YYYY HH:mm",LLLL:"dddd[n], [la] D[-an de] MMMM, YYYY HH:mm",llll:"ddd, [la] D[-an de] MMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return"p"===e.charAt(0).toLowerCase()},meridiem:function(e,t,n){return e>11?n?"p.t.m.":"P.T.M.":n?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodia\u016d je] LT",nextDay:"[Morga\u016d je] LT",nextWeek:"dddd[n je] LT",lastDay:"[Hiera\u016d je] LT",lastWeek:"[pasintan] dddd[n je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"anta\u016d %s",s:"kelkaj sekundoj",ss:"%d sekundoj",m:"unu minuto",mm:"%d minutoj",h:"unu horo",hh:"%d horoj",d:"unu tago",dd:"%d tagoj",M:"unu monato",MM:"%d monatoj",y:"unu jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}})}(n("wd/R"))},ZfDv:function(e,t,n){var i=n("hh1v"),r=n("6LWA"),s=n("tiKp")("species");e.exports=function(e,t){var n;return r(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!r(n.prototype)?i(n)&&null===(n=n[s])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},a0VL:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("8Y7J"),r=n("SVse");let s=(()=>{class e{constructor(e){this.datePipe=e}transform(e){return null===e||""===e?"":this.datePipe.transform(e,"shortDate")+" "+this.datePipe.transform(e,"mediumTime")}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(r.e))},e.\u0275pipe=i.Lb({name:"cdDate",type:e,pure:!0}),e})()},a96k:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));class i{constructor(e,t,n,i=!0){this.selected=e,this.name=t,this.description=n,this.enabled=i}}},aGrj:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("eIep");function r(e,t){return t?Object(i.a)(()=>e,t):Object(i.a)(()=>e)}},aIdf:function(e,t,n){!function(e){"use strict";function t(e,t,n){return e+" "+function(e,t){return 2===t?function(e){var t={m:"v",b:"v",d:"z"};return void 0===t[e.charAt(0)]?e:t[e.charAt(0)]+e.substring(1)}(e):e}({mm:"munutenn",MM:"miz",dd:"devezh"}[n],e)}var n=[/^gen/i,/^c[\u02bc\']hwe/i,/^meu/i,/^ebr/i,/^mae/i,/^(mez|eve)/i,/^gou/i,/^eos/i,/^gwe/i,/^her/i,/^du/i,/^ker/i],i=/^(genver|c[\u02bc\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[\u02bc\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,r=[/^Su/i,/^Lu/i,/^Me([^r]|$)/i,/^Mer/i,/^Ya/i,/^Gw/i,/^Sa/i];e.defineLocale("br",{months:"Genver_C\u02bchwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C\u02bchwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc\u02bcher_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParse:r,fullWeekdaysParse:[/^sul/i,/^lun/i,/^meurzh/i,/^merc[\u02bc\']her/i,/^yaou/i,/^gwener/i,/^sadorn/i],shortWeekdaysParse:[/^Sul/i,/^Lun/i,/^Meu/i,/^Mer/i,/^Yao/i,/^Gwe/i,/^Sad/i],minWeekdaysParse:r,monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(genver|c[\u02bc\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,monthsShortStrictRegex:/^(gen|c[\u02bc\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY HH:mm",LLLL:"dddd, D [a viz] MMMM YYYY HH:mm"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc\u02bchoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec\u02bch da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s \u02bczo",s:"un nebeud segondenno\xf9",ss:"%d eilenn",m:"ur vunutenn",mm:t,h:"un eur",hh:"%d eur",d:"un devezh",dd:t,M:"ur miz",MM:t,y:"ur bloaz",yy:function(e){switch(function e(t){return t>9?e(t%10):t}(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}},dayOfMonthOrdinalParse:/\d{1,2}(a\xf1|vet)/,ordinal:function(e){return e+(1===e?"a\xf1":"vet")},week:{dow:1,doy:4},meridiemParse:/a.m.|g.m./,isPM:function(e){return"g.m."===e},meridiem:function(e,t,n){return e<12?"a.m.":"g.m."}})}(n("wd/R"))},aIsn:function(e,t,n){!function(e){"use strict";e.defineLocale("mi",{months:"Kohi-t\u0101te_Hui-tanguru_Pout\u016b-te-rangi_Paenga-wh\u0101wh\u0101_Haratua_Pipiri_H\u014dngoingoi_Here-turi-k\u014dk\u0101_Mahuru_Whiringa-\u0101-nuku_Whiringa-\u0101-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_H\u014dngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"R\u0101tapu_Mane_T\u016brei_Wenerei_T\u0101ite_Paraire_H\u0101tarei".split("_"),weekdaysShort:"Ta_Ma_T\u016b_We_T\u0101i_Pa_H\u0101".split("_"),weekdaysMin:"Ta_Ma_T\u016b_We_T\u0101i_Pa_H\u0101".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te h\u0113kona ruarua",ss:"%d h\u0113kona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}})}(n("wd/R"))},aQkU:function(e,t,n){!function(e){"use strict";e.defineLocale("mk",{months:"\u0458\u0430\u043d\u0443\u0430\u0440\u0438_\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0438\u043b_\u043c\u0430\u0458_\u0458\u0443\u043d\u0438_\u0458\u0443\u043b\u0438_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438_\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438_\u043d\u043e\u0435\u043c\u0432\u0440\u0438_\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438".split("_"),monthsShort:"\u0458\u0430\u043d_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0458_\u0458\u0443\u043d_\u0458\u0443\u043b_\u0430\u0432\u0433_\u0441\u0435\u043f_\u043e\u043a\u0442_\u043d\u043e\u0435_\u0434\u0435\u043a".split("_"),weekdays:"\u043d\u0435\u0434\u0435\u043b\u0430_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0440\u0442\u043e\u043a_\u043f\u0435\u0442\u043e\u043a_\u0441\u0430\u0431\u043e\u0442\u0430".split("_"),weekdaysShort:"\u043d\u0435\u0434_\u043f\u043e\u043d_\u0432\u0442\u043e_\u0441\u0440\u0435_\u0447\u0435\u0442_\u043f\u0435\u0442_\u0441\u0430\u0431".split("_"),weekdaysMin:"\u043de_\u043fo_\u0432\u0442_\u0441\u0440_\u0447\u0435_\u043f\u0435_\u0441a".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[\u0414\u0435\u043d\u0435\u0441 \u0432\u043e] LT",nextDay:"[\u0423\u0442\u0440\u0435 \u0432\u043e] LT",nextWeek:"[\u0412\u043e] dddd [\u0432\u043e] LT",lastDay:"[\u0412\u0447\u0435\u0440\u0430 \u0432\u043e] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[\u0418\u0437\u043c\u0438\u043d\u0430\u0442\u0430\u0442\u0430] dddd [\u0432\u043e] LT";case 1:case 2:case 4:case 5:return"[\u0418\u0437\u043c\u0438\u043d\u0430\u0442\u0438\u043e\u0442] dddd [\u0432\u043e] LT"}},sameElse:"L"},relativeTime:{future:"\u0437\u0430 %s",past:"\u043f\u0440\u0435\u0434 %s",s:"\u043d\u0435\u043a\u043e\u043b\u043a\u0443 \u0441\u0435\u043a\u0443\u043d\u0434\u0438",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434\u0438",m:"\u0435\u0434\u043d\u0430 \u043c\u0438\u043d\u0443\u0442\u0430",mm:"%d \u043c\u0438\u043d\u0443\u0442\u0438",h:"\u0435\u0434\u0435\u043d \u0447\u0430\u0441",hh:"%d \u0447\u0430\u0441\u0430",d:"\u0435\u0434\u0435\u043d \u0434\u0435\u043d",dd:"%d \u0434\u0435\u043d\u0430",M:"\u0435\u0434\u0435\u043d \u043c\u0435\u0441\u0435\u0446",MM:"%d \u043c\u0435\u0441\u0435\u0446\u0438",y:"\u0435\u0434\u043d\u0430 \u0433\u043e\u0434\u0438\u043d\u0430",yy:"%d \u0433\u043e\u0434\u0438\u043d\u0438"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0435\u0432|\u0435\u043d|\u0442\u0438|\u0432\u0438|\u0440\u0438|\u043c\u0438)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-\u0435\u0432":0===n?e+"-\u0435\u043d":n>10&&n<20?e+"-\u0442\u0438":1===t?e+"-\u0432\u0438":2===t?e+"-\u0440\u0438":7===t||8===t?e+"-\u043c\u0438":e+"-\u0442\u0438"},week:{dow:1,doy:7}})}(n("wd/R"))},aXbf:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("LvDl"),r=n.n(i),s=n("8Y7J");let o=(()=>{class e{format_number(e,t,n,i=1){if(r.a.isString(e)&&(e=Number(e)),!r.a.isNumber(e))return"-";let s=e<1?0:Math.floor(Math.log(e)/Math.log(t));s=s>=n.length?n.length-1:s;let o=r.a.round(e/Math.pow(t,s),i).toString();return""===o?"-":(""!==n[s]&&(o=`${o} ${n[s]}`),o)}toBytes(e,t=null){const n=["b","k","m","g","t","p","e","z","y"],i=RegExp("^(\\d+(.\\d+)?) ?(["+n.join("")+"]?(b|ib|B/s)?)?$","i").exec(e);if(null===i)return t;let s=parseFloat(i[1]);return r.a.isString(i[3])&&(s*=Math.pow(1024,n.indexOf(i[3].toLowerCase()[0]))),Math.round(s)}toMilliseconds(e){const t=/^\s*(\d+)\s*(ms)?\s*$/i.exec(e);return null!==t?+t[1]:0}toIops(e){const t=/^\s*(\d+)\s*(IOPS)?\s*$/i.exec(e);return null!==t?+t[1]:0}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=s.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},aexS:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("2Vo4"),r=n("jKX/"),s=n("8Y7J");let o=(()=>{class e{constructor(){this.isPwdDisplayedSource=new i.a(!1),this.isPwdDisplayed$=this.isPwdDisplayedSource.asObservable()}set(e,t={},n=!1,i=null,s=!1){localStorage.setItem("dashboard_username",e),localStorage.setItem("dashboard_permissions",JSON.stringify(new r.a(t))),localStorage.setItem("user_pwd_expiration_date",String(i)),localStorage.setItem("user_pwd_update_required",String(s)),localStorage.setItem("sso",String(n))}remove(){localStorage.removeItem("dashboard_username"),localStorage.removeItem("user_pwd_expiration_data"),localStorage.removeItem("user_pwd_update_required")}isLoggedIn(){return null!==localStorage.getItem("dashboard_username")}getUsername(){return localStorage.getItem("dashboard_username")}getPermissions(){return JSON.parse(localStorage.getItem("dashboard_permissions")||JSON.stringify(new r.a({})))}getPwdExpirationDate(){return Number(localStorage.getItem("user_pwd_expiration_date"))}getPwdUpdateRequired(){return"true"===localStorage.getItem("user_pwd_update_required")}isSSO(){return"true"===localStorage.getItem("sso")}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=s.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},afO8:function(e,t,n){var i,r,s,o=n("f5p1"),a=n("2oRo"),c=n("hh1v"),l=n("kRJp"),u=n("UTVS"),d=n("xs3f"),h=n("93I0"),f=n("0BK2"),p="Object already initialized";if(o||d.state){var m=d.state||(d.state=new(0,a.WeakMap)),b=m.get,g=m.has,_=m.set;i=function(e,t){if(g.call(m,e))throw new TypeError(p);return t.facade=e,_.call(m,e,t),t},r=function(e){return b.call(m,e)||{}},s=function(e){return g.call(m,e)}}else{var y=h("state");f[y]=!0,i=function(e,t){if(u(e,y))throw new TypeError(p);return t.facade=e,l(e,y,t),t},r=function(e){return u(e,y)?e[y]:{}},s=function(e){return u(e,y)}}e.exports={set:i,get:r,has:s,enforce:function(e){return s(e)?r(e):i(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=r(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},ajRT:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n("8Y7J"),r=n("ANnk");const s=[[["",8,"modal-title"]],[["",8,"modal-content"]]],o=[".modal-title",".modal-content"];let a=(()=>{class e{constructor(){this.hide=new i.o}close(){var e;null===(e=this.modalRef)||void 0===e||e.close(),this.hide.emit()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-modal"]],inputs:{modalRef:"modalRef"},outputs:{hide:"hide"},ngContentSelectors:o,decls:7,vars:0,consts:[[1,"modal-header"],[1,"modal-title","float-left"],["type","button","aria-label","Close",1,"close","float-right",3,"click"],["aria-hidden","true"]],template:function(e,t){1&e&&(i.oc(s),i.Sb(0,"div",0),i.Sb(1,"h4",1),i.nc(2),i.Rb(),i.Sb(3,"button",2),i.gc("click",(function(){return t.close()})),i.Sb(4,"span",3),i.Oc(5,"\xd7"),i.Rb(),i.Rb(),i.Rb(),i.nc(6,1))},directives:[r.a],styles:[".modal-header[_ngcontent-%COMP%]{border-radius:5px 5px 0 0}.modal-header[_ngcontent-%COMP%], cd-modal .modal-footer{background-color:#e9ecef;border-bottom:1px solid #ced4da} cd-modal .modal-footer{border-radius:0 0 5px 5px} cd-modal .modal-body{max-height:70vh;overflow-x:hidden;overflow-y:auto}button.close[_ngcontent-%COMP%]{outline:none}"]}),e})()},b1Dy:function(e,t,n){!function(e){"use strict";e.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n("wd/R"))},b5OY:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var i=n("mrSG"),r=n("IheW"),s=n("LRne"),o=n("5+tZ"),a=n("xTzq"),c=n("8Y7J");let l=(()=>{let e=class{constructor(e){this.http=e,this.url="api/perf_counters"}list(){return this.http.get(this.url)}get(e,t){return this.http.get(`${this.url}/${e}/${t}`).pipe(Object(o.a)(e=>Object(s.a)(e.counters)))}};return e.\u0275fac=function(t){return new(t||e)(c.dc(r.b))},e.\u0275prov=c.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e=Object(i.b)([a.a,Object(i.d)("design:paramtypes",[r.b])],e),e})();var u=n("SVse"),d=n("uIqm"),h=n("/NlG"),f=n("o4+5");const p=["valueTpl"];function m(e,t){if(1&e&&(c.Oc(0),c.jc(1,"dimless")),2&e){const e=t.row;c.Rc(" ",c.kc(1,2,e.value)," ",e.unit," ")}}function b(e,t){if(1&e){const e=c.Tb();c.Sb(0,"cd-table",2),c.gc("fetchData",(function(t){return c.Dc(e),c.ic().getCounters(t)})),c.Mc(1,m,2,4,"ng-template",null,3,c.Nc),c.Rb()}if(2&e){const e=c.ic();c.pc("data",e.counters)("columns",e.columns)("autoSave",!1)}}function g(e,t){1&e&&(c.Sb(0,"cd-alert-panel",4),c.Wb(1,5),c.Rb())}let _=(()=>{class e{constructor(e){this.performanceCounterService=e,this.columns=[],this.counters=[]}ngOnInit(){this.columns=[{name:"Name",prop:"name",flexGrow:1},{name:"Description",prop:"description",flexGrow:1},{name:"Value",prop:"value",cellTemplate:this.valueTpl,flexGrow:1}]}getCounters(e){this.performanceCounterService.get(this.serviceType,this.serviceId).subscribe(e=>{this.counters=e},t=>{404===t.status?(t.preventDefault(),this.counters=null):e.error()})}}return e.\u0275fac=function(t){return new(t||e)(c.Mb(l))},e.\u0275cmp=c.Gb({type:e,selectors:[["cd-table-performance-counter"]],viewQuery:function(e,t){var n;1&e&&c.Tc(p,!0),2&e&&c.zc(n=c.hc())&&(t.valueTpl=n.first)},inputs:{serviceType:"serviceType",serviceId:"serviceId"},decls:3,vars:2,consts:function(){return[["columnMode","flex",3,"data","columns","autoSave","fetchData",4,"ngIf","ngIfElse"],["warning",""],["columnMode","flex",3,"data","columns","autoSave","fetchData"],["valueTpl",""],["type","warning"],"Performance counters not available"]},template:function(e,t){if(1&e&&(c.Mc(0,b,3,3,"cd-table",0),c.Mc(1,g,2,0,"ng-template",null,1,c.Nc)),2&e){const e=c.Ac(2);c.pc("ngIf",t.counters)("ngIfElse",e)}},directives:[u.r,d.a,h.a],pipes:[f.a],styles:[""]}),e})()},bHdf:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("5+tZ"),r=n("SpAZ");function s(e=Number.POSITIVE_INFINITY){return Object(i.a)(r.a,e)}},bOMt:function(e,t,n){!function(e){"use strict";e.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"s\xf8ndag_mandag_tirsdag_onsdag_torsdag_fredag_l\xf8rdag".split("_"),weekdaysShort:"s\xf8._ma._ti._on._to._fr._l\xf8.".split("_"),weekdaysMin:"s\xf8_ma_ti_on_to_fr_l\xf8".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i g\xe5r kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",w:"en uke",ww:"%d uker",M:"en m\xe5ned",MM:"%d m\xe5neder",y:"ett \xe5r",yy:"%d \xe5r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},bOdf:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("5+tZ");function r(e,t){return Object(i.a)(e,t,1)}},bWFh:function(e,t,n){"use strict";var i=n("I+eb"),r=n("2oRo"),s=n("lMq5"),o=n("busE"),a=n("8YOa"),c=n("ImZN"),l=n("GarU"),u=n("hh1v"),d=n("0Dky"),h=n("HH4o"),f=n("1E5z"),p=n("cVYH");e.exports=function(e,t,n){var m=-1!==e.indexOf("Map"),b=-1!==e.indexOf("Weak"),g=m?"set":"add",_=r[e],y=_&&_.prototype,v=_,w={},S=function(e){var t=y[e];o(y,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(b&&!u(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return b&&!u(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(b&&!u(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(s(e,"function"!=typeof _||!(b||y.forEach&&!d((function(){(new _).entries().next()})))))v=n.getConstructor(t,e,m,g),a.REQUIRED=!0;else if(s(e,!0)){var M=new v,x=M[g](b?{}:-0,1)!=M,k=d((function(){M.has(1)})),D=h((function(e){new _(e)})),T=!b&&d((function(){for(var e=new _,t=5;t--;)e[g](t,t);return!e.has(-0)}));D||((v=t((function(t,n){l(t,v,e);var i=p(new _,t,v);return null!=n&&c(n,i[g],{that:i,AS_ENTRIES:m}),i}))).prototype=y,y.constructor=v),(k||T)&&(S("delete"),S("has"),m&&S("get")),(T||x)&&S(g),b&&y.clear&&delete y.clear}return w[e]=v,i({global:!0,forced:v!=_},w),f(v,e),b||n.setStrong(v,e,m),v}},bXm7:function(e,t,n){!function(e){"use strict";var t={0:"-\u0448\u0456",1:"-\u0448\u0456",2:"-\u0448\u0456",3:"-\u0448\u0456",4:"-\u0448\u0456",5:"-\u0448\u0456",6:"-\u0448\u044b",7:"-\u0448\u0456",8:"-\u0448\u0456",9:"-\u0448\u044b",10:"-\u0448\u044b",20:"-\u0448\u044b",30:"-\u0448\u044b",40:"-\u0448\u044b",50:"-\u0448\u0456",60:"-\u0448\u044b",70:"-\u0448\u0456",80:"-\u0448\u0456",90:"-\u0448\u044b",100:"-\u0448\u0456"};e.defineLocale("kk",{months:"\u049b\u0430\u04a3\u0442\u0430\u0440_\u0430\u049b\u043f\u0430\u043d_\u043d\u0430\u0443\u0440\u044b\u0437_\u0441\u04d9\u0443\u0456\u0440_\u043c\u0430\u043c\u044b\u0440_\u043c\u0430\u0443\u0441\u044b\u043c_\u0448\u0456\u043b\u0434\u0435_\u0442\u0430\u043c\u044b\u0437_\u049b\u044b\u0440\u043a\u04af\u0439\u0435\u043a_\u049b\u0430\u0437\u0430\u043d_\u049b\u0430\u0440\u0430\u0448\u0430_\u0436\u0435\u043b\u0442\u043e\u049b\u0441\u0430\u043d".split("_"),monthsShort:"\u049b\u0430\u04a3_\u0430\u049b\u043f_\u043d\u0430\u0443_\u0441\u04d9\u0443_\u043c\u0430\u043c_\u043c\u0430\u0443_\u0448\u0456\u043b_\u0442\u0430\u043c_\u049b\u044b\u0440_\u049b\u0430\u0437_\u049b\u0430\u0440_\u0436\u0435\u043b".split("_"),weekdays:"\u0436\u0435\u043a\u0441\u0435\u043d\u0431\u0456_\u0434\u04af\u0439\u0441\u0435\u043d\u0431\u0456_\u0441\u0435\u0439\u0441\u0435\u043d\u0431\u0456_\u0441\u04d9\u0440\u0441\u0435\u043d\u0431\u0456_\u0431\u0435\u0439\u0441\u0435\u043d\u0431\u0456_\u0436\u04b1\u043c\u0430_\u0441\u0435\u043d\u0431\u0456".split("_"),weekdaysShort:"\u0436\u0435\u043a_\u0434\u04af\u0439_\u0441\u0435\u0439_\u0441\u04d9\u0440_\u0431\u0435\u0439_\u0436\u04b1\u043c_\u0441\u0435\u043d".split("_"),weekdaysMin:"\u0436\u043a_\u0434\u0439_\u0441\u0439_\u0441\u0440_\u0431\u0439_\u0436\u043c_\u0441\u043d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0411\u04af\u0433\u0456\u043d \u0441\u0430\u0493\u0430\u0442] LT",nextDay:"[\u0415\u0440\u0442\u0435\u04a3 \u0441\u0430\u0493\u0430\u0442] LT",nextWeek:"dddd [\u0441\u0430\u0493\u0430\u0442] LT",lastDay:"[\u041a\u0435\u0448\u0435 \u0441\u0430\u0493\u0430\u0442] LT",lastWeek:"[\u04e8\u0442\u043a\u0435\u043d \u0430\u043f\u0442\u0430\u043d\u044b\u04a3] dddd [\u0441\u0430\u0493\u0430\u0442] LT",sameElse:"L"},relativeTime:{future:"%s \u0456\u0448\u0456\u043d\u0434\u0435",past:"%s \u0431\u04b1\u0440\u044b\u043d",s:"\u0431\u0456\u0440\u043d\u0435\u0448\u0435 \u0441\u0435\u043a\u0443\u043d\u0434",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434",m:"\u0431\u0456\u0440 \u043c\u0438\u043d\u0443\u0442",mm:"%d \u043c\u0438\u043d\u0443\u0442",h:"\u0431\u0456\u0440 \u0441\u0430\u0493\u0430\u0442",hh:"%d \u0441\u0430\u0493\u0430\u0442",d:"\u0431\u0456\u0440 \u043a\u04af\u043d",dd:"%d \u043a\u04af\u043d",M:"\u0431\u0456\u0440 \u0430\u0439",MM:"%d \u0430\u0439",y:"\u0431\u0456\u0440 \u0436\u044b\u043b",yy:"%d \u0436\u044b\u043b"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0448\u0456|\u0448\u044b)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n("wd/R"))},bYM6:function(e,t,n){!function(e){"use strict";e.defineLocale("ar-tn",{months:"\u062c\u0627\u0646\u0641\u064a_\u0641\u064a\u0641\u0631\u064a_\u0645\u0627\u0631\u0633_\u0623\u0641\u0631\u064a\u0644_\u0645\u0627\u064a_\u062c\u0648\u0627\u0646_\u062c\u0648\u064a\u0644\u064a\u0629_\u0623\u0648\u062a_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),monthsShort:"\u062c\u0627\u0646\u0641\u064a_\u0641\u064a\u0641\u0631\u064a_\u0645\u0627\u0631\u0633_\u0623\u0641\u0631\u064a\u0644_\u0645\u0627\u064a_\u062c\u0648\u0627\u0646_\u062c\u0648\u064a\u0644\u064a\u0629_\u0623\u0648\u062a_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:1,doy:4}})}(n("wd/R"))},bpih:function(e,t,n){!function(e){"use strict";e.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_luned\xec_marted\xec_mercoled\xec_gioved\xec_venerd\xec_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:function(){return"[Oggi a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextDay:function(){return"[Domani a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextWeek:function(){return"dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastDay:function(){return"[Ieri a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastWeek:function(){switch(this.day()){case 0:return"[La scorsa] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT";default:return"[Lo scorso] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"}},sameElse:"L"},relativeTime:{future:"tra %s",past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",w:"una settimana",ww:"%d settimane",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}})}(n("wd/R"))},busE:function(e,t,n){var i=n("2oRo"),r=n("kRJp"),s=n("UTVS"),o=n("zk60"),a=n("iSVu"),c=n("afO8"),l=c.get,u=c.enforce,d=String(String).split("String");(e.exports=function(e,t,n,a){var c,l=!!a&&!!a.unsafe,h=!!a&&!!a.enumerable,f=!!a&&!!a.noTargetGet;"function"==typeof n&&("string"!=typeof t||s(n,"name")||r(n,"name",t),(c=u(n)).source||(c.source=d.join("string"==typeof t?t:""))),e!==i?(l?!f&&e[t]&&(h=!0):delete e[t],h?e[t]=n:r(e,t,n)):h?e[t]=n:o(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&l(this).source||a(this)}))},bxKX:function(e,t,n){!function(e){"use strict";e.defineLocale("it-ch",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_luned\xec_marted\xec_mercoled\xec_gioved\xec_venerd\xec_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}})}(n("wd/R"))},c2HN:function(e,t,n){"use strict";function i(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}n.d(t,"a",(function(){return i}))},cEzo:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var i=n("e0ae"),r=n("oxzT"),s=n("8Y7J"),o=n("EApP"),a=n("ANnk"),c=n("SVse");const l=function(e){return[e]};let u=(()=>{class e{constructor(e){this.toastr=e,this.byId=!0,this.icons=r.a}getText(){return document.getElementById(this.source).value}onClick(){try{const e=Object(i.a)(),t=this.byId?this.getText():this.source,n=()=>{this.toastr.success("Copied text to the clipboard successfully.")};["firefox","ie","ios","safari"].includes(e.name)?navigator.clipboard.writeText(t).then(()=>n()):navigator.permissions.query({name:"clipboard-write"}).then(e=>{"granted"!==e.state&&"prompt"!==e.state||navigator.clipboard.writeText(t).then(()=>n())})}catch(e){this.toastr.error("Failed to copy text to the clipboard.")}}}return e.\u0275fac=function(t){return new(t||e)(s.Mb(o.b))},e.\u0275cmp=s.Gb({type:e,selectors:[["cd-copy-2-clipboard-button"]],hostBindings:function(e,t){1&e&&s.gc("click",(function(){return t.onClick()}))},inputs:{source:"source",byId:"byId"},decls:3,vars:3,consts:function(){return[["type","button",1,"btn","btn-light",3,"click",6,"title"],["title","Copy to Clipboard"],[3,"ngClass"]]},template:function(e,t){1&e&&(s.Sb(0,"button",0),s.Yb(1,1),s.gc("click",(function(){return t.onClick()})),s.Nb(2,"i",2),s.Rb()),2&e&&(s.yb(2),s.pc("ngClass",s.uc(1,l,t.icons.clipboard)))},directives:[a.a,c.p],styles:[""]}),e})()},cRix:function(e,t,n){!function(e){"use strict";var t="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),n="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_");e.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,i){return e?/-MMM-/.test(i)?n[e.month()]:t[e.month()]:t},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[\xf4fr\xfbne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien min\xfat",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n("wd/R"))},cSlR:function(e,t,n){"use strict";var i=/^(?:0|[1-9]\d*)$/;t.a=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&i.test(e))&&e>-1&&e%1==0&&e<t}},cUpR:function(e,t,n){"use strict";n.d(t,"a",(function(){return N})),n.d(t,"b",(function(){return R})),n.d(t,"c",(function(){return $})),n.d(t,"d",(function(){return P})),n.d(t,"e",(function(){return w}));var i=n("SVse"),r=n("8Y7J");class s extends i.J{constructor(){super()}supportsDOMEvents(){return!0}}class o extends s{static makeCurrent(){Object(i.N)(new o)}getProperty(e,t){return e[t]}log(e){window.console&&window.console.log&&window.console.log(e)}logGroup(e){window.console&&window.console.group&&window.console.group(e)}logGroupEnd(){window.console&&window.console.groupEnd&&window.console.groupEnd()}onAndCancel(e,t,n){return e.addEventListener(t,n,!1),()=>{e.removeEventListener(t,n,!1)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){return e.parentNode&&e.parentNode.removeChild(e),e}getValue(e){return e.value}createElement(e,t){return(t=t||this.getDefaultDocument()).createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,t){return"window"===t?window:"document"===t?e:"body"===t?e.body:null}getHistory(){return window.history}getLocation(){return window.location}getBaseHref(e){const t=c||(c=document.querySelector("base"),c)?c.getAttribute("href"):null;return null==t?null:(n=t,a||(a=document.createElement("a")),a.setAttribute("href",n),"/"===a.pathname.charAt(0)?a.pathname:"/"+a.pathname);var n}resetBaseElement(){c=null}getUserAgent(){return window.navigator.userAgent}performanceNow(){return window.performance&&window.performance.now?window.performance.now():(new Date).getTime()}supportsCookies(){return!0}getCookie(e){return Object(i.M)(document.cookie,e)}}let a,c=null;const l=new r.r("TRANSITION_ID"),u=[{provide:r.d,useFactory:function(e,t,n){return()=>{n.get(r.e).donePromise.then(()=>{const n=Object(i.L)();Array.prototype.slice.apply(t.querySelectorAll("style[ng-transition]")).filter(t=>t.getAttribute("ng-transition")===e).forEach(e=>n.remove(e))})}},deps:[l,i.d,r.s],multi:!0}];class d{static init(){Object(r.W)(new d)}addToWindow(e){r.nb.getAngularTestability=(t,n=!0)=>{const i=e.findTestabilityInTree(t,n);if(null==i)throw new Error("Could not find testability for element.");return i},r.nb.getAllAngularTestabilities=()=>e.getAllTestabilities(),r.nb.getAllAngularRootElements=()=>e.getAllRootElements(),r.nb.frameworkStabilizers||(r.nb.frameworkStabilizers=[]),r.nb.frameworkStabilizers.push(e=>{const t=r.nb.getAllAngularTestabilities();let n=t.length,i=!1;const s=function(t){i=i||t,n--,0==n&&e(i)};t.forEach((function(e){e.whenStable(s)}))})}findTestabilityInTree(e,t,n){if(null==t)return null;const r=e.getTestability(t);return null!=r?r:n?Object(i.L)().isShadowRoot(t)?this.findTestabilityInTree(e,t.host,!0):this.findTestabilityInTree(e,t.parentElement,!0):null}}const h=new r.r("EventManagerPlugins");let f=(()=>{class e{constructor(e,t){this._zone=t,this._eventNameToPlugin=new Map,e.forEach(e=>e.manager=this),this._plugins=e.slice().reverse()}addEventListener(e,t,n){return this._findPluginFor(t).addEventListener(e,t,n)}addGlobalEventListener(e,t,n){return this._findPluginFor(t).addGlobalEventListener(e,t,n)}getZone(){return this._zone}_findPluginFor(e){const t=this._eventNameToPlugin.get(e);if(t)return t;const n=this._plugins;for(let i=0;i<n.length;i++){const t=n[i];if(t.supports(e))return this._eventNameToPlugin.set(e,t),t}throw new Error("No event manager plugin found for event "+e)}}return e.\u0275fac=function(t){return new(t||e)(r.dc(h),r.dc(r.A))},e.\u0275prov=r.Ib({token:e,factory:e.\u0275fac}),e})();class p{constructor(e){this._doc=e}addGlobalEventListener(e,t,n){const r=Object(i.L)().getGlobalEventTarget(this._doc,e);if(!r)throw new Error(`Unsupported event target ${r} for event ${t}`);return this.addEventListener(r,t,n)}}let m=(()=>{class e{constructor(){this._stylesSet=new Set}addStyles(e){const t=new Set;e.forEach(e=>{this._stylesSet.has(e)||(this._stylesSet.add(e),t.add(e))}),this.onStylesAdded(t)}onStylesAdded(e){}getAllStyles(){return Array.from(this._stylesSet)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=r.Ib({token:e,factory:e.\u0275fac}),e})(),b=(()=>{class e extends m{constructor(e){super(),this._doc=e,this._hostNodes=new Set,this._styleNodes=new Set,this._hostNodes.add(e.head)}_addStylesToHost(e,t){e.forEach(e=>{const n=this._doc.createElement("style");n.textContent=e,this._styleNodes.add(t.appendChild(n))})}addHost(e){this._addStylesToHost(this._stylesSet,e),this._hostNodes.add(e)}removeHost(e){this._hostNodes.delete(e)}onStylesAdded(e){this._hostNodes.forEach(t=>this._addStylesToHost(e,t))}ngOnDestroy(){this._styleNodes.forEach(e=>Object(i.L)().remove(e))}}return e.\u0275fac=function(t){return new(t||e)(r.dc(i.d))},e.\u0275prov=r.Ib({token:e,factory:e.\u0275fac}),e})();const g={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},_=/%COMP%/g;function y(e,t,n){for(let i=0;i<t.length;i++){let r=t[i];Array.isArray(r)?y(e,r,n):(r=r.replace(_,e),n.push(r))}return n}function v(e){return t=>{if("__ngUnwrap__"===t)return e;!1===e(t)&&(t.preventDefault(),t.returnValue=!1)}}let w=(()=>{class e{constructor(e,t,n){this.eventManager=e,this.sharedStylesHost=t,this.appId=n,this.rendererByCompId=new Map,this.defaultRenderer=new S(e)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;switch(t.encapsulation){case r.Q.Emulated:{let n=this.rendererByCompId.get(t.id);return n||(n=new M(this.eventManager,this.sharedStylesHost,t,this.appId),this.rendererByCompId.set(t.id,n)),n.applyToHost(e),n}case r.Q.Native:case r.Q.ShadowDom:return new x(this.eventManager,this.sharedStylesHost,e,t);default:if(!this.rendererByCompId.has(t.id)){const e=y(t.id,t.styles,[]);this.sharedStylesHost.addStyles(e),this.rendererByCompId.set(t.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return e.\u0275fac=function(t){return new(t||e)(r.dc(f),r.dc(b),r.dc(r.c))},e.\u0275prov=r.Ib({token:e,factory:e.\u0275fac}),e})();class S{constructor(e){this.eventManager=e,this.data=Object.create(null)}destroy(){}createElement(e,t){return t?document.createElementNS(g[t]||t,e):document.createElement(e)}createComment(e){return document.createComment(e)}createText(e){return document.createTextNode(e)}appendChild(e,t){e.appendChild(t)}insertBefore(e,t,n){e&&e.insertBefore(t,n)}removeChild(e,t){e&&e.removeChild(t)}selectRootElement(e,t){let n="string"==typeof e?document.querySelector(e):e;if(!n)throw new Error(`The selector "${e}" did not match any elements`);return t||(n.textContent=""),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,i){if(i){t=i+":"+t;const r=g[i];r?e.setAttributeNS(r,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){const i=g[n];i?e.removeAttributeNS(i,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,i){i&r.G.DashCase?e.style.setProperty(t,n,i&r.G.Important?"important":""):e.style[t]=n}removeStyle(e,t,n){n&r.G.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,n){e[t]=n}setValue(e,t){e.nodeValue=t}listen(e,t,n){return"string"==typeof e?this.eventManager.addGlobalEventListener(e,t,v(n)):this.eventManager.addEventListener(e,t,v(n))}}class M extends S{constructor(e,t,n,i){super(e),this.component=n;const r=y(i+"-"+n.id,n.styles,[]);t.addStyles(r),this.contentAttr="_ngcontent-%COMP%".replace(_,i+"-"+n.id),this.hostAttr="_nghost-%COMP%".replace(_,i+"-"+n.id)}applyToHost(e){super.setAttribute(e,this.hostAttr,"")}createElement(e,t){const n=super.createElement(e,t);return super.setAttribute(n,this.contentAttr,""),n}}class x extends S{constructor(e,t,n,i){super(e),this.sharedStylesHost=t,this.hostEl=n,this.component=i,this.shadowRoot=i.encapsulation===r.Q.ShadowDom?n.attachShadow({mode:"open"}):n.createShadowRoot(),this.sharedStylesHost.addHost(this.shadowRoot);const s=y(i.id,i.styles,[]);for(let r=0;r<s.length;r++){const e=document.createElement("style");e.textContent=s[r],this.shadowRoot.appendChild(e)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,n){return super.insertBefore(this.nodeOrShadowRoot(e),t,n)}removeChild(e,t){return super.removeChild(this.nodeOrShadowRoot(e),t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}}let k=(()=>{class e extends p{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,n){return e.addEventListener(t,n,!1),()=>this.removeEventListener(e,t,n)}removeEventListener(e,t,n){return e.removeEventListener(t,n)}}return e.\u0275fac=function(t){return new(t||e)(r.dc(i.d))},e.\u0275prov=r.Ib({token:e,factory:e.\u0275fac}),e})();const D=["alt","control","meta","shift"],T={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},C={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},O={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey};let L=(()=>{class e extends p{constructor(e){super(e)}supports(t){return null!=e.parseEventName(t)}addEventListener(t,n,r){const s=e.parseEventName(n),o=e.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Object(i.L)().onAndCancel(t,s.domEventName,o))}static parseEventName(t){const n=t.toLowerCase().split("."),i=n.shift();if(0===n.length||"keydown"!==i&&"keyup"!==i)return null;const r=e._normalizeKey(n.pop());let s="";if(D.forEach(e=>{const t=n.indexOf(e);t>-1&&(n.splice(t,1),s+=e+".")}),s+=r,0!=n.length||0===r.length)return null;const o={};return o.domEventName=i,o.fullKey=s,o}static getEventFullKey(e){let t="",n=function(e){let t=e.key;if(null==t){if(t=e.keyIdentifier,null==t)return"Unidentified";t.startsWith("U+")&&(t=String.fromCharCode(parseInt(t.substring(2),16)),3===e.location&&C.hasOwnProperty(t)&&(t=C[t]))}return T[t]||t}(e);return n=n.toLowerCase()," "===n?n="space":"."===n&&(n="dot"),D.forEach(i=>{i!=n&&(0,O[i])(e)&&(t+=i+".")}),t+=n,t}static eventCallback(t,n,i){return r=>{e.getEventFullKey(r)===t&&i.runGuarded(()=>n(r))}}static _normalizeKey(e){switch(e){case"esc":return"escape";default:return e}}}return e.\u0275fac=function(t){return new(t||e)(r.dc(i.d))},e.\u0275prov=r.Ib({token:e,factory:e.\u0275fac}),e})(),R=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(r.Ib)({factory:function(){return Object(r.dc)(A)},token:e,providedIn:"root"}),e})();function E(e){return new A(e.get(i.d))}let A=(()=>{class e extends R{constructor(e){super(),this._doc=e}sanitize(e,t){if(null==t)return null;switch(e){case r.I.NONE:return t;case r.I.HTML:return Object(r.cb)(t,"HTML")?Object(r.ub)(t):Object(r.ab)(this._doc,String(t));case r.I.STYLE:return Object(r.cb)(t,"Style")?Object(r.ub)(t):t;case r.I.SCRIPT:if(Object(r.cb)(t,"Script"))return Object(r.ub)(t);throw new Error("unsafe value used in a script context");case r.I.URL:return Object(r.mb)(t),Object(r.cb)(t,"URL")?Object(r.ub)(t):Object(r.bb)(String(t));case r.I.RESOURCE_URL:if(Object(r.cb)(t,"ResourceURL"))return Object(r.ub)(t);throw new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)");default:throw new Error(`Unexpected SecurityContext ${e} (see http://g.co/ng/security#xss)`)}}bypassSecurityTrustHtml(e){return Object(r.db)(e)}bypassSecurityTrustStyle(e){return Object(r.gb)(e)}bypassSecurityTrustScript(e){return Object(r.fb)(e)}bypassSecurityTrustUrl(e){return Object(r.hb)(e)}bypassSecurityTrustResourceUrl(e){return Object(r.eb)(e)}}return e.\u0275fac=function(t){return new(t||e)(r.dc(i.d))},e.\u0275prov=Object(r.Ib)({factory:function(){return E(Object(r.dc)(r.p))},token:e,providedIn:"root"}),e})();const I=[{provide:r.C,useValue:i.K},{provide:r.D,useValue:function(){o.makeCurrent(),d.init()},multi:!0},{provide:i.d,useFactory:function(){return Object(r.sb)(document),document},deps:[]}],P=Object(r.R)(r.V,"browser",I),j=[[],{provide:r.Y,useValue:"root"},{provide:r.n,useFactory:function(){return new r.n},deps:[]},{provide:h,useClass:k,multi:!0,deps:[i.d,r.A,r.C]},{provide:h,useClass:L,multi:!0,deps:[i.d]},[],{provide:w,useClass:w,deps:[f,b,r.c]},{provide:r.F,useExisting:w},{provide:m,useExisting:b},{provide:b,useClass:b,deps:[i.d]},{provide:r.M,useClass:r.M,deps:[r.A]},{provide:f,useClass:f,deps:[h,r.A]},[]];let N=(()=>{class e{constructor(e){if(e)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}static withServerTransition(t){return{ngModule:e,providers:[{provide:r.c,useValue:t.appId},{provide:l,useExisting:r.c},u]}}}return e.\u0275mod=r.Kb({type:e}),e.\u0275inj=r.Jb({factory:function(t){return new(t||e)(r.dc(e,12))},providers:j,imports:[i.c,r.f]}),e})();const F="undefined"!=typeof window&&window||{};class Y{constructor(e,t){this.msPerTick=e,this.numTicks=t}}class z{constructor(e){this.appRef=e.injector.get(r.g)}timeChangeDetection(e){const t=e&&e.record,n="Change Detection",r=null!=F.console.profile;t&&r&&F.console.profile(n);const s=Object(i.L)().performanceNow();let o=0;for(;o<5||Object(i.L)().performanceNow()-s<500;)this.appRef.tick(),o++;const a=Object(i.L)().performanceNow();t&&r&&F.console.profileEnd(n);const c=(a-s)/o;return F.console.log(`ran ${o} change detection cycles`),F.console.log(c.toFixed(2)+" ms per check"),new Y(c,o)}}function $(e){return"profiler",t=new z(e),"undefined"!=typeof COMPILED&&COMPILED||((r.nb.ng=r.nb.ng||{}).profiler=t),e;var t}},cVYH:function(e,t,n){var i=n("hh1v"),r=n("0rvr");e.exports=function(e,t,n){var s,o;return r&&"function"==typeof(s=t.constructor)&&s!==n&&i(o=s.prototype)&&o!==n.prototype&&r(e,o),e}},cp0P:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i=n("HDdC"),r=n("DH7j"),s=n("lJxs"),o=n("XoHu"),a=n("Cfvw");function c(...e){if(1===e.length){const t=e[0];if(Object(r.a)(t))return l(t,null);if(Object(o.a)(t)&&Object.getPrototypeOf(t)===Object.prototype){const e=Object.keys(t);return l(e.map(e=>t[e]),e)}}if("function"==typeof e[e.length-1]){const t=e.pop();return l(e=1===e.length&&Object(r.a)(e[0])?e[0]:e,null).pipe(Object(s.a)(e=>t(...e)))}return l(e,null)}function l(e,t){return new i.a(n=>{const i=e.length;if(0===i)return void n.complete();const r=new Array(i);let s=0,o=0;for(let c=0;c<i;c++){const l=Object(a.a)(e[c]);let u=!1;n.add(l.subscribe({next:e=>{u||(u=!0,o++),r[c]=e},error:e=>n.error(e),complete:()=>{s++,s!==i&&u||(o===i&&n.next(t?t.reduce((e,t,n)=>(e[t]=r[n],e),{}):r),n.complete())}}))}})}},czMo:function(e,t,n){!function(e){"use strict";e.defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})}(n("wd/R"))},"d+Og":function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i=n("LvDl"),r=n.n(i),s=n("kJI8");let o=(()=>{class e{constructor(e){if(this.type=e,!this.isValidType())throw new Error("Wrong placement group category type");this.setTypeStates()}isValidType(){return e.VALID_CATEGORIES.includes(this.type)}setTypeStates(){switch(this.type){case e.CATEGORY_CLEAN:this.states=["active","clean"];break;case e.CATEGORY_WORKING:this.states=["activating","backfill_wait","backfilling","creating","deep","degraded","forced_backfill","forced_recovery","peering","peered","recovering","recovery_wait","repair","scrubbing","snaptrim","snaptrim_wait"];break;case e.CATEGORY_WARNING:this.states=["backfill_toofull","backfill_unfound","down","incomplete","inconsistent","recovery_toofull","recovery_unfound","remapped","snaptrim_error","stale","undersized"];break;default:this.states=[]}}}return e.CATEGORY_CLEAN="clean",e.CATEGORY_WORKING="working",e.CATEGORY_WARNING="warning",e.CATEGORY_UNKNOWN="unknown",e.VALID_CATEGORIES=[e.CATEGORY_CLEAN,e.CATEGORY_WORKING,e.CATEGORY_WARNING,e.CATEGORY_UNKNOWN],e})();var a=n("8Y7J");let c=(()=>{class e{constructor(){this.categories=this.createCategories()}getAllTypes(){return o.VALID_CATEGORIES}getTypeByStates(e){const t=this.getPgStatesFromText(e);if(0===t.length)return o.CATEGORY_UNKNOWN;const n=r.a.zipObject(o.VALID_CATEGORIES,o.VALID_CATEGORIES.map(e=>r.a.intersection(this.categories[e].states,t).length));if(n[o.CATEGORY_WARNING]>0)return o.CATEGORY_WARNING;const i=n[o.CATEGORY_WORKING];return t.length>n[o.CATEGORY_CLEAN]+i?o.CATEGORY_UNKNOWN:i?o.CATEGORY_WORKING:o.CATEGORY_CLEAN}createCategories(){return r.a.zipObject(o.VALID_CATEGORIES,o.VALID_CATEGORIES.map(e=>new o(e)))}getPgStatesFromText(e){const t=e.replace(/[^a-z]+/g," ").trim().split(" ");return r.a.uniq(t)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=a.Ib({token:e,factory:e.\u0275fac,providedIn:s.a}),e})()},"dBg+":function(e,t){t.f=Object.getOwnPropertySymbols},dEH0:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("8Y7J");let r=(()=>{class e{transform(e){return e+" ms"}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"milliseconds",type:e,pure:!0}),e})()},dLWn:function(e,t,n){"use strict";var i=Function.prototype.toString;t.a=function(e){if(null!=e){try{return i.call(e)}catch(t){}try{return e+""}catch(t){}}return""}},dNwA:function(e,t,n){!function(e){"use strict";e.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"hh:mm A",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"siku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}})}(n("wd/R"))},dgut:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var i=n("NEZu"),r=n("Fgil"),s=n("8Y7J"),o=n("SVse"),a=n("hrfs");const c=["sparkCanvas"],l=["sparkTooltip"];let u=(()=>{class e{constructor(e){this.dimlessBinaryPipe=e,this.style={height:"30px",width:"100px"},this.colors=[{backgroundColor:"rgba(40,140,234,0.2)",borderColor:"rgba(40,140,234,1)",pointBackgroundColor:"rgba(40,140,234,1)",pointBorderColor:"#fff",pointHoverBackgroundColor:"#fff",pointHoverBorderColor:"rgba(40,140,234,0.8)"}],this.options={animation:{duration:0},responsive:!0,maintainAspectRatio:!1,legend:{display:!1},elements:{line:{borderWidth:1}},tooltips:{enabled:!1,mode:"index",intersect:!1,custom:void 0,callbacks:{label:e=>this.isBinary?this.dimlessBinaryPipe.transform(e.yLabel):e.yLabel,title:()=>""}},scales:{yAxes:[{display:!1}],xAxes:[{display:!1}]}},this.datasets=[{data:[]}],this.labels=[]}ngOnInit(){const e=new i.a(this.chartCanvasRef,this.chartTooltipRef,(e,t)=>t+e.caretX+"px",e=>e.caretY-e.height-e.yPadding-5+"px");e.customColors={backgroundColor:this.colors[0].pointBackgroundColor,borderColor:this.colors[0].pointBorderColor},this.options.tooltips.custom=t=>{e.customTooltips(t)}}ngOnChanges(e){this.datasets[0].data=e.data.currentValue,this.labels=[...Array(e.data.currentValue.length)]}}return e.\u0275fac=function(t){return new(t||e)(s.Mb(r.a))},e.\u0275cmp=s.Gb({type:e,selectors:[["cd-sparkline"]],viewQuery:function(e,t){var n;1&e&&(s.Jc(c,!0),s.Jc(l,!0)),2&e&&(s.zc(n=s.hc())&&(t.chartCanvasRef=n.first),s.zc(n=s.hc())&&(t.chartTooltipRef=n.first))},inputs:{data:"data",style:"style",isBinary:"isBinary"},features:[s.wb],decls:6,vars:6,consts:[[1,"chart-container",3,"ngStyle"],["baseChart","",3,"labels","datasets","options","colors","chartType"],["sparkCanvas",""],[1,"chartjs-tooltip"],["sparkTooltip",""]],template:function(e,t){1&e&&(s.Sb(0,"div",0),s.Nb(1,"canvas",1,2),s.Sb(3,"div",3,4),s.Nb(5,"table"),s.Rb(),s.Rb()),2&e&&(s.pc("ngStyle",t.style),s.yb(1),s.pc("labels",t.labels)("datasets",t.datasets)("options",t.options)("colors",t.colors)("chartType","line"))},directives:[o.s,a.a],styles:['.chart-container[_ngcontent-%COMP%]{cursor:pointer;margin:auto;overflow:visible;position:absolute}canvas[_ngcontent-%COMP%]{user-select:none}.chartjs-tooltip[_ngcontent-%COMP%]{background:rgba(0,0,0,.7);border-radius:3px;color:#fff;font-family:Helvetica Neue,Helvetica,Arial,sans-serif!important;opacity:0;pointer-events:none;position:absolute;transform:translate(-50%);transition:all .1s ease}.chartjs-tooltip.transform-left[_ngcontent-%COMP%]{transform:translate(-10%)}.chartjs-tooltip.transform-left[_ngcontent-%COMP%]:after{left:10%}.chartjs-tooltip.transform-right[_ngcontent-%COMP%]{transform:translate(-90%)}.chartjs-tooltip.transform-right[_ngcontent-%COMP%]:after{left:90%}.chartjs-tooltip[_ngcontent-%COMP%]:after{border:5px solid transparent;border-top-color:#000;content:" ";left:50%;margin-left:-5px;position:absolute;top:100%} .chartjs-tooltip-key{display:inline-block;height:10px;margin-right:10px;width:10px}.chart-container[_ngcontent-%COMP%]{position:static!important}']}),e})()},"e+ae":function(e,t,n){!function(e){"use strict";var t="janu\xe1r_febru\xe1r_marec_apr\xedl_m\xe1j_j\xfan_j\xfal_august_september_okt\xf3ber_november_december".split("_"),n="jan_feb_mar_apr_m\xe1j_j\xfan_j\xfal_aug_sep_okt_nov_dec".split("_");function i(e){return e>1&&e<5}function r(e,t,n,r){var s=e+" ";switch(n){case"s":return t||r?"p\xe1r sek\xfand":"p\xe1r sekundami";case"ss":return t||r?s+(i(e)?"sekundy":"sek\xfand"):s+"sekundami";case"m":return t?"min\xfata":r?"min\xfatu":"min\xfatou";case"mm":return t||r?s+(i(e)?"min\xfaty":"min\xfat"):s+"min\xfatami";case"h":return t?"hodina":r?"hodinu":"hodinou";case"hh":return t||r?s+(i(e)?"hodiny":"hod\xedn"):s+"hodinami";case"d":return t||r?"de\u0148":"d\u0148om";case"dd":return t||r?s+(i(e)?"dni":"dn\xed"):s+"d\u0148ami";case"M":return t||r?"mesiac":"mesiacom";case"MM":return t||r?s+(i(e)?"mesiace":"mesiacov"):s+"mesiacmi";case"y":return t||r?"rok":"rokom";case"yy":return t||r?s+(i(e)?"roky":"rokov"):s+"rokmi"}}e.defineLocale("sk",{months:t,monthsShort:n,weekdays:"nede\u013ea_pondelok_utorok_streda_\u0161tvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_\u0161t_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_\u0161t_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nede\u013eu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo \u0161tvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[v\u010dera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minul\xfa nede\u013eu o] LT";case 1:case 2:return"[minul\xfd] dddd [o] LT";case 3:return"[minul\xfa stredu o] LT";case 4:case 5:return"[minul\xfd] dddd [o] LT";case 6:return"[minul\xfa sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},e0ae:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var i=function(e,t,n){this.name=e,this.version=t,this.os=n,this.type="browser"},r=function(e){this.version=e,this.type="node",this.name="node",this.os=process.platform},s=function(e,t,n,i){this.name=e,this.version=t,this.os=n,this.bot=i,this.type="bot-device"},o=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},a=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},c=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,l=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],u=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function d(e){return e?h(e):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new a:"undefined"!=typeof navigator?h(navigator.userAgent):"undefined"!=typeof process&&process.version?new r(process.version.slice(1)):null}function h(e){var t=function(e){return""!==e&&l.reduce((function(t,n){var i=n[0];if(t)return t;var r=n[1].exec(e);return!!r&&[i,r]}),!1)}(e);if(!t)return null;var n=t[0],r=t[1];if("searchbot"===n)return new o;var a=r[1]&&r[1].split(/[._]/).slice(0,3);a?a.length<3&&(a=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),r=0;for(t=0;t<n;t++)for(var s=arguments[t],o=0,a=s.length;o<a;o++,r++)i[r]=s[o];return i}(a,function(e){for(var t=[],n=0;n<e;n++)t.push("0");return t}(3-a.length))):a=[];var d=a.join("."),h=function(e){for(var t=0,n=u.length;t<n;t++){var i=u[t],r=i[0];if(i[1].exec(e))return r}return null}(e),f=c.exec(e);return f&&f[1]?new s(n,d,h,f[1]):new i(n,d,h)}},e2NH:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));class i{constructor(e="light",t=""){this.type=e,this.msg=t}}},eAQQ:function(e,t,n){"use strict";t.a=function(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t}},"eDl+":function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},eIep:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("lJxs"),r=n("Cfvw"),s=n("zx2A");function o(e,t){return"function"==typeof t?n=>n.pipe(o((n,s)=>Object(r.a)(e(n,s)).pipe(Object(i.a)((e,i)=>t(n,e,s,i))))):t=>t.lift(new a(e))}class a{constructor(e){this.project=e}call(e,t){return t.subscribe(new c(e,this.project))}}class c extends s.b{constructor(e,t){super(e),this.project=t,this.index=0}_next(e){let t;const n=this.index++;try{t=this.project(e,n)}catch(i){return void this.destination.error(i)}this._innerSub(t)}_innerSub(e){const t=this.innerSubscription;t&&t.unsubscribe();const n=new s.a(this),i=this.destination;i.add(n),this.innerSubscription=Object(s.c)(e,n),this.innerSubscription!==n&&i.add(this.innerSubscription)}_complete(){const{innerSubscription:e}=this;e&&!e.closed||super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(e){this.destination.next(e)}}},efK2:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("LvDl"),r=n.n(i),s=n("8Y7J");let o=(()=>{class e{transform(e,t,n){return r.a.isString(e)?(n=r.a.defaultTo(n,""),r.a.truncate(e,{length:t,omission:n})):e}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=s.Lb({name:"truncate",type:e,pure:!0}),e})()},"ej+x":function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("lOp/"),r=n("8Y7J"),s=n("IheW");let o=(()=>{class e{constructor(e,t){this.http=e,this.timerService=t,this.API_URL="api/feature_toggles",this.REFRESH_INTERVAL=3e4,this.featureToggleMap$=this.timerService.get(()=>this.http.get(this.API_URL),this.REFRESH_INTERVAL)}get(){return this.featureToggleMap$}}return e.\u0275fac=function(t){return new(t||e)(r.dc(s.b),r.dc(i.a))},e.\u0275prov=r.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},ewvW:function(e,t,n){var i=n("HYAF");e.exports=function(e){return Object(i(e))}},"f/UV":function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("8Y7J");let r=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=i.Hb({type:e,selectors:[["","cdFormScope",""]],inputs:{cdFormScope:"cdFormScope"}}),e})()},f5p1:function(e,t,n){var i=n("2oRo"),r=n("iSVu"),s=i.WeakMap;e.exports="function"==typeof s&&/native code/.test(r(s))},f69J:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("8Y7J"),r=n("s7LF");let s=(()=>{class e{constructor(e){this.parent=e}get validClass(){return!!this.control&&this.control.valid&&(this.control.touched||this.control.dirty)}get invalidClass(){return!!this.control&&this.control.invalid&&this.control.touched&&this.control.dirty}get path(){return[...this.parent.path,this.formControlName]}get control(){return this.formDirective&&this.formDirective.getControl(this)}get formDirective(){return this.parent?this.parent.formDirective:null}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(r.c,13))},e.\u0275dir=i.Hb({type:e,selectors:[["",8,"form-control"],["",8,"form-check-input"],["",8,"custom-control-input"]],hostVars:4,hostBindings:function(e,t){2&e&&i.Eb("is-valid",t.validClass)("is-invalid",t.invalidClass)},inputs:{formControlName:"formControlName",formControl:"formControl"}}),e})()},fHMY:function(e,t,n){var i,r=n("glrk"),s=n("N+g0"),o=n("eDl+"),a=n("0BK2"),c=n("G+Rx"),l=n("zBJ4"),u=n("93I0")("IE_PROTO"),d=function(){},h=function(e){return"<script>"+e+"<\/script>"},f=function(){try{i=document.domain&&new ActiveXObject("htmlfile")}catch(r){}var e,t;f=i?function(e){e.write(h("")),e.close();var t=e.parentWindow.Object;return e=null,t}(i):((t=l("iframe")).style.display="none",c.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(h("document.F=Object")),e.close(),e.F);for(var n=o.length;n--;)delete f.prototype[o[n]];return f()};a[u]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(d.prototype=r(e),n=new d,d.prototype=null,n[u]=e):n=f(),void 0===t?n:s(n,t)}},fdAy:function(e,t,n){"use strict";var i=n("I+eb"),r=n("ntOU"),s=n("4WOD"),o=n("0rvr"),a=n("1E5z"),c=n("kRJp"),l=n("busE"),u=n("tiKp"),d=n("xDBR"),h=n("P4y1"),f=n("rpNk"),p=f.IteratorPrototype,m=f.BUGGY_SAFARI_ITERATORS,b=u("iterator"),g="keys",_="values",y="entries",v=function(){return this};e.exports=function(e,t,n,u,f,w,S){r(n,t,u);var M,x,k,D=function(e){if(e===f&&R)return R;if(!m&&e in O)return O[e];switch(e){case g:case _:case y:return function(){return new n(this,e)}}return function(){return new n(this)}},T=t+" Iterator",C=!1,O=e.prototype,L=O[b]||O["@@iterator"]||f&&O[f],R=!m&&L||D(f),E="Array"==t&&O.entries||L;if(E&&(M=s(E.call(new e)),p!==Object.prototype&&M.next&&(d||s(M)===p||(o?o(M,p):"function"!=typeof M[b]&&c(M,b,v)),a(M,T,!0,!0),d&&(h[T]=v))),f==_&&L&&L.name!==_&&(C=!0,R=function(){return L.call(this)}),d&&!S||O[b]===R||c(O,b,R),h[t]=R,f)if(x={values:D(_),keys:w?R:D(g),entries:D(y)},S)for(k in x)(m||C||!(k in O))&&l(O,k,x[k]);else i({target:t,proto:!0,forced:m||C},x);return x}},fzPg:function(e,t,n){!function(e){"use strict";e.defineLocale("yo",{months:"S\u1eb9\u0301r\u1eb9\u0301_E\u0300re\u0300le\u0300_\u1eb8r\u1eb9\u0300na\u0300_I\u0300gbe\u0301_E\u0300bibi_O\u0300ku\u0300du_Ag\u1eb9mo_O\u0300gu\u0301n_Owewe_\u1ecc\u0300wa\u0300ra\u0300_Be\u0301lu\u0301_\u1ecc\u0300p\u1eb9\u0300\u0300".split("_"),monthsShort:"S\u1eb9\u0301r_E\u0300rl_\u1eb8rn_I\u0300gb_E\u0300bi_O\u0300ku\u0300_Ag\u1eb9_O\u0300gu\u0301_Owe_\u1ecc\u0300wa\u0300_Be\u0301l_\u1ecc\u0300p\u1eb9\u0300\u0300".split("_"),weekdays:"A\u0300i\u0300ku\u0301_Aje\u0301_I\u0300s\u1eb9\u0301gun_\u1eccj\u1ecd\u0301ru\u0301_\u1eccj\u1ecd\u0301b\u1ecd_\u1eb8ti\u0300_A\u0300ba\u0301m\u1eb9\u0301ta".split("_"),weekdaysShort:"A\u0300i\u0300k_Aje\u0301_I\u0300s\u1eb9\u0301_\u1eccjr_\u1eccjb_\u1eb8ti\u0300_A\u0300ba\u0301".split("_"),weekdaysMin:"A\u0300i\u0300_Aj_I\u0300s_\u1eccr_\u1eccb_\u1eb8t_A\u0300b".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[O\u0300ni\u0300 ni] LT",nextDay:"[\u1ecc\u0300la ni] LT",nextWeek:"dddd [\u1eccs\u1eb9\u0300 to\u0301n'b\u1ecd] [ni] LT",lastDay:"[A\u0300na ni] LT",lastWeek:"dddd [\u1eccs\u1eb9\u0300 to\u0301l\u1ecd\u0301] [ni] LT",sameElse:"L"},relativeTime:{future:"ni\u0301 %s",past:"%s k\u1ecdja\u0301",s:"i\u0300s\u1eb9ju\u0301 aaya\u0301 die",ss:"aaya\u0301 %d",m:"i\u0300s\u1eb9ju\u0301 kan",mm:"i\u0300s\u1eb9ju\u0301 %d",h:"wa\u0301kati kan",hh:"wa\u0301kati %d",d:"\u1ecdj\u1ecd\u0301 kan",dd:"\u1ecdj\u1ecd\u0301 %d",M:"osu\u0300 kan",MM:"osu\u0300 %d",y:"\u1ecddu\u0301n kan",yy:"\u1ecddu\u0301n %d"},dayOfMonthOrdinalParse:/\u1ecdj\u1ecd\u0301\s\d{1,2}/,ordinal:"\u1ecdj\u1ecd\u0301 %d",week:{dow:1,doy:4}})}(n("wd/R"))},"g6v/":function(e,t,n){var i=n("0Dky");e.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},gRHU:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("2fFW"),r=n("NJ4a");const s={closed:!0,next(e){},error(e){if(i.a.useDeprecatedSynchronousErrorHandling)throw e;Object(r.a)(e)},complete(){}}},gVVK:function(e,t,n){!function(e){"use strict";function t(e,t,n,i){var r=e+" ";switch(n){case"s":return t||i?"nekaj sekund":"nekaj sekundami";case"ss":return r+(1===e?t?"sekundo":"sekundi":2===e?t||i?"sekundi":"sekundah":e<5?t||i?"sekunde":"sekundah":"sekund");case"m":return t?"ena minuta":"eno minuto";case"mm":return r+(1===e?t?"minuta":"minuto":2===e?t||i?"minuti":"minutama":e<5?t||i?"minute":"minutami":t||i?"minut":"minutami");case"h":return t?"ena ura":"eno uro";case"hh":return r+(1===e?t?"ura":"uro":2===e?t||i?"uri":"urama":e<5?t||i?"ure":"urami":t||i?"ur":"urami");case"d":return t||i?"en dan":"enim dnem";case"dd":return r+(1===e?t||i?"dan":"dnem":2===e?t||i?"dni":"dnevoma":t||i?"dni":"dnevi");case"M":return t||i?"en mesec":"enim mesecem";case"MM":return r+(1===e?t||i?"mesec":"mesecem":2===e?t||i?"meseca":"mesecema":e<5?t||i?"mesece":"meseci":t||i?"mesecev":"meseci");case"y":return t||i?"eno leto":"enim letom";case"yy":return r+(1===e?t||i?"leto":"letom":2===e?t||i?"leti":"letoma":e<5?t||i?"leta":"leti":t||i?"let":"leti")}}e.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_\u010detrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._\u010det._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_\u010de_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[v\u010deraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prej\u0161njo] [nedeljo] [ob] LT";case 3:return"[prej\u0161njo] [sredo] [ob] LT";case 6:return"[prej\u0161njo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prej\u0161nji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"\u010dez %s",past:"pred %s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n("wd/R"))},gekB:function(e,t,n){!function(e){"use strict";var t="nolla yksi kaksi kolme nelj\xe4 viisi kuusi seitsem\xe4n kahdeksan yhdeks\xe4n".split(" "),n=["nolla","yhden","kahden","kolmen","nelj\xe4n","viiden","kuuden",t[7],t[8],t[9]];function i(e,i,r,s){var o="";switch(r){case"s":return s?"muutaman sekunnin":"muutama sekunti";case"ss":o=s?"sekunnin":"sekuntia";break;case"m":return s?"minuutin":"minuutti";case"mm":o=s?"minuutin":"minuuttia";break;case"h":return s?"tunnin":"tunti";case"hh":o=s?"tunnin":"tuntia";break;case"d":return s?"p\xe4iv\xe4n":"p\xe4iv\xe4";case"dd":o=s?"p\xe4iv\xe4n":"p\xe4iv\xe4\xe4";break;case"M":return s?"kuukauden":"kuukausi";case"MM":o=s?"kuukauden":"kuukautta";break;case"y":return s?"vuoden":"vuosi";case"yy":o=s?"vuoden":"vuotta"}return function(e,i){return e<10?i?n[e]:t[e]:e}(e,s)+" "+o}e.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kes\xe4kuu_hein\xe4kuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kes\xe4_hein\xe4_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[t\xe4n\xe4\xe4n] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s p\xe4\xe4st\xe4",past:"%s sitten",s:i,ss:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},gjCT:function(e,t,n){!function(e){"use strict";var t={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},n={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"};e.defineLocale("ar-sa",{months:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a\u0648_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648_\u0623\u063a\u0633\u0637\u0633_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),monthsShort:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a\u0648_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648_\u0623\u063a\u0633\u0637\u0633_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,t,n){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},preparse:function(e){return e.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,(function(e){return n[e]})).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"\u060c")},week:{dow:0,doy:6}})}(n("wd/R"))},glrk:function(e,t,n){var i=n("hh1v");e.exports=function(e){if(!i(e))throw TypeError(String(e)+" is not an object");return e}},"hKI/":function(e,t){var n="Expected a function",i=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,c="object"==typeof global&&global&&global.Object===Object&&global,l="object"==typeof self&&self&&self.Object===Object&&self,u=c||l||Function("return this")(),d=Object.prototype.toString,h=Math.max,f=Math.min,p=function(){return u.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function b(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=s.test(e);return n||o.test(e)?a(e.slice(2),n?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,i){var r=!0,s=!0;if("function"!=typeof e)throw new TypeError(n);return m(i)&&(r="leading"in i?!!i.leading:r,s="trailing"in i?!!i.trailing:s),function(e,t,i){var r,s,o,a,c,l,u=0,d=!1,g=!1,_=!0;if("function"!=typeof e)throw new TypeError(n);function y(t){var n=r,i=s;return r=s=void 0,u=t,a=e.apply(i,n)}function v(e){return u=e,c=setTimeout(S,t),d?y(e):a}function w(e){var n=e-l;return void 0===l||n>=t||n<0||g&&e-u>=o}function S(){var e=p();if(w(e))return M(e);c=setTimeout(S,function(e){var n=t-(e-l);return g?f(n,o-(e-u)):n}(e))}function M(e){return c=void 0,_&&r?y(e):(r=s=void 0,a)}function x(){var e=p(),n=w(e);if(r=arguments,s=this,l=e,n){if(void 0===c)return v(l);if(g)return c=setTimeout(S,t),y(l)}return void 0===c&&(c=setTimeout(S,t)),a}return t=b(t)||0,m(i)&&(d=!!i.leading,o=(g="maxWait"in i)?h(b(i.maxWait)||0,t):o,_="trailing"in i?!!i.trailing:_),x.cancel=function(){void 0!==c&&clearTimeout(c),u=0,r=l=s=c=void 0},x.flush=function(){return void 0===c?a:M(p())},x}(e,t,{leading:r,maxWait:t,trailing:s})}},hKrs:function(e,t,n){!function(e){"use strict";e.defineLocale("bg",{months:"\u044f\u043d\u0443\u0430\u0440\u0438_\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0438\u043b_\u043c\u0430\u0439_\u044e\u043d\u0438_\u044e\u043b\u0438_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438_\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438_\u043d\u043e\u0435\u043c\u0432\u0440\u0438_\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438".split("_"),monthsShort:"\u044f\u043d\u0443_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0439_\u044e\u043d\u0438_\u044e\u043b\u0438_\u0430\u0432\u0433_\u0441\u0435\u043f_\u043e\u043a\u0442_\u043d\u043e\u0435_\u0434\u0435\u043a".split("_"),weekdays:"\u043d\u0435\u0434\u0435\u043b\u044f_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u044f\u0434\u0430_\u0447\u0435\u0442\u0432\u044a\u0440\u0442\u044a\u043a_\u043f\u0435\u0442\u044a\u043a_\u0441\u044a\u0431\u043e\u0442\u0430".split("_"),weekdaysShort:"\u043d\u0435\u0434_\u043f\u043e\u043d_\u0432\u0442\u043e_\u0441\u0440\u044f_\u0447\u0435\u0442_\u043f\u0435\u0442_\u0441\u044a\u0431".split("_"),weekdaysMin:"\u043d\u0434_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[\u0414\u043d\u0435\u0441 \u0432] LT",nextDay:"[\u0423\u0442\u0440\u0435 \u0432] LT",nextWeek:"dddd [\u0432] LT",lastDay:"[\u0412\u0447\u0435\u0440\u0430 \u0432] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[\u041c\u0438\u043d\u0430\u043b\u0430\u0442\u0430] dddd [\u0432] LT";case 1:case 2:case 4:case 5:return"[\u041c\u0438\u043d\u0430\u043b\u0438\u044f] dddd [\u0432] LT"}},sameElse:"L"},relativeTime:{future:"\u0441\u043b\u0435\u0434 %s",past:"\u043f\u0440\u0435\u0434\u0438 %s",s:"\u043d\u044f\u043a\u043e\u043b\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434\u0438",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434\u0438",m:"\u043c\u0438\u043d\u0443\u0442\u0430",mm:"%d \u043c\u0438\u043d\u0443\u0442\u0438",h:"\u0447\u0430\u0441",hh:"%d \u0447\u0430\u0441\u0430",d:"\u0434\u0435\u043d",dd:"%d \u0434\u0435\u043d\u0430",w:"\u0441\u0435\u0434\u043c\u0438\u0446\u0430",ww:"%d \u0441\u0435\u0434\u043c\u0438\u0446\u0438",M:"\u043c\u0435\u0441\u0435\u0446",MM:"%d \u043c\u0435\u0441\u0435\u0446\u0430",y:"\u0433\u043e\u0434\u0438\u043d\u0430",yy:"%d \u0433\u043e\u0434\u0438\u043d\u0438"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0435\u0432|\u0435\u043d|\u0442\u0438|\u0432\u0438|\u0440\u0438|\u043c\u0438)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-\u0435\u0432":0===n?e+"-\u0435\u043d":n>10&&n<20?e+"-\u0442\u0438":1===t?e+"-\u0432\u0438":2===t?e+"-\u0440\u0438":7===t||8===t?e+"-\u043c\u0438":e+"-\u0442\u0438"},week:{dow:1,doy:7}})}(n("wd/R"))},hYPf:function(e,t,n){"use strict";var i=n("IzLi"),r=Object.create,s=function(){function e(){}return function(t){if(!Object(i.a)(t))return{};if(r)return r(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),o=n("UudT"),a=n("pyRK");t.a=function(e){return"function"!=typeof e.constructor||Object(a.a)(e)?{}:s(Object(o.a)(e))}},hh1v:function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},honF:function(e,t,n){!function(e){"use strict";var t={1:"\u1041",2:"\u1042",3:"\u1043",4:"\u1044",5:"\u1045",6:"\u1046",7:"\u1047",8:"\u1048",9:"\u1049",0:"\u1040"},n={"\u1041":"1","\u1042":"2","\u1043":"3","\u1044":"4","\u1045":"5","\u1046":"6","\u1047":"7","\u1048":"8","\u1049":"9","\u1040":"0"};e.defineLocale("my",{months:"\u1007\u1014\u103a\u1014\u101d\u102b\u101b\u102e_\u1016\u1031\u1016\u1031\u102c\u103a\u101d\u102b\u101b\u102e_\u1019\u1010\u103a_\u1027\u1015\u103c\u102e_\u1019\u1031_\u1007\u103d\u1014\u103a_\u1007\u1030\u101c\u102d\u102f\u1004\u103a_\u101e\u103c\u1002\u102f\u1010\u103a_\u1005\u1000\u103a\u1010\u1004\u103a\u1018\u102c_\u1021\u1031\u102c\u1000\u103a\u1010\u102d\u102f\u1018\u102c_\u1014\u102d\u102f\u101d\u1004\u103a\u1018\u102c_\u1012\u102e\u1007\u1004\u103a\u1018\u102c".split("_"),monthsShort:"\u1007\u1014\u103a_\u1016\u1031_\u1019\u1010\u103a_\u1015\u103c\u102e_\u1019\u1031_\u1007\u103d\u1014\u103a_\u101c\u102d\u102f\u1004\u103a_\u101e\u103c_\u1005\u1000\u103a_\u1021\u1031\u102c\u1000\u103a_\u1014\u102d\u102f_\u1012\u102e".split("_"),weekdays:"\u1010\u1014\u1004\u103a\u1039\u1002\u1014\u103d\u1031_\u1010\u1014\u1004\u103a\u1039\u101c\u102c_\u1021\u1004\u103a\u1039\u1002\u102b_\u1017\u102f\u1012\u1039\u1013\u101f\u1030\u1038_\u1000\u103c\u102c\u101e\u1015\u1010\u1031\u1038_\u101e\u1031\u102c\u1000\u103c\u102c_\u1005\u1014\u1031".split("_"),weekdaysShort:"\u1014\u103d\u1031_\u101c\u102c_\u1002\u102b_\u101f\u1030\u1038_\u1000\u103c\u102c_\u101e\u1031\u102c_\u1014\u1031".split("_"),weekdaysMin:"\u1014\u103d\u1031_\u101c\u102c_\u1002\u102b_\u101f\u1030\u1038_\u1000\u103c\u102c_\u101e\u1031\u102c_\u1014\u1031".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u101a\u1014\u1031.] LT [\u1019\u103e\u102c]",nextDay:"[\u1019\u1014\u1000\u103a\u1016\u103c\u1014\u103a] LT [\u1019\u103e\u102c]",nextWeek:"dddd LT [\u1019\u103e\u102c]",lastDay:"[\u1019\u1014\u1031.\u1000] LT [\u1019\u103e\u102c]",lastWeek:"[\u1015\u103c\u102e\u1038\u1001\u1032\u1037\u101e\u1031\u102c] dddd LT [\u1019\u103e\u102c]",sameElse:"L"},relativeTime:{future:"\u101c\u102c\u1019\u100a\u103a\u1037 %s \u1019\u103e\u102c",past:"\u101c\u103d\u1014\u103a\u1001\u1032\u1037\u101e\u1031\u102c %s \u1000",s:"\u1005\u1000\u1039\u1000\u1014\u103a.\u1021\u1014\u100a\u103a\u1038\u1004\u101a\u103a",ss:"%d \u1005\u1000\u1039\u1000\u1014\u1037\u103a",m:"\u1010\u1005\u103a\u1019\u102d\u1014\u1005\u103a",mm:"%d \u1019\u102d\u1014\u1005\u103a",h:"\u1010\u1005\u103a\u1014\u102c\u101b\u102e",hh:"%d \u1014\u102c\u101b\u102e",d:"\u1010\u1005\u103a\u101b\u1000\u103a",dd:"%d \u101b\u1000\u103a",M:"\u1010\u1005\u103a\u101c",MM:"%d \u101c",y:"\u1010\u1005\u103a\u1014\u103e\u1005\u103a",yy:"%d \u1014\u103e\u1005\u103a"},preparse:function(e){return e.replace(/[\u1041\u1042\u1043\u1044\u1045\u1046\u1047\u1048\u1049\u1040]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}})}(n("wd/R"))},hrfs:function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return g}));var i=n("8Y7J"),r=n("2Vo4"),s=n("CfRg"),o=n("MO+k");const a=[[255,99,132],[54,162,235],[255,206,86],[231,233,237],[75,192,192],[151,187,205],[220,220,220],[247,70,74],[70,191,189],[253,180,92],[148,159,177],[77,83,96]];function c(e,t){return"rgba("+e.concat(t).join(",")+")"}function l(e,t){return Math.floor(Math.random()*(t-e+1))+e}function u(e){return{backgroundColor:e.map(e=>c(e,.6)),borderColor:e.map(()=>"#fff"),pointBackgroundColor:e.map(e=>c(e,1)),pointBorderColor:e.map(()=>"#fff"),pointHoverBackgroundColor:e.map(e=>c(e,1)),pointHoverBorderColor:e.map(e=>c(e,1))}}function d(){return[l(0,255),l(0,255),l(0,255)]}function h(e){return a[e]||d()}function f(e){const t=new Array(e);for(let n=0;n<e;n++)t[n]=a[n]||d();return t}let p=(()=>{class e{constructor(){this.pColorschemesOptions={},this.colorschemesOptions=new r.a({})}setColorschemesOptions(e){this.pColorschemesOptions=e,this.colorschemesOptions.next(e)}getColorschemesOptions(){return this.pColorschemesOptions}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return new e},token:e,providedIn:"root"}),e})();const m=function(){var e={Default:0,Update:1,Refresh:2};return e[e.Default]="Default",e[e.Update]="Update",e[e.Refresh]="Refresh",e}();let b=(()=>{class e{constructor(e,t){this.element=e,this.themeService=t,this.options={},this.chartClick=new i.o,this.chartHover=new i.o,this.old={dataExists:!1,dataLength:0,datasetsExists:!1,datasetsLength:0,datasetsDataObjects:[],datasetsDataLengths:[],colorsExists:!1,colors:[],labelsExist:!1,labels:[],legendExists:!1,legend:{}},this.subs=[]}static registerPlugin(e){o.pluginService.register(e)}static unregisterPlugin(e){o.pluginService.unregister(e)}ngOnInit(){this.ctx=this.element.nativeElement.getContext("2d"),this.refresh(),this.subs.push(this.themeService.colorschemesOptions.subscribe(e=>this.themeChanged(e)))}themeChanged(e){this.refresh()}ngDoCheck(){if(!this.chart)return;let e=m.Default;const t=t=>{e=t>e?t:e};switch(!!this.data!==this.old.dataExists&&(this.propagateDataToDatasets(this.data),this.old.dataExists=!!this.data,t(m.Update)),this.data&&this.data.length!==this.old.dataLength&&(this.old.dataLength=this.data&&this.data.length||0,t(m.Update)),!!this.datasets!==this.old.datasetsExists&&(this.old.datasetsExists=!!this.datasets,t(m.Update)),this.datasets&&this.datasets.length!==this.old.datasetsLength&&(this.old.datasetsLength=this.datasets&&this.datasets.length||0,t(m.Update)),this.datasets&&this.datasets.filter((e,t)=>e.data!==this.old.datasetsDataObjects[t]).length&&(this.old.datasetsDataObjects=this.datasets.map(e=>e.data),t(m.Update)),this.datasets&&this.datasets.filter((e,t)=>e.data.length!==this.old.datasetsDataLengths[t]).length&&(this.old.datasetsDataLengths=this.datasets.map(e=>e.data.length),t(m.Update)),!!this.colors!==this.old.colorsExists&&(this.old.colorsExists=!!this.colors,this.updateColors(),t(m.Update)),this.colors&&this.colors.filter((e,t)=>!this.colorsEqual(e,this.old.colors[t])).length&&(this.old.colors=this.colors.map(e=>this.copyColor(e)),this.updateColors(),t(m.Update)),!!this.labels!==this.old.labelsExist&&(this.old.labelsExist=!!this.labels,t(m.Update)),this.labels&&this.labels.filter((e,t)=>!this.labelsEqual(e,this.old.labels[t])).length&&(this.old.labels=this.labels.map(e=>this.copyLabel(e)),t(m.Update)),!!this.options.legend!==this.old.legendExists&&(this.old.legendExists=!!this.options.legend,t(m.Refresh)),this.options.legend&&this.options.legend.position!==this.old.legend.position&&(this.old.legend.position=this.options.legend.position,t(m.Refresh)),e){case m.Default:break;case m.Update:this.update();break;case m.Refresh:this.refresh()}}copyLabel(e){return Array.isArray(e)?[...e]:e}labelsEqual(e,t){return Array.isArray(e)===Array.isArray(t)&&(Array.isArray(e)||e===t)&&(!Array.isArray(e)||e.length===t.length)&&(!Array.isArray(e)||0===e.filter((e,n)=>e!==t[n]).length)}copyColor(e){return{backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderColor:e.borderColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,pointBorderColor:e.pointBorderColor,pointBackgroundColor:e.pointBackgroundColor,pointBorderWidth:e.pointBorderWidth,pointRadius:e.pointRadius,pointHoverRadius:e.pointHoverRadius,pointHitRadius:e.pointHitRadius,pointHoverBackgroundColor:e.pointHoverBackgroundColor,pointHoverBorderColor:e.pointHoverBorderColor,pointHoverBorderWidth:e.pointHoverBorderWidth,pointStyle:e.pointStyle,hoverBackgroundColor:e.hoverBackgroundColor,hoverBorderColor:e.hoverBorderColor,hoverBorderWidth:e.hoverBorderWidth}}colorsEqual(e,t){return!e==!t&&(!e||e.backgroundColor===t.backgroundColor&&e.borderWidth===t.borderWidth&&e.borderColor===t.borderColor&&e.borderCapStyle===t.borderCapStyle&&e.borderDash===t.borderDash&&e.borderDashOffset===t.borderDashOffset&&e.borderJoinStyle===t.borderJoinStyle&&e.pointBorderColor===t.pointBorderColor&&e.pointBackgroundColor===t.pointBackgroundColor&&e.pointBorderWidth===t.pointBorderWidth&&e.pointRadius===t.pointRadius&&e.pointHoverRadius===t.pointHoverRadius&&e.pointHitRadius===t.pointHitRadius&&e.pointHoverBackgroundColor===t.pointHoverBackgroundColor&&e.pointHoverBorderColor===t.pointHoverBorderColor&&e.pointHoverBorderWidth===t.pointHoverBorderWidth&&e.pointStyle===t.pointStyle&&e.hoverBackgroundColor===t.hoverBackgroundColor&&e.hoverBorderColor===t.hoverBorderColor&&e.hoverBorderWidth===t.hoverBorderWidth)}updateColors(){this.datasets.forEach((e,t)=>{this.colors&&this.colors[t]?Object.assign(e,this.colors[t]):Object.assign(e,function(e,t,n){if("pie"===e||"doughnut"===e)return u(f(n));if("polarArea"===e)return{backgroundColor:(i=f(n)).map(e=>c(e,.6)),borderColor:i.map(e=>c(e,1)),hoverBackgroundColor:i.map(e=>c(e,.8)),hoverBorderColor:i.map(e=>c(e,1))};var i;if("line"===e||"radar"===e)return function(e){return{backgroundColor:c(e,.4),borderColor:c(e,1),pointBackgroundColor:c(e,1),pointBorderColor:"#fff",pointHoverBackgroundColor:"#fff",pointHoverBorderColor:c(e,.8)}}(h(t));if("bar"===e||"horizontalBar"===e)return function(e){return{backgroundColor:c(e,.6),borderColor:c(e,1),hoverBackgroundColor:c(e,.8),hoverBorderColor:c(e,1)}}(h(t));if("bubble"===e)return u(f(n));if("scatter"===e)return u(f(n));throw new Error("getColors - Unsupported chart type "+e)}(this.chartType,t,e.data.length),Object.assign({},e))})}ngOnChanges(e){let t=m.Default;const n=e=>{t=e>t?e:t};switch(e.hasOwnProperty("data")&&e.data.currentValue&&(this.propagateDataToDatasets(e.data.currentValue),n(m.Update)),e.hasOwnProperty("datasets")&&e.datasets.currentValue&&(this.propagateDatasetsToData(e.datasets.currentValue),n(m.Update)),e.hasOwnProperty("labels")&&(this.chart&&(this.chart.data.labels=e.labels.currentValue),n(m.Update)),e.hasOwnProperty("legend")&&(this.chart&&(this.chart.config.options.legend.display=e.legend.currentValue,this.chart.generateLegend()),n(m.Update)),e.hasOwnProperty("options")&&n(m.Refresh),t){case m.Update:this.update();break;case m.Refresh:case m.Default:this.refresh()}}ngOnDestroy(){this.chart&&(this.chart.destroy(),this.chart=void 0),this.subs.forEach(e=>e.unsubscribe())}update(e){if(this.chart)return this.chart.update(e)}hideDataset(e,t){this.chart.getDatasetMeta(e).hidden=t,this.chart.update()}isDatasetHidden(e){return this.chart.getDatasetMeta(e).hidden}toBase64Image(){return this.chart.toBase64Image()}getChartConfiguration(){const e=this.getDatasets(),t=Object.assign({},this.options);!1===this.legend&&(t.legend={display:!1}),t.hover=t.hover||{},t.hover.onHover||(t.hover.onHover=(e,t)=>{t&&!t.length||this.chartHover.emit({event:e,active:t})}),t.onClick||(t.onClick=(e,t)=>{this.chartClick.emit({event:e,active:t})});const n=this.smartMerge(t,this.themeService.getColorschemesOptions());return{type:this.chartType,data:{labels:this.labels||[],datasets:e},plugins:this.plugins,options:n}}getChartBuilder(e){const t=this.getChartConfiguration();return new o.Chart(e,t)}smartMerge(e,t,n=0){var i;if(0===n&&(i=e,e=Object(s.a)(i,5)),Object.keys(t).forEach(i=>{if(Array.isArray(t[i])){const r=e[i];r&&r.forEach(e=>{this.smartMerge(e,t[i][0],n+1)})}else"object"==typeof t[i]?(i in e||(e[i]={}),this.smartMerge(e[i],t[i],n+1)):e[i]=t[i]}),0===n)return e}isMultiLineLabel(e){return Array.isArray(e)}joinLabel(e){return e?this.isMultiLineLabel(e)?e.join(" "):e:null}propagateDatasetsToData(e){this.data=this.datasets.map(e=>e.data),this.chart&&(this.chart.data.datasets=e),this.updateColors()}propagateDataToDatasets(e){this.isMultiDataSet(e)?this.datasets&&e.length===this.datasets.length?this.datasets.forEach((t,n)=>{t.data=e[n]}):(this.datasets=e.map((e,t)=>({data:e,label:this.joinLabel(this.labels[t])||"Label "+t})),this.chart&&(this.chart.data.datasets=this.datasets)):this.datasets?(this.datasets[0]||(this.datasets[0]={}),this.datasets[0].data=e,this.datasets.splice(1)):(this.datasets=[{data:e}],this.chart&&(this.chart.data.datasets=this.datasets)),this.updateColors()}isMultiDataSet(e){return Array.isArray(e[0])}getDatasets(){if(!this.datasets&&!this.data)throw new Error("ng-charts configuration error, data or datasets field are required to render chart "+this.chartType);return this.datasets?(this.propagateDatasetsToData(this.datasets),this.datasets):this.data?(this.propagateDataToDatasets(this.data),this.datasets):void 0}refresh(){this.chart&&(this.chart.destroy(),this.chart=void 0),this.ctx&&(this.chart=this.getChartBuilder(this.ctx))}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(p))},e.\u0275dir=i.Hb({type:e,selectors:[["canvas","baseChart",""]],inputs:{options:"options",data:"data",datasets:"datasets",labels:"labels",chartType:"chartType",colors:"colors",legend:"legend",plugins:"plugins"},outputs:{chartClick:"chartClick",chartHover:"chartHover"},exportAs:["base-chart"],features:[i.wb]}),e})(),g=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[]]}),e})()},iEDd:function(e,t,n){!function(e){"use strict";e.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xu\xf1o_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xu\xf1._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_m\xe9rcores_xoves_venres_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._m\xe9r._xov._ven._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_m\xe9_xo_ve_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"\xe1s":"\xe1")+"] LT"},nextDay:function(){return"[ma\xf1\xe1 "+(1!==this.hours()?"\xe1s":"\xe1")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"\xe1s":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"\xe1":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"\xe1s":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){return 0===e.indexOf("un")?"n"+e:"en "+e},past:"hai %s",s:"uns segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un d\xeda",dd:"%d d\xedas",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}})}(n("wd/R"))},iExv:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("8Y7J");let r=(()=>{class e{transform(e,t="Yes",n="No"){return Boolean(e)?t:n}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"booleanText",type:e,pure:!0}),e})()},iInd:function(e,t,n){"use strict";n.d(t,"a",(function(){return Pe})),n.d(t,"b",(function(){return P})),n.d(t,"c",(function(){return I})),n.d(t,"d",(function(){return sn})),n.d(t,"e",(function(){return Qt})),n.d(t,"f",(function(){return Kt})),n.d(t,"g",(function(){return en})),n.d(t,"h",(function(){return Zt})),n.d(t,"i",(function(){return fn})),n.d(t,"j",(function(){return tn}));var i=n("SVse"),r=n("8Y7J"),s=n("LRne"),o=n("Cfvw"),a=n("2Vo4"),c=n("itXk"),l=n("HDdC"),u=n("sVev"),d=n("EY2u");function h(e){return new l.a(t=>{let n;try{n=e()}catch(i){return void t.error(i)}return(n?Object(o.a)(n):Object(d.b)()).subscribe(t)})}var f=n("XNiG"),p=n("lJxs"),m=n("0EUg"),b=n("NJ9Y"),g=n("eIep"),_=n("IzEk"),y=n("JX91"),v=n("Kqap"),w=n("pLZG"),S=n("JIr8"),M=n("bOdf"),x=n("SxV6"),k=n("5+tZ"),D=n("vkgz"),T=n("BFxc"),C=n("7o/Q"),O=n("quSY");class L{constructor(e){this.callback=e}call(e,t){return t.subscribe(new R(e,this.callback))}}class R extends C.a{constructor(e,t){super(e),this.add(new O.a(t))}}var E=n("bHdf");class A{constructor(e,t){this.id=e,this.url=t}}class I extends A{constructor(e,t,n="imperative",i=null){super(e,t),this.navigationTrigger=n,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class P extends A{constructor(e,t,n){super(e,t),this.urlAfterRedirects=n}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class j extends A{constructor(e,t,n){super(e,t),this.reason=n}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class N extends A{constructor(e,t,n){super(e,t),this.error=n}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class F extends A{constructor(e,t,n,i){super(e,t),this.urlAfterRedirects=n,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Y extends A{constructor(e,t,n,i){super(e,t),this.urlAfterRedirects=n,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class z extends A{constructor(e,t,n,i,r){super(e,t),this.urlAfterRedirects=n,this.state=i,this.shouldActivate=r}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class $ extends A{constructor(e,t,n,i){super(e,t),this.urlAfterRedirects=n,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class H extends A{constructor(e,t,n,i){super(e,t),this.urlAfterRedirects=n,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class W{constructor(e){this.route=e}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class V{constructor(e){this.route=e}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class B{constructor(e){this.snapshot=e}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class U{constructor(e){this.snapshot=e}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class q{constructor(e){this.snapshot=e}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class G{constructor(e){this.snapshot=e}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class J{constructor(e,t,n){this.routerEvent=e,this.position=t,this.anchor=n}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}const Q="primary";class K{constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){const t=this.params[e];return Array.isArray(t)?t[0]:t}return null}getAll(e){if(this.has(e)){const t=this.params[e];return Array.isArray(t)?t:[t]}return[]}get keys(){return Object.keys(this.params)}}function Z(e){return new K(e)}function X(e){const t=Error("NavigationCancelingError: "+e);return t.ngNavigationCancelingError=!0,t}function ee(e,t,n){const i=n.path.split("/");if(i.length>e.length)return null;if("full"===n.pathMatch&&(t.hasChildren()||i.length<e.length))return null;const r={};for(let s=0;s<i.length;s++){const t=i[s],n=e[s];if(t.startsWith(":"))r[t.substring(1)]=n;else if(t!==n.path)return null}return{consumed:e.slice(0,i.length),posParams:r}}function te(e,t){const n=Object.keys(e),i=Object.keys(t);if(!n||!i||n.length!=i.length)return!1;let r;for(let s=0;s<n.length;s++)if(r=n[s],!ne(e[r],t[r]))return!1;return!0}function ne(e,t){if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;const n=[...e].sort(),i=[...t].sort();return n.every((e,t)=>i[t]===e)}return e===t}function ie(e){return Array.prototype.concat.apply([],e)}function re(e){return e.length>0?e[e.length-1]:null}function se(e,t){for(const n in e)e.hasOwnProperty(n)&&t(e[n],n)}function oe(e){return Object(r.pb)(e)?e:Object(r.qb)(e)?Object(o.a)(Promise.resolve(e)):Object(s.a)(e)}function ae(e,t,n){return n?function(e,t){return te(e,t)}(e.queryParams,t.queryParams)&&function e(t,n){if(!de(t.segments,n.segments))return!1;if(t.numberOfChildren!==n.numberOfChildren)return!1;for(const i in n.children){if(!t.children[i])return!1;if(!e(t.children[i],n.children[i]))return!1}return!0}(e.root,t.root):function(e,t){return Object.keys(t).length<=Object.keys(e).length&&Object.keys(t).every(n=>ne(e[n],t[n]))}(e.queryParams,t.queryParams)&&function e(t,n){return function t(n,i,r){if(n.segments.length>r.length)return!!de(n.segments.slice(0,r.length),r)&&!i.hasChildren();if(n.segments.length===r.length){if(!de(n.segments,r))return!1;for(const t in i.children){if(!n.children[t])return!1;if(!e(n.children[t],i.children[t]))return!1}return!0}{const e=r.slice(0,n.segments.length),s=r.slice(n.segments.length);return!!de(n.segments,e)&&!!n.children.primary&&t(n.children.primary,i,s)}}(t,n,n.segments)}(e.root,t.root)}class ce{constructor(e,t,n){this.root=e,this.queryParams=t,this.fragment=n}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Z(this.queryParams)),this._queryParamMap}toString(){return me.serialize(this)}}class le{constructor(e,t){this.segments=e,this.children=t,this.parent=null,se(t,(e,t)=>e.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return be(this)}}class ue{constructor(e,t){this.path=e,this.parameters=t}get parameterMap(){return this._parameterMap||(this._parameterMap=Z(this.parameters)),this._parameterMap}toString(){return Se(this)}}function de(e,t){return e.length===t.length&&e.every((e,n)=>e.path===t[n].path)}function he(e,t){let n=[];return se(e.children,(e,i)=>{i===Q&&(n=n.concat(t(e,i)))}),se(e.children,(e,i)=>{i!==Q&&(n=n.concat(t(e,i)))}),n}class fe{}class pe{parse(e){const t=new Te(e);return new ce(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}serialize(e){return`${"/"+function e(t,n){if(!t.hasChildren())return be(t);if(n){const n=t.children.primary?e(t.children.primary,!1):"",i=[];return se(t.children,(t,n)=>{n!==Q&&i.push(`${n}:${e(t,!1)}`)}),i.length>0?`${n}(${i.join("//")})`:n}{const n=he(t,(n,i)=>i===Q?[e(t.children.primary,!1)]:[`${i}:${e(n,!1)}`]);return 1===Object.keys(t.children).length&&null!=t.children.primary?`${be(t)}/${n[0]}`:`${be(t)}/(${n.join("//")})`}}(e.root,!0)}${function(e){const t=Object.keys(e).map(t=>{const n=e[t];return Array.isArray(n)?n.map(e=>`${_e(t)}=${_e(e)}`).join("&"):`${_e(t)}=${_e(n)}`});return t.length?"?"+t.join("&"):""}(e.queryParams)}${"string"==typeof e.fragment?"#"+encodeURI(e.fragment):""}`}}const me=new pe;function be(e){return e.segments.map(e=>Se(e)).join("/")}function ge(e){return encodeURIComponent(e).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function _e(e){return ge(e).replace(/%3B/gi,";")}function ye(e){return ge(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function ve(e){return decodeURIComponent(e)}function we(e){return ve(e.replace(/\+/g,"%20"))}function Se(e){return`${ye(e.path)}${t=e.parameters,Object.keys(t).map(e=>`;${ye(e)}=${ye(t[e])}`).join("")}`;var t}const Me=/^[^\/()?;=#]+/;function xe(e){const t=e.match(Me);return t?t[0]:""}const ke=/^[^=?&#]+/,De=/^[^?&#]+/;class Te{constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new le([],{}):new le([],this.parseChildren())}parseQueryParams(){const e={};if(this.consumeOptional("?"))do{this.parseQueryParam(e)}while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(e.length>0||Object.keys(t).length>0)&&(n.primary=new le(e,t)),n}parseSegment(){const e=xe(this.remaining);if(""===e&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(e),new ue(ve(e),this.parseMatrixParams())}parseMatrixParams(){const e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){const t=xe(this.remaining);if(!t)return;this.capture(t);let n="";if(this.consumeOptional("=")){const e=xe(this.remaining);e&&(n=e,this.capture(n))}e[ve(t)]=ve(n)}parseQueryParam(e){const t=function(e){const t=e.match(ke);return t?t[0]:""}(this.remaining);if(!t)return;this.capture(t);let n="";if(this.consumeOptional("=")){const e=function(e){const t=e.match(De);return t?t[0]:""}(this.remaining);e&&(n=e,this.capture(n))}const i=we(t),r=we(n);if(e.hasOwnProperty(i)){let t=e[i];Array.isArray(t)||(t=[t],e[i]=t),t.push(r)}else e[i]=r}parseParens(e){const t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const n=xe(this.remaining),i=this.remaining[n.length];if("/"!==i&&")"!==i&&";"!==i)throw new Error(`Cannot parse url '${this.url}'`);let r=void 0;n.indexOf(":")>-1?(r=n.substr(0,n.indexOf(":")),this.capture(r),this.capture(":")):e&&(r=Q);const s=this.parseChildren();t[r]=1===Object.keys(s).length?s.primary:new le([],s),this.consumeOptional("//")}return t}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return!!this.peekStartsWith(e)&&(this.remaining=this.remaining.substring(e.length),!0)}capture(e){if(!this.consumeOptional(e))throw new Error(`Expected "${e}".`)}}class Ce{constructor(e){this._root=e}get root(){return this._root.value}parent(e){const t=this.pathFromRoot(e);return t.length>1?t[t.length-2]:null}children(e){const t=Oe(e,this._root);return t?t.children.map(e=>e.value):[]}firstChild(e){const t=Oe(e,this._root);return t&&t.children.length>0?t.children[0].value:null}siblings(e){const t=Le(e,this._root);return t.length<2?[]:t[t.length-2].children.map(e=>e.value).filter(t=>t!==e)}pathFromRoot(e){return Le(e,this._root).map(e=>e.value)}}function Oe(e,t){if(e===t.value)return t;for(const n of t.children){const t=Oe(e,n);if(t)return t}return null}function Le(e,t){if(e===t.value)return[t];for(const n of t.children){const i=Le(e,n);if(i.length)return i.unshift(t),i}return[]}class Re{constructor(e,t){this.value=e,this.children=t}toString(){return`TreeNode(${this.value})`}}function Ee(e){const t={};return e&&e.children.forEach(e=>t[e.value.outlet]=e),t}class Ae extends Ce{constructor(e,t){super(e),this.snapshot=t,Ye(this,e)}toString(){return this.snapshot.toString()}}function Ie(e,t){const n=function(e,t){const n=new Ne([],{},{},"",{},Q,t,null,e.root,-1,{});return new Fe("",new Re(n,[]))}(e,t),i=new a.a([new ue("",{})]),r=new a.a({}),s=new a.a({}),o=new a.a({}),c=new a.a(""),l=new Pe(i,r,o,c,s,Q,t,n.root);return l.snapshot=n.root,new Ae(new Re(l,[]),n)}class Pe{constructor(e,t,n,i,r,s,o,a){this.url=e,this.params=t,this.queryParams=n,this.fragment=i,this.data=r,this.outlet=s,this.component=o,this._futureSnapshot=a}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(Object(p.a)(e=>Z(e)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(Object(p.a)(e=>Z(e)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function je(e,t="emptyOnly"){const n=e.pathFromRoot;let i=0;if("always"!==t)for(i=n.length-1;i>=1;){const e=n[i],t=n[i-1];if(e.routeConfig&&""===e.routeConfig.path)i--;else{if(t.component)break;i--}}return function(e){return e.reduce((e,t)=>({params:Object.assign(Object.assign({},e.params),t.params),data:Object.assign(Object.assign({},e.data),t.data),resolve:Object.assign(Object.assign({},e.resolve),t._resolvedData)}),{params:{},data:{},resolve:{}})}(n.slice(i))}class Ne{constructor(e,t,n,i,r,s,o,a,c,l,u){this.url=e,this.params=t,this.queryParams=n,this.fragment=i,this.data=r,this.outlet=s,this.component=o,this.routeConfig=a,this._urlSegment=c,this._lastPathIndex=l,this._resolve=u}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=Z(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=Z(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(e=>e.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class Fe extends Ce{constructor(e,t){super(t),this.url=e,Ye(this,t)}toString(){return ze(this._root)}}function Ye(e,t){t.value._routerState=e,t.children.forEach(t=>Ye(e,t))}function ze(e){const t=e.children.length>0?` { ${e.children.map(ze).join(", ")} } `:"";return`${e.value}${t}`}function $e(e){if(e.snapshot){const t=e.snapshot,n=e._futureSnapshot;e.snapshot=n,te(t.queryParams,n.queryParams)||e.queryParams.next(n.queryParams),t.fragment!==n.fragment&&e.fragment.next(n.fragment),te(t.params,n.params)||e.params.next(n.params),function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(!te(e[n],t[n]))return!1;return!0}(t.url,n.url)||e.url.next(n.url),te(t.data,n.data)||e.data.next(n.data)}else e.snapshot=e._futureSnapshot,e.data.next(e._futureSnapshot.data)}function He(e,t){var n,i;return te(e.params,t.params)&&de(n=e.url,i=t.url)&&n.every((e,t)=>te(e.parameters,i[t].parameters))&&!(!e.parent!=!t.parent)&&(!e.parent||He(e.parent,t.parent))}function We(e){return"object"==typeof e&&null!=e&&!e.outlets&&!e.segmentPath}function Ve(e,t,n,i,r){let s={};return i&&se(i,(e,t)=>{s[t]=Array.isArray(e)?e.map(e=>""+e):""+e}),new ce(n.root===e?t:function e(t,n,i){const r={};return se(t.children,(t,s)=>{r[s]=t===n?i:e(t,n,i)}),new le(t.segments,r)}(n.root,e,t),s,r)}class Be{constructor(e,t,n){if(this.isAbsolute=e,this.numberOfDoubleDots=t,this.commands=n,e&&n.length>0&&We(n[0]))throw new Error("Root segment cannot have matrix parameters");const i=n.find(e=>"object"==typeof e&&null!=e&&e.outlets);if(i&&i!==re(n))throw new Error("{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class Ue{constructor(e,t,n){this.segmentGroup=e,this.processChildren=t,this.index=n}}function qe(e){return"object"==typeof e&&null!=e&&e.outlets?e.outlets.primary:""+e}function Ge(e,t,n){if(e||(e=new le([],{})),0===e.segments.length&&e.hasChildren())return Je(e,t,n);const i=function(e,t,n){let i=0,r=t;const s={match:!1,pathIndex:0,commandIndex:0};for(;r<e.segments.length;){if(i>=n.length)return s;const t=e.segments[r],o=qe(n[i]),a=i<n.length-1?n[i+1]:null;if(r>0&&void 0===o)break;if(o&&a&&"object"==typeof a&&void 0===a.outlets){if(!Xe(o,a,t))return s;i+=2}else{if(!Xe(o,{},t))return s;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(e,t,n),r=n.slice(i.commandIndex);if(i.match&&i.pathIndex<e.segments.length){const t=new le(e.segments.slice(0,i.pathIndex),{});return t.children.primary=new le(e.segments.slice(i.pathIndex),e.children),Je(t,0,r)}return i.match&&0===r.length?new le(e.segments,{}):i.match&&!e.hasChildren()?Qe(e,t,n):i.match?Je(e,0,r):Qe(e,t,n)}function Je(e,t,n){if(0===n.length)return new le(e.segments,{});{const i=function(e){return"object"==typeof e[0]&&null!==e[0]&&e[0].outlets?e[0].outlets:{[Q]:e}}(n),r={};return se(i,(n,i)=>{null!==n&&(r[i]=Ge(e.children[i],t,n))}),se(e.children,(e,t)=>{void 0===i[t]&&(r[t]=e)}),new le(e.segments,r)}}function Qe(e,t,n){const i=e.segments.slice(0,t);let r=0;for(;r<n.length;){if("object"==typeof n[r]&&null!==n[r]&&void 0!==n[r].outlets){const e=Ke(n[r].outlets);return new le(i,e)}if(0===r&&We(n[0])){i.push(new ue(e.segments[t].path,n[0])),r++;continue}const s=qe(n[r]),o=r<n.length-1?n[r+1]:null;s&&o&&We(o)?(i.push(new ue(s,Ze(o))),r+=2):(i.push(new ue(s,{})),r++)}return new le(i,{})}function Ke(e){const t={};return se(e,(e,n)=>{null!==e&&(t[n]=Qe(new le([],{}),0,e))}),t}function Ze(e){const t={};return se(e,(e,n)=>t[n]=""+e),t}function Xe(e,t,n){return e==n.path&&te(t,n.parameters)}class et{constructor(e,t,n,i){this.routeReuseStrategy=e,this.futureState=t,this.currState=n,this.forwardEvent=i}activate(e){const t=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,n,e),$e(this.futureState.root),this.activateChildRoutes(t,n,e)}deactivateChildRoutes(e,t,n){const i=Ee(t);e.children.forEach(e=>{const t=e.value.outlet;this.deactivateRoutes(e,i[t],n),delete i[t]}),se(i,(e,t)=>{this.deactivateRouteAndItsChildren(e,n)})}deactivateRoutes(e,t,n){const i=e.value,r=t?t.value:null;if(i===r)if(i.component){const r=n.getContext(i.outlet);r&&this.deactivateChildRoutes(e,t,r.children)}else this.deactivateChildRoutes(e,t,n);else r&&this.deactivateRouteAndItsChildren(t,n)}deactivateRouteAndItsChildren(e,t){this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,t):this.deactivateRouteAndOutlet(e,t)}detachAndStoreRouteSubtree(e,t){const n=t.getContext(e.value.outlet);if(n&&n.outlet){const t=n.outlet.detach(),i=n.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:t,route:e,contexts:i})}}deactivateRouteAndOutlet(e,t){const n=t.getContext(e.value.outlet);if(n){const i=Ee(e),r=e.value.component?n.children:t;se(i,(e,t)=>this.deactivateRouteAndItsChildren(e,r)),n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated())}}activateChildRoutes(e,t,n){const i=Ee(t);e.children.forEach(e=>{this.activateRoutes(e,i[e.value.outlet],n),this.forwardEvent(new G(e.value.snapshot))}),e.children.length&&this.forwardEvent(new U(e.value.snapshot))}activateRoutes(e,t,n){const i=e.value,r=t?t.value:null;if($e(i),i===r)if(i.component){const r=n.getOrCreateContext(i.outlet);this.activateChildRoutes(e,t,r.children)}else this.activateChildRoutes(e,t,n);else if(i.component){const t=n.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){const e=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),t.children.onOutletReAttached(e.contexts),t.attachRef=e.componentRef,t.route=e.route.value,t.outlet&&t.outlet.attach(e.componentRef,e.route.value),tt(e.route)}else{const n=function(e){for(let t=e.parent;t;t=t.parent){const e=t.routeConfig;if(e&&e._loadedConfig)return e._loadedConfig;if(e&&e.component)return null}return null}(i.snapshot),r=n?n.module.componentFactoryResolver:null;t.attachRef=null,t.route=i,t.resolver=r,t.outlet&&t.outlet.activateWith(i,r),this.activateChildRoutes(e,null,t.children)}}else this.activateChildRoutes(e,null,n)}}function tt(e){$e(e.value),e.children.forEach(tt)}class nt{constructor(e,t){this.routes=e,this.module=t}}function it(e){return"function"==typeof e}function rt(e){return e instanceof ce}const st=Symbol("INITIAL_VALUE");function ot(){return Object(g.a)(e=>Object(c.a)(...e.map(e=>e.pipe(Object(_.a)(1),Object(y.a)(st)))).pipe(Object(v.a)((e,t)=>{let n=!1;return t.reduce((e,i,r)=>{if(e!==st)return e;if(i===st&&(n=!0),!n){if(!1===i)return i;if(r===t.length-1||rt(i))return i}return e},e)},st),Object(w.a)(e=>e!==st),Object(p.a)(e=>rt(e)?e:!0===e),Object(_.a)(1)))}class at{constructor(e){this.segmentGroup=e||null}}class ct{constructor(e){this.urlTree=e}}function lt(e){return new l.a(t=>t.error(new at(e)))}function ut(e){return new l.a(t=>t.error(new ct(e)))}function dt(e){return new l.a(t=>t.error(new Error(`Only absolute redirects can have named outlets. redirectTo: '${e}'`)))}class ht{constructor(e,t,n,i,s){this.configLoader=t,this.urlSerializer=n,this.urlTree=i,this.config=s,this.allowRedirects=!0,this.ngModule=e.get(r.y)}apply(){return this.expandSegmentGroup(this.ngModule,this.config,this.urlTree.root,Q).pipe(Object(p.a)(e=>this.createUrlTree(e,this.urlTree.queryParams,this.urlTree.fragment))).pipe(Object(S.a)(e=>{if(e instanceof ct)return this.allowRedirects=!1,this.match(e.urlTree);if(e instanceof at)throw this.noMatchError(e);throw e}))}match(e){return this.expandSegmentGroup(this.ngModule,this.config,e.root,Q).pipe(Object(p.a)(t=>this.createUrlTree(t,e.queryParams,e.fragment))).pipe(Object(S.a)(e=>{if(e instanceof at)throw this.noMatchError(e);throw e}))}noMatchError(e){return new Error(`Cannot match any routes. URL Segment: '${e.segmentGroup}'`)}createUrlTree(e,t,n){const i=e.segments.length>0?new le([],{[Q]:e}):e;return new ce(i,t,n)}expandSegmentGroup(e,t,n,i){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(e,t,n).pipe(Object(p.a)(e=>new le([],e))):this.expandSegment(e,n,t,n.segments,i,!0)}expandChildren(e,t,n){return function(e,t){if(0===Object.keys(e).length)return Object(s.a)({});const n=[],i=[],r={};return se(e,(e,s)=>{const o=t(s,e).pipe(Object(p.a)(e=>r[s]=e));s===Q?n.push(o):i.push(o)}),s.a.apply(null,n.concat(i)).pipe(Object(m.a)(),Object(b.a)(),Object(p.a)(()=>r))}(n.children,(n,i)=>this.expandSegmentGroup(e,t,i,n))}expandSegment(e,t,n,i,r,o){return Object(s.a)(...n).pipe(Object(M.a)(a=>this.expandSegmentAgainstRoute(e,t,n,a,i,r,o).pipe(Object(S.a)(e=>{if(e instanceof at)return Object(s.a)(null);throw e}))),Object(x.a)(e=>!!e),Object(S.a)((e,n)=>{if(e instanceof u.a||"EmptyError"===e.name){if(this.noLeftoversInUrl(t,i,r))return Object(s.a)(new le([],{}));throw new at(t)}throw e}))}noLeftoversInUrl(e,t,n){return 0===t.length&&!e.children[n]}expandSegmentAgainstRoute(e,t,n,i,r,s,o){return bt(i)!==s?lt(t):void 0===i.redirectTo?this.matchSegmentAgainstRoute(e,t,i,r):o&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(e,t,n,i,r,s):lt(t)}expandSegmentAgainstRouteUsingRedirect(e,t,n,i,r,s){return"**"===i.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(e,n,i,s):this.expandRegularSegmentAgainstRouteUsingRedirect(e,t,n,i,r,s)}expandWildCardWithParamsAgainstRouteUsingRedirect(e,t,n,i){const r=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?ut(r):this.lineralizeSegments(n,r).pipe(Object(k.a)(n=>{const r=new le(n,{});return this.expandSegment(e,r,t,n,i,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(e,t,n,i,r,s){const{matched:o,consumedSegments:a,lastChild:c,positionalParamSegments:l}=ft(t,i,r);if(!o)return lt(t);const u=this.applyRedirectCommands(a,i.redirectTo,l);return i.redirectTo.startsWith("/")?ut(u):this.lineralizeSegments(i,u).pipe(Object(k.a)(i=>this.expandSegment(e,t,n,i.concat(r.slice(c)),s,!1)))}matchSegmentAgainstRoute(e,t,n,i){if("**"===n.path)return n.loadChildren?this.configLoader.load(e.injector,n).pipe(Object(p.a)(e=>(n._loadedConfig=e,new le(i,{})))):Object(s.a)(new le(i,{}));const{matched:r,consumedSegments:o,lastChild:a}=ft(t,n,i);if(!r)return lt(t);const c=i.slice(a);return this.getChildConfig(e,n,i).pipe(Object(k.a)(e=>{const n=e.module,i=e.routes,{segmentGroup:r,slicedSegments:a}=function(e,t,n,i){return n.length>0&&function(e,t,n){return n.some(n=>mt(e,t,n)&&bt(n)!==Q)}(e,n,i)?{segmentGroup:pt(new le(t,function(e,t){const n={};n.primary=t;for(const i of e)""===i.path&&bt(i)!==Q&&(n[bt(i)]=new le([],{}));return n}(i,new le(n,e.children)))),slicedSegments:[]}:0===n.length&&function(e,t,n){return n.some(n=>mt(e,t,n))}(e,n,i)?{segmentGroup:pt(new le(e.segments,function(e,t,n,i){const r={};for(const s of n)mt(e,t,s)&&!i[bt(s)]&&(r[bt(s)]=new le([],{}));return Object.assign(Object.assign({},i),r)}(e,n,i,e.children))),slicedSegments:n}:{segmentGroup:e,slicedSegments:n}}(t,o,c,i);return 0===a.length&&r.hasChildren()?this.expandChildren(n,i,r).pipe(Object(p.a)(e=>new le(o,e))):0===i.length&&0===a.length?Object(s.a)(new le(o,{})):this.expandSegment(n,r,i,a,Q,!0).pipe(Object(p.a)(e=>new le(o.concat(e.segments),e.children)))}))}getChildConfig(e,t,n){return t.children?Object(s.a)(new nt(t.children,e)):t.loadChildren?void 0!==t._loadedConfig?Object(s.a)(t._loadedConfig):this.runCanLoadGuards(e.injector,t,n).pipe(Object(k.a)(n=>n?this.configLoader.load(e.injector,t).pipe(Object(p.a)(e=>(t._loadedConfig=e,e))):function(e){return new l.a(t=>t.error(X(`Cannot load children because the guard of the route "path: '${e.path}'" returned false`)))}(t))):Object(s.a)(new nt([],e))}runCanLoadGuards(e,t,n){const i=t.canLoad;if(!i||0===i.length)return Object(s.a)(!0);const r=i.map(i=>{const r=e.get(i);let s;if(function(e){return e&&it(e.canLoad)}(r))s=r.canLoad(t,n);else{if(!it(r))throw new Error("Invalid CanLoad guard");s=r(t,n)}return oe(s)});return Object(s.a)(r).pipe(ot(),Object(D.a)(e=>{if(!rt(e))return;const t=X(`Redirecting to "${this.urlSerializer.serialize(e)}"`);throw t.url=e,t}),Object(p.a)(e=>!0===e))}lineralizeSegments(e,t){let n=[],i=t.root;for(;;){if(n=n.concat(i.segments),0===i.numberOfChildren)return Object(s.a)(n);if(i.numberOfChildren>1||!i.children.primary)return dt(e.redirectTo);i=i.children.primary}}applyRedirectCommands(e,t,n){return this.applyRedirectCreatreUrlTree(t,this.urlSerializer.parse(t),e,n)}applyRedirectCreatreUrlTree(e,t,n,i){const r=this.createSegmentGroup(e,t.root,n,i);return new ce(r,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}createQueryParams(e,t){const n={};return se(e,(e,i)=>{if("string"==typeof e&&e.startsWith(":")){const r=e.substring(1);n[i]=t[r]}else n[i]=e}),n}createSegmentGroup(e,t,n,i){const r=this.createSegments(e,t.segments,n,i);let s={};return se(t.children,(t,r)=>{s[r]=this.createSegmentGroup(e,t,n,i)}),new le(r,s)}createSegments(e,t,n,i){return t.map(t=>t.path.startsWith(":")?this.findPosParam(e,t,i):this.findOrReturn(t,n))}findPosParam(e,t,n){const i=n[t.path.substring(1)];if(!i)throw new Error(`Cannot redirect to '${e}'. Cannot find '${t.path}'.`);return i}findOrReturn(e,t){let n=0;for(const i of t){if(i.path===e.path)return t.splice(n),i;n++}return e}}function ft(e,t,n){if(""===t.path)return"full"===t.pathMatch&&(e.hasChildren()||n.length>0)?{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}:{matched:!0,consumedSegments:[],lastChild:0,positionalParamSegments:{}};const i=(t.matcher||ee)(n,e,t);return i?{matched:!0,consumedSegments:i.consumed,lastChild:i.consumed.length,positionalParamSegments:i.posParams}:{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}}function pt(e){if(1===e.numberOfChildren&&e.children.primary){const t=e.children.primary;return new le(e.segments.concat(t.segments),t.children)}return e}function mt(e,t,n){return(!(e.hasChildren()||t.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0!==n.redirectTo}function bt(e){return e.outlet||Q}class gt{constructor(e){this.path=e,this.route=this.path[this.path.length-1]}}class _t{constructor(e,t){this.component=e,this.route=t}}function yt(e,t,n){const i=e._root;return function e(t,n,i,r,s={canDeactivateChecks:[],canActivateChecks:[]}){const o=Ee(n);return t.children.forEach(t=>{!function(t,n,i,r,s={canDeactivateChecks:[],canActivateChecks:[]}){const o=t.value,a=n?n.value:null,c=i?i.getContext(t.value.outlet):null;if(a&&o.routeConfig===a.routeConfig){const l=function(e,t,n){if("function"==typeof n)return n(e,t);switch(n){case"pathParamsChange":return!de(e.url,t.url);case"pathParamsOrQueryParamsChange":return!de(e.url,t.url)||!te(e.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!He(e,t)||!te(e.queryParams,t.queryParams);case"paramsChange":default:return!He(e,t)}}(a,o,o.routeConfig.runGuardsAndResolvers);l?s.canActivateChecks.push(new gt(r)):(o.data=a.data,o._resolvedData=a._resolvedData),e(t,n,o.component?c?c.children:null:i,r,s),l&&c&&c.outlet&&c.outlet.isActivated&&s.canDeactivateChecks.push(new _t(c.outlet.component,a))}else a&&wt(n,c,s),s.canActivateChecks.push(new gt(r)),e(t,null,o.component?c?c.children:null:i,r,s)}(t,o[t.value.outlet],i,r.concat([t.value]),s),delete o[t.value.outlet]}),se(o,(e,t)=>wt(e,i.getContext(t),s)),s}(i,t?t._root:null,n,[i.value])}function vt(e,t,n){const i=function(e){if(!e)return null;for(let t=e.parent;t;t=t.parent){const e=t.routeConfig;if(e&&e._loadedConfig)return e._loadedConfig}return null}(t);return(i?i.module.injector:n).get(e)}function wt(e,t,n){const i=Ee(e),r=e.value;se(i,(e,i)=>{wt(e,r.component?t?t.children.getContext(i):null:t,n)}),n.canDeactivateChecks.push(new _t(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}function St(e,t){return null!==e&&t&&t(new q(e)),Object(s.a)(!0)}function Mt(e,t){return null!==e&&t&&t(new B(e)),Object(s.a)(!0)}function xt(e,t,n){const i=t.routeConfig?t.routeConfig.canActivate:null;if(!i||0===i.length)return Object(s.a)(!0);const r=i.map(i=>h(()=>{const r=vt(i,t,n);let s;if(function(e){return e&&it(e.canActivate)}(r))s=oe(r.canActivate(t,e));else{if(!it(r))throw new Error("Invalid CanActivate guard");s=oe(r(t,e))}return s.pipe(Object(x.a)())}));return Object(s.a)(r).pipe(ot())}function kt(e,t,n){const i=t[t.length-1],r=t.slice(0,t.length-1).reverse().map(e=>function(e){const t=e.routeConfig?e.routeConfig.canActivateChild:null;return t&&0!==t.length?{node:e,guards:t}:null}(e)).filter(e=>null!==e).map(t=>h(()=>{const r=t.guards.map(r=>{const s=vt(r,t.node,n);let o;if(function(e){return e&&it(e.canActivateChild)}(s))o=oe(s.canActivateChild(i,e));else{if(!it(s))throw new Error("Invalid CanActivateChild guard");o=oe(s(i,e))}return o.pipe(Object(x.a)())});return Object(s.a)(r).pipe(ot())}));return Object(s.a)(r).pipe(ot())}class Dt{}class Tt{constructor(e,t,n,i,r,s){this.rootComponentType=e,this.config=t,this.urlTree=n,this.url=i,this.paramsInheritanceStrategy=r,this.relativeLinkResolution=s}recognize(){try{const e=Lt(this.urlTree.root,[],[],this.config,this.relativeLinkResolution).segmentGroup,t=this.processSegmentGroup(this.config,e,Q),n=new Ne([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},Q,this.rootComponentType,null,this.urlTree.root,-1,{}),i=new Re(n,t),r=new Fe(this.url,i);return this.inheritParamsAndData(r._root),Object(s.a)(r)}catch(e){return new l.a(t=>t.error(e))}}inheritParamsAndData(e){const t=e.value,n=je(t,this.paramsInheritanceStrategy);t.params=Object.freeze(n.params),t.data=Object.freeze(n.data),e.children.forEach(e=>this.inheritParamsAndData(e))}processSegmentGroup(e,t,n){return 0===t.segments.length&&t.hasChildren()?this.processChildren(e,t):this.processSegment(e,t,t.segments,n)}processChildren(e,t){const n=he(t,(t,n)=>this.processSegmentGroup(e,t,n));return function(e){const t={};e.forEach(e=>{const n=t[e.value.outlet];if(n){const t=n.url.map(e=>e.toString()).join("/"),i=e.value.url.map(e=>e.toString()).join("/");throw new Error(`Two segments cannot have the same outlet name: '${t}' and '${i}'.`)}t[e.value.outlet]=e.value})}(n),n.sort((e,t)=>e.value.outlet===Q?-1:t.value.outlet===Q?1:e.value.outlet.localeCompare(t.value.outlet)),n}processSegment(e,t,n,i){for(const s of e)try{return this.processSegmentAgainstRoute(s,t,n,i)}catch(r){if(!(r instanceof Dt))throw r}if(this.noLeftoversInUrl(t,n,i))return[];throw new Dt}noLeftoversInUrl(e,t,n){return 0===t.length&&!e.children[n]}processSegmentAgainstRoute(e,t,n,i){if(e.redirectTo)throw new Dt;if((e.outlet||Q)!==i)throw new Dt;let r,s=[],o=[];if("**"===e.path){const s=n.length>0?re(n).parameters:{};r=new Ne(n,s,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,At(e),i,e.component,e,Ct(t),Ot(t)+n.length,It(e))}else{const a=function(e,t,n){if(""===t.path){if("full"===t.pathMatch&&(e.hasChildren()||n.length>0))throw new Dt;return{consumedSegments:[],lastChild:0,parameters:{}}}const i=(t.matcher||ee)(n,e,t);if(!i)throw new Dt;const r={};se(i.posParams,(e,t)=>{r[t]=e.path});const s=i.consumed.length>0?Object.assign(Object.assign({},r),i.consumed[i.consumed.length-1].parameters):r;return{consumedSegments:i.consumed,lastChild:i.consumed.length,parameters:s}}(t,e,n);s=a.consumedSegments,o=n.slice(a.lastChild),r=new Ne(s,a.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,At(e),i,e.component,e,Ct(t),Ot(t)+s.length,It(e))}const a=function(e){return e.children?e.children:e.loadChildren?e._loadedConfig.routes:[]}(e),{segmentGroup:c,slicedSegments:l}=Lt(t,s,o,a,this.relativeLinkResolution);if(0===l.length&&c.hasChildren()){const e=this.processChildren(a,c);return[new Re(r,e)]}if(0===a.length&&0===l.length)return[new Re(r,[])];const u=this.processSegment(a,c,l,Q);return[new Re(r,u)]}}function Ct(e){let t=e;for(;t._sourceSegment;)t=t._sourceSegment;return t}function Ot(e){let t=e,n=t._segmentIndexShift?t._segmentIndexShift:0;for(;t._sourceSegment;)t=t._sourceSegment,n+=t._segmentIndexShift?t._segmentIndexShift:0;return n-1}function Lt(e,t,n,i,r){if(n.length>0&&function(e,t,n){return n.some(n=>Rt(e,t,n)&&Et(n)!==Q)}(e,n,i)){const r=new le(t,function(e,t,n,i){const r={};r.primary=i,i._sourceSegment=e,i._segmentIndexShift=t.length;for(const s of n)if(""===s.path&&Et(s)!==Q){const n=new le([],{});n._sourceSegment=e,n._segmentIndexShift=t.length,r[Et(s)]=n}return r}(e,t,i,new le(n,e.children)));return r._sourceSegment=e,r._segmentIndexShift=t.length,{segmentGroup:r,slicedSegments:[]}}if(0===n.length&&function(e,t,n){return n.some(n=>Rt(e,t,n))}(e,n,i)){const s=new le(e.segments,function(e,t,n,i,r,s){const o={};for(const a of i)if(Rt(e,n,a)&&!r[Et(a)]){const n=new le([],{});n._sourceSegment=e,n._segmentIndexShift="legacy"===s?e.segments.length:t.length,o[Et(a)]=n}return Object.assign(Object.assign({},r),o)}(e,t,n,i,e.children,r));return s._sourceSegment=e,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:n}}const s=new le(e.segments,e.children);return s._sourceSegment=e,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:n}}function Rt(e,t,n){return(!(e.hasChildren()||t.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0===n.redirectTo}function Et(e){return e.outlet||Q}function At(e){return e.data||{}}function It(e){return e.resolve||{}}function Pt(e){return function(t){return t.pipe(Object(g.a)(t=>{const n=e(t);return n?Object(o.a)(n).pipe(Object(p.a)(()=>t)):Object(o.a)([t])}))}}class jt extends class{shouldDetach(e){return!1}store(e,t){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,t){return e.routeConfig===t.routeConfig}}{}let Nt=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=r.Gb({type:e,selectors:[["ng-component"]],decls:1,vars:0,template:function(e,t){1&e&&r.Nb(0,"router-outlet")},directives:function(){return[tn]},encapsulation:2}),e})();function Ft(e,t=""){for(let n=0;n<e.length;n++){const i=e[n];Yt(i,zt(t,i))}}function Yt(e,t){if(!e)throw new Error(`\n Invalid configuration of route '${t}': Encountered undefined route.\n The reason might be an extra comma.\n\n Example:\n const routes: Routes = [\n { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n { path: 'dashboard', component: DashboardComponent },, << two commas\n { path: 'detail/:id', component: HeroDetailComponent }\n ];\n `);if(Array.isArray(e))throw new Error(`Invalid configuration of route '${t}': Array cannot be specified`);if(!e.component&&!e.children&&!e.loadChildren&&e.outlet&&e.outlet!==Q)throw new Error(`Invalid configuration of route '${t}': a componentless route without children or loadChildren cannot have a named outlet set`);if(e.redirectTo&&e.children)throw new Error(`Invalid configuration of route '${t}': redirectTo and children cannot be used together`);if(e.redirectTo&&e.loadChildren)throw new Error(`Invalid configuration of route '${t}': redirectTo and loadChildren cannot be used together`);if(e.children&&e.loadChildren)throw new Error(`Invalid configuration of route '${t}': children and loadChildren cannot be used together`);if(e.redirectTo&&e.component)throw new Error(`Invalid configuration of route '${t}': redirectTo and component cannot be used together`);if(e.path&&e.matcher)throw new Error(`Invalid configuration of route '${t}': path and matcher cannot be used together`);if(void 0===e.redirectTo&&!e.component&&!e.children&&!e.loadChildren)throw new Error(`Invalid configuration of route '${t}'. One of the following must be provided: component, redirectTo, children or loadChildren`);if(void 0===e.path&&void 0===e.matcher)throw new Error(`Invalid configuration of route '${t}': routes must have either a path or a matcher specified`);if("string"==typeof e.path&&"/"===e.path.charAt(0))throw new Error(`Invalid configuration of route '${t}': path cannot start with a slash`);if(""===e.path&&void 0!==e.redirectTo&&void 0===e.pathMatch)throw new Error(`Invalid configuration of route '{path: "${t}", redirectTo: "${e.redirectTo}"}': please provide 'pathMatch'. The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`);if(void 0!==e.pathMatch&&"full"!==e.pathMatch&&"prefix"!==e.pathMatch)throw new Error(`Invalid configuration of route '${t}': pathMatch can only be set to 'prefix' or 'full'`);e.children&&Ft(e.children,t)}function zt(e,t){return t?e||t.path?e&&!t.path?e+"/":!e&&t.path?t.path:`${e}/${t.path}`:"":e}function $t(e){const t=e.children&&e.children.map($t),n=t?Object.assign(Object.assign({},e),{children:t}):Object.assign({},e);return!n.component&&(t||n.loadChildren)&&n.outlet&&n.outlet!==Q&&(n.component=Nt),n}const Ht=new r.r("ROUTES");class Wt{constructor(e,t,n,i){this.loader=e,this.compiler=t,this.onLoadStartListener=n,this.onLoadEndListener=i}load(e,t){return this.onLoadStartListener&&this.onLoadStartListener(t),this.loadModuleFactory(t.loadChildren).pipe(Object(p.a)(n=>{this.onLoadEndListener&&this.onLoadEndListener(t);const i=n.create(e);return new nt(ie(i.injector.get(Ht)).map($t),i)}))}loadModuleFactory(e){return"string"==typeof e?Object(o.a)(this.loader.load(e)):oe(e()).pipe(Object(k.a)(e=>e instanceof r.w?Object(s.a)(e):Object(o.a)(this.compiler.compileModuleAsync(e))))}}class Vt{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.children=new Bt,this.attachRef=null}}class Bt{constructor(){this.contexts=new Map}onChildOutletCreated(e,t){const n=this.getOrCreateContext(e);n.outlet=t,this.contexts.set(e,n)}onChildOutletDestroyed(e){const t=this.getContext(e);t&&(t.outlet=null)}onOutletDeactivated(){const e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let t=this.getContext(e);return t||(t=new Vt,this.contexts.set(e,t)),t}getContext(e){return this.contexts.get(e)||null}}class Ut{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,t){return e}}function qt(e){throw e}function Gt(e,t,n){return t.parse("/")}function Jt(e,t){return Object(s.a)(null)}let Qt=(()=>{class e{constructor(e,t,n,i,s,o,c,l){this.rootComponentType=e,this.urlSerializer=t,this.rootContexts=n,this.location=i,this.config=l,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.lastLocationChangeInfo=null,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new f.a,this.errorHandler=qt,this.malformedUriErrorHandler=Gt,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:Jt,afterPreactivation:Jt},this.urlHandlingStrategy=new Ut,this.routeReuseStrategy=new jt,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="legacy",this.ngModule=s.get(r.y),this.console=s.get(r.X);const u=s.get(r.A);this.isNgZoneEnabled=u instanceof r.A,this.resetConfig(l),this.currentUrlTree=new ce(new le([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new Wt(o,c,e=>this.triggerEvent(new W(e)),e=>this.triggerEvent(new V(e))),this.routerState=Ie(this.currentUrlTree,this.rootComponentType),this.transitions=new a.a({id:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}setupNavigations(e){const t=this.events;return e.pipe(Object(w.a)(e=>0!==e.id),Object(p.a)(e=>Object.assign(Object.assign({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl)})),Object(g.a)(e=>{let n=!1,i=!1;return Object(s.a)(e).pipe(Object(D.a)(e=>{this.currentNavigation={id:e.id,initialUrl:e.currentRawUrl,extractedUrl:e.extractedUrl,trigger:e.source,extras:e.extras,previousNavigation:this.lastSuccessfulNavigation?Object.assign(Object.assign({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),Object(g.a)(e=>{const n=!this.navigated||e.extractedUrl.toString()!==this.browserUrlTree.toString();if(("reload"===this.onSameUrlNavigation||n)&&this.urlHandlingStrategy.shouldProcessUrl(e.rawUrl))return Object(s.a)(e).pipe(Object(g.a)(e=>{const n=this.transitions.getValue();return t.next(new I(e.id,this.serializeUrl(e.extractedUrl),e.source,e.restoredState)),n!==this.transitions.getValue()?d.a:[e]}),Object(g.a)(e=>Promise.resolve(e)),(i=this.ngModule.injector,r=this.configLoader,o=this.urlSerializer,a=this.config,function(e){return e.pipe(Object(g.a)(e=>function(e,t,n,i,r){return new ht(e,t,n,i,r).apply()}(i,r,o,e.extractedUrl,a).pipe(Object(p.a)(t=>Object.assign(Object.assign({},e),{urlAfterRedirects:t})))))}),Object(D.a)(e=>{this.currentNavigation=Object.assign(Object.assign({},this.currentNavigation),{finalUrl:e.urlAfterRedirects})}),function(e,t,n,i,r){return function(s){return s.pipe(Object(k.a)(s=>function(e,t,n,i,r="emptyOnly",s="legacy"){return new Tt(e,t,n,i,r,s).recognize()}(e,t,s.urlAfterRedirects,n(s.urlAfterRedirects),i,r).pipe(Object(p.a)(e=>Object.assign(Object.assign({},s),{targetSnapshot:e})))))}}(this.rootComponentType,this.config,e=>this.serializeUrl(e),this.paramsInheritanceStrategy,this.relativeLinkResolution),Object(D.a)(e=>{"eager"===this.urlUpdateStrategy&&(e.extras.skipLocationChange||this.setBrowserUrl(e.urlAfterRedirects,!!e.extras.replaceUrl,e.id,e.extras.state),this.browserUrlTree=e.urlAfterRedirects)}),Object(D.a)(e=>{const n=new F(e.id,this.serializeUrl(e.extractedUrl),this.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);t.next(n)}));var i,r,o,a;if(n&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:n,extractedUrl:i,source:r,restoredState:o,extras:a}=e,c=new I(n,this.serializeUrl(i),r,o);t.next(c);const l=Ie(i,this.rootComponentType).snapshot;return Object(s.a)(Object.assign(Object.assign({},e),{targetSnapshot:l,urlAfterRedirects:i,extras:Object.assign(Object.assign({},a),{skipLocationChange:!1,replaceUrl:!1})}))}return this.rawUrlTree=e.rawUrl,this.browserUrlTree=e.urlAfterRedirects,e.resolve(null),d.a}),Pt(e=>{const{targetSnapshot:t,id:n,extractedUrl:i,rawUrl:r,extras:{skipLocationChange:s,replaceUrl:o}}=e;return this.hooks.beforePreactivation(t,{navigationId:n,appliedUrlTree:i,rawUrlTree:r,skipLocationChange:!!s,replaceUrl:!!o})}),Object(D.a)(e=>{const t=new Y(e.id,this.serializeUrl(e.extractedUrl),this.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);this.triggerEvent(t)}),Object(p.a)(e=>Object.assign(Object.assign({},e),{guards:yt(e.targetSnapshot,e.currentSnapshot,this.rootContexts)})),function(e,t){return function(n){return n.pipe(Object(k.a)(n=>{const{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:a,canDeactivateChecks:c}}=n;return 0===c.length&&0===a.length?Object(s.a)(Object.assign(Object.assign({},n),{guardsResult:!0})):function(e,t,n,i){return Object(o.a)(e).pipe(Object(k.a)(e=>function(e,t,n,i,r){const o=t&&t.routeConfig?t.routeConfig.canDeactivate:null;if(!o||0===o.length)return Object(s.a)(!0);const a=o.map(s=>{const o=vt(s,t,r);let a;if(function(e){return e&&it(e.canDeactivate)}(o))a=oe(o.canDeactivate(e,t,n,i));else{if(!it(o))throw new Error("Invalid CanDeactivate guard");a=oe(o(e,t,n,i))}return a.pipe(Object(x.a)())});return Object(s.a)(a).pipe(ot())}(e.component,e.route,n,t,i)),Object(x.a)(e=>!0!==e,!0))}(c,i,r,e).pipe(Object(k.a)(n=>n&&"boolean"==typeof n?function(e,t,n,i){return Object(o.a)(t).pipe(Object(M.a)(t=>Object(o.a)([Mt(t.route.parent,i),St(t.route,i),kt(e,t.path,n),xt(e,t.route,n)]).pipe(Object(m.a)(),Object(x.a)(e=>!0!==e,!0))),Object(x.a)(e=>!0!==e,!0))}(i,a,e,t):Object(s.a)(n)),Object(p.a)(e=>Object.assign(Object.assign({},n),{guardsResult:e})))}))}}(this.ngModule.injector,e=>this.triggerEvent(e)),Object(D.a)(e=>{if(rt(e.guardsResult)){const t=X(`Redirecting to "${this.serializeUrl(e.guardsResult)}"`);throw t.url=e.guardsResult,t}}),Object(D.a)(e=>{const t=new z(e.id,this.serializeUrl(e.extractedUrl),this.serializeUrl(e.urlAfterRedirects),e.targetSnapshot,!!e.guardsResult);this.triggerEvent(t)}),Object(w.a)(e=>{if(!e.guardsResult){this.resetUrlToCurrentUrlTree();const n=new j(e.id,this.serializeUrl(e.extractedUrl),"");return t.next(n),e.resolve(!1),!1}return!0}),Pt(e=>{if(e.guards.canActivateChecks.length)return Object(s.a)(e).pipe(Object(D.a)(e=>{const t=new $(e.id,this.serializeUrl(e.extractedUrl),this.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);this.triggerEvent(t)}),Object(g.a)(e=>{let n=!1;return Object(s.a)(e).pipe((i=this.paramsInheritanceStrategy,r=this.ngModule.injector,function(e){return e.pipe(Object(k.a)(e=>{const{targetSnapshot:t,guards:{canActivateChecks:n}}=e;if(!n.length)return Object(s.a)(e);let a=0;return Object(o.a)(n).pipe(Object(M.a)(e=>function(e,t,n,i){return function(e,t,n,i){const r=Object.keys(e);if(0===r.length)return Object(s.a)({});const a={};return Object(o.a)(r).pipe(Object(k.a)(r=>function(e,t,n,i){const r=vt(e,t,i);return oe(r.resolve?r.resolve(t,n):r(t,n))}(e[r],t,n,i).pipe(Object(D.a)(e=>{a[r]=e}))),Object(T.a)(1),Object(k.a)(()=>Object.keys(a).length===r.length?Object(s.a)(a):d.a))}(e._resolve,e,t,i).pipe(Object(p.a)(t=>(e._resolvedData=t,e.data=Object.assign(Object.assign({},e.data),je(e,n).resolve),null)))}(e.route,t,i,r)),Object(D.a)(()=>a++),Object(T.a)(1),Object(k.a)(t=>a===n.length?Object(s.a)(e):d.a))}))}),Object(D.a)({next:()=>n=!0,complete:()=>{if(!n){const n=new j(e.id,this.serializeUrl(e.extractedUrl),"At least one route resolver didn't emit any value.");t.next(n),e.resolve(!1)}}}));var i,r}),Object(D.a)(e=>{const t=new H(e.id,this.serializeUrl(e.extractedUrl),this.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);this.triggerEvent(t)}))}),Pt(e=>{const{targetSnapshot:t,id:n,extractedUrl:i,rawUrl:r,extras:{skipLocationChange:s,replaceUrl:o}}=e;return this.hooks.afterPreactivation(t,{navigationId:n,appliedUrlTree:i,rawUrlTree:r,skipLocationChange:!!s,replaceUrl:!!o})}),Object(p.a)(e=>{const t=function(e,t,n){const i=function e(t,n,i){if(i&&t.shouldReuseRoute(n.value,i.value.snapshot)){const r=i.value;r._futureSnapshot=n.value;const s=function(t,n,i){return n.children.map(n=>{for(const r of i.children)if(t.shouldReuseRoute(r.value.snapshot,n.value))return e(t,n,r);return e(t,n)})}(t,n,i);return new Re(r,s)}{const i=t.retrieve(n.value);if(i){const e=i.route;return function e(t,n){if(t.value.routeConfig!==n.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(t.children.length!==n.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");n.value._futureSnapshot=t.value;for(let i=0;i<t.children.length;++i)e(t.children[i],n.children[i])}(n,e),e}{const i=new Pe(new a.a((r=n.value).url),new a.a(r.params),new a.a(r.queryParams),new a.a(r.fragment),new a.a(r.data),r.outlet,r.component,r),s=n.children.map(n=>e(t,n));return new Re(i,s)}}var r}(e,t._root,n?n._root:void 0);return new Ae(i,t)}(this.routeReuseStrategy,e.targetSnapshot,e.currentRouterState);return Object.assign(Object.assign({},e),{targetRouterState:t})}),Object(D.a)(e=>{this.currentUrlTree=e.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.rawUrl),this.routerState=e.targetRouterState,"deferred"===this.urlUpdateStrategy&&(e.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,!!e.extras.replaceUrl,e.id,e.extras.state),this.browserUrlTree=e.urlAfterRedirects)}),(c=this.rootContexts,l=this.routeReuseStrategy,u=e=>this.triggerEvent(e),Object(p.a)(e=>(new et(l,e.targetRouterState,e.currentRouterState,u).activate(c),e))),Object(D.a)({next(){n=!0},complete(){n=!0}}),(r=()=>{if(!n&&!i){this.resetUrlToCurrentUrlTree();const n=new j(e.id,this.serializeUrl(e.extractedUrl),`Navigation ID ${e.id} is not equal to the current navigation id ${this.navigationId}`);t.next(n),e.resolve(!1)}this.currentNavigation=null},e=>e.lift(new L(r))),Object(S.a)(n=>{if(i=!0,(r=n)&&r.ngNavigationCancelingError){const i=rt(n.url);i||(this.navigated=!0,this.resetStateAndUrl(e.currentRouterState,e.currentUrlTree,e.rawUrl));const r=new j(e.id,this.serializeUrl(e.extractedUrl),n.message);t.next(r),i?setTimeout(()=>{const t=this.urlHandlingStrategy.merge(n.url,this.rawUrlTree);return this.scheduleNavigation(t,"imperative",null,{skipLocationChange:e.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy},{resolve:e.resolve,reject:e.reject,promise:e.promise})},0):e.resolve(!1)}else{this.resetStateAndUrl(e.currentRouterState,e.currentUrlTree,e.rawUrl);const i=new N(e.id,this.serializeUrl(e.extractedUrl),n);t.next(i);try{e.resolve(this.errorHandler(n))}catch(s){e.reject(s)}}var r;return d.a}));var r,c,l,u}))}resetRootComponentType(e){this.rootComponentType=e,this.routerState.root.component=this.rootComponentType}getTransition(){const e=this.transitions.value;return e.urlAfterRedirects=this.browserUrlTree,e}setTransition(e){this.transitions.next(Object.assign(Object.assign({},this.getTransition()),e))}initialNavigation(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(e=>{const t=this.extractLocationChangeInfoFromEvent(e);this.shouldScheduleNavigation(this.lastLocationChangeInfo,t)&&setTimeout(()=>{const{source:e,state:n,urlTree:i}=t,r={replaceUrl:!0};if(n){const e=Object.assign({},n);delete e.navigationId,0!==Object.keys(e).length&&(r.state=e)}this.scheduleNavigation(i,e,n,r)},0),this.lastLocationChangeInfo=t}))}extractLocationChangeInfoFromEvent(e){var t;return{source:"popstate"===e.type?"popstate":"hashchange",urlTree:this.parseUrl(e.url),state:(null===(t=e.state)||void 0===t?void 0:t.navigationId)?e.state:null,transitionId:this.getTransition().id}}shouldScheduleNavigation(e,t){if(!e)return!0;const n=t.urlTree.toString()===e.urlTree.toString();return!(t.transitionId===e.transitionId&&n&&("hashchange"===t.source&&"popstate"===e.source||"popstate"===t.source&&"hashchange"===e.source))}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(e){this.events.next(e)}resetConfig(e){Ft(e),this.config=e.map($t),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0)}createUrlTree(e,t={}){const{relativeTo:n,queryParams:i,fragment:s,preserveQueryParams:o,queryParamsHandling:a,preserveFragment:c}=t;Object(r.U)()&&o&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead.");const l=n||this.routerState.root,u=c?this.currentUrlTree.fragment:s;let d=null;if(a)switch(a){case"merge":d=Object.assign(Object.assign({},this.currentUrlTree.queryParams),i);break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=i||null}else d=o?this.currentUrlTree.queryParams:i||null;return null!==d&&(d=this.removeEmptyProps(d)),function(e,t,n,i,r){if(0===n.length)return Ve(t.root,t.root,t,i,r);const s=function(e){if("string"==typeof e[0]&&1===e.length&&"/"===e[0])return new Be(!0,0,e);let t=0,n=!1;const i=e.reduce((e,i,r)=>{if("object"==typeof i&&null!=i){if(i.outlets){const t={};return se(i.outlets,(e,n)=>{t[n]="string"==typeof e?e.split("/"):e}),[...e,{outlets:t}]}if(i.segmentPath)return[...e,i.segmentPath]}return"string"!=typeof i?[...e,i]:0===r?(i.split("/").forEach((i,r)=>{0==r&&"."===i||(0==r&&""===i?n=!0:".."===i?t++:""!=i&&e.push(i))}),e):[...e,i]},[]);return new Be(n,t,i)}(n);if(s.toRoot())return Ve(t.root,new le([],{}),t,i,r);const o=function(e,t,n){if(e.isAbsolute)return new Ue(t.root,!0,0);if(-1===n.snapshot._lastPathIndex){const e=n.snapshot._urlSegment;return new Ue(e,e===t.root,0)}const i=We(e.commands[0])?0:1;return function(e,t,n){let i=e,r=t,s=n;for(;s>r;){if(s-=r,i=i.parent,!i)throw new Error("Invalid number of '../'");r=i.segments.length}return new Ue(i,!1,r-s)}(n.snapshot._urlSegment,n.snapshot._lastPathIndex+i,e.numberOfDoubleDots)}(s,t,e),a=o.processChildren?Je(o.segmentGroup,o.index,s.commands):Ge(o.segmentGroup,o.index,s.commands);return Ve(o.segmentGroup,a,t,i,r)}(l,this.currentUrlTree,e,d,u)}navigateByUrl(e,t={skipLocationChange:!1}){Object(r.U)()&&this.isNgZoneEnabled&&!r.A.isInAngularZone()&&this.console.warn("Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?");const n=rt(e)?e:this.parseUrl(e),i=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(i,"imperative",null,t)}navigate(e,t={skipLocationChange:!1}){return function(e){for(let t=0;t<e.length;t++){const n=e[t];if(null==n)throw new Error(`The requested path contains ${n} segment at index ${t}`)}}(e),this.navigateByUrl(this.createUrlTree(e,t),t)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){let t;try{t=this.urlSerializer.parse(e)}catch(n){t=this.malformedUriErrorHandler(n,this.urlSerializer,e)}return t}isActive(e,t){if(rt(e))return ae(this.currentUrlTree,e,t);const n=this.parseUrl(e);return ae(this.currentUrlTree,n,t)}removeEmptyProps(e){return Object.keys(e).reduce((t,n)=>{const i=e[n];return null!=i&&(t[n]=i),t},{})}processNavigations(){this.navigations.subscribe(e=>{this.navigated=!0,this.lastSuccessfulId=e.id,this.events.next(new P(e.id,this.serializeUrl(e.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,this.currentNavigation=null,e.resolve(!0)},e=>{this.console.warn("Unhandled Navigation Error: ")})}scheduleNavigation(e,t,n,i,r){const s=this.getTransition(),o="imperative"!==t&&"imperative"===(null==s?void 0:s.source),a=(this.lastSuccessfulId===s.id||this.currentNavigation?s.rawUrl:s.urlAfterRedirects).toString()===e.toString();if(o&&a)return Promise.resolve(!0);let c,l,u;r?(c=r.resolve,l=r.reject,u=r.promise):u=new Promise((e,t)=>{c=e,l=t});const d=++this.navigationId;return this.setTransition({id:d,source:t,restoredState:n,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:e,extras:i,resolve:c,reject:l,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch(e=>Promise.reject(e))}setBrowserUrl(e,t,n,i){const r=this.urlSerializer.serialize(e);i=i||{},this.location.isCurrentPathEqualTo(r)||t?this.location.replaceState(r,"",Object.assign(Object.assign({},i),{navigationId:n})):this.location.go(r,"",Object.assign(Object.assign({},i),{navigationId:n}))}resetStateAndUrl(e,t,n){this.routerState=e,this.currentUrlTree=t,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n),this.resetUrlToCurrentUrlTree()}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",{navigationId:this.lastSuccessfulId})}}return e.\u0275fac=function(t){return new(t||e)(r.dc(r.N),r.dc(fe),r.dc(Bt),r.dc(i.m),r.dc(r.s),r.dc(r.x),r.dc(r.i),r.dc(void 0))},e.\u0275prov=r.Ib({token:e,factory:e.\u0275fac}),e})(),Kt=(()=>{class e{constructor(e,t,n,i,r){this.router=e,this.route=t,this.commands=[],this.onChanges=new f.a,null==n&&i.setAttribute(r.nativeElement,"tabindex","0")}ngOnChanges(e){this.onChanges.next(this)}set routerLink(e){this.commands=null!=e?Array.isArray(e)?e:[e]:[]}set preserveQueryParams(e){Object(r.U)()&&console&&console.warn&&console.warn("preserveQueryParams is deprecated!, use queryParamsHandling instead."),this.preserve=e}onClick(){const e={skipLocationChange:Xt(this.skipLocationChange),replaceUrl:Xt(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,e),!0}get urlTree(){return this.router.createUrlTree(this.commands,{relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,preserveQueryParams:Xt(this.preserve),queryParamsHandling:this.queryParamsHandling,preserveFragment:Xt(this.preserveFragment)})}}return e.\u0275fac=function(t){return new(t||e)(r.Mb(Qt),r.Mb(Pe),r.ec("tabindex"),r.Mb(r.E),r.Mb(r.m))},e.\u0275dir=r.Hb({type:e,selectors:[["","routerLink","",5,"a",5,"area"]],hostBindings:function(e,t){1&e&&r.gc("click",(function(){return t.onClick()}))},inputs:{routerLink:"routerLink",preserveQueryParams:"preserveQueryParams",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state"},features:[r.wb]}),e})(),Zt=(()=>{class e{constructor(e,t,n){this.router=e,this.route=t,this.locationStrategy=n,this.commands=[],this.onChanges=new f.a,this.subscription=e.events.subscribe(e=>{e instanceof P&&this.updateTargetUrlAndHref()})}set routerLink(e){this.commands=null!=e?Array.isArray(e)?e:[e]:[]}set preserveQueryParams(e){Object(r.U)()&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead."),this.preserve=e}ngOnChanges(e){this.updateTargetUrlAndHref(),this.onChanges.next(this)}ngOnDestroy(){this.subscription.unsubscribe()}onClick(e,t,n,i,r){if(0!==e||t||n||i||r)return!0;if("string"==typeof this.target&&"_self"!=this.target)return!0;const s={skipLocationChange:Xt(this.skipLocationChange),replaceUrl:Xt(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,s),!1}updateTargetUrlAndHref(){this.href=this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree))}get urlTree(){return this.router.createUrlTree(this.commands,{relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,preserveQueryParams:Xt(this.preserve),queryParamsHandling:this.queryParamsHandling,preserveFragment:Xt(this.preserveFragment)})}}return e.\u0275fac=function(t){return new(t||e)(r.Mb(Qt),r.Mb(Pe),r.Mb(i.n))},e.\u0275dir=r.Hb({type:e,selectors:[["a","routerLink",""],["area","routerLink",""]],hostVars:2,hostBindings:function(e,t){1&e&&r.gc("click",(function(e){return t.onClick(e.button,e.ctrlKey,e.shiftKey,e.altKey,e.metaKey)})),2&e&&(r.Vb("href",t.href,r.Gc),r.zb("target",t.target))},inputs:{routerLink:"routerLink",preserveQueryParams:"preserveQueryParams",target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state"},features:[r.wb]}),e})();function Xt(e){return""===e||!!e}let en=(()=>{class e{constructor(e,t,n,i,r,s){this.router=e,this.element=t,this.renderer=n,this.cdr=i,this.link=r,this.linkWithHref=s,this.classes=[],this.isActive=!1,this.routerLinkActiveOptions={exact:!1},this.routerEventsSubscription=e.events.subscribe(e=>{e instanceof P&&this.update()})}ngAfterContentInit(){Object(o.a)([this.links.changes,this.linksWithHrefs.changes,Object(s.a)(null)]).pipe(Object(E.a)()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){var e;null===(e=this.linkInputChangesSubscription)||void 0===e||e.unsubscribe();const t=[...this.links.toArray(),...this.linksWithHrefs.toArray(),this.link,this.linkWithHref].filter(e=>!!e).map(e=>e.onChanges);this.linkInputChangesSubscription=Object(o.a)(t).pipe(Object(E.a)()).subscribe(e=>{this.isActive!==this.isLinkActive(this.router)(e)&&this.update()})}set routerLinkActive(e){const t=Array.isArray(e)?e:e.split(" ");this.classes=t.filter(e=>!!e)}ngOnChanges(e){this.update()}ngOnDestroy(){var e;this.routerEventsSubscription.unsubscribe(),null===(e=this.linkInputChangesSubscription)||void 0===e||e.unsubscribe()}update(){this.links&&this.linksWithHrefs&&this.router.navigated&&Promise.resolve().then(()=>{const e=this.hasActiveLinks();this.isActive!==e&&(this.isActive=e,this.cdr.markForCheck(),this.classes.forEach(t=>{e?this.renderer.addClass(this.element.nativeElement,t):this.renderer.removeClass(this.element.nativeElement,t)}))})}isLinkActive(e){return t=>e.isActive(t.urlTree,this.routerLinkActiveOptions.exact)}hasActiveLinks(){const e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.linkWithHref&&e(this.linkWithHref)||this.links.some(e)||this.linksWithHrefs.some(e)}}return e.\u0275fac=function(t){return new(t||e)(r.Mb(Qt),r.Mb(r.m),r.Mb(r.E),r.Mb(r.h),r.Mb(Kt,8),r.Mb(Zt,8))},e.\u0275dir=r.Hb({type:e,selectors:[["","routerLinkActive",""]],contentQueries:function(e,t,n){var i;1&e&&(r.Fb(n,Kt,!0),r.Fb(n,Zt,!0)),2&e&&(r.zc(i=r.hc())&&(t.links=i),r.zc(i=r.hc())&&(t.linksWithHrefs=i))},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",routerLinkActive:"routerLinkActive"},exportAs:["routerLinkActive"],features:[r.wb]}),e})(),tn=(()=>{class e{constructor(e,t,n,i,s){this.parentContexts=e,this.location=t,this.resolver=n,this.changeDetector=s,this.activated=null,this._activatedRoute=null,this.activateEvents=new r.o,this.deactivateEvents=new r.o,this.name=i||Q,e.onChildOutletCreated(this.name,this)}ngOnDestroy(){this.parentContexts.onChildOutletDestroyed(this.name)}ngOnInit(){if(!this.activated){const e=this.parentContexts.getContext(this.name);e&&e.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.resolver||null))}}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();const e=this.activated;return this.activated=null,this._activatedRoute=null,e}attach(e,t){this.activated=e,this._activatedRoute=t,this.location.insert(e.hostView)}deactivate(){if(this.activated){const e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,t){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=e;const n=(t=t||this.resolver).resolveComponentFactory(e._futureSnapshot.routeConfig.component),i=this.parentContexts.getOrCreateContext(this.name).children,r=new nn(e,i,this.location.injector);this.activated=this.location.createComponent(n,this.location.length,r),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return e.\u0275fac=function(t){return new(t||e)(r.Mb(Bt),r.Mb(r.P),r.Mb(r.j),r.ec("name"),r.Mb(r.h))},e.\u0275dir=r.Hb({type:e,selectors:[["router-outlet"]],outputs:{activateEvents:"activate",deactivateEvents:"deactivate"},exportAs:["outlet"]}),e})();class nn{constructor(e,t,n){this.route=e,this.childContexts=t,this.parent=n}get(e,t){return e===Pe?this.route:e===Bt?this.childContexts:this.parent.get(e,t)}}class rn{}class sn{preload(e,t){return t().pipe(Object(S.a)(()=>Object(s.a)(null)))}}class on{preload(e,t){return Object(s.a)(null)}}let an=(()=>{class e{constructor(e,t,n,i,r){this.router=e,this.injector=i,this.preloadingStrategy=r,this.loader=new Wt(t,n,t=>e.triggerEvent(new W(t)),t=>e.triggerEvent(new V(t)))}setUpPreloading(){this.subscription=this.router.events.pipe(Object(w.a)(e=>e instanceof P),Object(M.a)(()=>this.preload())).subscribe(()=>{})}preload(){const e=this.injector.get(r.y);return this.processRoutes(e,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,t){const n=[];for(const i of t)if(i.loadChildren&&!i.canLoad&&i._loadedConfig){const e=i._loadedConfig;n.push(this.processRoutes(e.module,e.routes))}else i.loadChildren&&!i.canLoad?n.push(this.preloadConfig(e,i)):i.children&&n.push(this.processRoutes(e,i.children));return Object(o.a)(n).pipe(Object(E.a)(),Object(p.a)(e=>{}))}preloadConfig(e,t){return this.preloadingStrategy.preload(t,()=>this.loader.load(e.injector,t).pipe(Object(k.a)(e=>(t._loadedConfig=e,this.processRoutes(e.module,e.routes)))))}}return e.\u0275fac=function(t){return new(t||e)(r.dc(Qt),r.dc(r.x),r.dc(r.i),r.dc(r.s),r.dc(rn))},e.\u0275prov=r.Ib({token:e,factory:e.\u0275fac}),e})(),cn=(()=>{class e{constructor(e,t,n={}){this.router=e,this.viewportScroller=t,this.options=n,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},n.scrollPositionRestoration=n.scrollPositionRestoration||"disabled",n.anchorScrolling=n.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.router.events.subscribe(e=>{e instanceof I?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof P&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.router.parseUrl(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.router.events.subscribe(e=>{e instanceof J&&(e.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,t){this.router.triggerEvent(new J(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,t))}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}return e.\u0275fac=function(t){return new(t||e)(r.dc(Qt),r.dc(i.D),r.dc(void 0))},e.\u0275prov=r.Ib({token:e,factory:e.\u0275fac}),e})();const ln=new r.r("ROUTER_CONFIGURATION"),un=new r.r("ROUTER_FORROOT_GUARD"),dn=[i.m,{provide:fe,useClass:pe},{provide:Qt,useFactory:function(e,t,n,r,s,o,a,c={},l,u){const d=new Qt(null,e,t,n,r,s,o,ie(a));if(l&&(d.urlHandlingStrategy=l),u&&(d.routeReuseStrategy=u),c.errorHandler&&(d.errorHandler=c.errorHandler),c.malformedUriErrorHandler&&(d.malformedUriErrorHandler=c.malformedUriErrorHandler),c.enableTracing){const e=Object(i.L)();d.events.subscribe(t=>{e.logGroup("Router Event: "+t.constructor.name),e.log(t.toString()),e.log(t),e.logGroupEnd()})}return c.onSameUrlNavigation&&(d.onSameUrlNavigation=c.onSameUrlNavigation),c.paramsInheritanceStrategy&&(d.paramsInheritanceStrategy=c.paramsInheritanceStrategy),c.urlUpdateStrategy&&(d.urlUpdateStrategy=c.urlUpdateStrategy),c.relativeLinkResolution&&(d.relativeLinkResolution=c.relativeLinkResolution),d},deps:[fe,Bt,i.m,r.s,r.x,r.i,Ht,ln,[class{},new r.B],[class{},new r.B]]},Bt,{provide:Pe,useFactory:function(e){return e.routerState.root},deps:[Qt]},{provide:r.x,useClass:r.K},an,on,sn,{provide:ln,useValue:{enableTracing:!1}}];function hn(){return new r.z("Router",Qt)}let fn=(()=>{class e{constructor(e,t){}static forRoot(t,n){return{ngModule:e,providers:[dn,gn(t),{provide:un,useFactory:bn,deps:[[Qt,new r.B,new r.J]]},{provide:ln,useValue:n||{}},{provide:i.n,useFactory:mn,deps:[i.z,[new r.q(i.a),new r.B],ln]},{provide:cn,useFactory:pn,deps:[Qt,i.D,ln]},{provide:rn,useExisting:n&&n.preloadingStrategy?n.preloadingStrategy:on},{provide:r.z,multi:!0,useFactory:hn},[_n,{provide:r.d,multi:!0,useFactory:yn,deps:[_n]},{provide:wn,useFactory:vn,deps:[_n]},{provide:r.b,multi:!0,useExisting:wn}]]}}static forChild(t){return{ngModule:e,providers:[gn(t)]}}}return e.\u0275mod=r.Kb({type:e}),e.\u0275inj=r.Jb({factory:function(t){return new(t||e)(r.dc(un,8),r.dc(Qt,8))}}),e})();function pn(e,t,n){return n.scrollOffset&&t.setOffset(n.scrollOffset),new cn(e,t,n)}function mn(e,t,n={}){return n.useHash?new i.h(e,t):new i.x(e,t)}function bn(e){if(e)throw new Error("RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function gn(e){return[{provide:r.a,multi:!0,useValue:e},{provide:Ht,multi:!0,useValue:e}]}let _n=(()=>{class e{constructor(e){this.injector=e,this.initNavigation=!1,this.resultOfPreactivationDone=new f.a}appInitializer(){return this.injector.get(i.l,Promise.resolve(null)).then(()=>{let e=null;const t=new Promise(t=>e=t),n=this.injector.get(Qt),i=this.injector.get(ln);if(this.isLegacyDisabled(i)||this.isLegacyEnabled(i))e(!0);else if("disabled"===i.initialNavigation)n.setUpLocationChangeListener(),e(!0);else{if("enabled"!==i.initialNavigation)throw new Error(`Invalid initialNavigation options: '${i.initialNavigation}'`);n.hooks.afterPreactivation=()=>this.initNavigation?Object(s.a)(null):(this.initNavigation=!0,e(!0),this.resultOfPreactivationDone),n.initialNavigation()}return t})}bootstrapListener(e){const t=this.injector.get(ln),n=this.injector.get(an),i=this.injector.get(cn),s=this.injector.get(Qt),o=this.injector.get(r.g);e===o.components[0]&&(this.isLegacyEnabled(t)?s.initialNavigation():this.isLegacyDisabled(t)&&s.setUpLocationChangeListener(),n.setUpPreloading(),i.init(),s.resetRootComponentType(o.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}isLegacyEnabled(e){return"legacy_enabled"===e.initialNavigation||!0===e.initialNavigation||void 0===e.initialNavigation}isLegacyDisabled(e){return"legacy_disabled"===e.initialNavigation||!1===e.initialNavigation}}return e.\u0275fac=function(t){return new(t||e)(r.dc(r.s))},e.\u0275prov=r.Ib({token:e,factory:e.\u0275fac}),e})();function yn(e){return e.appInitializer.bind(e)}function vn(e){return e.bootstrapListener.bind(e)}const wn=new r.r("Router Initializer")},iSVu:function(e,t,n){var i=n("xs3f"),r=Function.toString;"function"!=typeof i.inspectSource&&(i.inspectSource=function(e){return r.call(e)}),e.exports=i.inspectSource},iYuL:function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),i=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],r=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,i){return e?/-MMM-/.test(i)?n[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"domingo_lunes_martes_mi\xe9rcoles_jueves_viernes_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xe9._jue._vie._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[ma\xf1ana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un d\xeda",dd:"%d d\xedas",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un a\xf1o",yy:"%d a\xf1os"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4},invalidDate:"Fecha inv\xe1lida"})}(n("wd/R"))},insk:function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var i=n("20UP"),r=n("oxzT"),s=n("8Y7J"),o=n("cUpR"),a=n("SVse"),c=n("XFyV"),l=n("/NlG"),u=n("6qls"),d=n("ANnk"),h=n("s7LF");function f(e,t){1&e&&(s.Sb(0,"cd-loading-panel"),s.Wb(1,2),s.Rb())}function p(e,t){1&e&&(s.Sb(0,"cd-alert-panel",3),s.cc(1,4),s.Nb(2,"cd-doc",5),s.Zb(),s.Rb())}function m(e,t){1&e&&(s.Sb(0,"cd-alert-panel",3),s.cc(1,6),s.Nb(2,"cd-doc",5),s.Zb(),s.Rb())}function b(e,t){if(1&e&&(s.Sb(0,"option",20),s.Oc(1),s.Rb()),2&e){const e=t.$implicit;s.pc("ngValue",e.value),s.yb(1),s.Qc("",e.name," ")}}const g=function(e){return[e]};function _(e,t){if(1&e){const e=s.Tb();s.Qb(0),s.Sb(1,"div",7),s.Sb(2,"div",8),s.Sb(3,"div",9),s.Sb(4,"label",10),s.Wb(5,11),s.Rb(),s.Sb(6,"select",12),s.gc("ngModelChange",(function(t){return s.Dc(e),s.ic().time=t}))("ngModelChange",(function(t){return s.Dc(e),s.ic().onTimepickerChange(t)})),s.Mc(7,b,2,2,"option",13),s.Rb(),s.Sb(8,"button",14),s.Yb(9,15),s.gc("click",(function(){return s.Dc(e),s.ic().reset()})),s.Nb(10,"i",16),s.Rb(),s.Rb(),s.Rb(),s.Rb(),s.Sb(11,"div",7),s.Sb(12,"div",8),s.Sb(13,"div",17),s.Nb(14,"iframe",18,19),s.Rb(),s.Rb(),s.Rb(),s.Pb()}if(2&e){const e=s.ic();s.yb(6),s.pc("ngModel",e.time),s.yb(1),s.pc("ngForOf",e.grafanaTimes),s.yb(3),s.pc("ngClass",s.uc(5,g,e.icons.undo)),s.yb(4),s.pc("src",e.grafanaSrc,s.Fc)("ngClass",e.panelStyle)}}let y=(()=>{class e{constructor(e,t){this.sanitizer=e,this.settingsService=t,this.grafanaExist=!1,this.mode="&kiosk",this.datasource="Dashboard1",this.loading=!0,this.styles={},this.dashboardExist=!0,this.icons=r.a,this.DEFAULT_TIME="from=now-1h&to=now",this.grafanaTimes=[{name:"Last 5 minutes",value:"from=now-5m&to=now"},{name:"Last 15 minutes",value:"from=now-15m&to=now"},{name:"Last 30 minutes",value:"from=now-30m&to=now"},{name:"Last 1 hour (Default)",value:"from=now-1h&to=now"},{name:"Last 3 hours",value:"from=now-3h&to=now"},{name:"Last 6 hours",value:"from=now-6h&to=now"},{name:"Last 12 hours",value:"from=now-12h&to=now"},{name:"Last 24 hours",value:"from=now-24h&to=now"},{name:"Yesterday",value:"from=now-1d%2Fd&to=now-1d%2Fd"},{name:"Today so far",value:"from=now%2Fd&to=now"},{name:"Day before yesterday",value:"from=now-2d%2Fd&to=now-2d%2Fd"},{name:"Last 2 days",value:"from=now-2d&to=now"},{name:"This day last week",value:"from=now-7d%2Fd&to=now-7d%2Fd"},{name:"Previous week",value:"from=now-1w%2Fw&to=now-1w%2Fw"},{name:"This week so far",value:"from=now%2Fw&to=now"},{name:"Last 7 days",value:"from=now-7d&to=now"},{name:"Previous month",value:"from=now-1M%2FM&to=now-1M%2FM"},{name:"This month so far",value:"from=now%2FM&to=now"},{name:"Last 30 days",value:"from=now-30d&to=now"},{name:"Last 90 days",value:"from=now-90d&to=now"},{name:"Last 6 months",value:"from=now-6M&to=now"},{name:"Last 1 year",value:"from=now-1y&to=now"},{name:"Previous year",value:"from=now-1y%2Fy&to=now-1y%2Fy"},{name:"This year so far",value:"from=now%2Fy&to=now"},{name:"Last 2 years",value:"from=now-2y&to=now"},{name:"Last 5 years",value:"from=now-5y&to=now"}]}ngOnInit(){this.time=this.DEFAULT_TIME,this.styles={one:"grafana_one",two:"grafana_two",three:"grafana_three",four:"grafana_four"},this.settingsService.ifSettingConfigured("api/grafana/url",e=>{this.grafanaExist=!0,this.loading=!1,this.baseUrl=e+"/d/",this.getFrame()}),this.panelStyle=this.styles[this.grafanaStyle]}getFrame(){this.settingsService.validateGrafanaDashboardUrl(this.uid).subscribe(e=>this.dashboardExist=200===e),this.url=this.baseUrl+this.uid+"/"+this.grafanaPath+"&refresh=2s&var-datasource="+this.datasource+this.mode+"&"+this.time,this.grafanaSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.url)}onTimepickerChange(){this.grafanaExist&&this.getFrame()}reset(){this.time=this.DEFAULT_TIME,this.grafanaExist&&this.getFrame()}ngOnChanges(){this.grafanaExist&&this.getFrame()}}return e.\u0275fac=function(t){return new(t||e)(s.Mb(o.b),s.Mb(i.a))},e.\u0275cmp=s.Gb({type:e,selectors:[["cd-grafana"]],inputs:{grafanaPath:"grafanaPath",grafanaStyle:"grafanaStyle",uid:"uid"},features:[s.wb],decls:4,vars:4,consts:function(){return[[4,"ngIf"],["type","info",4,"ngIf"],"Loading panel data...",["type","info"],"Please consult the " + "\ufffd#2\ufffd" + "" + "\ufffd/#2\ufffd" + " on how to configure and enable the monitoring functionality.",["section","grafana"],"Grafana Dashboard doesn't exist. Please refer to " + "\ufffd#2\ufffd" + "" + "\ufffd/#2\ufffd" + " on how to add dashboards to Grafana.",[1,"row"],[1,"col"],[1,"form-inline","timepicker"],["for","timepicker",1,"ml-1","my-1"],"Grafana Time Picker",["id","timepicker","name","timepicker",1,"custom-select","my-1","mx-3",3,"ngModel","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"btn","btn-light","my-1",3,"click",6,"title"],["title","Reset Settings"],[3,"ngClass"],[1,"grafana-container"],["id","iframe","frameborder","0","scrolling","no",1,"grafana",3,"src","ngClass"],["iframe",""],[3,"ngValue"]]},template:function(e,t){1&e&&(s.Mc(0,f,2,0,"cd-loading-panel",0),s.Mc(1,p,3,0,"cd-alert-panel",1),s.Mc(2,m,3,0,"cd-alert-panel",1),s.Mc(3,_,16,7,"ng-container",0)),2&e&&(s.pc("ngIf",t.loading&&t.grafanaExist),s.yb(1),s.pc("ngIf",!t.grafanaExist),s.yb(1),s.pc("ngIf",!t.dashboardExist),s.yb(1),s.pc("ngIf",t.grafanaExist&&t.dashboardExist))},directives:[a.r,c.a,l.a,u.a,d.a,h.z,h.q,h.t,a.q,a.p,h.u,h.B],styles:[".grafana[_ngcontent-%COMP%]{height:600px;width:100%;z-index:0}.grafana_one[_ngcontent-%COMP%]{height:400px}.grafana_two[_ngcontent-%COMP%]{height:750px}.grafana_three[_ngcontent-%COMP%]{height:900px}.grafana_four[_ngcontent-%COMP%]{height:1160px}.timepicker[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-weight:700}.dropdown-menu[_ngcontent-%COMP%]{left:auto;right:20px;top:20px}"]}),e})()},iqWW:function(e,t,n){"use strict";var i=n("ZUd8").charAt;e.exports=function(e,t,n){return t+(n?i(e,t).length:1)}},itXk:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i=n("z+Ro"),r=n("DH7j"),s=n("l7GE"),o=n("ZUHj"),a=n("yCtX");const c={};function l(...e){let t=void 0,n=void 0;return Object(i.a)(e[e.length-1])&&(n=e.pop()),"function"==typeof e[e.length-1]&&(t=e.pop()),1===e.length&&Object(r.a)(e[0])&&(e=e[0]),Object(a.a)(e,n).lift(new u(t))}class u{constructor(e){this.resultSelector=e}call(e,t){return t.subscribe(new d(e,this.resultSelector))}}class d extends s.a{constructor(e,t){super(e),this.resultSelector=t,this.active=0,this.values=[],this.observables=[]}_next(e){this.values.push(c),this.observables.push(e)}_complete(){const e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(let n=0;n<t;n++){const t=e[n];this.add(Object(o.a)(this,t,void 0,n))}}}notifyComplete(e){0==(this.active-=1)&&this.destination.complete()}notifyNext(e,t,n){const i=this.values,r=this.toRespond?i[n]===c?--this.toRespond:this.toRespond:0;i[n]=t,0===r&&(this.resultSelector?this._tryResultSelector(i):this.destination.next(i.slice()))}_tryResultSelector(e){let t;try{t=this.resultSelector.apply(this,e)}catch(n){return void this.destination.error(n)}this.destination.next(t)}}},"jKX/":function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));class i{constructor(e=[]){["read","create","update","delete"].forEach(t=>this[t]=e.includes(t))}}class r{constructor(e){this.hosts=new i(e.hosts),this.configOpt=new i(e["config-opt"]),this.pool=new i(e.pool),this.osd=new i(e.osd),this.monitor=new i(e.monitor),this.rbdImage=new i(e["rbd-image"]),this.iscsi=new i(e.iscsi),this.rbdMirroring=new i(e["rbd-mirroring"]),this.rgw=new i(e.rgw),this.cephfs=new i(e.cephfs),this.manager=new i(e.manager),this.log=new i(e.log),this.user=new i(e.user),this.grafana=new i(e.grafana),this.prometheus=new i(e.prometheus),this.nfs=new i(e["nfs-ganesha"])}}},jN84:function(e,t,n){"use strict";var i=n("WJ6P"),r=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols;t.a=s?function(e){return null==e?[]:(e=Object(e),function(t,n){for(var i=-1,s=null==t?0:t.length,o=0,a=[];++i<s;){var c=t[i];r.call(e,c)&&(a[o++]=c)}return a}(s(e)))}:i.a},jUeY:function(e,t,n){!function(e){"use strict";e.defineLocale("el",{monthsNominativeEl:"\u0399\u03b1\u03bd\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2_\u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2_\u039c\u03ac\u03c1\u03c4\u03b9\u03bf\u03c2_\u0391\u03c0\u03c1\u03af\u03bb\u03b9\u03bf\u03c2_\u039c\u03ac\u03b9\u03bf\u03c2_\u0399\u03bf\u03cd\u03bd\u03b9\u03bf\u03c2_\u0399\u03bf\u03cd\u03bb\u03b9\u03bf\u03c2_\u0391\u03cd\u03b3\u03bf\u03c5\u03c3\u03c4\u03bf\u03c2_\u03a3\u03b5\u03c0\u03c4\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2_\u039f\u03ba\u03c4\u03ce\u03b2\u03c1\u03b9\u03bf\u03c2_\u039d\u03bf\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2_\u0394\u03b5\u03ba\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2".split("_"),monthsGenitiveEl:"\u0399\u03b1\u03bd\u03bf\u03c5\u03b1\u03c1\u03af\u03bf\u03c5_\u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03b1\u03c1\u03af\u03bf\u03c5_\u039c\u03b1\u03c1\u03c4\u03af\u03bf\u03c5_\u0391\u03c0\u03c1\u03b9\u03bb\u03af\u03bf\u03c5_\u039c\u03b1\u0390\u03bf\u03c5_\u0399\u03bf\u03c5\u03bd\u03af\u03bf\u03c5_\u0399\u03bf\u03c5\u03bb\u03af\u03bf\u03c5_\u0391\u03c5\u03b3\u03bf\u03cd\u03c3\u03c4\u03bf\u03c5_\u03a3\u03b5\u03c0\u03c4\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5_\u039f\u03ba\u03c4\u03c9\u03b2\u03c1\u03af\u03bf\u03c5_\u039d\u03bf\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5_\u0394\u03b5\u03ba\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5".split("_"),months:function(e,t){return e?"string"==typeof t&&/D/.test(t.substring(0,t.indexOf("MMMM")))?this._monthsGenitiveEl[e.month()]:this._monthsNominativeEl[e.month()]:this._monthsNominativeEl},monthsShort:"\u0399\u03b1\u03bd_\u03a6\u03b5\u03b2_\u039c\u03b1\u03c1_\u0391\u03c0\u03c1_\u039c\u03b1\u03ca_\u0399\u03bf\u03c5\u03bd_\u0399\u03bf\u03c5\u03bb_\u0391\u03c5\u03b3_\u03a3\u03b5\u03c0_\u039f\u03ba\u03c4_\u039d\u03bf\u03b5_\u0394\u03b5\u03ba".split("_"),weekdays:"\u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae_\u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1_\u03a4\u03c1\u03af\u03c4\u03b7_\u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7_\u03a0\u03ad\u03bc\u03c0\u03c4\u03b7_\u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae_\u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf".split("_"),weekdaysShort:"\u039a\u03c5\u03c1_\u0394\u03b5\u03c5_\u03a4\u03c1\u03b9_\u03a4\u03b5\u03c4_\u03a0\u03b5\u03bc_\u03a0\u03b1\u03c1_\u03a3\u03b1\u03b2".split("_"),weekdaysMin:"\u039a\u03c5_\u0394\u03b5_\u03a4\u03c1_\u03a4\u03b5_\u03a0\u03b5_\u03a0\u03b1_\u03a3\u03b1".split("_"),meridiem:function(e,t,n){return e>11?n?"\u03bc\u03bc":"\u039c\u039c":n?"\u03c0\u03bc":"\u03a0\u039c"},isPM:function(e){return"\u03bc"===(e+"").toLowerCase()[0]},meridiemParse:/[\u03a0\u039c]\.?\u039c?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[\u03a3\u03ae\u03bc\u03b5\u03c1\u03b1 {}] LT",nextDay:"[\u0391\u03cd\u03c1\u03b9\u03bf {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[\u03a7\u03b8\u03b5\u03c2 {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[\u03c4\u03bf \u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03bf] dddd [{}] LT";default:return"[\u03c4\u03b7\u03bd \u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03b7] dddd [{}] LT"}},sameElse:"L"},calendar:function(e,t){var n,i=this._calendarEl[e],r=t&&t.hours();return n=i,("undefined"!=typeof Function&&n instanceof Function||"[object Function]"===Object.prototype.toString.call(n))&&(i=i.apply(t)),i.replace("{}",r%12==1?"\u03c3\u03c4\u03b7":"\u03c3\u03c4\u03b9\u03c2")},relativeTime:{future:"\u03c3\u03b5 %s",past:"%s \u03c0\u03c1\u03b9\u03bd",s:"\u03bb\u03af\u03b3\u03b1 \u03b4\u03b5\u03c5\u03c4\u03b5\u03c1\u03cc\u03bb\u03b5\u03c0\u03c4\u03b1",ss:"%d \u03b4\u03b5\u03c5\u03c4\u03b5\u03c1\u03cc\u03bb\u03b5\u03c0\u03c4\u03b1",m:"\u03ad\u03bd\u03b1 \u03bb\u03b5\u03c0\u03c4\u03cc",mm:"%d \u03bb\u03b5\u03c0\u03c4\u03ac",h:"\u03bc\u03af\u03b1 \u03ce\u03c1\u03b1",hh:"%d \u03ce\u03c1\u03b5\u03c2",d:"\u03bc\u03af\u03b1 \u03bc\u03ad\u03c1\u03b1",dd:"%d \u03bc\u03ad\u03c1\u03b5\u03c2",M:"\u03ad\u03bd\u03b1\u03c2 \u03bc\u03ae\u03bd\u03b1\u03c2",MM:"%d \u03bc\u03ae\u03bd\u03b5\u03c2",y:"\u03ad\u03bd\u03b1\u03c2 \u03c7\u03c1\u03cc\u03bd\u03bf\u03c2",yy:"%d \u03c7\u03c1\u03cc\u03bd\u03b9\u03b1"},dayOfMonthOrdinalParse:/\d{1,2}\u03b7/,ordinal:"%d\u03b7",week:{dow:1,doy:4}})}(n("wd/R"))},jVDg:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));class i{constructor(e,t,n){this.poolName=e,this.namespace=t,this.imageName=n}static fromString(e){const t=e.split("/");return new this(t[0],t.length>=3?t[1]:null,t.length>=3?t[2]:t[1])}getNameSpace(){return this.namespace?this.namespace+"/":""}toString(){return`${this.poolName}/${this.getNameSpace()}${this.imageName}`}toStringEncoded(){return encodeURIComponent(`${this.poolName}/${this.getNameSpace()}${this.imageName}`)}}},jVdC:function(e,t,n){!function(e){"use strict";var t="stycze\u0144_luty_marzec_kwiecie\u0144_maj_czerwiec_lipiec_sierpie\u0144_wrzesie\u0144_pa\u017adziernik_listopad_grudzie\u0144".split("_"),n="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_wrze\u015bnia_pa\u017adziernika_listopada_grudnia".split("_"),i=[/^sty/i,/^lut/i,/^mar/i,/^kwi/i,/^maj/i,/^cze/i,/^lip/i,/^sie/i,/^wrz/i,/^pa\u017a/i,/^lis/i,/^gru/i];function r(e){return e%10<5&&e%10>1&&~~(e/10)%10!=1}function s(e,t,n){var i=e+" ";switch(n){case"ss":return i+(r(e)?"sekundy":"sekund");case"m":return t?"minuta":"minut\u0119";case"mm":return i+(r(e)?"minuty":"minut");case"h":return t?"godzina":"godzin\u0119";case"hh":return i+(r(e)?"godziny":"godzin");case"ww":return i+(r(e)?"tygodnie":"tygodni");case"MM":return i+(r(e)?"miesi\u0105ce":"miesi\u0119cy");case"yy":return i+(r(e)?"lata":"lat")}}e.defineLocale("pl",{months:function(e,i){return e?/D MMMM/.test(i)?n[e.month()]:t[e.month()]:t},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_pa\u017a_lis_gru".split("_"),monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"niedziela_poniedzia\u0142ek_wtorek_\u015broda_czwartek_pi\u0105tek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_\u015br_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_\u015ar_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dzi\u015b o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedziel\u0119 o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W \u015brod\u0119 o] LT";case 6:return"[W sobot\u0119 o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zesz\u0142\u0105 niedziel\u0119 o] LT";case 3:return"[W zesz\u0142\u0105 \u015brod\u0119 o] LT";case 6:return"[W zesz\u0142\u0105 sobot\u0119 o] LT";default:return"[W zesz\u0142y] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:s,m:s,mm:s,h:s,hh:s,d:"1 dzie\u0144",dd:"%d dni",w:"tydzie\u0144",ww:s,M:"miesi\u0105c",MM:s,y:"rok",yy:s},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},jZKg:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("HDdC"),r=n("quSY");function s(e,t){return new i.a(n=>{const i=new r.a;let s=0;return i.add(t.schedule((function(){s!==e.length?(n.next(e[s++]),n.closed||i.add(this.schedule())):n.complete()}))),i})}},jfSC:function(e,t,n){!function(e){"use strict";var t={1:"\u06f1",2:"\u06f2",3:"\u06f3",4:"\u06f4",5:"\u06f5",6:"\u06f6",7:"\u06f7",8:"\u06f8",9:"\u06f9",0:"\u06f0"},n={"\u06f1":"1","\u06f2":"2","\u06f3":"3","\u06f4":"4","\u06f5":"5","\u06f6":"6","\u06f7":"7","\u06f8":"8","\u06f9":"9","\u06f0":"0"};e.defineLocale("fa",{months:"\u0698\u0627\u0646\u0648\u06cc\u0647_\u0641\u0648\u0631\u06cc\u0647_\u0645\u0627\u0631\u0633_\u0622\u0648\u0631\u06cc\u0644_\u0645\u0647_\u0698\u0648\u0626\u0646_\u0698\u0648\u0626\u06cc\u0647_\u0627\u0648\u062a_\u0633\u067e\u062a\u0627\u0645\u0628\u0631_\u0627\u06a9\u062a\u0628\u0631_\u0646\u0648\u0627\u0645\u0628\u0631_\u062f\u0633\u0627\u0645\u0628\u0631".split("_"),monthsShort:"\u0698\u0627\u0646\u0648\u06cc\u0647_\u0641\u0648\u0631\u06cc\u0647_\u0645\u0627\u0631\u0633_\u0622\u0648\u0631\u06cc\u0644_\u0645\u0647_\u0698\u0648\u0626\u0646_\u0698\u0648\u0626\u06cc\u0647_\u0627\u0648\u062a_\u0633\u067e\u062a\u0627\u0645\u0628\u0631_\u0627\u06a9\u062a\u0628\u0631_\u0646\u0648\u0627\u0645\u0628\u0631_\u062f\u0633\u0627\u0645\u0628\u0631".split("_"),weekdays:"\u06cc\u06a9\u200c\u0634\u0646\u0628\u0647_\u062f\u0648\u0634\u0646\u0628\u0647_\u0633\u0647\u200c\u0634\u0646\u0628\u0647_\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647_\u067e\u0646\u062c\u200c\u0634\u0646\u0628\u0647_\u062c\u0645\u0639\u0647_\u0634\u0646\u0628\u0647".split("_"),weekdaysShort:"\u06cc\u06a9\u200c\u0634\u0646\u0628\u0647_\u062f\u0648\u0634\u0646\u0628\u0647_\u0633\u0647\u200c\u0634\u0646\u0628\u0647_\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647_\u067e\u0646\u062c\u200c\u0634\u0646\u0628\u0647_\u062c\u0645\u0639\u0647_\u0634\u0646\u0628\u0647".split("_"),weekdaysMin:"\u06cc_\u062f_\u0633_\u0686_\u067e_\u062c_\u0634".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/\u0642\u0628\u0644 \u0627\u0632 \u0638\u0647\u0631|\u0628\u0639\u062f \u0627\u0632 \u0638\u0647\u0631/,isPM:function(e){return/\u0628\u0639\u062f \u0627\u0632 \u0638\u0647\u0631/.test(e)},meridiem:function(e,t,n){return e<12?"\u0642\u0628\u0644 \u0627\u0632 \u0638\u0647\u0631":"\u0628\u0639\u062f \u0627\u0632 \u0638\u0647\u0631"},calendar:{sameDay:"[\u0627\u0645\u0631\u0648\u0632 \u0633\u0627\u0639\u062a] LT",nextDay:"[\u0641\u0631\u062f\u0627 \u0633\u0627\u0639\u062a] LT",nextWeek:"dddd [\u0633\u0627\u0639\u062a] LT",lastDay:"[\u062f\u06cc\u0631\u0648\u0632 \u0633\u0627\u0639\u062a] LT",lastWeek:"dddd [\u067e\u06cc\u0634] [\u0633\u0627\u0639\u062a] LT",sameElse:"L"},relativeTime:{future:"\u062f\u0631 %s",past:"%s \u067e\u06cc\u0634",s:"\u0686\u0646\u062f \u062b\u0627\u0646\u06cc\u0647",ss:"%d \u062b\u0627\u0646\u06cc\u0647",m:"\u06cc\u06a9 \u062f\u0642\u06cc\u0642\u0647",mm:"%d \u062f\u0642\u06cc\u0642\u0647",h:"\u06cc\u06a9 \u0633\u0627\u0639\u062a",hh:"%d \u0633\u0627\u0639\u062a",d:"\u06cc\u06a9 \u0631\u0648\u0632",dd:"%d \u0631\u0648\u0632",M:"\u06cc\u06a9 \u0645\u0627\u0647",MM:"%d \u0645\u0627\u0647",y:"\u06cc\u06a9 \u0633\u0627\u0644",yy:"%d \u0633\u0627\u0644"},preparse:function(e){return e.replace(/[\u06f0-\u06f9]/g,(function(e){return n[e]})).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"\u060c")},dayOfMonthOrdinalParse:/\d{1,2}\u0645/,ordinal:"%d\u0645",week:{dow:6,doy:12}})}(n("wd/R"))},jnO4:function(e,t,n){!function(e){"use strict";var t={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},n={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"},i=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},r={s:["\u0623\u0642\u0644 \u0645\u0646 \u062b\u0627\u0646\u064a\u0629","\u062b\u0627\u0646\u064a\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062b\u0627\u0646\u064a\u062a\u0627\u0646","\u062b\u0627\u0646\u064a\u062a\u064a\u0646"],"%d \u062b\u0648\u0627\u0646","%d \u062b\u0627\u0646\u064a\u0629","%d \u062b\u0627\u0646\u064a\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062f\u0642\u064a\u0642\u0629","\u062f\u0642\u064a\u0642\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062f\u0642\u064a\u0642\u062a\u0627\u0646","\u062f\u0642\u064a\u0642\u062a\u064a\u0646"],"%d \u062f\u0642\u0627\u0626\u0642","%d \u062f\u0642\u064a\u0642\u0629","%d \u062f\u0642\u064a\u0642\u0629"],h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062d\u062f\u0629",["\u0633\u0627\u0639\u062a\u0627\u0646","\u0633\u0627\u0639\u062a\u064a\u0646"],"%d \u0633\u0627\u0639\u0627\u062a","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064a\u0648\u0645","\u064a\u0648\u0645 \u0648\u0627\u062d\u062f",["\u064a\u0648\u0645\u0627\u0646","\u064a\u0648\u0645\u064a\u0646"],"%d \u0623\u064a\u0627\u0645","%d \u064a\u0648\u0645\u064b\u0627","%d \u064a\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062d\u062f",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064a\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062d\u062f",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064a\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064b\u0627","%d \u0639\u0627\u0645"]},s=function(e){return function(t,n,s,o){var a=i(t),c=r[e][i(t)];return 2===a&&(c=c[n?0:1]),c.replace(/%d/i,t)}},o=["\u064a\u0646\u0627\u064a\u0631","\u0641\u0628\u0631\u0627\u064a\u0631","\u0645\u0627\u0631\u0633","\u0623\u0628\u0631\u064a\u0644","\u0645\u0627\u064a\u0648","\u064a\u0648\u0646\u064a\u0648","\u064a\u0648\u0644\u064a\u0648","\u0623\u063a\u0633\u0637\u0633","\u0633\u0628\u062a\u0645\u0628\u0631","\u0623\u0643\u062a\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062f\u064a\u0633\u0645\u0628\u0631"];e.defineLocale("ar",{months:o,monthsShort:o,weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200fM/\u200fYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,t,n){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u064b\u0627 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062f %s",past:"\u0645\u0646\u0630 %s",s:s("s"),ss:s("s"),m:s("m"),mm:s("m"),h:s("h"),hh:s("h"),d:s("d"),dd:s("d"),M:s("M"),MM:s("M"),y:s("y"),yy:s("y")},preparse:function(e){return e.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,(function(e){return n[e]})).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"\u060c")},week:{dow:6,doy:12}})}(n("wd/R"))},jtHE:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var i=n("XNiG"),r=n("3N8a");class s extends r.a{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}schedule(e,t=0){return t>0?super.schedule(e,t):(this.delay=t,this.state=e,this.scheduler.flush(this),this)}execute(e,t){return t>0||this.closed?super.execute(e,t):this._execute(e,t)}requestAsyncId(e,t,n=0){return null!==n&&n>0||null===n&&this.delay>0?super.requestAsyncId(e,t,n):e.flush(this)}}var o=n("IjjT");class a extends o.a{}const c=new a(s);var l=n("quSY"),u=n("pxpQ"),d=n("9ppp"),h=n("Ylt2");class f extends i.a{constructor(e=Number.POSITIVE_INFINITY,t=Number.POSITIVE_INFINITY,n){super(),this.scheduler=n,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=e<1?1:e,this._windowTime=t<1?1:t,t===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(e){if(!this.isStopped){const t=this._events;t.push(e),t.length>this._bufferSize&&t.shift()}super.next(e)}nextTimeWindow(e){this.isStopped||(this._events.push(new p(this._getNow(),e)),this._trimBufferThenGetEvents()),super.next(e)}_subscribe(e){const t=this._infiniteTimeWindow,n=t?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,r=n.length;let s;if(this.closed)throw new d.a;if(this.isStopped||this.hasError?s=l.a.EMPTY:(this.observers.push(e),s=new h.a(this,e)),i&&e.add(e=new u.a(e,i)),t)for(let o=0;o<r&&!e.closed;o++)e.next(n[o]);else for(let o=0;o<r&&!e.closed;o++)e.next(n[o].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),s}_getNow(){return(this.scheduler||c).now()}_trimBufferThenGetEvents(){const e=this._getNow(),t=this._bufferSize,n=this._windowTime,i=this._events,r=i.length;let s=0;for(;s<r&&!(e-i[s].time<n);)s++;return r>t&&(s=Math.max(s,r-t)),s>0&&i.splice(0,s),i}}class p{constructor(e,t){this.time=e,this.value=t}}},kEOa:function(e,t,n){!function(e){"use strict";var t={1:"\u09e7",2:"\u09e8",3:"\u09e9",4:"\u09ea",5:"\u09eb",6:"\u09ec",7:"\u09ed",8:"\u09ee",9:"\u09ef",0:"\u09e6"},n={"\u09e7":"1","\u09e8":"2","\u09e9":"3","\u09ea":"4","\u09eb":"5","\u09ec":"6","\u09ed":"7","\u09ee":"8","\u09ef":"9","\u09e6":"0"};e.defineLocale("bn",{months:"\u099c\u09be\u09a8\u09c1\u09df\u09be\u09b0\u09bf_\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1\u09df\u09be\u09b0\u09bf_\u09ae\u09be\u09b0\u09cd\u099a_\u098f\u09aa\u09cd\u09b0\u09bf\u09b2_\u09ae\u09c7_\u099c\u09c1\u09a8_\u099c\u09c1\u09b2\u09be\u0987_\u0986\u0997\u09b8\u09cd\u099f_\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0_\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0_\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0_\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0".split("_"),monthsShort:"\u099c\u09be\u09a8\u09c1_\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1_\u09ae\u09be\u09b0\u09cd\u099a_\u098f\u09aa\u09cd\u09b0\u09bf\u09b2_\u09ae\u09c7_\u099c\u09c1\u09a8_\u099c\u09c1\u09b2\u09be\u0987_\u0986\u0997\u09b8\u09cd\u099f_\u09b8\u09c7\u09aa\u09cd\u099f_\u0985\u0995\u09cd\u099f\u09cb_\u09a8\u09ad\u09c7_\u09a1\u09bf\u09b8\u09c7".split("_"),weekdays:"\u09b0\u09ac\u09bf\u09ac\u09be\u09b0_\u09b8\u09cb\u09ae\u09ac\u09be\u09b0_\u09ae\u0999\u09cd\u0997\u09b2\u09ac\u09be\u09b0_\u09ac\u09c1\u09a7\u09ac\u09be\u09b0_\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf\u09ac\u09be\u09b0_\u09b6\u09c1\u0995\u09cd\u09b0\u09ac\u09be\u09b0_\u09b6\u09a8\u09bf\u09ac\u09be\u09b0".split("_"),weekdaysShort:"\u09b0\u09ac\u09bf_\u09b8\u09cb\u09ae_\u09ae\u0999\u09cd\u0997\u09b2_\u09ac\u09c1\u09a7_\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf_\u09b6\u09c1\u0995\u09cd\u09b0_\u09b6\u09a8\u09bf".split("_"),weekdaysMin:"\u09b0\u09ac\u09bf_\u09b8\u09cb\u09ae_\u09ae\u0999\u09cd\u0997\u09b2_\u09ac\u09c1\u09a7_\u09ac\u09c3\u09b9_\u09b6\u09c1\u0995\u09cd\u09b0_\u09b6\u09a8\u09bf".split("_"),longDateFormat:{LT:"A h:mm \u09b8\u09ae\u09df",LTS:"A h:mm:ss \u09b8\u09ae\u09df",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u09b8\u09ae\u09df",LLLL:"dddd, D MMMM YYYY, A h:mm \u09b8\u09ae\u09df"},calendar:{sameDay:"[\u0986\u099c] LT",nextDay:"[\u0986\u0997\u09be\u09ae\u09c0\u0995\u09be\u09b2] LT",nextWeek:"dddd, LT",lastDay:"[\u0997\u09a4\u0995\u09be\u09b2] LT",lastWeek:"[\u0997\u09a4] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u09aa\u09b0\u09c7",past:"%s \u0986\u0997\u09c7",s:"\u0995\u09df\u09c7\u0995 \u09b8\u09c7\u0995\u09c7\u09a8\u09cd\u09a1",ss:"%d \u09b8\u09c7\u0995\u09c7\u09a8\u09cd\u09a1",m:"\u098f\u0995 \u09ae\u09bf\u09a8\u09bf\u099f",mm:"%d \u09ae\u09bf\u09a8\u09bf\u099f",h:"\u098f\u0995 \u0998\u09a8\u09cd\u099f\u09be",hh:"%d \u0998\u09a8\u09cd\u099f\u09be",d:"\u098f\u0995 \u09a6\u09bf\u09a8",dd:"%d \u09a6\u09bf\u09a8",M:"\u098f\u0995 \u09ae\u09be\u09b8",MM:"%d \u09ae\u09be\u09b8",y:"\u098f\u0995 \u09ac\u099b\u09b0",yy:"%d \u09ac\u099b\u09b0"},preparse:function(e){return e.replace(/[\u09e7\u09e8\u09e9\u09ea\u09eb\u09ec\u09ed\u09ee\u09ef\u09e6]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/\u09b0\u09be\u09a4|\u09b8\u0995\u09be\u09b2|\u09a6\u09c1\u09aa\u09c1\u09b0|\u09ac\u09bf\u0995\u09be\u09b2|\u09b0\u09be\u09a4/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u09b0\u09be\u09a4"===t&&e>=4||"\u09a6\u09c1\u09aa\u09c1\u09b0"===t&&e<5||"\u09ac\u09bf\u0995\u09be\u09b2"===t?e+12:e},meridiem:function(e,t,n){return e<4?"\u09b0\u09be\u09a4":e<10?"\u09b8\u0995\u09be\u09b2":e<17?"\u09a6\u09c1\u09aa\u09c1\u09b0":e<20?"\u09ac\u09bf\u0995\u09be\u09b2":"\u09b0\u09be\u09a4"},week:{dow:0,doy:6}})}(n("wd/R"))},kJI8:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i=n("SVse"),r=n("G0yt"),s=n("zWsK"),o=n("ChqD"),a=n("PCNd"),c=n("8Y7J");let l=(()=>{class e{}return e.\u0275mod=c.Kb({type:e}),e.\u0275inj=c.Jb({factory:function(t){return new(t||e)},imports:[[i.c,o.a,a.a,r.t,s.a]]}),e})()},kJWO:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const i=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")()},kOOl:function(e,t){var n=0,i=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+i).toString(36)}},kOpN:function(e,t,n){!function(e){"use strict";e.defineLocale("zh-tw",{months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u9031\u65e5_\u9031\u4e00_\u9031\u4e8c_\u9031\u4e09_\u9031\u56db_\u9031\u4e94_\u9031\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5 HH:mm",LLLL:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm",l:"YYYY/M/D",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u51cc\u6668"===t||"\u65e9\u4e0a"===t||"\u4e0a\u5348"===t?e:"\u4e2d\u5348"===t?e>=11?e:e+12:"\u4e0b\u5348"===t||"\u665a\u4e0a"===t?e+12:void 0},meridiem:function(e,t,n){var i=100*e+t;return i<600?"\u51cc\u6668":i<900?"\u65e9\u4e0a":i<1130?"\u4e0a\u5348":i<1230?"\u4e2d\u5348":i<1800?"\u4e0b\u5348":"\u665a\u4e0a"},calendar:{sameDay:"[\u4eca\u5929] LT",nextDay:"[\u660e\u5929] LT",nextWeek:"[\u4e0b]dddd LT",lastDay:"[\u6628\u5929] LT",lastWeek:"[\u4e0a]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u9031)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"\u65e5";case"M":return e+"\u6708";case"w":case"W":return e+"\u9031";default:return e}},relativeTime:{future:"%s\u5f8c",past:"%s\u524d",s:"\u5e7e\u79d2",ss:"%d \u79d2",m:"1 \u5206\u9418",mm:"%d \u5206\u9418",h:"1 \u5c0f\u6642",hh:"%d \u5c0f\u6642",d:"1 \u5929",dd:"%d \u5929",M:"1 \u500b\u6708",MM:"%d \u500b\u6708",y:"1 \u5e74",yy:"%d \u5e74"}})}(n("wd/R"))},kRJp:function(e,t,n){var i=n("g6v/"),r=n("m/L8"),s=n("XGwC");e.exports=i?function(e,t,n){return r.f(e,t,s(1,n))}:function(e,t,n){return e[t]=n,e}},kmMV:function(e,t,n){"use strict";var i,r,s=n("rW0t"),o=n("n3/R"),a=n("VpIT"),c=RegExp.prototype.exec,l=a("native-string-replace",String.prototype.replace),u=c,d=(r=/b*/g,c.call(i=/a/,"a"),c.call(r,"a"),0!==i.lastIndex||0!==r.lastIndex),h=o.UNSUPPORTED_Y||o.BROKEN_CARET,f=void 0!==/()??/.exec("")[1];(d||f||h)&&(u=function(e){var t,n,i,r,o=this,a=h&&o.sticky,u=s.call(o),p=o.source,m=0,b=e;return a&&(-1===(u=u.replace("y","")).indexOf("g")&&(u+="g"),b=String(e).slice(o.lastIndex),o.lastIndex>0&&(!o.multiline||o.multiline&&"\n"!==e[o.lastIndex-1])&&(p="(?: "+p+")",b=" "+b,m++),n=new RegExp("^(?:"+p+")",u)),f&&(n=new RegExp("^"+p+"$(?!\\s)",u)),d&&(t=o.lastIndex),i=c.call(a?n:o,b),a?i?(i.input=i.input.slice(m),i[0]=i[0].slice(m),i.index=o.lastIndex,o.lastIndex+=i[0].length):o.lastIndex=0:d&&i&&(o.lastIndex=o.global?i.index+i[0].length:t),f&&i&&i.length>1&&l.call(i[0],n,(function(){for(r=1;r<arguments.length-2;r++)void 0===arguments[r]&&(i[r]=void 0)})),i}),e.exports=u},"kn/O":function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var i=n("HDdC"),r=n("mtw6"),s=n("G1I9"),o=n("QTAa"),a=n("9nlD"),c=n("mSOc"),l=n("VXsX"),u=n("ufoC"),d=n("8Y7J");let h=(()=>{class e{constructor(e,t,n,i){this.notificationService=e,this.summaryService=t,this.taskMessageService=n,this.taskManagerService=i}wrapTaskAroundCall({task:e,call:t}){return new i.a(n=>{t.subscribe(t=>{202===t.status?this._handleExecutingTasks(e):(this.summaryService.refresh(),e.success=!0,this.notificationService.notifyTask(e))},t=>{e.success=!1,e.exception=t.error,n.error(t)},()=>{n.complete()})})}_handleExecutingTasks(e){const t=new s.b(r.a.info,this.taskMessageService.getRunningTitle(e));t.isFinishedTask=!0,this.notificationService.show(t);const n=new o.a(e.name,e.metadata);this.summaryService.addRunningTask(n),this.taskManagerService.subscribe(n.name,n.metadata,e=>{this.notificationService.notifyTask(e)})}}return e.\u0275fac=function(t){return new(t||e)(d.dc(a.a),d.dc(c.a),d.dc(u.a),d.dc(l.a))},e.\u0275prov=d.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},kvvV:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("t/zF");class r extends i.a{}},l5ep:function(e,t,n){!function(e){"use strict";e.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn \xf4l",s:"ychydig eiliadau",ss:"%d eiliad",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var t="";return e>20?t=40===e||50===e||60===e||80===e||100===e?"fed":"ain":e>0&&(t=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"][e]),e+t},week:{dow:1,doy:4}})}(n("wd/R"))},l7GE:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("7o/Q");class r extends i.a{notifyNext(e,t,n,i,r){this.destination.next(t)}notifyError(e,t){this.destination.error(e)}notifyComplete(e){this.destination.complete()}}},lJxs:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("7o/Q");function r(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new s(e,t))}}class s{constructor(e,t){this.project=e,this.thisArg=t}call(e,t){return t.subscribe(new o(e,this.project,this.thisArg))}}class o extends i.a{constructor(e,t,n){super(e),this.project=t,this.count=0,this.thisArg=n||this}_next(e){let t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(t)}}},lMq5:function(e,t,n){var i=n("0Dky"),r=/#|\.prototype\./,s=function(e,t){var n=a[o(e)];return n==l||n!=c&&("function"==typeof t?i(t):!!t)},o=s.normalize=function(e){return String(e).replace(r,".").toLowerCase()},a=s.data={},c=s.NATIVE="N",l=s.POLYFILL="P";e.exports=s},"lOp/":function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var i=n("PqYM"),r=n("pxpQ"),s=n("eIep"),o=n("jtHE"),a=n("D0XW"),c=n("8Y7J");class l{constructor(e){this.zone=e,this.scheduler=a.b}now(){return this.scheduler.now()}}let u=(()=>{class e extends l{constructor(e){super(e)}schedule(...e){return this.zone.runOutsideAngular(()=>this.scheduler.schedule.apply(this.scheduler,e))}}return e.\u0275fac=function(t){return new(t||e)(c.dc(c.A))},e.\u0275prov=c.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),d=(()=>{class e extends l{constructor(e){super(e)}schedule(...e){return this.zone.run(()=>this.scheduler.schedule.apply(this.scheduler,e))}}return e.\u0275fac=function(t){return new(t||e)(c.dc(c.A))},e.\u0275prov=c.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),h=(()=>{class e{constructor(e,t){this.leave=e,this.enter=t}}return e.\u0275fac=function(t){return new(t||e)(c.dc(u),c.dc(d))},e.\u0275prov=c.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),f=(()=>{class e{constructor(e){this.ngZone=e,this.DEFAULT_REFRESH_INTERVAL=5e3,this.DEFAULT_DUE_TIME=0}get(e,t=this.DEFAULT_REFRESH_INTERVAL,n=this.DEFAULT_DUE_TIME){return Object(i.a)(n,t,this.ngZone.leave).pipe(Object(r.b)(this.ngZone.enter),Object(s.a)(e),function(e,t,n){let i;return i=e&&"object"==typeof e?e:{bufferSize:e,windowTime:void 0,refCount:!1,scheduler:void 0},e=>e.lift(function({bufferSize:e=Number.POSITIVE_INFINITY,windowTime:t=Number.POSITIVE_INFINITY,refCount:n,scheduler:i}){let r,s,a=0,c=!1,l=!1;return function(u){let d;a++,!r||c?(c=!1,r=new o.a(e,t,i),d=r.subscribe(this),s=u.subscribe({next(e){r.next(e)},error(e){c=!0,r.error(e)},complete(){l=!0,s=void 0,r.complete()}})):d=r.subscribe(this),this.add(()=>{a--,d.unsubscribe(),s&&!l&&n&&0===a&&(s.unsubscribe(),s=void 0,r=void 0)})}}(i))}({refCount:!0,bufferSize:1}))}}return e.\u0275fac=function(t){return new(t||e)(c.dc(h))},e.\u0275prov=c.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},lXzo:function(e,t,n){!function(e){"use strict";function t(e,t,n){return"m"===n?t?"\u043c\u0438\u043d\u0443\u0442\u0430":"\u043c\u0438\u043d\u0443\u0442\u0443":e+" "+(i=+e,r={ss:t?"\u0441\u0435\u043a\u0443\u043d\u0434\u0430_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434":"\u0441\u0435\u043a\u0443\u043d\u0434\u0443_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434",mm:t?"\u043c\u0438\u043d\u0443\u0442\u0430_\u043c\u0438\u043d\u0443\u0442\u044b_\u043c\u0438\u043d\u0443\u0442":"\u043c\u0438\u043d\u0443\u0442\u0443_\u043c\u0438\u043d\u0443\u0442\u044b_\u043c\u0438\u043d\u0443\u0442",hh:"\u0447\u0430\u0441_\u0447\u0430\u0441\u0430_\u0447\u0430\u0441\u043e\u0432",dd:"\u0434\u0435\u043d\u044c_\u0434\u043d\u044f_\u0434\u043d\u0435\u0439",ww:"\u043d\u0435\u0434\u0435\u043b\u044f_\u043d\u0435\u0434\u0435\u043b\u0438_\u043d\u0435\u0434\u0435\u043b\u044c",MM:"\u043c\u0435\u0441\u044f\u0446_\u043c\u0435\u0441\u044f\u0446\u0430_\u043c\u0435\u0441\u044f\u0446\u0435\u0432",yy:"\u0433\u043e\u0434_\u0433\u043e\u0434\u0430_\u043b\u0435\u0442"}[n].split("_"),i%10==1&&i%100!=11?r[0]:i%10>=2&&i%10<=4&&(i%100<10||i%100>=20)?r[1]:r[2]);var i,r}var n=[/^\u044f\u043d\u0432/i,/^\u0444\u0435\u0432/i,/^\u043c\u0430\u0440/i,/^\u0430\u043f\u0440/i,/^\u043c\u0430[\u0439\u044f]/i,/^\u0438\u044e\u043d/i,/^\u0438\u044e\u043b/i,/^\u0430\u0432\u0433/i,/^\u0441\u0435\u043d/i,/^\u043e\u043a\u0442/i,/^\u043d\u043e\u044f/i,/^\u0434\u0435\u043a/i];e.defineLocale("ru",{months:{format:"\u044f\u043d\u0432\u0430\u0440\u044f_\u0444\u0435\u0432\u0440\u0430\u043b\u044f_\u043c\u0430\u0440\u0442\u0430_\u0430\u043f\u0440\u0435\u043b\u044f_\u043c\u0430\u044f_\u0438\u044e\u043d\u044f_\u0438\u044e\u043b\u044f_\u0430\u0432\u0433\u0443\u0441\u0442\u0430_\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f_\u043e\u043a\u0442\u044f\u0431\u0440\u044f_\u043d\u043e\u044f\u0431\u0440\u044f_\u0434\u0435\u043a\u0430\u0431\u0440\u044f".split("_"),standalone:"\u044f\u043d\u0432\u0430\u0440\u044c_\u0444\u0435\u0432\u0440\u0430\u043b\u044c_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0435\u043b\u044c_\u043c\u0430\u0439_\u0438\u044e\u043d\u044c_\u0438\u044e\u043b\u044c_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c_\u043e\u043a\u0442\u044f\u0431\u0440\u044c_\u043d\u043e\u044f\u0431\u0440\u044c_\u0434\u0435\u043a\u0430\u0431\u0440\u044c".split("_")},monthsShort:{format:"\u044f\u043d\u0432._\u0444\u0435\u0432\u0440._\u043c\u0430\u0440._\u0430\u043f\u0440._\u043c\u0430\u044f_\u0438\u044e\u043d\u044f_\u0438\u044e\u043b\u044f_\u0430\u0432\u0433._\u0441\u0435\u043d\u0442._\u043e\u043a\u0442._\u043d\u043e\u044f\u0431._\u0434\u0435\u043a.".split("_"),standalone:"\u044f\u043d\u0432._\u0444\u0435\u0432\u0440._\u043c\u0430\u0440\u0442_\u0430\u043f\u0440._\u043c\u0430\u0439_\u0438\u044e\u043d\u044c_\u0438\u044e\u043b\u044c_\u0430\u0432\u0433._\u0441\u0435\u043d\u0442._\u043e\u043a\u0442._\u043d\u043e\u044f\u0431._\u0434\u0435\u043a.".split("_")},weekdays:{standalone:"\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0435\u0440\u0433_\u043f\u044f\u0442\u043d\u0438\u0446\u0430_\u0441\u0443\u0431\u0431\u043e\u0442\u0430".split("_"),format:"\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u0435\u0434\u0443_\u0447\u0435\u0442\u0432\u0435\u0440\u0433_\u043f\u044f\u0442\u043d\u0438\u0446\u0443_\u0441\u0443\u0431\u0431\u043e\u0442\u0443".split("_"),isFormat:/\[ ?[\u0412\u0432] ?(?:\u043f\u0440\u043e\u0448\u043b\u0443\u044e|\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e|\u044d\u0442\u0443)? ?] ?dddd/},weekdaysShort:"\u0432\u0441_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),weekdaysMin:"\u0432\u0441_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),monthsParse:n,longMonthsParse:n,shortMonthsParse:n,monthsRegex:/^(\u044f\u043d\u0432\u0430\u0440[\u044c\u044f]|\u044f\u043d\u0432\.?|\u0444\u0435\u0432\u0440\u0430\u043b[\u044c\u044f]|\u0444\u0435\u0432\u0440?\.?|\u043c\u0430\u0440\u0442\u0430?|\u043c\u0430\u0440\.?|\u0430\u043f\u0440\u0435\u043b[\u044c\u044f]|\u0430\u043f\u0440\.?|\u043c\u0430[\u0439\u044f]|\u0438\u044e\u043d[\u044c\u044f]|\u0438\u044e\u043d\.?|\u0438\u044e\u043b[\u044c\u044f]|\u0438\u044e\u043b\.?|\u0430\u0432\u0433\u0443\u0441\u0442\u0430?|\u0430\u0432\u0433\.?|\u0441\u0435\u043d\u0442\u044f\u0431\u0440[\u044c\u044f]|\u0441\u0435\u043d\u0442?\.?|\u043e\u043a\u0442\u044f\u0431\u0440[\u044c\u044f]|\u043e\u043a\u0442\.?|\u043d\u043e\u044f\u0431\u0440[\u044c\u044f]|\u043d\u043e\u044f\u0431?\.?|\u0434\u0435\u043a\u0430\u0431\u0440[\u044c\u044f]|\u0434\u0435\u043a\.?)/i,monthsShortRegex:/^(\u044f\u043d\u0432\u0430\u0440[\u044c\u044f]|\u044f\u043d\u0432\.?|\u0444\u0435\u0432\u0440\u0430\u043b[\u044c\u044f]|\u0444\u0435\u0432\u0440?\.?|\u043c\u0430\u0440\u0442\u0430?|\u043c\u0430\u0440\.?|\u0430\u043f\u0440\u0435\u043b[\u044c\u044f]|\u0430\u043f\u0440\.?|\u043c\u0430[\u0439\u044f]|\u0438\u044e\u043d[\u044c\u044f]|\u0438\u044e\u043d\.?|\u0438\u044e\u043b[\u044c\u044f]|\u0438\u044e\u043b\.?|\u0430\u0432\u0433\u0443\u0441\u0442\u0430?|\u0430\u0432\u0433\.?|\u0441\u0435\u043d\u0442\u044f\u0431\u0440[\u044c\u044f]|\u0441\u0435\u043d\u0442?\.?|\u043e\u043a\u0442\u044f\u0431\u0440[\u044c\u044f]|\u043e\u043a\u0442\.?|\u043d\u043e\u044f\u0431\u0440[\u044c\u044f]|\u043d\u043e\u044f\u0431?\.?|\u0434\u0435\u043a\u0430\u0431\u0440[\u044c\u044f]|\u0434\u0435\u043a\.?)/i,monthsStrictRegex:/^(\u044f\u043d\u0432\u0430\u0440[\u044f\u044c]|\u0444\u0435\u0432\u0440\u0430\u043b[\u044f\u044c]|\u043c\u0430\u0440\u0442\u0430?|\u0430\u043f\u0440\u0435\u043b[\u044f\u044c]|\u043c\u0430[\u044f\u0439]|\u0438\u044e\u043d[\u044f\u044c]|\u0438\u044e\u043b[\u044f\u044c]|\u0430\u0432\u0433\u0443\u0441\u0442\u0430?|\u0441\u0435\u043d\u0442\u044f\u0431\u0440[\u044f\u044c]|\u043e\u043a\u0442\u044f\u0431\u0440[\u044f\u044c]|\u043d\u043e\u044f\u0431\u0440[\u044f\u044c]|\u0434\u0435\u043a\u0430\u0431\u0440[\u044f\u044c])/i,monthsShortStrictRegex:/^(\u044f\u043d\u0432\.|\u0444\u0435\u0432\u0440?\.|\u043c\u0430\u0440[\u0442.]|\u0430\u043f\u0440\.|\u043c\u0430[\u044f\u0439]|\u0438\u044e\u043d[\u044c\u044f.]|\u0438\u044e\u043b[\u044c\u044f.]|\u0430\u0432\u0433\.|\u0441\u0435\u043d\u0442?\.|\u043e\u043a\u0442\.|\u043d\u043e\u044f\u0431?\.|\u0434\u0435\u043a\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0433.",LLL:"D MMMM YYYY \u0433., H:mm",LLLL:"dddd, D MMMM YYYY \u0433., H:mm"},calendar:{sameDay:"[\u0421\u0435\u0433\u043e\u0434\u043d\u044f, \u0432] LT",nextDay:"[\u0417\u0430\u0432\u0442\u0440\u0430, \u0432] LT",lastDay:"[\u0412\u0447\u0435\u0440\u0430, \u0432] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[\u0412\u043e] dddd, [\u0432] LT":"[\u0412] dddd, [\u0432] LT";switch(this.day()){case 0:return"[\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435] dddd, [\u0432] LT";case 1:case 2:case 4:return"[\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439] dddd, [\u0432] LT";case 3:case 5:case 6:return"[\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e] dddd, [\u0432] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[\u0412\u043e] dddd, [\u0432] LT":"[\u0412] dddd, [\u0432] LT";switch(this.day()){case 0:return"[\u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u0435] dddd, [\u0432] LT";case 1:case 2:case 4:return"[\u0412 \u043f\u0440\u043e\u0448\u043b\u044b\u0439] dddd, [\u0432] LT";case 3:case 5:case 6:return"[\u0412 \u043f\u0440\u043e\u0448\u043b\u0443\u044e] dddd, [\u0432] LT"}},sameElse:"L"},relativeTime:{future:"\u0447\u0435\u0440\u0435\u0437 %s",past:"%s \u043d\u0430\u0437\u0430\u0434",s:"\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434",ss:t,m:t,mm:t,h:"\u0447\u0430\u0441",hh:t,d:"\u0434\u0435\u043d\u044c",dd:t,w:"\u043d\u0435\u0434\u0435\u043b\u044f",ww:t,M:"\u043c\u0435\u0441\u044f\u0446",MM:t,y:"\u0433\u043e\u0434",yy:t},meridiemParse:/\u043d\u043e\u0447\u0438|\u0443\u0442\u0440\u0430|\u0434\u043d\u044f|\u0432\u0435\u0447\u0435\u0440\u0430/i,isPM:function(e){return/^(\u0434\u043d\u044f|\u0432\u0435\u0447\u0435\u0440\u0430)$/.test(e)},meridiem:function(e,t,n){return e<4?"\u043d\u043e\u0447\u0438":e<12?"\u0443\u0442\u0440\u0430":e<17?"\u0434\u043d\u044f":"\u0432\u0435\u0447\u0435\u0440\u0430"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0439|\u0433\u043e|\u044f)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-\u0439";case"D":return e+"-\u0433\u043e";case"w":case"W":return e+"-\u044f";default:return e}},week:{dow:1,doy:4}})}(n("wd/R"))},lYtQ:function(e,t,n){!function(e){"use strict";function t(e,t,n,i){switch(n){case"s":return t?"\u0445\u044d\u0434\u0445\u044d\u043d \u0441\u0435\u043a\u0443\u043d\u0434":"\u0445\u044d\u0434\u0445\u044d\u043d \u0441\u0435\u043a\u0443\u043d\u0434\u044b\u043d";case"ss":return e+(t?" \u0441\u0435\u043a\u0443\u043d\u0434":" \u0441\u0435\u043a\u0443\u043d\u0434\u044b\u043d");case"m":case"mm":return e+(t?" \u043c\u0438\u043d\u0443\u0442":" \u043c\u0438\u043d\u0443\u0442\u044b\u043d");case"h":case"hh":return e+(t?" \u0446\u0430\u0433":" \u0446\u0430\u0433\u0438\u0439\u043d");case"d":case"dd":return e+(t?" \u04e9\u0434\u04e9\u0440":" \u04e9\u0434\u0440\u0438\u0439\u043d");case"M":case"MM":return e+(t?" \u0441\u0430\u0440":" \u0441\u0430\u0440\u044b\u043d");case"y":case"yy":return e+(t?" \u0436\u0438\u043b":" \u0436\u0438\u043b\u0438\u0439\u043d");default:return e}}e.defineLocale("mn",{months:"\u041d\u044d\u0433\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440_\u0425\u043e\u0451\u0440\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0413\u0443\u0440\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0414\u04e9\u0440\u04e9\u0432\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440_\u0422\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0417\u0443\u0440\u0433\u0430\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0414\u043e\u043b\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u041d\u0430\u0439\u043c\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0415\u0441\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440_\u0410\u0440\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0410\u0440\u0432\u0430\u043d \u043d\u044d\u0433\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440_\u0410\u0440\u0432\u0430\u043d \u0445\u043e\u0451\u0440\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440".split("_"),monthsShort:"1 \u0441\u0430\u0440_2 \u0441\u0430\u0440_3 \u0441\u0430\u0440_4 \u0441\u0430\u0440_5 \u0441\u0430\u0440_6 \u0441\u0430\u0440_7 \u0441\u0430\u0440_8 \u0441\u0430\u0440_9 \u0441\u0430\u0440_10 \u0441\u0430\u0440_11 \u0441\u0430\u0440_12 \u0441\u0430\u0440".split("_"),monthsParseExact:!0,weekdays:"\u041d\u044f\u043c_\u0414\u0430\u0432\u0430\u0430_\u041c\u044f\u0433\u043c\u0430\u0440_\u041b\u0445\u0430\u0433\u0432\u0430_\u041f\u04af\u0440\u044d\u0432_\u0411\u0430\u0430\u0441\u0430\u043d_\u0411\u044f\u043c\u0431\u0430".split("_"),weekdaysShort:"\u041d\u044f\u043c_\u0414\u0430\u0432_\u041c\u044f\u0433_\u041b\u0445\u0430_\u041f\u04af\u0440_\u0411\u0430\u0430_\u0411\u044f\u043c".split("_"),weekdaysMin:"\u041d\u044f_\u0414\u0430_\u041c\u044f_\u041b\u0445_\u041f\u04af_\u0411\u0430_\u0411\u044f".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY \u043e\u043d\u044b MMMM\u044b\u043d D",LLL:"YYYY \u043e\u043d\u044b MMMM\u044b\u043d D HH:mm",LLLL:"dddd, YYYY \u043e\u043d\u044b MMMM\u044b\u043d D HH:mm"},meridiemParse:/\u04ae\u04e8|\u04ae\u0425/i,isPM:function(e){return"\u04ae\u0425"===e},meridiem:function(e,t,n){return e<12?"\u04ae\u04e8":"\u04ae\u0425"},calendar:{sameDay:"[\u04e8\u043d\u04e9\u04e9\u0434\u04e9\u0440] LT",nextDay:"[\u041c\u0430\u0440\u0433\u0430\u0430\u0448] LT",nextWeek:"[\u0418\u0440\u044d\u0445] dddd LT",lastDay:"[\u04e8\u0447\u0438\u0433\u0434\u04e9\u0440] LT",lastWeek:"[\u04e8\u043d\u0433\u04e9\u0440\u0441\u04e9\u043d] dddd LT",sameElse:"L"},relativeTime:{future:"%s \u0434\u0430\u0440\u0430\u0430",past:"%s \u04e9\u043c\u043d\u04e9",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2} \u04e9\u0434\u04e9\u0440/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+" \u04e9\u0434\u04e9\u0440";default:return e}}})}(n("wd/R"))},lgnt:function(e,t,n){!function(e){"use strict";var t={0:"-\u0447\u04af",1:"-\u0447\u0438",2:"-\u0447\u0438",3:"-\u0447\u04af",4:"-\u0447\u04af",5:"-\u0447\u0438",6:"-\u0447\u044b",7:"-\u0447\u0438",8:"-\u0447\u0438",9:"-\u0447\u0443",10:"-\u0447\u0443",20:"-\u0447\u044b",30:"-\u0447\u0443",40:"-\u0447\u044b",50:"-\u0447\u04af",60:"-\u0447\u044b",70:"-\u0447\u0438",80:"-\u0447\u0438",90:"-\u0447\u0443",100:"-\u0447\u04af"};e.defineLocale("ky",{months:"\u044f\u043d\u0432\u0430\u0440\u044c_\u0444\u0435\u0432\u0440\u0430\u043b\u044c_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0435\u043b\u044c_\u043c\u0430\u0439_\u0438\u044e\u043d\u044c_\u0438\u044e\u043b\u044c_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c_\u043e\u043a\u0442\u044f\u0431\u0440\u044c_\u043d\u043e\u044f\u0431\u0440\u044c_\u0434\u0435\u043a\u0430\u0431\u0440\u044c".split("_"),monthsShort:"\u044f\u043d\u0432_\u0444\u0435\u0432_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440_\u043c\u0430\u0439_\u0438\u044e\u043d\u044c_\u0438\u044e\u043b\u044c_\u0430\u0432\u0433_\u0441\u0435\u043d_\u043e\u043a\u0442_\u043d\u043e\u044f_\u0434\u0435\u043a".split("_"),weekdays:"\u0416\u0435\u043a\u0448\u0435\u043c\u0431\u0438_\u0414\u04af\u0439\u0448\u04e9\u043c\u0431\u04af_\u0428\u0435\u0439\u0448\u0435\u043c\u0431\u0438_\u0428\u0430\u0440\u0448\u0435\u043c\u0431\u0438_\u0411\u0435\u0439\u0448\u0435\u043c\u0431\u0438_\u0416\u0443\u043c\u0430_\u0418\u0448\u0435\u043c\u0431\u0438".split("_"),weekdaysShort:"\u0416\u0435\u043a_\u0414\u04af\u0439_\u0428\u0435\u0439_\u0428\u0430\u0440_\u0411\u0435\u0439_\u0416\u0443\u043c_\u0418\u0448\u0435".split("_"),weekdaysMin:"\u0416\u043a_\u0414\u0439_\u0428\u0439_\u0428\u0440_\u0411\u0439_\u0416\u043c_\u0418\u0448".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0411\u04af\u0433\u04af\u043d \u0441\u0430\u0430\u0442] LT",nextDay:"[\u042d\u0440\u0442\u0435\u04a3 \u0441\u0430\u0430\u0442] LT",nextWeek:"dddd [\u0441\u0430\u0430\u0442] LT",lastDay:"[\u041a\u0435\u0447\u044d\u044d \u0441\u0430\u0430\u0442] LT",lastWeek:"[\u04e8\u0442\u043a\u04e9\u043d \u0430\u043f\u0442\u0430\u043d\u044b\u043d] dddd [\u043a\u04af\u043d\u04af] [\u0441\u0430\u0430\u0442] LT",sameElse:"L"},relativeTime:{future:"%s \u0438\u0447\u0438\u043d\u0434\u0435",past:"%s \u043c\u0443\u0440\u0443\u043d",s:"\u0431\u0438\u0440\u043d\u0435\u0447\u0435 \u0441\u0435\u043a\u0443\u043d\u0434",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434",m:"\u0431\u0438\u0440 \u043c\u04af\u043d\u04e9\u0442",mm:"%d \u043c\u04af\u043d\u04e9\u0442",h:"\u0431\u0438\u0440 \u0441\u0430\u0430\u0442",hh:"%d \u0441\u0430\u0430\u0442",d:"\u0431\u0438\u0440 \u043a\u04af\u043d",dd:"%d \u043a\u04af\u043d",M:"\u0431\u0438\u0440 \u0430\u0439",MM:"%d \u0430\u0439",y:"\u0431\u0438\u0440 \u0436\u044b\u043b",yy:"%d \u0436\u044b\u043b"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0447\u0438|\u0447\u044b|\u0447\u04af|\u0447\u0443)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n("wd/R"))},lkxz:function(e,t,n){"use strict";var i=n("Ce4a");t.a=function(e){var t=new e.constructor(e.byteLength);return new i.a(t).set(new i.a(e)),t}},loYQ:function(e,t,n){!function(e){"use strict";var t={1:"\u09e7",2:"\u09e8",3:"\u09e9",4:"\u09ea",5:"\u09eb",6:"\u09ec",7:"\u09ed",8:"\u09ee",9:"\u09ef",0:"\u09e6"},n={"\u09e7":"1","\u09e8":"2","\u09e9":"3","\u09ea":"4","\u09eb":"5","\u09ec":"6","\u09ed":"7","\u09ee":"8","\u09ef":"9","\u09e6":"0"};e.defineLocale("bn-bd",{months:"\u099c\u09be\u09a8\u09c1\u09df\u09be\u09b0\u09bf_\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1\u09df\u09be\u09b0\u09bf_\u09ae\u09be\u09b0\u09cd\u099a_\u098f\u09aa\u09cd\u09b0\u09bf\u09b2_\u09ae\u09c7_\u099c\u09c1\u09a8_\u099c\u09c1\u09b2\u09be\u0987_\u0986\u0997\u09b8\u09cd\u099f_\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0_\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0_\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0_\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0".split("_"),monthsShort:"\u099c\u09be\u09a8\u09c1_\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1_\u09ae\u09be\u09b0\u09cd\u099a_\u098f\u09aa\u09cd\u09b0\u09bf\u09b2_\u09ae\u09c7_\u099c\u09c1\u09a8_\u099c\u09c1\u09b2\u09be\u0987_\u0986\u0997\u09b8\u09cd\u099f_\u09b8\u09c7\u09aa\u09cd\u099f_\u0985\u0995\u09cd\u099f\u09cb_\u09a8\u09ad\u09c7_\u09a1\u09bf\u09b8\u09c7".split("_"),weekdays:"\u09b0\u09ac\u09bf\u09ac\u09be\u09b0_\u09b8\u09cb\u09ae\u09ac\u09be\u09b0_\u09ae\u0999\u09cd\u0997\u09b2\u09ac\u09be\u09b0_\u09ac\u09c1\u09a7\u09ac\u09be\u09b0_\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf\u09ac\u09be\u09b0_\u09b6\u09c1\u0995\u09cd\u09b0\u09ac\u09be\u09b0_\u09b6\u09a8\u09bf\u09ac\u09be\u09b0".split("_"),weekdaysShort:"\u09b0\u09ac\u09bf_\u09b8\u09cb\u09ae_\u09ae\u0999\u09cd\u0997\u09b2_\u09ac\u09c1\u09a7_\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf_\u09b6\u09c1\u0995\u09cd\u09b0_\u09b6\u09a8\u09bf".split("_"),weekdaysMin:"\u09b0\u09ac\u09bf_\u09b8\u09cb\u09ae_\u09ae\u0999\u09cd\u0997\u09b2_\u09ac\u09c1\u09a7_\u09ac\u09c3\u09b9_\u09b6\u09c1\u0995\u09cd\u09b0_\u09b6\u09a8\u09bf".split("_"),longDateFormat:{LT:"A h:mm \u09b8\u09ae\u09df",LTS:"A h:mm:ss \u09b8\u09ae\u09df",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u09b8\u09ae\u09df",LLLL:"dddd, D MMMM YYYY, A h:mm \u09b8\u09ae\u09df"},calendar:{sameDay:"[\u0986\u099c] LT",nextDay:"[\u0986\u0997\u09be\u09ae\u09c0\u0995\u09be\u09b2] LT",nextWeek:"dddd, LT",lastDay:"[\u0997\u09a4\u0995\u09be\u09b2] LT",lastWeek:"[\u0997\u09a4] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u09aa\u09b0\u09c7",past:"%s \u0986\u0997\u09c7",s:"\u0995\u09df\u09c7\u0995 \u09b8\u09c7\u0995\u09c7\u09a8\u09cd\u09a1",ss:"%d \u09b8\u09c7\u0995\u09c7\u09a8\u09cd\u09a1",m:"\u098f\u0995 \u09ae\u09bf\u09a8\u09bf\u099f",mm:"%d \u09ae\u09bf\u09a8\u09bf\u099f",h:"\u098f\u0995 \u0998\u09a8\u09cd\u099f\u09be",hh:"%d \u0998\u09a8\u09cd\u099f\u09be",d:"\u098f\u0995 \u09a6\u09bf\u09a8",dd:"%d \u09a6\u09bf\u09a8",M:"\u098f\u0995 \u09ae\u09be\u09b8",MM:"%d \u09ae\u09be\u09b8",y:"\u098f\u0995 \u09ac\u099b\u09b0",yy:"%d \u09ac\u099b\u09b0"},preparse:function(e){return e.replace(/[\u09e7\u09e8\u09e9\u09ea\u09eb\u09ec\u09ed\u09ee\u09ef\u09e6]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/\u09b0\u09be\u09a4|\u09ad\u09cb\u09b0|\u09b8\u0995\u09be\u09b2|\u09a6\u09c1\u09aa\u09c1\u09b0|\u09ac\u09bf\u0995\u09be\u09b2|\u09b8\u09a8\u09cd\u09a7\u09cd\u09af\u09be|\u09b0\u09be\u09a4/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u09b0\u09be\u09a4"===t?e<4?e:e+12:"\u09ad\u09cb\u09b0"===t||"\u09b8\u0995\u09be\u09b2"===t?e:"\u09a6\u09c1\u09aa\u09c1\u09b0"===t?e>=3?e:e+12:"\u09ac\u09bf\u0995\u09be\u09b2"===t||"\u09b8\u09a8\u09cd\u09a7\u09cd\u09af\u09be"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"\u09b0\u09be\u09a4":e<6?"\u09ad\u09cb\u09b0":e<12?"\u09b8\u0995\u09be\u09b2":e<15?"\u09a6\u09c1\u09aa\u09c1\u09b0":e<18?"\u09ac\u09bf\u0995\u09be\u09b2":e<20?"\u09b8\u09a8\u09cd\u09a7\u09cd\u09af\u09be":"\u09b0\u09be\u09a4"},week:{dow:0,doy:6}})}(n("wd/R"))},lyxo:function(e,t,n){!function(e){"use strict";function t(e,t,n){var i=" ";return(e%100>=20||e>=100&&e%100==0)&&(i=" de "),e+i+{ss:"secunde",mm:"minute",hh:"ore",dd:"zile",ww:"s\u0103pt\u0103m\xe2ni",MM:"luni",yy:"ani"}[n]}e.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminic\u0103_luni_mar\u021bi_miercuri_joi_vineri_s\xe2mb\u0103t\u0103".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_S\xe2m".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_S\xe2".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[m\xe2ine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s \xeen urm\u0103",s:"c\xe2teva secunde",ss:t,m:"un minut",mm:t,h:"o or\u0103",hh:t,d:"o zi",dd:t,w:"o s\u0103pt\u0103m\xe2n\u0103",ww:t,M:"o lun\u0103",MM:t,y:"un an",yy:t},week:{dow:1,doy:7}})}(n("wd/R"))},"m/L8":function(e,t,n){var i=n("g6v/"),r=n("DPsx"),s=n("glrk"),o=n("wE6v"),a=Object.defineProperty;t.f=i?a:function(e,t,n){if(s(e),t=o(t,!0),s(n),r)try{return a(e,t,n)}catch(i){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},mCNh:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return s}));var i=n("SpAZ");function r(...e){return s(e)}function s(e){return 0===e.length?i.a:1===e.length?e[0]:function(t){return e.reduce((e,t)=>t(e),t)}}},mSOc:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var i=n("LvDl"),r=n.n(i),s=n("2Vo4"),o=n("pLZG"),a=n("SxV6"),c=n("lOp/"),l=n("8Y7J"),u=n("IheW");let d=(()=>{class e{constructor(e,t){this.http=e,this.timerService=t,this.REFRESH_INTERVAL=5e3,this.summaryDataSource=new s.a(null),this.summaryData$=this.summaryDataSource.asObservable()}startPolling(){return this.timerService.get(()=>this.retrieveSummaryObservable(),this.REFRESH_INTERVAL).subscribe(this.retrieveSummaryObserver())}refresh(){return this.retrieveSummaryObservable().subscribe(this.retrieveSummaryObserver())}retrieveSummaryObservable(){return this.http.get("api/summary")}retrieveSummaryObserver(){return e=>{this.summaryDataSource.next(e)}}subscribeOnce(e,t){return this.summaryData$.pipe(Object(o.a)(e=>!!e),Object(a.a)()).subscribe(e,t)}subscribe(e,t){return this.summaryData$.pipe(Object(o.a)(e=>!!e)).subscribe(e,t)}addRunningTask(e){const t=this.summaryDataSource.getValue();t&&(r.a.isArray(t.executing_tasks)?t.executing_tasks.find(t=>t.name===e.name&&r.a.isEqual(t.metadata,e.metadata))||t.executing_tasks.push(e):t.executing_tasks=[e],this.summaryDataSource.next(t))}}return e.\u0275fac=function(t){return new(t||e)(l.dc(u.b),l.dc(c.a))},e.\u0275prov=l.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},mkut:function(e,t,n){"use strict";var i=n("7gMY"),r=n("pyRK"),s=n("U6JX"),o=Object(s.a)(Object.keys,Object),a=Object.prototype.hasOwnProperty,c=n("5WsY");t.a=function(e){return Object(c.a)(e)?Object(i.a)(e):function(e){if(!Object(r.a)(e))return o(e);var t=[];for(var n in Object(e))a.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}},mrSG:function(e,t,n){"use strict";function i(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}function r(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}function s(e,t){return function(n,i){t(n,i,e)}}function o(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function a(e,t,n,i){return new(n||(n=Promise))((function(r,s){function o(e){try{c(i.next(e))}catch(t){s(t)}}function a(e){try{c(i.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((i=i.apply(e,t||[])).next())}))}function c(e,t){var n,i,r,s,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&s[0]?i.return:s[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,i=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(a){s=[6,a],i=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}n.d(t,"f",(function(){return i})),n.d(t,"b",(function(){return r})),n.d(t,"e",(function(){return s})),n.d(t,"d",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return c}))},mtw6:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var i=function(e){return e[e.error=0]="error",e[e.info=1]="info",e[e.success=2]="success",e}({})},"n3/R":function(e,t,n){"use strict";var i=n("0Dky");function r(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=i((function(){var e=r("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=i((function(){var e=r("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},n561:function(e,t,n){"use strict";var i=n("tPH9"),r=n("UudT"),s=n("jN84"),o=n("WJ6P");t.a=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Object(i.a)(t,Object(s.a)(e)),e=Object(r.a)(e);return t}:o.a},n6bG:function(e,t,n){"use strict";function i(e){return"function"==typeof e}n.d(t,"a",(function(){return i}))},nLtN:function(e,t,n){"use strict";var i=n("YHEm"),r=function(e,t){for(var n=e.length;n--;)if(Object(i.a)(e[n][0],t))return n;return-1},s=Array.prototype.splice;function o(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}o.prototype.clear=function(){this.__data__=[],this.size=0},o.prototype.delete=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():s.call(t,n,1),--this.size,0))},o.prototype.get=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]},o.prototype.has=function(e){return r(this.__data__,e)>-1},o.prototype.set=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},t.a=o},nSDx:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("LvDl"),r=n.n(i),s=n("8Y7J");let o=(()=>{class e{transform(e){return r.a.isUndefined(e)||r.a.isNull(e)?"-":e}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=s.Lb({name:"empty",type:e,pure:!0}),e})()},ngJS:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const i=e=>t=>{for(let n=0,i=e.length;n<i&&!t.closed;n++)t.next(e[n]);t.complete()}},ntOU:function(e,t,n){"use strict";var i=n("rpNk").IteratorPrototype,r=n("fHMY"),s=n("XGwC"),o=n("1E5z"),a=n("P4y1"),c=function(){return this};e.exports=function(e,t,n){var l=t+" Iterator";return e.prototype=r(i,{next:s(1,n)}),o(e,l,!1,!0),a[l]=c,e}},nyYc:function(e,t,n){!function(e){"use strict";var t=/(janv\.?|f\xe9vr\.?|mars|avr\.?|mai|juin|juil\.?|ao\xfbt|sept\.?|oct\.?|nov\.?|d\xe9c\.?|janvier|f\xe9vrier|mars|avril|mai|juin|juillet|ao\xfbt|septembre|octobre|novembre|d\xe9cembre)/i,n=[/^janv/i,/^f\xe9vr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^ao\xfbt/i,/^sept/i,/^oct/i,/^nov/i,/^d\xe9c/i];e.defineLocale("fr",{months:"janvier_f\xe9vrier_mars_avril_mai_juin_juillet_ao\xfbt_septembre_octobre_novembre_d\xe9cembre".split("_"),monthsShort:"janv._f\xe9vr._mars_avr._mai_juin_juil._ao\xfbt_sept._oct._nov._d\xe9c.".split("_"),monthsRegex:t,monthsShortRegex:t,monthsStrictRegex:/^(janvier|f\xe9vrier|mars|avril|mai|juin|juillet|ao\xfbt|septembre|octobre|novembre|d\xe9cembre)/i,monthsShortStrictRegex:/(janv\.?|f\xe9vr\.?|mars|avr\.?|mai|juin|juil\.?|ao\xfbt|sept\.?|oct\.?|nov\.?|d\xe9c\.?)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd\u2019hui \xe0] LT",nextDay:"[Demain \xe0] LT",nextWeek:"dddd [\xe0] LT",lastDay:"[Hier \xe0] LT",lastWeek:"dddd [dernier \xe0] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,t){switch(t){case"D":return e+(1===e?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})}(n("wd/R"))},o1bE:function(e,t,n){!function(e){"use strict";var t=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},n={s:["\u0623\u0642\u0644 \u0645\u0646 \u062b\u0627\u0646\u064a\u0629","\u062b\u0627\u0646\u064a\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062b\u0627\u0646\u064a\u062a\u0627\u0646","\u062b\u0627\u0646\u064a\u062a\u064a\u0646"],"%d \u062b\u0648\u0627\u0646","%d \u062b\u0627\u0646\u064a\u0629","%d \u062b\u0627\u0646\u064a\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062f\u0642\u064a\u0642\u0629","\u062f\u0642\u064a\u0642\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062f\u0642\u064a\u0642\u062a\u0627\u0646","\u062f\u0642\u064a\u0642\u062a\u064a\u0646"],"%d \u062f\u0642\u0627\u0626\u0642","%d \u062f\u0642\u064a\u0642\u0629","%d \u062f\u0642\u064a\u0642\u0629"],h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062d\u062f\u0629",["\u0633\u0627\u0639\u062a\u0627\u0646","\u0633\u0627\u0639\u062a\u064a\u0646"],"%d \u0633\u0627\u0639\u0627\u062a","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064a\u0648\u0645","\u064a\u0648\u0645 \u0648\u0627\u062d\u062f",["\u064a\u0648\u0645\u0627\u0646","\u064a\u0648\u0645\u064a\u0646"],"%d \u0623\u064a\u0627\u0645","%d \u064a\u0648\u0645\u064b\u0627","%d \u064a\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062d\u062f",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064a\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062d\u062f",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064a\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064b\u0627","%d \u0639\u0627\u0645"]},i=function(e){return function(i,r,s,o){var a=t(i),c=n[e][t(i)];return 2===a&&(c=c[r?0:1]),c.replace(/%d/i,i)}},r=["\u062c\u0627\u0646\u0641\u064a","\u0641\u064a\u0641\u0631\u064a","\u0645\u0627\u0631\u0633","\u0623\u0641\u0631\u064a\u0644","\u0645\u0627\u064a","\u062c\u0648\u0627\u0646","\u062c\u0648\u064a\u0644\u064a\u0629","\u0623\u0648\u062a","\u0633\u0628\u062a\u0645\u0628\u0631","\u0623\u0643\u062a\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062f\u064a\u0633\u0645\u0628\u0631"];e.defineLocale("ar-dz",{months:r,monthsShort:r,weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200fM/\u200fYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,t,n){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u064b\u0627 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062f %s",past:"\u0645\u0646\u0630 %s",s:i("s"),ss:i("s"),m:i("m"),mm:i("m"),h:i("h"),hh:i("h"),d:i("d"),dd:i("d"),M:i("M"),MM:i("M"),y:i("y"),yy:i("y")},postformat:function(e){return e.replace(/,/g,"\u060c")},week:{dow:0,doy:4}})}(n("wd/R"))},"o4+5":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("aXbf"),r=n("8Y7J");let s=(()=>{class e{constructor(e){this.formatter=e}transform(e){return this.formatter.format_number(e,1e3,["","k","M","G","T","P","E","Z","Y"])}}return e.\u0275fac=function(t){return new(t||e)(r.Mb(i.a))},e.\u0275pipe=r.Lb({name:"dimless",type:e,pure:!0}),e})()},o8EM:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("PhyI"),r=n("8Y7J");let s=(()=>{class e{constructor(){this.sections=[{heading:"Quality of Service",class:"quality-of-service",options:[{name:"rbd_qos_bps_limit",displayName:"BPS Limit",description:"The desired limit of IO bytes per second.",type:i.b.bps},{name:"rbd_qos_iops_limit",displayName:"IOPS Limit",description:"The desired limit of IO operations per second.",type:i.b.iops},{name:"rbd_qos_read_bps_limit",displayName:"Read BPS Limit",description:"The desired limit of read bytes per second.",type:i.b.bps},{name:"rbd_qos_read_iops_limit",displayName:"Read IOPS Limit",description:"The desired limit of read operations per second.",type:i.b.iops},{name:"rbd_qos_write_bps_limit",displayName:"Write BPS Limit",description:"The desired limit of write bytes per second.",type:i.b.bps},{name:"rbd_qos_write_iops_limit",displayName:"Write IOPS Limit",description:"The desired limit of write operations per second.",type:i.b.iops},{name:"rbd_qos_bps_burst",displayName:"BPS Burst",description:"The desired burst limit of IO bytes.",type:i.b.bps},{name:"rbd_qos_iops_burst",displayName:"IOPS Burst",description:"The desired burst limit of IO operations.",type:i.b.iops},{name:"rbd_qos_read_bps_burst",displayName:"Read BPS Burst",description:"The desired burst limit of read bytes.",type:i.b.bps},{name:"rbd_qos_read_iops_burst",displayName:"Read IOPS Burst",description:"The desired burst limit of read operations.",type:i.b.iops},{name:"rbd_qos_write_bps_burst",displayName:"Write BPS Burst",description:"The desired burst limit of write bytes.",type:i.b.bps},{name:"rbd_qos_write_iops_burst",displayName:"Write IOPS Burst",description:"The desired burst limit of write operations.",type:i.b.iops}]}]}static getOptionsFromSections(e){return e.map(e=>e.options).reduce((e,t)=>e.concat(t))}filterConfigOptionsByName(t){return e.getOptionsFromSections(this.sections).filter(e=>e.name===t)}getOptionValueByName(e,t,n=""){const i=this.filterConfigOptionsByName(e);return 1===i.length?i.pop()[t]:n}getWritableSections(){return this.sections.map(e=>(e.options=e.options.filter(e=>!e.readOnly),e))}getOptionFields(){return e.getOptionsFromSections(this.sections)}getWritableOptionFields(){return e.getOptionsFromSections(this.getWritableSections())}getOptionByName(e){return this.filterConfigOptionsByName(e).pop()}getDisplayName(e){return this.getOptionValueByName(e,"displayName")}getDescription(e){return this.getOptionValueByName(e,"description")}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=r.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},oMSZ:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));class i{constructor(e){this.pwdExpirationSpan=0,this.pwdExpirationSpan=e.user_pwd_expiration_span,this.pwdExpirationWarning1=e.user_pwd_expiration_warning_1,this.pwdExpirationWarning2=e.user_pwd_expiration_warning_2}}},oSzE:function(e,t,n){"use strict";var i=n("nLtN"),r=n("3cmB"),s=n("DlmY");function o(e){var t=this.__data__=new i.a(e);this.size=t.size}o.prototype.clear=function(){this.__data__=new i.a,this.size=0},o.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},o.prototype.get=function(e){return this.__data__.get(e)},o.prototype.has=function(e){return this.__data__.has(e)},o.prototype.set=function(e,t){var n=this.__data__;if(n instanceof i.a){var o=n.__data__;if(!r.a||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new s.a(o)}return n.set(e,t),this.size=n.size,this},t.a=o},oYcn:function(e,t,n){"use strict";var i=n("8M4i"),r=n("Js68"),s=n("EUcb"),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1;var a=n("ovuK"),c=n("xutz"),l=c.a&&c.a.isTypedArray,u=l?Object(a.a)(l):function(e){return Object(s.a)(e)&&Object(r.a)(e.length)&&!!o[Object(i.a)(e)]};t.a=u},ocLN:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("s7LF"),r=n("8Y7J");let s=(()=>{class e{constructor(e){this.elRef=e,this.validationDisabled=!1}get hasErrors(){return this.formControlNames.some(e=>!e.valid&&e.dirty&&e.touched)&&!this.validationDisabled}get hasSuccess(){return!this.formControlNames.some(e=>!e.valid)&&this.formControlNames.some(e=>e.dirty&&e.touched)&&!this.validationDisabled}get label(){const e=this.elRef.nativeElement.querySelector("label");return e&&e.textContent?e.textContent.trim():"This field"}get isDirtyAndTouched(){return this.formControlNames.some(e=>e.dirty&&e.touched)}}return e.\u0275fac=function(t){return new(t||e)(r.Mb(r.m))},e.\u0275dir=r.Hb({type:e,selectors:[["",8,"form-group"]],contentQueries:function(e,t,n){var s;1&e&&r.Fb(n,i.i,!1),2&e&&r.zc(s=r.hc())&&(t.formControlNames=s)},hostVars:4,hostBindings:function(e,t){2&e&&r.Eb("has-error",t.hasErrors)("has-success",t.hasSuccess)},inputs:{validationDisabled:"validationDisabled"}}),e})()},"ohO+":function(e,t,n){"use strict";n.d(t,"a",(function(){return Gr})),n.d(t,"b",(function(){return hs})),n.d(t,"c",(function(){return Is}));var i=n("8Y7J"),r=n("SVse"),s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return(a=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function c(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,s=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(i=s.next()).done;)o.push(i.value)}catch(a){r={error:a}}finally{try{i&&!i.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return o}function l(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(c(arguments[t]));return e}var u=[];Object.freeze(u);var d={};Object.freeze(d);var h={};function f(){return"undefined"!=typeof window?window:"undefined"!=typeof global?global:h}function p(){return++Re.mobxGuid}function m(e){throw b(!1,e),"X"}function b(e,t){if(!e)throw new Error("[mobx] "+(t||"An invariant failed, however the error is obfuscated because this is an production build."))}function g(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var _=function(){};function y(e){return null!==e&&"object"==typeof e}function v(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function w(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function S(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function M(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return y(e)&&!0===e[n]}}function x(e){return void 0!==f().Map&&e instanceof f().Map}function k(e){return e instanceof Set}function D(e){for(var t=[];;){var n=e.next();if(n.done)break;t.push(n.value)}return t}function T(){return"function"==typeof Symbol&&Symbol.toPrimitive||"@@toPrimitive"}function C(e){return null===e?null:"object"==typeof e?""+e:e}function O(){return"function"==typeof Symbol&&Symbol.iterator||"@@iterator"}function L(e,t){S(e,O(),t)}function R(e){return e[O()]=A,e}function E(){return"function"==typeof Symbol&&Symbol.toStringTag||"@@toStringTag"}function A(){return this}var I=function(){function e(e){void 0===e&&(e="Atom@"+p()),this.name=e,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=oe.NOT_TRACKING}return e.prototype.onBecomeUnobserved=function(){},e.prototype.onBecomeObserved=function(){},e.prototype.reportObserved=function(){return Ne(this)},e.prototype.reportChanged=function(){Pe(),function(e){if(e.lowestObserverState!==oe.STALE){e.lowestObserverState=oe.STALE;for(var t=e.observers,n=t.length;n--;){var i=t[n];i.dependenciesState===oe.UP_TO_DATE&&(i.isTracing!==ae.NONE&&Fe(i,e),i.onBecomeStale()),i.dependenciesState=oe.STALE}}}(this),je()},e.prototype.toString=function(){return this.name},e}(),P=M("Atom",I);function j(e,t){return e===t}var N={identity:j,structural:function(e,t){return qt(e,t)},default:function(e,t){return function(e,t){return"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}(e,t)||j(e,t)},shallow:function(e,t){return qt(e,t,1)}},F={},Y={};function z(e,t){var n=t?F:Y;return n[e]||(n[e]={configurable:!0,enumerable:t,get:function(){return $(this),this[e]},set:function(t){$(this),this[e]=t}})}function $(e){if(!0!==e.__mobxDidRunLazyInitializers){var t=e.__mobxDecorators;if(t)for(var n in w(e,"__mobxDidRunLazyInitializers",!0),t){var i=t[n];i.propertyCreator(e,i.prop,i.descriptor,i.decoratorTarget,i.decoratorArguments)}}}function H(e,t){return function(){var n,i=function(i,r,s,o){return!0===o?(t(i,r,s,i,n),null):(Object.prototype.hasOwnProperty.call(i,"__mobxDecorators")||w(i,"__mobxDecorators",a({},i.__mobxDecorators)),i.__mobxDecorators[r]={prop:r,propertyCreator:t,descriptor:s,decoratorTarget:i,decoratorArguments:n},z(r,e))};return W(arguments)?(n=u,i.apply(null,arguments)):(n=Array.prototype.slice.call(arguments),i)}}function W(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]||4===e.length&&!0===e[3]}function V(e,t,n){return at(e)?e:Array.isArray(e)?te.array(e,{name:n}):v(e)?te.object(e,void 0,{name:n}):x(e)?te.map(e,{name:n}):k(e)?te.set(e,{name:n}):e}function B(e){return e}function U(e){var t=H(!0,(function(t,n,i,r,s){!function(e,t,n,i){var r=Yt(e);if(ut(r)){var s=ht(r,{object:e,name:t,type:"add",newValue:n});if(!s)return;n=s.newValue}n=(r.values[t]=new De(n,i,r.name+"."+t,!1)).value,Object.defineProperty(e,t,function(e){return zt[e]||(zt[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.read(this,e)},set:function(t){this.$mobx.write(this,e,t)}})}(t)),r.keys&&r.keys.push(t),function(e,t,n,i){var r=ft(e),s=He(),o=r||s?{type:"add",object:t,name:n,newValue:i}:null;s&&Ve(a({},o,{name:e.name,key:n})),r&&mt(e,o),s&&Ue()}(r,e,t,n)}(t,n,i?i.initializer?i.initializer.call(t):i.value:void 0,e)})),n=("undefined"!=typeof process&&process,t);return n.enhancer=e,n}var q={deep:!0,name:void 0,defaultDecorator:void 0};function G(e){return null==e?q:"string"==typeof e?{name:e,deep:!0}:e}function J(e){return e.defaultDecorator?e.defaultDecorator.enhancer:!1===e.deep?B:V}Object.freeze(q),Object.freeze({deep:!1,name:void 0,defaultDecorator:void 0});var Q=U(V),K=U((function(e,t,n){return null==e||Vt(e)||Lt(e)||It(e)||Nt(e)?e:Array.isArray(e)?te.array(e,{name:n,deep:!1}):v(e)?te.object(e,void 0,{name:n,deep:!1}):x(e)?te.map(e,{name:n,deep:!1}):k(e)?te.set(e,{name:n,deep:!1}):m(!1)})),Z=U(B),X=U((function(e,t,n){return qt(e,t)?t:e})),ee={box:function(e,t){arguments.length>2&&ne("box");var n=G(t);return new De(e,J(n),n.name,!0,n.equals)},shallowBox:function(e,t){return arguments.length>2&&ne("shallowBox"),te.box(e,{name:t,deep:!1})},array:function(e,t){arguments.length>2&&ne("array");var n=G(t);return new xt(e,J(n),n.name)},shallowArray:function(e,t){return arguments.length>2&&ne("shallowArray"),te.array(e,{name:t,deep:!1})},map:function(e,t){arguments.length>2&&ne("map");var n=G(t);return new Et(e,J(n),n.name)},shallowMap:function(e,t){return arguments.length>2&&ne("shallowMap"),te.map(e,{name:t,deep:!1})},set:function(e,t){arguments.length>2&&ne("set");var n=G(t);return new jt(e,J(n),n.name)},object:function(e,t,n){"string"==typeof arguments[1]&&ne("object");var i=G(n);return rt({},e,t,i)},shallowObject:function(e,t){return"string"==typeof arguments[1]&&ne("shallowObject"),te.object(e,{},{name:t,deep:!1})},ref:Z,shallow:K,deep:Q,struct:X},te=function(e,t,n){if("string"==typeof arguments[1])return Q.apply(null,arguments);if(at(e))return e;var i=v(e)?te.object(e,t,n):Array.isArray(e)?te.array(e,t):x(e)?te.map(e,t):k(e)?te.set(e,t):e;if(i!==e)return i;m(!1)};function ne(e){m("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}Object.keys(ee).forEach((function(e){return te[e]=ee[e]}));var ie=H(!1,(function(e,t,n,i,r){var s,o,c,l;s=e,o=t,c=a({get:n.get,set:n.set},r[0]||{}),l=Yt(s),c.name=l.name+"."+o,c.context=s,l.values[o]=new Te(c),Object.defineProperty(s,o,function(e){return $t[e]||($t[e]={configurable:Re.computedConfigurable,enumerable:!1,get:function(){return Ht(this).read(this,e)},set:function(t){Ht(this).write(this,e,t)}})}(o))})),re=ie({equals:N.structural}),se=function(e,t,n){if("string"==typeof t)return ie.apply(null,arguments);if(null!==e&&"object"==typeof e&&1===arguments.length)return ie.apply(null,arguments);var i="object"==typeof t?t:{};return i.get=e,i.set="function"==typeof t?t:i.set,i.name=i.name||e.name||"",new Te(i)};se.struct=re;var oe=function(e){return e[e.NOT_TRACKING=-1]="NOT_TRACKING",e[e.UP_TO_DATE=0]="UP_TO_DATE",e[e.POSSIBLY_STALE=1]="POSSIBLY_STALE",e[e.STALE=2]="STALE",e}({}),ae=function(e){return e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK",e}({}),ce=function(){return function(e){this.cause=e}}();function le(e){return e instanceof ce}function ue(e){switch(e.dependenciesState){case oe.UP_TO_DATE:return!1;case oe.NOT_TRACKING:case oe.STALE:return!0;case oe.POSSIBLY_STALE:for(var t=me(),n=e.observing,i=n.length,r=0;r<i;r++){var s=n[r];if(Ce(s)){if(Re.disableErrorBoundaries)s.get();else try{s.get()}catch(o){return be(t),!0}if(e.dependenciesState===oe.STALE)return be(t),!0}}return ye(e),be(t),!1}}function de(e){var t=e.observers.length>0;Re.computationDepth>0&&t&&m(!1),Re.allowStateChanges||!t&&"strict"!==Re.enforceActions||m(!1)}function he(e,t,n){var i=ge(!0);ye(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++Re.runId;var r,s=Re.trackingDerivation;if(Re.trackingDerivation=e,!0===Re.disableErrorBoundaries)r=t.call(n);else try{r=t.call(n)}catch(o){r=new ce(o)}return Re.trackingDerivation=s,function(e){for(var t=e.observing,n=e.observing=e.newObserving,i=oe.UP_TO_DATE,r=0,s=e.unboundDepsCount,o=0;o<s;o++)0===(a=n[o]).diffValue&&(a.diffValue=1,r!==o&&(n[r]=a),r++),a.dependenciesState>i&&(i=a.dependenciesState);for(n.length=r,e.newObserving=null,s=t.length;s--;)0===(a=t[s]).diffValue&&Ae(a,e),a.diffValue=0;for(;r--;){var a;1===(a=n[r]).diffValue&&(a.diffValue=0,Ee(a,e))}i!==oe.UP_TO_DATE&&(e.dependenciesState=i,e.onBecomeStale())}(e),_e(i),r}function fe(e){var t=e.observing;e.observing=[];for(var n=t.length;n--;)Ae(t[n],e);e.dependenciesState=oe.NOT_TRACKING}function pe(e){var t=me(),n=e();return be(t),n}function me(){var e=Re.trackingDerivation;return Re.trackingDerivation=null,e}function be(e){Re.trackingDerivation=e}function ge(e){var t=Re.allowStateReads;return Re.allowStateReads=e,t}function _e(e){Re.allowStateReads=e}function ye(e){if(e.dependenciesState!==oe.UP_TO_DATE){e.dependenciesState=oe.UP_TO_DATE;for(var t=e.observing,n=t.length;n--;)t[n].lowestObserverState=oe.UP_TO_DATE}}var ve=0,we=1;function Se(e,t){var n=function(){return Me(e,t,this,arguments)};return n.isMobxAction=!0,n}function Me(e,t,n,i){var r=function(e,t,n){var i=He()&&!!e,r=0;if(i){r=Date.now();var s=n&&n.length||0,o=new Array(s);if(s>0)for(var a=0;a<s;a++)o[a]=n[a];Ve({type:"action",name:e,object:t,arguments:o})}var c=me();Pe();var l={prevDerivation:c,prevAllowStateChanges:xe(!0),prevAllowStateReads:ge(!0),notifySpy:i,startTime:r,actionId:we++,parentActionId:ve};return ve=l.actionId,l}(e,n,i);try{return t.apply(n,i)}catch(s){throw r.error=s,s}finally{!function(e){ve!==e.actionId&&m("invalid action stack. did you forget to finish an action?"),ve=e.parentActionId,void 0!==e.error&&(Re.suppressReactionErrors=!0),ke(e.prevAllowStateChanges),_e(e.prevAllowStateReads),je(),be(e.prevDerivation),e.notifySpy&&Ue({time:Date.now()-e.startTime}),Re.suppressReactionErrors=!1}(r)}}function xe(e){var t=Re.allowStateChanges;return Re.allowStateChanges=e,t}function ke(e){Re.allowStateChanges=e}var De=function(e){function t(t,n,i,r,s){void 0===i&&(i="ObservableValue@"+p()),void 0===r&&(r=!0),void 0===s&&(s=N.default);var o=e.call(this,i)||this;return o.enhancer=n,o.name=i,o.equals=s,o.hasUnreportedChange=!1,o.value=n(t,void 0,i),r&&He()&&We({type:"create",name:o.name,newValue:""+o.value}),o}return o(t,e),t.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.prototype.set=function(e){var t=this.value;if((e=this.prepareNewValue(e))!==Re.UNCHANGED){var n=He();n&&Ve({type:"update",name:this.name,newValue:e,oldValue:t}),this.setNewValue(e),n&&Ue()}},t.prototype.prepareNewValue=function(e){if(de(this),ut(this)){var t=ht(this,{object:this,type:"update",newValue:e});if(!t)return Re.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value,this.name),this.equals(this.value,e)?Re.UNCHANGED:e},t.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),ft(this)&&mt(this,{type:"update",object:this,newValue:e,oldValue:t})},t.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},t.prototype.intercept=function(e){return dt(this,e)},t.prototype.observe=function(e,t){return t&&e({object:this,type:"update",newValue:this.value,oldValue:void 0}),pt(this,e)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t.prototype.valueOf=function(){return C(this.get())},t}(I);De.prototype[T()]=De.prototype.valueOf,M("ObservableValue",De);var Te=function(){function e(e){this.dependenciesState=oe.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=oe.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+p(),this.value=new ce(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=ae.NONE,this.derivation=e.get,this.name=e.name||"ComputedValue@"+p(),e.set&&(this.setter=Se(this.name+"-setter",e.set)),this.equals=e.equals||(e.compareStructural||e.struct?N.structural:N.default),this.scope=e.context,this.requiresReaction=!!e.requiresReaction,this.keepAlive=!!e.keepAlive}return e.prototype.onBecomeStale=function(){!function(e){if(e.lowestObserverState===oe.UP_TO_DATE){e.lowestObserverState=oe.POSSIBLY_STALE;for(var t=e.observers,n=t.length;n--;){var i=t[n];i.dependenciesState===oe.UP_TO_DATE&&(i.dependenciesState=oe.POSSIBLY_STALE,i.isTracing!==ae.NONE&&Fe(i,e),i.onBecomeStale())}}}(this)},e.prototype.onBecomeUnobserved=function(){},e.prototype.onBecomeObserved=function(){},e.prototype.get=function(){this.isComputing&&m("Cycle detected in computation "+this.name+": "+this.derivation),0!==Re.inBatch||0!==this.observers.length||this.keepAlive?(Ne(this),ue(this)&&this.trackAndCompute()&&function(e){if(e.lowestObserverState!==oe.STALE){e.lowestObserverState=oe.STALE;for(var t=e.observers,n=t.length;n--;){var i=t[n];i.dependenciesState===oe.POSSIBLY_STALE?i.dependenciesState=oe.STALE:i.dependenciesState===oe.UP_TO_DATE&&(e.lowestObserverState=oe.UP_TO_DATE)}}}(this)):ue(this)&&(this.warnAboutUntrackedRead(),Pe(),this.value=this.computeValue(!1),je());var e=this.value;if(le(e))throw e.cause;return e},e.prototype.peek=function(){var e=this.computeValue(!1);if(le(e))throw e.cause;return e},e.prototype.set=function(e){if(this.setter){b(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else b(!1,!1)},e.prototype.trackAndCompute=function(){He()&&We({object:this.scope,type:"compute",name:this.name});var e=this.value,t=this.dependenciesState===oe.NOT_TRACKING,n=this.computeValue(!0),i=t||le(e)||le(n)||!this.equals(e,n);return i&&(this.value=n),i},e.prototype.computeValue=function(e){var t;if(this.isComputing=!0,Re.computationDepth++,e)t=he(this,this.derivation,this.scope);else if(!0===Re.disableErrorBoundaries)t=this.derivation.call(this.scope);else try{t=this.derivation.call(this.scope)}catch(n){t=new ce(n)}return Re.computationDepth--,this.isComputing=!1,t},e.prototype.suspend=function(){this.keepAlive||(fe(this),this.value=void 0)},e.prototype.observe=function(e,t){var n=this,i=!0,r=void 0;return Ze((function(){var s=n.get();if(!i||t){var o=me();e({type:"update",object:n,newValue:s,oldValue:r}),be(o)}i=!1,r=s}))},e.prototype.warnAboutUntrackedRead=function(){},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.valueOf=function(){return C(this.get())},e}();Te.prototype[T()]=Te.prototype.valueOf;var Ce=M("ComputedValue",Te),Oe=function(){return function(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}}(),Le=!0,Re=function(){var e=f();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(Le=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new Oe).version&&(Le=!1),Le?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new Oe):(setTimeout((function(){m("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")}),1),new Oe)}();function Ee(e,t){var n=e.observers.length;n&&(e.observersIndexes[t.__mapid]=n),e.observers[n]=t,e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function Ae(e,t){if(1===e.observers.length)e.observers.length=0,Ie(e);else{var n=e.observers,i=e.observersIndexes,r=n.pop();if(r!==t){var s=i[t.__mapid]||0;s?i[r.__mapid]=s:delete i[r.__mapid],n[s]=r}delete i[t.__mapid]}}function Ie(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,Re.pendingUnobservations.push(e))}function Pe(){Re.inBatch++}function je(){if(0==--Re.inBatch){ze();for(var e=Re.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n.observers.length&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBecomeUnobserved()),n instanceof Te&&n.suspend())}Re.pendingUnobservations=[]}}function Ne(e){var t=Re.trackingDerivation;return null!==t?(t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e,e.isBeingObserved||(e.isBeingObserved=!0,e.onBecomeObserved())),!0):(0===e.observers.length&&Re.inBatch>0&&Ie(e),!1)}function Fe(e,t){if(console.log("[mobx.trace] '"+e.name+"' is invalidated due to a change in: '"+t.name+"'"),e.isTracing===ae.BREAK){var n=[];!function e(t,n,i){n.length>=1e3?n.push("(and many more)"):(n.push(""+new Array(i).join("\t")+t.name),t.dependencies&&t.dependencies.forEach((function(t){return e(t,n,i+1)})))}((i=e,st(Bt(i,void 0))),n,1),new Function("debugger;\n/*\nTracing '"+e.name+"'\n\nYou are entering this break point because derivation '"+e.name+"' is being traced and '"+t.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof Te?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}var i}var Ye=function(){function e(e,t,n,i){void 0===e&&(e="Reaction@"+p()),void 0===i&&(i=!1),this.name=e,this.onInvalidate=t,this.errorHandler=n,this.requiresObservable=i,this.observing=[],this.newObserving=[],this.dependenciesState=oe.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+p(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=ae.NONE}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Re.pendingReactions.push(this),ze())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){if(!this.isDisposed){if(Pe(),this._isScheduled=!1,ue(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&He()&&We({name:this.name,type:"scheduled-reaction"})}catch(e){this.reportExceptionInDerivation(e)}}je()}},e.prototype.track=function(e){Pe();var t,n=He();n&&(t=Date.now(),Ve({name:this.name,type:"reaction"})),this._isRunning=!0;var i=he(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&fe(this),le(i)&&this.reportExceptionInDerivation(i.cause),n&&Ue({time:Date.now()-t}),je()},e.prototype.reportExceptionInDerivation=function(e){var t=this;if(this.errorHandler)this.errorHandler(e,this);else{if(Re.disableErrorBoundaries)throw e;var n="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";Re.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(n,e),He()&&We({type:"error",name:this.name,message:n,error:""+e}),Re.globalReactionErrorHandlers.forEach((function(n){return n(e,t)}))}},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Pe(),fe(this),je()))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.trace=function(e){void 0===e&&(e=!1),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=!1;"boolean"==typeof e[e.length-1]&&(n=e.pop());var i=ct(e);if(!i)return m(!1);i.isTracing===ae.NONE&&console.log("[mobx.trace] '"+i.name+"' tracing enabled"),i.isTracing=n?ae.BREAK:ae.LOG}(this,e)},e}();function ze(){Re.inBatch>0||Re.isRunningReactions||function(){Re.isRunningReactions=!0;for(var e=Re.pendingReactions,t=0;e.length>0;){100==++t&&(console.error("Reaction doesn't converge to a stable state after 100 iterations. Probably there is a cycle in the reactive function: "+e[0]),e.splice(0));for(var n=e.splice(0),i=0,r=n.length;i<r;i++)n[i].runReaction()}Re.isRunningReactions=!1}()}var $e=M("Reaction",Ye);function He(){return!!Re.spyListeners.length}function We(e){if(Re.spyListeners.length)for(var t=Re.spyListeners,n=0,i=t.length;n<i;n++)t[n](e)}function Ve(e){We(a({},e,{spyReportStart:!0}))}var Be={spyReportEnd:!0};function Ue(e){We(e?a({},e,{spyReportEnd:!0}):Be)}function qe(){m(!1)}function Ge(e){return function(t,n,i){if(i){if(i.value)return{value:Se(e,i.value),enumerable:!1,configurable:!0,writable:!0};var r=i.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return Se(e,r.call(this))}}}return Je(e).apply(this,arguments)}}function Je(e){return function(t,n,i){Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:function(){},set:function(t){w(this,n,Qe(e,t))}})}}var Qe=function(e,t,n,i){return 1===arguments.length&&"function"==typeof e?Se(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?Se(e,t):1===arguments.length&&"string"==typeof e?Ge(e):!0!==i?Ge(t).apply(null,arguments):void(e[t]=Se(e.name||t,n.value))};function Ke(e,t,n){w(e,t,Se(t,n.bind(e)))}function Ze(e,t){void 0===t&&(t=d);var n,i=t&&t.name||e.name||"Autorun@"+p();if(t.scheduler||t.delay){var r=et(t),s=!1;n=new Ye(i,(function(){s||(s=!0,r((function(){s=!1,n.isDisposed||n.track(o)})))}),t.onError,t.requiresObservable)}else n=new Ye(i,(function(){this.track(o)}),t.onError,t.requiresObservable);function o(){e(n)}return n.schedule(),n.getDisposer()}Qe.bound=function(e,t,n,i){return!0===i?(Ke(e,t,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return Ke(this,t,n.value||n.initializer.call(this)),this[t]},set:qe}:{enumerable:!1,configurable:!0,set:function(e){Ke(this,t,e)},get:function(){}}};var Xe=function(e){return e()};function et(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Xe}function tt(e,t,n){void 0===n&&(n=d),"boolean"==typeof n&&(n={fireImmediately:n});var i,r,s,o=n.name||"Reaction@"+p(),a=Qe(o,n.onError?(i=n.onError,r=t,function(){try{return r.apply(this,arguments)}catch(e){i.call(this,e)}}):t),c=!n.scheduler&&!n.delay,l=et(n),u=!0,h=!1,f=n.compareStructural?N.structural:n.equals||N.default,m=new Ye(o,(function(){u||c?b():h||(h=!0,l(b))}),n.onError,n.requiresObservable);function b(){if(h=!1,!m.isDisposed){var t=!1;m.track((function(){var n=e(m);t=u||!f(s,n),s=n})),u&&n.fireImmediately&&a(s,m),u||!0!==t||a(s,m),u&&(u=!1)}}return m.schedule(),m.getDisposer()}function nt(e,t,n){return it("onBecomeUnobserved",e,t,n)}function it(e,t,n,i){var r="function"==typeof i?Bt(t,n):Bt(t),s="function"==typeof i?i:n,o=r[e];return"function"!=typeof o?m(!1):(r[e]=function(){o.call(this),s.call(this)},function(){r[e]=o})}function rt(e,t,n,i){var r=(i=G(i)).defaultDecorator||(!1===i.deep?Z:Q);$(e),Yt(e,i.name,r.enhancer),Pe();try{for(var s in t){var o=Object.getOwnPropertyDescriptor(t,s),a=(n&&s in n?n[s]:o.get?ie:r)(e,s,o,!0);a&&Object.defineProperty(e,s,a)}}finally{je()}return e}function st(e){var t,n,i={name:e.name};return e.observing&&e.observing.length>0&&(i.dependencies=(t=e.observing,n=[],t.forEach((function(e){-1===n.indexOf(e)&&n.push(e)})),n).map(st)),i}function ot(e,t){if(null==e)return!1;if(void 0!==t){if(Vt(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return Vt(e)||!!e.$mobx||P(e)||$e(e)||Ce(e)}function at(e){return 1!==arguments.length&&m(!1),ot(e)}function ct(e){switch(e.length){case 0:return Re.trackingDerivation;case 1:return Bt(e[0]);case 2:return Bt(e[0],e[1])}}function lt(e,t){void 0===t&&(t=void 0),Pe();try{return e.apply(t)}finally{je()}}function ut(e){return void 0!==e.interceptors&&e.interceptors.length>0}function dt(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),g((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function ht(e,t){var n=me();try{var i=e.interceptors;if(i)for(var r=0,s=i.length;r<s&&(b(!(t=i[r](t))||t.type,"Intercept handlers should return nothing or a change object"),t);r++);return t}finally{be(n)}}function ft(e){return void 0!==e.changeListeners&&e.changeListeners.length>0}function pt(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),g((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function mt(e,t){var n=me(),i=e.changeListeners;if(i){for(var r=0,s=(i=i.slice()).length;r<s;r++)i[r](t);be(n)}}var bt,gt,_t,yt,vt=(bt=!1,gt={},Object.defineProperty(gt,"0",{set:function(){bt=!0}}),Object.create(gt)[0]=1,!1===bt),wt=0,St=function(){return function(){}}();_t=St,yt=Array.prototype,void 0!==Object.setPrototypeOf?Object.setPrototypeOf(_t.prototype,yt):void 0!==_t.prototype.__proto__?_t.prototype.__proto__=yt:_t.prototype=yt,Object.isFrozen(Array)&&["constructor","push","shift","concat","pop","unshift","replace","find","findIndex","splice","reverse","sort"].forEach((function(e){Object.defineProperty(St.prototype,e,{configurable:!0,writable:!0,value:Array.prototype[e]})}));var Mt=function(){function e(e,t,n,i){this.array=n,this.owned=i,this.values=[],this.lastKnownLength=0,this.atom=new I(e||"ObservableArray@"+p()),this.enhancer=function(n,i){return t(n,i,e+"[..]")}}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.dehanceValues=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},e.prototype.intercept=function(e){return dt(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),pt(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;if(e!==t)if(e>t){for(var n=new Array(e-t),i=0;i<e-t;i++)n[i]=void 0;this.spliceWithArray(t,0,n)}else this.spliceWithArray(e,t-e)},e.prototype.updateArrayLength=function(e,t){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=t,t>0&&e+t+1>wt&&Ct(e+t+1)},e.prototype.spliceWithArray=function(e,t,n){var i=this;de(this.atom);var r=this.values.length;if(void 0===e?e=0:e>r?e=r:e<0&&(e=Math.max(0,r+e)),t=1===arguments.length?r-e:null==t?0:Math.max(0,Math.min(t,r-e)),void 0===n&&(n=u),ut(this)){var s=ht(this,{object:this.array,type:"splice",index:e,removedCount:t,added:n});if(!s)return u;t=s.removedCount,n=s.added}var o=(n=0===n.length?n:n.map((function(e){return i.enhancer(e,void 0)}))).length-t;this.updateArrayLength(r,o);var a=this.spliceItemsIntoValues(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice(e,n,a),this.dehanceValues(a)},e.prototype.spliceItemsIntoValues=function(e,t,n){var i;if(n.length<1e4)return(i=this.values).splice.apply(i,l([e,t],n));var r=this.values.slice(e,e+t);return this.values=this.values.slice(0,e).concat(n,this.values.slice(e+t)),r},e.prototype.notifyArrayChildUpdate=function(e,t,n){var i=!this.owned&&He(),r=ft(this),s=r||i?{object:this.array,type:"update",index:e,newValue:t,oldValue:n}:null;i&&Ve(a({},s,{name:this.atom.name})),this.atom.reportChanged(),r&&mt(this,s),i&&Ue()},e.prototype.notifyArraySplice=function(e,t,n){var i=!this.owned&&He(),r=ft(this),s=r||i?{object:this.array,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;i&&Ve(a({},s,{name:this.atom.name})),this.atom.reportChanged(),r&&mt(this,s),i&&Ue()},e}(),xt=function(e){function t(t,n,i,r){void 0===i&&(i="ObservableArray@"+p()),void 0===r&&(r=!1);var s=e.call(this)||this,o=new Mt(i,n,s,r);if(S(s,"$mobx",o),t&&t.length){var a=xe(!0);s.spliceWithArray(0,0,t),ke(a)}return vt&&Object.defineProperty(o.array,"0",kt),s}return o(t,e),t.prototype.intercept=function(e){return this.$mobx.intercept(e)},t.prototype.observe=function(e,t){return void 0===t&&(t=!1),this.$mobx.observe(e,t)},t.prototype.clear=function(){return this.splice(0)},t.prototype.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.$mobx.atom.reportObserved(),Array.prototype.concat.apply(this.peek(),e.map((function(e){return Lt(e)?e.peek():e})))},t.prototype.replace=function(e){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,e)},t.prototype.toJS=function(){return this.slice()},t.prototype.toJSON=function(){return this.toJS()},t.prototype.peek=function(){return this.$mobx.atom.reportObserved(),this.$mobx.dehanceValues(this.$mobx.values)},t.prototype.find=function(e,t,n){void 0===n&&(n=0);var i=this.findIndex.apply(this,arguments);return-1===i?void 0:this.get(i)},t.prototype.findIndex=function(e,t,n){void 0===n&&(n=0);for(var i=this.peek(),r=i.length,s=n;s<r;s++)if(e.call(t,i[s],s,this))return s;return-1},t.prototype.splice=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(e);case 2:return this.$mobx.spliceWithArray(e,t)}return this.$mobx.spliceWithArray(e,t,n)},t.prototype.spliceWithArray=function(e,t,n){return this.$mobx.spliceWithArray(e,t,n)},t.prototype.push=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.$mobx;return n.spliceWithArray(n.values.length,0,e),n.values.length},t.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},t.prototype.shift=function(){return this.splice(0,1)[0]},t.prototype.unshift=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.$mobx;return n.spliceWithArray(0,0,e),n.values.length},t.prototype.reverse=function(){var e=this.slice();return e.reverse.apply(e,arguments)},t.prototype.sort=function(e){var t=this.slice();return t.sort.apply(t,arguments)},t.prototype.remove=function(e){var t=this.$mobx.dehanceValues(this.$mobx.values).indexOf(e);return t>-1&&(this.splice(t,1),!0)},t.prototype.move=function(e,t){function n(e){if(e<0)throw new Error("[mobx.array] Index out of bounds: "+e+" is negative");var t=this.$mobx.values.length;if(e>=t)throw new Error("[mobx.array] Index out of bounds: "+e+" is not smaller than "+t)}if(n.call(this,e),n.call(this,t),e!==t){var i,r=this.$mobx.values;i=e<t?l(r.slice(0,e),r.slice(e+1,t+1),[r[e]],r.slice(t+1)):l(r.slice(0,t),[r[e]],r.slice(t,e),r.slice(e+1)),this.replace(i)}},t.prototype.get=function(e){var t=this.$mobx;if(t){if(e<t.values.length)return t.atom.reportObserved(),t.dehanceValue(t.values[e]);console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+t.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},t.prototype.set=function(e,t){var n=this.$mobx,i=n.values;if(e<i.length){de(n.atom);var r=i[e];if(ut(n)){var s=ht(n,{type:"update",object:this,index:e,newValue:t});if(!s)return;t=s.newValue}(t=n.enhancer(t,r))!==r&&(i[e]=t,n.notifyArrayChildUpdate(e,t,r))}else{if(e!==i.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+i.length);n.spliceWithArray(e,0,[t])}},t}(St);L(xt.prototype,(function(){this.$mobx.atom.reportObserved();var e=this,t=0;return R({next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0,value:void 0}}})})),Object.defineProperty(xt.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(e){this.$mobx.setArrayLength(e)}}),w(xt.prototype,E(),"Array"),["every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some","toString","toLocaleString"].forEach((function(e){var t=Array.prototype[e];b("function"==typeof t,"Base function not defined on Array prototype: '"+e+"'"),w(xt.prototype,e,(function(){return t.apply(this.peek(),arguments)}))})),function(e,t){for(var n=0;n<t.length;n++)w(e,t[n],e[t[n]])}(xt.prototype,["constructor","intercept","observe","clear","concat","get","replace","toJS","toJSON","peek","find","findIndex","splice","spliceWithArray","push","pop","set","shift","unshift","reverse","sort","remove","move","toString","toLocaleString"]);var kt=Dt(0);function Dt(e){return{enumerable:!1,configurable:!1,get:function(){return this.get(e)},set:function(t){this.set(e,t)}}}function Tt(e){Object.defineProperty(xt.prototype,""+e,Dt(e))}function Ct(e){for(var t=wt;t<e;t++)Tt(t);wt=e}Ct(1e3);var Ot=M("ObservableArrayAdministration",Mt);function Lt(e){return y(e)&&Ot(e.$mobx)}var Rt={},Et=function(){function e(e,t,n){if(void 0===t&&(t=V),void 0===n&&(n="ObservableMap@"+p()),this.enhancer=t,this.name=n,this.$mobx=Rt,this._keys=new xt(void 0,B,this.name+".keys()",!0),"function"!=typeof Map)throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(e)}return e.prototype._has=function(e){return this._data.has(e)},e.prototype.has=function(e){var t=this;if(!Re.trackingDerivation)return this._has(e);var n=this._hasMap.get(e);if(!n){var i=n=new De(this._has(e),B,this.name+"."+At(e)+"?",!1);this._hasMap.set(e,i),nt(i,(function(){return t._hasMap.delete(e)}))}return n.get()},e.prototype.set=function(e,t){var n=this._has(e);if(ut(this)){var i=ht(this,{type:n?"update":"add",object:this,newValue:t,name:e});if(!i)return this;t=i.newValue}return n?this._updateValue(e,t):this._addValue(e,t),this},e.prototype.delete=function(e){var t=this;if(ut(this)&&!(r=ht(this,{type:"delete",object:this,name:e})))return!1;if(this._has(e)){var n=He(),i=ft(this),r=i||n?{type:"delete",object:this,oldValue:this._data.get(e).value,name:e}:null;return n&&Ve(a({},r,{name:this.name,key:e})),lt((function(){t._keys.remove(e),t._updateHasMapEntry(e,!1),t._data.get(e).setNewValue(void 0),t._data.delete(e)})),i&&mt(this,r),n&&Ue(),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap.get(e);n&&n.setNewValue(t)},e.prototype._updateValue=function(e,t){var n=this._data.get(e);if((t=n.prepareNewValue(t))!==Re.UNCHANGED){var i=He(),r=ft(this),s=r||i?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;i&&Ve(a({},s,{name:this.name,key:e})),n.setNewValue(t),r&&mt(this,s),i&&Ue()}},e.prototype._addValue=function(e,t){var n=this;lt((function(){var i=new De(t,n.enhancer,n.name+"."+At(e),!1);n._data.set(e,i),t=i.value,n._updateHasMapEntry(e,!0),n._keys.push(e)}));var i=He(),r=ft(this),s=r||i?{type:"add",object:this,name:e,newValue:t}:null;i&&Ve(a({},s,{name:this.name,key:e})),r&&mt(this,s),i&&Ue()},e.prototype.get=function(e){return this.has(e)?this.dehanceValue(this._data.get(e).get()):this.dehanceValue(void 0)},e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.keys=function(){return this._keys[O()]()},e.prototype.values=function(){var e=this,t=0;return R({next:function(){return t<e._keys.length?{value:e.get(e._keys[t++]),done:!1}:{value:void 0,done:!0}}})},e.prototype.entries=function(){var e=this,t=0;return R({next:function(){if(t<e._keys.length){var n=e._keys[t++];return{value:[n,e.get(n)],done:!1}}return{done:!0}}})},e.prototype.forEach=function(e,t){var n=this;this._keys.forEach((function(i){return e.call(t,n.get(i),i,n)}))},e.prototype.merge=function(e){var t=this;return It(e)&&(e=e.toJS()),lt((function(){v(e)?Object.keys(e).forEach((function(n){return t.set(n,e[n])})):Array.isArray(e)?e.forEach((function(e){var n=c(e,2);return t.set(n[0],n[1])})):x(e)?e.constructor!==Map?m("Cannot initialize from classes that inherit from Map: "+e.constructor.name):e.forEach((function(e,n){return t.set(n,e)})):null!=e&&m("Cannot initialize map from "+e)})),this},e.prototype.clear=function(){var e=this;lt((function(){pe((function(){e._keys.slice().forEach((function(t){return e.delete(t)}))}))}))},e.prototype.replace=function(e){var t=this;return lt((function(){for(var n,i=x(n=e)||It(n)?n:Array.isArray(n)?new Map(n):v(n)?new Map(Object.entries(n)):m("Cannot convert to map from '"+n+"'"),r=t._keys,s=Array.from(i.keys()),o=!1,a=0;a<r.length;a++){var c=r[a];r.length===s.length&&c!==s[a]&&(o=!0),i.has(c)||(o=!0,t.delete(c))}i.forEach((function(e,n){t._data.has(n)||(o=!0),t.set(n,e)})),o&&t._keys.replace(s)})),this},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.toPOJO=function(){var e=this,t={};return this._keys.forEach((function(n){return t["symbol"==typeof n?n:At(n)]=e.get(n)})),t},e.prototype.toJS=function(){var e=this,t=new Map;return this._keys.forEach((function(n){return t.set(n,e.get(n))})),t},e.prototype.toJSON=function(){return this.toPOJO()},e.prototype.toString=function(){var e=this;return this.name+"[{ "+this._keys.map((function(t){return At(t)+": "+e.get(t)})).join(", ")+" }]"},e.prototype.observe=function(e,t){return pt(this,e)},e.prototype.intercept=function(e){return dt(this,e)},e}();function At(e){return e&&e.toString?e.toString():new String(e).toString()}L(Et.prototype,(function(){return this.entries()})),S(Et.prototype,E(),"Map");var It=M("ObservableMap",Et),Pt={},jt=function(){function e(e,t,n){if(void 0===t&&(t=V),void 0===n&&(n="ObservableSet@"+p()),this.name=n,this.$mobx=Pt,this._data=new Set,this._atom=function(e,t,n){void 0===t&&(t=_),void 0===n&&(n=_);var i=new I(e);return it("onBecomeObserved",i,t,void 0),nt(i,n),i}(this.name),"function"!=typeof Set)throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(e,i){return t(e,i,n)},e&&this.replace(e)}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.clear=function(){var e=this;lt((function(){pe((function(){e._data.forEach((function(t){e.delete(t)}))}))}))},e.prototype.forEach=function(e,t){var n=this;this._data.forEach((function(i){e.call(t,i,i,n)}))},Object.defineProperty(e.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=this;if(de(this._atom),ut(this)&&!(r=ht(this,{type:"add",object:this,newValue:e})))return this;if(!this.has(e)){lt((function(){t._data.add(t.enhancer(e,void 0)),t._atom.reportChanged()}));var n=He(),i=ft(this),r=i||n?{type:"add",object:this,newValue:e}:null;i&&mt(this,r)}return this},e.prototype.delete=function(e){var t=this;if(ut(this)&&!(r=ht(this,{type:"delete",object:this,oldValue:e})))return!1;if(this.has(e)){var n=He(),i=ft(this),r=i||n?{type:"delete",object:this,oldValue:e}:null;return lt((function(){t._atom.reportChanged(),t._data.delete(e)})),i&&mt(this,r),!0}return!1},e.prototype.has=function(e){return this._atom.reportObserved(),this._data.has(this.dehanceValue(e))},e.prototype.entries=function(){var e=0,t=D(this.keys()),n=D(this.values());return R({next:function(){var i=e;return e+=1,i<n.length?{value:[t[i],n[i]],done:!1}:{done:!0}}})},e.prototype.keys=function(){return this.values()},e.prototype.values=function(){this._atom.reportObserved();var e,t=this,n=0;return void 0!==this._data.values?e=D(this._data.values()):(e=[],this._data.forEach((function(t){return e.push(t)}))),R({next:function(){return n<e.length?{value:t.dehanceValue(e[n++]),done:!1}:{done:!0}}})},e.prototype.replace=function(e){var t=this;return Nt(e)&&(e=e.toJS()),lt((function(){Array.isArray(e)||k(e)?(t.clear(),e.forEach((function(e){return t.add(e)}))):null!=e&&m("Cannot initialize set from "+e)})),this},e.prototype.observe=function(e,t){return pt(this,e)},e.prototype.intercept=function(e){return dt(this,e)},e.prototype.toJS=function(){return new Set(this)},e.prototype.toString=function(){return this.name+"[ "+D(this.keys()).join(", ")+" ]"},e}();L(jt.prototype,(function(){return this.values()})),S(jt.prototype,E(),"Set");var Nt=M("ObservableSet",jt),Ft=function(){function e(e,t,n){this.target=e,this.name=t,this.defaultEnhancer=n,this.values={}}return e.prototype.read=function(e,t){if(this.target===e||(this.illegalAccess(e,t),this.values[t]))return this.values[t].get()},e.prototype.write=function(e,t,n){var i=this.target;i!==e&&this.illegalAccess(e,t);var r=this.values[t];if(r instanceof Te)r.set(n);else{if(ut(this)){if(!(c=ht(this,{type:"update",object:i,name:t,newValue:n})))return;n=c.newValue}if((n=r.prepareNewValue(n))!==Re.UNCHANGED){var s=ft(this),o=He(),c=s||o?{type:"update",object:i,oldValue:r.value,name:t,newValue:n}:null;o&&Ve(a({},c,{name:this.name,key:t})),r.setNewValue(n),s&&mt(this,c),o&&Ue()}}},e.prototype.remove=function(e){if(this.values[e]){var t=this.target;if(ut(this)&&!(s=ht(this,{object:t,name:e,type:"remove"})))return;try{Pe();var n=ft(this),i=He(),r=this.values[e].get();this.keys&&this.keys.remove(e),delete this.values[e],delete this.target[e];var s=n||i?{type:"remove",object:t,oldValue:r,name:e}:null;i&&Ve(a({},s,{name:this.name,key:e})),n&&mt(this,s),i&&Ue()}finally{je()}}},e.prototype.illegalAccess=function(e,t){console.warn("Property '"+t+"' of '"+e+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},e.prototype.observe=function(e,t){return pt(this,e)},e.prototype.intercept=function(e){return dt(this,e)},e.prototype.getKeys=function(){var e=this;return void 0===this.keys&&(this.keys=new xt(Object.keys(this.values).filter((function(t){return e.values[t]instanceof De})),B,"keys("+this.name+")",!0)),this.keys.slice()},e}();function Yt(e,t,n){void 0===t&&(t=""),void 0===n&&(n=V);var i=e.$mobx;return i||(v(e)||(t=(e.constructor.name||"ObservableObject")+"@"+p()),t||(t="ObservableObject@"+p()),S(e,"$mobx",i=new Ft(e,t,n)),i)}var zt=Object.create(null),$t=Object.create(null);function Ht(e){return e.$mobx||($(e),e.$mobx)}var Wt=M("ObservableObjectAdministration",Ft);function Vt(e){return!!y(e)&&($(e),Wt(e.$mobx))}function Bt(e,t){if("object"==typeof e&&null!==e){if(Lt(e))return void 0!==t&&m(!1),e.$mobx.atom;if(Nt(e))return e.$mobx;if(It(e)){var n=e;return void 0===t?Bt(n._keys):((i=n._data.get(t)||n._hasMap.get(t))||m(!1),i)}var i;if($(e),Vt(e))return t?((i=e.$mobx.values[t])||m(!1),i):m(!1);if(P(e)||Ce(e)||$e(e))return e}else if("function"==typeof e&&$e(e.$mobx))return e.$mobx;return m(!1)}var Ut=Object.prototype.toString;function qt(e,t,n){return void 0===n&&(n=-1),function e(t,n,i,r,s){if(t===n)return 0!==t||1/t==1/n;if(null==t||null==n)return!1;if(t!=t)return n!=n;var o=typeof t;if("function"!==o&&"object"!==o&&"object"!=typeof n)return!1;t=Gt(t),n=Gt(n);var a=Ut.call(t);if(a!==Ut.call(n))return!1;switch(a){case"[object RegExp]":case"[object String]":return""+t==""+n;case"[object Number]":return+t!=+t?+n!=+n:0==+t?1/+t==1/n:+t==+n;case"[object Date]":case"[object Boolean]":return+t==+n;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(t)===Symbol.valueOf.call(n)}var c="[object Array]"===a;if(!c){if("object"!=typeof t||"object"!=typeof n)return!1;var l=t.constructor,u=n.constructor;if(l!==u&&!("function"==typeof l&&l instanceof l&&"function"==typeof u&&u instanceof u)&&"constructor"in t&&"constructor"in n)return!1}if(0===i)return!1;i<0&&(i=-1),s=s||[];for(var d=(r=r||[]).length;d--;)if(r[d]===t)return s[d]===n;if(r.push(t),s.push(n),c){if((d=t.length)!==n.length)return!1;for(;d--;)if(!e(t[d],n[d],i-1,r,s))return!1}else{var h=Object.keys(t),f=void 0;if(d=h.length,Object.keys(n).length!==d)return!1;for(;d--;)if(!Jt(n,f=h[d])||!e(t[f],n[f],i-1,r,s))return!1}return r.pop(),s.pop(),!0}(e,t,n)}function Gt(e){return Lt(e)?e.peek():x(e)||It(e)||k(e)||Nt(e)?D(e.entries()):e}function Jt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:function(e){return Re.spyListeners.push(e),g((function(){Re.spyListeners=Re.spyListeners.filter((function(t){return t!==e}))}))},extras:{getDebugName:function(e,t){return(void 0!==t?Bt(e,t):Vt(e)||It(e)||Nt(e)?function e(t,n){return t||m("Expecting some object"),void 0!==n?e(Bt(t,n)):P(t)||Ce(t)||$e(t)||It(t)||Nt(t)?t:($(t),t.$mobx?t.$mobx:void m(!1))}(e):Bt(e)).name}},$mobx:"$mobx"});var Qt,Kt,Zt,Xt,en=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},tn=function(e){return e},nn=Math.max,rn=function(e,t,n){return t=nn(void 0===t?e.length-1:t,0),function(){for(var i=arguments,r=-1,s=nn(i.length-t,0),o=Array(s);++r<s;)o[r]=i[t+r];r=-1;for(var a=Array(t+1);++r<t;)a[r]=i[r];return a[t]=n(o),en(e,this,a)}},sn=n("AwXo"),on=Date.now,an=(Qt=sn.a?function(e,t){return Object(sn.a)(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:tn,Kt=0,Zt=0,function(){var e=on(),t=16-(e-Zt);if(Zt=e,t>0){if(++Kt>=800)return arguments[0]}else Kt=0;return Qt.apply(void 0,arguments)}),cn=function(e,t){return an(rn(e,t,tn),e+"")},ln=n("oSzE"),un=n("uE2L"),dn=n("YHEm"),hn=function(e,t,n){(void 0!==n&&!Object(dn.a)(e[t],n)||void 0===n&&!(t in e))&&Object(un.a)(e,t,n)},fn=function(e,t,n){for(var i=-1,r=Object(e),s=n(e),o=s.length;o--;){var a=s[++i];if(!1===t(r[a],a,r))break}return e},pn=n("3/ER"),mn=n("G4mU"),bn=n("eAQQ"),gn=n("hYPf"),_n=n("9f76"),yn=n("/1FC"),vn=n("5WsY"),wn=n("EUcb"),Sn=n("WOAq"),Mn=n("vJtL"),xn=n("IzLi"),kn=n("8M4i"),Dn=n("UudT"),Tn=Function.prototype.toString,Cn=Object.prototype.hasOwnProperty,On=Tn.call(Object),Ln=function(e){if(!Object(wn.a)(e)||"[object Object]"!=Object(kn.a)(e))return!1;var t=Object(Dn.a)(e);if(null===t)return!0;var n=Cn.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Tn.call(n)==On},Rn=n("oYcn"),En=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},An=n("+EKe"),In=n("4/q3"),Pn=function e(t,n,i,r,s){t!==n&&fn(n,(function(o,a){if(s||(s=new ln.a),Object(xn.a)(o))!function(e,t,n,i,r,s,o){var a,c=En(e,n),l=En(t,n),u=o.get(l);if(u)hn(e,n,u);else{var d=s?s(c,l,n+"",e,t,o):void 0,h=void 0===d;if(h){var f=Object(yn.a)(l),p=!f&&Object(Sn.a)(l),m=!f&&!p&&Object(Rn.a)(l);d=l,f||p||m?Object(yn.a)(c)?d=c:(a=c,Object(wn.a)(a)&&Object(vn.a)(a)?d=Object(bn.a)(c):p?(h=!1,d=Object(pn.a)(l,!0)):m?(h=!1,d=Object(mn.a)(l,!0)):d=[]):Ln(l)||Object(_n.a)(l)?(d=c,Object(_n.a)(c)?d=function(e){return Object(An.a)(e,Object(In.a)(e))}(c):Object(xn.a)(c)&&!Object(Mn.a)(c)||(d=Object(gn.a)(l))):h=!1}h&&(o.set(l,d),r(d,l,i,s,o),o.delete(l)),hn(e,n,d)}}(t,n,a,i,e,r,s);else{var c=r?r(En(t,a),o,a+"",t,n,s):void 0;void 0===c&&(c=o),hn(t,a,c)}}),In.a)},jn=function e(t,n,i,r,s,o){return Object(xn.a)(t)&&Object(xn.a)(n)&&(o.set(n,t),Pn(t,n,void 0,e,o),o.delete(n)),t},Nn=n("cSlR"),Fn=function(e,t,n){if(!Object(xn.a)(n))return!1;var i=typeof t;return!!("number"==i?Object(vn.a)(n)&&Object(Nn.a)(t,n.length):"string"==i&&t in n)&&Object(dn.a)(n[t],e)},Yn=(Xt=function(e,t,n,i){Pn(e,t,n,i)},cn((function(e,t){var n=-1,i=t.length,r=i>1?t[i-1]:void 0,s=i>2?t[2]:void 0;for(r=Xt.length>3&&"function"==typeof r?(i--,r):void 0,s&&Fn(t[0],t[1],s)&&(r=i<3?void 0:r,i=1),e=Object(e);++n<i;){var o=t[n];o&&Xt(e,o,n,r)}return e}))),zn=cn((function(e){return e.push(void 0,jn),en(Yn,void 0,e)})),$n=function(e){return"symbol"==typeof e||Object(wn.a)(e)&&"[object Symbol]"==Object(kn.a)(e)},Hn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wn=/^\w*$/,Vn=function(e,t){if(Object(yn.a)(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!$n(e))||Wn.test(e)||!Hn.test(e)||null!=t&&e in Object(t)},Bn=n("DlmY");function Un(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],s=n.cache;if(s.has(r))return s.get(r);var o=e.apply(this,i);return n.cache=s.set(r,o)||s,o};return n.cache=new(Un.Cache||Bn.a),n}Un.Cache=Bn.a;var qn,Gn,Jn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Qn=/\\(\\)?/g,Kn=(qn=Un((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Jn,(function(e,n,i,r){t.push(i?r.replace(Qn,"$1"):n||e)})),t}),(function(e){return 500===Gn.size&&Gn.clear(),e})),Gn=qn.cache,qn),Zn=n("ylTp"),Xn=function(e,t){for(var n=-1,i=null==e?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r},ei=Zn.a?Zn.a.prototype:void 0,ti=ei?ei.toString:void 0,ni=function(e,t){return Object(yn.a)(e)?e:Vn(e,t)?[e]:Kn(function(e){return null==e?"":function e(t){if("string"==typeof t)return t;if(Object(yn.a)(t))return Xn(t,e)+"";if($n(t))return ti?ti.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}(e)}(e))},ii=function(e){if("string"==typeof e||$n(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},ri=function(e,t){for(var n=0,i=(t=ni(t,e)).length;null!=e&&n<i;)e=e[ii(t[n++])];return n&&n==i?e:void 0},si=function(e,t,n){var i=null==e?void 0:ri(e,t);return void 0===i?n:i},oi=n("CfRg"),ai=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0},ci=function(e,t){return null==(e=function(e,t){return t.length<2?e:ri(e,function(e,t,n){var i=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(n=n>r?r:n)<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(r);++i<r;)s[i]=e[i+t];return s}(t,0,-1))}(e,t=ni(t,e)))||delete e[ii(ai(t))]},li=function(e){return Ln(e)?void 0:e},ui=n("tPH9"),di=Zn.a?Zn.a.isConcatSpreadable:void 0,hi=function(e){return Object(yn.a)(e)||Object(_n.a)(e)||!!(di&&e&&e[di])},fi=function(e){return null!=e&&e.length?function e(t,n,i,r,s){var o=-1,a=t.length;for(i||(i=hi),s||(s=[]);++o<a;){var c=t[o];n>0&&i(c)?n>1?e(c,n-1,i,r,s):Object(ui.a)(s,c):r||(s[s.length]=c)}return s}(e,1):[]},pi=function(e){return an(rn(e,void 0,fi),e+"")},mi=n("TnHx"),bi=pi((function(e,t){var n={};if(null==e)return n;var i=!1;t=Xn(t,(function(t){return t=ni(t,e),i||(i=t.length>1),t})),Object(An.a)(e,Object(mi.a)(e),n),i&&(n=Object(oi.a)(n,7,li));for(var r=t.length;r--;)ci(n,t[r]);return n})),gi=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1};function _i(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Bn.a;++t<n;)this.add(e[t])}_i.prototype.add=_i.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},_i.prototype.has=function(e){return this.__data__.has(e)};var yi=_i,vi=function(e,t){return e.has(t)},wi=function(e,t,n,i,r,s){var o=1&n,a=e.length,c=t.length;if(a!=c&&!(o&&c>a))return!1;var l=s.get(e),u=s.get(t);if(l&&u)return l==t&&u==e;var d=-1,h=!0,f=2&n?new yi:void 0;for(s.set(e,t),s.set(t,e);++d<a;){var p=e[d],m=t[d];if(i)var b=o?i(m,p,d,t,e,s):i(p,m,d,e,t,s);if(void 0!==b){if(b)continue;h=!1;break}if(f){if(!gi(t,(function(e,t){if(!vi(f,t)&&(p===e||r(p,e,n,i,s)))return f.push(t)}))){h=!1;break}}else if(p!==m&&!r(p,m,n,i,s)){h=!1;break}}return s.delete(e),s.delete(t),h},Si=n("Ce4a"),Mi=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n},xi=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},ki=Zn.a?Zn.a.prototype:void 0,Di=ki?ki.valueOf:void 0,Ti=n("TFwu"),Ci=Object.prototype.hasOwnProperty,Oi=n("YM6B"),Li="[object Arguments]",Ri="[object Array]",Ei="[object Object]",Ai=Object.prototype.hasOwnProperty,Ii=function e(t,n,i,r,s){return t===n||(null==t||null==n||!Object(wn.a)(t)&&!Object(wn.a)(n)?t!=t&&n!=n:function(e,t,n,i,r,s){var o=Object(yn.a)(e),a=Object(yn.a)(t),c=o?Ri:Object(Oi.a)(e),l=a?Ri:Object(Oi.a)(t),u=(c=c==Li?Ei:c)==Ei,d=(l=l==Li?Ei:l)==Ei,h=c==l;if(h&&Object(Sn.a)(e)){if(!Object(Sn.a)(t))return!1;o=!0,u=!1}if(h&&!u)return s||(s=new ln.a),o||Object(Rn.a)(e)?wi(e,t,n,i,r,s):function(e,t,n,i,r,s,o){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!s(new Si.a(e),new Si.a(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Object(dn.a)(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var a=Mi;case"[object Set]":if(a||(a=xi),e.size!=t.size&&!(1&i))return!1;var c=o.get(e);if(c)return c==t;i|=2,o.set(e,t);var l=wi(a(e),a(t),i,r,s,o);return o.delete(e),l;case"[object Symbol]":if(Di)return Di.call(e)==Di.call(t)}return!1}(e,t,c,n,i,r,s);if(!(1&n)){var f=u&&Ai.call(e,"__wrapped__"),p=d&&Ai.call(t,"__wrapped__");if(f||p){var m=f?e.value():e,b=p?t.value():t;return s||(s=new ln.a),r(m,b,n,i,s)}}return!!h&&(s||(s=new ln.a),function(e,t,n,i,r,s){var o=1&n,a=Object(Ti.a)(e),c=a.length;if(c!=Object(Ti.a)(t).length&&!o)return!1;for(var l=c;l--;){var u=a[l];if(!(o?u in t:Ci.call(t,u)))return!1}var d=s.get(e),h=s.get(t);if(d&&h)return d==t&&h==e;var f=!0;s.set(e,t),s.set(t,e);for(var p=o;++l<c;){var m=e[u=a[l]],b=t[u];if(i)var g=o?i(b,m,u,t,e,s):i(m,b,u,e,t,s);if(!(void 0===g?m===b||r(m,b,n,i,s):g)){f=!1;break}p||(p="constructor"==u)}if(f&&!p){var _=e.constructor,y=t.constructor;_==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof y&&y instanceof y||(f=!1)}return s.delete(e),s.delete(t),f}(e,t,n,i,r,s))}(t,n,i,r,e,s))},Pi=function(e){return e==e&&!Object(xn.a)(e)},ji=n("mkut"),Ni=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},Fi=function(e,t){return null!=e&&t in Object(e)},Yi=n("Js68"),zi=function(e,t){return null!=e&&function(e,t,n){for(var i=-1,r=(t=ni(t,e)).length,s=!1;++i<r;){var o=ii(t[i]);if(!(s=null!=e&&n(e,o)))break;e=e[o]}return s||++i!=r?s:!!(r=null==e?0:e.length)&&Object(Yi.a)(r)&&Object(Nn.a)(o,r)&&(Object(yn.a)(e)||Object(_n.a)(e))}(e,t,Fi)},$i=function(e){return"function"==typeof e?e:null==e?tn:"object"==typeof e?Object(yn.a)(e)?(r=e[1],Vn(i=e[0])&&Pi(r)?Ni(ii(i),r):function(e){var t=si(e,i);return void 0===t&&t===r?zi(e,i):Ii(r,t,3)}):1==(n=function(e){for(var t=Object(ji.a)(e),n=t.length;n--;){var i=t[n],r=e[i];t[n]=[i,r,Pi(r)]}return t}(t=e)).length&&n[0][2]?Ni(n[0][0],n[0][1]):function(e){return e===t||function(e,t,n,i){var r=n.length,s=r;if(null==e)return!s;for(e=Object(e);r--;){var o=n[r];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++r<s;){var a=(o=n[r])[0],c=e[a],l=o[1];if(o[2]){if(void 0===c&&!(a in e))return!1}else{var u,d=new ln.a;if(!(void 0===u?Ii(l,c,3,i,d):u))return!1}}return!0}(e,0,n)}:function(e){return Vn(e)?(t=ii(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return ri(t,e)}}(e);var t}(e);var t,n,i,r},Hi=function(e,t){if(null==e)return e;if(!Object(vn.a)(e))return function(e,t){return e&&fn(e,t,ji.a)}(e,t);for(var n=e.length,i=-1,r=Object(e);++i<n&&!1!==t(r[i],i,r););return e},Wi=function(e,t){var n;return Hi(e,(function(e,i,r){return!(n=t(e,i,r))})),!!n},Vi=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(!t(e[n],n,e))return!1;return!0},Bi=function(e,t){var n=!0;return Hi(e,(function(e,i,r){return n=!!t(e,i,r)})),n},Ui=function(e){return e&&e.length?e[0]:void 0},qi=function(e){for(var t=-1,n=null==e?0:e.length,i=0,r=[];++t<n;){var s=e[t];s&&(r[i++]=s)}return r},Gi=function(e,t,n,i){for(var r=e.length,s=n+(i?1:-1);i?s--:++s<r;)if(t(e[s],s,e))return s;return-1},Ji=/\s/,Qi=/^\s+/,Ki=/^[-+]0x[0-9a-f]+$/i,Zi=/^0b[01]+$/i,Xi=/^0o[0-7]+$/i,er=parseInt,tr=function(e){if("number"==typeof e)return e;if($n(e))return NaN;if(Object(xn.a)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Object(xn.a)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;var n;e=(n=e)?n.slice(0,function(e){for(var t=e.length;t--&&Ji.test(e.charAt(t)););return t}(n)+1).replace(Qi,""):n;var i=Zi.test(e);return i||Xi.test(e)?er(e.slice(2),i?2:8):Ki.test(e)?NaN:+e},nr=function(e){var t=function(e){return e?1/0===(e=tr(e))||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}(e),n=t%1;return t==t?n?t-n:t:0},ir=Math.max,rr=function(e,t,n){var i=Object(e);if(!Object(vn.a)(e)){var r=$i(t);e=Object(ji.a)(e),t=function(e){return r(i[e],e,i)}}var s=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=null==n?0:nr(n);return r<0&&(r=ir(i+r,0)),Gi(e,$i(t),r)}(e,t,n);return s>-1?i[r?e[s]:s]:void 0},sr=function(e){return"string"==typeof e||!Object(yn.a)(e)&&Object(wn.a)(e)&&"[object String]"==Object(kn.a)(e)},or=n("Ju5/"),ar=function(){return or.a.Date.now()},cr=Math.max,lr=Math.min,ur=function(e){return e!=e},dr=Math.max,hr=function(e,t,n,i){var r;e=Object(vn.a)(e)?e:null==(r=e)?[]:function(e,t){return Xn(t,(function(t){return e[t]}))}(r,Object(ji.a)(r)),n=n&&!i?nr(n):0;var s=e.length;return n<0&&(n=dr(s+n,0)),sr(e)?n<=s&&e.indexOf(t,n)>-1:!!s&&function(e,t,n){return t==t?function(e,t,n){for(var i=n-1,r=e.length;++i<r;)if(e[i]===t)return i;return-1}(e,t,n):Gi(e,ur,n)}(e,t,n)>-1},fr=n("23KU"),pr=function(e,t,n,i){if(!Object(xn.a)(e))return e;for(var r=-1,s=(t=ni(t,e)).length,o=s-1,a=e;null!=a&&++r<s;){var c=ii(t[r]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(r!=o){var u=a[c];void 0===(l=i?i(u,c,a):void 0)&&(l=Object(xn.a)(u)?u:Object(Nn.a)(t[r+1])?[]:{})}Object(fr.a)(a,c,l),a=a[c]}return e},mr=pi((function(e,t){return null==e?{}:function(e,t){return function(e,t,n){for(var i=-1,r=t.length,s={};++i<r;){var o=t[i],a=ri(e,o);n(0,o)&&pr(s,ni(o,e),a)}return s}(e,t,(function(t,n){return zi(e,n)}))}(e,t)}));function br(e,t){1&e&&(i.Sb(0,"span"),i.Oc(1,"loading..."),i.Rb())}const gr=function(e){return{$implicit:e}};function _r(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"div"),i.nc(2),i.Rb(),i.Pb()),2&e){const e=i.ic();i.yb(1),i.Kc("height",e.getTotalHeight())}}const yr=function(){return{dontDetach:!0}},vr=["*"],wr=["loadingTemplate"],Sr=["treeNodeTemplate"],Mr=["treeNodeWrapperTemplate"],xr=["treeNodeFullTemplate"],kr=["viewport"],Dr=function(e,t,n,i){return{loadingTemplate:e,treeNodeTemplate:t,treeNodeWrapperTemplate:n,treeNodeFullTemplate:i}};function Tr(e,t){if(1&e&&i.Nb(0,"tree-node-collection",4),2&e){const e=i.ic();i.pc("nodes",e.treeModel.roots)("treeModel",e.treeModel)("templates",i.xc(3,Dr,e.loadingTemplate,e.treeNodeTemplate,e.treeNodeWrapperTemplate,e.treeNodeFullTemplate))}}function Cr(e,t){if(1&e&&i.Nb(0,"tree-node-drop-slot",5),2&e){const e=i.ic();i.pc("dropIndex",0)("node",e.treeModel.virtualRoot)}}function Or(e,t){if(1&e&&i.Nb(0,"tree-node-drop-slot",6),2&e){const e=i.ic(3);i.pc("dropIndex",e.node.index)("node",e.node.parent)}}function Lr(e,t){if(1&e&&(i.Sb(0,"div"),i.Mc(1,Or,1,2,"tree-node-drop-slot",3),i.Nb(2,"tree-node-wrapper",4),i.Nb(3,"tree-node-children",5),i.Nb(4,"tree-node-drop-slot",6),i.Rb()),2&e){const e=i.ic(2);i.Ab(e.node.getClass()),i.Eb("tree-node",!0)("tree-node-expanded",e.node.isExpanded&&e.node.hasChildren)("tree-node-collapsed",e.node.isCollapsed&&e.node.hasChildren)("tree-node-leaf",e.node.isLeaf)("tree-node-active",e.node.isActive)("tree-node-focused",e.node.isFocused),i.yb(1),i.pc("ngIf",0===e.index),i.yb(1),i.pc("node",e.node)("index",e.index)("templates",e.templates),i.yb(1),i.pc("node",e.node)("templates",e.templates),i.yb(1),i.pc("dropIndex",e.node.index+1)("node",e.node.parent)}}const Rr=function(e,t,n,i){return{$implicit:e,node:t,index:n,templates:i}};function Er(e,t){if(1&e&&(i.Qb(0),i.Mc(1,Lr,5,22,"div",1),i.Ob(2,2),i.Pb()),2&e){const e=i.ic();i.yb(1),i.pc("ngIf",!e.templates.treeNodeFullTemplate),i.yb(1),i.pc("ngTemplateOutlet",e.templates.treeNodeFullTemplate)("ngTemplateOutletContext",i.xc(3,Rr,e.node,e.node,e.index,e.templates))}}function Ar(e,t){if(1&e&&(i.Sb(0,"span"),i.Oc(1),i.Rb()),2&e){const e=i.ic();i.yb(1),i.Pc(e.node.displayField)}}const Ir=function(e,t,n){return{$implicit:e,node:t,index:n}};function Pr(e,t){if(1&e){const e=i.Tb();i.Sb(0,"span",3),i.gc("click",(function(t){return i.Dc(e),i.ic(2).node.mouseAction("expanderClick",t)})),i.Nb(1,"span",4),i.Rb()}if(2&e){const e=i.ic(2);i.Eb("toggle-children-wrapper-expanded",e.node.isExpanded)("toggle-children-wrapper-collapsed",e.node.isCollapsed)}}function jr(e,t){1&e&&i.Nb(0,"span",5)}function Nr(e,t){if(1&e&&(i.Qb(0),i.Mc(1,Pr,2,4,"span",1),i.Mc(2,jr,1,0,"span",2),i.Pb()),2&e){const e=i.ic();i.yb(1),i.pc("ngIf",e.node.hasChildren),i.yb(1),i.pc("ngIf",!e.node.hasChildren)}}function Fr(e,t){if(1&e&&i.Nb(0,"tree-node-collection",4),2&e){const e=i.ic(3);i.pc("nodes",e.node.children)("templates",e.templates)("treeModel",e.node.treeModel)}}function Yr(e,t){if(1&e&&i.Nb(0,"tree-loading-component",5),2&e){const e=i.ic(3);i.Kc("padding-left",e.node.getNodePadding()),i.pc("template",e.templates.loadingTemplate)("node",e.node)}}function zr(e,t){if(1&e&&(i.Sb(0,"div"),i.Mc(1,Fr,1,3,"tree-node-collection",2),i.Mc(2,Yr,1,4,"tree-loading-component",3),i.Rb()),2&e){const e=i.ic(2);i.Eb("tree-children",!0)("tree-children-no-padding",e.node.options.levelPadding),i.yb(1),i.pc("ngIf",e.node.children),i.yb(1),i.pc("ngIf",!e.node.children)}}function $r(e,t){if(1&e&&(i.Qb(0),i.Mc(1,zr,3,6,"div",1),i.Pb()),2&e){const e=i.ic();i.yb(1),i.pc("treeAnimateOpen",e.node.isExpanded)("treeAnimateOpenSpeed",e.node.options.animateSpeed)("treeAnimateOpenAcceleration",e.node.options.animateAcceleration)("treeAnimateOpenEnabled",e.node.options.animateExpand)}}function Hr(e,t){if(1&e&&i.Nb(0,"tree-node",2),2&e){const e=t.$implicit,n=t.index,r=i.ic(2);i.pc("node",e)("index",n)("templates",r.templates)}}function Wr(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"div"),i.Mc(2,Hr,1,3,"tree-node",1),i.Rb(),i.Pb()),2&e){const e=i.ic();i.yb(1),i.Kc("margin-top",e.marginTop),i.yb(1),i.pc("ngForOf",e.viewportNodes)("ngForTrackBy",e.trackNode)}}function Vr(e,t){if(1&e&&i.Nb(0,"tree-node-checkbox",4),2&e){const e=i.ic(2);i.pc("node",e.node)}}function Br(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",2),i.Mc(1,Vr,1,1,"tree-node-checkbox",3),i.Nb(2,"tree-node-expander",4),i.Sb(3,"div",5),i.gc("click",(function(t){return i.Dc(e),i.ic().node.mouseAction("click",t)}))("dblclick",(function(t){return i.Dc(e),i.ic().node.mouseAction("dblClick",t)}))("mouseover",(function(t){return i.Dc(e),i.ic().node.mouseAction("mouseOver",t)}))("mouseout",(function(t){return i.Dc(e),i.ic().node.mouseAction("mouseOut",t)}))("contextmenu",(function(t){return i.Dc(e),i.ic().node.mouseAction("contextMenu",t)}))("treeDrop",(function(t){return i.Dc(e),i.ic().node.onDrop(t)}))("treeDropDragOver",(function(t){return i.Dc(e),i.ic().node.mouseAction("dragOver",t)}))("treeDropDragLeave",(function(t){return i.Dc(e),i.ic().node.mouseAction("dragLeave",t)}))("treeDropDragEnter",(function(t){return i.Dc(e),i.ic().node.mouseAction("dragEnter",t)})),i.Nb(4,"tree-node-content",6),i.Rb(),i.Rb()}if(2&e){const e=i.ic();i.Kc("padding-left",e.node.getNodePadding()),i.yb(1),i.pc("ngIf",e.node.options.useCheckbox),i.yb(1),i.pc("node",e.node),i.yb(1),i.Eb("node-content-wrapper-active",e.node.isActive)("node-content-wrapper-focused",e.node.isFocused),i.pc("treeAllowDrop",e.node.allowDrop)("allowDragoverStyling",e.node.allowDragoverStyling())("treeDrag",e.node)("treeDragEnabled",e.node.allowDrag()),i.yb(1),i.pc("node",e.node)("index",e.index)("template",e.templates.treeNodeTemplate)}}function Ur(e,t){if(1&e){const e=i.Tb();i.Qb(0),i.Sb(1,"input",1),i.gc("click",(function(t){return i.Dc(e),i.ic().node.mouseAction("checkboxClick",t)})),i.Rb(),i.Pb()}if(2&e){const e=i.ic();i.yb(1),i.pc("checked",e.node.isSelected)("indeterminate",e.node.isPartiallySelected)}}let qr=(()=>{class e{constructor(e,t){this.templateRef=e,this.viewContainer=t,this.templateBindings={}}ngOnInit(){this.view=this.viewContainer.createEmbeddedView(this.templateRef),this.dispose&&this.dispose(),this.shouldDetach()&&this.view.detach(),this.autoDetect(this.view)}shouldDetach(){return this.treeMobxAutorun&&this.treeMobxAutorun.detach}autoDetect(e){this.dispose=Ze(()=>e.detectChanges())}ngOnDestroy(){this.dispose&&this.dispose()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.L),i.Mb(i.P))},e.\u0275dir=i.Hb({type:e,selectors:[["","treeMobxAutorun",""]],inputs:{treeMobxAutorun:"treeMobxAutorun"}}),e})();const Gr={TOGGLE_ACTIVE:(e,t,n)=>t&&t.toggleActivated(),TOGGLE_ACTIVE_MULTI:(e,t,n)=>t&&t.toggleActivated(!0),TOGGLE_SELECTED:(e,t,n)=>t&&t.toggleSelected(),ACTIVATE:(e,t,n)=>t.setIsActive(!0),DEACTIVATE:(e,t,n)=>t.setIsActive(!1),SELECT:(e,t,n)=>t.setIsSelected(!0),DESELECT:(e,t,n)=>t.setIsSelected(!1),FOCUS:(e,t,n)=>t.focus(),TOGGLE_EXPANDED:(e,t,n)=>t.hasChildren&&t.toggleExpanded(),EXPAND:(e,t,n)=>t.expand(),COLLAPSE:(e,t,n)=>t.collapse(),DRILL_DOWN:(e,t,n)=>e.focusDrillDown(),DRILL_UP:(e,t,n)=>e.focusDrillUp(),NEXT_NODE:(e,t,n)=>e.focusNextNode(),PREVIOUS_NODE:(e,t,n)=>e.focusPreviousNode(),MOVE_NODE:(e,t,n,{from:i,to:r})=>{n.ctrlKey?e.copyNode(i,r):e.moveNode(i,r)}},Jr={mouse:{click:Gr.TOGGLE_ACTIVE,dblClick:null,contextMenu:null,expanderClick:Gr.TOGGLE_EXPANDED,checkboxClick:Gr.TOGGLE_SELECTED,drop:Gr.MOVE_NODE},keys:{39:Gr.DRILL_DOWN,37:Gr.DRILL_UP,40:Gr.NEXT_NODE,38:Gr.PREVIOUS_NODE,32:Gr.TOGGLE_ACTIVE,13:Gr.TOGGLE_ACTIVE}};class Qr{constructor(e={}){this.options=e,this.actionMapping=zn({},this.options.actionMapping,Jr),e.rtl&&(this.actionMapping.keys[39]=si(e,["actionMapping","keys",39])||Gr.DRILL_UP,this.actionMapping.keys[37]=si(e,["actionMapping","keys",37])||Gr.DRILL_DOWN)}get hasChildrenField(){return this.options.hasChildrenField||"hasChildren"}get childrenField(){return this.options.childrenField||"children"}get displayField(){return this.options.displayField||"name"}get idField(){return this.options.idField||"id"}get isExpandedField(){return this.options.isExpandedField||"isExpanded"}get getChildren(){return this.options.getChildren}get levelPadding(){return this.options.levelPadding||0}get useVirtualScroll(){return this.options.useVirtualScroll}get animateExpand(){return this.options.animateExpand}get animateSpeed(){return this.options.animateSpeed||1}get animateAcceleration(){return this.options.animateAcceleration||1.2}get scrollOnActivate(){return void 0===this.options.scrollOnActivate||this.options.scrollOnActivate}get rtl(){return!!this.options.rtl}get rootId(){return this.options.rootId}get useCheckbox(){return this.options.useCheckbox}get useTriState(){return void 0===this.options.useTriState||this.options.useTriState}get scrollContainer(){return this.options.scrollContainer}get allowDragoverStyling(){return void 0===this.options.allowDragoverStyling||this.options.allowDragoverStyling}getNodeClone(e){return this.options.getNodeClone?this.options.getNodeClone(e):bi(Object.assign({},e.data),["id"])}allowDrop(e,t,n){return this.options.allowDrop instanceof Function?this.options.allowDrop(e,t,n):void 0===this.options.allowDrop||this.options.allowDrop}allowDrag(e){return this.options.allowDrag instanceof Function?this.options.allowDrag(e):this.options.allowDrag}nodeClass(e){return this.options.nodeClass?this.options.nodeClass(e):""}nodeHeight(e){if(e.data.virtual)return 0;let t=this.options.nodeHeight||22;return"function"==typeof t&&(t=t(e)),t+(0===e.index?2:1)*this.dropSlotHeight}get dropSlotHeight(){return"number"==typeof(e=this.options.dropSlotHeight)||Object(wn.a)(e)&&"[object Number]"==Object(kn.a)(e)?this.options.dropSlotHeight:2;var e}}const Kr={toggleExpanded:"toggleExpanded",activate:"activate",deactivate:"deactivate",nodeActivate:"nodeActivate",nodeDeactivate:"nodeDeactivate",select:"select",deselect:"deselect",focus:"focus",blur:"blur",initialized:"initialized",updateData:"updateData",moveNode:"moveNode",copyNode:"copyNode",event:"event",loadNodeChildren:"loadNodeChildren",changeFilter:"changeFilter",stateChange:"stateChange"};var Zr=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},Xr=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};let es=(()=>{class e{constructor(e,t,n,i){this.data=e,this.parent=t,this.treeModel=n,this.position=0,this.allowDrop=(e,t)=>this.options.allowDrop(e,{parent:this,index:0},t),this.allowDragoverStyling=()=>this.options.allowDragoverStyling,null==this.id&&(this.id=Math.floor(1e13*Math.random())),this.index=i,this.getField("children")&&this._initChildren(),this.autoLoadChildren()}get isHidden(){return this.treeModel.isHidden(this)}get isExpanded(){return this.treeModel.isExpanded(this)}get isActive(){return this.treeModel.isActive(this)}get isFocused(){return this.treeModel.isNodeFocused(this)}get isSelected(){return this.isSelectable()?this.treeModel.isSelected(this):(e=this.children,t=e=>e.isSelected,(Object(yn.a)(e)?gi:Wi)(e,$i(t)));var e,t}get isAllSelected(){return this.isSelectable()?this.treeModel.isSelected(this):(e=this.children,t=e=>e.isAllSelected,(Object(yn.a)(e)?Vi:Bi)(e,$i(t)));var e,t}get isPartiallySelected(){return this.isSelected&&!this.isAllSelected}get level(){return this.parent?this.parent.level+1:0}get path(){return this.parent?[...this.parent.path,this.id]:[]}get elementRef(){throw"Element Ref is no longer supported since introducing virtual scroll\n\n You may use a template to obtain a reference to the element"}get originalNode(){return this._originalNode}get hasChildren(){return!!(this.getField("hasChildren")||this.children&&this.children.length>0)}get isCollapsed(){return!this.isExpanded}get isLeaf(){return!this.hasChildren}get isRoot(){return this.parent.data.virtual}get realParent(){return this.isRoot?null:this.parent}get options(){return this.treeModel.options}fireEvent(e){this.treeModel.fireEvent(e)}get displayField(){return this.getField("display")}get id(){return this.getField("id")}set id(e){this.setField("id",e)}getField(e){return this.data[this.options[e+"Field"]]}setField(e,t){this.data[this.options[e+"Field"]]=t}_findAdjacentSibling(e,t=!1){const n=this._getParentsChildren(t),i=n.indexOf(this);return n.length>i+e?n[i+e]:null}findNextSibling(e=!1){return this._findAdjacentSibling(1,e)}findPreviousSibling(e=!1){return this._findAdjacentSibling(-1,e)}getVisibleChildren(){return this.visibleChildren}get visibleChildren(){return(this.children||[]).filter(e=>!e.isHidden)}getFirstChild(e=!1){return Ui((e?this.visibleChildren:this.children)||[])}getLastChild(e=!1){return ai((e?this.visibleChildren:this.children)||[])}findNextNode(e=!0,t=!1){return e&&this.isExpanded&&this.getFirstChild(t)||this.findNextSibling(t)||this.parent&&this.parent.findNextNode(!1,t)}findPreviousNode(e=!1){let t=this.findPreviousSibling(e);return t?t._getLastOpenDescendant(e):this.realParent}_getLastOpenDescendant(e=!1){const t=this.getLastChild(e);return this.isCollapsed||!t?this:t._getLastOpenDescendant(e)}_getParentsChildren(e=!1){return this.parent&&(e?this.parent.getVisibleChildren():this.parent.children)||[]}getIndexInParent(e=!1){return this._getParentsChildren(e).indexOf(this)}isDescendantOf(e){return this===e||this.parent&&this.parent.isDescendantOf(e)}getNodePadding(){return this.options.levelPadding*(this.level-1)+"px"}getClass(){return[this.options.nodeClass(this),"tree-node-level-"+this.level].join(" ")}onDrop(e){this.mouseAction("drop",e.event,{from:e.element,to:{parent:this,index:0,dropOnNode:!0}})}allowDrag(){return this.options.allowDrag(this)}loadNodeChildren(){return this.options.getChildren?Promise.resolve(this.options.getChildren(this)).then(e=>{e&&(this.setField("children",e),this._initChildren(),this.options.useTriState&&this.treeModel.isSelected(this)&&this.setIsSelected(!0),this.children.forEach(e=>{e.getField("isExpanded")&&e.hasChildren&&e.expand()}))}).then(()=>{this.fireEvent({eventName:Kr.loadNodeChildren,node:this})}):Promise.resolve()}expand(){return this.isExpanded||this.toggleExpanded(),this}collapse(){return this.isExpanded&&this.toggleExpanded(),this}doForAll(e){Promise.resolve(e(this)).then(()=>{this.children&&this.children.forEach(t=>t.doForAll(e))})}expandAll(){this.doForAll(e=>e.expand())}collapseAll(){this.doForAll(e=>e.collapse())}ensureVisible(){return this.realParent&&(this.realParent.expand(),this.realParent.ensureVisible()),this}toggleExpanded(){return this.setIsExpanded(!this.isExpanded),this}setIsExpanded(e){return this.hasChildren&&this.treeModel.setExpandedNode(this,e),this}autoLoadChildren(){this.handler=tt(()=>this.isExpanded,e=>{!this.children&&this.hasChildren&&e&&this.loadNodeChildren()},{fireImmediately:!0})}dispose(){this.children&&this.children.forEach(e=>e.dispose()),this.handler&&this.handler(),this.parent=null,this.children=null}setIsActive(e,t=!1){return this.treeModel.setActiveNode(this,e,t),e&&this.focus(this.options.scrollOnActivate),this}isSelectable(){return this.isLeaf||!this.children||!this.options.useTriState}setIsSelected(e){return this.isSelectable()?this.treeModel.setSelectedNode(this,e):this.visibleChildren.forEach(t=>t.setIsSelected(e)),this}toggleSelected(){return this.setIsSelected(!this.isSelected),this}toggleActivated(e=!1){return this.setIsActive(!this.isActive,e),this}setActiveAndVisible(e=!1){return this.setIsActive(!0,e).ensureVisible(),setTimeout(this.scrollIntoView.bind(this)),this}scrollIntoView(e=!1){this.treeModel.virtualScroll.scrollIntoView(this,e)}focus(e=!0){let t=this.treeModel.getFocusedNode();return this.treeModel.setFocusedNode(this),e&&this.scrollIntoView(),t&&this.fireEvent({eventName:Kr.blur,node:t}),this.fireEvent({eventName:Kr.focus,node:this}),this}blur(){let e=this.treeModel.getFocusedNode();return this.treeModel.setFocusedNode(null),e&&this.fireEvent({eventName:Kr.blur,node:this}),this}setIsHidden(e){this.treeModel.setIsHidden(this,e)}hide(){this.setIsHidden(!0)}show(){this.setIsHidden(!1)}mouseAction(e,t,n=null){this.treeModel.setFocus(!0);const i=this.options.actionMapping.mouse[e];i&&i(this.treeModel,this,t,n)}getSelfHeight(){return this.options.nodeHeight(this)}_initChildren(){this.children=this.getField("children").map((t,n)=>new e(t,this,this.treeModel,n))}}return Zr([se,Xr("design:type",Object),Xr("design:paramtypes",[])],e.prototype,"isHidden",null),Zr([se,Xr("design:type",Object),Xr("design:paramtypes",[])],e.prototype,"isExpanded",null),Zr([se,Xr("design:type",Object),Xr("design:paramtypes",[])],e.prototype,"isActive",null),Zr([se,Xr("design:type",Object),Xr("design:paramtypes",[])],e.prototype,"isFocused",null),Zr([se,Xr("design:type",Object),Xr("design:paramtypes",[])],e.prototype,"isSelected",null),Zr([se,Xr("design:type",Object),Xr("design:paramtypes",[])],e.prototype,"isAllSelected",null),Zr([se,Xr("design:type",Object),Xr("design:paramtypes",[])],e.prototype,"isPartiallySelected",null),Zr([te,Xr("design:type",Array)],e.prototype,"children",void 0),Zr([te,Xr("design:type",Number)],e.prototype,"index",void 0),Zr([te,Xr("design:type",Object)],e.prototype,"position",void 0),Zr([te,Xr("design:type",Number)],e.prototype,"height",void 0),Zr([se,Xr("design:type",Number),Xr("design:paramtypes",[])],e.prototype,"level",null),Zr([se,Xr("design:type",Array),Xr("design:paramtypes",[])],e.prototype,"path",null),Zr([se,Xr("design:type",Object),Xr("design:paramtypes",[])],e.prototype,"visibleChildren",null),Zr([Qe,Xr("design:type",Function),Xr("design:paramtypes",[Object]),Xr("design:returntype",void 0)],e.prototype,"setIsSelected",null),Zr([Qe,Xr("design:type",Function),Xr("design:paramtypes",[]),Xr("design:returntype",void 0)],e.prototype,"_initChildren",null),e})();var ts=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},ns=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};let is=(()=>{class e{constructor(){this.options=new Qr,this.eventNames=Object.keys(Kr),this.expandedNodeIds={},this.selectedLeafNodeIds={},this.activeNodeIds={},this.hiddenNodeIds={},this.focusedNodeId=null,this.firstUpdate=!0,this.subscriptions=[]}fireEvent(e){e.treeModel=this,this.events[e.eventName].emit(e),this.events.event.emit(e)}subscribe(e,t){const n=this.events[e].subscribe(t);this.subscriptions.push(n)}getFocusedNode(){return this.focusedNode}getActiveNode(){return this.activeNodes[0]}getActiveNodes(){return this.activeNodes}getVisibleRoots(){return this.virtualRoot.visibleChildren}getFirstRoot(e=!1){return Ui(e?this.getVisibleRoots():this.roots)}getLastRoot(e=!1){return ai(e?this.getVisibleRoots():this.roots)}get isFocused(){return e.focusedTree===this}isNodeFocused(e){return this.focusedNode===e}isEmptyTree(){return this.roots&&0===this.roots.length}get focusedNode(){return this.focusedNodeId?this.getNodeById(this.focusedNodeId):null}get expandedNodes(){const e=Object.keys(this.expandedNodeIds).filter(e=>this.expandedNodeIds[e]).map(e=>this.getNodeById(e));return qi(e)}get activeNodes(){const e=Object.keys(this.activeNodeIds).filter(e=>this.activeNodeIds[e]).map(e=>this.getNodeById(e));return qi(e)}get hiddenNodes(){const e=Object.keys(this.hiddenNodeIds).filter(e=>this.hiddenNodeIds[e]).map(e=>this.getNodeById(e));return qi(e)}get selectedLeafNodes(){const e=Object.keys(this.selectedLeafNodeIds).filter(e=>this.selectedLeafNodeIds[e]).map(e=>this.getNodeById(e));return qi(e)}getNodeByPath(e,t=null){if(!e)return null;if(t=t||this.virtualRoot,0===e.length)return t;if(!t.children)return null;const n=e.shift(),i=rr(t.children,{id:n});return i?this.getNodeByPath(e,i):null}getNodeById(e){const t=e.toString();return this.getNodeBy(e=>e.id.toString()===t)}getNodeBy(e,t=null){if(!(t=t||this.virtualRoot).children)return null;const n=rr(t.children,e);if(n)return n;for(let i of t.children){const t=this.getNodeBy(e,i);if(t)return t}}isExpanded(e){return this.expandedNodeIds[e.id]}isHidden(e){return this.hiddenNodeIds[e.id]}isActive(e){return this.activeNodeIds[e.id]}isSelected(e){return this.selectedLeafNodeIds[e.id]}ngOnDestroy(){this.dispose(),this.unsubscribeAll()}dispose(){this.virtualRoot&&this.virtualRoot.dispose()}unsubscribeAll(){this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions=[]}setData({nodes:e,options:t=null,events:n=null}){t&&(this.options=new Qr(t)),n&&(this.events=n),e&&(this.nodes=e),this.update()}update(){let e={id:this.options.rootId,virtual:!0,[this.options.childrenField]:this.nodes};this.dispose(),this.virtualRoot=new es(e,null,this,0),this.roots=this.virtualRoot.children,this.firstUpdate?this.roots&&(this.firstUpdate=!1,this._calculateExpandedNodes()):this.fireEvent({eventName:Kr.updateData})}setFocusedNode(e){this.focusedNodeId=e?e.id:null}setFocus(t){e.focusedTree=t?this:null}doForAll(e){this.roots.forEach(t=>t.doForAll(e))}focusNextNode(){let e=this.getFocusedNode(),t=e?e.findNextNode(!0,!0):this.getFirstRoot(!0);t&&t.focus()}focusPreviousNode(){let e=this.getFocusedNode(),t=e?e.findPreviousNode(!0):this.getLastRoot(!0);t&&t.focus()}focusDrillDown(){let e=this.getFocusedNode();if(e&&e.isCollapsed&&e.hasChildren)e.toggleExpanded();else{let t=e?e.getFirstChild(!0):this.getFirstRoot(!0);t&&t.focus()}}focusDrillUp(){let e=this.getFocusedNode();if(e)if(e.isExpanded)e.toggleExpanded();else{let t=e.realParent;t&&t.focus()}}setActiveNode(e,t,n=!1){n?this._setActiveNodeMulti(e,t):this._setActiveNodeSingle(e,t),t?(e.focus(this.options.scrollOnActivate),this.fireEvent({eventName:Kr.activate,node:e}),this.fireEvent({eventName:Kr.nodeActivate,node:e})):(this.fireEvent({eventName:Kr.deactivate,node:e}),this.fireEvent({eventName:Kr.nodeDeactivate,node:e}))}setSelectedNode(e,t){this.selectedLeafNodeIds=Object.assign({},this.selectedLeafNodeIds,{[e.id]:t}),t?(e.focus(),this.fireEvent({eventName:Kr.select,node:e})):this.fireEvent({eventName:Kr.deselect,node:e})}setExpandedNode(e,t){this.expandedNodeIds=Object.assign({},this.expandedNodeIds,{[e.id]:t}),this.fireEvent({eventName:Kr.toggleExpanded,node:e,isExpanded:t})}expandAll(){this.roots.forEach(e=>e.expandAll())}collapseAll(){this.roots.forEach(e=>e.collapseAll())}setIsHidden(e,t){this.hiddenNodeIds=Object.assign({},this.hiddenNodeIds,{[e.id]:t})}setHiddenNodeIds(e){this.hiddenNodeIds=e.reduce((e,t)=>Object.assign(e,{[t]:!0}),{})}performKeyAction(e,t){const n=this.options.actionMapping.keys[t.keyCode];return!!n&&(t.preventDefault(),n(this,e,t),!0)}filterNodes(e,t=!0){let n;if(!e)return this.clearFilter();if(sr(e))n=t=>-1!==t.displayField.toLowerCase().indexOf(e.toLowerCase());else{if(!Object(Mn.a)(e))return console.error("Don't know what to do with filter",e),void console.error("Should be either a string or function");n=e}const i={};this.roots.forEach(e=>this._filterNode(i,e,n,t)),this.hiddenNodeIds=i,this.fireEvent({eventName:Kr.changeFilter})}clearFilter(){this.hiddenNodeIds={},this.fireEvent({eventName:Kr.changeFilter})}moveNode(e,t){const n=e.getIndexInParent(),i=e.parent;if(!this.canMoveNode(e,t,n))return;const r=i.getField("children");t.parent.getField("children")||t.parent.setField("children",[]);const s=t.parent.getField("children"),o=r.splice(n,1)[0];let a=i===t.parent&&t.index>n?t.index-1:t.index;s.splice(a,0,o),i.treeModel.update(),t.parent.treeModel!==i.treeModel&&t.parent.treeModel.update(),this.fireEvent({eventName:Kr.moveNode,node:o,to:{parent:t.parent.data,index:a},from:{parent:i.data,index:n}})}copyNode(e,t){const n=e.getIndexInParent();if(!this.canMoveNode(e,t,n))return;t.parent.getField("children")||t.parent.setField("children",[]);const i=t.parent.getField("children"),r=this.options.getNodeClone(e);i.splice(t.index,0,r),e.treeModel.update(),t.parent.treeModel!==e.treeModel&&t.parent.treeModel.update(),this.fireEvent({eventName:Kr.copyNode,node:r,to:{parent:t.parent.data,index:t.index}})}getState(){return{expandedNodeIds:this.expandedNodeIds,selectedLeafNodeIds:this.selectedLeafNodeIds,activeNodeIds:this.activeNodeIds,hiddenNodeIds:this.hiddenNodeIds,focusedNodeId:this.focusedNodeId}}setState(e){e&&Object.assign(this,{expandedNodeIds:e.expandedNodeIds||{},selectedLeafNodeIds:e.selectedLeafNodeIds||{},activeNodeIds:e.activeNodeIds||{},hiddenNodeIds:e.hiddenNodeIds||{},focusedNodeId:e.focusedNodeId})}subscribeToState(e){Ze(()=>e(this.getState()))}canMoveNode(e,t,n){return n||e.getIndexInParent(),(e.parent!==t.parent||n!==t.index)&&!t.parent.isDescendantOf(e)}calculateExpandedNodes(){this._calculateExpandedNodes()}_filterNode(e,t,n,i){let r=n(t);return t.children&&t.children.forEach(t=>{this._filterNode(e,t,n,i)&&(r=!0)}),r||(e[t.id]=!0),i&&r&&t.ensureVisible(),r}_calculateExpandedNodes(e=null){(e=e||this.virtualRoot).data[this.options.isExpandedField]&&(this.expandedNodeIds=Object.assign({},this.expandedNodeIds,{[e.id]:!0})),e.children&&e.children.forEach(e=>this._calculateExpandedNodes(e))}_setActiveNodeSingle(e,t){this.activeNodes.filter(t=>t!==e).forEach(e=>{this.fireEvent({eventName:Kr.deactivate,node:e}),this.fireEvent({eventName:Kr.nodeDeactivate,node:e})}),this.activeNodeIds=t?{[e.id]:!0}:{}}_setActiveNodeMulti(e,t){this.activeNodeIds=Object.assign({},this.activeNodeIds,{[e.id]:t})}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e.focusedTree=null,ts([te,ns("design:type",Array)],e.prototype,"roots",void 0),ts([te,ns("design:type",Object)],e.prototype,"expandedNodeIds",void 0),ts([te,ns("design:type",Object)],e.prototype,"selectedLeafNodeIds",void 0),ts([te,ns("design:type",Object)],e.prototype,"activeNodeIds",void 0),ts([te,ns("design:type",Object)],e.prototype,"hiddenNodeIds",void 0),ts([te,ns("design:type",Object)],e.prototype,"focusedNodeId",void 0),ts([te,ns("design:type",es)],e.prototype,"virtualRoot",void 0),ts([se,ns("design:type",Object),ns("design:paramtypes",[])],e.prototype,"focusedNode",null),ts([se,ns("design:type",Object),ns("design:paramtypes",[])],e.prototype,"expandedNodes",null),ts([se,ns("design:type",Object),ns("design:paramtypes",[])],e.prototype,"activeNodes",null),ts([se,ns("design:type",Object),ns("design:paramtypes",[])],e.prototype,"hiddenNodes",null),ts([se,ns("design:type",Object),ns("design:paramtypes",[])],e.prototype,"selectedLeafNodes",null),ts([Qe,ns("design:type",Function),ns("design:paramtypes",[Object]),ns("design:returntype",void 0)],e.prototype,"setData",null),ts([Qe,ns("design:type",Function),ns("design:paramtypes",[]),ns("design:returntype",void 0)],e.prototype,"update",null),ts([Qe,ns("design:type",Function),ns("design:paramtypes",[Object]),ns("design:returntype",void 0)],e.prototype,"setFocusedNode",null),ts([Qe,ns("design:type",Function),ns("design:paramtypes",[Object]),ns("design:returntype",void 0)],e.prototype,"setFocus",null),ts([Qe,ns("design:type",Function),ns("design:paramtypes",[Object]),ns("design:returntype",void 0)],e.prototype,"doForAll",null),ts([Qe,ns("design:type",Function),ns("design:paramtypes",[]),ns("design:returntype",void 0)],e.prototype,"focusNextNode",null),ts([Qe,ns("design:type",Function),ns("design:paramtypes",[]),ns("design:returntype",void 0)],e.prototype,"focusPreviousNode",null),ts([Qe,ns("design:type",Function),ns("design:paramtypes",[]),ns("design:returntype",void 0)],e.prototype,"focusDrillDown",null),ts([Qe,ns("design:type",Function),ns("design:paramtypes",[]),ns("design:returntype",void 0)],e.prototype,"focusDrillUp",null),ts([Qe,ns("design:type",Function),ns("design:paramtypes",[Object,Object,Object]),ns("design:returntype",void 0)],e.prototype,"setActiveNode",null),ts([Qe,ns("design:type",Function),ns("design:paramtypes",[Object,Object]),ns("design:returntype",void 0)],e.prototype,"setSelectedNode",null),ts([Qe,ns("design:type",Function),ns("design:paramtypes",[Object,Object]),ns("design:returntype",void 0)],e.prototype,"setExpandedNode",null),ts([Qe,ns("design:type",Function),ns("design:paramtypes",[]),ns("design:returntype",void 0)],e.prototype,"expandAll",null),ts([Qe,ns("design:type",Function),ns("design:paramtypes",[]),ns("design:returntype",void 0)],e.prototype,"collapseAll",null),ts([Qe,ns("design:type",Function),ns("design:paramtypes",[Object,Object]),ns("design:returntype",void 0)],e.prototype,"setIsHidden",null),ts([Qe,ns("design:type",Function),ns("design:paramtypes",[Object]),ns("design:returntype",void 0)],e.prototype,"setHiddenNodeIds",null),ts([Qe,ns("design:type",Function),ns("design:paramtypes",[Object,Object]),ns("design:returntype",void 0)],e.prototype,"filterNodes",null),ts([Qe,ns("design:type",Function),ns("design:paramtypes",[]),ns("design:returntype",void 0)],e.prototype,"clearFilter",null),ts([Qe,ns("design:type",Function),ns("design:paramtypes",[Object,Object]),ns("design:returntype",void 0)],e.prototype,"moveNode",null),ts([Qe,ns("design:type",Function),ns("design:paramtypes",[Object,Object]),ns("design:returntype",void 0)],e.prototype,"copyNode",null),ts([Qe,ns("design:type",Function),ns("design:paramtypes",[Object]),ns("design:returntype",void 0)],e.prototype,"setState",null),e})(),rs=(()=>{class e{constructor(){this._draggedElement=null}set(e){this._draggedElement=e}get(){return this._draggedElement}isDragging(){return!!this.get()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return new e},token:e,providedIn:"root"}),e})();var ss=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},os=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};const as=150;let cs=(()=>{class e{constructor(e){this.treeModel=e,this.yBlocks=0,this.x=0,this.viewportHeight=null,this.viewport=null,e.virtualScroll=this,this._dispose=[Ze(()=>this.fixScroll())]}get y(){return this.yBlocks*as}get totalHeight(){return this.treeModel.virtualRoot?this.treeModel.virtualRoot.height:0}fireEvent(e){this.treeModel.fireEvent(e)}init(){const e=this.recalcPositions.bind(this);e(),this._dispose=[...this._dispose,tt(()=>this.treeModel.roots,e),tt(()=>this.treeModel.expandedNodeIds,e),tt(()=>this.treeModel.hiddenNodeIds,e)],this.treeModel.subscribe(Kr.loadNodeChildren,e)}isEnabled(){return this.treeModel.options.useVirtualScroll}_setYBlocks(e){this.yBlocks=e}recalcPositions(){this.treeModel.virtualRoot.height=this._getPositionAfter(this.treeModel.getVisibleRoots(),0)}_getPositionAfter(e,t){let n=t;return e.forEach(e=>{e.position=n,n=this._getPositionAfterNode(e,n)}),n}_getPositionAfterNode(e,t){let n=e.getSelfHeight()+t;return e.children&&e.isExpanded&&(n=this._getPositionAfter(e.visibleChildren,n)),e.height=n-t,n}clear(){this._dispose.forEach(e=>e())}setViewport(e){Object.assign(this,{viewport:e,x:e.scrollLeft,yBlocks:Math.round(e.scrollTop/as),viewportHeight:e.getBoundingClientRect?e.getBoundingClientRect().height:0})}scrollIntoView(e,t,n=!0){if(e.options.scrollContainer){const i=e.options.scrollContainer,r=i.getBoundingClientRect().height,s=i.getBoundingClientRect().top,o=this.viewport.getBoundingClientRect().top+e.position-s;(t||o<i.scrollTop||o+e.getSelfHeight()>i.scrollTop+r)&&(i.scrollTop=n?o-r/2:o)}else(t||e.position<this.y||e.position+e.getSelfHeight()>this.y+this.viewportHeight)&&this.viewport&&(this.viewport.scrollTop=n?e.position-this.viewportHeight/2:e.position,this._setYBlocks(Math.floor(this.viewport.scrollTop/as)))}getViewportNodes(e){if(!e)return[];const t=e.filter(e=>!e.isHidden);if(!this.isEnabled())return t;if(!this.viewportHeight||!t.length)return[];const n=ls(t,e=>e.position+500>this.y||e.position+e.height>this.y),i=ls(t,e=>e.position-500>this.y+this.viewportHeight,n),r=[];if(i-n>(1e3+this.viewportHeight)/t[0].treeModel.options.options.nodeHeight)return[];for(let s=n;s<=i;s++)r.push(t[s]);return r}fixScroll(){const e=Math.max(0,this.totalHeight-this.viewportHeight);this.y<0&&this._setYBlocks(0),this.y>e&&this._setYBlocks(e/as)}}return e.\u0275fac=function(t){return new(t||e)(i.dc(is))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),ss([te,os("design:type",Object)],e.prototype,"yBlocks",void 0),ss([te,os("design:type",Object)],e.prototype,"x",void 0),ss([te,os("design:type",Object)],e.prototype,"viewportHeight",void 0),ss([se,os("design:type",Object),os("design:paramtypes",[])],e.prototype,"y",null),ss([se,os("design:type",Object),os("design:paramtypes",[])],e.prototype,"totalHeight",null),ss([Qe,os("design:type",Function),os("design:paramtypes",[Object]),os("design:returntype",void 0)],e.prototype,"_setYBlocks",null),ss([Qe,os("design:type",Function),os("design:paramtypes",[]),os("design:returntype",void 0)],e.prototype,"recalcPositions",null),ss([Qe,os("design:type",Function),os("design:paramtypes",[Object]),os("design:returntype",void 0)],e.prototype,"setViewport",null),ss([Qe,os("design:type",Function),os("design:paramtypes",[Object,Object,Object]),os("design:returntype",void 0)],e.prototype,"scrollIntoView",null),e})();function ls(e,t,n=0){let i=n,r=e.length-1;for(;i!==r;){let n=Math.floor((i+r)/2);t(e[n])?r=n:i=i===n?r:n}return i}let us=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["tree-loading-component"]],inputs:{template:"template",node:"node"},decls:2,vars:5,consts:[[4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,t){1&e&&(i.Mc(0,br,2,0,"span",0),i.Ob(1,1)),2&e&&(i.pc("ngIf",!t.template),i.yb(1),i.pc("ngTemplateOutlet",t.template)("ngTemplateOutletContext",i.uc(3,gr,t.node)))},directives:[r.r,r.w],encapsulation:2}),e})(),ds=(()=>{class e{constructor(e,t,n){this.elementRef=e,this.ngZone=t,this.virtualScroll=n,this.setViewport=function(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return Object(xn.a)(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),function(e,t,n){var i,r,s,o,a,c,l=0,u=!1,d=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function f(t){var n=i,s=r;return i=r=void 0,l=t,o=e.apply(s,n)}function p(e){return l=e,a=setTimeout(b,t),u?f(e):o}function m(e){var n=e-c;return void 0===c||n>=t||n<0||d&&e-l>=s}function b(){var e=ar();if(m(e))return g(e);a=setTimeout(b,function(e){var n=t-(e-c);return d?lr(n,s-(e-l)):n}(e))}function g(e){return a=void 0,h&&i?f(e):(i=r=void 0,o)}function _(){var e=ar(),n=m(e);if(i=arguments,r=this,c=e,n){if(void 0===a)return p(c);if(d)return clearTimeout(a),a=setTimeout(b,t),f(c)}return void 0===a&&(a=setTimeout(b,t)),o}return t=tr(t)||0,Object(xn.a)(n)&&(u=!!n.leading,s=(d="maxWait"in n)?cr(tr(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h),_.cancel=function(){void 0!==a&&clearTimeout(a),l=0,i=c=r=a=void 0},_.flush=function(){return void 0===a?o:g(ar())},_}(e,t,{leading:i,maxWait:t,trailing:r})}(()=>{this.virtualScroll.setViewport(this.elementRef.nativeElement)},17),this.scrollEventHandler=this.setViewport.bind(this)}ngOnInit(){this.virtualScroll.init()}ngAfterViewInit(){setTimeout(()=>{this.setViewport(),this.virtualScroll.fireEvent({eventName:Kr.initialized})});let e=this.elementRef.nativeElement;this.ngZone.runOutsideAngular(()=>{e.addEventListener("scroll",this.scrollEventHandler)})}ngOnDestroy(){this.virtualScroll.clear(),this.elementRef.nativeElement.removeEventListener("scroll",this.scrollEventHandler)}getTotalHeight(){return this.virtualScroll.isEnabled()&&this.virtualScroll.totalHeight+"px"||"auto"}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(i.A),i.Mb(cs))},e.\u0275cmp=i.Gb({type:e,selectors:[["tree-viewport"]],features:[i.xb([cs])],ngContentSelectors:vr,decls:1,vars:2,consts:[[4,"treeMobxAutorun"]],template:function(e,t){1&e&&(i.oc(),i.Mc(0,_r,3,2,"ng-container",0)),2&e&&i.pc("treeMobxAutorun",i.tc(1,yr))},directives:[qr],encapsulation:2}),e})(),hs=(()=>{class e{constructor(e,t){this.treeModel=e,this.treeDraggedElement=t,e.eventNames.forEach(e=>this[e]=new i.o),e.subscribeToState(e=>this.stateChange.emit(e))}set nodes(e){}set options(e){}set focused(e){this.treeModel.setFocus(e)}set state(e){this.treeModel.setState(e)}onKeydown(e){if(!this.treeModel.isFocused)return;if(hr(["input","textarea"],document.activeElement.tagName.toLowerCase()))return;const t=this.treeModel.getFocusedNode();this.treeModel.performKeyAction(t,e)}onMousedown(e){(function e(t,n){return!t||t.localName!==n&&e(t.parentElement,n)})(e.target,"tree-root")&&this.treeModel.setFocus(!1)}ngOnChanges(e){(e.options||e.nodes)&&this.treeModel.setData({options:e.options&&e.options.currentValue,nodes:e.nodes&&e.nodes.currentValue,events:mr(this,this.treeModel.eventNames)})}sizeChanged(){this.viewportComponent.setViewport()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(is),i.Mb(rs))},e.\u0275cmp=i.Gb({type:e,selectors:[["Tree"],["tree-root"]],contentQueries:function(e,t,n){var r;1&e&&(i.Fb(n,wr,!0),i.Fb(n,Sr,!0),i.Fb(n,Mr,!0),i.Fb(n,xr,!0)),2&e&&(i.zc(r=i.hc())&&(t.loadingTemplate=r.first),i.zc(r=i.hc())&&(t.treeNodeTemplate=r.first),i.zc(r=i.hc())&&(t.treeNodeWrapperTemplate=r.first),i.zc(r=i.hc())&&(t.treeNodeFullTemplate=r.first))},viewQuery:function(e,t){var n;1&e&&i.Tc(kr,!0),2&e&&i.zc(n=i.hc())&&(t.viewportComponent=n.first)},hostBindings:function(e,t){1&e&&i.gc("keydown",(function(e){return t.onKeydown(e)}),!1,i.Bc)("mousedown",(function(e){return t.onMousedown(e)}),!1,i.Bc)},inputs:{nodes:"nodes",options:"options",focused:"focused",state:"state"},outputs:{toggleExpanded:"toggleExpanded",activate:"activate",deactivate:"deactivate",nodeActivate:"nodeActivate",nodeDeactivate:"nodeDeactivate",select:"select",deselect:"deselect",focus:"focus",blur:"blur",updateData:"updateData",initialized:"initialized",moveNode:"moveNode",copyNode:"copyNode",loadNodeChildren:"loadNodeChildren",changeFilter:"changeFilter",event:"event",stateChange:"stateChange"},features:[i.xb([is]),i.wb],decls:5,vars:6,consts:[["viewport",""],[1,"angular-tree-component"],[3,"nodes","treeModel","templates",4,"ngIf"],["class","empty-tree-drop-slot",3,"dropIndex","node",4,"ngIf"],[3,"nodes","treeModel","templates"],[1,"empty-tree-drop-slot",3,"dropIndex","node"]],template:function(e,t){1&e&&(i.Sb(0,"tree-viewport",null,0),i.Sb(2,"div",1),i.Mc(3,Tr,1,8,"tree-node-collection",2),i.Mc(4,Cr,1,2,"tree-node-drop-slot",3),i.Rb(),i.Rb()),2&e&&(i.yb(2),i.Eb("node-dragging",t.treeDraggedElement.isDragging())("angular-tree-component-rtl",t.treeModel.options.rtl),i.yb(1),i.pc("ngIf",t.treeModel.roots),i.yb(1),i.pc("ngIf",t.treeModel.isEmptyTree()))},directives:function(){return[ds,r.r,Ds,ms]},encapsulation:2}),e})(),fs=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["TreeNode"],["tree-node"]],inputs:{node:"node",index:"index",templates:"templates"},decls:1,vars:2,consts:[[4,"treeMobxAutorun"],[3,"class","tree-node","tree-node-expanded","tree-node-collapsed","tree-node-leaf","tree-node-active","tree-node-focused",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"dropIndex","node",4,"ngIf"],[3,"node","index","templates"],[3,"node","templates"],[3,"dropIndex","node"]],template:function(e,t){1&e&&i.Mc(0,Er,3,8,"ng-container",0),2&e&&i.pc("treeMobxAutorun",i.tc(1,yr))},directives:function(){return[qr,r.r,r.w,Ts,gs,ms]},encapsulation:2}),e})(),ps=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["tree-node-content"]],inputs:{node:"node",index:"index",template:"template"},decls:2,vars:7,consts:[[4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,t){1&e&&(i.Mc(0,Ar,2,1,"span",0),i.Ob(1,1)),2&e&&(i.pc("ngIf",!t.template),i.yb(1),i.pc("ngTemplateOutlet",t.template)("ngTemplateOutletContext",i.wc(3,Ir,t.node,t.node,t.index)))},directives:[r.r,r.w],encapsulation:2}),e})(),ms=(()=>{class e{onDrop(e){this.node.mouseAction("drop",e.event,{from:e.element,to:{parent:this.node,index:this.dropIndex}})}allowDrop(e,t){return this.node.options.allowDrop(e,{parent:this.node,index:this.dropIndex},t)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["TreeNodeDropSlot"],["tree-node-drop-slot"]],inputs:{node:"node",dropIndex:"dropIndex"},decls:1,vars:2,consts:[[1,"node-drop-slot",3,"treeAllowDrop","allowDragoverStyling","treeDrop"]],template:function(e,t){1&e&&(i.Sb(0,"div",0),i.gc("treeDrop",(function(e){return t.onDrop(e)})),i.Rb()),2&e&&i.pc("treeAllowDrop",t.allowDrop.bind(t))("allowDragoverStyling",!0)},directives:function(){return[Rs]},encapsulation:2}),e})(),bs=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["tree-node-expander"]],inputs:{node:"node"},decls:1,vars:2,consts:[[4,"treeMobxAutorun"],["class","toggle-children-wrapper",3,"toggle-children-wrapper-expanded","toggle-children-wrapper-collapsed","click",4,"ngIf"],["class","toggle-children-placeholder",4,"ngIf"],[1,"toggle-children-wrapper",3,"click"],[1,"toggle-children"],[1,"toggle-children-placeholder"]],template:function(e,t){1&e&&i.Mc(0,Nr,3,2,"ng-container",0),2&e&&i.pc("treeMobxAutorun",i.tc(1,yr))},directives:[qr,r.r],encapsulation:2}),e})(),gs=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["tree-node-children"]],inputs:{node:"node",templates:"templates"},decls:1,vars:2,consts:[[4,"treeMobxAutorun"],[3,"tree-children","tree-children-no-padding",4,"treeAnimateOpen","treeAnimateOpenSpeed","treeAnimateOpenAcceleration","treeAnimateOpenEnabled"],[3,"nodes","templates","treeModel",4,"ngIf"],["class","tree-node-loading",3,"padding-left","template","node",4,"ngIf"],[3,"nodes","templates","treeModel"],[1,"tree-node-loading",3,"template","node"]],template:function(e,t){1&e&&i.Mc(0,$r,2,4,"ng-container",0),2&e&&i.pc("treeMobxAutorun",i.tc(1,yr))},directives:function(){return[qr,As,r.r,Ds,us]},encapsulation:2}),e})();function _s(...e){return Qe(...e)}const ys=Object.assign(_s,Qe);function vs(...e){return se(...e)}const ws=Object.assign(vs,se);function Ss(...e){return te(...e)}const Ms=Object.assign(Ss,te);var xs=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},ks=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};let Ds=(()=>{class e{constructor(){this._dispose=[]}get nodes(){return this._nodes}set nodes(e){this.setNodes(e)}get marginTop(){const e=this.viewportNodes&&this.viewportNodes.length&&this.viewportNodes[0];return(e&&e.parent?e.position-e.parent.position-e.parent.getSelfHeight():0)+"px"}setNodes(e){this._nodes=e}ngOnInit(){this.virtualScroll=this.treeModel.virtualScroll,this._dispose=[tt(()=>this.virtualScroll.getViewportNodes(this.nodes).map(e=>e.index),e=>{this.viewportNodes=e.map(e=>this.nodes[e])},{compareStructural:!0,fireImmediately:!0}),tt(()=>this.nodes,e=>{this.viewportNodes=this.virtualScroll.getViewportNodes(e)})]}ngOnDestroy(){this._dispose.forEach(e=>e())}trackNode(e,t){return t.id}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["tree-node-collection"]],inputs:{nodes:"nodes",treeModel:"treeModel",templates:"templates"},decls:1,vars:2,consts:[[4,"treeMobxAutorun"],[3,"node","index","templates",4,"ngFor","ngForOf","ngForTrackBy"],[3,"node","index","templates"]],template:function(e,t){1&e&&i.Mc(0,Wr,3,4,"ng-container",0),2&e&&i.pc("treeMobxAutorun",i.tc(1,yr))},directives:[qr,r.q,fs],encapsulation:2}),xs([Ms,ks("design:type",Object)],e.prototype,"_nodes",void 0),xs([Ms,ks("design:type",Array)],e.prototype,"viewportNodes",void 0),xs([ws,ks("design:type",String),ks("design:paramtypes",[])],e.prototype,"marginTop",null),xs([ys,ks("design:type",Function),ks("design:paramtypes",[Object]),ks("design:returntype",void 0)],e.prototype,"setNodes",null),e})(),Ts=(()=>{class e{constructor(){}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["tree-node-wrapper"]],inputs:{node:"node",index:"index",templates:"templates"},decls:2,vars:8,consts:[["class","node-wrapper",3,"padding-left",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"node-wrapper"],[3,"node",4,"ngIf"],[3,"node"],[1,"node-content-wrapper",3,"treeAllowDrop","allowDragoverStyling","treeDrag","treeDragEnabled","click","dblclick","mouseover","mouseout","contextmenu","treeDrop","treeDropDragOver","treeDropDragLeave","treeDropDragEnter"],[3,"node","index","template"]],template:function(e,t){1&e&&(i.Mc(0,Br,5,15,"div",0),i.Ob(1,1)),2&e&&(i.pc("ngIf",!t.templates.treeNodeWrapperTemplate),i.yb(1),i.pc("ngTemplateOutlet",t.templates.treeNodeWrapperTemplate)("ngTemplateOutletContext",i.xc(3,Rr,t.node,t.node,t.index,t.templates)))},directives:function(){return[r.r,r.w,bs,Es,Rs,ps,Cs]},encapsulation:2}),e})(),Cs=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["tree-node-checkbox"]],inputs:{node:"node"},decls:1,vars:2,consts:[[4,"treeMobxAutorun"],["type","checkbox",1,"tree-node-checkbox",3,"checked","indeterminate","click"]],template:function(e,t){1&e&&i.Mc(0,Ur,2,2,"ng-container",0),2&e&&i.pc("treeMobxAutorun",i.tc(1,yr))},directives:[qr],encapsulation:2}),e})();const Os="is-dragging-over",Ls="is-dragging-over-disabled";let Rs=(()=>{class e{constructor(e,t,n,r){this.el=e,this.renderer=t,this.treeDraggedElement=n,this.ngZone=r,this.allowDragoverStyling=!0,this.onDropCallback=new i.o,this.onDragOverCallback=new i.o,this.onDragLeaveCallback=new i.o,this.onDragEnterCallback=new i.o,this._allowDrop=(e,t)=>!0,this.dragOverEventHandler=this.onDragOver.bind(this),this.dragEnterEventHandler=this.onDragEnter.bind(this),this.dragLeaveEventHandler=this.onDragLeave.bind(this)}set treeAllowDrop(e){this._allowDrop=e instanceof Function?e:(t,n)=>e}allowDrop(e){return this._allowDrop(this.treeDraggedElement.get(),e)}ngAfterViewInit(){let e=this.el.nativeElement;this.ngZone.runOutsideAngular(()=>{e.addEventListener("dragover",this.dragOverEventHandler),e.addEventListener("dragenter",this.dragEnterEventHandler),e.addEventListener("dragleave",this.dragLeaveEventHandler)})}ngOnDestroy(){let e=this.el.nativeElement;e.removeEventListener("dragover",this.dragOverEventHandler),e.removeEventListener("dragenter",this.dragEnterEventHandler),e.removeEventListener("dragleave",this.dragLeaveEventHandler)}onDragOver(e){if(!this.allowDrop(e))return this.allowDragoverStyling?this.addDisabledClass():void 0;this.onDragOverCallback.emit({event:e,element:this.treeDraggedElement.get()}),e.preventDefault(),this.allowDragoverStyling&&this.addClass()}onDragEnter(e){this.allowDrop(e)&&(e.preventDefault(),this.onDragEnterCallback.emit({event:e,element:this.treeDraggedElement.get()}))}onDragLeave(e){if(!this.allowDrop(e))return this.allowDragoverStyling?this.removeDisabledClass():void 0;this.onDragLeaveCallback.emit({event:e,element:this.treeDraggedElement.get()}),this.allowDragoverStyling&&this.removeClass()}onDrop(e){this.allowDrop(e)&&(e.preventDefault(),this.onDropCallback.emit({event:e,element:this.treeDraggedElement.get()}),this.allowDragoverStyling&&this.removeClass(),this.treeDraggedElement.set(null))}addClass(){this.renderer.addClass(this.el.nativeElement,Os)}removeClass(){this.renderer.removeClass(this.el.nativeElement,Os)}addDisabledClass(){this.renderer.addClass(this.el.nativeElement,Ls)}removeDisabledClass(){this.renderer.removeClass(this.el.nativeElement,Ls)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(i.E),i.Mb(rs),i.Mb(i.A))},e.\u0275dir=i.Hb({type:e,selectors:[["","treeDrop",""]],hostBindings:function(e,t){1&e&&i.gc("drop",(function(e){return t.onDrop(e)}))},inputs:{allowDragoverStyling:"allowDragoverStyling",treeAllowDrop:"treeAllowDrop"},outputs:{onDropCallback:"treeDrop",onDragOverCallback:"treeDropDragOver",onDragLeaveCallback:"treeDropDragLeave",onDragEnterCallback:"treeDropDragEnter"}}),e})(),Es=(()=>{class e{constructor(e,t,n,i){this.el=e,this.renderer=t,this.treeDraggedElement=n,this.ngZone=i,this.dragEventHandler=this.onDrag.bind(this)}ngAfterViewInit(){let e=this.el.nativeElement;this.ngZone.runOutsideAngular(()=>{e.addEventListener("drag",this.dragEventHandler)})}ngDoCheck(){this.renderer.setAttribute(this.el.nativeElement,"draggable",this.treeDragEnabled?"true":"false")}ngOnDestroy(){this.el.nativeElement.removeEventListener("drag",this.dragEventHandler)}onDragStart(e){e.dataTransfer.setData("text",e.target.id),this.treeDraggedElement.set(this.draggedElement),this.draggedElement.mouseAction&&this.draggedElement.mouseAction("dragStart",e)}onDrag(e){this.draggedElement.mouseAction&&this.draggedElement.mouseAction("drag",e)}onDragEnd(){this.draggedElement.mouseAction&&this.draggedElement.mouseAction("dragEnd"),this.treeDraggedElement.set(null)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(i.E),i.Mb(rs),i.Mb(i.A))},e.\u0275dir=i.Hb({type:e,selectors:[["","treeDrag",""]],hostBindings:function(e,t){1&e&&i.gc("dragstart",(function(e){return t.onDragStart(e)}))("dragend",(function(){return t.onDragEnd()}))},inputs:{draggedElement:["treeDrag","draggedElement"],treeDragEnabled:"treeDragEnabled"}}),e})(),As=(()=>{class e{constructor(e,t,n){this.renderer=e,this.templateRef=t,this.viewContainerRef=n}set isOpen(e){e?(this._show(),this.isEnabled&&!1===this._isOpen&&this._animateOpen()):this.isEnabled?this._animateClose():this._hide(),this._isOpen=!!e}_show(){this.innerElement||(this.innerElement=this.viewContainerRef.createEmbeddedView(this.templateRef).rootNodes[0])}_hide(){this.viewContainerRef.clear(),this.innerElement=null}_animateOpen(){let e=this.animateSpeed,t=this.animateAcceleration,n=0;this.renderer.setStyle(this.innerElement,"max-height","0"),setTimeout(()=>{const i=setInterval(()=>{if(!this._isOpen||!this.innerElement)return clearInterval(i);n+=e;const r=Math.round(n);this.renderer.setStyle(this.innerElement,"max-height",r+"px");const s=this.innerElement.getBoundingClientRect?this.innerElement.getBoundingClientRect().height:0;e*=t,t*=1.005,s<r&&(this.renderer.setStyle(this.innerElement,"max-height",null),clearInterval(i))},17)})}_animateClose(){if(!this.innerElement)return;let e=this.animateSpeed,t=this.animateAcceleration,n=this.innerElement.getBoundingClientRect().height;const i=setInterval(()=>{if(this._isOpen||!this.innerElement)return clearInterval(i);n-=e,this.renderer.setStyle(this.innerElement,"max-height",n+"px"),e*=t,t*=1.005,n<=0&&(this.viewContainerRef.clear(),this.innerElement=null,clearInterval(i))},17)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.E),i.Mb(i.L),i.Mb(i.P))},e.\u0275dir=i.Hb({type:e,selectors:[["","treeAnimateOpen",""]],inputs:{isOpen:["treeAnimateOpen","isOpen"],animateSpeed:["treeAnimateOpenSpeed","animateSpeed"],animateAcceleration:["treeAnimateOpenAcceleration","animateAcceleration"],isEnabled:["treeAnimateOpenEnabled","isEnabled"]}}),e})(),Is=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},providers:[],imports:[[r.c]]}),e})()},ovuK:function(e,t,n){"use strict";t.a=function(e){return function(t){return e(t)}}},oxzT:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var i=function(e){return e.add="fa fa-plus",e.addCircle="fa fa-plus-circle",e.minusCircle="fa fa-minus-circle",e.edit="fa fa-pencil",e.destroy="fa fa-times",e.destroyCircle="fa fa-times-circle",e.exchange="fa fa-exchange",e.copy="fa fa-copy",e.clipboard="fa fa-clipboard",e.flatten="fa fa-chain-broken",e.trash="fa fa-trash-o",e.lock="fa fa-lock",e.unlock="fa fa-unlock",e.clone="fa fa-clone",e.undo="fa fa-undo",e.search="fa fa-search",e.start="fa fa-play",e.stop="fa fa-stop",e.analyse="fa fa-stethoscope",e.deepCheck="fa fa-cog",e.reweight="fa fa-balance-scale",e.left="fa fa-arrow-left",e.right="fa fa-arrow-right",e.down="fa fa-arrow-down",e.erase="fa fa-eraser",e.user="fa fa-user",e.users="fa fa-users",e.share="fa fa-share-alt",e.key="fa fa-key-modern",e.warning="fa fa-exclamation-triangle",e.info="fa fa-info",e.infoCircle="fa fa-info-circle",e.questionCircle="fa fa-question-circle-o",e.check="fa fa-check",e.show="fa fa-eye",e.paragraph="fa fa-paragraph",e.terminal="fa fa-terminal",e.magic="fa fa-magic",e.hourglass="fa fa-hourglass-o",e.filledHourglass="fa fa-hourglass",e.table="fa fa-table",e.spinner="fa fa-spinner",e.refresh="fa fa-refresh",e.bullseye="fa fa-bullseye",e.disk="fa fa-hdd-o",e.server="fa fa-server",e.filter="fa fa-filter",e.lineChart="fa fa-line-chart",e.signOut="fa fa-sign-out",e.health="fa fa-heartbeat",e.circle="fa fa-circle",e.bell="fa fa-bell",e.tag="fa fa-tag",e.leftArrow="fa fa-angle-left",e.rightArrow="fa fa-angle-right",e.leftArrowDouble="fa fa-angle-double-left",e.rightArrowDouble="fa fa-angle-double-right",e.flag="fa fa-flag",e.clearFilters="fa fa-window-close",e.download="fa fa-download",e.upload="fa fa-upload",e.close="fa fa-times",e.json="fa fa-file-code-o",e.text="fa fa-file-text",e.wrench="fa fa-wrench",e.enter="fa fa-sign-in",e.exit="fa fa-sign-out",e.large="fa fa-lg",e.large2x="fa fa-2x",e.large3x="fa fa-3x",e.stack="fa fa-stack",e.stack1x="fa fa-stack-1x",e.stack2x="fa fa-stack-2x",e.pulse="fa fa-pulse",e.spin="fa fa-spin",e.inverse="fa fa-inverse",e}({})},"p/rL":function(e,t,n){!function(e){"use strict";e.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_M\u025bkalo_Zuw\u025bnkalo_Zuluyekalo_Utikalo_S\u025btanburukalo_\u0254kut\u0254burukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_M\u025b_Zuw_Zul_Uti_S\u025bt_\u0254ku_Now_Des".split("_"),weekdays:"Kari_Nt\u025bn\u025bn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Nt\u025b_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [l\u025br\u025b] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [l\u025br\u025b] HH:mm"},calendar:{sameDay:"[Bi l\u025br\u025b] LT",nextDay:"[Sini l\u025br\u025b] LT",nextWeek:"dddd [don l\u025br\u025b] LT",lastDay:"[Kunu l\u025br\u025b] LT",lastWeek:"dddd [t\u025bm\u025bnen l\u025br\u025b] LT",sameElse:"L"},relativeTime:{future:"%s k\u0254n\u0254",past:"a b\u025b %s b\u0254",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"l\u025br\u025b kelen",hh:"l\u025br\u025b %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}})}(n("wd/R"))},p4Cf:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var i=n("oxzT"),r=n("8Y7J"),s=n("SVse"),o=n("G0yt");function a(e,t){if(1&e&&(r.Nb(0,"div",2),r.nc(1)),2&e){const e=r.ic();r.Ab(e.class),r.pc("innerHtml",e.html,r.Ec)}}const c=function(e){return[e]},l=["*"];let u=(()=>{class e{constructor(){this.icons=i.a}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=r.Gb({type:e,selectors:[["cd-helper"]],inputs:{class:"class",html:"html"},ngContentSelectors:l,decls:3,vars:4,consts:[["popoverTpl",""],["aria-hidden","true",3,"ngClass","ngbPopover","click"],[3,"innerHtml"]],template:function(e,t){if(1&e&&(r.oc(),r.Mc(0,a,2,3,"ng-template",null,0,r.Nc),r.Sb(2,"i",1),r.gc("click",(function(e){return e.preventDefault()})),r.Rb()),2&e){const e=r.Ac(1);r.yb(2),r.pc("ngClass",r.uc(2,c,t.icons.questionCircle))("ngbPopover",e)}},directives:[s.p,o.w],styles:["i[_ngcontent-%COMP%]{color:#2b99a8;cursor:pointer;padding-left:4px}"]}),e})()},pLZG:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("7o/Q");function r(e,t){return function(n){return n.lift(new s(e,t))}}class s{constructor(e,t){this.predicate=e,this.thisArg=t}call(e,t){return t.subscribe(new o(e,this.predicate,this.thisArg))}}class o extends i.a{constructor(e,t,n){super(e),this.predicate=t,this.thisArg=n,this.count=0}_next(e){let t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(n){return void this.destination.error(n)}t&&this.destination.next(e)}}},pkCn:function(e,t,n){"use strict";var i=n("0Dky");e.exports=function(e,t){var n=[][e];return!!n&&i((function(){n.call(null,t||function(){throw 1},1)}))}},ppGB:function(e,t){var n=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},ppaS:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var i=n("8Y7J"),r=n("oxzT"),s=n("DNAf"),o=n("wnGv"),a=n("SVse");const c=["cdSelect"],l=function(e){return[e]};function u(e,t){if(1&e){const e=i.Tb();i.Sb(0,"span"),i.Sb(1,"span",4),i.Sb(2,"span",5),i.Oc(3),i.Rb(),i.Sb(4,"a",6),i.gc("click",(function(){i.Dc(e);const n=t.$implicit;return i.ic(),i.Ac(1).removeItem(n)})),i.Nb(5,"i",7),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=t.$implicit,n=i.ic();i.yb(3),i.Pc(e),i.yb(2),i.pc("ngClass",i.uc(2,l,n.icons.destroy))}}let d=(()=>{class e{constructor(){this.data=[],this.options=[],this.messages=new s.a({}),this.customBadges=!1,this.customBadgeValidators=[],this.selection=new i.o,this.icons=r.a}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-select-badges"]],viewQuery:function(e,t){var n;1&e&&i.Jc(c,!0),2&e&&i.zc(n=i.hc())&&(t.cdSelect=n.first)},inputs:{data:"data",options:"options",messages:"messages",selectionLimit:"selectionLimit",customBadges:"customBadges",customBadgeValidators:"customBadgeValidators"},outputs:{selection:"selection"},decls:4,vars:10,consts:[["elemClass","mr-2 select-menu-edit",3,"data","options","messages","selectionLimit","customBadges","customBadgeValidators","selection"],["cdSelect",""],[3,"ngClass"],[4,"ngFor","ngForOf"],[1,"badge","badge-dark","mr-2"],[1,"mr-2"],[1,"badge-remove",3,"click"],["aria-hidden","true",3,"ngClass"]],template:function(e,t){1&e&&(i.Sb(0,"cd-select",0,1),i.gc("selection",(function(e){return t.selection.emit(e)})),i.Nb(2,"i",2),i.Rb(),i.Mc(3,u,6,4,"span",3)),2&e&&(i.pc("data",t.data)("options",t.options)("messages",t.messages)("selectionLimit",t.selectionLimit)("customBadges",t.customBadges)("customBadgeValidators",t.customBadgeValidators),i.yb(2),i.pc("ngClass",i.uc(8,l,t.icons.edit)),i.yb(1),i.pc("ngForOf",t.data))},directives:[o.a,a.p,a.q],styles:[".badge-remove[_ngcontent-%COMP%]{color:#fff}i.fa-pencil[_ngcontent-%COMP%]{font-size:1.1rem}"]}),e})()},pxpQ:function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return a}));var i=n("7o/Q"),r=n("WMd4");function s(e,t=0){return function(n){return n.lift(new o(e,t))}}class o{constructor(e,t=0){this.scheduler=e,this.delay=t}call(e,t){return t.subscribe(new a(e,this.scheduler,this.delay))}}class a extends i.a{constructor(e,t,n=0){super(e),this.scheduler=t,this.delay=n}static dispatch(e){const{notification:t,destination:n}=e;t.observe(n),this.unsubscribe()}scheduleMessage(e){this.destination.add(this.scheduler.schedule(a.dispatch,this.delay,new c(e,this.destination)))}_next(e){this.scheduleMessage(r.a.createNext(e))}_error(e){this.scheduleMessage(r.a.createError(e)),this.unsubscribe()}_complete(){this.scheduleMessage(r.a.createComplete()),this.unsubscribe()}}class c{constructor(e,t){this.notification=e,this.destination=t}}},pyRK:function(e,t,n){"use strict";var i=Object.prototype;t.a=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||i)}},quSY:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n("DH7j"),r=n("XoHu"),s=n("n6bG");const o=(()=>{function e(e){return Error.call(this),this.message=e?`${e.length} errors occurred during unsubscription:\n${e.map((e,t)=>`${t+1}) ${e.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e})();let a=(()=>{class e{constructor(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}unsubscribe(){let t;if(this.closed)return;let{_parentOrParents:n,_ctorUnsubscribe:a,_unsubscribe:l,_subscriptions:u}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof e)n.remove(this);else if(null!==n)for(let e=0;e<n.length;++e)n[e].remove(this);if(Object(s.a)(l)){a&&(this._unsubscribe=void 0);try{l.call(this)}catch(d){t=d instanceof o?c(d.errors):[d]}}if(Object(i.a)(u)){let e=-1,n=u.length;for(;++e<n;){const n=u[e];if(Object(r.a)(n))try{n.unsubscribe()}catch(d){t=t||[],d instanceof o?t=t.concat(c(d.errors)):t.push(d)}}}if(t)throw new o(t)}add(t){let n=t;if(!t)return e.EMPTY;switch(typeof t){case"function":n=new e(t);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof e)){const t=n;n=new e,n._subscriptions=[t]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}let{_parentOrParents:i}=n;if(null===i)n._parentOrParents=this;else if(i instanceof e){if(i===this)return n;n._parentOrParents=[i,this]}else{if(-1!==i.indexOf(this))return n;i.push(this)}const r=this._subscriptions;return null===r?this._subscriptions=[n]:r.push(n),n}remove(e){const t=this._subscriptions;if(t){const n=t.indexOf(e);-1!==n&&t.splice(n,1)}}}var t;return e.EMPTY=((t=new e).closed=!0,t),e})();function c(e){return e.reduce((e,t)=>e.concat(t instanceof o?t.errors:t),[])}},qvJo:function(e,t,n){!function(e){"use strict";function t(e,t,n,i){var r={s:["\u0925\u094b\u0921\u092f\u093e \u0938\u0945\u0915\u0902\u0921\u093e\u0902\u0928\u0940","\u0925\u094b\u0921\u0947 \u0938\u0945\u0915\u0902\u0921"],ss:[e+" \u0938\u0945\u0915\u0902\u0921\u093e\u0902\u0928\u0940",e+" \u0938\u0945\u0915\u0902\u0921"],m:["\u090f\u0915\u093e \u092e\u093f\u0923\u091f\u093e\u0928","\u090f\u0915 \u092e\u093f\u0928\u0942\u091f"],mm:[e+" \u092e\u093f\u0923\u091f\u093e\u0902\u0928\u0940",e+" \u092e\u093f\u0923\u091f\u093e\u0902"],h:["\u090f\u0915\u093e \u0935\u0930\u093e\u0928","\u090f\u0915 \u0935\u0930"],hh:[e+" \u0935\u0930\u093e\u0902\u0928\u0940",e+" \u0935\u0930\u093e\u0902"],d:["\u090f\u0915\u093e \u0926\u093f\u0938\u093e\u0928","\u090f\u0915 \u0926\u0940\u0938"],dd:[e+" \u0926\u093f\u0938\u093e\u0902\u0928\u0940",e+" \u0926\u0940\u0938"],M:["\u090f\u0915\u093e \u092e\u094d\u0939\u092f\u0928\u094d\u092f\u093e\u0928","\u090f\u0915 \u092e\u094d\u0939\u092f\u0928\u094b"],MM:[e+" \u092e\u094d\u0939\u092f\u0928\u094d\u092f\u093e\u0928\u0940",e+" \u092e\u094d\u0939\u092f\u0928\u0947"],y:["\u090f\u0915\u093e \u0935\u0930\u094d\u0938\u093e\u0928","\u090f\u0915 \u0935\u0930\u094d\u0938"],yy:[e+" \u0935\u0930\u094d\u0938\u093e\u0902\u0928\u0940",e+" \u0935\u0930\u094d\u0938\u093e\u0902"]};return i?r[n][0]:r[n][1]}e.defineLocale("gom-deva",{months:{standalone:"\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940_\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u090f\u092a\u094d\u0930\u0940\u0932_\u092e\u0947_\u091c\u0942\u0928_\u091c\u0941\u0932\u092f_\u0911\u0917\u0938\u094d\u091f_\u0938\u092a\u094d\u091f\u0947\u0902\u092c\u0930_\u0911\u0915\u094d\u091f\u094b\u092c\u0930_\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930_\u0921\u093f\u0938\u0947\u0902\u092c\u0930".split("_"),format:"\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940\u091a\u094d\u092f\u093e_\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940\u091a\u094d\u092f\u093e_\u092e\u093e\u0930\u094d\u091a\u093e\u091a\u094d\u092f\u093e_\u090f\u092a\u094d\u0930\u0940\u0932\u093e\u091a\u094d\u092f\u093e_\u092e\u0947\u092f\u093e\u091a\u094d\u092f\u093e_\u091c\u0942\u0928\u093e\u091a\u094d\u092f\u093e_\u091c\u0941\u0932\u092f\u093e\u091a\u094d\u092f\u093e_\u0911\u0917\u0938\u094d\u091f\u093e\u091a\u094d\u092f\u093e_\u0938\u092a\u094d\u091f\u0947\u0902\u092c\u0930\u093e\u091a\u094d\u092f\u093e_\u0911\u0915\u094d\u091f\u094b\u092c\u0930\u093e\u091a\u094d\u092f\u093e_\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930\u093e\u091a\u094d\u092f\u093e_\u0921\u093f\u0938\u0947\u0902\u092c\u0930\u093e\u091a\u094d\u092f\u093e".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"\u091c\u093e\u0928\u0947._\u092b\u0947\u092c\u094d\u0930\u0941._\u092e\u093e\u0930\u094d\u091a_\u090f\u092a\u094d\u0930\u0940._\u092e\u0947_\u091c\u0942\u0928_\u091c\u0941\u0932._\u0911\u0917._\u0938\u092a\u094d\u091f\u0947\u0902._\u0911\u0915\u094d\u091f\u094b._\u0928\u094b\u0935\u094d\u0939\u0947\u0902._\u0921\u093f\u0938\u0947\u0902.".split("_"),monthsParseExact:!0,weekdays:"\u0906\u092f\u0924\u093e\u0930_\u0938\u094b\u092e\u093e\u0930_\u092e\u0902\u0917\u0933\u093e\u0930_\u092c\u0941\u0927\u0935\u093e\u0930_\u092c\u093f\u0930\u0947\u0938\u094d\u0924\u093e\u0930_\u0938\u0941\u0915\u094d\u0930\u093e\u0930_\u0936\u0947\u0928\u0935\u093e\u0930".split("_"),weekdaysShort:"\u0906\u092f\u0924._\u0938\u094b\u092e._\u092e\u0902\u0917\u0933._\u092c\u0941\u0927._\u092c\u094d\u0930\u0947\u0938\u094d\u0924._\u0938\u0941\u0915\u094d\u0930._\u0936\u0947\u0928.".split("_"),weekdaysMin:"\u0906_\u0938\u094b_\u092e\u0902_\u092c\u0941_\u092c\u094d\u0930\u0947_\u0938\u0941_\u0936\u0947".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [\u0935\u093e\u091c\u0924\u093e\u0902]",LTS:"A h:mm:ss [\u0935\u093e\u091c\u0924\u093e\u0902]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [\u0935\u093e\u091c\u0924\u093e\u0902]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [\u0935\u093e\u091c\u0924\u093e\u0902]",llll:"ddd, D MMM YYYY, A h:mm [\u0935\u093e\u091c\u0924\u093e\u0902]"},calendar:{sameDay:"[\u0906\u092f\u091c] LT",nextDay:"[\u092b\u093e\u0932\u094d\u092f\u093e\u0902] LT",nextWeek:"[\u092b\u0941\u0921\u0932\u094b] dddd[,] LT",lastDay:"[\u0915\u093e\u0932] LT",lastWeek:"[\u092b\u093e\u091f\u0932\u094b] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s \u0906\u0926\u0940\u0902",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(\u0935\u0947\u0930)/,ordinal:function(e,t){switch(t){case"D":return e+"\u0935\u0947\u0930";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:0,doy:3},meridiemParse:/\u0930\u093e\u0924\u0940|\u0938\u0915\u093e\u0933\u0940\u0902|\u0926\u0928\u092a\u093e\u0930\u093e\u0902|\u0938\u093e\u0902\u091c\u0947/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u0930\u093e\u0924\u0940"===t?e<4?e:e+12:"\u0938\u0915\u093e\u0933\u0940\u0902"===t?e:"\u0926\u0928\u092a\u093e\u0930\u093e\u0902"===t?e>12?e:e+12:"\u0938\u093e\u0902\u091c\u0947"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"\u0930\u093e\u0924\u0940":e<12?"\u0938\u0915\u093e\u0933\u0940\u0902":e<16?"\u0926\u0928\u092a\u093e\u0930\u093e\u0902":e<20?"\u0938\u093e\u0902\u091c\u0947":"\u0930\u093e\u0924\u0940"}})}(n("wd/R"))},rB9j:function(e,t,n){"use strict";var i=n("I+eb"),r=n("kmMV");i({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},rKzb:function(e,t,n){"use strict";var i=n("4syw"),r=n("8YOa").getWeakData,s=n("glrk"),o=n("hh1v"),a=n("GarU"),c=n("ImZN"),l=n("tycR"),u=n("UTVS"),d=n("afO8"),h=d.set,f=d.getterFor,p=l.find,m=l.findIndex,b=0,g=function(e){return e.frozen||(e.frozen=new _)},_=function(){this.entries=[]},y=function(e,t){return p(e.entries,(function(e){return e[0]===t}))};_.prototype={get:function(e){var t=y(this,e);if(t)return t[1]},has:function(e){return!!y(this,e)},set:function(e,t){var n=y(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=m(this.entries,(function(t){return t[0]===e}));return~t&&this.entries.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,l){var d=e((function(e,i){a(e,d,t),h(e,{type:t,id:b++,frozen:void 0}),null!=i&&c(i,e[l],{that:e,AS_ENTRIES:n})})),p=f(t),m=function(e,t,n){var i=p(e),o=r(s(t),!0);return!0===o?g(i).set(t,n):o[i.id]=n,e};return i(d.prototype,{delete:function(e){var t=p(this);if(!o(e))return!1;var n=r(e);return!0===n?g(t).delete(e):n&&u(n,t.id)&&delete n[t.id]},has:function(e){var t=p(this);if(!o(e))return!1;var n=r(e);return!0===n?g(t).has(e):n&&u(n,t.id)}}),i(d.prototype,n?{get:function(e){var t=p(this);if(o(e)){var n=r(e);return!0===n?g(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return m(this,e,t)}}:{add:function(e){return m(this,e,!0)}}),d}}},rW0t:function(e,t,n){"use strict";var i=n("glrk");e.exports=function(){var e=i(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},raLr:function(e,t,n){!function(e){"use strict";function t(e,t,n){return"m"===n?t?"\u0445\u0432\u0438\u043b\u0438\u043d\u0430":"\u0445\u0432\u0438\u043b\u0438\u043d\u0443":"h"===n?t?"\u0433\u043e\u0434\u0438\u043d\u0430":"\u0433\u043e\u0434\u0438\u043d\u0443":e+" "+(i=+e,r={ss:t?"\u0441\u0435\u043a\u0443\u043d\u0434\u0430_\u0441\u0435\u043a\u0443\u043d\u0434\u0438_\u0441\u0435\u043a\u0443\u043d\u0434":"\u0441\u0435\u043a\u0443\u043d\u0434\u0443_\u0441\u0435\u043a\u0443\u043d\u0434\u0438_\u0441\u0435\u043a\u0443\u043d\u0434",mm:t?"\u0445\u0432\u0438\u043b\u0438\u043d\u0430_\u0445\u0432\u0438\u043b\u0438\u043d\u0438_\u0445\u0432\u0438\u043b\u0438\u043d":"\u0445\u0432\u0438\u043b\u0438\u043d\u0443_\u0445\u0432\u0438\u043b\u0438\u043d\u0438_\u0445\u0432\u0438\u043b\u0438\u043d",hh:t?"\u0433\u043e\u0434\u0438\u043d\u0430_\u0433\u043e\u0434\u0438\u043d\u0438_\u0433\u043e\u0434\u0438\u043d":"\u0433\u043e\u0434\u0438\u043d\u0443_\u0433\u043e\u0434\u0438\u043d\u0438_\u0433\u043e\u0434\u0438\u043d",dd:"\u0434\u0435\u043d\u044c_\u0434\u043d\u0456_\u0434\u043d\u0456\u0432",MM:"\u043c\u0456\u0441\u044f\u0446\u044c_\u043c\u0456\u0441\u044f\u0446\u0456_\u043c\u0456\u0441\u044f\u0446\u0456\u0432",yy:"\u0440\u0456\u043a_\u0440\u043e\u043a\u0438_\u0440\u043e\u043a\u0456\u0432"}[n].split("_"),i%10==1&&i%100!=11?r[0]:i%10>=2&&i%10<=4&&(i%100<10||i%100>=20)?r[1]:r[2]);var i,r}function n(e){return function(){return e+"\u043e"+(11===this.hours()?"\u0431":"")+"] LT"}}e.defineLocale("uk",{months:{format:"\u0441\u0456\u0447\u043d\u044f_\u043b\u044e\u0442\u043e\u0433\u043e_\u0431\u0435\u0440\u0435\u0437\u043d\u044f_\u043a\u0432\u0456\u0442\u043d\u044f_\u0442\u0440\u0430\u0432\u043d\u044f_\u0447\u0435\u0440\u0432\u043d\u044f_\u043b\u0438\u043f\u043d\u044f_\u0441\u0435\u0440\u043f\u043d\u044f_\u0432\u0435\u0440\u0435\u0441\u043d\u044f_\u0436\u043e\u0432\u0442\u043d\u044f_\u043b\u0438\u0441\u0442\u043e\u043f\u0430\u0434\u0430_\u0433\u0440\u0443\u0434\u043d\u044f".split("_"),standalone:"\u0441\u0456\u0447\u0435\u043d\u044c_\u043b\u044e\u0442\u0438\u0439_\u0431\u0435\u0440\u0435\u0437\u0435\u043d\u044c_\u043a\u0432\u0456\u0442\u0435\u043d\u044c_\u0442\u0440\u0430\u0432\u0435\u043d\u044c_\u0447\u0435\u0440\u0432\u0435\u043d\u044c_\u043b\u0438\u043f\u0435\u043d\u044c_\u0441\u0435\u0440\u043f\u0435\u043d\u044c_\u0432\u0435\u0440\u0435\u0441\u0435\u043d\u044c_\u0436\u043e\u0432\u0442\u0435\u043d\u044c_\u043b\u0438\u0441\u0442\u043e\u043f\u0430\u0434_\u0433\u0440\u0443\u0434\u0435\u043d\u044c".split("_")},monthsShort:"\u0441\u0456\u0447_\u043b\u044e\u0442_\u0431\u0435\u0440_\u043a\u0432\u0456\u0442_\u0442\u0440\u0430\u0432_\u0447\u0435\u0440\u0432_\u043b\u0438\u043f_\u0441\u0435\u0440\u043f_\u0432\u0435\u0440_\u0436\u043e\u0432\u0442_\u043b\u0438\u0441\u0442_\u0433\u0440\u0443\u0434".split("_"),weekdays:function(e,t){var n={nominative:"\u043d\u0435\u0434\u0456\u043b\u044f_\u043f\u043e\u043d\u0435\u0434\u0456\u043b\u043e\u043a_\u0432\u0456\u0432\u0442\u043e\u0440\u043e\u043a_\u0441\u0435\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0435\u0440_\u043f\u2019\u044f\u0442\u043d\u0438\u0446\u044f_\u0441\u0443\u0431\u043e\u0442\u0430".split("_"),accusative:"\u043d\u0435\u0434\u0456\u043b\u044e_\u043f\u043e\u043d\u0435\u0434\u0456\u043b\u043e\u043a_\u0432\u0456\u0432\u0442\u043e\u0440\u043e\u043a_\u0441\u0435\u0440\u0435\u0434\u0443_\u0447\u0435\u0442\u0432\u0435\u0440_\u043f\u2019\u044f\u0442\u043d\u0438\u0446\u044e_\u0441\u0443\u0431\u043e\u0442\u0443".split("_"),genitive:"\u043d\u0435\u0434\u0456\u043b\u0456_\u043f\u043e\u043d\u0435\u0434\u0456\u043b\u043a\u0430_\u0432\u0456\u0432\u0442\u043e\u0440\u043a\u0430_\u0441\u0435\u0440\u0435\u0434\u0438_\u0447\u0435\u0442\u0432\u0435\u0440\u0433\u0430_\u043f\u2019\u044f\u0442\u043d\u0438\u0446\u0456_\u0441\u0443\u0431\u043e\u0442\u0438".split("_")};return!0===e?n.nominative.slice(1,7).concat(n.nominative.slice(0,1)):e?n[/(\[[\u0412\u0432\u0423\u0443]\]) ?dddd/.test(t)?"accusative":/\[?(?:\u043c\u0438\u043d\u0443\u043b\u043e\u0457|\u043d\u0430\u0441\u0442\u0443\u043f\u043d\u043e\u0457)? ?\] ?dddd/.test(t)?"genitive":"nominative"][e.day()]:n.nominative},weekdaysShort:"\u043d\u0434_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),weekdaysMin:"\u043d\u0434_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0440.",LLL:"D MMMM YYYY \u0440., HH:mm",LLLL:"dddd, D MMMM YYYY \u0440., HH:mm"},calendar:{sameDay:n("[\u0421\u044c\u043e\u0433\u043e\u0434\u043d\u0456 "),nextDay:n("[\u0417\u0430\u0432\u0442\u0440\u0430 "),lastDay:n("[\u0412\u0447\u043e\u0440\u0430 "),nextWeek:n("[\u0423] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return n("[\u041c\u0438\u043d\u0443\u043b\u043e\u0457] dddd [").call(this);case 1:case 2:case 4:return n("[\u041c\u0438\u043d\u0443\u043b\u043e\u0433\u043e] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"\u0437\u0430 %s",past:"%s \u0442\u043e\u043c\u0443",s:"\u0434\u0435\u043a\u0456\u043b\u044c\u043a\u0430 \u0441\u0435\u043a\u0443\u043d\u0434",ss:t,m:t,mm:t,h:"\u0433\u043e\u0434\u0438\u043d\u0443",hh:t,d:"\u0434\u0435\u043d\u044c",dd:t,M:"\u043c\u0456\u0441\u044f\u0446\u044c",MM:t,y:"\u0440\u0456\u043a",yy:t},meridiemParse:/\u043d\u043e\u0447\u0456|\u0440\u0430\u043d\u043a\u0443|\u0434\u043d\u044f|\u0432\u0435\u0447\u043e\u0440\u0430/,isPM:function(e){return/^(\u0434\u043d\u044f|\u0432\u0435\u0447\u043e\u0440\u0430)$/.test(e)},meridiem:function(e,t,n){return e<4?"\u043d\u043e\u0447\u0456":e<12?"\u0440\u0430\u043d\u043a\u0443":e<17?"\u0434\u043d\u044f":"\u0432\u0435\u0447\u043e\u0440\u0430"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0439|\u0433\u043e)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e+"-\u0439";case"D":return e+"-\u0433\u043e";default:return e}},week:{dow:1,doy:7}})}(n("wd/R"))},rpNk:function(e,t,n){"use strict";var i,r,s,o=n("0Dky"),a=n("4WOD"),c=n("kRJp"),l=n("UTVS"),u=n("tiKp"),d=n("xDBR"),h=u("iterator"),f=!1;[].keys&&("next"in(s=[].keys())?(r=a(a(s)))!==Object.prototype&&(i=r):f=!0);var p=null==i||o((function(){var e={};return i[h].call(e)!==e}));p&&(i={}),d&&!p||l(i,h)||c(i,h,(function(){return this})),e.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:f}},"s+uk":function(e,t,n){!function(e){"use strict";function t(e,t,n,i){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?r[n][0]:r[n][1]}e.defineLocale("de-at",{months:"J\xe4nner_Februar_M\xe4rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"J\xe4n._Feb._M\xe4rz_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},s7LF:function(e,t,n){"use strict";n.d(t,"a",(function(){return fe})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return m})),n.d(t,"d",(function(){return f})),n.d(t,"e",(function(){return be})),n.d(t,"f",(function(){return Ee})),n.d(t,"g",(function(){return Ye})),n.d(t,"h",(function(){return pe})),n.d(t,"i",(function(){return Pe})),n.d(t,"j",(function(){return me})),n.d(t,"k",(function(){return Ce})),n.d(t,"l",(function(){return Le})),n.d(t,"m",(function(){return ze})),n.d(t,"n",(function(){return M})),n.d(t,"o",(function(){return c})),n.d(t,"p",(function(){return g})),n.d(t,"q",(function(){return y})),n.d(t,"r",(function(){return v})),n.d(t,"s",(function(){return ye})),n.d(t,"t",(function(){return xe})),n.d(t,"u",(function(){return H})),n.d(t,"v",(function(){return A})),n.d(t,"w",(function(){return j})),n.d(t,"x",(function(){return $e})),n.d(t,"y",(function(){return Ne})),n.d(t,"z",(function(){return $})),n.d(t,"A",(function(){return D})),n.d(t,"B",(function(){return U})),n.d(t,"C",(function(){return ke}));var i=n("8Y7J"),r=n("SVse"),s=n("cp0P"),o=n("Cfvw"),a=n("lJxs");const c=new i.r("NgValueAccessor"),l={provide:c,useExisting:Object(i.T)(()=>u),multi:!0};let u=(()=>{class e{constructor(e,t){this._renderer=e,this._elementRef=t,this.onChange=e=>{},this.onTouched=()=>{}}writeValue(e){this._renderer.setProperty(this._elementRef.nativeElement,"checked",e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.E),i.Mb(i.m))},e.\u0275dir=i.Hb({type:e,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(e,t){1&e&&i.gc("change",(function(e){return t.onChange(e.target.checked)}))("blur",(function(){return t.onTouched()}))},features:[i.xb([l])]}),e})();const d={provide:c,useExisting:Object(i.T)(()=>f),multi:!0},h=new i.r("CompositionEventMode");let f=(()=>{class e{constructor(e,t,n){this._renderer=e,this._elementRef=t,this._compositionMode=n,this.onChange=e=>{},this.onTouched=()=>{},this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function(){const e=Object(r.L)()?Object(r.L)().getUserAgent():"";return/android (\d+)/.test(e.toLowerCase())}())}writeValue(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==e?"":e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.E),i.Mb(i.m),i.Mb(h,8))},e.\u0275dir=i.Hb({type:e,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,t){1&e&&i.gc("input",(function(e){return t._handleInput(e.target.value)}))("blur",(function(){return t.onTouched()}))("compositionstart",(function(){return t._compositionStart()}))("compositionend",(function(e){return t._compositionEnd(e.target.value)}))},features:[i.xb([d])]}),e})(),p=(()=>{class e{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}reset(e){this.control&&this.control.reset(e)}hasError(e,t){return!!this.control&&this.control.hasError(e,t)}getError(e,t){return this.control?this.control.getError(e,t):null}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=i.Hb({type:e}),e})(),m=(()=>{class e extends p{get formDirective(){return null}get path(){return null}}return e.\u0275fac=function(t){return b(t||e)},e.\u0275dir=i.Hb({type:e,features:[i.vb]}),e})();const b=i.Ub(m);class g extends p{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null,this._rawValidators=[],this._rawAsyncValidators=[]}get validator(){}get asyncValidator(){}}class _{constructor(e){this._cd=e}get ngClassUntouched(){return!!this._cd.control&&this._cd.control.untouched}get ngClassTouched(){return!!this._cd.control&&this._cd.control.touched}get ngClassPristine(){return!!this._cd.control&&this._cd.control.pristine}get ngClassDirty(){return!!this._cd.control&&this._cd.control.dirty}get ngClassValid(){return!!this._cd.control&&this._cd.control.valid}get ngClassInvalid(){return!!this._cd.control&&this._cd.control.invalid}get ngClassPending(){return!!this._cd.control&&this._cd.control.pending}}let y=(()=>{class e extends _{constructor(e){super(e)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(g,2))},e.\u0275dir=i.Hb({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,t){2&e&&i.Eb("ng-untouched",t.ngClassUntouched)("ng-touched",t.ngClassTouched)("ng-pristine",t.ngClassPristine)("ng-dirty",t.ngClassDirty)("ng-valid",t.ngClassValid)("ng-invalid",t.ngClassInvalid)("ng-pending",t.ngClassPending)},features:[i.vb]}),e})(),v=(()=>{class e extends _{constructor(e){super(e)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(m,2))},e.\u0275dir=i.Hb({type:e,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:14,hostBindings:function(e,t){2&e&&i.Eb("ng-untouched",t.ngClassUntouched)("ng-touched",t.ngClassTouched)("ng-pristine",t.ngClassPristine)("ng-dirty",t.ngClassDirty)("ng-valid",t.ngClassValid)("ng-invalid",t.ngClassInvalid)("ng-pending",t.ngClassPending)},features:[i.vb]}),e})();function w(e){return null==e||0===e.length}function S(e){return null!=e&&"number"==typeof e.length}const M=new i.r("NgValidators"),x=new i.r("NgAsyncValidators"),k=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class D{static min(e){return t=>{if(w(t.value)||w(e))return null;const n=parseFloat(t.value);return!isNaN(n)&&n<e?{min:{min:e,actual:t.value}}:null}}static max(e){return t=>{if(w(t.value)||w(e))return null;const n=parseFloat(t.value);return!isNaN(n)&&n>e?{max:{max:e,actual:t.value}}:null}}static required(e){return w(e.value)?{required:!0}:null}static requiredTrue(e){return!0===e.value?null:{required:!0}}static email(e){return w(e.value)||k.test(e.value)?null:{email:!0}}static minLength(e){return t=>w(t.value)||!S(t.value)?null:t.value.length<e?{minlength:{requiredLength:e,actualLength:t.value.length}}:null}static maxLength(e){return t=>S(t.value)&&t.value.length>e?{maxlength:{requiredLength:e,actualLength:t.value.length}}:null}static pattern(e){if(!e)return D.nullValidator;let t,n;return"string"==typeof e?(n="","^"!==e.charAt(0)&&(n+="^"),n+=e,"$"!==e.charAt(e.length-1)&&(n+="$"),t=new RegExp(n)):(n=e.toString(),t=e),e=>{if(w(e.value))return null;const i=e.value;return t.test(i)?null:{pattern:{requiredPattern:n,actualValue:i}}}}static nullValidator(e){return null}static compose(e){if(!e)return null;const t=e.filter(T);return 0==t.length?null:function(e){return O(L(e,t))}}static composeAsync(e){if(!e)return null;const t=e.filter(T);return 0==t.length?null:function(e){const n=L(e,t).map(C);return Object(s.a)(n).pipe(Object(a.a)(O))}}}function T(e){return null!=e}function C(e){const t=Object(i.qb)(e)?Object(o.a)(e):e;return Object(i.pb)(t),t}function O(e){let t={};return e.forEach(e=>{t=null!=e?Object.assign(Object.assign({},t),e):t}),0===Object.keys(t).length?null:t}function L(e,t){return t.map(t=>t(e))}function R(e){return e.map(e=>function(e){return!e.validate}(e)?e:t=>e.validate(t))}const E={provide:c,useExisting:Object(i.T)(()=>A),multi:!0};let A=(()=>{class e{constructor(e,t){this._renderer=e,this._elementRef=t,this.onChange=e=>{},this.onTouched=()=>{}}writeValue(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==e?"":e)}registerOnChange(e){this.onChange=t=>{e(""==t?null:parseFloat(t))}}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.E),i.Mb(i.m))},e.\u0275dir=i.Hb({type:e,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,t){1&e&&i.gc("input",(function(e){return t.onChange(e.target.value)}))("blur",(function(){return t.onTouched()}))},features:[i.xb([E])]}),e})();const I={provide:c,useExisting:Object(i.T)(()=>j),multi:!0};let P=(()=>{class e{constructor(){this._accessors=[]}add(e,t){this._accessors.push([e,t])}remove(e){for(let t=this._accessors.length-1;t>=0;--t)if(this._accessors[t][1]===e)return void this._accessors.splice(t,1)}select(e){this._accessors.forEach(t=>{this._isSameGroup(t,e)&&t[1]!==e&&t[1].fireUncheck(e.value)})}_isSameGroup(e,t){return!!e[0].control&&e[0]._parent===t._control._parent&&e[1].name===t.name}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})(),j=(()=>{class e{constructor(e,t,n,i){this._renderer=e,this._elementRef=t,this._registry=n,this._injector=i,this.onChange=()=>{},this.onTouched=()=>{}}ngOnInit(){this._control=this._injector.get(g),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}fireUncheck(e){this.writeValue(e)}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}_checkName(){!this.name&&this.formControlName&&(this.name=this.formControlName)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.E),i.Mb(i.m),i.Mb(P),i.Mb(i.s))},e.\u0275dir=i.Hb({type:e,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(e,t){1&e&&i.gc("change",(function(){return t.onChange()}))("blur",(function(){return t.onTouched()}))},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[i.xb([I])]}),e})();const N={provide:c,useExisting:Object(i.T)(()=>F),multi:!0};let F=(()=>{class e{constructor(e,t){this._renderer=e,this._elementRef=t,this.onChange=e=>{},this.onTouched=()=>{}}writeValue(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(e))}registerOnChange(e){this.onChange=t=>{e(""==t?null:parseFloat(t))}}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.E),i.Mb(i.m))},e.\u0275dir=i.Hb({type:e,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(e,t){1&e&&i.gc("change",(function(e){return t.onChange(e.target.value)}))("input",(function(e){return t.onChange(e.target.value)}))("blur",(function(){return t.onTouched()}))},features:[i.xb([N])]}),e})();const Y={provide:c,useExisting:Object(i.T)(()=>$),multi:!0};function z(e,t){return null==e?""+t:(t&&"object"==typeof t&&(t="Object"),`${e}: ${t}`.slice(0,50))}let $=(()=>{class e{constructor(e,t){this._renderer=e,this._elementRef=t,this._optionMap=new Map,this._idCounter=0,this.onChange=e=>{},this.onTouched=()=>{},this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;const t=this._getOptionId(e);null==t&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);const n=z(t,e);this._renderer.setProperty(this._elementRef.nativeElement,"value",n)}registerOnChange(e){this.onChange=t=>{this.value=this._getOptionValue(t),e(this.value)}}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(const t of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(t),e))return t;return null}_getOptionValue(e){const t=function(e){return e.split(":")[0]}(e);return this._optionMap.has(t)?this._optionMap.get(t):e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.E),i.Mb(i.m))},e.\u0275dir=i.Hb({type:e,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(e,t){1&e&&i.gc("change",(function(e){return t.onChange(e.target.value)}))("blur",(function(){return t.onTouched()}))},inputs:{compareWith:"compareWith"},features:[i.xb([Y])]}),e})(),H=(()=>{class e{constructor(e,t,n){this._element=e,this._renderer=t,this._select=n,this._select&&(this.id=this._select._registerOption())}set ngValue(e){null!=this._select&&(this._select._optionMap.set(this.id,e),this._setElementValue(z(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(i.E),i.Mb($,9))},e.\u0275dir=i.Hb({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),e})();const W={provide:c,useExisting:Object(i.T)(()=>B),multi:!0};function V(e,t){return null==e?""+t:("string"==typeof t&&(t=`'${t}'`),t&&"object"==typeof t&&(t="Object"),`${e}: ${t}`.slice(0,50))}let B=(()=>{class e{constructor(e,t){this._renderer=e,this._elementRef=t,this._optionMap=new Map,this._idCounter=0,this.onChange=e=>{},this.onTouched=()=>{},this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){let t;if(this.value=e,Array.isArray(e)){const n=e.map(e=>this._getOptionId(e));t=(e,t)=>{e._setSelected(n.indexOf(t.toString())>-1)}}else t=(e,t)=>{e._setSelected(!1)};this._optionMap.forEach(t)}registerOnChange(e){this.onChange=t=>{const n=[];if(void 0!==t.selectedOptions){const e=t.selectedOptions;for(let t=0;t<e.length;t++){const i=e.item(t),r=this._getOptionValue(i.value);n.push(r)}}else{const e=t.options;for(let t=0;t<e.length;t++){const i=e.item(t);if(i.selected){const e=this._getOptionValue(i.value);n.push(e)}}}this.value=n,e(n)}}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}_registerOption(e){const t=(this._idCounter++).toString();return this._optionMap.set(t,e),t}_getOptionId(e){for(const t of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(t)._value,e))return t;return null}_getOptionValue(e){const t=function(e){return e.split(":")[0]}(e);return this._optionMap.has(t)?this._optionMap.get(t)._value:e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.E),i.Mb(i.m))},e.\u0275dir=i.Hb({type:e,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(e,t){1&e&&i.gc("change",(function(e){return t.onChange(e.target)}))("blur",(function(){return t.onTouched()}))},inputs:{compareWith:"compareWith"},features:[i.xb([W])]}),e})(),U=(()=>{class e{constructor(e,t,n){this._element=e,this._renderer=t,this._select=n,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){null!=this._select&&(this._value=e,this._setElementValue(V(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(V(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(i.E),i.Mb(B,9))},e.\u0275dir=i.Hb({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),e})();function q(e,t){return[...t.path,e]}function G(e,t){e.validator=D.compose([e.validator,t.validator]),e.asyncValidator=D.composeAsync([e.asyncValidator,t.asyncValidator]),t.valueAccessor.writeValue(e.value),function(e,t){t.valueAccessor.registerOnChange(n=>{e._pendingValue=n,e._pendingChange=!0,e._pendingDirty=!0,"change"===e.updateOn&&J(e,t)})}(e,t),function(e,t){e.registerOnChange((e,n)=>{t.valueAccessor.writeValue(e),n&&t.viewToModelUpdate(e)})}(e,t),function(e,t){t.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,"blur"===e.updateOn&&e._pendingChange&&J(e,t),"submit"!==e.updateOn&&e.markAsTouched()})}(e,t),t.valueAccessor.setDisabledState&&e.registerOnDisabledChange(e=>{t.valueAccessor.setDisabledState(e)}),t._rawValidators.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(()=>e.updateValueAndValidity())}),t._rawAsyncValidators.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(()=>e.updateValueAndValidity())})}function J(e,t){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function Q(e,t){e.validator=D.compose([e.validator,t.validator]),e.asyncValidator=D.composeAsync([e.asyncValidator,t.asyncValidator])}function K(e){return null!=e?D.compose(R(e)):null}function Z(e){return null!=e?D.composeAsync(R(e)):null}function X(e,t){if(!e.hasOwnProperty("model"))return!1;const n=e.model;return!!n.isFirstChange()||!Object.is(t,n.currentValue)}const ee=[u,F,A,$,B,j];function te(e,t){e._syncPendingControls(),t.forEach(e=>{const t=e.control;"submit"===t.updateOn&&t._pendingChange&&(e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1)})}function ne(e,t){if(!t)return null;Array.isArray(t);let n=void 0,i=void 0,r=void 0;return t.forEach(e=>{var t;e.constructor===f?n=e:(t=e,ee.some(e=>t.constructor===e)?i=e:r=e)}),r||i||n||null}function ie(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const re="VALID",se="INVALID",oe="PENDING",ae="DISABLED";function ce(e){return(he(e)?e.validators:e)||null}function le(e){return Array.isArray(e)?K(e):e||null}function ue(e,t){return(he(t)?t.asyncValidators:e)||null}function de(e){return Array.isArray(e)?Z(e):e||null}function he(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}class fe{constructor(e,t){this._hasOwnPendingAsyncValidator=!1,this._onCollectionChange=()=>{},this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=e,this._rawAsyncValidators=t,this._composedValidatorFn=le(this._rawValidators),this._composedAsyncValidatorFn=de(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get valid(){return this.status===re}get invalid(){return this.status===se}get pending(){return this.status==oe}get disabled(){return this.status===ae}get enabled(){return this.status!==ae}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._rawValidators=e,this._composedValidatorFn=le(e)}setAsyncValidators(e){this._rawAsyncValidators=e,this._composedAsyncValidatorFn=de(e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(e=>e.markAllAsTouched())}markAsUntouched(e={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}markAsDirty(e={}){this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)}markAsPristine(e={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}markAsPending(e={}){this.status=oe,!1!==e.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!e.onlySelf&&this._parent.markAsPending(e)}disable(e={}){const t=this._parentMarkedDirty(e.onlySelf);this.status=ae,this.errors=null,this._forEachChild(t=>{t.disable(Object.assign(Object.assign({},e),{onlySelf:!0}))}),this._updateValue(),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},e),{skipPristineCheck:t})),this._onDisabledChange.forEach(e=>e(!0))}enable(e={}){const t=this._parentMarkedDirty(e.onlySelf);this.status=re,this._forEachChild(t=>{t.enable(Object.assign(Object.assign({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},e),{skipPristineCheck:t})),this._onDisabledChange.forEach(e=>e(!1))}_updateAncestors(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(e){this._parent=e}updateValueAndValidity(e={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),this.status!==re&&this.status!==oe||this._runAsyncValidator(e.emitEvent)),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?ae:re}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e){if(this.asyncValidator){this.status=oe,this._hasOwnPendingAsyncValidator=!0;const t=C(this.asyncValidator(this));this._asyncValidationSubscription=t.subscribe(t=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(t,{emitEvent:e})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(!1!==t.emitEvent)}get(e){return function(e,t,n){if(null==t)return null;if(Array.isArray(t)||(t=t.split(".")),Array.isArray(t)&&0===t.length)return null;let i=e;return t.forEach(e=>{i=i instanceof me?i.controls.hasOwnProperty(e)?i.controls[e]:null:i instanceof be&&i.at(e)||null}),i}(this,e)}getError(e,t){const n=t?this.get(t):this;return n&&n.errors?n.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)}_initObservables(){this.valueChanges=new i.o,this.statusChanges=new i.o}_calculateStatus(){return this._allControlsDisabled()?ae:this.errors?se:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(oe)?oe:this._anyControlsHaveStatus(se)?se:re}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e={}){this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}_updateTouched(e={}){this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}_isBoxedValue(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){he(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&this._parent&&this._parent.dirty&&!this._parent._anyControlsDirty()}}class pe extends fe{constructor(e=null,t,n){super(ce(t),ue(n,t)),this._onChange=[],this._applyFormState(e),this._setUpdateStrategy(t),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),this._initObservables()}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&!1!==t.emitModelToViewChange&&this._onChange.forEach(e=>e(this.value,!1!==t.emitViewToModelChange)),this.updateValueAndValidity(t)}patchValue(e,t={}){this.setValue(e,t)}reset(e=null,t={}){this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_clearChangeFns(){this._onChange=[],this._onDisabledChange=[],this._onCollectionChange=()=>{}}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_forEachChild(e){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(e){this._isBoxedValue(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}}class me extends fe{constructor(e,t,n){super(ce(t),ue(n,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}registerControl(e,t){return this.controls[e]?this.controls[e]:(this.controls[e]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(e,t){this.registerControl(e,t),this.updateValueAndValidity(),this._onCollectionChange()}removeControl(e){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity(),this._onCollectionChange()}setControl(e,t){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],t&&this.registerControl(e,t),this.updateValueAndValidity(),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,t={}){this._checkAllValuesPresent(e),Object.keys(e).forEach(n=>{this._throwIfControlMissing(n),this.controls[n].setValue(e[n],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){Object.keys(e).forEach(n=>{this.controls[n]&&this.controls[n].patchValue(e[n],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}reset(e={},t={}){this._forEachChild((n,i)=>{n.reset(e[i],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(e,t,n)=>(e[n]=t instanceof pe?t.value:t.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(e,t)=>!!t._syncPendingControls()||e);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_throwIfControlMissing(e){if(!Object.keys(this.controls).length)throw new Error("\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.controls[e])throw new Error(`Cannot find form control with name: ${e}.`)}_forEachChild(e){Object.keys(this.controls).forEach(t=>e(this.controls[t],t))}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(const t of Object.keys(this.controls)){const n=this.controls[t];if(this.contains(t)&&e(n))return!0}return!1}_reduceValue(){return this._reduceChildren({},(e,t,n)=>((t.enabled||this.disabled)&&(e[n]=t.value),e))}_reduceChildren(e,t){let n=e;return this._forEachChild((e,i)=>{n=t(n,e,i)}),n}_allControlsDisabled(){for(const e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_checkAllValuesPresent(e){this._forEachChild((t,n)=>{if(void 0===e[n])throw new Error(`Must supply a value for form control with name: '${n}'.`)})}}class be extends fe{constructor(e,t,n){super(ce(t),ue(n,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}at(e){return this.controls[e]}push(e){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity(),this._onCollectionChange()}insert(e,t){this.controls.splice(e,0,t),this._registerControl(t),this.updateValueAndValidity()}removeAt(e){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),this.controls.splice(e,1),this.updateValueAndValidity()}setControl(e,t){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),this.controls.splice(e,1),t&&(this.controls.splice(e,0,t),this._registerControl(t)),this.updateValueAndValidity(),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,t={}){this._checkAllValuesPresent(e),e.forEach((e,n)=>{this._throwIfControlMissing(n),this.at(n).setValue(e,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){e.forEach((e,n)=>{this.at(n)&&this.at(n).patchValue(e,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}reset(e=[],t={}){this._forEachChild((n,i)=>{n.reset(e[i],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this.controls.map(e=>e instanceof pe?e.value:e.getRawValue())}clear(){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity())}_syncPendingControls(){let e=this.controls.reduce((e,t)=>!!t._syncPendingControls()||e,!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_throwIfControlMissing(e){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(e))throw new Error("Cannot find form control at index "+e)}_forEachChild(e){this.controls.forEach((t,n)=>{e(t,n)})}_updateValue(){this.value=this.controls.filter(e=>e.enabled||this.disabled).map(e=>e.value)}_anyControls(e){return this.controls.some(t=>t.enabled&&e(t))}_setUpControls(){this._forEachChild(e=>this._registerControl(e))}_checkAllValuesPresent(e){this._forEachChild((t,n)=>{if(void 0===e[n])throw new Error(`Must supply a value for form control at index: ${n}.`)})}_allControlsDisabled(){for(const e of this.controls)if(e.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}}const ge={provide:m,useExisting:Object(i.T)(()=>ye)},_e=(()=>Promise.resolve(null))();let ye=(()=>{class e extends m{constructor(e,t){super(),this.submitted=!1,this._directives=[],this.ngSubmit=new i.o,this.form=new me({},K(e),Z(t))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){_e.then(()=>{const t=this._findContainer(e.path);e.control=t.registerControl(e.name,e.control),G(e.control,e),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.push(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){_e.then(()=>{const t=this._findContainer(e.path);t&&t.removeControl(e.name),ie(this._directives,e)})}addFormGroup(e){_e.then(()=>{const t=this._findContainer(e.path),n=new me({});Q(n,e),t.registerControl(e.name,n),n.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){_e.then(()=>{const t=this._findContainer(e.path);t&&t.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,t){_e.then(()=>{this.form.get(e.path).setValue(t)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,te(this.form,this._directives),this.ngSubmit.emit(e),!1}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(M,10),i.Mb(x,10))},e.\u0275dir=i.Hb({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,t){1&e&&i.gc("submit",(function(e){return t.onSubmit(e)}))("reset",(function(){return t.onReset()}))},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[i.xb([ge]),i.vb]}),e})(),ve=(()=>{class e extends m{ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return q(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}get validator(){return K(this._validators)}get asyncValidator(){return Z(this._asyncValidators)}_checkParentType(){}}return e.\u0275fac=function(t){return we(t||e)},e.\u0275dir=i.Hb({type:e,features:[i.vb]}),e})();const we=i.Ub(ve),Se={provide:g,useExisting:Object(i.T)(()=>xe)},Me=(()=>Promise.resolve(null))();let xe=(()=>{class e extends g{constructor(e,t,n,r){super(),this.control=new pe,this._registered=!1,this.update=new i.o,this._parent=e,this._rawValidators=t||[],this._rawAsyncValidators=n||[],this.valueAccessor=ne(0,r)}ngOnChanges(e){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in e&&this._updateDisabled(e),X(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._parent?q(this.name,this._parent):[this.name]}get formDirective(){return this._parent?this._parent.formDirective:null}get validator(){return K(this._rawValidators)}get asyncValidator(){return Z(this._rawAsyncValidators)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){G(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(e){Me.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1})})}_updateDisabled(e){const t=e.isDisabled.currentValue,n=""===t||t&&"false"!==t;Me.then(()=>{n&&!this.control.disabled?this.control.disable():!n&&this.control.disabled&&this.control.enable()})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(m,9),i.Mb(M,10),i.Mb(x,10),i.Mb(c,10))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[i.xb([Se]),i.vb,i.wb]}),e})(),ke=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=i.Hb({type:e,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),e})();const De=new i.r("NgModelWithFormControlWarning"),Te={provide:m,useExisting:Object(i.T)(()=>Ce)};let Ce=(()=>{class e extends m{constructor(e,t){super(),this._validators=e,this._asyncValidators=t,this.submitted=!1,this.directives=[],this.form=null,this.ngSubmit=new i.o}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations())}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){const t=this.form.get(e.path);return G(t,e),t.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),t}getControl(e){return this.form.get(e.path)}removeControl(e){ie(this.directives,e)}addFormGroup(e){const t=this.form.get(e.path);Q(t,e),t.updateValueAndValidity({emitEvent:!1})}removeFormGroup(e){}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){const t=this.form.get(e.path);Q(t,e),t.updateValueAndValidity({emitEvent:!1})}removeFormArray(e){}getFormArray(e){return this.form.get(e.path)}updateModel(e,t){this.form.get(e.path).setValue(t)}onSubmit(e){return this.submitted=!0,te(this.form,this.directives),this.ngSubmit.emit(e),!1}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{const t=this.form.get(e.path);e.control!==t&&(function(e,t){const n=()=>{};t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n),t._rawValidators.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(null)}),t._rawAsyncValidators.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(null)}),e&&e._clearChangeFns()}(e.control,e),t&&G(t,e),e.control=t)}),this.form._updateTreeValidity({emitEvent:!1})}_updateRegistrations(){this.form._registerOnCollectionChange(()=>this._updateDomValue()),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{}),this._oldForm=this.form}_updateValidators(){const e=K(this._validators);this.form.validator=D.compose([this.form.validator,e]);const t=Z(this._asyncValidators);this.form.asyncValidator=D.composeAsync([this.form.asyncValidator,t])}_checkFormPresent(){}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(M,10),i.Mb(x,10))},e.\u0275dir=i.Hb({type:e,selectors:[["","formGroup",""]],hostBindings:function(e,t){1&e&&i.gc("submit",(function(e){return t.onSubmit(e)}))("reset",(function(){return t.onReset()}))},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[i.xb([Te]),i.vb,i.wb]}),e})();const Oe={provide:m,useExisting:Object(i.T)(()=>Le)};let Le=(()=>{class e extends ve{constructor(e,t,n){super(),this._parent=e,this._validators=t,this._asyncValidators=n}_checkParentType(){Ae(this._parent)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(m,13),i.Mb(M,10),i.Mb(x,10))},e.\u0275dir=i.Hb({type:e,selectors:[["","formGroupName",""]],inputs:{name:["formGroupName","name"]},features:[i.xb([Oe]),i.vb]}),e})();const Re={provide:m,useExisting:Object(i.T)(()=>Ee)};let Ee=(()=>{class e extends m{constructor(e,t,n){super(),this._parent=e,this._validators=t,this._asyncValidators=n}ngOnInit(){this._checkParentType(),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return q(null==this.name?this.name:this.name.toString(),this._parent)}get validator(){return K(this._validators)}get asyncValidator(){return Z(this._asyncValidators)}_checkParentType(){Ae(this._parent)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(m,13),i.Mb(M,10),i.Mb(x,10))},e.\u0275dir=i.Hb({type:e,selectors:[["","formArrayName",""]],inputs:{name:["formArrayName","name"]},features:[i.xb([Re]),i.vb]}),e})();function Ae(e){return!(e instanceof Le||e instanceof Ce||e instanceof Ee)}const Ie={provide:g,useExisting:Object(i.T)(()=>Pe)};let Pe=(()=>{class e extends g{constructor(e,t,n,r,s){super(),this._ngModelWarningConfig=s,this._added=!1,this.update=new i.o,this._ngModelWarningSent=!1,this._parent=e,this._rawValidators=t||[],this._rawAsyncValidators=n||[],this.valueAccessor=ne(0,r)}set isDisabled(e){}ngOnChanges(t){var n,r;this._added||this._setUpControl(),X(t,this.viewModel)&&(n=e,this,r=this._ngModelWarningConfig,Object(i.U)()&&"never"!==r&&((null!==r&&"once"!==r||n._ngModelWarningSentOnce)&&("always"!==r||this._ngModelWarningSent)||(n._ngModelWarningSentOnce=!0,this._ngModelWarningSent=!0)),this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return q(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}get validator(){return K(this._rawValidators)}get asyncValidator(){return Z(this._rawAsyncValidators)}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(m,13),i.Mb(M,10),i.Mb(x,10),i.Mb(c,10),i.Mb(De,8))},e.\u0275dir=i.Hb({type:e,selectors:[["","formControlName",""]],inputs:{isDisabled:["disabled","isDisabled"],name:["formControlName","name"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[i.xb([Ie]),i.vb,i.wb]}),e._ngModelWarningSentOnce=!1,e})();const je={provide:M,useExisting:Object(i.T)(()=>Ne),multi:!0};let Ne=(()=>{class e{constructor(){this._required=!1}get required(){return this._required}set required(e){this._required=null!=e&&!1!==e&&""+e!="false",this._onChange&&this._onChange()}validate(e){return this.required?D.required(e):null}registerOnValidatorChange(e){this._onChange=e}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=i.Hb({type:e,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(e,t){2&e&&i.zb("required",t.required?"":null)},inputs:{required:"required"},features:[i.xb([je])]}),e})(),Fe=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)}}),e})(),Ye=(()=>{class e{group(e,t=null){const n=this._reduceControls(e);let i=null,r=null,s=void 0;return null!=t&&(function(e){return void 0!==e.asyncValidators||void 0!==e.validators||void 0!==e.updateOn}(t)?(i=null!=t.validators?t.validators:null,r=null!=t.asyncValidators?t.asyncValidators:null,s=null!=t.updateOn?t.updateOn:void 0):(i=null!=t.validator?t.validator:null,r=null!=t.asyncValidator?t.asyncValidator:null)),new me(n,{asyncValidators:r,updateOn:s,validators:i})}control(e,t,n){return new pe(e,t,n)}array(e,t,n){const i=e.map(e=>this._createControl(e));return new be(i,t,n)}_reduceControls(e){const t={};return Object.keys(e).forEach(n=>{t[n]=this._createControl(e[n])}),t}_createControl(e){return e instanceof pe||e instanceof me||e instanceof be?e:Array.isArray(e)?this.control(e[0],e.length>1?e[1]:null,e.length>2?e[2]:null):this.control(e)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})(),ze=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},providers:[P],imports:[Fe]}),e})(),$e=(()=>{class e{static withConfig(t){return{ngModule:e,providers:[{provide:De,useValue:t.warnOnNgModelWithFormControl}]}}}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},providers:[Ye,P],imports:[Fe]}),e})()},sEFX:function(e,t,n){"use strict";var i=n("AO7/"),r=n("9d/t");e.exports=i?{}.toString:function(){return"[object "+r(this)+"]"}},sMBO:function(e,t,n){var i=n("g6v/"),r=n("m/L8").f,s=Function.prototype,o=s.toString,a=/^\s*function ([^ (]*)/,c="name";i&&!(c in s)&&r(s,c,{configurable:!0,get:function(){try{return o.call(this).match(a)[1]}catch(e){return""}}})},sVev:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const i=(()=>{function e(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return e.prototype=Object.create(Error.prototype),e})()},sb0X:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var i=n("8Y7J"),r=n("s7LF"),s=n("LvDl"),o=n.n(s),a=n("oxzT"),c=n("ANnk"),l=n("SVse");const u=function(e,t){return[e,t]};function d(e,t){if(1&e&&(i.Sb(0,"span"),i.Nb(1,"i",2),i.Rb()),2&e){const e=i.ic();i.yb(1),i.pc("ngClass",i.vc(1,u,e.icons.spinner,e.icons.spin))}}const h=["*"];let f=(()=>{class e{constructor(e){this.elRef=e,this.type="submit",this.disabled=!1,this.submitAction=new i.o,this.loading=!1,this.icons=a.a}ngOnInit(){this.form.statusChanges.subscribe(()=>{o.a.has(this.form.errors,"cdSubmitButton")&&(this.loading=!1,o.a.unset(this.form.errors,"cdSubmitButton"),this.form instanceof r.a&&this.form.updateValueAndValidity())})}submit(e){this.focusButton(),this.form instanceof r.k&&this.form.onSubmit(e),this.form.invalid?this.focusInvalid():(this.loading=!0,this.submitAction.emit())}focusButton(){this.elRef.nativeElement.offsetParent.querySelector(`button[type="${this.type}"]`).focus()}focusInvalid(){const e=this.elRef.nativeElement.offsetParent.querySelector("input.ng-invalid, select.ng-invalid");e&&e.focus()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-submit-button"]],inputs:{form:"form",type:"type",disabled:"disabled",btnClass:"btnClass"},outputs:{submitAction:"submitAction"},ngContentSelectors:h,decls:3,vars:4,consts:[[1,"btn","btn-accent","tc_submitButton",3,"type","ngClass","disabled","click"],[4,"ngIf"],[3,"ngClass"]],template:function(e,t){1&e&&(i.oc(),i.Sb(0,"button",0),i.gc("click",(function(e){return t.submit(e)})),i.nc(1),i.Mc(2,d,2,4,"span",1),i.Rb()),2&e&&(i.pc("type",t.type)("ngClass",t.btnClass)("disabled",t.loading||t.disabled),i.yb(2),i.pc("ngIf",t.loading))},directives:[c.a,l.p,l.r],styles:[""]}),e})()},sne2:function(e,t,n){"use strict";n.d(t,"c",(function(){return s})),n.d(t,"e",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return c})),n.d(t,"d",(function(){return l}));var i=n("AytR"),r=n("8Y7J");let s=(()=>{class e{}return e.organization="ceph",e.projectName="Ceph Dashboard",e.license="Free software (LGPL 2.1).",e.copyright="Copyright(c) "+i.a.year+" Ceph contributors.",e})();var o=function(e){return e.CREATE="create",e.EDIT="edit",e.UPDATE="update",e.REMOVE="remove",e.DELETE="delete",e.ADD="add",e.COPY="copy",e.CLONE="clone",e.RECREATE="recreate",e.EXPIRE="expire",e}({}),a=function(e){return e.CREATE="Create",e.DELETE="Delete",e.ADD="Add",e.REMOVE="Remove",e.EDIT="Edit",e.CANCEL="Cancel",e.COPY="Copy",e.CLONE="Clone",e.UPDATE="Update",e.EVICT="Evict",e.SHOW="Show",e.RECREATE="Recreate",e.EXPIRE="Expire",e}({});let c=(()=>{class e{constructor(){this.CREATE="Create",this.DELETE="Delete",this.ADD="Add",this.SET="Set",this.SUBMIT="Submit",this.REMOVE="Remove",this.UNSET="Unset",this.EDIT="Edit",this.UPDATE="Update",this.CANCEL="Cancel",this.PREVIEW="Preview",this.MOVE="Move",this.NEXT="Next",this.BACK="Back",this.CLONE="Clone",this.COPY="Copy",this.DEEP_SCRUB="Deep Scrub",this.DESTROY="Destroy",this.EVICT="Evict",this.FLATTEN="Flatten",this.MARK_DOWN="Mark Down",this.MARK_IN="Mark In",this.MARK_LOST="Mark Lost",this.MARK_OUT="Mark Out",this.PROTECT="Protect",this.PURGE="Purge",this.RENAME="Rename",this.RESTORE="Restore",this.REWEIGHT="Reweight",this.ROLLBACK="Rollback",this.SCRUB="Scrub",this.SHOW="Show",this.TRASH="Move to Trash",this.UNPROTECT="Unprotect",this.CHANGE="Change",this.FLAGS="Flags",this.ENTER_MAINTENANCE="Enter Maintenance",this.EXIT_MAINTENANCE="Exit Maintenance",this.RECREATE="Recreate",this.EXPIRE="Expire"}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=r.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),l=(()=>{class e{constructor(){this.CREATED="Created",this.DELETED="Deleted",this.ADDED="Added",this.REMOVED="Removed",this.EDITED="Edited",this.CANCELED="Canceled",this.PREVIEWED="Previewed",this.MOVED="Moved",this.CLONED="Cloned",this.COPIED="Copied",this.DEEP_SCRUBBED="Deep Scrubbed",this.DESTROYED="Destroyed",this.FLATTENED="Flattened",this.MARKED_DOWN="Marked Down",this.MARKED_IN="Marked In",this.MARKED_LOST="Marked Lost",this.MARKED_OUT="Marked Out",this.PROTECTED="Protected",this.PURGED="Purged",this.RENAMED="Renamed",this.RESTORED="Restored",this.REWEIGHTED="Reweighted",this.ROLLED_BACK="Rolled back",this.SCRUBBED="Scrubbed",this.SHOWED="Showed",this.TRASHED="Moved to Trash",this.UNPROTECTED="Unprotected",this.CHANGE="Change",this.RECREATED="Recreated",this.EXPIRED="Expired"}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=r.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},sp3z:function(e,t,n){!function(e){"use strict";e.defineLocale("lo",{months:"\u0ea1\u0eb1\u0e87\u0e81\u0ead\u0e99_\u0e81\u0eb8\u0ea1\u0e9e\u0eb2_\u0ea1\u0eb5\u0e99\u0eb2_\u0ec0\u0ea1\u0eaa\u0eb2_\u0e9e\u0eb6\u0e94\u0eaa\u0eb0\u0e9e\u0eb2_\u0ea1\u0eb4\u0e96\u0eb8\u0e99\u0eb2_\u0e81\u0ecd\u0ea5\u0eb0\u0e81\u0ebb\u0e94_\u0eaa\u0eb4\u0e87\u0eab\u0eb2_\u0e81\u0eb1\u0e99\u0e8d\u0eb2_\u0e95\u0eb8\u0ea5\u0eb2_\u0e9e\u0eb0\u0e88\u0eb4\u0e81_\u0e97\u0eb1\u0e99\u0ea7\u0eb2".split("_"),monthsShort:"\u0ea1\u0eb1\u0e87\u0e81\u0ead\u0e99_\u0e81\u0eb8\u0ea1\u0e9e\u0eb2_\u0ea1\u0eb5\u0e99\u0eb2_\u0ec0\u0ea1\u0eaa\u0eb2_\u0e9e\u0eb6\u0e94\u0eaa\u0eb0\u0e9e\u0eb2_\u0ea1\u0eb4\u0e96\u0eb8\u0e99\u0eb2_\u0e81\u0ecd\u0ea5\u0eb0\u0e81\u0ebb\u0e94_\u0eaa\u0eb4\u0e87\u0eab\u0eb2_\u0e81\u0eb1\u0e99\u0e8d\u0eb2_\u0e95\u0eb8\u0ea5\u0eb2_\u0e9e\u0eb0\u0e88\u0eb4\u0e81_\u0e97\u0eb1\u0e99\u0ea7\u0eb2".split("_"),weekdays:"\u0ead\u0eb2\u0e97\u0eb4\u0e94_\u0e88\u0eb1\u0e99_\u0ead\u0eb1\u0e87\u0e84\u0eb2\u0e99_\u0e9e\u0eb8\u0e94_\u0e9e\u0eb0\u0eab\u0eb1\u0e94_\u0eaa\u0eb8\u0e81_\u0ec0\u0eaa\u0ebb\u0eb2".split("_"),weekdaysShort:"\u0e97\u0eb4\u0e94_\u0e88\u0eb1\u0e99_\u0ead\u0eb1\u0e87\u0e84\u0eb2\u0e99_\u0e9e\u0eb8\u0e94_\u0e9e\u0eb0\u0eab\u0eb1\u0e94_\u0eaa\u0eb8\u0e81_\u0ec0\u0eaa\u0ebb\u0eb2".split("_"),weekdaysMin:"\u0e97_\u0e88_\u0ead\u0e84_\u0e9e_\u0e9e\u0eab_\u0eaa\u0e81_\u0eaa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"\u0ea7\u0eb1\u0e99dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0e95\u0ead\u0e99\u0ec0\u0e8a\u0ebb\u0ec9\u0eb2|\u0e95\u0ead\u0e99\u0ec1\u0ea5\u0e87/,isPM:function(e){return"\u0e95\u0ead\u0e99\u0ec1\u0ea5\u0e87"===e},meridiem:function(e,t,n){return e<12?"\u0e95\u0ead\u0e99\u0ec0\u0e8a\u0ebb\u0ec9\u0eb2":"\u0e95\u0ead\u0e99\u0ec1\u0ea5\u0e87"},calendar:{sameDay:"[\u0ea1\u0eb7\u0ec9\u0e99\u0eb5\u0ec9\u0ec0\u0ea7\u0ea5\u0eb2] LT",nextDay:"[\u0ea1\u0eb7\u0ec9\u0ead\u0eb7\u0ec8\u0e99\u0ec0\u0ea7\u0ea5\u0eb2] LT",nextWeek:"[\u0ea7\u0eb1\u0e99]dddd[\u0edc\u0ec9\u0eb2\u0ec0\u0ea7\u0ea5\u0eb2] LT",lastDay:"[\u0ea1\u0eb7\u0ec9\u0ea7\u0eb2\u0e99\u0e99\u0eb5\u0ec9\u0ec0\u0ea7\u0ea5\u0eb2] LT",lastWeek:"[\u0ea7\u0eb1\u0e99]dddd[\u0ec1\u0ea5\u0ec9\u0ea7\u0e99\u0eb5\u0ec9\u0ec0\u0ea7\u0ea5\u0eb2] LT",sameElse:"L"},relativeTime:{future:"\u0ead\u0eb5\u0e81 %s",past:"%s\u0e9c\u0ec8\u0eb2\u0e99\u0ea1\u0eb2",s:"\u0e9a\u0ecd\u0ec8\u0ec0\u0e97\u0ebb\u0ec8\u0eb2\u0ec3\u0e94\u0ea7\u0eb4\u0e99\u0eb2\u0e97\u0eb5",ss:"%d \u0ea7\u0eb4\u0e99\u0eb2\u0e97\u0eb5",m:"1 \u0e99\u0eb2\u0e97\u0eb5",mm:"%d \u0e99\u0eb2\u0e97\u0eb5",h:"1 \u0e8a\u0ebb\u0ec8\u0ea7\u0ec2\u0ea1\u0e87",hh:"%d \u0e8a\u0ebb\u0ec8\u0ea7\u0ec2\u0ea1\u0e87",d:"1 \u0ea1\u0eb7\u0ec9",dd:"%d \u0ea1\u0eb7\u0ec9",M:"1 \u0ec0\u0e94\u0eb7\u0ead\u0e99",MM:"%d \u0ec0\u0e94\u0eb7\u0ead\u0e99",y:"1 \u0e9b\u0eb5",yy:"%d \u0e9b\u0eb5"},dayOfMonthOrdinalParse:/(\u0e97\u0eb5\u0ec8)\d{1,2}/,ordinal:function(e){return"\u0e97\u0eb5\u0ec8"+e}})}(n("wd/R"))},spCT:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return r}));var i=function(e){return e[e.Loading=0]="Loading",e[e.Ready=1]="Ready",e[e.Error=2]="Error",e[e.None=3]="None",e}({});class r{constructor(){this.loading=i.Loading}loadingStart(){this.loading=i.Loading}loadingReady(){this.loading=i.Ready}loadingError(){this.loading=i.Error}loadingNone(){this.loading=i.None}}},st4c:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("8Y7J"),r=n("IheW");let s=(()=>{class e{constructor(e){this.http=e,this.apiPath="api/crush_rule",this.formTooltips={root:"The name of the node under which data should be placed.",failure_domain:"The type of CRUSH nodes across which we should separate replicas.",device_class:"The device class data should be placed on."}}create(e){return this.http.post(this.apiPath,e,{observe:"response"})}delete(e){return this.http.delete(`${this.apiPath}/${e}`,{observe:"response"})}getInfo(){return this.http.get(`ui-${this.apiPath}/info`)}}return e.\u0275fac=function(t){return new(t||e)(i.dc(r.b))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},"t+mt":function(e,t,n){!function(e){"use strict";e.defineLocale("en-sg",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n("wd/R"))},"t/zF":function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));class i{constructor(e,t){this.name=e,this.metadata=t}}},tGlX:function(e,t,n){!function(e){"use strict";function t(e,t,n,i){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?r[n][0]:r[n][1]}e.defineLocale("de",{months:"Januar_Februar_M\xe4rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._M\xe4rz_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},tPH9:function(e,t,n){"use strict";t.a=function(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}},tT3J:function(e,t,n){!function(e){"use strict";e.defineLocale("tzm-latn",{months:"innayr_br\u02e4ayr\u02e4_mar\u02e4s\u02e4_ibrir_mayyw_ywnyw_ywlywz_\u0263w\u0161t_\u0161wtanbir_kt\u02e4wbr\u02e4_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_br\u02e4ayr\u02e4_mar\u02e4s\u02e4_ibrir_mayyw_ywnyw_ywlywz_\u0263w\u0161t_\u0161wtanbir_kt\u02e4wbr\u02e4_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asi\u1e0dyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asi\u1e0dyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asi\u1e0dyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minu\u1e0d",mm:"%d minu\u1e0d",h:"sa\u025ba",hh:"%d tassa\u025bin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}})}(n("wd/R"))},tUCv:function(e,t,n){!function(e){"use strict";e.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(e,t){return 12===e&&(e=0),"enjing"===t?e:"siyang"===t?e>=11?e:e+12:"sonten"===t||"ndalu"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"enjing":e<15?"siyang":e<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",ss:"%d detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}})}(n("wd/R"))},tbfe:function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),i=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],r=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-mx",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,i){return e?/-MMM-/.test(i)?n[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"domingo_lunes_martes_mi\xe9rcoles_jueves_viernes_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xe9._jue._vie._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[ma\xf1ana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un d\xeda",dd:"%d d\xedas",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un a\xf1o",yy:"%d a\xf1os"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:0,doy:4},invalidDate:"Fecha inv\xe1lida"})}(n("wd/R"))},tiKp:function(e,t,n){var i=n("2oRo"),r=n("VpIT"),s=n("UTVS"),o=n("kOOl"),a=n("STAE"),c=n("/b8u"),l=r("wks"),u=i.Symbol,d=c?u:u&&u.withoutSetter||o;e.exports=function(e){return s(l,e)&&(a||"string"==typeof l[e])||(l[e]=a&&s(u,e)?u[e]:d("Symbol."+e)),l[e]}},tycR:function(e,t,n){var i=n("A2ZE"),r=n("RK3t"),s=n("ewvW"),o=n("UMSQ"),a=n("ZfDv"),c=[].push,l=function(e){var t=1==e,n=2==e,l=3==e,u=4==e,d=6==e,h=7==e,f=5==e||d;return function(p,m,b,g){for(var _,y,v=s(p),w=r(v),S=i(m,b,3),M=o(w.length),x=0,k=g||a,D=t?k(p,M):n||h?k(p,0):void 0;M>x;x++)if((f||x in w)&&(y=S(_=w[x],x,v),e))if(t)D[x]=y;else if(y)switch(e){case 3:return!0;case 5:return _;case 6:return x;case 2:c.call(D,_)}else switch(e){case 4:return!1;case 7:c.call(D,_)}return d?-1:l||u?u:D}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterOut:l(7)}},tz6c:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var i=n("2Vo4"),r=n("pLZG"),s=n("lJxs"),o=n("SxV6"),a=n("+0ag"),c=n("mSOc"),l=n("8Y7J");let u=(()=>{class e{constructor(e,t){this.summaryservice=e,this.cephReleaseNamePipe=t,this.releaseDataSource=new i.a(null),this.releaseData$=this.releaseDataSource.asObservable(),this.summaryservice.subscribeOnce(e=>{const t=this.cephReleaseNamePipe.transform(e.version);this.releaseDataSource.next(t)})}urlGenerator(e,t="master"){const n=`https://docs.ceph.com/en/${"master"===t?"latest":t}/`,i="https://ceph.io/";return{iscsi:n+"mgr/dashboard/#enabling-iscsi-management",prometheus:n+"mgr/dashboard/#enabling-prometheus-alerting","nfs-ganesha":n+"mgr/dashboard/#configuring-nfs-ganesha-in-the-dashboard","rgw-nfs":n+"radosgw/nfs",rgw:n+"mgr/dashboard/#enabling-the-object-gateway-management-frontend",dashboard:n+"mgr/dashboard",grafana:n+"mgr/dashboard/#enabling-the-embedding-of-grafana-dashboards",orch:n+"mgr/orchestrator",pgs:i+"pgcalc",help:i+"help/",security:i+"security/",trademarks:i+"legal-page/trademarks/","dashboard-landing-page-status":n+"mgr/dashboard/#dashboard-landing-page-status","dashboard-landing-page-performance":n+"mgr/dashboard/#dashboard-landing-page-performance","dashboard-landing-page-capacity":n+"mgr/dashboard/#dashboard-landing-page-capacity"}[e]}subscribeOnce(e,t,n){return this.releaseData$.pipe(Object(r.a)(e=>!!e),Object(s.a)(t=>this.urlGenerator(e,t)),Object(o.a)()).subscribe(t,n)}}return e.\u0275fac=function(t){return new(t||e)(l.dc(c.a),l.dc(a.a))},e.\u0275prov=l.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},u3GI:function(e,t,n){!function(e){"use strict";function t(e,t,n,i){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?r[n][0]:r[n][1]}e.defineLocale("de-ch",{months:"Januar_Februar_M\xe4rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._M\xe4rz_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},uE2L:function(e,t,n){"use strict";var i=n("AwXo");t.a=function(e,t,n){"__proto__"==t&&i.a?Object(i.a)(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},uEye:function(e,t,n){!function(e){"use strict";e.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"sundag_m\xe5ndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"su._m\xe5._ty._on._to._fr._lau.".split("_"),weekdaysMin:"su_m\xe5_ty_on_to_fr_la".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I g\xe5r klokka] LT",lastWeek:"[F\xf8reg\xe5ande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",ss:"%d sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",w:"ei veke",ww:"%d veker",M:"ein m\xe5nad",MM:"%d m\xe5nader",y:"eit \xe5r",yy:"%d \xe5r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},uIqm:function(e,t,n){"use strict";n.d(t,"a",(function(){return ve}));var i=n("8Y7J"),r=n("w9WL"),s=n("LvDl"),o=n.n(s),a=n("PqYM"),c=n("HDdC"),l=n("e2NH"),u=n("x38r"),d=n("oxzT");class h{constructor(e){this.errorConfig={resetData:!0,displayError:!0},this.error=e}}var f=n("vCyI"),p=n("SVse"),m=n("G0yt"),b=n("s7LF"),g=n("dgut"),_=n("iInd"),y=n("4DD9"),v=n("o4+5"),w=n("zWsK"),S=n("yT6U"),M=n("TJUb"),x=n("efK2");const k=["tableCellBoldTpl"],D=["sparklineTpl"],T=["routerLinkTpl"],C=["checkIconTpl"],O=["perSecondTpl"],L=["executingTpl"],R=["classAddingTpl"],E=["badgeTpl"],A=["mapTpl"],I=["truncateTpl"],P=["rowDetailsTpl"];function j(e,t){1&e&&(i.Sb(0,"div",20),i.Sb(1,"div",21),i.nc(2),i.Rb(),i.Rb())}function N(e,t){if(1&e){const e=i.Tb();i.Qb(0),i.Sb(1,"button",36),i.gc("click",(function(){i.Dc(e);const n=t.$implicit;return i.ic(3).onSelectFilter(n),!1})),i.Oc(2),i.Rb(),i.Pb()}if(2&e){const e=t.$implicit;i.yb(2),i.Pc(e.column.name)}}const F=function(e){return[e]};function Y(e,t){if(1&e&&i.Nb(0,"i",28),2&e){const e=i.ic(4);i.pc("ngClass",i.uc(1,F,e.icons.check))}}function z(e,t){if(1&e){const e=i.Tb();i.Qb(0),i.Sb(1,"button",36),i.gc("click",(function(){i.Dc(e);const n=t.$implicit,r=i.ic(3);return r.onChangeFilter(r.selectedFilter,n),!1})),i.Oc(2),i.Mc(3,Y,1,3,"i",37),i.Rb(),i.Pb()}if(2&e){const e=t.$implicit,n=i.ic(3);i.yb(2),i.Qc(" ",e.formatted," "),i.yb(1),i.pc("ngIf",void 0!==n.selectedFilter.value&&n.selectedFilter.value.raw===e.raw)}}const $=function(e,t){return[e,t]};function H(e,t){if(1&e&&(i.Sb(0,"div",32),i.Sb(1,"div",33),i.Sb(2,"button",34),i.Nb(3,"i",28),i.Oc(4),i.Rb(),i.Sb(5,"div",29),i.Mc(6,N,3,1,"ng-container",30),i.Rb(),i.Rb(),i.Sb(7,"div",35),i.Sb(8,"button",34),i.Oc(9),i.Rb(),i.Sb(10,"div",29),i.Mc(11,z,4,2,"ng-container",30),i.Rb(),i.Rb(),i.Rb()),2&e){const e=i.ic(2);i.yb(3),i.pc("ngClass",i.vc(7,$,e.icons.large,e.icons.filter)),i.yb(1),i.Qc(" ",e.selectedFilter.column.name," "),i.yb(2),i.pc("ngForOf",e.columnFilters),i.yb(2),i.Eb("disabled",0===e.selectedFilter.options.length),i.yb(1),i.Qc(" ",e.selectedFilter.value?e.selectedFilter.value.formatted:"Any"," "),i.yb(2),i.pc("ngForOf",e.selectedFilter.options)}}function W(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",38),i.Sb(1,"span",39),i.Sb(2,"span",40),i.Nb(3,"i",28),i.Rb(),i.Rb(),i.Sb(4,"input",41),i.gc("ngModelChange",(function(t){return i.Dc(e),i.ic(2).search=t}))("keyup",(function(){return i.Dc(e),i.ic(2).updateFilter()})),i.Rb(),i.Sb(5,"div",42),i.Sb(6,"button",43),i.gc("click",(function(){return i.Dc(e),i.ic(2).onClearSearch()})),i.Nb(7,"i"),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.ic(2);i.yb(3),i.pc("ngClass",i.uc(5,F,e.icons.search)),i.yb(1),i.pc("ngModel",e.search),i.yb(3),i.Bb("icon-prepend ",e.icons.destroy,"")}}function V(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",44),i.Sb(1,"input",45),i.gc("click",(function(t){return i.Dc(e),i.ic(2).setLimit(t)}))("keyup",(function(t){return i.Dc(e),i.ic(2).setLimit(t)}))("blur",(function(t){return i.Dc(e),i.ic(2).setLimit(t)})),i.Rb(),i.Rb()}if(2&e){const e=i.ic(2);i.yb(1),i.pc("value",e.userConfig.limit)}}function B(e,t){if(1&e){const e=i.Tb();i.Sb(0,"button",36),i.gc("click",(function(){i.Dc(e);const t=i.ic().$implicit;return i.ic(2).toggleColumn(t),!1})),i.Sb(1,"div",47),i.Nb(2,"input",48),i.Sb(3,"label",49),i.Oc(4),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.ic().$implicit;i.yb(2),i.pc("name",e.prop)("id",e.prop)("checked",!e.isHidden),i.yb(1),i.pc("for",e.prop),i.yb(1),i.Pc(e.name)}}function U(e,t){if(1&e&&(i.Qb(0),i.Mc(1,B,5,5,"button",46),i.Pb()),2&e){const e=t.$implicit;i.yb(1),i.pc("ngIf",""!==e.name)}}function q(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",50),i.Sb(1,"button",51),i.gc("click",(function(){return i.Dc(e),i.ic(2).refreshBtn()})),i.Nb(2,"i",28),i.Rb(),i.Rb()}if(2&e){const e=i.ic(2);i.yb(1),i.Ab("btn btn-"+e.status.type),i.pc("ngbTooltip",e.status.msg),i.yb(1),i.Eb("fa-spin",e.updating||e.loadingIndicator),i.pc("ngClass",i.vc(6,$,e.icons.large,e.icons.refresh))}}function G(e,t){if(1&e&&(i.Sb(0,"div",20),i.Sb(1,"div",21),i.nc(2,1),i.Rb(),i.Mc(3,H,12,10,"div",22),i.Mc(4,W,8,7,"div",23),i.Mc(5,V,2,1,"div",24),i.Sb(6,"div",25),i.Sb(7,"div",26),i.Sb(8,"button",27),i.Nb(9,"i",28),i.Rb(),i.Sb(10,"div",29),i.Mc(11,U,2,1,"ng-container",30),i.Rb(),i.Rb(),i.Rb(),i.Mc(12,q,3,9,"div",31),i.Rb()),2&e){const e=i.ic();i.yb(3),i.pc("ngIf",0!==e.columnFilters.length),i.yb(1),i.pc("ngIf",e.searchField),i.yb(1),i.pc("ngIf",e.limit),i.yb(4),i.pc("ngClass",i.vc(6,$,e.icons.large,e.icons.table)),i.yb(2),i.pc("ngForOf",e.columns),i.yb(1),i.pc("ngIf",e.fetchData.observers.length>0)}}function J(e,t){if(1&e){const e=i.Tb();i.Sb(0,"span",56),i.Sb(1,"span",57),i.Oc(2),i.Rb(),i.Sb(3,"a",58),i.gc("click",(function(){i.Dc(e);const t=i.ic().$implicit;return i.ic(2).onChangeFilter(t),!1})),i.Nb(4,"i",59),i.Rb(),i.Rb()}if(2&e){const e=i.ic().$implicit,t=i.ic(2);i.yb(2),i.Rc("",e.column.name,": ",e.value.formatted,""),i.yb(2),i.pc("ngClass",i.uc(3,F,t.icons.destroy))}}function Q(e,t){if(1&e&&(i.Sb(0,"span"),i.Mc(1,J,5,5,"span",55),i.Rb()),2&e){const e=t.$implicit;i.yb(1),i.pc("ngIf",e.value)}}function K(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",20),i.Sb(1,"div",52),i.Mc(2,Q,2,1,"span",30),i.Sb(3,"a",53),i.gc("click",(function(){return i.Dc(e),i.ic().onClearFilters(),!1})),i.Qb(4),i.Wb(5,54),i.Pb(),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.ic();i.yb(2),i.pc("ngForOf",e.columnFilters)}}function Z(e,t){1&e&&i.nc(0,2)}function X(e,t){if(1&e&&(i.Sb(0,"span"),i.Oc(1),i.Qb(2),i.Wb(3,64),i.Pb(),i.Oc(4," / "),i.Rb()),2&e){const e=i.ic().selectedCount;i.yb(1),i.Qc(" ",e," ")}}function ee(e,t){if(1&e&&(i.Sb(0,"span"),i.Oc(1),i.Qb(2),i.Wb(3,65),i.Pb(),i.Oc(4," / "),i.Rb()),2&e){const e=i.ic().rowCount;i.yb(1),i.Qc(" ",e," ")}}function te(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",60),i.Mc(1,X,5,1,"span",61),i.Mc(2,ee,5,1,"span",61),i.Sb(3,"span"),i.Oc(4),i.Qb(5),i.Wb(6,62),i.Pb(),i.Rb(),i.Rb(),i.Sb(7,"datatable-pager",63),i.gc("change",(function(t){return i.Dc(e),i.ic(),i.Ac(5).onFooterPage(t)})),i.Rb()}if(2&e){const e=t.rowCount,n=t.pageSize,r=t.curPage,s=i.ic();i.yb(1),i.pc("ngIf",s.selectionType),i.yb(1),i.pc("ngIf",e!=(null==s.data?null:s.data.length)),i.yb(2),i.Qc(" ",(null==s.data?null:s.data.length)||0," "),i.yb(3),i.pc("pagerLeftArrowIcon",s.paginationClasses.pagerLeftArrow)("pagerRightArrowIcon",s.paginationClasses.pagerRightArrow)("pagerPreviousIcon",s.paginationClasses.pagerPrevious)("pagerNextIcon",s.paginationClasses.pagerNext)("page",r)("size",n)("count",e)("hidden",!(e/n>1))}}function ne(e,t){if(1&e&&(i.Sb(0,"strong"),i.Oc(1),i.Rb()),2&e){const e=t.value;i.yb(1),i.Pc(e)}}function ie(e,t){if(1&e&&i.Nb(0,"cd-sparkline",66),2&e){const e=t.row;i.pc("data",t.value)("isBinary",e.cdIsBinary)}}function re(e,t){if(1&e&&(i.Sb(0,"a",67),i.Oc(1),i.Rb()),2&e){const e=t.row,n=t.value;i.pc("routerLink",i.uc(3,F,e.cdLink))("queryParams",e.cdParams),i.yb(1),i.Pc(n)}}function se(e,t){if(1&e&&(i.Nb(0,"i",68),i.jc(1,"boolean")),2&e){const e=t.value,n=i.ic();i.pc("ngClass",i.uc(4,F,n.icons.check))("hidden",!i.kc(1,2,e))}}function oe(e,t){1&e&&(i.Oc(0),i.jc(1,"dimless")),2&e&&i.Qc(" ",i.kc(1,1,t.value)," /s\n")}function ae(e,t){if(1&e&&i.Nb(0,"i",28),2&e){const e=i.ic(2);i.pc("ngClass",i.vc(1,$,e.icons.spinner,e.icons.spin))}}function ce(e,t){if(1&e&&(i.Sb(0,"span",28),i.Oc(1),i.Rb()),2&e){const e=i.ic(),t=e.column,n=e.row;i.pc("ngClass",null!=t&&null!=t.customTemplateConfig&&t.customTemplateConfig.executingClass?t.customTemplateConfig.executingClass:"text-muted italic"),i.yb(1),i.Qc("(",n.cdExecuting,")")}}function le(e,t){if(1&e&&(i.Mc(0,ae,1,4,"i",37),i.Sb(1,"span",28),i.Oc(2),i.Rb(),i.Mc(3,ce,2,2,"span",37)),2&e){const e=t.column,n=t.row,r=t.value;i.pc("ngIf",n.cdExecuting),i.yb(1),i.pc("ngClass",null==e||null==e.customTemplateConfig?null:e.customTemplateConfig.valueClass),i.yb(1),i.Qc(" ",r," "),i.yb(1),i.pc("ngIf",n.cdExecuting)}}function ue(e,t){if(1&e&&(i.Sb(0,"span"),i.jc(1,"pipeFunction"),i.Oc(2),i.Rb()),2&e){const e=t.value,n=i.ic();i.Ab(i.mc(1,4,e,n.useCustomClass,n)),i.yb(2),i.Pc(e)}}function de(e,t){if(1&e&&(i.Sb(0,"span",70),i.Oc(1),i.Rb()),2&e){const e=i.ic().$implicit,t=i.ic().column;i.pc("ngClass",null!=t&&null!=t.customTemplateConfig&&t.customTemplateConfig.map&&null!=t&&null!=t.customTemplateConfig&&null!=t.customTemplateConfig.map[e]&&t.customTemplateConfig.map[e].class?t.customTemplateConfig.map[e].class:null!=t&&null!=t.customTemplateConfig&&t.customTemplateConfig.class?t.customTemplateConfig.class:"badge-primary"),i.yb(1),i.Qc(" ",null!=t&&null!=t.customTemplateConfig&&t.customTemplateConfig.map&&null!=t&&null!=t.customTemplateConfig&&null!=t.customTemplateConfig.map[e]&&t.customTemplateConfig.map[e].value?t.customTemplateConfig.map[e].value:null!=t&&null!=t.customTemplateConfig&&t.customTemplateConfig.prefix?t.customTemplateConfig.prefix+e:e," ")}}function he(e,t){1&e&&(i.Sb(0,"span"),i.Oc(1,"\xa0"),i.Rb())}function fe(e,t){if(1&e&&(i.Sb(0,"span"),i.Mc(1,de,2,2,"span",69),i.Mc(2,he,2,0,"span",61),i.Rb()),2&e){const e=t.$implicit,n=t.last,r=i.ic().column;i.yb(1),i.pc("ngIf",null!=r&&null!=r.customTemplateConfig&&r.customTemplateConfig.map&&null!=r&&null!=r.customTemplateConfig&&null!=r.customTemplateConfig.map[e]&&r.customTemplateConfig.map[e].value?r.customTemplateConfig.map[e].value:null!=r&&null!=r.customTemplateConfig&&r.customTemplateConfig.prefix?r.customTemplateConfig.prefix+e:e),i.yb(1),i.pc("ngIf",!n)}}function pe(e,t){1&e&&(i.Mc(0,fe,3,2,"span",30),i.jc(1,"array")),2&e&&i.pc("ngForOf",i.kc(1,1,t.value))}function me(e,t){if(1&e&&(i.Sb(0,"span"),i.Oc(1),i.jc(2,"map"),i.Rb()),2&e){const e=t.column,n=t.value;i.yb(1),i.Pc(i.lc(2,1,n,null==e?null:e.customTemplateConfig))}}function be(e,t){if(1&e&&(i.Sb(0,"span",71),i.Oc(1),i.jc(2,"truncate"),i.Rb()),2&e){const e=t.column,n=t.value;i.pc("title",n),i.yb(1),i.Pc(i.mc(2,2,n,null==e||null==e.customTemplateConfig?null:e.customTemplateConfig.length,null==e||null==e.customTemplateConfig?null:e.customTemplateConfig.omission))}}function ge(e,t){if(1&e){const e=i.Tb();i.Sb(0,"a",72),i.Yb(1,73),i.gc("click",(function(n){i.Dc(e);const r=t.row,s=t.expanded;return i.ic().toggleExpandRow(r,s,n)})),i.Rb()}if(2&e){const e=t.expanded;i.Eb("expand-collapse-icon-right",!e)("expand-collapse-icon-down",e)}}const _e=[[["",8,"only-table-actions"]],[["",8,"table-actions"]],[["","cdTableDetail",""]]],ye=[".only-table-actions",".table-actions","[cdTableDetail]"];let ve=(()=>{class e{constructor(e,t){this.ngZone=e,this.cdRef=t,this.columnMode="flex",this.onlyActionHeader=!1,this.toolHeader=!0,this.searchField=!0,this.header=!0,this.footer=!0,this.limit=10,this.hasDetails=!1,this.autoReload=5e3,this.identifier="id",this.forceIdentifier=!1,this.selectionType=void 0,this.updateSelectionOnRefresh="onChange",this.updateExpandedOnRefresh="onChange",this.autoSave=!0,this.searchableObjects=!1,this.extraFilterableColumns=[],this.status=new l.a,this.fetchData=new i.o,this.updateSelection=new i.o,this.setExpandedRow=new i.o,this.columnFiltersChanged=new i.o,this.selection=new f.a,this.expanded=void 0,this.icons=d.a,this.cellTemplates={},this.search="",this.rows=[],this.loadingIndicator=!0,this.paginationClasses={pagerLeftArrow:d.a.leftArrowDouble,pagerRightArrow:d.a.rightArrowDouble,pagerPrevious:d.a.leftArrow,pagerNext:d.a.rightArrow},this.userConfig={},this.localStorage=window.localStorage,this.updating=!1,this.columnFilters=[]}get columnFiltered(){return o.a.some(this.columnFilters,e=>void 0!==e.value)}static prepareSearch(e){return(e=e.toLowerCase().replace(/,/g,"")).match(/['"][^'"]+['"]/)&&(e=e.replace(/['"][^'"]+['"]/g,e=>e.replace(/(['"])([^'"]+)(['"])/g,"$2").replace(/ /g,"+"))),e.split(" ").filter(e=>e)}ngOnInit(){if(this.localColumns=o.a.clone(this.columns),this.table.element.addEventListener("mouseenter",e=>e.stopPropagation()),this._addTemplates(),!this.sorts){const e=-1!==o.a.findIndex(this.localColumns,["prop",this.identifier]);this.sorts=this.createSortingDefinition(e?this.identifier:this.localColumns[0].prop+""),e||this.forceIdentifier||(this.identifier=this.localColumns[0].prop+"")}this.initUserConfig(),this.localColumns.forEach(e=>{e.cellTransformation&&(e.cellTemplate=this.cellTemplates[e.cellTransformation]),e.flexGrow||(e.flexGrow=e.prop+""===this.identifier?1:2),e.resizeable||(e.resizeable=!1)}),this.initExpandCollapseColumn(),this.initCheckboxColumn(),this.filterHiddenColumns(),this.initColumnFilters(),this.updateColumnFilterOptions(),this.updateSelection.emit(new f.a),this.fetchData.observers.length>0&&(this.loadingIndicator=!0),o.a.isInteger(this.autoReload)&&this.autoReload>0?this.ngZone.runOutsideAngular(()=>{this.reloadSubscriber=Object(a.a)(0,this.autoReload).subscribe(()=>{this.ngZone.run(()=>this.reloadData())})}):this.autoReload?this.useData():this.reloadData()}initUserConfig(){this.autoSave&&(this.tableName=this._calculateUniqueTableName(this.localColumns),this._loadUserConfig(),this._initUserConfigAutoSave()),this.userConfig.limit||(this.userConfig.limit=this.limit),this.userConfig.sorts||(this.userConfig.sorts=this.sorts),this.userConfig.columns?this.localColumns.forEach((e,t)=>{e.isHidden=this.userConfig.columns[t].isHidden}):this.updateUserColumns()}_calculateUniqueTableName(e){const t=e=>{if(!o.a.isString(e))return 0;let t=0;for(let n=0;n<e.length;n++)t+=e.charCodeAt(n)*n;return t};return e.reduce((e,n,i)=>(t(n.prop)+t(n.name))*(i+1)+e,0).toString()}_loadUserConfig(){const e=this.localStorage.getItem(this.tableName);e&&(this.userConfig=JSON.parse(e))}_initUserConfigAutoSave(){const e=new c.a(this._initUserConfigProxy.bind(this));this.saveSubscriber=e.subscribe(this._saveUserConfig.bind(this))}_initUserConfigProxy(e){this.userConfig=new Proxy(this.userConfig,{set:(t,n,i)=>(t[n]=i,e.next(t),!0)})}_saveUserConfig(e){this.localStorage.setItem(this.tableName,JSON.stringify(e))}updateUserColumns(){this.userConfig.columns=this.localColumns.map(e=>({prop:e.prop,name:e.name,isHidden:!!e.isHidden}))}initCheckboxColumn(){"multiClick"===this.selectionType&&this.localColumns.unshift({prop:void 0,resizeable:!1,sortable:!1,draggable:!1,checkboxable:!0,canAutoResize:!1,cellClass:"cd-datatable-checkbox",width:30})}initExpandCollapseColumn(){this.hasDetails&&this.localColumns.unshift({prop:void 0,resizeable:!1,sortable:!1,draggable:!1,isHidden:!1,canAutoResize:!1,cellClass:"cd-datatable-expand-collapse",width:40,cellTemplate:this.rowDetailsTpl})}filterHiddenColumns(){this.tableColumns=this.localColumns.filter(e=>!e.isHidden)}initColumnFilters(){let e=o.a.filter(this.localColumns,{filterable:!0});e=[...e,...this.extraFilterableColumns],this.columnFilters=e.map(e=>({column:e,options:[],value:e.filterInitValue?this.createColumnFilterOption(e.filterInitValue,e.pipe):void 0})),this.selectedFilter=o.a.first(this.columnFilters)}createColumnFilterOption(e,t){return{raw:o.a.toString(e),formatted:t?t.transform(e):o.a.toString(e)}}updateColumnFilterOptions(){this.columnFilters.forEach(e=>{let t=[];if(o.a.isUndefined(e.column.filterOptions)){const n=o.a.filter(o.a.map(this.data,e.column.prop),e=>o.a.isString(e)&&""!==e||o.a.isBoolean(e)||o.a.isFinite(e)||o.a.isDate(e));t=o.a.sortedUniq(n.sort())}else t=e.column.filterOptions;const n=t.map(t=>this.createColumnFilterOption(t,e.column.pipe));e.value&&o.a.isUndefined(o.a.find(n,{raw:e.value.raw}))&&(e.value=void 0),e.options=n})}onSelectFilter(e){this.selectedFilter=e}onChangeFilter(e,t){e.value=o.a.isEqual(e.value,t)?void 0:t,this.updateFilter()}doColumnFiltering(){const e=[];let t=[...this.data],n=[];return this.columnFilters.forEach(i=>{if(void 0===i.value)return;e.push({name:i.column.name,prop:i.column.prop,value:i.value});const s=o.a.partition(t,e=>{const t=Object(r.j)(i.column.prop)(e,i.column.prop);return o.a.isUndefined(i.column.filterPredicate)?""+t===i.value.raw:i.column.filterPredicate(e,i.value.raw)});t=s[0],n=[...n,...s[1]]}),this.columnFiltersChanged.emit({filters:e,data:t,dataOut:n}),o.a.forEach(this.selection.selected,e=>{void 0===o.a.find(t,{[this.identifier]:e[this.identifier]})&&(this.selection=new f.a,this.onSelect(this.selection))}),t}ngOnDestroy(){this.reloadSubscriber&&this.reloadSubscriber.unsubscribe(),this.saveSubscriber&&this.saveSubscriber.unsubscribe()}ngAfterContentChecked(){this.table&&this.table.element.clientWidth!==this.currentWidth&&(this.currentWidth=this.table.element.clientWidth,this.table.recalculate(),o.a.get(this.table,"cd").markForCheck())}_addTemplates(){this.cellTemplates.bold=this.tableCellBoldTpl,this.cellTemplates.checkIcon=this.checkIconTpl,this.cellTemplates.sparkline=this.sparklineTpl,this.cellTemplates.routerLink=this.routerLinkTpl,this.cellTemplates.perSecond=this.perSecondTpl,this.cellTemplates.executing=this.executingTpl,this.cellTemplates.classAdding=this.classAddingTpl,this.cellTemplates.badge=this.badgeTpl,this.cellTemplates.map=this.mapTpl,this.cellTemplates.truncate=this.truncateTpl}useCustomClass(e){if(!this.customCss)throw new Error("Custom classes are not set!");const t=Object.keys(this.customCss),n=Object.values(this.customCss).map((n,i)=>(o.a.isFunction(n)&&n(e)||n===e)&&t[i]).filter(e=>e).join(" ");return o.a.isEmpty(n)?void 0:n}ngOnChanges(e){e.data&&e.data.currentValue&&this.useData()}setLimit(e){const t=parseInt(e.target.value,10);t>0&&(this.userConfig.limit=t)}reloadData(){if(!this.updating){this.status=new l.a;const e=new h(()=>{e.errorConfig.displayError&&(this.status=new l.a("danger","Failed to load data.")),e.errorConfig.resetData&&(this.data=[]),this.useData()});this.fetchData.emit(e),this.updating=!0}}refreshBtn(){this.loadingIndicator=!0,this.reloadData()}rowIdentity(){return e=>{const t=e[this.identifier];if(o.a.isUndefined(t))throw new Error(`Wrong identifier "${this.identifier}" -> "${t}"`);return t}}useData(){this.data&&(this.updateColumnFilterOptions(),this.updateFilter(),this.reset(),this.updateSelected(),this.updateExpanded())}reset(){this.loadingIndicator=!1,this.updating=!1}updateSelected(){if("never"===this.updateSelectionOnRefresh)return;const e=[];this.selection.selected.forEach(t=>{for(const n of this.data)t[this.identifier]===n[this.identifier]&&e.push(n)}),"onChange"===this.updateSelectionOnRefresh&&o.a.isEqual(this.selection.selected,e)||(this.selection.selected=e,this.onSelect(this.selection))}updateExpanded(){if(o.a.isUndefined(this.expanded)||"never"===this.updateExpandedOnRefresh)return;const e=this.expanded[this.identifier],t=o.a.find(this.data,t=>e===t[this.identifier]);"onChange"===this.updateExpandedOnRefresh&&o.a.isEqual(this.expanded,t)||(this.expanded=t,this.setExpandedRow.emit(t))}onSelect(e){o.a.has(e,"selected")&&(this.selection.selected=e.selected),this.updateSelection.emit(o.a.clone(this.selection))}toggleColumn(e){const t=e.prop,n=!e.isHidden;n&&1===this.tableColumns.length?e.isHidden=!0:(o.a.find(this.localColumns,e=>e.prop===t).isHidden=n,this.updateColumns())}updateColumns(){this.updateUserColumns(),this.filterHiddenColumns();const e=this.userConfig.sorts[0].prop;o.a.find(this.tableColumns,t=>t.prop===e)||(this.userConfig.sorts=this.createSortingDefinition(this.tableColumns[0].prop)),this.table.recalculate(),this.cdRef.detectChanges()}createSortingDefinition(e){return[{prop:e,dir:r.i.asc}]}changeSorting({sorts:e}){this.userConfig.sorts=e}onClearSearch(){this.search="",this.updateFilter()}onClearFilters(){this.columnFilters.forEach(e=>{e.value=void 0}),this.selectedFilter=o.a.first(this.columnFilters),this.updateFilter()}updateFilter(){let t=0!==this.columnFilters.length?this.doColumnFiltering():this.data;if(this.search.length>0&&t){const n=this.localColumns.filter(e=>e.cellTransformation!==u.a.sparkline);t=this.subSearch(t,e.prepareSearch(this.search),n),this.table.offset=0}this.rows=t}subSearch(e,t,n){if(0===t.length||0===e.length)return e;const i=t.pop().replace(/\+/g," ").split(":"),r=[...n];return 2===i.length&&(n=r.filter(e=>-1!==e.name.toLowerCase().indexOf(i[0]))),e=this.basicDataSearch(o.a.last(i),e,n),this.subSearch(e,t,r)}basicDataSearch(e,t,n){return 0===e.length?t:t.filter(t=>n.filter(n=>{let i=o.a.get(t,n.prop);if(o.a.isUndefined(n.pipe)||(i=n.pipe.transform(i)),o.a.isUndefined(i)||o.a.isNull(i))return!1;if(o.a.isArray(i)?i=i.join(" "):(o.a.isNumber(i)||o.a.isBoolean(i))&&(i=i.toString()),o.a.isObjectLike(i)){if(!this.searchableObjects)return!1;i=JSON.stringify(i)}return-1!==i.toLowerCase().indexOf(e)}).length>0)}getRowClass(){return()=>({clickable:!o.a.isUndefined(this.selectionType)})}toggleExpandRow(e,t,n){n.stopPropagation(),t?(this.expanded=void 0,this.setExpandedRow.emit(void 0)):(this.expanded=e,this.table.rowDetail.collapseAllRows(),this.setExpandedRow.emit(e)),this.table.rowDetail.toggleExpandRow(e)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.A),i.Mb(i.h))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-table"]],viewQuery:function(e,t){var n;1&e&&(i.Jc(r.d,!0),i.Jc(k,!0),i.Jc(D,!0),i.Jc(T,!0),i.Jc(C,!0),i.Jc(O,!0),i.Jc(L,!0),i.Jc(R,!0),i.Jc(E,!0),i.Jc(A,!0),i.Jc(I,!0),i.Jc(P,!0)),2&e&&(i.zc(n=i.hc())&&(t.table=n.first),i.zc(n=i.hc())&&(t.tableCellBoldTpl=n.first),i.zc(n=i.hc())&&(t.sparklineTpl=n.first),i.zc(n=i.hc())&&(t.routerLinkTpl=n.first),i.zc(n=i.hc())&&(t.checkIconTpl=n.first),i.zc(n=i.hc())&&(t.perSecondTpl=n.first),i.zc(n=i.hc())&&(t.executingTpl=n.first),i.zc(n=i.hc())&&(t.classAddingTpl=n.first),i.zc(n=i.hc())&&(t.badgeTpl=n.first),i.zc(n=i.hc())&&(t.mapTpl=n.first),i.zc(n=i.hc())&&(t.truncateTpl=n.first),i.zc(n=i.hc())&&(t.rowDetailsTpl=n.first))},inputs:{data:"data",columns:"columns",sorts:"sorts",columnMode:"columnMode",onlyActionHeader:"onlyActionHeader",toolHeader:"toolHeader",searchField:"searchField",header:"header",footer:"footer",limit:"limit",hasDetails:"hasDetails",autoReload:"autoReload",identifier:"identifier",forceIdentifier:"forceIdentifier",selectionType:"selectionType",updateSelectionOnRefresh:"updateSelectionOnRefresh",updateExpandedOnRefresh:"updateExpandedOnRefresh",autoSave:"autoSave",searchableObjects:"searchableObjects",customCss:"customCss",extraFilterableColumns:"extraFilterableColumns",status:"status"},outputs:{fetchData:"fetchData",updateSelection:"updateSelection",setExpandedRow:"setExpandedRow",columnFiltersChanged:"columnFiltersChanged"},features:[i.wb],ngContentSelectors:ye,decls:33,vars:17,consts:function(){return[[1,"dataTables_wrapper"],["class","dataTables_header clearfix",4,"ngIf"],[1,"bootstrap","cd-datatable",3,"cssClasses","selectionType","selected","sorts","columns","columnMode","rows","rowClass","headerHeight","footerHeight","limit","loadingIndicator","rowIdentity","rowHeight","select","sort"],["table",""],["rowHeight","auto"],["detailRow",""],["ngx-datatable-row-detail-template",""],["ngx-datatable-footer-template",""],["tableCellBoldTpl",""],["sparklineTpl",""],["routerLinkTpl",""],["checkIconTpl",""],["perSecondTpl",""],["executingTpl",""],["classAddingTpl",""],["badgeTpl",""],["mapTpl",""],["truncateTpl",""],["ngx-datatable-cell-template",""],["rowDetailsTpl",""],[1,"dataTables_header","clearfix"],[1,"cd-datatable-actions"],["class","btn-group widget-toolbar",4,"ngIf"],["class","input-group search",4,"ngIf"],["class","input-group dataTables_paginate",4,"ngIf"],[1,"widget-toolbar"],["ngbDropdown","","autoClose","outside",1,"tc_menuitem"],["ngbDropdownToggle","",1,"btn","btn-light","tc_columnBtn"],[3,"ngClass"],["ngbDropdownMenu",""],[4,"ngFor","ngForOf"],["class","widget-toolbar tc_refreshBtn",4,"ngIf"],[1,"btn-group","widget-toolbar"],["ngbDropdown","","placement","bottom-right",1,"tc_filter_name"],["ngbDropdownToggle","",1,"btn","btn-light"],["ngbDropdown","","placement","bottom-right",1,"tc_filter_option"],["ngbDropdownItem","",3,"click"],[3,"ngClass",4,"ngIf"],[1,"input-group","search"],[1,"input-group-prepend"],[1,"input-group-text"],["type","text",1,"form-control",3,"ngModel","ngModelChange","keyup"],[1,"input-group-append"],["type","button",1,"btn","btn-light",3,"click"],[1,"input-group","dataTables_paginate"],["type","number","min","1","max","9999",1,"form-control",3,"value","click","keyup","blur"],["ngbDropdownItem","",3,"click",4,"ngIf"],[1,"custom-control","custom-checkbox","py-0"],["type","checkbox",1,"custom-control-input",3,"name","id","checked"],[1,"custom-control-label",3,"for"],[1,"widget-toolbar","tc_refreshBtn"],["type","button",3,"ngbTooltip","click"],[1,"filter-chips"],["href","",1,"tc_clearSelections",3,"click"],"Clear filters",["class","badge badge-info mr-2",4,"ngIf"],[1,"badge","badge-info","mr-2"],[1,"mr-2"],[1,"badge-remove",3,"click"],["aria-hidden","true",3,"ngClass"],[1,"page-count"],[4,"ngIf"],"total",[3,"pagerLeftArrowIcon","pagerRightArrowIcon","pagerPreviousIcon","pagerNextIcon","page","size","count","hidden","change"],"selected","found",[3,"data","isBinary"],[3,"routerLink","queryParams"],[3,"ngClass","hidden"],["class","badge",3,"ngClass",4,"ngIf"],[1,"badge",3,"ngClass"],["data-toggle","tooltip",3,"title"],["href","javascript:void(0)",1,"expand-collapse-icon","tc_expand-collapse",3,"click",6,"title"],["title","Expand/Collapse Row"]]},template:function(e,t){1&e&&(i.oc(_e),i.Sb(0,"div",0),i.Mc(1,j,3,0,"div",1),i.Mc(2,G,13,9,"div",1),i.Mc(3,K,6,1,"div",1),i.Sb(4,"ngx-datatable",2,3),i.gc("select",(function(e){return t.onSelect(e)}))("sort",(function(e){return t.changeSorting(e)})),i.Sb(6,"ngx-datatable-row-detail",4,5),i.Mc(8,Z,1,0,"ng-template",6),i.Rb(),i.Sb(9,"ngx-datatable-footer"),i.Mc(10,te,8,11,"ng-template",7),i.Rb(),i.Rb(),i.Rb(),i.Mc(11,ne,2,1,"ng-template",null,8,i.Nc),i.Mc(13,ie,1,2,"ng-template",null,9,i.Nc),i.Mc(15,re,2,5,"ng-template",null,10,i.Nc),i.Mc(17,se,2,6,"ng-template",null,11,i.Nc),i.Mc(19,oe,2,3,"ng-template",null,12,i.Nc),i.Mc(21,le,4,4,"ng-template",null,13,i.Nc),i.Mc(23,ue,3,8,"ng-template",null,14,i.Nc),i.Mc(25,pe,2,3,"ng-template",null,15,i.Nc),i.Mc(27,me,3,4,"ng-template",null,16,i.Nc),i.Mc(29,be,3,6,"ng-template",null,17,i.Nc),i.Mc(31,ge,2,4,"ng-template",18,19,i.Nc)),2&e&&(i.yb(1),i.pc("ngIf",t.onlyActionHeader),i.yb(1),i.pc("ngIf",t.toolHeader),i.yb(1),i.pc("ngIf",t.toolHeader&&t.columnFiltered),i.yb(1),i.pc("cssClasses",t.paginationClasses)("selectionType",t.selectionType)("selected",t.selection.selected)("sorts",t.userConfig.sorts)("columns",t.tableColumns)("columnMode",t.columnMode)("rows",t.rows)("rowClass",t.getRowClass())("headerHeight",t.header?"auto":0)("footerHeight",t.footer?"auto":0)("limit",t.userConfig.limit>0?t.userConfig.limit:void 0)("loadingIndicator",t.loadingIndicator)("rowIdentity",t.rowIdentity())("rowHeight","auto"))},directives:[p.r,r.d,r.f,r.g,r.e,r.b,r.a,m.i,m.m,p.p,m.k,p.q,m.j,b.d,b.q,b.t,m.D,r.c,g.a,_.h],pipes:[y.a,v.a,w.b,S.a,M.a,x.a],styles:['@charset "UTF-8";.dataTables_wrapper[_ngcontent-%COMP%]{margin-bottom:25px}.dataTables_wrapper[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{border-left:1px solid rgba(0,0,0,.09);display:inline-block;height:30px;margin-left:5px;padding-left:5px;vertical-align:middle}.dataTables_wrapper[_ngcontent-%COMP%] .widget-toolbar[_ngcontent-%COMP%]{border-left:1px solid rgba(0,0,0,.09);float:right;padding:0 8px}.dataTables_wrapper[_ngcontent-%COMP%] .widget-toolbar[_ngcontent-%COMP%] .form-check[_ngcontent-%COMP%]{padding-left:0}.dataTables_wrapper[_ngcontent-%COMP%] .dataTables_length[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{line-height:25px;text-align:right}.dataTables_header[_ngcontent-%COMP%]{background-color:#f8f9fa;border:1px solid #ced4da;border-bottom:0;padding:5px;position:relative}.dataTables_header[_ngcontent-%COMP%] .cd-datatable-actions[_ngcontent-%COMP%]{float:left}.dataTables_header[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%]{padding-left:8px}.dataTables_header[_ngcontent-%COMP%] .input-group[_ngcontent-%COMP%]{border-left:1px solid rgba(0,0,0,.09);float:right;max-width:250px;padding-left:8px;padding-right:8px;width:40%}.dataTables_header[_ngcontent-%COMP%] .input-group[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]{height:30px}.dataTables_header[_ngcontent-%COMP%] .input-group.dataTables_paginate[_ngcontent-%COMP%]{min-width:85px;padding-right:8px;width:8%}.dataTables_header[_ngcontent-%COMP%] .filter-chips[_ngcontent-%COMP%]{float:right;padding:0 8px}.dataTables_header[_ngcontent-%COMP%] .filter-chips[_ngcontent-%COMP%] .badge-remove[_ngcontent-%COMP%]{color:#fff} cd-table .cd-datatable{border:1px solid #ced4da;margin-bottom:0;max-width:none!important} cd-table .cd-datatable .progress-linear{display:block;height:5px;margin:0;padding:0;position:relative;width:100%} cd-table .cd-datatable .progress-linear .container{background-color:#2b99a8} cd-table .cd-datatable .progress-linear .container .bar{background-color:#2b99a8;height:100%;left:0;overflow:hidden;position:absolute;width:100%} cd-table .cd-datatable .progress-linear .container .bar:before{animation:progress-loading 3s linear infinite;background-color:#2b99a8;content:"";display:block;height:100%;left:-200px;position:absolute;width:200px} cd-table .cd-datatable .datatable-header{background-clip:padding-box;background-color:#f8f9fa;background-image:linear-gradient(180deg,#f8f9fa 0,#e9ecef);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#fffafafa",endColorstr="#ffededed",GradientType=0)} cd-table .cd-datatable .datatable-header .sort-asc, cd-table .cd-datatable .datatable-header .sort-desc{color:#2b99a8} cd-table .cd-datatable .datatable-header .datatable-header-cell{border:0;border-bottom:1px solid #ced4da;border-left:1px solid #ced4da;padding:5px;font-weight:700;text-align:left} cd-table .cd-datatable .datatable-header .datatable-header-cell .datatable-header-cell-label:after{font-family:ForkAwesome;font-weight:400;height:9px;left:10px;line-height:12px;position:relative;vertical-align:initial;width:12px} cd-table .cd-datatable .datatable-header .datatable-header-cell.sortable .datatable-header-cell-label:after{content:" \uf0dc"} cd-table .cd-datatable .datatable-header .datatable-header-cell.sortable.sort-active.sort-asc .datatable-header-cell-label:after{content:" \uf160"} cd-table .cd-datatable .datatable-header .datatable-header-cell.sortable.sort-active.sort-desc .datatable-header-cell-label:after{content:" \uf161"} cd-table .cd-datatable .datatable-header .datatable-header-cell:first-child{border-left:0} cd-table .cd-datatable .datatable-body{margin-bottom:-6px} cd-table .cd-datatable .datatable-body .empty-row{background-color:#c8ecf1;font-style:italic;font-weight:700;padding-bottom:5px;padding-top:5px;text-align:center} cd-table .cd-datatable .datatable-body .datatable-body-row.clickable:hover .datatable-row-group{background-color:#c8ecf1;transition-duration:.3s;transition-property:background;transition-timing-function:linear} cd-table .cd-datatable .datatable-body .datatable-body-row.datatable-row-even{background-color:#fff} cd-table .cd-datatable .datatable-body .datatable-body-row.datatable-row-odd{background-color:#f8f9fa} cd-table .cd-datatable .datatable-body .datatable-body-row.active, cd-table .cd-datatable .datatable-body .datatable-body-row.active:hover{background-color:#9fdee6} cd-table .cd-datatable .datatable-body .datatable-body-row .datatable-body-cell{border:0;border-bottom:1px solid #ced4da;border-left:1px solid #ced4da;padding:5px} cd-table .cd-datatable .datatable-body .datatable-body-row .datatable-body-cell:first-child{border-left:0} cd-table .cd-datatable .datatable-body .datatable-body-row .datatable-body-cell .datatable-body-cell-label{display:block;height:100%} cd-table .cd-datatable .datatable-body .datatable-row-detail{border-bottom:2px solid #ced4da;overflow-y:visible!important;padding:20px} cd-table .cd-datatable .datatable-body .expand-collapse-icon{display:block;height:100%;text-align:center} cd-table .cd-datatable .datatable-body .expand-collapse-icon:hover{text-decoration:none} cd-table .cd-datatable .datatable-body .expand-collapse-icon-right:before{color:#212529;font-family:ForkAwesome,sans-serif;font-size:1rem;line-height:1;content:"\uf105"} cd-table .cd-datatable .datatable-body .expand-collapse-icon-down:before{color:#212529;font-family:ForkAwesome,sans-serif;font-size:1rem;line-height:1;content:"\uf107"} cd-table .cd-datatable .datatable-footer .page-count, cd-table .cd-datatable .datatable-footer .selected-count{font-style:italic;min-height:2rem;padding-left:.3rem;padding-top:.3rem} cd-table .cd-datatable .cd-datatable-checkbox{text-align:center}@keyframes progress-loading{0%{left:-200px;width:15%}50%{width:30%}70%{width:70%}80%{left:50%}95%{left:120%}to{left:100%}}'],changeDetection:0}),e})()},uXwI:function(e,t,n){!function(e){"use strict";var t={ss:"sekundes_sekund\u0113m_sekunde_sekundes".split("_"),m:"min\u016btes_min\u016bt\u0113m_min\u016bte_min\u016btes".split("_"),mm:"min\u016btes_min\u016bt\u0113m_min\u016bte_min\u016btes".split("_"),h:"stundas_stund\u0101m_stunda_stundas".split("_"),hh:"stundas_stund\u0101m_stunda_stundas".split("_"),d:"dienas_dien\u0101m_diena_dienas".split("_"),dd:"dienas_dien\u0101m_diena_dienas".split("_"),M:"m\u0113ne\u0161a_m\u0113ne\u0161iem_m\u0113nesis_m\u0113ne\u0161i".split("_"),MM:"m\u0113ne\u0161a_m\u0113ne\u0161iem_m\u0113nesis_m\u0113ne\u0161i".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function n(e,t,n){return n?t%10==1&&t%100!=11?e[2]:e[3]:t%10==1&&t%100!=11?e[0]:e[1]}function i(e,i,r){return e+" "+n(t[r],e,i)}function r(e,i,r){return n(t[r],e,i)}e.defineLocale("lv",{months:"janv\u0101ris_febru\u0101ris_marts_apr\u012blis_maijs_j\u016bnijs_j\u016blijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_j\u016bn_j\u016bl_aug_sep_okt_nov_dec".split("_"),weekdays:"sv\u0113tdiena_pirmdiena_otrdiena_tre\u0161diena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[\u0160odien pulksten] LT",nextDay:"[R\u012bt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pag\u0101ju\u0161\u0101] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"p\u0113c %s",past:"pirms %s",s:function(e,t){return t?"da\u017eas sekundes":"da\u017e\u0101m sekund\u0113m"},ss:i,m:r,mm:i,h:r,hh:i,d:r,dd:i,M:r,MM:i,y:r,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},uYzU:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("8Y7J");let r=(()=>{class e{transform(e){switch(e){case"user:rbd":return"user:rbd (tcmu-runner)";default:return e}}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"iscsiBackstore",type:e,pure:!0}),e})()},ufoC:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i=function(e){return e.auth="Login",e.cephfs="CephFS",e.rbd="RBD",e.pool="Pool",e.osd="OSD",e.role="Role",e.user="User",e}({}),r=n("jVDg"),s=n("8Y7J");class o{constructor(e,t,n){this.running=e,this.failure=t,this.success=n}}class a{constructor(e,t,n){this.operation=e,this.involves=t,this.errors=n||(()=>({}))}failure(e){return "Failed to " + this.operation.failure + " " + this.involves(e) + ""}running(e){return`${this.operation.running} ${this.involves(e)}`}success(e){return`${this.operation.success} ${this.involves(e)}`}}let c=(()=>{class e{constructor(){this.defaultMessage=this.newTaskMessage(new o("Executing","execute","Executed"),e=>e&&(i[e.component]||e.component)||"unknown task",()=>({})),this.commonOperations={create:new o("Creating","create","Created"),update:new o("Updating","update","Updated"),delete:new o("Deleting","delete","Deleted"),add:new o("Adding","add","Added"),remove:new o("Removing","remove","Removed"),import:new o("Importing","import","Imported")},this.rbd={default:e=>"RBD '" + e.image_spec + "'",create:e=>{const t=new r.a(e.pool_name,e.namespace,e.image_name).toString();return "RBD '" + t + "'"},child:e=>{const t=new r.a(e.child_pool_name,e.child_namespace,e.child_image_name).toString();return "RBD '" + t + "'"},destination:e=>{const t=new r.a(e.dest_pool_name,e.dest_namespace,e.dest_image_name).toString();return "RBD '" + t + "'"},snapshot:e=>"RBD snapshot '" + e.image_spec + "@" + e.snapshot_name + "'"},this.rbd_mirroring={site_name:()=>"mirroring site name",bootstrap:()=>"bootstrap token",pool:e=>"mirror mode for pool '" + e.pool_name + "'",pool_peer:e=>"mirror peer for pool '" + e.pool_name + "'"},this.grafana={update_dashboards:()=>"all dashboards"},this.messages={"host/create":this.newTaskMessage(this.commonOperations.create,e=>this.host(e)),"host/delete":this.newTaskMessage(this.commonOperations.delete,e=>this.host(e)),"host/identify_device":this.newTaskMessage(new o("Identifying","identify","Identified"),e=>"device '" + e.device + "' on host '" + e.hostname + "'"),"osd/create":this.newTaskMessage(this.commonOperations.create,e=>"OSDs (DriveGroups: " + e.tracking_id + ")"),"osd/delete":this.newTaskMessage(this.commonOperations.delete,e=>this.osd(e)),"pool/create":this.newTaskMessage(this.commonOperations.create,e=>this.pool(e),e=>({17:"Name is already used by " + this.pool(e) + "."})),"pool/edit":this.newTaskMessage(this.commonOperations.update,e=>this.pool(e),e=>({17:"Name is already used by " + this.pool(e) + "."})),"pool/delete":this.newTaskMessage(this.commonOperations.delete,e=>this.pool(e)),"ecp/create":this.newTaskMessage(this.commonOperations.create,e=>this.ecp(e),e=>({17:"Name is already used by " + this.ecp(e) + "."})),"ecp/delete":this.newTaskMessage(this.commonOperations.delete,e=>this.ecp(e)),"crushRule/create":this.newTaskMessage(this.commonOperations.create,e=>this.crushRule(e),e=>({17:"Name is already used by " + this.crushRule(e) + "."})),"crushRule/delete":this.newTaskMessage(this.commonOperations.delete,e=>this.crushRule(e)),"rbd/create":this.newTaskMessage(this.commonOperations.create,this.rbd.create,e=>({17:"Name is already used by " + this.rbd.create(e) + "."})),"rbd/edit":this.newTaskMessage(this.commonOperations.update,this.rbd.default,e=>({17:"Name is already used by " + this.rbd.default(e) + "."})),"rbd/delete":this.newTaskMessage(this.commonOperations.delete,this.rbd.default,e=>({16:"" + this.rbd.default(e) + " is busy.",39:"" + this.rbd.default(e) + " contains snapshots."})),"rbd/clone":this.newTaskMessage(new o("Cloning","clone","Cloned"),this.rbd.child,e=>({17:"Name is already used by " + this.rbd.child(e) + ".",22:"Snapshot of " + this.rbd.child(e) + " must be protected."})),"rbd/copy":this.newTaskMessage(new o("Copying","copy","Copied"),this.rbd.destination,e=>({17:"Name is already used by " + this.rbd.destination(e) + "."})),"rbd/flatten":this.newTaskMessage(new o("Flattening","flatten","Flattened"),this.rbd.default),"rbd/snap/create":this.newTaskMessage(this.commonOperations.create,this.rbd.snapshot,e=>({17:"Name is already used by " + this.rbd.snapshot(e) + "."})),"rbd/snap/edit":this.newTaskMessage(this.commonOperations.update,this.rbd.snapshot,e=>({16:"Cannot unprotect " + this.rbd.snapshot(e) + " because it contains child images."})),"rbd/snap/delete":this.newTaskMessage(this.commonOperations.delete,this.rbd.snapshot,e=>({16:"Cannot delete " + this.rbd.snapshot(e) + " because it's protected."})),"rbd/snap/rollback":this.newTaskMessage(new o("Rolling back","rollback","Rolled back"),this.rbd.snapshot),"rbd/trash/move":this.newTaskMessage(new o("Moving","move","Moved"),e=>"image '" + e.image_spec + "' to trash",()=>({2:"Could not find image."})),"rbd/trash/restore":this.newTaskMessage(new o("Restoring","restore","Restored"),e=>"image '" + e.image_id_spec + "' into '" + e.new_image_name + "'",e=>({17:"Image name '" + e.new_image_name + "' is already in use."})),"rbd/trash/remove":this.newTaskMessage(new o("Deleting","delete","Deleted"),e=>"image '" + e.image_id_spec + "'"),"rbd/trash/purge":this.newTaskMessage(new o("Purging","purge","Purged"),e=>{let t="all pools";return e.pool_name&&(t=`'${e.pool_name}'`),"images from " + t + ""}),"rbd/mirroring/site_name/edit":this.newTaskMessage(this.commonOperations.update,this.rbd_mirroring.site_name,()=>({})),"rbd/mirroring/bootstrap/create":this.newTaskMessage(this.commonOperations.create,this.rbd_mirroring.bootstrap,()=>({})),"rbd/mirroring/bootstrap/import":this.newTaskMessage(this.commonOperations.import,this.rbd_mirroring.bootstrap,()=>({})),"rbd/mirroring/pool/edit":this.newTaskMessage(this.commonOperations.update,this.rbd_mirroring.pool,()=>({16:"Cannot disable mirroring because it contains a peer."})),"rbd/mirroring/peer/add":this.newTaskMessage(this.commonOperations.create,this.rbd_mirroring.pool_peer,()=>({})),"rbd/mirroring/peer/edit":this.newTaskMessage(this.commonOperations.update,this.rbd_mirroring.pool_peer,()=>({})),"rbd/mirroring/peer/delete":this.newTaskMessage(this.commonOperations.delete,this.rbd_mirroring.pool_peer,()=>({})),"iscsi/target/create":this.newTaskMessage(this.commonOperations.create,e=>this.iscsiTarget(e)),"iscsi/target/edit":this.newTaskMessage(this.commonOperations.update,e=>this.iscsiTarget(e)),"iscsi/target/delete":this.newTaskMessage(this.commonOperations.delete,e=>this.iscsiTarget(e)),"nfs/create":this.newTaskMessage(this.commonOperations.create,e=>this.nfs(e)),"nfs/edit":this.newTaskMessage(this.commonOperations.update,e=>this.nfs(e)),"nfs/delete":this.newTaskMessage(this.commonOperations.delete,e=>this.nfs(e)),"grafana/dashboards/update":this.newTaskMessage(this.commonOperations.update,this.grafana.update_dashboards,()=>({})),"service/create":this.newTaskMessage(this.commonOperations.create,e=>this.service(e)),"service/delete":this.newTaskMessage(this.commonOperations.delete,e=>this.service(e))}}newTaskMessage(e,t,n){return new a(e,t,n)}host(e){return "host '" + e.hostname + "'"}osd(e){return "OSD '" + e.svc_id + "'"}pool(e){return "pool '" + e.pool_name + "'"}ecp(e){return "erasure code profile '" + e.name + "'"}crushRule(e){return "crush rule '" + e.name + "'"}iscsiTarget(e){return "target '" + e.target_iqn + "'"}nfs(e){return "NFS '" + e.cluster_id + ":" + (e.export_id ? e.export_id : e.path) + "'"}service(e){return "Service '" + e.service_name + "'"}_getTaskTitle(e){return e.name&&e.name.startsWith("progress/")?this.newTaskMessage(new o(e.name.replace("progress/",""),"",e.name.replace("progress/","")),e=>""):this.messages[e.name]||this.defaultMessage}getSuccessTitle(e){return this._getTaskTitle(e).success(e.metadata)}getErrorMessage(e){return this._getTaskTitle(e).errors(e.metadata)[e.exception.code]||e.exception.detail}getErrorTitle(e){return this._getTaskTitle(e).failure(e.metadata)}getRunningTitle(e){return this._getTaskTitle(e).running(e.metadata)}getRunningText(e){return this._getTaskTitle(e).operation.running}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=s.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},uy83:function(e,t,n){var i=n("0Dky");e.exports=!i((function(){return Object.isExtensible(Object.preventExtensions({}))}))},uyHG:function(e,t){var n,i="__lodash_hash_undefined__",r=/^\[object .+?Constructor\]$/,s="object"==typeof global&&global&&global.Object===Object&&global,o="object"==typeof self&&self&&self.Object===Object&&self,a=s||o||Function("return this")(),c=Array.prototype,l=Function.prototype,u=Object.prototype,d=a["__core-js_shared__"],h=(n=/[^.]+$/.exec(d&&d.keys&&d.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",f=l.toString,p=u.hasOwnProperty,m=u.toString,b=RegExp("^"+f.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),g=c.splice,_=k(a,"Map"),y=k(Object,"create");function v(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function S(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function M(e,t){for(var n,i,r=e.length;r--;)if((n=e[r][0])===(i=t)||n!=n&&i!=i)return r;return-1}function x(e,t){var n,i,r=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof t?"string":"hash"]:r.map}function k(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!T(e)||(t=e,h&&h in t))&&(function(e){var t=T(e)?m.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}(e)?b:r).test(function(e){if(null!=e){try{return f.call(e)}catch(t){}try{return e+""}catch(t){}}return""}(e));var t}(n)?n:void 0}function D(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],s=n.cache;if(s.has(r))return s.get(r);var o=e.apply(this,i);return n.cache=s.set(r,o),o};return n.cache=new(D.Cache||S),n}function T(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}v.prototype.clear=function(){this.__data__=y?y(null):{}},v.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},v.prototype.get=function(e){var t=this.__data__;if(y){var n=t[e];return n===i?void 0:n}return p.call(t,e)?t[e]:void 0},v.prototype.has=function(e){var t=this.__data__;return y?void 0!==t[e]:p.call(t,e)},v.prototype.set=function(e,t){return this.__data__[e]=y&&void 0===t?i:t,this},w.prototype.clear=function(){this.__data__=[]},w.prototype.delete=function(e){var t=this.__data__,n=M(t,e);return!(n<0||(n==t.length-1?t.pop():g.call(t,n,1),0))},w.prototype.get=function(e){var t=this.__data__,n=M(t,e);return n<0?void 0:t[n][1]},w.prototype.has=function(e){return M(this.__data__,e)>-1},w.prototype.set=function(e,t){var n=this.__data__,i=M(n,e);return i<0?n.push([e,t]):n[i][1]=t,this},S.prototype.clear=function(){this.__data__={hash:new v,map:new(_||w),string:new v}},S.prototype.delete=function(e){return x(this,e).delete(e)},S.prototype.get=function(e){return x(this,e).get(e)},S.prototype.has=function(e){return x(this,e).has(e)},S.prototype.set=function(e,t){return x(this,e).set(e,t),this},D.Cache=S,e.exports=D},vCyI:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));class i{constructor(e){this._selected=[],e&&(this._selected=e),this.update()}update(){this.hasSelection=this._selected.length>0,this.hasSingleSelection=1===this._selected.length,this.hasMultiSelection=this._selected.length>1}set selected(e){this._selected=e,this.update()}get selected(){return this._selected}add(e){this._selected.push(e),this.update()}first(){return this.hasSelection?this._selected[0]:null}}},vJtL:function(e,t,n){"use strict";var i=n("8M4i"),r=n("IzLi");t.a=function(e){if(!Object(r.a)(e))return!1;var t=Object(i.a)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},vkgz:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("7o/Q"),r=n("KqfI"),s=n("n6bG");function o(e,t,n){return function(i){return i.lift(new a(e,t,n))}}class a{constructor(e,t,n){this.nextOrObserver=e,this.error=t,this.complete=n}call(e,t){return t.subscribe(new c(e,this.nextOrObserver,this.error,this.complete))}}class c extends i.a{constructor(e,t,n,i){super(e),this._tapNext=r.a,this._tapError=r.a,this._tapComplete=r.a,this._tapError=n||r.a,this._tapComplete=i||r.a,Object(s.a)(t)?(this._context=this,this._tapNext=t):t&&(this._context=t,this._tapNext=t.next||r.a,this._tapError=t.error||r.a,this._tapComplete=t.complete||r.a)}_next(e){try{this._tapNext.call(this._context,e)}catch(t){return void this.destination.error(t)}this.destination.next(e)}_error(e){try{this._tapError.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.error(e)}_complete(){try{this._tapComplete.call(this._context)}catch(e){return void this.destination.error(e)}return this.destination.complete()}}},w1tV:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var i=n("XNiG"),r=n("HDdC"),s=n("7o/Q"),o=n("quSY");function a(){return function(e){return e.lift(new c(e))}}class c{constructor(e){this.connectable=e}call(e,t){const{connectable:n}=this;n._refCount++;const i=new l(e,n),r=t.subscribe(i);return i.closed||(i.connection=n.connect()),r}}class l extends s.a{constructor(e,t){super(e),this.connectable=t}_unsubscribe(){const{connectable:e}=this;if(!e)return void(this.connection=null);this.connectable=null;const t=e._refCount;if(t<=0)return void(this.connection=null);if(e._refCount=t-1,t>1)return void(this.connection=null);const{connection:n}=this,i=e._connection;this.connection=null,!i||n&&i!==n||i.unsubscribe()}}class u extends r.a{constructor(e,t){super(),this.source=e,this.subjectFactory=t,this._refCount=0,this._isComplete=!1}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){const e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject}connect(){let e=this._connection;return e||(this._isComplete=!1,e=this._connection=new o.a,e.add(this.source.subscribe(new h(this.getSubject(),this))),e.closed&&(this._connection=null,e=o.a.EMPTY)),e}refCount(){return a()(this)}}const d=(()=>{const e=u.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:e._subscribe},_isComplete:{value:e._isComplete,writable:!0},getSubject:{value:e.getSubject},connect:{value:e.connect},refCount:{value:e.refCount}}})();class h extends i.b{constructor(e,t){super(e),this.connectable=t}_error(e){this._unsubscribe(),super._error(e)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const e=this.connectable;if(e){this.connectable=null;const t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}}}function f(){return new i.a}function p(){return e=>{return a()((t=f,function(e){let n;n="function"==typeof t?t:function(){return t};const i=Object.create(e,d);return i.source=e,i.subjectFactory=n,i})(e));var t}}},w9WL:function(e,t,n){"use strict";n.d(t,"a",(function(){return Pe})),n.d(t,"b",(function(){return ue})),n.d(t,"c",(function(){return ft})),n.d(t,"d",(function(){return ut})),n.d(t,"e",(function(){return ze})),n.d(t,"f",(function(){return Ye})),n.d(t,"g",(function(){return Fe})),n.d(t,"h",(function(){return xt})),n.d(t,"i",(function(){return ct})),n.d(t,"j",(function(){return ve}));var i=n("8Y7J"),r=n("SVse"),s=n("XNiG"),o=n("xgIS"),a=n("2Vo4"),c=n("1G5W"),l=n("mrSG");const u=["*"];function d(e,t){1&e&&i.Nb(0,"datatable-progress")}function h(e,t){if(1&e&&i.Nb(0,"datatable-summary-row",9),2&e){const e=i.ic(2);i.pc("rowHeight",e.summaryHeight)("offsetX",e.offsetX)("innerWidth",e.innerWidth)("rows",e.rows)("columns",e.columns)}}function f(e,t){if(1&e){const e=i.Tb();i.Sb(0,"datatable-body-row",13),i.gc("treeAction",(function(){i.Dc(e);const t=i.ic().$implicit;return i.ic(2).onTreeAction(t)}))("activate",(function(t){i.Dc(e);const n=i.ic().index,r=i.ic(2);return i.Ac(2).onActivate(t,r.indexes.first+n)})),i.Rb()}if(2&e){const e=i.ic().$implicit,t=i.ic(2),n=i.Ac(2);i.pc("isSelected",n.getRowSelected(e))("innerWidth",t.innerWidth)("offsetX",t.offsetX)("columns",t.columns)("rowHeight",t.getRowHeight(e))("row",e)("rowIndex",t.getRowIndex(e))("expanded",t.getRowExpanded(e))("rowClass",t.rowClass)("displayCheck",t.displayCheck)("treeStatus",e&&e.treeStatus)}}function p(e,t){if(1&e){const e=i.Tb();i.Sb(0,"datatable-body-row",15),i.gc("activate",(function(n){i.Dc(e);const r=t.index;return i.ic(4),i.Ac(2).onActivate(n,r)})),i.Rb()}if(2&e){const e=t.$implicit,n=i.ic(2).$implicit,r=i.ic(2),s=i.Ac(2);i.pc("isSelected",s.getRowSelected(e))("innerWidth",r.innerWidth)("offsetX",r.offsetX)("columns",r.columns)("rowHeight",r.getRowHeight(e))("row",e)("group",n.value)("rowIndex",r.getRowIndex(e))("expanded",r.getRowExpanded(e))("rowClass",r.rowClass)}}function m(e,t){if(1&e&&i.Mc(0,p,1,10,"datatable-body-row",14),2&e){const e=i.ic().$implicit,t=i.ic(2);i.pc("ngForOf",e.value)("ngForTrackBy",t.rowTrackingFn)}}function b(e,t){if(1&e){const e=i.Tb();i.Sb(0,"datatable-row-wrapper",10),i.gc("rowContextmenu",(function(t){return i.Dc(e),i.ic(2).rowContextmenu.emit(t)})),i.Mc(1,f,1,11,"datatable-body-row",11),i.Mc(2,m,1,2,"ng-template",null,12,i.Nc),i.Rb()}if(2&e){const e=t.$implicit,n=t.index,r=i.Ac(3),s=i.ic(2);i.pc("groupedRows",s.groupedRows)("innerWidth",s.innerWidth)("ngStyle",s.getRowsStyles(e))("rowDetail",s.rowDetail)("groupHeader",s.groupHeader)("offsetX",s.offsetX)("detailRowHeight",s.getDetailRowHeight(e&&e[n],n))("row",e)("expanded",s.getRowExpanded(e))("rowIndex",s.getRowIndex(e&&e[n])),i.yb(1),i.pc("ngIf",!s.groupedRows)("ngIfElse",r)}}function g(e,t){if(1&e&&i.Nb(0,"datatable-summary-row",16),2&e){const e=i.ic(2);i.pc("ngStyle",e.getBottomSummaryRowStyles())("rowHeight",e.summaryHeight)("offsetX",e.offsetX)("innerWidth",e.innerWidth)("rows",e.rows)("columns",e.columns)}}function _(e,t){if(1&e){const e=i.Tb();i.Sb(0,"datatable-scroller",5),i.gc("scroll",(function(t){return i.Dc(e),i.ic().onBodyScroll(t)})),i.Mc(1,h,1,5,"datatable-summary-row",6),i.Mc(2,b,4,12,"datatable-row-wrapper",7),i.Mc(3,g,1,6,"datatable-summary-row",8),i.Rb()}if(2&e){const e=i.ic();i.pc("scrollbarV",e.scrollbarV)("scrollbarH",e.scrollbarH)("scrollHeight",e.scrollHeight)("scrollWidth",null==e.columnGroupWidths?null:e.columnGroupWidths.total),i.yb(1),i.pc("ngIf",e.summaryRow&&"top"===e.summaryPosition),i.yb(1),i.pc("ngForOf",e.temp)("ngForTrackBy",e.rowTrackingFn),i.yb(1),i.pc("ngIf",e.summaryRow&&"bottom"===e.summaryPosition)}}function y(e,t){if(1&e&&i.Nb(0,"div",17),2&e){const e=i.ic();i.pc("innerHTML",e.emptyMessage,i.Ec)}}function v(e,t){if(1&e){const e=i.Tb();i.Sb(0,"datatable-header-cell",4),i.gc("resize",(function(n){i.Dc(e);const r=t.$implicit;return i.ic(2).onColumnResized(n,r)}))("longPressStart",(function(t){return i.Dc(e),i.ic(2).onLongPressStart(t)}))("longPressEnd",(function(t){return i.Dc(e),i.ic(2).onLongPressEnd(t)}))("sort",(function(t){return i.Dc(e),i.ic(2).onSort(t)}))("select",(function(t){return i.Dc(e),i.ic(2).select.emit(t)}))("columnContextmenu",(function(t){return i.Dc(e),i.ic(2).columnContextmenu.emit(t)})),i.Rb()}if(2&e){const e=t.$implicit,n=i.ic(2);i.pc("resizeEnabled",e.resizeable)("pressModel",e)("pressEnabled",n.reorderable&&e.draggable)("dragX",n.reorderable&&e.draggable&&e.dragging)("dragY",!1)("dragModel",e)("dragEventTarget",n.dragEventTarget)("headerHeight",n.headerHeight)("isTarget",e.isTarget)("targetMarkerTemplate",n.targetMarkerTemplate)("targetMarkerContext",e.targetMarkerContext)("column",e)("sortType",n.sortType)("sorts",n.sorts)("selectionType",n.selectionType)("sortAscendingIcon",n.sortAscendingIcon)("sortDescendingIcon",n.sortDescendingIcon)("sortUnsetIcon",n.sortUnsetIcon)("allRowsSelected",n.allRowsSelected)}}function w(e,t){if(1&e&&(i.Sb(0,"div",2),i.Mc(1,v,1,19,"datatable-header-cell",3),i.Rb()),2&e){const e=t.$implicit,n=i.ic();i.Ab("datatable-row-"+e.type),i.pc("ngStyle",n._styleByGroup[e.type]),i.yb(1),i.pc("ngForOf",e.columns)("ngForTrackBy",n.columnTrackingFn)}}function S(e,t){if(1&e){const e=i.Tb();i.Sb(0,"datatable-header",4),i.gc("sort",(function(t){return i.Dc(e),i.ic().onColumnSort(t)}))("resize",(function(t){return i.Dc(e),i.ic().onColumnResize(t)}))("reorder",(function(t){return i.Dc(e),i.ic().onColumnReorder(t)}))("select",(function(t){return i.Dc(e),i.ic().onHeaderSelect(t)}))("columnContextmenu",(function(t){return i.Dc(e),i.ic().onColumnContextmenu(t)})),i.jc(1,"async"),i.Rb()}if(2&e){const e=i.ic();i.pc("sorts",e.sorts)("sortType",e.sortType)("scrollbarH",e.scrollbarH)("innerWidth",e._innerWidth)("offsetX",i.kc(1,15,e._offsetX))("dealsWithGroup",void 0!==e.groupedRows)("columns",e._internalColumns)("headerHeight",e.headerHeight)("reorderable",e.reorderable)("targetMarkerTemplate",e.targetMarkerTemplate)("sortAscendingIcon",e.cssClasses.sortAscending)("sortDescendingIcon",e.cssClasses.sortDescending)("sortUnsetIcon",e.cssClasses.sortUnset)("allRowsSelected",e.allRowsSelected)("selectionType",e.selectionType)}}function M(e,t){if(1&e){const e=i.Tb();i.Sb(0,"datatable-footer",5),i.gc("page",(function(t){return i.Dc(e),i.ic().onFooterPage(t)})),i.Rb()}if(2&e){const e=i.ic();i.pc("rowCount",e.rowCount)("pageSize",e.pageSize)("offset",e.offset)("footerHeight",e.footerHeight)("footerTemplate",e.footer)("totalMessage",e.messages.totalMessage)("pagerLeftArrowIcon",e.cssClasses.pagerLeftArrow)("pagerRightArrowIcon",e.cssClasses.pagerRightArrow)("pagerPreviousIcon",e.cssClasses.pagerPrevious)("selectedCount",e.selected.length)("selectedMessage",!!e.selectionType&&e.messages.selectedMessage)("pagerNextIcon",e.cssClasses.pagerNext)}}function x(e,t){}function k(e,t){if(1&e&&i.Mc(0,x,0,0,"ng-template",5),2&e){const e=i.ic();i.pc("ngTemplateOutlet",e.targetMarkerTemplate)("ngTemplateOutletContext",e.targetMarkerContext)}}function D(e,t){if(1&e){const e=i.Tb();i.Sb(0,"label",6),i.Sb(1,"input",7),i.gc("change",(function(){i.Dc(e);const t=i.ic();return t.select.emit(!t.allRowsSelected)})),i.Rb(),i.Rb()}if(2&e){const e=i.ic();i.yb(1),i.pc("checked",e.allRowsSelected)}}function T(e,t){if(1&e){const e=i.Tb();i.Sb(0,"span",8),i.Sb(1,"span",9),i.gc("click",(function(){return i.Dc(e),i.ic().onSort()})),i.Rb(),i.Rb()}if(2&e){const e=i.ic();i.yb(1),i.pc("innerHTML",e.name,i.Ec)}}function C(e,t){}function O(e,t){if(1&e&&i.Mc(0,C,0,0,"ng-template",5),2&e){const e=i.ic();i.pc("ngTemplateOutlet",e.column.headerTemplate)("ngTemplateOutletContext",e.cellContext)}}function L(e,t){}const R=function(e,t,n,i,r){return{rowCount:e,pageSize:t,selectedCount:n,curPage:i,offset:r}};function E(e,t){if(1&e&&i.Mc(0,L,0,0,"ng-template",4),2&e){const e=i.ic();i.pc("ngTemplateOutlet",e.footerTemplate.template)("ngTemplateOutletContext",i.yc(2,R,e.rowCount,e.pageSize,e.selectedCount,e.curPage,e.offset))}}function A(e,t){if(1&e&&(i.Sb(0,"span"),i.Oc(1),i.Rb()),2&e){const e=i.ic(2);i.yb(1),i.Rc(" ",null==e.selectedCount?null:e.selectedCount.toLocaleString()," ",e.selectedMessage," / ")}}function I(e,t){if(1&e&&(i.Sb(0,"div",5),i.Mc(1,A,2,2,"span",1),i.Oc(2),i.Rb()),2&e){const e=i.ic();i.yb(1),i.pc("ngIf",e.selectedMessage),i.yb(1),i.Rc(" ",null==e.rowCount?null:e.rowCount.toLocaleString()," ",e.totalMessage," ")}}function P(e,t){if(1&e){const e=i.Tb();i.Sb(0,"datatable-pager",6),i.gc("change",(function(t){return i.Dc(e),i.ic().page.emit(t)})),i.Rb()}if(2&e){const e=i.ic();i.pc("pagerLeftArrowIcon",e.pagerLeftArrowIcon)("pagerRightArrowIcon",e.pagerRightArrowIcon)("pagerPreviousIcon",e.pagerPreviousIcon)("pagerNextIcon",e.pagerNextIcon)("page",e.curPage)("size",e.pageSize)("count",e.rowCount)("hidden",!e.isVisible)}}const j=function(e){return{"selected-count":e}};function N(e,t){if(1&e){const e=i.Tb();i.Sb(0,"li",6),i.Sb(1,"a",7),i.gc("click",(function(){i.Dc(e);const n=t.$implicit;return i.ic().selectPage(n.number)})),i.Oc(2),i.Rb(),i.Rb()}if(2&e){const e=t.$implicit,n=i.ic();i.Eb("active",e.number===n.page),i.zb("aria-label","page "+e.number),i.yb(2),i.Qc(" ",e.text," ")}}function F(e,t){if(1&e){const e=i.Tb();i.Sb(0,"datatable-body-cell",3),i.gc("activate",(function(n){i.Dc(e);const r=t.index;return i.ic(2).onActivate(n,r)}))("treeAction",(function(){return i.Dc(e),i.ic(2).onTreeAction()})),i.Rb()}if(2&e){const e=t.$implicit,n=i.ic(2);i.pc("row",n.row)("group",n.group)("expanded",n.expanded)("isSelected",n.isSelected)("rowIndex",n.rowIndex)("column",e)("rowHeight",n.rowHeight)("displayCheck",n.displayCheck)("treeStatus",n.treeStatus)}}function Y(e,t){if(1&e&&(i.Sb(0,"div",1),i.Mc(1,F,1,9,"datatable-body-cell",2),i.Rb()),2&e){const e=t.$implicit,n=i.ic();i.Bb("datatable-row-",e.type," datatable-row-group"),i.pc("ngStyle",n._groupStyles[e.type]),i.yb(1),i.pc("ngForOf",e.columns)("ngForTrackBy",n.columnTrackingFn)}}function z(e,t){}function $(e,t){if(1&e&&i.Mc(0,z,0,0,"ng-template",4),2&e){const e=i.ic(2);i.pc("ngTemplateOutlet",e.groupHeader.template)("ngTemplateOutletContext",e.groupContext)}}function H(e,t){if(1&e&&(i.Sb(0,"div",3),i.Mc(1,$,1,2,void 0,1),i.Rb()),2&e){const e=i.ic();i.pc("ngStyle",e.getGroupHeaderStyle()),i.yb(1),i.pc("ngIf",e.groupHeader&&e.groupHeader.template)}}function W(e,t){1&e&&i.nc(0,0,["*ngIf","(groupHeader && groupHeader.template && expanded) || !groupHeader || !groupHeader.template"])}function V(e,t){}function B(e,t){if(1&e&&i.Mc(0,V,0,0,"ng-template",4),2&e){const e=i.ic(2);i.pc("ngTemplateOutlet",e.rowDetail.template)("ngTemplateOutletContext",e.rowContext)}}function U(e,t){if(1&e&&(i.Sb(0,"div",5),i.Mc(1,B,1,2,void 0,1),i.Rb()),2&e){const e=i.ic();i.Kc("height",e.detailRowHeight,"px"),i.yb(1),i.pc("ngIf",e.rowDetail&&e.rowDetail.template)}}const q=["cellTemplate"];function G(e,t){if(1&e){const e=i.Tb();i.Sb(0,"label",4),i.Sb(1,"input",5),i.gc("click",(function(t){return i.Dc(e),i.ic().onCheckboxChange(t)})),i.Rb(),i.Rb()}if(2&e){const e=i.ic();i.yb(1),i.pc("checked",e.isSelected)}}function J(e,t){1&e&&i.Nb(0,"i",11)}function Q(e,t){1&e&&i.Nb(0,"i",12)}function K(e,t){1&e&&i.Nb(0,"i",13)}function Z(e,t){if(1&e){const e=i.Tb();i.Sb(0,"button",7),i.gc("click",(function(){return i.Dc(e),i.ic(2).onTreeAction()})),i.Sb(1,"span"),i.Mc(2,J,1,0,"i",8),i.Mc(3,Q,1,0,"i",9),i.Mc(4,K,1,0,"i",10),i.Rb(),i.Rb()}if(2&e){const e=i.ic(2);i.pc("disabled","disabled"===e.treeStatus),i.yb(2),i.pc("ngIf","loading"===e.treeStatus),i.yb(1),i.pc("ngIf","collapsed"===e.treeStatus),i.yb(1),i.pc("ngIf","expanded"===e.treeStatus||"disabled"===e.treeStatus)}}function X(e,t){}const ee=function(e){return{cellContext:e}};function te(e,t){if(1&e&&i.Mc(0,X,0,0,"ng-template",14),2&e){const e=i.ic(2);i.pc("ngTemplateOutlet",e.column.treeToggleTemplate)("ngTemplateOutletContext",i.uc(2,ee,e.cellContext))}}function ne(e,t){if(1&e&&(i.Qb(0),i.Mc(1,Z,5,4,"button",6),i.Mc(2,te,1,4,void 0,2),i.Pb()),2&e){const e=i.ic();i.yb(1),i.pc("ngIf",!e.column.treeToggleTemplate),i.yb(1),i.pc("ngIf",e.column.treeToggleTemplate)}}function ie(e,t){if(1&e&&i.Nb(0,"span",15),2&e){const e=i.ic();i.pc("title",e.sanitizedValue)("innerHTML",e.value,i.Ec)}}function re(e,t){}function se(e,t){if(1&e&&i.Mc(0,re,0,0,"ng-template",14,16,i.Nc),2&e){const e=i.ic();i.pc("ngTemplateOutlet",e.column.cellTemplate)("ngTemplateOutletContext",e.cellContext)}}function oe(e,t){if(1&e&&i.Nb(0,"datatable-body-row",1),2&e){const e=i.ic();i.pc("innerWidth",e.innerWidth)("offsetX",e.offsetX)("columns",e._internalColumns)("rowHeight",e.rowHeight)("row",e.summaryRow)("rowIndex",-1)}}let ae=(()=>{class e{constructor(e){this.document=e,this.width=this.getWidth()}getWidth(){const e=this.document.createElement("div");e.style.visibility="hidden",e.style.width="100px",e.style.msOverflowStyle="scrollbar",this.document.body.appendChild(e);const t=e.offsetWidth;e.style.overflow="scroll";const n=this.document.createElement("div");n.style.width="100%",e.appendChild(n);const i=n.offsetWidth;return e.parentNode.removeChild(e),t-i}}return e.\u0275fac=function(t){return new(t||e)(i.dc(r.d))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})(),ce=(()=>{class e{getDimensions(e){return e.getBoundingClientRect()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})(),le=(()=>{class e{constructor(){this.columnInputChanges=new s.a}get columnInputChanges$(){return this.columnInputChanges.asObservable()}onInputChange(){this.columnInputChanges.next()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})(),ue=(()=>{class e{constructor(e){this.template=e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.L))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngx-datatable-footer-template",""]]}),e})(),de=(()=>{class e{constructor(e,t){this.element=e,this.zone=t,this.isVisible=!1,this.visible=new i.o}ngOnInit(){this.runCheck()}ngOnDestroy(){clearTimeout(this.timeout)}onVisibilityChange(){this.zone.run(()=>{this.isVisible=!0,this.visible.emit(!0)})}runCheck(){const e=()=>{const{offsetHeight:t,offsetWidth:n}=this.element.nativeElement;t&&n?(clearTimeout(this.timeout),this.onVisibilityChange()):(clearTimeout(this.timeout),this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>e(),50)}))};this.timeout=setTimeout(()=>e())}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(i.A))},e.\u0275dir=i.Hb({type:e,selectors:[["","visibilityObserver",""]],hostVars:2,hostBindings:function(e,t){2&e&&i.Eb("visible",t.isVisible)},outputs:{visible:"visible"}}),e})(),he=(()=>{class e{constructor(e){this.dragX=!0,this.dragY=!0,this.dragStart=new i.o,this.dragging=new i.o,this.dragEnd=new i.o,this.isDragging=!1,this.element=e.nativeElement}ngOnChanges(e){e.dragEventTarget&&e.dragEventTarget.currentValue&&this.dragModel.dragging&&this.onMousedown(e.dragEventTarget.currentValue)}ngOnDestroy(){this._destroySubscription()}onMouseup(e){this.isDragging&&(this.isDragging=!1,this.element.classList.remove("dragging"),this.subscription&&(this._destroySubscription(),this.dragEnd.emit({event:e,element:this.element,model:this.dragModel})))}onMousedown(e){if(e.target.classList.contains("draggable")&&(this.dragX||this.dragY)){e.preventDefault(),this.isDragging=!0;const t={x:e.clientX,y:e.clientY},n=Object(o.a)(document,"mouseup");this.subscription=n.subscribe(e=>this.onMouseup(e));const i=Object(o.a)(document,"mousemove").pipe(Object(c.a)(n)).subscribe(e=>this.move(e,t));this.subscription.add(i),this.dragStart.emit({event:e,element:this.element,model:this.dragModel})}}move(e,t){if(!this.isDragging)return;const n=e.clientY-t.y;this.dragX&&(this.element.style.left=e.clientX-t.x+"px"),this.dragY&&(this.element.style.top=n+"px"),this.element.classList.add("dragging"),this.dragging.emit({event:e,element:this.element,model:this.dragModel})}_destroySubscription(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m))},e.\u0275dir=i.Hb({type:e,selectors:[["","draggable",""]],inputs:{dragX:"dragX",dragY:"dragY",dragEventTarget:"dragEventTarget",dragModel:"dragModel"},outputs:{dragStart:"dragStart",dragging:"dragging",dragEnd:"dragEnd"},features:[i.wb]}),e})(),fe=(()=>{class e{constructor(e,t){this.renderer=t,this.resizeEnabled=!0,this.resize=new i.o,this.resizing=!1,this.element=e.nativeElement}ngAfterViewInit(){const e=this.renderer;this.resizeHandle=e.createElement("span"),e.addClass(this.resizeHandle,this.resizeEnabled?"resize-handle":"resize-handle--not-resizable"),e.appendChild(this.element,this.resizeHandle)}ngOnDestroy(){this._destroySubscription(),this.renderer.destroyNode?this.renderer.destroyNode(this.resizeHandle):this.resizeHandle&&this.renderer.removeChild(this.renderer.parentNode(this.resizeHandle),this.resizeHandle)}onMouseup(){this.resizing=!1,this.subscription&&!this.subscription.closed&&(this._destroySubscription(),this.resize.emit(this.element.clientWidth))}onMousedown(e){const t=e.target.classList.contains("resize-handle"),n=this.element.clientWidth,i=e.screenX;if(t){e.stopPropagation(),this.resizing=!0;const t=Object(o.a)(document,"mouseup");this.subscription=t.subscribe(e=>this.onMouseup());const r=Object(o.a)(document,"mousemove").pipe(Object(c.a)(t)).subscribe(e=>this.move(e,n,i));this.subscription.add(r)}}move(e,t,n){const i=t+(e.screenX-n);(!this.minWidth||i>=this.minWidth)&&(!this.maxWidth||i<=this.maxWidth)&&(this.element.style.width=i+"px")}_destroySubscription(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(i.E))},e.\u0275dir=i.Hb({type:e,selectors:[["","resizeable",""]],hostVars:2,hostBindings:function(e,t){1&e&&i.gc("mousedown",(function(e){return t.onMousedown(e)})),2&e&&i.Eb("resizeable",t.resizeEnabled)},inputs:{resizeEnabled:"resizeEnabled",minWidth:"minWidth",maxWidth:"maxWidth"},outputs:{resize:"resize"}}),e})(),pe=(()=>{class e{constructor(e,t){this.document=t,this.reorder=new i.o,this.targetChanged=new i.o,this.differ=e.find({}).create()}ngAfterContentInit(){this.updateSubscriptions(),this.draggables.changes.subscribe(this.updateSubscriptions.bind(this))}ngOnDestroy(){this.draggables.forEach(e=>{e.dragStart.unsubscribe(),e.dragging.unsubscribe(),e.dragEnd.unsubscribe()})}updateSubscriptions(){const e=this.differ.diff(this.createMapDiffs());if(e){const t=({currentValue:e,previousValue:t})=>{n({previousValue:t}),e&&(e.dragStart.subscribe(this.onDragStart.bind(this)),e.dragging.subscribe(this.onDragging.bind(this)),e.dragEnd.subscribe(this.onDragEnd.bind(this)))},n=({previousValue:e})=>{e&&(e.dragStart.unsubscribe(),e.dragging.unsubscribe(),e.dragEnd.unsubscribe())};e.forEachAddedItem(t),e.forEachRemovedItem(n)}}onDragStart(){this.positions={};let e=0;for(const t of this.draggables.toArray()){const n=t.element,i=parseInt(n.offsetLeft.toString(),0);this.positions[t.dragModel.prop]={left:i,right:i+parseInt(n.offsetWidth.toString(),0),index:e++,element:n}}}onDragging({model:e,event:t}){const n=this.positions[e.prop],i=this.isTarget(e,t);i?this.lastDraggingIndex!==i.i&&(this.targetChanged.emit({prevIndex:this.lastDraggingIndex,newIndex:i.i,initialIndex:n.index}),this.lastDraggingIndex=i.i):this.lastDraggingIndex!==n.index&&(this.targetChanged.emit({prevIndex:this.lastDraggingIndex,initialIndex:n.index}),this.lastDraggingIndex=n.index)}onDragEnd({element:e,model:t,event:n}){const i=this.positions[t.prop],r=this.isTarget(t,n);r&&this.reorder.emit({prevIndex:i.index,newIndex:r.i,model:t}),this.lastDraggingIndex=void 0,e.style.left="auto"}isTarget(e,t){let n=0;const i=this.document.elementsFromPoint(t.x||t.clientX,t.y||t.clientY);for(const r in this.positions){const t=this.positions[r];if(e.prop!==r&&i.find(e=>e===t.element))return{pos:t,i:n};n++}}createMapDiffs(){return this.draggables.toArray().reduce((e,t)=>(e[t.dragModel.$$id]=t,e),{})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.u),i.Mb(r.d))},e.\u0275dir=i.Hb({type:e,selectors:[["","orderable",""]],contentQueries:function(e,t,n){var r;1&e&&i.Fb(n,he,!0),2&e&&i.zc(r=i.hc())&&(t.draggables=r)},outputs:{reorder:"reorder",targetChanged:"targetChanged"}}),e})(),me=(()=>{class e{constructor(){this.pressEnabled=!0,this.duration=500,this.longPressStart=new i.o,this.longPressing=new i.o,this.longPressEnd=new i.o,this.mouseX=0,this.mouseY=0}get press(){return this.pressing}get isLongPress(){return this.isLongPressing}onMouseDown(e){if(1!==e.which||!this.pressEnabled)return;if(e.target.classList.contains("resize-handle"))return;this.mouseX=e.clientX,this.mouseY=e.clientY,this.pressing=!0,this.isLongPressing=!1;const t=Object(o.a)(document,"mouseup");this.subscription=t.subscribe(e=>this.onMouseup()),this.timeout=setTimeout(()=>{this.isLongPressing=!0,this.longPressStart.emit({event:e,model:this.pressModel}),this.subscription.add(Object(o.a)(document,"mousemove").pipe(Object(c.a)(t)).subscribe(e=>this.onMouseMove(e))),this.loop(e)},this.duration),this.loop(e)}onMouseMove(e){if(this.pressing&&!this.isLongPressing){const t=Math.abs(e.clientX-this.mouseX)>10,n=Math.abs(e.clientY-this.mouseY)>10;(t||n)&&this.endPress()}}loop(e){this.isLongPressing&&(this.timeout=setTimeout(()=>{this.longPressing.emit({event:e,model:this.pressModel}),this.loop(e)},50))}endPress(){clearTimeout(this.timeout),this.isLongPressing=!1,this.pressing=!1,this._destroySubscription(),this.longPressEnd.emit({model:this.pressModel})}onMouseup(){this.endPress()}ngOnDestroy(){this._destroySubscription()}_destroySubscription(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=i.Hb({type:e,selectors:[["","long-press",""]],hostVars:4,hostBindings:function(e,t){1&e&&i.gc("mousedown",(function(e){return t.onMouseDown(e)})),2&e&&i.Eb("press",t.press)("longpress",t.isLongPress)},inputs:{pressEnabled:"pressEnabled",duration:"duration",pressModel:"pressModel"},outputs:{longPressStart:"longPressStart",longPressing:"longPressing",longPressEnd:"longPressEnd"}}),e})(),be=(()=>{class e{constructor(e,t,n){this.ngZone=e,this.renderer=n,this.scrollbarV=!1,this.scrollbarH=!1,this.scroll=new i.o,this.scrollYPos=0,this.scrollXPos=0,this.prevScrollYPos=0,this.prevScrollXPos=0,this._scrollEventListener=null,this.element=t.nativeElement}ngOnInit(){if(this.scrollbarV||this.scrollbarH){const e=this.renderer;this.parentElement=e.parentNode(e.parentNode(this.element)),this._scrollEventListener=this.onScrolled.bind(this),this.parentElement.addEventListener("scroll",this._scrollEventListener)}}ngOnDestroy(){this._scrollEventListener&&(this.parentElement.removeEventListener("scroll",this._scrollEventListener),this._scrollEventListener=null)}setOffset(e){this.parentElement&&(this.parentElement.scrollTop=e)}onScrolled(e){const t=e.currentTarget;requestAnimationFrame(()=>{this.scrollYPos=t.scrollTop,this.scrollXPos=t.scrollLeft,this.updateOffset()})}updateOffset(){let e;this.scrollYPos<this.prevScrollYPos?e="down":this.scrollYPos>this.prevScrollYPos&&(e="up"),this.scroll.emit({direction:e,scrollYPos:this.scrollYPos,scrollXPos:this.scrollXPos}),this.prevScrollYPos=this.scrollYPos,this.prevScrollXPos=this.scrollXPos}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.A),i.Mb(i.m),i.Mb(i.E))},e.\u0275cmp=i.Gb({type:e,selectors:[["datatable-scroller"]],hostAttrs:[1,"datatable-scroll"],hostVars:4,hostBindings:function(e,t){2&e&&i.Kc("height",t.scrollHeight,"px")("width",t.scrollWidth,"px")},inputs:{scrollbarV:"scrollbarV",scrollbarH:"scrollbarH",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth"},outputs:{scroll:"scroll"},ngContentSelectors:u,decls:1,vars:0,template:function(e,t){1&e&&(i.oc(),i.nc(0))},encapsulation:2,changeDetection:0}),e})(),ge=(()=>{class e{constructor(e){this.template=e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.L))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngx-datatable-group-header-template",""]]}),e})(),_e=(()=>{class e{constructor(){this.rowHeight=0,this.toggle=new i.o}get template(){return this._templateInput||this._templateQuery}toggleExpandGroup(e){this.toggle.emit({type:"group",value:e})}expandAllGroups(){this.toggle.emit({type:"all",value:!0})}collapseAllGroups(){this.toggle.emit({type:"all",value:!1})}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=i.Hb({type:e,selectors:[["ngx-datatable-group-header"]],contentQueries:function(e,t,n){var r;1&e&&i.Ic(n,ge,!0,i.L),2&e&&i.zc(r=i.hc())&&(t._templateQuery=r.first)},inputs:{rowHeight:"rowHeight",_templateInput:["template","_templateInput"]},outputs:{toggle:"toggle"}}),e})();function ye(){return""}function ve(e){return null==e?ye:"number"==typeof e?we:-1!==e.indexOf(".")?Me:Se}function we(e,t){if(null==e)return"";if(!e||null==t)return e;const n=e[t];return null==n?"":n}function Se(e,t){if(null==e)return"";if(!e||!t)return e;const n=e[t];return null==n?"":n}function Me(e,t){if(null==e)return"";if(!e||!t)return e;let n=e[t];if(void 0!==n)return n;n=e;const i=t.split(".");if(i.length)for(let r=0;r<i.length;r++)if(n=n[i[r]],null==n)return"";return n}function xe(e){return e&&(t=>ve(e)(t,e))}function ke(e,t,n){if(t&&n){const i={},r=e.length;let s=null;i[0]=new De;const o=e.reduce((e,t)=>{const i=n(t);return-1===e.indexOf(i)&&e.push(i),e},[]);for(let t=0;t<r;t++)i[n(e[t])]=new De(e[t]);for(let c=0;c<r;c++){s=i[n(e[c])];let r=0;const a=t(s.row);a&&o.indexOf(a)>-1&&(r=a),s.parent=i[r],s.row.level=s.parent.row.level+1,s.parent.children.push(s)}let a=[];return i[0].flatten((function(){a=[...a,this.row]}),!0),a}return e}class De{constructor(e=null){e||(e={level:-1,treeStatus:"expanded"}),this.row=e,this.parent=null,this.children=[]}flatten(e,t){if("expanded"===this.row.treeStatus)for(let n=0,i=this.children.length;n<i;n++){const i=this.children[n];e.apply(i,Array.prototype.slice.call(arguments,2)),t&&i.flatten.apply(i,arguments)}}}function Te(e){return(e=(e=(e=e.replace(/[^a-zA-Z0-9 ]/g," ")).replace(/([a-z](?=[A-Z]))/g,"$1 ")).replace(/([^a-zA-Z0-9 ])|^[0-9]+/g,"").trim().toLowerCase()).replace(/([ 0-9]+)([a-zA-Z])/g,(function(e,t,n){return t.trim()+n.toUpperCase()}))}function Ce(e){if(!e)return;let t=!1;for(const n of e)n.$$id||(n.$$id=("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)),Oe(n.prop)&&n.name&&(n.prop=Te(n.name)),n.$$valueGetter||(n.$$valueGetter=ve(n.prop)),!Oe(n.prop)&&Oe(n.name)&&(n.name=String(n.prop).replace(/([A-Z])/g,e=>" "+e).replace(/^./,e=>e.toUpperCase())),Oe(n.prop)&&Oe(n.name)&&(n.name=""),n.hasOwnProperty("resizeable")||(n.resizeable=!0),n.hasOwnProperty("sortable")||(n.sortable=!0),n.hasOwnProperty("draggable")||(n.draggable=!0),n.hasOwnProperty("canAutoResize")||(n.canAutoResize=!0),n.hasOwnProperty("width")||(n.width=150),n.hasOwnProperty("isTreeColumn")&&n.isTreeColumn&&!t?t=!0:n.isTreeColumn=!1}function Oe(e){return null==e}var Le=function(e){return e.standard="standard",e.flex="flex",e.force="force",e}({}),Re=function(e){return e.single="single",e.multi="multi",e.multiClick="multiClick",e.cell="cell",e.checkbox="checkbox",e}({}),Ee=function(e){return e.single="single",e.multi="multi",e}({}),Ae=function(e){return e.header="header",e.body="body",e}({});let Ie=(()=>{class e{constructor(e){this.template=e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.L))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngx-datatable-header-template",""]]}),e})(),Pe=(()=>{class e{constructor(e){this.template=e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.L))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngx-datatable-cell-template",""]]}),e})(),je=(()=>{class e{constructor(e){this.template=e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.L))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngx-datatable-tree-toggle",""]]}),e})(),Ne=(()=>{class e{constructor(e){this.columnChangesService=e,this.isFirstChange=!0}get cellTemplate(){return this._cellTemplateInput||this._cellTemplateQuery}get headerTemplate(){return this._headerTemplateInput||this._headerTemplateQuery}get treeToggleTemplate(){return this._treeToggleTemplateInput||this._treeToggleTemplateQuery}ngOnChanges(){this.isFirstChange?this.isFirstChange=!1:this.columnChangesService.onInputChange()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(le))},e.\u0275dir=i.Hb({type:e,selectors:[["ngx-datatable-column"]],contentQueries:function(e,t,n){var r;1&e&&(i.Ic(n,Pe,!0,i.L),i.Ic(n,Ie,!0,i.L),i.Ic(n,je,!0,i.L)),2&e&&(i.zc(r=i.hc())&&(t._cellTemplateQuery=r.first),i.zc(r=i.hc())&&(t._headerTemplateQuery=r.first),i.zc(r=i.hc())&&(t._treeToggleTemplateQuery=r.first))},inputs:{name:"name",prop:"prop",frozenLeft:"frozenLeft",frozenRight:"frozenRight",flexGrow:"flexGrow",resizeable:"resizeable",comparator:"comparator",pipe:"pipe",sortable:"sortable",draggable:"draggable",canAutoResize:"canAutoResize",minWidth:"minWidth",width:"width",maxWidth:"maxWidth",checkboxable:"checkboxable",headerCheckboxable:"headerCheckboxable",headerClass:"headerClass",cellClass:"cellClass",isTreeColumn:"isTreeColumn",treeLevelIndent:"treeLevelIndent",summaryFunc:"summaryFunc",summaryTemplate:"summaryTemplate",_cellTemplateInput:["cellTemplate","_cellTemplateInput"],_headerTemplateInput:["headerTemplate","_headerTemplateInput"],_treeToggleTemplateInput:["treeToggleTemplate","_treeToggleTemplateInput"]},features:[i.wb]}),e})(),Fe=(()=>{class e{constructor(e){this.template=e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.L))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngx-datatable-row-detail-template",""]]}),e})(),Ye=(()=>{class e{constructor(){this.rowHeight=0,this.toggle=new i.o}get template(){return this._templateInput||this._templateQuery}toggleExpandRow(e){this.toggle.emit({type:"row",value:e})}expandAllRows(){this.toggle.emit({type:"all",value:!0})}collapseAllRows(){this.toggle.emit({type:"all",value:!1})}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=i.Hb({type:e,selectors:[["ngx-datatable-row-detail"]],contentQueries:function(e,t,n){var r;1&e&&i.Ic(n,Fe,!0,i.L),2&e&&i.zc(r=i.hc())&&(t._templateQuery=r.first)},inputs:{rowHeight:"rowHeight",_templateInput:["template","_templateInput"]},outputs:{toggle:"toggle"}}),e})(),ze=(()=>{class e{get template(){return this._templateInput||this._templateQuery}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=i.Hb({type:e,selectors:[["ngx-datatable-footer"]],contentQueries:function(e,t,n){var r;1&e&&i.Fb(n,ue,!0,i.L),2&e&&i.zc(r=i.hc())&&(t._templateQuery=r.first)},inputs:{footerHeight:"footerHeight",totalMessage:"totalMessage",selectedMessage:"selectedMessage",pagerLeftArrowIcon:"pagerLeftArrowIcon",pagerRightArrowIcon:"pagerRightArrowIcon",pagerPreviousIcon:"pagerPreviousIcon",pagerNextIcon:"pagerNextIcon",_templateInput:["template","_templateInput"]}}),e})();function $e(e){const t={left:[],center:[],right:[]};if(e)for(const n of e)n.frozenLeft?t.left.push(n):n.frozenRight?t.right.push(n):t.center.push(n);return t}function He(e,t){return{left:We(e.left),center:We(e.center),right:We(e.right),total:Math.floor(We(t))}}function We(e,t){let n=0;if(e)for(const i of e)n+=parseFloat(t&&i[t]?i[t]:i.width);return n}function Ve(e){const t=[],n=$e(e);return t.push({type:"left",columns:n.left}),t.push({type:"center",columns:n.center}),t.push({type:"right",columns:n.right}),t}class Be{constructor(){this.treeArray=[]}clearCache(){this.treeArray=[]}initCache(e){const{rows:t,rowHeight:n,detailRowHeight:i,externalVirtual:r,rowCount:s,rowIndexes:o,rowExpansions:a}=e,c="function"==typeof n,l="function"==typeof i;if(!c&&isNaN(n))throw new Error(`Row Height cache initialization failed. Please ensure that 'rowHeight' is a\n valid number or function value: (${n}) when 'scrollbarV' is enabled.`);if(!l&&isNaN(i))throw new Error(`Row Height cache initialization failed. Please ensure that 'detailRowHeight' is a\n valid number or function value: (${i}) when 'scrollbarV' is enabled.`);const u=r?s:t.length;this.treeArray=new Array(u);for(let d=0;d<u;++d)this.treeArray[d]=0;for(let d=0;d<u;++d){const e=t[d];let r=n;c&&(r=n(e));const s=a.has(e);e&&s&&(r+=l?i(e,o.get(e)):i),this.update(d,r)}}getRowIndex(e){return 0===e?0:this.calcRowIndex(e)}update(e,t){if(!this.treeArray.length)throw new Error(`Update at index ${e} with value ${t} failed:\n Row Height cache not initialized.`);const n=this.treeArray.length;for(e|=0;e<n;)this.treeArray[e]+=t,e|=e+1}query(e){if(!this.treeArray.length)throw new Error(`query at index ${e} failed: Fenwick tree array not initialized.`);let t=0;for(e|=0;e>=0;)t+=this.treeArray[e],e=(e&e+1)-1;return t}queryBetween(e,t){return this.query(t)-this.query(e-1)}calcRowIndex(e){if(!this.treeArray.length)return 0;let t=-1;const n=this.treeArray.length;for(let i=Math.pow(2,n.toString(2).length-1);0!==i;i>>=1){const r=t+i;r<n&&e>=this.treeArray[r]&&(e-=this.treeArray[r],t=r)}return t+1}}const Ue={},qe="undefined"!=typeof document?document.createElement("div").style:void 0,Ge=function(){const e="undefined"!=typeof window?window.getComputedStyle(document.documentElement,""):void 0,t=void 0!==e?Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/):null,n=null!==t?t[1]:void 0,i=void 0!==n?"WebKit|Moz|MS|O".match(new RegExp("("+n+")","i"))[1]:void 0;return i?{dom:i,lowercase:n,css:`-${n}-`,js:n[0].toUpperCase()+n.substr(1)}:void 0}();function Je(e){const t=Te(e);return Ue[t]||(void 0!==Ge&&void 0!==qe[Ge.css+e]?Ue[t]=Ge.css+e:void 0!==qe[e]&&(Ue[t]=e)),Ue[t]}const Qe="undefined"!=typeof window?Je("transform"):void 0,Ke="undefined"!=typeof window?Je("backfaceVisibility"):void 0,Ze="undefined"!=typeof window?!!Je("transform"):void 0,Xe="undefined"!=typeof window?!!Je("perspective"):void 0,et="undefined"!=typeof window?window.navigator.userAgent:"Chrome",tt=/Safari\//.test(et)&&!/Chrome\//.test(et);function nt(e,t,n){void 0!==Qe&&Ze?!tt&&Xe?(e[Qe]=`translate3d(${t}px, ${n}px, 0)`,e[Ke]="hidden"):e[Te(Qe)]=`translate(${t}px, ${n}px)`:(e.top=n+"px",e.left=t+"px")}let it=(()=>{class e{constructor(e){this.cd=e,this.selected=[],this.scroll=new i.o,this.page=new i.o,this.activate=new i.o,this.select=new i.o,this.detailToggle=new i.o,this.rowContextmenu=new i.o(!1),this.treeAction=new i.o,this.rowHeightsCache=new Be,this.temp=[],this.offsetY=0,this.indexes={},this.rowIndexes=new WeakMap,this.rowExpansions=[],this.getDetailRowHeight=(e,t)=>{if(!this.rowDetail)return 0;const n=this.rowDetail.rowHeight;return"function"==typeof n?n(e,t):n},this.rowTrackingFn=(e,t)=>{const n=this.getRowIndex(t);return this.trackByProp?t[this.trackByProp]:n}}set pageSize(e){this._pageSize=e,this.recalcLayout()}get pageSize(){return this._pageSize}set rows(e){this._rows=e,this.recalcLayout()}get rows(){return this._rows}set columns(e){this._columns=e;const t=$e(e);this.columnGroupWidths=He(t,e)}get columns(){return this._columns}set offset(e){this._offset=e,(!this.scrollbarV||this.scrollbarV&&!this.virtualization)&&this.recalcLayout()}get offset(){return this._offset}set rowCount(e){this._rowCount=e,this.recalcLayout()}get rowCount(){return this._rowCount}get bodyWidth(){return this.scrollbarH?this.innerWidth+"px":"100%"}set bodyHeight(e){this._bodyHeight=this.scrollbarV?e+"px":"auto",this.recalcLayout()}get bodyHeight(){return this._bodyHeight}get selectEnabled(){return!!this.selectionType}get scrollHeight(){if(this.scrollbarV&&this.virtualization&&this.rowCount)return this.rowHeightsCache.query(this.rowCount-1)}ngOnInit(){this.rowDetail&&(this.listener=this.rowDetail.toggle.subscribe(({type:e,value:t})=>{"row"===e&&this.toggleRowExpansion(t),"all"===e&&this.toggleAllRows(t),this.updateIndexes(),this.updateRows(),this.cd.markForCheck()})),this.groupHeader&&(this.listener=this.groupHeader.toggle.subscribe(({type:e,value:t})=>{"group"===e&&this.toggleRowExpansion(t),"all"===e&&this.toggleAllRows(t),this.updateIndexes(),this.updateRows(),this.cd.markForCheck()}))}ngOnDestroy(){(this.rowDetail||this.groupHeader)&&this.listener.unsubscribe()}updateOffsetY(e){this.scroller&&(this.scrollbarV&&this.virtualization&&e?e=this.rowHeightsCache.query(this.pageSize*e-1):this.scrollbarV&&!this.virtualization&&(e=0),this.scroller.setOffset(e||0))}onBodyScroll(e){const t=e.scrollYPos,n=e.scrollXPos;this.offsetY===t&&this.offsetX===n||this.scroll.emit({offsetY:t,offsetX:n}),this.offsetY=t,this.offsetX=n,this.updateIndexes(),this.updatePage(e.direction),this.updateRows()}updatePage(e){let t=this.indexes.first/this.pageSize;"up"===e?t=Math.ceil(t):"down"===e&&(t=Math.floor(t)),void 0===e||isNaN(t)||this.page.emit({offset:t})}updateRows(){const{first:e,last:t}=this.indexes;let n=e,i=0;const r=[];if(this.groupedRows){let e=3;for(1===this.groupedRows.length&&(e=this.groupedRows[0].value.length);n<t&&n<this.groupedRows.length;){const e=this.groupedRows[n];this.rowIndexes.set(e,n),e.value&&e.value.forEach((e,t)=>{this.rowIndexes.set(e,`${n}-${t}`)}),r[i]=e,i++,n++}}else for(;n<t&&n<this.rowCount;){const e=this.rows[n];e&&(this.rowIndexes.set(e,n),r[i]=e),i++,n++}this.temp=r}getRowHeight(e){return"function"==typeof this.rowHeight?this.rowHeight(e):this.rowHeight}getGroupHeight(e){let t=0;if(e.value)for(let n=0;n<e.value.length;n++)t+=this.getRowAndDetailHeight(e.value[n]);return t}getRowAndDetailHeight(e){let t=this.getRowHeight(e);return this.getRowExpanded(e)&&(t+=this.getDetailRowHeight(e)),t}getRowsStyles(e){const t={};if(this.groupedRows&&(t.width=this.columnGroupWidths.total),this.scrollbarV&&this.virtualization){let n=0;if(this.groupedRows){const t=e[e.length-1];n=t?this.getRowIndex(t):0}else n=this.getRowIndex(e);nt(t,0,this.rowHeightsCache.query(n-1))}return t}getBottomSummaryRowStyles(){if(!this.scrollbarV||!this.rows||!this.rows.length)return null;const e={position:"absolute"};return nt(e,0,this.rowHeightsCache.query(this.rows.length-1)),e}hideIndicator(){setTimeout(()=>this.loadingIndicator=!1,500)}updateIndexes(){let e=0,t=0;if(this.scrollbarV)if(this.virtualization){const n=parseInt(this.bodyHeight,0);e=this.rowHeightsCache.getRowIndex(this.offsetY),t=this.rowHeightsCache.getRowIndex(n+this.offsetY)+1}else e=0,t=this.rowCount;else this.externalPaging||(e=Math.max(this.offset*this.pageSize,0)),t=Math.min(e+this.pageSize,this.rowCount);this.indexes={first:e,last:t}}refreshRowHeightCache(){if(this.scrollbarV&&(!this.scrollbarV||this.virtualization)&&(this.rowHeightsCache.clearCache(),this.rows&&this.rows.length)){const e=new Set;for(const t of this.rows)this.getRowExpanded(t)&&e.add(t);this.rowHeightsCache.initCache({rows:this.rows,rowHeight:this.rowHeight,detailRowHeight:this.getDetailRowHeight,externalVirtual:this.scrollbarV&&this.externalPaging,rowCount:this.rowCount,rowIndexes:this.rowIndexes,rowExpansions:e})}}getAdjustedViewPortIndex(){const e=this.indexes.first;return this.scrollbarV&&this.virtualization&&this.rowHeightsCache.query(e-1)<=this.offsetY?e-1:e}toggleRowExpansion(e){const t=this.getAdjustedViewPortIndex(),n=this.getRowExpandedIdx(e,this.rowExpansions),i=n>-1;if(this.scrollbarV&&this.virtualization){const t=this.getDetailRowHeight(e)*(i?-1:1),n=this.getRowIndex(e);this.rowHeightsCache.update(n,t)}i?this.rowExpansions.splice(n,1):this.rowExpansions.push(e),this.detailToggle.emit({rows:[e],currentIndex:t})}toggleAllRows(e){this.rowExpansions=[];const t=this.getAdjustedViewPortIndex();if(e)for(const n of this.rows)this.rowExpansions.push(n);this.scrollbarV&&this.recalcLayout(),this.detailToggle.emit({rows:this.rows,currentIndex:t})}recalcLayout(){this.refreshRowHeightCache(),this.updateIndexes(),this.updateRows()}columnTrackingFn(e,t){return t.$$id}stylesByGroup(e){const t=this.columnGroupWidths,n=this.offsetX,i={width:t[e]+"px"};if("left"===e)nt(i,n,0);else if("right"===e){const e=parseInt(this.innerWidth+"",0);nt(i,-1*(t.total-e-n),0)}return i}getRowExpanded(e){if(0===this.rowExpansions.length&&this.groupExpansionDefault)for(const t of this.groupedRows)this.rowExpansions.push(t);return this.getRowExpandedIdx(e,this.rowExpansions)>-1}getRowExpandedIdx(e,t){if(!t||!t.length)return-1;const n=this.rowIdentity(e);return t.findIndex(e=>this.rowIdentity(e)===n)}getRowIndex(e){return this.rowIndexes.get(e)||0}onTreeAction(e){this.treeAction.emit({row:e})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.h))},e.\u0275cmp=i.Gb({type:e,selectors:[["datatable-body"]],viewQuery:function(e,t){var n;1&e&&i.Tc(be,!0),2&e&&i.zc(n=i.hc())&&(t.scroller=n.first)},hostAttrs:[1,"datatable-body"],hostVars:4,hostBindings:function(e,t){2&e&&i.Kc("width",t.bodyWidth)("height",t.bodyHeight)},inputs:{selected:"selected",pageSize:"pageSize",rows:"rows",columns:"columns",offset:"offset",rowCount:"rowCount",bodyHeight:"bodyHeight",offsetX:"offsetX",loadingIndicator:"loadingIndicator",scrollbarV:"scrollbarV",scrollbarH:"scrollbarH",externalPaging:"externalPaging",rowHeight:"rowHeight",emptyMessage:"emptyMessage",selectionType:"selectionType",rowIdentity:"rowIdentity",rowDetail:"rowDetail",groupHeader:"groupHeader",selectCheck:"selectCheck",displayCheck:"displayCheck",trackByProp:"trackByProp",rowClass:"rowClass",groupedRows:"groupedRows",groupExpansionDefault:"groupExpansionDefault",innerWidth:"innerWidth",groupRowsBy:"groupRowsBy",virtualization:"virtualization",summaryRow:"summaryRow",summaryPosition:"summaryPosition",summaryHeight:"summaryHeight"},outputs:{scroll:"scroll",page:"page",activate:"activate",select:"select",detailToggle:"detailToggle",rowContextmenu:"rowContextmenu",treeAction:"treeAction"},decls:5,vars:9,consts:[[4,"ngIf"],[3,"selected","rows","selectCheck","selectEnabled","selectionType","rowIdentity","select","activate"],["selector",""],[3,"scrollbarV","scrollbarH","scrollHeight","scrollWidth","scroll",4,"ngIf"],["class","empty-row",3,"innerHTML",4,"ngIf"],[3,"scrollbarV","scrollbarH","scrollHeight","scrollWidth","scroll"],[3,"rowHeight","offsetX","innerWidth","rows","columns",4,"ngIf"],[3,"groupedRows","innerWidth","ngStyle","rowDetail","groupHeader","offsetX","detailRowHeight","row","expanded","rowIndex","rowContextmenu",4,"ngFor","ngForOf","ngForTrackBy"],[3,"ngStyle","rowHeight","offsetX","innerWidth","rows","columns",4,"ngIf"],[3,"rowHeight","offsetX","innerWidth","rows","columns"],[3,"groupedRows","innerWidth","ngStyle","rowDetail","groupHeader","offsetX","detailRowHeight","row","expanded","rowIndex","rowContextmenu"],["tabindex","-1",3,"isSelected","innerWidth","offsetX","columns","rowHeight","row","rowIndex","expanded","rowClass","displayCheck","treeStatus","treeAction","activate",4,"ngIf","ngIfElse"],["groupedRowsTemplate",""],["tabindex","-1",3,"isSelected","innerWidth","offsetX","columns","rowHeight","row","rowIndex","expanded","rowClass","displayCheck","treeStatus","treeAction","activate"],["tabindex","-1",3,"isSelected","innerWidth","offsetX","columns","rowHeight","row","group","rowIndex","expanded","rowClass","activate",4,"ngFor","ngForOf","ngForTrackBy"],["tabindex","-1",3,"isSelected","innerWidth","offsetX","columns","rowHeight","row","group","rowIndex","expanded","rowClass","activate"],[3,"ngStyle","rowHeight","offsetX","innerWidth","rows","columns"],[1,"empty-row",3,"innerHTML"]],template:function(e,t){1&e&&(i.Mc(0,d,1,0,"datatable-progress",0),i.Sb(1,"datatable-selection",1,2),i.gc("select",(function(e){return t.select.emit(e)}))("activate",(function(e){return t.activate.emit(e)})),i.Mc(3,_,4,8,"datatable-scroller",3),i.Mc(4,y,1,1,"div",4),i.Rb()),2&e&&(i.pc("ngIf",t.loadingIndicator),i.yb(1),i.pc("selected",t.selected)("rows",t.rows)("selectCheck",t.selectCheck)("selectEnabled",t.selectEnabled)("selectionType",t.selectionType)("rowIdentity",t.rowIdentity),i.yb(2),i.pc("ngIf",null==t.rows?null:t.rows.length),i.yb(1),i.pc("ngIf",!(null!=t.rows&&t.rows.length||t.loadingIndicator)))},directives:function(){return[r.r,vt,pt,be,r.q,Mt,gt,r.s,bt]},encapsulation:2,changeDetection:0}),e})(),rt=(()=>{class e{constructor(e){this.cd=e,this.sort=new i.o,this.reorder=new i.o,this.resize=new i.o,this.select=new i.o,this.columnContextmenu=new i.o(!1),this._columnGroupWidths={total:100},this._styleByGroup={left:{},center:{},right:{}},this.destroyed=!1}set innerWidth(e){this._innerWidth=e,setTimeout(()=>{if(this._columns){const e=$e(this._columns);this._columnGroupWidths=He(e,this._columns),this.setStylesByGroup()}})}get innerWidth(){return this._innerWidth}set headerHeight(e){this._headerHeight="auto"!==e?e+"px":e}get headerHeight(){return this._headerHeight}set columns(e){this._columns=e;const t=$e(e);this._columnsByPin=Ve(e),setTimeout(()=>{this._columnGroupWidths=He(t,e),this.setStylesByGroup()})}get columns(){return this._columns}set offsetX(e){this._offsetX=e,this.setStylesByGroup()}get offsetX(){return this._offsetX}ngOnDestroy(){this.destroyed=!0}onLongPressStart({event:e,model:t}){t.dragging=!0,this.dragEventTarget=e}onLongPressEnd({event:e,model:t}){this.dragEventTarget=e,setTimeout(()=>{const e=this._columns.find(e=>e.$$id===t.$$id);e&&(e.dragging=!1)},5)}get headerWidth(){return this.scrollbarH?this.innerWidth+"px":"100%"}trackByGroups(e,t){return t.type}columnTrackingFn(e,t){return t.$$id}onColumnResized(e,t){e<=t.minWidth?e=t.minWidth:e>=t.maxWidth&&(e=t.maxWidth),this.resize.emit({column:t,prevValue:t.width,newValue:e})}onColumnReordered({prevIndex:e,newIndex:t,model:n}){const i=this.getColumn(t);i.isTarget=!1,i.targetMarkerContext=void 0,this.reorder.emit({column:n,prevValue:e,newValue:t})}onTargetChanged({prevIndex:e,newIndex:t,initialIndex:n}){if(e||0===e){const t=this.getColumn(e);t.isTarget=!1,t.targetMarkerContext=void 0}if(t||0===t){const e=this.getColumn(t);e.isTarget=!0,n!==t&&(e.targetMarkerContext={class:"targetMarker ".concat(n>t?"dragFromRight":"dragFromLeft")})}}getColumn(e){const t=this._columnsByPin[0].columns.length;if(e<t)return this._columnsByPin[0].columns[e];const n=this._columnsByPin[1].columns.length;return e<t+n?this._columnsByPin[1].columns[e-t]:this._columnsByPin[2].columns[e-t-n]}onSort({column:e,prevValue:t,newValue:n}){if(e.dragging)return;const i=this.calcNewSorts(e,t,n);this.sort.emit({sorts:i,column:e,prevValue:t,newValue:n})}calcNewSorts(e,t,n){let i=0;this.sorts||(this.sorts=[]);const r=this.sorts.map((t,n)=>((t=Object.assign({},t)).prop===e.prop&&(i=n),t));return void 0===n?r.splice(i,1):t?r[i].dir=n:(this.sortType===Ee.single&&r.splice(0,this.sorts.length),r.push({dir:n,prop:e.prop})),r}setStylesByGroup(){this._styleByGroup.left=this.calcStylesByGroup("left"),this._styleByGroup.center=this.calcStylesByGroup("center"),this._styleByGroup.right=this.calcStylesByGroup("right"),this.destroyed||this.cd.detectChanges()}calcStylesByGroup(e){const t=this._columnGroupWidths,n={width:t[e]+"px"};return"center"===e?nt(n,-1*this.offsetX,0):"right"===e&&nt(n,-1*(t.total-this.innerWidth),0),n}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.h))},e.\u0275cmp=i.Gb({type:e,selectors:[["datatable-header"]],hostAttrs:[1,"datatable-header"],hostVars:4,hostBindings:function(e,t){2&e&&i.Kc("height",t.headerHeight)("width",t.headerWidth)},inputs:{innerWidth:"innerWidth",headerHeight:"headerHeight",columns:"columns",offsetX:"offsetX",sorts:"sorts",sortAscendingIcon:"sortAscendingIcon",sortDescendingIcon:"sortDescendingIcon",sortUnsetIcon:"sortUnsetIcon",scrollbarH:"scrollbarH",dealsWithGroup:"dealsWithGroup",targetMarkerTemplate:"targetMarkerTemplate",sortType:"sortType",allRowsSelected:"allRowsSelected",selectionType:"selectionType",reorderable:"reorderable"},outputs:{sort:"sort",reorder:"reorder",resize:"resize",select:"select",columnContextmenu:"columnContextmenu"},decls:2,vars:4,consts:[["orderable","",1,"datatable-header-inner",3,"reorder","targetChanged"],[3,"class","ngStyle",4,"ngFor","ngForOf","ngForTrackBy"],[3,"ngStyle"],["resizeable","","long-press","","draggable","",3,"resizeEnabled","pressModel","pressEnabled","dragX","dragY","dragModel","dragEventTarget","headerHeight","isTarget","targetMarkerTemplate","targetMarkerContext","column","sortType","sorts","selectionType","sortAscendingIcon","sortDescendingIcon","sortUnsetIcon","allRowsSelected","resize","longPressStart","longPressEnd","sort","select","columnContextmenu",4,"ngFor","ngForOf","ngForTrackBy"],["resizeable","","long-press","","draggable","",3,"resizeEnabled","pressModel","pressEnabled","dragX","dragY","dragModel","dragEventTarget","headerHeight","isTarget","targetMarkerTemplate","targetMarkerContext","column","sortType","sorts","selectionType","sortAscendingIcon","sortDescendingIcon","sortUnsetIcon","allRowsSelected","resize","longPressStart","longPressEnd","sort","select","columnContextmenu"]],template:function(e,t){1&e&&(i.Sb(0,"div",0),i.gc("reorder",(function(e){return t.onColumnReordered(e)}))("targetChanged",(function(e){return t.onTargetChanged(e)})),i.Mc(1,w,2,5,"div",1),i.Rb()),2&e&&(i.Kc("width",t._columnGroupWidths.total,"px"),i.yb(1),i.pc("ngForOf",t._columnsByPin)("ngForTrackBy",t.trackByGroups))},directives:function(){return[pe,r.q,r.s,dt,fe,me,he]},encapsulation:2,changeDetection:0}),e})();function st(e,t,n){let i,r,s;n=n||{};let o=null,a=0;function c(){a=!1===n.leading?0:+new Date,o=null,s=e.apply(i,r)}return function(){const l=+new Date;a||!1!==n.leading||(a=l);const u=t-(l-a);return i=this,r=arguments,u<=0?(clearTimeout(o),o=null,a=l,s=e.apply(i,r)):o||!1===n.trailing||(o=setTimeout(c,u)),s}}function ot(e,t){for(const n of t){const t=e.indexOf(n);e.splice(t,1)}}function at(e,t=300){let n=0;for(const i of e)n+=i.width||t;return n}var ct=function(e){return e.asc="asc",e.desc="desc",e}({});function lt(e,t){if(null==e&&(e=0),null==t&&(t=0),e instanceof Date&&t instanceof Date){if(e<t)return-1;if(e>t)return 1}else if(isNaN(parseFloat(e))||!isFinite(e)||isNaN(parseFloat(t))||!isFinite(t)){if(e=String(e),t=String(t),e.toLowerCase()<t.toLowerCase())return-1;if(e.toLowerCase()>t.toLowerCase())return 1}else{if(parseFloat(e)<parseFloat(t))return-1;if(parseFloat(e)>parseFloat(t))return 1}return 0}let ut=(()=>{class e{constructor(e,t,n,r,s,o,c){this.scrollbarHelper=e,this.dimensionsHelper=t,this.cd=n,this.columnChangesService=o,this.configuration=c,this.selected=[],this.scrollbarV=!1,this.scrollbarH=!1,this.rowHeight=30,this.columnMode=Le.standard,this.headerHeight=30,this.footerHeight=0,this.externalPaging=!1,this.externalSorting=!1,this.loadingIndicator=!1,this.reorderable=!0,this.swapColumns=!0,this.sortType=Ee.single,this.sorts=[],this.cssClasses={sortAscending:"datatable-icon-up",sortDescending:"datatable-icon-down",sortUnset:"datatable-icon-sort-unset",pagerLeftArrow:"datatable-icon-left",pagerRightArrow:"datatable-icon-right",pagerPrevious:"datatable-icon-prev",pagerNext:"datatable-icon-skip"},this.messages={emptyMessage:"No data to display",totalMessage:"total",selectedMessage:"selected"},this.groupExpansionDefault=!1,this.selectAllRowsOnPage=!1,this.virtualization=!0,this.summaryRow=!1,this.summaryHeight=30,this.summaryPosition="top",this.scroll=new i.o,this.activate=new i.o,this.select=new i.o,this.sort=new i.o,this.page=new i.o,this.reorder=new i.o,this.resize=new i.o,this.tableContextmenu=new i.o(!1),this.treeAction=new i.o,this.rowCount=0,this._offsetX=new a.a(0),this._count=0,this._offset=0,this._subscriptions=[],this.rowIdentity=e=>this._groupRowsBy?e.key:e,this.element=r.nativeElement,this.rowDiffer=s.find({}).create(),this.configuration&&this.configuration.messages&&(this.messages=Object.assign({},this.configuration.messages))}set rows(e){this._rows=e,e&&(this._internalRows=[...e]),this.externalSorting||this.sortInternalRows(),this._internalRows=ke(this._internalRows,xe(this.treeFromRelation),xe(this.treeToRelation)),this.recalculate(),this._rows&&this._groupRowsBy&&(this.groupedRows=this.groupArrayBy(this._rows,this._groupRowsBy)),this.cd.markForCheck()}get rows(){return this._rows}set groupRowsBy(e){e&&(this._groupRowsBy=e,this._rows&&this._groupRowsBy&&(this.groupedRows=this.groupArrayBy(this._rows,this._groupRowsBy)))}get groupRowsBy(){return this._groupRowsBy}set columns(e){e&&(this._internalColumns=[...e],Ce(this._internalColumns),this.recalculateColumns()),this._columns=e}get columns(){return this._columns}set limit(e){this._limit=e,this.recalculate()}get limit(){return this._limit}set count(e){this._count=e,this.recalculate()}get count(){return this._count}set offset(e){this._offset=e}get offset(){return Math.max(Math.min(this._offset,Math.ceil(this.rowCount/this.pageSize)-1),0)}get isFixedHeader(){const e=this.headerHeight;return"string"!=typeof e||"auto"!==e}get isFixedRow(){return"auto"!==this.rowHeight}get isVertScroll(){return this.scrollbarV}get isVirtualized(){return this.virtualization}get isHorScroll(){return this.scrollbarH}get isSelectable(){return void 0!==this.selectionType}get isCheckboxSelection(){return this.selectionType===Re.checkbox}get isCellSelection(){return this.selectionType===Re.cell}get isSingleSelection(){return this.selectionType===Re.single}get isMultiSelection(){return this.selectionType===Re.multi}get isMultiClickSelection(){return this.selectionType===Re.multiClick}set columnTemplates(e){this._columnTemplates=e,this.translateColumns(e)}get columnTemplates(){return this._columnTemplates}get allRowsSelected(){let e=this.rows&&this.selected&&this.selected.length===this.rows.length;if(this.bodyComponent&&this.selectAllRowsOnPage){const t=this.bodyComponent.indexes;e=this.selected.length===t.last-t.first}return this.selected&&this.rows&&0!==this.rows.length&&e}ngOnInit(){this.recalculate()}ngAfterViewInit(){this.externalSorting||this.sortInternalRows(),"undefined"!=typeof requestAnimationFrame&&requestAnimationFrame(()=>{this.recalculate(),this.externalPaging&&this.scrollbarV&&this.page.emit({count:this.count,pageSize:this.pageSize,limit:this.limit,offset:0})})}ngAfterContentInit(){this.columnTemplates.changes.subscribe(e=>this.translateColumns(e)),this.listenForColumnInputChanges()}translateColumns(e){if(e){const t=e.toArray();t.length&&(this._internalColumns=function(e){const t=[];for(const n of e){const e={},i=Object.getOwnPropertyNames(n);for(const t of i)e[t]=n[t];n.headerTemplate&&(e.headerTemplate=n.headerTemplate),n.cellTemplate&&(e.cellTemplate=n.cellTemplate),n.summaryFunc&&(e.summaryFunc=n.summaryFunc),n.summaryTemplate&&(e.summaryTemplate=n.summaryTemplate),t.push(e)}return t}(t),Ce(this._internalColumns),this.recalculateColumns(),this.sortInternalRows(),this.cd.markForCheck())}}groupArrayBy(e,t){const n=new Map;return e.forEach(e=>{const i=e[t];n.has(i)?n.get(i).push(e):n.set(i,[e])}),Array.from(n,e=>({key:e[0],value:e[1]}))}ngDoCheck(){this.rowDiffer.diff(this.rows)&&(this.externalSorting?this._internalRows=[...this.rows]:this.sortInternalRows(),this._internalRows=ke(this._internalRows,xe(this.treeFromRelation),xe(this.treeToRelation)),this.recalculatePages(),this.cd.markForCheck())}recalculate(){this.recalculateDims(),this.recalculateColumns(),this.cd.markForCheck()}onWindowResize(){this.recalculate()}recalculateColumns(e=this._internalColumns,t=-1,n=this.scrollbarH){if(!e)return;let i=this._innerWidth;return this.scrollbarV&&(i-=this.scrollbarHelper.width),this.columnMode===Le.force?function(e,t,n,i,r=300){const s=e.slice(n+1,e.length).filter(e=>!1!==e.canAutoResize);for(const d of s)d.$$oldWidth||(d.$$oldWidth=d.width);let o=0,a=!1,c=at(e,r),l=t-c;const u=[];do{o=l/s.length,a=c>=t;for(const e of s){if(a&&i)e.width=e.$$oldWidth||e.width||r;else{const t=(e.width||r)+o;e.minWidth&&t<e.minWidth?(e.width=e.minWidth,u.push(e)):e.maxWidth&&t>e.maxWidth?(e.width=e.maxWidth,u.push(e)):e.width=t}e.width=Math.max(0,e.width)}c=at(e),l=t-c,ot(s,u)}while(l>1&&0!==s.length)}(e,i,t,n):this.columnMode===Le.flex&&function(e,t){const n=function(e,t){let n=0;for(const i of e)n+=i.width;return n}(e),i=function(e){let t=0;for(const n of e)t+=n.flexGrow||0;return t}(e),r=$e(e);n!==t&&function(e,t,n){for(const s in e)for(const i of e[s])i.canAutoResize?i.width=0:(t-=i.width,n-=i.flexGrow?i.flexGrow:0);const i={};let r=t;do{const t=r/n;r=0;for(const n in e)for(const s of e[n])if(s.canAutoResize&&!i[s.prop]){const e=s.width+s.flexGrow*t;void 0!==s.minWidth&&e<s.minWidth?(r+=e-s.minWidth,s.width=s.minWidth,i[s.prop]=!0):s.width=e}}while(0!==r)}(r,t,i)}(e,i),e}recalculateDims(){const e=this.dimensionsHelper.getDimensions(this.element);if(this._innerWidth=Math.floor(e.width),this.scrollbarV){let t=e.height;this.headerHeight&&(t-=this.headerHeight),this.footerHeight&&(t-=this.footerHeight),this.bodyHeight=t}this.recalculatePages()}recalculatePages(){this.pageSize=this.calcPageSize(),this.rowCount=this.calcRowCount()}onBodyPage({offset:e}){this.externalPaging&&!this.virtualization||(this.offset=e,this.page.emit({count:this.count,pageSize:this.pageSize,limit:this.limit,offset:this.offset}))}onBodyScroll(e){this._offsetX.next(e.offsetX),this.scroll.emit(e),this.cd.detectChanges()}onFooterPage(e){this.offset=e.page-1,this.bodyComponent.updateOffsetY(this.offset),this.page.emit({count:this.count,pageSize:this.pageSize,limit:this.limit,offset:this.offset}),this.selectAllRowsOnPage&&(this.selected=[],this.select.emit({selected:this.selected}))}calcPageSize(e=this.rows){if(this.scrollbarV&&this.virtualization){const e=Math.ceil(this.bodyHeight/this.rowHeight);return Math.max(e,0)}return void 0!==this.limit?this.limit:e?e.length:0}calcRowCount(e=this.rows){return this.externalPaging?this.count:e?this.groupedRows?this.groupedRows.length:null!=this.treeFromRelation&&null!=this.treeToRelation?this._internalRows.length:e.length:0}onColumnContextmenu({event:e,column:t}){this.tableContextmenu.emit({event:e,type:Ae.header,content:t})}onRowContextmenu({event:e,row:t}){this.tableContextmenu.emit({event:e,type:Ae.body,content:t})}onColumnResize({column:e,newValue:t}){if(void 0===e)return;let n;const i=this._internalColumns.map((i,r)=>((i=Object.assign({},i)).$$id===e.$$id&&(n=r,i.width=t,i.$$oldWidth=t),i));this.recalculateColumns(i,n),this._internalColumns=i,this.resize.emit({column:e,newValue:t})}onColumnReorder({column:e,newValue:t,prevValue:n}){const i=this._internalColumns.map(e=>Object.assign({},e));if(this.swapColumns){const r=i[t];i[t]=e,i[n]=r}else if(t>n){const e=i[n];for(let r=n;r<t;r++)i[r]=i[r+1];i[t]=e}else{const e=i[n];for(let r=n;r>t;r--)i[r]=i[r-1];i[t]=e}this._internalColumns=i,this.reorder.emit({column:e,newValue:t,prevValue:n})}onColumnSort(e){this.selectAllRowsOnPage&&(this.selected=[],this.select.emit({selected:this.selected})),this.sorts=e.sorts,!1===this.externalSorting&&this.sortInternalRows(),this._internalRows=ke(this._internalRows,xe(this.treeFromRelation),xe(this.treeToRelation)),this.offset=0,this.bodyComponent.updateOffsetY(this.offset),this.sort.emit(e)}onHeaderSelect(e){if(this.bodyComponent&&this.selectAllRowsOnPage){const e=this.bodyComponent.indexes.first,t=this.bodyComponent.indexes.last,n=this.selected.length===t-e;this.selected=[],n||this.selected.push(...this._internalRows.slice(e,t))}else{const e=this.selected.length===this.rows.length;this.selected=[],e||this.selected.push(...this.rows)}this.select.emit({selected:this.selected})}onBodySelect(e){this.select.emit(e)}onTreeAction(e){const t=e.row,n=this._rows.findIndex(t=>t[this.treeToRelation]===e.row[this.treeToRelation]);this.treeAction.emit({row:t,rowIndex:n})}ngOnDestroy(){this._subscriptions.forEach(e=>e.unsubscribe())}listenForColumnInputChanges(){this._subscriptions.push(this.columnChangesService.columnInputChanges$.subscribe(()=>{this.columnTemplates&&this.columnTemplates.notifyOnChanges()}))}sortInternalRows(){this._internalRows=function(e,t,n){if(!e)return[];if(!n||!n.length||!t)return[...e];const i=new Map;e.forEach((e,t)=>i.set(e,t));const r=[...e],s=t.reduce((e,t)=>(t.comparator&&"function"==typeof t.comparator&&(e[t.prop]=t.comparator),e),{}),o=n.map(e=>{const t=e.prop;return{prop:t,dir:e.dir,valueGetter:ve(t),compareFn:s[t]||lt}});return r.sort((function(e,t){for(const n of o){const{prop:i,valueGetter:r}=n,s=r(e,i),o=r(t,i),a=n.dir!==ct.desc?n.compareFn(s,o,e,t,n.dir):-n.compareFn(s,o,e,t,n.dir);if(0!==a)return a}return i.has(e)&&i.has(t)?i.get(e)<i.get(t)?-1:1:0}))}(this._internalRows,this._internalColumns,this.sorts)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(ae,4),i.Mb(ce,4),i.Mb(i.h),i.Mb(i.m),i.Mb(i.u),i.Mb(le),i.Mb("configuration",8))},e.\u0275cmp=i.Gb({type:e,selectors:[["ngx-datatable"]],contentQueries:function(e,t,n){var r;1&e&&(i.Fb(n,Ye,!0),i.Fb(n,_e,!0),i.Fb(n,ze,!0),i.Fb(n,Ne,!1)),2&e&&(i.zc(r=i.hc())&&(t.rowDetail=r.first),i.zc(r=i.hc())&&(t.groupHeader=r.first),i.zc(r=i.hc())&&(t.footer=r.first),i.zc(r=i.hc())&&(t.columnTemplates=r))},viewQuery:function(e,t){var n;1&e&&(i.Tc(it,!0),i.Tc(rt,!0)),2&e&&(i.zc(n=i.hc())&&(t.bodyComponent=n.first),i.zc(n=i.hc())&&(t.headerComponent=n.first))},hostAttrs:[1,"ngx-datatable"],hostVars:22,hostBindings:function(e,t){1&e&&i.gc("resize",(function(){return t.onWindowResize()}),!1,i.Cc),2&e&&i.Eb("fixed-header",t.isFixedHeader)("fixed-row",t.isFixedRow)("scroll-vertical",t.isVertScroll)("virtualized",t.isVirtualized)("scroll-horz",t.isHorScroll)("selectable",t.isSelectable)("checkbox-selection",t.isCheckboxSelection)("cell-selection",t.isCellSelection)("single-selection",t.isSingleSelection)("multi-selection",t.isMultiSelection)("multi-click-selection",t.isMultiClickSelection)},inputs:{selected:"selected",scrollbarV:"scrollbarV",scrollbarH:"scrollbarH",rowHeight:"rowHeight",columnMode:"columnMode",headerHeight:"headerHeight",footerHeight:"footerHeight",externalPaging:"externalPaging",externalSorting:"externalSorting",loadingIndicator:"loadingIndicator",reorderable:"reorderable",swapColumns:"swapColumns",sortType:"sortType",sorts:"sorts",cssClasses:"cssClasses",messages:"messages",groupExpansionDefault:"groupExpansionDefault",selectAllRowsOnPage:"selectAllRowsOnPage",virtualization:"virtualization",summaryRow:"summaryRow",summaryHeight:"summaryHeight",summaryPosition:"summaryPosition",rowIdentity:"rowIdentity",rows:"rows",groupedRows:"groupedRows",groupRowsBy:"groupRowsBy",columns:"columns",limit:"limit",count:"count",offset:"offset",targetMarkerTemplate:"targetMarkerTemplate",selectionType:"selectionType",rowClass:"rowClass",selectCheck:"selectCheck",displayCheck:"displayCheck",trackByProp:"trackByProp",treeFromRelation:"treeFromRelation",treeToRelation:"treeToRelation"},outputs:{scroll:"scroll",activate:"activate",select:"select",sort:"sort",page:"page",reorder:"reorder",resize:"resize",tableContextmenu:"tableContextmenu",treeAction:"treeAction"},decls:5,vars:34,consts:[["visibilityObserver","",3,"visible"],[3,"sorts","sortType","scrollbarH","innerWidth","offsetX","dealsWithGroup","columns","headerHeight","reorderable","targetMarkerTemplate","sortAscendingIcon","sortDescendingIcon","sortUnsetIcon","allRowsSelected","selectionType","sort","resize","reorder","select","columnContextmenu",4,"ngIf"],[3,"groupRowsBy","groupedRows","rows","groupExpansionDefault","scrollbarV","scrollbarH","virtualization","loadingIndicator","externalPaging","rowHeight","rowCount","offset","trackByProp","columns","pageSize","offsetX","rowDetail","groupHeader","selected","innerWidth","bodyHeight","selectionType","emptyMessage","rowIdentity","rowClass","selectCheck","displayCheck","summaryRow","summaryHeight","summaryPosition","page","activate","rowContextmenu","select","scroll","treeAction"],[3,"rowCount","pageSize","offset","footerHeight","footerTemplate","totalMessage","pagerLeftArrowIcon","pagerRightArrowIcon","pagerPreviousIcon","selectedCount","selectedMessage","pagerNextIcon","page",4,"ngIf"],[3,"sorts","sortType","scrollbarH","innerWidth","offsetX","dealsWithGroup","columns","headerHeight","reorderable","targetMarkerTemplate","sortAscendingIcon","sortDescendingIcon","sortUnsetIcon","allRowsSelected","selectionType","sort","resize","reorder","select","columnContextmenu"],[3,"rowCount","pageSize","offset","footerHeight","footerTemplate","totalMessage","pagerLeftArrowIcon","pagerRightArrowIcon","pagerPreviousIcon","selectedCount","selectedMessage","pagerNextIcon","page"]],template:function(e,t){1&e&&(i.Sb(0,"div",0),i.gc("visible",(function(){return t.recalculate()})),i.Mc(1,S,2,17,"datatable-header",1),i.Sb(2,"datatable-body",2),i.gc("page",(function(e){return t.onBodyPage(e)}))("activate",(function(e){return t.activate.emit(e)}))("rowContextmenu",(function(e){return t.onRowContextmenu(e)}))("select",(function(e){return t.onBodySelect(e)}))("scroll",(function(e){return t.onBodyScroll(e)}))("treeAction",(function(e){return t.onTreeAction(e)})),i.jc(3,"async"),i.Rb(),i.Mc(4,M,1,12,"datatable-footer",3),i.Rb()),2&e&&(i.yb(1),i.pc("ngIf",t.headerHeight),i.yb(1),i.pc("groupRowsBy",t.groupRowsBy)("groupedRows",t.groupedRows)("rows",t._internalRows)("groupExpansionDefault",t.groupExpansionDefault)("scrollbarV",t.scrollbarV)("scrollbarH",t.scrollbarH)("virtualization",t.virtualization)("loadingIndicator",t.loadingIndicator)("externalPaging",t.externalPaging)("rowHeight",t.rowHeight)("rowCount",t.rowCount)("offset",t.offset)("trackByProp",t.trackByProp)("columns",t._internalColumns)("pageSize",t.pageSize)("offsetX",i.kc(3,32,t._offsetX))("rowDetail",t.rowDetail)("groupHeader",t.groupHeader)("selected",t.selected)("innerWidth",t._innerWidth)("bodyHeight",t.bodyHeight)("selectionType",t.selectionType)("emptyMessage",t.messages.emptyMessage)("rowIdentity",t.rowIdentity)("rowClass",t.rowClass)("selectCheck",t.selectCheck)("displayCheck",t.displayCheck)("summaryRow",t.summaryRow)("summaryHeight",t.summaryHeight)("summaryPosition",t.summaryPosition),i.yb(2),i.pc("ngIf",t.footerHeight))},directives:function(){return[de,r.r,it,rt,ht]},pipes:function(){return[r.b]},styles:[".ngx-datatable{display:block;justify-content:center;overflow:hidden;position:relative;transform:translateZ(0)}.ngx-datatable [hidden]{display:none!important}.ngx-datatable *,.ngx-datatable :after,.ngx-datatable :before{box-sizing:border-box}.ngx-datatable.scroll-vertical .datatable-body{overflow-y:auto}.ngx-datatable.scroll-vertical.virtualized .datatable-body .datatable-row-wrapper{position:absolute}.ngx-datatable.scroll-horz .datatable-body{-webkit-overflow-scrolling:touch;overflow-x:auto}.ngx-datatable.fixed-header .datatable-header .datatable-header-inner{white-space:nowrap}.ngx-datatable.fixed-header .datatable-header .datatable-header-inner .datatable-header-cell{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ngx-datatable.fixed-row .datatable-scroll,.ngx-datatable.fixed-row .datatable-scroll .datatable-body-row{white-space:nowrap}.ngx-datatable.fixed-row .datatable-scroll .datatable-body-row .datatable-body-cell,.ngx-datatable.fixed-row .datatable-scroll .datatable-body-row .datatable-body-group-cell{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ngx-datatable .datatable-body-row,.ngx-datatable .datatable-header-inner,.ngx-datatable .datatable-row-center{-o-flex-flow:row;display:flex;flex-direction:row;flex-flow:row}.ngx-datatable .datatable-body-cell,.ngx-datatable .datatable-header-cell{display:inline-block;line-height:1.625;overflow-x:hidden;vertical-align:top}.ngx-datatable .datatable-body-cell:focus,.ngx-datatable .datatable-header-cell:focus{outline:none}.ngx-datatable .datatable-row-left,.ngx-datatable .datatable-row-right{z-index:9}.ngx-datatable .datatable-row-center,.ngx-datatable .datatable-row-group,.ngx-datatable .datatable-row-left,.ngx-datatable .datatable-row-right{position:relative}.ngx-datatable .datatable-header{display:block;overflow:hidden}.ngx-datatable .datatable-header .datatable-header-inner{-webkit-align-items:stretch;align-items:stretch}.ngx-datatable .datatable-header .datatable-header-cell{display:inline-block;position:relative}.ngx-datatable .datatable-header .datatable-header-cell.sortable .datatable-header-cell-wrapper{cursor:pointer}.ngx-datatable .datatable-header .datatable-header-cell.longpress .datatable-header-cell-wrapper{cursor:move}.ngx-datatable .datatable-header .datatable-header-cell .sort-btn{cursor:pointer;display:inline-block;line-height:100%;vertical-align:middle}.ngx-datatable .datatable-header .datatable-header-cell .resize-handle,.ngx-datatable .datatable-header .datatable-header-cell .resize-handle--not-resizable{bottom:0;display:inline-block;padding:0 4px;position:absolute;right:0;top:0;visibility:hidden;width:5px}.ngx-datatable .datatable-header .datatable-header-cell .resize-handle{cursor:ew-resize}.ngx-datatable .datatable-header .datatable-header-cell.resizeable:hover .resize-handle,.ngx-datatable .datatable-header .datatable-header-cell:hover .resize-handle--not-resizable{visibility:visible}.ngx-datatable .datatable-header .datatable-header-cell .targetMarker{bottom:0;position:absolute;top:0}.ngx-datatable .datatable-header .datatable-header-cell .targetMarker.dragFromLeft{right:0}.ngx-datatable .datatable-header .datatable-header-cell .targetMarker.dragFromRight{left:0}.ngx-datatable .datatable-header .datatable-header-cell .datatable-header-cell-template-wrap{height:inherit}.ngx-datatable .datatable-body{display:block;position:relative;z-index:10}.ngx-datatable .datatable-body .datatable-scroll{display:inline-block}.ngx-datatable .datatable-body .datatable-row-detail{overflow-y:hidden}.ngx-datatable .datatable-body .datatable-row-wrapper{display:flex;flex-direction:column}.ngx-datatable .datatable-body .datatable-body-row{outline:none}.ngx-datatable .datatable-body .datatable-body-row>div{display:flex}.ngx-datatable .datatable-footer{display:block;overflow:auto;width:100%}.ngx-datatable .datatable-footer .datatable-footer-inner{align-items:center;display:flex;width:100%}.ngx-datatable .datatable-footer .selected-count .page-count{flex:1 1 40%}.ngx-datatable .datatable-footer .selected-count .datatable-pager{flex:1 1 60%}.ngx-datatable .datatable-footer .page-count{flex:1 1 20%}.ngx-datatable .datatable-footer .datatable-pager{flex:1 1 80%;text-align:right}.ngx-datatable .datatable-footer .datatable-pager .pager,.ngx-datatable .datatable-footer .datatable-pager .pager li{display:inline-block;list-style:none;margin:0;padding:0}.ngx-datatable .datatable-footer .datatable-pager .pager li,.ngx-datatable .datatable-footer .datatable-pager .pager li a{outline:none}.ngx-datatable .datatable-footer .datatable-pager .pager li a{cursor:pointer;display:inline-block}.ngx-datatable .datatable-footer .datatable-pager .pager li.disabled a{cursor:not-allowed}"],encapsulation:2,changeDetection:0}),Object(l.b)([function(e,t,n){return{configurable:!0,enumerable:n.enumerable,get:function(){return Object.defineProperty(this,t,{configurable:!0,enumerable:n.enumerable,value:st(n.value,5,void 0)}),this[t]}}}],e.prototype,"onWindowResize",null),e})(),dt=(()=>{class e{constructor(e){this.cd=e,this.sort=new i.o,this.select=new i.o,this.columnContextmenu=new i.o(!1),this.sortFn=this.onSort.bind(this),this.selectFn=this.select.emit.bind(this.select),this.cellContext={column:this.column,sortDir:this.sortDir,sortFn:this.sortFn,allRowsSelected:this.allRowsSelected,selectFn:this.selectFn}}set allRowsSelected(e){this._allRowsSelected=e,this.cellContext.allRowsSelected=e}get allRowsSelected(){return this._allRowsSelected}set column(e){this._column=e,this.cellContext.column=e,this.cd.markForCheck()}get column(){return this._column}set sorts(e){this._sorts=e,this.sortDir=this.calcSortDir(e),this.cellContext.sortDir=this.sortDir,this.sortClass=this.calcSortClass(this.sortDir),this.cd.markForCheck()}get sorts(){return this._sorts}get columnCssClasses(){let e="datatable-header-cell";if(this.column.sortable&&(e+=" sortable"),this.column.resizeable&&(e+=" resizeable"),this.column.headerClass)if("string"==typeof this.column.headerClass)e+=" "+this.column.headerClass;else if("function"==typeof this.column.headerClass){const t=this.column.headerClass({column:this.column});if("string"==typeof t)e+=t;else if("object"==typeof t){const n=Object.keys(t);for(const i of n)!0===t[i]&&(e+=" "+i)}}const t=this.sortDir;return t&&(e+=" sort-active sort-"+t),e}get name(){return void 0===this.column.headerTemplate?this.column.name:void 0}get minWidth(){return this.column.minWidth}get maxWidth(){return this.column.maxWidth}get width(){return this.column.width}get isCheckboxable(){return this.column.checkboxable&&this.column.headerCheckboxable&&this.selectionType===Re.checkbox}onContextmenu(e){this.columnContextmenu.emit({event:e,column:this.column})}ngOnInit(){this.sortClass=this.calcSortClass(this.sortDir)}calcSortDir(e){if(e&&this.column){const t=e.find(e=>e.prop===this.column.prop);if(t)return t.dir}}onSort(){if(!this.column.sortable)return;const e=(t=this.sortDir,this.sortType===Ee.single?t===ct.asc?ct.desc:ct.asc:t?t===ct.asc?ct.desc:void 0:ct.asc);var t;this.sort.emit({column:this.column,prevValue:this.sortDir,newValue:e})}calcSortClass(e){if(this.cellContext.column.sortable)return e===ct.asc?"sort-btn sort-asc "+this.sortAscendingIcon:e===ct.desc?"sort-btn sort-desc "+this.sortDescendingIcon:"sort-btn "+this.sortUnsetIcon}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.h))},e.\u0275cmp=i.Gb({type:e,selectors:[["datatable-header-cell"]],hostAttrs:[1,"datatable-header-cell"],hostVars:11,hostBindings:function(e,t){1&e&&i.gc("contextmenu",(function(e){return t.onContextmenu(e)})),2&e&&(i.zb("title",t.name),i.Ab(t.columnCssClasses),i.Kc("min-width",t.minWidth,"px")("max-width",t.maxWidth,"px")("width",t.width,"px")("height",t.headerHeight,"px"))},inputs:{allRowsSelected:"allRowsSelected",column:"column",sorts:"sorts",sortType:"sortType",sortAscendingIcon:"sortAscendingIcon",sortDescendingIcon:"sortDescendingIcon",sortUnsetIcon:"sortUnsetIcon",isTarget:"isTarget",targetMarkerTemplate:"targetMarkerTemplate",targetMarkerContext:"targetMarkerContext",selectionType:"selectionType",headerHeight:"headerHeight"},outputs:{sort:"sort",select:"select",columnContextmenu:"columnContextmenu"},decls:6,vars:6,consts:[[1,"datatable-header-cell-template-wrap"],[4,"ngIf"],["class","datatable-checkbox",4,"ngIf"],["class","datatable-header-cell-wrapper",4,"ngIf"],[3,"click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"datatable-checkbox"],["type","checkbox",3,"checked","change"],[1,"datatable-header-cell-wrapper"],[1,"datatable-header-cell-label","draggable",3,"innerHTML","click"]],template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Mc(1,k,1,2,void 0,1),i.Mc(2,D,2,1,"label",2),i.Mc(3,T,2,1,"span",3),i.Mc(4,O,1,2,void 0,1),i.Sb(5,"span",4),i.gc("click",(function(){return t.onSort()})),i.Rb(),i.Rb()),2&e&&(i.yb(1),i.pc("ngIf",t.isTarget),i.yb(1),i.pc("ngIf",t.isCheckboxable),i.yb(1),i.pc("ngIf",!t.column.headerTemplate),i.yb(1),i.pc("ngIf",t.column.headerTemplate),i.yb(1),i.Ab(t.sortClass))},directives:[r.r,r.w],encapsulation:2,changeDetection:0}),e})(),ht=(()=>{class e{constructor(){this.selectedCount=0,this.page=new i.o}get isVisible(){return this.rowCount/this.pageSize>1}get curPage(){return this.offset+1}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["datatable-footer"]],hostAttrs:[1,"datatable-footer"],inputs:{selectedCount:"selectedCount",footerHeight:"footerHeight",rowCount:"rowCount",pageSize:"pageSize",offset:"offset",pagerLeftArrowIcon:"pagerLeftArrowIcon",pagerRightArrowIcon:"pagerRightArrowIcon",pagerPreviousIcon:"pagerPreviousIcon",pagerNextIcon:"pagerNextIcon",totalMessage:"totalMessage",footerTemplate:"footerTemplate",selectedMessage:"selectedMessage"},outputs:{page:"page"},decls:4,vars:8,consts:[[1,"datatable-footer-inner",3,"ngClass"],[4,"ngIf"],["class","page-count",4,"ngIf"],[3,"pagerLeftArrowIcon","pagerRightArrowIcon","pagerPreviousIcon","pagerNextIcon","page","size","count","hidden","change",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"page-count"],[3,"pagerLeftArrowIcon","pagerRightArrowIcon","pagerPreviousIcon","pagerNextIcon","page","size","count","hidden","change"]],template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Mc(1,E,1,8,void 0,1),i.Mc(2,I,3,3,"div",2),i.Mc(3,P,1,8,"datatable-pager",3),i.Rb()),2&e&&(i.Kc("height",t.footerHeight,"px"),i.pc("ngClass",i.uc(6,j,t.selectedMessage)),i.yb(1),i.pc("ngIf",t.footerTemplate),i.yb(1),i.pc("ngIf",!t.footerTemplate),i.yb(1),i.pc("ngIf",!t.footerTemplate))},directives:function(){return[r.p,r.r,r.w,ft]},encapsulation:2,changeDetection:0}),e})(),ft=(()=>{class e{constructor(){this.change=new i.o,this._count=0,this._page=1,this._size=0}set size(e){this._size=e,this.pages=this.calcPages()}get size(){return this._size}set count(e){this._count=e,this.pages=this.calcPages()}get count(){return this._count}set page(e){this._page=e,this.pages=this.calcPages()}get page(){return this._page}get totalPages(){const e=this.size<1?1:Math.ceil(this.count/this.size);return Math.max(e||0,1)}canPrevious(){return this.page>1}canNext(){return this.page<this.totalPages}prevPage(){this.selectPage(this.page-1)}nextPage(){this.selectPage(this.page+1)}selectPage(e){e>0&&e<=this.totalPages&&e!==this.page&&(this.page=e,this.change.emit({page:e}))}calcPages(e){const t=[];let n=1,i=this.totalPages;e=e||this.page,5<this.totalPages&&(n=e-Math.floor(2.5),i=e+Math.floor(2.5),n<1?(n=1,i=Math.min(n+5-1,this.totalPages)):i>this.totalPages&&(n=Math.max(this.totalPages-5+1,1),i=this.totalPages));for(let r=n;r<=i;r++)t.push({number:r,text:r});return t}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["datatable-pager"]],hostAttrs:[1,"datatable-pager"],inputs:{size:"size",count:"count",page:"page",pagerLeftArrowIcon:"pagerLeftArrowIcon",pagerRightArrowIcon:"pagerRightArrowIcon",pagerPreviousIcon:"pagerPreviousIcon",pagerNextIcon:"pagerNextIcon"},outputs:{change:"change"},decls:14,vars:21,consts:[[1,"pager"],["role","button","aria-label","go to first page","href","javascript:void(0)",3,"click"],["role","button","aria-label","go to previous page","href","javascript:void(0)",3,"click"],["role","button","class","pages",3,"active",4,"ngFor","ngForOf"],["role","button","aria-label","go to next page","href","javascript:void(0)",3,"click"],["role","button","aria-label","go to last page","href","javascript:void(0)",3,"click"],["role","button",1,"pages"],["href","javascript:void(0)",3,"click"]],template:function(e,t){1&e&&(i.Sb(0,"ul",0),i.Sb(1,"li"),i.Sb(2,"a",1),i.gc("click",(function(){return t.selectPage(1)})),i.Nb(3,"i"),i.Rb(),i.Rb(),i.Sb(4,"li"),i.Sb(5,"a",2),i.gc("click",(function(){return t.prevPage()})),i.Nb(6,"i"),i.Rb(),i.Rb(),i.Mc(7,N,3,4,"li",3),i.Sb(8,"li"),i.Sb(9,"a",4),i.gc("click",(function(){return t.nextPage()})),i.Nb(10,"i"),i.Rb(),i.Rb(),i.Sb(11,"li"),i.Sb(12,"a",5),i.gc("click",(function(){return t.selectPage(t.totalPages)})),i.Nb(13,"i"),i.Rb(),i.Rb(),i.Rb()),2&e&&(i.yb(1),i.Eb("disabled",!t.canPrevious()),i.yb(2),i.Ab(t.pagerPreviousIcon),i.yb(1),i.Eb("disabled",!t.canPrevious()),i.yb(2),i.Ab(t.pagerLeftArrowIcon),i.yb(1),i.pc("ngForOf",t.pages),i.yb(1),i.Eb("disabled",!t.canNext()),i.yb(2),i.Ab(t.pagerRightArrowIcon),i.yb(1),i.Eb("disabled",!t.canNext()),i.yb(2),i.Ab(t.pagerNextIcon))},directives:[r.q],encapsulation:2,changeDetection:0}),e})(),pt=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["datatable-progress"]],decls:3,vars:0,consts:[["role","progressbar",1,"progress-linear"],[1,"container"],[1,"bar"]],template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Sb(1,"div",1),i.Nb(2,"div",2),i.Rb(),i.Rb())},encapsulation:2,changeDetection:0}),e})();var mt=function(e){return e[e.up=38]="up",e[e.down=40]="down",e[e.return=13]="return",e[e.escape=27]="escape",e[e.left=37]="left",e[e.right=39]="right",e}({});let bt=(()=>{class e{constructor(e,t,n,r){this.differs=e,this.scrollbarHelper=t,this.cd=n,this.treeStatus="collapsed",this.activate=new i.o,this.treeAction=new i.o,this._groupStyles={left:{},center:{},right:{}},this._element=r.nativeElement,this._rowDiffer=e.find({}).create()}set columns(e){this._columns=e,this.recalculateColumns(e),this.buildStylesByGroup()}get columns(){return this._columns}set innerWidth(e){if(this._columns){const e=$e(this._columns);this._columnGroupWidths=He(e,this._columns)}this._innerWidth=e,this.recalculateColumns(),this.buildStylesByGroup()}get innerWidth(){return this._innerWidth}set offsetX(e){this._offsetX=e,this.buildStylesByGroup()}get offsetX(){return this._offsetX}get cssClass(){let e="datatable-body-row";if(this.isSelected&&(e+=" active"),this.rowIndex%2!=0&&(e+=" datatable-row-odd"),this.rowIndex%2==0&&(e+=" datatable-row-even"),this.rowClass){const t=this.rowClass(this.row);if("string"==typeof t)e+=" "+t;else if("object"==typeof t){const n=Object.keys(t);for(const i of n)!0===t[i]&&(e+=" "+i)}}return e}get columnsTotalWidths(){return this._columnGroupWidths.total}ngDoCheck(){this._rowDiffer.diff(this.row)&&this.cd.markForCheck()}trackByGroups(e,t){return t.type}columnTrackingFn(e,t){return t.$$id}buildStylesByGroup(){this._groupStyles.left=this.calcStylesByGroup("left"),this._groupStyles.center=this.calcStylesByGroup("center"),this._groupStyles.right=this.calcStylesByGroup("right"),this.cd.markForCheck()}calcStylesByGroup(e){const t=this._columnGroupWidths,n=this.offsetX,i={width:t[e]+"px"};if("left"===e)nt(i,n,0);else if("right"===e){const e=parseInt(this.innerWidth+"",0);nt(i,-1*(t.total-e-n+this.scrollbarHelper.width),0)}return i}onActivate(e,t){e.cellIndex=t,e.rowElement=this._element,this.activate.emit(e)}onKeyDown(e){const t=e.keyCode;(t===mt.return||t===mt.down||t===mt.up||t===mt.left||t===mt.right)&&e.target===this._element&&(e.preventDefault(),e.stopPropagation(),this.activate.emit({type:"keydown",event:e,row:this.row,rowElement:this._element}))}onMouseenter(e){this.activate.emit({type:"mouseenter",event:e,row:this.row,rowElement:this._element})}recalculateColumns(e=this.columns){this._columns=e;const t=$e(this._columns);this._columnsByPin=Ve(this._columns),this._columnGroupWidths=He(t,this._columns)}onTreeAction(){this.treeAction.emit()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.u),i.Mb(ae,4),i.Mb(i.h),i.Mb(i.m))},e.\u0275cmp=i.Gb({type:e,selectors:[["datatable-body-row"]],hostVars:6,hostBindings:function(e,t){1&e&&i.gc("keydown",(function(e){return t.onKeyDown(e)}))("mouseenter",(function(e){return t.onMouseenter(e)})),2&e&&(i.Ab(t.cssClass),i.Kc("width",t.columnsTotalWidths,"px")("height",t.rowHeight,"px"))},inputs:{treeStatus:"treeStatus",columns:"columns",innerWidth:"innerWidth",offsetX:"offsetX",expanded:"expanded",rowClass:"rowClass",row:"row",group:"group",isSelected:"isSelected",rowIndex:"rowIndex",displayCheck:"displayCheck",rowHeight:"rowHeight"},outputs:{activate:"activate",treeAction:"treeAction"},decls:1,vars:2,consts:[[3,"class","ngStyle",4,"ngFor","ngForOf","ngForTrackBy"],[3,"ngStyle"],["tabindex","-1",3,"row","group","expanded","isSelected","rowIndex","column","rowHeight","displayCheck","treeStatus","activate","treeAction",4,"ngFor","ngForOf","ngForTrackBy"],["tabindex","-1",3,"row","group","expanded","isSelected","rowIndex","column","rowHeight","displayCheck","treeStatus","activate","treeAction"]],template:function(e,t){1&e&&i.Mc(0,Y,2,6,"div",0),2&e&&i.pc("ngForOf",t._columnsByPin)("ngForTrackBy",t.trackByGroups)},directives:function(){return[r.q,r.s,_t]},encapsulation:2,changeDetection:0}),e})(),gt=(()=>{class e{constructor(e,t){this.cd=e,this.differs=t,this.rowContextmenu=new i.o(!1),this.groupContext={group:this.row,expanded:this.expanded,rowIndex:this.rowIndex},this.rowContext={row:this.row,expanded:this.expanded,rowIndex:this.rowIndex},this._expanded=!1,this.rowDiffer=t.find({}).create()}set rowIndex(e){this._rowIndex=e,this.rowContext.rowIndex=e,this.groupContext.rowIndex=e,this.cd.markForCheck()}get rowIndex(){return this._rowIndex}set expanded(e){this._expanded=e,this.groupContext.expanded=e,this.rowContext.expanded=e,this.cd.markForCheck()}get expanded(){return this._expanded}ngDoCheck(){this.rowDiffer.diff(this.row)&&(this.rowContext.row=this.row,this.groupContext.group=this.row,this.cd.markForCheck())}onContextmenu(e){this.rowContextmenu.emit({event:e,row:this.row})}getGroupHeaderStyle(){const e={};return e.transform="translate3d("+this.offsetX+"px, 0px, 0px)",e["backface-visibility"]="hidden",e.width=this.innerWidth,e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.h),i.Mb(i.u))},e.\u0275cmp=i.Gb({type:e,selectors:[["datatable-row-wrapper"]],hostAttrs:[1,"datatable-row-wrapper"],hostBindings:function(e,t){1&e&&i.gc("contextmenu",(function(e){return t.onContextmenu(e)}))},inputs:{rowIndex:"rowIndex",expanded:"expanded",innerWidth:"innerWidth",rowDetail:"rowDetail",groupHeader:"groupHeader",offsetX:"offsetX",detailRowHeight:"detailRowHeight",row:"row",groupedRows:"groupedRows"},outputs:{rowContextmenu:"rowContextmenu"},ngContentSelectors:u,decls:3,vars:3,consts:[["class","datatable-group-header",3,"ngStyle",4,"ngIf"],[4,"ngIf"],["class","datatable-row-detail",3,"height",4,"ngIf"],[1,"datatable-group-header",3,"ngStyle"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"datatable-row-detail"]],template:function(e,t){1&e&&(i.oc(),i.Mc(0,H,2,2,"div",0),i.Mc(1,W,1,0,"ng-content",1),i.Mc(2,U,2,3,"div",2)),2&e&&(i.pc("ngIf",t.groupHeader&&t.groupHeader.template),i.yb(1),i.pc("ngIf",t.groupHeader&&t.groupHeader.template&&t.expanded||!t.groupHeader||!t.groupHeader.template),i.yb(1),i.pc("ngIf",t.rowDetail&&t.rowDetail.template&&t.expanded))},directives:[r.r,r.s,r.w],encapsulation:2,changeDetection:0}),e})(),_t=(()=>{class e{constructor(e,t){this.cd=t,this.activate=new i.o,this.treeAction=new i.o,this.isFocused=!1,this.onCheckboxChangeFn=this.onCheckboxChange.bind(this),this.activateFn=this.activate.emit.bind(this.activate),this.cellContext={onCheckboxChangeFn:this.onCheckboxChangeFn,activateFn:this.activateFn,row:this.row,group:this.group,value:this.value,column:this.column,rowHeight:this.rowHeight,isSelected:this.isSelected,rowIndex:this.rowIndex,treeStatus:this.treeStatus,onTreeAction:this.onTreeAction.bind(this)},this._element=e.nativeElement}set group(e){this._group=e,this.cellContext.group=e,this.checkValueUpdates(),this.cd.markForCheck()}get group(){return this._group}set rowHeight(e){this._rowHeight=e,this.cellContext.rowHeight=e,this.checkValueUpdates(),this.cd.markForCheck()}get rowHeight(){return this._rowHeight}set isSelected(e){this._isSelected=e,this.cellContext.isSelected=e,this.cd.markForCheck()}get isSelected(){return this._isSelected}set expanded(e){this._expanded=e,this.cellContext.expanded=e,this.cd.markForCheck()}get expanded(){return this._expanded}set rowIndex(e){this._rowIndex=e,this.cellContext.rowIndex=e,this.checkValueUpdates(),this.cd.markForCheck()}get rowIndex(){return this._rowIndex}set column(e){this._column=e,this.cellContext.column=e,this.checkValueUpdates(),this.cd.markForCheck()}get column(){return this._column}set row(e){this._row=e,this.cellContext.row=e,this.checkValueUpdates(),this.cd.markForCheck()}get row(){return this._row}set sorts(e){this._sorts=e,this.calcSortDir=this.calcSortDir(e)}get sorts(){return this._sorts}set treeStatus(e){this._treeStatus="collapsed"!==e&&"expanded"!==e&&"loading"!==e&&"disabled"!==e?"collapsed":e,this.cellContext.treeStatus=this._treeStatus,this.checkValueUpdates(),this.cd.markForCheck()}get treeStatus(){return this._treeStatus}get columnCssClasses(){let e="datatable-body-cell";if(this.column.cellClass)if("string"==typeof this.column.cellClass)e+=" "+this.column.cellClass;else if("function"==typeof this.column.cellClass){const t=this.column.cellClass({row:this.row,group:this.group,column:this.column,value:this.value,rowHeight:this.rowHeight});if("string"==typeof t)e+=" "+t;else if("object"==typeof t){const n=Object.keys(t);for(const i of n)!0===t[i]&&(e+=" "+i)}}return this.sortDir||(e+=" sort-active"),this.isFocused&&(e+=" active"),this.sortDir===ct.asc&&(e+=" sort-asc"),this.sortDir===ct.desc&&(e+=" sort-desc"),e}get width(){return this.column.width}get minWidth(){return this.column.minWidth}get maxWidth(){return this.column.maxWidth}get height(){const e=this.rowHeight;return isNaN(e)?e:e+"px"}ngDoCheck(){this.checkValueUpdates()}ngOnDestroy(){this.cellTemplate&&this.cellTemplate.clear()}checkValueUpdates(){let e="";if(this.row&&this.column){const t=this.column.$$valueGetter(this.row,this.column.prop),n=this.column.pipe;n?e=n.transform(t):void 0!==e&&(e=t)}else e="";this.value!==e&&(this.value=e,this.cellContext.value=e,this.sanitizedValue=null!=e?this.stripHtml(e):e,this.cd.markForCheck())}onFocus(){this.isFocused=!0}onBlur(){this.isFocused=!1}onClick(e){this.activate.emit({type:"click",event:e,row:this.row,group:this.group,rowHeight:this.rowHeight,column:this.column,value:this.value,cellElement:this._element})}onDblClick(e){this.activate.emit({type:"dblclick",event:e,row:this.row,group:this.group,rowHeight:this.rowHeight,column:this.column,value:this.value,cellElement:this._element})}onKeyDown(e){const t=e.keyCode;(t===mt.return||t===mt.down||t===mt.up||t===mt.left||t===mt.right)&&e.target===this._element&&(e.preventDefault(),e.stopPropagation(),this.activate.emit({type:"keydown",event:e,row:this.row,group:this.group,rowHeight:this.rowHeight,column:this.column,value:this.value,cellElement:this._element}))}onCheckboxChange(e){this.activate.emit({type:"checkbox",event:e,row:this.row,group:this.group,rowHeight:this.rowHeight,column:this.column,value:this.value,cellElement:this._element,treeStatus:"collapsed"})}calcSortDir(e){if(!e)return;const t=e.find(e=>e.prop===this.column.prop);return t?t.dir:void 0}stripHtml(e){return e.replace?e.replace(/<\/?[^>]+(>|$)/g,""):e}onTreeAction(){this.treeAction.emit(this.row)}calcLeftMargin(e,t){return e.isTreeColumn?t.level*(null!=e.treeLevelIndent?e.treeLevelIndent:50):0}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(i.h))},e.\u0275cmp=i.Gb({type:e,selectors:[["datatable-body-cell"]],viewQuery:function(e,t){var n;1&e&&i.Jc(q,!0,i.P),2&e&&i.zc(n=i.hc())&&(t.cellTemplate=n.first)},hostVars:10,hostBindings:function(e,t){1&e&&i.gc("focus",(function(){return t.onFocus()}))("blur",(function(){return t.onBlur()}))("click",(function(e){return t.onClick(e)}))("dblclick",(function(e){return t.onDblClick(e)}))("keydown",(function(e){return t.onKeyDown(e)})),2&e&&(i.Ab(t.columnCssClasses),i.Kc("width",t.width,"px")("min-width",t.minWidth,"px")("max-width",t.maxWidth,"px")("height",t.height))},inputs:{group:"group",rowHeight:"rowHeight",isSelected:"isSelected",expanded:"expanded",rowIndex:"rowIndex",column:"column",row:"row",sorts:"sorts",treeStatus:"treeStatus",displayCheck:"displayCheck"},outputs:{activate:"activate",treeAction:"treeAction"},decls:5,vars:6,consts:[[1,"datatable-body-cell-label"],["class","datatable-checkbox",4,"ngIf"],[4,"ngIf"],[3,"title","innerHTML",4,"ngIf"],[1,"datatable-checkbox"],["type","checkbox",3,"checked","click"],["class","datatable-tree-button",3,"disabled","click",4,"ngIf"],[1,"datatable-tree-button",3,"disabled","click"],["class","icon datatable-icon-collapse",4,"ngIf"],["class","icon datatable-icon-up",4,"ngIf"],["class","icon datatable-icon-down",4,"ngIf"],[1,"icon","datatable-icon-collapse"],[1,"icon","datatable-icon-up"],[1,"icon","datatable-icon-down"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"title","innerHTML"],["cellTemplate",""]],template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Mc(1,G,2,1,"label",1),i.Mc(2,ne,3,2,"ng-container",2),i.Mc(3,ie,1,2,"span",3),i.Mc(4,se,2,2,void 0,2),i.Rb()),2&e&&(i.Kc("margin-left",t.calcLeftMargin(t.column,t.row),"px"),i.yb(1),i.pc("ngIf",t.column.checkboxable&&(!t.displayCheck||t.displayCheck(t.row,t.column,t.value))),i.yb(1),i.pc("ngIf",t.column.isTreeColumn),i.yb(1),i.pc("ngIf",!t.column.cellTemplate),i.yb(1),i.pc("ngIf",t.column.cellTemplate))},directives:[r.r,r.w],encapsulation:2,changeDetection:0}),e})();function yt(e,t,n){const i=n(t,e);return i>-1?e.splice(i,1):e.push(t),e}let vt=(()=>{class e{constructor(){this.activate=new i.o,this.select=new i.o}selectRow(e,t,n){if(!this.selectEnabled)return;const i=this.selectionType===Re.checkbox,r=this.selectionType===Re.multiClick;let s=[];s=this.selectionType===Re.multi||i||r?e.shiftKey?function(e,t,n,i,r){const s=n<i;for(let o=0;o<t.length;o++){const r=t[o],a=o>=i&&o<=n,c=o<=i&&o>=n;let l={start:0,end:0};l=s?{start:n,end:i}:{start:i,end:n+1},(s&&c||!s&&a)&&o>=l.start&&o<=l.end&&e.push(r)}return e}([],this.rows,t,this.prevIndex,this.getRowSelectedIdx.bind(this)):yt(e.ctrlKey||e.metaKey||r||i?[...this.selected]:[],n,this.getRowSelectedIdx.bind(this)):yt([],n,this.getRowSelectedIdx.bind(this)),"function"==typeof this.selectCheck&&(s=s.filter(this.selectCheck.bind(this))),this.selected.splice(0,this.selected.length),this.selected.push(...s),this.prevIndex=t,this.select.emit({selected:s})}onActivate(e,t){const{type:n,event:i,row:r}=e,s=this.selectionType===Re.checkbox;!s&&("click"===n||"dblclick"===n)||s&&"checkbox"===n?this.selectRow(i,t,r):"keydown"===n&&(i.keyCode===mt.return?this.selectRow(i,t,r):this.onKeyboardFocus(e)),this.activate.emit(e)}onKeyboardFocus(e){const{keyCode:t}=e.event;if(t===mt.up||t===mt.down||t===mt.right||t===mt.left){const n=this.selectionType===Re.cell;e.cellElement&&n?n&&this.focusCell(e.cellElement,e.rowElement,t,e.cellIndex):this.focusRow(e.rowElement,t)}}focusRow(e,t){const n=this.getPrevNextRow(e,t);n&&n.focus()}getPrevNextRow(e,t){const n=e.parentElement;if(n){let e;if(t===mt.up?e=n.previousElementSibling:t===mt.down&&(e=n.nextElementSibling),e&&e.children.length)return e.children[0]}}focusCell(e,t,n,i){let r;if(n===mt.left)r=e.previousElementSibling;else if(n===mt.right)r=e.nextElementSibling;else if(n===mt.up||n===mt.down){const e=this.getPrevNextRow(t,n);if(e){const t=e.getElementsByClassName("datatable-body-cell");t.length&&(r=t[i])}}r&&r.focus()}getRowSelected(e){return this.getRowSelectedIdx(e,this.selected)>-1}getRowSelectedIdx(e,t){if(!t||!t.length)return-1;const n=this.rowIdentity(e);return t.findIndex(e=>this.rowIdentity(e)===n)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["datatable-selection"]],inputs:{rows:"rows",selected:"selected",selectEnabled:"selectEnabled",selectionType:"selectionType",rowIdentity:"rowIdentity",selectCheck:"selectCheck"},outputs:{activate:"activate",select:"select"},ngContentSelectors:u,decls:1,vars:0,template:function(e,t){1&e&&(i.oc(),i.nc(0))},encapsulation:2,changeDetection:0}),e})();function wt(e){const t=e.filter(e=>!!e);return t.length?t.some(e=>"number"!=typeof e)?null:t.reduce((e,t)=>e+t):null}function St(e){return null}let Mt=(()=>{class e{constructor(){this.summaryRow={}}ngOnChanges(){this.columns&&this.rows&&(this.updateInternalColumns(),this.updateValues())}updateInternalColumns(){this._internalColumns=this.columns.map(e=>Object.assign(Object.assign({},e),{cellTemplate:e.summaryTemplate}))}updateValues(){this.summaryRow={},this.columns.filter(e=>!e.summaryTemplate).forEach(e=>{const t=this.rows.map(t=>t[e.prop]),n=this.getSummaryFunction(e);this.summaryRow[e.prop]=e.pipe?e.pipe.transform(n(t)):n(t)})}getSummaryFunction(e){return void 0===e.summaryFunc?wt:null===e.summaryFunc?St:e.summaryFunc}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["datatable-summary-row"]],hostAttrs:[1,"datatable-summary-row"],inputs:{rows:"rows",columns:"columns",rowHeight:"rowHeight",offsetX:"offsetX",innerWidth:"innerWidth"},features:[i.wb],decls:1,vars:1,consts:[["tabindex","-1",3,"innerWidth","offsetX","columns","rowHeight","row","rowIndex",4,"ngIf"],["tabindex","-1",3,"innerWidth","offsetX","columns","rowHeight","row","rowIndex"]],template:function(e,t){1&e&&i.Mc(0,oe,1,6,"datatable-body-row",0),2&e&&i.pc("ngIf",t.summaryRow&&t._internalColumns)},directives:[r.r,bt],encapsulation:2}),e})(),xt=(()=>{class e{static forRoot(t){return{ngModule:e,providers:[{provide:"configuration",useValue:t}]}}}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},providers:[ae,ce,le],imports:[[r.c]]}),e})();"undefined"==typeof document||document.elementsFromPoint||(document.elementsFromPoint=function(e,t){const n=[],i=[];let r,s,o;for(;(r=document.elementFromPoint(e,t))&&-1===n.indexOf(r)&&null!=r;)n.push(r),i.push({value:r.style.getPropertyValue("pointer-events"),priority:r.style.getPropertyPriority("pointer-events")}),r.style.setProperty("pointer-events","none","important");for(s=i.length;o=i[--s];)n[s].style.setProperty("pointer-events",o.value?o.value:"",o.priority);return n})},wE6v:function(e,t,n){var i=n("hh1v");e.exports=function(e,t){if(!i(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!i(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},wQk9:function(e,t,n){!function(e){"use strict";e.defineLocale("tzm",{months:"\u2d49\u2d4f\u2d4f\u2d30\u2d62\u2d54_\u2d31\u2d55\u2d30\u2d62\u2d55_\u2d4e\u2d30\u2d55\u2d5a_\u2d49\u2d31\u2d54\u2d49\u2d54_\u2d4e\u2d30\u2d62\u2d62\u2d53_\u2d62\u2d53\u2d4f\u2d62\u2d53_\u2d62\u2d53\u2d4d\u2d62\u2d53\u2d63_\u2d56\u2d53\u2d5b\u2d5c_\u2d5b\u2d53\u2d5c\u2d30\u2d4f\u2d31\u2d49\u2d54_\u2d3d\u2d5f\u2d53\u2d31\u2d55_\u2d4f\u2d53\u2d61\u2d30\u2d4f\u2d31\u2d49\u2d54_\u2d37\u2d53\u2d4a\u2d4f\u2d31\u2d49\u2d54".split("_"),monthsShort:"\u2d49\u2d4f\u2d4f\u2d30\u2d62\u2d54_\u2d31\u2d55\u2d30\u2d62\u2d55_\u2d4e\u2d30\u2d55\u2d5a_\u2d49\u2d31\u2d54\u2d49\u2d54_\u2d4e\u2d30\u2d62\u2d62\u2d53_\u2d62\u2d53\u2d4f\u2d62\u2d53_\u2d62\u2d53\u2d4d\u2d62\u2d53\u2d63_\u2d56\u2d53\u2d5b\u2d5c_\u2d5b\u2d53\u2d5c\u2d30\u2d4f\u2d31\u2d49\u2d54_\u2d3d\u2d5f\u2d53\u2d31\u2d55_\u2d4f\u2d53\u2d61\u2d30\u2d4f\u2d31\u2d49\u2d54_\u2d37\u2d53\u2d4a\u2d4f\u2d31\u2d49\u2d54".split("_"),weekdays:"\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59_\u2d30\u2d62\u2d4f\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59_\u2d30\u2d3d\u2d54\u2d30\u2d59_\u2d30\u2d3d\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59".split("_"),weekdaysShort:"\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59_\u2d30\u2d62\u2d4f\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59_\u2d30\u2d3d\u2d54\u2d30\u2d59_\u2d30\u2d3d\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59".split("_"),weekdaysMin:"\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59_\u2d30\u2d62\u2d4f\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59_\u2d30\u2d3d\u2d54\u2d30\u2d59_\u2d30\u2d3d\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u2d30\u2d59\u2d37\u2d45 \u2d34] LT",nextDay:"[\u2d30\u2d59\u2d3d\u2d30 \u2d34] LT",nextWeek:"dddd [\u2d34] LT",lastDay:"[\u2d30\u2d5a\u2d30\u2d4f\u2d5c \u2d34] LT",lastWeek:"dddd [\u2d34] LT",sameElse:"L"},relativeTime:{future:"\u2d37\u2d30\u2d37\u2d45 \u2d59 \u2d62\u2d30\u2d4f %s",past:"\u2d62\u2d30\u2d4f %s",s:"\u2d49\u2d4e\u2d49\u2d3d",ss:"%d \u2d49\u2d4e\u2d49\u2d3d",m:"\u2d4e\u2d49\u2d4f\u2d53\u2d3a",mm:"%d \u2d4e\u2d49\u2d4f\u2d53\u2d3a",h:"\u2d59\u2d30\u2d44\u2d30",hh:"%d \u2d5c\u2d30\u2d59\u2d59\u2d30\u2d44\u2d49\u2d4f",d:"\u2d30\u2d59\u2d59",dd:"%d o\u2d59\u2d59\u2d30\u2d4f",M:"\u2d30\u2d62o\u2d53\u2d54",MM:"%d \u2d49\u2d62\u2d62\u2d49\u2d54\u2d4f",y:"\u2d30\u2d59\u2d33\u2d30\u2d59",yy:"%d \u2d49\u2d59\u2d33\u2d30\u2d59\u2d4f"},week:{dow:6,doy:12}})}(n("wd/R"))},"wd/R":function(e,t,n){(function(e){e.exports=function(){"use strict";var t,i;function r(){return t.apply(null,arguments)}function s(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function o(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function c(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(a(e,t))return!1;return!0}function l(e){return void 0===e}function u(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function h(e,t){var n,i=[];for(n=0;n<e.length;++n)i.push(t(e[n],n));return i}function f(e,t){for(var n in t)a(t,n)&&(e[n]=t[n]);return a(t,"toString")&&(e.toString=t.toString),a(t,"valueOf")&&(e.valueOf=t.valueOf),e}function p(e,t,n,i){return xt(e,t,n,i,!0).utc()}function m(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function b(e){if(null==e._isValid){var t=m(e),n=i.call(t.parsedDateParts,(function(e){return null!=e})),r=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(r=r&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return r;e._isValid=r}return e._isValid}function g(e){var t=p(NaN);return null!=e?f(m(t),e):m(t).userInvalidated=!0,t}i=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),i=n.length>>>0;for(t=0;t<i;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var _=r.momentProperties=[],y=!1;function v(e,t){var n,i,r;if(l(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),l(t._i)||(e._i=t._i),l(t._f)||(e._f=t._f),l(t._l)||(e._l=t._l),l(t._strict)||(e._strict=t._strict),l(t._tzm)||(e._tzm=t._tzm),l(t._isUTC)||(e._isUTC=t._isUTC),l(t._offset)||(e._offset=t._offset),l(t._pf)||(e._pf=m(t)),l(t._locale)||(e._locale=t._locale),_.length>0)for(n=0;n<_.length;n++)l(r=t[i=_[n]])||(e[i]=r);return e}function w(e){v(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===y&&(y=!0,r.updateOffset(this),y=!1)}function S(e){return e instanceof w||null!=e&&null!=e._isAMomentObject}function M(e){!1===r.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function x(e,t){var n=!0;return f((function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,e),n){var i,s,o,c=[];for(s=0;s<arguments.length;s++){if(i="","object"==typeof arguments[s]){for(o in i+="\n["+s+"] ",arguments[0])a(arguments[0],o)&&(i+=o+": "+arguments[0][o]+", ");i=i.slice(0,-2)}else i=arguments[s];c.push(i)}M(e+"\nArguments: "+Array.prototype.slice.call(c).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var k,D={};function T(e,t){null!=r.deprecationHandler&&r.deprecationHandler(e,t),D[e]||(M(t),D[e]=!0)}function C(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function O(e,t){var n,i=f({},e);for(n in t)a(t,n)&&(o(e[n])&&o(t[n])?(i[n]={},f(i[n],e[n]),f(i[n],t[n])):null!=t[n]?i[n]=t[n]:delete i[n]);for(n in e)a(e,n)&&!a(t,n)&&o(e[n])&&(i[n]=f({},i[n]));return i}function L(e){null!=e&&this.set(e)}function R(e,t,n){var i=""+Math.abs(e);return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,t-i.length)).toString().substr(1)+i}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,k=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)a(e,t)&&n.push(t);return n};var E=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,A=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,I={},P={};function j(e,t,n,i){var r=i;"string"==typeof i&&(r=function(){return this[i]()}),e&&(P[e]=r),t&&(P[t[0]]=function(){return R(r.apply(this,arguments),t[1],t[2])}),n&&(P[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)})}function N(e,t){return e.isValid()?(t=F(t,e.localeData()),I[t]=I[t]||function(e){var t,n,i,r=e.match(E);for(t=0,n=r.length;t<n;t++)r[t]=P[r[t]]?P[r[t]]:(i=r[t]).match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"");return function(t){var i,s="";for(i=0;i<n;i++)s+=C(r[i])?r[i].call(t,e):r[i];return s}}(t),I[t](e)):e.localeData().invalidDate()}function F(e,t){var n=5;function i(e){return t.longDateFormat(e)||e}for(A.lastIndex=0;n>=0&&A.test(e);)e=e.replace(A,i),A.lastIndex=0,n-=1;return e}var Y={};function z(e,t){var n=e.toLowerCase();Y[n]=Y[n+"s"]=Y[t]=e}function $(e){return"string"==typeof e?Y[e]||Y[e.toLowerCase()]:void 0}function H(e){var t,n,i={};for(n in e)a(e,n)&&(t=$(n))&&(i[t]=e[n]);return i}var W={};function V(e,t){W[e]=t}function B(e){return e%4==0&&e%100!=0||e%400==0}function U(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function q(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=U(t)),n}function G(e,t){return function(n){return null!=n?(Q(this,e,n),r.updateOffset(this,t),this):J(this,e)}}function J(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Q(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&B(e.year())&&1===e.month()&&29===e.date()?(n=q(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Se(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}var K,Z=/\d/,X=/\d\d/,ee=/\d{3}/,te=/\d{4}/,ne=/[+-]?\d{6}/,ie=/\d\d?/,re=/\d\d\d\d?/,se=/\d\d\d\d\d\d?/,oe=/\d{1,3}/,ae=/\d{1,4}/,ce=/[+-]?\d{1,6}/,le=/\d+/,ue=/[+-]?\d+/,de=/Z|[+-]\d\d:?\d\d/gi,he=/Z|[+-]\d\d(?::?\d\d)?/gi,fe=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function pe(e,t,n){K[e]=C(t)?t:function(e,i){return e&&n?n:t}}function me(e,t){return a(K,e)?K[e](t._strict,t._locale):new RegExp(be(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,i,r){return t||n||i||r}))))}function be(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}K={};var ge,_e={};function ye(e,t){var n,i=t;for("string"==typeof e&&(e=[e]),u(t)&&(i=function(e,n){n[t]=q(e)}),n=0;n<e.length;n++)_e[e[n]]=i}function ve(e,t){ye(e,(function(e,n,i,r){i._w=i._w||{},t(e,i._w,i,r)}))}function we(e,t,n){null!=t&&a(_e,e)&&_e[e](t,n._a,n,e)}function Se(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=(t%12+12)%12;return e+=(t-n)/12,1===n?B(e)?29:28:31-n%7%2}ge=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},j("M",["MM",2],"Mo",(function(){return this.month()+1})),j("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),j("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),z("month","M"),V("month",8),pe("M",ie),pe("MM",ie,X),pe("MMM",(function(e,t){return t.monthsShortRegex(e)})),pe("MMMM",(function(e,t){return t.monthsRegex(e)})),ye(["M","MM"],(function(e,t){t[1]=q(e)-1})),ye(["MMM","MMMM"],(function(e,t,n,i){var r=n._locale.monthsParse(e,i,n._strict);null!=r?t[1]=r:m(n).invalidMonth=e}));var Me="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),xe="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ke=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,De=fe,Te=fe;function Ce(e,t,n){var i,r,s,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)s=p([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(s,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(r=ge.call(this._shortMonthsParse,o))?r:null:-1!==(r=ge.call(this._longMonthsParse,o))?r:null:"MMM"===t?-1!==(r=ge.call(this._shortMonthsParse,o))||-1!==(r=ge.call(this._longMonthsParse,o))?r:null:-1!==(r=ge.call(this._longMonthsParse,o))||-1!==(r=ge.call(this._shortMonthsParse,o))?r:null}function Oe(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=q(t);else if(!u(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Se(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Le(e){return null!=e?(Oe(this,e),r.updateOffset(this,!0),this):J(this,"Month")}function Re(){function e(e,t){return t.length-e.length}var t,n,i=[],r=[],s=[];for(t=0;t<12;t++)n=p([2e3,t]),i.push(this.monthsShort(n,"")),r.push(this.months(n,"")),s.push(this.months(n,"")),s.push(this.monthsShort(n,""));for(i.sort(e),r.sort(e),s.sort(e),t=0;t<12;t++)i[t]=be(i[t]),r[t]=be(r[t]);for(t=0;t<24;t++)s[t]=be(s[t]);this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function Ee(e){return B(e)?366:365}j("Y",0,0,(function(){var e=this.year();return e<=9999?R(e,4):"+"+e})),j(0,["YY",2],0,(function(){return this.year()%100})),j(0,["YYYY",4],0,"year"),j(0,["YYYYY",5],0,"year"),j(0,["YYYYYY",6,!0],0,"year"),z("year","y"),V("year",1),pe("Y",ue),pe("YY",ie,X),pe("YYYY",ae,te),pe("YYYYY",ce,ne),pe("YYYYYY",ce,ne),ye(["YYYYY","YYYYYY"],0),ye("YYYY",(function(e,t){t[0]=2===e.length?r.parseTwoDigitYear(e):q(e)})),ye("YY",(function(e,t){t[0]=r.parseTwoDigitYear(e)})),ye("Y",(function(e,t){t[0]=parseInt(e,10)})),r.parseTwoDigitYear=function(e){return q(e)+(q(e)>68?1900:2e3)};var Ae=G("FullYear",!0);function Ie(e,t,n,i,r,s,o){var a;return e<100&&e>=0?(a=new Date(e+400,t,n,i,r,s,o),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,i,r,s,o),a}function Pe(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function je(e,t,n){var i=7+t-n;return-(7+Pe(e,0,i).getUTCDay()-t)%7+i-1}function Ne(e,t,n,i,r){var s,o,a=1+7*(t-1)+(7+n-i)%7+je(e,i,r);return a<=0?o=Ee(s=e-1)+a:a>Ee(e)?(s=e+1,o=a-Ee(e)):(s=e,o=a),{year:s,dayOfYear:o}}function Fe(e,t,n){var i,r,s=je(e.year(),t,n),o=Math.floor((e.dayOfYear()-s-1)/7)+1;return o<1?i=o+Ye(r=e.year()-1,t,n):o>Ye(e.year(),t,n)?(i=o-Ye(e.year(),t,n),r=e.year()+1):(r=e.year(),i=o),{week:i,year:r}}function Ye(e,t,n){var i=je(e,t,n),r=je(e+1,t,n);return(Ee(e)-i+r)/7}function ze(e,t){return e.slice(t,7).concat(e.slice(0,t))}j("w",["ww",2],"wo","week"),j("W",["WW",2],"Wo","isoWeek"),z("week","w"),z("isoWeek","W"),V("week",5),V("isoWeek",5),pe("w",ie),pe("ww",ie,X),pe("W",ie),pe("WW",ie,X),ve(["w","ww","W","WW"],(function(e,t,n,i){t[i.substr(0,1)]=q(e)})),j("d",0,"do","day"),j("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),j("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),j("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),j("e",0,0,"weekday"),j("E",0,0,"isoWeekday"),z("day","d"),z("weekday","e"),z("isoWeekday","E"),V("day",11),V("weekday",11),V("isoWeekday",11),pe("d",ie),pe("e",ie),pe("E",ie),pe("dd",(function(e,t){return t.weekdaysMinRegex(e)})),pe("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),pe("dddd",(function(e,t){return t.weekdaysRegex(e)})),ve(["dd","ddd","dddd"],(function(e,t,n,i){var r=n._locale.weekdaysParse(e,i,n._strict);null!=r?t.d=r:m(n).invalidWeekday=e})),ve(["d","e","E"],(function(e,t,n,i){t[i]=q(e)}));var $e="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),He="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),We="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ve=fe,Be=fe,Ue=fe;function qe(e,t,n){var i,r,s,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)s=p([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(s,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(r=ge.call(this._weekdaysParse,o))?r:null:"ddd"===t?-1!==(r=ge.call(this._shortWeekdaysParse,o))?r:null:-1!==(r=ge.call(this._minWeekdaysParse,o))?r:null:"dddd"===t?-1!==(r=ge.call(this._weekdaysParse,o))||-1!==(r=ge.call(this._shortWeekdaysParse,o))||-1!==(r=ge.call(this._minWeekdaysParse,o))?r:null:"ddd"===t?-1!==(r=ge.call(this._shortWeekdaysParse,o))||-1!==(r=ge.call(this._weekdaysParse,o))||-1!==(r=ge.call(this._minWeekdaysParse,o))?r:null:-1!==(r=ge.call(this._minWeekdaysParse,o))||-1!==(r=ge.call(this._weekdaysParse,o))||-1!==(r=ge.call(this._shortWeekdaysParse,o))?r:null}function Ge(){function e(e,t){return t.length-e.length}var t,n,i,r,s,o=[],a=[],c=[],l=[];for(t=0;t<7;t++)n=p([2e3,1]).day(t),i=be(this.weekdaysMin(n,"")),r=be(this.weekdaysShort(n,"")),s=be(this.weekdays(n,"")),o.push(i),a.push(r),c.push(s),l.push(i),l.push(r),l.push(s);o.sort(e),a.sort(e),c.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Je(){return this.hours()%12||12}function Qe(e,t){j(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Ke(e,t){return t._meridiemParse}j("H",["HH",2],0,"hour"),j("h",["hh",2],0,Je),j("k",["kk",2],0,(function(){return this.hours()||24})),j("hmm",0,0,(function(){return""+Je.apply(this)+R(this.minutes(),2)})),j("hmmss",0,0,(function(){return""+Je.apply(this)+R(this.minutes(),2)+R(this.seconds(),2)})),j("Hmm",0,0,(function(){return""+this.hours()+R(this.minutes(),2)})),j("Hmmss",0,0,(function(){return""+this.hours()+R(this.minutes(),2)+R(this.seconds(),2)})),Qe("a",!0),Qe("A",!1),z("hour","h"),V("hour",13),pe("a",Ke),pe("A",Ke),pe("H",ie),pe("h",ie),pe("k",ie),pe("HH",ie,X),pe("hh",ie,X),pe("kk",ie,X),pe("hmm",re),pe("hmmss",se),pe("Hmm",re),pe("Hmmss",se),ye(["H","HH"],3),ye(["k","kk"],(function(e,t,n){var i=q(e);t[3]=24===i?0:i})),ye(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),ye(["h","hh"],(function(e,t,n){t[3]=q(e),m(n).bigHour=!0})),ye("hmm",(function(e,t,n){var i=e.length-2;t[3]=q(e.substr(0,i)),t[4]=q(e.substr(i)),m(n).bigHour=!0})),ye("hmmss",(function(e,t,n){var i=e.length-4,r=e.length-2;t[3]=q(e.substr(0,i)),t[4]=q(e.substr(i,2)),t[5]=q(e.substr(r)),m(n).bigHour=!0})),ye("Hmm",(function(e,t,n){var i=e.length-2;t[3]=q(e.substr(0,i)),t[4]=q(e.substr(i))})),ye("Hmmss",(function(e,t,n){var i=e.length-4,r=e.length-2;t[3]=q(e.substr(0,i)),t[4]=q(e.substr(i,2)),t[5]=q(e.substr(r))}));var Ze,Xe=G("Hours",!0),et={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Me,monthsShort:xe,week:{dow:0,doy:6},weekdays:$e,weekdaysMin:We,weekdaysShort:He,meridiemParse:/[ap]\.?m?\.?/i},tt={},nt={};function it(e,t){var n,i=Math.min(e.length,t.length);for(n=0;n<i;n+=1)if(e[n]!==t[n])return n;return i}function rt(e){return e?e.toLowerCase().replace("_","-"):e}function st(t){var i=null;if(void 0===tt[t]&&void 0!==e&&e&&e.exports)try{i=Ze._abbr,n("RnhZ")("./"+t),ot(i)}catch(r){tt[t]=null}return tt[t]}function ot(e,t){var n;return e&&((n=l(t)?ct(e):at(e,t))?Ze=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Ze._abbr}function at(e,t){if(null!==t){var n,i=et;if(t.abbr=e,null!=tt[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=tt[e]._config;else if(null!=t.parentLocale)if(null!=tt[t.parentLocale])i=tt[t.parentLocale]._config;else{if(null==(n=st(t.parentLocale)))return nt[t.parentLocale]||(nt[t.parentLocale]=[]),nt[t.parentLocale].push({name:e,config:t}),null;i=n._config}return tt[e]=new L(O(i,t)),nt[e]&&nt[e].forEach((function(e){at(e.name,e.config)})),ot(e),tt[e]}return delete tt[e],null}function ct(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ze;if(!s(e)){if(t=st(e))return t;e=[e]}return function(e){for(var t,n,i,r,s=0;s<e.length;){for(t=(r=rt(e[s]).split("-")).length,n=(n=rt(e[s+1]))?n.split("-"):null;t>0;){if(i=st(r.slice(0,t).join("-")))return i;if(n&&n.length>=t&&it(r,n)>=t-1)break;t--}s++}return Ze}(e)}function lt(e){var t,n=e._a;return n&&-2===m(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>Se(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,m(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),m(e)._overflowWeeks&&-1===t&&(t=7),m(e)._overflowWeekday&&-1===t&&(t=8),m(e).overflow=t),e}var ut=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,dt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ht=/Z|[+-]\d\d(?::?\d\d)?/,ft=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],pt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],mt=/^\/?Date\((-?\d+)/i,bt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,gt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function _t(e){var t,n,i,r,s,o,a=e._i,c=ut.exec(a)||dt.exec(a);if(c){for(m(e).iso=!0,t=0,n=ft.length;t<n;t++)if(ft[t][1].exec(c[1])){r=ft[t][0],i=!1!==ft[t][2];break}if(null==r)return void(e._isValid=!1);if(c[3]){for(t=0,n=pt.length;t<n;t++)if(pt[t][1].exec(c[3])){s=(c[2]||" ")+pt[t][0];break}if(null==s)return void(e._isValid=!1)}if(!i&&null!=s)return void(e._isValid=!1);if(c[4]){if(!ht.exec(c[4]))return void(e._isValid=!1);o="Z"}e._f=r+(s||"")+(o||""),St(e)}else e._isValid=!1}function yt(e){var t,n,i,r,s,o,a,c,l,u=bt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(u){if(n=u[3],i=u[2],r=u[5],s=u[6],o=u[7],a=[(c=u[4],l=parseInt(c,10),l<=49?2e3+l:l<=999?1900+l:l),xe.indexOf(n),parseInt(i,10),parseInt(r,10),parseInt(s,10)],o&&a.push(parseInt(o,10)),!function(e,t,n){return!e||He.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(m(n).weekdayMismatch=!0,n._isValid=!1,!1)}(u[1],t=a,e))return;e._a=t,e._tzm=function(e,t,n){if(e)return gt[e];if(t)return 0;var i=parseInt(n,10),r=i%100;return(i-r)/100*60+r}(u[8],u[9],u[10]),e._d=Pe.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),m(e).rfc2822=!0}else e._isValid=!1}function vt(e,t,n){return null!=e?e:null!=t?t:n}function wt(e){var t,n,i,s,o,a=[];if(!e._d){for(i=function(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[2]&&null==e._a[1]&&function(e){var t,n,i,r,s,o,a,c,l;null!=(t=e._w).GG||null!=t.W||null!=t.E?(s=1,o=4,n=vt(t.GG,e._a[0],Fe(kt(),1,4).year),i=vt(t.W,1),((r=vt(t.E,1))<1||r>7)&&(c=!0)):(s=e._locale._week.dow,o=e._locale._week.doy,l=Fe(kt(),s,o),n=vt(t.gg,e._a[0],l.year),i=vt(t.w,l.week),null!=t.d?((r=t.d)<0||r>6)&&(c=!0):null!=t.e?(r=t.e+s,(t.e<0||t.e>6)&&(c=!0)):r=s),i<1||i>Ye(n,s,o)?m(e)._overflowWeeks=!0:null!=c?m(e)._overflowWeekday=!0:(a=Ne(n,i,r,s,o),e._a[0]=a.year,e._dayOfYear=a.dayOfYear)}(e),null!=e._dayOfYear&&(o=vt(e._a[0],i[0]),(e._dayOfYear>Ee(o)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),n=Pe(o,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=i[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Pe:Ie).apply(null,a),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==s&&(m(e).weekdayMismatch=!0)}}function St(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],m(e).empty=!0;var t,n,i,s,o,a,c=""+e._i,l=c.length,u=0;for(i=F(e._f,e._locale).match(E)||[],t=0;t<i.length;t++)(n=(c.match(me(s=i[t],e))||[])[0])&&((o=c.substr(0,c.indexOf(n))).length>0&&m(e).unusedInput.push(o),c=c.slice(c.indexOf(n)+n.length),u+=n.length),P[s]?(n?m(e).empty=!1:m(e).unusedTokens.push(s),we(s,n,e)):e._strict&&!n&&m(e).unusedTokens.push(s);m(e).charsLeftOver=l-u,c.length>0&&m(e).unusedInput.push(c),e._a[3]<=12&&!0===m(e).bigHour&&e._a[3]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[3]=function(e,t,n){var i;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((i=e.isPM(n))&&t<12&&(t+=12),i||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),null!==(a=m(e).era)&&(e._a[0]=e._locale.erasConvertYear(a,e._a[0])),wt(e),lt(e)}else yt(e);else _t(e)}function Mt(e){var t=e._i,n=e._f;return e._locale=e._locale||ct(e._l),null===t||void 0===n&&""===t?g({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),S(t)?new w(lt(t)):(d(t)?e._d=t:s(n)?function(e){var t,n,i,r,s,o,a=!1;if(0===e._f.length)return m(e).invalidFormat=!0,void(e._d=new Date(NaN));for(r=0;r<e._f.length;r++)s=0,o=!1,t=v({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[r],St(t),b(t)&&(o=!0),s+=m(t).charsLeftOver,s+=10*m(t).unusedTokens.length,m(t).score=s,a?s<i&&(i=s,n=t):(null==i||s<i||o)&&(i=s,n=t,o&&(a=!0));f(e,n||t)}(e):n?St(e):function(e){var t=e._i;l(t)?e._d=new Date(r.now()):d(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=mt.exec(e._i);null===t?(_t(e),!1===e._isValid&&(delete e._isValid,yt(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:r.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):s(t)?(e._a=h(t.slice(0),(function(e){return parseInt(e,10)})),wt(e)):o(t)?function(e){if(!e._d){var t=H(e._i);e._a=h([t.year,t.month,void 0===t.day?t.date:t.day,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),wt(e)}}(e):u(t)?e._d=new Date(t):r.createFromInputFallback(e)}(e),b(e)||(e._d=null),e))}function xt(e,t,n,i,r){var a,l={};return!0!==t&&!1!==t||(i=t,t=void 0),!0!==n&&!1!==n||(i=n,n=void 0),(o(e)&&c(e)||s(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=r,l._l=n,l._i=e,l._f=t,l._strict=i,(a=new w(lt(Mt(l))))._nextDay&&(a.add(1,"d"),a._nextDay=void 0),a}function kt(e,t,n,i){return xt(e,t,n,i,!1)}r.createFromInputFallback=x("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),r.ISO_8601=function(){},r.RFC_2822=function(){};var Dt=x("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=kt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:g()})),Tt=x("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=kt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:g()}));function Ct(e,t){var n,i;if(1===t.length&&s(t[0])&&(t=t[0]),!t.length)return kt();for(n=t[0],i=1;i<t.length;++i)t[i].isValid()&&!t[i][e](n)||(n=t[i]);return n}var Ot=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Lt(e){var t=H(e),n=t.year||0,i=t.quarter||0,r=t.month||0,s=t.week||t.isoWeek||0,o=t.day||0,c=t.hour||0,l=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=function(e){var t,n,i=!1;for(t in e)if(a(e,t)&&(-1===ge.call(Ot,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<Ot.length;++n)if(e[Ot[n]]){if(i)return!1;parseFloat(e[Ot[n]])!==q(e[Ot[n]])&&(i=!0)}return!0}(t),this._milliseconds=+d+1e3*u+6e4*l+1e3*c*60*60,this._days=+o+7*s,this._months=+r+3*i+12*n,this._data={},this._locale=ct(),this._bubble()}function Rt(e){return e instanceof Lt}function Et(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function At(e,t){j(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+R(~~(e/60),2)+t+R(~~e%60,2)}))}At("Z",":"),At("ZZ",""),pe("Z",he),pe("ZZ",he),ye(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=Pt(he,e)}));var It=/([\+\-]|\d\d)/gi;function Pt(e,t){var n,i,r=(t||"").match(e);return null===r?null:0===(i=60*(n=((r[r.length-1]||[])+"").match(It)||["-",0,0])[1]+q(n[2]))?0:"+"===n[0]?i:-i}function jt(e,t){var n,i;return t._isUTC?(n=t.clone(),i=(S(e)||d(e)?e.valueOf():kt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),r.updateOffset(n,!1),n):kt(e).local()}function Nt(e){return-Math.round(e._d.getTimezoneOffset())}function Ft(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var Yt=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,zt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function $t(e,t){var n,i,r,s,o,c,l=e,d=null;return Rt(e)?l={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(l={},t?l[t]=+e:l.milliseconds=+e):(d=Yt.exec(e))?(n="-"===d[1]?-1:1,l={y:0,d:q(d[2])*n,h:q(d[3])*n,m:q(d[4])*n,s:q(d[5])*n,ms:q(Et(1e3*d[6]))*n}):(d=zt.exec(e))?l={y:Ht(d[2],n="-"===d[1]?-1:1),M:Ht(d[3],n),w:Ht(d[4],n),d:Ht(d[5],n),h:Ht(d[6],n),m:Ht(d[7],n),s:Ht(d[8],n)}:null==l?l={}:"object"==typeof l&&("from"in l||"to"in l)&&(s=kt(l.from),o=kt(l.to),r=s.isValid()&&o.isValid()?(o=jt(o,s),s.isBefore(o)?c=Wt(s,o):((c=Wt(o,s)).milliseconds=-c.milliseconds,c.months=-c.months),c):{milliseconds:0,months:0},(l={}).ms=r.milliseconds,l.M=r.months),i=new Lt(l),Rt(e)&&a(e,"_locale")&&(i._locale=e._locale),Rt(e)&&a(e,"_isValid")&&(i._isValid=e._isValid),i}function Ht(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Wt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Vt(e,t){return function(n,i){var r;return null===i||isNaN(+i)||(T(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),r=n,n=i,i=r),Bt(this,$t(n,i),e),this}}function Bt(e,t,n,i){var s=t._milliseconds,o=Et(t._days),a=Et(t._months);e.isValid()&&(i=null==i||i,a&&Oe(e,J(e,"Month")+a*n),o&&Q(e,"Date",J(e,"Date")+o*n),s&&e._d.setTime(e._d.valueOf()+s*n),i&&r.updateOffset(e,o||a))}$t.fn=Lt.prototype,$t.invalid=function(){return $t(NaN)};var Ut=Vt(1,"add"),qt=Vt(-1,"subtract");function Gt(e){return"string"==typeof e||e instanceof String}function Jt(e){return S(e)||d(e)||Gt(e)||u(e)||function(e){var t=s(e),n=!1;return t&&(n=0===e.filter((function(t){return!u(t)&&Gt(e)})).length),t&&n}(e)||function(e){var t,n=o(e)&&!c(e),i=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"];for(t=0;t<r.length;t+=1)i=i||a(e,r[t]);return n&&i}(e)||null==e}function Qt(e){var t,n=o(e)&&!c(e),i=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<r.length;t+=1)i=i||a(e,r[t]);return n&&i}function Kt(e,t){if(e.date()<t.date())return-Kt(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),i=e.clone().add(n,"months");return-(n+(t-i<0?(t-i)/(i-e.clone().add(n-1,"months")):(t-i)/(e.clone().add(n+1,"months")-i)))||0}function Zt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=ct(e))&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Xt=x("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function en(){return this._locale}var tn=1e3,nn=6e4,rn=36e5,sn=126227808e5;function on(e,t){return(e%t+t)%t}function an(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-sn:new Date(e,t,n).valueOf()}function cn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-sn:Date.UTC(e,t,n)}function ln(e,t){return t.erasAbbrRegex(e)}function un(){var e,t,n=[],i=[],r=[],s=[],o=this.eras();for(e=0,t=o.length;e<t;++e)i.push(be(o[e].name)),n.push(be(o[e].abbr)),r.push(be(o[e].narrow)),s.push(be(o[e].name)),s.push(be(o[e].abbr)),s.push(be(o[e].narrow));this._erasRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+i.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}function dn(e,t){j(0,[e,e.length],0,t)}function hn(e,t,n,i,r){var s;return null==e?Fe(this,i,r).year:(t>(s=Ye(e,i,r))&&(t=s),fn.call(this,e,t,n,i,r))}function fn(e,t,n,i,r){var s=Ne(e,t,n,i,r),o=Pe(s.year,0,s.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}j("N",0,0,"eraAbbr"),j("NN",0,0,"eraAbbr"),j("NNN",0,0,"eraAbbr"),j("NNNN",0,0,"eraName"),j("NNNNN",0,0,"eraNarrow"),j("y",["y",1],"yo","eraYear"),j("y",["yy",2],0,"eraYear"),j("y",["yyy",3],0,"eraYear"),j("y",["yyyy",4],0,"eraYear"),pe("N",ln),pe("NN",ln),pe("NNN",ln),pe("NNNN",(function(e,t){return t.erasNameRegex(e)})),pe("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),ye(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,i){var r=n._locale.erasParse(e,i,n._strict);r?m(n).era=r:m(n).invalidEra=e})),pe("y",le),pe("yy",le),pe("yyy",le),pe("yyyy",le),pe("yo",(function(e,t){return t._eraYearOrdinalRegex||le})),ye(["y","yy","yyy","yyyy"],0),ye(["yo"],(function(e,t,n,i){var r;n._locale._eraYearOrdinalRegex&&(r=e.match(n._locale._eraYearOrdinalRegex)),t[0]=n._locale.eraYearOrdinalParse?n._locale.eraYearOrdinalParse(e,r):parseInt(e,10)})),j(0,["gg",2],0,(function(){return this.weekYear()%100})),j(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),dn("gggg","weekYear"),dn("ggggg","weekYear"),dn("GGGG","isoWeekYear"),dn("GGGGG","isoWeekYear"),z("weekYear","gg"),z("isoWeekYear","GG"),V("weekYear",1),V("isoWeekYear",1),pe("G",ue),pe("g",ue),pe("GG",ie,X),pe("gg",ie,X),pe("GGGG",ae,te),pe("gggg",ae,te),pe("GGGGG",ce,ne),pe("ggggg",ce,ne),ve(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,i){t[i.substr(0,2)]=q(e)})),ve(["gg","GG"],(function(e,t,n,i){t[i]=r.parseTwoDigitYear(e)})),j("Q",0,"Qo","quarter"),z("quarter","Q"),V("quarter",7),pe("Q",Z),ye("Q",(function(e,t){t[1]=3*(q(e)-1)})),j("D",["DD",2],"Do","date"),z("date","D"),V("date",9),pe("D",ie),pe("DD",ie,X),pe("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),ye(["D","DD"],2),ye("Do",(function(e,t){t[2]=q(e.match(ie)[0])}));var pn=G("Date",!0);j("DDD",["DDDD",3],"DDDo","dayOfYear"),z("dayOfYear","DDD"),V("dayOfYear",4),pe("DDD",oe),pe("DDDD",ee),ye(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=q(e)})),j("m",["mm",2],0,"minute"),z("minute","m"),V("minute",14),pe("m",ie),pe("mm",ie,X),ye(["m","mm"],4);var mn=G("Minutes",!1);j("s",["ss",2],0,"second"),z("second","s"),V("second",15),pe("s",ie),pe("ss",ie,X),ye(["s","ss"],5);var bn,gn,_n=G("Seconds",!1);for(j("S",0,0,(function(){return~~(this.millisecond()/100)})),j(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),j(0,["SSS",3],0,"millisecond"),j(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),j(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),j(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),j(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),j(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),j(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),z("millisecond","ms"),V("millisecond",16),pe("S",oe,Z),pe("SS",oe,X),pe("SSS",oe,ee),bn="SSSS";bn.length<=9;bn+="S")pe(bn,le);function yn(e,t){t[6]=q(1e3*("0."+e))}for(bn="S";bn.length<=9;bn+="S")ye(bn,yn);gn=G("Milliseconds",!1),j("z",0,0,"zoneAbbr"),j("zz",0,0,"zoneName");var vn=w.prototype;function wn(e){return e}vn.add=Ut,vn.calendar=function(e,t){1===arguments.length&&(arguments[0]?Jt(arguments[0])?(e=arguments[0],t=void 0):Qt(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||kt(),i=jt(n,this).startOf("day"),s=r.calendarFormat(this,i)||"sameElse",o=t&&(C(t[s])?t[s].call(this,n):t[s]);return this.format(o||this.localeData().calendar(s,this,kt(n)))},vn.clone=function(){return new w(this)},vn.diff=function(e,t,n){var i,r,s;if(!this.isValid())return NaN;if(!(i=jt(e,this)).isValid())return NaN;switch(r=6e4*(i.utcOffset()-this.utcOffset()),t=$(t)){case"year":s=Kt(this,i)/12;break;case"month":s=Kt(this,i);break;case"quarter":s=Kt(this,i)/3;break;case"second":s=(this-i)/1e3;break;case"minute":s=(this-i)/6e4;break;case"hour":s=(this-i)/36e5;break;case"day":s=(this-i-r)/864e5;break;case"week":s=(this-i-r)/6048e5;break;default:s=this-i}return n?s:U(s)},vn.endOf=function(e){var t,n;if(void 0===(e=$(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?cn:an,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=rn-on(t+(this._isUTC?0:this.utcOffset()*nn),rn)-1;break;case"minute":t=this._d.valueOf(),t+=nn-on(t,nn)-1;break;case"second":t=this._d.valueOf(),t+=tn-on(t,tn)-1}return this._d.setTime(t),r.updateOffset(this,!0),this},vn.format=function(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=N(this,e);return this.localeData().postformat(t)},vn.from=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||kt(e).isValid())?$t({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},vn.fromNow=function(e){return this.from(kt(),e)},vn.to=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||kt(e).isValid())?$t({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},vn.toNow=function(e){return this.to(kt(),e)},vn.get=function(e){return C(this[e=$(e)])?this[e]():this},vn.invalidAt=function(){return m(this).overflow},vn.isAfter=function(e,t){var n=S(e)?e:kt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=$(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},vn.isBefore=function(e,t){var n=S(e)?e:kt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=$(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},vn.isBetween=function(e,t,n,i){var r=S(e)?e:kt(e),s=S(t)?t:kt(t);return!!(this.isValid()&&r.isValid()&&s.isValid())&&("("===(i=i||"()")[0]?this.isAfter(r,n):!this.isBefore(r,n))&&(")"===i[1]?this.isBefore(s,n):!this.isAfter(s,n))},vn.isSame=function(e,t){var n,i=S(e)?e:kt(e);return!(!this.isValid()||!i.isValid())&&("millisecond"===(t=$(t)||"millisecond")?this.valueOf()===i.valueOf():(n=i.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},vn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},vn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},vn.isValid=function(){return b(this)},vn.lang=Xt,vn.locale=Zt,vn.localeData=en,vn.max=Tt,vn.min=Dt,vn.parsingFlags=function(){return f({},m(this))},vn.set=function(e,t){if("object"==typeof e){var n,i=function(e){var t,n=[];for(t in e)a(e,t)&&n.push({unit:t,priority:W[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}(e=H(e));for(n=0;n<i.length;n++)this[i[n].unit](e[i[n].unit])}else if(C(this[e=$(e)]))return this[e](t);return this},vn.startOf=function(e){var t,n;if(void 0===(e=$(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?cn:an,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=on(t+(this._isUTC?0:this.utcOffset()*nn),rn);break;case"minute":t=this._d.valueOf(),t-=on(t,nn);break;case"second":t=this._d.valueOf(),t-=on(t,tn)}return this._d.setTime(t),r.updateOffset(this,!0),this},vn.subtract=qt,vn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},vn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},vn.toDate=function(){return new Date(this.valueOf())},vn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?N(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):C(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",N(n,"Z")):N(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},vn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n="moment",i="";return this.isLocal()||(n=0===this.utcOffset()?"moment.utc":"moment.parseZone",i="Z"),e="["+n+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+i+'[")]')},"undefined"!=typeof Symbol&&null!=Symbol.for&&(vn[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),vn.toJSON=function(){return this.isValid()?this.toISOString():null},vn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},vn.unix=function(){return Math.floor(this.valueOf()/1e3)},vn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},vn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},vn.eraName=function(){var e,t,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until)return i[e].name;if(i[e].until<=n&&n<=i[e].since)return i[e].name}return""},vn.eraNarrow=function(){var e,t,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until)return i[e].narrow;if(i[e].until<=n&&n<=i[e].since)return i[e].narrow}return""},vn.eraAbbr=function(){var e,t,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until)return i[e].abbr;if(i[e].until<=n&&n<=i[e].since)return i[e].abbr}return""},vn.eraYear=function(){var e,t,n,i,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(n=s[e].since<=s[e].until?1:-1,i=this.clone().startOf("day").valueOf(),s[e].since<=i&&i<=s[e].until||s[e].until<=i&&i<=s[e].since)return(this.year()-r(s[e].since).year())*n+s[e].offset;return this.year()},vn.year=Ae,vn.isLeapYear=function(){return B(this.year())},vn.weekYear=function(e){return hn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},vn.isoWeekYear=function(e){return hn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},vn.quarter=vn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},vn.month=Le,vn.daysInMonth=function(){return Se(this.year(),this.month())},vn.week=vn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},vn.isoWeek=vn.isoWeeks=function(e){var t=Fe(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},vn.weeksInYear=function(){var e=this.localeData()._week;return Ye(this.year(),e.dow,e.doy)},vn.weeksInWeekYear=function(){var e=this.localeData()._week;return Ye(this.weekYear(),e.dow,e.doy)},vn.isoWeeksInYear=function(){return Ye(this.year(),1,4)},vn.isoWeeksInISOWeekYear=function(){return Ye(this.isoWeekYear(),1,4)},vn.date=pn,vn.day=vn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},vn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},vn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},vn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},vn.hour=vn.hours=Xe,vn.minute=vn.minutes=mn,vn.second=vn.seconds=_n,vn.millisecond=vn.milliseconds=gn,vn.utcOffset=function(e,t,n){var i,s=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Pt(he,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(i=Nt(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),s!==e&&(!t||this._changeInProgress?Bt(this,$t(e-s,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?s:Nt(this)},vn.utc=function(e){return this.utcOffset(0,e)},vn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Nt(this),"m")),this},vn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Pt(de,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},vn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?kt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},vn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},vn.isLocal=function(){return!!this.isValid()&&!this._isUTC},vn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},vn.isUtc=Ft,vn.isUTC=Ft,vn.zoneAbbr=function(){return this._isUTC?"UTC":""},vn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},vn.dates=x("dates accessor is deprecated. Use date instead.",pn),vn.months=x("months accessor is deprecated. Use month instead",Le),vn.years=x("years accessor is deprecated. Use year instead",Ae),vn.zone=x("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),vn.isDSTShifted=x("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e,t={};return v(t,this),(t=Mt(t))._a?(e=t._isUTC?p(t._a):kt(t._a),this._isDSTShifted=this.isValid()&&function(e,t,n){var i,r=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),o=0;for(i=0;i<r;i++)q(e[i])!==q(t[i])&&o++;return o+s}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}));var Sn=L.prototype;function Mn(e,t,n,i){var r=ct(),s=p().set(i,t);return r[n](s,e)}function xn(e,t,n){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return Mn(e,t,n,"month");var i,r=[];for(i=0;i<12;i++)r[i]=Mn(e,i,n,"month");return r}function kn(e,t,n,i){"boolean"==typeof e?(u(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,u(t)&&(n=t,t=void 0),t=t||"");var r,s=ct(),o=e?s._week.dow:0,a=[];if(null!=n)return Mn(t,(n+o)%7,i,"day");for(r=0;r<7;r++)a[r]=Mn(t,(r+o)%7,i,"day");return a}Sn.calendar=function(e,t,n){var i=this._calendar[e]||this._calendar.sameElse;return C(i)?i.call(t,n):i},Sn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(E).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},Sn.invalidDate=function(){return this._invalidDate},Sn.ordinal=function(e){return this._ordinal.replace("%d",e)},Sn.preparse=wn,Sn.postformat=wn,Sn.relativeTime=function(e,t,n,i){var r=this._relativeTime[n];return C(r)?r(e,t,n,i):r.replace(/%d/i,e)},Sn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return C(n)?n(t):n.replace(/%s/i,t)},Sn.set=function(e){var t,n;for(n in e)a(e,n)&&(C(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Sn.eras=function(e,t){var n,i,s,o=this._eras||ct("en")._eras;for(n=0,i=o.length;n<i;++n){switch(typeof o[n].since){case"string":s=r(o[n].since).startOf("day"),o[n].since=s.valueOf()}switch(typeof o[n].until){case"undefined":o[n].until=1/0;break;case"string":s=r(o[n].until).startOf("day").valueOf(),o[n].until=s.valueOf()}}return o},Sn.erasParse=function(e,t,n){var i,r,s,o,a,c=this.eras();for(e=e.toUpperCase(),i=0,r=c.length;i<r;++i)if(s=c[i].name.toUpperCase(),o=c[i].abbr.toUpperCase(),a=c[i].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(o===e)return c[i];break;case"NNNN":if(s===e)return c[i];break;case"NNNNN":if(a===e)return c[i]}else if([s,o,a].indexOf(e)>=0)return c[i]},Sn.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*n},Sn.erasAbbrRegex=function(e){return a(this,"_erasAbbrRegex")||un.call(this),e?this._erasAbbrRegex:this._erasRegex},Sn.erasNameRegex=function(e){return a(this,"_erasNameRegex")||un.call(this),e?this._erasNameRegex:this._erasRegex},Sn.erasNarrowRegex=function(e){return a(this,"_erasNarrowRegex")||un.call(this),e?this._erasNarrowRegex:this._erasRegex},Sn.months=function(e,t){return e?s(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||ke).test(t)?"format":"standalone"][e.month()]:s(this._months)?this._months:this._months.standalone},Sn.monthsShort=function(e,t){return e?s(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[ke.test(t)?"format":"standalone"][e.month()]:s(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Sn.monthsParse=function(e,t,n){var i,r,s;if(this._monthsParseExact)return Ce.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(r=p([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(s="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[i]=new RegExp(s.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[i].test(e))return i;if(n&&"MMM"===t&&this._shortMonthsParse[i].test(e))return i;if(!n&&this._monthsParse[i].test(e))return i}},Sn.monthsRegex=function(e){return this._monthsParseExact?(a(this,"_monthsRegex")||Re.call(this),e?this._monthsStrictRegex:this._monthsRegex):(a(this,"_monthsRegex")||(this._monthsRegex=Te),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},Sn.monthsShortRegex=function(e){return this._monthsParseExact?(a(this,"_monthsRegex")||Re.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,"_monthsShortRegex")||(this._monthsShortRegex=De),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},Sn.week=function(e){return Fe(e,this._week.dow,this._week.doy).week},Sn.firstDayOfYear=function(){return this._week.doy},Sn.firstDayOfWeek=function(){return this._week.dow},Sn.weekdays=function(e,t){var n=s(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?ze(n,this._week.dow):e?n[e.day()]:n},Sn.weekdaysMin=function(e){return!0===e?ze(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},Sn.weekdaysShort=function(e){return!0===e?ze(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},Sn.weekdaysParse=function(e,t,n){var i,r,s;if(this._weekdaysParseExact)return qe.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(r=p([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(s="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(s.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[i].test(e))return i;if(n&&"ddd"===t&&this._shortWeekdaysParse[i].test(e))return i;if(n&&"dd"===t&&this._minWeekdaysParse[i].test(e))return i;if(!n&&this._weekdaysParse[i].test(e))return i}},Sn.weekdaysRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Ge.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=Ve),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},Sn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Ge.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Be),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Sn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Ge.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ue),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Sn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},Sn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},ot("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===q(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=x("moment.lang is deprecated. Use moment.locale instead.",ot),r.langData=x("moment.langData is deprecated. Use moment.localeData instead.",ct);var Dn=Math.abs;function Tn(e,t,n,i){var r=$t(t,n);return e._milliseconds+=i*r._milliseconds,e._days+=i*r._days,e._months+=i*r._months,e._bubble()}function Cn(e){return e<0?Math.floor(e):Math.ceil(e)}function On(e){return 4800*e/146097}function Ln(e){return 146097*e/4800}function Rn(e){return function(){return this.as(e)}}var En=Rn("ms"),An=Rn("s"),In=Rn("m"),Pn=Rn("h"),jn=Rn("d"),Nn=Rn("w"),Fn=Rn("M"),Yn=Rn("Q"),zn=Rn("y");function $n(e){return function(){return this.isValid()?this._data[e]:NaN}}var Hn=$n("milliseconds"),Wn=$n("seconds"),Vn=$n("minutes"),Bn=$n("hours"),Un=$n("days"),qn=$n("months"),Gn=$n("years"),Jn=Math.round,Qn={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Kn(e,t,n,i,r){return r.relativeTime(t||1,!!n,e,i)}var Zn=Math.abs;function Xn(e){return(e>0)-(e<0)||+e}function ei(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,i,r,s,o,a,c=Zn(this._milliseconds)/1e3,l=Zn(this._days),u=Zn(this._months),d=this.asSeconds();return d?(e=U(c/60),t=U(e/60),c%=60,e%=60,n=U(u/12),u%=12,i=c?c.toFixed(3).replace(/\.?0+$/,""):"",r=d<0?"-":"",s=Xn(this._months)!==Xn(d)?"-":"",o=Xn(this._days)!==Xn(d)?"-":"",a=Xn(this._milliseconds)!==Xn(d)?"-":"",r+"P"+(n?s+n+"Y":"")+(u?s+u+"M":"")+(l?o+l+"D":"")+(t||e||c?"T":"")+(t?a+t+"H":"")+(e?a+e+"M":"")+(c?a+i+"S":"")):"P0D"}var ti=Lt.prototype;return ti.isValid=function(){return this._isValid},ti.abs=function(){var e=this._data;return this._milliseconds=Dn(this._milliseconds),this._days=Dn(this._days),this._months=Dn(this._months),e.milliseconds=Dn(e.milliseconds),e.seconds=Dn(e.seconds),e.minutes=Dn(e.minutes),e.hours=Dn(e.hours),e.months=Dn(e.months),e.years=Dn(e.years),this},ti.add=function(e,t){return Tn(this,e,t,1)},ti.subtract=function(e,t){return Tn(this,e,t,-1)},ti.as=function(e){if(!this.isValid())return NaN;var t,n,i=this._milliseconds;if("month"===(e=$(e))||"quarter"===e||"year"===e)switch(n=this._months+On(t=this._days+i/864e5),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Ln(this._months)),e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return 24*t+i/36e5;case"minute":return 1440*t+i/6e4;case"second":return 86400*t+i/1e3;case"millisecond":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+e)}},ti.asMilliseconds=En,ti.asSeconds=An,ti.asMinutes=In,ti.asHours=Pn,ti.asDays=jn,ti.asWeeks=Nn,ti.asMonths=Fn,ti.asQuarters=Yn,ti.asYears=zn,ti.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*q(this._months/12):NaN},ti._bubble=function(){var e,t,n,i,r,s=this._milliseconds,o=this._days,a=this._months,c=this._data;return s>=0&&o>=0&&a>=0||s<=0&&o<=0&&a<=0||(s+=864e5*Cn(Ln(a)+o),o=0,a=0),c.milliseconds=s%1e3,e=U(s/1e3),c.seconds=e%60,t=U(e/60),c.minutes=t%60,n=U(t/60),c.hours=n%24,o+=U(n/24),a+=r=U(On(o)),o-=Cn(Ln(r)),i=U(a/12),a%=12,c.days=o,c.months=a,c.years=i,this},ti.clone=function(){return $t(this)},ti.get=function(e){return e=$(e),this.isValid()?this[e+"s"]():NaN},ti.milliseconds=Hn,ti.seconds=Wn,ti.minutes=Vn,ti.hours=Bn,ti.days=Un,ti.weeks=function(){return U(this.days()/7)},ti.months=qn,ti.years=Gn,ti.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,i,r=!1,s=Qn;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(r=e),"object"==typeof t&&(s=Object.assign({},Qn,t),null!=t.s&&null==t.ss&&(s.ss=t.s-1)),i=function(e,t,n,i){var r=$t(e).abs(),s=Jn(r.as("s")),o=Jn(r.as("m")),a=Jn(r.as("h")),c=Jn(r.as("d")),l=Jn(r.as("M")),u=Jn(r.as("w")),d=Jn(r.as("y")),h=s<=n.ss&&["s",s]||s<n.s&&["ss",s]||o<=1&&["m"]||o<n.m&&["mm",o]||a<=1&&["h"]||a<n.h&&["hh",a]||c<=1&&["d"]||c<n.d&&["dd",c];return null!=n.w&&(h=h||u<=1&&["w"]||u<n.w&&["ww",u]),(h=h||l<=1&&["M"]||l<n.M&&["MM",l]||d<=1&&["y"]||["yy",d])[2]=t,h[3]=+e>0,h[4]=i,Kn.apply(null,h)}(this,!r,s,n=this.localeData()),r&&(i=n.pastFuture(+this,i)),n.postformat(i)},ti.toISOString=ei,ti.toString=ei,ti.toJSON=ei,ti.locale=Zt,ti.localeData=en,ti.toIsoString=x("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ei),ti.lang=Xt,j("X",0,0,"unix"),j("x",0,0,"valueOf"),pe("x",ue),pe("X",/[+-]?\d+(\.\d{1,3})?/),ye("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),ye("x",(function(e,t,n){n._d=new Date(q(e))})),r.version="2.29.1",t=kt,r.fn=vn,r.min=function(){return Ct("isBefore",[].slice.call(arguments,0))},r.max=function(){return Ct("isAfter",[].slice.call(arguments,0))},r.now=function(){return Date.now?Date.now():+new Date},r.utc=p,r.unix=function(e){return kt(1e3*e)},r.months=function(e,t){return xn(e,t,"months")},r.isDate=d,r.locale=ot,r.invalid=g,r.duration=$t,r.isMoment=S,r.weekdays=function(e,t,n){return kn(e,t,n,"weekdays")},r.parseZone=function(){return kt.apply(null,arguments).parseZone()},r.localeData=ct,r.isDuration=Rt,r.monthsShort=function(e,t){return xn(e,t,"monthsShort")},r.weekdaysMin=function(e,t,n){return kn(e,t,n,"weekdaysMin")},r.defineLocale=at,r.updateLocale=function(e,t){if(null!=t){var n,i,r=et;null!=tt[e]&&null!=tt[e].parentLocale?tt[e].set(O(tt[e]._config,t)):(null!=(i=st(e))&&(r=i._config),t=O(r,t),null==i&&(t.abbr=e),(n=new L(t)).parentLocale=tt[e],tt[e]=n),ot(e)}else null!=tt[e]&&(null!=tt[e].parentLocale?(tt[e]=tt[e].parentLocale,e===ot()&&ot(e)):null!=tt[e]&&delete tt[e]);return tt[e]},r.locales=function(){return k(tt)},r.weekdaysShort=function(e,t,n){return kn(e,t,n,"weekdaysShort")},r.normalizeUnits=$,r.relativeTimeRounding=function(e){return void 0===e?Jn:"function"==typeof e&&(Jn=e,!0)},r.relativeTimeThreshold=function(e,t){return void 0!==Qn[e]&&(void 0===t?Qn[e]:(Qn[e]=t,"s"===e&&(Qn.ss=t-1),!0))},r.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},r.prototype=vn,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()}).call(this,n("YuTi")(e))},wg0c:function(e,t,n){var i=n("2oRo"),r=n("WKiH").trim,s=n("WJkJ"),o=i.parseInt,a=/^[+-]?0[Xx]/,c=8!==o(s+"08")||22!==o(s+"0x16");e.exports=c?function(e,t){var n=r(String(e));return o(n,t>>>0||(a.test(n)?16:10))}:o},wnGv:function(e,t,n){"use strict";n.d(t,"a",(function(){return R}));var i=n("8Y7J"),r=n("s7LF"),s=n("LvDl"),o=n.n(s),a=n("oxzT"),c=n("QFaf"),l=n("DNAf"),u=n("a96k"),d=n("SVse"),h=n("NwgZ"),f=n("ANnk"),p=n("f69J"),m=n("G0yt");function b(e,t){if(1&e&&(i.Sb(0,"span",12),i.Oc(1),i.Rb()),2&e){const e=i.ic().$implicit,t=i.ic(2);i.yb(1),i.Qc(" ",t.messages.customValidations[e]," ")}}function g(e,t){if(1&e&&(i.Qb(0),i.Mc(1,b,2,1,"span",11),i.Pb()),2&e){const e=t.$implicit;i.ic();const n=i.Ac(1),r=i.ic();i.yb(1),i.pc("ngIf",r.form.showError("filter",n)&&r.filter.hasError(e))}}const _=function(e){return[e]};function y(e,t){if(1&e&&i.Nb(0,"i",18),2&e){const e=i.ic(3);i.pc("ngClass",i.uc(1,_,e.icons.check))}}function v(e,t){if(1&e&&(i.Qb(0),i.Nb(1,"br"),i.Sb(2,"small",19),i.Oc(3),i.Rb(),i.Pb()),2&e){const e=i.ic().$implicit;i.yb(3),i.Qc(" ",e.description,"\xa0 ")}}const w=function(e){return{"help-block disabled":e}};function S(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",13),i.gc("click",(function(){i.Dc(e);const n=t.$implicit;return i.ic(2).triggerSelection(n)})),i.Sb(1,"div",14),i.Mc(2,y,1,3,"i",15),i.Oc(3," \xa0 "),i.Rb(),i.Sb(4,"div",16),i.Oc(5),i.Mc(6,v,4,1,"ng-container",17),i.Rb(),i.Rb()}if(2&e){const e=t.$implicit,n=i.ic(2);i.pc("ngClass",i.uc(4,w,!(n.data.length!==n.selectionLimit&&e.enabled||e.selected))),i.yb(2),i.pc("ngIf",e.selected),i.yb(3),i.Qc(" ",e.name," "),i.yb(1),i.pc("ngIf",e.description)}}function M(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",20),i.gc("click",(function(){return i.Dc(e),i.ic(2).addCustomOption()})),i.Sb(1,"div",14),i.Nb(2,"i",18),i.Oc(3," \xa0 "),i.Rb(),i.Sb(4,"div",16),i.Oc(5),i.Rb(),i.Rb()}if(2&e){const e=i.ic(2);i.yb(2),i.pc("ngClass",i.uc(3,_,e.icons.tag)),i.yb(3),i.Rc(" ",e.messages.add," '",e.filter.value,"' ")}}function x(e,t){if(1&e&&(i.Sb(0,"span",23),i.Oc(1),i.Rb()),2&e){const e=i.ic(3);i.pc("ngbTooltip",e.messages.selectionLimit.tooltip),i.yb(1),i.Qc(" ",e.messages.selectionLimit.text," ")}}function k(e,t){if(1&e&&(i.Sb(0,"div",21),i.Mc(1,x,2,2,"span",22),i.Rb()),2&e){const e=i.ic(2);i.yb(1),i.pc("ngIf",e.data.length===e.selectionLimit)}}function D(e,t){if(1&e){const e=i.Tb();i.Sb(0,"form",4,5),i.Sb(2,"div"),i.Sb(3,"input",6),i.gc("keyup",(function(t){i.Dc(e);const n=i.ic();return 13==t.keyCode?n.selectOption():n.updateFilter()})),i.Rb(),i.Mc(4,g,2,1,"ng-container",7),i.Rb(),i.Rb(),i.Mc(5,S,7,6,"div",8),i.Mc(6,M,6,5,"div",9),i.Mc(7,k,2,1,"div",10)}if(2&e){const e=i.ic();i.pc("formGroup",e.form),i.yb(3),i.pc("placeholder",e.messages.filter),i.yb(1),i.pc("ngForOf",e.Object.keys(e.messages.customValidations)),i.yb(1),i.pc("ngForOf",e.filteredOptions),i.yb(1),i.pc("ngIf",e.isCreatable()),i.yb(1),i.pc("ngIf",e.data.length===e.selectionLimit)}}function T(e,t){if(1&e&&(i.Sb(0,"a",24),i.nc(1),i.Rb()),2&e){const e=i.ic(),t=i.Ac(1);i.pc("ngClass",e.elemClass)("ngbPopover",t)}}function C(e,t){if(1&e&&(i.Sb(0,"span",25),i.Oc(1),i.Rb()),2&e){const e=i.ic();i.yb(1),i.Qc(" ",e.messages.empty,"\n")}}function O(e,t){if(1&e&&(i.Sb(0,"span",25),i.Oc(1),i.Rb()),2&e){const e=i.ic();i.yb(1),i.Qc(" ",e.messages.noOptions,"\n")}}const L=["*"];let R=(()=>{class e{constructor(){this.data=[],this.options=[],this.messages=new l.a({}),this.customBadges=!1,this.customBadgeValidators=[],this.selection=new i.o,this.Object=Object,this.filteredOptions=[],this.icons=a.a}ngOnInit(){this.initFilter(),this.data.length>0&&this.initMissingOptions(),this.options=o.a.sortBy(this.options,["name"]),this.updateOptions()}initFilter(){this.filter=new r.h("",{validators:this.customBadgeValidators}),this.form=new c.a({filter:this.filter}),this.filteredOptions=[...this.options||[]]}initMissingOptions(){const e=this.options.map(e=>e.name);this.data.filter(t=>-1===e.indexOf(t)).forEach(e=>this.addOption(e)),this.forceOptionsToReflectData()}addOption(e){this.options.push(new u.a(!1,e,"")),this.options=o.a.sortBy(this.options,["name"]),this.triggerSelection(this.options.find(t=>t.name===e))}triggerSelection(e){!e||this.selectionLimit&&!e.selected&&this.data.length>=this.selectionLimit||(e.selected=!e.selected,this.updateOptions(),this.selection.emit({option:e}))}updateOptions(){this.data.splice(0,this.data.length),this.options.forEach(e=>{e.selected&&this.data.push(e.name)}),this.updateFilter()}updateFilter(){this.filteredOptions=this.options.filter(e=>e.name.includes(this.filter.value))}forceOptionsToReflectData(){this.options.forEach(e=>{-1!==this.data.indexOf(e.name)&&(e.selected=!0)})}ngOnChanges(){this.filter&&this.updateFilter(),this.options&&this.data&&0!==this.data.length&&this.forceOptionsToReflectData()}selectOption(){0===this.filteredOptions.length?this.addCustomOption():(this.triggerSelection(this.filteredOptions[0]),this.resetFilter())}addCustomOption(){this.isCreatable()&&(this.addOption(this.filter.value),this.resetFilter())}isCreatable(){return this.customBadges&&this.filter.valid&&this.filter.value.length>0&&this.filteredOptions.every(e=>e.name!==this.filter.value)}resetFilter(){this.filter.setValue(""),this.updateFilter()}removeItem(e){this.triggerSelection(this.options.find(t=>t.name===e&&t.selected))}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-select"]],inputs:{elemClass:"elemClass",data:"data",options:"options",messages:"messages",selectionLimit:"selectionLimit",customBadges:"customBadges",customBadgeValidators:"customBadgeValidators"},outputs:{selection:"selection"},features:[i.wb],ngContentSelectors:L,decls:5,vars:3,consts:[["popTemplate",""],["class","select-menu-edit float-left",3,"ngClass","ngbPopover",4,"ngIf"],["class","form-text text-muted float-left",4,"ngIf"],["class","form-text text-muted float-left",4,"ngIf"],["name","form","novalidate","",3,"formGroup"],["formDir","ngForm"],["type","text","formControlName","filter",1,"form-control","text-center",3,"placeholder","keyup"],[4,"ngFor","ngForOf"],["class","select-menu-item",3,"ngClass","click",4,"ngFor","ngForOf"],["class","select-menu-item",3,"click",4,"ngIf"],["class","is-invalid",4,"ngIf"],["class","invalid-feedback text-center d-block",4,"ngIf"],[1,"invalid-feedback","text-center","d-block"],[1,"select-menu-item",3,"ngClass","click"],[1,"select-menu-item-icon"],["aria-hidden","true",3,"ngClass",4,"ngIf"],[1,"select-menu-item-content"],[4,"ngIf"],["aria-hidden","true",3,"ngClass"],[1,"form-text","text-muted"],[1,"select-menu-item",3,"click"],[1,"is-invalid"],["class","form-text text-muted text-center text-warning",3,"ngbTooltip",4,"ngIf"],[1,"form-text","text-muted","text-center","text-warning",3,"ngbTooltip"],[1,"select-menu-edit","float-left",3,"ngClass","ngbPopover"],[1,"form-text","text-muted","float-left"]],template:function(e,t){1&e&&(i.oc(),i.Mc(0,D,8,6,"ng-template",null,0,i.Nc),i.Mc(2,T,2,2,"a",1),i.Mc(3,C,2,1,"span",2),i.Mc(4,O,2,1,"span",3)),2&e&&(i.yb(2),i.pc("ngIf",t.customBadges||t.options.length>0),i.yb(1),i.pc("ngIf",0===t.data.length&&!(!t.customBadges&&0===t.options.length)),i.yb(1),i.pc("ngIf",!t.customBadges&&0===t.options.length))},directives:[d.r,r.C,r.r,r.k,h.a,f.a,r.d,p.a,r.q,r.i,d.q,d.p,m.D,m.w],styles:[".select-menu-item[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.09);cursor:pointer;display:block;font-size:1rem}.select-menu-item[_ngcontent-%COMP%]:hover{background-color:#e9ecef}.select-menu-item-icon[_ngcontent-%COMP%]{float:left;padding:.5em;width:3em}.select-menu-item-content[_ngcontent-%COMP%]{padding:.5em}.select-menu-item-content[_ngcontent-%COMP%] .form-text[_ngcontent-%COMP%]{display:flex}"]}),e})()},x38r:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var i=function(e){return e.bold="bold",e.sparkline="sparkline",e.perSecond="perSecond",e.checkIcon="checkIcon",e.routerLink="routerLink",e.executing="executing",e.classAdding="classAdding",e.badge="badge",e.map="map",e.truncate="truncate",e}({})},x6pH:function(e,t,n){!function(e){"use strict";e.defineLocale("he",{months:"\u05d9\u05e0\u05d5\u05d0\u05e8_\u05e4\u05d1\u05e8\u05d5\u05d0\u05e8_\u05de\u05e8\u05e5_\u05d0\u05e4\u05e8\u05d9\u05dc_\u05de\u05d0\u05d9_\u05d9\u05d5\u05e0\u05d9_\u05d9\u05d5\u05dc\u05d9_\u05d0\u05d5\u05d2\u05d5\u05e1\u05d8_\u05e1\u05e4\u05d8\u05de\u05d1\u05e8_\u05d0\u05d5\u05e7\u05d8\u05d5\u05d1\u05e8_\u05e0\u05d5\u05d1\u05de\u05d1\u05e8_\u05d3\u05e6\u05de\u05d1\u05e8".split("_"),monthsShort:"\u05d9\u05e0\u05d5\u05f3_\u05e4\u05d1\u05e8\u05f3_\u05de\u05e8\u05e5_\u05d0\u05e4\u05e8\u05f3_\u05de\u05d0\u05d9_\u05d9\u05d5\u05e0\u05d9_\u05d9\u05d5\u05dc\u05d9_\u05d0\u05d5\u05d2\u05f3_\u05e1\u05e4\u05d8\u05f3_\u05d0\u05d5\u05e7\u05f3_\u05e0\u05d5\u05d1\u05f3_\u05d3\u05e6\u05de\u05f3".split("_"),weekdays:"\u05e8\u05d0\u05e9\u05d5\u05df_\u05e9\u05e0\u05d9_\u05e9\u05dc\u05d9\u05e9\u05d9_\u05e8\u05d1\u05d9\u05e2\u05d9_\u05d7\u05de\u05d9\u05e9\u05d9_\u05e9\u05d9\u05e9\u05d9_\u05e9\u05d1\u05ea".split("_"),weekdaysShort:"\u05d0\u05f3_\u05d1\u05f3_\u05d2\u05f3_\u05d3\u05f3_\u05d4\u05f3_\u05d5\u05f3_\u05e9\u05f3".split("_"),weekdaysMin:"\u05d0_\u05d1_\u05d2_\u05d3_\u05d4_\u05d5_\u05e9".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [\u05d1]MMMM YYYY",LLL:"D [\u05d1]MMMM YYYY HH:mm",LLLL:"dddd, D [\u05d1]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[\u05d4\u05d9\u05d5\u05dd \u05d1\u05be]LT",nextDay:"[\u05de\u05d7\u05e8 \u05d1\u05be]LT",nextWeek:"dddd [\u05d1\u05e9\u05e2\u05d4] LT",lastDay:"[\u05d0\u05ea\u05de\u05d5\u05dc \u05d1\u05be]LT",lastWeek:"[\u05d1\u05d9\u05d5\u05dd] dddd [\u05d4\u05d0\u05d7\u05e8\u05d5\u05df \u05d1\u05e9\u05e2\u05d4] LT",sameElse:"L"},relativeTime:{future:"\u05d1\u05e2\u05d5\u05d3 %s",past:"\u05dc\u05e4\u05e0\u05d9 %s",s:"\u05de\u05e1\u05e4\u05e8 \u05e9\u05e0\u05d9\u05d5\u05ea",ss:"%d \u05e9\u05e0\u05d9\u05d5\u05ea",m:"\u05d3\u05e7\u05d4",mm:"%d \u05d3\u05e7\u05d5\u05ea",h:"\u05e9\u05e2\u05d4",hh:function(e){return 2===e?"\u05e9\u05e2\u05ea\u05d9\u05d9\u05dd":e+" \u05e9\u05e2\u05d5\u05ea"},d:"\u05d9\u05d5\u05dd",dd:function(e){return 2===e?"\u05d9\u05d5\u05de\u05d9\u05d9\u05dd":e+" \u05d9\u05de\u05d9\u05dd"},M:"\u05d7\u05d5\u05d3\u05e9",MM:function(e){return 2===e?"\u05d7\u05d5\u05d3\u05e9\u05d9\u05d9\u05dd":e+" \u05d7\u05d5\u05d3\u05e9\u05d9\u05dd"},y:"\u05e9\u05e0\u05d4",yy:function(e){return 2===e?"\u05e9\u05e0\u05ea\u05d9\u05d9\u05dd":e%10==0&&10!==e?e+" \u05e9\u05e0\u05d4":e+" \u05e9\u05e0\u05d9\u05dd"}},meridiemParse:/\u05d0\u05d7\u05d4"\u05e6|\u05dc\u05e4\u05e0\u05d4"\u05e6|\u05d0\u05d7\u05e8\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd|\u05dc\u05e4\u05e0\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd|\u05dc\u05e4\u05e0\u05d5\u05ea \u05d1\u05d5\u05e7\u05e8|\u05d1\u05d1\u05d5\u05e7\u05e8|\u05d1\u05e2\u05e8\u05d1/i,isPM:function(e){return/^(\u05d0\u05d7\u05d4"\u05e6|\u05d0\u05d7\u05e8\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd|\u05d1\u05e2\u05e8\u05d1)$/.test(e)},meridiem:function(e,t,n){return e<5?"\u05dc\u05e4\u05e0\u05d5\u05ea \u05d1\u05d5\u05e7\u05e8":e<10?"\u05d1\u05d1\u05d5\u05e7\u05e8":e<12?n?'\u05dc\u05e4\u05e0\u05d4"\u05e6':"\u05dc\u05e4\u05e0\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd":e<18?n?'\u05d0\u05d7\u05d4"\u05e6':"\u05d0\u05d7\u05e8\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd":"\u05d1\u05e2\u05e8\u05d1"}})}(n("wd/R"))},xDBR:function(e,t){e.exports=!1},xTzq:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return o}));var i=n("LvDl"),r=n.n(i);function s(...e){switch(e.length){case 1:return a.apply(void 0,e);case 3:return c.apply(void 0,e);default:throw new Error}}function o(e,t,n){const i="__ignore_"+t;Array.isArray(e[i])?e[i].push(n):e[i]=[n]}function a(e){for(const t of Object.getOwnPropertyNames(e.prototype)){const n=Object.getOwnPropertyDescriptor(e.prototype,t),i="constructor"===t;n.value instanceof Function&&!i&&(c(e.prototype,t,n),Object.defineProperty(e.prototype,t,n))}}function c(e,t,n){void 0===n&&(n=Object.getOwnPropertyDescriptor(e,t));const i=n.value;n.value=function(){const n="__ignore_"+t,s=e[n]||[],o=[];for(let e=0;e<arguments.length;e++)o[e]=r.a.isString(arguments[e])&&-1===s.indexOf(e)?encodeURIComponent(arguments[e]):arguments[e];const a=i.apply(this,o);return a}}},xbPD:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("7o/Q");function r(e=null){return t=>t.lift(new s(e))}class s{constructor(e){this.defaultValue=e}call(e,t){return t.subscribe(new o(e,this.defaultValue))}}class o extends i.a{constructor(e,t){super(e),this.defaultValue=t,this.isEmpty=!0}_next(e){this.isEmpty=!1,this.destination.next(e)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}},xgIS:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n("HDdC"),r=n("DH7j"),s=n("n6bG"),o=n("lJxs");function a(e,t,n,c){return Object(s.a)(n)&&(c=n,n=void 0),c?a(e,t,n).pipe(Object(o.a)(e=>Object(r.a)(e)?c(...e):c(e))):new i.a(i=>{!function e(t,n,i,r,s){let o;if(function(e){return e&&"function"==typeof e.addEventListener&&"function"==typeof e.removeEventListener}(t)){const e=t;t.addEventListener(n,i,s),o=()=>e.removeEventListener(n,i,s)}else if(function(e){return e&&"function"==typeof e.on&&"function"==typeof e.off}(t)){const e=t;t.on(n,i),o=()=>e.off(n,i)}else if(function(e){return e&&"function"==typeof e.addListener&&"function"==typeof e.removeListener}(t)){const e=t;t.addListener(n,i),o=()=>e.removeListener(n,i)}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(let o=0,a=t.length;o<a;o++)e(t[o],n,i,r,s)}r.add(o)}(e,t,(function(e){i.next(arguments.length>1?Array.prototype.slice.call(arguments):e)}),i,n)})}},xrYK:function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},xs3f:function(e,t,n){var i=n("2oRo"),r=n("zk60"),s="__core-js_shared__",o=i[s]||r(s,{});e.exports=o},xutz:function(e,t,n){"use strict";(function(e){var i=n("XqMk"),r="object"==typeof exports&&exports&&!exports.nodeType&&exports,s=r&&"object"==typeof e&&e&&!e.nodeType&&e,o=s&&s.exports===r&&i.a.process,a=function(){try{return s&&s.require&&s.require("util").types||o&&o.binding&&o.binding("util")}catch(e){}}();t.a=a}).call(this,n("3UD+")(e))},yCtX:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("HDdC"),r=n("ngJS"),s=n("jZKg");function o(e,t){return t?Object(s.a)(e,t):new i.a(Object(r.a)(e))}},yGOH:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("8Y7J");let r=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[]]}),e})()},yJti:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var i=function(e){return e[e.ValueOk=0]="ValueOk",e[e.ValueStale=1]="ValueStale",e[e.ValueNone=2]="ValueNone",e[e.ValueException=3]="ValueException",e}({})},yPMs:function(e,t,n){!function(e){"use strict";e.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_N\xebntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_N\xebn_Dhj".split("_"),weekdays:"E Diel_E H\xebn\xeb_E Mart\xeb_E M\xebrkur\xeb_E Enjte_E Premte_E Shtun\xeb".split("_"),weekdaysShort:"Die_H\xebn_Mar_M\xebr_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_M\xeb_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(e){return"M"===e.charAt(0)},meridiem:function(e,t,n){return e<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot n\xeb] LT",nextDay:"[Nes\xebr n\xeb] LT",nextWeek:"dddd [n\xeb] LT",lastDay:"[Dje n\xeb] LT",lastWeek:"dddd [e kaluar n\xeb] LT",sameElse:"L"},relativeTime:{future:"n\xeb %s",past:"%s m\xeb par\xeb",s:"disa sekonda",ss:"%d sekonda",m:"nj\xeb minut\xeb",mm:"%d minuta",h:"nj\xeb or\xeb",hh:"%d or\xeb",d:"nj\xeb dit\xeb",dd:"%d dit\xeb",M:"nj\xeb muaj",MM:"%d muaj",y:"nj\xeb vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},yT6U:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("LvDl"),r=n.n(i),s=n("8Y7J");let o=(()=>{class e{transform(e,t=!1){let n=e;return(!r.a.isArray(e)||r.a.isArray(e)&&t)&&(n=[e]),n}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=s.Lb({name:"array",type:e,pure:!0}),e})()},ylTp:function(e,t,n){"use strict";var i=n("Ju5/");t.a=i.a.Symbol},yoRg:function(e,t,n){var i=n("UTVS"),r=n("/GqU"),s=n("TWQb").indexOf,o=n("0BK2");e.exports=function(e,t){var n,a=r(e),c=0,l=[];for(n in a)!i(o,n)&&i(a,n)&&l.push(n);for(;t.length>c;)i(a,n=t[c++])&&(~s(l,n)||l.push(n));return l}},"z+Ro":function(e,t,n){"use strict";function i(e){return e&&"function"==typeof e.schedule}n.d(t,"a",(function(){return i}))},z1FC:function(e,t,n){!function(e){"use strict";function t(e,t,n,i){var r={s:["viensas secunds","'iensas secunds"],ss:[e+" secunds",e+" secunds"],m:["'n m\xedut","'iens m\xedut"],mm:[e+" m\xeduts",e+" m\xeduts"],h:["'n \xfeora","'iensa \xfeora"],hh:[e+" \xfeoras",e+" \xfeoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",e+" ars"]};return i||t?r[n][0]:r[n][1]}e.defineLocale("tzl",{months:"Januar_Fevraglh_Mar\xe7_Avr\xefu_Mai_G\xfcn_Julia_Guscht_Setemvar_Listop\xe4ts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_G\xfcn_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"S\xfaladi_L\xfane\xe7i_Maitzi_M\xe1rcuri_Xh\xfaadi_Vi\xe9ner\xe7i_S\xe1turi".split("_"),weekdaysShort:"S\xfal_L\xfan_Mai_M\xe1r_Xh\xfa_Vi\xe9_S\xe1t".split("_"),weekdaysMin:"S\xfa_L\xfa_Ma_M\xe1_Xh_Vi_S\xe1".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(e){return"d'o"===e.toLowerCase()},meridiem:function(e,t,n){return e>11?n?"d'o":"D'O":n?"d'a":"D'A"},calendar:{sameDay:"[oxhi \xe0] LT",nextDay:"[dem\xe0 \xe0] LT",nextWeek:"dddd [\xe0] LT",lastDay:"[ieiri \xe0] LT",lastWeek:"[s\xfcr el] dddd [lasteu \xe0] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},z3Vd:function(e,t,n){!function(e){"use strict";var t="pagh_wa\u2019_cha\u2019_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function n(e,n,i,r){var s=function(e){var n=Math.floor(e%1e3/100),i=Math.floor(e%100/10),r=e%10,s="";return n>0&&(s+=t[n]+"vatlh"),i>0&&(s+=(""!==s?" ":"")+t[i]+"maH"),r>0&&(s+=(""!==s?" ":"")+t[r]),""===s?"pagh":s}(e);switch(i){case"ss":return s+" lup";case"mm":return s+" tup";case"hh":return s+" rep";case"dd":return s+" jaj";case"MM":return s+" jar";case"yy":return s+" DIS"}}e.defineLocale("tlh",{months:"tera\u2019 jar wa\u2019_tera\u2019 jar cha\u2019_tera\u2019 jar wej_tera\u2019 jar loS_tera\u2019 jar vagh_tera\u2019 jar jav_tera\u2019 jar Soch_tera\u2019 jar chorgh_tera\u2019 jar Hut_tera\u2019 jar wa\u2019maH_tera\u2019 jar wa\u2019maH wa\u2019_tera\u2019 jar wa\u2019maH cha\u2019".split("_"),monthsShort:"jar wa\u2019_jar cha\u2019_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa\u2019maH_jar wa\u2019maH wa\u2019_jar wa\u2019maH cha\u2019".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa\u2019leS] LT",nextWeek:"LLL",lastDay:"[wa\u2019Hu\u2019] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:function(e){var t=e;return-1!==e.indexOf("jaj")?t.slice(0,-3)+"leS":-1!==e.indexOf("jar")?t.slice(0,-3)+"waQ":-1!==e.indexOf("DIS")?t.slice(0,-3)+"nem":t+" pIq"},past:function(e){var t=e;return-1!==e.indexOf("jaj")?t.slice(0,-3)+"Hu\u2019":-1!==e.indexOf("jar")?t.slice(0,-3)+"wen":-1!==e.indexOf("DIS")?t.slice(0,-3)+"ben":t+" ret"},s:"puS lup",ss:n,m:"wa\u2019 tup",mm:n,h:"wa\u2019 rep",hh:n,d:"wa\u2019 jaj",dd:n,M:"wa\u2019 jar",MM:n,y:"wa\u2019 DIS",yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},z6cu:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("HDdC");function r(e,t){return new i.a(t?n=>t.schedule(s,0,{error:e,subscriber:n}):t=>t.error(e))}function s({error:e,subscriber:t}){t.error(e)}},zBJ4:function(e,t,n){var i=n("2oRo"),r=n("hh1v"),s=i.document,o=r(s)&&r(s.createElement);e.exports=function(e){return o?s.createElement(e):{}}},zKZe:function(e,t,n){var i=n("I+eb"),r=n("YNrV");i({target:"Object",stat:!0,forced:Object.assign!==r},{assign:r})},zUnb:function(e,t,n){"use strict";n.r(t);var i=n("8Y7J"),r=n("cUpR"),s=n("AytR"),o=n("SVse"),a=n("IheW"),c=n("GS7A");function l(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function u(e){switch(e.length){case 0:return new c.d;case 1:return e[0];default:return new c.k(e)}}function d(e,t,n,i,r={},s={}){const o=[],a=[];let l=-1,u=null;if(i.forEach(e=>{const n=e.offset,i=n==l,d=i&&u||{};Object.keys(e).forEach(n=>{let i=n,a=e[n];if("offset"!==n)switch(i=t.normalizePropertyName(i,o),a){case c.l:a=r[n];break;case c.a:a=s[n];break;default:a=t.normalizeStyleValue(n,i,a,o)}d[i]=a}),i||a.push(d),u=d,l=n}),o.length){const e="\n - ";throw new Error(`Unable to animate due to the following errors:${e}${o.join(e)}`)}return a}function h(e,t,n,i){switch(t){case"start":e.onStart(()=>i(n&&f(n,"start",e)));break;case"done":e.onDone(()=>i(n&&f(n,"done",e)));break;case"destroy":e.onDestroy(()=>i(n&&f(n,"destroy",e)))}}function f(e,t,n){const i=n.totalTime,r=p(e.element,e.triggerName,e.fromState,e.toState,t||e.phaseName,null==i?e.totalTime:i,!!n.disabled),s=e._data;return null!=s&&(r._data=s),r}function p(e,t,n,i,r="",s=0,o){return{element:e,triggerName:t,fromState:n,toState:i,phaseName:r,totalTime:s,disabled:!!o}}function m(e,t,n){let i;return e instanceof Map?(i=e.get(t),i||e.set(t,i=n)):(i=e[t],i||(i=e[t]=n)),i}function b(e){const t=e.indexOf(":");return[e.substring(1,t),e.substr(t+1)]}let g=(e,t)=>!1,_=(e,t)=>!1,y=(e,t,n)=>[];const v=l();(v||"undefined"!=typeof Element)&&(g=(e,t)=>e.contains(t),_=(()=>{if(v||Element.prototype.matches)return(e,t)=>e.matches(t);{const e=Element.prototype,t=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;return t?(e,n)=>t.apply(e,[n]):_}})(),y=(e,t,n)=>{let i=[];if(n)i.push(...e.querySelectorAll(t));else{const n=e.querySelector(t);n&&i.push(n)}return i});let w=null,S=!1;function M(e){w||(w=("undefined"!=typeof document?document.body:null)||{},S=!!w.style&&"WebkitAppearance"in w.style);let t=!0;return w.style&&!function(e){return"ebkit"==e.substring(1,6)}(e)&&(t=e in w.style,!t&&S)&&(t="Webkit"+e.charAt(0).toUpperCase()+e.substr(1)in w.style),t}const x=_,k=g,D=y;function T(e){const t={};return Object.keys(e).forEach(n=>{const i=n.replace(/([a-z])([A-Z])/g,"$1-$2");t[i]=e[n]}),t}let C=(()=>{class e{validateStyleProperty(e){return M(e)}matchesElement(e,t){return x(e,t)}containsElement(e,t){return k(e,t)}query(e,t,n){return D(e,t,n)}computeStyle(e,t,n){return n||""}animate(e,t,n,i,r,s=[],o){return new c.d(n,i)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})(),O=(()=>{class e{}return e.NOOP=new C,e})();const L="ng-enter",R="ng-leave",E="ng-trigger",A=".ng-trigger",I="ng-animating",P=".ng-animating";function j(e){if("number"==typeof e)return e;const t=e.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:N(parseFloat(t[1]),t[2])}function N(e,t){switch(t){case"s":return 1e3*e;default:return e}}function F(e,t,n){return e.hasOwnProperty("duration")?e:function(e,t,n){let i,r=0,s="";if("string"==typeof e){const n=e.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===n)return t.push(`The provided timing value "${e}" is invalid.`),{duration:0,delay:0,easing:""};i=N(parseFloat(n[1]),n[2]);const o=n[3];null!=o&&(r=N(parseFloat(o),n[4]));const a=n[5];a&&(s=a)}else i=e;if(!n){let n=!1,s=t.length;i<0&&(t.push("Duration values below 0 are not allowed for this animation step."),n=!0),r<0&&(t.push("Delay values below 0 are not allowed for this animation step."),n=!0),n&&t.splice(s,0,`The provided timing value "${e}" is invalid.`)}return{duration:i,delay:r,easing:s}}(e,t,n)}function Y(e,t={}){return Object.keys(e).forEach(n=>{t[n]=e[n]}),t}function z(e,t,n={}){if(t)for(let i in e)n[i]=e[i];else Y(e,n);return n}function $(e,t,n){return n?t+":"+n+";":""}function H(e){let t="";for(let n=0;n<e.style.length;n++){const i=e.style.item(n);t+=$(0,i,e.style.getPropertyValue(i))}for(const n in e.style)e.style.hasOwnProperty(n)&&!n.startsWith("_")&&(t+=$(0,n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),e.style[n]));e.setAttribute("style",t)}function W(e,t,n){e.style&&(Object.keys(t).forEach(i=>{const r=K(i);n&&!n.hasOwnProperty(i)&&(n[i]=e.style[r]),e.style[r]=t[i]}),l()&&H(e))}function V(e,t){e.style&&(Object.keys(t).forEach(t=>{const n=K(t);e.style[n]=""}),l()&&H(e))}function B(e){return Array.isArray(e)?1==e.length?e[0]:Object(c.f)(e):e}const U=new RegExp("{{\\s*(.+?)\\s*}}","g");function q(e){let t=[];if("string"==typeof e){let n;for(;n=U.exec(e);)t.push(n[1]);U.lastIndex=0}return t}function G(e,t,n){const i=e.toString(),r=i.replace(U,(e,i)=>{let r=t[i];return t.hasOwnProperty(i)||(n.push("Please provide a value for the animation param "+i),r=""),r.toString()});return r==i?e:r}function J(e){const t=[];let n=e.next();for(;!n.done;)t.push(n.value),n=e.next();return t}const Q=/-+([a-z0-9])/g;function K(e){return e.replace(Q,(...e)=>e[1].toUpperCase())}function Z(e,t){return 0===e||0===t}function X(e,t,n){const i=Object.keys(n);if(i.length&&t.length){let s=t[0],o=[];if(i.forEach(e=>{s.hasOwnProperty(e)||o.push(e),s[e]=n[e]}),o.length)for(var r=1;r<t.length;r++){let n=t[r];o.forEach((function(t){n[t]=te(e,t)}))}}return t}function ee(e,t,n){switch(t.type){case 7:return e.visitTrigger(t,n);case 0:return e.visitState(t,n);case 1:return e.visitTransition(t,n);case 2:return e.visitSequence(t,n);case 3:return e.visitGroup(t,n);case 4:return e.visitAnimate(t,n);case 5:return e.visitKeyframes(t,n);case 6:return e.visitStyle(t,n);case 8:return e.visitReference(t,n);case 9:return e.visitAnimateChild(t,n);case 10:return e.visitAnimateRef(t,n);case 11:return e.visitQuery(t,n);case 12:return e.visitStagger(t,n);default:throw new Error("Unable to resolve animation metadata node #"+t.type)}}function te(e,t){return window.getComputedStyle(e)[t]}const ne="*";function ie(e,t){const n=[];return"string"==typeof e?e.split(/\s*,\s*/).forEach(e=>function(e,t,n){if(":"==e[0]){const i=function(e,t){switch(e){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,t)=>parseFloat(t)>parseFloat(e);case":decrement":return(e,t)=>parseFloat(t)<parseFloat(e);default:return t.push(`The transition alias value "${e}" is not supported`),"* => *"}}(e,n);if("function"==typeof i)return void t.push(i);e=i}const i=e.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return n.push(`The provided transition expression "${e}" is not supported`),t;const r=i[1],s=i[2],o=i[3];t.push(oe(r,o)),"<"!=s[0]||r==ne&&o==ne||t.push(oe(o,r))}(e,n,t)):n.push(e),n}const re=new Set(["true","1"]),se=new Set(["false","0"]);function oe(e,t){const n=re.has(e)||se.has(e),i=re.has(t)||se.has(t);return(r,s)=>{let o=e==ne||e==r,a=t==ne||t==s;return!o&&n&&"boolean"==typeof r&&(o=r?re.has(e):se.has(e)),!a&&i&&"boolean"==typeof s&&(a=s?re.has(t):se.has(t)),o&&a}}const ae=new RegExp("s*:selfs*,?","g");function ce(e,t,n){return new le(e).build(t,n)}class le{constructor(e){this._driver=e}build(e,t){const n=new ue(t);return this._resetContextStyleTimingState(n),ee(this,B(e),n)}_resetContextStyleTimingState(e){e.currentQuerySelector="",e.collectedStyles={},e.collectedStyles[""]={},e.currentTime=0}visitTrigger(e,t){let n=t.queryCount=0,i=t.depCount=0;const r=[],s=[];return"@"==e.name.charAt(0)&&t.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),e.definitions.forEach(e=>{if(this._resetContextStyleTimingState(t),0==e.type){const n=e,i=n.name;i.toString().split(/\s*,\s*/).forEach(e=>{n.name=e,r.push(this.visitState(n,t))}),n.name=i}else if(1==e.type){const r=this.visitTransition(e,t);n+=r.queryCount,i+=r.depCount,s.push(r)}else t.errors.push("only state() and transition() definitions can sit inside of a trigger()")}),{type:7,name:e.name,states:r,transitions:s,queryCount:n,depCount:i,options:null}}visitState(e,t){const n=this.visitStyle(e.styles,t),i=e.options&&e.options.params||null;if(n.containsDynamicStyles){const r=new Set,s=i||{};if(n.styles.forEach(e=>{if(de(e)){const t=e;Object.keys(t).forEach(e=>{q(t[e]).forEach(e=>{s.hasOwnProperty(e)||r.add(e)})})}}),r.size){const n=J(r.values());t.errors.push(`state("${e.name}", ...) must define default values for all the following style substitutions: ${n.join(", ")}`)}}return{type:0,name:e.name,style:n,options:i?{params:i}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;const n=ee(this,B(e.animation),t);return{type:1,matchers:ie(e.expr,t.errors),animation:n,queryCount:t.queryCount,depCount:t.depCount,options:he(e.options)}}visitSequence(e,t){return{type:2,steps:e.steps.map(e=>ee(this,e,t)),options:he(e.options)}}visitGroup(e,t){const n=t.currentTime;let i=0;const r=e.steps.map(e=>{t.currentTime=n;const r=ee(this,e,t);return i=Math.max(i,t.currentTime),r});return t.currentTime=i,{type:3,steps:r,options:he(e.options)}}visitAnimate(e,t){const n=function(e,t){let n=null;if(e.hasOwnProperty("duration"))n=e;else if("number"==typeof e)return fe(F(e,t).duration,0,"");const i=e;if(i.split(/\s+/).some(e=>"{"==e.charAt(0)&&"{"==e.charAt(1))){const e=fe(0,0,"");return e.dynamic=!0,e.strValue=i,e}return n=n||F(i,t),fe(n.duration,n.delay,n.easing)}(e.timings,t.errors);let i;t.currentAnimateTimings=n;let r=e.styles?e.styles:Object(c.h)({});if(5==r.type)i=this.visitKeyframes(r,t);else{let r=e.styles,s=!1;if(!r){s=!0;const e={};n.easing&&(e.easing=n.easing),r=Object(c.h)(e)}t.currentTime+=n.duration+n.delay;const o=this.visitStyle(r,t);o.isEmptyStep=s,i=o}return t.currentAnimateTimings=null,{type:4,timings:n,style:i,options:null}}visitStyle(e,t){const n=this._makeStyleAst(e,t);return this._validateStyleAst(n,t),n}_makeStyleAst(e,t){const n=[];Array.isArray(e.styles)?e.styles.forEach(e=>{"string"==typeof e?e==c.a?n.push(e):t.errors.push(`The provided style string value ${e} is not allowed.`):n.push(e)}):n.push(e.styles);let i=!1,r=null;return n.forEach(e=>{if(de(e)){const t=e,n=t.easing;if(n&&(r=n,delete t.easing),!i)for(let e in t)if(t[e].toString().indexOf("{{")>=0){i=!0;break}}}),{type:6,styles:n,easing:r,offset:e.offset,containsDynamicStyles:i,options:null}}_validateStyleAst(e,t){const n=t.currentAnimateTimings;let i=t.currentTime,r=t.currentTime;n&&r>0&&(r-=n.duration+n.delay),e.styles.forEach(e=>{"string"!=typeof e&&Object.keys(e).forEach(n=>{if(!this._driver.validateStyleProperty(n))return void t.errors.push(`The provided animation property "${n}" is not a supported CSS property for animations`);const s=t.collectedStyles[t.currentQuerySelector],o=s[n];let a=!0;o&&(r!=i&&r>=o.startTime&&i<=o.endTime&&(t.errors.push(`The CSS property "${n}" that exists between the times of "${o.startTime}ms" and "${o.endTime}ms" is also being animated in a parallel animation between the times of "${r}ms" and "${i}ms"`),a=!1),r=o.startTime),a&&(s[n]={startTime:r,endTime:i}),t.options&&function(e,t,n){const i=t.params||{},r=q(e);r.length&&r.forEach(e=>{i.hasOwnProperty(e)||n.push(`Unable to resolve the local animation param ${e} in the given list of values`)})}(e[n],t.options,t.errors)})})}visitKeyframes(e,t){const n={type:5,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push("keyframes() must be placed inside of a call to animate()"),n;let i=0;const r=[];let s=!1,o=!1,a=0;const c=e.steps.map(e=>{const n=this._makeStyleAst(e,t);let c=null!=n.offset?n.offset:function(e){if("string"==typeof e)return null;let t=null;if(Array.isArray(e))e.forEach(e=>{if(de(e)&&e.hasOwnProperty("offset")){const n=e;t=parseFloat(n.offset),delete n.offset}});else if(de(e)&&e.hasOwnProperty("offset")){const n=e;t=parseFloat(n.offset),delete n.offset}return t}(n.styles),l=0;return null!=c&&(i++,l=n.offset=c),o=o||l<0||l>1,s=s||l<a,a=l,r.push(l),n});o&&t.errors.push("Please ensure that all keyframe offsets are between 0 and 1"),s&&t.errors.push("Please ensure that all keyframe offsets are in order");const l=e.steps.length;let u=0;i>0&&i<l?t.errors.push("Not all style() steps within the declared keyframes() contain offsets"):0==i&&(u=1/(l-1));const d=l-1,h=t.currentTime,f=t.currentAnimateTimings,p=f.duration;return c.forEach((e,i)=>{const s=u>0?i==d?1:u*i:r[i],o=s*p;t.currentTime=h+f.delay+o,f.duration=o,this._validateStyleAst(e,t),e.offset=s,n.styles.push(e)}),n}visitReference(e,t){return{type:8,animation:ee(this,B(e.animation),t),options:he(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:9,options:he(e.options)}}visitAnimateRef(e,t){return{type:10,animation:this.visitReference(e.animation,t),options:he(e.options)}}visitQuery(e,t){const n=t.currentQuerySelector,i=e.options||{};t.queryCount++,t.currentQuery=e;const[r,s]=function(e){const t=!!e.split(/\s*,\s*/).find(e=>":self"==e);return t&&(e=e.replace(ae,"")),[e=e.replace(/@\*/g,A).replace(/@\w+/g,e=>".ng-trigger-"+e.substr(1)).replace(/:animating/g,P),t]}(e.selector);t.currentQuerySelector=n.length?n+" "+r:r,m(t.collectedStyles,t.currentQuerySelector,{});const o=ee(this,B(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=n,{type:11,selector:r,limit:i.limit||0,optional:!!i.optional,includeSelf:s,animation:o,originalSelector:e.selector,options:he(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push("stagger() can only be used inside of query()");const n="full"===e.timings?{duration:0,delay:0,easing:"full"}:F(e.timings,t.errors,!0);return{type:12,animation:ee(this,B(e.animation),t),timings:n,options:null}}}class ue{constructor(e){this.errors=e,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null}}function de(e){return!Array.isArray(e)&&"object"==typeof e}function he(e){var t;return e?(e=Y(e)).params&&(e.params=(t=e.params)?Y(t):null):e={},e}function fe(e,t,n){return{duration:e,delay:t,easing:n}}function pe(e,t,n,i,r,s,o=null,a=!1){return{type:1,element:e,keyframes:t,preStyleProps:n,postStyleProps:i,duration:r,delay:s,totalTime:r+s,easing:o,subTimeline:a}}class me{constructor(){this._map=new Map}consume(e){let t=this._map.get(e);return t?this._map.delete(e):t=[],t}append(e,t){let n=this._map.get(e);n||this._map.set(e,n=[]),n.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}}const be=new RegExp(":enter","g"),ge=new RegExp(":leave","g");function _e(e,t,n,i,r,s={},o={},a,c,l=[]){return(new ye).buildKeyframes(e,t,n,i,r,s,o,a,c,l)}class ye{buildKeyframes(e,t,n,i,r,s,o,a,c,l=[]){c=c||new me;const u=new we(e,t,c,i,r,l,[]);u.options=a,u.currentTimeline.setStyles([s],null,u.errors,a),ee(this,n,u);const d=u.timelines.filter(e=>e.containsAnimation());if(d.length&&Object.keys(o).length){const e=d[d.length-1];e.allowOnlyTimelineStyles()||e.setStyles([o],null,u.errors,a)}return d.length?d.map(e=>e.buildKeyframes()):[pe(t,[],[],[],0,0,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){const n=t.subInstructions.consume(t.element);if(n){const i=t.createSubContext(e.options),r=t.currentTimeline.currentTime,s=this._visitSubInstructions(n,i,i.options);r!=s&&t.transformIntoNewTimeline(s)}t.previousNode=e}visitAnimateRef(e,t){const n=t.createSubContext(e.options);n.transformIntoNewTimeline(),this.visitReference(e.animation,n),t.transformIntoNewTimeline(n.currentTimeline.currentTime),t.previousNode=e}_visitSubInstructions(e,t,n){let i=t.currentTimeline.currentTime;const r=null!=n.duration?j(n.duration):null,s=null!=n.delay?j(n.delay):null;return 0!==r&&e.forEach(e=>{const n=t.appendInstructionToTimeline(e,r,s);i=Math.max(i,n.duration+n.delay)}),i}visitReference(e,t){t.updateOptions(e.options,!0),ee(this,e.animation,t),t.previousNode=e}visitSequence(e,t){const n=t.subContextCount;let i=t;const r=e.options;if(r&&(r.params||r.delay)&&(i=t.createSubContext(r),i.transformIntoNewTimeline(),null!=r.delay)){6==i.previousNode.type&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=ve);const e=j(r.delay);i.delayNextStep(e)}e.steps.length&&(e.steps.forEach(e=>ee(this,e,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>n&&i.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){const n=[];let i=t.currentTimeline.currentTime;const r=e.options&&e.options.delay?j(e.options.delay):0;e.steps.forEach(s=>{const o=t.createSubContext(e.options);r&&o.delayNextStep(r),ee(this,s,o),i=Math.max(i,o.currentTimeline.currentTime),n.push(o.currentTimeline)}),n.forEach(e=>t.currentTimeline.mergeTimelineCollectedStyles(e)),t.transformIntoNewTimeline(i),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){const n=e.strValue;return F(t.params?G(n,t.params,t.errors):n,t.errors)}return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){const n=t.currentAnimateTimings=this._visitTiming(e.timings,t),i=t.currentTimeline;n.delay&&(t.incrementTime(n.delay),i.snapshotCurrentStyles());const r=e.style;5==r.type?this.visitKeyframes(r,t):(t.incrementTime(n.duration),this.visitStyle(r,t),i.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){const n=t.currentTimeline,i=t.currentAnimateTimings;!i&&n.getCurrentStyleProperties().length&&n.forwardFrame();const r=i&&i.easing||e.easing;e.isEmptyStep?n.applyEmptyStep(r):n.setStyles(e.styles,r,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){const n=t.currentAnimateTimings,i=t.currentTimeline.duration,r=n.duration,s=t.createSubContext().currentTimeline;s.easing=n.easing,e.styles.forEach(e=>{s.forwardTime((e.offset||0)*r),s.setStyles(e.styles,e.easing,t.errors,t.options),s.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(s),t.transformIntoNewTimeline(i+r),t.previousNode=e}visitQuery(e,t){const n=t.currentTimeline.currentTime,i=e.options||{},r=i.delay?j(i.delay):0;r&&(6===t.previousNode.type||0==n&&t.currentTimeline.getCurrentStyleProperties().length)&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=ve);let s=n;const o=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!i.optional,t.errors);t.currentQueryTotal=o.length;let a=null;o.forEach((n,i)=>{t.currentQueryIndex=i;const o=t.createSubContext(e.options,n);r&&o.delayNextStep(r),n===t.element&&(a=o.currentTimeline),ee(this,e.animation,o),o.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,o.currentTimeline.currentTime)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(s),a&&(t.currentTimeline.mergeTimelineCollectedStyles(a),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){const n=t.parentContext,i=t.currentTimeline,r=e.timings,s=Math.abs(r.duration),o=s*(t.currentQueryTotal-1);let a=s*t.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":a=o-a;break;case"full":a=n.currentStaggerTime}const c=t.currentTimeline;a&&c.delayNextStep(a);const l=c.currentTime;ee(this,e.animation,t),t.previousNode=e,n.currentStaggerTime=i.currentTime-l+(i.startTime-n.currentTimeline.startTime)}}const ve={};class we{constructor(e,t,n,i,r,s,o,a){this._driver=e,this.element=t,this.subInstructions=n,this._enterClassName=i,this._leaveClassName=r,this.errors=s,this.timelines=o,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=ve,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=a||new Se(this._driver,t,0),o.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;const n=e;let i=this.options;null!=n.duration&&(i.duration=j(n.duration)),null!=n.delay&&(i.delay=j(n.delay));const r=n.params;if(r){let e=i.params;e||(e=this.options.params={}),Object.keys(r).forEach(n=>{t&&e.hasOwnProperty(n)||(e[n]=G(r[n],e,this.errors))})}}_copyOptions(){const e={};if(this.options){const t=this.options.params;if(t){const n=e.params={};Object.keys(t).forEach(e=>{n[e]=t[e]})}}return e}createSubContext(e=null,t,n){const i=t||this.element,r=new we(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,n||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(e),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(e){return this.previousNode=ve,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,n){const i={duration:null!=t?t:e.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+e.delay,easing:""},r=new Me(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,i,e.stretchStartingKeyframe);return this.timelines.push(r),i}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,n,i,r,s){let o=[];if(i&&o.push(this.element),e.length>0){e=(e=e.replace(be,"."+this._enterClassName)).replace(ge,"."+this._leaveClassName);let t=this._driver.query(this.element,e,1!=n);0!==n&&(t=n<0?t.slice(t.length+n,t.length):t.slice(0,n)),o.push(...t)}return r||0!=o.length||s.push(`\`query("${t}")\` returned zero elements. (Use \`query("${t}", { optional: true })\` if you wish to allow this.)`),o}}class Se{constructor(e,t,n,i){this._driver=e,this.element=t,this.startTime=n,this._elementTimelineStylesLookup=i,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}getCurrentStyleProperties(){return Object.keys(this._currentKeyframe)}get currentTime(){return this.startTime+this.duration}delayNextStep(e){const t=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new Se(this._driver,e,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,t){this._localTimelineStyles[e]=t,this._globalTimelineStyles[e]=t,this._styleSummary[e]={time:this.currentTime,value:t}}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&(this._previousKeyframe.easing=e),Object.keys(this._globalTimelineStyles).forEach(e=>{this._backFill[e]=this._globalTimelineStyles[e]||c.a,this._currentKeyframe[e]=c.a}),this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,n,i){t&&(this._previousKeyframe.easing=t);const r=i&&i.params||{},s=function(e,t){const n={};let i;return e.forEach(e=>{"*"===e?(i=i||Object.keys(t),i.forEach(e=>{n[e]=c.a})):z(e,!1,n)}),n}(e,this._globalTimelineStyles);Object.keys(s).forEach(e=>{const t=G(s[e],r,n);this._pendingStyles[e]=t,this._localTimelineStyles.hasOwnProperty(e)||(this._backFill[e]=this._globalTimelineStyles.hasOwnProperty(e)?this._globalTimelineStyles[e]:c.a),this._updateStyle(e,t)})}applyStylesToKeyframe(){const e=this._pendingStyles,t=Object.keys(e);0!=t.length&&(this._pendingStyles={},t.forEach(t=>{this._currentKeyframe[t]=e[t]}),Object.keys(this._localTimelineStyles).forEach(e=>{this._currentKeyframe.hasOwnProperty(e)||(this._currentKeyframe[e]=this._localTimelineStyles[e])}))}snapshotCurrentStyles(){Object.keys(this._localTimelineStyles).forEach(e=>{const t=this._localTimelineStyles[e];this._pendingStyles[e]=t,this._updateStyle(e,t)})}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){Object.keys(e._styleSummary).forEach(t=>{const n=this._styleSummary[t],i=e._styleSummary[t];(!n||i.time>n.time)&&this._updateStyle(t,i.value)})}buildKeyframes(){this.applyStylesToKeyframe();const e=new Set,t=new Set,n=1===this._keyframes.size&&0===this.duration;let i=[];this._keyframes.forEach((r,s)=>{const o=z(r,!0);Object.keys(o).forEach(n=>{const i=o[n];i==c.l?e.add(n):i==c.a&&t.add(n)}),n||(o.offset=s/this.duration),i.push(o)});const r=e.size?J(e.values()):[],s=t.size?J(t.values()):[];if(n){const e=i[0],t=Y(e);e.offset=0,t.offset=1,i=[e,t]}return pe(this.element,i,r,s,this.duration,this.startTime,this.easing,!1)}}class Me extends Se{constructor(e,t,n,i,r,s,o=!1){super(e,t,s.delay),this.element=t,this.keyframes=n,this.preStyleProps=i,this.postStyleProps=r,this._stretchStartingKeyframe=o,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:n,easing:i}=this.timings;if(this._stretchStartingKeyframe&&t){const r=[],s=n+t,o=t/s,a=z(e[0],!1);a.offset=0,r.push(a);const c=z(e[0],!1);c.offset=xe(o),r.push(c);const l=e.length-1;for(let i=1;i<=l;i++){let o=z(e[i],!1);o.offset=xe((t+o.offset*n)/s),r.push(o)}n=s,t=0,i="",e=r}return pe(this.element,e,this.preStyleProps,this.postStyleProps,n,t,i,!0)}}function xe(e,t=3){const n=Math.pow(10,t-1);return Math.round(e*n)/n}class ke{}class De extends ke{normalizePropertyName(e,t){return K(e)}normalizeStyleValue(e,t,n,i){let r="";const s=n.toString().trim();if(Te[t]&&0!==n&&"0"!==n)if("number"==typeof n)r="px";else{const t=n.match(/^[+-]?[\d\.]+([a-z]*)$/);t&&0==t[1].length&&i.push(`Please provide a CSS unit value for ${e}:${n}`)}return s+r}}const Te=(()=>function(e){const t={};return e.forEach(e=>t[e]=!0),t}("width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(",")))();function Ce(e,t,n,i,r,s,o,a,c,l,u,d,h){return{type:0,element:e,triggerName:t,isRemovalTransition:r,fromState:n,fromStyles:s,toState:i,toStyles:o,timelines:a,queriedElements:c,preStyleProps:l,postStyleProps:u,totalTime:d,errors:h}}const Oe={};class Le{constructor(e,t,n){this._triggerName=e,this.ast=t,this._stateStyles=n}match(e,t,n,i){return function(e,t,n,i,r){return e.some(e=>e(t,n,i,r))}(this.ast.matchers,e,t,n,i)}buildStyles(e,t,n){const i=this._stateStyles["*"],r=this._stateStyles[e],s=i?i.buildStyles(t,n):{};return r?r.buildStyles(t,n):s}build(e,t,n,i,r,s,o,a,c,l){const u=[],d=this.ast.options&&this.ast.options.params||Oe,h=this.buildStyles(n,o&&o.params||Oe,u),f=a&&a.params||Oe,p=this.buildStyles(i,f,u),b=new Set,g=new Map,_=new Map,y="void"===i,v={params:Object.assign(Object.assign({},d),f)},w=l?[]:_e(e,t,this.ast.animation,r,s,h,p,v,c,u);let S=0;if(w.forEach(e=>{S=Math.max(e.duration+e.delay,S)}),u.length)return Ce(t,this._triggerName,n,i,y,h,p,[],[],g,_,S,u);w.forEach(e=>{const n=e.element,i=m(g,n,{});e.preStyleProps.forEach(e=>i[e]=!0);const r=m(_,n,{});e.postStyleProps.forEach(e=>r[e]=!0),n!==t&&b.add(n)});const M=J(b.values());return Ce(t,this._triggerName,n,i,y,h,p,w,M,g,_,S)}}class Re{constructor(e,t){this.styles=e,this.defaultParams=t}buildStyles(e,t){const n={},i=Y(this.defaultParams);return Object.keys(e).forEach(t=>{const n=e[t];null!=n&&(i[t]=n)}),this.styles.styles.forEach(e=>{if("string"!=typeof e){const r=e;Object.keys(r).forEach(e=>{let s=r[e];s.length>1&&(s=G(s,i,t)),n[e]=s})}}),n}}class Ee{constructor(e,t){this.name=e,this.ast=t,this.transitionFactories=[],this.states={},t.states.forEach(e=>{this.states[e.name]=new Re(e.style,e.options&&e.options.params||{})}),Ae(this.states,"true","1"),Ae(this.states,"false","0"),t.transitions.forEach(t=>{this.transitionFactories.push(new Le(e,t,this.states))}),this.fallbackTransition=new Le(e,{type:1,animation:{type:2,steps:[],options:null},matchers:[(e,t)=>!0],options:null,queryCount:0,depCount:0},this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,n,i){return this.transitionFactories.find(r=>r.match(e,t,n,i))||null}matchStyles(e,t,n){return this.fallbackTransition.buildStyles(e,t,n)}}function Ae(e,t,n){e.hasOwnProperty(t)?e.hasOwnProperty(n)||(e[n]=e[t]):e.hasOwnProperty(n)&&(e[t]=e[n])}const Ie=new me;class Pe{constructor(e,t,n){this.bodyNode=e,this._driver=t,this._normalizer=n,this._animations={},this._playersById={},this.players=[]}register(e,t){const n=[],i=ce(this._driver,t,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: "+n.join("\n"));this._animations[e]=i}_buildPlayer(e,t,n){const i=e.element,r=d(0,this._normalizer,0,e.keyframes,t,n);return this._driver.animate(i,r,e.duration,e.delay,e.easing,[],!0)}create(e,t,n={}){const i=[],r=this._animations[e];let s;const o=new Map;if(r?(s=_e(this._driver,t,r,L,R,{},{},n,Ie,i),s.forEach(e=>{const t=m(o,e.element,{});e.postStyleProps.forEach(e=>t[e]=null)})):(i.push("The requested animation doesn't exist or has already been destroyed"),s=[]),i.length)throw new Error("Unable to create the animation due to the following errors: "+i.join("\n"));o.forEach((e,t)=>{Object.keys(e).forEach(n=>{e[n]=this._driver.computeStyle(t,n,c.a)})});const a=u(s.map(e=>{const t=o.get(e.element);return this._buildPlayer(e,{},t)}));return this._playersById[e]=a,a.onDestroy(()=>this.destroy(e)),this.players.push(a),a}destroy(e){const t=this._getPlayer(e);t.destroy(),delete this._playersById[e];const n=this.players.indexOf(t);n>=0&&this.players.splice(n,1)}_getPlayer(e){const t=this._playersById[e];if(!t)throw new Error("Unable to find the timeline player referenced by "+e);return t}listen(e,t,n,i){const r=p(t,"","","");return h(this._getPlayer(e),n,r,i),()=>{}}command(e,t,n,i){if("register"==n)return void this.register(e,i[0]);if("create"==n)return void this.create(e,t,i[0]||{});const r=this._getPlayer(e);switch(n){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(e)}}}const je="ng-animate-queued",Ne="ng-animate-disabled",Fe=".ng-animate-disabled",Ye=[],ze={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},$e={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0};class He{constructor(e,t=""){this.namespaceId=t;const n=e&&e.hasOwnProperty("value");if(this.value=null!=(i=n?e.value:e)?i:null,n){const t=Y(e);delete t.value,this.options=t}else this.options={};var i;this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(e){const t=e.params;if(t){const e=this.options.params;Object.keys(t).forEach(n=>{null==e[n]&&(e[n]=t[n])})}}}const We="void",Ve=new He(We);class Be{constructor(e,t,n){this.id=e,this.hostElement=t,this._engine=n,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,Ze(t,this._hostClassName)}listen(e,t,n,i){if(!this._triggers.hasOwnProperty(t))throw new Error(`Unable to listen on the animation trigger event "${n}" because the animation trigger "${t}" doesn't exist!`);if(null==n||0==n.length)throw new Error(`Unable to listen on the animation trigger "${t}" because the provided event is undefined!`);if("start"!=(r=n)&&"done"!=r)throw new Error(`The provided animation trigger event "${n}" for the animation trigger "${t}" is not supported!`);var r;const s=m(this._elementListeners,e,[]),o={name:t,phase:n,callback:i};s.push(o);const a=m(this._engine.statesByElement,e,{});return a.hasOwnProperty(t)||(Ze(e,E),Ze(e,"ng-trigger-"+t),a[t]=Ve),()=>{this._engine.afterFlush(()=>{const e=s.indexOf(o);e>=0&&s.splice(e,1),this._triggers[t]||delete a[t]})}}register(e,t){return!this._triggers[e]&&(this._triggers[e]=t,!0)}_getTrigger(e){const t=this._triggers[e];if(!t)throw new Error(`The provided animation trigger "${e}" has not been registered!`);return t}trigger(e,t,n,i=!0){const r=this._getTrigger(t),s=new qe(this.id,t,e);let o=this._engine.statesByElement.get(e);o||(Ze(e,E),Ze(e,"ng-trigger-"+t),this._engine.statesByElement.set(e,o={}));let a=o[t];const c=new He(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&a&&c.absorbOptions(a.options),o[t]=c,a||(a=Ve),c.value!==We&&a.value===c.value){if(!function(e,t){const n=Object.keys(e),i=Object.keys(t);if(n.length!=i.length)return!1;for(let r=0;r<n.length;r++){const i=n[r];if(!t.hasOwnProperty(i)||e[i]!==t[i])return!1}return!0}(a.params,c.params)){const t=[],n=r.matchStyles(a.value,a.params,t),i=r.matchStyles(c.value,c.params,t);t.length?this._engine.reportError(t):this._engine.afterFlush(()=>{V(e,n),W(e,i)})}return}const l=m(this._engine.playersByElement,e,[]);l.forEach(e=>{e.namespaceId==this.id&&e.triggerName==t&&e.queued&&e.destroy()});let u=r.matchTransition(a.value,c.value,e,c.params),d=!1;if(!u){if(!i)return;u=r.fallbackTransition,d=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:u,fromState:a,toState:c,player:s,isFallbackTransition:d}),d||(Ze(e,je),s.onStart(()=>{Xe(e,je)})),s.onDone(()=>{let t=this.players.indexOf(s);t>=0&&this.players.splice(t,1);const n=this._engine.playersByElement.get(e);if(n){let e=n.indexOf(s);e>=0&&n.splice(e,1)}}),this.players.push(s),l.push(s),s}deregister(e){delete this._triggers[e],this._engine.statesByElement.forEach((t,n)=>{delete t[e]}),this._elementListeners.forEach((t,n)=>{this._elementListeners.set(n,t.filter(t=>t.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);const t=this._engine.playersByElement.get(e);t&&(t.forEach(e=>e.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){const n=this._engine.driver.query(e,A,!0);n.forEach(e=>{if(e.__ng_removed)return;const n=this._engine.fetchNamespacesByElement(e);n.size?n.forEach(n=>n.triggerLeaveAnimation(e,t,!1,!0)):this.clearElementCache(e)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(e=>this.clearElementCache(e)))}triggerLeaveAnimation(e,t,n,i){const r=this._engine.statesByElement.get(e);if(r){const s=[];if(Object.keys(r).forEach(t=>{if(this._triggers[t]){const n=this.trigger(e,t,We,i);n&&s.push(n)}}),s.length)return this._engine.markElementAsRemoved(this.id,e,!0,t),n&&u(s).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){const t=this._elementListeners.get(e);if(t){const n=new Set;t.forEach(t=>{const i=t.name;if(n.has(i))return;n.add(i);const r=this._triggers[i].fallbackTransition,s=this._engine.statesByElement.get(e)[i]||Ve,o=new He(We),a=new qe(this.id,i,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:i,transition:r,fromState:s,toState:o,player:a,isFallbackTransition:!0})})}}removeNode(e,t){const n=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let i=!1;if(n.totalAnimations){const t=n.players.length?n.playersByQueriedElement.get(e):[];if(t&&t.length)i=!0;else{let t=e;for(;t=t.parentNode;)if(n.statesByElement.get(t)){i=!0;break}}}if(this.prepareLeaveAnimationListeners(e),i)n.markElementAsRemoved(this.id,e,!1,t);else{const i=e.__ng_removed;i&&i!==ze||(n.afterFlush(()=>this.clearElementCache(e)),n.destroyInnerAnimations(e),n._onRemovalComplete(e,t))}}insertNode(e,t){Ze(e,this._hostClassName)}drainQueuedTransitions(e){const t=[];return this._queue.forEach(n=>{const i=n.player;if(i.destroyed)return;const r=n.element,s=this._elementListeners.get(r);s&&s.forEach(t=>{if(t.name==n.triggerName){const i=p(r,n.triggerName,n.fromState.value,n.toState.value);i._data=e,h(n.player,t.phase,i,t.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):t.push(n)}),this._queue=[],t.sort((e,t)=>{const n=e.transition.ast.depCount,i=t.transition.ast.depCount;return 0==n||0==i?n-i:this._engine.driver.containsElement(e.element,t.element)?1:-1})}destroy(e){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}elementContainsData(e){let t=!1;return this._elementListeners.has(e)&&(t=!0),t=!!this._queue.find(t=>t.element===e)||t,t}}class Ue{constructor(e,t,n){this.bodyNode=e,this.driver=t,this._normalizer=n,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(e,t)=>{}}_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}get queuedPlayers(){const e=[];return this._namespaceList.forEach(t=>{t.players.forEach(t=>{t.queued&&e.push(t)})}),e}createNamespace(e,t){const n=new Be(e,t,this);return t.parentNode?this._balanceNamespaceList(n,t):(this.newHostElements.set(t,n),this.collectEnterElement(t)),this._namespaceLookup[e]=n}_balanceNamespaceList(e,t){const n=this._namespaceList.length-1;if(n>=0){let i=!1;for(let r=n;r>=0;r--)if(this.driver.containsElement(this._namespaceList[r].hostElement,t)){this._namespaceList.splice(r+1,0,e),i=!0;break}i||this._namespaceList.splice(0,0,e)}else this._namespaceList.push(e);return this.namespacesByHostElement.set(t,e),e}register(e,t){let n=this._namespaceLookup[e];return n||(n=this.createNamespace(e,t)),n}registerTrigger(e,t,n){let i=this._namespaceLookup[e];i&&i.register(t,n)&&this.totalAnimations++}destroy(e,t){if(!e)return;const n=this._fetchNamespace(e);this.afterFlush(()=>{this.namespacesByHostElement.delete(n.hostElement),delete this._namespaceLookup[e];const t=this._namespaceList.indexOf(n);t>=0&&this._namespaceList.splice(t,1)}),this.afterFlushAnimationsDone(()=>n.destroy(t))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){const t=new Set,n=this.statesByElement.get(e);if(n){const e=Object.keys(n);for(let i=0;i<e.length;i++){const r=n[e[i]].namespaceId;if(r){const e=this._fetchNamespace(r);e&&t.add(e)}}}return t}trigger(e,t,n,i){if(Ge(t)){const r=this._fetchNamespace(e);if(r)return r.trigger(t,n,i),!0}return!1}insertNode(e,t,n,i){if(!Ge(t))return;const r=t.__ng_removed;if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;const e=this.collectedLeaveElements.indexOf(t);e>=0&&this.collectedLeaveElements.splice(e,1)}if(e){const i=this._fetchNamespace(e);i&&i.insertNode(t,n)}i&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),Ze(e,Ne)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),Xe(e,Ne))}removeNode(e,t,n,i){if(Ge(t)){const r=e?this._fetchNamespace(e):null;if(r?r.removeNode(t,i):this.markElementAsRemoved(e,t,!1,i),n){const n=this.namespacesByHostElement.get(t);n&&n.id!==e&&n.removeNode(t,i)}}else this._onRemovalComplete(t,i)}markElementAsRemoved(e,t,n,i){this.collectedLeaveElements.push(t),t.__ng_removed={namespaceId:e,setForRemoval:i,hasAnimation:n,removedBeforeQueried:!1}}listen(e,t,n,i,r){return Ge(t)?this._fetchNamespace(e).listen(t,n,i,r):()=>{}}_buildInstruction(e,t,n,i,r){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,n,i,e.fromState.options,e.toState.options,t,r)}destroyInnerAnimations(e){let t=this.driver.query(e,A,!0);t.forEach(e=>this.destroyActiveAnimationsForElement(e)),0!=this.playersByQueriedElement.size&&(t=this.driver.query(e,P,!0),t.forEach(e=>this.finishActiveQueriedAnimationOnElement(e)))}destroyActiveAnimationsForElement(e){const t=this.playersByElement.get(e);t&&t.forEach(e=>{e.queued?e.markedForDestroy=!0:e.destroy()})}finishActiveQueriedAnimationOnElement(e){const t=this.playersByQueriedElement.get(e);t&&t.forEach(e=>e.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return u(this.players).onDone(()=>e());e()})}processLeaveNode(e){const t=e.__ng_removed;if(t&&t.setForRemoval){if(e.__ng_removed=ze,t.namespaceId){this.destroyInnerAnimations(e);const n=this._fetchNamespace(t.namespaceId);n&&n.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}this.driver.matchesElement(e,Fe)&&this.markElementAsDisabled(e,!1),this.driver.query(e,Fe,!0).forEach(e=>{this.markElementAsDisabled(e,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((e,t)=>this._balanceNamespaceList(e,t)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;n<this.collectedEnterElements.length;n++)Ze(this.collectedEnterElements[n],"ng-star-inserted");if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){const n=[];try{t=this._flushAnimations(n,e)}finally{for(let e=0;e<n.length;e++)n[e]()}}else for(let n=0;n<this.collectedLeaveElements.length;n++)this.processLeaveNode(this.collectedLeaveElements[n]);if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(e=>e()),this._flushFns=[],this._whenQuietFns.length){const e=this._whenQuietFns;this._whenQuietFns=[],t.length?u(t).onDone(()=>{e.forEach(e=>e())}):e.forEach(e=>e())}}reportError(e){throw new Error("Unable to process animations due to the following failed trigger transitions\n "+e.join("\n"))}_flushAnimations(e,t){const n=new me,i=[],r=new Map,s=[],o=new Map,a=new Map,l=new Map,d=new Set;this.disabledNodes.forEach(e=>{d.add(e);const t=this.driver.query(e,".ng-animate-queued",!0);for(let n=0;n<t.length;n++)d.add(t[n])});const h=this.bodyNode,f=Array.from(this.statesByElement.keys()),p=Ke(f,this.collectedEnterElements),b=new Map;let g=0;p.forEach((e,t)=>{const n=L+g++;b.set(t,n),e.forEach(e=>Ze(e,n))});const _=[],y=new Set,v=new Set;for(let c=0;c<this.collectedLeaveElements.length;c++){const e=this.collectedLeaveElements[c],t=e.__ng_removed;t&&t.setForRemoval&&(_.push(e),y.add(e),t.hasAnimation?this.driver.query(e,".ng-star-inserted",!0).forEach(e=>y.add(e)):v.add(e))}const w=new Map,S=Ke(f,Array.from(y));S.forEach((e,t)=>{const n=R+g++;w.set(t,n),e.forEach(e=>Ze(e,n))}),e.push(()=>{p.forEach((e,t)=>{const n=b.get(t);e.forEach(e=>Xe(e,n))}),S.forEach((e,t)=>{const n=w.get(t);e.forEach(e=>Xe(e,n))}),_.forEach(e=>{this.processLeaveNode(e)})});const M=[],x=[];for(let c=this._namespaceList.length-1;c>=0;c--)this._namespaceList[c].drainQueuedTransitions(t).forEach(e=>{const t=e.player,r=e.element;if(M.push(t),this.collectedEnterElements.length){const e=r.__ng_removed;if(e&&e.setForMove)return void t.destroy()}const c=!h||!this.driver.containsElement(h,r),u=w.get(r),d=b.get(r),f=this._buildInstruction(e,n,d,u,c);if(f.errors&&f.errors.length)x.push(f);else{if(c)return t.onStart(()=>V(r,f.fromStyles)),t.onDestroy(()=>W(r,f.toStyles)),void i.push(t);if(e.isFallbackTransition)return t.onStart(()=>V(r,f.fromStyles)),t.onDestroy(()=>W(r,f.toStyles)),void i.push(t);f.timelines.forEach(e=>e.stretchStartingKeyframe=!0),n.append(r,f.timelines),s.push({instruction:f,player:t,element:r}),f.queriedElements.forEach(e=>m(o,e,[]).push(t)),f.preStyleProps.forEach((e,t)=>{const n=Object.keys(e);if(n.length){let e=a.get(t);e||a.set(t,e=new Set),n.forEach(t=>e.add(t))}}),f.postStyleProps.forEach((e,t)=>{const n=Object.keys(e);let i=l.get(t);i||l.set(t,i=new Set),n.forEach(e=>i.add(e))})}});if(x.length){const e=[];x.forEach(t=>{e.push(`@${t.triggerName} has failed due to:\n`),t.errors.forEach(t=>e.push(`- ${t}\n`))}),M.forEach(e=>e.destroy()),this.reportError(e)}const k=new Map,D=new Map;s.forEach(e=>{const t=e.element;n.has(t)&&(D.set(t,t),this._beforeAnimationBuild(e.player.namespaceId,e.instruction,k))}),i.forEach(e=>{const t=e.element;this._getPreviousPlayers(t,!1,e.namespaceId,e.triggerName,null).forEach(e=>{m(k,t,[]).push(e),e.destroy()})});const T=_.filter(e=>tt(e,a,l)),C=new Map;Qe(C,this.driver,v,l,c.a).forEach(e=>{tt(e,a,l)&&T.push(e)});const O=new Map;p.forEach((e,t)=>{Qe(O,this.driver,new Set(e),a,c.l)}),T.forEach(e=>{const t=C.get(e),n=O.get(e);C.set(e,Object.assign(Object.assign({},t),n))});const E=[],A=[],I={};s.forEach(e=>{const{element:t,player:s,instruction:o}=e;if(n.has(t)){if(d.has(t))return s.onDestroy(()=>W(t,o.toStyles)),s.disabled=!0,s.overrideTotalTime(o.totalTime),void i.push(s);let e=I;if(D.size>1){let n=t;const i=[];for(;n=n.parentNode;){const t=D.get(n);if(t){e=t;break}i.push(n)}i.forEach(t=>D.set(t,e))}const n=this._buildAnimation(s.namespaceId,o,k,r,O,C);if(s.setRealPlayer(n),e===I)E.push(s);else{const t=this.playersByElement.get(e);t&&t.length&&(s.parentPlayer=u(t)),i.push(s)}}else V(t,o.fromStyles),s.onDestroy(()=>W(t,o.toStyles)),A.push(s),d.has(t)&&i.push(s)}),A.forEach(e=>{const t=r.get(e.element);if(t&&t.length){const n=u(t);e.setRealPlayer(n)}}),i.forEach(e=>{e.parentPlayer?e.syncPlayerEvents(e.parentPlayer):e.destroy()});for(let c=0;c<_.length;c++){const e=_[c],t=e.__ng_removed;if(Xe(e,R),t&&t.hasAnimation)continue;let n=[];if(o.size){let t=o.get(e);t&&t.length&&n.push(...t);let i=this.driver.query(e,P,!0);for(let e=0;e<i.length;e++){let t=o.get(i[e]);t&&t.length&&n.push(...t)}}const i=n.filter(e=>!e.destroyed);i.length?et(this,e,i):this.processLeaveNode(e)}return _.length=0,E.forEach(e=>{this.players.push(e),e.onDone(()=>{e.destroy();const t=this.players.indexOf(e);this.players.splice(t,1)}),e.play()}),E}elementContainsData(e,t){let n=!1;const i=t.__ng_removed;return i&&i.setForRemoval&&(n=!0),this.playersByElement.has(t)&&(n=!0),this.playersByQueriedElement.has(t)&&(n=!0),this.statesByElement.has(t)&&(n=!0),this._fetchNamespace(e).elementContainsData(t)||n}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,n,i,r){let s=[];if(t){const t=this.playersByQueriedElement.get(e);t&&(s=t)}else{const t=this.playersByElement.get(e);if(t){const e=!r||r==We;t.forEach(t=>{t.queued||(e||t.triggerName==i)&&s.push(t)})}}return(n||i)&&(s=s.filter(e=>!(n&&n!=e.namespaceId||i&&i!=e.triggerName))),s}_beforeAnimationBuild(e,t,n){const i=t.element,r=t.isRemovalTransition?void 0:e,s=t.isRemovalTransition?void 0:t.triggerName;for(const o of t.timelines){const e=o.element,a=e!==i,c=m(n,e,[]);this._getPreviousPlayers(e,a,r,s,t.toState).forEach(e=>{const t=e.getRealPlayer();t.beforeDestroy&&t.beforeDestroy(),e.destroy(),c.push(e)})}V(i,t.fromStyles)}_buildAnimation(e,t,n,i,r,s){const o=t.triggerName,a=t.element,l=[],h=new Set,f=new Set,p=t.timelines.map(t=>{const u=t.element;h.add(u);const p=u.__ng_removed;if(p&&p.removedBeforeQueried)return new c.d(t.duration,t.delay);const m=u!==a,b=function(e){const t=[];return function e(t,n){for(let i=0;i<t.length;i++){const r=t[i];r instanceof c.k?e(r.players,n):n.push(r)}}(e,t),t}((n.get(u)||Ye).map(e=>e.getRealPlayer())).filter(e=>!!e.element&&e.element===u),g=r.get(u),_=s.get(u),y=d(0,this._normalizer,0,t.keyframes,g,_),v=this._buildPlayer(t,y,b);if(t.subTimeline&&i&&f.add(u),m){const t=new qe(e,o,u);t.setRealPlayer(v),l.push(t)}return v});l.forEach(e=>{m(this.playersByQueriedElement,e.element,[]).push(e),e.onDone(()=>function(e,t,n){let i;if(e instanceof Map){if(i=e.get(t),i){if(i.length){const e=i.indexOf(n);i.splice(e,1)}0==i.length&&e.delete(t)}}else if(i=e[t],i){if(i.length){const e=i.indexOf(n);i.splice(e,1)}0==i.length&&delete e[t]}return i}(this.playersByQueriedElement,e.element,e))}),h.forEach(e=>Ze(e,I));const b=u(p);return b.onDestroy(()=>{h.forEach(e=>Xe(e,I)),W(a,t.toStyles)}),f.forEach(e=>{m(i,e,[]).push(b)}),b}_buildPlayer(e,t,n){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,n):new c.d(e.duration,e.delay)}}class qe{constructor(e,t,n){this.namespaceId=e,this.triggerName=t,this.element=n,this._player=new c.d,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(e){this._containsRealPlayer||(this._player=e,Object.keys(this._queuedCallbacks).forEach(t=>{this._queuedCallbacks[t].forEach(n=>h(e,t,void 0,n))}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){const t=this._player;t.triggerCallback&&e.onStart(()=>t.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,t){m(this._queuedCallbacks,e,[]).push(t)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){const t=this._player;t.triggerCallback&&t.triggerCallback(e)}}function Ge(e){return e&&1===e.nodeType}function Je(e,t){const n=e.style.display;return e.style.display=null!=t?t:"none",n}function Qe(e,t,n,i,r){const s=[];n.forEach(e=>s.push(Je(e)));const o=[];i.forEach((n,i)=>{const s={};n.forEach(e=>{const n=s[e]=t.computeStyle(i,e,r);n&&0!=n.length||(i.__ng_removed=$e,o.push(i))}),e.set(i,s)});let a=0;return n.forEach(e=>Je(e,s[a++])),o}function Ke(e,t){const n=new Map;if(e.forEach(e=>n.set(e,[])),0==t.length)return n;const i=new Set(t),r=new Map;return t.forEach(e=>{const t=function e(t){if(!t)return 1;let s=r.get(t);if(s)return s;const o=t.parentNode;return s=n.has(o)?o:i.has(o)?1:e(o),r.set(t,s),s}(e);1!==t&&n.get(t).push(e)}),n}function Ze(e,t){if(e.classList)e.classList.add(t);else{let n=e.$$classes;n||(n=e.$$classes={}),n[t]=!0}}function Xe(e,t){if(e.classList)e.classList.remove(t);else{let n=e.$$classes;n&&delete n[t]}}function et(e,t,n){u(n).onDone(()=>e.processLeaveNode(t))}function tt(e,t,n){const i=n.get(e);if(!i)return!1;let r=t.get(e);return r?i.forEach(e=>r.add(e)):t.set(e,i),n.delete(e),!0}class nt{constructor(e,t,n){this.bodyNode=e,this._driver=t,this._triggerCache={},this.onRemovalComplete=(e,t)=>{},this._transitionEngine=new Ue(e,t,n),this._timelineEngine=new Pe(e,t,n),this._transitionEngine.onRemovalComplete=(e,t)=>this.onRemovalComplete(e,t)}registerTrigger(e,t,n,i,r){const s=e+"-"+i;let o=this._triggerCache[s];if(!o){const e=[],t=ce(this._driver,r,e);if(e.length)throw new Error(`The animation trigger "${i}" has failed to build due to the following errors:\n - ${e.join("\n - ")}`);o=function(e,t){return new Ee(e,t)}(i,t),this._triggerCache[s]=o}this._transitionEngine.registerTrigger(t,i,o)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,n,i){this._transitionEngine.insertNode(e,t,n,i)}onRemove(e,t,n,i){this._transitionEngine.removeNode(e,t,i||!1,n)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,n,i){if("@"==n.charAt(0)){const[e,r]=b(n);this._timelineEngine.command(e,t,r,i)}else this._transitionEngine.trigger(e,t,n,i)}listen(e,t,n,i,r){if("@"==n.charAt(0)){const[e,i]=b(n);return this._timelineEngine.listen(e,t,i,r)}return this._transitionEngine.listen(e,t,n,i,r)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}function it(e,t){let n=null,i=null;return Array.isArray(t)&&t.length?(n=st(t[0]),t.length>1&&(i=st(t[t.length-1]))):t&&(n=st(t)),n||i?new rt(e,n,i):null}let rt=(()=>{class e{constructor(t,n,i){this._element=t,this._startStyles=n,this._endStyles=i,this._state=0;let r=e.initialStylesByElement.get(t);r||e.initialStylesByElement.set(t,r={}),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&W(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(W(this._element,this._initialStyles),this._endStyles&&(W(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(e.initialStylesByElement.delete(this._element),this._startStyles&&(V(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(V(this._element,this._endStyles),this._endStyles=null),W(this._element,this._initialStyles),this._state=3)}}return e.initialStylesByElement=new WeakMap,e})();function st(e){let t=null;const n=Object.keys(e);for(let i=0;i<n.length;i++){const r=n[i];ot(r)&&(t=t||{},t[r]=e[r])}return t}function ot(e){return"display"===e||"position"===e}const at="animation",ct="animationend";class lt{constructor(e,t,n,i,r,s,o){this._element=e,this._name=t,this._duration=n,this._delay=i,this._easing=r,this._fillMode=s,this._onDoneFn=o,this._finished=!1,this._destroyed=!1,this._startTime=0,this._position=0,this._eventFn=e=>this._handleCallback(e)}apply(){!function(e,t){const n=mt(e,"").trim();n.length&&(function(e,t){let n=0;for(let i=0;i<e.length;i++)","===e.charAt(i)&&n++}(n),t=`${n}, ${t}`),pt(e,"",t)}(this._element,`${this._duration}ms ${this._easing} ${this._delay}ms 1 normal ${this._fillMode} ${this._name}`),ft(this._element,this._eventFn,!1),this._startTime=Date.now()}pause(){ut(this._element,this._name,"paused")}resume(){ut(this._element,this._name,"running")}setPosition(e){const t=dt(this._element,this._name);this._position=e*this._duration,pt(this._element,"Delay",`-${this._position}ms`,t)}getPosition(){return this._position}_handleCallback(e){const t=e._ngTestManualTimestamp||Date.now(),n=1e3*parseFloat(e.elapsedTime.toFixed(3));e.animationName==this._name&&Math.max(t-this._startTime,0)>=this._delay&&n>=this._duration&&this.finish()}finish(){this._finished||(this._finished=!0,this._onDoneFn(),ft(this._element,this._eventFn,!0))}destroy(){this._destroyed||(this._destroyed=!0,this.finish(),function(e,t){const n=mt(e,"").split(","),i=ht(n,t);i>=0&&(n.splice(i,1),pt(e,"",n.join(",")))}(this._element,this._name))}}function ut(e,t,n){pt(e,"PlayState",n,dt(e,t))}function dt(e,t){const n=mt(e,"");return n.indexOf(",")>0?ht(n.split(","),t):ht([n],t)}function ht(e,t){for(let n=0;n<e.length;n++)if(e[n].indexOf(t)>=0)return n;return-1}function ft(e,t,n){n?e.removeEventListener(ct,t):e.addEventListener(ct,t)}function pt(e,t,n,i){const r=at+t;if(null!=i){const t=e.style[r];if(t.length){const e=t.split(",");e[i]=n,n=e.join(",")}}e.style[r]=n}function mt(e,t){return e.style[at+t]}class bt{constructor(e,t,n,i,r,s,o,a){this.element=e,this.keyframes=t,this.animationName=n,this._duration=i,this._delay=r,this._finalStyles=o,this._specialStyles=a,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=s||"linear",this.totalTime=i+r,this._buildStyler()}onStart(e){this._onStartFns.push(e)}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}destroy(){this.init(),this._state>=4||(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}_flushDoneFns(){this._onDoneFns.forEach(e=>e()),this._onDoneFns=[]}_flushStartFns(){this._onStartFns.forEach(e=>e()),this._onStartFns=[]}finish(){this.init(),this._state>=3||(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())}setPosition(e){this._styler.setPosition(e)}getPosition(){return this._styler.getPosition()}hasStarted(){return this._state>=2}init(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())}play(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()}pause(){this.init(),this._styler.pause()}restart(){this.reset(),this.play()}reset(){this._styler.destroy(),this._buildStyler(),this._styler.apply()}_buildStyler(){this._styler=new lt(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",()=>this.finish())}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}beforeDestroy(){this.init();const e={};if(this.hasStarted()){const t=this._state>=3;Object.keys(this._finalStyles).forEach(n=>{"offset"!=n&&(e[n]=t?this._finalStyles[n]:te(this.element,n))})}this.currentSnapshot=e}}class gt extends c.d{constructor(e,t){super(),this.element=e,this._startingStyles={},this.__initialized=!1,this._styles=T(t)}init(){!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(e=>{this._startingStyles[e]=this.element.style[e]}),super.init())}play(){this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(e=>this.element.style.setProperty(e,this._styles[e])),super.play())}destroy(){this._startingStyles&&(Object.keys(this._startingStyles).forEach(e=>{const t=this._startingStyles[e];t?this.element.style.setProperty(e,t):this.element.style.removeProperty(e)}),this._startingStyles=null,super.destroy())}}class _t{constructor(){this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}validateStyleProperty(e){return M(e)}matchesElement(e,t){return x(e,t)}containsElement(e,t){return k(e,t)}query(e,t,n){return D(e,t,n)}computeStyle(e,t,n){return window.getComputedStyle(e)[t]}buildKeyframeElement(e,t,n){n=n.map(e=>T(e));let i=`@keyframes ${t} {\n`,r="";n.forEach(e=>{r=" ";const t=parseFloat(e.offset);i+=`${r}${100*t}% {\n`,r+=" ",Object.keys(e).forEach(t=>{const n=e[t];switch(t){case"offset":return;case"easing":return void(n&&(i+=`${r}animation-timing-function: ${n};\n`));default:return void(i+=`${r}${t}: ${n};\n`)}}),i+=r+"}\n"}),i+="}\n";const s=document.createElement("style");return s.innerHTML=i,s}animate(e,t,n,i,r,s=[],o){o&&this._notifyFaultyScrubber();const a=s.filter(e=>e instanceof bt),c={};Z(n,i)&&a.forEach(e=>{let t=e.currentSnapshot;Object.keys(t).forEach(e=>c[e]=t[e])});const l=function(e){let t={};return e&&(Array.isArray(e)?e:[e]).forEach(e=>{Object.keys(e).forEach(n=>{"offset"!=n&&"easing"!=n&&(t[n]=e[n])})}),t}(t=X(e,t,c));if(0==n)return new gt(e,l);const u="gen_css_kf_"+this._count++,d=this.buildKeyframeElement(e,u,t);document.querySelector("head").appendChild(d);const h=it(e,t),f=new bt(e,t,u,n,i,r,l,h);return f.onDestroy(()=>{var e;(e=d).parentNode.removeChild(e)}),f}_notifyFaultyScrubber(){this._warningIssued||(console.warn("@angular/animations: please load the web-animations.js polyfill to allow programmatic access...\n"," visit http://bit.ly/IWukam to learn more about using the web-animation-js polyfill."),this._warningIssued=!0)}}class yt{constructor(e,t,n,i){this.element=e,this.keyframes=t,this.options=n,this._specialStyles=i,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:{},this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_triggerWebAnimation(e,t,n){return e.animate(t,n)}onStart(e){this._onStartFns.push(e)}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){this.domPlayer.currentTime=e*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const e={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(t=>{"offset"!=t&&(e[t]=this._finished?this._finalKeyframe[t]:te(this.element,t))}),this.currentSnapshot=e}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}}class vt{constructor(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(wt().toString()),this._cssKeyframesDriver=new _t}validateStyleProperty(e){return M(e)}matchesElement(e,t){return x(e,t)}containsElement(e,t){return k(e,t)}query(e,t,n){return D(e,t,n)}computeStyle(e,t,n){return window.getComputedStyle(e)[t]}overrideWebAnimationsSupport(e){this._isNativeImpl=e}animate(e,t,n,i,r,s=[],o){if(!o&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(e,t,n,i,r,s);const a={duration:n,delay:i,fill:0==i?"both":"forwards"};r&&(a.easing=r);const c={},l=s.filter(e=>e instanceof yt);Z(n,i)&&l.forEach(e=>{let t=e.currentSnapshot;Object.keys(t).forEach(e=>c[e]=t[e])});const u=it(e,t=X(e,t=t.map(e=>z(e,!1)),c));return new yt(e,t,a,u)}}function wt(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}let St=(()=>{class e extends c.b{constructor(e,t){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(t.body,{id:"0",encapsulation:i.Q.None,styles:[],data:{animation:[]}})}build(e){const t=this._nextAnimationId.toString();this._nextAnimationId++;const n=Array.isArray(e)?Object(c.f)(e):e;return kt(this._renderer,null,t,"register",[n]),new Mt(t,this._renderer)}}return e.\u0275fac=function(t){return new(t||e)(i.dc(i.F),i.dc(o.d))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})();class Mt extends c.c{constructor(e,t){super(),this._id=e,this._renderer=t}create(e,t){return new xt(this._id,e,t||{},this._renderer)}}class xt{constructor(e,t,n,i){this.id=e,this.element=t,this._renderer=i,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",n)}_listen(e,t){return this._renderer.listen(this.element,`@@${this.id}:${e}`,t)}_command(e,...t){return kt(this._renderer,this.element,this.id,e,t)}onDone(e){this._listen("done",e)}onStart(e){this._listen("start",e)}onDestroy(e){this._listen("destroy",e)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset")}setPosition(e){this._command("setPosition",e)}getPosition(){return 0}}function kt(e,t,n,i,r){return e.setProperty(t,`@@${n}:${i}`,r)}const Dt="@",Tt="@.disabled";let Ct=(()=>{class e{constructor(e,t,n){this.delegate=e,this.engine=t,this._zone=n,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),t.onRemovalComplete=(e,t)=>{t&&t.parentNode(e)&&t.removeChild(e.parentNode,e)}}createRenderer(e,t){const n=this.delegate.createRenderer(e,t);if(!(e&&t&&t.data&&t.data.animation)){let e=this._rendererCache.get(n);return e||(e=new Ot("",n,this.engine),this._rendererCache.set(n,e)),e}const i=t.id,r=t.id+"-"+this._currentId;this._currentId++,this.engine.register(r,e);const s=t=>{Array.isArray(t)?t.forEach(s):this.engine.registerTrigger(i,r,e,t.name,t)};return t.data.animation.forEach(s),new Lt(this,r,n,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(e,t,n){e>=0&&e<this._microtaskId?this._zone.run(()=>t(n)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(e=>{const[t,n]=e;t(n)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([t,n]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return e.\u0275fac=function(t){return new(t||e)(i.dc(i.F),i.dc(nt),i.dc(i.A))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})();class Ot{constructor(e,t,n){this.namespaceId=e,this.delegate=t,this.engine=n,this.destroyNode=this.delegate.destroyNode?e=>t.destroyNode(e):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(e,t){return this.delegate.createElement(e,t)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}insertBefore(e,t,n){this.delegate.insertBefore(e,t,n),this.engine.onInsert(this.namespaceId,t,e,!0)}removeChild(e,t,n){this.engine.onRemove(this.namespaceId,t,this.delegate,n)}selectRootElement(e,t){return this.delegate.selectRootElement(e,t)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,t,n,i){this.delegate.setAttribute(e,t,n,i)}removeAttribute(e,t,n){this.delegate.removeAttribute(e,t,n)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,n,i){this.delegate.setStyle(e,t,n,i)}removeStyle(e,t,n){this.delegate.removeStyle(e,t,n)}setProperty(e,t,n){t.charAt(0)==Dt&&t==Tt?this.disableAnimations(e,!!n):this.delegate.setProperty(e,t,n)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,n){return this.delegate.listen(e,t,n)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}}class Lt extends Ot{constructor(e,t,n,i){super(t,n,i),this.factory=e,this.namespaceId=t}setProperty(e,t,n){t.charAt(0)==Dt?"."==t.charAt(1)&&t==Tt?this.disableAnimations(e,n=void 0===n||!!n):this.engine.process(this.namespaceId,e,t.substr(1),n):this.delegate.setProperty(e,t,n)}listen(e,t,n){if(t.charAt(0)==Dt){const i=function(e){switch(e){case"body":return document.body;case"document":return document;case"window":return window;default:return e}}(e);let r=t.substr(1),s="";return r.charAt(0)!=Dt&&([r,s]=function(e){const t=e.indexOf(".");return[e.substring(0,t),e.substr(t+1)]}(r)),this.engine.listen(this.namespaceId,i,r,s,e=>{this.factory.scheduleListenerCallback(e._data||-1,n,e)})}return this.delegate.listen(e,t,n)}}let Rt=(()=>{class e extends nt{constructor(e,t,n){super(e.body,t,n)}}return e.\u0275fac=function(t){return new(t||e)(i.dc(o.d),i.dc(O),i.dc(ke))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})();const Et=[{provide:O,useFactory:function(){return"function"==typeof wt()?new vt:new _t}},{provide:new i.r("AnimationModuleType"),useValue:"BrowserAnimations"},{provide:c.b,useClass:St},{provide:ke,useFactory:function(){return new De}},{provide:nt,useClass:Rt},{provide:i.F,useFactory:function(e,t,n){return new Ct(e,t,n)},deps:[r.e,nt,i.A]}];let At=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},providers:Et,imports:[r.a]}),e})();var It=n("EApP"),Pt=n("iInd"),jt=n("LvDl"),Nt=n.n(jt),Ft=n("mrSG"),Yt=n("xTzq");let zt=(()=>{let e=class{constructor(e){this.http=e,this.baseURL="api/cephfs",this.baseUiURL="ui-api/cephfs"}list(){return this.http.get(""+this.baseURL)}lsDir(e,t){let n=`${this.baseUiURL}/${e}/ls_dir?depth=2`;return t&&(n+="&path="+encodeURIComponent(t)),this.http.get(n)}getCephfs(e){return this.http.get(`${this.baseURL}/${e}`)}getTabs(e){return this.http.get(`ui-api/cephfs/${e}/tabs`)}getClients(e){return this.http.get(`${this.baseURL}/${e}/clients`)}evictClient(e,t){return this.http.delete(`${this.baseURL}/${e}/client/${t}`)}getMdsCounters(e){return this.http.get(`${this.baseURL}/${e}/mds_counters`)}mkSnapshot(e,t,n){let i=new a.e;return i=i.append("path",t),Nt.a.isUndefined(n)||(i=i.append("name",n)),this.http.post(`${this.baseURL}/${e}/snapshot`,null,{params:i})}rmSnapshot(e,t,n){let i=new a.e;return i=i.append("path",t),i=i.append("name",n),this.http.delete(`${this.baseURL}/${e}/snapshot`,{params:i})}quota(e,t,n){let i=new a.e;return i=i.append("path",t),this.http.put(`${this.baseURL}/${e}/quota`,n,{observe:"response",params:i})}};return e.\u0275fac=function(t){return new(t||e)(i.dc(a.b))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e=Object(Ft.b)([Yt.a,Object(Ft.d)("design:paramtypes",[a.b])],e),e})();var $t=n("+fVR"),Ht=n("x38r"),Wt=n("vCyI"),Vt=n("a0VL"),Bt=n("uIqm"),Ut=n("PqYM"),qt=n("VxPD"),Gt=n("yJti"),Jt=n("aexS"),Qt=n("G0yt"),Kt=n("JP8w"),Zt=n("Fgil"),Xt=n("o4+5"),en=n("FSuO"),tn=n("wd/R"),nn=n.n(tn),rn=n("NEZu"),sn=n("hrfs");const on=["chartCanvas"],an=["chartTooltip"];let cn=(()=>{class e{constructor(){this.lhsCounter="mds_mem.ino",this.rhsCounter="mds_server.handle_client_request",this.chart={datasets:[{label:this.lhsCounter,yAxisID:"LHS",data:[],lineTension:.1},{label:this.rhsCounter,yAxisID:"RHS",data:[],lineTension:.1}],options:{title:{text:"",display:!0},responsive:!0,maintainAspectRatio:!1,legend:{position:"top"},scales:{xAxes:[{position:"top",type:"time",time:{displayFormats:{quarter:"MMM YYYY"}},ticks:{maxRotation:0}}],yAxes:[{id:"LHS",type:"linear",position:"left"},{id:"RHS",type:"linear",position:"right"}]},tooltips:{enabled:!1,mode:"index",intersect:!1,position:"nearest",callbacks:{title:(e,t)=>{let n=0;if(e.length>0){const i=e[0];n=t.datasets[i.datasetIndex].data[i.index].x}return n.toString()}}}},chartType:"line"}}ngOnInit(){Nt.a.isUndefined(this.mdsCounter)||(this.setChartTooltip(),this.updateChart())}ngOnChanges(){Nt.a.isUndefined(this.mdsCounter)||this.updateChart()}setChartTooltip(){const e=new rn.a(this.chartCanvas,this.chartTooltip,e=>e.caretX+"px",e=>e.caretY-e.height-23+"px");e.getTitle=e=>nn()(e,"x").format("LTS"),e.checkOffset=!0,Nt.a.merge(this.chart,{options:{title:{text:this.mdsCounter.name},tooltips:{custom:t=>e.customTooltips(t)}}})}updateChart(){const e=[{data:this.convertTimeSeries(this.mdsCounter[this.lhsCounter])},{data:this.deltaTimeSeries(this.mdsCounter[this.rhsCounter])}];Nt.a.merge(this.chart,{datasets:e}),this.chart.datasets=[...this.chart.datasets]}convertTimeSeries(e){const t=[];return Nt.a.each(e,e=>{t.push({x:1e3*e[0],y:e[1]})}),t.shift(),t}deltaTimeSeries(e){let t,n=e[0];const i=[];for(t=1;t<e.length;t++){const r=e[t];i.push({x:1e3*r[0],y:r[1]-n[1]}),n=r}return i}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-cephfs-chart"]],viewQuery:function(e,t){var n;1&e&&(i.Jc(on,!0),i.Jc(an,!0)),2&e&&(i.zc(n=i.hc())&&(t.chartCanvas=n.first),i.zc(n=i.hc())&&(t.chartTooltip=n.first))},inputs:{mdsCounter:"mdsCounter"},features:[i.wb],decls:6,vars:3,consts:[[1,"chart-container"],["baseChart","",3,"datasets","options","chartType"],["chartCanvas",""],[1,"chartjs-tooltip"],["chartTooltip",""]],template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Nb(1,"canvas",1,2),i.Sb(3,"div",3,4),i.Nb(5,"table"),i.Rb(),i.Rb()),2&e&&(i.yb(1),i.pc("datasets",t.chart.datasets)("options",t.chart.options)("chartType",t.chart.chartType))},directives:[sn.a],styles:['.chart-container[_ngcontent-%COMP%]{cursor:pointer;margin:auto;overflow:visible;position:absolute}canvas[_ngcontent-%COMP%]{user-select:none}.chartjs-tooltip[_ngcontent-%COMP%]{background:rgba(0,0,0,.7);border-radius:3px;color:#fff;font-family:Helvetica Neue,Helvetica,Arial,sans-serif!important;opacity:0;pointer-events:none;position:absolute;transform:translate(-50%);transition:all .1s ease}.chartjs-tooltip.transform-left[_ngcontent-%COMP%]{transform:translate(-10%)}.chartjs-tooltip.transform-left[_ngcontent-%COMP%]:after{left:10%}.chartjs-tooltip.transform-right[_ngcontent-%COMP%]{transform:translate(-90%)}.chartjs-tooltip.transform-right[_ngcontent-%COMP%]:after{left:90%}.chartjs-tooltip[_ngcontent-%COMP%]:after{border:5px solid transparent;border-top-color:#000;content:" ";left:50%;margin-left:-5px;position:absolute;top:100%} .chartjs-tooltip-key{display:inline-block;height:10px;margin-right:10px;width:10px}.chart-container[_ngcontent-%COMP%]{height:500px;margin-bottom:20px;position:relative;width:100%}']}),e})();var ln=n("GgAd");const un=["poolUsageTpl"],dn=["activityTmpl"];function hn(e,t){if(1&e&&(i.Sb(0,"div",0),i.Sb(1,"div",11),i.Nb(2,"cd-cephfs-chart",12),i.Rb(),i.Rb()),2&e){const e=t.$implicit;i.yb(2),i.pc("mdsCounter",e)}}function fn(e,t){if(1&e&&i.Nb(0,"cd-usage-bar",13),2&e){const e=t.row;i.pc("total",e.size)("used",e.used)}}function pn(e,t){1&e&&(i.Oc(0),i.jc(1,"dimless")),2&e&&i.Rc(" ","standby-replay"===t.row.state?"Evts":"Reqs",": ",i.kc(1,2,t.value)," /s\n")}let mn=(()=>{class e{constructor(e,t){this.dimlessBinary=e,this.dimless=t,this.standbys=[],this.objectValues=Object.values}ngOnChanges(){this.setStandbys()}setStandbys(){this.standbys=[{key:"Standby daemons",value:this.data.standbys}]}ngOnInit(){this.columns={ranks:[{prop:"rank",name:"Rank"},{prop:"state",name:"State"},{prop:"mds",name:"Daemon"},{prop:"activity",name:"Activity",cellTemplate:this.activityTmpl},{prop:"dns",name:"Dentries",pipe:this.dimless},{prop:"inos",name:"Inodes",pipe:this.dimless},{prop:"dirs",name:"Dirs",pipe:this.dimless},{prop:"caps",name:"Caps",pipe:this.dimless}],pools:[{prop:"pool",name:"Pool"},{prop:"type",name:"Type"},{prop:"size",name:"Size",pipe:this.dimlessBinary},{name:"Usage",cellTemplate:this.poolUsageTpl,comparator:(e,t,n,i)=>{const r=n.used/n.avail,s=i.used/i.avail;return r===s?0:r>s?1:-1}}]}}trackByFn(e,t){return t.name}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Zt.a),i.Mb(Xt.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-cephfs-detail"]],viewQuery:function(e,t){var n;1&e&&(i.Jc(un,!0),i.Jc(dn,!0)),2&e&&(i.zc(n=i.hc())&&(t.poolUsageTpl=n.first),i.zc(n=i.hc())&&(t.activityTmpl=n.first))},inputs:{data:"data"},features:[i.wb],decls:19,vars:9,consts:function(){return[[1,"row"],[1,"col-sm-6"],"Ranks",[3,"data","columns","toolHeader"],"Standbys",[3,"data"],"Pools","MDS performance counters",["class","row",4,"ngFor","ngForOf","ngForTrackBy"],["poolUsageTpl",""],["activityTmpl",""],[1,"col-md-12"],[3,"mdsCounter"],[3,"total","used"]]},template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Sb(1,"div",1),i.Sb(2,"legend"),i.Wb(3,2),i.Rb(),i.Nb(4,"cd-table",3),i.Sb(5,"legend"),i.Wb(6,4),i.Rb(),i.Nb(7,"cd-table-key-value",5),i.Rb(),i.Sb(8,"div",1),i.Sb(9,"legend"),i.Wb(10,6),i.Rb(),i.Nb(11,"cd-table",3),i.Rb(),i.Rb(),i.Sb(12,"legend"),i.Wb(13,7),i.Rb(),i.Mc(14,hn,3,1,"div",8),i.Mc(15,fn,1,2,"ng-template",null,9,i.Nc),i.Mc(17,pn,2,4,"ng-template",null,10,i.Nc)),2&e&&(i.yb(4),i.pc("data",t.data.ranks)("columns",t.columns.ranks)("toolHeader",!1),i.yb(3),i.pc("data",t.standbys),i.yb(4),i.pc("data",t.data.pools)("columns",t.columns.pools)("toolHeader",!1),i.yb(3),i.pc("ngForOf",t.objectValues(t.data.mdsCounters))("ngForTrackBy",t.trackByFn))},directives:[Bt.a,en.a,o.q,cn,ln.a],pipes:[Xt.a],styles:[".progress[_ngcontent-%COMP%]{margin-bottom:0}"]}),e})();var bn=n("0+/T"),gn=n("sne2"),_n=n("oxzT"),yn=n("mtw6"),vn=n("JK/P"),wn=n("9nlD"),Sn=n("S7zO");let Mn=(()=>{class e{constructor(e,t,n,r,s){this.cephfsService=e,this.modalService=t,this.notificationService=n,this.authStorageService=r,this.actionLabels=s,this.triggerApiUpdate=new i.o,this.selection=new Wt.a,this.permission=this.authStorageService.getPermissions().cephfs,this.tableActions=[{permission:"update",icon:_n.a.signOut,click:()=>this.evictClientModal(),name:this.actionLabels.EVICT}]}ngOnInit(){this.columns=[{prop:"id",name:"id"},{prop:"type",name:"type"},{prop:"state",name:"state"},{prop:"version",name:"version"},{prop:"hostname",name:"Host"},{prop:"root",name:"root"}]}updateSelection(e){this.selection=e}evictClient(e){this.cephfsService.evictClient(this.id,e).subscribe(()=>{this.triggerApiUpdate.emit(),this.modalRef.close(),this.notificationService.show(yn.a.success,"Evicted client '" + e + "'")},()=>{this.modalRef.componentInstance.stopLoadingSpinner()})}evictClientModal(){const e=this.selection.first().id;this.modalRef=this.modalService.show(bn.a,{itemDescription:"client",itemNames:[e],actionDescription:"evict",submitAction:()=>this.evictClient(e)})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(zt),i.Mb(vn.a),i.Mb(wn.a),i.Mb(Jt.a),i.Mb(gn.b))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-cephfs-clients"]],inputs:{id:"id",clients:"clients"},outputs:{triggerApiUpdate:"triggerApiUpdate"},decls:2,vars:7,consts:[["selectionType","single",3,"data","columns","status","autoReload","fetchData","updateSelection"],[1,"table-actions",3,"permission","selection","tableActions"]],template:function(e,t){1&e&&(i.Sb(0,"cd-table",0),i.gc("fetchData",(function(){return t.triggerApiUpdate.emit()}))("updateSelection",(function(e){return t.updateSelection(e)})),i.Nb(1,"cd-table-actions",1),i.Rb()),2&e&&(i.pc("data",t.clients.data)("columns",t.columns)("status",t.clients.status)("autoReload",-1),i.yb(1),i.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions))},directives:[Bt.a,Sn.a],styles:[""]}),e})();var xn=n("s7LF"),kn=n("ohO+"),Dn=n("OLbh"),Tn=n("Rf2I"),Cn=n("1Ni5"),On=n("ANnk");const Ln=["origin"],Rn=function(e,t){return[e,t]};function En(e,t){if(1&e&&i.Nb(0,"i",5),2&e){const e=i.ic(2);i.pc("ngClass",i.vc(1,Rn,e.icons.spinner,e.icons.spin))}}function An(e,t){if(1&e&&(i.Sb(0,"tree-root",10),i.Mc(1,En,1,4,"ng-template",null,11,i.Nc),i.Rb()),2&e){const e=i.ic();i.pc("nodes",e.nodes)("options",e.treeOptions)}}function In(e,t){if(1&e){const e=i.Tb();i.Qb(0),i.Sb(1,"legend"),i.Wb(2,17),i.Rb(),i.Sb(3,"cd-table",18),i.gc("updateSelection",(function(t){return i.Dc(e),i.ic(2).quota.updateSelection(t)})),i.Nb(4,"cd-table-actions",19),i.Rb(),i.Pb()}if(2&e){const e=i.ic(2);i.yb(3),i.pc("data",e.settings)("columns",e.quota.columns)("limit",0)("footer",!1)("onlyActionHeader",!0)("forceIdentifier",!0)("toolHeader",!1),i.yb(1),i.pc("permission",e.permission)("selection",e.quota.selection)("tableActions",e.quota.tableActions)}}function Pn(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",12),i.Sb(1,"div",2),i.Sb(2,"div",3),i.Oc(3),i.Rb(),i.Sb(4,"div",6),i.Mc(5,In,5,10,"ng-container",13),i.Sb(6,"legend"),i.Wb(7,14),i.Rb(),i.Sb(8,"cd-table",15),i.gc("updateSelection",(function(t){return i.Dc(e),i.ic().snapshot.updateSelection(t)})),i.Nb(9,"cd-table-actions",16),i.Rb(),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.ic();i.yb(3),i.Qc(" ",e.selectedDir.path," "),i.yb(2),i.pc("ngIf","/"!==e.selectedDir.path),i.yb(3),i.pc("data",e.selectedDir.snapshots)("columns",e.snapshot.columns),i.yb(1),i.pc("permission",e.permission)("selection",e.snapshot.selection)("tableActions",e.snapshot.tableActions)}}function jn(e,t){if(1&e){const e=i.Tb();i.Sb(0,"span",20),i.gc("click",(function(){i.Dc(e);const n=t.value;return i.ic().selectOrigin(n)})),i.Oc(1),i.Rb()}if(2&e){const e=t.value;i.yb(1),i.Pc(e)}}let Nn=(()=>{class e{constructor(e,t,n,i,r,s,o){this.authStorageService=e,this.modalService=t,this.cephfsService=n,this.cdDatePipe=i,this.actionLabels=r,this.notificationService=s,this.dimlessBinaryPipe=o,this.icons=_n.a,this.loadingIndicator=!1,this.loading={},this.treeOptions={useVirtualScroll:!0,getChildren:e=>this.updateDirectory(e.id),actionMapping:{mouse:{click:this.selectAndShowNode.bind(this),expanderClick:this.selectAndShowNode.bind(this)}}}}selectAndShowNode(e,t,n){kn.a.TOGGLE_EXPANDED(e,t,n),this.selectNode(t)}selectNode(e){kn.a.TOGGLE_ACTIVE(void 0,e,void 0),this.selectedDir=this.getDirectory(e),"/"!==e.id&&this.setSettings(e)}ngOnInit(){this.permission=this.authStorageService.getPermissions().cephfs,this.setUpQuotaTable(),this.setUpSnapshotTable()}setUpQuotaTable(){this.quota={columns:[{prop:"row.name",name:"Name",flexGrow:1},{prop:"row.value",name:"Value",sortable:!1,flexGrow:1},{prop:"row.originPath",name:"Origin",sortable:!1,cellTemplate:this.originTmpl,flexGrow:1}],selection:new Wt.a,updateSelection:e=>{this.quota.selection=e},tableActions:[{name:this.actionLabels.SET,icon:_n.a.edit,permission:"update",visible:e=>!e.hasSelection||e.first()&&0===e.first().dirValue,click:()=>this.updateQuotaModal()},{name:this.actionLabels.UPDATE,icon:_n.a.edit,permission:"update",visible:e=>e.first()&&e.first().dirValue>0,click:()=>this.updateQuotaModal()},{name:this.actionLabels.UNSET,icon:_n.a.destroy,permission:"update",disable:e=>!e.hasSelection||e.first()&&0===e.first().dirValue,click:()=>this.unsetQuotaModal()}]}}setUpSnapshotTable(){this.snapshot={columns:[{prop:"name",name:"Name",flexGrow:1},{prop:"path",name:"Path",isHidden:!0,flexGrow:2},{prop:"created",name:"Created",flexGrow:1,pipe:this.cdDatePipe}],selection:new Wt.a,updateSelection:e=>{this.snapshot.selection=e},tableActions:[{name:this.actionLabels.CREATE,icon:_n.a.add,permission:"create",canBePrimary:e=>!e.hasSelection,click:()=>this.createSnapshot()},{name:this.actionLabels.DELETE,icon:_n.a.destroy,permission:"delete",click:()=>this.deleteSnapshotModal(),canBePrimary:e=>e.hasSelection,disable:e=>!e.hasSelection}]}}ngOnChanges(){this.selectedDir=void 0,this.dirs=[],this.requestedPaths=[],this.nodeIds={},this.id&&(this.setRootNode(),this.firstCall())}setRootNode(){this.nodes=[{name:"/",id:"/",isExpanded:!0}]}firstCall(){setTimeout(()=>{this.getNode("/").loadNodeChildren()},10)}updateDirectory(e){if(this.unsetLoadingIndicator(),this.requestedPaths.includes(e)){if(!0===this.loading[e])return}else this.requestedPaths.push(e);return new Promise(t=>{this.setLoadingIndicator(e,!0),this.cephfsService.lsDir(this.id,e).subscribe(n=>{this.updateTreeStructure(n),this.updateQuotaTable(),this.updateTree(),t(this.getChildren(e)),this.setLoadingIndicator(e,!1)})})}setLoadingIndicator(e,t){this.loading[e]=t,this.unsetLoadingIndicator()}getSubDirectories(e,t=this.dirs){return t.filter(t=>t.parent===e)}getChildren(e){const t=this.getSubTree(e);return Nt.a.sortBy(this.getSubDirectories(e),"path").map(e=>this.createNode(e,t))}createNode(e,t){return this.nodeIds[e.path]=e,t||this.getSubTree(e.parent),{name:e.name,id:e.path,hasChildren:this.getSubDirectories(e.path,t).length>0}}getSubTree(e){return this.dirs.filter(t=>t.parent&&t.parent.startsWith(e))}setSettings(e){const t=(e,t)=>e?t?t(e):e:"";this.settings=[this.getQuota(e,"max_files",t),this.getQuota(e,"max_bytes",e=>t(e,e=>this.dimlessBinaryPipe.transform(e)))]}getQuota(e,t,n){const i=e.id;e=this.getOrigin(e,t);const r=this.getDirectory(e),s=r.quotas[t];let o=s,a=r.path;if(e.id===i)if("/"===e.parent.id)o=0;else{const n=this.getDirectory(this.getOrigin(e.parent,t));o=n.quotas[t],a=n.path}return{row:{name:"max_bytes"===t?"Max size":"Max files",value:n(s),originPath:s?r.path:""},quotaKey:t,dirValue:this.nodeIds[i].quotas[t],nextTreeMaximum:{value:o,path:o?a:""}}}getOrigin(e,t){if(e.parent&&"/"!==e.parent.id){const n=this.getQuotaFromTree(e,t),i=this.getOrigin(e.parent,t),r=this.getQuotaFromTree(i,t);return 0===n||0!==r&&r<n?i:e}return e}getQuotaFromTree(e,t){return this.getDirectory(e).quotas[t]}getDirectory(e){return this.nodeIds[e.id]}selectOrigin(e){this.selectNode(this.getNode(e))}getNode(e){return this.treeComponent.treeModel.getNodeById(e)}updateQuotaModal(){const e=this.selectedDir.path,t=this.quota.selection.first(),n=t.nextTreeMaximum,i=t.quotaKey,r=t.dirValue;this.modalService.show(Tn.a,{titleText:this.getModalQuotaTitle(0===r?this.actionLabels.SET:this.actionLabels.UPDATE,e),message:n.value?"The inherited " + this.getQuotaValueFromPathMsg(n.value, n.path) + " is the maximum value to be used.":void 0,fields:[this.getQuotaFormField(t.row.name,i,r,n.value)],submitButtonText:"Save",onSubmit:e=>this.updateQuota(e)})}getModalQuotaTitle(e,t){return "" + e + " CephFS " + this.getQuotaName() + " quota for '" + t + "'"}getQuotaName(){return this.isBytesQuotaSelected()?"size":"files"}isBytesQuotaSelected(){return"max_bytes"===this.quota.selection.first().quotaKey}getQuotaValueFromPathMsg(e,t){return e=this.isBytesQuotaSelected()?this.dimlessBinaryPipe.transform(e):e,"" + this.getQuotaName() + " quota " + e + " from '" + t + "'"}getQuotaFormField(e,t,n,i){const r="max_bytes"===t,s=[r?Cn.a.binaryMin(0):xn.A.min(0)];i&&s.push(r?Cn.a.binaryMax(i):xn.A.max(i));const o={type:r?"binary":"number",label:e,name:t,value:n,validators:s,required:!0};return r||(o.errors={min:"Value has to be at least 0 or more",max:"Value has to be at most " + i + " or less"}),o}updateQuota(e,t){const n=this.selectedDir.path,i=this.quota.selection.first().quotaKey,r=0===this.selectedDir.quotas[i]?this.actionLabels.SET:0===e[i]?this.actionLabels.UNSET:"Updated";this.cephfsService.quota(this.id,n,e).subscribe(()=>{t&&t(),this.notificationService.show(yn.a.success,this.getModalQuotaTitle(r,n)),this.forceDirRefresh()})}unsetQuotaModal(){const e=this.selectedDir.path,t=this.quota.selection.first(),n=t.quotaKey,i=t.nextTreeMaximum,r=t.dirValue,s=this.getQuotaValueFromPathMsg(i.value,i.path),o=i.value>0?i.value>r?"in order to inherit " + s + "":"which isn't used because of the inheritance of " + s + "":"in order to have no quota on the directory";this.modalRef=this.modalService.show(Dn.a,{titleText:this.getModalQuotaTitle(this.actionLabels.UNSET,e),buttonText:this.actionLabels.UNSET,description:"" + this.actionLabels.UNSET + " " + this.getQuotaValueFromPathMsg(r, e) + " " + o + ".",onSubmit:()=>this.updateQuota({[n]:0},()=>this.modalRef.close())})}createSnapshot(){const e=this.selectedDir.path;this.modalService.show(Tn.a,{titleText:"Create Snapshot",message:"Please enter the name of the snapshot.",fields:[{type:"text",name:"name",value:""+nn()().toISOString(!0),required:!0}],submitButtonText:"Create Snapshot",onSubmit:t=>{this.cephfsService.mkSnapshot(this.id,e,t.name).subscribe(t=>{this.notificationService.show(yn.a.success,"Created snapshot '" + t + "' for '" + e + "'"),this.forceDirRefresh()})}})}forceDirRefresh(e){if(!e){const t=this.selectedDir;if(!t)throw new Error("This function can only be called without path if an selection was made");e=t.parent?t.parent:t.path}this.getNode(e).loadNodeChildren()}updateTreeStructure(e){const t=(e,t)=>{const n=e.filter(e=>e.parent===t),i=n.map(e=>e.path);return{children:n,paths:i}};Nt.a.uniq(e.map(e=>e.parent).sort()).forEach(n=>{const i=t(e,n),r=t(this.dirs,n);r.children.forEach(e=>{i.paths.includes(e.path)||this.removeOldDirectory(e)}),i.children.forEach(e=>{r.paths.includes(e.path)?this.updateExistingDirectory(r.children,e):this.addNewDirectory(e)})})}removeOldDirectory(e){const t=e.path;Nt.a.remove(this.dirs,e=>e.path===t),delete this.nodeIds[t],this.updateDirectoriesParentNode(e)}updateDirectoriesParentNode(e){const t=e.parent;if(!t)return;const n=this.getNode(t);if(!n)return;const i=this.getChildren(t);n.data.children=i,n.data.hasChildren=i.length>0,this.treeComponent.treeModel.update()}addNewDirectory(e){this.dirs.push(e),this.nodeIds[e.path]=e,this.updateDirectoriesParentNode(e)}updateExistingDirectory(e,t){const n=e.find(e=>e.path===t.path);Object.assign(n,t)}updateQuotaTable(){const e=this.selectedDir?this.getNode(this.selectedDir.path):void 0;e&&"/"!==e.id&&this.setSettings(e)}updateTree(e=!1){this.loadingIndicator&&!e||(this.treeComponent.treeModel.update(),this.nodes=[...this.nodes],this.treeComponent.sizeChanged())}deleteSnapshotModal(){this.modalRef=this.modalService.show(bn.a,{itemDescription:"CephFs Snapshot",itemNames:this.snapshot.selection.selected.map(e=>e.name),submitAction:()=>this.deleteSnapshot()})}deleteSnapshot(){const e=this.selectedDir.path;this.snapshot.selection.selected.forEach(t=>{const n=t.name;this.cephfsService.rmSnapshot(this.id,e,n).subscribe(()=>{this.notificationService.show(yn.a.success,"Deleted snapshot '" + n + "' for '" + e + "'")})}),this.modalRef.close(),this.forceDirRefresh()}refreshAllDirectories(){this.loadingIndicator=!0,this.requestedPaths.map(e=>this.forceDirRefresh(e));const e=setInterval(()=>{this.updateTree(!0),this.loadingIndicator||clearInterval(e)},3e3)}unsetLoadingIndicator(){this.loadingIndicator&&(clearTimeout(this.loadingTimeout),this.loadingTimeout=setTimeout(()=>{if(Object.values(this.loading).some(e=>e))return this.unsetLoadingIndicator();this.loadingIndicator=!1,this.updateTree()},3e3))}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Jt.a),i.Mb(vn.a),i.Mb(zt),i.Mb(Vt.a),i.Mb(gn.b),i.Mb(wn.a),i.Mb(Zt.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-cephfs-directories"]],viewQuery:function(e,t){var n;1&e&&(i.Tc(kn.b,!0),i.Jc(Ln,!0)),2&e&&(i.zc(n=i.hc())&&(t.treeComponent=n.first),i.zc(n=i.hc())&&(t.originTmpl=n.first))},inputs:{id:"id"},features:[i.wb],decls:11,vars:10,consts:function(){return[[1,"row"],[1,"col-sm-4","pr-0"],[1,"card"],[1,"card-header"],["type","button",1,"btn","btn-light","pull-right",3,"click"],[3,"ngClass"],[1,"card-body"],[3,"nodes","options",4,"ngIf"],["class","col-sm-8 metadata",4,"ngIf"],["origin",""],[3,"nodes","options"],["loadingTemplate",""],[1,"col-sm-8","metadata"],[4,"ngIf"],"Snapshots",["identifier","name","forceIdentifier","true","selectionType","multiClick",3,"data","columns","updateSelection"],[1,"table-actions",3,"permission","selection","tableActions"],"Quotas",["selectionType","single","identifier","quotaKey",3,"data","columns","limit","footer","onlyActionHeader","forceIdentifier","toolHeader","updateSelection"],[1,"only-table-actions",3,"permission","selection","tableActions"],[1,"quota-origin",3,"click"]]},template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Sb(1,"div",1),i.Sb(2,"div",2),i.Sb(3,"div",3),i.Sb(4,"button",4),i.gc("click",(function(){return t.refreshAllDirectories()})),i.Nb(5,"i",5),i.Rb(),i.Rb(),i.Sb(6,"div",6),i.Mc(7,An,3,2,"tree-root",7),i.Rb(),i.Rb(),i.Rb(),i.Mc(8,Pn,10,7,"div",8),i.Rb(),i.Mc(9,jn,2,1,"ng-template",null,9,i.Nc)),2&e&&(i.yb(4),i.Eb("disabled",t.loadingIndicator),i.yb(1),i.Eb("fa-spin",t.loadingIndicator),i.pc("ngClass",i.vc(7,Rn,t.icons.large,t.icons.refresh)),i.yb(2),i.pc("ngIf",t.nodes),i.yb(1),i.pc("ngIf",t.selectedDir))},directives:[On.a,o.p,o.r,kn.b,Bt.a,Sn.a],styles:["cd-cephfs-directories tree-root .tree-children{overflow:inherit}.quota-origin[_ngcontent-%COMP%]{color:#2b99a8;cursor:pointer}.quota-origin[_ngcontent-%COMP%]:hover{color:#212529}"]}),e})();var Fn=n("insk");function Yn(e,t){if(1&e&&i.Nb(0,"cd-cephfs-detail",15),2&e){const e=i.ic(2);i.pc("data",e.details)}}function zn(e,t){if(1&e){const e=i.Tb();i.Sb(0,"cd-cephfs-clients",16),i.gc("triggerApiUpdate",(function(){return i.Dc(e),i.ic(2).refresh()})),i.Rb()}if(2&e){const e=i.ic(2);i.pc("id",e.id)("clients",e.clients)}}function $n(e,t){if(1&e&&i.Nb(0,"cd-cephfs-directories",17),2&e){const e=i.ic(2);i.pc("id",e.id)}}function Hn(e,t){if(1&e&&i.Nb(0,"cd-grafana",18),2&e){const e=i.ic(2);i.pc("grafanaPath","mds-performance?var-mds_servers=mds."+e.grafanaId)}}function Wn(e,t){if(1&e){const e=i.Tb();i.Qb(0),i.Sb(1,"ul",1,2),i.gc("navChange",(function(){return i.Dc(e),i.ic().softRefresh()})),i.Sb(3,"li",3),i.Sb(4,"a",4),i.Wb(5,5),i.Rb(),i.Mc(6,Yn,1,1,"ng-template",6),i.Rb(),i.Sb(7,"li",7),i.Sb(8,"a",4),i.Qb(9),i.Wb(10,8),i.Pb(),i.Sb(11,"span",9),i.Oc(12),i.Rb(),i.Rb(),i.Mc(13,zn,1,2,"ng-template",6),i.Rb(),i.Sb(14,"li",10),i.Sb(15,"a",4),i.Wb(16,11),i.Rb(),i.Mc(17,$n,1,1,"ng-template",6),i.Rb(),i.Sb(18,"li",12),i.Sb(19,"a",4),i.Wb(20,13),i.Rb(),i.Mc(21,Hn,1,1,"ng-template",6),i.Rb(),i.Rb(),i.Nb(22,"div",14),i.Pb()}if(2&e){const e=i.Ac(2),t=i.ic();i.yb(12),i.Pc(t.clients.data.length),i.yb(10),i.pc("ngbNavOutlet",e)}}let Vn=(()=>{class e{constructor(e,t,n){this.ngZone=e,this.authStorageService=t,this.cephfsService=n,this.clients={data:[],status:new qt.a(Gt.a.ValueNone)},this.details={standbys:"",pools:[],ranks:[],mdsCounters:{},name:""},this.grafanaPermission=this.authStorageService.getPermissions().grafana}ngOnChanges(){this.selection?this.selection.id!==this.id&&this.setupSelected(this.selection.id,this.selection.mdsmap.info):this.unsubscribeInterval()}setupSelected(e,t){this.id=e;const n=Nt.a.first(Object.values(t));this.grafanaId=n&&n.name,this.details={standbys:"",pools:[],ranks:[],mdsCounters:{},name:""},this.clients={data:[],status:new qt.a(Gt.a.ValueNone)},this.updateInterval()}updateInterval(){this.unsubscribeInterval(),this.subscribeInterval()}unsubscribeInterval(){this.reloadSubscriber&&this.reloadSubscriber.unsubscribe()}subscribeInterval(){this.ngZone.runOutsideAngular(()=>this.reloadSubscriber=Object(Ut.a)(0,5e3).subscribe(()=>this.ngZone.run(()=>this.refresh())))}refresh(){this.cephfsService.getTabs(this.id).subscribe(e=>{this.data=e,this.softRefresh()},()=>{this.clients.status=new qt.a(Gt.a.ValueException)})}softRefresh(){const e=Nt.a.cloneDeep(this.data);this.clients=e.clients,this.clients.status=new qt.a(this.clients.status),this.details={standbys:e.standbys,pools:e.pools,ranks:e.ranks,mdsCounters:e.mds_counters,name:e.name}}ngOnDestroy(){this.unsubscribeInterval()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.A),i.Mb(Jt.a),i.Mb(zt))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-cephfs-tabs"]],inputs:{selection:"selection"},features:[i.wb],decls:1,vars:1,consts:function(){return[[4,"ngIf"],["ngbNav","","cdStatefulTab","cephfs-tabs",1,"nav-tabs",3,"navChange"],["nav","ngbNav"],["ngbNavItem","details"],["ngbNavLink",""],"Details",["ngbNavContent",""],["ngbNavItem","clients"],"Clients",[1,"badge","badge-pill","badge-tab","ml-1"],["ngbNavItem","directories"],"Directories",["ngbNavItem","performance-details"],"Performance Details",[3,"ngbNavOutlet"],[3,"data"],[3,"id","clients","triggerApiUpdate"],[3,"id"],["uid","tbO9LAiZz","grafanaStyle","one",3,"grafanaPath"]]},template:function(e,t){1&e&&i.Mc(0,Wn,23,2,"ng-container",0),2&e&&i.pc("ngIf",t.selection)},directives:[o.r,Qt.p,Kt.a,Qt.r,Qt.s,Qt.q,Qt.u,mn,Mn,Nn,Fn.a],styles:[""]}),e})(),Bn=(()=>{class e extends $t.a{constructor(e,t){super(),this.cephfsService=e,this.cdDatePipe=t,this.filesystems=[],this.selection=new Wt.a}ngOnInit(){this.columns=[{name:"Name",prop:"mdsmap.fs_name",flexGrow:2},{name:"Created",prop:"mdsmap.created",flexGrow:2,pipe:this.cdDatePipe},{name:"Enabled",prop:"mdsmap.enabled",flexGrow:1,cellTransformation:Ht.a.checkIcon}]}loadFilesystems(e){this.cephfsService.list().subscribe(e=>{this.filesystems=e},()=>{e.error()})}updateSelection(e){this.selection=e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(zt),i.Mb(Vt.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-cephfs-list"]],features:[i.vb],decls:2,vars:4,consts:[["columnMode","flex","identifier","id","forceIdentifier","true","selectionType","single",3,"data","columns","hasDetails","fetchData","setExpandedRow","updateSelection"],["cdTableDetail","",3,"selection"]],template:function(e,t){1&e&&(i.Sb(0,"cd-table",0),i.gc("fetchData",(function(e){return t.loadFilesystems(e)}))("setExpandedRow",(function(e){return t.setExpandedRow(e)}))("updateSelection",(function(e){return t.updateSelection(e)})),i.Nb(1,"cd-cephfs-tabs",1),i.Rb()),2&e&&(i.pc("data",t.filesystems)("columns",t.columns)("hasDetails",!0),i.yb(1),i.pc("selection",t.expandedRow))},directives:[Bt.a,Vn],styles:[""]}),e})();var Un=n("MuvH");let qn=(()=>{class e{static getType(e){const t=Nt.a.find(this.knownTypes,t=>t.name===e);if(void 0!==t)return t;throw new Error('Found unknown type "'+e+'" for config option.')}static getTypeValidators(t){const n=e.getType(t.type);if("bool"===n.name||"str"===n.name)return;const i={validators:[],patternHelpText:n.patternHelpText};return n.isNumberType?(t.max&&""!==t.max&&(i.max=t.max,i.validators.push(xn.A.max(t.max))),t.min&&""!==t.min?(i.min=t.min,i.validators.push(xn.A.min(t.min))):"defaultMin"in n&&(i.min=n.defaultMin,i.validators.push(xn.A.min(n.defaultMin))),i.validators.push("float"===t.type?Cn.a.decimalNumber():Cn.a.number(n.allowsNegative))):"addr"===t.type?i.validators=[Cn.a.ip()]:"uuid"===t.type&&(i.validators=[Cn.a.uuid()]),i}static getTypeStep(e,t){if(["uint","int","size","secs"].includes(e))return 1;if("float"===e){if(null!==t&&-1!==t.toString().indexOf(".")){const e=t.toString().split(".");return Math.pow(10,-e[1].length)}return.1}}}return e.knownTypes=[{name:"uint",inputType:"number",humanReadable:"Unsigned integer value",defaultMin:0,patternHelpText:"The entered value needs to be an unsigned number.",isNumberType:!0,allowsNegative:!1},{name:"int",inputType:"number",humanReadable:"Integer value",patternHelpText:"The entered value needs to be a number.",isNumberType:!0,allowsNegative:!0},{name:"size",inputType:"number",humanReadable:"Unsigned integer value (>=16bit)",defaultMin:0,patternHelpText:"The entered value needs to be a unsigned number.",isNumberType:!0,allowsNegative:!1},{name:"secs",inputType:"number",humanReadable:"Number of seconds",defaultMin:1,patternHelpText:"The entered value needs to be a number >= 1.",isNumberType:!0,allowsNegative:!1},{name:"float",inputType:"number",humanReadable:"Double value",patternHelpText:"The entered value needs to be a number or decimal.",isNumberType:!0,allowsNegative:!0},{name:"str",inputType:"text",humanReadable:"Text",isNumberType:!1},{name:"addr",inputType:"text",humanReadable:"IPv4 or IPv6 address",patternHelpText:"The entered value needs to be a valid IP address.",isNumberType:!1},{name:"uuid",inputType:"text",humanReadable:"UUID",patternHelpText:"The entered value is not a valid UUID, e.g.: 67dcac9f-2c03-4d6c-b7bd-1210b3a259a8",isNumberType:!1},{name:"bool",inputType:"checkbox",humanReadable:"Boolean value",isNumberType:!1}],e})();var Gn=n("spCT"),Jn=n("QFaf");class Qn{constructor(){this.value=[]}}var Kn=n("zc8c"),Zn=n("NwgZ"),Xn=n("ocLN"),ei=n("f69J"),ti=n("6+kj");function ni(e,t){1&e&&(i.Sb(0,"div",8),i.Sb(1,"label",9),i.Wb(2,20),i.Rb(),i.Sb(3,"div",11),i.Sb(4,"textarea",21),i.Oc(5," "),i.Rb(),i.Rb(),i.Rb())}function ii(e,t){1&e&&(i.Sb(0,"div",8),i.Sb(1,"label",9),i.Wb(2,22),i.Rb(),i.Sb(3,"div",11),i.Sb(4,"textarea",23),i.Oc(5," "),i.Rb(),i.Rb(),i.Rb())}function ri(e,t){1&e&&(i.Sb(0,"div",8),i.Sb(1,"label",9),i.Wb(2,24),i.Rb(),i.Sb(3,"div",11),i.Nb(4,"input",25),i.Rb(),i.Rb())}function si(e,t){1&e&&(i.Sb(0,"div",8),i.Sb(1,"label",9),i.Wb(2,26),i.Rb(),i.Sb(3,"div",11),i.Nb(4,"input",27),i.Rb(),i.Rb())}function oi(e,t){if(1&e&&(i.Sb(0,"span",30),i.Sb(1,"span",31),i.Oc(2),i.Rb(),i.Rb()),2&e){const e=t.$implicit;i.yb(2),i.Pc(e)}}function ai(e,t){if(1&e&&(i.Sb(0,"div",8),i.Sb(1,"label",9),i.Wb(2,28),i.Rb(),i.Sb(3,"div",11),i.Mc(4,oi,3,1,"span",29),i.Rb(),i.Rb()),2&e){const e=i.ic(2);i.yb(4),i.pc("ngForOf",e.configForm.getValue("services"))}}function ci(e,t){if(1&e&&(i.Sb(0,"div",8),i.Sb(1,"label",32),i.Oc(2),i.Rb(),i.Sb(3,"div",11),i.Sb(4,"select",33),i.Sb(5,"option",34),i.Wb(6,35),i.Rb(),i.Sb(7,"option",34),i.Wb(8,36),i.Rb(),i.Sb(9,"option",34),i.Wb(10,37),i.Rb(),i.Rb(),i.Rb(),i.Rb()),2&e){const e=i.ic().$implicit;i.yb(1),i.pc("for",e),i.yb(1),i.Qc("",e," "),i.yb(2),i.pc("formControlName",e),i.yb(1),i.pc("ngValue",null),i.yb(2),i.pc("ngValue",!0),i.yb(2),i.pc("ngValue",!1)}}function li(e,t){if(1&e&&(i.Sb(0,"span",40),i.Oc(1),i.Rb()),2&e){const e=i.ic(4);i.yb(1),i.Qc(" ",e.patternHelpText," ")}}function ui(e,t){if(1&e&&(i.Sb(0,"span",40),i.Oc(1),i.Rb()),2&e){const e=i.ic(4);i.yb(1),i.Qc(" ",e.patternHelpText," ")}}function di(e,t){if(1&e&&(i.Sb(0,"span",40),i.Wb(1,41),i.Rb()),2&e){const e=i.ic(4);i.yb(1),i.ac(e.maxValue),i.Xb(1)}}function hi(e,t){if(1&e&&(i.Sb(0,"span",40),i.Wb(1,42),i.Rb()),2&e){const e=i.ic(4);i.yb(1),i.ac(e.minValue),i.Xb(1)}}function fi(e,t){if(1&e&&(i.Sb(0,"div",8),i.Sb(1,"label",32),i.Oc(2),i.Rb(),i.Sb(3,"div",11),i.Nb(4,"input",38),i.Mc(5,li,2,1,"span",39),i.Mc(6,ui,2,1,"span",39),i.Mc(7,di,2,1,"span",39),i.Mc(8,hi,2,1,"span",39),i.Rb(),i.Rb()),2&e){const e=i.ic().$implicit;i.ic();const t=i.Ac(2),n=i.ic();i.yb(1),i.pc("for",e),i.yb(1),i.Qc("",e," "),i.yb(2),i.pc("type",n.inputType)("id",e)("placeholder",n.humanReadableType)("formControlName",e)("step",n.getStep(n.type,n.configForm.getValue(e))),i.yb(1),i.pc("ngIf",n.configForm.showError(e,t,"pattern")),i.yb(1),i.pc("ngIf",n.configForm.showError(e,t,"invalidUuid")),i.yb(1),i.pc("ngIf",n.configForm.showError(e,t,"max")),i.yb(1),i.pc("ngIf",n.configForm.showError(e,t,"min"))}}function pi(e,t){if(1&e&&(i.Qb(0),i.Mc(1,ci,11,6,"div",13),i.Mc(2,fi,9,11,"div",13),i.Pb()),2&e){const e=i.ic(2);i.yb(1),i.pc("ngIf","bool"===e.type),i.yb(1),i.pc("ngIf","bool"!==e.type)}}function mi(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",1),i.Sb(1,"form",2,3),i.Sb(3,"div",4),i.Sb(4,"div",5),i.Qb(5,6),i.Oc(6,"Edit"),i.Pb(),i.Oc(7),i.Rb(),i.Sb(8,"div",7),i.Sb(9,"div",8),i.Sb(10,"label",9),i.Wb(11,10),i.Rb(),i.Sb(12,"div",11),i.Nb(13,"input",12),i.Rb(),i.Rb(),i.Mc(14,ni,6,0,"div",13),i.Mc(15,ii,6,0,"div",13),i.Mc(16,ri,5,0,"div",13),i.Mc(17,si,5,0,"div",13),i.Mc(18,ai,5,1,"div",13),i.Sb(19,"div",14),i.Sb(20,"h3",15),i.Wb(21,16),i.Rb(),i.Mc(22,pi,3,2,"ng-container",17),i.Rb(),i.Rb(),i.Sb(23,"div",18),i.Sb(24,"cd-form-button-panel",19),i.gc("submitActionEvent",(function(){return i.Dc(e),i.ic().submit()})),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.ic();i.yb(1),i.pc("formGroup",e.configForm),i.yb(6),i.Qc(" ",e.configForm.getValue("name")," "),i.yb(7),i.pc("ngIf",e.configForm.getValue("desc")),i.yb(1),i.pc("ngIf",e.configForm.getValue("long_desc")),i.yb(1),i.pc("ngIf",""!==e.configForm.getValue("default")),i.yb(1),i.pc("ngIf",""!==e.configForm.getValue("daemon_default")),i.yb(1),i.pc("ngIf",e.configForm.getValue("services").length>0),i.yb(4),i.pc("ngForOf",e.availSections),i.yb(2),i.pc("form",e.configForm)("submitText",e.actionLabels.UPDATE)}}let bi=(()=>{class e extends Gn.a{constructor(e,t,n,i,r){super(),this.actionLabels=e,this.route=t,this.router=n,this.configService=i,this.notificationService=r,this.availSections=["global","mon","mgr","osd","mds","client"],this.createForm()}createForm(){const e={name:new xn.h({value:null}),desc:new xn.h({value:null}),long_desc:new xn.h({value:null}),values:new xn.j({}),default:new xn.h({value:null}),daemon_default:new xn.h({value:null}),services:new xn.h([])};this.availSections.forEach(t=>{e.values.addControl(t,new xn.h(null))}),this.configForm=new Jn.a(e)}ngOnInit(){this.route.params.subscribe(e=>{this.configService.get(e.name).subscribe(e=>{this.setResponse(e),this.loadingReady()})})}getValidators(e){const t=qn.getTypeValidators(e);if(t)return this.patternHelpText=t.patternHelpText,"max"in t&&""!==t.max&&(this.maxValue=t.max),"min"in t&&""!==t.min&&(this.minValue=t.min),t.validators}getStep(e,t){return qn.getTypeStep(e,t)}setResponse(e){this.response=e;const t=this.getValidators(e);this.configForm.get("name").setValue(e.name),this.configForm.get("desc").setValue(e.desc),this.configForm.get("long_desc").setValue(e.long_desc),this.configForm.get("default").setValue(e.default),this.configForm.get("daemon_default").setValue(e.daemon_default),this.configForm.get("services").setValue(e.services),this.response.value&&this.response.value.forEach(e=>{let t=null;t="true"===e.value||"false"!==e.value&&e.value,this.configForm.get("values").get(e.section).setValue(t)}),this.availSections.forEach(e=>{this.configForm.get("values").get(e).setValidators(t)});const n=qn.getType(e.type);this.type=n.name,this.inputType=n.inputType,this.humanReadableType=n.humanReadable}createRequest(){const e=[];if(this.availSections.forEach(t=>{const n=this.configForm.getValue(t);null!==n&&""!==n&&e.push({section:t,value:n})}),!Nt.a.isEqual(this.response.value,e)){const t=new Qn;return t.name=this.configForm.getValue("name"),t.value=e,t}return null}submit(){const e=this.createRequest();e&&this.configService.create(e).subscribe(()=>{this.notificationService.show(yn.a.success,"Updated config option " + e.name + ""),this.router.navigate(["/configuration"])},()=>{this.configForm.setErrors({cdSubmitButton:!0})}),this.router.navigate(["/configuration"])}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(gn.b),i.Mb(Pt.a),i.Mb(Pt.e),i.Mb(Un.a),i.Mb(wn.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-configuration-form"]],features:[i.vb],decls:1,vars:1,consts:function(){return[["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],["name","configForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"card"],[1,"card-header"],["i18",""],[1,"card-body"],[1,"form-group","row"],[1,"cd-col-form-label"],"Name",[1,"cd-col-form-input"],["type","text","id","name","formControlName","name","readonly","",1,"form-control"],["class","form-group row",4,"ngIf"],["formGroupName","values"],[1,"cd-header"],"Values",[4,"ngFor","ngForOf"],[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],"Description",["id","desc","formControlName","desc","readonly","",1,"form-control","resize-vertical"],"Long description",["id","long_desc","formControlName","long_desc","readonly","",1,"form-control","resize-vertical"],"Default",["type","text","id","default","formControlName","default","readonly","",1,"form-control"],"Daemon default",["type","text","id","daemon_default","formControlName","daemon_default","readonly","",1,"form-control"],"Services",["class","form-component-badge",4,"ngFor","ngForOf"],[1,"form-component-badge"],[1,"badge","badge-dark"],[1,"cd-col-form-label",3,"for"],["id","pool","name","pool",1,"form-control","custom-select",3,"formControlName"],[3,"ngValue"],"-- Default --","true","false",[1,"form-control",3,"type","id","placeholder","formControlName","step"],["class","invalid-feedback",4,"ngIf"],[1,"invalid-feedback"],"The entered value is too high! It must not be greater than " + "\ufffd0\ufffd" + ".","The entered value is too low! It must not be lower than " + "\ufffd0\ufffd" + "."]},template:function(e,t){1&e&&i.Mc(0,mi,25,10,"div",0),2&e&&i.pc("cdFormLoading",t.loading)},directives:[Kn.a,xn.C,xn.r,Zn.a,xn.k,Xn.a,On.a,xn.d,ei.a,xn.q,xn.i,o.r,xn.l,o.q,ti.a,xn.z,xn.u,xn.B],styles:[".form-component-badge[_ngcontent-%COMP%]{display:block;height:34px}.form-component-badge[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-top:7px}.resize-vertical[_ngcontent-%COMP%]{resize:vertical}"]}),e})();var gi=n("iExv");function _i(e,t){if(1&e&&(i.Sb(0,"span"),i.Oc(1),i.Nb(2,"br"),i.Rb()),2&e){const e=t.$implicit,n=t.last;i.yb(1),i.Sc(" ",e.section,": ",e.value,"",n?"":",","")}}function yi(e,t){if(1&e&&(i.Sb(0,"span"),i.Sb(1,"span",23),i.Sb(2,"span",24),i.Oc(3),i.jc(4,"uppercase"),i.Rb(),i.Rb(),i.Rb()),2&e){const e=t.$implicit,n=i.ic(2);i.yb(1),i.qc("title",n.flags[e]),i.yb(2),i.Pc(i.kc(4,2,e))}}function vi(e,t){if(1&e&&(i.Sb(0,"span"),i.Sb(1,"span",24),i.Oc(2),i.Rb(),i.Rb()),2&e){const e=t.$implicit;i.yb(2),i.Pc(e)}}function wi(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"table",1),i.Sb(2,"tbody"),i.Sb(3,"tr"),i.Sb(4,"td",2),i.Wb(5,3),i.Rb(),i.Sb(6,"td",4),i.Oc(7),i.Rb(),i.Rb(),i.Sb(8,"tr"),i.Sb(9,"td",5),i.Wb(10,6),i.Rb(),i.Sb(11,"td"),i.Oc(12),i.Rb(),i.Rb(),i.Sb(13,"tr"),i.Sb(14,"td",5),i.Wb(15,7),i.Rb(),i.Sb(16,"td"),i.Oc(17),i.Rb(),i.Rb(),i.Sb(18,"tr"),i.Sb(19,"td",5),i.Wb(20,8),i.Rb(),i.Sb(21,"td"),i.Mc(22,_i,3,3,"span",9),i.Rb(),i.Rb(),i.Sb(23,"tr"),i.Sb(24,"td",5),i.Wb(25,10),i.Rb(),i.Sb(26,"td"),i.Oc(27),i.Rb(),i.Rb(),i.Sb(28,"tr"),i.Sb(29,"td",5),i.Wb(30,11),i.Rb(),i.Sb(31,"td"),i.Oc(32),i.Rb(),i.Rb(),i.Sb(33,"tr"),i.Sb(34,"td",5),i.Wb(35,12),i.Rb(),i.Sb(36,"td"),i.Oc(37),i.Rb(),i.Rb(),i.Sb(38,"tr"),i.Sb(39,"td",5),i.Wb(40,13),i.Rb(),i.Sb(41,"td"),i.Oc(42),i.Rb(),i.Rb(),i.Sb(43,"tr"),i.Sb(44,"td",5),i.Wb(45,14),i.Rb(),i.Sb(46,"td"),i.Oc(47),i.Rb(),i.Rb(),i.Sb(48,"tr"),i.Sb(49,"td",5),i.Wb(50,15),i.Rb(),i.Sb(51,"td"),i.Mc(52,yi,5,4,"span",9),i.Rb(),i.Rb(),i.Sb(53,"tr"),i.Sb(54,"td",5),i.Wb(55,16),i.Rb(),i.Sb(56,"td"),i.Mc(57,vi,3,1,"span",9),i.Rb(),i.Rb(),i.Sb(58,"tr"),i.Sb(59,"td",5),i.Wb(60,17),i.Rb(),i.Sb(61,"td"),i.Oc(62),i.Rb(),i.Rb(),i.Sb(63,"tr"),i.Sb(64,"td",5),i.Wb(65,18),i.Rb(),i.Sb(66,"td"),i.Oc(67),i.Rb(),i.Rb(),i.Sb(68,"tr"),i.Sb(69,"td",5),i.Wb(70,19),i.Rb(),i.Sb(71,"td"),i.Oc(72),i.jc(73,"booleanText"),i.Rb(),i.Rb(),i.Sb(74,"tr"),i.Sb(75,"td",5),i.Wb(76,20),i.Rb(),i.Sb(77,"td"),i.Oc(78),i.Rb(),i.Rb(),i.Sb(79,"tr"),i.Sb(80,"td",5),i.Wb(81,21),i.Rb(),i.Sb(82,"td"),i.Oc(83),i.Rb(),i.Rb(),i.Sb(84,"tr"),i.Sb(85,"td",5),i.Wb(86,22),i.Rb(),i.Sb(87,"td"),i.Oc(88),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Pb()),2&e){const e=i.ic();i.yb(7),i.Pc(e.selection.name),i.yb(5),i.Pc(e.selection.desc),i.yb(5),i.Pc(e.selection.long_desc),i.yb(5),i.pc("ngForOf",e.selection.value),i.yb(5),i.Pc(e.selection.default),i.yb(5),i.Pc(e.selection.daemon_default),i.yb(5),i.Pc(e.selection.type),i.yb(5),i.Pc(e.selection.min),i.yb(5),i.Pc(e.selection.max),i.yb(5),i.pc("ngForOf",e.selection.flags),i.yb(5),i.pc("ngForOf",e.selection.services),i.yb(5),i.Pc(e.selection.source),i.yb(5),i.Pc(e.selection.level),i.yb(5),i.Pc(i.kc(73,17,e.selection.can_update_at_runtime)),i.yb(6),i.Pc(e.selection.tags),i.yb(5),i.Pc(e.selection.enum_values),i.yb(5),i.Pc(e.selection.see_also)}}let Si=(()=>{class e{constructor(){this.flags={runtime:"The value can be updated at runtime.",no_mon_update:"Daemons/clients do not pull this value from the\n monitor config database. We disallow setting this option via 'ceph config\n set ...'. This option should be configured via ceph.conf or via the\n command line.",startup:"Option takes effect only during daemon startup.",cluster_create:"Option only affects cluster creation.",create:"Option only affects daemon creation."}}ngOnChanges(){this.selection&&(this.selection.services=Nt.a.split(this.selection.services,","))}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-configuration-details"]],inputs:{selection:"selection"},features:[i.wb],decls:1,vars:1,consts:function(){return[[4,"ngIf"],[1,"table","table-striped","table-bordered"],[1,"bold","w-25"],"Name",[1,"w-75"],[1,"bold"],"Description","Long description","Current values",[4,"ngFor","ngForOf"],"Default","Daemon default","Type","Min","Max","Flags","Services","Source","Level","Can be updated at runtime (editable)","Tags","Enum values","See also",[3,"title"],[1,"badge","badge-dark","mr-2"]]},template:function(e,t){1&e&&i.Mc(0,wi,89,19,"ng-container",0),2&e&&i.pc("ngIf",t.selection)},directives:[o.r,o.q],pipes:[gi.a,o.C],styles:[""]}),e})();const Mi=["confValTpl"],xi=["confFlagTpl"];function ki(e,t){if(1&e&&(i.Sb(0,"span"),i.Oc(1),i.Nb(2,"br"),i.Rb()),2&e){const e=t.$implicit,n=t.last;i.yb(1),i.Sc(" ",e.section,": ",e.value,"",n?"":",","")}}function Di(e,t){if(1&e&&(i.Sb(0,"span"),i.Mc(1,ki,3,3,"span",5),i.Rb()),2&e){const e=i.ic().value;i.yb(1),i.pc("ngForOf",e)}}function Ti(e,t){1&e&&i.Mc(0,Di,2,1,"span",4),2&e&&i.pc("ngIf",t.value)}let Ci=(()=>{class e extends $t.a{constructor(e,t,n){super(),this.authStorageService=e,this.configurationService=t,this.actionLabels=n,this.data=[],this.icons=_n.a,this.selection=new Wt.a,this.filters=[{name:"Level",prop:"level",filterOptions:["basic","advanced","dev"],filterInitValue:"basic",filterPredicate:(e,t)=>{let n;return function(e){e[e.basic=0]="basic",e[e.advanced=1]="advanced",e[e.dev=2]="dev"}(n||(n={})),n[e.level]<=n[t]}},{name:"Service",prop:"services",filterOptions:["mon","mgr","osd","mds","common","mds_client","rgw"],filterPredicate:(e,t)=>e.services.includes(t)},{name:"Source",prop:"source",filterOptions:["mon"],filterPredicate:(e,t)=>!!e.hasOwnProperty("source")&&e.source.includes(t)},{name:"Modified",prop:"modified",filterOptions:["yes","no"],filterPredicate:(e,t)=>!("yes"!==t||!e.hasOwnProperty("value"))||"no"===t&&!e.hasOwnProperty("value")}],this.permission=this.authStorageService.getPermissions().configOpt;const i=()=>this.selection.first()&&""+encodeURIComponent(this.selection.first().name);this.tableActions=[{permission:"update",icon:_n.a.edit,routerLink:()=>"/configuration/edit/"+i(),name:this.actionLabels.EDIT,disable:()=>!this.isEditable(this.selection)}]}ngOnInit(){this.columns=[{canAutoResize:!0,prop:"name",name:"Name"},{prop:"desc",name:"Description",cellClass:"wrap"},{prop:"value",name:"Current value",cellClass:"wrap",cellTemplate:this.confValTpl},{prop:"default",name:"Default",cellClass:"wrap"},{prop:"can_update_at_runtime",name:"Editable",cellTransformation:Ht.a.checkIcon,flexGrow:.4,cellClass:"text-center"}]}updateSelection(e){this.selection=e}getConfigurationList(e){this.configurationService.getConfigData().subscribe(e=>{this.data=e},()=>{e.error()})}isEditable(e){return 1===e.selected.length&&e.selected[0].can_update_at_runtime}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Jt.a),i.Mb(Un.a),i.Mb(gn.b))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-configuration"]],viewQuery:function(e,t){var n;1&e&&(i.Jc(Mi,!0),i.Tc(xi,!0)),2&e&&(i.zc(n=i.hc())&&(t.confValTpl=n.first),i.zc(n=i.hc())&&(t.confFlagTpl=n.first))},features:[i.vb],decls:5,vars:8,consts:[["selectionType","single",3,"data","columns","extraFilterableColumns","hasDetails","fetchData","setExpandedRow","updateSelection"],[1,"table-actions",3,"permission","selection","tableActions"],["cdTableDetail","",3,"selection"],["confValTpl",""],[4,"ngIf"],[4,"ngFor","ngForOf"]],template:function(e,t){1&e&&(i.Sb(0,"cd-table",0),i.gc("fetchData",(function(e){return t.getConfigurationList(e)}))("setExpandedRow",(function(e){return t.setExpandedRow(e)}))("updateSelection",(function(e){return t.updateSelection(e)})),i.Nb(1,"cd-table-actions",1),i.Nb(2,"cd-configuration-details",2),i.Rb(),i.Mc(3,Ti,1,1,"ng-template",null,3,i.Nc)),2&e&&(i.pc("data",t.data)("columns",t.columns)("extraFilterableColumns",t.filters)("hasDetails",!0),i.yb(1),i.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions),i.yb(1),i.pc("selection",t.expandedRow))},directives:[Bt.a,Sn.a,Si,o.r,o.q],styles:[".filter[_ngcontent-%COMP%]{padding-right:8px}.fa-stack[_ngcontent-%COMP%]{font-size:.79rem}.fa-stack[_ngcontent-%COMP%] .fa-stack-1x[_ngcontent-%COMP%]{margin-left:8px;margin-top:5px} cd-configuration datatable-body-cell.wrap{word-break:break-all}"]}),e})();var Oi=n("quSY"),Li=n("st4c"),Ri=n("lOp/");const Ei=["tree"],Ai=function(e,t,n){return[e,t,n]};function Ii(e,t){if(1&e&&i.Nb(0,"i",12),2&e){const e=i.ic();i.pc("ngClass",i.wc(1,Ai,e.icons.large,e.icons.spinner,e.icons.spin))}}const Pi=function(){return["in","up"]},ji=function(){return["down","out","destroyed"]},Ni=function(e,t){return{"badge-success":e,"badge-danger":t}};function Fi(e,t){if(1&e&&(i.Sb(0,"span",15),i.Oc(1),i.Rb()),2&e){const e=i.ic().$implicit;i.pc("ngClass",i.vc(4,Ni,i.tc(2,Pi).includes(e.data.status),i.tc(3,ji).includes(e.data.status))),i.yb(1),i.Qc(" ",e.data.status," ")}}const Yi=function(e){return{"type-osd":e}};function zi(e,t){if(1&e&&(i.Mc(0,Fi,2,7,"span",13),i.Sb(1,"span"),i.Oc(2,"\xa0"),i.Rb(),i.Nb(3,"span",14)),2&e){const e=t.$implicit;i.pc("ngIf",e.data.status),i.yb(3),i.pc("ngClass",i.uc(3,Yi,"osd"===e.data.type))("innerHTML",e.data.name,i.Ec)}}function $i(e,t){if(1&e&&(i.Sb(0,"div",16),i.Sb(1,"legend"),i.Oc(2),i.Rb(),i.Nb(3,"cd-table-key-value",17),i.Rb()),2&e){const e=i.ic();i.yb(2),i.Pc(e.metadataTitle),i.yb(1),i.pc("data",e.metadata)}}let Hi=(()=>{class e{constructor(e,t){this.crushRuleService=e,this.timerService=t,this.sub=new Oi.a,this.icons=_n.a,this.loadingIndicator=!0,this.nodes=[],this.treeOptions={useVirtualScroll:!0,nodeHeight:22,actionMapping:{mouse:{click:this.onNodeSelected.bind(this)}}},this.metadataKeyMap={}}ngOnInit(){this.sub=this.timerService.get(()=>this.crushRuleService.getInfo(),5e3).subscribe(e=>{this.loadingIndicator=!1,this.nodes=this.abstractTreeData(e)})}ngOnDestroy(){this.sub.unsubscribe()}abstractTreeData(e){const t=e.nodes||[],n=e.roots||[],i={};if(0===t.length)return[{name:"No nodes!"}];const r=[];return t.reverse().forEach(e=>{n.includes(e.id)&&r.push(e.id),i[e.id]=this.generateTreeLeaf(e,i)}),r.map(e=>i[e])}generateTreeLeaf(e,t){const n=e.id;this.metadataKeyMap[n]=e;const i=[],r={name:e.name+" ("+e.type+")",status:e.status,cdId:n,type:e.type};return e.children&&(e.children.sort().forEach(e=>{i.push(t[e])}),r.children=i),r}onNodeSelected(e,t){if(kn.a.ACTIVATE(e,t,!0),void 0!==t.data.cdId){const e=this.metadataKeyMap[t.data.cdId],{name:n,type:i}=e,r=Object(Ft.f)(e,["name","type","status"]);this.metadata=r,this.metadataTitle=n+" ("+i+")"}else delete this.metadata,delete this.metadataTitle}onUpdateData(){this.tree.treeModel.expandAll()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Li.a),i.Mb(Ri.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-crushmap"]],viewQuery:function(e,t){var n;1&e&&i.Tc(Ei,!0),2&e&&i.zc(n=i.hc())&&(t.tree=n.first)},decls:14,vars:4,consts:function(){return[[1,"row"],[1,"col-sm-12","col-lg-12"],[1,"card"],[1,"card-header"],"CRUSH map viewer",[1,"card-body"],[1,"col-sm-6","col-lg-6","tree-container"],[3,"ngClass",4,"ngIf"],[3,"nodes","options","updateData"],["tree",""],["treeNodeTemplate",""],["class","col-sm-6 col-lg-6 metadata",4,"ngIf"],[3,"ngClass"],["class","badge",3,"ngClass",4,"ngIf"],[1,"node-name",3,"ngClass","innerHTML"],[1,"badge",3,"ngClass"],[1,"col-sm-6","col-lg-6","metadata"],[3,"data"]]},template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Sb(1,"div",1),i.Sb(2,"div",2),i.Sb(3,"div",3),i.Wb(4,4),i.Rb(),i.Sb(5,"div",5),i.Sb(6,"div",0),i.Sb(7,"div",6),i.Mc(8,Ii,1,5,"i",7),i.Sb(9,"tree-root",8,9),i.gc("updateData",(function(){return t.onUpdateData()})),i.Mc(11,zi,4,5,"ng-template",null,10,i.Nc),i.Rb(),i.Rb(),i.Mc(13,$i,4,2,"div",11),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb()),2&e&&(i.yb(8),i.pc("ngIf",t.loadingIndicator),i.yb(1),i.pc("nodes",t.nodes)("options",t.treeOptions),i.yb(4),i.pc("ngIf",t.metadata))},directives:[o.r,kn.b,o.p,en.a],styles:[".tree-container[_ngcontent-%COMP%]{height:calc(100vh - 200px)}"]}),e})();var Wi=n("LRne"),Vi=n("lJxs"),Bi=n("Kqap"),Ui=n("BFxc"),qi=n("xbPD"),Gi=n("mCNh");function Ji(e,t,n){return 0===n?[t]:(e.push(t),e)}function Qi(){return function(e,t){return arguments.length>=2?function(n){return Object(Gi.a)(Object(Bi.a)(e,t),Object(Ui.a)(1),Object(qi.a)(t))(n)}:function(t){return Object(Gi.a)(Object(Bi.a)((t,n,i)=>e(t,n,i+1)),Object(Ui.a)(1))(t)}}(Ji,[])}var Ki=n("5+tZ");let Zi=(()=>{class e{calculateAdditionalData(e){if(!e.life_expectancy_min||!e.life_expectancy_max)return e.state="unknown",e;const t=e=>!!Number.parseFloat(e),n=(e,n)=>e&&n&&t(e)&&t(n)?nn.a.duration(nn()(e).diff(nn()(n))).asWeeks():null,i=nn.a.duration(nn()(nn.a.now()).diff(nn()(e.life_expectancy_stamp))).asWeeks(),r=n(e.life_expectancy_max,e.life_expectancy_stamp),s=n(e.life_expectancy_min,e.life_expectancy_stamp);return e.state=i>1?"stale":null!==r&&r<=2?"bad":null!==s&&s<=4?"warning":"good",e.life_expectancy_weeks={max:null!==r?Math.round(r):null,min:null!==s?Math.round(s):null},e}readable(e){return e.readableDaemons=e.daemons.join(" "),e}prepareDevice(e){return this.readable(this.calculateAdditionalData(e))}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),Xi=(()=>{class e{constructor(e,t){this.http=e,this.deviceService=t,this.baseURL="api/host",this.baseUIURL="ui-api/host"}list(){return this.http.get(this.baseURL)}create(e,t,n,i){return this.http.post(this.baseURL,{hostname:e,addr:t,labels:n,status:i},{observe:"response",headers:{Accept:"application/vnd.ceph.api.v0.1+json"}})}delete(e){return this.http.delete(`${this.baseURL}/${e}`,{observe:"response"})}getDevices(e){return this.http.get(`${this.baseURL}/${e}/devices`).pipe(Object(Vi.a)(e=>e.map(e=>this.deviceService.prepareDevice(e))))}getSmartData(e){return this.http.get(`${this.baseURL}/${e}/smart`)}getDaemons(e){return this.http.get(`${this.baseURL}/${e}/daemons`)}getLabels(){return this.http.get(this.baseUIURL+"/labels")}update(e,t=!1,n=[],i=!1,r=!1){return this.http.put(`${this.baseURL}/${e}`,{update_labels:t,labels:n,maintenance:i,force:r},{headers:{Accept:"application/vnd.ceph.api.v0.1+json"}})}identifyDevice(e,t,n){return this.http.post(`${this.baseURL}/${e}/identify_device`,{device:t,duration:n})}getInventoryParams(e){let t=new a.e;return e&&(t=t.append("refresh",Nt.a.toString(e))),t}getInventory(e,t){const n=this.getInventoryParams(t);return this.http.get(`${this.baseURL}/${e}/inventory`,{params:n})}inventoryList(e){const t=this.getInventoryParams(e);return this.http.get(this.baseUIURL+"/inventory",{params:t})}inventoryDeviceList(e,t){let n;return n=e?this.getInventory(e,t).pipe(Qi()):this.inventoryList(t),n.pipe(Object(Ki.a)(e=>{const t=Nt.a.flatMap(e,e=>e.devices.map(t=>(t.hostname=e.name,t.uid=t.device_id?t.device_id:`${t.hostname}-${t.path}`,t)));return Object(Wi.a)(t)}))}}return e.\u0275fac=function(t){return new(t||e)(i.dc(a.b),i.dc(Zi))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var er=n("DNAf"),tr=n("kvvV"),nr=n("kn/O"),ir=n("IZUe"),rr=n("ppaS"),sr=n("8xTl");function or(e,t){1&e&&(i.Sb(0,"span",27),i.Wb(1,28),i.Rb())}function ar(e,t){1&e&&(i.Sb(0,"span",27),i.Wb(1,29),i.Rb())}function cr(e,t){1&e&&(i.Sb(0,"span",27),i.Wb(1,30),i.Rb())}function lr(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",1),i.Sb(1,"form",2,3),i.Sb(3,"div",4),i.Sb(4,"div",5),i.Wb(5,6),i.jc(6,"titlecase"),i.jc(7,"upperFirst"),i.Rb(),i.Sb(8,"div",7),i.Sb(9,"div",8),i.Sb(10,"label",9),i.Wb(11,10),i.Rb(),i.Sb(12,"div",11),i.Nb(13,"input",12),i.Mc(14,or,2,0,"span",13),i.Mc(15,ar,2,0,"span",13),i.Rb(),i.Rb(),i.Sb(16,"div",8),i.Sb(17,"label",14),i.Wb(18,15),i.Rb(),i.Sb(19,"div",11),i.Nb(20,"input",16),i.Mc(21,cr,2,0,"span",13),i.Rb(),i.Rb(),i.Sb(22,"div",8),i.Sb(23,"label",17),i.Wb(24,18),i.Rb(),i.Sb(25,"div",11),i.Nb(26,"cd-select-badges",19),i.Rb(),i.Rb(),i.Sb(27,"div",8),i.Sb(28,"div",20),i.Sb(29,"div",21),i.Nb(30,"input",22),i.Sb(31,"label",23),i.Wb(32,24),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Sb(33,"div",25),i.Sb(34,"cd-form-button-panel",26),i.gc("submitActionEvent",(function(){return i.Dc(e),i.ic().submit()})),i.jc(35,"titlecase"),i.jc(36,"upperFirst"),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.Ac(2),t=i.ic();i.yb(1),i.pc("formGroup",t.hostForm),i.yb(6),i.ac(i.kc(6,11,t.action))(i.kc(7,13,t.resource)),i.Xb(5),i.yb(7),i.pc("ngIf",t.hostForm.showError("hostname",e,"required")),i.yb(1),i.pc("ngIf",t.hostForm.showError("hostname",e,"uniqueName")),i.yb(6),i.pc("ngIf",t.hostForm.showError("addr",e,"pattern")),i.yb(5),i.pc("data",t.hostForm.controls.labels.value)("customBadges",!0)("messages",t.messages),i.yb(8),i.pc("form",t.hostForm)("submitText",i.kc(35,15,t.action)+" "+i.kc(36,17,t.resource))}}let ur=(()=>{class e extends Gn.a{constructor(e,t,n,i){super(),this.router=e,this.actionLabels=t,this.hostService=n,this.taskWrapper=i,this.messages=new er.a({empty:"There are no labels.",filter:"Filter or add labels",add:"Add label"}),this.resource="host",this.action=this.actionLabels.CREATE,this.createForm()}ngOnInit(){this.hostService.list().subscribe(e=>{this.hostnames=e.map(e=>e.hostname),this.loadingReady()})}createForm(){this.hostForm=new Jn.a({hostname:new xn.h("",{validators:[xn.A.required,Cn.a.custom("uniqueName",e=>this.hostnames&&-1!==this.hostnames.indexOf(e))]}),addr:new xn.h("",{validators:[Cn.a.ip()]}),labels:new xn.h([]),maintenance:new xn.h(!1)})}submit(){const e=this.hostForm.get("hostname").value;this.addr=this.hostForm.get("addr").value,this.status=this.hostForm.get("maintenance").value?"maintenance":"",this.allLabels=this.hostForm.get("labels").value,this.taskWrapper.wrapTaskAroundCall({task:new tr.a("host/"+gn.e.CREATE,{hostname:e}),call:this.hostService.create(e,this.addr,this.allLabels,this.status)}).subscribe({error:()=>{this.hostForm.setErrors({cdSubmitButton:!0})},complete:()=>{this.router.navigate(["/hosts"])}})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Pt.e),i.Mb(gn.b),i.Mb(Xi),i.Mb(nr.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-host-form"]],features:[i.vb],decls:1,vars:1,consts:function(){return[["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],["name","hostForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"card"],[1,"card-header"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"card-body"],[1,"form-group","row"],["for","hostname",1,"cd-col-form-label","required"],"Hostname",[1,"cd-col-form-input"],["type","text","placeholder","mon-123","id","hostname","name","hostname","formControlName","hostname","autofocus","",1,"form-control"],["class","invalid-feedback",4,"ngIf"],["for","addr",1,"cd-col-form-label"],"Nework address",["type","text","placeholder","192.168.0.1","id","addr","name","addr","formControlName","addr",1,"form-control"],["for","labels",1,"cd-col-form-label"],"Labels",["id","labels",3,"data","customBadges","messages"],[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["id","maintenance","type","checkbox","formControlName","maintenance",1,"custom-control-input"],["for","maintenance",1,"custom-control-label"],"Maintenance Mode",[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required.","The chosen hostname is already in use.","The value is not a valid IP address."]},template:function(e,t){1&e&&i.Mc(0,lr,37,19,"div",0),2&e&&i.pc("cdFormLoading",t.loading)},directives:[Kn.a,xn.C,xn.r,Zn.a,xn.k,Xn.a,On.a,xn.d,ei.a,xn.q,xn.i,ir.a,o.r,rr.a,xn.b,ti.a],pipes:[o.A,sr.a],styles:[""]}),e})(),dr=(()=>{class e{constructor(e){this.http=e,this.url="api/orchestrator",this.disableMessages={noOrchestrator:"The feature is disabled because Orchestrator is not available.",missingFeature:"The Orchestrator backend doesn't support this feature."}}status(){return this.http.get(this.url+"/status")}hasFeature(e,t){return Nt.a.every(t,t=>Nt.a.get(e.features,t+".available"))}getTableActionDisableDesc(e,t){return!!e&&(e.available?!this.hasFeature(e,t)&&this.disableMessages.missingFeature:this.disableMessages.noOrchestrator)}}return e.\u0275fac=function(t){return new(t||e)(i.dc(a.b))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var hr=function(e){return e.HOST_LIST="get_hosts",e.HOST_CREATE="add_host",e.HOST_DELETE="remove_host",e.HOST_LABEL_ADD="add_host_label",e.HOST_LABEL_REMOVE="remove_host_label",e.HOST_MAINTENANCE_ENTER="enter_host_maintenance",e.HOST_MAINTENANCE_EXIT="exit_host_maintenance",e.SERVICE_LIST="describe_service",e.SERVICE_CREATE="apply",e.SERVICE_DELETE="remove_service",e.SERVICE_RELOAD="service_action",e.DAEMON_LIST="list_daemons",e.OSD_GET_REMOVE_STATUS="remove_osds_status",e.OSD_CREATE="apply_drivegroups",e.OSD_DELETE="remove_osds",e.DEVICE_LIST="get_inventory",e.DEVICE_BLINK_LIGHT="blink_device_light",e}({}),fr=n("85J/"),pr=n("EgGo");n("jKX/");let mr=(()=>{class e{constructor(e,t){this.http=e,this.deviceService=t,this.path="api/osd",this.osdRecvSpeedModalPriorities={KNOWN_PRIORITIES:[{name:null,text:"-- Select the priority --",values:{osd_max_backfills:null,osd_recovery_max_active:null,osd_recovery_max_single_start:null,osd_recovery_sleep:null}},{name:"low",text:"Low",values:{osd_max_backfills:1,osd_recovery_max_active:1,osd_recovery_max_single_start:1,osd_recovery_sleep:.5}},{name:"default",text:"Default",values:{osd_max_backfills:1,osd_recovery_max_active:3,osd_recovery_max_single_start:1,osd_recovery_sleep:0}},{name:"high",text:"High",values:{osd_max_backfills:4,osd_recovery_max_active:4,osd_recovery_max_single_start:4,osd_recovery_sleep:0}}]}}create(e){const t={method:"drive_groups",data:e,tracking_id:Nt.a.join(Nt.a.map(e,"service_id"),", ")};return this.http.post(this.path,t,{observe:"response"})}getList(){return this.http.get(""+this.path)}getDetails(e){return this.http.get(`${this.path}/${e}`)}getSmartData(e){return this.http.get(`${this.path}/${e}/smart`)}scrub(e,t){return this.http.post(`${this.path}/${e}/scrub?deep=${t}`,null)}getFlags(){return this.http.get(this.path+"/flags")}updateFlags(e){return this.http.put(this.path+"/flags",{flags:e})}updateIndividualFlags(e,t){return this.http.put(this.path+"/flags/individual",{flags:e,ids:t})}markOut(e){return this.http.put(`${this.path}/${e}/mark`,{action:"out"})}markIn(e){return this.http.put(`${this.path}/${e}/mark`,{action:"in"})}markDown(e){return this.http.put(`${this.path}/${e}/mark`,{action:"down"})}reweight(e,t){return this.http.post(`${this.path}/${e}/reweight`,{weight:t})}update(e,t){return this.http.put(`${this.path}/${e}`,{device_class:t})}markLost(e){return this.http.put(`${this.path}/${e}/mark`,{action:"lost"})}purge(e){return this.http.post(`${this.path}/${e}/purge`,null)}destroy(e){return this.http.post(`${this.path}/${e}/destroy`,null)}delete(e,t,n){return this.http.delete(`${this.path}/${e}`,{observe:"response",params:{preserve_id:t?"true":"false",force:n?"true":"false"}})}safeToDestroy(e){return this.http.get(`${this.path}/safe_to_destroy?ids=${e}`)}safeToDelete(e){return this.http.get(`${this.path}/safe_to_delete?svc_ids=${e}`)}getDevices(e){return this.http.get(`${this.path}/${e}/devices`).pipe(Object(Vi.a)(e=>e.map(e=>this.deviceService.prepareDevice(e))))}}return e.\u0275fac=function(t){return new(t||e)(i.dc(a.b),i.dc(Zi))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var br=n("/NlG");const gr=["deviceLocation"],_r=["lifeExpectancy"],yr=["lifeExpectancyTimestamp"];function vr(e,t){if(1&e&&i.Nb(0,"cd-table",5),2&e){const e=i.ic();i.pc("data",e.devices)("columns",e.columns)}}function wr(e,t){1&e&&(i.Sb(0,"cd-alert-panel",6),i.Wb(1,7),i.Rb())}function Sr(e,t){if(1&e&&(i.Sb(0,"span"),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.yb(1),i.Pc(e.dev)}}function Mr(e,t){1&e&&i.Mc(0,Sr,2,1,"span",8),2&e&&i.pc("ngForOf",t.value)}function xr(e,t){if(1&e&&(i.Sb(0,"span"),i.Oc(1),i.jc(2,"i18nPlural"),i.Rb()),2&e){const e=i.ic().value,t=i.ic();i.yb(1),i.Qc("> ",i.lc(2,1,e.min,t.translationMapping),"")}}function kr(e,t){if(1&e&&(i.Sb(0,"span"),i.Oc(1),i.jc(2,"i18nPlural"),i.Rb()),2&e){const e=i.ic().value,t=i.ic();i.yb(1),i.Qc("< ",i.lc(2,1,e.max,t.translationMapping),"")}}function Dr(e,t){if(1&e&&(i.Sb(0,"span"),i.Oc(1),i.jc(2,"i18nPlural"),i.Rb()),2&e){const e=i.ic().value,t=i.ic();i.yb(1),i.Rc("",e.min," to ",i.lc(2,2,e.max,t.translationMapping),"")}}function Tr(e,t){if(1&e&&(i.Mc(0,xr,3,4,"span",9),i.Mc(1,kr,3,4,"span",9),i.Mc(2,Dr,3,5,"span",9)),2&e){const e=t.value;i.pc("ngIf",e.min&&!e.max),i.yb(1),i.pc("ngIf",e.max&&!e.min),i.yb(1),i.pc("ngIf",e.max&&e.min)}}function Cr(e,t){1&e&&i.Oc(0),2&e&&i.Qc(" ",t.value,"\n")}let Or=(()=>{class e{constructor(e,t,n){this.hostService=e,this.datePipe=t,this.osdService=n,this.hostname="",this.osdId=null,this.devices=null,this.columns=[],this.translationMapping={"=1":"# week",other:"# weeks"}}ngOnInit(){this.columns=[{prop:"devid",name:"Device ID",minWidth:200},{prop:"state",name:"State of Health",flexGrow:1,cellTransformation:Ht.a.badge,customTemplateConfig:{map:{good:{value:"Good",class:"badge-success"},warning:{value:"Warning",class:"badge-warning"},bad:{value:"Bad",class:"badge-danger"},stale:{value:"Stale",class:"badge-info"},unknown:{value:"Unknown",class:"badge-dark"}}}},{prop:"life_expectancy_weeks",name:"Life Expectancy",cellTemplate:this.lifeExpectancyTemplate},{prop:"life_expectancy_stamp",name:"Prediction Creation Date",cellTemplate:this.lifeExpectancyTimestampTemplate,pipe:this.datePipe,isHidden:!0},{prop:"location",name:"Device Name",cellTemplate:this.locationTemplate},{prop:"readableDaemons",name:"Daemons"}]}ngOnChanges(){const e=e=>this.devices=e;this.hostname?this.hostService.getDevices(this.hostname).subscribe(e):null!==this.osdId&&this.osdService.getDevices(this.osdId).subscribe(e)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Xi),i.Mb(o.e),i.Mb(mr))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-device-list"]],viewQuery:function(e,t){var n;1&e&&(i.Jc(gr,!0),i.Jc(_r,!0),i.Jc(yr,!0)),2&e&&(i.zc(n=i.hc())&&(t.locationTemplate=n.first),i.zc(n=i.hc())&&(t.lifeExpectancyTemplate=n.first),i.zc(n=i.hc())&&(t.lifeExpectancyTimestampTemplate=n.first))},inputs:{hostname:"hostname",osdId:"osdId"},features:[i.wb],decls:8,vars:2,consts:function(){return[[3,"data","columns",4,"ngIf"],["type","warning",4,"ngIf"],["deviceLocation",""],["lifeExpectancy",""],["lifeExpectancyTimestamp",""],[3,"data","columns"],["type","warning"],"Neither hostname nor OSD ID given",[4,"ngFor","ngForOf"],[4,"ngIf"]]},template:function(e,t){1&e&&(i.Mc(0,vr,1,2,"cd-table",0),i.Mc(1,wr,2,0,"cd-alert-panel",1),i.Mc(2,Mr,1,1,"ng-template",null,2,i.Nc),i.Mc(4,Tr,3,3,"ng-template",null,3,i.Nc),i.Mc(6,Cr,1,1,"ng-template",null,4,i.Nc)),2&e&&(i.pc("ngIf",t.hostname||null!==t.osdId),i.yb(1),i.pc("ngIf",""===t.hostname&&null===t.osdId))},directives:[o.r,Bt.a,br.a,o.q],pipes:[o.i],styles:[""]}),e})();var Lr=n("6qls");function Rr(e,t){1&e&&(i.Sb(0,"cd-alert-panel",2),i.Wb(1,3),i.Rb())}function Er(e,t){1&e&&(i.Sb(0,"cd-alert-panel",2),i.cc(1,4),i.Nb(2,"cd-doc",5),i.Zb(),i.Rb())}let Ar=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-orchestrator-doc-panel"]],inputs:{missingFeatures:"missingFeatures"},decls:3,vars:2,consts:function(){return[["type","info",4,"ngIf","ngIfElse"],["elseBlock",""],["type","info"],"The feature is not supported in the current Orchestrator.","Orchestrator is not available. Please consult the " + "\ufffd#2\ufffd" + "" + "\ufffd/#2\ufffd" + " on how to configure and enable the functionality.",["section","orch"]]},template:function(e,t){if(1&e&&(i.Mc(0,Rr,2,0,"cd-alert-panel",0),i.Mc(1,Er,3,0,"ng-template",null,1,i.Nc)),2&e){const e=i.Ac(2);i.pc("ngIf",t.missingFeatures)("ngIfElse",e)}},directives:[o.r,br.a,Lr.a],styles:[""]}),e})(),Ir=(()=>{class e{constructor(e,t,n,r,s,o){this.authStorageService=e,this.dimlessBinary=t,this.modalService=n,this.notificationService=r,this.orchService=s,this.hostService=o,this.devices=[],this.hiddenColumns=[],this.filterColumns=["hostname","human_readable_type","available","sys_api.vendor","sys_api.model","sys_api.size"],this.selectionType=void 0,this.filterChange=new i.o,this.fetchInventory=new i.o,this.icons=_n.a,this.columns=[],this.selection=new Wt.a,this.orchStatus=void 0,this.actionOrchFeatures={identify:[hr.DEVICE_BLINK_LIGHT]}}ngOnInit(){this.permission=this.authStorageService.getPermissions().osd,this.tableActions=[{permission:"update",icon:_n.a.show,click:()=>this.identifyDevice(),name:"Identify",disable:e=>this.getDisable("identify",e),canBePrimary:e=>!e.hasSingleSelection,visible:()=>Nt.a.isString(this.selectionType)}];const e=[{name:"Hostname",prop:"hostname",flexGrow:1},{name:"Device path",prop:"path",flexGrow:1},{name:"Type",prop:"human_readable_type",flexGrow:1,cellTransformation:Ht.a.badge,customTemplateConfig:{map:{hdd:{value:"HDD",class:"badge-hdd"},ssd:{value:"SSD",class:"badge-ssd"}}}},{name:"Available",prop:"available",flexGrow:1,cellClass:"text-center",cellTransformation:Ht.a.checkIcon},{name:"Vendor",prop:"sys_api.vendor",flexGrow:1},{name:"Model",prop:"sys_api.model",flexGrow:1},{name:"Size",prop:"sys_api.size",flexGrow:1,pipe:this.dimlessBinary},{name:"OSDs",prop:"osd_ids",flexGrow:1,cellTransformation:Ht.a.badge,customTemplateConfig:{class:"badge-dark",prefix:"osd."}}];this.columns=e.filter(e=>!this.hiddenColumns.includes(e.prop)),Nt.a.forEach(this.filterColumns,e=>{const t=Nt.a.find(this.columns,{prop:e});t&&(t.filterable=!0)}),this.fetchInventory.observers.length>0&&(this.fetchInventorySub=this.table.fetchData.subscribe(()=>{this.fetchInventory.emit()}))}ngOnDestroy(){this.fetchInventorySub&&this.fetchInventorySub.unsubscribe()}onColumnFiltersChanged(e){this.filterChange.emit(e)}getDisable(e,t){return!t.hasSingleSelection||this.orchService.getTableActionDisableDesc(this.orchStatus,this.actionOrchFeatures[e])}updateSelection(e){this.selection=e}identifyDevice(){const e=this.selection.first(),t=e.hostname,n=e.path||e.device_id;this.modalService.show(Tn.a,{titleText:"Identify device " + n + "",message:"Please enter the duration how long to blink the LED.",fields:[{type:"select",name:"duration",value:300,required:!0,typeConfig:{options:[{text:"1 minute",value:60},{text:"2 minutes",value:120},{text:"5 minutes",value:300},{text:"10 minutes",value:600},{text:"15 minutes",value:900}]}}],submitButtonText:"Execute",onSubmit:e=>{this.hostService.identifyDevice(t,n,e.duration).subscribe(()=>{this.notificationService.show(yn.a.success,"Identifying '" + n + "' started on host '" + t + "'")})}})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Jt.a),i.Mb(Zt.a),i.Mb(vn.a),i.Mb(wn.a),i.Mb(dr),i.Mb(Xi))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-inventory-devices"]],viewQuery:function(e,t){var n;1&e&&i.Jc(Bt.a,!0),2&e&&i.zc(n=i.hc())&&(t.table=n.first)},inputs:{devices:"devices",hiddenColumns:"hiddenColumns",filterColumns:"filterColumns",selectionType:"selectionType",orchStatus:"orchStatus"},outputs:{filterChange:"filterChange",fetchInventory:"fetchInventory"},decls:2,vars:9,consts:[["identifier","uid","columnMode","flex",3,"data","columns","forceIdentifier","selectionType","autoReload","searchField","updateSelection","columnFiltersChanged"],[1,"table-actions",3,"permission","selection","tableActions"]],template:function(e,t){1&e&&(i.Sb(0,"cd-table",0),i.gc("updateSelection",(function(e){return t.updateSelection(e)}))("columnFiltersChanged",(function(e){return t.onColumnFiltersChanged(e)})),i.Nb(1,"cd-table-actions",1),i.Rb()),2&e&&(i.pc("data",t.devices)("columns",t.columns)("forceIdentifier",!0)("selectionType",t.selectionType)("autoReload",!1)("searchField",!1),i.yb(1),i.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions))},directives:[Bt.a,Sn.a],styles:[".filter[_ngcontent-%COMP%]{padding-right:8px}.fa-stack[_ngcontent-%COMP%]{font-size:.79rem}.fa-stack[_ngcontent-%COMP%] .fa-stack-1x[_ngcontent-%COMP%]{margin-left:8px;margin-top:5px}"]}),e})();function Pr(e,t){1&e&&i.Nb(0,"cd-orchestrator-doc-panel")}const jr=function(){return[]},Nr=function(){return["hostname"]};function Fr(e,t){if(1&e){const e=i.Tb();i.Qb(0),i.Sb(1,"legend"),i.Wb(2,1),i.Rb(),i.Sb(3,"div",2),i.Sb(4,"div",3),i.Sb(5,"cd-inventory-devices",4),i.gc("fetchInventory",(function(){return i.Dc(e),i.ic().refresh()})),i.Rb(),i.Rb(),i.Rb(),i.Pb()}if(2&e){const e=i.ic();i.yb(5),i.pc("devices",e.devices)("hiddenColumns",void 0===e.hostname?i.tc(3,jr):i.tc(4,Nr))("orchStatus",e.orchStatus)}}let Yr=(()=>{class e{constructor(e,t,n){this.orchService=e,this.hostService=t,this.ngZone=n,this.reloadInterval=5e3,this.firstRefresh=!0,this.icons=_n.a,this.showDocPanel=!1,this.devices=[]}ngOnInit(){this.orchService.status().subscribe(e=>{this.orchStatus=e,this.showDocPanel=!e.available,e.available&&this.ngZone.runOutsideAngular(()=>{this.reloadSubscriber=Object(Ut.a)(this.reloadInterval,this.reloadInterval).subscribe(()=>{this.ngZone.run(()=>{this.getInventory(!1)})})})})}ngOnDestroy(){var e;null===(e=this.reloadSubscriber)||void 0===e||e.unsubscribe()}ngOnChanges(){var e;(null===(e=this.orchStatus)||void 0===e?void 0:e.available)&&(this.devices=[],this.getInventory(!1))}getInventory(e){""!==this.hostname&&this.hostService.inventoryDeviceList(this.hostname,e).subscribe(e=>{this.devices=e},()=>{this.devices=[]})}refresh(){this.getInventory(!this.firstRefresh),this.firstRefresh=!1}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(dr),i.Mb(Xi),i.Mb(i.A))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-inventory"]],inputs:{hostname:"hostname"},features:[i.wb],decls:2,vars:2,consts:function(){return[[4,"ngIf"],"Physical Disks",[1,"row"],[1,"col-md-12"],["selectionType","single",3,"devices","hiddenColumns","orchStatus","fetchInventory"]]},template:function(e,t){1&e&&(i.Mc(0,Pr,1,0,"cd-orchestrator-doc-panel",0),i.Mc(1,Fr,6,5,"ng-container",0)),2&e&&(i.pc("ngIf",t.showDocPanel),i.yb(1),i.pc("ngIf",null==t.orchStatus?null:t.orchStatus.available))},directives:[o.r,Ar,Ir],styles:[""]}),e})(),zr=(()=>{class e{constructor(e){this.http=e,this.url="api/service"}list(e){const t=e?{params:(new a.e).set("service_name",e)}:{};return this.http.get(this.url,t)}getDaemons(e){return this.http.get(`${this.url}/${e}/daemons`)}create(e){return this.http.post(this.url,{service_name:e.service_id?`${e.service_type}.${e.service_id}`:e.service_type,service_spec:e},{observe:"response"})}delete(e){return this.http.delete(`${this.url}/${e}`,{observe:"response"})}getKnownTypes(){return this.http.get(this.url+"/known_types")}}return e.\u0275fac=function(t){return new(t||e)(i.dc(a.b))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var $r=n("Dwqy"),Hr=n("zWsK");const Wr=["statusTpl"],Vr=["listTpl"],Br=["daemonsTable"];function Ur(e,t){1&e&&i.Nb(0,"cd-orchestrator-doc-panel")}function qr(e,t){if(1&e){const e=i.Tb();i.Sb(0,"cd-table",6,7),i.gc("fetchData",(function(t){return i.Dc(e),i.ic(2).getDaemons(t)})),i.Rb()}if(2&e){const e=i.ic(2);i.pc("data",e.daemons)("columns",e.columns)}}function Gr(e,t){if(1&e&&(i.Sb(0,"div"),i.Mc(1,qr,2,2,"cd-table",5),i.Rb()),2&e){const e=i.ic();i.yb(1),i.pc("ngIf",e.hasOrchestrator)}}function Jr(e,t){if(1&e){const e=i.Tb();i.Sb(0,"cd-table",6,7),i.gc("fetchData",(function(t){return i.Dc(e),i.ic(3).getDaemons(t)})),i.Rb()}if(2&e){const e=i.ic(3);i.pc("data",e.daemons)("columns",e.columns)}}function Qr(e,t){if(1&e&&i.Mc(0,Jr,2,2,"cd-table",5),2&e){const e=i.ic(2);i.pc("ngIf",e.hasOrchestrator)}}function Kr(e,t){if(1&e){const e=i.Tb();i.Sb(0,"cd-table",6,17),i.gc("fetchData",(function(t){return i.Dc(e),i.ic(3).getServices(t)})),i.Rb()}if(2&e){const e=i.ic(3);i.pc("data",e.services)("columns",e.serviceColumns)}}function Zr(e,t){if(1&e&&i.Mc(0,Kr,2,2,"cd-table",5),2&e){const e=i.ic(2);i.pc("ngIf",e.hasOrchestrator)}}function Xr(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"ul",8,9),i.Sb(3,"li",10),i.Sb(4,"a",11),i.Wb(5,12),i.Rb(),i.Mc(6,Qr,1,1,"ng-template",13),i.Rb(),i.Sb(7,"li",14),i.Sb(8,"a",11),i.Wb(9,15),i.Rb(),i.Mc(10,Zr,1,1,"ng-template",13),i.Rb(),i.Rb(),i.Nb(11,"div",16),i.Pb()),2&e){const e=i.Ac(2);i.yb(11),i.pc("ngbNavOutlet",e)}}function es(e,t){if(1&e&&(i.Sb(0,"span",18),i.jc(1,"pipeFunction"),i.Oc(2),i.Rb()),2&e){const e=t.row,n=i.ic();i.pc("ngClass",i.lc(1,2,e,n.getStatusClass)),i.yb(2),i.Qc(" ",e.status_desc," ")}}function ts(e,t){1&e&&(i.Sb(0,"div"),i.Sb(1,"span"),i.Oc(2,"No data available"),i.Rb(),i.Rb())}const ns=function(e){return[e]};function is(e,t){if(1&e&&(i.Sb(0,"span"),i.Nb(1,"i",23),i.Rb()),2&e){const e=i.ic(4);i.yb(1),i.pc("ngClass",i.uc(1,ns,e.icons.infoCircle))}}function rs(e,t){if(1&e&&(i.Sb(0,"span"),i.Nb(1,"i",23),i.Rb()),2&e){const e=i.ic(4);i.yb(1),i.pc("ngClass",i.uc(1,ns,e.icons.warning))}}function ss(e,t){if(1&e&&(i.Sb(0,"ul"),i.Sb(1,"li"),i.Sb(2,"b"),i.Oc(3),i.jc(4,"relativeDate"),i.Rb(),i.Sb(5,"span",22),i.Oc(6),i.Rb(),i.Nb(7,"br"),i.Mc(8,is,2,3,"span",0),i.Mc(9,rs,2,3,"span",0),i.Oc(10),i.Rb(),i.Rb()),2&e){const e=t.$implicit;i.yb(3),i.Qc("",i.kc(4,5,e.created)," - "),i.yb(3),i.Pc(e.subject),i.yb(2),i.pc("ngIf","INFO"==e.level),i.yb(1),i.pc("ngIf","ERROR"==e.level),i.yb(1),i.Qc(" ",e.message,"")}}function os(e,t){if(1&e&&(i.Sb(0,"div",20),i.Mc(1,ss,11,7,"ul",21),i.Rb()),2&e){const e=i.ic().value,t=i.ic();i.yb(1),i.pc("ngForOf",e)("ngForTrackBy",t.trackByFn)}}function as(e,t){if(1&e&&(i.Mc(0,ts,3,0,"div",0),i.Mc(1,os,2,2,"div",19)),2&e){const e=t.value;i.pc("ngIf",0==e.length||null==e),i.yb(1),i.pc("ngIf",0!=e.length&&null!=e)}}let cs=(()=>{class e{constructor(e,t,n,i){this.hostService=e,this.cephServiceService=t,this.orchService=n,this.relativeDatePipe=i,this.icons=_n.a,this.daemons=[],this.services=[],this.columns=[],this.serviceColumns=[],this.hasOrchestrator=!1,this.showDocPanel=!1}ngOnInit(){this.columns=[{name:"Hostname",prop:"hostname",flexGrow:2,filterable:!0},{name:"Daemon type",prop:"daemon_type",flexGrow:1,filterable:!0},{name:"Daemon ID",prop:"daemon_id",flexGrow:1,filterable:!0},{name:"Container ID",prop:"container_id",flexGrow:2,filterable:!0,cellTransformation:Ht.a.truncate,customTemplateConfig:{length:12}},{name:"Container Image name",prop:"container_image_name",flexGrow:3,filterable:!0},{name:"Container Image ID",prop:"container_image_id",flexGrow:2,filterable:!0,cellTransformation:Ht.a.truncate,customTemplateConfig:{length:12}},{name:"Version",prop:"version",flexGrow:1,filterable:!0},{name:"Status",prop:"status_desc",flexGrow:1,filterable:!0,cellTemplate:this.statusTpl},{name:"Last Refreshed",prop:"last_refresh",pipe:this.relativeDatePipe,flexGrow:1},{name:"Daemon Events",prop:"events",flexGrow:5,cellTemplate:this.listTpl}],this.serviceColumns=[{name:"Service Name",prop:"service_name",flexGrow:2,filterable:!0},{name:"Service Type",prop:"service_type",flexGrow:1,filterable:!0},{name:"Service Events",prop:"events",flexGrow:5,cellTemplate:this.listTpl}],this.orchService.status().subscribe(e=>{this.hasOrchestrator=e.available,this.showDocPanel=!e.available})}ngOnChanges(){Nt.a.isUndefined(this.daemonsTable)||this.daemonsTable.reloadData()}ngAfterViewInit(){this.daemonsTableTplsSub=this.daemonsTableTpls.changes.subscribe(e=>{this.daemonsTable=e.first})}ngOnDestroy(){this.daemonsTableTplsSub&&this.daemonsTableTplsSub.unsubscribe(),this.serviceSub&&this.serviceSub.unsubscribe()}getStatusClass(e){return Nt.a.get({"-1":"badge-danger",0:"badge-warning",1:"badge-success"},e.status,"badge-dark")}getDaemons(e){let t;if(this.hostname)t=this.hostService.getDaemons(this.hostname);else{if(!this.serviceName)return void(this.daemons=[]);t=this.cephServiceService.getDaemons(this.serviceName)}t.subscribe(e=>{this.daemons=e},()=>{this.daemons=[],e.error()})}getServices(e){this.serviceSub=this.cephServiceService.list(this.serviceName).subscribe(e=>{this.services=e},()=>{this.services=[],e.error()})}trackByFn(e,t){return t.created}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Xi),i.Mb(zr),i.Mb(dr),i.Mb($r.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-service-daemon-list"]],viewQuery:function(e,t){var n;1&e&&(i.Jc(Wr,!0),i.Jc(Vr,!0),i.Tc(Br,!0)),2&e&&(i.zc(n=i.hc())&&(t.statusTpl=n.first),i.zc(n=i.hc())&&(t.listTpl=n.first),i.zc(n=i.hc())&&(t.daemonsTableTpls=n))},inputs:{serviceName:"serviceName",hostname:"hostname",flag:"flag"},features:[i.wb],decls:8,vars:3,consts:function(){return[[4,"ngIf"],[4,"ngIf","ngIfElse"],["serviceDetailsTpl",""],["statusTpl",""],["listTpl",""],["columnMode","flex",3,"data","columns","fetchData",4,"ngIf"],["columnMode","flex",3,"data","columns","fetchData"],["daemonsTable",""],["ngbNav","","cdStatefulTab","service-details",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem","details"],["ngbNavLink",""],"Details",["ngbNavContent",""],["ngbNavItem","service_events"],"Service Events",[3,"ngbNavOutlet"],["serviceTable",""],[1,"badge",3,"ngClass"],["class","ul-margin",4,"ngIf"],[1,"ul-margin"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"badge","badge-info"],["aria-hidden","true",3,"ngClass"]]},template:function(e,t){if(1&e&&(i.Mc(0,Ur,1,0,"cd-orchestrator-doc-panel",0),i.Mc(1,Gr,2,1,"div",1),i.Mc(2,Xr,12,1,"ng-template",null,2,i.Nc),i.Mc(4,es,3,5,"ng-template",null,3,i.Nc),i.Mc(6,as,2,2,"ng-template",null,4,i.Nc)),2&e){const e=i.Ac(3);i.pc("ngIf",t.showDocPanel),i.yb(1),i.pc("ngIf","hostDetails"===t.flag)("ngIfElse",e)}},directives:[o.r,Ar,Bt.a,Qt.p,Kt.a,Qt.r,Qt.s,Qt.q,Qt.u,o.p,o.q],pipes:[Hr.b,$r.a],styles:[".fa-info-circle[_ngcontent-%COMP%]{color:#2b99a8}.fa-exclamation-triangle[_ngcontent-%COMP%]{color:#ef5c55}.ul-margin[_ngcontent-%COMP%]{margin-left:-30px}"]}),e})();var ls=n("XFyV");const us=["innerNav"];function ds(e,t){1&e&&(i.Sb(0,"cd-alert-panel",5),i.Wb(1,6),i.Rb())}function hs(e,t){1&e&&(i.Sb(0,"cd-alert-panel",7),i.Wb(1,8),i.Rb())}function fs(e,t){1&e&&(i.Sb(0,"cd-alert-panel",10),i.Wb(1,11),i.Rb())}function ps(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"cd-alert-panel",20),i.Oc(2),i.Rb(),i.Pb()),2&e){const e=i.ic(2).$implicit;i.yb(2),i.Pc(e.value.userMessage)}}function ms(e,t){1&e&&(i.Sb(0,"cd-alert-panel",23),i.Yb(1,24),i.Wb(2,25),i.Rb())}function bs(e,t){1&e&&(i.Qb(0),i.Sb(1,"cd-alert-panel",27),i.Yb(2,28),i.Wb(3,29),i.Rb(),i.Pb())}function gs(e,t){1&e&&(i.Sb(0,"cd-alert-panel",30),i.Yb(1,31),i.Wb(2,32),i.Rb())}function _s(e,t){if(1&e&&(i.Mc(0,bs,4,0,"ng-container",0),i.Mc(1,gs,3,0,"ng-template",null,26,i.Nc)),2&e){const e=i.Ac(2),t=i.ic(3).$implicit;i.pc("ngIf",t.value.info.smart_status.passed)("ngIfElse",e)}}function ys(e,t){if(1&e&&(i.Mc(0,ms,3,0,"cd-alert-panel",21),i.jc(1,"pipeFunction"),i.Mc(2,_s,3,2,"ng-template",null,22,i.Nc)),2&e){const e=i.Ac(3),t=i.ic(2).$implicit,n=i.ic(4);i.pc("ngIf",i.lc(1,2,null==t.value.info?null:t.value.info.smart_status,n.isEmpty))("ngIfElse",e)}}function vs(e,t){if(1&e&&i.Nb(0,"cd-table-key-value",39),2&e){const e=i.ic(4).$implicit;i.pc("renderObjects",!0)("data",e.value.info)}}function ws(e,t){1&e&&(i.Sb(0,"cd-alert-panel",40),i.Wb(1,41),i.Rb())}function Ss(e,t){if(1&e&&(i.Mc(0,vs,1,2,"cd-table-key-value",37),i.jc(1,"pipeFunction"),i.Mc(2,ws,2,0,"cd-alert-panel",38),i.jc(3,"pipeFunction")),2&e){const e=i.ic(3).$implicit,t=i.ic(4);i.pc("ngIf",!i.lc(1,2,e.value.info,t.isEmpty)),i.yb(2),i.pc("ngIf",i.lc(3,5,e.value.info,t.isEmpty))}}function Ms(e,t){if(1&e&&i.Nb(0,"cd-table",45),2&e){const e=i.ic(4).$implicit,t=i.ic(4);i.pc("data",e.value.smart.attributes.table)("columns",t.smartDataColumns)}}function xs(e,t){if(1&e&&i.Nb(0,"cd-table-key-value",46),2&e){const e=i.ic(4).$implicit;i.pc("renderObjects",!0)("data",e.value.smart.nvmeData)}}function ks(e,t){1&e&&(i.Sb(0,"cd-alert-panel",47),i.Wb(1,48),i.Rb())}function Ds(e,t){if(1&e&&(i.Mc(0,Ms,1,2,"cd-table",42),i.Mc(1,xs,1,2,"cd-table-key-value",43),i.Mc(2,ks,2,0,"cd-alert-panel",44)),2&e){const e=i.ic(3).$implicit;i.pc("ngIf",null==e.value.smart?null:e.value.smart.attributes),i.yb(1),i.pc("ngIf",null==e.value.smart?null:e.value.smart.nvmeData),i.yb(1),i.pc("ngIf",!(null!=e.value.smart&&e.value.smart.attributes||null!=e.value.smart&&e.value.smart.nvmeData))}}function Ts(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"ul",12,33),i.Sb(3,"li",34),i.Sb(4,"a",17),i.Wb(5,35),i.Rb(),i.Mc(6,Ss,4,8,"ng-template",18),i.Rb(),i.Sb(7,"li",34),i.Sb(8,"a",17),i.Wb(9,36),i.Rb(),i.Mc(10,Ds,3,3,"ng-template",18),i.Rb(),i.Rb(),i.Nb(11,"div",15),i.Pb()),2&e){const e=i.Ac(2);i.yb(3),i.pc("ngbNavItem",1),i.yb(4),i.pc("ngbNavItem",2),i.yb(4),i.pc("ngbNavOutlet",e)}}function Cs(e,t){if(1&e&&(i.Mc(0,ps,3,1,"ng-container",0),i.Mc(1,ys,4,5,"ng-template",null,19,i.Nc),i.Mc(3,Ts,12,3,"ng-container",4),i.jc(4,"pipeFunction"),i.jc(5,"pipeFunction")),2&e){const e=i.Ac(2),t=i.ic().$implicit,n=i.ic(4);i.pc("ngIf",t.value.error)("ngIfElse",e),i.yb(3),i.pc("ngIf",!i.lc(4,3,t.value.info,n.isEmpty)||!i.lc(5,6,t.value.smart,n.isEmpty))}}function Os(e,t){if(1&e&&(i.Sb(0,"li",16),i.Sb(1,"a",17),i.Oc(2),i.Rb(),i.Mc(3,Cs,6,9,"ng-template",18),i.Rb()),2&e){const e=t.$implicit;i.yb(2),i.Rc("",e.value.device," (",e.value.identifier,")")}}function Ls(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"ul",12,13),i.Mc(3,Os,4,2,"li",14),i.jc(4,"keyvalue"),i.Rb(),i.Nb(5,"div",15),i.Pb()),2&e){const e=i.Ac(2),t=i.ic(3);i.yb(3),i.pc("ngForOf",i.kc(4,2,t.data)),i.yb(2),i.pc("ngbNavOutlet",e)}}function Rs(e,t){if(1&e&&(i.Qb(0),i.Mc(1,fs,2,0,"cd-alert-panel",9),i.jc(2,"pipeFunction"),i.Mc(3,Ls,6,4,"ng-container",4),i.jc(4,"pipeFunction"),i.Pb()),2&e){const e=i.ic(2);i.yb(1),i.pc("ngIf",i.lc(2,2,e.data,e.isEmpty)),i.yb(2),i.pc("ngIf",!i.lc(4,5,e.data,e.isEmpty))}}function Es(e,t){if(1&e&&(i.Qb(0),i.Mc(1,ds,2,0,"cd-alert-panel",2),i.Mc(2,hs,2,0,"cd-alert-panel",3),i.Mc(3,Rs,5,8,"ng-container",4),i.Pb()),2&e){const e=i.ic();i.yb(1),i.pc("ngIf",e.error),i.yb(1),i.pc("ngIf",e.incompatible),i.yb(1),i.pc("ngIf",!e.error&&!e.incompatible)}}function As(e,t){1&e&&(i.Sb(0,"cd-loading-panel"),i.Wb(1,49),i.Rb())}let Is=(()=>{class e{constructor(e,t){this.osdService=e,this.hostService=t,this.osdId=null,this.hostname=null,this.loading=!1,this.incompatible=!1,this.error=!1,this.data={},this.isEmpty=Nt.a.isEmpty}isSmartError(e){return void 0!==Nt.a.get(e,"error")}isNvmeSmartData(e){return"nvme"===Nt.a.get(e,"device.protocol","").toLowerCase()}isHddSmartData(e){return"ata"===Nt.a.get(e,"device.protocol","").toLowerCase()}fetchData(e){const t={};Nt.a.each(e,(e,n)=>{if(this.isSmartError(e)){let i="";i=-22===e.smartctl_error_code?"Smartctl has received an unknown argument (error code " + e.smartctl_error_code + "). You may be using an incompatible version of smartmontools. Version >= 7.0 of smartmontools is required to successfully retrieve data.":"An error with error code " + e.smartctl_error_code + " occurred.",t[n]={error:e.error,smartctl_error_code:e.smartctl_error_code,smartctl_output:e.smartctl_output,userMessage:i,device:e.dev,identifier:e.nvme_vendor}}else 1!==e.json_format_version[0]?this.incompatible=!0:this.isHddSmartData(e)?t[n]=this.extractHddData(e):this.isNvmeSmartData(e)&&(t[n]=this.extractNvmeData(e))}),this.data=t,this.loading=!1}extractNvmeData(e){return{info:Nt.a.omitBy(e,(e,t)=>["nvme_smart_health_information_log"].includes(t)),smart:{nvmeData:e.nvme_smart_health_information_log},device:e.device.name,identifier:e.serial_number}}extractHddData(e){const t=Nt.a.omitBy(e,(e,t)=>["ata_smart_attributes","ata_smart_selective_self_test_log","ata_smart_data"].includes(t));return{info:t,smart:{attributes:e.ata_smart_attributes,data:e.ata_smart_data},device:t.device.name,identifier:t.serial_number}}updateData(){this.loading=!0,null!==this.osdId?this.osdService.getSmartData(this.osdId).subscribe({next:this.fetchData.bind(this),error:e=>{e.preventDefault(),this.error=e,this.loading=!1}}):null!==this.hostname&&this.hostService.getSmartData(this.hostname).subscribe({next:this.fetchData.bind(this),error:e=>{e.preventDefault(),this.error=e,this.loading=!1}})}ngOnInit(){this.smartDataColumns=[{prop:"id",name:"ID"},{prop:"name",name:"Name"},{prop:"raw.value",name:"Raw"},{prop:"thresh",name:"Threshold"},{prop:"value",name:"Value"},{prop:"when_failed",name:"When Failed"},{prop:"worst",name:"Worst"}]}ngOnChanges(e){this.data={},e.osdId?this.osdId=e.osdId.currentValue:e.hostname&&(this.hostname=e.hostname.currentValue),this.updateData()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(mr),i.Mb(Xi))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-smart-list"]],viewQuery:function(e,t){var n;1&e&&i.Tc(us,!0),2&e&&i.zc(n=i.hc())&&(t.nav=n.first)},inputs:{osdId:"osdId",hostname:"hostname"},features:[i.wb],decls:3,vars:2,consts:function(){return[[4,"ngIf","ngIfElse"],["isLoading",""],["type","error",4,"ngIf"],["type","warning",4,"ngIf"],[4,"ngIf"],["type","error"],"Failed to retrieve SMART data.",["type","warning"],"The data received has the JSON format version 2.x and is currently incompatible with the dashboard.",["type","info",4,"ngIf"],["type","info"],"No SMART data available.",["ngbNav","",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem","",4,"ngFor","ngForOf"],[3,"ngbNavOutlet"],["ngbNavItem",""],["ngbNavLink",""],["ngbNavContent",""],["noError",""],["id","alert-error","type","warning"],["id","alert-self-test-unknown","size","slim","type","warning",4,"ngIf","ngIfElse",6,"title"],["hasSmartStatus",""],["id","alert-self-test-unknown","size","slim","type","warning",6,"title"],["title","SMART overall-health self-assessment test result"],"unknown",["selfTestFailed",""],["id","alert-self-test-passed","size","slim","type","info",6,"title"],["title","SMART overall-health self-assessment test result"],"passed",["id","alert-self-test-failed","size","slim","type","warning",6,"title"],["title","SMART overall-health self-assessment test result"],"failed",["innerNav","ngbNav"],[3,"ngbNavItem"],"Device Information","SMART",[3,"renderObjects","data",4,"ngIf"],["id","alert-device-info-unavailable","type","info",4,"ngIf"],[3,"renderObjects","data"],["id","alert-device-info-unavailable","type","info"],"No device information available for this device.",["updateSelectionOnRefresh","never",3,"data","columns",4,"ngIf"],["updateSelectionOnRefresh","never",3,"renderObjects","data",4,"ngIf"],["id","alert-device-smart-data-unavailable","type","info",4,"ngIf"],["updateSelectionOnRefresh","never",3,"data","columns"],["updateSelectionOnRefresh","never",3,"renderObjects","data"],["id","alert-device-smart-data-unavailable","type","info"],"No SMART data available for this device.","SMART data is loading."]},template:function(e,t){if(1&e&&(i.Mc(0,Es,4,3,"ng-container",0),i.Mc(1,As,2,0,"ng-template",null,1,i.Nc)),2&e){const e=i.Ac(2);i.pc("ngIf",!t.loading)("ngIfElse",e)}},directives:[o.r,br.a,Qt.p,o.q,Qt.u,Qt.r,Qt.s,Qt.q,en.a,Bt.a,ls.a],pipes:[Hr.b,o.k],styles:[""]}),e})();function Ps(e,t){if(1&e&&i.Nb(0,"cd-device-list",14),2&e){const e=i.ic(2);i.pc("hostname",e.selection.hostname)}}function js(e,t){if(1&e&&i.Nb(0,"cd-inventory",14),2&e){const e=i.ic(3);i.pc("hostname",e.selectedHostname)}}function Ns(e,t){1&e&&(i.Sb(0,"li",15),i.Sb(1,"a",5),i.Wb(2,16),i.Rb(),i.Mc(3,js,1,1,"ng-template",7),i.Rb())}function Fs(e,t){if(1&e&&i.Nb(0,"cd-service-daemon-list",19),2&e){const e=i.ic(3);i.pc("hostname",e.selectedHostname)}}function Ys(e,t){1&e&&(i.Sb(0,"li",17),i.Sb(1,"a",5),i.Wb(2,18),i.Rb(),i.Mc(3,Fs,1,1,"ng-template",7),i.Rb())}function zs(e,t){if(1&e&&i.Nb(0,"cd-grafana",22),2&e){const e=i.ic(3);i.pc("grafanaPath","host-details?var-ceph_hosts="+e.selectedHostname)}}function $s(e,t){1&e&&(i.Sb(0,"li",20),i.Sb(1,"a",5),i.Wb(2,21),i.Rb(),i.Mc(3,zs,1,1,"ng-template",7),i.Rb())}function Hs(e,t){if(1&e&&i.Nb(0,"cd-smart-list",14),2&e){const e=i.ic(3);i.pc("hostname",e.selectedHostname)}}function Ws(e,t){if(1&e&&i.Mc(0,Hs,1,1,"cd-smart-list",23),2&e){const e=i.ic(2),t=i.Ac(2);i.pc("ngIf",e.selectedHostname)("ngIfElse",t)}}function Vs(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"ul",2,3),i.Sb(3,"li",4),i.Sb(4,"a",5),i.Wb(5,6),i.Rb(),i.Mc(6,Ps,1,1,"ng-template",7),i.Rb(),i.Mc(7,Ns,4,0,"li",8),i.Mc(8,Ys,4,0,"li",9),i.Mc(9,$s,4,0,"li",10),i.Sb(10,"li",11),i.Sb(11,"a",5),i.Wb(12,12),i.Rb(),i.Mc(13,Ws,1,2,"ng-template",7),i.Rb(),i.Rb(),i.Nb(14,"div",13),i.Pb()),2&e){const e=i.Ac(2),t=i.ic();i.yb(7),i.pc("ngIf",t.permissions.hosts.read),i.yb(1),i.pc("ngIf",t.permissions.hosts.read),i.yb(1),i.pc("ngIf",t.permissions.grafana.read),i.yb(5),i.pc("ngbNavOutlet",e)}}function Bs(e,t){1&e&&(i.Sb(0,"cd-alert-panel",24),i.Wb(1,25),i.Rb())}let Us=(()=>{class e{get selectedHostname(){return void 0!==this.selection?this.selection.hostname:null}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-host-details"]],inputs:{permissions:"permissions",selection:"selection"},decls:3,vars:1,consts:function(){return[[4,"ngIf"],["noHostname",""],["ngbNav","","cdStatefulTab","host-details",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem","devices"],["ngbNavLink",""],"Devices",["ngbNavContent",""],["ngbNavItem","inventory",4,"ngIf"],["ngbNavItem","daemons",4,"ngIf"],["ngbNavItem","performance-details",4,"ngIf"],["ngbNavItem","device-health"],"Device health",[3,"ngbNavOutlet"],[3,"hostname"],["ngbNavItem","inventory"],"Inventory",["ngbNavItem","daemons"],"Daemons",["flag","hostDetails",3,"hostname"],["ngbNavItem","performance-details"],"Performance Details",["uid","rtOg0AiWz","grafanaStyle","four",3,"grafanaPath"],[3,"hostname",4,"ngIf","ngIfElse"],["type","error"],"No hostname found."]},template:function(e,t){1&e&&(i.Mc(0,Vs,15,4,"ng-container",0),i.Mc(1,Bs,2,0,"ng-template",null,1,i.Nc)),2&e&&i.pc("ngIf",t.selection)},directives:[o.r,Qt.p,Kt.a,Qt.r,Qt.s,Qt.q,Qt.u,Or,Yr,cs,Fn.a,Is,br.a],styles:[""]}),e})();const qs=["servicesTpl"],Gs=["maintenanceConfirmTpl"];function Js(e,t){if(1&e){const e=i.Tb();i.Sb(0,"cd-table",10),i.gc("fetchData",(function(t){return i.Dc(e),i.ic().getHosts(t)}))("setExpandedRow",(function(t){return i.Dc(e),i.ic().setExpandedRow(t)}))("updateSelection",(function(t){return i.Dc(e),i.ic().updateSelection(t)})),i.Sb(1,"div",11),i.Nb(2,"cd-table-actions",12),i.Rb(),i.Nb(3,"cd-host-details",13),i.Rb()}if(2&e){const e=i.ic();i.pc("data",e.hosts)("columns",e.columns)("hasDetails",!0),i.yb(2),i.pc("permission",e.permissions.hosts)("selection",e.selection)("tableActions",e.tableActions),i.yb(1),i.pc("permissions",e.permissions)("selection",e.expandedRow)}}function Qs(e,t){1&e&&i.Nb(0,"cd-grafana",15),2&e&&i.pc("grafanaPath","host-overview?")}function Ks(e,t){1&e&&(i.Sb(0,"li",2),i.Sb(1,"a",3),i.Wb(2,14),i.Rb(),i.Mc(3,Qs,1,1,"ng-template",5),i.Rb())}const Zs=function(e){return[e]};function Xs(e,t){if(1&e&&(i.Sb(0,"a",19),i.Oc(1),i.Rb()),2&e){const e=i.ic().$implicit,t=i.ic(2);i.pc("routerLink",i.uc(4,Zs,e.cdLink))("queryParams",t.cdParams),i.yb(1),i.Rc("",e.type,".",e.id,"")}}function eo(e,t){if(1&e&&(i.Sb(0,"span"),i.Oc(1),i.Rb()),2&e){const e=i.ic().$implicit;i.yb(1),i.Rc(" ",e.type,".",e.id," ")}}function to(e,t){1&e&&(i.Qb(0),i.Oc(1,", "),i.Pb())}function no(e,t){if(1&e&&(i.Sb(0,"span"),i.Mc(1,Xs,2,6,"a",17),i.Mc(2,eo,2,2,"span",18),i.Mc(3,to,2,0,"ng-container",18),i.Rb()),2&e){const e=t.$implicit,n=t.last;i.yb(1),i.pc("ngIf",e.canRead),i.yb(1),i.pc("ngIf",!e.canRead),i.yb(1),i.pc("ngIf",!n)}}function io(e,t){1&e&&i.Mc(0,no,4,3,"span",16),2&e&&i.pc("ngForOf",t.value)}function ro(e,t){if(1&e&&(i.Sb(0,"ul"),i.Sb(1,"li"),i.Wb(2,20),i.Rb(),i.Rb()),2&e){const e=i.ic().$implicit;i.yb(2),i.ac(e),i.Xb(2)}}function so(e,t){if(1&e&&(i.Sb(0,"div"),i.Mc(1,ro,3,1,"ul",18),i.Rb()),2&e){const e=t.last,n=i.ic(2);i.yb(1),i.pc("ngIf",!e||"1"==n.errorMessage.length)}}function oo(e,t){1&e&&(i.Qb(0),i.Wb(1,21),i.Pb())}function ao(e,t){if(1&e&&(i.Mc(0,so,2,1,"div",16),i.Mc(1,oo,2,0,"ng-container",18)),2&e){const e=i.ic();i.pc("ngForOf",e.errorMessage),i.yb(1),i.pc("ngIf",e.showSubmit)}}let co=(()=>{class e extends $t.a{constructor(e,t,n,i,r,s,o,a,c,l){super(),this.authStorageService=e,this.hostService=t,this.cephShortVersionPipe=n,this.urlBuilder=i,this.actionLabels=r,this.modalService=s,this.taskWrapper=o,this.router=a,this.notificationService=c,this.orchService=l,this.columns=[],this.hosts=[],this.isLoadingHosts=!1,this.cdParams={fromLink:"/hosts"},this.selection=new Wt.a,this.isExecuting=!1,this.icons=_n.a,this.messages={nonOrchHost:"The feature is disabled because the selected host is not managed by Orchestrator."},this.actionOrchFeatures={create:[hr.HOST_CREATE],edit:[hr.HOST_LABEL_ADD,hr.HOST_LABEL_REMOVE],delete:[hr.HOST_DELETE],maintenance:[hr.HOST_MAINTENANCE_ENTER,hr.HOST_MAINTENANCE_EXIT]},this.permissions=this.authStorageService.getPermissions(),this.tableActions=[{name:this.actionLabels.CREATE,permission:"create",icon:_n.a.add,click:()=>this.router.navigate([this.urlBuilder.getCreate()]),disable:e=>this.getDisable("create",e)},{name:this.actionLabels.EDIT,permission:"update",icon:_n.a.edit,click:()=>this.editAction(),disable:e=>this.getDisable("edit",e)},{name:this.actionLabels.DELETE,permission:"delete",icon:_n.a.destroy,click:()=>this.deleteAction(),disable:e=>this.getDisable("delete",e)},{name:this.actionLabels.ENTER_MAINTENANCE,permission:"update",icon:_n.a.enter,click:()=>this.hostMaintenance(),disable:e=>this.getDisable("maintenance",e)||this.isExecuting||this.enableButton},{name:this.actionLabels.EXIT_MAINTENANCE,permission:"update",icon:_n.a.exit,click:()=>this.hostMaintenance(),disable:e=>this.getDisable("maintenance",e)||this.isExecuting||!this.enableButton}]}ngOnInit(){this.columns=[{name:"Hostname",prop:"hostname",flexGrow:1},{name:"Services",prop:"services",flexGrow:3,cellTemplate:this.servicesTpl},{name:"Labels",prop:"labels",flexGrow:1,cellTransformation:Ht.a.badge,customTemplateConfig:{class:"badge-dark"}},{name:"Status",prop:"status",flexGrow:1,cellTransformation:Ht.a.badge,customTemplateConfig:{map:{maintenance:{class:"badge-warning"}}}},{name:"Version",prop:"ceph_version",flexGrow:1,pipe:this.cephShortVersionPipe}],this.orchService.status().subscribe(e=>{this.orchStatus=e})}updateSelection(e){this.selection=e,this.enableButton=!1,this.selection.hasSelection&&"maintenance"===this.selection.first().status&&(this.enableButton=!0)}editAction(){this.hostService.getLabels().subscribe(e=>{const t=this.selection.first(),n=e.map(e=>({enabled:!0,name:e}));this.modalService.show(Tn.a,{titleText:"Edit Host: " + t.hostname + "",fields:[{type:"select-badges",name:"labels",value:t.labels,label:"Labels",typeConfig:{customBadges:!0,options:n,messages:new er.a({empty:"There are no labels.",filter:"Filter or add labels",add:"Add label"})}}],submitButtonText:"Edit Host",onSubmit:e=>{this.hostService.update(t.hostname,!0,e.labels).subscribe(()=>{this.notificationService.show(yn.a.success,"Updated Host \"" + t.hostname + "\""),this.table.refreshBtn()})}})})}hostMaintenance(){this.isExecuting=!0;const e=this.selection.first();"maintenance"!==e.status?this.hostService.update(e.hostname,!1,[],!0).subscribe(()=>{this.isExecuting=!1,this.notificationService.show(yn.a.success,"\"" + e.hostname + "\" moved to maintenance"),this.table.refreshBtn()},t=>{if(this.isExecuting=!1,this.errorMessage=t.error.detail.split(/\n/),t.preventDefault(),!t.error.detail.includes("WARNING")||t.error.detail.includes("It is NOT safe to stop")||t.error.detail.includes("ALERT")||t.error.detail.includes("unable to stop"))this.notificationService.show(yn.a.error,"\"" + e.hostname + "\" cannot be put into maintenance","" + t.error.detail + "");else{const t={titleText:"Warning",buttonText:"Continue",warning:!0,bodyTpl:this.maintenanceConfirmTpl,showSubmit:!0,onSubmit:()=>{this.hostService.update(e.hostname,!1,[],!0,!0).subscribe(()=>{this.modalRef.close()},()=>this.modalRef.close())}};this.modalRef=this.modalService.show(Dn.a,t)}}):this.hostService.update(e.hostname,!1,[],!0).subscribe(()=>{this.isExecuting=!1,this.notificationService.show(yn.a.success,"\"" + e.hostname + "\" has exited maintenance"),this.table.refreshBtn()})}getDisable(e,t){if("delete"===e||"edit"===e||"maintenance"===e){if(!(null==t?void 0:t.hasSingleSelection))return!0;if(!Nt.a.every(t.selected,"sources.orchestrator"))return this.messages.nonOrchHost}return this.orchService.getTableActionDisableDesc(this.orchStatus,this.actionOrchFeatures[e])}deleteAction(){const e=this.selection.first().hostname;this.modalRef=this.modalService.show(bn.a,{itemDescription:"Host",itemNames:[e],actionDescription:"delete",submitActionObservable:()=>this.taskWrapper.wrapTaskAroundCall({task:new tr.a("host/delete",{hostname:e}),call:this.hostService.delete(e)})})}getHosts(e){if(this.isLoadingHosts)return;const t={mds:"cephfs",mon:"monitor",osd:"osd",rgw:"rgw","rbd-mirror":"rbdMirroring",mgr:"manager","tcmu-runner":"iscsi"};this.isLoadingHosts=!0,this.hostService.list().subscribe(e=>{e.map(e=>(e.services.map(e=>{e.cdLink=`/perf_counters/${e.type}/${encodeURIComponent(e.id)}`;const n=this.permissions[t[e.type]];return e.canRead=!!n&&n.read,e}),e)),this.hosts=e,this.isLoadingHosts=!1},()=>{this.isLoadingHosts=!1,e.error()})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Jt.a),i.Mb(Xi),i.Mb(fr.a),i.Mb(pr.a),i.Mb(gn.b),i.Mb(vn.a),i.Mb(nr.a),i.Mb(Pt.e),i.Mb(wn.a),i.Mb(dr))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-hosts"]],viewQuery:function(e,t){var n;1&e&&(i.Tc(Bt.a,!0),i.Jc(qs,!0),i.Jc(Gs,!0)),2&e&&(i.zc(n=i.hc())&&(t.table=n.first),i.zc(n=i.hc())&&(t.servicesTpl=n.first),i.zc(n=i.hc())&&(t.maintenanceConfirmTpl=n.first))},features:[i.xb([{provide:pr.a,useValue:new pr.a("hosts")}]),i.vb],decls:12,vars:2,consts:function(){return[["ngbNav","",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem",""],["ngbNavLink",""],"Hosts List",["ngbNavContent",""],["ngbNavItem","",4,"ngIf"],[3,"ngbNavOutlet"],["servicesTpl",""],["maintenanceConfirmTpl",""],["columnMode","flex","selectionType","single",3,"data","columns","hasDetails","fetchData","setExpandedRow","updateSelection"],[1,"table-actions","btn-toolbar"],["id","host-actions",1,"btn-group",3,"permission","selection","tableActions"],["cdTableDetail","",3,"permissions","selection"],"Overall Performance",["uid","y0KGL0iZz","grafanaStyle","two",3,"grafanaPath"],[4,"ngFor","ngForOf"],["class","service-link",3,"routerLink","queryParams",4,"ngIf"],[4,"ngIf"],[1,"service-link",3,"routerLink","queryParams"],"" + "\ufffd0\ufffd" + "","Are you sure you want to continue?"]},template:function(e,t){if(1&e&&(i.Sb(0,"ul",0,1),i.Sb(2,"li",2),i.Sb(3,"a",3),i.Wb(4,4),i.Rb(),i.Mc(5,Js,4,8,"ng-template",5),i.Rb(),i.Mc(6,Ks,4,0,"li",6),i.Rb(),i.Nb(7,"div",7),i.Mc(8,io,1,1,"ng-template",null,8,i.Nc),i.Mc(10,ao,2,2,"ng-template",null,9,i.Nc)),2&e){const e=i.Ac(1);i.yb(6),i.pc("ngIf",t.permissions.grafana.read),i.yb(1),i.pc("ngbNavOutlet",e)}},directives:[Qt.p,Qt.r,Qt.s,Qt.q,o.r,Qt.u,Bt.a,Sn.a,Us,Fn.a,o.q,Pt.h],styles:[""]}),e})(),lo=(()=>{class e{constructor(e){this.http=e}getLogs(){return this.http.get("api/logs/all")}validateDashboardUrl(e){return this.http.get("api/grafana/validation/"+e)}}return e.\u0275fac=function(t){return new(t||e)(i.dc(a.b))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var uo=n("Iab2");let ho=(()=>{class e{download(e,t){Object(uo.saveAs)(new Blob([e]),t)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();const fo=function(e){return[e]};function po(e,t){if(1&e){const e=i.Tb();i.Sb(0,"button",5),i.gc("click",(function(){return i.Dc(e),i.ic().download("json")})),i.Nb(1,"i",2),i.Sb(2,"span"),i.Oc(3,"JSON"),i.Rb(),i.Rb()}if(2&e){const e=i.ic();i.yb(1),i.pc("ngClass",i.uc(1,fo,e.icons.json))}}function mo(e,t){if(1&e){const e=i.Tb();i.Sb(0,"button",5),i.gc("click",(function(){return i.Dc(e),i.ic().download()})),i.Nb(1,"i",2),i.Sb(2,"span"),i.Oc(3,"Text"),i.Rb(),i.Rb()}if(2&e){const e=i.ic();i.yb(1),i.pc("ngClass",i.uc(1,fo,e.icons.text))}}let bo=(()=>{class e{constructor(e){this.textToDownloadService=e,this.title="Download",this.icons=_n.a}download(e){this.fileName=`${this.fileName}_${(new Date).toLocaleDateString()}`,"json"===e?this.textToDownloadService.download(JSON.stringify(this.objectItem,null,2),this.fileName+".json"):this.textToDownloadService.download(this.textItem,this.fileName+".txt")}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(ho))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-download-button"]],inputs:{objectItem:"objectItem",textItem:"textItem",fileName:"fileName",title:"title"},decls:6,vars:6,consts:[["ngbDropdown","","placement","bottom-right"],["type","button","ngbDropdownToggle","",1,"btn","btn-light","dropdown-toggle-split",3,"title"],[3,"ngClass"],["ngbDropdownMenu",""],["ngbDropdownItem","",3,"click",4,"ngIf"],["ngbDropdownItem","",3,"click"]],template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Sb(1,"button",1),i.Nb(2,"i",2),i.Rb(),i.Sb(3,"div",3),i.Mc(4,po,4,3,"button",4),i.Mc(5,mo,4,3,"button",4),i.Rb(),i.Rb()),2&e&&(i.yb(1),i.pc("title",t.title),i.yb(1),i.pc("ngClass",i.uc(4,fo,t.icons.download)),i.yb(2),i.pc("ngIf",t.objectItem),i.yb(1),i.pc("ngIf",t.textItem))},directives:[Qt.i,On.a,Qt.m,o.p,Qt.k,o.r,Qt.j],styles:[""]}),e})();var go=n("cEzo"),_o=n("E2fk");function yo(e,t){1&e&&i.Ob(0)}function vo(e,t){if(1&e&&(i.Sb(0,"div",19),i.Nb(1,"cd-download-button",20),i.Nb(2,"cd-copy-2-clipboard-button",21),i.Rb()),2&e){const e=i.ic(4);i.yb(1),i.pc("objectItem",e.clog)("textItem",e.clogText),i.yb(1),i.pc("source",e.clogText)("byId",!1)}}function wo(e,t){if(1&e&&(i.Sb(0,"p"),i.Sb(1,"span",22),i.Oc(2),i.jc(3,"cdDate"),i.Rb(),i.Sb(4,"span"),i.jc(5,"logPriority"),i.Oc(6),i.Rb(),i.Sb(7,"span",23),i.Oc(8),i.Rb(),i.Rb()),2&e){const e=t.$implicit;i.yb(2),i.Pc(i.kc(3,6,e.stamp)),i.yb(2),i.Bb("priority ",i.kc(5,8,e.priority),""),i.yb(2),i.Pc(e.priority),i.yb(2),i.Pc(e.message)}}function So(e,t){1&e&&i.Ob(0)}function Mo(e,t){if(1&e&&(i.Sb(0,"div",14),i.Mc(1,vo,3,4,"div",15),i.Sb(2,"div",16),i.Mc(3,wo,9,10,"p",17),i.Mc(4,So,1,0,"ng-container",18),i.Rb(),i.Rb()),2&e){const e=i.ic(3),t=i.Ac(4);i.yb(1),i.pc("ngIf",e.clog.length),i.yb(2),i.pc("ngForOf",e.clog),i.yb(1),i.pc("ngIf",0!=e.clog.length)("ngIfElse",t)}}function xo(e,t){if(1&e&&i.Mc(0,Mo,5,4,"div",13),2&e){const e=i.ic(2);i.pc("ngIf",e.clog)}}function ko(e,t){if(1&e&&(i.Sb(0,"div",19),i.Nb(1,"cd-download-button",24),i.Nb(2,"cd-copy-2-clipboard-button",21),i.Rb()),2&e){const e=i.ic(4);i.yb(1),i.pc("objectItem",e.audit_log)("textItem",e.auditLogText),i.yb(1),i.pc("source",e.auditLogText)("byId",!1)}}function Do(e,t){if(1&e&&(i.Sb(0,"p"),i.Sb(1,"span",22),i.Oc(2),i.jc(3,"cdDate"),i.Rb(),i.Sb(4,"span"),i.jc(5,"logPriority"),i.Oc(6),i.Rb(),i.Sb(7,"span",23),i.Oc(8),i.Rb(),i.Rb()),2&e){const e=t.$implicit;i.yb(2),i.Pc(i.kc(3,6,e.stamp)),i.yb(2),i.Bb("priority ",i.kc(5,8,e.priority),""),i.yb(2),i.Pc(e.priority),i.yb(2),i.Pc(e.message)}}function To(e,t){1&e&&i.Ob(0)}function Co(e,t){if(1&e&&(i.Sb(0,"div",14),i.Mc(1,ko,3,4,"div",15),i.Sb(2,"div",16),i.Mc(3,Do,9,10,"p",17),i.Mc(4,To,1,0,"ng-container",18),i.Rb(),i.Rb()),2&e){const e=i.ic(3),t=i.Ac(4);i.yb(1),i.pc("ngIf",e.audit_log.length),i.yb(2),i.pc("ngForOf",e.audit_log),i.yb(1),i.pc("ngIf",0!=e.audit_log.length)("ngIfElse",t)}}function Oo(e,t){if(1&e&&i.Mc(0,Co,5,4,"div",13),2&e){const e=i.ic(2);i.pc("ngIf",e.audit_log)}}function Lo(e,t){if(1&e&&(i.Sb(0,"div"),i.Mc(1,yo,1,0,"ng-container",3),i.Sb(2,"ul",4,5),i.Sb(4,"li",6),i.Sb(5,"a",7),i.Wb(6,8),i.Rb(),i.Mc(7,xo,1,1,"ng-template",9),i.Rb(),i.Sb(8,"li",10),i.Sb(9,"a",7),i.Wb(10,11),i.Rb(),i.Mc(11,Oo,1,1,"ng-template",9),i.Rb(),i.Rb(),i.Nb(12,"div",12),i.Rb()),2&e){const e=i.Ac(3);i.ic();const t=i.Ac(2);i.yb(1),i.pc("ngTemplateOutlet",t),i.yb(11),i.pc("ngbNavOutlet",e)}}function Ro(e,t){if(1&e&&(i.Sb(0,"option",46),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e.value),i.yb(1),i.Pc(e.name)}}const Eo=function(e){return[e]};function Ao(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",25),i.Sb(1,"div",26),i.Sb(2,"label",27),i.Wb(3,28),i.Rb(),i.Sb(4,"select",29),i.gc("ngModelChange",(function(t){return i.Dc(e),i.ic().priority=t}))("ngModelChange",(function(){return i.Dc(e),i.ic().filterLogs()})),i.Mc(5,Ro,2,2,"option",30),i.Rb(),i.Rb(),i.Sb(6,"div",26),i.Sb(7,"label",31),i.Wb(8,32),i.Rb(),i.Sb(9,"div",33),i.Sb(10,"div",34),i.Sb(11,"span",35),i.Nb(12,"i",36),i.Rb(),i.Rb(),i.Sb(13,"input",37),i.gc("ngModelChange",(function(t){return i.Dc(e),i.ic().search=t}))("keyup",(function(){return i.Dc(e),i.ic().filterLogs()})),i.Rb(),i.Sb(14,"div",38),i.Sb(15,"button",39),i.gc("click",(function(){return i.Dc(e),i.ic().clearSearchKey()})),i.Nb(16,"i"),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Sb(17,"div",26),i.Sb(18,"label",40),i.Wb(19,41),i.Rb(),i.Sb(20,"div",33),i.Sb(21,"input",42,43),i.gc("click",(function(){return i.Dc(e),i.Ac(22).open()}))("ngModelChange",(function(t){return i.Dc(e),i.ic().selectedDate=t}))("ngModelChange",(function(){return i.Dc(e),i.ic().filterLogs()})),i.Rb(),i.Sb(23,"span",38),i.Sb(24,"button",39),i.gc("click",(function(){return i.Dc(e),i.ic().clearDate()})),i.Nb(25,"i"),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Sb(26,"div",26),i.Sb(27,"label"),i.Wb(28,44),i.Rb(),i.Sb(29,"ngb-timepicker",45),i.gc("ngModelChange",(function(t){return i.Dc(e),i.ic().startTime=t}))("ngModelChange",(function(){return i.Dc(e),i.ic().filterLogs()})),i.Rb(),i.Sb(30,"span"),i.Oc(31,"\xa0\u2014\xa0"),i.Rb(),i.Sb(32,"ngb-timepicker",45),i.gc("ngModelChange",(function(t){return i.Dc(e),i.ic().endTime=t}))("ngModelChange",(function(){return i.Dc(e),i.ic().filterLogs()})),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.ic();i.yb(4),i.pc("ngModel",e.priority),i.yb(1),i.pc("ngForOf",e.priorities),i.yb(7),i.pc("ngClass",i.uc(16,Eo,e.icons.search)),i.yb(1),i.pc("ngModel",e.search),i.yb(3),i.Bb("icon-prepend ",e.icons.destroy,""),i.yb(5),i.pc("maxDate",e.maxDate)("ngModel",e.selectedDate),i.yb(4),i.Bb("icon-prepend ",e.icons.destroy,""),i.yb(4),i.pc("spinners",!1)("ngModel",e.startTime),i.yb(3),i.pc("spinners",!1)("ngModel",e.endTime)}}function Io(e,t){if(1&e){const e=i.Tb();i.Sb(0,"span"),i.Wb(1,47),i.Rb(),i.Sb(2,"span"),i.Oc(3,"\xa0"),i.Rb(),i.Sb(4,"a",48),i.gc("click",(function(){return i.Dc(e),i.ic().resetFilter()})),i.Wb(5,49),i.Rb()}}let Po=(()=>{class e{constructor(e,t,n){this.logsService=e,this.datePipe=t,this.ngZone=n,this.icons=_n.a,this.priorities=[{name:"Debug",value:"[DBG]"},{name:"Info",value:"[INF]"},{name:"Warning",value:"[WRN]"},{name:"Error",value:"[ERR]"},{name:"All",value:"All"}],this.priority="All",this.search="",this.startTime={hour:0,minute:0},this.endTime={hour:23,minute:59},this.maxDate={year:(new Date).getFullYear(),month:(new Date).getMonth()+1,day:(new Date).getDate()}}ngOnInit(){this.getInfo(),this.ngZone.runOutsideAngular(()=>{this.interval=window.setInterval(()=>{this.ngZone.run(()=>{this.getInfo()})},5e3)})}ngOnDestroy(){clearInterval(this.interval)}getInfo(){this.logsService.getLogs().subscribe(e=>{this.contentData=e,this.clogText=this.logToText(this.contentData.clog),this.auditLogText=this.logToText(this.contentData.audit_log),this.filterLogs()})}abstractFilters(){var e,t,n,i,r,s,o,a;const c=this.priority,l=this.search.toLowerCase().replace(/,/g,"");let u;if(this.selectedDate){const e=this.selectedDate.month,t=this.selectedDate.day;u=`${this.selectedDate.year}-${e<=9?"0"+e:""+e}-${t<=9?"0"+t:""+t}`}else u="";return{priority:c,key:l,yearMonthDay:u,sTime:60*(null!==(t=null===(e=this.startTime)||void 0===e?void 0:e.hour)&&void 0!==t?t:0)+(null!==(i=null===(n=this.startTime)||void 0===n?void 0:n.minute)&&void 0!==i?i:0),eTime:60*(null!==(s=null===(r=this.endTime)||void 0===r?void 0:r.hour)&&void 0!==s?s:23)+(null!==(a=null===(o=this.endTime)||void 0===o?void 0:o.minute)&&void 0!==a?a:59)}}filterExecutor(e,t){return e.filter(e=>{const n=this.datePipe.transform(e.stamp,"mediumTime"),i=parseInt(n.split(":")[0],10),r=parseInt(n.split(":")[1],10);let s,o,a;return s="All"===t.priority?e.priority:t.priority,o=t.yearMonthDay?t.yearMonthDay:e.stamp,a=60*i+r,e.priority===s&&-1!==e.message.toLowerCase().indexOf(t.key)&&-1!==e.stamp.indexOf(o)&&a>=t.sTime&&a<=t.eTime})}filterLogs(){const e=this.abstractFilters();this.clog=this.filterExecutor(this.contentData.clog,e),this.audit_log=this.filterExecutor(this.contentData.audit_log,e)}clearSearchKey(){this.search="",this.filterLogs()}clearDate(){this.selectedDate=null,this.filterLogs()}resetFilter(){return this.priority="All",this.search="",this.selectedDate=null,this.startTime={hour:0,minute:0},this.endTime={hour:23,minute:59},this.filterLogs(),!1}logToText(e){let t="";for(const n of Object.keys(e))t=t+this.datePipe.transform(e[n].stamp,"medium")+"\t"+e[n].priority+"\t"+e[n].message+"\n";return t}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(lo),i.Mb(o.e),i.Mb(i.A))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-logs"]],decls:5,vars:1,consts:function(){return[[4,"ngIf"],["logFiltersTpl",""],["noEntriesTpl",""],[4,"ngTemplateOutlet"],["ngbNav","","cdStatefulTab","logs",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem","cluster-logs"],["ngbNavLink",""],"Cluster Logs",["ngbNavContent",""],["ngbNavItem","audit-logs"],"Audit Logs",[3,"ngbNavOutlet"],["class","card bg-light mb-3",4,"ngIf"],[1,"card","bg-light","mb-3"],["class","btn-group","role","group",4,"ngIf"],[1,"card-body"],[4,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],["role","group",1,"btn-group"],["fileName","cluster_log",3,"objectItem","textItem"],[3,"source","byId"],[1,"timestamp"],[1,"message"],["fileName","audit_log",3,"objectItem","textItem"],[1,"form-inline"],[1,"form-group"],["for","logs-priority"],"Priority:",["id","logs-priority",1,"form-control","custom-select",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["for","logs-keyword"],"Keyword:",[1,"input-group"],[1,"input-group-prepend"],[1,"input-group-text"],[3,"ngClass"],["id","logs-keyword","type","text",1,"form-control",3,"ngModel","ngModelChange","keyup"],[1,"input-group-append"],["type","button",1,"btn","btn-light",3,"click"],["for","logs-date"],"Date:",["id","logs-date","placeholder","YYYY-MM-DD","ngbDatepicker","",1,"form-control",3,"maxDate","ngModel","click","ngModelChange"],["d","ngbDatepicker"],"Time range:",[3,"spinners","ngModel","ngModelChange"],[3,"value"],"No log entries found. Please try to select different filter options.",["href","#",3,"click"],"Reset filter."]},template:function(e,t){1&e&&(i.Mc(0,Lo,13,2,"div",0),i.Mc(1,Ao,33,18,"ng-template",null,1,i.Nc),i.Mc(3,Io,6,0,"ng-template",null,2,i.Nc)),2&e&&i.pc("ngIf",t.contentData)},directives:[o.r,o.w,Qt.p,Kt.a,Qt.r,Qt.s,Qt.q,Qt.u,o.q,bo,go.a,Xn.a,On.a,xn.z,ei.a,xn.q,xn.t,o.p,xn.d,Qt.n,Qt.B,xn.u,xn.B],pipes:[Vt.a,_o.a],styles:["p[_ngcontent-%COMP%]{font-family:monospace}.card[_ngcontent-%COMP%] .btn-group[_ngcontent-%COMP%]{margin-top:-45px;position:absolute;right:0}.card[_ngcontent-%COMP%] div[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:flex}.card[_ngcontent-%COMP%] div[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:last-child{margin-bottom:0}.card[_ngcontent-%COMP%] .timestamp[_ngcontent-%COMP%]{flex-shrink:0;font-weight:700}.card[_ngcontent-%COMP%] .priority[_ngcontent-%COMP%]{margin-left:.5rem}.card[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{margin-left:1rem}.card[_ngcontent-%COMP%] .err[_ngcontent-%COMP%]{color:#ef5c55}.card[_ngcontent-%COMP%] .warn[_ngcontent-%COMP%]{color:#ffc200}.card[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{color:#2b99a8}.card[_ngcontent-%COMP%] .debug[_ngcontent-%COMP%]{color:#495057} cd-logs ngb-timepicker input.ngb-tp-input{width:3.5rem!important}"]}),e})();var jo=n("cp0P");let No=(()=>{class e{constructor(e){this.http=e,this.url="api/mgr/module"}list(){return this.http.get(""+this.url)}getConfig(e){return this.http.get(`${this.url}/${e}`)}updateConfig(e,t){return this.http.put(`${this.url}/${e}`,{config:t})}enable(e){return this.http.post(`${this.url}/${e}/enable`,null)}disable(e){return this.http.post(`${this.url}/${e}/disable`,null)}getOptions(e){return this.http.get(`${this.url}/${e}/options`)}}return e.\u0275fac=function(t){return new(t||e)(i.dc(a.b))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var Fo=n("2EZI"),Yo=n("p4Cf");function zo(e,t){if(1&e&&(i.Sb(0,"cd-helper"),i.Oc(1),i.jc(2,"upperFirst"),i.Rb()),2&e){const e=i.ic().$implicit;i.yb(1),i.Qc(" ",i.kc(2,1,e.value.long_desc||e.value.desc)," ")}}function $o(e,t){if(1&e&&(i.Sb(0,"div",15),i.Sb(1,"div",16),i.Nb(2,"input",17),i.Nb(3,"label",18),i.Rb(),i.Rb()),2&e){const e=i.ic().$implicit;i.yb(2),i.qc("id",e.value.name),i.qc("formControlName",e.value.name),i.yb(1),i.qc("for",e.value.name)}}function Ho(e,t){if(1&e&&i.Nb(0,"input",22),2&e){const e=i.ic(2).$implicit;i.qc("id",e.value.name),i.qc("formControlName",e.value.name)}}function Wo(e,t){if(1&e&&(i.Sb(0,"option",25),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("ngValue",e),i.yb(1),i.Qc(" ",e," ")}}function Vo(e,t){if(1&e&&(i.Sb(0,"select",23),i.Mc(1,Wo,2,2,"option",24),i.Rb()),2&e){const e=i.ic(2).$implicit;i.qc("id",e.value.name),i.qc("formControlName",e.value.name),i.yb(1),i.pc("ngForOf",e.value.enum_allowed)}}function Bo(e,t){1&e&&(i.Sb(0,"span",26),i.Wb(1,27),i.Rb())}function Uo(e,t){1&e&&(i.Sb(0,"span",26),i.Wb(1,28),i.Rb())}function qo(e,t){if(1&e&&(i.Sb(0,"div",15),i.Mc(1,Ho,1,2,"input",19),i.Mc(2,Vo,2,3,"select",20),i.Mc(3,Bo,2,0,"span",21),i.Mc(4,Uo,2,0,"span",21),i.Rb()),2&e){const e=i.ic().$implicit;i.ic();const t=i.Ac(2),n=i.ic();i.yb(1),i.pc("ngIf",0===e.value.enum_allowed.length),i.yb(1),i.pc("ngIf",e.value.enum_allowed.length>0),i.yb(1),i.pc("ngIf",n.mgrModuleForm.showError(e.value.name,t,"invalidUuid")),i.yb(1),i.pc("ngIf",n.mgrModuleForm.showError(e.value.name,t,"pattern"))}}function Go(e,t){1&e&&(i.Sb(0,"span",26),i.Wb(1,30),i.Rb())}function Jo(e,t){if(1&e&&(i.Sb(0,"span",26),i.Wb(1,31),i.Rb()),2&e){const e=i.ic(2).$implicit;i.yb(1),i.ac(e.value.max),i.Xb(1)}}function Qo(e,t){if(1&e&&(i.Sb(0,"span",26),i.Wb(1,32),i.Rb()),2&e){const e=i.ic(2).$implicit;i.yb(1),i.ac(e.value.min),i.Xb(1)}}function Ko(e,t){1&e&&(i.Sb(0,"span",26),i.Wb(1,33),i.Rb())}function Zo(e,t){if(1&e&&(i.Sb(0,"div",15),i.Nb(1,"input",29),i.Mc(2,Go,2,0,"span",21),i.Mc(3,Jo,2,1,"span",21),i.Mc(4,Qo,2,1,"span",21),i.Mc(5,Ko,2,0,"span",21),i.Rb()),2&e){const e=i.ic().$implicit;i.ic();const t=i.Ac(2),n=i.ic();i.yb(1),i.qc("id",e.value.name),i.qc("formControlName",e.value.name),i.qc("min",e.value.min),i.qc("max",e.value.max),i.yb(1),i.pc("ngIf",n.mgrModuleForm.showError(e.value.name,t,"required")),i.yb(1),i.pc("ngIf",n.mgrModuleForm.showError(e.value.name,t,"max")),i.yb(1),i.pc("ngIf",n.mgrModuleForm.showError(e.value.name,t,"min")),i.yb(1),i.pc("ngIf",n.mgrModuleForm.showError(e.value.name,t,"pattern"))}}function Xo(e,t){1&e&&(i.Sb(0,"span",26),i.Wb(1,35),i.Rb())}function ea(e,t){1&e&&(i.Sb(0,"span",26),i.Wb(1,36),i.Rb())}function ta(e,t){if(1&e&&(i.Sb(0,"div",15),i.Nb(1,"input",34),i.Mc(2,Xo,2,0,"span",21),i.Mc(3,ea,2,0,"span",21),i.Rb()),2&e){const e=i.ic().$implicit;i.ic();const t=i.Ac(2),n=i.ic();i.yb(1),i.qc("id",e.value.name),i.qc("formControlName",e.value.name),i.yb(1),i.pc("ngIf",n.mgrModuleForm.showError(e.value.name,t,"required")),i.yb(1),i.pc("ngIf",n.mgrModuleForm.showError(e.value.name,t,"pattern"))}}const na=function(){return["addr","str","uuid"]},ia=function(){return["uint","int","size","secs"]};function ra(e,t){if(1&e&&(i.Sb(0,"div",11),i.Sb(1,"label",12),i.Oc(2),i.Mc(3,zo,3,3,"cd-helper",13),i.Rb(),i.Mc(4,$o,4,3,"div",14),i.Mc(5,qo,5,4,"div",14),i.Mc(6,Zo,6,8,"div",14),i.Mc(7,ta,4,4,"div",14),i.Rb()),2&e){const e=t.$implicit;i.yb(1),i.qc("for",e.value.name),i.yb(1),i.Qc(" ",e.value.name," "),i.yb(1),i.pc("ngIf",e.value.long_desc||e.value.desc),i.yb(1),i.pc("ngIf","bool"===e.value.type),i.yb(1),i.pc("ngIf",i.tc(7,na).includes(e.value.type)),i.yb(1),i.pc("ngIf",i.tc(8,ia).includes(e.value.type)),i.yb(1),i.pc("ngIf","float"===e.value.type)}}function sa(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",1),i.Sb(1,"form",2,3),i.Sb(3,"div",4),i.Sb(4,"div",5),i.Wb(5,6),i.Rb(),i.Sb(6,"div",7),i.Mc(7,ra,8,9,"div",8),i.jc(8,"keyvalue"),i.Rb(),i.Sb(9,"div",9),i.Sb(10,"cd-form-button-panel",10),i.gc("submitActionEvent",(function(){return i.Dc(e),i.ic().onSubmit()})),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.ic();i.yb(1),i.pc("formGroup",e.mgrModuleForm),i.yb(6),i.pc("ngForOf",i.kc(8,4,e.moduleOptions)),i.yb(3),i.pc("form",e.mgrModuleForm)("submitText",e.actionLabels.UPDATE)}}let oa=(()=>{class e extends Gn.a{constructor(e,t,n,i,r,s){super(),this.actionLabels=e,this.route=t,this.router=n,this.formBuilder=i,this.mgrModuleService=r,this.notificationService=s,this.moduleName="",this.moduleOptions=[]}ngOnInit(){this.route.params.subscribe(e=>{this.moduleName=decodeURIComponent(e.name);const t=[this.mgrModuleService.getOptions(this.moduleName),this.mgrModuleService.getConfig(this.moduleName)];Object(jo.a)(t).subscribe(e=>{this.moduleOptions=e[0],this.createForm(),this.mgrModuleForm.setValue(e[1]),this.loadingReady()},e=>{this.loadingError()})})}getValidators(e){const t=[];switch(e.type){case"addr":t.push(Cn.a.ip());break;case"uint":case"int":case"size":case"secs":t.push(Cn.a.number()),t.push(xn.A.required),Nt.a.isNumber(e.min)&&t.push(xn.A.min(e.min)),Nt.a.isNumber(e.max)&&t.push(xn.A.max(e.max));break;case"str":Nt.a.isNumber(e.min)&&t.push(xn.A.minLength(e.min)),Nt.a.isNumber(e.max)&&t.push(xn.A.maxLength(e.max));break;case"float":t.push(xn.A.required),t.push(Cn.a.decimalNumber());break;case"uuid":t.push(Cn.a.uuid())}return t}createForm(){const e={};Nt.a.forEach(this.moduleOptions,t=>{e[t.name]=[t.default_value,this.getValidators(t)]}),this.mgrModuleForm=this.formBuilder.group(e)}goToListView(){this.router.navigate(["/mgr-modules"])}onSubmit(){if(this.mgrModuleForm.pristine)return void this.goToListView();const e={};Nt.a.forEach(this.moduleOptions,t=>{const n=this.mgrModuleForm.get(t.name);n.dirty&&n.valid&&(e[t.name]=n.value)}),this.mgrModuleService.updateConfig(this.moduleName,e).subscribe(()=>{this.notificationService.show(yn.a.success,"Updated options for module '" + this.moduleName + "'."),this.goToListView()},()=>{this.mgrModuleForm.setErrors({cdSubmitButton:!0})})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(gn.b),i.Mb(Pt.a),i.Mb(Pt.e),i.Mb(Fo.a),i.Mb(No),i.Mb(wn.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-mgr-module-form"]],features:[i.vb],decls:1,vars:1,consts:function(){return[["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],["name","mgrModuleForm","novalidate","",3,"formGroup"],["frm","ngForm"],[1,"card"],[1,"card-header"],"Edit Manager module",[1,"card-body"],["class","form-group row",4,"ngFor","ngForOf"],[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],[1,"form-group","row"],[1,"cd-col-form-label",3,"for"],[4,"ngIf"],["class","cd-col-form-input",4,"ngIf"],[1,"cd-col-form-input"],[1,"custom-control","custom-checkbox"],["type","checkbox",1,"custom-control-input",3,"id","formControlName"],[1,"custom-control-label",3,"for"],["class","form-control","type","text",3,"id","formControlName",4,"ngIf"],["class","form-control custom-select",3,"id","formControlName",4,"ngIf"],["class","invalid-feedback",4,"ngIf"],["type","text",1,"form-control",3,"id","formControlName"],[1,"form-control","custom-select",3,"id","formControlName"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngValue"],[1,"invalid-feedback"],"The entered value is not a valid UUID, e.g.: 67dcac9f-2c03-4d6c-b7bd-1210b3a259a8","The entered value needs to be a valid IP address.",["type","number",1,"form-control",3,"id","formControlName","min","max"],"This field is required.","The entered value is too high! It must be lower or equal to " + "\ufffd0\ufffd" + ".","The entered value is too low! It must be greater or equal to " + "\ufffd0\ufffd" + ".","The entered value needs to be a number.",["type","number",1,"form-control",3,"id","formControlName"],"This field is required.","The entered value needs to be a number or decimal."]},template:function(e,t){1&e&&i.Mc(0,sa,11,6,"div",0),2&e&&i.pc("cdFormLoading",t.loading)},directives:[Kn.a,xn.C,xn.r,xn.k,Zn.a,o.q,ti.a,Xn.a,o.r,Yo.a,On.a,xn.b,ei.a,xn.q,xn.i,xn.d,xn.z,xn.u,xn.B,xn.v],pipes:[o.k,sr.a],styles:[""]}),e})();var aa=n("jtHE");const ca=["*"],la=["templateOutlet"];function ua(e,t){if(1&e&&(i.Sb(0,"div",6),i.Oc(1),i.Rb()),2&e){const e=i.ic(2);i.yb(1),i.Qc(" ",e.message||e.defaultMessage," ")}}function da(e,t){if(1&e&&(i.Sb(0,"div",3),i.Nb(1,"div",4),i.Mc(2,ua,2,1,"div",5),i.Rb()),2&e){const e=i.ic();i.yb(2),i.pc("ngIf",e.message||e.defaultMessage)}}function ha(e,t){}function fa(e,t){1&e&&i.Mc(0,ha,0,0,"ng-template",null,7,i.Nc)}const pa=function(e){return{active:e}};let ma=(()=>{class e{}return e.START="start",e.STOP="stop",e.UPDATE="update",e.RESET="reset",e.RESET_GLOBAL="reset_global",e.UNSUBSCRIBE="unsubscribe",e})();const ba="block-ui-main";let ga=(()=>{let e=class{constructor(){this.blockUISettings={},this.blockUIInstances={},this.blockUISubject=new aa.a(1),this.blockUIObservable=this.blockUISubject.asObservable(),this.blockUIObservable.subscribe(this.blockUIMiddleware.bind(this))}getSettings(){return this.blockUISettings}updateSettings(e={}){this.blockUISettings=Object.assign(Object.assign({},this.blockUISettings),e)}decorate(e="block-ui-main"){const t={name:e,isActive:!1,blockCount:0,start:this.dispatch(this.blockUISubject,ma.START,e),update:this.dispatch(this.blockUISubject,ma.UPDATE,e),stop:this.dispatch(this.blockUISubject,ma.STOP,e),reset:this.dispatch(this.blockUISubject,ma.RESET,e),resetGlobal:this.dispatch(this.blockUISubject,ma.RESET_GLOBAL,e),unsubscribe:this.dispatch(this.blockUISubject,ma.UNSUBSCRIBE,e)};return this.blockUIInstances[e]=this.blockUIInstances[e]||t,t}observe(){return this.blockUIObservable}clearInstance(e){this.dispatch(this.blockUISubject,ma.RESET,e)}blockUIMiddleware({action:e,name:t}){let n=null;switch(e){case ma.START:n=!0;break;case ma.STOP:case ma.RESET:n=!1}null!==n&&(this.blockUIInstances[t].isActive=n)}dispatch(e,t,n="block-ui-main"){return i=>{e.next({name:n,action:t,message:i})}}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Ib({token:e,factory:function(t){return e.\u0275fac(t)}}),e})(),_a=(()=>{let e=class{constructor(e){this.blockUI=e}ngOnInit(){this.name=this.name||ba,this.template=this.template||this.blockUI.blockUISettings.template}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(ga))},e.\u0275cmp=i.Gb({type:e,selectors:[["block-ui"]],inputs:{name:"name",template:"template",message:"message",delayStart:"delayStart",delayStop:"delayStop"},ngContentSelectors:ca,decls:2,vars:5,consts:[[3,"name","message","template","delayStart","delayStop"]],template:function(e,t){1&e&&(i.oc(),i.nc(0),i.Nb(1,"block-ui-content",0)),2&e&&(i.yb(1),i.pc("name",t.name)("message",t.message)("template",t.template)("delayStart",t.delayStart)("delayStop",t.delayStop))},directives:function(){return[ya]},encapsulation:2}),e})(),ya=(()=>{let e=class{constructor(e,t,n){this.blockUI=e,this.resolver=t,this.changeDetectionRef=n,this.name=ba,this.defaultBlockState={startTimeouts:[],stopTimeouts:[],updateTimeouts:[],blockCount:0,startCallCount:0,stopCallCount:0},this.state=Object.assign({},this.defaultBlockState)}ngOnInit(){this.settings=this.blockUI.getSettings(),this.blockUISubscription=this.subscribeToBlockUI(this.blockUI.observe())}ngAfterViewInit(){try{if(!this.templateCmp)return!1;if(this.templateCmp instanceof i.L)this.templateOutlet.createEmbeddedView(this.templateCmp);else{const e=this.resolver.resolveComponentFactory(this.templateCmp);this.templateCompRef=this.templateOutlet.createComponent(e),this.updateBlockTemplate(this.message)}}catch(e){console.error("ng-block-ui:",e)}}ngAfterViewChecked(){this.detectChanges()}subscribeToBlockUI(e){return e.subscribe(e=>this.onDispatchedEvent(e))}onDispatchedEvent(e){switch(e.action){case ma.START:this.onStart(e);break;case ma.STOP:this.onStop(e);break;case ma.UPDATE:this.onUpdate(e);break;case ma.RESET:this.onReset(e);break;case ma.RESET_GLOBAL:this.resetState();break;case ma.UNSUBSCRIBE:this.onStop(e),this.onUnsubscribe(e.name)}}onStart({name:e,message:t}){if(e===this.name){const e=this.delayStart||this.settings.delayStart||0;this.state.startCallCount+=1;const n=setTimeout(()=>{this.state.blockCount+=1,this.showBlock(t),this.updateInstanceBlockCount()},e);this.state.startTimeouts.push(n)}}onStop({name:e}){if(e===this.name){const e=this.state.stopCallCount+1;if(this.state.startCallCount-e>=0){const t=this.delayStop||this.settings.delayStop||0;this.state.stopCallCount=e;const n=setTimeout(()=>{this.state.blockCount-=1,this.updateInstanceBlockCount(),this.detectChanges()},t);this.state.stopTimeouts.push(n)}}}onUpdate({name:e,message:t}){if(e===this.name){const e=this.delayStart||this.settings.delayStart||0;clearTimeout(this.state.updateTimeouts[0]);const n=setTimeout(()=>{this.updateMessage(t)},e);this.state.updateTimeouts.push(n)}}onReset({name:e}){e===this.name&&this.resetState()}updateMessage(e){this.showBlock(e)}showBlock(e){this.message=e||this.defaultMessage||this.settings.message,this.updateBlockTemplate(this.message),this.detectChanges()}updateBlockTemplate(e){this.templateCompRef&&this.templateCompRef instanceof i.k&&(this.templateCompRef.instance.message=e)}resetState(){[...this.state.startTimeouts,...this.state.stopTimeouts,...this.state.updateTimeouts].forEach(clearTimeout),this.state=Object.assign({},this.defaultBlockState),this.updateInstanceBlockCount(),this.detectChanges()}onUnsubscribe(e){this.blockUISubscription&&e===this.name&&this.blockUISubscription.unsubscribe()}updateInstanceBlockCount(){if(this.blockUI.blockUIInstances[this.name]){const{blockCount:e}=this.state;this.blockUI.blockUIInstances[this.name].blockCount=e}}detectChanges(){this.changeDetectionRef.destroyed||this.changeDetectionRef.detectChanges()}ngOnDestroy(){this.resetState(),this.onUnsubscribe(this.name),this.blockUI.clearInstance(this.name)}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(ga),i.Mb(i.j),i.Mb(i.h))},e.\u0275cmp=i.Gb({type:e,selectors:[["block-ui-content"]],viewQuery:function(e,t){var n;1&e&&i.Tc(la,!0,i.P),2&e&&i.zc(n=i.hc())&&(t.templateOutlet=n.first)},inputs:{name:"name",delayStart:"delayStart",delayStop:"delayStop",defaultMessage:["message","defaultMessage"],templateCmp:["template","templateCmp"]},decls:3,vars:9,consts:[[3,"ngClass"],["class","block-ui-spinner",4,"ngIf"],[4,"ngIf"],[1,"block-ui-spinner"],[1,"loader"],["class","message",4,"ngIf"],[1,"message"],["templateOutlet",""]],template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Mc(1,da,3,1,"div",1),i.Mc(2,fa,2,0,void 0,2),i.Rb()),2&e&&(i.Cb("block-ui-wrapper ",t.name," ",t.className,""),i.pc("ngClass",i.uc(7,pa,t.state.blockCount>0)),i.yb(1),i.pc("ngIf",!t.templateCmp),i.yb(1),i.pc("ngIf",t.templateCmp))},directives:[o.p,o.r],styles:["\n.block-ui-wrapper {\n display: none;\n position: fixed;\n height: 100%;\n width: 100%;\n top: 0;\n left: 0;\n background: rgba(0, 0, 0, 0.70);\n z-index: 30000;\n cursor: wait;\n}\n\n.block-ui-wrapper.block-ui-wrapper--element {\n position: absolute;\n}\n\n.block-ui-wrapper.active {\n display: block;\n}\n\n.block-ui-wrapper.block-ui-main {\n position: fixed;\n}\n\n.block-ui-spinner,\n.block-ui-template {\n position: absolute;\n top: 40%;\n margin: 0 auto;\n left: 0;\n right: 0;\n transform: translateY(-50%);\n}\n\n.block-ui-spinner > .message {\n font-size: 1.3em;\n text-align: center;\n color: #fff;\n}\n\n.block-ui__element {\n position: relative;\n}\n\n.loader,\n.loader:after {\n border-radius: 50%;\n width: 10em;\n height: 10em;\n}\n.loader {\n margin: 7px auto;\n font-size: 5px;\n position: relative;\n text-indent: -9999em;\n border-top: 1.1em solid rgba(255, 255, 255, 0.2);\n border-right: 1.1em solid rgba(255, 255, 255, 0.2);\n border-bottom: 1.1em solid rgba(255, 255, 255, 0.2);\n border-left: 1.1em solid #ffffff;\n -webkit-transform: translateZ(0);\n -ms-transform: translateZ(0);\n transform: translateZ(0);\n -webkit-animation: load8 1.1s infinite linear;\n animation: load8 1.1s infinite linear;\n}\n\n@-webkit-keyframes load8 {\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 load8 {\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"],encapsulation:2}),e})(),va=(()=>{let e=class{constructor(e){this.blockUIInstance=e,this.globalDispatch=this.blockUIInstance.decorate()}start(e,t){this.dispatch(e,ma.START,t)}stop(e){this.dispatch(e,ma.STOP)}reset(e){this.dispatch(e,ma.RESET)}resetGlobal(){this.globalDispatch.resetGlobal()}update(e,t){this.dispatch(e,ma.UPDATE,t)}unsubscribe(e){this.dispatch(e,ma.UNSUBSCRIBE)}isActive(e=null){const t=e?this.toArray(e):null,n=this.blockUIInstance.blockUIInstances;return Object.keys(n).some(e=>t?t.indexOf(n[e].name)>=0&&n[e].isActive:n[e].isActive)}dispatch(e=[],t,n){this.toArray(e).forEach(e=>this.blockUIInstance.decorate(e)[t](n))}toArray(e=[]){return"string"==typeof e?[e]:e}};return e.\u0275fac=function(t){return new(t||e)(i.dc(ga))},e.\u0275prov=i.Ib({token:e,factory:function(t){return e.\u0275fac(t)}}),e})();var wa;const Sa=new ga,Ma=new i.r("BlockUIModuleSettings");function xa(e){return Sa.updateSettings(e),Sa}let ka=(()=>{let e=wa=class{static forRoot(e={}){return{ngModule:wa,providers:[{provide:Ma,useValue:e},{provide:ga,useFactory:xa,deps:[Ma]},va]}}};return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[o.c]]}),e})(),Da=1;function Ta(e,t={}){return t.scopeToInstance?function(t,n){const i=`_${n}-block-ui`;Object.defineProperty(t,n,{get:function(){if(this[i])return this[i];const t=`${e}-${Da++}`;return this[i]=Sa.decorate(t),this[i]},set:function(e){this[i]=e}})}:function(t,n){t[n]=Sa.decorate(e)}}function Ca(e,t){if(1&e&&(i.Qb(0),i.Nb(1,"cd-table-key-value",1),i.Pb()),2&e){const e=i.ic();i.yb(1),i.pc("data",e.module_config)}}let Oa=(()=>{class e{constructor(e){this.mgrModuleService=e}ngOnChanges(){this.selection&&this.mgrModuleService.getConfig(this.selection.name).subscribe(e=>{this.module_config=e})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(No))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-mgr-module-details"]],inputs:{selection:"selection"},features:[i.wb],decls:1,vars:1,consts:[[4,"ngIf"],[3,"data"]],template:function(e,t){1&e&&i.Mc(0,Ca,2,1,"ng-container",0),2&e&&i.pc("ngIf",t.selection)},directives:[o.r,en.a],styles:[""]}),e})(),La=(()=>{class e extends $t.a{constructor(e,t,n){super(),this.authStorageService=e,this.mgrModuleService=t,this.notificationService=n,this.columns=[],this.modules=[],this.selection=new Wt.a,this.permission=this.authStorageService.getPermissions().configOpt,this.columns=[{name:"Name",prop:"name",flexGrow:1},{name:"Enabled",prop:"enabled",flexGrow:1,cellClass:"text-center",cellTransformation:Ht.a.checkIcon},{name:"Always-On",prop:"always_on",flexGrow:1,cellClass:"text-center",cellTransformation:Ht.a.checkIcon}];const i=()=>this.selection.first()&&encodeURIComponent(this.selection.first().name);this.tableActions=[{name:"Edit",permission:"update",disable:()=>!this.selection.hasSelection||0===Object.values(this.selection.first().options).length,routerLink:()=>"/mgr-modules/edit/"+i(),icon:_n.a.edit},{name:"Enable",permission:"update",click:()=>this.updateModuleState(),disable:()=>this.isTableActionDisabled("enabled"),icon:_n.a.start},{name:"Disable",permission:"update",click:()=>this.updateModuleState(),disable:()=>this.getTableActionDisabledDesc(),icon:_n.a.stop}]}getModuleList(e){this.mgrModuleService.list().subscribe(e=>{this.modules=e},()=>{e.error()})}updateSelection(e){this.selection=e}isTableActionDisabled(e){if(!this.selection.hasSelection)return!0;const t=this.selection.first();if("dashboard"===t.name)return!0;if(t.always_on)return!0;switch(e){case"enabled":return t.enabled;case"disabled":return!t.enabled}}getTableActionDisabledDesc(){var e;return(null===(e=this.selection.first())||void 0===e?void 0:e.always_on)?"This Manager module is always on.":this.isTableActionDisabled("disabled")}updateModuleState(){if(!this.selection.hasSelection)return;let e;const t=()=>{Object(Ut.a)(2e3).subscribe(()=>{this.mgrModuleService.list().subscribe(()=>{this.notificationService.suspendToasties(!1),this.blockUI.stop(),this.table.refreshBtn()},()=>{t()})})},n=this.selection.first();e=n.enabled?this.mgrModuleService.disable(n.name):this.mgrModuleService.enable(n.name),e.subscribe(()=>{},()=>{this.notificationService.suspendToasties(!0),this.blockUI.start("Reconnecting, please wait ..."),t()})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Jt.a),i.Mb(No),i.Mb(wn.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-mgr-module-list"]],viewQuery:function(e,t){var n;1&e&&i.Jc(Bt.a,!0),2&e&&i.zc(n=i.hc())&&(t.table=n.first)},features:[i.vb],decls:4,vars:8,consts:[["columnMode","flex","selectionType","single","identifier","module",3,"autoReload","data","columns","hasDetails","setExpandedRow","updateSelection","fetchData"],["table",""],[1,"table-actions",3,"permission","selection","tableActions"],["cdTableDetail","",3,"selection"]],template:function(e,t){1&e&&(i.Sb(0,"cd-table",0,1),i.gc("setExpandedRow",(function(e){return t.setExpandedRow(e)}))("updateSelection",(function(e){return t.updateSelection(e)}))("fetchData",(function(e){return t.getModuleList(e)})),i.Nb(2,"cd-table-actions",2),i.Nb(3,"cd-mgr-module-details",3),i.Rb()),2&e&&(i.pc("autoReload",!1)("data",t.modules)("columns",t.columns)("hasDetails",!0),i.yb(2),i.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions),i.yb(1),i.pc("selection",t.expandedRow))},directives:[Bt.a,Sn.a,Oa],styles:[""]}),Object(Ft.b)([Ta(),Object(Ft.d)("design:type",Object)],e.prototype,"blockUI",void 0),e})(),Ra=(()=>{class e{constructor(e){this.http=e}getMonitor(){return this.http.get("api/monitor")}}return e.\u0275fac=function(t){return new(t||e)(i.dc(a.b))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();function Ea(e,t){if(1&e&&(i.Sb(0,"table",11),i.Sb(1,"tr"),i.Sb(2,"td",12),i.Wb(3,13),i.Rb(),i.Sb(4,"td"),i.Oc(5),i.Rb(),i.Rb(),i.Sb(6,"tr"),i.Sb(7,"td",12),i.Wb(8,14),i.Rb(),i.Sb(9,"td"),i.Oc(10),i.jc(11,"relativeDate"),i.Rb(),i.Rb(),i.Sb(12,"tr"),i.Sb(13,"td",12),i.Wb(14,15),i.Rb(),i.Sb(15,"td"),i.Oc(16),i.Rb(),i.Rb(),i.Sb(17,"tr"),i.Sb(18,"td",12),i.Wb(19,16),i.Rb(),i.Sb(20,"td"),i.Oc(21),i.Rb(),i.Rb(),i.Sb(22,"tr"),i.Sb(23,"td",12),i.Wb(24,17),i.Rb(),i.Sb(25,"td"),i.Oc(26),i.Rb(),i.Rb(),i.Sb(27,"tr"),i.Sb(28,"td",12),i.Wb(29,18),i.Rb(),i.Sb(30,"td"),i.Oc(31),i.Rb(),i.Rb(),i.Sb(32,"tr"),i.Sb(33,"td",12),i.Wb(34,19),i.Rb(),i.Sb(35,"td"),i.Oc(36),i.Rb(),i.Rb(),i.Rb()),2&e){const e=i.ic();i.yb(5),i.Pc(e.mon_status.monmap.fsid),i.yb(5),i.Pc(i.kc(11,7,e.mon_status.monmap.modified)),i.yb(6),i.Pc(e.mon_status.monmap.epoch),i.yb(5),i.Pc(e.mon_status.features.quorum_con),i.yb(5),i.Pc(e.mon_status.features.quorum_mon),i.yb(5),i.Pc(e.mon_status.features.required_con),i.yb(5),i.Pc(e.mon_status.features.required_mon)}}let Aa=(()=>{class e{constructor(e){this.monitorService=e,this.inQuorum={columns:[{prop:"name",name:"Name",cellTransformation:Ht.a.routerLink},{prop:"rank",name:"Rank"},{prop:"public_addr",name:"Public Address"},{prop:"cdOpenSessions",name:"Open Sessions",cellTransformation:Ht.a.sparkline,comparator:(e,t)=>{const n=Nt.a.last(e),i=Nt.a.last(t);return n&&i&&n!==i?n>i?1:-1:0}}]},this.notInQuorum={columns:[{prop:"name",name:"Name",cellTransformation:Ht.a.routerLink},{prop:"rank",name:"Rank"},{prop:"public_addr",name:"Public Address"}]}}refresh(){this.monitorService.getMonitor().subscribe(e=>{e.in_quorum.map(e=>(e.cdOpenSessions=e.stats.num_sessions.map(e=>e[1]),e.cdLink="/perf_counters/mon/"+e.name,e.cdParams={fromLink:"/monitor"},e)),e.out_quorum.map(e=>(e.cdLink="/perf_counters/mon/"+e.name,e.cdParams={fromLink:"/monitor"},e)),this.inQuorum.data=[...e.in_quorum],this.notInQuorum.data=[...e.out_quorum],this.mon_status=e.mon_status})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Ra))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-monitor"]],decls:13,vars:5,consts:function(){return[[1,"row"],[1,"col-lg-4"],[1,"cd-header"],"Status",["class","table table-striped",4,"ngIf"],[1,"col-lg-8"],[1,"in-quorum","cd-header"],"In Quorum",[3,"data","columns"],"Not In Quorum",[3,"data","columns","fetchData"],[1,"table","table-striped"],[1,"bold"],"Cluster ID","monmap modified","monmap epoch","quorum con","quorum mon","required con","required mon"]},template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Sb(1,"div",1),i.Sb(2,"fieldset"),i.Sb(3,"legend",2),i.Wb(4,3),i.Rb(),i.Mc(5,Ea,37,9,"table",4),i.Rb(),i.Rb(),i.Sb(6,"div",5),i.Sb(7,"legend",6),i.Wb(8,7),i.Rb(),i.Nb(9,"cd-table",8),i.Sb(10,"legend",6),i.Wb(11,9),i.Rb(),i.Sb(12,"cd-table",10),i.gc("fetchData",(function(){return t.refresh()})),i.Rb(),i.Rb(),i.Rb()),2&e&&(i.yb(5),i.pc("ngIf",t.mon_status),i.yb(4),i.pc("data",t.inQuorum.data)("columns",t.inQuorum.columns),i.yb(3),i.pc("data",t.notInQuorum.data)("columns",t.notInQuorum.columns))},directives:[o.r,Bt.a],pipes:[$r.a],styles:[""]}),e})();var Ia=n("ajRT");let Pa=(()=>{class e{constructor(e,t,n,r,s){this.activeModal=e,this.actionLabels=t,this.formBuilder=n,this.osdService=r,this.taskWrapper=s,this.driveGroups=[],this.submitAction=new i.o,this.action=t.CREATE,this.createForm()}createForm(){this.formGroup=this.formBuilder.group({})}onSubmit(){this.taskWrapper.wrapTaskAroundCall({task:new tr.a("osd/"+gn.e.CREATE,{tracking_id:Nt.a.join(Nt.a.map(this.driveGroups,"service_id"),", ")}),call:this.osdService.create(this.driveGroups)}).subscribe({error:()=>{this.formGroup.setErrors({cdSubmitButton:!0})},complete:()=>{this.submitAction.emit(),this.activeModal.close()}})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Qt.a),i.Mb(gn.b),i.Mb(Fo.a),i.Mb(mr),i.Mb(nr.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-osd-creation-preview-modal"]],inputs:{driveGroups:"driveGroups"},outputs:{submitAction:"submitAction"},decls:15,vars:9,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"OSD creation preview",[1,"modal-content"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],"DriveGroups",[1,"modal-footer"],[3,"form","submitText","submitActionEvent"]]},template:function(e,t){1&e&&(i.Sb(0,"cd-modal",0),i.Qb(1,1),i.Wb(2,2),i.Pb(),i.Qb(3,3),i.Sb(4,"form",4,5),i.Sb(6,"div",6),i.Sb(7,"h4"),i.Wb(8,7),i.Rb(),i.Sb(9,"pre"),i.Oc(10),i.jc(11,"json"),i.Rb(),i.Rb(),i.Sb(12,"div",8),i.Sb(13,"cd-form-button-panel",9),i.gc("submitActionEvent",(function(){return t.onSubmit()})),i.jc(14,"titlecase"),i.Rb(),i.Rb(),i.Rb(),i.Pb(),i.Rb()),2&e&&(i.pc("modalRef",t.activeModal),i.yb(4),i.pc("formGroup",t.formGroup),i.yb(6),i.Pc(i.kc(11,5,t.driveGroups)),i.yb(3),i.pc("form",t.formGroup)("submitText",i.kc(14,7,t.action)))},directives:[Ia.a,xn.C,xn.r,Zn.a,xn.k,ti.a],pipes:[o.j,o.A],styles:[""]}),e})();const ja=["inventoryDevices"];function Na(e,t){if(1&e&&(i.Sb(0,"span",16),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.yb(1),i.Qc(" ",e," ")}}function Fa(e,t){if(1&e&&(i.Sb(0,"cd-alert-panel",13),i.Qb(1),i.Wb(2,14),i.Pb(),i.Mc(3,Na,2,1,"span",15),i.Rb()),2&e){const e=i.ic();i.pc("showTitle",!1),i.yb(3),i.pc("ngForOf",e.requiredFilters)}}function Ya(e,t){if(1&e&&(i.Sb(0,"div"),i.Sb(1,"p",17),i.Sb(2,"span"),i.Wb(3,18),i.jc(4,"dimlessBinary"),i.Rb(),i.Rb(),i.Rb()),2&e){const e=i.ic();i.yb(4),i.ac(e.filteredDevices.length)(i.kc(4,2,e.capacity)),i.Xb(3)}}const za=function(){return["available","osd_ids"]};let $a=(()=>{class e{constructor(e,t,n){this.formBuilder=e,this.activeModal=t,this.actionLabels=n,this.submitAction=new i.o,this.icons=_n.a,this.filterColumns=[],this.devices=[],this.filteredDevices=[],this.capacity=0,this.canSubmit=!1,this.requiredFilters=[],this.action=n.ADD,this.createForm()}ngAfterViewInit(){const e=Nt.a.filter(this.inventoryDevices.columns,e=>this.filterColumns.includes(e.prop)&&"hostname"!==e.prop);setTimeout(()=>{this.requiredFilters=Nt.a.map(e,"name")},0)}createForm(){this.formGroup=this.formBuilder.group({})}onFilterChange(e){if(this.capacity=0,this.canSubmit=!1,Nt.a.isEmpty(e.filters))this.filteredDevices=[],this.event=void 0;else{const t=e.filters.filter(e=>"hostname"!==e.prop);this.canSubmit=!Nt.a.isEmpty(t),this.filteredDevices=e.data,this.capacity=Nt.a.sumBy(this.filteredDevices,"sys_api.size"),this.event=e}}onSubmit(){this.submitAction.emit(this.event),this.activeModal.close()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Fo.a),i.Mb(Qt.a),i.Mb(gn.b))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-osd-devices-selection-modal"]],viewQuery:function(e,t){var n;1&e&&i.Tc(ja,!0),2&e&&i.zc(n=i.hc())&&(t.inventoryDevices=n.first)},outputs:{submitAction:"submitAction"},decls:14,vars:14,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"" + "\ufffd0\ufffd" + " devices",[1,"modal-content"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],["type","warning","size","slim",3,"showTitle",4,"ngIf"],[3,"devices","filterColumns","hiddenColumns","filterChange"],["inventoryDevices",""],[4,"ngIf"],[1,"modal-footer"],[3,"form","disabled","submitText","submitActionEvent"],["type","warning","size","slim",3,"showTitle"],"At least one of these filters must be applied in order to proceed:",["class","badge badge-dark ml-2",4,"ngFor","ngForOf"],[1,"badge","badge-dark","ml-2"],[1,"text-center"],"Number of devices: " + "\ufffd0\ufffd" + ". Raw capacity: " + "\ufffd1\ufffd" + "."]},template:function(e,t){1&e&&(i.Sb(0,"cd-modal",0),i.Qb(1,1),i.Wb(2,2),i.Pb(),i.Qb(3,3),i.Sb(4,"form",4,5),i.Sb(6,"div",6),i.Mc(7,Fa,4,2,"cd-alert-panel",7),i.Sb(8,"cd-inventory-devices",8,9),i.gc("filterChange",(function(e){return t.onFilterChange(e)})),i.Rb(),i.Mc(10,Ya,5,4,"div",10),i.Rb(),i.Sb(11,"div",11),i.Sb(12,"cd-form-button-panel",12),i.gc("submitActionEvent",(function(){return t.onSubmit()})),i.jc(13,"titlecase"),i.Rb(),i.Rb(),i.Rb(),i.Pb(),i.Rb()),2&e&&(i.pc("modalRef",t.activeModal),i.yb(2),i.ac(t.deviceType),i.Xb(2),i.yb(2),i.pc("formGroup",t.formGroup),i.yb(3),i.pc("ngIf",!t.canSubmit),i.yb(1),i.pc("devices",t.devices)("filterColumns",t.filterColumns)("hiddenColumns",i.tc(13,za)),i.yb(2),i.pc("ngIf",t.canSubmit),i.yb(2),i.pc("form",t.formGroup)("disabled",!t.canSubmit||0===t.filteredDevices.length)("submitText",i.kc(13,11,t.action)))},directives:[Ia.a,xn.C,xn.r,Zn.a,xn.k,o.r,Ir,ti.a,br.a,o.q],pipes:[o.A,Zt.a],styles:[""]}),e})();function Ha(e,t){1&e&&(i.Sb(0,"span"),i.Wb(1,7),i.Rb())}function Wa(e,t){1&e&&(i.Sb(0,"span"),i.Wb(1,8),i.Rb())}function Va(e,t){1&e&&(i.Sb(0,"span"),i.Wb(1,9),i.Rb())}const Ba=function(e){return[e]};function Ua(e,t){if(1&e){const e=i.Tb();i.Qb(0),i.Sb(1,"button",10),i.gc("click",(function(){return i.Dc(e),i.ic().showSelectionModal()})),i.Nb(2,"i",11),i.Qb(3),i.Wb(4,12),i.Pb(),i.Rb(),i.Pb()}if(2&e){const e=i.ic();i.yb(1),i.pc("title",e.addButtonTooltip)("disabled",0===e.availDevices.length||!e.canSelect),i.yb(1),i.pc("ngClass",i.uc(3,Ba,e.icons.add))}}function qa(e,t){if(1&e&&(i.Sb(0,"span"),i.Sb(1,"span",19),i.Oc(2),i.Rb(),i.Rb()),2&e){const e=t.$implicit;i.yb(2),i.Rc("",e.name,": ",e.value.formatted,"")}}function Ga(e,t){if(1&e&&(i.Sb(0,"div",20),i.Sb(1,"span"),i.Wb(2,21),i.jc(3,"dimlessBinary"),i.Rb(),i.Rb()),2&e){const e=i.ic(2);i.yb(3),i.ac(i.kc(3,1,e.capacity)),i.Xb(2)}}const Ja=function(){return["available","osd_ids"]},Qa=function(){return[]};function Ka(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",13),i.Mc(1,qa,3,2,"span",14),i.Sb(2,"a",15),i.gc("click",(function(){return i.Dc(e),i.ic().clearDevices(),!1})),i.Nb(3,"i",11),i.Qb(4),i.Wb(5,16),i.Pb(),i.Rb(),i.Rb(),i.Sb(6,"div"),i.Nb(7,"cd-inventory-devices",17),i.Rb(),i.Mc(8,Ga,4,3,"div",18)}if(2&e){const e=i.ic();i.yb(1),i.pc("ngForOf",e.appliedFilters),i.yb(2),i.pc("ngClass",i.uc(6,Ba,e.icons.clearFilters)),i.yb(4),i.pc("devices",e.devices)("hiddenColumns",i.tc(8,Ja))("filterColumns",i.tc(9,Qa)),i.yb(1),i.pc("ngIf","data"===e.type)}}let Za=(()=>{class e{constructor(e){this.modalService=e,this.selected=new i.o,this.cleared=new i.o,this.icons=_n.a,this.devices=[],this.capacity=0,this.appliedFilters=[],this.tooltips={noAvailDevices:"No available devices",addPrimaryFirst:"Please add primary devices first",addByFilters:"Add devices by using filters"}}ngOnInit(){this.updateAddButtonTooltip()}ngOnChanges(){this.updateAddButtonTooltip()}showSelectionModal(){let e=["human_readable_type","sys_api.vendor","sys_api.model","sys_api.size"];"data"===this.type&&(e=["hostname",...e]),this.modalService.show($a,{hostname:this.hostname,deviceType:this.name,devices:this.availDevices,filterColumns:e},{size:"xl"}).componentInstance.submitAction.subscribe(e=>{this.devices=e.data,this.capacity=Nt.a.sumBy(this.devices,"sys_api.size"),this.appliedFilters=e.filters;const t=Nt.a.assign({type:this.type},e);this.selected.emit(t)})}updateAddButtonTooltip(){this.addButtonTooltip="data"===this.type&&0===this.availDevices.length?this.tooltips.noAvailDevices:this.canSelect?0===this.availDevices.length?this.tooltips.noAvailDevices:this.tooltips.addByFilters:this.tooltips.addPrimaryFirst}clearDevices(){const e={type:this.type,clearedDevices:[...this.devices]};this.devices=[],this.cleared.emit(e)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(vn.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-osd-devices-selection-groups"]],inputs:{type:"type",name:"name",hostname:"hostname",availDevices:"availDevices",canSelect:"canSelect"},outputs:{selected:"selected",cleared:"cleared"},features:[i.wb],decls:12,vars:6,consts:function(){return[[1,"form-group","row"],["for","createDeleteButton",1,"cd-col-form-label"],"" + "\ufffd0\ufffd" + " devices",[4,"ngIf"],[1,"cd-col-form-input"],[4,"ngIf","ngIfElse"],["blockClearDevices",""],"The primary storage devices. These devices contain all OSD data.","Write-Ahead-Log devices. These devices are used for BlueStore\u2019s internal journal. It is only useful to use a WAL device if the device is faster than the primary device (e.g. NVME devices or SSDs). If there is only a small amount of fast storage available (e.g., less than a gigabyte), we recommend using it as a WAL device.","DB devices can be used for storing BlueStore\u2019s internal metadata. It is only helpful to provision a DB device if it is faster than the primary device (e.g. NVME devices or SSD).",["type","button","data-toggle","tooltip",1,"btn","btn-light",3,"title","disabled","click"],[3,"ngClass"],"Add",[1,"pb-2","my-2","border-bottom"],[4,"ngFor","ngForOf"],["href","",1,"tc_clearSelections",3,"click"],"Clear",[3,"devices","hiddenColumns","filterColumns"],["class","float-right",4,"ngIf"],[1,"badge","badge-dark","mr-2"],[1,"float-right"],"Raw capacity: " + "\ufffd0\ufffd" + ""]},template:function(e,t){if(1&e&&(i.Sb(0,"div",0),i.Sb(1,"label",1),i.Qb(2),i.Wb(3,2),i.Pb(),i.Sb(4,"cd-helper"),i.Mc(5,Ha,2,0,"span",3),i.Mc(6,Wa,2,0,"span",3),i.Mc(7,Va,2,0,"span",3),i.Rb(),i.Rb(),i.Sb(8,"div",4),i.Mc(9,Ua,5,5,"ng-container",5),i.Mc(10,Ka,9,10,"ng-template",null,6,i.Nc),i.Rb(),i.Rb()),2&e){const e=i.Ac(11);i.yb(3),i.ac(t.name),i.Xb(3),i.yb(2),i.pc("ngIf","data"===t.type),i.yb(1),i.pc("ngIf","wal"===t.type),i.yb(1),i.pc("ngIf","db"===t.type),i.yb(2),i.pc("ngIf",0===t.devices.length)("ngIfElse",e)}},directives:[Xn.a,Yo.a,o.r,On.a,o.p,o.q,Ir],pipes:[Zt.a],styles:[".tc_clearSelections[_ngcontent-%COMP%]{text-decoration:none}"]}),e})();var Xa=n("aXbf");class ec{constructor(){this.reset(),this.formatterService=new Xa.a,this.deviceSelectionAttrs={"sys_api.vendor":{name:"vendor"},"sys_api.model":{name:"model"},device_id:{name:"device_id"},human_readable_type:{name:"rotational",formatter:e=>"hdd"===e.toLowerCase()},"sys_api.size":{name:"size",formatter:e=>this.formatterService.format_number(e,1024,["B","KB","MB","GB","TB","PB"]).replace(" ","")}}}reset(){this.spec={service_type:"osd",service_id:"dashboard-"+Nt.a.now()}}setName(e){this.spec.service_id=e}setHostPattern(e){this.spec.host_pattern=e}setDeviceSelection(e,t){const n=e+"_devices";this.spec[n]={},t.forEach(e=>{const t=this.deviceSelectionAttrs[e.prop];t&&(this.spec[n][t.name]=t.formatter?t.formatter(e.value.raw):e.value.raw)})}clearDeviceSelection(e){delete this.spec[e+"_devices"]}setSlots(e,t){const n=e+"_slots";0===t?delete this.spec[n]:this.spec[n]=t}setFeature(e,t){t?this.spec[e]=!0:delete this.spec[e]}}const tc=["dataDeviceSelectionGroups"],nc=["walDeviceSelectionGroups"],ic=["dbDeviceSelectionGroups"],rc=["previewButtonPanel"];function sc(e,t){1&e&&i.Nb(0,"cd-orchestrator-doc-panel")}function oc(e,t){1&e&&(i.Sb(0,"span",33),i.Wb(1,34),i.Rb())}function ac(e,t){if(1&e&&(i.Sb(0,"div",26),i.Sb(1,"label",27),i.Qb(2),i.Wb(3,28),i.Pb(),i.Sb(4,"cd-helper"),i.Sb(5,"span"),i.Wb(6,29),i.Rb(),i.Nb(7,"br"),i.Sb(8,"span"),i.Wb(9,30),i.Rb(),i.Rb(),i.Rb(),i.Sb(10,"div",21),i.Nb(11,"input",31),i.Mc(12,oc,2,0,"span",32),i.Rb(),i.Rb()),2&e){i.ic();const e=i.Ac(2),t=i.ic();i.yb(12),i.pc("ngIf",t.form.showError("walSlots",e,"min"))}}function cc(e,t){1&e&&(i.Sb(0,"span",33),i.Wb(1,40),i.Rb())}function lc(e,t){if(1&e&&(i.Sb(0,"div",26),i.Sb(1,"label",35),i.Qb(2),i.Wb(3,36),i.Pb(),i.Sb(4,"cd-helper"),i.Sb(5,"span"),i.Wb(6,37),i.Rb(),i.Nb(7,"br"),i.Sb(8,"span"),i.Wb(9,38),i.Rb(),i.Rb(),i.Rb(),i.Sb(10,"div",21),i.Nb(11,"input",39),i.Mc(12,cc,2,0,"span",32),i.Rb(),i.Rb()),2&e){i.ic();const e=i.Ac(2),t=i.ic();i.yb(12),i.pc("ngIf",t.form.showError("dbSlots",e,"min"))}}function uc(e,t){if(1&e&&(i.Sb(0,"div",41),i.Nb(1,"input",42),i.Sb(2,"label",43),i.Oc(3),i.Rb(),i.Rb()),2&e){const e=t.$implicit;i.yb(1),i.qc("id",e.key),i.qc("name",e.key),i.qc("formControlName",e.key),i.yb(1),i.qc("for",e.key),i.yb(1),i.Pc(e.desc)}}function dc(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",2),i.Sb(1,"form",3,4),i.Sb(3,"div",5),i.Sb(4,"div",6),i.Wb(5,7),i.jc(6,"titlecase"),i.jc(7,"upperFirst"),i.Rb(),i.Sb(8,"div",8),i.Sb(9,"fieldset"),i.Sb(10,"cd-osd-devices-selection-groups",9,10),i.gc("selected",(function(t){return i.Dc(e),i.ic().onDevicesSelected(t)}))("cleared",(function(t){return i.Dc(e),i.ic().onDevicesCleared(t)})),i.Rb(),i.Rb(),i.Sb(12,"fieldset"),i.Sb(13,"legend"),i.Wb(14,11),i.Rb(),i.Sb(15,"cd-osd-devices-selection-groups",12,13),i.gc("selected",(function(t){return i.Dc(e),i.ic().onDevicesSelected(t)}))("cleared",(function(t){return i.Dc(e),i.ic().onDevicesCleared(t)})),i.Rb(),i.Mc(17,ac,13,1,"div",14),i.Sb(18,"cd-osd-devices-selection-groups",15,16),i.gc("selected",(function(t){return i.Dc(e),i.ic().onDevicesSelected(t)}))("cleared",(function(t){return i.Dc(e),i.ic().onDevicesCleared(t)})),i.Rb(),i.Mc(20,lc,13,1,"div",14),i.Rb(),i.Sb(21,"fieldset"),i.Sb(22,"legend"),i.Wb(23,17),i.Rb(),i.Sb(24,"div",18),i.Sb(25,"label",19),i.Wb(26,20),i.Rb(),i.Sb(27,"div",21),i.Mc(28,uc,4,5,"div",22),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Sb(29,"div",23),i.Sb(30,"cd-form-button-panel",24,25),i.gc("submitActionEvent",(function(){return i.Dc(e),i.ic().submit()})),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.Ac(11),t=i.Ac(16),n=i.Ac(19),r=i.ic();i.yb(1),i.pc("formGroup",r.form),i.yb(6),i.ac(i.kc(6,15,r.action))(i.kc(7,17,r.resource)),i.Xb(5),i.yb(3),i.pc("availDevices",r.availDevices)("canSelect",0!==r.availDevices.length),i.yb(5),i.pc("availDevices",r.availDevices)("canSelect",0!==e.devices.length),i.yb(2),i.pc("ngIf",0!==t.devices.length),i.yb(1),i.pc("availDevices",r.availDevices)("canSelect",0!==e.devices.length),i.yb(2),i.pc("ngIf",0!==n.devices.length),i.yb(8),i.pc("ngForOf",r.featureList),i.yb(2),i.pc("form",r.form)("disabled",0===e.devices.length)("submitText",r.actionLabels.PREVIEW)}}let hc=(()=>{class e extends Gn.a{constructor(e,t,n,i,r,s){super(),this.actionLabels=e,this.authStorageService=t,this.orchService=n,this.hostService=i,this.router=r,this.modalService=s,this.icons=_n.a,this.columns=[],this.allDevices=[],this.availDevices=[],this.dataDeviceFilters=[],this.dbDeviceFilters=[],this.walDeviceFilters=[],this.hostname="",this.driveGroup=new ec,this.featureList=[],this.hasOrchestrator=!0,this.resource="OSDs",this.action=this.actionLabels.CREATE,this.features={encrypted:{key:"encrypted",desc:"Encryption"}},this.featureList=Nt.a.map(this.features,(e,t)=>Object.assign(e,{key:t})),this.createForm()}ngOnInit(){this.orchService.status().subscribe(e=>{this.hasOrchestrator=e.available,e.available?this.getDataDevices():this.loadingNone()}),this.form.get("walSlots").valueChanges.subscribe(e=>this.setSlots("wal",e)),this.form.get("dbSlots").valueChanges.subscribe(e=>this.setSlots("db",e)),Nt.a.each(this.features,e=>{this.form.get("features").get(e.key).valueChanges.subscribe(t=>this.featureFormUpdate(e.key,t))})}createForm(){this.form=new Jn.a({walSlots:new xn.h(0,{validators:[xn.A.min(0)]}),dbSlots:new xn.h(0,{validators:[xn.A.min(0)]}),features:new Jn.a(this.featureList.reduce((e,t)=>(e[t.key]=new xn.h({value:!1,disabled:!0}),e),{}))})}getDataDevices(){this.hostService.inventoryDeviceList().subscribe(e=>{this.allDevices=Nt.a.filter(e,"available"),this.availDevices=[...this.allDevices],this.loadingReady()},()=>{this.allDevices=[],this.availDevices=[],this.loadingError()})}setSlots(e,t){"number"==typeof t&&t>=0&&this.driveGroup.setSlots(e,t)}featureFormUpdate(e,t){this.driveGroup.setFeature(e,t)}enableFeatures(){this.featureList.forEach(e=>{this.form.get(e.key).enable({emitEvent:!1})})}disableFeatures(){this.featureList.forEach(e=>{const t=this.form.get(e.key);t.disable({emitEvent:!1}),t.setValue(!1,{emitEvent:!1})})}onDevicesSelected(e){if(this.availDevices=e.dataOut,"data"===e.type){const t=Nt.a.find(e.filters,{prop:"hostname"});t?(this.hostname=t.value.raw,this.availDevices=e.dataOut.filter(e=>e.hostname===this.hostname),this.driveGroup.setHostPattern(this.hostname)):this.driveGroup.setHostPattern("*"),this.enableFeatures()}this.driveGroup.setDeviceSelection(e.type,e.filters)}onDevicesCleared(e){"data"===e.type?(this.availDevices=[...this.allDevices],this.walDeviceSelectionGroups.devices=[],this.dbDeviceSelectionGroups.devices=[],this.disableFeatures(),this.driveGroup.reset(),this.form.get("walSlots").setValue(0,{emitEvent:!1}),this.form.get("dbSlots").setValue(0,{emitEvent:!1})):(this.availDevices=[...this.availDevices,...e.clearedDevices],this.driveGroup.clearDeviceSelection(e.type),this.form.get(e.type+"Slots").setValue(0,{emitEvent:!1}))}submit(){const e=this.authStorageService.getUsername();this.driveGroup.setName(`dashboard-${e}-${Nt.a.now()}`),this.modalService.show(Pa,{driveGroups:[this.driveGroup.spec]}).componentInstance.submitAction.subscribe(()=>{this.router.navigate(["/osd"])}),this.previewButtonPanel.submitButton.loading=!1}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(gn.b),i.Mb(Jt.a),i.Mb(dr),i.Mb(Xi),i.Mb(Pt.e),i.Mb(vn.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-osd-form"]],viewQuery:function(e,t){var n;1&e&&(i.Tc(tc,!0),i.Tc(nc,!0),i.Tc(ic,!0),i.Tc(rc,!0)),2&e&&(i.zc(n=i.hc())&&(t.dataDeviceSelectionGroups=n.first),i.zc(n=i.hc())&&(t.walDeviceSelectionGroups=n.first),i.zc(n=i.hc())&&(t.dbDeviceSelectionGroups=n.first),i.zc(n=i.hc())&&(t.previewButtonPanel=n.first))},features:[i.vb],decls:2,vars:2,consts:function(){return[[4,"ngIf"],["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],["name","form","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"card"],[1,"card-header"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"card-body"],["name","Primary","type","data",3,"availDevices","canSelect","selected","cleared"],["dataDeviceSelectionGroups",""],"Shared devices",["name","WAL","type","wal",3,"availDevices","canSelect","selected","cleared"],["walDeviceSelectionGroups",""],["class","form-group row",4,"ngIf"],["name","DB","type","db",3,"availDevices","canSelect","selected","cleared"],["dbDeviceSelectionGroups",""],"Configuration",["formGroupName","features",1,"form-group","row"],["for","features",1,"cd-col-form-label"],"Features",[1,"cd-col-form-input"],["class","custom-control custom-checkbox",4,"ngFor","ngForOf"],[1,"card-footer"],["wrappingClass","text-right",3,"form","disabled","submitText","submitActionEvent"],["previewButtonPanel",""],[1,"form-group","row"],["for","walSlots",1,"cd-col-form-label"],"WAL slots","How many OSDs per WAL device.","Specify 0 to let Orchestrator backend decide it.",["id","walSlots","name","walSlots","type","number","min","0","formControlName","walSlots",1,"form-control"],["class","invalid-feedback",4,"ngIf"],[1,"invalid-feedback"],"Value should be greater than or equal to 0",["for","dbSlots",1,"cd-col-form-label"],"DB slots","How many OSDs per DB device.","Specify 0 to let Orchestrator backend decide it.",["id","dbSlots","name","dbSlots","type","number","min","0","formControlName","dbSlots",1,"form-control"],"Value should be greater than or equal to 0",[1,"custom-control","custom-checkbox"],["type","checkbox",1,"custom-control-input",3,"id","name","formControlName"],[1,"custom-control-label",3,"for"]]},template:function(e,t){1&e&&(i.Mc(0,sc,1,0,"cd-orchestrator-doc-panel",0),i.Mc(1,dc,32,19,"div",1)),2&e&&(i.pc("ngIf",!t.hasOrchestrator),i.yb(1),i.pc("cdFormLoading",t.loading))},directives:[o.r,Kn.a,Ar,xn.C,xn.r,Zn.a,xn.k,Za,Xn.a,xn.l,o.q,ti.a,Yo.a,On.a,xn.v,xn.d,ei.a,xn.q,xn.i,xn.b],pipes:[o.A,sr.a],styles:[""]}),e})();function fc(e,t){if(1&e&&(i.Sb(0,"span",18),i.Wb(1,19),i.Rb()),2&e){const e=i.ic(2);i.pc("ngbTooltip",e.clusterWideTooltip)}}function pc(e,t){1&e&&i.Nb(0,"hr",20)}function mc(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",12),i.Sb(1,"input",13),i.gc("change",(function(){i.Dc(e);const n=t.$implicit;return i.ic().changeValue(n)})),i.Rb(),i.Sb(2,"label",14),i.Sb(3,"strong"),i.Oc(4),i.Rb(),i.Mc(5,fc,2,1,"span",15),i.Nb(6,"br"),i.Sb(7,"span",16),i.Oc(8),i.Rb(),i.Rb(),i.Mc(9,pc,1,0,"hr",17),i.Rb()}if(2&e){const e=t.$implicit,n=t.last;i.yb(1),i.pc("checked",e.value)("indeterminate",e.indeterminate)("name",e.code)("id",e.code),i.yb(1),i.pc("for",e.code),i.yb(2),i.Pc(e.name),i.yb(1),i.pc("ngIf",e.clusterWide),i.yb(3),i.Pc(e.description),i.yb(1),i.pc("ngIf",!n)}}let bc=(()=>{class e{constructor(e,t,n,i,r){this.activeModal=e,this.actionLabels=t,this.authStorageService=n,this.osdService=i,this.notificationService=r,this.initialSelection=[],this.osdFlagsForm=new xn.j({}),this.flags=[{code:"noup",name:"No Up",description:"OSDs are not allowed to start",value:!1,clusterWide:!1,indeterminate:!1},{code:"nodown",name:"No Down",description:"OSD failure reports are being ignored, such that the monitors will not mark OSDs down",value:!1,clusterWide:!1,indeterminate:!1},{code:"noin",name:"No In",description:"OSDs that were previously marked out will not be marked back in when they start",value:!1,clusterWide:!1,indeterminate:!1},{code:"noout",name:"No Out",description:"OSDs will not automatically be marked out after the configured interval",value:!1,clusterWide:!1,indeterminate:!1}],this.clusterWideTooltip="The flag has been enabled for the entire cluster.",this.permissions=this.authStorageService.getPermissions()}ngOnInit(){const e=this.selected.length;this.osdService.getFlags().subscribe(t=>{const n=this.getActivatedIndivFlags();this.flags.forEach(i=>{const r=n[i.code];t.includes(i.code)&&(i.clusterWide=!0),r===e?i.value=!0:r>0&&(i.indeterminate=!0)}),this.initialSelection=Nt.a.cloneDeep(this.flags)})}getActivatedIndivFlags(){const e={};return this.flags.forEach(t=>{e[t.code]=0}),[].concat(...this.selected.map(e=>e.state)).map(t=>{Object.keys(e).includes(t)&&(e[t]=e[t]+1)}),e}changeValue(e){e.value=!e.value,e.indeterminate=!1}resetSelection(){this.flags=Nt.a.cloneDeep(this.initialSelection)}submitAction(){const e={};this.flags.forEach(t=>{e[t.code]=t.indeterminate?null:t.value});const t=this.selected.map(e=>e.osd);this.osdService.updateIndividualFlags(e,t).subscribe(()=>{this.notificationService.show(yn.a.success,"Updated OSD Flags"),this.activeModal.close()},()=>{this.activeModal.close()})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Qt.a),i.Mb(gn.b),i.Mb(Jt.a),i.Mb(mr),i.Mb(wn.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-osd-flags-indiv-modal"]],decls:12,vars:6,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"Individual OSD Flags",[1,"modal-content"],["name","osdFlagsForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"modal-body","osd-modal"],["class","custom-control custom-checkbox",4,"ngFor","ngForOf"],[1,"modal-footer"],["type","button",1,"btn","btn-light",3,"click"],"Restore previous selection",[3,"form","showSubmit","submitText","submitActionEvent"],[1,"custom-control","custom-checkbox"],["type","checkbox",1,"custom-control-input",3,"checked","indeterminate","name","id","change"],["ng-class","['tc_' + key]",1,"custom-control-label",3,"for"],["class","badge badge-hdd ml-2",3,"ngbTooltip",4,"ngIf"],[1,"form-text","text-muted"],["class","m-1",4,"ngIf"],[1,"badge","badge-hdd","ml-2",3,"ngbTooltip"],"Cluster-wide",[1,"m-1"]]},template:function(e,t){1&e&&(i.Sb(0,"cd-modal",0),i.Qb(1,1),i.Wb(2,2),i.Pb(),i.Qb(3,3),i.Sb(4,"form",4,5),i.Sb(6,"div",6),i.Mc(7,mc,10,9,"div",7),i.Rb(),i.Sb(8,"div",8),i.Sb(9,"button",9),i.gc("click",(function(){return t.resetSelection()})),i.Wb(10,10),i.Rb(),i.Sb(11,"cd-form-button-panel",11),i.gc("submitActionEvent",(function(){return t.submitAction()})),i.Rb(),i.Rb(),i.Rb(),i.Pb(),i.Rb()),2&e&&(i.pc("modalRef",t.activeModal),i.yb(4),i.pc("formGroup",t.osdFlagsForm),i.yb(3),i.pc("ngForOf",t.flags),i.yb(4),i.pc("form",t.osdFlagsForm)("showSubmit",t.permissions.osd.update)("submitText",t.actionLabels.UPDATE))},directives:[Ia.a,xn.C,xn.r,Zn.a,xn.k,o.q,On.a,ti.a,ei.a,o.r,Qt.D],styles:[""]}),e})();var gc=n("f/UV");function _c(e,t){1&e&&i.Nb(0,"hr",15)}function yc(e,t){if(1&e&&(i.Sb(0,"div",10),i.Sb(1,"input",11),i.gc("change",(function(){const e=t.$implicit;return e.value=!e.value})),i.Rb(),i.Sb(2,"label",12),i.Sb(3,"strong"),i.Oc(4),i.Rb(),i.Nb(5,"br"),i.Sb(6,"span",13),i.Oc(7),i.Rb(),i.Rb(),i.Mc(8,_c,1,0,"hr",14),i.Rb()),2&e){const e=t.$implicit,n=t.last;i.yb(1),i.pc("checked",e.value)("name",e.code)("id",e.code)("disabled",e.disabled),i.yb(1),i.pc("for",e.code),i.yb(2),i.Pc(e.name),i.yb(3),i.Pc(e.description),i.yb(1),i.pc("ngIf",!n)}}let vc=(()=>{class e{constructor(e,t,n,i,r){this.activeModal=e,this.actionLabels=t,this.authStorageService=n,this.osdService=i,this.notificationService=r,this.osdFlagsForm=new xn.j({}),this.allFlags={noin:{code:"noin",name:"No In",value:!1,description:"OSDs that were previously marked out will not be marked back in when they start"},noout:{code:"noout",name:"No Out",value:!1,description:"OSDs will not automatically be marked out after the configured interval"},noup:{code:"noup",name:"No Up",value:!1,description:"OSDs are not allowed to start"},nodown:{code:"nodown",name:"No Down",value:!1,description:"OSD failure reports are being ignored, such that the monitors will not mark OSDs down"},pause:{code:"pause",name:"Pause",value:!1,description:"Pauses reads and writes"},noscrub:{code:"noscrub",name:"No Scrub",value:!1,description:"Scrubbing is disabled"},"nodeep-scrub":{code:"nodeep-scrub",name:"No Deep Scrub",value:!1,description:"Deep Scrubbing is disabled"},nobackfill:{code:"nobackfill",name:"No Backfill",value:!1,description:"Backfilling of PGs is suspended"},norebalance:{code:"norebalance",name:"No Rebalance",value:!1,description:"OSD will choose not to backfill unless PG is also degraded"},norecover:{code:"norecover",name:"No Recover",value:!1,description:"Recovery of PGs is suspended"},sortbitwise:{code:"sortbitwise",name:"Bitwise Sort",value:!1,description:"Use bitwise sort",disabled:!0},purged_snapdirs:{code:"purged_snapdirs",name:"Purged Snapdirs",value:!1,description:"OSDs have converted snapsets",disabled:!0},recovery_deletes:{code:"recovery_deletes",name:"Recovery Deletes",value:!1,description:"Deletes performed during recovery instead of peering",disabled:!0},pglog_hardlimit:{code:"pglog_hardlimit",name:"PG Log Hard Limit",value:!1,description:"Puts a hard limit on pg log length",disabled:!0}},this.unknownFlags=[],this.permissions=this.authStorageService.getPermissions()}ngOnInit(){this.osdService.getFlags().subscribe(e=>{e.forEach(e=>{this.allFlags[e]?this.allFlags[e].value=!0:this.unknownFlags.push(e)}),this.flags=Nt.a.toArray(this.allFlags)})}submitAction(){const e=this.flags.filter(e=>e.value).map(e=>e.code).concat(this.unknownFlags);this.osdService.updateFlags(e).subscribe(()=>{this.notificationService.show(yn.a.success,"Updated OSD Flags"),this.activeModal.close()},()=>{this.activeModal.close()})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Qt.a),i.Mb(gn.b),i.Mb(Jt.a),i.Mb(mr),i.Mb(wn.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-osd-flags-modal"]],decls:10,vars:6,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"Cluster-wide OSD Flags",[1,"modal-content"],["name","osdFlagsForm","novalidate","","cdFormScope","osd",3,"formGroup"],["formDir","ngForm"],[1,"modal-body","osd-modal"],["class","custom-control custom-checkbox",4,"ngFor","ngForOf"],[1,"modal-footer"],[3,"form","showSubmit","submitText","submitActionEvent"],[1,"custom-control","custom-checkbox"],["type","checkbox",1,"custom-control-input",3,"checked","name","id","disabled","change"],["ng-class","['tc_' + key]",1,"custom-control-label",3,"for"],[1,"form-text","text-muted"],["class","m-1",4,"ngIf"],[1,"m-1"]]},template:function(e,t){1&e&&(i.Sb(0,"cd-modal",0),i.Qb(1,1),i.Wb(2,2),i.Pb(),i.Qb(3,3),i.Sb(4,"form",4,5),i.Sb(6,"div",6),i.Mc(7,yc,9,8,"div",7),i.Rb(),i.Sb(8,"div",8),i.Sb(9,"cd-form-button-panel",9),i.gc("submitActionEvent",(function(){return t.submitAction()})),i.Rb(),i.Rb(),i.Rb(),i.Pb(),i.Rb()),2&e&&(i.pc("modalRef",t.activeModal),i.yb(4),i.pc("formGroup",t.osdFlagsForm),i.yb(3),i.pc("ngForOf",t.flags),i.yb(2),i.pc("form",t.osdFlagsForm)("showSubmit",t.permissions.osd.update)("submitText",t.actionLabels.UPDATE))},directives:[Ia.a,xn.C,xn.r,gc.a,Zn.a,xn.k,o.q,ti.a,On.a,ei.a,o.r],styles:[""]}),e})();function wc(e,t){if(1&e&&(i.Sb(0,"cd-helper"),i.Oc(1),i.Rb()),2&e){const e=i.ic(2).$implicit;i.yb(1),i.Qc(" ",e.long_desc,"")}}function Sc(e,t){if(1&e&&(i.Sb(0,"div",4),i.Sb(1,"label",5),i.Sb(2,"b"),i.Oc(3),i.Rb(),i.Nb(4,"br"),i.Sb(5,"span",6),i.Oc(6),i.Mc(7,wc,2,1,"cd-helper",7),i.Rb(),i.Rb(),i.Sb(8,"div",8),i.Sb(9,"div",9),i.Nb(10,"input",10),i.Nb(11,"label",11),i.Rb(),i.Rb(),i.Rb()),2&e){const e=i.ic().$implicit;i.yb(1),i.pc("for",e.name),i.yb(2),i.Pc(e.text),i.yb(3),i.Qc(" ",e.desc," "),i.yb(1),i.pc("ngIf",e.long_desc),i.yb(3),i.pc("id",e.name)("formControlName",e.name),i.yb(1),i.pc("for",e.name)}}function Mc(e,t){if(1&e&&(i.Sb(0,"cd-helper"),i.Oc(1),i.Rb()),2&e){const e=i.ic(2).$implicit;i.yb(1),i.Qc(" ",e.long_desc,"")}}const xc=function(e){return[e]};function kc(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",16),i.Sb(1,"button",17),i.Yb(2,18),i.gc("click",(function(){i.Dc(e);const t=i.ic(2).$implicit;return i.ic().resetValue(t.name)})),i.Nb(3,"i",19),i.Rb(),i.Rb()}if(2&e){const e=i.ic(3);i.yb(3),i.pc("ngClass",i.uc(1,xc,e.icons.erase))}}function Dc(e,t){if(1&e&&(i.Sb(0,"span",20),i.Oc(1),i.Rb()),2&e){const e=i.ic(2).$implicit;i.yb(1),i.Qc(" ",e.additionalTypeInfo.patternHelpText,"")}}function Tc(e,t){if(1&e&&(i.Sb(0,"span",20),i.Oc(1),i.Rb()),2&e){const e=i.ic(2).$implicit;i.yb(1),i.Qc(" ",e.additionalTypeInfo.patternHelpText,"")}}function Cc(e,t){if(1&e&&(i.Sb(0,"span",20),i.Wb(1,21),i.Rb()),2&e){const e=i.ic(2).$implicit;i.yb(1),i.ac(e.maxValue),i.Xb(1)}}function Oc(e,t){if(1&e&&(i.Sb(0,"span",20),i.Wb(1,22),i.Rb()),2&e){const e=i.ic(2).$implicit;i.yb(1),i.ac(e.minValue),i.Xb(1)}}function Lc(e,t){if(1&e&&(i.Sb(0,"div",4),i.Sb(1,"label",5),i.Oc(2),i.Nb(3,"br"),i.Sb(4,"span",6),i.Oc(5),i.Mc(6,Mc,2,1,"cd-helper",7),i.Rb(),i.Rb(),i.Sb(7,"div",8),i.Sb(8,"div",12),i.Nb(9,"input",13),i.Mc(10,kc,4,3,"div",14),i.Rb(),i.Mc(11,Dc,2,1,"span",15),i.Mc(12,Tc,2,1,"span",15),i.Mc(13,Cc,2,1,"span",15),i.Mc(14,Oc,2,1,"span",15),i.Rb(),i.Rb()),2&e){const e=i.ic().$implicit,t=i.ic();i.yb(1),i.pc("for",e.name),i.yb(1),i.Qc("",e.text," "),i.yb(3),i.Qc(" ",e.desc," "),i.yb(1),i.pc("ngIf",e.long_desc),i.yb(3),i.pc("type",e.additionalTypeInfo.inputType)("id",e.name)("placeholder",e.additionalTypeInfo.humanReadable)("formControlName",e.name)("step",t.getStep(e.type,t.optionsForm.getValue(e.name))),i.yb(1),i.pc("ngIf",t.optionsFormShowReset),i.yb(1),i.pc("ngIf",t.optionsForm.showError(e.name,t.optionsFormDir,"pattern")),i.yb(1),i.pc("ngIf",t.optionsForm.showError(e.name,t.optionsFormDir,"invalidUuid")),i.yb(1),i.pc("ngIf",t.optionsForm.showError(e.name,t.optionsFormDir,"max")),i.yb(1),i.pc("ngIf",t.optionsForm.showError(e.name,t.optionsFormDir,"min"))}}function Rc(e,t){1&e&&i.Nb(0,"hr",23)}function Ec(e,t){if(1&e&&(i.Sb(0,"div"),i.Mc(1,Sc,12,7,"div",2),i.Mc(2,Lc,15,14,"div",2),i.Mc(3,Rc,1,0,"hr",3),i.Rb()),2&e){const e=t.$implicit,n=t.last;i.yb(1),i.pc("ngIf","bool"===e.type),i.yb(1),i.pc("ngIf","bool"!==e.type),i.yb(1),i.pc("ngIf",!n)}}let Ac=(()=>{class e{constructor(e){this.configService=e,this.optionNames=[],this.optionsForm=new Jn.a({}),this.optionsFormDir=new xn.s([],[]),this.optionsFormGroupName="",this.optionsFormShowReset=!0,this.icons=_n.a,this.options=[],this.optionsFormGroup=new Jn.a({})}static optionNameToText(e){const t=["mon","mgr","osd","mds","client"];return e.split("_").filter((e,n)=>0!==n||!t.includes(e)).map(e=>e.charAt(0).toUpperCase()+e.substring(1)).join(" ")}ngOnInit(){this.createForm(),this.loadStoredData()}createForm(){this.optionsForm.addControl(this.optionsFormGroupName,this.optionsFormGroup),this.optionNames.forEach(e=>{this.optionsFormGroup.addControl(e,new xn.h(null))})}getStep(e,t){return qn.getTypeStep(e,t)}loadStoredData(){this.configService.filter(this.optionNames).subscribe(t=>{this.options=t.map(t=>{const n=this.optionsForm.get(t.name),i=qn.getTypeValidators(t);return t.additionalTypeInfo=qn.getType(t.type),t.text=e.optionNameToText(t.name),t.value=Nt.a.find(t.value,e=>"osd"===e.section),t.value&&n.setValue("bool"===t.additionalTypeInfo.name?"true"===t.value.value:t.value.value),i&&(t.patternHelpText=i.patternHelpText,"max"in i&&""!==i.max&&(t.maxValue=i.max),"min"in i&&""!==i.min&&(t.minValue=i.min),n.setValidators(i.validators)),t})})}saveValues(){const e={};return this.optionNames.forEach(t=>{const n=this.optionsForm.getValue(t);null!==n&&""!==n&&(e[t]={section:"osd",value:n})}),this.configService.bulkCreate({options:e})}resetValue(e){this.configService.delete(e,"osd").subscribe(()=>{this.optionsForm.get(e).reset()})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Un.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-config-option"]],inputs:{optionNames:"optionNames",optionsForm:"optionsForm",optionsFormDir:"optionsFormDir",optionsFormGroupName:"optionsFormGroupName",optionsFormShowReset:"optionsFormShowReset"},decls:2,vars:2,consts:function(){return[[3,"formGroup"],[4,"ngFor","ngForOf"],["class","form-group row pt-2",4,"ngIf"],["class","my-2",4,"ngIf"],[1,"form-group","row","pt-2"],[1,"cd-col-form-label",3,"for"],[1,"text-muted"],[4,"ngIf"],[1,"cd-col-form-input"],[1,"custom-control","custom-checkbox"],["type","checkbox",1,"custom-control-input",3,"id","formControlName"],[1,"custom-control-label",3,"for"],[1,"input-group"],[1,"form-control",3,"type","id","placeholder","formControlName","step"],["class","input-group-append",4,"ngIf"],["class","invalid-feedback",4,"ngIf"],[1,"input-group-append"],["type","button","data-toggle","button",1,"btn","btn-light",3,"click",6,"title"],["title","Remove the custom configuration value. The default configuration will be inherited and used instead."],["aria-hidden","true",3,"ngClass"],[1,"invalid-feedback"],"The entered value is too high! It must not be greater than " + "\ufffd0\ufffd" + ".","The entered value is too low! It must not be lower than " + "\ufffd0\ufffd" + ".",[1,"my-2"]]},template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Mc(1,Ec,4,3,"div",1),i.Rb()),2&e&&(i.pc("formGroup",t.optionsFormGroup),i.yb(1),i.pc("ngForOf",t.options))},directives:[xn.r,xn.k,Zn.a,o.q,o.r,Xn.a,On.a,xn.b,ei.a,xn.q,xn.i,Yo.a,xn.d,o.p],styles:[".custom-checkbox[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .custom-checkbox[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:pointer}.col-form-label[_ngcontent-%COMP%]{text-align:left}"]}),e})(),Ic=(()=>{class e{}return e.basicOptions=["osd_scrub_during_recovery","osd_scrub_begin_hour","osd_scrub_end_hour","osd_scrub_begin_week_day","osd_scrub_end_week_day","osd_scrub_min_interval","osd_scrub_max_interval","osd_deep_scrub_interval","osd_scrub_auto_repair","osd_max_scrubs","osd_scrub_priority","osd_scrub_sleep"],e.advancedOptions=["osd_scrub_auto_repair_num_errors","osd_debug_deep_scrub_sleep","osd_deep_scrub_keys","osd_deep_scrub_large_omap_object_key_threshold","osd_deep_scrub_large_omap_object_value_sum_threshold","osd_deep_scrub_randomize_ratio","osd_deep_scrub_stride","osd_deep_scrub_update_digest_min_age","osd_requested_scrub_priority","osd_scrub_backoff_ratio","osd_scrub_chunk_max","osd_scrub_chunk_min","osd_scrub_cost","osd_scrub_interval_randomize_ratio","osd_scrub_invalid_stats","osd_scrub_load_threshold","osd_scrub_max_preemptions"],e})();const Pc=["basicOptionsValues"],jc=["advancedOptionsValues"];function Nc(e,t){if(1&e){const e=i.Tb();i.Sb(0,"a",15),i.gc("click",(function(){return i.Dc(e),i.ic().advancedEnabled=!0})),i.Wb(1,16),i.Rb()}}function Fc(e,t){if(1&e&&(i.Sb(0,"div"),i.Sb(1,"h3",17),i.Wb(2,18),i.Rb(),i.Nb(3,"cd-config-option",7,19),i.Rb()),2&e){const e=i.ic(),t=i.Ac(7);i.yb(3),i.pc("optionNames",e.advancedOptions)("optionsForm",e.osdPgScrubForm)("optionsFormDir",t)("optionsFormGroupName","advancedFormGroup")}}let Yc=(()=>{class e{constructor(e,t,n,i){this.activeModal=e,this.authStorageService=t,this.notificationService=n,this.actionLabels=i,this.basicOptions=Ic.basicOptions,this.advancedOptions=Ic.advancedOptions,this.advancedEnabled=!1,this.osdPgScrubForm=new Jn.a({}),this.resource="PG scrub options",this.action=this.actionLabels.EDIT,this.permissions=this.authStorageService.getPermissions()}submitAction(){const e=[this.basicOptionsValues.saveValues()];this.advancedOptionsValues&&e.push(this.advancedOptionsValues.saveValues()),Object(jo.a)(e).subscribe(()=>{this.notificationService.show(yn.a.success,"Updated PG scrub options"),this.activeModal.close()},()=>{this.activeModal.close()})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Qt.a),i.Mb(Jt.a),i.Mb(wn.a),i.Mb(gn.b))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-osd-pg-scrub-modal"]],viewQuery:function(e,t){var n;1&e&&(i.Jc(Pc,!0),i.Tc(jc,!0)),2&e&&(i.zc(n=i.hc())&&(t.basicOptionsValues=n.first),i.zc(n=i.hc())&&(t.advancedOptionsValues=n.first))},decls:19,vars:21,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"modal-content"],["novalidate","","cdFormScope","osd",3,"formGroup"],["formDir","ngForm"],[1,"modal-body","osd-modal"],[3,"optionNames","optionsForm","optionsFormDir","optionsFormGroupName"],["basicOptionsValues",""],[1,"row"],[1,"col-sm-12"],["class","pull-right margin-right-md",3,"click",4,"ngIf"],[4,"ngIf"],[1,"modal-footer"],[3,"form","showSubmit","submitText","submitActionEvent"],[1,"pull-right","margin-right-md",3,"click"],"Advanced...",[1,"page-header"],"Advanced configuration options",["advancedOptionsValues",""]]},template:function(e,t){if(1&e&&(i.Sb(0,"cd-modal",0),i.Qb(1,1),i.Wb(2,2),i.jc(3,"titlecase"),i.jc(4,"upperFirst"),i.Pb(),i.Qb(5,3),i.Sb(6,"form",4,5),i.Sb(8,"div",6),i.Nb(9,"cd-config-option",7,8),i.Sb(11,"div",9),i.Sb(12,"div",10),i.Mc(13,Nc,2,0,"a",11),i.Rb(),i.Rb(),i.Mc(14,Fc,5,4,"div",12),i.Rb(),i.Sb(15,"div",13),i.Sb(16,"cd-form-button-panel",14),i.gc("submitActionEvent",(function(){return t.submitAction()})),i.jc(17,"titlecase"),i.jc(18,"upperFirst"),i.Rb(),i.Rb(),i.Rb(),i.Pb(),i.Rb()),2&e){const e=i.Ac(7);i.pc("modalRef",t.activeModal),i.yb(4),i.ac(i.kc(3,13,t.action))(i.kc(4,15,t.resource)),i.Xb(2),i.yb(2),i.pc("formGroup",t.osdPgScrubForm),i.yb(3),i.pc("optionNames",t.basicOptions)("optionsForm",t.osdPgScrubForm)("optionsFormDir",e)("optionsFormGroupName","basicFormGroup"),i.yb(4),i.pc("ngIf",!t.advancedEnabled),i.yb(1),i.pc("ngIf",t.advancedEnabled),i.yb(2),i.pc("form",t.osdPgScrubForm)("showSubmit",t.permissions.configOpt.update)("submitText",i.kc(17,17,t.action)+" "+i.kc(18,19,t.resource))}},directives:[Ia.a,xn.C,xn.r,gc.a,Zn.a,xn.k,Ac,o.r,ti.a],pipes:[o.A,sr.a],styles:[""]}),e})();function zc(e,t){if(1&e&&(i.Sb(0,"option",22),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e.name),i.yb(1),i.Qc(" ",e.text," ")}}function $c(e,t){1&e&&(i.Sb(0,"span",23),i.Wb(1,24),i.Rb())}function Hc(e,t){if(1&e&&(i.Sb(0,"cd-helper"),i.Oc(1),i.Rb()),2&e){const e=i.ic().$implicit;i.yb(1),i.Pc(e.value.desc)}}function Wc(e,t){1&e&&(i.Sb(0,"span",23),i.Wb(1,29),i.Rb())}function Vc(e,t){if(1&e&&(i.Sb(0,"span",23),i.Wb(1,30),i.Rb()),2&e){const e=i.ic().$implicit;i.yb(1),i.ac(e.value.patternHelpText),i.Xb(1)}}function Bc(e,t){if(1&e&&(i.Sb(0,"span",23),i.Wb(1,31),i.Rb()),2&e){const e=i.ic().$implicit;i.yb(1),i.ac(e.value.maxValue),i.Xb(1)}}function Uc(e,t){if(1&e&&(i.Sb(0,"span",23),i.Wb(1,32),i.Rb()),2&e){const e=i.ic().$implicit;i.yb(1),i.ac(e.value.minValue),i.Xb(1)}}const qc=function(e){return{required:e}};function Gc(e,t){if(1&e&&(i.Sb(0,"div",7),i.Sb(1,"label",25),i.Sb(2,"span",26),i.Oc(3),i.Rb(),i.Mc(4,Hc,2,1,"cd-helper",27),i.Rb(),i.Sb(5,"div",10),i.Nb(6,"input",28),i.Mc(7,Wc,2,0,"span",13),i.Mc(8,Vc,2,1,"span",13),i.Mc(9,Bc,2,1,"span",13),i.Mc(10,Uc,2,1,"span",13),i.Rb(),i.Rb()),2&e){const e=t.$implicit,n=i.ic(),r=i.Ac(5);i.yb(1),i.pc("for",e.key),i.yb(1),i.pc("ngClass",i.uc(11,qc,n.osdRecvSpeedForm.getValue("customizePriority"))),i.yb(1),i.Qc(" ",e.value.text," "),i.yb(1),i.pc("ngIf",e.value.desc),i.yb(2),i.pc("id",e.key)("formControlName",e.key)("readonly",!n.osdRecvSpeedForm.getValue("customizePriority")),i.yb(1),i.pc("ngIf",n.osdRecvSpeedForm.getValue("customizePriority")&&n.osdRecvSpeedForm.showError(e.key,r,"required")),i.yb(1),i.pc("ngIf",n.osdRecvSpeedForm.getValue("customizePriority")&&n.osdRecvSpeedForm.showError(e.key,r,"pattern")),i.yb(1),i.pc("ngIf",n.osdRecvSpeedForm.getValue("customizePriority")&&n.osdRecvSpeedForm.showError(e.key,r,"max")),i.yb(1),i.pc("ngIf",n.osdRecvSpeedForm.getValue("customizePriority")&&n.osdRecvSpeedForm.showError(e.key,r,"min"))}}let Jc=(()=>{class e{constructor(e,t,n,i,r,s){this.activeModal=e,this.actionLabels=t,this.authStorageService=n,this.configService=i,this.notificationService=r,this.osdService=s,this.priorities=[],this.priorityAttrs={},this.permissions=this.authStorageService.getPermissions(),this.priorities=this.osdService.osdRecvSpeedModalPriorities.KNOWN_PRIORITIES,this.osdRecvSpeedForm=new Jn.a({priority:new xn.h(null,{validators:[xn.A.required]}),customizePriority:new xn.h(!1)}),this.priorityAttrs={osd_max_backfills:{text:"Max Backfills",desc:"",patternHelpText:"",maxValue:void 0,minValue:void 0},osd_recovery_max_active:{text:"Recovery Max Active",desc:"",patternHelpText:"",maxValue:void 0,minValue:void 0},osd_recovery_max_single_start:{text:"Recovery Max Single Start",desc:"",patternHelpText:"",maxValue:void 0,minValue:void 0},osd_recovery_sleep:{text:"Recovery Sleep",desc:"",patternHelpText:"",maxValue:void 0,minValue:void 0}},Object.keys(this.priorityAttrs).forEach(e=>{this.osdRecvSpeedForm.addControl(e,new xn.h(null,{validators:[xn.A.required]}))})}ngOnInit(){this.configService.filter(Object.keys(this.priorityAttrs)).subscribe(e=>{const t=this.getCurrentValues(e);this.detectPriority(t.values,e=>{this.setPriority(e)}),this.setDescription(t.configOptions),this.setValidators(t.configOptions)})}detectPriority(e,t){const n=Nt.a.find(this.priorities,t=>Nt.a.isEqual(t.values,e));return this.osdRecvSpeedForm.controls.customizePriority.setValue(!1),n?t(n):4===Object.entries(e).length?(this.osdRecvSpeedForm.controls.customizePriority.setValue(!0),t(Object({name:"custom",text:"Custom",values:e}))):t(this.priorities[0])}getCurrentValues(e){const t={values:{},configOptions:[]};return e.forEach(e=>{t.configOptions.push(e),"value"in e?e.value.forEach(n=>{"osd"===n.section&&(t.values[e.name]=Number(n.value))}):"default"in e&&null!==e.default&&(t.values[e.name]=Number(e.default))}),t}setDescription(e){e.forEach(e=>{""!==e.desc&&(this.priorityAttrs[e.name].desc=e.desc)})}setPriority(e){const t=Nt.a.find(this.priorities,e=>"custom"===e.name);"custom"===e.name?t||this.priorities.push(e):t&&this.priorities.splice(this.priorities.indexOf(t),1),this.osdRecvSpeedForm.controls.priority.setValue(e.name),Object.entries(e.values).forEach(([e,t])=>{this.osdRecvSpeedForm.controls[e].setValue(t)})}setValidators(e){e.forEach(e=>{const t=qn.getTypeValidators(e);t?(t.validators.push(xn.A.required),"max"in t&&""!==t.max&&(this.priorityAttrs[e.name].maxValue=t.max),"min"in t&&""!==t.min&&(this.priorityAttrs[e.name].minValue=t.min),this.priorityAttrs[e.name].patternHelpText=t.patternHelpText,this.osdRecvSpeedForm.controls[e.name].setValidators(t.validators)):this.osdRecvSpeedForm.controls[e.name].setValidators(xn.A.required)})}onCustomizePriorityChange(){const e={};if(Object.keys(this.priorityAttrs).forEach(t=>{e[t]=this.osdRecvSpeedForm.getValue(t)}),this.osdRecvSpeedForm.getValue("customizePriority")){const t={name:"custom",text:"Custom",values:e};this.setPriority(t)}else this.detectPriority(e,e=>{this.setPriority(e)})}onPriorityChange(e){const t=Nt.a.find(this.priorities,t=>t.name===e)||this.priorities[0];this.osdRecvSpeedForm.get("customizePriority").setValue(!1),this.setPriority(t)}submitAction(){const e={};Object.keys(this.priorityAttrs).forEach(t=>{e[t]={section:"osd",value:this.osdRecvSpeedForm.getValue(t)}}),this.configService.bulkCreate({options:e}).subscribe(()=>{this.notificationService.show(yn.a.success,"Updated OSD recovery speed priority '" + this.osdRecvSpeedForm.getValue("priority") + "'"),this.activeModal.close()},()=>{this.activeModal.close()})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Qt.a),i.Mb(gn.b),i.Mb(Jt.a),i.Mb(Un.a),i.Mb(wn.a),i.Mb(mr))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-osd-recv-speed-modal"]],decls:24,vars:10,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"OSD Recovery Priority",[1,"modal-content"],["novalidate","","cdFormScope","osd",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","priority",1,"cd-col-form-label","required"],"Priority",[1,"cd-col-form-input"],["formControlName","priority","id","priority",1,"form-control","custom-select",3,"change"],[3,"value",4,"ngFor","ngForOf"],["class","invalid-feedback",4,"ngIf"],[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["formControlName","customizePriority","id","customizePriority","name","customizePriority","type","checkbox",1,"custom-control-input",3,"change"],["for","customizePriority",1,"custom-control-label"],"Customize priority values",["class","form-group row",4,"ngFor","ngForOf"],[1,"modal-footer"],[3,"form","submitText","showSubmit","submitActionEvent"],[3,"value"],[1,"invalid-feedback"],"This field is required.",[1,"cd-col-form-label",3,"for"],[3,"ngClass"],[4,"ngIf"],["type","number",1,"form-control",3,"id","formControlName","readonly"],"This field is required!","" + "\ufffd0\ufffd" + "","The entered value is too high! It must not be greater than " + "\ufffd0\ufffd" + ".","The entered value is too low! It must not be lower than " + "\ufffd0\ufffd" + "."]},template:function(e,t){if(1&e&&(i.Sb(0,"cd-modal",0),i.Qb(1,1),i.Wb(2,2),i.Pb(),i.Qb(3,3),i.Sb(4,"form",4,5),i.Sb(6,"div",6),i.Sb(7,"div",7),i.Sb(8,"label",8),i.Wb(9,9),i.Rb(),i.Sb(10,"div",10),i.Sb(11,"select",11),i.gc("change",(function(e){return t.onPriorityChange(e.target.value)})),i.Mc(12,zc,2,2,"option",12),i.Rb(),i.Mc(13,$c,2,0,"span",13),i.Rb(),i.Rb(),i.Sb(14,"div",7),i.Sb(15,"div",14),i.Sb(16,"div",15),i.Sb(17,"input",16),i.gc("change",(function(){return t.onCustomizePriorityChange()})),i.Rb(),i.Sb(18,"label",17),i.Wb(19,18),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Mc(20,Gc,11,13,"div",19),i.jc(21,"keyvalue"),i.Rb(),i.Sb(22,"div",20),i.Sb(23,"cd-form-button-panel",21),i.gc("submitActionEvent",(function(){return t.submitAction()})),i.Rb(),i.Rb(),i.Rb(),i.Pb(),i.Rb()),2&e){const e=i.Ac(5);i.pc("modalRef",t.activeModal),i.yb(4),i.pc("formGroup",t.osdRecvSpeedForm),i.yb(8),i.pc("ngForOf",t.priorities),i.yb(1),i.pc("ngIf",t.osdRecvSpeedForm.showError("priority",e,"required")),i.yb(7),i.pc("ngForOf",i.kc(21,8,t.priorityAttrs)),i.yb(3),i.pc("form",t.osdRecvSpeedForm)("submitText",t.actionLabels.UPDATE)("showSubmit",t.permissions.configOpt.update)}},directives:[Ia.a,xn.C,xn.r,gc.a,Zn.a,xn.k,Xn.a,On.a,xn.z,ei.a,xn.q,xn.i,o.q,o.r,xn.b,ti.a,xn.u,xn.B,o.p,xn.v,xn.d,Yo.a],pipes:[o.k],styles:[""]}),e})();function Qc(e,t){1&e&&(i.Sb(0,"span"),i.Wb(1,15),i.Rb())}function Kc(e,t){1&e&&(i.Sb(0,"span"),i.Wb(1,16),i.Rb())}function Zc(e,t){if(1&e&&(i.Sb(0,"span",13),i.Mc(1,Qc,2,0,"span",14),i.Mc(2,Kc,2,0,"span",14),i.Rb()),2&e){const e=i.ic();i.yb(1),i.pc("ngIf",null==e.weight.errors?null:e.weight.errors.required),i.yb(1),i.pc("ngIf",(null==e.weight.errors?null:e.weight.errors.max)||(null==e.weight.errors?null:e.weight.errors.min))}}let Xc=(()=>{class e{constructor(e,t,n,i){this.actionLabels=e,this.activeModal=t,this.osdService=n,this.fb=i,this.currentWeight=1}get weight(){return this.reweightForm.get("weight")}ngOnInit(){this.reweightForm=this.fb.group({weight:this.fb.control(this.currentWeight,[xn.A.required,xn.A.max(1),xn.A.min(0)])})}reweight(){this.osdService.reweight(this.osdId,this.reweightForm.value.weight).subscribe(()=>this.activeModal.close())}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(gn.b),i.Mb(Qt.a),i.Mb(mr),i.Mb(Fo.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-osd-reweight-modal"]],decls:14,vars:7,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"Reweight OSD: " + "\ufffd0\ufffd" + "",[1,"modal-content"],[3,"formGroup"],[1,"modal-body"],[1,"row"],["for","weight",1,"cd-col-form-label"],[1,"cd-col-form-input"],["id","weight","type","number","step","0.1","formControlName","weight","min","0","max","1",1,"form-control",3,"value"],["class","invalid-feedback",4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],[4,"ngIf"],"This field is required.","The value needs to be between 0 and 1."]},template:function(e,t){1&e&&(i.Sb(0,"cd-modal",0),i.Qb(1,1),i.Wb(2,2),i.Pb(),i.Qb(3,3),i.Sb(4,"form",4),i.Sb(5,"div",5),i.Sb(6,"div",6),i.Sb(7,"label",7),i.Oc(8,"Weight"),i.Rb(),i.Sb(9,"div",8),i.Nb(10,"input",9),i.Mc(11,Zc,3,2,"span",10),i.Rb(),i.Rb(),i.Rb(),i.Sb(12,"div",11),i.Sb(13,"cd-form-button-panel",12),i.gc("submitActionEvent",(function(){return t.reweight()})),i.Rb(),i.Rb(),i.Rb(),i.Pb(),i.Rb()),2&e&&(i.pc("modalRef",t.activeModal),i.yb(2),i.ac(t.osdId),i.Xb(2),i.yb(2),i.pc("formGroup",t.reweightForm),i.yb(6),i.pc("value",t.currentWeight),i.yb(1),i.pc("ngIf",t.weight.errors),i.yb(2),i.pc("form",t.reweightForm)("submitText",t.actionLabels.REWEIGHT))},directives:[Ia.a,xn.C,xn.r,Zn.a,xn.k,On.a,xn.v,xn.d,ei.a,xn.q,xn.i,o.r,ti.a],styles:[""]}),e})();var el=n("FFMq");let tl=(()=>{class e{constructor(e,t,n,i,r){this.activeModal=e,this.actionLabels=t,this.osdService=n,this.notificationService=i,this.joinPipe=r,this.selected=[]}ngOnInit(){this.scrubForm=new xn.j({})}scrub(){Object(jo.a)(this.selected.map(e=>this.osdService.scrub(e,this.deep))).subscribe(()=>{this.notificationService.show(yn.a.success,"" + (this.deep ? "Deep scrub" : "Scrub") + " was initialized in the following OSD(s): " + this.joinPipe.transform(this.selected) + ""),this.activeModal.close()},()=>this.activeModal.close())}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Qt.a),i.Mb(gn.b),i.Mb(mr),i.Mb(wn.a),i.Mb(el.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-osd-scrub-modal"]],decls:13,vars:9,consts:function(){var e,t,n;return e="{VAR_SELECT, select, true {Deep } other {}}",e=i.bc(e,{VAR_SELECT:"\ufffd0\ufffd"}),t="OSDs " + e + "Scrub",n="{VAR_SELECT, select, true {deep } other {}}",n=i.bc(n,{VAR_SELECT:"\ufffd0\ufffd"}),[[3,"modalRef"],[1,"modal-title"],t,[1,"modal-content"],["name","scrubForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],"You are about to apply a " + n + "scrub to the OSD(s): " + "\ufffd#9\ufffd" + "" + "\ufffd1\ufffd" + "" + "\ufffd/#9\ufffd" + ".",[1,"modal-footer"],[3,"form","submitText","submitActionEvent"]]},template:function(e,t){1&e&&(i.Sb(0,"cd-modal",0),i.Sb(1,"span",1),i.Wb(2,2),i.Rb(),i.Qb(3,3),i.Sb(4,"form",4,5),i.Sb(6,"div",6),i.Sb(7,"p"),i.cc(8,7),i.Nb(9,"strong"),i.jc(10,"join"),i.Zb(),i.Rb(),i.Rb(),i.Sb(11,"div",8),i.Sb(12,"cd-form-button-panel",9),i.gc("submitActionEvent",(function(){return t.scrub()})),i.Rb(),i.Rb(),i.Rb(),i.Pb(),i.Rb()),2&e&&(i.pc("modalRef",t.activeModal),i.yb(2),i.ac(t.deep),i.Xb(2),i.yb(2),i.pc("formGroup",t.scrubForm),i.yb(6),i.ac(t.deep)(i.kc(10,7,t.selected)),i.Xb(8),i.yb(2),i.pc("form",t.scrubForm)("submitText",t.actionLabels.UPDATE))},directives:[Ia.a,xn.C,xn.r,Zn.a,xn.k,ti.a],pipes:[el.a],styles:[""]}),e})();var nl=n("b5OY");function il(e,t){if(1&e&&i.Nb(0,"cd-device-list",17),2&e){const e=i.ic(2);i.pc("osdId",null==e.osd?null:e.osd.id)}}function rl(e,t){if(1&e&&i.Nb(0,"cd-table-key-value",18),2&e){const e=i.ic(2);i.pc("data",null==e.osd||null==e.osd.details?null:e.osd.details.osd_map)}}function sl(e,t){if(1&e){const e=i.Tb();i.Sb(0,"cd-table-key-value",21),i.gc("fetchData",(function(){return i.Dc(e),i.ic(3).refresh()})),i.Rb()}if(2&e){const e=i.ic(3);i.pc("data",null==e.osd||null==e.osd.details?null:e.osd.details.osd_metadata)}}function ol(e,t){1&e&&(i.Sb(0,"cd-alert-panel",22),i.Wb(1,23),i.Rb())}function al(e,t){if(1&e&&(i.Mc(0,sl,1,1,"cd-table-key-value",19),i.Mc(1,ol,2,0,"ng-template",null,20,i.Nc)),2&e){const e=i.Ac(2),t=i.ic(2);i.pc("ngIf",null==t.osd||null==t.osd.details?null:t.osd.details.osd_metadata)("ngIfElse",e)}}function cl(e,t){if(1&e&&i.Nb(0,"cd-smart-list",17),2&e){const e=i.ic(2);i.pc("osdId",null==e.osd?null:e.osd.id)}}function ll(e,t){if(1&e&&i.Nb(0,"cd-table-performance-counter",25),2&e){const e=i.ic(3);i.pc("serviceId",null==e.osd?null:e.osd.id)}}function ul(e,t){if(1&e&&i.Mc(0,ll,1,1,"cd-table-performance-counter",24),2&e){const e=i.ic(2);i.pc("ngIf",null==e.osd?null:e.osd.details)}}function dl(e,t){if(1&e&&i.Nb(0,"cd-grafana",28),2&e){const e=i.ic(3);i.pc("grafanaPath","osd-device-details?var-osd=osd."+e.osd.id)}}function hl(e,t){1&e&&(i.Sb(0,"li",26),i.Sb(1,"a",4),i.Wb(2,27),i.Rb(),i.Mc(3,dl,1,1,"ng-template",6),i.Rb())}function fl(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"ul",1,2),i.Sb(3,"li",3),i.Sb(4,"a",4),i.Wb(5,5),i.Rb(),i.Mc(6,il,1,1,"ng-template",6),i.Rb(),i.Sb(7,"li",7),i.Sb(8,"a",4),i.Wb(9,8),i.Rb(),i.Mc(10,rl,1,1,"ng-template",6),i.Rb(),i.Sb(11,"li",9),i.Sb(12,"a",4),i.Wb(13,10),i.Rb(),i.Mc(14,al,3,2,"ng-template",6),i.Rb(),i.Sb(15,"li",11),i.Sb(16,"a",4),i.Wb(17,12),i.Rb(),i.Mc(18,cl,1,1,"ng-template",6),i.Rb(),i.Sb(19,"li",13),i.Sb(20,"a",4),i.Wb(21,14),i.Rb(),i.Mc(22,ul,1,1,"ng-template",6),i.Rb(),i.Mc(23,hl,4,0,"li",15),i.Rb(),i.Nb(24,"div",16),i.Pb()),2&e){const e=i.Ac(2),t=i.ic();i.yb(23),i.pc("ngIf",t.grafanaPermission.read),i.yb(1),i.pc("ngbNavOutlet",e)}}let pl=(()=>{class e{constructor(e,t){this.osdService=e,this.authStorageService=t,this.grafanaPermission=this.authStorageService.getPermissions().grafana}ngOnChanges(){var e,t,n;(null===(e=this.osd)||void 0===e?void 0:e.id)!==(null===(t=this.selection)||void 0===t?void 0:t.id)&&(this.osd=this.selection),Nt.a.isNumber(null===(n=this.osd)||void 0===n?void 0:n.id)&&this.refresh()}refresh(){this.osdService.getDetails(this.osd.id).subscribe(e=>{this.osd.details=e})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(mr),i.Mb(Jt.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-osd-details"]],inputs:{selection:"selection"},features:[i.wb],decls:1,vars:1,consts:function(){return[[4,"ngIf"],["ngbNav","","id","tabset-osd-details","cdStatefulTab","osd-details",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem","devices"],["ngbNavLink",""],"Devices",["ngbNavContent",""],["ngbNavItem","attributes"],"Attributes (OSD map)",["ngbNavItem","metadata"],"Metadata",["ngbNavItem","device-health"],"Device health",["ngbNavItem","performance-counter"],"Performance counter",["ngbNavItem","performance-details",4,"ngIf"],[3,"ngbNavOutlet"],[3,"osdId"],[3,"data"],[3,"data","fetchData",4,"ngIf","ngIfElse"],["noMetaData",""],[3,"data","fetchData"],["type","warning"],"Metadata not available",["serviceType","osd",3,"serviceId",4,"ngIf"],["serviceType","osd",3,"serviceId"],["ngbNavItem","performance-details"],"Performance Details",["uid","CrAHE0iZz","grafanaStyle","three",3,"grafanaPath"]]},template:function(e,t){1&e&&i.Mc(0,fl,25,2,"ng-container",0),2&e&&i.pc("ngIf",t.selection)},directives:[o.r,Qt.p,Kt.a,Qt.r,Qt.s,Qt.q,Qt.u,Or,en.a,br.a,Is,nl.a,Fn.a],styles:[""]}),e})();const ml=["osdUsageTpl"],bl=["markOsdConfirmationTpl"],gl=["criticalConfirmationTpl"],_l=["reweightBodyTpl"],yl=["safeToDestroyBodyTpl"],vl=["deleteOsdExtraTpl"],wl=["flagsTpl"],Sl=function(){return{read:!0}};function Ml(e,t){if(1&e){const e=i.Tb();i.Sb(0,"cd-table",13),i.gc("fetchData",(function(){return i.Dc(e),i.ic().getOsdList()}))("setExpandedRow",(function(t){return i.Dc(e),i.ic().setExpandedRow(t)}))("updateSelection",(function(t){return i.Dc(e),i.ic().updateSelection(t)})),i.Sb(1,"div",14),i.Nb(2,"cd-table-actions",15),i.Nb(3,"cd-table-actions",16),i.Rb(),i.Nb(4,"cd-osd-details",17),i.Rb()}if(2&e){const e=i.ic();i.pc("data",e.osds)("columns",e.columns)("hasDetails",!0)("updateSelectionOnRefresh","never"),i.yb(2),i.pc("permission",e.permissions.osd)("selection",e.selection)("tableActions",e.tableActions),i.yb(1),i.pc("permission",i.tc(11,Sl))("selection",e.selection)("tableActions",e.clusterWideActions),i.yb(1),i.pc("selection",e.expandedRow)}}function xl(e,t){1&e&&i.Nb(0,"cd-grafana",19),2&e&&i.pc("grafanaPath","osd-overview?")}function kl(e,t){1&e&&(i.Sb(0,"li",2),i.Sb(1,"a",3),i.Wb(2,18),i.Rb(),i.Mc(3,xl,1,1,"ng-template",5),i.Rb())}function Dl(e,t){if(1&e&&(i.Qb(0),i.cc(1,20),i.Nb(2,"strong"),i.jc(3,"join"),i.Nb(4,"strong"),i.Zb(),i.Pb()),2&e){const e=t.markActionDescription,n=t.osdIds;i.yb(4),i.ac(i.kc(3,2,n))(e),i.Xb(1)}}function Tl(e,t){if(1&e&&(i.Sb(0,"div",23),i.Sb(1,"cd-alert-panel",24),i.Wb(2,25),i.Rb(),i.Rb()),2&e){const e=i.ic(),t=e.actionDescription,n=e.message,r=i.ic();i.yb(2),i.ac(r.selection.hasSingleSelection)(t)(n),i.Xb(2)}}function Cl(e,t){if(1&e&&(i.Mc(0,Tl,3,3,"div",21),i.Qb(1),i.cc(2,22),i.Nb(3,"strong"),i.jc(4,"join"),i.Nb(5,"strong"),i.Zb(),i.Pb()),2&e){const e=t.actionDescription,n=t.osdIds;i.pc("ngIf",!t.safeToPerform),i.yb(5),i.ac(i.kc(4,3,n))(e),i.Xb(2)}}function Ol(e,t){if(1&e&&(i.Sb(0,"span",28),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.yb(1),i.Pc(e)}}function Ll(e,t){if(1&e&&(i.Sb(0,"span",29),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.yb(1),i.Pc(e)}}function Rl(e,t){if(1&e&&(i.Mc(0,Ol,2,1,"span",26),i.Mc(1,Ll,2,1,"span",27)),2&e){const e=t.row;i.pc("ngForOf",e.cdClusterFlags),i.yb(1),i.pc("ngForOf",e.cdIndivFlags)}}function El(e,t){if(1&e&&i.Nb(0,"cd-usage-bar",30),2&e){const e=t.row;i.pc("total",e.stats.stat_bytes)("used",e.stats.stat_bytes_used)}}function Al(e,t){1&e&&(i.Qb(0,31),i.Qb(1,32),i.Sb(2,"div",33),i.Sb(3,"div",34),i.Nb(4,"input",35),i.Sb(5,"label",36),i.Wb(6,37),i.Rb(),i.Rb(),i.Rb(),i.Pb(),i.Pb()),2&e&&i.pc("formGroup",t.form)}let Il=(()=>{class e extends $t.a{constructor(e,t,n,i,r,s,o,a,c,l){super(),this.authStorageService=e,this.osdService=t,this.dimlessBinaryPipe=n,this.modalService=i,this.urlBuilder=r,this.router=s,this.taskWrapper=o,this.actionLabels=a,this.notificationService=c,this.orchService=l,this.icons=_n.a,this.selection=new Wt.a,this.osds=[],this.disabledFlags=["sortbitwise","purged_snapdirs","recovery_deletes","pglog_hardlimit"],this.indivFlagNames=["noup","nodown","noin","noout"],this.actionOrchFeatures={create:[hr.OSD_CREATE],delete:[hr.OSD_DELETE]},this.permissions=this.authStorageService.getPermissions(),this.tableActions=[{name:this.actionLabels.CREATE,permission:"create",icon:_n.a.add,click:()=>this.router.navigate([this.urlBuilder.getCreate()]),disable:e=>this.getDisable("create",e),canBePrimary:e=>!e.hasSelection},{name:this.actionLabels.EDIT,permission:"update",icon:_n.a.edit,click:()=>this.editAction()},{name:this.actionLabels.FLAGS,permission:"update",icon:_n.a.flag,click:()=>this.configureFlagsIndivAction(),disable:()=>!this.hasOsdSelected},{name:this.actionLabels.SCRUB,permission:"update",icon:_n.a.analyse,click:()=>this.scrubAction(!1),disable:()=>!this.hasOsdSelected,canBePrimary:e=>e.hasSelection},{name:this.actionLabels.DEEP_SCRUB,permission:"update",icon:_n.a.deepCheck,click:()=>this.scrubAction(!0),disable:()=>!this.hasOsdSelected},{name:this.actionLabels.REWEIGHT,permission:"update",click:()=>this.reweight(),disable:()=>!this.hasOsdSelected||!this.selection.hasSingleSelection,icon:_n.a.reweight},{name:this.actionLabels.MARK_OUT,permission:"update",click:()=>this.showConfirmationModal("out",this.osdService.markOut),disable:()=>this.isNotSelectedOrInState("out"),icon:_n.a.left},{name:this.actionLabels.MARK_IN,permission:"update",click:()=>this.showConfirmationModal("in",this.osdService.markIn),disable:()=>this.isNotSelectedOrInState("in"),icon:_n.a.right},{name:this.actionLabels.MARK_DOWN,permission:"update",click:()=>this.showConfirmationModal("down",this.osdService.markDown),disable:()=>this.isNotSelectedOrInState("down"),icon:_n.a.down},{name:this.actionLabels.MARK_LOST,permission:"delete",click:()=>this.showCriticalConfirmationModal("Mark","OSD lost","marked lost",e=>this.osdService.safeToDestroy(JSON.stringify(e)),"is_safe_to_destroy",this.osdService.markLost),disable:()=>this.isNotSelectedOrInState("up"),icon:_n.a.flatten},{name:this.actionLabels.PURGE,permission:"delete",click:()=>this.showCriticalConfirmationModal("Purge","OSD","purged",e=>this.osdService.safeToDestroy(JSON.stringify(e)),"is_safe_to_destroy",e=>(this.selection=new Wt.a,this.osdService.purge(e))),disable:()=>this.isNotSelectedOrInState("up"),icon:_n.a.erase},{name:this.actionLabels.DESTROY,permission:"delete",click:()=>this.showCriticalConfirmationModal("destroy","OSD","destroyed",e=>this.osdService.safeToDestroy(JSON.stringify(e)),"is_safe_to_destroy",e=>(this.selection=new Wt.a,this.osdService.destroy(e))),disable:()=>this.isNotSelectedOrInState("up"),icon:_n.a.destroyCircle},{name:this.actionLabels.DELETE,permission:"delete",click:()=>this.delete(),disable:e=>this.getDisable("delete",e),icon:_n.a.destroy}]}static collectStates(e){const t=[e.in?"in":"out"];return e.up?t.push("up"):e.state.includes("destroyed")?t.push("destroyed"):t.push("down"),t}ngOnInit(){this.clusterWideActions=[{name:"Flags",icon:_n.a.flag,click:()=>this.configureFlagsAction(),permission:"read",visible:()=>this.permissions.osd.read},{name:"Recovery Priority",icon:_n.a.deepCheck,click:()=>this.configureQosParamsAction(),permission:"read",visible:()=>this.permissions.configOpt.read},{name:"PG scrub",icon:_n.a.analyse,click:()=>this.configurePgScrubAction(),permission:"read",visible:()=>this.permissions.configOpt.read}],this.columns=[{prop:"id",name:"ID",flexGrow:1,cellTransformation:Ht.a.executing,customTemplateConfig:{valueClass:"bold"}},{prop:"host.name",name:"Host"},{prop:"collectedStates",name:"Status",flexGrow:1,cellTransformation:Ht.a.badge,customTemplateConfig:{map:{in:{class:"badge-success"},up:{class:"badge-success"},down:{class:"badge-danger"},out:{class:"badge-danger"},destroyed:{class:"badge-danger"}}}},{prop:"tree.device_class",name:"Device class",flexGrow:1.2,cellTransformation:Ht.a.badge,customTemplateConfig:{map:{hdd:{class:"badge-hdd"},ssd:{class:"badge-ssd"}}}},{prop:"stats.numpg",name:"PGs",flexGrow:1},{prop:"stats.stat_bytes",name:"Size",flexGrow:1,pipe:this.dimlessBinaryPipe},{prop:"state",name:"Flags",cellTemplate:this.flagsTpl},{prop:"stats.usage",name:"Usage",cellTemplate:this.osdUsageTpl},{prop:"stats_history.out_bytes",name:"Read bytes",cellTransformation:Ht.a.sparkline},{prop:"stats_history.in_bytes",name:"Write bytes",cellTransformation:Ht.a.sparkline},{prop:"stats.op_r",name:"Read ops",cellTransformation:Ht.a.perSecond},{prop:"stats.op_w",name:"Write ops",cellTransformation:Ht.a.perSecond}],this.orchService.status().subscribe(e=>this.orchStatus=e)}getDisable(e,t){if("delete"===e){if(!t.hasSelection)return!0;if(Nt.a.some(this.getSelectedOsds(),e=>{const t=Nt.a.get(e,"operational_status");return"deleting"===t||"unmanaged"===t}))return!0}return this.orchService.getTableActionDisableDesc(this.orchStatus,this.actionOrchFeatures[e])}getSelectedOsdIds(){const e=this.osds.map(e=>e.id);return this.selection.selected.map(e=>e.id).filter(t=>e.includes(t)).sort()}getSelectedOsds(){return this.osds.filter(e=>!Nt.a.isUndefined(e)&&this.getSelectedOsdIds().includes(e.id))}get hasOsdSelected(){return this.getSelectedOsdIds().length>0}updateSelection(e){this.selection=e}isNotSelectedOrInState(e){const t=this.getSelectedOsds();if(0===t.length)return!0;switch(e){case"in":return t.some(e=>1===e.in);case"out":return t.some(e=>1!==e.in);case"down":return t.some(e=>1!==e.up);case"up":return t.some(e=>1===e.up)}}getOsdList(){const t=[this.osdService.getList(),this.osdService.getFlags()];Object(jo.a)(t).subscribe(t=>{this.osds=t[0].map(n=>{n.collectedStates=e.collectStates(n),n.stats_history.out_bytes=n.stats_history.op_out_bytes.map(e=>e[1]),n.stats_history.in_bytes=n.stats_history.op_in_bytes.map(e=>e[1]),n.stats.usage=n.stats.stat_bytes_used/n.stats.stat_bytes,n.cdIsBinary=!0,n.cdIndivFlags=n.state.filter(e=>this.indivFlagNames.includes(e)),n.cdClusterFlags=t[1].filter(e=>!this.disabledFlags.includes(e));const i=Nt.a.get(n,"operational_status","unmanaged");return"unmanaged"!==i&&"working"!==i&&(n.cdExecuting=i),n})})}editAction(){const e=Nt.a.filter(this.osds,["id",this.selection.first().id]).pop();this.modalService.show(Tn.a,{titleText:"Edit OSD: " + e.id + "",fields:[{type:"text",name:"deviceClass",value:e.tree.device_class,label:"Device class",required:!0}],submitButtonText:"Edit OSD",onSubmit:t=>{this.osdService.update(e.id,t.deviceClass).subscribe(()=>{this.notificationService.show(yn.a.success,"Updated OSD '" + e.id + "'"),this.getOsdList()})}})}scrubAction(e){if(!this.hasOsdSelected)return;const t={selected:this.getSelectedOsdIds(),deep:e};this.bsModalRef=this.modalService.show(tl,t)}configureFlagsAction(){this.bsModalRef=this.modalService.show(vc)}configureFlagsIndivAction(){const e={selected:this.getSelectedOsds()};this.bsModalRef=this.modalService.show(bc,e)}showConfirmationModal(e,t){const n=this.getSelectedOsdIds();this.bsModalRef=this.modalService.show(Dn.a,{titleText:"Mark OSD " + e + "",buttonText:"Mark " + e + "",bodyTpl:this.markOsdConfirmationTpl,bodyContext:{markActionDescription:e,osdIds:n},onSubmit:()=>{Object(jo.a)(this.getSelectedOsdIds().map(e=>t.call(this.osdService,e))).subscribe(()=>this.bsModalRef.close())}})}reweight(){const e=this.osds.filter(e=>e.id===this.selection.first().id).pop();this.bsModalRef=this.modalService.show(Xc,{currentWeight:e.weight,osdId:e.id})}delete(){const e=new Jn.a({preserve:new xn.h(!1)});this.showCriticalConfirmationModal("delete","OSD","deleted",e=>this.osdService.safeToDelete(JSON.stringify(e)),"is_safe_to_delete",t=>(this.selection=new Wt.a,this.taskWrapper.wrapTaskAroundCall({task:new tr.a("osd/"+gn.e.DELETE,{svc_id:t}),call:this.osdService.delete(t,e.value.preserve,!0)})),!0,e,this.deleteOsdExtraTpl)}showCriticalConfirmationModal(e,t,n,i,r,s,o=!1,a,c){i(this.getSelectedOsdIds()).subscribe(i=>{const l=this.modalService.show(bn.a,{actionDescription:e,itemDescription:t,bodyTemplate:this.criticalConfirmationTpl,bodyContext:{safeToPerform:i[r],message:i.message,actionDescription:n,osdIds:this.getSelectedOsdIds()},childFormGroup:a,childFormGroupTemplate:c,submitAction:()=>{const e=Object(jo.a)(this.getSelectedOsdIds().map(e=>s.call(this.osdService,e)));o?e.subscribe({error:()=>{this.getOsdList(),l.close()},complete:()=>l.close()}):e.subscribe(()=>{this.getOsdList(),l.close()},()=>l.close())}})})}configureQosParamsAction(){this.bsModalRef=this.modalService.show(Jc)}configurePgScrubAction(){this.bsModalRef=this.modalService.show(Yc,void 0,{size:"lg"})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Jt.a),i.Mb(mr),i.Mb(Zt.a),i.Mb(vn.a),i.Mb(pr.a),i.Mb(Pt.e),i.Mb(nr.a),i.Mb(gn.b),i.Mb(wn.a),i.Mb(dr))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-osd-list"]],viewQuery:function(e,t){var n;1&e&&(i.Jc(ml,!0),i.Jc(bl,!0),i.Jc(gl,!0),i.Tc(_l,!0),i.Tc(yl,!0),i.Tc(vl,!0),i.Jc(wl,!0)),2&e&&(i.zc(n=i.hc())&&(t.osdUsageTpl=n.first),i.zc(n=i.hc())&&(t.markOsdConfirmationTpl=n.first),i.zc(n=i.hc())&&(t.criticalConfirmationTpl=n.first),i.zc(n=i.hc())&&(t.reweightBodyTpl=n.first),i.zc(n=i.hc())&&(t.safeToDestroyBodyTpl=n.first),i.zc(n=i.hc())&&(t.deleteOsdExtraTpl=n.first),i.zc(n=i.hc())&&(t.flagsTpl=n.first))},features:[i.xb([{provide:pr.a,useValue:new pr.a("osd")}]),i.vb],decls:18,vars:2,consts:function(){var e,t,n,r,s;return e="OSDs List",t="Overall Performance",n="" + "[\ufffd#2\ufffd|\ufffd#4\ufffd]" + "OSD(s) " + "\ufffd0\ufffd" + "" + "[\ufffd/#2\ufffd|\ufffd/#4\ufffd]" + " will be marked " + "[\ufffd#2\ufffd|\ufffd#4\ufffd]" + "" + "\ufffd1\ufffd" + "" + "[\ufffd/#2\ufffd|\ufffd/#4\ufffd]" + " if you proceed.",n=i.bc(n),r="" + "[\ufffd#3\ufffd|\ufffd#5\ufffd]" + "OSD " + "\ufffd0\ufffd" + "" + "[\ufffd/#3\ufffd|\ufffd/#5\ufffd]" + " will be " + "[\ufffd#3\ufffd|\ufffd#5\ufffd]" + "" + "\ufffd1\ufffd" + "" + "[\ufffd/#3\ufffd|\ufffd/#5\ufffd]" + " if you proceed.",r=i.bc(r),s="{VAR_SELECT, select, true {OSD is} other {OSDs are}}",s=i.bc(s,{VAR_SELECT:"\ufffd0\ufffd"}),[["ngbNav","",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem",""],["ngbNavLink",""],e,["ngbNavContent",""],["ngbNavItem","",4,"ngIf"],[3,"ngbNavOutlet"],["markOsdConfirmationTpl",""],["criticalConfirmationTpl",""],["flagsTpl",""],["osdUsageTpl",""],["deleteOsdExtraTpl",""],["selectionType","multiClick",3,"data","columns","hasDetails","updateSelectionOnRefresh","fetchData","setExpandedRow","updateSelection"],[1,"table-actions","btn-toolbar"],["id","osd-actions",1,"btn-group",3,"permission","selection","tableActions"],["dropDownOnly","Cluster-wide configuration","btnColor","light","id","cluster-wide-actions",1,"btn-group",3,"permission","selection","tableActions"],["cdTableDetail","",3,"selection"],t,["uid","lo02I1Aiz","grafanaStyle","four",3,"grafanaPath"],n,["class","danger",4,"ngIf"],r,[1,"danger"],["type","warning"],"The " + s + " not safe to be " + "\ufffd1\ufffd" + "! " + "\ufffd2\ufffd" + "",["class","badge badge-hdd mr-1",4,"ngFor","ngForOf"],["class","badge badge-info mr-1",4,"ngFor","ngForOf"],[1,"badge","badge-hdd","mr-1"],[1,"badge","badge-info","mr-1"],[3,"total","used"],[3,"formGroup"],["formGroupName","child"],[1,"form-group"],[1,"custom-control","custom-checkbox"],["type","checkbox","name","preserve","id","preserve","formControlName","preserve",1,"custom-control-input"],["for","preserve",1,"custom-control-label"],"Preserve OSD ID(s) for replacement."]},template:function(e,t){if(1&e&&(i.Sb(0,"ul",0,1),i.Sb(2,"li",2),i.Sb(3,"a",3),i.Wb(4,4),i.Rb(),i.Mc(5,Ml,5,12,"ng-template",5),i.Rb(),i.Mc(6,kl,4,0,"li",6),i.Rb(),i.Nb(7,"div",7),i.Mc(8,Dl,5,4,"ng-template",null,8,i.Nc),i.Mc(10,Cl,6,5,"ng-template",null,9,i.Nc),i.Mc(12,Rl,2,2,"ng-template",null,10,i.Nc),i.Mc(14,El,1,2,"ng-template",null,11,i.Nc),i.Mc(16,Al,7,1,"ng-template",null,12,i.Nc)),2&e){const e=i.Ac(1);i.yb(6),i.pc("ngIf",t.permissions.grafana.read),i.yb(1),i.pc("ngbNavOutlet",e)}},directives:[Qt.p,Qt.r,Qt.s,Qt.q,o.r,Qt.u,Bt.a,Sn.a,pl,Fn.a,br.a,o.q,ln.a,Zn.a,xn.r,xn.k,xn.l,Xn.a,On.a,xn.b,ei.a,xn.q,xn.i],pipes:[el.a],styles:[""]}),e})();var Pl=n("20UP");let jl=(()=>{class e{constructor(e,t){this.http=e,this.settingsService=t,this.baseURL="api/prometheus",this.settingsKey={alertmanager:"api/settings/alertmanager-api-host",prometheus:"api/settings/prometheus-api-host"}}ifAlertmanagerConfigured(e,t){this.settingsService.ifSettingConfigured(this.settingsKey.alertmanager,e,t)}disableAlertmanagerConfig(){this.settingsService.disableSetting(this.settingsKey.alertmanager)}ifPrometheusConfigured(e,t){this.settingsService.ifSettingConfigured(this.settingsKey.prometheus,e,t)}disablePrometheusConfig(){this.settingsService.disableSetting(this.settingsKey.prometheus)}getAlerts(e={}){return this.http.get(this.baseURL,{params:e})}getSilences(e={}){return this.http.get(this.baseURL+"/silences",{params:e})}getRules(e="all"){return this.http.get(this.baseURL+"/rules").pipe(Object(Vi.a)(t=>(["alerting","rewrites"].includes(e)&&t.groups.map(t=>{t.rules=t.rules.filter(t=>t.type===e)}),t)))}setSilence(e){return this.http.post(this.baseURL+"/silence",e,{observe:"response"})}expireSilence(e){return this.http.delete(`${this.baseURL}/silence/${e}`,{observe:"response"})}getNotifications(e){return this.http.get(`${this.baseURL}/notifications?from=${e&&e.id?e.id:"last"}`)}}return e.\u0275fac=function(t){return new(t||e)(i.dc(a.b),i.dc(Pl.a))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var Nl=n("G1I9");let Fl=(()=>{class e{constructor(e){this.notificationService=e}sendNotifications(e){e.forEach(e=>this.notificationService.show(e))}convertToCustomAlerts(e){return Nt.a.uniqWith(e.map(e=>({status:Nt.a.isObject(e.status)?e.status.state:this.getPrometheusNotificationStatus(e),name:e.labels.alertname,url:e.generatorURL,description:e.annotations.description,fingerprint:Nt.a.isObject(e.status)&&e.fingerprint})),Nt.a.isEqual)}getPrometheusNotificationStatus(e){const t=e.status;return"firing"===t?"active":t}convertAlertToNotification(e){return new Nl.b(this.formatType(e.status),`${e.name} (${e.status})`,this.appendSourceLink(e,e.description),void 0,"Prometheus")}formatType(e){return yn.a[Nt.a.findKey({error:["firing","active"],info:["suppressed","unprocessed"],success:["resolved"]},t=>t.includes(e))]}appendSourceLink(e,t){return`${t} <a href="${e.url}" target="_blank"><i class="${_n.a.lineChart}"></i></a>`}}return e.\u0275fac=function(t){return new(t||e)(i.dc(wn.a))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),Yl=(()=>{class e{constructor(e,t){this.alertFormatter=e,this.prometheusService=t,this.canAlertsBeNotified=!1,this.alerts=[],this.rules=[]}getAlerts(){this.prometheusService.ifAlertmanagerConfigured(()=>{this.prometheusService.getAlerts().subscribe(e=>this.handleAlerts(e),e=>{[404,504].includes(e.status)&&this.prometheusService.disableAlertmanagerConfig()})})}getRules(){this.prometheusService.ifPrometheusConfigured(()=>{this.prometheusService.getRules("alerting").subscribe(e=>{this.rules=e.groups.reduce((e,t)=>e.concat(t.rules.map(e=>(e.group=t.name,e))),[])})})}refresh(){this.getAlerts(),this.getRules()}handleAlerts(e){this.canAlertsBeNotified&&this.notifyOnAlertChanges(e,this.alerts),this.activeAlerts=Nt.a.reduce(this.alerts,(e,t)=>"active"===t.status.state?++e:e,0),this.alerts=e,this.canAlertsBeNotified=!0}notifyOnAlertChanges(e,t){const n=this.getChangedAlerts(this.alertFormatter.convertToCustomAlerts(e),this.alertFormatter.convertToCustomAlerts(t)).map(e=>this.alertFormatter.convertAlertToNotification(e));this.alertFormatter.sendNotifications(n)}getChangedAlerts(e,t){return Nt.a.differenceWith(e,t,Nt.a.isEqual).concat(this.getVanishedAlerts(e,t))}getVanishedAlerts(e,t){return Nt.a.differenceWith(t,e,(e,t)=>e.fingerprint===t.fingerprint).map(e=>(e.status="resolved",e))}}return e.\u0275fac=function(t){return new(t||e)(i.dc(Fl),i.dc(jl))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),zl=(()=>{class e extends $t.a{constructor(e){super(),this.prometheusService=e,this.isPrometheusConfigured=!1,this.isAlertmanagerConfigured=!1}ngOnInit(){this.prometheusService.ifAlertmanagerConfigured(()=>{this.isAlertmanagerConfigured=!0}),this.prometheusService.ifPrometheusConfigured(()=>{this.isPrometheusConfigured=!0})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(jl))},e.\u0275dir=i.Hb({type:e,features:[i.vb]}),e})(),$l=(()=>{class e{constructor(e){this.router=e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Pt.e))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-prometheus-tabs"]],decls:11,vars:1,consts:function(){return[["ngbNav","",1,"nav-tabs",3,"activeId","navChange"],["nav","ngbNav"],["ngbNavItem","/monitoring/active-alerts"],["ngbNavLink",""],"Active Alerts",["ngbNavItem","/monitoring/alerts"],"Alerts",["ngbNavItem","/monitoring/silences"],"Silences"]},template:function(e,t){1&e&&(i.Sb(0,"ul",0,1),i.gc("navChange",(function(e){return t.router.navigate([e.nextId])})),i.Sb(2,"li",2),i.Sb(3,"a",3),i.Wb(4,4),i.Rb(),i.Rb(),i.Sb(5,"li",5),i.Sb(6,"a",3),i.Wb(7,6),i.Rb(),i.Rb(),i.Sb(8,"li",7),i.Sb(9,"a",3),i.Wb(10,8),i.Rb(),i.Rb(),i.Rb()),2&e&&i.pc("activeId",t.router.url)},directives:[Qt.p,Qt.r,Qt.s],styles:[""]}),e})();const Hl=["externalLinkTpl"];function Wl(e,t){1&e&&(i.Sb(0,"cd-alert-panel",3),i.cc(1,4),i.Nb(2,"cd-doc",5),i.Zb(),i.Rb())}function Vl(e,t){if(1&e&&i.Nb(0,"cd-table-key-value",9),2&e){const e=i.ic(2);i.pc("renderObjects",!0)("hideEmpty",!0)("appendParentKey",!1)("data",e.expandedRow)("customCss",e.customCss)("autoReload",!1)}}function Bl(e,t){if(1&e){const e=i.Tb();i.Sb(0,"cd-table",6),i.gc("setExpandedRow",(function(t){return i.Dc(e),i.ic().setExpandedRow(t)}))("updateSelection",(function(t){return i.Dc(e),i.ic().updateSelection(t)})),i.Nb(1,"cd-table-actions",7),i.Mc(2,Vl,1,6,"cd-table-key-value",8),i.Rb()}if(2&e){const e=i.ic();i.pc("data",e.prometheusAlertService.alerts)("columns",e.columns)("forceIdentifier",!0)("customCss",e.customCss)("hasDetails",!0),i.yb(1),i.pc("permission",e.permission)("selection",e.selection)("tableActions",e.tableActions),i.yb(1),i.pc("ngIf",e.expandedRow)}}const Ul=function(e){return[e]};function ql(e,t){if(1&e&&(i.Sb(0,"a",10),i.Nb(1,"i",11),i.Oc(2," Source"),i.Rb()),2&e){const e=t.value,n=i.ic();i.pc("href",e,i.Gc),i.yb(1),i.pc("ngClass",i.uc(2,Ul,n.icons.lineChart))}}let Gl=(()=>{class e extends zl{constructor(e,t,n,i,r){super(r),this.authStorageService=e,this.prometheusAlertService=t,this.urlBuilder=n,this.cdDatePipe=i,this.selection=new Wt.a,this.icons=_n.a,this.customCss={"badge badge-danger":"active","badge badge-warning":"unprocessed","badge badge-info":"suppressed"},this.permission=this.authStorageService.getPermissions().prometheus,this.tableActions=[{permission:"create",canBePrimary:e=>e.hasSingleSelection,disable:e=>!e.hasSingleSelection||e.first().cdExecuting,icon:_n.a.add,routerLink:()=>"/monitoring"+this.urlBuilder.getCreateFrom(this.selection.first().fingerprint),name:"Create Silence"}]}ngOnInit(){super.ngOnInit(),this.columns=[{name:"Name",prop:"labels.alertname",flexGrow:2},{name:"Job",prop:"labels.job",flexGrow:2},{name:"Severity",prop:"labels.severity"},{name:"State",prop:"status.state",cellTransformation:Ht.a.classAdding},{name:"Started",prop:"startsAt",pipe:this.cdDatePipe},{name:"URL",prop:"generatorURL",sortable:!1,cellTemplate:this.externalLinkTpl}]}updateSelection(e){this.selection=e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Jt.a),i.Mb(Yl),i.Mb(pr.a),i.Mb(Vt.a),i.Mb(jl))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-active-alert-list"]],viewQuery:function(e,t){var n;1&e&&i.Jc(Hl,!0),2&e&&i.zc(n=i.hc())&&(t.externalLinkTpl=n.first)},features:[i.xb([{provide:pr.a,useValue:new pr.a("silences")}]),i.vb],decls:5,vars:2,consts:function(){return[["type","info",4,"ngIf"],["identifier","fingerprint","selectionType","single",3,"data","columns","forceIdentifier","customCss","hasDetails","setExpandedRow","updateSelection",4,"ngIf"],["externalLinkTpl",""],["type","info"],"To see all active Prometheus alerts, please provide the URL to the API of Prometheus' Alertmanager as described in the " + "\ufffd#2\ufffd" + "" + "\ufffd/#2\ufffd" + ".",["section","prometheus"],["identifier","fingerprint","selectionType","single",3,"data","columns","forceIdentifier","customCss","hasDetails","setExpandedRow","updateSelection"],[1,"table-actions",3,"permission","selection","tableActions"],["cdTableDetail","",3,"renderObjects","hideEmpty","appendParentKey","data","customCss","autoReload",4,"ngIf"],["cdTableDetail","",3,"renderObjects","hideEmpty","appendParentKey","data","customCss","autoReload"],["target","_blank",3,"href"],[3,"ngClass"]]},template:function(e,t){1&e&&(i.Nb(0,"cd-prometheus-tabs"),i.Mc(1,Wl,3,0,"cd-alert-panel",0),i.Mc(2,Bl,3,9,"cd-table",1),i.Mc(3,ql,3,4,"ng-template",null,2,i.Nc)),2&e&&(i.yb(1),i.pc("ngIf",!t.isAlertmanagerConfigured),i.yb(1),i.pc("ngIf",t.isAlertmanagerConfigured))},directives:[$l,o.r,br.a,Lr.a,Bt.a,Sn.a,en.a,o.p],styles:[""]}),e})(),Jl=(()=>{class e{transform(e){const t=[[""+Math.floor(e/31536e3),"years"],[""+Math.floor(e%31536e3/86400),"days"],[""+Math.floor(e%86400/3600),"hours"],[""+Math.floor(e%3600/60),"minutes"],[""+Math.floor(e%60),"seconds"]];let n="";for(let i=0,r=t.length;i<r;i++)"0"!==t[i][0]&&(n+=" "+t[i][0]+" "+("1"===t[i][0]?t[i][1].substr(0,t[i][1].length-1):t[i][1]));return n.trim()||"1 second"}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"duration",type:e,pure:!1}),e})();function Ql(e,t){1&e&&(i.Sb(0,"cd-alert-panel",2),i.cc(1,3),i.Nb(2,"cd-doc",4),i.Zb(),i.Rb())}function Kl(e,t){if(1&e&&i.Nb(0,"cd-table-key-value",7),2&e){const e=i.ic(2);i.pc("data",e.expandedRow)("renderObjects",!0)("hideKeys",e.hideKeys)}}function Zl(e,t){if(1&e){const e=i.Tb();i.Sb(0,"cd-table",5),i.gc("updateSelection",(function(t){return i.Dc(e),i.ic().setExpandedRow(t)})),i.Mc(1,Kl,1,3,"cd-table-key-value",6),i.Rb()}if(2&e){const e=i.ic();i.pc("data",e.prometheusAlertService.rules)("columns",e.columns)("hasDetails",!0)("selectionType","single"),i.yb(1),i.pc("ngIf",e.expandedRow)}}let Xl=(()=>{class e extends zl{constructor(e,t){super(t),this.prometheusAlertService=e,this.hideKeys=["alerts","type"]}ngOnInit(){super.ngOnInit(),this.columns=[{prop:"name",name:"Name"},{prop:"labels.severity",name:"Severity"},{prop:"group",name:"Group"},{prop:"duration",name:"Duration",pipe:new Jl},{prop:"query",name:"Query",isHidden:!0},{prop:"annotations.description",name:"Description"}]}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Yl),i.Mb(jl))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-rules-list"]],features:[i.vb],decls:3,vars:2,consts:function(){return[["type","info",4,"ngIf"],[3,"data","columns","hasDetails","selectionType","updateSelection",4,"ngIf"],["type","info"],"To see all configured Prometheus alerts, please provide the URL to the API of Prometheus as described in the " + "\ufffd#2\ufffd" + "" + "\ufffd/#2\ufffd" + ".",["section","prometheus"],[3,"data","columns","hasDetails","selectionType","updateSelection"],["cdTableDetail","",3,"data","renderObjects","hideKeys",4,"ngIf"],["cdTableDetail","",3,"data","renderObjects","hideKeys"]]},template:function(e,t){1&e&&(i.Nb(0,"cd-prometheus-tabs"),i.Mc(1,Ql,3,0,"cd-alert-panel",0),i.Mc(2,Zl,2,5,"cd-table",1)),2&e&&(i.yb(1),i.pc("ngIf",!t.isPrometheusConfigured),i.yb(1),i.pc("ngIf",t.isPrometheusConfigured))},directives:[$l,o.r,br.a,Lr.a,Bt.a,en.a],styles:[""]}),e})();var eu=n("WE5d");let tu=(()=>{class e{constructor(){this.valueAttributePath={alertname:"name",instance:"alerts.0.labels.instance",job:"alerts.0.labels.job",severity:"labels.severity"}}singleMatch(e,t){return this.multiMatch([e],t)}multiMatch(e,t){if(!e.some(e=>e.isRegex))return e.forEach(e=>{t=this.getMatchedRules(e,t)}),this.describeMatch(t)}getMatchedRules(e,t){const n=this.getAttributePath(e.name);return t.filter(t=>Nt.a.get(t,n)===e.value)}describeMatch(e){let t=0;return e.forEach(e=>t+=e.alerts.length),{status:this.getMatchText(e.length,t),cssClass:t?"has-success":"has-warning"}}getAttributePath(e){return this.valueAttributePath[e]}getMatchText(e,t){const n={noRule:"Your matcher seems to match no currently defined rule or active alert.",noAlerts:"no active alerts",alert:"1 active alert",alerts:"" + t + " active alerts",rule:"Matches 1 rule",rules:"Matches " + e + " rules"};return e?"" + (e > 1 ? n.rules : n.rule) + " with " + (t ? t > 1 ? n.alerts : n.alert : n.noAlerts) + ".":n.noRule}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),nu=(()=>{class e{calculateDuration(e,t){const n=+e,i=+t,r=this.getDuration(Math.abs(n-i));return n>i?"-"+r:r}getDuration(e){const t=new Date(e),n=t.getUTCHours(),i=t.getUTCMinutes(),r=(e,t)=>e?e+t:e;return[r(Math.floor(e/864e5),"d"),r(n,"h"),r(i,"m")].filter(e=>e).join(" ")}calculateDate(e,t,n){const i=+e;if(Nt.a.isNaN(i))return;const r=this.getDurationMs(t)*(n?-1:1);return new Date(i+r)}getDurationMs(e){return 6e4*(60*(24*this.getNumbersFromString(e,"d")+this.getNumbersFromString(e,"h"))+this.getNumbersFromString(e,"m"))}getNumbersFromString(e,t){const n=e.match(new RegExp("[0-9 ]+"+t,"i"));return n?parseInt(n[0],10):0}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var iu=n("XNiG"),ru=n("VRyK"),su=n("7o/Q"),ou=n("D0XW");function au(e,t=ou.a){return n=>n.lift(new cu(e,t))}class cu{constructor(e,t){this.dueTime=e,this.scheduler=t}call(e,t){return t.subscribe(new lu(e,this.dueTime,this.scheduler))}}class lu extends su.a{constructor(e,t,n){super(e),this.dueTime=t,this.scheduler=n,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(uu,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:e}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}}clearDebounce(){const e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)}}function uu(e){e.debouncedNext()}var du=n("/uUt"),hu=n("pLZG");function fu(e,t){if(1&e&&(i.Sb(0,"option",27),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e),i.yb(1),i.Qc(" ",e," ")}}function pu(e,t){1&e&&(i.Sb(0,"span",28),i.Wb(1,29),i.Rb())}function mu(e,t){1&e&&(i.Sb(0,"span",28),i.Wb(1,30),i.Rb())}function bu(e,t){if(1&e&&(i.Sb(0,"div",31),i.Sb(1,"span"),i.Oc(2),i.Rb(),i.Rb()),2&e){const e=i.ic();i.Bb("cd-col-form-offset ",e.matcherMatch.cssClass,""),i.yb(1),i.Bb("text-muted ",e.matcherMatch.cssClass,""),i.yb(1),i.Qc(" ",e.matcherMatch.status," ")}}let gu=(()=>{class e{constructor(e,t,n,r){this.formBuilder=e,this.silenceMatcher=t,this.activeModal=n,this.actionLabels=r,this.submitAction=new i.o,this.editMode=!1,this.nameAttributes=["alertname","instance","job","severity"],this.possibleValues=[],this.matcherMatch=void 0,this.valueClick=new iu.a,this.valueFocus=new iu.a,this.search=e=>Object(ru.a)(e.pipe(au(200),Object(du.a)()),this.valueFocus,this.valueClick.pipe(Object(hu.a)(()=>!this.typeahead.isPopupOpen()))).pipe(Object(Vi.a)(e=>(""===e?this.possibleValues:this.possibleValues.filter(t=>t.toLowerCase().indexOf(e.toLowerCase())>-1)).slice(0,10))),this.createForm(),this.subscribeToChanges()}createForm(){this.form=this.formBuilder.group({name:[null,[xn.A.required]],value:[{value:"",disabled:!0},[xn.A.required]],isRegex:new xn.h(!1)})}subscribeToChanges(){this.form.get("name").valueChanges.subscribe(e=>{null!==e?(this.setPossibleValues(e),this.form.get("value").enable()):this.form.get("value").disable()}),this.form.get("value").valueChanges.subscribe(e=>{const t=this.form.value;t.value=e,this.matcherMatch=this.silenceMatcher.singleMatch(t,this.rules)})}setPossibleValues(e){this.possibleValues=Nt.a.sortedUniq(this.rules.map(t=>Nt.a.get(t,this.silenceMatcher.getAttributePath(e))).filter(e=>e))}getMode(){return this.editMode?this.actionLabels.EDIT:this.actionLabels.ADD}preFillControls(e){this.form.setValue(e)}onSubmit(){this.submitAction.emit(this.form.value),this.activeModal.close()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Fo.a),i.Mb(tu),i.Mb(Qt.a),i.Mb(gn.b))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-silence-matcher-modal"]],viewQuery:function(e,t){var n;1&e&&i.Jc(Qt.G,!0),2&e&&i.zc(n=i.hc())&&(t.typeahead=n.first)},outputs:{submitAction:"submitAction"},decls:31,vars:11,consts:function(){var e;return e="{VAR_SELECT, select, true {Edit} other {Add}}",e=i.bc(e,{VAR_SELECT:"\ufffd0\ufffd"}),[[3,"modalRef"],[1,"modal-title"],"" + e + " Matcher",[1,"modal-content"],["novalidate","",1,"form",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","name",1,"cd-col-form-label","required"],"Name",[1,"cd-col-form-input"],["id","name","formControlName","name","name","name",1,"form-control"],[3,"ngValue"],"-- Select an attribute to match against --",[3,"value",4,"ngFor","ngForOf"],["class","help-block",4,"ngIf"],["for","value",1,"cd-col-form-label","required"],"Value",["id","value","container","body","type","text","formControlName","value",1,"form-control",3,"ngbTypeahead","focus","click"],["id","match-state",3,"class",4,"ngIf"],[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["type","checkbox","formControlName","isRegex","name","is-regex","id","is-regex",1,"custom-control-input"],["for","is-regex",1,"custom-control-label"],"Use regular expression",[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[3,"value"],[1,"help-block"],"This field is required!","This field is required!",["id","match-state"]]},template:function(e,t){if(1&e&&(i.Sb(0,"cd-modal",0),i.Sb(1,"span",1),i.Wb(2,2),i.Rb(),i.Qb(3,3),i.Sb(4,"form",4,5),i.Sb(6,"div",6),i.Sb(7,"div",7),i.Sb(8,"label",8),i.Wb(9,9),i.Rb(),i.Sb(10,"div",10),i.Sb(11,"select",11),i.Sb(12,"option",12),i.Wb(13,13),i.Rb(),i.Mc(14,fu,2,2,"option",14),i.Rb(),i.Mc(15,pu,2,0,"span",15),i.Rb(),i.Rb(),i.Sb(16,"div",7),i.Sb(17,"label",16),i.Wb(18,17),i.Rb(),i.Sb(19,"div",10),i.Sb(20,"input",18),i.gc("focus",(function(e){return t.valueFocus.next(e.target.value)}))("click",(function(e){return t.valueClick.next(e.target.value)})),i.Rb(),i.Mc(21,mu,2,0,"span",15),i.Rb(),i.Mc(22,bu,3,7,"div",19),i.Rb(),i.Sb(23,"div",7),i.Sb(24,"div",20),i.Sb(25,"div",21),i.Nb(26,"input",22),i.Sb(27,"label",23),i.Wb(28,24),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Sb(29,"div",25),i.Sb(30,"cd-form-button-panel",26),i.gc("submitActionEvent",(function(){return t.onSubmit()})),i.Rb(),i.Rb(),i.Rb(),i.Pb(),i.Rb()),2&e){const e=i.Ac(5);i.pc("modalRef",t.activeModal),i.yb(2),i.ac(t.editMode),i.Xb(2),i.yb(2),i.pc("formGroup",t.form),i.yb(8),i.pc("ngValue",null),i.yb(2),i.pc("ngForOf",t.nameAttributes),i.yb(1),i.pc("ngIf",t.form.showError("name",e,"required")),i.yb(5),i.pc("ngbTypeahead",t.search),i.yb(1),i.pc("ngIf",t.form.showError("value",e,"required")),i.yb(1),i.pc("ngIf",t.form.getValue("value")&&!t.form.getValue("isRegex")&&t.matcherMatch),i.yb(8),i.pc("form",t.form)("submitText",t.getMode())}},directives:[Ia.a,xn.C,xn.r,Zn.a,xn.k,Xn.a,On.a,xn.z,ei.a,xn.q,xn.i,xn.u,xn.B,o.q,o.r,xn.d,Qt.G,xn.b,ti.a],styles:[""]}),e})();var _u=n("MAOJ");function yu(e,t){if(1&e&&(i.Qb(0),i.Nb(1,"input",54),i.Pb()),2&e){const e=i.ic().$implicit,t=i.ic(),n=t.index,r=t.matcher;i.yb(1),i.sc("id","matcher-",e.attribute,"-",n,""),i.pc("value",r[e.attribute])}}function vu(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"div",47),i.Sb(2,"div",55),i.Nb(3,"input",56),i.Rb(),i.Rb(),i.Pb()),2&e){const e=i.ic().$implicit,t=i.ic(),n=t.index,r=t.matcher;i.yb(3),i.sc("id","matcher-",e.attribute,"-",n,""),i.pc("checked",r[e.attribute])}}const wu=function(e){return[e]};function Su(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"div",52),i.Sb(2,"span",53),i.Nb(3,"i",38),i.Rb(),i.Rb(),i.Mc(4,yu,2,3,"ng-container",7),i.Mc(5,vu,4,3,"ng-container",7),i.Pb()),2&e){const e=t.$implicit;i.yb(2),i.pc("ngbTooltip",e.tooltip),i.yb(1),i.pc("ngClass",i.uc(4,wu,e.icon)),i.yb(1),i.pc("ngIf","isRegex"!==e.attribute),i.yb(1),i.pc("ngIf","isRegex"===e.attribute)}}function Mu(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",46),i.Mc(1,Su,6,6,"ng-container",34),i.Sb(2,"span",47),i.Sb(3,"button",48),i.Yb(4,49),i.gc("click",(function(){i.Dc(e);const n=t.index;return i.ic().showMatcherModal(n)})),i.Nb(5,"i",38),i.Rb(),i.Sb(6,"button",48),i.Yb(7,50),i.gc("click",(function(){i.Dc(e);const n=t.index;return i.ic().deleteMatcher(n)})),i.Nb(8,"i",38),i.Rb(),i.Rb(),i.Rb(),i.Nb(9,"span",51)}if(2&e){const e=t.index,n=i.ic();i.yb(1),i.pc("ngForOf",n.matcherConfig),i.yb(2),i.rc("id","matcher-edit-",e,""),i.yb(2),i.pc("ngClass",i.uc(5,wu,n.icons.edit)),i.yb(1),i.rc("id","matcher-delete-",e,""),i.yb(2),i.pc("ngClass",i.uc(7,wu,n.icons.trash))}}function xu(e,t){1&e&&(i.Sb(0,"cd-helper"),i.Wb(1,57),i.Rb())}function ku(e,t){1&e&&(i.Sb(0,"span",58),i.Wb(1,59),i.Rb())}function Du(e,t){1&e&&(i.Sb(0,"span",58),i.Wb(1,60),i.Rb())}function Tu(e,t){1&e&&(i.Sb(0,"span",58),i.Wb(1,61),i.Rb())}function Cu(e,t){1&e&&(i.Sb(0,"span",58),i.Wb(1,62),i.Rb())}function Ou(e,t){1&e&&(i.Sb(0,"span",58),i.Wb(1,63),i.Rb())}const Lu=function(e,t){return{"text-warning":e,"text-danger":t}};function Ru(e,t){if(1&e&&(i.Sb(0,"h5",38),i.Sb(1,"strong"),i.Wb(2,64),i.Rb(),i.Rb()),2&e){i.ic();const e=i.Ac(4);i.pc("ngClass",i.vc(1,Lu,!e.submitted,e.submitted))}}function Eu(e,t){1&e&&i.Ob(0)}const Au=function(e,t){return{index:e,matcher:t}};function Iu(e,t){if(1&e&&(i.Sb(0,"span"),i.Mc(1,Eu,1,0,"ng-container",65),i.Rb()),2&e){const e=t.$implicit,n=t.index;i.ic();const r=i.Ac(1);i.yb(1),i.pc("ngTemplateOutlet",r)("ngTemplateOutletContext",i.vc(2,Au,n,e))}}function Pu(e,t){if(1&e&&(i.Sb(0,"div",66),i.Sb(1,"span"),i.Oc(2),i.Rb(),i.Rb()),2&e){const e=i.ic();i.Bb("cd-col-form-offset ",e.matcherMatch.cssClass,""),i.yb(1),i.Bb("text-muted ",e.matcherMatch.cssClass,""),i.yb(1),i.Qc(" ",e.matcherMatch.status," ")}}function ju(e,t){if(1&e&&i.Nb(0,"cd-date-time-picker",67),2&e){const e=i.ic();i.pc("control",e.form.get("startsAt"))("hasSeconds",!1)}}function Nu(e,t){if(1&e&&i.Nb(0,"cd-date-time-picker",67),2&e){const e=i.ic();i.pc("control",e.form.get("endsAt"))("hasSeconds",!1)}}const Fu=function(e){return{"btn-warning":e}};let Yu=(()=>{class e{constructor(e,t,n,i,r,s,o,a,c,l,u){this.router=e,this.authStorageService=t,this.formBuilder=n,this.prometheusService=i,this.notificationService=r,this.route=s,this.timeDiff=o,this.modalService=a,this.silenceMatcher=c,this.actionLabels=l,this.succeededLabels=u,this.icons=_n.a,this.recreate=!1,this.edit=!1,this.resource="silence",this.matchers=[],this.matcherMatch=void 0,this.matcherConfig=[{tooltip:"Attribute name",icon:this.icons.paragraph,attribute:"name"},{tooltip:"Value",icon:this.icons.terminal,attribute:"value"},{tooltip:"Regular expression",icon:this.icons.magic,attribute:"isRegex"}],this.datetimeFormat="YYYY-MM-DD HH:mm",this.init()}init(){this.chooseMode(),this.authenticate(),this.createForm(),this.setupDates(),this.getData()}chooseMode(){this.edit=this.router.url.startsWith("/monitoring/silences/edit"),this.recreate=this.router.url.startsWith("/monitoring/silences/recreate"),this.action=this.edit?this.actionLabels.EDIT:this.recreate?this.actionLabels.RECREATE:this.actionLabels.CREATE}authenticate(){if(this.permission=this.authStorageService.getPermissions().prometheus,!this.permission.read||!(this.edit?this.permission.update:this.permission.create))throw new eu.b}createForm(){const e=Cn.a.custom("format",e=>!(""===e||nn()(e,this.datetimeFormat).isValid()));this.form=this.formBuilder.group({startsAt:["",[xn.A.required,e]],duration:["2h",[xn.A.min(1)]],endsAt:["",[xn.A.required,e]],createdBy:[this.authStorageService.getUsername(),[xn.A.required]],comment:[null,[xn.A.required]]},{validators:Cn.a.custom("matcherRequired",()=>0===this.matchers.length)})}setupDates(){const e=nn()().format(this.datetimeFormat);this.form.silentSet("startsAt",e),this.updateDate(),this.subscribeDateChanges()}updateDate(e){const t=nn()(this.form.getValue(e?"endsAt":"startsAt"),this.datetimeFormat).toDate(),n=this.timeDiff.calculateDate(t,this.form.getValue("duration"),e);if(n){const t=nn()(n).format(this.datetimeFormat);this.form.silentSet(e?"startsAt":"endsAt",t)}}subscribeDateChanges(){this.form.get("startsAt").valueChanges.subscribe(()=>{this.onDateChange()}),this.form.get("duration").valueChanges.subscribe(()=>{this.updateDate()}),this.form.get("endsAt").valueChanges.subscribe(()=>{this.onDateChange(!0)})}onDateChange(e){const t=nn()(this.form.getValue("startsAt"),this.datetimeFormat),n=nn()(this.form.getValue("endsAt"),this.datetimeFormat);t.isBefore(n)?this.updateDuration():this.updateDate(e)}updateDuration(){const e=nn()(this.form.getValue("startsAt"),this.datetimeFormat).toDate(),t=nn()(this.form.getValue("endsAt"),this.datetimeFormat).toDate();this.form.silentSet("duration",this.timeDiff.calculateDuration(e,t))}getData(){this.getRules(),this.getModeSpecificData()}getRules(){this.prometheusService.ifPrometheusConfigured(()=>this.prometheusService.getRules().subscribe(e=>{this.rules=e.groups.reduce((e,t)=>Nt.a.concat(e,t.rules),[])},()=>{this.prometheusService.disablePrometheusConfig(),this.rules=[]}),()=>{this.rules=[],this.notificationService.show(yn.a.info,"Please add your Prometheus host to the dashboard configuration and refresh the page",void 0,void 0,"Prometheus")})}getModeSpecificData(){this.route.params.subscribe(e=>{e.id&&(this.edit||this.recreate?this.prometheusService.getSilences(e).subscribe(e=>{this.fillFormWithSilence(e[0])}):this.prometheusService.getAlerts(e).subscribe(e=>{this.fillFormByAlert(e[0])}))})}fillFormWithSilence(e){this.id=e.id,this.edit&&(["startsAt","endsAt"].forEach(t=>this.form.silentSet(t,nn()(e[t]).format(this.datetimeFormat))),this.updateDuration()),["createdBy","comment"].forEach(t=>this.form.silentSet(t,e[t])),this.matchers=e.matchers,this.validateMatchers()}validateMatchers(){this.rules?(this.matcherMatch=this.silenceMatcher.multiMatch(this.matchers,this.rules),this.form.markAsDirty(),this.form.updateValueAndValidity()):window.setTimeout(()=>this.validateMatchers(),100)}fillFormByAlert(e){const t=e.labels;Object.keys(t).forEach(e=>this.setMatcher({name:e,value:t[e],isRegex:!1}))}setMatcher(e,t){Nt.a.isNumber(t)?this.matchers[t]=e:this.matchers.push(e),this.validateMatchers()}showMatcherModal(e){const t=this.modalService.show(gu).componentInstance;t.rules=this.rules,Nt.a.isNumber(e)&&(t.editMode=!0,t.preFillControls(this.matchers[e])),t.submitAction.subscribe(t=>{this.setMatcher(t,e)})}deleteMatcher(e){this.matchers.splice(e,1),this.validateMatchers()}submit(){this.form.invalid||this.prometheusService.setSilence(this.getSubmitData()).subscribe(e=>{this.router.navigate(["/monitoring/silences"]),this.notificationService.show(yn.a.success,this.getNotificationTile(e.body.silenceId),void 0,void 0,"Prometheus")},()=>this.form.setErrors({cdSubmitButton:!0}))}getSubmitData(){const e=this.form.value;return delete e.duration,e.startsAt=nn()(e.startsAt,this.datetimeFormat).toISOString(),e.endsAt=nn()(e.endsAt,this.datetimeFormat).toISOString(),e.matchers=this.matchers,this.edit&&(e.id=this.id),e}getNotificationTile(e){let t;return t=this.edit?this.succeededLabels.EDITED:this.recreate?this.succeededLabels.RECREATED:this.succeededLabels.CREATED,`${t} ${this.resource} ${e}`}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Pt.e),i.Mb(Jt.a),i.Mb(Fo.a),i.Mb(jl),i.Mb(wn.a),i.Mb(Pt.a),i.Mb(nu),i.Mb(vn.a),i.Mb(tu),i.Mb(gn.b),i.Mb(gn.d))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-prometheus-form"]],decls:71,vars:30,consts:function(){return[["matcherTpl",""],[1,"cd-col-form"],["name","form","novalidate","",1,"form",3,"formGroup"],["formDir","ngForm"],[1,"card"],[1,"card-header"]," " + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + " ",[4,"ngIf"],[1,"card-body"],[1,"form-group","row"],["for","created-by",1,"cd-col-form-label","required"],"Creator",[1,"cd-col-form-input"],["formControlName","createdBy","id","created-by","name","created-by","type","text",1,"form-control"],["class","invalid-feedback",4,"ngIf"],["for","comment",1,"cd-col-form-label","required"],"Comment",["formControlName","comment","id","comment","name","comment","type","text",1,"form-control"],["for","starts-at",1,"cd-col-form-label"],[1,"required"],"Start time","If the start time lies in the past the creation time will be used",["formControlName","startsAt","triggers","manual",1,"form-control",3,"ngbPopover","click","keypress"],["ps","ngbPopover"],["for","duration",1,"cd-col-form-label","required"],"Duration",["formControlName","duration","id","duration","name","duration","type","text",1,"form-control"],["for","ends-at",1,"cd-col-form-label","required"],"End time",["formControlName","endsAt","triggers","manual",1,"form-control",3,"ngbPopover","click","keypress"],["pe","ngbPopover"],"Matchers",[1,"cd-col-form-offset"],[3,"ngClass",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"row"],[1,"col-12"],["type","button","id","add-matcher",1,"btn","btn-light","float-right","my-3",3,"ngClass","click"],[3,"ngClass"],"Add matcher",["id","match-state",3,"class",4,"ngIf"],[1,"card-footer"],[1,"text-right"],[3,"form","submitText","submitActionEvent"],["popStart",""],["popEnd",""],[1,"input-group","my-2"],[1,"input-group-append"],["type","button",1,"btn","btn-light",3,"id","click",6,"ngbTooltip"],["ngbTooltip","Edit"],["ngbTooltip","Delete"],[1,"help-block"],[1,"input-group-prepend"],[1,"input-group-text",3,"ngbTooltip"],["type","text","disabled","","readonly","",1,"form-control",3,"id","value"],[1,"input-group-text"],["type","checkbox","disabled","","readonly","",3,"id","checked"],"Editing a silence will expire the old silence and recreate it as a new silence",[1,"invalid-feedback"],"This field is required!","This field is required!","This field is required!","This field is required!","This field is required!","A silence requires at least one matcher",[4,"ngTemplateOutlet","ngTemplateOutletContext"],["id","match-state"],[3,"control","hasSeconds"]]},template:function(e,t){if(1&e){const e=i.Tb();i.Mc(0,Mu,10,9,"ng-template",null,0,i.Nc),i.Sb(2,"div",1),i.Sb(3,"form",2,3),i.Sb(5,"div",4),i.Sb(6,"div",5),i.Sb(7,"span"),i.Wb(8,6),i.jc(9,"titlecase"),i.jc(10,"upperFirst"),i.Rb(),i.Mc(11,xu,2,0,"cd-helper",7),i.Rb(),i.Sb(12,"div",8),i.Sb(13,"div",9),i.Sb(14,"label",10),i.Wb(15,11),i.Rb(),i.Sb(16,"div",12),i.Nb(17,"input",13),i.Mc(18,ku,2,0,"span",14),i.Rb(),i.Rb(),i.Sb(19,"div",9),i.Sb(20,"label",15),i.Wb(21,16),i.Rb(),i.Sb(22,"div",12),i.Sb(23,"textarea",17),i.Oc(24," "),i.Rb(),i.Mc(25,Du,2,0,"span",14),i.Rb(),i.Rb(),i.Sb(26,"div",9),i.Sb(27,"label",18),i.Sb(28,"span",19),i.Wb(29,20),i.Rb(),i.Sb(30,"cd-helper"),i.Wb(31,21),i.Rb(),i.Rb(),i.Sb(32,"div",12),i.Sb(33,"input",22,23),i.gc("click",(function(){return i.Dc(e),i.Ac(34).open()}))("keypress",(function(){return i.Dc(e),i.Ac(34).close()})),i.Rb(),i.Mc(35,Tu,2,0,"span",14),i.Rb(),i.Rb(),i.Sb(36,"div",9),i.Sb(37,"label",24),i.Wb(38,25),i.Rb(),i.Sb(39,"div",12),i.Nb(40,"input",26),i.Mc(41,Cu,2,0,"span",14),i.Rb(),i.Rb(),i.Sb(42,"div",9),i.Sb(43,"label",27),i.Wb(44,28),i.Rb(),i.Sb(45,"div",12),i.Sb(46,"input",29,30),i.gc("click",(function(){return i.Dc(e),i.Ac(47).open()}))("keypress",(function(){return i.Dc(e),i.Ac(47).close()})),i.Rb(),i.Mc(48,Ou,2,0,"span",14),i.Rb(),i.Rb(),i.Sb(49,"fieldset"),i.Sb(50,"legend",19),i.Wb(51,31),i.Rb(),i.Sb(52,"div",32),i.Mc(53,Ru,3,4,"h5",33),i.Mc(54,Iu,2,5,"span",34),i.Sb(55,"div",35),i.Sb(56,"div",36),i.Sb(57,"button",37),i.gc("click",(function(){return t.showMatcherModal()})),i.Nb(58,"i",38),i.Qb(59),i.Wb(60,39),i.Pb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Mc(61,Pu,3,7,"div",40),i.Rb(),i.Rb(),i.Sb(62,"div",41),i.Sb(63,"div",42),i.Sb(64,"cd-form-button-panel",43),i.gc("submitActionEvent",(function(){return t.submit()})),i.jc(65,"titlecase"),i.jc(66,"upperFirst"),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Mc(67,ju,1,2,"ng-template",null,44,i.Nc),i.Mc(69,Nu,1,2,"ng-template",null,45,i.Nc)}if(2&e){const e=i.Ac(4),n=i.Ac(68),r=i.Ac(70);i.yb(3),i.pc("formGroup",t.form),i.yb(7),i.ac(i.kc(9,18,t.action))(i.kc(10,20,t.resource)),i.Xb(8),i.yb(1),i.pc("ngIf",t.edit),i.yb(7),i.pc("ngIf",t.form.showError("createdBy",e,"required")),i.yb(7),i.pc("ngIf",t.form.showError("comment",e,"required")),i.yb(8),i.pc("ngbPopover",n),i.yb(2),i.pc("ngIf",t.form.showError("startsAt",e,"required")),i.yb(6),i.pc("ngIf",t.form.showError("duration",e,"required")),i.yb(5),i.pc("ngbPopover",r),i.yb(2),i.pc("ngIf",t.form.showError("endsAt",e,"required")),i.yb(5),i.pc("ngIf",0===t.matchers.length),i.yb(1),i.pc("ngForOf",t.matchers),i.yb(3),i.pc("ngClass",i.uc(26,Fu,e.submitted&&0===t.matchers.length)),i.yb(1),i.pc("ngClass",i.uc(28,wu,t.icons.add)),i.yb(3),i.pc("ngIf",t.matchers.length&&t.matcherMatch),i.yb(3),i.pc("form",t.form)("submitText",i.kc(65,22,t.action)+" "+i.kc(66,24,t.resource))}},directives:[xn.C,xn.r,Zn.a,xn.k,o.r,Xn.a,On.a,xn.d,ei.a,xn.q,xn.i,Yo.a,Qt.w,o.q,o.p,ti.a,Qt.D,o.w,_u.a],pipes:[o.A,sr.a],styles:["textarea[_ngcontent-%COMP%]{resize:vertical}"]}),e})();var zu=n("w9WL"),$u=n("HDdC");function Hu(e,t){1&e&&(i.Sb(0,"cd-alert-panel",2),i.cc(1,3),i.Nb(2,"cd-doc",4),i.Zb(),i.Rb())}function Wu(e,t){if(1&e&&i.Nb(0,"cd-table-key-value",8),2&e){const e=i.ic(2);i.pc("renderObjects",!0)("hideEmpty",!0)("appendParentKey",!1)("data",e.expandedRow)("customCss",e.customCss)("autoReload",!1)}}function Vu(e,t){if(1&e){const e=i.Tb();i.Sb(0,"cd-table",5),i.gc("setExpandedRow",(function(t){return i.Dc(e),i.ic().setExpandedRow(t)}))("fetchData",(function(){return i.Dc(e),i.ic().refresh()}))("updateSelection",(function(t){return i.Dc(e),i.ic().updateSelection(t)})),i.Nb(1,"cd-table-actions",6),i.Mc(2,Wu,1,6,"cd-table-key-value",7),i.Rb()}if(2&e){const e=i.ic();i.pc("data",e.silences)("columns",e.columns)("forceIdentifier",!0)("customCss",e.customCss)("sorts",e.sorts)("hasDetails",!0),i.yb(1),i.pc("permission",e.permission)("selection",e.selection)("tableActions",e.tableActions),i.yb(1),i.pc("ngIf",e.expandedRow)}}let Bu=(()=>{class e extends zl{constructor(e,t,n,i,r,s,o,a){super(a),this.authStorageService=e,this.cdDatePipe=t,this.modalService=n,this.notificationService=i,this.urlBuilder=r,this.actionLabels=s,this.succeededLabels=o,this.silences=[],this.selection=new Wt.a,this.customCss={"badge badge-danger":"active","badge badge-warning":"pending","badge badge-default":"expired"},this.sorts=[{prop:"endsAt",dir:zu.i.desc}],this.permission=this.authStorageService.getPermissions().prometheus;const c=e=>e.first()&&e.first().status&&"expired"===e.first().status.state;this.tableActions=[{permission:"create",icon:_n.a.add,routerLink:()=>this.urlBuilder.getCreate(),canBePrimary:e=>!e.hasSingleSelection,name:this.actionLabels.CREATE},{permission:"create",canBePrimary:e=>e.hasSingleSelection&&c(e),disable:e=>!e.hasSingleSelection||e.first().cdExecuting||e.first().cdExecuting&&c(e)||!c(e),icon:_n.a.copy,routerLink:()=>this.urlBuilder.getRecreate(this.selection.first().id),name:this.actionLabels.RECREATE},{permission:"update",icon:_n.a.edit,canBePrimary:e=>e.hasSingleSelection&&!c(e),disable:e=>!e.hasSingleSelection||e.first().cdExecuting||e.first().cdExecuting&&!c(e)||c(e),routerLink:()=>this.urlBuilder.getEdit(this.selection.first().id),name:this.actionLabels.EDIT},{permission:"delete",icon:_n.a.trash,canBePrimary:e=>e.hasSingleSelection&&!c(e),disable:e=>!e.hasSingleSelection||e.first().cdExecuting||c(e),click:()=>this.expireSilence(),name:this.actionLabels.EXPIRE}],this.columns=[{name:"ID",prop:"id",flexGrow:3},{name:"Created by",prop:"createdBy",flexGrow:2},{name:"Started",prop:"startsAt",pipe:this.cdDatePipe},{name:"Updated",prop:"updatedAt",pipe:this.cdDatePipe},{name:"Ends",prop:"endsAt",pipe:this.cdDatePipe},{name:"Status",prop:"status.state",cellTransformation:Ht.a.classAdding}]}refresh(){this.prometheusService.ifAlertmanagerConfigured(()=>{this.prometheusService.getSilences().subscribe(e=>{this.silences=e},()=>{this.prometheusService.disableAlertmanagerConfig()})})}updateSelection(e){this.selection=e}expireSilence(){const e=this.selection.first().id,t="Silence",n="Prometheus";this.modalRef=this.modalService.show(bn.a,{itemDescription:t,itemNames:[e],actionDescription:this.actionLabels.EXPIRE,submitActionObservable:()=>new $u.a(i=>{this.prometheusService.expireSilence(e).subscribe(()=>{this.notificationService.show(yn.a.success,`${this.succeededLabels.EXPIRED} ${t} ${e}`,void 0,void 0,n)},e=>{e.application=n,i.error(e)},()=>{i.complete(),this.refresh()})})})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Jt.a),i.Mb(Vt.a),i.Mb(vn.a),i.Mb(wn.a),i.Mb(pr.a),i.Mb(gn.b),i.Mb(gn.d),i.Mb(jl))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-silences-list"]],features:[i.xb([{provide:pr.a,useValue:new pr.a("monitoring/silences")}]),i.vb],decls:3,vars:2,consts:function(){return[["type","info",4,"ngIf"],["selectionType","single",3,"data","columns","forceIdentifier","customCss","sorts","hasDetails","setExpandedRow","fetchData","updateSelection",4,"ngIf"],["type","info"],"To enable Silences, please provide the URL to the API of the Prometheus' Alertmanager as described in the " + "\ufffd#2\ufffd" + "" + "\ufffd/#2\ufffd" + ".",["section","prometheus"],["selectionType","single",3,"data","columns","forceIdentifier","customCss","sorts","hasDetails","setExpandedRow","fetchData","updateSelection"],[1,"table-actions",3,"permission","selection","tableActions"],["cdTableDetail","",3,"renderObjects","hideEmpty","appendParentKey","data","customCss","autoReload",4,"ngIf"],["cdTableDetail","",3,"renderObjects","hideEmpty","appendParentKey","data","customCss","autoReload"]]},template:function(e,t){1&e&&(i.Nb(0,"cd-prometheus-tabs"),i.Mc(1,Hu,3,0,"cd-alert-panel",0),i.Mc(2,Vu,3,10,"cd-table",1)),2&e&&(i.yb(1),i.pc("ngIf",!t.isAlertmanagerConfigured),i.yb(1),i.pc("ngIf",t.isAlertmanagerConfigured))},directives:[$l,o.r,br.a,Lr.a,Bt.a,Sn.a,en.a],styles:[""]}),e})();var Uu=n("Ekvf"),qu=n("a96k"),Gu=n("D4zM");function Ju(e,t){if(1&e&&(i.Sb(0,"option",29),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e),i.yb(1),i.Qc(" ",e," ")}}function Qu(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,31),i.Rb())}function Ku(e,t){1&e&&(i.Sb(0,"option",12),i.Wb(1,36),i.Rb()),2&e&&i.pc("ngValue",null)}function Zu(e,t){1&e&&(i.Sb(0,"option",12),i.Wb(1,37),i.Rb()),2&e&&i.pc("ngValue",null)}function Xu(e,t){1&e&&(i.Sb(0,"option",12),i.Wb(1,38),i.Rb()),2&e&&i.pc("ngValue",null)}function ed(e,t){if(1&e&&(i.Sb(0,"option",29),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e.service_name),i.yb(1),i.Pc(e.service_name)}}function td(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,39),i.Rb())}const nd=function(){return["ingress"]},id=function(e){return{required:e}};function rd(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",7),i.Sb(1,"label",32),i.Wb(2,33),i.Rb(),i.Sb(3,"div",10),i.Sb(4,"select",34),i.gc("change",(function(){return i.Dc(e),i.ic().prePopulateId()})),i.Mc(5,Ku,2,1,"option",35),i.Mc(6,Zu,2,1,"option",35),i.Mc(7,Xu,2,1,"option",35),i.Mc(8,ed,2,2,"option",14),i.Rb(),i.Mc(9,td,2,0,"span",15),i.Rb(),i.Rb()}if(2&e){const e=i.ic(),t=i.Ac(2);i.yb(1),i.pc("ngClass",i.uc(7,id,i.tc(6,nd).includes(e.serviceForm.controls.service_type.value))),i.yb(4),i.pc("ngIf",null===e.services),i.yb(1),i.pc("ngIf",null!==e.services&&0===e.services.length),i.yb(1),i.pc("ngIf",null!==e.services&&e.services.length>0),i.yb(1),i.pc("ngForOf",e.services),i.yb(1),i.pc("ngIf",e.serviceForm.showError("backend_service",t,"required"))}}function sd(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,40),i.Rb())}function od(e,t){1&e&&(i.Sb(0,"span",30),i.cc(1,41),i.Nb(2,"strong"),i.Zb(),i.Rb())}function ad(e,t){1&e&&(i.Sb(0,"div",7),i.Sb(1,"label",42),i.Wb(2,43),i.Rb(),i.Sb(3,"div",10),i.Sb(4,"select",44),i.Sb(5,"option",45),i.Wb(6,46),i.Rb(),i.Sb(7,"option",47),i.Wb(8,48),i.Rb(),i.Rb(),i.Rb(),i.Rb())}function cd(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,52),i.Rb())}function ld(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",7),i.Sb(1,"label",49),i.Wb(2,50),i.Rb(),i.Sb(3,"div",10),i.Sb(4,"input",51),i.gc("focus",(function(t){return i.Dc(e),i.ic().labelFocus.next(t.target.value)}))("click",(function(t){return i.Dc(e),i.ic().labelClick.next(t.target.value)})),i.Rb(),i.Mc(5,cd,2,0,"span",15),i.Rb(),i.Rb()}if(2&e){const e=i.ic(),t=i.Ac(2);i.yb(4),i.pc("ngbTypeahead",e.searchLabels),i.yb(1),i.pc("ngIf",e.serviceForm.showError("label",t,"required"))}}function ud(e,t){if(1&e&&(i.Sb(0,"div",7),i.Sb(1,"label",53),i.Wb(2,54),i.Rb(),i.Sb(3,"div",10),i.Nb(4,"cd-select-badges",55),i.Rb(),i.Rb()),2&e){const e=i.ic();i.yb(4),i.pc("data",e.serviceForm.controls.hosts.value)("options",e.hosts.options)("messages",e.hosts.messages)}}function dd(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,60),i.Rb())}function hd(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,61),i.Rb())}function fd(e,t){if(1&e&&(i.Sb(0,"div",7),i.Sb(1,"label",56),i.Sb(2,"span"),i.Wb(3,57),i.Rb(),i.Sb(4,"cd-helper"),i.Wb(5,58),i.Rb(),i.Rb(),i.Sb(6,"div",10),i.Nb(7,"input",59),i.Mc(8,dd,2,0,"span",15),i.Mc(9,hd,2,0,"span",15),i.Rb(),i.Rb()),2&e){const e=i.ic(),t=i.Ac(2);i.yb(8),i.pc("ngIf",e.serviceForm.showError("count",t,"min")),i.yb(1),i.pc("ngIf",e.serviceForm.showError("count",t,"pattern"))}}function pd(e,t){1&e&&(i.Sb(0,"option",12),i.Wb(1,68),i.Rb()),2&e&&i.pc("ngValue",null)}function md(e,t){1&e&&(i.Sb(0,"option",12),i.Wb(1,69),i.Rb()),2&e&&i.pc("ngValue",null)}function bd(e,t){1&e&&(i.Sb(0,"option",12),i.Wb(1,70),i.Rb()),2&e&&i.pc("ngValue",null)}function gd(e,t){if(1&e&&(i.Sb(0,"option",29),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e.pool_name),i.yb(1),i.Pc(e.pool_name)}}function _d(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,71),i.Rb())}function yd(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"div",7),i.Sb(2,"label",62),i.Wb(3,63),i.Rb(),i.Sb(4,"div",10),i.Sb(5,"select",64),i.Mc(6,pd,2,1,"option",35),i.Mc(7,md,2,1,"option",35),i.Mc(8,bd,2,1,"option",35),i.Mc(9,gd,2,2,"option",14),i.Rb(),i.Mc(10,_d,2,0,"span",15),i.Rb(),i.Rb(),i.Sb(11,"div",7),i.Sb(12,"label",65),i.Wb(13,66),i.Rb(),i.Sb(14,"div",10),i.Nb(15,"input",67),i.Rb(),i.Rb(),i.Pb()),2&e){const e=i.ic(),t=i.Ac(2);i.yb(6),i.pc("ngIf",null===e.pools),i.yb(1),i.pc("ngIf",null!==e.pools&&0===e.pools.length),i.yb(1),i.pc("ngIf",null!==e.pools&&e.pools.length>0),i.yb(1),i.pc("ngForOf",e.pools),i.yb(1),i.pc("ngIf",e.serviceForm.showError("pool",t,"required"))}}function vd(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,75),i.Rb())}function wd(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,76),i.Rb())}function Sd(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,77),i.Rb())}function Md(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"div",7),i.Sb(2,"label",72),i.Wb(3,73),i.Rb(),i.Sb(4,"div",10),i.Nb(5,"input",74),i.Mc(6,vd,2,0,"span",15),i.Mc(7,wd,2,0,"span",15),i.Mc(8,Sd,2,0,"span",15),i.Rb(),i.Rb(),i.Pb()),2&e){const e=i.ic(),t=i.Ac(2);i.yb(6),i.pc("ngIf",e.serviceForm.showError("rgw_frontend_port",t,"pattern")),i.yb(1),i.pc("ngIf",e.serviceForm.showError("rgw_frontend_port",t,"min")),i.yb(1),i.pc("ngIf",e.serviceForm.showError("rgw_frontend_port",t,"max"))}}function xd(e,t){1&e&&(i.Sb(0,"option",12),i.Wb(1,97),i.Rb()),2&e&&i.pc("ngValue",null)}function kd(e,t){1&e&&(i.Sb(0,"option",12),i.Wb(1,98),i.Rb()),2&e&&i.pc("ngValue",null)}function Dd(e,t){1&e&&(i.Sb(0,"option",12),i.Wb(1,99),i.Rb()),2&e&&i.pc("ngValue",null)}function Td(e,t){if(1&e&&(i.Sb(0,"option",29),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e.pool_name),i.yb(1),i.Pc(e.pool_name)}}function Cd(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,100),i.Rb())}function Od(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,101),i.Rb())}function Ld(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,102),i.Rb())}function Rd(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,103),i.Rb())}function Ed(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,104),i.Rb())}function Ad(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,105),i.Rb())}const Id=function(){return["iscsi"]};function Pd(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"div",7),i.Sb(2,"label",62),i.Wb(3,78),i.Rb(),i.Sb(4,"div",10),i.Sb(5,"select",64),i.Mc(6,xd,2,1,"option",35),i.Mc(7,kd,2,1,"option",35),i.Mc(8,Dd,2,1,"option",35),i.Mc(9,Td,2,2,"option",14),i.Rb(),i.Mc(10,Cd,2,0,"span",15),i.Rb(),i.Rb(),i.Sb(11,"div",7),i.Sb(12,"label",79),i.Sb(13,"span"),i.Wb(14,80),i.Rb(),i.Sb(15,"cd-helper"),i.Sb(16,"span"),i.Wb(17,81),i.Rb(),i.Nb(18,"br"),i.Sb(19,"span"),i.cc(20,82),i.Nb(21,"b"),i.Zb(),i.Rb(),i.Rb(),i.Rb(),i.Sb(22,"div",10),i.Nb(23,"input",83),i.Rb(),i.Rb(),i.Sb(24,"div",7),i.Sb(25,"label",84),i.Wb(26,85),i.Rb(),i.Sb(27,"div",10),i.Nb(28,"input",86),i.Mc(29,Od,2,0,"span",15),i.Mc(30,Ld,2,0,"span",15),i.Mc(31,Rd,2,0,"span",15),i.Rb(),i.Rb(),i.Sb(32,"div",7),i.Sb(33,"label",87),i.Wb(34,88),i.Rb(),i.Sb(35,"div",10),i.Nb(36,"input",89),i.Mc(37,Ed,2,0,"span",15),i.Rb(),i.Rb(),i.Sb(38,"div",7),i.Sb(39,"label",90),i.Wb(40,91),i.Rb(),i.Sb(41,"div",10),i.Sb(42,"div",92),i.Nb(43,"input",93),i.Sb(44,"span",94),i.Nb(45,"button",95),i.Nb(46,"cd-copy-2-clipboard-button",96),i.Rb(),i.Mc(47,Ad,2,0,"span",15),i.Rb(),i.Rb(),i.Rb(),i.Pb()),2&e){const e=i.ic(),t=i.Ac(2);i.yb(6),i.pc("ngIf",null===e.pools),i.yb(1),i.pc("ngIf",null!==e.pools&&0===e.pools.length),i.yb(1),i.pc("ngIf",null!==e.pools&&e.pools.length>0),i.yb(1),i.pc("ngForOf",e.pools),i.yb(1),i.pc("ngIf",e.serviceForm.showError("pool",t,"required")),i.yb(19),i.pc("ngIf",e.serviceForm.showError("api_port",t,"pattern")),i.yb(1),i.pc("ngIf",e.serviceForm.showError("api_port",t,"min")),i.yb(1),i.pc("ngIf",e.serviceForm.showError("api_port",t,"max")),i.yb(2),i.pc("ngClass",i.uc(13,id,i.tc(12,Id).includes(e.serviceForm.controls.service_type.value))),i.yb(4),i.pc("ngIf",e.serviceForm.showError("api_user",t,"required")),i.yb(2),i.pc("ngClass",i.uc(16,id,i.tc(15,Id).includes(e.serviceForm.controls.service_type.value))),i.yb(8),i.pc("ngIf",e.serviceForm.showError("api_password",t,"required"))}}function jd(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,122),i.Rb())}function Nd(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,123),i.Rb())}function Fd(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,124),i.Rb())}function Yd(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,125),i.Rb())}function zd(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,126),i.Rb())}function $d(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,127),i.Rb())}function Hd(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,128),i.Rb())}function Wd(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,129),i.Rb())}function Vd(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,130),i.Rb())}function Bd(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"div",7),i.Sb(2,"label",106),i.Sb(3,"span"),i.Wb(4,107),i.Rb(),i.Sb(5,"cd-helper"),i.Sb(6,"span"),i.Wb(7,108),i.Rb(),i.Rb(),i.Rb(),i.Sb(8,"div",10),i.Nb(9,"input",109),i.Mc(10,jd,2,0,"span",15),i.Rb(),i.Rb(),i.Sb(11,"div",7),i.Sb(12,"label",110),i.Sb(13,"span"),i.Wb(14,111),i.Rb(),i.Sb(15,"cd-helper"),i.Sb(16,"span"),i.Wb(17,112),i.Rb(),i.Rb(),i.Rb(),i.Sb(18,"div",10),i.Nb(19,"input",113),i.Mc(20,Nd,2,0,"span",15),i.Mc(21,Fd,2,0,"span",15),i.Mc(22,Yd,2,0,"span",15),i.Mc(23,zd,2,0,"span",15),i.Rb(),i.Rb(),i.Sb(24,"div",7),i.Sb(25,"label",114),i.Sb(26,"span"),i.Wb(27,115),i.Rb(),i.Sb(28,"cd-helper"),i.Sb(29,"span"),i.Wb(30,116),i.Rb(),i.Rb(),i.Rb(),i.Sb(31,"div",10),i.Nb(32,"input",117),i.Mc(33,$d,2,0,"span",15),i.Mc(34,Hd,2,0,"span",15),i.Mc(35,Wd,2,0,"span",15),i.Mc(36,Vd,2,0,"span",15),i.Rb(),i.Rb(),i.Sb(37,"div",7),i.Sb(38,"label",118),i.Sb(39,"span"),i.Wb(40,119),i.Rb(),i.Sb(41,"cd-helper"),i.Sb(42,"span"),i.Wb(43,120),i.Rb(),i.Rb(),i.Rb(),i.Sb(44,"div",10),i.Nb(45,"input",121),i.Rb(),i.Rb(),i.Pb()),2&e){const e=i.ic(),t=i.Ac(2);i.yb(2),i.pc("ngClass",i.uc(13,id,i.tc(12,nd).includes(e.serviceForm.controls.service_type.value))),i.yb(8),i.pc("ngIf",e.serviceForm.showError("virtual_ip",t,"required")),i.yb(2),i.pc("ngClass",i.uc(16,id,i.tc(15,nd).includes(e.serviceForm.controls.service_type.value))),i.yb(8),i.pc("ngIf",e.serviceForm.showError("frontend_port",t,"pattern")),i.yb(1),i.pc("ngIf",e.serviceForm.showError("frontend_port",t,"min")),i.yb(1),i.pc("ngIf",e.serviceForm.showError("frontend_port",t,"max")),i.yb(1),i.pc("ngIf",e.serviceForm.showError("frontend_port",t,"required")),i.yb(2),i.pc("ngClass",i.uc(19,id,i.tc(18,nd).includes(e.serviceForm.controls.service_type.value))),i.yb(8),i.pc("ngIf",e.serviceForm.showError("monitor_port",t,"pattern")),i.yb(1),i.pc("ngIf",e.serviceForm.showError("monitor_port",t,"min")),i.yb(1),i.pc("ngIf",e.serviceForm.showError("monitor_port",t,"max")),i.yb(1),i.pc("ngIf",e.serviceForm.showError("monitor_port",t,"required"))}}function Ud(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,139),i.Rb())}function qd(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,140),i.Rb())}function Gd(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",7),i.Sb(1,"label",134),i.Sb(2,"span"),i.Wb(3,135),i.Rb(),i.Sb(4,"cd-helper"),i.Wb(5,136),i.Rb(),i.Rb(),i.Sb(6,"div",10),i.Sb(7,"textarea",137),i.Oc(8," "),i.Rb(),i.Sb(9,"input",138),i.gc("change",(function(t){return i.Dc(e),i.ic(2).fileUpload(t.target.files,"ssl_cert")})),i.Rb(),i.Mc(10,Ud,2,0,"span",15),i.Mc(11,qd,2,0,"span",15),i.Rb(),i.Rb()}if(2&e){const e=i.ic(2),t=i.Ac(2);i.yb(10),i.pc("ngIf",e.serviceForm.showError("ssl_cert",t,"required")),i.yb(1),i.pc("ngIf",e.serviceForm.showError("ssl_cert",t,"pattern"))}}function Jd(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,145),i.Rb())}function Qd(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,146),i.Rb())}function Kd(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",7),i.Sb(1,"label",141),i.Sb(2,"span"),i.Wb(3,142),i.Rb(),i.Sb(4,"cd-helper"),i.Wb(5,143),i.Rb(),i.Rb(),i.Sb(6,"div",10),i.Sb(7,"textarea",144),i.Oc(8," "),i.Rb(),i.Sb(9,"input",138),i.gc("change",(function(t){return i.Dc(e),i.ic(2).fileUpload(t.target.files,"ssl_key")})),i.Rb(),i.Mc(10,Jd,2,0,"span",15),i.Mc(11,Qd,2,0,"span",15),i.Rb(),i.Rb()}if(2&e){const e=i.ic(2),t=i.Ac(2);i.yb(10),i.pc("ngIf",e.serviceForm.showError("ssl_key",t,"required")),i.yb(1),i.pc("ngIf",e.serviceForm.showError("ssl_key",t,"pattern"))}}function Zd(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"div",7),i.Sb(2,"div",20),i.Sb(3,"div",21),i.Nb(4,"input",131),i.Sb(5,"label",132),i.Wb(6,133),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Mc(7,Gd,12,2,"div",16),i.Mc(8,Kd,12,2,"div",16),i.Pb()),2&e){const e=i.ic();i.yb(7),i.pc("ngIf",e.serviceForm.controls.ssl.value),i.yb(1),i.pc("ngIf",e.serviceForm.controls.ssl.value)}}const Xd=function(){return["mds","rgw","nfs","iscsi","ingress"]},eh=function(){return["rgw","iscsi","ingress"]};let th=(()=>{class e extends Gn.a{constructor(e,t,n,i,r,s,o){super(),this.actionLabels=e,this.cephServiceService=t,this.formBuilder=n,this.hostService=i,this.poolService=r,this.router=s,this.taskWrapperService=o,this.serviceTypes=[],this.labelClick=new iu.a,this.labelFocus=new iu.a,this.services=[],this.searchLabels=e=>Object(ru.a)(e.pipe(au(200),Object(du.a)()),this.labelFocus,this.labelClick.pipe(Object(hu.a)(()=>!this.typeahead.isPopupOpen()))).pipe(Object(Vi.a)(e=>this.labels.filter(t=>t.toLowerCase().indexOf(e.toLowerCase())>-1).slice(0,10))),this.resource="service",this.hosts={options:[],messages:new er.a({empty:"There are no hosts.",filter:"Filter hosts"})},this.createForm()}createForm(){this.serviceForm=this.formBuilder.group({service_type:[null,[xn.A.required]],service_id:[null,[Cn.a.requiredIf({service_type:"mds"}),Cn.a.requiredIf({service_type:"nfs"}),Cn.a.requiredIf({service_type:"iscsi"}),Cn.a.requiredIf({service_type:"ingress"}),Cn.a.composeIf({service_type:"rgw"},[xn.A.required,Cn.a.custom("rgwPattern",e=>!Nt.a.isEmpty(e)&&!/^[^.]+\.[^.]+(\.[^.]+)?$/.test(e))])]],placement:["hosts"],label:[null,[Cn.a.requiredIf({placement:"label",unmanaged:!1})]],hosts:[[]],count:[null,[Cn.a.number(!1),xn.A.min(1)]],unmanaged:[!1],pool:[null,[Cn.a.requiredIf({service_type:"nfs",unmanaged:!1}),Cn.a.requiredIf({service_type:"iscsi",unmanaged:!1})]],namespace:[null],rgw_frontend_port:[null,[Cn.a.number(!1),xn.A.min(1),xn.A.max(65535)]],trusted_ip_list:[null],api_port:[null,[Cn.a.number(!1),xn.A.min(1),xn.A.max(65535)]],api_user:[null,[Cn.a.requiredIf({service_type:"iscsi",unmanaged:!1})]],api_password:[null,[Cn.a.requiredIf({service_type:"iscsi",unmanaged:!1})]],backend_service:[null,[Cn.a.requiredIf({service_type:"ingress",unmanaged:!1})]],virtual_ip:[null,[Cn.a.requiredIf({service_type:"ingress",unmanaged:!1})]],frontend_port:[null,[Cn.a.number(!1),xn.A.min(1),xn.A.max(65535)]],monitor_port:[null,[Cn.a.number(!1),xn.A.min(1),xn.A.max(65535)]],virtual_interface_networks:[null],ssl:[!1],ssl_cert:["",[Cn.a.composeIf({service_type:"rgw",unmanaged:!1,ssl:!0},[xn.A.required,Cn.a.sslCert()]),Cn.a.composeIf({service_type:"iscsi",unmanaged:!1,ssl:!0},[xn.A.required,Cn.a.sslCert()])]],ssl_key:["",[Cn.a.composeIf({service_type:"rgw",unmanaged:!1,ssl:!0},[xn.A.required,Cn.a.sslPrivKey()]),Cn.a.composeIf({service_type:"iscsi",unmanaged:!1,ssl:!0},[xn.A.required,Cn.a.sslPrivKey()])]]})}ngOnInit(){this.action=this.actionLabels.CREATE,this.cephServiceService.getKnownTypes().subscribe(e=>{this.serviceTypes=Nt.a.difference(e,["container","osd"]).sort()}),this.hostService.list().subscribe(e=>{const t=[];Nt.a.forEach(e,e=>{if(Nt.a.get(e,"sources.orchestrator",!1)){const n=new qu.a(!1,Nt.a.get(e,"hostname"),"");t.push(n)}}),this.hosts.options=[...t]}),this.hostService.getLabels().subscribe(e=>{this.labels=e}),this.poolService.getList().subscribe(e=>{this.pools=e}),this.cephServiceService.list().subscribe(e=>{this.services=e.filter(e=>"rgw"===e.service_type)})}goToListView(){this.router.navigate(["/services"])}fileUpload(e,t){const n=e[0],i=new FileReader;i.addEventListener("load",e=>{const n=this.serviceForm.get(t);n.setValue(e.target.result),n.markAsDirty(),n.markAsTouched(),n.updateValueAndValidity()}),i.readAsText(n,"utf8")}prePopulateId(){const e=this.serviceForm.get("service_id"),t=this.serviceForm.getValue("backend_service");e.reset({value:t,disabled:!0})}onSubmit(){const e=this,t=this.serviceForm.value,n=t.service_id,i=t.service_type,r={service_type:i,placement:{},unmanaged:t.unmanaged};let s=i;if(Nt.a.isString(n)&&!Nt.a.isEmpty(n)&&(s=`${i}.${n}`,r.service_id=n),!t.unmanaged){switch(t.placement){case"hosts":t.hosts.length>0&&(r.placement.hosts=t.hosts);break;case"label":r.placement.label=t.label}switch(Nt.a.isNumber(t.count)&&t.count>0&&(r.placement.count=t.count),i){case"nfs":r.pool=t.pool,Nt.a.isString(t.namespace)&&!Nt.a.isEmpty(t.namespace)&&(r.namespace=t.namespace);break;case"rgw":Nt.a.isNumber(t.rgw_frontend_port)&&t.rgw_frontend_port>0&&(r.rgw_frontend_port=t.rgw_frontend_port),r.ssl=t.ssl,t.ssl&&(r.rgw_frontend_ssl_certificate=t.ssl_cert.trim(),r.rgw_frontend_ssl_key=t.ssl_key.trim());break;case"iscsi":r.pool=t.pool,Nt.a.isString(t.trusted_ip_list)&&!Nt.a.isEmpty(t.trusted_ip_list)&&(r.trusted_ip_list=t.trusted_ip_list.trim()),Nt.a.isNumber(t.api_port)&&t.api_port>0&&(r.api_port=t.api_port),r.api_user=t.api_user,r.api_password=t.api_password,r.api_secure=t.ssl,t.ssl&&(r.ssl_cert=t.ssl_cert.trim(),r.ssl_key=t.ssl_key.trim());break;case"ingress":r.backend_service=t.backend_service,r.service_id=t.backend_service,Nt.a.isString(t.virtual_ip)&&!Nt.a.isEmpty(t.virtual_ip)&&(r.virtual_ip=t.virtual_ip.trim()),Nt.a.isNumber(t.frontend_port)&&t.frontend_port>0&&(r.frontend_port=t.frontend_port),Nt.a.isNumber(t.monitor_port)&&t.monitor_port>0&&(r.monitor_port=t.monitor_port),r.ssl=t.ssl,t.ssl&&(r.ssl_cert=t.ssl_cert.trim(),r.ssl_key=t.ssl_key.trim()),r.virtual_interface_networks=t.virtual_interface_networks}}this.taskWrapperService.wrapTaskAroundCall({task:new tr.a("service/"+gn.e.CREATE,{service_name:s}),call:this.cephServiceService.create(r)}).subscribe({error(){e.serviceForm.setErrors({cdSubmitButton:!0})},complete(){e.goToListView()}})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(gn.b),i.Mb(zr),i.Mb(Fo.a),i.Mb(Xi),i.Mb(Uu.a),i.Mb(Pt.e),i.Mb(nr.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-service-form"]],viewQuery:function(e,t){var n;1&e&&i.Tc(Qt.G,!0),2&e&&i.zc(n=i.hc())&&(t.typeahead=n.first)},features:[i.vb],decls:46,vars:33,consts:function(){return[[1,"cd-col-form"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"card"],[1,"card-header"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"card-body"],[1,"form-group","row"],["for","service_type",1,"cd-col-form-label","required"],"Type",[1,"cd-col-form-input"],["id","service_type","name","service_type","formControlName","service_type",1,"form-control","custom-select"],[3,"ngValue"],"-- Select a service type --",[3,"value",4,"ngFor","ngForOf"],["class","invalid-feedback",4,"ngIf"],["class","form-group row",4,"ngIf"],["for","service_id",1,"cd-col-form-label",3,"ngClass"],"Id",["id","service_id","type","text","formControlName","service_id",1,"form-control"],[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["id","unmanaged","type","checkbox","formControlName","unmanaged",1,"custom-control-input"],["for","unmanaged",1,"custom-control-label"],"Unmanaged",[4,"ngIf"],[1,"card-footer"],[1,"text-right"],[3,"form","submitText","submitActionEvent"],[3,"value"],[1,"invalid-feedback"],"This field is required.",["for","backend_service",1,"cd-col-form-label",3,"ngClass"],"Backend Service",["id","backend_service","name","backend_service","formControlName","backend_service",1,"form-control","custom-select",3,"change"],[3,"ngValue",4,"ngIf"],"Loading...","-- No service available --","-- Select an existing RGW service --","This field is required.","This field is required.","The value does not match the pattern " + "\ufffd#2\ufffd" + "<realm_name>.<zone_name>[.<subcluster>]" + "\ufffd/#2\ufffd" + ".",["for","placement",1,"cd-col-form-label"],"Placement",["id","placement","formControlName","placement",1,"form-control","custom-select"],["value","hosts"],"Hosts",["value","label"],"Label",["for","label",1,"cd-col-form-label"],"Label",["id","label","type","text","formControlName","label",1,"form-control",3,"ngbTypeahead","focus","click"],"This field is required.",["for","hosts",1,"cd-col-form-label"],"Hosts",["id","hosts",3,"data","options","messages"],["for","count",1,"cd-col-form-label"],"Count","Only that number of daemons will be created.",["id","count","type","number","formControlName","count","min","1",1,"form-control"],"The value must be at least 1.","The entered value needs to be a number.",["for","pool",1,"cd-col-form-label","required"],"Pool",["id","pool","name","pool","formControlName","pool",1,"form-control","custom-select"],["for","namespace",1,"cd-col-form-label"],"Namespace",["id","namespace","type","text","formControlName","namespace",1,"form-control"],"Loading...","-- No pools available --","-- Select a pool --","This field is required.",["for","rgw_frontend_port",1,"cd-col-form-label"],"Port",["id","rgw_frontend_port","type","number","formControlName","rgw_frontend_port","min","1","max","65535",1,"form-control"],"The entered value needs to be a number.","The value must be at least 1.","The value cannot exceed 65535.","Pool",["for","trusted_ip_list",1,"cd-col-form-label"],"Trusted IPs","Comma separated list of IP addresses.","Please add the " + "\ufffd#21\ufffd" + "Ceph Manager" + "\ufffd/#21\ufffd" + " IP addresses here, otherwise the iSCSI gateways can't be reached.",["id","trusted_ip_list","type","text","formControlName","trusted_ip_list",1,"form-control"],["for","api_port",1,"cd-col-form-label"],"Port",["id","api_port","type","number","formControlName","api_port","min","1","max","65535",1,"form-control"],["for","api_user",1,"cd-col-form-label",3,"ngClass"],"User",["id","api_user","type","text","formControlName","api_user",1,"form-control"],["for","api_password",1,"cd-col-form-label",3,"ngClass"],"Password",[1,"input-group"],["id","api_password","type","password","autocomplete","new-password","formControlName","api_password",1,"form-control"],[1,"input-group-append"],["type","button","cdPasswordButton","api_password",1,"btn","btn-light"],["source","api_password"],"Loading...","-- No pools available --","-- Select a pool --","This field is required.","The entered value needs to be a number.","The value must be at least 1.","The value cannot exceed 65535.","This field is required.","This field is required.",["for","virtual_ip",1,"cd-col-form-label",3,"ngClass"],"Virtual IP","The virtual IP address and subnet (in CIDR notation) where the ingress service will be available.",["id","virtual_ip","type","text","formControlName","virtual_ip",1,"form-control"],["for","frontend_port",1,"cd-col-form-label",3,"ngClass"],"Frontend Port","The port used to access the ingress service.",["id","frontend_port","type","number","formControlName","frontend_port","min","1","max","65535",1,"form-control"],["for","monitor_port",1,"cd-col-form-label",3,"ngClass"],"Monitor Port","The port used by haproxy for load balancer status.",["id","monitor_port","type","number","formControlName","monitor_port","min","1","max","65535",1,"form-control"],["for","virtual_interface_networks",1,"cd-col-form-label"],"CIDR Networks","A list of networks to identify which network interface to use for the virtual IP address.",["id","virtual_interface_networks","type","text","formControlName","virtual_interface_networks",1,"form-control"],"This field is required.","The entered value needs to be a number.","The value must be at least 1.","The value cannot exceed 65535.","This field is required.","The entered value needs to be a number.","The value must be at least 1.","The value cannot exceed 65535.","This field is required.",["id","ssl","type","checkbox","formControlName","ssl",1,"custom-control-input"],["for","ssl",1,"custom-control-label"],"SSL",["for","ssl_cert",1,"cd-col-form-label"],"Certificate","The SSL certificate in PEM format.",["id","ssl_cert","formControlName","ssl_cert","rows","5",1,"form-control","resize-vertical","text-monospace","text-pre"],["type","file",3,"change"],"This field is required.","Invalid SSL certificate.",["for","ssl_key",1,"cd-col-form-label"],"Private key","The SSL private key in PEM format.",["id","ssl_key","formControlName","ssl_key","rows","5",1,"form-control","resize-vertical","text-monospace","text-pre"],"This field is required.","Invalid SSL private key."]},template:function(e,t){if(1&e&&(i.Sb(0,"div",0),i.Sb(1,"form",1,2),i.Sb(3,"div",3),i.Sb(4,"div",4),i.Wb(5,5),i.jc(6,"titlecase"),i.jc(7,"upperFirst"),i.Rb(),i.Sb(8,"div",6),i.Sb(9,"div",7),i.Sb(10,"label",8),i.Wb(11,9),i.Rb(),i.Sb(12,"div",10),i.Sb(13,"select",11),i.Sb(14,"option",12),i.Wb(15,13),i.Rb(),i.Mc(16,Ju,2,2,"option",14),i.Rb(),i.Mc(17,Qu,2,0,"span",15),i.Rb(),i.Rb(),i.Mc(18,rd,10,9,"div",16),i.Sb(19,"div",7),i.Sb(20,"label",17),i.Wb(21,18),i.Rb(),i.Sb(22,"div",10),i.Nb(23,"input",19),i.Mc(24,sd,2,0,"span",15),i.Mc(25,od,3,0,"span",15),i.Rb(),i.Rb(),i.Sb(26,"div",7),i.Sb(27,"div",20),i.Sb(28,"div",21),i.Nb(29,"input",22),i.Sb(30,"label",23),i.Wb(31,24),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Mc(32,ad,9,0,"div",16),i.Mc(33,ld,6,2,"div",16),i.Mc(34,ud,5,3,"div",16),i.Mc(35,fd,10,2,"div",16),i.Mc(36,yd,16,5,"ng-container",25),i.Mc(37,Md,9,3,"ng-container",25),i.Mc(38,Pd,48,18,"ng-container",25),i.Mc(39,Bd,46,21,"ng-container",25),i.Mc(40,Zd,9,2,"ng-container",25),i.Rb(),i.Sb(41,"div",26),i.Sb(42,"div",27),i.Sb(43,"cd-form-button-panel",28),i.gc("submitActionEvent",(function(){return t.onSubmit()})),i.jc(44,"titlecase"),i.jc(45,"upperFirst"),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb()),2&e){const e=i.Ac(2);i.yb(1),i.pc("formGroup",t.serviceForm),i.yb(6),i.ac(i.kc(6,21,t.action))(i.kc(7,23,t.resource)),i.Xb(5),i.yb(7),i.pc("ngValue",null),i.yb(2),i.pc("ngForOf",t.serviceTypes),i.yb(1),i.pc("ngIf",t.serviceForm.showError("service_type",e,"required")),i.yb(1),i.pc("ngIf","ingress"===t.serviceForm.controls.service_type.value),i.yb(2),i.pc("ngClass",i.uc(30,id,i.tc(29,Xd).includes(t.serviceForm.controls.service_type.value))),i.yb(4),i.pc("ngIf",t.serviceForm.showError("service_id",e,"required")),i.yb(1),i.pc("ngIf",t.serviceForm.showError("service_id",e,"rgwPattern")),i.yb(7),i.pc("ngIf",!t.serviceForm.controls.unmanaged.value),i.yb(1),i.pc("ngIf",!t.serviceForm.controls.unmanaged.value&&"label"===t.serviceForm.controls.placement.value),i.yb(1),i.pc("ngIf",!t.serviceForm.controls.unmanaged.value&&"hosts"===t.serviceForm.controls.placement.value),i.yb(1),i.pc("ngIf",!t.serviceForm.controls.unmanaged.value),i.yb(1),i.pc("ngIf",!t.serviceForm.controls.unmanaged.value&&"nfs"===t.serviceForm.controls.service_type.value),i.yb(1),i.pc("ngIf",!t.serviceForm.controls.unmanaged.value&&"rgw"===t.serviceForm.controls.service_type.value),i.yb(1),i.pc("ngIf",!t.serviceForm.controls.unmanaged.value&&"iscsi"===t.serviceForm.controls.service_type.value),i.yb(1),i.pc("ngIf",!t.serviceForm.controls.unmanaged.value&&"ingress"===t.serviceForm.controls.service_type.value),i.yb(1),i.pc("ngIf",!t.serviceForm.controls.unmanaged.value&&i.tc(32,eh).includes(t.serviceForm.controls.service_type.value)),i.yb(3),i.pc("form",t.serviceForm)("submitText",i.kc(44,25,t.action)+" "+i.kc(45,27,t.resource))}},directives:[xn.C,xn.r,Zn.a,xn.k,Xn.a,On.a,xn.z,ei.a,xn.q,xn.i,xn.u,xn.B,o.q,o.r,o.p,xn.d,xn.b,ti.a,Qt.G,rr.a,Yo.a,xn.v,Gu.a,go.a],pipes:[o.A,sr.a],styles:[""]}),e})();var nh=n("3E0/");let ih=(()=>{class e{transform(e){if(Nt.a.isUndefined(e))return "no spec";if(Nt.a.get(e,"unmanaged",!1))return "unmanaged";const t=[],n=Nt.a.get(e,"placement.hosts"),i=Nt.a.get(e,"placement.count"),r=Nt.a.get(e,"placement.label"),s=Nt.a.get(e,"placement.host_pattern");return Nt.a.isArray(n)&&t.push(...n),Nt.a.isNumber(i)&&t.push("count:" + i + ""),Nt.a.isString(r)&&t.push("label:" + r + ""),Nt.a.isString(s)&&t.push(s),t.join(";")}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"placement",type:e,pure:!0}),e})();function rh(e,t){if(1&e&&(i.Qb(0),i.Nb(1,"cd-service-daemon-list",1),i.Pb()),2&e){const e=i.ic();i.yb(1),i.pc("serviceName",e.selection.service_name)}}let sh=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-service-details"]],inputs:{permissions:"permissions",selection:"selection"},decls:1,vars:1,consts:[[4,"ngIf"],[3,"serviceName"]],template:function(e,t){1&e&&i.Mc(0,rh,2,1,"ng-container",0),2&e&&i.pc("ngIf",t.selection)},directives:[o.r,cs],styles:[""]}),e})();function oh(e,t){1&e&&i.Nb(0,"cd-orchestrator-doc-panel")}function ah(e,t){if(1&e){const e=i.Tb();i.Qb(0),i.Sb(1,"cd-table",1),i.gc("fetchData",(function(t){return i.Dc(e),i.ic().getServices(t)}))("setExpandedRow",(function(t){return i.Dc(e),i.ic().setExpandedRow(t)}))("updateSelection",(function(t){return i.Dc(e),i.ic().updateSelection(t)})),i.Nb(2,"cd-table-actions",2),i.Nb(3,"cd-service-details",3),i.Rb(),i.Pb()}if(2&e){const e=i.ic();i.yb(1),i.pc("data",e.services)("columns",e.columns)("autoReload",5e3)("hasDetails",!0),i.yb(1),i.pc("permission",e.permissions.hosts)("selection",e.selection)("tableActions",e.tableActions),i.yb(1),i.pc("permissions",e.permissions)("selection",e.expandedRow)}}let ch=(()=>{class e extends $t.a{constructor(e,t,n,i,r,s,o,a){super(),this.actionLabels=e,this.authStorageService=t,this.modalService=n,this.orchService=i,this.cephServiceService=r,this.relativeDatePipe=s,this.taskWrapperService=o,this.urlBuilder=a,this.hiddenColumns=[],this.showDocPanel=!1,this.actionOrchFeatures={create:[hr.SERVICE_CREATE],delete:[hr.SERVICE_DELETE]},this.columns=[],this.services=[],this.isLoadingServices=!1,this.selection=new Wt.a,this.permissions=this.authStorageService.getPermissions(),this.tableActions=[{permission:"create",icon:_n.a.add,routerLink:()=>this.urlBuilder.getCreate(),name:this.actionLabels.CREATE,canBePrimary:e=>!e.hasSelection,disable:e=>this.getDisable("create",e)},{permission:"delete",icon:_n.a.destroy,click:()=>this.deleteAction(),name:this.actionLabels.DELETE,disable:e=>this.getDisable("delete",e)}]}ngOnInit(){const e=[{name:"Service",prop:"service_name",flexGrow:1},{name:"Placement",prop:"",pipe:new ih,flexGrow:2},{name:"Running",prop:"status.running",flexGrow:1},{name:"Size",prop:"status.size",flexGrow:1},{name:"Last Refreshed",prop:"status.last_refresh",pipe:this.relativeDatePipe,flexGrow:1}];this.columns=e.filter(e=>!this.hiddenColumns.includes(e.prop)),this.orchService.status().subscribe(e=>{this.orchStatus=e,this.showDocPanel=!e.available})}ngOnChanges(){var e;(null===(e=this.orchStatus)||void 0===e?void 0:e.available)&&(this.services=[],this.table.reloadData())}getDisable(e,t){return"delete"===e&&!(null==t?void 0:t.hasSingleSelection)||this.orchService.getTableActionDisableDesc(this.orchStatus,this.actionOrchFeatures[e])}getServices(e){this.isLoadingServices||(this.isLoadingServices=!0,this.cephServiceService.list().subscribe(e=>{this.services=e,this.isLoadingServices=!1},()=>{this.isLoadingServices=!1,this.services=[],e.error()}))}updateSelection(e){this.selection=e}deleteAction(){const e=this.selection.first();this.modalService.show(bn.a,{itemDescription:"Service",itemNames:[e.service_name],actionDescription:"delete",submitActionObservable:()=>this.taskWrapperService.wrapTaskAroundCall({task:new tr.a("service/"+gn.e.DELETE,{service_name:e.service_name}),call:this.cephServiceService.delete(e.service_name)}).pipe(Object(nh.a)(5e3))})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(gn.b),i.Mb(Jt.a),i.Mb(vn.a),i.Mb(dr),i.Mb(zr),i.Mb($r.a),i.Mb(nr.a),i.Mb(pr.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-services"]],viewQuery:function(e,t){var n;1&e&&i.Jc(Bt.a,!0),2&e&&i.zc(n=i.hc())&&(t.table=n.first)},inputs:{hostname:"hostname",hiddenColumns:"hiddenColumns"},features:[i.xb([{provide:pr.a,useValue:new pr.a("services")}]),i.vb,i.wb],decls:2,vars:2,consts:[[4,"ngIf"],["identifier","service_name","forceIdentifier","true","columnMode","flex","selectionType","single",3,"data","columns","autoReload","hasDetails","fetchData","setExpandedRow","updateSelection"],[1,"table-actions",3,"permission","selection","tableActions"],["cdTableDetail","",3,"permissions","selection"]],template:function(e,t){1&e&&(i.Mc(0,oh,1,0,"cd-orchestrator-doc-panel",0),i.Mc(1,ah,4,9,"ng-container",0)),2&e&&(i.pc("ngIf",t.showDocPanel),i.yb(1),i.pc("ngIf",null==t.orchStatus?null:t.orchStatus.available))},directives:[o.r,Ar,Bt.a,Sn.a,sh],styles:[""]}),e})(),lh=(()=>{class e{constructor(e){this.http=e,this.url="api/telemetry"}getReport(){return this.http.get(this.url+"/report")}enable(e=!0){const t={enable:e};return e&&(t.license_name="sharing-1-0"),this.http.put(""+this.url,t)}}return e.\u0275fac=function(t){return new(t||e)(i.dc(a.b))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),uh=(()=>{class e{constructor(){this.visible=!1,this.update=new i.o}setVisibility(e){this.visible=e,this.update.emit(e)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();function dh(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div"),i.Oc(1," The plugin is already "),i.Sb(2,"b"),i.Oc(3,"enabled"),i.Rb(),i.Oc(4,". Click "),i.Sb(5,"b"),i.Oc(6,"Deactivate"),i.Rb(),i.Oc(7," to disable it.\xa0 "),i.Sb(8,"button",71),i.gc("click",(function(){return i.Dc(e),i.ic(3).disableModule("The Telemetry module has been disabled successfully.")})),i.Wb(9,72),i.Rb(),i.Rb()}}function hh(e,t){1&e&&(i.Sb(0,"span",73),i.Wb(1,74),i.Rb())}function fh(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div"),i.Sb(1,"form",4,5),i.Sb(3,"div",6),i.Sb(4,"div",7),i.Wb(5,8),i.Rb(),i.Sb(6,"div",9),i.Sb(7,"p"),i.cc(8,10),i.Nb(9,"br"),i.Nb(10,"a",11),i.Nb(11,"br"),i.Nb(12,"br"),i.Nb(13,"b"),i.Zb(),i.Rb(),i.Mc(14,dh,10,0,"div",12),i.Sb(15,"legend"),i.Wb(16,13),i.Rb(),i.Sb(17,"p"),i.Wb(18,14),i.Rb(),i.Sb(19,"div",15),i.Sb(20,"label",16),i.Qb(21),i.Wb(22,17),i.Pb(),i.Sb(23,"cd-helper"),i.Qb(24),i.Wb(25,18),i.Pb(),i.Sb(26,"ul"),i.Sb(27,"li"),i.Wb(28,19),i.Rb(),i.Sb(29,"li"),i.Wb(30,20),i.Rb(),i.Sb(31,"li"),i.Wb(32,21),i.Rb(),i.Sb(33,"li"),i.Wb(34,22),i.Rb(),i.Sb(35,"li"),i.Wb(36,23),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Sb(37,"div",24),i.Sb(38,"div",25),i.Nb(39,"input",26),i.Nb(40,"label",27),i.Rb(),i.Rb(),i.Rb(),i.Sb(41,"div",15),i.Sb(42,"label",28),i.Qb(43),i.Wb(44,29),i.Pb(),i.Sb(45,"cd-helper"),i.Qb(46),i.Wb(47,30),i.Pb(),i.Sb(48,"ul"),i.Sb(49,"li"),i.Wb(50,31),i.Rb(),i.Sb(51,"li"),i.Wb(52,32),i.Rb(),i.Sb(53,"li"),i.Wb(54,33),i.Rb(),i.Sb(55,"li"),i.Wb(56,34),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Sb(57,"div",24),i.Sb(58,"div",25),i.Nb(59,"input",35),i.Nb(60,"label",36),i.Rb(),i.Rb(),i.Rb(),i.Sb(61,"div",15),i.Sb(62,"label",37),i.Qb(63),i.Wb(64,38),i.Pb(),i.Sb(65,"cd-helper",39),i.Yb(66,40),i.Rb(),i.Rb(),i.Sb(67,"div",24),i.Sb(68,"div",25),i.Nb(69,"input",41),i.Nb(70,"label",42),i.Rb(),i.Rb(),i.Rb(),i.Sb(71,"div",15),i.Sb(72,"label",43),i.Qb(73),i.Wb(74,44),i.Pb(),i.Sb(75,"cd-helper"),i.Qb(76),i.Wb(77,45),i.Pb(),i.Sb(78,"ul"),i.Sb(79,"li"),i.Oc(80,"Cluster description"),i.Rb(),i.Sb(81,"li"),i.Oc(82,"Contact email address"),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Sb(83,"div",24),i.Sb(84,"div",25),i.Nb(85,"input",46),i.Nb(86,"label",47),i.Rb(),i.Rb(),i.Rb(),i.Sb(87,"legend"),i.Qb(88),i.Wb(89,48),i.Pb(),i.Sb(90,"cd-helper"),i.Wb(91,49),i.Rb(),i.Rb(),i.Sb(92,"div",15),i.Sb(93,"label",50),i.Wb(94,51),i.Rb(),i.Sb(95,"div",24),i.Nb(96,"input",52),i.Rb(),i.Rb(),i.Sb(97,"div",15),i.Sb(98,"label",53),i.Wb(99,54),i.Rb(),i.Sb(100,"div",24),i.Sb(101,"input",55),i.Yb(102,56),i.Rb(),i.Rb(),i.Rb(),i.Sb(103,"legend"),i.Wb(104,57),i.Rb(),i.Sb(105,"div",15),i.Sb(106,"label",58),i.Qb(107),i.Wb(108,59),i.Pb(),i.Sb(109,"cd-helper"),i.Wb(110,60),i.Rb(),i.Rb(),i.Sb(111,"div",24),i.Nb(112,"input",61),i.Mc(113,hh,2,0,"span",62),i.Rb(),i.Rb(),i.Sb(114,"div",15),i.Sb(115,"label",63),i.Qb(116),i.Wb(117,64),i.Pb(),i.Sb(118,"cd-helper"),i.Sb(119,"p"),i.Wb(120,65),i.Rb(),i.Sb(121,"p"),i.Wb(122,66),i.Rb(),i.Rb(),i.Rb(),i.Sb(123,"div",24),i.Nb(124,"input",67),i.Rb(),i.Rb(),i.Nb(125,"br"),i.Sb(126,"p"),i.cc(127,68),i.Nb(128,"b"),i.Zb(),i.Rb(),i.Rb(),i.Sb(129,"div",69),i.Sb(130,"div",70),i.Sb(131,"button",71),i.gc("click",(function(){return i.Dc(e),i.ic(2).next()})),i.Qb(132),i.Oc(133),i.Pb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.Ac(2),t=i.ic(2);i.yb(1),i.pc("formGroup",t.configForm),i.yb(4),i.ac(t.step),i.Xb(5),i.yb(8),i.ac(t.sendToUrl)(t.sendToDeviceUrl),i.Xb(8),i.yb(1),i.pc("ngIf",t.moduleEnabled),i.yb(99),i.pc("ngIf",t.configForm.showError("interval",e,"min")),i.yb(20),i.Pc(t.actionLabels.NEXT)}}function ph(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div"),i.Sb(1,"form",75,76),i.Sb(3,"div",6),i.Sb(4,"div",7),i.Wb(5,77),i.Rb(),i.Sb(6,"div",9),i.Sb(7,"div",15),i.Sb(8,"label",78),i.cc(9,79),i.Sb(10,"cd-helper",39),i.Yb(11,80),i.Rb(),i.Zb(),i.Rb(),i.Sb(12,"div",24),i.Nb(13,"input",81),i.Rb(),i.Rb(),i.Sb(14,"div",15),i.Sb(15,"label",82),i.cc(16,83),i.Sb(17,"cd-helper",39),i.Yb(18,84),i.Rb(),i.Zb(),i.Rb(),i.Sb(19,"div",24),i.Nb(20,"textarea",85),i.Rb(),i.Rb(),i.Sb(21,"div",15),i.Sb(22,"div",86),i.Sb(23,"div",87),i.Nb(24,"cd-download-button",88),i.Nb(25,"cd-copy-2-clipboard-button",89),i.Rb(),i.Rb(),i.Rb(),i.Sb(26,"div",15),i.Sb(27,"div",86),i.Sb(28,"div",25),i.Nb(29,"input",90),i.Sb(30,"label",91),i.cc(31,92),i.Nb(32,"a",93),i.Zb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Sb(33,"div",69),i.Sb(34,"div",70),i.Sb(35,"cd-form-button-panel",94),i.gc("submitActionEvent",(function(){return i.Dc(e),i.ic(2).onSubmit()}))("backActionEvent",(function(){return i.Dc(e),i.ic(2).back()})),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.ic(2);i.yb(1),i.pc("formGroup",e.previewForm),i.yb(4),i.ac(e.step),i.Xb(5),i.yb(19),i.pc("objectItem",e.report),i.yb(11),i.pc("form",e.previewForm)("submitText",e.actionLabels.UPDATE)("cancelText",e.actionLabels.BACK)}}function mh(e,t){if(1&e&&(i.Sb(0,"div",1),i.Qb(1,2),i.Mc(2,fh,134,7,"div",3),i.Mc(3,ph,36,6,"div",3),i.Pb(),i.Rb()),2&e){const e=i.ic();i.yb(1),i.pc("ngSwitch",e.step),i.yb(1),i.pc("ngSwitchCase",1),i.yb(1),i.pc("ngSwitchCase",2)}}let bh=(()=>{class e extends Gn.a{constructor(e,t,n,i,r,s,o){super(),this.actionLabels=e,this.formBuilder=t,this.mgrModuleService=n,this.notificationService=i,this.router=r,this.telemetryService=s,this.telemetryNotificationService=o,this.licenseAgrmt=!1,this.options={},this.requiredFields=["channel_basic","channel_crash","channel_device","channel_ident","interval","proxy","contact","description"],this.report=void 0,this.reportId=void 0,this.sendToUrl="",this.sendToDeviceUrl="",this.step=1}ngOnInit(){const e=[this.mgrModuleService.getOptions("telemetry"),this.mgrModuleService.getConfig("telemetry")];Object(jo.a)(e).subscribe(e=>{const t=e[1];this.moduleEnabled=t.enabled,this.sendToUrl=t.url,this.sendToDeviceUrl=t.device_url,this.options=Nt.a.pick(e[0],this.requiredFields);const n=Nt.a.pick(t,this.requiredFields);this.createConfigForm(),this.configForm.setValue(n),this.loadingReady()},e=>{this.loadingError()})}createConfigForm(){const e={};Nt.a.forEach(Object.values(this.options),t=>{e[t.name]=[t.default_value,this.getValidators(t)]}),this.configForm=this.formBuilder.group(e)}createPreviewForm(){const e={report:JSON.stringify(this.report,null,2),reportId:this.reportId,licenseAgrmt:[this.licenseAgrmt,xn.A.requiredTrue]};this.previewForm=this.formBuilder.group(e)}getValidators(e){const t=[];switch(e.type){case"int":t.push(Cn.a.number()),t.push(xn.A.required),Nt.a.isNumber(e.min)&&t.push(xn.A.min(e.min)),Nt.a.isNumber(e.max)&&t.push(xn.A.max(e.max));break;case"str":Nt.a.isNumber(e.min)&&t.push(xn.A.minLength(e.min)),Nt.a.isNumber(e.max)&&t.push(xn.A.maxLength(e.max))}return t}getReport(){this.loadingStart(),this.telemetryService.getReport().subscribe(e=>{this.report=e,this.reportId=e.report.report_id,this.createPreviewForm(),this.loadingReady(),this.step++},e=>{this.loadingError()})}updateConfig(){const e={};Nt.a.forEach(Object.values(this.options),t=>{const n=this.configForm.get(t.name);n.dirty&&n.valid&&(e[t.name]=n.value)}),this.mgrModuleService.updateConfig("telemetry",e).subscribe(()=>{this.disableModule("Your settings have been applied successfully. Due to privacy/legal reasons the Telemetry module is now disabled until you complete the next step and accept the license.",()=>{this.getReport()})},()=>{this.configForm.setErrors({cdSubmitButton:!0})})}disableModule(e=null,t=null){this.telemetryService.enable(!1).subscribe(()=>{this.telemetryNotificationService.setVisibility(!0),e&&this.notificationService.show(yn.a.success,e),t?t():this.router.navigate([""])})}next(){this.configForm.pristine?this.getReport():this.updateConfig()}back(){this.step--}onSubmit(){this.telemetryService.enable().subscribe(()=>{this.telemetryNotificationService.setVisibility(!1),this.notificationService.show(yn.a.success,"The Telemetry module has been configured and activated successfully."),this.router.navigate([""])})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(gn.b),i.Mb(Fo.a),i.Mb(No),i.Mb(wn.a),i.Mb(Pt.e),i.Mb(lh),i.Mb(uh))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-telemetry"]],features:[i.vb],decls:1,vars:1,consts:function(){var e,t,n,r,s,o,a,c,l,u,d,h,f,p,m,b,g,_,y,v,w,S,M,x,k,D,T,C,O,L,R,E,A,I,P,j,N,F,Y;return e="Step " + "\ufffd0\ufffd" + " of 2: Telemetry report configuration",t="The telemetry module sends anonymous data about this Ceph cluster back to the Ceph developers to help understand how Ceph is used and what problems users may be experiencing." + "[\ufffd#9\ufffd\ufffd/#9\ufffd|\ufffd#11\ufffd\ufffd/#11\ufffd|\ufffd#12\ufffd\ufffd/#12\ufffd]" + " This data is visualized on " + "\ufffd#10\ufffd" + "public dashboards" + "\ufffd/#10\ufffd" + " that allow the community to quickly see summary statistics on how many clusters are reporting, their total capacity and OSD count, and version distribution trends." + "[\ufffd#9\ufffd\ufffd/#9\ufffd|\ufffd#11\ufffd\ufffd/#11\ufffd|\ufffd#12\ufffd\ufffd/#12\ufffd]" + "" + "[\ufffd#9\ufffd\ufffd/#9\ufffd|\ufffd#11\ufffd\ufffd/#11\ufffd|\ufffd#12\ufffd\ufffd/#12\ufffd]" + " The data being reported does " + "\ufffd#13\ufffd" + "not" + "\ufffd/#13\ufffd" + " contain any sensitive data like pool names, object names, object contents, hostnames, or device serial numbers. It contains counters and statistics on how the cluster has been deployed, the version of Ceph, the distribution of the hosts and other parameters which help the project to gain a better understanding of the way Ceph is used. The data is sent secured to " + "\ufffd0\ufffd" + " and " + "\ufffd1\ufffd" + " (device report).",t=i.bc(t),n="Channels",r="The telemetry report is broken down into several \"channels\", each with a different type of information that can be configured below.",s="Basic",o="Includes basic information about the cluster:",a="Capacity of the cluster",c="Number of monitors, managers, OSDs, MDSs, object gateways, or other daemons",l="Software version currently being used",u="Number and types of RADOS pools and CephFS file systems",d="Names of configuration options that have been changed from their default (but not their values)",h="Crash",f="Includes information about daemon crashes:",p="Type of daemon",m="Version of the daemon",b="Operating system (OS distribution, kernel version)",g="Stack trace identifying where in the Ceph code the crash occurred",_="Device",y="Includes information about device metrics like anonymized SMART metrics.",v="Ident",w="Includes user-provided identifying information about the cluster:",S="Contact Information",M="Submitting any contact information is completely optional and disabled by default.",x="Contact",k="Description",D="My first Ceph cluster",T="Advanced Settings",C="Interval",O="The module compiles and sends a new report every 24 hours by default. You can adjust this interval by setting a different number of hours.",L="Proxy",R="If the cluster cannot directly connect to the configured telemetry endpoint (default telemetry.ceph.com), you can configure a HTTP/HTTPS proxy server by e.g. adding https://10.0.0.1:8080",E="You can also include a user:pass if needed e.g. https://ceph:telemetry@10.0.0.1:8080",A="" + "\ufffd#128\ufffd" + "Note:" + "\ufffd/#128\ufffd" + " By clicking 'Next' you will first see a preview of the report content before you can activate the automatic submission of your data.",I="Deactivate",P="The entered value is too low! It must be greater or equal to 8.",j="Step " + "\ufffd0\ufffd" + " of 2: Telemetry report preview",N="A randomized UUID to identify a particular cluster over the course of several telemetry reports.",F="Report ID " + "\ufffd#10\ufffd" + "" + "\ufffd/#10\ufffd" + "",Y="The actual telemetry data that will be submitted.",[["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],[3,"ngSwitch"],[4,"ngSwitchCase"],["name","form","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"card"],[1,"card-header"],e,[1,"card-body"],t,["href","https://telemetry-public.ceph.com/"],[4,"ngIf"],n,r,[1,"form-group","row"],["for","channel_basic",1,"cd-col-form-label"],s,o,a,c,l,u,d,[1,"cd-col-form-input"],[1,"custom-control","custom-checkbox"],["type","checkbox","id","channel_basic","formControlName","channel_basic",1,"custom-control-input"],["for","channel_basic",1,"custom-control-label"],["for","channel_crash",1,"cd-col-form-label"],h,f,p,m,b,g,["type","checkbox","id","channel_crash","formControlName","channel_crash",1,"custom-control-input"],["for","channel_crash",1,"custom-control-label"],["for","channel_device",1,"cd-col-form-label"],_,[6,"html"],["html",y],["type","checkbox","id","channel_device","formControlName","channel_device",1,"custom-control-input"],["for","channel_device",1,"custom-control-label"],["for","channel_ident",1,"cd-col-form-label"],v,w,["type","checkbox","id","channel_ident","formControlName","channel_ident",1,"custom-control-input"],["for","channel_ident",1,"custom-control-label"],S,M,["for","contact",1,"cd-col-form-label"],x,["id","contact","type","text","formControlName","contact","placeholder","Example User <user@example.com>",1,"form-control"],["for","description",1,"cd-col-form-label"],k,["id","description","type","text","formControlName","description",1,"form-control",6,"placeholder"],["placeholder",D],T,["for","interval",1,"cd-col-form-label"],C,O,["id","interval","type","number","formControlName","interval",1,"form-control"],["class","invalid-feedback",4,"ngIf"],["for","proxy",1,"cd-col-form-label"],L,R,E,["id","proxy","type","text","formControlName","proxy","placeholder","https://10.0.0.1:8080",1,"form-control"],A,[1,"card-footer"],[1,"button-group","text-right"],["type","button",1,"btn","btn-light",3,"click"],I,[1,"invalid-feedback"],P,["name","previewForm","novalidate","",3,"formGroup"],["frm","ngForm"],j,["for","reportId",1,"cd-col-form-label"],F,["html",N],["type","text","id","reportId","formControlName","reportId","readonly","",1,"form-control"],["for","report",1,"cd-col-form-label"],"Report preview " + "\ufffd#17\ufffd" + "" + "\ufffd/#17\ufffd" + "",["html",Y],["id","report","formControlName","report","rows","15","readonly","",1,"form-control"],[1,"cd-col-form-offset"],["role","group",1,"btn-group"],["fileName","telemetry_report",3,"objectItem"],["source","report"],["type","checkbox","id","licenseAgrmt","name","licenseAgrmt","formControlName","licenseAgrmt",1,"custom-control-input"],["for","licenseAgrmt",1,"custom-control-label"],"I agree to my telemetry data being submitted under the " + "\ufffd#32\ufffd" + "Community Data License Agreement - Sharing - Version 1.0" + "\ufffd/#32\ufffd" + "",["href","https://cdla.io/sharing-1-0/"],[3,"form","submitText","cancelText","submitActionEvent","backActionEvent"]]},template:function(e,t){1&e&&i.Mc(0,mh,4,3,"div",0),2&e&&i.pc("cdFormLoading",t.loading)},directives:[Kn.a,o.t,o.u,xn.C,xn.r,Zn.a,xn.k,o.r,Xn.a,Yo.a,On.a,xn.b,ei.a,xn.q,xn.i,xn.d,xn.v,bo,go.a,ti.a],styles:[""]}),e})();var gh=n("2Vo4"),_h=n("Y7HM");function yh(e){const{subscriber:t,counter:n,period:i}=e;t.next(n),this.schedule({subscriber:t,counter:n+1,period:i},i)}let vh=(()=>{class e{constructor(e){this.ngZone=e,this.intervalDataSource=new gh.a(null),this.intervalData$=this.intervalDataSource.asObservable();const t=parseInt(sessionStorage.getItem("dashboard_interval"),10)||5e3;this.setRefreshInterval(t)}setRefreshInterval(e){this.intervalTime=e,sessionStorage.setItem("dashboard_interval",e.toString()),this.intervalSubscription&&this.intervalSubscription.unsubscribe(),this.ngZone.runOutsideAngular(()=>{this.intervalSubscription=function(e=0,t=ou.a){return(!Object(_h.a)(e)||e<0)&&(e=0),t&&"function"==typeof t.schedule||(t=ou.a),new $u.a(n=>(n.add(t.schedule(yh,e,{subscriber:n,counter:0,period:e})),n))}(this.intervalTime).subscribe(()=>this.ngZone.run(()=>{this.intervalDataSource.next(this.intervalTime)}))})}getRefreshInterval(){return this.intervalTime}ngOnDestroy(){this.intervalSubscription&&this.intervalSubscription.unsubscribe()}}return e.\u0275fac=function(t){return new(t||e)(i.dc(i.A))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();function wh(e,t){if(1&e&&(i.Sb(0,"option",8),i.Oc(1),i.Rb()),2&e){const e=t.$implicit,n=i.ic();i.pc("value",n.intervalList[e]),i.yb(1),i.Pc(e)}}let Sh=(()=>{class e{constructor(e){this.refreshIntervalService=e,this.intervalList={"5 s":5e3,"10 s":1e4,"15 s":15e3,"30 s":3e4,"1 min":6e4,"3 min":18e4,"5 min":3e5},this.intervalKeys=Object.keys(this.intervalList)}ngOnInit(){this.selectedInterval=this.refreshIntervalService.getRefreshInterval()||5e3}changeRefreshInterval(e){this.refreshIntervalService.setRefreshInterval(e)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(vh))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-refresh-selector"]],decls:8,vars:2,consts:function(){return[[1,"container-fluid"],[1,"row"],[1,"col","d-flex","justify-content-end"],[1,"form-inline"],["for","refreshInterval",1,"col-form-label","my-0","mx-2"],"Refresh",["id","refreshInterval","name","refreshInterval",1,"form-control","custom-select",3,"ngModel","change","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]]},template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Sb(1,"div",1),i.Sb(2,"div",2),i.Sb(3,"form",3),i.Sb(4,"label",4),i.Wb(5,5),i.Rb(),i.Sb(6,"select",6),i.gc("change",(function(e){return t.changeRefreshInterval(e.target.value)}))("ngModelChange",(function(e){return t.selectedInterval=e})),i.Mc(7,wh,2,2,"option",7),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb()),2&e&&(i.yb(6),i.pc("ngModel",t.selectedInterval),i.yb(1),i.pc("ngForOf",t.intervalKeys))},directives:[xn.C,xn.r,xn.s,On.a,xn.z,ei.a,xn.q,xn.t,o.q,xn.u,xn.B],styles:[""]}),e})();var Mh=n("d+Og");let xh=(()=>{class e{constructor(e){this.http=e}getFullHealth(){return this.http.get("api/health/full")}getMinimalHealth(){return this.http.get("api/health/minimal")}}return e.\u0275fac=function(t){return new(t||e)(i.dc(a.b))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var kh=n("TKcr"),Dh=n("ej+x");function Th(e,t){if(1&e&&(i.Sb(0,"div",6),i.cc(1,7),i.jc(2,"lowercase"),i.Sb(3,"cd-doc",8),i.Yb(4,9),i.jc(5,"lowercase"),i.Rb(),i.Zb(),i.Rb()),2&e){const e=i.ic();i.yb(3),i.rc("section","dashboard-landing-page-",i.kc(5,4,e.groupTitle),""),i.yb(2),i.ac(i.kc(2,2,e.groupTitle)),i.Xb(1)}}const Ch=function(e,t){return[e,t]},Oh=["*"];let Lh=(()=>{class e{constructor(){this.icons=_n.a}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-info-group"]],inputs:{groupTitle:"groupTitle"},ngContentSelectors:Oh,decls:11,vars:6,consts:function(){var e;return e="here",[[1,"row"],["triggers","",1,"info-group-title",3,"ngbPopover"],["popInfo","ngbPopover"],["type","button",1,"popover-icon","btn","btn-link","p-0",3,"click"],[3,"ngClass"],["popInfoTemplate",""],[1,"text-center"],"For an overview of " + "\ufffd0\ufffd" + " widgets click " + "\ufffd#3\ufffd" + "" + "\ufffd/#3\ufffd" + "",[3,"section",6,"docText"],["docText",e]]},template:function(e,t){if(1&e){const e=i.Tb();i.oc(),i.Sb(0,"div",0),i.Sb(1,"div",1,2),i.Sb(3,"span"),i.Oc(4),i.Rb(),i.Sb(5,"button",3),i.gc("click",(function(){return i.Dc(e),i.Ac(2).toggle()})),i.Nb(6,"i",4),i.Rb(),i.Rb(),i.Rb(),i.Sb(7,"div",0),i.nc(8),i.Rb(),i.Mc(9,Th,6,6,"ng-template",null,5,i.Nc)}if(2&e){const e=i.Ac(10);i.yb(1),i.pc("ngbPopover",e),i.yb(3),i.Pc(t.groupTitle),i.yb(2),i.pc("ngClass",i.vc(3,Ch,t.icons.infoCircle,t.icons.large))}},directives:[Qt.w,On.a,o.p,Lr.a],pipes:[o.o],styles:[".info-group-title[_ngcontent-%COMP%]{font-size:1.75rem;margin:0 0 .5vw .5vw}.popover-icon[_ngcontent-%COMP%]:focus{box-shadow:none}"]}),e})();function Rh(e,t){if(1&e&&(i.Sb(0,"a",6),i.Oc(1),i.Rb()),2&e){const e=i.ic();i.pc("routerLink",e.link),i.yb(1),i.Pc(e.cardTitle)}}function Eh(e,t){if(1&e&&i.Oc(0),2&e){const e=i.ic();i.Qc(" ",e.cardTitle," ")}}const Ah=["*"];let Ih=(()=>{class e{constructor(){this.cardClass=""}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-info-card"]],inputs:{cardTitle:"cardTitle",link:"link",cardClass:"cardClass",contentClass:"contentClass"},ngContentSelectors:Ah,decls:8,vars:4,consts:[[1,"card","shadow-sm",3,"ngClass"],[1,"card-body","d-flex","align-items-center","justify-content-center"],[1,"card-title","m-4"],[3,"routerLink",4,"ngIf","ngIfElse"],["noLinkTitle",""],[1,"card-text","text-center",3,"ngClass"],[3,"routerLink"]],template:function(e,t){if(1&e&&(i.oc(),i.Sb(0,"div",0),i.Sb(1,"div",1),i.Sb(2,"h4",2),i.Mc(3,Rh,2,2,"a",3),i.Mc(4,Eh,1,1,"ng-template",null,4,i.Nc),i.Rb(),i.Sb(6,"div",5),i.nc(7),i.Rb(),i.Rb(),i.Rb()),2&e){const e=i.Ac(5);i.pc("ngClass",t.cardClass),i.yb(3),i.pc("ngIf",t.link)("ngIfElse",e),i.yb(3),i.pc("ngClass",t.contentClass)}},directives:[o.p,o.r,Pt.h],styles:[".card[_ngcontent-%COMP%]{font-size:12px;border:.5px solid #dee2e6;border-radius:3px;height:100%}@media screen and (min-width:320px){.card[_ngcontent-%COMP%]{font-size:calc(12px + 9 * ((100vw - 320px) / 1728))}}@media screen and (min-width:2048px){.card[_ngcontent-%COMP%]{font-size:21px}}.card[_ngcontent-%COMP%] .card-body[_ngcontent-%COMP%]{padding-top:40px!important}.card[_ngcontent-%COMP%] .card-body[_ngcontent-%COMP%] .card-title[_ngcontent-%COMP%]{left:-.6rem;position:absolute;top:-.3rem}.no-center[_ngcontent-%COMP%]{left:unset;position:unset;top:unset;transform:unset}.content-highlight[_ngcontent-%COMP%]{font-weight:700}"]}),e})();var Ph=n("MO+k");const jh=["chartCanvas"],Nh=["chartTooltip"];let Fh=(()=>{class e{constructor(e,t,n){this.dimlessBinary=e,this.dimless=t,this.cssHelper=n,this.config={},this.isBytesData=!1,this.showLabelAsTooltip=!1,this.prepareFn=new i.o,this.chartConfig={chartType:"doughnut",dataset:[{label:null,borderWidth:0}],colors:[{backgroundColor:[this.cssHelper.propertyValue("chart-color-green"),this.cssHelper.propertyValue("chart-color-yellow"),this.cssHelper.propertyValue("chart-color-orange"),this.cssHelper.propertyValue("chart-color-red"),this.cssHelper.propertyValue("chart-color-blue")]}],options:{cutoutPercentage:90,events:["click","mouseout","touchstart"],legend:{display:!0,position:"right",labels:{boxWidth:10,usePointStyle:!1}},plugins:{center_text:!0},tooltips:{enabled:!0,displayColors:!1,backgroundColor:this.cssHelper.propertyValue("chart-color-tooltip-background"),cornerRadius:0,bodyFontSize:14,bodyFontStyle:"600",position:"nearest",xPadding:12,yPadding:12,callbacks:{label:(e,t)=>{let n=t.labels[e.index];return n.includes("%")||(n=`${n} (${t.datasets[e.datasetIndex].data[e.index]}%)`),n}}},title:{display:!1}}},this.doughnutChartPlugins=[{id:"center_text",beforeDraw(e){const t=new kh.a,n="Helvetica Neue, Helvetica, Arial, sans-serif";Ph.defaults.global.defaultFontFamily=n;const i=e.ctx;if(!e.options.plugins.center_text||!e.data.datasets[0].label)return;i.save();const r=e.data.datasets[0].label.split("\n"),s=(e.chartArea.left+e.chartArea.right)/2,o=(e.chartArea.top+e.chartArea.bottom)/2;i.textAlign="center",i.textBaseline="middle",i.font="24px "+n,i.fillStyle=t.propertyValue("chart-color-center-text"),i.fillText(r[0],s,o-10),r.length>1&&(i.font="14px "+n,i.fillStyle=t.propertyValue("chart-color-center-text-description"),i.fillText(r[1],s,o+10)),i.restore()}}]}ngOnInit(){new rn.a(this.chartCanvasRef,this.chartTooltipRef,(e,t)=>t+e.caretX+"px",(e,t)=>t+e.caretY-e.height-10+"px").getBody=e=>this.getChartTooltipBody(e),Nt.a.merge(this.chartConfig,this.config),this.prepareFn.emit([this.chartConfig,this.data])}ngOnChanges(){this.prepareFn.emit([this.chartConfig,this.data]),this.setChartSliceBorderWidth()}getChartTooltipBody(e){const t=e[0].split(": ");return this.showLabelAsTooltip?t[0]:(t[1]=this.isBytesData?this.dimlessBinary.transform(t[1]):this.dimless.transform(t[1]),t.join(": "))}setChartSliceBorderWidth(){let e=0;Nt.a.forEach(this.chartConfig.dataset[0].data,(function(t){t>0&&(e+=1)})),this.chartConfig.dataset[0].borderWidth=e>1?1:0}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Zt.a),i.Mb(Xt.a),i.Mb(kh.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-health-pie"]],viewQuery:function(e,t){var n;1&e&&(i.Jc(jh,!0),i.Jc(Nh,!0)),2&e&&(i.zc(n=i.hc())&&(t.chartCanvasRef=n.first),i.zc(n=i.hc())&&(t.chartTooltipRef=n.first))},inputs:{data:"data",config:"config",isBytesData:"isBytesData",tooltipFn:"tooltipFn",showLabelAsTooltip:"showLabelAsTooltip"},outputs:{prepareFn:"prepareFn"},features:[i.wb],decls:6,vars:6,consts:[[1,"chart-container"],["baseChart","",1,"chart-canvas",3,"datasets","chartType","options","labels","colors","plugins"],["chartCanvas",""],[1,"chartjs-tooltip"],["chartTooltip",""]],template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Nb(1,"canvas",1,2),i.Sb(3,"div",3,4),i.Nb(5,"table"),i.Rb(),i.Rb()),2&e&&(i.yb(1),i.pc("datasets",t.chartConfig.dataset)("chartType",t.chartConfig.chartType)("options",t.chartConfig.options)("labels",t.chartConfig.labels)("colors",t.chartConfig.colors)("plugins",t.doughnutChartPlugins))},directives:[sn.a],styles:['.chart-container[_ngcontent-%COMP%]{cursor:pointer;margin:auto;overflow:visible;position:absolute}canvas[_ngcontent-%COMP%]{user-select:none}.chartjs-tooltip[_ngcontent-%COMP%]{background:rgba(0,0,0,.7);border-radius:3px;color:#fff;font-family:Helvetica Neue,Helvetica,Arial,sans-serif!important;opacity:0;pointer-events:none;position:absolute;transform:translate(-50%);transition:all .1s ease}.chartjs-tooltip.transform-left[_ngcontent-%COMP%]{transform:translate(-10%)}.chartjs-tooltip.transform-left[_ngcontent-%COMP%]:after{left:10%}.chartjs-tooltip.transform-right[_ngcontent-%COMP%]{transform:translate(-90%)}.chartjs-tooltip.transform-right[_ngcontent-%COMP%]:after{left:90%}.chartjs-tooltip[_ngcontent-%COMP%]:after{border:5px solid transparent;border-top-color:#000;content:" ";left:50%;margin-left:-5px;position:absolute;top:100%} .chartjs-tooltip-key{display:inline-block;height:10px;margin-right:10px;width:10px}.chart-canvas[_ngcontent-%COMP%], .chart-container[_ngcontent-%COMP%]{height:100%;margin-left:auto;margin-right:auto;position:unset;width:100%}.chart-canvas[_ngcontent-%COMP%]{max-height:100%;max-width:100%}']}),e})(),Yh=(()=>{class e{transform(e){if(!e)return"";let t=0,n=0;Nt.a.each(e.osds,e=>{e.in&&t++,e.up&&n++});const i=[{content:`${e.osds.length} ${"total"}`,class:""}];i.push({content:"",class:"card-text-line-break"}),i.push({content:`${n} ${"up"}, ${t} ${"in"}`,class:""});const r=e.osds.length-n,s=e.osds.length-t;if(r>0||s>0){i.push({content:"",class:"card-text-line-break"});const e=r>0?`${r} ${"down"}`:"",t=s>0?`${s} ${"out"}`:"";i.push({content:`${e}${r>0&&s>0?", ":""}${t}`,class:"card-text-error"})}return i}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"osdSummary",type:e,pure:!0}),e})(),zh=(()=>{class e{transform(e){if(!e)return"";let t="",n="",i=0,r=0,s=0;Nt.a.each(e.standbys,()=>{i+=1}),e.standbys&&!e.filesystems?(t=`${i} ${"up"}`,n="no filesystems"):0===e.filesystems.length?t="no filesystems":(Nt.a.each(e.filesystems,e=>{Nt.a.each(e.mdsmap.info,e=>{"up:standby-replay"===e.state?s+=1:r+=1})}),t=`${r} ${"active"}`,n=`${i+s} ${"standby"}`);const o=e.standbys.map(e=>e.name).join(", "),a=o?`${"standby daemons"}: ${o}`:"",c=e.filesystems?e.filesystems.length:0,l=Object.values(c>0?e.filesystems[0].mdsmap.info:{}).map(e=>e.name).join(", ");let u=l?`${"active daemon"}: ${l}`:"";!r&&c>0&&(u=`${s} ${"standbyReplay"}`);const d=[{content:t,class:"popover-info",titleText:u}];return n&&(d.push({content:"",class:"card-text-line-break",titleText:""}),d.push({content:n,class:"popover-info",titleText:a})),d}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"mdsSummary",type:e,pure:!0}),e})();var $h=function(e){return e.HEALTH_ERR="health-color-error",e.HEALTH_WARN="health-color-warning",e.HEALTH_OK="health-color-healthy",e}({});let Hh=(()=>{class e{constructor(e){this.cssHelper=e}transform(e){return Object.keys($h).includes(e)?{color:this.cssHelper.propertyValue($h[e])}:null}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(kh.a))},e.\u0275pipe=i.Lb({name:"healthColor",type:e,pure:!0}),e})(),Wh=(()=>{class e{transform(e){return e?"" + e.monmap.mons.length.toString() + " (quorum " + e.quorum.join(", ") + ")":""}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"monSummary",type:e,pure:!0}),e})(),Vh=(()=>{class e{transform(e){if(!e)return"";let t="n/a";const n=Nt.a.isUndefined(e.active_name)?"":`${"active daemon"}: ${e.active_name}`;n.length>0&&(t="1");const i=e.standbys.map(e=>e.name).join(", "),r=i?`${"standby daemons"}: ${i}`:"",s=e.standbys.length,o=[{content:`${t} ${"active"}`,class:"popover-info",titleText:n}];return o.push({content:"",class:"card-text-line-break",titleText:""}),o.push({content:`${s} ${"standby"}`,class:"popover-info",titleText:r}),o}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"mgrSummary",type:e,pure:!0}),e})();function Bh(e,t){1&e&&i.Ob(0)}function Uh(e,t){if(1&e&&(i.Sb(0,"li"),i.Sb(1,"span",21),i.jc(2,"healthColor"),i.Oc(3),i.Rb(),i.Oc(4),i.Rb()),2&e){const e=t.$implicit;i.yb(1),i.pc("ngStyle",i.kc(2,3,e.severity)),i.yb(2),i.Pc(e.type),i.yb(1),i.Qc(": ",e.summary.message," ")}}function qh(e,t){if(1&e&&(i.Mc(0,Bh,1,0,"ng-container",19),i.Sb(1,"ul"),i.Mc(2,Uh,5,5,"li",20),i.Rb()),2&e){i.ic(4);const e=i.Ac(5),t=i.ic();i.pc("ngTemplateOutlet",e),i.yb(2),i.pc("ngForOf",t.healthData.health.checks)}}function Gh(e,t){1&e&&i.Nb(0,"i",22)}function Jh(e,t){if(1&e&&(i.Qb(0),i.Mc(1,qh,3,2,"ng-template",null,16,i.Nc),i.Sb(3,"div",17),i.jc(4,"healthColor"),i.Oc(5),i.Mc(6,Gh,1,0,"i",18),i.Rb(),i.Pb()),2&e){const e=i.Ac(2),t=i.ic(4);i.yb(3),i.pc("ngStyle",i.kc(4,4,t.healthData.health.status))("ngbPopover",e),i.yb(2),i.Qc(" ",t.healthData.health.status," "),i.yb(1),i.pc("ngIf","HEALTH_OK"!=(null==t.healthData.health?null:t.healthData.health.status))}}function Qh(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"div",21),i.jc(2,"healthColor"),i.Oc(3),i.Rb(),i.Pb()),2&e){const e=i.ic(4);i.yb(1),i.pc("ngStyle",i.kc(2,2,e.healthData.health.status)),i.yb(2),i.Qc(" ",e.healthData.health.status," ")}}function Kh(e,t){if(1&e&&(i.Sb(0,"cd-info-card",13),i.Yb(1,14),i.Mc(2,Jh,7,6,"ng-container",15),i.Mc(3,Qh,4,4,"ng-container",15),i.Rb()),2&e){const e=i.ic(3);i.yb(2),i.pc("ngIf",(null==e.healthData.health||null==e.healthData.health.checks?null:e.healthData.health.checks.length)>0),i.yb(1),i.pc("ngIf",!(null!=e.healthData.health&&null!=e.healthData.health.checks&&e.healthData.health.checks.length))}}function Zh(e,t){if(1&e&&(i.Sb(0,"cd-info-card",23),i.Yb(1,24),i.Oc(2),i.Rb()),2&e){const e=i.ic(3);i.yb(2),i.Qc(" ",e.healthData.hosts," total ")}}function Xh(e,t){if(1&e&&(i.Sb(0,"cd-info-card",25),i.Yb(1,26),i.Oc(2),i.jc(3,"monSummary"),i.Rb()),2&e){const e=i.ic(3);i.yb(2),i.Qc(" ",i.kc(3,1,e.healthData.mon_status)," ")}}function ef(e,t){if(1&e&&(i.Sb(0,"span",30),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("ngClass",e.class),i.yb(1),i.Qc(" ",e.content," ")}}function tf(e,t){if(1&e&&(i.Sb(0,"cd-info-card",27),i.Yb(1,28),i.Mc(2,ef,2,2,"span",29),i.Rb()),2&e){const e=t.ngIf;i.yb(2),i.pc("ngForOf",e)}}function nf(e,t){if(1&e&&(i.Sb(0,"span",33),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("ngClass",e.class)("title",null!=e.titleText?e.titleText:""),i.yb(1),i.Qc(" ",e.content," ")}}function rf(e,t){if(1&e&&(i.Sb(0,"cd-info-card",13),i.Yb(1,31),i.Mc(2,nf,2,3,"span",32),i.jc(3,"mgrSummary"),i.Rb()),2&e){const e=i.ic(3);i.yb(2),i.pc("ngForOf",i.kc(3,1,e.healthData.mgr_map))}}function sf(e,t){if(1&e&&(i.Sb(0,"cd-info-card",34),i.Yb(1,35),i.Oc(2),i.Rb()),2&e){const e=i.ic(3);i.yb(2),i.Qc(" ",e.healthData.rgw," total ")}}function of(e,t){if(1&e&&(i.Sb(0,"span",33),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("ngClass",e.class)("title",null!=e.titleText?e.titleText:""),i.yb(1),i.Qc(" ",e.content," ")}}function af(e,t){if(1&e&&(i.Sb(0,"cd-info-card",36),i.Yb(1,37),i.Mc(2,of,2,3,"span",32),i.Rb()),2&e){const e=t.ngIf;i.pc("contentClass",(e.length>1?"text-area-size-2":"")+" content-highlight"),i.yb(2),i.pc("ngForOf",e)}}const cf=function(e){return{"card-text-error":e}};function lf(e,t){if(1&e&&(i.Sb(0,"cd-info-card",38),i.Yb(1,39),i.Oc(2),i.Nb(3,"span",40),i.Oc(4),i.Sb(5,"span",30),i.Oc(6),i.Rb(),i.Rb()),2&e){const e=i.ic(3);i.yb(2),i.Qc(" ",e.healthData.iscsi_daemons.up+e.healthData.iscsi_daemons.down," total "),i.yb(2),i.Qc(" ",e.healthData.iscsi_daemons.up," up, "),i.yb(1),i.pc("ngClass",i.uc(4,cf,e.healthData.iscsi_daemons.down>0)),i.yb(1),i.Qc("",e.healthData.iscsi_daemons.down," down")}}function uf(e,t){if(1&e&&(i.Sb(0,"cd-info-group",4),i.Yb(1,5),i.Mc(2,Kh,4,2,"cd-info-card",6),i.Mc(3,Zh,3,1,"cd-info-card",7),i.Mc(4,Xh,4,3,"cd-info-card",8),i.Mc(5,tf,3,1,"cd-info-card",9),i.jc(6,"osdSummary"),i.Mc(7,rf,4,3,"cd-info-card",6),i.Mc(8,sf,3,1,"cd-info-card",10),i.Mc(9,af,3,2,"cd-info-card",11),i.jc(10,"mdsSummary"),i.Mc(11,lf,7,6,"cd-info-card",12),i.Rb()),2&e){const e=i.ic().ngIf,t=i.ic();i.yb(2),i.pc("ngIf",null==t.healthData.health?null:t.healthData.health.status),i.yb(1),i.pc("ngIf",null!=t.healthData.hosts),i.yb(1),i.pc("ngIf",t.healthData.mon_status),i.yb(1),i.pc("ngIf",i.kc(6,8,t.healthData.osd_map)),i.yb(2),i.pc("ngIf",t.healthData.mgr_map),i.yb(1),i.pc("ngIf",e.rgw&&null!=t.healthData.rgw),i.yb(1),i.pc("ngIf",i.kc(10,10,e.cephfs&&t.healthData.fs_map)),i.yb(2),i.pc("ngIf",e.iscsi&&null!=t.healthData.iscsi_daemons)}}function df(e,t){if(1&e){const e=i.Tb();i.Sb(0,"cd-info-card",45),i.Yb(1,46),i.Sb(2,"cd-health-pie",47),i.gc("prepareFn",(function(t){return i.Dc(e),i.ic(3).prepareRawUsage(t[0],t[1])})),i.Rb(),i.Rb()}if(2&e){const e=i.ic(3);i.yb(2),i.pc("data",e.healthData)("config",e.rawCapacityChartConfig)("isBytesData",!0)}}function hf(e,t){if(1&e){const e=i.Tb();i.Sb(0,"cd-info-card",45),i.Yb(1,48),i.Sb(2,"cd-health-pie",49),i.gc("prepareFn",(function(t){return i.Dc(e),i.ic(3).prepareObjects(t[0],t[1])})),i.Rb(),i.Rb()}if(2&e){const e=i.ic(3);i.yb(2),i.pc("data",e.healthData)}}function ff(e,t){1&e&&i.Ob(0)}function pf(e,t){if(1&e&&(i.Sb(0,"li"),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.yb(1),i.Rc(" ",e.key,": ",e.value," ")}}function mf(e,t){if(1&e&&(i.Mc(0,ff,1,0,"ng-container",19),i.Sb(1,"ul"),i.Mc(2,pf,2,2,"li",20),i.jc(3,"keyvalue"),i.Rb()),2&e){i.ic(3);const e=i.Ac(5),t=i.ic();i.pc("ngTemplateOutlet",e),i.yb(2),i.pc("ngForOf",i.kc(3,2,t.healthData.pg_info.statuses))}}function bf(e,t){if(1&e){const e=i.Tb();i.Sb(0,"cd-info-card",45),i.Yb(1,50),i.Mc(2,mf,4,4,"ng-template",null,51,i.Nc),i.Sb(4,"div",52),i.Sb(5,"div",53),i.Sb(6,"cd-health-pie",54),i.gc("prepareFn",(function(t){return i.Dc(e),i.ic(3).preparePgStatus(t[0],t[1])})),i.Rb(),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.Ac(3),t=i.ic(3);i.yb(5),i.pc("ngbPopover",e),i.yb(1),i.pc("data",t.healthData)("config",t.pgStatusChartConfig)}}function gf(e,t){if(1&e&&(i.Sb(0,"cd-info-card",55),i.Yb(1,56),i.Oc(2),i.Rb()),2&e){const e=i.ic(3);i.yb(2),i.Qc(" ",e.healthData.pools.length," ")}}function _f(e,t){if(1&e&&(i.Sb(0,"cd-info-card",57),i.Yb(1,58),i.Oc(2),i.jc(3,"dimless"),i.Rb()),2&e){const e=i.ic(3);i.yb(2),i.Qc(" ",i.kc(3,1,e.healthData.pg_info.pgs_per_osd)," ")}}function yf(e,t){if(1&e&&(i.Sb(0,"cd-info-group",4),i.Yb(1,41),i.Mc(2,df,3,3,"cd-info-card",42),i.Mc(3,hf,3,1,"cd-info-card",42),i.Mc(4,bf,7,3,"cd-info-card",42),i.Mc(5,gf,3,1,"cd-info-card",43),i.Mc(6,_f,4,3,"cd-info-card",44),i.Rb()),2&e){const e=i.ic(2);i.yb(2),i.pc("ngIf",e.healthData.df),i.yb(1),i.pc("ngIf",null!=(null==e.healthData.pg_info||null==e.healthData.pg_info.object_stats?null:e.healthData.pg_info.object_stats.num_objects)),i.yb(1),i.pc("ngIf",e.healthData.pg_info),i.yb(1),i.pc("ngIf",e.healthData.pools),i.yb(1),i.pc("ngIf",e.healthData.pg_info)}}function vf(e,t){if(1&e){const e=i.Tb();i.Sb(0,"cd-info-card",62),i.Yb(1,63),i.Sb(2,"cd-health-pie",54),i.gc("prepareFn",(function(t){return i.Dc(e),i.ic(3).prepareReadWriteRatio(t[0],t[1])})),i.Rb(),i.Rb()}if(2&e){const e=i.ic(3);i.yb(2),i.pc("data",e.healthData)("config",e.clientStatsConfig)}}function wf(e,t){if(1&e){const e=i.Tb();i.Sb(0,"cd-info-card",62),i.Yb(1,64),i.Sb(2,"cd-health-pie",54),i.gc("prepareFn",(function(t){return i.Dc(e),i.ic(3).prepareClientThroughput(t[0],t[1])})),i.Rb(),i.Rb()}if(2&e){const e=i.ic(3);i.yb(2),i.pc("data",e.healthData)("config",e.clientStatsConfig)}}function Sf(e,t){if(1&e&&(i.Sb(0,"cd-info-card",65),i.Yb(1,66),i.Oc(2),i.jc(3,"dimlessBinary"),i.Rb()),2&e){const e=i.ic(3);i.yb(2),i.Qc(" ",i.kc(3,1,e.healthData.client_perf.recovering_bytes_per_sec)+"/s"," ")}}function Mf(e,t){if(1&e&&(i.Sb(0,"cd-info-card",65),i.Yb(1,67),i.Oc(2),i.Rb()),2&e){const e=i.ic(3);i.yb(2),i.Qc(" ",e.healthData.scrub_status," ")}}function xf(e,t){if(1&e&&(i.Sb(0,"cd-info-group",4),i.Yb(1,59),i.Mc(2,vf,3,2,"cd-info-card",60),i.Mc(3,wf,3,2,"cd-info-card",60),i.Mc(4,Sf,4,3,"cd-info-card",61),i.Mc(5,Mf,3,1,"cd-info-card",61),i.Rb()),2&e){const e=i.ic(2);i.yb(2),i.pc("ngIf",e.healthData.client_perf),i.yb(1),i.pc("ngIf",e.healthData.client_perf),i.yb(1),i.pc("ngIf",e.healthData.client_perf),i.yb(1),i.pc("ngIf",e.healthData.scrub_status)}}const kf=function(e){return[e]};function Df(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"p",68),i.cc(2,69),i.Nb(3,"i",30),i.Nb(4,"a",70),i.Zb(),i.Rb(),i.Pb()),2&e){const e=i.ic(3);i.yb(3),i.pc("ngClass",i.uc(1,kf,e.icons.infoCircle))}}function Tf(e,t){if(1&e&&i.Mc(0,Df,5,3,"ng-container",15),2&e){const e=i.ic(2);i.pc("ngIf",e.permissions.log.read)}}function Cf(e,t){if(1&e&&(i.Sb(0,"div",1),i.Mc(1,uf,12,12,"cd-info-group",2),i.Mc(2,yf,7,5,"cd-info-group",2),i.Mc(3,xf,6,4,"cd-info-group",2),i.Mc(4,Tf,1,1,"ng-template",null,3,i.Nc),i.Rb()),2&e){const e=i.ic();i.yb(1),i.pc("ngIf",(null==e.healthData.health?null:e.healthData.health.status)||e.healthData.mon_status||e.healthData.osd_map||e.healthData.mgr_map||null!=e.healthData.hosts||null!=e.healthData.rgw||e.healthData.fs_map||null!=e.healthData.iscsi_daemons),i.yb(1),i.pc("ngIf",e.healthData.pools||e.healthData.df||e.healthData.pg_info),i.yb(1),i.pc("ngIf",e.healthData.client_perf||e.healthData.scrub_status)}}let Of=(()=>{class e{constructor(e,t,n,i,r,s,o,a){this.healthService=e,this.authStorageService=t,this.pgCategoryService=n,this.featureToggles=i,this.refreshIntervalService=r,this.dimlessBinary=s,this.dimless=o,this.cssHelper=a,this.interval=new Oi.a,this.icons=_n.a,this.clientStatsConfig={colors:[{backgroundColor:[this.cssHelper.propertyValue("chart-color-cyan"),this.cssHelper.propertyValue("chart-color-purple")]}]},this.rawCapacityChartConfig={colors:[{backgroundColor:[this.cssHelper.propertyValue("chart-color-blue"),this.cssHelper.propertyValue("chart-color-gray")]}]},this.pgStatusChartConfig={options:{events:[""]}},this.permissions=this.authStorageService.getPermissions(),this.enabledFeature$=this.featureToggles.get()}ngOnInit(){this.interval=this.refreshIntervalService.intervalData$.subscribe(()=>{this.getHealth()})}ngOnDestroy(){this.interval.unsubscribe()}getHealth(){this.healthService.getMinimalHealth().subscribe(e=>{this.healthData=e})}prepareReadWriteRatio(e){const t=[],n=[],i=this.healthData.client_perf.write_op_per_sec+this.healthData.client_perf.read_op_per_sec;t.push(`${"Reads"}: ${this.dimless.transform(this.healthData.client_perf.read_op_per_sec)} ${"/s"}`),n.push(this.calcPercentage(this.healthData.client_perf.read_op_per_sec,i)),t.push(`${"Writes"}: ${this.dimless.transform(this.healthData.client_perf.write_op_per_sec)} ${"/s"}`),n.push(this.calcPercentage(this.healthData.client_perf.write_op_per_sec,i)),e.labels=t,e.dataset[0].data=n,e.dataset[0].label=`${this.dimless.transform(i)}\n${"IOPS"}`}prepareClientThroughput(e){const t=[],n=[],i=this.healthData.client_perf.read_bytes_sec+this.healthData.client_perf.write_bytes_sec;t.push(`${"Reads"}: ${this.dimlessBinary.transform(this.healthData.client_perf.read_bytes_sec)}${"/s"}`),n.push(this.calcPercentage(this.healthData.client_perf.read_bytes_sec,i)),t.push(`${"Writes"}: ${this.dimlessBinary.transform(this.healthData.client_perf.write_bytes_sec)}${"/s"}`),n.push(this.calcPercentage(this.healthData.client_perf.write_bytes_sec,i)),e.labels=t,e.dataset[0].data=n,e.dataset[0].label=`${this.dimlessBinary.transform(i).replace(" ","\n")}${"/s"}`}prepareRawUsage(e,t){const n=this.calcPercentage(t.df.stats.total_bytes-t.df.stats.total_used_raw_bytes,t.df.stats.total_bytes),i=this.calcPercentage(t.df.stats.total_used_raw_bytes,t.df.stats.total_bytes);e.dataset[0].data=[i,n],e.labels=[`${"Used"}: ${this.dimlessBinary.transform(t.df.stats.total_used_raw_bytes)}`,`${"Avail."}: ${this.dimlessBinary.transform(t.df.stats.total_bytes-t.df.stats.total_used_raw_bytes)}`],e.dataset[0].label=`${i}%\nof ${this.dimlessBinary.transform(t.df.stats.total_bytes)}`}preparePgStatus(e,t){const n={};let i=0;Nt.a.forEach(t.pg_info.statuses,(e,t)=>{const r=this.pgCategoryService.getTypeByStates(t);Nt.a.isUndefined(n[r])&&(n[r]=0),n[r]+=e,i+=e});for(const r of this.pgCategoryService.getAllTypes())Nt.a.isUndefined(n[r])&&(n[r]=0);e.dataset[0].data=this.pgCategoryService.getAllTypes().map(e=>this.calcPercentage(n[e],i)),e.labels=[`${"Clean"}: ${this.dimless.transform(n.clean)}`,`${"Working"}: ${this.dimless.transform(n.working)}`,`${"Warning"}: ${this.dimless.transform(n.warning)}`,`${"Unknown"}: ${this.dimless.transform(n.unknown)}`],e.dataset[0].label=`${i}\n${"PGs"}`}prepareObjects(e,t){const n=t.pg_info.object_stats.num_object_copies,i=this.calcPercentage(n-t.pg_info.object_stats.num_objects_misplaced-t.pg_info.object_stats.num_objects_degraded-t.pg_info.object_stats.num_objects_unfound,n),r=this.calcPercentage(t.pg_info.object_stats.num_objects_misplaced,n),s=this.calcPercentage(t.pg_info.object_stats.num_objects_degraded,n),o=this.calcPercentage(t.pg_info.object_stats.num_objects_unfound,n);e.labels=[`${"Healthy"}: ${i}%`,`${"Misplaced"}: ${r}%`,`${"Degraded"}: ${s}%`,`${"Unfound"}: ${o}%`],e.dataset[0].data=[i,r,s,o],e.dataset[0].label=`${this.dimless.transform(t.pg_info.object_stats.num_objects)}\n${"objects"}`}isClientReadWriteChartShowable(){return(this.healthData.client_perf.read_op_per_sec||0)+(this.healthData.client_perf.write_op_per_sec||0)>0}calcPercentage(e,t){return Nt.a.isNumber(e)&&Nt.a.isNumber(t)&&0!==t?Math.round(e/t*100):0}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(xh),i.Mb(Jt.a),i.Mb(Mh.a),i.Mb(Dh.a),i.Mb(vh),i.Mb(Zt.a),i.Mb(Xt.a),i.Mb(kh.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-health"]],decls:2,vars:3,consts:function(){return[["class","container-fluid",4,"ngIf"],[1,"container-fluid"],[4,"ngIf",6,"groupTitle"],["logsLink",""],[6,"groupTitle"],["groupTitle","Status"],["class","cd-status-card","contentClass","content-highlight",4,"ngIf",6,"cardTitle"],["link","/hosts","class","cd-status-card","contentClass","content-highlight",4,"ngIf",6,"cardTitle"],["link","/monitor","class","cd-status-card","contentClass","content-highlight",4,"ngIf",6,"cardTitle"],["link","/osd","class","cd-status-card","contentClass","content-highlight",4,"ngIf",6,"cardTitle"],["link","/rgw/daemon","class","cd-status-card","contentClass","content-highlight",4,"ngIf",6,"cardTitle"],["class","cd-status-card",3,"contentClass",4,"ngIf",6,"cardTitle"],["link","/block/iscsi","class","cd-status-card","contentClass","content-highlight",4,"ngIf",6,"cardTitle"],["contentClass","content-highlight",1,"cd-status-card",6,"cardTitle"],["cardTitle","Cluster Status"],[4,"ngIf"],["healthChecks",""],["popoverClass","info-card-popover-cluster-status",1,"info-card-content-clickable",3,"ngStyle","ngbPopover"],["class","fa fa-exclamation-triangle",4,"ngIf"],[4,"ngTemplateOutlet"],[4,"ngFor","ngForOf"],[3,"ngStyle"],[1,"fa","fa-exclamation-triangle"],["link","/hosts","contentClass","content-highlight",1,"cd-status-card",6,"cardTitle"],["cardTitle","Hosts"],["link","/monitor","contentClass","content-highlight",1,"cd-status-card",6,"cardTitle"],["cardTitle","Monitors"],["link","/osd","contentClass","content-highlight",1,"cd-status-card",6,"cardTitle"],["cardTitle","OSDs"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],["cardTitle","Managers"],[3,"ngClass","title",4,"ngFor","ngForOf"],[3,"ngClass","title"],["link","/rgw/daemon","contentClass","content-highlight",1,"cd-status-card",6,"cardTitle"],["cardTitle","Object Gateways"],[1,"cd-status-card",3,"contentClass",6,"cardTitle"],["cardTitle","Metadata Servers"],["link","/block/iscsi","contentClass","content-highlight",1,"cd-status-card",6,"cardTitle"],["cardTitle","iSCSI Gateways"],[1,"card-text-line-break"],["groupTitle","Capacity"],["class","cd-capacity-card cd-chart-card","contentClass","content-chart",4,"ngIf",6,"cardTitle"],["link","/pool","class","cd-capacity-card","contentClass","content-highlight",4,"ngIf",6,"cardTitle"],["class","cd-capacity-card","contentClass","content-highlight",4,"ngIf",6,"cardTitle"],["contentClass","content-chart",1,"cd-capacity-card","cd-chart-card",6,"cardTitle"],["cardTitle","Raw Capacity"],[3,"data","config","isBytesData","prepareFn"],["cardTitle","Objects"],[3,"data","prepareFn"],["cardTitle","PG Status"],["pgStatus",""],[1,"pg-status-popover-wrapper"],[3,"ngbPopover"],[3,"data","config","prepareFn"],["link","/pool","contentClass","content-highlight",1,"cd-capacity-card",6,"cardTitle"],["cardTitle","Pools"],["contentClass","content-highlight",1,"cd-capacity-card",6,"cardTitle"],["cardTitle","PGs per OSD"],["groupTitle","Performance"],["class","cd-performance-card cd-chart-card","contentClass","content-chart",4,"ngIf",6,"cardTitle"],["class","cd-performance-card","contentClass","content-highlight",4,"ngIf",6,"cardTitle"],["contentClass","content-chart",1,"cd-performance-card","cd-chart-card",6,"cardTitle"],["cardTitle","Client Read/Write"],["cardTitle","Client Throughput"],["contentClass","content-highlight",1,"cd-performance-card",6,"cardTitle"],["cardTitle","Recovery Throughput"],["cardTitle","Scrubbing"],[1,"logs-link"],"" + "\ufffd#3\ufffd" + "" + "\ufffd/#3\ufffd" + " See " + "\ufffd#4\ufffd" + "Logs" + "\ufffd/#4\ufffd" + " for more details.",["routerLink","/logs"]]},template:function(e,t){1&e&&(i.Mc(0,Cf,6,3,"div",0),i.jc(1,"async")),2&e&&i.pc("ngIf",i.kc(1,1,t.healthData&&t.enabledFeature$))},directives:[o.r,Lh,Ih,o.s,Qt.w,o.w,o.q,o.p,Fh,Pt.h],pipes:[o.b,Yh,zh,Hh,Wh,Vh,o.k,Xt.a,Zt.a],styles:['cd-info-card[_ngcontent-%COMP%]{padding:0 .5vw} cd-health .pg-status-popover-wrapper{position:relative} cd-health .pg-status-popover-wrapper .popover{max-height:20vh;max-width:unset!important;min-width:unset!important;position:absolute;width:116%} cd-health .pg-status-popover-wrapper .popover .popover-body{font-size:1rem;max-height:19vh;max-width:100%}.logs-link[_ngcontent-%COMP%]{text-align:center}.card-text-error[_ngcontent-%COMP%]{color:#ef5c55;display:inline}.card-text-line-break[_ngcontent-%COMP%]:after{content:"\\a";white-space:pre}.popover-info[_ngcontent-%COMP%]:hover{cursor:pointer}']}),e})();function Lf(e,t){1&e&&i.Nb(0,"cd-health")}function Rf(e,t){}function Ef(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"ul",1,2),i.Sb(3,"li",3),i.Sb(4,"a",4),i.Wb(5,5),i.Rb(),i.Mc(6,Lf,1,0,"ng-template",6),i.Rb(),i.Sb(7,"li",3),i.Sb(8,"a",4),i.Wb(9,7),i.Rb(),i.Mc(10,Rf,0,0,"ng-template",6),i.Rb(),i.Rb(),i.Nb(11,"div",8),i.Pb()),2&e){const e=i.Ac(2);i.yb(11),i.pc("ngbNavOutlet",e)}}function Af(e,t){1&e&&i.Nb(0,"cd-health")}let If=(()=>{class e{constructor(){this.hasGrafana=!1}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-dashboard"]],decls:4,vars:2,consts:function(){return[[4,"ngIf"],["ngbNav","",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem",""],["ngbNavLink",""],"Health",["ngbNavContent",""],"Statistics",[3,"ngbNavOutlet"]]},template:function(e,t){1&e&&(i.Sb(0,"div"),i.Nb(1,"cd-refresh-selector"),i.Mc(2,Ef,12,1,"ng-container",0),i.Mc(3,Af,1,0,"cd-health",0),i.Rb()),2&e&&(i.yb(2),i.pc("ngIf",t.hasGrafana),i.yb(1),i.pc("ngIf",!t.hasGrafana))},directives:[Sh,o.r,Qt.p,Qt.r,Qt.s,Qt.q,Qt.u,Of],styles:["div[_ngcontent-%COMP%]{padding-top:20px}"]}),e})(),Pf=(()=>{class e{constructor(e){this.http=e,this.apiPath="api/nfs-ganesha",this.uiApiPath="ui-api/nfs-ganesha",this.nfsAccessType=[{value:"RW",help:"Allows all operations"},{value:"RO",help:"Allows only operations that do not modify the server"},{value:"MDONLY",help:"Does not allow read or write operations, but allows any other operation"},{value:"MDONLY_RO",help:"Does not allow read, write, or any operation that modifies file attributes or directory content"},{value:"NONE",help:"Allows no access at all"}],this.nfsFsal=[{value:"CEPH",descr:"CephFS"},{value:"RGW",descr:"Object Gateway"}],this.nfsSquash=["no_root_squash","root_id_squash","root_squash","all_squash"]}list(){return this.http.get(this.apiPath+"/export")}get(e,t){return this.http.get(`${this.apiPath}/export/${e}/${t}`)}create(e){return this.http.post(this.apiPath+"/export",e,{observe:"response"})}update(e,t,n){return this.http.put(`${this.apiPath}/export/${e}/${t}`,n,{observe:"response"})}delete(e,t){return this.http.delete(`${this.apiPath}/export/${e}/${t}`,{observe:"response"})}lsDir(e,t){return this.http.get(`${this.uiApiPath}/lsdir/${e}?root_dir=${t}`)}buckets(e){return this.http.get(`${this.uiApiPath}/rgw/buckets?user_id=${e}`)}clients(){return this.http.get(this.uiApiPath+"/cephx/clients")}fsals(){return this.http.get(this.uiApiPath+"/fsals")}filesystems(){return this.http.get(this.uiApiPath+"/cephfs/filesystems")}daemon(){return this.http.get(this.apiPath+"/daemon")}start(e){return this.http.put(`${this.apiPath}/service/${e}/start`,null,{observe:"response"})}stop(e){return this.http.put(`${this.apiPath}/service/${e}/stop`,null,{observe:"response"})}}return e.\u0275fac=function(t){return new(t||e)(i.dc(a.b))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var jf=n("P8lu"),Nf=function(e){return e.user="user",e.orchestrator="orchestrator",e}({}),Ff=n("TYzs");function Yf(e,t){1&e&&(i.Sb(0,"span",14),i.Sb(1,"span",15),i.Wb(2,16),i.Rb(),i.Rb())}function zf(e,t){1&e&&(i.Sb(0,"span"),i.Wb(1,36),i.Rb())}function $f(e,t){1&e&&(i.Sb(0,"span"),i.Qb(1),i.Wb(2,37),i.Pb(),i.Nb(3,"br"),i.Qb(4),i.Wb(5,38),i.Pb(),i.Oc(6," 192.168.0.10, 192.168.1.0/8 "),i.Rb())}function Hf(e,t){if(1&e&&(i.Sb(0,"option",39),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e.value),i.yb(1),i.Pc(e.value)}}function Wf(e,t){if(1&e&&(i.Sb(0,"span",15),i.Oc(1),i.Rb()),2&e){const e=i.ic().index,t=i.ic();i.yb(1),i.Qc(" ",t.getAccessTypeHelp(e)," ")}}function Vf(e,t){if(1&e&&(i.Sb(0,"option",39),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e),i.yb(1),i.Pc(e)}}function Bf(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div"),i.Sb(1,"div",17),i.Sb(2,"div",18),i.Oc(3),i.jc(4,"ordinal"),i.Sb(5,"span",19),i.gc("click",(function(){i.Dc(e);const n=t.index;return i.ic().removeClient(n)})),i.Oc(6,"\xd7"),i.Rb(),i.Rb(),i.Sb(7,"div",20),i.Sb(8,"div",0),i.Sb(9,"label",21),i.Wb(10,22),i.Rb(),i.Sb(11,"div",23),i.Nb(12,"input",24),i.Sb(13,"span",25),i.Mc(14,zf,2,0,"span",26),i.Mc(15,$f,7,0,"span",26),i.Rb(),i.Rb(),i.Rb(),i.Sb(16,"div",0),i.Sb(17,"label",27),i.Wb(18,28),i.Rb(),i.Sb(19,"div",23),i.Sb(20,"select",29),i.Sb(21,"option",30),i.Oc(22),i.Rb(),i.Mc(23,Hf,2,2,"option",31),i.Rb(),i.Mc(24,Wf,2,1,"span",32),i.Rb(),i.Rb(),i.Sb(25,"div",0),i.Sb(26,"label",33),i.Wb(27,34),i.Rb(),i.Sb(28,"div",23),i.Sb(29,"select",35),i.Sb(30,"option",30),i.Oc(31),i.Rb(),i.Mc(32,Vf,2,2,"option",31),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=t.index,n=i.ic(),r=i.Ac(4);i.yb(1),i.pc("formGroupName",e),i.yb(2),i.Qc(" ",i.kc(4,9,e+1)," "),i.yb(11),i.pc("ngIf",n.showError(e,"addresses",r,"required")),i.yb(1),i.pc("ngIf",n.showError(e,"addresses",r,"pattern")),i.yb(7),i.Pc(n.getNoAccessTypeDescr()),i.yb(1),i.pc("ngForOf",n.nfsAccessType),i.yb(1),i.pc("ngIf",n.getValue(e,"access_type")),i.yb(7),i.Pc(n.getNoSquashDescr()),i.yb(1),i.pc("ngForOf",n.nfsSquash)}}const Uf=function(e){return[e]};let qf=(()=>{class e{constructor(e){this.nfsService=e,this.nfsSquash=this.nfsService.nfsSquash,this.nfsAccessType=this.nfsService.nfsAccessType,this.icons=_n.a}ngOnInit(){Nt.a.forEach(this.clients,e=>{this.addClient().patchValue(e)})}getNoAccessTypeDescr(){return this.form.getValue("access_type")?`${this.form.getValue("access_type")} ${"(inherited from global config)"}`:"-- Select the access type --"}getAccessTypeHelp(e){const t=this.nfsAccessType.find(t=>this.getValue(e,"access_type")===t.value);return Nt.a.isObjectLike(t)?t.help:""}getNoSquashDescr(){return this.form.getValue("squash")?`${this.form.getValue("squash")} (${"inherited from global config"})`:"-- Select what kind of user id squashing is performed --"}addClient(){const e=this.form.get("clients"),t="(([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3}).([0-9]{1,3})([/](\\d|[1-2]\\d|3[0-2]))?)",n=new Jn.a({addresses:new xn.h("",{validators:[xn.A.required,xn.A.pattern(`${t}([ ,]{1,2}${t})*`)]}),access_type:new xn.h(""),squash:new xn.h("")});return e.push(n),n}removeClient(e){this.form.get("clients").removeAt(e)}showError(e,t,n,i){return this.form.controls.clients.controls[e].showError(t,n,i)}getValue(e,t){return this.form.get("clients").at(e).getValue(t)}trackByFn(e){return e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Pf))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-nfs-form-client"]],inputs:{form:"form",clients:"clients"},decls:15,vars:7,consts:function(){return[[1,"form-group","row"],[1,"cd-col-form-label"],"Clients",[1,"cd-col-form-input",3,"formGroup"],["formDir","ngForm"],["class","no-border text-muted",4,"ngIf"],["formArrayName","clients"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"row"],[1,"col-12"],[1,"float-right"],[1,"btn","btn-light",3,"click"],[3,"ngClass"],"Add clients",[1,"no-border","text-muted"],[1,"form-text","text-muted"],"Any client can access",[1,"card",3,"formGroupName"],[1,"card-header"],["ngbTooltip","Remove",1,"float-right","clickable",3,"click"],[1,"card-body"],["for","addresses",1,"cd-col-form-label"],"Addresses",[1,"cd-col-form-input"],["type","text","name","addresses","id","addresses","formControlName","addresses","placeholder","192.168.0.10, 192.168.1.0/8",1,"form-control"],[1,"invalid-feedback"],[4,"ngIf"],["for","access_type",1,"cd-col-form-label"],"Access Type",["name","access_type","id","access_type","formControlName","access_type",1,"form-control","custom-select"],["value",""],[3,"value",4,"ngFor","ngForOf"],["class","form-text text-muted",4,"ngIf"],["for","squash",1,"cd-col-form-label"],"Squash",["name","squash","id","squash","formControlName","squash",1,"form-control","custom-select"],"This field is required.","Must contain one or more comma-separated values","For example:",[3,"value"]]},template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Sb(1,"label",1),i.Wb(2,2),i.Rb(),i.Sb(3,"div",3,4),i.Mc(5,Yf,3,0,"span",5),i.Qb(6,6),i.Mc(7,Bf,33,11,"div",7),i.Pb(),i.Sb(8,"div",8),i.Sb(9,"div",9),i.Sb(10,"div",10),i.Sb(11,"button",11),i.gc("click",(function(){return t.addClient()})),i.Nb(12,"i",12),i.Qb(13),i.Wb(14,13),i.Pb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb()),2&e&&(i.yb(3),i.pc("formGroup",t.form),i.yb(2),i.pc("ngIf",0===t.form.get("clients").value.length),i.yb(2),i.pc("ngForOf",t.form.get("clients").value)("ngForTrackBy",t.trackByFn),i.yb(5),i.pc("ngClass",i.uc(5,Uf,t.icons.add)))},directives:[Xn.a,xn.r,xn.k,Zn.a,o.r,xn.f,o.q,On.a,o.p,xn.l,Qt.D,xn.d,ei.a,xn.q,xn.i,xn.z,xn.u,xn.B],pipes:[Ff.a],styles:[""]}),e})();var Gf=n("wnGv");const Jf=["nfsClients"];function Qf(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,51),i.Rb())}function Kf(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,52),i.Rb())}function Zf(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,53),i.Rb())}function Xf(e,t){if(1&e&&(i.Sb(0,"option",54),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e.cluster_id),i.yb(1),i.Pc(e.cluster_id)}}function ep(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,56),i.Rb())}function tp(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",10),i.Sb(1,"label",47),i.Wb(2,48),i.Rb(),i.Sb(3,"div",13),i.Sb(4,"select",49),i.gc("change",(function(){return i.Dc(e),i.ic(2).onClusterChange()})),i.Mc(5,Qf,2,0,"option",15),i.Mc(6,Kf,2,0,"option",15),i.Mc(7,Zf,2,0,"option",15),i.Mc(8,Xf,2,2,"option",16),i.Rb(),i.Mc(9,ep,2,0,"span",17),i.Rb(),i.Rb()}if(2&e){i.ic();const e=i.Ac(2),t=i.ic();i.yb(5),i.pc("ngIf",null===t.allClusters),i.yb(1),i.pc("ngIf",null!==t.allClusters&&0===t.allClusters.length),i.yb(1),i.pc("ngIf",null!==t.allClusters&&t.allClusters.length>0),i.yb(1),i.pc("ngForOf",t.allClusters),i.yb(1),i.pc("ngIf",t.nfsForm.showError("cluster_id",e,"required"))}}const np=function(e){return[e]};function ip(e,t){if(1&e){const e=i.Tb();i.Sb(0,"span",64),i.Sb(1,"button",65),i.gc("click",(function(){i.Dc(e);const t=i.ic(),n=t.index,r=t.$implicit;return i.ic(3).removeDaemon(n,r)})),i.Nb(2,"i",66),i.Rb(),i.Rb()}if(2&e){const e=i.ic(4);i.yb(2),i.pc("ngClass",i.uc(1,np,e.icons.destroy))}}function rp(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"div",61),i.Nb(2,"input",62),i.Mc(3,ip,3,3,"span",63),i.Rb(),i.Pb()),2&e){const e=t.$implicit,n=i.ic(3);i.yb(2),i.pc("value",e),i.yb(1),i.pc("ngIf","user"===n.clusterType)}}function sp(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",67),i.Sb(1,"div",68),i.Sb(2,"cd-select",69),i.gc("selection",(function(){return i.Dc(e),i.ic(3).onDaemonSelection()})),i.Nb(3,"i",70),i.Qb(4),i.Wb(5,71),i.Pb(),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.ic(3);i.yb(2),i.pc("data",e.nfsForm.get("daemons").value)("options",e.daemonsSelections)("messages",e.daemonsMessages),i.yb(1),i.pc("ngClass",i.uc(4,np,e.icons.add))}}function op(e,t){1&e&&(i.Qb(0),i.Wb(1,75),i.Pb())}function ap(e,t){1&e&&(i.Qb(0),i.Wb(1,76),i.Pb())}function cp(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",67),i.Sb(1,"div",68),i.Sb(2,"button",72),i.gc("click",(function(){return i.Dc(e),i.ic(3).onToggleAllDaemonsSelection()})),i.Nb(3,"i",70),i.Mc(4,op,2,0,"ng-container",73),i.Mc(5,ap,2,0,"ng-template",null,74,i.Nc),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.Ac(6),t=i.ic(3);i.yb(3),i.pc("ngClass",i.uc(3,np,t.icons.add)),i.yb(1),i.pc("ngIf",0===t.nfsForm.getValue("daemons").length)("ngIfElse",e)}}function lp(e,t){if(1&e&&(i.Sb(0,"div",10),i.Sb(1,"label",57),i.Qb(2),i.Wb(3,58),i.Pb(),i.Rb(),i.Sb(4,"div",13),i.Mc(5,rp,4,2,"ng-container",59),i.Mc(6,sp,6,6,"div",60),i.Mc(7,cp,7,5,"div",60),i.Rb(),i.Rb()),2&e){const e=i.ic(2);i.yb(5),i.pc("ngForOf",e.nfsForm.getValue("daemons")),i.yb(1),i.pc("ngIf","user"===e.clusterType),i.yb(1),i.pc("ngIf","orchestrator"===e.clusterType)}}function up(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,77),i.Rb())}function dp(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,78),i.Rb())}function hp(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,79),i.Rb())}function fp(e,t){if(1&e&&(i.Sb(0,"option",54),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e.value),i.yb(1),i.Pc(e.descr)}}function pp(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,80),i.Rb())}function mp(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,84),i.Rb())}function bp(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,85),i.Rb())}function gp(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,86),i.Rb())}function _p(e,t){if(1&e&&(i.Sb(0,"option",54),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e),i.yb(1),i.Pc(e)}}function yp(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,87),i.Rb())}function vp(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",10),i.Sb(1,"label",81),i.Wb(2,82),i.Rb(),i.Sb(3,"div",13),i.Sb(4,"select",83),i.gc("change",(function(){return i.Dc(e),i.ic(2).rgwUserIdChangeHandler()})),i.Mc(5,mp,2,0,"option",15),i.Mc(6,bp,2,0,"option",15),i.Mc(7,gp,2,0,"option",15),i.Mc(8,_p,2,2,"option",16),i.Rb(),i.Mc(9,yp,2,0,"span",17),i.Rb(),i.Rb()}if(2&e){i.ic();const e=i.Ac(2),t=i.ic();i.yb(5),i.pc("ngIf",null===t.allRgwUsers),i.yb(1),i.pc("ngIf",null!==t.allRgwUsers&&0===t.allRgwUsers.length),i.yb(1),i.pc("ngIf",null!==t.allRgwUsers&&t.allRgwUsers.length>0),i.yb(1),i.pc("ngForOf",t.allRgwUsers),i.yb(1),i.pc("ngIf",t.nfsForm.showError("rgw_user_id",e,"required"))}}function wp(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,91),i.Rb())}function Sp(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,92),i.Rb())}function Mp(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,93),i.Rb())}function xp(e,t){if(1&e&&(i.Sb(0,"option",54),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e),i.yb(1),i.Pc(e)}}function kp(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,94),i.Rb())}function Dp(e,t){if(1&e&&(i.Sb(0,"div",10),i.Sb(1,"label",88),i.Wb(2,89),i.Rb(),i.Sb(3,"div",13),i.Sb(4,"select",90),i.Mc(5,wp,2,0,"option",15),i.Mc(6,Sp,2,0,"option",15),i.Mc(7,Mp,2,0,"option",15),i.Mc(8,xp,2,2,"option",16),i.Rb(),i.Mc(9,kp,2,0,"span",17),i.Rb(),i.Rb()),2&e){i.ic();const e=i.Ac(2),t=i.ic();i.yb(5),i.pc("ngIf",null===t.allCephxClients),i.yb(1),i.pc("ngIf",null!==t.allCephxClients&&0===t.allCephxClients.length),i.yb(1),i.pc("ngIf",null!==t.allCephxClients&&t.allCephxClients.length>0),i.yb(1),i.pc("ngForOf",t.allCephxClients),i.yb(1),i.pc("ngIf",t.nfsForm.showError("user_id",e,"required"))}}function Tp(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,98),i.Rb())}function Cp(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,99),i.Rb())}function Op(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,100),i.Rb())}function Lp(e,t){if(1&e&&(i.Sb(0,"option",54),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e.name),i.yb(1),i.Pc(e.name)}}function Rp(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,101),i.Rb())}function Ep(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",10),i.Sb(1,"label",95),i.Wb(2,96),i.Rb(),i.Sb(3,"div",13),i.Sb(4,"select",97),i.gc("change",(function(){return i.Dc(e),i.ic(2).rgwUserIdChangeHandler()})),i.Mc(5,Tp,2,0,"option",15),i.Mc(6,Cp,2,0,"option",15),i.Mc(7,Op,2,0,"option",15),i.Mc(8,Lp,2,2,"option",16),i.Rb(),i.Mc(9,Rp,2,0,"span",17),i.Rb(),i.Rb()}if(2&e){i.ic();const e=i.Ac(2),t=i.ic();i.yb(5),i.pc("ngIf",null===t.allFsNames),i.yb(1),i.pc("ngIf",null!==t.allFsNames&&0===t.allFsNames.length),i.yb(1),i.pc("ngIf",null!==t.allFsNames&&t.allFsNames.length>0),i.yb(1),i.pc("ngForOf",t.allFsNames),i.yb(1),i.pc("ngIf",t.nfsForm.showError("fs_name",e,"required"))}}function Ap(e,t){1&e&&i.Nb(0,"input",108)}function Ip(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,109),i.Rb())}const Pp=function(e){return{required:e}};function jp(e,t){if(1&e&&(i.Sb(0,"div",10),i.Sb(1,"label",102),i.Wb(2,103),i.Rb(),i.Sb(3,"div",13),i.Sb(4,"div",20),i.Nb(5,"input",104),i.Sb(6,"label",105),i.Wb(7,106),i.Rb(),i.Rb(),i.Nb(8,"br"),i.Mc(9,Ap,1,0,"input",107),i.Mc(10,Ip,2,0,"span",17),i.Rb(),i.Rb()),2&e){i.ic();const e=i.Ac(2),t=i.ic();i.yb(1),i.pc("ngClass",i.uc(3,Pp,t.nfsForm.getValue("security_label"))),i.yb(8),i.pc("ngIf",t.nfsForm.getValue("security_label")),i.yb(1),i.pc("ngIf",t.nfsForm.showError("sec_label_xattr",e,"required"))}}function Np(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,113),i.Rb())}function Fp(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,114),i.Rb())}function Yp(e,t){1&e&&(i.Sb(0,"span",115),i.Wb(1,116),i.Rb())}function zp(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",10),i.Sb(1,"label",110),i.Wb(2,111),i.Rb(),i.Sb(3,"div",13),i.Sb(4,"input",112),i.gc("selectItem",(function(){return i.Dc(e),i.ic(2).pathChangeHandler()}))("blur",(function(){return i.Dc(e),i.ic(2).pathChangeHandler()})),i.Rb(),i.Mc(5,Np,2,0,"span",17),i.Mc(6,Fp,2,0,"span",17),i.Mc(7,Yp,2,0,"span",30),i.Rb(),i.Rb()}if(2&e){i.ic();const e=i.Ac(2),t=i.ic();i.yb(4),i.pc("ngbTypeahead",t.pathDataSource),i.yb(1),i.pc("ngIf",t.nfsForm.showError("path",e,"required")),i.yb(1),i.pc("ngIf",t.nfsForm.showError("path",e,"pattern")),i.yb(1),i.pc("ngIf",t.isNewDirectory&&!t.nfsForm.showError("path",e))}}function $p(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,118),i.Rb())}function Hp(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,119),i.Rb())}function Wp(e,t){1&e&&(i.Sb(0,"span",115),i.Wb(1,120),i.Rb())}function Vp(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",10),i.Sb(1,"label",110),i.Wb(2,117),i.Rb(),i.Sb(3,"div",13),i.Sb(4,"input",112),i.gc("selectItem",(function(){return i.Dc(e),i.ic(2).bucketChangeHandler()}))("blur",(function(){return i.Dc(e),i.ic(2).bucketChangeHandler()})),i.Rb(),i.Mc(5,$p,2,0,"span",17),i.Mc(6,Hp,2,0,"span",17),i.Mc(7,Wp,2,0,"span",30),i.Rb(),i.Rb()}if(2&e){i.ic();const e=i.Ac(2),t=i.ic();i.yb(4),i.pc("ngbTypeahead",t.bucketDataSource),i.yb(1),i.pc("ngIf",t.nfsForm.showError("path",e,"required")),i.yb(1),i.pc("ngIf",t.nfsForm.showError("path",e,"pattern")),i.yb(1),i.pc("ngIf",t.isNewBucket&&!t.nfsForm.showError("path",e))}}function Bp(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,121),i.Rb())}function Up(e,t){1&e&&(i.Sb(0,"div",10),i.Sb(1,"label",122),i.Qb(2),i.Wb(3,123),i.Pb(),i.Sb(4,"cd-helper"),i.Sb(5,"p"),i.cc(6,124),i.Nb(7,"strong"),i.Zb(),i.Rb(),i.Sb(8,"p"),i.Wb(9,125),i.Rb(),i.Sb(10,"p"),i.Wb(11,126),i.Rb(),i.Rb(),i.Rb(),i.Sb(12,"div",13),i.Nb(13,"input",127),i.Rb(),i.Rb())}function qp(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,134),i.Rb())}function Gp(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,135),i.Rb())}function Jp(e,t){if(1&e&&(i.Sb(0,"div",10),i.Sb(1,"label",128),i.Sb(2,"span",129),i.Wb(3,130),i.Rb(),i.Sb(4,"cd-helper"),i.Sb(5,"p"),i.cc(6,131),i.Nb(7,"strong"),i.Nb(8,"strong"),i.Zb(),i.Rb(),i.Sb(9,"p"),i.Wb(10,132),i.Rb(),i.Rb(),i.Rb(),i.Sb(11,"div",13),i.Nb(12,"input",133),i.Mc(13,qp,2,0,"span",17),i.Mc(14,Gp,2,0,"span",17),i.Rb(),i.Rb()),2&e){i.ic();const e=i.Ac(2),t=i.ic();i.yb(13),i.pc("ngIf",t.nfsForm.showError("pseudo",e,"required")),i.yb(1),i.pc("ngIf",t.nfsForm.showError("pseudo",e,"pattern"))}}function Qp(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,136),i.Rb())}function Kp(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,137),i.Rb())}function Zp(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,138),i.Rb())}function Xp(e,t){if(1&e&&(i.Sb(0,"option",54),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e.value),i.yb(1),i.Pc(e.value)}}function em(e,t){if(1&e&&(i.Sb(0,"span",115),i.Oc(1),i.Rb()),2&e){const e=i.ic(2);i.yb(1),i.Qc(" ",e.getAccessTypeHelp(e.nfsForm.getValue("access_type"))," ")}}function tm(e,t){1&e&&(i.Sb(0,"span",139),i.cc(1,140),i.Nb(2,"cd-doc",141),i.Zb(),i.Rb())}function nm(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,142),i.Rb())}function im(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,143),i.Rb())}function rm(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,144),i.Rb())}function sm(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,145),i.Rb())}function om(e,t){if(1&e&&(i.Sb(0,"option",54),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e),i.yb(1),i.Pc(e)}}function am(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,146),i.Rb())}function cm(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,147),i.Rb())}function lm(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",1),i.Sb(1,"form",2,3),i.Sb(3,"div",4),i.Sb(4,"div",5),i.Wb(5,6),i.jc(6,"titlecase"),i.jc(7,"upperFirst"),i.Rb(),i.Sb(8,"div",7),i.Mc(9,tp,10,5,"div",8),i.Mc(10,lp,8,3,"div",8),i.Sb(11,"div",9),i.Sb(12,"div",10),i.Sb(13,"label",11),i.Wb(14,12),i.Rb(),i.Sb(15,"div",13),i.Sb(16,"select",14),i.gc("change",(function(){return i.Dc(e),i.ic().fsalChangeHandler()})),i.Mc(17,up,2,0,"option",15),i.Mc(18,dp,2,0,"option",15),i.Mc(19,hp,2,0,"option",15),i.Mc(20,fp,2,2,"option",16),i.Rb(),i.Mc(21,pp,2,0,"span",17),i.Rb(),i.Rb(),i.Mc(22,vp,10,5,"div",8),i.Mc(23,Dp,10,5,"div",8),i.Mc(24,Ep,10,5,"div",8),i.Rb(),i.Mc(25,jp,11,5,"div",8),i.Mc(26,zp,8,4,"div",8),i.Mc(27,Vp,8,4,"div",8),i.Sb(28,"div",10),i.Sb(29,"label",18),i.Wb(30,19),i.Rb(),i.Sb(31,"div",13),i.Sb(32,"div",20),i.Nb(33,"input",21),i.Sb(34,"label",22),i.Wb(35,23),i.Rb(),i.Rb(),i.Sb(36,"div",20),i.Nb(37,"input",24),i.Sb(38,"label",25),i.Wb(39,26),i.Rb(),i.Rb(),i.Mc(40,Bp,2,0,"span",17),i.Rb(),i.Rb(),i.Mc(41,Up,14,0,"div",8),i.Mc(42,Jp,15,2,"div",8),i.Sb(43,"div",10),i.Sb(44,"label",27),i.Wb(45,28),i.Rb(),i.Sb(46,"div",13),i.Sb(47,"select",29),i.gc("change",(function(){return i.Dc(e),i.ic().accessTypeChangeHandler()})),i.Mc(48,Qp,2,0,"option",15),i.Mc(49,Kp,2,0,"option",15),i.Mc(50,Zp,2,0,"option",15),i.Mc(51,Xp,2,2,"option",16),i.Rb(),i.Mc(52,em,2,1,"span",30),i.Mc(53,tm,3,0,"span",31),i.Mc(54,nm,2,0,"span",17),i.Rb(),i.Rb(),i.Sb(55,"div",10),i.Sb(56,"label",32),i.Wb(57,33),i.Rb(),i.Sb(58,"div",13),i.Sb(59,"select",34),i.Mc(60,im,2,0,"option",15),i.Mc(61,rm,2,0,"option",15),i.Mc(62,sm,2,0,"option",15),i.Mc(63,om,2,2,"option",16),i.Rb(),i.Mc(64,am,2,0,"span",17),i.Rb(),i.Rb(),i.Sb(65,"div",10),i.Sb(66,"label",35),i.Wb(67,36),i.Rb(),i.Sb(68,"div",13),i.Sb(69,"div",20),i.Nb(70,"input",37),i.Sb(71,"label",38),i.Wb(72,39),i.Rb(),i.Rb(),i.Sb(73,"div",20),i.Nb(74,"input",40),i.Sb(75,"label",41),i.Wb(76,42),i.Rb(),i.Rb(),i.Mc(77,cm,2,0,"span",17),i.Nb(78,"hr"),i.Rb(),i.Rb(),i.Nb(79,"cd-nfs-form-client",43,44),i.Rb(),i.Sb(81,"div",45),i.Sb(82,"cd-form-button-panel",46),i.gc("submitActionEvent",(function(){return i.Dc(e),i.ic().submitAction()})),i.jc(83,"titlecase"),i.jc(84,"upperFirst"),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.Ac(2),t=i.ic();i.yb(1),i.pc("formGroup",t.nfsForm),i.yb(6),i.ac(i.kc(6,36,t.action))(i.kc(7,38,t.resource)),i.Xb(5),i.yb(2),i.pc("ngIf",!t.isDefaultCluster),i.yb(1),i.pc("ngIf",t.clusterType),i.yb(7),i.pc("ngIf",null===t.allFsals),i.yb(1),i.pc("ngIf",null!==t.allFsals&&0===t.allFsals.length),i.yb(1),i.pc("ngIf",null!==t.allFsals&&t.allFsals.length>0),i.yb(1),i.pc("ngForOf",t.allFsals),i.yb(1),i.pc("ngIf",t.nfsForm.showError("name",e,"required")),i.yb(1),i.pc("ngIf","RGW"===t.nfsForm.getValue("name")),i.yb(1),i.pc("ngIf","CEPH"===t.nfsForm.getValue("name")),i.yb(1),i.pc("ngIf","CEPH"===t.nfsForm.getValue("name")),i.yb(1),i.pc("ngIf","CEPH"===t.nfsForm.getValue("name")),i.yb(1),i.pc("ngIf","CEPH"===t.nfsForm.getValue("name")),i.yb(1),i.pc("ngIf","RGW"===t.nfsForm.getValue("name")),i.yb(13),i.pc("ngIf",t.nfsForm.showError("protocolNfsv3",e,"required")||t.nfsForm.showError("protocolNfsv4",e,"required")),i.yb(1),i.pc("ngIf",t.nfsForm.getValue("protocolNfsv3")),i.yb(1),i.pc("ngIf",t.nfsForm.getValue("protocolNfsv4")),i.yb(6),i.pc("ngIf",null===t.nfsAccessType),i.yb(1),i.pc("ngIf",null!==t.nfsAccessType&&0===t.nfsAccessType.length),i.yb(1),i.pc("ngIf",null!==t.nfsAccessType&&t.nfsAccessType.length>0),i.yb(1),i.pc("ngForOf",t.nfsAccessType),i.yb(1),i.pc("ngIf",t.nfsForm.getValue("access_type")),i.yb(1),i.pc("ngIf","RW"===t.nfsForm.getValue("access_type")&&"RGW"===t.nfsForm.getValue("name")),i.yb(1),i.pc("ngIf",t.nfsForm.showError("access_type",e,"required")),i.yb(6),i.pc("ngIf",null===t.nfsSquash),i.yb(1),i.pc("ngIf",null!==t.nfsSquash&&0===t.nfsSquash.length),i.yb(1),i.pc("ngIf",null!==t.nfsSquash&&t.nfsSquash.length>0),i.yb(1),i.pc("ngForOf",t.nfsSquash),i.yb(1),i.pc("ngIf",t.nfsForm.showError("squash",e,"required")),i.yb(13),i.pc("ngIf",t.nfsForm.showError("transportUDP",e,"required")||t.nfsForm.showError("transportTCP",e,"required")),i.yb(2),i.pc("form",t.nfsForm)("clients",t.clients),i.yb(3),i.pc("form",t.nfsForm)("submitText",i.kc(83,40,t.action)+" "+i.kc(84,42,t.resource))}}let um=(()=>{class e extends Gn.a{constructor(e,t,n,i,r,s,o,a,c){super(),this.authStorageService=e,this.nfsService=t,this.route=n,this.router=i,this.rgwUserService=r,this.formBuilder=s,this.taskWrapper=o,this.cdRef=a,this.actionLabels=c,this.clients=[],this.isEdit=!1,this.cluster_id=null,this.clusterType=null,this.export_id=null,this.isNewDirectory=!1,this.isNewBucket=!1,this.isDefaultCluster=!1,this.allClusters=null,this.allDaemons={},this.icons=_n.a,this.allFsals=[],this.allRgwUsers=[],this.allCephxClients=null,this.allFsNames=null,this.defaultAccessType={RGW:"RO"},this.nfsAccessType=this.nfsService.nfsAccessType,this.nfsSquash=this.nfsService.nfsSquash,this.daemonsSelections=[],this.daemonsMessages=new er.a({noOptions:"There are no daemons available."}),this.pathDataSource=e=>e.pipe(au(200),Object(du.a)(),Object(Ki.a)(e=>this.getPathTypeahead(e)),Object(Vi.a)(e=>e.paths)),this.bucketDataSource=e=>e.pipe(au(200),Object(du.a)(),Object(Ki.a)(e=>this.getBucketTypeahead(e))),this.permission=this.authStorageService.getPermissions().pool,this.resource="NFS export",this.createForm()}ngOnInit(){const e=[this.nfsService.daemon(),this.nfsService.fsals(),this.nfsService.clients(),this.nfsService.filesystems()];this.router.url.startsWith("/nfs/edit")&&(this.isEdit=!0),this.isEdit?(this.action=this.actionLabels.EDIT,this.route.params.subscribe(t=>{this.cluster_id=decodeURIComponent(t.cluster_id),this.export_id=decodeURIComponent(t.export_id),e.push(this.nfsService.get(this.cluster_id,this.export_id)),this.getData(e)}),this.nfsForm.get("cluster_id").disable()):(this.action=this.actionLabels.CREATE,this.getData(e))}getData(e){Object(jo.a)(e).subscribe(e=>{this.resolveDaemons(e[0]),this.resolveFsals(e[1]),this.resolveClients(e[2]),this.resolveFilesystems(e[3]),e[4]&&this.resolveModel(e[4]),this.loadingReady()})}createForm(){this.nfsForm=new Jn.a({cluster_id:new xn.h("",{validators:[xn.A.required]}),daemons:new xn.h([]),fsal:new Jn.a({name:new xn.h("",{validators:[xn.A.required]}),user_id:new xn.h("",{validators:[Cn.a.requiredIf({name:"CEPH"})]}),fs_name:new xn.h("",{validators:[Cn.a.requiredIf({name:"CEPH"})]}),rgw_user_id:new xn.h("",{validators:[Cn.a.requiredIf({name:"RGW"})]})}),path:new xn.h(""),protocolNfsv3:new xn.h(!1,{validators:[Cn.a.requiredIf({protocolNfsv4:!1},e=>!e)]}),protocolNfsv4:new xn.h(!0,{validators:[Cn.a.requiredIf({protocolNfsv3:!1},e=>!e)]}),tag:new xn.h(""),pseudo:new xn.h("",{validators:[Cn.a.requiredIf({protocolNfsv4:!0}),xn.A.pattern("^/[^><|&()]*$")]}),access_type:new xn.h("RW",{validators:[xn.A.required]}),squash:new xn.h("",{validators:[xn.A.required]}),transportUDP:new xn.h(!0,{validators:[Cn.a.requiredIf({transportTCP:!1},e=>!e)]}),transportTCP:new xn.h(!0,{validators:[Cn.a.requiredIf({transportUDP:!1},e=>!e)]}),clients:this.formBuilder.array([]),security_label:new xn.h(!1),sec_label_xattr:new xn.h("security.selinux",Cn.a.requiredIf({security_label:!0,"fsal.name":"CEPH"}))})}resolveModel(e){"CEPH"===e.fsal.name&&(e.sec_label_xattr=e.fsal.sec_label_xattr),this.clusterType===Nf.user&&(this.daemonsSelections=Nt.a.map(this.allDaemons[e.cluster_id],t=>new qu.a(-1!==e.daemons.indexOf(t),t,"")),this.daemonsSelections=[...this.daemonsSelections]),e.protocolNfsv3=-1!==e.protocols.indexOf(3),e.protocolNfsv4=-1!==e.protocols.indexOf(4),delete e.protocols,e.transportTCP=-1!==e.transports.indexOf("TCP"),e.transportUDP=-1!==e.transports.indexOf("UDP"),delete e.transports,e.clients.forEach(e=>{let t="";e.addresses.forEach(e=>{t+=e+", "}),t.length>=2&&(t=t.substring(0,t.length-2)),e.addresses=t}),this.nfsForm.patchValue(e),this.setPathValidation(),this.clients=e.clients}resolveDaemons(e){var t;e=Nt.a.sortBy(e,["daemon_id"]);const n=Nt.a.groupBy(e,"cluster_id");this.allClusters=[],Nt.a.forIn(n,(e,t)=>{this.allClusters.push({cluster_id:t,cluster_type:e[0].cluster_type}),this.allDaemons[t]=[]}),Nt.a.forEach(e,e=>{this.allDaemons[e.cluster_id].push(e.daemon_id)}),this.isEdit&&(this.clusterType=null===(t=Nt.a.find(this.allClusters,{cluster_id:this.cluster_id}))||void 0===t?void 0:t.cluster_type);const i=Nt.a.isArray(this.allClusters)&&1===this.allClusters.length;this.isDefaultCluster=i&&"_default_"===this.allClusters[0].cluster_id,i&&(this.nfsForm.patchValue({cluster_id:this.allClusters[0].cluster_id}),this.onClusterChange())}resolveFsals(e){e.forEach(e=>{const t=this.nfsService.nfsFsal.find(t=>e===t.value);Nt.a.isObjectLike(t)&&(this.allFsals.push(t),"RGW"===t.value&&this.rgwUserService.list().subscribe(e=>{e.forEach(e=>{0===e.suspended&&e.keys.length>0&&this.allRgwUsers.push(e.tenant?`${e.tenant}$${e.user_id}`:e.user_id)})}))}),1===this.allFsals.length&&Nt.a.isUndefined(this.nfsForm.getValue("fsal"))&&this.nfsForm.patchValue({fsal:this.allFsals[0]})}resolveClients(e){this.allCephxClients=e}resolveFilesystems(e){this.allFsNames=e,1===e.length&&this.nfsForm.patchValue({fsal:{fs_name:e[0].name}})}fsalChangeHandler(){this.nfsForm.patchValue({tag:this._generateTag(),pseudo:this._generatePseudo(),access_type:this._updateAccessType()}),this.setPathValidation(),this.cdRef.detectChanges()}accessTypeChangeHandler(){const e=this.nfsForm.getValue("name"),t=this.nfsForm.getValue("access_type");this.defaultAccessType[e]=t}setPathValidation(){"RGW"===this.nfsForm.getValue("name")?this.nfsForm.get("path").setValidators([xn.A.required,xn.A.pattern("^(/|[^/><|&()#?]+)$")]):this.nfsForm.get("path").setValidators([xn.A.required,xn.A.pattern("^/[^><|&()?]*$")])}rgwUserIdChangeHandler(){this.nfsForm.patchValue({pseudo:this._generatePseudo()})}getAccessTypeHelp(e){const t=this.nfsAccessType.find(t=>{if(e===t.value)return t});return Nt.a.isObjectLike(t)?t.help:""}getId(){return Nt.a.isString(this.nfsForm.getValue("cluster_id"))&&Nt.a.isString(this.nfsForm.getValue("path"))?this.nfsForm.getValue("cluster_id")+":"+this.nfsForm.getValue("path"):""}getPathTypeahead(e){if(!Nt.a.isString(e)||"/"===e)return Object(Wi.a)([]);const t=this.nfsForm.getValue("fsal").fs_name;return this.nfsService.lsDir(t,e)}pathChangeHandler(){this.nfsForm.patchValue({pseudo:this._generatePseudo()});const e=this.nfsForm.getValue("path");this.getPathTypeahead(e).subscribe(t=>{this.isNewDirectory="/"!==e&&-1===t.paths.indexOf(e)})}bucketChangeHandler(){this.nfsForm.patchValue({tag:this._generateTag(),pseudo:this._generatePseudo()});const e=this.nfsForm.getValue("path");this.getBucketTypeahead(e).subscribe(t=>{this.isNewBucket=""!==e&&-1===t.indexOf(e)})}getBucketTypeahead(e){const t=this.nfsForm.getValue("rgw_user_id");return Nt.a.isString(t)&&Nt.a.isString(e)&&"/"!==e&&""!==e?this.nfsService.buckets(t):Object(Wi.a)([])}_generateTag(){let e=this.nfsForm.getValue("tag");return this.nfsForm.get("tag").dirty||(e=void 0,"RGW"===this.nfsForm.getValue("fsal")&&(e=this.nfsForm.getValue("path"))),e}_generatePseudo(){let e=this.nfsForm.getValue("pseudo");return this.nfsForm.get("pseudo")&&!this.nfsForm.get("pseudo").dirty&&(e=void 0,"CEPH"===this.nfsForm.getValue("fsal")?(e="/cephfs",Nt.a.isString(this.nfsForm.getValue("path"))&&(e+=this.nfsForm.getValue("path"))):"RGW"===this.nfsForm.getValue("fsal")&&Nt.a.isString(this.nfsForm.getValue("rgw_user_id"))&&(e="/"+this.nfsForm.getValue("rgw_user_id"),Nt.a.isString(this.nfsForm.getValue("path"))&&(e+="/"+this.nfsForm.getValue("path")))),e}_updateAccessType(){const e=this.nfsForm.getValue("name");let t=this.defaultAccessType[e];return t||(t="RW"),t}onClusterChange(){var e;const t=this.nfsForm.getValue("cluster_id");this.clusterType=null===(e=Nt.a.find(this.allClusters,{cluster_id:t}))||void 0===e?void 0:e.cluster_type,this.clusterType===Nf.user?(this.daemonsSelections=Nt.a.map(this.allDaemons[t],e=>new qu.a(!1,e,"")),this.daemonsSelections=[...this.daemonsSelections]):this.daemonsSelections=[],this.nfsForm.patchValue({daemons:[]})}removeDaemon(e,t){this.daemonsSelections.forEach(e=>{e.name===t&&(e.selected=!1)});const n=this.nfsForm.get("daemons");return n.value.splice(e,1),n.setValue(n.value),!1}onDaemonSelection(){this.nfsForm.get("daemons").setValue(this.nfsForm.getValue("daemons"))}onToggleAllDaemonsSelection(){const e=this.nfsForm.getValue("cluster_id"),t=0===this.nfsForm.getValue("daemons").length?this.allDaemons[e]:[];this.nfsForm.patchValue({daemons:t})}submitAction(){let e;const t=this._buildRequest();e=this.taskWrapper.wrapTaskAroundCall(this.isEdit?{task:new tr.a("nfs/edit",{cluster_id:this.cluster_id,export_id:this.export_id}),call:this.nfsService.update(this.cluster_id,this.export_id,t)}:{task:new tr.a("nfs/create",{path:t.path,fsal:t.fsal,cluster_id:t.cluster_id}),call:this.nfsService.create(t)}),e.subscribe({error:()=>this.nfsForm.setErrors({cdSubmitButton:!0}),complete:()=>this.router.navigate(["/nfs"])})}_buildRequest(){const e=Nt.a.cloneDeep(this.nfsForm.value);return(Nt.a.isUndefined(e.tag)||""===e.tag)&&(e.tag=null),this.isEdit&&(e.export_id=this.export_id),"CEPH"===e.fsal.name?delete e.fsal.rgw_user_id:(delete e.fsal.fs_name,delete e.fsal.user_id),e.protocols=[],e.protocolNfsv3?e.protocols.push(3):e.tag=null,delete e.protocolNfsv3,e.protocolNfsv4?e.protocols.push(4):e.pseudo=null,delete e.protocolNfsv4,e.transports=[],e.transportTCP&&e.transports.push("TCP"),delete e.transportTCP,e.transportUDP&&e.transports.push("UDP"),delete e.transportUDP,e.clients.forEach(t=>{t.addresses=Nt.a.isString(t.addresses)?Nt()(t.addresses).split(/[ ,]+/).uniq().filter(e=>""!==e).value():[],t.squash||(t.squash=e.squash),t.access_type||(t.access_type=e.access_type)}),e.fsal.sec_label_xattr=!1===e.security_label||"RGW"===e.fsal.name?null:e.sec_label_xattr,delete e.sec_label_xattr,e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Jt.a),i.Mb(Pf),i.Mb(Pt.a),i.Mb(Pt.e),i.Mb(jf.a),i.Mb(Fo.a),i.Mb(nr.a),i.Mb(i.h),i.Mb(gn.b))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-nfs-form"]],viewQuery:function(e,t){var n;1&e&&i.Jc(Jf,!0),2&e&&i.zc(n=i.hc())&&(t.nfsClients=n.first)},features:[i.vb],decls:1,vars:1,consts:function(){var e,t,n,r,s,o,a,c,l,u,d,h,f,p,m,b,g,_,y,v,w,S,M,x,k,D,T,C,O,L,R,E,A,I,P,j,N,F,Y,z,$,H,W,V,B,U,q,G,J,Q,K,Z,X,ee,te,ne;return e="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",t="Storage Backend",n="NFS Protocol",r="NFSv3",s="NFSv4",o="Access Type",a="Squash",c="Transport Protocol",l="UDP",u="TCP",d="Cluster",h="Loading...",f="-- No cluster available --",p="-- Select the cluster --",m="This field is required.",b="Daemons",g="Add daemon",_="Add all daemons",y="Remove all daemons",v="Loading...",w="-- No data pools available --",S="-- Select the storage backend --",M="This field is required.",x="Object Gateway User",k="Loading...",D="-- No users available --",T="-- Select the object gateway user --",C="This field is required.",O="CephFS User ID",L="Loading...",R="-- No clients available --",E="-- Select the cephx client --",A="This field is required.",I="CephFS Name",P="Loading...",j="-- No CephFS filesystem available --",N="-- Select the CephFS filesystem --",F="This field is required.",Y="Security Label",z="Enable security label",$="This field is required.",H="CephFS Path",W="This field is required.",V="Path need to start with a '/' and can be followed by a word",B="New directory will be created",U="Path",q="This field is required.",G="Path can only be a single '/' or a word",J="New bucket will be created",Q="This field is required.",K="NFS Tag",Z="Alternative access for " + "\ufffd#7\ufffd" + "NFS v3" + "\ufffd/#7\ufffd" + " mounts (it must not have a leading /).",X="Clients may not mount subdirectories (i.e. if Tag = foo, the client may not mount foo/baz).",ee="By using different Tag options, the same Path may be exported multiple times.",te="Pseudo",ne="The position that this " + "[\ufffd#7\ufffd|\ufffd#8\ufffd]" + "NFS v4" + "[\ufffd/#7\ufffd|\ufffd/#8\ufffd]" + " export occupies in the " + "[\ufffd#7\ufffd|\ufffd#8\ufffd]" + "Pseudo FS" + "[\ufffd/#7\ufffd|\ufffd/#8\ufffd]" + " (it must be unique).",[["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],["name","nfsForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"card"],[1,"card-header"],e,[1,"card-body"],["class","form-group row",4,"ngIf"],["formGroupName","fsal"],[1,"form-group","row"],["for","name",1,"cd-col-form-label","required"],t,[1,"cd-col-form-input"],["formControlName","name","name","name","id","name",1,"form-control","custom-select",3,"change"],["value","",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],["class","invalid-feedback",4,"ngIf"],["for","protocols",1,"cd-col-form-label","required"],n,[1,"custom-control","custom-checkbox"],["type","checkbox","id","protocolNfsv3","name","protocolNfsv3","formControlName","protocolNfsv3","disabled","",1,"custom-control-input"],["for","protocolNfsv3",1,"custom-control-label"],r,["type","checkbox","formControlName","protocolNfsv4","name","protocolNfsv4","id","protocolNfsv4",1,"custom-control-input"],["for","protocolNfsv4",1,"custom-control-label"],s,["for","access_type",1,"cd-col-form-label","required"],o,["formControlName","access_type","name","access_type","id","access_type",1,"form-control","custom-select",3,"change"],["class","form-text text-muted",4,"ngIf"],["class","form-text text-warning",4,"ngIf"],["for","squash",1,"cd-col-form-label","required"],a,["name","squash","formControlName","squash","id","squash",1,"form-control","custom-select"],["for","transports",1,"cd-col-form-label","required"],c,["type","checkbox","formControlName","transportUDP","name","transportUDP","id","transportUDP",1,"custom-control-input"],["for","transportUDP",1,"custom-control-label"],l,["type","checkbox","formControlName","transportTCP","name","transportTCP","id","transportTCP",1,"custom-control-input"],["for","transportTCP",1,"custom-control-label"],u,[3,"form","clients"],["nfsClients",""],[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],["for","cluster_id",1,"cd-col-form-label","required"],d,["formControlName","cluster_id","name","cluster_id","id","cluster_id",1,"form-control","custom-select",3,"change"],["value",""],h,f,p,[3,"value"],[1,"invalid-feedback"],m,["for","daemons",1,"cd-col-form-label"],b,[4,"ngFor","ngForOf"],["class","row",4,"ngIf"],[1,"input-group","cd-mb"],["type","text","disabled","",1,"cd-form-control",3,"value"],["class","input-group-append",4,"ngIf"],[1,"input-group-append"],["type","button",1,"btn","btn-light",3,"click"],["aria-hidden","true",3,"ngClass"],[1,"row"],[1,"col-md-12"],["elemClass","btn btn-light float-right",3,"data","options","messages","selection"],[3,"ngClass"],g,["type","button",1,"btn","btn-light","float-right",3,"click"],[4,"ngIf","ngIfElse"],["hasDaemons",""],_,y,v,w,S,M,["for","rgw_user_id",1,"cd-col-form-label","required"],x,["formControlName","rgw_user_id","name","rgw_user_id","id","rgw_user_id",1,"form-control","custom-select",3,"change"],k,D,T,C,["for","user_id",1,"cd-col-form-label","required"],O,["formControlName","user_id","name","user_id","id","user_id",1,"form-control","custom-select"],L,R,E,A,["for","fs_name",1,"cd-col-form-label","required"],I,["formControlName","fs_name","name","fs_name","id","fs_name",1,"form-control","custom-select",3,"change"],P,j,N,F,["for","security_label",1,"cd-col-form-label",3,"ngClass"],Y,["type","checkbox","formControlName","security_label","name","security_label","id","security_label",1,"custom-control-input"],["for","security_label",1,"custom-control-label"],z,["type","text","class","form-control","name","sec_label_xattr","id","sec_label_xattr","formControlName","sec_label_xattr",4,"ngIf"],["type","text","name","sec_label_xattr","id","sec_label_xattr","formControlName","sec_label_xattr",1,"form-control"],$,["for","path",1,"cd-col-form-label","required"],H,["type","text","name","path","id","path","formControlName","path",1,"form-control",3,"ngbTypeahead","selectItem","blur"],W,V,[1,"form-text","text-muted"],B,U,q,G,J,Q,["for","tag",1,"cd-col-form-label"],K,Z,X,ee,["type","text","name","tag","id","tag","formControlName","tag",1,"form-control"],["for","pseudo",1,"cd-col-form-label"],[1,"required"],te,ne=i.bc(ne),"By using different Pseudo options, the same Path may be exported multiple times.",["type","text","name","pseudo","id","pseudo","formControlName","pseudo",1,"form-control"],"This field is required.","Pseudo needs to start with a '/' and can't contain any of the following: >, <, |, &, ( or ).","Loading...","-- No access type available --","-- Select the access type --",[1,"form-text","text-warning"],"The Object Gateway NFS backend has a number of limitations which will seriously affect applications writing to the share. Please consult the " + "\ufffd#2\ufffd" + "" + "\ufffd/#2\ufffd" + " for details before enabling write access.",["section","rgw-nfs"],"This field is required.","Loading...","-- No squash available --","--Select what kind of user id squashing is performed --","This field is required.","This field is required."]},template:function(e,t){1&e&&i.Mc(0,lm,85,44,"div",0),2&e&&i.pc("cdFormLoading",t.loading)},directives:[Kn.a,xn.C,xn.r,xn.k,Zn.a,o.r,xn.l,Xn.a,On.a,xn.z,ei.a,xn.q,xn.i,o.q,xn.b,qf,ti.a,xn.u,xn.B,o.p,Gf.a,xn.d,Qt.G,Yo.a,Lr.a],pipes:[o.A,sr.a],styles:[".cd-mb[_ngcontent-%COMP%]{margin-bottom:10px}"]}),e})();var dm=n("VTlA");function hm(e,t){if(1&e&&i.Nb(0,"cd-table-key-value",10),2&e){const e=i.ic(2);i.pc("data",e.data)}}function fm(e,t){if(1&e&&i.Nb(0,"cd-table",11,12),2&e){const e=i.ic(2);i.pc("data",e.clients)("columns",e.clientsColumns)}}function pm(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"ul",1,2),i.Sb(3,"li",3),i.Sb(4,"a",4),i.Wb(5,5),i.Rb(),i.Mc(6,hm,1,1,"ng-template",6),i.Rb(),i.Sb(7,"li",7),i.Sb(8,"a",4),i.Wb(9,8),i.Rb(),i.Mc(10,fm,2,2,"ng-template",6),i.Rb(),i.Rb(),i.Nb(11,"div",9),i.Pb()),2&e){const e=i.Ac(2),t=i.ic();i.yb(9),i.ac(t.clients.length),i.Xb(9),i.yb(2),i.pc("ngbNavOutlet",e)}}let mm=(()=>{class e{constructor(){this.clients=[],this.clientsColumns=[{name:"Addresses",prop:"addresses",flexGrow:2},{name:"Access Type",prop:"access_type",flexGrow:1},{name:"Squash",prop:"squash",flexGrow:1}]}ngOnChanges(){this.selection&&(this.selectedItem=this.selection,this.clients=this.selectedItem.clients,this.data={},this.data["Cluster"]=this.selectedItem.cluster_id,this.data["Daemons"]=this.selectedItem.daemons,this.data["NFS Protocol"]=this.selectedItem.protocols.map(e=>"NFSv"+e),this.data["Pseudo"]=this.selectedItem.pseudo,this.data["Access Type"]=this.selectedItem.access_type,this.data["Squash"]=this.selectedItem.squash,this.data["Transport"]=this.selectedItem.transports,this.data["Path"]=this.selectedItem.path,"CEPH"===this.selectedItem.fsal.name?(this.data["Storage Backend"]="CephFS",this.data["CephFS User"]=this.selectedItem.fsal.user_id,this.data["CephFS Filesystem"]=this.selectedItem.fsal.fs_name,this.data["Security Label"]=this.selectedItem.fsal.sec_label_xattr):(this.data["Storage Backend"]="Object Gateway",this.data["Object Gateway User"]=this.selectedItem.fsal.rgw_user_id))}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-nfs-details"]],inputs:{selection:"selection"},features:[i.wb],decls:1,vars:1,consts:function(){return[[4,"ngIf"],["ngbNav","","cdStatefulTab","nfs-details",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem","details"],["ngbNavLink",""],"Details",["ngbNavContent",""],["ngbNavItem","clients"],"Clients (" + "\ufffd0\ufffd" + ")",[3,"ngbNavOutlet"],[3,"data"],["columnMode","flex","identifier","addresses","forceIdentifier","true","selectionType","",3,"data","columns"],["table",""]]},template:function(e,t){1&e&&i.Mc(0,pm,12,2,"ng-container",0),2&e&&i.pc("ngIf",t.selection)},directives:[o.r,Qt.p,Kt.a,Qt.r,Qt.s,Qt.q,Qt.u,en.a,Bt.a],styles:[""]}),e})();const bm=["nfsState"],gm=["nfsFsal"],_m=["table"];function ym(e,t){1&e&&(i.Qb(0),i.Wb(1,7),i.Pb())}function vm(e,t){1&e&&(i.Qb(0),i.Wb(1,8),i.Pb())}function wm(e,t){if(1&e&&(i.Mc(0,ym,2,0,"ng-container",6),i.Mc(1,vm,2,0,"ng-container",6)),2&e){const e=t.value;i.pc("ngIf","CEPH"===e.name),i.yb(1),i.pc("ngIf","RGW"===e.name)}}let Sm=(()=>{class e extends $t.a{constructor(e,t,n,i,r,s){super(),this.authStorageService=e,this.modalService=t,this.nfsService=n,this.taskListService=i,this.taskWrapper=r,this.actionLabels=s,this.selection=new Wt.a,this.isDefaultCluster=!1,this.builders={"nfs/create":e=>({path:e.path,cluster_id:e.cluster_id,fsal:e.fsal})},this.permission=this.authStorageService.getPermissions().nfs;const o=()=>this.selection.first()&&`${encodeURI(this.selection.first().cluster_id)}/${encodeURI(this.selection.first().export_id)}`;this.tableActions=[{permission:"create",icon:_n.a.add,routerLink:()=>"/nfs/create",canBePrimary:e=>!e.hasSingleSelection,name:this.actionLabels.CREATE},{permission:"update",icon:_n.a.edit,routerLink:()=>"/nfs/edit/"+o(),name:this.actionLabels.EDIT},{permission:"delete",icon:_n.a.destroy,click:()=>this.deleteNfsModal(),name:this.actionLabels.DELETE}]}ngOnInit(){this.columns=[{name:"Path",prop:"path",flexGrow:2,cellTransformation:Ht.a.executing},{name:"Pseudo",prop:"pseudo",flexGrow:2},{name:"Cluster",prop:"cluster_id",flexGrow:2},{name:"Daemons",prop:"daemons",flexGrow:2},{name:"Storage Backend",prop:"fsal",flexGrow:2,cellTemplate:this.nfsFsal},{name:"Access Type",prop:"access_type",flexGrow:2}],this.nfsService.daemon().subscribe(e=>{const t=Nt()(e).map(e=>e.cluster_id).uniq().value();this.isDefaultCluster=1===t.length&&"_default_"===t[0],this.columns[2].isHidden=this.isDefaultCluster,this.table&&this.table.updateColumns(),this.taskListService.init(()=>this.nfsService.list(),e=>this.prepareResponse(e),e=>this.exports=e,()=>this.onFetchError(),this.taskFilter,this.itemFilter,this.builders)},()=>{this.onFetchError()})}ngOnDestroy(){this.summaryDataSubscription&&this.summaryDataSubscription.unsubscribe()}prepareResponse(e){let t=[];return e.forEach(e=>{e.id=`${e.cluster_id}:${e.export_id}`,e.state="LOADING",t=t.concat(e)}),t}onFetchError(){this.table.reset(),this.viewCacheStatus={status:Gt.a.ValueException}}itemFilter(e,t){return e.cluster_id===t.metadata.cluster_id&&e.export_id===t.metadata.export_id}taskFilter(e){return["nfs/create","nfs/delete","nfs/edit"].includes(e.name)}updateSelection(e){this.selection=e}deleteNfsModal(){const e=this.selection.first().cluster_id,t=this.selection.first().export_id;this.modalRef=this.modalService.show(bn.a,{itemDescription:"NFS export",itemNames:[`${e}:${t}`],submitActionObservable:()=>this.taskWrapper.wrapTaskAroundCall({task:new tr.a("nfs/delete",{cluster_id:e,export_id:t}),call:this.nfsService.delete(e,t)})})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Jt.a),i.Mb(vn.a),i.Mb(Pf),i.Mb(dm.a),i.Mb(nr.a),i.Mb(gn.b))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-nfs-list"]],viewQuery:function(e,t){var n;1&e&&(i.Tc(bm,!0),i.Jc(gm,!0),i.Jc(_m,!0)),2&e&&(i.zc(n=i.hc())&&(t.nfsState=n.first),i.zc(n=i.hc())&&(t.nfsFsal=n.first),i.zc(n=i.hc())&&(t.table=n.first))},features:[i.xb([dm.a]),i.vb],decls:7,vars:7,consts:function(){return[["columnMode","flex","identifier","id","forceIdentifier","true","selectionType","single",3,"data","columns","hasDetails","setExpandedRow","updateSelection"],["table",""],[1,"table-actions","btn-toolbar"],[1,"btn-group",3,"permission","selection","tableActions"],["cdTableDetail","",3,"selection"],["nfsFsal",""],[4,"ngIf"],"CephFS","Object Gateway"]},template:function(e,t){1&e&&(i.Sb(0,"cd-table",0,1),i.gc("setExpandedRow",(function(e){return t.setExpandedRow(e)}))("updateSelection",(function(e){return t.updateSelection(e)})),i.Sb(2,"div",2),i.Nb(3,"cd-table-actions",3),i.Rb(),i.Nb(4,"cd-nfs-details",4),i.Rb(),i.Mc(5,wm,2,2,"ng-template",null,5,i.Nc)),2&e&&(i.pc("data",t.exports)("columns",t.columns)("hasDetails",!0),i.yb(3),i.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions),i.yb(1),i.pc("selection",t.expandedRow))},directives:[Bt.a,Sn.a,mm,o.r],styles:[""]}),e})(),Mm=(()=>{class e{constructor(t){this.route=t,this.route.queryParams.subscribe(t=>{this.fromLink=t.fromLink||e.defaultFromLink}),this.route.params.subscribe(e=>{this.serviceId=decodeURIComponent(e.id),this.serviceType=e.type})}}return e.defaultFromLink="/hosts",e.\u0275fac=function(t){return new(t||e)(i.Mb(Pt.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-performance-counter"]],decls:3,vars:4,consts:[[3,"serviceType","serviceId"]],template:function(e,t){1&e&&(i.Sb(0,"legend"),i.Oc(1),i.Rb(),i.Nb(2,"cd-table-performance-counter",0)),2&e&&(i.yb(1),i.Rc("",t.serviceType,".",t.serviceId,""),i.yb(1),i.pc("serviceType",t.serviceType)("serviceId",t.serviceId))},directives:[nl.a],styles:[""]}),e})();var xm=n("DSvg"),km=n("Mxhz"),Dm=n("1nQr");function Tm(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,31),i.Rb())}function Cm(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,32),i.Rb())}function Om(e,t){if(1&e&&i.Nb(0,"cd-helper",33),2&e){const e=i.ic();i.qc("html",e.passwordPolicyHelpText)}}function Lm(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,34),i.Rb())}function Rm(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,35),i.Rb())}function Em(e,t){if(1&e&&(i.Sb(0,"span",30),i.Oc(1),i.Rb()),2&e){const e=i.ic();i.yb(1),i.Qc(" ",e.passwordValuation," ")}}function Am(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,36),i.Rb())}function Im(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,37),i.Rb())}let Pm=(()=>{class e{constructor(e,t,n,i,r,s,o){this.actionLabels=e,this.notificationService=t,this.userService=n,this.authStorageService=i,this.formBuilder=r,this.router=s,this.passwordPolicyService=o,this.passwordPolicyHelpText="",this.icons=_n.a,this.action=this.actionLabels.CHANGE,this.resource="password",this.createForm()}createForm(){this.passwordPolicyService.getHelpText().subscribe(e=>{this.passwordPolicyHelpText=e}),this.userForm=this.formBuilder.group({oldpassword:[null,[xn.A.required,Cn.a.custom("notmatch",()=>this.userForm&&this.userForm.getValue("newpassword")===this.userForm.getValue("oldpassword"))]],newpassword:[null,[xn.A.required,Cn.a.custom("notmatch",()=>this.userForm&&this.userForm.getValue("oldpassword")===this.userForm.getValue("newpassword"))],[Cn.a.passwordPolicy(this.userService,()=>this.authStorageService.getUsername(),(e,t,n)=>{this.passwordStrengthLevelClass=this.passwordPolicyService.mapCreditsToCssClass(t),this.passwordValuation=Nt.a.defaultTo(n,"")})]],confirmnewpassword:[null,[xn.A.required]]},{validators:[Cn.a.match("newpassword","confirmnewpassword")]})}onSubmit(){if(this.userForm.pristine)return;const e=this.authStorageService.getUsername(),t=this.userForm.getValue("oldpassword"),n=this.userForm.getValue("newpassword");this.userService.changePassword(e,t,n).subscribe(()=>this.onPasswordChange(),()=>{this.userForm.setErrors({cdSubmitButton:!0})})}onPasswordChange(){this.notificationService.show(yn.a.success,"Updated user password\""),this.router.navigate(["/login"])}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(gn.b),i.Mb(wn.a),i.Mb(km.a),i.Mb(Jt.a),i.Mb(Fo.a),i.Mb(Pt.e),i.Mb(Dm.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-user-password-form"]],decls:48,vars:25,consts:function(){return[[1,"cd-col-form"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"card"],[1,"card-header"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"card-body"],[1,"form-group","row"],["for","oldpassword",1,"cd-col-form-label","required"],"Old password",[1,"cd-col-form-input"],[1,"input-group"],["type","password","placeholder","Old password...","id","oldpassword","formControlName","oldpassword","autocomplete","new-password","autofocus","",1,"form-control"],[1,"input-group-append"],["cdPasswordButton","oldpassword",1,"btn","btn-light"],["class","invalid-feedback",4,"ngIf"],["for","newpassword",1,"cd-col-form-label"],[1,"required"],"New password",["class","text-pre-wrap",3,"html",4,"ngIf"],["type","password","placeholder","Password...","id","newpassword","autocomplete","new-password","formControlName","newpassword",1,"form-control"],["type","button","cdPasswordButton","newpassword",1,"btn","btn-light"],[1,"password-strength-level"],["data-toggle","tooltip",3,"title"],["for","confirmnewpassword",1,"cd-col-form-label","required"],"Confirm new password",["type","password","autocomplete","new-password","placeholder","Confirm new password...","id","confirmnewpassword","formControlName","confirmnewpassword",1,"form-control"],["cdPasswordButton","confirmnewpassword",1,"btn","btn-light"],[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required.","The old and new passwords must be different.",[1,"text-pre-wrap",3,"html"],"This field is required.","The old and new passwords must be different.","This field is required.","Password confirmation doesn't match the new password."]},template:function(e,t){if(1&e&&(i.Sb(0,"div",0),i.Sb(1,"form",1,2),i.Sb(3,"div",3),i.Sb(4,"div",4),i.Wb(5,5),i.jc(6,"titlecase"),i.jc(7,"upperFirst"),i.Rb(),i.Sb(8,"div",6),i.Sb(9,"div",7),i.Sb(10,"label",8),i.Wb(11,9),i.Rb(),i.Sb(12,"div",10),i.Sb(13,"div",11),i.Nb(14,"input",12),i.Sb(15,"span",13),i.Nb(16,"button",14),i.Rb(),i.Rb(),i.Mc(17,Tm,2,0,"span",15),i.Mc(18,Cm,2,0,"span",15),i.Rb(),i.Rb(),i.Sb(19,"div",7),i.Sb(20,"label",16),i.Sb(21,"span",17),i.Wb(22,18),i.Rb(),i.Mc(23,Om,1,1,"cd-helper",19),i.Rb(),i.Sb(24,"div",10),i.Sb(25,"div",11),i.Nb(26,"input",20),i.Sb(27,"span",13),i.Nb(28,"button",21),i.Rb(),i.Rb(),i.Sb(29,"div",22),i.Nb(30,"div",23),i.Rb(),i.Mc(31,Lm,2,0,"span",15),i.Mc(32,Rm,2,0,"span",15),i.Mc(33,Em,2,1,"span",15),i.Rb(),i.Rb(),i.Sb(34,"div",7),i.Sb(35,"label",24),i.Wb(36,25),i.Rb(),i.Sb(37,"div",10),i.Sb(38,"div",11),i.Nb(39,"input",26),i.Sb(40,"span",13),i.Nb(41,"button",27),i.Rb(),i.Rb(),i.Mc(42,Am,2,0,"span",15),i.Mc(43,Im,2,0,"span",15),i.Rb(),i.Rb(),i.Rb(),i.Sb(44,"div",28),i.Sb(45,"cd-form-button-panel",29),i.gc("submitActionEvent",(function(){return t.onSubmit()})),i.jc(46,"titlecase"),i.jc(47,"upperFirst"),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb()),2&e){const e=i.Ac(2);i.yb(1),i.pc("formGroup",t.userForm),i.yb(6),i.ac(i.kc(6,17,t.action))(i.kc(7,19,t.resource)),i.Xb(5),i.yb(10),i.pc("ngIf",t.userForm.showError("oldpassword",e,"required")),i.yb(1),i.pc("ngIf",t.userForm.showError("oldpassword",e,"notmatch")),i.yb(5),i.pc("ngIf",t.passwordPolicyHelpText.length>0),i.yb(7),i.Ab(t.passwordStrengthLevelClass),i.qc("title",t.passwordValuation),i.yb(1),i.pc("ngIf",t.userForm.showError("newpassword",e,"required")),i.yb(1),i.pc("ngIf",t.userForm.showError("newpassword",e,"notmatch")),i.yb(1),i.pc("ngIf",t.userForm.showError("newpassword",e,"passwordPolicy")),i.yb(9),i.pc("ngIf",t.userForm.showError("confirmnewpassword",e,"required")),i.yb(1),i.pc("ngIf",t.userForm.showError("confirmnewpassword",e,"match")),i.yb(2),i.pc("form",t.userForm)("submitText",i.kc(46,21,t.action)+" "+i.kc(47,23,t.resource))}},directives:[xn.C,xn.r,xn.k,Zn.a,Xn.a,On.a,xn.d,ei.a,xn.q,xn.i,ir.a,Gu.a,o.r,ti.a,Yo.a],pipes:[o.A,sr.a],styles:[""]}),e})();function jm(e,t){1&e&&(i.Sb(0,"span",17),i.Wb(1,18),i.Rb())}function Nm(e,t){1&e&&(i.Sb(0,"span",17),i.Wb(1,19),i.Rb())}function Fm(e,t){1&e&&(i.Sb(0,"span",17),i.Wb(1,20),i.Rb())}function Ym(e,t){1&e&&(i.Sb(0,"span",17),i.Wb(1,21),i.Rb())}function zm(e,t){if(1&e&&(i.Sb(0,"span",17),i.Oc(1),i.Rb()),2&e){const e=i.ic();i.yb(1),i.Qc(" ",e.passwordValuation," ")}}function $m(e,t){1&e&&(i.Sb(0,"span",17),i.Wb(1,22),i.Rb())}function Hm(e,t){1&e&&(i.Sb(0,"span",17),i.Wb(1,23),i.Rb())}let Wm=(()=>{class e extends Pm{constructor(e,t,n,i,r,s,o,a){super(e,t,n,i,r,s,o),this.actionLabels=e,this.notificationService=t,this.userService=n,this.authStorageService=i,this.formBuilder=r,this.router=s,this.passwordPolicyService=o,this.authService=a}onPasswordChange(){this.authService.logout()}onCancel(){this.authService.logout()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(gn.b),i.Mb(wn.a),i.Mb(km.a),i.Mb(Jt.a),i.Mb(Fo.a),i.Mb(Pt.e),i.Mb(Dm.a),i.Mb(xm.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-login-password-form"]],features:[i.vb],decls:34,vars:19,consts:function(){return["Please set a new password.","You will be redirected to the login page afterwards.",["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"form-group","has-feedback"],[1,"input-group"],["type","password","placeholder","Old password...","id","oldpassword","formControlName","oldpassword","autocomplete","new-password","autofocus","",1,"form-control"],[1,"input-group-append"],["cdPasswordButton","oldpassword",1,"btn","btn-outline-light","btn-password"],["class","invalid-feedback",4,"ngIf"],["type","password","placeholder","New password...","id","newpassword","autocomplete","new-password","formControlName","newpassword",1,"form-control"],["type","button","cdPasswordButton","newpassword",1,"btn","btn-outline-light","btn-password"],[1,"password-strength-level"],["data-toggle","tooltip",3,"title"],["type","password","autocomplete","new-password","placeholder","Confirm new password...","id","confirmnewpassword","formControlName","confirmnewpassword",1,"form-control"],["cdPasswordButton","confirmnewpassword",1,"btn","btn-outline-light","btn-password"],["wrappingClass","text-right",3,"form","disabled","submitText","submitActionEvent","backActionEvent"],[1,"invalid-feedback"],"This field is required.","The old and new passwords must be different.","This field is required.","The old and new passwords must be different.","This field is required.","Password confirmation doesn't match the new password."]},template:function(e,t){if(1&e&&(i.Sb(0,"div"),i.Sb(1,"h2"),i.Wb(2,0),i.Rb(),i.Sb(3,"h4"),i.Wb(4,1),i.Rb(),i.Sb(5,"form",2,3),i.Sb(7,"div",4),i.Sb(8,"div",5),i.Nb(9,"input",6),i.Sb(10,"span",7),i.Nb(11,"button",8),i.Rb(),i.Rb(),i.Mc(12,jm,2,0,"span",9),i.Mc(13,Nm,2,0,"span",9),i.Rb(),i.Sb(14,"div",4),i.Sb(15,"div",5),i.Nb(16,"input",10),i.Sb(17,"span",7),i.Nb(18,"button",11),i.Rb(),i.Rb(),i.Sb(19,"div",12),i.Nb(20,"div",13),i.Rb(),i.Mc(21,Fm,2,0,"span",9),i.Mc(22,Ym,2,0,"span",9),i.Mc(23,zm,2,1,"span",9),i.Rb(),i.Sb(24,"div",4),i.Sb(25,"div",5),i.Nb(26,"input",14),i.Sb(27,"span",7),i.Nb(28,"button",15),i.Rb(),i.Rb(),i.Mc(29,$m,2,0,"span",9),i.Mc(30,Hm,2,0,"span",9),i.Rb(),i.Sb(31,"cd-form-button-panel",16),i.gc("submitActionEvent",(function(){return t.onSubmit()}))("backActionEvent",(function(){return t.onCancel()})),i.jc(32,"titlecase"),i.jc(33,"upperFirst"),i.Rb(),i.Rb(),i.Rb()),2&e){const e=i.Ac(6);i.yb(5),i.pc("formGroup",t.userForm),i.yb(7),i.pc("ngIf",t.userForm.showError("oldpassword",e,"required")),i.yb(1),i.pc("ngIf",t.userForm.showError("oldpassword",e,"notmatch")),i.yb(7),i.Ab(t.passwordStrengthLevelClass),i.qc("title",t.passwordValuation),i.yb(1),i.pc("ngIf",t.userForm.showError("newpassword",e,"required")),i.yb(1),i.pc("ngIf",t.userForm.showError("newpassword",e,"notmatch")),i.yb(1),i.pc("ngIf",t.userForm.showError("newpassword",e,"passwordPolicy")),i.yb(6),i.pc("ngIf",t.userForm.showError("confirmnewpassword",e,"required")),i.yb(1),i.pc("ngIf",t.userForm.showError("confirmnewpassword",e,"match")),i.yb(1),i.pc("form",t.userForm)("disabled",t.userForm.invalid)("submitText",i.kc(32,15,t.action)+" "+i.kc(33,17,t.resource))}},directives:[xn.C,xn.r,xn.k,Zn.a,Xn.a,On.a,xn.d,ei.a,xn.q,xn.i,ir.a,Gu.a,o.r,ti.a],pipes:[o.A,sr.a],styles:["cd-login-password-form h4{margin:0 0 30px} cd-login-password-form .form-group{background-color:#2e373d;border-left:4px solid #fff} cd-login-password-form .form-group:focus-within{border-left:4px solid #ef5c55} cd-login-password-form .btn-password, cd-login-password-form .btn-password:focus, cd-login-password-form .form-control, cd-login-password-form .form-control:focus{background-color:#2e373d;border:0;box-shadow:none;color:#f8f9fa;filter:none;outline:none} cd-login-password-form .form-control::placeholder{color:#6c757d} cd-login-password-form .btn-password:focus{outline-color:#2b99a8} cd-login-password-form button.btn:not(:first-child){margin-left:5px}@keyframes autofill{to{background-color:#2e373d;color:#f8f9fa}}input[_ngcontent-%COMP%]:-webkit-autofill{animation-fill-mode:both;animation-name:autofill;border-radius:0;box-shadow:inset 0 0 0 1000px #2e373d;-webkit-text-fill-color:#f8f9fa;-webkit-transition-property:none;transition-property:none}.invalid-feedback[_ngcontent-%COMP%]{padding-left:9px}.is-invalid.cd-form-control[_ngcontent-%COMP%]{border-color:transparent}"]}),e})();class Vm{}function Bm(e,t){1&e&&(i.Sb(0,"div",21),i.Wb(1,22),i.Rb())}function Um(e,t){1&e&&(i.Sb(0,"div",21),i.Wb(1,23),i.Rb())}function qm(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",1),i.Sb(1,"form",2,3),i.gc("ngSubmit",(function(){return i.Dc(e),i.ic().login()})),i.Sb(3,"div",4),i.Sb(4,"label",5),i.Wb(5,6),i.Rb(),i.Sb(6,"input",7,8),i.gc("ngModelChange",(function(t){return i.Dc(e),i.ic().model.username=t})),i.Rb(),i.Mc(8,Bm,2,0,"div",9),i.Rb(),i.Sb(9,"div",10),i.Sb(10,"div",11),i.Sb(11,"div",12),i.Sb(12,"label",13),i.Wb(13,14),i.Rb(),i.Sb(14,"input",15,16),i.gc("ngModelChange",(function(t){return i.Dc(e),i.ic().model.password=t})),i.Rb(),i.Mc(16,Um,2,0,"div",9),i.Rb(),i.Sb(17,"span",17),i.Nb(18,"button",18),i.Rb(),i.Rb(),i.Rb(),i.Sb(19,"input",19),i.Yb(20,20),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.Ac(2),t=i.Ac(7),n=i.Ac(15),r=i.ic();i.yb(6),i.pc("ngModel",r.model.username),i.zb("aria-invalid",t.invalid),i.yb(2),i.pc("ngIf",(e.submitted||t.dirty)&&t.invalid),i.yb(6),i.pc("ngModel",r.model.password),i.zb("aria-invalid",n.invalid),i.yb(2),i.pc("ngIf",(e.submitted||n.dirty)&&n.invalid),i.yb(3),i.pc("disabled",e.invalid)}}let Gm=(()=>{class e{constructor(e,t,n,i,r){this.authService=e,this.authStorageService=t,this.modalService=n,this.route=i,this.router=r,this.model=new Vm,this.isLoginActive=!1}ngOnInit(){if(this.authStorageService.isLoggedIn())this.router.navigate([""]);else{this.modalService.dismissAll();let e=null;if(-1!==window.location.hash.indexOf("access_token=")){e=window.location.hash.split("access_token=")[1];const t=window.location.toString();window.history.replaceState({},document.title,t.split("?")[0])}this.authService.check(e).subscribe(e=>{e.login_url?"#/login"===e.login_url?this.isLoginActive=!0:window.location.replace(e.login_url):(this.authStorageService.set(e.username,e.permissions,e.sso,e.pwdExpirationDate),this.router.navigate([""]))})}}login(){this.authService.login(this.model).subscribe(()=>{const e=Nt.a.get(this.route.snapshot.queryParams,"returnUrl","/");this.router.navigate([e])})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(xm.a),i.Mb(Jt.a),i.Mb(vn.a),i.Mb(Pt.a),i.Mb(Pt.e))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-login"]],decls:1,vars:1,consts:function(){return[["class","container",4,"ngIf"],[1,"container"],["name","loginForm","novalidate","",3,"ngSubmit"],["loginForm","ngForm"],[1,"form-group","has-feedback","d-flex","flex-column","py-3"],["for","username",1,"placeholder","pl-4"],"Username",["id","username","name","username","type","text","aria-labelledby","username","required","","autofocus","",1,"form-control","pl-4",3,"ngModel","ngModelChange"],["username","ngModel"],["class","invalid-feedback pl-4",4,"ngIf"],["id","password-div",1,"form-group","has-feedback"],[1,"input-group","d-flex","flex-nowrap"],[1,"d-flex","flex-column","flex-grow-1","py-3"],["for","password",1,"placeholder","pl-4"],"Password",["id","password","name","password","type","password","aria-labelledby","password","required","",1,"form-control","pl-4",3,"ngModel","ngModelChange"],["password","ngModel"],[1,"form-group-append"],["type","button","cdPasswordButton","password",1,"btn","btn-outline-light","btn-password","h-100","px-4"],["type","submit",1,"btn","btn-accent","px-5","py-2",3,"disabled",6,"value"],["value","Log in"],[1,"invalid-feedback","pl-4"],"Username is required","Password is required"]},template:function(e,t){1&e&&i.Mc(0,qm,21,7,"div",0),2&e&&i.pc("ngIf",t.isLoginActive)},directives:[o.r,xn.C,xn.r,xn.s,Xn.a,On.a,xn.d,ei.a,xn.y,ir.a,xn.q,xn.t,Gu.a],styles:["cd-login .form-group{background-color:#2e373d;border-left:4px solid #fff;height:auto;margin-bottom:2rem} cd-login .form-group:focus-within{border-left:4px solid #ef5c55} cd-login .btn-password, cd-login .btn-password:focus, cd-login .form-control, cd-login .form-control:focus{background-color:#2e373d;border:0;box-shadow:none;color:#f8f9fa;filter:none;outline:none} cd-login .placeholder{color:#6c757d} cd-login .btn-password:focus{outline-color:#2b99a8}@keyframes autofill{to{background-color:#2e373d;color:#f8f9fa}}input[_ngcontent-%COMP%]:-webkit-autofill{animation-fill-mode:both;animation-name:autofill;border-radius:0;box-shadow:inset 0 0 0 1000px #2e373d;-webkit-text-fill-color:#f8f9fa;-webkit-transition-property:none;transition-property:none}"]}),e})();var Jm=n("tz6c");function Qm(e,t){if(1&e&&(i.Sb(0,"div"),i.Nb(1,"i",8),i.Nb(2,"br"),i.Nb(3,"br"),i.Nb(4,"br"),i.Sb(5,"h3"),i.Sb(6,"b"),i.Oc(7),i.Rb(),i.Rb(),i.Nb(8,"br"),i.Sb(9,"h4"),i.Oc(10),i.Rb(),i.Rb()),2&e){const e=i.ic();i.yb(1),i.Ab(e.icon),i.yb(6),i.Pc(e.header),i.yb(3),i.Pc(e.message)}}function Km(e,t){1&e&&(i.Nb(0,"i",9),i.Nb(1,"br"),i.Nb(2,"br"),i.Nb(3,"br"),i.Sb(4,"h3"),i.cc(5,10),i.Nb(6,"b"),i.Zb(),i.Rb(),i.Nb(7,"br"),i.Sb(8,"h4"),i.Wb(9,11),i.Rb())}function Zm(e,t){if(1&e&&(i.Sb(0,"div"),i.Sb(1,"h4"),i.cc(2,12),i.Nb(3,"a",13),i.Zb(),i.Rb(),i.Rb()),2&e){const e=i.ic();i.yb(3),i.qc("href",e.docUrl,i.Gc),i.ac(e.section_info),i.Xb(2)}}let Xm=(()=>{class e{constructor(e,t){this.router=e,this.docService=t}ngOnInit(){this.fetchData(),this.routerSubscription=this.router.events.pipe(Object(hu.a)(e=>e instanceof Pt.b)).subscribe(()=>{this.fetchData()})}unloadHandler(e){e.returnValue=!1}fetchData(){try{this.router.onSameUrlNavigation="reload",this.message=history.state.message,this.header=history.state.header,this.section=history.state.section,this.section_info=history.state.section_info,this.icon=history.state.icon,this.source=history.state.source,this.docUrl=this.docService.urlGenerator(this.section)}catch(e){this.router.navigate(["/error"])}}ngOnDestroy(){this.routerSubscription&&this.routerSubscription.unsubscribe()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Pt.e),i.Mb(Jm.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-error"]],hostBindings:function(e,t){1&e&&i.gc("beforeunload",(function(e){return t.unloadHandler(e)}),!1,i.Cc)},decls:16,vars:4,consts:function(){return[["target","_blank"],[1,"dashboard","row"],[1,"text-center","content"],[4,"ngIf","ngIfElse"],["elseBlock",""],[4,"ngIf"],[1,"btn","btn-primary",3,"routerLink"],"Go To Dashboard",["aria-hidden","true"],["aria-hidden","true",1,"fa","fa-exclamation-triangle"],"" + "\ufffd#6\ufffd" + "Page not Found" + "\ufffd/#6\ufffd" + "","Sorry, we couldn\u2019t find what you were looking for. The page you requested may have been changed or moved.","Please consult the " + "\ufffd#3\ufffd" + "documentation" + "\ufffd/#3\ufffd" + " on how to configure and enable the " + "\ufffd0\ufffd" + " management functionality.",[3,"href"]]},template:function(e,t){if(1&e&&(i.Sb(0,"head"),i.Sb(1,"title"),i.Oc(2,"Error Page"),i.Rb(),i.Nb(3,"base",0),i.Rb(),i.Sb(4,"div",1),i.Sb(5,"div",2),i.Nb(6,"br"),i.Mc(7,Qm,11,5,"div",3),i.Mc(8,Km,10,0,"ng-template",null,4,i.Nc),i.Mc(10,Zm,4,2,"div",5),i.Nb(11,"br"),i.Nb(12,"br"),i.Sb(13,"div"),i.Sb(14,"button",6),i.Wb(15,7),i.Rb(),i.Rb(),i.Rb(),i.Rb()),2&e){const e=i.Ac(9);i.yb(7),i.pc("ngIf",t.header&&t.message)("ngIfElse",e),i.yb(3),i.pc("ngIf",t.section),i.yb(4),i.pc("routerLink","/dashboard")}},directives:[o.r,On.a,Pt.f],styles:["h4[_ngcontent-%COMP%]{color:#495057}i[_ngcontent-%COMP%]{font-size:6em;margin-top:120px}.dashboard[_ngcontent-%COMP%], .text-center[_ngcontent-%COMP%]{background-color:#e9ecef}.dashboard[_ngcontent-%COMP%]{height:100%;position:relative}.content[_ngcontent-%COMP%]{left:50%;position:absolute;top:40%;transform:translate(-50%,-50%);width:100%}.row[_ngcontent-%COMP%]{display:block;margin-left:-29px;margin-right:-29px;padding-top:10em}.fa-exclamation-triangle[_ngcontent-%COMP%], .fa-lock[_ngcontent-%COMP%]{color:#ef5c55}.fa-wrench[_ngcontent-%COMP%]{color:#2b99a8}"]}),e})(),eb=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-blank-layout"]],decls:1,vars:0,template:function(e,t){1&e&&i.Nb(0,"router-outlet")},directives:[Pt.j],styles:[""]}),e})(),tb=(()=>{class e{constructor(e,t){this.http=e,this.localeId=t}getLocale(){return this.localeId||s.a.default_lang}setLocale(e){document.cookie="cd-lang="+e}getLanguages(){return this.http.get("ui-api/langs")}}return e.\u0275fac=function(t){return new(t||e)(i.dc(a.b),i.dc(i.v))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var nb=function(e){return e.cs="\u010ce\u0161tina",e.de="Deutsch",e["en-US"]="English",e.es="Espa\xf1ol",e.fr="Fran\xe7ais",e.id="Bahasa Indonesia",e.it="Italiano",e.ja="\u65e5\u672c\u8a9e",e.ko="\ud55c\uad6d\uc5b4",e.pl="Polski",e.pt="Portugu\xeas (brasileiro)",e["zh-Hans"]="\u4e2d\u6587 (\u7b80\u4f53)",e["zh-Hant"]="\u4e2d\u6587 (\u7e41\u9ad4\uff09",e}({});function ib(e,t){if(1&e){const e=i.Tb();i.Qb(0),i.Sb(1,"button",5),i.gc("click",(function(){i.Dc(e);const n=t.$implicit;return i.ic().changeLanguage(n.key)})),i.Oc(2),i.Rb(),i.Pb()}if(2&e){const e=t.$implicit;i.yb(2),i.Qc(" ",e.value," ")}}let rb=(()=>{class e{constructor(e){this.languageService=e,this.allLanguages=nb,this.supportedLanguages={}}ngOnInit(){this.selectedLanguage=this.languageService.getLocale(),this.languageService.getLanguages().subscribe(e=>{this.supportedLanguages=Nt.a.pick(nb,e)})}reloadWindow(){window.location.reload()}changeLanguage(e){this.languageService.setLocale(e),this.reloadWindow()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(tb))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-language-selector"]],decls:7,vars:4,consts:function(){return[["ngbDropdown","","placement","bottom-right"],["ngbDropdownToggle","",6,"title"],["title","Select a Language"],["ngbDropdownMenu",""],[4,"ngFor","ngForOf"],["ngbDropdownItem","",3,"click"]]},template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Sb(1,"a",1),i.Yb(2,2),i.Oc(3),i.Rb(),i.Sb(4,"div",3),i.Mc(5,ib,3,1,"ng-container",4),i.jc(6,"keyvalue"),i.Rb(),i.Rb()),2&e&&(i.yb(3),i.Qc(" ",t.allLanguages[t.selectedLanguage]," "),i.yb(2),i.pc("ngForOf",i.kc(6,2,t.supportedLanguages)))},directives:[Qt.i,Qt.m,Qt.k,o.q,On.a,Qt.j],pipes:[o.k],styles:[""]}),e})();function sb(e,t){if(1&e&&(i.Sb(0,"li",10),i.Sb(1,"cd-doc",11),i.Yb(2,12),i.Rb(),i.Rb()),2&e){const e=t.$implicit;i.yb(1),i.ac(e.text),i.Xb(2),i.qc("section",e.section)}}let ob=(()=>{class e{constructor(){this.docItems=[{section:"help",text:"Help"},{section:"security",text:"Security"},{section:"trademarks",text:"Trademarks"}]}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-login-layout"]],decls:15,vars:1,consts:function(){return[[1,"login","full-height"],[1,"navbar","p-4"],[1,"navbar-brand"],[1,"form-inline"],[1,"container"],[1,"row","full-height","vertical-align"],[1,"col-sm-12","col-md-6","d-sm-block"],["src","assets/Ceph_Ceph_Logo_with_text_white.svg","alt","Ceph",1,"img-fluid"],[1,"list-inline"],["class","list-inline-item p-3",4,"ngFor","ngForOf"],[1,"list-inline-item","p-3"],["noSubscribe","true",3,"section",6,"docText"],["docText","" + "\ufffd0\ufffd" + ""]]},template:function(e,t){1&e&&(i.Sb(0,"main",0),i.Sb(1,"header"),i.Sb(2,"nav",1),i.Nb(3,"a",2),i.Sb(4,"div",3),i.Nb(5,"cd-language-selector"),i.Rb(),i.Rb(),i.Rb(),i.Sb(6,"section"),i.Sb(7,"div",4),i.Sb(8,"div",5),i.Sb(9,"div",6),i.Nb(10,"router-outlet"),i.Rb(),i.Sb(11,"div",6),i.Nb(12,"img",7),i.Sb(13,"ul",8),i.Mc(14,sb,3,2,"li",9),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb()),2&e&&(i.yb(14),i.pc("ngForOf",t.docItems))},directives:[Qt.v,rb,Pt.j,o.q,Lr.a],styles:["cd-login-layout .login{background-color:#374249;background-image:url(ceph_background.e82dd79127290ddbe8cb.gif);background-position:100% 100%;background-repeat:no-repeat;color:#f8f9fa} cd-login-layout .login header{position:absolute;width:100vw} cd-login-layout .login header .navbar .dropdown-menu{margin-top:.2rem} cd-login-layout .login header .navbar .dropdown-menu li a:hover{background-color:#2b99a8} cd-login-layout .login section{display:inline-flex;min-height:100vh;width:100vw} cd-login-layout .login .list-inline{margin-bottom:20%;margin-left:20%} cd-login-layout .login a{color:#fff} cd-login-layout .login a:hover{color:#adb5bd}"]}),e})();var ab=n("mSOc");let cb=(()=>{class e{constructor(e,t,n){this.document=e,this.summaryService=t,this.cssHelper=n}init(){var e;this.url=null===(e=this.document.getElementById("cdFavicon"))||void 0===e?void 0:e.getAttribute("href"),this.sub=this.summaryService.subscribe(e=>{this.changeIcon(e.health_status)})}changeIcon(e){if(e===this.oldStatus)return;this.oldStatus=e;const t=this.document.getElementById("cdFavicon"),n=this.document.createElement("canvas");n.width=16,n.height=16;const i=n.getContext("2d"),r=this.document.createElement("img");r.src=this.url,r.onload=()=>{i.drawImage(r,0,0,16,16),Object.keys($h).includes(e)&&(i.save(),i.globalCompositeOperation="destination-out",i.beginPath(),i.arc(n.width-4,4,6,0,2*Math.PI),i.fill(),i.restore(),i.beginPath(),i.arc(n.width-4,4,4,0,2*Math.PI),i.fillStyle=this.cssHelper.propertyValue($h[e]),i.fill()),t.setAttribute("href",n.toDataURL("image/png"))}}ngOnDestroy(){var e;this.changeIcon(),null===(e=this.sub)||void 0===e||e.unsubscribe()}}return e.\u0275fac=function(t){return new(t||e)(i.dc(o.d),i.dc(ab.a),i.dc(kh.a))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})();var lb=n("VXsX"),ub=n("oMSZ");function db(e,t){1&e&&(i.Sb(0,"div"),i.cc(1,3),i.Nb(2,"strong"),i.Nb(3,"a",4),i.Zb(),i.Rb())}function hb(e,t){if(1&e&&(i.Sb(0,"div"),i.cc(1,5),i.Nb(2,"strong"),i.Nb(3,"a",4),i.Zb(),i.Rb()),2&e){const e=i.ic(2);i.yb(3),i.ac(e.expirationDays),i.Xb(1)}}function fb(e,t){if(1&e){const e=i.Tb();i.Sb(0,"ngb-alert",1),i.gc("close",(function(t){return i.Dc(e),i.ic().close(t)})),i.Mc(1,db,4,0,"div",2),i.Mc(2,hb,4,1,"div",2),i.Rb()}if(2&e){const e=i.ic();i.qc("type",e.alertType),i.yb(1),i.pc("ngIf",0===e.expirationDays),i.yb(1),i.pc("ngIf",e.expirationDays>0)}}let pb=(()=>{class e{constructor(e,t){this.settingsService=e,this.authStorageService=t,this.displayNotification=!1}ngOnInit(){this.settingsService.getStandardSettings().subscribe(e=>{this.pwdExpirationSettings=new ub.a(e);const t=this.authStorageService.getPwdExpirationDate();t&&(this.expirationDays=this.getExpirationDays(t),this.alertType=this.expirationDays<=this.pwdExpirationSettings.pwdExpirationWarning2?"danger":"warning",this.displayNotification=this.expirationDays<=this.pwdExpirationSettings.pwdExpirationWarning1,this.authStorageService.isPwdDisplayedSource.next(this.displayNotification))})}ngOnDestroy(){this.authStorageService.isPwdDisplayedSource.next(!1)}getExpirationDays(e){const t=new Date,n=new Date(1e3*e);return Math.floor((n.valueOf()-t.valueOf())/864e5)}close(){this.authStorageService.isPwdDisplayedSource.next(!1),this.displayNotification=!1}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Pl.a),i.Mb(Jt.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-pwd-expiration-notification"]],decls:1,vars:1,consts:function(){return[["class","no-margin-bottom",3,"type","close",4,"ngIf"],[1,"no-margin-bottom",3,"type","close"],[4,"ngIf"],"Your password will expire in " + "\ufffd#2\ufffd" + "less than 1" + "\ufffd/#2\ufffd" + " day. Click " + "\ufffd#3\ufffd" + "here" + "\ufffd/#3\ufffd" + " to change it now.",["routerLink","/user-profile/edit",1,"alert-link"],"Your password will expire in " + "\ufffd#2\ufffd" + "" + "\ufffd0\ufffd" + "" + "\ufffd/#2\ufffd" + " day(s). Click " + "\ufffd#3\ufffd" + "here" + "\ufffd/#3\ufffd" + " to change it now."]},template:function(e,t){1&e&&i.Mc(0,fb,3,3,"ngb-alert",0),2&e&&i.pc("ngIf",t.displayNotification)},directives:[o.r,Qt.b,Pt.h],styles:["cd-pwd-expiration-notification .no-margin-bottom{margin-bottom:0}"]}),e})();function mb(e,t){if(1&e){const e=i.Tb();i.Sb(0,"ngb-alert",1),i.gc("close",(function(t){return i.Dc(e),i.ic().close(t)})),i.Sb(1,"div"),i.cc(2,2),i.Nb(3,"a",3),i.Nb(4,"a",4),i.Zb(),i.Rb(),i.Rb()}}let bb=(()=>{class e{constructor(e,t,n,i){this.mgrModuleService=e,this.authStorageService=t,this.notificationService=n,this.telemetryNotificationService=i,this.displayNotification=!1}ngOnInit(){if(this.telemetryNotificationService.update.subscribe(e=>{this.displayNotification=e}),!this.isNotificationHidden()){const e=this.authStorageService.getPermissions().configOpt;Nt.a.every(Object.values(e))&&this.mgrModuleService.getConfig("telemetry").subscribe(e=>{e.enabled||this.telemetryNotificationService.setVisibility(!0)})}}ngOnDestroy(){this.telemetryNotificationService.setVisibility(!1)}isNotificationHidden(){return"true"===localStorage.getItem("telemetry_notification_hidden")}close(){this.telemetryNotificationService.setVisibility(!1),localStorage.setItem("telemetry_notification_hidden","true"),this.notificationService.show(yn.a.success,"Telemetry activation reminder muted","You can activate the module on the Telemetry configuration page (<b>Dashboard Settings</b> -> <b>Telemetry configuration</b>) at any time.")}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(No),i.Mb(Jt.a),i.Mb(wn.a),i.Mb(uh))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-telemetry-notification"]],decls:1,vars:1,consts:function(){var e;return e="The Ceph community needs your help to continue improving: please " + "\ufffd#3\ufffd" + "Activate" + "[\ufffd/#3\ufffd|\ufffd/#4\ufffd]" + " the " + "\ufffd#4\ufffd" + "Telemetry" + "[\ufffd/#3\ufffd|\ufffd/#4\ufffd]" + " module.",[["class","no-margin-bottom","type","warning",3,"close",4,"ngIf"],["type","warning",1,"no-margin-bottom",3,"close"],e=i.bc(e),["routerLink","/telemetry",1,"btn","activate-button","alert-link","activate-text"],["href","https://docs.ceph.com/en/latest/mgr/telemetry/"]]},template:function(e,t){1&e&&i.Mc(0,mb,5,0,"ngb-alert",0),2&e&&i.pc("ngIf",t.displayNotification)},directives:[o.r,Qt.b,Pt.h],styles:["cd-telemetry-notification .no-margin-bottom{margin-bottom:0}.activate-button[_ngcontent-%COMP%]{background-color:#fcecba;border:.5px solid #495057;border-radius:10%;padding:.1rem .4rem}.activate-text[_ngcontent-%COMP%]{color:#495057;font-weight:700}"]}),e})();var gb=function(){function e(e){if(this._maxConcurrency=e,this._queue=[],e<=0)throw new Error("semaphore must be initialized to a positive value");this._value=e}return e.prototype.acquire=function(){var e=this,t=this.isLocked(),n=new Promise((function(t){return e._queue.push(t)}));return t||this._dispatch(),n},e.prototype.runExclusive=function(e){return Object(Ft.a)(this,void 0,void 0,(function(){var t,n,i;return Object(Ft.c)(this,(function(r){switch(r.label){case 0:return[4,this.acquire()];case 1:t=r.sent(),n=t[0],i=t[1],r.label=2;case 2:return r.trys.push([2,,4,5]),[4,e(n)];case 3:return[2,r.sent()];case 4:return i(),[7];case 5:return[2]}}))}))},e.prototype.isLocked=function(){return this._value<=0},e.prototype.release=function(){if(this._maxConcurrency>1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");this._currentReleaser&&(this._currentReleaser(),this._currentReleaser=void 0)},e.prototype._dispatch=function(){var e=this,t=this._queue.shift();if(t){var n=!1;this._currentReleaser=function(){n||(n=!0,e._value++,e._dispatch())},t([this._value--,this._currentReleaser])}},e}(),_b=function(){function e(){this._semaphore=new gb(1)}return e.prototype.acquire=function(){return Object(Ft.a)(this,void 0,void 0,(function(){return Object(Ft.c)(this,(function(e){switch(e.label){case 0:return[4,this._semaphore.acquire()];case 1:return[2,e.sent()[1]]}}))}))},e.prototype.runExclusive=function(e){return this._semaphore.runExclusive((function(){return e()}))},e.prototype.isLocked=function(){return this._semaphore.isLocked()},e.prototype.release=function(){this._semaphore.release()},e}();let yb=(()=>{class e{constructor(e,t){this.alertFormatter=e,this.prometheusService=t,this.backendFailure=!1,this.notifications=[]}refresh(){this.backendFailure||this.prometheusService.getNotifications(Nt.a.last(this.notifications)).subscribe(e=>this.handleNotifications(e),()=>this.backendFailure=!0)}handleNotifications(e){0!==e.length&&(this.notifications.length>0&&this.alertFormatter.sendNotifications(Nt.a.flatten(e.map(e=>this.formatNotification(e)))),this.notifications=this.notifications.concat(e))}formatNotification(e){return this.alertFormatter.convertToCustomAlerts(e.alerts).map(e=>this.alertFormatter.convertAlertToNotification(e))}}return e.\u0275fac=function(t){return new(t||e)(i.dc(Fl),i.dc(jl))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var vb=n("ufoC"),wb=n("Hicy"),Sb=n("WF9J");const Mb=function(e,t){return[e,t]},xb=function(e,t,n,i){return[e,t,n,i]};function kb(e,t){if(1&e&&(i.Sb(0,"div"),i.Sb(1,"div",12),i.Sb(2,"div",13),i.Sb(3,"div",14),i.Sb(4,"span",15),i.Nb(5,"i",7),i.Nb(6,"i",7),i.Rb(),i.Rb(),i.Sb(7,"div",16),i.Sb(8,"div",17),i.Sb(9,"h6",18),i.Oc(10),i.Rb(),i.Sb(11,"div",19),i.Nb(12,"ngb-progressbar",20),i.Rb(),i.Sb(13,"p",21),i.Sb(14,"small",22),i.Oc(15),i.jc(16,"cdDate"),i.Rb(),i.Sb(17,"span",23),i.Oc(18),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Nb(19,"hr"),i.Rb()),2&e){const e=t.$implicit,n=i.ic(2);i.yb(4),i.pc("ngClass",i.vc(11,Mb,n.icons.stack,n.icons.large2x)),i.yb(1),i.pc("ngClass",i.vc(14,Mb,n.icons.stack2x,n.icons.circle)),i.yb(1),i.pc("ngClass",i.xc(17,xb,n.icons.stack1x,n.icons.spinner,n.icons.spin,n.icons.inverse)),i.yb(4),i.Pc(e.description),i.yb(2),i.pc("value",null==e?null:e.progress)("striped",!0)("animated",!0),i.yb(3),i.Qc(" ",i.kc(16,9,e.begin_time)," "),i.yb(3),i.Qc(" ",e.progress||0," % ")}}function Db(e,t){if(1&e&&i.Mc(0,kb,20,22,"div",11),2&e){const e=i.ic();i.pc("ngForOf",e.executingTasks)("ngForTrackBy",e.trackByFn)}}function Tb(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"small"),i.Qb(2),i.Wb(3,36),i.Pb(),i.Oc(4),i.jc(5,"duration"),i.Rb(),i.Nb(6,"br"),i.Pb()),2&e){const e=i.ic().$implicit;i.yb(4),i.Qc(" ",i.kc(5,1,e.duration)," ")}}const Cb=function(e,t,n){return[e,t,n]},Ob=function(e){return[e]};function Lb(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",7),i.Sb(1,"div",29),i.Sb(2,"div",13),i.Sb(3,"div",14),i.Sb(4,"span",7),i.Nb(5,"i",7),i.Nb(6,"i",7),i.Rb(),i.Rb(),i.Sb(7,"div",30),i.Sb(8,"div",17),i.Sb(9,"button",31),i.Yb(10,32),i.gc("click",(function(n){i.Dc(e);const r=t.index;return i.ic(3).remove(r),n.stopPropagation()})),i.Nb(11,"i",7),i.Rb(),i.Sb(12,"h6",18),i.Oc(13),i.Rb(),i.Nb(14,"p",33),i.Sb(15,"p",21),i.Mc(16,Tb,7,3,"ng-container",24),i.Sb(17,"small",34),i.jc(18,"cdDate"),i.Oc(19),i.jc(20,"relativeDate"),i.Rb(),i.Nb(21,"i",35),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Nb(22,"hr"),i.Rb()}if(2&e){const e=t.$implicit,n=i.ic(3);i.pc("ngClass",e.borderClass),i.yb(4),i.pc("ngClass",i.wc(16,Cb,n.icons.stack,n.icons.large2x,e.textClass)),i.yb(1),i.pc("ngClass",i.vc(20,Mb,n.icons.circle,n.icons.stack2x)),i.yb(1),i.pc("ngClass",i.wc(23,Cb,n.icons.stack1x,n.icons.inverse,e.iconClass)),i.yb(5),i.pc("ngClass",i.uc(27,Ob,n.icons.trash)),i.yb(2),i.Pc(e.title),i.yb(1),i.pc("innerHtml",e.message,i.Ec),i.yb(2),i.pc("ngIf",e.duration),i.yb(1),i.pc("title",i.kc(18,12,e.timestamp)),i.yb(2),i.Pc(i.kc(20,14,e.timestamp)),i.yb(2),i.pc("ngClass",i.uc(29,Ob,e.applicationClass))("title",e.application)}}function Rb(e,t){if(1&e){const e=i.Tb();i.Qb(0),i.Sb(1,"button",25),i.gc("click",(function(t){return i.Dc(e),i.ic(2).removeAll(),t.stopPropagation()})),i.Nb(2,"i",26),i.Oc(3," \xa0 "),i.Qb(4),i.Wb(5,27),i.Pb(),i.Rb(),i.Nb(6,"hr"),i.Mc(7,Lb,23,31,"div",28),i.Pb()}if(2&e){const e=i.ic(2);i.yb(2),i.pc("ngClass",i.uc(2,Ob,e.icons.trash)),i.yb(5),i.pc("ngForOf",e.notifications)}}function Eb(e,t){if(1&e&&i.Mc(0,Rb,8,4,"ng-container",24),2&e){const e=i.ic();i.pc("ngIf",e.notifications.length>0)}}function Ab(e,t){1&e&&(i.Sb(0,"div"),i.Sb(1,"div",37),i.Wb(2,38),i.Rb(),i.Rb())}function Ib(e,t){if(1&e&&i.Mc(0,Ab,3,0,"div",24),2&e){const e=i.ic();i.pc("ngIf",0===e.notifications.length&&0===e.executingTasks.length)}}function Pb(e,t){1&e&&i.Ob(0)}function jb(e,t){1&e&&i.Ob(0)}function Nb(e,t){1&e&&i.Ob(0)}let Fb=(()=>{class e{constructor(e,t,n,i,r,s,o,a){this.notificationService=e,this.summaryService=t,this.taskMessageService=n,this.prometheusNotificationService=i,this.authStorageService=r,this.prometheusAlertService=s,this.ngZone=o,this.cdRef=a,this.isSidebarOpened=!1,this.executingTasks=[],this.subs=new Oi.a,this.icons=_n.a,this.last_task="",this.mutex=new _b,this.simplebar={autoHide:!1},this.notifications=[]}ngOnDestroy(){window.clearInterval(this.interval),window.clearTimeout(this.timeout),this.subs.unsubscribe()}ngOnInit(){this.last_task=window.localStorage.getItem("last_task");const e=this.authStorageService.getPermissions();e.prometheus.read&&e.configOpt.read&&(this.triggerPrometheusAlerts(),this.ngZone.runOutsideAngular(()=>{this.interval=window.setInterval(()=>{this.ngZone.run(()=>{this.triggerPrometheusAlerts()})},5e3)})),this.subs.add(this.notificationService.data$.subscribe(e=>{this.notifications=Nt.a.orderBy(e,["timestamp"],["desc"]),this.cdRef.detectChanges()})),this.subs.add(this.notificationService.sidebarSubject.subscribe(e=>{this.isSidebarOpened=!e&&!this.isSidebarOpened,window.clearTimeout(this.timeout),this.timeout=window.setTimeout(()=>{this.cdRef.detectChanges()},0)})),this.subs.add(this.summaryService.subscribe(e=>{this._handleTasks(e.executing_tasks),this.mutex.acquire().then(t=>{Nt.a.filter(e.finished_tasks,e=>!this.last_task||nn()(e.end_time).isAfter(this.last_task)).forEach(e=>{const t=this.notificationService.finishedTaskToNotification(e,e.success),n=new Nl.a(t);n.timestamp=e.end_time,n.duration=e.duration,this.last_task&&!nn()(e.end_time).isAfter(this.last_task)||(this.last_task=e.end_time,window.localStorage.setItem("last_task",this.last_task)),this.notificationService.save(n)}),this.cdRef.detectChanges(),t()})}))}_handleTasks(e){for(const t of e)t.description=this.taskMessageService.getRunningTitle(t);this.executingTasks=e}triggerPrometheusAlerts(){this.prometheusAlertService.refresh(),this.prometheusNotificationService.refresh()}removeAll(){this.notificationService.removeAll()}remove(e){this.notificationService.remove(e)}closeSidebar(){this.isSidebarOpened=!1}trackByFn(e){return e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(wn.a),i.Mb(ab.a),i.Mb(vb.a),i.Mb(yb),i.Mb(Jt.a),i.Mb(Yl),i.Mb(i.A),i.Mb(i.h))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-notifications-sidebar"]],hostVars:2,hostBindings:function(e,t){2&e&&i.Eb("active",t.isSidebarOpened)},decls:18,vars:6,consts:function(){return[["tasksTpl",""],["notificationsTpl",""],["emptyTpl",""],[1,"card",3,"clickOutsideEnabled","clickOutside"],[1,"card-header"],"Tasks and Notifications",["tabindex","-1","type","button",1,"close","float-right",3,"click"],[3,"ngClass"],[3,"options"],[1,"card-body"],[4,"ngTemplateOutlet"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"card","tc_task","border-0"],[1,"row","no-gutters"],[1,"col-md-2","text-center"],[1,"text-info",3,"ngClass"],[1,"col-md-9"],[1,"card-body","p-1"],[1,"card-title","bold"],[1,"mb-1"],["type","info",3,"value","striped","animated"],[1,"card-text","text-muted"],[1,"date","float-left"],[1,"float-right"],[4,"ngIf"],["type","button",1,"btn","btn-light","btn-block",3,"click"],["aria-hidden","true",3,"ngClass"],"Clear notifications",[3,"ngClass",4,"ngFor","ngForOf"],[1,"card","tc_notification","border-0"],[1,"col-md-10"],[1,"btn","btn-link","float-right","mt-0","pt-0",3,"click",6,"title"],["title","Remove notification"],[1,"card-text",3,"innerHtml"],[1,"date",3,"title"],[1,"float-right","custom-icon",3,"ngClass","title"],"Duration:",[1,"message","text-center"],"There are no notifications."]},template:function(e,t){if(1&e&&(i.Mc(0,Db,1,2,"ng-template",null,0,i.Nc),i.Mc(2,Eb,1,1,"ng-template",null,1,i.Nc),i.Mc(4,Ib,1,1,"ng-template",null,2,i.Nc),i.Sb(6,"div",3),i.gc("clickOutside",(function(){return t.closeSidebar()})),i.Sb(7,"div",4),i.Qb(8),i.Wb(9,5),i.Pb(),i.Sb(10,"button",6),i.gc("click",(function(){return t.closeSidebar()})),i.Sb(11,"span"),i.Nb(12,"i",7),i.Rb(),i.Rb(),i.Rb(),i.Sb(13,"ngx-simplebar",8),i.Sb(14,"div",9),i.Mc(15,Pb,1,0,"ng-container",10),i.Mc(16,jb,1,0,"ng-container",10),i.Mc(17,Nb,1,0,"ng-container",10),i.Rb(),i.Rb(),i.Rb()),2&e){const e=i.Ac(1),n=i.Ac(3),r=i.Ac(5);i.yb(6),i.pc("clickOutsideEnabled",t.isSidebarOpened),i.yb(6),i.pc("ngClass",t.icons.close),i.yb(1),i.pc("options",t.simplebar),i.yb(2),i.pc("ngTemplateOutlet",e),i.yb(1),i.pc("ngTemplateOutlet",n),i.yb(1),i.pc("ngTemplateOutlet",r)}},directives:[wb.a,On.a,o.p,Sb.a,o.w,o.q,Qt.z,o.r],pipes:[Vt.a,$r.a,Jl],styles:["[_nghost-%COMP%]{bottom:10px;max-width:90vw;position:fixed;right:-350px;top:53px;transition:all .6s;width:350px;z-index:9}.active[_nghost-%COMP%]{right:20px}.card[_ngcontent-%COMP%]{height:100%}.card-body[_ngcontent-%COMP%]{padding-left:0;padding-right:5px;padding-top:3px}ngx-simplebar[_ngcontent-%COMP%]{height:calc(100% - 42.2px)}.separator[_ngcontent-%COMP%]{background-color:#e9ecef;color:#6c757d;font-size:1rem;padding:5px 12px}.btn-block[_ngcontent-%COMP%]{width:98%}.btn-link[_ngcontent-%COMP%] .fa-trash-o[_ngcontent-%COMP%]{color:#000}table[_ngcontent-%COMP%]{width:100%}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0;padding-bottom:1rem;padding-top:1rem}hr[_ngcontent-%COMP%]{margin-bottom:2px;margin-top:2px}.card-text[_ngcontent-%COMP%]{margin-right:15px}"],changeDetection:0}),e})();function Yb(e,t){1&e&&i.Nb(0,"span",6)}const zb=function(e){return{running:e}},$b=function(e){return[e]};let Hb=(()=>{class e{constructor(e,t){this.notificationService=e,this.summaryService=t,this.icons=_n.a,this.hasRunningTasks=!1,this.hasNotifications=!1,this.subs=new Oi.a}ngOnInit(){this.subs.add(this.summaryService.subscribe(e=>{this.hasRunningTasks=e.executing_tasks.length>0})),this.subs.add(this.notificationService.data$.subscribe(e=>{this.hasNotifications=e.length>0}))}ngOnDestroy(){this.subs.unsubscribe()}toggleSidebar(){this.notificationService.toggleSidebar()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(wn.a),i.Mb(ab.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-notifications"]],decls:6,vars:7,consts:function(){return[[3,"ngClass","click",6,"title"],["title","Tasks and Notifications"],[3,"ngClass"],["class","dot",4,"ngIf"],[1,"d-md-none"],"Tasks and Notifications",[1,"dot"]]},template:function(e,t){1&e&&(i.Sb(0,"a",0),i.Yb(1,1),i.gc("click",(function(){return t.toggleSidebar()})),i.Nb(2,"i",2),i.Mc(3,Yb,1,0,"span",3),i.Sb(4,"span",4),i.Wb(5,5),i.Rb(),i.Rb()),2&e&&(i.pc("ngClass",i.uc(3,zb,t.hasRunningTasks)),i.yb(2),i.pc("ngClass",i.uc(5,$b,t.icons.bell)),i.yb(1),i.pc("ngIf",t.hasNotifications))},directives:[o.p,o.r],styles:[".running[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#2b99a8}.running[_ngcontent-%COMP%]:hover i[_ngcontent-%COMP%]{color:#fff}a[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%]{background-color:#2b99a8;border:2px solid #374249;border-radius:50%;height:11px;position:absolute;right:17px;top:10px;width:10px}a[_ngcontent-%COMP%]:hover .dot[_ngcontent-%COMP%]{background-color:#fff;border-color:#2b99a8}"]}),e})();var Wb=n("e0ae");let Vb=(()=>{class e{constructor(e,t,n,i){this.activeModal=e,this.summaryService=t,this.userService=n,this.authStorageService=i,this.userPermission=this.authStorageService.getPermissions().user}ngOnInit(){this.projectConstants=gn.c,this.hostAddr=window.location.hostname,this.modalVariables=this.setVariables(),this.subs=this.summaryService.subscribe(e=>{const t=e.version.replace("ceph version ","").split(" ");this.hostAddr=e.mgr_host.replace(/(^\w+:|^)\/\//,"").replace(/\/$/,""),this.versionNumber=t[0],this.versionHash=t[1],this.versionName=t.slice(2,t.length).join(" ")})}ngOnDestroy(){this.subs.unsubscribe()}setVariables(){const e={};e.user=localStorage.getItem("dashboard_username"),e.role="user",this.userPermission.read&&this.userService.get(e.user).subscribe(t=>{e.role=t.roles});const t=Object(Wb.a)();return e.browserName=t&&t.name?t.name:"Not detected",e.browserVersion=t&&t.version?t.version:"Not detected",e.browserOS=t&&t.os?t.os:"Not detected",e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Qt.a),i.Mb(ab.a),i.Mb(km.a),i.Mb(Jt.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-about"]],decls:46,vars:13,consts:[[1,"about-container"],[1,"modal-header"],["type","button","aria-label","Close",1,"close","float-right",3,"click"],["aria-hidden","true"],[1,"modal-body"],["src","assets/Ceph_Ceph_Logo_with_text_red_white.svg",1,"ceph-logo",3,"alt"],[1,"product-versions"],[1,"modal-footer"],[1,"text-left"]],template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Sb(1,"div",1),i.Sb(2,"button",2),i.gc("click",(function(){return t.activeModal.close()})),i.Sb(3,"span",3),i.Oc(4,"\xd7"),i.Rb(),i.Rb(),i.Rb(),i.Sb(5,"div",4),i.Nb(6,"img",5),i.Sb(7,"h3"),i.Sb(8,"strong"),i.Oc(9),i.Rb(),i.Rb(),i.Sb(10,"div",6),i.Sb(11,"strong"),i.Oc(12,"Version"),i.Rb(),i.Nb(13,"br"),i.Oc(14),i.Nb(15,"br"),i.Oc(16),i.Rb(),i.Nb(17,"br"),i.Sb(18,"dl"),i.Sb(19,"dt"),i.Oc(20,"Ceph Manager"),i.Rb(),i.Sb(21,"dd"),i.Oc(22),i.Rb(),i.Sb(23,"dt"),i.Oc(24,"User"),i.Rb(),i.Sb(25,"dd"),i.Oc(26),i.Rb(),i.Sb(27,"dt"),i.Oc(28,"User Role"),i.Rb(),i.Sb(29,"dd"),i.Oc(30),i.Rb(),i.Sb(31,"dt"),i.Oc(32,"Browser"),i.Rb(),i.Sb(33,"dd"),i.Oc(34),i.Rb(),i.Sb(35,"dt"),i.Oc(36,"Browser Version"),i.Rb(),i.Sb(37,"dd"),i.Oc(38),i.Rb(),i.Sb(39,"dt"),i.Oc(40,"Browser OS"),i.Rb(),i.Sb(41,"dd"),i.Oc(42),i.Rb(),i.Rb(),i.Rb(),i.Sb(43,"div",7),i.Sb(44,"div",8),i.Oc(45),i.Rb(),i.Rb(),i.Rb()),2&e&&(i.yb(6),i.qc("alt",t.projectConstants.organization),i.yb(3),i.Pc(t.projectConstants.projectName),i.yb(5),i.Rc(" ",t.versionNumber," ",t.versionHash," "),i.yb(2),i.Qc(" ",t.versionName," "),i.yb(6),i.Pc(t.hostAddr),i.yb(4),i.Pc(t.modalVariables.user),i.yb(4),i.Pc(t.modalVariables.role),i.yb(4),i.Pc(t.modalVariables.browserName),i.yb(4),i.Pc(t.modalVariables.browserVersion),i.yb(4),i.Pc(t.modalVariables.browserOS),i.yb(3),i.Rc(" ",t.projectConstants.copyright," ",t.projectConstants.license," "))},directives:[On.a],styles:[".about-container[_ngcontent-%COMP%]{background-color:#374249;background-image:url(ceph_background.e82dd79127290ddbe8cb.gif);background-position:100% 100%;background-repeat:no-repeat;color:#fff;text-shadow:1px 1px #374249}.product-versions[_ngcontent-%COMP%]{margin-top:30px}.product-versions[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{margin-right:10px}.modal-header[_ngcontent-%COMP%]{border-bottom:0}.modal-header[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{color:#fff;font-size:2em}.modal-body[_ngcontent-%COMP%]{padding-left:80px;padding-right:80px}.ceph-logo[_ngcontent-%COMP%]{margin-bottom:30px;width:25%}.modal-footer[_ngcontent-%COMP%]{border-top:0;display:block;padding:15px 80px 35px}"]}),e})();const Bb=function(e){return[e]},Ub=function(e){return{disabled:e}};let qb=(()=>{class e{constructor(e,t){this.modalService=e,this.docService=t,this.icons=_n.a}ngOnInit(){this.docService.subscribeOnce("dashboard",e=>{this.docsUrl=e})}openAboutModal(){this.modalRef=this.modalService.show(Vb,null,{size:"lg"})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(vn.a),i.Mb(Jm.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-dashboard-help"]],decls:13,vars:7,consts:function(){return[["ngbDropdown","","placement","bottom-right"],["ngbDropdownToggle","",6,"title"],["title","Help"],[3,"ngClass"],[1,"d-md-none"],"Help",["ngbDropdownMenu",""],["ngbDropdownItem","","target","_blank",1,"text-capitalize",3,"ngClass","href"],"documentation",["ngbDropdownItem","","href","/docs","target","_blank"],"API",["ngbDropdownItem","",3,"click"],"About"]},template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Sb(1,"a",1),i.Yb(2,2),i.Nb(3,"i",3),i.Sb(4,"span",4),i.Wb(5,5),i.Rb(),i.Rb(),i.Sb(6,"div",6),i.Sb(7,"a",7),i.Wb(8,8),i.Rb(),i.Sb(9,"a",9),i.Wb(10,10),i.Rb(),i.Sb(11,"button",11),i.gc("click",(function(){return t.openAboutModal()})),i.Wb(12,12),i.Rb(),i.Rb(),i.Rb()),2&e&&(i.yb(3),i.pc("ngClass",i.uc(3,Bb,t.icons.questionCircle)),i.yb(4),i.qc("href",t.docsUrl,i.Gc),i.pc("ngClass",i.uc(5,Ub,!t.docsUrl)))},directives:[Qt.i,Qt.m,o.p,Qt.k,Qt.j,On.a],styles:[""]}),e})();function Gb(e,t){1&e&&(i.Sb(0,"button",10),i.Wb(1,11),i.Rb())}function Jb(e,t){1&e&&(i.Sb(0,"button",12),i.Wb(1,13),i.Rb())}const Qb=function(e){return[e]};function Kb(e,t){if(1&e&&(i.Sb(0,"div",1),i.Sb(1,"a",2),i.Yb(2,3),i.Nb(3,"i",4),i.Sb(4,"span",5),i.Wb(5,6),i.Rb(),i.Rb(),i.Sb(6,"div",7),i.Mc(7,Gb,2,0,"button",8),i.Mc(8,Jb,2,0,"button",9),i.Rb(),i.Rb()),2&e){const e=i.ic();i.yb(3),i.pc("ngClass",i.uc(3,Qb,e.icons.deepCheck)),i.yb(4),i.pc("ngIf",e.userPermission.read),i.yb(1),i.pc("ngIf",e.configOptPermission.read)}}let Zb=(()=>{class e{constructor(e){this.authStorageService=e,this.icons=_n.a;const t=this.authStorageService.getPermissions();this.userPermission=t.user,this.configOptPermission=t.configOpt}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Jt.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-administration"]],decls:1,vars:1,consts:function(){return[["ngbDropdown","","placement","bottom-right",4,"ngIf"],["ngbDropdown","","placement","bottom-right"],["ngbDropdownToggle","",1,"dropdown-toggle",6,"title"],["title","Dashboard Settings"],[3,"ngClass"],[1,"d-md-none"],"Dashboard Settings",["ngbDropdownMenu",""],["ngbDropdownItem","","routerLink","/user-management",4,"ngIf"],["ngbDropdownItem","","routerLink","/telemetry",4,"ngIf"],["ngbDropdownItem","","routerLink","/user-management"],"User management",["ngbDropdownItem","","routerLink","/telemetry"],"Telemetry configuration"]},template:function(e,t){1&e&&i.Mc(0,Kb,9,5,"div",0),2&e&&i.pc("ngIf",t.userPermission.read)},directives:[o.r,Qt.i,Qt.m,o.p,Qt.k,On.a,Qt.j,Pt.f],styles:[""]}),e})();const Xb=function(e){return[e]};function eg(e,t){if(1&e&&(i.Sb(0,"button",13),i.Nb(1,"i",3),i.Sb(2,"span"),i.Wb(3,14),i.Rb(),i.Rb()),2&e){const e=i.ic();i.yb(1),i.pc("ngClass",i.uc(1,Xb,e.icons.lock))}}let tg=(()=>{class e{constructor(e,t){this.authStorageService=e,this.authService=t,this.icons=_n.a}ngOnInit(){this.username=this.authStorageService.getUsername(),this.sso=this.authStorageService.isSSO()}logout(){this.authService.logout()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Jt.a),i.Mb(xm.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-identity"]],decls:16,vars:8,consts:function(){return[["ngbDropdown","","placement","bottom-right"],["ngbDropdownToggle","",6,"title"],["title","Logged in user"],[3,"ngClass"],[1,"d-md-none"],"Logged in user",["ngbDropdownMenu",""],["ngbDropdownItem","","disabled",""],"Signed in as " + "\ufffd#9\ufffd" + "" + "\ufffd0\ufffd" + "" + "\ufffd/#9\ufffd" + "",[1,"dropdown-divider"],["ngbDropdownItem","","routerLink","/user-profile/edit",4,"ngIf"],["ngbDropdownItem","",3,"click"],"Sign out",["ngbDropdownItem","","routerLink","/user-profile/edit"],"Change password"]},template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Sb(1,"a",1),i.Yb(2,2),i.Nb(3,"i",3),i.Sb(4,"span",4),i.Wb(5,5),i.Rb(),i.Rb(),i.Sb(6,"div",6),i.Sb(7,"button",7),i.cc(8,8),i.Nb(9,"strong"),i.Zb(),i.Rb(),i.Nb(10,"li",9),i.Mc(11,eg,4,3,"button",10),i.Sb(12,"button",11),i.gc("click",(function(){return t.logout()})),i.Nb(13,"i",3),i.Sb(14,"span"),i.Wb(15,12),i.Rb(),i.Rb(),i.Rb(),i.Rb()),2&e&&(i.yb(3),i.pc("ngClass",i.uc(4,Xb,t.icons.user)),i.yb(6),i.ac(t.username),i.Xb(8),i.yb(2),i.pc("ngIf",!t.sso),i.yb(2),i.pc("ngClass",i.uc(6,Xb,t.icons.signOut)))},directives:[Qt.i,Qt.m,o.p,Qt.k,On.a,Qt.j,o.r,Pt.f],styles:[""]}),e})();function ng(e,t){1&e&&i.Ob(0)}function ig(e,t){1&e&&i.Ob(0)}function rg(e,t){if(1&e){const e=i.Tb();i.Sb(0,"li",21),i.Nb(1,"cd-language-selector",22),i.Rb(),i.Sb(2,"li",21),i.Sb(3,"cd-notifications",23),i.gc("click",(function(){return i.Dc(e),i.ic().toggleRightSidebar()})),i.Rb(),i.Rb(),i.Sb(4,"li",21),i.Nb(5,"cd-dashboard-help",22),i.Rb(),i.Sb(6,"li",21),i.Nb(7,"cd-administration",22),i.Rb(),i.Sb(8,"li",21),i.Nb(9,"cd-identity",22),i.Rb()}}function sg(e,t){1&e&&(i.Sb(0,"li",49),i.Sb(1,"a",50),i.Wb(2,51),i.Rb(),i.Rb())}function og(e,t){1&e&&(i.Sb(0,"li",52),i.Sb(1,"a",53),i.Wb(2,54),i.Rb(),i.Rb())}function ag(e,t){1&e&&(i.Sb(0,"li",55),i.Sb(1,"a",56),i.Wb(2,57),i.Rb(),i.Rb())}function cg(e,t){1&e&&(i.Sb(0,"li",58),i.Sb(1,"a",59),i.Wb(2,60),i.Rb(),i.Rb())}function lg(e,t){1&e&&(i.Sb(0,"li",61),i.Sb(1,"a",62),i.Wb(2,63),i.Rb(),i.Rb())}function ug(e,t){1&e&&(i.Sb(0,"li",64),i.Sb(1,"a",65),i.Wb(2,66),i.Rb(),i.Rb())}function dg(e,t){1&e&&(i.Sb(0,"li",67),i.Sb(1,"a",68),i.Wb(2,69),i.Rb(),i.Rb())}function hg(e,t){1&e&&(i.Sb(0,"li",70),i.Sb(1,"a",71),i.Wb(2,72),i.Rb(),i.Rb())}function fg(e,t){1&e&&(i.Sb(0,"li",73),i.Sb(1,"a",74),i.Wb(2,75),i.Rb(),i.Rb())}function pg(e,t){if(1&e&&(i.Sb(0,"small",80),i.Oc(1),i.Rb()),2&e){const e=i.ic(5);i.yb(1),i.Pc(e.prometheusAlertService.activeAlerts)}}function mg(e,t){if(1&e&&(i.Sb(0,"li",76),i.Sb(1,"a",77),i.Qb(2),i.Wb(3,78),i.Pb(),i.Mc(4,pg,2,1,"small",79),i.Rb(),i.Rb()),2&e){const e=i.ic(4);i.yb(4),i.pc("ngIf",e.prometheusAlertService.activeAlerts>0)}}function bg(e,t){if(1&e){const e=i.Tb();i.Sb(0,"li",35),i.Sb(1,"a",36),i.gc("click",(function(){return i.Dc(e),i.ic(3).toggleSubMenu("cluster")})),i.Qb(2),i.Wb(3,37),i.Pb(),i.Rb(),i.Sb(4,"ul",38),i.Mc(5,sg,3,0,"li",39),i.Mc(6,og,3,0,"li",40),i.Mc(7,ag,3,0,"li",41),i.Mc(8,cg,3,0,"li",42),i.Mc(9,lg,3,0,"li",43),i.Mc(10,ug,3,0,"li",44),i.Mc(11,dg,3,0,"li",45),i.Mc(12,hg,3,0,"li",46),i.Mc(13,fg,3,0,"li",47),i.Mc(14,mg,5,1,"li",48),i.Rb(),i.Rb()}if(2&e){const e=i.ic(3);i.yb(1),i.zb("aria-expanded","cluster"==e.displayedSubMenu),i.yb(3),i.pc("ngbCollapse","cluster"!==e.displayedSubMenu),i.yb(1),i.pc("ngIf",e.permissions.hosts.read),i.yb(1),i.pc("ngIf",e.permissions.hosts.read),i.yb(1),i.pc("ngIf",e.permissions.monitor.read),i.yb(1),i.pc("ngIf",e.permissions.hosts.read),i.yb(1),i.pc("ngIf",e.permissions.osd.read),i.yb(1),i.pc("ngIf",e.permissions.configOpt.read),i.yb(1),i.pc("ngIf",e.permissions.osd.read),i.yb(1),i.pc("ngIf",e.permissions.configOpt.read),i.yb(1),i.pc("ngIf",e.permissions.log.read),i.yb(1),i.pc("ngIf",e.permissions.prometheus.read)}}function gg(e,t){1&e&&(i.Sb(0,"li",81),i.Sb(1,"a",82),i.Wb(2,83),i.Rb(),i.Rb())}function _g(e,t){1&e&&(i.Sb(0,"li",90),i.Sb(1,"a",91),i.Wb(2,92),i.Rb(),i.Rb())}function yg(e,t){if(1&e&&(i.Sb(0,"small",97),i.Oc(1),i.Rb()),2&e){const e=i.ic(5);i.yb(1),i.Pc(null==e.summaryData||null==e.summaryData.rbd_mirroring?null:e.summaryData.rbd_mirroring.warnings)}}function vg(e,t){if(1&e&&(i.Sb(0,"small",80),i.Oc(1),i.Rb()),2&e){const e=i.ic(5);i.yb(1),i.Pc(null==e.summaryData||null==e.summaryData.rbd_mirroring?null:e.summaryData.rbd_mirroring.errors)}}function wg(e,t){if(1&e&&(i.Sb(0,"li",93),i.Sb(1,"a",94),i.Qb(2),i.Wb(3,95),i.Pb(),i.Mc(4,yg,2,1,"small",96),i.Mc(5,vg,2,1,"small",79),i.Rb(),i.Rb()),2&e){const e=i.ic(4);i.yb(4),i.pc("ngIf",0!==(null==e.summaryData||null==e.summaryData.rbd_mirroring?null:e.summaryData.rbd_mirroring.warnings)),i.yb(1),i.pc("ngIf",0!==(null==e.summaryData||null==e.summaryData.rbd_mirroring?null:e.summaryData.rbd_mirroring.errors))}}function Sg(e,t){1&e&&(i.Sb(0,"li",98),i.Sb(1,"a",99),i.Wb(2,100),i.Rb(),i.Rb())}function Mg(e,t){if(1&e){const e=i.Tb();i.Sb(0,"li",84),i.Sb(1,"a",85),i.gc("click",(function(){return i.Dc(e),i.ic(3).toggleSubMenu("block")})),i.Qb(2),i.Wb(3,86),i.Pb(),i.Rb(),i.Sb(4,"ul",38),i.Mc(5,_g,3,0,"li",87),i.Mc(6,wg,6,2,"li",88),i.Mc(7,Sg,3,0,"li",89),i.Rb(),i.Rb()}if(2&e){const e=i.ic().ngIf,t=i.ic(2);i.yb(1),i.pc("ngStyle",t.blockHealthColor()),i.zb("aria-expanded","block"==t.displayedSubMenu),i.yb(3),i.pc("ngbCollapse","block"!==t.displayedSubMenu),i.yb(1),i.pc("ngIf",t.permissions.rbdImage.read&&e.rbd),i.yb(1),i.pc("ngIf",t.permissions.rbdMirroring.read&&e.mirroring),i.yb(1),i.pc("ngIf",t.permissions.iscsi.read&&e.iscsi)}}function xg(e,t){1&e&&(i.Sb(0,"li",101),i.Sb(1,"a",102),i.Wb(2,103),i.Rb(),i.Rb())}function kg(e,t){1&e&&(i.Sb(0,"li",104),i.Sb(1,"a",105),i.Wb(2,106),i.Rb(),i.Rb())}function Dg(e,t){if(1&e){const e=i.Tb();i.Sb(0,"li",107),i.Sb(1,"a",36),i.gc("click",(function(){return i.Dc(e),i.ic(3).toggleSubMenu("rgw")})),i.Qb(2),i.Wb(3,108),i.Pb(),i.Rb(),i.Sb(4,"ul",38),i.Sb(5,"li",109),i.Sb(6,"a",110),i.Wb(7,111),i.Rb(),i.Rb(),i.Sb(8,"li",112),i.Sb(9,"a",113),i.Wb(10,114),i.Rb(),i.Rb(),i.Sb(11,"li",115),i.Sb(12,"a",116),i.Wb(13,117),i.Rb(),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.ic(3);i.yb(1),i.zb("aria-expanded","rgw"==e.displayedSubMenu),i.yb(3),i.pc("ngbCollapse","rgw"!==e.displayedSubMenu)}}const Tg=function(e){return[e]};function Cg(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"li",25),i.Sb(2,"a",26),i.Sb(3,"span"),i.Wb(4,27),i.Rb(),i.Oc(5,"\xa0 "),i.Nb(6,"i",28),i.jc(7,"healthColor"),i.Rb(),i.Rb(),i.Mc(8,bg,15,12,"li",29),i.Mc(9,gg,3,0,"li",30),i.Mc(10,Mg,8,6,"li",31),i.Mc(11,xg,3,0,"li",32),i.Mc(12,kg,3,0,"li",33),i.Mc(13,Dg,14,2,"li",34),i.Pb()),2&e){const e=t.ngIf,n=i.ic(2);i.yb(6),i.pc("ngClass",i.uc(10,Tg,n.icons.health))("ngStyle",i.kc(7,8,null==n.summaryData?null:n.summaryData.health_status)),i.yb(2),i.pc("ngIf",n.permissions.hosts.read||n.permissions.monitor.read||n.permissions.osd.read||n.permissions.configOpt.read||n.permissions.log.read||n.permissions.prometheus.read),i.yb(1),i.pc("ngIf",n.permissions.pool.read),i.yb(1),i.pc("ngIf",(n.permissions.rbdImage.read||n.permissions.rbdMirroring.read||n.permissions.iscsi.read)&&(e.rbd||e.mirroring||e.iscsi)),i.yb(1),i.pc("ngIf",n.permissions.nfs.read&&e.nfs),i.yb(1),i.pc("ngIf",n.permissions.cephfs.read&&e.cephfs),i.yb(1),i.pc("ngIf",n.permissions.rgw.read&&e.rgw)}}function Og(e,t){if(1&e&&(i.Mc(0,Cg,14,12,"ng-container",24),i.jc(1,"async")),2&e){const e=i.ic();i.pc("ngIf",i.kc(1,1,e.enabledFeature$))}}const Lg=function(e){return{show:e}},Rg=function(e){return{active:e}},Eg=["*"];let Ag=(()=>{class e{constructor(e,t,n,i,r){this.authStorageService=e,this.summaryService=t,this.featureToggles=n,this.telemetryNotificationService=i,this.prometheusAlertService=r,this.notifications=[],this.icons=_n.a,this.rightSidebarOpen=!1,this.showMenuSidebar=!0,this.displayedSubMenu="",this.simplebar={autoHide:!1},this.subs=new Oi.a,this.permissions=this.authStorageService.getPermissions(),this.enabledFeature$=this.featureToggles.get()}get class(){return"top-notification-"+this.notifications.length}ngOnInit(){this.subs.add(this.summaryService.subscribe(e=>{this.summaryData=e})),this.subs.add(this.authStorageService.isPwdDisplayed$.subscribe(e=>{this.showTopNotification("isPwdDisplayed",e)})),this.subs.add(this.telemetryNotificationService.update.subscribe(e=>{this.showTopNotification("telemetryNotificationEnabled",e)}))}ngOnDestroy(){this.subs.unsubscribe()}blockHealthColor(){if(this.summaryData&&this.summaryData.rbd_mirroring){if(this.summaryData.rbd_mirroring.errors>0)return{color:"#d9534f"};if(this.summaryData.rbd_mirroring.warnings>0)return{color:"#f0ad4e"}}}toggleSubMenu(e){this.displayedSubMenu=this.displayedSubMenu===e?"":e}toggleRightSidebar(){this.rightSidebarOpen=!this.rightSidebarOpen}showTopNotification(e,t){if(t)this.notifications.includes(e)||this.notifications.push(e);else{const t=this.notifications.indexOf(e);t>=0&&this.notifications.splice(t,1)}}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Jt.a),i.Mb(ab.a),i.Mb(Dh.a),i.Mb(uh),i.Mb(Yl))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-navigation"]],hostVars:2,hostBindings:function(e,t){2&e&&i.Ab(t.class)},ngContentSelectors:Eg,decls:28,vars:12,consts:function(){return[[1,"cd-navbar-top"],[1,"navbar","fixed-top","navbar-expand-md","navbar-dark","cd-navbar-brand"],[1,"btn","btn-link","py-0",3,"click"],["aria-hidden","true",1,"fa","fa-bars","fa-2x"],["href","#",1,"navbar-brand","ml-2"],["src","assets/Ceph_Ceph_Logo_with_text_white.svg","alt","Ceph"],["type","button",1,"navbar-toggler",3,"click"],[1,"sr-only"],"Toggle navigation",[1,""],[1,"fa","fa-navicon","fa-lg"],[1,"collapse","navbar-collapse",3,"ngClass"],[1,"nav","navbar-nav","cd-navbar-utility","my-2","my-md-0"],[4,"ngTemplateOutlet"],[1,"wrapper"],["id","sidebar",3,"ngClass"],[3,"options"],[1,"list-unstyled","components","cd-navbar-primary"],["id","content",3,"ngClass"],["cd_utilities",""],["cd_menu",""],[1,"nav-item"],[1,"cd-navbar"],[1,"cd-navbar",3,"click"],[4,"ngIf"],["routerLinkActive","active",1,"nav-item","tc_menuitem_dashboard"],["routerLink","/dashboard",1,"nav-link"],"Dashboard",[3,"ngClass","ngStyle"],["routerLinkActive","active","class","nav-item tc_menuitem_cluster",4,"ngIf"],["routerLinkActive","active","class","nav-item tc_menuitem_pool",4,"ngIf"],["routerLinkActive","active","class","nav-item tc_menuitem_block",4,"ngIf"],["routerLinkActive","active","class","nav-item tc_menuitem_nfs",4,"ngIf"],["routerLinkActive","active","class","nav-item tc_menuitem_cephfs",4,"ngIf"],["routerLinkActive","active","class","nav-item tc_menuitem_rgw",4,"ngIf"],["routerLinkActive","active",1,"nav-item","tc_menuitem_cluster"],["aria-controls","collapseBasic",1,"nav-link","dropdown-toggle",3,"click"],"Cluster",[1,"list-unstyled",3,"ngbCollapse"],["routerLinkActive","active","class","tc_submenuitem tc_submenuitem_hosts",4,"ngIf"],["routerLinkActive","active","class","tc_submenuitem tc_submenuitem_cluster_inventory",4,"ngIf"],["routerLinkActive","active","class","tc_submenuitem tc_submenuitem_cluster_monitor",4,"ngIf"],["routerLinkActive","active","class","tc_submenuitem tc_submenuitem_cluster_services",4,"ngIf"],["routerLinkActive","active","class","tc_submenuitem tc_submenuitem_osds",4,"ngIf"],["routerLinkActive","active","class","tc_submenuitem tc_submenuitem_configuration",4,"ngIf"],["routerLinkActive","active","class","tc_submenuitem tc_submenuitem_crush",4,"ngIf"],["routerLinkActive","active","class","tc_submenuitem tc_submenuitem_modules",4,"ngIf"],["routerLinkActive","active","class","tc_submenuitem tc_submenuitem_log",4,"ngIf"],["routerLinkActive","active","class","tc_submenuitem tc_submenuitem_monitoring",4,"ngIf"],["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_hosts"],["routerLink","/hosts"],"Hosts",["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_cluster_inventory"],["routerLink","/inventory"],"Inventory",["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_cluster_monitor"],["routerLink","/monitor/"],"Monitors",["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_cluster_services"],["routerLink","/services/"],"Services",["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_osds"],["routerLink","/osd"],"OSDs",["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_configuration"],["routerLink","/configuration"],"Configuration",["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_crush"],["routerLink","/crush-map"],"CRUSH map",["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_modules"],["routerLink","/mgr-modules"],"Manager Modules",["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_log"],["routerLink","/logs"],"Logs",["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_monitoring"],["routerLink","/monitoring"],"Monitoring",["class","badge badge-danger",4,"ngIf"],[1,"badge","badge-danger"],["routerLinkActive","active",1,"nav-item","tc_menuitem_pool"],["routerLink","/pool",1,"nav-link"],"Pools",["routerLinkActive","active",1,"nav-item","tc_menuitem_block"],["aria-controls","collapseBasic",1,"nav-link","dropdown-toggle",3,"ngStyle","click"],"Block",["routerLinkActive","active","class","tc_submenuitem tc_submenuitem_block_images",4,"ngIf"],["routerLinkActive","active","class","tc_submenuitem tc_submenuitem_block_mirroring",4,"ngIf"],["routerLinkActive","active","class","tc_submenuitem tc_submenuitem_block_iscsi",4,"ngIf"],["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_block_images"],["routerLink","/block/rbd"],"Images",["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_block_mirroring"],["routerLink","/block/mirroring"],"Mirroring",["class","badge badge-warning",4,"ngIf"],[1,"badge","badge-warning"],["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_block_iscsi"],["routerLink","/block/iscsi"],"iSCSI",["routerLinkActive","active",1,"nav-item","tc_menuitem_nfs"],["routerLink","/nfs",1,"nav-link"],"NFS",["routerLinkActive","active",1,"nav-item","tc_menuitem_cephfs"],["routerLink","/cephfs",1,"nav-link"],"File Systems",["routerLinkActive","active",1,"nav-item","tc_menuitem_rgw"],"Object Gateway",["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_rgw_daemons"],["routerLink","/rgw/daemon"],"Daemons",["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_rgw_users"],["routerLink","/rgw/user"],"Users",["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_rgw_buckets"],["routerLink","/rgw/bucket"],"Buckets"]},template:function(e,t){if(1&e&&(i.oc(),i.Nb(0,"cd-pwd-expiration-notification"),i.Nb(1,"cd-telemetry-notification"),i.Nb(2,"cd-notifications-sidebar"),i.Sb(3,"div",0),i.Sb(4,"nav",1),i.Sb(5,"button",2),i.gc("click",(function(){return t.showMenuSidebar=!t.showMenuSidebar})),i.Nb(6,"i",3),i.Rb(),i.Sb(7,"a",4),i.Nb(8,"img",5),i.Rb(),i.Sb(9,"button",6),i.gc("click",(function(){return t.toggleRightSidebar()})),i.Sb(10,"span",7),i.Wb(11,8),i.Rb(),i.Sb(12,"span",9),i.Nb(13,"i",10),i.Rb(),i.Rb(),i.Sb(14,"div",11),i.Sb(15,"ul",12),i.Mc(16,ng,1,0,"ng-container",13),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Sb(17,"div",14),i.Sb(18,"nav",15),i.Sb(19,"ngx-simplebar",16),i.Sb(20,"ul",17),i.Mc(21,ig,1,0,"ng-container",13),i.Rb(),i.Rb(),i.Rb(),i.Sb(22,"div",18),i.nc(23),i.Rb(),i.Rb(),i.Mc(24,rg,10,0,"ng-template",null,19,i.Nc),i.Mc(26,Og,2,3,"ng-template",null,20,i.Nc)),2&e){const e=i.Ac(25),n=i.Ac(27);i.yb(14),i.pc("ngClass",i.uc(6,Lg,t.rightSidebarOpen)),i.yb(2),i.pc("ngTemplateOutlet",e),i.yb(2),i.pc("ngClass",i.uc(8,Rg,!t.showMenuSidebar)),i.yb(1),i.pc("options",t.simplebar),i.yb(2),i.pc("ngTemplateOutlet",n),i.yb(1),i.pc("ngClass",i.uc(10,Rg,!t.showMenuSidebar))}},directives:[pb,bb,Fb,Qt.v,On.a,o.p,o.w,Sb.a,rb,Hb,qb,Zb,tg,o.r,Pt.g,Pt.h,o.s,Qt.e],pipes:[o.b,Hh],styles:['@charset "UTF-8"; cd-navigation .cd-navbar-top .cd-navbar-brand{background:#374249;border-top:4px solid #2b99a8} cd-navigation .cd-navbar-top .cd-navbar-brand.isPwdDisplayed{top:37.6px} cd-navigation .cd-navbar-top .cd-navbar-brand .navbar-brand, cd-navigation .cd-navbar-top .cd-navbar-brand .navbar-brand:hover{color:#e9ecef;height:auto;padding:0} cd-navigation .cd-navbar-top .cd-navbar-brand .navbar-brand>img{height:25px} cd-navigation .cd-navbar-top .cd-navbar-brand .navbar-toggler{border:0} cd-navigation .cd-navbar-top .cd-navbar-brand .navbar-toggler:focus, cd-navigation .cd-navbar-top .cd-navbar-brand .navbar-toggler:hover{outline:0} cd-navigation .cd-navbar-top .cd-navbar-brand .navbar-toggler .fa-navicon{color:#e9ecef} cd-navigation .cd-navbar-top .cd-navbar-brand .navbar-collapse{padding:0} cd-navigation .cd-navbar-top .cd-navbar-brand .cd-navbar-utility>.active>a{background-color:#2b99a8;color:#e9ecef} cd-navigation .cd-navbar-top .cd-navbar-brand .cd-navbar-utility>li>.open>a, cd-navigation .cd-navbar-top .cd-navbar-brand .cd-navbar-utility>li>.open>a:focus, cd-navigation .cd-navbar-top .cd-navbar-brand .cd-navbar-utility>li>.open>a:hover{background-color:initial;border-color:transparent;color:#e9ecef} cd-navigation .cd-navbar-top .navbar-nav>li>.cd-navbar>[ngbDropdown]>a, cd-navigation .cd-navbar-top .navbar-nav>li>.cd-navbar>a, cd-navigation .cd-navbar-top .navbar-nav>li>a{color:#e9ecef;display:block;line-height:1;padding:13.5px 18px!important;position:relative;text-decoration:none} cd-navigation .cd-navbar-top .navbar-nav .nav-link, cd-navigation .cd-navbar-top .navbar-nav .nav-link:hover{color:#e9ecef} cd-navigation .cd-navbar-top .navbar-nav>li:hover, cd-navigation .cd-navbar-top .navbar-nav>li>.cd-navbar>[ngbDropdown].open>a, cd-navigation .cd-navbar-top .navbar-nav>li>.cd-navbar>[ngbDropdown]>a:hover, cd-navigation .cd-navbar-top .navbar-nav>li>.cd-navbar>a:hover, cd-navigation .cd-navbar-top .navbar-nav>li>a:hover{background-color:#2b99a8} cd-navigation .cd-navbar-top .navbar-nav>.open>.cd-navbar>[ngbDropdown]>a, cd-navigation .cd-navbar-top .navbar-nav>.open>.cd-navbar>[ngbDropdown]>a:hover, cd-navigation .cd-navbar-top .navbar-nav>.open>.cd-navbar>a, cd-navigation .cd-navbar-top .navbar-nav>.open>.cd-navbar>a:focus, cd-navigation .cd-navbar-top .navbar-nav>.open>.cd-navbar>a:hover, cd-navigation .cd-navbar-top .navbar-nav>.open>.cd-navbar>li>a:focus, cd-navigation .cd-navbar-top .navbar-nav>.open>a, cd-navigation .cd-navbar-top .navbar-nav>.open>a:focus, cd-navigation .cd-navbar-top .navbar-nav>.open>a:hover{background-color:initial;border-color:transparent;color:#e9ecef}@media (min-width:768px){ cd-navigation .cd-navbar-top .cd-navbar-utility{border-bottom:0;font-size:1.1rem;position:absolute;right:0;top:0}}@media (max-width:calc(768px - 1px)){ cd-navigation .cd-navbar-top .navbar-nav{margin:0} cd-navigation .cd-navbar-top .navbar-nav .fa{margin-right:.5em} cd-navigation .cd-navbar-top .navbar-nav .open .dropdown-menu{background-color:#2b99a8;border:0;padding-bottom:0;padding-top:0} cd-navigation .cd-navbar-top .navbar-nav .open .dropdown-menu>li>a{color:#e9ecef;padding:5px 15px 5px 35px} cd-navigation .cd-navbar-top .navbar-nav .open .dropdown-menu>.active>a, cd-navigation .cd-navbar-top .navbar-nav>li>a:hover{background-color:#2b99a8}}.cd-navbar-primary[_ngcontent-%COMP%] .active[_ngcontent-%COMP%] > a[_ngcontent-%COMP%], .cd-navbar-primary[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]:focus, .cd-navbar-primary[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]:hover{background-color:#2b99a8!important;border:0!important;color:#e9ecef!important}.wrapper[_ngcontent-%COMP%]{display:flex;width:100%}.wrapper[_ngcontent-%COMP%] #sidebar[_ngcontent-%COMP%]{background:#374249;bottom:0;color:#fff;left:0;overflow-y:auto;position:fixed;top:43px;transition:all .3s;width:200px;z-index:999}.wrapper[_ngcontent-%COMP%] #sidebar.active[_ngcontent-%COMP%]{margin-left:-200px}.wrapper[_ngcontent-%COMP%] #sidebar[_ngcontent-%COMP%] ul.component[_ngcontent-%COMP%]{margin:0;padding:20px 0}.wrapper[_ngcontent-%COMP%] #sidebar[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#fff;padding:10px}.wrapper[_ngcontent-%COMP%] #sidebar[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#fff;display:block;font-size:1.1em;padding:10px 10px 10px 27px;text-decoration:none}.wrapper[_ngcontent-%COMP%] #sidebar[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{background:#2b99a8;color:#fff}.wrapper[_ngcontent-%COMP%] #sidebar[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%] > .badge[_ngcontent-%COMP%]{margin-left:5px}.wrapper[_ngcontent-%COMP%] #sidebar[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li.active[_ngcontent-%COMP%] > a[_ngcontent-%COMP%], .wrapper[_ngcontent-%COMP%] #sidebar[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] > a[_ngcontent-%COMP%] a[aria-expanded=true][_ngcontent-%COMP%]{color:#fff}.wrapper[_ngcontent-%COMP%] a.dropdown-toggle[_ngcontent-%COMP%]{position:relative}.wrapper[_ngcontent-%COMP%] a.dropdown-toggle[_ngcontent-%COMP%]:after{border:0;content:"\uf054";font-family:ForkAwesome;font-size:1rem;position:absolute;right:20px;transition:transform .3s ease-in-out}.wrapper[_ngcontent-%COMP%] a.dropdown-toggle[aria-expanded=true][_ngcontent-%COMP%]:after{transform:rotate(90deg)}.wrapper[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{background:#4d5c66;font-size:.9em!important;padding-left:40px!important}.wrapper[_ngcontent-%COMP%] .cd-navbar-primary[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:focus{outline:none}.wrapper[_ngcontent-%COMP%] ngx-simplebar[_ngcontent-%COMP%]{height:100%}#content[_ngcontent-%COMP%]{bottom:0;position:absolute;right:0;top:43px;transition:all .3s;width:calc(100% - 200px)}#content.active[_ngcontent-%COMP%]{width:100vw}.top-notification-1[_nghost-%COMP%] .cd-navbar-top[_ngcontent-%COMP%] .cd-navbar-brand[_ngcontent-%COMP%]{top:37.6px}.top-notification-1[_nghost-%COMP%] #content[_ngcontent-%COMP%], .top-notification-1[_nghost-%COMP%] #sidebar[_ngcontent-%COMP%]{top:80.6px}.top-notification-1[_nghost-%COMP%] cd-notifications-sidebar[_ngcontent-%COMP%]{top:90.6px}.top-notification-2[_nghost-%COMP%] .cd-navbar-top[_ngcontent-%COMP%] .cd-navbar-brand[_ngcontent-%COMP%]{top:75.2px}.top-notification-2[_nghost-%COMP%] #content[_ngcontent-%COMP%], .top-notification-2[_nghost-%COMP%] #sidebar[_ngcontent-%COMP%]{top:118.2px}.top-notification-2[_nghost-%COMP%] cd-notifications-sidebar[_ngcontent-%COMP%]{top:128.2px}']}),e})();var Ig=n("5yfJ"),Pg=n("9xzX");function jg(e,t){if(1&e){const e=i.Tb();i.Qb(0),i.Sb(1,"button",9),i.gc("click",(function(){i.Dc(e);const n=t.$implicit;return i.ic(3).onDaemonSelection(n)})),i.Oc(2),i.Rb(),i.Pb()}if(2&e){const e=t.$implicit;i.yb(2),i.Rc(" ",e.id," ( ",e.zonegroup_name," ) ")}}function Ng(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"div",1),i.Sb(2,"span",2),i.Wb(3,3),i.Rb(),i.Sb(4,"div",4),i.Sb(5,"button",5),i.Yb(6,6),i.Oc(7),i.Rb(),i.Sb(8,"div",7),i.Mc(9,jg,3,2,"ng-container",8),i.Rb(),i.Rb(),i.Rb(),i.Pb()),2&e){const e=i.ic().ngIf;i.yb(7),i.Rc(" ",e.selectedDaemon.id," ( ",e.selectedDaemon.zonegroup_name," ) "),i.yb(2),i.pc("ngForOf",e.daemons)}}function Fg(e,t){if(1&e&&(i.Qb(0),i.Mc(1,Ng,10,3,"ng-container",0),i.Pb()),2&e){const e=t.ngIf,n=i.ic();i.yb(1),i.pc("ngIf",e.ftMap&&e.ftMap.rgw&&n.permissions.rgw.read&&n.isRgwRoute&&e.daemons.length>1)}}const Yg=function(e,t,n){return{ftMap:e,daemons:t,selectedDaemon:n}};let zg=(()=>{class e{constructor(e,t,n,i,r){this.authStorageService=e,this.featureToggles=t,this.router=n,this.timerService=i,this.rgwDaemonService=r,this.REFRESH_INTERVAL=5e3,this.subs=new Oi.a,this.rgwUrlPrefix="/rgw",this.isRgwRoute=document.location.href.includes(this.rgwUrlPrefix)}ngOnInit(){this.permissions=this.authStorageService.getPermissions(),this.featureToggleMap$=this.featureToggles.get(),this.subs.add(this.router.events.pipe(Object(hu.a)(e=>e instanceof Pt.b)).subscribe(()=>this.isRgwRoute=this.router.url.includes(this.rgwUrlPrefix))),this.subs.add(this.timerService.get(()=>this.isRgwRoute?this.rgwDaemonService.list():Ig.a,this.REFRESH_INTERVAL).subscribe())}ngOnDestroy(){this.subs.unsubscribe()}onDaemonSelection(e){this.rgwDaemonService.selectDaemon(e),this.reloadData()}reloadData(){const e=this.router.url;this.router.navigateByUrl(this.rgwUrlPrefix,{skipLocationChange:!0}).finally(()=>{this.router.navigate([e])})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Jt.a),i.Mb(Dh.a),i.Mb(Pt.e),i.Mb(Ri.a),i.Mb(Pg.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-context"]],decls:4,vars:11,consts:function(){return[[4,"ngIf"],[1,"cd-context-bar","pt-3","pb-3"],[1,"mr-1"],"Selected Object Gateway:",["ngbDropdown","","placement","bottom-left",1,"d-inline-block","ml-2"],["ngbDropdownToggle","",1,"btn","btn-outline-info","ctx-bar-selected-rgw-daemon",6,"title"],["title","Select Object Gateway"],["ngbDropdownMenu",""],[4,"ngFor","ngForOf"],["ngbDropdownItem","",1,"ctx-bar-available-rgw-daemon",3,"click"]]},template:function(e,t){1&e&&(i.Mc(0,Fg,2,1,"ng-container",0),i.jc(1,"async"),i.jc(2,"async"),i.jc(3,"async")),2&e&&i.pc("ngIf",i.wc(7,Yg,i.kc(1,1,t.featureToggleMap$),i.kc(2,3,t.rgwDaemonService.daemons$),i.kc(3,5,t.rgwDaemonService.selectedDaemon$)))},directives:[o.r,Qt.i,On.a,Qt.m,Qt.k,o.q,Qt.j],pipes:[o.b],styles:[".cd-context-bar[_ngcontent-%COMP%]{border-bottom:1px solid #dee2e6}"]}),e})();var $g=n("GyhO"),Hg=n("Cfvw"),Wg=n("zx2A");class Vg{constructor(e,t){this.keySelector=e,this.flushes=t}call(e,t){return t.subscribe(new Bg(e,this.keySelector,this.flushes))}}class Bg extends Wg.b{constructor(e,t,n){super(e),this.keySelector=t,this.values=new Set,n&&this.add(Object(Wg.c)(n,new Wg.a(this)))}notifyNext(){this.values.clear()}notifyError(e){this._error(e)}_next(e){this.keySelector?this._useKeySelector(e):this._finalizeNext(e,e)}_useKeySelector(e){let t;const{destination:n}=this;try{t=this.keySelector(e)}catch(i){return void n.error(i)}this._finalizeNext(t,e)}_finalizeNext(e,t){const{values:n}=this;n.has(e)||(n.add(e),this.destination.next(t))}}var Ug=n("SxV6");class qg{resolve(e){const t=e.routeConfig.data,n=null===t.path?null:this.getFullPath(e),i=[{text:"string"==typeof t.breadcrumbs?t.breadcrumbs:t.breadcrumbs.text||t.text||n,path:n}];return Object(Wi.a)(i)}getFullPath(e){return(e=>e.reduce((e,t)=>e+t.url.reduce((e,t)=>e+"/"+t.path,""),""))(e.pathFromRoot)}}function Gg(e,t){if(1&e&&(i.Sb(0,"a",6),i.Oc(1),i.Rb()),2&e){const e=i.ic().$implicit;i.pc("routerLink",e.path),i.yb(1),i.Pc(e.text)}}function Jg(e,t){if(1&e&&(i.Sb(0,"span"),i.Oc(1),i.Rb()),2&e){const e=i.ic().$implicit;i.yb(1),i.Pc(e.text)}}const Qg=function(e){return{active:e}};function Kg(e,t){if(1&e&&(i.Sb(0,"li",3),i.Mc(1,Gg,2,2,"a",4),i.Mc(2,Jg,2,1,"span",5),i.Rb()),2&e){const e=t.$implicit,n=t.last,r=i.ic(2);i.pc("ngClass",i.uc(3,Qg,n&&r.finished)),i.yb(1),i.pc("ngIf",!n&&null!==e.path),i.yb(1),i.pc("ngIf",n||null===e.path)}}function Zg(e,t){if(1&e&&(i.Sb(0,"ol",1),i.Mc(1,Kg,3,5,"li",2),i.Rb()),2&e){const e=i.ic();i.yb(1),i.pc("ngForOf",e.crumbs)}}let Xg=(()=>{class e{constructor(e,t){this.router=e,this.injector=t,this.crumbs=[],this.finished=!1,this.defaultResolver=new qg,this.subscription=this.router.events.pipe(Object(hu.a)(e=>e instanceof Pt.c)).subscribe(()=>{this.finished=!1}),this.subscription=this.router.events.pipe(Object(hu.a)(e=>e instanceof Pt.b)).subscribe(()=>{var t;this._resolveCrumbs(e.routerState.snapshot.root).pipe(Object(Ki.a)(e=>e),(t=e=>e.text,e=>e.lift(new Vg(t,void 0))),Qi(),Object(Ki.a)(e=>{const t=this.postProcess(e);return this.wrapIntoObservable(t).pipe(Object(Ug.a)())})).subscribe(e=>{this.finished=!0,this.crumbs=e})})}ngOnDestroy(){this.subscription.unsubscribe()}_resolveCrumbs(e){let t;const n=e.routeConfig&&e.routeConfig.data;if(n&&n.breadcrumbs){let i;i=n.breadcrumbs.prototype instanceof qg?this.injector.get(n.breadcrumbs):this.defaultResolver;const r=i.resolve(e);t=this.wrapIntoObservable(r).pipe(Object(Ug.a)())}else t=Object(Wi.a)([]);return e.firstChild&&(t=Object($g.a)(t,this._resolveCrumbs(e.firstChild))),t}postProcess(e){const t=[];return e.forEach(e=>{const n=e.text.split("/");if(n.length>1){e.text=n[n.length-1];for(let e=0;e<n.length-1;e++)t.push({text:n[e],path:null})}t.push(e)}),t}isPromise(e){return e&&"function"==typeof e.then}wrapIntoObservable(e){return e instanceof $u.a?e:this.isPromise(e)?Object(Hg.a)(Promise.resolve(e)):Object(Wi.a)(e)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Pt.e),i.Mb(i.s))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-breadcrumbs"]],decls:1,vars:1,consts:[["class","breadcrumb",4,"ngIf"],[1,"breadcrumb"],["class","breadcrumb-item",3,"ngClass",4,"ngFor","ngForOf"],[1,"breadcrumb-item",3,"ngClass"],["preserveFragment","",3,"routerLink",4,"ngIf"],[4,"ngIf"],["preserveFragment","",3,"routerLink"]],template:function(e,t){1&e&&i.Mc(0,Zg,2,1,"ol",0),2&e&&i.pc("ngIf",t.crumbs.length)},directives:[o.r,o.q,o.p,Pt.h],styles:['@charset "UTF-8";.breadcrumb[_ngcontent-%COMP%]{background-color:initial;border-radius:0;margin-top:8px;padding:8px 0}.breadcrumb[_ngcontent-%COMP%] > li[_ngcontent-%COMP%] + li[_ngcontent-%COMP%]:before{content:"\uf101";font-family:ForkAwesome;padding:0 5px 0 7px}']}),e})();const e_=function(e){return{dashboard:e}};let t_=(()=>{class e{constructor(e,t,n,i){this.router=e,this.summaryService=t,this.taskManagerService=n,this.faviconService=i,this.subs=new Oi.a}ngOnInit(){this.subs.add(this.summaryService.startPolling()),this.subs.add(this.taskManagerService.init(this.summaryService)),this.faviconService.init()}ngOnDestroy(){this.subs.unsubscribe()}isDashboardPage(){return"/dashboard"===this.router.url}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Pt.e),i.Mb(ab.a),i.Mb(lb.a),i.Mb(cb))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-workbench-layout"]],features:[i.xb([cb])],decls:6,vars:3,consts:[[1,"container-fluid","h-100",3,"ngClass"]],template:function(e,t){1&e&&(i.Sb(0,"block-ui"),i.Sb(1,"cd-navigation"),i.Sb(2,"div",0),i.Nb(3,"cd-context"),i.Nb(4,"cd-breadcrumbs"),i.Nb(5,"router-outlet"),i.Rb(),i.Rb(),i.Rb()),2&e&&(i.yb(2),i.pc("ngClass",i.uc(1,e_,t.isDashboardPage())))},directives:[_a,Ag,o.p,zg,Xg,Pt.j],styles:[".dashboard[_ngcontent-%COMP%]{background-color:#e9ecef;margin:0;padding:0}.container-fluid[_ngcontent-%COMP%]{overflow:auto}"]}),e})();var n_=n("Avrn");let i_=(()=>{class e{constructor(e,t){this.router=e,this.authStorageService=t}canActivate(e,t){return!(this.authStorageService.isLoggedIn()&&!this.authStorageService.isSSO()&&this.authStorageService.getPwdUpdateRequired()&&(this.router.navigate(["/login-change-password"],{queryParams:{returnUrl:t.url}}),1))}canActivateChild(e,t){return this.canActivate(e,t)}}return e.\u0275fac=function(t){return new(t||e)(i.dc(Pt.e),i.dc(Jt.a))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var r_=n("Vhfg"),s_=n("JIr8");let o_=(()=>{class e{constructor(e,t){this.http=e,this.router=t}canActivate(e){return this.doCheck(e)}canActivateChild(e){return this.doCheck(e)}doCheck(t){if(t.url.length>0&&e.ALLOWLIST.includes(t.url[0].path))return Object(Wi.a)(!0);const n=t.data.moduleStatusGuardConfig;return this.http.get(`api/${n.apiPath}/status`).pipe(Object(Vi.a)(e=>(e.available||this.router.navigate([n.redirectTo||""],{state:{header:n.header,message:e.message,section:n.section,section_info:n.section_info,icon:_n.a.wrench}}),e.available)),Object(s_.a)(()=>(this.router.navigate([n.redirectTo]),Object(Wi.a)(!1))))}}return e.ALLOWLIST=["501"],e.\u0275fac=function(t){return new(t||e)(i.dc(a.b),i.dc(Pt.e))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),a_=(()=>{class e{constructor(e){this.authStorageService=e}canActivate(){if(!this.authStorageService.isSSO())return!0;throw new eu.c}canActivateChild(){return this.canActivate()}}return e.\u0275fac=function(t){return new(t||e)(i.dc(Jt.a))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),c_=(()=>{class e extends qg{resolve(e){const t=[],n=e.queryParams.fromLink||null;let i="";switch(n){case"/monitor":i="Monitors";break;case"/hosts":i="Hosts"}return t.push({text:"Cluster",path:null}),t.push({text:i,path:n}),t.push({text:"Performance Counters",path:""}),t}}return e.\u0275fac=function(t){return l_(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})();const l_=i.Ub(c_);let u_=(()=>{class e extends qg{resolve(e){const t=e.params.name;return[{text:Nt.a.startCase(t)+"/Edit",path:t}]}}return e.\u0275fac=function(t){return d_(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})();const d_=i.Ub(u_),h_=[{path:"",redirectTo:"dashboard",pathMatch:"full"},{path:"",component:t_,canActivate:[n_.a,i_],canActivateChild:[n_.a,i_],children:[{path:"dashboard",component:If},{path:"error",component:Xm},{path:"hosts",data:{breadcrumbs:"Cluster/Hosts"},children:[{path:"",component:co},{path:gn.e.CREATE,component:ur,data:{breadcrumbs:gn.a.CREATE}}]},{path:"monitor",component:Aa,data:{breadcrumbs:"Cluster/Monitors"}},{path:"services",canActivateChild:[o_],data:{moduleStatusGuardConfig:{apiPath:"orchestrator",redirectTo:"error",section:"orch",section_info:"Orchestrator",header:"Orchestrator is not available"},breadcrumbs:"Cluster/Services"},children:[{path:"",component:ch},{path:gn.e.CREATE,component:th,data:{breadcrumbs:gn.a.CREATE}}]},{path:"inventory",canActivate:[o_],component:Yr,data:{moduleStatusGuardConfig:{apiPath:"orchestrator",redirectTo:"error",section:"orch",section_info:"Orchestrator",header:"Orchestrator is not available"},breadcrumbs:"Cluster/Inventory"}},{path:"osd",data:{breadcrumbs:"Cluster/OSDs"},children:[{path:"",component:Il},{path:gn.e.CREATE,component:hc,data:{breadcrumbs:gn.a.CREATE}}]},{path:"configuration",data:{breadcrumbs:"Cluster/Configuration"},children:[{path:"",component:Ci},{path:"edit/:name",component:bi,data:{breadcrumbs:gn.a.EDIT}}]},{path:"crush-map",component:Hi,data:{breadcrumbs:"Cluster/CRUSH map"}},{path:"logs",component:Po,data:{breadcrumbs:"Cluster/Logs"}},{path:"telemetry",component:bh,data:{breadcrumbs:"Telemetry configuration"}},{path:"monitoring",data:{breadcrumbs:"Cluster/Monitoring"},children:[{path:"",redirectTo:"active-alerts",pathMatch:"full"},{path:"active-alerts",data:{breadcrumbs:"Active Alerts"},component:Gl},{path:"alerts",data:{breadcrumbs:"Alerts"},component:Xl},{path:"silences",data:{breadcrumbs:"Silences"},children:[{path:"",component:Bu},{path:gn.e.CREATE,component:Yu,data:{breadcrumbs:gn.a.CREATE+" Silence"}},{path:gn.e.CREATE+"/:id",component:Yu,data:{breadcrumbs:gn.a.CREATE}},{path:gn.e.EDIT+"/:id",component:Yu,data:{breadcrumbs:gn.a.EDIT}},{path:gn.e.RECREATE+"/:id",component:Yu,data:{breadcrumbs:gn.a.RECREATE}}]}]},{path:"perf_counters/:type/:id",component:Mm,data:{breadcrumbs:c_}},{path:"mgr-modules",data:{breadcrumbs:"Cluster/Manager Modules"},children:[{path:"",component:La},{path:"edit/:name",component:oa,data:{breadcrumbs:u_}}]},{path:"pool",data:{breadcrumbs:"Pools"},loadChildren:()=>Promise.all([n.e(1),n.e(5)]).then(n.bind(null,"5azF")).then(e=>e.RoutedPoolModule)},{path:"block",data:{breadcrumbs:!0,text:"Block",path:null},loadChildren:()=>n.e(1).then(n.bind(null,"k/xb")).then(e=>e.RoutedBlockModule)},{path:"cephfs",component:Bn,canActivate:[r_.a],data:{breadcrumbs:"File Systems"}},{path:"rgw",canActivateChild:[r_.a,o_],data:{moduleStatusGuardConfig:{apiPath:"rgw",redirectTo:"error",section:"rgw",section_info:"Object Gateway",header:"The Object Gateway Service is not configured"},breadcrumbs:!0,text:"Object Gateway",path:null},loadChildren:()=>n.e(6).then(n.bind(null,"OkK6")).then(e=>e.RoutedRgwModule)},{path:"user-management",data:{breadcrumbs:"User management",path:null},loadChildren:()=>Promise.resolve().then(n.bind(null,"LceX")).then(e=>e.RoutedAuthModule)},{path:"user-profile",data:{breadcrumbs:"User profile",path:null},children:[{path:gn.e.EDIT,component:Pm,canActivate:[a_],data:{breadcrumbs:gn.a.EDIT}}]},{path:"nfs",canActivateChild:[r_.a,o_],data:{moduleStatusGuardConfig:{apiPath:"nfs-ganesha",redirectTo:"error",section:"nfs-ganesha",section_info:"NFS GANESHA",header:"NFS-Ganesha is not configured"},breadcrumbs:"NFS"},children:[{path:"",component:Sm},{path:gn.e.CREATE,component:um,data:{breadcrumbs:gn.a.CREATE}},{path:gn.e.EDIT+"/:cluster_id/:export_id",component:um,data:{breadcrumbs:gn.a.EDIT}}]}]},{path:"",component:ob,children:[{path:"login",component:Gm},{path:"login-change-password",component:Wm,canActivate:[a_]}]},{path:"",component:eb,children:[{path:"**",redirectTo:"/error"}]}];let f_=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},providers:[u_,c_],imports:[[Pt.i.forRoot(h_,{useHash:!0,preloadingStrategy:Pt.d})],Pt.i]}),e})(),p_=(()=>{class e{constructor(e,t){e.autoClose="outside",e.container="body",e.placement="bottom",t.container="body"}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Qt.x),i.Mb(Qt.E))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-root"]],decls:1,vars:0,template:function(e,t){1&e&&i.Nb(0,"router-outlet")},directives:[Pt.j],styles:[""]}),e})();var m_=n("PCNd");let b_=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[o.c,m_.a,f_,sn.b,kn.c,Qt.t]]}),e})();var g_=n("G6Q+"),__=n("kJI8");let y_=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[f_,o.c,xn.x,m_.a,Qt.t]]}),e})(),v_=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[o.c,g_.a,Qt.t,m_.a,Pt.i,xn.m,xn.x,Qt.F,y_,Qt.H,Qt.C,kn.c,__.a,Qt.h,Qt.y,Qt.l,Hr.a]]}),e})(),w_=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[__.a,o.c,Qt.t,m_.a,sn.b,Pt.i,Qt.y]]}),e})(),S_=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[xn.x,Pt.i,m_.a,Qt.t,o.c,Qt.H,Qt.F]]}),e})(),M_=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[o.c,v_,w_,g_.a,b_,S_,m_.a]]}),e})();var x_=n("LceX");let k_=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[o.c,x_.AuthModule,Qt.f,Qt.l,f_,m_.a,Sb.b,Pt.i]]}),e})(),D_=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[ka.forRoot(),o.c,k_,Qt.l,Pt.i,m_.a],k_]}),e})();var T_=n("z6cu");let C_=(()=>{class e{constructor(e,t,n){this.router=e,this.authStorageService=t,this.notificationService=n}intercept(e,t){const n=e.headers.get("Accept");let i;return i=n&&n.startsWith("application/vnd.ceph.api.v")?e.clone():e.clone({setHeaders:{Accept:"application/vnd.ceph.api.v1.0+json"}}),t.handle(i).pipe(Object(s_.a)(e=>{if(e instanceof a.d){let t;switch(e.status){case 400:const n=new tr.a,i=e.error.task;Nt.a.isPlainObject(i)?(i.metadata.component=i.metadata.component||e.error.component,n.name=i.name,n.metadata=i.metadata):n.metadata=e.error,n.success=!1,n.exception=e.error,t=this.notificationService.notifyTask(n);break;case 401:this.authStorageService.remove(),this.router.navigate(["/login"]);break;case 403:this.router.navigate(["error"],{state:{message:"Sorry, you don\u2019t have permission to view this page or resource.",header:"Access Denied",icon:"fa fa-lock",source:"forbidden"}});break;default:t=this.prepareNotification(e)}e.preventDefault=()=>{this.notificationService.cancel(t)},e.ignoreStatusCode=function(e){this.status===e&&this.preventDefault()}}return Object(T_.a)(e)}))}prepareNotification(e){return this.notificationService.show(()=>{let t="";return Nt.a.isPlainObject(e.error)&&Nt.a.isString(e.error.detail)?t=e.error.detail:Nt.a.isString(e.error)?t=e.error:Nt.a.isString(e.message)&&(t=e.message),new Nl.b(yn.a.error,`${e.status} - ${e.statusText}`,t,void 0,e.application)})}}return e.\u0275fac=function(t){return new(t||e)(i.dc(Pt.e),i.dc(Jt.a),i.dc(wn.a))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),O_=(()=>{class e{constructor(e){this.http=e}jsError(e,t,n){return this.http.post("ui-api/logging/js-error",{url:e,message:t,stack:n})}}return e.\u0275fac=function(t){return new(t||e)(i.dc(a.b))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),L_=(()=>{class e{constructor(e,t){this.injector=e,this.router=t}handleError(e){const t=this.injector.get(O_),n=window.location.href;if(t.jsError(n,e&&e.message,e&&e.stack).subscribe(),!(e.rejection instanceof eu.a))throw e;setTimeout(()=>this.router.navigate(["error"],{state:{message:e.rejection.message,header:e.rejection.header,icon:e.rejection.icon}}),50)}}return e.\u0275fac=function(t){return new(t||e)(i.dc(i.s),i.dc(Pt.e))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})(),R_=(()=>{class e{}return e.\u0275mod=i.Kb({type:e,bootstrap:[p_]}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},providers:[{provide:i.n,useClass:L_},{provide:a.a,useClass:C_,multi:!0},{provide:o.a,useValue:"/"+(window.location.pathname.split("/",1)[1]||"")}],imports:[[a.c,r.a,At,It.a.forRoot({positionClass:"toast-top-right",preventDuplicates:!0,enableHtml:!0}),f_,D_,m_.a,M_],m_.a]}),e})();s.a.production&&Object(i.S)(),r.d().bootstrapModule(R_).then(e=>{if(Object(i.U)()){const t=e.injector.get(i.g).components[0];Object(r.c)(t)}}).catch(e=>console.log(e))},zWsK:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return r}));var i=n("8Y7J");let r=(()=>{class e{transform(e,t,n){return n?t.call(n,e):t(e)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"pipeFunction",type:e,pure:!0}),e})(),s=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)}}),e})()},zc8c:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n("/NlG"),r=n("XFyV"),s=n("spCT"),o=n("8Y7J");let a=(()=>{class e{constructor(e,t,n){this.templateRef=e,this.viewContainer=t,this.componentFactoryResolver=n}set cdFormLoading(e){let t,n;switch(this.viewContainer.clear(),e){case s.b.Loading:t=this.componentFactoryResolver.resolveComponentFactory(r.a),n=this.resolveNgContent("Loading form data..."),this.viewContainer.createComponent(t,null,null,n);break;case s.b.Ready:this.viewContainer.createEmbeddedView(this.templateRef);break;case s.b.Error:t=this.componentFactoryResolver.resolveComponentFactory(i.a),n=this.resolveNgContent("Form data could not be loaded."),this.viewContainer.createComponent(t,null,null,n).instance.type="error"}}resolveNgContent(e){return[[document.createTextNode(e)]]}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(o.L),o.Mb(o.P),o.Mb(o.j))},e.\u0275dir=o.Hb({type:e,selectors:[["","cdFormLoading",""]],inputs:{cdFormLoading:"cdFormLoading"}}),e})()},zk60:function(e,t,n){var i=n("2oRo"),r=n("kRJp");e.exports=function(e,t){try{r(i,e,t)}catch(n){i[e]=t}return t}},zn8P:function(e,t){function n(e){return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}))}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id="zn8P"},zx2A:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return c}));var i=n("7o/Q"),r=n("HDdC"),s=n("SeVD");class o extends i.a{constructor(e){super(),this.parent=e}_next(e){this.parent.notifyNext(e)}_error(e){this.parent.notifyError(e),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class a extends i.a{notifyNext(e){this.destination.next(e)}notifyError(e){this.destination.error(e)}notifyComplete(){this.destination.complete()}}function c(e,t){if(!t.closed)return e instanceof r.a?e.subscribe(t):Object(s.a)(e)(t)}},zx6S:function(e,t,n){!function(e){"use strict";var t={words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,i){var r=t.words[i];return 1===i.length?n?r[0]:r[1]:e+" "+t.correctGrammaticalCase(e,r)}};e.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_\u010detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._\u010det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010de_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[ju\u010de u] LT",lastWeek:function(){return["[pro\u0161le] [nedelje] [u] LT","[pro\u0161log] [ponedeljka] [u] LT","[pro\u0161log] [utorka] [u] LT","[pro\u0161le] [srede] [u] LT","[pro\u0161log] [\u010detvrtka] [u] LT","[pro\u0161log] [petka] [u] LT","[pro\u0161le] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n("wd/R"))}},[[0,0]]]);
\ No newline at end of file
+++ /dev/null
-var $localize=Object.assign(void 0===$localize?{}:$localize,{locale:"en-US"});
-"use strict";(function(global){global.ng=global.ng||{};global.ng.common=global.ng.common||{};global.ng.common.locales=global.ng.common.locales||{};const u=undefined;function plural(n){let i=Math.floor(Math.abs(n)),v=n.toString().replace(/^[^.]*\.?/,"").length;if(i===1&&v===0)return 1;return 5}global.ng.common.locales["en-us-posix"]=["en-US-POSIX",[["a","p"],["AM","PM"],u],[["AM","PM"],u,u],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],u,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],u,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",u,"{1} 'at' {0}",u],[".",",",";","%","+","-","E","\xD7","0/00","INF","NaN",":"],["0.######","0%","\xA4\xA00.00","0.000000E+000"],"USD","$","US Dollar",{},"ltr",plural,[[["mi","n","in the morning","in the afternoon","in the evening","at night"],["midnight","noon","in the morning","in the afternoon","in the evening","at night"],u],[["midnight","noon","morning","afternoon","evening","night"],u,u],["00:00","12:00",["06:00","12:00"],["12:00","18:00"],["18:00","21:00"],["21:00","06:00"]]]]})(typeof globalThis!=="undefined"&&globalThis||typeof global!=="undefined"&&global||typeof window!=="undefined"&&window);;
-(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{"+0ag":function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("8Y7J");let r=(()=>{class e{transform(e){const t=/ceph version\s+[^ ]+\s+\(.+\)\s+(.+)\s+\((.+)\)/.exec(e);return t?"dev"===t[2]?"master":t[1]:e}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"cephReleaseName",type:e,pure:!0}),e})()},"+EN/":function(e,t,n){e.exports={chartHealthCenterTextColor:"#151515",chartHealthCenterTextDescriptionColor:"#72767b",chartHealthColorBlue:"#06c",chartHealthColorCyan:"#73c5c5",chartHealthColorGray:"#ededed",chartHealthColorGreen:"#7cc674",chartHealthColorLightBlue:"#519de9",chartHealthColorLightYellow:"#f9e0a2",chartHealthColorMagenta:"#009596",chartHealthColorOrange:"#ef9234",chartHealthColorPurple:"#3c3d99",chartHealthColorRed:"#c9190b",chartHealthColorYellow:"#f6d173",chartHealthTootlipBgColor:"#000",healthColorError:"#f00",healthColorHealthy:"#0b0",healthColorWarning:"#ffa500"}},"+fVR":function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));class i{setExpandedRow(e){this.expandedRow=e}}},"+s0g":function(e,t,n){!function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),i=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],r=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,i){return e?/-MMM-/.test(i)?n[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"\xe9\xe9n minuut",mm:"%d minuten",h:"\xe9\xe9n uur",hh:"%d uur",d:"\xe9\xe9n dag",dd:"%d dagen",w:"\xe9\xe9n week",ww:"%d weken",M:"\xe9\xe9n maand",MM:"%d maanden",y:"\xe9\xe9n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n("wd/R"))},"//9w":function(e,t,n){!function(e){"use strict";e.defineLocale("se",{months:"o\u0111\u0111ajagem\xe1nnu_guovvam\xe1nnu_njuk\u010dam\xe1nnu_cuo\u014bom\xe1nnu_miessem\xe1nnu_geassem\xe1nnu_suoidnem\xe1nnu_borgem\xe1nnu_\u010dak\u010dam\xe1nnu_golggotm\xe1nnu_sk\xe1bmam\xe1nnu_juovlam\xe1nnu".split("_"),monthsShort:"o\u0111\u0111j_guov_njuk_cuo_mies_geas_suoi_borg_\u010dak\u010d_golg_sk\xe1b_juov".split("_"),weekdays:"sotnabeaivi_vuoss\xe1rga_ma\u014b\u014beb\xe1rga_gaskavahkku_duorastat_bearjadat_l\xe1vvardat".split("_"),weekdaysShort:"sotn_vuos_ma\u014b_gask_duor_bear_l\xe1v".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s gea\u017ees",past:"ma\u014bit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta m\xe1nnu",MM:"%d m\xe1nut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},"/GqU":function(e,t,n){var i=n("RK3t"),r=n("HYAF");e.exports=function(e){return i(r(e))}},"/NlG":function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var i=n("oxzT"),r=n("8Y7J"),s=n("G0yt"),o=n("SVse");const a=function(e){return[e]};function c(e,t){if(1&e&&(r.Sb(0,"td",8),r.Nb(1,"i",9),r.Rb()),2&e){const e=r.ic(2);r.yb(1),r.Cb("alert-",e.bootstrapClass," ",e.typeIcon,""),r.pc("ngClass",r.uc(5,a,e.icons.large3x))}}function l(e,t){if(1&e&&(r.Sb(0,"td",10),r.Oc(1),r.Rb()),2&e){const e=r.ic(2);r.yb(1),r.Pc(e.title)}}function u(e,t){1&e&&r.Ob(0)}function d(e,t){if(1&e&&(r.Qb(0),r.Sb(1,"tr"),r.Mc(2,c,2,7,"td",4),r.Mc(3,l,2,1,"td",5),r.Rb(),r.Sb(4,"tr"),r.Sb(5,"td",6),r.Mc(6,u,1,0,"ng-container",7),r.Rb(),r.Rb(),r.Pb()),2&e){const e=r.ic(),t=r.Ac(6);r.yb(2),r.pc("ngIf",e.showIcon),r.yb(1),r.pc("ngIf",e.showTitle),r.yb(3),r.pc("ngTemplateOutlet",t)}}function h(e,t){if(1&e&&(r.Sb(0,"td",12),r.Nb(1,"i",13),r.Rb()),2&e){const e=r.ic(2);r.yb(1),r.Cb("alert-",e.bootstrapClass," ",e.typeIcon,"")}}function f(e,t){if(1&e&&(r.Sb(0,"td",10),r.Oc(1),r.Rb()),2&e){const e=r.ic(2);r.yb(1),r.Pc(e.title)}}function p(e,t){1&e&&r.Ob(0)}function m(e,t){if(1&e&&(r.Sb(0,"tr"),r.Mc(1,h,2,4,"td",11),r.Mc(2,f,2,1,"td",5),r.Sb(3,"td",6),r.Mc(4,p,1,0,"ng-container",7),r.Rb(),r.Rb()),2&e){const e=r.ic(),t=r.Ac(6);r.yb(1),r.pc("ngIf",e.showIcon),r.yb(1),r.pc("ngIf",e.showTitle),r.yb(2),r.pc("ngTemplateOutlet",t)}}function b(e,t){1&e&&r.nc(0)}const g=["*"];let _=(()=>{class e{constructor(){this.title="",this.bootstrapClass="",this.size="normal",this.showIcon=!0,this.showTitle=!0,this.icons=i.a}ngOnInit(){switch(this.type){case"warning":this.title=this.title||"Warning",this.typeIcon=this.typeIcon||i.a.warning,this.bootstrapClass=this.bootstrapClass||"warning";break;case"error":this.title=this.title||"Error",this.typeIcon=this.typeIcon||i.a.destroyCircle,this.bootstrapClass=this.bootstrapClass||"danger";break;case"info":this.title=this.title||"Information",this.typeIcon=this.typeIcon||i.a.infoCircle,this.bootstrapClass=this.bootstrapClass||"info";break;case"success":this.title=this.title||"Success",this.typeIcon=this.typeIcon||i.a.check,this.bootstrapClass=this.bootstrapClass||"success"}}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=r.Gb({type:e,selectors:[["cd-alert-panel"]],inputs:{title:"title",bootstrapClass:"bootstrapClass",type:"type",typeIcon:"typeIcon",size:"size",showIcon:"showIcon",showTitle:"showTitle"},ngContentSelectors:g,decls:7,vars:4,consts:[[3,"type","dismissible"],[4,"ngIf","ngIfElse"],["slim",""],["content",""],["rowspan","2","class","alert-panel-icon",4,"ngIf"],["class","alert-panel-title",4,"ngIf"],[1,"alert-panel-text"],[4,"ngTemplateOutlet"],["rowspan","2",1,"alert-panel-icon"],["aria-hidden","true",3,"ngClass"],[1,"alert-panel-title"],["class","alert-panel-icon",4,"ngIf"],[1,"alert-panel-icon"],["aria-hidden","true"]],template:function(e,t){if(1&e&&(r.oc(),r.Sb(0,"ngb-alert",0),r.Sb(1,"table"),r.Mc(2,d,7,3,"ng-container",1),r.Mc(3,m,5,3,"ng-template",null,2,r.Nc),r.Rb(),r.Rb(),r.Mc(5,b,1,0,"ng-template",null,3,r.Nc)),2&e){const e=r.Ac(4);r.qc("type",t.bootstrapClass),r.pc("dismissible",!1),r.yb(2),r.pc("ngIf","normal"===t.size)("ngIfElse",e)}},directives:[s.b,o.r,o.w,o.p],styles:[".alert-panel-icon[_ngcontent-%COMP%]{padding-right:.5em;vertical-align:top}.alert-panel-title[_ngcontent-%COMP%]{font-weight:700}"]}),e})()},"/X5v":function(e,t,n){!function(e){"use strict";e.defineLocale("x-pseudo",{months:"J~\xe1\xf1\xfa\xe1~r\xfd_F~\xe9br\xfa~\xe1r\xfd_~M\xe1rc~h_\xc1p~r\xedl_~M\xe1\xfd_~J\xfa\xf1\xe9~_J\xfal~\xfd_\xc1\xfa~g\xfast~_S\xe9p~t\xe9mb~\xe9r_\xd3~ct\xf3b~\xe9r_\xd1~\xf3v\xe9m~b\xe9r_~D\xe9c\xe9~mb\xe9r".split("_"),monthsShort:"J~\xe1\xf1_~F\xe9b_~M\xe1r_~\xc1pr_~M\xe1\xfd_~J\xfa\xf1_~J\xfal_~\xc1\xfag_~S\xe9p_~\xd3ct_~\xd1\xf3v_~D\xe9c".split("_"),monthsParseExact:!0,weekdays:"S~\xfa\xf1d\xe1~\xfd_M\xf3~\xf1d\xe1\xfd~_T\xfa\xe9~sd\xe1\xfd~_W\xe9d~\xf1\xe9sd~\xe1\xfd_T~h\xfars~d\xe1\xfd_~Fr\xedd~\xe1\xfd_S~\xe1t\xfar~d\xe1\xfd".split("_"),weekdaysShort:"S~\xfa\xf1_~M\xf3\xf1_~T\xfa\xe9_~W\xe9d_~Th\xfa_~Fr\xed_~S\xe1t".split("_"),weekdaysMin:"S~\xfa_M\xf3~_T\xfa_~W\xe9_T~h_Fr~_S\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~\xf3d\xe1~\xfd \xe1t] LT",nextDay:"[T~\xf3m\xf3~rr\xf3~w \xe1t] LT",nextWeek:"dddd [\xe1t] LT",lastDay:"[\xdd~\xe9st~\xe9rd\xe1~\xfd \xe1t] LT",lastWeek:"[L~\xe1st] dddd [\xe1t] LT",sameElse:"L"},relativeTime:{future:"\xed~\xf1 %s",past:"%s \xe1~g\xf3",s:"\xe1 ~f\xe9w ~s\xe9c\xf3~\xf1ds",ss:"%d s~\xe9c\xf3\xf1~ds",m:"\xe1 ~m\xed\xf1~\xfat\xe9",mm:"%d m~\xed\xf1\xfa~t\xe9s",h:"\xe1~\xf1 h\xf3~\xfar",hh:"%d h~\xf3\xfars",d:"\xe1 ~d\xe1\xfd",dd:"%d d~\xe1\xfds",M:"\xe1 ~m\xf3\xf1~th",MM:"%d m~\xf3\xf1t~hs",y:"\xe1 ~\xfd\xe9\xe1r",yy:"%d \xfd~\xe9\xe1rs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n("wd/R"))},"/b8u":function(e,t,n){var i=n("STAE");e.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},"/byt":function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},"/uUt":function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("7o/Q");function r(e,t){return n=>n.lift(new s(e,t))}class s{constructor(e,t){this.compare=e,this.keySelector=t}call(e,t){return t.subscribe(new o(e,this.compare,this.keySelector))}}class o extends i.a{constructor(e,t,n){super(e),this.keySelector=n,this.hasKey=!1,"function"==typeof t&&(this.compare=t)}compare(e,t){return e===t}_next(e){let t;try{const{keySelector:n}=this;t=n?n(e):e}catch(i){return this.destination.error(i)}let n=!1;if(this.hasKey)try{const{compare:e}=this;n=e(this.key,t)}catch(i){return this.destination.error(i)}else this.hasKey=!0;n||(this.key=t,this.destination.next(e))}}},0:function(e,t,n){e.exports=n("zUnb")},"0+/T":function(e,t,n){"use strict";n.d(t,"a",(function(){return D}));var i=n("s7LF"),r=n("QFaf"),s=n("sb0X"),o=n("8Y7J"),a=n("G0yt"),c=n("ajRT"),l=n("SVse"),u=n("NwgZ"),d=n("ocLN"),h=n("ANnk"),f=n("f69J"),p=n("IZUe"),m=n("6+kj");function b(e,t){1&e&&o.Ob(0)}function g(e,t){1&e&&o.Ob(0)}function _(e,t){if(1&e&&(o.Sb(0,"p"),o.cc(1,21),o.jc(2,"lowercase"),o.Nb(3,"strong"),o.Zb(),o.Rb()),2&e){const e=o.ic(2);o.yb(3),o.ac(o.kc(2,2,e.actionDescription))(e.itemNames[0]),o.Xb(1)}}function y(e,t){if(1&e&&(o.Sb(0,"li"),o.Sb(1,"strong"),o.Oc(2),o.Rb(),o.Rb()),2&e){const e=t.$implicit;o.yb(2),o.Pc(e)}}function v(e,t){if(1&e&&(o.Sb(0,"p"),o.Wb(1,22),o.jc(2,"lowercase"),o.Rb(),o.Sb(3,"ul"),o.Mc(4,y,3,1,"li",23),o.Rb()),2&e){const e=o.ic(2);o.yb(2),o.ac(o.kc(2,2,e.actionDescription)),o.Xb(1),o.yb(2),o.pc("ngForOf",e.itemNames)}}function w(e,t){if(1&e&&(o.Sb(0,"span"),o.Mc(1,_,4,4,"p",10),o.Mc(2,v,5,4,"ng-template",null,20,o.Nc),o.Rb()),2&e){const e=o.Ac(3),t=o.ic();o.yb(1),o.pc("ngIf",1===t.itemNames.length)("ngIfElse",e)}}function S(e,t){if(1&e&&(o.Sb(0,"p"),o.Wb(1,24),o.jc(2,"lowercase"),o.Rb()),2&e){const e=o.ic();o.yb(2),o.ac(o.kc(2,2,e.actionDescription))(e.itemDescription),o.Xb(1)}}function M(e,t){1&e&&o.Ob(0)}function k(e,t){if(1&e&&(o.Oc(0),o.jc(1,"titlecase")),2&e){const e=o.ic();o.Rc(" ",o.kc(1,2,e.actionDescription)," ",e.itemDescription,"\n")}}const x=function(e){return{form:e}};let D=(()=>{class e{constructor(e){this.activeModal=e,this.actionDescription="delete"}ngOnInit(){const e={confirmation:new i.h(!1,[i.A.requiredTrue])};if(this.childFormGroup&&(e.child=this.childFormGroup),this.deletionForm=new r.a(e),!this.submitAction&&!this.submitActionObservable)throw new Error("No submit action defined")}callSubmitAction(){this.submitActionObservable?this.submitActionObservable().subscribe({error:this.stopLoadingSpinner.bind(this),complete:this.hideModal.bind(this)}):this.submitAction()}hideModal(){this.activeModal.close()}stopLoadingSpinner(){this.deletionForm.setErrors({cdSubmitButton:!0})}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(a.a))},e.\u0275cmp=o.Gb({type:e,selectors:[["cd-deletion-modal"]],viewQuery:function(e,t){var n;1&e&&o.Jc(s.a,!0),2&e&&o.zc(n=o.hc())&&(t.submitButton=n.first)},decls:24,vars:15,consts:function(){return[[3,"modalRef"],["modal",""],[1,"modal-title"],[4,"ngTemplateOutlet"],[1,"modal-content"],["name","deletionForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"question"],[4,"ngIf","ngIfElse"],["noNames",""],[1,"form-group"],[1,"custom-control","custom-checkbox"],["type","checkbox","name","confirmation","id","confirmation","formControlName","confirmation","autofocus","",1,"custom-control-input"],["for","confirmation",1,"custom-control-label"],"Yes, I am sure.",[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],["deletionHeading",""],["manyNames",""],"Are you sure that you want to " + "\ufffd0\ufffd" + " " + "\ufffd#3\ufffd" + "" + "\ufffd1\ufffd" + "" + "\ufffd/#3\ufffd" + "?","Are you sure that you want to " + "\ufffd0\ufffd" + " the selected items?",[4,"ngFor","ngForOf"],"Are you sure that you want to " + "\ufffd0\ufffd" + " the selected " + "\ufffd1\ufffd" + "?"]},template:function(e,t){if(1&e&&(o.Sb(0,"cd-modal",0,1),o.Qb(2,2),o.Mc(3,b,1,0,"ng-container",3),o.Pb(),o.Qb(4,4),o.Sb(5,"form",5,6),o.Sb(7,"div",7),o.Mc(8,g,1,0,"ng-container",8),o.Sb(9,"div",9),o.Mc(10,w,4,2,"span",10),o.Mc(11,S,3,4,"ng-template",null,11,o.Nc),o.Mc(13,M,1,0,"ng-container",8),o.Sb(14,"div",12),o.Sb(15,"div",13),o.Nb(16,"input",14),o.Sb(17,"label",15),o.Wb(18,16),o.Rb(),o.Rb(),o.Rb(),o.Rb(),o.Rb(),o.Sb(19,"div",17),o.Sb(20,"cd-form-button-panel",18),o.gc("submitActionEvent",(function(){return t.callSubmitAction()})),o.jc(21,"titlecase"),o.Rb(),o.Rb(),o.Rb(),o.Pb(),o.Rb(),o.Mc(22,k,2,4,"ng-template",null,19,o.Nc)),2&e){const e=o.Ac(12),n=o.Ac(23);o.pc("modalRef",t.activeModal),o.yb(3),o.pc("ngTemplateOutlet",n),o.yb(2),o.pc("formGroup",t.deletionForm),o.yb(3),o.pc("ngTemplateOutlet",t.bodyTemplate)("ngTemplateOutletContext",t.bodyContext),o.yb(2),o.pc("ngIf",t.itemNames)("ngIfElse",e),o.yb(3),o.pc("ngTemplateOutlet",t.childFormGroupTemplate)("ngTemplateOutletContext",o.uc(13,x,t.deletionForm)),o.yb(7),o.pc("form",t.deletionForm)("submitText",o.kc(21,11,t.actionDescription)+" "+t.itemDescription)}},directives:[c.a,l.w,i.C,i.r,i.k,u.a,l.r,d.a,h.a,i.b,f.a,i.q,i.i,p.a,m.a,l.q],pipes:[l.A,l.o],styles:[".modal-body[_ngcontent-%COMP%] .question[_ngcontent-%COMP%]{margin-top:1em}.modal-body[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-weight:700}.modal-body[_ngcontent-%COMP%] .question[_ngcontent-%COMP%] .form-check[_ngcontent-%COMP%]{padding-top:7px}"]}),e})()},"07d7":function(e,t,n){var i=n("AO7/"),r=n("busE"),s=n("sEFX");i||r(Object.prototype,"toString",s,{unsafe:!0})},"0BK2":function(e,t){e.exports={}},"0Dky":function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},"0EUg":function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("bHdf");function r(){return Object(i.a)(1)}},"0GbY":function(e,t,n){var i=n("Qo9l"),r=n("2oRo"),s=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?s(i[e])||s(r[e]):i[e]&&i[e][t]||r[e]&&r[e][t]}},"0eef":function(e,t,n){"use strict";var i={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,s=r&&!i.call({1:2},1);t.f=s?function(e){var t=r(this,e);return!!t&&t.enumerable}:i},"0mo+":function(e,t,n){!function(e){"use strict";var t={1:"\u0f21",2:"\u0f22",3:"\u0f23",4:"\u0f24",5:"\u0f25",6:"\u0f26",7:"\u0f27",8:"\u0f28",9:"\u0f29",0:"\u0f20"},n={"\u0f21":"1","\u0f22":"2","\u0f23":"3","\u0f24":"4","\u0f25":"5","\u0f26":"6","\u0f27":"7","\u0f28":"8","\u0f29":"9","\u0f20":"0"};e.defineLocale("bo",{months:"\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f44\u0f0b\u0f54\u0f7c_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f66\u0f74\u0f58\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f5e\u0f72\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f63\u0f94\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0fb2\u0f74\u0f42\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f62\u0f92\u0fb1\u0f51\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f42\u0f74\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f45\u0f72\u0f42\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54".split("_"),monthsShort:"\u0f5f\u0fb3\u0f0b1_\u0f5f\u0fb3\u0f0b2_\u0f5f\u0fb3\u0f0b3_\u0f5f\u0fb3\u0f0b4_\u0f5f\u0fb3\u0f0b5_\u0f5f\u0fb3\u0f0b6_\u0f5f\u0fb3\u0f0b7_\u0f5f\u0fb3\u0f0b8_\u0f5f\u0fb3\u0f0b9_\u0f5f\u0fb3\u0f0b10_\u0f5f\u0fb3\u0f0b11_\u0f5f\u0fb3\u0f0b12".split("_"),monthsShortRegex:/^(\u0f5f\u0fb3\u0f0b\d{1,2})/,monthsParseExact:!0,weekdays:"\u0f42\u0f5f\u0f60\u0f0b\u0f49\u0f72\u0f0b\u0f58\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74_\u0f42\u0f5f\u0f60\u0f0b\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b".split("_"),weekdaysShort:"\u0f49\u0f72\u0f0b\u0f58\u0f0b_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b_\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b_\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b_\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74_\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b_\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b".split("_"),weekdaysMin:"\u0f49\u0f72_\u0f5f\u0fb3_\u0f58\u0f72\u0f42_\u0f63\u0fb7\u0f42_\u0f55\u0f74\u0f62_\u0f66\u0f44\u0f66_\u0f66\u0fa4\u0f7a\u0f53".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[\u0f51\u0f72\u0f0b\u0f62\u0f72\u0f44] LT",nextDay:"[\u0f66\u0f44\u0f0b\u0f49\u0f72\u0f53] LT",nextWeek:"[\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f55\u0fb2\u0f42\u0f0b\u0f62\u0f97\u0f7a\u0f66\u0f0b\u0f58], LT",lastDay:"[\u0f41\u0f0b\u0f66\u0f44] LT",lastWeek:"[\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f55\u0fb2\u0f42\u0f0b\u0f58\u0f50\u0f60\u0f0b\u0f58] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0f63\u0f0b",past:"%s \u0f66\u0f94\u0f53\u0f0b\u0f63",s:"\u0f63\u0f58\u0f0b\u0f66\u0f44",ss:"%d \u0f66\u0f90\u0f62\u0f0b\u0f46\u0f0d",m:"\u0f66\u0f90\u0f62\u0f0b\u0f58\u0f0b\u0f42\u0f45\u0f72\u0f42",mm:"%d \u0f66\u0f90\u0f62\u0f0b\u0f58",h:"\u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51\u0f0b\u0f42\u0f45\u0f72\u0f42",hh:"%d \u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51",d:"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f45\u0f72\u0f42",dd:"%d \u0f49\u0f72\u0f53\u0f0b",M:"\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f45\u0f72\u0f42",MM:"%d \u0f5f\u0fb3\u0f0b\u0f56",y:"\u0f63\u0f7c\u0f0b\u0f42\u0f45\u0f72\u0f42",yy:"%d \u0f63\u0f7c"},preparse:function(e){return e.replace(/[\u0f21\u0f22\u0f23\u0f24\u0f25\u0f26\u0f27\u0f28\u0f29\u0f20]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c|\u0f5e\u0f7c\u0f42\u0f66\u0f0b\u0f40\u0f66|\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44|\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42|\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c"===t&&e>=4||"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44"===t&&e<5||"\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42"===t?e+12:e},meridiem:function(e,t,n){return e<4?"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c":e<10?"\u0f5e\u0f7c\u0f42\u0f66\u0f0b\u0f40\u0f66":e<17?"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44":e<20?"\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42":"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c"},week:{dow:0,doy:6}})}(n("wd/R"))},"0rvr":function(e,t,n){var i=n("glrk"),r=n("O741");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(s){}return function(n,s){return i(n),r(s),t?e.call(n,s):n.__proto__=s,n}}():void 0)},"0tRk":function(e,t,n){!function(e){"use strict";e.defineLocale("pt-br",{months:"janeiro_fevereiro_mar\xe7o_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_ter\xe7a-feira_quarta-feira_quinta-feira_sexta-feira_s\xe1bado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_s\xe1b".split("_"),weekdaysMin:"do_2\xaa_3\xaa_4\xaa_5\xaa_6\xaa_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [\xe0s] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [\xe0s] HH:mm"},calendar:{sameDay:"[Hoje \xe0s] LT",nextDay:"[Amanh\xe3 \xe0s] LT",nextWeek:"dddd [\xe0s] LT",lastDay:"[Ontem \xe0s] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[\xdaltimo] dddd [\xe0s] LT":"[\xdaltima] dddd [\xe0s] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"h\xe1 %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um m\xeas",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",invalidDate:"Data inv\xe1lida"})}(n("wd/R"))},"14Sl":function(e,t,n){"use strict";n("rB9j");var i=n("busE"),r=n("0Dky"),s=n("tiKp"),o=n("kmMV"),a=n("kRJp"),c=s("species"),l=!r((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),u="$0"==="a".replace(/./,"$0"),d=s("replace"),h=!!/./[d]&&""===/./[d]("a","$0"),f=!r((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,d){var p=s(e),m=!r((function(){var t={};return t[p]=function(){return 7},7!=""[e](t)})),b=m&&!r((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[c]=function(){return n},n.flags="",n[p]=/./[p]),n.exec=function(){return t=!0,null},n[p](""),!t}));if(!m||!b||"replace"===e&&(!l||!u||h)||"split"===e&&!f){var g=/./[p],_=n(p,""[e],(function(e,t,n,i,r){return t.exec===o?m&&!r?{done:!0,value:g.call(t,n,i)}:{done:!0,value:e.call(n,t,i)}:{done:!1}}),{REPLACE_KEEPS_$0:u,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:h}),y=_[1];i(String.prototype,e,_[0]),i(RegExp.prototype,p,2==t?function(e,t){return y.call(e,this,t)}:function(e){return y.call(e,this)})}d&&a(RegExp.prototype[p],"sham",!0)}},"1E5z":function(e,t,n){var i=n("m/L8").f,r=n("UTVS"),s=n("tiKp")("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,s)&&i(e,s,{configurable:!0,value:t})}},"1G5W":function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("zx2A");function r(e){return t=>t.lift(new s(e))}class s{constructor(e){this.notifier=e}call(e,t){const n=new o(e),r=Object(i.c)(this.notifier,new i.a(n));return r&&!n.seenValue?(n.add(r),t.subscribe(n)):n}}class o extends i.b{constructor(e){super(e),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}},"1Ni5":function(e,t,n){"use strict";n.d(t,"b",(function(){return p})),n.d(t,"a",(function(){return m}));var i=n("s7LF"),r=n("LvDl"),s=n.n(r),o=n("LRne"),a=n("PqYM"),c=n("eIep");function l(e,t){return t?Object(c.a)(()=>e,t):Object(c.a)(()=>e)}var u=n("lJxs"),d=n("IzEk"),h=n("Fgil"),f=n("aXbf");function p(e){return null==e||0===e.length}class m{static email(e){return p(e.value)?null:i.A.email(e)}static ip(e=0){const t=/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i,n=/^(?:[a-f0-9]{1,4}:){7}[a-f0-9]{1,4}$/i;return i.A.pattern(4===e?t:6===e?n:new RegExp(t.source+"|"+n.source))}static number(e=!0){return i.A.pattern(e?/^-?[0-9]+$/i:/^[0-9]+$/i)}static decimalNumber(e=!0){return i.A.pattern(e?/^-?[0-9]+(.[0-9]+)?$/i:/^[0-9]+(.[0-9]+)?$/i)}static sslCert(){return i.A.pattern(/^-----BEGIN CERTIFICATE-----(\n|\r|\f)((.+)?((\n|\r|\f).+)*)(\n|\r|\f)-----END CERTIFICATE-----[\n\r\f]*$/)}static sslPrivKey(){return i.A.pattern(/^-----BEGIN RSA PRIVATE KEY-----(\n|\r|\f)((.+)?((\n|\r|\f).+)*)(\n|\r|\f)-----END RSA PRIVATE KEY-----[\n\r\f]*$/)}static requiredIf(e,t){let n=!1;return i=>(!n&&i.parent&&(Object.keys(e).forEach(e=>{i.parent.get(e).valueChanges.subscribe(()=>{i.updateValueAndValidity({emitEvent:!1})})}),n=!0),Object.keys(e).every(t=>{if(!i.parent)return!1;const n=i.parent.get(t).value,r=e[t];if(s.a.isObjectLike(r)){let e=!1;switch(r.op){case"empty":e=s.a.isEmpty(n);break;case"!empty":e=!s.a.isEmpty(n);break;case"equal":e=n===r.arg1;break;case"!equal":e=n!==r.arg1;break;case"minLength":s.a.isString(n)&&(e=n.length>=r.arg1)}return e}return n===r})&&(s.a.isFunction(t)?t.call(t,i.value):p(i.value))?{required:!0}:null)}static composeIf(e,t){let n=!1;return r=>(!n&&r.parent&&(Object.keys(e).forEach(e=>{r.parent.get(e).valueChanges.subscribe(()=>{r.updateValueAndValidity({emitEvent:!1})})}),n=!0),Object.keys(e).every(t=>r.parent&&r.parent.get(t).value===e[t])?i.A.compose(t)(r):null)}static custom(e,t){return n=>{const i=t.call(this,n.value);return i?{[e]:i}:null}}static validateIf(e,t,n,r=[],s=[]){n=n.concat(r),e.setValidators(e=>t.call(this)?i.A.compose(n)(e):r.length>0?i.A.compose(r)(e):null),s.forEach(t=>{t.valueChanges.subscribe(()=>{e.updateValueAndValidity({emitEvent:!1})})})}static match(e,t){return n=>{const i=n.get(e),r=n.get(t);if(!i||!r)return null;if(i.value!==r.value)r.setErrors({match:!0});else if(r.hasError("match")){const e=r.errors;s.a.unset(e,"match"),r.setErrors(s.a.isEmpty(s.a.keys(e))?null:e)}return null}}static unique(e,t=null,n,i=!1,r=500){let c;return h=>h.pristine||p(h.value)?Object(o.a)(null):(c=h.value,s.a.isFunction(n)&&null!==n()&&""!==n()&&(c=i?`${h.value}$${n()}`:`${n()}$${h.value}`),Object(a.a)(r).pipe(l(e.call(t,c)),Object(u.a)(e=>e?{notUnique:!0}:null),Object(d.a)(1)))}static uuid(e=!1){const t=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;return n=>n.pristine&&n.untouched?null:e||n.value?t.test(n.value)?null:{invalidUuid:"This is not a valid UUID"}:null}static binaryMin(e){return t=>{const n=new f.a,i=(new f.a).toBytes(t.value);if(e<=i)return null;const r=new h.a(n).transform(e);return{binaryMin:()=>"Size has to be at least " + r + " or more"}}}static binaryMax(e){return t=>{const n=new f.a,i=n.toBytes(t.value);if(e>=i)return null;const r=new h.a(n).transform(e);return{binaryMax:()=>"Size has to be at most " + r + " or less"}}}static passwordPolicy(e,t,n){return i=>{if(i.pristine||""===i.value)return s.a.isFunction(n)&&n(!0,0),Object(o.a)(null);let r;return s.a.isFunction(t)&&(r=t()),Object(a.a)(500).pipe(l(s.a.invoke(e,"validatePassword",i.value,r)),Object(u.a)(e=>(s.a.isFunction(n)&&n(e.valid,e.credits,e.valuation),e.valid?null:{passwordPolicy:!0})),Object(d.a)(1))}}}},"1Y/n":function(e,t,n){var i=n("HAuM"),r=n("ewvW"),s=n("RK3t"),o=n("UMSQ"),a=function(e){return function(t,n,a,c){i(n);var l=r(t),u=s(l),d=o(l.length),h=e?d-1:0,f=e?-1:1;if(a<2)for(;;){if(h in u){c=u[h],h+=f;break}if(h+=f,e?h<0:d<=h)throw TypeError("Reduce of empty array with no initial value")}for(;e?h>=0:d>h;h+=f)h in u&&(c=n(c,u[h],h,l));return c}};e.exports={left:a(!1),right:a(!0)}},"1nQr":function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i=n("LvDl"),r=n.n(i),s=n("lJxs"),o=n("20UP");class a{constructor(e){this.pwdPolicyEnabled=e.pwd_policy_enabled,this.pwdPolicyMinLength=e.pwd_policy_min_length,this.pwdPolicyCheckLengthEnabled=e.pwd_policy_check_length_enabled,this.pwdPolicyCheckOldpwdEnabled=e.pwd_policy_check_oldpwd_enabled,this.pwdPolicyCheckUsernameEnabled=e.pwd_policy_check_username_enabled,this.pwdPolicyCheckExclusionListEnabled=e.pwd_policy_check_exclusion_list_enabled,this.pwdPolicyCheckRepetitiveCharsEnabled=e.pwd_policy_check_repetitive_chars_enabled,this.pwdPolicyCheckSequentialCharsEnabled=e.pwd_policy_check_sequential_chars_enabled,this.pwdPolicyCheckComplexityEnabled=e.pwd_policy_check_complexity_enabled}}var c=n("8Y7J");let l=(()=>{class e{constructor(e){this.settingsService=e}getHelpText(){return this.settingsService.getStandardSettings().pipe(Object(s.a)(e=>{const t=new a(e);let n=[];if(t.pwdPolicyEnabled){n.push("Required rules for passwords:");const e={pwdPolicyCheckLengthEnabled:"Must contain at least " + t.pwdPolicyMinLength + " characters",pwdPolicyCheckOldpwdEnabled:"Must not be the same as the previous one",pwdPolicyCheckUsernameEnabled:"Cannot contain the username",pwdPolicyCheckExclusionListEnabled:"Cannot contain any configured keyword",pwdPolicyCheckRepetitiveCharsEnabled:"Cannot contain any repetitive characters e.g. \"aaa\"",pwdPolicyCheckSequentialCharsEnabled:"Cannot contain any sequential characters e.g. \"abc\"",pwdPolicyCheckComplexityEnabled:"Must consist of characters from the following groups:\n * Alphabetic a-z, A-Z\n * Numbers 0-9\n * Special chars: !\"#$%& '()*+,-./:;<=>?@[\\]^_`{{|}}~\n * Any other characters (signs)"};n=n.concat(r.a.keys(e).filter(e=>r.a.get(t,e)).map(t=>"- "+r.a.get(e,t)))}return n.join("\n")}))}mapCreditsToCssClass(e){let t="very-strong";return e<10?t="too-weak":e<15?t="weak":e<20?t="ok":e<25&&(t="strong"),t}}return e.\u0275fac=function(t){return new(t||e)(c.dc(o.a))},e.\u0275prov=c.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},"1ppg":function(e,t,n){!function(e){"use strict";e.defineLocale("fil",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n("wd/R"))},"1rYy":function(e,t,n){!function(e){"use strict";e.defineLocale("hy-am",{months:{format:"\u0570\u0578\u0582\u0576\u057e\u0561\u0580\u056b_\u0583\u0565\u057f\u0580\u057e\u0561\u0580\u056b_\u0574\u0561\u0580\u057f\u056b_\u0561\u057a\u0580\u056b\u056c\u056b_\u0574\u0561\u0575\u056b\u057d\u056b_\u0570\u0578\u0582\u0576\u056b\u057d\u056b_\u0570\u0578\u0582\u056c\u056b\u057d\u056b_\u0585\u0563\u0578\u057d\u057f\u0578\u057d\u056b_\u057d\u0565\u057a\u057f\u0565\u0574\u0562\u0565\u0580\u056b_\u0570\u0578\u056f\u057f\u0565\u0574\u0562\u0565\u0580\u056b_\u0576\u0578\u0575\u0565\u0574\u0562\u0565\u0580\u056b_\u0564\u0565\u056f\u057f\u0565\u0574\u0562\u0565\u0580\u056b".split("_"),standalone:"\u0570\u0578\u0582\u0576\u057e\u0561\u0580_\u0583\u0565\u057f\u0580\u057e\u0561\u0580_\u0574\u0561\u0580\u057f_\u0561\u057a\u0580\u056b\u056c_\u0574\u0561\u0575\u056b\u057d_\u0570\u0578\u0582\u0576\u056b\u057d_\u0570\u0578\u0582\u056c\u056b\u057d_\u0585\u0563\u0578\u057d\u057f\u0578\u057d_\u057d\u0565\u057a\u057f\u0565\u0574\u0562\u0565\u0580_\u0570\u0578\u056f\u057f\u0565\u0574\u0562\u0565\u0580_\u0576\u0578\u0575\u0565\u0574\u0562\u0565\u0580_\u0564\u0565\u056f\u057f\u0565\u0574\u0562\u0565\u0580".split("_")},monthsShort:"\u0570\u0576\u057e_\u0583\u057f\u0580_\u0574\u0580\u057f_\u0561\u057a\u0580_\u0574\u0575\u057d_\u0570\u0576\u057d_\u0570\u056c\u057d_\u0585\u0563\u057d_\u057d\u057a\u057f_\u0570\u056f\u057f_\u0576\u0574\u0562_\u0564\u056f\u057f".split("_"),weekdays:"\u056f\u056b\u0580\u0561\u056f\u056b_\u0565\u0580\u056f\u0578\u0582\u0577\u0561\u0562\u0569\u056b_\u0565\u0580\u0565\u0584\u0577\u0561\u0562\u0569\u056b_\u0579\u0578\u0580\u0565\u0584\u0577\u0561\u0562\u0569\u056b_\u0570\u056b\u0576\u0563\u0577\u0561\u0562\u0569\u056b_\u0578\u0582\u0580\u0562\u0561\u0569_\u0577\u0561\u0562\u0561\u0569".split("_"),weekdaysShort:"\u056f\u0580\u056f_\u0565\u0580\u056f_\u0565\u0580\u0584_\u0579\u0580\u0584_\u0570\u0576\u0563_\u0578\u0582\u0580\u0562_\u0577\u0562\u0569".split("_"),weekdaysMin:"\u056f\u0580\u056f_\u0565\u0580\u056f_\u0565\u0580\u0584_\u0579\u0580\u0584_\u0570\u0576\u0563_\u0578\u0582\u0580\u0562_\u0577\u0562\u0569".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0569.",LLL:"D MMMM YYYY \u0569., HH:mm",LLLL:"dddd, D MMMM YYYY \u0569., HH:mm"},calendar:{sameDay:"[\u0561\u0575\u057d\u0585\u0580] LT",nextDay:"[\u057e\u0561\u0572\u0568] LT",lastDay:"[\u0565\u0580\u0565\u056f] LT",nextWeek:function(){return"dddd [\u0585\u0580\u0568 \u056a\u0561\u0574\u0568] LT"},lastWeek:function(){return"[\u0561\u0576\u0581\u0561\u056e] dddd [\u0585\u0580\u0568 \u056a\u0561\u0574\u0568] LT"},sameElse:"L"},relativeTime:{future:"%s \u0570\u0565\u057f\u0578",past:"%s \u0561\u057c\u0561\u057b",s:"\u0574\u056b \u0584\u0561\u0576\u056b \u057e\u0561\u0575\u0580\u056f\u0575\u0561\u0576",ss:"%d \u057e\u0561\u0575\u0580\u056f\u0575\u0561\u0576",m:"\u0580\u0578\u057a\u0565",mm:"%d \u0580\u0578\u057a\u0565",h:"\u056a\u0561\u0574",hh:"%d \u056a\u0561\u0574",d:"\u0585\u0580",dd:"%d \u0585\u0580",M:"\u0561\u0574\u056b\u057d",MM:"%d \u0561\u0574\u056b\u057d",y:"\u057f\u0561\u0580\u056b",yy:"%d \u057f\u0561\u0580\u056b"},meridiemParse:/\u0563\u056b\u0577\u0565\u0580\u057e\u0561|\u0561\u057c\u0561\u057e\u0578\u057f\u057e\u0561|\u0581\u0565\u0580\u0565\u056f\u057e\u0561|\u0565\u0580\u0565\u056f\u0578\u0575\u0561\u0576/,isPM:function(e){return/^(\u0581\u0565\u0580\u0565\u056f\u057e\u0561|\u0565\u0580\u0565\u056f\u0578\u0575\u0561\u0576)$/.test(e)},meridiem:function(e){return e<4?"\u0563\u056b\u0577\u0565\u0580\u057e\u0561":e<12?"\u0561\u057c\u0561\u057e\u0578\u057f\u057e\u0561":e<17?"\u0581\u0565\u0580\u0565\u056f\u057e\u0561":"\u0565\u0580\u0565\u056f\u0578\u0575\u0561\u0576"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(\u056b\u0576|\u0580\u0564)/,ordinal:function(e,t){switch(t){case"DDD":case"w":case"W":case"DDDo":return 1===e?e+"-\u056b\u0576":e+"-\u0580\u0564";default:return e}},week:{dow:1,doy:7}})}(n("wd/R"))},"1xZ4":function(e,t,n){!function(e){"use strict";e.defineLocale("ca",{months:{standalone:"gener_febrer_mar\xe7_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de mar\xe7_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._mar\xe7_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[dem\xe0 a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aqu\xed %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|\xe8|a)/,ordinal:function(e,t){var n=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"\xe8";return"w"!==t&&"W"!==t||(n="a"),e+n},week:{dow:1,doy:4}})}(n("wd/R"))},"20UP":function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i=n("LvDl"),r=n.n(i),s=n("lJxs"),o=n("8Y7J"),a=n("IheW");let c=(()=>{class e{constructor(e){this.http=e,this.settings={}}getValues(e){return r.a.isArray(e)&&(e=e.join(",")),this.http.get("api/settings?names="+e).pipe(Object(s.a)(e=>{const t={};return r.a.forEach(e,e=>{r.a.set(t,e.name,e.value)}),t}))}ifSettingConfigured(e,t,n){const i=this.settings[e];void 0===i?this.http.get(e).subscribe(i=>{this.settings[e]=this.getSettingsValue(i),this.ifSettingConfigured(e,t,n)},t=>{401!==t.status&&(this.settings[e]="")}):""!==i?t(i):n&&n()}disableSetting(e){this.settings[e]=""}getSettingsValue(e){return e.value||e.instance||""}validateGrafanaDashboardUrl(e){return this.http.get("api/grafana/validation/"+e)}getStandardSettings(){return this.http.get("ui-api/standard_settings")}}return e.\u0275fac=function(t){return new(t||e)(o.dc(a.b))},e.\u0275prov=o.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},"2EZI":function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("s7LF"),r=n("QFaf"),s=n("8Y7J");let o=(()=>{class e extends i.g{group(e,t=null){const n=super.group(e,t);return new r.a(n.controls,n.validator,n.asyncValidator)}}return e.\u0275fac=function(t){return a(t||e)},e.\u0275prov=s.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();const a=s.Ub(o)},"2QA8":function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const i=(()=>"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random())()},"2Vo4":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("XNiG"),r=n("9ppp");class s extends i.a{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){const t=super._subscribe(e);return t&&!t.closed&&e.next(this._value),t}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new r.a;return this._value}next(e){super.next(this._value=e)}}},"2fFW":function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));let i=!1;const r={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){if(e){const e=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+e.stack)}else i&&console.log("RxJS: Back to a better error behavior. Thank you. <3");i=e},get useDeprecatedSynchronousErrorHandling(){return i}}},"2fjn":function(e,t,n){!function(e){"use strict";e.defineLocale("fr-ca",{months:"janvier_f\xe9vrier_mars_avril_mai_juin_juillet_ao\xfbt_septembre_octobre_novembre_d\xe9cembre".split("_"),monthsShort:"janv._f\xe9vr._mars_avr._mai_juin_juil._ao\xfbt_sept._oct._nov._d\xe9c.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd\u2019hui \xe0] LT",nextDay:"[Demain \xe0] LT",nextWeek:"dddd [\xe0] LT",lastDay:"[Hier \xe0] LT",lastWeek:"dddd [dernier \xe0] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}}})}(n("wd/R"))},"2oRo":function(e,t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof global&&global)||Function("return this")()},"2ykv":function(e,t,n){!function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),i=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],r=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,i){return e?/-MMM-/.test(i)?n[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"\xe9\xe9n minuut",mm:"%d minuten",h:"\xe9\xe9n uur",hh:"%d uur",d:"\xe9\xe9n dag",dd:"%d dagen",M:"\xe9\xe9n maand",MM:"%d maanden",y:"\xe9\xe9n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n("wd/R"))},"3/ER":function(e,t,n){"use strict";(function(e){var i=n("Ju5/"),r="object"==typeof exports&&exports&&!exports.nodeType&&exports,s=r&&"object"==typeof e&&e&&!e.nodeType&&e,o=s&&s.exports===r?i.a.Buffer:void 0,a=o?o.allocUnsafe:void 0;t.a=function(e,t){if(t)return e.slice();var n=e.length,i=a?a(n):new e.constructor(n);return e.copy(i),i}}).call(this,n("3UD+")(e))},"33Wh":function(e,t,n){var i=n("yoRg"),r=n("eDl+");e.exports=Object.keys||function(e){return i(e,r)}},"3E0/":function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("D0XW"),r=n("7o/Q"),s=n("WMd4");function o(e,t=i.a){var n;const r=(n=e)instanceof Date&&!isNaN(+n)?+e-t.now():Math.abs(e);return e=>e.lift(new a(r,t))}class a{constructor(e,t){this.delay=e,this.scheduler=t}call(e,t){return t.subscribe(new c(e,this.delay,this.scheduler))}}class c extends r.a{constructor(e,t,n){super(e),this.delay=t,this.scheduler=n,this.queue=[],this.active=!1,this.errored=!1}static dispatch(e){const t=e.source,n=t.queue,i=e.scheduler,r=e.destination;for(;n.length>0&&n[0].time-i.now()<=0;)n.shift().notification.observe(r);if(n.length>0){const t=Math.max(0,n[0].time-i.now());this.schedule(e,t)}else this.unsubscribe(),t.active=!1}_schedule(e){this.active=!0,this.destination.add(e.schedule(c.dispatch,this.delay,{source:this,destination:this.destination,scheduler:e}))}scheduleNotification(e){if(!0===this.errored)return;const t=this.scheduler,n=new l(t.now()+this.delay,e);this.queue.push(n),!1===this.active&&this._schedule(t)}_next(e){this.scheduleNotification(s.a.createNext(e))}_error(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()}_complete(){this.scheduleNotification(s.a.createComplete()),this.unsubscribe()}}class l{constructor(e,t){this.time=e,this.notification=t}}},"3E1r":function(e,t,n){!function(e){"use strict";var t={1:"\u0967",2:"\u0968",3:"\u0969",4:"\u096a",5:"\u096b",6:"\u096c",7:"\u096d",8:"\u096e",9:"\u096f",0:"\u0966"},n={"\u0967":"1","\u0968":"2","\u0969":"3","\u096a":"4","\u096b":"5","\u096c":"6","\u096d":"7","\u096e":"8","\u096f":"9","\u0966":"0"},i=[/^\u091c\u0928/i,/^\u092b\u093c\u0930|\u092b\u0930/i,/^\u092e\u093e\u0930\u094d\u091a/i,/^\u0905\u092a\u094d\u0930\u0948/i,/^\u092e\u0908/i,/^\u091c\u0942\u0928/i,/^\u091c\u0941\u0932/i,/^\u0905\u0917/i,/^\u0938\u093f\u0924\u0902|\u0938\u093f\u0924/i,/^\u0905\u0915\u094d\u091f\u0942/i,/^\u0928\u0935|\u0928\u0935\u0902/i,/^\u0926\u093f\u0938\u0902|\u0926\u093f\u0938/i];e.defineLocale("hi",{months:{format:"\u091c\u0928\u0935\u0930\u0940_\u092b\u093c\u0930\u0935\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u0948\u0932_\u092e\u0908_\u091c\u0942\u0928_\u091c\u0941\u0932\u093e\u0908_\u0905\u0917\u0938\u094d\u0924_\u0938\u093f\u0924\u092e\u094d\u092c\u0930_\u0905\u0915\u094d\u091f\u0942\u092c\u0930_\u0928\u0935\u092e\u094d\u092c\u0930_\u0926\u093f\u0938\u092e\u094d\u092c\u0930".split("_"),standalone:"\u091c\u0928\u0935\u0930\u0940_\u092b\u0930\u0935\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u0948\u0932_\u092e\u0908_\u091c\u0942\u0928_\u091c\u0941\u0932\u093e\u0908_\u0905\u0917\u0938\u094d\u0924_\u0938\u093f\u0924\u0902\u092c\u0930_\u0905\u0915\u094d\u091f\u0942\u092c\u0930_\u0928\u0935\u0902\u092c\u0930_\u0926\u093f\u0938\u0902\u092c\u0930".split("_")},monthsShort:"\u091c\u0928._\u092b\u093c\u0930._\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u0948._\u092e\u0908_\u091c\u0942\u0928_\u091c\u0941\u0932._\u0905\u0917._\u0938\u093f\u0924._\u0905\u0915\u094d\u091f\u0942._\u0928\u0935._\u0926\u093f\u0938.".split("_"),weekdays:"\u0930\u0935\u093f\u0935\u093e\u0930_\u0938\u094b\u092e\u0935\u093e\u0930_\u092e\u0902\u0917\u0932\u0935\u093e\u0930_\u092c\u0941\u0927\u0935\u093e\u0930_\u0917\u0941\u0930\u0942\u0935\u093e\u0930_\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930_\u0936\u0928\u093f\u0935\u093e\u0930".split("_"),weekdaysShort:"\u0930\u0935\u093f_\u0938\u094b\u092e_\u092e\u0902\u0917\u0932_\u092c\u0941\u0927_\u0917\u0941\u0930\u0942_\u0936\u0941\u0915\u094d\u0930_\u0936\u0928\u093f".split("_"),weekdaysMin:"\u0930_\u0938\u094b_\u092e\u0902_\u092c\u0941_\u0917\u0941_\u0936\u0941_\u0936".split("_"),longDateFormat:{LT:"A h:mm \u092c\u091c\u0947",LTS:"A h:mm:ss \u092c\u091c\u0947",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u092c\u091c\u0947",LLLL:"dddd, D MMMM YYYY, A h:mm \u092c\u091c\u0947"},monthsParse:i,longMonthsParse:i,shortMonthsParse:[/^\u091c\u0928/i,/^\u092b\u093c\u0930/i,/^\u092e\u093e\u0930\u094d\u091a/i,/^\u0905\u092a\u094d\u0930\u0948/i,/^\u092e\u0908/i,/^\u091c\u0942\u0928/i,/^\u091c\u0941\u0932/i,/^\u0905\u0917/i,/^\u0938\u093f\u0924/i,/^\u0905\u0915\u094d\u091f\u0942/i,/^\u0928\u0935/i,/^\u0926\u093f\u0938/i],monthsRegex:/^(\u091c\u0928\u0935\u0930\u0940|\u091c\u0928\.?|\u092b\u093c\u0930\u0935\u0930\u0940|\u092b\u0930\u0935\u0930\u0940|\u092b\u093c\u0930\.?|\u092e\u093e\u0930\u094d\u091a?|\u0905\u092a\u094d\u0930\u0948\u0932|\u0905\u092a\u094d\u0930\u0948\.?|\u092e\u0908?|\u091c\u0942\u0928?|\u091c\u0941\u0932\u093e\u0908|\u091c\u0941\u0932\.?|\u0905\u0917\u0938\u094d\u0924|\u0905\u0917\.?|\u0938\u093f\u0924\u092e\u094d\u092c\u0930|\u0938\u093f\u0924\u0902\u092c\u0930|\u0938\u093f\u0924\.?|\u0905\u0915\u094d\u091f\u0942\u092c\u0930|\u0905\u0915\u094d\u091f\u0942\.?|\u0928\u0935\u092e\u094d\u092c\u0930|\u0928\u0935\u0902\u092c\u0930|\u0928\u0935\.?|\u0926\u093f\u0938\u092e\u094d\u092c\u0930|\u0926\u093f\u0938\u0902\u092c\u0930|\u0926\u093f\u0938\.?)/i,monthsShortRegex:/^(\u091c\u0928\u0935\u0930\u0940|\u091c\u0928\.?|\u092b\u093c\u0930\u0935\u0930\u0940|\u092b\u0930\u0935\u0930\u0940|\u092b\u093c\u0930\.?|\u092e\u093e\u0930\u094d\u091a?|\u0905\u092a\u094d\u0930\u0948\u0932|\u0905\u092a\u094d\u0930\u0948\.?|\u092e\u0908?|\u091c\u0942\u0928?|\u091c\u0941\u0932\u093e\u0908|\u091c\u0941\u0932\.?|\u0905\u0917\u0938\u094d\u0924|\u0905\u0917\.?|\u0938\u093f\u0924\u092e\u094d\u092c\u0930|\u0938\u093f\u0924\u0902\u092c\u0930|\u0938\u093f\u0924\.?|\u0905\u0915\u094d\u091f\u0942\u092c\u0930|\u0905\u0915\u094d\u091f\u0942\.?|\u0928\u0935\u092e\u094d\u092c\u0930|\u0928\u0935\u0902\u092c\u0930|\u0928\u0935\.?|\u0926\u093f\u0938\u092e\u094d\u092c\u0930|\u0926\u093f\u0938\u0902\u092c\u0930|\u0926\u093f\u0938\.?)/i,monthsStrictRegex:/^(\u091c\u0928\u0935\u0930\u0940?|\u092b\u093c\u0930\u0935\u0930\u0940|\u092b\u0930\u0935\u0930\u0940?|\u092e\u093e\u0930\u094d\u091a?|\u0905\u092a\u094d\u0930\u0948\u0932?|\u092e\u0908?|\u091c\u0942\u0928?|\u091c\u0941\u0932\u093e\u0908?|\u0905\u0917\u0938\u094d\u0924?|\u0938\u093f\u0924\u092e\u094d\u092c\u0930|\u0938\u093f\u0924\u0902\u092c\u0930|\u0938\u093f\u0924?\.?|\u0905\u0915\u094d\u091f\u0942\u092c\u0930|\u0905\u0915\u094d\u091f\u0942\.?|\u0928\u0935\u092e\u094d\u092c\u0930|\u0928\u0935\u0902\u092c\u0930?|\u0926\u093f\u0938\u092e\u094d\u092c\u0930|\u0926\u093f\u0938\u0902\u092c\u0930?)/i,monthsShortStrictRegex:/^(\u091c\u0928\.?|\u092b\u093c\u0930\.?|\u092e\u093e\u0930\u094d\u091a?|\u0905\u092a\u094d\u0930\u0948\.?|\u092e\u0908?|\u091c\u0942\u0928?|\u091c\u0941\u0932\.?|\u0905\u0917\.?|\u0938\u093f\u0924\.?|\u0905\u0915\u094d\u091f\u0942\.?|\u0928\u0935\.?|\u0926\u093f\u0938\.?)/i,calendar:{sameDay:"[\u0906\u091c] LT",nextDay:"[\u0915\u0932] LT",nextWeek:"dddd, LT",lastDay:"[\u0915\u0932] LT",lastWeek:"[\u092a\u093f\u091b\u0932\u0947] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u092e\u0947\u0902",past:"%s \u092a\u0939\u0932\u0947",s:"\u0915\u0941\u091b \u0939\u0940 \u0915\u094d\u0937\u0923",ss:"%d \u0938\u0947\u0915\u0902\u0921",m:"\u090f\u0915 \u092e\u093f\u0928\u091f",mm:"%d \u092e\u093f\u0928\u091f",h:"\u090f\u0915 \u0918\u0902\u091f\u093e",hh:"%d \u0918\u0902\u091f\u0947",d:"\u090f\u0915 \u0926\u093f\u0928",dd:"%d \u0926\u093f\u0928",M:"\u090f\u0915 \u092e\u0939\u0940\u0928\u0947",MM:"%d \u092e\u0939\u0940\u0928\u0947",y:"\u090f\u0915 \u0935\u0930\u094d\u0937",yy:"%d \u0935\u0930\u094d\u0937"},preparse:function(e){return e.replace(/[\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f\u0966]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/\u0930\u093e\u0924|\u0938\u0941\u092c\u0939|\u0926\u094b\u092a\u0939\u0930|\u0936\u093e\u092e/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u0930\u093e\u0924"===t?e<4?e:e+12:"\u0938\u0941\u092c\u0939"===t?e:"\u0926\u094b\u092a\u0939\u0930"===t?e>=10?e:e+12:"\u0936\u093e\u092e"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"\u0930\u093e\u0924":e<10?"\u0938\u0941\u092c\u0939":e<17?"\u0926\u094b\u092a\u0939\u0930":e<20?"\u0936\u093e\u092e":"\u0930\u093e\u0924"},week:{dow:0,doy:6}})}(n("wd/R"))},"3N8a":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("quSY");class r extends i.a{constructor(e,t){super()}schedule(e,t=0){return this}}class s extends r{constructor(e,t){super(e,t),this.scheduler=e,this.work=t,this.pending=!1}schedule(e,t=0){if(this.closed)return this;this.state=e;const n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(i,this.id,t),this}requestAsyncId(e,t,n=0){return setInterval(e.flush.bind(e,this),n)}recycleAsyncId(e,t,n=0){if(null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)}execute(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(e,t){let n=!1,i=void 0;try{this.work(e)}catch(r){n=!0,i=!!r&&r||new Error(r)}if(n)return this.unsubscribe(),i}_unsubscribe(){const e=this.id,t=this.scheduler,n=t.actions,i=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&n.splice(i,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null}}},"3UD+":function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},"3bBZ":function(e,t,n){var i=n("2oRo"),r=n("/byt"),s=n("4mDm"),o=n("kRJp"),a=n("tiKp"),c=a("iterator"),l=a("toStringTag"),u=s.values;for(var d in r){var h=i[d],f=h&&h.prototype;if(f){if(f[c]!==u)try{o(f,c,u)}catch(m){f[c]=u}if(f[l]||o(f,l,d),r[d])for(var p in s)if(f[p]!==s[p])try{o(f,p,s[p])}catch(m){f[p]=s[p]}}}},"4DD9":function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("8Y7J");let r=(()=>{class e{transform(e){let t=!1;switch(e){case!0:case 1:case"y":case"yes":case"t":case"true":case"on":case"1":t=!0}return t}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"boolean",type:e,pure:!0}),e})()},"4I5i":function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const i=(()=>{function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e})()},"4MV3":function(e,t,n){!function(e){"use strict";var t={1:"\u0ae7",2:"\u0ae8",3:"\u0ae9",4:"\u0aea",5:"\u0aeb",6:"\u0aec",7:"\u0aed",8:"\u0aee",9:"\u0aef",0:"\u0ae6"},n={"\u0ae7":"1","\u0ae8":"2","\u0ae9":"3","\u0aea":"4","\u0aeb":"5","\u0aec":"6","\u0aed":"7","\u0aee":"8","\u0aef":"9","\u0ae6":"0"};e.defineLocale("gu",{months:"\u0a9c\u0abe\u0aa8\u0acd\u0aaf\u0ac1\u0a86\u0ab0\u0ac0_\u0aab\u0ac7\u0aac\u0acd\u0ab0\u0ac1\u0a86\u0ab0\u0ac0_\u0aae\u0abe\u0ab0\u0acd\u0a9a_\u0a8f\u0aaa\u0acd\u0ab0\u0abf\u0ab2_\u0aae\u0ac7_\u0a9c\u0ac2\u0aa8_\u0a9c\u0ac1\u0ab2\u0abe\u0a88_\u0a91\u0a97\u0ab8\u0acd\u0a9f_\u0ab8\u0aaa\u0acd\u0a9f\u0ac7\u0aae\u0acd\u0aac\u0ab0_\u0a91\u0a95\u0acd\u0a9f\u0acd\u0aac\u0ab0_\u0aa8\u0ab5\u0ac7\u0aae\u0acd\u0aac\u0ab0_\u0aa1\u0abf\u0ab8\u0ac7\u0aae\u0acd\u0aac\u0ab0".split("_"),monthsShort:"\u0a9c\u0abe\u0aa8\u0acd\u0aaf\u0ac1._\u0aab\u0ac7\u0aac\u0acd\u0ab0\u0ac1._\u0aae\u0abe\u0ab0\u0acd\u0a9a_\u0a8f\u0aaa\u0acd\u0ab0\u0abf._\u0aae\u0ac7_\u0a9c\u0ac2\u0aa8_\u0a9c\u0ac1\u0ab2\u0abe._\u0a91\u0a97._\u0ab8\u0aaa\u0acd\u0a9f\u0ac7._\u0a91\u0a95\u0acd\u0a9f\u0acd._\u0aa8\u0ab5\u0ac7._\u0aa1\u0abf\u0ab8\u0ac7.".split("_"),monthsParseExact:!0,weekdays:"\u0ab0\u0ab5\u0abf\u0ab5\u0abe\u0ab0_\u0ab8\u0acb\u0aae\u0ab5\u0abe\u0ab0_\u0aae\u0a82\u0a97\u0ab3\u0ab5\u0abe\u0ab0_\u0aac\u0ac1\u0aa7\u0acd\u0ab5\u0abe\u0ab0_\u0a97\u0ac1\u0ab0\u0ac1\u0ab5\u0abe\u0ab0_\u0ab6\u0ac1\u0a95\u0acd\u0ab0\u0ab5\u0abe\u0ab0_\u0ab6\u0aa8\u0abf\u0ab5\u0abe\u0ab0".split("_"),weekdaysShort:"\u0ab0\u0ab5\u0abf_\u0ab8\u0acb\u0aae_\u0aae\u0a82\u0a97\u0ab3_\u0aac\u0ac1\u0aa7\u0acd_\u0a97\u0ac1\u0ab0\u0ac1_\u0ab6\u0ac1\u0a95\u0acd\u0ab0_\u0ab6\u0aa8\u0abf".split("_"),weekdaysMin:"\u0ab0_\u0ab8\u0acb_\u0aae\u0a82_\u0aac\u0ac1_\u0a97\u0ac1_\u0ab6\u0ac1_\u0ab6".split("_"),longDateFormat:{LT:"A h:mm \u0ab5\u0abe\u0a97\u0acd\u0aaf\u0ac7",LTS:"A h:mm:ss \u0ab5\u0abe\u0a97\u0acd\u0aaf\u0ac7",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u0ab5\u0abe\u0a97\u0acd\u0aaf\u0ac7",LLLL:"dddd, D MMMM YYYY, A h:mm \u0ab5\u0abe\u0a97\u0acd\u0aaf\u0ac7"},calendar:{sameDay:"[\u0a86\u0a9c] LT",nextDay:"[\u0a95\u0abe\u0ab2\u0ac7] LT",nextWeek:"dddd, LT",lastDay:"[\u0a97\u0a87\u0a95\u0abe\u0ab2\u0ac7] LT",lastWeek:"[\u0aaa\u0abe\u0a9b\u0ab2\u0abe] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0aae\u0abe",past:"%s \u0aaa\u0ab9\u0ac7\u0ab2\u0abe",s:"\u0a85\u0aae\u0ac1\u0a95 \u0aaa\u0ab3\u0acb",ss:"%d \u0ab8\u0ac7\u0a95\u0a82\u0aa1",m:"\u0a8f\u0a95 \u0aae\u0abf\u0aa8\u0abf\u0a9f",mm:"%d \u0aae\u0abf\u0aa8\u0abf\u0a9f",h:"\u0a8f\u0a95 \u0a95\u0ab2\u0abe\u0a95",hh:"%d \u0a95\u0ab2\u0abe\u0a95",d:"\u0a8f\u0a95 \u0aa6\u0abf\u0ab5\u0ab8",dd:"%d \u0aa6\u0abf\u0ab5\u0ab8",M:"\u0a8f\u0a95 \u0aae\u0ab9\u0abf\u0aa8\u0acb",MM:"%d \u0aae\u0ab9\u0abf\u0aa8\u0acb",y:"\u0a8f\u0a95 \u0ab5\u0ab0\u0acd\u0ab7",yy:"%d \u0ab5\u0ab0\u0acd\u0ab7"},preparse:function(e){return e.replace(/[\u0ae7\u0ae8\u0ae9\u0aea\u0aeb\u0aec\u0aed\u0aee\u0aef\u0ae6]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/\u0ab0\u0abe\u0aa4|\u0aac\u0aaa\u0acb\u0ab0|\u0ab8\u0ab5\u0abe\u0ab0|\u0ab8\u0abe\u0a82\u0a9c/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u0ab0\u0abe\u0aa4"===t?e<4?e:e+12:"\u0ab8\u0ab5\u0abe\u0ab0"===t?e:"\u0aac\u0aaa\u0acb\u0ab0"===t?e>=10?e:e+12:"\u0ab8\u0abe\u0a82\u0a9c"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"\u0ab0\u0abe\u0aa4":e<10?"\u0ab8\u0ab5\u0abe\u0ab0":e<17?"\u0aac\u0aaa\u0acb\u0ab0":e<20?"\u0ab8\u0abe\u0a82\u0a9c":"\u0ab0\u0abe\u0aa4"},week:{dow:0,doy:6}})}(n("wd/R"))},"4WOD":function(e,t,n){var i=n("UTVS"),r=n("ewvW"),s=n("93I0"),o=n("4Xet"),a=s("IE_PROTO"),c=Object.prototype;e.exports=o?Object.getPrototypeOf:function(e){return e=r(e),i(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?c:null}},"4Xet":function(e,t,n){var i=n("0Dky");e.exports=!i((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},"4dOw":function(e,t,n){!function(e){"use strict";e.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n("wd/R"))},"4l63":function(e,t,n){var i=n("I+eb"),r=n("wg0c");i({global:!0,forced:parseInt!=r},{parseInt:r})},"4mDm":function(e,t,n){"use strict";var i=n("/GqU"),r=n("RNIs"),s=n("P4y1"),o=n("afO8"),a=n("fdAy"),c="Array Iterator",l=o.set,u=o.getterFor(c);e.exports=a(Array,"Array",(function(e,t){l(this,{type:c,target:i(e),index:0,kind:t})}),(function(){var e=u(this),t=e.target,n=e.kind,i=e.index++;return!t||i>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:i,done:!1}:"values"==n?{value:t[i],done:!1}:{value:[i,t[i]],done:!1}}),"values"),s.Arguments=s.Array,r("keys"),r("values"),r("entries")},"4syw":function(e,t,n){var i=n("busE");e.exports=function(e,t,n){for(var r in t)i(e,r,t[r],n);return e}},"5+tZ":function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("lJxs"),r=n("Cfvw"),s=n("zx2A");function o(e,t,n=Number.POSITIVE_INFINITY){return"function"==typeof t?s=>s.pipe(o((n,s)=>Object(r.a)(e(n,s)).pipe(Object(i.a)((e,i)=>t(n,e,s,i))),n)):("number"==typeof t&&(n=t),t=>t.lift(new a(e,n)))}class a{constructor(e,t=Number.POSITIVE_INFINITY){this.project=e,this.concurrent=t}call(e,t){return t.subscribe(new c(e,this.project,this.concurrent))}}class c extends s.b{constructor(e,t,n=Number.POSITIVE_INFINITY){super(e),this.project=t,this.concurrent=n,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)}_tryNext(e){let t;const n=this.index++;try{t=this.project(e,n)}catch(i){return void this.destination.error(i)}this.active++,this._innerSub(t)}_innerSub(e){const t=new s.a(this),n=this.destination;n.add(t);const i=Object(s.c)(e,t);i!==t&&n.add(i)}_complete(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete(),this.unsubscribe()}notifyNext(e){this.destination.next(e)}notifyComplete(){const e=this.buffer;this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}},"5yfJ":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("HDdC"),r=n("KqfI");const s=new i.a(r.a)},"6+QB":function(e,t,n){!function(e){"use strict";e.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(n("wd/R"))},"6+kj":function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var i=n("8Y7J"),r=n("sne2"),s=n("JK/P"),o=n("sb0X"),a=n("SVse"),c=n("Z21x");function l(e,t){if(1&e){const e=i.Tb();i.Sb(0,"cd-submit-button",2),i.gc("submitAction",(function(){return i.Dc(e),i.ic().submitAction()})),i.Oc(1),i.Rb()}if(2&e){const e=i.ic();i.pc("disabled",e.disabled)("form",e.form),i.yb(1),i.Pc(e.submitText)}}let u=(()=>{class e{constructor(e,t,n){this.location=e,this.actionLabels=t,this.modalService=n,this.submitActionEvent=new i.o,this.backActionEvent=new i.o,this.showSubmit=!0,this.wrappingClass="",this.btnClass="",this.submitText=this.actionLabels.CREATE,this.cancelText=this.actionLabels.CANCEL,this.disabled=!1}submitAction(){this.submitActionEvent.emit()}backAction(){0===this.backActionEvent.observers.length?this.modalService.hasOpenModals()?this.modalService.dismissAll():this.location.back():this.backActionEvent.emit()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(a.m),i.Mb(r.b),i.Mb(s.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-form-button-panel"]],viewQuery:function(e,t){var n;1&e&&i.Tc(o.a,!0),2&e&&i.zc(n=i.hc())&&(t.submitButton=n.first)},inputs:{form:"form",showSubmit:"showSubmit",wrappingClass:"wrappingClass",btnClass:"btnClass",submitText:"submitText",cancelText:"cancelText",disabled:"disabled"},outputs:{submitActionEvent:"submitActionEvent",backActionEvent:"backActionEvent"},decls:3,vars:4,consts:[[1,"m-2",3,"name","backAction"],["data-cy","submitBtn",3,"disabled","form","submitAction",4,"ngIf"],["data-cy","submitBtn",3,"disabled","form","submitAction"]],template:function(e,t){1&e&&(i.Sb(0,"div"),i.Sb(1,"cd-back-button",0),i.gc("backAction",(function(){return t.backAction()})),i.Rb(),i.Mc(2,l,2,3,"cd-submit-button",1),i.Rb()),2&e&&(i.Ab(t.wrappingClass),i.yb(1),i.pc("name",t.cancelText),i.yb(1),i.pc("ngIf",t.showSubmit))},directives:[c.a,a.r,o.a],styles:[""]}),e})()},"6B0Y":function(e,t,n){!function(e){"use strict";var t={1:"\u17e1",2:"\u17e2",3:"\u17e3",4:"\u17e4",5:"\u17e5",6:"\u17e6",7:"\u17e7",8:"\u17e8",9:"\u17e9",0:"\u17e0"},n={"\u17e1":"1","\u17e2":"2","\u17e3":"3","\u17e4":"4","\u17e5":"5","\u17e6":"6","\u17e7":"7","\u17e8":"8","\u17e9":"9","\u17e0":"0"};e.defineLocale("km",{months:"\u1798\u1780\u179a\u17b6_\u1780\u17bb\u1798\u17d2\u1797\u17c8_\u1798\u17b8\u1793\u17b6_\u1798\u17c1\u179f\u17b6_\u17a7\u179f\u1797\u17b6_\u1798\u17b7\u1790\u17bb\u1793\u17b6_\u1780\u1780\u17d2\u1780\u178a\u17b6_\u179f\u17b8\u17a0\u17b6_\u1780\u1789\u17d2\u1789\u17b6_\u178f\u17bb\u179b\u17b6_\u179c\u17b7\u1785\u17d2\u1786\u17b7\u1780\u17b6_\u1792\u17d2\u1793\u17bc".split("_"),monthsShort:"\u1798\u1780\u179a\u17b6_\u1780\u17bb\u1798\u17d2\u1797\u17c8_\u1798\u17b8\u1793\u17b6_\u1798\u17c1\u179f\u17b6_\u17a7\u179f\u1797\u17b6_\u1798\u17b7\u1790\u17bb\u1793\u17b6_\u1780\u1780\u17d2\u1780\u178a\u17b6_\u179f\u17b8\u17a0\u17b6_\u1780\u1789\u17d2\u1789\u17b6_\u178f\u17bb\u179b\u17b6_\u179c\u17b7\u1785\u17d2\u1786\u17b7\u1780\u17b6_\u1792\u17d2\u1793\u17bc".split("_"),weekdays:"\u17a2\u17b6\u1791\u17b7\u178f\u17d2\u1799_\u1785\u17d0\u1793\u17d2\u1791_\u17a2\u1784\u17d2\u1782\u17b6\u179a_\u1796\u17bb\u1792_\u1796\u17d2\u179a\u17a0\u179f\u17d2\u1794\u178f\u17b7\u17cd_\u179f\u17bb\u1780\u17d2\u179a_\u179f\u17c5\u179a\u17cd".split("_"),weekdaysShort:"\u17a2\u17b6_\u1785_\u17a2_\u1796_\u1796\u17d2\u179a_\u179f\u17bb_\u179f".split("_"),weekdaysMin:"\u17a2\u17b6_\u1785_\u17a2_\u1796_\u1796\u17d2\u179a_\u179f\u17bb_\u179f".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/\u1796\u17d2\u179a\u17b9\u1780|\u179b\u17d2\u1784\u17b6\u1785/,isPM:function(e){return"\u179b\u17d2\u1784\u17b6\u1785"===e},meridiem:function(e,t,n){return e<12?"\u1796\u17d2\u179a\u17b9\u1780":"\u179b\u17d2\u1784\u17b6\u1785"},calendar:{sameDay:"[\u1790\u17d2\u1784\u17c3\u1793\u17c1\u17c7 \u1798\u17c9\u17c4\u1784] LT",nextDay:"[\u179f\u17d2\u17a2\u17c2\u1780 \u1798\u17c9\u17c4\u1784] LT",nextWeek:"dddd [\u1798\u17c9\u17c4\u1784] LT",lastDay:"[\u1798\u17d2\u179f\u17b7\u179b\u1798\u17b7\u1789 \u1798\u17c9\u17c4\u1784] LT",lastWeek:"dddd [\u179f\u1794\u17d2\u178f\u17b6\u17a0\u17cd\u1798\u17bb\u1793] [\u1798\u17c9\u17c4\u1784] LT",sameElse:"L"},relativeTime:{future:"%s\u1791\u17c0\u178f",past:"%s\u1798\u17bb\u1793",s:"\u1794\u17c9\u17bb\u1793\u17d2\u1798\u17b6\u1793\u179c\u17b7\u1793\u17b6\u1791\u17b8",ss:"%d \u179c\u17b7\u1793\u17b6\u1791\u17b8",m:"\u1798\u17bd\u1799\u1793\u17b6\u1791\u17b8",mm:"%d \u1793\u17b6\u1791\u17b8",h:"\u1798\u17bd\u1799\u1798\u17c9\u17c4\u1784",hh:"%d \u1798\u17c9\u17c4\u1784",d:"\u1798\u17bd\u1799\u1790\u17d2\u1784\u17c3",dd:"%d \u1790\u17d2\u1784\u17c3",M:"\u1798\u17bd\u1799\u1781\u17c2",MM:"%d \u1781\u17c2",y:"\u1798\u17bd\u1799\u1786\u17d2\u1793\u17b6\u17c6",yy:"%d \u1786\u17d2\u1793\u17b6\u17c6"},dayOfMonthOrdinalParse:/\u1791\u17b8\d{1,2}/,ordinal:"\u1791\u17b8%d",preparse:function(e){return e.replace(/[\u17e1\u17e2\u17e3\u17e4\u17e5\u17e6\u17e7\u17e8\u17e9\u17e0]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}})}(n("wd/R"))},"6JNq":function(e,t,n){var i=n("UTVS"),r=n("Vu81"),s=n("Bs8V"),o=n("m/L8");e.exports=function(e,t){for(var n=r(t),a=o.f,c=s.f,l=0;l<n.length;l++){var u=n[l];i(e,u)||a(e,u,c(t,u))}}},"6LWA":function(e,t,n){var i=n("xrYK");e.exports=Array.isArray||function(e){return"Array"==i(e)}},"6VoE":function(e,t,n){var i=n("tiKp"),r=n("P4y1"),s=i("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[s]===e)}},"6qls":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("tz6c"),r=n("8Y7J");let s=(()=>{class e{constructor(e){this.docService=e,this.docText="documentation"}ngOnInit(){this.noSubscribe?this.docUrl=this.docService.urlGenerator(this.section):this.docService.subscribeOnce(this.section,e=>{this.docUrl=e})}}return e.\u0275fac=function(t){return new(t||e)(r.Mb(i.a))},e.\u0275cmp=r.Gb({type:e,selectors:[["cd-doc"]],inputs:{section:"section",docText:"docText",noSubscribe:"noSubscribe"},decls:2,vars:2,consts:[["target","_blank",3,"href"]],template:function(e,t){1&e&&(r.Sb(0,"a",0),r.Oc(1),r.Rb()),2&e&&(r.qc("href",t.docUrl,r.Gc),r.yb(1),r.Pc(t.docText))},styles:[""]}),e})()},"7BjC":function(e,t,n){!function(e){"use strict";function t(e,t,n,i){var r={s:["m\xf5ne sekundi","m\xf5ni sekund","paar sekundit"],ss:[e+"sekundi",e+"sekundit"],m:["\xfche minuti","\xfcks minut"],mm:[e+" minuti",e+" minutit"],h:["\xfche tunni","tund aega","\xfcks tund"],hh:[e+" tunni",e+" tundi"],d:["\xfche p\xe4eva","\xfcks p\xe4ev"],M:["kuu aja","kuu aega","\xfcks kuu"],MM:[e+" kuu",e+" kuud"],y:["\xfche aasta","aasta","\xfcks aasta"],yy:[e+" aasta",e+" aastat"]};return t?r[n][2]?r[n][2]:r[n][1]:i?r[n][0]:r[n][1]}e.defineLocale("et",{months:"jaanuar_veebruar_m\xe4rts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_m\xe4rts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"p\xfchap\xe4ev_esmasp\xe4ev_teisip\xe4ev_kolmap\xe4ev_neljap\xe4ev_reede_laup\xe4ev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[T\xe4na,] LT",nextDay:"[Homme,] LT",nextWeek:"[J\xe4rgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s p\xe4rast",past:"%s tagasi",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:"%d p\xe4eva",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},"7C5Q":function(e,t,n){!function(e){"use strict";e.defineLocale("en-in",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:0,doy:6}})}(n("wd/R"))},"7aV9":function(e,t,n){!function(e){"use strict";e.defineLocale("si",{months:"\u0da2\u0db1\u0dc0\u0dcf\u0dbb\u0dd2_\u0db4\u0dd9\u0db6\u0dbb\u0dc0\u0dcf\u0dbb\u0dd2_\u0db8\u0dcf\u0dbb\u0dca\u0dad\u0dd4_\u0d85\u0db4\u0dca\u200d\u0dbb\u0dda\u0dbd\u0dca_\u0db8\u0dd0\u0dba\u0dd2_\u0da2\u0dd6\u0db1\u0dd2_\u0da2\u0dd6\u0dbd\u0dd2_\u0d85\u0d9c\u0ddd\u0dc3\u0dca\u0dad\u0dd4_\u0dc3\u0dd0\u0db4\u0dca\u0dad\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca_\u0d94\u0d9a\u0dca\u0dad\u0ddd\u0db6\u0dbb\u0dca_\u0db1\u0ddc\u0dc0\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca_\u0daf\u0dd9\u0dc3\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca".split("_"),monthsShort:"\u0da2\u0db1_\u0db4\u0dd9\u0db6_\u0db8\u0dcf\u0dbb\u0dca_\u0d85\u0db4\u0dca_\u0db8\u0dd0\u0dba\u0dd2_\u0da2\u0dd6\u0db1\u0dd2_\u0da2\u0dd6\u0dbd\u0dd2_\u0d85\u0d9c\u0ddd_\u0dc3\u0dd0\u0db4\u0dca_\u0d94\u0d9a\u0dca_\u0db1\u0ddc\u0dc0\u0dd0_\u0daf\u0dd9\u0dc3\u0dd0".split("_"),weekdays:"\u0d89\u0dbb\u0dd2\u0daf\u0dcf_\u0dc3\u0db3\u0dd4\u0daf\u0dcf_\u0d85\u0d9f\u0dc4\u0dbb\u0dd4\u0dc0\u0dcf\u0daf\u0dcf_\u0db6\u0daf\u0dcf\u0daf\u0dcf_\u0db6\u0dca\u200d\u0dbb\u0dc4\u0dc3\u0dca\u0db4\u0dad\u0dd2\u0db1\u0dca\u0daf\u0dcf_\u0dc3\u0dd2\u0d9a\u0dd4\u0dbb\u0dcf\u0daf\u0dcf_\u0dc3\u0dd9\u0db1\u0dc3\u0dd4\u0dbb\u0dcf\u0daf\u0dcf".split("_"),weekdaysShort:"\u0d89\u0dbb\u0dd2_\u0dc3\u0db3\u0dd4_\u0d85\u0d9f_\u0db6\u0daf\u0dcf_\u0db6\u0dca\u200d\u0dbb\u0dc4_\u0dc3\u0dd2\u0d9a\u0dd4_\u0dc3\u0dd9\u0db1".split("_"),weekdaysMin:"\u0d89_\u0dc3_\u0d85_\u0db6_\u0db6\u0dca\u200d\u0dbb_\u0dc3\u0dd2_\u0dc3\u0dd9".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [\u0dc0\u0dd0\u0db1\u0dd2] dddd, a h:mm:ss"},calendar:{sameDay:"[\u0d85\u0daf] LT[\u0da7]",nextDay:"[\u0dc4\u0dd9\u0da7] LT[\u0da7]",nextWeek:"dddd LT[\u0da7]",lastDay:"[\u0d8a\u0dba\u0dda] LT[\u0da7]",lastWeek:"[\u0db4\u0dc3\u0dd4\u0d9c\u0dd2\u0dba] dddd LT[\u0da7]",sameElse:"L"},relativeTime:{future:"%s\u0d9a\u0dd2\u0db1\u0dca",past:"%s\u0d9a\u0da7 \u0db4\u0dd9\u0dbb",s:"\u0dad\u0dad\u0dca\u0db4\u0dbb \u0d9a\u0dd2\u0dc4\u0dd2\u0db4\u0dba",ss:"\u0dad\u0dad\u0dca\u0db4\u0dbb %d",m:"\u0db8\u0dd2\u0db1\u0dd2\u0dad\u0dca\u0dad\u0dd4\u0dc0",mm:"\u0db8\u0dd2\u0db1\u0dd2\u0dad\u0dca\u0dad\u0dd4 %d",h:"\u0db4\u0dd0\u0dba",hh:"\u0db4\u0dd0\u0dba %d",d:"\u0daf\u0dd2\u0db1\u0dba",dd:"\u0daf\u0dd2\u0db1 %d",M:"\u0db8\u0dcf\u0dc3\u0dba",MM:"\u0db8\u0dcf\u0dc3 %d",y:"\u0dc0\u0dc3\u0dbb",yy:"\u0dc0\u0dc3\u0dbb %d"},dayOfMonthOrdinalParse:/\d{1,2} \u0dc0\u0dd0\u0db1\u0dd2/,ordinal:function(e){return e+" \u0dc0\u0dd0\u0db1\u0dd2"},meridiemParse:/\u0db4\u0dd9\u0dbb \u0dc0\u0dbb\u0dd4|\u0db4\u0dc3\u0dca \u0dc0\u0dbb\u0dd4|\u0db4\u0dd9.\u0dc0|\u0db4.\u0dc0./,isPM:function(e){return"\u0db4.\u0dc0."===e||"\u0db4\u0dc3\u0dca \u0dc0\u0dbb\u0dd4"===e},meridiem:function(e,t,n){return e>11?n?"\u0db4.\u0dc0.":"\u0db4\u0dc3\u0dca \u0dc0\u0dbb\u0dd4":n?"\u0db4\u0dd9.\u0dc0.":"\u0db4\u0dd9\u0dbb \u0dc0\u0dbb\u0dd4"}})}(n("wd/R"))},"7o/Q":function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i=n("n6bG"),r=n("gRHU"),s=n("quSY"),o=n("2QA8"),a=n("2fFW"),c=n("NJ4a");class l extends s.a{constructor(e,t,n){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=r.a;break;case 1:if(!e){this.destination=r.a;break}if("object"==typeof e){e instanceof l?(this.syncErrorThrowable=e.syncErrorThrowable,this.destination=e,e.add(this)):(this.syncErrorThrowable=!0,this.destination=new u(this,e));break}default:this.syncErrorThrowable=!0,this.destination=new u(this,e,t,n)}}[o.a](){return this}static create(e,t,n){const i=new l(e,t,n);return i.syncErrorThrowable=!1,i}next(e){this.isStopped||this._next(e)}error(e){this.isStopped||(this.isStopped=!0,this._error(e))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(e){this.destination.next(e)}_error(e){this.destination.error(e),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:e}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this}}class u extends l{constructor(e,t,n,s){let o;super(),this._parentSubscriber=e;let a=this;Object(i.a)(t)?o=t:t&&(o=t.next,n=t.error,s=t.complete,t!==r.a&&(a=Object.create(t),Object(i.a)(a.unsubscribe)&&this.add(a.unsubscribe.bind(a)),a.unsubscribe=this.unsubscribe.bind(this))),this._context=a,this._next=o,this._error=n,this._complete=s}next(e){if(!this.isStopped&&this._next){const{_parentSubscriber:t}=this;a.a.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}}error(e){if(!this.isStopped){const{_parentSubscriber:t}=this,{useDeprecatedSynchronousErrorHandling:n}=a.a;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):Object(c.a)(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;Object(c.a)(e)}}}complete(){if(!this.isStopped){const{_parentSubscriber:e}=this;if(this._complete){const t=()=>this._complete.call(this._context);a.a.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,t),this.unsubscribe()):(this.__tryOrUnsub(t),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(e,t){try{e.call(this._context,t)}catch(n){if(this.unsubscribe(),a.a.useDeprecatedSynchronousErrorHandling)throw n;Object(c.a)(n)}}__tryOrSetError(e,t,n){if(!a.a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(i){return a.a.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=i,e.syncErrorThrown=!0,!0):(Object(c.a)(i),!0)}return!1}_unsubscribe(){const{_parentSubscriber:e}=this;this._context=null,this._parentSubscriber=null,e.unsubscribe()}}},"8/+R":function(e,t,n){!function(e){"use strict";var t={1:"\u0a67",2:"\u0a68",3:"\u0a69",4:"\u0a6a",5:"\u0a6b",6:"\u0a6c",7:"\u0a6d",8:"\u0a6e",9:"\u0a6f",0:"\u0a66"},n={"\u0a67":"1","\u0a68":"2","\u0a69":"3","\u0a6a":"4","\u0a6b":"5","\u0a6c":"6","\u0a6d":"7","\u0a6e":"8","\u0a6f":"9","\u0a66":"0"};e.defineLocale("pa-in",{months:"\u0a1c\u0a28\u0a35\u0a30\u0a40_\u0a2b\u0a3c\u0a30\u0a35\u0a30\u0a40_\u0a2e\u0a3e\u0a30\u0a1a_\u0a05\u0a2a\u0a4d\u0a30\u0a48\u0a32_\u0a2e\u0a08_\u0a1c\u0a42\u0a28_\u0a1c\u0a41\u0a32\u0a3e\u0a08_\u0a05\u0a17\u0a38\u0a24_\u0a38\u0a24\u0a70\u0a2c\u0a30_\u0a05\u0a15\u0a24\u0a42\u0a2c\u0a30_\u0a28\u0a35\u0a70\u0a2c\u0a30_\u0a26\u0a38\u0a70\u0a2c\u0a30".split("_"),monthsShort:"\u0a1c\u0a28\u0a35\u0a30\u0a40_\u0a2b\u0a3c\u0a30\u0a35\u0a30\u0a40_\u0a2e\u0a3e\u0a30\u0a1a_\u0a05\u0a2a\u0a4d\u0a30\u0a48\u0a32_\u0a2e\u0a08_\u0a1c\u0a42\u0a28_\u0a1c\u0a41\u0a32\u0a3e\u0a08_\u0a05\u0a17\u0a38\u0a24_\u0a38\u0a24\u0a70\u0a2c\u0a30_\u0a05\u0a15\u0a24\u0a42\u0a2c\u0a30_\u0a28\u0a35\u0a70\u0a2c\u0a30_\u0a26\u0a38\u0a70\u0a2c\u0a30".split("_"),weekdays:"\u0a10\u0a24\u0a35\u0a3e\u0a30_\u0a38\u0a4b\u0a2e\u0a35\u0a3e\u0a30_\u0a2e\u0a70\u0a17\u0a32\u0a35\u0a3e\u0a30_\u0a2c\u0a41\u0a27\u0a35\u0a3e\u0a30_\u0a35\u0a40\u0a30\u0a35\u0a3e\u0a30_\u0a38\u0a3c\u0a41\u0a71\u0a15\u0a30\u0a35\u0a3e\u0a30_\u0a38\u0a3c\u0a28\u0a40\u0a1a\u0a30\u0a35\u0a3e\u0a30".split("_"),weekdaysShort:"\u0a10\u0a24_\u0a38\u0a4b\u0a2e_\u0a2e\u0a70\u0a17\u0a32_\u0a2c\u0a41\u0a27_\u0a35\u0a40\u0a30_\u0a38\u0a3c\u0a41\u0a15\u0a30_\u0a38\u0a3c\u0a28\u0a40".split("_"),weekdaysMin:"\u0a10\u0a24_\u0a38\u0a4b\u0a2e_\u0a2e\u0a70\u0a17\u0a32_\u0a2c\u0a41\u0a27_\u0a35\u0a40\u0a30_\u0a38\u0a3c\u0a41\u0a15\u0a30_\u0a38\u0a3c\u0a28\u0a40".split("_"),longDateFormat:{LT:"A h:mm \u0a35\u0a1c\u0a47",LTS:"A h:mm:ss \u0a35\u0a1c\u0a47",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u0a35\u0a1c\u0a47",LLLL:"dddd, D MMMM YYYY, A h:mm \u0a35\u0a1c\u0a47"},calendar:{sameDay:"[\u0a05\u0a1c] LT",nextDay:"[\u0a15\u0a32] LT",nextWeek:"[\u0a05\u0a17\u0a32\u0a3e] dddd, LT",lastDay:"[\u0a15\u0a32] LT",lastWeek:"[\u0a2a\u0a3f\u0a1b\u0a32\u0a47] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0a35\u0a3f\u0a71\u0a1a",past:"%s \u0a2a\u0a3f\u0a1b\u0a32\u0a47",s:"\u0a15\u0a41\u0a1d \u0a38\u0a15\u0a3f\u0a70\u0a1f",ss:"%d \u0a38\u0a15\u0a3f\u0a70\u0a1f",m:"\u0a07\u0a15 \u0a2e\u0a3f\u0a70\u0a1f",mm:"%d \u0a2e\u0a3f\u0a70\u0a1f",h:"\u0a07\u0a71\u0a15 \u0a18\u0a70\u0a1f\u0a3e",hh:"%d \u0a18\u0a70\u0a1f\u0a47",d:"\u0a07\u0a71\u0a15 \u0a26\u0a3f\u0a28",dd:"%d \u0a26\u0a3f\u0a28",M:"\u0a07\u0a71\u0a15 \u0a2e\u0a39\u0a40\u0a28\u0a3e",MM:"%d \u0a2e\u0a39\u0a40\u0a28\u0a47",y:"\u0a07\u0a71\u0a15 \u0a38\u0a3e\u0a32",yy:"%d \u0a38\u0a3e\u0a32"},preparse:function(e){return e.replace(/[\u0a67\u0a68\u0a69\u0a6a\u0a6b\u0a6c\u0a6d\u0a6e\u0a6f\u0a66]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/\u0a30\u0a3e\u0a24|\u0a38\u0a35\u0a47\u0a30|\u0a26\u0a41\u0a2a\u0a39\u0a3f\u0a30|\u0a38\u0a3c\u0a3e\u0a2e/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u0a30\u0a3e\u0a24"===t?e<4?e:e+12:"\u0a38\u0a35\u0a47\u0a30"===t?e:"\u0a26\u0a41\u0a2a\u0a39\u0a3f\u0a30"===t?e>=10?e:e+12:"\u0a38\u0a3c\u0a3e\u0a2e"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"\u0a30\u0a3e\u0a24":e<10?"\u0a38\u0a35\u0a47\u0a30":e<17?"\u0a26\u0a41\u0a2a\u0a39\u0a3f\u0a30":e<20?"\u0a38\u0a3c\u0a3e\u0a2e":"\u0a30\u0a3e\u0a24"},week:{dow:0,doy:6}})}(n("wd/R"))},"85J/":function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("8Y7J");let r=(()=>{class e{transform(e){const t=/ceph version\s+([^ ]+)\s+\(.+\)/.exec(e);return t?t[1]:e}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"cephShortVersion",type:e,pure:!0}),e})()},"8Y7J":function(e,t,n){"use strict";n.d(t,"a",(function(){return Is})),n.d(t,"b",(function(){return eu})),n.d(t,"c",(function(){return Jl})),n.d(t,"d",(function(){return Gl})),n.d(t,"e",(function(){return ql})),n.d(t,"f",(function(){return Vu})),n.d(t,"g",(function(){return Iu})),n.d(t,"h",(function(){return bs})),n.d(t,"i",(function(){return du})),n.d(t,"j",(function(){return _a})),n.d(t,"k",(function(){return ma})),n.d(t,"l",(function(){return iu})),n.d(t,"m",(function(){return ya})),n.d(t,"n",(function(){return En})),n.d(t,"o",(function(){return Ml})),n.d(t,"p",(function(){return G})),n.d(t,"q",(function(){return d})),n.d(t,"r",(function(){return U})),n.d(t,"s",(function(){return As})),n.d(t,"t",(function(){return Fa})),n.d(t,"u",(function(){return Ya})),n.d(t,"v",(function(){return nu})),n.d(t,"w",(function(){return ce})),n.d(t,"x",(function(){return Nu})),n.d(t,"y",(function(){return ae})),n.d(t,"z",(function(){return Ou})),n.d(t,"A",(function(){return pu})),n.d(t,"B",(function(){return h})),n.d(t,"C",(function(){return Xl})),n.d(t,"D",(function(){return Zl})),n.d(t,"E",(function(){return Ma})),n.d(t,"F",(function(){return wa})),n.d(t,"G",(function(){return Sa})),n.d(t,"H",(function(){return xa})),n.d(t,"I",(function(){return Si})),n.d(t,"J",(function(){return p})),n.d(t,"K",(function(){return Yu})),n.d(t,"L",(function(){return Wa})),n.d(t,"M",(function(){return Su})),n.d(t,"N",(function(){return _s})),n.d(t,"O",(function(){return Da})),n.d(t,"P",(function(){return Ba})),n.d(t,"Q",(function(){return _e})),n.d(t,"R",(function(){return Lu})),n.d(t,"S",(function(){return Qn})),n.d(t,"T",(function(){return R})),n.d(t,"U",(function(){return Jn})),n.d(t,"V",(function(){return Hu})),n.d(t,"W",(function(){return xu})),n.d(t,"X",(function(){return tu})),n.d(t,"Y",(function(){return ys})),n.d(t,"Z",(function(){return ac})),n.d(t,"ab",(function(){return vi})),n.d(t,"bb",(function(){return ni})),n.d(t,"cb",(function(){return zn})),n.d(t,"db",(function(){return Hn})),n.d(t,"eb",(function(){return Un})),n.d(t,"fb",(function(){return Vn})),n.d(t,"gb",(function(){return Wn})),n.d(t,"hb",(function(){return Bn})),n.d(t,"ib",(function(){return ic})),n.d(t,"jb",(function(){return $u})),n.d(t,"kb",(function(){return rc})),n.d(t,"lb",(function(){return sc})),n.d(t,"mb",(function(){return $n})),n.d(t,"nb",(function(){return F})),n.d(t,"ob",(function(){return Bs})),n.d(t,"pb",(function(){return go})),n.d(t,"qb",(function(){return bo})),n.d(t,"rb",(function(){return nc})),n.d(t,"sb",(function(){return Qe})),n.d(t,"tb",(function(){return C})),n.d(t,"ub",(function(){return Yn})),n.d(t,"vb",(function(){return js})),n.d(t,"wb",(function(){return Ve})),n.d(t,"xb",(function(){return pa})),n.d(t,"yb",(function(){return Bi})),n.d(t,"zb",(function(){return Xs})),n.d(t,"Ab",(function(){return Yo})),n.d(t,"Bb",(function(){return na})),n.d(t,"Cb",(function(){return ia})),n.d(t,"Db",(function(){return ra})),n.d(t,"Eb",(function(){return Fo})),n.d(t,"Fb",(function(){return Fl})),n.d(t,"Gb",(function(){return Se})),n.d(t,"Hb",(function(){return Oe})),n.d(t,"Ib",(function(){return _})),n.d(t,"Jb",(function(){return y})),n.d(t,"Kb",(function(){return De})),n.d(t,"Lb",(function(){return Le})),n.d(t,"Mb",(function(){return ro})),n.d(t,"Nb",(function(){return uo})),n.d(t,"Ob",(function(){return po})),n.d(t,"Pb",(function(){return fo})),n.d(t,"Qb",(function(){return ho})),n.d(t,"Rb",(function(){return lo})),n.d(t,"Sb",(function(){return co})),n.d(t,"Tb",(function(){return mo})),n.d(t,"Ub",(function(){return Cn})),n.d(t,"Vb",(function(){return sa})),n.d(t,"Wb",(function(){return Xc})),n.d(t,"Xb",(function(){return nl})),n.d(t,"Yb",(function(){return el})),n.d(t,"Zb",(function(){return Zc})),n.d(t,"ac",(function(){return tl})),n.d(t,"bc",(function(){return il})),n.d(t,"cc",(function(){return Kc})),n.d(t,"dc",(function(){return ie})),n.d(t,"ec",(function(){return so})),n.d(t,"fc",(function(){return Ul})),n.d(t,"gc",(function(){return _o})),n.d(t,"hc",(function(){return $l})),n.d(t,"ic",(function(){return wo})),n.d(t,"jc",(function(){return gl})),n.d(t,"kc",(function(){return _l})),n.d(t,"lc",(function(){return yl})),n.d(t,"mc",(function(){return vl})),n.d(t,"nc",(function(){return Do})),n.d(t,"oc",(function(){return Mo})),n.d(t,"pc",(function(){return oo})),n.d(t,"qc",(function(){return To})),n.d(t,"rc",(function(){return Co})),n.d(t,"sc",(function(){return Oo})),n.d(t,"tc",(function(){return al})),n.d(t,"uc",(function(){return cl})),n.d(t,"vc",(function(){return ll})),n.d(t,"wc",(function(){return ul})),n.d(t,"xc",(function(){return dl})),n.d(t,"yc",(function(){return hl})),n.d(t,"zc",(function(){return Il})),n.d(t,"Ac",(function(){return io})),n.d(t,"Bc",(function(){return ln})),n.d(t,"Cc",(function(){return cn})),n.d(t,"Dc",(function(){return bt})),n.d(t,"Ec",(function(){return Mi})),n.d(t,"Fc",(function(){return xi})),n.d(t,"Gc",(function(){return ki})),n.d(t,"Hc",(function(){return Te})),n.d(t,"Ic",(function(){return Yl})),n.d(t,"Jc",(function(){return Pl})),n.d(t,"Kc",(function(){return jo})),n.d(t,"Lc",(function(){return oa})),n.d(t,"Mc",(function(){return no})),n.d(t,"Nc",(function(){return Bl})),n.d(t,"Oc",(function(){return Ko})),n.d(t,"Pc",(function(){return Zo})),n.d(t,"Qc",(function(){return Xo})),n.d(t,"Rc",(function(){return ea})),n.d(t,"Sc",(function(){return ta})),n.d(t,"Tc",(function(){return Nl}));var i=n("XNiG"),r=n("quSY"),s=n("HDdC"),o=n("VRyK"),a=n("w1tV");function c(e){return{toString:e}.toString()}const l="__parameters__";function u(e,t,n){return c(()=>{const i=function(e){return function(...t){if(e){const n=e(...t);for(const e in n)this[e]=n[e]}}}(t);function r(...e){if(this instanceof r)return i.apply(this,e),this;const t=new r(...e);return n.annotation=t,n;function n(e,n,i){const r=e.hasOwnProperty(l)?e[l]:Object.defineProperty(e,l,{value:[]})[l];for(;r.length<=i;)r.push(null);return(r[i]=r[i]||[]).push(t),e}}return n&&(r.prototype=Object.create(n.prototype)),r.prototype.ngMetadataName=e,r.annotationCls=r,r})}const d=u("Inject",e=>({token:e})),h=u("Optional"),f=u("Self"),p=u("SkipSelf");var m=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}({});function b(e){for(let t in e)if(e[t]===b)return t;throw Error("Could not find renamed property on target object.")}function g(e,t){for(const n in t)t.hasOwnProperty(n)&&!e.hasOwnProperty(n)&&(e[n]=t[n])}function _(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function y(e){return{factory:e.factory,providers:e.providers||[],imports:e.imports||[]}}function v(e){return w(e,e[M])||w(e,e[D])}function w(e,t){return t&&t.token===e?t:null}function S(e){return e&&(e.hasOwnProperty(k)||e.hasOwnProperty(T))?e[k]:null}const M=b({"\u0275prov":b}),k=b({"\u0275inj":b}),x=b({"\u0275provFallback":b}),D=b({ngInjectableDef:b}),T=b({ngInjectorDef:b});function C(e){if("string"==typeof e)return e;if(Array.isArray(e))return"["+e.map(C).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return""+e.overriddenName;if(e.name)return""+e.name;const t=e.toString();if(null==t)return""+t;const n=t.indexOf("\n");return-1===n?t:t.substring(0,n)}function O(e,t){return null==e||""===e?null===t?"":t:null==t||""===t?e:e+" "+t}const L=b({__forward_ref__:b});function R(e){return e.__forward_ref__=R,e.toString=function(){return C(this())},e}function E(e){return A(e)?e():e}function A(e){return"function"==typeof e&&e.hasOwnProperty(L)&&e.__forward_ref__===R}const I="undefined"!=typeof globalThis&&globalThis,P="undefined"!=typeof window&&window,N="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,j="undefined"!=typeof global&&global,F=I||j||P||N,Y=b({"\u0275cmp":b}),z=b({"\u0275dir":b}),$=b({"\u0275pipe":b}),H=b({"\u0275mod":b}),W=b({"\u0275loc":b}),V=b({"\u0275fac":b}),B=b({__NG_ELEMENT_ID__:b});class U{constructor(e,t){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof t?this.__NG_ELEMENT_ID__=t:void 0!==t&&(this.\u0275prov=_({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}toString(){return"InjectionToken "+this._desc}}const G=new U("INJECTOR",-1),q={},J=/\n/gm,Q="__source",K=b({provide:String,useValue:b});let Z,X=void 0;function ee(e){const t=X;return X=e,t}function te(e){const t=Z;return Z=e,t}function ne(e,t=m.Default){if(void 0===X)throw new Error("inject() must be called from an injection context");return null===X?re(e,void 0,t):X.get(e,t&m.Optional?null:void 0,t)}function ie(e,t=m.Default){return(Z||ne)(E(e),t)}function re(e,t,n){const i=v(e);if(i&&"root"==i.providedIn)return void 0===i.value?i.value=i.factory():i.value;if(n&m.Optional)return null;if(void 0!==t)return t;throw new Error(`Injector: NOT_FOUND [${C(e)}]`)}function se(e){const t=[];for(let n=0;n<e.length;n++){const i=E(e[n]);if(Array.isArray(i)){if(0===i.length)throw new Error("Arguments array must have arguments.");let e=void 0,n=m.Default;for(let t=0;t<i.length;t++){const r=i[t];r instanceof h||"Optional"===r.ngMetadataName||r===h?n|=m.Optional:r instanceof p||"SkipSelf"===r.ngMetadataName||r===p?n|=m.SkipSelf:r instanceof f||"Self"===r.ngMetadataName||r===f?n|=m.Self:e=r instanceof d||r===d?r.token:r}t.push(ie(e,n))}else t.push(ie(i))}return t}class oe{get(e,t=q){if(t===q){const t=new Error(`NullInjectorError: No provider for ${C(e)}!`);throw t.name="NullInjectorError",t}return t}}class ae{}class ce{}function le(e,t){for(let n=0;n<e.length;n++)t.push(e[n])}function ue(e,t){e.forEach(e=>Array.isArray(e)?ue(e,t):t(e))}function de(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function he(e,t){return t>=e.length-1?e.pop():e.splice(t,1)[0]}function fe(e,t){const n=[];for(let i=0;i<e;i++)n.push(t);return n}function pe(e,t,n){let i=be(e,t);return i>=0?e[1|i]=n:(i=~i,function(e,t,n,i){let r=e.length;if(r==t)e.push(n,i);else if(1===r)e.push(i,e[0]),e[0]=n;else{for(r--,e.push(e[r-1],e[r]);r>t;)e[r]=e[r-2],r--;e[t]=n,e[t+1]=i}}(e,i,t,n)),i}function me(e,t){const n=be(e,t);if(n>=0)return e[1|n]}function be(e,t){return function(e,t,n){let i=0,r=e.length>>1;for(;r!==i;){const n=i+(r-i>>1),s=e[n<<1];if(t===s)return n<<1;s>t?r=n:i=n+1}return~(r<<1)}(e,t)}var ge=function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e}({}),_e=function(e){return e[e.Emulated=0]="Emulated",e[e.Native=1]="Native",e[e.None=2]="None",e[e.ShadowDom=3]="ShadowDom",e}({});const ye={},ve=[];let we=0;function Se(e){return c(()=>{const t={},n={type:e.type,providersResolver:null,decls:e.decls,vars:e.vars,factory:null,template:e.template||null,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:t,inputs:null,outputs:null,exportAs:e.exportAs||null,onPush:e.changeDetection===ge.OnPush,directiveDefs:null,pipeDefs:null,selectors:e.selectors||ve,viewQuery:e.viewQuery||null,features:e.features||null,data:e.data||{},encapsulation:e.encapsulation||_e.Emulated,id:"c",styles:e.styles||ve,_:null,setInput:null,schemas:e.schemas||null,tView:null},i=e.directives,r=e.features,s=e.pipes;return n.id+=we++,n.inputs=Ce(e.inputs,t),n.outputs=Ce(e.outputs),r&&r.forEach(e=>e(n)),n.directiveDefs=i?()=>("function"==typeof i?i():i).map(Me):null,n.pipeDefs=s?()=>("function"==typeof s?s():s).map(ke):null,n})}function Me(e){return Re(e)||function(e){return e[z]||null}(e)}function ke(e){return function(e){return e[$]||null}(e)}const xe={};function De(e){const t={type:e.type,bootstrap:e.bootstrap||ve,declarations:e.declarations||ve,imports:e.imports||ve,exports:e.exports||ve,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null};return null!=e.id&&c(()=>{xe[e.id]=e.type}),t}function Te(e,t){return c(()=>{const n=Ae(e,!0);n.declarations=t.declarations||ve,n.imports=t.imports||ve,n.exports=t.exports||ve})}function Ce(e,t){if(null==e)return ye;const n={};for(const i in e)if(e.hasOwnProperty(i)){let r=e[i],s=r;Array.isArray(r)&&(s=r[1],r=r[0]),n[r]=i,t&&(t[r]=s)}return n}const Oe=Se;function Le(e){return{type:e.type,name:e.name,factory:null,pure:!1!==e.pure,onDestroy:e.type.prototype.ngOnDestroy||null}}function Re(e){return e[Y]||null}function Ee(e,t){return e.hasOwnProperty(V)?e[V]:null}function Ae(e,t){const n=e[H]||null;if(!n&&!0===t)throw new Error(`Type ${C(e)} does not have '\u0275mod' property.`);return n}const Ie=20,Pe=10;function Ne(e){return Array.isArray(e)&&"object"==typeof e[1]}function je(e){return Array.isArray(e)&&!0===e[1]}function Fe(e){return 0!=(8&e.flags)}function Ye(e){return 2==(2&e.flags)}function ze(e){return 1==(1&e.flags)}function $e(e){return null!==e.template}function He(e){return 0!=(512&e[2])}class We{constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}}function Ve(){return Be}function Be(e){return e.type.prototype.ngOnChanges&&(e.setInput=Ge),Ue}function Ue(){const e=qe(this),t=null==e?void 0:e.current;if(t){const n=e.previous;if(n===ye)e.previous=t;else for(let e in t)n[e]=t[e];e.current=null,this.ngOnChanges(t)}}function Ge(e,t,n,i){const r=qe(e)||function(e,t){return e.__ngSimpleChanges__=t}(e,{previous:ye,current:null}),s=r.current||(r.current={}),o=r.previous,a=this.declaredInputs[n],c=o[a];s[a]=new We(c&&c.currentValue,t,o===ye),e[i]=t}function qe(e){return e.__ngSimpleChanges__||null}Ve.ngInherit=!0;let Je=void 0;function Qe(e){Je=e}function Ke(){return void 0!==Je?Je:"undefined"!=typeof document?document:void 0}function Ze(e){return!!e.listen}const Xe={createRenderer:(e,t)=>Ke()};function et(e){for(;Array.isArray(e);)e=e[0];return e}function tt(e,t){return et(t[e+Ie])}function nt(e,t){return et(t[e.index])}function it(e,t){return e.data[t+Ie]}function rt(e,t){return e[t+Ie]}function st(e,t){const n=t[e];return Ne(n)?n:n[0]}function ot(e){const t=function(e){return e.__ngContext__||null}(e);return t?Array.isArray(t)?t:t.lView:null}function at(e){return 4==(4&e[2])}function ct(e){return 128==(128&e[2])}function lt(e,t){return null===e||null==t?null:e[t]}function ut(e){e[18]=0}function dt(e,t){e[5]+=t;let n=e,i=e[3];for(;null!==i&&(1===t&&1===n[5]||-1===t&&0===n[5]);)i[5]+=t,n=i,i=i[3]}const ht={lFrame:Pt(null),bindingsEnabled:!0,checkNoChangesMode:!1};function ft(){return ht.bindingsEnabled}function pt(){return ht.lFrame.lView}function mt(){return ht.lFrame.tView}function bt(e){ht.lFrame.contextLView=e}function gt(){return ht.lFrame.currentTNode}function _t(e,t){ht.lFrame.currentTNode=e,ht.lFrame.isParent=t}function yt(){return ht.lFrame.isParent}function vt(){ht.lFrame.isParent=!1}function wt(){return ht.checkNoChangesMode}function St(e){ht.checkNoChangesMode=e}function Mt(){const e=ht.lFrame;let t=e.bindingRootIndex;return-1===t&&(t=e.bindingRootIndex=e.tView.bindingStartIndex),t}function kt(){return ht.lFrame.bindingIndex}function xt(){return ht.lFrame.bindingIndex++}function Dt(e){const t=ht.lFrame,n=t.bindingIndex;return t.bindingIndex=t.bindingIndex+e,n}function Tt(e,t){const n=ht.lFrame;n.bindingIndex=n.bindingRootIndex=e,Ct(t)}function Ct(e){ht.lFrame.currentDirectiveIndex=e}function Ot(e){const t=ht.lFrame.currentDirectiveIndex;return-1===t?null:e[t]}function Lt(){return ht.lFrame.currentQueryIndex}function Rt(e){ht.lFrame.currentQueryIndex=e}function Et(e,t){const n=It();ht.lFrame=n,n.currentTNode=t,n.lView=e}function At(e){const t=It(),n=e[1];ht.lFrame=t,t.currentTNode=n.firstChild,t.lView=e,t.tView=n,t.contextLView=e,t.bindingIndex=n.bindingStartIndex}function It(){const e=ht.lFrame,t=null===e?null:e.child;return null===t?Pt(e):t}function Pt(e){const t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:0,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null};return null!==e&&(e.child=t),t}function Nt(){const e=ht.lFrame;return ht.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}const jt=Nt;function Ft(){const e=Nt();e.isParent=!0,e.tView=null,e.selectedIndex=0,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function Yt(){return ht.lFrame.selectedIndex}function zt(e){ht.lFrame.selectedIndex=e}function $t(){const e=ht.lFrame;return it(e.tView,e.selectedIndex)}function Ht(e,t){for(let n=t.directiveStart,i=t.directiveEnd;n<i;n++){const t=e.data[n].type.prototype,{ngAfterContentInit:i,ngAfterContentChecked:r,ngAfterViewInit:s,ngAfterViewChecked:o,ngOnDestroy:a}=t;i&&(e.contentHooks||(e.contentHooks=[])).push(-n,i),r&&((e.contentHooks||(e.contentHooks=[])).push(n,r),(e.contentCheckHooks||(e.contentCheckHooks=[])).push(n,r)),s&&(e.viewHooks||(e.viewHooks=[])).push(-n,s),o&&((e.viewHooks||(e.viewHooks=[])).push(n,o),(e.viewCheckHooks||(e.viewCheckHooks=[])).push(n,o)),null!=a&&(e.destroyHooks||(e.destroyHooks=[])).push(n,a)}}function Wt(e,t,n){Ut(e,t,3,n)}function Vt(e,t,n,i){(3&e[2])===n&&Ut(e,t,n,i)}function Bt(e,t){let n=e[2];(3&n)===t&&(n&=2047,n+=1,e[2]=n)}function Ut(e,t,n,i){const r=null!=i?i:-1;let s=0;for(let o=void 0!==i?65535&e[18]:0;o<t.length;o++)if("number"==typeof t[o+1]){if(s=t[o],null!=i&&s>=i)break}else t[o]<0&&(e[18]+=65536),(s<r||-1==r)&&(Gt(e,n,t,o),e[18]=(4294901760&e[18])+o+2),o++}function Gt(e,t,n,i){const r=n[i]<0,s=n[i+1],o=e[r?-n[i]:n[i]];r?e[2]>>11<e[18]>>16&&(3&e[2])===t&&(e[2]+=2048,s.call(o)):s.call(o)}const qt=-1;class Jt{constructor(e,t,n){this.factory=e,this.resolving=!1,this.canSeeViewProviders=t,this.injectImpl=n}}function Qt(e,t,n){const i=Ze(e);let r=0;for(;r<n.length;){const s=n[r];if("number"==typeof s){if(0!==s)break;r++;const o=n[r++],a=n[r++],c=n[r++];i?e.setAttribute(t,a,c,o):t.setAttributeNS(o,a,c)}else{const o=s,a=n[++r];Zt(o)?i&&e.setProperty(t,o,a):i?e.setAttribute(t,o,a):t.setAttribute(o,a),r++}}return r}function Kt(e){return 3===e||4===e||6===e}function Zt(e){return 64===e.charCodeAt(0)}function Xt(e,t){if(null===t||0===t.length);else if(null===e||0===e.length)e=t.slice();else{let n=-1;for(let i=0;i<t.length;i++){const r=t[i];"number"==typeof r?n=r:0===n||en(e,n,r,null,-1===n||2===n?t[++i]:null)}}return e}function en(e,t,n,i,r){let s=0,o=e.length;if(-1===t)o=-1;else for(;s<e.length;){const n=e[s++];if("number"==typeof n){if(n===t){o=-1;break}if(n>t){o=s-1;break}}}for(;s<e.length;){const t=e[s];if("number"==typeof t)break;if(t===n){if(null===i)return void(null!==r&&(e[s+1]=r));if(i===e[s+1])return void(e[s+2]=r)}s++,null!==i&&s++,null!==r&&s++}-1!==o&&(e.splice(o,0,t),s=o+1),e.splice(s++,0,n),null!==i&&e.splice(s++,0,i),null!==r&&e.splice(s++,0,r)}function tn(e){return e!==qt}function nn(e){return 32767&e}function rn(e,t){let n=e>>16,i=t;for(;n>0;)i=i[15],n--;return i}function sn(e){return"string"==typeof e?e:null==e?"":""+e}function on(e){return"function"==typeof e?e.name||e.toString():"object"==typeof e&&null!=e&&"function"==typeof e.type?e.type.name||e.type.toString():sn(e)}const an=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(F))();function cn(e){return{name:"window",target:e.ownerDocument.defaultView}}function ln(e){return{name:"body",target:e.ownerDocument.body}}function un(e){return e instanceof Function?e():e}let dn=!0;function hn(e){const t=dn;return dn=e,t}let fn=0;function pn(e,t){const n=bn(e,t);if(-1!==n)return n;const i=t[1];i.firstCreatePass&&(e.injectorIndex=t.length,mn(i.data,e),mn(t,null),mn(i.blueprint,null));const r=gn(e,t),s=e.injectorIndex;if(tn(r)){const e=nn(r),n=rn(r,t),i=n[1].data;for(let r=0;r<8;r++)t[s+r]=n[e+r]|i[e+r]}return t[s+8]=r,s}function mn(e,t){e.push(0,0,0,0,0,0,0,0,t)}function bn(e,t){return-1===e.injectorIndex||e.parent&&e.parent.injectorIndex===e.injectorIndex||null===t[e.injectorIndex+8]?-1:e.injectorIndex}function gn(e,t){if(e.parent&&-1!==e.parent.injectorIndex)return e.parent.injectorIndex;let n=0,i=null,r=t;for(;null!==r;){const e=r[1],t=e.type;if(i=2===t?e.declTNode:1===t?r[6]:null,null===i)return qt;if(n++,r=r[15],-1!==i.injectorIndex)return i.injectorIndex|n<<16}return qt}function _n(e,t,n){!function(e,t,n){let i;"string"==typeof n?i=n.charCodeAt(0)||0:n.hasOwnProperty(B)&&(i=n[B]),null==i&&(i=n[B]=fn++);const r=255&i,s=1<<r,o=64&r,a=32&r,c=t.data;128&r?o?a?c[e+7]|=s:c[e+6]|=s:a?c[e+5]|=s:c[e+4]|=s:o?a?c[e+3]|=s:c[e+2]|=s:a?c[e+1]|=s:c[e]|=s}(e,t,n)}function yn(e,t,n,i=m.Default,r){if(null!==e){const r=function(e){if("string"==typeof e)return e.charCodeAt(0)||0;const t=e.hasOwnProperty(B)?e[B]:void 0;return"number"==typeof t&&t>0?255&t:t}(n);if("function"==typeof r){Et(t,e);try{const e=r();if(null!=e||i&m.Optional)return e;throw new Error(`No provider for ${on(n)}!`)}finally{jt()}}else if("number"==typeof r){if(-1===r)return new Dn(e,t);let s=null,o=bn(e,t),a=qt,c=i&m.Host?t[16][6]:null;for((-1===o||i&m.SkipSelf)&&(a=-1===o?gn(e,t):t[o+8],a!==qt&&xn(i,!1)?(s=t[1],o=nn(a),t=rn(a,t)):o=-1);-1!==o;){const e=t[1];if(kn(r,o,e.data)){const e=wn(o,t,n,s,i,c);if(e!==vn)return e}a=t[o+8],a!==qt&&xn(i,t[1].data[o+8]===c)&&kn(r,o,t)?(s=e,o=nn(a),t=rn(a,t)):o=-1}}}if(i&m.Optional&&void 0===r&&(r=null),0==(i&(m.Self|m.Host))){const e=t[9],s=te(void 0);try{return e?e.get(n,r,i&m.Optional):re(n,r,i&m.Optional)}finally{te(s)}}if(i&m.Optional)return r;throw new Error(`NodeInjector: NOT_FOUND [${on(n)}]`)}const vn={};function wn(e,t,n,i,r,s){const o=t[1],a=o.data[e+8],c=Sn(a,o,n,null==i?Ye(a)&&dn:i!=o&&2===a.type,r&m.Host&&s===a);return null!==c?Mn(t,o,c,a):vn}function Sn(e,t,n,i,r){const s=e.providerIndexes,o=t.data,a=1048575&s,c=e.directiveStart,l=s>>20,u=r?a+l:e.directiveEnd;for(let d=i?a:a+l;d<u;d++){const e=o[d];if(d<c&&n===e||d>=c&&e.type===n)return d}if(r){const e=o[c];if(e&&$e(e)&&e.type===n)return c}return null}function Mn(e,t,n,i){let r=e[n];const s=t.data;if(r instanceof Jt){const o=r;if(o.resolving)throw new Error("Circular dep for "+on(s[n]));const a=hn(o.canSeeViewProviders);o.resolving=!0;const c=o.injectImpl?te(o.injectImpl):null;Et(e,i);try{r=e[n]=o.factory(void 0,s,e,i),t.firstCreatePass&&n>=i.directiveStart&&function(e,t,n){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:s}=t.type.prototype;if(i){const i=Be(t);(n.preOrderHooks||(n.preOrderHooks=[])).push(e,i),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(e,i)}r&&(n.preOrderHooks||(n.preOrderHooks=[])).push(0-e,r),s&&((n.preOrderHooks||(n.preOrderHooks=[])).push(e,s),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(e,s))}(n,s[n],t)}finally{null!==c&&te(c),hn(a),o.resolving=!1,jt()}}return r}function kn(e,t,n){const i=64&e,r=32&e;let s;return s=128&e?i?r?n[t+7]:n[t+6]:r?n[t+5]:n[t+4]:i?r?n[t+3]:n[t+2]:r?n[t+1]:n[t],!!(s&1<<e)}function xn(e,t){return!(e&m.Self||e&m.Host&&t)}class Dn{constructor(e,t){this._tNode=e,this._lView=t}get(e,t){return yn(this._tNode,this._lView,e,void 0,t)}}function Tn(e){const t=e;if(A(e))return()=>{const e=Tn(E(t));return e?e():null};let n=Ee(t);if(null===n){const e=S(t);n=e&&e.factory}return n||null}function Cn(e){return c(()=>{const t=e.prototype.constructor,n=t[V]||Tn(t),i=Object.prototype;let r=Object.getPrototypeOf(e.prototype).constructor;for(;r&&r!==i;){const e=r[V]||Tn(r);if(e&&e!==n)return e;r=Object.getPrototypeOf(r)}return e=>new e})}function On(e){return e.ngDebugContext}function Ln(e){return e.ngOriginalError}function Rn(e,...t){e.error(...t)}class En{constructor(){this._console=console}handleError(e){const t=this._findOriginalError(e),n=this._findContext(e),i=function(e){return e.ngErrorLogger||Rn}(e);i(this._console,"ERROR",e),t&&i(this._console,"ORIGINAL ERROR",t),n&&i(this._console,"ERROR CONTEXT",n)}_findContext(e){return e?On(e)?On(e):this._findContext(Ln(e)):null}_findOriginalError(e){let t=Ln(e);for(;t&&Ln(t);)t=Ln(t);return t}}class An{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return"SafeValue must use [property]=binding: "+this.changingThisBreaksApplicationSecurity+" (see http://g.co/ng/security#xss)"}}class In extends An{getTypeName(){return"HTML"}}class Pn extends An{getTypeName(){return"Style"}}class Nn extends An{getTypeName(){return"Script"}}class jn extends An{getTypeName(){return"URL"}}class Fn extends An{getTypeName(){return"ResourceURL"}}function Yn(e){return e instanceof An?e.changingThisBreaksApplicationSecurity:e}function zn(e,t){const n=$n(e);if(null!=n&&n!==t){if("ResourceURL"===n&&"URL"===t)return!0;throw new Error(`Required a safe ${t}, got a ${n} (see http://g.co/ng/security#xss)`)}return n===t}function $n(e){return e instanceof An&&e.getTypeName()||null}function Hn(e){return new In(e)}function Wn(e){return new Pn(e)}function Vn(e){return new Nn(e)}function Bn(e){return new jn(e)}function Un(e){return new Fn(e)}let Gn=!0,qn=!1;function Jn(){return qn=!0,Gn}function Qn(){if(qn)throw new Error("Cannot enable prod mode after platform setup.");Gn=!1}function Kn(e){return function(){try{return!!(new window.DOMParser).parseFromString("","text/html")}catch(e){return!1}}()?new Zn:new Xn(e)}class Zn{getInertBodyElement(e){e="<body><remove></remove>"+e;try{const t=(new window.DOMParser).parseFromString(e,"text/html").body;return t.removeChild(t.firstChild),t}catch(t){return null}}}class Xn{constructor(e){if(this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const e=this.inertDocument.createElement("html");this.inertDocument.appendChild(e);const t=this.inertDocument.createElement("body");e.appendChild(t)}}getInertBodyElement(e){const t=this.inertDocument.createElement("template");if("content"in t)return t.innerHTML=e,t;const n=this.inertDocument.createElement("body");return n.innerHTML=e,this.defaultDoc.documentMode&&this.stripCustomNsAttrs(n),n}stripCustomNsAttrs(e){const t=e.attributes;for(let i=t.length-1;0<i;i--){const n=t.item(i).name;"xmlns:ns1"!==n&&0!==n.indexOf("ns1:")||e.removeAttribute(n)}let n=e.firstChild;for(;n;)n.nodeType===Node.ELEMENT_NODE&&this.stripCustomNsAttrs(n),n=n.nextSibling}}const ei=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^&:/?#]*(?:[/?#]|$))/gi,ti=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;function ni(e){return(e=String(e)).match(ei)||e.match(ti)?e:(Jn()&&console.warn(`WARNING: sanitizing unsafe URL value ${e} (see http://g.co/ng/security#xss)`),"unsafe:"+e)}function ii(e){return(e=String(e)).split(",").map(e=>ni(e.trim())).join(", ")}function ri(e){const t={};for(const n of e.split(","))t[n]=!0;return t}function si(...e){const t={};for(const n of e)for(const e in n)n.hasOwnProperty(e)&&(t[e]=!0);return t}const oi=ri("area,br,col,hr,img,wbr"),ai=ri("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),ci=ri("rp,rt"),li=si(ci,ai),ui=si(oi,si(ai,ri("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),si(ci,ri("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),li),di=ri("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),hi=ri("srcset"),fi=si(di,hi,ri("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),ri("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),pi=ri("script,style,template");class mi{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(e){let t=e.firstChild,n=!0;for(;t;)if(t.nodeType===Node.ELEMENT_NODE?n=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,n&&t.firstChild)t=t.firstChild;else for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let e=this.checkClobberedElement(t,t.nextSibling);if(e){t=e;break}t=this.checkClobberedElement(t,t.parentNode)}return this.buf.join("")}startElement(e){const t=e.nodeName.toLowerCase();if(!ui.hasOwnProperty(t))return this.sanitizedSomething=!0,!pi.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);const n=e.attributes;for(let i=0;i<n.length;i++){const e=n.item(i),t=e.name,r=t.toLowerCase();if(!fi.hasOwnProperty(r)){this.sanitizedSomething=!0;continue}let s=e.value;di[r]&&(s=ni(s)),hi[r]&&(s=ii(s)),this.buf.push(" ",t,'="',_i(s),'"')}return this.buf.push(">"),!0}endElement(e){const t=e.nodeName.toLowerCase();ui.hasOwnProperty(t)&&!oi.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))}chars(e){this.buf.push(_i(e))}checkClobberedElement(e,t){if(t&&(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: "+e.outerHTML);return t}}const bi=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,gi=/([^\#-~ |!])/g;function _i(e){return e.replace(/&/g,"&").replace(bi,(function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"})).replace(gi,(function(e){return"&#"+e.charCodeAt(0)+";"})).replace(/</g,"<").replace(/>/g,">")}let yi;function vi(e,t){let n=null;try{yi=yi||Kn(e);let i=t?String(t):"";n=yi.getInertBodyElement(i);let r=5,s=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=s,s=n.innerHTML,n=yi.getInertBodyElement(i)}while(i!==s);const o=new mi,a=o.sanitizeChildren(wi(n)||n);return Jn()&&o.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss"),a}finally{if(n){const e=wi(n)||n;for(;e.firstChild;)e.removeChild(e.firstChild)}}}function wi(e){return"content"in e&&function(e){return e.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===e.nodeName}(e)?e.content:null}var Si=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}({});function Mi(e){const t=Di();return t?t.sanitize(Si.HTML,e)||"":zn(e,"HTML")?Yn(e):vi(Ke(),sn(e))}function ki(e){const t=Di();return t?t.sanitize(Si.URL,e)||"":zn(e,"URL")?Yn(e):ni(sn(e))}function xi(e){const t=Di();if(t)return t.sanitize(Si.RESOURCE_URL,e)||"";if(zn(e,"ResourceURL"))return Yn(e);throw new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)")}function Di(){const e=pt();return e&&e[12]}function Ti(e,t){e.__ngContext__=t}function Ci(e,t,n){let i=e.length;for(;;){const r=e.indexOf(t,n);if(-1===r)return r;if(0===r||e.charCodeAt(r-1)<=32){const n=t.length;if(r+n===i||e.charCodeAt(r+n)<=32)return r}n=r+1}}const Oi="ng-template";function Li(e,t,n){let i=0;for(;i<e.length;){let r=e[i++];if(n&&"class"===r){if(r=e[i],-1!==Ci(r.toLowerCase(),t,0))return!0}else if(1===r){for(;i<e.length&&"string"==typeof(r=e[i++]);)if(r.toLowerCase()===t)return!0;return!1}}return!1}function Ri(e){return 0===e.type&&e.tagName!==Oi}function Ei(e,t,n){return t===(0!==e.type||n?e.tagName:Oi)}function Ai(e,t,n){let i=4;const r=e.attrs||[],s=function(e){for(let t=0;t<e.length;t++)if(Kt(e[t]))return t;return e.length}(r);let o=!1;for(let a=0;a<t.length;a++){const c=t[a];if("number"!=typeof c){if(!o)if(4&i){if(i=2|1&i,""!==c&&!Ei(e,c,n)||""===c&&1===t.length){if(Ii(i))return!1;o=!0}}else{const l=8&i?c:t[++a];if(8&i&&null!==e.attrs){if(!Li(e.attrs,l,n)){if(Ii(i))return!1;o=!0}continue}const u=Pi(8&i?"class":c,r,Ri(e),n);if(-1===u){if(Ii(i))return!1;o=!0;continue}if(""!==l){let e;e=u>s?"":r[u+1].toLowerCase();const t=8&i?e:null;if(t&&-1!==Ci(t,l,0)||2&i&&l!==e){if(Ii(i))return!1;o=!0}}}}else{if(!o&&!Ii(i)&&!Ii(c))return!1;if(o&&Ii(c))continue;o=!1,i=c|1&i}}return Ii(i)||o}function Ii(e){return 0==(1&e)}function Pi(e,t,n,i){if(null===t)return-1;let r=0;if(i||!n){let n=!1;for(;r<t.length;){const i=t[r];if(i===e)return r;if(3===i||6===i)n=!0;else{if(1===i||2===i){let e=t[++r];for(;"string"==typeof e;)e=t[++r];continue}if(4===i)break;if(0===i){r+=4;continue}}r+=n?1:2}return-1}return function(e,t){let n=e.indexOf(4);if(n>-1)for(n++;n<e.length;){const i=e[n];if("number"==typeof i)return-1;if(i===t)return n;n++}return-1}(t,e)}function Ni(e,t,n=!1){for(let i=0;i<t.length;i++)if(Ai(e,t[i],n))return!0;return!1}function ji(e,t){e:for(let n=0;n<t.length;n++){const i=t[n];if(e.length===i.length){for(let t=0;t<e.length;t++)if(e[t]!==i[t])continue e;return!0}}return!1}function Fi(e,t){return e?":not("+t.trim()+")":t}function Yi(e){let t=e[0],n=1,i=2,r="",s=!1;for(;n<e.length;){let o=e[n];if("string"==typeof o)if(2&i){const t=e[++n];r+="["+o+(t.length>0?'="'+t+'"':"")+"]"}else 8&i?r+="."+o:4&i&&(r+=" "+o);else""===r||Ii(o)||(t+=Fi(s,r),r=""),i=o,s=s||!Ii(i);n++}return""!==r&&(t+=Fi(s,r)),t}const zi={};function $i(e){const t=e[3];return je(t)?t[3]:t}function Hi(e){return Vi(e[13])}function Wi(e){return Vi(e[4])}function Vi(e){for(;null!==e&&!je(e);)e=e[4];return e}function Bi(e){Ui(mt(),pt(),Yt()+e,wt())}function Ui(e,t,n,i){if(!i)if(3==(3&t[2])){const i=e.preOrderCheckHooks;null!==i&&Wt(t,i,n)}else{const i=e.preOrderHooks;null!==i&&Vt(t,i,0,n)}zt(n)}function Gi(e,t){return e<<17|t<<2}function qi(e){return e>>17&32767}function Ji(e){return 2|e}function Qi(e){return(131068&e)>>2}function Ki(e,t){return-131069&e|t<<2}function Zi(e){return 1|e}function Xi(e,t){const n=e.contentQueries;if(null!==n)for(let i=0;i<n.length;i+=2){const r=n[i],s=n[i+1];if(-1!==s){const n=e.data[s];Rt(r),n.contentQueries(2,t[s],s)}}}function er(e,t,n){return Ze(t)?t.createElement(e,n):null===n?t.createElement(e):t.createElementNS(n,e)}function tr(e,t,n,i,r,s,o,a,c,l){const u=t.blueprint.slice();return u[0]=r,u[2]=140|i,ut(u),u[3]=u[15]=e,u[8]=n,u[10]=o||e&&e[10],u[11]=a||e&&e[11],u[12]=c||e&&e[12]||null,u[9]=l||e&&e[9]||null,u[6]=s,u[16]=2==t.type?e[16]:u,u}function nr(e,t,n,i,r){const s=t+Ie,o=e.data[s]||function(e,t,n,i,r){const s=gt(),o=yt(),a=e.data[t]=function(e,t,n,i,r,s){return{type:n,index:i,injectorIndex:t?t.injectorIndex:-1,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,propertyBindings:null,flags:0,providerIndexes:0,tagName:r,attrs:s,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tViews:null,next:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}(0,o?s:s&&s.parent,n,t,i,r);return null===e.firstChild&&(e.firstChild=a),null!==s&&(o&&null==s.child&&null!==a.parent?s.child=a:o||(s.next=a)),a}(e,s,n,i,r);return _t(o,!0),o}function ir(e,t,n){At(t);try{const i=e.viewQuery;null!==i&&Pr(1,i,n);const r=e.template;null!==r&&or(e,t,r,1,n),e.firstCreatePass&&(e.firstCreatePass=!1),e.staticContentQueries&&Xi(e,t),e.staticViewQueries&&Pr(2,e.viewQuery,n);const s=e.components;null!==s&&function(e,t){for(let n=0;n<t.length;n++)Lr(e,t[n])}(t,s)}catch(i){throw e.firstCreatePass&&(e.incompleteFirstPass=!0),i}finally{t[2]&=-5,Ft()}}function rr(e,t,n,i){const r=t[2];if(256==(256&r))return;At(t);const s=wt();try{ut(t),ht.lFrame.bindingIndex=e.bindingStartIndex,null!==n&&or(e,t,n,2,i);const o=3==(3&r);if(!s)if(o){const n=e.preOrderCheckHooks;null!==n&&Wt(t,n,null)}else{const n=e.preOrderHooks;null!==n&&Vt(t,n,0,null),Bt(t,0)}if(function(e){for(let t=Hi(e);null!==t;t=Wi(t)){if(!t[2])continue;const e=t[9];for(let t=0;t<e.length;t++){const n=e[t],i=n[3];0==(1024&n[2])&&dt(i,1),n[2]|=1024}}}(t),function(e){for(let t=Hi(e);null!==t;t=Wi(t))for(let e=Pe;e<t.length;e++){const n=t[e],i=n[1];ct(n)&&rr(i,n,i.template,n[8])}}(t),null!==e.contentQueries&&Xi(e,t),!s)if(o){const n=e.contentCheckHooks;null!==n&&Wt(t,n)}else{const n=e.contentHooks;null!==n&&Vt(t,n,1),Bt(t,1)}!function(e,t){try{const n=e.expandoInstructions;if(null!==n){let i=e.expandoStartIndex,r=-1,s=-1;for(let e=0;e<n.length;e++){const o=n[e];"number"==typeof o?o<=0?(s=0-o,zt(s),i+=9+n[++e],r=i):i+=o:(null!==o&&(Tt(i,r),o(2,t[r])),r++)}}}finally{zt(-1)}}(e,t);const a=e.components;null!==a&&function(e,t){for(let n=0;n<t.length;n++)Or(e,t[n])}(t,a);const c=e.viewQuery;if(null!==c&&Pr(2,c,i),!s)if(o){const n=e.viewCheckHooks;null!==n&&Wt(t,n)}else{const n=e.viewHooks;null!==n&&Vt(t,n,2),Bt(t,2)}!0===e.firstUpdatePass&&(e.firstUpdatePass=!1),s||(t[2]&=-73),1024&t[2]&&(t[2]&=-1025,dt(t[3],-1))}finally{Ft()}}function sr(e,t,n,i){const r=t[10],s=!wt(),o=at(t);try{s&&!o&&r.begin&&r.begin(),o&&ir(e,t,i),rr(e,t,n,i)}finally{s&&!o&&r.end&&r.end()}}function or(e,t,n,i,r){const s=Yt();try{zt(-1),2&i&&t.length>Ie&&Ui(e,t,0,wt()),n(i,r)}finally{zt(s)}}function ar(e,t,n){if(Fe(t)){const i=t.directiveEnd;for(let r=t.directiveStart;r<i;r++){const t=e.data[r];t.contentQueries&&t.contentQueries(1,n[r],r)}}}function cr(e,t,n){ft()&&(function(e,t,n,i){const r=n.directiveStart,s=n.directiveEnd;e.firstCreatePass||pn(n,t),Ti(i,t);const o=n.initialInputs;for(let a=r;a<s;a++){const i=e.data[a],s=$e(i);s&&kr(t,n,i);const c=Mn(t,e,a,n);Ti(c,t),null!==o&&Dr(0,a-r,c,i,0,o),s&&(st(n.index,t)[8]=c)}}(e,t,n,nt(n,t)),128==(128&n.flags)&&function(e,t,n){const i=n.directiveStart,r=n.directiveEnd,s=e.expandoInstructions,o=e.firstCreatePass,a=n.index-Ie,c=ht.lFrame.currentDirectiveIndex;try{zt(a);for(let n=i;n<r;n++){const i=e.data[n],r=t[n];Ct(n),null!==i.hostBindings||0!==i.hostVars||null!==i.hostAttrs?_r(i,r):o&&s.push(null)}}finally{zt(-1),Ct(c)}}(e,t,n))}function lr(e,t,n=nt){const i=t.localNames;if(null!==i){let r=t.index+1;for(let s=0;s<i.length;s+=2){const o=i[s+1],a=-1===o?n(t,e):e[o];e[r++]=a}}}function ur(e){const t=e.tView;return null===t||t.incompleteFirstPass?e.tView=dr(1,null,e.template,e.decls,e.vars,e.directiveDefs,e.pipeDefs,e.viewQuery,e.schemas,e.consts):t}function dr(e,t,n,i,r,s,o,a,c,l){const u=Ie+i,d=u+r,h=function(e,t){const n=[];for(let i=0;i<t;i++)n.push(i<e?null:zi);return n}(u,d),f="function"==typeof l?l():l;return h[1]={type:e,blueprint:h,template:n,queries:null,viewQuery:a,declTNode:t,data:h.slice().fill(null,u),bindingStartIndex:u,expandoStartIndex:d,expandoInstructions:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof s?s():s,pipeRegistry:"function"==typeof o?o():o,firstChild:null,schemas:c,consts:f,incompleteFirstPass:!1}}function hr(e,t,n,i){const r=jr(t);r.push(n),e.firstCreatePass&&function(e){return e.cleanup||(e.cleanup=[])}(e).push(i,r.length-1)}function fr(e,t,n){for(let i in e)if(e.hasOwnProperty(i)){const r=e[i];(n=null===n?{}:n).hasOwnProperty(i)?n[i].push(t,r):n[i]=[t,r]}return n}function pr(e,t,n,i,r,s,o,a){const c=nt(t,n);let l,u=t.inputs;var d;!a&&null!=u&&(l=u[i])?(Yr(e,n,l,i,r),Ye(t)&&function(e,t){const n=st(t,e);16&n[2]||(n[2]|=64)}(n,t.index)):2===t.type&&(i="class"===(d=i)?"className":"for"===d?"htmlFor":"formaction"===d?"formAction":"innerHtml"===d?"innerHTML":"readonly"===d?"readOnly":"tabindex"===d?"tabIndex":d,r=null!=o?o(r,t.tagName||"",i):r,Ze(s)?s.setProperty(c,i,r):Zt(i)||(c.setProperty?c.setProperty(i,r):c[i]=r))}function mr(e,t,n,i){let r=!1;if(ft()){const s=function(e,t,n){const i=e.directiveRegistry;let r=null;if(i)for(let s=0;s<i.length;s++){const o=i[s];Ni(n,o.selectors,!1)&&(r||(r=[]),_n(pn(n,t),e,o.type),$e(o)?(vr(e,n),r.unshift(o)):r.push(o))}return r}(e,t,n),o=null===i?null:{"":-1};if(null!==s){let i=0;r=!0,Sr(n,e.data.length,s.length);for(let e=0;e<s.length;e++){const t=s[e];t.providersResolver&&t.providersResolver(t)}yr(e,n,s.length);let a=!1,c=!1;for(let r=0;r<s.length;r++){const l=s[r];n.mergedAttrs=Xt(n.mergedAttrs,l.hostAttrs),Mr(e,t,l),wr(e.data.length-1,l,o),null!==l.contentQueries&&(n.flags|=8),null===l.hostBindings&&null===l.hostAttrs&&0===l.hostVars||(n.flags|=128);const u=l.type.prototype;!a&&(u.ngOnChanges||u.ngOnInit||u.ngDoCheck)&&((e.preOrderHooks||(e.preOrderHooks=[])).push(n.index-Ie),a=!0),c||!u.ngOnChanges&&!u.ngDoCheck||((e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(n.index-Ie),c=!0),br(e,l),i+=l.hostVars}!function(e,t){const n=t.directiveEnd,i=e.data,r=t.attrs,s=[];let o=null,a=null;for(let c=t.directiveStart;c<n;c++){const e=i[c],n=e.inputs,l=null===r||Ri(t)?null:Tr(n,r);s.push(l),o=fr(n,c,o),a=fr(e.outputs,c,a)}null!==o&&(o.hasOwnProperty("class")&&(t.flags|=16),o.hasOwnProperty("style")&&(t.flags|=32)),t.initialInputs=s,t.inputs=o,t.outputs=a}(e,n),gr(e,t,i)}o&&function(e,t,n){if(t){const i=e.localNames=[];for(let e=0;e<t.length;e+=2){const r=n[t[e+1]];if(null==r)throw new Error(`Export of name '${t[e+1]}' not found!`);i.push(t[e],r)}}}(n,i,o)}return n.mergedAttrs=Xt(n.mergedAttrs,n.attrs),r}function br(e,t){const n=e.expandoInstructions;n.push(t.hostBindings),0!==t.hostVars&&n.push(t.hostVars)}function gr(e,t,n){for(let i=0;i<n;i++)t.push(zi),e.blueprint.push(zi),e.data.push(null)}function _r(e,t){null!==e.hostBindings&&e.hostBindings(1,t)}function yr(e,t,n){const i=Ie-t.index,r=e.data.length-(1048575&t.providerIndexes);(e.expandoInstructions||(e.expandoInstructions=[])).push(i,r,n)}function vr(e,t){t.flags|=2,(e.components||(e.components=[])).push(t.index)}function wr(e,t,n){if(n){if(t.exportAs)for(let i=0;i<t.exportAs.length;i++)n[t.exportAs[i]]=e;$e(t)&&(n[""]=e)}}function Sr(e,t,n){e.flags|=1,e.directiveStart=t,e.directiveEnd=t+n,e.providerIndexes=t}function Mr(e,t,n){e.data.push(n);const i=n.factory||(n.factory=Ee(n.type)),r=new Jt(i,$e(n),null);e.blueprint.push(r),t.push(r)}function kr(e,t,n){const i=nt(t,e),r=ur(n),s=e[10],o=Rr(e,tr(e,r,null,n.onPush?64:16,i,t,s,s.createRenderer(i,n),null,null));e[t.index]=o}function xr(e,t,n,i,r,s){const o=nt(e,t),a=t[11];if(null==i)Ze(a)?a.removeAttribute(o,n,s):o.removeAttribute(n);else{const t=null==r?sn(i):r(i,e.tagName||"",n);Ze(a)?a.setAttribute(o,n,t,s):s?o.setAttributeNS(s,n,t):o.setAttribute(n,t)}}function Dr(e,t,n,i,r,s){const o=s[t];if(null!==o){const e=i.setInput;for(let t=0;t<o.length;){const r=o[t++],s=o[t++],a=o[t++];null!==e?i.setInput(n,a,r,s):n[s]=a}}}function Tr(e,t){let n=null,i=0;for(;i<t.length;){const r=t[i];if(0!==r)if(5!==r){if("number"==typeof r)break;e.hasOwnProperty(r)&&(null===n&&(n=[]),n.push(r,e[r],t[i+1])),i+=2}else i+=2;else i+=4}return n}function Cr(e,t,n,i){return new Array(e,!0,!1,t,null,0,i,n,null,null)}function Or(e,t){const n=st(t,e);if(ct(n)){const e=n[1];80&n[2]?rr(e,n,e.template,n[8]):n[5]>0&&function e(t){for(let i=Hi(t);null!==i;i=Wi(i))for(let t=Pe;t<i.length;t++){const n=i[t];if(1024&n[2]){const e=n[1];rr(e,n,e.template,n[8])}else n[5]>0&&e(n)}const n=t[1].components;if(null!==n)for(let i=0;i<n.length;i++){const r=st(n[i],t);ct(r)&&r[5]>0&&e(r)}}(n)}}function Lr(e,t){const n=st(t,e),i=n[1];!function(e,t){for(let n=t.length;n<e.blueprint.length;n++)t.push(e.blueprint[n])}(i,n),ir(i,n,n[8])}function Rr(e,t){return e[13]?e[14][4]=t:e[13]=t,e[14]=t,t}function Er(e){for(;e;){e[2]|=64;const t=$i(e);if(He(e)&&!t)return e;e=t}return null}function Ar(e,t,n){const i=t[10];i.begin&&i.begin();try{rr(e,t,e.template,n)}catch(r){throw Fr(t,r),r}finally{i.end&&i.end()}}function Ir(e){!function(e){for(let t=0;t<e.components.length;t++){const n=e.components[t],i=ot(n),r=i[1];sr(r,i,r.template,n)}}(e[8])}function Pr(e,t,n){Rt(0),t(e,n)}const Nr=(()=>Promise.resolve(null))();function jr(e){return e[7]||(e[7]=[])}function Fr(e,t){const n=e[9],i=n?n.get(En,null):null;i&&i.handleError(t)}function Yr(e,t,n,i,r){for(let s=0;s<n.length;){const o=n[s++],a=n[s++],c=t[o],l=e.data[o];null!==l.setInput?l.setInput(c,r,i,a):c[a]=r}}function zr(e,t,n){const i=tt(t,e),r=e[11];Ze(r)?r.setValue(i,n):i.textContent=n}function $r(e,t,n,i,r){if(null!=i){let s,o=!1;je(i)?s=i:Ne(i)&&(o=!0,i=i[0]);const a=et(i);0===e&&null!==n?null==r?Jr(t,n,a):qr(t,n,a,r||null):1===e&&null!==n?qr(t,n,a,r||null):2===e?es(t,a,o):3===e&&t.destroyNode(a),null!=s&&function(e,t,n,i,r){const s=n[7];s!==et(n)&&$r(t,e,i,s,r);for(let o=Pe;o<n.length;o++){const r=n[o];ns(r[1],r,e,t,i,s)}}(t,e,s,n,r)}}function Hr(e,t){return Ze(t)?t.createText(e):t.createTextNode(e)}function Wr(e,t){const n=e[9],i=n.indexOf(t),r=t[3];1024&t[2]&&(t[2]&=-1025,dt(r,-1)),n.splice(i,1)}function Vr(e,t){if(e.length<=Pe)return;const n=Pe+t,i=e[n];if(i){const s=i[17];null!==s&&s!==e&&Wr(s,i),t>0&&(e[n-1][4]=i[4]);const o=he(e,Pe+t);ns(i[1],r=i,r[11],2,null,null),r[0]=null,r[6]=null;const a=o[19];null!==a&&a.detachView(o[1]),i[3]=null,i[4]=null,i[2]&=-129}var r;return i}function Br(e,t){if(!(256&t[2])){const n=t[11];Ze(n)&&n.destroyNode&&ns(e,t,n,3,null,null),function(e){let t=e[13];if(!t)return Ur(e[1],e);for(;t;){let n=null;if(Ne(t))n=t[13];else{const e=t[10];e&&(n=e)}if(!n){for(;t&&!t[4]&&t!==e;)Ne(t)&&Ur(t[1],t),t=t[3];null===t&&(t=e),Ne(t)&&Ur(t[1],t),n=t&&t[4]}t=n}}(t)}}function Ur(e,t){if(!(256&t[2])){t[2]&=-129,t[2]|=256,function(e,t){let n;if(null!=e&&null!=(n=e.destroyHooks))for(let i=0;i<n.length;i+=2){const e=t[n[i]];if(!(e instanceof Jt)){const t=n[i+1];if(Array.isArray(t))for(let n=0;n<t.length;n+=2)t[n+1].call(e[t[n]]);else t.call(e)}}}(e,t),function(e,t){const n=e.cleanup;if(null!==n){const e=t[7];for(let i=0;i<n.length-1;i+=2)if("string"==typeof n[i]){const r=n[i+1],s="function"==typeof r?r(t):et(t[r]),o=e[n[i+2]],a=n[i+3];"boolean"==typeof a?s.removeEventListener(n[i],o,a):a>=0?e[a]():e[-a].unsubscribe(),i+=2}else n[i].call(e[n[i+1]]);t[7]=null}}(e,t),1===t[1].type&&Ze(t[11])&&t[11].destroy();const n=t[17];if(null!==n&&je(t[3])){n!==t[3]&&Wr(n,t);const i=t[19];null!==i&&i.detachView(e)}}}function Gr(e,t,n){let i=t.parent;for(;null!=i&&(3===i.type||4===i.type);)i=(t=i).parent;if(null===i)return n[0];if(t&&4===t.type&&4&t.flags)return nt(t,n).parentNode;if(2&i.flags){const t=e.data,n=t[t[i.index].directiveStart].encapsulation;if(n!==_e.ShadowDom&&n!==_e.Native)return null}return nt(i,n)}function qr(e,t,n,i){Ze(e)?e.insertBefore(t,n,i):t.insertBefore(n,i,!0)}function Jr(e,t,n){Ze(e)?e.appendChild(t,n):t.appendChild(n)}function Qr(e,t,n,i){null!==i?qr(e,t,n,i):Jr(e,t,n)}function Kr(e,t){return Ze(e)?e.parentNode(t):t.parentNode}function Zr(e,t){return 3===e.type||4===e.type?nt(e,t):null}function Xr(e,t,n,i){const r=Gr(e,i,t);if(null!=r){const e=t[11],s=Zr(i.parent||t[6],t);if(Array.isArray(n))for(let t=0;t<n.length;t++)Qr(e,r,n[t],s);else Qr(e,r,n,s)}}function es(e,t,n){const i=Kr(e,t);i&&function(e,t,n,i){Ze(e)?e.removeChild(t,n,i):t.removeChild(n)}(e,i,t,n)}function ts(e,t,n,i,r,s,o){for(;null!=n;){const a=i[n.index],c=n.type;o&&0===t&&(a&&Ti(et(a),i),n.flags|=4),64!=(64&n.flags)&&(3===c||4===c?(ts(e,t,n.child,i,r,s,!1),$r(t,e,r,a,s)):1===c?rs(e,t,i,n,r,s):$r(t,e,r,a,s)),n=o?n.projectionNext:n.next}}function ns(e,t,n,i,r,s){ts(n,i,e.firstChild,t,r,s,!1)}function is(e,t,n){rs(t[11],0,t,n,Gr(e,n,t),Zr(n.parent||t[6],t))}function rs(e,t,n,i,r,s){const o=n[16],a=o[6].projection[i.projection];if(Array.isArray(a))for(let c=0;c<a.length;c++)$r(t,e,r,a[c],s);else ts(e,t,a,o[3],r,s,!0)}function ss(e,t,n){Ze(e)?e.setAttribute(t,"style",n):t.style.cssText=n}function os(e,t,n){Ze(e)?""===n?e.removeAttribute(t,"class"):e.setAttribute(t,"class",n):t.className=n}class as{constructor(e,t){this._lView=e,this._cdRefInjectingView=t,this._appRef=null,this._viewContainerRef=null}get rootNodes(){const e=this._lView,t=e[1];return function e(t,n,i,r,s=!1){for(;null!==i;){const o=n[i.index];if(null!==o&&r.push(et(o)),je(o))for(let t=Pe;t<o.length;t++){const n=o[t],i=n[1].firstChild;null!==i&&e(n[1],n,i,r)}const a=i.type;if(3===a||4===a)e(t,n,i.child,r);else if(1===a){const t=n[16],s=t[6].projection[i.projection];if(Array.isArray(s))r.push(...s);else{const n=$i(t);e(n[1],n,s,r,!0)}}i=s?i.projectionNext:i.next}return r}(t,e,t.firstChild,[])}get context(){return this._lView[8]}get destroyed(){return 256==(256&this._lView[2])}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._viewContainerRef){const e=this._viewContainerRef.indexOf(this);e>-1&&this._viewContainerRef.detach(e),this._viewContainerRef=null}Br(this._lView[1],this._lView)}onDestroy(e){hr(this._lView[1],this._lView,null,e)}markForCheck(){Er(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){Ar(this._lView[1],this._lView,this.context)}checkNoChanges(){!function(e,t,n){St(!0);try{Ar(e,t,n)}finally{St(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(e){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=e}detachFromAppRef(){var e;this._appRef=null,ns(this._lView[1],e=this._lView,e[11],2,null,null)}attachToAppRef(e){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=e}}class cs extends as{constructor(e){super(e),this._view=e}detectChanges(){Ir(this._view)}checkNoChanges(){!function(e){St(!0);try{Ir(e)}finally{St(!1)}}(this._view)}get context(){return null}}let ls,us,ds;function hs(e,t,n){return ls||(ls=class extends e{}),new ls(nt(t,n))}function fs(e,t,n,i){return us||(us=class extends e{constructor(e,t,n){super(),this._declarationView=e,this._declarationTContainer=t,this.elementRef=n}createEmbeddedView(e){const t=this._declarationTContainer.tViews,n=tr(this._declarationView,t,e,16,null,t.declTNode,null,null,null,null);n[17]=this._declarationView[this._declarationTContainer.index];const i=this._declarationView[19];return null!==i&&(n[19]=i.createEmbeddedView(t)),ir(t,n,e),new as(n)}}),0===n.type?new us(i,n,hs(t,n,i)):null}function ps(e,t,n,i){let r;ds||(ds=class extends e{constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostView=n}get element(){return hs(t,this._hostTNode,this._hostView)}get injector(){return new Dn(this._hostTNode,this._hostView)}get parentInjector(){const e=gn(this._hostTNode,this._hostView);if(tn(e)){const t=rn(e,this._hostView),n=nn(e);return new Dn(t[1].data[n+8],t)}return new Dn(null,this._hostView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){return null!==this._lContainer[8]&&this._lContainer[8][e]||null}get length(){return this._lContainer.length-Pe}createEmbeddedView(e,t,n){const i=e.createEmbeddedView(t||{});return this.insert(i,n),i}createComponent(e,t,n,i,r){const s=n||this.parentInjector;if(!r&&null==e.ngModule&&s){const e=s.get(ae,null);e&&(r=e)}const o=e.create(s,i,void 0,r);return this.insert(o.hostView,t),o}insert(e,t){const n=e._lView,i=n[1];if(e.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");if(this.allocateContainerIfNeeded(),je(n[3])){const t=this.indexOf(e);if(-1!==t)this.detach(t);else{const t=n[3],i=new ds(t,t[6],t[3]);i.detach(i.indexOf(e))}}const r=this._adjustIndex(t),s=this._lContainer;!function(e,t,n,i){const r=Pe+i,s=n.length;i>0&&(n[r-1][4]=t),i<s-Pe?(t[4]=n[r],de(n,Pe+i,t)):(n.push(t),t[4]=null),t[3]=n;const o=t[17];null!==o&&n!==o&&function(e,t){const n=e[9];t[16]!==t[3][3][16]&&(e[2]=!0),null===n?e[9]=[t]:n.push(t)}(o,t);const a=t[19];null!==a&&a.insertView(e),t[2]|=128}(i,n,s,r);const o=function e(t,n){const i=Pe+t+1;if(i<n.length){const t=n[i],r=t[1].firstChild;if(null!==r)return function t(n,i){if(null!==i){const r=i.type;if(2===r)return nt(i,n);if(0===r)return e(-1,n[i.index]);if(3===r||4===r){const r=i.child;if(null!==r)return t(n,r);{const t=n[i.index];return je(t)?e(-1,t):et(t)}}{const e=n[16],r=e[6],s=$i(e),o=r.projection[i.projection];return null!=o?t(s,o):t(n,i.next)}}return null}(t,r)}return n[7]}(r,s),a=n[11],c=Kr(a,s[7]);return null!==c&&function(e,t,n,i,r,s){i[0]=r,i[6]=t,ns(e,i,n,1,r,s)}(i,s[6],a,n,c,o),e.attachToViewContainerRef(this),de(s[8],r,e),e}move(e,t){if(e.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");return this.insert(e,t)}indexOf(e){const t=this._lContainer[8];return null!==t?t.indexOf(e):-1}remove(e){this.allocateContainerIfNeeded();const t=this._adjustIndex(e,-1),n=Vr(this._lContainer,t);n&&(he(this._lContainer[8],t),Br(n[1],n))}detach(e){this.allocateContainerIfNeeded();const t=this._adjustIndex(e,-1),n=Vr(this._lContainer,t);return n&&null!=he(this._lContainer[8],t)?new as(n):null}_adjustIndex(e,t=0){return null==e?this.length+t:e}allocateContainerIfNeeded(){null===this._lContainer[8]&&(this._lContainer[8]=[])}});const s=i[n.index];if(je(s))r=s;else{let e;if(3===n.type)e=et(s);else if(e=i[11].createComment(""),He(i)){const t=i[11],r=nt(n,i);qr(t,Kr(t,r),e,function(e,t){return Ze(e)?e.nextSibling(t):t.nextSibling}(t,r))}else Xr(i[1],i,e,n);i[n.index]=r=Cr(s,i,e,n),Rr(i,r)}return new ds(r,n,i)}function ms(e=!1){return function(e,t,n){if(!n&&Ye(e)){const n=st(e.index,t);return new as(n,n)}return 2===e.type||0===e.type||3===e.type||4===e.type?new as(t[16],t):null}(gt(),pt(),e)}let bs=(()=>{class e{}return e.__NG_ELEMENT_ID__=()=>gs(),e})();const gs=ms,_s=Function,ys=new U("Set Injector scope."),vs={},ws={},Ss=[];let Ms=void 0;function ks(){return void 0===Ms&&(Ms=new oe),Ms}function xs(e,t=null,n=null,i){return new Ds(e,n,t||ks(),i)}class Ds{constructor(e,t,n,i=null){this.parent=n,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;const r=[];t&&ue(t,n=>this.processProvider(n,e,t)),ue([e],e=>this.processInjectorType(e,[],r)),this.records.set(G,Os(void 0,this));const s=this.records.get(ys);this.scope=null!=s?s.value:null,this.source=i||("object"==typeof e?null:C(e))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(e=>e.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(e,t=q,n=m.Default){this.assertNotDestroyed();const i=ee(this);try{if(!(n&m.SkipSelf)){let t=this.records.get(e);if(void 0===t){const n=("function"==typeof(r=e)||"object"==typeof r&&r instanceof U)&&v(e);t=n&&this.injectableDefInScope(n)?Os(Ts(e),vs):null,this.records.set(e,t)}if(null!=t)return this.hydrate(e,t)}return(n&m.Self?ks():this.parent).get(e,t=n&m.Optional&&t===q?null:t)}catch(s){if("NullInjectorError"===s.name){if((s.ngTempTokenPath=s.ngTempTokenPath||[]).unshift(C(e)),i)throw s;return function(e,t,n,i){const r=e.ngTempTokenPath;throw t[Q]&&r.unshift(t[Q]),e.message=function(e,t,n,i=null){e=e&&"\n"===e.charAt(0)&&"\u0275"==e.charAt(1)?e.substr(2):e;let r=C(t);if(Array.isArray(t))r=t.map(C).join(" -> ");else if("object"==typeof t){let e=[];for(let n in t)if(t.hasOwnProperty(n)){let i=t[n];e.push(n+":"+("string"==typeof i?JSON.stringify(i):C(i)))}r=`{${e.join(", ")}}`}return`${n}${i?"("+i+")":""}[${r}]: ${e.replace(J,"\n ")}`}("\n"+e.message,r,n,i),e.ngTokenPath=r,e.ngTempTokenPath=null,e}(s,e,"R3InjectorError",this.source)}throw s}finally{ee(i)}var r}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(e=>this.get(e))}toString(){const e=[];return this.records.forEach((t,n)=>e.push(C(n))),`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}processInjectorType(e,t,n){if(!(e=E(e)))return!1;let i=S(e);const r=null==i&&e.ngModule||void 0,s=void 0===r?e:r,o=-1!==n.indexOf(s);if(void 0!==r&&(i=S(r)),null==i)return!1;if(null!=i.imports&&!o){let e;n.push(s);try{ue(i.imports,i=>{this.processInjectorType(i,t,n)&&(void 0===e&&(e=[]),e.push(i))})}finally{}if(void 0!==e)for(let t=0;t<e.length;t++){const{ngModule:n,providers:i}=e[t];ue(i,e=>this.processProvider(e,n,i||Ss))}}this.injectorDefTypes.add(s),this.records.set(s,Os(i.factory,vs));const a=i.providers;if(null!=a&&!o){const t=e;ue(a,e=>this.processProvider(e,t,a))}return void 0!==r&&void 0!==e.providers}processProvider(e,t,n){let i=Rs(e=E(e))?e:E(e&&e.provide);const r=function(e,t,n){return Ls(e)?Os(void 0,e.useValue):Os(Cs(e),vs)}(e);if(Rs(e)||!0!==e.multi)this.records.get(i);else{let t=this.records.get(i);t||(t=Os(void 0,vs,!0),t.factory=()=>se(t.multi),this.records.set(i,t)),i=e,t.multi.push(e)}this.records.set(i,r)}hydrate(e,t){var n;return t.value===vs&&(t.value=ws,t.value=t.factory()),"object"==typeof t.value&&t.value&&null!==(n=t.value)&&"object"==typeof n&&"function"==typeof n.ngOnDestroy&&this.onDestroy.add(t.value),t.value}injectableDefInScope(e){return!!e.providedIn&&("string"==typeof e.providedIn?"any"===e.providedIn||e.providedIn===this.scope:this.injectorDefTypes.has(e.providedIn))}}function Ts(e){const t=v(e),n=null!==t?t.factory:Ee(e);if(null!==n)return n;const i=S(e);if(null!==i)return i.factory;if(e instanceof U)throw new Error(`Token ${C(e)} is missing a \u0275prov definition.`);if(e instanceof Function)return function(e){const t=e.length;if(t>0){const n=fe(t,"?");throw new Error(`Can't resolve all parameters for ${C(e)}: (${n.join(", ")}).`)}const n=function(e){const t=e&&(e[M]||e[D]||e[x]&&e[x]());if(t){const n=function(e){if(e.hasOwnProperty("name"))return e.name;const t=(""+e).match(/^function\s*([^\s(]+)/);return null===t?"":t[1]}(e);return console.warn(`DEPRECATED: DI is instantiating a token "${n}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${n}" class.`),t}return null}(e);return null!==n?()=>n.factory(e):()=>new e}(e);throw new Error("unreachable")}function Cs(e,t,n){let i=void 0;if(Rs(e)){const t=E(e);return Ee(t)||Ts(t)}if(Ls(e))i=()=>E(e.useValue);else if((r=e)&&r.useFactory)i=()=>e.useFactory(...se(e.deps||[]));else if(function(e){return!(!e||!e.useExisting)}(e))i=()=>ie(E(e.useExisting));else{const t=E(e&&(e.useClass||e.provide));if(!function(e){return!!e.deps}(e))return Ee(t)||Ts(t);i=()=>new t(...se(e.deps))}var r;return i}function Os(e,t,n=!1){return{factory:e,value:t,multi:n?[]:void 0}}function Ls(e){return null!==e&&"object"==typeof e&&K in e}function Rs(e){return"function"==typeof e}const Es=function(e,t,n){return function(e,t=null,n=null,i){const r=xs(e,t,n,i);return r._resolveInjectorDefTypes(),r}({name:n},t,e,n)};let As=(()=>{class e{static create(e,t){return Array.isArray(e)?Es(e,t,""):Es(e.providers,e.parent,e.name||"")}}return e.THROW_IF_NOT_FOUND=q,e.NULL=new oe,e.\u0275prov=_({token:e,providedIn:"any",factory:()=>ie(G)}),e.__NG_ELEMENT_ID__=-1,e})();const Is=new U("AnalyzeForEntryComponents");function Ps(e,t,n){let i=n?e.styles:null,r=n?e.classes:null,s=0;if(null!==t)for(let o=0;o<t.length;o++){const e=t[o];"number"==typeof e?s=e:1==s?r=O(r,e):2==s&&(i=O(i,e+": "+t[++o]+";"))}n?e.styles=i:e.stylesWithoutHost=i,n?e.classes=r:e.classesWithoutHost=r}function Ns(e,t){const n=ot(e)[1],i=n.data.length-1;Ht(n,{directiveStart:i,directiveEnd:i+1})}function js(e){let t=Object.getPrototypeOf(e.type.prototype).constructor,n=!0;const i=[e];for(;t;){let r=void 0;if($e(e))r=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new Error("Directives cannot inherit Components");r=t.\u0275dir}if(r){if(n){i.push(r);const t=e;t.inputs=Fs(e.inputs),t.declaredInputs=Fs(e.declaredInputs),t.outputs=Fs(e.outputs);const n=r.hostBindings;n&&$s(e,n);const s=r.viewQuery,o=r.contentQueries;if(s&&Ys(e,s),o&&zs(e,o),g(e.inputs,r.inputs),g(e.declaredInputs,r.declaredInputs),g(e.outputs,r.outputs),$e(r)&&r.data.animation){const t=e.data;t.animation=(t.animation||[]).concat(r.data.animation)}}const t=r.features;if(t)for(let i=0;i<t.length;i++){const r=t[i];r&&r.ngInherit&&r(e),r===js&&(n=!1)}}t=Object.getPrototypeOf(t)}!function(e){let t=0,n=null;for(let i=e.length-1;i>=0;i--){const r=e[i];r.hostVars=t+=r.hostVars,r.hostAttrs=Xt(r.hostAttrs,n=Xt(n,r.hostAttrs))}}(i)}function Fs(e){return e===ye?{}:e===ve?[]:e}function Ys(e,t){const n=e.viewQuery;e.viewQuery=n?(e,i)=>{t(e,i),n(e,i)}:t}function zs(e,t){const n=e.contentQueries;e.contentQueries=n?(e,i,r)=>{t(e,i,r),n(e,i,r)}:t}function $s(e,t){const n=e.hostBindings;e.hostBindings=n?(e,i)=>{t(e,i),n(e,i)}:t}let Hs=null;function Ws(){if(!Hs){const e=F.Symbol;if(e&&e.iterator)Hs=e.iterator;else{const e=Object.getOwnPropertyNames(Map.prototype);for(let t=0;t<e.length;++t){const n=e[t];"entries"!==n&&"size"!==n&&Map.prototype[n]===Map.prototype.entries&&(Hs=n)}}}return Hs}class Vs{constructor(e){this.wrapped=e}static wrap(e){return new Vs(e)}static unwrap(e){return Vs.isWrapped(e)?e.wrapped:e}static isWrapped(e){return e instanceof Vs}}function Bs(e){return!!Us(e)&&(Array.isArray(e)||!(e instanceof Map)&&Ws()in e)}function Us(e){return null!==e&&("function"==typeof e||"object"==typeof e)}function Gs(e,t,n){return e[t]=n}function qs(e,t){return e[t]}function Js(e,t,n){return!Object.is(e[t],n)&&(e[t]=n,!0)}function Qs(e,t,n,i){const r=Js(e,t,n);return Js(e,t+1,i)||r}function Ks(e,t,n,i,r){const s=Qs(e,t,n,i);return Js(e,t+2,r)||s}function Zs(e,t,n,i,r,s){const o=Qs(e,t,n,i);return Qs(e,t+2,r,s)||o}function Xs(e,t,n,i){const r=pt();return Js(r,xt(),t)&&(mt(),xr($t(),r,e,t,n,i)),Xs}function eo(e,t,n,i){return Js(e,xt(),n)?t+sn(n)+i:zi}function to(e,t,n,i,r,s){const o=Qs(e,kt(),n,r);return Dt(2),o?t+sn(n)+i+sn(r)+s:zi}function no(e,t,n,i,r,s,o,a){const c=pt(),l=mt(),u=e+Ie,d=l.firstCreatePass?function(e,t,n,i,r,s,o,a,c){const l=t.consts,u=nr(t,e,0,o||null,lt(l,a));mr(t,n,u,lt(l,c)),Ht(t,u);const d=u.tViews=dr(2,u,i,r,s,t.directiveRegistry,t.pipeRegistry,null,t.schemas,l);return null!==t.queries&&(t.queries.template(t,u),d.queries=t.queries.embeddedTView(u)),u}(e,l,c,t,n,i,r,s,o):l.data[u];_t(d,!1);const h=c[11].createComment("");Xr(l,c,h,d),Ti(h,c),Rr(c,c[u]=Cr(h,c,h,d)),ze(d)&&cr(l,c,d),null!=o&&lr(c,d,a)}function io(e){return rt(ht.lFrame.contextLView,e)}function ro(e,t=m.Default){const n=pt();return null===n?ie(e,t):yn(gt(),n,E(e),t)}function so(e){return function(e,t){if("class"===t)return e.classes;if("style"===t)return e.styles;const n=e.attrs;if(n){const e=n.length;let i=0;for(;i<e;){const r=n[i];if(Kt(r))break;if(0===r)i+=2;else if("number"==typeof r)for(i++;i<e&&"string"==typeof n[i];)i++;else{if(r===t)return n[i+1];i+=2}}}return null}(gt(),e)}function oo(e,t,n){const i=pt();return Js(i,xt(),t)&&pr(mt(),$t(),i,e,t,i[11],n,!1),oo}function ao(e,t,n,i,r){const s=r?"class":"style";Yr(e,n,t.inputs[s],s,i)}function co(e,t,n,i){const r=pt(),s=mt(),o=Ie+e,a=r[11],c=r[o]=er(t,a,ht.lFrame.currentNamespace),l=s.firstCreatePass?function(e,t,n,i,r,s,o){const a=t.consts,c=nr(t,e,2,r,lt(a,s));return mr(t,n,c,lt(a,o)),null!==c.attrs&&Ps(c,c.attrs,!1),null!==c.mergedAttrs&&Ps(c,c.mergedAttrs,!0),null!==t.queries&&t.queries.elementStart(t,c),c}(e,s,r,0,t,n,i):s.data[o];_t(l,!0);const u=l.mergedAttrs;null!==u&&Qt(a,c,u);const d=l.classes;null!==d&&os(a,c,d);const h=l.styles;null!==h&&ss(a,c,h),Xr(s,r,c,l),0===ht.lFrame.elementDepthCount&&Ti(c,r),ht.lFrame.elementDepthCount++,ze(l)&&(cr(s,r,l),ar(s,l,r)),null!==i&&lr(r,l)}function lo(){let e=gt();yt()?vt():(e=e.parent,_t(e,!1));const t=e;ht.lFrame.elementDepthCount--;const n=mt();n.firstCreatePass&&(Ht(n,e),Fe(e)&&n.queries.elementEnd(e)),null!=t.classesWithoutHost&&function(e){return 0!=(16&e.flags)}(t)&&ao(n,t,pt(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function(e){return 0!=(32&e.flags)}(t)&&ao(n,t,pt(),t.stylesWithoutHost,!1)}function uo(e,t,n,i){co(e,t,n,i),lo()}function ho(e,t,n){const i=pt(),r=mt(),s=e+Ie,o=r.firstCreatePass?function(e,t,n,i,r){const s=t.consts,o=lt(s,i),a=nr(t,e,3,"ng-container",o);return null!==o&&Ps(a,o,!0),mr(t,n,a,lt(s,r)),null!==t.queries&&t.queries.elementStart(t,a),a}(e,r,i,t,n):r.data[s];_t(o,!0);const a=i[s]=i[11].createComment("");Xr(r,i,a,o),Ti(a,i),ze(o)&&(cr(r,i,o),ar(r,o,i)),null!=n&&lr(i,o)}function fo(){let e=gt();const t=mt();yt()?vt():(e=e.parent,_t(e,!1)),t.firstCreatePass&&(Ht(t,e),Fe(e)&&t.queries.elementEnd(e))}function po(e,t,n){ho(e,t,n),fo()}function mo(){return pt()}function bo(e){return!!e&&"function"==typeof e.then}function go(e){return!!e&&"function"==typeof e.subscribe}function _o(e,t,n=!1,i){const r=pt(),s=mt(),o=gt();return function(e,t,n,i,r,s,o=!1,a){const c=ze(i),l=e.firstCreatePass&&(e.cleanup||(e.cleanup=[])),u=jr(t);let d=!0;if(2===i.type){const h=nt(i,t),f=a?a(h):ye,p=f.target||h,m=u.length,b=a?e=>a(et(e[i.index])).target:i.index;if(Ze(n)){let o=null;if(!a&&c&&(o=function(e,t,n,i){const r=e.cleanup;if(null!=r)for(let s=0;s<r.length-1;s+=2){const e=r[s];if(e===n&&r[s+1]===i){const e=t[7],n=r[s+2];return e.length>n?e[n]:null}"string"==typeof e&&(s+=2)}return null}(e,t,r,i.index)),null!==o)(o.__ngLastListenerFn__||o).__ngNextListenerFn__=s,o.__ngLastListenerFn__=s,d=!1;else{s=vo(i,t,s,!1);const e=n.listen(f.name||p,r,s);u.push(s,e),l&&l.push(r,b,m,m+1)}}else s=vo(i,t,s,!0),p.addEventListener(r,s,o),u.push(s),l&&l.push(r,b,m,o)}const h=i.outputs;let f;if(d&&null!==h&&(f=h[r])){const e=f.length;if(e)for(let n=0;n<e;n+=2){const e=t[f[n]][f[n+1]].subscribe(s),o=u.length;u.push(s,e),l&&l.push(r,i.index,o,-(o+1))}}}(s,r,r[11],o,e,t,n,i),_o}function yo(e,t,n){try{return!1!==t(n)}catch(i){return Fr(e,i),!1}}function vo(e,t,n,i){return function r(s){if(s===Function)return n;const o=2&e.flags?st(e.index,t):t;0==(32&t[2])&&Er(o);let a=yo(t,n,s),c=r.__ngNextListenerFn__;for(;c;)a=yo(t,c,s)&&a,c=c.__ngNextListenerFn__;return i&&!1===a&&(s.preventDefault(),s.returnValue=!1),a}}function wo(e=1){return function(e){return(ht.lFrame.contextLView=function(e,t){for(;e>0;)t=t[15],e--;return t}(e,ht.lFrame.contextLView))[8]}(e)}function So(e,t){let n=null;const i=function(e){const t=e.attrs;if(null!=t){const e=t.indexOf(5);if(0==(1&e))return t[e+1]}return null}(e);for(let r=0;r<t.length;r++){const s=t[r];if("*"!==s){if(null===i?Ni(e,s,!0):ji(i,s))return r}else n=r}return n}function Mo(e){const t=pt()[16][6];if(!t.projection){const n=t.projection=fe(e?e.length:1,null),i=n.slice();let r=t.child;for(;null!==r;){const t=e?So(r,e):0;null!==t&&(i[t]?i[t].projectionNext=r:n[t]=r,i[t]=r),r=r.next}}}let ko=!1;function xo(e){ko=e}function Do(e,t=0,n){const i=pt(),r=mt(),s=nr(r,e,1,null,n||null);null===s.projection&&(s.projection=t),vt(),ko||is(r,i,s)}function To(e,t,n){return Co(e,"",t,"",n),To}function Co(e,t,n,i,r){const s=pt(),o=eo(s,t,n,i);return o!==zi&&pr(mt(),$t(),s,e,o,s[11],r,!1),Co}function Oo(e,t,n,i,r,s,o){const a=pt(),c=to(a,t,n,i,r,s);return c!==zi&&pr(mt(),$t(),a,e,c,a[11],o,!1),Oo}const Lo=[];function Ro(e,t,n,i,r){const s=e[n+1],o=null===t;let a=i?qi(s):Qi(s),c=!1;for(;0!==a&&(!1===c||o);){const n=e[a+1];Eo(e[a],t)&&(c=!0,e[a+1]=i?Zi(n):Ji(n)),a=i?qi(n):Qi(n)}c&&(e[n+1]=i?Ji(s):Zi(s))}function Eo(e,t){return null===e||null==t||(Array.isArray(e)?e[1]:e)===t||!(!Array.isArray(e)||"string"!=typeof t)&&be(e,t)>=0}const Ao={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Io(e){return e.substring(Ao.key,Ao.keyEnd)}function Po(e,t){const n=Ao.textEnd;return n===t?-1:(t=Ao.keyEnd=function(e,t,n){for(;t<n&&e.charCodeAt(t)>32;)t++;return t}(e,Ao.key=t,n),No(e,t,n))}function No(e,t,n){for(;t<n&&e.charCodeAt(t)<=32;)t++;return t}function jo(e,t,n){return $o(e,t,n,!1),jo}function Fo(e,t){return $o(e,t,null,!0),Fo}function Yo(e){Ho(pe,zo,e,!0)}function zo(e,t){for(let n=function(e){return function(e){Ao.key=0,Ao.keyEnd=0,Ao.value=0,Ao.valueEnd=0,Ao.textEnd=e.length}(e),Po(e,No(e,0,Ao.textEnd))}(t);n>=0;n=Po(t,n))pe(e,Io(t),!0)}function $o(e,t,n,i){const r=pt(),s=mt(),o=Dt(2);s.firstUpdatePass&&Vo(s,e,o,i),t!==zi&&Js(r,o,t)&&Go(s,s.data[Yt()+Ie],r,r[11],e,r[o+1]=function(e,t){return null==e||("string"==typeof t?e+=t:"object"==typeof e&&(e=C(Yn(e)))),e}(t,n),i,o)}function Ho(e,t,n,i){const r=mt(),s=Dt(2);r.firstUpdatePass&&Vo(r,null,s,i);const o=pt();if(n!==zi&&Js(o,s,n)){const a=r.data[Yt()+Ie];if(Qo(a,i)&&!Wo(r,s)){let e=i?a.classesWithoutHost:a.stylesWithoutHost;null!==e&&(n=O(e,n||"")),ao(r,a,o,n,i)}else!function(e,t,n,i,r,s,o,a){r===zi&&(r=Lo);let c=0,l=0,u=0<r.length?r[0]:null,d=0<s.length?s[0]:null;for(;null!==u||null!==d;){const h=c<r.length?r[c+1]:void 0,f=l<s.length?s[l+1]:void 0;let p=null,m=void 0;u===d?(c+=2,l+=2,h!==f&&(p=d,m=f)):null===d||null!==u&&u<d?(c+=2,p=u):(l+=2,p=d,m=f),null!==p&&Go(e,t,n,i,p,m,o,a),u=c<r.length?r[c]:null,d=l<s.length?s[l]:null}}(r,a,o,o[11],o[s+1],o[s+1]=function(e,t,n){if(null==n||""===n)return Lo;const i=[],r=Yn(n);if(Array.isArray(r))for(let s=0;s<r.length;s++)e(i,r[s],!0);else if("object"==typeof r)for(const s in r)r.hasOwnProperty(s)&&e(i,s,r[s]);else"string"==typeof r&&t(i,r);return i}(e,t,n),i,s)}}function Wo(e,t){return t>=e.expandoStartIndex}function Vo(e,t,n,i){const r=e.data;if(null===r[n+1]){const s=r[Yt()+Ie],o=Wo(e,n);Qo(s,i)&&null===t&&!o&&(t=!1),t=function(e,t,n,i){const r=Ot(e);let s=i?t.residualClasses:t.residualStyles;if(null===r)0===(i?t.classBindings:t.styleBindings)&&(n=Uo(n=Bo(null,e,t,n,i),t.attrs,i),s=null);else{const o=t.directiveStylingLast;if(-1===o||e[o]!==r)if(n=Bo(r,e,t,n,i),null===s){let n=function(e,t,n){const i=n?t.classBindings:t.styleBindings;if(0!==Qi(i))return e[qi(i)]}(e,t,i);void 0!==n&&Array.isArray(n)&&(n=Bo(null,e,t,n[1],i),n=Uo(n,t.attrs,i),function(e,t,n,i){e[qi(n?t.classBindings:t.styleBindings)]=i}(e,t,i,n))}else s=function(e,t,n){let i=void 0;const r=t.directiveEnd;for(let s=1+t.directiveStylingLast;s<r;s++)i=Uo(i,e[s].hostAttrs,n);return Uo(i,t.attrs,n)}(e,t,i)}return void 0!==s&&(i?t.residualClasses=s:t.residualStyles=s),n}(r,s,t,i),function(e,t,n,i,r,s){let o=s?t.classBindings:t.styleBindings,a=qi(o),c=Qi(o);e[i]=n;let l,u=!1;if(Array.isArray(n)){const e=n;l=e[1],(null===l||be(e,l)>0)&&(u=!0)}else l=n;if(r)if(0!==c){const t=qi(e[a+1]);e[i+1]=Gi(t,a),0!==t&&(e[t+1]=Ki(e[t+1],i)),e[a+1]=131071&e[a+1]|i<<17}else e[i+1]=Gi(a,0),0!==a&&(e[a+1]=Ki(e[a+1],i)),a=i;else e[i+1]=Gi(c,0),0===a?a=i:e[c+1]=Ki(e[c+1],i),c=i;u&&(e[i+1]=Ji(e[i+1])),Ro(e,l,i,!0),Ro(e,l,i,!1),function(e,t,n,i,r){const s=r?e.residualClasses:e.residualStyles;null!=s&&"string"==typeof t&&be(s,t)>=0&&(n[i+1]=Zi(n[i+1]))}(t,l,e,i,s),o=Gi(a,c),s?t.classBindings=o:t.styleBindings=o}(r,s,t,n,o,i)}}function Bo(e,t,n,i,r){let s=null;const o=n.directiveEnd;let a=n.directiveStylingLast;for(-1===a?a=n.directiveStart:a++;a<o&&(s=t[a],i=Uo(i,s.hostAttrs,r),s!==e);)a++;return null!==e&&(n.directiveStylingLast=a),i}function Uo(e,t,n){const i=n?1:2;let r=-1;if(null!==t)for(let s=0;s<t.length;s++){const o=t[s];"number"==typeof o?r=o:r===i&&(Array.isArray(e)||(e=void 0===e?[]:["",e]),pe(e,o,!!n||t[++s]))}return void 0===e?null:e}function Go(e,t,n,i,r,s,o,a){if(2!==t.type)return;const c=e.data,l=c[a+1];Jo(1==(1&l)?qo(c,t,n,r,Qi(l),o):void 0)||(Jo(s)||2==(2&l)&&(s=qo(c,null,n,r,a,o)),function(e,t,n,i,r){const s=Ze(e);if(t)r?s?e.addClass(n,i):n.classList.add(i):s?e.removeClass(n,i):n.classList.remove(i);else{const t=-1==i.indexOf("-")?void 0:2;null==r?s?e.removeStyle(n,i,t):n.style.removeProperty(i):s?e.setStyle(n,i,r,t):n.style.setProperty(i,r)}}(i,o,tt(Yt(),n),r,s))}function qo(e,t,n,i,r,s){const o=null===t;let a=void 0;for(;r>0;){const t=e[r],s=Array.isArray(t),c=s?t[1]:t,l=null===c;let u=n[r+1];u===zi&&(u=l?Lo:void 0);let d=l?me(u,i):c===i?u:void 0;if(s&&!Jo(d)&&(d=me(t,i)),Jo(d)&&(a=d,o))return a;const h=e[r+1];r=o?qi(h):Qi(h)}if(null!==t){let e=s?t.residualClasses:t.residualStyles;null!=e&&(a=me(e,i))}return a}function Jo(e){return void 0!==e}function Qo(e,t){return 0!=(e.flags&(t?16:32))}function Ko(e,t=""){const n=pt(),i=mt(),r=e+Ie,s=i.firstCreatePass?nr(i,e,2,null,null):i.data[r],o=n[r]=Hr(t,n[11]);Xr(i,n,o,s),_t(s,!1)}function Zo(e){return Xo("",e,""),Zo}function Xo(e,t,n){const i=pt(),r=eo(i,e,t,n);return r!==zi&&zr(i,Yt(),r),Xo}function ea(e,t,n,i,r){const s=pt(),o=to(s,e,t,n,i,r);return o!==zi&&zr(s,Yt(),o),ea}function ta(e,t,n,i,r,s,o){const a=pt(),c=function(e,t,n,i,r,s,o,a){const c=Ks(e,kt(),n,r,o);return Dt(3),c?t+sn(n)+i+sn(r)+s+sn(o)+a:zi}(a,e,t,n,i,r,s,o);return c!==zi&&zr(a,Yt(),c),ta}function na(e,t,n){Ho(pe,zo,eo(pt(),e,t,n),!0)}function ia(e,t,n,i,r){Ho(pe,zo,to(pt(),e,t,n,i,r),!0)}function ra(e,t,n,i,r,s,o,a,c){Ho(pe,zo,function(e,t,n,i,r,s,o,a,c,l){const u=Zs(e,kt(),n,r,o,c);return Dt(4),u?t+sn(n)+i+sn(r)+s+sn(o)+a+sn(c)+l:zi}(pt(),e,t,n,i,r,s,o,a,c),!0)}function sa(e,t,n){const i=pt();return Js(i,xt(),t)&&pr(mt(),$t(),i,e,t,i[11],n,!0),sa}function oa(e,t,n){const i=pt();if(Js(i,xt(),t)){const r=mt(),s=$t();pr(r,s,i,e,t,function(e,t,n){return(null===e||$e(e))&&(n=function(e){for(;Array.isArray(e);){if("object"==typeof e[1])return e;e=e[0]}return null}(n[t.index])),n[11]}(Ot(r.data),s,i),n,!0)}return oa}function aa(e,t,n,i,r){if(e=E(e),Array.isArray(e))for(let s=0;s<e.length;s++)aa(e[s],t,n,i,r);else{const s=mt(),o=pt();let a=Rs(e)?e:E(e.provide),c=Cs(e);const l=gt(),u=1048575&l.providerIndexes,d=l.directiveStart,h=l.providerIndexes>>20;if(Rs(e)||!e.multi){const i=new Jt(c,r,ro),f=ua(a,t,r?u:u+h,d);-1===f?(_n(pn(l,o),s,a),ca(s,e,t.length),t.push(a),l.directiveStart++,l.directiveEnd++,r&&(l.providerIndexes+=1048576),n.push(i),o.push(i)):(n[f]=i,o[f]=i)}else{const f=ua(a,t,u+h,d),p=ua(a,t,u,u+h),m=f>=0&&n[f],b=p>=0&&n[p];if(r&&!b||!r&&!m){_n(pn(l,o),s,a);const u=function(e,t,n,i,r){const s=new Jt(e,n,ro);return s.multi=[],s.index=t,s.componentProviders=0,la(s,r,i&&!n),s}(r?ha:da,n.length,r,i,c);!r&&b&&(n[p].providerFactory=u),ca(s,e,t.length,0),t.push(a),l.directiveStart++,l.directiveEnd++,r&&(l.providerIndexes+=1048576),n.push(u),o.push(u)}else ca(s,e,f>-1?f:p,la(n[r?p:f],c,!r&&i));!r&&i&&b&&n[p].componentProviders++}}}function ca(e,t,n,i){const r=Rs(t);if(r||t.useClass){const s=(t.useClass||t).prototype.ngOnDestroy;if(s){const o=e.destroyHooks||(e.destroyHooks=[]);if(!r&&t.multi){const e=o.indexOf(n);-1===e?o.push(n,[i,s]):o[e+1].push(i,s)}else o.push(n,s)}}}function la(e,t,n){return n&&e.componentProviders++,e.multi.push(t)-1}function ua(e,t,n,i){for(let r=n;r<i;r++)if(t[r]===e)return r;return-1}function da(e,t,n,i){return fa(this.multi,[])}function ha(e,t,n,i){const r=this.multi;let s;if(this.providerFactory){const e=this.providerFactory.componentProviders,t=Mn(n,n[1],this.providerFactory.index,i);s=t.slice(0,e),fa(r,s);for(let n=e;n<t.length;n++)s.push(t[n])}else s=[],fa(r,s);return s}function fa(e,t){for(let n=0;n<e.length;n++)t.push((0,e[n])());return t}function pa(e,t=[]){return n=>{n.providersResolver=(n,i)=>function(e,t,n){const i=mt();if(i.firstCreatePass){const r=$e(e);aa(n,i.data,i.blueprint,r,!0),aa(t,i.data,i.blueprint,r,!1)}}(n,i?i(e):e,t)}}class ma{}class ba{}class ga{resolveComponentFactory(e){throw function(e){const t=Error(`No component factory found for ${C(e)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=e,t}(e)}}let _a=(()=>{class e{}return e.NULL=new ga,e})(),ya=(()=>{class e{constructor(e){this.nativeElement=e}}return e.__NG_ELEMENT_ID__=()=>va(e),e})();const va=function(e){return hs(e,gt(),pt())};class wa{}var Sa=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}({});let Ma=(()=>{class e{}return e.__NG_ELEMENT_ID__=()=>ka(),e})();const ka=function(){const e=pt(),t=st(gt().index,e);return function(e){const t=e[11];if(Ze(t))return t;throw new Error("Cannot inject Renderer2 when the application uses Renderer3!")}(Ne(t)?t:e)};let xa=(()=>{class e{}return e.\u0275prov=_({token:e,providedIn:"root",factory:()=>null}),e})();class Da{constructor(e){this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")}}const Ta=new Da("10.1.5");class Ca{constructor(){}supports(e){return Bs(e)}create(e){return new La(e)}}const Oa=(e,t)=>t;class La{constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||Oa}forEachItem(e){let t;for(t=this._itHead;null!==t;t=t._next)e(t)}forEachOperation(e){let t=this._itHead,n=this._removalsHead,i=0,r=null;for(;t||n;){const s=!n||t&&t.currentIndex<Ia(n,i,r)?t:n,o=Ia(s,i,r),a=s.currentIndex;if(s===n)i--,n=n._nextRemoved;else if(t=t._next,null==s.previousIndex)i++;else{r||(r=[]);const e=o-i,t=a-i;if(e!=t){for(let n=0;n<e;n++){const i=n<r.length?r[n]:r[n]=0,s=i+n;t<=s&&s<e&&(r[n]=i+1)}r[s.previousIndex]=t-e}}o!==a&&e(s,o,a)}}forEachPreviousItem(e){let t;for(t=this._previousItHead;null!==t;t=t._nextPrevious)e(t)}forEachAddedItem(e){let t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)}forEachMovedItem(e){let t;for(t=this._movesHead;null!==t;t=t._nextMoved)e(t)}forEachRemovedItem(e){let t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)}forEachIdentityChange(e){let t;for(t=this._identityChangesHead;null!==t;t=t._nextIdentityChange)e(t)}diff(e){if(null==e&&(e=[]),!Bs(e))throw new Error(`Error trying to diff '${C(e)}'. Only arrays and iterables are allowed`);return this.check(e)?this:null}onDestroy(){}check(e){this._reset();let t,n,i,r=this._itHead,s=!1;if(Array.isArray(e)){this.length=e.length;for(let t=0;t<this.length;t++)n=e[t],i=this._trackByFn(t,n),null!==r&&Object.is(r.trackById,i)?(s&&(r=this._verifyReinsertion(r,n,i,t)),Object.is(r.item,n)||this._addIdentityChange(r,n)):(r=this._mismatch(r,n,i,t),s=!0),r=r._next}else t=0,function(e,t){if(Array.isArray(e))for(let n=0;n<e.length;n++)t(e[n]);else{const n=e[Ws()]();let i;for(;!(i=n.next()).done;)t(i.value)}}(e,e=>{i=this._trackByFn(t,e),null!==r&&Object.is(r.trackById,i)?(s&&(r=this._verifyReinsertion(r,e,i,t)),Object.is(r.item,e)||this._addIdentityChange(r,e)):(r=this._mismatch(r,e,i,t),s=!0),r=r._next,t++}),this.length=t;return this._truncate(r),this.collection=e,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,t,n,i){let r;return null===e?r=this._itTail:(r=e._prev,this._remove(e)),null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(n,i))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,r,i)):null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,r,i)):e=this._addAfter(new Ra(t,n),r,i),e}_verifyReinsertion(e,t,n,i){let r=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==r?e=this._reinsertAfter(r,e._prev,i):e.currentIndex!=i&&(e.currentIndex=i,this._addToMoves(e,i)),e}_truncate(e){for(;null!==e;){const t=e._next;this._addToRemovals(this._unlink(e)),e=t}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,t,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);const i=e._prevRemoved,r=e._nextRemoved;return null===i?this._removalsHead=r:i._nextRemoved=r,null===r?this._removalsTail=i:r._prevRemoved=i,this._insertAfter(e,t,n),this._addToMoves(e,n),e}_moveAfter(e,t,n){return this._unlink(e),this._insertAfter(e,t,n),this._addToMoves(e,n),e}_addAfter(e,t,n){return this._insertAfter(e,t,n),this._additionsTail=null===this._additionsTail?this._additionsHead=e:this._additionsTail._nextAdded=e,e}_insertAfter(e,t,n){const i=null===t?this._itHead:t._next;return e._next=i,e._prev=t,null===i?this._itTail=e:i._prev=e,null===t?this._itHead=e:t._next=e,null===this._linkedRecords&&(this._linkedRecords=new Aa),this._linkedRecords.put(e),e.currentIndex=n,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);const t=e._prev,n=e._next;return null===t?this._itHead=n:t._next=n,null===n?this._itTail=t:n._prev=t,e}_addToMoves(e,t){return e.previousIndex===t||(this._movesTail=null===this._movesTail?this._movesHead=e:this._movesTail._nextMoved=e),e}_addToRemovals(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new Aa),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,t){return e.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=e:this._identityChangesTail._nextIdentityChange=e,e}}class Ra{constructor(e,t){this.item=e,this.trackById=t,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class Ea{constructor(){this._head=null,this._tail=null}add(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,t){let n;for(n=this._head;null!==n;n=n._nextDup)if((null===t||t<=n.currentIndex)&&Object.is(n.trackById,e))return n;return null}remove(e){const t=e._prevDup,n=e._nextDup;return null===t?this._head=n:t._nextDup=n,null===n?this._tail=t:n._prevDup=t,null===this._head}}class Aa{constructor(){this.map=new Map}put(e){const t=e.trackById;let n=this.map.get(t);n||(n=new Ea,this.map.set(t,n)),n.add(e)}get(e,t){const n=this.map.get(e);return n?n.get(e,t):null}remove(e){const t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function Ia(e,t,n){const i=e.previousIndex;if(null===i)return i;let r=0;return n&&i<n.length&&(r=n[i]),i+t+r}class Pa{constructor(){}supports(e){return e instanceof Map||Us(e)}create(){return new Na}}class Na{constructor(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}get isDirty(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead}forEachItem(e){let t;for(t=this._mapHead;null!==t;t=t._next)e(t)}forEachPreviousItem(e){let t;for(t=this._previousMapHead;null!==t;t=t._nextPrevious)e(t)}forEachChangedItem(e){let t;for(t=this._changesHead;null!==t;t=t._nextChanged)e(t)}forEachAddedItem(e){let t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)}forEachRemovedItem(e){let t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)}diff(e){if(e){if(!(e instanceof Map||Us(e)))throw new Error(`Error trying to diff '${C(e)}'. Only maps and objects are allowed`)}else e=new Map;return this.check(e)?this:null}onDestroy(){}check(e){this._reset();let t=this._mapHead;if(this._appendAfter=null,this._forEach(e,(e,n)=>{if(t&&t.key===n)this._maybeAddToChanges(t,e),this._appendAfter=t,t=t._next;else{const i=this._getOrCreateRecordForKey(n,e);t=this._insertBeforeOrAppend(t,i)}}),t){t._prev&&(t._prev._next=null),this._removalsHead=t;for(let e=t;null!==e;e=e._nextRemoved)e===this._mapHead&&(this._mapHead=null),this._records.delete(e.key),e._nextRemoved=e._next,e.previousValue=e.currentValue,e.currentValue=null,e._prev=null,e._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,t){if(e){const n=e._prev;return t._next=e,t._prev=n,e._prev=t,n&&(n._next=t),e===this._mapHead&&(this._mapHead=t),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null}_getOrCreateRecordForKey(e,t){if(this._records.has(e)){const n=this._records.get(e);this._maybeAddToChanges(n,t);const i=n._prev,r=n._next;return i&&(i._next=r),r&&(r._prev=i),n._next=null,n._prev=null,n}const n=new ja(e);return this._records.set(e,n),n.currentValue=t,this._addToAdditions(n),n}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,t){Object.is(t,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=t,this._addToChanges(e))}_addToAdditions(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,t){e instanceof Map?e.forEach(t):Object.keys(e).forEach(n=>t(e[n],n))}}class ja{constructor(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}let Fa=(()=>{class e{constructor(e){this.factories=e}static create(t,n){if(null!=n){const e=n.factories.slice();t=t.concat(e)}return new e(t)}static extend(t){return{provide:e,useFactory:n=>{if(!n)throw new Error("Cannot extend IterableDiffers without a parent injector");return e.create(t,n)},deps:[[e,new p,new h]]}}find(e){const t=this.factories.find(t=>t.supports(e));if(null!=t)return t;throw new Error(`Cannot find a differ supporting object '${e}' of type '${n=e,n.name||typeof n}'`);var n}}return e.\u0275prov=_({token:e,providedIn:"root",factory:()=>new e([new Ca])}),e})(),Ya=(()=>{class e{constructor(e){this.factories=e}static create(t,n){if(n){const e=n.factories.slice();t=t.concat(e)}return new e(t)}static extend(t){return{provide:e,useFactory:n=>{if(!n)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return e.create(t,n)},deps:[[e,new p,new h]]}}find(e){const t=this.factories.find(t=>t.supports(e));if(t)return t;throw new Error(`Cannot find a differ supporting object '${e}'`)}}return e.\u0275prov=_({token:e,providedIn:"root",factory:()=>new e([new Pa])}),e})();const za=[new Pa],$a=new Fa([new Ca]),Ha=new Ya(za);let Wa=(()=>{class e{}return e.__NG_ELEMENT_ID__=()=>Va(e,ya),e})();const Va=function(e,t){return fs(e,t,gt(),pt())};let Ba=(()=>{class e{}return e.__NG_ELEMENT_ID__=()=>Ua(e,ya),e})();const Ua=function(e,t){return ps(e,t,gt(),pt())},Ga={};class qa extends _a{constructor(e){super(),this.ngModule=e}resolveComponentFactory(e){const t=Re(e);return new Ka(t,this.ngModule)}}function Ja(e){const t=[];for(let n in e)e.hasOwnProperty(n)&&t.push({propName:e[n],templateName:n});return t}const Qa=new U("SCHEDULER_TOKEN",{providedIn:"root",factory:()=>an});class Ka extends ba{constructor(e,t){super(),this.componentDef=e,this.ngModule=t,this.componentType=e.type,this.selector=e.selectors.map(Yi).join(","),this.ngContentSelectors=e.ngContentSelectors?e.ngContentSelectors:[],this.isBoundToModule=!!t}get inputs(){return Ja(this.componentDef.inputs)}get outputs(){return Ja(this.componentDef.outputs)}create(e,t,n,i){const r=(i=i||this.ngModule)?function(e,t){return{get:(n,i,r)=>{const s=e.get(n,Ga,r);return s!==Ga||i===Ga?s:t.get(n,i,r)}}}(e,i.injector):e,s=r.get(wa,Xe),o=r.get(xa,null),a=s.createRenderer(null,this.componentDef),c=this.componentDef.selectors[0][0]||"div",l=n?function(e,t,n){if(Ze(e))return e.selectRootElement(t,n===_e.ShadowDom);let i="string"==typeof t?e.querySelector(t):t;return i.textContent="",i}(a,n,this.componentDef.encapsulation):er(c,s.createRenderer(null,this.componentDef),function(e){const t=e.toLowerCase();return"svg"===t?"http://www.w3.org/2000/svg":"math"===t?"http://www.w3.org/1998/MathML/":null}(c)),u=this.componentDef.onPush?576:528,d={components:[],scheduler:an,clean:Nr,playerHandler:null,flags:0},h=dr(0,null,null,1,0,null,null,null,null,null),f=tr(null,h,d,u,null,null,s,a,o,r);let p,m;At(f);try{const e=function(e,t,n,i,r,s){const o=n[1];n[20]=e;const a=nr(o,0,2,null,null),c=a.mergedAttrs=t.hostAttrs;null!==c&&(Ps(a,c,!0),null!==e&&(Qt(r,e,c),null!==a.classes&&os(r,e,a.classes),null!==a.styles&&ss(r,e,a.styles)));const l=i.createRenderer(e,t),u=tr(n,ur(t),null,t.onPush?64:16,n[20],a,i,l,null,null);return o.firstCreatePass&&(_n(pn(a,n),o,t.type),vr(o,a),Sr(a,n.length,1)),Rr(n,u),n[20]=u}(l,this.componentDef,f,s,a);if(l)if(n)Qt(a,l,["ng-version",Ta.full]);else{const{attrs:e,classes:t}=function(e){const t=[],n=[];let i=1,r=2;for(;i<e.length;){let s=e[i];if("string"==typeof s)2===r?""!==s&&t.push(s,e[++i]):8===r&&n.push(s);else{if(!Ii(r))break;r=s}i++}return{attrs:t,classes:n}}(this.componentDef.selectors[0]);e&&Qt(a,l,e),t&&t.length>0&&os(a,l,t.join(" "))}if(m=it(h,0),void 0!==t){const e=m.projection=[];for(let n=0;n<this.ngContentSelectors.length;n++){const i=t[n];e.push(null!=i?Array.from(i):null)}}p=function(e,t,n,i,r){const s=n[1],o=function(e,t,n){const i=gt();e.firstCreatePass&&(n.providersResolver&&n.providersResolver(n),yr(e,i,1),Mr(e,t,n));const r=Mn(t,e,t.length-1,i);Ti(r,t);const s=nt(i,t);return s&&Ti(s,t),r}(s,n,t);i.components.push(o),e[8]=o,r&&r.forEach(e=>e(o,t)),t.contentQueries&&t.contentQueries(1,o,n.length-1);const a=gt();if(s.firstCreatePass&&(null!==t.hostBindings||null!==t.hostAttrs)){zt(a.index-Ie);const e=n[1];br(e,t),gr(e,n,t.hostVars),_r(t,o)}return o}(e,this.componentDef,f,d,[Ns]),ir(h,f,null)}finally{Ft()}return new Za(this.componentType,p,hs(ya,m,f),f,m)}}class Za extends ma{constructor(e,t,n,i,r){super(),this.location=n,this._rootLView=i,this._tNode=r,this.destroyCbs=[],this.instance=t,this.hostView=this.changeDetectorRef=new cs(i),this.componentType=e}get injector(){return new Dn(this._tNode,this._rootLView)}destroy(){this.destroyCbs&&(this.destroyCbs.forEach(e=>e()),this.destroyCbs=null,!this.hostView.destroyed&&this.hostView.destroy())}onDestroy(e){this.destroyCbs&&this.destroyCbs.push(e)}}const Xa=void 0;var ec=["en",[["a","p"],["AM","PM"],Xa],[["AM","PM"],Xa,Xa],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Xa,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Xa,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Xa,"{1} 'at' {0}",Xa],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(e){let t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===n?1:5}];let tc={};function nc(e,t,n){"string"!=typeof t&&(n=t,t=e[ac.LocaleId]),t=t.toLowerCase().replace(/_/g,"-"),tc[t]=e,n&&(tc[t][ac.ExtraData]=n)}function ic(e){const t=function(e){return e.toLowerCase().replace(/_/g,"-")}(e);let n=oc(t);if(n)return n;const i=t.split("-")[0];if(n=oc(i),n)return n;if("en"===i)return ec;throw new Error(`Missing locale data for the locale "${e}".`)}function rc(e){return ic(e)[ac.CurrencyCode]||null}function sc(e){return ic(e)[ac.PluralCase]}function oc(e){return e in tc||(tc[e]=F.ng&&F.ng.common&&F.ng.common.locales&&F.ng.common.locales[e]),tc[e]}var ac=function(e){return e[e.LocaleId=0]="LocaleId",e[e.DayPeriodsFormat=1]="DayPeriodsFormat",e[e.DayPeriodsStandalone=2]="DayPeriodsStandalone",e[e.DaysFormat=3]="DaysFormat",e[e.DaysStandalone=4]="DaysStandalone",e[e.MonthsFormat=5]="MonthsFormat",e[e.MonthsStandalone=6]="MonthsStandalone",e[e.Eras=7]="Eras",e[e.FirstDayOfWeek=8]="FirstDayOfWeek",e[e.WeekendRange=9]="WeekendRange",e[e.DateFormat=10]="DateFormat",e[e.TimeFormat=11]="TimeFormat",e[e.DateTimeFormat=12]="DateTimeFormat",e[e.NumberSymbols=13]="NumberSymbols",e[e.NumberFormats=14]="NumberFormats",e[e.CurrencyCode=15]="CurrencyCode",e[e.CurrencySymbol=16]="CurrencySymbol",e[e.CurrencyName=17]="CurrencyName",e[e.Currencies=18]="Currencies",e[e.Directionality=19]="Directionality",e[e.PluralCase=20]="PluralCase",e[e.ExtraData=21]="ExtraData",e}({});const cc=["zero","one","two","few","many"],lc="en-US";let uc=lc;function dc(e){var t,n;n="Expected localeId to be defined",null==(t=e)&&function(e,t,n,i){throw new Error("ASSERTION ERROR: "+e+` [Expected=> null != ${t} <=Actual]`)}(n,t),"string"==typeof e&&(uc=e.toLowerCase().replace(/_/g,"-"))}const hc={marker:"element"},fc={marker:"comment"},pc=[];let mc=-1,bc=0,gc=0;function _c(e,t,n,i){const r=i[11];let s=null,o=null;const a=[];for(let c=0;c<n.length;c++){const l=n[c];if("string"==typeof l){const t=Hr(l,r),u=n[++c];o=s,s=kc(e,i,u,2,t,null),a.push(u),vt()}else if("number"==typeof l)switch(7&l){case 1:const r=l>>>17;let u;u=r===t?i[6]:it(e,r),o=Sc(e,s,u,o,i);break;case 0:const d=l>=0,h=(d?l:~l)>>>3;a.push(h),o=s,s=it(e,h),s&&_t(s,d);break;case 5:o=s=it(e,l>>>3),_t(s,!1);break;case 4:const f=n[++c],p=n[++c];xr(it(e,l>>>3),i,f,p,null,null);break;default:throw new Error(`Unable to determine the type of mutate operation for "${l}"`)}else switch(l){case fc:const t=n[++c],u=n[++c],d=r.createComment(t);o=s,s=kc(e,i,u,4,d,null),a.push(u),Ti(d,i),vt();break;case hc:const h=n[++c],f=n[++c];o=s,s=kc(e,i,f,2,r.createElement(h),h),a.push(f);break;default:throw new Error(`Unable to determine the type of mutate operation for "${l}"`)}}return vt(),a}function yc(e,t,n,i,r,s){let o=!1;for(let a=0;a<i.length;a++){const c=i[a],l=i[++a];if(c&s){let s="";for(let c=a+1;c<=a+l;c++){const a=i[c];if("string"==typeof a)s+=a;else if("number"==typeof a)if(a<0)s+=sn(n[r-a]);else{const l=a>>>2;switch(3&a){case 1:const a=i[++c],u=i[++c];pr(e,it(e,l),n,a,s,n[11],u,!1);break;case 0:zr(n,l,s);break;case 2:o=wc(e,t,i[++c],n,s);break;case 3:vc(e,t,i[++c],r,n,o)}}}}a+=l}}function vc(e,t,n,i,r,s){const o=t[n],a=r[o.currentCaseLViewIndex];null!==a&&yc(e,t,r,o.update[a],i,s?-1:bc)}function wc(e,t,n,i,r){!function e(t,n,i,r){const s=n[i],o=r[s.currentCaseLViewIndex];if(null!==o){const i=s.remove[o];for(let s=0;s<i.length;s++){const o=i[s],a=o>>>3;switch(7&o){case 3:Mc(t,r,a,!1);break;case 6:e(t,n,a,r)}}}}(e,t,n,i);let s=!1;const o=t[n],a=function(e,t){let n=e.cases.indexOf(t);if(-1===n)switch(e.type){case 1:{const i=function(e,t){const n=sc(t)(parseInt(e,10)),i=cc[n];return void 0!==i?i:"other"}(t,uc);n=e.cases.indexOf(i),-1===n&&"other"!==i&&(n=e.cases.indexOf("other"));break}case 0:n=e.cases.indexOf("other")}return n}(o,r);return i[o.currentCaseLViewIndex]=-1!==a?a:null,a>-1&&(_c(e,-1,o.create[a],i),s=!0),s}function Sc(e,t,n,i,r){const s=t.next;i||(i=n),i===n&&t!==n.child?(t.next=n.child,null===t.parent?e.firstChild=t:n.child=t):i!==n&&t!==i.next?(t.next=i.next,i.next=t):t.next=null,n!==r[6]&&(t.parent=n);let o=t.next;for(;o;)o.next===t&&(o.next=s),o=o.next;if(1===t.type)return is(e,r,t),t;Xr(e,r,nt(t,r),t);const a=r[t.index];return 0!==t.type&&je(a)&&Xr(e,r,a[7],t),t}function Mc(e,t,n,i){const r=it(e,n),s=tt(n,t);s&&es(t[11],s);const o=rt(t,n);if(je(o)){const e=o;0!==r.type&&es(t[11],e[7])}i&&r&&(r.flags|=64)}function kc(e,t,n,i,r,s){const o=gt();t[n+Ie]=r;const a=nr(e,n,i,s,null);return o&&o.next===a&&(o.next=null),a}const xc=/\ufffd(\d+):?\d*\ufffd/gi,Dc=/({\s*\ufffd\d+:?\d*\ufffd\s*,\s*\S{6}\s*,[\s\S]*})/gi,Tc=/\ufffd(\d+)\ufffd/,Cc=/^\s*(\ufffd\d+:?\d*\ufffd)\s*,\s*(select|plural)\s*,/;let Oc;const Lc=[],Rc=/\ufffd\/?\*(\d+:\d+)\ufffd/gi,Ec=/\ufffd(\/?[#*!]\d+):?\d*\ufffd/gi,Ac=/\uE500/g;function Ic(e,t,n,i=null){const r=[null,null],s=e.split(xc);let o=0;for(let a=0;a<s.length;a++){const e=s[a];if(1&a){const t=parseInt(e,10);r.push(-1-t),o|=jc(t)}else""!==e&&r.push(e)}return r.push(t<<2|(n?1:0)),n&&r.push(n,i),r[0]=o,r[1]=r.length-2,r}function Pc(e,t=0){let n;t|=jc(e.mainBinding);for(let i=0;i<e.values.length;i++){const r=e.values[i];for(let e=0;e<r.length;e++){const i=r[e];if("string"==typeof i)for(;n=xc.exec(i);)t|=jc(parseInt(n[1],10));else t=Pc(i,t)}}return t}function Nc(e){return e+Oc++}function jc(e){return 1<<Math.min(e,31)}function Fc(e){return void 0===e}function Yc(e){let t,n,i="",r=0,s=!1;for(;null!==(t=Rc.exec(e));)s?t[0]===`\ufffd/*${n}\ufffd`&&(r=t.index,s=!1):(i+=e.substring(r,t.index+t[0].length),n=t[1],s=!0);return i+=e.substr(r),i}function zc(e,t,n,i){const r=[],s=[],o=[],a=[],c=[],l=t.values;for(let u=0;u<l.length;u++){const t=l[u],d=[];for(let e=0;e<t.length;e++){const n=t[e];if("string"!=typeof n){const i=d.push(n)-1;t[e]=`\x3c!--\ufffd${i}\ufffd--\x3e`}}const h=Hc(t.join(""),n,d,e,i);r.push(h.create),s.push(h.remove),o.push(h.update),a.push(h.vars),c.push(h.childIcus)}e.push({type:t.type,vars:a,currentCaseLViewIndex:Ie+i+1,childIcus:c,cases:t.cases,create:r,remove:s,update:o}),Oc+=Math.max(...a)}function $c(e){const t=[],n=[];let i=1,r=0;const s=Wc(e=e.replace(Cc,(function(e,t,n){return i="select"===n?0:1,r=parseInt(t.substr(1),10),""})));for(let o=0;o<s.length;){let e=s[o++].trim();1===i&&(e=e.replace(/\s*(?:=)?(\w+)\s*/,"$1")),e.length&&t.push(e);const r=Wc(s[o++]);t.length>n.length&&n.push(r)}return{type:i,mainBinding:r,cases:t,values:n}}function Hc(e,t,n,i,r){const s=Kn(Ke()).getInertBodyElement(e);if(!s)throw new Error("Unable to generate inert body element");const o={vars:1,childIcus:[],create:[],remove:[],update:[]};return function e(t,n,i,r,s,o){if(t){const a=[];for(;t;){const c=t.nextSibling,l=o+ ++n.vars;switch(t.nodeType){case Node.ELEMENT_NODE:const c=t,u=c.tagName.toLowerCase();if(ui.hasOwnProperty(u)){n.create.push(hc,u,l,i<<17|1);const a=c.attributes;for(let e=0;e<a.length;e++){const t=a.item(e),i=t.name.toLowerCase();t.value.match(xc)?fi.hasOwnProperty(i)&&le(di[i]?Ic(t.value,l,t.name,ni):hi[i]?Ic(t.value,l,t.name,ii):Ic(t.value,l,t.name),n.update):n.create.push(l<<3|4,t.name,t.value)}e(t.firstChild,n,l,r,s,o),n.remove.push(l<<3|3)}else n.vars--;break;case Node.TEXT_NODE:const d=t.textContent||"",h=d.match(xc);n.create.push(h?"":d,l,i<<17|1),n.remove.push(l<<3|3),h&&le(Ic(d,l),n.update);break;case Node.COMMENT_NODE:const f=Tc.exec(t.textContent||"");if(f){const e=parseInt(f[1],10);n.create.push(fc,"",l,i<<17|1),a.push([r[e],l])}else n.vars--;break;default:n.vars--}t=c}for(let e=0;e<a.length;e++){const t=a[e][0],i=a[e][1];zc(s,t,i,o+n.vars);const r=s.length-1;n.vars+=Math.max(...s[r].vars),n.childIcus.push(r);const c=Pc(t);n.update.push(jc(t.mainBinding),3,-1-t.mainBinding,i<<2|2,r,c,2,i<<2|3,r),n.remove.push(r<<3|6,i<<3|3)}}}((wi(s)||s).firstChild,o,t,n,i,r),o}function Wc(e){if(!e)return[];let t=0;const n=[],i=[],r=/[{}]/g;let s;for(r.lastIndex=0;s=r.exec(e);){const r=s.index;if("}"==s[0]){if(n.pop(),0==n.length){const n=e.substring(t,r);Cc.test(n)?i.push($c(n)):i.push(n),t=r+1}}else{if(0==n.length){const n=e.substring(t,r);i.push(n),t=r+1}n.push("{")}}const o=e.substring(t);return i.push(o),i}const Vc=/\[(\ufffd.+?\ufffd?)\]/,Bc=/\[(\ufffd.+?\ufffd?)\]|(\ufffd\/?\*\d+:\d+\ufffd)/g,Uc=/({\s*)(VAR_(PLURAL|SELECT)(_\d+)?)(\s*,)/g,Gc=/{([A-Z0-9_]+)}/g,qc=/\ufffdI18N_EXP_(ICU(_\d+)?)\ufffd/g,Jc=/\/\*/,Qc=/\d+\:(\d+)/;function Kc(e,t,n){const i=mt(),r=lt(i.consts,t);!function(e){pc[++mc]=e}(e),xo(!0),i.firstCreatePass&&null===i.data[e+Ie]&&function(e,t,n,i,r){const s=t.blueprint.length-Ie;Oc=0;const o=gt(),a=yt()?o:o&&o.parent;let c=a&&a!==e[6]?a.index-Ie:n,l=0;Lc[l]=c;const u=[];if(n>0&&o!==a){let e=o.index-Ie;yt()||(e=~e),u.push(e<<3|0)}const d=[],h=[];if(""===i&&Fc(r))u.push(i,Nc(s),c<<17|1);else{const e=function(e,t){if(Fc(t))return Yc(e);{const n=e.indexOf(`:${t}\ufffd`)+2+t.toString().length,i=e.search(new RegExp(`\ufffd\\/\\*\\d+:${t}\ufffd`));return Yc(e.substring(n,i))}}(i,r),t=(f=e,f.replace(Ac," ")).split(Ec);for(let n=0;n<t.length;n++){let i=t[n];if(1&n)if("/"===i.charAt(0)){if("#"===i.charAt(1)){const e=parseInt(i.substr(2),10);c=Lc[--l],u.push(e<<3|5)}}else{const e=parseInt(i.substr(1),10),t="#"===i.charAt(0);u.push((t?e:~e)<<3|0,c<<17|1),t&&(Lc[++l]=c=e)}else{const t=Wc(i);for(let n=0;n<t.length;n++)if(1&n){const i=t[n];if("object"!=typeof i)throw new Error(`Unable to parse ICU expression in "${e}" message.`);const r=Nc(s);u.push(fc,"",r,c<<17|1);const o=Pc(i);zc(h,i,r,r);const a=h.length-1;d.push(jc(i.mainBinding),3,-1-i.mainBinding,r<<2|2,a,o,2,r<<2|3,a)}else if(""!==t[n]){const e=t[n],i=e.match(xc),r=Nc(s);u.push(i?"":e,r,c<<17|1),i&&le(Ic(e,r),d)}}}}var f;Oc>0&&function(e,t,n){if(n>0&&e.firstCreatePass){for(let i=0;i<n;i++)e.blueprint.push(null),e.data.push(null),t.push(null);e.expandoInstructions?e.expandoInstructions.push(n):e.expandoStartIndex+=n}}(t,e,Oc),t.data[n+Ie]={vars:Oc,create:u,update:d,icus:h.length?h:null}}(pt(),i,e,r,n)}function Zc(){const e=pt();(function(e,t){const n=pc[mc--],i=e.data[n+Ie],r=gt(),s=_c(e,n,i.create,t);let o=n+1;for(;null!==r&&o<=r.index-Ie;){-1===s.indexOf(o)&&Mc(e,t,o,!0);const n=it(e,o);!n||0!==n.type&&2!==n.type&&3!==n.type||null===n.localNames||(o+=n.localNames.length>>1),o++}})(mt(),e),xo(!1)}function Xc(e,t,n){Kc(e,t,n),Zc()}function el(e,t){const n=pt(),i=mt();!function(e,t,n,i){const r=gt().index-Ie,s=[];for(let o=0;o<i.length;o+=2){const a=i[o],c=i[o+1].split(Dc);for(let i=0;i<c.length;i++){const o=c[i];if(1&i)throw new Error("ICU expressions are not yet supported in attributes");if(""!==o)if(o.match(xc))t.firstCreatePass&&null===t.data[n+Ie]&&le(Ic(o,r,a),s);else{const n=it(t,r);2===n.type&&xr(n,e,a,o,null,null);const i=null!==n.inputs&&n.inputs[a];i&&Yr(t,e,i,a,o)}}}t.firstCreatePass&&null===t.data[n+Ie]&&(t.data[n+Ie]=s)}(n,i,e,lt(i.consts,t))}function tl(e){return Js(pt(),xt(),e)&&(bc|=1<<gc),gc++,tl}function nl(e){!function(e,t,n){if(gc>0){const i=e.data[n+Ie];let r,s=null;Array.isArray(i)?r=i:(r=i.update,s=i.icus),yc(e,s,t,r,kt()-gc-1,bc),bc=0,gc=0}}(mt(),pt(),e)}function il(e,t={}){return function(e,t={}){let n=e;if(Vc.test(e)){const e={},t=[0];n=n.replace(Bc,(n,i,r)=>{const s=i||r,o=e[s]||[];if(o.length||(s.split("|").forEach(e=>{const t=e.match(Qc),n=t?parseInt(t[1],10):0,i=Jc.test(e);o.push([n,i,e])}),e[s]=o),!o.length)throw new Error("i18n postprocess: unmatched placeholder - "+s);const a=t[t.length-1];let c=0;for(let e=0;e<o.length;e++)if(o[e][0]===a){c=e;break}const[l,u,d]=o[c];return u?t.pop():a!==l&&t.push(l),o.splice(c,1),d})}return Object.keys(t).length?(n=n.replace(Uc,(e,n,i,r,s,o)=>t.hasOwnProperty(i)?`${n}${t[i]}${o}`:e),n=n.replace(Gc,(e,n)=>t.hasOwnProperty(n)?t[n]:e),n=n.replace(qc,(e,n)=>{if(t.hasOwnProperty(n)){const i=t[n];if(!i.length)throw new Error(`i18n postprocess: unmatched ICU - ${e} with key: ${n}`);return i.shift()}return e}),n):n}(e,t)}const rl=new Map;class sl extends ae{constructor(e,t){super(),this._parent=t,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new qa(this);const n=Ae(e),i=e[W]||null;i&&dc(i),this._bootstrapComponents=un(n.bootstrap),this._r3Injector=xs(e,t,[{provide:ae,useValue:this},{provide:_a,useValue:this.componentFactoryResolver}],C(e)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(e)}get(e,t=As.THROW_IF_NOT_FOUND,n=m.Default){return e===As||e===ae||e===G?this:this._r3Injector.get(e,t,n)}destroy(){const e=this._r3Injector;!e.destroyed&&e.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}}class ol extends ce{constructor(e){super(),this.moduleType=e,null!==Ae(e)&&function e(t){if(null!==t.\u0275mod.id){const e=t.\u0275mod.id;(function(e,t,n){if(t&&t!==n)throw new Error(`Duplicate module registered for ${e} - ${C(t)} vs ${C(t.name)}`)})(e,rl.get(e),t),rl.set(e,t)}let n=t.\u0275mod.imports;n instanceof Function&&(n=n()),n&&n.forEach(t=>e(t))}(e)}create(e){return new sl(this.moduleType,e)}}function al(e,t,n){const i=Mt()+e,r=pt();return r[i]===zi?Gs(r,i,n?t.call(n):t()):qs(r,i)}function cl(e,t,n,i){return pl(pt(),Mt(),e,t,n,i)}function ll(e,t,n,i,r){return ml(pt(),Mt(),e,t,n,i,r)}function ul(e,t,n,i,r,s){return bl(pt(),Mt(),e,t,n,i,r,s)}function dl(e,t,n,i,r,s,o){return function(e,t,n,i,r,s,o,a,c){const l=t+n;return Zs(e,l,r,s,o,a)?Gs(e,l+4,c?i.call(c,r,s,o,a):i(r,s,o,a)):fl(e,l+4)}(pt(),Mt(),e,t,n,i,r,s,o)}function hl(e,t,n,i,r,s,o,a){const c=Mt()+e,l=pt(),u=Zs(l,c,n,i,r,s);return Js(l,c+4,o)||u?Gs(l,c+5,a?t.call(a,n,i,r,s,o):t(n,i,r,s,o)):qs(l,c+5)}function fl(e,t){const n=e[t];return n===zi?void 0:n}function pl(e,t,n,i,r,s){const o=t+n;return Js(e,o,r)?Gs(e,o+1,s?i.call(s,r):i(r)):fl(e,o+1)}function ml(e,t,n,i,r,s,o){const a=t+n;return Qs(e,a,r,s)?Gs(e,a+2,o?i.call(o,r,s):i(r,s)):fl(e,a+2)}function bl(e,t,n,i,r,s,o,a){const c=t+n;return Ks(e,c,r,s,o)?Gs(e,c+3,a?i.call(a,r,s,o):i(r,s,o)):fl(e,c+3)}function gl(e,t){const n=mt();let i;const r=e+Ie;n.firstCreatePass?(i=function(e,t){if(t)for(let n=t.length-1;n>=0;n--){const i=t[n];if(e===i.name)return i}throw new Error(`The pipe '${e}' could not be found!`)}(t,n.pipeRegistry),n.data[r]=i,i.onDestroy&&(n.destroyHooks||(n.destroyHooks=[])).push(r,i.onDestroy)):i=n.data[r];const s=i.factory||(i.factory=Ee(i.type)),o=te(ro);try{const t=hn(!1),i=s();return hn(t),function(e,t,n,i){const r=n+Ie;r>=e.data.length&&(e.data[r]=null,e.blueprint[r]=null),t[r]=i}(n,pt(),e,i),i}finally{te(o)}}function _l(e,t,n){const i=pt(),r=rt(i,e);return Sl(i,wl(i,e)?pl(i,Mt(),t,r.transform,n,r):r.transform(n))}function yl(e,t,n,i){const r=pt(),s=rt(r,e);return Sl(r,wl(r,e)?ml(r,Mt(),t,s.transform,n,i,s):s.transform(n,i))}function vl(e,t,n,i,r){const s=pt(),o=rt(s,e);return Sl(s,wl(s,e)?bl(s,Mt(),t,o.transform,n,i,r,o):o.transform(n,i,r))}function wl(e,t){return e[1].data[t+Ie].pure}function Sl(e,t){return Vs.isWrapped(t)&&(t=Vs.unwrap(t),e[kt()]=zi),t}const Ml=class extends i.a{constructor(e=!1){super(),this.__isAsync=e}emit(e){super.next(e)}subscribe(e,t,n){let i,s=e=>null,o=()=>null;e&&"object"==typeof e?(i=this.__isAsync?t=>{setTimeout(()=>e.next(t))}:t=>{e.next(t)},e.error&&(s=this.__isAsync?t=>{setTimeout(()=>e.error(t))}:t=>{e.error(t)}),e.complete&&(o=this.__isAsync?()=>{setTimeout(()=>e.complete())}:()=>{e.complete()})):(i=this.__isAsync?t=>{setTimeout(()=>e(t))}:t=>{e(t)},t&&(s=this.__isAsync?e=>{setTimeout(()=>t(e))}:e=>{t(e)}),n&&(o=this.__isAsync?()=>{setTimeout(()=>n())}:()=>{n()}));const a=super.subscribe(i,s,o);return e instanceof r.a&&e.add(a),a}};function kl(){return this._results[Ws()]()}class xl{constructor(){this.dirty=!0,this._results=[],this.changes=new Ml,this.length=0;const e=Ws(),t=xl.prototype;t[e]||(t[e]=kl)}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,t){return this._results.reduce(e,t)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e){this._results=function e(t,n){void 0===n&&(n=t);for(let i=0;i<t.length;i++){let r=t[i];Array.isArray(r)?(n===t&&(n=t.slice(0,i)),e(r,n)):n!==t&&n.push(r)}return n}(e),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]}notifyOnChanges(){this.changes.emit(this)}setDirty(){this.dirty=!0}destroy(){this.changes.complete(),this.changes.unsubscribe()}}class Dl{constructor(e){this.queryList=e,this.matches=null}clone(){return new Dl(this.queryList)}setDirty(){this.queryList.setDirty()}}class Tl{constructor(e=[]){this.queries=e}createEmbeddedView(e){const t=e.queries;if(null!==t){const n=null!==e.contentQueries?e.contentQueries[0]:t.length,i=[];for(let e=0;e<n;e++){const n=t.getByIndex(e);i.push(this.queries[n.indexInDeclarationView].clone())}return new Tl(i)}return null}insertView(e){this.dirtyQueriesWithMatches(e)}detachView(e){this.dirtyQueriesWithMatches(e)}dirtyQueriesWithMatches(e){for(let t=0;t<this.queries.length;t++)null!==Vl(e,t).matches&&this.queries[t].setDirty()}}class Cl{constructor(e,t,n,i=null){this.predicate=e,this.descendants=t,this.isStatic=n,this.read=i}}class Ol{constructor(e=[]){this.queries=e}elementStart(e,t){for(let n=0;n<this.queries.length;n++)this.queries[n].elementStart(e,t)}elementEnd(e){for(let t=0;t<this.queries.length;t++)this.queries[t].elementEnd(e)}embeddedTView(e){let t=null;for(let n=0;n<this.length;n++){const i=null!==t?t.length:0,r=this.getByIndex(n).embeddedTView(e,i);r&&(r.indexInDeclarationView=n,null!==t?t.push(r):t=[r])}return null!==t?new Ol(t):null}template(e,t){for(let n=0;n<this.queries.length;n++)this.queries[n].template(e,t)}getByIndex(e){return this.queries[e]}get length(){return this.queries.length}track(e){this.queries.push(e)}}class Ll{constructor(e,t=-1){this.metadata=e,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=t}elementStart(e,t){this.isApplyingToNode(t)&&this.matchTNode(e,t)}elementEnd(e){this._declarationNodeIndex===e.index&&(this._appliesToNextNode=!1)}template(e,t){this.elementStart(e,t)}embeddedTView(e,t){return this.isApplyingToNode(e)?(this.crossesNgTemplate=!0,this.addMatch(-e.index,t),new Ll(this.metadata)):null}isApplyingToNode(e){if(this._appliesToNextNode&&!1===this.metadata.descendants){const t=this._declarationNodeIndex;let n=e.parent;for(;null!==n&&3===n.type&&n.index!==t;)n=n.parent;return t===(null!==n?n.index:-1)}return this._appliesToNextNode}matchTNode(e,t){const n=this.metadata.predicate;if(Array.isArray(n))for(let i=0;i<n.length;i++){const r=n[i];this.matchTNodeWithReadOption(e,t,Rl(t,r)),this.matchTNodeWithReadOption(e,t,Sn(t,e,r,!1,!1))}else n===Wa?0===t.type&&this.matchTNodeWithReadOption(e,t,-1):this.matchTNodeWithReadOption(e,t,Sn(t,e,n,!1,!1))}matchTNodeWithReadOption(e,t,n){if(null!==n){const i=this.metadata.read;if(null!==i)if(i===ya||i===Ba||i===Wa&&0===t.type)this.addMatch(t.index,-2);else{const n=Sn(t,e,i,!1,!1);null!==n&&this.addMatch(t.index,n)}else this.addMatch(t.index,n)}}addMatch(e,t){null===this.matches?this.matches=[e,t]:this.matches.push(e,t)}}function Rl(e,t){const n=e.localNames;if(null!==n)for(let i=0;i<n.length;i+=2)if(n[i]===t)return n[i+1];return null}function El(e,t,n,i){return-1===n?function(e,t){return 2===e.type||3===e.type?hs(ya,e,t):0===e.type?fs(Wa,ya,e,t):null}(t,e):-2===n?function(e,t,n){return n===ya?hs(ya,t,e):n===Wa?fs(Wa,ya,t,e):n===Ba?ps(Ba,ya,t,e):void 0}(e,t,i):Mn(e,e[1],n,t)}function Al(e,t,n,i){const r=t[19].queries[i];if(null===r.matches){const i=e.data,s=n.matches,o=[];for(let e=0;e<s.length;e+=2){const r=s[e];o.push(r<0?null:El(t,i[r],s[e+1],n.metadata.read))}r.matches=o}return r.matches}function Il(e){const t=pt(),n=mt(),i=Lt();Rt(i+1);const r=Vl(n,i);if(e.dirty&&at(t)===r.metadata.isStatic){if(null===r.matches)e.reset([]);else{const s=r.crossesNgTemplate?function e(t,n,i,r){const s=t.queries.getByIndex(i),o=s.matches;if(null!==o){const a=Al(t,n,s,i);for(let t=0;t<o.length;t+=2){const i=o[t];if(i>0)r.push(a[t/2]);else{const s=o[t+1],a=n[-i];for(let t=Pe;t<a.length;t++){const n=a[t];n[17]===n[3]&&e(n[1],n,s,r)}if(null!==a[9]){const t=a[9];for(let n=0;n<t.length;n++){const i=t[n];e(i[1],i,s,r)}}}}}return r}(n,t,i,[]):Al(n,t,r,i);e.reset(s),e.notifyOnChanges()}return!0}return!1}function Pl(e,t,n){jl(mt(),pt(),e,t,n,!0)}function Nl(e,t,n){jl(mt(),pt(),e,t,n,!1)}function jl(e,t,n,i,r,s){e.firstCreatePass&&(Wl(e,new Cl(n,i,s,r),-1),s&&(e.staticViewQueries=!0)),Hl(e,t)}function Fl(e,t,n,i){zl(mt(),pt(),t,n,i,!1,gt(),e)}function Yl(e,t,n,i){zl(mt(),pt(),t,n,i,!0,gt(),e)}function zl(e,t,n,i,r,s,o,a){e.firstCreatePass&&(Wl(e,new Cl(n,i,s,r),o.index),function(e,t){const n=e.contentQueries||(e.contentQueries=[]);t!==(e.contentQueries.length?n[n.length-1]:-1)&&n.push(e.queries.length-1,t)}(e,a),s&&(e.staticContentQueries=!0)),Hl(e,t)}function $l(){return e=pt(),t=Lt(),e[19].queries[t].queryList;var e,t}function Hl(e,t){const n=new xl;hr(e,t,n,n.destroy),null===t[19]&&(t[19]=new Tl),t[19].queries.push(new Dl(n))}function Wl(e,t,n){null===e.queries&&(e.queries=new Ol),e.queries.track(new Ll(t,n))}function Vl(e,t){return e.queries.getByIndex(t)}function Bl(e,t){return fs(Wa,ya,e,t)}function Ul(e=m.Default){const t=ms(!0);if(null!=t||e&m.Optional)return t;throw new Error("No provider for ChangeDetectorRef!")}const Gl=new U("Application Initializer");let ql=(()=>{class e{constructor(e){this.appInits=e,this.initialized=!1,this.done=!1,this.donePromise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}runInitializers(){if(this.initialized)return;const e=[],t=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let n=0;n<this.appInits.length;n++){const t=this.appInits[n]();bo(t)&&e.push(t)}Promise.all(e).then(()=>{t()}).catch(e=>{this.reject(e)}),0===e.length&&t(),this.initialized=!0}}return e.\u0275fac=function(t){return new(t||e)(ie(Gl,8))},e.\u0275prov=_({token:e,factory:e.\u0275fac}),e})();const Jl=new U("AppId"),Ql={provide:Jl,useFactory:function(){return`${Kl()}${Kl()}${Kl()}`},deps:[]};function Kl(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const Zl=new U("Platform Initializer"),Xl=new U("Platform ID"),eu=new U("appBootstrapListener");let tu=(()=>{class e{log(e){console.log(e)}warn(e){console.warn(e)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=_({token:e,factory:e.\u0275fac}),e})();const nu=new U("LocaleId"),iu=new U("DefaultCurrencyCode");class ru{constructor(e,t){this.ngModuleFactory=e,this.componentFactories=t}}const su=function(e){return new ol(e)},ou=su,au=function(e){return Promise.resolve(su(e))},cu=function(e){const t=su(e),n=un(Ae(e).declarations).reduce((e,t)=>{const n=Re(t);return n&&e.push(new Ka(n)),e},[]);return new ru(t,n)},lu=cu,uu=function(e){return Promise.resolve(cu(e))};let du=(()=>{class e{constructor(){this.compileModuleSync=ou,this.compileModuleAsync=au,this.compileModuleAndAllComponentsSync=lu,this.compileModuleAndAllComponentsAsync=uu}clearCache(){}clearCacheFor(e){}getModuleId(e){}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=_({token:e,factory:e.\u0275fac}),e})();const hu=(()=>Promise.resolve(0))();function fu(e){"undefined"==typeof Zone?hu.then(()=>{e&&e.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",e)}class pu{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:t=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Ml(!1),this.onMicrotaskEmpty=new Ml(!1),this.onStable=new Ml(!1),this.onError=new Ml(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched();const n=this;n._nesting=0,n._outer=n._inner=Zone.current,Zone.wtfZoneSpec&&(n._inner=n._inner.fork(Zone.wtfZoneSpec)),Zone.TaskTrackingZoneSpec&&(n._inner=n._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(n._inner=n._inner.fork(Zone.longStackTraceZoneSpec)),n.shouldCoalesceEventChangeDetection=t,n.lastRequestAnimationFrameId=-1,n.nativeRequestAnimationFrame=function(){let e=F.requestAnimationFrame,t=F.cancelAnimationFrame;if("undefined"!=typeof Zone&&e&&t){const n=e[Zone.__symbol__("OriginalDelegate")];n&&(e=n);const i=t[Zone.__symbol__("OriginalDelegate")];i&&(t=i)}return{nativeRequestAnimationFrame:e,nativeCancelAnimationFrame:t}}().nativeRequestAnimationFrame,function(e){const t=!!e.shouldCoalesceEventChangeDetection&&e.nativeRequestAnimationFrame&&(()=>{!function(e){-1===e.lastRequestAnimationFrameId&&(e.lastRequestAnimationFrameId=e.nativeRequestAnimationFrame.call(F,()=>{e.fakeTopEventTask||(e.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{e.lastRequestAnimationFrameId=-1,_u(e),gu(e)},void 0,()=>{},()=>{})),e.fakeTopEventTask.invoke()}),_u(e))}(e)});e._inner=e._inner.fork({name:"angular",properties:{isAngularZone:!0,maybeDelayChangeDetection:t},onInvokeTask:(n,i,r,s,o,a)=>{try{return yu(e),n.invokeTask(r,s,o,a)}finally{t&&"eventTask"===s.type&&t(),vu(e)}},onInvoke:(t,n,i,r,s,o,a)=>{try{return yu(e),t.invoke(i,r,s,o,a)}finally{vu(e)}},onHasTask:(t,n,i,r)=>{t.hasTask(i,r),n===i&&("microTask"==r.change?(e._hasPendingMicrotasks=r.microTask,_u(e),gu(e)):"macroTask"==r.change&&(e.hasPendingMacrotasks=r.macroTask))},onHandleError:(t,n,i,r)=>(t.handleError(i,r),e.runOutsideAngular(()=>e.onError.emit(r)),!1)})}(n)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!pu.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(pu.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(e,t,n){return this._inner.run(e,t,n)}runTask(e,t,n,i){const r=this._inner,s=r.scheduleEventTask("NgZoneEvent: "+i,e,bu,mu,mu);try{return r.runTask(s,t,n)}finally{r.cancelTask(s)}}runGuarded(e,t,n){return this._inner.runGuarded(e,t,n)}runOutsideAngular(e){return this._outer.run(e)}}function mu(){}const bu={};function gu(e){if(0==e._nesting&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function _u(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||e.shouldCoalesceEventChangeDetection&&-1!==e.lastRequestAnimationFrameId)}function yu(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function vu(e){e._nesting--,gu(e)}class wu{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Ml,this.onMicrotaskEmpty=new Ml,this.onStable=new Ml,this.onError=new Ml}run(e,t,n){return e.apply(t,n)}runGuarded(e,t,n){return e.apply(t,n)}runOutsideAngular(e){return e()}runTask(e,t,n,i){return e.apply(t,n)}}let Su=(()=>{class e{constructor(e){this._ngZone=e,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{pu.assertNotInAngularZone(),fu(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())fu(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(t=>!t.updateCb||!t.updateCb(e)||(clearTimeout(t.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,t,n){let i=-1;t&&t>0&&(i=setTimeout(()=>{this._callbacks=this._callbacks.filter(e=>e.timeoutId!==i),e(this._didWork,this.getPendingTasks())},t)),this._callbacks.push({doneCb:e,timeoutId:i,updateCb:n})}whenStable(e,t,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(e,t,n),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(e,t,n){return[]}}return e.\u0275fac=function(t){return new(t||e)(ie(pu))},e.\u0275prov=_({token:e,factory:e.\u0275fac}),e})(),Mu=(()=>{class e{constructor(){this._applications=new Map,Tu.addToWindow(this)}registerApplication(e,t){this._applications.set(e,t)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,t=!0){return Tu.findTestabilityInTree(this,e,t)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=_({token:e,factory:e.\u0275fac}),e})();class ku{addToWindow(e){}findTestabilityInTree(e,t,n){return null}}function xu(e){Tu=e}let Du,Tu=new ku;const Cu=new U("AllowMultipleToken");class Ou{constructor(e,t){this.name=e,this.token=t}}function Lu(e,t,n=[]){const i="Platform: "+t,r=new U(i);return(t=[])=>{let s=Ru();if(!s||s.injector.get(Cu,!1))if(e)e(n.concat(t).concat({provide:r,useValue:!0}));else{const e=n.concat(t).concat({provide:r,useValue:!0},{provide:ys,useValue:"platform"});!function(e){if(Du&&!Du.destroyed&&!Du.injector.get(Cu,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Du=e.get(Eu);const t=e.get(Zl,null);t&&t.forEach(e=>e())}(As.create({providers:e,name:i}))}return function(e){const t=Ru();if(!t)throw new Error("No platform exists!");if(!t.injector.get(e,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return t}(r)}}function Ru(){return Du&&!Du.destroyed?Du:null}let Eu=(()=>{class e{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,t){const n=function(e,t){let n;return n="noop"===e?new wu:("zone.js"===e?void 0:e)||new pu({enableLongStackTrace:Jn(),shouldCoalesceEventChangeDetection:t}),n}(t?t.ngZone:void 0,t&&t.ngZoneEventCoalescing||!1),i=[{provide:pu,useValue:n}];return n.run(()=>{const t=As.create({providers:i,parent:this.injector,name:e.moduleType.name}),r=e.create(t),s=r.injector.get(En,null);if(!s)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return r.onDestroy(()=>Pu(this._modules,r)),n.runOutsideAngular(()=>n.onError.subscribe({next:e=>{s.handleError(e)}})),function(e,t,n){try{const i=n();return bo(i)?i.catch(n=>{throw t.runOutsideAngular(()=>e.handleError(n)),n}):i}catch(i){throw t.runOutsideAngular(()=>e.handleError(i)),i}}(s,n,()=>{const e=r.injector.get(ql);return e.runInitializers(),e.donePromise.then(()=>(dc(r.injector.get(nu,lc)||lc),this._moduleDoBootstrap(r),r))})})}bootstrapModule(e,t=[]){const n=Au({},t);return function(e,t,n){const i=new ol(n);return Promise.resolve(i)}(0,0,e).then(e=>this.bootstrapModuleFactory(e,n))}_moduleDoBootstrap(e){const t=e.injector.get(Iu);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(e=>t.bootstrap(e));else{if(!e.instance.ngDoBootstrap)throw new Error(`The module ${C(e.instance.constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.`);e.instance.ngDoBootstrap(t)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(e=>e.destroy()),this._destroyListeners.forEach(e=>e()),this._destroyed=!0}get destroyed(){return this._destroyed}}return e.\u0275fac=function(t){return new(t||e)(ie(As))},e.\u0275prov=_({token:e,factory:e.\u0275fac}),e})();function Au(e,t){return Array.isArray(t)?t.reduce(Au,e):Object.assign(Object.assign({},e),t)}let Iu=(()=>{class e{constructor(e,t,n,i,r,c){this._zone=e,this._console=t,this._injector=n,this._exceptionHandler=i,this._componentFactoryResolver=r,this._initStatus=c,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=Jn(),this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const l=new s.a(e=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{e.next(this._stable),e.complete()})}),u=new s.a(e=>{let t;this._zone.runOutsideAngular(()=>{t=this._zone.onStable.subscribe(()=>{pu.assertNotInAngularZone(),fu(()=>{this._stable||this._zone.hasPendingMacrotasks||this._zone.hasPendingMicrotasks||(this._stable=!0,e.next(!0))})})});const n=this._zone.onUnstable.subscribe(()=>{pu.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{e.next(!1)}))});return()=>{t.unsubscribe(),n.unsubscribe()}});this.isStable=Object(o.a)(l,u.pipe(Object(a.a)()))}bootstrap(e,t){if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");let n;n=e instanceof ba?e:this._componentFactoryResolver.resolveComponentFactory(e),this.componentTypes.push(n.componentType);const i=n.isBoundToModule?void 0:this._injector.get(ae),r=n.create(As.NULL,[],t||n.selector,i);r.onDestroy(()=>{this._unloadComponent(r)});const s=r.injector.get(Su,null);return s&&r.injector.get(Mu).registerApplication(r.location.nativeElement,s),this._loadComponent(r),Jn()&&this._console.log("Angular is running in development mode. Call enableProdMode() to enable production mode."),r}tick(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;for(let e of this._views)e.detectChanges();if(this._enforceNoNewChanges)for(let e of this._views)e.checkNoChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const t=e;this._views.push(t),t.attachToAppRef(this)}detachView(e){const t=e;Pu(this._views,t),t.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e),this._injector.get(eu,[]).concat(this._bootstrapListeners).forEach(t=>t(e))}_unloadComponent(e){this.detachView(e.hostView),Pu(this.components,e)}ngOnDestroy(){this._views.slice().forEach(e=>e.destroy())}get viewCount(){return this._views.length}}return e.\u0275fac=function(t){return new(t||e)(ie(pu),ie(tu),ie(As),ie(En),ie(_a),ie(ql))},e.\u0275prov=_({token:e,factory:e.\u0275fac}),e})();function Pu(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Nu{}class ju{}const Fu={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"};let Yu=(()=>{class e{constructor(e,t){this._compiler=e,this._config=t||Fu}load(e){return this.loadAndCompile(e)}loadAndCompile(e){let[t,i]=e.split("#");return void 0===i&&(i="default"),n("zn8P")(t).then(e=>e[i]).then(e=>zu(e,t,i)).then(e=>this._compiler.compileModuleAsync(e))}loadFactory(e){let[t,i]=e.split("#"),r="NgFactory";return void 0===i&&(i="default",r=""),n("zn8P")(this._config.factoryPathPrefix+t+this._config.factoryPathSuffix).then(e=>e[i+r]).then(e=>zu(e,t,i))}}return e.\u0275fac=function(t){return new(t||e)(ie(du),ie(ju,8))},e.\u0275prov=_({token:e,factory:e.\u0275fac}),e})();function zu(e,t,n){if(!e)throw new Error(`Cannot find '${n}' in '${t}'`);return e}const $u=function(e){return null},Hu=Lu(null,"core",[{provide:Xl,useValue:"unknown"},{provide:Eu,deps:[As]},{provide:Mu,deps:[]},{provide:tu,deps:[]}]),Wu=[{provide:Iu,useClass:Iu,deps:[pu,tu,As,En,_a,ql]},{provide:Qa,deps:[pu],useFactory:function(e){let t=[];return e.onStable.subscribe(()=>{for(;t.length;)t.pop()()}),function(e){t.push(e)}}},{provide:ql,useClass:ql,deps:[[new h,Gl]]},{provide:du,useClass:du,deps:[]},Ql,{provide:Fa,useFactory:function(){return $a},deps:[]},{provide:Ya,useFactory:function(){return Ha},deps:[]},{provide:nu,useFactory:function(e){return dc(e=e||"undefined"!=typeof $localize&&$localize.locale||lc),e},deps:[[new d(nu),new h,new p]]},{provide:iu,useValue:"USD"}];let Vu=(()=>{class e{constructor(e){}}return e.\u0275mod=De({type:e}),e.\u0275inj=y({factory:function(t){return new(t||e)(ie(Iu))},providers:Wu}),e})()},"8YOa":function(e,t,n){var i=n("0BK2"),r=n("hh1v"),s=n("UTVS"),o=n("m/L8").f,a=n("kOOl"),c=n("uy83"),l=a("meta"),u=0,d=Object.isExtensible||function(){return!0},h=function(e){o(e,l,{value:{objectID:"O"+ ++u,weakData:{}}})},f=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!r(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,l)){if(!d(e))return"F";if(!t)return"E";h(e)}return e[l].objectID},getWeakData:function(e,t){if(!s(e,l)){if(!d(e))return!0;if(!t)return!1;h(e)}return e[l].weakData},onFreeze:function(e){return c&&f.REQUIRED&&d(e)&&!s(e,l)&&h(e),e}};i[l]=!0},"8mBD":function(e,t,n){!function(e){"use strict";e.defineLocale("pt",{months:"janeiro_fevereiro_mar\xe7o_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"Domingo_Segunda-feira_Ter\xe7a-feira_Quarta-feira_Quinta-feira_Sexta-feira_S\xe1bado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_S\xe1b".split("_"),weekdaysMin:"Do_2\xaa_3\xaa_4\xaa_5\xaa_6\xaa_S\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje \xe0s] LT",nextDay:"[Amanh\xe3 \xe0s] LT",nextWeek:"dddd [\xe0s] LT",lastDay:"[Ontem \xe0s] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[\xdaltimo] dddd [\xe0s] LT":"[\xdaltima] dddd [\xe0s] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"h\xe1 %s",s:"segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",w:"uma semana",ww:"%d semanas",M:"um m\xeas",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}})}(n("wd/R"))},"8xTl":function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("LvDl"),r=n.n(i),s=n("8Y7J");let o=(()=>{class e{transform(e){return r.a.upperFirst(e)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=s.Lb({name:"upperFirst",type:e,pure:!0}),e})()},"9/5/":function(e,t){var n=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,s=/^0o[0-7]+$/i,o=parseInt,a="object"==typeof global&&global&&global.Object===Object&&global,c="object"==typeof self&&self&&self.Object===Object&&self,l=a||c||Function("return this")(),u=Object.prototype.toString,d=Math.max,h=Math.min,f=function(){return l.Date.now()};function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(e))return NaN;if(p(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=p(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var a=r.test(e);return a||s.test(e)?o(e.slice(2),a?2:8):i.test(e)?NaN:+e}e.exports=function(e,t,n){var i,r,s,o,a,c,l=0,u=!1,b=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function _(t){var n=i,s=r;return i=r=void 0,l=t,o=e.apply(s,n)}function y(e){return l=e,a=setTimeout(w,t),u?_(e):o}function v(e){var n=e-c;return void 0===c||n>=t||n<0||b&&e-l>=s}function w(){var e=f();if(v(e))return S(e);a=setTimeout(w,function(e){var n=t-(e-c);return b?h(n,s-(e-l)):n}(e))}function S(e){return a=void 0,g&&i?_(e):(i=r=void 0,o)}function M(){var e=f(),n=v(e);if(i=arguments,r=this,c=e,n){if(void 0===a)return y(c);if(b)return a=setTimeout(w,t),_(c)}return void 0===a&&(a=setTimeout(w,t)),o}return t=m(t)||0,p(n)&&(u=!!n.leading,s=(b="maxWait"in n)?d(m(n.maxWait)||0,t):s,g="trailing"in n?!!n.trailing:g),M.cancel=function(){void 0!==a&&clearTimeout(a),l=0,i=c=r=a=void 0},M.flush=function(){return void 0===a?o:S(f())},M}},"93I0":function(e,t,n){var i=n("VpIT"),r=n("kOOl"),s=i("keys");e.exports=function(e){return s[e]||(s[e]=r(e))}},"9Xeq":function(e,t,n){"use strict";n.d(t,"a",(function(){return T}));var i=n("SVse"),r=n("yT6U"),s=n("iExv"),o=n("4DD9"),a=n("a0VL"),c=n("+0ag"),l=n("85J/"),u=n("IzCI"),d=n("Fgil"),h=n("o4+5"),f=n("nSDx"),p=n("8Y7J");let m=(()=>{class e{transform(e){return encodeURIComponent(e)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=p.Lb({name:"encodeUri",type:e,pure:!0}),e})();var b=n("BQkM"),g=n("uYzU"),_=n("FFMq"),y=n("E2fk"),v=n("TJUb"),w=n("dEH0"),S=n("G1/K"),M=n("TYzs"),k=n("Dwqy"),x=n("efK2"),D=n("8xTl");let T=(()=>{class e{}return e.\u0275mod=p.Kb({type:e}),e.\u0275inj=p.Jb({factory:function(t){return new(t||e)},providers:[r.a,o.a,s.a,i.e,l.a,c.a,d.a,u.a,h.a,k.a,g.a,_.a,y.a,a.a,f.a,m,M.a,b.a,w.a,S.a,D.a,v.a,x.a],imports:[[i.c]]}),e})()},"9d/t":function(e,t,n){var i=n("AO7/"),r=n("xrYK"),s=n("tiKp")("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=i?r:function(e){var t,n,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=Object(e),s))?n:o?r(t):"Object"==(i=r(t))&&"function"==typeof t.callee?"Arguments":i}},"9nlD":function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var i=n("LvDl"),r=n.n(i),s=n("2Vo4"),o=n("XNiG"),a=n("mtw6"),c=n("G1I9"),l=n("a0VL"),u=n("ufoC"),d=n("8Y7J"),h=n("EApP");let f=(()=>{class e{constructor(e,t,n){this.toastr=e,this.taskMessageService=t,this.cdDatePipe=n,this.hideToasties=!1,this.dataSource=new s.a([]),this.data$=this.dataSource.asObservable(),this.sidebarSubject=new o.a,this.queued=[],this.KEY="cdNotifications";const i=localStorage.getItem(this.KEY);let a=[];r.a.isString(i)&&(a=JSON.parse(i,(e,t)=>r.a.isPlainObject(t)?r.a.assign(new c.a,t):t)),this.dataSource.next(a)}removeAll(){localStorage.removeItem(this.KEY),this.dataSource.next([])}remove(e){const t=this.dataSource.getValue();t.splice(e,1),this.dataSource.next(t),localStorage.setItem(this.KEY,JSON.stringify(t))}save(e){const t=this.dataSource.getValue();for(t.push(e),t.sort((e,t)=>e.timestamp>t.timestamp?-1:1);t.length>10;)t.pop();this.dataSource.next(t),localStorage.setItem(this.KEY,JSON.stringify(t))}show(e,t,n,i,s){return window.setTimeout(()=>{let o;o=r.a.isFunction(e)?e():r.a.isObject(e)?e:new c.b(e,t,n,i,s),this.queueToShow(o)},10)}queueToShow(e){this.cancel(this.queuedTimeoutId),this.queued.find(t=>r.a.isEqual(t,e))||this.queued.push(e),this.queuedTimeoutId=window.setTimeout(()=>{this.showQueued()},500)}showQueued(){this.getUnifiedTitleQueue().forEach(e=>{const t=new c.a(e);t.isFinishedTask||this.save(t),this.showToasty(t)})}getUnifiedTitleQueue(){return Object.values(this.queueShiftByTitle()).map(e=>{const t=e[0];return e.length>1&&(t.message="<ul>"+e.map(e=>`<li>${e.message}</li>`).join("")+"</ul>"),t})}queueShiftByTitle(){const e={};let t;for(;t=this.queued.shift();)e[t.title]||(e[t.title]=[]),e[t.title].push(t);return e}showToasty(e){this.hideToasties||this.toastr[["error","info","success"][e.type]]((e.message?e.message+"<br>":"")+this.renderTimeAndApplicationHtml(e),e.title,e.options)}renderTimeAndApplicationHtml(e){return`<small class="date">${this.cdDatePipe.transform(e.timestamp)}</small><i class="float-right custom-icon ${e.applicationClass}" title="${e.application}"></i>`}notifyTask(e,t=!0){const n=this.finishedTaskToNotification(e,t);return n.isFinishedTask=!0,this.show(n)}finishedTaskToNotification(e,t=!0){let n;return n=e.success&&t?new c.b(a.a.success,this.taskMessageService.getSuccessTitle(e)):new c.b(a.a.error,this.taskMessageService.getErrorTitle(e),this.taskMessageService.getErrorMessage(e)),n.isFinishedTask=!0,n}cancel(e){window.clearTimeout(e)}suspendToasties(e){this.hideToasties=e}toggleSidebar(e=!1){this.sidebarSubject.next(e)}}return e.\u0275fac=function(t){return new(t||e)(d.dc(h.b),d.dc(u.a),d.dc(l.a))},e.\u0275prov=d.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},"9ppp":function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const i=(()=>{function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e})()},"9rRi":function(e,t,n){!function(e){"use strict";e.defineLocale("gd",{months:["Am Faoilleach","An Gearran","Am M\xe0rt","An Giblean","An C\xe8itean","An t-\xd2gmhios","An t-Iuchar","An L\xf9nastal","An t-Sultain","An D\xe0mhair","An t-Samhain","An D\xf9bhlachd"],monthsShort:["Faoi","Gear","M\xe0rt","Gibl","C\xe8it","\xd2gmh","Iuch","L\xf9n","Sult","D\xe0mh","Samh","D\xf9bh"],monthsParseExact:!0,weekdays:["Did\xf2mhnaich","Diluain","Dim\xe0irt","Diciadain","Diardaoin","Dihaoine","Disathairne"],weekdaysShort:["Did","Dil","Dim","Dic","Dia","Dih","Dis"],weekdaysMin:["D\xf2","Lu","M\xe0","Ci","Ar","Ha","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-m\xe0ireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-d\xe8 aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"m\xecos",MM:"%d m\xecosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})}(n("wd/R"))},"9xzX":function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var i=n("mrSG"),r=n("IheW"),s=n("LvDl"),o=n.n(s),a=n("2Vo4"),c=n("z6cu"),l=n("LRne"),u=n("vkgz"),d=n("5+tZ"),h=n("XNiG"),f=n("zx2A");class p{constructor(e,t){this.notifier=e,this.source=t}call(e,t){return t.subscribe(new m(e,this.notifier,this.source))}}class m extends f.b{constructor(e,t,n){super(e),this.notifier=t,this.source=n}error(e){if(!this.isStopped){let n=this.errors,i=this.retries,r=this.retriesSubscription;if(i)this.errors=void 0,this.retriesSubscription=void 0;else{n=new h.a;try{const{notifier:e}=this;i=e(n)}catch(t){return super.error(t)}r=Object(f.c)(i,new f.a(this))}this._unsubscribeAndRecycle(),this.errors=n,this.retries=i,this.retriesSubscription=r,n.next(e)}}_unsubscribe(){const{errors:e,retriesSubscription:t}=this;e&&(e.unsubscribe(),this.errors=void 0),t&&(t.unsubscribe(),this.retriesSubscription=void 0),this.retries=void 0}notifyNext(){const{_unsubscribe:e}=this;this._unsubscribe=null,this._unsubscribeAndRecycle(),this._unsubscribe=e,this.source.subscribe(this)}}var b=n("IzEk"),g=n("xTzq"),_=n("8Y7J");let y=(()=>{let e=class{constructor(e){this.http=e,this.url="api/rgw/daemon",this.daemons=new a.a([]),this.daemons$=this.daemons.asObservable(),this.selectedDaemon=new a.a(null),this.selectedDaemon$=this.selectedDaemon.asObservable()}list(){return this.http.get(this.url).pipe(Object(u.a)(e=>{this.daemons.next(e),o.a.isEmpty(this.selectedDaemon.getValue())&&this.selectDefaultDaemon(e)}))}get(e){return this.http.get(`${this.url}/${e}`)}selectDaemon(e){this.selectedDaemon.next(e)}selectDefaultDaemon(e){if(0===e.length)return null;for(const t of e)if(t.default)return this.selectDaemon(t),t;return this.selectDaemon(e[0]),e[0]}request(e){return this.selectedDaemon.pipe(Object(d.a)(e=>o.a.isEmpty(e)?this.list().pipe(Object(d.a)(e=>Object(c.a)(!o.a.isEmpty(e)))):Object(l.a)(e)),(t=e=>e.pipe(Object(d.a)(t=>t?e:Object(c.a)("No RGW daemons found!"))),e=>e.lift(new p(t,e))),Object(b.a)(1),Object(d.a)(t=>{let n=new r.e;return n=n.append("daemon_name",t.id),e(n)}));var t}};return e.\u0275fac=function(t){return new(t||e)(_.dc(r.b))},e.\u0275prov=_.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e=Object(i.b)([g.a,Object(i.d)("design:paramtypes",[r.b])],e),e})()},"A+xa":function(e,t,n){!function(e){"use strict";e.defineLocale("cv",{months:"\u043a\u04d1\u0440\u043b\u0430\u0447_\u043d\u0430\u0440\u04d1\u0441_\u043f\u0443\u0448_\u0430\u043a\u0430_\u043c\u0430\u0439_\u04ab\u04d7\u0440\u0442\u043c\u0435_\u0443\u0442\u04d1_\u04ab\u0443\u0440\u043b\u0430_\u0430\u0432\u04d1\u043d_\u044e\u043f\u0430_\u0447\u04f3\u043a_\u0440\u0430\u0448\u0442\u0430\u0432".split("_"),monthsShort:"\u043a\u04d1\u0440_\u043d\u0430\u0440_\u043f\u0443\u0448_\u0430\u043a\u0430_\u043c\u0430\u0439_\u04ab\u04d7\u0440_\u0443\u0442\u04d1_\u04ab\u0443\u0440_\u0430\u0432\u043d_\u044e\u043f\u0430_\u0447\u04f3\u043a_\u0440\u0430\u0448".split("_"),weekdays:"\u0432\u044b\u0440\u0441\u0430\u0440\u043d\u0438\u043a\u0443\u043d_\u0442\u0443\u043d\u0442\u0438\u043a\u0443\u043d_\u044b\u0442\u043b\u0430\u0440\u0438\u043a\u0443\u043d_\u044e\u043d\u043a\u0443\u043d_\u043a\u04d7\u04ab\u043d\u0435\u0440\u043d\u0438\u043a\u0443\u043d_\u044d\u0440\u043d\u0435\u043a\u0443\u043d_\u0448\u04d1\u043c\u0430\u0442\u043a\u0443\u043d".split("_"),weekdaysShort:"\u0432\u044b\u0440_\u0442\u0443\u043d_\u044b\u0442\u043b_\u044e\u043d_\u043a\u04d7\u04ab_\u044d\u0440\u043d_\u0448\u04d1\u043c".split("_"),weekdaysMin:"\u0432\u0440_\u0442\u043d_\u044b\u0442_\u044e\u043d_\u043a\u04ab_\u044d\u0440_\u0448\u043c".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [\u04ab\u0443\u043b\u0445\u0438] MMMM [\u0443\u0439\u04d1\u0445\u04d7\u043d] D[-\u043c\u04d7\u0448\u04d7]",LLL:"YYYY [\u04ab\u0443\u043b\u0445\u0438] MMMM [\u0443\u0439\u04d1\u0445\u04d7\u043d] D[-\u043c\u04d7\u0448\u04d7], HH:mm",LLLL:"dddd, YYYY [\u04ab\u0443\u043b\u0445\u0438] MMMM [\u0443\u0439\u04d1\u0445\u04d7\u043d] D[-\u043c\u04d7\u0448\u04d7], HH:mm"},calendar:{sameDay:"[\u041f\u0430\u044f\u043d] LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",nextDay:"[\u042b\u0440\u0430\u043d] LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",lastDay:"[\u04d6\u043d\u0435\u0440] LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",nextWeek:"[\u04aa\u0438\u0442\u0435\u0441] dddd LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",lastWeek:"[\u0418\u0440\u0442\u043d\u04d7] dddd LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",sameElse:"L"},relativeTime:{future:function(e){return e+(/\u0441\u0435\u0445\u0435\u0442$/i.exec(e)?"\u0440\u0435\u043d":/\u04ab\u0443\u043b$/i.exec(e)?"\u0442\u0430\u043d":"\u0440\u0430\u043d")},past:"%s \u043a\u0430\u044f\u043b\u043b\u0430",s:"\u043f\u04d7\u0440-\u0438\u043a \u04ab\u0435\u043a\u043a\u0443\u043d\u0442",ss:"%d \u04ab\u0435\u043a\u043a\u0443\u043d\u0442",m:"\u043f\u04d7\u0440 \u043c\u0438\u043d\u0443\u0442",mm:"%d \u043c\u0438\u043d\u0443\u0442",h:"\u043f\u04d7\u0440 \u0441\u0435\u0445\u0435\u0442",hh:"%d \u0441\u0435\u0445\u0435\u0442",d:"\u043f\u04d7\u0440 \u043a\u0443\u043d",dd:"%d \u043a\u0443\u043d",M:"\u043f\u04d7\u0440 \u0443\u0439\u04d1\u0445",MM:"%d \u0443\u0439\u04d1\u0445",y:"\u043f\u04d7\u0440 \u04ab\u0443\u043b",yy:"%d \u04ab\u0443\u043b"},dayOfMonthOrdinalParse:/\d{1,2}-\u043c\u04d7\u0448/,ordinal:"%d-\u043c\u04d7\u0448",week:{dow:1,doy:7}})}(n("wd/R"))},A2ZE:function(e,t,n){var i=n("HAuM");e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,r){return e.call(t,n,i,r)}}return function(){return e.apply(t,arguments)}}},ANnk:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("aexS"),r=n("f/UV"),s=n("8Y7J");let o=(()=>{class e{constructor(e,t,n){this.formScope=e,this.authStorageService=t,this.elementRef=n}ngAfterViewInit(){var e,t,n;this.permissions=this.authStorageService.getPermissions();const i=null===(e=this.formScope)||void 0===e?void 0:e.cdFormScope;i&&!(null===(n=null===(t=this.permissions)||void 0===t?void 0:t[i])||void 0===n?void 0:n.update)&&(this.elementRef.nativeElement.disabled=!0)}}return e.\u0275fac=function(t){return new(t||e)(s.Mb(r.a,8),s.Mb(i.a),s.Mb(s.m))},e.\u0275dir=s.Hb({type:e,selectors:[["input",3,"cdNoFormInputDisable",""],["select",3,"cdNoFormInputDisable",""],["button",3,"cdNoFormInputDisable",""],["","cdFormInputDisable",""]]}),e})()},"AO7/":function(e,t,n){var i={};i[n("tiKp")("toStringTag")]="z",e.exports="[object z]"===String(i)},AQ68:function(e,t,n){!function(e){"use strict";e.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}})}(n("wd/R"))},Avrn:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("aexS"),r=n("8Y7J"),s=n("iInd");let o=(()=>{class e{constructor(e,t){this.router=e,this.authStorageService=t}canActivate(e,t){return!!this.authStorageService.isLoggedIn()||(this.router.navigate(["/login"],{queryParams:{returnUrl:t.url}}),!1)}canActivateChild(e,t){return this.canActivate(e,t)}}return e.\u0275fac=function(t){return new(t||e)(r.dc(s.e),r.dc(i.a))},e.\u0275prov=r.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},AvvY:function(e,t,n){!function(e){"use strict";e.defineLocale("ml",{months:"\u0d1c\u0d28\u0d41\u0d35\u0d30\u0d3f_\u0d2b\u0d46\u0d2c\u0d4d\u0d30\u0d41\u0d35\u0d30\u0d3f_\u0d2e\u0d3e\u0d7c\u0d1a\u0d4d\u0d1a\u0d4d_\u0d0f\u0d2a\u0d4d\u0d30\u0d3f\u0d7d_\u0d2e\u0d47\u0d2f\u0d4d_\u0d1c\u0d42\u0d7a_\u0d1c\u0d42\u0d32\u0d48_\u0d13\u0d17\u0d38\u0d4d\u0d31\u0d4d\u0d31\u0d4d_\u0d38\u0d46\u0d2a\u0d4d\u0d31\u0d4d\u0d31\u0d02\u0d2c\u0d7c_\u0d12\u0d15\u0d4d\u0d1f\u0d4b\u0d2c\u0d7c_\u0d28\u0d35\u0d02\u0d2c\u0d7c_\u0d21\u0d3f\u0d38\u0d02\u0d2c\u0d7c".split("_"),monthsShort:"\u0d1c\u0d28\u0d41._\u0d2b\u0d46\u0d2c\u0d4d\u0d30\u0d41._\u0d2e\u0d3e\u0d7c._\u0d0f\u0d2a\u0d4d\u0d30\u0d3f._\u0d2e\u0d47\u0d2f\u0d4d_\u0d1c\u0d42\u0d7a_\u0d1c\u0d42\u0d32\u0d48._\u0d13\u0d17._\u0d38\u0d46\u0d2a\u0d4d\u0d31\u0d4d\u0d31._\u0d12\u0d15\u0d4d\u0d1f\u0d4b._\u0d28\u0d35\u0d02._\u0d21\u0d3f\u0d38\u0d02.".split("_"),monthsParseExact:!0,weekdays:"\u0d1e\u0d3e\u0d2f\u0d31\u0d3e\u0d34\u0d4d\u0d1a_\u0d24\u0d3f\u0d19\u0d4d\u0d15\u0d33\u0d3e\u0d34\u0d4d\u0d1a_\u0d1a\u0d4a\u0d35\u0d4d\u0d35\u0d3e\u0d34\u0d4d\u0d1a_\u0d2c\u0d41\u0d27\u0d28\u0d3e\u0d34\u0d4d\u0d1a_\u0d35\u0d4d\u0d2f\u0d3e\u0d34\u0d3e\u0d34\u0d4d\u0d1a_\u0d35\u0d46\u0d33\u0d4d\u0d33\u0d3f\u0d2f\u0d3e\u0d34\u0d4d\u0d1a_\u0d36\u0d28\u0d3f\u0d2f\u0d3e\u0d34\u0d4d\u0d1a".split("_"),weekdaysShort:"\u0d1e\u0d3e\u0d2f\u0d7c_\u0d24\u0d3f\u0d19\u0d4d\u0d15\u0d7e_\u0d1a\u0d4a\u0d35\u0d4d\u0d35_\u0d2c\u0d41\u0d27\u0d7b_\u0d35\u0d4d\u0d2f\u0d3e\u0d34\u0d02_\u0d35\u0d46\u0d33\u0d4d\u0d33\u0d3f_\u0d36\u0d28\u0d3f".split("_"),weekdaysMin:"\u0d1e\u0d3e_\u0d24\u0d3f_\u0d1a\u0d4a_\u0d2c\u0d41_\u0d35\u0d4d\u0d2f\u0d3e_\u0d35\u0d46_\u0d36".split("_"),longDateFormat:{LT:"A h:mm -\u0d28\u0d41",LTS:"A h:mm:ss -\u0d28\u0d41",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -\u0d28\u0d41",LLLL:"dddd, D MMMM YYYY, A h:mm -\u0d28\u0d41"},calendar:{sameDay:"[\u0d07\u0d28\u0d4d\u0d28\u0d4d] LT",nextDay:"[\u0d28\u0d3e\u0d33\u0d46] LT",nextWeek:"dddd, LT",lastDay:"[\u0d07\u0d28\u0d4d\u0d28\u0d32\u0d46] LT",lastWeek:"[\u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d4d",past:"%s \u0d2e\u0d41\u0d7b\u0d2a\u0d4d",s:"\u0d05\u0d7d\u0d2a \u0d28\u0d3f\u0d2e\u0d3f\u0d37\u0d19\u0d4d\u0d19\u0d7e",ss:"%d \u0d38\u0d46\u0d15\u0d4d\u0d15\u0d7b\u0d21\u0d4d",m:"\u0d12\u0d30\u0d41 \u0d2e\u0d3f\u0d28\u0d3f\u0d31\u0d4d\u0d31\u0d4d",mm:"%d \u0d2e\u0d3f\u0d28\u0d3f\u0d31\u0d4d\u0d31\u0d4d",h:"\u0d12\u0d30\u0d41 \u0d2e\u0d23\u0d3f\u0d15\u0d4d\u0d15\u0d42\u0d7c",hh:"%d \u0d2e\u0d23\u0d3f\u0d15\u0d4d\u0d15\u0d42\u0d7c",d:"\u0d12\u0d30\u0d41 \u0d26\u0d3f\u0d35\u0d38\u0d02",dd:"%d \u0d26\u0d3f\u0d35\u0d38\u0d02",M:"\u0d12\u0d30\u0d41 \u0d2e\u0d3e\u0d38\u0d02",MM:"%d \u0d2e\u0d3e\u0d38\u0d02",y:"\u0d12\u0d30\u0d41 \u0d35\u0d7c\u0d37\u0d02",yy:"%d \u0d35\u0d7c\u0d37\u0d02"},meridiemParse:/\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f|\u0d30\u0d3e\u0d35\u0d3f\u0d32\u0d46|\u0d09\u0d1a\u0d4d\u0d1a \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d4d|\u0d35\u0d48\u0d15\u0d41\u0d28\u0d4d\u0d28\u0d47\u0d30\u0d02|\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f/i,meridiemHour:function(e,t){return 12===e&&(e=0),"\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f"===t&&e>=4||"\u0d09\u0d1a\u0d4d\u0d1a \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d4d"===t||"\u0d35\u0d48\u0d15\u0d41\u0d28\u0d4d\u0d28\u0d47\u0d30\u0d02"===t?e+12:e},meridiem:function(e,t,n){return e<4?"\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f":e<12?"\u0d30\u0d3e\u0d35\u0d3f\u0d32\u0d46":e<17?"\u0d09\u0d1a\u0d4d\u0d1a \u0d15\u0d34\u0d3f\u0d1e\u0d4d\u0d1e\u0d4d":e<20?"\u0d35\u0d48\u0d15\u0d41\u0d28\u0d4d\u0d28\u0d47\u0d30\u0d02":"\u0d30\u0d3e\u0d24\u0d4d\u0d30\u0d3f"}})}(n("wd/R"))},AxL3:function(e,t){var n=!("undefined"==typeof window||!window.document||!window.document.createElement);e.exports=n},AytR:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const i={default_lang:"en-US",production:!0,year:"2021"}},B55N:function(e,t,n){!function(e){"use strict";e.defineLocale("ja",{eras:[{since:"2019-05-01",offset:1,name:"\u4ee4\u548c",narrow:"\u32ff",abbr:"R"},{since:"1989-01-08",until:"2019-04-30",offset:1,name:"\u5e73\u6210",narrow:"\u337b",abbr:"H"},{since:"1926-12-25",until:"1989-01-07",offset:1,name:"\u662d\u548c",narrow:"\u337c",abbr:"S"},{since:"1912-07-30",until:"1926-12-24",offset:1,name:"\u5927\u6b63",narrow:"\u337d",abbr:"T"},{since:"1873-01-01",until:"1912-07-29",offset:6,name:"\u660e\u6cbb",narrow:"\u337e",abbr:"M"},{since:"0001-01-01",until:"1873-12-31",offset:1,name:"\u897f\u66a6",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"\u7d00\u5143\u524d",narrow:"BC",abbr:"BC"}],eraYearOrdinalRegex:/(\u5143|\d+)\u5e74/,eraYearOrdinalParse:function(e,t){return"\u5143"===t[1]?1:parseInt(t[1]||e,10)},months:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u65e5\u66dc\u65e5_\u6708\u66dc\u65e5_\u706b\u66dc\u65e5_\u6c34\u66dc\u65e5_\u6728\u66dc\u65e5_\u91d1\u66dc\u65e5_\u571f\u66dc\u65e5".split("_"),weekdaysShort:"\u65e5_\u6708_\u706b_\u6c34_\u6728_\u91d1_\u571f".split("_"),weekdaysMin:"\u65e5_\u6708_\u706b_\u6c34_\u6728_\u91d1_\u571f".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5 HH:mm",LLLL:"YYYY\u5e74M\u6708D\u65e5 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5(ddd) HH:mm"},meridiemParse:/\u5348\u524d|\u5348\u5f8c/i,isPM:function(e){return"\u5348\u5f8c"===e},meridiem:function(e,t,n){return e<12?"\u5348\u524d":"\u5348\u5f8c"},calendar:{sameDay:"[\u4eca\u65e5] LT",nextDay:"[\u660e\u65e5] LT",nextWeek:function(e){return e.week()!==this.week()?"[\u6765\u9031]dddd LT":"dddd LT"},lastDay:"[\u6628\u65e5] LT",lastWeek:function(e){return this.week()!==e.week()?"[\u5148\u9031]dddd LT":"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}\u65e5/,ordinal:function(e,t){switch(t){case"y":return 1===e?"\u5143\u5e74":e+"\u5e74";case"d":case"D":case"DDD":return e+"\u65e5";default:return e}},relativeTime:{future:"%s\u5f8c",past:"%s\u524d",s:"\u6570\u79d2",ss:"%d\u79d2",m:"1\u5206",mm:"%d\u5206",h:"1\u6642\u9593",hh:"%d\u6642\u9593",d:"1\u65e5",dd:"%d\u65e5",M:"1\u30f6\u6708",MM:"%d\u30f6\u6708",y:"1\u5e74",yy:"%d\u5e74"}})}(n("wd/R"))},BFxc:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("7o/Q"),r=n("4I5i"),s=n("EY2u");function o(e){return function(t){return 0===e?Object(s.b)():t.lift(new a(e))}}class a{constructor(e){if(this.total=e,this.total<0)throw new r.a}call(e,t){return t.subscribe(new c(e,this.total))}}class c extends i.a{constructor(e,t){super(e),this.total=t,this.ring=new Array,this.count=0}_next(e){const t=this.ring,n=this.total,i=this.count++;t.length<n?t.push(e):t[i%n]=e}_complete(){const e=this.destination;let t=this.count;if(t>0){const n=this.count>=this.total?this.total:this.count,i=this.ring;for(let r=0;r<n;r++){const r=t++%n;e.next(i[r])}}e.complete()}}},BQkM:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("8Y7J");let r=(()=>{class e{transform(e){return e+" IOPS"}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"iops",type:e,pure:!0}),e})()},BVg3:function(e,t,n){!function(e){"use strict";function t(e){return e%100==11||e%10!=1}function n(e,n,i,r){var s=e+" ";switch(i){case"s":return n||r?"nokkrar sek\xfandur":"nokkrum sek\xfandum";case"ss":return t(e)?s+(n||r?"sek\xfandur":"sek\xfandum"):s+"sek\xfanda";case"m":return n?"m\xedn\xfata":"m\xedn\xfatu";case"mm":return t(e)?s+(n||r?"m\xedn\xfatur":"m\xedn\xfatum"):n?s+"m\xedn\xfata":s+"m\xedn\xfatu";case"hh":return t(e)?s+(n||r?"klukkustundir":"klukkustundum"):s+"klukkustund";case"d":return n?"dagur":r?"dag":"degi";case"dd":return t(e)?n?s+"dagar":s+(r?"daga":"d\xf6gum"):n?s+"dagur":s+(r?"dag":"degi");case"M":return n?"m\xe1nu\xf0ur":r?"m\xe1nu\xf0":"m\xe1nu\xf0i";case"MM":return t(e)?n?s+"m\xe1nu\xf0ir":s+(r?"m\xe1nu\xf0i":"m\xe1nu\xf0um"):n?s+"m\xe1nu\xf0ur":s+(r?"m\xe1nu\xf0":"m\xe1nu\xf0i");case"y":return n||r?"\xe1r":"\xe1ri";case"yy":return t(e)?s+(n||r?"\xe1r":"\xe1rum"):s+(n||r?"\xe1r":"\xe1ri")}}e.defineLocale("is",{months:"jan\xfaar_febr\xfaar_mars_apr\xedl_ma\xed_j\xfan\xed_j\xfal\xed_\xe1g\xfast_september_okt\xf3ber_n\xf3vember_desember".split("_"),monthsShort:"jan_feb_mar_apr_ma\xed_j\xfan_j\xfal_\xe1g\xfa_sep_okt_n\xf3v_des".split("_"),weekdays:"sunnudagur_m\xe1nudagur_\xferi\xf0judagur_mi\xf0vikudagur_fimmtudagur_f\xf6studagur_laugardagur".split("_"),weekdaysShort:"sun_m\xe1n_\xferi_mi\xf0_fim_f\xf6s_lau".split("_"),weekdaysMin:"Su_M\xe1_\xder_Mi_Fi_F\xf6_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[\xed dag kl.] LT",nextDay:"[\xe1 morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[\xed g\xe6r kl.] LT",lastWeek:"[s\xed\xf0asta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s s\xed\xf0an",s:n,ss:n,m:n,mm:n,h:"klukkustund",hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},Bs8V:function(e,t,n){var i=n("g6v/"),r=n("0eef"),s=n("XGwC"),o=n("/GqU"),a=n("wE6v"),c=n("UTVS"),l=n("DPsx"),u=Object.getOwnPropertyDescriptor;t.f=i?u:function(e,t){if(e=o(e),t=a(t,!0),l)try{return u(e,t)}catch(n){}if(c(e,t))return s(!r.f.call(e,t),e[t])}},ByF4:function(e,t,n){!function(e){"use strict";e.defineLocale("fo",{months:"januar_februar_mars_apr\xedl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_m\xe1nadagur_t\xfdsdagur_mikudagur_h\xf3sdagur_fr\xedggjadagur_leygardagur".split("_"),weekdaysShort:"sun_m\xe1n_t\xfds_mik_h\xf3s_fr\xed_ley".split("_"),weekdaysMin:"su_m\xe1_t\xfd_mi_h\xf3_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[\xcd dag kl.] LT",nextDay:"[\xcd morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[\xcd gj\xe1r kl.] LT",lastWeek:"[s\xed\xf0stu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s s\xed\xf0ani",s:"f\xe1 sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein t\xedmi",hh:"%d t\xedmar",d:"ein dagur",dd:"%d dagar",M:"ein m\xe1na\xf0ur",MM:"%d m\xe1na\xf0ir",y:"eitt \xe1r",yy:"%d \xe1r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},Cfvw:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var i=n("HDdC"),r=n("SeVD"),s=n("quSY"),o=n("kJWO"),a=n("jZKg"),c=n("Lhse"),l=n("c2HN"),u=n("I55L");function d(e,t){return t?function(e,t){if(null!=e){if(function(e){return e&&"function"==typeof e[o.a]}(e))return function(e,t){return new i.a(n=>{const i=new s.a;return i.add(t.schedule(()=>{const r=e[o.a]();i.add(r.subscribe({next(e){i.add(t.schedule(()=>n.next(e)))},error(e){i.add(t.schedule(()=>n.error(e)))},complete(){i.add(t.schedule(()=>n.complete()))}}))})),i})}(e,t);if(Object(l.a)(e))return function(e,t){return new i.a(n=>{const i=new s.a;return i.add(t.schedule(()=>e.then(e=>{i.add(t.schedule(()=>{n.next(e),i.add(t.schedule(()=>n.complete()))}))},e=>{i.add(t.schedule(()=>n.error(e)))}))),i})}(e,t);if(Object(u.a)(e))return Object(a.a)(e,t);if(function(e){return e&&"function"==typeof e[c.a]}(e)||"string"==typeof e)return function(e,t){if(!e)throw new Error("Iterable cannot be null");return new i.a(n=>{const i=new s.a;let r;return i.add(()=>{r&&"function"==typeof r.return&&r.return()}),i.add(t.schedule(()=>{r=e[c.a](),i.add(t.schedule((function(){if(n.closed)return;let e,t;try{const n=r.next();e=n.value,t=n.done}catch(i){return void n.error(i)}t?n.complete():(n.next(e),this.schedule())})))})),i})}(e,t)}throw new TypeError((null!==e&&typeof e||e)+" is not observable")}(e,t):e instanceof i.a?e:new i.a(Object(r.a)(e))}},ChqD:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var i=n("SVse"),r=n("s7LF"),s=n("iInd"),o=n("G0yt"),a=n("w9WL"),c=n("zWsK"),l=n("V/fk"),u=n("9Xeq"),d=n("8Y7J");let h=(()=>{class e{}return e.\u0275mod=d.Kb({type:e}),e.\u0275inj=d.Jb({factory:function(t){return new(t||e)},imports:[[i.c,a.h,c.a,r.m,o.l,o.F,u.a,l.a,s.i],a.h]}),e})()},CjzT:function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),i=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],r=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,i){return e?/-MMM-/.test(i)?n[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"domingo_lunes_martes_mi\xe9rcoles_jueves_viernes_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xe9._jue._vie._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[ma\xf1ana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un d\xeda",dd:"%d d\xedas",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un a\xf1o",yy:"%d a\xf1os"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}})}(n("wd/R"))},CoRJ:function(e,t,n){!function(e){"use strict";e.defineLocale("ar-ma",{months:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),monthsShort:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0627\u062d\u062f_\u0627\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:1,doy:4}})}(n("wd/R"))},CqXF:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("7o/Q");function r(e){return t=>t.lift(new s(e))}class s{constructor(e){this.value=e}call(e,t){return t.subscribe(new o(e,this.value))}}class o extends i.a{constructor(e,t){super(e),this.value=t}_next(e){this.destination.next(this.value)}}},"D/JM":function(e,t,n){!function(e){"use strict";e.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",ss:"%d segundo",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n("wd/R"))},D0XW:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return s}));var i=n("3N8a");const r=new(n("IjjT").a)(i.a),s=r},D4zM:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("8Y7J");let r=(()=>{class e{constructor(e,t){this.elementRef=e,this.renderer=t}ngOnInit(){this.renderer.setAttribute(this.elementRef.nativeElement,"tabindex","-1"),this.iElement=this.renderer.createElement("i"),this.renderer.addClass(this.iElement,"fa"),this.renderer.appendChild(this.elementRef.nativeElement,this.iElement),this.update()}getInputElement(){return document.getElementById(this.cdPasswordButton)}update(){const e=this.getInputElement();e&&"text"===e.type?(this.renderer.removeClass(this.iElement,"fa-eye"),this.renderer.addClass(this.iElement,"fa-eye-slash")):(this.renderer.removeClass(this.iElement,"fa-eye-slash"),this.renderer.addClass(this.iElement,"fa-eye"))}onClick(){const e=this.getInputElement();e.type="password"===e.type?"text":"password",this.update()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(i.E))},e.\u0275dir=i.Hb({type:e,selectors:[["","cdPasswordButton",""]],hostBindings:function(e,t){1&e&&i.gc("click",(function(){return t.onClick()}))},inputs:{cdPasswordButton:"cdPasswordButton"}}),e})()},DH7j:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const i=(()=>Array.isArray||(e=>e&&"number"==typeof e.length))()},"DKr+":function(e,t,n){!function(e){"use strict";function t(e,t,n,i){var r={s:["thoddea sekondamni","thodde sekond"],ss:[e+" sekondamni",e+" sekond"],m:["eka mintan","ek minut"],mm:[e+" mintamni",e+" mintam"],h:["eka voran","ek vor"],hh:[e+" voramni",e+" voram"],d:["eka disan","ek dis"],dd:[e+" disamni",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineamni",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsamni",e+" vorsam"]};return i?r[n][0]:r[n][1]}e.defineLocale("gom-latn",{months:{standalone:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),format:"Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Fuddlo] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fattlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,t){switch(t){case"D":return e+"er";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:0,doy:3},meridiemParse:/rati|sokallim|donparam|sanje/,meridiemHour:function(e,t){return 12===e&&(e=0),"rati"===t?e<4?e:e+12:"sokallim"===t?e:"donparam"===t?e>12?e:e+12:"sanje"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"rati":e<12?"sokallim":e<16?"donparam":e<20?"sanje":"rati"}})}(n("wd/R"))},DNAf:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("LvDl"),r=n.n(i);class s{constructor(e){this.customValidations={},this.empty="No items selected.",this.selectionLimit={tooltip:"Deselect item to select again",text:"Selection limit reached"},this.filter="Filter tags",this.add="Add badge",this.noOptions="There are no items available.",r.a.merge(this,e)}}},DPsx:function(e,t,n){var i=n("g6v/"),r=n("0Dky"),s=n("zBJ4");e.exports=!i&&!r((function(){return 7!=Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a}))},DSvg:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i=n("vkgz"),r=n("aexS"),s=n("8Y7J"),o=n("IheW"),a=n("iInd");let c=(()=>{class e{constructor(e,t,n){this.authStorageService=e,this.http=t,this.router=n}check(e){return this.http.post("api/auth/check",{token:e})}login(e){return this.http.post("api/auth",e).pipe(Object(i.a)(e=>{this.authStorageService.set(e.username,e.permissions,e.sso,e.pwdExpirationDate,e.pwdUpdateRequired)}))}logout(e=null){return this.http.post("api/auth/logout",null).subscribe(t=>{this.authStorageService.remove(),this.router.navigate(["/login"],{skipLocationChange:!0}),e&&e(),window.location.replace(t.redirect_url)})}}return e.\u0275fac=function(t){return new(t||e)(s.dc(r.a),s.dc(o.b),s.dc(a.e))},e.\u0275prov=s.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},Dkky:function(e,t,n){!function(e){"use strict";e.defineLocale("fr-ch",{months:"janvier_f\xe9vrier_mars_avril_mai_juin_juillet_ao\xfbt_septembre_octobre_novembre_d\xe9cembre".split("_"),monthsShort:"janv._f\xe9vr._mars_avr._mai_juin_juil._ao\xfbt_sept._oct._nov._d\xe9c.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd\u2019hui \xe0] LT",nextDay:"[Demain \xe0] LT",nextWeek:"dddd [\xe0] LT",lastDay:"[Hier \xe0] LT",lastWeek:"dddd [dernier \xe0] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})}(n("wd/R"))},Dmvi:function(e,t,n){!function(e){"use strict";e.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:0,doy:4}})}(n("wd/R"))},DoHr:function(e,t,n){!function(e){"use strict";var t={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'\xfcnc\xfc",4:"'\xfcnc\xfc",100:"'\xfcnc\xfc",6:"'nc\u0131",9:"'uncu",10:"'uncu",30:"'uncu",60:"'\u0131nc\u0131",90:"'\u0131nc\u0131"};e.defineLocale("tr",{months:"Ocak_\u015eubat_Mart_Nisan_May\u0131s_Haziran_Temmuz_A\u011fustos_Eyl\xfcl_Ekim_Kas\u0131m_Aral\u0131k".split("_"),monthsShort:"Oca_\u015eub_Mar_Nis_May_Haz_Tem_A\u011fu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Sal\u0131_\xc7ar\u015famba_Per\u015fembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_\xc7ar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_\xc7a_Pe_Cu_Ct".split("_"),meridiem:function(e,t,n){return e<12?n?"\xf6\xf6":"\xd6\xd6":n?"\xf6s":"\xd6S"},meridiemParse:/\xf6\xf6|\xd6\xd6|\xf6s|\xd6S/,isPM:function(e){return"\xf6s"===e||"\xd6S"===e},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bug\xfcn saat] LT",nextDay:"[yar\u0131n saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[d\xfcn] LT",lastWeek:"[ge\xe7en] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s \xf6nce",s:"birka\xe7 saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir g\xfcn",dd:"%d g\xfcn",w:"bir hafta",ww:"%d hafta",M:"bir ay",MM:"%d ay",y:"bir y\u0131l",yy:"%d y\u0131l"},ordinal:function(e,n){switch(n){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'\u0131nc\u0131";var i=e%10;return e+(t[i]||t[e%100-i]||t[e>=100?100:null])}},week:{dow:1,doy:7}})}(n("wd/R"))},Dwqy:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i=n("LvDl"),r=n.n(i),s=n("wd/R"),o=n.n(s),a=n("8Y7J");o.a.updateLocale("en",{relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"}});let c=(()=>{class e{transform(e,t=!0){let n;if(n=r.a.isNumber(e)?o.a.unix(e):o()(e),!n.isValid())return"";let i=n.fromNow();return t&&(i=r.a.upperFirst(i)),i}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=a.Lb({name:"relativeDate",type:e,pure:!1}),e})()},DxQv:function(e,t,n){!function(e){"use strict";e.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"s\xf8ndag_mandag_tirsdag_onsdag_torsdag_fredag_l\xf8rdag".split("_"),weekdaysShort:"s\xf8n_man_tir_ons_tor_fre_l\xf8r".split("_"),weekdaysMin:"s\xf8_ma_ti_on_to_fr_l\xf8".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"p\xe5 dddd [kl.] LT",lastDay:"[i g\xe5r kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"f\xe5 sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en m\xe5ned",MM:"%d m\xe5neder",y:"et \xe5r",yy:"%d \xe5r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},Dzi0:function(e,t,n){!function(e){"use strict";e.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n("wd/R"))},"E+lV":function(e,t,n){!function(e){"use strict";var t={words:{ss:["\u0441\u0435\u043a\u0443\u043d\u0434\u0430","\u0441\u0435\u043a\u0443\u043d\u0434\u0435","\u0441\u0435\u043a\u0443\u043d\u0434\u0438"],m:["\u0458\u0435\u0434\u0430\u043d \u043c\u0438\u043d\u0443\u0442","\u0458\u0435\u0434\u043d\u0435 \u043c\u0438\u043d\u0443\u0442\u0435"],mm:["\u043c\u0438\u043d\u0443\u0442","\u043c\u0438\u043d\u0443\u0442\u0435","\u043c\u0438\u043d\u0443\u0442\u0430"],h:["\u0458\u0435\u0434\u0430\u043d \u0441\u0430\u0442","\u0458\u0435\u0434\u043d\u043e\u0433 \u0441\u0430\u0442\u0430"],hh:["\u0441\u0430\u0442","\u0441\u0430\u0442\u0430","\u0441\u0430\u0442\u0438"],dd:["\u0434\u0430\u043d","\u0434\u0430\u043d\u0430","\u0434\u0430\u043d\u0430"],MM:["\u043c\u0435\u0441\u0435\u0446","\u043c\u0435\u0441\u0435\u0446\u0430","\u043c\u0435\u0441\u0435\u0446\u0438"],yy:["\u0433\u043e\u0434\u0438\u043d\u0430","\u0433\u043e\u0434\u0438\u043d\u0435","\u0433\u043e\u0434\u0438\u043d\u0430"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,i){var r=t.words[i];return 1===i.length?n?r[0]:r[1]:e+" "+t.correctGrammaticalCase(e,r)}};e.defineLocale("sr-cyrl",{months:"\u0458\u0430\u043d\u0443\u0430\u0440_\u0444\u0435\u0431\u0440\u0443\u0430\u0440_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0438\u043b_\u043c\u0430\u0458_\u0458\u0443\u043d_\u0458\u0443\u043b_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440_\u043e\u043a\u0442\u043e\u0431\u0430\u0440_\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440_\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440".split("_"),monthsShort:"\u0458\u0430\u043d._\u0444\u0435\u0431._\u043c\u0430\u0440._\u0430\u043f\u0440._\u043c\u0430\u0458_\u0458\u0443\u043d_\u0458\u0443\u043b_\u0430\u0432\u0433._\u0441\u0435\u043f._\u043e\u043a\u0442._\u043d\u043e\u0432._\u0434\u0435\u0446.".split("_"),monthsParseExact:!0,weekdays:"\u043d\u0435\u0434\u0435\u0459\u0430_\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u0430\u043a_\u0443\u0442\u043e\u0440\u0430\u043a_\u0441\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043a_\u043f\u0435\u0442\u0430\u043a_\u0441\u0443\u0431\u043e\u0442\u0430".split("_"),weekdaysShort:"\u043d\u0435\u0434._\u043f\u043e\u043d._\u0443\u0442\u043e._\u0441\u0440\u0435._\u0447\u0435\u0442._\u043f\u0435\u0442._\u0441\u0443\u0431.".split("_"),weekdaysMin:"\u043d\u0435_\u043f\u043e_\u0443\u0442_\u0441\u0440_\u0447\u0435_\u043f\u0435_\u0441\u0443".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[\u0434\u0430\u043d\u0430\u0441 \u0443] LT",nextDay:"[\u0441\u0443\u0442\u0440\u0430 \u0443] LT",nextWeek:function(){switch(this.day()){case 0:return"[\u0443] [\u043d\u0435\u0434\u0435\u0459\u0443] [\u0443] LT";case 3:return"[\u0443] [\u0441\u0440\u0435\u0434\u0443] [\u0443] LT";case 6:return"[\u0443] [\u0441\u0443\u0431\u043e\u0442\u0443] [\u0443] LT";case 1:case 2:case 4:case 5:return"[\u0443] dddd [\u0443] LT"}},lastDay:"[\u0458\u0443\u0447\u0435 \u0443] LT",lastWeek:function(){return["[\u043f\u0440\u043e\u0448\u043b\u0435] [\u043d\u0435\u0434\u0435\u0459\u0435] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u043e\u0433] [\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u043a\u0430] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u043e\u0433] [\u0443\u0442\u043e\u0440\u043a\u0430] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u0435] [\u0441\u0440\u0435\u0434\u0435] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u043e\u0433] [\u0447\u0435\u0442\u0432\u0440\u0442\u043a\u0430] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u043e\u0433] [\u043f\u0435\u0442\u043a\u0430] [\u0443] LT","[\u043f\u0440\u043e\u0448\u043b\u0435] [\u0441\u0443\u0431\u043e\u0442\u0435] [\u0443] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"\u0437\u0430 %s",past:"\u043f\u0440\u0435 %s",s:"\u043d\u0435\u043a\u043e\u043b\u0438\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434\u0438",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"\u0434\u0430\u043d",dd:t.translate,M:"\u043c\u0435\u0441\u0435\u0446",MM:t.translate,y:"\u0433\u043e\u0434\u0438\u043d\u0443",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n("wd/R"))},E2fk:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("8Y7J");let r=(()=>{class e{transform(e){return"[DBG]"===e?"debug":"[INF]"===e?"info":"[WRN]"===e?"warn":"[ERR]"===e?"err":""}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"logPriority",type:e,pure:!0}),e})()},E9XD:function(e,t,n){"use strict";var i=n("I+eb"),r=n("1Y/n").left,s=n("pkCn"),o=n("rkAj"),a=s("reduce"),c=o("reduce",{1:0});i({target:"Array",proto:!0,forced:!a||!c},{reduce:function(e){return r(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},EApP:function(e,t,n){"use strict";n.d(t,"a",(function(){return C})),n.d(t,"b",(function(){return x}));var i=n("8Y7J"),r=n("GS7A"),s=n("XNiG"),o=n("cUpR"),a=n("SVse");const c=["toast-component",""];function l(e,t){if(1&e){const e=i.Tb();i.Sb(0,"button",5),i.gc("click",(function(){return i.Dc(e),i.ic().remove()})),i.Sb(1,"span",6),i.Oc(2,"\xd7"),i.Rb(),i.Rb()}}function u(e,t){if(1&e&&(i.Qb(0),i.Oc(1),i.Pb()),2&e){const e=i.ic(2);i.yb(1),i.Qc("[",e.duplicatesCount+1,"]")}}function d(e,t){if(1&e&&(i.Sb(0,"div"),i.Oc(1),i.Mc(2,u,2,1,"ng-container",4),i.Rb()),2&e){const e=i.ic();i.Ab(e.options.titleClass),i.zb("aria-label",e.title),i.yb(1),i.Qc(" ",e.title," "),i.yb(1),i.pc("ngIf",e.duplicatesCount)}}function h(e,t){if(1&e&&i.Nb(0,"div",7),2&e){const e=i.ic();i.Ab(e.options.messageClass),i.pc("innerHTML",e.message,i.Ec)}}function f(e,t){if(1&e&&(i.Sb(0,"div",8),i.Oc(1),i.Rb()),2&e){const e=i.ic();i.Ab(e.options.messageClass),i.zb("aria-label",e.message),i.yb(1),i.Qc(" ",e.message," ")}}function p(e,t){if(1&e&&(i.Sb(0,"div"),i.Nb(1,"div",9),i.Rb()),2&e){const e=i.ic();i.yb(1),i.Kc("width",e.width+"%")}}class m{constructor(e,t,n,i,r,o){this.toastId=e,this.config=t,this.message=n,this.title=i,this.toastType=r,this.toastRef=o,this._onTap=new s.a,this._onAction=new s.a,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(e){this._onAction.next(e)}onAction(){return this._onAction.asObservable()}}const b={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing"},g=new i.r("ToastConfig");class _{constructor(e,t){this.component=e,this.injector=t}attach(e,t){return this._attachedHost=e,e.attach(this,t)}detach(){const e=this._attachedHost;if(e)return this._attachedHost=void 0,e.detach()}get isAttached(){return null!=this._attachedHost}setAttachedHost(e){this._attachedHost=e}}class y extends class{attach(e,t){return this._attachedPortal=e,this.attachComponentPortal(e,t)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(e){this._disposeFn=e}}{constructor(e,t,n){super(),this._hostDomElement=e,this._componentFactoryResolver=t,this._appRef=n}attachComponentPortal(e,t){const n=this._componentFactoryResolver.resolveComponentFactory(e.component);let i;return i=n.create(e.injector),this._appRef.attachView(i.hostView),this.setDisposeFn(()=>{this._appRef.detachView(i.hostView),i.destroy()}),t?this._hostDomElement.insertBefore(this._getComponentRootNode(i),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(i)),i}_getComponentRootNode(e){return e.hostView.rootNodes[0]}}let v=(()=>{class e{constructor(e){this._document=e}ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const e=this._document.createElement("div");e.classList.add("overlay-container"),this._document.body.appendChild(e),this._containerElement=e}}return e.\u0275fac=function(t){return new(t||e)(i.dc(a.d))},e.\u0275prov=Object(i.Ib)({factory:function(){return new e(Object(i.dc)(a.d))},token:e,providedIn:"root"}),e})();class w{constructor(e){this._portalHost=e}attach(e,t=!0){return this._portalHost.attach(e,t)}detach(){return this._portalHost.detach()}}let S=(()=>{class e{constructor(e,t,n,i){this._overlayContainer=e,this._componentFactoryResolver=t,this._appRef=n,this._document=i,this._paneElements=new Map}create(e,t){return this._createOverlayRef(this.getPaneElement(e,t))}getPaneElement(e="",t){return this._paneElements.get(t)||this._paneElements.set(t,{}),this._paneElements.get(t)[e]||(this._paneElements.get(t)[e]=this._createPaneElement(e,t)),this._paneElements.get(t)[e]}_createPaneElement(e,t){const n=this._document.createElement("div");return n.id="toast-container",n.classList.add(e),n.classList.add("toast-container"),t?t.getContainerElement().appendChild(n):this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalHost(e){return new y(e,this._componentFactoryResolver,this._appRef)}_createOverlayRef(e){return new w(this._createPortalHost(e))}}return e.\u0275fac=function(t){return new(t||e)(i.dc(v),i.dc(i.j),i.dc(i.g),i.dc(a.d))},e.\u0275prov=Object(i.Ib)({factory:function(){return new e(Object(i.dc)(v),Object(i.dc)(i.j),Object(i.dc)(i.g),Object(i.dc)(a.d))},token:e,providedIn:"root"}),e})();class M{constructor(e){this._overlayRef=e,this.duplicatesCount=0,this._afterClosed=new s.a,this._activate=new s.a,this._manualClose=new s.a,this._resetTimeout=new s.a,this._countDuplicate=new s.a}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(e,t){e&&this._resetTimeout.next(),t&&this._countDuplicate.next(++this.duplicatesCount)}}class k{constructor(e,t){this._toastPackage=e,this._parentInjector=t}get(e,t,n){return e===m?this._toastPackage:this._parentInjector.get(e,t,n)}}let x=(()=>{class e{constructor(e,t,n,i,r){this.overlay=t,this._injector=n,this.sanitizer=i,this.ngZone=r,this.currentlyActive=0,this.toasts=[],this.index=0,this.toastrConfig=Object.assign(Object.assign({},e.default),e.config),e.config.iconClasses&&(this.toastrConfig.iconClasses=Object.assign(Object.assign({},e.default.iconClasses),e.config.iconClasses))}show(e,t,n={},i=""){return this._preBuildNotification(i,e,t,this.applyConfig(n))}success(e,t,n={}){return this._preBuildNotification(this.toastrConfig.iconClasses.success||"",e,t,this.applyConfig(n))}error(e,t,n={}){return this._preBuildNotification(this.toastrConfig.iconClasses.error||"",e,t,this.applyConfig(n))}info(e,t,n={}){return this._preBuildNotification(this.toastrConfig.iconClasses.info||"",e,t,this.applyConfig(n))}warning(e,t,n={}){return this._preBuildNotification(this.toastrConfig.iconClasses.warning||"",e,t,this.applyConfig(n))}clear(e){for(const t of this.toasts)if(void 0!==e){if(t.toastId===e)return void t.toastRef.manualClose()}else t.toastRef.manualClose()}remove(e){const t=this._findToast(e);if(!t)return!1;if(t.activeToast.toastRef.close(),this.toasts.splice(t.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length)return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){const e=this.toasts[this.currentlyActive].toastRef;e.isInactive()||(this.currentlyActive=this.currentlyActive+1,e.activate())}return!0}findDuplicate(e="",t="",n,i){const{includeTitleDuplicates:r}=this.toastrConfig;for(const s of this.toasts){const o=r&&s.title===e;if((!r||o)&&s.message===t)return s.toastRef.onDuplicate(n,i),s}return null}applyConfig(e={}){return Object.assign(Object.assign({},this.toastrConfig),e)}_findToast(e){for(let t=0;t<this.toasts.length;t++)if(this.toasts[t].toastId===e)return{index:t,activeToast:this.toasts[t]};return null}_preBuildNotification(e,t,n,i){return i.onActivateTick?this.ngZone.run(()=>this._buildNotification(e,t,n,i)):this._buildNotification(e,t,n,i)}_buildNotification(e,t,n,r){if(!r.toastComponent)throw new Error("toastComponent required");const s=this.findDuplicate(n,t,this.toastrConfig.resetTimeoutOnDuplicate&&r.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&n||t)&&this.toastrConfig.preventDuplicates&&null!==s)return s;this.previousToastMessage=t;let o=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(o=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));const a=this.overlay.create(r.positionClass,this.overlayContainer);this.index=this.index+1;let c=t;t&&r.enableHtml&&(c=this.sanitizer.sanitize(i.I.HTML,t));const l=new M(a),u=new m(this.index,r,c,n,e,l),d=new k(u,this._injector),h=new _(r.toastComponent,d),f=a.attach(h,this.toastrConfig.newestOnTop);l.componentInstance=f.instance;const p={toastId:this.index,title:n||"",message:t||"",toastRef:l,onShown:l.afterActivate(),onHidden:l.afterClosed(),onTap:u.onTap(),onAction:u.onAction(),portal:f};return o||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{p.toastRef.activate()})),this.toasts.push(p),p}}return e.\u0275fac=function(t){return new(t||e)(i.dc(g),i.dc(S),i.dc(i.s),i.dc(o.b),i.dc(i.A))},e.\u0275prov=Object(i.Ib)({factory:function(){return new e(Object(i.dc)(g),Object(i.dc)(S),Object(i.dc)(i.p),Object(i.dc)(o.b),Object(i.dc)(i.A))},token:e,providedIn:"root"}),e})(),D=(()=>{class e{constructor(e,t,n){this.toastrService=e,this.toastPackage=t,this.ngZone=n,this.width=-1,this.toastClasses="",this.state={value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}},this.message=t.message,this.title=t.title,this.options=t.config,this.originalTimeout=t.config.timeOut,this.toastClasses=`${t.toastType} ${t.config.toastClass}`,this.sub=t.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=t.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=t.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=t.toastRef.countDuplicate().subscribe(e=>{this.duplicatesCount=e})}get displayStyle(){if("inactive"===this.state.value)return"none"}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state=Object.assign(Object.assign({},this.state),{value:"active"}),!0!==this.options.disableTimeOut&&"timeOut"!==this.options.disableTimeOut&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=(new Date).getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(0===this.width||100===this.width||!this.options.timeOut)return;const e=(new Date).getTime();this.width=(this.hideTime-e)/this.options.timeOut*100,"increasing"===this.options.progressAnimation&&(this.width=100-this.width),this.width<=0&&(this.width=0),this.width>=100&&(this.width=100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state=Object.assign(Object.assign({},this.state),{value:"active"}),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=(new Date).getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){"removed"!==this.state.value&&(clearTimeout(this.timeout),this.state=Object.assign(Object.assign({},this.state),{value:"removed"}),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){"removed"!==this.state.value&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){"removed"!==this.state.value&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width=0)}delayedHideToast(){!0!==this.options.disableTimeOut&&"extendedTimeOut"!==this.options.disableTimeOut&&0!==this.options.extendedTimeOut&&"removed"!==this.state.value&&(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=(new Date).getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(e,t){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(e),t)):this.timeout=setTimeout(()=>e(),t)}outsideInterval(e,t){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(e),t)):this.intervalId=setInterval(()=>e(),t)}runInsideAngular(e){this.ngZone?this.ngZone.run(()=>e()):e()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(x),i.Mb(m),i.Mb(i.A))},e.\u0275cmp=i.Gb({type:e,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(e,t){1&e&&i.gc("click",(function(){return t.tapToast()}))("mouseenter",(function(){return t.stickAround()}))("mouseleave",(function(){return t.delayedHideToast()})),2&e&&(i.Lc("@flyInOut",t.state),i.Ab(t.toastClasses),i.Kc("display",t.displayStyle))},attrs:c,decls:5,vars:5,consts:[["class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alertdialog","aria-live","polite",3,"class","innerHTML",4,"ngIf"],["role","alertdialog","aria-live","polite",3,"class",4,"ngIf"],[4,"ngIf"],["aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alertdialog","aria-live","polite",3,"innerHTML"],["role","alertdialog","aria-live","polite"],[1,"toast-progress"]],template:function(e,t){1&e&&(i.Mc(0,l,3,0,"button",0),i.Mc(1,d,3,5,"div",1),i.Mc(2,h,1,3,"div",2),i.Mc(3,f,2,4,"div",3),i.Mc(4,p,2,2,"div",4)),2&e&&(i.pc("ngIf",t.options.closeButton),i.yb(1),i.pc("ngIf",t.title),i.yb(1),i.pc("ngIf",t.message&&t.options.enableHtml),i.yb(1),i.pc("ngIf",t.message&&!t.options.enableHtml),i.yb(1),i.pc("ngIf",t.options.progressBar))},directives:[a.r],encapsulation:2,data:{animation:[Object(r.j)("flyInOut",[Object(r.g)("inactive",Object(r.h)({opacity:0})),Object(r.g)("active",Object(r.h)({opacity:1})),Object(r.g)("removed",Object(r.h)({opacity:0})),Object(r.i)("inactive => active",Object(r.e)("{{ easeTime }}ms {{ easing }}")),Object(r.i)("active => removed",Object(r.e)("{{ easeTime }}ms {{ easing }}"))])]}}),e})();const T=Object.assign(Object.assign({},b),{toastComponent:D});let C=(()=>{class e{static forRoot(t={}){return{ngModule:e,providers:[{provide:g,useValue:{default:T,config:t}}]}}}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[a.c]]}),e})()},ENF9:function(e,t,n){"use strict";var i,r=n("2oRo"),s=n("4syw"),o=n("8YOa"),a=n("bWFh"),c=n("rKzb"),l=n("hh1v"),u=n("afO8").enforce,d=n("f5p1"),h=!r.ActiveXObject&&"ActiveXObject"in r,f=Object.isExtensible,p=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},m=e.exports=a("WeakMap",p,c);if(d&&h){i=c.getConstructor(p,"WeakMap",!0),o.REQUIRED=!0;var b=m.prototype,g=b.delete,_=b.has,y=b.get,v=b.set;s(b,{delete:function(e){if(l(e)&&!f(e)){var t=u(this);return t.frozen||(t.frozen=new i),g.call(this,e)||t.frozen.delete(e)}return g.call(this,e)},has:function(e){if(l(e)&&!f(e)){var t=u(this);return t.frozen||(t.frozen=new i),_.call(this,e)||t.frozen.has(e)}return _.call(this,e)},get:function(e){if(l(e)&&!f(e)){var t=u(this);return t.frozen||(t.frozen=new i),_.call(this,e)?y.call(this,e):t.frozen.get(e)}return y.call(this,e)},set:function(e,t){if(l(e)&&!f(e)){var n=u(this);n.frozen||(n.frozen=new i),_.call(this,e)?v.call(this,e,t):n.frozen.set(e,t)}else v.call(this,e,t);return this}})}},EOgW:function(e,t,n){!function(e){"use strict";e.defineLocale("th",{months:"\u0e21\u0e01\u0e23\u0e32\u0e04\u0e21_\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c_\u0e21\u0e35\u0e19\u0e32\u0e04\u0e21_\u0e40\u0e21\u0e29\u0e32\u0e22\u0e19_\u0e1e\u0e24\u0e29\u0e20\u0e32\u0e04\u0e21_\u0e21\u0e34\u0e16\u0e38\u0e19\u0e32\u0e22\u0e19_\u0e01\u0e23\u0e01\u0e0e\u0e32\u0e04\u0e21_\u0e2a\u0e34\u0e07\u0e2b\u0e32\u0e04\u0e21_\u0e01\u0e31\u0e19\u0e22\u0e32\u0e22\u0e19_\u0e15\u0e38\u0e25\u0e32\u0e04\u0e21_\u0e1e\u0e24\u0e28\u0e08\u0e34\u0e01\u0e32\u0e22\u0e19_\u0e18\u0e31\u0e19\u0e27\u0e32\u0e04\u0e21".split("_"),monthsShort:"\u0e21.\u0e04._\u0e01.\u0e1e._\u0e21\u0e35.\u0e04._\u0e40\u0e21.\u0e22._\u0e1e.\u0e04._\u0e21\u0e34.\u0e22._\u0e01.\u0e04._\u0e2a.\u0e04._\u0e01.\u0e22._\u0e15.\u0e04._\u0e1e.\u0e22._\u0e18.\u0e04.".split("_"),monthsParseExact:!0,weekdays:"\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c_\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c_\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23_\u0e1e\u0e38\u0e18_\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e1a\u0e14\u0e35_\u0e28\u0e38\u0e01\u0e23\u0e4c_\u0e40\u0e2a\u0e32\u0e23\u0e4c".split("_"),weekdaysShort:"\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c_\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c_\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23_\u0e1e\u0e38\u0e18_\u0e1e\u0e24\u0e2b\u0e31\u0e2a_\u0e28\u0e38\u0e01\u0e23\u0e4c_\u0e40\u0e2a\u0e32\u0e23\u0e4c".split("_"),weekdaysMin:"\u0e2d\u0e32._\u0e08._\u0e2d._\u0e1e._\u0e1e\u0e24._\u0e28._\u0e2a.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY \u0e40\u0e27\u0e25\u0e32 H:mm",LLLL:"\u0e27\u0e31\u0e19dddd\u0e17\u0e35\u0e48 D MMMM YYYY \u0e40\u0e27\u0e25\u0e32 H:mm"},meridiemParse:/\u0e01\u0e48\u0e2d\u0e19\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07|\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07/,isPM:function(e){return"\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07"===e},meridiem:function(e,t,n){return e<12?"\u0e01\u0e48\u0e2d\u0e19\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07":"\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07"},calendar:{sameDay:"[\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49 \u0e40\u0e27\u0e25\u0e32] LT",nextDay:"[\u0e1e\u0e23\u0e38\u0e48\u0e07\u0e19\u0e35\u0e49 \u0e40\u0e27\u0e25\u0e32] LT",nextWeek:"dddd[\u0e2b\u0e19\u0e49\u0e32 \u0e40\u0e27\u0e25\u0e32] LT",lastDay:"[\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e27\u0e32\u0e19\u0e19\u0e35\u0e49 \u0e40\u0e27\u0e25\u0e32] LT",lastWeek:"[\u0e27\u0e31\u0e19]dddd[\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27 \u0e40\u0e27\u0e25\u0e32] LT",sameElse:"L"},relativeTime:{future:"\u0e2d\u0e35\u0e01 %s",past:"%s\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27",s:"\u0e44\u0e21\u0e48\u0e01\u0e35\u0e48\u0e27\u0e34\u0e19\u0e32\u0e17\u0e35",ss:"%d \u0e27\u0e34\u0e19\u0e32\u0e17\u0e35",m:"1 \u0e19\u0e32\u0e17\u0e35",mm:"%d \u0e19\u0e32\u0e17\u0e35",h:"1 \u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07",hh:"%d \u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07",d:"1 \u0e27\u0e31\u0e19",dd:"%d \u0e27\u0e31\u0e19",w:"1 \u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c",ww:"%d \u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c",M:"1 \u0e40\u0e14\u0e37\u0e2d\u0e19",MM:"%d \u0e40\u0e14\u0e37\u0e2d\u0e19",y:"1 \u0e1b\u0e35",yy:"%d \u0e1b\u0e35"}})}(n("wd/R"))},EY2u:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return s}));var i=n("HDdC");const r=new i.a(e=>e.complete());function s(e){return e?function(e){return new i.a(t=>e.schedule(()=>t.complete()))}(e):r}},EgGo:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("SVse"),r=n("sne2");class s{constructor(e){this.base=e}static concatURLSegments(e){return e.reduce(i.m.joinWithSlash)}static buildURL(e,...t){return s.concatURLSegments([...e?["/"]:[],...t])}getURL(e,t=!0,...n){return s.buildURL(t,this.base,e,...n)}getCreate(e=!0){return this.getURL(r.e.CREATE,e)}getCreateFrom(e,t=!0){return this.getURL(r.e.CREATE,t,e)}getDelete(e=!0){return this.getURL(r.e.DELETE,e)}getEdit(e,t=!0){return this.getURL(r.e.EDIT,t,e)}getUpdate(e,t=!0){return this.getURL(r.e.UPDATE,t,e)}getAdd(e=!0){return this.getURL(r.e.ADD,e)}getRemove(e=!0){return this.getURL(r.e.REMOVE,e)}getRecreate(e,t=!0){return this.getURL(r.e.RECREATE,t,e)}}},Ekvf:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i=n("mrSG"),r=n("IheW"),s=n("lJxs"),o=n("xTzq"),a=n("o8EM"),c=n("8Y7J");let l=(()=>{let e=class{constructor(e,t){this.http=e,this.rbdConfigurationService=t,this.apiPath="api/pool"}create(e){return this.http.post(this.apiPath,e,{observe:"response"})}update(e){let t;return e.hasOwnProperty("srcpool")?(t=e.srcpool,delete e.srcpool):(t=e.pool,delete e.pool),this.http.put(`${this.apiPath}/${encodeURIComponent(t)}`,e,{observe:"response"})}delete(e){return this.http.delete(`${this.apiPath}/${e}`,{observe:"response"})}get(e){return this.http.get(`${this.apiPath}/${e}`)}getList(){return this.http.get(this.apiPath+"?stats=true")}getConfiguration(e){return this.http.get(`${this.apiPath}/${e}/configuration`).pipe(Object(s.a)(e=>e.map(e=>Object.assign(e,this.rbdConfigurationService.getOptionByName(e.name)))))}getInfo(){return this.http.get(`ui-${this.apiPath}/info`)}list(e=[]){const t=e.join(",");return this.http.get(`${this.apiPath}?attrs=${t}`).toPromise().then(e=>e)}};return e.\u0275fac=function(t){return new(t||e)(c.dc(r.b),c.dc(a.a))},e.\u0275prov=c.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e=Object(i.b)([o.a,Object(i.d)("design:paramtypes",[r.b,a.a])],e),e})()},EmSq:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i=n("8Y7J"),r=n("LvDl"),s=n.n(r),o=n("Fgil"),a=n("aXbf"),c=n("s7LF");let l=(()=>{class e{constructor(e,t,n,r){this.elementRef=e,this.control=t,this.dimlessBinaryPipe=n,this.formatter=r,this.ngModelChange=new i.o,this.el=this.elementRef.nativeElement}ngOnInit(){this.setValue(this.el.value)}setValue(e){/^[\d.]+$/.test(e)&&(e+=this.defaultUnit||"m");const t=this.formatter.toBytes(e),n=this.round(t);this.el.value=this.dimlessBinaryPipe.transform(n),null!==t?(this.ngModelChange.emit(this.el.value),this.control.control.setValue(this.el.value)):(this.ngModelChange.emit(null),this.control.control.setValue(null))}round(e){if(null!==e&&0!==e){if(!s.a.isUndefined(this.minBytes)&&e<this.minBytes)return this.minBytes;if(!s.a.isUndefined(this.maxBytes)&&e>this.maxBytes)return this.maxBytes;if(!s.a.isUndefined(this.roundPower)){const t=Math.round(Math.log(e)/Math.log(this.roundPower));return Math.pow(this.roundPower,t)}}return e}onBlur(e){this.setValue(e)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(c.p),i.Mb(o.a),i.Mb(a.a))},e.\u0275dir=i.Hb({type:e,selectors:[["","cdDimlessBinary",""]],hostBindings:function(e,t){1&e&&i.gc("blur",(function(e){return t.onBlur(e.target.value)}))},inputs:{minBytes:"minBytes",maxBytes:"maxBytes",roundPower:"roundPower",defaultUnit:"defaultUnit"},outputs:{ngModelChange:"ngModelChange"}}),e})()},F8JR:function(e,t,n){"use strict";var i=n("tycR").forEach,r=n("pkCn"),s=n("rkAj"),o=r("forEach"),a=s("forEach");e.exports=o&&a?[].forEach:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}},FFMq:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("8Y7J");let r=(()=>{class e{transform(e){return e.join(", ")}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"join",type:e,pure:!0}),e})()},FMNM:function(e,t,n){var i=n("xrYK"),r=n("kmMV");e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var s=n.call(e,t);if("object"!=typeof s)throw TypeError("RegExp exec method returned something other than an Object or null");return s}if("RegExp"!==i(e))throw TypeError("RegExp#exec called on incompatible receiver");return r.call(e,t)}},FSuO:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i=n("8Y7J"),r=n("LvDl"),s=n.n(r),o=n("x38r"),a=n("a0VL"),c=n("uIqm");let l=(()=>{class e{constructor(e){this.datePipe=e,this.autoReload=5e3,this.renderObjects=!1,this.appendParentKey=!0,this.hideEmpty=!1,this.hideKeys=[],this.columns=[],this.fetchData=new i.o}ngOnInit(){this.columns=[{prop:"key",flexGrow:1,cellTransformation:o.a.bold},{prop:"value",flexGrow:3}],this.customCss&&(this.columns[1].cellTransformation=o.a.classAdding),this.fetchData.observers.length>0&&this.table.fetchData.subscribe(()=>{this.fetchData.emit()}),this.useData()}ngOnChanges(){this.useData()}useData(){if(!this.data)return;let e=this.makePairs(this.data);this.hideKeys&&(e=e.filter(e=>!this.hideKeys.includes(e.key))),this.tableData=e}makePairs(e){let t=[];if(e){if(s.a.isArray(e))t=this.makePairsFromArray(e);else{if(!s.a.isObject(e))throw new Error("Wrong data format");t=this.makePairsFromObject(e)}return t=t.map(e=>(e.value=this.convertValue(e.value),e)).filter(e=>null!==e.value),s.a.sortBy(this.renderObjects?this.insertFlattenObjects(t):t,"key")}}makePairsFromArray(e){let t=[];const n=e[0];if(s.a.isArray(n)){if(2!==n.length)throw new Error(`Array contains too many elements (${n.length}). Needs to be of type [string, any][]`);t=e.map(e=>({key:e[0],value:e[1]}))}else s.a.isObject(n)&&(t=s.a.has(n,"key")&&s.a.has(n,"value")?[...e]:e.reduce((e,t)=>e.concat(this.makePairsFromObject(t)),t));return t}makePairsFromObject(e){return Object.keys(e).map(t=>({key:t,value:e[t]}))}insertFlattenObjects(e){return s.a.flattenDeep(e.map(e=>{const t=e.value,n=s.a.isObject(t);return!n||s.a.isEmpty(t)?(n&&(e.value=""),e):this.splitItemIntoItems(e)}))}splitItemIntoItems(e){return this.makePairs(e.value).map(t=>(this.appendParentKey&&(t.key=e.key+" "+t.key),t))}convertValue(e){if(s.a.isArray(e)){if(s.a.isEmpty(e)&&this.hideEmpty)return null;e=e.map(e=>s.a.isObject(e)?JSON.stringify(e):e).join(", ")}else if(s.a.isObject(e)){if(this.hideEmpty&&s.a.isEmpty(e)||!this.renderObjects)return null}else if(s.a.isString(e)){if(""===e&&this.hideEmpty)return null;this.isDate(e)&&(e=this.datePipe.transform(e)||e)}return e}isDate(e){const t="[ -:.TZ]",n="\\d{2}"+t;return e.match(new RegExp("^\\d{4}"+t+n+n+n+n+n+"\\d*Z?$"))}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(a.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-table-key-value"]],viewQuery:function(e,t){var n;1&e&&i.Jc(c.a,!0),2&e&&i.zc(n=i.hc())&&(t.table=n.first)},inputs:{data:"data",autoReload:"autoReload",renderObjects:"renderObjects",appendParentKey:"appendParentKey",hideEmpty:"hideEmpty",hideKeys:"hideKeys",customCss:"customCss"},outputs:{fetchData:"fetchData"},features:[i.wb],decls:2,vars:9,consts:[["columnMode","flex",3,"data","columns","toolHeader","autoReload","customCss","autoSave","header","footer","limit"],["table",""]],template:function(e,t){1&e&&i.Nb(0,"cd-table",0,1),2&e&&i.pc("data",t.tableData)("columns",t.columns)("toolHeader",!1)("autoReload",t.autoReload)("customCss",t.customCss)("autoSave",!1)("header",!1)("footer",!1)("limit",0)},directives:[c.a],styles:[""]}),e})()},Fgil:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("aXbf"),r=n("8Y7J");let s=(()=>{class e{constructor(e){this.formatter=e}transform(e){return this.formatter.format_number(e,1024,["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"])}}return e.\u0275fac=function(t){return new(t||e)(r.Mb(i.a))},e.\u0275pipe=r.Lb({name:"dimlessBinary",type:e,pure:!0}),e})()},Fnuy:function(e,t,n){!function(e){"use strict";e.defineLocale("oc-lnc",{months:{standalone:"geni\xe8r_febri\xe8r_mar\xe7_abril_mai_junh_julhet_agost_setembre_oct\xf2bre_novembre_decembre".split("_"),format:"de geni\xe8r_de febri\xe8r_de mar\xe7_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'oct\xf2bre_de novembre_de decembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._mar\xe7_abr._mai_junh_julh._ago._set._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"dimenge_diluns_dimars_dim\xe8cres_dij\xf2us_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dm._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dm_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:"[u\xe8i a] LT",nextDay:"[deman a] LT",nextWeek:"dddd [a] LT",lastDay:"[i\xe8r a] LT",lastWeek:"dddd [passat a] LT",sameElse:"L"},relativeTime:{future:"d'aqu\xed %s",past:"fa %s",s:"unas segondas",ss:"%d segondas",m:"una minuta",mm:"%d minutas",h:"una ora",hh:"%d oras",d:"un jorn",dd:"%d jorns",M:"un mes",MM:"%d meses",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|\xe8|a)/,ordinal:function(e,t){var n=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"\xe8";return"w"!==t&&"W"!==t||(n="a"),e+n},week:{dow:1,doy:4}})}(n("wd/R"))},"G+Rx":function(e,t,n){var i=n("0GbY");e.exports=i("document","documentElement")},G0Uy:function(e,t,n){!function(e){"use strict";e.defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_\u0120unju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Di\u010bembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_\u0120un_Lul_Aww_Set_Ott_Nov_Di\u010b".split("_"),weekdays:"Il-\u0126add_It-Tnejn_It-Tlieta_L-Erbg\u0127a_Il-\u0126amis_Il-\u0120img\u0127a_Is-Sibt".split("_"),weekdaysShort:"\u0126ad_Tne_Tli_Erb_\u0126am_\u0120im_Sib".split("_"),weekdaysMin:"\u0126a_Tn_Tl_Er_\u0126a_\u0120i_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Illum fil-]LT",nextDay:"[G\u0127ada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-biera\u0127 fil-]LT",lastWeek:"dddd [li g\u0127adda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f\u2019 %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"sieg\u0127a",hh:"%d sieg\u0127at",d:"\u0121urnata",dd:"%d \u0121ranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}})}(n("wd/R"))},G0yt:function(e,t,n){"use strict";n.d(t,"a",(function(){return Xt})),n.d(t,"b",(function(){return He})),n.d(t,"c",(function(){return We})),n.d(t,"d",(function(){return Qe})),n.d(t,"e",(function(){return Ve})),n.d(t,"f",(function(){return Be})),n.d(t,"g",(function(){return ht})),n.d(t,"h",(function(){return jt})),n.d(t,"i",(function(){return Bt})),n.d(t,"j",(function(){return $t})),n.d(t,"k",(function(){return Ht})),n.d(t,"l",(function(){return Ut})),n.d(t,"m",(function(){return Vt})),n.d(t,"n",(function(){return It})),n.d(t,"o",(function(){return sn})),n.d(t,"p",(function(){return dn})),n.d(t,"q",(function(){return ln})),n.d(t,"r",(function(){return un})),n.d(t,"s",(function(){return hn})),n.d(t,"t",(function(){return pn})),n.d(t,"u",(function(){return fn})),n.d(t,"v",(function(){return zt})),n.d(t,"w",(function(){return Sn})),n.d(t,"x",(function(){return yn})),n.d(t,"y",(function(){return Mn})),n.d(t,"z",(function(){return xn})),n.d(t,"A",(function(){return Dn})),n.d(t,"B",(function(){return Nn})),n.d(t,"C",(function(){return jn})),n.d(t,"D",(function(){return $n})),n.d(t,"E",(function(){return Fn})),n.d(t,"F",(function(){return Hn})),n.d(t,"G",(function(){return Kn})),n.d(t,"H",(function(){return Zn}));var i=n("8Y7J"),r=n("SVse"),s=n("s7LF"),o=n("XNiG"),a=n("2Vo4"),c=(n("itXk"),n("PqYM"),n("5yfJ"),n("xgIS")),l=n("VRyK"),u=n("DH7j"),d=n("yCtX"),h=n("l7GE"),f=n("ZUHj");class p{call(e,t){return t.subscribe(new m(e))}}class m extends h.a{constructor(e){super(e),this.hasFirst=!1,this.observables=[],this.subscriptions=[]}_next(e){this.observables.push(e)}_complete(){const e=this.observables,t=e.length;if(0===t)this.destination.complete();else{for(let n=0;n<t&&!this.hasFirst;n++){const t=e[n],i=Object(f.a)(this,t,void 0,n);this.subscriptions&&this.subscriptions.push(i),this.add(i)}this.observables=null}}notifyNext(e,t,n){if(!this.hasFirst){this.hasFirst=!0;for(let e=0;e<this.subscriptions.length;e++)if(e!==n){let t=this.subscriptions[e];t.unsubscribe(),this.remove(t)}this.subscriptions=null}this.destination.next(t)}}var b=n("HDdC"),g=n("lJxs"),_=(n("JX91"),n("/uUt"),n("eIep")),y=n("1G5W"),v=n("pLZG"),w=n("IzEk"),S=n("vkgz");function M(...e){return t=>{let n;return"function"==typeof e[e.length-1]&&(n=e.pop()),t.lift(new k(e,n))}}class k{constructor(e,t){this.observables=e,this.project=t}call(e,t){return t.subscribe(new x(e,this.observables,this.project))}}class x extends h.a{constructor(e,t,n){super(e),this.observables=t,this.project=n,this.toRespond=[];const i=t.length;this.values=new Array(i);for(let r=0;r<i;r++)this.toRespond.push(r);for(let r=0;r<i;r++){let e=t[r];this.add(Object(f.a)(this,e,void 0,r))}}notifyNext(e,t,n){this.values[n]=t;const i=this.toRespond;if(i.length>0){const e=i.indexOf(n);-1!==e&&i.splice(e,1)}}notifyComplete(){}_next(e){if(0===this.toRespond.length){const t=[e,...this.values];this.project?this._tryProject(t):this.destination.next(t)}}_tryProject(e){let t;try{t=this.project.apply(this,e)}catch(n){return void this.destination.error(n)}this.destination.next(t)}}var D=n("3E0/"),T=n("w1tV");function C(e,t){if(1&e){const e=i.Tb();i.Sb(0,"button",1),i.Yb(1,2),i.gc("click",(function(){return i.Dc(e),i.ic().closeHandler()})),i.Sb(2,"span",3),i.Oc(3,"\xd7"),i.Rb(),i.Rb()}}const O=["*"],L=["defaultDayTemplate"],R=["content"];function E(e,t){if(1&e&&i.Nb(0,"div",7),2&e){const e=t.currentMonth,n=t.selected,r=t.disabled,s=t.focused;i.pc("date",t.date)("currentMonth",e)("selected",n)("disabled",r)("focused",s)}}function A(e,t){if(1&e&&(i.Sb(0,"div",12),i.Oc(1),i.Rb()),2&e){const e=i.ic().$implicit,t=i.ic(2);i.yb(1),i.Rc(" ",t.i18n.getMonthFullName(e.number,e.year)," ",t.i18n.getYearNumerals(e.year)," ")}}function I(e,t){if(1&e&&(i.Sb(0,"div",9),i.Mc(1,A,2,2,"div",10),i.Nb(2,"ngb-datepicker-month",11),i.Rb()),2&e){const e=t.$implicit,n=i.ic(2);i.yb(1),i.pc("ngIf","none"===n.navigation||n.displayMonths>1&&"select"===n.navigation),i.yb(1),i.pc("month",e.firstDate)}}function P(e,t){if(1&e&&i.Mc(0,I,3,2,"div",8),2&e){const e=i.ic();i.pc("ngForOf",e.model.months)}}function N(e,t){if(1&e){const e=i.Tb();i.Sb(0,"ngb-datepicker-navigation",13),i.gc("navigate",(function(t){return i.Dc(e),i.ic().onNavigateEvent(t)}))("select",(function(t){return i.Dc(e),i.ic().onNavigateDateSelect(t)})),i.Rb()}if(2&e){const e=i.ic();i.pc("date",e.model.firstDate)("months",e.model.months)("disabled",e.model.disabled)("showSelect","select"===e.model.navigation)("prevDisabled",e.model.prevDisabled)("nextDisabled",e.model.nextDisabled)("selectBoxes",e.model.selectBoxes)}}function j(e,t){}function F(e,t){}function Y(e,t){1&e&&i.Nb(0,"div",5)}function z(e,t){if(1&e&&(i.Sb(0,"div",6),i.Oc(1),i.Rb()),2&e){const e=t.$implicit,n=i.ic(2);i.yb(1),i.Qc(" ",n.i18n.getWeekdayShortName(e)," ")}}function $(e,t){if(1&e&&(i.Sb(0,"div",2),i.Mc(1,Y,1,0,"div",3),i.Mc(2,z,2,1,"div",4),i.Rb()),2&e){const e=i.ic();i.yb(1),i.pc("ngIf",e.datepicker.showWeekNumbers),i.yb(1),i.pc("ngForOf",e.viewModel.weekdays)}}function H(e,t){if(1&e&&(i.Sb(0,"div",11),i.Oc(1),i.Rb()),2&e){const e=i.ic(2).$implicit,t=i.ic();i.yb(1),i.Pc(t.i18n.getWeekNumerals(e.number))}}function W(e,t){}function V(e,t){if(1&e&&i.Mc(0,W,0,0,"ng-template",14),2&e){const e=i.ic().$implicit,t=i.ic(3);i.pc("ngTemplateOutlet",t.datepicker.dayTemplate)("ngTemplateOutletContext",e.context)}}function B(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",12),i.gc("click",(function(n){i.Dc(e);const r=t.$implicit;return i.ic(3).doSelect(r),n.preventDefault()})),i.Mc(1,V,1,2,"ng-template",13),i.Rb()}if(2&e){const e=t.$implicit;i.Eb("disabled",e.context.disabled)("hidden",e.hidden)("ngb-dp-today",e.context.today),i.pc("tabindex",e.tabindex),i.zb("aria-label",e.ariaLabel),i.yb(1),i.pc("ngIf",!e.hidden)}}function U(e,t){if(1&e&&(i.Sb(0,"div",8),i.Mc(1,H,2,1,"div",9),i.Mc(2,B,2,9,"div",10),i.Rb()),2&e){const e=i.ic().$implicit,t=i.ic();i.yb(1),i.pc("ngIf",t.datepicker.showWeekNumbers),i.yb(1),i.pc("ngForOf",e.days)}}function G(e,t){1&e&&i.Mc(0,U,3,2,"div",7),2&e&&i.pc("ngIf",!t.$implicit.collapsed)}function q(e,t){if(1&e){const e=i.Tb();i.Sb(0,"ngb-datepicker-navigation-select",8),i.gc("select",(function(t){return i.Dc(e),i.ic().select.emit(t)})),i.Rb()}if(2&e){const e=i.ic();i.pc("date",e.date)("disabled",e.disabled)("months",e.selectBoxes.months)("years",e.selectBoxes.years)}}function J(e,t){1&e&&i.Nb(0,"div",0)}function Q(e,t){1&e&&i.Nb(0,"div",0)}function K(e,t){if(1&e&&(i.Mc(0,J,1,0,"div",10),i.Sb(1,"div",11),i.Oc(2),i.Rb(),i.Mc(3,Q,1,0,"div",10)),2&e){const e=t.$implicit,n=t.index,r=i.ic(2);i.pc("ngIf",n>0),i.yb(2),i.Rc(" ",r.i18n.getMonthFullName(e.number,e.year)," ",r.i18n.getYearNumerals(e.year)," "),i.yb(1),i.pc("ngIf",n!==r.months.length-1)}}function Z(e,t){if(1&e&&i.Mc(0,K,4,4,"ng-template",9),2&e){const e=i.ic();i.pc("ngForOf",e.months)}}const X=["ngbDatepickerDayView",""],ee=["month"],te=["year"];function ne(e,t){if(1&e&&(i.Sb(0,"option",6),i.Oc(1),i.Rb()),2&e){const e=t.$implicit,n=i.ic();i.pc("value",e),i.zb("aria-label",n.i18n.getMonthFullName(e,null==n.date?null:n.date.year)),i.yb(1),i.Pc(n.i18n.getMonthShortName(e,null==n.date?null:n.date.year))}}function ie(e,t){if(1&e&&(i.Sb(0,"option",6),i.Oc(1),i.Rb()),2&e){const e=t.$implicit,n=i.ic();i.pc("value",e),i.yb(1),i.Pc(n.i18n.getYearNumerals(e))}}const re=["dialog"],se=["ngbNavOutlet",""];function oe(e,t){}const ae=function(e){return{$implicit:e}};function ce(e,t){if(1&e&&(i.Sb(0,"div",2),i.Mc(1,oe,0,0,"ng-template",3),i.Rb()),2&e){const e=i.ic().$implicit,t=i.ic();i.Eb("active",e.active),i.pc("id",e.panelDomId),i.zb("role",t.paneRole?t.paneRole:t.nav.roles?"tabpanel":void 0)("aria-labelledby",e.domId),i.yb(1),i.pc("ngTemplateOutlet",(null==e.contentTpl?null:e.contentTpl.templateRef)||null)("ngTemplateOutletContext",i.uc(7,ae,e.active))}}function le(e,t){1&e&&i.Mc(0,ce,2,9,"div",1),2&e&&i.pc("ngIf",t.$implicit.isPanelInDom())}function ue(e,t){if(1&e&&i.Oc(0),2&e){const e=i.ic(2);i.Pc(e.title)}}function de(e,t){}function he(e,t){if(1&e&&(i.Sb(0,"h3",3),i.Mc(1,ue,1,1,"ng-template",null,4,i.Nc),i.Mc(3,de,0,0,"ng-template",5),i.Rb()),2&e){const e=i.Ac(2),t=i.ic();i.yb(3),i.pc("ngTemplateOutlet",t.isTitleTemplate()?t.title:e)("ngTemplateOutletContext",t.context)}}function fe(e,t){if(1&e&&(i.Sb(0,"span"),i.Wb(1,3),i.jc(2,"percent"),i.Rb()),2&e){const e=i.ic();i.yb(2),i.ac(i.kc(2,1,e.getValue()/e.max)),i.Xb(1)}}function pe(e,t){if(1&e){const e=i.Tb();i.Sb(0,"button",12),i.gc("click",(function(){i.Dc(e);const t=i.ic();return t.changeHour(t.hourStep)})),i.Nb(1,"span",13),i.Sb(2,"span",14),i.Wb(3,15),i.Rb(),i.Rb()}if(2&e){const e=i.ic();i.Eb("btn-sm",e.isSmallSize)("btn-lg",e.isLargeSize)("disabled",e.disabled),i.pc("disabled",e.disabled)}}function me(e,t){if(1&e){const e=i.Tb();i.Sb(0,"button",12),i.gc("click",(function(){i.Dc(e);const t=i.ic();return t.changeHour(-t.hourStep)})),i.Nb(1,"span",16),i.Sb(2,"span",14),i.Wb(3,17),i.Rb(),i.Rb()}if(2&e){const e=i.ic();i.Eb("btn-sm",e.isSmallSize)("btn-lg",e.isLargeSize)("disabled",e.disabled),i.pc("disabled",e.disabled)}}function be(e,t){if(1&e){const e=i.Tb();i.Sb(0,"button",12),i.gc("click",(function(){i.Dc(e);const t=i.ic();return t.changeMinute(t.minuteStep)})),i.Nb(1,"span",13),i.Sb(2,"span",14),i.Wb(3,18),i.Rb(),i.Rb()}if(2&e){const e=i.ic();i.Eb("btn-sm",e.isSmallSize)("btn-lg",e.isLargeSize)("disabled",e.disabled),i.pc("disabled",e.disabled)}}function ge(e,t){if(1&e){const e=i.Tb();i.Sb(0,"button",12),i.gc("click",(function(){i.Dc(e);const t=i.ic();return t.changeMinute(-t.minuteStep)})),i.Nb(1,"span",16),i.Sb(2,"span",14),i.Wb(3,19),i.Rb(),i.Rb()}if(2&e){const e=i.ic();i.Eb("btn-sm",e.isSmallSize)("btn-lg",e.isLargeSize)("disabled",e.disabled),i.pc("disabled",e.disabled)}}function _e(e,t){1&e&&(i.Sb(0,"div",6),i.Oc(1,":"),i.Rb())}function ye(e,t){if(1&e){const e=i.Tb();i.Sb(0,"button",12),i.gc("click",(function(){i.Dc(e);const t=i.ic(2);return t.changeSecond(t.secondStep)})),i.Nb(1,"span",13),i.Sb(2,"span",14),i.Wb(3,22),i.Rb(),i.Rb()}if(2&e){const e=i.ic(2);i.Eb("btn-sm",e.isSmallSize)("btn-lg",e.isLargeSize)("disabled",e.disabled),i.pc("disabled",e.disabled)}}function ve(e,t){if(1&e){const e=i.Tb();i.Sb(0,"button",12),i.gc("click",(function(){i.Dc(e);const t=i.ic(2);return t.changeSecond(-t.secondStep)})),i.Nb(1,"span",16),i.Sb(2,"span",14),i.Wb(3,23),i.Rb(),i.Rb()}if(2&e){const e=i.ic(2);i.Eb("btn-sm",e.isSmallSize)("btn-lg",e.isLargeSize)("disabled",e.disabled),i.pc("disabled",e.disabled)}}function we(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",20),i.Mc(1,ye,4,7,"button",3),i.Sb(2,"input",4),i.Yb(3,21),i.gc("change",(function(t){return i.Dc(e),i.ic().updateSecond(t.target.value)}))("input",(function(t){return i.Dc(e),i.ic().formatInput(t.target)}))("keydown.ArrowUp",(function(t){i.Dc(e);const n=i.ic();return n.changeSecond(n.secondStep),t.preventDefault()}))("keydown.ArrowDown",(function(t){i.Dc(e);const n=i.ic();return n.changeSecond(-n.secondStep),t.preventDefault()})),i.Rb(),i.Mc(4,ve,4,7,"button",3),i.Rb()}if(2&e){const e=i.ic();i.yb(1),i.pc("ngIf",e.spinners),i.yb(1),i.Eb("form-control-sm",e.isSmallSize)("form-control-lg",e.isLargeSize),i.pc("value",e.formatMinSec(null==e.model?null:e.model.second))("readOnly",e.readonlyInputs)("disabled",e.disabled),i.yb(2),i.pc("ngIf",e.spinners)}}function Se(e,t){1&e&&i.Nb(0,"div",6)}function Me(e,t){if(1&e&&(i.Qb(0),i.Wb(1,28),i.Pb()),2&e){const e=i.ic(2);i.yb(1),i.ac(e.i18n.getAfternoonPeriod()),i.Xb(1)}}function ke(e,t){if(1&e&&i.Wb(0,29),2&e){const e=i.ic(2);i.ac(e.i18n.getMorningPeriod()),i.Xb(0)}}function xe(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",24),i.Sb(1,"button",25),i.gc("click",(function(){return i.Dc(e),i.ic().toggleMeridian()})),i.Mc(2,Me,2,1,"ng-container",26),i.Mc(3,ke,1,1,"ng-template",null,27,i.Nc),i.Rb(),i.Rb()}if(2&e){const e=i.Ac(4),t=i.ic();i.yb(1),i.Eb("btn-sm",t.isSmallSize)("btn-lg",t.isLargeSize)("disabled",t.disabled),i.pc("disabled",t.disabled),i.yb(1),i.pc("ngIf",t.model&&t.model.hour>=12)("ngIfElse",e)}}function De(e,t){if(1&e&&(i.Sb(0,"span"),i.Oc(1),i.Rb()),2&e){const e=i.ic().$implicit,t=i.ic();i.Ab(t.highlightClass),i.yb(1),i.Pc(e)}}function Te(e,t){if(1&e&&i.Oc(0),2&e){const e=i.ic().$implicit;i.Pc(e)}}function Ce(e,t){if(1&e&&(i.Mc(0,De,2,3,"span",1),i.Mc(1,Te,1,1,"ng-template",null,2,i.Nc)),2&e){const e=t.odd,n=i.Ac(2);i.pc("ngIf",e)("ngIfElse",n)}}function Oe(e,t){if(1&e&&i.Nb(0,"ngb-highlight",2),2&e){const e=t.term;i.pc("result",(0,t.formatter)(t.result))("term",e)}}function Le(e,t){}const Re=function(e,t,n){return{result:e,term:t,formatter:n}};function Ee(e,t){if(1&e){const e=i.Tb();i.Sb(0,"button",3),i.gc("mouseenter",(function(){i.Dc(e);const n=t.index;return i.ic().markActive(n)}))("click",(function(){i.Dc(e);const n=t.$implicit;return i.ic().select(n)})),i.Mc(1,Le,0,0,"ng-template",4),i.Rb()}if(2&e){const e=t.$implicit,n=t.index,r=i.ic(),s=i.Ac(1);i.Eb("active",n===r.activeIdx),i.pc("id",r.id+"-"+n),i.yb(1),i.pc("ngTemplateOutlet",r.resultTemplate||s)("ngTemplateOutletContext",i.wc(5,Re,e,r.term,r.formatter))}}function Ae(e){return parseInt(""+e,10)}function Ie(e){return null!=e?""+e:""}function Pe(e){return"string"==typeof e}function Ne(e){return!isNaN(Ae(e))}function je(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}function Fe(e){return null!=e}function Ye(e){return Ne(e)?("0"+e).slice(-2):""}function ze(e,t){return e&&e.className&&e.className.split&&e.className.split(/\s+/).indexOf(t)>=0}"undefined"==typeof Element||Element.prototype.closest||(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest=function(e){let t=this;if(!document.documentElement.contains(t))return null;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null});let $e=(()=>{let e=class{constructor(){this.dismissible=!0,this.type="warning"}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return new e},token:e,providedIn:"root"}),e})(),He=(()=>{let e=class{constructor(e,t,n){this._renderer=t,this._element=n,this.close=new i.o,this.dismissible=e.dismissible,this.type=e.type}closeHandler(){this.close.emit()}ngOnChanges(e){const t=e.type;t&&!t.firstChange&&(this._renderer.removeClass(this._element.nativeElement,"alert-"+t.previousValue),this._renderer.addClass(this._element.nativeElement,"alert-"+t.currentValue))}ngOnInit(){this._renderer.addClass(this._element.nativeElement,"alert-"+this.type)}};return e.\u0275fac=function(t){return new(t||e)(i.Mb($e),i.Mb(i.E),i.Mb(i.m))},e.\u0275cmp=i.Gb({type:e,selectors:[["ngb-alert"]],hostAttrs:["role","alert",1,"alert"],hostVars:2,hostBindings:function(e,t){2&e&&i.Eb("alert-dismissible",t.dismissible)},inputs:{dismissible:"dismissible",type:"type"},outputs:{close:"close"},features:[i.wb],ngContentSelectors:O,decls:2,vars:1,consts:function(){return[["type","button","class","close",3,"click",4,"ngIf",6,"aria-label"],["type","button",1,"close",3,"click",6,"aria-label"],["aria-label","Close"],["aria-hidden","true"]]},template:function(e,t){1&e&&(i.oc(),i.nc(0),i.Mc(1,C,4,0,"button",0)),2&e&&(i.yb(1),i.pc("ngIf",t.dismissible))},directives:[r.r],styles:["ngb-alert{display:block}"],encapsulation:2,changeDetection:0}),e})(),We=(()=>{let e=class{};return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[r.c]]}),e})(),Ve=(()=>{let e=class{constructor(){this.collapsed=!1}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=i.Hb({type:e,selectors:[["","ngbCollapse",""]],hostVars:4,hostBindings:function(e,t){2&e&&i.Eb("collapse",!0)("show",!t.collapsed)},inputs:{collapsed:["ngbCollapse","collapsed"]},exportAs:["ngbCollapse"]}),e})(),Be=(()=>{let e=class{};return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)}}),e})();class Ue{constructor(e,t,n){this.year=je(e)?e:null,this.month=je(t)?t:null,this.day=je(n)?n:null}static from(e){return e instanceof Ue?e:e?new Ue(e.year,e.month,e.day):null}equals(e){return null!=e&&this.year===e.year&&this.month===e.month&&this.day===e.day}before(e){return!!e&&(this.year===e.year?this.month===e.month?this.day!==e.day&&this.day<e.day:this.month<e.month:this.year<e.year)}after(e){return!!e&&(this.year===e.year?this.month===e.month?this.day!==e.day&&this.day>e.day:this.month>e.month:this.year>e.year)}}function Ge(e){return new Ue(e.getFullYear(),e.getMonth()+1,e.getDate())}function qe(e){const t=new Date(e.year,e.month-1,e.day,12);return isNaN(t.getTime())||t.setFullYear(e.year),t}function Je(){return new Ke}let Qe=(()=>{let e=class{};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:Je,token:e,providedIn:"root"}),e})(),Ke=(()=>{let e=class extends Qe{getDaysPerWeek(){return 7}getMonths(){return[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}getNext(e,t="d",n=1){let i=qe(e),r=!0,s=i.getMonth();switch(t){case"y":i.setFullYear(i.getFullYear()+n);break;case"m":s+=n,i.setMonth(s),s%=12,s<0&&(s+=12);break;case"d":i.setDate(i.getDate()+n),r=!1;break;default:return e}return r&&i.getMonth()!==s&&i.setDate(0),Ge(i)}getPrev(e,t="d",n=1){return this.getNext(e,t,-n)}getWeekday(e){let t=qe(e).getDay();return 0===t?7:t}getWeekNumber(e,t){7===t&&(t=0);const n=qe(e[(11-t)%7]);n.setDate(n.getDate()+4-(n.getDay()||7));const i=n.getTime();return n.setMonth(0),n.setDate(1),Math.floor(Math.round((i-n.getTime())/864e5)/7)+1}getToday(){return Ge(new Date)}isValid(e){if(!(e&&je(e.year)&&je(e.month)&&je(e.day)))return!1;if(0===e.year)return!1;const t=qe(e);return!isNaN(t.getTime())&&t.getFullYear()===e.year&&t.getMonth()+1===e.month&&t.getDate()===e.day}};return e.\u0275fac=function(t){return Xn(t||e)},e.\u0275prov=i.Ib({token:e,factory:function(t){return e.\u0275fac(t)}}),e})();function Ze(e,t){return!function(e,t){return!e&&!t||!!e&&!!t&&e.equals(t)}(e,t)}function Xe(e,t){return!(!e&&!t||e&&t&&e.year===t.year&&e.month===t.month)}function et(e,t,n){return e&&t&&e.before(t)?t:e&&n&&e.after(n)?n:e||null}function tt(e,t){const{minDate:n,maxDate:i,disabled:r,markDisabled:s}=t;return!(null==e||r||s&&s(e,{year:e.year,month:e.month})||n&&e.before(n)||i&&e.after(i))}let nt=(()=>{let e=class{getDayNumerals(e){return""+e.day}getWeekNumerals(e){return""+e}getYearNumerals(e){return""+e}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return e=Object(i.dc)(i.v),new it(e);var e},token:e,providedIn:"root"}),e})(),it=(()=>{let e=class extends nt{constructor(e){super(),this._locale=e;const t=Object(r.F)(e,r.g.Standalone,r.B.Short);this._weekdaysShort=t.map((e,n)=>t[(n+1)%7]),this._monthsShort=Object(r.H)(e,r.g.Standalone,r.B.Abbreviated),this._monthsFull=Object(r.H)(e,r.g.Standalone,r.B.Wide)}getWeekdayShortName(e){return this._weekdaysShort[e-1]||""}getMonthShortName(e){return this._monthsShort[e-1]||""}getMonthFullName(e){return this._monthsFull[e-1]||""}getDayAriaLabel(e){const t=new Date(e.year,e.month-1,e.day);return Object(r.E)(t,"fullDate",this._locale)}};return e.\u0275fac=function(t){return new(t||e)(i.dc(i.v))},e.\u0275prov=i.Ib({token:e,factory:function(t){return e.\u0275fac(t)}}),e})(),rt=(()=>{let e=class{constructor(e,t){this._calendar=e,this._i18n=t,this._VALIDATORS={dayTemplateData:e=>{if(this._state.dayTemplateData!==e)return{dayTemplateData:e}},displayMonths:e=>{if(je(e=Ae(e))&&e>0&&this._state.displayMonths!==e)return{displayMonths:e}},disabled:e=>{if(this._state.disabled!==e)return{disabled:e}},firstDayOfWeek:e=>{if(je(e=Ae(e))&&e>=0&&this._state.firstDayOfWeek!==e)return{firstDayOfWeek:e}},focusVisible:e=>{if(this._state.focusVisible!==e&&!this._state.disabled)return{focusVisible:e}},markDisabled:e=>{if(this._state.markDisabled!==e)return{markDisabled:e}},maxDate:e=>{const t=this.toValidDate(e,null);if(Ze(this._state.maxDate,t))return{maxDate:t}},minDate:e=>{const t=this.toValidDate(e,null);if(Ze(this._state.minDate,t))return{minDate:t}},navigation:e=>{if(this._state.navigation!==e)return{navigation:e}},outsideDays:e=>{if(this._state.outsideDays!==e)return{outsideDays:e}}},this._model$=new o.a,this._dateSelect$=new o.a,this._state={dayTemplateData:null,markDisabled:null,maxDate:null,minDate:null,disabled:!1,displayMonths:1,firstDate:null,firstDayOfWeek:1,lastDate:null,focusDate:null,focusVisible:!1,months:[],navigation:"select",outsideDays:"visible",prevDisabled:!1,nextDisabled:!1,selectedDate:null,selectBoxes:{years:[],months:[]}}}get model$(){return this._model$.pipe(Object(v.a)(e=>e.months.length>0))}get dateSelect$(){return this._dateSelect$.pipe(Object(v.a)(e=>null!==e))}set(e){let t=Object.keys(e).map(t=>this._VALIDATORS[t](e[t])).reduce((e,t)=>Object.assign(Object.assign({},e),t),{});Object.keys(t).length>0&&this._nextState(t)}focus(e){const t=this.toValidDate(e,null);null!=t&&!this._state.disabled&&Ze(this._state.focusDate,t)&&this._nextState({focusDate:e})}focusSelect(){tt(this._state.focusDate,this._state)&&this.select(this._state.focusDate,{emitEvent:!0})}open(e){const t=this.toValidDate(e,this._calendar.getToday());null==t||this._state.disabled||this._state.firstDate&&!Xe(this._state.firstDate,t)||this._nextState({firstDate:t})}select(e,t={}){const n=this.toValidDate(e,null);null==n||this._state.disabled||(Ze(this._state.selectedDate,n)&&this._nextState({selectedDate:n}),t.emitEvent&&tt(n,this._state)&&this._dateSelect$.next(n))}toValidDate(e,t){const n=Ue.from(e);return void 0===t&&(t=this._calendar.getToday()),this._calendar.isValid(n)?n:t}getMonth(e){for(let t of this._state.months)if(e.month===t.number&&e.year===t.year)return t;throw new Error(`month ${e.month} of year ${e.year} not found`)}_nextState(e){const t=this._updateState(e);this._patchContexts(t),this._state=t,this._model$.next(this._state)}_patchContexts(e){const{months:t,displayMonths:n,selectedDate:i,focusDate:r,focusVisible:s,disabled:o,outsideDays:a}=e;e.months.forEach(e=>{e.weeks.forEach(c=>{c.days.forEach(c=>{r&&(c.context.focused=r.equals(c.date)&&s),c.tabindex=!o&&r&&c.date.equals(r)&&r.month===e.number?0:-1,!0===o&&(c.context.disabled=!0),void 0!==i&&(c.context.selected=null!==i&&i.equals(c.date)),e.number!==c.date.month&&(c.hidden="hidden"===a||"collapsed"===a||n>1&&c.date.after(t[0].firstDate)&&c.date.before(t[n-1].lastDate))})})})}_updateState(e){const t=Object.assign({},this._state,e);let n=t.firstDate;if(("minDate"in e||"maxDate"in e)&&(function(e,t){if(t&&e&&t.before(e))throw new Error(`'maxDate' ${t} should be greater than 'minDate' ${e}`)}(t.minDate,t.maxDate),t.focusDate=et(t.focusDate,t.minDate,t.maxDate),t.firstDate=et(t.firstDate,t.minDate,t.maxDate),n=t.focusDate),"disabled"in e&&(t.focusVisible=!1),"selectedDate"in e&&0===this._state.months.length&&(n=t.selectedDate),"focusVisible"in e)return t;if("focusDate"in e&&(t.focusDate=et(t.focusDate,t.minDate,t.maxDate),n=t.focusDate,0!==t.months.length&&t.focusDate&&!t.focusDate.before(t.firstDate)&&!t.focusDate.after(t.lastDate)))return t;if("firstDate"in e&&(t.firstDate=et(t.firstDate,t.minDate,t.maxDate),n=t.firstDate),n){const i=function(e,t,n,i,r){const{displayMonths:s,months:o}=n,a=o.splice(0,o.length);return Array.from({length:s},(n,i)=>{const s=Object.assign(e.getNext(t,"m",i),{day:1});if(o[i]=null,!r){const e=a.findIndex(e=>e.firstDate.equals(s));-1!==e&&(o[i]=a.splice(e,1)[0])}return s}).forEach((t,r)=>{null===o[r]&&(o[r]=function(e,t,n,i,r={}){const{dayTemplateData:s,minDate:o,maxDate:a,firstDayOfWeek:c,markDisabled:l,outsideDays:u}=n,d=e.getToday();r.firstDate=null,r.lastDate=null,r.number=t.month,r.year=t.year,r.weeks=r.weeks||[],r.weekdays=r.weekdays||[],t=function(e,t,n){const i=e.getDaysPerWeek(),r=new Ue(t.year,t.month,1),s=e.getWeekday(r)%i;return e.getPrev(r,"d",(i+s-n)%i)}(e,t,c);for(let h=0;h<e.getWeeksPerMonth();h++){let n=r.weeks[h];n||(n=r.weeks[h]={number:0,days:[],collapsed:!0});const f=n.days;for(let c=0;c<e.getDaysPerWeek();c++){0===h&&(r.weekdays[c]=e.getWeekday(t));const n=new Ue(t.year,t.month,t.day),u=e.getNext(n),p=i.getDayAriaLabel(n);let m=!!(o&&n.before(o)||a&&n.after(a));!m&&l&&(m=l(n,{month:r.number,year:r.year}));let b=n.equals(d),g=s?s(n,{month:r.number,year:r.year}):void 0;null===r.firstDate&&n.month===r.number&&(r.firstDate=n),n.month===r.number&&u.month!==r.number&&(r.lastDate=n);let _=f[c];_||(_=f[c]={}),_.date=n,_.context=Object.assign(_.context||{},{$implicit:n,date:n,data:g,currentMonth:r.number,currentYear:r.year,disabled:m,focused:!1,selected:!1,today:b}),_.tabindex=-1,_.ariaLabel=p,_.hidden=!1,t=u}n.number=e.getWeekNumber(f.map(e=>e.date),c),n.collapsed="collapsed"===u&&f[0].date.month!==r.number&&f[f.length-1].date.month!==r.number}return r}(e,t,n,i,a.shift()||{}))}),o}(this._calendar,n,t,this._i18n,"dayTemplateData"in e||"firstDayOfWeek"in e||"markDisabled"in e||"minDate"in e||"maxDate"in e||"disabled"in e||"outsideDays"in e);t.months=i,t.firstDate=i[0].firstDate,t.lastDate=i[i.length-1].lastDate,"selectedDate"in e&&!tt(t.selectedDate,t)&&(t.selectedDate=null),"firstDate"in e&&(!t.focusDate||t.focusDate.before(t.firstDate)||t.focusDate.after(t.lastDate))&&(t.focusDate=n);const r=!this._state.firstDate||this._state.firstDate.year!==t.firstDate.year,s=!this._state.firstDate||this._state.firstDate.month!==t.firstDate.month;"select"===t.navigation?(("minDate"in e||"maxDate"in e||0===t.selectBoxes.years.length||r)&&(t.selectBoxes.years=function(e,t,n){if(!e)return[];const i=t?Math.max(t.year,e.year-500):e.year-10,r=(n?Math.min(n.year,e.year+500):e.year+10)-i+1,s=Array(r);for(let o=0;o<r;o++)s[o]=i+o;return s}(t.firstDate,t.minDate,t.maxDate)),("minDate"in e||"maxDate"in e||0===t.selectBoxes.months.length||r)&&(t.selectBoxes.months=function(e,t,n,i){if(!t)return[];let r=e.getMonths(t.year);if(n&&t.year===n.year){const e=r.findIndex(e=>e===n.month);r=r.slice(e)}if(i&&t.year===i.year){const e=r.findIndex(e=>e===i.month);r=r.slice(0,e+1)}return r}(this._calendar,t.firstDate,t.minDate,t.maxDate))):t.selectBoxes={years:[],months:[]},"arrows"!==t.navigation&&"select"!==t.navigation||!(s||r||"minDate"in e||"maxDate"in e||"disabled"in e)||(t.prevDisabled=t.disabled||function(e,t,n){const i=Object.assign(e.getPrev(t,"m"),{day:1});return null!=n&&(i.year===n.year&&i.month<n.month||i.year<n.year&&1===n.month)}(this._calendar,t.firstDate,t.minDate),t.nextDisabled=t.disabled||function(e,t,n){const i=Object.assign(e.getNext(t,"m"),{day:1});return null!=n&&i.after(n)}(this._calendar,t.lastDate,t.maxDate))}return t}};return e.\u0275fac=function(t){return new(t||e)(i.dc(Qe),i.dc(nt))},e.\u0275prov=i.Ib({token:e,factory:function(t){return e.\u0275fac(t)}}),e})();var st=function(e){return e[e.PREV=0]="PREV",e[e.NEXT=1]="NEXT",e}({});let ot=(()=>{let e=class{constructor(){this.displayMonths=1,this.firstDayOfWeek=1,this.navigation="select",this.outsideDays="visible",this.showWeekdays=!0,this.showWeekNumbers=!1}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return new e},token:e,providedIn:"root"}),e})();function at(){return new lt}let ct=(()=>{let e=class{};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:at,token:e,providedIn:"root"}),e})(),lt=(()=>{let e=class extends ct{fromModel(e){return e&&je(e.year)&&je(e.month)&&je(e.day)?{year:e.year,month:e.month,day:e.day}:null}toModel(e){return e&&je(e.year)&&je(e.month)&&je(e.day)?{year:e.year,month:e.month,day:e.day}:null}};return e.\u0275fac=function(t){return ei(t||e)},e.\u0275prov=i.Ib({token:e,factory:function(t){return e.\u0275fac(t)}}),e})();const ut={provide:s.o,useExisting:Object(i.T)(()=>ht),multi:!0};let dt=(()=>{let e=class{constructor(e){this.templateRef=e}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.L))},e.\u0275dir=i.Hb({type:e,selectors:[["ng-template","ngbDatepickerContent",""]]}),e})(),ht=(()=>{let e=class{constructor(e,t,n,r,s,a,c,l){this._service=e,this._calendar=t,this.i18n=n,this._elementRef=a,this._ngbDateAdapter=c,this._ngZone=l,this._controlValue=null,this._destroyed$=new o.a,this._publicState={},this.navigate=new i.o,this.dateSelect=new i.o,this.select=this.dateSelect,this.onChange=e=>{},this.onTouched=()=>{},["dayTemplate","dayTemplateData","displayMonths","firstDayOfWeek","footerTemplate","markDisabled","minDate","maxDate","navigation","outsideDays","showWeekdays","showWeekNumbers","startDate"].forEach(e=>this[e]=r[e]),e.dateSelect$.pipe(Object(y.a)(this._destroyed$)).subscribe(e=>{this.dateSelect.emit(e)}),e.model$.pipe(Object(y.a)(this._destroyed$)).subscribe(e=>{const t=e.firstDate,n=this.model?this.model.firstDate:null;this._publicState={maxDate:e.maxDate,minDate:e.minDate,firstDate:e.firstDate,lastDate:e.lastDate,focusedDate:e.focusDate,months:e.months.map(e=>e.firstDate)};let i=!1;if(!t.equals(n)&&(this.navigate.emit({current:n?{year:n.year,month:n.month}:null,next:{year:t.year,month:t.month},preventDefault:()=>i=!0}),i&&null!==n))return void this._service.open(n);const r=e.selectedDate,o=e.focusDate,a=this.model?this.model.focusDate:null;this.model=e,Ze(r,this._controlValue)&&(this._controlValue=r,this.onTouched(),this.onChange(this._ngbDateAdapter.toModel(r))),Ze(o,a)&&a&&e.focusVisible&&this.focus(),s.markForCheck()})}get state(){return this._publicState}get calendar(){return this._calendar}focusDate(e){this._service.focus(Ue.from(e))}focusSelect(){this._service.focusSelect()}focus(){this._ngZone.onStable.asObservable().pipe(Object(w.a)(1)).subscribe(()=>{const e=this._elementRef.nativeElement.querySelector('div.ngb-dp-day[tabindex="0"]');e&&e.focus()})}navigateTo(e){this._service.open(Ue.from(e?e.day?e:Object.assign(Object.assign({},e),{day:1}):null))}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{const e=Object(c.a)(this._contentEl.nativeElement,"focusin"),t=Object(c.a)(this._contentEl.nativeElement,"focusout"),{nativeElement:n}=this._elementRef;Object(l.a)(e,t).pipe(Object(v.a)(({target:e,relatedTarget:t})=>!(ze(e,"ngb-dp-day")&&ze(t,"ngb-dp-day")&&n.contains(e)&&n.contains(t))),Object(y.a)(this._destroyed$)).subscribe(({type:e})=>this._ngZone.run(()=>this._service.set({focusVisible:"focusin"===e})))})}ngOnDestroy(){this._destroyed$.next()}ngOnInit(){if(void 0===this.model){const e={};["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays"].forEach(t=>e[t]=this[t]),this._service.set(e),this.navigateTo(this.startDate)}this.dayTemplate||(this.dayTemplate=this._defaultDayTemplate)}ngOnChanges(e){const t={};if(["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays"].filter(t=>t in e).forEach(e=>t[e]=this[e]),this._service.set(t),"startDate"in e){const{currentValue:t,previousValue:n}=e.startDate;Xe(n,t)&&this.navigateTo(this.startDate)}}onDateSelect(e){this._service.focus(e),this._service.select(e,{emitEvent:!0})}onNavigateDateSelect(e){this._service.open(e)}onNavigateEvent(e){switch(e){case st.PREV:this._service.open(this._calendar.getPrev(this.model.firstDate,"m",1));break;case st.NEXT:this._service.open(this._calendar.getNext(this.model.firstDate,"m",1))}}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._service.set({disabled:e})}writeValue(e){this._controlValue=Ue.from(this._ngbDateAdapter.fromModel(e)),this._service.select(this._controlValue)}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(rt),i.Mb(Qe),i.Mb(nt),i.Mb(ot),i.Mb(i.h),i.Mb(i.m),i.Mb(ct),i.Mb(i.A))},e.\u0275cmp=i.Gb({type:e,selectors:[["ngb-datepicker"]],contentQueries:function(e,t,n){var r;1&e&&i.Ic(n,dt,!0),2&e&&i.zc(r=i.hc())&&(t.contentTemplate=r.first)},viewQuery:function(e,t){var n;1&e&&(i.Jc(L,!0),i.Jc(R,!0)),2&e&&(i.zc(n=i.hc())&&(t._defaultDayTemplate=n.first),i.zc(n=i.hc())&&(t._contentEl=n.first))},inputs:{dayTemplate:"dayTemplate",dayTemplateData:"dayTemplateData",displayMonths:"displayMonths",firstDayOfWeek:"firstDayOfWeek",footerTemplate:"footerTemplate",markDisabled:"markDisabled",maxDate:"maxDate",minDate:"minDate",navigation:"navigation",outsideDays:"outsideDays",showWeekdays:"showWeekdays",showWeekNumbers:"showWeekNumbers",startDate:"startDate"},outputs:{navigate:"navigate",dateSelect:"dateSelect",select:"select"},exportAs:["ngbDatepicker"],features:[i.xb([ut,rt]),i.wb],decls:10,vars:5,consts:[["defaultDayTemplate",""],["defaultContentTemplate",""],[1,"ngb-dp-header"],[3,"date","months","disabled","showSelect","prevDisabled","nextDisabled","selectBoxes","navigate","select",4,"ngIf"],[1,"ngb-dp-content"],["content",""],[3,"ngTemplateOutlet"],["ngbDatepickerDayView","",3,"date","currentMonth","selected","disabled","focused"],["class","ngb-dp-month",4,"ngFor","ngForOf"],[1,"ngb-dp-month"],["class","ngb-dp-month-name",4,"ngIf"],[3,"month"],[1,"ngb-dp-month-name"],[3,"date","months","disabled","showSelect","prevDisabled","nextDisabled","selectBoxes","navigate","select"]],template:function(e,t){if(1&e&&(i.Mc(0,E,1,5,"ng-template",null,0,i.Nc),i.Mc(2,P,1,1,"ng-template",null,1,i.Nc),i.Sb(4,"div",2),i.Mc(5,N,1,7,"ngb-datepicker-navigation",3),i.Rb(),i.Sb(6,"div",4,5),i.Mc(8,j,0,0,"ng-template",6),i.Rb(),i.Mc(9,F,0,0,"ng-template",6)),2&e){const e=i.Ac(3);i.yb(5),i.pc("ngIf","none"!==t.navigation),i.yb(1),i.Eb("ngb-dp-months",!t.contentTemplate),i.yb(2),i.pc("ngTemplateOutlet",(null==t.contentTemplate?null:t.contentTemplate.templateRef)||e),i.yb(1),i.pc("ngTemplateOutlet",t.footerTemplate)}},directives:function(){return[r.r,r.w,Pt,r.q,mt,bt]},styles:["ngb-datepicker{border:1px solid #dfdfdf;border-radius:.25rem;display:inline-block}ngb-datepicker-month{pointer-events:auto}ngb-datepicker.dropdown-menu{padding:0}.ngb-dp-body{z-index:1050}.ngb-dp-header{border-bottom:0;border-radius:.25rem .25rem 0 0;padding-top:.25rem;background-color:#f8f9fa;background-color:var(--light)}.ngb-dp-months{display:-ms-flexbox;display:flex}.ngb-dp-month{pointer-events:none}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center;background-color:#f8f9fa;background-color:var(--light)}.ngb-dp-month+.ngb-dp-month .ngb-dp-month-name,.ngb-dp-month+.ngb-dp-month .ngb-dp-week{padding-left:1rem}.ngb-dp-month:last-child .ngb-dp-week{padding-right:.25rem}.ngb-dp-month:first-child .ngb-dp-week{padding-left:.25rem}.ngb-dp-month .ngb-dp-week:last-child{padding-bottom:.25rem}"],encapsulation:2,changeDetection:0}),e})();var ft=function(e){return e[e.Tab=9]="Tab",e[e.Enter=13]="Enter",e[e.Escape=27]="Escape",e[e.Space=32]="Space",e[e.PageUp=33]="PageUp",e[e.PageDown=34]="PageDown",e[e.End=35]="End",e[e.Home=36]="Home",e[e.ArrowLeft=37]="ArrowLeft",e[e.ArrowUp=38]="ArrowUp",e[e.ArrowRight=39]="ArrowRight",e[e.ArrowDown=40]="ArrowDown",e}({});let pt=(()=>{let e=class{processKey(e,t){const{state:n,calendar:i}=t;switch(e.which){case ft.PageUp:t.focusDate(i.getPrev(n.focusedDate,e.shiftKey?"y":"m",1));break;case ft.PageDown:t.focusDate(i.getNext(n.focusedDate,e.shiftKey?"y":"m",1));break;case ft.End:t.focusDate(e.shiftKey?n.maxDate:n.lastDate);break;case ft.Home:t.focusDate(e.shiftKey?n.minDate:n.firstDate);break;case ft.ArrowLeft:t.focusDate(i.getPrev(n.focusedDate,"d",1));break;case ft.ArrowUp:t.focusDate(i.getPrev(n.focusedDate,"d",i.getDaysPerWeek()));break;case ft.ArrowRight:t.focusDate(i.getNext(n.focusedDate,"d",1));break;case ft.ArrowDown:t.focusDate(i.getNext(n.focusedDate,"d",i.getDaysPerWeek()));break;case ft.Enter:case ft.Space:t.focusSelect();break;default:return}e.preventDefault(),e.stopPropagation()}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return new e},token:e,providedIn:"root"}),e})(),mt=(()=>{let e=class{constructor(e,t,n,i){this.i18n=e,this.datepicker=t,this._keyboardService=n,this._service=i}set month(e){this.viewModel=this._service.getMonth(e)}onKeyDown(e){this._keyboardService.processKey(e,this.datepicker)}doSelect(e){e.context.disabled||e.hidden||this.datepicker.onDateSelect(e.date)}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(nt),i.Mb(ht),i.Mb(pt),i.Mb(rt))},e.\u0275cmp=i.Gb({type:e,selectors:[["ngb-datepicker-month"]],hostAttrs:["role","grid"],hostBindings:function(e,t){1&e&&i.gc("keydown",(function(e){return t.onKeyDown(e)}))},inputs:{month:"month"},decls:2,vars:2,consts:[["class","ngb-dp-week ngb-dp-weekdays","role","row",4,"ngIf"],["ngFor","",3,"ngForOf"],["role","row",1,"ngb-dp-week","ngb-dp-weekdays"],["class","ngb-dp-weekday ngb-dp-showweek",4,"ngIf"],["class","ngb-dp-weekday small","role","columnheader",4,"ngFor","ngForOf"],[1,"ngb-dp-weekday","ngb-dp-showweek"],["role","columnheader",1,"ngb-dp-weekday","small"],["class","ngb-dp-week","role","row",4,"ngIf"],["role","row",1,"ngb-dp-week"],["class","ngb-dp-week-number small text-muted",4,"ngIf"],["class","ngb-dp-day","role","gridcell",3,"disabled","tabindex","hidden","ngb-dp-today","click",4,"ngFor","ngForOf"],[1,"ngb-dp-week-number","small","text-muted"],["role","gridcell",1,"ngb-dp-day",3,"tabindex","click"],[3,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,t){1&e&&(i.Mc(0,$,3,2,"div",0),i.Mc(1,G,1,1,"ng-template",1)),2&e&&(i.pc("ngIf",t.datepicker.showWeekdays),i.yb(1),i.pc("ngForOf",t.viewModel.weeks))},directives:[r.r,r.q,r.w],styles:['ngb-datepicker-month{display:block}.ngb-dp-week-number,.ngb-dp-weekday{line-height:2rem;text-align:center;font-style:italic}.ngb-dp-weekday{color:#5bc0de;color:var(--info)}.ngb-dp-week{border-radius:.25rem;display:-ms-flexbox;display:flex}.ngb-dp-weekdays{border-bottom:1px solid rgba(0,0,0,.125);border-radius:0;background-color:#f8f9fa;background-color:var(--light)}.ngb-dp-day,.ngb-dp-week-number,.ngb-dp-weekday{width:2rem;height:2rem}.ngb-dp-day{cursor:pointer}.ngb-dp-day.disabled,.ngb-dp-day.hidden{cursor:default;pointer-events:none}.ngb-dp-day[tabindex="0"]{z-index:1}'],encapsulation:2}),e})(),bt=(()=>{let e=class{constructor(e){this.i18n=e,this.navigation=st,this.months=[],this.navigate=new i.o,this.select=new i.o}onClickPrev(e){e.currentTarget.focus(),this.navigate.emit(this.navigation.PREV)}onClickNext(e){e.currentTarget.focus(),this.navigate.emit(this.navigation.NEXT)}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(nt))},e.\u0275cmp=i.Gb({type:e,selectors:[["ngb-datepicker-navigation"]],inputs:{months:"months",date:"date",disabled:"disabled",showSelect:"showSelect",prevDisabled:"prevDisabled",nextDisabled:"nextDisabled",selectBoxes:"selectBoxes"},outputs:{navigate:"navigate",select:"select"},decls:10,vars:4,consts:function(){return[[1,"ngb-dp-arrow"],["type","button",1,"btn","btn-link","ngb-dp-arrow-btn",3,"disabled","click",6,"aria-label","title"],["aria-label","Previous month","title","Previous month"],[1,"ngb-dp-navigation-chevron"],["class","ngb-dp-navigation-select",3,"date","disabled","months","years","select",4,"ngIf"],[4,"ngIf"],[1,"ngb-dp-arrow","right"],["aria-label","Next month","title","Next month"],[1,"ngb-dp-navigation-select",3,"date","disabled","months","years","select"],["ngFor","",3,"ngForOf"],["class","ngb-dp-arrow",4,"ngIf"],[1,"ngb-dp-month-name"]]},template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Sb(1,"button",1),i.Yb(2,2),i.gc("click",(function(e){return t.onClickPrev(e)})),i.Nb(3,"span",3),i.Rb(),i.Rb(),i.Mc(4,q,1,4,"ngb-datepicker-navigation-select",4),i.Mc(5,Z,1,1,void 0,5),i.Sb(6,"div",6),i.Sb(7,"button",1),i.Yb(8,7),i.gc("click",(function(e){return t.onClickNext(e)})),i.Nb(9,"span",3),i.Rb(),i.Rb()),2&e&&(i.yb(1),i.pc("disabled",t.prevDisabled),i.yb(3),i.pc("ngIf",t.showSelect),i.yb(1),i.pc("ngIf",!t.showSelect),i.yb(2),i.pc("disabled",t.nextDisabled))},directives:function(){return[r.r,Nt,r.q]},styles:["ngb-datepicker-navigation{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.ngb-dp-navigation-chevron{border-style:solid;border-width:.2em .2em 0 0;display:inline-block;width:.75em;height:.75em;margin-left:.25em;margin-right:.15em;-webkit-transform:rotate(-135deg);transform:rotate(-135deg)}.right .ngb-dp-navigation-chevron{-webkit-transform:rotate(45deg);transform:rotate(45deg);margin-left:.15em;margin-right:.25em}.ngb-dp-arrow{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;padding-right:0;padding-left:0;margin:0;width:2rem;height:2rem}.ngb-dp-arrow.right{-ms-flex-pack:end;justify-content:flex-end}.ngb-dp-arrow-btn{padding:0 .25rem;margin:0 .5rem;border:none;background-color:transparent;z-index:1}.ngb-dp-arrow-btn:focus{outline-width:1px;outline-style:auto}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.ngb-dp-arrow-btn:focus{outline-style:solid}}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center}.ngb-dp-navigation-select{display:-ms-flexbox;display:flex;-ms-flex:1 1 9rem;flex:1 1 9rem}"],encapsulation:2,changeDetection:0}),e})();const gt=(e,t)=>!!t&&t.some(t=>t.contains(e)),_t=(e,t)=>!t||null!=function(e,t){return t?void 0===e.closest?null:e.closest(t):null}(e,t),yt=(()=>"undefined"!=typeof navigator&&!!navigator.userAgent&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2||/Android/.test(navigator.userAgent)))();function vt(e,t,n,i,r,s,o,a){var l;n&&e.runOutsideAngular((l=()=>{const l=Object(c.a)(t,"keydown").pipe(Object(y.a)(r),Object(v.a)(e=>e.which===ft.Escape),Object(S.a)(e=>e.preventDefault())),h=Object(c.a)(t,"mousedown").pipe(Object(g.a)(e=>{const t=e.target;return 2!==e.button&&!gt(t,o)&&("inside"===n?gt(t,s)&&_t(t,a):"outside"===n?!gt(t,s):_t(t,a)||!gt(t,s))}),Object(y.a)(r)),f=Object(c.a)(t,"mouseup").pipe(M(h),Object(v.a)(([e,t])=>t),Object(D.a)(0),Object(y.a)(r));(function(...e){if(1===e.length){if(!Object(u.a)(e[0]))return e[0];e=e[0]}return Object(d.a)(e,void 0).lift(new p)})([l.pipe(Object(g.a)(e=>0)),f.pipe(Object(g.a)(e=>1))]).subscribe(t=>e.run(()=>i(t)))},yt?()=>setTimeout(()=>l(),100):l))}const wt=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function St(e){const t=Array.from(e.querySelectorAll(wt)).filter(e=>-1!==e.tabIndex);return[t[0],t[t.length-1]]}const Mt=(e,t,n,i=!1)=>{e.runOutsideAngular(()=>{const e=Object(c.a)(t,"focusin").pipe(Object(y.a)(n),Object(g.a)(e=>e.target));Object(c.a)(t,"keydown").pipe(Object(y.a)(n),Object(v.a)(e=>e.which===ft.Tab),M(e)).subscribe(([e,n])=>{const[i,r]=St(t);n!==i&&n!==t||!e.shiftKey||(r.focus(),e.preventDefault()),n!==r||e.shiftKey||(i.focus(),e.preventDefault())}),i&&Object(c.a)(t,"click").pipe(Object(y.a)(n),M(e),Object(g.a)(e=>e[1])).subscribe(e=>e.focus())})};class kt{getAllStyles(e){return window.getComputedStyle(e)}getStyle(e,t){return this.getAllStyles(e)[t]}isStaticPositioned(e){return"static"===(this.getStyle(e,"position")||"static")}offsetParent(e){let t=e.offsetParent||document.documentElement;for(;t&&t!==document.documentElement&&this.isStaticPositioned(t);)t=t.offsetParent;return t||document.documentElement}position(e,t=!0){let n,i={width:0,height:0,top:0,bottom:0,left:0,right:0};if("fixed"===this.getStyle(e,"position"))n=e.getBoundingClientRect(),n={top:n.top,bottom:n.bottom,left:n.left,right:n.right,height:n.height,width:n.width};else{const t=this.offsetParent(e);n=this.offset(e,!1),t!==document.documentElement&&(i=this.offset(t,!1)),i.top+=t.clientTop,i.left+=t.clientLeft}return n.top-=i.top,n.bottom-=i.top,n.left-=i.left,n.right-=i.left,t&&(n.top=Math.round(n.top),n.bottom=Math.round(n.bottom),n.left=Math.round(n.left),n.right=Math.round(n.right)),n}offset(e,t=!0){const n=e.getBoundingClientRect(),i=window.pageYOffset-document.documentElement.clientTop,r=window.pageXOffset-document.documentElement.clientLeft;let s={height:n.height||e.offsetHeight,width:n.width||e.offsetWidth,top:n.top+i,bottom:n.bottom+i,left:n.left+r,right:n.right+r};return t&&(s.height=Math.round(s.height),s.width=Math.round(s.width),s.top=Math.round(s.top),s.bottom=Math.round(s.bottom),s.left=Math.round(s.left),s.right=Math.round(s.right)),s}positionElements(e,t,n,i){const[r="top",s="center"]=n.split("-"),o=i?this.offset(e,!1):this.position(e,!1),a=this.getAllStyles(t),c=parseFloat(a.marginTop),l=parseFloat(a.marginBottom),u=parseFloat(a.marginLeft),d=parseFloat(a.marginRight);let h=0,f=0;switch(r){case"top":h=o.top-(t.offsetHeight+c+l);break;case"bottom":h=o.top+o.height;break;case"left":f=o.left-(t.offsetWidth+u+d);break;case"right":f=o.left+o.width}switch(s){case"top":h=o.top;break;case"bottom":h=o.top+o.height-t.offsetHeight;break;case"left":f=o.left;break;case"right":f=o.left+o.width-t.offsetWidth;break;case"center":"top"===r||"bottom"===r?f=o.left+o.width/2-t.offsetWidth/2:h=o.top+o.height/2-t.offsetHeight/2}t.style.transform=`translate(${Math.round(f)}px, ${Math.round(h)}px)`;const p=t.getBoundingClientRect(),m=document.documentElement,b=window.innerHeight||m.clientHeight,g=window.innerWidth||m.clientWidth;return p.left>=0&&p.top>=0&&p.right<=g&&p.bottom<=b}}const xt=/\s+/,Dt=new kt;function Tt(e,t,n,i,r){let s=Array.isArray(n)?n:n.split(xt);const o=["top","bottom","left","right","top-left","top-right","bottom-left","bottom-right","left-top","left-bottom","right-top","right-bottom"],a=t.classList,c=e=>{const[t,n]=e.split("-"),i=[];return r&&(i.push(`${r}-${t}`),n&&i.push(`${r}-${t}-${n}`),i.forEach(e=>{a.add(e)})),i};r&&o.forEach(e=>{a.remove(`${r}-${e}`)});let l=s.findIndex(e=>"auto"===e);l>=0&&o.forEach((function(e){null==s.find(t=>-1!==t.search("^"+e))&&s.splice(l++,1,e)}));const u=t.style;u.position="absolute",u.top="0",u.left="0",u["will-change"]="transform";let d=null,h=!1;for(d of s){let n=c(d);if(Dt.positionElements(e,t,d,i)){h=!0;break}r&&n.forEach(e=>{a.remove(e)})}return h||(d=s[0],c(d),Dt.positionElements(e,t,d,i)),d}function Ct(){return new Lt}let Ot=(()=>{let e=class{};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:Ct,token:e,providedIn:"root"}),e})(),Lt=(()=>{let e=class extends Ot{parse(e){if(null!=e){const t=e.trim().split("-");if(1===t.length&&Ne(t[0]))return{year:Ae(t[0]),month:null,day:null};if(2===t.length&&Ne(t[0])&&Ne(t[1]))return{year:Ae(t[0]),month:Ae(t[1]),day:null};if(3===t.length&&Ne(t[0])&&Ne(t[1])&&Ne(t[2]))return{year:Ae(t[0]),month:Ae(t[1]),day:Ae(t[2])}}return null}format(e){return e?`${e.year}-${Ne(e.month)?Ye(e.month):""}-${Ne(e.day)?Ye(e.day):""}`:""}};return e.\u0275fac=function(t){return ti(t||e)},e.\u0275prov=i.Ib({token:e,factory:function(t){return e.\u0275fac(t)}}),e})(),Rt=(()=>{let e=class extends ot{constructor(){super(...arguments),this.autoClose=!0,this.placement=["bottom-left","bottom-right","top-left","top-right"],this.restoreFocus=!0}};return e.\u0275fac=function(t){return ni(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return new e},token:e,providedIn:"root"}),e})();const Et={provide:s.o,useExisting:Object(i.T)(()=>It),multi:!0},At={provide:s.n,useExisting:Object(i.T)(()=>It),multi:!0};let It=(()=>{let e=class{constructor(e,t,n,r,s,o,a,c,l,u,d){this._parserFormatter=e,this._elRef=t,this._vcRef=n,this._renderer=r,this._cfr=s,this._ngZone=o,this._calendar=a,this._dateAdapter=c,this._document=l,this._changeDetector=u,this._cRef=null,this._disabled=!1,this._elWithFocus=null,this._model=null,this.dateSelect=new i.o,this.navigate=new i.o,this.closed=new i.o,this._onChange=e=>{},this._onTouched=()=>{},this._validatorChange=()=>{},["autoClose","container","positionTarget","placement"].forEach(e=>this[e]=d[e]),this._zoneSubscription=o.onStable.subscribe(()=>this._updatePopupPosition())}get disabled(){return this._disabled}set disabled(e){this._disabled=""===e||e&&"false"!==e,this.isOpen()&&this._cRef.instance.setDisabledState(this._disabled)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}registerOnValidatorChange(e){this._validatorChange=e}setDisabledState(e){this.disabled=e}validate(e){const{value:t}=e;if(null!=t){const e=this._fromDateStruct(this._dateAdapter.fromModel(t));if(!e)return{ngbDate:{invalid:t}};if(this.minDate&&e.before(Ue.from(this.minDate)))return{ngbDate:{minDate:{minDate:this.minDate,actual:t}}};if(this.maxDate&&e.after(Ue.from(this.maxDate)))return{ngbDate:{maxDate:{maxDate:this.maxDate,actual:t}}}}return null}writeValue(e){this._model=this._fromDateStruct(this._dateAdapter.fromModel(e)),this._writeModelValue(this._model)}manualDateChange(e,t=!1){const n=e!==this._inputValue;n&&(this._inputValue=e,this._model=this._fromDateStruct(this._parserFormatter.parse(e))),!n&&t||this._onChange(this._model?this._dateAdapter.toModel(this._model):""===e?null:e),t&&this._model&&this._writeModelValue(this._model)}isOpen(){return!!this._cRef}open(){if(!this.isOpen()){const e=this._cfr.resolveComponentFactory(ht);this._cRef=this._vcRef.createComponent(e),this._applyPopupStyling(this._cRef.location.nativeElement),this._applyDatepickerInputs(this._cRef.instance),this._subscribeForDatepickerOutputs(this._cRef.instance),this._cRef.instance.ngOnInit(),this._cRef.instance.writeValue(this._dateAdapter.toModel(this._model)),this._cRef.instance.registerOnChange(e=>{this.writeValue(e),this._onChange(e),this._onTouched()}),this._cRef.changeDetectorRef.detectChanges(),this._cRef.instance.setDisabledState(this.disabled),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._cRef.location.nativeElement),this._elWithFocus=this._document.activeElement,Mt(this._ngZone,this._cRef.location.nativeElement,this.closed,!0),this._cRef.instance.focus(),vt(this._ngZone,this._document,this.autoClose,()=>this.close(),this.closed,[],[this._elRef.nativeElement,this._cRef.location.nativeElement])}}close(){if(this.isOpen()){this._vcRef.remove(this._vcRef.indexOf(this._cRef.hostView)),this._cRef=null,this.closed.emit(),this._changeDetector.markForCheck();let e=this._elWithFocus;Pe(this.restoreFocus)?e=this._document.querySelector(this.restoreFocus):void 0!==this.restoreFocus&&(e=this.restoreFocus),e&&e.focus?e.focus():this._document.body.focus()}}toggle(){this.isOpen()?this.close():this.open()}navigateTo(e){this.isOpen()&&this._cRef.instance.navigateTo(e)}onBlur(){this._onTouched()}onFocus(){this._elWithFocus=this._elRef.nativeElement}ngOnChanges(e){(e.minDate||e.maxDate)&&(this._validatorChange(),this.isOpen()&&(e.minDate&&(this._cRef.instance.minDate=this.minDate),e.maxDate&&(this._cRef.instance.maxDate=this.maxDate),this._cRef.instance.ngOnChanges(e)))}ngOnDestroy(){this.close(),this._zoneSubscription.unsubscribe()}_applyDatepickerInputs(e){["dayTemplate","dayTemplateData","displayMonths","firstDayOfWeek","footerTemplate","markDisabled","minDate","maxDate","navigation","outsideDays","showNavigation","showWeekdays","showWeekNumbers"].forEach(t=>{void 0!==this[t]&&(e[t]=this[t])}),e.startDate=this.startDate||this._model}_applyPopupStyling(e){this._renderer.addClass(e,"dropdown-menu"),this._renderer.addClass(e,"show"),"body"===this.container&&this._renderer.addClass(e,"ngb-dp-body")}_subscribeForDatepickerOutputs(e){e.navigate.subscribe(e=>this.navigate.emit(e)),e.dateSelect.subscribe(e=>{this.dateSelect.emit(e),!0!==this.autoClose&&"inside"!==this.autoClose||this.close()})}_writeModelValue(e){const t=this._parserFormatter.format(e);this._inputValue=t,this._renderer.setProperty(this._elRef.nativeElement,"value",t),this.isOpen()&&(this._cRef.instance.writeValue(this._dateAdapter.toModel(e)),this._onTouched())}_fromDateStruct(e){const t=e?new Ue(e.year,e.month,e.day):null;return this._calendar.isValid(t)?t:null}_updatePopupPosition(){if(!this._cRef)return;let e;if(e=Pe(this.positionTarget)?this._document.querySelector(this.positionTarget):this.positionTarget instanceof HTMLElement?this.positionTarget:this._elRef.nativeElement,this.positionTarget&&!e)throw new Error("ngbDatepicker could not find element declared in [positionTarget] to position against.");Tt(e,this._cRef.location.nativeElement,this.placement,"body"===this.container)}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(Ot),i.Mb(i.m),i.Mb(i.P),i.Mb(i.E),i.Mb(i.j),i.Mb(i.A),i.Mb(Qe),i.Mb(ct),i.Mb(r.d),i.Mb(i.h),i.Mb(Rt))},e.\u0275dir=i.Hb({type:e,selectors:[["input","ngbDatepicker",""]],hostVars:1,hostBindings:function(e,t){1&e&&i.gc("input",(function(e){return t.manualDateChange(e.target.value)}))("change",(function(e){return t.manualDateChange(e.target.value,!0)}))("focus",(function(){return t.onFocus()}))("blur",(function(){return t.onBlur()})),2&e&&i.Vb("disabled",t.disabled)},inputs:{disabled:"disabled",autoClose:"autoClose",dayTemplate:"dayTemplate",dayTemplateData:"dayTemplateData",displayMonths:"displayMonths",firstDayOfWeek:"firstDayOfWeek",footerTemplate:"footerTemplate",markDisabled:"markDisabled",minDate:"minDate",maxDate:"maxDate",navigation:"navigation",outsideDays:"outsideDays",placement:"placement",restoreFocus:"restoreFocus",showWeekdays:"showWeekdays",showWeekNumbers:"showWeekNumbers",startDate:"startDate",container:"container",positionTarget:"positionTarget"},outputs:{dateSelect:"dateSelect",navigate:"navigate",closed:"closed"},exportAs:["ngbDatepicker"],features:[i.xb([Et,At,{provide:ot,useExisting:Rt}]),i.wb]}),e})(),Pt=(()=>{let e=class{constructor(e){this.i18n=e}isMuted(){return!this.selected&&(this.date.month!==this.currentMonth||this.disabled)}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(nt))},e.\u0275cmp=i.Gb({type:e,selectors:[["","ngbDatepickerDayView",""]],hostAttrs:[1,"btn-light"],hostVars:10,hostBindings:function(e,t){2&e&&i.Eb("bg-primary",t.selected)("text-white",t.selected)("text-muted",t.isMuted())("outside",t.isMuted())("active",t.focused)},inputs:{currentMonth:"currentMonth",date:"date",disabled:"disabled",focused:"focused",selected:"selected"},attrs:X,decls:1,vars:1,template:function(e,t){1&e&&i.Oc(0),2&e&&i.Pc(t.i18n.getDayNumerals(t.date))},styles:["[ngbDatepickerDayView]{text-align:center;width:2rem;height:2rem;line-height:2rem;border-radius:.25rem;background:0 0}[ngbDatepickerDayView].outside{opacity:.5}"],encapsulation:2,changeDetection:0}),e})(),Nt=(()=>{let e=class{constructor(e,t){this.i18n=e,this._renderer=t,this.select=new i.o,this._month=-1,this._year=-1}changeMonth(e){this.select.emit(new Ue(this.date.year,Ae(e),1))}changeYear(e){this.select.emit(new Ue(Ae(e),this.date.month,1))}ngAfterViewChecked(){this.date&&(this.date.month!==this._month&&(this._month=this.date.month,this._renderer.setProperty(this.monthSelect.nativeElement,"value",this._month)),this.date.year!==this._year&&(this._year=this.date.year,this._renderer.setProperty(this.yearSelect.nativeElement,"value",this._year)))}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(nt),i.Mb(i.E))},e.\u0275cmp=i.Gb({type:e,selectors:[["ngb-datepicker-navigation-select"]],viewQuery:function(e,t){var n;1&e&&(i.Jc(ee,!0,i.m),i.Jc(te,!0,i.m)),2&e&&(i.zc(n=i.hc())&&(t.monthSelect=n.first),i.zc(n=i.hc())&&(t.yearSelect=n.first))},inputs:{date:"date",disabled:"disabled",months:"months",years:"years"},outputs:{select:"select"},decls:8,vars:4,consts:function(){return[[1,"custom-select",3,"disabled","change",6,"aria-label","title"],["month",""],["aria-label","Select month","title","Select month"],[3,"value",4,"ngFor","ngForOf"],["year",""],["aria-label","Select year","title","Select year"],[3,"value"]]},template:function(e,t){1&e&&(i.Sb(0,"select",0,1),i.Yb(2,2),i.gc("change",(function(e){return t.changeMonth(e.target.value)})),i.Mc(3,ne,2,3,"option",3),i.Rb(),i.Sb(4,"select",0,4),i.Yb(6,5),i.gc("change",(function(e){return t.changeYear(e.target.value)})),i.Mc(7,ie,2,2,"option",3),i.Rb()),2&e&&(i.pc("disabled",t.disabled),i.yb(3),i.pc("ngForOf",t.months),i.yb(1),i.pc("disabled",t.disabled),i.yb(3),i.pc("ngForOf",t.years))},directives:[r.q,s.u,s.B],styles:["ngb-datepicker-navigation-select>.custom-select{-ms-flex:1 1 auto;flex:1 1 auto;padding:0 .5rem;font-size:.875rem;height:1.85rem}ngb-datepicker-navigation-select>.custom-select:focus{z-index:1}ngb-datepicker-navigation-select>.custom-select::-ms-value{background-color:transparent!important}"],encapsulation:2,changeDetection:0}),e})(),jt=(()=>{let e=class{};return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[r.c,s.m]]}),e})(),Ft=(()=>{let e=class{constructor(){this.autoClose=!0,this.placement=["bottom-left","bottom-right","top-left","top-right"]}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return new e},token:e,providedIn:"root"}),e})();var Yt;let zt=(()=>{let e=class{};return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=i.Hb({type:e,selectors:[["",8,"navbar"]]}),e})(),$t=(()=>{let e=class{constructor(e){this.elementRef=e,this._disabled=!1}set disabled(e){this._disabled=""===e||!0===e}get disabled(){return this._disabled}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngbDropdownItem",""]],hostAttrs:[1,"dropdown-item"],hostVars:2,hostBindings:function(e,t){2&e&&i.Eb("disabled",t.disabled)},inputs:{disabled:"disabled"}}),e})(),Ht=(()=>{let e=class{constructor(e,t){this.dropdown=e,this.placement="bottom",this.isOpen=!1,this.nativeElement=t.nativeElement}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(Object(i.T)(()=>Bt)),i.Mb(i.m))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngbDropdownMenu",""]],contentQueries:function(e,t,n){var r;1&e&&i.Fb(n,$t,!1),2&e&&i.zc(r=i.hc())&&(t.menuItems=r)},hostVars:5,hostBindings:function(e,t){1&e&&i.gc("keydown.ArrowUp",(function(e){return t.dropdown.onKeyDown(e)}))("keydown.ArrowDown",(function(e){return t.dropdown.onKeyDown(e)}))("keydown.Home",(function(e){return t.dropdown.onKeyDown(e)}))("keydown.End",(function(e){return t.dropdown.onKeyDown(e)}))("keydown.Enter",(function(e){return t.dropdown.onKeyDown(e)}))("keydown.Space",(function(e){return t.dropdown.onKeyDown(e)}))("keydown.Tab",(function(e){return t.dropdown.onKeyDown(e)}))("keydown.Shift.Tab",(function(e){return t.dropdown.onKeyDown(e)})),2&e&&(i.zb("x-placement",t.placement),i.Eb("dropdown-menu",!0)("show",t.dropdown.isOpen()))}}),e})(),Wt=(()=>{let e=class{constructor(e,t){this.dropdown=e,this.nativeElement=t.nativeElement}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(Object(i.T)(()=>Bt)),i.Mb(i.m))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngbDropdownAnchor",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:1,hostBindings:function(e,t){2&e&&i.zb("aria-expanded",t.dropdown.isOpen())}}),e})(),Vt=(()=>{let e=Yt=class extends Wt{constructor(e,t){super(e,t)}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(Object(i.T)(()=>Bt)),i.Mb(i.m))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngbDropdownToggle",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:1,hostBindings:function(e,t){1&e&&i.gc("click",(function(){return t.dropdown.toggle()}))("keydown.ArrowUp",(function(e){return t.dropdown.onKeyDown(e)}))("keydown.ArrowDown",(function(e){return t.dropdown.onKeyDown(e)}))("keydown.Home",(function(e){return t.dropdown.onKeyDown(e)}))("keydown.End",(function(e){return t.dropdown.onKeyDown(e)}))("keydown.Tab",(function(e){return t.dropdown.onKeyDown(e)}))("keydown.Shift.Tab",(function(e){return t.dropdown.onKeyDown(e)})),2&e&&i.zb("aria-expanded",t.dropdown.isOpen())},features:[i.xb([{provide:Wt,useExisting:Object(i.T)(()=>Yt)}]),i.vb]}),e})(),Bt=(()=>{let e=class{constructor(e,t,n,r,s,a,c){this._changeDetector=e,this._document=n,this._ngZone=r,this._elementRef=s,this._renderer=a,this._closed$=new o.a,this._bodyContainer=null,this._open=!1,this.openChange=new i.o,this.placement=t.placement,this.container=t.container,this.autoClose=t.autoClose,this.display=c?"static":"dynamic",this._zoneSubscription=r.onStable.subscribe(()=>{this._positionMenu()})}ngAfterContentInit(){this._ngZone.onStable.pipe(Object(w.a)(1)).subscribe(()=>{this._applyPlacementClasses(),this._open&&this._setCloseHandlers()})}ngOnChanges(e){e.container&&this._open&&this._applyContainer(this.container),e.placement&&!e.placement.isFirstChange&&this._applyPlacementClasses()}isOpen(){return this._open}open(){this._open||(this._open=!0,this._applyContainer(this.container),this.openChange.emit(!0),this._setCloseHandlers(),this._anchor&&this._anchor.nativeElement.focus())}_setCloseHandlers(){vt(this._ngZone,this._document,this.autoClose,e=>{this.close(),0===e&&this._anchor.nativeElement.focus()},this._closed$,this._menu?[this._menu.nativeElement]:[],this._anchor?[this._anchor.nativeElement]:[],".dropdown-item,.dropdown-divider")}close(){this._open&&(this._open=!1,this._resetContainer(),this._closed$.next(),this.openChange.emit(!1),this._changeDetector.markForCheck())}toggle(){this.isOpen()?this.close():this.open()}ngOnDestroy(){this._resetContainer(),this._closed$.next(),this._zoneSubscription.unsubscribe()}onKeyDown(e){const t=e.which,n=this._getMenuElements();let i=-1,r=null;const s=this._isEventFromToggle(e);if(!s&&n.length&&n.forEach((t,n)=>{t.contains(e.target)&&(r=t),t===this._document.activeElement&&(i=n)}),t!==ft.Space&&t!==ft.Enter){if(t!==ft.Tab){if(s||r){if(this.open(),n.length){switch(t){case ft.ArrowDown:i=Math.min(i+1,n.length-1);break;case ft.ArrowUp:if(this._isDropup()&&-1===i){i=n.length-1;break}i=Math.max(i-1,0);break;case ft.Home:i=0;break;case ft.End:i=n.length-1}n[i].focus()}e.preventDefault()}}else if(e.target&&this.isOpen()&&this.autoClose){if(this._anchor.nativeElement===e.target)return void("body"!==this.container||e.shiftKey?e.shiftKey&&this.close():(this._renderer.setAttribute(this._menu.nativeElement,"tabindex","0"),this._menu.nativeElement.focus(),this._renderer.removeAttribute(this._menu.nativeElement,"tabindex")));if("body"===this.container){const t=this._menu.nativeElement.querySelectorAll(wt);e.shiftKey&&e.target===t[0]?(this._anchor.nativeElement.focus(),e.preventDefault()):e.shiftKey||e.target!==t[t.length-1]||(this._anchor.nativeElement.focus(),this.close())}else Object(c.a)(e.target,"focusout").pipe(Object(w.a)(1)).subscribe(({relatedTarget:e})=>{this._elementRef.nativeElement.contains(e)||this.close()})}}else!r||!0!==this.autoClose&&"inside"!==this.autoClose||Object(c.a)(r,"click").pipe(Object(w.a)(1)).subscribe(()=>this.close())}_isDropup(){return this._elementRef.nativeElement.classList.contains("dropup")}_isEventFromToggle(e){return this._anchor.nativeElement.contains(e.target)}_getMenuElements(){const e=this._menu;return null==e?[]:e.menuItems.filter(e=>!e.disabled).map(e=>e.elementRef.nativeElement)}_positionMenu(){const e=this._menu;this.isOpen()&&e&&this._applyPlacementClasses("dynamic"===this.display?Tt(this._anchor.nativeElement,this._bodyContainer||this._menu.nativeElement,this.placement,"body"===this.container):this._getFirstPlacement(this.placement))}_getFirstPlacement(e){return Array.isArray(e)?e[0]:e.split(" ")[0]}_resetContainer(){const e=this._renderer;if(this._menu){const t=this._menu.nativeElement;e.appendChild(this._elementRef.nativeElement,t),e.removeStyle(t,"position"),e.removeStyle(t,"transform")}this._bodyContainer&&(e.removeChild(this._document.body,this._bodyContainer),this._bodyContainer=null)}_applyContainer(e=null){if(this._resetContainer(),"body"===e){const e=this._renderer,t=this._menu.nativeElement,n=this._bodyContainer=this._bodyContainer||e.createElement("div");e.setStyle(n,"position","absolute"),e.setStyle(t,"position","static"),e.setStyle(n,"z-index","1050"),e.appendChild(n,t),e.appendChild(this._document.body,n)}}_applyPlacementClasses(e){const t=this._menu;if(t){e||(e=this._getFirstPlacement(this.placement));const n=this._renderer,i=this._elementRef.nativeElement;n.removeClass(i,"dropup"),n.removeClass(i,"dropdown"),t.placement="static"===this.display?null:e;const r=-1!==e.search("^top")?"dropup":"dropdown";n.addClass(i,r);const s=this._bodyContainer;s&&(n.removeClass(s,"dropup"),n.removeClass(s,"dropdown"),n.addClass(s,r))}}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.h),i.Mb(Ft),i.Mb(r.d),i.Mb(i.A),i.Mb(i.m),i.Mb(i.E),i.Mb(zt,8))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngbDropdown",""]],contentQueries:function(e,t,n){var r;1&e&&(i.Fb(n,Ht,!0),i.Fb(n,Wt,!0)),2&e&&(i.zc(r=i.hc())&&(t._menu=r.first),i.zc(r=i.hc())&&(t._anchor=r.first))},hostVars:2,hostBindings:function(e,t){2&e&&i.Eb("show",t.isOpen())},inputs:{_open:["open","_open"],placement:"placement",container:"container",autoClose:"autoClose",display:"display"},outputs:{openChange:"openChange"},exportAs:["ngbDropdown"],features:[i.wb]}),e})(),Ut=(()=>{let e=class{};return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)}}),e})(),Gt=(()=>{let e=class{constructor(){this.backdrop=!0,this.keyboard=!0}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return new e},token:e,providedIn:"root"}),e})();class qt{constructor(e,t,n){this.nodes=e,this.viewRef=t,this.componentRef=n}}class Jt{constructor(e,t,n,i,r,s){this._type=e,this._injector=t,this._viewContainerRef=n,this._renderer=i,this._componentFactoryResolver=r,this._applicationRef=s,this._windowRef=null,this._contentRef=null}open(e,t){return this._windowRef||(this._contentRef=this._getContentRef(e,t),this._windowRef=this._viewContainerRef.createComponent(this._componentFactoryResolver.resolveComponentFactory(this._type),this._viewContainerRef.length,this._injector,this._contentRef.nodes)),this._windowRef}close(){var e;this._windowRef&&(this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._windowRef.hostView)),this._windowRef=null,(null===(e=this._contentRef)||void 0===e?void 0:e.viewRef)&&(this._applicationRef.detachView(this._contentRef.viewRef),this._contentRef.viewRef.destroy(),this._contentRef=null))}_getContentRef(e,t){if(e){if(e instanceof i.L){const n=e.createEmbeddedView(t);return this._applicationRef.attachView(n),new qt([n.rootNodes],n)}return new qt([[this._renderer.createText(""+e)]])}return new qt([])}}const Qt=()=>{};let Kt=(()=>{let e=class{constructor(e){this._document=e}compensate(){const e=this._getWidth();return this._isPresent(e)?this._adjustBody(e):Qt}_adjustBody(e){const t=this._document.body,n=t.style.paddingRight,i=parseFloat(window.getComputedStyle(t)["padding-right"]);return t.style["padding-right"]=i+e+"px",()=>t.style["padding-right"]=n}_isPresent(e){const t=this._document.body.getBoundingClientRect();return window.innerWidth-(t.left+t.right)>=e-.1*e}_getWidth(){const e=this._document.createElement("div");e.className="modal-scrollbar-measure";const t=this._document.body;t.appendChild(e);const n=e.getBoundingClientRect().width-e.clientWidth;return t.removeChild(e),n}};return e.\u0275fac=function(t){return new(t||e)(i.dc(r.d))},e.\u0275prov=Object(i.Ib)({factory:function(){return new e(Object(i.dc)(r.d))},token:e,providedIn:"root"}),e})(),Zt=(()=>{let e=class{};return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1050"],hostVars:2,hostBindings:function(e,t){2&e&&i.Ab("modal-backdrop fade show"+(t.backdropClass?" "+t.backdropClass:""))},inputs:{backdropClass:"backdropClass"},decls:0,vars:0,template:function(e,t){},encapsulation:2}),e})();class Xt{close(e){}dismiss(e){}}class en{constructor(e,t,n,i){this._windowCmptRef=e,this._contentRef=t,this._backdropCmptRef=n,this._beforeDismiss=i,e.instance.dismissEvent.subscribe(e=>{this.dismiss(e)}),this.result=new Promise((e,t)=>{this._resolve=e,this._reject=t}),this.result.then(null,()=>{})}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}close(e){this._windowCmptRef&&(this._resolve(e),this._removeModalElements())}_dismiss(e){this._reject(e),this._removeModalElements()}dismiss(e){if(this._windowCmptRef)if(this._beforeDismiss){const t=this._beforeDismiss();t&&t.then?t.then(t=>{!1!==t&&this._dismiss(e)},()=>{}):!1!==t&&this._dismiss(e)}else this._dismiss(e)}_removeModalElements(){const e=this._windowCmptRef.location.nativeElement;if(e.parentNode.removeChild(e),this._windowCmptRef.destroy(),this._backdropCmptRef){const e=this._backdropCmptRef.location.nativeElement;e.parentNode.removeChild(e),this._backdropCmptRef.destroy()}this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._windowCmptRef=null,this._backdropCmptRef=null,this._contentRef=null}}var tn=function(e){return e[e.BACKDROP_CLICK=0]="BACKDROP_CLICK",e[e.ESC=1]="ESC",e}({});let nn=(()=>{let e=class{constructor(e,t,n){this._document=e,this._elRef=t,this._zone=n,this._closed$=new o.a,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new i.o}dismiss(e){this.dismissEvent.emit(e)}ngOnInit(){this._elWithFocus=this._document.activeElement}ngAfterViewInit(){const{nativeElement:e}=this._elRef;if(this._zone.runOutsideAngular(()=>{Object(c.a)(e,"keydown").pipe(Object(y.a)(this._closed$),Object(v.a)(e=>e.which===ft.Escape&&this.keyboard)).subscribe(e=>requestAnimationFrame(()=>{e.defaultPrevented||this._zone.run(()=>this.dismiss(tn.ESC))}));let t=!1;Object(c.a)(this._dialogEl.nativeElement,"mousedown").pipe(Object(y.a)(this._closed$),Object(S.a)(()=>t=!1),Object(_.a)(()=>Object(c.a)(e,"mouseup").pipe(Object(y.a)(this._closed$),Object(w.a)(1))),Object(v.a)(({target:t})=>e===t)).subscribe(()=>{t=!0}),Object(c.a)(e,"click").pipe(Object(y.a)(this._closed$)).subscribe(({target:n})=>{!0!==this.backdrop||e!==n||t||this._zone.run(()=>this.dismiss(tn.BACKDROP_CLICK)),t=!1})}),!e.contains(document.activeElement)){const t=e.querySelector("[ngbAutofocus]"),n=St(e)[0];(t||n||e).focus()}}ngOnDestroy(){const e=this._document.body,t=this._elWithFocus;let n;n=t&&t.focus&&e.contains(t)?t:e,this._zone.runOutsideAngular(()=>{setTimeout(()=>n.focus()),this._elWithFocus=null}),this._closed$.next()}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(r.d),i.Mb(i.m),i.Mb(i.A))},e.\u0275cmp=i.Gb({type:e,selectors:[["ngb-modal-window"]],viewQuery:function(e,t){var n;1&e&&i.Jc(re,!0),2&e&&i.zc(n=i.hc())&&(t._dialogEl=n.first)},hostAttrs:["role","dialog","tabindex","-1"],hostVars:5,hostBindings:function(e,t){2&e&&(i.zb("aria-modal",!0)("aria-labelledby",t.ariaLabelledBy)("aria-describedby",t.ariaDescribedBy),i.Ab("modal fade show d-block"+(t.windowClass?" "+t.windowClass:"")))},inputs:{backdrop:"backdrop",keyboard:"keyboard",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",centered:"centered",scrollable:"scrollable",size:"size",windowClass:"windowClass"},outputs:{dismissEvent:"dismiss"},ngContentSelectors:O,decls:4,vars:2,consts:[["role","document"],["dialog",""],[1,"modal-content"]],template:function(e,t){1&e&&(i.oc(),i.Sb(0,"div",0,1),i.Sb(2,"div",2),i.nc(3),i.Rb(),i.Rb()),2&e&&i.Ab("modal-dialog"+(t.size?" modal-"+t.size:"")+(t.centered?" modal-dialog-centered":"")+(t.scrollable?" modal-dialog-scrollable":""))},styles:["ngb-modal-window .component-host-scrollable{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:hidden}"],encapsulation:2}),e})(),rn=(()=>{let e=class{constructor(e,t,n,r,s,a){this._applicationRef=e,this._injector=t,this._document=n,this._scrollBar=r,this._rendererFactory=s,this._ngZone=a,this._activeWindowCmptHasChanged=new o.a,this._ariaHiddenValues=new Map,this._backdropAttributes=["backdropClass"],this._modalRefs=[],this._windowAttributes=["ariaLabelledBy","ariaDescribedBy","backdrop","centered","keyboard","scrollable","size","windowClass"],this._windowCmpts=[],this._activeInstances=new i.o,this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){const e=this._windowCmpts[this._windowCmpts.length-1];Mt(this._ngZone,e.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(e.location.nativeElement)}})}open(e,t,n,i){const r=i.container instanceof HTMLElement?i.container:Fe(i.container)?this._document.querySelector(i.container):this._document.body,s=this._rendererFactory.createRenderer(null,null),o=this._scrollBar.compensate(),a=()=>{this._modalRefs.length||(s.removeClass(this._document.body,"modal-open"),this._revertAriaHidden())};if(!r)throw new Error(`The specified modal container "${i.container||"body"}" was not found in the DOM.`);const c=new Xt,l=this._getContentRef(e,i.injector||t,n,c,i);let u=!1!==i.backdrop?this._attachBackdrop(e,r):void 0,d=this._attachWindowComponent(e,r,l),h=new en(d,l,u,i.beforeDismiss);return this._registerModalRef(h),this._registerWindowCmpt(d),h.result.then(o,o),h.result.then(a,a),c.close=e=>{h.close(e)},c.dismiss=e=>{h.dismiss(e)},this._applyWindowOptions(d.instance,i),1===this._modalRefs.length&&s.addClass(this._document.body,"modal-open"),u&&u.instance&&this._applyBackdropOptions(u.instance,i),h}get activeInstances(){return this._activeInstances}dismissAll(e){this._modalRefs.forEach(t=>t.dismiss(e))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(e,t){let n=e.resolveComponentFactory(Zt).create(this._injector);return this._applicationRef.attachView(n.hostView),t.appendChild(n.location.nativeElement),n}_attachWindowComponent(e,t,n){let i=e.resolveComponentFactory(nn).create(this._injector,n.nodes);return this._applicationRef.attachView(i.hostView),t.appendChild(i.location.nativeElement),i}_applyWindowOptions(e,t){this._windowAttributes.forEach(n=>{Fe(t[n])&&(e[n]=t[n])})}_applyBackdropOptions(e,t){this._backdropAttributes.forEach(n=>{Fe(t[n])&&(e[n]=t[n])})}_getContentRef(e,t,n,r,s){return n?n instanceof i.L?this._createFromTemplateRef(n,r):Pe(n)?this._createFromString(n):this._createFromComponent(e,t,n,r,s):new qt([])}_createFromTemplateRef(e,t){const n=e.createEmbeddedView({$implicit:t,close(e){t.close(e)},dismiss(e){t.dismiss(e)}});return this._applicationRef.attachView(n),new qt([n.rootNodes],n)}_createFromString(e){const t=this._document.createTextNode(""+e);return new qt([[t]])}_createFromComponent(e,t,n,r,s){const o=e.resolveComponentFactory(n),a=i.s.create({providers:[{provide:Xt,useValue:r}],parent:t}),c=o.create(a),l=c.location.nativeElement;return s.scrollable&&l.classList.add("component-host-scrollable"),this._applicationRef.attachView(c.hostView),new qt([[l]],c.hostView,c)}_setAriaHidden(e){const t=e.parentElement;t&&e!==this._document.body&&(Array.from(t.children).forEach(t=>{t!==e&&"SCRIPT"!==t.nodeName&&(this._ariaHiddenValues.set(t,t.getAttribute("aria-hidden")),t.setAttribute("aria-hidden","true"))}),this._setAriaHidden(t))}_revertAriaHidden(){this._ariaHiddenValues.forEach((e,t)=>{e?t.setAttribute("aria-hidden",e):t.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(e){const t=()=>{const t=this._modalRefs.indexOf(e);t>-1&&(this._modalRefs.splice(t,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(e),this._activeInstances.emit(this._modalRefs),e.result.then(t,t)}_registerWindowCmpt(e){this._windowCmpts.push(e),this._activeWindowCmptHasChanged.next(),e.onDestroy(()=>{const t=this._windowCmpts.indexOf(e);t>-1&&(this._windowCmpts.splice(t,1),this._activeWindowCmptHasChanged.next())})}};return e.\u0275fac=function(t){return new(t||e)(i.dc(i.g),i.dc(i.s),i.dc(r.d),i.dc(Kt),i.dc(i.F),i.dc(i.A))},e.\u0275prov=Object(i.Ib)({factory:function(){return new e(Object(i.dc)(i.g),Object(i.dc)(i.p),Object(i.dc)(r.d),Object(i.dc)(Kt),Object(i.dc)(i.F),Object(i.dc)(i.A))},token:e,providedIn:"root"}),e})(),sn=(()=>{let e=class{constructor(e,t,n,i){this._moduleCFR=e,this._injector=t,this._modalStack=n,this._config=i}open(e,t={}){const n=Object.assign({},this._config,t);return this._modalStack.open(this._moduleCFR,this._injector,e,n)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(e){this._modalStack.dismissAll(e)}hasOpenModals(){return this._modalStack.hasOpenModals()}};return e.\u0275fac=function(t){return new(t||e)(i.dc(i.j),i.dc(i.s),i.dc(rn),i.dc(Gt))},e.\u0275prov=Object(i.Ib)({factory:function(){return new e(Object(i.dc)(i.j),Object(i.dc)(i.p),Object(i.dc)(rn),Object(i.dc)(Gt))},token:e,providedIn:"root"}),e})(),on=(()=>{let e=class{constructor(){this.destroyOnHide=!0,this.orientation="horizontal",this.roles="tablist",this.keyboard=!1}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return new e},token:e,providedIn:"root"}),e})();const an=e=>Fe(e)&&""!==e;let cn=0,ln=(()=>{let e=class{constructor(e){this.templateRef=e}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.L))},e.\u0275dir=i.Hb({type:e,selectors:[["ng-template","ngbNavContent",""]]}),e})(),un=(()=>{let e=class{constructor(e,t){this.elementRef=t,this.disabled=!1,this._nav=e}ngAfterContentChecked(){this.contentTpl=this.contentTpls.first}ngOnInit(){Fe(this.domId)||(this.domId="ngb-nav-"+cn++)}get active(){return this._nav.activeId===this.id}get id(){return an(this._id)?this._id:this.domId}get panelDomId(){return this.domId+"-panel"}isPanelInDom(){return(Fe(this.destroyOnHide)?!this.destroyOnHide:!this._nav.destroyOnHide)||this.active}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(Object(i.T)(()=>dn)),i.Mb(i.m))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngbNavItem",""]],contentQueries:function(e,t,n){var r;1&e&&i.Fb(n,ln,!1),2&e&&i.zc(r=i.hc())&&(t.contentTpls=r)},hostVars:2,hostBindings:function(e,t){2&e&&i.Eb("nav-item",!0)},inputs:{disabled:"disabled",domId:"domId",destroyOnHide:"destroyOnHide",_id:["ngbNavItem","_id"]},exportAs:["ngbNavItem"]}),e})(),dn=(()=>{let e=class{constructor(e,t,n,r){this.role=e,this._cd=n,this._document=r,this.activeIdChange=new i.o,this.navChange=new i.o,this.destroyOnHide=t.destroyOnHide,this.orientation=t.orientation,this.roles=t.roles,this.keyboard=t.keyboard}click(e){e.disabled||this._updateActiveId(e.id)}onKeyDown(e){if("tablist"!==this.roles||!this.keyboard)return;const t=e.which,n=this.links.filter(e=>!e.navItem.disabled),{length:i}=n;let r=-1;if(n.forEach((e,t)=>{e.elRef.nativeElement===this._document.activeElement&&(r=t)}),i){switch(t){case ft.ArrowLeft:if("vertical"===this.orientation)return;r=(r-1+i)%i;break;case ft.ArrowRight:if("vertical"===this.orientation)return;r=(r+1)%i;break;case ft.ArrowDown:if("horizontal"===this.orientation)return;r=(r+1)%i;break;case ft.ArrowUp:if("horizontal"===this.orientation)return;r=(r-1+i)%i;break;case ft.Home:r=0;break;case ft.End:r=i-1}"changeWithArrows"===this.keyboard&&this.select(n[r].navItem.id),n[r].elRef.nativeElement.focus(),e.preventDefault()}}select(e){this._updateActiveId(e,!1)}ngAfterContentInit(){if(!Fe(this.activeId)){const e=this.items.first?this.items.first.id:null;an(e)&&(this._updateActiveId(e,!1),this._cd.detectChanges())}}_updateActiveId(e,t=!0){if(this.activeId!==e){let n=!1;t&&this.navChange.emit({activeId:this.activeId,nextId:e,preventDefault:()=>{n=!0}}),n||(this.activeId=e,this.activeIdChange.emit(e))}}};return e.\u0275fac=function(t){return new(t||e)(i.ec("role"),i.Mb(on),i.Mb(i.h),i.Mb(r.d))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngbNav",""]],contentQueries:function(e,t,n){var r;1&e&&(i.Fb(n,un,!1),i.Fb(n,hn,!0)),2&e&&(i.zc(r=i.hc())&&(t.items=r),i.zc(r=i.hc())&&(t.links=r))},hostVars:6,hostBindings:function(e,t){1&e&&i.gc("keydown.arrowLeft",(function(e){return t.onKeyDown(e)}))("keydown.arrowRight",(function(e){return t.onKeyDown(e)}))("keydown.arrowDown",(function(e){return t.onKeyDown(e)}))("keydown.arrowUp",(function(e){return t.onKeyDown(e)}))("keydown.Home",(function(e){return t.onKeyDown(e)}))("keydown.End",(function(e){return t.onKeyDown(e)})),2&e&&(i.zb("aria-orientation","vertical"===t.orientation&&"tablist"===t.roles?"vertical":void 0)("role",t.role?t.role:t.roles?"tablist":void 0),i.Eb("nav",!0)("flex-column","vertical"===t.orientation))},inputs:{destroyOnHide:"destroyOnHide",orientation:"orientation",roles:"roles",keyboard:"keyboard",activeId:"activeId"},outputs:{activeIdChange:"activeIdChange",navChange:"navChange"},exportAs:["ngbNav"]}),e})(),hn=(()=>{let e=class{constructor(e,t,n,i){this.role=e,this.navItem=t,this.nav=n,this.elRef=i}hasNavItemClass(){return this.navItem.elementRef.nativeElement.nodeType===Node.COMMENT_NODE}};return e.\u0275fac=function(t){return new(t||e)(i.ec("role"),i.Mb(un),i.Mb(dn),i.Mb(i.m))},e.\u0275dir=i.Hb({type:e,selectors:[["a","ngbNavLink",""]],hostAttrs:["href",""],hostVars:14,hostBindings:function(e,t){1&e&&i.gc("click",(function(e){return t.nav.click(t.navItem),e.preventDefault()})),2&e&&(i.Vb("id",t.navItem.domId),i.zb("role",t.role?t.role:t.nav.roles?"tab":void 0)("tabindex",t.navItem.disabled?-1:void 0)("aria-controls",t.navItem.isPanelInDom()?t.navItem.panelDomId:null)("aria-selected",t.navItem.active)("aria-disabled",t.navItem.disabled),i.Eb("nav-link",!0)("nav-item",t.hasNavItemClass())("active",t.navItem.active)("disabled",t.navItem.disabled))}}),e})(),fn=(()=>{let e=class{};return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["","ngbNavOutlet",""]],hostVars:2,hostBindings:function(e,t){2&e&&i.Eb("tab-content",!0)},inputs:{paneRole:"paneRole",nav:["ngbNavOutlet","nav"]},attrs:se,decls:1,vars:1,consts:[["ngFor","",3,"ngForOf"],["class","tab-pane",3,"id","active",4,"ngIf"],[1,"tab-pane",3,"id"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,t){1&e&&i.Mc(0,le,1,1,"ng-template",0),2&e&&i.pc("ngForOf",t.nav.items)},directives:[r.q,r.r,r.w],encapsulation:2}),e})(),pn=(()=>{let e=class{};return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[r.c]]}),e})();class mn{constructor(e,t){this.open=e,this.close=t,t||(this.close=e)}isManual(){return"manual"===this.open||"manual"===this.close}}const bn={hover:["mouseenter","mouseleave"],focus:["focusin","focusout"]},gn=e=>e>0?Object(D.a)(e):e=>e;function _n(e,t,n,i,r,s,o=0,a=0){const c=function(e,t=bn){const n=(e||"").trim();if(0===n.length)return[];const i=n.split(/\s+/).map(e=>e.split(":")).map(e=>{let n=t[e[0]]||e;return new mn(n[0],n[1])}),r=i.filter(e=>e.isManual());if(r.length>1)throw"Triggers parse error: only one manual trigger is allowed";if(1===r.length&&i.length>1)throw"Triggers parse error: manual trigger can't be mixed with other triggers";return i}(n);if(1===c.length&&c[0].isManual())return()=>{};const u=function(e,t,n,i){return new b.a(r=>{const s=[],o=()=>r.next(!0),a=()=>r.next(!1),c=()=>r.next(!i());return n.forEach(n=>{n.open===n.close?s.push(e.listen(t,n.open,c)):s.push(e.listen(t,n.open,o),e.listen(t,n.close,a))}),()=>{s.forEach(e=>e())}})}(e,t,c,i).pipe(function(e,t,n){return i=>{let r=null;const s=i.pipe(Object(g.a)(e=>({open:e})),Object(v.a)(e=>{const t=n();return t===e.open||r&&r.open!==t?(r&&r.open!==e.open&&(r=null),!1):(r=e,!0)}),Object(T.a)()),o=s.pipe(Object(v.a)(e=>e.open),gn(e)),a=s.pipe(Object(v.a)(e=>!e.open),gn(t));return Object(l.a)(o,a).pipe(Object(v.a)(e=>e===r&&(r=null,e.open!==n())),Object(g.a)(e=>e.open))}}(o,a,i)).subscribe(e=>e?r():s());return()=>u.unsubscribe()}let yn=(()=>{let e=class{constructor(){this.autoClose=!0,this.placement="auto",this.triggers="click",this.disablePopover=!1,this.openDelay=0,this.closeDelay=0}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return new e},token:e,providedIn:"root"}),e})(),vn=0,wn=(()=>{let e=class{isTitleTemplate(){return this.title instanceof i.L}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["ngb-popover-window"]],hostAttrs:["role","tooltip"],hostVars:3,hostBindings:function(e,t){2&e&&(i.Vb("id",t.id),i.Ab("popover"+(t.popoverClass?" "+t.popoverClass:"")))},inputs:{title:"title",id:"id",popoverClass:"popoverClass",context:"context"},ngContentSelectors:O,decls:4,vars:1,consts:[[1,"arrow"],["class","popover-header",4,"ngIf"],[1,"popover-body"],[1,"popover-header"],["simpleTitle",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,t){1&e&&(i.oc(),i.Nb(0,"div",0),i.Mc(1,he,4,2,"h3",1),i.Sb(2,"div",2),i.nc(3),i.Rb()),2&e&&(i.yb(1),i.pc("ngIf",null!=t.title))},directives:[r.r,r.w],styles:["ngb-popover-window.bs-popover-bottom>.arrow,ngb-popover-window.bs-popover-top>.arrow{left:50%;margin-left:-.5rem}ngb-popover-window.bs-popover-bottom-left>.arrow,ngb-popover-window.bs-popover-top-left>.arrow{left:2em}ngb-popover-window.bs-popover-bottom-right>.arrow,ngb-popover-window.bs-popover-top-right>.arrow{left:auto;right:2em}ngb-popover-window.bs-popover-left>.arrow,ngb-popover-window.bs-popover-right>.arrow{top:50%;margin-top:-.5rem}ngb-popover-window.bs-popover-left-top>.arrow,ngb-popover-window.bs-popover-right-top>.arrow{top:.7em}ngb-popover-window.bs-popover-left-bottom>.arrow,ngb-popover-window.bs-popover-right-bottom>.arrow{top:auto;bottom:.7em}"],encapsulation:2,changeDetection:0}),e})(),Sn=(()=>{let e=class{constructor(e,t,n,r,s,o,a,c,l,u){this._elementRef=e,this._renderer=t,this._ngZone=a,this._document=c,this._changeDetector=l,this.shown=new i.o,this.hidden=new i.o,this._ngbPopoverWindowId="ngb-popover-"+vn++,this._windowRef=null,this.autoClose=o.autoClose,this.placement=o.placement,this.triggers=o.triggers,this.container=o.container,this.disablePopover=o.disablePopover,this.popoverClass=o.popoverClass,this.openDelay=o.openDelay,this.closeDelay=o.closeDelay,this._popupService=new Jt(wn,n,s,t,r,u),this._zoneSubscription=a.onStable.subscribe(()=>{this._windowRef&&Tt(this._elementRef.nativeElement,this._windowRef.location.nativeElement,this.placement,"body"===this.container,"bs-popover")})}_isDisabled(){return!!this.disablePopover||!this.ngbPopover&&!this.popoverTitle}open(e){this._windowRef||this._isDisabled()||(this._windowRef=this._popupService.open(this.ngbPopover,e),this._windowRef.instance.title=this.popoverTitle,this._windowRef.instance.context=e,this._windowRef.instance.popoverClass=this.popoverClass,this._windowRef.instance.id=this._ngbPopoverWindowId,this._renderer.setAttribute(this._elementRef.nativeElement,"aria-describedby",this._ngbPopoverWindowId),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement),this._windowRef.changeDetectorRef.detectChanges(),this._windowRef.changeDetectorRef.markForCheck(),vt(this._ngZone,this._document,this.autoClose,()=>this.close(),this.hidden,[this._windowRef.location.nativeElement]),this.shown.emit())}close(){this._windowRef&&(this._renderer.removeAttribute(this._elementRef.nativeElement,"aria-describedby"),this._popupService.close(),this._windowRef=null,this.hidden.emit(),this._changeDetector.markForCheck())}toggle(){this._windowRef?this.close():this.open()}isOpen(){return null!=this._windowRef}ngOnInit(){this._unregisterListenersFn=_n(this._renderer,this._elementRef.nativeElement,this.triggers,this.isOpen.bind(this),this.open.bind(this),this.close.bind(this),+this.openDelay,+this.closeDelay)}ngOnChanges({ngbPopover:e,popoverTitle:t,disablePopover:n,popoverClass:i}){i&&this.isOpen()&&(this._windowRef.instance.popoverClass=i.currentValue),(e||t||n)&&this._isDisabled()&&this.close()}ngOnDestroy(){this.close(),this._unregisterListenersFn&&this._unregisterListenersFn(),this._zoneSubscription.unsubscribe()}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(i.E),i.Mb(i.s),i.Mb(i.j),i.Mb(i.P),i.Mb(yn),i.Mb(i.A),i.Mb(r.d),i.Mb(i.h),i.Mb(i.g))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngbPopover",""]],inputs:{autoClose:"autoClose",placement:"placement",triggers:"triggers",container:"container",disablePopover:"disablePopover",popoverClass:"popoverClass",openDelay:"openDelay",closeDelay:"closeDelay",ngbPopover:"ngbPopover",popoverTitle:"popoverTitle"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbPopover"],features:[i.wb]}),e})(),Mn=(()=>{let e=class{};return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[r.c]]}),e})(),kn=(()=>{let e=class{constructor(){this.max=100,this.animated=!1,this.striped=!1,this.showValue=!1}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return new e},token:e,providedIn:"root"}),e})(),xn=(()=>{let e=class{constructor(e){this.value=0,this.max=e.max,this.animated=e.animated,this.striped=e.striped,this.textType=e.textType,this.type=e.type,this.showValue=e.showValue,this.height=e.height}set max(e){this._max=!Ne(e)||e<=0?100:e}get max(){return this._max}getValue(){return function(e,t,n=0){return Math.max(Math.min(e,t),n)}(this.value,this.max)}getPercentValue(){return 100*this.getValue()/this.max}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(kn))},e.\u0275cmp=i.Gb({type:e,selectors:[["ngb-progressbar"]],inputs:{value:"value",max:"max",animated:"animated",striped:"striped",textType:"textType",type:"type",showValue:"showValue",height:"height"},ngContentSelectors:O,decls:4,vars:13,consts:function(){return[[1,"progress"],["role","progressbar","aria-valuemin","0"],[4,"ngIf"],"" + "\ufffd0\ufffd" + ""]},template:function(e,t){1&e&&(i.oc(),i.Sb(0,"div",0),i.Sb(1,"div",1),i.Mc(2,fe,3,3,"span",2),i.nc(3),i.Rb(),i.Rb()),2&e&&(i.Kc("height",t.height),i.yb(1),i.Db("progress-bar",t.type?" bg-"+t.type:"","",t.textType?" text-"+t.textType:"","\n ",t.animated?" progress-bar-animated":"","",t.striped?" progress-bar-striped":"",""),i.Kc("width",t.getPercentValue(),"%"),i.zb("aria-valuenow",t.getValue())("aria-valuemax",t.max),i.yb(1),i.pc("ngIf",t.showValue))},directives:[r.r],pipes:[r.y],encapsulation:2,changeDetection:0}),e})(),Dn=(()=>{let e=class{};return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[r.c]]}),e})();class Tn{constructor(e,t,n){this.hour=Ae(e),this.minute=Ae(t),this.second=Ae(n)}changeHour(e=1){this.updateHour((isNaN(this.hour)?0:this.hour)+e)}updateHour(e){this.hour=Ne(e)?(e<0?24+e:e)%24:NaN}changeMinute(e=1){this.updateMinute((isNaN(this.minute)?0:this.minute)+e)}updateMinute(e){Ne(e)?(this.minute=e%60<0?60+e%60:e%60,this.changeHour(Math.floor(e/60))):this.minute=NaN}changeSecond(e=1){this.updateSecond((isNaN(this.second)?0:this.second)+e)}updateSecond(e){Ne(e)?(this.second=e<0?60+e%60:e%60,this.changeMinute(Math.floor(e/60))):this.second=NaN}isValid(e=!0){return Ne(this.hour)&&Ne(this.minute)&&(!e||Ne(this.second))}toString(){return`${this.hour||0}:${this.minute||0}:${this.second||0}`}}let Cn=(()=>{let e=class{constructor(){this.meridian=!1,this.spinners=!0,this.seconds=!1,this.hourStep=1,this.minuteStep=1,this.secondStep=1,this.disabled=!1,this.readonlyInputs=!1,this.size="medium"}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return new e},token:e,providedIn:"root"}),e})();function On(){return new Rn}let Ln=(()=>{let e=class{};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:On,token:e,providedIn:"root"}),e})(),Rn=(()=>{let e=class extends Ln{fromModel(e){return e&&je(e.hour)&&je(e.minute)?{hour:e.hour,minute:e.minute,second:je(e.second)?e.second:null}:null}toModel(e){return e&&je(e.hour)&&je(e.minute)?{hour:e.hour,minute:e.minute,second:je(e.second)?e.second:null}:null}};return e.\u0275fac=function(t){return ii(t||e)},e.\u0275prov=i.Ib({token:e,factory:function(t){return e.\u0275fac(t)}}),e})(),En=(()=>{let e=class{};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return e=Object(i.dc)(i.v),new An(e);var e},token:e,providedIn:"root"}),e})(),An=(()=>{let e=class extends En{constructor(e){super(),this._periods=Object(r.G)(e,r.g.Standalone,r.B.Narrow)}getMorningPeriod(){return this._periods[0]}getAfternoonPeriod(){return this._periods[1]}};return e.\u0275fac=function(t){return new(t||e)(i.dc(i.v))},e.\u0275prov=i.Ib({token:e,factory:function(t){return e.\u0275fac(t)}}),e})();const In=/[^0-9]/g,Pn={provide:s.o,useExisting:Object(i.T)(()=>Nn),multi:!0};let Nn=(()=>{let e=class{constructor(e,t,n,i){this._config=e,this._ngbTimeAdapter=t,this._cd=n,this.i18n=i,this.onChange=e=>{},this.onTouched=()=>{},this.meridian=e.meridian,this.spinners=e.spinners,this.seconds=e.seconds,this.hourStep=e.hourStep,this.minuteStep=e.minuteStep,this.secondStep=e.secondStep,this.disabled=e.disabled,this.readonlyInputs=e.readonlyInputs,this.size=e.size}set hourStep(e){this._hourStep=je(e)?e:this._config.hourStep}get hourStep(){return this._hourStep}set minuteStep(e){this._minuteStep=je(e)?e:this._config.minuteStep}get minuteStep(){return this._minuteStep}set secondStep(e){this._secondStep=je(e)?e:this._config.secondStep}get secondStep(){return this._secondStep}writeValue(e){const t=this._ngbTimeAdapter.fromModel(e);this.model=t?new Tn(t.hour,t.minute,t.second):new Tn,this.seconds||t&&Ne(t.second)||(this.model.second=0),this._cd.markForCheck()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e}changeHour(e){this.model.changeHour(e),this.propagateModelChange()}changeMinute(e){this.model.changeMinute(e),this.propagateModelChange()}changeSecond(e){this.model.changeSecond(e),this.propagateModelChange()}updateHour(e){const t=this.model.hour>=12,n=Ae(e);this.model.updateHour(this.meridian&&(t&&n<12||!t&&12===n)?n+12:n),this.propagateModelChange()}updateMinute(e){this.model.updateMinute(Ae(e)),this.propagateModelChange()}updateSecond(e){this.model.updateSecond(Ae(e)),this.propagateModelChange()}toggleMeridian(){this.meridian&&this.changeHour(12)}formatInput(e){e.value=e.value.replace(In,"")}formatHour(e){return Ne(e)?Ye(this.meridian?e%12==0?12:e%12:e%24):Ye(NaN)}formatMinSec(e){return Ye(Ne(e)?e:NaN)}get isSmallSize(){return"small"===this.size}get isLargeSize(){return"large"===this.size}ngOnChanges(e){e.seconds&&!this.seconds&&this.model&&!Ne(this.model.second)&&(this.model.second=0,this.propagateModelChange(!1))}propagateModelChange(e=!0){e&&this.onTouched(),this.model.isValid(this.seconds)?this.onChange(this._ngbTimeAdapter.toModel({hour:this.model.hour,minute:this.model.minute,second:this.model.second})):this.onChange(this._ngbTimeAdapter.toModel(null))}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(Cn),i.Mb(Ln),i.Mb(i.h),i.Mb(En))},e.\u0275cmp=i.Gb({type:e,selectors:[["ngb-timepicker"]],inputs:{meridian:"meridian",spinners:"spinners",seconds:"seconds",hourStep:"hourStep",minuteStep:"minuteStep",secondStep:"secondStep",readonlyInputs:"readonlyInputs",size:"size"},features:[i.xb([Pn]),i.wb],decls:18,vars:25,consts:function(){return[[3,"disabled"],[1,"ngb-tp"],[1,"ngb-tp-input-container","ngb-tp-hour"],["tabindex","-1","type","button","class","btn btn-link",3,"btn-sm","btn-lg","disabled","click",4,"ngIf"],["type","text","maxlength","2","inputmode","numeric",1,"ngb-tp-input","form-control",3,"value","readOnly","disabled","change","input","keydown.ArrowUp","keydown.ArrowDown",6,"placeholder","aria-label"],["placeholder","HH","aria-label","Hours"],[1,"ngb-tp-spacer"],[1,"ngb-tp-input-container","ngb-tp-minute"],["placeholder","MM","aria-label","Minutes"],["class","ngb-tp-spacer",4,"ngIf"],["class","ngb-tp-input-container ngb-tp-second",4,"ngIf"],["class","ngb-tp-meridian",4,"ngIf"],["tabindex","-1","type","button",1,"btn","btn-link",3,"disabled","click"],[1,"chevron","ngb-tp-chevron"],[1,"sr-only"],"Increment hours",[1,"chevron","ngb-tp-chevron","bottom"],"Decrement hours","Increment minutes","Decrement minutes",[1,"ngb-tp-input-container","ngb-tp-second"],["placeholder","SS","aria-label","Seconds"],"Increment seconds","Decrement seconds",[1,"ngb-tp-meridian"],["type","button",1,"btn","btn-outline-primary",3,"disabled","click"],[4,"ngIf","ngIfElse"],["am",""],"" + "\ufffd0\ufffd" + "","" + "\ufffd0\ufffd" + ""]},template:function(e,t){1&e&&(i.Sb(0,"fieldset",0),i.Sb(1,"div",1),i.Sb(2,"div",2),i.Mc(3,pe,4,7,"button",3),i.Sb(4,"input",4),i.Yb(5,5),i.gc("change",(function(e){return t.updateHour(e.target.value)}))("input",(function(e){return t.formatInput(e.target)}))("keydown.ArrowUp",(function(e){return t.changeHour(t.hourStep),e.preventDefault()}))("keydown.ArrowDown",(function(e){return t.changeHour(-t.hourStep),e.preventDefault()})),i.Rb(),i.Mc(6,me,4,7,"button",3),i.Rb(),i.Sb(7,"div",6),i.Oc(8,":"),i.Rb(),i.Sb(9,"div",7),i.Mc(10,be,4,7,"button",3),i.Sb(11,"input",4),i.Yb(12,8),i.gc("change",(function(e){return t.updateMinute(e.target.value)}))("input",(function(e){return t.formatInput(e.target)}))("keydown.ArrowUp",(function(e){return t.changeMinute(t.minuteStep),e.preventDefault()}))("keydown.ArrowDown",(function(e){return t.changeMinute(-t.minuteStep),e.preventDefault()})),i.Rb(),i.Mc(13,ge,4,7,"button",3),i.Rb(),i.Mc(14,_e,2,0,"div",9),i.Mc(15,we,5,9,"div",10),i.Mc(16,Se,1,0,"div",9),i.Mc(17,xe,5,9,"div",11),i.Rb(),i.Rb()),2&e&&(i.Eb("disabled",t.disabled),i.pc("disabled",t.disabled),i.yb(3),i.pc("ngIf",t.spinners),i.yb(1),i.Eb("form-control-sm",t.isSmallSize)("form-control-lg",t.isLargeSize),i.pc("value",t.formatHour(null==t.model?null:t.model.hour))("readOnly",t.readonlyInputs)("disabled",t.disabled),i.yb(2),i.pc("ngIf",t.spinners),i.yb(4),i.pc("ngIf",t.spinners),i.yb(1),i.Eb("form-control-sm",t.isSmallSize)("form-control-lg",t.isLargeSize),i.pc("value",t.formatMinSec(null==t.model?null:t.model.minute))("readOnly",t.readonlyInputs)("disabled",t.disabled),i.yb(2),i.pc("ngIf",t.spinners),i.yb(1),i.pc("ngIf",t.seconds),i.yb(1),i.pc("ngIf",t.seconds),i.yb(1),i.pc("ngIf",t.meridian),i.yb(1),i.pc("ngIf",t.meridian))},directives:[r.r],styles:['ngb-timepicker{font-size:1rem}.ngb-tp{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.ngb-tp-input-container{width:4em}.ngb-tp-chevron::before{border-style:solid;border-width:.29em .29em 0 0;content:"";display:inline-block;height:.69em;left:.05em;position:relative;top:.15em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);vertical-align:middle;width:.69em}.ngb-tp-chevron.bottom:before{top:-.3em;-webkit-transform:rotate(135deg);transform:rotate(135deg)}.ngb-tp-input{text-align:center}.ngb-tp-hour,.ngb-tp-meridian,.ngb-tp-minute,.ngb-tp-second{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:distribute;justify-content:space-around}.ngb-tp-spacer{width:1em;text-align:center}'],encapsulation:2}),e})(),jn=(()=>{let e=class{};return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[r.c]]}),e})(),Fn=(()=>{let e=class{constructor(){this.autoClose=!0,this.placement="auto",this.triggers="hover focus",this.disableTooltip=!1,this.openDelay=0,this.closeDelay=0}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return new e},token:e,providedIn:"root"}),e})(),Yn=0,zn=(()=>{let e=class{};return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["ngb-tooltip-window"]],hostAttrs:["role","tooltip"],hostVars:3,hostBindings:function(e,t){2&e&&(i.Vb("id",t.id),i.Ab("tooltip show"+(t.tooltipClass?" "+t.tooltipClass:"")))},inputs:{id:"id",tooltipClass:"tooltipClass"},ngContentSelectors:O,decls:3,vars:0,consts:[[1,"arrow"],[1,"tooltip-inner"]],template:function(e,t){1&e&&(i.oc(),i.Nb(0,"div",0),i.Sb(1,"div",1),i.nc(2),i.Rb())},styles:["ngb-tooltip-window.bs-tooltip-bottom .arrow,ngb-tooltip-window.bs-tooltip-top .arrow{left:calc(50% - .4rem)}ngb-tooltip-window.bs-tooltip-bottom-left .arrow,ngb-tooltip-window.bs-tooltip-top-left .arrow{left:1em}ngb-tooltip-window.bs-tooltip-bottom-right .arrow,ngb-tooltip-window.bs-tooltip-top-right .arrow{left:auto;right:.8rem}ngb-tooltip-window.bs-tooltip-left .arrow,ngb-tooltip-window.bs-tooltip-right .arrow{top:calc(50% - .4rem)}ngb-tooltip-window.bs-tooltip-left-top .arrow,ngb-tooltip-window.bs-tooltip-right-top .arrow{top:.4rem}ngb-tooltip-window.bs-tooltip-left-bottom .arrow,ngb-tooltip-window.bs-tooltip-right-bottom .arrow{top:auto;bottom:.4rem}"],encapsulation:2,changeDetection:0}),e})(),$n=(()=>{let e=class{constructor(e,t,n,r,s,o,a,c,l,u){this._elementRef=e,this._renderer=t,this._ngZone=a,this._document=c,this._changeDetector=l,this.shown=new i.o,this.hidden=new i.o,this._ngbTooltipWindowId="ngb-tooltip-"+Yn++,this._windowRef=null,this.autoClose=o.autoClose,this.placement=o.placement,this.triggers=o.triggers,this.container=o.container,this.disableTooltip=o.disableTooltip,this.tooltipClass=o.tooltipClass,this.openDelay=o.openDelay,this.closeDelay=o.closeDelay,this._popupService=new Jt(zn,n,s,t,r,u),this._zoneSubscription=a.onStable.subscribe(()=>{this._windowRef&&Tt(this._elementRef.nativeElement,this._windowRef.location.nativeElement,this.placement,"body"===this.container,"bs-tooltip")})}set ngbTooltip(e){this._ngbTooltip=e,!e&&this._windowRef&&this.close()}get ngbTooltip(){return this._ngbTooltip}open(e){this._windowRef||!this._ngbTooltip||this.disableTooltip||(this._windowRef=this._popupService.open(this._ngbTooltip,e),this._windowRef.instance.tooltipClass=this.tooltipClass,this._windowRef.instance.id=this._ngbTooltipWindowId,this._renderer.setAttribute(this._elementRef.nativeElement,"aria-describedby",this._ngbTooltipWindowId),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement),this._windowRef.changeDetectorRef.detectChanges(),this._windowRef.changeDetectorRef.markForCheck(),vt(this._ngZone,this._document,this.autoClose,()=>this.close(),this.hidden,[this._windowRef.location.nativeElement]),this.shown.emit())}close(){null!=this._windowRef&&(this._renderer.removeAttribute(this._elementRef.nativeElement,"aria-describedby"),this._popupService.close(),this._windowRef=null,this.hidden.emit(),this._changeDetector.markForCheck())}toggle(){this._windowRef?this.close():this.open()}isOpen(){return null!=this._windowRef}ngOnInit(){this._unregisterListenersFn=_n(this._renderer,this._elementRef.nativeElement,this.triggers,this.isOpen.bind(this),this.open.bind(this),this.close.bind(this),+this.openDelay,+this.closeDelay)}ngOnChanges({tooltipClass:e}){e&&this.isOpen()&&(this._windowRef.instance.tooltipClass=e.currentValue)}ngOnDestroy(){this.close(),this._unregisterListenersFn&&this._unregisterListenersFn(),this._zoneSubscription.unsubscribe()}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(i.E),i.Mb(i.s),i.Mb(i.j),i.Mb(i.P),i.Mb(Fn),i.Mb(i.A),i.Mb(r.d),i.Mb(i.h),i.Mb(i.g))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngbTooltip",""]],inputs:{autoClose:"autoClose",placement:"placement",triggers:"triggers",container:"container",disableTooltip:"disableTooltip",tooltipClass:"tooltipClass",openDelay:"openDelay",closeDelay:"closeDelay",ngbTooltip:"ngbTooltip"},outputs:{shown:"shown",hidden:"hidden"},exportAs:["ngbTooltip"],features:[i.wb]}),e})(),Hn=(()=>{let e=class{};return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)}}),e})(),Wn=(()=>{let e=class{constructor(){this.highlightClass="ngb-highlight"}ngOnChanges(e){const t=Ie(this.result),n=(Array.isArray(this.term)?this.term:[this.term]).map(e=>Ie(e).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")).filter(e=>e);this.parts=n.length?t.split(new RegExp(`(${n.join("|")})`,"gmi")):[t]}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["ngb-highlight"]],inputs:{highlightClass:"highlightClass",result:"result",term:"term"},features:[i.wb],decls:1,vars:1,consts:[["ngFor","",3,"ngForOf"],[3,"class",4,"ngIf","ngIfElse"],["even",""]],template:function(e,t){1&e&&i.Mc(0,Ce,3,2,"ng-template",0),2&e&&i.pc("ngForOf",t.parts)},directives:[r.q,r.r],styles:[".ngb-highlight{font-weight:700}"],encapsulation:2,changeDetection:0}),e})(),Vn=(()=>{let e=class{constructor(){this.activeIdx=0,this.focusFirst=!0,this.formatter=Ie,this.selectEvent=new i.o,this.activeChangeEvent=new i.o}hasActive(){return this.activeIdx>-1&&this.activeIdx<this.results.length}getActive(){return this.results[this.activeIdx]}markActive(e){this.activeIdx=e,this._activeChanged()}next(){this.activeIdx===this.results.length-1?this.activeIdx=this.focusFirst?(this.activeIdx+1)%this.results.length:-1:this.activeIdx++,this._activeChanged()}prev(){this.activeIdx<0?this.activeIdx=this.results.length-1:0===this.activeIdx?this.activeIdx=this.focusFirst?this.results.length-1:-1:this.activeIdx--,this._activeChanged()}resetActive(){this.activeIdx=this.focusFirst?0:-1,this._activeChanged()}select(e){this.selectEvent.emit(e)}ngOnInit(){this.resetActive()}_activeChanged(){this.activeChangeEvent.emit(this.activeIdx>=0?this.id+"-"+this.activeIdx:void 0)}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["ngb-typeahead-window"]],hostAttrs:["role","listbox",1,"dropdown-menu","show"],hostVars:1,hostBindings:function(e,t){1&e&&i.gc("mousedown",(function(e){return e.preventDefault()})),2&e&&i.Vb("id",t.id)},inputs:{focusFirst:"focusFirst",formatter:"formatter",id:"id",results:"results",term:"term",resultTemplate:"resultTemplate"},outputs:{selectEvent:"select",activeChangeEvent:"activeChange"},exportAs:["ngbTypeaheadWindow"],decls:3,vars:1,consts:[["rt",""],["ngFor","",3,"ngForOf"],[3,"result","term"],["type","button","role","option",1,"dropdown-item",3,"id","mouseenter","click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,t){1&e&&(i.Mc(0,Oe,1,2,"ng-template",null,0,i.Nc),i.Mc(2,Ee,2,9,"ng-template",1)),2&e&&(i.yb(2),i.pc("ngForOf",t.results))},directives:[r.q,Wn,r.w],encapsulation:2}),e})();const Bn=new i.r("live announcer delay",{providedIn:"root",factory:function(){return 100}});function Un(e,t=!1){let n=e.body.querySelector("#ngb-live");return null==n&&t&&(n=e.createElement("div"),n.setAttribute("id","ngb-live"),n.setAttribute("aria-live","polite"),n.setAttribute("aria-atomic","true"),n.classList.add("sr-only"),e.body.appendChild(n)),n}let Gn=(()=>{let e=class{constructor(e,t){this._document=e,this._delay=t}ngOnDestroy(){const e=Un(this._document);e&&e.parentElement.removeChild(e)}say(e){const t=Un(this._document,!0),n=this._delay;if(null!=t){t.textContent="";const i=()=>t.textContent=e;null===n?i():setTimeout(i,n)}}};return e.\u0275fac=function(t){return new(t||e)(i.dc(r.d),i.dc(Bn))},e.\u0275prov=Object(i.Ib)({factory:function(){return new e(Object(i.dc)(r.d),Object(i.dc)(Bn))},token:e,providedIn:"root"}),e})(),qn=(()=>{let e=class{constructor(){this.editable=!0,this.focusFirst=!0,this.showHint=!1,this.placement=["bottom-left","bottom-right","top-left","top-right"]}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return new e},token:e,providedIn:"root"}),e})();const Jn={provide:s.o,useExisting:Object(i.T)(()=>Kn),multi:!0};let Qn=0,Kn=(()=>{let e=class{constructor(e,t,n,r,s,l,u,d,h,f,p,m){this._elementRef=e,this._renderer=n,this._live=d,this._document=h,this._ngZone=f,this._changeDetector=p,this._subscription=null,this._closed$=new o.a,this._inputValueBackup=null,this._windowRef=null,this.autocomplete="off",this.placement="bottom-left",this.selectItem=new i.o,this.activeDescendant=null,this.popupId="ngb-typeahead-"+Qn++,this._onTouched=()=>{},this._onChange=e=>{},this.container=l.container,this.editable=l.editable,this.focusFirst=l.focusFirst,this.showHint=l.showHint,this.placement=l.placement,this._valueChanges=Object(c.a)(e.nativeElement,"input").pipe(Object(g.a)(e=>e.target.value)),this._resubscribeTypeahead=new a.a(null),this._popupService=new Jt(Vn,r,t,n,s,m),this._zoneSubscription=u.onStable.subscribe(()=>{this.isPopupOpen()&&Tt(this._elementRef.nativeElement,this._windowRef.location.nativeElement,this.placement,"body"===this.container)})}ngOnInit(){const e=this._valueChanges.pipe(Object(S.a)(e=>{this._inputValueBackup=this.showHint?e:null,this._onChange(this.editable?e:void 0)})).pipe(this.ngbTypeahead),t=this._resubscribeTypeahead.pipe(Object(_.a)(()=>e));this._subscription=this._subscribeToUserInput(t)}ngOnDestroy(){this._closePopup(),this._unsubscribeFromUserInput(),this._zoneSubscription.unsubscribe()}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}writeValue(e){this._writeInputValue(this._formatItemForInput(e)),this.showHint&&(this._inputValueBackup=e)}setDisabledState(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}dismissPopup(){this.isPopupOpen()&&(this._resubscribeTypeahead.next(null),this._closePopup(),this.showHint&&null!==this._inputValueBackup&&this._writeInputValue(this._inputValueBackup),this._changeDetector.markForCheck())}isPopupOpen(){return null!=this._windowRef}handleBlur(){this._resubscribeTypeahead.next(null),this._onTouched()}handleKeyDown(e){if(this.isPopupOpen())switch(e.which){case ft.ArrowDown:e.preventDefault(),this._windowRef.instance.next(),this._showHint();break;case ft.ArrowUp:e.preventDefault(),this._windowRef.instance.prev(),this._showHint();break;case ft.Enter:case ft.Tab:const t=this._windowRef.instance.getActive();Fe(t)&&(e.preventDefault(),e.stopPropagation(),this._selectResult(t)),this._closePopup()}}_openPopup(){this.isPopupOpen()||(this._inputValueBackup=this._elementRef.nativeElement.value,this._windowRef=this._popupService.open(),this._windowRef.instance.id=this.popupId,this._windowRef.instance.selectEvent.subscribe(e=>this._selectResultClosePopup(e)),this._windowRef.instance.activeChangeEvent.subscribe(e=>this.activeDescendant=e),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement),this._changeDetector.markForCheck(),vt(this._ngZone,this._document,"outside",()=>this.dismissPopup(),this._closed$,[this._elementRef.nativeElement,this._windowRef.location.nativeElement]))}_closePopup(){this._closed$.next(),this._popupService.close(),this._windowRef=null,this.activeDescendant=null}_selectResult(e){let t=!1;this.selectItem.emit({item:e,preventDefault:()=>{t=!0}}),this._resubscribeTypeahead.next(null),t||(this.writeValue(e),this._onChange(e))}_selectResultClosePopup(e){this._selectResult(e),this._closePopup()}_showHint(){var e;if(this.showHint&&(null===(e=this._windowRef)||void 0===e?void 0:e.instance.hasActive())&&null!=this._inputValueBackup){const e=this._inputValueBackup.toLowerCase(),t=this._formatItemForInput(this._windowRef.instance.getActive());e===t.substr(0,this._inputValueBackup.length).toLowerCase()?(this._writeInputValue(this._inputValueBackup+t.substr(this._inputValueBackup.length)),this._elementRef.nativeElement.setSelectionRange.apply(this._elementRef.nativeElement,[this._inputValueBackup.length,t.length])):this._writeInputValue(t)}}_formatItemForInput(e){return null!=e&&this.inputFormatter?this.inputFormatter(e):Ie(e)}_writeInputValue(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",Ie(e))}_subscribeToUserInput(e){return e.subscribe(e=>{e&&0!==e.length?(this._openPopup(),this._windowRef.instance.focusFirst=this.focusFirst,this._windowRef.instance.results=e,this._windowRef.instance.term=this._elementRef.nativeElement.value,this.resultFormatter&&(this._windowRef.instance.formatter=this.resultFormatter),this.resultTemplate&&(this._windowRef.instance.resultTemplate=this.resultTemplate),this._windowRef.instance.resetActive(),this._windowRef.changeDetectorRef.detectChanges(),this._showHint()):this._closePopup();const t=e?e.length:0;this._live.say(0===t?"No results available":`${t} result${1===t?"":"s"} available`)})}_unsubscribeFromUserInput(){this._subscription&&this._subscription.unsubscribe(),this._subscription=null}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(i.P),i.Mb(i.E),i.Mb(i.s),i.Mb(i.j),i.Mb(qn),i.Mb(i.A),i.Mb(Gn),i.Mb(r.d),i.Mb(i.A),i.Mb(i.h),i.Mb(i.g))},e.\u0275dir=i.Hb({type:e,selectors:[["input","ngbTypeahead",""]],hostAttrs:["autocapitalize","off","autocorrect","off","role","combobox","aria-multiline","false"],hostVars:7,hostBindings:function(e,t){1&e&&i.gc("blur",(function(){return t.handleBlur()}))("keydown",(function(e){return t.handleKeyDown(e)})),2&e&&(i.Vb("autocomplete",t.autocomplete),i.zb("aria-autocomplete",t.showHint?"both":"list")("aria-activedescendant",t.activeDescendant)("aria-owns",t.isPopupOpen()?t.popupId:null)("aria-expanded",t.isPopupOpen()),i.Eb("open",t.isPopupOpen()))},inputs:{autocomplete:"autocomplete",placement:"placement",container:"container",editable:"editable",focusFirst:"focusFirst",showHint:"showHint",inputFormatter:"inputFormatter",ngbTypeahead:"ngbTypeahead",resultFormatter:"resultFormatter",resultTemplate:"resultTemplate"},outputs:{selectItem:"selectItem"},exportAs:["ngbTypeahead"],features:[i.xb([Jn])]}),e})(),Zn=(()=>{let e=class{};return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[r.c]]}),e})();const Xn=i.Ub(Ke),ei=i.Ub(lt),ti=i.Ub(Lt),ni=i.Ub(Rt),ii=i.Ub(Rn)},"G1/K":function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("LvDl"),r=n.n(i),s=n("8Y7J");let o=(()=>{class e{transform(e,t){return""===e?r.a.defaultTo(t,"n/a"):e}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=s.Lb({name:"notAvailable",type:e,pure:!0}),e})()},G1I9:function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return o}));var i=n("oxzT"),r=n("mtw6");class s{constructor(e=r.a.info,t,n,i,s="Ceph"){this.type=e,this.title=t,this.message=n,this.options=i,this.application=s,this.isFinishedTask=!1,this.classes={Ceph:"ceph-icon",Prometheus:"prometheus-icon"},this.applicationClass=this.classes[this.application]}}class o extends s{constructor(e=new s){super(e.type,e.title,e.message,e.options,e.application),this.config=e,this.textClasses=["text-danger","text-info","text-success"],this.iconClasses=[i.a.warning,i.a.info,i.a.check],this.borderClasses=["border-danger","border-info","border-success"],delete this.config,this.timestamp=(new Date).toJSON(),this.iconClass=this.iconClasses[this.type],this.textClass=this.textClasses[this.type],this.borderClass=this.borderClasses[this.type],this.isFinishedTask=e.isFinishedTask}}},"G6Q+":function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n("SVse"),r=n("iInd"),s=n("PCNd"),o=n("8Y7J");let a=(()=>{class e{}return e.\u0275mod=o.Kb({type:e}),e.\u0275inj=o.Jb({factory:function(t){return new(t||e)},imports:[[i.c,s.a,r.i]]}),e})()},GS7A:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return r})),n.d(t,"d",(function(){return f})),n.d(t,"e",(function(){return a})),n.d(t,"f",(function(){return c})),n.d(t,"g",(function(){return u})),n.d(t,"h",(function(){return l})),n.d(t,"i",(function(){return d})),n.d(t,"j",(function(){return o})),n.d(t,"k",(function(){return p})),n.d(t,"l",(function(){return m}));class i{}class r{}const s="*";function o(e,t){return{type:7,name:e,definitions:t,options:{}}}function a(e,t=null){return{type:4,styles:t,timings:e}}function c(e,t=null){return{type:2,steps:e,options:t}}function l(e){return{type:6,styles:e,offset:null}}function u(e,t,n){return{type:0,name:e,styles:t,options:n}}function d(e,t,n=null){return{type:1,expr:e,animation:t,options:n}}function h(e){Promise.resolve(null).then(e)}class f{constructor(e=0,t=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this.parentPlayer=null,this.totalTime=e+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}onStart(e){this._onStartFns.push(e)}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){h(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(e=>e()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){}setPosition(e){}getPosition(){return 0}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}}class p{constructor(e){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=e;let t=0,n=0,i=0;const r=this.players.length;0==r?h(()=>this._onFinish()):this.players.forEach(e=>{e.onDone(()=>{++t==r&&this._onFinish()}),e.onDestroy(()=>{++n==r&&this._onDestroy()}),e.onStart(()=>{++i==r&&this._onStart()})}),this.totalTime=this.players.reduce((e,t)=>Math.max(e,t.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this.players.forEach(e=>e.init())}onStart(e){this._onStartFns.push(e)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(e=>e()),this._onStartFns=[])}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(e=>e.play())}pause(){this.players.forEach(e=>e.pause())}restart(){this.players.forEach(e=>e.restart())}finish(){this._onFinish(),this.players.forEach(e=>e.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(e=>e.destroy()),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this.players.forEach(e=>e.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(e){const t=e*this.totalTime;this.players.forEach(e=>{const n=e.totalTime?Math.min(1,t/e.totalTime):1;e.setPosition(n)})}getPosition(){let e=0;return this.players.forEach(t=>{const n=t.getPosition();e=Math.min(n,e)}),e}beforeDestroy(){this.players.forEach(e=>{e.beforeDestroy&&e.beforeDestroy()})}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}}const m="!"},GarU:function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},GgAd:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i=n("8Y7J"),r=n("G0yt"),s=n("SVse"),o=n("Fgil"),a=n("o4+5");function c(e,t){if(1&e&&(i.Sb(0,"table"),i.Sb(1,"tr"),i.Sb(2,"td",4),i.Oc(3,"Used:\xa0"),i.Rb(),i.Sb(4,"td",5),i.Sb(5,"strong"),i.Oc(6),i.jc(7,"dimlessBinary"),i.jc(8,"dimless"),i.Rb(),i.Rb(),i.Rb(),i.Sb(9,"tr"),i.Sb(10,"td",4),i.Oc(11,"Free:\xa0"),i.Rb(),i.Sb(12,"td",6),i.Sb(13,"strong"),i.Oc(14),i.jc(15,"dimlessBinary"),i.jc(16,"dimless"),i.Rb(),i.Rb(),i.Rb(),i.Rb()),2&e){const e=i.ic();i.yb(6),i.Qc(" ",e.isBinary?i.kc(7,2,e.used):i.kc(8,4,e.used),""),i.yb(8),i.Pc(e.isBinary?i.kc(15,6,e.total-e.used):i.kc(16,8,e.total-e.used))}}let l=(()=>{class e{constructor(){this.isBinary=!0,this.decimals=0}ngOnChanges(){this.usedPercentage=this.total>0?this.used/this.total*100:0,this.freePercentage=100-this.usedPercentage}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-usage-bar"]],inputs:{total:"total",used:"used",isBinary:"isBinary",decimals:"decimals"},features:[i.wb],decls:8,vars:9,consts:[["usageTooltipTpl",""],["data-placement","left",1,"progress",3,"ngbTooltip"],["role","progressbar",1,"progress-bar","bg-info"],["role","progressbar",1,"progress-bar","bg-freespace"],[1,"text-left"],[1,"text-right"],[1,"'text-right"]],template:function(e,t){if(1&e&&(i.Mc(0,c,17,10,"ng-template",null,0,i.Nc),i.Sb(2,"div",1),i.Sb(3,"div",2),i.Sb(4,"span"),i.Oc(5),i.jc(6,"number"),i.Rb(),i.Rb(),i.Nb(7,"div",3),i.Rb()),2&e){const e=i.Ac(1);i.yb(2),i.pc("ngbTooltip",e),i.yb(1),i.Kc("width",t.usedPercentage+"%"),i.yb(2),i.Qc("",i.lc(6,6,t.usedPercentage,"1.0-"+t.decimals),"%"),i.yb(2),i.Kc("width",t.freePercentage+"%")}},directives:[r.D],pipes:[s.f,o.a,a.a],styles:[".bg-info[_ngcontent-%COMP%]{background-color:#2b99a8!important}.bg-freespace[_ngcontent-%COMP%]{background-color:#ced4da!important}.progress[_ngcontent-%COMP%]{height:20px;margin-bottom:0;position:relative}.progress[_ngcontent-%COMP%] div.progress-bar[_ngcontent-%COMP%]{position:static}.progress[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#000;display:block;font-weight:400;position:absolute;width:100%}"]}),e})()},GyhO:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("LRne"),r=n("0EUg");function s(...e){return Object(r.a)()(Object(i.a)(...e))}},H8ED:function(e,t,n){!function(e){"use strict";function t(e,t,n){return"m"===n?t?"\u0445\u0432\u0456\u043b\u0456\u043d\u0430":"\u0445\u0432\u0456\u043b\u0456\u043d\u0443":"h"===n?t?"\u0433\u0430\u0434\u0437\u0456\u043d\u0430":"\u0433\u0430\u0434\u0437\u0456\u043d\u0443":e+" "+(i=+e,r={ss:t?"\u0441\u0435\u043a\u0443\u043d\u0434\u0430_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434":"\u0441\u0435\u043a\u0443\u043d\u0434\u0443_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434",mm:t?"\u0445\u0432\u0456\u043b\u0456\u043d\u0430_\u0445\u0432\u0456\u043b\u0456\u043d\u044b_\u0445\u0432\u0456\u043b\u0456\u043d":"\u0445\u0432\u0456\u043b\u0456\u043d\u0443_\u0445\u0432\u0456\u043b\u0456\u043d\u044b_\u0445\u0432\u0456\u043b\u0456\u043d",hh:t?"\u0433\u0430\u0434\u0437\u0456\u043d\u0430_\u0433\u0430\u0434\u0437\u0456\u043d\u044b_\u0433\u0430\u0434\u0437\u0456\u043d":"\u0433\u0430\u0434\u0437\u0456\u043d\u0443_\u0433\u0430\u0434\u0437\u0456\u043d\u044b_\u0433\u0430\u0434\u0437\u0456\u043d",dd:"\u0434\u0437\u0435\u043d\u044c_\u0434\u043d\u0456_\u0434\u0437\u0451\u043d",MM:"\u043c\u0435\u0441\u044f\u0446_\u043c\u0435\u0441\u044f\u0446\u044b_\u043c\u0435\u0441\u044f\u0446\u0430\u045e",yy:"\u0433\u043e\u0434_\u0433\u0430\u0434\u044b_\u0433\u0430\u0434\u043e\u045e"}[n].split("_"),i%10==1&&i%100!=11?r[0]:i%10>=2&&i%10<=4&&(i%100<10||i%100>=20)?r[1]:r[2]);var i,r}e.defineLocale("be",{months:{format:"\u0441\u0442\u0443\u0434\u0437\u0435\u043d\u044f_\u043b\u044e\u0442\u0430\u0433\u0430_\u0441\u0430\u043a\u0430\u0432\u0456\u043a\u0430_\u043a\u0440\u0430\u0441\u0430\u0432\u0456\u043a\u0430_\u0442\u0440\u0430\u045e\u043d\u044f_\u0447\u044d\u0440\u0432\u0435\u043d\u044f_\u043b\u0456\u043f\u0435\u043d\u044f_\u0436\u043d\u0456\u045e\u043d\u044f_\u0432\u0435\u0440\u0430\u0441\u043d\u044f_\u043a\u0430\u0441\u0442\u0440\u044b\u0447\u043d\u0456\u043a\u0430_\u043b\u0456\u0441\u0442\u0430\u043f\u0430\u0434\u0430_\u0441\u043d\u0435\u0436\u043d\u044f".split("_"),standalone:"\u0441\u0442\u0443\u0434\u0437\u0435\u043d\u044c_\u043b\u044e\u0442\u044b_\u0441\u0430\u043a\u0430\u0432\u0456\u043a_\u043a\u0440\u0430\u0441\u0430\u0432\u0456\u043a_\u0442\u0440\u0430\u0432\u0435\u043d\u044c_\u0447\u044d\u0440\u0432\u0435\u043d\u044c_\u043b\u0456\u043f\u0435\u043d\u044c_\u0436\u043d\u0456\u0432\u0435\u043d\u044c_\u0432\u0435\u0440\u0430\u0441\u0435\u043d\u044c_\u043a\u0430\u0441\u0442\u0440\u044b\u0447\u043d\u0456\u043a_\u043b\u0456\u0441\u0442\u0430\u043f\u0430\u0434_\u0441\u043d\u0435\u0436\u0430\u043d\u044c".split("_")},monthsShort:"\u0441\u0442\u0443\u0434_\u043b\u044e\u0442_\u0441\u0430\u043a_\u043a\u0440\u0430\u0441_\u0442\u0440\u0430\u0432_\u0447\u044d\u0440\u0432_\u043b\u0456\u043f_\u0436\u043d\u0456\u0432_\u0432\u0435\u0440_\u043a\u0430\u0441\u0442_\u043b\u0456\u0441\u0442_\u0441\u043d\u0435\u0436".split("_"),weekdays:{format:"\u043d\u044f\u0434\u0437\u0435\u043b\u044e_\u043f\u0430\u043d\u044f\u0434\u0437\u0435\u043b\u0430\u043a_\u0430\u045e\u0442\u043e\u0440\u0430\u043a_\u0441\u0435\u0440\u0430\u0434\u0443_\u0447\u0430\u0446\u0432\u0435\u0440_\u043f\u044f\u0442\u043d\u0456\u0446\u0443_\u0441\u0443\u0431\u043e\u0442\u0443".split("_"),standalone:"\u043d\u044f\u0434\u0437\u0435\u043b\u044f_\u043f\u0430\u043d\u044f\u0434\u0437\u0435\u043b\u0430\u043a_\u0430\u045e\u0442\u043e\u0440\u0430\u043a_\u0441\u0435\u0440\u0430\u0434\u0430_\u0447\u0430\u0446\u0432\u0435\u0440_\u043f\u044f\u0442\u043d\u0456\u0446\u0430_\u0441\u0443\u0431\u043e\u0442\u0430".split("_"),isFormat:/\[ ?[\u0423\u0443\u045e] ?(?:\u043c\u0456\u043d\u0443\u043b\u0443\u044e|\u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0443\u044e)? ?\] ?dddd/},weekdaysShort:"\u043d\u0434_\u043f\u043d_\u0430\u0442_\u0441\u0440_\u0447\u0446_\u043f\u0442_\u0441\u0431".split("_"),weekdaysMin:"\u043d\u0434_\u043f\u043d_\u0430\u0442_\u0441\u0440_\u0447\u0446_\u043f\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0433.",LLL:"D MMMM YYYY \u0433., HH:mm",LLLL:"dddd, D MMMM YYYY \u0433., HH:mm"},calendar:{sameDay:"[\u0421\u0451\u043d\u043d\u044f \u045e] LT",nextDay:"[\u0417\u0430\u045e\u0442\u0440\u0430 \u045e] LT",lastDay:"[\u0423\u0447\u043e\u0440\u0430 \u045e] LT",nextWeek:function(){return"[\u0423] dddd [\u045e] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[\u0423 \u043c\u0456\u043d\u0443\u043b\u0443\u044e] dddd [\u045e] LT";case 1:case 2:case 4:return"[\u0423 \u043c\u0456\u043d\u0443\u043b\u044b] dddd [\u045e] LT"}},sameElse:"L"},relativeTime:{future:"\u043f\u0440\u0430\u0437 %s",past:"%s \u0442\u0430\u043c\u0443",s:"\u043d\u0435\u043a\u0430\u043b\u044c\u043a\u0456 \u0441\u0435\u043a\u0443\u043d\u0434",m:t,mm:t,h:t,hh:t,d:"\u0434\u0437\u0435\u043d\u044c",dd:t,M:"\u043c\u0435\u0441\u044f\u0446",MM:t,y:"\u0433\u043e\u0434",yy:t},meridiemParse:/\u043d\u043e\u0447\u044b|\u0440\u0430\u043d\u0456\u0446\u044b|\u0434\u043d\u044f|\u0432\u0435\u0447\u0430\u0440\u0430/,isPM:function(e){return/^(\u0434\u043d\u044f|\u0432\u0435\u0447\u0430\u0440\u0430)$/.test(e)},meridiem:function(e,t,n){return e<4?"\u043d\u043e\u0447\u044b":e<12?"\u0440\u0430\u043d\u0456\u0446\u044b":e<17?"\u0434\u043d\u044f":"\u0432\u0435\u0447\u0430\u0440\u0430"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0456|\u044b|\u0433\u0430)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e%10!=2&&e%10!=3||e%100==12||e%100==13?e+"-\u044b":e+"-\u0456";case"D":return e+"-\u0433\u0430";default:return e}},week:{dow:1,doy:7}})}(n("wd/R"))},HAuM:function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},HDdC:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i=n("7o/Q"),r=n("2QA8"),s=n("gRHU"),o=n("kJWO"),a=n("mCNh"),c=n("2fFW");let l=(()=>{class e{constructor(e){this._isScalar=!1,e&&(this._subscribe=e)}lift(t){const n=new e;return n.source=this,n.operator=t,n}subscribe(e,t,n){const{operator:o}=this,a=function(e,t,n){if(e){if(e instanceof i.a)return e;if(e[r.a])return e[r.a]()}return e||t||n?new i.a(e,t,n):new i.a(s.a)}(e,t,n);if(a.add(o?o.call(a,this.source):this.source||c.a.useDeprecatedSynchronousErrorHandling&&!a.syncErrorThrowable?this._subscribe(a):this._trySubscribe(a)),c.a.useDeprecatedSynchronousErrorHandling&&a.syncErrorThrowable&&(a.syncErrorThrowable=!1,a.syncErrorThrown))throw a.syncErrorValue;return a}_trySubscribe(e){try{return this._subscribe(e)}catch(t){c.a.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),function(e){for(;e;){const{closed:t,destination:n,isStopped:r}=e;if(t||r)return!1;e=n&&n instanceof i.a?n:null}return!0}(e)?e.error(t):console.warn(t)}}forEach(e,t){return new(t=u(t))((t,n)=>{let i;i=this.subscribe(t=>{try{e(t)}catch(r){n(r),i&&i.unsubscribe()}},n,t)})}_subscribe(e){const{source:t}=this;return t&&t.subscribe(e)}[o.a](){return this}pipe(...e){return 0===e.length?this:Object(a.b)(e)(this)}toPromise(e){return new(e=u(e))((e,t)=>{let n;this.subscribe(e=>n=e,e=>t(e),()=>e(n))})}}return e.create=t=>new e(t),e})();function u(e){if(e||(e=c.a.Promise||Promise),!e)throw new Error("no Promise impl found");return e}},HH4o:function(e,t,n){var i=n("tiKp")("iterator"),r=!1;try{var s=0,o={next:function(){return{done:!!s++}},return:function(){r=!0}};o[i]=function(){return this},Array.from(o,(function(){throw 2}))}catch(a){}e.exports=function(e,t){if(!t&&!r)return!1;var n=!1;try{var s={};s[i]=function(){return{next:function(){return{done:n=!0}}}},e(s)}catch(a){}return n}},HP3h:function(e,t,n){!function(e){"use strict";var t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},n=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},i={s:["\u0623\u0642\u0644 \u0645\u0646 \u062b\u0627\u0646\u064a\u0629","\u062b\u0627\u0646\u064a\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062b\u0627\u0646\u064a\u062a\u0627\u0646","\u062b\u0627\u0646\u064a\u062a\u064a\u0646"],"%d \u062b\u0648\u0627\u0646","%d \u062b\u0627\u0646\u064a\u0629","%d \u062b\u0627\u0646\u064a\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062f\u0642\u064a\u0642\u0629","\u062f\u0642\u064a\u0642\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062f\u0642\u064a\u0642\u062a\u0627\u0646","\u062f\u0642\u064a\u0642\u062a\u064a\u0646"],"%d \u062f\u0642\u0627\u0626\u0642","%d \u062f\u0642\u064a\u0642\u0629","%d \u062f\u0642\u064a\u0642\u0629"],h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062d\u062f\u0629",["\u0633\u0627\u0639\u062a\u0627\u0646","\u0633\u0627\u0639\u062a\u064a\u0646"],"%d \u0633\u0627\u0639\u0627\u062a","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064a\u0648\u0645","\u064a\u0648\u0645 \u0648\u0627\u062d\u062f",["\u064a\u0648\u0645\u0627\u0646","\u064a\u0648\u0645\u064a\u0646"],"%d \u0623\u064a\u0627\u0645","%d \u064a\u0648\u0645\u064b\u0627","%d \u064a\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062d\u062f",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064a\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062d\u062f",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064a\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064b\u0627","%d \u0639\u0627\u0645"]},r=function(e){return function(t,r,s,o){var a=n(t),c=i[e][n(t)];return 2===a&&(c=c[r?0:1]),c.replace(/%d/i,t)}},s=["\u064a\u0646\u0627\u064a\u0631","\u0641\u0628\u0631\u0627\u064a\u0631","\u0645\u0627\u0631\u0633","\u0623\u0628\u0631\u064a\u0644","\u0645\u0627\u064a\u0648","\u064a\u0648\u0646\u064a\u0648","\u064a\u0648\u0644\u064a\u0648","\u0623\u063a\u0633\u0637\u0633","\u0633\u0628\u062a\u0645\u0628\u0631","\u0623\u0643\u062a\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062f\u064a\u0633\u0645\u0628\u0631"];e.defineLocale("ar-ly",{months:s,monthsShort:s,weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200fM/\u200fYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,t,n){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u064b\u0627 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062f %s",past:"\u0645\u0646\u0630 %s",s:r("s"),ss:r("s"),m:r("m"),mm:r("m"),h:r("h"),hh:r("h"),d:r("d"),dd:r("d"),M:r("M"),MM:r("M"),y:r("y"),yy:r("y")},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"\u060c")},week:{dow:6,doy:12}})}(n("wd/R"))},HYAF:function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},Hd5f:function(e,t,n){var i=n("0Dky"),r=n("tiKp"),s=n("LQDL"),o=r("species");e.exports=function(e){return s>=51||!i((function(){var t=[];return(t.constructor={})[o]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},Hicy:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return o}));var i=n("8Y7J"),r=n("SVse"),s=function(){function e(e,t,n){this._el=e,this._ngZone=t,this.platformId=n,this.clickOutsideEnabled=!0,this.attachOutsideOnClick=!1,this.delayClickOutsideInit=!1,this.emitOnBlur=!1,this.exclude="",this.excludeBeforeClick=!1,this.clickOutsideEvents="",this.clickOutside=new i.o,this._nodesExcluded=[],this._events=["click"],this._initOnClickBody=this._initOnClickBody.bind(this),this._onClickBody=this._onClickBody.bind(this),this._onWindowBlur=this._onWindowBlur.bind(this)}return e.prototype.ngOnInit=function(){Object(r.I)(this.platformId)&&this._init()},e.prototype.ngOnDestroy=function(){Object(r.I)(this.platformId)&&(this._removeClickOutsideListener(),this._removeAttachOutsideOnClickListener(),this._removeWindowBlurListener())},e.prototype.ngOnChanges=function(e){Object(r.I)(this.platformId)&&(e.attachOutsideOnClick||e.exclude||e.emitOnBlur)&&this._init()},e.prototype._init=function(){""!==this.clickOutsideEvents&&(this._events=this.clickOutsideEvents.split(",").map((function(e){return e.trim()}))),this._excludeCheck(),this.attachOutsideOnClick?this._initAttachOutsideOnClickListener():this._initOnClickBody(),this.emitOnBlur&&this._initWindowBlurListener()},e.prototype._initOnClickBody=function(){this.delayClickOutsideInit?setTimeout(this._initClickOutsideListener.bind(this)):this._initClickOutsideListener()},e.prototype._excludeCheck=function(){if(this.exclude)try{var e=Array.from(document.querySelectorAll(this.exclude));e&&(this._nodesExcluded=e)}catch(t){console.error("[ng-click-outside] Check your exclude selector syntax.",t)}},e.prototype._onClickBody=function(e){this.clickOutsideEnabled&&(this.excludeBeforeClick&&this._excludeCheck(),this._el.nativeElement.contains(e.target)||this._shouldExclude(e.target)||(this._emit(e),this.attachOutsideOnClick&&this._removeClickOutsideListener()))},e.prototype._onWindowBlur=function(e){var t=this;setTimeout((function(){document.hidden||t._emit(e)}))},e.prototype._emit=function(e){var t=this;this.clickOutsideEnabled&&this._ngZone.run((function(){return t.clickOutside.emit(e)}))},e.prototype._shouldExclude=function(e){for(var t=0,n=this._nodesExcluded;t<n.length;t++)if(n[t].contains(e))return!0;return!1},e.prototype._initClickOutsideListener=function(){var e=this;this._ngZone.runOutsideAngular((function(){e._events.forEach((function(t){return document.addEventListener(t,e._onClickBody)}))}))},e.prototype._removeClickOutsideListener=function(){var e=this;this._ngZone.runOutsideAngular((function(){e._events.forEach((function(t){return document.removeEventListener(t,e._onClickBody)}))}))},e.prototype._initAttachOutsideOnClickListener=function(){var e=this;this._ngZone.runOutsideAngular((function(){e._events.forEach((function(t){return e._el.nativeElement.addEventListener(t,e._initOnClickBody)}))}))},e.prototype._removeAttachOutsideOnClickListener=function(){var e=this;this._ngZone.runOutsideAngular((function(){e._events.forEach((function(t){return e._el.nativeElement.removeEventListener(t,e._initOnClickBody)}))}))},e.prototype._initWindowBlurListener=function(){var e=this;this._ngZone.runOutsideAngular((function(){window.addEventListener("blur",e._onWindowBlur)}))},e.prototype._removeWindowBlurListener=function(){var e=this;this._ngZone.runOutsideAngular((function(){window.removeEventListener("blur",e._onWindowBlur)}))},e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(i.A),i.Mb(i.C))},e.\u0275dir=i.Hb({type:e,selectors:[["","clickOutside",""]],inputs:{clickOutsideEnabled:"clickOutsideEnabled",attachOutsideOnClick:"attachOutsideOnClick",delayClickOutsideInit:"delayClickOutsideInit",emitOnBlur:"emitOnBlur",exclude:"exclude",excludeBeforeClick:"excludeBeforeClick",clickOutsideEvents:"clickOutsideEvents"},outputs:{clickOutside:"clickOutside"},features:[i.wb]}),e.\u0275prov=i.Ib({token:e,factory:function(t){return e.\u0275fac(t)}}),e}(),o=function(){function e(){}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)}}),e}()},"I+eb":function(e,t,n){var i=n("2oRo"),r=n("Bs8V").f,s=n("kRJp"),o=n("busE"),a=n("zk60"),c=n("6JNq"),l=n("lMq5");e.exports=function(e,t){var n,u,d,h,f,p=e.target,m=e.global,b=e.stat;if(n=m?i:b?i[p]||a(p,{}):(i[p]||{}).prototype)for(u in t){if(h=t[u],d=e.noTargetGet?(f=r(n,u))&&f.value:n[u],!l(m?u:p+(b?".":"#")+u,e.forced)&&void 0!==d){if(typeof h==typeof d)continue;c(h,d)}(e.sham||d&&d.sham)&&s(h,"sham",!0),o(n,u,h,e)}}},I55L:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const i=e=>e&&"number"==typeof e.length&&"function"!=typeof e},I8vh:function(e,t,n){var i=n("ppGB"),r=Math.max,s=Math.min;e.exports=function(e,t){var n=i(e);return n<0?r(n+t,0):s(n,t)}},IBtZ:function(e,t,n){!function(e){"use strict";e.defineLocale("ka",{months:"\u10d8\u10d0\u10dc\u10d5\u10d0\u10e0\u10d8_\u10d7\u10d4\u10d1\u10d4\u10e0\u10d5\u10d0\u10da\u10d8_\u10db\u10d0\u10e0\u10e2\u10d8_\u10d0\u10de\u10e0\u10d8\u10da\u10d8_\u10db\u10d0\u10d8\u10e1\u10d8_\u10d8\u10d5\u10dc\u10d8\u10e1\u10d8_\u10d8\u10d5\u10da\u10d8\u10e1\u10d8_\u10d0\u10d2\u10d5\u10d8\u10e1\u10e2\u10dd_\u10e1\u10d4\u10e5\u10e2\u10d4\u10db\u10d1\u10d4\u10e0\u10d8_\u10dd\u10e5\u10e2\u10dd\u10db\u10d1\u10d4\u10e0\u10d8_\u10dc\u10dd\u10d4\u10db\u10d1\u10d4\u10e0\u10d8_\u10d3\u10d4\u10d9\u10d4\u10db\u10d1\u10d4\u10e0\u10d8".split("_"),monthsShort:"\u10d8\u10d0\u10dc_\u10d7\u10d4\u10d1_\u10db\u10d0\u10e0_\u10d0\u10de\u10e0_\u10db\u10d0\u10d8_\u10d8\u10d5\u10dc_\u10d8\u10d5\u10da_\u10d0\u10d2\u10d5_\u10e1\u10d4\u10e5_\u10dd\u10e5\u10e2_\u10dc\u10dd\u10d4_\u10d3\u10d4\u10d9".split("_"),weekdays:{standalone:"\u10d9\u10d5\u10d8\u10e0\u10d0_\u10dd\u10e0\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8_\u10e1\u10d0\u10db\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8_\u10dd\u10d7\u10ee\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8_\u10ee\u10e3\u10d7\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8_\u10de\u10d0\u10e0\u10d0\u10e1\u10d9\u10d4\u10d5\u10d8_\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8".split("_"),format:"\u10d9\u10d5\u10d8\u10e0\u10d0\u10e1_\u10dd\u10e0\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1_\u10e1\u10d0\u10db\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1_\u10dd\u10d7\u10ee\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1_\u10ee\u10e3\u10d7\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1_\u10de\u10d0\u10e0\u10d0\u10e1\u10d9\u10d4\u10d5\u10e1_\u10e8\u10d0\u10d1\u10d0\u10d7\u10e1".split("_"),isFormat:/(\u10ec\u10d8\u10dc\u10d0|\u10e8\u10d4\u10db\u10d3\u10d4\u10d2)/},weekdaysShort:"\u10d9\u10d5\u10d8_\u10dd\u10e0\u10e8_\u10e1\u10d0\u10db_\u10dd\u10d7\u10ee_\u10ee\u10e3\u10d7_\u10de\u10d0\u10e0_\u10e8\u10d0\u10d1".split("_"),weekdaysMin:"\u10d9\u10d5_\u10dd\u10e0_\u10e1\u10d0_\u10dd\u10d7_\u10ee\u10e3_\u10de\u10d0_\u10e8\u10d0".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u10d3\u10e6\u10d4\u10e1] LT[-\u10d6\u10d4]",nextDay:"[\u10ee\u10d5\u10d0\u10da] LT[-\u10d6\u10d4]",lastDay:"[\u10d2\u10e3\u10e8\u10d8\u10dc] LT[-\u10d6\u10d4]",nextWeek:"[\u10e8\u10d4\u10db\u10d3\u10d4\u10d2] dddd LT[-\u10d6\u10d4]",lastWeek:"[\u10ec\u10d8\u10dc\u10d0] dddd LT-\u10d6\u10d4",sameElse:"L"},relativeTime:{future:function(e){return e.replace(/(\u10ec\u10d0\u10db|\u10ec\u10e3\u10d7|\u10e1\u10d0\u10d0\u10d7|\u10ec\u10d4\u10da|\u10d3\u10e6|\u10d7\u10d5)(\u10d8|\u10d4)/,(function(e,t,n){return"\u10d8"===n?t+"\u10e8\u10d8":t+n+"\u10e8\u10d8"}))},past:function(e){return/(\u10ec\u10d0\u10db\u10d8|\u10ec\u10e3\u10d7\u10d8|\u10e1\u10d0\u10d0\u10d7\u10d8|\u10d3\u10e6\u10d4|\u10d7\u10d5\u10d4)/.test(e)?e.replace(/(\u10d8|\u10d4)$/,"\u10d8\u10e1 \u10ec\u10d8\u10dc"):/\u10ec\u10d4\u10da\u10d8/.test(e)?e.replace(/\u10ec\u10d4\u10da\u10d8$/,"\u10ec\u10da\u10d8\u10e1 \u10ec\u10d8\u10dc"):e},s:"\u10e0\u10d0\u10db\u10d3\u10d4\u10dc\u10d8\u10db\u10d4 \u10ec\u10d0\u10db\u10d8",ss:"%d \u10ec\u10d0\u10db\u10d8",m:"\u10ec\u10e3\u10d7\u10d8",mm:"%d \u10ec\u10e3\u10d7\u10d8",h:"\u10e1\u10d0\u10d0\u10d7\u10d8",hh:"%d \u10e1\u10d0\u10d0\u10d7\u10d8",d:"\u10d3\u10e6\u10d4",dd:"%d \u10d3\u10e6\u10d4",M:"\u10d7\u10d5\u10d4",MM:"%d \u10d7\u10d5\u10d4",y:"\u10ec\u10d4\u10da\u10d8",yy:"%d \u10ec\u10d4\u10da\u10d8"},dayOfMonthOrdinalParse:/0|1-\u10da\u10d8|\u10db\u10d4-\d{1,2}|\d{1,2}-\u10d4/,ordinal:function(e){return 0===e?e:1===e?e+"-\u10da\u10d8":e<20||e<=100&&e%20==0||e%100==0?"\u10db\u10d4-"+e:e+"-\u10d4"},week:{dow:1,doy:7}})}(n("wd/R"))},IZUe:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("LvDl"),r=n.n(i),s=n("8Y7J");let o=(()=>{class e{constructor(e){this.elementRef=e,this.focus=!0}ngAfterViewInit(){const e=this.elementRef.nativeElement;this.focus&&r.a.isFunction(e.focus)&&e.focus()}set autofocus(e){r.a.isBoolean(e)?this.focus=e:r.a.isFunction(e)&&(this.focus=e())}}return e.\u0275fac=function(t){return new(t||e)(s.Mb(s.m))},e.\u0275dir=s.Hb({type:e,selectors:[["","autofocus",""]],inputs:{autofocus:"autofocus"}}),e})()},Iab2:function(e,t,n){var i,r;void 0===(r="function"==typeof(i=function(){"use strict";function t(e,t,n){var i=new XMLHttpRequest;i.open("GET",e),i.responseType="blob",i.onload=function(){s(i.response,t,n)},i.onerror=function(){console.error("could not download file")},i.send()}function n(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function i(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(t){var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(n)}}var r="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,s=r.saveAs||("object"!=typeof window||window!==r?function(){}:"download"in HTMLAnchorElement.prototype?function(e,s,o){var a=r.URL||r.webkitURL,c=document.createElement("a");c.download=s=s||e.name||"download",c.rel="noopener","string"==typeof e?(c.href=e,c.origin===location.origin?i(c):n(c.href)?t(e,s,o):i(c,c.target="_blank")):(c.href=a.createObjectURL(e),setTimeout((function(){a.revokeObjectURL(c.href)}),4e4),setTimeout((function(){i(c)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,r,s){if(r=r||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,s),r);else if(n(e))t(e,r,s);else{var o=document.createElement("a");o.href=e,o.target="_blank",setTimeout((function(){i(o)}))}}:function(e,n,i,s){if((s=s||open("","_blank"))&&(s.document.title=s.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,i);var o="application/octet-stream"===e.type,a=/constructor/i.test(r.HTMLElement)||r.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||o&&a)&&"object"==typeof FileReader){var l=new FileReader;l.onloadend=function(){var e=l.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),s?s.location.href=e:location=e,s=null},l.readAsDataURL(e)}else{var u=r.URL||r.webkitURL,d=u.createObjectURL(e);s?s.location=d:location.href=d,s=null,setTimeout((function(){u.revokeObjectURL(d)}),4e4)}});r.saveAs=s.saveAs=s,e.exports=s})?i.apply(t,[]):i)||(e.exports=r)},IheW:function(e,t,n){"use strict";n.d(t,"a",(function(){return C})),n.d(t,"b",(function(){return D})),n.d(t,"c",(function(){return $})),n.d(t,"d",(function(){return k})),n.d(t,"e",(function(){return m}));var i=n("8Y7J"),r=n("LRne"),s=n("HDdC"),o=n("bOdf"),a=n("pLZG"),c=n("lJxs"),l=n("SVse");class u{}class d{}class h{constructor(e){this.normalizedNames=new Map,this.lazyUpdate=null,e?this.lazyInit="string"==typeof e?()=>{this.headers=new Map,e.split("\n").forEach(e=>{const t=e.indexOf(":");if(t>0){const n=e.slice(0,t),i=n.toLowerCase(),r=e.slice(t+1).trim();this.maybeSetNormalizedName(n,i),this.headers.has(i)?this.headers.get(i).push(r):this.headers.set(i,[r])}})}:()=>{this.headers=new Map,Object.keys(e).forEach(t=>{let n=e[t];const i=t.toLowerCase();"string"==typeof n&&(n=[n]),n.length>0&&(this.headers.set(i,n),this.maybeSetNormalizedName(t,i))})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();const t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof h?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))})}clone(e){const t=new h;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof h?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){const t=e.name.toLowerCase();switch(e.op){case"a":case"s":let n=e.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(e.name,t);const i=("a"===e.op?this.headers.get(t):void 0)||[];i.push(...n),this.headers.set(t,i);break;case"d":const r=e.value;if(r){let e=this.headers.get(t);if(!e)return;e=e.filter(e=>-1===r.indexOf(e)),0===e.length?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,e)}else this.headers.delete(t),this.normalizedNames.delete(t)}}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}}class f{encodeKey(e){return p(e)}encodeValue(e){return p(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}}function p(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}class m{constructor(e={}){if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new f,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function(e,t){const n=new Map;return e.length>0&&e.split("&").forEach(e=>{const i=e.indexOf("="),[r,s]=-1==i?[t.decodeKey(e),""]:[t.decodeKey(e.slice(0,i)),t.decodeValue(e.slice(i+1))],o=n.get(r)||[];o.push(s),n.set(r,o)}),n}(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{const n=e.fromObject[t];this.map.set(t,Array.isArray(n)?n:[n])})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();const t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{const t=this.encoder.encodeKey(e);return this.map.get(e).map(e=>t+"="+this.encoder.encodeValue(e)).join("&")}).filter(e=>""!==e).join("&")}clone(e){const t=new m({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat([e]),t}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":const t=("a"===e.op?this.map.get(e.param):void 0)||[];t.push(e.value),this.map.set(e.param,t);break;case"d":if(void 0===e.value){this.map.delete(e.param);break}{let t=this.map.get(e.param)||[];const n=t.indexOf(e.value);-1!==n&&t.splice(n,1),t.length>0?this.map.set(e.param,t):this.map.delete(e.param)}}}),this.cloneFrom=this.updates=null)}}function b(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer}function g(e){return"undefined"!=typeof Blob&&e instanceof Blob}function _(e){return"undefined"!=typeof FormData&&e instanceof FormData}class y{constructor(e,t,n,i){let r;if(this.url=t,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase(),function(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||i?(this.body=void 0!==n?n:null,r=i):r=n,r&&(this.reportProgress=!!r.reportProgress,this.withCredentials=!!r.withCredentials,r.responseType&&(this.responseType=r.responseType),r.headers&&(this.headers=r.headers),r.params&&(this.params=r.params)),this.headers||(this.headers=new h),this.params){const e=this.params.toString();if(0===e.length)this.urlWithParams=t;else{const n=t.indexOf("?");this.urlWithParams=t+(-1===n?"?":n<t.length-1?"&":"")+e}}else this.params=new m,this.urlWithParams=t}serializeBody(){return null===this.body?null:b(this.body)||g(this.body)||_(this.body)||"string"==typeof this.body?this.body:this.body instanceof m?this.body.toString():"object"==typeof this.body||"boolean"==typeof this.body||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return null===this.body||_(this.body)?null:g(this.body)?this.body.type||null:b(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof m?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||Array.isArray(this.body)?"application/json":null}clone(e={}){const t=e.method||this.method,n=e.url||this.url,i=e.responseType||this.responseType,r=void 0!==e.body?e.body:this.body,s=void 0!==e.withCredentials?e.withCredentials:this.withCredentials,o=void 0!==e.reportProgress?e.reportProgress:this.reportProgress;let a=e.headers||this.headers,c=e.params||this.params;return void 0!==e.setHeaders&&(a=Object.keys(e.setHeaders).reduce((t,n)=>t.set(n,e.setHeaders[n]),a)),e.setParams&&(c=Object.keys(e.setParams).reduce((t,n)=>t.set(n,e.setParams[n]),c)),new y(t,n,r,{params:c,headers:a,reportProgress:o,responseType:i,withCredentials:s})}}var v=function(e){return e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User",e}({});class w{constructor(e,t=200,n="OK"){this.headers=e.headers||new h,this.status=void 0!==e.status?e.status:t,this.statusText=e.statusText||n,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}}class S extends w{constructor(e={}){super(e),this.type=v.ResponseHeader}clone(e={}){return new S({headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}class M extends w{constructor(e={}){super(e),this.type=v.Response,this.body=void 0!==e.body?e.body:null}clone(e={}){return new M({body:void 0!==e.body?e.body:this.body,headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}}class k extends w{constructor(e){super(e,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?"Http failure during parsing for "+(e.url||"(unknown url)"):`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}}function x(e,t){return{body:t,headers:e.headers,observe:e.observe,params:e.params,reportProgress:e.reportProgress,responseType:e.responseType,withCredentials:e.withCredentials}}let D=(()=>{class e{constructor(e){this.handler=e}request(e,t,n={}){let i;if(e instanceof y)i=e;else{let r=void 0;r=n.headers instanceof h?n.headers:new h(n.headers);let s=void 0;n.params&&(s=n.params instanceof m?n.params:new m({fromObject:n.params})),i=new y(e,t,void 0!==n.body?n.body:null,{headers:r,params:s,reportProgress:n.reportProgress,responseType:n.responseType||"json",withCredentials:n.withCredentials})}const s=Object(r.a)(i).pipe(Object(o.a)(e=>this.handler.handle(e)));if(e instanceof y||"events"===n.observe)return s;const l=s.pipe(Object(a.a)(e=>e instanceof M));switch(n.observe||"body"){case"body":switch(i.responseType){case"arraybuffer":return l.pipe(Object(c.a)(e=>{if(null!==e.body&&!(e.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return e.body}));case"blob":return l.pipe(Object(c.a)(e=>{if(null!==e.body&&!(e.body instanceof Blob))throw new Error("Response is not a Blob.");return e.body}));case"text":return l.pipe(Object(c.a)(e=>{if(null!==e.body&&"string"!=typeof e.body)throw new Error("Response is not a string.");return e.body}));case"json":default:return l.pipe(Object(c.a)(e=>e.body))}case"response":return l;default:throw new Error(`Unreachable: unhandled observe type ${n.observe}}`)}}delete(e,t={}){return this.request("DELETE",e,t)}get(e,t={}){return this.request("GET",e,t)}head(e,t={}){return this.request("HEAD",e,t)}jsonp(e,t){return this.request("JSONP",e,{params:(new m).append(t,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,t={}){return this.request("OPTIONS",e,t)}patch(e,t,n={}){return this.request("PATCH",e,x(n,t))}post(e,t,n={}){return this.request("POST",e,x(n,t))}put(e,t,n={}){return this.request("PUT",e,x(n,t))}}return e.\u0275fac=function(t){return new(t||e)(i.dc(u))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})();class T{constructor(e,t){this.next=e,this.interceptor=t}handle(e){return this.interceptor.intercept(e,this.next)}}const C=new i.r("HTTP_INTERCEPTORS");let O=(()=>{class e{intercept(e,t){return t.handle(e)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})();const L=/^\)\]\}',?\n/;class R{}let E=(()=>{class e{constructor(){}build(){return new XMLHttpRequest}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})(),A=(()=>{class e{constructor(e){this.xhrFactory=e}handle(e){if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new s.a(t=>{const n=this.xhrFactory.build();if(n.open(e.method,e.urlWithParams),e.withCredentials&&(n.withCredentials=!0),e.headers.forEach((e,t)=>n.setRequestHeader(e,t.join(","))),e.headers.has("Accept")||n.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){const t=e.detectContentTypeHeader();null!==t&&n.setRequestHeader("Content-Type",t)}if(e.responseType){const t=e.responseType.toLowerCase();n.responseType="json"!==t?t:"text"}const i=e.serializeBody();let r=null;const s=()=>{if(null!==r)return r;const t=1223===n.status?204:n.status,i=n.statusText||"OK",s=new h(n.getAllResponseHeaders()),o=function(e){return"responseURL"in e&&e.responseURL?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):null}(n)||e.url;return r=new S({headers:s,status:t,statusText:i,url:o}),r},o=()=>{let{headers:i,status:r,statusText:o,url:a}=s(),c=null;204!==r&&(c=void 0===n.response?n.responseText:n.response),0===r&&(r=c?200:0);let l=r>=200&&r<300;if("json"===e.responseType&&"string"==typeof c){const e=c;c=c.replace(L,"");try{c=""!==c?JSON.parse(c):null}catch(u){c=e,l&&(l=!1,c={error:u,text:c})}}l?(t.next(new M({body:c,headers:i,status:r,statusText:o,url:a||void 0})),t.complete()):t.error(new k({error:c,headers:i,status:r,statusText:o,url:a||void 0}))},a=e=>{const{url:i}=s(),r=new k({error:e,status:n.status||0,statusText:n.statusText||"Unknown Error",url:i||void 0});t.error(r)};let c=!1;const l=i=>{c||(t.next(s()),c=!0);let r={type:v.DownloadProgress,loaded:i.loaded};i.lengthComputable&&(r.total=i.total),"text"===e.responseType&&n.responseText&&(r.partialText=n.responseText),t.next(r)},u=e=>{let n={type:v.UploadProgress,loaded:e.loaded};e.lengthComputable&&(n.total=e.total),t.next(n)};return n.addEventListener("load",o),n.addEventListener("error",a),e.reportProgress&&(n.addEventListener("progress",l),null!==i&&n.upload&&n.upload.addEventListener("progress",u)),n.send(i),t.next({type:v.Sent}),()=>{n.removeEventListener("error",a),n.removeEventListener("load",o),e.reportProgress&&(n.removeEventListener("progress",l),null!==i&&n.upload&&n.upload.removeEventListener("progress",u)),n.readyState!==n.DONE&&n.abort()}})}}return e.\u0275fac=function(t){return new(t||e)(i.dc(R))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})();const I=new i.r("XSRF_COOKIE_NAME"),P=new i.r("XSRF_HEADER_NAME");class N{}let j=(()=>{class e{constructor(e,t,n){this.doc=e,this.platform=t,this.cookieName=n,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=Object(l.M)(e,this.cookieName),this.lastCookieString=e),this.lastToken}}return e.\u0275fac=function(t){return new(t||e)(i.dc(l.d),i.dc(i.C),i.dc(I))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})(),F=(()=>{class e{constructor(e,t){this.tokenService=e,this.headerName=t}intercept(e,t){const n=e.url.toLowerCase();if("GET"===e.method||"HEAD"===e.method||n.startsWith("http://")||n.startsWith("https://"))return t.handle(e);const i=this.tokenService.getToken();return null===i||e.headers.has(this.headerName)||(e=e.clone({headers:e.headers.set(this.headerName,i)})),t.handle(e)}}return e.\u0275fac=function(t){return new(t||e)(i.dc(N),i.dc(P))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})(),Y=(()=>{class e{constructor(e,t){this.backend=e,this.injector=t,this.chain=null}handle(e){if(null===this.chain){const e=this.injector.get(C,[]);this.chain=e.reduceRight((e,t)=>new T(e,t),this.backend)}return this.chain.handle(e)}}return e.\u0275fac=function(t){return new(t||e)(i.dc(d),i.dc(i.s))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})(),z=(()=>{class e{static disable(){return{ngModule:e,providers:[{provide:F,useClass:O}]}}static withOptions(t={}){return{ngModule:e,providers:[t.cookieName?{provide:I,useValue:t.cookieName}:[],t.headerName?{provide:P,useValue:t.headerName}:[]]}}}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},providers:[F,{provide:C,useExisting:F,multi:!0},{provide:N,useClass:j},{provide:I,useValue:"XSRF-TOKEN"},{provide:P,useValue:"X-XSRF-TOKEN"}]}),e})(),$=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},providers:[D,{provide:u,useClass:Y},A,{provide:d,useExisting:A},E,{provide:R,useExisting:E}],imports:[[z.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),e})()},IjjT:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));let i=(()=>{class e{constructor(t,n=e.now){this.SchedulerAction=t,this.now=n}schedule(e,t=0,n){return new this.SchedulerAction(this,e).schedule(n,t)}}return e.now=()=>Date.now(),e})();class r extends i{constructor(e,t=i.now){super(e,()=>r.delegate&&r.delegate!==this?r.delegate.now():t()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(e,t=0,n){return r.delegate&&r.delegate!==this?r.delegate.schedule(e,t,n):super.schedule(e,t,n)}flush(e){const{actions:t}=this;if(this.active)return void t.push(e);let n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}}},ImZN:function(e,t,n){var i=n("glrk"),r=n("6VoE"),s=n("UMSQ"),o=n("A2ZE"),a=n("NaFW"),c=n("m92n"),l=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,u,d){var h,f,p,m,b,g,_,y=o(t,n,u?2:1);if(d)h=e;else{if("function"!=typeof(f=a(e)))throw TypeError("Target is not iterable");if(r(f)){for(p=0,m=s(e.length);m>p;p++)if((b=u?y(i(_=e[p])[0],_[1]):y(e[p]))&&b instanceof l)return b;return new l(!1)}h=f.call(e)}for(g=h.next;!(_=g.call(h)).done;)if("object"==typeof(b=c(h,y,_.value,u))&&b&&b instanceof l)return b;return new l(!1)}).stop=function(e){return new l(!0,e)}},"Ivi+":function(e,t,n){!function(e){"use strict";e.defineLocale("ko",{months:"1\uc6d4_2\uc6d4_3\uc6d4_4\uc6d4_5\uc6d4_6\uc6d4_7\uc6d4_8\uc6d4_9\uc6d4_10\uc6d4_11\uc6d4_12\uc6d4".split("_"),monthsShort:"1\uc6d4_2\uc6d4_3\uc6d4_4\uc6d4_5\uc6d4_6\uc6d4_7\uc6d4_8\uc6d4_9\uc6d4_10\uc6d4_11\uc6d4_12\uc6d4".split("_"),weekdays:"\uc77c\uc694\uc77c_\uc6d4\uc694\uc77c_\ud654\uc694\uc77c_\uc218\uc694\uc77c_\ubaa9\uc694\uc77c_\uae08\uc694\uc77c_\ud1a0\uc694\uc77c".split("_"),weekdaysShort:"\uc77c_\uc6d4_\ud654_\uc218_\ubaa9_\uae08_\ud1a0".split("_"),weekdaysMin:"\uc77c_\uc6d4_\ud654_\uc218_\ubaa9_\uae08_\ud1a0".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY\ub144 MMMM D\uc77c",LLL:"YYYY\ub144 MMMM D\uc77c A h:mm",LLLL:"YYYY\ub144 MMMM D\uc77c dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY\ub144 MMMM D\uc77c",lll:"YYYY\ub144 MMMM D\uc77c A h:mm",llll:"YYYY\ub144 MMMM D\uc77c dddd A h:mm"},calendar:{sameDay:"\uc624\ub298 LT",nextDay:"\ub0b4\uc77c LT",nextWeek:"dddd LT",lastDay:"\uc5b4\uc81c LT",lastWeek:"\uc9c0\ub09c\uc8fc dddd LT",sameElse:"L"},relativeTime:{future:"%s \ud6c4",past:"%s \uc804",s:"\uba87 \ucd08",ss:"%d\ucd08",m:"1\ubd84",mm:"%d\ubd84",h:"\ud55c \uc2dc\uac04",hh:"%d\uc2dc\uac04",d:"\ud558\ub8e8",dd:"%d\uc77c",M:"\ud55c \ub2ec",MM:"%d\ub2ec",y:"\uc77c \ub144",yy:"%d\ub144"},dayOfMonthOrdinalParse:/\d{1,2}(\uc77c|\uc6d4|\uc8fc)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"\uc77c";case"M":return e+"\uc6d4";case"w":case"W":return e+"\uc8fc";default:return e}},meridiemParse:/\uc624\uc804|\uc624\ud6c4/,isPM:function(e){return"\uc624\ud6c4"===e},meridiem:function(e,t,n){return e<12?"\uc624\uc804":"\uc624\ud6c4"}})}(n("wd/R"))},IzCI:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("aXbf"),r=n("8Y7J");let s=(()=>{class e{constructor(e){this.formatter=e}transform(e){return this.formatter.format_number(e,1024,["B/s","kB/s","MB/s","GB/s","TB/s","PB/s","EB/s","ZB/s","YB/s"])}}return e.\u0275fac=function(t){return new(t||e)(r.Mb(i.a))},e.\u0275pipe=r.Lb({name:"dimlessBinaryPerSecond",type:e,pure:!0}),e})()},IzEk:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("7o/Q"),r=n("4I5i"),s=n("EY2u");function o(e){return t=>0===e?Object(s.b)():t.lift(new a(e))}class a{constructor(e){if(this.total=e,this.total<0)throw new r.a}call(e,t){return t.subscribe(new c(e,this.total))}}class c extends i.a{constructor(e,t){super(e),this.total=t,this.count=0}_next(e){const t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))}}},JBy8:function(e,t,n){var i=n("yoRg"),r=n("eDl+").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return i(e,r)}},"JCF/":function(e,t,n){!function(e){"use strict";var t={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},n={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"},i=["\u06a9\u0627\u0646\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645","\u0634\u0648\u0628\u0627\u062a","\u0626\u0627\u0632\u0627\u0631","\u0646\u06cc\u0633\u0627\u0646","\u0626\u0627\u06cc\u0627\u0631","\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646","\u062a\u06d5\u0645\u0645\u0648\u0632","\u0626\u0627\u0628","\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644","\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u0643\u06d5\u0645","\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645","\u0643\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645"];e.defineLocale("ku",{months:i,monthsShort:i,weekdays:"\u06cc\u0647\u200c\u0643\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u062f\u0648\u0648\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u0633\u06ce\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u0686\u0648\u0627\u0631\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u067e\u06ce\u0646\u062c\u0634\u0647\u200c\u0645\u0645\u0647\u200c_\u0647\u0647\u200c\u06cc\u0646\u06cc_\u0634\u0647\u200c\u0645\u0645\u0647\u200c".split("_"),weekdaysShort:"\u06cc\u0647\u200c\u0643\u0634\u0647\u200c\u0645_\u062f\u0648\u0648\u0634\u0647\u200c\u0645_\u0633\u06ce\u0634\u0647\u200c\u0645_\u0686\u0648\u0627\u0631\u0634\u0647\u200c\u0645_\u067e\u06ce\u0646\u062c\u0634\u0647\u200c\u0645_\u0647\u0647\u200c\u06cc\u0646\u06cc_\u0634\u0647\u200c\u0645\u0645\u0647\u200c".split("_"),weekdaysMin:"\u06cc_\u062f_\u0633_\u0686_\u067e_\u0647_\u0634".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/\u0626\u06ce\u0648\u0627\u0631\u0647\u200c|\u0628\u0647\u200c\u06cc\u0627\u0646\u06cc/,isPM:function(e){return/\u0626\u06ce\u0648\u0627\u0631\u0647\u200c/.test(e)},meridiem:function(e,t,n){return e<12?"\u0628\u0647\u200c\u06cc\u0627\u0646\u06cc":"\u0626\u06ce\u0648\u0627\u0631\u0647\u200c"},calendar:{sameDay:"[\u0626\u0647\u200c\u0645\u0631\u06c6 \u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",nextDay:"[\u0628\u0647\u200c\u06cc\u0627\u0646\u06cc \u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",nextWeek:"dddd [\u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",lastDay:"[\u062f\u0648\u06ce\u0646\u06ce \u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",lastWeek:"dddd [\u0643\u0627\u062a\u0698\u0645\u06ce\u0631] LT",sameElse:"L"},relativeTime:{future:"\u0644\u0647\u200c %s",past:"%s",s:"\u0686\u0647\u200c\u0646\u062f \u0686\u0631\u0643\u0647\u200c\u06cc\u0647\u200c\u0643",ss:"\u0686\u0631\u0643\u0647\u200c %d",m:"\u06cc\u0647\u200c\u0643 \u062e\u0648\u0644\u0647\u200c\u0643",mm:"%d \u062e\u0648\u0644\u0647\u200c\u0643",h:"\u06cc\u0647\u200c\u0643 \u0643\u0627\u062a\u0698\u0645\u06ce\u0631",hh:"%d \u0643\u0627\u062a\u0698\u0645\u06ce\u0631",d:"\u06cc\u0647\u200c\u0643 \u0695\u06c6\u0698",dd:"%d \u0695\u06c6\u0698",M:"\u06cc\u0647\u200c\u0643 \u0645\u0627\u0646\u06af",MM:"%d \u0645\u0627\u0646\u06af",y:"\u06cc\u0647\u200c\u0643 \u0633\u0627\u06b5",yy:"%d \u0633\u0627\u06b5"},preparse:function(e){return e.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,(function(e){return n[e]})).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"\u060c")},week:{dow:6,doy:12}})}(n("wd/R"))},JIr8:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("zx2A");function r(e){return function(t){const n=new s(e),i=t.lift(n);return n.caught=i}}class s{constructor(e){this.selector=e}call(e,t){return t.subscribe(new o(e,this.selector,this.caught))}}class o extends i.b{constructor(e,t,n){super(e),this.selector=t,this.caught=n}error(e){if(!this.isStopped){let n;try{n=this.selector(e,this.caught)}catch(t){return void super.error(t)}this._unsubscribeAndRecycle();const r=new i.a(this);this.add(r);const s=Object(i.c)(n,r);s!==r&&this.add(s)}}}},"JK/P":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("8Y7J"),r=n("G0yt");let s=(()=>{class e{constructor(e){this.modal=e}show(e,t,n){const i=this.modal.open(e,n);return t&&Object.assign(i.componentInstance,t),i}dismissAll(){this.modal.dismissAll()}hasOpenModals(){return this.modal.hasOpenModals()}}return e.\u0275fac=function(t){return new(t||e)(i.dc(r.o))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},JP8w:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("8Y7J"),r=n("G0yt");let s=(()=>{class e{constructor(e){this.nav=e,this.localStorage=window.localStorage}ngOnInit(){const e=this.localStorage.getItem("tabset_"+this.cdStatefulTab);e&&this.nav.select(e)}onNavChange(e){this.cdStatefulTab&&e.nextId&&this.localStorage.setItem("tabset_"+this.cdStatefulTab,e.nextId)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(r.p,9))},e.\u0275dir=i.Hb({type:e,selectors:[["","cdStatefulTab",""]],hostBindings:function(e,t){1&e&&i.gc("navChange",(function(e){return t.onNavChange(e)}))},inputs:{cdStatefulTab:"cdStatefulTab"}}),e})()},JVSJ:function(e,t,n){!function(e){"use strict";function t(e,t,n){var i=e+" ";switch(n){case"ss":return i+(1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi");case"m":return t?"jedna minuta":"jedne minute";case"mm":return i+(1===e?"minuta":2===e||3===e||4===e?"minute":"minuta");case"h":return t?"jedan sat":"jednog sata";case"hh":return i+(1===e?"sat":2===e||3===e||4===e?"sata":"sati");case"dd":return i+(1===e?"dan":"dana");case"MM":return i+(1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci");case"yy":return i+(1===e?"godina":2===e||3===e||4===e?"godine":"godina")}}e.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_\u010detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._\u010det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010de_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[ju\u010der u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[pro\u0161lu] dddd [u] LT";case 6:return"[pro\u0161le] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[pro\u0161li] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n("wd/R"))},JX91:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("GyhO"),r=n("z+Ro");function s(...e){const t=e[e.length-1];return Object(r.a)(t)?(e.pop(),n=>Object(i.a)(e,n,t)):t=>Object(i.a)(e,t)}},"Ju5/":function(e,t,n){"use strict";var i=n("XqMk"),r="object"==typeof self&&self&&self.Object===Object&&self,s=i.a||r||Function("return this")();t.a=s},JvlW:function(e,t,n){!function(e){"use strict";var t={ss:"sekund\u0117_sekund\u017ei\u0173_sekundes",m:"minut\u0117_minut\u0117s_minut\u0119",mm:"minut\u0117s_minu\u010di\u0173_minutes",h:"valanda_valandos_valand\u0105",hh:"valandos_valand\u0173_valandas",d:"diena_dienos_dien\u0105",dd:"dienos_dien\u0173_dienas",M:"m\u0117nuo_m\u0117nesio_m\u0117nes\u012f",MM:"m\u0117nesiai_m\u0117nesi\u0173_m\u0117nesius",y:"metai_met\u0173_metus",yy:"metai_met\u0173_metus"};function n(e,t,n,i){return t?r(n)[0]:i?r(n)[1]:r(n)[2]}function i(e){return e%10==0||e>10&&e<20}function r(e){return t[e].split("_")}function s(e,t,s,o){var a=e+" ";return 1===e?a+n(0,t,s[0],o):t?a+(i(e)?r(s)[1]:r(s)[0]):o?a+r(s)[1]:a+(i(e)?r(s)[1]:r(s)[2])}e.defineLocale("lt",{months:{format:"sausio_vasario_kovo_baland\u017eio_gegu\u017e\u0117s_bir\u017eelio_liepos_rugpj\u016b\u010dio_rugs\u0117jo_spalio_lapkri\u010dio_gruod\u017eio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegu\u017e\u0117_bir\u017eelis_liepa_rugpj\u016btis_rugs\u0117jis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadien\u012f_pirmadien\u012f_antradien\u012f_tre\u010diadien\u012f_ketvirtadien\u012f_penktadien\u012f_\u0161e\u0161tadien\u012f".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_tre\u010diadienis_ketvirtadienis_penktadienis_\u0161e\u0161tadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_\u0160e\u0161".split("_"),weekdaysMin:"S_P_A_T_K_Pn_\u0160".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[\u0160iandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Pra\u0117jus\u012f] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prie\u0161 %s",s:function(e,t,n,i){return t?"kelios sekund\u0117s":i?"keli\u0173 sekund\u017ei\u0173":"kelias sekundes"},ss:s,m:n,mm:s,h:n,hh:s,d:n,dd:s,M:n,MM:s,y:n,yy:s},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}})}(n("wd/R"))},"K/tc":function(e,t,n){!function(e){"use strict";e.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"vm":"VM":n?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[M\xf4re om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n("wd/R"))},KSF8:function(e,t,n){!function(e){"use strict";e.defineLocale("vi",{months:"th\xe1ng 1_th\xe1ng 2_th\xe1ng 3_th\xe1ng 4_th\xe1ng 5_th\xe1ng 6_th\xe1ng 7_th\xe1ng 8_th\xe1ng 9_th\xe1ng 10_th\xe1ng 11_th\xe1ng 12".split("_"),monthsShort:"Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12".split("_"),monthsParseExact:!0,weekdays:"ch\u1ee7 nh\u1eadt_th\u1ee9 hai_th\u1ee9 ba_th\u1ee9 t\u01b0_th\u1ee9 n\u0103m_th\u1ee9 s\xe1u_th\u1ee9 b\u1ea3y".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"sa":"SA":n?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [n\u0103m] YYYY",LLL:"D MMMM [n\u0103m] YYYY HH:mm",LLLL:"dddd, D MMMM [n\u0103m] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[H\xf4m nay l\xfac] LT",nextDay:"[Ng\xe0y mai l\xfac] LT",nextWeek:"dddd [tu\u1ea7n t\u1edbi l\xfac] LT",lastDay:"[H\xf4m qua l\xfac] LT",lastWeek:"dddd [tu\u1ea7n tr\u01b0\u1edbc l\xfac] LT",sameElse:"L"},relativeTime:{future:"%s t\u1edbi",past:"%s tr\u01b0\u1edbc",s:"v\xe0i gi\xe2y",ss:"%d gi\xe2y",m:"m\u1ed9t ph\xfat",mm:"%d ph\xfat",h:"m\u1ed9t gi\u1edd",hh:"%d gi\u1edd",d:"m\u1ed9t ng\xe0y",dd:"%d ng\xe0y",w:"m\u1ed9t tu\u1ea7n",ww:"%d tu\u1ea7n",M:"m\u1ed9t th\xe1ng",MM:"%d th\xe1ng",y:"m\u1ed9t n\u0103m",yy:"%d n\u0103m"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n("wd/R"))},KTz0:function(e,t,n){!function(e){"use strict";var t={words:{ss:["sekund","sekunda","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,i){var r=t.words[i];return 1===i.length?n?r[0]:r[1]:e+" "+t.correctGrammaticalCase(e,r)}};e.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_\u010detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._\u010det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010de_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[ju\u010de u] LT",lastWeek:function(){return["[pro\u0161le] [nedjelje] [u] LT","[pro\u0161log] [ponedjeljka] [u] LT","[pro\u0161log] [utorka] [u] LT","[pro\u0161le] [srijede] [u] LT","[pro\u0161log] [\u010detvrtka] [u] LT","[pro\u0161log] [petka] [u] LT","[pro\u0161le] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mjesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n("wd/R"))},Kqap:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("7o/Q");function r(e,t){let n=!1;return arguments.length>=2&&(n=!0),function(i){return i.lift(new s(e,t,n))}}class s{constructor(e,t,n=!1){this.accumulator=e,this.seed=t,this.hasSeed=n}call(e,t){return t.subscribe(new o(e,this.accumulator,this.seed,this.hasSeed))}}class o extends i.a{constructor(e,t,n,i){super(e),this.accumulator=t,this._seed=n,this.hasSeed=i,this.index=0}get seed(){return this._seed}set seed(e){this.hasSeed=!0,this._seed=e}_next(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)}_tryNext(e){const t=this.index++;let n;try{n=this.accumulator(this.seed,e,t)}catch(i){this.destination.error(i)}this.seed=n,this.destination.next(n)}}},KqfI:function(e,t,n){"use strict";function i(){}n.d(t,"a",(function(){return i}))},L3Qv:function(e,t,n){"use strict";t.a=function(){return!1}},LQDL:function(e,t,n){var i,r,s=n("2oRo"),o=n("NC/Y"),a=s.process,c=a&&a.versions,l=c&&c.v8;l?r=(i=l.split("."))[0]+i[1]:o&&(!(i=o.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=o.match(/Chrome\/(\d+)/))&&(r=i[1]),e.exports=r&&+r},LRne:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("z+Ro"),r=n("yCtX"),s=n("jZKg");function o(...e){let t=e[e.length-1];return Object(i.a)(t)?(e.pop(),Object(s.a)(e,t)):Object(r.a)(e)}},LceX:function(e,t,n){"use strict";n.r(t),n.d(t,"AuthModule",(function(){return Qe})),n.d(t,"RoutedAuthModule",(function(){return Ze}));var i=n("SVse"),r=n("s7LF"),s=n("iInd"),o=n("G0yt"),a=n("zWsK"),c=n("sne2"),l=n("PCNd"),u=n("LvDl"),d=n.n(u),h=n("cp0P"),f=n("LRne"),p=n("5+tZ"),m=n("8Y7J"),b=n("IheW");let g=(()=>{class e{constructor(e){this.http=e}list(){return this.http.get("api/role")}delete(e){return this.http.delete("api/role/"+e)}get(e){return this.http.get("api/role/"+e)}create(e){return this.http.post("api/role",e)}clone(e,t){return this.http.post(`api/role/${e}/clone`,{new_name:t})}update(e){return this.http.put("api/role/"+e.name,e)}exists(e){return this.list().pipe(Object(p.a)(t=>{const n=t.some(t=>t.name===e);return Object(f.a)(n)}))}}return e.\u0275fac=function(t){return new(t||e)(m.dc(b.b))},e.\u0275prov=m.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),_=(()=>{class e{constructor(e){this.http=e}list(){return this.http.get("ui-api/scope")}}return e.\u0275fac=function(t){return new(t||e)(m.dc(b.b))},e.\u0275prov=m.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var y=n("mtw6"),v=n("spCT"),w=n("QFaf"),S=n("1Ni5"),M=n("9nlD"),k=function(e){return e.editing="editing",e}({});class x{}var D=n("zc8c"),T=n("NwgZ"),C=n("ocLN"),O=n("ANnk"),L=n("f69J"),R=n("IZUe"),E=n("uIqm"),A=n("6+kj"),I=n("8xTl");const P=["headerPermissionCheckboxTpl"],N=["cellScopeCheckboxTpl"],j=["cellPermissionCheckboxTpl"];function F(e,t){1&e&&(m.Sb(0,"span",27),m.Wb(1,28),m.Rb())}function Y(e,t){1&e&&(m.Sb(0,"span",27),m.Wb(1,29),m.Rb())}const z=function(e){return{required:e}};function $(e,t){if(1&e){const e=m.Tb();m.Sb(0,"div",4),m.Sb(1,"form",5,6),m.Sb(3,"div",7),m.Sb(4,"div",8),m.Wb(5,9),m.jc(6,"titlecase"),m.jc(7,"upperFirst"),m.Rb(),m.Sb(8,"div",10),m.Sb(9,"div",11),m.Sb(10,"label",12),m.Wb(11,13),m.Rb(),m.Sb(12,"div",14),m.Sb(13,"input",15),m.Yb(14,16),m.Rb(),m.Mc(15,F,2,0,"span",17),m.Mc(16,Y,2,0,"span",17),m.Rb(),m.Rb(),m.Sb(17,"div",11),m.Sb(18,"label",18),m.Wb(19,19),m.Rb(),m.Sb(20,"div",14),m.Sb(21,"input",20),m.Yb(22,21),m.Rb(),m.Rb(),m.Rb(),m.Sb(23,"div",11),m.Sb(24,"label",22),m.Wb(25,23),m.Rb(),m.Sb(26,"div",14),m.Nb(27,"cd-table",24),m.Rb(),m.Rb(),m.Rb(),m.Sb(28,"div",25),m.Sb(29,"cd-form-button-panel",26),m.gc("submitActionEvent",(function(){return m.Dc(e),m.ic().submit()})),m.jc(30,"titlecase"),m.jc(31,"upperFirst"),m.Rb(),m.Rb(),m.Rb(),m.Rb(),m.Rb()}if(2&e){const e=m.Ac(2),t=m.ic();m.yb(1),m.pc("formGroup",t.roleForm),m.yb(6),m.ac(m.kc(6,15,t.action))(m.kc(7,17,t.resource)),m.Xb(5),m.yb(3),m.pc("ngClass",m.uc(23,z,t.mode!==t.roleFormMode.editing)),m.yb(5),m.pc("ngIf",t.roleForm.showError("name",e,"required")),m.yb(1),m.pc("ngIf",t.roleForm.showError("name",e,"notUnique")),m.yb(11),m.pc("data",t.scopes_permissions)("columns",t.columns)("toolHeader",!1)("autoReload",!1)("autoSave",!1)("footer",!1)("limit",0),m.yb(2),m.pc("form",t.roleForm)("submitText",m.kc(30,19,t.action)+" "+m.kc(31,21,t.resource))}}function H(e,t){if(1&e){const e=m.Tb();m.Sb(0,"div",30),m.Sb(1,"input",31),m.gc("change",(function(n){m.Dc(e);const i=t.row,r=t.column;return m.ic().onClickCellCheckbox(i.scope,r.prop,n)})),m.Rb(),m.Sb(2,"label",32),m.Oc(3),m.Rb(),m.Rb()}if(2&e){const e=t.row,n=t.value,i=m.ic();m.yb(1),m.rc("id","scope_",e.scope,""),m.pc("checked",i.isRowChecked(e.scope)),m.yb(1),m.rc("for","scope_",e.scope,""),m.yb(1),m.Pc(n)}}function W(e,t){if(1&e){const e=m.Tb();m.Sb(0,"div",30),m.Sb(1,"input",33),m.gc("change",(function(n){m.Dc(e);const i=t.row,r=t.column;return m.ic().onClickCellCheckbox(i.scope,r.prop,n)})),m.Rb(),m.Nb(2,"label",34),m.Rb()}if(2&e){const e=t.column,n=t.row,i=t.value;m.yb(1),m.pc("checked",i)("id",n.scope+"-"+e.prop),m.yb(1),m.pc("for",n.scope+"-"+e.prop)}}function V(e,t){if(1&e){const e=m.Tb();m.Sb(0,"div",30),m.Sb(1,"input",31),m.gc("change",(function(n){m.Dc(e);const i=t.column;return m.ic().onClickHeaderCheckbox(i.prop,n)})),m.Rb(),m.Sb(2,"label",35),m.Oc(3),m.Rb(),m.Rb()}if(2&e){const e=t.column,n=m.ic();m.yb(1),m.rc("id","header_",e.prop,""),m.pc("checked",n.isHeaderChecked(e.prop)),m.yb(1),m.rc("for","header_",e.prop,""),m.yb(1),m.Pc(e.name)}}let B=(()=>{class e extends v.a{constructor(e,t,n,i,r,s){super(),this.route=e,this.router=t,this.roleService=n,this.scopeService=i,this.notificationService=r,this.actionLabels=s,this.scopes=[],this.scopes_permissions=[],this.roleFormMode=k,this.resource="role",this.createForm(),this.listenToChanges()}createForm(){this.roleForm=new w.a({name:new r.h("",{validators:[r.A.required],asyncValidators:[S.a.unique(this.roleService.exists,this.roleService)]}),description:new r.h(""),scopes_permissions:new r.h({})})}ngOnInit(){this.columns=[{prop:"scope",name:"All",flexGrow:2,cellTemplate:this.cellScopeCheckboxTpl,headerTemplate:this.headerPermissionCheckboxTpl},{prop:"read",name:"Read",flexGrow:1,cellClass:"text-center",cellTemplate:this.cellPermissionCheckboxTpl,headerTemplate:this.headerPermissionCheckboxTpl},{prop:"create",name:"Create",flexGrow:1,cellClass:"text-center",cellTemplate:this.cellPermissionCheckboxTpl,headerTemplate:this.headerPermissionCheckboxTpl},{prop:"update",name:"Update",flexGrow:1,cellClass:"text-center",cellTemplate:this.cellPermissionCheckboxTpl,headerTemplate:this.headerPermissionCheckboxTpl},{prop:"delete",name:"Delete",flexGrow:1,cellClass:"text-center",cellTemplate:this.cellPermissionCheckboxTpl,headerTemplate:this.headerPermissionCheckboxTpl}],this.router.url.startsWith("/user-management/roles/edit")?(this.mode=this.roleFormMode.editing,this.action=this.actionLabels.EDIT):this.action=this.actionLabels.CREATE,this.mode===this.roleFormMode.editing?this.initEdit():this.initCreate()}initCreate(){this.scopeService.list().subscribe(e=>{this.scopes=e,this.roleForm.get("scopes_permissions").setValue({}),this.loadingReady()})}initEdit(){this.roleForm.get("name").disable(),this.route.params.subscribe(e=>{const t=[];t.push(this.scopeService.list()),t.push(this.roleService.get(e.name)),Object(h.a)(t).subscribe(e=>{this.scopes=e[0],["name","description","scopes_permissions"].forEach(t=>this.roleForm.get(t).setValue(e[1][t])),this.loadingReady()})})}listenToChanges(){this.roleForm.get("scopes_permissions").valueChanges.subscribe(e=>{const t=[];d.a.each(this.scopes,n=>{const i={read:!1,create:!1,update:!1,delete:!1};i.scope=n,n in e&&d.a.each(e[n],e=>{i[e]=!0}),t.push(i)}),this.scopes_permissions=t})}isRowChecked(e){const t=d.a.find(this.scopes_permissions,t=>t.scope===e);return!d.a.isUndefined(t)&&t.read&&t.create&&t.update&&t.delete}isHeaderChecked(e){let t=[e];return"scope"===e&&(t=["read","create","update","delete"]),t.every(e=>this.scopes_permissions.every(t=>t[e]))}onClickCellCheckbox(e,t,n=null){const i=d.a.cloneDeep(this.roleForm.getValue("scopes_permissions"));let r=[t];"scope"===t&&(r=["read","create","update","delete"]),e in i||(i[e]=[]),n&&n.target.checked||!d.a.isEqual(r.sort(),d.a.intersection(i[e],r).sort())?i[e]=d.a.union(i[e],r):(i[e]=d.a.difference(i[e],r),d.a.isEmpty(i[e])&&d.a.unset(i,e)),this.roleForm.get("scopes_permissions").setValue(i)}onClickHeaderCheckbox(e,t){const n=d.a.cloneDeep(this.roleForm.getValue("scopes_permissions"));let i=[e];"scope"===e&&(i=["read","create","update","delete"]),d.a.each(i,e=>{d.a.each(this.scopes,i=>{t.target.checked?n[i]=d.a.union(n[i],[e]):(n[i]=d.a.difference(n[i],[e]),d.a.isEmpty(n[i])&&d.a.unset(n,i))})}),this.roleForm.get("scopes_permissions").setValue(n)}getRequest(){const e=new x;return["name","description","scopes_permissions"].forEach(t=>e[t]=this.roleForm.get(t).value),e}createAction(){const e=this.getRequest();this.roleService.create(e).subscribe(()=>{this.notificationService.show(y.a.success,"Created role '" + e.name + "'"),this.router.navigate(["/user-management/roles"])},()=>{this.roleForm.setErrors({cdSubmitButton:!0})})}editAction(){const e=this.getRequest();this.roleService.update(e).subscribe(()=>{this.notificationService.show(y.a.success,"Updated role '" + e.name + "'"),this.router.navigate(["/user-management/roles"])},()=>{this.roleForm.setErrors({cdSubmitButton:!0})})}submit(){this.mode===this.roleFormMode.editing?this.editAction():this.createAction()}}return e.\u0275fac=function(t){return new(t||e)(m.Mb(s.a),m.Mb(s.e),m.Mb(g),m.Mb(_),m.Mb(M.a),m.Mb(c.b))},e.\u0275cmp=m.Gb({type:e,selectors:[["cd-role-form"]],viewQuery:function(e,t){var n;1&e&&(m.Jc(P,!0),m.Jc(N,!0),m.Jc(j,!0)),2&e&&(m.zc(n=m.hc())&&(t.headerPermissionCheckboxTpl=n.first),m.zc(n=m.hc())&&(t.cellScopeCheckboxTpl=n.first),m.zc(n=m.hc())&&(t.cellPermissionCheckboxTpl=n.first))},features:[m.vb],decls:7,vars:1,consts:function(){return[["class","cd-col-form",4,"cdFormLoading"],["cellScopeCheckboxTpl",""],["cellPermissionCheckboxTpl",""],["headerPermissionCheckboxTpl",""],[1,"cd-col-form"],["name","roleForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"card"],[1,"card-header"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"card-body"],[1,"form-group","row"],["for","name",1,"cd-col-form-label",3,"ngClass"],"Name",[1,"cd-col-form-input"],["type","text","id","name","name","name","formControlName","name","autofocus","",1,"form-control",6,"placeholder"],["placeholder","Name..."],["class","invalid-feedback",4,"ngIf"],["for","description",1,"cd-col-form-label"],"Description",["type","text","id","description","name","description","formControlName","description",1,"form-control",6,"placeholder"],["placeholder","Description..."],[1,"cd-col-form-label"],"Permissions",["columnMode","flex",3,"data","columns","toolHeader","autoReload","autoSave","footer","limit"],[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required.","The chosen name is already in use.",[1,"custom-control","custom-checkbox"],["type","checkbox",1,"custom-control-input",3,"id","checked","change"],[1,"datatable-permissions-scope-cell-label","custom-control-label",3,"for"],["type","checkbox",1,"custom-control-input",3,"checked","id","change"],[1,"custom-control-label",3,"for"],[1,"datatable-permissions-header-cell-label","custom-control-label",3,"for"]]},template:function(e,t){1&e&&(m.Mc(0,$,32,25,"div",0),m.Mc(1,H,4,4,"ng-template",null,1,m.Nc),m.Mc(3,W,3,3,"ng-template",null,2,m.Nc),m.Mc(5,V,4,4,"ng-template",null,3,m.Nc)),2&e&&m.pc("cdFormLoading",t.loading)},directives:[D.a,r.C,r.r,r.k,T.a,C.a,i.p,O.a,r.d,L.a,r.q,r.i,R.a,i.r,E.a,A.a],pipes:[i.A,I.a],styles:[".datatable-permissions-header-cell-label[_ngcontent-%COMP%], .datatable-permissions-scope-cell-label[_ngcontent-%COMP%]{font-weight:700}"]}),e})();var U=n("+fVR"),G=n("0+/T"),q=n("Rf2I"),J=n("x38r"),Q=n("oxzT"),K=n("vCyI"),Z=n("nSDx"),X=n("aexS"),ee=n("JK/P"),te=n("EgGo");let ne=(()=>{class e{constructor(e){this.router=e}}return e.\u0275fac=function(t){return new(t||e)(m.Mb(s.e))},e.\u0275cmp=m.Gb({type:e,selectors:[["cd-user-tabs"]],decls:8,vars:1,consts:function(){return[["ngbNav","",1,"nav-tabs",3,"activeId","navChange"],["nav","ngbNav"],["ngbNavItem","/user-management/users"],["ngbNavLink",""],"Users",["ngbNavItem","/user-management/roles"],"Roles"]},template:function(e,t){1&e&&(m.Sb(0,"ul",0,1),m.gc("navChange",(function(e){return t.router.navigate([e.nextId])})),m.Sb(2,"li",2),m.Sb(3,"a",3),m.Wb(4,4),m.Rb(),m.Rb(),m.Sb(5,"li",5),m.Sb(6,"a",3),m.Wb(7,6),m.Rb(),m.Rb(),m.Rb()),2&e&&m.pc("activeId",t.router.url)},directives:[o.p,o.r,o.s],styles:[""]}),e})();var ie=n("S7zO");function re(e,t){if(1&e&&(m.Qb(0),m.Nb(1,"cd-table",1),m.Pb()),2&e){const e=m.ic();m.yb(1),m.pc("data",e.scopes_permissions)("columns",e.columns)("toolHeader",!1)("autoReload",!1)("autoSave",!1)("footer",!1)("limit",0)}}let se=(()=>{class e{constructor(){this.scopes_permissions=[]}ngOnInit(){this.columns=[{prop:"scope",name:"Scope",flexGrow:2},{prop:"read",name:"Read",flexGrow:1,cellClass:"text-center",cellTransformation:J.a.checkIcon},{prop:"create",name:"Create",flexGrow:1,cellClass:"text-center",cellTransformation:J.a.checkIcon},{prop:"update",name:"Update",flexGrow:1,cellClass:"text-center",cellTransformation:J.a.checkIcon},{prop:"delete",name:"Delete",flexGrow:1,cellClass:"text-center",cellTransformation:J.a.checkIcon}]}ngOnChanges(){if(this.selection){this.selectedItem=this.selection;const e=[];d.a.each(this.scopes,t=>{const n={read:!1,create:!1,update:!1,delete:!1};n.scope=t,t in this.selectedItem.scopes_permissions&&d.a.each(this.selectedItem.scopes_permissions[t],e=>{n[e]=!0}),e.push(n)}),this.scopes_permissions=e}}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=m.Gb({type:e,selectors:[["cd-role-details"]],inputs:{selection:"selection",scopes:"scopes"},features:[m.wb],decls:1,vars:1,consts:[[4,"ngIf"],["columnMode","flex",3,"data","columns","toolHeader","autoReload","autoSave","footer","limit"]],template:function(e,t){1&e&&m.Mc(0,re,2,7,"ng-container",0),2&e&&m.pc("ngIf",t.selection)},directives:[i.r,E.a],styles:[".fa[_ngcontent-%COMP%]{font-size:large}.fa.fa-square-o[_ngcontent-%COMP%]{color:#ced4da}"]}),e})(),oe=(()=>{class e extends U.a{constructor(e,t,n,i,r,s,o,a){super(),this.roleService=e,this.scopeService=t,this.emptyPipe=n,this.authStorageService=i,this.modalService=r,this.notificationService=s,this.urlBuilder=o,this.actionLabels=a,this.selection=new K.a,this.permission=this.authStorageService.getPermissions().user,this.tableActions=[{permission:"create",icon:Q.a.add,routerLink:()=>this.urlBuilder.getCreate(),name:this.actionLabels.CREATE},{permission:"create",icon:Q.a.clone,name:this.actionLabels.CLONE,disable:()=>!this.selection.hasSingleSelection,click:()=>this.cloneRole()},{permission:"update",icon:Q.a.edit,disable:()=>!this.selection.hasSingleSelection||this.selection.first().system,routerLink:()=>this.selection.first()&&this.urlBuilder.getEdit(this.selection.first().name),name:this.actionLabels.EDIT},{permission:"delete",icon:Q.a.destroy,disable:()=>!this.selection.hasSingleSelection||this.selection.first().system,click:()=>this.deleteRoleModal(),name:this.actionLabels.DELETE}]}ngOnInit(){this.columns=[{name:"Name",prop:"name",flexGrow:3},{name:"Description",prop:"description",flexGrow:5,pipe:this.emptyPipe},{name:"System Role",prop:"system",cellClass:"text-center",flexGrow:1,cellTransformation:J.a.checkIcon}]}getRoles(){Object(h.a)([this.roleService.list(),this.scopeService.list()]).subscribe(e=>{this.roles=e[0],this.scopes=e[1]})}updateSelection(e){this.selection=e}deleteRole(e){this.roleService.delete(e).subscribe(()=>{this.getRoles(),this.modalRef.close(),this.notificationService.show(y.a.success,"Deleted role '" + e + "'")},()=>{this.modalRef.componentInstance.stopLoadingSpinner()})}deleteRoleModal(){const e=this.selection.first().name;this.modalRef=this.modalService.show(G.a,{itemDescription:"Role",itemNames:[e],submitAction:()=>this.deleteRole(e)})}cloneRole(){const e=this.selection.first().name;this.modalRef=this.modalService.show(q.a,{fields:[{type:"text",name:"newName",value:e+"_clone",label:"New name",required:!0}],titleText:"Clone Role",submitButtonText:"Clone Role",onSubmit:t=>{this.roleService.clone(e,t.newName).subscribe(()=>{this.getRoles(),this.notificationService.show(y.a.success,"Cloned role '" + t.newName + "' from '" + e + "'")})}})}}return e.\u0275fac=function(t){return new(t||e)(m.Mb(g),m.Mb(_),m.Mb(Z.a),m.Mb(X.a),m.Mb(ee.a),m.Mb(M.a),m.Mb(te.a),m.Mb(c.b))},e.\u0275cmp=m.Gb({type:e,selectors:[["cd-role-list"]],features:[m.xb([{provide:te.a,useValue:new te.a("user-management/roles")}]),m.vb],decls:4,vars:8,consts:[["columnMode","flex","identifier","name","selectionType","single",3,"data","columns","hasDetails","setExpandedRow","fetchData","updateSelection"],[1,"table-actions",3,"permission","selection","tableActions"],["cdTableDetail","",3,"selection","scopes"]],template:function(e,t){1&e&&(m.Nb(0,"cd-user-tabs"),m.Sb(1,"cd-table",0),m.gc("setExpandedRow",(function(e){return t.setExpandedRow(e)}))("fetchData",(function(){return t.getRoles()}))("updateSelection",(function(e){return t.updateSelection(e)})),m.Nb(2,"cd-table-actions",1),m.Nb(3,"cd-role-details",2),m.Rb()),2&e&&(m.yb(1),m.pc("data",t.roles)("columns",t.columns)("hasDetails",!0),m.yb(1),m.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions),m.yb(1),m.pc("selection",t.expandedRow)("scopes",t.scopes))},directives:[ne,E.a,ie.a,se],styles:[""]}),e})();var ae=n("wd/R"),ce=n.n(ae),le=n("DSvg"),ue=n("20UP"),de=n("Mxhz"),he=n("OLbh"),fe=n("DNAf"),pe=n("2EZI"),me=n("oMSZ"),be=n("1nQr"),ge=function(e){return e.editing="editing",e}({});class _e{}var ye=n("D4zM"),ve=n("p4Cf"),we=n("ppaS"),Se=n("MAOJ");const Me=["removeSelfUserReadUpdatePermissionTpl"];function ke(e,t){1&e&&(m.Sb(0,"span",28),m.Wb(1,29),m.Rb())}function xe(e,t){1&e&&(m.Sb(0,"span",28),m.Wb(1,30),m.Rb())}function De(e,t){if(1&e&&m.Nb(0,"cd-helper",40),2&e){const e=m.ic(3);m.qc("html",e.passwordPolicyHelpText)}}function Te(e,t){1&e&&(m.Sb(0,"span",28),m.Wb(1,41),m.Rb())}function Ce(e,t){if(1&e&&(m.Sb(0,"span",28),m.Oc(1),m.Rb()),2&e){const e=m.ic(3);m.yb(1),m.Qc(" ",e.passwordValuation," ")}}function Oe(e,t){if(1&e&&(m.Sb(0,"div",10),m.Sb(1,"label",31),m.Qb(2),m.Wb(3,32),m.Pb(),m.Mc(4,De,1,1,"cd-helper",33),m.Rb(),m.Sb(5,"div",13),m.Sb(6,"div",34),m.Nb(7,"input",35),m.Sb(8,"span",36),m.Nb(9,"button",37),m.Rb(),m.Rb(),m.Sb(10,"div",38),m.Nb(11,"div",39),m.Rb(),m.Mc(12,Te,2,0,"span",15),m.Mc(13,Ce,2,1,"span",15),m.Rb(),m.Rb()),2&e){m.ic();const e=m.Ac(2),t=m.ic();m.yb(4),m.pc("ngIf",t.passwordPolicyHelpText.length>0),m.yb(7),m.Ab(t.passwordStrengthLevelClass),m.qc("title",t.passwordValuation),m.yb(1),m.pc("ngIf",t.userForm.showError("password",e,"required")),m.yb(1),m.pc("ngIf",t.userForm.showError("password",e,"passwordPolicy"))}}function Le(e,t){1&e&&(m.Sb(0,"span",28),m.Wb(1,46),m.Rb())}function Re(e,t){1&e&&(m.Sb(0,"span",28),m.Wb(1,47),m.Rb())}function Ee(e,t){if(1&e&&(m.Sb(0,"div",10),m.Sb(1,"label",42),m.Wb(2,43),m.Rb(),m.Sb(3,"div",13),m.Sb(4,"div",34),m.Nb(5,"input",44),m.Sb(6,"span",36),m.Nb(7,"button",45),m.Rb(),m.Mc(8,Le,2,0,"span",15),m.Rb(),m.Mc(9,Re,2,0,"span",15),m.Rb(),m.Rb()),2&e){m.ic();const e=m.Ac(2),t=m.ic();m.yb(8),m.pc("ngIf",t.userForm.showError("confirmpassword",e,"match")),m.yb(1),m.pc("ngIf",t.userForm.showError("confirmpassword",e,"required"))}}function Ae(e,t){1&e&&(m.Sb(0,"cd-helper",55),m.Sb(1,"p"),m.Oc(2," The Dashboard setting defining the expiration interval of passwords is currently set to "),m.Sb(3,"strong"),m.Oc(4,"0"),m.Rb(),m.Oc(5,". This means if a date is set, the user password will only expire once. "),m.Rb(),m.Sb(6,"p"),m.Oc(7," Consider configuring the Dashboard setting "),m.Sb(8,"a",56),m.Oc(9,"USER_PWD_EXPIRATION_SPAN"),m.Rb(),m.Oc(10," in order to let passwords expire periodically. "),m.Rb(),m.Rb())}function Ie(e,t){1&e&&(m.Sb(0,"span",28),m.Wb(1,57),m.Rb())}const Pe=function(e){return{required:e}};function Ne(e,t){if(1&e){const e=m.Tb();m.Sb(0,"div",10),m.Sb(1,"label",48),m.Qb(2),m.Wb(3,49),m.Pb(),m.Mc(4,Ae,11,0,"cd-helper",50),m.Rb(),m.Sb(5,"div",13),m.Sb(6,"div",34),m.Sb(7,"input",51,52),m.Yb(9,53),m.gc("click",(function(){return m.Dc(e),m.Ac(8).open()}))("keypress",(function(){return m.Dc(e),m.Ac(8).close()})),m.Rb(),m.Sb(10,"span",36),m.Sb(11,"button",54),m.gc("click",(function(){return m.Dc(e),m.ic(2).clearExpirationDate()})),m.Nb(12,"i"),m.Rb(),m.Rb(),m.Mc(13,Ie,2,0,"span",15),m.Rb(),m.Rb(),m.Rb()}if(2&e){m.ic();const e=m.Ac(2),t=m.ic(),n=m.Ac(4);m.yb(1),m.pc("ngClass",m.uc(7,Pe,t.pwdExpirationSettings.pwdExpirationSpan>0)),m.yb(3),m.pc("ngIf",0==t.pwdExpirationSettings.pwdExpirationSpan),m.yb(3),m.pc("ngbPopover",n),m.yb(5),m.Bb("icon-prepend ",t.icons.destroy,""),m.yb(1),m.pc("ngIf",t.userForm.showError("pwdExpirationDate",e,"required"))}}function je(e,t){1&e&&(m.Sb(0,"span",28),m.Wb(1,58),m.Rb())}function Fe(e,t){if(1&e&&(m.Sb(0,"span",59),m.Nb(1,"cd-select-badges",60),m.Rb()),2&e){const e=m.ic(2);m.yb(1),m.pc("data",e.userForm.controls.roles.value)("options",e.allRoles)("messages",e.messages)}}function Ye(e,t){1&e&&(m.Sb(0,"div",10),m.Sb(1,"div",61),m.Sb(2,"div",62),m.Nb(3,"input",63),m.Sb(4,"label",64),m.Wb(5,65),m.Rb(),m.Rb(),m.Rb(),m.Rb())}function ze(e,t){1&e&&(m.Sb(0,"div",10),m.Sb(1,"div",61),m.Sb(2,"div",62),m.Nb(3,"input",66),m.Sb(4,"label",67),m.Wb(5,68),m.Rb(),m.Rb(),m.Rb(),m.Rb())}function $e(e,t){if(1&e){const e=m.Tb();m.Sb(0,"div",3),m.Sb(1,"form",4,5),m.Sb(3,"div",6),m.Sb(4,"div",7),m.Wb(5,8),m.jc(6,"titlecase"),m.jc(7,"upperFirst"),m.Rb(),m.Sb(8,"div",9),m.Sb(9,"div",10),m.Sb(10,"label",11),m.Wb(11,12),m.Rb(),m.Sb(12,"div",13),m.Nb(13,"input",14),m.Mc(14,ke,2,0,"span",15),m.Mc(15,xe,2,0,"span",15),m.Rb(),m.Rb(),m.Mc(16,Oe,14,7,"div",16),m.Mc(17,Ee,10,2,"div",16),m.Mc(18,Ne,14,9,"div",16),m.Sb(19,"div",10),m.Sb(20,"label",17),m.Wb(21,18),m.Rb(),m.Sb(22,"div",13),m.Nb(23,"input",19),m.Rb(),m.Rb(),m.Sb(24,"div",10),m.Sb(25,"label",20),m.Wb(26,21),m.Rb(),m.Sb(27,"div",13),m.Nb(28,"input",22),m.Mc(29,je,2,0,"span",15),m.Rb(),m.Rb(),m.Sb(30,"div",10),m.Sb(31,"label",23),m.Wb(32,24),m.Rb(),m.Sb(33,"div",13),m.Mc(34,Fe,2,3,"span",25),m.Rb(),m.Rb(),m.Mc(35,Ye,6,0,"div",16),m.Mc(36,ze,6,0,"div",16),m.Rb(),m.Sb(37,"div",26),m.Sb(38,"cd-form-button-panel",27),m.gc("submitActionEvent",(function(){return m.Dc(e),m.ic().submit()})),m.jc(39,"titlecase"),m.jc(40,"upperFirst"),m.Rb(),m.Rb(),m.Rb(),m.Rb(),m.Rb()}if(2&e){const e=m.Ac(2),t=m.ic();m.yb(1),m.pc("formGroup",t.userForm),m.yb(6),m.ac(m.kc(6,15,t.action))(m.kc(7,17,t.resource)),m.Xb(5),m.yb(3),m.pc("ngClass",m.uc(23,Pe,t.mode!==t.userFormMode.editing)),m.yb(4),m.pc("ngIf",t.userForm.showError("username",e,"required")),m.yb(1),m.pc("ngIf",t.userForm.showError("username",e,"notUnique")),m.yb(1),m.pc("ngIf",!t.authStorageService.isSSO()),m.yb(1),m.pc("ngIf",!t.authStorageService.isSSO()),m.yb(1),m.pc("ngIf",!t.authStorageService.isSSO()),m.yb(11),m.pc("ngIf",t.userForm.showError("email",e,"email")),m.yb(5),m.pc("ngIf",t.allRoles),m.yb(1),m.pc("ngIf",!t.isCurrentUser()),m.yb(1),m.pc("ngIf",!t.isCurrentUser()&&!t.authStorageService.isSSO()),m.yb(2),m.pc("form",t.userForm)("submitText",m.kc(39,19,t.action)+" "+m.kc(40,21,t.resource))}}function He(e,t){1&e&&(m.Sb(0,"p"),m.Sb(1,"strong"),m.Wb(2,69),m.Rb(),m.Rb(),m.Nb(3,"br"),m.Sb(4,"p"),m.Wb(5,70),m.Rb(),m.Qb(6),m.Wb(7,71),m.Pb())}function We(e,t){if(1&e&&m.Nb(0,"cd-date-time-picker",72),2&e){const e=m.ic();m.pc("control",e.userForm.get("pwdExpirationDate"))("hasTime",!1)}}let Ve=(()=>{class e extends v.a{constructor(e,t,n,i,r,s,o,a,c,l,u,d){super(),this.authService=e,this.authStorageService=t,this.route=n,this.router=i,this.modalService=r,this.roleService=s,this.userService=o,this.notificationService=a,this.actionLabels=c,this.passwordPolicyService=l,this.formBuilder=u,this.settingsService=d,this.userFormMode=ge,this.messages=new fe.a({empty:"There are no roles."}),this.passwordPolicyHelpText="",this.icons=Q.a,this.pwdExpirationFormat="YYYY-MM-DD",this.resource="user",this.createForm(),this.messages=new fe.a({empty:"There are no roles."})}createForm(){this.passwordPolicyService.getHelpText().subscribe(e=>{this.passwordPolicyHelpText=e}),this.userForm=this.formBuilder.group({username:["",[r.A.required],[S.a.unique(this.userService.validateUserName,this.userService)]],name:[""],password:["",[],[S.a.passwordPolicy(this.userService,()=>this.userForm.getValue("username"),(e,t,n)=>{this.passwordStrengthLevelClass=this.passwordPolicyService.mapCreditsToCssClass(t),this.passwordValuation=d.a.defaultTo(n,"")})]],confirmpassword:[""],pwdExpirationDate:[void 0],email:["",[S.a.email]],roles:[[]],enabled:[!0,[r.A.required]],pwdUpdateRequired:[!0]},{validators:[S.a.match("password","confirmpassword")]})}ngOnInit(){this.router.url.startsWith("/user-management/users/edit")?(this.mode=this.userFormMode.editing,this.action=this.actionLabels.EDIT):this.action=this.actionLabels.CREATE;const e=[this.roleService.list(),this.settingsService.getStandardSettings()];Object(h.a)(e).subscribe(e=>{if(this.allRoles=d.a.map(e[0],e=>(e.enabled=!0,e)),this.pwdExpirationSettings=new me.a(e[1]),this.mode===this.userFormMode.editing)this.initEdit();else{if(this.pwdExpirationSettings.pwdExpirationSpan>0){const e=this.userForm.get("pwdExpirationDate"),t=ce()();t.add(this.pwdExpirationSettings.pwdExpirationSpan,"day"),e.setValue(t.format(this.pwdExpirationFormat)),e.setValidators([r.A.required])}this.loadingReady()}})}initEdit(){this.disableForEdit(),this.route.params.subscribe(e=>{this.userService.get(e.username).subscribe(e=>{this.response=d.a.cloneDeep(e),this.setResponse(e),this.loadingReady()})})}disableForEdit(){this.userForm.get("username").disable()}setResponse(e){["username","name","email","roles","enabled","pwdUpdateRequired"].forEach(t=>this.userForm.get(t).setValue(e[t]));const t=e.pwdExpirationDate;t&&this.userForm.get("pwdExpirationDate").setValue(ce()(1e3*t).format(this.pwdExpirationFormat))}getRequest(){const e=new _e;["username","password","name","email","roles","enabled","pwdUpdateRequired"].forEach(t=>e[t]=this.userForm.get(t).value);const t=this.userForm.get("pwdExpirationDate").value;if(t){const n=ce()(t,this.pwdExpirationFormat);this.mode===this.userFormMode.editing&&this.response.pwdExpirationDate===n.unix()||n.set({hour:23,minute:59,second:59}),e.pwdExpirationDate=n.unix()}return e}createAction(){const e=this.getRequest();this.userService.create(e).subscribe(()=>{this.notificationService.show(y.a.success,"Created user '" + e.username + "'"),this.router.navigate(["/user-management/users"])},()=>{this.userForm.setErrors({cdSubmitButton:!0})})}editAction(){if(this.isUserRemovingNeededRolePermissions()){const e={titleText:"Update user",buttonText:"Continue",bodyTpl:this.removeSelfUserReadUpdatePermissionTpl,onSubmit:()=>{this.modalRef.close(),this.doEditAction()},onCancel:()=>{this.userForm.setErrors({cdSubmitButton:!0}),this.userForm.get("roles").reset(this.userForm.get("roles").value)}};this.modalRef=this.modalService.show(he.a,e)}else this.doEditAction()}isCurrentUser(){return this.authStorageService.getUsername()===this.userForm.getValue("username")}isUserChangingRoles(){return this.isCurrentUser()&&this.response&&!d.a.isEqual(this.response.roles,this.userForm.getValue("roles"))}isUserRemovingNeededRolePermissions(){return this.isCurrentUser()&&!this.hasUserReadUpdatePermissions(this.userForm.getValue("roles"))}hasUserReadUpdatePermissions(e=[]){for(const t of this.allRoles)if(-1!==e.indexOf(t.name)&&t.scopes_permissions.user){const e=t.scopes_permissions.user;return["read","update"].every(t=>-1!==e.indexOf(t))}return!1}doEditAction(){const e=this.getRequest();this.userService.update(e).subscribe(()=>{this.isUserChangingRoles()?this.authService.logout(()=>{this.notificationService.show(y.a.info,"You were automatically logged out because your roles have been changed.")}):(this.notificationService.show(y.a.success,"Updated user '" + e.username + "'"),this.router.navigate(["/user-management/users"]))},()=>{this.userForm.setErrors({cdSubmitButton:!0})})}clearExpirationDate(){this.userForm.get("pwdExpirationDate").setValue(void 0)}submit(){this.mode===this.userFormMode.editing?this.editAction():this.createAction()}}return e.\u0275fac=function(t){return new(t||e)(m.Mb(le.a),m.Mb(X.a),m.Mb(s.a),m.Mb(s.e),m.Mb(ee.a),m.Mb(g),m.Mb(de.a),m.Mb(M.a),m.Mb(c.b),m.Mb(be.a),m.Mb(pe.a),m.Mb(ue.a))},e.\u0275cmp=m.Gb({type:e,selectors:[["cd-user-form"]],viewQuery:function(e,t){var n;1&e&&m.Jc(Me,!0),2&e&&m.zc(n=m.hc())&&(t.removeSelfUserReadUpdatePermissionTpl=n.first)},features:[m.vb],decls:5,vars:1,consts:function(){return[["class","cd-col-form",4,"cdFormLoading"],["removeSelfUserReadUpdatePermissionTpl",""],["popContent",""],[1,"cd-col-form"],["name","userForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"card"],[1,"card-header"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"card-body"],[1,"form-group","row"],["for","username",1,"cd-col-form-label",3,"ngClass"],"Username",[1,"cd-col-form-input"],["type","text","placeholder","Username...","id","username","name","username","formControlName","username","autocomplete","off","autofocus","",1,"form-control"],["class","invalid-feedback",4,"ngIf"],["class","form-group row",4,"ngIf"],["for","name",1,"cd-col-form-label"],"Full name",["type","text","placeholder","Full name...","id","name","name","name","formControlName","name",1,"form-control"],["for","email",1,"cd-col-form-label"],"Email",["type","email","placeholder","Email...","id","email","name","email","formControlName","email",1,"form-control"],[1,"cd-col-form-label"],"Roles",["class","no-border full-height",4,"ngIf"],[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required.","The username already exists.",["for","password",1,"cd-col-form-label"],"Password",["class","text-pre-wrap",3,"html",4,"ngIf"],[1,"input-group"],["type","password","placeholder","Password...","id","password","name","password","autocomplete","new-password","formControlName","password",1,"form-control"],[1,"input-group-append"],["type","button","cdPasswordButton","password",1,"btn","btn-light"],[1,"password-strength-level"],["data-toggle","tooltip",3,"title"],[1,"text-pre-wrap",3,"html"],"This field is required.",["for","confirmpassword",1,"cd-col-form-label"],"Confirm password",["type","password","placeholder","Confirm password...","id","confirmpassword","name","confirmpassword","autocomplete","new-password","formControlName","confirmpassword",1,"form-control"],["type","button","cdPasswordButton","confirmpassword",1,"btn","btn-light"],"Password confirmation doesn't match the password.","This field is required.",["for","pwdExpirationDate",1,"cd-col-form-label",3,"ngClass"],"Password expiration date",["class","text-pre-wrap",4,"ngIf"],["id","pwdExpirationDate","name","pwdExpirationDate","formControlName","pwdExpirationDate","triggers","manual",1,"form-control",3,"ngbPopover","click","keypress",6,"placeholder"],["p","ngbPopover"],["placeholder","Password expiration date..."],["type","button",1,"btn","btn-light",3,"click"],[1,"text-pre-wrap"],["routerLink","/mgr-modules/edit/dashboard",1,"alert-link"],"This field is required.","Invalid email.",[1,"no-border","full-height"],[3,"data","options","messages"],[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["type","checkbox","id","enabled","name","enabled","formControlName","enabled",1,"custom-control-input"],["for","enabled",1,"custom-control-label"],"Enabled",["type","checkbox","id","pwdUpdateRequired","name","pwdUpdateRequired","formControlName","pwdUpdateRequired",1,"custom-control-input"],["for","pwdUpdateRequired",1,"custom-control-label"],"User must change password at next logon","You are about to remove \"user read / update\" permissions from your own user.","If you continue, you will no longer be able to add or remove roles from any user.","Are you sure you want to continue?",[3,"control","hasTime"]]},template:function(e,t){1&e&&(m.Mc(0,$e,41,25,"div",0),m.Mc(1,He,8,0,"ng-template",null,1,m.Nc),m.Mc(3,We,1,2,"ng-template",null,2,m.Nc)),2&e&&m.pc("cdFormLoading",t.loading)},directives:[D.a,r.C,r.r,r.k,T.a,C.a,i.p,O.a,r.d,L.a,r.q,r.i,R.a,i.r,A.a,ye.a,ve.a,o.w,s.h,we.a,r.b,Se.a],pipes:[i.A,I.a],styles:[""]}),e})();var Be=n("a0VL");const Ue=["userRolesTpl"];function Ge(e,t){if(1&e&&(m.Sb(0,"span"),m.Oc(1),m.Rb()),2&e){const e=t.$implicit,n=t.last;m.yb(1),m.Rc(" ",e,"",n?"":", "," ")}}function qe(e,t){1&e&&m.Mc(0,Ge,2,2,"span",3),2&e&&m.pc("ngForOf",t.value)}let Je=(()=>{class e{constructor(e,t,n,i,r,s,o,a){this.userService=e,this.emptyPipe=t,this.modalService=n,this.notificationService=i,this.authStorageService=r,this.urlBuilder=s,this.cdDatePipe=o,this.actionLabels=a,this.selection=new K.a,this.permission=this.authStorageService.getPermissions().user,this.tableActions=[{permission:"create",icon:Q.a.add,routerLink:()=>this.urlBuilder.getCreate(),name:this.actionLabels.CREATE},{permission:"update",icon:Q.a.edit,routerLink:()=>this.selection.first()&&this.urlBuilder.getEdit(this.selection.first().username),name:this.actionLabels.EDIT},{permission:"delete",icon:Q.a.destroy,click:()=>this.deleteUserModal(),name:this.actionLabels.DELETE}]}ngOnInit(){this.columns=[{name:"Username",prop:"username",flexGrow:1},{name:"Name",prop:"name",flexGrow:1,pipe:this.emptyPipe},{name:"Email",prop:"email",flexGrow:1,pipe:this.emptyPipe},{name:"Roles",prop:"roles",flexGrow:1,cellTemplate:this.userRolesTpl},{name:"Enabled",prop:"enabled",flexGrow:1,cellTransformation:J.a.checkIcon},{name:"Password expiration date",prop:"pwdExpirationDate",flexGrow:1,pipe:this.cdDatePipe}]}getUsers(){this.userService.list().subscribe(e=>{e.forEach(e=>{e.pwdExpirationDate&&e.pwdExpirationDate>0&&(e.pwdExpirationDate=1e3*e.pwdExpirationDate)}),this.users=e})}updateSelection(e){this.selection=e}deleteUser(e){this.userService.delete(e).subscribe(()=>{this.getUsers(),this.modalRef.close(),this.notificationService.show(y.a.success,"Deleted user '" + e + "'")},()=>{this.modalRef.componentInstance.stopLoadingSpinner()})}deleteUserModal(){const e=this.authStorageService.getUsername(),t=this.selection.first().username;e!==t?this.modalRef=this.modalService.show(G.a,{itemDescription:"User",itemNames:[t],submitAction:()=>this.deleteUser(t)}):this.notificationService.show(y.a.error,"Failed to delete user '" + t + "'","You are currently logged in as '" + t + "'.")}}return e.\u0275fac=function(t){return new(t||e)(m.Mb(de.a),m.Mb(Z.a),m.Mb(ee.a),m.Mb(M.a),m.Mb(X.a),m.Mb(te.a),m.Mb(Be.a),m.Mb(c.b))},e.\u0275cmp=m.Gb({type:e,selectors:[["cd-user-list"]],viewQuery:function(e,t){var n;1&e&&m.Jc(Ue,!0),2&e&&m.zc(n=m.hc())&&(t.userRolesTpl=n.first)},features:[m.xb([{provide:te.a,useValue:new te.a("user-management/users")}])],decls:5,vars:5,consts:[["columnMode","flex","identifier","username","selectionType","single",3,"data","columns","fetchData","updateSelection"],[1,"table-actions",3,"permission","selection","tableActions"],["userRolesTpl",""],[4,"ngFor","ngForOf"]],template:function(e,t){1&e&&(m.Nb(0,"cd-user-tabs"),m.Sb(1,"cd-table",0),m.gc("fetchData",(function(){return t.getUsers()}))("updateSelection",(function(e){return t.updateSelection(e)})),m.Nb(2,"cd-table-actions",1),m.Rb(),m.Mc(3,qe,1,1,"ng-template",null,2,m.Nc)),2&e&&(m.yb(1),m.pc("data",t.users)("columns",t.columns),m.yb(1),m.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions))},directives:[ne,E.a,ie.a,i.q],styles:[""]}),e})(),Qe=(()=>{class e{}return e.\u0275mod=m.Kb({type:e}),e.\u0275inj=m.Jb({factory:function(t){return new(t||e)},imports:[[i.c,r.m,r.x,l.a,o.t,o.y,a.a,s.i]]}),e})();const Ke=[{path:"",redirectTo:"users",pathMatch:"full"},{path:"users",data:{breadcrumbs:"Users"},children:[{path:"",component:Je},{path:c.e.CREATE,component:Ve,data:{breadcrumbs:c.a.CREATE}},{path:c.e.EDIT+"/:username",component:Ve,data:{breadcrumbs:c.a.EDIT}}]},{path:"roles",data:{breadcrumbs:"Roles"},children:[{path:"",component:oe},{path:c.e.CREATE,component:B,data:{breadcrumbs:c.a.CREATE}},{path:c.e.EDIT+"/:name",component:B,data:{breadcrumbs:c.a.EDIT}}]}];let Ze=(()=>{class e{}return e.\u0275mod=m.Kb({type:e}),e.\u0275inj=m.Jb({factory:function(t){return new(t||e)},imports:[[Qe,s.i.forChild(Ke)]]}),e})()},Lhse:function(e,t,n){"use strict";function i(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}n.d(t,"a",(function(){return r}));const r=i()},Loxo:function(e,t,n){!function(e){"use strict";e.defineLocale("uz",{months:"\u044f\u043d\u0432\u0430\u0440_\u0444\u0435\u0432\u0440\u0430\u043b_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0435\u043b_\u043c\u0430\u0439_\u0438\u044e\u043d_\u0438\u044e\u043b_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043d\u0442\u044f\u0431\u0440_\u043e\u043a\u0442\u044f\u0431\u0440_\u043d\u043e\u044f\u0431\u0440_\u0434\u0435\u043a\u0430\u0431\u0440".split("_"),monthsShort:"\u044f\u043d\u0432_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0439_\u0438\u044e\u043d_\u0438\u044e\u043b_\u0430\u0432\u0433_\u0441\u0435\u043d_\u043e\u043a\u0442_\u043d\u043e\u044f_\u0434\u0435\u043a".split("_"),weekdays:"\u042f\u043a\u0448\u0430\u043d\u0431\u0430_\u0414\u0443\u0448\u0430\u043d\u0431\u0430_\u0421\u0435\u0448\u0430\u043d\u0431\u0430_\u0427\u043e\u0440\u0448\u0430\u043d\u0431\u0430_\u041f\u0430\u0439\u0448\u0430\u043d\u0431\u0430_\u0416\u0443\u043c\u0430_\u0428\u0430\u043d\u0431\u0430".split("_"),weekdaysShort:"\u042f\u043a\u0448_\u0414\u0443\u0448_\u0421\u0435\u0448_\u0427\u043e\u0440_\u041f\u0430\u0439_\u0416\u0443\u043c_\u0428\u0430\u043d".split("_"),weekdaysMin:"\u042f\u043a_\u0414\u0443_\u0421\u0435_\u0427\u043e_\u041f\u0430_\u0416\u0443_\u0428\u0430".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[\u0411\u0443\u0433\u0443\u043d \u0441\u043e\u0430\u0442] LT [\u0434\u0430]",nextDay:"[\u042d\u0440\u0442\u0430\u0433\u0430] LT [\u0434\u0430]",nextWeek:"dddd [\u043a\u0443\u043d\u0438 \u0441\u043e\u0430\u0442] LT [\u0434\u0430]",lastDay:"[\u041a\u0435\u0447\u0430 \u0441\u043e\u0430\u0442] LT [\u0434\u0430]",lastWeek:"[\u0423\u0442\u0433\u0430\u043d] dddd [\u043a\u0443\u043d\u0438 \u0441\u043e\u0430\u0442] LT [\u0434\u0430]",sameElse:"L"},relativeTime:{future:"\u042f\u043a\u0438\u043d %s \u0438\u0447\u0438\u0434\u0430",past:"\u0411\u0438\u0440 \u043d\u0435\u0447\u0430 %s \u043e\u043b\u0434\u0438\u043d",s:"\u0444\u0443\u0440\u0441\u0430\u0442",ss:"%d \u0444\u0443\u0440\u0441\u0430\u0442",m:"\u0431\u0438\u0440 \u0434\u0430\u043a\u0438\u043a\u0430",mm:"%d \u0434\u0430\u043a\u0438\u043a\u0430",h:"\u0431\u0438\u0440 \u0441\u043e\u0430\u0442",hh:"%d \u0441\u043e\u0430\u0442",d:"\u0431\u0438\u0440 \u043a\u0443\u043d",dd:"%d \u043a\u0443\u043d",M:"\u0431\u0438\u0440 \u043e\u0439",MM:"%d \u043e\u0439",y:"\u0431\u0438\u0440 \u0439\u0438\u043b",yy:"%d \u0439\u0438\u043b"},week:{dow:1,doy:7}})}(n("wd/R"))},LvDl:function(e,t,n){(function(e){var i;(function(){var r,s="Expected a function",o="__lodash_hash_undefined__",a="__lodash_placeholder__",c=32,l=128,u=1/0,d=9007199254740991,h=NaN,f=4294967295,p=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",c],["partialRight",64],["rearg",256]],m="[object Arguments]",b="[object Array]",g="[object Boolean]",_="[object Date]",y="[object Error]",v="[object Function]",w="[object GeneratorFunction]",S="[object Map]",M="[object Number]",k="[object Object]",x="[object Promise]",D="[object RegExp]",T="[object Set]",C="[object String]",O="[object Symbol]",L="[object WeakMap]",R="[object ArrayBuffer]",E="[object DataView]",A="[object Float32Array]",I="[object Float64Array]",P="[object Int8Array]",N="[object Int16Array]",j="[object Int32Array]",F="[object Uint8Array]",Y="[object Uint8ClampedArray]",z="[object Uint16Array]",$="[object Uint32Array]",H=/\b__p \+= '';/g,W=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,B=/&(?:amp|lt|gt|quot|#39);/g,U=/[&<>"']/g,G=RegExp(B.source),q=RegExp(U.source),J=/<%-([\s\S]+?)%>/g,Q=/<%([\s\S]+?)%>/g,K=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),ie=/^\s+|\s+$/g,re=/^\s+/,se=/\s+$/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,ce=/,? & /,le=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ue=/\\(\\)?/g,de=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,he=/\w*$/,fe=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,me=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,ge=/^(?:0|[1-9]\d*)$/,_e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ye=/($^)/,ve=/['\n\r\u2028\u2029\\]/g,we="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="a-z\\xdf-\\xf6\\xf8-\\xff",Me="A-Z\\xc0-\\xd6\\xd8-\\xde",ke="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",xe="["+ke+"]",De="["+we+"]",Te="\\d+",Ce="["+Se+"]",Oe="[^\\ud800-\\udfff"+ke+Te+"\\u2700-\\u27bf"+Se+Me+"]",Le="\\ud83c[\\udffb-\\udfff]",Re="[^\\ud800-\\udfff]",Ee="(?:\\ud83c[\\udde6-\\uddff]){2}",Ae="[\\ud800-\\udbff][\\udc00-\\udfff]",Ie="["+Me+"]",Pe="(?:"+Ce+"|"+Oe+")",Ne="(?:"+Ie+"|"+Oe+")",je="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Fe="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Ye="(?:"+De+"|"+Le+")?",ze="[\\ufe0e\\ufe0f]?",$e=ze+Ye+"(?:\\u200d(?:"+[Re,Ee,Ae].join("|")+")"+ze+Ye+")*",He="(?:"+["[\\u2700-\\u27bf]",Ee,Ae].join("|")+")"+$e,We="(?:"+[Re+De+"?",De,Ee,Ae,"[\\ud800-\\udfff]"].join("|")+")",Ve=RegExp("['\u2019]","g"),Be=RegExp(De,"g"),Ue=RegExp(Le+"(?="+Le+")|"+We+$e,"g"),Ge=RegExp([Ie+"?"+Ce+"+"+je+"(?="+[xe,Ie,"$"].join("|")+")",Ne+"+"+Fe+"(?="+[xe,Ie+Pe,"$"].join("|")+")",Ie+"?"+Pe+"+"+je,Ie+"+"+Fe,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Te,He].join("|"),"g"),qe=RegExp("[\\u200d\\ud800-\\udfff"+we+"\\ufe0e\\ufe0f]"),Je=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Qe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ke=-1,Ze={};Ze[A]=Ze[I]=Ze[P]=Ze[N]=Ze[j]=Ze[F]=Ze[Y]=Ze[z]=Ze[$]=!0,Ze[m]=Ze[b]=Ze[R]=Ze[g]=Ze[E]=Ze[_]=Ze[y]=Ze[v]=Ze[S]=Ze[M]=Ze[k]=Ze[D]=Ze[T]=Ze[C]=Ze[L]=!1;var Xe={};Xe[m]=Xe[b]=Xe[R]=Xe[E]=Xe[g]=Xe[_]=Xe[A]=Xe[I]=Xe[P]=Xe[N]=Xe[j]=Xe[S]=Xe[M]=Xe[k]=Xe[D]=Xe[T]=Xe[C]=Xe[O]=Xe[F]=Xe[Y]=Xe[z]=Xe[$]=!0,Xe[y]=Xe[v]=Xe[L]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,nt=parseInt,it="object"==typeof global&&global&&global.Object===Object&&global,rt="object"==typeof self&&self&&self.Object===Object&&self,st=it||rt||Function("return this")(),ot=t&&!t.nodeType&&t,at=ot&&"object"==typeof e&&e&&!e.nodeType&&e,ct=at&&at.exports===ot,lt=ct&&it.process,ut=function(){try{return at&&at.require&&at.require("util").types||lt&<.binding&<.binding("util")}catch(e){}}(),dt=ut&&ut.isArrayBuffer,ht=ut&&ut.isDate,ft=ut&&ut.isMap,pt=ut&&ut.isRegExp,mt=ut&&ut.isSet,bt=ut&&ut.isTypedArray;function gt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function _t(e,t,n,i){for(var r=-1,s=null==e?0:e.length;++r<s;){var o=e[r];t(i,o,n(o),e)}return i}function yt(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e}function vt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function wt(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(!t(e[n],n,e))return!1;return!0}function St(e,t){for(var n=-1,i=null==e?0:e.length,r=0,s=[];++n<i;){var o=e[n];t(o,n,e)&&(s[r++]=o)}return s}function Mt(e,t){return!(null==e||!e.length)&&At(e,t,0)>-1}function kt(e,t,n){for(var i=-1,r=null==e?0:e.length;++i<r;)if(n(t,e[i]))return!0;return!1}function xt(e,t){for(var n=-1,i=null==e?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}function Dt(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}function Tt(e,t,n,i){var r=-1,s=null==e?0:e.length;for(i&&s&&(n=e[++r]);++r<s;)n=t(n,e[r],r,e);return n}function Ct(e,t,n,i){var r=null==e?0:e.length;for(i&&r&&(n=e[--r]);r--;)n=t(n,e[r],r,e);return n}function Ot(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}var Lt=jt("length");function Rt(e,t,n){var i;return n(e,(function(e,n,r){if(t(e,n,r))return i=n,!1})),i}function Et(e,t,n,i){for(var r=e.length,s=n+(i?1:-1);i?s--:++s<r;)if(t(e[s],s,e))return s;return-1}function At(e,t,n){return t==t?function(e,t,n){for(var i=n-1,r=e.length;++i<r;)if(e[i]===t)return i;return-1}(e,t,n):Et(e,Pt,n)}function It(e,t,n,i){for(var r=n-1,s=e.length;++r<s;)if(i(e[r],t))return r;return-1}function Pt(e){return e!=e}function Nt(e,t){var n=null==e?0:e.length;return n?zt(e,t)/n:h}function jt(e){return function(t){return null==t?r:t[e]}}function Ft(e){return function(t){return null==e?r:e[t]}}function Yt(e,t,n,i,r){return r(e,(function(e,r,s){n=i?(i=!1,e):t(n,e,r,s)})),n}function zt(e,t){for(var n,i=-1,s=e.length;++i<s;){var o=t(e[i]);o!==r&&(n=n===r?o:n+o)}return n}function $t(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}function Ht(e){return function(t){return e(t)}}function Wt(e,t){return xt(t,(function(t){return e[t]}))}function Vt(e,t){return e.has(t)}function Bt(e,t){for(var n=-1,i=e.length;++n<i&&At(t,e[n],0)>-1;);return n}function Ut(e,t){for(var n=e.length;n--&&At(t,e[n],0)>-1;);return n}function Gt(e,t){for(var n=e.length,i=0;n--;)e[n]===t&&++i;return i}var qt=Ft({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),Jt=Ft({"&":"&","<":"<",">":">",'"':""","'":"'"});function Qt(e){return"\\"+et[e]}function Kt(e){return qe.test(e)}function Zt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function Xt(e,t){return function(n){return e(t(n))}}function en(e,t){for(var n=-1,i=e.length,r=0,s=[];++n<i;){var o=e[n];o!==t&&o!==a||(e[n]=a,s[r++]=n)}return s}function tn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function nn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function rn(e){return Kt(e)?function(e){for(var t=Ue.lastIndex=0;Ue.test(e);)++t;return t}(e):Lt(e)}function sn(e){return Kt(e)?function(e){return e.match(Ue)||[]}(e):function(e){return e.split("")}(e)}var on=Ft({"&":"&","<":"<",">":">",""":'"',"'":"'"}),an=function e(t){var n,i=(t=null==t?st:an.defaults(st.Object(),t,an.pick(st,Qe))).Array,we=t.Date,Se=t.Error,Me=t.Function,ke=t.Math,xe=t.Object,De=t.RegExp,Te=t.String,Ce=t.TypeError,Oe=i.prototype,Le=xe.prototype,Re=t["__core-js_shared__"],Ee=Me.prototype.toString,Ae=Le.hasOwnProperty,Ie=0,Pe=(n=/[^.]+$/.exec(Re&&Re.keys&&Re.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Ne=Le.toString,je=Ee.call(xe),Fe=st._,Ye=De("^"+Ee.call(Ae).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ze=ct?t.Buffer:r,$e=t.Symbol,He=t.Uint8Array,We=ze?ze.allocUnsafe:r,Ue=Xt(xe.getPrototypeOf,xe),qe=xe.create,et=Le.propertyIsEnumerable,it=Oe.splice,rt=$e?$e.isConcatSpreadable:r,ot=$e?$e.iterator:r,at=$e?$e.toStringTag:r,lt=function(){try{var e=as(xe,"defineProperty");return e({},"",{}),e}catch(t){}}(),ut=t.clearTimeout!==st.clearTimeout&&t.clearTimeout,Lt=we&&we.now!==st.Date.now&&we.now,Ft=t.setTimeout!==st.setTimeout&&t.setTimeout,cn=ke.ceil,ln=ke.floor,un=xe.getOwnPropertySymbols,dn=ze?ze.isBuffer:r,hn=t.isFinite,fn=Oe.join,pn=Xt(xe.keys,xe),mn=ke.max,bn=ke.min,gn=we.now,_n=t.parseInt,yn=ke.random,vn=Oe.reverse,wn=as(t,"DataView"),Sn=as(t,"Map"),Mn=as(t,"Promise"),kn=as(t,"Set"),xn=as(t,"WeakMap"),Dn=as(xe,"create"),Tn=xn&&new xn,Cn={},On=Ns(wn),Ln=Ns(Sn),Rn=Ns(Mn),En=Ns(kn),An=Ns(xn),In=$e?$e.prototype:r,Pn=In?In.valueOf:r,Nn=In?In.toString:r;function jn(e){if(ea(e)&&!Wo(e)&&!(e instanceof $n)){if(e instanceof zn)return e;if(Ae.call(e,"__wrapped__"))return js(e)}return new zn(e)}var Fn=function(){function e(){}return function(t){if(!Xo(t))return{};if(qe)return qe(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function Yn(){}function zn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}function $n(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Bn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Vn;++t<n;)this.add(e[t])}function Un(e){var t=this.__data__=new Wn(e);this.size=t.size}function Gn(e,t){var n=Wo(e),i=!n&&Ho(e),r=!n&&!i&&Go(e),s=!n&&!i&&!r&&ca(e),o=n||i||r||s,a=o?$t(e.length,Te):[],c=a.length;for(var l in e)!t&&!Ae.call(e,l)||o&&("length"==l||r&&("offset"==l||"parent"==l)||s&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||ps(l,c))||a.push(l);return a}function qn(e){var t=e.length;return t?e[Vi(0,t-1)]:r}function Jn(e,t){return Rs(xr(e),ri(t,0,e.length))}function Qn(e){return Rs(xr(e))}function Kn(e,t,n){(n!==r&&!Yo(e[t],n)||n===r&&!(t in e))&&ni(e,t,n)}function Zn(e,t,n){var i=e[t];Ae.call(e,t)&&Yo(i,n)&&(n!==r||t in e)||ni(e,t,n)}function Xn(e,t){for(var n=e.length;n--;)if(Yo(e[n][0],t))return n;return-1}function ei(e,t,n,i){return li(e,(function(e,r,s){t(i,e,n(e),s)})),i}function ti(e,t){return e&&Dr(t,La(t),e)}function ni(e,t,n){"__proto__"==t&<?lt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ii(e,t){for(var n=-1,s=t.length,o=i(s),a=null==e;++n<s;)o[n]=a?r:xa(e,t[n]);return o}function ri(e,t,n){return e==e&&(n!==r&&(e=e<=n?e:n),t!==r&&(e=e>=t?e:t)),e}function si(e,t,n,i,s,o){var a,c=1&t,l=2&t,u=4&t;if(n&&(a=s?n(e,i,s,o):n(e)),a!==r)return a;if(!Xo(e))return e;var d=Wo(e);if(d){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ae.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!c)return xr(e,a)}else{var h=us(e),f=h==v||h==w;if(Go(e))return yr(e,c);if(h==k||h==m||f&&!s){if(a=l||f?{}:hs(e),!c)return l?function(e,t){return Dr(e,ls(e),t)}(e,function(e,t){return e&&Dr(t,Ra(t),e)}(a,e)):function(e,t){return Dr(e,cs(e),t)}(e,ti(a,e))}else{if(!Xe[h])return s?e:{};a=function(e,t,n){var i=e.constructor;switch(t){case R:return vr(e);case g:case _:return new i(+e);case E:return function(e,t){var n=t?vr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case A:case I:case P:case N:case j:case F:case Y:case z:case $:return wr(e,n);case S:return new i;case M:case C:return new i(e);case D:return function(e){var t=new e.constructor(e.source,he.exec(e));return t.lastIndex=e.lastIndex,t}(e);case T:return new i;case O:return Pn?xe(Pn.call(e)):{}}}(e,h,c)}}o||(o=new Un);var p=o.get(e);if(p)return p;o.set(e,a),sa(e)?e.forEach((function(i){a.add(si(i,t,n,i,e,o))})):ta(e)&&e.forEach((function(i,r){a.set(r,si(i,t,n,r,e,o))}));var b=d?r:(u?l?es:Xr:l?Ra:La)(e);return yt(b||e,(function(i,r){b&&(i=e[r=i]),Zn(a,r,si(i,t,n,r,e,o))})),a}function oi(e,t,n){var i=n.length;if(null==e)return!i;for(e=xe(e);i--;){var s=n[i],o=e[s];if(o===r&&!(s in e)||!(0,t[s])(o))return!1}return!0}function ai(e,t,n){if("function"!=typeof e)throw new Ce(s);return Ts((function(){e.apply(r,n)}),t)}function ci(e,t,n,i){var r=-1,s=Mt,o=!0,a=e.length,c=[],l=t.length;if(!a)return c;n&&(t=xt(t,Ht(n))),i?(s=kt,o=!1):t.length>=200&&(s=Vt,o=!1,t=new Bn(t));e:for(;++r<a;){var u=e[r],d=null==n?u:n(u);if(u=i||0!==u?u:0,o&&d==d){for(var h=l;h--;)if(t[h]===d)continue e;c.push(u)}else s(t,d,i)||c.push(u)}return c}jn.templateSettings={escape:J,evaluate:Q,interpolate:K,variable:"",imports:{_:jn}},(jn.prototype=Yn.prototype).constructor=jn,(zn.prototype=Fn(Yn.prototype)).constructor=zn,($n.prototype=Fn(Yn.prototype)).constructor=$n,Hn.prototype.clear=function(){this.__data__=Dn?Dn(null):{},this.size=0},Hn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Hn.prototype.get=function(e){var t=this.__data__;if(Dn){var n=t[e];return n===o?r:n}return Ae.call(t,e)?t[e]:r},Hn.prototype.has=function(e){var t=this.__data__;return Dn?t[e]!==r:Ae.call(t,e)},Hn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Dn&&t===r?o:t,this},Wn.prototype.clear=function(){this.__data__=[],this.size=0},Wn.prototype.delete=function(e){var t=this.__data__,n=Xn(t,e);return!(n<0||(n==t.length-1?t.pop():it.call(t,n,1),--this.size,0))},Wn.prototype.get=function(e){var t=this.__data__,n=Xn(t,e);return n<0?r:t[n][1]},Wn.prototype.has=function(e){return Xn(this.__data__,e)>-1},Wn.prototype.set=function(e,t){var n=this.__data__,i=Xn(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},Vn.prototype.clear=function(){this.size=0,this.__data__={hash:new Hn,map:new(Sn||Wn),string:new Hn}},Vn.prototype.delete=function(e){var t=ss(this,e).delete(e);return this.size-=t?1:0,t},Vn.prototype.get=function(e){return ss(this,e).get(e)},Vn.prototype.has=function(e){return ss(this,e).has(e)},Vn.prototype.set=function(e,t){var n=ss(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},Bn.prototype.add=Bn.prototype.push=function(e){return this.__data__.set(e,o),this},Bn.prototype.has=function(e){return this.__data__.has(e)},Un.prototype.clear=function(){this.__data__=new Wn,this.size=0},Un.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Un.prototype.get=function(e){return this.__data__.get(e)},Un.prototype.has=function(e){return this.__data__.has(e)},Un.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Wn){var i=n.__data__;if(!Sn||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Vn(i)}return n.set(e,t),this.size=n.size,this};var li=Or(gi),ui=Or(_i,!0);function di(e,t){var n=!0;return li(e,(function(e,i,r){return n=!!t(e,i,r)})),n}function hi(e,t,n){for(var i=-1,s=e.length;++i<s;){var o=e[i],a=t(o);if(null!=a&&(c===r?a==a&&!aa(a):n(a,c)))var c=a,l=o}return l}function fi(e,t){var n=[];return li(e,(function(e,i,r){t(e,i,r)&&n.push(e)})),n}function pi(e,t,n,i,r){var s=-1,o=e.length;for(n||(n=fs),r||(r=[]);++s<o;){var a=e[s];t>0&&n(a)?t>1?pi(a,t-1,n,i,r):Dt(r,a):i||(r[r.length]=a)}return r}var mi=Lr(),bi=Lr(!0);function gi(e,t){return e&&mi(e,t,La)}function _i(e,t){return e&&bi(e,t,La)}function yi(e,t){return St(t,(function(t){return Qo(e[t])}))}function vi(e,t){for(var n=0,i=(t=mr(t,e)).length;null!=e&&n<i;)e=e[Ps(t[n++])];return n&&n==i?e:r}function wi(e,t,n){var i=t(e);return Wo(e)?i:Dt(i,n(e))}function Si(e){return null==e?e===r?"[object Undefined]":"[object Null]":at&&at in xe(e)?function(e){var t=Ae.call(e,at),n=e[at];try{e[at]=r;var i=!0}catch(o){}var s=Ne.call(e);return i&&(t?e[at]=n:delete e[at]),s}(e):function(e){return Ne.call(e)}(e)}function Mi(e,t){return e>t}function ki(e,t){return null!=e&&Ae.call(e,t)}function xi(e,t){return null!=e&&t in xe(e)}function Di(e,t,n){for(var s=n?kt:Mt,o=e[0].length,a=e.length,c=a,l=i(a),u=1/0,d=[];c--;){var h=e[c];c&&t&&(h=xt(h,Ht(t))),u=bn(h.length,u),l[c]=!n&&(t||o>=120&&h.length>=120)?new Bn(c&&h):r}h=e[0];var f=-1,p=l[0];e:for(;++f<o&&d.length<u;){var m=h[f],b=t?t(m):m;if(m=n||0!==m?m:0,!(p?Vt(p,b):s(d,b,n))){for(c=a;--c;){var g=l[c];if(!(g?Vt(g,b):s(e[c],b,n)))continue e}p&&p.push(b),d.push(m)}}return d}function Ti(e,t,n){var i=null==(e=Ms(e,t=mr(t,e)))?e:e[Ps(qs(t))];return null==i?r:gt(i,e,n)}function Ci(e){return ea(e)&&Si(e)==m}function Oi(e,t,n,i,s){return e===t||(null==e||null==t||!ea(e)&&!ea(t)?e!=e&&t!=t:function(e,t,n,i,s,o){var a=Wo(e),c=Wo(t),l=a?b:us(e),u=c?b:us(t),d=(l=l==m?k:l)==k,h=(u=u==m?k:u)==k,f=l==u;if(f&&Go(e)){if(!Go(t))return!1;a=!0,d=!1}if(f&&!d)return o||(o=new Un),a||ca(e)?Kr(e,t,n,i,s,o):function(e,t,n,i,r,s,o){switch(n){case E:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case R:return!(e.byteLength!=t.byteLength||!s(new He(e),new He(t)));case g:case _:case M:return Yo(+e,+t);case y:return e.name==t.name&&e.message==t.message;case D:case C:return e==t+"";case S:var a=Zt;case T:if(a||(a=tn),e.size!=t.size&&!(1&i))return!1;var c=o.get(e);if(c)return c==t;i|=2,o.set(e,t);var l=Kr(a(e),a(t),i,r,s,o);return o.delete(e),l;case O:if(Pn)return Pn.call(e)==Pn.call(t)}return!1}(e,t,l,n,i,s,o);if(!(1&n)){var p=d&&Ae.call(e,"__wrapped__"),v=h&&Ae.call(t,"__wrapped__");if(p||v){var w=p?e.value():e,x=v?t.value():t;return o||(o=new Un),s(w,x,n,i,o)}}return!!f&&(o||(o=new Un),function(e,t,n,i,s,o){var a=1&n,c=Xr(e),l=c.length;if(l!=Xr(t).length&&!a)return!1;for(var u=l;u--;){var d=c[u];if(!(a?d in t:Ae.call(t,d)))return!1}var h=o.get(e),f=o.get(t);if(h&&f)return h==t&&f==e;var p=!0;o.set(e,t),o.set(t,e);for(var m=a;++u<l;){var b=e[d=c[u]],g=t[d];if(i)var _=a?i(g,b,d,t,e,o):i(b,g,d,e,t,o);if(!(_===r?b===g||s(b,g,n,i,o):_)){p=!1;break}m||(m="constructor"==d)}if(p&&!m){var y=e.constructor,v=t.constructor;y==v||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof v&&v instanceof v||(p=!1)}return o.delete(e),o.delete(t),p}(e,t,n,i,s,o))}(e,t,n,i,Oi,s))}function Li(e,t,n,i){var s=n.length,o=s,a=!i;if(null==e)return!o;for(e=xe(e);s--;){var c=n[s];if(a&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++s<o;){var l=(c=n[s])[0],u=e[l],d=c[1];if(a&&c[2]){if(u===r&&!(l in e))return!1}else{var h=new Un;if(i)var f=i(u,d,l,e,t,h);if(!(f===r?Oi(d,u,3,i,h):f))return!1}}return!0}function Ri(e){return!(!Xo(e)||(t=e,Pe&&Pe in t))&&(Qo(e)?Ye:me).test(Ns(e));var t}function Ei(e){return"function"==typeof e?e:null==e?nc:"object"==typeof e?Wo(e)?ji(e[0],e[1]):Ni(e):dc(e)}function Ai(e){if(!ys(e))return pn(e);var t=[];for(var n in xe(e))Ae.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Ii(e,t){return e<t}function Pi(e,t){var n=-1,r=Bo(e)?i(e.length):[];return li(e,(function(e,i,s){r[++n]=t(e,i,s)})),r}function Ni(e){var t=os(e);return 1==t.length&&t[0][2]?ws(t[0][0],t[0][1]):function(n){return n===e||Li(n,e,t)}}function ji(e,t){return bs(e)&&vs(t)?ws(Ps(e),t):function(n){var i=xa(n,e);return i===r&&i===t?Da(n,e):Oi(t,i,3)}}function Fi(e,t,n,i,s){e!==t&&mi(t,(function(o,a){if(s||(s=new Un),Xo(o))!function(e,t,n,i,s,o,a){var c=xs(e,n),l=xs(t,n),u=a.get(l);if(u)Kn(e,n,u);else{var d=o?o(c,l,n+"",e,t,a):r,h=d===r;if(h){var f=Wo(l),p=!f&&Go(l),m=!f&&!p&&ca(l);d=l,f||p||m?Wo(c)?d=c:Uo(c)?d=xr(c):p?(h=!1,d=yr(l,!0)):m?(h=!1,d=wr(l,!0)):d=[]:ia(l)||Ho(l)?(d=c,Ho(c)?d=ba(c):Xo(c)&&!Qo(c)||(d=hs(l))):h=!1}h&&(a.set(l,d),s(d,l,i,o,a),a.delete(l)),Kn(e,n,d)}}(e,t,a,n,Fi,i,s);else{var c=i?i(xs(e,a),o,a+"",e,t,s):r;c===r&&(c=o),Kn(e,a,c)}}),Ra)}function Yi(e,t){var n=e.length;if(n)return ps(t+=t<0?n:0,n)?e[t]:r}function zi(e,t,n){t=t.length?xt(t,(function(e){return Wo(e)?function(t){return vi(t,1===e.length?e[0]:e)}:e})):[nc];var i=-1;return t=xt(t,Ht(rs())),function(e,t){var i=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var i=-1,r=e.criteria,s=t.criteria,o=r.length,a=n.length;++i<o;){var c=Sr(r[i],s[i]);if(c)return i>=a?c:c*("desc"==n[i]?-1:1)}return e.index-t.index}(e,t,n)}));i--;)e[i]=e[i].value;return e}(Pi(e,(function(e,n,r){return{criteria:xt(t,(function(t){return t(e)})),index:++i,value:e}})))}function $i(e,t,n){for(var i=-1,r=t.length,s={};++i<r;){var o=t[i],a=vi(e,o);n(a,o)&&Ji(s,mr(o,e),a)}return s}function Hi(e,t,n,i){var r=i?It:At,s=-1,o=t.length,a=e;for(e===t&&(t=xr(t)),n&&(a=xt(e,Ht(n)));++s<o;)for(var c=0,l=t[s],u=n?n(l):l;(c=r(a,u,c,i))>-1;)a!==e&&it.call(a,c,1),it.call(e,c,1);return e}function Wi(e,t){for(var n=e?t.length:0,i=n-1;n--;){var r=t[n];if(n==i||r!==s){var s=r;ps(r)?it.call(e,r,1):ar(e,r)}}return e}function Vi(e,t){return e+ln(yn()*(t-e+1))}function Bi(e,t){var n="";if(!e||t<1||t>d)return n;do{t%2&&(n+=e),(t=ln(t/2))&&(e+=e)}while(t);return n}function Ui(e,t){return Cs(Ss(e,t,nc),e+"")}function Gi(e){return qn(Ya(e))}function qi(e,t){var n=Ya(e);return Rs(n,ri(t,0,n.length))}function Ji(e,t,n,i){if(!Xo(e))return e;for(var s=-1,o=(t=mr(t,e)).length,a=o-1,c=e;null!=c&&++s<o;){var l=Ps(t[s]),u=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(s!=a){var d=c[l];(u=i?i(d,l,c):r)===r&&(u=Xo(d)?d:ps(t[s+1])?[]:{})}Zn(c,l,u),c=c[l]}return e}var Qi=Tn?function(e,t){return Tn.set(e,t),e}:nc,Ki=lt?function(e,t){return lt(e,"toString",{configurable:!0,enumerable:!1,value:Xa(t),writable:!0})}:nc;function Zi(e){return Rs(Ya(e))}function Xi(e,t,n){var r=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(n=n>s?s:n)<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var o=i(s);++r<s;)o[r]=e[r+t];return o}function er(e,t){var n;return li(e,(function(e,i,r){return!(n=t(e,i,r))})),!!n}function tr(e,t,n){var i=0,r=null==e?i:e.length;if("number"==typeof t&&t==t&&r<=2147483647){for(;i<r;){var s=i+r>>>1,o=e[s];null!==o&&!aa(o)&&(n?o<=t:o<t)?i=s+1:r=s}return r}return nr(e,t,nc,n)}function nr(e,t,n,i){var s=0,o=null==e?0:e.length;if(0===o)return 0;for(var a=(t=n(t))!=t,c=null===t,l=aa(t),u=t===r;s<o;){var d=ln((s+o)/2),h=n(e[d]),f=h!==r,p=null===h,m=h==h,b=aa(h);if(a)var g=i||m;else g=u?m&&(i||f):c?m&&f&&(i||!p):l?m&&f&&!p&&(i||!b):!p&&!b&&(i?h<=t:h<t);g?s=d+1:o=d}return bn(o,4294967294)}function ir(e,t){for(var n=-1,i=e.length,r=0,s=[];++n<i;){var o=e[n],a=t?t(o):o;if(!n||!Yo(a,c)){var c=a;s[r++]=0===o?0:o}}return s}function rr(e){return"number"==typeof e?e:aa(e)?h:+e}function sr(e){if("string"==typeof e)return e;if(Wo(e))return xt(e,sr)+"";if(aa(e))return Nn?Nn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function or(e,t,n){var i=-1,r=Mt,s=e.length,o=!0,a=[],c=a;if(n)o=!1,r=kt;else if(s>=200){var l=t?null:Br(e);if(l)return tn(l);o=!1,r=Vt,c=new Bn}else c=t?[]:a;e:for(;++i<s;){var u=e[i],d=t?t(u):u;if(u=n||0!==u?u:0,o&&d==d){for(var h=c.length;h--;)if(c[h]===d)continue e;t&&c.push(d),a.push(u)}else r(c,d,n)||(c!==a&&c.push(d),a.push(u))}return a}function ar(e,t){return null==(e=Ms(e,t=mr(t,e)))||delete e[Ps(qs(t))]}function cr(e,t,n,i){return Ji(e,t,n(vi(e,t)),i)}function lr(e,t,n,i){for(var r=e.length,s=i?r:-1;(i?s--:++s<r)&&t(e[s],s,e););return n?Xi(e,i?0:s,i?s+1:r):Xi(e,i?s+1:0,i?r:s)}function ur(e,t){var n=e;return n instanceof $n&&(n=n.value()),Tt(t,(function(e,t){return t.func.apply(t.thisArg,Dt([e],t.args))}),n)}function dr(e,t,n){var r=e.length;if(r<2)return r?or(e[0]):[];for(var s=-1,o=i(r);++s<r;)for(var a=e[s],c=-1;++c<r;)c!=s&&(o[s]=ci(o[s]||a,e[c],t,n));return or(pi(o,1),t,n)}function hr(e,t,n){for(var i=-1,s=e.length,o=t.length,a={};++i<s;)n(a,e[i],i<o?t[i]:r);return a}function fr(e){return Uo(e)?e:[]}function pr(e){return"function"==typeof e?e:nc}function mr(e,t){return Wo(e)?e:bs(e,t)?[e]:Is(ga(e))}var br=Ui;function gr(e,t,n){var i=e.length;return n=n===r?i:n,!t&&n>=i?e:Xi(e,t,n)}var _r=ut||function(e){return st.clearTimeout(e)};function yr(e,t){if(t)return e.slice();var n=e.length,i=We?We(n):new e.constructor(n);return e.copy(i),i}function vr(e){var t=new e.constructor(e.byteLength);return new He(t).set(new He(e)),t}function wr(e,t){var n=t?vr(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Sr(e,t){if(e!==t){var n=e!==r,i=null===e,s=e==e,o=aa(e),a=t!==r,c=null===t,l=t==t,u=aa(t);if(!c&&!u&&!o&&e>t||o&&a&&l&&!c&&!u||i&&a&&l||!n&&l||!s)return 1;if(!i&&!o&&!u&&e<t||u&&n&&s&&!i&&!o||c&&n&&s||!a&&s||!l)return-1}return 0}function Mr(e,t,n,r){for(var s=-1,o=e.length,a=n.length,c=-1,l=t.length,u=mn(o-a,0),d=i(l+u),h=!r;++c<l;)d[c]=t[c];for(;++s<a;)(h||s<o)&&(d[n[s]]=e[s]);for(;u--;)d[c++]=e[s++];return d}function kr(e,t,n,r){for(var s=-1,o=e.length,a=-1,c=n.length,l=-1,u=t.length,d=mn(o-c,0),h=i(d+u),f=!r;++s<d;)h[s]=e[s];for(var p=s;++l<u;)h[p+l]=t[l];for(;++a<c;)(f||s<o)&&(h[p+n[a]]=e[s++]);return h}function xr(e,t){var n=-1,r=e.length;for(t||(t=i(r));++n<r;)t[n]=e[n];return t}function Dr(e,t,n,i){var s=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var c=t[o],l=i?i(n[c],e[c],c,n,e):r;l===r&&(l=e[c]),s?ni(n,c,l):Zn(n,c,l)}return n}function Tr(e,t){return function(n,i){var r=Wo(n)?_t:ei,s=t?t():{};return r(n,e,rs(i,2),s)}}function Cr(e){return Ui((function(t,n){var i=-1,s=n.length,o=s>1?n[s-1]:r,a=s>2?n[2]:r;for(o=e.length>3&&"function"==typeof o?(s--,o):r,a&&ms(n[0],n[1],a)&&(o=s<3?r:o,s=1),t=xe(t);++i<s;){var c=n[i];c&&e(t,c,i,o)}return t}))}function Or(e,t){return function(n,i){if(null==n)return n;if(!Bo(n))return e(n,i);for(var r=n.length,s=t?r:-1,o=xe(n);(t?s--:++s<r)&&!1!==i(o[s],s,o););return n}}function Lr(e){return function(t,n,i){for(var r=-1,s=xe(t),o=i(t),a=o.length;a--;){var c=o[e?a:++r];if(!1===n(s[c],c,s))break}return t}}function Rr(e){return function(t){var n=Kt(t=ga(t))?sn(t):r,i=n?n[0]:t.charAt(0),s=n?gr(n,1).join(""):t.slice(1);return i[e]()+s}}function Er(e){return function(t){return Tt(Qa(Ha(t).replace(Ve,"")),e,"")}}function Ar(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Fn(e.prototype),i=e.apply(n,t);return Xo(i)?i:n}}function Ir(e){return function(t,n,i){var s=xe(t);if(!Bo(t)){var o=rs(n,3);t=La(t),n=function(e){return o(s[e],e,s)}}var a=e(t,n,i);return a>-1?s[o?t[a]:a]:r}}function Pr(e){return Zr((function(t){var n=t.length,i=n,o=zn.prototype.thru;for(e&&t.reverse();i--;){var a=t[i];if("function"!=typeof a)throw new Ce(s);if(o&&!c&&"wrapper"==ns(a))var c=new zn([],!0)}for(i=c?i:n;++i<n;){var l=ns(a=t[i]),u="wrapper"==l?ts(a):r;c=u&&gs(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?c[ns(u[0])].apply(c,u[3]):1==a.length&&gs(a)?c[l]():c.thru(a)}return function(){var e=arguments,i=e[0];if(c&&1==e.length&&Wo(i))return c.plant(i).value();for(var r=0,s=n?t[r].apply(this,e):i;++r<n;)s=t[r].call(this,s);return s}}))}function Nr(e,t,n,s,o,a,c,u,d,h){var f=t&l,p=1&t,m=2&t,b=24&t,g=512&t,_=m?r:Ar(e);return function r(){for(var l=arguments.length,y=i(l),v=l;v--;)y[v]=arguments[v];if(b)var w=is(r),S=Gt(y,w);if(s&&(y=Mr(y,s,o,b)),a&&(y=kr(y,a,c,b)),l-=S,b&&l<h){var M=en(y,w);return Wr(e,t,Nr,r.placeholder,n,y,M,u,d,h-l)}var k=p?n:this,x=m?k[e]:e;return l=y.length,u?y=ks(y,u):g&&l>1&&y.reverse(),f&&d<l&&(y.length=d),this&&this!==st&&this instanceof r&&(x=_||Ar(x)),x.apply(k,y)}}function jr(e,t){return function(n,i){return function(e,t,n,i){return gi(e,(function(e,r,s){t(i,n(e),r,s)})),i}(n,e,t(i),{})}}function Fr(e,t){return function(n,i){var s;if(n===r&&i===r)return t;if(n!==r&&(s=n),i!==r){if(s===r)return i;"string"==typeof n||"string"==typeof i?(n=sr(n),i=sr(i)):(n=rr(n),i=rr(i)),s=e(n,i)}return s}}function Yr(e){return Zr((function(t){return t=xt(t,Ht(rs())),Ui((function(n){var i=this;return e(t,(function(e){return gt(e,i,n)}))}))}))}function zr(e,t){var n=(t=t===r?" ":sr(t)).length;if(n<2)return n?Bi(t,e):t;var i=Bi(t,cn(e/rn(t)));return Kt(t)?gr(sn(i),0,e).join(""):i.slice(0,e)}function $r(e){return function(t,n,s){return s&&"number"!=typeof s&&ms(t,n,s)&&(n=s=r),t=ha(t),n===r?(n=t,t=0):n=ha(n),function(e,t,n,r){for(var s=-1,o=mn(cn((t-e)/(n||1)),0),a=i(o);o--;)a[r?o:++s]=e,e+=n;return a}(t,n,s=s===r?t<n?1:-1:ha(s),e)}}function Hr(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ma(t),n=ma(n)),e(t,n)}}function Wr(e,t,n,i,s,o,a,l,u,d){var h=8&t;t|=h?c:64,4&(t&=~(h?64:c))||(t&=-4);var f=[e,t,s,h?o:r,h?a:r,h?r:o,h?r:a,l,u,d],p=n.apply(r,f);return gs(e)&&Ds(p,f),p.placeholder=i,Os(p,e,t)}function Vr(e){var t=ke[e];return function(e,n){if(e=ma(e),(n=null==n?0:bn(fa(n),292))&&hn(e)){var i=(ga(e)+"e").split("e");return+((i=(ga(t(i[0]+"e"+(+i[1]+n)))+"e").split("e"))[0]+"e"+(+i[1]-n))}return t(e)}}var Br=kn&&1/tn(new kn([,-0]))[1]==u?function(e){return new kn(e)}:ac;function Ur(e){return function(t){var n=us(t);return n==S?Zt(t):n==T?nn(t):function(e,t){return xt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Gr(e,t,n,o,u,d,h,f){var p=2&t;if(!p&&"function"!=typeof e)throw new Ce(s);var m=o?o.length:0;if(m||(t&=-97,o=u=r),h=h===r?h:mn(fa(h),0),f=f===r?f:fa(f),m-=u?u.length:0,64&t){var b=o,g=u;o=u=r}var _=p?r:ts(e),y=[e,t,n,o,u,b,g,d,h,f];if(_&&function(e,t){var n=e[1],i=t[1],r=n|i;if(!(r<131||i==l&&8==n||i==l&&256==n&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==n))return e;1&i&&(e[2]=t[2],r|=1&n?0:4);var s=t[3];if(s){var o=e[3];e[3]=o?Mr(o,s,t[4]):s,e[4]=o?en(e[3],a):t[4]}(s=t[5])&&(e[5]=(o=e[5])?kr(o,s,t[6]):s,e[6]=o?en(e[5],a):t[6]),(s=t[7])&&(e[7]=s),i&l&&(e[8]=null==e[8]?t[8]:bn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=r}(y,_),e=y[0],t=y[1],n=y[2],o=y[3],u=y[4],!(f=y[9]=y[9]===r?p?0:e.length:mn(y[9]-m,0))&&24&t&&(t&=-25),t&&1!=t)v=8==t||16==t?function(e,t,n){var s=Ar(e);return function o(){for(var a=arguments.length,c=i(a),l=a,u=is(o);l--;)c[l]=arguments[l];var d=a<3&&c[0]!==u&&c[a-1]!==u?[]:en(c,u);return(a-=d.length)<n?Wr(e,t,Nr,o.placeholder,r,c,d,r,r,n-a):gt(this&&this!==st&&this instanceof o?s:e,this,c)}}(e,t,f):t!=c&&33!=t||u.length?Nr.apply(r,y):function(e,t,n,r){var s=1&t,o=Ar(e);return function t(){for(var a=-1,c=arguments.length,l=-1,u=r.length,d=i(u+c),h=this&&this!==st&&this instanceof t?o:e;++l<u;)d[l]=r[l];for(;c--;)d[l++]=arguments[++a];return gt(h,s?n:this,d)}}(e,t,n,o);else var v=function(e,t,n){var i=1&t,r=Ar(e);return function t(){return(this&&this!==st&&this instanceof t?r:e).apply(i?n:this,arguments)}}(e,t,n);return Os((_?Qi:Ds)(v,y),e,t)}function qr(e,t,n,i){return e===r||Yo(e,Le[n])&&!Ae.call(i,n)?t:e}function Jr(e,t,n,i,s,o){return Xo(e)&&Xo(t)&&(o.set(t,e),Fi(e,t,r,Jr,o),o.delete(t)),e}function Qr(e){return ia(e)?r:e}function Kr(e,t,n,i,s,o){var a=1&n,c=e.length,l=t.length;if(c!=l&&!(a&&l>c))return!1;var u=o.get(e),d=o.get(t);if(u&&d)return u==t&&d==e;var h=-1,f=!0,p=2&n?new Bn:r;for(o.set(e,t),o.set(t,e);++h<c;){var m=e[h],b=t[h];if(i)var g=a?i(b,m,h,t,e,o):i(m,b,h,e,t,o);if(g!==r){if(g)continue;f=!1;break}if(p){if(!Ot(t,(function(e,t){if(!Vt(p,t)&&(m===e||s(m,e,n,i,o)))return p.push(t)}))){f=!1;break}}else if(m!==b&&!s(m,b,n,i,o)){f=!1;break}}return o.delete(e),o.delete(t),f}function Zr(e){return Cs(Ss(e,r,Ws),e+"")}function Xr(e){return wi(e,La,cs)}function es(e){return wi(e,Ra,ls)}var ts=Tn?function(e){return Tn.get(e)}:ac;function ns(e){for(var t=e.name+"",n=Cn[t],i=Ae.call(Cn,t)?n.length:0;i--;){var r=n[i],s=r.func;if(null==s||s==e)return r.name}return t}function is(e){return(Ae.call(jn,"placeholder")?jn:e).placeholder}function rs(){var e=jn.iteratee||ic;return e=e===ic?Ei:e,arguments.length?e(arguments[0],arguments[1]):e}function ss(e,t){var n,i,r=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof t?"string":"hash"]:r.map}function os(e){for(var t=La(e),n=t.length;n--;){var i=t[n],r=e[i];t[n]=[i,r,vs(r)]}return t}function as(e,t){var n=function(e,t){return null==e?r:e[t]}(e,t);return Ri(n)?n:r}var cs=un?function(e){return null==e?[]:(e=xe(e),St(un(e),(function(t){return et.call(e,t)})))}:pc,ls=un?function(e){for(var t=[];e;)Dt(t,cs(e)),e=Ue(e);return t}:pc,us=Si;function ds(e,t,n){for(var i=-1,r=(t=mr(t,e)).length,s=!1;++i<r;){var o=Ps(t[i]);if(!(s=null!=e&&n(e,o)))break;e=e[o]}return s||++i!=r?s:!!(r=null==e?0:e.length)&&Zo(r)&&ps(o,r)&&(Wo(e)||Ho(e))}function hs(e){return"function"!=typeof e.constructor||ys(e)?{}:Fn(Ue(e))}function fs(e){return Wo(e)||Ho(e)||!!(rt&&e&&e[rt])}function ps(e,t){var n=typeof e;return!!(t=null==t?d:t)&&("number"==n||"symbol"!=n&&ge.test(e))&&e>-1&&e%1==0&&e<t}function ms(e,t,n){if(!Xo(n))return!1;var i=typeof t;return!!("number"==i?Bo(n)&&ps(t,n.length):"string"==i&&t in n)&&Yo(n[t],e)}function bs(e,t){if(Wo(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!aa(e))||X.test(e)||!Z.test(e)||null!=t&&e in xe(t)}function gs(e){var t=ns(e),n=jn[t];if("function"!=typeof n||!(t in $n.prototype))return!1;if(e===n)return!0;var i=ts(n);return!!i&&e===i[0]}(wn&&us(new wn(new ArrayBuffer(1)))!=E||Sn&&us(new Sn)!=S||Mn&&us(Mn.resolve())!=x||kn&&us(new kn)!=T||xn&&us(new xn)!=L)&&(us=function(e){var t=Si(e),n=t==k?e.constructor:r,i=n?Ns(n):"";if(i)switch(i){case On:return E;case Ln:return S;case Rn:return x;case En:return T;case An:return L}return t});var _s=Re?Qo:mc;function ys(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Le)}function vs(e){return e==e&&!Xo(e)}function ws(e,t){return function(n){return null!=n&&n[e]===t&&(t!==r||e in xe(n))}}function Ss(e,t,n){return t=mn(t===r?e.length-1:t,0),function(){for(var r=arguments,s=-1,o=mn(r.length-t,0),a=i(o);++s<o;)a[s]=r[t+s];s=-1;for(var c=i(t+1);++s<t;)c[s]=r[s];return c[t]=n(a),gt(e,this,c)}}function Ms(e,t){return t.length<2?e:vi(e,Xi(t,0,-1))}function ks(e,t){for(var n=e.length,i=bn(t.length,n),s=xr(e);i--;){var o=t[i];e[i]=ps(o,n)?s[o]:r}return e}function xs(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Ds=Ls(Qi),Ts=Ft||function(e,t){return st.setTimeout(e,t)},Cs=Ls(Ki);function Os(e,t,n){var i=t+"";return Cs(e,function(e,t){var n=t.length;if(!n)return e;var i=n-1;return t[i]=(n>1?"& ":"")+t[i],t=t.join(n>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(i,function(e,t){return yt(p,(function(n){var i="_."+n[0];t&n[1]&&!Mt(e,i)&&e.push(i)})),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(ce):[]}(i),n)))}function Ls(e){var t=0,n=0;return function(){var i=gn(),s=16-(i-n);if(n=i,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(r,arguments)}}function Rs(e,t){var n=-1,i=e.length,s=i-1;for(t=t===r?i:t;++n<t;){var o=Vi(n,s),a=e[o];e[o]=e[n],e[n]=a}return e.length=t,e}var Es,As,Is=(Es=Ao((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,i,r){t.push(i?r.replace(ue,"$1"):n||e)})),t}),(function(e){return 500===As.size&&As.clear(),e})),As=Es.cache,Es);function Ps(e){if("string"==typeof e||aa(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ns(e){if(null!=e){try{return Ee.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function js(e){if(e instanceof $n)return e.clone();var t=new zn(e.__wrapped__,e.__chain__);return t.__actions__=xr(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Fs=Ui((function(e,t){return Uo(e)?ci(e,pi(t,1,Uo,!0)):[]})),Ys=Ui((function(e,t){var n=qs(t);return Uo(n)&&(n=r),Uo(e)?ci(e,pi(t,1,Uo,!0),rs(n,2)):[]})),zs=Ui((function(e,t){var n=qs(t);return Uo(n)&&(n=r),Uo(e)?ci(e,pi(t,1,Uo,!0),r,n):[]}));function $s(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=null==n?0:fa(n);return r<0&&(r=mn(i+r,0)),Et(e,rs(t,3),r)}function Hs(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var s=i-1;return n!==r&&(s=fa(n),s=n<0?mn(i+s,0):bn(s,i-1)),Et(e,rs(t,3),s,!0)}function Ws(e){return null!=e&&e.length?pi(e,1):[]}function Vs(e){return e&&e.length?e[0]:r}var Bs=Ui((function(e){var t=xt(e,fr);return t.length&&t[0]===e[0]?Di(t):[]})),Us=Ui((function(e){var t=qs(e),n=xt(e,fr);return t===qs(n)?t=r:n.pop(),n.length&&n[0]===e[0]?Di(n,rs(t,2)):[]})),Gs=Ui((function(e){var t=qs(e),n=xt(e,fr);return(t="function"==typeof t?t:r)&&n.pop(),n.length&&n[0]===e[0]?Di(n,r,t):[]}));function qs(e){var t=null==e?0:e.length;return t?e[t-1]:r}var Js=Ui(Qs);function Qs(e,t){return e&&e.length&&t&&t.length?Hi(e,t):e}var Ks=Zr((function(e,t){var n=null==e?0:e.length,i=ii(e,t);return Wi(e,xt(t,(function(e){return ps(e,n)?+e:e})).sort(Sr)),i}));function Zs(e){return null==e?e:vn.call(e)}var Xs=Ui((function(e){return or(pi(e,1,Uo,!0))})),eo=Ui((function(e){var t=qs(e);return Uo(t)&&(t=r),or(pi(e,1,Uo,!0),rs(t,2))})),to=Ui((function(e){var t=qs(e);return t="function"==typeof t?t:r,or(pi(e,1,Uo,!0),r,t)}));function no(e){if(!e||!e.length)return[];var t=0;return e=St(e,(function(e){if(Uo(e))return t=mn(e.length,t),!0})),$t(t,(function(t){return xt(e,jt(t))}))}function io(e,t){if(!e||!e.length)return[];var n=no(e);return null==t?n:xt(n,(function(e){return gt(t,r,e)}))}var ro=Ui((function(e,t){return Uo(e)?ci(e,t):[]})),so=Ui((function(e){return dr(St(e,Uo))})),oo=Ui((function(e){var t=qs(e);return Uo(t)&&(t=r),dr(St(e,Uo),rs(t,2))})),ao=Ui((function(e){var t=qs(e);return t="function"==typeof t?t:r,dr(St(e,Uo),r,t)})),co=Ui(no),lo=Ui((function(e){var t=e.length,n=t>1?e[t-1]:r;return n="function"==typeof n?(e.pop(),n):r,io(e,n)}));function uo(e){var t=jn(e);return t.__chain__=!0,t}function ho(e,t){return t(e)}var fo=Zr((function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,s=function(t){return ii(t,e)};return!(t>1||this.__actions__.length)&&i instanceof $n&&ps(n)?((i=i.slice(n,+n+(t?1:0))).__actions__.push({func:ho,args:[s],thisArg:r}),new zn(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(r),e}))):this.thru(s)})),po=Tr((function(e,t,n){Ae.call(e,n)?++e[n]:ni(e,n,1)})),mo=Ir($s),bo=Ir(Hs);function go(e,t){return(Wo(e)?yt:li)(e,rs(t,3))}function _o(e,t){return(Wo(e)?vt:ui)(e,rs(t,3))}var yo=Tr((function(e,t,n){Ae.call(e,n)?e[n].push(t):ni(e,n,[t])})),vo=Ui((function(e,t,n){var r=-1,s="function"==typeof t,o=Bo(e)?i(e.length):[];return li(e,(function(e){o[++r]=s?gt(t,e,n):Ti(e,t,n)})),o})),wo=Tr((function(e,t,n){ni(e,n,t)}));function So(e,t){return(Wo(e)?xt:Pi)(e,rs(t,3))}var Mo=Tr((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),ko=Ui((function(e,t){if(null==e)return[];var n=t.length;return n>1&&ms(e,t[0],t[1])?t=[]:n>2&&ms(t[0],t[1],t[2])&&(t=[t[0]]),zi(e,pi(t,1),[])})),xo=Lt||function(){return st.Date.now()};function Do(e,t,n){return t=n?r:t,Gr(e,l,r,r,r,r,t=e&&null==t?e.length:t)}function To(e,t){var n;if("function"!=typeof t)throw new Ce(s);return e=fa(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=r),n}}var Co=Ui((function(e,t,n){var i=1;if(n.length){var r=en(n,is(Co));i|=c}return Gr(e,i,t,n,r)})),Oo=Ui((function(e,t,n){var i=3;if(n.length){var r=en(n,is(Oo));i|=c}return Gr(t,i,e,n,r)}));function Lo(e,t,n){var i,o,a,c,l,u,d=0,h=!1,f=!1,p=!0;if("function"!=typeof e)throw new Ce(s);function m(t){var n=i,s=o;return i=o=r,d=t,c=e.apply(s,n)}function b(e){return d=e,l=Ts(_,t),h?m(e):c}function g(e){var n=e-u;return u===r||n>=t||n<0||f&&e-d>=a}function _(){var e=xo();if(g(e))return y(e);l=Ts(_,function(e){var n=t-(e-u);return f?bn(n,a-(e-d)):n}(e))}function y(e){return l=r,p&&i?m(e):(i=o=r,c)}function v(){var e=xo(),n=g(e);if(i=arguments,o=this,u=e,n){if(l===r)return b(u);if(f)return _r(l),l=Ts(_,t),m(u)}return l===r&&(l=Ts(_,t)),c}return t=ma(t)||0,Xo(n)&&(h=!!n.leading,a=(f="maxWait"in n)?mn(ma(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),v.cancel=function(){l!==r&&_r(l),d=0,i=u=o=l=r},v.flush=function(){return l===r?c:y(xo())},v}var Ro=Ui((function(e,t){return ai(e,1,t)})),Eo=Ui((function(e,t,n){return ai(e,ma(t)||0,n)}));function Ao(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ce(s);var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],s=n.cache;if(s.has(r))return s.get(r);var o=e.apply(this,i);return n.cache=s.set(r,o)||s,o};return n.cache=new(Ao.Cache||Vn),n}function Io(e){if("function"!=typeof e)throw new Ce(s);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ao.Cache=Vn;var Po=br((function(e,t){var n=(t=1==t.length&&Wo(t[0])?xt(t[0],Ht(rs())):xt(pi(t,1),Ht(rs()))).length;return Ui((function(i){for(var r=-1,s=bn(i.length,n);++r<s;)i[r]=t[r].call(this,i[r]);return gt(e,this,i)}))})),No=Ui((function(e,t){var n=en(t,is(No));return Gr(e,c,r,t,n)})),jo=Ui((function(e,t){var n=en(t,is(jo));return Gr(e,64,r,t,n)})),Fo=Zr((function(e,t){return Gr(e,256,r,r,r,t)}));function Yo(e,t){return e===t||e!=e&&t!=t}var zo=Hr(Mi),$o=Hr((function(e,t){return e>=t})),Ho=Ci(function(){return arguments}())?Ci:function(e){return ea(e)&&Ae.call(e,"callee")&&!et.call(e,"callee")},Wo=i.isArray,Vo=dt?Ht(dt):function(e){return ea(e)&&Si(e)==R};function Bo(e){return null!=e&&Zo(e.length)&&!Qo(e)}function Uo(e){return ea(e)&&Bo(e)}var Go=dn||mc,qo=ht?Ht(ht):function(e){return ea(e)&&Si(e)==_};function Jo(e){if(!ea(e))return!1;var t=Si(e);return t==y||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ia(e)}function Qo(e){if(!Xo(e))return!1;var t=Si(e);return t==v||t==w||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ko(e){return"number"==typeof e&&e==fa(e)}function Zo(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=d}function Xo(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ea(e){return null!=e&&"object"==typeof e}var ta=ft?Ht(ft):function(e){return ea(e)&&us(e)==S};function na(e){return"number"==typeof e||ea(e)&&Si(e)==M}function ia(e){if(!ea(e)||Si(e)!=k)return!1;var t=Ue(e);if(null===t)return!0;var n=Ae.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ee.call(n)==je}var ra=pt?Ht(pt):function(e){return ea(e)&&Si(e)==D},sa=mt?Ht(mt):function(e){return ea(e)&&us(e)==T};function oa(e){return"string"==typeof e||!Wo(e)&&ea(e)&&Si(e)==C}function aa(e){return"symbol"==typeof e||ea(e)&&Si(e)==O}var ca=bt?Ht(bt):function(e){return ea(e)&&Zo(e.length)&&!!Ze[Si(e)]},la=Hr(Ii),ua=Hr((function(e,t){return e<=t}));function da(e){if(!e)return[];if(Bo(e))return oa(e)?sn(e):xr(e);if(ot&&e[ot])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[ot]());var t=us(e);return(t==S?Zt:t==T?tn:Ya)(e)}function ha(e){return e?(e=ma(e))===u||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function fa(e){var t=ha(e),n=t%1;return t==t?n?t-n:t:0}function pa(e){return e?ri(fa(e),0,f):0}function ma(e){if("number"==typeof e)return e;if(aa(e))return h;if(Xo(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Xo(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(ie,"");var n=pe.test(e);return n||be.test(e)?nt(e.slice(2),n?2:8):fe.test(e)?h:+e}function ba(e){return Dr(e,Ra(e))}function ga(e){return null==e?"":sr(e)}var _a=Cr((function(e,t){if(ys(t)||Bo(t))Dr(t,La(t),e);else for(var n in t)Ae.call(t,n)&&Zn(e,n,t[n])})),ya=Cr((function(e,t){Dr(t,Ra(t),e)})),va=Cr((function(e,t,n,i){Dr(t,Ra(t),e,i)})),wa=Cr((function(e,t,n,i){Dr(t,La(t),e,i)})),Sa=Zr(ii),Ma=Ui((function(e,t){e=xe(e);var n=-1,i=t.length,s=i>2?t[2]:r;for(s&&ms(t[0],t[1],s)&&(i=1);++n<i;)for(var o=t[n],a=Ra(o),c=-1,l=a.length;++c<l;){var u=a[c],d=e[u];(d===r||Yo(d,Le[u])&&!Ae.call(e,u))&&(e[u]=o[u])}return e})),ka=Ui((function(e){return e.push(r,Jr),gt(Aa,r,e)}));function xa(e,t,n){var i=null==e?r:vi(e,t);return i===r?n:i}function Da(e,t){return null!=e&&ds(e,t,xi)}var Ta=jr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ne.call(t)),e[t]=n}),Xa(nc)),Ca=jr((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ne.call(t)),Ae.call(e,t)?e[t].push(n):e[t]=[n]}),rs),Oa=Ui(Ti);function La(e){return Bo(e)?Gn(e):Ai(e)}function Ra(e){return Bo(e)?Gn(e,!0):function(e){if(!Xo(e))return function(e){var t=[];if(null!=e)for(var n in xe(e))t.push(n);return t}(e);var t=ys(e),n=[];for(var i in e)("constructor"!=i||!t&&Ae.call(e,i))&&n.push(i);return n}(e)}var Ea=Cr((function(e,t,n){Fi(e,t,n)})),Aa=Cr((function(e,t,n,i){Fi(e,t,n,i)})),Ia=Zr((function(e,t){var n={};if(null==e)return n;var i=!1;t=xt(t,(function(t){return t=mr(t,e),i||(i=t.length>1),t})),Dr(e,es(e),n),i&&(n=si(n,7,Qr));for(var r=t.length;r--;)ar(n,t[r]);return n})),Pa=Zr((function(e,t){return null==e?{}:function(e,t){return $i(e,t,(function(t,n){return Da(e,n)}))}(e,t)}));function Na(e,t){if(null==e)return{};var n=xt(es(e),(function(e){return[e]}));return t=rs(t),$i(e,n,(function(e,n){return t(e,n[0])}))}var ja=Ur(La),Fa=Ur(Ra);function Ya(e){return null==e?[]:Wt(e,La(e))}var za=Er((function(e,t,n){return t=t.toLowerCase(),e+(n?$a(t):t)}));function $a(e){return Ja(ga(e).toLowerCase())}function Ha(e){return(e=ga(e))&&e.replace(_e,qt).replace(Be,"")}var Wa=Er((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Va=Er((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Ba=Rr("toLowerCase"),Ua=Er((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Ga=Er((function(e,t,n){return e+(n?" ":"")+Ja(t)})),qa=Er((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ja=Rr("toUpperCase");function Qa(e,t,n){return e=ga(e),(t=n?r:t)===r?function(e){return Je.test(e)}(e)?function(e){return e.match(Ge)||[]}(e):function(e){return e.match(le)||[]}(e):e.match(t)||[]}var Ka=Ui((function(e,t){try{return gt(e,r,t)}catch(n){return Jo(n)?n:new Se(n)}})),Za=Zr((function(e,t){return yt(t,(function(t){t=Ps(t),ni(e,t,Co(e[t],e))})),e}));function Xa(e){return function(){return e}}var ec=Pr(),tc=Pr(!0);function nc(e){return e}function ic(e){return Ei("function"==typeof e?e:si(e,1))}var rc=Ui((function(e,t){return function(n){return Ti(n,e,t)}})),sc=Ui((function(e,t){return function(n){return Ti(e,n,t)}}));function oc(e,t,n){var i=La(t),r=yi(t,i);null!=n||Xo(t)&&(r.length||!i.length)||(n=t,t=e,e=this,r=yi(t,La(t)));var s=!(Xo(n)&&"chain"in n&&!n.chain),o=Qo(e);return yt(r,(function(n){var i=t[n];e[n]=i,o&&(e.prototype[n]=function(){var t=this.__chain__;if(s||t){var n=e(this.__wrapped__),r=n.__actions__=xr(this.__actions__);return r.push({func:i,args:arguments,thisArg:e}),n.__chain__=t,n}return i.apply(e,Dt([this.value()],arguments))})})),e}function ac(){}var cc=Yr(xt),lc=Yr(wt),uc=Yr(Ot);function dc(e){return bs(e)?jt(Ps(e)):function(e){return function(t){return vi(t,e)}}(e)}var hc=$r(),fc=$r(!0);function pc(){return[]}function mc(){return!1}var bc,gc=Fr((function(e,t){return e+t}),0),_c=Vr("ceil"),yc=Fr((function(e,t){return e/t}),1),vc=Vr("floor"),wc=Fr((function(e,t){return e*t}),1),Sc=Vr("round"),Mc=Fr((function(e,t){return e-t}),0);return jn.after=function(e,t){if("function"!=typeof t)throw new Ce(s);return e=fa(e),function(){if(--e<1)return t.apply(this,arguments)}},jn.ary=Do,jn.assign=_a,jn.assignIn=ya,jn.assignInWith=va,jn.assignWith=wa,jn.at=Sa,jn.before=To,jn.bind=Co,jn.bindAll=Za,jn.bindKey=Oo,jn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Wo(e)?e:[e]},jn.chain=uo,jn.chunk=function(e,t,n){t=(n?ms(e,t,n):t===r)?1:mn(fa(t),0);var s=null==e?0:e.length;if(!s||t<1)return[];for(var o=0,a=0,c=i(cn(s/t));o<s;)c[a++]=Xi(e,o,o+=t);return c},jn.compact=function(e){for(var t=-1,n=null==e?0:e.length,i=0,r=[];++t<n;){var s=e[t];s&&(r[i++]=s)}return r},jn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=i(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Dt(Wo(n)?xr(n):[n],pi(t,1))},jn.cond=function(e){var t=null==e?0:e.length,n=rs();return e=t?xt(e,(function(e){if("function"!=typeof e[1])throw new Ce(s);return[n(e[0]),e[1]]})):[],Ui((function(n){for(var i=-1;++i<t;){var r=e[i];if(gt(r[0],this,n))return gt(r[1],this,n)}}))},jn.conforms=function(e){return function(e){var t=La(e);return function(n){return oi(n,e,t)}}(si(e,1))},jn.constant=Xa,jn.countBy=po,jn.create=function(e,t){var n=Fn(e);return null==t?n:ti(n,t)},jn.curry=function e(t,n,i){var s=Gr(t,8,r,r,r,r,r,n=i?r:n);return s.placeholder=e.placeholder,s},jn.curryRight=function e(t,n,i){var s=Gr(t,16,r,r,r,r,r,n=i?r:n);return s.placeholder=e.placeholder,s},jn.debounce=Lo,jn.defaults=Ma,jn.defaultsDeep=ka,jn.defer=Ro,jn.delay=Eo,jn.difference=Fs,jn.differenceBy=Ys,jn.differenceWith=zs,jn.drop=function(e,t,n){var i=null==e?0:e.length;return i?Xi(e,(t=n||t===r?1:fa(t))<0?0:t,i):[]},jn.dropRight=function(e,t,n){var i=null==e?0:e.length;return i?Xi(e,0,(t=i-(t=n||t===r?1:fa(t)))<0?0:t):[]},jn.dropRightWhile=function(e,t){return e&&e.length?lr(e,rs(t,3),!0,!0):[]},jn.dropWhile=function(e,t){return e&&e.length?lr(e,rs(t,3),!0):[]},jn.fill=function(e,t,n,i){var s=null==e?0:e.length;return s?(n&&"number"!=typeof n&&ms(e,t,n)&&(n=0,i=s),function(e,t,n,i){var s=e.length;for((n=fa(n))<0&&(n=-n>s?0:s+n),(i=i===r||i>s?s:fa(i))<0&&(i+=s),i=n>i?0:pa(i);n<i;)e[n++]=t;return e}(e,t,n,i)):[]},jn.filter=function(e,t){return(Wo(e)?St:fi)(e,rs(t,3))},jn.flatMap=function(e,t){return pi(So(e,t),1)},jn.flatMapDeep=function(e,t){return pi(So(e,t),u)},jn.flatMapDepth=function(e,t,n){return n=n===r?1:fa(n),pi(So(e,t),n)},jn.flatten=Ws,jn.flattenDeep=function(e){return null!=e&&e.length?pi(e,u):[]},jn.flattenDepth=function(e,t){return null!=e&&e.length?pi(e,t=t===r?1:fa(t)):[]},jn.flip=function(e){return Gr(e,512)},jn.flow=ec,jn.flowRight=tc,jn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,i={};++t<n;){var r=e[t];i[r[0]]=r[1]}return i},jn.functions=function(e){return null==e?[]:yi(e,La(e))},jn.functionsIn=function(e){return null==e?[]:yi(e,Ra(e))},jn.groupBy=yo,jn.initial=function(e){return null!=e&&e.length?Xi(e,0,-1):[]},jn.intersection=Bs,jn.intersectionBy=Us,jn.intersectionWith=Gs,jn.invert=Ta,jn.invertBy=Ca,jn.invokeMap=vo,jn.iteratee=ic,jn.keyBy=wo,jn.keys=La,jn.keysIn=Ra,jn.map=So,jn.mapKeys=function(e,t){var n={};return t=rs(t,3),gi(e,(function(e,i,r){ni(n,t(e,i,r),e)})),n},jn.mapValues=function(e,t){var n={};return t=rs(t,3),gi(e,(function(e,i,r){ni(n,i,t(e,i,r))})),n},jn.matches=function(e){return Ni(si(e,1))},jn.matchesProperty=function(e,t){return ji(e,si(t,1))},jn.memoize=Ao,jn.merge=Ea,jn.mergeWith=Aa,jn.method=rc,jn.methodOf=sc,jn.mixin=oc,jn.negate=Io,jn.nthArg=function(e){return e=fa(e),Ui((function(t){return Yi(t,e)}))},jn.omit=Ia,jn.omitBy=function(e,t){return Na(e,Io(rs(t)))},jn.once=function(e){return To(2,e)},jn.orderBy=function(e,t,n,i){return null==e?[]:(Wo(t)||(t=null==t?[]:[t]),Wo(n=i?r:n)||(n=null==n?[]:[n]),zi(e,t,n))},jn.over=cc,jn.overArgs=Po,jn.overEvery=lc,jn.overSome=uc,jn.partial=No,jn.partialRight=jo,jn.partition=Mo,jn.pick=Pa,jn.pickBy=Na,jn.property=dc,jn.propertyOf=function(e){return function(t){return null==e?r:vi(e,t)}},jn.pull=Js,jn.pullAll=Qs,jn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Hi(e,t,rs(n,2)):e},jn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Hi(e,t,r,n):e},jn.pullAt=Ks,jn.range=hc,jn.rangeRight=fc,jn.rearg=Fo,jn.reject=function(e,t){return(Wo(e)?St:fi)(e,Io(rs(t,3)))},jn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var i=-1,r=[],s=e.length;for(t=rs(t,3);++i<s;){var o=e[i];t(o,i,e)&&(n.push(o),r.push(i))}return Wi(e,r),n},jn.rest=function(e,t){if("function"!=typeof e)throw new Ce(s);return Ui(e,t=t===r?t:fa(t))},jn.reverse=Zs,jn.sampleSize=function(e,t,n){return t=(n?ms(e,t,n):t===r)?1:fa(t),(Wo(e)?Jn:qi)(e,t)},jn.set=function(e,t,n){return null==e?e:Ji(e,t,n)},jn.setWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:Ji(e,t,n,i)},jn.shuffle=function(e){return(Wo(e)?Qn:Zi)(e)},jn.slice=function(e,t,n){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&ms(e,t,n)?(t=0,n=i):(t=null==t?0:fa(t),n=n===r?i:fa(n)),Xi(e,t,n)):[]},jn.sortBy=ko,jn.sortedUniq=function(e){return e&&e.length?ir(e):[]},jn.sortedUniqBy=function(e,t){return e&&e.length?ir(e,rs(t,2)):[]},jn.split=function(e,t,n){return n&&"number"!=typeof n&&ms(e,t,n)&&(t=n=r),(n=n===r?f:n>>>0)?(e=ga(e))&&("string"==typeof t||null!=t&&!ra(t))&&!(t=sr(t))&&Kt(e)?gr(sn(e),0,n):e.split(t,n):[]},jn.spread=function(e,t){if("function"!=typeof e)throw new Ce(s);return t=null==t?0:mn(fa(t),0),Ui((function(n){var i=n[t],r=gr(n,0,t);return i&&Dt(r,i),gt(e,this,r)}))},jn.tail=function(e){var t=null==e?0:e.length;return t?Xi(e,1,t):[]},jn.take=function(e,t,n){return e&&e.length?Xi(e,0,(t=n||t===r?1:fa(t))<0?0:t):[]},jn.takeRight=function(e,t,n){var i=null==e?0:e.length;return i?Xi(e,(t=i-(t=n||t===r?1:fa(t)))<0?0:t,i):[]},jn.takeRightWhile=function(e,t){return e&&e.length?lr(e,rs(t,3),!1,!0):[]},jn.takeWhile=function(e,t){return e&&e.length?lr(e,rs(t,3)):[]},jn.tap=function(e,t){return t(e),e},jn.throttle=function(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new Ce(s);return Xo(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),Lo(e,t,{leading:i,maxWait:t,trailing:r})},jn.thru=ho,jn.toArray=da,jn.toPairs=ja,jn.toPairsIn=Fa,jn.toPath=function(e){return Wo(e)?xt(e,Ps):aa(e)?[e]:xr(Is(ga(e)))},jn.toPlainObject=ba,jn.transform=function(e,t,n){var i=Wo(e),r=i||Go(e)||ca(e);if(t=rs(t,4),null==n){var s=e&&e.constructor;n=r?i?new s:[]:Xo(e)&&Qo(s)?Fn(Ue(e)):{}}return(r?yt:gi)(e,(function(e,i,r){return t(n,e,i,r)})),n},jn.unary=function(e){return Do(e,1)},jn.union=Xs,jn.unionBy=eo,jn.unionWith=to,jn.uniq=function(e){return e&&e.length?or(e):[]},jn.uniqBy=function(e,t){return e&&e.length?or(e,rs(t,2)):[]},jn.uniqWith=function(e,t){return t="function"==typeof t?t:r,e&&e.length?or(e,r,t):[]},jn.unset=function(e,t){return null==e||ar(e,t)},jn.unzip=no,jn.unzipWith=io,jn.update=function(e,t,n){return null==e?e:cr(e,t,pr(n))},jn.updateWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:cr(e,t,pr(n),i)},jn.values=Ya,jn.valuesIn=function(e){return null==e?[]:Wt(e,Ra(e))},jn.without=ro,jn.words=Qa,jn.wrap=function(e,t){return No(pr(t),e)},jn.xor=so,jn.xorBy=oo,jn.xorWith=ao,jn.zip=co,jn.zipObject=function(e,t){return hr(e||[],t||[],Zn)},jn.zipObjectDeep=function(e,t){return hr(e||[],t||[],Ji)},jn.zipWith=lo,jn.entries=ja,jn.entriesIn=Fa,jn.extend=ya,jn.extendWith=va,oc(jn,jn),jn.add=gc,jn.attempt=Ka,jn.camelCase=za,jn.capitalize=$a,jn.ceil=_c,jn.clamp=function(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=(n=ma(n))==n?n:0),t!==r&&(t=(t=ma(t))==t?t:0),ri(ma(e),t,n)},jn.clone=function(e){return si(e,4)},jn.cloneDeep=function(e){return si(e,5)},jn.cloneDeepWith=function(e,t){return si(e,5,t="function"==typeof t?t:r)},jn.cloneWith=function(e,t){return si(e,4,t="function"==typeof t?t:r)},jn.conformsTo=function(e,t){return null==t||oi(e,t,La(t))},jn.deburr=Ha,jn.defaultTo=function(e,t){return null==e||e!=e?t:e},jn.divide=yc,jn.endsWith=function(e,t,n){e=ga(e),t=sr(t);var i=e.length,s=n=n===r?i:ri(fa(n),0,i);return(n-=t.length)>=0&&e.slice(n,s)==t},jn.eq=Yo,jn.escape=function(e){return(e=ga(e))&&q.test(e)?e.replace(U,Jt):e},jn.escapeRegExp=function(e){return(e=ga(e))&&ne.test(e)?e.replace(te,"\\$&"):e},jn.every=function(e,t,n){var i=Wo(e)?wt:di;return n&&ms(e,t,n)&&(t=r),i(e,rs(t,3))},jn.find=mo,jn.findIndex=$s,jn.findKey=function(e,t){return Rt(e,rs(t,3),gi)},jn.findLast=bo,jn.findLastIndex=Hs,jn.findLastKey=function(e,t){return Rt(e,rs(t,3),_i)},jn.floor=vc,jn.forEach=go,jn.forEachRight=_o,jn.forIn=function(e,t){return null==e?e:mi(e,rs(t,3),Ra)},jn.forInRight=function(e,t){return null==e?e:bi(e,rs(t,3),Ra)},jn.forOwn=function(e,t){return e&&gi(e,rs(t,3))},jn.forOwnRight=function(e,t){return e&&_i(e,rs(t,3))},jn.get=xa,jn.gt=zo,jn.gte=$o,jn.has=function(e,t){return null!=e&&ds(e,t,ki)},jn.hasIn=Da,jn.head=Vs,jn.identity=nc,jn.includes=function(e,t,n,i){e=Bo(e)?e:Ya(e),n=n&&!i?fa(n):0;var r=e.length;return n<0&&(n=mn(r+n,0)),oa(e)?n<=r&&e.indexOf(t,n)>-1:!!r&&At(e,t,n)>-1},jn.indexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=null==n?0:fa(n);return r<0&&(r=mn(i+r,0)),At(e,t,r)},jn.inRange=function(e,t,n){return t=ha(t),n===r?(n=t,t=0):n=ha(n),function(e,t,n){return e>=bn(t,n)&&e<mn(t,n)}(e=ma(e),t,n)},jn.invoke=Oa,jn.isArguments=Ho,jn.isArray=Wo,jn.isArrayBuffer=Vo,jn.isArrayLike=Bo,jn.isArrayLikeObject=Uo,jn.isBoolean=function(e){return!0===e||!1===e||ea(e)&&Si(e)==g},jn.isBuffer=Go,jn.isDate=qo,jn.isElement=function(e){return ea(e)&&1===e.nodeType&&!ia(e)},jn.isEmpty=function(e){if(null==e)return!0;if(Bo(e)&&(Wo(e)||"string"==typeof e||"function"==typeof e.splice||Go(e)||ca(e)||Ho(e)))return!e.length;var t=us(e);if(t==S||t==T)return!e.size;if(ys(e))return!Ai(e).length;for(var n in e)if(Ae.call(e,n))return!1;return!0},jn.isEqual=function(e,t){return Oi(e,t)},jn.isEqualWith=function(e,t,n){var i=(n="function"==typeof n?n:r)?n(e,t):r;return i===r?Oi(e,t,r,n):!!i},jn.isError=Jo,jn.isFinite=function(e){return"number"==typeof e&&hn(e)},jn.isFunction=Qo,jn.isInteger=Ko,jn.isLength=Zo,jn.isMap=ta,jn.isMatch=function(e,t){return e===t||Li(e,t,os(t))},jn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:r,Li(e,t,os(t),n)},jn.isNaN=function(e){return na(e)&&e!=+e},jn.isNative=function(e){if(_s(e))throw new Se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ri(e)},jn.isNil=function(e){return null==e},jn.isNull=function(e){return null===e},jn.isNumber=na,jn.isObject=Xo,jn.isObjectLike=ea,jn.isPlainObject=ia,jn.isRegExp=ra,jn.isSafeInteger=function(e){return Ko(e)&&e>=-9007199254740991&&e<=d},jn.isSet=sa,jn.isString=oa,jn.isSymbol=aa,jn.isTypedArray=ca,jn.isUndefined=function(e){return e===r},jn.isWeakMap=function(e){return ea(e)&&us(e)==L},jn.isWeakSet=function(e){return ea(e)&&"[object WeakSet]"==Si(e)},jn.join=function(e,t){return null==e?"":fn.call(e,t)},jn.kebabCase=Wa,jn.last=qs,jn.lastIndexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var s=i;return n!==r&&(s=(s=fa(n))<0?mn(i+s,0):bn(s,i-1)),t==t?function(e,t,n){for(var i=n+1;i--;)if(e[i]===t)return i;return i}(e,t,s):Et(e,Pt,s,!0)},jn.lowerCase=Va,jn.lowerFirst=Ba,jn.lt=la,jn.lte=ua,jn.max=function(e){return e&&e.length?hi(e,nc,Mi):r},jn.maxBy=function(e,t){return e&&e.length?hi(e,rs(t,2),Mi):r},jn.mean=function(e){return Nt(e,nc)},jn.meanBy=function(e,t){return Nt(e,rs(t,2))},jn.min=function(e){return e&&e.length?hi(e,nc,Ii):r},jn.minBy=function(e,t){return e&&e.length?hi(e,rs(t,2),Ii):r},jn.stubArray=pc,jn.stubFalse=mc,jn.stubObject=function(){return{}},jn.stubString=function(){return""},jn.stubTrue=function(){return!0},jn.multiply=wc,jn.nth=function(e,t){return e&&e.length?Yi(e,fa(t)):r},jn.noConflict=function(){return st._===this&&(st._=Fe),this},jn.noop=ac,jn.now=xo,jn.pad=function(e,t,n){e=ga(e);var i=(t=fa(t))?rn(e):0;if(!t||i>=t)return e;var r=(t-i)/2;return zr(ln(r),n)+e+zr(cn(r),n)},jn.padEnd=function(e,t,n){e=ga(e);var i=(t=fa(t))?rn(e):0;return t&&i<t?e+zr(t-i,n):e},jn.padStart=function(e,t,n){e=ga(e);var i=(t=fa(t))?rn(e):0;return t&&i<t?zr(t-i,n)+e:e},jn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),_n(ga(e).replace(re,""),t||0)},jn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&ms(e,t,n)&&(t=n=r),n===r&&("boolean"==typeof t?(n=t,t=r):"boolean"==typeof e&&(n=e,e=r)),e===r&&t===r?(e=0,t=1):(e=ha(e),t===r?(t=e,e=0):t=ha(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var s=yn();return bn(e+s*(t-e+tt("1e-"+((s+"").length-1))),t)}return Vi(e,t)},jn.reduce=function(e,t,n){var i=Wo(e)?Tt:Yt,r=arguments.length<3;return i(e,rs(t,4),n,r,li)},jn.reduceRight=function(e,t,n){var i=Wo(e)?Ct:Yt,r=arguments.length<3;return i(e,rs(t,4),n,r,ui)},jn.repeat=function(e,t,n){return t=(n?ms(e,t,n):t===r)?1:fa(t),Bi(ga(e),t)},jn.replace=function(){var e=arguments,t=ga(e[0]);return e.length<3?t:t.replace(e[1],e[2])},jn.result=function(e,t,n){var i=-1,s=(t=mr(t,e)).length;for(s||(s=1,e=r);++i<s;){var o=null==e?r:e[Ps(t[i])];o===r&&(i=s,o=n),e=Qo(o)?o.call(e):o}return e},jn.round=Sc,jn.runInContext=e,jn.sample=function(e){return(Wo(e)?qn:Gi)(e)},jn.size=function(e){if(null==e)return 0;if(Bo(e))return oa(e)?rn(e):e.length;var t=us(e);return t==S||t==T?e.size:Ai(e).length},jn.snakeCase=Ua,jn.some=function(e,t,n){var i=Wo(e)?Ot:er;return n&&ms(e,t,n)&&(t=r),i(e,rs(t,3))},jn.sortedIndex=function(e,t){return tr(e,t)},jn.sortedIndexBy=function(e,t,n){return nr(e,t,rs(n,2))},jn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var i=tr(e,t);if(i<n&&Yo(e[i],t))return i}return-1},jn.sortedLastIndex=function(e,t){return tr(e,t,!0)},jn.sortedLastIndexBy=function(e,t,n){return nr(e,t,rs(n,2),!0)},jn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=tr(e,t,!0)-1;if(Yo(e[n],t))return n}return-1},jn.startCase=Ga,jn.startsWith=function(e,t,n){return e=ga(e),n=null==n?0:ri(fa(n),0,e.length),t=sr(t),e.slice(n,n+t.length)==t},jn.subtract=Mc,jn.sum=function(e){return e&&e.length?zt(e,nc):0},jn.sumBy=function(e,t){return e&&e.length?zt(e,rs(t,2)):0},jn.template=function(e,t,n){var i=jn.templateSettings;n&&ms(e,t,n)&&(t=r),e=ga(e),t=va({},t,i,qr);var s,o,a=va({},t.imports,i.imports,qr),c=La(a),l=Wt(a,c),u=0,d=t.interpolate||ye,h="__p += '",f=De((t.escape||ye).source+"|"+d.source+"|"+(d===K?de:ye).source+"|"+(t.evaluate||ye).source+"|$","g"),p="//# sourceURL="+(Ae.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ke+"]")+"\n";e.replace(f,(function(t,n,i,r,a,c){return i||(i=r),h+=e.slice(u,c).replace(ve,Qt),n&&(s=!0,h+="' +\n__e("+n+") +\n'"),a&&(o=!0,h+="';\n"+a+";\n__p += '"),i&&(h+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),u=c+t.length,t})),h+="';\n";var m=Ae.call(t,"variable")&&t.variable;m||(h="with (obj) {\n"+h+"\n}\n"),h=(o?h.replace(H,""):h).replace(W,"$1").replace(V,"$1;"),h="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var b=Ka((function(){return Me(c,p+"return "+h).apply(r,l)}));if(b.source=h,Jo(b))throw b;return b},jn.times=function(e,t){if((e=fa(e))<1||e>d)return[];var n=f,i=bn(e,f);t=rs(t),e-=f;for(var r=$t(i,t);++n<e;)t(n);return r},jn.toFinite=ha,jn.toInteger=fa,jn.toLength=pa,jn.toLower=function(e){return ga(e).toLowerCase()},jn.toNumber=ma,jn.toSafeInteger=function(e){return e?ri(fa(e),-9007199254740991,d):0===e?e:0},jn.toString=ga,jn.toUpper=function(e){return ga(e).toUpperCase()},jn.trim=function(e,t,n){if((e=ga(e))&&(n||t===r))return e.replace(ie,"");if(!e||!(t=sr(t)))return e;var i=sn(e),s=sn(t);return gr(i,Bt(i,s),Ut(i,s)+1).join("")},jn.trimEnd=function(e,t,n){if((e=ga(e))&&(n||t===r))return e.replace(se,"");if(!e||!(t=sr(t)))return e;var i=sn(e);return gr(i,0,Ut(i,sn(t))+1).join("")},jn.trimStart=function(e,t,n){if((e=ga(e))&&(n||t===r))return e.replace(re,"");if(!e||!(t=sr(t)))return e;var i=sn(e);return gr(i,Bt(i,sn(t))).join("")},jn.truncate=function(e,t){var n=30,i="...";if(Xo(t)){var s="separator"in t?t.separator:s;n="length"in t?fa(t.length):n,i="omission"in t?sr(t.omission):i}var o=(e=ga(e)).length;if(Kt(e)){var a=sn(e);o=a.length}if(n>=o)return e;var c=n-rn(i);if(c<1)return i;var l=a?gr(a,0,c).join(""):e.slice(0,c);if(s===r)return l+i;if(a&&(c+=l.length-c),ra(s)){if(e.slice(c).search(s)){var u,d=l;for(s.global||(s=De(s.source,ga(he.exec(s))+"g")),s.lastIndex=0;u=s.exec(d);)var h=u.index;l=l.slice(0,h===r?c:h)}}else if(e.indexOf(sr(s),c)!=c){var f=l.lastIndexOf(s);f>-1&&(l=l.slice(0,f))}return l+i},jn.unescape=function(e){return(e=ga(e))&&G.test(e)?e.replace(B,on):e},jn.uniqueId=function(e){var t=++Ie;return ga(e)+t},jn.upperCase=qa,jn.upperFirst=Ja,jn.each=go,jn.eachRight=_o,jn.first=Vs,oc(jn,(bc={},gi(jn,(function(e,t){Ae.call(jn.prototype,t)||(bc[t]=e)})),bc),{chain:!1}),jn.VERSION="4.17.20",yt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){jn[e].placeholder=jn})),yt(["drop","take"],(function(e,t){$n.prototype[e]=function(n){n=n===r?1:mn(fa(n),0);var i=this.__filtered__&&!t?new $n(this):this.clone();return i.__filtered__?i.__takeCount__=bn(n,i.__takeCount__):i.__views__.push({size:bn(n,f),type:e+(i.__dir__<0?"Right":"")}),i},$n.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),yt(["filter","map","takeWhile"],(function(e,t){var n=t+1,i=1==n||3==n;$n.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:rs(e,3),type:n}),t.__filtered__=t.__filtered__||i,t}})),yt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");$n.prototype[e]=function(){return this[n](1).value()[0]}})),yt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");$n.prototype[e]=function(){return this.__filtered__?new $n(this):this[n](1)}})),$n.prototype.compact=function(){return this.filter(nc)},$n.prototype.find=function(e){return this.filter(e).head()},$n.prototype.findLast=function(e){return this.reverse().find(e)},$n.prototype.invokeMap=Ui((function(e,t){return"function"==typeof e?new $n(this):this.map((function(n){return Ti(n,e,t)}))})),$n.prototype.reject=function(e){return this.filter(Io(rs(e)))},$n.prototype.slice=function(e,t){e=fa(e);var n=this;return n.__filtered__&&(e>0||t<0)?new $n(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(n=(t=fa(t))<0?n.dropRight(-t):n.take(t-e)),n)},$n.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},$n.prototype.toArray=function(){return this.take(f)},gi($n.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),s=jn[i?"take"+("last"==t?"Right":""):t],o=i||/^find/.test(t);s&&(jn.prototype[t]=function(){var t=this.__wrapped__,a=i?[1]:arguments,c=t instanceof $n,l=a[0],u=c||Wo(t),d=function(e){var t=s.apply(jn,Dt([e],a));return i&&h?t[0]:t};u&&n&&"function"==typeof l&&1!=l.length&&(c=u=!1);var h=this.__chain__,f=!!this.__actions__.length,p=o&&!h,m=c&&!f;if(!o&&u){t=m?t:new $n(this);var b=e.apply(t,a);return b.__actions__.push({func:ho,args:[d],thisArg:r}),new zn(b,h)}return p&&m?e.apply(this,a):(b=this.thru(d),p?i?b.value()[0]:b.value():b)})})),yt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Oe[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);jn.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var r=this.value();return t.apply(Wo(r)?r:[],e)}return this[n]((function(n){return t.apply(Wo(n)?n:[],e)}))}})),gi($n.prototype,(function(e,t){var n=jn[t];if(n){var i=n.name+"";Ae.call(Cn,i)||(Cn[i]=[]),Cn[i].push({name:t,func:n})}})),Cn[Nr(r,2).name]=[{name:"wrapper",func:r}],$n.prototype.clone=function(){var e=new $n(this.__wrapped__);return e.__actions__=xr(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=xr(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=xr(this.__views__),e},$n.prototype.reverse=function(){if(this.__filtered__){var e=new $n(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},$n.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Wo(e),i=t<0,r=n?e.length:0,s=function(e,t,n){for(var i=-1,r=n.length;++i<r;){var s=n[i],o=s.size;switch(s.type){case"drop":e+=o;break;case"dropRight":t-=o;break;case"take":t=bn(t,e+o);break;case"takeRight":e=mn(e,t-o)}}return{start:e,end:t}}(0,r,this.__views__),o=s.start,a=s.end,c=a-o,l=i?a:o-1,u=this.__iteratees__,d=u.length,h=0,f=bn(c,this.__takeCount__);if(!n||!i&&r==c&&f==c)return ur(e,this.__actions__);var p=[];e:for(;c--&&h<f;){for(var m=-1,b=e[l+=t];++m<d;){var g=u[m],_=g.type,y=(0,g.iteratee)(b);if(2==_)b=y;else if(!y){if(1==_)continue e;break e}}p[h++]=b}return p},jn.prototype.at=fo,jn.prototype.chain=function(){return uo(this)},jn.prototype.commit=function(){return new zn(this.value(),this.__chain__)},jn.prototype.next=function(){this.__values__===r&&(this.__values__=da(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?r:this.__values__[this.__index__++]}},jn.prototype.plant=function(e){for(var t,n=this;n instanceof Yn;){var i=js(n);i.__index__=0,i.__values__=r,t?s.__wrapped__=i:t=i;var s=i;n=n.__wrapped__}return s.__wrapped__=e,t},jn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof $n){var t=e;return this.__actions__.length&&(t=new $n(this)),(t=t.reverse()).__actions__.push({func:ho,args:[Zs],thisArg:r}),new zn(t,this.__chain__)}return this.thru(Zs)},jn.prototype.toJSON=jn.prototype.valueOf=jn.prototype.value=function(){return ur(this.__wrapped__,this.__actions__)},jn.prototype.first=jn.prototype.head,ot&&(jn.prototype[ot]=function(){return this}),jn}();st._=an,(i=(function(){return an}).call(t,n,t,e))===r||(e.exports=i)}).call(this)}).call(this,n("YuTi")(e))},MAOJ:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var i=n("wd/R"),r=n.n(i),s=n("8Y7J"),o=n("G0yt"),a=n("s7LF"),c=n("SVse");function l(e,t){if(1&e){const e=s.Tb();s.Sb(0,"div",0),s.Sb(1,"ngb-timepicker",4),s.gc("ngModelChange",(function(t){return s.Dc(e),s.ic().time=t}))("ngModelChange",(function(){return s.Dc(e),s.ic().onModelChange()})),s.Rb(),s.Rb()}if(2&e){const e=s.ic();s.yb(1),s.pc("seconds",e.hasSeconds)("ngModel",e.time)}}let u=(()=>{class e{constructor(e){this.calendar=e,this.hasSeconds=!0,this.hasTime=!0}ngOnInit(){var e;this.minDate=this.calendar.getToday(),this.format=this.hasTime?this.hasSeconds?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD HH:mm":"YYYY-MM-DD";let t=r()(null===(e=this.control)||void 0===e?void 0:e.value,this.format);t.isValid()&&!t.isBefore(r()())||(t=r()()),this.date={year:t.year(),month:t.month()+1,day:t.date()},this.time={hour:t.hour(),minute:t.minute(),second:t.second()},this.onModelChange()}onModelChange(){if(this.date){const e=Object.assign({},this.date,this.time);e.month--,setTimeout(()=>{this.control.setValue(r()(e).format(this.format))})}else setTimeout(()=>{this.control.setValue("")})}}return e.\u0275fac=function(t){return new(t||e)(s.Mb(o.d))},e.\u0275cmp=s.Gb({type:e,selectors:[["cd-date-time-picker"]],inputs:{control:"control",hasSeconds:"hasSeconds",hasTime:"hasTime"},decls:4,vars:3,consts:[[1,"d-flex","justify-content-center"],[3,"ngModel","minDate","ngModelChange"],["dp",""],["class","d-flex justify-content-center",4,"ngIf"],[3,"seconds","ngModel","ngModelChange"]],template:function(e,t){1&e&&(s.Sb(0,"div",0),s.Sb(1,"ngb-datepicker",1,2),s.gc("ngModelChange",(function(e){return t.date=e}))("ngModelChange",(function(){return t.onModelChange()})),s.Rb(),s.Rb(),s.Mc(3,l,2,2,"div",3)),2&e&&(s.yb(1),s.pc("ngModel",t.date)("minDate",t.minDate),s.yb(2),s.pc("ngIf",t.hasTime))},directives:[o.g,a.q,a.t,c.r,o.B],styles:[""]}),e})()},"MO+k":function(e,t,n){e.exports=function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var t={rgb2hsl:n,rgb2hsv:i,rgb2hwb:s,rgb2cmyk:o,rgb2keyword:a,rgb2xyz:c,rgb2lab:l,rgb2lch:function(e){return y(l(e))},hsl2rgb:u,hsl2hsv:function(e){var t=e[1]/100,n=e[2]/100;return 0===n?[0,0,0]:[e[0],2*(t*=(n*=2)<=1?n:2-n)/(n+t)*100,(n+t)/2*100]},hsl2hwb:function(e){return s(u(e))},hsl2cmyk:function(e){return o(u(e))},hsl2keyword:function(e){return a(u(e))},hsv2rgb:d,hsv2hsl:function(e){var t,n,i=e[1]/100,r=e[2]/100;return t=i*r,[e[0],100*(t=(t/=(n=(2-i)*r)<=1?n:2-n)||0),100*(n/=2)]},hsv2hwb:function(e){return s(d(e))},hsv2cmyk:function(e){return o(d(e))},hsv2keyword:function(e){return a(d(e))},hwb2rgb:h,hwb2hsl:function(e){return n(h(e))},hwb2hsv:function(e){return i(h(e))},hwb2cmyk:function(e){return o(h(e))},hwb2keyword:function(e){return a(h(e))},cmyk2rgb:f,cmyk2hsl:function(e){return n(f(e))},cmyk2hsv:function(e){return i(f(e))},cmyk2hwb:function(e){return s(f(e))},cmyk2keyword:function(e){return a(f(e))},keyword2rgb:S,keyword2hsl:function(e){return n(S(e))},keyword2hsv:function(e){return i(S(e))},keyword2hwb:function(e){return s(S(e))},keyword2cmyk:function(e){return o(S(e))},keyword2lab:function(e){return l(S(e))},keyword2xyz:function(e){return c(S(e))},xyz2rgb:p,xyz2lab:m,xyz2lch:function(e){return y(m(e))},lab2xyz:_,lab2rgb:v,lab2lch:y,lch2lab:w,lch2xyz:function(e){return _(w(e))},lch2rgb:function(e){return v(w(e))}};function n(e){var t,n,i=e[0]/255,r=e[1]/255,s=e[2]/255,o=Math.min(i,r,s),a=Math.max(i,r,s),c=a-o;return a==o?t=0:i==a?t=(r-s)/c:r==a?t=2+(s-i)/c:s==a&&(t=4+(i-r)/c),(t=Math.min(60*t,360))<0&&(t+=360),n=(o+a)/2,[t,100*(a==o?0:n<=.5?c/(a+o):c/(2-a-o)),100*n]}function i(e){var t,n,i=e[0],r=e[1],s=e[2],o=Math.min(i,r,s),a=Math.max(i,r,s),c=a-o;return n=0==a?0:c/a*1e3/10,a==o?t=0:i==a?t=(r-s)/c:r==a?t=2+(s-i)/c:s==a&&(t=4+(i-r)/c),(t=Math.min(60*t,360))<0&&(t+=360),[t,n,a/255*1e3/10]}function s(e){var t=e[0],i=e[1],r=e[2];return[n(e)[0],1/255*Math.min(t,Math.min(i,r))*100,100*(r=1-1/255*Math.max(t,Math.max(i,r)))]}function o(e){var t,n=e[0]/255,i=e[1]/255,r=e[2]/255;return[100*((1-n-(t=Math.min(1-n,1-i,1-r)))/(1-t)||0),100*((1-i-t)/(1-t)||0),100*((1-r-t)/(1-t)||0),100*t]}function a(e){return k[JSON.stringify(e)]}function c(e){var t=e[0]/255,n=e[1]/255,i=e[2]/255;return[100*(.4124*(t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)),100*(.2126*t+.7152*n+.0722*i),100*(.0193*t+.1192*n+.9505*i)]}function l(e){var t=c(e),n=t[0],i=t[1],r=t[2];return i/=100,r/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(n-i),200*(i-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]}function u(e){var t,n,i,r,s,o=e[0]/360,a=e[1]/100,c=e[2]/100;if(0==a)return[s=255*c,s,s];t=2*c-(n=c<.5?c*(1+a):c+a-c*a),r=[0,0,0];for(var l=0;l<3;l++)(i=o+1/3*-(l-1))<0&&i++,i>1&&i--,r[l]=255*(s=6*i<1?t+6*(n-t)*i:2*i<1?n:3*i<2?t+(n-t)*(2/3-i)*6:t);return r}function d(e){var t=e[0]/60,n=e[1]/100,i=e[2]/100,r=Math.floor(t)%6,s=t-Math.floor(t),o=255*i*(1-n),a=255*i*(1-n*s),c=255*i*(1-n*(1-s));switch(i*=255,r){case 0:return[i,c,o];case 1:return[a,i,o];case 2:return[o,i,c];case 3:return[o,a,i];case 4:return[c,o,i];case 5:return[i,o,a]}}function h(e){var t,n,i,s,o=e[0]/360,a=e[1]/100,c=e[2]/100,l=a+c;switch(l>1&&(a/=l,c/=l),i=6*o-(t=Math.floor(6*o)),0!=(1&t)&&(i=1-i),s=a+i*((n=1-c)-a),t){default:case 6:case 0:r=n,g=s,b=a;break;case 1:r=s,g=n,b=a;break;case 2:r=a,g=n,b=s;break;case 3:r=a,g=s,b=n;break;case 4:r=s,g=a,b=n;break;case 5:r=n,g=a,b=s}return[255*r,255*g,255*b]}function f(e){var t=e[1]/100,n=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,e[0]/100*(1-i)+i)),255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i))]}function p(e){var t,n,i,r=e[0]/100,s=e[1]/100,o=e[2]/100;return n=-.9689*r+1.8758*s+.0415*o,i=.0557*r+-.204*s+1.057*o,t=(t=3.2406*r+-1.5372*s+-.4986*o)>.0031308?1.055*Math.pow(t,1/2.4)-.055:t*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(i=Math.min(Math.max(0,i),1))]}function m(e){var t=e[0],n=e[1],i=e[2];return n/=100,i/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]}function _(e){var t,n,i,r,s=e[0],o=e[1],a=e[2];return s<=8?r=(n=100*s/903.3)/100*7.787+16/116:(n=100*Math.pow((s+16)/116,3),r=Math.pow(n/100,1/3)),[t=t/95.047<=.008856?t=95.047*(o/500+r-16/116)/7.787:95.047*Math.pow(o/500+r,3),n,i=i/108.883<=.008859?i=108.883*(r-a/200-16/116)/7.787:108.883*Math.pow(r-a/200,3)]}function y(e){var t,n=e[0],i=e[1],r=e[2];return(t=360*Math.atan2(r,i)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(i*i+r*r),t]}function v(e){return p(_(e))}function w(e){var t,n=e[1];return t=e[2]/360*2*Math.PI,[e[0],n*Math.cos(t),n*Math.sin(t)]}function S(e){return M[e]}var M={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},k={};for(var x in M)k[JSON.stringify(M[x])]=x;var D=function(){return new R};for(var T in t){D[T+"Raw"]=function(e){return function(n){return"number"==typeof n&&(n=Array.prototype.slice.call(arguments)),t[e](n)}}(T);var C=/(\w+)2(\w+)/.exec(T),O=C[1],L=C[2];(D[O]=D[O]||{})[L]=D[T]=function(e){return function(n){"number"==typeof n&&(n=Array.prototype.slice.call(arguments));var i=t[e](n);if("string"==typeof i||void 0===i)return i;for(var r=0;r<i.length;r++)i[r]=Math.round(i[r]);return i}}(T)}var R=function(){this.convs={}};R.prototype.routeSpace=function(e,t){var n=t[0];return void 0===n?this.getValues(e):("number"==typeof n&&(n=Array.prototype.slice.call(t)),this.setValues(e,n))},R.prototype.setValues=function(e,t){return this.space=e,this.convs={},this.convs[e]=t,this},R.prototype.getValues=function(e){var t=this.convs[e];if(!t){var n=this.space;t=D[n][e](this.convs[n]),this.convs[e]=t}return t},["rgb","hsl","hsv","cmyk","keyword"].forEach((function(e){R.prototype[e]=function(t){return this.routeSpace(e,arguments)}}));var E=D,A={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},I={getRgba:P,getHsla:N,getRgb:function(e){var t=P(e);return t&&t.slice(0,3)},getHsl:function(e){var t=N(e);return t&&t.slice(0,3)},getHwb:j,getAlpha:function(e){var t=P(e);return t||(t=N(e))||(t=j(e))?t[3]:void 0},hexString:function(e,t){return t=void 0!==t&&3===e.length?t:e[3],"#"+H(e[0])+H(e[1])+H(e[2])+(t>=0&&t<1?H(Math.round(255*t)):"")},rgbString:function(e,t){return t<1||e[3]&&e[3]<1?F(e,t):"rgb("+e[0]+", "+e[1]+", "+e[2]+")"},rgbaString:F,percentString:function(e,t){return t<1||e[3]&&e[3]<1?Y(e,t):"rgb("+Math.round(e[0]/255*100)+"%, "+Math.round(e[1]/255*100)+"%, "+Math.round(e[2]/255*100)+"%)"},percentaString:Y,hslString:function(e,t){return t<1||e[3]&&e[3]<1?z(e,t):"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)"},hslaString:z,hwbString:function(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+(void 0!==t&&1!==t?", "+t:"")+")"},keyword:function(e){return W[e.slice(0,3)]}};function P(e){if(e){var t=[0,0,0],n=1,i=e.match(/^#([a-fA-F0-9]{3,4})$/i),r="";if(i){r=(i=i[1])[3];for(var s=0;s<t.length;s++)t[s]=parseInt(i[s]+i[s],16);r&&(n=Math.round(parseInt(r+r,16)/255*100)/100)}else if(i=e.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){for(r=i[2],i=i[1],s=0;s<t.length;s++)t[s]=parseInt(i.slice(2*s,2*s+2),16);r&&(n=Math.round(parseInt(r,16)/255*100)/100)}else if(i=e.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(s=0;s<t.length;s++)t[s]=parseInt(i[s+1]);n=parseFloat(i[4])}else if(i=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(s=0;s<t.length;s++)t[s]=Math.round(2.55*parseFloat(i[s+1]));n=parseFloat(i[4])}else if(i=e.match(/(\w+)/)){if("transparent"==i[1])return[0,0,0,0];if(!(t=A[i[1]]))return}for(s=0;s<t.length;s++)t[s]=$(t[s],0,255);return n=n||0==n?$(n,0,1):1,t[3]=n,t}}function N(e){if(e){var t=e.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(t){var n=parseFloat(t[4]);return[$(parseInt(t[1]),0,360),$(parseFloat(t[2]),0,100),$(parseFloat(t[3]),0,100),$(isNaN(n)?1:n,0,1)]}}}function j(e){if(e){var t=e.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(t){var n=parseFloat(t[4]);return[$(parseInt(t[1]),0,360),$(parseFloat(t[2]),0,100),$(parseFloat(t[3]),0,100),$(isNaN(n)?1:n,0,1)]}}}function F(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+t+")"}function Y(e,t){return"rgba("+Math.round(e[0]/255*100)+"%, "+Math.round(e[1]/255*100)+"%, "+Math.round(e[2]/255*100)+"%, "+(t||e[3]||1)+")"}function z(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+t+")"}function $(e,t,n){return Math.min(Math.max(t,e),n)}function H(e){var t=e.toString(16).toUpperCase();return t.length<2?"0"+t:t}var W={};for(var V in A)W[A[V]]=V;var B=function(e){return e instanceof B?e:this instanceof B?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof e?(t=I.getRgba(e))?this.setValues("rgb",t):(t=I.getHsla(e))?this.setValues("hsl",t):(t=I.getHwb(e))&&this.setValues("hwb",t):"object"==typeof e&&(void 0!==(t=e).r||void 0!==t.red?this.setValues("rgb",t):void 0!==t.l||void 0!==t.lightness?this.setValues("hsl",t):void 0!==t.v||void 0!==t.value?this.setValues("hsv",t):void 0!==t.w||void 0!==t.whiteness?this.setValues("hwb",t):void 0===t.c&&void 0===t.cyan||this.setValues("cmyk",t)))):new B(e);var t};B.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var e=this.values;return 1!==e.alpha?e.hwb.concat([e.alpha]):e.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var e=this.values;return e.rgb.concat([e.alpha])},hslaArray:function(){var e=this.values;return e.hsl.concat([e.alpha])},alpha:function(e){return void 0===e?this.values.alpha:(this.setValues("alpha",e),this)},red:function(e){return this.setChannel("rgb",0,e)},green:function(e){return this.setChannel("rgb",1,e)},blue:function(e){return this.setChannel("rgb",2,e)},hue:function(e){return e&&(e=(e%=360)<0?360+e:e),this.setChannel("hsl",0,e)},saturation:function(e){return this.setChannel("hsl",1,e)},lightness:function(e){return this.setChannel("hsl",2,e)},saturationv:function(e){return this.setChannel("hsv",1,e)},whiteness:function(e){return this.setChannel("hwb",1,e)},blackness:function(e){return this.setChannel("hwb",2,e)},value:function(e){return this.setChannel("hsv",2,e)},cyan:function(e){return this.setChannel("cmyk",0,e)},magenta:function(e){return this.setChannel("cmyk",1,e)},yellow:function(e){return this.setChannel("cmyk",2,e)},black:function(e){return this.setChannel("cmyk",3,e)},hexString:function(){return I.hexString(this.values.rgb)},rgbString:function(){return I.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return I.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return I.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return I.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return I.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return I.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return I.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var e=this.values.rgb;return e[0]<<16|e[1]<<8|e[2]},luminosity:function(){for(var e=this.values.rgb,t=[],n=0;n<e.length;n++){var i=e[n]/255;t[n]=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast:function(e){var t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},dark:function(){var e=this.values.rgb;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var e=[],t=0;t<3;t++)e[t]=255-this.values.rgb[t];return this.setValues("rgb",e),this},lighten:function(e){var t=this.values.hsl;return t[2]+=t[2]*e,this.setValues("hsl",t),this},darken:function(e){var t=this.values.hsl;return t[2]-=t[2]*e,this.setValues("hsl",t),this},saturate:function(e){var t=this.values.hsl;return t[1]+=t[1]*e,this.setValues("hsl",t),this},desaturate:function(e){var t=this.values.hsl;return t[1]-=t[1]*e,this.setValues("hsl",t),this},whiten:function(e){var t=this.values.hwb;return t[1]+=t[1]*e,this.setValues("hwb",t),this},blacken:function(e){var t=this.values.hwb;return t[2]+=t[2]*e,this.setValues("hwb",t),this},greyscale:function(){var e=this.values.rgb,t=.3*e[0]+.59*e[1]+.11*e[2];return this.setValues("rgb",[t,t,t]),this},clearer:function(e){var t=this.values.alpha;return this.setValues("alpha",t-t*e),this},opaquer:function(e){var t=this.values.alpha;return this.setValues("alpha",t+t*e),this},rotate:function(e){var t=this.values.hsl,n=(t[0]+e)%360;return t[0]=n<0?360+n:n,this.setValues("hsl",t),this},mix:function(e,t){var n=this,i=e,r=void 0===t?.5:t,s=2*r-1,o=n.alpha()-i.alpha(),a=((s*o==-1?s:(s+o)/(1+s*o))+1)/2,c=1-a;return this.rgb(a*n.red()+c*i.red(),a*n.green()+c*i.green(),a*n.blue()+c*i.blue()).alpha(n.alpha()*r+i.alpha()*(1-r))},toJSON:function(){return this.rgb()},clone:function(){var e,t,n=new B,i=this.values,r=n.values;for(var s in i)i.hasOwnProperty(s)&&("[object Array]"===(t={}.toString.call(e=i[s]))?r[s]=e.slice(0):"[object Number]"===t?r[s]=e:console.error("unexpected color value:",e));return n}},B.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},B.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},B.prototype.getValues=function(e){for(var t=this.values,n={},i=0;i<e.length;i++)n[e.charAt(i)]=t[e][i];return 1!==t.alpha&&(n.a=t.alpha),n},B.prototype.setValues=function(e,t){var n,i,r=this.values,s=this.spaces,o=this.maxes,a=1;if(this.valid=!0,"alpha"===e)a=t;else if(t.length)r[e]=t.slice(0,e.length),a=t[e.length];else if(void 0!==t[e.charAt(0)]){for(n=0;n<e.length;n++)r[e][n]=t[e.charAt(n)];a=t.a}else if(void 0!==t[s[e][0]]){var c=s[e];for(n=0;n<e.length;n++)r[e][n]=t[c[n]];a=t.alpha}if(r.alpha=Math.max(0,Math.min(1,void 0===a?r.alpha:a)),"alpha"===e)return!1;for(n=0;n<e.length;n++)i=Math.max(0,Math.min(o[e][n],r[e][n])),r[e][n]=Math.round(i);for(var l in s)l!==e&&(r[l]=E[e][l](r[e]));return!0},B.prototype.setSpace=function(e,t){var n=t[0];return void 0===n?this.getValues(e):("number"==typeof n&&(n=Array.prototype.slice.call(t)),this.setValues(e,n),this)},B.prototype.setChannel=function(e,t,n){var i=this.values[e];return void 0===n?i[t]:(n===i[t]||(i[t]=n,this.setValues(e,i)),this)},"undefined"!=typeof window&&(window.Color=B);var U,G=B,q={noop:function(){},uid:(U=0,function(){return U++}),isNullOrUndef:function(e){return null==e},isArray:function(e){if(Array.isArray&&Array.isArray(e))return!0;var t=Object.prototype.toString.call(e);return"[object"===t.substr(0,7)&&"Array]"===t.substr(-6)},isObject:function(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)},isFinite:function(e){return("number"==typeof e||e instanceof Number)&&isFinite(e)},valueOrDefault:function(e,t){return void 0===e?t:e},valueAtIndexOrDefault:function(e,t,n){return q.valueOrDefault(q.isArray(e)?e[t]:e,n)},callback:function(e,t,n){if(e&&"function"==typeof e.call)return e.apply(n,t)},each:function(e,t,n,i){var r,s,o;if(q.isArray(e))if(s=e.length,i)for(r=s-1;r>=0;r--)t.call(n,e[r],r);else for(r=0;r<s;r++)t.call(n,e[r],r);else if(q.isObject(e))for(s=(o=Object.keys(e)).length,r=0;r<s;r++)t.call(n,e[o[r]],o[r])},arrayEquals:function(e,t){var n,i,r,s;if(!e||!t||e.length!==t.length)return!1;for(n=0,i=e.length;n<i;++n)if(s=t[n],(r=e[n])instanceof Array&&s instanceof Array){if(!q.arrayEquals(r,s))return!1}else if(r!==s)return!1;return!0},clone:function(e){if(q.isArray(e))return e.map(q.clone);if(q.isObject(e)){for(var t={},n=Object.keys(e),i=n.length,r=0;r<i;++r)t[n[r]]=q.clone(e[n[r]]);return t}return e},_merger:function(e,t,n,i){var r=t[e],s=n[e];q.isObject(r)&&q.isObject(s)?q.merge(r,s,i):t[e]=q.clone(s)},_mergerIf:function(e,t,n){var i=t[e],r=n[e];q.isObject(i)&&q.isObject(r)?q.mergeIf(i,r):t.hasOwnProperty(e)||(t[e]=q.clone(r))},merge:function(e,t,n){var i,r,s,o,a,c=q.isArray(t)?t:[t],l=c.length;if(!q.isObject(e))return e;for(i=(n=n||{}).merger||q._merger,r=0;r<l;++r)if(q.isObject(t=c[r]))for(a=0,o=(s=Object.keys(t)).length;a<o;++a)i(s[a],e,t,n);return e},mergeIf:function(e,t){return q.merge(e,t,{merger:q._mergerIf})},extend:function(e){for(var t=function(t,n){e[n]=t},n=1,i=arguments.length;n<i;++n)q.each(arguments[n],t);return e},inherits:function(e){var t=this,n=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return t.apply(this,arguments)},i=function(){this.constructor=n};return i.prototype=t.prototype,n.prototype=new i,n.extend=q.inherits,e&&q.extend(n.prototype,e),n.__super__=t.prototype,n}},J=q;q.callCallback=q.callback,q.indexOf=function(e,t,n){return Array.prototype.indexOf.call(e,t,n)},q.getValueOrDefault=q.valueOrDefault,q.getValueAtIndexOrDefault=q.valueAtIndexOrDefault;var Q={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return-e*(e-2)},easeInOutQuad:function(e){return(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1)},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return(e-=1)*e*e+1},easeInOutCubic:function(e){return(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return-((e-=1)*e*e*e-1)},easeInOutQuart:function(e){return(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return(e-=1)*e*e*e*e+1},easeInOutQuint:function(e){return(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},easeInSine:function(e){return 1-Math.cos(e*(Math.PI/2))},easeOutSine:function(e){return Math.sin(e*(Math.PI/2))},easeInOutSine:function(e){return-.5*(Math.cos(Math.PI*e)-1)},easeInExpo:function(e){return 0===e?0:Math.pow(2,10*(e-1))},easeOutExpo:function(e){return 1===e?1:1-Math.pow(2,-10*e)},easeInOutExpo:function(e){return 0===e?0:1===e?1:(e/=.5)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*--e))},easeInCirc:function(e){return e>=1?e:-(Math.sqrt(1-e*e)-1)},easeOutCirc:function(e){return Math.sqrt(1-(e-=1)*e)},easeInOutCirc:function(e){return(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},easeInElastic:function(e){var t=1.70158,n=0,i=1;return 0===e?0:1===e?1:(n||(n=.3),i<1?(i=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/i),-i*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n))},easeOutElastic:function(e){var t=1.70158,n=0,i=1;return 0===e?0:1===e?1:(n||(n=.3),i<1?(i=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/n)+1)},easeInOutElastic:function(e){var t=1.70158,n=0,i=1;return 0===e?0:2==(e/=.5)?1:(n||(n=.45),i<1?(i=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/i),e<1?i*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.5+1)},easeInBack:function(e){var t=1.70158;return e*e*((t+1)*e-t)},easeOutBack:function(e){var t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack:function(e){var t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:function(e){return 1-Q.easeOutBounce(1-e)},easeOutBounce:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:function(e){return e<.5?.5*Q.easeInBounce(2*e):.5*Q.easeOutBounce(2*e-1)+.5}},K={effects:Q};J.easingEffects=Q;var Z=Math.PI,X=Z/180,ee=2*Z,te=Z/2,ne=Z/4,ie=2*Z/3,re={clear:function(e){e.ctx.clearRect(0,0,e.width,e.height)},roundedRect:function(e,t,n,i,r,s){if(s){var o=Math.min(s,r/2,i/2),a=t+o,c=n+o,l=t+i-o,u=n+r-o;e.moveTo(t,c),a<l&&c<u?(e.arc(a,c,o,-Z,-te),e.arc(l,c,o,-te,0),e.arc(l,u,o,0,te),e.arc(a,u,o,te,Z)):a<l?(e.moveTo(a,n),e.arc(l,c,o,-te,te),e.arc(a,c,o,te,Z+te)):c<u?(e.arc(a,c,o,-Z,0),e.arc(a,u,o,0,Z)):e.arc(a,c,o,-Z,Z),e.closePath(),e.moveTo(t,n)}else e.rect(t,n,i,r)},drawPoint:function(e,t,n,i,r,s){var o,a,c,l,u,d=(s||0)*X;if(!t||"object"!=typeof t||"[object HTMLImageElement]"!==(o=t.toString())&&"[object HTMLCanvasElement]"!==o){if(!(isNaN(n)||n<=0)){switch(e.beginPath(),t){default:e.arc(i,r,n,0,ee),e.closePath();break;case"triangle":e.moveTo(i+Math.sin(d)*n,r-Math.cos(d)*n),d+=ie,e.lineTo(i+Math.sin(d)*n,r-Math.cos(d)*n),d+=ie,e.lineTo(i+Math.sin(d)*n,r-Math.cos(d)*n),e.closePath();break;case"rectRounded":l=n-(u=.516*n),a=Math.cos(d+ne)*l,c=Math.sin(d+ne)*l,e.arc(i-a,r-c,u,d-Z,d-te),e.arc(i+c,r-a,u,d-te,d),e.arc(i+a,r+c,u,d,d+te),e.arc(i-c,r+a,u,d+te,d+Z),e.closePath();break;case"rect":if(!s){l=Math.SQRT1_2*n,e.rect(i-l,r-l,2*l,2*l);break}d+=ne;case"rectRot":a=Math.cos(d)*n,c=Math.sin(d)*n,e.moveTo(i-a,r-c),e.lineTo(i+c,r-a),e.lineTo(i+a,r+c),e.lineTo(i-c,r+a),e.closePath();break;case"crossRot":d+=ne;case"cross":a=Math.cos(d)*n,c=Math.sin(d)*n,e.moveTo(i-a,r-c),e.lineTo(i+a,r+c),e.moveTo(i+c,r-a),e.lineTo(i-c,r+a);break;case"star":a=Math.cos(d)*n,c=Math.sin(d)*n,e.moveTo(i-a,r-c),e.lineTo(i+a,r+c),e.moveTo(i+c,r-a),e.lineTo(i-c,r+a),d+=ne,a=Math.cos(d)*n,c=Math.sin(d)*n,e.moveTo(i-a,r-c),e.lineTo(i+a,r+c),e.moveTo(i+c,r-a),e.lineTo(i-c,r+a);break;case"line":a=Math.cos(d)*n,c=Math.sin(d)*n,e.moveTo(i-a,r-c),e.lineTo(i+a,r+c);break;case"dash":e.moveTo(i,r),e.lineTo(i+Math.cos(d)*n,r+Math.sin(d)*n)}e.fill(),e.stroke()}}else e.drawImage(t,i-t.width/2,r-t.height/2,t.width,t.height)},_isPointInArea:function(e,t){var n=1e-6;return e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n},clipArea:function(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()},unclipArea:function(e){e.restore()},lineTo:function(e,t,n,i){var r=n.steppedLine;if(r){if("middle"===r){var s=(t.x+n.x)/2;e.lineTo(s,i?n.y:t.y),e.lineTo(s,i?t.y:n.y)}else"after"===r&&!i||"after"!==r&&i?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}else n.tension?e.bezierCurveTo(i?t.controlPointPreviousX:t.controlPointNextX,i?t.controlPointPreviousY:t.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):e.lineTo(n.x,n.y)}},se=re;J.clear=re.clear,J.drawRoundedRectangle=function(e){e.beginPath(),re.roundedRect.apply(re,arguments)};var oe={_set:function(e,t){return J.merge(this[e]||(this[e]={}),t)}};oe._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0});var ae=oe,ce=J.valueOrDefault,le={toLineHeight:function(e,t){var n=(""+e).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||"normal"===n[1])return 1.2*t;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100}return t*e},toPadding:function(e){var t,n,i,r;return J.isObject(e)?(t=+e.top||0,n=+e.right||0,i=+e.bottom||0,r=+e.left||0):t=n=i=r=+e||0,{top:t,right:n,bottom:i,left:r,height:t+i,width:r+n}},_parseFont:function(e){var t=ae.global,n=ce(e.fontSize,t.defaultFontSize),i={family:ce(e.fontFamily,t.defaultFontFamily),lineHeight:J.options.toLineHeight(ce(e.lineHeight,t.defaultLineHeight),n),size:n,style:ce(e.fontStyle,t.defaultFontStyle),weight:null,string:""};return i.string=function(e){return!e||J.isNullOrUndef(e.size)||J.isNullOrUndef(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}(i),i},resolve:function(e,t,n){var i,r,s;for(i=0,r=e.length;i<r;++i)if(void 0!==(s=e[i])&&(void 0!==t&&"function"==typeof s&&(s=s(t)),void 0!==n&&J.isArray(s)&&(s=s[n]),void 0!==s))return s}},ue=J,de=se,he=le;ue.easing=K,ue.canvas=de,ue.options=he;var fe=function(e){ue.extend(this,e),this.initialize.apply(this,arguments)};ue.extend(fe.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var e=this;return e._view||(e._view=ue.clone(e._model)),e._start={},e},transition:function(e){var t=this,n=t._model,i=t._start,r=t._view;return n&&1!==e?(r||(r=t._view={}),i||(i=t._start={}),function(e,t,n,i){var r,s,o,a,c,l,u,d,h,f=Object.keys(n);for(r=0,s=f.length;r<s;++r)if(l=n[o=f[r]],t.hasOwnProperty(o)||(t[o]=l),(a=t[o])!==l&&"_"!==o[0]){if(e.hasOwnProperty(o)||(e[o]=a),(u=typeof l)==typeof(c=e[o]))if("string"===u){if((d=G(c)).valid&&(h=G(l)).valid){t[o]=h.mix(d,i).rgbString();continue}}else if(ue.isFinite(c)&&ue.isFinite(l)){t[o]=c+(l-c)*i;continue}t[o]=l}}(i,r,n,e),t):(t._view=n,t._start=null,t)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return ue.isNumber(this._model.x)&&ue.isNumber(this._model.y)}}),fe.extend=ue.inherits;var pe=fe,me=pe.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),be=me;Object.defineProperty(me.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(me.prototype,"chartInstance",{get:function(){return this.chart},set:function(e){this.chart=e}}),ae._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:ue.noop,onComplete:ue.noop}});var ge={animations:[],request:null,addAnimation:function(e,t,n,i){var r,s,o=this.animations;for(t.chart=e,t.startTime=Date.now(),t.duration=n,i||(e.animating=!0),r=0,s=o.length;r<s;++r)if(o[r].chart===e)return void(o[r]=t);o.push(t),1===o.length&&this.requestAnimationFrame()},cancelAnimation:function(e){var t=ue.findIndex(this.animations,(function(t){return t.chart===e}));-1!==t&&(this.animations.splice(t,1),e.animating=!1)},requestAnimationFrame:function(){var e=this;null===e.request&&(e.request=ue.requestAnimFrame.call(window,(function(){e.request=null,e.startDigest()})))},startDigest:function(){var e=this;e.advance(),e.animations.length>0&&e.requestAnimationFrame()},advance:function(){for(var e,t,n,i,r=this.animations,s=0;s<r.length;)t=(e=r[s]).chart,n=e.numSteps,i=Math.floor((Date.now()-e.startTime)/e.duration*n)+1,e.currentStep=Math.min(i,n),ue.callback(e.render,[t,e],t),ue.callback(e.onAnimationProgress,[e],t),e.currentStep>=n?(ue.callback(e.onAnimationComplete,[e],t),t.animating=!1,r.splice(s,1)):++s}},_e=ue.options.resolve,ye=["push","pop","shift","splice","unshift"];function ve(e,t){var n=e._chartjs;if(n){var i=n.listeners,r=i.indexOf(t);-1!==r&&i.splice(r,1),i.length>0||(ye.forEach((function(t){delete e[t]})),delete e._chartjs)}}var we=function(e,t){this.initialize(e,t)};ue.extend(we.prototype,{datasetElementType:null,dataElementType:null,initialize:function(e,t){var n=this;n.chart=e,n.index=t,n.linkScales(),n.addElements()},updateIndex:function(e){this.index=e},linkScales:function(){var e=this,t=e.getMeta(),n=e.getDataset();null!==t.xAxisID&&t.xAxisID in e.chart.scales||(t.xAxisID=n.xAxisID||e.chart.options.scales.xAxes[0].id),null!==t.yAxisID&&t.yAxisID in e.chart.scales||(t.yAxisID=n.yAxisID||e.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(e){return this.chart.scales[e]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this.update(!0)},destroy:function(){this._data&&ve(this._data,this)},createMetaDataset:function(){var e=this,t=e.datasetElementType;return t&&new t({_chart:e.chart,_datasetIndex:e.index})},createMetaData:function(e){var t=this,n=t.dataElementType;return n&&new n({_chart:t.chart,_datasetIndex:t.index,_index:e})},addElements:function(){var e,t,n=this,i=n.getMeta(),r=n.getDataset().data||[],s=i.data;for(e=0,t=r.length;e<t;++e)s[e]=s[e]||n.createMetaData(e);i.dataset=i.dataset||n.createMetaDataset()},addElementAndReset:function(e){var t=this.createMetaData(e);this.getMeta().data.splice(e,0,t),this.updateElement(t,e,!0)},buildOrUpdateElements:function(){var e,t,n=this,i=n.getDataset(),r=i.data||(i.data=[]);n._data!==r&&(n._data&&ve(n._data,n),r&&Object.isExtensible(r)&&(t=n,(e=r)._chartjs?e._chartjs.listeners.push(t):(Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),ye.forEach((function(t){var n="onData"+t.charAt(0).toUpperCase()+t.slice(1),i=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:function(){var t=Array.prototype.slice.call(arguments),r=i.apply(this,t);return ue.each(e._chartjs.listeners,(function(e){"function"==typeof e[n]&&e[n].apply(e,t)})),r}})})))),n._data=r),n.resyncElements()},update:ue.noop,transition:function(e){for(var t=this.getMeta(),n=t.data||[],i=n.length,r=0;r<i;++r)n[r].transition(e);t.dataset&&t.dataset.transition(e)},draw:function(){var e=this.getMeta(),t=e.data||[],n=t.length,i=0;for(e.dataset&&e.dataset.draw();i<n;++i)t[i].draw()},removeHoverStyle:function(e){ue.merge(e._model,e.$previousStyle||{}),delete e.$previousStyle},setHoverStyle:function(e){var t=this.chart.data.datasets[e._datasetIndex],n=e._index,i=e.custom||{},r=e._model,s=ue.getHoverColor;e.$previousStyle={backgroundColor:r.backgroundColor,borderColor:r.borderColor,borderWidth:r.borderWidth},r.backgroundColor=_e([i.hoverBackgroundColor,t.hoverBackgroundColor,s(r.backgroundColor)],void 0,n),r.borderColor=_e([i.hoverBorderColor,t.hoverBorderColor,s(r.borderColor)],void 0,n),r.borderWidth=_e([i.hoverBorderWidth,t.hoverBorderWidth,r.borderWidth],void 0,n)},resyncElements:function(){var e=this,t=e.getMeta(),n=e.getDataset().data,i=t.data.length,r=n.length;r<i?t.data.splice(r,i-r):r>i&&e.insertElements(i,r-i)},insertElements:function(e,t){for(var n=0;n<t;++n)this.addElementAndReset(e+n)},onDataPush:function(){var e=arguments.length;this.insertElements(this.getDataset().data.length-e,e)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(e,t){this.getMeta().data.splice(e,t),this.insertElements(e,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),we.extend=ue.inherits;var Se=we;ae._set("global",{elements:{arc:{backgroundColor:ae.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var Me=pe.extend({inLabelRange:function(e){var t=this._view;return!!t&&Math.pow(e-t.x,2)<Math.pow(t.radius+t.hoverRadius,2)},inRange:function(e,t){var n=this._view;if(n){for(var i=ue.getAngleFromPoint(n,{x:e,y:t}),r=i.angle,s=i.distance,o=n.startAngle,a=n.endAngle;a<o;)a+=2*Math.PI;for(;r>a;)r-=2*Math.PI;for(;r<o;)r+=2*Math.PI;return r>=o&&r<=a&&s>=n.innerRadius&&s<=n.outerRadius}return!1},getCenterPoint:function(){var e=this._view,t=(e.startAngle+e.endAngle)/2,n=(e.innerRadius+e.outerRadius)/2;return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}},getArea:function(){var e=this._view;return Math.PI*((e.endAngle-e.startAngle)/(2*Math.PI))*(Math.pow(e.outerRadius,2)-Math.pow(e.innerRadius,2))},tooltipPosition:function(){var e=this._view,t=e.startAngle+(e.endAngle-e.startAngle)/2,n=(e.outerRadius-e.innerRadius)/2+e.innerRadius;return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}},draw:function(){var e,t=this._chart.ctx,n=this._view,i=n.startAngle,r=n.endAngle,s="inner"===n.borderAlign?.33:0;t.save(),t.beginPath(),t.arc(n.x,n.y,Math.max(n.outerRadius-s,0),i,r),t.arc(n.x,n.y,n.innerRadius,r,i,!0),t.closePath(),t.fillStyle=n.backgroundColor,t.fill(),n.borderWidth&&("inner"===n.borderAlign?(t.beginPath(),t.arc(n.x,n.y,n.outerRadius,i-(e=s/n.outerRadius),r+e),n.innerRadius>s?t.arc(n.x,n.y,n.innerRadius-s,r+(e=s/n.innerRadius),i-e,!0):t.arc(n.x,n.y,s,r+Math.PI/2,i-Math.PI/2),t.closePath(),t.clip(),t.beginPath(),t.arc(n.x,n.y,n.outerRadius,i,r),t.arc(n.x,n.y,n.innerRadius,r,i,!0),t.closePath(),t.lineWidth=2*n.borderWidth,t.lineJoin="round"):(t.lineWidth=n.borderWidth,t.lineJoin="bevel"),t.strokeStyle=n.borderColor,t.stroke()),t.restore()}}),ke=ue.valueOrDefault,xe=ae.global.defaultColor;ae._set("global",{elements:{line:{tension:.4,backgroundColor:xe,borderWidth:3,borderColor:xe,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var De=pe.extend({draw:function(){var e,t,n,i,r=this,s=r._view,o=r._chart.ctx,a=s.spanGaps,c=r._children.slice(),l=ae.global,u=l.elements.line,d=-1;for(r._loop&&c.length&&c.push(c[0]),o.save(),o.lineCap=s.borderCapStyle||u.borderCapStyle,o.setLineDash&&o.setLineDash(s.borderDash||u.borderDash),o.lineDashOffset=ke(s.borderDashOffset,u.borderDashOffset),o.lineJoin=s.borderJoinStyle||u.borderJoinStyle,o.lineWidth=ke(s.borderWidth,u.borderWidth),o.strokeStyle=s.borderColor||l.defaultColor,o.beginPath(),d=-1,e=0;e<c.length;++e)t=c[e],n=ue.previousItem(c,e),i=t._view,0===e?i.skip||(o.moveTo(i.x,i.y),d=e):(n=-1===d?n:c[d],i.skip||(d!==e-1&&!a||-1===d?o.moveTo(i.x,i.y):ue.canvas.lineTo(o,n._view,t._view),d=e));o.stroke(),o.restore()}}),Te=ue.valueOrDefault,Ce=ae.global.defaultColor;function Oe(e){var t=this._view;return!!t&&Math.abs(e-t.x)<t.radius+t.hitRadius}ae._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:Ce,borderColor:Ce,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var Le=pe.extend({inRange:function(e,t){var n=this._view;return!!n&&Math.pow(e-n.x,2)+Math.pow(t-n.y,2)<Math.pow(n.hitRadius+n.radius,2)},inLabelRange:Oe,inXRange:Oe,inYRange:function(e){var t=this._view;return!!t&&Math.abs(e-t.y)<t.radius+t.hitRadius},getCenterPoint:function(){var e=this._view;return{x:e.x,y:e.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y,padding:e.radius+e.borderWidth}},draw:function(e){var t=this._view,n=this._chart.ctx,i=t.pointStyle,r=t.rotation,s=t.radius,o=t.x,a=t.y,c=ae.global,l=c.defaultColor;t.skip||(void 0===e||ue.canvas._isPointInArea(t,e))&&(n.strokeStyle=t.borderColor||l,n.lineWidth=Te(t.borderWidth,c.elements.point.borderWidth),n.fillStyle=t.backgroundColor||l,ue.canvas.drawPoint(n,i,s,o,a,r))}}),Re=ae.global.defaultColor;function Ee(e){return e&&void 0!==e.width}function Ae(e){var t,n,i,r,s;return Ee(e)?(t=e.x-(s=e.width/2),n=e.x+s,i=Math.min(e.y,e.base),r=Math.max(e.y,e.base)):(s=e.height/2,t=Math.min(e.x,e.base),n=Math.max(e.x,e.base),i=e.y-s,r=e.y+s),{left:t,top:i,right:n,bottom:r}}function Ie(e,t,n){return e===t?n:e===n?t:e}function Pe(e,t,n){var i=null===t,r=null===n,s=!(!e||i&&r)&&Ae(e);return s&&(i||t>=s.left&&t<=s.right)&&(r||n>=s.top&&n<=s.bottom)}ae._set("global",{elements:{rectangle:{backgroundColor:Re,borderColor:Re,borderSkipped:"bottom",borderWidth:0}}});var Ne=pe.extend({draw:function(){var e=this._chart.ctx,t=this._view,n=function(e){var t=Ae(e),n=t.right-t.left,i=t.bottom-t.top,r=function(e,t,n){var i,r,s,o,a=e.borderWidth,c=function(e){var t=e.borderSkipped,n={};return t?(e.horizontal?e.base>e.x&&(t=Ie(t,"left","right")):e.base<e.y&&(t=Ie(t,"bottom","top")),n[t]=!0,n):n}(e);return ue.isObject(a)?(i=+a.top||0,r=+a.right||0,s=+a.bottom||0,o=+a.left||0):i=r=s=o=+a||0,{t:c.top||i<0?0:i>n?n:i,r:c.right||r<0?0:r>t?t:r,b:c.bottom||s<0?0:s>n?n:s,l:c.left||o<0?0:o>t?t:o}}(e,n/2,i/2);return{outer:{x:t.left,y:t.top,w:n,h:i},inner:{x:t.left+r.l,y:t.top+r.t,w:n-r.l-r.r,h:i-r.t-r.b}}}(t),i=n.outer,r=n.inner;e.fillStyle=t.backgroundColor,e.fillRect(i.x,i.y,i.w,i.h),i.w===r.w&&i.h===r.h||(e.save(),e.beginPath(),e.rect(i.x,i.y,i.w,i.h),e.clip(),e.fillStyle=t.borderColor,e.rect(r.x,r.y,r.w,r.h),e.fill("evenodd"),e.restore())},height:function(){var e=this._view;return e.base-e.y},inRange:function(e,t){return Pe(this._view,e,t)},inLabelRange:function(e,t){var n=this._view;return Ee(n)?Pe(n,e,null):Pe(n,null,t)},inXRange:function(e){return Pe(this._view,e,null)},inYRange:function(e){return Pe(this._view,null,e)},getCenterPoint:function(){var e,t,n=this._view;return Ee(n)?(e=n.x,t=(n.y+n.base)/2):(e=(n.x+n.base)/2,t=n.y),{x:e,y:t}},getArea:function(){var e=this._view;return Ee(e)?e.width*Math.abs(e.y-e.base):e.height*Math.abs(e.x-e.base)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y}}}),je={},Fe=De,Ye=Le,ze=Ne;je.Arc=Me,je.Line=Fe,je.Point=Ye,je.Rectangle=ze;var $e=ue.options.resolve;function He(e,t){var n,i,r,s,o=e.isHorizontal()?e.width:e.height,a=e.getTicks();for(r=1,s=t.length;r<s;++r)o=Math.min(o,Math.abs(t[r]-t[r-1]));for(r=0,s=a.length;r<s;++r)i=e.getPixelForTick(r),o=r>0?Math.min(o,i-n):o,n=i;return o}ae._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}});var We=Se.extend({dataElementType:je.Rectangle,initialize:function(){var e,t=this;Se.prototype.initialize.apply(t,arguments),(e=t.getMeta()).stack=t.getDataset().stack,e.bar=!0},update:function(e){var t,n,i=this,r=i.getMeta().data;for(i._ruler=i.getRuler(),t=0,n=r.length;t<n;++t)i.updateElement(r[t],t,e)},updateElement:function(e,t,n){var i=this,r=i.getMeta(),s=i.getDataset(),o=i._resolveElementOptions(e,t);e._xScale=i.getScaleForId(r.xAxisID),e._yScale=i.getScaleForId(r.yAxisID),e._datasetIndex=i.index,e._index=t,e._model={backgroundColor:o.backgroundColor,borderColor:o.borderColor,borderSkipped:o.borderSkipped,borderWidth:o.borderWidth,datasetLabel:s.label,label:i.chart.data.labels[t]},i._updateElementGeometry(e,t,n),e.pivot()},_updateElementGeometry:function(e,t,n){var i=this,r=e._model,s=i._getValueScale(),o=s.getBasePixel(),a=s.isHorizontal(),c=i._ruler||i.getRuler(),l=i.calculateBarValuePixels(i.index,t),u=i.calculateBarIndexPixels(i.index,t,c);r.horizontal=a,r.base=n?o:l.base,r.x=a?n?o:l.head:u.center,r.y=a?u.center:n?o:l.head,r.height=a?u.size:void 0,r.width=a?void 0:u.size},_getStacks:function(e){var t,n,i=this.chart,r=this._getIndexScale().options.stacked,s=void 0===e?i.data.datasets.length:e+1,o=[];for(t=0;t<s;++t)(n=i.getDatasetMeta(t)).bar&&i.isDatasetVisible(t)&&(!1===r||!0===r&&-1===o.indexOf(n.stack)||void 0===r&&(void 0===n.stack||-1===o.indexOf(n.stack)))&&o.push(n.stack);return o},getStackCount:function(){return this._getStacks().length},getStackIndex:function(e,t){var n=this._getStacks(e),i=void 0!==t?n.indexOf(t):-1;return-1===i?n.length-1:i},getRuler:function(){var e,t,n=this,i=n._getIndexScale(),r=n.getStackCount(),s=n.index,o=i.isHorizontal(),a=o?i.left:i.top,c=a+(o?i.width:i.height),l=[];for(e=0,t=n.getMeta().data.length;e<t;++e)l.push(i.getPixelForValue(null,e,s));return{min:ue.isNullOrUndef(i.options.barThickness)?He(i,l):-1,pixels:l,start:a,end:c,stackCount:r,scale:i}},calculateBarValuePixels:function(e,t){var n,i,r,s,o,a,c=this,l=c.chart,u=c.getMeta(),d=c._getValueScale(),h=d.isHorizontal(),f=l.data.datasets,p=+d.getRightValue(f[e].data[t]),m=d.options.minBarLength,b=d.options.stacked,g=u.stack,_=0;if(b||void 0===b&&void 0!==g)for(n=0;n<e;++n)(i=l.getDatasetMeta(n)).bar&&i.stack===g&&i.controller._getValueScaleId()===d.id&&l.isDatasetVisible(n)&&(r=+d.getRightValue(f[n].data[t]),(p<0&&r<0||p>=0&&r>0)&&(_+=r));return s=d.getPixelForValue(_),a=(o=d.getPixelForValue(_+p))-s,void 0!==m&&Math.abs(a)<m&&(a=m,o=p>=0&&!h||p<0&&h?s-m:s+m),{size:a,base:s,head:o,center:o+a/2}},calculateBarIndexPixels:function(e,t,n){var i=n.scale.options,r="flex"===i.barThickness?function(e,t,n){var i,r=t.pixels,s=r[e],o=e>0?r[e-1]:null,a=e<r.length-1?r[e+1]:null,c=n.categoryPercentage;return null===o&&(o=s-(null===a?t.end-t.start:a-s)),null===a&&(a=s+s-o),i=s-(s-Math.min(o,a))/2*c,{chunk:Math.abs(a-o)/2*c/t.stackCount,ratio:n.barPercentage,start:i}}(t,n,i):function(e,t,n){var i,r,s=n.barThickness,o=t.stackCount,a=t.pixels[e];return ue.isNullOrUndef(s)?(i=t.min*n.categoryPercentage,r=n.barPercentage):(i=s*o,r=1),{chunk:i/o,ratio:r,start:a-i/2}}(t,n,i),s=this.getStackIndex(e,this.getMeta().stack),o=r.start+r.chunk*s+r.chunk/2,a=Math.min(ue.valueOrDefault(i.maxBarThickness,1/0),r.chunk*r.ratio);return{base:o-a/2,head:o+a/2,center:o,size:a}},draw:function(){var e=this,t=e.chart,n=e._getValueScale(),i=e.getMeta().data,r=e.getDataset(),s=i.length,o=0;for(ue.canvas.clipArea(t.ctx,t.chartArea);o<s;++o)isNaN(n.getRightValue(r.data[o]))||i[o].draw();ue.canvas.unclipArea(t.ctx)},_resolveElementOptions:function(e,t){var n,i,r,s=this,o=s.chart,a=o.data.datasets[s.index],c=e.custom||{},l=o.options.elements.rectangle,u={},d={chart:o,dataIndex:t,dataset:a,datasetIndex:s.index},h=["backgroundColor","borderColor","borderSkipped","borderWidth"];for(n=0,i=h.length;n<i;++n)u[r=h[n]]=$e([c[r],a[r],l[r]],d,t);return u}}),Ve=ue.valueOrDefault,Be=ue.options.resolve;ae._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(e,t){return(t.datasets[e.datasetIndex].label||"")+": ("+e.xLabel+", "+e.yLabel+", "+t.datasets[e.datasetIndex].data[e.index].r+")"}}}});var Ue=Se.extend({dataElementType:je.Point,update:function(e){var t=this,n=t.getMeta();ue.each(n.data,(function(n,i){t.updateElement(n,i,e)}))},updateElement:function(e,t,n){var i=this,r=i.getMeta(),s=e.custom||{},o=i.getScaleForId(r.xAxisID),a=i.getScaleForId(r.yAxisID),c=i._resolveElementOptions(e,t),l=i.getDataset().data[t],u=i.index,d=n?o.getPixelForDecimal(.5):o.getPixelForValue("object"==typeof l?l:NaN,t,u),h=n?a.getBasePixel():a.getPixelForValue(l,t,u);e._xScale=o,e._yScale=a,e._options=c,e._datasetIndex=u,e._index=t,e._model={backgroundColor:c.backgroundColor,borderColor:c.borderColor,borderWidth:c.borderWidth,hitRadius:c.hitRadius,pointStyle:c.pointStyle,rotation:c.rotation,radius:n?0:c.radius,skip:s.skip||isNaN(d)||isNaN(h),x:d,y:h},e.pivot()},setHoverStyle:function(e){var t=e._model,n=e._options,i=ue.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=Ve(n.hoverBackgroundColor,i(n.backgroundColor)),t.borderColor=Ve(n.hoverBorderColor,i(n.borderColor)),t.borderWidth=Ve(n.hoverBorderWidth,n.borderWidth),t.radius=n.radius+n.hoverRadius},_resolveElementOptions:function(e,t){var n,i,r,s=this,o=s.chart,a=o.data.datasets[s.index],c=e.custom||{},l=o.options.elements.point,u=a.data[t],d={},h={chart:o,dataIndex:t,dataset:a,datasetIndex:s.index},f=["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"];for(n=0,i=f.length;n<i;++n)d[r=f[n]]=Be([c[r],a[r],l[r]],h,t);return d.radius=Be([c.radius,u?u.r:void 0,a.radius,l.radius],h,t),d}}),Ge=ue.options.resolve,qe=ue.valueOrDefault;ae._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(e){var t=[];t.push('<ul class="'+e.id+'-legend">');var n=e.data,i=n.datasets,r=n.labels;if(i.length)for(var s=0;s<i[0].data.length;++s)t.push('<li><span style="background-color:'+i[0].backgroundColor[s]+'"></span>'),r[s]&&t.push(r[s]),t.push("</li>");return t.push("</ul>"),t.join("")},legend:{labels:{generateLabels:function(e){var t=e.data;return t.labels.length&&t.datasets.length?t.labels.map((function(n,i){var r=e.getDatasetMeta(0),s=t.datasets[0],o=r.data[i],a=o&&o.custom||{},c=e.options.elements.arc;return{text:n,fillStyle:Ge([a.backgroundColor,s.backgroundColor,c.backgroundColor],void 0,i),strokeStyle:Ge([a.borderColor,s.borderColor,c.borderColor],void 0,i),lineWidth:Ge([a.borderWidth,s.borderWidth,c.borderWidth],void 0,i),hidden:isNaN(s.data[i])||r.data[i].hidden,index:i}})):[]}},onClick:function(e,t){var n,i,r,s=t.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n<i;++n)(r=o.getDatasetMeta(n)).data[s]&&(r.data[s].hidden=!r.data[s].hidden);o.update()}},cutoutPercentage:50,rotation:-.5*Math.PI,circumference:2*Math.PI,tooltips:{callbacks:{title:function(){return""},label:function(e,t){var n=t.labels[e.index],i=": "+t.datasets[e.datasetIndex].data[e.index];return ue.isArray(n)?(n=n.slice())[0]+=i:n+=i,n}}}});var Je=Se.extend({dataElementType:je.Arc,linkScales:ue.noop,getRingIndex:function(e){for(var t=0,n=0;n<e;++n)this.chart.isDatasetVisible(n)&&++t;return t},update:function(e){var t,n,i=this,r=i.chart,s=r.chartArea,o=r.options,a=s.right-s.left,c=s.bottom-s.top,l=Math.min(a,c),u={x:0,y:0},d=i.getMeta(),h=d.data,f=o.cutoutPercentage,p=o.circumference,m=i._getRingWeight(i.index);if(p<2*Math.PI){var b=o.rotation%(2*Math.PI),g=(b+=2*Math.PI*(b>=Math.PI?-1:b<-Math.PI?1:0))+p,_={x:Math.cos(b),y:Math.sin(b)},y={x:Math.cos(g),y:Math.sin(g)},v=b<=0&&g>=0||b<=2*Math.PI&&2*Math.PI<=g,w=b<=.5*Math.PI&&.5*Math.PI<=g||b<=2.5*Math.PI&&2.5*Math.PI<=g,S=b<=-Math.PI&&-Math.PI<=g||b<=Math.PI&&Math.PI<=g,M=b<=.5*-Math.PI&&.5*-Math.PI<=g||b<=1.5*Math.PI&&1.5*Math.PI<=g,k=f/100,x={x:S?-1:Math.min(_.x*(_.x<0?1:k),y.x*(y.x<0?1:k)),y:M?-1:Math.min(_.y*(_.y<0?1:k),y.y*(y.y<0?1:k))},D={x:v?1:Math.max(_.x*(_.x>0?1:k),y.x*(y.x>0?1:k)),y:w?1:Math.max(_.y*(_.y>0?1:k),y.y*(y.y>0?1:k))},T={width:.5*(D.x-x.x),height:.5*(D.y-x.y)};l=Math.min(a/T.width,c/T.height),u={x:-.5*(D.x+x.x),y:-.5*(D.y+x.y)}}for(t=0,n=h.length;t<n;++t)h[t]._options=i._resolveElementOptions(h[t],t);for(r.borderWidth=i.getMaxBorderWidth(),r.outerRadius=Math.max((l-r.borderWidth)/2,0),r.innerRadius=Math.max(f?r.outerRadius/100*f:0,0),r.radiusLength=(r.outerRadius-r.innerRadius)/(i._getVisibleDatasetWeightTotal()||1),r.offsetX=u.x*r.outerRadius,r.offsetY=u.y*r.outerRadius,d.total=i.calculateTotal(),i.outerRadius=r.outerRadius-r.radiusLength*i._getRingWeightOffset(i.index),i.innerRadius=Math.max(i.outerRadius-r.radiusLength*m,0),t=0,n=h.length;t<n;++t)i.updateElement(h[t],t,e)},updateElement:function(e,t,n){var i=this,r=i.chart,s=r.chartArea,o=r.options,a=o.animation,c=(s.left+s.right)/2,l=(s.top+s.bottom)/2,u=o.rotation,d=o.rotation,h=i.getDataset(),f=n&&a.animateRotate||e.hidden?0:i.calculateCircumference(h.data[t])*(o.circumference/(2*Math.PI)),p=e._options||{};ue.extend(e,{_datasetIndex:i.index,_index:t,_model:{backgroundColor:p.backgroundColor,borderColor:p.borderColor,borderWidth:p.borderWidth,borderAlign:p.borderAlign,x:c+r.offsetX,y:l+r.offsetY,startAngle:u,endAngle:d,circumference:f,outerRadius:n&&a.animateScale?0:i.outerRadius,innerRadius:n&&a.animateScale?0:i.innerRadius,label:ue.valueAtIndexOrDefault(h.label,t,r.data.labels[t])}});var m=e._model;n&&a.animateRotate||(m.startAngle=0===t?o.rotation:i.getMeta().data[t-1]._model.endAngle,m.endAngle=m.startAngle+m.circumference),e.pivot()},calculateTotal:function(){var e,t=this.getDataset(),n=this.getMeta(),i=0;return ue.each(n.data,(function(n,r){e=t.data[r],isNaN(e)||n.hidden||(i+=Math.abs(e))})),i},calculateCircumference:function(e){var t=this.getMeta().total;return t>0&&!isNaN(e)?2*Math.PI*(Math.abs(e)/t):0},getMaxBorderWidth:function(e){var t,n,i,r,s,o,a,c,l=0,u=this.chart;if(!e)for(t=0,n=u.data.datasets.length;t<n;++t)if(u.isDatasetVisible(t)){e=(i=u.getDatasetMeta(t)).data,t!==this.index&&(s=i.controller);break}if(!e)return 0;for(t=0,n=e.length;t<n;++t)r=e[t],"inner"!==(o=s?s._resolveElementOptions(r,t):r._options).borderAlign&&(l=(c=o.hoverBorderWidth)>(l=(a=o.borderWidth)>l?a:l)?c:l);return l},setHoverStyle:function(e){var t=e._model,n=e._options,i=ue.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=qe(n.hoverBackgroundColor,i(n.backgroundColor)),t.borderColor=qe(n.hoverBorderColor,i(n.borderColor)),t.borderWidth=qe(n.hoverBorderWidth,n.borderWidth)},_resolveElementOptions:function(e,t){var n,i,r,s=this,o=s.chart,a=s.getDataset(),c=e.custom||{},l=o.options.elements.arc,u={},d={chart:o,dataIndex:t,dataset:a,datasetIndex:s.index},h=["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"];for(n=0,i=h.length;n<i;++n)u[r=h[n]]=Ge([c[r],a[r],l[r]],d,t);return u},_getRingWeightOffset:function(e){for(var t=0,n=0;n<e;++n)this.chart.isDatasetVisible(n)&&(t+=this._getRingWeight(n));return t},_getRingWeight:function(e){return Math.max(qe(this.chart.data.datasets[e].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});ae._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}});var Qe=We.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),Ke=ue.valueOrDefault,Ze=ue.options.resolve,Xe=ue.canvas._isPointInArea;function et(e,t){return Ke(e.showLine,t.showLines)}ae._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var tt=Se.extend({datasetElementType:je.Line,dataElementType:je.Point,update:function(e){var t,n,i=this,r=i.getMeta(),s=r.dataset,o=r.data||[],a=i.getScaleForId(r.yAxisID),c=i.getDataset(),l=et(c,i.chart.options);for(l&&(void 0!==c.tension&&void 0===c.lineTension&&(c.lineTension=c.tension),s._scale=a,s._datasetIndex=i.index,s._children=o,s._model=i._resolveLineOptions(s),s.pivot()),t=0,n=o.length;t<n;++t)i.updateElement(o[t],t,e);for(l&&0!==s._model.tension&&i.updateBezierControlPoints(),t=0,n=o.length;t<n;++t)o[t].pivot()},updateElement:function(e,t,n){var i,r,s=this,o=s.getMeta(),a=e.custom||{},c=s.getDataset(),l=s.index,u=c.data[t],d=s.getScaleForId(o.yAxisID),h=s.getScaleForId(o.xAxisID),f=o.dataset._model,p=s._resolvePointOptions(e,t);i=h.getPixelForValue("object"==typeof u?u:NaN,t,l),r=n?d.getBasePixel():s.calculatePointY(u,t,l),e._xScale=h,e._yScale=d,e._options=p,e._datasetIndex=l,e._index=t,e._model={x:i,y:r,skip:a.skip||isNaN(i)||isNaN(r),radius:p.radius,pointStyle:p.pointStyle,rotation:p.rotation,backgroundColor:p.backgroundColor,borderColor:p.borderColor,borderWidth:p.borderWidth,tension:Ke(a.tension,f?f.tension:0),steppedLine:!!f&&f.steppedLine,hitRadius:p.hitRadius}},_resolvePointOptions:function(e,t){var n,i,r,s=this,o=s.chart,a=o.data.datasets[s.index],c=e.custom||{},l=o.options.elements.point,u={},d={chart:o,dataIndex:t,dataset:a,datasetIndex:s.index},h={backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},f=Object.keys(h);for(n=0,i=f.length;n<i;++n)u[r=f[n]]=Ze([c[r],a[h[r]],a[r],l[r]],d,t);return u},_resolveLineOptions:function(e){var t,n,i,r=this.chart,s=r.data.datasets[this.index],o=e.custom||{},a=r.options,c=a.elements.line,l={},u=["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill","cubicInterpolationMode"];for(t=0,n=u.length;t<n;++t)l[i=u[t]]=Ze([o[i],s[i],c[i]]);return l.spanGaps=Ke(s.spanGaps,a.spanGaps),l.tension=Ke(s.lineTension,c.tension),l.steppedLine=Ze([o.steppedLine,s.steppedLine,c.stepped]),l},calculatePointY:function(e,t,n){var i,r,s,o=this,a=o.chart,c=o.getMeta(),l=o.getScaleForId(c.yAxisID),u=0,d=0;if(l.options.stacked){for(i=0;i<n;i++)if(r=a.data.datasets[i],"line"===(s=a.getDatasetMeta(i)).type&&s.yAxisID===l.id&&a.isDatasetVisible(i)){var h=Number(l.getRightValue(r.data[t]));h<0?d+=h||0:u+=h||0}var f=Number(l.getRightValue(e));return l.getPixelForValue(f<0?d+f:u+f)}return l.getPixelForValue(e)},updateBezierControlPoints:function(){var e,t,n,i,r=this.chart,s=this.getMeta(),o=s.dataset._model,a=r.chartArea,c=s.data||[];function l(e,t,n){return Math.max(Math.min(e,n),t)}if(o.spanGaps&&(c=c.filter((function(e){return!e._model.skip}))),"monotone"===o.cubicInterpolationMode)ue.splineCurveMonotone(c);else for(e=0,t=c.length;e<t;++e)n=c[e]._model,i=ue.splineCurve(ue.previousItem(c,e)._model,n,ue.nextItem(c,e)._model,o.tension),n.controlPointPreviousX=i.previous.x,n.controlPointPreviousY=i.previous.y,n.controlPointNextX=i.next.x,n.controlPointNextY=i.next.y;if(r.options.elements.line.capBezierPoints)for(e=0,t=c.length;e<t;++e)Xe(n=c[e]._model,a)&&(e>0&&Xe(c[e-1]._model,a)&&(n.controlPointPreviousX=l(n.controlPointPreviousX,a.left,a.right),n.controlPointPreviousY=l(n.controlPointPreviousY,a.top,a.bottom)),e<c.length-1&&Xe(c[e+1]._model,a)&&(n.controlPointNextX=l(n.controlPointNextX,a.left,a.right),n.controlPointNextY=l(n.controlPointNextY,a.top,a.bottom)))},draw:function(){var e,t=this,n=t.chart,i=t.getMeta(),r=i.data||[],s=n.chartArea,o=r.length,a=0;for(et(t.getDataset(),n.options)&&(ue.canvas.clipArea(n.ctx,{left:s.left,right:s.right,top:s.top-(e=(i.dataset._model.borderWidth||0)/2),bottom:s.bottom+e}),i.dataset.draw(),ue.canvas.unclipArea(n.ctx));a<o;++a)r[a].draw(s)},setHoverStyle:function(e){var t=e._model,n=e._options,i=ue.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=Ke(n.hoverBackgroundColor,i(n.backgroundColor)),t.borderColor=Ke(n.hoverBorderColor,i(n.borderColor)),t.borderWidth=Ke(n.hoverBorderWidth,n.borderWidth),t.radius=Ke(n.hoverRadius,n.radius)}}),nt=ue.options.resolve;ae._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(e){var t=[];t.push('<ul class="'+e.id+'-legend">');var n=e.data,i=n.datasets,r=n.labels;if(i.length)for(var s=0;s<i[0].data.length;++s)t.push('<li><span style="background-color:'+i[0].backgroundColor[s]+'"></span>'),r[s]&&t.push(r[s]),t.push("</li>");return t.push("</ul>"),t.join("")},legend:{labels:{generateLabels:function(e){var t=e.data;return t.labels.length&&t.datasets.length?t.labels.map((function(n,i){var r=e.getDatasetMeta(0),s=t.datasets[0],o=r.data[i].custom||{},a=e.options.elements.arc;return{text:n,fillStyle:nt([o.backgroundColor,s.backgroundColor,a.backgroundColor],void 0,i),strokeStyle:nt([o.borderColor,s.borderColor,a.borderColor],void 0,i),lineWidth:nt([o.borderWidth,s.borderWidth,a.borderWidth],void 0,i),hidden:isNaN(s.data[i])||r.data[i].hidden,index:i}})):[]}},onClick:function(e,t){var n,i,r,s=t.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n<i;++n)(r=o.getDatasetMeta(n)).data[s].hidden=!r.data[s].hidden;o.update()}},tooltips:{callbacks:{title:function(){return""},label:function(e,t){return t.labels[e.index]+": "+e.yLabel}}}});var it=Se.extend({dataElementType:je.Arc,linkScales:ue.noop,update:function(e){var t,n,i,r=this,s=r.getDataset(),o=r.getMeta(),a=r.chart.options.startAngle||0,c=r._starts=[],l=r._angles=[],u=o.data;for(r._updateRadius(),o.count=r.countVisibleElements(),t=0,n=s.data.length;t<n;t++)c[t]=a,i=r._computeAngle(t),l[t]=i,a+=i;for(t=0,n=u.length;t<n;++t)u[t]._options=r._resolveElementOptions(u[t],t),r.updateElement(u[t],t,e)},_updateRadius:function(){var e=this,t=e.chart,n=t.chartArea,i=t.options,r=Math.min(n.right-n.left,n.bottom-n.top);t.outerRadius=Math.max(r/2,0),t.innerRadius=Math.max(i.cutoutPercentage?t.outerRadius/100*i.cutoutPercentage:1,0),t.radiusLength=(t.outerRadius-t.innerRadius)/t.getVisibleDatasetCount(),e.outerRadius=t.outerRadius-t.radiusLength*e.index,e.innerRadius=e.outerRadius-t.radiusLength},updateElement:function(e,t,n){var i=this,r=i.chart,s=i.getDataset(),o=r.options,a=o.animation,c=r.scale,l=r.data.labels,u=c.xCenter,d=c.yCenter,h=o.startAngle,f=e.hidden?0:c.getDistanceFromCenterForValue(s.data[t]),p=i._starts[t],m=p+(e.hidden?0:i._angles[t]),b=a.animateScale?0:c.getDistanceFromCenterForValue(s.data[t]),g=e._options||{};ue.extend(e,{_datasetIndex:i.index,_index:t,_scale:c,_model:{backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,borderAlign:g.borderAlign,x:u,y:d,innerRadius:0,outerRadius:n?b:f,startAngle:n&&a.animateRotate?h:p,endAngle:n&&a.animateRotate?h:m,label:ue.valueAtIndexOrDefault(l,t,l[t])}}),e.pivot()},countVisibleElements:function(){var e=this.getDataset(),t=this.getMeta(),n=0;return ue.each(t.data,(function(t,i){isNaN(e.data[i])||t.hidden||n++})),n},setHoverStyle:function(e){var t=e._model,n=e._options,i=ue.getHoverColor,r=ue.valueOrDefault;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=r(n.hoverBackgroundColor,i(n.backgroundColor)),t.borderColor=r(n.hoverBorderColor,i(n.borderColor)),t.borderWidth=r(n.hoverBorderWidth,n.borderWidth)},_resolveElementOptions:function(e,t){var n,i,r,s=this,o=s.chart,a=s.getDataset(),c=e.custom||{},l=o.options.elements.arc,u={},d={chart:o,dataIndex:t,dataset:a,datasetIndex:s.index},h=["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"];for(n=0,i=h.length;n<i;++n)u[r=h[n]]=nt([c[r],a[r],l[r]],d,t);return u},_computeAngle:function(e){var t=this,n=this.getMeta().count,i=t.getDataset(),r=t.getMeta();return isNaN(i.data[e])||r.data[e].hidden?0:nt([t.chart.options.elements.arc.angle,2*Math.PI/n],{chart:t.chart,dataIndex:e,dataset:i,datasetIndex:t.index},e)}});ae._set("pie",ue.clone(ae.doughnut)),ae._set("pie",{cutoutPercentage:0});var rt=Je,st=ue.valueOrDefault,ot=ue.options.resolve;ae._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}});var at=Se.extend({datasetElementType:je.Line,dataElementType:je.Point,linkScales:ue.noop,update:function(e){var t,n,i=this,r=i.getMeta(),s=r.dataset,o=r.data||[],a=i.chart.scale,c=i.getDataset();for(void 0!==c.tension&&void 0===c.lineTension&&(c.lineTension=c.tension),s._scale=a,s._datasetIndex=i.index,s._children=o,s._loop=!0,s._model=i._resolveLineOptions(s),s.pivot(),t=0,n=o.length;t<n;++t)i.updateElement(o[t],t,e);for(i.updateBezierControlPoints(),t=0,n=o.length;t<n;++t)o[t].pivot()},updateElement:function(e,t,n){var i=this,r=e.custom||{},s=i.getDataset(),o=i.chart.scale,a=o.getPointPositionForValue(t,s.data[t]),c=i._resolvePointOptions(e,t),l=i.getMeta().dataset._model,u=n?o.xCenter:a.x,d=n?o.yCenter:a.y;e._scale=o,e._options=c,e._datasetIndex=i.index,e._index=t,e._model={x:u,y:d,skip:r.skip||isNaN(u)||isNaN(d),radius:c.radius,pointStyle:c.pointStyle,rotation:c.rotation,backgroundColor:c.backgroundColor,borderColor:c.borderColor,borderWidth:c.borderWidth,tension:st(r.tension,l?l.tension:0),hitRadius:c.hitRadius}},_resolvePointOptions:function(e,t){var n,i,r,s=this,o=s.chart,a=o.data.datasets[s.index],c=e.custom||{},l=o.options.elements.point,u={},d={chart:o,dataIndex:t,dataset:a,datasetIndex:s.index},h={backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},f=Object.keys(h);for(n=0,i=f.length;n<i;++n)u[r=f[n]]=ot([c[r],a[h[r]],a[r],l[r]],d,t);return u},_resolveLineOptions:function(e){var t,n,i,r=this.chart,s=r.data.datasets[this.index],o=e.custom||{},a=r.options.elements.line,c={},l=["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"];for(t=0,n=l.length;t<n;++t)c[i=l[t]]=ot([o[i],s[i],a[i]]);return c.tension=st(s.lineTension,a.tension),c},updateBezierControlPoints:function(){var e,t,n,i,r=this.getMeta(),s=this.chart.chartArea,o=r.data||[];function a(e,t,n){return Math.max(Math.min(e,n),t)}for(e=0,t=o.length;e<t;++e)n=o[e]._model,i=ue.splineCurve(ue.previousItem(o,e,!0)._model,n,ue.nextItem(o,e,!0)._model,n.tension),n.controlPointPreviousX=a(i.previous.x,s.left,s.right),n.controlPointPreviousY=a(i.previous.y,s.top,s.bottom),n.controlPointNextX=a(i.next.x,s.left,s.right),n.controlPointNextY=a(i.next.y,s.top,s.bottom)},setHoverStyle:function(e){var t=e._model,n=e._options,i=ue.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=st(n.hoverBackgroundColor,i(n.backgroundColor)),t.borderColor=st(n.hoverBorderColor,i(n.borderColor)),t.borderWidth=st(n.hoverBorderWidth,n.borderWidth),t.radius=st(n.hoverRadius,n.radius)}});ae._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},showLines:!1,tooltips:{callbacks:{title:function(){return""},label:function(e){return"("+e.xLabel+", "+e.yLabel+")"}}}});var ct={bar:We,bubble:Ue,doughnut:Je,horizontalBar:Qe,line:tt,polarArea:it,pie:rt,radar:at,scatter:tt};function lt(e,t){return e.native?{x:e.x,y:e.y}:ue.getRelativePosition(e,t)}function ut(e,t){var n,i,r,s,o;for(i=0,s=e.data.datasets.length;i<s;++i)if(e.isDatasetVisible(i))for(r=0,o=(n=e.getDatasetMeta(i)).data.length;r<o;++r){var a=n.data[r];a._view.skip||t(a)}}function dt(e,t){var n=[];return ut(e,(function(e){e.inRange(t.x,t.y)&&n.push(e)})),n}function ht(e,t,n,i){var r=Number.POSITIVE_INFINITY,s=[];return ut(e,(function(e){if(!n||e.inRange(t.x,t.y)){var o=e.getCenterPoint(),a=i(t,o);a<r?(s=[e],r=a):a===r&&s.push(e)}})),s}function ft(e){var t=-1!==e.indexOf("x"),n=-1!==e.indexOf("y");return function(e,i){var r=t?Math.abs(e.x-i.x):0,s=n?Math.abs(e.y-i.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(s,2))}}function pt(e,t,n){var i=lt(t,e);n.axis=n.axis||"x";var r=ft(n.axis),s=n.intersect?dt(e,i):ht(e,i,!1,r),o=[];return s.length?(e.data.datasets.forEach((function(t,n){if(e.isDatasetVisible(n)){var i=e.getDatasetMeta(n).data[s[0]._index];i&&!i._view.skip&&o.push(i)}})),o):[]}var mt={modes:{single:function(e,t){var n=lt(t,e),i=[];return ut(e,(function(e){if(e.inRange(n.x,n.y))return i.push(e),i})),i.slice(0,1)},label:pt,index:pt,dataset:function(e,t,n){var i=lt(t,e);n.axis=n.axis||"xy";var r=ft(n.axis),s=n.intersect?dt(e,i):ht(e,i,!1,r);return s.length>0&&(s=e.getDatasetMeta(s[0]._datasetIndex).data),s},"x-axis":function(e,t){return pt(e,t,{intersect:!1})},point:function(e,t){return dt(e,lt(t,e))},nearest:function(e,t,n){var i=lt(t,e);n.axis=n.axis||"xy";var r=ft(n.axis);return ht(e,i,n.intersect,r)},x:function(e,t,n){var i=lt(t,e),r=[],s=!1;return ut(e,(function(e){e.inXRange(i.x)&&r.push(e),e.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r},y:function(e,t,n){var i=lt(t,e),r=[],s=!1;return ut(e,(function(e){e.inYRange(i.y)&&r.push(e),e.inRange(i.x,i.y)&&(s=!0)})),n.intersect&&!s&&(r=[]),r}}};function bt(e,t){return ue.where(e,(function(e){return e.position===t}))}function gt(e,t){e.forEach((function(e,t){return e._tmpIndex_=t,e})),e.sort((function(e,n){var i=t?n:e,r=t?e:n;return i.weight===r.weight?i._tmpIndex_-r._tmpIndex_:i.weight-r.weight})),e.forEach((function(e){delete e._tmpIndex_}))}function _t(e,t){ue.each(e,(function(e){t[e.position]+=e.isHorizontal()?e.height:e.width}))}ae._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var yt,vt={defaults:{},addBox:function(e,t){e.boxes||(e.boxes=[]),t.fullWidth=t.fullWidth||!1,t.position=t.position||"top",t.weight=t.weight||0,e.boxes.push(t)},removeBox:function(e,t){var n=e.boxes?e.boxes.indexOf(t):-1;-1!==n&&e.boxes.splice(n,1)},configure:function(e,t,n){for(var i,r=["fullWidth","position","weight"],s=r.length,o=0;o<s;++o)n.hasOwnProperty(i=r[o])&&(t[i]=n[i])},update:function(e,t,n){if(e){var i=ue.options.toPadding((e.options.layout||{}).padding),r=i.left,s=i.right,o=i.top,a=i.bottom,c=bt(e.boxes,"left"),l=bt(e.boxes,"right"),u=bt(e.boxes,"top"),d=bt(e.boxes,"bottom"),h=bt(e.boxes,"chartArea");gt(c,!0),gt(l,!1),gt(u,!0),gt(d,!1);var f,p=c.concat(l),m=u.concat(d),b=p.concat(m),g=t-r-s,_=n-o-a,y=(t-g/2)/p.length,v=g,w=_,S={top:o,left:r,bottom:a,right:s},M=[];ue.each(b,(function(e){var t,n=e.isHorizontal();n?(t=e.update(e.fullWidth?g:v,_/2),w-=t.height):(t=e.update(y,w),v-=t.width),M.push({horizontal:n,width:t.width,box:e})})),f=function(e){var t=0,n=0,i=0,r=0;return ue.each(e,(function(e){if(e.getPadding){var s=e.getPadding();t=Math.max(t,s.top),n=Math.max(n,s.left),i=Math.max(i,s.bottom),r=Math.max(r,s.right)}})),{top:t,left:n,bottom:i,right:r}}(b),ue.each(p,L),_t(p,S),ue.each(m,L),_t(m,S),ue.each(p,(function(e){var t=ue.findNextWhere(M,(function(t){return t.box===e}));t&&e.update(t.width,w,{left:0,right:0,top:S.top,bottom:S.bottom})})),_t(b,S={top:o,left:r,bottom:a,right:s});var k=Math.max(f.left-S.left,0);S.left+=k,S.right+=Math.max(f.right-S.right,0);var x=Math.max(f.top-S.top,0);S.top+=x,S.bottom+=Math.max(f.bottom-S.bottom,0);var D=n-S.top-S.bottom,T=t-S.left-S.right;T===v&&D===w||(ue.each(p,(function(e){e.height=D})),ue.each(m,(function(e){e.fullWidth||(e.width=T)})),w=D,v=T);var C=r+k,O=o+x;ue.each(c.concat(u),R),C+=v,O+=w,ue.each(l,R),ue.each(d,R),e.chartArea={left:S.left,top:S.top,right:S.left+v,bottom:S.top+w},ue.each(h,(function(t){t.left=e.chartArea.left,t.top=e.chartArea.top,t.right=e.chartArea.right,t.bottom=e.chartArea.bottom,t.update(v,w)}))}function L(e){var t=ue.findNextWhere(M,(function(t){return t.box===e}));if(t)if(t.horizontal){var n={left:Math.max(S.left,f.left),right:Math.max(S.right,f.right),top:0,bottom:0};e.update(e.fullWidth?g:v,_/2,n)}else e.update(t.width,w)}function R(e){e.isHorizontal()?(e.left=e.fullWidth?r:S.left,e.right=e.fullWidth?t-s:S.left+v,e.top=O,e.bottom=O+e.height,O=e.bottom):(e.left=C,e.right=C+e.width,e.top=S.top,e.bottom=S.top+w,C=e.right)}}},wt=(yt=Object.freeze({default:"/*\n * DOM element rendering detection\n * https://davidwalsh.name/detect-node-insertion\n */\n@keyframes chartjs-render-animation {\n\tfrom { opacity: 0.99; }\n\tto { opacity: 1; }\n}\n\n.chartjs-render-monitor {\n\tanimation: chartjs-render-animation 0.001s;\n}\n\n/*\n * DOM element resizing detection\n * https://github.com/marcj/css-element-queries\n */\n.chartjs-size-monitor,\n.chartjs-size-monitor-expand,\n.chartjs-size-monitor-shrink {\n\tposition: absolute;\n\tdirection: ltr;\n\tleft: 0;\n\ttop: 0;\n\tright: 0;\n\tbottom: 0;\n\toverflow: hidden;\n\tpointer-events: none;\n\tvisibility: hidden;\n\tz-index: -1;\n}\n\n.chartjs-size-monitor-expand > div {\n\tposition: absolute;\n\twidth: 1000000px;\n\theight: 1000000px;\n\tleft: 0;\n\ttop: 0;\n}\n\n.chartjs-size-monitor-shrink > div {\n\tposition: absolute;\n\twidth: 200%;\n\theight: 200%;\n\tleft: 0;\n\ttop: 0;\n}\n"}))&&yt.default||yt,St="chartjs-size-monitor",Mt="chartjs-render-monitor",kt=["animationstart","webkitAnimationStart"],xt={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function Dt(e,t){var n=ue.getStyle(e,t),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?Number(i[1]):void 0}var Tt=!!function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("e",null,t)}catch(n){}return e}()&&{passive:!0};function Ct(e,t,n){e.addEventListener(t,n,Tt)}function Ot(e,t,n){e.removeEventListener(t,n,Tt)}function Lt(e,t,n,i,r){return{type:e,chart:t,native:r||null,x:void 0!==n?n:null,y:void 0!==i?i:null}}function Rt(e){var t=document.createElement("div");return t.className=e||"",t}var Et={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(){this._loaded||(this._loaded=!0,this.disableCSSInjection||function(e,t){var n=e._style||document.createElement("style");e._style||(e._style=n,t="/* Chart.js */\n"+t,n.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(n)),n.appendChild(document.createTextNode(t))}(this,wt))},acquireContext:function(e,t){"string"==typeof e?e=document.getElementById(e):e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas);var n=e&&e.getContext&&e.getContext("2d");return this._ensureLoaded(),n&&n.canvas===e?(function(e,t){var n=e.style,i=e.getAttribute("height"),r=e.getAttribute("width");if(e.$chartjs={initial:{height:i,width:r,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===r||""===r){var s=Dt(e,"width");void 0!==s&&(e.width=s)}if(null===i||""===i)if(""===e.style.height)e.height=e.width/(t.options.aspectRatio||2);else{var o=Dt(e,"height");void 0!==s&&(e.height=o)}}(e,t),n):null},releaseContext:function(e){var t=e.canvas;if(t.$chartjs){var n=t.$chartjs.initial;["height","width"].forEach((function(e){var i=n[e];ue.isNullOrUndef(i)?t.removeAttribute(e):t.setAttribute(e,i)})),ue.each(n.style||{},(function(e,n){t.style[n]=e})),t.width=t.width,delete t.$chartjs}},addEventListener:function(e,t,n){var i=e.canvas;if("resize"!==t){var r=n.$chartjs||(n.$chartjs={});Ct(i,t,(r.proxies||(r.proxies={}))[e.id+"_"+t]=function(t){n(function(e,t){var n=xt[e.type]||e.type,i=ue.getRelativePosition(e,t);return Lt(n,t,i.x,i.y,e)}(t,e))})}else!function(e,t,n){var i,r,s,o,a=e.$chartjs||(e.$chartjs={}),c=a.resizer=function(e){var t=1e6,n=Rt(St),i=Rt(St+"-expand"),r=Rt(St+"-shrink");i.appendChild(Rt()),r.appendChild(Rt()),n.appendChild(i),n.appendChild(r),n._reset=function(){i.scrollLeft=t,i.scrollTop=t,r.scrollLeft=t,r.scrollTop=t};var s=function(){n._reset(),e()};return Ct(i,"scroll",s.bind(i,"expand")),Ct(r,"scroll",s.bind(r,"shrink")),n}((i=function(){if(a.resizer){var i=n.options.maintainAspectRatio&&e.parentNode,r=i?i.clientWidth:0;t(Lt("resize",n)),i&&i.clientWidth<r&&n.canvas&&t(Lt("resize",n))}},s=!1,o=[],function(){o=Array.prototype.slice.call(arguments),r=r||this,s||(s=!0,ue.requestAnimFrame.call(window,(function(){s=!1,i.apply(r,o)})))}));!function(e,t){var n=e.$chartjs||(e.$chartjs={}),i=n.renderProxy=function(e){"chartjs-render-animation"===e.animationName&&t()};ue.each(kt,(function(t){Ct(e,t,i)})),n.reflow=!!e.offsetParent,e.classList.add(Mt)}(e,(function(){if(a.resizer){var t=e.parentNode;t&&t!==c.parentNode&&t.insertBefore(c,t.firstChild),c._reset()}}))}(i,n,e)},removeEventListener:function(e,t,n){var i,r,s,o=e.canvas;if("resize"!==t){var a=((n.$chartjs||{}).proxies||{})[e.id+"_"+t];a&&Ot(o,t,a)}else s=(r=(i=o).$chartjs||{}).resizer,delete r.resizer,function(e){var t=e.$chartjs||{},n=t.renderProxy;n&&(ue.each(kt,(function(t){Ot(e,t,n)})),delete t.renderProxy),e.classList.remove(Mt)}(i),s&&s.parentNode&&s.parentNode.removeChild(s)}};ue.addEvent=Ct,ue.removeEvent=Ot;var At=ue.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},Et._enabled?Et:{acquireContext:function(e){return e&&e.canvas&&(e=e.canvas),e&&e.getContext("2d")||null}});ae._set("global",{plugins:{}});var It={_plugins:[],_cacheId:0,register:function(e){var t=this._plugins;[].concat(e).forEach((function(e){-1===t.indexOf(e)&&t.push(e)})),this._cacheId++},unregister:function(e){var t=this._plugins;[].concat(e).forEach((function(e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)})),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(e,t,n){var i,r,s,o,a,c=this.descriptors(e),l=c.length;for(i=0;i<l;++i)if("function"==typeof(a=(s=(r=c[i]).plugin)[t])&&((o=[e].concat(n||[])).push(r.options),!1===a.apply(s,o)))return!1;return!0},descriptors:function(e){var t=e.$plugins||(e.$plugins={});if(t.id===this._cacheId)return t.descriptors;var n=[],i=[],r=e&&e.config||{},s=r.options&&r.options.plugins||{};return this._plugins.concat(r.plugins||[]).forEach((function(e){if(-1===n.indexOf(e)){var t=e.id,r=s[t];!1!==r&&(!0===r&&(r=ue.clone(ae.global.plugins[t])),n.push(e),i.push({plugin:e,options:r||{}}))}})),t.descriptors=i,t.id=this._cacheId,i},_invalidate:function(e){delete e.$plugins}},Pt={constructors:{},defaults:{},registerScaleType:function(e,t,n){this.constructors[e]=t,this.defaults[e]=ue.clone(n)},getScaleConstructor:function(e){return this.constructors.hasOwnProperty(e)?this.constructors[e]:void 0},getScaleDefaults:function(e){return this.defaults.hasOwnProperty(e)?ue.merge({},[ae.scale,this.defaults[e]]):{}},updateScaleDefaults:function(e,t){var n=this;n.defaults.hasOwnProperty(e)&&(n.defaults[e]=ue.extend(n.defaults[e],t))},addScalesToLayout:function(e){ue.each(e.scales,(function(t){t.fullWidth=t.options.fullWidth,t.position=t.options.position,t.weight=t.options.weight,vt.addBox(e,t)}))}},Nt=ue.valueOrDefault;ae._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:ue.noop,title:function(e,t){var n="",i=t.labels,r=i?i.length:0;if(e.length>0){var s=e[0];s.label?n=s.label:s.xLabel?n=s.xLabel:r>0&&s.index<r&&(n=i[s.index])}return n},afterTitle:ue.noop,beforeBody:ue.noop,beforeLabel:ue.noop,label:function(e,t){var n=t.datasets[e.datasetIndex].label||"";return n&&(n+=": "),ue.isNullOrUndef(e.value)?n+=e.yLabel:n+=e.value,n},labelColor:function(e,t){var n=t.getDatasetMeta(e.datasetIndex).data[e.index]._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:ue.noop,afterBody:ue.noop,beforeFooter:ue.noop,footer:ue.noop,afterFooter:ue.noop}}});var jt={average:function(e){if(!e.length)return!1;var t,n,i=0,r=0,s=0;for(t=0,n=e.length;t<n;++t){var o=e[t];if(o&&o.hasValue()){var a=o.tooltipPosition();i+=a.x,r+=a.y,++s}}return{x:i/s,y:r/s}},nearest:function(e,t){var n,i,r,s=t.x,o=t.y,a=Number.POSITIVE_INFINITY;for(n=0,i=e.length;n<i;++n){var c=e[n];if(c&&c.hasValue()){var l=c.getCenterPoint(),u=ue.distanceBetweenPoints(t,l);u<a&&(a=u,r=c)}}if(r){var d=r.tooltipPosition();s=d.x,o=d.y}return{x:s,y:o}}};function Ft(e,t){return t&&(ue.isArray(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Yt(e){return("string"==typeof e||e instanceof String)&&e.indexOf("\n")>-1?e.split("\n"):e}function zt(e){var t=ae.global;return{xPadding:e.xPadding,yPadding:e.yPadding,xAlign:e.xAlign,yAlign:e.yAlign,bodyFontColor:e.bodyFontColor,_bodyFontFamily:Nt(e.bodyFontFamily,t.defaultFontFamily),_bodyFontStyle:Nt(e.bodyFontStyle,t.defaultFontStyle),_bodyAlign:e.bodyAlign,bodyFontSize:Nt(e.bodyFontSize,t.defaultFontSize),bodySpacing:e.bodySpacing,titleFontColor:e.titleFontColor,_titleFontFamily:Nt(e.titleFontFamily,t.defaultFontFamily),_titleFontStyle:Nt(e.titleFontStyle,t.defaultFontStyle),titleFontSize:Nt(e.titleFontSize,t.defaultFontSize),_titleAlign:e.titleAlign,titleSpacing:e.titleSpacing,titleMarginBottom:e.titleMarginBottom,footerFontColor:e.footerFontColor,_footerFontFamily:Nt(e.footerFontFamily,t.defaultFontFamily),_footerFontStyle:Nt(e.footerFontStyle,t.defaultFontStyle),footerFontSize:Nt(e.footerFontSize,t.defaultFontSize),_footerAlign:e.footerAlign,footerSpacing:e.footerSpacing,footerMarginTop:e.footerMarginTop,caretSize:e.caretSize,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,opacity:0,legendColorBackground:e.multiKeyBackground,displayColors:e.displayColors,borderColor:e.borderColor,borderWidth:e.borderWidth}}function $t(e,t){return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-e.xPadding:e.x+e.xPadding}function Ht(e){return Ft([],Yt(e))}var Wt=pe.extend({initialize:function(){this._model=zt(this._options),this._lastActive=[]},getTitle:function(){var e=this,t=e._options.callbacks,n=t.beforeTitle.apply(e,arguments),i=t.title.apply(e,arguments),r=t.afterTitle.apply(e,arguments),s=[];return s=Ft(s,Yt(n)),s=Ft(s,Yt(i)),Ft(s,Yt(r))},getBeforeBody:function(){return Ht(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(e,t){var n=this,i=n._options.callbacks,r=[];return ue.each(e,(function(e){var s={before:[],lines:[],after:[]};Ft(s.before,Yt(i.beforeLabel.call(n,e,t))),Ft(s.lines,i.label.call(n,e,t)),Ft(s.after,Yt(i.afterLabel.call(n,e,t))),r.push(s)})),r},getAfterBody:function(){return Ht(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var e=this,t=e._options.callbacks,n=t.beforeFooter.apply(e,arguments),i=t.footer.apply(e,arguments),r=t.afterFooter.apply(e,arguments),s=[];return s=Ft(s,Yt(n)),s=Ft(s,Yt(i)),Ft(s,Yt(r))},update:function(e){var t,n,i,r,s,o,a,c,l,u,d=this,h=d._options,f=d._model,p=d._model=zt(h),m=d._active,b=d._data,g={xAlign:f.xAlign,yAlign:f.yAlign},_={x:f.x,y:f.y},y={width:f.width,height:f.height},v={x:f.caretX,y:f.caretY};if(m.length){p.opacity=1;var w=[],S=[];v=jt[h.position].call(d,m,d._eventPosition);var M=[];for(t=0,n=m.length;t<n;++t)M.push((r=void 0,s=void 0,void 0,void 0,c=void 0,l=void 0,u=void 0,r=(i=m[t])._xScale,s=i._yScale||i._scale,o=i._index,l=(c=i._chart.getDatasetMeta(a=i._datasetIndex).controller)._getIndexScale(),u=c._getValueScale(),{xLabel:r?r.getLabelForIndex(o,a):"",yLabel:s?s.getLabelForIndex(o,a):"",label:l?""+l.getLabelForIndex(o,a):"",value:u?""+u.getLabelForIndex(o,a):"",index:o,datasetIndex:a,x:i._model.x,y:i._model.y}));h.filter&&(M=M.filter((function(e){return h.filter(e,b)}))),h.itemSort&&(M=M.sort((function(e,t){return h.itemSort(e,t,b)}))),ue.each(M,(function(e){w.push(h.callbacks.labelColor.call(d,e,d._chart)),S.push(h.callbacks.labelTextColor.call(d,e,d._chart))})),p.title=d.getTitle(M,b),p.beforeBody=d.getBeforeBody(M,b),p.body=d.getBody(M,b),p.afterBody=d.getAfterBody(M,b),p.footer=d.getFooter(M,b),p.x=v.x,p.y=v.y,p.caretPadding=h.caretPadding,p.labelColors=w,p.labelTextColors=S,p.dataPoints=M,_=function(e,t,n,i){var r=e.x,s=e.y,o=e.caretPadding,a=n.xAlign,c=n.yAlign,l=e.caretSize+o,u=e.cornerRadius+o;return"right"===a?r-=t.width:"center"===a&&((r-=t.width/2)+t.width>i.width&&(r=i.width-t.width),r<0&&(r=0)),"top"===c?s+=l:s-="bottom"===c?t.height+l:t.height/2,"center"===c?"left"===a?r+=l:"right"===a&&(r-=l):"left"===a?r-=u:"right"===a&&(r+=u),{x:r,y:s}}(p,y=function(e,t){var n=e._chart.ctx,i=2*t.yPadding,r=0,s=t.body,o=s.reduce((function(e,t){return e+t.before.length+t.lines.length+t.after.length}),0),a=t.title.length,c=t.footer.length,l=t.titleFontSize,u=t.bodyFontSize,d=t.footerFontSize;i+=a*l,i+=a?(a-1)*t.titleSpacing:0,i+=a?t.titleMarginBottom:0,i+=(o+=t.beforeBody.length+t.afterBody.length)*u,i+=o?(o-1)*t.bodySpacing:0,i+=c?t.footerMarginTop:0,i+=c*d,i+=c?(c-1)*t.footerSpacing:0;var h=0,f=function(e){r=Math.max(r,n.measureText(e).width+h)};return n.font=ue.fontString(l,t._titleFontStyle,t._titleFontFamily),ue.each(t.title,f),n.font=ue.fontString(u,t._bodyFontStyle,t._bodyFontFamily),ue.each(t.beforeBody.concat(t.afterBody),f),h=t.displayColors?u+2:0,ue.each(s,(function(e){ue.each(e.before,f),ue.each(e.lines,f),ue.each(e.after,f)})),h=0,n.font=ue.fontString(d,t._footerFontStyle,t._footerFontFamily),ue.each(t.footer,f),{width:r+=2*t.xPadding,height:i}}(this,p),g=function(e,t){var n,i,r,s,o,a=e._model,c=e._chart,l=e._chart.chartArea,u="center",d="center";a.y<t.height?d="top":a.y>c.height-t.height&&(d="bottom");var h=(l.left+l.right)/2,f=(l.top+l.bottom)/2;"center"===d?(n=function(e){return e<=h},i=function(e){return e>h}):(n=function(e){return e<=t.width/2},i=function(e){return e>=c.width-t.width/2}),r=function(e){return e+t.width+a.caretSize+a.caretPadding>c.width},s=function(e){return e-t.width-a.caretSize-a.caretPadding<0},o=function(e){return e<=f?"top":"bottom"},n(a.x)?(u="left",r(a.x)&&(u="center",d=o(a.y))):i(a.x)&&(u="right",s(a.x)&&(u="center",d=o(a.y)));var p=e._options;return{xAlign:p.xAlign?p.xAlign:u,yAlign:p.yAlign?p.yAlign:d}}(this,y),d._chart)}else p.opacity=0;return p.xAlign=g.xAlign,p.yAlign=g.yAlign,p.x=_.x,p.y=_.y,p.width=y.width,p.height=y.height,p.caretX=v.x,p.caretY=v.y,d._model=p,e&&h.custom&&h.custom.call(d,p),d},drawCaret:function(e,t){var n=this._chart.ctx,i=this.getCaretPosition(e,t,this._view);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)},getCaretPosition:function(e,t,n){var i,r,s,o,a,c,l=n.caretSize,u=n.cornerRadius,d=n.xAlign,h=n.yAlign,f=e.x,p=e.y,m=t.width,b=t.height;if("center"===h)a=p+b/2,"left"===d?(r=(i=f)-l,s=i,o=a+l,c=a-l):(r=(i=f+m)+l,s=i,o=a-l,c=a+l);else if("left"===d?(i=(r=f+u+l)-l,s=r+l):"right"===d?(i=(r=f+m-u-l)-l,s=r+l):(i=(r=n.caretX)-l,s=r+l),"top"===h)a=(o=p)-l,c=o;else{a=(o=p+b)+l,c=o;var g=s;s=i,i=g}return{x1:i,x2:r,x3:s,y1:o,y2:a,y3:c}},drawTitle:function(e,t,n){var i=t.title;if(i.length){e.x=$t(t,t._titleAlign),n.textAlign=t._titleAlign,n.textBaseline="top";var r,s,o=t.titleFontSize,a=t.titleSpacing;for(n.fillStyle=t.titleFontColor,n.font=ue.fontString(o,t._titleFontStyle,t._titleFontFamily),r=0,s=i.length;r<s;++r)n.fillText(i[r],e.x,e.y),e.y+=o+a,r+1===i.length&&(e.y+=t.titleMarginBottom-a)}},drawBody:function(e,t,n){var i,r=t.bodyFontSize,s=t.bodySpacing,o=t._bodyAlign,a=t.body,c=t.displayColors,l=t.labelColors,u=0,d=c?$t(t,"left"):0;n.textAlign=o,n.textBaseline="top",n.font=ue.fontString(r,t._bodyFontStyle,t._bodyFontFamily),e.x=$t(t,o);var h=function(t){n.fillText(t,e.x+u,e.y),e.y+=r+s};n.fillStyle=t.bodyFontColor,ue.each(t.beforeBody,h),u=c&&"right"!==o?"center"===o?r/2+1:r+2:0,ue.each(a,(function(s,o){n.fillStyle=i=t.labelTextColors[o],ue.each(s.before,h),ue.each(s.lines,(function(s){c&&(n.fillStyle=t.legendColorBackground,n.fillRect(d,e.y,r,r),n.lineWidth=1,n.strokeStyle=l[o].borderColor,n.strokeRect(d,e.y,r,r),n.fillStyle=l[o].backgroundColor,n.fillRect(d+1,e.y+1,r-2,r-2),n.fillStyle=i),h(s)})),ue.each(s.after,h)})),u=0,ue.each(t.afterBody,h),e.y-=s},drawFooter:function(e,t,n){var i=t.footer;i.length&&(e.x=$t(t,t._footerAlign),e.y+=t.footerMarginTop,n.textAlign=t._footerAlign,n.textBaseline="top",n.fillStyle=t.footerFontColor,n.font=ue.fontString(t.footerFontSize,t._footerFontStyle,t._footerFontFamily),ue.each(i,(function(i){n.fillText(i,e.x,e.y),e.y+=t.footerFontSize+t.footerSpacing})))},drawBackground:function(e,t,n,i){n.fillStyle=t.backgroundColor,n.strokeStyle=t.borderColor,n.lineWidth=t.borderWidth;var r=t.xAlign,s=t.yAlign,o=e.x,a=e.y,c=i.width,l=i.height,u=t.cornerRadius;n.beginPath(),n.moveTo(o+u,a),"top"===s&&this.drawCaret(e,i),n.lineTo(o+c-u,a),n.quadraticCurveTo(o+c,a,o+c,a+u),"center"===s&&"right"===r&&this.drawCaret(e,i),n.lineTo(o+c,a+l-u),n.quadraticCurveTo(o+c,a+l,o+c-u,a+l),"bottom"===s&&this.drawCaret(e,i),n.lineTo(o+u,a+l),n.quadraticCurveTo(o,a+l,o,a+l-u),"center"===s&&"left"===r&&this.drawCaret(e,i),n.lineTo(o,a+u),n.quadraticCurveTo(o,a,o+u,a),n.closePath(),n.fill(),t.borderWidth>0&&n.stroke()},draw:function(){var e=this._chart.ctx,t=this._view;if(0!==t.opacity){var n={width:t.width,height:t.height},i={x:t.x,y:t.y},r=Math.abs(t.opacity<.001)?0:t.opacity;this._options.enabled&&(t.title.length||t.beforeBody.length||t.body.length||t.afterBody.length||t.footer.length)&&(e.save(),e.globalAlpha=r,this.drawBackground(i,t,e,n),i.y+=t.yPadding,this.drawTitle(i,t,e),this.drawBody(i,t,e),this.drawFooter(i,t,e),e.restore())}},handleEvent:function(e){var t,n=this,i=n._options;return n._lastActive=n._lastActive||[],n._active="mouseout"===e.type?[]:n._chart.getElementsAtEventForMode(e,i.mode,i),(t=!ue.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(i.enabled||i.custom)&&(n._eventPosition={x:e.x,y:e.y},n.update(!0),n.pivot())),t}});Wt.positioners=jt;var Vt=ue.valueOrDefault;function Bt(){return ue.merge({},[].slice.call(arguments),{merger:function(e,t,n,i){if("xAxes"===e||"yAxes"===e){var r,s,o,a=n[e].length;for(t[e]||(t[e]=[]),r=0;r<a;++r)s=Vt((o=n[e][r]).type,"xAxes"===e?"category":"linear"),r>=t[e].length&&t[e].push({}),ue.merge(t[e][r],!t[e][r].type||o.type&&o.type!==t[e][r].type?[Pt.getScaleDefaults(s),o]:o)}else ue._merger(e,t,n,i)}})}function Ut(){return ue.merge({},[].slice.call(arguments),{merger:function(e,t,n,i){var r=t[e]||{},s=n[e];"scales"===e?t[e]=Bt(r,s):"scale"===e?t[e]=ue.merge(r,[Pt.getScaleDefaults(s.type),s]):ue._merger(e,t,n,i)}})}function Gt(e){var t=e.options;ue.each(e.scales,(function(t){vt.removeBox(e,t)})),t=Ut(ae.global,ae[e.config.type],t),e.options=e.config.options=t,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=t.tooltips,e.tooltip.initialize()}function qt(e){return"top"===e||"bottom"===e}ae._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var Jt=function(e,t){return this.construct(e,t),this};ue.extend(Jt.prototype,{construct:function(e,t){var n=this;t=function(e){var t=(e=e||{}).data=e.data||{};return t.datasets=t.datasets||[],t.labels=t.labels||[],e.options=Ut(ae.global,ae[e.type],e.options||{}),e}(t);var i=At.acquireContext(e,t),r=i&&i.canvas,s=r&&r.height,o=r&&r.width;n.id=ue.uid(),n.ctx=i,n.canvas=r,n.config=t,n.width=o,n.height=s,n.aspectRatio=s?o/s:null,n.options=t.options,n._bufferedRender=!1,n.chart=n,n.controller=n,Jt.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(e){n.config.data=e}}),i&&r?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var e=this;return It.notify(e,"beforeInit"),ue.retinaScale(e,e.options.devicePixelRatio),e.bindEvents(),e.options.responsive&&e.resize(!0),e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.initToolTip(),It.notify(e,"afterInit"),e},clear:function(){return ue.canvas.clear(this),this},stop:function(){return ge.cancelAnimation(this),this},resize:function(e){var t=this,n=t.options,i=t.canvas,r=n.maintainAspectRatio&&t.aspectRatio||null,s=Math.max(0,Math.floor(ue.getMaximumWidth(i))),o=Math.max(0,Math.floor(r?s/r:ue.getMaximumHeight(i)));if((t.width!==s||t.height!==o)&&(i.width=t.width=s,i.height=t.height=o,i.style.width=s+"px",i.style.height=o+"px",ue.retinaScale(t,n.devicePixelRatio),!e)){var a={width:s,height:o};It.notify(t,"resize",[a]),n.onResize&&n.onResize(t,a),t.stop(),t.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var e=this.options,t=e.scales||{},n=e.scale;ue.each(t.xAxes,(function(e,t){e.id=e.id||"x-axis-"+t})),ue.each(t.yAxes,(function(e,t){e.id=e.id||"y-axis-"+t})),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var e=this,t=e.options,n=e.scales||{},i=[],r=Object.keys(n).reduce((function(e,t){return e[t]=!1,e}),{});t.scales&&(i=i.concat((t.scales.xAxes||[]).map((function(e){return{options:e,dtype:"category",dposition:"bottom"}})),(t.scales.yAxes||[]).map((function(e){return{options:e,dtype:"linear",dposition:"left"}})))),t.scale&&i.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),ue.each(i,(function(t){var i=t.options,s=i.id,o=Vt(i.type,t.dtype);qt(i.position)!==qt(t.dposition)&&(i.position=t.dposition),r[s]=!0;var a=null;if(s in n&&n[s].type===o)(a=n[s]).options=i,a.ctx=e.ctx,a.chart=e;else{var c=Pt.getScaleConstructor(o);if(!c)return;a=new c({id:s,type:o,options:i,ctx:e.ctx,chart:e}),n[a.id]=a}a.mergeTicksOptions(),t.isDefault&&(e.scale=a)})),ue.each(r,(function(e,t){e||delete n[t]})),e.scales=n,Pt.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,t=[];return ue.each(e.data.datasets,(function(n,i){var r=e.getDatasetMeta(i),s=n.type||e.config.type;if(r.type&&r.type!==s&&(e.destroyDatasetMeta(i),r=e.getDatasetMeta(i)),r.type=s,r.controller)r.controller.updateIndex(i),r.controller.linkScales();else{var o=ct[r.type];if(void 0===o)throw new Error('"'+r.type+'" is not a chart type.');r.controller=new o(e,i),t.push(r.controller)}}),e),t},resetElements:function(){var e=this;ue.each(e.data.datasets,(function(t,n){e.getDatasetMeta(n).controller.reset()}),e)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(e){var t=this;if(e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]}),Gt(t),It._invalidate(t),!1!==It.notify(t,"beforeUpdate")){t.tooltip._data=t.data;var n=t.buildOrUpdateControllers();ue.each(t.data.datasets,(function(e,n){t.getDatasetMeta(n).controller.buildOrUpdateElements()}),t),t.updateLayout(),t.options.animation&&t.options.animation.duration&&ue.each(n,(function(e){e.reset()})),t.updateDatasets(),t.tooltip.initialize(),t.lastActive=[],It.notify(t,"afterUpdate"),t._bufferedRender?t._bufferedRequest={duration:e.duration,easing:e.easing,lazy:e.lazy}:t.render(e)}},updateLayout:function(){var e=this;!1!==It.notify(e,"beforeLayout")&&(vt.update(this,this.width,this.height),It.notify(e,"afterScaleUpdate"),It.notify(e,"afterLayout"))},updateDatasets:function(){var e=this;if(!1!==It.notify(e,"beforeDatasetsUpdate")){for(var t=0,n=e.data.datasets.length;t<n;++t)e.updateDataset(t);It.notify(e,"afterDatasetsUpdate")}},updateDataset:function(e){var t=this,n=t.getDatasetMeta(e),i={meta:n,index:e};!1!==It.notify(t,"beforeDatasetUpdate",[i])&&(n.controller.update(),It.notify(t,"afterDatasetUpdate",[i]))},render:function(e){var t=this;e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]});var n=t.options.animation,i=Vt(e.duration,n&&n.duration),r=e.lazy;if(!1!==It.notify(t,"beforeRender")){var s=function(e){It.notify(t,"afterRender"),ue.callback(n&&n.onComplete,[e],t)};if(n&&i){var o=new be({numSteps:i/16.66,easing:e.easing||n.easing,render:function(e,t){var n=t.currentStep,i=n/t.numSteps;e.draw((0,ue.easing.effects[t.easing])(i),i,n)},onAnimationProgress:n.onProgress,onAnimationComplete:s});ge.addAnimation(t,o,i,r)}else t.draw(),s(new be({numSteps:0,chart:t}));return t}},draw:function(e){var t=this;t.clear(),ue.isNullOrUndef(e)&&(e=1),t.transition(e),t.width<=0||t.height<=0||!1!==It.notify(t,"beforeDraw",[e])&&(ue.each(t.boxes,(function(e){e.draw(t.chartArea)}),t),t.drawDatasets(e),t._drawTooltip(e),It.notify(t,"afterDraw",[e]))},transition:function(e){for(var t=this,n=0,i=(t.data.datasets||[]).length;n<i;++n)t.isDatasetVisible(n)&&t.getDatasetMeta(n).controller.transition(e);t.tooltip.transition(e)},drawDatasets:function(e){var t=this;if(!1!==It.notify(t,"beforeDatasetsDraw",[e])){for(var n=(t.data.datasets||[]).length-1;n>=0;--n)t.isDatasetVisible(n)&&t.drawDataset(n,e);It.notify(t,"afterDatasetsDraw",[e])}},drawDataset:function(e,t){var n=this,i=n.getDatasetMeta(e),r={meta:i,index:e,easingValue:t};!1!==It.notify(n,"beforeDatasetDraw",[r])&&(i.controller.draw(t),It.notify(n,"afterDatasetDraw",[r]))},_drawTooltip:function(e){var t=this,n=t.tooltip,i={tooltip:n,easingValue:e};!1!==It.notify(t,"beforeTooltipDraw",[i])&&(n.draw(),It.notify(t,"afterTooltipDraw",[i]))},getElementAtEvent:function(e){return mt.modes.single(this,e)},getElementsAtEvent:function(e){return mt.modes.label(this,e,{intersect:!0})},getElementsAtXAxis:function(e){return mt.modes["x-axis"](this,e,{intersect:!0})},getElementsAtEventForMode:function(e,t,n){var i=mt.modes[t];return"function"==typeof i?i(this,e,n):[]},getDatasetAtEvent:function(e){return mt.modes.dataset(this,e,{intersect:!0})},getDatasetMeta:function(e){var t=this,n=t.data.datasets[e];n._meta||(n._meta={});var i=n._meta[t.id];return i||(i=n._meta[t.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),i},getVisibleDatasetCount:function(){for(var e=0,t=0,n=this.data.datasets.length;t<n;++t)this.isDatasetVisible(t)&&e++;return e},isDatasetVisible:function(e){var t=this.getDatasetMeta(e);return"boolean"==typeof t.hidden?!t.hidden:!this.data.datasets[e].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(e){var t=this.id,n=this.data.datasets[e],i=n._meta&&n._meta[t];i&&(i.controller.destroy(),delete n._meta[t])},destroy:function(){var e,t,n=this,i=n.canvas;for(n.stop(),e=0,t=n.data.datasets.length;e<t;++e)n.destroyDatasetMeta(e);i&&(n.unbindEvents(),ue.canvas.clear(n),At.releaseContext(n.ctx),n.canvas=null,n.ctx=null),It.notify(n,"destroy"),delete Jt.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var e=this;e.tooltip=new Wt({_chart:e,_chartInstance:e,_data:e.data,_options:e.options.tooltips},e)},bindEvents:function(){var e=this,t=e._listeners={},n=function(){e.eventHandler.apply(e,arguments)};ue.each(e.options.events,(function(i){At.addEventListener(e,i,n),t[i]=n})),e.options.responsive&&(n=function(){e.resize()},At.addEventListener(e,"resize",n),t.resize=n)},unbindEvents:function(){var e=this,t=e._listeners;t&&(delete e._listeners,ue.each(t,(function(t,n){At.removeEventListener(e,n,t)})))},updateHoverStyle:function(e,t,n){var i,r,s,o=n?"setHoverStyle":"removeHoverStyle";for(r=0,s=e.length;r<s;++r)(i=e[r])&&this.getDatasetMeta(i._datasetIndex).controller[o](i)},eventHandler:function(e){var t=this,n=t.tooltip;if(!1!==It.notify(t,"beforeEvent",[e])){t._bufferedRender=!0,t._bufferedRequest=null;var i=t.handleEvent(e);n&&(i=n._start?n.handleEvent(e):i|n.handleEvent(e)),It.notify(t,"afterEvent",[e]);var r=t._bufferedRequest;return r?t.render(r):i&&!t.animating&&(t.stop(),t.render({duration:t.options.hover.animationDuration,lazy:!0})),t._bufferedRender=!1,t._bufferedRequest=null,t}},handleEvent:function(e){var t,n=this,i=n.options||{},r=i.hover;return n.lastActive=n.lastActive||[],n.active="mouseout"===e.type?[]:n.getElementsAtEventForMode(e,r.mode,r),ue.callback(i.onHover||i.hover.onHover,[e.native,n.active],n),"mouseup"!==e.type&&"click"!==e.type||i.onClick&&i.onClick.call(n,e.native,n.active),n.lastActive.length&&n.updateHoverStyle(n.lastActive,r.mode,!1),n.active.length&&r.mode&&n.updateHoverStyle(n.active,r.mode,!0),t=!ue.arrayEquals(n.active,n.lastActive),n.lastActive=n.active,t}}),Jt.instances={};var Qt=Jt;function Kt(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function Zt(e){this.options=e||{}}Jt.Controller=Jt,Jt.types={},ue.configMerge=Ut,ue.scaleMerge=Bt,ue.extend(Zt.prototype,{formats:Kt,parse:Kt,format:Kt,add:Kt,diff:Kt,startOf:Kt,endOf:Kt,_create:function(e){return e}}),Zt.override=function(e){ue.extend(Zt.prototype,e)};var Xt={_date:Zt},en={formatters:{values:function(e){return ue.isArray(e)?e:""+e},linear:function(e,t,n){var i=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(i)>1&&e!==Math.floor(e)&&(i=e-Math.floor(e));var r=ue.log10(Math.abs(i)),s="";if(0!==e)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var o=ue.log10(Math.abs(e));s=e.toExponential(Math.floor(o)-Math.floor(r))}else{var a=-1*Math.floor(r);a=Math.max(Math.min(a,20),0),s=e.toFixed(a)}else s="0";return s},logarithmic:function(e,t,n){var i=e/Math.pow(10,Math.floor(ue.log10(e)));return 0===e?"0":1===i||2===i||5===i||0===t||t===n.length-1?e.toExponential():""}}},tn=ue.valueOrDefault,nn=ue.valueAtIndexOrDefault;function rn(e){var t,n,i=[];for(t=0,n=e.length;t<n;++t)i.push(e[t].label);return i}function sn(e,t,n){return ue.isArray(t)?ue.longestText(e,n,t):e.measureText(t).width}ae._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:en.formatters.values,minor:{},major:{}}});var on=pe.extend({getPadding:function(){var e=this;return{left:e.paddingLeft||0,top:e.paddingTop||0,right:e.paddingRight||0,bottom:e.paddingBottom||0}},getTicks:function(){return this._ticks},mergeTicksOptions:function(){var e=this.options.ticks;for(var t in!1===e.minor&&(e.minor={display:!1}),!1===e.major&&(e.major={display:!1}),e)"major"!==t&&"minor"!==t&&(void 0===e.minor[t]&&(e.minor[t]=e[t]),void 0===e.major[t]&&(e.major[t]=e[t]))},beforeUpdate:function(){ue.callback(this.options.beforeUpdate,[this])},update:function(e,t,n){var i,r,s,o,a,c,l=this;for(l.beforeUpdate(),l.maxWidth=e,l.maxHeight=t,l.margins=ue.extend({left:0,right:0,top:0,bottom:0},n),l._maxLabelLines=0,l.longestLabelWidth=0,l.longestTextCache=l.longestTextCache||{},l.beforeSetDimensions(),l.setDimensions(),l.afterSetDimensions(),l.beforeDataLimits(),l.determineDataLimits(),l.afterDataLimits(),l.beforeBuildTicks(),a=l.buildTicks()||[],a=l.afterBuildTicks(a)||a,l.beforeTickToLabelConversion(),s=l.convertTicksToLabels(a)||l.ticks,l.afterTickToLabelConversion(),l.ticks=s,i=0,r=s.length;i<r;++i)o=s[i],(c=a[i])?c.label=o:a.push(c={label:o,major:!1});return l._ticks=a,l.beforeCalculateTickRotation(),l.calculateTickRotation(),l.afterCalculateTickRotation(),l.beforeFit(),l.fit(),l.afterFit(),l.afterUpdate(),l.minSize},afterUpdate:function(){ue.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){ue.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0},afterSetDimensions:function(){ue.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){ue.callback(this.options.beforeDataLimits,[this])},determineDataLimits:ue.noop,afterDataLimits:function(){ue.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){ue.callback(this.options.beforeBuildTicks,[this])},buildTicks:ue.noop,afterBuildTicks:function(e){var t=this;return ue.isArray(e)&&e.length?ue.callback(t.options.afterBuildTicks,[t,e]):(t.ticks=ue.callback(t.options.afterBuildTicks,[t,t.ticks])||t.ticks,e)},beforeTickToLabelConversion:function(){ue.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var e=this,t=e.options.ticks;e.ticks=e.ticks.map(t.userCallback||t.callback,this)},afterTickToLabelConversion:function(){ue.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){ue.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var e=this,t=e.ctx,n=e.options.ticks,i=rn(e._ticks),r=ue.options._parseFont(n);t.font=r.string;var s=n.minRotation||0;if(i.length&&e.options.display&&e.isHorizontal())for(var o,a=ue.longestText(t,r.string,i,e.longestTextCache),c=a,l=e.getPixelForTick(1)-e.getPixelForTick(0)-6;c>l&&s<n.maxRotation;){var u=ue.toRadians(s);if(o=Math.cos(u),Math.sin(u)*a>e.maxHeight){s--;break}s++,c=o*a}e.labelRotation=s},afterCalculateTickRotation:function(){ue.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){ue.callback(this.options.beforeFit,[this])},fit:function(){var e=this,t=e.minSize={width:0,height:0},n=rn(e._ticks),i=e.options,r=i.ticks,s=i.scaleLabel,o=i.gridLines,a=e._isVisible(),c=i.position,l=e.isHorizontal(),u=ue.options._parseFont,d=u(r),h=i.gridLines.tickMarkLength;if(t.width=l?e.isFullWidth()?e.maxWidth-e.margins.left-e.margins.right:e.maxWidth:a&&o.drawTicks?h:0,t.height=l?a&&o.drawTicks?h:0:e.maxHeight,s.display&&a){var f=u(s),p=ue.options.toPadding(s.padding),m=f.lineHeight+p.height;l?t.height+=m:t.width+=m}if(r.display&&a){var b=ue.longestText(e.ctx,d.string,n,e.longestTextCache),g=ue.numberOfLabelLines(n),_=.5*d.size,y=e.options.ticks.padding;if(e._maxLabelLines=g,e.longestLabelWidth=b,l){var v=ue.toRadians(e.labelRotation),w=Math.cos(v),S=Math.sin(v);t.height=Math.min(e.maxHeight,t.height+(S*b+d.lineHeight*g+_)+y),e.ctx.font=d.string;var M,k,x=sn(e.ctx,n[0],d.string),D=sn(e.ctx,n[n.length-1],d.string),T=e.getPixelForTick(0)-e.left,C=e.right-e.getPixelForTick(n.length-1);0!==e.labelRotation?(M="bottom"===c?w*x:w*_,k="bottom"===c?w*_:w*D):(M=x/2,k=D/2),e.paddingLeft=Math.max(M-T,0)+3,e.paddingRight=Math.max(k-C,0)+3}else r.mirror?b=0:b+=y+_,t.width=Math.min(e.maxWidth,t.width+b),e.paddingTop=d.size/2,e.paddingBottom=d.size/2}e.handleMargins(),e.width=t.width,e.height=t.height},handleMargins:function(){var e=this;e.margins&&(e.paddingLeft=Math.max(e.paddingLeft-e.margins.left,0),e.paddingTop=Math.max(e.paddingTop-e.margins.top,0),e.paddingRight=Math.max(e.paddingRight-e.margins.right,0),e.paddingBottom=Math.max(e.paddingBottom-e.margins.bottom,0))},afterFit:function(){ue.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(e){if(ue.isNullOrUndef(e))return NaN;if(("number"==typeof e||e instanceof Number)&&!isFinite(e))return NaN;if(e)if(this.isHorizontal()){if(void 0!==e.x)return this.getRightValue(e.x)}else if(void 0!==e.y)return this.getRightValue(e.y);return e},getLabelForIndex:ue.noop,getPixelForValue:ue.noop,getValueForPixel:ue.noop,getPixelForTick:function(e){var t=this,n=t.options.offset;if(t.isHorizontal()){var i=(t.width-(t.paddingLeft+t.paddingRight))/Math.max(t._ticks.length-(n?0:1),1),r=i*e+t.paddingLeft;return n&&(r+=i/2),t.left+r+(t.isFullWidth()?t.margins.left:0)}return t.top+e*((t.height-(t.paddingTop+t.paddingBottom))/(t._ticks.length-1))},getPixelForDecimal:function(e){var t=this;return t.isHorizontal()?t.left+((t.width-(t.paddingLeft+t.paddingRight))*e+t.paddingLeft)+(t.isFullWidth()?t.margins.left:0):t.top+e*t.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var e=this,t=e.min,n=e.max;return e.beginAtZero?0:t<0&&n<0?n:t>0&&n>0?t:0},_autoSkip:function(e){var t,n,i=this,r=i.isHorizontal(),s=e.length,o=!1,a=i.options.ticks.minor.maxTicksLimit,c=i._tickSize()*(s-1),l=r?i.width-(i.paddingLeft+i.paddingRight):i.height-(i.paddingTop+i.PaddingBottom),u=[];for(c>l&&(o=1+Math.floor(c/l)),s>a&&(o=Math.max(o,1+Math.floor(s/a))),t=0;t<s;t++)n=e[t],o>1&&t%o>0&&delete n.label,u.push(n);return u},_tickSize:function(){var e=this,t=e.isHorizontal(),n=e.options.ticks.minor,i=ue.toRadians(e.labelRotation),r=Math.abs(Math.cos(i)),s=Math.abs(Math.sin(i)),o=n.autoSkipPadding||0,a=e.longestLabelWidth+o||0,c=ue.options._parseFont(n),l=e._maxLabelLines*c.lineHeight+o||0;return t?l*r>a*s?a/r:l/s:l*s<a*r?l/r:a/s},_isVisible:function(){var e,t,n,i=this,r=i.chart,s=i.options.display;if("auto"!==s)return!!s;for(e=0,t=r.data.datasets.length;e<t;++e)if(r.isDatasetVisible(e)&&((n=r.getDatasetMeta(e)).xAxisID===i.id||n.yAxisID===i.id))return!0;return!1},draw:function(e){var t=this,n=t.options;if(t._isVisible()){var i,r,s,o=t.chart,a=t.ctx,c=ae.global.defaultFontColor,l=n.ticks.minor,u=n.ticks.major||l,d=n.gridLines,h=n.scaleLabel,f=n.position,p=0!==t.labelRotation,m=l.mirror,b=t.isHorizontal(),g=ue.options._parseFont,_=l.display&&l.autoSkip?t._autoSkip(t.getTicks()):t.getTicks(),y=tn(l.fontColor,c),v=g(l),w=v.lineHeight,S=tn(u.fontColor,c),M=g(u),k=l.padding,x=l.labelOffset,D=d.drawTicks?d.tickMarkLength:0,T=tn(h.fontColor,c),C=g(h),O=ue.options.toPadding(h.padding),L=ue.toRadians(t.labelRotation),R=[],E=d.drawBorder?nn(d.lineWidth,0,0):0,A=ue._alignPixel;if("top"===f?(i=A(o,t.bottom,E),r=t.bottom-D,s=i-E/2):"bottom"===f?(i=A(o,t.top,E),r=i+E/2,s=t.top+D):"left"===f?(i=A(o,t.right,E),r=t.right-D,s=i-E/2):(i=A(o,t.left,E),r=i+E/2,s=t.left+D),ue.each(_,(function(i,a){if(!ue.isNullOrUndef(i.label)){var c,l,u,h,g,_,y,v,S,M,T,C,O,I,P,N,j=i.label;a===t.zeroLineIndex&&n.offset===d.offsetGridLines?(c=d.zeroLineWidth,l=d.zeroLineColor,u=d.zeroLineBorderDash||[],h=d.zeroLineBorderDashOffset||0):(c=nn(d.lineWidth,a),l=nn(d.color,a),u=d.borderDash||[],h=d.borderDashOffset||0);var F=ue.isArray(j)?j.length:1,Y=function(e,t,n){var i=e.getPixelForTick(t);return n&&(1===e.getTicks().length?i-=e.isHorizontal()?Math.max(i-e.left,e.right-i):Math.max(i-e.top,e.bottom-i):i-=0===t?(e.getPixelForTick(1)-i)/2:(i-e.getPixelForTick(t-1))/2),i}(t,a,d.offsetGridLines);if(b){var z=D+k;Y<t.left-1e-7&&(l="rgba(0,0,0,0)"),g=y=S=T=A(o,Y,c),_=r,v=s,O=t.getPixelForTick(a)+x,"top"===f?(M=A(o,e.top,E)+E/2,C=e.bottom,P=((p?1:.5)-F)*w,N=p?"left":"center",I=t.bottom-z):(M=e.top,C=A(o,e.bottom,E)-E/2,P=(p?0:.5)*w,N=p?"right":"center",I=t.top+z)}else{var $=(m?0:D)+k;Y<t.top-1e-7&&(l="rgba(0,0,0,0)"),g=r,y=s,_=v=M=C=A(o,Y,c),I=t.getPixelForTick(a)+x,P=(1-F)*w/2,"left"===f?(S=A(o,e.left,E)+E/2,T=e.right,N=m?"left":"right",O=t.right-$):(S=e.left,T=A(o,e.right,E)-E/2,N=m?"right":"left",O=t.left+$)}R.push({tx1:g,ty1:_,tx2:y,ty2:v,x1:S,y1:M,x2:T,y2:C,labelX:O,labelY:I,glWidth:c,glColor:l,glBorderDash:u,glBorderDashOffset:h,rotation:-1*L,label:j,major:i.major,textOffset:P,textAlign:N})}})),ue.each(R,(function(e){var t=e.glWidth,n=e.glColor;if(d.display&&t&&n&&(a.save(),a.lineWidth=t,a.strokeStyle=n,a.setLineDash&&(a.setLineDash(e.glBorderDash),a.lineDashOffset=e.glBorderDashOffset),a.beginPath(),d.drawTicks&&(a.moveTo(e.tx1,e.ty1),a.lineTo(e.tx2,e.ty2)),d.drawOnChartArea&&(a.moveTo(e.x1,e.y1),a.lineTo(e.x2,e.y2)),a.stroke(),a.restore()),l.display){a.save(),a.translate(e.labelX,e.labelY),a.rotate(e.rotation),a.font=e.major?M.string:v.string,a.fillStyle=e.major?S:y,a.textBaseline="middle",a.textAlign=e.textAlign;var i=e.label,r=e.textOffset;if(ue.isArray(i))for(var s=0;s<i.length;++s)a.fillText(""+i[s],0,r),r+=w;else a.fillText(i,0,r);a.restore()}})),h.display){var I,P,N=0,j=C.lineHeight/2;if(b)I=t.left+(t.right-t.left)/2,P="bottom"===f?t.bottom-j-O.bottom:t.top+j+O.top;else{var F="left"===f;I=F?t.left+j+O.top:t.right-j-O.top,P=t.top+(t.bottom-t.top)/2,N=F?-.5*Math.PI:.5*Math.PI}a.save(),a.translate(I,P),a.rotate(N),a.textAlign="center",a.textBaseline="middle",a.fillStyle=T,a.font=C.string,a.fillText(h.labelString,0,0),a.restore()}if(E){var Y,z,$,H,W=E,V=nn(d.lineWidth,_.length-1,0);b?(Y=A(o,t.left,W)-W/2,z=A(o,t.right,V)+V/2,$=H=i):($=A(o,t.top,W)-W/2,H=A(o,t.bottom,V)+V/2,Y=z=i),a.lineWidth=E,a.strokeStyle=nn(d.color,0),a.beginPath(),a.moveTo(Y,$),a.lineTo(z,H),a.stroke()}}}}),an=on.extend({getLabels:function(){var e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels},determineDataLimits:function(){var e,t=this,n=t.getLabels();t.minIndex=0,t.maxIndex=n.length-1,void 0!==t.options.ticks.min&&(e=n.indexOf(t.options.ticks.min),t.minIndex=-1!==e?e:t.minIndex),void 0!==t.options.ticks.max&&(e=n.indexOf(t.options.ticks.max),t.maxIndex=-1!==e?e:t.maxIndex),t.min=n[t.minIndex],t.max=n[t.maxIndex]},buildTicks:function(){var e=this,t=e.getLabels();e.ticks=0===e.minIndex&&e.maxIndex===t.length-1?t:t.slice(e.minIndex,e.maxIndex+1)},getLabelForIndex:function(e,t){var n=this,i=n.chart;return i.getDatasetMeta(t).controller._getValueScaleId()===n.id?n.getRightValue(i.data.datasets[t].data[e]):n.ticks[e-n.minIndex]},getPixelForValue:function(e,t){var n,i=this,r=i.options.offset,s=Math.max(i.maxIndex+1-i.minIndex-(r?0:1),1);if(null!=e&&(n=i.isHorizontal()?e.x:e.y),void 0!==n||void 0!==e&&isNaN(t)){var o=i.getLabels().indexOf(e=n||e);t=-1!==o?o:t}if(i.isHorizontal()){var a=i.width/s,c=a*(t-i.minIndex);return r&&(c+=a/2),i.left+c}var l=i.height/s,u=l*(t-i.minIndex);return r&&(u+=l/2),i.top+u},getPixelForTick:function(e){return this.getPixelForValue(this.ticks[e],e+this.minIndex,null)},getValueForPixel:function(e){var t=this,n=t.options.offset,i=Math.max(t._ticks.length-(n?0:1),1),r=t.isHorizontal(),s=(r?t.width:t.height)/i;return e-=r?t.left:t.top,n&&(e-=s/2),(e<=0?0:Math.round(e/s))+t.minIndex},getBasePixel:function(){return this.bottom}});an._defaults={position:"bottom"};var cn=ue.isNullOrUndef,ln=on.extend({getRightValue:function(e){return"string"==typeof e?+e:on.prototype.getRightValue.call(this,e)},handleTickRangeOptions:function(){var e=this,t=e.options.ticks;if(t.beginAtZero){var n=ue.sign(e.min),i=ue.sign(e.max);n<0&&i<0?e.max=0:n>0&&i>0&&(e.min=0)}var r=void 0!==t.min||void 0!==t.suggestedMin,s=void 0!==t.max||void 0!==t.suggestedMax;void 0!==t.min?e.min=t.min:void 0!==t.suggestedMin&&(e.min=null===e.min?t.suggestedMin:Math.min(e.min,t.suggestedMin)),void 0!==t.max?e.max=t.max:void 0!==t.suggestedMax&&(e.max=null===e.max?t.suggestedMax:Math.max(e.max,t.suggestedMax)),r!==s&&e.min>=e.max&&(r?e.max=e.min+1:e.min=e.max-1),e.min===e.max&&(e.max++,t.beginAtZero||e.min--)},getTickLimit:function(){var e,t=this,n=t.options.ticks,i=n.stepSize,r=n.maxTicksLimit;return i?e=Math.ceil(t.max/i)-Math.floor(t.min/i)+1:(e=t._computeTickLimit(),r=r||11),r&&(e=Math.min(r,e)),e},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:ue.noop,buildTicks:function(){var e=this,t=e.options.ticks,n=e.getTickLimit(),i={maxTicks:n=Math.max(2,n),min:t.min,max:t.max,precision:t.precision,stepSize:ue.valueOrDefault(t.fixedStepSize,t.stepSize)},r=e.ticks=function(e,t){var n,i,r,s,o=[],a=e.stepSize,c=a||1,l=e.maxTicks-1,u=e.min,d=e.max,h=e.precision,f=t.min,p=t.max,m=ue.niceNum((p-f)/l/c)*c;if(m<1e-14&&cn(u)&&cn(d))return[f,p];(s=Math.ceil(p/m)-Math.floor(f/m))>l&&(m=ue.niceNum(s*m/l/c)*c),a||cn(h)?n=Math.pow(10,ue._decimalPlaces(m)):(n=Math.pow(10,h),m=Math.ceil(m*n)/n),i=Math.floor(f/m)*m,r=Math.ceil(p/m)*m,a&&(!cn(u)&&ue.almostWhole(u/m,m/1e3)&&(i=u),!cn(d)&&ue.almostWhole(d/m,m/1e3)&&(r=d)),s=ue.almostEquals(s=(r-i)/m,Math.round(s),m/1e3)?Math.round(s):Math.ceil(s),i=Math.round(i*n)/n,r=Math.round(r*n)/n,o.push(cn(u)?i:u);for(var b=1;b<s;++b)o.push(Math.round((i+b*m)*n)/n);return o.push(cn(d)?r:d),o}(i,e);e.handleDirectionalChanges(),e.max=ue.max(r),e.min=ue.min(r),t.reverse?(r.reverse(),e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),on.prototype.convertTicksToLabels.call(e)}}),un={position:"left",ticks:{callback:en.formatters.linear}},dn=ln.extend({determineDataLimits:function(){var e=this,t=e.options,n=e.chart,i=n.data.datasets,r=e.isHorizontal();function s(t){return r?t.xAxisID===e.id:t.yAxisID===e.id}e.min=null,e.max=null;var o=t.stacked;if(void 0===o&&ue.each(i,(function(e,t){if(!o){var i=n.getDatasetMeta(t);n.isDatasetVisible(t)&&s(i)&&void 0!==i.stack&&(o=!0)}})),t.stacked||o){var a={};ue.each(i,(function(i,r){var o=n.getDatasetMeta(r),c=[o.type,void 0===t.stacked&&void 0===o.stack?r:"",o.stack].join(".");void 0===a[c]&&(a[c]={positiveValues:[],negativeValues:[]});var l=a[c].positiveValues,u=a[c].negativeValues;n.isDatasetVisible(r)&&s(o)&&ue.each(i.data,(function(n,i){var r=+e.getRightValue(n);isNaN(r)||o.data[i].hidden||(l[i]=l[i]||0,u[i]=u[i]||0,t.relativePoints?l[i]=100:r<0?u[i]+=r:l[i]+=r)}))})),ue.each(a,(function(t){var n=t.positiveValues.concat(t.negativeValues),i=ue.min(n),r=ue.max(n);e.min=null===e.min?i:Math.min(e.min,i),e.max=null===e.max?r:Math.max(e.max,r)}))}else ue.each(i,(function(t,i){var r=n.getDatasetMeta(i);n.isDatasetVisible(i)&&s(r)&&ue.each(t.data,(function(t,n){var i=+e.getRightValue(t);isNaN(i)||r.data[n].hidden||((null===e.min||i<e.min)&&(e.min=i),(null===e.max||i>e.max)&&(e.max=i))}))}));e.min=isFinite(e.min)&&!isNaN(e.min)?e.min:0,e.max=isFinite(e.max)&&!isNaN(e.max)?e.max:1,this.handleTickRangeOptions()},_computeTickLimit:function(){var e,t=this;return t.isHorizontal()?Math.ceil(t.width/40):(e=ue.options._parseFont(t.options.ticks),Math.ceil(t.height/e.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(e,t){return+this.getRightValue(this.chart.data.datasets[t].data[e])},getPixelForValue:function(e){var t=this,n=t.start,i=+t.getRightValue(e),r=t.end-n;return t.isHorizontal()?t.left+t.width/r*(i-n):t.bottom-t.height/r*(i-n)},getValueForPixel:function(e){var t=this,n=t.isHorizontal();return t.start+(n?e-t.left:t.bottom-e)/(n?t.width:t.height)*(t.end-t.start)},getPixelForTick:function(e){return this.getPixelForValue(this.ticksAsNumbers[e])}});dn._defaults=un;var hn=ue.valueOrDefault,fn={position:"left",ticks:{callback:en.formatters.logarithmic}};function pn(e,t){return ue.isFinite(e)&&e>=0?e:t}var mn=on.extend({determineDataLimits:function(){var e=this,t=e.options,n=e.chart,i=n.data.datasets,r=e.isHorizontal();function s(t){return r?t.xAxisID===e.id:t.yAxisID===e.id}e.min=null,e.max=null,e.minNotZero=null;var o=t.stacked;if(void 0===o&&ue.each(i,(function(e,t){if(!o){var i=n.getDatasetMeta(t);n.isDatasetVisible(t)&&s(i)&&void 0!==i.stack&&(o=!0)}})),t.stacked||o){var a={};ue.each(i,(function(i,r){var o=n.getDatasetMeta(r),c=[o.type,void 0===t.stacked&&void 0===o.stack?r:"",o.stack].join(".");n.isDatasetVisible(r)&&s(o)&&(void 0===a[c]&&(a[c]=[]),ue.each(i.data,(function(t,n){var i=a[c],r=+e.getRightValue(t);isNaN(r)||o.data[n].hidden||r<0||(i[n]=i[n]||0,i[n]+=r)})))})),ue.each(a,(function(t){if(t.length>0){var n=ue.min(t),i=ue.max(t);e.min=null===e.min?n:Math.min(e.min,n),e.max=null===e.max?i:Math.max(e.max,i)}}))}else ue.each(i,(function(t,i){var r=n.getDatasetMeta(i);n.isDatasetVisible(i)&&s(r)&&ue.each(t.data,(function(t,n){var i=+e.getRightValue(t);isNaN(i)||r.data[n].hidden||i<0||((null===e.min||i<e.min)&&(e.min=i),(null===e.max||i>e.max)&&(e.max=i),0!==i&&(null===e.minNotZero||i<e.minNotZero)&&(e.minNotZero=i))}))}));this.handleTickRangeOptions()},handleTickRangeOptions:function(){var e=this,t=e.options.ticks;e.min=pn(t.min,e.min),e.max=pn(t.max,e.max),e.min===e.max&&(0!==e.min&&null!==e.min?(e.min=Math.pow(10,Math.floor(ue.log10(e.min))-1),e.max=Math.pow(10,Math.floor(ue.log10(e.max))+1)):(e.min=1,e.max=10)),null===e.min&&(e.min=Math.pow(10,Math.floor(ue.log10(e.max))-1)),null===e.max&&(e.max=0!==e.min?Math.pow(10,Math.floor(ue.log10(e.min))+1):10),null===e.minNotZero&&(e.minNotZero=e.min>0?e.min:e.max<1?Math.pow(10,Math.floor(ue.log10(e.max))):1)},buildTicks:function(){var e=this,t=e.options.ticks,n=!e.isHorizontal(),i={min:pn(t.min),max:pn(t.max)},r=e.ticks=function(e,t){var n,i,r=[],s=hn(e.min,Math.pow(10,Math.floor(ue.log10(t.min)))),o=Math.floor(ue.log10(t.max)),a=Math.ceil(t.max/Math.pow(10,o));0===s?(n=Math.floor(ue.log10(t.minNotZero)),i=Math.floor(t.minNotZero/Math.pow(10,n)),r.push(s),s=i*Math.pow(10,n)):(n=Math.floor(ue.log10(s)),i=Math.floor(s/Math.pow(10,n)));var c=n<0?Math.pow(10,Math.abs(n)):1;do{r.push(s),10==++i&&(i=1,c=++n>=0?1:c),s=Math.round(i*Math.pow(10,n)*c)/c}while(n<o||n===o&&i<a);var l=hn(e.max,s);return r.push(l),r}(i,e);e.max=ue.max(r),e.min=ue.min(r),t.reverse?(n=!n,e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max),n&&r.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),on.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(e,t){return+this.getRightValue(this.chart.data.datasets[t].data[e])},getPixelForTick:function(e){return this.getPixelForValue(this.tickValues[e])},_getFirstTickValue:function(e){var t=Math.floor(ue.log10(e));return Math.floor(e/Math.pow(10,t))*Math.pow(10,t)},getPixelForValue:function(e){var t,n,i,r,s,o=this,a=o.options.ticks,c=a.reverse,l=ue.log10,u=o._getFirstTickValue(o.minNotZero),d=0;return e=+o.getRightValue(e),c?(i=o.end,r=o.start,s=-1):(i=o.start,r=o.end,s=1),o.isHorizontal()?(t=o.width,n=c?o.right:o.left):(t=o.height,s*=-1,n=c?o.top:o.bottom),e!==i&&(0===i&&(t-=d=hn(a.fontSize,ae.global.defaultFontSize),i=u),0!==e&&(d+=t/(l(r)-l(i))*(l(e)-l(i))),n+=s*d),n},getValueForPixel:function(e){var t,n,i,r,s=this,o=s.options.ticks,a=o.reverse,c=ue.log10,l=s._getFirstTickValue(s.minNotZero);if(a?(n=s.end,i=s.start):(n=s.start,i=s.end),s.isHorizontal()?(t=s.width,r=a?s.right-e:e-s.left):(t=s.height,r=a?e-s.top:s.bottom-e),r!==n){if(0===n){var u=hn(o.fontSize,ae.global.defaultFontSize);r-=u,t-=u,n=l}r*=c(i)-c(n),r/=t,r=Math.pow(10,c(n)+r)}return r}});mn._defaults=fn;var bn=ue.valueOrDefault,gn=ue.valueAtIndexOrDefault,_n=ue.options.resolve,yn={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:en.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(e){return e}}};function vn(e){var t=e.options;return t.angleLines.display||t.pointLabels.display?e.chart.data.labels.length:0}function wn(e){var t=e.ticks;return t.display&&e.display?bn(t.fontSize,ae.global.defaultFontSize)+2*t.backdropPaddingY:0}function Sn(e,t,n,i,r){return e===i||e===r?{start:t-n/2,end:t+n/2}:e<i||e>r?{start:t-n,end:t}:{start:t,end:t+n}}function Mn(e){return 0===e||180===e?"center":e<180?"left":"right"}function kn(e,t,n,i){var r,s,o=n.y+i/2;if(ue.isArray(t))for(r=0,s=t.length;r<s;++r)e.fillText(t[r],n.x,o),o+=i;else e.fillText(t,n.x,o)}function xn(e,t,n){90===e||270===e?n.y-=t.h/2:(e>270||e<90)&&(n.y-=t.h)}function Dn(e){return ue.isNumber(e)?e:0}var Tn=ln.extend({setDimensions:function(){var e=this;e.width=e.maxWidth,e.height=e.maxHeight,e.paddingTop=wn(e.options)/2,e.xCenter=Math.floor(e.width/2),e.yCenter=Math.floor((e.height-e.paddingTop)/2),e.drawingArea=Math.min(e.height-e.paddingTop,e.width)/2},determineDataLimits:function(){var e=this,t=e.chart,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;ue.each(t.data.datasets,(function(r,s){if(t.isDatasetVisible(s)){var o=t.getDatasetMeta(s);ue.each(r.data,(function(t,r){var s=+e.getRightValue(t);isNaN(s)||o.data[r].hidden||(n=Math.min(s,n),i=Math.max(s,i))}))}})),e.min=n===Number.POSITIVE_INFINITY?0:n,e.max=i===Number.NEGATIVE_INFINITY?0:i,e.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/wn(this.options))},convertTicksToLabels:function(){var e=this;ln.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map(e.options.pointLabels.callback,e)},getLabelForIndex:function(e,t){return+this.getRightValue(this.chart.data.datasets[t].data[e])},fit:function(){var e=this,t=e.options;t.display&&t.pointLabels.display?function(e){var t,n,i,r=ue.options._parseFont(e.options.pointLabels),s={l:0,r:e.width,t:0,b:e.height-e.paddingTop},o={};e.ctx.font=r.string,e._pointLabelSizes=[];var a,c,l,u=vn(e);for(t=0;t<u;t++){i=e.getPointPosition(t,e.drawingArea+5),a=e.ctx,c=r.lineHeight,n=ue.isArray(l=e.pointLabels[t]||"")?{w:ue.longestText(a,a.font,l),h:l.length*c}:{w:a.measureText(l).width,h:c},e._pointLabelSizes[t]=n;var d=e.getIndexAngle(t),h=ue.toDegrees(d)%360,f=Sn(h,i.x,n.w,0,180),p=Sn(h,i.y,n.h,90,270);f.start<s.l&&(s.l=f.start,o.l=d),f.end>s.r&&(s.r=f.end,o.r=d),p.start<s.t&&(s.t=p.start,o.t=d),p.end>s.b&&(s.b=p.end,o.b=d)}e.setReductions(e.drawingArea,s,o)}(e):e.setCenterPoint(0,0,0,0)},setReductions:function(e,t,n){var i=this,r=t.l/Math.sin(n.l),s=Math.max(t.r-i.width,0)/Math.sin(n.r),o=-t.t/Math.cos(n.t),a=-Math.max(t.b-(i.height-i.paddingTop),0)/Math.cos(n.b);r=Dn(r),s=Dn(s),o=Dn(o),a=Dn(a),i.drawingArea=Math.min(Math.floor(e-(r+s)/2),Math.floor(e-(o+a)/2)),i.setCenterPoint(r,s,o,a)},setCenterPoint:function(e,t,n,i){var r=this,s=n+r.drawingArea,o=r.height-r.paddingTop-i-r.drawingArea;r.xCenter=Math.floor((e+r.drawingArea+(r.width-t-r.drawingArea))/2+r.left),r.yCenter=Math.floor((s+o)/2+r.top+r.paddingTop)},getIndexAngle:function(e){return e*(2*Math.PI/vn(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(e){var t=this;if(null===e)return 0;var n=t.drawingArea/(t.max-t.min);return t.options.ticks.reverse?(t.max-e)*n:(e-t.min)*n},getPointPosition:function(e,t){var n=this,i=n.getIndexAngle(e)-Math.PI/2;return{x:Math.cos(i)*t+n.xCenter,y:Math.sin(i)*t+n.yCenter}},getPointPositionForValue:function(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))},getBasePosition:function(){var e=this,t=e.min,n=e.max;return e.getPointPositionForValue(0,e.beginAtZero?0:t<0&&n<0?n:t>0&&n>0?t:0)},draw:function(){var e=this,t=e.options,n=t.gridLines,i=t.ticks;if(t.display){var r=e.ctx,s=this.getIndexAngle(0),o=ue.options._parseFont(i);(t.angleLines.display||t.pointLabels.display)&&function(e){var t=e.ctx,n=e.options,i=n.angleLines,r=n.gridLines,s=n.pointLabels,o=bn(i.lineWidth,r.lineWidth),a=bn(i.color,r.color),c=wn(n);t.save(),t.lineWidth=o,t.strokeStyle=a,t.setLineDash&&(t.setLineDash(_n([i.borderDash,r.borderDash,[]])),t.lineDashOffset=_n([i.borderDashOffset,r.borderDashOffset,0]));var l=e.getDistanceFromCenterForValue(n.ticks.reverse?e.min:e.max),u=ue.options._parseFont(s);t.font=u.string,t.textBaseline="middle";for(var d=vn(e)-1;d>=0;d--){if(i.display&&o&&a){var h=e.getPointPosition(d,l);t.beginPath(),t.moveTo(e.xCenter,e.yCenter),t.lineTo(h.x,h.y),t.stroke()}if(s.display){var f=e.getPointPosition(d,l+(0===d?c/2:0)+5),p=gn(s.fontColor,d,ae.global.defaultFontColor);t.fillStyle=p;var m=e.getIndexAngle(d),b=ue.toDegrees(m);t.textAlign=Mn(b),xn(b,e._pointLabelSizes[d],f),kn(t,e.pointLabels[d]||"",f,u.lineHeight)}}t.restore()}(e),ue.each(e.ticks,(function(t,a){if(a>0||i.reverse){var c=e.getDistanceFromCenterForValue(e.ticksAsNumbers[a]);if(n.display&&0!==a&&function(e,t,n,i){var r,s=e.ctx,o=t.circular,a=vn(e),c=gn(t.color,i-1),l=gn(t.lineWidth,i-1);if((o||a)&&c&&l){if(s.save(),s.strokeStyle=c,s.lineWidth=l,s.setLineDash&&(s.setLineDash(t.borderDash||[]),s.lineDashOffset=t.borderDashOffset||0),s.beginPath(),o)s.arc(e.xCenter,e.yCenter,n,0,2*Math.PI);else{r=e.getPointPosition(0,n),s.moveTo(r.x,r.y);for(var u=1;u<a;u++)r=e.getPointPosition(u,n),s.lineTo(r.x,r.y)}s.closePath(),s.stroke(),s.restore()}}(e,n,c,a),i.display){var l=bn(i.fontColor,ae.global.defaultFontColor);if(r.font=o.string,r.save(),r.translate(e.xCenter,e.yCenter),r.rotate(s),i.showLabelBackdrop){var u=r.measureText(t).width;r.fillStyle=i.backdropColor,r.fillRect(-u/2-i.backdropPaddingX,-c-o.size/2-i.backdropPaddingY,u+2*i.backdropPaddingX,o.size+2*i.backdropPaddingY)}r.textAlign="center",r.textBaseline="middle",r.fillStyle=l,r.fillText(t,0,-c),r.restore()}}}))}}});Tn._defaults=yn;var Cn=ue.valueOrDefault,On=Number.MIN_SAFE_INTEGER||-9007199254740991,Ln=Number.MAX_SAFE_INTEGER||9007199254740991,Rn={millisecond:{common:!0,size:1,steps:[1,2,5,10,20,50,100,250,500]},second:{common:!0,size:1e3,steps:[1,2,5,10,15,30]},minute:{common:!0,size:6e4,steps:[1,2,5,10,15,30]},hour:{common:!0,size:36e5,steps:[1,2,3,6,12]},day:{common:!0,size:864e5,steps:[1,2,5]},week:{common:!1,size:6048e5,steps:[1,2,3,4]},month:{common:!0,size:2628e6,steps:[1,2,3]},quarter:{common:!1,size:7884e6,steps:[1,2,3,4]},year:{common:!0,size:3154e7}},En=Object.keys(Rn);function An(e,t){return e-t}function In(e){var t,n,i,r={},s=[];for(t=0,n=e.length;t<n;++t)r[i=e[t]]||(r[i]=!0,s.push(i));return s}function Pn(e,t,n,i){var r=function(e,t,n){for(var i,r,s,o=0,a=e.length-1;o>=0&&o<=a;){if(s=e[i=o+a>>1],!(r=e[i-1]||null))return{lo:null,hi:s};if(s[t]<n)o=i+1;else{if(!(r[t]>n))return{lo:r,hi:s};a=i-1}}return{lo:s,hi:null}}(e,t,n),s=r.lo?r.hi?r.lo:e[e.length-2]:e[0],o=r.lo?r.hi?r.hi:e[e.length-1]:e[1],a=o[t]-s[t];return s[i]+(o[i]-s[i])*(a?(n-s[t])/a:0)}function Nn(e,t){var n=e._adapter,i=e.options.time,r=i.parser,s=r||i.format,o=t;return"function"==typeof r&&(o=r(o)),ue.isFinite(o)||(o="string"==typeof s?n.parse(o,s):n.parse(o)),null!==o?+o:(r||"function"!=typeof s||(o=s(t),ue.isFinite(o)||(o=n.parse(o))),o)}function jn(e,t){if(ue.isNullOrUndef(t))return null;var n=e.options.time,i=Nn(e,e.getRightValue(t));return null===i||n.round&&(i=+e._adapter.startOf(i,n.round)),i}function Fn(e){for(var t=En.indexOf(e)+1,n=En.length;t<n;++t)if(Rn[En[t]].common)return En[t]}var Yn=on.extend({initialize:function(){this.mergeTicksOptions(),on.prototype.initialize.call(this)},update:function(){var e=this,t=e.options,n=t.time||(t.time={}),i=e._adapter=new Xt._date(t.adapters.date);return n.format&&console.warn("options.time.format is deprecated and replaced by options.time.parser."),ue.mergeIf(n.displayFormats,i.formats()),on.prototype.update.apply(e,arguments)},getRightValue:function(e){return e&&void 0!==e.t&&(e=e.t),on.prototype.getRightValue.call(this,e)},determineDataLimits:function(){var e,t,n,i,r,s,o=this,a=o.chart,c=o._adapter,l=o.options.time,u=l.unit||"day",d=Ln,h=On,f=[],p=[],m=[],b=a.data.labels||[];for(e=0,n=b.length;e<n;++e)m.push(jn(o,b[e]));for(e=0,n=(a.data.datasets||[]).length;e<n;++e)if(a.isDatasetVisible(e))if(ue.isObject((r=a.data.datasets[e].data)[0]))for(p[e]=[],t=0,i=r.length;t<i;++t)s=jn(o,r[t]),f.push(s),p[e][t]=s;else{for(t=0,i=m.length;t<i;++t)f.push(m[t]);p[e]=m.slice(0)}else p[e]=[];m.length&&(m=In(m).sort(An),d=Math.min(d,m[0]),h=Math.max(h,m[m.length-1])),f.length&&(f=In(f).sort(An),d=Math.min(d,f[0]),h=Math.max(h,f[f.length-1])),d=jn(o,l.min)||d,h=jn(o,l.max)||h,d=d===Ln?+c.startOf(Date.now(),u):d,h=h===On?+c.endOf(Date.now(),u)+1:h,o.min=Math.min(d,h),o.max=Math.max(d+1,h),o._horizontal=o.isHorizontal(),o._table=[],o._timestamps={data:f,datasets:p,labels:m}},buildTicks:function(){var e,t,n,i=this,r=i.min,s=i.max,o=i.options,a=o.time,c=[],l=[];switch(o.ticks.source){case"data":c=i._timestamps.data;break;case"labels":c=i._timestamps.labels;break;case"auto":default:c=function(e,t,n,i){var r,s=e._adapter,o=e.options,a=o.time,c=a.unit||function(e,t,n,i){var r,s,o=En.length;for(r=En.indexOf(e);r<o-1;++r)if((s=Rn[En[r]]).common&&Math.ceil((n-t)/((s.steps?s.steps[s.steps.length-1]:Ln)*s.size))<=i)return En[r];return En[o-1]}(a.minUnit,t,n,i),l=Fn(c),u=Cn(a.stepSize,a.unitStepSize),d="week"===c&&a.isoWeekday,h=o.ticks.major.enabled,f=Rn[c],p=t,m=n,b=[];for(u||(u=function(e,t,n,i){var r,s,o,a=t-e,c=Rn[n],l=c.size,u=c.steps;if(!u)return Math.ceil(a/(i*l));for(r=0,s=u.length;r<s&&(o=u[r],!(Math.ceil(a/(l*o))<=i));++r);return o}(t,n,c,i)),d&&(p=+s.startOf(p,"isoWeek",d),m=+s.startOf(m,"isoWeek",d)),p=+s.startOf(p,d?"day":c),(m=+s.startOf(m,d?"day":c))<n&&(m=+s.add(m,1,c)),r=p,h&&l&&!d&&!a.round&&(r=+s.startOf(r,l),r=+s.add(r,~~((p-r)/(f.size*u))*u,c));r<m;r=+s.add(r,u,c))b.push(+r);return b.push(+r),b}(i,r,s,i.getLabelCapacity(r))}for("ticks"===o.bounds&&c.length&&(r=c[0],s=c[c.length-1]),r=jn(i,a.min)||r,s=jn(i,a.max)||s,e=0,t=c.length;e<t;++e)(n=c[e])>=r&&n<=s&&l.push(n);return i.min=r,i.max=s,i._unit=a.unit||function(e,t,n,i,r){var s,o;for(s=En.length-1;s>=En.indexOf(n);s--)if(Rn[o=En[s]].common&&e._adapter.diff(r,i,o)>=t.length)return o;return En[n?En.indexOf(n):0]}(i,l,a.minUnit,i.min,i.max),i._majorUnit=Fn(i._unit),i._table=function(e,t,n,i){if("linear"===i||!e.length)return[{time:t,pos:0},{time:n,pos:1}];var r,s,o,a,c,l=[],u=[t];for(r=0,s=e.length;r<s;++r)(a=e[r])>t&&a<n&&u.push(a);for(u.push(n),r=0,s=u.length;r<s;++r)c=u[r+1],a=u[r],void 0!==(o=u[r-1])&&void 0!==c&&Math.round((c+o)/2)===a||l.push({time:a,pos:r/(s-1)});return l}(i._timestamps.data,r,s,o.distribution),i._offsets=function(e,t,n,i,r){var s,o,a=0,c=0;return r.offset&&t.length&&(r.time.min||(s=Pn(e,"time",t[0],"pos"),a=1===t.length?1-s:(Pn(e,"time",t[1],"pos")-s)/2),r.time.max||(o=Pn(e,"time",t[t.length-1],"pos"),c=1===t.length?o:(o-Pn(e,"time",t[t.length-2],"pos"))/2)),{start:a,end:c}}(i._table,l,0,0,o),o.ticks.reverse&&l.reverse(),function(e,t,n){var i,r,s,o,a=[];for(i=0,r=t.length;i<r;++i)s=t[i],o=!!n&&s===+e._adapter.startOf(s,n),a.push({value:s,major:o});return a}(i,l,i._majorUnit)},getLabelForIndex:function(e,t){var n=this,i=n._adapter,r=n.chart.data,s=n.options.time,o=r.labels&&e<r.labels.length?r.labels[e]:"",a=r.datasets[t].data[e];return ue.isObject(a)&&(o=n.getRightValue(a)),s.tooltipFormat?i.format(Nn(n,o),s.tooltipFormat):"string"==typeof o?o:i.format(Nn(n,o),s.displayFormats.datetime)},tickFormatFunction:function(e,t,n,i){var r=this,s=r._adapter,o=r.options,a=o.time.displayFormats,c=a[r._unit],l=r._majorUnit,u=a[l],d=+s.startOf(e,l),h=o.ticks.major,f=h.enabled&&l&&u&&e===d,p=s.format(e,i||(f?u:c)),m=f?h:o.ticks.minor,b=Cn(m.callback,m.userCallback);return b?b(p,t,n):p},convertTicksToLabels:function(e){var t,n,i=[];for(t=0,n=e.length;t<n;++t)i.push(this.tickFormatFunction(e[t].value,t,e));return i},getPixelForOffset:function(e){var t=this,n=t.options.ticks.reverse,i=t._horizontal?t.width:t.height,r=t._horizontal?n?t.right:t.left:n?t.bottom:t.top,s=Pn(t._table,"time",e,"pos"),o=i*(t._offsets.start+s)/(t._offsets.start+1+t._offsets.end);return n?r-o:r+o},getPixelForValue:function(e,t,n){var i=this,r=null;if(void 0!==t&&void 0!==n&&(r=i._timestamps.datasets[n][t]),null===r&&(r=jn(i,e)),null!==r)return i.getPixelForOffset(r)},getPixelForTick:function(e){var t=this.getTicks();return e>=0&&e<t.length?this.getPixelForOffset(t[e].value):null},getValueForPixel:function(e){var t=this,n=t._horizontal?t.width:t.height,i=Pn(t._table,"pos",(n?(e-(t._horizontal?t.left:t.top))/n:0)*(t._offsets.start+1+t._offsets.start)-t._offsets.end,"time");return t._adapter._create(i)},getLabelWidth:function(e){var t=this.options.ticks,n=this.ctx.measureText(e).width,i=ue.toRadians(t.maxRotation),r=Math.cos(i),s=Math.sin(i);return n*r+Cn(t.fontSize,ae.global.defaultFontSize)*s},getLabelCapacity:function(e){var t=this,n=t.tickFormatFunction(e,0,[],t.options.time.displayFormats.millisecond),i=t.getLabelWidth(n),r=t.isHorizontal()?t.width:t.height,s=Math.floor(r/i);return s>0?s:1}});Yn._defaults={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};var zn={category:an,linear:dn,logarithmic:mn,radialLinear:Tn,time:Yn},$n={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};Xt._date.override("function"==typeof e?{_id:"moment",formats:function(){return $n},parse:function(t,n){return"string"==typeof t&&"string"==typeof n?t=e(t,n):t instanceof e||(t=e(t)),t.isValid()?t.valueOf():null},format:function(t,n){return e(t).format(n)},add:function(t,n,i){return e(t).add(n,i).valueOf()},diff:function(t,n,i){return e.duration(e(t).diff(e(n))).as(i)},startOf:function(t,n,i){return t=e(t),"isoWeek"===n?t.isoWeekday(i).valueOf():t.startOf(n).valueOf()},endOf:function(t,n){return e(t).endOf(n).valueOf()},_create:function(t){return e(t)}}:{}),ae._set("global",{plugins:{filler:{propagate:!0}}});var Hn={dataset:function(e){var t=e.fill,n=e.chart,i=n.getDatasetMeta(t),r=i&&n.isDatasetVisible(t)&&i.dataset._children||[],s=r.length||0;return s?function(e,t){return t<s&&r[t]._view||null}:null},boundary:function(e){var t=e.boundary,n=t?t.x:null,i=t?t.y:null;return function(e){return{x:null===n?e.x:n,y:null===i?e.y:i}}}};function Wn(e,t,n){var i,r=e._model||{},s=r.fill;if(void 0===s&&(s=!!r.backgroundColor),!1===s||null===s)return!1;if(!0===s)return"origin";if(i=parseFloat(s,10),isFinite(i)&&Math.floor(i)===i)return"-"!==s[0]&&"+"!==s[0]||(i=t+i),!(i===t||i<0||i>=n)&&i;switch(s){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return s;default:return!1}}function Vn(e){var t,n=e.el._model||{},i=e.el._scale||{},r=e.fill,s=null;if(isFinite(r))return null;if("start"===r?s=void 0===n.scaleBottom?i.bottom:n.scaleBottom:"end"===r?s=void 0===n.scaleTop?i.top:n.scaleTop:void 0!==n.scaleZero?s=n.scaleZero:i.getBasePosition?s=i.getBasePosition():i.getBasePixel&&(s=i.getBasePixel()),null!=s){if(void 0!==s.x&&void 0!==s.y)return s;if(ue.isFinite(s))return{x:(t=i.isHorizontal())?s:null,y:t?null:s}}return null}function Bn(e,t,n){var i,r=e[t].fill,s=[t];if(!n)return r;for(;!1!==r&&-1===s.indexOf(r);){if(!isFinite(r))return r;if(!(i=e[r]))return!1;if(i.visible)return r;s.push(r),r=i.fill}return!1}function Un(e){var t=e.fill,n="dataset";return!1===t?null:(isFinite(t)||(n="boundary"),Hn[n](e))}function Gn(e){return e&&!e.skip}function qn(e,t,n,i,r){var s;if(i&&r){for(e.moveTo(t[0].x,t[0].y),s=1;s<i;++s)ue.canvas.lineTo(e,t[s-1],t[s]);for(e.lineTo(n[r-1].x,n[r-1].y),s=r-1;s>0;--s)ue.canvas.lineTo(e,n[s],n[s-1],!0)}}var Jn={id:"filler",afterDatasetsUpdate:function(e,t){var n,i,r,s,o=(e.data.datasets||[]).length,a=t.propagate,c=[];for(i=0;i<o;++i)s=null,(r=(n=e.getDatasetMeta(i)).dataset)&&r._model&&r instanceof je.Line&&(s={visible:e.isDatasetVisible(i),fill:Wn(r,i,o),chart:e,el:r}),n.$filler=s,c.push(s);for(i=0;i<o;++i)(s=c[i])&&(s.fill=Bn(c,i,a),s.boundary=Vn(s),s.mapper=Un(s))},beforeDatasetDraw:function(e,t){var n=t.meta.$filler;if(n){var i=e.ctx,r=n.el,s=r._view,o=r._children||[],a=n.mapper,c=s.backgroundColor||ae.global.defaultColor;a&&c&&o.length&&(ue.canvas.clipArea(i,e.chartArea),function(e,t,n,i,r,s){var o,a,c,l,u,d,h,f=t.length,p=i.spanGaps,m=[],b=[],g=0,_=0;for(e.beginPath(),o=0,a=f+!!s;o<a;++o)u=n(l=t[c=o%f]._view,c,i),d=Gn(l),h=Gn(u),d&&h?(g=m.push(l),_=b.push(u)):g&&_&&(p?(d&&m.push(l),h&&b.push(u)):(qn(e,m,b,g,_),g=_=0,m=[],b=[]));qn(e,m,b,g,_),e.closePath(),e.fillStyle=r,e.fill()}(i,o,a,s,c,r._loop),ue.canvas.unclipArea(i))}}},Qn=ue.noop,Kn=ue.valueOrDefault;function Zn(e,t){return e.usePointStyle&&e.boxWidth>t?t:e.boxWidth}ae._set("global",{legend:{display:!0,position:"top",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(e,t){var n=t.datasetIndex,i=this.chart,r=i.getDatasetMeta(n);r.hidden=null===r.hidden?!i.data.datasets[n].hidden:null,i.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(e){var t=e.data;return ue.isArray(t.datasets)?t.datasets.map((function(t,n){return{text:t.label,fillStyle:ue.isArray(t.backgroundColor)?t.backgroundColor[0]:t.backgroundColor,hidden:!e.isDatasetVisible(n),lineCap:t.borderCapStyle,lineDash:t.borderDash,lineDashOffset:t.borderDashOffset,lineJoin:t.borderJoinStyle,lineWidth:t.borderWidth,strokeStyle:t.borderColor,pointStyle:t.pointStyle,datasetIndex:n}}),this):[]}}},legendCallback:function(e){var t=[];t.push('<ul class="'+e.id+'-legend">');for(var n=0;n<e.data.datasets.length;n++)t.push('<li><span style="background-color:'+e.data.datasets[n].backgroundColor+'"></span>'),e.data.datasets[n].label&&t.push(e.data.datasets[n].label),t.push("</li>");return t.push("</ul>"),t.join("")}});var Xn=pe.extend({initialize:function(e){ue.extend(this,e),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:Qn,update:function(e,t,n){var i=this;return i.beforeUpdate(),i.maxWidth=e,i.maxHeight=t,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:Qn,beforeSetDimensions:Qn,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:Qn,beforeBuildLabels:Qn,buildLabels:function(){var e=this,t=e.options.labels||{},n=ue.callback(t.generateLabels,[e.chart],e)||[];t.filter&&(n=n.filter((function(n){return t.filter(n,e.chart.data)}))),e.options.reverse&&n.reverse(),e.legendItems=n},afterBuildLabels:Qn,beforeFit:Qn,fit:function(){var e=this,t=e.options,n=t.labels,i=t.display,r=e.ctx,s=ue.options._parseFont(n),o=s.size,a=e.legendHitBoxes=[],c=e.minSize,l=e.isHorizontal();if(l?(c.width=e.maxWidth,c.height=i?10:0):(c.width=i?10:0,c.height=e.maxHeight),i)if(r.font=s.string,l){var u=e.lineWidths=[0],d=0;r.textAlign="left",r.textBaseline="top",ue.each(e.legendItems,(function(e,t){var i=Zn(n,o)+o/2+r.measureText(e.text).width;(0===t||u[u.length-1]+i+n.padding>c.width)&&(d+=o+n.padding,u[u.length-(t>0?0:1)]=n.padding),a[t]={left:0,top:0,width:i,height:o},u[u.length-1]+=i+n.padding})),c.height+=d}else{var h=n.padding,f=e.columnWidths=[],p=n.padding,m=0,b=0,g=o+h;ue.each(e.legendItems,(function(e,t){var i=Zn(n,o)+o/2+r.measureText(e.text).width;t>0&&b+g>c.height-h&&(p+=m+n.padding,f.push(m),m=0,b=0),m=Math.max(m,i),b+=g,a[t]={left:0,top:0,width:i,height:o}})),p+=m,f.push(m),c.width+=p}e.width=c.width,e.height=c.height},afterFit:Qn,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var e=this,t=e.options,n=t.labels,i=ae.global,r=i.defaultColor,s=i.elements.line,o=e.width,a=e.lineWidths;if(t.display){var c,l=e.ctx,u=Kn(n.fontColor,i.defaultFontColor),d=ue.options._parseFont(n),h=d.size;l.textAlign="left",l.textBaseline="middle",l.lineWidth=.5,l.strokeStyle=u,l.fillStyle=u,l.font=d.string;var f=Zn(n,h),p=e.legendHitBoxes,m=e.isHorizontal();c=m?{x:e.left+(o-a[0])/2+n.padding,y:e.top+n.padding,line:0}:{x:e.left+n.padding,y:e.top+n.padding,line:0};var b=h+n.padding;ue.each(e.legendItems,(function(i,u){var d=l.measureText(i.text).width,g=f+h/2+d,_=c.x,y=c.y;m?u>0&&_+g+n.padding>e.left+e.minSize.width&&(y=c.y+=b,c.line++,_=c.x=e.left+(o-a[c.line])/2+n.padding):u>0&&y+b>e.top+e.minSize.height&&(_=c.x=_+e.columnWidths[c.line]+n.padding,y=c.y=e.top+n.padding,c.line++),function(e,n,i){if(!(isNaN(f)||f<=0)){l.save();var o=Kn(i.lineWidth,s.borderWidth);if(l.fillStyle=Kn(i.fillStyle,r),l.lineCap=Kn(i.lineCap,s.borderCapStyle),l.lineDashOffset=Kn(i.lineDashOffset,s.borderDashOffset),l.lineJoin=Kn(i.lineJoin,s.borderJoinStyle),l.lineWidth=o,l.strokeStyle=Kn(i.strokeStyle,r),l.setLineDash&&l.setLineDash(Kn(i.lineDash,s.borderDash)),t.labels&&t.labels.usePointStyle){var a=f*Math.SQRT2/2;ue.canvas.drawPoint(l,i.pointStyle,a,e+f/2,n+h/2)}else 0!==o&&l.strokeRect(e,n,f,h),l.fillRect(e,n,f,h);l.restore()}}(_,y,i),p[u].left=_,p[u].top=y,function(e,t,n,i){var r=h/2,s=f+r+e,o=t+r;l.fillText(n.text,s,o),n.hidden&&(l.beginPath(),l.lineWidth=2,l.moveTo(s,o),l.lineTo(s+i,o),l.stroke())}(_,y,i,d),m?c.x+=g+n.padding:c.y+=b}))}},_getLegendItemAt:function(e,t){var n,i,r,s=this;if(e>=s.left&&e<=s.right&&t>=s.top&&t<=s.bottom)for(r=s.legendHitBoxes,n=0;n<r.length;++n)if(e>=(i=r[n]).left&&e<=i.left+i.width&&t>=i.top&&t<=i.top+i.height)return s.legendItems[n];return null},handleEvent:function(e){var t,n=this,i=n.options,r="mouseup"===e.type?"click":e.type;if("mousemove"===r){if(!i.onHover&&!i.onLeave)return}else{if("click"!==r)return;if(!i.onClick)return}t=n._getLegendItemAt(e.x,e.y),"click"===r?t&&i.onClick&&i.onClick.call(n,e.native,t):(i.onLeave&&t!==n._hoveredItem&&(n._hoveredItem&&i.onLeave.call(n,e.native,n._hoveredItem),n._hoveredItem=t),i.onHover&&t&&i.onHover.call(n,e.native,t))}});function ei(e,t){var n=new Xn({ctx:e.ctx,options:t,chart:e});vt.configure(e,n,t),vt.addBox(e,n),e.legend=n}var ti={id:"legend",_element:Xn,beforeInit:function(e){var t=e.options.legend;t&&ei(e,t)},beforeUpdate:function(e){var t=e.options.legend,n=e.legend;t?(ue.mergeIf(t,ae.global.legend),n?(vt.configure(e,n,t),n.options=t):ei(e,t)):n&&(vt.removeBox(e,n),delete e.legend)},afterEvent:function(e,t){var n=e.legend;n&&n.handleEvent(t)}},ni=ue.noop;ae._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var ii=pe.extend({initialize:function(e){ue.extend(this,e),this.legendHitBoxes=[]},beforeUpdate:ni,update:function(e,t,n){var i=this;return i.beforeUpdate(),i.maxWidth=e,i.maxHeight=t,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:ni,beforeSetDimensions:ni,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:ni,beforeBuildLabels:ni,buildLabels:ni,afterBuildLabels:ni,beforeFit:ni,fit:function(){var e=this,t=e.options,n=t.display,i=e.minSize,r=ue.isArray(t.text)?t.text.length:1,s=ue.options._parseFont(t),o=n?r*s.lineHeight+2*t.padding:0;e.isHorizontal()?(i.width=e.maxWidth,i.height=o):(i.width=o,i.height=e.maxHeight),e.width=i.width,e.height=i.height},afterFit:ni,isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},draw:function(){var e=this,t=e.ctx,n=e.options;if(n.display){var i,r,s,o=ue.options._parseFont(n),a=o.lineHeight,c=a/2+n.padding,l=0,u=e.top,d=e.left,h=e.bottom,f=e.right;t.fillStyle=ue.valueOrDefault(n.fontColor,ae.global.defaultFontColor),t.font=o.string,e.isHorizontal()?(r=d+(f-d)/2,s=u+c,i=f-d):(r="left"===n.position?d+c:f-c,s=u+(h-u)/2,i=h-u,l=Math.PI*("left"===n.position?-.5:.5)),t.save(),t.translate(r,s),t.rotate(l),t.textAlign="center",t.textBaseline="middle";var p=n.text;if(ue.isArray(p))for(var m=0,b=0;b<p.length;++b)t.fillText(p[b],0,m,i),m+=a;else t.fillText(p,0,0,i);t.restore()}}});function ri(e,t){var n=new ii({ctx:e.ctx,options:t,chart:e});vt.configure(e,n,t),vt.addBox(e,n),e.titleBlock=n}var si={},oi=Jn,ai=ti,ci={id:"title",_element:ii,beforeInit:function(e){var t=e.options.title;t&&ri(e,t)},beforeUpdate:function(e){var t=e.options.title,n=e.titleBlock;t?(ue.mergeIf(t,ae.global.title),n?(vt.configure(e,n,t),n.options=t):ri(e,t)):n&&(vt.removeBox(e,n),delete e.titleBlock)}};for(var li in si.filler=oi,si.legend=ai,si.title=ci,Qt.helpers=ue,function(){function e(e,t,n){var i;return"string"==typeof e?(i=parseInt(e,10),-1!==e.indexOf("%")&&(i=i/100*t.parentNode[n])):i=e,i}function t(e){return null!=e&&"none"!==e}function n(n,i,r){var s=document.defaultView,o=ue._getParentNode(n),a=s.getComputedStyle(n)[i],c=s.getComputedStyle(o)[i],l=t(a),u=t(c),d=Number.POSITIVE_INFINITY;return l||u?Math.min(l?e(a,n,r):d,u?e(c,o,r):d):"none"}ue.where=function(e,t){if(ue.isArray(e)&&Array.prototype.filter)return e.filter(t);var n=[];return ue.each(e,(function(e){t(e)&&n.push(e)})),n},ue.findIndex=Array.prototype.findIndex?function(e,t,n){return e.findIndex(t,n)}:function(e,t,n){n=void 0===n?e:n;for(var i=0,r=e.length;i<r;++i)if(t.call(n,e[i],i,e))return i;return-1},ue.findNextWhere=function(e,t,n){ue.isNullOrUndef(n)&&(n=-1);for(var i=n+1;i<e.length;i++){var r=e[i];if(t(r))return r}},ue.findPreviousWhere=function(e,t,n){ue.isNullOrUndef(n)&&(n=e.length);for(var i=n-1;i>=0;i--){var r=e[i];if(t(r))return r}},ue.isNumber=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},ue.almostEquals=function(e,t,n){return Math.abs(e-t)<n},ue.almostWhole=function(e,t){var n=Math.round(e);return n-t<e&&n+t>e},ue.max=function(e){return e.reduce((function(e,t){return isNaN(t)?e:Math.max(e,t)}),Number.NEGATIVE_INFINITY)},ue.min=function(e){return e.reduce((function(e,t){return isNaN(t)?e:Math.min(e,t)}),Number.POSITIVE_INFINITY)},ue.sign=Math.sign?function(e){return Math.sign(e)}:function(e){return 0==(e=+e)||isNaN(e)?e:e>0?1:-1},ue.log10=Math.log10?function(e){return Math.log10(e)}:function(e){var t=Math.log(e)*Math.LOG10E,n=Math.round(t);return e===Math.pow(10,n)?n:t},ue.toRadians=function(e){return e*(Math.PI/180)},ue.toDegrees=function(e){return e*(180/Math.PI)},ue._decimalPlaces=function(e){if(ue.isFinite(e)){for(var t=1,n=0;Math.round(e*t)/t!==e;)t*=10,n++;return n}},ue.getAngleFromPoint=function(e,t){var n=t.x-e.x,i=t.y-e.y,r=Math.sqrt(n*n+i*i),s=Math.atan2(i,n);return s<-.5*Math.PI&&(s+=2*Math.PI),{angle:s,distance:r}},ue.distanceBetweenPoints=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},ue.aliasPixel=function(e){return e%2==0?0:.5},ue._alignPixel=function(e,t,n){var i=e.currentDevicePixelRatio,r=n/2;return Math.round((t-r)*i)/i+r},ue.splineCurve=function(e,t,n,i){var r=e.skip?t:e,s=t,o=n.skip?t:n,a=Math.sqrt(Math.pow(s.x-r.x,2)+Math.pow(s.y-r.y,2)),c=Math.sqrt(Math.pow(o.x-s.x,2)+Math.pow(o.y-s.y,2)),l=a/(a+c),u=c/(a+c),d=i*(l=isNaN(l)?0:l),h=i*(u=isNaN(u)?0:u);return{previous:{x:s.x-d*(o.x-r.x),y:s.y-d*(o.y-r.y)},next:{x:s.x+h*(o.x-r.x),y:s.y+h*(o.y-r.y)}}},ue.EPSILON=Number.EPSILON||1e-14,ue.splineCurveMonotone=function(e){var t,n,i,r,s,o,a,c,l,u=(e||[]).map((function(e){return{model:e._model,deltaK:0,mK:0}})),d=u.length;for(t=0;t<d;++t)if(!(i=u[t]).model.skip){if(n=t>0?u[t-1]:null,(r=t<d-1?u[t+1]:null)&&!r.model.skip){var h=r.model.x-i.model.x;i.deltaK=0!==h?(r.model.y-i.model.y)/h:0}i.mK=!n||n.model.skip?i.deltaK:!r||r.model.skip?n.deltaK:this.sign(n.deltaK)!==this.sign(i.deltaK)?0:(n.deltaK+i.deltaK)/2}for(t=0;t<d-1;++t)r=u[t+1],(i=u[t]).model.skip||r.model.skip||(ue.almostEquals(i.deltaK,0,this.EPSILON)?i.mK=r.mK=0:(s=i.mK/i.deltaK,o=r.mK/i.deltaK,(c=Math.pow(s,2)+Math.pow(o,2))<=9||(a=3/Math.sqrt(c),i.mK=s*a*i.deltaK,r.mK=o*a*i.deltaK)));for(t=0;t<d;++t)(i=u[t]).model.skip||(r=t<d-1?u[t+1]:null,(n=t>0?u[t-1]:null)&&!n.model.skip&&(i.model.controlPointPreviousX=i.model.x-(l=(i.model.x-n.model.x)/3),i.model.controlPointPreviousY=i.model.y-l*i.mK),r&&!r.model.skip&&(i.model.controlPointNextX=i.model.x+(l=(r.model.x-i.model.x)/3),i.model.controlPointNextY=i.model.y+l*i.mK))},ue.nextItem=function(e,t,n){return n?t>=e.length-1?e[0]:e[t+1]:t>=e.length-1?e[e.length-1]:e[t+1]},ue.previousItem=function(e,t,n){return n?t<=0?e[e.length-1]:e[t-1]:t<=0?e[0]:e[t-1]},ue.niceNum=function(e,t){var n=Math.floor(ue.log10(e)),i=e/Math.pow(10,n);return(t?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,n)},ue.requestAnimFrame="undefined"==typeof window?function(e){e()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return window.setTimeout(e,1e3/60)},ue.getRelativePosition=function(e,t){var n,i,r=e.originalEvent||e,s=e.target||e.srcElement,o=s.getBoundingClientRect(),a=r.touches;a&&a.length>0?(n=a[0].clientX,i=a[0].clientY):(n=r.clientX,i=r.clientY);var c=parseFloat(ue.getStyle(s,"padding-left")),l=parseFloat(ue.getStyle(s,"padding-top")),u=parseFloat(ue.getStyle(s,"padding-right")),d=parseFloat(ue.getStyle(s,"padding-bottom")),h=o.bottom-o.top-l-d;return{x:n=Math.round((n-o.left-c)/(o.right-o.left-c-u)*s.width/t.currentDevicePixelRatio),y:i=Math.round((i-o.top-l)/h*s.height/t.currentDevicePixelRatio)}},ue.getConstraintWidth=function(e){return n(e,"max-width","clientWidth")},ue.getConstraintHeight=function(e){return n(e,"max-height","clientHeight")},ue._calculatePadding=function(e,t,n){return(t=ue.getStyle(e,t)).indexOf("%")>-1?n*parseInt(t,10)/100:parseInt(t,10)},ue._getParentNode=function(e){var t=e.parentNode;return t&&"[object ShadowRoot]"===t.toString()&&(t=t.host),t},ue.getMaximumWidth=function(e){var t=ue._getParentNode(e);if(!t)return e.clientWidth;var n=t.clientWidth,i=n-ue._calculatePadding(t,"padding-left",n)-ue._calculatePadding(t,"padding-right",n),r=ue.getConstraintWidth(e);return isNaN(r)?i:Math.min(i,r)},ue.getMaximumHeight=function(e){var t=ue._getParentNode(e);if(!t)return e.clientHeight;var n=t.clientHeight,i=n-ue._calculatePadding(t,"padding-top",n)-ue._calculatePadding(t,"padding-bottom",n),r=ue.getConstraintHeight(e);return isNaN(r)?i:Math.min(i,r)},ue.getStyle=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,null).getPropertyValue(t)},ue.retinaScale=function(e,t){var n=e.currentDevicePixelRatio=t||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var i=e.canvas,r=e.height,s=e.width;i.height=r*n,i.width=s*n,e.ctx.scale(n,n),i.style.height||i.style.width||(i.style.height=r+"px",i.style.width=s+"px")}},ue.fontString=function(e,t,n){return t+" "+e+"px "+n},ue.longestText=function(e,t,n,i){var r=(i=i||{}).data=i.data||{},s=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(r=i.data={},s=i.garbageCollect=[],i.font=t),e.font=t;var o=0;ue.each(n,(function(t){null!=t&&!0!==ue.isArray(t)?o=ue.measureText(e,r,s,o,t):ue.isArray(t)&&ue.each(t,(function(t){null==t||ue.isArray(t)||(o=ue.measureText(e,r,s,o,t))}))}));var a=s.length/2;if(a>n.length){for(var c=0;c<a;c++)delete r[s[c]];s.splice(0,a)}return o},ue.measureText=function(e,t,n,i,r){var s=t[r];return s||(s=t[r]=e.measureText(r).width,n.push(r)),s>i&&(i=s),i},ue.numberOfLabelLines=function(e){var t=1;return ue.each(e,(function(e){ue.isArray(e)&&e.length>t&&(t=e.length)})),t},ue.color=G?function(e){return e instanceof CanvasGradient&&(e=ae.global.defaultColor),G(e)}:function(e){return console.error("Color.js not found!"),e},ue.getHoverColor=function(e){return e instanceof CanvasPattern||e instanceof CanvasGradient?e:ue.color(e).saturate(.5).darken(.1).rgbString()}}(),Qt._adapters=Xt,Qt.Animation=be,Qt.animationService=ge,Qt.controllers=ct,Qt.DatasetController=Se,Qt.defaults=ae,Qt.Element=pe,Qt.elements=je,Qt.Interaction=mt,Qt.layouts=vt,Qt.platform=At,Qt.plugins=It,Qt.Scale=on,Qt.scaleService=Pt,Qt.Ticks=en,Qt.Tooltip=Wt,Qt.helpers.each(zn,(function(e,t){Qt.scaleService.registerScaleType(t,e,e._defaults)})),si)si.hasOwnProperty(li)&&Qt.plugins.register(si[li]);Qt.platform.initialize();var ui=Qt;return"undefined"!=typeof window&&(window.Chart=Qt),Qt.Chart=Qt,Qt.Legend=si.legend._element,Qt.Title=si.title._element,Qt.pluginService=Qt.plugins,Qt.PluginBase=Qt.Element.extend({}),Qt.canvasHelpers=Qt.helpers.canvas,Qt.layoutService=Qt.layouts,Qt.LinearScaleBase=ln,Qt.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],(function(e){Qt[e]=function(t,n){return new Qt(t,Qt.helpers.merge(n||{},{type:e.charAt(0).toLowerCase()+e.slice(1)}))}})),ui}(function(){try{return n("wd/R")}catch(e){}}())},MuvH:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("8Y7J"),r=n("IheW");let s=(()=>{class e{constructor(e){this.http=e}findValue(e,t){if(e.value)return e.value.find(e=>e.section===t)}getValue(e,t){let n=this.findValue(e,t);if(!n){const i=t.indexOf(".");-1!==i&&(n=this.findValue(e,t.substring(0,i)))}return n||(n=this.findValue(e,"global")),n?n.value:e.default}getConfigData(){return this.http.get("api/cluster_conf/")}get(e){return this.http.get("api/cluster_conf/"+e)}filter(e){return this.http.get("api/cluster_conf/filter?names="+e.join(","))}create(e){return this.http.post("api/cluster_conf/",e)}delete(e,t){return this.http.delete(`api/cluster_conf/${e}?section=${t}`)}bulkCreate(e){return this.http.put("api/cluster_conf/",e)}}return e.\u0275fac=function(t){return new(t||e)(i.dc(r.b))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},Mxhz:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i=n("LRne"),r=n("CqXF"),s=n("JIr8"),o=n("8Y7J"),a=n("IheW");let c=(()=>{class e{constructor(e){this.http=e}list(){return this.http.get("api/user")}delete(e){return this.http.delete("api/user/"+e)}get(e){return this.http.get("api/user/"+e)}create(e){return this.http.post("api/user",e)}update(e){return this.http.put("api/user/"+e.username,e)}changePassword(e,t,n){return this.http.post(`api/user/${e}/change_password`,{old_password:t,new_password:n})}validateUserName(e){return this.get(e).pipe(Object(r.a)(!0),Object(s.a)(e=>(e.preventDefault(),Object(i.a)(!1))))}validatePassword(e,t=null,n=null){return this.http.post("api/user/validate_password",{password:e,username:t,old_password:n})}}return e.\u0275fac=function(t){return new(t||e)(o.dc(a.b))},e.\u0275prov=o.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},"N+g0":function(e,t,n){var i=n("g6v/"),r=n("m/L8"),s=n("glrk"),o=n("33Wh");e.exports=i?Object.defineProperties:function(e,t){s(e);for(var n,i=o(t),a=i.length,c=0;a>c;)r.f(e,n=i[c++],t[n]);return e}},"NC/Y":function(e,t,n){var i=n("0GbY");e.exports=i("navigator","userAgent")||""},NEZu:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));class i{constructor(e,t,n,i){this.customColors={backgroundColor:void 0,borderColor:void 0},this.checkOffset=!1,this.chartEl=e.nativeElement,this.getStyleLeft=n,this.getStyleTop=i,this.tooltipEl=t.nativeElement}customTooltips(e){if(0===e.opacity)return void(this.tooltipEl.style.opacity=0);if(this.tooltipEl.classList.remove("above","below","no-transform"),this.tooltipEl.classList.add(e.yAlign?e.yAlign:"no-transform"),e.body){const t=e.title||[],n=e.body.map(e=>e.lines);let i="<thead>";t.forEach(e=>{i+="<tr><th>"+this.getTitle(e)+"</th></tr>"}),i+="</thead><tbody>",n.forEach((t,n)=>{const r=e.labelColors[n];let s="background:"+(this.customColors.backgroundColor||r.backgroundColor);s+="; border-color:"+(this.customColors.borderColor||r.borderColor),s+="; border-width: 2px",i+='<tr><td nowrap><span class="chartjs-tooltip-key" style="'+s+'"></span>'+this.getBody(t)+"</td></tr>"}),i+="</tbody>",this.tooltipEl.querySelector("table").innerHTML=i}const t=this.chartEl.offsetTop,n=this.chartEl.offsetLeft;if(this.checkOffset){const t=e.width/2;this.tooltipEl.classList.remove("transform-left"),this.tooltipEl.classList.remove("transform-right"),e.caretX-t<0?this.tooltipEl.classList.add("transform-left"):e.caretX+t>this.chartEl.width&&this.tooltipEl.classList.add("transform-right")}this.tooltipEl.style.left=this.getStyleLeft(e,n),this.tooltipEl.style.top=this.getStyleTop(e,t),this.tooltipEl.style.opacity=1,this.tooltipEl.style.fontFamily=e._fontFamily,this.tooltipEl.style.fontSize=e.fontSize,this.tooltipEl.style.fontStyle=e._fontStyle,this.tooltipEl.style.padding=e.yPadding+"px "+e.xPadding+"px"}getBody(e){return e}getTitle(e){return e}}},NJ4a:function(e,t,n){"use strict";function i(e){setTimeout(()=>{throw e},0)}n.d(t,"a",(function(){return i}))},NJ9Y:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i=n("sVev"),r=n("pLZG"),s=n("BFxc"),o=n("XDbj"),a=n("xbPD"),c=n("SpAZ");function l(e,t){const n=arguments.length>=2;return l=>l.pipe(e?Object(r.a)((t,n)=>e(t,n,l)):c.a,Object(s.a)(1),n?Object(a.a)(t):Object(o.a)(()=>new i.a))}},NaFW:function(e,t,n){var i=n("9d/t"),r=n("P4y1"),s=n("tiKp")("iterator");e.exports=function(e){if(null!=e)return e[s]||e["@@iterator"]||r[i(e)]}},NwgZ:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("8Y7J"),r=n("s7LF");let s=(()=>{class e{constructor(){this.validSubmit=new i.o}onSubmit(){this.markAsTouchedAndDirty(this.formGroup),this.formGroup.valid&&this.validSubmit.emit(this.formGroup.value)}markAsTouchedAndDirty(e){e instanceof r.j?Object.keys(e.controls).forEach(t=>this.markAsTouchedAndDirty(e.controls[t])):e instanceof r.e?e.controls.forEach(e=>this.markAsTouchedAndDirty(e)):e instanceof r.h&&e.enabled&&(e.markAsDirty(),e.markAsTouched(),e.updateValueAndValidity())}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=i.Hb({type:e,selectors:[["","formGroup",""]],hostBindings:function(e,t){1&e&&i.gc("submit",(function(){return t.onSubmit()}))},inputs:{formGroup:"formGroup"},outputs:{validSubmit:"validSubmit"}}),e})()},O741:function(e,t,n){var i=n("hh1v");e.exports=function(e){if(!i(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},OIYi:function(e,t,n){!function(e){"use strict";e.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})}(n("wd/R"))},OLbh:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var i=n("s7LF"),r=n("8Y7J"),s=n("G0yt"),o=n("ajRT"),a=n("SVse"),c=n("NwgZ"),l=n("6+kj");function u(e,t){1&e&&(r.Sb(0,"span",11),r.Nb(1,"i",12),r.Rb())}function d(e,t){1&e&&r.Ob(0)}function h(e,t){if(1&e&&(r.Sb(0,"p"),r.Oc(1),r.Rb()),2&e){const e=r.ic();r.yb(1),r.Qc(" ",e.description," ")}}let f=(()=>{class e{constructor(e){this.activeModal=e,this.warning=!1,this.showSubmit=!0,this.boundCancel=this.cancel.bind(this),this.canceled=!1,this.confirmationForm=new i.j({})}ngOnInit(){if(this.bodyContext=this.bodyContext||{},this.bodyContext.$implicit=this.bodyData,!this.onSubmit)throw new Error("No submit action defined");if(!this.buttonText)throw new Error("No action name defined");if(!this.titleText)throw new Error("No title defined");if(!this.bodyTpl&&!this.description)throw new Error("No description defined")}ngOnDestroy(){this.onCancel&&this.canceled&&this.onCancel()}cancel(){this.canceled=!0,this.activeModal.close()}stopLoadingSpinner(){this.confirmationForm.setErrors({cdSubmitButton:!0})}}return e.\u0275fac=function(t){return new(t||e)(r.Mb(s.a))},e.\u0275cmp=r.Gb({type:e,selectors:[["cd-confirmation-modal"]],decls:12,vars:9,consts:[[3,"hide"],[1,"modal-title"],["class","text-warning",4,"ngIf"],[1,"modal-content"],["name","confirmationForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","showSubmit","submitActionEvent","backActionEvent"],[1,"text-warning"],[1,"fa","fa-exclamation-triangle","fa-1x"]],template:function(e,t){1&e&&(r.Sb(0,"cd-modal",0),r.gc("hide",(function(){return t.cancel()})),r.Qb(1,1),r.Mc(2,u,2,0,"span",2),r.Oc(3),r.Pb(),r.Qb(4,3),r.Sb(5,"form",4,5),r.Sb(7,"div",6),r.Mc(8,d,1,0,"ng-container",7),r.Mc(9,h,2,1,"p",8),r.Rb(),r.Sb(10,"div",9),r.Sb(11,"cd-form-button-panel",10),r.gc("submitActionEvent",(function(){return t.onSubmit(t.confirmationForm.value)}))("backActionEvent",(function(){return t.boundCancel()})),r.Rb(),r.Rb(),r.Rb(),r.Pb(),r.Rb()),2&e&&(r.yb(2),r.pc("ngIf",t.warning),r.yb(1),r.Pc(t.titleText),r.yb(2),r.pc("formGroup",t.confirmationForm),r.yb(3),r.pc("ngTemplateOutlet",t.bodyTpl)("ngTemplateOutletContext",t.bodyContext),r.yb(1),r.pc("ngIf",t.description),r.yb(2),r.pc("form",t.confirmationForm)("submitText",t.buttonText)("showSubmit",t.showSubmit))},directives:[o.a,a.r,i.C,i.r,i.k,c.a,a.w,l.a],styles:[""]}),e})()},Oaa7:function(e,t,n){!function(e){"use strict";e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n("wd/R"))},Ob0Z:function(e,t,n){!function(e){"use strict";var t={1:"\u0967",2:"\u0968",3:"\u0969",4:"\u096a",5:"\u096b",6:"\u096c",7:"\u096d",8:"\u096e",9:"\u096f",0:"\u0966"},n={"\u0967":"1","\u0968":"2","\u0969":"3","\u096a":"4","\u096b":"5","\u096c":"6","\u096d":"7","\u096e":"8","\u096f":"9","\u0966":"0"};function i(e,t,n,i){var r="";if(t)switch(n){case"s":r="\u0915\u093e\u0939\u0940 \u0938\u0947\u0915\u0902\u0926";break;case"ss":r="%d \u0938\u0947\u0915\u0902\u0926";break;case"m":r="\u090f\u0915 \u092e\u093f\u0928\u093f\u091f";break;case"mm":r="%d \u092e\u093f\u0928\u093f\u091f\u0947";break;case"h":r="\u090f\u0915 \u0924\u093e\u0938";break;case"hh":r="%d \u0924\u093e\u0938";break;case"d":r="\u090f\u0915 \u0926\u093f\u0935\u0938";break;case"dd":r="%d \u0926\u093f\u0935\u0938";break;case"M":r="\u090f\u0915 \u092e\u0939\u093f\u0928\u093e";break;case"MM":r="%d \u092e\u0939\u093f\u0928\u0947";break;case"y":r="\u090f\u0915 \u0935\u0930\u094d\u0937";break;case"yy":r="%d \u0935\u0930\u094d\u0937\u0947"}else switch(n){case"s":r="\u0915\u093e\u0939\u0940 \u0938\u0947\u0915\u0902\u0926\u093e\u0902";break;case"ss":r="%d \u0938\u0947\u0915\u0902\u0926\u093e\u0902";break;case"m":r="\u090f\u0915\u093e \u092e\u093f\u0928\u093f\u091f\u093e";break;case"mm":r="%d \u092e\u093f\u0928\u093f\u091f\u093e\u0902";break;case"h":r="\u090f\u0915\u093e \u0924\u093e\u0938\u093e";break;case"hh":r="%d \u0924\u093e\u0938\u093e\u0902";break;case"d":r="\u090f\u0915\u093e \u0926\u093f\u0935\u0938\u093e";break;case"dd":r="%d \u0926\u093f\u0935\u0938\u093e\u0902";break;case"M":r="\u090f\u0915\u093e \u092e\u0939\u093f\u0928\u094d\u092f\u093e";break;case"MM":r="%d \u092e\u0939\u093f\u0928\u094d\u092f\u093e\u0902";break;case"y":r="\u090f\u0915\u093e \u0935\u0930\u094d\u0937\u093e";break;case"yy":r="%d \u0935\u0930\u094d\u0937\u093e\u0902"}return r.replace(/%d/i,e)}e.defineLocale("mr",{months:"\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940_\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u090f\u092a\u094d\u0930\u093f\u0932_\u092e\u0947_\u091c\u0942\u0928_\u091c\u0941\u0932\u0948_\u0911\u0917\u0938\u094d\u091f_\u0938\u092a\u094d\u091f\u0947\u0902\u092c\u0930_\u0911\u0915\u094d\u091f\u094b\u092c\u0930_\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930_\u0921\u093f\u0938\u0947\u0902\u092c\u0930".split("_"),monthsShort:"\u091c\u093e\u0928\u0947._\u092b\u0947\u092c\u094d\u0930\u0941._\u092e\u093e\u0930\u094d\u091a._\u090f\u092a\u094d\u0930\u093f._\u092e\u0947._\u091c\u0942\u0928._\u091c\u0941\u0932\u0948._\u0911\u0917._\u0938\u092a\u094d\u091f\u0947\u0902._\u0911\u0915\u094d\u091f\u094b._\u0928\u094b\u0935\u094d\u0939\u0947\u0902._\u0921\u093f\u0938\u0947\u0902.".split("_"),monthsParseExact:!0,weekdays:"\u0930\u0935\u093f\u0935\u093e\u0930_\u0938\u094b\u092e\u0935\u093e\u0930_\u092e\u0902\u0917\u0933\u0935\u093e\u0930_\u092c\u0941\u0927\u0935\u093e\u0930_\u0917\u0941\u0930\u0942\u0935\u093e\u0930_\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930_\u0936\u0928\u093f\u0935\u093e\u0930".split("_"),weekdaysShort:"\u0930\u0935\u093f_\u0938\u094b\u092e_\u092e\u0902\u0917\u0933_\u092c\u0941\u0927_\u0917\u0941\u0930\u0942_\u0936\u0941\u0915\u094d\u0930_\u0936\u0928\u093f".split("_"),weekdaysMin:"\u0930_\u0938\u094b_\u092e\u0902_\u092c\u0941_\u0917\u0941_\u0936\u0941_\u0936".split("_"),longDateFormat:{LT:"A h:mm \u0935\u093e\u091c\u0924\u093e",LTS:"A h:mm:ss \u0935\u093e\u091c\u0924\u093e",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u0935\u093e\u091c\u0924\u093e",LLLL:"dddd, D MMMM YYYY, A h:mm \u0935\u093e\u091c\u0924\u093e"},calendar:{sameDay:"[\u0906\u091c] LT",nextDay:"[\u0909\u0926\u094d\u092f\u093e] LT",nextWeek:"dddd, LT",lastDay:"[\u0915\u093e\u0932] LT",lastWeek:"[\u092e\u093e\u0917\u0940\u0932] dddd, LT",sameElse:"L"},relativeTime:{future:"%s\u092e\u0927\u094d\u092f\u0947",past:"%s\u092a\u0942\u0930\u094d\u0935\u0940",s:i,ss:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},preparse:function(e){return e.replace(/[\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f\u0966]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/\u092a\u0939\u093e\u091f\u0947|\u0938\u0915\u093e\u0933\u0940|\u0926\u0941\u092a\u093e\u0930\u0940|\u0938\u093e\u092f\u0902\u0915\u093e\u0933\u0940|\u0930\u093e\u0924\u094d\u0930\u0940/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u092a\u0939\u093e\u091f\u0947"===t||"\u0938\u0915\u093e\u0933\u0940"===t?e:"\u0926\u0941\u092a\u093e\u0930\u0940"===t||"\u0938\u093e\u092f\u0902\u0915\u093e\u0933\u0940"===t||"\u0930\u093e\u0924\u094d\u0930\u0940"===t?e>=12?e:e+12:void 0},meridiem:function(e,t,n){return e>=0&&e<6?"\u092a\u0939\u093e\u091f\u0947":e<12?"\u0938\u0915\u093e\u0933\u0940":e<17?"\u0926\u0941\u092a\u093e\u0930\u0940":e<20?"\u0938\u093e\u092f\u0902\u0915\u093e\u0933\u0940":"\u0930\u093e\u0924\u094d\u0930\u0940"},week:{dow:0,doy:6}})}(n("wd/R"))},OjkT:function(e,t,n){!function(e){"use strict";var t={1:"\u0967",2:"\u0968",3:"\u0969",4:"\u096a",5:"\u096b",6:"\u096c",7:"\u096d",8:"\u096e",9:"\u096f",0:"\u0966"},n={"\u0967":"1","\u0968":"2","\u0969":"3","\u096a":"4","\u096b":"5","\u096c":"6","\u096d":"7","\u096e":"8","\u096f":"9","\u0966":"0"};e.defineLocale("ne",{months:"\u091c\u0928\u0935\u0930\u0940_\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u093f\u0932_\u092e\u0908_\u091c\u0941\u0928_\u091c\u0941\u0932\u093e\u0908_\u0905\u0917\u0937\u094d\u091f_\u0938\u0947\u092a\u094d\u091f\u0947\u092e\u094d\u092c\u0930_\u0905\u0915\u094d\u091f\u094b\u092c\u0930_\u0928\u094b\u092d\u0947\u092e\u094d\u092c\u0930_\u0921\u093f\u0938\u0947\u092e\u094d\u092c\u0930".split("_"),monthsShort:"\u091c\u0928._\u092b\u0947\u092c\u094d\u0930\u0941._\u092e\u093e\u0930\u094d\u091a_\u0905\u092a\u094d\u0930\u093f._\u092e\u0908_\u091c\u0941\u0928_\u091c\u0941\u0932\u093e\u0908._\u0905\u0917._\u0938\u0947\u092a\u094d\u091f._\u0905\u0915\u094d\u091f\u094b._\u0928\u094b\u092d\u0947._\u0921\u093f\u0938\u0947.".split("_"),monthsParseExact:!0,weekdays:"\u0906\u0907\u0924\u092c\u093e\u0930_\u0938\u094b\u092e\u092c\u093e\u0930_\u092e\u0919\u094d\u0917\u0932\u092c\u093e\u0930_\u092c\u0941\u0927\u092c\u093e\u0930_\u092c\u093f\u0939\u093f\u092c\u093e\u0930_\u0936\u0941\u0915\u094d\u0930\u092c\u093e\u0930_\u0936\u0928\u093f\u092c\u093e\u0930".split("_"),weekdaysShort:"\u0906\u0907\u0924._\u0938\u094b\u092e._\u092e\u0919\u094d\u0917\u0932._\u092c\u0941\u0927._\u092c\u093f\u0939\u093f._\u0936\u0941\u0915\u094d\u0930._\u0936\u0928\u093f.".split("_"),weekdaysMin:"\u0906._\u0938\u094b._\u092e\u0902._\u092c\u0941._\u092c\u093f._\u0936\u0941._\u0936.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A\u0915\u094b h:mm \u092c\u091c\u0947",LTS:"A\u0915\u094b h:mm:ss \u092c\u091c\u0947",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A\u0915\u094b h:mm \u092c\u091c\u0947",LLLL:"dddd, D MMMM YYYY, A\u0915\u094b h:mm \u092c\u091c\u0947"},preparse:function(e){return e.replace(/[\u0967\u0968\u0969\u096a\u096b\u096c\u096d\u096e\u096f\u0966]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/\u0930\u093e\u0924\u093f|\u092c\u093f\u0939\u093e\u0928|\u0926\u093f\u0909\u0901\u0938\u094b|\u0938\u093e\u0901\u091d/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u0930\u093e\u0924\u093f"===t?e<4?e:e+12:"\u092c\u093f\u0939\u093e\u0928"===t?e:"\u0926\u093f\u0909\u0901\u0938\u094b"===t?e>=10?e:e+12:"\u0938\u093e\u0901\u091d"===t?e+12:void 0},meridiem:function(e,t,n){return e<3?"\u0930\u093e\u0924\u093f":e<12?"\u092c\u093f\u0939\u093e\u0928":e<16?"\u0926\u093f\u0909\u0901\u0938\u094b":e<20?"\u0938\u093e\u0901\u091d":"\u0930\u093e\u0924\u093f"},calendar:{sameDay:"[\u0906\u091c] LT",nextDay:"[\u092d\u094b\u0932\u093f] LT",nextWeek:"[\u0906\u0909\u0901\u0926\u094b] dddd[,] LT",lastDay:"[\u0939\u093f\u091c\u094b] LT",lastWeek:"[\u0917\u090f\u0915\u094b] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s\u092e\u093e",past:"%s \u0905\u0917\u093e\u0921\u093f",s:"\u0915\u0947\u0939\u0940 \u0915\u094d\u0937\u0923",ss:"%d \u0938\u0947\u0915\u0947\u0923\u094d\u0921",m:"\u090f\u0915 \u092e\u093f\u0928\u0947\u091f",mm:"%d \u092e\u093f\u0928\u0947\u091f",h:"\u090f\u0915 \u0918\u0923\u094d\u091f\u093e",hh:"%d \u0918\u0923\u094d\u091f\u093e",d:"\u090f\u0915 \u0926\u093f\u0928",dd:"%d \u0926\u093f\u0928",M:"\u090f\u0915 \u092e\u0939\u093f\u0928\u093e",MM:"%d \u092e\u0939\u093f\u0928\u093e",y:"\u090f\u0915 \u092c\u0930\u094d\u0937",yy:"%d \u092c\u0930\u094d\u0937"},week:{dow:0,doy:6}})}(n("wd/R"))},OmwH:function(e,t,n){!function(e){"use strict";e.defineLocale("zh-mo",{months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u9031\u65e5_\u9031\u4e00_\u9031\u4e8c_\u9031\u4e09_\u9031\u56db_\u9031\u4e94_\u9031\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5 HH:mm",LLLL:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm",l:"D/M/YYYY",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u51cc\u6668"===t||"\u65e9\u4e0a"===t||"\u4e0a\u5348"===t?e:"\u4e2d\u5348"===t?e>=11?e:e+12:"\u4e0b\u5348"===t||"\u665a\u4e0a"===t?e+12:void 0},meridiem:function(e,t,n){var i=100*e+t;return i<600?"\u51cc\u6668":i<900?"\u65e9\u4e0a":i<1130?"\u4e0a\u5348":i<1230?"\u4e2d\u5348":i<1800?"\u4e0b\u5348":"\u665a\u4e0a"},calendar:{sameDay:"[\u4eca\u5929] LT",nextDay:"[\u660e\u5929] LT",nextWeek:"[\u4e0b]dddd LT",lastDay:"[\u6628\u5929] LT",lastWeek:"[\u4e0a]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u9031)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"\u65e5";case"M":return e+"\u6708";case"w":case"W":return e+"\u9031";default:return e}},relativeTime:{future:"%s\u5167",past:"%s\u524d",s:"\u5e7e\u79d2",ss:"%d \u79d2",m:"1 \u5206\u9418",mm:"%d \u5206\u9418",h:"1 \u5c0f\u6642",hh:"%d \u5c0f\u6642",d:"1 \u5929",dd:"%d \u5929",M:"1 \u500b\u6708",MM:"%d \u500b\u6708",y:"1 \u5e74",yy:"%d \u5e74"}})}(n("wd/R"))},Oxv6:function(e,t,n){!function(e){"use strict";var t={0:"-\u0443\u043c",1:"-\u0443\u043c",2:"-\u044e\u043c",3:"-\u044e\u043c",4:"-\u0443\u043c",5:"-\u0443\u043c",6:"-\u0443\u043c",7:"-\u0443\u043c",8:"-\u0443\u043c",9:"-\u0443\u043c",10:"-\u0443\u043c",12:"-\u0443\u043c",13:"-\u0443\u043c",20:"-\u0443\u043c",30:"-\u044e\u043c",40:"-\u0443\u043c",50:"-\u0443\u043c",60:"-\u0443\u043c",70:"-\u0443\u043c",80:"-\u0443\u043c",90:"-\u0443\u043c",100:"-\u0443\u043c"};e.defineLocale("tg",{months:{format:"\u044f\u043d\u0432\u0430\u0440\u0438_\u0444\u0435\u0432\u0440\u0430\u043b\u0438_\u043c\u0430\u0440\u0442\u0438_\u0430\u043f\u0440\u0435\u043b\u0438_\u043c\u0430\u0439\u0438_\u0438\u044e\u043d\u0438_\u0438\u044e\u043b\u0438_\u0430\u0432\u0433\u0443\u0441\u0442\u0438_\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u0438_\u043e\u043a\u0442\u044f\u0431\u0440\u0438_\u043d\u043e\u044f\u0431\u0440\u0438_\u0434\u0435\u043a\u0430\u0431\u0440\u0438".split("_"),standalone:"\u044f\u043d\u0432\u0430\u0440_\u0444\u0435\u0432\u0440\u0430\u043b_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0435\u043b_\u043c\u0430\u0439_\u0438\u044e\u043d_\u0438\u044e\u043b_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043d\u0442\u044f\u0431\u0440_\u043e\u043a\u0442\u044f\u0431\u0440_\u043d\u043e\u044f\u0431\u0440_\u0434\u0435\u043a\u0430\u0431\u0440".split("_")},monthsShort:"\u044f\u043d\u0432_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0439_\u0438\u044e\u043d_\u0438\u044e\u043b_\u0430\u0432\u0433_\u0441\u0435\u043d_\u043e\u043a\u0442_\u043d\u043e\u044f_\u0434\u0435\u043a".split("_"),weekdays:"\u044f\u043a\u0448\u0430\u043d\u0431\u0435_\u0434\u0443\u0448\u0430\u043d\u0431\u0435_\u0441\u0435\u0448\u0430\u043d\u0431\u0435_\u0447\u043e\u0440\u0448\u0430\u043d\u0431\u0435_\u043f\u0430\u043d\u04b7\u0448\u0430\u043d\u0431\u0435_\u04b7\u0443\u043c\u044a\u0430_\u0448\u0430\u043d\u0431\u0435".split("_"),weekdaysShort:"\u044f\u0448\u0431_\u0434\u0448\u0431_\u0441\u0448\u0431_\u0447\u0448\u0431_\u043f\u0448\u0431_\u04b7\u0443\u043c_\u0448\u043d\u0431".split("_"),weekdaysMin:"\u044f\u0448_\u0434\u0448_\u0441\u0448_\u0447\u0448_\u043f\u0448_\u04b7\u043c_\u0448\u0431".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0418\u043c\u0440\u04ef\u0437 \u0441\u043e\u0430\u0442\u0438] LT",nextDay:"[\u0424\u0430\u0440\u0434\u043e \u0441\u043e\u0430\u0442\u0438] LT",lastDay:"[\u0414\u0438\u0440\u04ef\u0437 \u0441\u043e\u0430\u0442\u0438] LT",nextWeek:"dddd[\u0438] [\u04b3\u0430\u0444\u0442\u0430\u0438 \u043e\u044f\u043d\u0434\u0430 \u0441\u043e\u0430\u0442\u0438] LT",lastWeek:"dddd[\u0438] [\u04b3\u0430\u0444\u0442\u0430\u0438 \u0433\u0443\u0437\u0430\u0448\u0442\u0430 \u0441\u043e\u0430\u0442\u0438] LT",sameElse:"L"},relativeTime:{future:"\u0431\u0430\u044a\u0434\u0438 %s",past:"%s \u043f\u0435\u0448",s:"\u044f\u043a\u0447\u0430\u043d\u0434 \u0441\u043e\u043d\u0438\u044f",m:"\u044f\u043a \u0434\u0430\u049b\u0438\u049b\u0430",mm:"%d \u0434\u0430\u049b\u0438\u049b\u0430",h:"\u044f\u043a \u0441\u043e\u0430\u0442",hh:"%d \u0441\u043e\u0430\u0442",d:"\u044f\u043a \u0440\u04ef\u0437",dd:"%d \u0440\u04ef\u0437",M:"\u044f\u043a \u043c\u043e\u04b3",MM:"%d \u043c\u043e\u04b3",y:"\u044f\u043a \u0441\u043e\u043b",yy:"%d \u0441\u043e\u043b"},meridiemParse:/\u0448\u0430\u0431|\u0441\u0443\u0431\u04b3|\u0440\u04ef\u0437|\u0431\u0435\u0433\u043e\u04b3/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u0448\u0430\u0431"===t?e<4?e:e+12:"\u0441\u0443\u0431\u04b3"===t?e:"\u0440\u04ef\u0437"===t?e>=11?e:e+12:"\u0431\u0435\u0433\u043e\u04b3"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"\u0448\u0430\u0431":e<11?"\u0441\u0443\u0431\u04b3":e<16?"\u0440\u04ef\u0437":e<19?"\u0431\u0435\u0433\u043e\u04b3":"\u0448\u0430\u0431"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0443\u043c|\u044e\u043c)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n("wd/R"))},P4y1:function(e,t){e.exports={}},P8lu:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var i=n("mrSG"),r=n("IheW"),s=n("LvDl"),o=n.n(s),a=n("cp0P"),c=n("LRne"),l=n("5+tZ"),u=n("CqXF"),d=n("JIr8"),h=n("9xzX"),f=n("xTzq"),p=n("8Y7J");let m=(()=>{let e=class{constructor(e,t){this.http=e,this.rgwDaemonService=t,this.url="api/rgw/user"}list(){return this.enumerate().pipe(Object(l.a)(e=>e.length>0?Object(a.a)(e.map(e=>this.get(e))):Object(c.a)([])))}enumerate(){return this.rgwDaemonService.request(e=>this.http.get(this.url,{params:e}))}enumerateEmail(){return this.rgwDaemonService.request(e=>this.http.get(this.url+"/get_emails",{params:e}))}get(e){return this.rgwDaemonService.request(t=>this.http.get(`${this.url}/${e}`,{params:t}))}getQuota(e){return this.rgwDaemonService.request(t=>this.http.get(`${this.url}/${e}/quota`,{params:t}))}create(e){return this.rgwDaemonService.request(t=>(o.a.keys(e).forEach(n=>{t=t.append(n,e[n])}),this.http.post(this.url,null,{params:t})))}update(e,t){return this.rgwDaemonService.request(n=>(o.a.keys(t).forEach(e=>{n=n.append(e,t[e])}),this.http.put(`${this.url}/${e}`,null,{params:n})))}updateQuota(e,t){return this.rgwDaemonService.request(n=>(o.a.keys(t).forEach(e=>{n=n.append(e,t[e])}),this.http.put(`${this.url}/${e}/quota`,null,{params:n})))}delete(e){return this.rgwDaemonService.request(t=>this.http.delete(`${this.url}/${e}`,{params:t}))}createSubuser(e,t){return this.rgwDaemonService.request(n=>(o.a.keys(t).forEach(e=>{n=n.append(e,t[e])}),this.http.post(`${this.url}/${e}/subuser`,null,{params:n})))}deleteSubuser(e,t){return this.rgwDaemonService.request(n=>this.http.delete(`${this.url}/${e}/subuser/${t}`,{params:n}))}addCapability(e,t,n){return this.rgwDaemonService.request(i=>(i=(i=i.append("type",t)).append("perm",n),this.http.post(`${this.url}/${e}/capability`,null,{params:i})))}deleteCapability(e,t,n){return this.rgwDaemonService.request(i=>(i=(i=i.append("type",t)).append("perm",n),this.http.delete(`${this.url}/${e}/capability`,{params:i})))}addS3Key(e,t){return this.rgwDaemonService.request(n=>(n=n.append("key_type","s3"),o.a.keys(t).forEach(e=>{n=n.append(e,t[e])}),this.http.post(`${this.url}/${e}/key`,null,{params:n})))}deleteS3Key(e,t){return this.rgwDaemonService.request(n=>(n=(n=n.append("key_type","s3")).append("access_key",t),this.http.delete(`${this.url}/${e}/key`,{params:n})))}exists(e){return this.get(e).pipe(Object(u.a)(!0),Object(d.a)(e=>(o.a.isFunction(e.preventDefault)&&e.preventDefault(),Object(c.a)(!1))))}emailExists(e){return e=decodeURIComponent(e),this.enumerateEmail().pipe(Object(l.a)(t=>{const n=o.a.indexOf(t,e);return Object(c.a)(-1!==n)}))}};return e.\u0275fac=function(t){return new(t||e)(p.dc(r.b),p.dc(h.a))},e.\u0275prov=p.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e=Object(i.b)([f.a,Object(i.d)("design:paramtypes",[r.b,h.a])],e),e})()},PA2r:function(e,t,n){!function(e){"use strict";var t="leden_\xfanor_b\u0159ezen_duben_kv\u011bten_\u010derven_\u010dervenec_srpen_z\xe1\u0159\xed_\u0159\xedjen_listopad_prosinec".split("_"),n="led_\xfano_b\u0159e_dub_kv\u011b_\u010dvn_\u010dvc_srp_z\xe1\u0159_\u0159\xedj_lis_pro".split("_"),i=[/^led/i,/^\xfano/i,/^b\u0159e/i,/^dub/i,/^kv\u011b/i,/^(\u010dvn|\u010derven$|\u010dervna)/i,/^(\u010dvc|\u010dervenec|\u010dervence)/i,/^srp/i,/^z\xe1\u0159/i,/^\u0159\xedj/i,/^lis/i,/^pro/i],r=/^(leden|\xfanor|b\u0159ezen|duben|kv\u011bten|\u010dervenec|\u010dervence|\u010derven|\u010dervna|srpen|z\xe1\u0159\xed|\u0159\xedjen|listopad|prosinec|led|\xfano|b\u0159e|dub|kv\u011b|\u010dvn|\u010dvc|srp|z\xe1\u0159|\u0159\xedj|lis|pro)/i;function s(e){return e>1&&e<5&&1!=~~(e/10)}function o(e,t,n,i){var r=e+" ";switch(n){case"s":return t||i?"p\xe1r sekund":"p\xe1r sekundami";case"ss":return t||i?r+(s(e)?"sekundy":"sekund"):r+"sekundami";case"m":return t?"minuta":i?"minutu":"minutou";case"mm":return t||i?r+(s(e)?"minuty":"minut"):r+"minutami";case"h":return t?"hodina":i?"hodinu":"hodinou";case"hh":return t||i?r+(s(e)?"hodiny":"hodin"):r+"hodinami";case"d":return t||i?"den":"dnem";case"dd":return t||i?r+(s(e)?"dny":"dn\xed"):r+"dny";case"M":return t||i?"m\u011bs\xedc":"m\u011bs\xedcem";case"MM":return t||i?r+(s(e)?"m\u011bs\xedce":"m\u011bs\xedc\u016f"):r+"m\u011bs\xedci";case"y":return t||i?"rok":"rokem";case"yy":return t||i?r+(s(e)?"roky":"let"):r+"lety"}}e.defineLocale("cs",{months:t,monthsShort:n,monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(leden|ledna|\xfanora|\xfanor|b\u0159ezen|b\u0159ezna|duben|dubna|kv\u011bten|kv\u011btna|\u010dervenec|\u010dervence|\u010derven|\u010dervna|srpen|srpna|z\xe1\u0159\xed|\u0159\xedjen|\u0159\xedjna|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|\xfano|b\u0159e|dub|kv\u011b|\u010dvn|\u010dvc|srp|z\xe1\u0159|\u0159\xedj|lis|pro)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"ned\u011ble_pond\u011bl\xed_\xfater\xfd_st\u0159eda_\u010dtvrtek_p\xe1tek_sobota".split("_"),weekdaysShort:"ne_po_\xfat_st_\u010dt_p\xe1_so".split("_"),weekdaysMin:"ne_po_\xfat_st_\u010dt_p\xe1_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[z\xedtra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v ned\u011bli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve st\u0159edu v] LT";case 4:return"[ve \u010dtvrtek v] LT";case 5:return"[v p\xe1tek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[v\u010dera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou ned\u011bli v] LT";case 1:case 2:return"[minul\xe9] dddd [v] LT";case 3:return"[minulou st\u0159edu v] LT";case 4:case 5:return"[minul\xfd] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"p\u0159ed %s",s:o,ss:o,m:o,mm:o,h:o,hh:o,d:o,dd:o,M:o,MM:o,y:o,yy:o},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},PCNd:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var i=n("SVse"),r=n("V/fk"),s=n("ChqD"),o=n("yGOH"),a=n("9Xeq"),c=n("Avrn"),l=n("aexS"),u=n("aXbf"),d=n("8Y7J");let h=(()=>{class e{}return e.\u0275mod=d.Kb({type:e}),e.\u0275inj=d.Jb({factory:function(t){return new(t||e)},providers:[l.a,c.a,u.a],imports:[[i.c,a.a,r.a,s.a,o.a],r.a,a.a,s.a,o.a]}),e})()},PKPk:function(e,t,n){"use strict";var i=n("ZUd8").charAt,r=n("afO8"),s=n("fdAy"),o="String Iterator",a=r.set,c=r.getterFor(o);s(String,"String",(function(e){a(this,{type:o,string:String(e),index:0})}),(function(){var e,t=c(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=i(n,r),t.index+=e.length,{value:e,done:!1})}))},PeUW:function(e,t,n){!function(e){"use strict";var t={1:"\u0be7",2:"\u0be8",3:"\u0be9",4:"\u0bea",5:"\u0beb",6:"\u0bec",7:"\u0bed",8:"\u0bee",9:"\u0bef",0:"\u0be6"},n={"\u0be7":"1","\u0be8":"2","\u0be9":"3","\u0bea":"4","\u0beb":"5","\u0bec":"6","\u0bed":"7","\u0bee":"8","\u0bef":"9","\u0be6":"0"};e.defineLocale("ta",{months:"\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf_\u0baa\u0bbf\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf_\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd_\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd_\u0bae\u0bc7_\u0b9c\u0bc2\u0ba9\u0bcd_\u0b9c\u0bc2\u0bb2\u0bc8_\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd_\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bc6\u0bae\u0bcd\u0baa\u0bb0\u0bcd_\u0b85\u0b95\u0bcd\u0b9f\u0bc7\u0bbe\u0baa\u0bb0\u0bcd_\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd_\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcd".split("_"),monthsShort:"\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf_\u0baa\u0bbf\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf_\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd_\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd_\u0bae\u0bc7_\u0b9c\u0bc2\u0ba9\u0bcd_\u0b9c\u0bc2\u0bb2\u0bc8_\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd_\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bc6\u0bae\u0bcd\u0baa\u0bb0\u0bcd_\u0b85\u0b95\u0bcd\u0b9f\u0bc7\u0bbe\u0baa\u0bb0\u0bcd_\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd_\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcd".split("_"),weekdays:"\u0b9e\u0bbe\u0baf\u0bbf\u0bb1\u0bcd\u0bb1\u0bc1\u0b95\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0ba4\u0bbf\u0b99\u0bcd\u0b95\u0b9f\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0b9a\u0bc6\u0bb5\u0bcd\u0bb5\u0bbe\u0baf\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0baa\u0bc1\u0ba4\u0ba9\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0bb5\u0bbf\u0baf\u0bbe\u0bb4\u0b95\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0bb5\u0bc6\u0bb3\u0bcd\u0bb3\u0bbf\u0b95\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8_\u0b9a\u0ba9\u0bbf\u0b95\u0bcd\u0b95\u0bbf\u0bb4\u0bae\u0bc8".split("_"),weekdaysShort:"\u0b9e\u0bbe\u0baf\u0bbf\u0bb1\u0bc1_\u0ba4\u0bbf\u0b99\u0bcd\u0b95\u0bb3\u0bcd_\u0b9a\u0bc6\u0bb5\u0bcd\u0bb5\u0bbe\u0baf\u0bcd_\u0baa\u0bc1\u0ba4\u0ba9\u0bcd_\u0bb5\u0bbf\u0baf\u0bbe\u0bb4\u0ba9\u0bcd_\u0bb5\u0bc6\u0bb3\u0bcd\u0bb3\u0bbf_\u0b9a\u0ba9\u0bbf".split("_"),weekdaysMin:"\u0b9e\u0bbe_\u0ba4\u0bbf_\u0b9a\u0bc6_\u0baa\u0bc1_\u0bb5\u0bbf_\u0bb5\u0bc6_\u0b9a".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[\u0b87\u0ba9\u0bcd\u0bb1\u0bc1] LT",nextDay:"[\u0ba8\u0bbe\u0bb3\u0bc8] LT",nextWeek:"dddd, LT",lastDay:"[\u0ba8\u0bc7\u0bb1\u0bcd\u0bb1\u0bc1] LT",lastWeek:"[\u0b95\u0b9f\u0ba8\u0bcd\u0ba4 \u0bb5\u0bbe\u0bb0\u0bae\u0bcd] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0b87\u0bb2\u0bcd",past:"%s \u0bae\u0bc1\u0ba9\u0bcd",s:"\u0b92\u0bb0\u0bc1 \u0b9a\u0bbf\u0bb2 \u0bb5\u0bbf\u0ba8\u0bbe\u0b9f\u0bbf\u0b95\u0bb3\u0bcd",ss:"%d \u0bb5\u0bbf\u0ba8\u0bbe\u0b9f\u0bbf\u0b95\u0bb3\u0bcd",m:"\u0b92\u0bb0\u0bc1 \u0ba8\u0bbf\u0bae\u0bbf\u0b9f\u0bae\u0bcd",mm:"%d \u0ba8\u0bbf\u0bae\u0bbf\u0b9f\u0b99\u0bcd\u0b95\u0bb3\u0bcd",h:"\u0b92\u0bb0\u0bc1 \u0bae\u0ba3\u0bbf \u0ba8\u0bc7\u0bb0\u0bae\u0bcd",hh:"%d \u0bae\u0ba3\u0bbf \u0ba8\u0bc7\u0bb0\u0bae\u0bcd",d:"\u0b92\u0bb0\u0bc1 \u0ba8\u0bbe\u0bb3\u0bcd",dd:"%d \u0ba8\u0bbe\u0b9f\u0bcd\u0b95\u0bb3\u0bcd",M:"\u0b92\u0bb0\u0bc1 \u0bae\u0bbe\u0ba4\u0bae\u0bcd",MM:"%d \u0bae\u0bbe\u0ba4\u0b99\u0bcd\u0b95\u0bb3\u0bcd",y:"\u0b92\u0bb0\u0bc1 \u0bb5\u0bb0\u0bc1\u0b9f\u0bae\u0bcd",yy:"%d \u0b86\u0ba3\u0bcd\u0b9f\u0bc1\u0b95\u0bb3\u0bcd"},dayOfMonthOrdinalParse:/\d{1,2}\u0bb5\u0ba4\u0bc1/,ordinal:function(e){return e+"\u0bb5\u0ba4\u0bc1"},preparse:function(e){return e.replace(/[\u0be7\u0be8\u0be9\u0bea\u0beb\u0bec\u0bed\u0bee\u0bef\u0be6]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/\u0baf\u0bbe\u0bae\u0bae\u0bcd|\u0bb5\u0bc8\u0b95\u0bb1\u0bc8|\u0b95\u0bbe\u0bb2\u0bc8|\u0ba8\u0ba3\u0bcd\u0baa\u0b95\u0bb2\u0bcd|\u0b8e\u0bb1\u0bcd\u0baa\u0bbe\u0b9f\u0bc1|\u0bae\u0bbe\u0bb2\u0bc8/,meridiem:function(e,t,n){return e<2?" \u0baf\u0bbe\u0bae\u0bae\u0bcd":e<6?" \u0bb5\u0bc8\u0b95\u0bb1\u0bc8":e<10?" \u0b95\u0bbe\u0bb2\u0bc8":e<14?" \u0ba8\u0ba3\u0bcd\u0baa\u0b95\u0bb2\u0bcd":e<18?" \u0b8e\u0bb1\u0bcd\u0baa\u0bbe\u0b9f\u0bc1":e<22?" \u0bae\u0bbe\u0bb2\u0bc8":" \u0baf\u0bbe\u0bae\u0bae\u0bcd"},meridiemHour:function(e,t){return 12===e&&(e=0),"\u0baf\u0bbe\u0bae\u0bae\u0bcd"===t?e<2?e:e+12:"\u0bb5\u0bc8\u0b95\u0bb1\u0bc8"===t||"\u0b95\u0bbe\u0bb2\u0bc8"===t||"\u0ba8\u0ba3\u0bcd\u0baa\u0b95\u0bb2\u0bcd"===t&&e>=10?e:e+12},week:{dow:0,doy:6}})}(n("wd/R"))},PhyI:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return r}));var i=function(e){return e[e.global=0]="global",e[e.pool=1]="pool",e[e.image=2]="image",e}({}),r=function(e){return e[e.bps=0]="bps",e[e.iops=1]="iops",e[e.milliseconds=2]="milliseconds",e}({})},PpIw:function(e,t,n){!function(e){"use strict";var t={1:"\u0ce7",2:"\u0ce8",3:"\u0ce9",4:"\u0cea",5:"\u0ceb",6:"\u0cec",7:"\u0ced",8:"\u0cee",9:"\u0cef",0:"\u0ce6"},n={"\u0ce7":"1","\u0ce8":"2","\u0ce9":"3","\u0cea":"4","\u0ceb":"5","\u0cec":"6","\u0ced":"7","\u0cee":"8","\u0cef":"9","\u0ce6":"0"};e.defineLocale("kn",{months:"\u0c9c\u0ca8\u0cb5\u0cb0\u0cbf_\u0cab\u0cc6\u0cac\u0ccd\u0cb0\u0cb5\u0cb0\u0cbf_\u0cae\u0cbe\u0cb0\u0ccd\u0c9a\u0ccd_\u0c8f\u0caa\u0ccd\u0cb0\u0cbf\u0cb2\u0ccd_\u0cae\u0cc6\u0cd5_\u0c9c\u0cc2\u0ca8\u0ccd_\u0c9c\u0cc1\u0cb2\u0cc6\u0cd6_\u0c86\u0c97\u0cb8\u0ccd\u0c9f\u0ccd_\u0cb8\u0cc6\u0caa\u0ccd\u0c9f\u0cc6\u0c82\u0cac\u0cb0\u0ccd_\u0c85\u0c95\u0ccd\u0c9f\u0cc6\u0cc2\u0cd5\u0cac\u0cb0\u0ccd_\u0ca8\u0cb5\u0cc6\u0c82\u0cac\u0cb0\u0ccd_\u0ca1\u0cbf\u0cb8\u0cc6\u0c82\u0cac\u0cb0\u0ccd".split("_"),monthsShort:"\u0c9c\u0ca8_\u0cab\u0cc6\u0cac\u0ccd\u0cb0_\u0cae\u0cbe\u0cb0\u0ccd\u0c9a\u0ccd_\u0c8f\u0caa\u0ccd\u0cb0\u0cbf\u0cb2\u0ccd_\u0cae\u0cc6\u0cd5_\u0c9c\u0cc2\u0ca8\u0ccd_\u0c9c\u0cc1\u0cb2\u0cc6\u0cd6_\u0c86\u0c97\u0cb8\u0ccd\u0c9f\u0ccd_\u0cb8\u0cc6\u0caa\u0ccd\u0c9f\u0cc6\u0c82_\u0c85\u0c95\u0ccd\u0c9f\u0cc6\u0cc2\u0cd5_\u0ca8\u0cb5\u0cc6\u0c82_\u0ca1\u0cbf\u0cb8\u0cc6\u0c82".split("_"),monthsParseExact:!0,weekdays:"\u0cad\u0cbe\u0ca8\u0cc1\u0cb5\u0cbe\u0cb0_\u0cb8\u0cc6\u0cc2\u0cd5\u0cae\u0cb5\u0cbe\u0cb0_\u0cae\u0c82\u0c97\u0cb3\u0cb5\u0cbe\u0cb0_\u0cac\u0cc1\u0ca7\u0cb5\u0cbe\u0cb0_\u0c97\u0cc1\u0cb0\u0cc1\u0cb5\u0cbe\u0cb0_\u0cb6\u0cc1\u0c95\u0ccd\u0cb0\u0cb5\u0cbe\u0cb0_\u0cb6\u0ca8\u0cbf\u0cb5\u0cbe\u0cb0".split("_"),weekdaysShort:"\u0cad\u0cbe\u0ca8\u0cc1_\u0cb8\u0cc6\u0cc2\u0cd5\u0cae_\u0cae\u0c82\u0c97\u0cb3_\u0cac\u0cc1\u0ca7_\u0c97\u0cc1\u0cb0\u0cc1_\u0cb6\u0cc1\u0c95\u0ccd\u0cb0_\u0cb6\u0ca8\u0cbf".split("_"),weekdaysMin:"\u0cad\u0cbe_\u0cb8\u0cc6\u0cc2\u0cd5_\u0cae\u0c82_\u0cac\u0cc1_\u0c97\u0cc1_\u0cb6\u0cc1_\u0cb6".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[\u0c87\u0c82\u0ca6\u0cc1] LT",nextDay:"[\u0ca8\u0cbe\u0cb3\u0cc6] LT",nextWeek:"dddd, LT",lastDay:"[\u0ca8\u0cbf\u0ca8\u0ccd\u0ca8\u0cc6] LT",lastWeek:"[\u0c95\u0cc6\u0cc2\u0ca8\u0cc6\u0caf] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0ca8\u0c82\u0ca4\u0cb0",past:"%s \u0cb9\u0cbf\u0c82\u0ca6\u0cc6",s:"\u0c95\u0cc6\u0cb2\u0cb5\u0cc1 \u0c95\u0ccd\u0cb7\u0ca3\u0c97\u0cb3\u0cc1",ss:"%d \u0cb8\u0cc6\u0c95\u0cc6\u0c82\u0ca1\u0cc1\u0c97\u0cb3\u0cc1",m:"\u0c92\u0c82\u0ca6\u0cc1 \u0ca8\u0cbf\u0cae\u0cbf\u0cb7",mm:"%d \u0ca8\u0cbf\u0cae\u0cbf\u0cb7",h:"\u0c92\u0c82\u0ca6\u0cc1 \u0c97\u0c82\u0c9f\u0cc6",hh:"%d \u0c97\u0c82\u0c9f\u0cc6",d:"\u0c92\u0c82\u0ca6\u0cc1 \u0ca6\u0cbf\u0ca8",dd:"%d \u0ca6\u0cbf\u0ca8",M:"\u0c92\u0c82\u0ca6\u0cc1 \u0ca4\u0cbf\u0c82\u0c97\u0cb3\u0cc1",MM:"%d \u0ca4\u0cbf\u0c82\u0c97\u0cb3\u0cc1",y:"\u0c92\u0c82\u0ca6\u0cc1 \u0cb5\u0cb0\u0ccd\u0cb7",yy:"%d \u0cb5\u0cb0\u0ccd\u0cb7"},preparse:function(e){return e.replace(/[\u0ce7\u0ce8\u0ce9\u0cea\u0ceb\u0cec\u0ced\u0cee\u0cef\u0ce6]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/\u0cb0\u0cbe\u0ca4\u0ccd\u0cb0\u0cbf|\u0cac\u0cc6\u0cb3\u0cbf\u0c97\u0ccd\u0c97\u0cc6|\u0cae\u0ca7\u0ccd\u0caf\u0cbe\u0cb9\u0ccd\u0ca8|\u0cb8\u0c82\u0c9c\u0cc6/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u0cb0\u0cbe\u0ca4\u0ccd\u0cb0\u0cbf"===t?e<4?e:e+12:"\u0cac\u0cc6\u0cb3\u0cbf\u0c97\u0ccd\u0c97\u0cc6"===t?e:"\u0cae\u0ca7\u0ccd\u0caf\u0cbe\u0cb9\u0ccd\u0ca8"===t?e>=10?e:e+12:"\u0cb8\u0c82\u0c9c\u0cc6"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"\u0cb0\u0cbe\u0ca4\u0ccd\u0cb0\u0cbf":e<10?"\u0cac\u0cc6\u0cb3\u0cbf\u0c97\u0ccd\u0c97\u0cc6":e<17?"\u0cae\u0ca7\u0ccd\u0caf\u0cbe\u0cb9\u0ccd\u0ca8":e<20?"\u0cb8\u0c82\u0c9c\u0cc6":"\u0cb0\u0cbe\u0ca4\u0ccd\u0cb0\u0cbf"},dayOfMonthOrdinalParse:/\d{1,2}(\u0ca8\u0cc6\u0cd5)/,ordinal:function(e){return e+"\u0ca8\u0cc6\u0cd5"},week:{dow:0,doy:6}})}(n("wd/R"))},PqYM:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n("HDdC"),r=n("D0XW"),s=n("Y7HM"),o=n("z+Ro");function a(e=0,t,n){let a=-1;return Object(s.a)(t)?a=Number(t)<1?1:Number(t):Object(o.a)(t)&&(n=t),Object(o.a)(n)||(n=r.a),new i.a(t=>{const i=Object(s.a)(e)?e:+e-n.now();return n.schedule(c,i,{index:0,period:a,subscriber:t})})}function c(e){const{index:t,period:n,subscriber:i}=e;if(i.next(t),!i.closed){if(-1===n)return i.complete();e.index=t+1,this.schedule(e,n)}}},QFaf:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("s7LF");class r extends i.j{constructor(e,t,n){super(e,t,n),this.controls=e}get(e){const t=this._get(e);if(!t)throw new Error(`Control '${e}' could not be found!`);return t}_get(e){return super.get(e)||Object.values(this.controls).filter(e=>e.get).map(t=>t instanceof r?t._get(e):t.get(e)).find(e=>Boolean(e))}getValue(e){return this.get(e).value}silentSet(e,t){this.get(e).setValue(t,{emitEvent:!1})}showError(e,t,n){const i=this.get(e);return(t.submitted||i.dirty)&&(n?i.hasError(n):i.invalid)}}},QTAa:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("t/zF");class r extends i.a{}},QWBl:function(e,t,n){"use strict";var i=n("I+eb"),r=n("F8JR");i({target:"Array",proto:!0,forced:[].forEach!=r},{forEach:r})},Qj4J:function(e,t,n){!function(e){"use strict";e.defineLocale("ar-kw",{months:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),monthsShort:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062a\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0627\u062d\u062f_\u0627\u062a\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:0,doy:12}})}(n("wd/R"))},Qo9l:function(e,t,n){var i=n("2oRo");e.exports=i},RAwQ:function(e,t,n){!function(e){"use strict";function t(e,t,n,i){var r={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return t?r[n][0]:r[n][1]}function n(e){if(e=parseInt(e,10),isNaN(e))return!1;if(e<0)return!0;if(e<10)return 4<=e&&e<=7;if(e<100){var t=e%10;return n(0===t?e/10:t)}if(e<1e4){for(;e>=10;)e/=10;return n(e)}return n(e/=1e3)}e.defineLocale("lb",{months:"Januar_Februar_M\xe4erz_Abr\xebll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_M\xe9indeg_D\xebnschdeg_M\xebttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._M\xe9._D\xeb._M\xeb._Do._Fr._Sa.".split("_"),weekdaysMin:"So_M\xe9_D\xeb_M\xeb_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[G\xebschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:function(e){return n(e.substr(0,e.indexOf(" ")))?"a "+e:"an "+e},past:function(e){return n(e.substr(0,e.indexOf(" ")))?"viru "+e:"virun "+e},s:"e puer Sekonnen",ss:"%d Sekonnen",m:t,mm:"%d Minutten",h:t,hh:"%d Stonnen",d:t,dd:"%d Deeg",M:t,MM:"%d M\xe9int",y:t,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},RK3t:function(e,t,n){var i=n("0Dky"),r=n("xrYK"),s="".split;e.exports=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==r(e)?s.call(e,""):Object(e)}:Object},RNIs:function(e,t,n){var i=n("tiKp"),r=n("fHMY"),s=n("m/L8"),o=i("unscopables"),a=Array.prototype;null==a[o]&&s.f(a,o,{configurable:!0,value:r(null)}),e.exports=function(e){a[o][e]=!0}},Rf2I:function(e,t,n){"use strict";n.d(t,"a",(function(){return A}));var i=n("s7LF"),r=n("LvDl"),s=n.n(r),o=n("2EZI"),a=n("Fgil"),c=n("aXbf"),l=n("8Y7J"),u=n("G0yt"),d=n("ajRT"),h=n("SVse"),f=n("NwgZ"),p=n("6+kj"),m=n("ANnk"),b=n("f69J"),g=n("EmSq"),_=n("ppaS");function y(e,t){if(1&e&&(l.Qb(0,10),l.Oc(1),l.Pb()),2&e){const e=l.ic();l.yb(1),l.Qc(" ",e.titleText," ")}}function v(e,t){if(1&e&&(l.Sb(0,"p"),l.Oc(1),l.Rb()),2&e){const e=l.ic();l.yb(1),l.Pc(e.message)}}const w=function(e){return{required:e}};function S(e,t){if(1&e&&(l.Sb(0,"label",18),l.Oc(1),l.Rb()),2&e){const e=l.ic().$implicit;l.pc("ngClass",l.uc(3,w,!0===(null==e?null:e.required)))("for",e.name),l.yb(1),l.Qc(" ",e.label," ")}}function M(e,t){if(1&e&&l.Nb(0,"input",19),2&e){const e=l.ic().$implicit;l.pc("type",e.type)("id",e.name)("name",e.name)("formControlName",e.name)}}function k(e,t){if(1&e&&l.Nb(0,"input",20),2&e){const e=l.ic().$implicit;l.pc("id",e.name)("name",e.name)("formControlName",e.name)}}function x(e,t){if(1&e&&(l.Sb(0,"option",24),l.Oc(1),l.Rb()),2&e){const e=l.ic(2).$implicit;l.pc("ngValue",null),l.yb(1),l.Qc(" ",null==e||null==e.typeConfig?null:e.typeConfig.placeholder," ")}}function D(e,t){if(1&e&&(l.Sb(0,"option",25),l.Oc(1),l.Rb()),2&e){const e=t.$implicit;l.pc("value",e.value),l.yb(1),l.Qc(" ",e.text," ")}}function T(e,t){if(1&e&&(l.Sb(0,"select",21),l.Mc(1,x,2,2,"option",22),l.Mc(2,D,2,2,"option",23),l.Rb()),2&e){const e=l.ic().$implicit;l.pc("id",e.name)("formControlName",e.name),l.yb(1),l.pc("ngIf",null==e||null==e.typeConfig?null:e.typeConfig.placeholder),l.yb(1),l.pc("ngForOf",null==e||null==e.typeConfig?null:e.typeConfig.options)}}function C(e,t){if(1&e&&l.Nb(0,"cd-select-badges",26),2&e){const e=l.ic().$implicit;l.pc("id",e.name)("data",e.value)("customBadges",null==e||null==e.typeConfig?null:e.typeConfig.customBadges)("options",null==e||null==e.typeConfig?null:e.typeConfig.options)("messages",null==e||null==e.typeConfig?null:e.typeConfig.messages)}}function O(e,t){if(1&e&&(l.Sb(0,"span",27),l.Oc(1),l.Rb()),2&e){const e=l.ic().$implicit,t=l.ic();l.yb(1),l.Qc(" ",t.getError(e)," ")}}const L=function(e,t){return{"cd-col-form-input":e,"col-sm-12":t}},R=function(){return["text","number"]};function E(e,t){if(1&e&&(l.Qb(0),l.Sb(1,"div"),l.Mc(2,S,2,5,"label",11),l.Sb(3,"div",12),l.Mc(4,M,1,4,"input",13),l.Mc(5,k,1,3,"input",14),l.Mc(6,T,3,4,"select",15),l.Mc(7,C,1,5,"cd-select-badges",16),l.Mc(8,O,2,1,"span",17),l.Rb(),l.Rb(),l.Pb()),2&e){const e=t.$implicit,n=l.ic(),i=l.Ac(4);l.yb(1),l.Bb("form-group row cd-",e.name,"-form-group"),l.yb(1),l.pc("ngIf",e.label),l.yb(1),l.pc("ngClass",l.vc(10,L,e.label,!e.label)),l.yb(1),l.pc("ngIf",l.tc(13,R).includes(e.type)),l.yb(1),l.pc("ngIf","binary"===e.type),l.yb(1),l.pc("ngIf","select"===e.type),l.yb(1),l.pc("ngIf","select-badges"===e.type),l.yb(1),l.pc("ngIf",n.formGroup.showError(e.name,i))}}let A=(()=>{class e{constructor(e,t,n,i){this.activeModal=e,this.formBuilder=t,this.formatter=n,this.dimlessBinaryPipe=i}ngOnInit(){this.createForm()}createForm(){const e={};this.fields.forEach(t=>{e[t.name]=this.createFormControl(t)}),this.formGroup=this.formBuilder.group(e)}createFormControl(e){let t=[];return s.a.isBoolean(e.required)&&e.required&&t.push(i.A.required),e.validators&&(t=t.concat(e.validators)),new i.h(s.a.defaultTo("binary"===e.type?this.dimlessBinaryPipe.transform(e.value):e.value,null),{validators:t})}getError(e){const t=this.formGroup.get(e.name).errors;return Object.keys(t).map(n=>this.getErrorMessage(n,t[n],e.errors)).join("<br>")}getErrorMessage(e,t,n){if(n){const t=n[e];if(t)return t}return["binaryMin","binaryMax"].includes(e)?t():"required"===e?"This field is required.":"An error occurred."}onSubmitForm(e){this.fields.filter(e=>"binary"===e.type).map(e=>e.name).forEach(t=>{const n=e[t];n&&(e[t]=this.formatter.toBytes(n))}),this.activeModal.close(),s.a.isFunction(this.onSubmit)&&this.onSubmit(e)}}return e.\u0275fac=function(t){return new(t||e)(l.Mb(u.a),l.Mb(o.a),l.Mb(c.a),l.Mb(a.a))},e.\u0275cmp=l.Gb({type:e,selectors:[["cd-form-modal"]],decls:10,vars:7,consts:[[3,"modalRef"],["class","modal-title",4,"ngIf"],[1,"modal-content"],["novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[1,"modal-title"],["class","cd-col-form-label",3,"ngClass","for",4,"ngIf"],[3,"ngClass"],["class","form-control",3,"type","id","name","formControlName",4,"ngIf"],["type","text","class","form-control","cdDimlessBinary","",3,"id","name","formControlName",4,"ngIf"],["class","form-control custom-select",3,"id","formControlName",4,"ngIf"],[3,"id","data","customBadges","options","messages",4,"ngIf"],["class","invalid-feedback",4,"ngIf"],[1,"cd-col-form-label",3,"ngClass","for"],[1,"form-control",3,"type","id","name","formControlName"],["type","text","cdDimlessBinary","",1,"form-control",3,"id","name","formControlName"],[1,"form-control","custom-select",3,"id","formControlName"],[3,"ngValue",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"ngValue"],[3,"value"],[3,"id","data","customBadges","options","messages"],[1,"invalid-feedback"]],template:function(e,t){1&e&&(l.Sb(0,"cd-modal",0),l.Mc(1,y,2,1,"ng-container",1),l.Qb(2,2),l.Sb(3,"form",3,4),l.Sb(5,"div",5),l.Mc(6,v,2,1,"p",6),l.Mc(7,E,9,14,"ng-container",7),l.Rb(),l.Sb(8,"div",8),l.Sb(9,"cd-form-button-panel",9),l.gc("submitActionEvent",(function(){return t.onSubmitForm(t.formGroup.value)})),l.Rb(),l.Rb(),l.Rb(),l.Pb(),l.Rb()),2&e&&(l.pc("modalRef",t.activeModal),l.yb(1),l.pc("ngIf",t.titleText),l.yb(2),l.pc("formGroup",t.formGroup),l.yb(3),l.pc("ngIf",t.message),l.yb(1),l.pc("ngForOf",t.fields),l.yb(2),l.pc("form",t.formGroup)("submitText",t.submitButtonText))},directives:[d.a,h.r,i.C,i.r,i.k,f.a,h.q,p.a,h.p,m.a,i.d,b.a,i.q,i.i,g.a,i.z,i.u,i.B,_.a],styles:[""]}),e})()},Rm1S:function(e,t,n){"use strict";var i=n("14Sl"),r=n("glrk"),s=n("UMSQ"),o=n("HYAF"),a=n("iqWW"),c=n("FMNM");i("match",1,(function(e,t,n){return[function(t){var n=o(this),i=null==t?void 0:t[e];return void 0!==i?i.call(t,n):new RegExp(t)[e](String(n))},function(e){var i=n(t,e,this);if(i.done)return i.value;var o=r(e),l=String(this);if(!o.global)return c(o,l);var u=o.unicode;o.lastIndex=0;for(var d,h=[],f=0;null!==(d=c(o,l));){var p=String(d[0]);h[f]=p,""===p&&(o.lastIndex=a(l,s(o.lastIndex),u)),f++}return 0===f?null:h}]}))},RnhZ:function(e,t,n){var i={"./af":"K/tc","./af.js":"K/tc","./ar":"jnO4","./ar-dz":"o1bE","./ar-dz.js":"o1bE","./ar-kw":"Qj4J","./ar-kw.js":"Qj4J","./ar-ly":"HP3h","./ar-ly.js":"HP3h","./ar-ma":"CoRJ","./ar-ma.js":"CoRJ","./ar-sa":"gjCT","./ar-sa.js":"gjCT","./ar-tn":"bYM6","./ar-tn.js":"bYM6","./ar.js":"jnO4","./az":"SFxW","./az.js":"SFxW","./be":"H8ED","./be.js":"H8ED","./bg":"hKrs","./bg.js":"hKrs","./bm":"p/rL","./bm.js":"p/rL","./bn":"kEOa","./bn-bd":"loYQ","./bn-bd.js":"loYQ","./bn.js":"kEOa","./bo":"0mo+","./bo.js":"0mo+","./br":"aIdf","./br.js":"aIdf","./bs":"JVSJ","./bs.js":"JVSJ","./ca":"1xZ4","./ca.js":"1xZ4","./cs":"PA2r","./cs.js":"PA2r","./cv":"A+xa","./cv.js":"A+xa","./cy":"l5ep","./cy.js":"l5ep","./da":"DxQv","./da.js":"DxQv","./de":"tGlX","./de-at":"s+uk","./de-at.js":"s+uk","./de-ch":"u3GI","./de-ch.js":"u3GI","./de.js":"tGlX","./dv":"WYrj","./dv.js":"WYrj","./el":"jUeY","./el.js":"jUeY","./en-au":"Dmvi","./en-au.js":"Dmvi","./en-ca":"OIYi","./en-ca.js":"OIYi","./en-gb":"Oaa7","./en-gb.js":"Oaa7","./en-ie":"4dOw","./en-ie.js":"4dOw","./en-il":"czMo","./en-il.js":"czMo","./en-in":"7C5Q","./en-in.js":"7C5Q","./en-nz":"b1Dy","./en-nz.js":"b1Dy","./en-sg":"t+mt","./en-sg.js":"t+mt","./eo":"Zduo","./eo.js":"Zduo","./es":"iYuL","./es-do":"CjzT","./es-do.js":"CjzT","./es-mx":"tbfe","./es-mx.js":"tbfe","./es-us":"Vclq","./es-us.js":"Vclq","./es.js":"iYuL","./et":"7BjC","./et.js":"7BjC","./eu":"D/JM","./eu.js":"D/JM","./fa":"jfSC","./fa.js":"jfSC","./fi":"gekB","./fi.js":"gekB","./fil":"1ppg","./fil.js":"1ppg","./fo":"ByF4","./fo.js":"ByF4","./fr":"nyYc","./fr-ca":"2fjn","./fr-ca.js":"2fjn","./fr-ch":"Dkky","./fr-ch.js":"Dkky","./fr.js":"nyYc","./fy":"cRix","./fy.js":"cRix","./ga":"USCx","./ga.js":"USCx","./gd":"9rRi","./gd.js":"9rRi","./gl":"iEDd","./gl.js":"iEDd","./gom-deva":"qvJo","./gom-deva.js":"qvJo","./gom-latn":"DKr+","./gom-latn.js":"DKr+","./gu":"4MV3","./gu.js":"4MV3","./he":"x6pH","./he.js":"x6pH","./hi":"3E1r","./hi.js":"3E1r","./hr":"S6ln","./hr.js":"S6ln","./hu":"WxRl","./hu.js":"WxRl","./hy-am":"1rYy","./hy-am.js":"1rYy","./id":"UDhR","./id.js":"UDhR","./is":"BVg3","./is.js":"BVg3","./it":"bpih","./it-ch":"bxKX","./it-ch.js":"bxKX","./it.js":"bpih","./ja":"B55N","./ja.js":"B55N","./jv":"tUCv","./jv.js":"tUCv","./ka":"IBtZ","./ka.js":"IBtZ","./kk":"bXm7","./kk.js":"bXm7","./km":"6B0Y","./km.js":"6B0Y","./kn":"PpIw","./kn.js":"PpIw","./ko":"Ivi+","./ko.js":"Ivi+","./ku":"JCF/","./ku.js":"JCF/","./ky":"lgnt","./ky.js":"lgnt","./lb":"RAwQ","./lb.js":"RAwQ","./lo":"sp3z","./lo.js":"sp3z","./lt":"JvlW","./lt.js":"JvlW","./lv":"uXwI","./lv.js":"uXwI","./me":"KTz0","./me.js":"KTz0","./mi":"aIsn","./mi.js":"aIsn","./mk":"aQkU","./mk.js":"aQkU","./ml":"AvvY","./ml.js":"AvvY","./mn":"lYtQ","./mn.js":"lYtQ","./mr":"Ob0Z","./mr.js":"Ob0Z","./ms":"6+QB","./ms-my":"ZAMP","./ms-my.js":"ZAMP","./ms.js":"6+QB","./mt":"G0Uy","./mt.js":"G0Uy","./my":"honF","./my.js":"honF","./nb":"bOMt","./nb.js":"bOMt","./ne":"OjkT","./ne.js":"OjkT","./nl":"+s0g","./nl-be":"2ykv","./nl-be.js":"2ykv","./nl.js":"+s0g","./nn":"uEye","./nn.js":"uEye","./oc-lnc":"Fnuy","./oc-lnc.js":"Fnuy","./pa-in":"8/+R","./pa-in.js":"8/+R","./pl":"jVdC","./pl.js":"jVdC","./pt":"8mBD","./pt-br":"0tRk","./pt-br.js":"0tRk","./pt.js":"8mBD","./ro":"lyxo","./ro.js":"lyxo","./ru":"lXzo","./ru.js":"lXzo","./sd":"Z4QM","./sd.js":"Z4QM","./se":"//9w","./se.js":"//9w","./si":"7aV9","./si.js":"7aV9","./sk":"e+ae","./sk.js":"e+ae","./sl":"gVVK","./sl.js":"gVVK","./sq":"yPMs","./sq.js":"yPMs","./sr":"zx6S","./sr-cyrl":"E+lV","./sr-cyrl.js":"E+lV","./sr.js":"zx6S","./ss":"Ur1D","./ss.js":"Ur1D","./sv":"X709","./sv.js":"X709","./sw":"dNwA","./sw.js":"dNwA","./ta":"PeUW","./ta.js":"PeUW","./te":"XLvN","./te.js":"XLvN","./tet":"V2x9","./tet.js":"V2x9","./tg":"Oxv6","./tg.js":"Oxv6","./th":"EOgW","./th.js":"EOgW","./tk":"Wv91","./tk.js":"Wv91","./tl-ph":"Dzi0","./tl-ph.js":"Dzi0","./tlh":"z3Vd","./tlh.js":"z3Vd","./tr":"DoHr","./tr.js":"DoHr","./tzl":"z1FC","./tzl.js":"z1FC","./tzm":"wQk9","./tzm-latn":"tT3J","./tzm-latn.js":"tT3J","./tzm.js":"wQk9","./ug-cn":"YRex","./ug-cn.js":"YRex","./uk":"raLr","./uk.js":"raLr","./ur":"UpQW","./ur.js":"UpQW","./uz":"Loxo","./uz-latn":"AQ68","./uz-latn.js":"AQ68","./uz.js":"Loxo","./vi":"KSF8","./vi.js":"KSF8","./x-pseudo":"/X5v","./x-pseudo.js":"/X5v","./yo":"fzPg","./yo.js":"fzPg","./zh-cn":"XDpg","./zh-cn.js":"XDpg","./zh-hk":"SatO","./zh-hk.js":"SatO","./zh-mo":"OmwH","./zh-mo.js":"OmwH","./zh-tw":"kOpN","./zh-tw.js":"kOpN"};function r(e){var t=s(e);return n(t)}function s(e){if(!n.o(i,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return i[e]}r.keys=function(){return Object.keys(i)},r.resolve=s,e.exports=r,r.id="RnhZ"},S6ln:function(e,t,n){!function(e){"use strict";function t(e,t,n){var i=e+" ";switch(n){case"ss":return i+(1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi");case"m":return t?"jedna minuta":"jedne minute";case"mm":return i+(1===e?"minuta":2===e||3===e||4===e?"minute":"minuta");case"h":return t?"jedan sat":"jednog sata";case"hh":return i+(1===e?"sat":2===e||3===e||4===e?"sata":"sati");case"dd":return i+(1===e?"dan":"dana");case"MM":return i+(1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci");case"yy":return i+(1===e?"godina":2===e||3===e||4===e?"godine":"godina")}}e.defineLocale("hr",{months:{format:"sije\u010dnja_velja\u010de_o\u017eujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"sije\u010danj_velja\u010da_o\u017eujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._o\u017eu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_\u010detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._\u010det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010de_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"Do MMMM YYYY",LLL:"Do MMMM YYYY H:mm",LLLL:"dddd, Do MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[ju\u010der u] LT",lastWeek:function(){switch(this.day()){case 0:return"[pro\u0161lu] [nedjelju] [u] LT";case 3:return"[pro\u0161lu] [srijedu] [u] LT";case 6:return"[pro\u0161le] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[pro\u0161li] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n("wd/R"))},S7zO:function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var i=n("LvDl"),r=n.n(i),s=n("oxzT"),o=(n("vCyI"),n("jKX/"),n("8Y7J")),a=n("SVse"),c=n("iInd"),l=n("G0yt");const u=function(e){return{disabled:e}},d=function(e){return[e]};function h(e,t){if(1&e){const e=o.Tb();o.Qb(0),o.Sb(1,"button",3),o.gc("click",(function(){o.Dc(e);const t=o.ic();return t.useClickAction(t.currentAction)})),o.Nb(2,"i",4),o.Sb(3,"span"),o.Oc(4),o.Rb(),o.Rb(),o.Pb()}if(2&e){const e=o.ic();o.yb(1),o.Bb("btn btn-",e.btnColor,""),o.qc("title",e.useDisableDesc(e.currentAction)),o.pc("ngClass",o.uc(9,u,e.disableSelectionAction(e.currentAction)))("routerLink",e.useRouterLink(e.currentAction))("preserveFragment",e.currentAction.preserveFragment?"":null),o.yb(1),o.pc("ngClass",o.uc(11,d,e.currentAction.icon)),o.yb(2),o.Pc(e.currentAction.name)}}function f(e,t){if(1&e&&(o.Qb(0),o.Oc(1),o.Pb()),2&e){const e=o.ic(2);o.yb(1),o.Qc("",e.dropDownOnly," ")}}function p(e,t){1&e&&o.Nb(0,"span",10)}function m(e,t){if(1&e){const e=o.Tb();o.Qb(0),o.Sb(1,"button",11),o.gc("click",(function(){o.Dc(e);const n=t.$implicit;return o.ic(2).useClickAction(n)})),o.Nb(2,"i",4),o.Sb(3,"span"),o.Oc(4),o.Rb(),o.Rb(),o.Pb()}if(2&e){const e=t.$implicit,n=o.ic(2);o.yb(1),o.Ab(n.toClassName(e)),o.qc("title",n.useDisableDesc(e)),o.pc("routerLink",n.useRouterLink(e))("preserveFragment",e.preserveFragment?"":null)("disabled",n.disableSelectionAction(e)),o.yb(1),o.pc("ngClass",o.uc(9,d,e.icon)),o.yb(2),o.Pc(e.name)}}function b(e,t){if(1&e&&(o.Sb(0,"div",5),o.Sb(1,"button",6),o.Mc(2,f,2,1,"ng-container",1),o.Mc(3,p,1,0,"span",7),o.Rb(),o.Sb(4,"div",8),o.Mc(5,m,5,11,"ng-container",9),o.Rb(),o.Rb()),2&e){const e=o.ic();o.yb(1),o.Bb("btn btn-",e.btnColor," dropdown-toggle-split"),o.yb(1),o.pc("ngIf",e.dropDownOnly),o.yb(1),o.pc("ngIf",!e.dropDownOnly),o.yb(2),o.pc("ngForOf",e.dropDownActions)}}let g=(()=>{class e{constructor(){this.btnColor="accent",this.dropDownActions=[],this.icons=s.a}ngOnInit(){this.removeActionsWithNoPermissions(),this.onSelectionChange()}ngOnChanges(e){e.selection&&this.onSelectionChange()}onSelectionChange(){this.updateDropDownActions(),this.updateCurrentAction()}toClassName(e){return e.name.replace(/ /g,"-").replace(/[^a-z-]/gi,"").toLowerCase()}removeActionsWithNoPermissions(){if(!this.permission)return void(this.tableActions=[]);const e=Object.keys(this.permission).filter(e=>this.permission[e]);this.tableActions=this.tableActions.filter(t=>e.includes(t.permission))}updateDropDownActions(){this.dropDownActions=this.tableActions.filter(e=>e.visible?e.visible(this.selection):e)}updateCurrentAction(){if(this.dropDownOnly)return void(this.currentAction=void 0);let e=this.dropDownActions.find(e=>this.showableAction(e));!e&&this.dropDownActions.length>0&&(e=this.dropDownActions[0]),this.currentAction=e}showableAction(e){const t=e.canBePrimary,n=this.selection.hasSingleSelection,i="create"===e.permission?!n:n;return t&&t(this.selection)||!t&&i}useRouterLink(e){if(e.routerLink&&!this.disableSelectionAction(e))return r.a.isString(e.routerLink)?e.routerLink:e.routerLink()}disableSelectionAction(e){const t=e.disable;if(t)return Boolean(t(this.selection));const n=e.permission,i=this.selection.hasSingleSelection&&this.selection.first();return Boolean(["update","delete"].includes(n)&&(!i||i.cdExecuting))}useClickAction(e){return!this.disableSelectionAction(e)&&e.click&&e.click()}useDisableDesc(e){if(e.disable){const t=e.disable(this.selection);return r.a.isString(t)?t:void 0}}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o.Gb({type:e,selectors:[["cd-table-actions"]],inputs:{permission:"permission",selection:"selection",tableActions:"tableActions",btnColor:"btnColor",dropDownOnly:"dropDownOnly"},features:[o.wb],decls:3,vars:2,consts:[[1,"btn-group"],[4,"ngIf"],["class","btn-group","ngbDropdown","","role","group","aria-label","Button group with nested dropdown",4,"ngIf"],["type","button",3,"title","ngClass","routerLink","preserveFragment","click"],[3,"ngClass"],["ngbDropdown","","role","group","aria-label","Button group with nested dropdown",1,"btn-group"],["ngbDropdownToggle",""],["class","sr-only",4,"ngIf"],["ngbDropdownMenu","",1,"dropdown-menu"],[4,"ngFor","ngForOf"],[1,"sr-only"],["ngbDropdownItem","",3,"title","routerLink","preserveFragment","disabled","click"]],template:function(e,t){1&e&&(o.Sb(0,"div",0),o.Mc(1,h,5,13,"ng-container",1),o.Mc(2,b,6,6,"div",2),o.Rb()),2&e&&(o.yb(1),o.pc("ngIf",t.currentAction),o.yb(1),o.pc("ngIf",t.dropDownActions.length>1))},directives:[a.r,a.p,c.f,l.i,l.m,l.k,a.q,l.j],styles:["button.disabled[_ngcontent-%COMP%]{cursor:default!important;pointer-events:auto}"]}),e})()},SFxW:function(e,t,n){!function(e){"use strict";var t={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-\xfcnc\xfc",4:"-\xfcnc\xfc",100:"-\xfcnc\xfc",6:"-nc\u0131",9:"-uncu",10:"-uncu",30:"-uncu",60:"-\u0131nc\u0131",90:"-\u0131nc\u0131"};e.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ert\u0259si_\xc7\u0259r\u015f\u0259nb\u0259 ax\u015fam\u0131_\xc7\u0259r\u015f\u0259nb\u0259_C\xfcm\u0259 ax\u015fam\u0131_C\xfcm\u0259_\u015e\u0259nb\u0259".split("_"),weekdaysShort:"Baz_BzE_\xc7Ax_\xc7\u0259r_CAx_C\xfcm_\u015e\u0259n".split("_"),weekdaysMin:"Bz_BE_\xc7A_\xc7\u0259_CA_C\xfc_\u015e\u0259".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bug\xfcn saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[g\u0259l\u0259n h\u0259ft\u0259] dddd [saat] LT",lastDay:"[d\xfcn\u0259n] LT",lastWeek:"[ke\xe7\u0259n h\u0259ft\u0259] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s \u0259vv\u0259l",s:"bir ne\xe7\u0259 saniy\u0259",ss:"%d saniy\u0259",m:"bir d\u0259qiq\u0259",mm:"%d d\u0259qiq\u0259",h:"bir saat",hh:"%d saat",d:"bir g\xfcn",dd:"%d g\xfcn",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gec\u0259|s\u0259h\u0259r|g\xfcnd\xfcz|ax\u015fam/,isPM:function(e){return/^(g\xfcnd\xfcz|ax\u015fam)$/.test(e)},meridiem:function(e,t,n){return e<4?"gec\u0259":e<12?"s\u0259h\u0259r":e<17?"g\xfcnd\xfcz":"ax\u015fam"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0131nc\u0131|inci|nci|\xfcnc\xfc|nc\u0131|uncu)/,ordinal:function(e){if(0===e)return e+"-\u0131nc\u0131";var n=e%10;return e+(t[n]||t[e%100-n]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n("wd/R"))},STAE:function(e,t,n){var i=n("0Dky");e.exports=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())}))},SVse:function(e,t,n){"use strict";n.d(t,"a",(function(){return v})),n.d(t,"b",(function(){return Ae})),n.d(t,"c",(function(){return qe})),n.d(t,"d",(function(){return c})),n.d(t,"e",(function(){return Fe})),n.d(t,"f",(function(){return Ve})),n.d(t,"g",(function(){return C})),n.d(t,"h",(function(){return S})),n.d(t,"i",(function(){return ze})),n.d(t,"j",(function(){return $e})),n.d(t,"k",(function(){return He})),n.d(t,"l",(function(){return d})),n.d(t,"m",(function(){return M})),n.d(t,"n",(function(){return _})),n.d(t,"o",(function(){return Ie})),n.d(t,"p",(function(){return me})),n.d(t,"q",(function(){return ge})),n.d(t,"r",(function(){return ye})),n.d(t,"s",(function(){return De})),n.d(t,"t",(function(){return Me})),n.d(t,"u",(function(){return ke})),n.d(t,"v",(function(){return xe})),n.d(t,"w",(function(){return Te})),n.d(t,"x",(function(){return w})),n.d(t,"y",(function(){return Be})),n.d(t,"z",(function(){return l})),n.d(t,"A",(function(){return Ne})),n.d(t,"B",(function(){return O})),n.d(t,"C",(function(){return je})),n.d(t,"D",(function(){return Ke})),n.d(t,"E",(function(){return Q})),n.d(t,"F",(function(){return A})),n.d(t,"G",(function(){return E})),n.d(t,"H",(function(){return I})),n.d(t,"I",(function(){return Qe})),n.d(t,"J",(function(){return a})),n.d(t,"K",(function(){return Je})),n.d(t,"L",(function(){return s})),n.d(t,"M",(function(){return pe})),n.d(t,"N",(function(){return o}));var i=n("8Y7J");let r=null;function s(){return r}function o(e){r||(r=e)}class a{}const c=new i.r("DocumentToken");let l=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:u,token:e,providedIn:"platform"}),e})();function u(){return Object(i.dc)(h)}const d=new i.r("Location Initialized");let h=(()=>{class e extends l{constructor(e){super(),this._doc=e,this._init()}_init(){this.location=s().getLocation(),this._history=s().getHistory()}getBaseHrefFromDOM(){return s().getBaseHref(this._doc)}onPopState(e){s().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",e,!1)}onHashChange(e){s().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",e,!1)}get href(){return this.location.href}get protocol(){return this.location.protocol}get hostname(){return this.location.hostname}get port(){return this.location.port}get pathname(){return this.location.pathname}get search(){return this.location.search}get hash(){return this.location.hash}set pathname(e){this.location.pathname=e}pushState(e,t,n){f()?this._history.pushState(e,t,n):this.location.hash=n}replaceState(e,t,n){f()?this._history.replaceState(e,t,n):this.location.hash=n}forward(){this._history.forward()}back(){this._history.back()}getState(){return this._history.state}}return e.\u0275fac=function(t){return new(t||e)(i.dc(c))},e.\u0275prov=Object(i.Ib)({factory:p,token:e,providedIn:"platform"}),e})();function f(){return!!window.history.pushState}function p(){return new h(Object(i.dc)(c))}function m(e,t){if(0==e.length)return t;if(0==t.length)return e;let n=0;return e.endsWith("/")&&n++,t.startsWith("/")&&n++,2==n?e+t.substring(1):1==n?e+t:e+"/"+t}function b(e){const t=e.match(/#|\?|$/),n=t&&t.index||e.length;return e.slice(0,n-("/"===e[n-1]?1:0))+e.slice(n)}function g(e){return e&&"?"!==e[0]?"?"+e:e}let _=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:y,token:e,providedIn:"root"}),e})();function y(e){const t=Object(i.dc)(c).location;return new w(Object(i.dc)(l),t&&t.origin||"")}const v=new i.r("appBaseHref");let w=(()=>{class e extends _{constructor(e,t){if(super(),this._platformLocation=e,null==t&&(t=this._platformLocation.getBaseHrefFromDOM()),null==t)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");this._baseHref=t}onPopState(e){this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e)}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return m(this._baseHref,e)}path(e=!1){const t=this._platformLocation.pathname+g(this._platformLocation.search),n=this._platformLocation.hash;return n&&e?`${t}${n}`:t}pushState(e,t,n,i){const r=this.prepareExternalUrl(n+g(i));this._platformLocation.pushState(e,t,r)}replaceState(e,t,n,i){const r=this.prepareExternalUrl(n+g(i));this._platformLocation.replaceState(e,t,r)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}}return e.\u0275fac=function(t){return new(t||e)(i.dc(l),i.dc(v,8))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})(),S=(()=>{class e extends _{constructor(e,t){super(),this._platformLocation=e,this._baseHref="",null!=t&&(this._baseHref=t)}onPopState(e){this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e)}getBaseHref(){return this._baseHref}path(e=!1){let t=this._platformLocation.hash;return null==t&&(t="#"),t.length>0?t.substring(1):t}prepareExternalUrl(e){const t=m(this._baseHref,e);return t.length>0?"#"+t:t}pushState(e,t,n,i){let r=this.prepareExternalUrl(n+g(i));0==r.length&&(r=this._platformLocation.pathname),this._platformLocation.pushState(e,t,r)}replaceState(e,t,n,i){let r=this.prepareExternalUrl(n+g(i));0==r.length&&(r=this._platformLocation.pathname),this._platformLocation.replaceState(e,t,r)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}}return e.\u0275fac=function(t){return new(t||e)(i.dc(l),i.dc(v,8))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})(),M=(()=>{class e{constructor(e,t){this._subject=new i.o,this._urlChangeListeners=[],this._platformStrategy=e;const n=this._platformStrategy.getBaseHref();this._platformLocation=t,this._baseHref=b(x(n)),this._platformStrategy.onPopState(e=>{this._subject.emit({url:this.path(!0),pop:!0,state:e.state,type:e.type})})}path(e=!1){return this.normalize(this._platformStrategy.path(e))}getState(){return this._platformLocation.getState()}isCurrentPathEqualTo(e,t=""){return this.path()==this.normalize(e+g(t))}normalize(t){return e.stripTrailingSlash(function(e,t){return e&&t.startsWith(e)?t.substring(e.length):t}(this._baseHref,x(t)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._platformStrategy.prepareExternalUrl(e)}go(e,t="",n=null){this._platformStrategy.pushState(n,"",e,t),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+g(t)),n)}replaceState(e,t="",n=null){this._platformStrategy.replaceState(n,"",e,t),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+g(t)),n)}forward(){this._platformStrategy.forward()}back(){this._platformStrategy.back()}onUrlChange(e){this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(e=>{this._notifyUrlChangeListeners(e.url,e.state)}))}_notifyUrlChangeListeners(e="",t){this._urlChangeListeners.forEach(n=>n(e,t))}subscribe(e,t,n){return this._subject.subscribe({next:e,error:t,complete:n})}}return e.\u0275fac=function(t){return new(t||e)(i.dc(_),i.dc(l))},e.normalizeQueryParams=g,e.joinWithSlash=m,e.stripTrailingSlash=b,e.\u0275prov=Object(i.Ib)({factory:k,token:e,providedIn:"root"}),e})();function k(){return new M(Object(i.dc)(_),Object(i.dc)(l))}function x(e){return e.replace(/\/index.html$/,"")}var D=function(e){return e[e.Decimal=0]="Decimal",e[e.Percent=1]="Percent",e[e.Currency=2]="Currency",e[e.Scientific=3]="Scientific",e}({}),T=function(e){return e[e.Zero=0]="Zero",e[e.One=1]="One",e[e.Two=2]="Two",e[e.Few=3]="Few",e[e.Many=4]="Many",e[e.Other=5]="Other",e}({}),C=function(e){return e[e.Format=0]="Format",e[e.Standalone=1]="Standalone",e}({}),O=function(e){return e[e.Narrow=0]="Narrow",e[e.Abbreviated=1]="Abbreviated",e[e.Wide=2]="Wide",e[e.Short=3]="Short",e}({}),L=function(e){return e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e[e.Full=3]="Full",e}({}),R=function(e){return e[e.Decimal=0]="Decimal",e[e.Group=1]="Group",e[e.List=2]="List",e[e.PercentSign=3]="PercentSign",e[e.PlusSign=4]="PlusSign",e[e.MinusSign=5]="MinusSign",e[e.Exponential=6]="Exponential",e[e.SuperscriptingExponent=7]="SuperscriptingExponent",e[e.PerMille=8]="PerMille",e[e[1/0]=9]="Infinity",e[e.NaN=10]="NaN",e[e.TimeSeparator=11]="TimeSeparator",e[e.CurrencyDecimal=12]="CurrencyDecimal",e[e.CurrencyGroup=13]="CurrencyGroup",e}({});function E(e,t,n){const r=Object(i.ib)(e),s=H([r[i.Z.DayPeriodsFormat],r[i.Z.DayPeriodsStandalone]],t);return H(s,n)}function A(e,t,n){const r=Object(i.ib)(e),s=H([r[i.Z.DaysFormat],r[i.Z.DaysStandalone]],t);return H(s,n)}function I(e,t,n){const r=Object(i.ib)(e),s=H([r[i.Z.MonthsFormat],r[i.Z.MonthsStandalone]],t);return H(s,n)}function P(e,t){return H(Object(i.ib)(e)[i.Z.DateFormat],t)}function N(e,t){return H(Object(i.ib)(e)[i.Z.TimeFormat],t)}function j(e,t){return H(Object(i.ib)(e)[i.Z.DateTimeFormat],t)}function F(e,t){const n=Object(i.ib)(e),r=n[i.Z.NumberSymbols][t];if(void 0===r){if(t===R.CurrencyDecimal)return n[i.Z.NumberSymbols][R.Decimal];if(t===R.CurrencyGroup)return n[i.Z.NumberSymbols][R.Group]}return r}function Y(e,t){return Object(i.ib)(e)[i.Z.NumberFormats][t]}const z=i.lb;function $(e){if(!e[i.Z.ExtraData])throw new Error(`Missing extra locale data for the locale "${e[i.Z.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function H(e,t){for(let n=t;n>-1;n--)if(void 0!==e[n])return e[n];throw new Error("Locale data API: locale data undefined")}function W(e){const[t,n]=e.split(":");return{hours:+t,minutes:+n}}const V=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,B={},U=/((?:[^GyMLwWdEabBhHmsSzZO']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var G=function(e){return e[e.Short=0]="Short",e[e.ShortGMT=1]="ShortGMT",e[e.Long=2]="Long",e[e.Extended=3]="Extended",e}({}),q=function(e){return e[e.FullYear=0]="FullYear",e[e.Month=1]="Month",e[e.Date=2]="Date",e[e.Hours=3]="Hours",e[e.Minutes=4]="Minutes",e[e.Seconds=5]="Seconds",e[e.FractionalSeconds=6]="FractionalSeconds",e[e.Day=7]="Day",e}({}),J=function(e){return e[e.DayPeriods=0]="DayPeriods",e[e.Days=1]="Days",e[e.Months=2]="Months",e[e.Eras=3]="Eras",e}({});function Q(e,t,n,r){let s=function(e){if(se(e))return e;if("number"==typeof e&&!isNaN(e))return new Date(e);if("string"==typeof e){e=e.trim();const t=parseFloat(e);if(!isNaN(e-t))return new Date(t);if(/^(\d{4}-\d{1,2}-\d{1,2})$/.test(e)){const[t,n,i]=e.split("-").map(e=>+e);return new Date(t,n-1,i)}let n;if(n=e.match(V))return function(e){const t=new Date(0);let n=0,i=0;const r=e[8]?t.setUTCFullYear:t.setFullYear,s=e[8]?t.setUTCHours:t.setHours;e[9]&&(n=Number(e[9]+e[10]),i=Number(e[9]+e[11])),r.call(t,Number(e[1]),Number(e[2])-1,Number(e[3]));const o=Number(e[4]||0)-n,a=Number(e[5]||0)-i,c=Number(e[6]||0),l=Math.round(1e3*parseFloat("0."+(e[7]||0)));return s.call(t,o,a,c,l),t}(n)}const t=new Date(e);if(!se(t))throw new Error(`Unable to convert "${e}" into a date`);return t}(e);t=function e(t,n){const r=function(e){return Object(i.ib)(e)[i.Z.LocaleId]}(t);if(B[r]=B[r]||{},B[r][n])return B[r][n];let s="";switch(n){case"shortDate":s=P(t,L.Short);break;case"mediumDate":s=P(t,L.Medium);break;case"longDate":s=P(t,L.Long);break;case"fullDate":s=P(t,L.Full);break;case"shortTime":s=N(t,L.Short);break;case"mediumTime":s=N(t,L.Medium);break;case"longTime":s=N(t,L.Long);break;case"fullTime":s=N(t,L.Full);break;case"short":const n=e(t,"shortTime"),i=e(t,"shortDate");s=K(j(t,L.Short),[n,i]);break;case"medium":const r=e(t,"mediumTime"),o=e(t,"mediumDate");s=K(j(t,L.Medium),[r,o]);break;case"long":const a=e(t,"longTime"),c=e(t,"longDate");s=K(j(t,L.Long),[a,c]);break;case"full":const l=e(t,"fullTime"),u=e(t,"fullDate");s=K(j(t,L.Full),[l,u])}return s&&(B[r][n]=s),s}(n,t)||t;let o,a=[];for(;t;){if(o=U.exec(t),!o){a.push(t);break}{a=a.concat(o.slice(1));const e=a.pop();if(!e)break;t=e}}let c=s.getTimezoneOffset();r&&(c=re(r,c),s=function(e,t,n){const i=e.getTimezoneOffset();return function(e,t){return(e=new Date(e.getTime())).setMinutes(e.getMinutes()+t),e}(e,-1*(re(t,i)-i))}(s,r));let l="";return a.forEach(e=>{const t=function(e){if(ie[e])return ie[e];let t;switch(e){case"G":case"GG":case"GGG":t=ee(J.Eras,O.Abbreviated);break;case"GGGG":t=ee(J.Eras,O.Wide);break;case"GGGGG":t=ee(J.Eras,O.Narrow);break;case"y":t=X(q.FullYear,1,0,!1,!0);break;case"yy":t=X(q.FullYear,2,0,!0,!0);break;case"yyy":t=X(q.FullYear,3,0,!1,!0);break;case"yyyy":t=X(q.FullYear,4,0,!1,!0);break;case"M":case"L":t=X(q.Month,1,1);break;case"MM":case"LL":t=X(q.Month,2,1);break;case"MMM":t=ee(J.Months,O.Abbreviated);break;case"MMMM":t=ee(J.Months,O.Wide);break;case"MMMMM":t=ee(J.Months,O.Narrow);break;case"LLL":t=ee(J.Months,O.Abbreviated,C.Standalone);break;case"LLLL":t=ee(J.Months,O.Wide,C.Standalone);break;case"LLLLL":t=ee(J.Months,O.Narrow,C.Standalone);break;case"w":t=ne(1);break;case"ww":t=ne(2);break;case"W":t=ne(1,!0);break;case"d":t=X(q.Date,1);break;case"dd":t=X(q.Date,2);break;case"E":case"EE":case"EEE":t=ee(J.Days,O.Abbreviated);break;case"EEEE":t=ee(J.Days,O.Wide);break;case"EEEEE":t=ee(J.Days,O.Narrow);break;case"EEEEEE":t=ee(J.Days,O.Short);break;case"a":case"aa":case"aaa":t=ee(J.DayPeriods,O.Abbreviated);break;case"aaaa":t=ee(J.DayPeriods,O.Wide);break;case"aaaaa":t=ee(J.DayPeriods,O.Narrow);break;case"b":case"bb":case"bbb":t=ee(J.DayPeriods,O.Abbreviated,C.Standalone,!0);break;case"bbbb":t=ee(J.DayPeriods,O.Wide,C.Standalone,!0);break;case"bbbbb":t=ee(J.DayPeriods,O.Narrow,C.Standalone,!0);break;case"B":case"BB":case"BBB":t=ee(J.DayPeriods,O.Abbreviated,C.Format,!0);break;case"BBBB":t=ee(J.DayPeriods,O.Wide,C.Format,!0);break;case"BBBBB":t=ee(J.DayPeriods,O.Narrow,C.Format,!0);break;case"h":t=X(q.Hours,1,-12);break;case"hh":t=X(q.Hours,2,-12);break;case"H":t=X(q.Hours,1);break;case"HH":t=X(q.Hours,2);break;case"m":t=X(q.Minutes,1);break;case"mm":t=X(q.Minutes,2);break;case"s":t=X(q.Seconds,1);break;case"ss":t=X(q.Seconds,2);break;case"S":t=X(q.FractionalSeconds,1);break;case"SS":t=X(q.FractionalSeconds,2);break;case"SSS":t=X(q.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":t=te(G.Short);break;case"ZZZZZ":t=te(G.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":t=te(G.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":t=te(G.Long);break;default:return null}return ie[e]=t,t}(e);l+=t?t(s,n,c):"''"===e?"'":e.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}function K(e,t){return t&&(e=e.replace(/\{([^}]+)}/g,(function(e,n){return null!=t&&n in t?t[n]:e}))),e}function Z(e,t,n="-",i,r){let s="";(e<0||r&&e<=0)&&(r?e=1-e:(e=-e,s=n));let o=String(e);for(;o.length<t;)o="0"+o;return i&&(o=o.substr(o.length-t)),s+o}function X(e,t,n=0,i=!1,r=!1){return function(s,o){let a=function(e,t){switch(e){case q.FullYear:return t.getFullYear();case q.Month:return t.getMonth();case q.Date:return t.getDate();case q.Hours:return t.getHours();case q.Minutes:return t.getMinutes();case q.Seconds:return t.getSeconds();case q.FractionalSeconds:return t.getMilliseconds();case q.Day:return t.getDay();default:throw new Error(`Unknown DateType value "${e}".`)}}(e,s);if((n>0||a>-n)&&(a+=n),e===q.Hours)0===a&&-12===n&&(a=12);else if(e===q.FractionalSeconds)return c=t,Z(a,3).substr(0,c);var c;const l=F(o,R.MinusSign);return Z(a,t,l,i,r)}}function ee(e,t,n=C.Format,r=!1){return function(s,o){return function(e,t,n,r,s,o){switch(n){case J.Months:return I(t,s,r)[e.getMonth()];case J.Days:return A(t,s,r)[e.getDay()];case J.DayPeriods:const a=e.getHours(),c=e.getMinutes();if(o){const e=function(e){const t=Object(i.ib)(e);return $(t),(t[i.Z.ExtraData][2]||[]).map(e=>"string"==typeof e?W(e):[W(e[0]),W(e[1])])}(t),n=function(e,t,n){const r=Object(i.ib)(e);$(r);const s=H([r[i.Z.ExtraData][0],r[i.Z.ExtraData][1]],t)||[];return H(s,n)||[]}(t,s,r),o=e.findIndex(e=>{if(Array.isArray(e)){const[t,n]=e,i=a>=t.hours&&c>=t.minutes,r=a<n.hours||a===n.hours&&c<n.minutes;if(t.hours<n.hours){if(i&&r)return!0}else if(i||r)return!0}else if(e.hours===a&&e.minutes===c)return!0;return!1});if(-1!==o)return n[o]}return E(t,s,r)[a<12?0:1];case J.Eras:return function(e,t){return H(Object(i.ib)(e)[i.Z.Eras],t)}(t,r)[e.getFullYear()<=0?0:1];default:throw new Error("unexpected translation type "+n)}}(s,o,e,t,n,r)}}function te(e){return function(t,n,i){const r=-1*i,s=F(n,R.MinusSign),o=r>0?Math.floor(r/60):Math.ceil(r/60);switch(e){case G.Short:return(r>=0?"+":"")+Z(o,2,s)+Z(Math.abs(r%60),2,s);case G.ShortGMT:return"GMT"+(r>=0?"+":"")+Z(o,1,s);case G.Long:return"GMT"+(r>=0?"+":"")+Z(o,2,s)+":"+Z(Math.abs(r%60),2,s);case G.Extended:return 0===i?"Z":(r>=0?"+":"")+Z(o,2,s)+":"+Z(Math.abs(r%60),2,s);default:throw new Error(`Unknown zone width "${e}"`)}}}function ne(e,t=!1){return function(n,i){let r;if(t){const e=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,t=n.getDate();r=1+Math.floor((t+e)/7)}else{const e=(s=n,new Date(s.getFullYear(),s.getMonth(),s.getDate()+(4-s.getDay()))),t=function(e){const t=new Date(e,0,1).getDay();return new Date(e,0,1+(t<=4?4:11)-t)}(e.getFullYear()),i=e.getTime()-t.getTime();r=1+Math.round(i/6048e5)}var s;return Z(r,e,F(i,R.MinusSign))}}const ie={};function re(e,t){e=e.replace(/:/g,"");const n=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(n)?t:n}function se(e){return e instanceof Date&&!isNaN(e.valueOf())}const oe=/^(\d+)?\.((\d+)(-(\d+))?)?$/,ae=".",ce="0";function le(e,t,n,i,r,s,o=!1){let a="",c=!1;if(isFinite(e)){let l=function(e){let t,n,i,r,s,o=Math.abs(e)+"",a=0;for((n=o.indexOf(ae))>-1&&(o=o.replace(ae,"")),(i=o.search(/e/i))>0?(n<0&&(n=i),n+=+o.slice(i+1),o=o.substring(0,i)):n<0&&(n=o.length),i=0;o.charAt(i)===ce;i++);if(i===(s=o.length))t=[0],n=1;else{for(s--;o.charAt(s)===ce;)s--;for(n-=i,t=[],r=0;i<=s;i++,r++)t[r]=Number(o.charAt(i))}return n>22&&(t=t.splice(0,21),a=n-1,n=1),{digits:t,exponent:a,integerLen:n}}(e);o&&(l=function(e){if(0===e.digits[0])return e;const t=e.digits.length-e.integerLen;return e.exponent?e.exponent+=2:(0===t?e.digits.push(0,0):1===t&&e.digits.push(0),e.integerLen+=2),e}(l));let u=t.minInt,d=t.minFrac,h=t.maxFrac;if(s){const e=s.match(oe);if(null===e)throw new Error(s+" is not a valid digit info");const t=e[1],n=e[3],i=e[5];null!=t&&(u=de(t)),null!=n&&(d=de(n)),null!=i?h=de(i):null!=n&&d>h&&(h=d)}!function(e,t,n){if(t>n)throw new Error(`The minimum number of digits after fraction (${t}) is higher than the maximum (${n}).`);let i=e.digits,r=i.length-e.integerLen;const s=Math.min(Math.max(t,r),n);let o=s+e.integerLen,a=i[o];if(o>0){i.splice(Math.max(e.integerLen,o));for(let e=o;e<i.length;e++)i[e]=0}else{r=Math.max(0,r),e.integerLen=1,i.length=Math.max(1,o=s+1),i[0]=0;for(let e=1;e<o;e++)i[e]=0}if(a>=5)if(o-1<0){for(let t=0;t>o;t--)i.unshift(0),e.integerLen++;i.unshift(1),e.integerLen++}else i[o-1]++;for(;r<Math.max(0,s);r++)i.push(0);let c=0!==s;const l=t+e.integerLen,u=i.reduceRight((function(e,t,n,i){return i[n]=(t+=e)<10?t:t-10,c&&(0===i[n]&&n>=l?i.pop():c=!1),t>=10?1:0}),0);u&&(i.unshift(u),e.integerLen++)}(l,d,h);let f=l.digits,p=l.integerLen;const m=l.exponent;let b=[];for(c=f.every(e=>!e);p<u;p++)f.unshift(0);for(;p<0;p++)f.unshift(0);p>0?b=f.splice(p,f.length):(b=f,f=[0]);const g=[];for(f.length>=t.lgSize&&g.unshift(f.splice(-t.lgSize,f.length).join(""));f.length>t.gSize;)g.unshift(f.splice(-t.gSize,f.length).join(""));f.length&&g.unshift(f.join("")),a=g.join(F(n,i)),b.length&&(a+=F(n,r)+b.join("")),m&&(a+=F(n,R.Exponential)+"+"+m)}else a=F(n,R.Infinity);return a=e<0&&!c?t.negPre+a+t.negSuf:t.posPre+a+t.posSuf,a}function ue(e,t="-"){const n={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},i=e.split(";"),r=i[0],s=i[1],o=-1!==r.indexOf(ae)?r.split(ae):[r.substring(0,r.lastIndexOf(ce)+1),r.substring(r.lastIndexOf(ce)+1)],a=o[0],c=o[1]||"";n.posPre=a.substr(0,a.indexOf("#"));for(let u=0;u<c.length;u++){const e=c.charAt(u);e===ce?n.minFrac=n.maxFrac=u+1:"#"===e?n.maxFrac=u+1:n.posSuf+=e}const l=a.split(",");if(n.gSize=l[1]?l[1].length:0,n.lgSize=l[2]||l[1]?(l[2]||l[1]).length:0,s){const e=r.length-n.posPre.length-n.posSuf.length,t=s.indexOf("#");n.negPre=s.substr(0,t).replace(/'/g,""),n.negSuf=s.substr(t+e).replace(/'/g,"")}else n.negPre=t+n.posPre,n.negSuf=n.posSuf;return n}function de(e){const t=parseInt(e);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+e);return t}class he{}let fe=(()=>{class e extends he{constructor(e){super(),this.locale=e}getPluralCategory(e,t){switch(z(t||this.locale)(e)){case T.Zero:return"zero";case T.One:return"one";case T.Two:return"two";case T.Few:return"few";case T.Many:return"many";default:return"other"}}}return e.\u0275fac=function(t){return new(t||e)(i.dc(i.v))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})();function pe(e,t){t=encodeURIComponent(t);for(const n of e.split(";")){const e=n.indexOf("="),[i,r]=-1==e?[n,""]:[n.slice(0,e),n.slice(e+1)];if(i.trim()===t)return decodeURIComponent(r)}return null}let me=(()=>{class e{constructor(e,t,n,i){this._iterableDiffers=e,this._keyValueDiffers=t,this._ngEl=n,this._renderer=i,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}set klass(e){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof e?e.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}set ngClass(e){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof e?e.split(/\s+/):e,this._rawClass&&(Object(i.ob)(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}ngDoCheck(){if(this._iterableDiffer){const e=this._iterableDiffer.diff(this._rawClass);e&&this._applyIterableChanges(e)}else if(this._keyValueDiffer){const e=this._keyValueDiffer.diff(this._rawClass);e&&this._applyKeyValueChanges(e)}}_applyKeyValueChanges(e){e.forEachAddedItem(e=>this._toggleClass(e.key,e.currentValue)),e.forEachChangedItem(e=>this._toggleClass(e.key,e.currentValue)),e.forEachRemovedItem(e=>{e.previousValue&&this._toggleClass(e.key,!1)})}_applyIterableChanges(e){e.forEachAddedItem(e=>{if("string"!=typeof e.item)throw new Error("NgClass can only toggle CSS classes expressed as strings, got "+Object(i.tb)(e.item));this._toggleClass(e.item,!0)}),e.forEachRemovedItem(e=>this._toggleClass(e.item,!1))}_applyClasses(e){e&&(Array.isArray(e)||e instanceof Set?e.forEach(e=>this._toggleClass(e,!0)):Object.keys(e).forEach(t=>this._toggleClass(t,!!e[t])))}_removeClasses(e){e&&(Array.isArray(e)||e instanceof Set?e.forEach(e=>this._toggleClass(e,!1)):Object.keys(e).forEach(e=>this._toggleClass(e,!1)))}_toggleClass(e,t){(e=e.trim())&&e.split(/\s+/g).forEach(e=>{t?this._renderer.addClass(this._ngEl.nativeElement,e):this._renderer.removeClass(this._ngEl.nativeElement,e)})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.t),i.Mb(i.u),i.Mb(i.m),i.Mb(i.E))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),e})();class be{constructor(e,t,n,i){this.$implicit=e,this.ngForOf=t,this.index=n,this.count=i}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let ge=(()=>{class e{constructor(e,t,n){this._viewContainer=e,this._template=t,this._differs=n,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){Object(i.U)()&&null!=e&&"function"!=typeof e&&console&&console.warn&&console.warn(`trackBy must be a function, but received ${JSON.stringify(e)}. See https://angular.io/api/common/NgForOf#change-propagation for more information.`),this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const n=this._ngForOf;if(!this._differ&&n)try{this._differ=this._differs.find(n).create(this.ngForTrackBy)}catch(t){throw new Error(`Cannot find a differ supporting object '${n}' of type '${e=n,e.name||typeof e}'. NgFor only supports binding to Iterables such as Arrays.`)}}var e;if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const t=[];e.forEachOperation((e,n,i)=>{if(null==e.previousIndex){const n=this._viewContainer.createEmbeddedView(this._template,new be(null,this._ngForOf,-1,-1),null===i?void 0:i),r=new _e(e,n);t.push(r)}else if(null==i)this._viewContainer.remove(null===n?void 0:n);else if(null!==n){const r=this._viewContainer.get(n);this._viewContainer.move(r,i);const s=new _e(e,r);t.push(s)}});for(let n=0;n<t.length;n++)this._perViewChange(t[n].view,t[n].record);for(let n=0,i=this._viewContainer.length;n<i;n++){const e=this._viewContainer.get(n);e.context.index=n,e.context.count=i,e.context.ngForOf=this._ngForOf}e.forEachIdentityChange(e=>{this._viewContainer.get(e.currentIndex).context.$implicit=e.item})}_perViewChange(e,t){e.context.$implicit=t.item}static ngTemplateContextGuard(e,t){return!0}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.P),i.Mb(i.L),i.Mb(i.t))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),e})();class _e{constructor(e,t){this.record=e,this.view=t}}let ye=(()=>{class e{constructor(e,t){this._viewContainer=e,this._context=new ve,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=t}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){we("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){we("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,t){return!0}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.P),i.Mb(i.L))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),e})();class ve{constructor(){this.$implicit=null,this.ngIf=null}}function we(e,t){if(t&&!t.createEmbeddedView)throw new Error(`${e} must be a TemplateRef, but received '${Object(i.tb)(t)}'.`)}class Se{constructor(e,t){this._viewContainerRef=e,this._templateRef=t,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(e){e&&!this._created?this.create():!e&&this._created&&this.destroy()}}let Me=(()=>{class e{constructor(){this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews||(this._defaultViews=[]),this._defaultViews.push(e)}_matchCase(e){const t=e==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||t,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),t}_updateDefaultCases(e){if(this._defaultViews&&e!==this._defaultUsed){this._defaultUsed=e;for(let t=0;t<this._defaultViews.length;t++)this._defaultViews[t].enforceState(e)}}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=i.Hb({type:e,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"}}),e})(),ke=(()=>{class e{constructor(e,t,n){this.ngSwitch=n,n._addCase(),this._view=new Se(e,t)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.P),i.Mb(i.L),i.Mb(Me,1))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"}}),e})(),xe=(()=>{class e{constructor(e,t,n){n._addDefault(new Se(e,t))}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.P),i.Mb(i.L),i.Mb(Me,1))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngSwitchDefault",""]]}),e})(),De=(()=>{class e{constructor(e,t,n){this._ngEl=e,this._differs=t,this._renderer=n,this._ngStyle=null,this._differ=null}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){const e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,t){const[n,i]=e.split(".");null!=(t=null!=t&&i?`${t}${i}`:t)?this._renderer.setStyle(this._ngEl.nativeElement,n,t):this._renderer.removeStyle(this._ngEl.nativeElement,n)}_applyChanges(e){e.forEachRemovedItem(e=>this._setStyle(e.key,null)),e.forEachAddedItem(e=>this._setStyle(e.key,e.currentValue)),e.forEachChangedItem(e=>this._setStyle(e.key,e.currentValue))}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(i.u),i.Mb(i.E))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}}),e})(),Te=(()=>{class e{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null}ngOnChanges(e){if(this._shouldRecreateView(e)){const e=this._viewContainerRef;this._viewRef&&e.remove(e.indexOf(this._viewRef)),this._viewRef=this.ngTemplateOutlet?e.createEmbeddedView(this.ngTemplateOutlet,this.ngTemplateOutletContext):null}else this._viewRef&&this.ngTemplateOutletContext&&this._updateExistingContext(this.ngTemplateOutletContext)}_shouldRecreateView(e){const t=e.ngTemplateOutletContext;return!!e.ngTemplateOutlet||t&&this._hasContextShapeChanged(t)}_hasContextShapeChanged(e){const t=Object.keys(e.previousValue||{}),n=Object.keys(e.currentValue||{});if(t.length===n.length){for(let e of n)if(-1===t.indexOf(e))return!0;return!1}return!0}_updateExistingContext(e){for(let t of Object.keys(e))this._viewRef.context[t]=this.ngTemplateOutletContext[t]}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.P))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet"},features:[i.wb]}),e})();function Ce(e,t){return Error(`InvalidPipeArgument: '${t}' for pipe '${Object(i.tb)(e)}'`)}class Oe{createSubscription(e,t){return e.subscribe({next:t,error:e=>{throw e}})}dispose(e){e.unsubscribe()}onDestroy(e){e.unsubscribe()}}class Le{createSubscription(e,t){return e.then(t,e=>{throw e})}dispose(e){}onDestroy(e){}}const Re=new Le,Ee=new Oe;let Ae=(()=>{class e{constructor(e){this._ref=e,this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null}ngOnDestroy(){this._subscription&&this._dispose()}transform(e){return this._obj?e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue:(e&&this._subscribe(e),this._latestValue)}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,t=>this._updateLatestValue(e,t))}_selectStrategy(t){if(Object(i.qb)(t))return Re;if(Object(i.pb)(t))return Ee;throw Ce(e,t)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,t){e===this._obj&&(this._latestValue=t,this._ref.markForCheck())}}return e.\u0275fac=function(t){return new(t||e)(i.fc())},e.\u0275pipe=i.Lb({name:"async",type:e,pure:!1}),e})(),Ie=(()=>{class e{transform(t){if(!t)return t;if("string"!=typeof t)throw Ce(e,t);return t.toLowerCase()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"lowercase",type:e,pure:!0}),e})();const Pe=/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\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\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\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\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\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-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\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\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\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-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\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\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\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]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D])\S*/g;let Ne=(()=>{class e{transform(t){if(!t)return t;if("string"!=typeof t)throw Ce(e,t);return t.replace(Pe,e=>e[0].toUpperCase()+e.substr(1).toLowerCase())}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"titlecase",type:e,pure:!0}),e})(),je=(()=>{class e{transform(t){if(!t)return t;if("string"!=typeof t)throw Ce(e,t);return t.toUpperCase()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"uppercase",type:e,pure:!0}),e})(),Fe=(()=>{class e{constructor(e){this.locale=e}transform(t,n="mediumDate",i,r){if(null==t||""===t||t!=t)return null;try{return Q(t,n,r||this.locale,i)}catch(s){throw Ce(e,s.message)}}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.v))},e.\u0275pipe=i.Lb({name:"date",type:e,pure:!0}),e})();const Ye=/#/g;let ze=(()=>{class e{constructor(e){this._localization=e}transform(t,n,i){if(null==t)return"";if("object"!=typeof n||null===n)throw Ce(e,n);return n[function(e,t,n,i){let r="="+e;if(t.indexOf(r)>-1)return r;if(r=n.getPluralCategory(e,i),t.indexOf(r)>-1)return r;if(t.indexOf("other")>-1)return"other";throw new Error(`No plural message found for value "${e}"`)}(t,Object.keys(n),this._localization,i)].replace(Ye,t.toString())}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(he))},e.\u0275pipe=i.Lb({name:"i18nPlural",type:e,pure:!0}),e})(),$e=(()=>{class e{transform(e){return JSON.stringify(e,null,2)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"json",type:e,pure:!1}),e})(),He=(()=>{class e{constructor(e){this.differs=e,this.keyValues=[]}transform(e,t=We){if(!e||!(e instanceof Map)&&"object"!=typeof e)return null;this.differ||(this.differ=this.differs.find(e).create());const n=this.differ.diff(e);return n&&(this.keyValues=[],n.forEachItem(e=>{this.keyValues.push({key:e.key,value:e.currentValue})}),this.keyValues.sort(t)),this.keyValues}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.u))},e.\u0275pipe=i.Lb({name:"keyvalue",type:e,pure:!1}),e})();function We(e,t){const n=e.key,i=t.key;if(n===i)return 0;if(void 0===n)return 1;if(void 0===i)return-1;if(null===n)return 1;if(null===i)return-1;if("string"==typeof n&&"string"==typeof i)return n<i?-1:1;if("number"==typeof n&&"number"==typeof i)return n-i;if("boolean"==typeof n&&"boolean"==typeof i)return n<i?-1:1;const r=String(n),s=String(i);return r==s?0:r<s?-1:1}let Ve=(()=>{class e{constructor(e){this._locale=e}transform(t,n,i){if(Ue(t))return null;i=i||this._locale;try{return function(e,t,n){return le(e,ue(Y(t,D.Decimal),F(t,R.MinusSign)),t,R.Group,R.Decimal,n)}(Ge(t),i,n)}catch(r){throw Ce(e,r.message)}}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.v))},e.\u0275pipe=i.Lb({name:"number",type:e,pure:!0}),e})(),Be=(()=>{class e{constructor(e){this._locale=e}transform(t,n,i){if(Ue(t))return null;i=i||this._locale;try{return function(e,t,n){return le(e,ue(Y(t,D.Percent),F(t,R.MinusSign)),t,R.Group,R.Decimal,n,!0).replace(new RegExp("%","g"),F(t,R.PercentSign))}(Ge(t),i,n)}catch(r){throw Ce(e,r.message)}}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.v))},e.\u0275pipe=i.Lb({name:"percent",type:e,pure:!0}),e})();function Ue(e){return null==e||""===e||e!=e}function Ge(e){if("string"==typeof e&&!isNaN(Number(e)-parseFloat(e)))return Number(e);if("number"!=typeof e)throw new Error(e+" is not a number");return e}let qe=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},providers:[{provide:he,useClass:fe}]}),e})();const Je="browser";function Qe(e){return e===Je}let Ke=(()=>{class e{}return e.\u0275prov=Object(i.Ib)({token:e,providedIn:"root",factory:()=>new Ze(Object(i.dc)(c),window,Object(i.dc)(i.n))}),e})();class Ze{constructor(e,t,n){this.document=e,this.window=t,this.errorHandler=n,this.offset=()=>[0,0]}setOffset(e){this.offset=Array.isArray(e)?()=>e:e}getScrollPosition(){return this.supportsScrolling()?[this.window.scrollX,this.window.scrollY]:[0,0]}scrollToPosition(e){this.supportsScrolling()&&this.window.scrollTo(e[0],e[1])}scrollToAnchor(e){if(this.supportsScrolling()){const t=this.document.getElementById(e)||this.document.getElementsByName(e)[0];t&&this.scrollToElement(t)}}setHistoryScrollRestoration(e){if(this.supportScrollRestoration()){const t=this.window.history;t&&t.scrollRestoration&&(t.scrollRestoration=e)}}scrollToElement(e){const t=e.getBoundingClientRect(),n=t.left+this.window.pageXOffset,i=t.top+this.window.pageYOffset,r=this.offset();this.window.scrollTo(n-r[0],i-r[1])}supportScrollRestoration(){try{if(!this.window||!this.window.scrollTo)return!1;const e=Xe(this.window.history)||Xe(Object.getPrototypeOf(this.window.history));return!(!e||!e.writable&&!e.set)}catch(e){return!1}}supportsScrolling(){try{return!!this.window.scrollTo}catch(e){return!1}}}function Xe(e){return Object.getOwnPropertyDescriptor(e,"scrollRestoration")}},SatO:function(e,t,n){!function(e){"use strict";e.defineLocale("zh-hk",{months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u9031\u65e5_\u9031\u4e00_\u9031\u4e8c_\u9031\u4e09_\u9031\u56db_\u9031\u4e94_\u9031\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5 HH:mm",LLLL:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm",l:"YYYY/M/D",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u51cc\u6668"===t||"\u65e9\u4e0a"===t||"\u4e0a\u5348"===t?e:"\u4e2d\u5348"===t?e>=11?e:e+12:"\u4e0b\u5348"===t||"\u665a\u4e0a"===t?e+12:void 0},meridiem:function(e,t,n){var i=100*e+t;return i<600?"\u51cc\u6668":i<900?"\u65e9\u4e0a":i<1200?"\u4e0a\u5348":1200===i?"\u4e2d\u5348":i<1800?"\u4e0b\u5348":"\u665a\u4e0a"},calendar:{sameDay:"[\u4eca\u5929]LT",nextDay:"[\u660e\u5929]LT",nextWeek:"[\u4e0b]ddddLT",lastDay:"[\u6628\u5929]LT",lastWeek:"[\u4e0a]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u9031)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"\u65e5";case"M":return e+"\u6708";case"w":case"W":return e+"\u9031";default:return e}},relativeTime:{future:"%s\u5f8c",past:"%s\u524d",s:"\u5e7e\u79d2",ss:"%d \u79d2",m:"1 \u5206\u9418",mm:"%d \u5206\u9418",h:"1 \u5c0f\u6642",hh:"%d \u5c0f\u6642",d:"1 \u5929",dd:"%d \u5929",M:"1 \u500b\u6708",MM:"%d \u500b\u6708",y:"1 \u5e74",yy:"%d \u5e74"}})}(n("wd/R"))},SeVD:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var i=n("ngJS"),r=n("NJ4a"),s=n("Lhse"),o=n("kJWO"),a=n("I55L"),c=n("c2HN"),l=n("XoHu");const u=e=>{if(e&&"function"==typeof e[o.a])return u=e,e=>{const t=u[o.a]();if("function"!=typeof t.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return t.subscribe(e)};if(Object(a.a)(e))return Object(i.a)(e);if(Object(c.a)(e))return n=e,e=>(n.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,r.a),e);if(e&&"function"==typeof e[s.a])return t=e,e=>{const n=t[s.a]();for(;;){let t;try{t=n.next()}catch(i){return e.error(i),e}if(t.done){e.complete();break}if(e.next(t.value),e.closed)break}return"function"==typeof n.return&&e.add(()=>{n.return&&n.return()}),e};{const t=Object(l.a)(e)?"an invalid object":`'${e}'`;throw new TypeError(`You provided ${t} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`)}var t,n,u}},SpAZ:function(e,t,n){"use strict";function i(e){return e}n.d(t,"a",(function(){return i}))},SxV6:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i=n("sVev"),r=n("pLZG"),s=n("IzEk"),o=n("xbPD"),a=n("XDbj"),c=n("SpAZ");function l(e,t){const n=arguments.length>=2;return l=>l.pipe(e?Object(r.a)((t,n)=>e(t,n,l)):c.a,Object(s.a)(1),n?Object(o.a)(t):Object(a.a)(()=>new i.a))}},TJUb:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("LvDl"),r=n.n(i),s=n("8Y7J");let o=(()=>{class e{transform(e,t){return r.a.isPlainObject(t)?r.a.get(t,e,e):e}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=s.Lb({name:"map",type:e,pure:!0}),e})()},TWQb:function(e,t,n){var i=n("/GqU"),r=n("UMSQ"),s=n("I8vh"),o=function(e){return function(t,n,o){var a,c=i(t),l=r(c.length),u=s(o,l);if(e&&n!=n){for(;l>u;)if((a=c[u++])!=a)return!0}else for(;l>u;u++)if((e||u in c)&&c[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},TYzs:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("8Y7J");let r=(()=>{class e{transform(e){const t=parseInt(e,10);return isNaN(t)?e:e+(1===Math.floor(t/10)?"th":t%10==1?"st":t%10==2?"nd":t%10==3?"rd":"th")}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"ordinal",type:e,pure:!0}),e})()},TeQF:function(e,t,n){"use strict";var i=n("I+eb"),r=n("tycR").filter,s=n("Hd5f"),o=n("rkAj"),a=s("filter"),c=o("filter");i({target:"Array",proto:!0,forced:!a||!c},{filter:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}})},UDhR:function(e,t,n){!function(e){"use strict";e.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"siang"===t?e>=11?e:e+12:"sore"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"siang":e<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",ss:"%d detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:0,doy:6}})}(n("wd/R"))},UMSQ:function(e,t,n){var i=n("ppGB"),r=Math.min;e.exports=function(e){return e>0?r(i(e),9007199254740991):0}},USCx:function(e,t,n){!function(e){"use strict";e.defineLocale("ga",{months:["Ean\xe1ir","Feabhra","M\xe1rta","Aibre\xe1n","Bealtaine","Meitheamh","I\xfail","L\xfanasa","Me\xe1n F\xf3mhair","Deireadh F\xf3mhair","Samhain","Nollaig"],monthsShort:["Ean","Feabh","M\xe1rt","Aib","Beal","Meith","I\xfail","L\xfan","M.F.","D.F.","Samh","Noll"],monthsParseExact:!0,weekdays:["D\xe9 Domhnaigh","D\xe9 Luain","D\xe9 M\xe1irt","D\xe9 C\xe9adaoin","D\xe9ardaoin","D\xe9 hAoine","D\xe9 Sathairn"],weekdaysShort:["Domh","Luan","M\xe1irt","C\xe9ad","D\xe9ar","Aoine","Sath"],weekdaysMin:["Do","Lu","M\xe1","C\xe9","D\xe9","A","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Inniu ag] LT",nextDay:"[Am\xe1rach ag] LT",nextWeek:"dddd [ag] LT",lastDay:"[Inn\xe9 ag] LT",lastWeek:"dddd [seo caite] [ag] LT",sameElse:"L"},relativeTime:{future:"i %s",past:"%s \xf3 shin",s:"c\xfapla soicind",ss:"%d soicind",m:"n\xf3im\xe9ad",mm:"%d n\xf3im\xe9ad",h:"uair an chloig",hh:"%d uair an chloig",d:"l\xe1",dd:"%d l\xe1",M:"m\xed",MM:"%d m\xedonna",y:"bliain",yy:"%d bliain"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})}(n("wd/R"))},UTVS:function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},UpQW:function(e,t,n){!function(e){"use strict";var t=["\u062c\u0646\u0648\u0631\u06cc","\u0641\u0631\u0648\u0631\u06cc","\u0645\u0627\u0631\u0686","\u0627\u067e\u0631\u06cc\u0644","\u0645\u0626\u06cc","\u062c\u0648\u0646","\u062c\u0648\u0644\u0627\u0626\u06cc","\u0627\u06af\u0633\u062a","\u0633\u062a\u0645\u0628\u0631","\u0627\u06a9\u062a\u0648\u0628\u0631","\u0646\u0648\u0645\u0628\u0631","\u062f\u0633\u0645\u0628\u0631"],n=["\u0627\u062a\u0648\u0627\u0631","\u067e\u06cc\u0631","\u0645\u0646\u06af\u0644","\u0628\u062f\u06be","\u062c\u0645\u0639\u0631\u0627\u062a","\u062c\u0645\u0639\u06c1","\u06c1\u0641\u062a\u06c1"];e.defineLocale("ur",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd\u060c D MMMM YYYY HH:mm"},meridiemParse:/\u0635\u0628\u062d|\u0634\u0627\u0645/,isPM:function(e){return"\u0634\u0627\u0645"===e},meridiem:function(e,t,n){return e<12?"\u0635\u0628\u062d":"\u0634\u0627\u0645"},calendar:{sameDay:"[\u0622\u062c \u0628\u0648\u0642\u062a] LT",nextDay:"[\u06a9\u0644 \u0628\u0648\u0642\u062a] LT",nextWeek:"dddd [\u0628\u0648\u0642\u062a] LT",lastDay:"[\u06af\u0630\u0634\u062a\u06c1 \u0631\u0648\u0632 \u0628\u0648\u0642\u062a] LT",lastWeek:"[\u06af\u0630\u0634\u062a\u06c1] dddd [\u0628\u0648\u0642\u062a] LT",sameElse:"L"},relativeTime:{future:"%s \u0628\u0639\u062f",past:"%s \u0642\u0628\u0644",s:"\u0686\u0646\u062f \u0633\u06cc\u06a9\u0646\u0688",ss:"%d \u0633\u06cc\u06a9\u0646\u0688",m:"\u0627\u06cc\u06a9 \u0645\u0646\u0679",mm:"%d \u0645\u0646\u0679",h:"\u0627\u06cc\u06a9 \u06af\u06be\u0646\u0679\u06c1",hh:"%d \u06af\u06be\u0646\u0679\u06d2",d:"\u0627\u06cc\u06a9 \u062f\u0646",dd:"%d \u062f\u0646",M:"\u0627\u06cc\u06a9 \u0645\u0627\u06c1",MM:"%d \u0645\u0627\u06c1",y:"\u0627\u06cc\u06a9 \u0633\u0627\u0644",yy:"%d \u0633\u0627\u0644"},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"\u060c")},week:{dow:1,doy:4}})}(n("wd/R"))},Ur1D:function(e,t,n){!function(e){"use strict";e.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,t,n){return e<11?"ekuseni":e<15?"emini":e<19?"entsambama":"ebusuku"},meridiemHour:function(e,t){return 12===e&&(e=0),"ekuseni"===t?e:"emini"===t?e>=11?e:e+12:"entsambama"===t||"ebusuku"===t?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}})}(n("wd/R"))},UxlC:function(e,t,n){"use strict";var i=n("14Sl"),r=n("glrk"),s=n("ewvW"),o=n("UMSQ"),a=n("ppGB"),c=n("HYAF"),l=n("iqWW"),u=n("FMNM"),d=Math.max,h=Math.min,f=Math.floor,p=/\$([$&'`]|\d\d?|<[^>]*>)/g,m=/\$([$&'`]|\d\d?)/g;i("replace",2,(function(e,t,n,i){var b=i.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,g=i.REPLACE_KEEPS_$0,_=b?"$":"$0";return[function(n,i){var r=c(this),s=null==n?void 0:n[e];return void 0!==s?s.call(n,r,i):t.call(String(r),n,i)},function(e,i){if(!b&&g||"string"==typeof i&&-1===i.indexOf(_)){var s=n(t,e,this,i);if(s.done)return s.value}var c=r(e),f=String(this),p="function"==typeof i;p||(i=String(i));var m=c.global;if(m){var v=c.unicode;c.lastIndex=0}for(var w=[];;){var S=u(c,f);if(null===S)break;if(w.push(S),!m)break;""===String(S[0])&&(c.lastIndex=l(f,o(c.lastIndex),v))}for(var M,k="",x=0,D=0;D<w.length;D++){S=w[D];for(var T=String(S[0]),C=d(h(a(S.index),f.length),0),O=[],L=1;L<S.length;L++)O.push(void 0===(M=S[L])?M:String(M));var R=S.groups;if(p){var E=[T].concat(O,C,f);void 0!==R&&E.push(R);var A=String(i.apply(void 0,E))}else A=y(T,f,C,O,R,i);C>=x&&(k+=f.slice(x,C)+A,x=C+T.length)}return k+f.slice(x)}];function y(e,n,i,r,o,a){var c=i+e.length,l=r.length,u=m;return void 0!==o&&(o=s(o),u=p),t.call(a,u,(function(t,s){var a;switch(s.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,i);case"'":return n.slice(c);case"<":a=o[s.slice(1,-1)];break;default:var u=+s;if(0===u)return t;if(u>l){var d=f(u/10);return 0===d?t:d<=l?void 0===r[d-1]?s.charAt(1):r[d-1]+s.charAt(1):t}a=r[u-1]}return void 0===a?"":a}))}}))},"V/fk":function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var i=n("SVse"),r=n("s7LF"),s=n("iInd"),o=n("G0yt"),a=n("Hicy"),c=n("hrfs"),l=n("WF9J"),u=n("yGOH"),d=n("9Xeq"),h=n("8Y7J");let f=(()=>{class e{}return e.\u0275mod=h.Kb({type:e}),e.\u0275inj=h.Jb({factory:function(t){return new(t||e)},providers:[],imports:[[i.c,r.m,r.x,o.c,o.y,o.A,o.F,c.b,r.x,d.a,u.a,o.l,a.b,l.b,s.i,o.h,o.C]]}),e})()},V2x9:function(e,t,n){!function(e){"use strict";e.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Ju\xf1u_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sest_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Ses_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"segundu balun",ss:"segundu %d",m:"minutu ida",mm:"minutu %d",h:"oras ida",hh:"oras %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n("wd/R"))},VRyK:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n("HDdC"),r=n("z+Ro"),s=n("bHdf"),o=n("yCtX");function a(...e){let t=Number.POSITIVE_INFINITY,n=null,a=e[e.length-1];return Object(r.a)(a)?(n=e.pop(),e.length>1&&"number"==typeof e[e.length-1]&&(t=e.pop())):"number"==typeof a&&(t=e.pop()),null===n&&1===e.length&&e[0]instanceof i.a?e[0]:Object(s.a)(t)(Object(o.a)(e,n))}},VTlA:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("mSOc"),r=n("ufoC"),s=n("8Y7J");let o=(()=>{class e{constructor(e,t){this.taskMessageService=e,this.summaryService=t}init(e,t,n,i,r,s,o){this.getUpdate=e,this.preProcessing=t,this.setList=n,this.onFetchError=i,this.taskFilter=r,this.itemFilter=s,this.builders=o||{},this.summaryDataSubscription=this.summaryService.subscribe(e=>{this.summary=e,this.fetch()},this.onFetchError)}fetch(){this.getUpdate().subscribe(e=>{this.updateData(e,this.summary.executing_tasks.filter(this.taskFilter))},this.onFetchError)}updateData(e,t){const n=this.preProcessing?this.preProcessing(e):e;this.addMissing(n,t),n.forEach(e=>{const n=t.filter(t=>this.itemFilter(e,t));e.cdExecuting=this.getTaskAction(n)}),this.setList(n)}addMissing(e,t){const n=this.builders.default;t.forEach(t=>{const i=e.find(e=>this.itemFilter(e,t)),r=this.builders[t.name];i||!r&&!n||e.push(r?r(t.metadata):n(t.metadata))})}getTaskAction(e){if(0!==e.length)return e.map(e=>{const t=e.progress?` ${e.progress}%`:"";return this.taskMessageService.getRunningText(e)+"..."+t}).join(", ")}ngOnDestroy(){this.summaryDataSubscription&&this.summaryDataSubscription.unsubscribe()}}return e.\u0275fac=function(t){return new(t||e)(s.dc(r.a),s.dc(i.a))},e.\u0275prov=s.Ib({token:e,factory:e.\u0275fac}),e})()},VXsX:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n("LvDl"),r=n.n(i),s=n("8Y7J");class o{constructor(e,t,n){this.name=e,this.metadata=t,this.onTaskFinished=n}}let a=(()=>{class e{constructor(){this.subscriptions=[]}init(e){return e.subscribe(e=>{const t=e.executing_tasks,n=e.finished_tasks,i=[];for(const r of this.subscriptions){const e=this._getTask(r,n),s=this._getTask(r,t);null!==e&&null===s&&r.onTaskFinished(e),null!==s&&i.push(r),this.subscriptions=i}})}subscribe(e,t,n){this.subscriptions.push(new o(e,t,n))}_getTask(e,t){for(const n of t)if(n.name===e.name&&r.a.isEqual(n.metadata,e.metadata))return n;return null}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=s.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},Vclq:function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),i=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],r=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,i){return e?/-MMM-/.test(i)?n[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"domingo_lunes_martes_mi\xe9rcoles_jueves_viernes_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xe9._jue._vie._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[ma\xf1ana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un d\xeda",dd:"%d d\xedas",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un a\xf1o",yy:"%d a\xf1os"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:0,doy:6}})}(n("wd/R"))},Vhfg:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n("lJxs"),r=n("WE5d"),s=n("ej+x"),o=n("8Y7J");let a=(()=>{class e{constructor(e){this.featureToggles=e}canActivate(e){return this.featureToggles.get().pipe(Object(i.a)(t=>{if(!1===t[e.routeConfig.path])throw new r.b;return!0}))}canActivateChild(e){return this.canActivate(e.parent)}}return e.\u0275fac=function(t){return new(t||e)(o.dc(s.a))},e.\u0275prov=o.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},VpIT:function(e,t,n){var i=n("xDBR"),r=n("xs3f");(e.exports=function(e,t){return r[e]||(r[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:i?"pure":"global",copyright:"\xa9 2020 Denis Pushkarev (zloirock.ru)"})},Vu81:function(e,t,n){var i=n("0GbY"),r=n("JBy8"),s=n("dBg+"),o=n("glrk");e.exports=i("Reflect","ownKeys")||function(e){var t=r.f(o(e)),n=s.f;return n?t.concat(n(e)):t}},VxPD:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("yJti"),r=n("e2NH");class s extends r.a{constructor(e=i.a.ValueOk,t=""){switch(super(),e){case i.a.ValueOk:this.type="light",this.msg="";break;case i.a.ValueNone:this.type="info",this.msg=(t?"Retrieving data for " + t + ".":"Retrieving data.")+" "+"Please wait...";break;case i.a.ValueStale:this.type="warning",this.msg=t?"Displaying previously cached data for " + t + ".":"Displaying previously cached data.";break;case i.a.ValueException:this.type="danger",this.msg=(t?"Could not load data for " + t + ".":"Could not load data.")+" "+"Please check the cluster health."}}}},WE5d:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return o}));var i=n("oxzT");class r extends Error{}class s extends r{constructor(){super(...arguments),this.header="Page Not Found",this.message="Sorry, we couldn\u2019t find what you were looking for.\n The page you requested may have been changed or moved.",this.icon=i.a.warning}}class o extends r{constructor(){super(...arguments),this.header="User Denied",this.message="Sorry, the user does not exist in Ceph.\n You'll be logged out from the Identity Provider when you retry logging in.",this.icon=i.a.warning}}},WF9J:function(e,t,n){"use strict";n.d(t,"a",(function(){return z})),n.d(t,"b",(function(){return $})),n("TeQF"),n("QWBl"),n("4mDm"),n("zKZe"),n("07d7"),n("4l63"),n("PKPk"),n("ENF9"),n("3bBZ");var i=n("hKI/"),r=n.n(i),s=n("9/5/"),o=n.n(s),a=n("uyHG"),c=n.n(a),l=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,i){return e[0]===t&&(n=i,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),i=this.__entries__[n];return i&&i[1]},t.prototype.set=function(t,n){var i=e(this.__entries__,t);~i?this.__entries__[i][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,i=e(n,t);~i&&n.splice(i,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,i=this.__entries__;n<i.length;n++){var r=i[n];e.call(t,r[1],r[0])}},t}()}(),u="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,d="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),h="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(d):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)},f=["top","right","bottom","left","width","height","size","weight"],p="undefined"!=typeof MutationObserver,m=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,i=!1,r=0;function s(){n&&(n=!1,e()),i&&a()}function o(){h(s)}function a(){var e=Date.now();if(n){if(e-r<2)return;i=!0}else n=!0,i=!1,setTimeout(o,20);r=e}return a}(this.refresh.bind(this))}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){u&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),p?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){u&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;f.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),b=function(e,t){for(var n=0,i=Object.keys(t);n<i.length;n++){var r=i[n];Object.defineProperty(e,r,{value:t[r],enumerable:!1,writable:!1,configurable:!0})}return e},g=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||d},_=S(0,0,0,0);function y(e){return parseFloat(e)||0}function v(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+y(e["border-"+n+"-width"])}),0)}var w="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof g(e).SVGGraphicsElement}:function(e){return e instanceof g(e).SVGElement&&"function"==typeof e.getBBox};function S(e,t,n,i){return{x:e,y:t,width:n,height:i}}var M=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=S(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e,t=(e=this.target,u?w(e)?function(e){var t=e.getBBox();return S(0,0,t.width,t.height)}(e):function(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return _;var i=g(e).getComputedStyle(e),r=function(e){for(var t={},n=0,i=["top","right","bottom","left"];n<i.length;n++){var r=i[n];t[r]=y(e["padding-"+r])}return t}(i),s=r.left+r.right,o=r.top+r.bottom,a=y(i.width),c=y(i.height);if("border-box"===i.boxSizing&&(Math.round(a+s)!==t&&(a-=v(i,"left","right")+s),Math.round(c+o)!==n&&(c-=v(i,"top","bottom")+o)),!function(e){return e===g(e).document.documentElement}(e)){var l=Math.round(a+s)-t,u=Math.round(c+o)-n;1!==Math.abs(l)&&(a-=l),1!==Math.abs(u)&&(c-=u)}return S(r.left,r.top,a,c)}(e):_);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),k=function(e,t){var n,i,r,s,o,a,c,l=(i=(n=t).x,r=n.y,s=n.width,o=n.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,c=Object.create(a.prototype),b(c,{x:i,y:r,width:s,height:o,top:r,right:i+s,bottom:o+r,left:i}),c);b(this,{target:e,contentRect:l})},x=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new l,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof g(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new M(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof g(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new k(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),D="undefined"!=typeof WeakMap?new WeakMap:new l,T=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=m.getInstance(),i=new x(t,n,this);D.set(this,i)};["observe","unobserve","disconnect"].forEach((function(e){T.prototype[e]=function(){var t;return(t=D.get(this))[e].apply(t,arguments)}}));var C=void 0!==d.ResizeObserver?d.ResizeObserver:T,O=n("AxL3"),L=n.n(O),R=(n("E9XD"),n("sMBO"),n("rB9j"),n("Rm1S"),n("UxlC"),null),E=null;function A(){if(null===R){if("undefined"==typeof document)return R=0;var e=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),e.appendChild(t);var n=t.getBoundingClientRect().right;e.removeChild(t),R=n}return R}function I(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window}function P(e){return e&&e.ownerDocument?e.ownerDocument:document}L.a&&window.addEventListener("resize",(function(){E!==window.devicePixelRatio&&(E=window.devicePixelRatio,R=null)}));var N=function(){function e(t,n){var i=this;this.onScroll=function(){var e=I(i.el);i.scrollXTicking||(e.requestAnimationFrame(i.scrollX),i.scrollXTicking=!0),i.scrollYTicking||(e.requestAnimationFrame(i.scrollY),i.scrollYTicking=!0)},this.scrollX=function(){i.axis.x.isOverflowing&&(i.showScrollbar("x"),i.positionScrollbar("x")),i.scrollXTicking=!1},this.scrollY=function(){i.axis.y.isOverflowing&&(i.showScrollbar("y"),i.positionScrollbar("y")),i.scrollYTicking=!1},this.onMouseEnter=function(){i.showScrollbar("x"),i.showScrollbar("y")},this.onMouseMove=function(e){i.mouseX=e.clientX,i.mouseY=e.clientY,(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&i.onMouseMoveForAxis("x"),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&i.onMouseMoveForAxis("y")},this.onMouseLeave=function(){i.onMouseMove.cancel(),(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&i.onMouseLeaveForAxis("x"),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&i.onMouseLeaveForAxis("y"),i.mouseX=-1,i.mouseY=-1},this.onWindowResize=function(){i.scrollbarWidth=i.getScrollbarWidth(),i.hideNativeScrollbar()},this.hideScrollbars=function(){i.axis.x.track.rect=i.axis.x.track.el.getBoundingClientRect(),i.axis.y.track.rect=i.axis.y.track.el.getBoundingClientRect(),i.isWithinBounds(i.axis.y.track.rect)||(i.axis.y.scrollbar.el.classList.remove(i.classNames.visible),i.axis.y.isVisible=!1),i.isWithinBounds(i.axis.x.track.rect)||(i.axis.x.scrollbar.el.classList.remove(i.classNames.visible),i.axis.x.isVisible=!1)},this.onPointerEvent=function(e){var t,n;i.axis.x.track.rect=i.axis.x.track.el.getBoundingClientRect(),i.axis.y.track.rect=i.axis.y.track.el.getBoundingClientRect(),(i.axis.x.isOverflowing||i.axis.x.forceVisible)&&(t=i.isWithinBounds(i.axis.x.track.rect)),(i.axis.y.isOverflowing||i.axis.y.forceVisible)&&(n=i.isWithinBounds(i.axis.y.track.rect)),(t||n)&&(e.preventDefault(),e.stopPropagation(),"mousedown"===e.type&&(t&&(i.axis.x.scrollbar.rect=i.axis.x.scrollbar.el.getBoundingClientRect(),i.isWithinBounds(i.axis.x.scrollbar.rect)?i.onDragStart(e,"x"):i.onTrackClick(e,"x")),n&&(i.axis.y.scrollbar.rect=i.axis.y.scrollbar.el.getBoundingClientRect(),i.isWithinBounds(i.axis.y.scrollbar.rect)?i.onDragStart(e,"y"):i.onTrackClick(e,"y"))))},this.drag=function(t){var n=i.axis[i.draggedAxis].track,r=n.rect[i.axis[i.draggedAxis].sizeAttr],s=i.axis[i.draggedAxis].scrollbar,o=i.contentWrapperEl[i.axis[i.draggedAxis].scrollSizeAttr],a=parseInt(i.elStyles[i.axis[i.draggedAxis].sizeAttr],10);t.preventDefault(),t.stopPropagation();var c=(("y"===i.draggedAxis?t.pageY:t.pageX)-n.rect[i.axis[i.draggedAxis].offsetAttr]-i.axis[i.draggedAxis].dragOffset)/(r-s.size)*(o-a);"x"===i.draggedAxis&&(c=i.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?c-(r+s.size):c,c=i.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-c:c),i.contentWrapperEl[i.axis[i.draggedAxis].scrollOffsetAttr]=c},this.onEndDrag=function(e){var t=P(i.el),n=I(i.el);e.preventDefault(),e.stopPropagation(),i.el.classList.remove(i.classNames.dragging),t.removeEventListener("mousemove",i.drag,!0),t.removeEventListener("mouseup",i.onEndDrag,!0),i.removePreventClickId=n.setTimeout((function(){t.removeEventListener("click",i.preventClick,!0),t.removeEventListener("dblclick",i.preventClick,!0),i.removePreventClickId=null}))},this.preventClick=function(e){e.preventDefault(),e.stopPropagation()},this.el=t,this.minScrollbarWidth=20,this.options=Object.assign({},e.defaultOptions,{},n),this.classNames=Object.assign({},e.defaultOptions.classNames,{},this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,e.instances.has(this.el)||(this.recalculate=r()(this.recalculate.bind(this),64),this.onMouseMove=r()(this.onMouseMove.bind(this),64),this.hideScrollbars=o()(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=o()(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=c()(e.getRtlHelpers),this.init())}e.getRtlHelpers=function(){var t=document.createElement("div");t.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var n=t.firstElementChild;document.body.appendChild(n);var i=n.firstElementChild;n.scrollLeft=0;var r=e.getOffset(n),s=e.getOffset(i);n.scrollLeft=999;var o=e.getOffset(i);return{isRtlScrollingInverted:r.left!==s.left&&s.left-o.left!=0,isRtlScrollbarInverted:r.left!==s.left}},e.getOffset=function(e){var t=e.getBoundingClientRect(),n=P(e),i=I(e);return{top:t.top+(i.pageYOffset||n.documentElement.scrollTop),left:t.left+(i.pageXOffset||n.documentElement.scrollLeft)}};var t=e.prototype;return t.init=function(){e.instances.set(this.el,this),L.a&&(this.initDOM(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},t.initDOM=function(){var e=this;if(Array.prototype.filter.call(this.el.children,(function(t){return t.classList.contains(e.classNames.wrapper)})).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var t=document.createElement("div"),n=document.createElement("div");t.classList.add(this.classNames.track),n.classList.add(this.classNames.scrollbar),t.appendChild(n),this.axis.x.track.el=t.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=t.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},t.initListeners=function(){var e=this,t=I(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(t){e.el.addEventListener(t,e.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(t){e.el.addEventListener(t,e.onPointerEvent,{capture:!0,passive:!0})})),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),t.addEventListener("resize",this.onWindowResize);var n=!1;this.resizeObserver=new(t.ResizeObserver||C)((function(){n&&e.recalculate()})),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),t.requestAnimationFrame((function(){n=!0})),this.mutationObserver=new t.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},t.recalculate=function(){var e=I(this.el);this.elStyles=e.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction;var t=this.heightAutoObserverEl.offsetHeight<=1,n=this.heightAutoObserverEl.offsetWidth<=1,i=this.contentEl.offsetWidth,r=this.contentWrapperEl.offsetWidth,s=this.elStyles.overflowX,o=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var a=this.contentEl.scrollHeight,c=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=t?"auto":"100%",this.placeholderEl.style.width=n?i+"px":"auto",this.placeholderEl.style.height=a+"px";var l=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=c>i,this.axis.y.isOverflowing=a>l,this.axis.x.isOverflowing="hidden"!==s&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==o&&this.axis.y.isOverflowing,this.axis.x.forceVisible="x"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.y.forceVisible="y"===this.options.forceVisible||!0===this.options.forceVisible,this.hideNativeScrollbar();var u=this.axis.x.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&c>r-(this.axis.y.isOverflowing?this.scrollbarWidth:0),this.axis.y.isOverflowing=this.axis.y.isOverflowing&&a>l-u,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},t.getScrollbarSize=function(e){if(void 0===e&&(e="y"),!this.axis[e].isOverflowing)return 0;var t,n=this.axis[e].track.el[this.axis[e].offsetSizeAttr];return t=Math.max(~~(n/this.contentEl[this.axis[e].scrollSizeAttr]*n),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(t=Math.min(t,this.options.scrollbarMaxSize)),t},t.positionScrollbar=function(t){if(void 0===t&&(t="y"),this.axis[t].isOverflowing){var n=this.contentWrapperEl[this.axis[t].scrollSizeAttr],i=this.axis[t].track.el[this.axis[t].offsetSizeAttr],r=parseInt(this.elStyles[this.axis[t].sizeAttr],10),s=this.axis[t].scrollbar,o=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],a=~~((o="x"===t&&this.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-o:o)/(n-r)*(i-s.size));a="x"===t&&this.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?a+(i-s.size):a,s.el.style.transform="x"===t?"translate3d("+a+"px, 0, 0)":"translate3d(0, "+a+"px, 0)"}},t.toggleTrackVisibility=function(e){void 0===e&&(e="y");var t=this.axis[e].track.el,n=this.axis[e].scrollbar.el;this.axis[e].isOverflowing||this.axis[e].forceVisible?(t.style.visibility="visible",this.contentWrapperEl.style[this.axis[e].overflowAttr]="scroll"):(t.style.visibility="hidden",this.contentWrapperEl.style[this.axis[e].overflowAttr]="hidden"),n.style.display=this.axis[e].isOverflowing?"block":"none"},t.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},t.onMouseMoveForAxis=function(e){void 0===e&&(e="y"),this.axis[e].track.rect=this.axis[e].track.el.getBoundingClientRect(),this.axis[e].scrollbar.rect=this.axis[e].scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis[e].scrollbar.rect)?this.axis[e].scrollbar.el.classList.add(this.classNames.hover):this.axis[e].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[e].track.rect)?(this.showScrollbar(e),this.axis[e].track.el.classList.add(this.classNames.hover)):this.axis[e].track.el.classList.remove(this.classNames.hover)},t.onMouseLeaveForAxis=function(e){void 0===e&&(e="y"),this.axis[e].track.el.classList.remove(this.classNames.hover),this.axis[e].scrollbar.el.classList.remove(this.classNames.hover)},t.showScrollbar=function(e){void 0===e&&(e="y"),this.axis[e].isVisible||(this.axis[e].scrollbar.el.classList.add(this.classNames.visible),this.axis[e].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},t.onDragStart=function(e,t){void 0===t&&(t="y");var n=P(this.el),i=I(this.el);this.axis[t].dragOffset=("y"===t?e.pageY:e.pageX)-this.axis[t].scrollbar.rect[this.axis[t].offsetAttr],this.draggedAxis=t,this.el.classList.add(this.classNames.dragging),n.addEventListener("mousemove",this.drag,!0),n.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(n.addEventListener("click",this.preventClick,!0),n.addEventListener("dblclick",this.preventClick,!0)):(i.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},t.onTrackClick=function(e,t){var n=this;if(void 0===t&&(t="y"),this.options.clickOnTrack){var i=I(this.el);this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect();var r=this.axis[t].scrollbar.rect[this.axis[t].offsetAttr],s=parseInt(this.elStyles[this.axis[t].sizeAttr],10),o=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],a=("y"===t?this.mouseY-r:this.mouseX-r)<0?-1:1,c=-1===a?o-s:o+s;!function e(){var r,s;-1===a?o>c&&(n.contentWrapperEl.scrollTo(((r={})[n.axis[t].offsetAttr]=o-=n.options.clickOnTrackSpeed,r)),i.requestAnimationFrame(e)):o<c&&(n.contentWrapperEl.scrollTo(((s={})[n.axis[t].offsetAttr]=o+=n.options.clickOnTrackSpeed,s)),i.requestAnimationFrame(e))}()}},t.getContentElement=function(){return this.contentEl},t.getScrollElement=function(){return this.contentWrapperEl},t.getScrollbarWidth=function(){try{return"none"===getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:A()}catch(e){return A()}},t.removeListeners=function(){var e=this,t=I(this.el);this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(t){e.el.removeEventListener(t,e.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(t){e.el.removeEventListener(t,e.onPointerEvent,{capture:!0,passive:!0})})),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()},t.unMount=function(){this.removeListeners(),e.instances.delete(this.el)},t.isWithinBounds=function(e){return this.mouseX>=e.left&&this.mouseX<=e.left+e.width&&this.mouseY>=e.top&&this.mouseY<=e.top+e.height},t.findChild=function(e,t){var n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;return Array.prototype.filter.call(e.children,(function(e){return n.call(e,t)}))[0]},e}();N.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,clickOnTrackSpeed:40,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3},N.instances=new WeakMap;var j=N,F=n("8Y7J");const Y=["*"];let z=(()=>{class e{constructor(e){this.elRef=e}ngOnInit(){}ngAfterViewInit(){this.SimpleBar=new j(this.elRef.nativeElement,this.options||{})}ngOnDestroy(){this.SimpleBar.unMount(),this.SimpleBar=null}}return e.\u0275fac=function(t){return new(t||e)(F.Mb(F.m))},e.\u0275cmp=F.Gb({type:e,selectors:[["ngx-simplebar"]],hostAttrs:["data-simplebar","init"],inputs:{options:"options"},ngContentSelectors:Y,decls:13,vars:0,consts:[[1,"simplebar-wrapper"],[1,"simplebar-height-auto-observer-wrapper"],[1,"simplebar-height-auto-observer"],[1,"simplebar-mask"],[1,"simplebar-offset"],[1,"simplebar-content-wrapper"],[1,"simplebar-content"],[1,"simplebar-placeholder"],[1,"simplebar-track","simplebar-horizontal"],[1,"simplebar-scrollbar"],[1,"simplebar-track","simplebar-vertical"]],template:function(e,t){1&e&&(F.oc(),F.Sb(0,"div",0),F.Sb(1,"div",1),F.Nb(2,"div",2),F.Rb(),F.Sb(3,"div",3),F.Sb(4,"div",4),F.Sb(5,"div",5),F.Sb(6,"div",6),F.nc(7),F.Rb(),F.Rb(),F.Rb(),F.Rb(),F.Nb(8,"div",7),F.Rb(),F.Sb(9,"div",8),F.Nb(10,"div",9),F.Rb(),F.Sb(11,"div",10),F.Nb(12,"div",9),F.Rb())},styles:["[data-simplebar]{position:relative;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;flex-wrap:wrap;-webkit-box-pack:start;justify-content:flex-start;align-content:flex-start;-webkit-box-align:start;align-items:flex-start}.simplebar-wrapper{overflow:hidden;width:inherit;height:inherit;max-width:inherit;max-height:inherit}.simplebar-mask{direction:inherit;position:absolute;overflow:hidden;padding:0;margin:0;left:0;top:0;bottom:0;right:0;width:auto!important;height:auto!important;z-index:0}.simplebar-offset{direction:inherit!important;box-sizing:inherit!important;resize:none!important;position:absolute;top:0;left:0;bottom:0;right:0;padding:0;margin:0;-webkit-overflow-scrolling:touch}.simplebar-content-wrapper{direction:inherit;box-sizing:border-box!important;position:relative;display:block;height:100%;width:auto;max-width:100%;max-height:100%;scrollbar-width:none;-ms-overflow-style:none}.simplebar-content-wrapper::-webkit-scrollbar,.simplebar-hide-scrollbar::-webkit-scrollbar{width:0;height:0}.simplebar-content:after,.simplebar-content:before{content:' ';display:table}.simplebar-placeholder{max-height:100%;max-width:100%;width:100%;pointer-events:none}.simplebar-height-auto-observer-wrapper{box-sizing:inherit!important;height:100%;width:100%;max-width:1px;position:relative;float:left;max-height:1px;overflow:hidden;z-index:-1;padding:0;margin:0;pointer-events:none;-webkit-box-flex:inherit;flex-grow:inherit;flex-shrink:0;flex-basis:0}.simplebar-height-auto-observer{box-sizing:inherit;display:block;opacity:0;position:absolute;top:0;left:0;height:1000%;width:1000%;min-height:1px;min-width:1px;overflow:hidden;pointer-events:none;z-index:-1}.simplebar-track{z-index:1;position:absolute;right:0;bottom:0;pointer-events:none;overflow:hidden}[data-simplebar].simplebar-dragging .simplebar-content{pointer-events:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-user-select:none}[data-simplebar].simplebar-dragging .simplebar-track{pointer-events:all}.simplebar-scrollbar{position:absolute;left:0;right:0;min-height:10px}.simplebar-scrollbar:before{position:absolute;content:'';background:#000;border-radius:7px;left:2px;right:2px;opacity:0;-webkit-transition:opacity .2s linear;transition:opacity .2s linear}.simplebar-scrollbar.simplebar-visible:before{opacity:.5;-webkit-transition:opacity linear;transition:opacity linear}.simplebar-track.simplebar-vertical{top:0;width:11px}.simplebar-track.simplebar-vertical .simplebar-scrollbar:before{top:2px;bottom:2px}.simplebar-track.simplebar-horizontal{left:0;height:11px}.simplebar-track.simplebar-horizontal .simplebar-scrollbar:before{height:100%;left:2px;right:2px}.simplebar-track.simplebar-horizontal .simplebar-scrollbar{right:auto;left:0;top:2px;height:7px;min-height:0;min-width:10px;width:auto}[data-simplebar-direction=rtl] .simplebar-track.simplebar-vertical{right:auto;left:0}.hs-dummy-scrollbar-size{direction:rtl;position:fixed;opacity:0;visibility:hidden;height:500px;width:500px;overflow-y:hidden;overflow-x:scroll}.simplebar-hide-scrollbar{position:fixed;left:0;visibility:hidden;overflow-y:scroll;scrollbar-width:none;-ms-overflow-style:none}","ngx-simplebar{display:block}"],encapsulation:2}),e})(),$=(()=>{class e{}return e.\u0275mod=F.Kb({type:e}),e.\u0275inj=F.Jb({factory:function(t){return new(t||e)},imports:[[]]}),e})()},WJkJ:function(e,t){e.exports="\t\n\v\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"},WKiH:function(e,t,n){var i=n("HYAF"),r="["+n("WJkJ")+"]",s=RegExp("^"+r+r+"*"),o=RegExp(r+r+"*$"),a=function(e){return function(t){var n=String(i(t));return 1&e&&(n=n.replace(s,"")),2&e&&(n=n.replace(o,"")),n}};e.exports={start:a(1),end:a(2),trim:a(3)}},WMd4:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("EY2u"),r=n("LRne"),s=n("z6cu");let o=(()=>{class e{constructor(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue="N"===e}observe(e){switch(this.kind){case"N":return e.next&&e.next(this.value);case"E":return e.error&&e.error(this.error);case"C":return e.complete&&e.complete()}}do(e,t,n){switch(this.kind){case"N":return e&&e(this.value);case"E":return t&&t(this.error);case"C":return n&&n()}}accept(e,t,n){return e&&"function"==typeof e.next?this.observe(e):this.do(e,t,n)}toObservable(){switch(this.kind){case"N":return Object(r.a)(this.value);case"E":return Object(s.a)(this.error);case"C":return Object(i.b)()}throw new Error("unexpected notification kind value")}static createNext(t){return void 0!==t?new e("N",t):e.undefinedValueNotification}static createError(t){return new e("E",void 0,t)}static createComplete(){return e.completeNotification}}return e.completeNotification=new e("C"),e.undefinedValueNotification=new e("N",void 0),e})()},WOAq:function(e,t,n){"use strict";(function(e){var i=n("Ju5/"),r=n("L3Qv"),s="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=s&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===s?i.a.Buffer:void 0;t.a=(a?a.isBuffer:void 0)||r.a}).call(this,n("3UD+")(e))},WYrj:function(e,t,n){!function(e){"use strict";var t=["\u0796\u07ac\u0782\u07aa\u0787\u07a6\u0783\u07a9","\u078a\u07ac\u0784\u07b0\u0783\u07aa\u0787\u07a6\u0783\u07a9","\u0789\u07a7\u0783\u07a8\u0797\u07aa","\u0787\u07ad\u0795\u07b0\u0783\u07a9\u078d\u07aa","\u0789\u07ad","\u0796\u07ab\u0782\u07b0","\u0796\u07aa\u078d\u07a6\u0787\u07a8","\u0787\u07af\u078e\u07a6\u0790\u07b0\u0793\u07aa","\u0790\u07ac\u0795\u07b0\u0793\u07ac\u0789\u07b0\u0784\u07a6\u0783\u07aa","\u0787\u07ae\u0786\u07b0\u0793\u07af\u0784\u07a6\u0783\u07aa","\u0782\u07ae\u0788\u07ac\u0789\u07b0\u0784\u07a6\u0783\u07aa","\u0791\u07a8\u0790\u07ac\u0789\u07b0\u0784\u07a6\u0783\u07aa"],n=["\u0787\u07a7\u078b\u07a8\u0787\u07b0\u078c\u07a6","\u0780\u07af\u0789\u07a6","\u0787\u07a6\u0782\u07b0\u078e\u07a7\u0783\u07a6","\u0784\u07aa\u078b\u07a6","\u0784\u07aa\u0783\u07a7\u0790\u07b0\u078a\u07a6\u078c\u07a8","\u0780\u07aa\u0786\u07aa\u0783\u07aa","\u0780\u07ae\u0782\u07a8\u0780\u07a8\u0783\u07aa"];e.defineLocale("dv",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:"\u0787\u07a7\u078b\u07a8_\u0780\u07af\u0789\u07a6_\u0787\u07a6\u0782\u07b0_\u0784\u07aa\u078b\u07a6_\u0784\u07aa\u0783\u07a7_\u0780\u07aa\u0786\u07aa_\u0780\u07ae\u0782\u07a8".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0789\u0786|\u0789\u078a/,isPM:function(e){return"\u0789\u078a"===e},meridiem:function(e,t,n){return e<12?"\u0789\u0786":"\u0789\u078a"},calendar:{sameDay:"[\u0789\u07a8\u0787\u07a6\u078b\u07aa] LT",nextDay:"[\u0789\u07a7\u078b\u07a6\u0789\u07a7] LT",nextWeek:"dddd LT",lastDay:"[\u0787\u07a8\u0787\u07b0\u0794\u07ac] LT",lastWeek:"[\u078a\u07a7\u0787\u07a8\u078c\u07aa\u0788\u07a8] dddd LT",sameElse:"L"},relativeTime:{future:"\u078c\u07ac\u0783\u07ad\u078e\u07a6\u0787\u07a8 %s",past:"\u0786\u07aa\u0783\u07a8\u0782\u07b0 %s",s:"\u0790\u07a8\u0786\u07aa\u0782\u07b0\u078c\u07aa\u0786\u07ae\u0785\u07ac\u0787\u07b0",ss:"d% \u0790\u07a8\u0786\u07aa\u0782\u07b0\u078c\u07aa",m:"\u0789\u07a8\u0782\u07a8\u0793\u07ac\u0787\u07b0",mm:"\u0789\u07a8\u0782\u07a8\u0793\u07aa %d",h:"\u078e\u07a6\u0791\u07a8\u0787\u07a8\u0783\u07ac\u0787\u07b0",hh:"\u078e\u07a6\u0791\u07a8\u0787\u07a8\u0783\u07aa %d",d:"\u078b\u07aa\u0788\u07a6\u0780\u07ac\u0787\u07b0",dd:"\u078b\u07aa\u0788\u07a6\u0790\u07b0 %d",M:"\u0789\u07a6\u0780\u07ac\u0787\u07b0",MM:"\u0789\u07a6\u0790\u07b0 %d",y:"\u0787\u07a6\u0780\u07a6\u0783\u07ac\u0787\u07b0",yy:"\u0787\u07a6\u0780\u07a6\u0783\u07aa %d"},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"\u060c")},week:{dow:7,doy:12}})}(n("wd/R"))},Wv91:function(e,t,n){!function(e){"use strict";var t={1:"'inji",5:"'inji",8:"'inji",70:"'inji",80:"'inji",2:"'nji",7:"'nji",20:"'nji",50:"'nji",3:"'\xfcnji",4:"'\xfcnji",100:"'\xfcnji",6:"'njy",9:"'unjy",10:"'unjy",30:"'unjy",60:"'ynjy",90:"'ynjy"};e.defineLocale("tk",{months:"\xddanwar_Fewral_Mart_Aprel_Ma\xfd_I\xfdun_I\xfdul_Awgust_Sent\xfdabr_Okt\xfdabr_No\xfdabr_Dekabr".split("_"),monthsShort:"\xddan_Few_Mar_Apr_Ma\xfd_I\xfdn_I\xfdl_Awg_Sen_Okt_No\xfd_Dek".split("_"),weekdays:"\xddek\u015fenbe_Du\u015fenbe_Si\u015fenbe_\xc7ar\u015fenbe_Pen\u015fenbe_Anna_\u015eenbe".split("_"),weekdaysShort:"\xddek_Du\u015f_Si\u015f_\xc7ar_Pen_Ann_\u015een".split("_"),weekdaysMin:"\xddk_D\u015f_S\u015f_\xc7r_Pn_An_\u015en".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bug\xfcn sagat] LT",nextDay:"[ertir sagat] LT",nextWeek:"[indiki] dddd [sagat] LT",lastDay:"[d\xfc\xfdn] LT",lastWeek:"[ge\xe7en] dddd [sagat] LT",sameElse:"L"},relativeTime:{future:"%s so\u0148",past:"%s \xf6\u0148",s:"birn\xe4\xe7e sekunt",m:"bir minut",mm:"%d minut",h:"bir sagat",hh:"%d sagat",d:"bir g\xfcn",dd:"%d g\xfcn",M:"bir a\xfd",MM:"%d a\xfd",y:"bir \xfdyl",yy:"%d \xfdyl"},ordinal:function(e,n){switch(n){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'unjy";var i=e%10;return e+(t[i]||t[e%100-i]||t[e>=100?100:null])}},week:{dow:1,doy:7}})}(n("wd/R"))},WxRl:function(e,t,n){!function(e){"use strict";var t="vas\xe1rnap h\xe9tf\u0151n kedden szerd\xe1n cs\xfct\xf6rt\xf6k\xf6n p\xe9nteken szombaton".split(" ");function n(e,t,n,i){var r=e;switch(n){case"s":return i||t?"n\xe9h\xe1ny m\xe1sodperc":"n\xe9h\xe1ny m\xe1sodperce";case"ss":return r+(i||t)?" m\xe1sodperc":" m\xe1sodperce";case"m":return"egy"+(i||t?" perc":" perce");case"mm":return r+(i||t?" perc":" perce");case"h":return"egy"+(i||t?" \xf3ra":" \xf3r\xe1ja");case"hh":return r+(i||t?" \xf3ra":" \xf3r\xe1ja");case"d":return"egy"+(i||t?" nap":" napja");case"dd":return r+(i||t?" nap":" napja");case"M":return"egy"+(i||t?" h\xf3nap":" h\xf3napja");case"MM":return r+(i||t?" h\xf3nap":" h\xf3napja");case"y":return"egy"+(i||t?" \xe9v":" \xe9ve");case"yy":return r+(i||t?" \xe9v":" \xe9ve")}return""}function i(e){return(e?"":"[m\xfalt] ")+"["+t[this.day()]+"] LT[-kor]"}e.defineLocale("hu",{months:"janu\xe1r_febru\xe1r_m\xe1rcius_\xe1prilis_m\xe1jus_j\xfanius_j\xfalius_augusztus_szeptember_okt\xf3ber_november_december".split("_"),monthsShort:"jan._feb._m\xe1rc._\xe1pr._m\xe1j._j\xfan._j\xfal._aug._szept._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"vas\xe1rnap_h\xe9tf\u0151_kedd_szerda_cs\xfct\xf6rt\xf6k_p\xe9ntek_szombat".split("_"),weekdaysShort:"vas_h\xe9t_kedd_sze_cs\xfct_p\xe9n_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,t,n){return e<12?!0===n?"de":"DE":!0===n?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return i.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return i.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s m\xfalva",past:"%s",s:n,ss:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},X709:function(e,t,n){!function(e){"use strict";e.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"s\xf6ndag_m\xe5ndag_tisdag_onsdag_torsdag_fredag_l\xf6rdag".split("_"),weekdaysShort:"s\xf6n_m\xe5n_tis_ons_tor_fre_l\xf6r".split("_"),weekdaysMin:"s\xf6_m\xe5_ti_on_to_fr_l\xf6".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Ig\xe5r] LT",nextWeek:"[P\xe5] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"f\xf6r %s sedan",s:"n\xe5gra sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en m\xe5nad",MM:"%d m\xe5nader",y:"ett \xe5r",yy:"%d \xe5r"},dayOfMonthOrdinalParse:/\d{1,2}(\:e|\:a)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?":e":1===t||2===t?":a":":e")},week:{dow:1,doy:4}})}(n("wd/R"))},XDbj:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("sVev"),r=n("7o/Q");function s(e=c){return t=>t.lift(new o(e))}class o{constructor(e){this.errorFactory=e}call(e,t){return t.subscribe(new a(e,this.errorFactory))}}class a extends r.a{constructor(e,t){super(e),this.errorFactory=t,this.hasValue=!1}_next(e){this.hasValue=!0,this.destination.next(e)}_complete(){if(this.hasValue)return this.destination.complete();{let t;try{t=this.errorFactory()}catch(e){t=e}this.destination.error(t)}}}function c(){return new i.a}},XDpg:function(e,t,n){!function(e){"use strict";e.defineLocale("zh-cn",{months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u5468\u65e5_\u5468\u4e00_\u5468\u4e8c_\u5468\u4e09_\u5468\u56db_\u5468\u4e94_\u5468\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5Ah\u70b9mm\u5206",LLLL:"YYYY\u5e74M\u6708D\u65e5ddddAh\u70b9mm\u5206",l:"YYYY/M/D",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u51cc\u6668"===t||"\u65e9\u4e0a"===t||"\u4e0a\u5348"===t?e:"\u4e0b\u5348"===t||"\u665a\u4e0a"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var i=100*e+t;return i<600?"\u51cc\u6668":i<900?"\u65e9\u4e0a":i<1130?"\u4e0a\u5348":i<1230?"\u4e2d\u5348":i<1800?"\u4e0b\u5348":"\u665a\u4e0a"},calendar:{sameDay:"[\u4eca\u5929]LT",nextDay:"[\u660e\u5929]LT",nextWeek:function(e){return e.week()!==this.week()?"[\u4e0b]dddLT":"[\u672c]dddLT"},lastDay:"[\u6628\u5929]LT",lastWeek:function(e){return this.week()!==e.week()?"[\u4e0a]dddLT":"[\u672c]dddLT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u5468)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"\u65e5";case"M":return e+"\u6708";case"w":case"W":return e+"\u5468";default:return e}},relativeTime:{future:"%s\u540e",past:"%s\u524d",s:"\u51e0\u79d2",ss:"%d \u79d2",m:"1 \u5206\u949f",mm:"%d \u5206\u949f",h:"1 \u5c0f\u65f6",hh:"%d \u5c0f\u65f6",d:"1 \u5929",dd:"%d \u5929",w:"1 \u5468",ww:"%d \u5468",M:"1 \u4e2a\u6708",MM:"%d \u4e2a\u6708",y:"1 \u5e74",yy:"%d \u5e74"},week:{dow:1,doy:4}})}(n("wd/R"))},XFyV:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i=n("oxzT"),r=n("8Y7J"),s=n("G0yt"),o=n("SVse");const a=function(e,t){return[e,t]},c=["*"];let l=(()=>{class e{constructor(){this.icons=i.a}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=r.Gb({type:e,selectors:[["cd-loading-panel"]],ngContentSelectors:c,decls:4,vars:5,consts:[["type","info",3,"dismissible"],["aria-hidden","true",1,"mr-2",3,"ngClass"]],template:function(e,t){1&e&&(r.oc(),r.Sb(0,"ngb-alert",0),r.Sb(1,"strong"),r.Nb(2,"i",1),r.Rb(),r.nc(3),r.Rb()),2&e&&(r.pc("dismissible",!1),r.yb(2),r.pc("ngClass",r.vc(2,a,t.icons.spinner,t.icons.spin)))},directives:[s.b,o.p],styles:[""]}),e})()},XGwC:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},XLvN:function(e,t,n){!function(e){"use strict";e.defineLocale("te",{months:"\u0c1c\u0c28\u0c35\u0c30\u0c3f_\u0c2b\u0c3f\u0c2c\u0c4d\u0c30\u0c35\u0c30\u0c3f_\u0c2e\u0c3e\u0c30\u0c4d\u0c1a\u0c3f_\u0c0f\u0c2a\u0c4d\u0c30\u0c3f\u0c32\u0c4d_\u0c2e\u0c47_\u0c1c\u0c42\u0c28\u0c4d_\u0c1c\u0c41\u0c32\u0c48_\u0c06\u0c17\u0c38\u0c4d\u0c1f\u0c41_\u0c38\u0c46\u0c2a\u0c4d\u0c1f\u0c46\u0c02\u0c2c\u0c30\u0c4d_\u0c05\u0c15\u0c4d\u0c1f\u0c4b\u0c2c\u0c30\u0c4d_\u0c28\u0c35\u0c02\u0c2c\u0c30\u0c4d_\u0c21\u0c3f\u0c38\u0c46\u0c02\u0c2c\u0c30\u0c4d".split("_"),monthsShort:"\u0c1c\u0c28._\u0c2b\u0c3f\u0c2c\u0c4d\u0c30._\u0c2e\u0c3e\u0c30\u0c4d\u0c1a\u0c3f_\u0c0f\u0c2a\u0c4d\u0c30\u0c3f._\u0c2e\u0c47_\u0c1c\u0c42\u0c28\u0c4d_\u0c1c\u0c41\u0c32\u0c48_\u0c06\u0c17._\u0c38\u0c46\u0c2a\u0c4d._\u0c05\u0c15\u0c4d\u0c1f\u0c4b._\u0c28\u0c35._\u0c21\u0c3f\u0c38\u0c46.".split("_"),monthsParseExact:!0,weekdays:"\u0c06\u0c26\u0c3f\u0c35\u0c3e\u0c30\u0c02_\u0c38\u0c4b\u0c2e\u0c35\u0c3e\u0c30\u0c02_\u0c2e\u0c02\u0c17\u0c33\u0c35\u0c3e\u0c30\u0c02_\u0c2c\u0c41\u0c27\u0c35\u0c3e\u0c30\u0c02_\u0c17\u0c41\u0c30\u0c41\u0c35\u0c3e\u0c30\u0c02_\u0c36\u0c41\u0c15\u0c4d\u0c30\u0c35\u0c3e\u0c30\u0c02_\u0c36\u0c28\u0c3f\u0c35\u0c3e\u0c30\u0c02".split("_"),weekdaysShort:"\u0c06\u0c26\u0c3f_\u0c38\u0c4b\u0c2e_\u0c2e\u0c02\u0c17\u0c33_\u0c2c\u0c41\u0c27_\u0c17\u0c41\u0c30\u0c41_\u0c36\u0c41\u0c15\u0c4d\u0c30_\u0c36\u0c28\u0c3f".split("_"),weekdaysMin:"\u0c06_\u0c38\u0c4b_\u0c2e\u0c02_\u0c2c\u0c41_\u0c17\u0c41_\u0c36\u0c41_\u0c36".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[\u0c28\u0c47\u0c21\u0c41] LT",nextDay:"[\u0c30\u0c47\u0c2a\u0c41] LT",nextWeek:"dddd, LT",lastDay:"[\u0c28\u0c3f\u0c28\u0c4d\u0c28] LT",lastWeek:"[\u0c17\u0c24] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0c32\u0c4b",past:"%s \u0c15\u0c4d\u0c30\u0c3f\u0c24\u0c02",s:"\u0c15\u0c4a\u0c28\u0c4d\u0c28\u0c3f \u0c15\u0c4d\u0c37\u0c23\u0c3e\u0c32\u0c41",ss:"%d \u0c38\u0c46\u0c15\u0c28\u0c4d\u0c32\u0c41",m:"\u0c12\u0c15 \u0c28\u0c3f\u0c2e\u0c3f\u0c37\u0c02",mm:"%d \u0c28\u0c3f\u0c2e\u0c3f\u0c37\u0c3e\u0c32\u0c41",h:"\u0c12\u0c15 \u0c17\u0c02\u0c1f",hh:"%d \u0c17\u0c02\u0c1f\u0c32\u0c41",d:"\u0c12\u0c15 \u0c30\u0c4b\u0c1c\u0c41",dd:"%d \u0c30\u0c4b\u0c1c\u0c41\u0c32\u0c41",M:"\u0c12\u0c15 \u0c28\u0c46\u0c32",MM:"%d \u0c28\u0c46\u0c32\u0c32\u0c41",y:"\u0c12\u0c15 \u0c38\u0c02\u0c35\u0c24\u0c4d\u0c38\u0c30\u0c02",yy:"%d \u0c38\u0c02\u0c35\u0c24\u0c4d\u0c38\u0c30\u0c3e\u0c32\u0c41"},dayOfMonthOrdinalParse:/\d{1,2}\u0c35/,ordinal:"%d\u0c35",meridiemParse:/\u0c30\u0c3e\u0c24\u0c4d\u0c30\u0c3f|\u0c09\u0c26\u0c2f\u0c02|\u0c2e\u0c27\u0c4d\u0c2f\u0c3e\u0c39\u0c4d\u0c28\u0c02|\u0c38\u0c3e\u0c2f\u0c02\u0c24\u0c4d\u0c30\u0c02/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u0c30\u0c3e\u0c24\u0c4d\u0c30\u0c3f"===t?e<4?e:e+12:"\u0c09\u0c26\u0c2f\u0c02"===t?e:"\u0c2e\u0c27\u0c4d\u0c2f\u0c3e\u0c39\u0c4d\u0c28\u0c02"===t?e>=10?e:e+12:"\u0c38\u0c3e\u0c2f\u0c02\u0c24\u0c4d\u0c30\u0c02"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"\u0c30\u0c3e\u0c24\u0c4d\u0c30\u0c3f":e<10?"\u0c09\u0c26\u0c2f\u0c02":e<17?"\u0c2e\u0c27\u0c4d\u0c2f\u0c3e\u0c39\u0c4d\u0c28\u0c02":e<20?"\u0c38\u0c3e\u0c2f\u0c02\u0c24\u0c4d\u0c30\u0c02":"\u0c30\u0c3e\u0c24\u0c4d\u0c30\u0c3f"},week:{dow:0,doy:6}})}(n("wd/R"))},XNiG:function(e,t,n){"use strict";n.d(t,"b",(function(){return l})),n.d(t,"a",(function(){return u}));var i=n("HDdC"),r=n("7o/Q"),s=n("quSY"),o=n("9ppp"),a=n("Ylt2"),c=n("2QA8");class l extends r.a{constructor(e){super(e),this.destination=e}}let u=(()=>{class e extends i.a{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[c.a](){return new l(this)}lift(e){const t=new d(this,this);return t.operator=e,t}next(e){if(this.closed)throw new o.a;if(!this.isStopped){const{observers:t}=this,n=t.length,i=t.slice();for(let r=0;r<n;r++)i[r].next(e)}}error(e){if(this.closed)throw new o.a;this.hasError=!0,this.thrownError=e,this.isStopped=!0;const{observers:t}=this,n=t.length,i=t.slice();for(let r=0;r<n;r++)i[r].error(e);this.observers.length=0}complete(){if(this.closed)throw new o.a;this.isStopped=!0;const{observers:e}=this,t=e.length,n=e.slice();for(let i=0;i<t;i++)n[i].complete();this.observers.length=0}unsubscribe(){this.isStopped=!0,this.closed=!0,this.observers=null}_trySubscribe(e){if(this.closed)throw new o.a;return super._trySubscribe(e)}_subscribe(e){if(this.closed)throw new o.a;return this.hasError?(e.error(this.thrownError),s.a.EMPTY):this.isStopped?(e.complete(),s.a.EMPTY):(this.observers.push(e),new a.a(this,e))}asObservable(){const e=new i.a;return e.source=this,e}}return e.create=(e,t)=>new d(e,t),e})();class d extends u{constructor(e,t){super(),this.destination=e,this.source=t}next(e){const{destination:t}=this;t&&t.next&&t.next(e)}error(e){const{destination:t}=this;t&&t.error&&this.destination.error(e)}complete(){const{destination:e}=this;e&&e.complete&&this.destination.complete()}_subscribe(e){const{source:t}=this;return t?this.source.subscribe(e):s.a.EMPTY}}},XoHu:function(e,t,n){"use strict";function i(e){return null!==e&&"object"==typeof e}n.d(t,"a",(function(){return i}))},XqMk:function(e,t,n){"use strict";var i="object"==typeof global&&global&&global.Object===Object&&global;t.a=i},Y7HM:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("DH7j");function r(e){return!Object(i.a)(e)&&e-parseFloat(e)+1>=0}},YNrV:function(e,t,n){"use strict";var i=n("g6v/"),r=n("0Dky"),s=n("33Wh"),o=n("dBg+"),a=n("0eef"),c=n("ewvW"),l=n("RK3t"),u=Object.assign,d=Object.defineProperty;e.exports=!u||r((function(){if(i&&1!==u({b:1},u(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=u({},e)[n]||s(u({},t)).join("")!=r}))?function(e,t){for(var n=c(e),r=arguments.length,u=1,d=o.f,h=a.f;r>u;)for(var f,p=l(arguments[u++]),m=d?s(p).concat(d(p)):s(p),b=m.length,g=0;b>g;)f=m[g++],i&&!h.call(p,f)||(n[f]=p[f]);return n}:u},YRex:function(e,t,n){!function(e){"use strict";e.defineLocale("ug-cn",{months:"\u064a\u0627\u0646\u06cb\u0627\u0631_\u0641\u06d0\u06cb\u0631\u0627\u0644_\u0645\u0627\u0631\u062a_\u0626\u0627\u067e\u0631\u06d0\u0644_\u0645\u0627\u064a_\u0626\u0649\u064a\u06c7\u0646_\u0626\u0649\u064a\u06c7\u0644_\u0626\u0627\u06cb\u063a\u06c7\u0633\u062a_\u0633\u06d0\u0646\u062a\u06d5\u0628\u0649\u0631_\u0626\u06c6\u0643\u062a\u06d5\u0628\u0649\u0631_\u0646\u0648\u064a\u0627\u0628\u0649\u0631_\u062f\u06d0\u0643\u0627\u0628\u0649\u0631".split("_"),monthsShort:"\u064a\u0627\u0646\u06cb\u0627\u0631_\u0641\u06d0\u06cb\u0631\u0627\u0644_\u0645\u0627\u0631\u062a_\u0626\u0627\u067e\u0631\u06d0\u0644_\u0645\u0627\u064a_\u0626\u0649\u064a\u06c7\u0646_\u0626\u0649\u064a\u06c7\u0644_\u0626\u0627\u06cb\u063a\u06c7\u0633\u062a_\u0633\u06d0\u0646\u062a\u06d5\u0628\u0649\u0631_\u0626\u06c6\u0643\u062a\u06d5\u0628\u0649\u0631_\u0646\u0648\u064a\u0627\u0628\u0649\u0631_\u062f\u06d0\u0643\u0627\u0628\u0649\u0631".split("_"),weekdays:"\u064a\u06d5\u0643\u0634\u06d5\u0646\u0628\u06d5_\u062f\u06c8\u0634\u06d5\u0646\u0628\u06d5_\u0633\u06d5\u064a\u0634\u06d5\u0646\u0628\u06d5_\u0686\u0627\u0631\u0634\u06d5\u0646\u0628\u06d5_\u067e\u06d5\u064a\u0634\u06d5\u0646\u0628\u06d5_\u062c\u06c8\u0645\u06d5_\u0634\u06d5\u0646\u0628\u06d5".split("_"),weekdaysShort:"\u064a\u06d5_\u062f\u06c8_\u0633\u06d5_\u0686\u0627_\u067e\u06d5_\u062c\u06c8_\u0634\u06d5".split("_"),weekdaysMin:"\u064a\u06d5_\u062f\u06c8_\u0633\u06d5_\u0686\u0627_\u067e\u06d5_\u062c\u06c8_\u0634\u06d5".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY-\u064a\u0649\u0644\u0649M-\u0626\u0627\u064a\u0646\u0649\u06adD-\u0643\u06c8\u0646\u0649",LLL:"YYYY-\u064a\u0649\u0644\u0649M-\u0626\u0627\u064a\u0646\u0649\u06adD-\u0643\u06c8\u0646\u0649\u060c HH:mm",LLLL:"dddd\u060c YYYY-\u064a\u0649\u0644\u0649M-\u0626\u0627\u064a\u0646\u0649\u06adD-\u0643\u06c8\u0646\u0649\u060c HH:mm"},meridiemParse:/\u064a\u06d0\u0631\u0649\u0645 \u0643\u06d0\u0686\u06d5|\u0633\u06d5\u06be\u06d5\u0631|\u0686\u06c8\u0634\u062a\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646|\u0686\u06c8\u0634|\u0686\u06c8\u0634\u062a\u0649\u0646 \u0643\u06d0\u064a\u0649\u0646|\u0643\u06d5\u0686/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u064a\u06d0\u0631\u0649\u0645 \u0643\u06d0\u0686\u06d5"===t||"\u0633\u06d5\u06be\u06d5\u0631"===t||"\u0686\u06c8\u0634\u062a\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646"===t?e:"\u0686\u06c8\u0634\u062a\u0649\u0646 \u0643\u06d0\u064a\u0649\u0646"===t||"\u0643\u06d5\u0686"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var i=100*e+t;return i<600?"\u064a\u06d0\u0631\u0649\u0645 \u0643\u06d0\u0686\u06d5":i<900?"\u0633\u06d5\u06be\u06d5\u0631":i<1130?"\u0686\u06c8\u0634\u062a\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646":i<1230?"\u0686\u06c8\u0634":i<1800?"\u0686\u06c8\u0634\u062a\u0649\u0646 \u0643\u06d0\u064a\u0649\u0646":"\u0643\u06d5\u0686"},calendar:{sameDay:"[\u0628\u06c8\u06af\u06c8\u0646 \u0633\u0627\u0626\u06d5\u062a] LT",nextDay:"[\u0626\u06d5\u062a\u06d5 \u0633\u0627\u0626\u06d5\u062a] LT",nextWeek:"[\u0643\u06d0\u0644\u06d5\u0631\u0643\u0649] dddd [\u0633\u0627\u0626\u06d5\u062a] LT",lastDay:"[\u062a\u06c6\u0646\u06c8\u06af\u06c8\u0646] LT",lastWeek:"[\u0626\u0627\u0644\u062f\u0649\u0646\u0642\u0649] dddd [\u0633\u0627\u0626\u06d5\u062a] LT",sameElse:"L"},relativeTime:{future:"%s \u0643\u06d0\u064a\u0649\u0646",past:"%s \u0628\u06c7\u0631\u06c7\u0646",s:"\u0646\u06d5\u0686\u0686\u06d5 \u0633\u06d0\u0643\u0648\u0646\u062a",ss:"%d \u0633\u06d0\u0643\u0648\u0646\u062a",m:"\u0628\u0649\u0631 \u0645\u0649\u0646\u06c7\u062a",mm:"%d \u0645\u0649\u0646\u06c7\u062a",h:"\u0628\u0649\u0631 \u0633\u0627\u0626\u06d5\u062a",hh:"%d \u0633\u0627\u0626\u06d5\u062a",d:"\u0628\u0649\u0631 \u0643\u06c8\u0646",dd:"%d \u0643\u06c8\u0646",M:"\u0628\u0649\u0631 \u0626\u0627\u064a",MM:"%d \u0626\u0627\u064a",y:"\u0628\u0649\u0631 \u064a\u0649\u0644",yy:"%d \u064a\u0649\u0644"},dayOfMonthOrdinalParse:/\d{1,2}(-\u0643\u06c8\u0646\u0649|-\u0626\u0627\u064a|-\u06be\u06d5\u067e\u062a\u06d5)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"-\u0643\u06c8\u0646\u0649";case"w":case"W":return e+"-\u06be\u06d5\u067e\u062a\u06d5";default:return e}},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"\u060c")},week:{dow:1,doy:7}})}(n("wd/R"))},Ylt2:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("quSY");class r extends i.a{constructor(e,t){super(),this.subject=e,this.subscriber=t,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const e=this.subject,t=e.observers;if(this.subject=null,!t||0===t.length||e.isStopped||e.closed)return;const n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}},YuTi:function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},Z21x:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n("8Y7J"),r=n("sne2"),s=n("SVse"),o=n("ANnk");let a=(()=>{class e{constructor(e,t){this.location=e,this.actionLabels=t,this.backAction=new i.o,this.name=this.actionLabels.CANCEL}back(){0===this.backAction.observers.length?this.location.back():this.backAction.emit()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(s.m),i.Mb(r.b))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-back-button"]],inputs:{name:"name"},outputs:{backAction:"backAction"},decls:2,vars:1,consts:[["type","button",1,"btn","btn-light","tc_backButton",3,"click"]],template:function(e,t){1&e&&(i.Sb(0,"button",0),i.gc("click",(function(){return t.back()})),i.Oc(1),i.Rb()),2&e&&(i.yb(1),i.Qc(" ",t.name,"\n"))},directives:[o.a],styles:[""]}),e})()},Z4QM:function(e,t,n){!function(e){"use strict";var t=["\u062c\u0646\u0648\u0631\u064a","\u0641\u064a\u0628\u0631\u0648\u0631\u064a","\u0645\u0627\u0631\u0686","\u0627\u067e\u0631\u064a\u0644","\u0645\u0626\u064a","\u062c\u0648\u0646","\u062c\u0648\u0644\u0627\u0621\u0650","\u0622\u06af\u0633\u067d","\u0633\u064a\u067e\u067d\u0645\u0628\u0631","\u0622\u06aa\u067d\u0648\u0628\u0631","\u0646\u0648\u0645\u0628\u0631","\u068a\u0633\u0645\u0628\u0631"],n=["\u0622\u0686\u0631","\u0633\u0648\u0645\u0631","\u0627\u06b1\u0627\u0631\u0648","\u0627\u0631\u0628\u0639","\u062e\u0645\u064a\u0633","\u062c\u0645\u0639","\u0687\u0646\u0687\u0631"];e.defineLocale("sd",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd\u060c D MMMM YYYY HH:mm"},meridiemParse:/\u0635\u0628\u062d|\u0634\u0627\u0645/,isPM:function(e){return"\u0634\u0627\u0645"===e},meridiem:function(e,t,n){return e<12?"\u0635\u0628\u062d":"\u0634\u0627\u0645"},calendar:{sameDay:"[\u0627\u0684] LT",nextDay:"[\u0633\u0680\u0627\u06bb\u064a] LT",nextWeek:"dddd [\u0627\u06b3\u064a\u0646 \u0647\u0641\u062a\u064a \u062a\u064a] LT",lastDay:"[\u06aa\u0627\u0644\u0647\u0647] LT",lastWeek:"[\u06af\u0632\u0631\u064a\u0644 \u0647\u0641\u062a\u064a] dddd [\u062a\u064a] LT",sameElse:"L"},relativeTime:{future:"%s \u067e\u0648\u0621",past:"%s \u0627\u06b3",s:"\u0686\u0646\u062f \u0633\u064a\u06aa\u0646\u068a",ss:"%d \u0633\u064a\u06aa\u0646\u068a",m:"\u0647\u06aa \u0645\u0646\u067d",mm:"%d \u0645\u0646\u067d",h:"\u0647\u06aa \u06aa\u0644\u0627\u06aa",hh:"%d \u06aa\u0644\u0627\u06aa",d:"\u0647\u06aa \u068f\u064a\u0646\u0647\u0646",dd:"%d \u068f\u064a\u0646\u0647\u0646",M:"\u0647\u06aa \u0645\u0647\u064a\u0646\u0648",MM:"%d \u0645\u0647\u064a\u0646\u0627",y:"\u0647\u06aa \u0633\u0627\u0644",yy:"%d \u0633\u0627\u0644"},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/,/g,"\u060c")},week:{dow:1,doy:4}})}(n("wd/R"))},ZAMP:function(e,t,n){!function(e){"use strict";e.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(n("wd/R"))},ZUHj:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n("7o/Q");class r extends i.a{constructor(e,t,n){super(),this.parent=e,this.outerValue=t,this.outerIndex=n,this.index=0}_next(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)}_error(e){this.parent.notifyError(e,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}var s=n("SeVD"),o=n("HDdC");function a(e,t,n,i,a=new r(e,n,i)){if(!a.closed)return t instanceof o.a?t.subscribe(a):Object(s.a)(t)(a)}},ZUd8:function(e,t,n){var i=n("ppGB"),r=n("HYAF"),s=function(e){return function(t,n){var s,o,a=String(r(t)),c=i(n),l=a.length;return c<0||c>=l?e?"":void 0:(s=a.charCodeAt(c))<55296||s>56319||c+1===l||(o=a.charCodeAt(c+1))<56320||o>57343?e?a.charAt(c):s:e?a.slice(c,c+2):o-56320+(s-55296<<10)+65536}};e.exports={codeAt:s(!1),charAt:s(!0)}},Zduo:function(e,t,n){!function(e){"use strict";e.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_a\u016dgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mart_apr_maj_jun_jul_a\u016dg_sept_okt_nov_dec".split("_"),weekdays:"diman\u0109o_lundo_mardo_merkredo_\u0135a\u016ddo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_\u0135a\u016d_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_\u0135a_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"[la] D[-an de] MMMM, YYYY",LLL:"[la] D[-an de] MMMM, YYYY HH:mm",LLLL:"dddd[n], [la] D[-an de] MMMM, YYYY HH:mm",llll:"ddd, [la] D[-an de] MMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return"p"===e.charAt(0).toLowerCase()},meridiem:function(e,t,n){return e>11?n?"p.t.m.":"P.T.M.":n?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodia\u016d je] LT",nextDay:"[Morga\u016d je] LT",nextWeek:"dddd[n je] LT",lastDay:"[Hiera\u016d je] LT",lastWeek:"[pasintan] dddd[n je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"anta\u016d %s",s:"kelkaj sekundoj",ss:"%d sekundoj",m:"unu minuto",mm:"%d minutoj",h:"unu horo",hh:"%d horoj",d:"unu tago",dd:"%d tagoj",M:"unu monato",MM:"%d monatoj",y:"unu jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}})}(n("wd/R"))},ZfDv:function(e,t,n){var i=n("hh1v"),r=n("6LWA"),s=n("tiKp")("species");e.exports=function(e,t){var n;return r(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!r(n.prototype)?i(n)&&null===(n=n[s])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},a0VL:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("8Y7J"),r=n("SVse");let s=(()=>{class e{constructor(e){this.datePipe=e}transform(e){return null===e||""===e?"":this.datePipe.transform(e,"shortDate")+" "+this.datePipe.transform(e,"mediumTime")}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(r.e))},e.\u0275pipe=i.Lb({name:"cdDate",type:e,pure:!0}),e})()},a96k:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));class i{constructor(e,t,n,i=!0){this.selected=e,this.name=t,this.description=n,this.enabled=i}}},aIdf:function(e,t,n){!function(e){"use strict";function t(e,t,n){return e+" "+function(e,t){return 2===t?function(e){var t={m:"v",b:"v",d:"z"};return void 0===t[e.charAt(0)]?e:t[e.charAt(0)]+e.substring(1)}(e):e}({mm:"munutenn",MM:"miz",dd:"devezh"}[n],e)}var n=[/^gen/i,/^c[\u02bc\']hwe/i,/^meu/i,/^ebr/i,/^mae/i,/^(mez|eve)/i,/^gou/i,/^eos/i,/^gwe/i,/^her/i,/^du/i,/^ker/i],i=/^(genver|c[\u02bc\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[\u02bc\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,r=[/^Su/i,/^Lu/i,/^Me([^r]|$)/i,/^Mer/i,/^Ya/i,/^Gw/i,/^Sa/i];e.defineLocale("br",{months:"Genver_C\u02bchwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C\u02bchwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc\u02bcher_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParse:r,fullWeekdaysParse:[/^sul/i,/^lun/i,/^meurzh/i,/^merc[\u02bc\']her/i,/^yaou/i,/^gwener/i,/^sadorn/i],shortWeekdaysParse:[/^Sul/i,/^Lun/i,/^Meu/i,/^Mer/i,/^Yao/i,/^Gwe/i,/^Sad/i],minWeekdaysParse:r,monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(genver|c[\u02bc\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,monthsShortStrictRegex:/^(gen|c[\u02bc\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY HH:mm",LLLL:"dddd, D [a viz] MMMM YYYY HH:mm"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc\u02bchoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec\u02bch da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s \u02bczo",s:"un nebeud segondenno\xf9",ss:"%d eilenn",m:"ur vunutenn",mm:t,h:"un eur",hh:"%d eur",d:"un devezh",dd:t,M:"ur miz",MM:t,y:"ur bloaz",yy:function(e){switch(function e(t){return t>9?e(t%10):t}(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}},dayOfMonthOrdinalParse:/\d{1,2}(a\xf1|vet)/,ordinal:function(e){return e+(1===e?"a\xf1":"vet")},week:{dow:1,doy:4},meridiemParse:/a.m.|g.m./,isPM:function(e){return"g.m."===e},meridiem:function(e,t,n){return e<12?"a.m.":"g.m."}})}(n("wd/R"))},aIsn:function(e,t,n){!function(e){"use strict";e.defineLocale("mi",{months:"Kohi-t\u0101te_Hui-tanguru_Pout\u016b-te-rangi_Paenga-wh\u0101wh\u0101_Haratua_Pipiri_H\u014dngoingoi_Here-turi-k\u014dk\u0101_Mahuru_Whiringa-\u0101-nuku_Whiringa-\u0101-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_H\u014dngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"R\u0101tapu_Mane_T\u016brei_Wenerei_T\u0101ite_Paraire_H\u0101tarei".split("_"),weekdaysShort:"Ta_Ma_T\u016b_We_T\u0101i_Pa_H\u0101".split("_"),weekdaysMin:"Ta_Ma_T\u016b_We_T\u0101i_Pa_H\u0101".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te h\u0113kona ruarua",ss:"%d h\u0113kona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}})}(n("wd/R"))},aQkU:function(e,t,n){!function(e){"use strict";e.defineLocale("mk",{months:"\u0458\u0430\u043d\u0443\u0430\u0440\u0438_\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0438\u043b_\u043c\u0430\u0458_\u0458\u0443\u043d\u0438_\u0458\u0443\u043b\u0438_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438_\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438_\u043d\u043e\u0435\u043c\u0432\u0440\u0438_\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438".split("_"),monthsShort:"\u0458\u0430\u043d_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0458_\u0458\u0443\u043d_\u0458\u0443\u043b_\u0430\u0432\u0433_\u0441\u0435\u043f_\u043e\u043a\u0442_\u043d\u043e\u0435_\u0434\u0435\u043a".split("_"),weekdays:"\u043d\u0435\u0434\u0435\u043b\u0430_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0440\u0442\u043e\u043a_\u043f\u0435\u0442\u043e\u043a_\u0441\u0430\u0431\u043e\u0442\u0430".split("_"),weekdaysShort:"\u043d\u0435\u0434_\u043f\u043e\u043d_\u0432\u0442\u043e_\u0441\u0440\u0435_\u0447\u0435\u0442_\u043f\u0435\u0442_\u0441\u0430\u0431".split("_"),weekdaysMin:"\u043de_\u043fo_\u0432\u0442_\u0441\u0440_\u0447\u0435_\u043f\u0435_\u0441a".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[\u0414\u0435\u043d\u0435\u0441 \u0432\u043e] LT",nextDay:"[\u0423\u0442\u0440\u0435 \u0432\u043e] LT",nextWeek:"[\u0412\u043e] dddd [\u0432\u043e] LT",lastDay:"[\u0412\u0447\u0435\u0440\u0430 \u0432\u043e] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[\u0418\u0437\u043c\u0438\u043d\u0430\u0442\u0430\u0442\u0430] dddd [\u0432\u043e] LT";case 1:case 2:case 4:case 5:return"[\u0418\u0437\u043c\u0438\u043d\u0430\u0442\u0438\u043e\u0442] dddd [\u0432\u043e] LT"}},sameElse:"L"},relativeTime:{future:"\u0437\u0430 %s",past:"\u043f\u0440\u0435\u0434 %s",s:"\u043d\u0435\u043a\u043e\u043b\u043a\u0443 \u0441\u0435\u043a\u0443\u043d\u0434\u0438",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434\u0438",m:"\u0435\u0434\u043d\u0430 \u043c\u0438\u043d\u0443\u0442\u0430",mm:"%d \u043c\u0438\u043d\u0443\u0442\u0438",h:"\u0435\u0434\u0435\u043d \u0447\u0430\u0441",hh:"%d \u0447\u0430\u0441\u0430",d:"\u0435\u0434\u0435\u043d \u0434\u0435\u043d",dd:"%d \u0434\u0435\u043d\u0430",M:"\u0435\u0434\u0435\u043d \u043c\u0435\u0441\u0435\u0446",MM:"%d \u043c\u0435\u0441\u0435\u0446\u0438",y:"\u0435\u0434\u043d\u0430 \u0433\u043e\u0434\u0438\u043d\u0430",yy:"%d \u0433\u043e\u0434\u0438\u043d\u0438"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0435\u0432|\u0435\u043d|\u0442\u0438|\u0432\u0438|\u0440\u0438|\u043c\u0438)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-\u0435\u0432":0===n?e+"-\u0435\u043d":n>10&&n<20?e+"-\u0442\u0438":1===t?e+"-\u0432\u0438":2===t?e+"-\u0440\u0438":7===t||8===t?e+"-\u043c\u0438":e+"-\u0442\u0438"},week:{dow:1,doy:7}})}(n("wd/R"))},aXbf:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("LvDl"),r=n.n(i),s=n("8Y7J");let o=(()=>{class e{format_number(e,t,n,i=1){if(r.a.isString(e)&&(e=Number(e)),!r.a.isNumber(e))return"-";let s=e<1?0:Math.floor(Math.log(e)/Math.log(t));s=s>=n.length?n.length-1:s;let o=r.a.round(e/Math.pow(t,s),i).toString();return""===o?"-":(""!==n[s]&&(o=`${o} ${n[s]}`),o)}toBytes(e,t=null){const n=["b","k","m","g","t","p","e","z","y"],i=RegExp("^(\\d+(.\\d+)?) ?(["+n.join("")+"]?(b|ib|B/s)?)?$","i").exec(e);if(null===i)return t;let s=parseFloat(i[1]);return r.a.isString(i[3])&&(s*=Math.pow(1024,n.indexOf(i[3].toLowerCase()[0]))),Math.round(s)}toMilliseconds(e){const t=/^\s*(\d+)\s*(ms)?\s*$/i.exec(e);return null!==t?+t[1]:0}toIops(e){const t=/^\s*(\d+)\s*(IOPS)?\s*$/i.exec(e);return null!==t?+t[1]:0}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=s.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},aexS:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("2Vo4"),r=n("jKX/"),s=n("8Y7J");let o=(()=>{class e{constructor(){this.isPwdDisplayedSource=new i.a(!1),this.isPwdDisplayed$=this.isPwdDisplayedSource.asObservable()}set(e,t={},n=!1,i=null,s=!1){localStorage.setItem("dashboard_username",e),localStorage.setItem("dashboard_permissions",JSON.stringify(new r.a(t))),localStorage.setItem("user_pwd_expiration_date",String(i)),localStorage.setItem("user_pwd_update_required",String(s)),localStorage.setItem("sso",String(n))}remove(){localStorage.removeItem("dashboard_username"),localStorage.removeItem("user_pwd_expiration_data"),localStorage.removeItem("user_pwd_update_required")}isLoggedIn(){return null!==localStorage.getItem("dashboard_username")}getUsername(){return localStorage.getItem("dashboard_username")}getPermissions(){return JSON.parse(localStorage.getItem("dashboard_permissions")||JSON.stringify(new r.a({})))}getPwdExpirationDate(){return Number(localStorage.getItem("user_pwd_expiration_date"))}getPwdUpdateRequired(){return"true"===localStorage.getItem("user_pwd_update_required")}isSSO(){return"true"===localStorage.getItem("sso")}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=s.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},afO8:function(e,t,n){var i,r,s,o=n("f5p1"),a=n("2oRo"),c=n("hh1v"),l=n("kRJp"),u=n("UTVS"),d=n("93I0"),h=n("0BK2");if(o){var f=new(0,a.WeakMap),p=f.get,m=f.has,b=f.set;i=function(e,t){return b.call(f,e,t),t},r=function(e){return p.call(f,e)||{}},s=function(e){return m.call(f,e)}}else{var g=d("state");h[g]=!0,i=function(e,t){return l(e,g,t),t},r=function(e){return u(e,g)?e[g]:{}},s=function(e){return u(e,g)}}e.exports={set:i,get:r,has:s,enforce:function(e){return s(e)?r(e):i(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=r(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},ajRT:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n("8Y7J"),r=n("ANnk");const s=[[["",8,"modal-title"]],[["",8,"modal-content"]]],o=[".modal-title",".modal-content"];let a=(()=>{class e{constructor(){this.hide=new i.o}close(){var e;null===(e=this.modalRef)||void 0===e||e.close(),this.hide.emit()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-modal"]],inputs:{modalRef:"modalRef"},outputs:{hide:"hide"},ngContentSelectors:o,decls:7,vars:0,consts:[[1,"modal-header"],[1,"modal-title","float-left"],["type","button","aria-label","Close",1,"close","float-right",3,"click"],["aria-hidden","true"]],template:function(e,t){1&e&&(i.oc(s),i.Sb(0,"div",0),i.Sb(1,"h4",1),i.nc(2),i.Rb(),i.Sb(3,"button",2),i.gc("click",(function(){return t.close()})),i.Sb(4,"span",3),i.Oc(5,"\xd7"),i.Rb(),i.Rb(),i.Rb(),i.nc(6,1))},directives:[r.a],styles:[".modal-header[_ngcontent-%COMP%]{border-radius:5px 5px 0 0}.modal-header[_ngcontent-%COMP%], cd-modal .modal-footer{background-color:#e9ecef;border-bottom:1px solid #ced4da} cd-modal .modal-footer{border-radius:0 0 5px 5px} cd-modal .modal-body{max-height:70vh;overflow-x:hidden;overflow-y:auto}button.close[_ngcontent-%COMP%]{outline:none}"]}),e})()},b1Dy:function(e,t,n){!function(e){"use strict";e.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n("wd/R"))},b5OY:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var i=n("mrSG"),r=n("IheW"),s=n("LRne"),o=n("5+tZ"),a=n("xTzq"),c=n("8Y7J");let l=(()=>{let e=class{constructor(e){this.http=e,this.url="api/perf_counters"}list(){return this.http.get(this.url)}get(e,t){return this.http.get(`${this.url}/${e}/${t}`).pipe(Object(o.a)(e=>Object(s.a)(e.counters)))}};return e.\u0275fac=function(t){return new(t||e)(c.dc(r.b))},e.\u0275prov=c.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e=Object(i.b)([a.a,Object(i.d)("design:paramtypes",[r.b])],e),e})();var u=n("SVse"),d=n("uIqm"),h=n("/NlG"),f=n("o4+5");const p=["valueTpl"];function m(e,t){if(1&e&&(c.Oc(0),c.jc(1,"dimless")),2&e){const e=t.row;c.Rc(" ",c.kc(1,2,e.value)," ",e.unit," ")}}function b(e,t){if(1&e){const e=c.Tb();c.Sb(0,"cd-table",2),c.gc("fetchData",(function(t){return c.Dc(e),c.ic().getCounters(t)})),c.Mc(1,m,2,4,"ng-template",null,3,c.Nc),c.Rb()}if(2&e){const e=c.ic();c.pc("data",e.counters)("columns",e.columns)("autoSave",!1)}}function g(e,t){1&e&&(c.Sb(0,"cd-alert-panel",4),c.Wb(1,5),c.Rb())}let _=(()=>{class e{constructor(e){this.performanceCounterService=e,this.columns=[],this.counters=[]}ngOnInit(){this.columns=[{name:"Name",prop:"name",flexGrow:1},{name:"Description",prop:"description",flexGrow:1},{name:"Value",prop:"value",cellTemplate:this.valueTpl,flexGrow:1}]}getCounters(e){this.performanceCounterService.get(this.serviceType,this.serviceId).subscribe(e=>{this.counters=e},t=>{404===t.status?(t.preventDefault(),this.counters=null):e.error()})}}return e.\u0275fac=function(t){return new(t||e)(c.Mb(l))},e.\u0275cmp=c.Gb({type:e,selectors:[["cd-table-performance-counter"]],viewQuery:function(e,t){var n;1&e&&c.Tc(p,!0),2&e&&c.zc(n=c.hc())&&(t.valueTpl=n.first)},inputs:{serviceType:"serviceType",serviceId:"serviceId"},decls:3,vars:2,consts:function(){return[["columnMode","flex",3,"data","columns","autoSave","fetchData",4,"ngIf","ngIfElse"],["warning",""],["columnMode","flex",3,"data","columns","autoSave","fetchData"],["valueTpl",""],["type","warning"],"Performance counters not available"]},template:function(e,t){if(1&e&&(c.Mc(0,b,3,3,"cd-table",0),c.Mc(1,g,2,0,"ng-template",null,1,c.Nc)),2&e){const e=c.Ac(2);c.pc("ngIf",t.counters)("ngIfElse",e)}},directives:[u.r,d.a,h.a],pipes:[f.a],styles:[""]}),e})()},bHdf:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("5+tZ"),r=n("SpAZ");function s(e=Number.POSITIVE_INFINITY){return Object(i.a)(r.a,e)}},bOMt:function(e,t,n){!function(e){"use strict";e.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"s\xf8ndag_mandag_tirsdag_onsdag_torsdag_fredag_l\xf8rdag".split("_"),weekdaysShort:"s\xf8._ma._ti._on._to._fr._l\xf8.".split("_"),weekdaysMin:"s\xf8_ma_ti_on_to_fr_l\xf8".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i g\xe5r kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",w:"en uke",ww:"%d uker",M:"en m\xe5ned",MM:"%d m\xe5neder",y:"ett \xe5r",yy:"%d \xe5r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},bOdf:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("5+tZ");function r(e,t){return Object(i.a)(e,t,1)}},bWFh:function(e,t,n){"use strict";var i=n("I+eb"),r=n("2oRo"),s=n("lMq5"),o=n("busE"),a=n("8YOa"),c=n("ImZN"),l=n("GarU"),u=n("hh1v"),d=n("0Dky"),h=n("HH4o"),f=n("1E5z"),p=n("cVYH");e.exports=function(e,t,n){var m=-1!==e.indexOf("Map"),b=-1!==e.indexOf("Weak"),g=m?"set":"add",_=r[e],y=_&&_.prototype,v=_,w={},S=function(e){var t=y[e];o(y,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(b&&!u(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return b&&!u(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(b&&!u(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(s(e,"function"!=typeof _||!(b||y.forEach&&!d((function(){(new _).entries().next()})))))v=n.getConstructor(t,e,m,g),a.REQUIRED=!0;else if(s(e,!0)){var M=new v,k=M[g](b?{}:-0,1)!=M,x=d((function(){M.has(1)})),D=h((function(e){new _(e)})),T=!b&&d((function(){for(var e=new _,t=5;t--;)e[g](t,t);return!e.has(-0)}));D||((v=t((function(t,n){l(t,v,e);var i=p(new _,t,v);return null!=n&&c(n,i[g],i,m),i}))).prototype=y,y.constructor=v),(x||T)&&(S("delete"),S("has"),m&&S("get")),(T||k)&&S(g),b&&y.clear&&delete y.clear}return w[e]=v,i({global:!0,forced:v!=_},w),f(v,e),b||n.setStrong(v,e,m),v}},bXm7:function(e,t,n){!function(e){"use strict";var t={0:"-\u0448\u0456",1:"-\u0448\u0456",2:"-\u0448\u0456",3:"-\u0448\u0456",4:"-\u0448\u0456",5:"-\u0448\u0456",6:"-\u0448\u044b",7:"-\u0448\u0456",8:"-\u0448\u0456",9:"-\u0448\u044b",10:"-\u0448\u044b",20:"-\u0448\u044b",30:"-\u0448\u044b",40:"-\u0448\u044b",50:"-\u0448\u0456",60:"-\u0448\u044b",70:"-\u0448\u0456",80:"-\u0448\u0456",90:"-\u0448\u044b",100:"-\u0448\u0456"};e.defineLocale("kk",{months:"\u049b\u0430\u04a3\u0442\u0430\u0440_\u0430\u049b\u043f\u0430\u043d_\u043d\u0430\u0443\u0440\u044b\u0437_\u0441\u04d9\u0443\u0456\u0440_\u043c\u0430\u043c\u044b\u0440_\u043c\u0430\u0443\u0441\u044b\u043c_\u0448\u0456\u043b\u0434\u0435_\u0442\u0430\u043c\u044b\u0437_\u049b\u044b\u0440\u043a\u04af\u0439\u0435\u043a_\u049b\u0430\u0437\u0430\u043d_\u049b\u0430\u0440\u0430\u0448\u0430_\u0436\u0435\u043b\u0442\u043e\u049b\u0441\u0430\u043d".split("_"),monthsShort:"\u049b\u0430\u04a3_\u0430\u049b\u043f_\u043d\u0430\u0443_\u0441\u04d9\u0443_\u043c\u0430\u043c_\u043c\u0430\u0443_\u0448\u0456\u043b_\u0442\u0430\u043c_\u049b\u044b\u0440_\u049b\u0430\u0437_\u049b\u0430\u0440_\u0436\u0435\u043b".split("_"),weekdays:"\u0436\u0435\u043a\u0441\u0435\u043d\u0431\u0456_\u0434\u04af\u0439\u0441\u0435\u043d\u0431\u0456_\u0441\u0435\u0439\u0441\u0435\u043d\u0431\u0456_\u0441\u04d9\u0440\u0441\u0435\u043d\u0431\u0456_\u0431\u0435\u0439\u0441\u0435\u043d\u0431\u0456_\u0436\u04b1\u043c\u0430_\u0441\u0435\u043d\u0431\u0456".split("_"),weekdaysShort:"\u0436\u0435\u043a_\u0434\u04af\u0439_\u0441\u0435\u0439_\u0441\u04d9\u0440_\u0431\u0435\u0439_\u0436\u04b1\u043c_\u0441\u0435\u043d".split("_"),weekdaysMin:"\u0436\u043a_\u0434\u0439_\u0441\u0439_\u0441\u0440_\u0431\u0439_\u0436\u043c_\u0441\u043d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0411\u04af\u0433\u0456\u043d \u0441\u0430\u0493\u0430\u0442] LT",nextDay:"[\u0415\u0440\u0442\u0435\u04a3 \u0441\u0430\u0493\u0430\u0442] LT",nextWeek:"dddd [\u0441\u0430\u0493\u0430\u0442] LT",lastDay:"[\u041a\u0435\u0448\u0435 \u0441\u0430\u0493\u0430\u0442] LT",lastWeek:"[\u04e8\u0442\u043a\u0435\u043d \u0430\u043f\u0442\u0430\u043d\u044b\u04a3] dddd [\u0441\u0430\u0493\u0430\u0442] LT",sameElse:"L"},relativeTime:{future:"%s \u0456\u0448\u0456\u043d\u0434\u0435",past:"%s \u0431\u04b1\u0440\u044b\u043d",s:"\u0431\u0456\u0440\u043d\u0435\u0448\u0435 \u0441\u0435\u043a\u0443\u043d\u0434",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434",m:"\u0431\u0456\u0440 \u043c\u0438\u043d\u0443\u0442",mm:"%d \u043c\u0438\u043d\u0443\u0442",h:"\u0431\u0456\u0440 \u0441\u0430\u0493\u0430\u0442",hh:"%d \u0441\u0430\u0493\u0430\u0442",d:"\u0431\u0456\u0440 \u043a\u04af\u043d",dd:"%d \u043a\u04af\u043d",M:"\u0431\u0456\u0440 \u0430\u0439",MM:"%d \u0430\u0439",y:"\u0431\u0456\u0440 \u0436\u044b\u043b",yy:"%d \u0436\u044b\u043b"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0448\u0456|\u0448\u044b)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n("wd/R"))},bYM6:function(e,t,n){!function(e){"use strict";e.defineLocale("ar-tn",{months:"\u062c\u0627\u0646\u0641\u064a_\u0641\u064a\u0641\u0631\u064a_\u0645\u0627\u0631\u0633_\u0623\u0641\u0631\u064a\u0644_\u0645\u0627\u064a_\u062c\u0648\u0627\u0646_\u062c\u0648\u064a\u0644\u064a\u0629_\u0623\u0648\u062a_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),monthsShort:"\u062c\u0627\u0646\u0641\u064a_\u0641\u064a\u0641\u0631\u064a_\u0645\u0627\u0631\u0633_\u0623\u0641\u0631\u064a\u0644_\u0645\u0627\u064a_\u062c\u0648\u0627\u0646_\u062c\u0648\u064a\u0644\u064a\u0629_\u0623\u0648\u062a_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:1,doy:4}})}(n("wd/R"))},bpih:function(e,t,n){!function(e){"use strict";e.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_luned\xec_marted\xec_mercoled\xec_gioved\xec_venerd\xec_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:function(){return"[Oggi a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextDay:function(){return"[Domani a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextWeek:function(){return"dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastDay:function(){return"[Ieri a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastWeek:function(){switch(this.day()){case 0:return"[La scorsa] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT";default:return"[Lo scorso] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"}},sameElse:"L"},relativeTime:{future:"tra %s",past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",w:"una settimana",ww:"%d settimane",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}})}(n("wd/R"))},busE:function(e,t,n){var i=n("2oRo"),r=n("kRJp"),s=n("UTVS"),o=n("zk60"),a=n("iSVu"),c=n("afO8"),l=c.get,u=c.enforce,d=String(String).split("String");(e.exports=function(e,t,n,a){var c=!!a&&!!a.unsafe,l=!!a&&!!a.enumerable,h=!!a&&!!a.noTargetGet;"function"==typeof n&&("string"!=typeof t||s(n,"name")||r(n,"name",t),u(n).source=d.join("string"==typeof t?t:"")),e!==i?(c?!h&&e[t]&&(l=!0):delete e[t],l?e[t]=n:r(e,t,n)):l?e[t]=n:o(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&l(this).source||a(this)}))},bxKX:function(e,t,n){!function(e){"use strict";e.defineLocale("it-ch",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_luned\xec_marted\xec_mercoled\xec_gioved\xec_venerd\xec_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}})}(n("wd/R"))},c2HN:function(e,t,n){"use strict";function i(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}n.d(t,"a",(function(){return i}))},cEzo:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var i=n("e0ae"),r=n("oxzT"),s=n("8Y7J"),o=n("EApP"),a=n("ANnk"),c=n("SVse");const l=function(e){return[e]};let u=(()=>{class e{constructor(e){this.toastr=e,this.byId=!0,this.icons=r.a}getText(){return document.getElementById(this.source).value}onClick(){try{const e=Object(i.a)(),t=this.byId?this.getText():this.source,n=()=>{this.toastr.success("Copied text to the clipboard successfully.")};["firefox","ie","ios","safari"].includes(e.name)?navigator.clipboard.writeText(t).then(()=>n()):navigator.permissions.query({name:"clipboard-write"}).then(e=>{"granted"!==e.state&&"prompt"!==e.state||navigator.clipboard.writeText(t).then(()=>n())})}catch(e){this.toastr.error("Failed to copy text to the clipboard.")}}}return e.\u0275fac=function(t){return new(t||e)(s.Mb(o.b))},e.\u0275cmp=s.Gb({type:e,selectors:[["cd-copy-2-clipboard-button"]],hostBindings:function(e,t){1&e&&s.gc("click",(function(){return t.onClick()}))},inputs:{source:"source",byId:"byId"},decls:3,vars:3,consts:function(){return[["type","button",1,"btn","btn-light",3,"click",6,"title"],["title","Copy to Clipboard"],[3,"ngClass"]]},template:function(e,t){1&e&&(s.Sb(0,"button",0),s.Yb(1,1),s.gc("click",(function(){return t.onClick()})),s.Nb(2,"i",2),s.Rb()),2&e&&(s.yb(2),s.pc("ngClass",s.uc(1,l,t.icons.clipboard)))},directives:[a.a,c.p],styles:[""]}),e})()},cRix:function(e,t,n){!function(e){"use strict";var t="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),n="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_");e.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,i){return e?/-MMM-/.test(i)?n[e.month()]:t[e.month()]:t},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[\xf4fr\xfbne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien min\xfat",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n("wd/R"))},cUpR:function(e,t,n){"use strict";n.d(t,"a",(function(){return j})),n.d(t,"b",(function(){return R})),n.d(t,"c",(function(){return $})),n.d(t,"d",(function(){return P})),n.d(t,"e",(function(){return w}));var i=n("SVse"),r=n("8Y7J");class s extends i.J{constructor(){super()}supportsDOMEvents(){return!0}}class o extends s{static makeCurrent(){Object(i.N)(new o)}getProperty(e,t){return e[t]}log(e){window.console&&window.console.log&&window.console.log(e)}logGroup(e){window.console&&window.console.group&&window.console.group(e)}logGroupEnd(){window.console&&window.console.groupEnd&&window.console.groupEnd()}onAndCancel(e,t,n){return e.addEventListener(t,n,!1),()=>{e.removeEventListener(t,n,!1)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){return e.parentNode&&e.parentNode.removeChild(e),e}getValue(e){return e.value}createElement(e,t){return(t=t||this.getDefaultDocument()).createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,t){return"window"===t?window:"document"===t?e:"body"===t?e.body:null}getHistory(){return window.history}getLocation(){return window.location}getBaseHref(e){const t=c||(c=document.querySelector("base"),c)?c.getAttribute("href"):null;return null==t?null:(n=t,a||(a=document.createElement("a")),a.setAttribute("href",n),"/"===a.pathname.charAt(0)?a.pathname:"/"+a.pathname);var n}resetBaseElement(){c=null}getUserAgent(){return window.navigator.userAgent}performanceNow(){return window.performance&&window.performance.now?window.performance.now():(new Date).getTime()}supportsCookies(){return!0}getCookie(e){return Object(i.M)(document.cookie,e)}}let a,c=null;const l=new r.r("TRANSITION_ID"),u=[{provide:r.d,useFactory:function(e,t,n){return()=>{n.get(r.e).donePromise.then(()=>{const n=Object(i.L)();Array.prototype.slice.apply(t.querySelectorAll("style[ng-transition]")).filter(t=>t.getAttribute("ng-transition")===e).forEach(e=>n.remove(e))})}},deps:[l,i.d,r.s],multi:!0}];class d{static init(){Object(r.W)(new d)}addToWindow(e){r.nb.getAngularTestability=(t,n=!0)=>{const i=e.findTestabilityInTree(t,n);if(null==i)throw new Error("Could not find testability for element.");return i},r.nb.getAllAngularTestabilities=()=>e.getAllTestabilities(),r.nb.getAllAngularRootElements=()=>e.getAllRootElements(),r.nb.frameworkStabilizers||(r.nb.frameworkStabilizers=[]),r.nb.frameworkStabilizers.push(e=>{const t=r.nb.getAllAngularTestabilities();let n=t.length,i=!1;const s=function(t){i=i||t,n--,0==n&&e(i)};t.forEach((function(e){e.whenStable(s)}))})}findTestabilityInTree(e,t,n){if(null==t)return null;const r=e.getTestability(t);return null!=r?r:n?Object(i.L)().isShadowRoot(t)?this.findTestabilityInTree(e,t.host,!0):this.findTestabilityInTree(e,t.parentElement,!0):null}}const h=new r.r("EventManagerPlugins");let f=(()=>{class e{constructor(e,t){this._zone=t,this._eventNameToPlugin=new Map,e.forEach(e=>e.manager=this),this._plugins=e.slice().reverse()}addEventListener(e,t,n){return this._findPluginFor(t).addEventListener(e,t,n)}addGlobalEventListener(e,t,n){return this._findPluginFor(t).addGlobalEventListener(e,t,n)}getZone(){return this._zone}_findPluginFor(e){const t=this._eventNameToPlugin.get(e);if(t)return t;const n=this._plugins;for(let i=0;i<n.length;i++){const t=n[i];if(t.supports(e))return this._eventNameToPlugin.set(e,t),t}throw new Error("No event manager plugin found for event "+e)}}return e.\u0275fac=function(t){return new(t||e)(r.dc(h),r.dc(r.A))},e.\u0275prov=r.Ib({token:e,factory:e.\u0275fac}),e})();class p{constructor(e){this._doc=e}addGlobalEventListener(e,t,n){const r=Object(i.L)().getGlobalEventTarget(this._doc,e);if(!r)throw new Error(`Unsupported event target ${r} for event ${t}`);return this.addEventListener(r,t,n)}}let m=(()=>{class e{constructor(){this._stylesSet=new Set}addStyles(e){const t=new Set;e.forEach(e=>{this._stylesSet.has(e)||(this._stylesSet.add(e),t.add(e))}),this.onStylesAdded(t)}onStylesAdded(e){}getAllStyles(){return Array.from(this._stylesSet)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=r.Ib({token:e,factory:e.\u0275fac}),e})(),b=(()=>{class e extends m{constructor(e){super(),this._doc=e,this._hostNodes=new Set,this._styleNodes=new Set,this._hostNodes.add(e.head)}_addStylesToHost(e,t){e.forEach(e=>{const n=this._doc.createElement("style");n.textContent=e,this._styleNodes.add(t.appendChild(n))})}addHost(e){this._addStylesToHost(this._stylesSet,e),this._hostNodes.add(e)}removeHost(e){this._hostNodes.delete(e)}onStylesAdded(e){this._hostNodes.forEach(t=>this._addStylesToHost(e,t))}ngOnDestroy(){this._styleNodes.forEach(e=>Object(i.L)().remove(e))}}return e.\u0275fac=function(t){return new(t||e)(r.dc(i.d))},e.\u0275prov=r.Ib({token:e,factory:e.\u0275fac}),e})();const g={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},_=/%COMP%/g;function y(e,t,n){for(let i=0;i<t.length;i++){let r=t[i];Array.isArray(r)?y(e,r,n):(r=r.replace(_,e),n.push(r))}return n}function v(e){return t=>{if("__ngUnwrap__"===t)return e;!1===e(t)&&(t.preventDefault(),t.returnValue=!1)}}let w=(()=>{class e{constructor(e,t,n){this.eventManager=e,this.sharedStylesHost=t,this.appId=n,this.rendererByCompId=new Map,this.defaultRenderer=new S(e)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;switch(t.encapsulation){case r.Q.Emulated:{let n=this.rendererByCompId.get(t.id);return n||(n=new M(this.eventManager,this.sharedStylesHost,t,this.appId),this.rendererByCompId.set(t.id,n)),n.applyToHost(e),n}case r.Q.Native:case r.Q.ShadowDom:return new k(this.eventManager,this.sharedStylesHost,e,t);default:if(!this.rendererByCompId.has(t.id)){const e=y(t.id,t.styles,[]);this.sharedStylesHost.addStyles(e),this.rendererByCompId.set(t.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return e.\u0275fac=function(t){return new(t||e)(r.dc(f),r.dc(b),r.dc(r.c))},e.\u0275prov=r.Ib({token:e,factory:e.\u0275fac}),e})();class S{constructor(e){this.eventManager=e,this.data=Object.create(null)}destroy(){}createElement(e,t){return t?document.createElementNS(g[t]||t,e):document.createElement(e)}createComment(e){return document.createComment(e)}createText(e){return document.createTextNode(e)}appendChild(e,t){e.appendChild(t)}insertBefore(e,t,n){e&&e.insertBefore(t,n)}removeChild(e,t){e&&e.removeChild(t)}selectRootElement(e,t){let n="string"==typeof e?document.querySelector(e):e;if(!n)throw new Error(`The selector "${e}" did not match any elements`);return t||(n.textContent=""),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,i){if(i){t=i+":"+t;const r=g[i];r?e.setAttributeNS(r,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){const i=g[n];i?e.removeAttributeNS(i,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,i){i&r.G.DashCase?e.style.setProperty(t,n,i&r.G.Important?"important":""):e.style[t]=n}removeStyle(e,t,n){n&r.G.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,n){e[t]=n}setValue(e,t){e.nodeValue=t}listen(e,t,n){return"string"==typeof e?this.eventManager.addGlobalEventListener(e,t,v(n)):this.eventManager.addEventListener(e,t,v(n))}}class M extends S{constructor(e,t,n,i){super(e),this.component=n;const r=y(i+"-"+n.id,n.styles,[]);t.addStyles(r),this.contentAttr="_ngcontent-%COMP%".replace(_,i+"-"+n.id),this.hostAttr="_nghost-%COMP%".replace(_,i+"-"+n.id)}applyToHost(e){super.setAttribute(e,this.hostAttr,"")}createElement(e,t){const n=super.createElement(e,t);return super.setAttribute(n,this.contentAttr,""),n}}class k extends S{constructor(e,t,n,i){super(e),this.sharedStylesHost=t,this.hostEl=n,this.component=i,this.shadowRoot=i.encapsulation===r.Q.ShadowDom?n.attachShadow({mode:"open"}):n.createShadowRoot(),this.sharedStylesHost.addHost(this.shadowRoot);const s=y(i.id,i.styles,[]);for(let r=0;r<s.length;r++){const e=document.createElement("style");e.textContent=s[r],this.shadowRoot.appendChild(e)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,n){return super.insertBefore(this.nodeOrShadowRoot(e),t,n)}removeChild(e,t){return super.removeChild(this.nodeOrShadowRoot(e),t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}}let x=(()=>{class e extends p{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,n){return e.addEventListener(t,n,!1),()=>this.removeEventListener(e,t,n)}removeEventListener(e,t,n){return e.removeEventListener(t,n)}}return e.\u0275fac=function(t){return new(t||e)(r.dc(i.d))},e.\u0275prov=r.Ib({token:e,factory:e.\u0275fac}),e})();const D=["alt","control","meta","shift"],T={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},C={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},O={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey};let L=(()=>{class e extends p{constructor(e){super(e)}supports(t){return null!=e.parseEventName(t)}addEventListener(t,n,r){const s=e.parseEventName(n),o=e.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Object(i.L)().onAndCancel(t,s.domEventName,o))}static parseEventName(t){const n=t.toLowerCase().split("."),i=n.shift();if(0===n.length||"keydown"!==i&&"keyup"!==i)return null;const r=e._normalizeKey(n.pop());let s="";if(D.forEach(e=>{const t=n.indexOf(e);t>-1&&(n.splice(t,1),s+=e+".")}),s+=r,0!=n.length||0===r.length)return null;const o={};return o.domEventName=i,o.fullKey=s,o}static getEventFullKey(e){let t="",n=function(e){let t=e.key;if(null==t){if(t=e.keyIdentifier,null==t)return"Unidentified";t.startsWith("U+")&&(t=String.fromCharCode(parseInt(t.substring(2),16)),3===e.location&&C.hasOwnProperty(t)&&(t=C[t]))}return T[t]||t}(e);return n=n.toLowerCase()," "===n?n="space":"."===n&&(n="dot"),D.forEach(i=>{i!=n&&(0,O[i])(e)&&(t+=i+".")}),t+=n,t}static eventCallback(t,n,i){return r=>{e.getEventFullKey(r)===t&&i.runGuarded(()=>n(r))}}static _normalizeKey(e){switch(e){case"esc":return"escape";default:return e}}}return e.\u0275fac=function(t){return new(t||e)(r.dc(i.d))},e.\u0275prov=r.Ib({token:e,factory:e.\u0275fac}),e})(),R=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(r.Ib)({factory:function(){return Object(r.dc)(A)},token:e,providedIn:"root"}),e})();function E(e){return new A(e.get(i.d))}let A=(()=>{class e extends R{constructor(e){super(),this._doc=e}sanitize(e,t){if(null==t)return null;switch(e){case r.I.NONE:return t;case r.I.HTML:return Object(r.cb)(t,"HTML")?Object(r.ub)(t):Object(r.ab)(this._doc,String(t));case r.I.STYLE:return Object(r.cb)(t,"Style")?Object(r.ub)(t):t;case r.I.SCRIPT:if(Object(r.cb)(t,"Script"))return Object(r.ub)(t);throw new Error("unsafe value used in a script context");case r.I.URL:return Object(r.mb)(t),Object(r.cb)(t,"URL")?Object(r.ub)(t):Object(r.bb)(String(t));case r.I.RESOURCE_URL:if(Object(r.cb)(t,"ResourceURL"))return Object(r.ub)(t);throw new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)");default:throw new Error(`Unexpected SecurityContext ${e} (see http://g.co/ng/security#xss)`)}}bypassSecurityTrustHtml(e){return Object(r.db)(e)}bypassSecurityTrustStyle(e){return Object(r.gb)(e)}bypassSecurityTrustScript(e){return Object(r.fb)(e)}bypassSecurityTrustUrl(e){return Object(r.hb)(e)}bypassSecurityTrustResourceUrl(e){return Object(r.eb)(e)}}return e.\u0275fac=function(t){return new(t||e)(r.dc(i.d))},e.\u0275prov=Object(r.Ib)({factory:function(){return E(Object(r.dc)(r.p))},token:e,providedIn:"root"}),e})();const I=[{provide:r.C,useValue:i.K},{provide:r.D,useValue:function(){o.makeCurrent(),d.init()},multi:!0},{provide:i.d,useFactory:function(){return Object(r.sb)(document),document},deps:[]}],P=Object(r.R)(r.V,"browser",I),N=[[],{provide:r.Y,useValue:"root"},{provide:r.n,useFactory:function(){return new r.n},deps:[]},{provide:h,useClass:x,multi:!0,deps:[i.d,r.A,r.C]},{provide:h,useClass:L,multi:!0,deps:[i.d]},[],{provide:w,useClass:w,deps:[f,b,r.c]},{provide:r.F,useExisting:w},{provide:m,useExisting:b},{provide:b,useClass:b,deps:[i.d]},{provide:r.M,useClass:r.M,deps:[r.A]},{provide:f,useClass:f,deps:[h,r.A]},[]];let j=(()=>{class e{constructor(e){if(e)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}static withServerTransition(t){return{ngModule:e,providers:[{provide:r.c,useValue:t.appId},{provide:l,useExisting:r.c},u]}}}return e.\u0275mod=r.Kb({type:e}),e.\u0275inj=r.Jb({factory:function(t){return new(t||e)(r.dc(e,12))},providers:N,imports:[i.c,r.f]}),e})();const F="undefined"!=typeof window&&window||{};class Y{constructor(e,t){this.msPerTick=e,this.numTicks=t}}class z{constructor(e){this.appRef=e.injector.get(r.g)}timeChangeDetection(e){const t=e&&e.record,n="Change Detection",r=null!=F.console.profile;t&&r&&F.console.profile(n);const s=Object(i.L)().performanceNow();let o=0;for(;o<5||Object(i.L)().performanceNow()-s<500;)this.appRef.tick(),o++;const a=Object(i.L)().performanceNow();t&&r&&F.console.profileEnd(n);const c=(a-s)/o;return F.console.log(`ran ${o} change detection cycles`),F.console.log(c.toFixed(2)+" ms per check"),new Y(c,o)}}function $(e){return"profiler",t=new z(e),"undefined"!=typeof COMPILED&&COMPILED||((r.nb.ng=r.nb.ng||{}).profiler=t),e;var t}},cVYH:function(e,t,n){var i=n("hh1v"),r=n("0rvr");e.exports=function(e,t,n){var s,o;return r&&"function"==typeof(s=t.constructor)&&s!==n&&i(o=s.prototype)&&o!==n.prototype&&r(e,o),e}},cp0P:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i=n("HDdC"),r=n("DH7j"),s=n("lJxs"),o=n("XoHu"),a=n("Cfvw");function c(...e){if(1===e.length){const t=e[0];if(Object(r.a)(t))return l(t,null);if(Object(o.a)(t)&&Object.getPrototypeOf(t)===Object.prototype){const e=Object.keys(t);return l(e.map(e=>t[e]),e)}}if("function"==typeof e[e.length-1]){const t=e.pop();return l(e=1===e.length&&Object(r.a)(e[0])?e[0]:e,null).pipe(Object(s.a)(e=>t(...e)))}return l(e,null)}function l(e,t){return new i.a(n=>{const i=e.length;if(0===i)return void n.complete();const r=new Array(i);let s=0,o=0;for(let c=0;c<i;c++){const l=Object(a.a)(e[c]);let u=!1;n.add(l.subscribe({next:e=>{u||(u=!0,o++),r[c]=e},error:e=>n.error(e),complete:()=>{s++,s!==i&&u||(o===i&&n.next(t?t.reduce((e,t,n)=>(e[t]=r[n],e),{}):r),n.complete())}}))}})}},czMo:function(e,t,n){!function(e){"use strict";e.defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})}(n("wd/R"))},"d+Og":function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i=n("LvDl"),r=n.n(i),s=n("kJI8");let o=(()=>{class e{constructor(e){if(this.type=e,!this.isValidType())throw new Error("Wrong placement group category type");this.setTypeStates()}isValidType(){return e.VALID_CATEGORIES.includes(this.type)}setTypeStates(){switch(this.type){case e.CATEGORY_CLEAN:this.states=["active","clean"];break;case e.CATEGORY_WORKING:this.states=["activating","backfill_wait","backfilling","creating","deep","degraded","forced_backfill","forced_recovery","peering","peered","recovering","recovery_wait","repair","scrubbing","snaptrim","snaptrim_wait"];break;case e.CATEGORY_WARNING:this.states=["backfill_toofull","backfill_unfound","down","incomplete","inconsistent","recovery_toofull","recovery_unfound","remapped","snaptrim_error","stale","undersized"];break;default:this.states=[]}}}return e.CATEGORY_CLEAN="clean",e.CATEGORY_WORKING="working",e.CATEGORY_WARNING="warning",e.CATEGORY_UNKNOWN="unknown",e.VALID_CATEGORIES=[e.CATEGORY_CLEAN,e.CATEGORY_WORKING,e.CATEGORY_WARNING,e.CATEGORY_UNKNOWN],e})();var a=n("8Y7J");let c=(()=>{class e{constructor(){this.categories=this.createCategories()}getAllTypes(){return o.VALID_CATEGORIES}getTypeByStates(e){const t=this.getPgStatesFromText(e);if(0===t.length)return o.CATEGORY_UNKNOWN;const n=r.a.zipObject(o.VALID_CATEGORIES,o.VALID_CATEGORIES.map(e=>r.a.intersection(this.categories[e].states,t).length));if(n[o.CATEGORY_WARNING]>0)return o.CATEGORY_WARNING;const i=n[o.CATEGORY_WORKING];return t.length>n[o.CATEGORY_CLEAN]+i?o.CATEGORY_UNKNOWN:i?o.CATEGORY_WORKING:o.CATEGORY_CLEAN}createCategories(){return r.a.zipObject(o.VALID_CATEGORIES,o.VALID_CATEGORIES.map(e=>new o(e)))}getPgStatesFromText(e){const t=e.replace(/[^a-z]+/g," ").trim().split(" ");return r.a.uniq(t)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=a.Ib({token:e,factory:e.\u0275fac,providedIn:s.a}),e})()},"dBg+":function(e,t){t.f=Object.getOwnPropertySymbols},dEH0:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("8Y7J");let r=(()=>{class e{transform(e){return e+" ms"}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"milliseconds",type:e,pure:!0}),e})()},dNwA:function(e,t,n){!function(e){"use strict";e.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"hh:mm A",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"siku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}})}(n("wd/R"))},dgut:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var i=n("NEZu"),r=n("Fgil"),s=n("8Y7J"),o=n("SVse"),a=n("hrfs");const c=["sparkCanvas"],l=["sparkTooltip"];let u=(()=>{class e{constructor(e){this.dimlessBinaryPipe=e,this.style={height:"30px",width:"100px"},this.colors=[{backgroundColor:"rgba(40,140,234,0.2)",borderColor:"rgba(40,140,234,1)",pointBackgroundColor:"rgba(40,140,234,1)",pointBorderColor:"#fff",pointHoverBackgroundColor:"#fff",pointHoverBorderColor:"rgba(40,140,234,0.8)"}],this.options={animation:{duration:0},responsive:!0,maintainAspectRatio:!1,legend:{display:!1},elements:{line:{borderWidth:1}},tooltips:{enabled:!1,mode:"index",intersect:!1,custom:void 0,callbacks:{label:e=>this.isBinary?this.dimlessBinaryPipe.transform(e.yLabel):e.yLabel,title:()=>""}},scales:{yAxes:[{display:!1}],xAxes:[{display:!1}]}},this.datasets=[{data:[]}],this.labels=[]}ngOnInit(){const e=new i.a(this.chartCanvasRef,this.chartTooltipRef,(e,t)=>t+e.caretX+"px",e=>e.caretY-e.height-e.yPadding-5+"px");e.customColors={backgroundColor:this.colors[0].pointBackgroundColor,borderColor:this.colors[0].pointBorderColor},this.options.tooltips.custom=t=>{e.customTooltips(t)}}ngOnChanges(e){this.datasets[0].data=e.data.currentValue,this.labels=[...Array(e.data.currentValue.length)]}}return e.\u0275fac=function(t){return new(t||e)(s.Mb(r.a))},e.\u0275cmp=s.Gb({type:e,selectors:[["cd-sparkline"]],viewQuery:function(e,t){var n;1&e&&(s.Jc(c,!0),s.Jc(l,!0)),2&e&&(s.zc(n=s.hc())&&(t.chartCanvasRef=n.first),s.zc(n=s.hc())&&(t.chartTooltipRef=n.first))},inputs:{data:"data",style:"style",isBinary:"isBinary"},features:[s.wb],decls:6,vars:6,consts:[[1,"chart-container",3,"ngStyle"],["baseChart","",3,"labels","datasets","options","colors","chartType"],["sparkCanvas",""],[1,"chartjs-tooltip"],["sparkTooltip",""]],template:function(e,t){1&e&&(s.Sb(0,"div",0),s.Nb(1,"canvas",1,2),s.Sb(3,"div",3,4),s.Nb(5,"table"),s.Rb(),s.Rb()),2&e&&(s.pc("ngStyle",t.style),s.yb(1),s.pc("labels",t.labels)("datasets",t.datasets)("options",t.options)("colors",t.colors)("chartType","line"))},directives:[o.s,a.a],styles:['.chart-container[_ngcontent-%COMP%]{cursor:pointer;margin:auto;overflow:visible;position:absolute}canvas[_ngcontent-%COMP%]{user-select:none}.chartjs-tooltip[_ngcontent-%COMP%]{background:rgba(0,0,0,.7);border-radius:3px;color:#fff;font-family:Helvetica Neue,Helvetica,Arial,sans-serif!important;opacity:0;pointer-events:none;position:absolute;transform:translate(-50%);transition:all .1s ease}.chartjs-tooltip.transform-left[_ngcontent-%COMP%]{transform:translate(-10%)}.chartjs-tooltip.transform-left[_ngcontent-%COMP%]:after{left:10%}.chartjs-tooltip.transform-right[_ngcontent-%COMP%]{transform:translate(-90%)}.chartjs-tooltip.transform-right[_ngcontent-%COMP%]:after{left:90%}.chartjs-tooltip[_ngcontent-%COMP%]:after{border:5px solid transparent;border-top-color:#000;content:" ";left:50%;margin-left:-5px;position:absolute;top:100%} .chartjs-tooltip-key{display:inline-block;height:10px;margin-right:10px;width:10px}.chart-container[_ngcontent-%COMP%]{position:static!important}']}),e})()},"e+ae":function(e,t,n){!function(e){"use strict";var t="janu\xe1r_febru\xe1r_marec_apr\xedl_m\xe1j_j\xfan_j\xfal_august_september_okt\xf3ber_november_december".split("_"),n="jan_feb_mar_apr_m\xe1j_j\xfan_j\xfal_aug_sep_okt_nov_dec".split("_");function i(e){return e>1&&e<5}function r(e,t,n,r){var s=e+" ";switch(n){case"s":return t||r?"p\xe1r sek\xfand":"p\xe1r sekundami";case"ss":return t||r?s+(i(e)?"sekundy":"sek\xfand"):s+"sekundami";case"m":return t?"min\xfata":r?"min\xfatu":"min\xfatou";case"mm":return t||r?s+(i(e)?"min\xfaty":"min\xfat"):s+"min\xfatami";case"h":return t?"hodina":r?"hodinu":"hodinou";case"hh":return t||r?s+(i(e)?"hodiny":"hod\xedn"):s+"hodinami";case"d":return t||r?"de\u0148":"d\u0148om";case"dd":return t||r?s+(i(e)?"dni":"dn\xed"):s+"d\u0148ami";case"M":return t||r?"mesiac":"mesiacom";case"MM":return t||r?s+(i(e)?"mesiace":"mesiacov"):s+"mesiacmi";case"y":return t||r?"rok":"rokom";case"yy":return t||r?s+(i(e)?"roky":"rokov"):s+"rokmi"}}e.defineLocale("sk",{months:t,monthsShort:n,weekdays:"nede\u013ea_pondelok_utorok_streda_\u0161tvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_\u0161t_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_\u0161t_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nede\u013eu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo \u0161tvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[v\u010dera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minul\xfa nede\u013eu o] LT";case 1:case 2:return"[minul\xfd] dddd [o] LT";case 3:return"[minul\xfa stredu o] LT";case 4:case 5:return"[minul\xfd] dddd [o] LT";case 6:return"[minul\xfa sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},e0ae:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var i=function(e,t,n){this.name=e,this.version=t,this.os=n,this.type="browser"},r=function(e){this.version=e,this.type="node",this.name="node",this.os=process.platform},s=function(e,t,n,i){this.name=e,this.version=t,this.os=n,this.bot=i,this.type="bot-device"},o=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},a=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},c=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,l=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],u=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function d(e){return e?h(e):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new a:"undefined"!=typeof navigator?h(navigator.userAgent):"undefined"!=typeof process&&process.version?new r(process.version.slice(1)):null}function h(e){var t=function(e){return""!==e&&l.reduce((function(t,n){var i=n[0];if(t)return t;var r=n[1].exec(e);return!!r&&[i,r]}),!1)}(e);if(!t)return null;var n=t[0],r=t[1];if("searchbot"===n)return new o;var a=r[1]&&r[1].split(/[._]/).slice(0,3);a?a.length<3&&(a=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),r=0;for(t=0;t<n;t++)for(var s=arguments[t],o=0,a=s.length;o<a;o++,r++)i[r]=s[o];return i}(a,function(e){for(var t=[],n=0;n<e;n++)t.push("0");return t}(3-a.length))):a=[];var d=a.join("."),h=function(e){for(var t=0,n=u.length;t<n;t++){var i=u[t],r=i[0];if(i[1].exec(e))return r}return null}(e),f=c.exec(e);return f&&f[1]?new s(n,d,h,f[1]):new i(n,d,h)}},e2NH:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));class i{constructor(e="light",t=""){this.type=e,this.msg=t}}},"eDl+":function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},eIep:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("lJxs"),r=n("Cfvw"),s=n("zx2A");function o(e,t){return"function"==typeof t?n=>n.pipe(o((n,s)=>Object(r.a)(e(n,s)).pipe(Object(i.a)((e,i)=>t(n,e,s,i))))):t=>t.lift(new a(e))}class a{constructor(e){this.project=e}call(e,t){return t.subscribe(new c(e,this.project))}}class c extends s.b{constructor(e,t){super(e),this.project=t,this.index=0}_next(e){let t;const n=this.index++;try{t=this.project(e,n)}catch(i){return void this.destination.error(i)}this._innerSub(t)}_innerSub(e){const t=this.innerSubscription;t&&t.unsubscribe();const n=new s.a(this),i=this.destination;i.add(n),this.innerSubscription=Object(s.c)(e,n),this.innerSubscription!==n&&i.add(this.innerSubscription)}_complete(){const{innerSubscription:e}=this;e&&!e.closed||super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(e){this.destination.next(e)}}},efK2:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("LvDl"),r=n.n(i),s=n("8Y7J");let o=(()=>{class e{transform(e,t,n){return r.a.isString(e)?(n=r.a.defaultTo(n,""),r.a.truncate(e,{length:t,omission:n})):e}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=s.Lb({name:"truncate",type:e,pure:!0}),e})()},"ej+x":function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("lOp/"),r=n("8Y7J"),s=n("IheW");let o=(()=>{class e{constructor(e,t){this.http=e,this.timerService=t,this.API_URL="api/feature_toggles",this.REFRESH_INTERVAL=3e4,this.featureToggleMap$=this.timerService.get(()=>this.http.get(this.API_URL),this.REFRESH_INTERVAL)}get(){return this.featureToggleMap$}}return e.\u0275fac=function(t){return new(t||e)(r.dc(s.b),r.dc(i.a))},e.\u0275prov=r.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},ewvW:function(e,t,n){var i=n("HYAF");e.exports=function(e){return Object(i(e))}},"f/UV":function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("8Y7J");let r=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=i.Hb({type:e,selectors:[["","cdFormScope",""]],inputs:{cdFormScope:"cdFormScope"}}),e})()},f5p1:function(e,t,n){var i=n("2oRo"),r=n("iSVu"),s=i.WeakMap;e.exports="function"==typeof s&&/native code/.test(r(s))},f69J:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("8Y7J"),r=n("s7LF");let s=(()=>{class e{constructor(e){this.parent=e}get validClass(){return!!this.control&&this.control.valid&&(this.control.touched||this.control.dirty)}get invalidClass(){return!!this.control&&this.control.invalid&&this.control.touched&&this.control.dirty}get path(){return[...this.parent.path,this.formControlName]}get control(){return this.formDirective&&this.formDirective.getControl(this)}get formDirective(){return this.parent?this.parent.formDirective:null}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(r.c,13))},e.\u0275dir=i.Hb({type:e,selectors:[["",8,"form-control"],["",8,"form-check-input"],["",8,"custom-control-input"]],hostVars:4,hostBindings:function(e,t){2&e&&i.Eb("is-valid",t.validClass)("is-invalid",t.invalidClass)},inputs:{formControlName:"formControlName",formControl:"formControl"}}),e})()},fHMY:function(e,t,n){var i,r=n("glrk"),s=n("N+g0"),o=n("eDl+"),a=n("0BK2"),c=n("G+Rx"),l=n("zBJ4"),u=n("93I0")("IE_PROTO"),d=function(){},h=function(e){return"<script>"+e+"<\/script>"},f=function(){try{i=document.domain&&new ActiveXObject("htmlfile")}catch(r){}var e,t;f=i?function(e){e.write(h("")),e.close();var t=e.parentWindow.Object;return e=null,t}(i):((t=l("iframe")).style.display="none",c.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(h("document.F=Object")),e.close(),e.F);for(var n=o.length;n--;)delete f.prototype[o[n]];return f()};a[u]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(d.prototype=r(e),n=new d,d.prototype=null,n[u]=e):n=f(),void 0===t?n:s(n,t)}},fdAy:function(e,t,n){"use strict";var i=n("I+eb"),r=n("ntOU"),s=n("4WOD"),o=n("0rvr"),a=n("1E5z"),c=n("kRJp"),l=n("busE"),u=n("tiKp"),d=n("xDBR"),h=n("P4y1"),f=n("rpNk"),p=f.IteratorPrototype,m=f.BUGGY_SAFARI_ITERATORS,b=u("iterator"),g="keys",_="values",y="entries",v=function(){return this};e.exports=function(e,t,n,u,f,w,S){r(n,t,u);var M,k,x,D=function(e){if(e===f&&R)return R;if(!m&&e in O)return O[e];switch(e){case g:case _:case y:return function(){return new n(this,e)}}return function(){return new n(this)}},T=t+" Iterator",C=!1,O=e.prototype,L=O[b]||O["@@iterator"]||f&&O[f],R=!m&&L||D(f),E="Array"==t&&O.entries||L;if(E&&(M=s(E.call(new e)),p!==Object.prototype&&M.next&&(d||s(M)===p||(o?o(M,p):"function"!=typeof M[b]&&c(M,b,v)),a(M,T,!0,!0),d&&(h[T]=v))),f==_&&L&&L.name!==_&&(C=!0,R=function(){return L.call(this)}),d&&!S||O[b]===R||c(O,b,R),h[t]=R,f)if(k={values:D(_),keys:w?R:D(g),entries:D(y)},S)for(x in k)(m||C||!(x in O))&&l(O,x,k[x]);else i({target:t,proto:!0,forced:m||C},k);return k}},fzPg:function(e,t,n){!function(e){"use strict";e.defineLocale("yo",{months:"S\u1eb9\u0301r\u1eb9\u0301_E\u0300re\u0300le\u0300_\u1eb8r\u1eb9\u0300na\u0300_I\u0300gbe\u0301_E\u0300bibi_O\u0300ku\u0300du_Ag\u1eb9mo_O\u0300gu\u0301n_Owewe_\u1ecc\u0300wa\u0300ra\u0300_Be\u0301lu\u0301_\u1ecc\u0300p\u1eb9\u0300\u0300".split("_"),monthsShort:"S\u1eb9\u0301r_E\u0300rl_\u1eb8rn_I\u0300gb_E\u0300bi_O\u0300ku\u0300_Ag\u1eb9_O\u0300gu\u0301_Owe_\u1ecc\u0300wa\u0300_Be\u0301l_\u1ecc\u0300p\u1eb9\u0300\u0300".split("_"),weekdays:"A\u0300i\u0300ku\u0301_Aje\u0301_I\u0300s\u1eb9\u0301gun_\u1eccj\u1ecd\u0301ru\u0301_\u1eccj\u1ecd\u0301b\u1ecd_\u1eb8ti\u0300_A\u0300ba\u0301m\u1eb9\u0301ta".split("_"),weekdaysShort:"A\u0300i\u0300k_Aje\u0301_I\u0300s\u1eb9\u0301_\u1eccjr_\u1eccjb_\u1eb8ti\u0300_A\u0300ba\u0301".split("_"),weekdaysMin:"A\u0300i\u0300_Aj_I\u0300s_\u1eccr_\u1eccb_\u1eb8t_A\u0300b".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[O\u0300ni\u0300 ni] LT",nextDay:"[\u1ecc\u0300la ni] LT",nextWeek:"dddd [\u1eccs\u1eb9\u0300 to\u0301n'b\u1ecd] [ni] LT",lastDay:"[A\u0300na ni] LT",lastWeek:"dddd [\u1eccs\u1eb9\u0300 to\u0301l\u1ecd\u0301] [ni] LT",sameElse:"L"},relativeTime:{future:"ni\u0301 %s",past:"%s k\u1ecdja\u0301",s:"i\u0300s\u1eb9ju\u0301 aaya\u0301 die",ss:"aaya\u0301 %d",m:"i\u0300s\u1eb9ju\u0301 kan",mm:"i\u0300s\u1eb9ju\u0301 %d",h:"wa\u0301kati kan",hh:"wa\u0301kati %d",d:"\u1ecdj\u1ecd\u0301 kan",dd:"\u1ecdj\u1ecd\u0301 %d",M:"osu\u0300 kan",MM:"osu\u0300 %d",y:"\u1ecddu\u0301n kan",yy:"\u1ecddu\u0301n %d"},dayOfMonthOrdinalParse:/\u1ecdj\u1ecd\u0301\s\d{1,2}/,ordinal:"\u1ecdj\u1ecd\u0301 %d",week:{dow:1,doy:4}})}(n("wd/R"))},"g6v/":function(e,t,n){var i=n("0Dky");e.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},gRHU:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("2fFW"),r=n("NJ4a");const s={closed:!0,next(e){},error(e){if(i.a.useDeprecatedSynchronousErrorHandling)throw e;Object(r.a)(e)},complete(){}}},gVVK:function(e,t,n){!function(e){"use strict";function t(e,t,n,i){var r=e+" ";switch(n){case"s":return t||i?"nekaj sekund":"nekaj sekundami";case"ss":return r+(1===e?t?"sekundo":"sekundi":2===e?t||i?"sekundi":"sekundah":e<5?t||i?"sekunde":"sekundah":"sekund");case"m":return t?"ena minuta":"eno minuto";case"mm":return r+(1===e?t?"minuta":"minuto":2===e?t||i?"minuti":"minutama":e<5?t||i?"minute":"minutami":t||i?"minut":"minutami");case"h":return t?"ena ura":"eno uro";case"hh":return r+(1===e?t?"ura":"uro":2===e?t||i?"uri":"urama":e<5?t||i?"ure":"urami":t||i?"ur":"urami");case"d":return t||i?"en dan":"enim dnem";case"dd":return r+(1===e?t||i?"dan":"dnem":2===e?t||i?"dni":"dnevoma":t||i?"dni":"dnevi");case"M":return t||i?"en mesec":"enim mesecem";case"MM":return r+(1===e?t||i?"mesec":"mesecem":2===e?t||i?"meseca":"mesecema":e<5?t||i?"mesece":"meseci":t||i?"mesecev":"meseci");case"y":return t||i?"eno leto":"enim letom";case"yy":return r+(1===e?t||i?"leto":"letom":2===e?t||i?"leti":"letoma":e<5?t||i?"leta":"leti":t||i?"let":"leti")}}e.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_\u010detrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._\u010det._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_\u010de_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[v\u010deraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prej\u0161njo] [nedeljo] [ob] LT";case 3:return"[prej\u0161njo] [sredo] [ob] LT";case 6:return"[prej\u0161njo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prej\u0161nji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"\u010dez %s",past:"pred %s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n("wd/R"))},gekB:function(e,t,n){!function(e){"use strict";var t="nolla yksi kaksi kolme nelj\xe4 viisi kuusi seitsem\xe4n kahdeksan yhdeks\xe4n".split(" "),n=["nolla","yhden","kahden","kolmen","nelj\xe4n","viiden","kuuden",t[7],t[8],t[9]];function i(e,i,r,s){var o="";switch(r){case"s":return s?"muutaman sekunnin":"muutama sekunti";case"ss":o=s?"sekunnin":"sekuntia";break;case"m":return s?"minuutin":"minuutti";case"mm":o=s?"minuutin":"minuuttia";break;case"h":return s?"tunnin":"tunti";case"hh":o=s?"tunnin":"tuntia";break;case"d":return s?"p\xe4iv\xe4n":"p\xe4iv\xe4";case"dd":o=s?"p\xe4iv\xe4n":"p\xe4iv\xe4\xe4";break;case"M":return s?"kuukauden":"kuukausi";case"MM":o=s?"kuukauden":"kuukautta";break;case"y":return s?"vuoden":"vuosi";case"yy":o=s?"vuoden":"vuotta"}return function(e,i){return e<10?i?n[e]:t[e]:e}(e,s)+" "+o}e.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kes\xe4kuu_hein\xe4kuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kes\xe4_hein\xe4_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[t\xe4n\xe4\xe4n] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s p\xe4\xe4st\xe4",past:"%s sitten",s:i,ss:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},gjCT:function(e,t,n){!function(e){"use strict";var t={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},n={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"};e.defineLocale("ar-sa",{months:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a\u0648_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648_\u0623\u063a\u0633\u0637\u0633_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),monthsShort:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a\u0648_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648_\u0623\u063a\u0633\u0637\u0633_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,t,n){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},preparse:function(e){return e.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,(function(e){return n[e]})).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"\u060c")},week:{dow:0,doy:6}})}(n("wd/R"))},glrk:function(e,t,n){var i=n("hh1v");e.exports=function(e){if(!i(e))throw TypeError(String(e)+" is not an object");return e}},"hKI/":function(e,t){var n="Expected a function",i=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,c="object"==typeof global&&global&&global.Object===Object&&global,l="object"==typeof self&&self&&self.Object===Object&&self,u=c||l||Function("return this")(),d=Object.prototype.toString,h=Math.max,f=Math.min,p=function(){return u.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function b(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(i,"");var n=s.test(e);return n||o.test(e)?a(e.slice(2),n?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,i){var r=!0,s=!0;if("function"!=typeof e)throw new TypeError(n);return m(i)&&(r="leading"in i?!!i.leading:r,s="trailing"in i?!!i.trailing:s),function(e,t,i){var r,s,o,a,c,l,u=0,d=!1,g=!1,_=!0;if("function"!=typeof e)throw new TypeError(n);function y(t){var n=r,i=s;return r=s=void 0,u=t,a=e.apply(i,n)}function v(e){return u=e,c=setTimeout(S,t),d?y(e):a}function w(e){var n=e-l;return void 0===l||n>=t||n<0||g&&e-u>=o}function S(){var e=p();if(w(e))return M(e);c=setTimeout(S,function(e){var n=t-(e-l);return g?f(n,o-(e-u)):n}(e))}function M(e){return c=void 0,_&&r?y(e):(r=s=void 0,a)}function k(){var e=p(),n=w(e);if(r=arguments,s=this,l=e,n){if(void 0===c)return v(l);if(g)return c=setTimeout(S,t),y(l)}return void 0===c&&(c=setTimeout(S,t)),a}return t=b(t)||0,m(i)&&(d=!!i.leading,o=(g="maxWait"in i)?h(b(i.maxWait)||0,t):o,_="trailing"in i?!!i.trailing:_),k.cancel=function(){void 0!==c&&clearTimeout(c),u=0,r=l=s=c=void 0},k.flush=function(){return void 0===c?a:M(p())},k}(e,t,{leading:r,maxWait:t,trailing:s})}},hKrs:function(e,t,n){!function(e){"use strict";e.defineLocale("bg",{months:"\u044f\u043d\u0443\u0430\u0440\u0438_\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0438\u043b_\u043c\u0430\u0439_\u044e\u043d\u0438_\u044e\u043b\u0438_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438_\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438_\u043d\u043e\u0435\u043c\u0432\u0440\u0438_\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438".split("_"),monthsShort:"\u044f\u043d\u0443_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0439_\u044e\u043d\u0438_\u044e\u043b\u0438_\u0430\u0432\u0433_\u0441\u0435\u043f_\u043e\u043a\u0442_\u043d\u043e\u0435_\u0434\u0435\u043a".split("_"),weekdays:"\u043d\u0435\u0434\u0435\u043b\u044f_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u044f\u0434\u0430_\u0447\u0435\u0442\u0432\u044a\u0440\u0442\u044a\u043a_\u043f\u0435\u0442\u044a\u043a_\u0441\u044a\u0431\u043e\u0442\u0430".split("_"),weekdaysShort:"\u043d\u0435\u0434_\u043f\u043e\u043d_\u0432\u0442\u043e_\u0441\u0440\u044f_\u0447\u0435\u0442_\u043f\u0435\u0442_\u0441\u044a\u0431".split("_"),weekdaysMin:"\u043d\u0434_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[\u0414\u043d\u0435\u0441 \u0432] LT",nextDay:"[\u0423\u0442\u0440\u0435 \u0432] LT",nextWeek:"dddd [\u0432] LT",lastDay:"[\u0412\u0447\u0435\u0440\u0430 \u0432] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[\u041c\u0438\u043d\u0430\u043b\u0430\u0442\u0430] dddd [\u0432] LT";case 1:case 2:case 4:case 5:return"[\u041c\u0438\u043d\u0430\u043b\u0438\u044f] dddd [\u0432] LT"}},sameElse:"L"},relativeTime:{future:"\u0441\u043b\u0435\u0434 %s",past:"\u043f\u0440\u0435\u0434\u0438 %s",s:"\u043d\u044f\u043a\u043e\u043b\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434\u0438",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434\u0438",m:"\u043c\u0438\u043d\u0443\u0442\u0430",mm:"%d \u043c\u0438\u043d\u0443\u0442\u0438",h:"\u0447\u0430\u0441",hh:"%d \u0447\u0430\u0441\u0430",d:"\u0434\u0435\u043d",dd:"%d \u0434\u0435\u043d\u0430",w:"\u0441\u0435\u0434\u043c\u0438\u0446\u0430",ww:"%d \u0441\u0435\u0434\u043c\u0438\u0446\u0438",M:"\u043c\u0435\u0441\u0435\u0446",MM:"%d \u043c\u0435\u0441\u0435\u0446\u0430",y:"\u0433\u043e\u0434\u0438\u043d\u0430",yy:"%d \u0433\u043e\u0434\u0438\u043d\u0438"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0435\u0432|\u0435\u043d|\u0442\u0438|\u0432\u0438|\u0440\u0438|\u043c\u0438)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-\u0435\u0432":0===n?e+"-\u0435\u043d":n>10&&n<20?e+"-\u0442\u0438":1===t?e+"-\u0432\u0438":2===t?e+"-\u0440\u0438":7===t||8===t?e+"-\u043c\u0438":e+"-\u0442\u0438"},week:{dow:1,doy:7}})}(n("wd/R"))},hh1v:function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},honF:function(e,t,n){!function(e){"use strict";var t={1:"\u1041",2:"\u1042",3:"\u1043",4:"\u1044",5:"\u1045",6:"\u1046",7:"\u1047",8:"\u1048",9:"\u1049",0:"\u1040"},n={"\u1041":"1","\u1042":"2","\u1043":"3","\u1044":"4","\u1045":"5","\u1046":"6","\u1047":"7","\u1048":"8","\u1049":"9","\u1040":"0"};e.defineLocale("my",{months:"\u1007\u1014\u103a\u1014\u101d\u102b\u101b\u102e_\u1016\u1031\u1016\u1031\u102c\u103a\u101d\u102b\u101b\u102e_\u1019\u1010\u103a_\u1027\u1015\u103c\u102e_\u1019\u1031_\u1007\u103d\u1014\u103a_\u1007\u1030\u101c\u102d\u102f\u1004\u103a_\u101e\u103c\u1002\u102f\u1010\u103a_\u1005\u1000\u103a\u1010\u1004\u103a\u1018\u102c_\u1021\u1031\u102c\u1000\u103a\u1010\u102d\u102f\u1018\u102c_\u1014\u102d\u102f\u101d\u1004\u103a\u1018\u102c_\u1012\u102e\u1007\u1004\u103a\u1018\u102c".split("_"),monthsShort:"\u1007\u1014\u103a_\u1016\u1031_\u1019\u1010\u103a_\u1015\u103c\u102e_\u1019\u1031_\u1007\u103d\u1014\u103a_\u101c\u102d\u102f\u1004\u103a_\u101e\u103c_\u1005\u1000\u103a_\u1021\u1031\u102c\u1000\u103a_\u1014\u102d\u102f_\u1012\u102e".split("_"),weekdays:"\u1010\u1014\u1004\u103a\u1039\u1002\u1014\u103d\u1031_\u1010\u1014\u1004\u103a\u1039\u101c\u102c_\u1021\u1004\u103a\u1039\u1002\u102b_\u1017\u102f\u1012\u1039\u1013\u101f\u1030\u1038_\u1000\u103c\u102c\u101e\u1015\u1010\u1031\u1038_\u101e\u1031\u102c\u1000\u103c\u102c_\u1005\u1014\u1031".split("_"),weekdaysShort:"\u1014\u103d\u1031_\u101c\u102c_\u1002\u102b_\u101f\u1030\u1038_\u1000\u103c\u102c_\u101e\u1031\u102c_\u1014\u1031".split("_"),weekdaysMin:"\u1014\u103d\u1031_\u101c\u102c_\u1002\u102b_\u101f\u1030\u1038_\u1000\u103c\u102c_\u101e\u1031\u102c_\u1014\u1031".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u101a\u1014\u1031.] LT [\u1019\u103e\u102c]",nextDay:"[\u1019\u1014\u1000\u103a\u1016\u103c\u1014\u103a] LT [\u1019\u103e\u102c]",nextWeek:"dddd LT [\u1019\u103e\u102c]",lastDay:"[\u1019\u1014\u1031.\u1000] LT [\u1019\u103e\u102c]",lastWeek:"[\u1015\u103c\u102e\u1038\u1001\u1032\u1037\u101e\u1031\u102c] dddd LT [\u1019\u103e\u102c]",sameElse:"L"},relativeTime:{future:"\u101c\u102c\u1019\u100a\u103a\u1037 %s \u1019\u103e\u102c",past:"\u101c\u103d\u1014\u103a\u1001\u1032\u1037\u101e\u1031\u102c %s \u1000",s:"\u1005\u1000\u1039\u1000\u1014\u103a.\u1021\u1014\u100a\u103a\u1038\u1004\u101a\u103a",ss:"%d \u1005\u1000\u1039\u1000\u1014\u1037\u103a",m:"\u1010\u1005\u103a\u1019\u102d\u1014\u1005\u103a",mm:"%d \u1019\u102d\u1014\u1005\u103a",h:"\u1010\u1005\u103a\u1014\u102c\u101b\u102e",hh:"%d \u1014\u102c\u101b\u102e",d:"\u1010\u1005\u103a\u101b\u1000\u103a",dd:"%d \u101b\u1000\u103a",M:"\u1010\u1005\u103a\u101c",MM:"%d \u101c",y:"\u1010\u1005\u103a\u1014\u103e\u1005\u103a",yy:"%d \u1014\u103e\u1005\u103a"},preparse:function(e){return e.replace(/[\u1041\u1042\u1043\u1044\u1045\u1046\u1047\u1048\u1049\u1040]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}})}(n("wd/R"))},hrfs:function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return g}));var i=n("8Y7J"),r=n("MO+k"),s=n("2Vo4"),o=n("LvDl");const a=[[255,99,132],[54,162,235],[255,206,86],[231,233,237],[75,192,192],[151,187,205],[220,220,220],[247,70,74],[70,191,189],[253,180,92],[148,159,177],[77,83,96]];function c(e,t){return"rgba("+e.concat(t).join(",")+")"}function l(e,t){return Math.floor(Math.random()*(t-e+1))+e}function u(e){return{backgroundColor:e.map(e=>c(e,.6)),borderColor:e.map(()=>"#fff"),pointBackgroundColor:e.map(e=>c(e,1)),pointBorderColor:e.map(()=>"#fff"),pointHoverBackgroundColor:e.map(e=>c(e,1)),pointHoverBorderColor:e.map(e=>c(e,1))}}function d(){return[l(0,255),l(0,255),l(0,255)]}function h(e){return a[e]||d()}function f(e){const t=new Array(e);for(let n=0;n<e;n++)t[n]=a[n]||d();return t}let p=(()=>{class e{constructor(){this.pColorschemesOptions={},this.colorschemesOptions=new s.a({})}setColorschemesOptions(e){this.pColorschemesOptions=e,this.colorschemesOptions.next(e)}getColorschemesOptions(){return this.pColorschemesOptions}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e.ngInjectableDef=Object(i.Ib)({factory:function(){return new e},token:e,providedIn:"root"}),e})();const m=function(){var e={Default:0,Update:1,Refresh:2};return e[e.Default]="Default",e[e.Update]="Update",e[e.Refresh]="Refresh",e}();let b=(()=>{class e{constructor(e,t){this.element=e,this.themeService=t,this.options={},this.chartClick=new i.o,this.chartHover=new i.o,this.old={dataExists:!1,dataLength:0,datasetsExists:!1,datasetsLength:0,datasetsDataObjects:[],datasetsDataLengths:[],colorsExists:!1,colors:[],labelsExist:!1,labels:[],legendExists:!1,legend:{}},this.subs=[]}static registerPlugin(e){r.Chart.plugins.register(e)}static unregisterPlugin(e){r.Chart.plugins.unregister(e)}ngOnInit(){this.ctx=this.element.nativeElement.getContext("2d"),this.refresh(),this.subs.push(this.themeService.colorschemesOptions.subscribe(e=>this.themeChanged(e)))}themeChanged(e){this.refresh()}ngDoCheck(){if(!this.chart)return;let e=m.Default;const t=t=>{e=t>e?t:e};switch(!!this.data!==this.old.dataExists&&(this.propagateDataToDatasets(this.data),this.old.dataExists=!!this.data,t(m.Update)),this.data&&this.data.length!==this.old.dataLength&&(this.old.dataLength=this.data&&this.data.length||0,t(m.Update)),!!this.datasets!==this.old.datasetsExists&&(this.old.datasetsExists=!!this.datasets,t(m.Update)),this.datasets&&this.datasets.length!==this.old.datasetsLength&&(this.old.datasetsLength=this.datasets&&this.datasets.length||0,t(m.Update)),this.datasets&&this.datasets.filter((e,t)=>e.data!==this.old.datasetsDataObjects[t]).length&&(this.old.datasetsDataObjects=this.datasets.map(e=>e.data),t(m.Update)),this.datasets&&this.datasets.filter((e,t)=>e.data.length!==this.old.datasetsDataLengths[t]).length&&(this.old.datasetsDataLengths=this.datasets.map(e=>e.data.length),t(m.Update)),!!this.colors!==this.old.colorsExists&&(this.old.colorsExists=!!this.colors,this.updateColors(),t(m.Update)),this.colors&&this.colors.filter((e,t)=>!this.colorsEqual(e,this.old.colors[t])).length&&(this.old.colors=this.colors.map(e=>this.copyColor(e)),this.updateColors(),t(m.Update)),!!this.labels!==this.old.labelsExist&&(this.old.labelsExist=!!this.labels,t(m.Update)),this.labels&&this.labels.filter((e,t)=>!this.labelsEqual(e,this.old.labels[t])).length&&(this.old.labels=this.labels.map(e=>this.copyLabel(e)),t(m.Update)),!!this.options.legend!==this.old.legendExists&&(this.old.legendExists=!!this.options.legend,t(m.Refresh)),this.options.legend&&this.options.legend.position!==this.old.legend.position&&(this.old.legend.position=this.options.legend.position,t(m.Refresh)),e){case m.Default:break;case m.Update:this.update();break;case m.Refresh:this.refresh()}}copyLabel(e){return Array.isArray(e)?[...e]:e}labelsEqual(e,t){return Array.isArray(e)===Array.isArray(t)&&(Array.isArray(e)||e===t)&&(!Array.isArray(e)||e.length===t.length)&&(!Array.isArray(e)||0===e.filter((e,n)=>e!==t[n]).length)}copyColor(e){return{backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderColor:e.borderColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,pointBorderColor:e.pointBorderColor,pointBackgroundColor:e.pointBackgroundColor,pointBorderWidth:e.pointBorderWidth,pointRadius:e.pointRadius,pointHoverRadius:e.pointHoverRadius,pointHitRadius:e.pointHitRadius,pointHoverBackgroundColor:e.pointHoverBackgroundColor,pointHoverBorderColor:e.pointHoverBorderColor,pointHoverBorderWidth:e.pointHoverBorderWidth,pointStyle:e.pointStyle,hoverBackgroundColor:e.hoverBackgroundColor,hoverBorderColor:e.hoverBorderColor,hoverBorderWidth:e.hoverBorderWidth}}colorsEqual(e,t){return!e==!t&&(!e||e.backgroundColor===t.backgroundColor&&e.borderWidth===t.borderWidth&&e.borderColor===t.borderColor&&e.borderCapStyle===t.borderCapStyle&&e.borderDash===t.borderDash&&e.borderDashOffset===t.borderDashOffset&&e.borderJoinStyle===t.borderJoinStyle&&e.pointBorderColor===t.pointBorderColor&&e.pointBackgroundColor===t.pointBackgroundColor&&e.pointBorderWidth===t.pointBorderWidth&&e.pointRadius===t.pointRadius&&e.pointHoverRadius===t.pointHoverRadius&&e.pointHitRadius===t.pointHitRadius&&e.pointHoverBackgroundColor===t.pointHoverBackgroundColor&&e.pointHoverBorderColor===t.pointHoverBorderColor&&e.pointHoverBorderWidth===t.pointHoverBorderWidth&&e.pointStyle===t.pointStyle&&e.hoverBackgroundColor===t.hoverBackgroundColor&&e.hoverBorderColor===t.hoverBorderColor&&e.hoverBorderWidth===t.hoverBorderWidth)}updateColors(){this.datasets.forEach((e,t)=>{this.colors&&this.colors[t]?Object.assign(e,this.colors[t]):Object.assign(e,function(e,t,n){if("pie"===e||"doughnut"===e)return u(f(n));if("polarArea"===e)return{backgroundColor:(i=f(n)).map(e=>c(e,.6)),borderColor:i.map(e=>c(e,1)),hoverBackgroundColor:i.map(e=>c(e,.8)),hoverBorderColor:i.map(e=>c(e,1))};var i;if("line"===e||"radar"===e)return function(e){return{backgroundColor:c(e,.4),borderColor:c(e,1),pointBackgroundColor:c(e,1),pointBorderColor:"#fff",pointHoverBackgroundColor:"#fff",pointHoverBorderColor:c(e,.8)}}(h(t));if("bar"===e||"horizontalBar"===e)return function(e){return{backgroundColor:c(e,.6),borderColor:c(e,1),hoverBackgroundColor:c(e,.8),hoverBorderColor:c(e,1)}}(h(t));if("bubble"===e)return u(f(n));if("scatter"===e)return u(f(n));throw new Error("getColors - Unsupported chart type "+e)}(this.chartType,t,e.data.length),Object.assign({},e))})}ngOnChanges(e){let t=m.Default;const n=e=>{t=e>t?e:t};switch(e.hasOwnProperty("data")&&e.data.currentValue&&(this.propagateDataToDatasets(e.data.currentValue),n(m.Update)),e.hasOwnProperty("datasets")&&e.datasets.currentValue&&(this.propagateDatasetsToData(e.datasets.currentValue),n(m.Update)),e.hasOwnProperty("labels")&&(this.chart&&(this.chart.data.labels=e.labels.currentValue),n(m.Update)),e.hasOwnProperty("legend")&&(this.chart&&(this.chart.config.options.legend.display=e.legend.currentValue,this.chart.generateLegend()),n(m.Update)),e.hasOwnProperty("options")&&n(m.Refresh),t){case m.Update:this.update();break;case m.Refresh:case m.Default:this.refresh()}}ngOnDestroy(){this.chart&&(this.chart.destroy(),this.chart=void 0),this.subs.forEach(e=>e.unsubscribe())}update(e,t){if(this.chart)return this.chart.update(e,t)}hideDataset(e,t){this.chart.getDatasetMeta(e).hidden=t,this.chart.update()}isDatasetHidden(e){return this.chart.getDatasetMeta(e).hidden}toBase64Image(){return this.chart.toBase64Image()}getChartConfiguration(){const e=this.getDatasets(),t=Object.assign({},this.options);!1===this.legend&&(t.legend={display:!1}),t.hover=t.hover||{},t.hover.onHover||(t.hover.onHover=(e,t)=>{t&&!t.length||this.chartHover.emit({event:e,active:t})}),t.onClick||(t.onClick=(e,t)=>{this.chartClick.emit({event:e,active:t})});const n=this.smartMerge(t,this.themeService.getColorschemesOptions());return{type:this.chartType,data:{labels:this.labels||[],datasets:e},plugins:this.plugins,options:n}}getChartBuilder(e){const t=this.getChartConfiguration();return new r.Chart(e,t)}smartMerge(e,t,n=0){if(0===n&&(e=Object(o.cloneDeep)(e)),Object.keys(t).forEach(i=>{if(Array.isArray(t[i])){const r=e[i];r&&r.forEach(e=>{this.smartMerge(e,t[i][0],n+1)})}else"object"==typeof t[i]?(i in e||(e[i]={}),this.smartMerge(e[i],t[i],n+1)):e[i]=t[i]}),0===n)return e}isMultiLineLabel(e){return Array.isArray(e)}joinLabel(e){return e?this.isMultiLineLabel(e)?e.join(" "):e:null}propagateDatasetsToData(e){this.data=this.datasets.map(e=>e.data),this.chart&&(this.chart.data.datasets=e),this.updateColors()}propagateDataToDatasets(e){this.isMultiDataSet(e)?this.datasets&&e.length===this.datasets.length?this.datasets.forEach((t,n)=>{t.data=e[n]}):(this.datasets=e.map((e,t)=>({data:e,label:this.joinLabel(this.labels[t])||"Label "+t})),this.chart&&(this.chart.data.datasets=this.datasets)):this.datasets?(this.datasets[0].data=e,this.datasets.splice(1)):(this.datasets=[{data:e}],this.chart&&(this.chart.data.datasets=this.datasets)),this.updateColors()}isMultiDataSet(e){return Array.isArray(e[0])}getDatasets(){if(!this.datasets&&!this.data)throw new Error("ng-charts configuration error, data or datasets field are required to render chart "+this.chartType);return this.datasets?(this.propagateDatasetsToData(this.datasets),this.datasets):this.data?(this.propagateDataToDatasets(this.data),this.datasets):void 0}refresh(){this.chart&&(this.chart.destroy(),this.chart=void 0),this.ctx&&(this.chart=this.getChartBuilder(this.ctx))}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(p))},e.\u0275dir=i.Hb({type:e,selectors:[["canvas","baseChart",""]],inputs:{options:"options",data:"data",datasets:"datasets",labels:"labels",chartType:"chartType",colors:"colors",legend:"legend",plugins:"plugins"},outputs:{chartClick:"chartClick",chartHover:"chartHover"},exportAs:["base-chart"],features:[i.wb]}),e})(),g=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[]]}),e})()},iEDd:function(e,t,n){!function(e){"use strict";e.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xu\xf1o_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xu\xf1._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_m\xe9rcores_xoves_venres_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._m\xe9r._xov._ven._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_m\xe9_xo_ve_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"\xe1s":"\xe1")+"] LT"},nextDay:function(){return"[ma\xf1\xe1 "+(1!==this.hours()?"\xe1s":"\xe1")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"\xe1s":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"\xe1":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"\xe1s":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){return 0===e.indexOf("un")?"n"+e:"en "+e},past:"hai %s",s:"uns segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un d\xeda",dd:"%d d\xedas",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4}})}(n("wd/R"))},iExv:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("8Y7J");let r=(()=>{class e{transform(e,t="Yes",n="No"){return Boolean(e)?t:n}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"booleanText",type:e,pure:!0}),e})()},iInd:function(e,t,n){"use strict";n.d(t,"a",(function(){return Ee})),n.d(t,"b",(function(){return E})),n.d(t,"c",(function(){return R})),n.d(t,"d",(function(){return tn})),n.d(t,"e",(function(){return Gt})),n.d(t,"f",(function(){return qt})),n.d(t,"g",(function(){return Kt})),n.d(t,"h",(function(){return Jt})),n.d(t,"i",(function(){return un})),n.d(t,"j",(function(){return Zt}));var i=n("SVse"),r=n("8Y7J"),s=n("LRne"),o=n("Cfvw"),a=n("2Vo4"),c=n("itXk"),l=n("HDdC"),u=n("sVev"),d=n("EY2u");function h(e){return new l.a(t=>{let n;try{n=e()}catch(i){return void t.error(i)}return(n?Object(o.a)(n):Object(d.b)()).subscribe(t)})}var f=n("XNiG"),p=n("lJxs"),m=n("0EUg"),b=n("NJ9Y"),g=n("eIep"),_=n("IzEk"),y=n("JX91"),v=n("Kqap"),w=n("pLZG"),S=n("JIr8"),M=n("bOdf"),k=n("SxV6"),x=n("5+tZ"),D=n("vkgz"),T=n("BFxc"),C=n("nYR2"),O=n("bHdf");class L{constructor(e,t){this.id=e,this.url=t}}class R extends L{constructor(e,t,n="imperative",i=null){super(e,t),this.navigationTrigger=n,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class E extends L{constructor(e,t,n){super(e,t),this.urlAfterRedirects=n}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class A extends L{constructor(e,t,n){super(e,t),this.reason=n}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class I extends L{constructor(e,t,n){super(e,t),this.error=n}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class P extends L{constructor(e,t,n,i){super(e,t),this.urlAfterRedirects=n,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class N extends L{constructor(e,t,n,i){super(e,t),this.urlAfterRedirects=n,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class j extends L{constructor(e,t,n,i,r){super(e,t),this.urlAfterRedirects=n,this.state=i,this.shouldActivate=r}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class F extends L{constructor(e,t,n,i){super(e,t),this.urlAfterRedirects=n,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Y extends L{constructor(e,t,n,i){super(e,t),this.urlAfterRedirects=n,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class z{constructor(e){this.route=e}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class ${constructor(e){this.route=e}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class H{constructor(e){this.snapshot=e}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class W{constructor(e){this.snapshot=e}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class V{constructor(e){this.snapshot=e}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class B{constructor(e){this.snapshot=e}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class U{constructor(e,t,n){this.routerEvent=e,this.position=t,this.anchor=n}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}const G="primary";class q{constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){const t=this.params[e];return Array.isArray(t)?t[0]:t}return null}getAll(e){if(this.has(e)){const t=this.params[e];return Array.isArray(t)?t:[t]}return[]}get keys(){return Object.keys(this.params)}}function J(e){return new q(e)}function Q(e){const t=Error("NavigationCancelingError: "+e);return t.ngNavigationCancelingError=!0,t}function K(e,t,n){const i=n.path.split("/");if(i.length>e.length)return null;if("full"===n.pathMatch&&(t.hasChildren()||i.length<e.length))return null;const r={};for(let s=0;s<i.length;s++){const t=i[s],n=e[s];if(t.startsWith(":"))r[t.substring(1)]=n;else if(t!==n.path)return null}return{consumed:e.slice(0,i.length),posParams:r}}function Z(e,t){const n=Object.keys(e),i=Object.keys(t);if(!n||!i||n.length!=i.length)return!1;let r;for(let s=0;s<n.length;s++)if(r=n[s],!X(e[r],t[r]))return!1;return!0}function X(e,t){if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;const n=[...e].sort(),i=[...t].sort();return n.every((e,t)=>i[t]===e)}return e===t}function ee(e){return Array.prototype.concat.apply([],e)}function te(e){return e.length>0?e[e.length-1]:null}function ne(e,t){for(const n in e)e.hasOwnProperty(n)&&t(e[n],n)}function ie(e){return Object(r.pb)(e)?e:Object(r.qb)(e)?Object(o.a)(Promise.resolve(e)):Object(s.a)(e)}function re(e,t,n){return n?function(e,t){return Z(e,t)}(e.queryParams,t.queryParams)&&function e(t,n){if(!ce(t.segments,n.segments))return!1;if(t.numberOfChildren!==n.numberOfChildren)return!1;for(const i in n.children){if(!t.children[i])return!1;if(!e(t.children[i],n.children[i]))return!1}return!0}(e.root,t.root):function(e,t){return Object.keys(t).length<=Object.keys(e).length&&Object.keys(t).every(n=>X(e[n],t[n]))}(e.queryParams,t.queryParams)&&function e(t,n){return function t(n,i,r){if(n.segments.length>r.length)return!!ce(n.segments.slice(0,r.length),r)&&!i.hasChildren();if(n.segments.length===r.length){if(!ce(n.segments,r))return!1;for(const t in i.children){if(!n.children[t])return!1;if(!e(n.children[t],i.children[t]))return!1}return!0}{const e=r.slice(0,n.segments.length),s=r.slice(n.segments.length);return!!ce(n.segments,e)&&!!n.children.primary&&t(n.children.primary,i,s)}}(t,n,n.segments)}(e.root,t.root)}class se{constructor(e,t,n){this.root=e,this.queryParams=t,this.fragment=n}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=J(this.queryParams)),this._queryParamMap}toString(){return he.serialize(this)}}class oe{constructor(e,t){this.segments=e,this.children=t,this.parent=null,ne(t,(e,t)=>e.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return fe(this)}}class ae{constructor(e,t){this.path=e,this.parameters=t}get parameterMap(){return this._parameterMap||(this._parameterMap=J(this.parameters)),this._parameterMap}toString(){return ye(this)}}function ce(e,t){return e.length===t.length&&e.every((e,n)=>e.path===t[n].path)}function le(e,t){let n=[];return ne(e.children,(e,i)=>{i===G&&(n=n.concat(t(e,i)))}),ne(e.children,(e,i)=>{i!==G&&(n=n.concat(t(e,i)))}),n}class ue{}class de{parse(e){const t=new ke(e);return new se(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}serialize(e){return`${"/"+function e(t,n){if(!t.hasChildren())return fe(t);if(n){const n=t.children.primary?e(t.children.primary,!1):"",i=[];return ne(t.children,(t,n)=>{n!==G&&i.push(`${n}:${e(t,!1)}`)}),i.length>0?`${n}(${i.join("//")})`:n}{const n=le(t,(n,i)=>i===G?[e(t.children.primary,!1)]:[`${i}:${e(n,!1)}`]);return 1===Object.keys(t.children).length&&null!=t.children.primary?`${fe(t)}/${n[0]}`:`${fe(t)}/(${n.join("//")})`}}(e.root,!0)}${function(e){const t=Object.keys(e).map(t=>{const n=e[t];return Array.isArray(n)?n.map(e=>`${me(t)}=${me(e)}`).join("&"):`${me(t)}=${me(n)}`});return t.length?"?"+t.join("&"):""}(e.queryParams)}${"string"==typeof e.fragment?"#"+encodeURI(e.fragment):""}`}}const he=new de;function fe(e){return e.segments.map(e=>ye(e)).join("/")}function pe(e){return encodeURIComponent(e).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function me(e){return pe(e).replace(/%3B/gi,";")}function be(e){return pe(e).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function ge(e){return decodeURIComponent(e)}function _e(e){return ge(e.replace(/\+/g,"%20"))}function ye(e){return`${be(e.path)}${t=e.parameters,Object.keys(t).map(e=>`;${be(e)}=${be(t[e])}`).join("")}`;var t}const ve=/^[^\/()?;=#]+/;function we(e){const t=e.match(ve);return t?t[0]:""}const Se=/^[^=?&#]+/,Me=/^[^?&#]+/;class ke{constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new oe([],{}):new oe([],this.parseChildren())}parseQueryParams(){const e={};if(this.consumeOptional("?"))do{this.parseQueryParam(e)}while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(e.length>0||Object.keys(t).length>0)&&(n.primary=new oe(e,t)),n}parseSegment(){const e=we(this.remaining);if(""===e&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(e),new ae(ge(e),this.parseMatrixParams())}parseMatrixParams(){const e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){const t=we(this.remaining);if(!t)return;this.capture(t);let n="";if(this.consumeOptional("=")){const e=we(this.remaining);e&&(n=e,this.capture(n))}e[ge(t)]=ge(n)}parseQueryParam(e){const t=function(e){const t=e.match(Se);return t?t[0]:""}(this.remaining);if(!t)return;this.capture(t);let n="";if(this.consumeOptional("=")){const e=function(e){const t=e.match(Me);return t?t[0]:""}(this.remaining);e&&(n=e,this.capture(n))}const i=_e(t),r=_e(n);if(e.hasOwnProperty(i)){let t=e[i];Array.isArray(t)||(t=[t],e[i]=t),t.push(r)}else e[i]=r}parseParens(e){const t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const n=we(this.remaining),i=this.remaining[n.length];if("/"!==i&&")"!==i&&";"!==i)throw new Error(`Cannot parse url '${this.url}'`);let r=void 0;n.indexOf(":")>-1?(r=n.substr(0,n.indexOf(":")),this.capture(r),this.capture(":")):e&&(r=G);const s=this.parseChildren();t[r]=1===Object.keys(s).length?s.primary:new oe([],s),this.consumeOptional("//")}return t}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return!!this.peekStartsWith(e)&&(this.remaining=this.remaining.substring(e.length),!0)}capture(e){if(!this.consumeOptional(e))throw new Error(`Expected "${e}".`)}}class xe{constructor(e){this._root=e}get root(){return this._root.value}parent(e){const t=this.pathFromRoot(e);return t.length>1?t[t.length-2]:null}children(e){const t=De(e,this._root);return t?t.children.map(e=>e.value):[]}firstChild(e){const t=De(e,this._root);return t&&t.children.length>0?t.children[0].value:null}siblings(e){const t=Te(e,this._root);return t.length<2?[]:t[t.length-2].children.map(e=>e.value).filter(t=>t!==e)}pathFromRoot(e){return Te(e,this._root).map(e=>e.value)}}function De(e,t){if(e===t.value)return t;for(const n of t.children){const t=De(e,n);if(t)return t}return null}function Te(e,t){if(e===t.value)return[t];for(const n of t.children){const i=Te(e,n);if(i.length)return i.unshift(t),i}return[]}class Ce{constructor(e,t){this.value=e,this.children=t}toString(){return`TreeNode(${this.value})`}}function Oe(e){const t={};return e&&e.children.forEach(e=>t[e.value.outlet]=e),t}class Le extends xe{constructor(e,t){super(e),this.snapshot=t,Ne(this,e)}toString(){return this.snapshot.toString()}}function Re(e,t){const n=function(e,t){const n=new Ie([],{},{},"",{},G,t,null,e.root,-1,{});return new Pe("",new Ce(n,[]))}(e,t),i=new a.a([new ae("",{})]),r=new a.a({}),s=new a.a({}),o=new a.a({}),c=new a.a(""),l=new Ee(i,r,o,c,s,G,t,n.root);return l.snapshot=n.root,new Le(new Ce(l,[]),n)}class Ee{constructor(e,t,n,i,r,s,o,a){this.url=e,this.params=t,this.queryParams=n,this.fragment=i,this.data=r,this.outlet=s,this.component=o,this._futureSnapshot=a}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(Object(p.a)(e=>J(e)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(Object(p.a)(e=>J(e)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function Ae(e,t="emptyOnly"){const n=e.pathFromRoot;let i=0;if("always"!==t)for(i=n.length-1;i>=1;){const e=n[i],t=n[i-1];if(e.routeConfig&&""===e.routeConfig.path)i--;else{if(t.component)break;i--}}return function(e){return e.reduce((e,t)=>({params:Object.assign(Object.assign({},e.params),t.params),data:Object.assign(Object.assign({},e.data),t.data),resolve:Object.assign(Object.assign({},e.resolve),t._resolvedData)}),{params:{},data:{},resolve:{}})}(n.slice(i))}class Ie{constructor(e,t,n,i,r,s,o,a,c,l,u){this.url=e,this.params=t,this.queryParams=n,this.fragment=i,this.data=r,this.outlet=s,this.component=o,this.routeConfig=a,this._urlSegment=c,this._lastPathIndex=l,this._resolve=u}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=J(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=J(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(e=>e.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class Pe extends xe{constructor(e,t){super(t),this.url=e,Ne(this,t)}toString(){return je(this._root)}}function Ne(e,t){t.value._routerState=e,t.children.forEach(t=>Ne(e,t))}function je(e){const t=e.children.length>0?` { ${e.children.map(je).join(", ")} } `:"";return`${e.value}${t}`}function Fe(e){if(e.snapshot){const t=e.snapshot,n=e._futureSnapshot;e.snapshot=n,Z(t.queryParams,n.queryParams)||e.queryParams.next(n.queryParams),t.fragment!==n.fragment&&e.fragment.next(n.fragment),Z(t.params,n.params)||e.params.next(n.params),function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(!Z(e[n],t[n]))return!1;return!0}(t.url,n.url)||e.url.next(n.url),Z(t.data,n.data)||e.data.next(n.data)}else e.snapshot=e._futureSnapshot,e.data.next(e._futureSnapshot.data)}function Ye(e,t){var n,i;return Z(e.params,t.params)&&ce(n=e.url,i=t.url)&&n.every((e,t)=>Z(e.parameters,i[t].parameters))&&!(!e.parent!=!t.parent)&&(!e.parent||Ye(e.parent,t.parent))}function ze(e){return"object"==typeof e&&null!=e&&!e.outlets&&!e.segmentPath}function $e(e,t,n,i,r){let s={};return i&&ne(i,(e,t)=>{s[t]=Array.isArray(e)?e.map(e=>""+e):""+e}),new se(n.root===e?t:function e(t,n,i){const r={};return ne(t.children,(t,s)=>{r[s]=t===n?i:e(t,n,i)}),new oe(t.segments,r)}(n.root,e,t),s,r)}class He{constructor(e,t,n){if(this.isAbsolute=e,this.numberOfDoubleDots=t,this.commands=n,e&&n.length>0&&ze(n[0]))throw new Error("Root segment cannot have matrix parameters");const i=n.find(e=>"object"==typeof e&&null!=e&&e.outlets);if(i&&i!==te(n))throw new Error("{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class We{constructor(e,t,n){this.segmentGroup=e,this.processChildren=t,this.index=n}}function Ve(e){return"object"==typeof e&&null!=e&&e.outlets?e.outlets.primary:""+e}function Be(e,t,n){if(e||(e=new oe([],{})),0===e.segments.length&&e.hasChildren())return Ue(e,t,n);const i=function(e,t,n){let i=0,r=t;const s={match:!1,pathIndex:0,commandIndex:0};for(;r<e.segments.length;){if(i>=n.length)return s;const t=e.segments[r],o=Ve(n[i]),a=i<n.length-1?n[i+1]:null;if(r>0&&void 0===o)break;if(o&&a&&"object"==typeof a&&void 0===a.outlets){if(!Qe(o,a,t))return s;i+=2}else{if(!Qe(o,{},t))return s;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(e,t,n),r=n.slice(i.commandIndex);if(i.match&&i.pathIndex<e.segments.length){const t=new oe(e.segments.slice(0,i.pathIndex),{});return t.children.primary=new oe(e.segments.slice(i.pathIndex),e.children),Ue(t,0,r)}return i.match&&0===r.length?new oe(e.segments,{}):i.match&&!e.hasChildren()?Ge(e,t,n):i.match?Ue(e,0,r):Ge(e,t,n)}function Ue(e,t,n){if(0===n.length)return new oe(e.segments,{});{const i=function(e){return"object"==typeof e[0]&&null!==e[0]&&e[0].outlets?e[0].outlets:{[G]:e}}(n),r={};return ne(i,(n,i)=>{null!==n&&(r[i]=Be(e.children[i],t,n))}),ne(e.children,(e,t)=>{void 0===i[t]&&(r[t]=e)}),new oe(e.segments,r)}}function Ge(e,t,n){const i=e.segments.slice(0,t);let r=0;for(;r<n.length;){if("object"==typeof n[r]&&null!==n[r]&&void 0!==n[r].outlets){const e=qe(n[r].outlets);return new oe(i,e)}if(0===r&&ze(n[0])){i.push(new ae(e.segments[t].path,n[0])),r++;continue}const s=Ve(n[r]),o=r<n.length-1?n[r+1]:null;s&&o&&ze(o)?(i.push(new ae(s,Je(o))),r+=2):(i.push(new ae(s,{})),r++)}return new oe(i,{})}function qe(e){const t={};return ne(e,(e,n)=>{null!==e&&(t[n]=Ge(new oe([],{}),0,e))}),t}function Je(e){const t={};return ne(e,(e,n)=>t[n]=""+e),t}function Qe(e,t,n){return e==n.path&&Z(t,n.parameters)}class Ke{constructor(e,t,n,i){this.routeReuseStrategy=e,this.futureState=t,this.currState=n,this.forwardEvent=i}activate(e){const t=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,n,e),Fe(this.futureState.root),this.activateChildRoutes(t,n,e)}deactivateChildRoutes(e,t,n){const i=Oe(t);e.children.forEach(e=>{const t=e.value.outlet;this.deactivateRoutes(e,i[t],n),delete i[t]}),ne(i,(e,t)=>{this.deactivateRouteAndItsChildren(e,n)})}deactivateRoutes(e,t,n){const i=e.value,r=t?t.value:null;if(i===r)if(i.component){const r=n.getContext(i.outlet);r&&this.deactivateChildRoutes(e,t,r.children)}else this.deactivateChildRoutes(e,t,n);else r&&this.deactivateRouteAndItsChildren(t,n)}deactivateRouteAndItsChildren(e,t){this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,t):this.deactivateRouteAndOutlet(e,t)}detachAndStoreRouteSubtree(e,t){const n=t.getContext(e.value.outlet);if(n&&n.outlet){const t=n.outlet.detach(),i=n.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:t,route:e,contexts:i})}}deactivateRouteAndOutlet(e,t){const n=t.getContext(e.value.outlet);if(n){const i=Oe(e),r=e.value.component?n.children:t;ne(i,(e,t)=>this.deactivateRouteAndItsChildren(e,r)),n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated())}}activateChildRoutes(e,t,n){const i=Oe(t);e.children.forEach(e=>{this.activateRoutes(e,i[e.value.outlet],n),this.forwardEvent(new B(e.value.snapshot))}),e.children.length&&this.forwardEvent(new W(e.value.snapshot))}activateRoutes(e,t,n){const i=e.value,r=t?t.value:null;if(Fe(i),i===r)if(i.component){const r=n.getOrCreateContext(i.outlet);this.activateChildRoutes(e,t,r.children)}else this.activateChildRoutes(e,t,n);else if(i.component){const t=n.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){const e=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),t.children.onOutletReAttached(e.contexts),t.attachRef=e.componentRef,t.route=e.route.value,t.outlet&&t.outlet.attach(e.componentRef,e.route.value),Ze(e.route)}else{const n=function(e){for(let t=e.parent;t;t=t.parent){const e=t.routeConfig;if(e&&e._loadedConfig)return e._loadedConfig;if(e&&e.component)return null}return null}(i.snapshot),r=n?n.module.componentFactoryResolver:null;t.attachRef=null,t.route=i,t.resolver=r,t.outlet&&t.outlet.activateWith(i,r),this.activateChildRoutes(e,null,t.children)}}else this.activateChildRoutes(e,null,n)}}function Ze(e){Fe(e.value),e.children.forEach(Ze)}class Xe{constructor(e,t){this.routes=e,this.module=t}}function et(e){return"function"==typeof e}function tt(e){return e instanceof se}const nt=Symbol("INITIAL_VALUE");function it(){return Object(g.a)(e=>Object(c.a)(...e.map(e=>e.pipe(Object(_.a)(1),Object(y.a)(nt)))).pipe(Object(v.a)((e,t)=>{let n=!1;return t.reduce((e,i,r)=>{if(e!==nt)return e;if(i===nt&&(n=!0),!n){if(!1===i)return i;if(r===t.length-1||tt(i))return i}return e},e)},nt),Object(w.a)(e=>e!==nt),Object(p.a)(e=>tt(e)?e:!0===e),Object(_.a)(1)))}class rt{constructor(e){this.segmentGroup=e||null}}class st{constructor(e){this.urlTree=e}}function ot(e){return new l.a(t=>t.error(new rt(e)))}function at(e){return new l.a(t=>t.error(new st(e)))}function ct(e){return new l.a(t=>t.error(new Error(`Only absolute redirects can have named outlets. redirectTo: '${e}'`)))}class lt{constructor(e,t,n,i,s){this.configLoader=t,this.urlSerializer=n,this.urlTree=i,this.config=s,this.allowRedirects=!0,this.ngModule=e.get(r.y)}apply(){return this.expandSegmentGroup(this.ngModule,this.config,this.urlTree.root,G).pipe(Object(p.a)(e=>this.createUrlTree(e,this.urlTree.queryParams,this.urlTree.fragment))).pipe(Object(S.a)(e=>{if(e instanceof st)return this.allowRedirects=!1,this.match(e.urlTree);if(e instanceof rt)throw this.noMatchError(e);throw e}))}match(e){return this.expandSegmentGroup(this.ngModule,this.config,e.root,G).pipe(Object(p.a)(t=>this.createUrlTree(t,e.queryParams,e.fragment))).pipe(Object(S.a)(e=>{if(e instanceof rt)throw this.noMatchError(e);throw e}))}noMatchError(e){return new Error(`Cannot match any routes. URL Segment: '${e.segmentGroup}'`)}createUrlTree(e,t,n){const i=e.segments.length>0?new oe([],{[G]:e}):e;return new se(i,t,n)}expandSegmentGroup(e,t,n,i){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(e,t,n).pipe(Object(p.a)(e=>new oe([],e))):this.expandSegment(e,n,t,n.segments,i,!0)}expandChildren(e,t,n){return function(e,t){if(0===Object.keys(e).length)return Object(s.a)({});const n=[],i=[],r={};return ne(e,(e,s)=>{const o=t(s,e).pipe(Object(p.a)(e=>r[s]=e));s===G?n.push(o):i.push(o)}),s.a.apply(null,n.concat(i)).pipe(Object(m.a)(),Object(b.a)(),Object(p.a)(()=>r))}(n.children,(n,i)=>this.expandSegmentGroup(e,t,i,n))}expandSegment(e,t,n,i,r,o){return Object(s.a)(...n).pipe(Object(M.a)(a=>this.expandSegmentAgainstRoute(e,t,n,a,i,r,o).pipe(Object(S.a)(e=>{if(e instanceof rt)return Object(s.a)(null);throw e}))),Object(k.a)(e=>!!e),Object(S.a)((e,n)=>{if(e instanceof u.a||"EmptyError"===e.name){if(this.noLeftoversInUrl(t,i,r))return Object(s.a)(new oe([],{}));throw new rt(t)}throw e}))}noLeftoversInUrl(e,t,n){return 0===t.length&&!e.children[n]}expandSegmentAgainstRoute(e,t,n,i,r,s,o){return ft(i)!==s?ot(t):void 0===i.redirectTo?this.matchSegmentAgainstRoute(e,t,i,r):o&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(e,t,n,i,r,s):ot(t)}expandSegmentAgainstRouteUsingRedirect(e,t,n,i,r,s){return"**"===i.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(e,n,i,s):this.expandRegularSegmentAgainstRouteUsingRedirect(e,t,n,i,r,s)}expandWildCardWithParamsAgainstRouteUsingRedirect(e,t,n,i){const r=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?at(r):this.lineralizeSegments(n,r).pipe(Object(x.a)(n=>{const r=new oe(n,{});return this.expandSegment(e,r,t,n,i,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(e,t,n,i,r,s){const{matched:o,consumedSegments:a,lastChild:c,positionalParamSegments:l}=ut(t,i,r);if(!o)return ot(t);const u=this.applyRedirectCommands(a,i.redirectTo,l);return i.redirectTo.startsWith("/")?at(u):this.lineralizeSegments(i,u).pipe(Object(x.a)(i=>this.expandSegment(e,t,n,i.concat(r.slice(c)),s,!1)))}matchSegmentAgainstRoute(e,t,n,i){if("**"===n.path)return n.loadChildren?this.configLoader.load(e.injector,n).pipe(Object(p.a)(e=>(n._loadedConfig=e,new oe(i,{})))):Object(s.a)(new oe(i,{}));const{matched:r,consumedSegments:o,lastChild:a}=ut(t,n,i);if(!r)return ot(t);const c=i.slice(a);return this.getChildConfig(e,n,i).pipe(Object(x.a)(e=>{const n=e.module,i=e.routes,{segmentGroup:r,slicedSegments:a}=function(e,t,n,i){return n.length>0&&function(e,t,n){return n.some(n=>ht(e,t,n)&&ft(n)!==G)}(e,n,i)?{segmentGroup:dt(new oe(t,function(e,t){const n={};n.primary=t;for(const i of e)""===i.path&&ft(i)!==G&&(n[ft(i)]=new oe([],{}));return n}(i,new oe(n,e.children)))),slicedSegments:[]}:0===n.length&&function(e,t,n){return n.some(n=>ht(e,t,n))}(e,n,i)?{segmentGroup:dt(new oe(e.segments,function(e,t,n,i){const r={};for(const s of n)ht(e,t,s)&&!i[ft(s)]&&(r[ft(s)]=new oe([],{}));return Object.assign(Object.assign({},i),r)}(e,n,i,e.children))),slicedSegments:n}:{segmentGroup:e,slicedSegments:n}}(t,o,c,i);return 0===a.length&&r.hasChildren()?this.expandChildren(n,i,r).pipe(Object(p.a)(e=>new oe(o,e))):0===i.length&&0===a.length?Object(s.a)(new oe(o,{})):this.expandSegment(n,r,i,a,G,!0).pipe(Object(p.a)(e=>new oe(o.concat(e.segments),e.children)))}))}getChildConfig(e,t,n){return t.children?Object(s.a)(new Xe(t.children,e)):t.loadChildren?void 0!==t._loadedConfig?Object(s.a)(t._loadedConfig):this.runCanLoadGuards(e.injector,t,n).pipe(Object(x.a)(n=>n?this.configLoader.load(e.injector,t).pipe(Object(p.a)(e=>(t._loadedConfig=e,e))):function(e){return new l.a(t=>t.error(Q(`Cannot load children because the guard of the route "path: '${e.path}'" returned false`)))}(t))):Object(s.a)(new Xe([],e))}runCanLoadGuards(e,t,n){const i=t.canLoad;if(!i||0===i.length)return Object(s.a)(!0);const r=i.map(i=>{const r=e.get(i);let s;if(function(e){return e&&et(e.canLoad)}(r))s=r.canLoad(t,n);else{if(!et(r))throw new Error("Invalid CanLoad guard");s=r(t,n)}return ie(s)});return Object(s.a)(r).pipe(it(),Object(D.a)(e=>{if(!tt(e))return;const t=Q(`Redirecting to "${this.urlSerializer.serialize(e)}"`);throw t.url=e,t}),Object(p.a)(e=>!0===e))}lineralizeSegments(e,t){let n=[],i=t.root;for(;;){if(n=n.concat(i.segments),0===i.numberOfChildren)return Object(s.a)(n);if(i.numberOfChildren>1||!i.children.primary)return ct(e.redirectTo);i=i.children.primary}}applyRedirectCommands(e,t,n){return this.applyRedirectCreatreUrlTree(t,this.urlSerializer.parse(t),e,n)}applyRedirectCreatreUrlTree(e,t,n,i){const r=this.createSegmentGroup(e,t.root,n,i);return new se(r,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}createQueryParams(e,t){const n={};return ne(e,(e,i)=>{if("string"==typeof e&&e.startsWith(":")){const r=e.substring(1);n[i]=t[r]}else n[i]=e}),n}createSegmentGroup(e,t,n,i){const r=this.createSegments(e,t.segments,n,i);let s={};return ne(t.children,(t,r)=>{s[r]=this.createSegmentGroup(e,t,n,i)}),new oe(r,s)}createSegments(e,t,n,i){return t.map(t=>t.path.startsWith(":")?this.findPosParam(e,t,i):this.findOrReturn(t,n))}findPosParam(e,t,n){const i=n[t.path.substring(1)];if(!i)throw new Error(`Cannot redirect to '${e}'. Cannot find '${t.path}'.`);return i}findOrReturn(e,t){let n=0;for(const i of t){if(i.path===e.path)return t.splice(n),i;n++}return e}}function ut(e,t,n){if(""===t.path)return"full"===t.pathMatch&&(e.hasChildren()||n.length>0)?{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}:{matched:!0,consumedSegments:[],lastChild:0,positionalParamSegments:{}};const i=(t.matcher||K)(n,e,t);return i?{matched:!0,consumedSegments:i.consumed,lastChild:i.consumed.length,positionalParamSegments:i.posParams}:{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}}function dt(e){if(1===e.numberOfChildren&&e.children.primary){const t=e.children.primary;return new oe(e.segments.concat(t.segments),t.children)}return e}function ht(e,t,n){return(!(e.hasChildren()||t.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0!==n.redirectTo}function ft(e){return e.outlet||G}class pt{constructor(e){this.path=e,this.route=this.path[this.path.length-1]}}class mt{constructor(e,t){this.component=e,this.route=t}}function bt(e,t,n){const i=e._root;return function e(t,n,i,r,s={canDeactivateChecks:[],canActivateChecks:[]}){const o=Oe(n);return t.children.forEach(t=>{!function(t,n,i,r,s={canDeactivateChecks:[],canActivateChecks:[]}){const o=t.value,a=n?n.value:null,c=i?i.getContext(t.value.outlet):null;if(a&&o.routeConfig===a.routeConfig){const l=function(e,t,n){if("function"==typeof n)return n(e,t);switch(n){case"pathParamsChange":return!ce(e.url,t.url);case"pathParamsOrQueryParamsChange":return!ce(e.url,t.url)||!Z(e.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Ye(e,t)||!Z(e.queryParams,t.queryParams);case"paramsChange":default:return!Ye(e,t)}}(a,o,o.routeConfig.runGuardsAndResolvers);l?s.canActivateChecks.push(new pt(r)):(o.data=a.data,o._resolvedData=a._resolvedData),e(t,n,o.component?c?c.children:null:i,r,s),l&&c&&c.outlet&&c.outlet.isActivated&&s.canDeactivateChecks.push(new mt(c.outlet.component,a))}else a&&_t(n,c,s),s.canActivateChecks.push(new pt(r)),e(t,null,o.component?c?c.children:null:i,r,s)}(t,o[t.value.outlet],i,r.concat([t.value]),s),delete o[t.value.outlet]}),ne(o,(e,t)=>_t(e,i.getContext(t),s)),s}(i,t?t._root:null,n,[i.value])}function gt(e,t,n){const i=function(e){if(!e)return null;for(let t=e.parent;t;t=t.parent){const e=t.routeConfig;if(e&&e._loadedConfig)return e._loadedConfig}return null}(t);return(i?i.module.injector:n).get(e)}function _t(e,t,n){const i=Oe(e),r=e.value;ne(i,(e,i)=>{_t(e,r.component?t?t.children.getContext(i):null:t,n)}),n.canDeactivateChecks.push(new mt(r.component&&t&&t.outlet&&t.outlet.isActivated?t.outlet.component:null,r))}function yt(e,t){return null!==e&&t&&t(new V(e)),Object(s.a)(!0)}function vt(e,t){return null!==e&&t&&t(new H(e)),Object(s.a)(!0)}function wt(e,t,n){const i=t.routeConfig?t.routeConfig.canActivate:null;if(!i||0===i.length)return Object(s.a)(!0);const r=i.map(i=>h(()=>{const r=gt(i,t,n);let s;if(function(e){return e&&et(e.canActivate)}(r))s=ie(r.canActivate(t,e));else{if(!et(r))throw new Error("Invalid CanActivate guard");s=ie(r(t,e))}return s.pipe(Object(k.a)())}));return Object(s.a)(r).pipe(it())}function St(e,t,n){const i=t[t.length-1],r=t.slice(0,t.length-1).reverse().map(e=>function(e){const t=e.routeConfig?e.routeConfig.canActivateChild:null;return t&&0!==t.length?{node:e,guards:t}:null}(e)).filter(e=>null!==e).map(t=>h(()=>{const r=t.guards.map(r=>{const s=gt(r,t.node,n);let o;if(function(e){return e&&et(e.canActivateChild)}(s))o=ie(s.canActivateChild(i,e));else{if(!et(s))throw new Error("Invalid CanActivateChild guard");o=ie(s(i,e))}return o.pipe(Object(k.a)())});return Object(s.a)(r).pipe(it())}));return Object(s.a)(r).pipe(it())}class Mt{}class kt{constructor(e,t,n,i,r,s){this.rootComponentType=e,this.config=t,this.urlTree=n,this.url=i,this.paramsInheritanceStrategy=r,this.relativeLinkResolution=s}recognize(){try{const e=Tt(this.urlTree.root,[],[],this.config,this.relativeLinkResolution).segmentGroup,t=this.processSegmentGroup(this.config,e,G),n=new Ie([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},G,this.rootComponentType,null,this.urlTree.root,-1,{}),i=new Ce(n,t),r=new Pe(this.url,i);return this.inheritParamsAndData(r._root),Object(s.a)(r)}catch(e){return new l.a(t=>t.error(e))}}inheritParamsAndData(e){const t=e.value,n=Ae(t,this.paramsInheritanceStrategy);t.params=Object.freeze(n.params),t.data=Object.freeze(n.data),e.children.forEach(e=>this.inheritParamsAndData(e))}processSegmentGroup(e,t,n){return 0===t.segments.length&&t.hasChildren()?this.processChildren(e,t):this.processSegment(e,t,t.segments,n)}processChildren(e,t){const n=le(t,(t,n)=>this.processSegmentGroup(e,t,n));return function(e){const t={};e.forEach(e=>{const n=t[e.value.outlet];if(n){const t=n.url.map(e=>e.toString()).join("/"),i=e.value.url.map(e=>e.toString()).join("/");throw new Error(`Two segments cannot have the same outlet name: '${t}' and '${i}'.`)}t[e.value.outlet]=e.value})}(n),n.sort((e,t)=>e.value.outlet===G?-1:t.value.outlet===G?1:e.value.outlet.localeCompare(t.value.outlet)),n}processSegment(e,t,n,i){for(const s of e)try{return this.processSegmentAgainstRoute(s,t,n,i)}catch(r){if(!(r instanceof Mt))throw r}if(this.noLeftoversInUrl(t,n,i))return[];throw new Mt}noLeftoversInUrl(e,t,n){return 0===t.length&&!e.children[n]}processSegmentAgainstRoute(e,t,n,i){if(e.redirectTo)throw new Mt;if((e.outlet||G)!==i)throw new Mt;let r,s=[],o=[];if("**"===e.path){const s=n.length>0?te(n).parameters:{};r=new Ie(n,s,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,Lt(e),i,e.component,e,xt(t),Dt(t)+n.length,Rt(e))}else{const a=function(e,t,n){if(""===t.path){if("full"===t.pathMatch&&(e.hasChildren()||n.length>0))throw new Mt;return{consumedSegments:[],lastChild:0,parameters:{}}}const i=(t.matcher||K)(n,e,t);if(!i)throw new Mt;const r={};ne(i.posParams,(e,t)=>{r[t]=e.path});const s=i.consumed.length>0?Object.assign(Object.assign({},r),i.consumed[i.consumed.length-1].parameters):r;return{consumedSegments:i.consumed,lastChild:i.consumed.length,parameters:s}}(t,e,n);s=a.consumedSegments,o=n.slice(a.lastChild),r=new Ie(s,a.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,Lt(e),i,e.component,e,xt(t),Dt(t)+s.length,Rt(e))}const a=function(e){return e.children?e.children:e.loadChildren?e._loadedConfig.routes:[]}(e),{segmentGroup:c,slicedSegments:l}=Tt(t,s,o,a,this.relativeLinkResolution);if(0===l.length&&c.hasChildren()){const e=this.processChildren(a,c);return[new Ce(r,e)]}if(0===a.length&&0===l.length)return[new Ce(r,[])];const u=this.processSegment(a,c,l,G);return[new Ce(r,u)]}}function xt(e){let t=e;for(;t._sourceSegment;)t=t._sourceSegment;return t}function Dt(e){let t=e,n=t._segmentIndexShift?t._segmentIndexShift:0;for(;t._sourceSegment;)t=t._sourceSegment,n+=t._segmentIndexShift?t._segmentIndexShift:0;return n-1}function Tt(e,t,n,i,r){if(n.length>0&&function(e,t,n){return n.some(n=>Ct(e,t,n)&&Ot(n)!==G)}(e,n,i)){const r=new oe(t,function(e,t,n,i){const r={};r.primary=i,i._sourceSegment=e,i._segmentIndexShift=t.length;for(const s of n)if(""===s.path&&Ot(s)!==G){const n=new oe([],{});n._sourceSegment=e,n._segmentIndexShift=t.length,r[Ot(s)]=n}return r}(e,t,i,new oe(n,e.children)));return r._sourceSegment=e,r._segmentIndexShift=t.length,{segmentGroup:r,slicedSegments:[]}}if(0===n.length&&function(e,t,n){return n.some(n=>Ct(e,t,n))}(e,n,i)){const s=new oe(e.segments,function(e,t,n,i,r,s){const o={};for(const a of i)if(Ct(e,n,a)&&!r[Ot(a)]){const n=new oe([],{});n._sourceSegment=e,n._segmentIndexShift="legacy"===s?e.segments.length:t.length,o[Ot(a)]=n}return Object.assign(Object.assign({},r),o)}(e,t,n,i,e.children,r));return s._sourceSegment=e,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:n}}const s=new oe(e.segments,e.children);return s._sourceSegment=e,s._segmentIndexShift=t.length,{segmentGroup:s,slicedSegments:n}}function Ct(e,t,n){return(!(e.hasChildren()||t.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0===n.redirectTo}function Ot(e){return e.outlet||G}function Lt(e){return e.data||{}}function Rt(e){return e.resolve||{}}function Et(e){return function(t){return t.pipe(Object(g.a)(t=>{const n=e(t);return n?Object(o.a)(n).pipe(Object(p.a)(()=>t)):Object(o.a)([t])}))}}class At extends class{shouldDetach(e){return!1}store(e,t){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,t){return e.routeConfig===t.routeConfig}}{}let It=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=r.Gb({type:e,selectors:[["ng-component"]],decls:1,vars:0,template:function(e,t){1&e&&r.Nb(0,"router-outlet")},directives:function(){return[Zt]},encapsulation:2}),e})();function Pt(e,t=""){for(let n=0;n<e.length;n++){const i=e[n];Nt(i,jt(t,i))}}function Nt(e,t){if(!e)throw new Error(`\n Invalid configuration of route '${t}': Encountered undefined route.\n The reason might be an extra comma.\n\n Example:\n const routes: Routes = [\n { path: '', redirectTo: '/dashboard', pathMatch: 'full' },\n { path: 'dashboard', component: DashboardComponent },, << two commas\n { path: 'detail/:id', component: HeroDetailComponent }\n ];\n `);if(Array.isArray(e))throw new Error(`Invalid configuration of route '${t}': Array cannot be specified`);if(!e.component&&!e.children&&!e.loadChildren&&e.outlet&&e.outlet!==G)throw new Error(`Invalid configuration of route '${t}': a componentless route without children or loadChildren cannot have a named outlet set`);if(e.redirectTo&&e.children)throw new Error(`Invalid configuration of route '${t}': redirectTo and children cannot be used together`);if(e.redirectTo&&e.loadChildren)throw new Error(`Invalid configuration of route '${t}': redirectTo and loadChildren cannot be used together`);if(e.children&&e.loadChildren)throw new Error(`Invalid configuration of route '${t}': children and loadChildren cannot be used together`);if(e.redirectTo&&e.component)throw new Error(`Invalid configuration of route '${t}': redirectTo and component cannot be used together`);if(e.path&&e.matcher)throw new Error(`Invalid configuration of route '${t}': path and matcher cannot be used together`);if(void 0===e.redirectTo&&!e.component&&!e.children&&!e.loadChildren)throw new Error(`Invalid configuration of route '${t}'. One of the following must be provided: component, redirectTo, children or loadChildren`);if(void 0===e.path&&void 0===e.matcher)throw new Error(`Invalid configuration of route '${t}': routes must have either a path or a matcher specified`);if("string"==typeof e.path&&"/"===e.path.charAt(0))throw new Error(`Invalid configuration of route '${t}': path cannot start with a slash`);if(""===e.path&&void 0!==e.redirectTo&&void 0===e.pathMatch)throw new Error(`Invalid configuration of route '{path: "${t}", redirectTo: "${e.redirectTo}"}': please provide 'pathMatch'. The default value of 'pathMatch' is 'prefix', but often the intent is to use 'full'.`);if(void 0!==e.pathMatch&&"full"!==e.pathMatch&&"prefix"!==e.pathMatch)throw new Error(`Invalid configuration of route '${t}': pathMatch can only be set to 'prefix' or 'full'`);e.children&&Pt(e.children,t)}function jt(e,t){return t?e||t.path?e&&!t.path?e+"/":!e&&t.path?t.path:`${e}/${t.path}`:"":e}function Ft(e){const t=e.children&&e.children.map(Ft),n=t?Object.assign(Object.assign({},e),{children:t}):Object.assign({},e);return!n.component&&(t||n.loadChildren)&&n.outlet&&n.outlet!==G&&(n.component=It),n}const Yt=new r.r("ROUTES");class zt{constructor(e,t,n,i){this.loader=e,this.compiler=t,this.onLoadStartListener=n,this.onLoadEndListener=i}load(e,t){return this.onLoadStartListener&&this.onLoadStartListener(t),this.loadModuleFactory(t.loadChildren).pipe(Object(p.a)(n=>{this.onLoadEndListener&&this.onLoadEndListener(t);const i=n.create(e);return new Xe(ee(i.injector.get(Yt)).map(Ft),i)}))}loadModuleFactory(e){return"string"==typeof e?Object(o.a)(this.loader.load(e)):ie(e()).pipe(Object(x.a)(e=>e instanceof r.w?Object(s.a)(e):Object(o.a)(this.compiler.compileModuleAsync(e))))}}class $t{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.children=new Ht,this.attachRef=null}}class Ht{constructor(){this.contexts=new Map}onChildOutletCreated(e,t){const n=this.getOrCreateContext(e);n.outlet=t,this.contexts.set(e,n)}onChildOutletDestroyed(e){const t=this.getContext(e);t&&(t.outlet=null)}onOutletDeactivated(){const e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let t=this.getContext(e);return t||(t=new $t,this.contexts.set(e,t)),t}getContext(e){return this.contexts.get(e)||null}}class Wt{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,t){return e}}function Vt(e){throw e}function Bt(e,t,n){return t.parse("/")}function Ut(e,t){return Object(s.a)(null)}let Gt=(()=>{class e{constructor(e,t,n,i,s,o,c,l){this.rootComponentType=e,this.urlSerializer=t,this.rootContexts=n,this.location=i,this.config=l,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.lastLocationChangeInfo=null,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new f.a,this.errorHandler=Vt,this.malformedUriErrorHandler=Bt,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:Ut,afterPreactivation:Ut},this.urlHandlingStrategy=new Wt,this.routeReuseStrategy=new At,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="legacy",this.ngModule=s.get(r.y),this.console=s.get(r.X);const u=s.get(r.A);this.isNgZoneEnabled=u instanceof r.A,this.resetConfig(l),this.currentUrlTree=new se(new oe([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new zt(o,c,e=>this.triggerEvent(new z(e)),e=>this.triggerEvent(new $(e))),this.routerState=Re(this.currentUrlTree,this.rootComponentType),this.transitions=new a.a({id:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}setupNavigations(e){const t=this.events;return e.pipe(Object(w.a)(e=>0!==e.id),Object(p.a)(e=>Object.assign(Object.assign({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl)})),Object(g.a)(e=>{let n=!1,i=!1;return Object(s.a)(e).pipe(Object(D.a)(e=>{this.currentNavigation={id:e.id,initialUrl:e.currentRawUrl,extractedUrl:e.extractedUrl,trigger:e.source,extras:e.extras,previousNavigation:this.lastSuccessfulNavigation?Object.assign(Object.assign({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),Object(g.a)(e=>{const n=!this.navigated||e.extractedUrl.toString()!==this.browserUrlTree.toString();if(("reload"===this.onSameUrlNavigation||n)&&this.urlHandlingStrategy.shouldProcessUrl(e.rawUrl))return Object(s.a)(e).pipe(Object(g.a)(e=>{const n=this.transitions.getValue();return t.next(new R(e.id,this.serializeUrl(e.extractedUrl),e.source,e.restoredState)),n!==this.transitions.getValue()?d.a:[e]}),Object(g.a)(e=>Promise.resolve(e)),(i=this.ngModule.injector,r=this.configLoader,o=this.urlSerializer,a=this.config,function(e){return e.pipe(Object(g.a)(e=>function(e,t,n,i,r){return new lt(e,t,n,i,r).apply()}(i,r,o,e.extractedUrl,a).pipe(Object(p.a)(t=>Object.assign(Object.assign({},e),{urlAfterRedirects:t})))))}),Object(D.a)(e=>{this.currentNavigation=Object.assign(Object.assign({},this.currentNavigation),{finalUrl:e.urlAfterRedirects})}),function(e,t,n,i,r){return function(s){return s.pipe(Object(x.a)(s=>function(e,t,n,i,r="emptyOnly",s="legacy"){return new kt(e,t,n,i,r,s).recognize()}(e,t,s.urlAfterRedirects,n(s.urlAfterRedirects),i,r).pipe(Object(p.a)(e=>Object.assign(Object.assign({},s),{targetSnapshot:e})))))}}(this.rootComponentType,this.config,e=>this.serializeUrl(e),this.paramsInheritanceStrategy,this.relativeLinkResolution),Object(D.a)(e=>{"eager"===this.urlUpdateStrategy&&(e.extras.skipLocationChange||this.setBrowserUrl(e.urlAfterRedirects,!!e.extras.replaceUrl,e.id,e.extras.state),this.browserUrlTree=e.urlAfterRedirects)}),Object(D.a)(e=>{const n=new P(e.id,this.serializeUrl(e.extractedUrl),this.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);t.next(n)}));var i,r,o,a;if(n&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:n,extractedUrl:i,source:r,restoredState:o,extras:a}=e,c=new R(n,this.serializeUrl(i),r,o);t.next(c);const l=Re(i,this.rootComponentType).snapshot;return Object(s.a)(Object.assign(Object.assign({},e),{targetSnapshot:l,urlAfterRedirects:i,extras:Object.assign(Object.assign({},a),{skipLocationChange:!1,replaceUrl:!1})}))}return this.rawUrlTree=e.rawUrl,this.browserUrlTree=e.urlAfterRedirects,e.resolve(null),d.a}),Et(e=>{const{targetSnapshot:t,id:n,extractedUrl:i,rawUrl:r,extras:{skipLocationChange:s,replaceUrl:o}}=e;return this.hooks.beforePreactivation(t,{navigationId:n,appliedUrlTree:i,rawUrlTree:r,skipLocationChange:!!s,replaceUrl:!!o})}),Object(D.a)(e=>{const t=new N(e.id,this.serializeUrl(e.extractedUrl),this.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);this.triggerEvent(t)}),Object(p.a)(e=>Object.assign(Object.assign({},e),{guards:bt(e.targetSnapshot,e.currentSnapshot,this.rootContexts)})),function(e,t){return function(n){return n.pipe(Object(x.a)(n=>{const{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:a,canDeactivateChecks:c}}=n;return 0===c.length&&0===a.length?Object(s.a)(Object.assign(Object.assign({},n),{guardsResult:!0})):function(e,t,n,i){return Object(o.a)(e).pipe(Object(x.a)(e=>function(e,t,n,i,r){const o=t&&t.routeConfig?t.routeConfig.canDeactivate:null;if(!o||0===o.length)return Object(s.a)(!0);const a=o.map(s=>{const o=gt(s,t,r);let a;if(function(e){return e&&et(e.canDeactivate)}(o))a=ie(o.canDeactivate(e,t,n,i));else{if(!et(o))throw new Error("Invalid CanDeactivate guard");a=ie(o(e,t,n,i))}return a.pipe(Object(k.a)())});return Object(s.a)(a).pipe(it())}(e.component,e.route,n,t,i)),Object(k.a)(e=>!0!==e,!0))}(c,i,r,e).pipe(Object(x.a)(n=>n&&"boolean"==typeof n?function(e,t,n,i){return Object(o.a)(t).pipe(Object(M.a)(t=>Object(o.a)([vt(t.route.parent,i),yt(t.route,i),St(e,t.path,n),wt(e,t.route,n)]).pipe(Object(m.a)(),Object(k.a)(e=>!0!==e,!0))),Object(k.a)(e=>!0!==e,!0))}(i,a,e,t):Object(s.a)(n)),Object(p.a)(e=>Object.assign(Object.assign({},n),{guardsResult:e})))}))}}(this.ngModule.injector,e=>this.triggerEvent(e)),Object(D.a)(e=>{if(tt(e.guardsResult)){const t=Q(`Redirecting to "${this.serializeUrl(e.guardsResult)}"`);throw t.url=e.guardsResult,t}}),Object(D.a)(e=>{const t=new j(e.id,this.serializeUrl(e.extractedUrl),this.serializeUrl(e.urlAfterRedirects),e.targetSnapshot,!!e.guardsResult);this.triggerEvent(t)}),Object(w.a)(e=>{if(!e.guardsResult){this.resetUrlToCurrentUrlTree();const n=new A(e.id,this.serializeUrl(e.extractedUrl),"");return t.next(n),e.resolve(!1),!1}return!0}),Et(e=>{if(e.guards.canActivateChecks.length)return Object(s.a)(e).pipe(Object(D.a)(e=>{const t=new F(e.id,this.serializeUrl(e.extractedUrl),this.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);this.triggerEvent(t)}),Object(g.a)(e=>{let n=!1;return Object(s.a)(e).pipe((i=this.paramsInheritanceStrategy,r=this.ngModule.injector,function(e){return e.pipe(Object(x.a)(e=>{const{targetSnapshot:t,guards:{canActivateChecks:n}}=e;if(!n.length)return Object(s.a)(e);let a=0;return Object(o.a)(n).pipe(Object(M.a)(e=>function(e,t,n,i){return function(e,t,n,i){const r=Object.keys(e);if(0===r.length)return Object(s.a)({});const a={};return Object(o.a)(r).pipe(Object(x.a)(r=>function(e,t,n,i){const r=gt(e,t,i);return ie(r.resolve?r.resolve(t,n):r(t,n))}(e[r],t,n,i).pipe(Object(D.a)(e=>{a[r]=e}))),Object(T.a)(1),Object(x.a)(()=>Object.keys(a).length===r.length?Object(s.a)(a):d.a))}(e._resolve,e,t,i).pipe(Object(p.a)(t=>(e._resolvedData=t,e.data=Object.assign(Object.assign({},e.data),Ae(e,n).resolve),null)))}(e.route,t,i,r)),Object(D.a)(()=>a++),Object(T.a)(1),Object(x.a)(t=>a===n.length?Object(s.a)(e):d.a))}))}),Object(D.a)({next:()=>n=!0,complete:()=>{if(!n){const n=new A(e.id,this.serializeUrl(e.extractedUrl),"At least one route resolver didn't emit any value.");t.next(n),e.resolve(!1)}}}));var i,r}),Object(D.a)(e=>{const t=new Y(e.id,this.serializeUrl(e.extractedUrl),this.serializeUrl(e.urlAfterRedirects),e.targetSnapshot);this.triggerEvent(t)}))}),Et(e=>{const{targetSnapshot:t,id:n,extractedUrl:i,rawUrl:r,extras:{skipLocationChange:s,replaceUrl:o}}=e;return this.hooks.afterPreactivation(t,{navigationId:n,appliedUrlTree:i,rawUrlTree:r,skipLocationChange:!!s,replaceUrl:!!o})}),Object(p.a)(e=>{const t=function(e,t,n){const i=function e(t,n,i){if(i&&t.shouldReuseRoute(n.value,i.value.snapshot)){const r=i.value;r._futureSnapshot=n.value;const s=function(t,n,i){return n.children.map(n=>{for(const r of i.children)if(t.shouldReuseRoute(r.value.snapshot,n.value))return e(t,n,r);return e(t,n)})}(t,n,i);return new Ce(r,s)}{const i=t.retrieve(n.value);if(i){const e=i.route;return function e(t,n){if(t.value.routeConfig!==n.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(t.children.length!==n.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");n.value._futureSnapshot=t.value;for(let i=0;i<t.children.length;++i)e(t.children[i],n.children[i])}(n,e),e}{const i=new Ee(new a.a((r=n.value).url),new a.a(r.params),new a.a(r.queryParams),new a.a(r.fragment),new a.a(r.data),r.outlet,r.component,r),s=n.children.map(n=>e(t,n));return new Ce(i,s)}}var r}(e,t._root,n?n._root:void 0);return new Le(i,t)}(this.routeReuseStrategy,e.targetSnapshot,e.currentRouterState);return Object.assign(Object.assign({},e),{targetRouterState:t})}),Object(D.a)(e=>{this.currentUrlTree=e.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.rawUrl),this.routerState=e.targetRouterState,"deferred"===this.urlUpdateStrategy&&(e.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,!!e.extras.replaceUrl,e.id,e.extras.state),this.browserUrlTree=e.urlAfterRedirects)}),(r=this.rootContexts,c=this.routeReuseStrategy,l=e=>this.triggerEvent(e),Object(p.a)(e=>(new Ke(c,e.targetRouterState,e.currentRouterState,l).activate(r),e))),Object(D.a)({next(){n=!0},complete(){n=!0}}),Object(C.a)(()=>{if(!n&&!i){this.resetUrlToCurrentUrlTree();const n=new A(e.id,this.serializeUrl(e.extractedUrl),`Navigation ID ${e.id} is not equal to the current navigation id ${this.navigationId}`);t.next(n),e.resolve(!1)}this.currentNavigation=null}),Object(S.a)(n=>{if(i=!0,(r=n)&&r.ngNavigationCancelingError){const i=tt(n.url);i||(this.navigated=!0,this.resetStateAndUrl(e.currentRouterState,e.currentUrlTree,e.rawUrl));const r=new A(e.id,this.serializeUrl(e.extractedUrl),n.message);t.next(r),i?setTimeout(()=>{const t=this.urlHandlingStrategy.merge(n.url,this.rawUrlTree);return this.scheduleNavigation(t,"imperative",null,{skipLocationChange:e.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy},{resolve:e.resolve,reject:e.reject,promise:e.promise})},0):e.resolve(!1)}else{this.resetStateAndUrl(e.currentRouterState,e.currentUrlTree,e.rawUrl);const i=new I(e.id,this.serializeUrl(e.extractedUrl),n);t.next(i);try{e.resolve(this.errorHandler(n))}catch(s){e.reject(s)}}var r;return d.a}));var r,c,l}))}resetRootComponentType(e){this.rootComponentType=e,this.routerState.root.component=this.rootComponentType}getTransition(){const e=this.transitions.value;return e.urlAfterRedirects=this.browserUrlTree,e}setTransition(e){this.transitions.next(Object.assign(Object.assign({},this.getTransition()),e))}initialNavigation(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(e=>{const t=this.extractLocationChangeInfoFromEvent(e);this.shouldScheduleNavigation(this.lastLocationChangeInfo,t)&&setTimeout(()=>{const{source:e,state:n,urlTree:i}=t,r={replaceUrl:!0};if(n){const e=Object.assign({},n);delete e.navigationId,0!==Object.keys(e).length&&(r.state=e)}this.scheduleNavigation(i,e,n,r)},0),this.lastLocationChangeInfo=t}))}extractLocationChangeInfoFromEvent(e){var t;return{source:"popstate"===e.type?"popstate":"hashchange",urlTree:this.parseUrl(e.url),state:(null===(t=e.state)||void 0===t?void 0:t.navigationId)?e.state:null,transitionId:this.getTransition().id}}shouldScheduleNavigation(e,t){if(!e)return!0;const n=t.urlTree.toString()===e.urlTree.toString();return!(t.transitionId===e.transitionId&&n&&("hashchange"===t.source&&"popstate"===e.source||"popstate"===t.source&&"hashchange"===e.source))}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(e){this.events.next(e)}resetConfig(e){Pt(e),this.config=e.map(Ft),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0)}createUrlTree(e,t={}){const{relativeTo:n,queryParams:i,fragment:s,preserveQueryParams:o,queryParamsHandling:a,preserveFragment:c}=t;Object(r.U)()&&o&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead.");const l=n||this.routerState.root,u=c?this.currentUrlTree.fragment:s;let d=null;if(a)switch(a){case"merge":d=Object.assign(Object.assign({},this.currentUrlTree.queryParams),i);break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=i||null}else d=o?this.currentUrlTree.queryParams:i||null;return null!==d&&(d=this.removeEmptyProps(d)),function(e,t,n,i,r){if(0===n.length)return $e(t.root,t.root,t,i,r);const s=function(e){if("string"==typeof e[0]&&1===e.length&&"/"===e[0])return new He(!0,0,e);let t=0,n=!1;const i=e.reduce((e,i,r)=>{if("object"==typeof i&&null!=i){if(i.outlets){const t={};return ne(i.outlets,(e,n)=>{t[n]="string"==typeof e?e.split("/"):e}),[...e,{outlets:t}]}if(i.segmentPath)return[...e,i.segmentPath]}return"string"!=typeof i?[...e,i]:0===r?(i.split("/").forEach((i,r)=>{0==r&&"."===i||(0==r&&""===i?n=!0:".."===i?t++:""!=i&&e.push(i))}),e):[...e,i]},[]);return new He(n,t,i)}(n);if(s.toRoot())return $e(t.root,new oe([],{}),t,i,r);const o=function(e,t,n){if(e.isAbsolute)return new We(t.root,!0,0);if(-1===n.snapshot._lastPathIndex){const e=n.snapshot._urlSegment;return new We(e,e===t.root,0)}const i=ze(e.commands[0])?0:1;return function(e,t,n){let i=e,r=t,s=n;for(;s>r;){if(s-=r,i=i.parent,!i)throw new Error("Invalid number of '../'");r=i.segments.length}return new We(i,!1,r-s)}(n.snapshot._urlSegment,n.snapshot._lastPathIndex+i,e.numberOfDoubleDots)}(s,t,e),a=o.processChildren?Ue(o.segmentGroup,o.index,s.commands):Be(o.segmentGroup,o.index,s.commands);return $e(o.segmentGroup,a,t,i,r)}(l,this.currentUrlTree,e,d,u)}navigateByUrl(e,t={skipLocationChange:!1}){Object(r.U)()&&this.isNgZoneEnabled&&!r.A.isInAngularZone()&&this.console.warn("Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?");const n=tt(e)?e:this.parseUrl(e),i=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(i,"imperative",null,t)}navigate(e,t={skipLocationChange:!1}){return function(e){for(let t=0;t<e.length;t++){const n=e[t];if(null==n)throw new Error(`The requested path contains ${n} segment at index ${t}`)}}(e),this.navigateByUrl(this.createUrlTree(e,t),t)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){let t;try{t=this.urlSerializer.parse(e)}catch(n){t=this.malformedUriErrorHandler(n,this.urlSerializer,e)}return t}isActive(e,t){if(tt(e))return re(this.currentUrlTree,e,t);const n=this.parseUrl(e);return re(this.currentUrlTree,n,t)}removeEmptyProps(e){return Object.keys(e).reduce((t,n)=>{const i=e[n];return null!=i&&(t[n]=i),t},{})}processNavigations(){this.navigations.subscribe(e=>{this.navigated=!0,this.lastSuccessfulId=e.id,this.events.next(new E(e.id,this.serializeUrl(e.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,this.currentNavigation=null,e.resolve(!0)},e=>{this.console.warn("Unhandled Navigation Error: ")})}scheduleNavigation(e,t,n,i,r){const s=this.getTransition(),o="imperative"!==t&&"imperative"===(null==s?void 0:s.source),a=(this.lastSuccessfulId===s.id||this.currentNavigation?s.rawUrl:s.urlAfterRedirects).toString()===e.toString();if(o&&a)return Promise.resolve(!0);let c,l,u;r?(c=r.resolve,l=r.reject,u=r.promise):u=new Promise((e,t)=>{c=e,l=t});const d=++this.navigationId;return this.setTransition({id:d,source:t,restoredState:n,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:e,extras:i,resolve:c,reject:l,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch(e=>Promise.reject(e))}setBrowserUrl(e,t,n,i){const r=this.urlSerializer.serialize(e);i=i||{},this.location.isCurrentPathEqualTo(r)||t?this.location.replaceState(r,"",Object.assign(Object.assign({},i),{navigationId:n})):this.location.go(r,"",Object.assign(Object.assign({},i),{navigationId:n}))}resetStateAndUrl(e,t,n){this.routerState=e,this.currentUrlTree=t,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n),this.resetUrlToCurrentUrlTree()}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",{navigationId:this.lastSuccessfulId})}}return e.\u0275fac=function(t){return new(t||e)(r.dc(r.N),r.dc(ue),r.dc(Ht),r.dc(i.m),r.dc(r.s),r.dc(r.x),r.dc(r.i),r.dc(void 0))},e.\u0275prov=r.Ib({token:e,factory:e.\u0275fac}),e})(),qt=(()=>{class e{constructor(e,t,n,i,r){this.router=e,this.route=t,this.commands=[],this.onChanges=new f.a,null==n&&i.setAttribute(r.nativeElement,"tabindex","0")}ngOnChanges(e){this.onChanges.next(this)}set routerLink(e){this.commands=null!=e?Array.isArray(e)?e:[e]:[]}set preserveQueryParams(e){Object(r.U)()&&console&&console.warn&&console.warn("preserveQueryParams is deprecated!, use queryParamsHandling instead."),this.preserve=e}onClick(){const e={skipLocationChange:Qt(this.skipLocationChange),replaceUrl:Qt(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,e),!0}get urlTree(){return this.router.createUrlTree(this.commands,{relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,preserveQueryParams:Qt(this.preserve),queryParamsHandling:this.queryParamsHandling,preserveFragment:Qt(this.preserveFragment)})}}return e.\u0275fac=function(t){return new(t||e)(r.Mb(Gt),r.Mb(Ee),r.ec("tabindex"),r.Mb(r.E),r.Mb(r.m))},e.\u0275dir=r.Hb({type:e,selectors:[["","routerLink","",5,"a",5,"area"]],hostBindings:function(e,t){1&e&&r.gc("click",(function(){return t.onClick()}))},inputs:{routerLink:"routerLink",preserveQueryParams:"preserveQueryParams",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state"},features:[r.wb]}),e})(),Jt=(()=>{class e{constructor(e,t,n){this.router=e,this.route=t,this.locationStrategy=n,this.commands=[],this.onChanges=new f.a,this.subscription=e.events.subscribe(e=>{e instanceof E&&this.updateTargetUrlAndHref()})}set routerLink(e){this.commands=null!=e?Array.isArray(e)?e:[e]:[]}set preserveQueryParams(e){Object(r.U)()&&console&&console.warn&&console.warn("preserveQueryParams is deprecated, use queryParamsHandling instead."),this.preserve=e}ngOnChanges(e){this.updateTargetUrlAndHref(),this.onChanges.next(this)}ngOnDestroy(){this.subscription.unsubscribe()}onClick(e,t,n,i,r){if(0!==e||t||n||i||r)return!0;if("string"==typeof this.target&&"_self"!=this.target)return!0;const s={skipLocationChange:Qt(this.skipLocationChange),replaceUrl:Qt(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,s),!1}updateTargetUrlAndHref(){this.href=this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree))}get urlTree(){return this.router.createUrlTree(this.commands,{relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,preserveQueryParams:Qt(this.preserve),queryParamsHandling:this.queryParamsHandling,preserveFragment:Qt(this.preserveFragment)})}}return e.\u0275fac=function(t){return new(t||e)(r.Mb(Gt),r.Mb(Ee),r.Mb(i.n))},e.\u0275dir=r.Hb({type:e,selectors:[["a","routerLink",""],["area","routerLink",""]],hostVars:2,hostBindings:function(e,t){1&e&&r.gc("click",(function(e){return t.onClick(e.button,e.ctrlKey,e.shiftKey,e.altKey,e.metaKey)})),2&e&&(r.Vb("href",t.href,r.Gc),r.zb("target",t.target))},inputs:{routerLink:"routerLink",preserveQueryParams:"preserveQueryParams",target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state"},features:[r.wb]}),e})();function Qt(e){return""===e||!!e}let Kt=(()=>{class e{constructor(e,t,n,i,r,s){this.router=e,this.element=t,this.renderer=n,this.cdr=i,this.link=r,this.linkWithHref=s,this.classes=[],this.isActive=!1,this.routerLinkActiveOptions={exact:!1},this.routerEventsSubscription=e.events.subscribe(e=>{e instanceof E&&this.update()})}ngAfterContentInit(){Object(o.a)([this.links.changes,this.linksWithHrefs.changes,Object(s.a)(null)]).pipe(Object(O.a)()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){var e;null===(e=this.linkInputChangesSubscription)||void 0===e||e.unsubscribe();const t=[...this.links.toArray(),...this.linksWithHrefs.toArray(),this.link,this.linkWithHref].filter(e=>!!e).map(e=>e.onChanges);this.linkInputChangesSubscription=Object(o.a)(t).pipe(Object(O.a)()).subscribe(e=>{this.isActive!==this.isLinkActive(this.router)(e)&&this.update()})}set routerLinkActive(e){const t=Array.isArray(e)?e:e.split(" ");this.classes=t.filter(e=>!!e)}ngOnChanges(e){this.update()}ngOnDestroy(){var e;this.routerEventsSubscription.unsubscribe(),null===(e=this.linkInputChangesSubscription)||void 0===e||e.unsubscribe()}update(){this.links&&this.linksWithHrefs&&this.router.navigated&&Promise.resolve().then(()=>{const e=this.hasActiveLinks();this.isActive!==e&&(this.isActive=e,this.cdr.markForCheck(),this.classes.forEach(t=>{e?this.renderer.addClass(this.element.nativeElement,t):this.renderer.removeClass(this.element.nativeElement,t)}))})}isLinkActive(e){return t=>e.isActive(t.urlTree,this.routerLinkActiveOptions.exact)}hasActiveLinks(){const e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.linkWithHref&&e(this.linkWithHref)||this.links.some(e)||this.linksWithHrefs.some(e)}}return e.\u0275fac=function(t){return new(t||e)(r.Mb(Gt),r.Mb(r.m),r.Mb(r.E),r.Mb(r.h),r.Mb(qt,8),r.Mb(Jt,8))},e.\u0275dir=r.Hb({type:e,selectors:[["","routerLinkActive",""]],contentQueries:function(e,t,n){var i;1&e&&(r.Fb(n,qt,!0),r.Fb(n,Jt,!0)),2&e&&(r.zc(i=r.hc())&&(t.links=i),r.zc(i=r.hc())&&(t.linksWithHrefs=i))},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",routerLinkActive:"routerLinkActive"},exportAs:["routerLinkActive"],features:[r.wb]}),e})(),Zt=(()=>{class e{constructor(e,t,n,i,s){this.parentContexts=e,this.location=t,this.resolver=n,this.changeDetector=s,this.activated=null,this._activatedRoute=null,this.activateEvents=new r.o,this.deactivateEvents=new r.o,this.name=i||G,e.onChildOutletCreated(this.name,this)}ngOnDestroy(){this.parentContexts.onChildOutletDestroyed(this.name)}ngOnInit(){if(!this.activated){const e=this.parentContexts.getContext(this.name);e&&e.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.resolver||null))}}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();const e=this.activated;return this.activated=null,this._activatedRoute=null,e}attach(e,t){this.activated=e,this._activatedRoute=t,this.location.insert(e.hostView)}deactivate(){if(this.activated){const e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,t){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=e;const n=(t=t||this.resolver).resolveComponentFactory(e._futureSnapshot.routeConfig.component),i=this.parentContexts.getOrCreateContext(this.name).children,r=new Xt(e,i,this.location.injector);this.activated=this.location.createComponent(n,this.location.length,r),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return e.\u0275fac=function(t){return new(t||e)(r.Mb(Ht),r.Mb(r.P),r.Mb(r.j),r.ec("name"),r.Mb(r.h))},e.\u0275dir=r.Hb({type:e,selectors:[["router-outlet"]],outputs:{activateEvents:"activate",deactivateEvents:"deactivate"},exportAs:["outlet"]}),e})();class Xt{constructor(e,t,n){this.route=e,this.childContexts=t,this.parent=n}get(e,t){return e===Ee?this.route:e===Ht?this.childContexts:this.parent.get(e,t)}}class en{}class tn{preload(e,t){return t().pipe(Object(S.a)(()=>Object(s.a)(null)))}}class nn{preload(e,t){return Object(s.a)(null)}}let rn=(()=>{class e{constructor(e,t,n,i,r){this.router=e,this.injector=i,this.preloadingStrategy=r,this.loader=new zt(t,n,t=>e.triggerEvent(new z(t)),t=>e.triggerEvent(new $(t)))}setUpPreloading(){this.subscription=this.router.events.pipe(Object(w.a)(e=>e instanceof E),Object(M.a)(()=>this.preload())).subscribe(()=>{})}preload(){const e=this.injector.get(r.y);return this.processRoutes(e,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(e,t){const n=[];for(const i of t)if(i.loadChildren&&!i.canLoad&&i._loadedConfig){const e=i._loadedConfig;n.push(this.processRoutes(e.module,e.routes))}else i.loadChildren&&!i.canLoad?n.push(this.preloadConfig(e,i)):i.children&&n.push(this.processRoutes(e,i.children));return Object(o.a)(n).pipe(Object(O.a)(),Object(p.a)(e=>{}))}preloadConfig(e,t){return this.preloadingStrategy.preload(t,()=>this.loader.load(e.injector,t).pipe(Object(x.a)(e=>(t._loadedConfig=e,this.processRoutes(e.module,e.routes)))))}}return e.\u0275fac=function(t){return new(t||e)(r.dc(Gt),r.dc(r.x),r.dc(r.i),r.dc(r.s),r.dc(en))},e.\u0275prov=r.Ib({token:e,factory:e.\u0275fac}),e})(),sn=(()=>{class e{constructor(e,t,n={}){this.router=e,this.viewportScroller=t,this.options=n,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},n.scrollPositionRestoration=n.scrollPositionRestoration||"disabled",n.anchorScrolling=n.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.router.events.subscribe(e=>{e instanceof R?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=e.navigationTrigger,this.restoredId=e.restoredState?e.restoredState.navigationId:0):e instanceof E&&(this.lastId=e.id,this.scheduleScrollEvent(e,this.router.parseUrl(e.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.router.events.subscribe(e=>{e instanceof U&&(e.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(e.position):e.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(e.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(e,t){this.router.triggerEvent(new U(e,"popstate"===this.lastSource?this.store[this.restoredId]:null,t))}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}return e.\u0275fac=function(t){return new(t||e)(r.dc(Gt),r.dc(i.D),r.dc(void 0))},e.\u0275prov=r.Ib({token:e,factory:e.\u0275fac}),e})();const on=new r.r("ROUTER_CONFIGURATION"),an=new r.r("ROUTER_FORROOT_GUARD"),cn=[i.m,{provide:ue,useClass:de},{provide:Gt,useFactory:function(e,t,n,r,s,o,a,c={},l,u){const d=new Gt(null,e,t,n,r,s,o,ee(a));if(l&&(d.urlHandlingStrategy=l),u&&(d.routeReuseStrategy=u),c.errorHandler&&(d.errorHandler=c.errorHandler),c.malformedUriErrorHandler&&(d.malformedUriErrorHandler=c.malformedUriErrorHandler),c.enableTracing){const e=Object(i.L)();d.events.subscribe(t=>{e.logGroup("Router Event: "+t.constructor.name),e.log(t.toString()),e.log(t),e.logGroupEnd()})}return c.onSameUrlNavigation&&(d.onSameUrlNavigation=c.onSameUrlNavigation),c.paramsInheritanceStrategy&&(d.paramsInheritanceStrategy=c.paramsInheritanceStrategy),c.urlUpdateStrategy&&(d.urlUpdateStrategy=c.urlUpdateStrategy),c.relativeLinkResolution&&(d.relativeLinkResolution=c.relativeLinkResolution),d},deps:[ue,Ht,i.m,r.s,r.x,r.i,Yt,on,[class{},new r.B],[class{},new r.B]]},Ht,{provide:Ee,useFactory:function(e){return e.routerState.root},deps:[Gt]},{provide:r.x,useClass:r.K},rn,nn,tn,{provide:on,useValue:{enableTracing:!1}}];function ln(){return new r.z("Router",Gt)}let un=(()=>{class e{constructor(e,t){}static forRoot(t,n){return{ngModule:e,providers:[cn,pn(t),{provide:an,useFactory:fn,deps:[[Gt,new r.B,new r.J]]},{provide:on,useValue:n||{}},{provide:i.n,useFactory:hn,deps:[i.z,[new r.q(i.a),new r.B],on]},{provide:sn,useFactory:dn,deps:[Gt,i.D,on]},{provide:en,useExisting:n&&n.preloadingStrategy?n.preloadingStrategy:nn},{provide:r.z,multi:!0,useFactory:ln},[mn,{provide:r.d,multi:!0,useFactory:bn,deps:[mn]},{provide:_n,useFactory:gn,deps:[mn]},{provide:r.b,multi:!0,useExisting:_n}]]}}static forChild(t){return{ngModule:e,providers:[pn(t)]}}}return e.\u0275mod=r.Kb({type:e}),e.\u0275inj=r.Jb({factory:function(t){return new(t||e)(r.dc(an,8),r.dc(Gt,8))}}),e})();function dn(e,t,n){return n.scrollOffset&&t.setOffset(n.scrollOffset),new sn(e,t,n)}function hn(e,t,n={}){return n.useHash?new i.h(e,t):new i.x(e,t)}function fn(e){if(e)throw new Error("RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.");return"guarded"}function pn(e){return[{provide:r.a,multi:!0,useValue:e},{provide:Yt,multi:!0,useValue:e}]}let mn=(()=>{class e{constructor(e){this.injector=e,this.initNavigation=!1,this.resultOfPreactivationDone=new f.a}appInitializer(){return this.injector.get(i.l,Promise.resolve(null)).then(()=>{let e=null;const t=new Promise(t=>e=t),n=this.injector.get(Gt),i=this.injector.get(on);if(this.isLegacyDisabled(i)||this.isLegacyEnabled(i))e(!0);else if("disabled"===i.initialNavigation)n.setUpLocationChangeListener(),e(!0);else{if("enabled"!==i.initialNavigation)throw new Error(`Invalid initialNavigation options: '${i.initialNavigation}'`);n.hooks.afterPreactivation=()=>this.initNavigation?Object(s.a)(null):(this.initNavigation=!0,e(!0),this.resultOfPreactivationDone),n.initialNavigation()}return t})}bootstrapListener(e){const t=this.injector.get(on),n=this.injector.get(rn),i=this.injector.get(sn),s=this.injector.get(Gt),o=this.injector.get(r.g);e===o.components[0]&&(this.isLegacyEnabled(t)?s.initialNavigation():this.isLegacyDisabled(t)&&s.setUpLocationChangeListener(),n.setUpPreloading(),i.init(),s.resetRootComponentType(o.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}isLegacyEnabled(e){return"legacy_enabled"===e.initialNavigation||!0===e.initialNavigation||void 0===e.initialNavigation}isLegacyDisabled(e){return"legacy_disabled"===e.initialNavigation||!1===e.initialNavigation}}return e.\u0275fac=function(t){return new(t||e)(r.dc(r.s))},e.\u0275prov=r.Ib({token:e,factory:e.\u0275fac}),e})();function bn(e){return e.appInitializer.bind(e)}function gn(e){return e.bootstrapListener.bind(e)}const _n=new r.r("Router Initializer")},iSVu:function(e,t,n){var i=n("xs3f"),r=Function.toString;"function"!=typeof i.inspectSource&&(i.inspectSource=function(e){return r.call(e)}),e.exports=i.inspectSource},iYuL:function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),i=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],r=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,i){return e?/-MMM-/.test(i)?n[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"domingo_lunes_martes_mi\xe9rcoles_jueves_viernes_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xe9._jue._vie._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[ma\xf1ana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un d\xeda",dd:"%d d\xedas",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un a\xf1o",yy:"%d a\xf1os"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:1,doy:4},invalidDate:"Fecha inv\xe1lida"})}(n("wd/R"))},insk:function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var i=n("20UP"),r=n("oxzT"),s=n("8Y7J"),o=n("cUpR"),a=n("SVse"),c=n("XFyV"),l=n("/NlG"),u=n("6qls"),d=n("ANnk"),h=n("s7LF");function f(e,t){1&e&&(s.Sb(0,"cd-loading-panel"),s.Wb(1,2),s.Rb())}function p(e,t){1&e&&(s.Sb(0,"cd-alert-panel",3),s.cc(1,4),s.Nb(2,"cd-doc",5),s.Zb(),s.Rb())}function m(e,t){1&e&&(s.Sb(0,"cd-alert-panel",3),s.cc(1,6),s.Nb(2,"cd-doc",5),s.Zb(),s.Rb())}function b(e,t){if(1&e&&(s.Sb(0,"option",20),s.Oc(1),s.Rb()),2&e){const e=t.$implicit;s.pc("ngValue",e.value),s.yb(1),s.Qc("",e.name," ")}}const g=function(e){return[e]};function _(e,t){if(1&e){const e=s.Tb();s.Qb(0),s.Sb(1,"div",7),s.Sb(2,"div",8),s.Sb(3,"div",9),s.Sb(4,"label",10),s.Wb(5,11),s.Rb(),s.Sb(6,"select",12),s.gc("ngModelChange",(function(t){return s.Dc(e),s.ic().time=t}))("ngModelChange",(function(t){return s.Dc(e),s.ic().onTimepickerChange(t)})),s.Mc(7,b,2,2,"option",13),s.Rb(),s.Sb(8,"button",14),s.Yb(9,15),s.gc("click",(function(){return s.Dc(e),s.ic().reset()})),s.Nb(10,"i",16),s.Rb(),s.Rb(),s.Rb(),s.Rb(),s.Sb(11,"div",7),s.Sb(12,"div",8),s.Sb(13,"div",17),s.Nb(14,"iframe",18,19),s.Rb(),s.Rb(),s.Rb(),s.Pb()}if(2&e){const e=s.ic();s.yb(6),s.pc("ngModel",e.time),s.yb(1),s.pc("ngForOf",e.grafanaTimes),s.yb(3),s.pc("ngClass",s.uc(5,g,e.icons.undo)),s.yb(4),s.pc("src",e.grafanaSrc,s.Fc)("ngClass",e.panelStyle)}}let y=(()=>{class e{constructor(e,t){this.sanitizer=e,this.settingsService=t,this.grafanaExist=!1,this.mode="&kiosk",this.loading=!0,this.styles={},this.dashboardExist=!0,this.icons=r.a,this.DEFAULT_TIME="from=now-1h&to=now",this.grafanaTimes=[{name:"Last 5 minutes",value:"from=now-5m&to=now"},{name:"Last 15 minutes",value:"from=now-15m&to=now"},{name:"Last 30 minutes",value:"from=now-30m&to=now"},{name:"Last 1 hour (Default)",value:"from=now-1h&to=now"},{name:"Last 3 hours",value:"from=now-3h&to=now"},{name:"Last 6 hours",value:"from=now-6h&to=now"},{name:"Last 12 hours",value:"from=now-12h&to=now"},{name:"Last 24 hours",value:"from=now-24h&to=now"},{name:"Yesterday",value:"from=now-1d%2Fd&to=now-1d%2Fd"},{name:"Today so far",value:"from=now%2Fd&to=now"},{name:"Day before yesterday",value:"from=now-2d%2Fd&to=now-2d%2Fd"},{name:"Last 2 days",value:"from=now-2d&to=now"},{name:"This day last week",value:"from=now-7d%2Fd&to=now-7d%2Fd"},{name:"Previous week",value:"from=now-1w%2Fw&to=now-1w%2Fw"},{name:"This week so far",value:"from=now%2Fw&to=now"},{name:"Last 7 days",value:"from=now-7d&to=now"},{name:"Previous month",value:"from=now-1M%2FM&to=now-1M%2FM"},{name:"This month so far",value:"from=now%2FM&to=now"},{name:"Last 30 days",value:"from=now-30d&to=now"},{name:"Last 90 days",value:"from=now-90d&to=now"},{name:"Last 6 months",value:"from=now-6M&to=now"},{name:"Last 1 year",value:"from=now-1y&to=now"},{name:"Previous year",value:"from=now-1y%2Fy&to=now-1y%2Fy"},{name:"This year so far",value:"from=now%2Fy&to=now"},{name:"Last 2 years",value:"from=now-2y&to=now"},{name:"Last 5 years",value:"from=now-5y&to=now"}]}ngOnInit(){this.time=this.DEFAULT_TIME,this.styles={one:"grafana_one",two:"grafana_two",three:"grafana_three",four:"grafana_four"},this.settingsService.ifSettingConfigured("api/grafana/url",e=>{this.grafanaExist=!0,this.loading=!1,this.baseUrl=e+"/d/",this.getFrame()}),this.panelStyle=this.styles[this.grafanaStyle]}getFrame(){this.settingsService.validateGrafanaDashboardUrl(this.uid).subscribe(e=>this.dashboardExist=200===e),this.url=this.baseUrl+this.uid+"/"+this.grafanaPath+"&refresh=2s"+this.mode+"&"+this.time,this.grafanaSrc=this.sanitizer.bypassSecurityTrustResourceUrl(this.url)}onTimepickerChange(){this.grafanaExist&&this.getFrame()}reset(){this.time=this.DEFAULT_TIME,this.grafanaExist&&this.getFrame()}ngOnChanges(){this.grafanaExist&&this.getFrame()}}return e.\u0275fac=function(t){return new(t||e)(s.Mb(o.b),s.Mb(i.a))},e.\u0275cmp=s.Gb({type:e,selectors:[["cd-grafana"]],inputs:{grafanaPath:"grafanaPath",grafanaStyle:"grafanaStyle",uid:"uid"},features:[s.wb],decls:4,vars:4,consts:function(){return[[4,"ngIf"],["type","info",4,"ngIf"],"Loading panel data...",["type","info"],"Please consult the " + "\ufffd#2\ufffd" + "" + "\ufffd/#2\ufffd" + " on how to configure and enable the monitoring functionality.",["section","grafana"],"Grafana Dashboard doesn't exist. Please refer to " + "\ufffd#2\ufffd" + "" + "\ufffd/#2\ufffd" + " on how to add dashboards to Grafana.",[1,"row"],[1,"col"],[1,"form-inline","timepicker"],["for","timepicker",1,"ml-1","my-1"],"Grafana Time Picker",["id","timepicker","name","timepicker",1,"custom-select","my-1","mx-3",3,"ngModel","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"btn","btn-light","my-1",3,"click",6,"title"],["title","Reset Settings"],[3,"ngClass"],[1,"grafana-container"],["id","iframe","frameborder","0","scrolling","no",1,"grafana",3,"src","ngClass"],["iframe",""],[3,"ngValue"]]},template:function(e,t){1&e&&(s.Mc(0,f,2,0,"cd-loading-panel",0),s.Mc(1,p,3,0,"cd-alert-panel",1),s.Mc(2,m,3,0,"cd-alert-panel",1),s.Mc(3,_,16,7,"ng-container",0)),2&e&&(s.pc("ngIf",t.loading&&t.grafanaExist),s.yb(1),s.pc("ngIf",!t.grafanaExist),s.yb(1),s.pc("ngIf",!t.dashboardExist),s.yb(1),s.pc("ngIf",t.grafanaExist&&t.dashboardExist))},directives:[a.r,c.a,l.a,u.a,d.a,h.z,h.q,h.t,a.q,a.p,h.u,h.B],styles:[".grafana[_ngcontent-%COMP%]{height:600px;width:100%;z-index:0}.grafana_one[_ngcontent-%COMP%]{height:400px}.grafana_two[_ngcontent-%COMP%]{height:750px}.grafana_three[_ngcontent-%COMP%]{height:900px}.grafana_four[_ngcontent-%COMP%]{height:1160px}.timepicker[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-weight:700}.dropdown-menu[_ngcontent-%COMP%]{left:auto;right:20px;top:20px}"]}),e})()},iqWW:function(e,t,n){"use strict";var i=n("ZUd8").charAt;e.exports=function(e,t,n){return t+(n?i(e,t).length:1)}},itXk:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i=n("z+Ro"),r=n("DH7j"),s=n("l7GE"),o=n("ZUHj"),a=n("yCtX");const c={};function l(...e){let t=void 0,n=void 0;return Object(i.a)(e[e.length-1])&&(n=e.pop()),"function"==typeof e[e.length-1]&&(t=e.pop()),1===e.length&&Object(r.a)(e[0])&&(e=e[0]),Object(a.a)(e,n).lift(new u(t))}class u{constructor(e){this.resultSelector=e}call(e,t){return t.subscribe(new d(e,this.resultSelector))}}class d extends s.a{constructor(e,t){super(e),this.resultSelector=t,this.active=0,this.values=[],this.observables=[]}_next(e){this.values.push(c),this.observables.push(e)}_complete(){const e=this.observables,t=e.length;if(0===t)this.destination.complete();else{this.active=t,this.toRespond=t;for(let n=0;n<t;n++){const t=e[n];this.add(Object(o.a)(this,t,void 0,n))}}}notifyComplete(e){0==(this.active-=1)&&this.destination.complete()}notifyNext(e,t,n){const i=this.values,r=this.toRespond?i[n]===c?--this.toRespond:this.toRespond:0;i[n]=t,0===r&&(this.resultSelector?this._tryResultSelector(i):this.destination.next(i.slice()))}_tryResultSelector(e){let t;try{t=this.resultSelector.apply(this,e)}catch(n){return void this.destination.error(n)}this.destination.next(t)}}},"jKX/":function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));class i{constructor(e=[]){["read","create","update","delete"].forEach(t=>this[t]=e.includes(t))}}class r{constructor(e){this.hosts=new i(e.hosts),this.configOpt=new i(e["config-opt"]),this.pool=new i(e.pool),this.osd=new i(e.osd),this.monitor=new i(e.monitor),this.rbdImage=new i(e["rbd-image"]),this.iscsi=new i(e.iscsi),this.rbdMirroring=new i(e["rbd-mirroring"]),this.rgw=new i(e.rgw),this.cephfs=new i(e.cephfs),this.manager=new i(e.manager),this.log=new i(e.log),this.user=new i(e.user),this.grafana=new i(e.grafana),this.prometheus=new i(e.prometheus),this.nfs=new i(e["nfs-ganesha"])}}},jUeY:function(e,t,n){!function(e){"use strict";e.defineLocale("el",{monthsNominativeEl:"\u0399\u03b1\u03bd\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2_\u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2_\u039c\u03ac\u03c1\u03c4\u03b9\u03bf\u03c2_\u0391\u03c0\u03c1\u03af\u03bb\u03b9\u03bf\u03c2_\u039c\u03ac\u03b9\u03bf\u03c2_\u0399\u03bf\u03cd\u03bd\u03b9\u03bf\u03c2_\u0399\u03bf\u03cd\u03bb\u03b9\u03bf\u03c2_\u0391\u03cd\u03b3\u03bf\u03c5\u03c3\u03c4\u03bf\u03c2_\u03a3\u03b5\u03c0\u03c4\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2_\u039f\u03ba\u03c4\u03ce\u03b2\u03c1\u03b9\u03bf\u03c2_\u039d\u03bf\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2_\u0394\u03b5\u03ba\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2".split("_"),monthsGenitiveEl:"\u0399\u03b1\u03bd\u03bf\u03c5\u03b1\u03c1\u03af\u03bf\u03c5_\u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03b1\u03c1\u03af\u03bf\u03c5_\u039c\u03b1\u03c1\u03c4\u03af\u03bf\u03c5_\u0391\u03c0\u03c1\u03b9\u03bb\u03af\u03bf\u03c5_\u039c\u03b1\u0390\u03bf\u03c5_\u0399\u03bf\u03c5\u03bd\u03af\u03bf\u03c5_\u0399\u03bf\u03c5\u03bb\u03af\u03bf\u03c5_\u0391\u03c5\u03b3\u03bf\u03cd\u03c3\u03c4\u03bf\u03c5_\u03a3\u03b5\u03c0\u03c4\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5_\u039f\u03ba\u03c4\u03c9\u03b2\u03c1\u03af\u03bf\u03c5_\u039d\u03bf\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5_\u0394\u03b5\u03ba\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5".split("_"),months:function(e,t){return e?"string"==typeof t&&/D/.test(t.substring(0,t.indexOf("MMMM")))?this._monthsGenitiveEl[e.month()]:this._monthsNominativeEl[e.month()]:this._monthsNominativeEl},monthsShort:"\u0399\u03b1\u03bd_\u03a6\u03b5\u03b2_\u039c\u03b1\u03c1_\u0391\u03c0\u03c1_\u039c\u03b1\u03ca_\u0399\u03bf\u03c5\u03bd_\u0399\u03bf\u03c5\u03bb_\u0391\u03c5\u03b3_\u03a3\u03b5\u03c0_\u039f\u03ba\u03c4_\u039d\u03bf\u03b5_\u0394\u03b5\u03ba".split("_"),weekdays:"\u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae_\u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1_\u03a4\u03c1\u03af\u03c4\u03b7_\u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7_\u03a0\u03ad\u03bc\u03c0\u03c4\u03b7_\u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae_\u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf".split("_"),weekdaysShort:"\u039a\u03c5\u03c1_\u0394\u03b5\u03c5_\u03a4\u03c1\u03b9_\u03a4\u03b5\u03c4_\u03a0\u03b5\u03bc_\u03a0\u03b1\u03c1_\u03a3\u03b1\u03b2".split("_"),weekdaysMin:"\u039a\u03c5_\u0394\u03b5_\u03a4\u03c1_\u03a4\u03b5_\u03a0\u03b5_\u03a0\u03b1_\u03a3\u03b1".split("_"),meridiem:function(e,t,n){return e>11?n?"\u03bc\u03bc":"\u039c\u039c":n?"\u03c0\u03bc":"\u03a0\u039c"},isPM:function(e){return"\u03bc"===(e+"").toLowerCase()[0]},meridiemParse:/[\u03a0\u039c]\.?\u039c?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[\u03a3\u03ae\u03bc\u03b5\u03c1\u03b1 {}] LT",nextDay:"[\u0391\u03cd\u03c1\u03b9\u03bf {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[\u03a7\u03b8\u03b5\u03c2 {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[\u03c4\u03bf \u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03bf] dddd [{}] LT";default:return"[\u03c4\u03b7\u03bd \u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03b7] dddd [{}] LT"}},sameElse:"L"},calendar:function(e,t){var n,i=this._calendarEl[e],r=t&&t.hours();return n=i,("undefined"!=typeof Function&&n instanceof Function||"[object Function]"===Object.prototype.toString.call(n))&&(i=i.apply(t)),i.replace("{}",r%12==1?"\u03c3\u03c4\u03b7":"\u03c3\u03c4\u03b9\u03c2")},relativeTime:{future:"\u03c3\u03b5 %s",past:"%s \u03c0\u03c1\u03b9\u03bd",s:"\u03bb\u03af\u03b3\u03b1 \u03b4\u03b5\u03c5\u03c4\u03b5\u03c1\u03cc\u03bb\u03b5\u03c0\u03c4\u03b1",ss:"%d \u03b4\u03b5\u03c5\u03c4\u03b5\u03c1\u03cc\u03bb\u03b5\u03c0\u03c4\u03b1",m:"\u03ad\u03bd\u03b1 \u03bb\u03b5\u03c0\u03c4\u03cc",mm:"%d \u03bb\u03b5\u03c0\u03c4\u03ac",h:"\u03bc\u03af\u03b1 \u03ce\u03c1\u03b1",hh:"%d \u03ce\u03c1\u03b5\u03c2",d:"\u03bc\u03af\u03b1 \u03bc\u03ad\u03c1\u03b1",dd:"%d \u03bc\u03ad\u03c1\u03b5\u03c2",M:"\u03ad\u03bd\u03b1\u03c2 \u03bc\u03ae\u03bd\u03b1\u03c2",MM:"%d \u03bc\u03ae\u03bd\u03b5\u03c2",y:"\u03ad\u03bd\u03b1\u03c2 \u03c7\u03c1\u03cc\u03bd\u03bf\u03c2",yy:"%d \u03c7\u03c1\u03cc\u03bd\u03b9\u03b1"},dayOfMonthOrdinalParse:/\d{1,2}\u03b7/,ordinal:"%d\u03b7",week:{dow:1,doy:4}})}(n("wd/R"))},jVDg:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));class i{constructor(e,t,n){this.poolName=e,this.namespace=t,this.imageName=n}static fromString(e){const t=e.split("/");return new this(t[0],t.length>=3?t[1]:null,t.length>=3?t[2]:t[1])}getNameSpace(){return this.namespace?this.namespace+"/":""}toString(){return`${this.poolName}/${this.getNameSpace()}${this.imageName}`}toStringEncoded(){return encodeURIComponent(`${this.poolName}/${this.getNameSpace()}${this.imageName}`)}}},jVdC:function(e,t,n){!function(e){"use strict";var t="stycze\u0144_luty_marzec_kwiecie\u0144_maj_czerwiec_lipiec_sierpie\u0144_wrzesie\u0144_pa\u017adziernik_listopad_grudzie\u0144".split("_"),n="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_wrze\u015bnia_pa\u017adziernika_listopada_grudnia".split("_"),i=[/^sty/i,/^lut/i,/^mar/i,/^kwi/i,/^maj/i,/^cze/i,/^lip/i,/^sie/i,/^wrz/i,/^pa\u017a/i,/^lis/i,/^gru/i];function r(e){return e%10<5&&e%10>1&&~~(e/10)%10!=1}function s(e,t,n){var i=e+" ";switch(n){case"ss":return i+(r(e)?"sekundy":"sekund");case"m":return t?"minuta":"minut\u0119";case"mm":return i+(r(e)?"minuty":"minut");case"h":return t?"godzina":"godzin\u0119";case"hh":return i+(r(e)?"godziny":"godzin");case"ww":return i+(r(e)?"tygodnie":"tygodni");case"MM":return i+(r(e)?"miesi\u0105ce":"miesi\u0119cy");case"yy":return i+(r(e)?"lata":"lat")}}e.defineLocale("pl",{months:function(e,i){return e?/D MMMM/.test(i)?n[e.month()]:t[e.month()]:t},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_pa\u017a_lis_gru".split("_"),monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"niedziela_poniedzia\u0142ek_wtorek_\u015broda_czwartek_pi\u0105tek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_\u015br_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_\u015ar_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dzi\u015b o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedziel\u0119 o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W \u015brod\u0119 o] LT";case 6:return"[W sobot\u0119 o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zesz\u0142\u0105 niedziel\u0119 o] LT";case 3:return"[W zesz\u0142\u0105 \u015brod\u0119 o] LT";case 6:return"[W zesz\u0142\u0105 sobot\u0119 o] LT";default:return"[W zesz\u0142y] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:s,m:s,mm:s,h:s,hh:s,d:"1 dzie\u0144",dd:"%d dni",w:"tydzie\u0144",ww:s,M:"miesi\u0105c",MM:s,y:"rok",yy:s},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},jZKg:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("HDdC"),r=n("quSY");function s(e,t){return new i.a(n=>{const i=new r.a;let s=0;return i.add(t.schedule((function(){s!==e.length?(n.next(e[s++]),n.closed||i.add(this.schedule())):n.complete()}))),i})}},jfSC:function(e,t,n){!function(e){"use strict";var t={1:"\u06f1",2:"\u06f2",3:"\u06f3",4:"\u06f4",5:"\u06f5",6:"\u06f6",7:"\u06f7",8:"\u06f8",9:"\u06f9",0:"\u06f0"},n={"\u06f1":"1","\u06f2":"2","\u06f3":"3","\u06f4":"4","\u06f5":"5","\u06f6":"6","\u06f7":"7","\u06f8":"8","\u06f9":"9","\u06f0":"0"};e.defineLocale("fa",{months:"\u0698\u0627\u0646\u0648\u06cc\u0647_\u0641\u0648\u0631\u06cc\u0647_\u0645\u0627\u0631\u0633_\u0622\u0648\u0631\u06cc\u0644_\u0645\u0647_\u0698\u0648\u0626\u0646_\u0698\u0648\u0626\u06cc\u0647_\u0627\u0648\u062a_\u0633\u067e\u062a\u0627\u0645\u0628\u0631_\u0627\u06a9\u062a\u0628\u0631_\u0646\u0648\u0627\u0645\u0628\u0631_\u062f\u0633\u0627\u0645\u0628\u0631".split("_"),monthsShort:"\u0698\u0627\u0646\u0648\u06cc\u0647_\u0641\u0648\u0631\u06cc\u0647_\u0645\u0627\u0631\u0633_\u0622\u0648\u0631\u06cc\u0644_\u0645\u0647_\u0698\u0648\u0626\u0646_\u0698\u0648\u0626\u06cc\u0647_\u0627\u0648\u062a_\u0633\u067e\u062a\u0627\u0645\u0628\u0631_\u0627\u06a9\u062a\u0628\u0631_\u0646\u0648\u0627\u0645\u0628\u0631_\u062f\u0633\u0627\u0645\u0628\u0631".split("_"),weekdays:"\u06cc\u06a9\u200c\u0634\u0646\u0628\u0647_\u062f\u0648\u0634\u0646\u0628\u0647_\u0633\u0647\u200c\u0634\u0646\u0628\u0647_\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647_\u067e\u0646\u062c\u200c\u0634\u0646\u0628\u0647_\u062c\u0645\u0639\u0647_\u0634\u0646\u0628\u0647".split("_"),weekdaysShort:"\u06cc\u06a9\u200c\u0634\u0646\u0628\u0647_\u062f\u0648\u0634\u0646\u0628\u0647_\u0633\u0647\u200c\u0634\u0646\u0628\u0647_\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647_\u067e\u0646\u062c\u200c\u0634\u0646\u0628\u0647_\u062c\u0645\u0639\u0647_\u0634\u0646\u0628\u0647".split("_"),weekdaysMin:"\u06cc_\u062f_\u0633_\u0686_\u067e_\u062c_\u0634".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/\u0642\u0628\u0644 \u0627\u0632 \u0638\u0647\u0631|\u0628\u0639\u062f \u0627\u0632 \u0638\u0647\u0631/,isPM:function(e){return/\u0628\u0639\u062f \u0627\u0632 \u0638\u0647\u0631/.test(e)},meridiem:function(e,t,n){return e<12?"\u0642\u0628\u0644 \u0627\u0632 \u0638\u0647\u0631":"\u0628\u0639\u062f \u0627\u0632 \u0638\u0647\u0631"},calendar:{sameDay:"[\u0627\u0645\u0631\u0648\u0632 \u0633\u0627\u0639\u062a] LT",nextDay:"[\u0641\u0631\u062f\u0627 \u0633\u0627\u0639\u062a] LT",nextWeek:"dddd [\u0633\u0627\u0639\u062a] LT",lastDay:"[\u062f\u06cc\u0631\u0648\u0632 \u0633\u0627\u0639\u062a] LT",lastWeek:"dddd [\u067e\u06cc\u0634] [\u0633\u0627\u0639\u062a] LT",sameElse:"L"},relativeTime:{future:"\u062f\u0631 %s",past:"%s \u067e\u06cc\u0634",s:"\u0686\u0646\u062f \u062b\u0627\u0646\u06cc\u0647",ss:"%d \u062b\u0627\u0646\u06cc\u0647",m:"\u06cc\u06a9 \u062f\u0642\u06cc\u0642\u0647",mm:"%d \u062f\u0642\u06cc\u0642\u0647",h:"\u06cc\u06a9 \u0633\u0627\u0639\u062a",hh:"%d \u0633\u0627\u0639\u062a",d:"\u06cc\u06a9 \u0631\u0648\u0632",dd:"%d \u0631\u0648\u0632",M:"\u06cc\u06a9 \u0645\u0627\u0647",MM:"%d \u0645\u0627\u0647",y:"\u06cc\u06a9 \u0633\u0627\u0644",yy:"%d \u0633\u0627\u0644"},preparse:function(e){return e.replace(/[\u06f0-\u06f9]/g,(function(e){return n[e]})).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"\u060c")},dayOfMonthOrdinalParse:/\d{1,2}\u0645/,ordinal:"%d\u0645",week:{dow:6,doy:12}})}(n("wd/R"))},jnO4:function(e,t,n){!function(e){"use strict";var t={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},n={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"},i=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},r={s:["\u0623\u0642\u0644 \u0645\u0646 \u062b\u0627\u0646\u064a\u0629","\u062b\u0627\u0646\u064a\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062b\u0627\u0646\u064a\u062a\u0627\u0646","\u062b\u0627\u0646\u064a\u062a\u064a\u0646"],"%d \u062b\u0648\u0627\u0646","%d \u062b\u0627\u0646\u064a\u0629","%d \u062b\u0627\u0646\u064a\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062f\u0642\u064a\u0642\u0629","\u062f\u0642\u064a\u0642\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062f\u0642\u064a\u0642\u062a\u0627\u0646","\u062f\u0642\u064a\u0642\u062a\u064a\u0646"],"%d \u062f\u0642\u0627\u0626\u0642","%d \u062f\u0642\u064a\u0642\u0629","%d \u062f\u0642\u064a\u0642\u0629"],h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062d\u062f\u0629",["\u0633\u0627\u0639\u062a\u0627\u0646","\u0633\u0627\u0639\u062a\u064a\u0646"],"%d \u0633\u0627\u0639\u0627\u062a","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064a\u0648\u0645","\u064a\u0648\u0645 \u0648\u0627\u062d\u062f",["\u064a\u0648\u0645\u0627\u0646","\u064a\u0648\u0645\u064a\u0646"],"%d \u0623\u064a\u0627\u0645","%d \u064a\u0648\u0645\u064b\u0627","%d \u064a\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062d\u062f",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064a\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062d\u062f",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064a\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064b\u0627","%d \u0639\u0627\u0645"]},s=function(e){return function(t,n,s,o){var a=i(t),c=r[e][i(t)];return 2===a&&(c=c[n?0:1]),c.replace(/%d/i,t)}},o=["\u064a\u0646\u0627\u064a\u0631","\u0641\u0628\u0631\u0627\u064a\u0631","\u0645\u0627\u0631\u0633","\u0623\u0628\u0631\u064a\u0644","\u0645\u0627\u064a\u0648","\u064a\u0648\u0646\u064a\u0648","\u064a\u0648\u0644\u064a\u0648","\u0623\u063a\u0633\u0637\u0633","\u0633\u0628\u062a\u0645\u0628\u0631","\u0623\u0643\u062a\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062f\u064a\u0633\u0645\u0628\u0631"];e.defineLocale("ar",{months:o,monthsShort:o,weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200fM/\u200fYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,t,n){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u064b\u0627 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062f %s",past:"\u0645\u0646\u0630 %s",s:s("s"),ss:s("s"),m:s("m"),mm:s("m"),h:s("h"),hh:s("h"),d:s("d"),dd:s("d"),M:s("M"),MM:s("M"),y:s("y"),yy:s("y")},preparse:function(e){return e.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,(function(e){return n[e]})).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"\u060c")},week:{dow:6,doy:12}})}(n("wd/R"))},jtHE:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var i=n("XNiG"),r=n("3N8a");class s extends r.a{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}schedule(e,t=0){return t>0?super.schedule(e,t):(this.delay=t,this.state=e,this.scheduler.flush(this),this)}execute(e,t){return t>0||this.closed?super.execute(e,t):this._execute(e,t)}requestAsyncId(e,t,n=0){return null!==n&&n>0||null===n&&this.delay>0?super.requestAsyncId(e,t,n):e.flush(this)}}var o=n("IjjT");class a extends o.a{}const c=new a(s);var l=n("quSY"),u=n("pxpQ"),d=n("9ppp"),h=n("Ylt2");class f extends i.a{constructor(e=Number.POSITIVE_INFINITY,t=Number.POSITIVE_INFINITY,n){super(),this.scheduler=n,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=e<1?1:e,this._windowTime=t<1?1:t,t===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(e){if(!this.isStopped){const t=this._events;t.push(e),t.length>this._bufferSize&&t.shift()}super.next(e)}nextTimeWindow(e){this.isStopped||(this._events.push(new p(this._getNow(),e)),this._trimBufferThenGetEvents()),super.next(e)}_subscribe(e){const t=this._infiniteTimeWindow,n=t?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,r=n.length;let s;if(this.closed)throw new d.a;if(this.isStopped||this.hasError?s=l.a.EMPTY:(this.observers.push(e),s=new h.a(this,e)),i&&e.add(e=new u.a(e,i)),t)for(let o=0;o<r&&!e.closed;o++)e.next(n[o]);else for(let o=0;o<r&&!e.closed;o++)e.next(n[o].value);return this.hasError?e.error(this.thrownError):this.isStopped&&e.complete(),s}_getNow(){return(this.scheduler||c).now()}_trimBufferThenGetEvents(){const e=this._getNow(),t=this._bufferSize,n=this._windowTime,i=this._events,r=i.length;let s=0;for(;s<r&&!(e-i[s].time<n);)s++;return r>t&&(s=Math.max(s,r-t)),s>0&&i.splice(0,s),i}}class p{constructor(e,t){this.time=e,this.value=t}}},kEOa:function(e,t,n){!function(e){"use strict";var t={1:"\u09e7",2:"\u09e8",3:"\u09e9",4:"\u09ea",5:"\u09eb",6:"\u09ec",7:"\u09ed",8:"\u09ee",9:"\u09ef",0:"\u09e6"},n={"\u09e7":"1","\u09e8":"2","\u09e9":"3","\u09ea":"4","\u09eb":"5","\u09ec":"6","\u09ed":"7","\u09ee":"8","\u09ef":"9","\u09e6":"0"};e.defineLocale("bn",{months:"\u099c\u09be\u09a8\u09c1\u09df\u09be\u09b0\u09bf_\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1\u09df\u09be\u09b0\u09bf_\u09ae\u09be\u09b0\u09cd\u099a_\u098f\u09aa\u09cd\u09b0\u09bf\u09b2_\u09ae\u09c7_\u099c\u09c1\u09a8_\u099c\u09c1\u09b2\u09be\u0987_\u0986\u0997\u09b8\u09cd\u099f_\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0_\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0_\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0_\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0".split("_"),monthsShort:"\u099c\u09be\u09a8\u09c1_\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1_\u09ae\u09be\u09b0\u09cd\u099a_\u098f\u09aa\u09cd\u09b0\u09bf\u09b2_\u09ae\u09c7_\u099c\u09c1\u09a8_\u099c\u09c1\u09b2\u09be\u0987_\u0986\u0997\u09b8\u09cd\u099f_\u09b8\u09c7\u09aa\u09cd\u099f_\u0985\u0995\u09cd\u099f\u09cb_\u09a8\u09ad\u09c7_\u09a1\u09bf\u09b8\u09c7".split("_"),weekdays:"\u09b0\u09ac\u09bf\u09ac\u09be\u09b0_\u09b8\u09cb\u09ae\u09ac\u09be\u09b0_\u09ae\u0999\u09cd\u0997\u09b2\u09ac\u09be\u09b0_\u09ac\u09c1\u09a7\u09ac\u09be\u09b0_\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf\u09ac\u09be\u09b0_\u09b6\u09c1\u0995\u09cd\u09b0\u09ac\u09be\u09b0_\u09b6\u09a8\u09bf\u09ac\u09be\u09b0".split("_"),weekdaysShort:"\u09b0\u09ac\u09bf_\u09b8\u09cb\u09ae_\u09ae\u0999\u09cd\u0997\u09b2_\u09ac\u09c1\u09a7_\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf_\u09b6\u09c1\u0995\u09cd\u09b0_\u09b6\u09a8\u09bf".split("_"),weekdaysMin:"\u09b0\u09ac\u09bf_\u09b8\u09cb\u09ae_\u09ae\u0999\u09cd\u0997\u09b2_\u09ac\u09c1\u09a7_\u09ac\u09c3\u09b9_\u09b6\u09c1\u0995\u09cd\u09b0_\u09b6\u09a8\u09bf".split("_"),longDateFormat:{LT:"A h:mm \u09b8\u09ae\u09df",LTS:"A h:mm:ss \u09b8\u09ae\u09df",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u09b8\u09ae\u09df",LLLL:"dddd, D MMMM YYYY, A h:mm \u09b8\u09ae\u09df"},calendar:{sameDay:"[\u0986\u099c] LT",nextDay:"[\u0986\u0997\u09be\u09ae\u09c0\u0995\u09be\u09b2] LT",nextWeek:"dddd, LT",lastDay:"[\u0997\u09a4\u0995\u09be\u09b2] LT",lastWeek:"[\u0997\u09a4] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u09aa\u09b0\u09c7",past:"%s \u0986\u0997\u09c7",s:"\u0995\u09df\u09c7\u0995 \u09b8\u09c7\u0995\u09c7\u09a8\u09cd\u09a1",ss:"%d \u09b8\u09c7\u0995\u09c7\u09a8\u09cd\u09a1",m:"\u098f\u0995 \u09ae\u09bf\u09a8\u09bf\u099f",mm:"%d \u09ae\u09bf\u09a8\u09bf\u099f",h:"\u098f\u0995 \u0998\u09a8\u09cd\u099f\u09be",hh:"%d \u0998\u09a8\u09cd\u099f\u09be",d:"\u098f\u0995 \u09a6\u09bf\u09a8",dd:"%d \u09a6\u09bf\u09a8",M:"\u098f\u0995 \u09ae\u09be\u09b8",MM:"%d \u09ae\u09be\u09b8",y:"\u098f\u0995 \u09ac\u099b\u09b0",yy:"%d \u09ac\u099b\u09b0"},preparse:function(e){return e.replace(/[\u09e7\u09e8\u09e9\u09ea\u09eb\u09ec\u09ed\u09ee\u09ef\u09e6]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/\u09b0\u09be\u09a4|\u09b8\u0995\u09be\u09b2|\u09a6\u09c1\u09aa\u09c1\u09b0|\u09ac\u09bf\u0995\u09be\u09b2|\u09b0\u09be\u09a4/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u09b0\u09be\u09a4"===t&&e>=4||"\u09a6\u09c1\u09aa\u09c1\u09b0"===t&&e<5||"\u09ac\u09bf\u0995\u09be\u09b2"===t?e+12:e},meridiem:function(e,t,n){return e<4?"\u09b0\u09be\u09a4":e<10?"\u09b8\u0995\u09be\u09b2":e<17?"\u09a6\u09c1\u09aa\u09c1\u09b0":e<20?"\u09ac\u09bf\u0995\u09be\u09b2":"\u09b0\u09be\u09a4"},week:{dow:0,doy:6}})}(n("wd/R"))},kJI8:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var i=n("SVse"),r=n("G0yt"),s=n("zWsK"),o=n("ChqD"),a=n("PCNd"),c=n("8Y7J");let l=(()=>{class e{}return e.\u0275mod=c.Kb({type:e}),e.\u0275inj=c.Jb({factory:function(t){return new(t||e)},imports:[[i.c,o.a,a.a,r.t,s.a]]}),e})()},kJWO:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const i=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")()},kOOl:function(e,t){var n=0,i=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+i).toString(36)}},kOpN:function(e,t,n){!function(e){"use strict";e.defineLocale("zh-tw",{months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u9031\u65e5_\u9031\u4e00_\u9031\u4e8c_\u9031\u4e09_\u9031\u56db_\u9031\u4e94_\u9031\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5 HH:mm",LLLL:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm",l:"YYYY/M/D",ll:"YYYY\u5e74M\u6708D\u65e5",lll:"YYYY\u5e74M\u6708D\u65e5 HH:mm",llll:"YYYY\u5e74M\u6708D\u65e5dddd HH:mm"},meridiemParse:/\u51cc\u6668|\u65e9\u4e0a|\u4e0a\u5348|\u4e2d\u5348|\u4e0b\u5348|\u665a\u4e0a/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u51cc\u6668"===t||"\u65e9\u4e0a"===t||"\u4e0a\u5348"===t?e:"\u4e2d\u5348"===t?e>=11?e:e+12:"\u4e0b\u5348"===t||"\u665a\u4e0a"===t?e+12:void 0},meridiem:function(e,t,n){var i=100*e+t;return i<600?"\u51cc\u6668":i<900?"\u65e9\u4e0a":i<1130?"\u4e0a\u5348":i<1230?"\u4e2d\u5348":i<1800?"\u4e0b\u5348":"\u665a\u4e0a"},calendar:{sameDay:"[\u4eca\u5929] LT",nextDay:"[\u660e\u5929] LT",nextWeek:"[\u4e0b]dddd LT",lastDay:"[\u6628\u5929] LT",lastWeek:"[\u4e0a]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(\u65e5|\u6708|\u9031)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"\u65e5";case"M":return e+"\u6708";case"w":case"W":return e+"\u9031";default:return e}},relativeTime:{future:"%s\u5f8c",past:"%s\u524d",s:"\u5e7e\u79d2",ss:"%d \u79d2",m:"1 \u5206\u9418",mm:"%d \u5206\u9418",h:"1 \u5c0f\u6642",hh:"%d \u5c0f\u6642",d:"1 \u5929",dd:"%d \u5929",M:"1 \u500b\u6708",MM:"%d \u500b\u6708",y:"1 \u5e74",yy:"%d \u5e74"}})}(n("wd/R"))},kRJp:function(e,t,n){var i=n("g6v/"),r=n("m/L8"),s=n("XGwC");e.exports=i?function(e,t,n){return r.f(e,t,s(1,n))}:function(e,t,n){return e[t]=n,e}},kmMV:function(e,t,n){"use strict";var i,r,s=n("rW0t"),o=n("n3/R"),a=RegExp.prototype.exec,c=String.prototype.replace,l=a,u=(r=/b*/g,a.call(i=/a/,"a"),a.call(r,"a"),0!==i.lastIndex||0!==r.lastIndex),d=o.UNSUPPORTED_Y||o.BROKEN_CARET,h=void 0!==/()??/.exec("")[1];(u||h||d)&&(l=function(e){var t,n,i,r,o=this,l=d&&o.sticky,f=s.call(o),p=o.source,m=0,b=e;return l&&(-1===(f=f.replace("y","")).indexOf("g")&&(f+="g"),b=String(e).slice(o.lastIndex),o.lastIndex>0&&(!o.multiline||o.multiline&&"\n"!==e[o.lastIndex-1])&&(p="(?: "+p+")",b=" "+b,m++),n=new RegExp("^(?:"+p+")",f)),h&&(n=new RegExp("^"+p+"$(?!\\s)",f)),u&&(t=o.lastIndex),i=a.call(l?n:o,b),l?i?(i.input=i.input.slice(m),i[0]=i[0].slice(m),i.index=o.lastIndex,o.lastIndex+=i[0].length):o.lastIndex=0:u&&i&&(o.lastIndex=o.global?i.index+i[0].length:t),h&&i&&i.length>1&&c.call(i[0],n,(function(){for(r=1;r<arguments.length-2;r++)void 0===arguments[r]&&(i[r]=void 0)})),i}),e.exports=l},"kn/O":function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var i=n("HDdC"),r=n("mtw6"),s=n("G1I9"),o=n("QTAa"),a=n("9nlD"),c=n("mSOc"),l=n("VXsX"),u=n("ufoC"),d=n("8Y7J");let h=(()=>{class e{constructor(e,t,n,i){this.notificationService=e,this.summaryService=t,this.taskMessageService=n,this.taskManagerService=i}wrapTaskAroundCall({task:e,call:t}){return new i.a(n=>{t.subscribe(t=>{202===t.status?this._handleExecutingTasks(e):(this.summaryService.refresh(),e.success=!0,this.notificationService.notifyTask(e))},t=>{e.success=!1,e.exception=t.error,n.error(t)},()=>{n.complete()})})}_handleExecutingTasks(e){const t=new s.b(r.a.info,this.taskMessageService.getRunningTitle(e));t.isFinishedTask=!0,this.notificationService.show(t);const n=new o.a(e.name,e.metadata);this.summaryService.addRunningTask(n),this.taskManagerService.subscribe(n.name,n.metadata,e=>{this.notificationService.notifyTask(e)})}}return e.\u0275fac=function(t){return new(t||e)(d.dc(a.a),d.dc(c.a),d.dc(u.a),d.dc(l.a))},e.\u0275prov=d.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},kvvV:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("t/zF");class r extends i.a{}},l5ep:function(e,t,n){!function(e){"use strict";e.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn \xf4l",s:"ychydig eiliadau",ss:"%d eiliad",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var t="";return e>20?t=40===e||50===e||60===e||80===e||100===e?"fed":"ain":e>0&&(t=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"][e]),e+t},week:{dow:1,doy:4}})}(n("wd/R"))},l7GE:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("7o/Q");class r extends i.a{notifyNext(e,t,n,i,r){this.destination.next(t)}notifyError(e,t){this.destination.error(e)}notifyComplete(e){this.destination.complete()}}},lJxs:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("7o/Q");function r(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new s(e,t))}}class s{constructor(e,t){this.project=e,this.thisArg=t}call(e,t){return t.subscribe(new o(e,this.project,this.thisArg))}}class o extends i.a{constructor(e,t,n){super(e),this.project=t,this.count=0,this.thisArg=n||this}_next(e){let t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(t)}}},lMq5:function(e,t,n){var i=n("0Dky"),r=/#|\.prototype\./,s=function(e,t){var n=a[o(e)];return n==l||n!=c&&("function"==typeof t?i(t):!!t)},o=s.normalize=function(e){return String(e).replace(r,".").toLowerCase()},a=s.data={},c=s.NATIVE="N",l=s.POLYFILL="P";e.exports=s},"lOp/":function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var i=n("PqYM"),r=n("pxpQ"),s=n("eIep"),o=n("jtHE"),a=n("D0XW"),c=n("8Y7J");class l{constructor(e){this.zone=e,this.scheduler=a.b}now(){return this.scheduler.now()}}let u=(()=>{class e extends l{constructor(e){super(e)}schedule(...e){return this.zone.runOutsideAngular(()=>this.scheduler.schedule.apply(this.scheduler,e))}}return e.\u0275fac=function(t){return new(t||e)(c.dc(c.A))},e.\u0275prov=c.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),d=(()=>{class e extends l{constructor(e){super(e)}schedule(...e){return this.zone.run(()=>this.scheduler.schedule.apply(this.scheduler,e))}}return e.\u0275fac=function(t){return new(t||e)(c.dc(c.A))},e.\u0275prov=c.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),h=(()=>{class e{constructor(e,t){this.leave=e,this.enter=t}}return e.\u0275fac=function(t){return new(t||e)(c.dc(u),c.dc(d))},e.\u0275prov=c.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),f=(()=>{class e{constructor(e){this.ngZone=e,this.DEFAULT_REFRESH_INTERVAL=5e3,this.DEFAULT_DUE_TIME=0}get(e,t=this.DEFAULT_REFRESH_INTERVAL,n=this.DEFAULT_DUE_TIME){return Object(i.a)(n,t,this.ngZone.leave).pipe(Object(r.b)(this.ngZone.enter),Object(s.a)(e),function(e,t,n){let i;return i=e&&"object"==typeof e?e:{bufferSize:e,windowTime:void 0,refCount:!1,scheduler:void 0},e=>e.lift(function({bufferSize:e=Number.POSITIVE_INFINITY,windowTime:t=Number.POSITIVE_INFINITY,refCount:n,scheduler:i}){let r,s,a=0,c=!1,l=!1;return function(u){let d;a++,!r||c?(c=!1,r=new o.a(e,t,i),d=r.subscribe(this),s=u.subscribe({next(e){r.next(e)},error(e){c=!0,r.error(e)},complete(){l=!0,s=void 0,r.complete()}})):d=r.subscribe(this),this.add(()=>{a--,d.unsubscribe(),s&&!l&&n&&0===a&&(s.unsubscribe(),s=void 0,r=void 0)})}}(i))}({refCount:!0,bufferSize:1}))}}return e.\u0275fac=function(t){return new(t||e)(c.dc(h))},e.\u0275prov=c.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},lXzo:function(e,t,n){!function(e){"use strict";function t(e,t,n){return"m"===n?t?"\u043c\u0438\u043d\u0443\u0442\u0430":"\u043c\u0438\u043d\u0443\u0442\u0443":e+" "+(i=+e,r={ss:t?"\u0441\u0435\u043a\u0443\u043d\u0434\u0430_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434":"\u0441\u0435\u043a\u0443\u043d\u0434\u0443_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434",mm:t?"\u043c\u0438\u043d\u0443\u0442\u0430_\u043c\u0438\u043d\u0443\u0442\u044b_\u043c\u0438\u043d\u0443\u0442":"\u043c\u0438\u043d\u0443\u0442\u0443_\u043c\u0438\u043d\u0443\u0442\u044b_\u043c\u0438\u043d\u0443\u0442",hh:"\u0447\u0430\u0441_\u0447\u0430\u0441\u0430_\u0447\u0430\u0441\u043e\u0432",dd:"\u0434\u0435\u043d\u044c_\u0434\u043d\u044f_\u0434\u043d\u0435\u0439",ww:"\u043d\u0435\u0434\u0435\u043b\u044f_\u043d\u0435\u0434\u0435\u043b\u0438_\u043d\u0435\u0434\u0435\u043b\u044c",MM:"\u043c\u0435\u0441\u044f\u0446_\u043c\u0435\u0441\u044f\u0446\u0430_\u043c\u0435\u0441\u044f\u0446\u0435\u0432",yy:"\u0433\u043e\u0434_\u0433\u043e\u0434\u0430_\u043b\u0435\u0442"}[n].split("_"),i%10==1&&i%100!=11?r[0]:i%10>=2&&i%10<=4&&(i%100<10||i%100>=20)?r[1]:r[2]);var i,r}var n=[/^\u044f\u043d\u0432/i,/^\u0444\u0435\u0432/i,/^\u043c\u0430\u0440/i,/^\u0430\u043f\u0440/i,/^\u043c\u0430[\u0439\u044f]/i,/^\u0438\u044e\u043d/i,/^\u0438\u044e\u043b/i,/^\u0430\u0432\u0433/i,/^\u0441\u0435\u043d/i,/^\u043e\u043a\u0442/i,/^\u043d\u043e\u044f/i,/^\u0434\u0435\u043a/i];e.defineLocale("ru",{months:{format:"\u044f\u043d\u0432\u0430\u0440\u044f_\u0444\u0435\u0432\u0440\u0430\u043b\u044f_\u043c\u0430\u0440\u0442\u0430_\u0430\u043f\u0440\u0435\u043b\u044f_\u043c\u0430\u044f_\u0438\u044e\u043d\u044f_\u0438\u044e\u043b\u044f_\u0430\u0432\u0433\u0443\u0441\u0442\u0430_\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f_\u043e\u043a\u0442\u044f\u0431\u0440\u044f_\u043d\u043e\u044f\u0431\u0440\u044f_\u0434\u0435\u043a\u0430\u0431\u0440\u044f".split("_"),standalone:"\u044f\u043d\u0432\u0430\u0440\u044c_\u0444\u0435\u0432\u0440\u0430\u043b\u044c_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0435\u043b\u044c_\u043c\u0430\u0439_\u0438\u044e\u043d\u044c_\u0438\u044e\u043b\u044c_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c_\u043e\u043a\u0442\u044f\u0431\u0440\u044c_\u043d\u043e\u044f\u0431\u0440\u044c_\u0434\u0435\u043a\u0430\u0431\u0440\u044c".split("_")},monthsShort:{format:"\u044f\u043d\u0432._\u0444\u0435\u0432\u0440._\u043c\u0430\u0440._\u0430\u043f\u0440._\u043c\u0430\u044f_\u0438\u044e\u043d\u044f_\u0438\u044e\u043b\u044f_\u0430\u0432\u0433._\u0441\u0435\u043d\u0442._\u043e\u043a\u0442._\u043d\u043e\u044f\u0431._\u0434\u0435\u043a.".split("_"),standalone:"\u044f\u043d\u0432._\u0444\u0435\u0432\u0440._\u043c\u0430\u0440\u0442_\u0430\u043f\u0440._\u043c\u0430\u0439_\u0438\u044e\u043d\u044c_\u0438\u044e\u043b\u044c_\u0430\u0432\u0433._\u0441\u0435\u043d\u0442._\u043e\u043a\u0442._\u043d\u043e\u044f\u0431._\u0434\u0435\u043a.".split("_")},weekdays:{standalone:"\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0435\u0440\u0433_\u043f\u044f\u0442\u043d\u0438\u0446\u0430_\u0441\u0443\u0431\u0431\u043e\u0442\u0430".split("_"),format:"\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u0435\u0434\u0443_\u0447\u0435\u0442\u0432\u0435\u0440\u0433_\u043f\u044f\u0442\u043d\u0438\u0446\u0443_\u0441\u0443\u0431\u0431\u043e\u0442\u0443".split("_"),isFormat:/\[ ?[\u0412\u0432] ?(?:\u043f\u0440\u043e\u0448\u043b\u0443\u044e|\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e|\u044d\u0442\u0443)? ?] ?dddd/},weekdaysShort:"\u0432\u0441_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),weekdaysMin:"\u0432\u0441_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),monthsParse:n,longMonthsParse:n,shortMonthsParse:n,monthsRegex:/^(\u044f\u043d\u0432\u0430\u0440[\u044c\u044f]|\u044f\u043d\u0432\.?|\u0444\u0435\u0432\u0440\u0430\u043b[\u044c\u044f]|\u0444\u0435\u0432\u0440?\.?|\u043c\u0430\u0440\u0442\u0430?|\u043c\u0430\u0440\.?|\u0430\u043f\u0440\u0435\u043b[\u044c\u044f]|\u0430\u043f\u0440\.?|\u043c\u0430[\u0439\u044f]|\u0438\u044e\u043d[\u044c\u044f]|\u0438\u044e\u043d\.?|\u0438\u044e\u043b[\u044c\u044f]|\u0438\u044e\u043b\.?|\u0430\u0432\u0433\u0443\u0441\u0442\u0430?|\u0430\u0432\u0433\.?|\u0441\u0435\u043d\u0442\u044f\u0431\u0440[\u044c\u044f]|\u0441\u0435\u043d\u0442?\.?|\u043e\u043a\u0442\u044f\u0431\u0440[\u044c\u044f]|\u043e\u043a\u0442\.?|\u043d\u043e\u044f\u0431\u0440[\u044c\u044f]|\u043d\u043e\u044f\u0431?\.?|\u0434\u0435\u043a\u0430\u0431\u0440[\u044c\u044f]|\u0434\u0435\u043a\.?)/i,monthsShortRegex:/^(\u044f\u043d\u0432\u0430\u0440[\u044c\u044f]|\u044f\u043d\u0432\.?|\u0444\u0435\u0432\u0440\u0430\u043b[\u044c\u044f]|\u0444\u0435\u0432\u0440?\.?|\u043c\u0430\u0440\u0442\u0430?|\u043c\u0430\u0440\.?|\u0430\u043f\u0440\u0435\u043b[\u044c\u044f]|\u0430\u043f\u0440\.?|\u043c\u0430[\u0439\u044f]|\u0438\u044e\u043d[\u044c\u044f]|\u0438\u044e\u043d\.?|\u0438\u044e\u043b[\u044c\u044f]|\u0438\u044e\u043b\.?|\u0430\u0432\u0433\u0443\u0441\u0442\u0430?|\u0430\u0432\u0433\.?|\u0441\u0435\u043d\u0442\u044f\u0431\u0440[\u044c\u044f]|\u0441\u0435\u043d\u0442?\.?|\u043e\u043a\u0442\u044f\u0431\u0440[\u044c\u044f]|\u043e\u043a\u0442\.?|\u043d\u043e\u044f\u0431\u0440[\u044c\u044f]|\u043d\u043e\u044f\u0431?\.?|\u0434\u0435\u043a\u0430\u0431\u0440[\u044c\u044f]|\u0434\u0435\u043a\.?)/i,monthsStrictRegex:/^(\u044f\u043d\u0432\u0430\u0440[\u044f\u044c]|\u0444\u0435\u0432\u0440\u0430\u043b[\u044f\u044c]|\u043c\u0430\u0440\u0442\u0430?|\u0430\u043f\u0440\u0435\u043b[\u044f\u044c]|\u043c\u0430[\u044f\u0439]|\u0438\u044e\u043d[\u044f\u044c]|\u0438\u044e\u043b[\u044f\u044c]|\u0430\u0432\u0433\u0443\u0441\u0442\u0430?|\u0441\u0435\u043d\u0442\u044f\u0431\u0440[\u044f\u044c]|\u043e\u043a\u0442\u044f\u0431\u0440[\u044f\u044c]|\u043d\u043e\u044f\u0431\u0440[\u044f\u044c]|\u0434\u0435\u043a\u0430\u0431\u0440[\u044f\u044c])/i,monthsShortStrictRegex:/^(\u044f\u043d\u0432\.|\u0444\u0435\u0432\u0440?\.|\u043c\u0430\u0440[\u0442.]|\u0430\u043f\u0440\.|\u043c\u0430[\u044f\u0439]|\u0438\u044e\u043d[\u044c\u044f.]|\u0438\u044e\u043b[\u044c\u044f.]|\u0430\u0432\u0433\.|\u0441\u0435\u043d\u0442?\.|\u043e\u043a\u0442\.|\u043d\u043e\u044f\u0431?\.|\u0434\u0435\u043a\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0433.",LLL:"D MMMM YYYY \u0433., H:mm",LLLL:"dddd, D MMMM YYYY \u0433., H:mm"},calendar:{sameDay:"[\u0421\u0435\u0433\u043e\u0434\u043d\u044f, \u0432] LT",nextDay:"[\u0417\u0430\u0432\u0442\u0440\u0430, \u0432] LT",lastDay:"[\u0412\u0447\u0435\u0440\u0430, \u0432] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[\u0412\u043e] dddd, [\u0432] LT":"[\u0412] dddd, [\u0432] LT";switch(this.day()){case 0:return"[\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435] dddd, [\u0432] LT";case 1:case 2:case 4:return"[\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439] dddd, [\u0432] LT";case 3:case 5:case 6:return"[\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e] dddd, [\u0432] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[\u0412\u043e] dddd, [\u0432] LT":"[\u0412] dddd, [\u0432] LT";switch(this.day()){case 0:return"[\u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u0435] dddd, [\u0432] LT";case 1:case 2:case 4:return"[\u0412 \u043f\u0440\u043e\u0448\u043b\u044b\u0439] dddd, [\u0432] LT";case 3:case 5:case 6:return"[\u0412 \u043f\u0440\u043e\u0448\u043b\u0443\u044e] dddd, [\u0432] LT"}},sameElse:"L"},relativeTime:{future:"\u0447\u0435\u0440\u0435\u0437 %s",past:"%s \u043d\u0430\u0437\u0430\u0434",s:"\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434",ss:t,m:t,mm:t,h:"\u0447\u0430\u0441",hh:t,d:"\u0434\u0435\u043d\u044c",dd:t,w:"\u043d\u0435\u0434\u0435\u043b\u044f",ww:t,M:"\u043c\u0435\u0441\u044f\u0446",MM:t,y:"\u0433\u043e\u0434",yy:t},meridiemParse:/\u043d\u043e\u0447\u0438|\u0443\u0442\u0440\u0430|\u0434\u043d\u044f|\u0432\u0435\u0447\u0435\u0440\u0430/i,isPM:function(e){return/^(\u0434\u043d\u044f|\u0432\u0435\u0447\u0435\u0440\u0430)$/.test(e)},meridiem:function(e,t,n){return e<4?"\u043d\u043e\u0447\u0438":e<12?"\u0443\u0442\u0440\u0430":e<17?"\u0434\u043d\u044f":"\u0432\u0435\u0447\u0435\u0440\u0430"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0439|\u0433\u043e|\u044f)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-\u0439";case"D":return e+"-\u0433\u043e";case"w":case"W":return e+"-\u044f";default:return e}},week:{dow:1,doy:4}})}(n("wd/R"))},lYtQ:function(e,t,n){!function(e){"use strict";function t(e,t,n,i){switch(n){case"s":return t?"\u0445\u044d\u0434\u0445\u044d\u043d \u0441\u0435\u043a\u0443\u043d\u0434":"\u0445\u044d\u0434\u0445\u044d\u043d \u0441\u0435\u043a\u0443\u043d\u0434\u044b\u043d";case"ss":return e+(t?" \u0441\u0435\u043a\u0443\u043d\u0434":" \u0441\u0435\u043a\u0443\u043d\u0434\u044b\u043d");case"m":case"mm":return e+(t?" \u043c\u0438\u043d\u0443\u0442":" \u043c\u0438\u043d\u0443\u0442\u044b\u043d");case"h":case"hh":return e+(t?" \u0446\u0430\u0433":" \u0446\u0430\u0433\u0438\u0439\u043d");case"d":case"dd":return e+(t?" \u04e9\u0434\u04e9\u0440":" \u04e9\u0434\u0440\u0438\u0439\u043d");case"M":case"MM":return e+(t?" \u0441\u0430\u0440":" \u0441\u0430\u0440\u044b\u043d");case"y":case"yy":return e+(t?" \u0436\u0438\u043b":" \u0436\u0438\u043b\u0438\u0439\u043d");default:return e}}e.defineLocale("mn",{months:"\u041d\u044d\u0433\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440_\u0425\u043e\u0451\u0440\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0413\u0443\u0440\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0414\u04e9\u0440\u04e9\u0432\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440_\u0422\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0417\u0443\u0440\u0433\u0430\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0414\u043e\u043b\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u041d\u0430\u0439\u043c\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0415\u0441\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440_\u0410\u0440\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440_\u0410\u0440\u0432\u0430\u043d \u043d\u044d\u0433\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440_\u0410\u0440\u0432\u0430\u043d \u0445\u043e\u0451\u0440\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440".split("_"),monthsShort:"1 \u0441\u0430\u0440_2 \u0441\u0430\u0440_3 \u0441\u0430\u0440_4 \u0441\u0430\u0440_5 \u0441\u0430\u0440_6 \u0441\u0430\u0440_7 \u0441\u0430\u0440_8 \u0441\u0430\u0440_9 \u0441\u0430\u0440_10 \u0441\u0430\u0440_11 \u0441\u0430\u0440_12 \u0441\u0430\u0440".split("_"),monthsParseExact:!0,weekdays:"\u041d\u044f\u043c_\u0414\u0430\u0432\u0430\u0430_\u041c\u044f\u0433\u043c\u0430\u0440_\u041b\u0445\u0430\u0433\u0432\u0430_\u041f\u04af\u0440\u044d\u0432_\u0411\u0430\u0430\u0441\u0430\u043d_\u0411\u044f\u043c\u0431\u0430".split("_"),weekdaysShort:"\u041d\u044f\u043c_\u0414\u0430\u0432_\u041c\u044f\u0433_\u041b\u0445\u0430_\u041f\u04af\u0440_\u0411\u0430\u0430_\u0411\u044f\u043c".split("_"),weekdaysMin:"\u041d\u044f_\u0414\u0430_\u041c\u044f_\u041b\u0445_\u041f\u04af_\u0411\u0430_\u0411\u044f".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY \u043e\u043d\u044b MMMM\u044b\u043d D",LLL:"YYYY \u043e\u043d\u044b MMMM\u044b\u043d D HH:mm",LLLL:"dddd, YYYY \u043e\u043d\u044b MMMM\u044b\u043d D HH:mm"},meridiemParse:/\u04ae\u04e8|\u04ae\u0425/i,isPM:function(e){return"\u04ae\u0425"===e},meridiem:function(e,t,n){return e<12?"\u04ae\u04e8":"\u04ae\u0425"},calendar:{sameDay:"[\u04e8\u043d\u04e9\u04e9\u0434\u04e9\u0440] LT",nextDay:"[\u041c\u0430\u0440\u0433\u0430\u0430\u0448] LT",nextWeek:"[\u0418\u0440\u044d\u0445] dddd LT",lastDay:"[\u04e8\u0447\u0438\u0433\u0434\u04e9\u0440] LT",lastWeek:"[\u04e8\u043d\u0433\u04e9\u0440\u0441\u04e9\u043d] dddd LT",sameElse:"L"},relativeTime:{future:"%s \u0434\u0430\u0440\u0430\u0430",past:"%s \u04e9\u043c\u043d\u04e9",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2} \u04e9\u0434\u04e9\u0440/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+" \u04e9\u0434\u04e9\u0440";default:return e}}})}(n("wd/R"))},lgnt:function(e,t,n){!function(e){"use strict";var t={0:"-\u0447\u04af",1:"-\u0447\u0438",2:"-\u0447\u0438",3:"-\u0447\u04af",4:"-\u0447\u04af",5:"-\u0447\u0438",6:"-\u0447\u044b",7:"-\u0447\u0438",8:"-\u0447\u0438",9:"-\u0447\u0443",10:"-\u0447\u0443",20:"-\u0447\u044b",30:"-\u0447\u0443",40:"-\u0447\u044b",50:"-\u0447\u04af",60:"-\u0447\u044b",70:"-\u0447\u0438",80:"-\u0447\u0438",90:"-\u0447\u0443",100:"-\u0447\u04af"};e.defineLocale("ky",{months:"\u044f\u043d\u0432\u0430\u0440\u044c_\u0444\u0435\u0432\u0440\u0430\u043b\u044c_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0435\u043b\u044c_\u043c\u0430\u0439_\u0438\u044e\u043d\u044c_\u0438\u044e\u043b\u044c_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c_\u043e\u043a\u0442\u044f\u0431\u0440\u044c_\u043d\u043e\u044f\u0431\u0440\u044c_\u0434\u0435\u043a\u0430\u0431\u0440\u044c".split("_"),monthsShort:"\u044f\u043d\u0432_\u0444\u0435\u0432_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440_\u043c\u0430\u0439_\u0438\u044e\u043d\u044c_\u0438\u044e\u043b\u044c_\u0430\u0432\u0433_\u0441\u0435\u043d_\u043e\u043a\u0442_\u043d\u043e\u044f_\u0434\u0435\u043a".split("_"),weekdays:"\u0416\u0435\u043a\u0448\u0435\u043c\u0431\u0438_\u0414\u04af\u0439\u0448\u04e9\u043c\u0431\u04af_\u0428\u0435\u0439\u0448\u0435\u043c\u0431\u0438_\u0428\u0430\u0440\u0448\u0435\u043c\u0431\u0438_\u0411\u0435\u0439\u0448\u0435\u043c\u0431\u0438_\u0416\u0443\u043c\u0430_\u0418\u0448\u0435\u043c\u0431\u0438".split("_"),weekdaysShort:"\u0416\u0435\u043a_\u0414\u04af\u0439_\u0428\u0435\u0439_\u0428\u0430\u0440_\u0411\u0435\u0439_\u0416\u0443\u043c_\u0418\u0448\u0435".split("_"),weekdaysMin:"\u0416\u043a_\u0414\u0439_\u0428\u0439_\u0428\u0440_\u0411\u0439_\u0416\u043c_\u0418\u0448".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0411\u04af\u0433\u04af\u043d \u0441\u0430\u0430\u0442] LT",nextDay:"[\u042d\u0440\u0442\u0435\u04a3 \u0441\u0430\u0430\u0442] LT",nextWeek:"dddd [\u0441\u0430\u0430\u0442] LT",lastDay:"[\u041a\u0435\u0447\u044d\u044d \u0441\u0430\u0430\u0442] LT",lastWeek:"[\u04e8\u0442\u043a\u04e9\u043d \u0430\u043f\u0442\u0430\u043d\u044b\u043d] dddd [\u043a\u04af\u043d\u04af] [\u0441\u0430\u0430\u0442] LT",sameElse:"L"},relativeTime:{future:"%s \u0438\u0447\u0438\u043d\u0434\u0435",past:"%s \u043c\u0443\u0440\u0443\u043d",s:"\u0431\u0438\u0440\u043d\u0435\u0447\u0435 \u0441\u0435\u043a\u0443\u043d\u0434",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434",m:"\u0431\u0438\u0440 \u043c\u04af\u043d\u04e9\u0442",mm:"%d \u043c\u04af\u043d\u04e9\u0442",h:"\u0431\u0438\u0440 \u0441\u0430\u0430\u0442",hh:"%d \u0441\u0430\u0430\u0442",d:"\u0431\u0438\u0440 \u043a\u04af\u043d",dd:"%d \u043a\u04af\u043d",M:"\u0431\u0438\u0440 \u0430\u0439",MM:"%d \u0430\u0439",y:"\u0431\u0438\u0440 \u0436\u044b\u043b",yy:"%d \u0436\u044b\u043b"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0447\u0438|\u0447\u044b|\u0447\u04af|\u0447\u0443)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n("wd/R"))},loYQ:function(e,t,n){!function(e){"use strict";var t={1:"\u09e7",2:"\u09e8",3:"\u09e9",4:"\u09ea",5:"\u09eb",6:"\u09ec",7:"\u09ed",8:"\u09ee",9:"\u09ef",0:"\u09e6"},n={"\u09e7":"1","\u09e8":"2","\u09e9":"3","\u09ea":"4","\u09eb":"5","\u09ec":"6","\u09ed":"7","\u09ee":"8","\u09ef":"9","\u09e6":"0"};e.defineLocale("bn-bd",{months:"\u099c\u09be\u09a8\u09c1\u09df\u09be\u09b0\u09bf_\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1\u09df\u09be\u09b0\u09bf_\u09ae\u09be\u09b0\u09cd\u099a_\u098f\u09aa\u09cd\u09b0\u09bf\u09b2_\u09ae\u09c7_\u099c\u09c1\u09a8_\u099c\u09c1\u09b2\u09be\u0987_\u0986\u0997\u09b8\u09cd\u099f_\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0_\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0_\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0_\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0".split("_"),monthsShort:"\u099c\u09be\u09a8\u09c1_\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1_\u09ae\u09be\u09b0\u09cd\u099a_\u098f\u09aa\u09cd\u09b0\u09bf\u09b2_\u09ae\u09c7_\u099c\u09c1\u09a8_\u099c\u09c1\u09b2\u09be\u0987_\u0986\u0997\u09b8\u09cd\u099f_\u09b8\u09c7\u09aa\u09cd\u099f_\u0985\u0995\u09cd\u099f\u09cb_\u09a8\u09ad\u09c7_\u09a1\u09bf\u09b8\u09c7".split("_"),weekdays:"\u09b0\u09ac\u09bf\u09ac\u09be\u09b0_\u09b8\u09cb\u09ae\u09ac\u09be\u09b0_\u09ae\u0999\u09cd\u0997\u09b2\u09ac\u09be\u09b0_\u09ac\u09c1\u09a7\u09ac\u09be\u09b0_\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf\u09ac\u09be\u09b0_\u09b6\u09c1\u0995\u09cd\u09b0\u09ac\u09be\u09b0_\u09b6\u09a8\u09bf\u09ac\u09be\u09b0".split("_"),weekdaysShort:"\u09b0\u09ac\u09bf_\u09b8\u09cb\u09ae_\u09ae\u0999\u09cd\u0997\u09b2_\u09ac\u09c1\u09a7_\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf_\u09b6\u09c1\u0995\u09cd\u09b0_\u09b6\u09a8\u09bf".split("_"),weekdaysMin:"\u09b0\u09ac\u09bf_\u09b8\u09cb\u09ae_\u09ae\u0999\u09cd\u0997\u09b2_\u09ac\u09c1\u09a7_\u09ac\u09c3\u09b9_\u09b6\u09c1\u0995\u09cd\u09b0_\u09b6\u09a8\u09bf".split("_"),longDateFormat:{LT:"A h:mm \u09b8\u09ae\u09df",LTS:"A h:mm:ss \u09b8\u09ae\u09df",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u09b8\u09ae\u09df",LLLL:"dddd, D MMMM YYYY, A h:mm \u09b8\u09ae\u09df"},calendar:{sameDay:"[\u0986\u099c] LT",nextDay:"[\u0986\u0997\u09be\u09ae\u09c0\u0995\u09be\u09b2] LT",nextWeek:"dddd, LT",lastDay:"[\u0997\u09a4\u0995\u09be\u09b2] LT",lastWeek:"[\u0997\u09a4] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u09aa\u09b0\u09c7",past:"%s \u0986\u0997\u09c7",s:"\u0995\u09df\u09c7\u0995 \u09b8\u09c7\u0995\u09c7\u09a8\u09cd\u09a1",ss:"%d \u09b8\u09c7\u0995\u09c7\u09a8\u09cd\u09a1",m:"\u098f\u0995 \u09ae\u09bf\u09a8\u09bf\u099f",mm:"%d \u09ae\u09bf\u09a8\u09bf\u099f",h:"\u098f\u0995 \u0998\u09a8\u09cd\u099f\u09be",hh:"%d \u0998\u09a8\u09cd\u099f\u09be",d:"\u098f\u0995 \u09a6\u09bf\u09a8",dd:"%d \u09a6\u09bf\u09a8",M:"\u098f\u0995 \u09ae\u09be\u09b8",MM:"%d \u09ae\u09be\u09b8",y:"\u098f\u0995 \u09ac\u099b\u09b0",yy:"%d \u09ac\u099b\u09b0"},preparse:function(e){return e.replace(/[\u09e7\u09e8\u09e9\u09ea\u09eb\u09ec\u09ed\u09ee\u09ef\u09e6]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/\u09b0\u09be\u09a4|\u09ad\u09cb\u09b0|\u09b8\u0995\u09be\u09b2|\u09a6\u09c1\u09aa\u09c1\u09b0|\u09ac\u09bf\u0995\u09be\u09b2|\u09b8\u09a8\u09cd\u09a7\u09cd\u09af\u09be|\u09b0\u09be\u09a4/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u09b0\u09be\u09a4"===t?e<4?e:e+12:"\u09ad\u09cb\u09b0"===t||"\u09b8\u0995\u09be\u09b2"===t?e:"\u09a6\u09c1\u09aa\u09c1\u09b0"===t?e>=3?e:e+12:"\u09ac\u09bf\u0995\u09be\u09b2"===t||"\u09b8\u09a8\u09cd\u09a7\u09cd\u09af\u09be"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"\u09b0\u09be\u09a4":e<6?"\u09ad\u09cb\u09b0":e<12?"\u09b8\u0995\u09be\u09b2":e<15?"\u09a6\u09c1\u09aa\u09c1\u09b0":e<18?"\u09ac\u09bf\u0995\u09be\u09b2":e<20?"\u09b8\u09a8\u09cd\u09a7\u09cd\u09af\u09be":"\u09b0\u09be\u09a4"},week:{dow:0,doy:6}})}(n("wd/R"))},lyxo:function(e,t,n){!function(e){"use strict";function t(e,t,n){var i=" ";return(e%100>=20||e>=100&&e%100==0)&&(i=" de "),e+i+{ss:"secunde",mm:"minute",hh:"ore",dd:"zile",ww:"s\u0103pt\u0103m\xe2ni",MM:"luni",yy:"ani"}[n]}e.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminic\u0103_luni_mar\u021bi_miercuri_joi_vineri_s\xe2mb\u0103t\u0103".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_S\xe2m".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_S\xe2".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[m\xe2ine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s \xeen urm\u0103",s:"c\xe2teva secunde",ss:t,m:"un minut",mm:t,h:"o or\u0103",hh:t,d:"o zi",dd:t,w:"o s\u0103pt\u0103m\xe2n\u0103",ww:t,M:"o lun\u0103",MM:t,y:"un an",yy:t},week:{dow:1,doy:7}})}(n("wd/R"))},"m/L8":function(e,t,n){var i=n("g6v/"),r=n("DPsx"),s=n("glrk"),o=n("wE6v"),a=Object.defineProperty;t.f=i?a:function(e,t,n){if(s(e),t=o(t,!0),s(n),r)try{return a(e,t,n)}catch(i){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},m92n:function(e,t,n){var i=n("glrk");e.exports=function(e,t,n,r){try{return r?t(i(n)[0],n[1]):t(n)}catch(o){var s=e.return;throw void 0!==s&&i(s.call(e)),o}}},mCNh:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return s}));var i=n("SpAZ");function r(...e){return s(e)}function s(e){return 0===e.length?i.a:1===e.length?e[0]:function(t){return e.reduce((e,t)=>t(e),t)}}},mSOc:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var i=n("LvDl"),r=n.n(i),s=n("2Vo4"),o=n("pLZG"),a=n("SxV6"),c=n("lOp/"),l=n("8Y7J"),u=n("IheW");let d=(()=>{class e{constructor(e,t){this.http=e,this.timerService=t,this.REFRESH_INTERVAL=5e3,this.summaryDataSource=new s.a(null),this.summaryData$=this.summaryDataSource.asObservable()}startPolling(){return this.timerService.get(()=>this.retrieveSummaryObservable(),this.REFRESH_INTERVAL).subscribe(this.retrieveSummaryObserver())}refresh(){return this.retrieveSummaryObservable().subscribe(this.retrieveSummaryObserver())}retrieveSummaryObservable(){return this.http.get("api/summary")}retrieveSummaryObserver(){return e=>{this.summaryDataSource.next(e)}}subscribeOnce(e,t){return this.summaryData$.pipe(Object(o.a)(e=>!!e),Object(a.a)()).subscribe(e,t)}subscribe(e,t){return this.summaryData$.pipe(Object(o.a)(e=>!!e)).subscribe(e,t)}addRunningTask(e){const t=this.summaryDataSource.getValue();t&&(r.a.isArray(t.executing_tasks)?t.executing_tasks.find(t=>t.name===e.name&&r.a.isEqual(t.metadata,e.metadata))||t.executing_tasks.push(e):t.executing_tasks=[e],this.summaryDataSource.next(t))}}return e.\u0275fac=function(t){return new(t||e)(l.dc(u.b),l.dc(c.a))},e.\u0275prov=l.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},mrSG:function(e,t,n){"use strict";function i(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n}function r(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}function s(e,t){return function(n,i){t(n,i,e)}}function o(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function a(e,t,n,i){return new(n||(n=Promise))((function(r,s){function o(e){try{c(i.next(e))}catch(t){s(t)}}function a(e){try{c(i.throw(e))}catch(t){s(t)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}c((i=i.apply(e,t||[])).next())}))}function c(e,t){var n,i,r,s,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&s[0]?i.return:s[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,i=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(a){s=[6,a],i=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}n.d(t,"f",(function(){return i})),n.d(t,"b",(function(){return r})),n.d(t,"e",(function(){return s})),n.d(t,"d",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return c}))},mtw6:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var i=function(e){return e[e.error=0]="error",e[e.info=1]="info",e[e.success=2]="success",e}({})},"n3/R":function(e,t,n){"use strict";var i=n("0Dky");function r(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=i((function(){var e=r("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=i((function(){var e=r("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},n6bG:function(e,t,n){"use strict";function i(e){return"function"==typeof e}n.d(t,"a",(function(){return i}))},nSDx:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("LvDl"),r=n.n(i),s=n("8Y7J");let o=(()=>{class e{transform(e){return r.a.isUndefined(e)||r.a.isNull(e)?"-":e}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=s.Lb({name:"empty",type:e,pure:!0}),e})()},nYR2:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("7o/Q"),r=n("quSY");function s(e){return t=>t.lift(new o(e))}class o{constructor(e){this.callback=e}call(e,t){return t.subscribe(new a(e,this.callback))}}class a extends i.a{constructor(e,t){super(e),this.add(new r.a(t))}}},ngJS:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const i=e=>t=>{for(let n=0,i=e.length;n<i&&!t.closed;n++)t.next(e[n]);t.complete()}},ntOU:function(e,t,n){"use strict";var i=n("rpNk").IteratorPrototype,r=n("fHMY"),s=n("XGwC"),o=n("1E5z"),a=n("P4y1"),c=function(){return this};e.exports=function(e,t,n){var l=t+" Iterator";return e.prototype=r(i,{next:s(1,n)}),o(e,l,!1,!0),a[l]=c,e}},nyYc:function(e,t,n){!function(e){"use strict";var t=/(janv\.?|f\xe9vr\.?|mars|avr\.?|mai|juin|juil\.?|ao\xfbt|sept\.?|oct\.?|nov\.?|d\xe9c\.?|janvier|f\xe9vrier|mars|avril|mai|juin|juillet|ao\xfbt|septembre|octobre|novembre|d\xe9cembre)/i,n=[/^janv/i,/^f\xe9vr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^ao\xfbt/i,/^sept/i,/^oct/i,/^nov/i,/^d\xe9c/i];e.defineLocale("fr",{months:"janvier_f\xe9vrier_mars_avril_mai_juin_juillet_ao\xfbt_septembre_octobre_novembre_d\xe9cembre".split("_"),monthsShort:"janv._f\xe9vr._mars_avr._mai_juin_juil._ao\xfbt_sept._oct._nov._d\xe9c.".split("_"),monthsRegex:t,monthsShortRegex:t,monthsStrictRegex:/^(janvier|f\xe9vrier|mars|avril|mai|juin|juillet|ao\xfbt|septembre|octobre|novembre|d\xe9cembre)/i,monthsShortStrictRegex:/(janv\.?|f\xe9vr\.?|mars|avr\.?|mai|juin|juil\.?|ao\xfbt|sept\.?|oct\.?|nov\.?|d\xe9c\.?)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd\u2019hui \xe0] LT",nextDay:"[Demain \xe0] LT",nextWeek:"dddd [\xe0] LT",lastDay:"[Hier \xe0] LT",lastWeek:"dddd [dernier \xe0] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,t){switch(t){case"D":return e+(1===e?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})}(n("wd/R"))},o1bE:function(e,t,n){!function(e){"use strict";var t=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},n={s:["\u0623\u0642\u0644 \u0645\u0646 \u062b\u0627\u0646\u064a\u0629","\u062b\u0627\u0646\u064a\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062b\u0627\u0646\u064a\u062a\u0627\u0646","\u062b\u0627\u0646\u064a\u062a\u064a\u0646"],"%d \u062b\u0648\u0627\u0646","%d \u062b\u0627\u0646\u064a\u0629","%d \u062b\u0627\u0646\u064a\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062f\u0642\u064a\u0642\u0629","\u062f\u0642\u064a\u0642\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062f\u0642\u064a\u0642\u062a\u0627\u0646","\u062f\u0642\u064a\u0642\u062a\u064a\u0646"],"%d \u062f\u0642\u0627\u0626\u0642","%d \u062f\u0642\u064a\u0642\u0629","%d \u062f\u0642\u064a\u0642\u0629"],h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062d\u062f\u0629",["\u0633\u0627\u0639\u062a\u0627\u0646","\u0633\u0627\u0639\u062a\u064a\u0646"],"%d \u0633\u0627\u0639\u0627\u062a","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064a\u0648\u0645","\u064a\u0648\u0645 \u0648\u0627\u062d\u062f",["\u064a\u0648\u0645\u0627\u0646","\u064a\u0648\u0645\u064a\u0646"],"%d \u0623\u064a\u0627\u0645","%d \u064a\u0648\u0645\u064b\u0627","%d \u064a\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062d\u062f",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064a\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062d\u062f",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064a\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064b\u0627","%d \u0639\u0627\u0645"]},i=function(e){return function(i,r,s,o){var a=t(i),c=n[e][t(i)];return 2===a&&(c=c[r?0:1]),c.replace(/%d/i,i)}},r=["\u062c\u0627\u0646\u0641\u064a","\u0641\u064a\u0641\u0631\u064a","\u0645\u0627\u0631\u0633","\u0623\u0641\u0631\u064a\u0644","\u0645\u0627\u064a","\u062c\u0648\u0627\u0646","\u062c\u0648\u064a\u0644\u064a\u0629","\u0623\u0648\u062a","\u0633\u0628\u062a\u0645\u0628\u0631","\u0623\u0643\u062a\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062f\u064a\u0633\u0645\u0628\u0631"];e.defineLocale("ar-dz",{months:r,monthsShort:r,weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200fM/\u200fYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,t,n){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u064b\u0627 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062f %s",past:"\u0645\u0646\u0630 %s",s:i("s"),ss:i("s"),m:i("m"),mm:i("m"),h:i("h"),hh:i("h"),d:i("d"),dd:i("d"),M:i("M"),MM:i("M"),y:i("y"),yy:i("y")},postformat:function(e){return e.replace(/,/g,"\u060c")},week:{dow:0,doy:4}})}(n("wd/R"))},"o4+5":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("aXbf"),r=n("8Y7J");let s=(()=>{class e{constructor(e){this.formatter=e}transform(e){return this.formatter.format_number(e,1e3,["","k","M","G","T","P","E","Z","Y"])}}return e.\u0275fac=function(t){return new(t||e)(r.Mb(i.a))},e.\u0275pipe=r.Lb({name:"dimless",type:e,pure:!0}),e})()},o8EM:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("PhyI"),r=n("8Y7J");let s=(()=>{class e{constructor(){this.sections=[{heading:"Quality of Service",class:"quality-of-service",options:[{name:"rbd_qos_bps_limit",displayName:"BPS Limit",description:"The desired limit of IO bytes per second.",type:i.b.bps},{name:"rbd_qos_iops_limit",displayName:"IOPS Limit",description:"The desired limit of IO operations per second.",type:i.b.iops},{name:"rbd_qos_read_bps_limit",displayName:"Read BPS Limit",description:"The desired limit of read bytes per second.",type:i.b.bps},{name:"rbd_qos_read_iops_limit",displayName:"Read IOPS Limit",description:"The desired limit of read operations per second.",type:i.b.iops},{name:"rbd_qos_write_bps_limit",displayName:"Write BPS Limit",description:"The desired limit of write bytes per second.",type:i.b.bps},{name:"rbd_qos_write_iops_limit",displayName:"Write IOPS Limit",description:"The desired limit of write operations per second.",type:i.b.iops},{name:"rbd_qos_bps_burst",displayName:"BPS Burst",description:"The desired burst limit of IO bytes.",type:i.b.bps},{name:"rbd_qos_iops_burst",displayName:"IOPS Burst",description:"The desired burst limit of IO operations.",type:i.b.iops},{name:"rbd_qos_read_bps_burst",displayName:"Read BPS Burst",description:"The desired burst limit of read bytes.",type:i.b.bps},{name:"rbd_qos_read_iops_burst",displayName:"Read IOPS Burst",description:"The desired burst limit of read operations.",type:i.b.iops},{name:"rbd_qos_write_bps_burst",displayName:"Write BPS Burst",description:"The desired burst limit of write bytes.",type:i.b.bps},{name:"rbd_qos_write_iops_burst",displayName:"Write IOPS Burst",description:"The desired burst limit of write operations.",type:i.b.iops}]}]}static getOptionsFromSections(e){return e.map(e=>e.options).reduce((e,t)=>e.concat(t))}filterConfigOptionsByName(t){return e.getOptionsFromSections(this.sections).filter(e=>e.name===t)}getOptionValueByName(e,t,n=""){const i=this.filterConfigOptionsByName(e);return 1===i.length?i.pop()[t]:n}getWritableSections(){return this.sections.map(e=>(e.options=e.options.filter(e=>!e.readOnly),e))}getOptionFields(){return e.getOptionsFromSections(this.sections)}getWritableOptionFields(){return e.getOptionsFromSections(this.getWritableSections())}getOptionByName(e){return this.filterConfigOptionsByName(e).pop()}getDisplayName(e){return this.getOptionValueByName(e,"displayName")}getDescription(e){return this.getOptionValueByName(e,"description")}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=r.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},oMSZ:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));class i{constructor(e){this.pwdExpirationSpan=0,this.pwdExpirationSpan=e.user_pwd_expiration_span,this.pwdExpirationWarning1=e.user_pwd_expiration_warning_1,this.pwdExpirationWarning2=e.user_pwd_expiration_warning_2}}},ocLN:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var i=n("s7LF"),r=n("8Y7J");let s=(()=>{class e{constructor(e){this.elRef=e,this.validationDisabled=!1}get hasErrors(){return this.formControlNames.some(e=>!e.valid&&e.dirty&&e.touched)&&!this.validationDisabled}get hasSuccess(){return!this.formControlNames.some(e=>!e.valid)&&this.formControlNames.some(e=>e.dirty&&e.touched)&&!this.validationDisabled}get label(){const e=this.elRef.nativeElement.querySelector("label");return e&&e.textContent?e.textContent.trim():"This field"}get isDirtyAndTouched(){return this.formControlNames.some(e=>e.dirty&&e.touched)}}return e.\u0275fac=function(t){return new(t||e)(r.Mb(r.m))},e.\u0275dir=r.Hb({type:e,selectors:[["",8,"form-group"]],contentQueries:function(e,t,n){var s;1&e&&r.Fb(n,i.i,!1),2&e&&r.zc(s=r.hc())&&(t.formControlNames=s)},hostVars:4,hostBindings:function(e,t){2&e&&r.Eb("has-error",t.hasErrors)("has-success",t.hasSuccess)},inputs:{validationDisabled:"validationDisabled"}}),e})()},"ohO+":function(e,t,n){"use strict";n.d(t,"a",(function(){return vo})),n.d(t,"b",(function(){return Fo})),n.d(t,"c",(function(){return oa}));var i=n("8Y7J"),r=n("SVse"),s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function o(e,t){function n(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return(a=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function c(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,s=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(i=s.next()).done;)o.push(i.value)}catch(a){r={error:a}}finally{try{i&&!i.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return o}function l(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(c(arguments[t]));return e}var u=[];Object.freeze(u);var d={};Object.freeze(d);var h={};function f(){return"undefined"!=typeof window?window:"undefined"!=typeof global?global:h}function p(){return++Re.mobxGuid}function m(e){throw b(!1,e),"X"}function b(e,t){if(!e)throw new Error("[mobx] "+(t||"An invariant failed, however the error is obfuscated because this is an production build."))}function g(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var _=function(){};function y(e){return null!==e&&"object"==typeof e}function v(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function w(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function S(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function M(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return y(e)&&!0===e[n]}}function k(e){return void 0!==f().Map&&e instanceof f().Map}function x(e){return e instanceof Set}function D(e){for(var t=[];;){var n=e.next();if(n.done)break;t.push(n.value)}return t}function T(){return"function"==typeof Symbol&&Symbol.toPrimitive||"@@toPrimitive"}function C(e){return null===e?null:"object"==typeof e?""+e:e}function O(){return"function"==typeof Symbol&&Symbol.iterator||"@@iterator"}function L(e,t){S(e,O(),t)}function R(e){return e[O()]=A,e}function E(){return"function"==typeof Symbol&&Symbol.toStringTag||"@@toStringTag"}function A(){return this}var I=function(){function e(e){void 0===e&&(e="Atom@"+p()),this.name=e,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=oe.NOT_TRACKING}return e.prototype.onBecomeUnobserved=function(){},e.prototype.onBecomeObserved=function(){},e.prototype.reportObserved=function(){return je(this)},e.prototype.reportChanged=function(){Pe(),function(e){if(e.lowestObserverState!==oe.STALE){e.lowestObserverState=oe.STALE;for(var t=e.observers,n=t.length;n--;){var i=t[n];i.dependenciesState===oe.UP_TO_DATE&&(i.isTracing!==ae.NONE&&Fe(i,e),i.onBecomeStale()),i.dependenciesState=oe.STALE}}}(this),Ne()},e.prototype.toString=function(){return this.name},e}(),P=M("Atom",I);function N(e,t){return e===t}var j={identity:N,structural:function(e,t){return Gt(e,t)},default:function(e,t){return function(e,t){return"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}(e,t)||N(e,t)},shallow:function(e,t){return Gt(e,t,1)}},F={},Y={};function z(e,t){var n=t?F:Y;return n[e]||(n[e]={configurable:!0,enumerable:t,get:function(){return $(this),this[e]},set:function(t){$(this),this[e]=t}})}function $(e){if(!0!==e.__mobxDidRunLazyInitializers){var t=e.__mobxDecorators;if(t)for(var n in w(e,"__mobxDidRunLazyInitializers",!0),t){var i=t[n];i.propertyCreator(e,i.prop,i.descriptor,i.decoratorTarget,i.decoratorArguments)}}}function H(e,t){return function(){var n,i=function(i,r,s,o){return!0===o?(t(i,r,s,i,n),null):(Object.prototype.hasOwnProperty.call(i,"__mobxDecorators")||w(i,"__mobxDecorators",a({},i.__mobxDecorators)),i.__mobxDecorators[r]={prop:r,propertyCreator:t,descriptor:s,decoratorTarget:i,decoratorArguments:n},z(r,e))};return W(arguments)?(n=u,i.apply(null,arguments)):(n=Array.prototype.slice.call(arguments),i)}}function W(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]||4===e.length&&!0===e[3]}function V(e,t,n){return at(e)?e:Array.isArray(e)?te.array(e,{name:n}):v(e)?te.object(e,void 0,{name:n}):k(e)?te.map(e,{name:n}):x(e)?te.set(e,{name:n}):e}function B(e){return e}function U(e){var t=H(!0,(function(t,n,i,r,s){!function(e,t,n,i){var r=Yt(e);if(ut(r)){var s=ht(r,{object:e,name:t,type:"add",newValue:n});if(!s)return;n=s.newValue}n=(r.values[t]=new De(n,i,r.name+"."+t,!1)).value,Object.defineProperty(e,t,function(e){return zt[e]||(zt[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.read(this,e)},set:function(t){this.$mobx.write(this,e,t)}})}(t)),r.keys&&r.keys.push(t),function(e,t,n,i){var r=ft(e),s=He(),o=r||s?{type:"add",object:t,name:n,newValue:i}:null;s&&Ve(a({},o,{name:e.name,key:n})),r&&mt(e,o),s&&Ue()}(r,e,t,n)}(t,n,i?i.initializer?i.initializer.call(t):i.value:void 0,e)})),n=("undefined"!=typeof process&&process,t);return n.enhancer=e,n}var G={deep:!0,name:void 0,defaultDecorator:void 0};function q(e){return null==e?G:"string"==typeof e?{name:e,deep:!0}:e}function J(e){return e.defaultDecorator?e.defaultDecorator.enhancer:!1===e.deep?B:V}Object.freeze(G),Object.freeze({deep:!1,name:void 0,defaultDecorator:void 0});var Q=U(V),K=U((function(e,t,n){return null==e||Vt(e)||Lt(e)||It(e)||jt(e)?e:Array.isArray(e)?te.array(e,{name:n,deep:!1}):v(e)?te.object(e,void 0,{name:n,deep:!1}):k(e)?te.map(e,{name:n,deep:!1}):x(e)?te.set(e,{name:n,deep:!1}):m(!1)})),Z=U(B),X=U((function(e,t,n){return Gt(e,t)?t:e})),ee={box:function(e,t){arguments.length>2&&ne("box");var n=q(t);return new De(e,J(n),n.name,!0,n.equals)},shallowBox:function(e,t){return arguments.length>2&&ne("shallowBox"),te.box(e,{name:t,deep:!1})},array:function(e,t){arguments.length>2&&ne("array");var n=q(t);return new kt(e,J(n),n.name)},shallowArray:function(e,t){return arguments.length>2&&ne("shallowArray"),te.array(e,{name:t,deep:!1})},map:function(e,t){arguments.length>2&&ne("map");var n=q(t);return new Et(e,J(n),n.name)},shallowMap:function(e,t){return arguments.length>2&&ne("shallowMap"),te.map(e,{name:t,deep:!1})},set:function(e,t){arguments.length>2&&ne("set");var n=q(t);return new Nt(e,J(n),n.name)},object:function(e,t,n){"string"==typeof arguments[1]&&ne("object");var i=q(n);return rt({},e,t,i)},shallowObject:function(e,t){return"string"==typeof arguments[1]&&ne("shallowObject"),te.object(e,{},{name:t,deep:!1})},ref:Z,shallow:K,deep:Q,struct:X},te=function(e,t,n){if("string"==typeof arguments[1])return Q.apply(null,arguments);if(at(e))return e;var i=v(e)?te.object(e,t,n):Array.isArray(e)?te.array(e,t):k(e)?te.map(e,t):x(e)?te.set(e,t):e;if(i!==e)return i;m(!1)};function ne(e){m("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}Object.keys(ee).forEach((function(e){return te[e]=ee[e]}));var ie=H(!1,(function(e,t,n,i,r){var s,o,c,l;s=e,o=t,c=a({get:n.get,set:n.set},r[0]||{}),l=Yt(s),c.name=l.name+"."+o,c.context=s,l.values[o]=new Te(c),Object.defineProperty(s,o,function(e){return $t[e]||($t[e]={configurable:Re.computedConfigurable,enumerable:!1,get:function(){return Ht(this).read(this,e)},set:function(t){Ht(this).write(this,e,t)}})}(o))})),re=ie({equals:j.structural}),se=function(e,t,n){if("string"==typeof t)return ie.apply(null,arguments);if(null!==e&&"object"==typeof e&&1===arguments.length)return ie.apply(null,arguments);var i="object"==typeof t?t:{};return i.get=e,i.set="function"==typeof t?t:i.set,i.name=i.name||e.name||"",new Te(i)};se.struct=re;var oe=function(e){return e[e.NOT_TRACKING=-1]="NOT_TRACKING",e[e.UP_TO_DATE=0]="UP_TO_DATE",e[e.POSSIBLY_STALE=1]="POSSIBLY_STALE",e[e.STALE=2]="STALE",e}({}),ae=function(e){return e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK",e}({}),ce=function(){return function(e){this.cause=e}}();function le(e){return e instanceof ce}function ue(e){switch(e.dependenciesState){case oe.UP_TO_DATE:return!1;case oe.NOT_TRACKING:case oe.STALE:return!0;case oe.POSSIBLY_STALE:for(var t=me(),n=e.observing,i=n.length,r=0;r<i;r++){var s=n[r];if(Ce(s)){if(Re.disableErrorBoundaries)s.get();else try{s.get()}catch(o){return be(t),!0}if(e.dependenciesState===oe.STALE)return be(t),!0}}return ye(e),be(t),!1}}function de(e){var t=e.observers.length>0;Re.computationDepth>0&&t&&m(!1),Re.allowStateChanges||!t&&"strict"!==Re.enforceActions||m(!1)}function he(e,t,n){var i=ge(!0);ye(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++Re.runId;var r,s=Re.trackingDerivation;if(Re.trackingDerivation=e,!0===Re.disableErrorBoundaries)r=t.call(n);else try{r=t.call(n)}catch(o){r=new ce(o)}return Re.trackingDerivation=s,function(e){for(var t=e.observing,n=e.observing=e.newObserving,i=oe.UP_TO_DATE,r=0,s=e.unboundDepsCount,o=0;o<s;o++)0===(a=n[o]).diffValue&&(a.diffValue=1,r!==o&&(n[r]=a),r++),a.dependenciesState>i&&(i=a.dependenciesState);for(n.length=r,e.newObserving=null,s=t.length;s--;)0===(a=t[s]).diffValue&&Ae(a,e),a.diffValue=0;for(;r--;){var a;1===(a=n[r]).diffValue&&(a.diffValue=0,Ee(a,e))}i!==oe.UP_TO_DATE&&(e.dependenciesState=i,e.onBecomeStale())}(e),_e(i),r}function fe(e){var t=e.observing;e.observing=[];for(var n=t.length;n--;)Ae(t[n],e);e.dependenciesState=oe.NOT_TRACKING}function pe(e){var t=me(),n=e();return be(t),n}function me(){var e=Re.trackingDerivation;return Re.trackingDerivation=null,e}function be(e){Re.trackingDerivation=e}function ge(e){var t=Re.allowStateReads;return Re.allowStateReads=e,t}function _e(e){Re.allowStateReads=e}function ye(e){if(e.dependenciesState!==oe.UP_TO_DATE){e.dependenciesState=oe.UP_TO_DATE;for(var t=e.observing,n=t.length;n--;)t[n].lowestObserverState=oe.UP_TO_DATE}}var ve=0,we=1;function Se(e,t){var n=function(){return Me(e,t,this,arguments)};return n.isMobxAction=!0,n}function Me(e,t,n,i){var r=function(e,t,n){var i=He()&&!!e,r=0;if(i){r=Date.now();var s=n&&n.length||0,o=new Array(s);if(s>0)for(var a=0;a<s;a++)o[a]=n[a];Ve({type:"action",name:e,object:t,arguments:o})}var c=me();Pe();var l={prevDerivation:c,prevAllowStateChanges:ke(!0),prevAllowStateReads:ge(!0),notifySpy:i,startTime:r,actionId:we++,parentActionId:ve};return ve=l.actionId,l}(e,n,i);try{return t.apply(n,i)}catch(s){throw r.error=s,s}finally{!function(e){ve!==e.actionId&&m("invalid action stack. did you forget to finish an action?"),ve=e.parentActionId,void 0!==e.error&&(Re.suppressReactionErrors=!0),xe(e.prevAllowStateChanges),_e(e.prevAllowStateReads),Ne(),be(e.prevDerivation),e.notifySpy&&Ue({time:Date.now()-e.startTime}),Re.suppressReactionErrors=!1}(r)}}function ke(e){var t=Re.allowStateChanges;return Re.allowStateChanges=e,t}function xe(e){Re.allowStateChanges=e}var De=function(e){function t(t,n,i,r,s){void 0===i&&(i="ObservableValue@"+p()),void 0===r&&(r=!0),void 0===s&&(s=j.default);var o=e.call(this,i)||this;return o.enhancer=n,o.name=i,o.equals=s,o.hasUnreportedChange=!1,o.value=n(t,void 0,i),r&&He()&&We({type:"create",name:o.name,newValue:""+o.value}),o}return o(t,e),t.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.prototype.set=function(e){var t=this.value;if((e=this.prepareNewValue(e))!==Re.UNCHANGED){var n=He();n&&Ve({type:"update",name:this.name,newValue:e,oldValue:t}),this.setNewValue(e),n&&Ue()}},t.prototype.prepareNewValue=function(e){if(de(this),ut(this)){var t=ht(this,{object:this,type:"update",newValue:e});if(!t)return Re.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value,this.name),this.equals(this.value,e)?Re.UNCHANGED:e},t.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),ft(this)&&mt(this,{type:"update",object:this,newValue:e,oldValue:t})},t.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},t.prototype.intercept=function(e){return dt(this,e)},t.prototype.observe=function(e,t){return t&&e({object:this,type:"update",newValue:this.value,oldValue:void 0}),pt(this,e)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t.prototype.valueOf=function(){return C(this.get())},t}(I);De.prototype[T()]=De.prototype.valueOf,M("ObservableValue",De);var Te=function(){function e(e){this.dependenciesState=oe.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=oe.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+p(),this.value=new ce(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=ae.NONE,this.derivation=e.get,this.name=e.name||"ComputedValue@"+p(),e.set&&(this.setter=Se(this.name+"-setter",e.set)),this.equals=e.equals||(e.compareStructural||e.struct?j.structural:j.default),this.scope=e.context,this.requiresReaction=!!e.requiresReaction,this.keepAlive=!!e.keepAlive}return e.prototype.onBecomeStale=function(){!function(e){if(e.lowestObserverState===oe.UP_TO_DATE){e.lowestObserverState=oe.POSSIBLY_STALE;for(var t=e.observers,n=t.length;n--;){var i=t[n];i.dependenciesState===oe.UP_TO_DATE&&(i.dependenciesState=oe.POSSIBLY_STALE,i.isTracing!==ae.NONE&&Fe(i,e),i.onBecomeStale())}}}(this)},e.prototype.onBecomeUnobserved=function(){},e.prototype.onBecomeObserved=function(){},e.prototype.get=function(){this.isComputing&&m("Cycle detected in computation "+this.name+": "+this.derivation),0!==Re.inBatch||0!==this.observers.length||this.keepAlive?(je(this),ue(this)&&this.trackAndCompute()&&function(e){if(e.lowestObserverState!==oe.STALE){e.lowestObserverState=oe.STALE;for(var t=e.observers,n=t.length;n--;){var i=t[n];i.dependenciesState===oe.POSSIBLY_STALE?i.dependenciesState=oe.STALE:i.dependenciesState===oe.UP_TO_DATE&&(e.lowestObserverState=oe.UP_TO_DATE)}}}(this)):ue(this)&&(this.warnAboutUntrackedRead(),Pe(),this.value=this.computeValue(!1),Ne());var e=this.value;if(le(e))throw e.cause;return e},e.prototype.peek=function(){var e=this.computeValue(!1);if(le(e))throw e.cause;return e},e.prototype.set=function(e){if(this.setter){b(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else b(!1,!1)},e.prototype.trackAndCompute=function(){He()&&We({object:this.scope,type:"compute",name:this.name});var e=this.value,t=this.dependenciesState===oe.NOT_TRACKING,n=this.computeValue(!0),i=t||le(e)||le(n)||!this.equals(e,n);return i&&(this.value=n),i},e.prototype.computeValue=function(e){var t;if(this.isComputing=!0,Re.computationDepth++,e)t=he(this,this.derivation,this.scope);else if(!0===Re.disableErrorBoundaries)t=this.derivation.call(this.scope);else try{t=this.derivation.call(this.scope)}catch(n){t=new ce(n)}return Re.computationDepth--,this.isComputing=!1,t},e.prototype.suspend=function(){this.keepAlive||(fe(this),this.value=void 0)},e.prototype.observe=function(e,t){var n=this,i=!0,r=void 0;return Ze((function(){var s=n.get();if(!i||t){var o=me();e({type:"update",object:n,newValue:s,oldValue:r}),be(o)}i=!1,r=s}))},e.prototype.warnAboutUntrackedRead=function(){},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.valueOf=function(){return C(this.get())},e}();Te.prototype[T()]=Te.prototype.valueOf;var Ce=M("ComputedValue",Te),Oe=function(){return function(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}}(),Le=!0,Re=function(){var e=f();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(Le=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new Oe).version&&(Le=!1),Le?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new Oe):(setTimeout((function(){m("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")}),1),new Oe)}();function Ee(e,t){var n=e.observers.length;n&&(e.observersIndexes[t.__mapid]=n),e.observers[n]=t,e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function Ae(e,t){if(1===e.observers.length)e.observers.length=0,Ie(e);else{var n=e.observers,i=e.observersIndexes,r=n.pop();if(r!==t){var s=i[t.__mapid]||0;s?i[r.__mapid]=s:delete i[r.__mapid],n[s]=r}delete i[t.__mapid]}}function Ie(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,Re.pendingUnobservations.push(e))}function Pe(){Re.inBatch++}function Ne(){if(0==--Re.inBatch){ze();for(var e=Re.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n.observers.length&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBecomeUnobserved()),n instanceof Te&&n.suspend())}Re.pendingUnobservations=[]}}function je(e){var t=Re.trackingDerivation;return null!==t?(t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e,e.isBeingObserved||(e.isBeingObserved=!0,e.onBecomeObserved())),!0):(0===e.observers.length&&Re.inBatch>0&&Ie(e),!1)}function Fe(e,t){if(console.log("[mobx.trace] '"+e.name+"' is invalidated due to a change in: '"+t.name+"'"),e.isTracing===ae.BREAK){var n=[];!function e(t,n,i){n.length>=1e3?n.push("(and many more)"):(n.push(""+new Array(i).join("\t")+t.name),t.dependencies&&t.dependencies.forEach((function(t){return e(t,n,i+1)})))}((i=e,st(Bt(i,void 0))),n,1),new Function("debugger;\n/*\nTracing '"+e.name+"'\n\nYou are entering this break point because derivation '"+e.name+"' is being traced and '"+t.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof Te?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}var i}var Ye=function(){function e(e,t,n,i){void 0===e&&(e="Reaction@"+p()),void 0===i&&(i=!1),this.name=e,this.onInvalidate=t,this.errorHandler=n,this.requiresObservable=i,this.observing=[],this.newObserving=[],this.dependenciesState=oe.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+p(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=ae.NONE}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Re.pendingReactions.push(this),ze())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){if(!this.isDisposed){if(Pe(),this._isScheduled=!1,ue(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&He()&&We({name:this.name,type:"scheduled-reaction"})}catch(e){this.reportExceptionInDerivation(e)}}Ne()}},e.prototype.track=function(e){Pe();var t,n=He();n&&(t=Date.now(),Ve({name:this.name,type:"reaction"})),this._isRunning=!0;var i=he(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&fe(this),le(i)&&this.reportExceptionInDerivation(i.cause),n&&Ue({time:Date.now()-t}),Ne()},e.prototype.reportExceptionInDerivation=function(e){var t=this;if(this.errorHandler)this.errorHandler(e,this);else{if(Re.disableErrorBoundaries)throw e;var n="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";Re.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(n,e),He()&&We({type:"error",name:this.name,message:n,error:""+e}),Re.globalReactionErrorHandlers.forEach((function(n){return n(e,t)}))}},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Pe(),fe(this),Ne()))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.trace=function(e){void 0===e&&(e=!1),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=!1;"boolean"==typeof e[e.length-1]&&(n=e.pop());var i=ct(e);if(!i)return m(!1);i.isTracing===ae.NONE&&console.log("[mobx.trace] '"+i.name+"' tracing enabled"),i.isTracing=n?ae.BREAK:ae.LOG}(this,e)},e}();function ze(){Re.inBatch>0||Re.isRunningReactions||function(){Re.isRunningReactions=!0;for(var e=Re.pendingReactions,t=0;e.length>0;){100==++t&&(console.error("Reaction doesn't converge to a stable state after 100 iterations. Probably there is a cycle in the reactive function: "+e[0]),e.splice(0));for(var n=e.splice(0),i=0,r=n.length;i<r;i++)n[i].runReaction()}Re.isRunningReactions=!1}()}var $e=M("Reaction",Ye);function He(){return!!Re.spyListeners.length}function We(e){if(Re.spyListeners.length)for(var t=Re.spyListeners,n=0,i=t.length;n<i;n++)t[n](e)}function Ve(e){We(a({},e,{spyReportStart:!0}))}var Be={spyReportEnd:!0};function Ue(e){We(e?a({},e,{spyReportEnd:!0}):Be)}function Ge(){m(!1)}function qe(e){return function(t,n,i){if(i){if(i.value)return{value:Se(e,i.value),enumerable:!1,configurable:!0,writable:!0};var r=i.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return Se(e,r.call(this))}}}return Je(e).apply(this,arguments)}}function Je(e){return function(t,n,i){Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:function(){},set:function(t){w(this,n,Qe(e,t))}})}}var Qe=function(e,t,n,i){return 1===arguments.length&&"function"==typeof e?Se(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?Se(e,t):1===arguments.length&&"string"==typeof e?qe(e):!0!==i?qe(t).apply(null,arguments):void(e[t]=Se(e.name||t,n.value))};function Ke(e,t,n){w(e,t,Se(t,n.bind(e)))}function Ze(e,t){void 0===t&&(t=d);var n,i=t&&t.name||e.name||"Autorun@"+p();if(t.scheduler||t.delay){var r=et(t),s=!1;n=new Ye(i,(function(){s||(s=!0,r((function(){s=!1,n.isDisposed||n.track(o)})))}),t.onError,t.requiresObservable)}else n=new Ye(i,(function(){this.track(o)}),t.onError,t.requiresObservable);function o(){e(n)}return n.schedule(),n.getDisposer()}Qe.bound=function(e,t,n,i){return!0===i?(Ke(e,t,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return Ke(this,t,n.value||n.initializer.call(this)),this[t]},set:Ge}:{enumerable:!1,configurable:!0,set:function(e){Ke(this,t,e)},get:function(){}}};var Xe=function(e){return e()};function et(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Xe}function tt(e,t,n){void 0===n&&(n=d),"boolean"==typeof n&&(n={fireImmediately:n});var i,r,s,o=n.name||"Reaction@"+p(),a=Qe(o,n.onError?(i=n.onError,r=t,function(){try{return r.apply(this,arguments)}catch(e){i.call(this,e)}}):t),c=!n.scheduler&&!n.delay,l=et(n),u=!0,h=!1,f=n.compareStructural?j.structural:n.equals||j.default,m=new Ye(o,(function(){u||c?b():h||(h=!0,l(b))}),n.onError,n.requiresObservable);function b(){if(h=!1,!m.isDisposed){var t=!1;m.track((function(){var n=e(m);t=u||!f(s,n),s=n})),u&&n.fireImmediately&&a(s,m),u||!0!==t||a(s,m),u&&(u=!1)}}return m.schedule(),m.getDisposer()}function nt(e,t,n){return it("onBecomeUnobserved",e,t,n)}function it(e,t,n,i){var r="function"==typeof i?Bt(t,n):Bt(t),s="function"==typeof i?i:n,o=r[e];return"function"!=typeof o?m(!1):(r[e]=function(){o.call(this),s.call(this)},function(){r[e]=o})}function rt(e,t,n,i){var r=(i=q(i)).defaultDecorator||(!1===i.deep?Z:Q);$(e),Yt(e,i.name,r.enhancer),Pe();try{for(var s in t){var o=Object.getOwnPropertyDescriptor(t,s),a=(n&&s in n?n[s]:o.get?ie:r)(e,s,o,!0);a&&Object.defineProperty(e,s,a)}}finally{Ne()}return e}function st(e){var t,n,i={name:e.name};return e.observing&&e.observing.length>0&&(i.dependencies=(t=e.observing,n=[],t.forEach((function(e){-1===n.indexOf(e)&&n.push(e)})),n).map(st)),i}function ot(e,t){if(null==e)return!1;if(void 0!==t){if(Vt(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return Vt(e)||!!e.$mobx||P(e)||$e(e)||Ce(e)}function at(e){return 1!==arguments.length&&m(!1),ot(e)}function ct(e){switch(e.length){case 0:return Re.trackingDerivation;case 1:return Bt(e[0]);case 2:return Bt(e[0],e[1])}}function lt(e,t){void 0===t&&(t=void 0),Pe();try{return e.apply(t)}finally{Ne()}}function ut(e){return void 0!==e.interceptors&&e.interceptors.length>0}function dt(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),g((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function ht(e,t){var n=me();try{var i=e.interceptors;if(i)for(var r=0,s=i.length;r<s&&(b(!(t=i[r](t))||t.type,"Intercept handlers should return nothing or a change object"),t);r++);return t}finally{be(n)}}function ft(e){return void 0!==e.changeListeners&&e.changeListeners.length>0}function pt(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),g((function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}))}function mt(e,t){var n=me(),i=e.changeListeners;if(i){for(var r=0,s=(i=i.slice()).length;r<s;r++)i[r](t);be(n)}}var bt,gt,_t,yt,vt=(bt=!1,gt={},Object.defineProperty(gt,"0",{set:function(){bt=!0}}),Object.create(gt)[0]=1,!1===bt),wt=0,St=function(){return function(){}}();_t=St,yt=Array.prototype,void 0!==Object.setPrototypeOf?Object.setPrototypeOf(_t.prototype,yt):void 0!==_t.prototype.__proto__?_t.prototype.__proto__=yt:_t.prototype=yt,Object.isFrozen(Array)&&["constructor","push","shift","concat","pop","unshift","replace","find","findIndex","splice","reverse","sort"].forEach((function(e){Object.defineProperty(St.prototype,e,{configurable:!0,writable:!0,value:Array.prototype[e]})}));var Mt=function(){function e(e,t,n,i){this.array=n,this.owned=i,this.values=[],this.lastKnownLength=0,this.atom=new I(e||"ObservableArray@"+p()),this.enhancer=function(n,i){return t(n,i,e+"[..]")}}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.dehanceValues=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},e.prototype.intercept=function(e){return dt(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),pt(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;if(e!==t)if(e>t){for(var n=new Array(e-t),i=0;i<e-t;i++)n[i]=void 0;this.spliceWithArray(t,0,n)}else this.spliceWithArray(e,t-e)},e.prototype.updateArrayLength=function(e,t){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=t,t>0&&e+t+1>wt&&Ct(e+t+1)},e.prototype.spliceWithArray=function(e,t,n){var i=this;de(this.atom);var r=this.values.length;if(void 0===e?e=0:e>r?e=r:e<0&&(e=Math.max(0,r+e)),t=1===arguments.length?r-e:null==t?0:Math.max(0,Math.min(t,r-e)),void 0===n&&(n=u),ut(this)){var s=ht(this,{object:this.array,type:"splice",index:e,removedCount:t,added:n});if(!s)return u;t=s.removedCount,n=s.added}var o=(n=0===n.length?n:n.map((function(e){return i.enhancer(e,void 0)}))).length-t;this.updateArrayLength(r,o);var a=this.spliceItemsIntoValues(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice(e,n,a),this.dehanceValues(a)},e.prototype.spliceItemsIntoValues=function(e,t,n){var i;if(n.length<1e4)return(i=this.values).splice.apply(i,l([e,t],n));var r=this.values.slice(e,e+t);return this.values=this.values.slice(0,e).concat(n,this.values.slice(e+t)),r},e.prototype.notifyArrayChildUpdate=function(e,t,n){var i=!this.owned&&He(),r=ft(this),s=r||i?{object:this.array,type:"update",index:e,newValue:t,oldValue:n}:null;i&&Ve(a({},s,{name:this.atom.name})),this.atom.reportChanged(),r&&mt(this,s),i&&Ue()},e.prototype.notifyArraySplice=function(e,t,n){var i=!this.owned&&He(),r=ft(this),s=r||i?{object:this.array,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;i&&Ve(a({},s,{name:this.atom.name})),this.atom.reportChanged(),r&&mt(this,s),i&&Ue()},e}(),kt=function(e){function t(t,n,i,r){void 0===i&&(i="ObservableArray@"+p()),void 0===r&&(r=!1);var s=e.call(this)||this,o=new Mt(i,n,s,r);if(S(s,"$mobx",o),t&&t.length){var a=ke(!0);s.spliceWithArray(0,0,t),xe(a)}return vt&&Object.defineProperty(o.array,"0",xt),s}return o(t,e),t.prototype.intercept=function(e){return this.$mobx.intercept(e)},t.prototype.observe=function(e,t){return void 0===t&&(t=!1),this.$mobx.observe(e,t)},t.prototype.clear=function(){return this.splice(0)},t.prototype.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.$mobx.atom.reportObserved(),Array.prototype.concat.apply(this.peek(),e.map((function(e){return Lt(e)?e.peek():e})))},t.prototype.replace=function(e){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,e)},t.prototype.toJS=function(){return this.slice()},t.prototype.toJSON=function(){return this.toJS()},t.prototype.peek=function(){return this.$mobx.atom.reportObserved(),this.$mobx.dehanceValues(this.$mobx.values)},t.prototype.find=function(e,t,n){void 0===n&&(n=0);var i=this.findIndex.apply(this,arguments);return-1===i?void 0:this.get(i)},t.prototype.findIndex=function(e,t,n){void 0===n&&(n=0);for(var i=this.peek(),r=i.length,s=n;s<r;s++)if(e.call(t,i[s],s,this))return s;return-1},t.prototype.splice=function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(e);case 2:return this.$mobx.spliceWithArray(e,t)}return this.$mobx.spliceWithArray(e,t,n)},t.prototype.spliceWithArray=function(e,t,n){return this.$mobx.spliceWithArray(e,t,n)},t.prototype.push=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.$mobx;return n.spliceWithArray(n.values.length,0,e),n.values.length},t.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},t.prototype.shift=function(){return this.splice(0,1)[0]},t.prototype.unshift=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.$mobx;return n.spliceWithArray(0,0,e),n.values.length},t.prototype.reverse=function(){var e=this.slice();return e.reverse.apply(e,arguments)},t.prototype.sort=function(e){var t=this.slice();return t.sort.apply(t,arguments)},t.prototype.remove=function(e){var t=this.$mobx.dehanceValues(this.$mobx.values).indexOf(e);return t>-1&&(this.splice(t,1),!0)},t.prototype.move=function(e,t){function n(e){if(e<0)throw new Error("[mobx.array] Index out of bounds: "+e+" is negative");var t=this.$mobx.values.length;if(e>=t)throw new Error("[mobx.array] Index out of bounds: "+e+" is not smaller than "+t)}if(n.call(this,e),n.call(this,t),e!==t){var i,r=this.$mobx.values;i=e<t?l(r.slice(0,e),r.slice(e+1,t+1),[r[e]],r.slice(t+1)):l(r.slice(0,t),[r[e]],r.slice(t,e),r.slice(e+1)),this.replace(i)}},t.prototype.get=function(e){var t=this.$mobx;if(t){if(e<t.values.length)return t.atom.reportObserved(),t.dehanceValue(t.values[e]);console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+t.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},t.prototype.set=function(e,t){var n=this.$mobx,i=n.values;if(e<i.length){de(n.atom);var r=i[e];if(ut(n)){var s=ht(n,{type:"update",object:this,index:e,newValue:t});if(!s)return;t=s.newValue}(t=n.enhancer(t,r))!==r&&(i[e]=t,n.notifyArrayChildUpdate(e,t,r))}else{if(e!==i.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+i.length);n.spliceWithArray(e,0,[t])}},t}(St);L(kt.prototype,(function(){this.$mobx.atom.reportObserved();var e=this,t=0;return R({next:function(){return t<e.length?{value:e[t++],done:!1}:{done:!0,value:void 0}}})})),Object.defineProperty(kt.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(e){this.$mobx.setArrayLength(e)}}),w(kt.prototype,E(),"Array"),["every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some","toString","toLocaleString"].forEach((function(e){var t=Array.prototype[e];b("function"==typeof t,"Base function not defined on Array prototype: '"+e+"'"),w(kt.prototype,e,(function(){return t.apply(this.peek(),arguments)}))})),function(e,t){for(var n=0;n<t.length;n++)w(e,t[n],e[t[n]])}(kt.prototype,["constructor","intercept","observe","clear","concat","get","replace","toJS","toJSON","peek","find","findIndex","splice","spliceWithArray","push","pop","set","shift","unshift","reverse","sort","remove","move","toString","toLocaleString"]);var xt=Dt(0);function Dt(e){return{enumerable:!1,configurable:!1,get:function(){return this.get(e)},set:function(t){this.set(e,t)}}}function Tt(e){Object.defineProperty(kt.prototype,""+e,Dt(e))}function Ct(e){for(var t=wt;t<e;t++)Tt(t);wt=e}Ct(1e3);var Ot=M("ObservableArrayAdministration",Mt);function Lt(e){return y(e)&&Ot(e.$mobx)}var Rt={},Et=function(){function e(e,t,n){if(void 0===t&&(t=V),void 0===n&&(n="ObservableMap@"+p()),this.enhancer=t,this.name=n,this.$mobx=Rt,this._keys=new kt(void 0,B,this.name+".keys()",!0),"function"!=typeof Map)throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(e)}return e.prototype._has=function(e){return this._data.has(e)},e.prototype.has=function(e){var t=this;if(!Re.trackingDerivation)return this._has(e);var n=this._hasMap.get(e);if(!n){var i=n=new De(this._has(e),B,this.name+"."+At(e)+"?",!1);this._hasMap.set(e,i),nt(i,(function(){return t._hasMap.delete(e)}))}return n.get()},e.prototype.set=function(e,t){var n=this._has(e);if(ut(this)){var i=ht(this,{type:n?"update":"add",object:this,newValue:t,name:e});if(!i)return this;t=i.newValue}return n?this._updateValue(e,t):this._addValue(e,t),this},e.prototype.delete=function(e){var t=this;if(ut(this)&&!(r=ht(this,{type:"delete",object:this,name:e})))return!1;if(this._has(e)){var n=He(),i=ft(this),r=i||n?{type:"delete",object:this,oldValue:this._data.get(e).value,name:e}:null;return n&&Ve(a({},r,{name:this.name,key:e})),lt((function(){t._keys.remove(e),t._updateHasMapEntry(e,!1),t._data.get(e).setNewValue(void 0),t._data.delete(e)})),i&&mt(this,r),n&&Ue(),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap.get(e);n&&n.setNewValue(t)},e.prototype._updateValue=function(e,t){var n=this._data.get(e);if((t=n.prepareNewValue(t))!==Re.UNCHANGED){var i=He(),r=ft(this),s=r||i?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;i&&Ve(a({},s,{name:this.name,key:e})),n.setNewValue(t),r&&mt(this,s),i&&Ue()}},e.prototype._addValue=function(e,t){var n=this;lt((function(){var i=new De(t,n.enhancer,n.name+"."+At(e),!1);n._data.set(e,i),t=i.value,n._updateHasMapEntry(e,!0),n._keys.push(e)}));var i=He(),r=ft(this),s=r||i?{type:"add",object:this,name:e,newValue:t}:null;i&&Ve(a({},s,{name:this.name,key:e})),r&&mt(this,s),i&&Ue()},e.prototype.get=function(e){return this.has(e)?this.dehanceValue(this._data.get(e).get()):this.dehanceValue(void 0)},e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.keys=function(){return this._keys[O()]()},e.prototype.values=function(){var e=this,t=0;return R({next:function(){return t<e._keys.length?{value:e.get(e._keys[t++]),done:!1}:{value:void 0,done:!0}}})},e.prototype.entries=function(){var e=this,t=0;return R({next:function(){if(t<e._keys.length){var n=e._keys[t++];return{value:[n,e.get(n)],done:!1}}return{done:!0}}})},e.prototype.forEach=function(e,t){var n=this;this._keys.forEach((function(i){return e.call(t,n.get(i),i,n)}))},e.prototype.merge=function(e){var t=this;return It(e)&&(e=e.toJS()),lt((function(){v(e)?Object.keys(e).forEach((function(n){return t.set(n,e[n])})):Array.isArray(e)?e.forEach((function(e){var n=c(e,2);return t.set(n[0],n[1])})):k(e)?e.constructor!==Map?m("Cannot initialize from classes that inherit from Map: "+e.constructor.name):e.forEach((function(e,n){return t.set(n,e)})):null!=e&&m("Cannot initialize map from "+e)})),this},e.prototype.clear=function(){var e=this;lt((function(){pe((function(){e._keys.slice().forEach((function(t){return e.delete(t)}))}))}))},e.prototype.replace=function(e){var t=this;return lt((function(){for(var n,i=k(n=e)||It(n)?n:Array.isArray(n)?new Map(n):v(n)?new Map(Object.entries(n)):m("Cannot convert to map from '"+n+"'"),r=t._keys,s=Array.from(i.keys()),o=!1,a=0;a<r.length;a++){var c=r[a];r.length===s.length&&c!==s[a]&&(o=!0),i.has(c)||(o=!0,t.delete(c))}i.forEach((function(e,n){t._data.has(n)||(o=!0),t.set(n,e)})),o&&t._keys.replace(s)})),this},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.toPOJO=function(){var e=this,t={};return this._keys.forEach((function(n){return t["symbol"==typeof n?n:At(n)]=e.get(n)})),t},e.prototype.toJS=function(){var e=this,t=new Map;return this._keys.forEach((function(n){return t.set(n,e.get(n))})),t},e.prototype.toJSON=function(){return this.toPOJO()},e.prototype.toString=function(){var e=this;return this.name+"[{ "+this._keys.map((function(t){return At(t)+": "+e.get(t)})).join(", ")+" }]"},e.prototype.observe=function(e,t){return pt(this,e)},e.prototype.intercept=function(e){return dt(this,e)},e}();function At(e){return e&&e.toString?e.toString():new String(e).toString()}L(Et.prototype,(function(){return this.entries()})),S(Et.prototype,E(),"Map");var It=M("ObservableMap",Et),Pt={},Nt=function(){function e(e,t,n){if(void 0===t&&(t=V),void 0===n&&(n="ObservableSet@"+p()),this.name=n,this.$mobx=Pt,this._data=new Set,this._atom=function(e,t,n){void 0===t&&(t=_),void 0===n&&(n=_);var i=new I(e);return it("onBecomeObserved",i,t,void 0),nt(i,n),i}(this.name),"function"!=typeof Set)throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(e,i){return t(e,i,n)},e&&this.replace(e)}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.clear=function(){var e=this;lt((function(){pe((function(){e._data.forEach((function(t){e.delete(t)}))}))}))},e.prototype.forEach=function(e,t){var n=this;this._data.forEach((function(i){e.call(t,i,i,n)}))},Object.defineProperty(e.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=this;if(de(this._atom),ut(this)&&!(r=ht(this,{type:"add",object:this,newValue:e})))return this;if(!this.has(e)){lt((function(){t._data.add(t.enhancer(e,void 0)),t._atom.reportChanged()}));var n=He(),i=ft(this),r=i||n?{type:"add",object:this,newValue:e}:null;i&&mt(this,r)}return this},e.prototype.delete=function(e){var t=this;if(ut(this)&&!(r=ht(this,{type:"delete",object:this,oldValue:e})))return!1;if(this.has(e)){var n=He(),i=ft(this),r=i||n?{type:"delete",object:this,oldValue:e}:null;return lt((function(){t._atom.reportChanged(),t._data.delete(e)})),i&&mt(this,r),!0}return!1},e.prototype.has=function(e){return this._atom.reportObserved(),this._data.has(this.dehanceValue(e))},e.prototype.entries=function(){var e=0,t=D(this.keys()),n=D(this.values());return R({next:function(){var i=e;return e+=1,i<n.length?{value:[t[i],n[i]],done:!1}:{done:!0}}})},e.prototype.keys=function(){return this.values()},e.prototype.values=function(){this._atom.reportObserved();var e,t=this,n=0;return void 0!==this._data.values?e=D(this._data.values()):(e=[],this._data.forEach((function(t){return e.push(t)}))),R({next:function(){return n<e.length?{value:t.dehanceValue(e[n++]),done:!1}:{done:!0}}})},e.prototype.replace=function(e){var t=this;return jt(e)&&(e=e.toJS()),lt((function(){Array.isArray(e)||x(e)?(t.clear(),e.forEach((function(e){return t.add(e)}))):null!=e&&m("Cannot initialize set from "+e)})),this},e.prototype.observe=function(e,t){return pt(this,e)},e.prototype.intercept=function(e){return dt(this,e)},e.prototype.toJS=function(){return new Set(this)},e.prototype.toString=function(){return this.name+"[ "+D(this.keys()).join(", ")+" ]"},e}();L(Nt.prototype,(function(){return this.values()})),S(Nt.prototype,E(),"Set");var jt=M("ObservableSet",Nt),Ft=function(){function e(e,t,n){this.target=e,this.name=t,this.defaultEnhancer=n,this.values={}}return e.prototype.read=function(e,t){if(this.target===e||(this.illegalAccess(e,t),this.values[t]))return this.values[t].get()},e.prototype.write=function(e,t,n){var i=this.target;i!==e&&this.illegalAccess(e,t);var r=this.values[t];if(r instanceof Te)r.set(n);else{if(ut(this)){if(!(c=ht(this,{type:"update",object:i,name:t,newValue:n})))return;n=c.newValue}if((n=r.prepareNewValue(n))!==Re.UNCHANGED){var s=ft(this),o=He(),c=s||o?{type:"update",object:i,oldValue:r.value,name:t,newValue:n}:null;o&&Ve(a({},c,{name:this.name,key:t})),r.setNewValue(n),s&&mt(this,c),o&&Ue()}}},e.prototype.remove=function(e){if(this.values[e]){var t=this.target;if(ut(this)&&!(s=ht(this,{object:t,name:e,type:"remove"})))return;try{Pe();var n=ft(this),i=He(),r=this.values[e].get();this.keys&&this.keys.remove(e),delete this.values[e],delete this.target[e];var s=n||i?{type:"remove",object:t,oldValue:r,name:e}:null;i&&Ve(a({},s,{name:this.name,key:e})),n&&mt(this,s),i&&Ue()}finally{Ne()}}},e.prototype.illegalAccess=function(e,t){console.warn("Property '"+t+"' of '"+e+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},e.prototype.observe=function(e,t){return pt(this,e)},e.prototype.intercept=function(e){return dt(this,e)},e.prototype.getKeys=function(){var e=this;return void 0===this.keys&&(this.keys=new kt(Object.keys(this.values).filter((function(t){return e.values[t]instanceof De})),B,"keys("+this.name+")",!0)),this.keys.slice()},e}();function Yt(e,t,n){void 0===t&&(t=""),void 0===n&&(n=V);var i=e.$mobx;return i||(v(e)||(t=(e.constructor.name||"ObservableObject")+"@"+p()),t||(t="ObservableObject@"+p()),S(e,"$mobx",i=new Ft(e,t,n)),i)}var zt=Object.create(null),$t=Object.create(null);function Ht(e){return e.$mobx||($(e),e.$mobx)}var Wt=M("ObservableObjectAdministration",Ft);function Vt(e){return!!y(e)&&($(e),Wt(e.$mobx))}function Bt(e,t){if("object"==typeof e&&null!==e){if(Lt(e))return void 0!==t&&m(!1),e.$mobx.atom;if(jt(e))return e.$mobx;if(It(e)){var n=e;return void 0===t?Bt(n._keys):((i=n._data.get(t)||n._hasMap.get(t))||m(!1),i)}var i;if($(e),Vt(e))return t?((i=e.$mobx.values[t])||m(!1),i):m(!1);if(P(e)||Ce(e)||$e(e))return e}else if("function"==typeof e&&$e(e.$mobx))return e.$mobx;return m(!1)}var Ut=Object.prototype.toString;function Gt(e,t,n){return void 0===n&&(n=-1),function e(t,n,i,r,s){if(t===n)return 0!==t||1/t==1/n;if(null==t||null==n)return!1;if(t!=t)return n!=n;var o=typeof t;if("function"!==o&&"object"!==o&&"object"!=typeof n)return!1;t=qt(t),n=qt(n);var a=Ut.call(t);if(a!==Ut.call(n))return!1;switch(a){case"[object RegExp]":case"[object String]":return""+t==""+n;case"[object Number]":return+t!=+t?+n!=+n:0==+t?1/+t==1/n:+t==+n;case"[object Date]":case"[object Boolean]":return+t==+n;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(t)===Symbol.valueOf.call(n)}var c="[object Array]"===a;if(!c){if("object"!=typeof t||"object"!=typeof n)return!1;var l=t.constructor,u=n.constructor;if(l!==u&&!("function"==typeof l&&l instanceof l&&"function"==typeof u&&u instanceof u)&&"constructor"in t&&"constructor"in n)return!1}if(0===i)return!1;i<0&&(i=-1),s=s||[];for(var d=(r=r||[]).length;d--;)if(r[d]===t)return s[d]===n;if(r.push(t),s.push(n),c){if((d=t.length)!==n.length)return!1;for(;d--;)if(!e(t[d],n[d],i-1,r,s))return!1}else{var h=Object.keys(t),f=void 0;if(d=h.length,Object.keys(n).length!==d)return!1;for(;d--;)if(!Jt(n,f=h[d])||!e(t[f],n[f],i-1,r,s))return!1}return r.pop(),s.pop(),!0}(e,t,n)}function qt(e){return Lt(e)?e.peek():k(e)||It(e)||x(e)||jt(e)?D(e.entries()):e}function Jt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:function(e){return Re.spyListeners.push(e),g((function(){Re.spyListeners=Re.spyListeners.filter((function(t){return t!==e}))}))},extras:{getDebugName:function(e,t){return(void 0!==t?Bt(e,t):Vt(e)||It(e)||jt(e)?function e(t,n){return t||m("Expecting some object"),void 0!==n?e(Bt(t,n)):P(t)||Ce(t)||$e(t)||It(t)||jt(t)?t:($(t),t.$mobx?t.$mobx:void m(!1))}(e):Bt(e)).name}},$mobx:"$mobx"});var Qt,Kt,Zt,Xt,en=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},tn=function(e){return e},nn=Math.max,rn=function(e,t,n){return t=nn(void 0===t?e.length-1:t,0),function(){for(var i=arguments,r=-1,s=nn(i.length-t,0),o=Array(s);++r<s;)o[r]=i[t+r];r=-1;for(var a=Array(t+1);++r<t;)a[r]=i[r];return a[t]=n(o),en(e,this,a)}},sn=n("Ju5/"),on=sn.a.Symbol,an=Object.prototype,cn=an.hasOwnProperty,ln=an.toString,un=on?on.toStringTag:void 0,dn=Object.prototype.toString,hn=on?on.toStringTag:void 0,fn=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":hn&&hn in Object(e)?function(e){var t=cn.call(e,un),n=e[un];try{e[un]=void 0;var i=!0}catch(s){}var r=ln.call(e);return i&&(t?e[un]=n:delete e[un]),r}(e):function(e){return dn.call(e)}(e)},pn=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},mn=function(e){if(!pn(e))return!1;var t=fn(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},bn=sn.a["__core-js_shared__"],gn=(Qt=/[^.]+$/.exec(bn&&bn.keys&&bn.keys.IE_PROTO||""))?"Symbol(src)_1."+Qt:"",_n=Function.prototype.toString,yn=function(e){if(null!=e){try{return _n.call(e)}catch(t){}try{return e+""}catch(t){}}return""},vn=/^\[object .+?Constructor\]$/,wn=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Sn=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!pn(e)||(t=e,gn&&gn in t))&&(mn(e)?wn:vn).test(yn(e));var t}(n)?n:void 0},Mn=function(){try{var e=Sn(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),kn=Date.now,xn=(Kt=Mn?function(e,t){return Mn(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:tn,Zt=0,Xt=0,function(){var e=kn(),t=16-(e-Xt);if(Xt=e,t>0){if(++Zt>=800)return arguments[0]}else Zt=0;return Kt.apply(void 0,arguments)}),Dn=function(e,t){return xn(rn(e,t,tn),e+"")},Tn=function(e,t){return e===t||e!=e&&t!=t},Cn=function(e,t){for(var n=e.length;n--;)if(Tn(e[n][0],t))return n;return-1},On=Array.prototype.splice;function Ln(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Ln.prototype.clear=function(){this.__data__=[],this.size=0},Ln.prototype.delete=function(e){var t=this.__data__,n=Cn(t,e);return!(n<0||(n==t.length-1?t.pop():On.call(t,n,1),--this.size,0))},Ln.prototype.get=function(e){var t=this.__data__,n=Cn(t,e);return n<0?void 0:t[n][1]},Ln.prototype.has=function(e){return Cn(this.__data__,e)>-1},Ln.prototype.set=function(e,t){var n=this.__data__,i=Cn(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this};var Rn=Ln,En=Sn(sn.a,"Map"),An=Sn(Object,"create"),In=Object.prototype.hasOwnProperty,Pn=Object.prototype.hasOwnProperty;function Nn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Nn.prototype.clear=function(){this.__data__=An?An(null):{},this.size=0},Nn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Nn.prototype.get=function(e){var t=this.__data__;if(An){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return In.call(t,e)?t[e]:void 0},Nn.prototype.has=function(e){var t=this.__data__;return An?void 0!==t[e]:Pn.call(t,e)},Nn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=An&&void 0===t?"__lodash_hash_undefined__":t,this};var jn=Nn,Fn=function(e,t){var n,i,r=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof t?"string":"hash"]:r.map};function Yn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Yn.prototype.clear=function(){this.size=0,this.__data__={hash:new jn,map:new(En||Rn),string:new jn}},Yn.prototype.delete=function(e){var t=Fn(this,e).delete(e);return this.size-=t?1:0,t},Yn.prototype.get=function(e){return Fn(this,e).get(e)},Yn.prototype.has=function(e){return Fn(this,e).has(e)},Yn.prototype.set=function(e,t){var n=Fn(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this};var zn=Yn;function $n(e){var t=this.__data__=new Rn(e);this.size=t.size}$n.prototype.clear=function(){this.__data__=new Rn,this.size=0},$n.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},$n.prototype.get=function(e){return this.__data__.get(e)},$n.prototype.has=function(e){return this.__data__.has(e)},$n.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Rn){var i=n.__data__;if(!En||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new zn(i)}return n.set(e,t),this.size=n.size,this};var Hn=$n,Wn=function(e,t,n){"__proto__"==t&&Mn?Mn(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},Vn=function(e,t,n){(void 0!==n&&!Tn(e[t],n)||void 0===n&&!(t in e))&&Wn(e,t,n)},Bn=function(e,t,n){for(var i=-1,r=Object(e),s=n(e),o=s.length;o--;){var a=s[++i];if(!1===t(r[a],a,r))break}return e},Un=n("3/ER"),Gn=sn.a.Uint8Array,qn=function(e){var t=new e.constructor(e.byteLength);return new Gn(t).set(new Gn(e)),t},Jn=function(e,t){var n=t?qn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)},Qn=function(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t},Kn=Object.create,Zn=function(){function e(){}return function(t){if(!pn(t))return{};if(Kn)return Kn(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),Xn=function(e,t){return function(n){return e(t(n))}},ei=Xn(Object.getPrototypeOf,Object),ti=Object.prototype,ni=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||ti)},ii=function(e){return"function"!=typeof e.constructor||ni(e)?{}:Zn(ei(e))},ri=function(e){return null!=e&&"object"==typeof e},si=function(e){return ri(e)&&"[object Arguments]"==fn(e)},oi=Object.prototype,ai=oi.hasOwnProperty,ci=oi.propertyIsEnumerable,li=si(function(){return arguments}())?si:function(e){return ri(e)&&ai.call(e,"callee")&&!ci.call(e,"callee")},ui=Array.isArray,di=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},hi=function(e){return null!=e&&di(e.length)&&!mn(e)},fi=n("WOAq"),pi=Function.prototype.toString,mi=Object.prototype.hasOwnProperty,bi=pi.call(Object),gi=function(e){if(!ri(e)||"[object Object]"!=fn(e))return!1;var t=ei(e);if(null===t)return!0;var n=mi.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&pi.call(n)==bi},_i={};_i["[object Float32Array]"]=_i["[object Float64Array]"]=_i["[object Int8Array]"]=_i["[object Int16Array]"]=_i["[object Int32Array]"]=_i["[object Uint8Array]"]=_i["[object Uint8ClampedArray]"]=_i["[object Uint16Array]"]=_i["[object Uint32Array]"]=!0,_i["[object Arguments]"]=_i["[object Array]"]=_i["[object ArrayBuffer]"]=_i["[object Boolean]"]=_i["[object DataView]"]=_i["[object Date]"]=_i["[object Error]"]=_i["[object Function]"]=_i["[object Map]"]=_i["[object Number]"]=_i["[object Object]"]=_i["[object RegExp]"]=_i["[object Set]"]=_i["[object String]"]=_i["[object WeakMap]"]=!1;var yi,vi=function(e){return function(t){return e(t)}},wi=n("xutz"),Si=wi.a&&wi.a.isTypedArray,Mi=Si?vi(Si):function(e){return ri(e)&&di(e.length)&&!!_i[fn(e)]},ki=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},xi=Object.prototype.hasOwnProperty,Di=function(e,t,n){var i=e[t];xi.call(e,t)&&Tn(i,n)&&(void 0!==n||t in e)||Wn(e,t,n)},Ti=function(e,t,n,i){var r=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var a=t[s],c=i?i(n[a],e[a],a,n,e):void 0;void 0===c&&(c=e[a]),r?Wn(n,a,c):Di(n,a,c)}return n},Ci=/^(?:0|[1-9]\d*)$/,Oi=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Ci.test(e))&&e>-1&&e%1==0&&e<t},Li=Object.prototype.hasOwnProperty,Ri=function(e,t){var n=ui(e),i=!n&&li(e),r=!n&&!i&&Object(fi.a)(e),s=!n&&!i&&!r&&Mi(e),o=n||i||r||s,a=o?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],c=a.length;for(var l in e)!t&&!Li.call(e,l)||o&&("length"==l||r&&("offset"==l||"parent"==l)||s&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Oi(l,c))||a.push(l);return a},Ei=Object.prototype.hasOwnProperty,Ai=function(e){return hi(e)?Ri(e,!0):function(e){if(!pn(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=ni(e),n=[];for(var i in e)("constructor"!=i||!t&&Ei.call(e,i))&&n.push(i);return n}(e)},Ii=function e(t,n,i,r,s){t!==n&&Bn(n,(function(o,a){if(s||(s=new Hn),pn(o))!function(e,t,n,i,r,s,o){var a,c=ki(e,n),l=ki(t,n),u=o.get(l);if(u)Vn(e,n,u);else{var d=s?s(c,l,n+"",e,t,o):void 0,h=void 0===d;if(h){var f=ui(l),p=!f&&Object(fi.a)(l),m=!f&&!p&&Mi(l);d=l,f||p||m?ui(c)?d=c:ri(a=c)&&hi(a)?d=Qn(c):p?(h=!1,d=Object(Un.a)(l,!0)):m?(h=!1,d=Jn(l,!0)):d=[]:gi(l)||li(l)?(d=c,li(c)?d=function(e){return Ti(e,Ai(e))}(c):pn(c)&&!mn(c)||(d=ii(l))):h=!1}h&&(o.set(l,d),r(d,l,i,s,o),o.delete(l)),Vn(e,n,d)}}(t,n,a,i,e,r,s);else{var c=r?r(ki(t,a),o,a+"",t,n,s):void 0;void 0===c&&(c=o),Vn(t,a,c)}}),Ai)},Pi=function e(t,n,i,r,s,o){return pn(t)&&pn(n)&&(o.set(n,t),Ii(t,n,void 0,e,o),o.delete(n)),t},Ni=function(e,t,n){if(!pn(n))return!1;var i=typeof t;return!!("number"==i?hi(n)&&Oi(t,n.length):"string"==i&&t in n)&&Tn(n[t],e)},ji=(yi=function(e,t,n,i){Ii(e,t,n,i)},Dn((function(e,t){var n=-1,i=t.length,r=i>1?t[i-1]:void 0,s=i>2?t[2]:void 0;for(r=yi.length>3&&"function"==typeof r?(i--,r):void 0,s&&Ni(t[0],t[1],s)&&(r=i<3?void 0:r,i=1),e=Object(e);++n<i;){var o=t[n];o&&yi(e,o,n,r)}return e}))),Fi=Dn((function(e){return e.push(void 0,Pi),en(ji,void 0,e)})),Yi=function(e){return"symbol"==typeof e||ri(e)&&"[object Symbol]"==fn(e)},zi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$i=/^\w*$/,Hi=function(e,t){if(ui(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Yi(e))||$i.test(e)||!zi.test(e)||null!=t&&e in Object(t)};function Wi(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],s=n.cache;if(s.has(r))return s.get(r);var o=e.apply(this,i);return n.cache=s.set(r,o)||s,o};return n.cache=new(Wi.Cache||zn),n}Wi.Cache=zn;var Vi,Bi,Ui=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Gi=/\\(\\)?/g,qi=(Vi=Wi((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Ui,(function(e,n,i,r){t.push(i?r.replace(Gi,"$1"):n||e)})),t}),(function(e){return 500===Bi.size&&Bi.clear(),e})),Bi=Vi.cache,Vi),Ji=function(e,t){for(var n=-1,i=null==e?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r},Qi=on?on.prototype:void 0,Ki=Qi?Qi.toString:void 0,Zi=function(e,t){return ui(e)?e:Hi(e,t)?[e]:qi(function(e){return null==e?"":function e(t){if("string"==typeof t)return t;if(ui(t))return Ji(t,e)+"";if(Yi(t))return Ki?Ki.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}(e)}(e))},Xi=function(e){if("string"==typeof e||Yi(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},er=function(e,t){for(var n=0,i=(t=Zi(t,e)).length;null!=e&&n<i;)e=e[Xi(t[n++])];return n&&n==i?e:void 0},tr=function(e,t,n){var i=null==e?void 0:er(e,t);return void 0===i?n:i},nr=Xn(Object.keys,Object),ir=Object.prototype.hasOwnProperty,rr=function(e){return hi(e)?Ri(e):function(e){if(!ni(e))return nr(e);var t=[];for(var n in Object(e))ir.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)},sr=function(){return[]},or=Object.prototype.propertyIsEnumerable,ar=Object.getOwnPropertySymbols,cr=ar?function(e){return null==e?[]:(e=Object(e),function(t,n){for(var i=-1,r=null==t?0:t.length,s=0,o=[];++i<r;){var a=t[i];or.call(e,a)&&(o[s++]=a)}return o}(ar(e)))}:sr,lr=function(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e},ur=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)lr(t,cr(e)),e=ei(e);return t}:sr,dr=function(e,t,n){var i=t(e);return ui(e)?i:lr(i,n(e))},hr=function(e){return dr(e,rr,cr)},fr=function(e){return dr(e,Ai,ur)},pr=Sn(sn.a,"DataView"),mr=Sn(sn.a,"Promise"),br=Sn(sn.a,"Set"),gr=Sn(sn.a,"WeakMap"),_r="[object Map]",yr="[object Promise]",vr="[object Set]",wr="[object WeakMap]",Sr="[object DataView]",Mr=yn(pr),kr=yn(En),xr=yn(mr),Dr=yn(br),Tr=yn(gr),Cr=fn;(pr&&Cr(new pr(new ArrayBuffer(1)))!=Sr||En&&Cr(new En)!=_r||mr&&Cr(mr.resolve())!=yr||br&&Cr(new br)!=vr||gr&&Cr(new gr)!=wr)&&(Cr=function(e){var t=fn(e),n="[object Object]"==t?e.constructor:void 0,i=n?yn(n):"";if(i)switch(i){case Mr:return Sr;case kr:return _r;case xr:return yr;case Dr:return vr;case Tr:return wr}return t});var Or=Cr,Lr=Object.prototype.hasOwnProperty,Rr=/\w*$/,Er=on?on.prototype:void 0,Ar=Er?Er.valueOf:void 0,Ir=wi.a&&wi.a.isMap,Pr=Ir?vi(Ir):function(e){return ri(e)&&"[object Map]"==Or(e)},Nr=wi.a&&wi.a.isSet,jr=Nr?vi(Nr):function(e){return ri(e)&&"[object Set]"==Or(e)},Fr="[object Arguments]",Yr="[object Function]",zr={};zr[Fr]=zr["[object Array]"]=zr["[object ArrayBuffer]"]=zr["[object DataView]"]=zr["[object Boolean]"]=zr["[object Date]"]=zr["[object Float32Array]"]=zr["[object Float64Array]"]=zr["[object Int8Array]"]=zr["[object Int16Array]"]=zr["[object Int32Array]"]=zr["[object Map]"]=zr["[object Number]"]=zr["[object Object]"]=zr["[object RegExp]"]=zr["[object Set]"]=zr["[object String]"]=zr["[object Symbol]"]=zr["[object Uint8Array]"]=zr["[object Uint8ClampedArray]"]=zr["[object Uint16Array]"]=zr["[object Uint32Array]"]=!0,zr["[object Error]"]=zr[Yr]=zr["[object WeakMap]"]=!1;var $r=function e(t,n,i,r,s,o){var a,c=1&n,l=2&n,u=4&n;if(i&&(a=s?i(t,r,s,o):i(t)),void 0!==a)return a;if(!pn(t))return t;var d=ui(t);if(d){if(a=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Lr.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(t),!c)return Qn(t,a)}else{var h=Or(t),f=h==Yr||"[object GeneratorFunction]"==h;if(Object(fi.a)(t))return Object(Un.a)(t,c);if("[object Object]"==h||h==Fr||f&&!s){if(a=l||f?{}:ii(t),!c)return l?function(e,t){return Ti(e,ur(e),t)}(t,function(e,t){return e&&Ti(t,Ai(t),e)}(a,t)):function(e,t){return Ti(e,cr(e),t)}(t,function(e,t){return e&&Ti(t,rr(t),e)}(a,t))}else{if(!zr[h])return s?t:{};a=function(e,t,n){var i=e.constructor;switch(t){case"[object ArrayBuffer]":return qn(e);case"[object Boolean]":case"[object Date]":return new i(+e);case"[object DataView]":return function(e,t){var n=t?qn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Jn(e,n);case"[object Map]":return new i;case"[object Number]":case"[object String]":return new i(e);case"[object RegExp]":return function(e){var t=new e.constructor(e.source,Rr.exec(e));return t.lastIndex=e.lastIndex,t}(e);case"[object Set]":return new i;case"[object Symbol]":return Ar?Object(Ar.call(e)):{}}}(t,h,c)}}o||(o=new Hn);var p=o.get(t);if(p)return p;o.set(t,a),jr(t)?t.forEach((function(r){a.add(e(r,n,i,r,t,o))})):Pr(t)&&t.forEach((function(r,s){a.set(s,e(r,n,i,s,t,o))}));var m=u?l?fr:hr:l?keysIn:rr,b=d?void 0:m(t);return function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n););}(b||t,(function(r,s){b&&(r=t[s=r]),Di(a,s,e(r,n,i,s,t,o))})),a},Hr=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0},Wr=function(e,t){return null==(e=function(e,t){return t.length<2?e:er(e,function(e,t,n){var i=-1,r=e.length;t<0&&(t=-t>r?0:r+t),(n=n>r?r:n)<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(r);++i<r;)s[i]=e[i+t];return s}(t,0,-1))}(e,t=Zi(t,e)))||delete e[Xi(Hr(t))]},Vr=function(e){return gi(e)?void 0:e},Br=on?on.isConcatSpreadable:void 0,Ur=function(e){return ui(e)||li(e)||!!(Br&&e&&e[Br])},Gr=function(e){return null!=e&&e.length?function e(t,n,i,r,s){var o=-1,a=t.length;for(i||(i=Ur),s||(s=[]);++o<a;){var c=t[o];n>0&&i(c)?n>1?e(c,n-1,i,r,s):lr(s,c):r||(s[s.length]=c)}return s}(e,1):[]},qr=function(e){return xn(rn(e,void 0,Gr),e+"")},Jr=qr((function(e,t){var n={};if(null==e)return n;var i=!1;t=Ji(t,(function(t){return t=Zi(t,e),i||(i=t.length>1),t})),Ti(e,fr(e),n),i&&(n=$r(n,7,Vr));for(var r=t.length;r--;)Wr(n,t[r]);return n})),Qr=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1};function Kr(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new zn;++t<n;)this.add(e[t])}Kr.prototype.add=Kr.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Kr.prototype.has=function(e){return this.__data__.has(e)};var Zr=Kr,Xr=function(e,t){return e.has(t)},es=function(e,t,n,i,r,s){var o=1&n,a=e.length,c=t.length;if(a!=c&&!(o&&c>a))return!1;var l=s.get(e);if(l&&s.get(t))return l==t;var u=-1,d=!0,h=2&n?new Zr:void 0;for(s.set(e,t),s.set(t,e);++u<a;){var f=e[u],p=t[u];if(i)var m=o?i(p,f,u,t,e,s):i(f,p,u,e,t,s);if(void 0!==m){if(m)continue;d=!1;break}if(h){if(!Qr(t,(function(e,t){if(!Xr(h,t)&&(f===e||r(f,e,n,i,s)))return h.push(t)}))){d=!1;break}}else if(f!==p&&!r(f,p,n,i,s)){d=!1;break}}return s.delete(e),s.delete(t),d},ts=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n},ns=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},is=on?on.prototype:void 0,rs=is?is.valueOf:void 0,ss=Object.prototype.hasOwnProperty,os="[object Arguments]",as="[object Array]",cs="[object Object]",ls=Object.prototype.hasOwnProperty,us=function e(t,n,i,r,s){return t===n||(null==t||null==n||!ri(t)&&!ri(n)?t!=t&&n!=n:function(e,t,n,i,r,s){var o=ui(e),a=ui(t),c=o?as:Or(e),l=a?as:Or(t),u=(c=c==os?cs:c)==cs,d=(l=l==os?cs:l)==cs,h=c==l;if(h&&Object(fi.a)(e)){if(!Object(fi.a)(t))return!1;o=!0,u=!1}if(h&&!u)return s||(s=new Hn),o||Mi(e)?es(e,t,n,i,r,s):function(e,t,n,i,r,s,o){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!s(new Gn(e),new Gn(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Tn(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var a=ts;case"[object Set]":if(a||(a=ns),e.size!=t.size&&!(1&i))return!1;var c=o.get(e);if(c)return c==t;i|=2,o.set(e,t);var l=es(a(e),a(t),i,r,s,o);return o.delete(e),l;case"[object Symbol]":if(rs)return rs.call(e)==rs.call(t)}return!1}(e,t,c,n,i,r,s);if(!(1&n)){var f=u&&ls.call(e,"__wrapped__"),p=d&&ls.call(t,"__wrapped__");if(f||p){var m=f?e.value():e,b=p?t.value():t;return s||(s=new Hn),r(m,b,n,i,s)}}return!!h&&(s||(s=new Hn),function(e,t,n,i,r,s){var o=1&n,a=hr(e),c=a.length;if(c!=hr(t).length&&!o)return!1;for(var l=c;l--;){var u=a[l];if(!(o?u in t:ss.call(t,u)))return!1}var d=s.get(e);if(d&&s.get(t))return d==t;var h=!0;s.set(e,t),s.set(t,e);for(var f=o;++l<c;){var p=e[u=a[l]],m=t[u];if(i)var b=o?i(m,p,u,t,e,s):i(p,m,u,e,t,s);if(!(void 0===b?p===m||r(p,m,n,i,s):b)){h=!1;break}f||(f="constructor"==u)}if(h&&!f){var g=e.constructor,_=t.constructor;g==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof _&&_ instanceof _||(h=!1)}return s.delete(e),s.delete(t),h}(e,t,n,i,r,s))}(t,n,i,r,e,s))},ds=function(e){return e==e&&!pn(e)},hs=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},fs=function(e,t){return null!=e&&t in Object(e)},ps=function(e,t){return null!=e&&function(e,t,n){for(var i=-1,r=(t=Zi(t,e)).length,s=!1;++i<r;){var o=Xi(t[i]);if(!(s=null!=e&&n(e,o)))break;e=e[o]}return s||++i!=r?s:!!(r=null==e?0:e.length)&&di(r)&&Oi(o,r)&&(ui(e)||li(e))}(e,t,fs)},ms=function(e){return"function"==typeof e?e:null==e?tn:"object"==typeof e?ui(e)?(r=e[1],Hi(i=e[0])&&ds(r)?hs(Xi(i),r):function(e){var t=tr(e,i);return void 0===t&&t===r?ps(e,i):us(r,t,3)}):1==(n=function(e){for(var t=rr(e),n=t.length;n--;){var i=t[n],r=e[i];t[n]=[i,r,ds(r)]}return t}(t=e)).length&&n[0][2]?hs(n[0][0],n[0][1]):function(e){return e===t||function(e,t,n,i){var r=n.length,s=r;if(null==e)return!s;for(e=Object(e);r--;){var o=n[r];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++r<s;){var a=(o=n[r])[0],c=e[a],l=o[1];if(o[2]){if(void 0===c&&!(a in e))return!1}else{var u,d=new Hn;if(!(void 0===u?us(l,c,3,i,d):u))return!1}}return!0}(e,0,n)}:function(e){return Hi(e)?(t=Xi(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return er(t,e)}}(e);var t}(e);var t,n,i,r},bs=function(e,t){if(null==e)return e;if(!hi(e))return function(e,t){return e&&Bn(e,t,rr)}(e,t);for(var n=e.length,i=-1,r=Object(e);++i<n&&!1!==t(r[i],i,r););return e},gs=function(e,t){var n;return bs(e,(function(e,i,r){return!(n=t(e,i,r))})),!!n},_s=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(!t(e[n],n,e))return!1;return!0},ys=function(e,t){var n=!0;return bs(e,(function(e,i,r){return n=!!t(e,i,r)})),n},vs=function(e){return e&&e.length?e[0]:void 0},ws=function(e){for(var t=-1,n=null==e?0:e.length,i=0,r=[];++t<n;){var s=e[t];s&&(r[i++]=s)}return r},Ss=function(e,t,n,i){for(var r=e.length,s=n+(i?1:-1);i?s--:++s<r;)if(t(e[s],s,e))return s;return-1},Ms=/^\s+|\s+$/g,ks=/^[-+]0x[0-9a-f]+$/i,xs=/^0b[01]+$/i,Ds=/^0o[0-7]+$/i,Ts=parseInt,Cs=function(e){if("number"==typeof e)return e;if(Yi(e))return NaN;if(pn(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=pn(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Ms,"");var n=xs.test(e);return n||Ds.test(e)?Ts(e.slice(2),n?2:8):ks.test(e)?NaN:+e},Os=function(e){var t=function(e){return e?1/0===(e=Cs(e))||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}(e),n=t%1;return t==t?n?t-n:t:0},Ls=Math.max,Rs=function(e,t,n){var i=Object(e);if(!hi(e)){var r=ms(t);e=rr(e),t=function(e){return r(i[e],e,i)}}var s=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var r=null==n?0:Os(n);return r<0&&(r=Ls(i+r,0)),Ss(e,ms(t),r)}(e,t,n);return s>-1?i[r?e[s]:s]:void 0},Es=function(e){return"string"==typeof e||!ui(e)&&ri(e)&&"[object String]"==fn(e)},As=function(){return sn.a.Date.now()},Is=Math.max,Ps=Math.min,Ns=function(e){return e!=e},js=Math.max,Fs=function(e,t,n,i){var r;e=hi(e)?e:null==(r=e)?[]:function(e,t){return Ji(t,(function(t){return e[t]}))}(r,rr(r)),n=n&&!i?Os(n):0;var s=e.length;return n<0&&(n=js(s+n,0)),Es(e)?n<=s&&e.indexOf(t,n)>-1:!!s&&function(e,t,n){return t==t?function(e,t,n){for(var i=n-1,r=e.length;++i<r;)if(e[i]===t)return i;return-1}(e,t,n):Ss(e,Ns,n)}(e,t,n)>-1},Ys=function(e,t,n,i){if(!pn(e))return e;for(var r=-1,s=(t=Zi(t,e)).length,o=s-1,a=e;null!=a&&++r<s;){var c=Xi(t[r]),l=n;if(r!=o){var u=a[c];void 0===(l=i?i(u,c,a):void 0)&&(l=pn(u)?u:Oi(t[r+1])?[]:{})}Di(a,c,l),a=a[c]}return e},zs=qr((function(e,t){return null==e?{}:function(e,t){return function(e,t,n){for(var i=-1,r=t.length,s={};++i<r;){var o=t[i],a=er(e,o);n(0,o)&&Ys(s,Zi(o,e),a)}return s}(e,t,(function(t,n){return ps(e,n)}))}(e,t)}));function $s(e,t){1&e&&(i.Sb(0,"span"),i.Oc(1,"loading..."),i.Rb())}const Hs=function(e){return{$implicit:e}};function Ws(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"div"),i.nc(2),i.Rb(),i.Pb()),2&e){const e=i.ic();i.yb(1),i.Kc("height",e.getTotalHeight())}}const Vs=function(){return{dontDetach:!0}},Bs=["*"],Us=["loadingTemplate"],Gs=["treeNodeTemplate"],qs=["treeNodeWrapperTemplate"],Js=["treeNodeFullTemplate"],Qs=["viewport"],Ks=function(e,t,n,i){return{loadingTemplate:e,treeNodeTemplate:t,treeNodeWrapperTemplate:n,treeNodeFullTemplate:i}};function Zs(e,t){if(1&e&&i.Nb(0,"tree-node-collection",4),2&e){const e=i.ic();i.pc("nodes",e.treeModel.roots)("treeModel",e.treeModel)("templates",i.xc(3,Ks,e.loadingTemplate,e.treeNodeTemplate,e.treeNodeWrapperTemplate,e.treeNodeFullTemplate))}}function Xs(e,t){if(1&e&&i.Nb(0,"tree-node-drop-slot",5),2&e){const e=i.ic();i.pc("dropIndex",0)("node",e.treeModel.virtualRoot)}}function eo(e,t){if(1&e&&i.Nb(0,"tree-node-drop-slot",6),2&e){const e=i.ic(3);i.pc("dropIndex",e.node.index)("node",e.node.parent)}}function to(e,t){if(1&e&&(i.Sb(0,"div"),i.Mc(1,eo,1,2,"tree-node-drop-slot",3),i.Nb(2,"tree-node-wrapper",4),i.Nb(3,"tree-node-children",5),i.Nb(4,"tree-node-drop-slot",6),i.Rb()),2&e){const e=i.ic(2);i.Ab(e.node.getClass()),i.Eb("tree-node",!0)("tree-node-expanded",e.node.isExpanded&&e.node.hasChildren)("tree-node-collapsed",e.node.isCollapsed&&e.node.hasChildren)("tree-node-leaf",e.node.isLeaf)("tree-node-active",e.node.isActive)("tree-node-focused",e.node.isFocused),i.yb(1),i.pc("ngIf",0===e.index),i.yb(1),i.pc("node",e.node)("index",e.index)("templates",e.templates),i.yb(1),i.pc("node",e.node)("templates",e.templates),i.yb(1),i.pc("dropIndex",e.node.index+1)("node",e.node.parent)}}const no=function(e,t,n,i){return{$implicit:e,node:t,index:n,templates:i}};function io(e,t){if(1&e&&(i.Qb(0),i.Mc(1,to,5,22,"div",1),i.Ob(2,2),i.Pb()),2&e){const e=i.ic();i.yb(1),i.pc("ngIf",!e.templates.treeNodeFullTemplate),i.yb(1),i.pc("ngTemplateOutlet",e.templates.treeNodeFullTemplate)("ngTemplateOutletContext",i.xc(3,no,e.node,e.node,e.index,e.templates))}}function ro(e,t){if(1&e&&(i.Sb(0,"span"),i.Oc(1),i.Rb()),2&e){const e=i.ic();i.yb(1),i.Pc(e.node.displayField)}}const so=function(e,t,n){return{$implicit:e,node:t,index:n}};function oo(e,t){if(1&e){const e=i.Tb();i.Sb(0,"span",3),i.gc("click",(function(t){return i.Dc(e),i.ic(2).node.mouseAction("expanderClick",t)})),i.Nb(1,"span",4),i.Rb()}if(2&e){const e=i.ic(2);i.Eb("toggle-children-wrapper-expanded",e.node.isExpanded)("toggle-children-wrapper-collapsed",e.node.isCollapsed)}}function ao(e,t){1&e&&i.Nb(0,"span",5)}function co(e,t){if(1&e&&(i.Qb(0),i.Mc(1,oo,2,4,"span",1),i.Mc(2,ao,1,0,"span",2),i.Pb()),2&e){const e=i.ic();i.yb(1),i.pc("ngIf",e.node.hasChildren),i.yb(1),i.pc("ngIf",!e.node.hasChildren)}}function lo(e,t){if(1&e&&i.Nb(0,"tree-node-collection",4),2&e){const e=i.ic(3);i.pc("nodes",e.node.children)("templates",e.templates)("treeModel",e.node.treeModel)}}function uo(e,t){if(1&e&&i.Nb(0,"tree-loading-component",5),2&e){const e=i.ic(3);i.Kc("padding-left",e.node.getNodePadding()),i.pc("template",e.templates.loadingTemplate)("node",e.node)}}function ho(e,t){if(1&e&&(i.Sb(0,"div"),i.Mc(1,lo,1,3,"tree-node-collection",2),i.Mc(2,uo,1,4,"tree-loading-component",3),i.Rb()),2&e){const e=i.ic(2);i.Eb("tree-children",!0)("tree-children-no-padding",e.node.options.levelPadding),i.yb(1),i.pc("ngIf",e.node.children),i.yb(1),i.pc("ngIf",!e.node.children)}}function fo(e,t){if(1&e&&(i.Qb(0),i.Mc(1,ho,3,6,"div",1),i.Pb()),2&e){const e=i.ic();i.yb(1),i.pc("treeAnimateOpen",e.node.isExpanded)("treeAnimateOpenSpeed",e.node.options.animateSpeed)("treeAnimateOpenAcceleration",e.node.options.animateAcceleration)("treeAnimateOpenEnabled",e.node.options.animateExpand)}}function po(e,t){if(1&e&&i.Nb(0,"tree-node",2),2&e){const e=t.$implicit,n=t.index,r=i.ic(2);i.pc("node",e)("index",n)("templates",r.templates)}}function mo(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"div"),i.Mc(2,po,1,3,"tree-node",1),i.Rb(),i.Pb()),2&e){const e=i.ic();i.yb(1),i.Kc("margin-top",e.marginTop),i.yb(1),i.pc("ngForOf",e.viewportNodes)("ngForTrackBy",e.trackNode)}}function bo(e,t){if(1&e&&i.Nb(0,"tree-node-checkbox",4),2&e){const e=i.ic(2);i.pc("node",e.node)}}function go(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",2),i.Mc(1,bo,1,1,"tree-node-checkbox",3),i.Nb(2,"tree-node-expander",4),i.Sb(3,"div",5),i.gc("click",(function(t){return i.Dc(e),i.ic().node.mouseAction("click",t)}))("dblclick",(function(t){return i.Dc(e),i.ic().node.mouseAction("dblClick",t)}))("mouseover",(function(t){return i.Dc(e),i.ic().node.mouseAction("mouseOver",t)}))("mouseout",(function(t){return i.Dc(e),i.ic().node.mouseAction("mouseOut",t)}))("contextmenu",(function(t){return i.Dc(e),i.ic().node.mouseAction("contextMenu",t)}))("treeDrop",(function(t){return i.Dc(e),i.ic().node.onDrop(t)}))("treeDropDragOver",(function(t){return i.Dc(e),i.ic().node.mouseAction("dragOver",t)}))("treeDropDragLeave",(function(t){return i.Dc(e),i.ic().node.mouseAction("dragLeave",t)}))("treeDropDragEnter",(function(t){return i.Dc(e),i.ic().node.mouseAction("dragEnter",t)})),i.Nb(4,"tree-node-content",6),i.Rb(),i.Rb()}if(2&e){const e=i.ic();i.Kc("padding-left",e.node.getNodePadding()),i.yb(1),i.pc("ngIf",e.node.options.useCheckbox),i.yb(1),i.pc("node",e.node),i.yb(1),i.Eb("node-content-wrapper-active",e.node.isActive)("node-content-wrapper-focused",e.node.isFocused),i.pc("treeAllowDrop",e.node.allowDrop)("allowDragoverStyling",e.node.allowDragoverStyling())("treeDrag",e.node)("treeDragEnabled",e.node.allowDrag()),i.yb(1),i.pc("node",e.node)("index",e.index)("template",e.templates.treeNodeTemplate)}}function _o(e,t){if(1&e){const e=i.Tb();i.Qb(0),i.Sb(1,"input",1),i.gc("click",(function(t){return i.Dc(e),i.ic().node.mouseAction("checkboxClick",t)})),i.Rb(),i.Pb()}if(2&e){const e=i.ic();i.yb(1),i.pc("checked",e.node.isSelected)("indeterminate",e.node.isPartiallySelected)}}let yo=(()=>{class e{constructor(e,t){this.templateRef=e,this.viewContainer=t,this.templateBindings={}}ngOnInit(){this.view=this.viewContainer.createEmbeddedView(this.templateRef),this.dispose&&this.dispose(),this.shouldDetach()&&this.view.detach(),this.autoDetect(this.view)}shouldDetach(){return this.treeMobxAutorun&&this.treeMobxAutorun.detach}autoDetect(e){this.dispose=Ze(()=>e.detectChanges())}ngOnDestroy(){this.dispose&&this.dispose()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.L),i.Mb(i.P))},e.\u0275dir=i.Hb({type:e,selectors:[["","treeMobxAutorun",""]],inputs:{treeMobxAutorun:"treeMobxAutorun"}}),e})();const vo={TOGGLE_ACTIVE:(e,t,n)=>t&&t.toggleActivated(),TOGGLE_ACTIVE_MULTI:(e,t,n)=>t&&t.toggleActivated(!0),TOGGLE_SELECTED:(e,t,n)=>t&&t.toggleSelected(),ACTIVATE:(e,t,n)=>t.setIsActive(!0),DEACTIVATE:(e,t,n)=>t.setIsActive(!1),SELECT:(e,t,n)=>t.setIsSelected(!0),DESELECT:(e,t,n)=>t.setIsSelected(!1),FOCUS:(e,t,n)=>t.focus(),TOGGLE_EXPANDED:(e,t,n)=>t.hasChildren&&t.toggleExpanded(),EXPAND:(e,t,n)=>t.expand(),COLLAPSE:(e,t,n)=>t.collapse(),DRILL_DOWN:(e,t,n)=>e.focusDrillDown(),DRILL_UP:(e,t,n)=>e.focusDrillUp(),NEXT_NODE:(e,t,n)=>e.focusNextNode(),PREVIOUS_NODE:(e,t,n)=>e.focusPreviousNode(),MOVE_NODE:(e,t,n,{from:i,to:r})=>{n.ctrlKey?e.copyNode(i,r):e.moveNode(i,r)}},wo={mouse:{click:vo.TOGGLE_ACTIVE,dblClick:null,contextMenu:null,expanderClick:vo.TOGGLE_EXPANDED,checkboxClick:vo.TOGGLE_SELECTED,drop:vo.MOVE_NODE},keys:{39:vo.DRILL_DOWN,37:vo.DRILL_UP,40:vo.NEXT_NODE,38:vo.PREVIOUS_NODE,32:vo.TOGGLE_ACTIVE,13:vo.TOGGLE_ACTIVE}};class So{constructor(e={}){this.options=e,this.actionMapping=Fi({},this.options.actionMapping,wo),e.rtl&&(this.actionMapping.keys[39]=tr(e,["actionMapping","keys",39])||vo.DRILL_UP,this.actionMapping.keys[37]=tr(e,["actionMapping","keys",37])||vo.DRILL_DOWN)}get hasChildrenField(){return this.options.hasChildrenField||"hasChildren"}get childrenField(){return this.options.childrenField||"children"}get displayField(){return this.options.displayField||"name"}get idField(){return this.options.idField||"id"}get isExpandedField(){return this.options.isExpandedField||"isExpanded"}get getChildren(){return this.options.getChildren}get levelPadding(){return this.options.levelPadding||0}get useVirtualScroll(){return this.options.useVirtualScroll}get animateExpand(){return this.options.animateExpand}get animateSpeed(){return this.options.animateSpeed||1}get animateAcceleration(){return this.options.animateAcceleration||1.2}get scrollOnActivate(){return void 0===this.options.scrollOnActivate||this.options.scrollOnActivate}get rtl(){return!!this.options.rtl}get rootId(){return this.options.rootId}get useCheckbox(){return this.options.useCheckbox}get useTriState(){return void 0===this.options.useTriState||this.options.useTriState}get scrollContainer(){return this.options.scrollContainer}get allowDragoverStyling(){return void 0===this.options.allowDragoverStyling||this.options.allowDragoverStyling}getNodeClone(e){return this.options.getNodeClone?this.options.getNodeClone(e):Jr(Object.assign({},e.data),["id"])}allowDrop(e,t,n){return this.options.allowDrop instanceof Function?this.options.allowDrop(e,t,n):void 0===this.options.allowDrop||this.options.allowDrop}allowDrag(e){return this.options.allowDrag instanceof Function?this.options.allowDrag(e):this.options.allowDrag}nodeClass(e){return this.options.nodeClass?this.options.nodeClass(e):""}nodeHeight(e){if(e.data.virtual)return 0;let t=this.options.nodeHeight||22;return"function"==typeof t&&(t=t(e)),t+(0===e.index?2:1)*this.dropSlotHeight}get dropSlotHeight(){return"number"==typeof(e=this.options.dropSlotHeight)||ri(e)&&"[object Number]"==fn(e)?this.options.dropSlotHeight:2;var e}}const Mo={toggleExpanded:"toggleExpanded",activate:"activate",deactivate:"deactivate",nodeActivate:"nodeActivate",nodeDeactivate:"nodeDeactivate",select:"select",deselect:"deselect",focus:"focus",blur:"blur",initialized:"initialized",updateData:"updateData",moveNode:"moveNode",copyNode:"copyNode",event:"event",loadNodeChildren:"loadNodeChildren",changeFilter:"changeFilter",stateChange:"stateChange"};var ko=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},xo=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};let Do=(()=>{class e{constructor(e,t,n,i){this.data=e,this.parent=t,this.treeModel=n,this.position=0,this.allowDrop=(e,t)=>this.options.allowDrop(e,{parent:this,index:0},t),this.allowDragoverStyling=()=>this.options.allowDragoverStyling,null==this.id&&(this.id=Math.floor(1e13*Math.random())),this.index=i,this.getField("children")&&this._initChildren(),this.autoLoadChildren()}get isHidden(){return this.treeModel.isHidden(this)}get isExpanded(){return this.treeModel.isExpanded(this)}get isActive(){return this.treeModel.isActive(this)}get isFocused(){return this.treeModel.isNodeFocused(this)}get isSelected(){return this.isSelectable()?this.treeModel.isSelected(this):(t=e=>e.isSelected,(ui(e=this.children)?Qr:gs)(e,ms(t)));var e,t}get isAllSelected(){return this.isSelectable()?this.treeModel.isSelected(this):(t=e=>e.isAllSelected,(ui(e=this.children)?_s:ys)(e,ms(t)));var e,t}get isPartiallySelected(){return this.isSelected&&!this.isAllSelected}get level(){return this.parent?this.parent.level+1:0}get path(){return this.parent?[...this.parent.path,this.id]:[]}get elementRef(){throw"Element Ref is no longer supported since introducing virtual scroll\n\n You may use a template to obtain a reference to the element"}get originalNode(){return this._originalNode}get hasChildren(){return!!(this.getField("hasChildren")||this.children&&this.children.length>0)}get isCollapsed(){return!this.isExpanded}get isLeaf(){return!this.hasChildren}get isRoot(){return this.parent.data.virtual}get realParent(){return this.isRoot?null:this.parent}get options(){return this.treeModel.options}fireEvent(e){this.treeModel.fireEvent(e)}get displayField(){return this.getField("display")}get id(){return this.getField("id")}set id(e){this.setField("id",e)}getField(e){return this.data[this.options[e+"Field"]]}setField(e,t){this.data[this.options[e+"Field"]]=t}_findAdjacentSibling(e,t=!1){const n=this._getParentsChildren(t),i=n.indexOf(this);return n.length>i+e?n[i+e]:null}findNextSibling(e=!1){return this._findAdjacentSibling(1,e)}findPreviousSibling(e=!1){return this._findAdjacentSibling(-1,e)}getVisibleChildren(){return this.visibleChildren}get visibleChildren(){return(this.children||[]).filter(e=>!e.isHidden)}getFirstChild(e=!1){return vs((e?this.visibleChildren:this.children)||[])}getLastChild(e=!1){return Hr((e?this.visibleChildren:this.children)||[])}findNextNode(e=!0,t=!1){return e&&this.isExpanded&&this.getFirstChild(t)||this.findNextSibling(t)||this.parent&&this.parent.findNextNode(!1,t)}findPreviousNode(e=!1){let t=this.findPreviousSibling(e);return t?t._getLastOpenDescendant(e):this.realParent}_getLastOpenDescendant(e=!1){const t=this.getLastChild(e);return this.isCollapsed||!t?this:t._getLastOpenDescendant(e)}_getParentsChildren(e=!1){return this.parent&&(e?this.parent.getVisibleChildren():this.parent.children)||[]}getIndexInParent(e=!1){return this._getParentsChildren(e).indexOf(this)}isDescendantOf(e){return this===e||this.parent&&this.parent.isDescendantOf(e)}getNodePadding(){return this.options.levelPadding*(this.level-1)+"px"}getClass(){return[this.options.nodeClass(this),"tree-node-level-"+this.level].join(" ")}onDrop(e){this.mouseAction("drop",e.event,{from:e.element,to:{parent:this,index:0,dropOnNode:!0}})}allowDrag(){return this.options.allowDrag(this)}loadNodeChildren(){return this.options.getChildren?Promise.resolve(this.options.getChildren(this)).then(e=>{e&&(this.setField("children",e),this._initChildren(),this.options.useTriState&&this.treeModel.isSelected(this)&&this.setIsSelected(!0),this.children.forEach(e=>{e.getField("isExpanded")&&e.hasChildren&&e.expand()}))}).then(()=>{this.fireEvent({eventName:Mo.loadNodeChildren,node:this})}):Promise.resolve()}expand(){return this.isExpanded||this.toggleExpanded(),this}collapse(){return this.isExpanded&&this.toggleExpanded(),this}doForAll(e){Promise.resolve(e(this)).then(()=>{this.children&&this.children.forEach(t=>t.doForAll(e))})}expandAll(){this.doForAll(e=>e.expand())}collapseAll(){this.doForAll(e=>e.collapse())}ensureVisible(){return this.realParent&&(this.realParent.expand(),this.realParent.ensureVisible()),this}toggleExpanded(){return this.setIsExpanded(!this.isExpanded),this}setIsExpanded(e){return this.hasChildren&&this.treeModel.setExpandedNode(this,e),this}autoLoadChildren(){this.handler=tt(()=>this.isExpanded,e=>{!this.children&&this.hasChildren&&e&&this.loadNodeChildren()},{fireImmediately:!0})}dispose(){this.children&&this.children.forEach(e=>e.dispose()),this.handler&&this.handler(),this.parent=null,this.children=null}setIsActive(e,t=!1){return this.treeModel.setActiveNode(this,e,t),e&&this.focus(this.options.scrollOnActivate),this}isSelectable(){return this.isLeaf||!this.children||!this.options.useTriState}setIsSelected(e){return this.isSelectable()?this.treeModel.setSelectedNode(this,e):this.visibleChildren.forEach(t=>t.setIsSelected(e)),this}toggleSelected(){return this.setIsSelected(!this.isSelected),this}toggleActivated(e=!1){return this.setIsActive(!this.isActive,e),this}setActiveAndVisible(e=!1){return this.setIsActive(!0,e).ensureVisible(),setTimeout(this.scrollIntoView.bind(this)),this}scrollIntoView(e=!1){this.treeModel.virtualScroll.scrollIntoView(this,e)}focus(e=!0){let t=this.treeModel.getFocusedNode();return this.treeModel.setFocusedNode(this),e&&this.scrollIntoView(),t&&this.fireEvent({eventName:Mo.blur,node:t}),this.fireEvent({eventName:Mo.focus,node:this}),this}blur(){let e=this.treeModel.getFocusedNode();return this.treeModel.setFocusedNode(null),e&&this.fireEvent({eventName:Mo.blur,node:this}),this}setIsHidden(e){this.treeModel.setIsHidden(this,e)}hide(){this.setIsHidden(!0)}show(){this.setIsHidden(!1)}mouseAction(e,t,n=null){this.treeModel.setFocus(!0);const i=this.options.actionMapping.mouse[e];i&&i(this.treeModel,this,t,n)}getSelfHeight(){return this.options.nodeHeight(this)}_initChildren(){this.children=this.getField("children").map((t,n)=>new e(t,this,this.treeModel,n))}}return ko([se,xo("design:type",Object),xo("design:paramtypes",[])],e.prototype,"isHidden",null),ko([se,xo("design:type",Object),xo("design:paramtypes",[])],e.prototype,"isExpanded",null),ko([se,xo("design:type",Object),xo("design:paramtypes",[])],e.prototype,"isActive",null),ko([se,xo("design:type",Object),xo("design:paramtypes",[])],e.prototype,"isFocused",null),ko([se,xo("design:type",Object),xo("design:paramtypes",[])],e.prototype,"isSelected",null),ko([se,xo("design:type",Object),xo("design:paramtypes",[])],e.prototype,"isAllSelected",null),ko([se,xo("design:type",Object),xo("design:paramtypes",[])],e.prototype,"isPartiallySelected",null),ko([te,xo("design:type",Array)],e.prototype,"children",void 0),ko([te,xo("design:type",Number)],e.prototype,"index",void 0),ko([te,xo("design:type",Object)],e.prototype,"position",void 0),ko([te,xo("design:type",Number)],e.prototype,"height",void 0),ko([se,xo("design:type",Number),xo("design:paramtypes",[])],e.prototype,"level",null),ko([se,xo("design:type",Array),xo("design:paramtypes",[])],e.prototype,"path",null),ko([se,xo("design:type",Object),xo("design:paramtypes",[])],e.prototype,"visibleChildren",null),ko([Qe,xo("design:type",Function),xo("design:paramtypes",[Object]),xo("design:returntype",void 0)],e.prototype,"setIsSelected",null),ko([Qe,xo("design:type",Function),xo("design:paramtypes",[]),xo("design:returntype",void 0)],e.prototype,"_initChildren",null),e})();var To=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},Co=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};let Oo=(()=>{class e{constructor(){this.options=new So,this.eventNames=Object.keys(Mo),this.expandedNodeIds={},this.selectedLeafNodeIds={},this.activeNodeIds={},this.hiddenNodeIds={},this.focusedNodeId=null,this.firstUpdate=!0,this.subscriptions=[]}fireEvent(e){e.treeModel=this,this.events[e.eventName].emit(e),this.events.event.emit(e)}subscribe(e,t){const n=this.events[e].subscribe(t);this.subscriptions.push(n)}getFocusedNode(){return this.focusedNode}getActiveNode(){return this.activeNodes[0]}getActiveNodes(){return this.activeNodes}getVisibleRoots(){return this.virtualRoot.visibleChildren}getFirstRoot(e=!1){return vs(e?this.getVisibleRoots():this.roots)}getLastRoot(e=!1){return Hr(e?this.getVisibleRoots():this.roots)}get isFocused(){return e.focusedTree===this}isNodeFocused(e){return this.focusedNode===e}isEmptyTree(){return this.roots&&0===this.roots.length}get focusedNode(){return this.focusedNodeId?this.getNodeById(this.focusedNodeId):null}get expandedNodes(){const e=Object.keys(this.expandedNodeIds).filter(e=>this.expandedNodeIds[e]).map(e=>this.getNodeById(e));return ws(e)}get activeNodes(){const e=Object.keys(this.activeNodeIds).filter(e=>this.activeNodeIds[e]).map(e=>this.getNodeById(e));return ws(e)}get hiddenNodes(){const e=Object.keys(this.hiddenNodeIds).filter(e=>this.hiddenNodeIds[e]).map(e=>this.getNodeById(e));return ws(e)}get selectedLeafNodes(){const e=Object.keys(this.selectedLeafNodeIds).filter(e=>this.selectedLeafNodeIds[e]).map(e=>this.getNodeById(e));return ws(e)}getNodeByPath(e,t=null){if(!e)return null;if(t=t||this.virtualRoot,0===e.length)return t;if(!t.children)return null;const n=e.shift(),i=Rs(t.children,{id:n});return i?this.getNodeByPath(e,i):null}getNodeById(e){const t=e.toString();return this.getNodeBy(e=>e.id.toString()===t)}getNodeBy(e,t=null){if(!(t=t||this.virtualRoot).children)return null;const n=Rs(t.children,e);if(n)return n;for(let i of t.children){const t=this.getNodeBy(e,i);if(t)return t}}isExpanded(e){return this.expandedNodeIds[e.id]}isHidden(e){return this.hiddenNodeIds[e.id]}isActive(e){return this.activeNodeIds[e.id]}isSelected(e){return this.selectedLeafNodeIds[e.id]}ngOnDestroy(){this.dispose(),this.unsubscribeAll()}dispose(){this.virtualRoot&&this.virtualRoot.dispose()}unsubscribeAll(){this.subscriptions.forEach(e=>e.unsubscribe()),this.subscriptions=[]}setData({nodes:e,options:t=null,events:n=null}){t&&(this.options=new So(t)),n&&(this.events=n),e&&(this.nodes=e),this.update()}update(){let e={id:this.options.rootId,virtual:!0,[this.options.childrenField]:this.nodes};this.dispose(),this.virtualRoot=new Do(e,null,this,0),this.roots=this.virtualRoot.children,this.firstUpdate?this.roots&&(this.firstUpdate=!1,this._calculateExpandedNodes()):this.fireEvent({eventName:Mo.updateData})}setFocusedNode(e){this.focusedNodeId=e?e.id:null}setFocus(t){e.focusedTree=t?this:null}doForAll(e){this.roots.forEach(t=>t.doForAll(e))}focusNextNode(){let e=this.getFocusedNode(),t=e?e.findNextNode(!0,!0):this.getFirstRoot(!0);t&&t.focus()}focusPreviousNode(){let e=this.getFocusedNode(),t=e?e.findPreviousNode(!0):this.getLastRoot(!0);t&&t.focus()}focusDrillDown(){let e=this.getFocusedNode();if(e&&e.isCollapsed&&e.hasChildren)e.toggleExpanded();else{let t=e?e.getFirstChild(!0):this.getFirstRoot(!0);t&&t.focus()}}focusDrillUp(){let e=this.getFocusedNode();if(e)if(e.isExpanded)e.toggleExpanded();else{let t=e.realParent;t&&t.focus()}}setActiveNode(e,t,n=!1){n?this._setActiveNodeMulti(e,t):this._setActiveNodeSingle(e,t),t?(e.focus(this.options.scrollOnActivate),this.fireEvent({eventName:Mo.activate,node:e}),this.fireEvent({eventName:Mo.nodeActivate,node:e})):(this.fireEvent({eventName:Mo.deactivate,node:e}),this.fireEvent({eventName:Mo.nodeDeactivate,node:e}))}setSelectedNode(e,t){this.selectedLeafNodeIds=Object.assign({},this.selectedLeafNodeIds,{[e.id]:t}),t?(e.focus(),this.fireEvent({eventName:Mo.select,node:e})):this.fireEvent({eventName:Mo.deselect,node:e})}setExpandedNode(e,t){this.expandedNodeIds=Object.assign({},this.expandedNodeIds,{[e.id]:t}),this.fireEvent({eventName:Mo.toggleExpanded,node:e,isExpanded:t})}expandAll(){this.roots.forEach(e=>e.expandAll())}collapseAll(){this.roots.forEach(e=>e.collapseAll())}setIsHidden(e,t){this.hiddenNodeIds=Object.assign({},this.hiddenNodeIds,{[e.id]:t})}setHiddenNodeIds(e){this.hiddenNodeIds=e.reduce((e,t)=>Object.assign(e,{[t]:!0}),{})}performKeyAction(e,t){const n=this.options.actionMapping.keys[t.keyCode];return!!n&&(t.preventDefault(),n(this,e,t),!0)}filterNodes(e,t=!0){let n;if(!e)return this.clearFilter();if(Es(e))n=t=>-1!==t.displayField.toLowerCase().indexOf(e.toLowerCase());else{if(!mn(e))return console.error("Don't know what to do with filter",e),void console.error("Should be either a string or function");n=e}const i={};this.roots.forEach(e=>this._filterNode(i,e,n,t)),this.hiddenNodeIds=i,this.fireEvent({eventName:Mo.changeFilter})}clearFilter(){this.hiddenNodeIds={},this.fireEvent({eventName:Mo.changeFilter})}moveNode(e,t){const n=e.getIndexInParent(),i=e.parent;if(!this.canMoveNode(e,t,n))return;const r=i.getField("children");t.parent.getField("children")||t.parent.setField("children",[]);const s=t.parent.getField("children"),o=r.splice(n,1)[0];let a=i===t.parent&&t.index>n?t.index-1:t.index;s.splice(a,0,o),i.treeModel.update(),t.parent.treeModel!==i.treeModel&&t.parent.treeModel.update(),this.fireEvent({eventName:Mo.moveNode,node:o,to:{parent:t.parent.data,index:a},from:{parent:i.data,index:n}})}copyNode(e,t){const n=e.getIndexInParent();if(!this.canMoveNode(e,t,n))return;t.parent.getField("children")||t.parent.setField("children",[]);const i=t.parent.getField("children"),r=this.options.getNodeClone(e);i.splice(t.index,0,r),e.treeModel.update(),t.parent.treeModel!==e.treeModel&&t.parent.treeModel.update(),this.fireEvent({eventName:Mo.copyNode,node:r,to:{parent:t.parent.data,index:t.index}})}getState(){return{expandedNodeIds:this.expandedNodeIds,selectedLeafNodeIds:this.selectedLeafNodeIds,activeNodeIds:this.activeNodeIds,hiddenNodeIds:this.hiddenNodeIds,focusedNodeId:this.focusedNodeId}}setState(e){e&&Object.assign(this,{expandedNodeIds:e.expandedNodeIds||{},selectedLeafNodeIds:e.selectedLeafNodeIds||{},activeNodeIds:e.activeNodeIds||{},hiddenNodeIds:e.hiddenNodeIds||{},focusedNodeId:e.focusedNodeId})}subscribeToState(e){Ze(()=>e(this.getState()))}canMoveNode(e,t,n){return n||e.getIndexInParent(),(e.parent!==t.parent||n!==t.index)&&!t.parent.isDescendantOf(e)}calculateExpandedNodes(){this._calculateExpandedNodes()}_filterNode(e,t,n,i){let r=n(t);return t.children&&t.children.forEach(t=>{this._filterNode(e,t,n,i)&&(r=!0)}),r||(e[t.id]=!0),i&&r&&t.ensureVisible(),r}_calculateExpandedNodes(e=null){(e=e||this.virtualRoot).data[this.options.isExpandedField]&&(this.expandedNodeIds=Object.assign({},this.expandedNodeIds,{[e.id]:!0})),e.children&&e.children.forEach(e=>this._calculateExpandedNodes(e))}_setActiveNodeSingle(e,t){this.activeNodes.filter(t=>t!==e).forEach(e=>{this.fireEvent({eventName:Mo.deactivate,node:e}),this.fireEvent({eventName:Mo.nodeDeactivate,node:e})}),this.activeNodeIds=t?{[e.id]:!0}:{}}_setActiveNodeMulti(e,t){this.activeNodeIds=Object.assign({},this.activeNodeIds,{[e.id]:t})}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e.focusedTree=null,To([te,Co("design:type",Array)],e.prototype,"roots",void 0),To([te,Co("design:type",Object)],e.prototype,"expandedNodeIds",void 0),To([te,Co("design:type",Object)],e.prototype,"selectedLeafNodeIds",void 0),To([te,Co("design:type",Object)],e.prototype,"activeNodeIds",void 0),To([te,Co("design:type",Object)],e.prototype,"hiddenNodeIds",void 0),To([te,Co("design:type",Object)],e.prototype,"focusedNodeId",void 0),To([te,Co("design:type",Do)],e.prototype,"virtualRoot",void 0),To([se,Co("design:type",Object),Co("design:paramtypes",[])],e.prototype,"focusedNode",null),To([se,Co("design:type",Object),Co("design:paramtypes",[])],e.prototype,"expandedNodes",null),To([se,Co("design:type",Object),Co("design:paramtypes",[])],e.prototype,"activeNodes",null),To([se,Co("design:type",Object),Co("design:paramtypes",[])],e.prototype,"hiddenNodes",null),To([se,Co("design:type",Object),Co("design:paramtypes",[])],e.prototype,"selectedLeafNodes",null),To([Qe,Co("design:type",Function),Co("design:paramtypes",[Object]),Co("design:returntype",void 0)],e.prototype,"setData",null),To([Qe,Co("design:type",Function),Co("design:paramtypes",[]),Co("design:returntype",void 0)],e.prototype,"update",null),To([Qe,Co("design:type",Function),Co("design:paramtypes",[Object]),Co("design:returntype",void 0)],e.prototype,"setFocusedNode",null),To([Qe,Co("design:type",Function),Co("design:paramtypes",[Object]),Co("design:returntype",void 0)],e.prototype,"setFocus",null),To([Qe,Co("design:type",Function),Co("design:paramtypes",[Object]),Co("design:returntype",void 0)],e.prototype,"doForAll",null),To([Qe,Co("design:type",Function),Co("design:paramtypes",[]),Co("design:returntype",void 0)],e.prototype,"focusNextNode",null),To([Qe,Co("design:type",Function),Co("design:paramtypes",[]),Co("design:returntype",void 0)],e.prototype,"focusPreviousNode",null),To([Qe,Co("design:type",Function),Co("design:paramtypes",[]),Co("design:returntype",void 0)],e.prototype,"focusDrillDown",null),To([Qe,Co("design:type",Function),Co("design:paramtypes",[]),Co("design:returntype",void 0)],e.prototype,"focusDrillUp",null),To([Qe,Co("design:type",Function),Co("design:paramtypes",[Object,Object,Object]),Co("design:returntype",void 0)],e.prototype,"setActiveNode",null),To([Qe,Co("design:type",Function),Co("design:paramtypes",[Object,Object]),Co("design:returntype",void 0)],e.prototype,"setSelectedNode",null),To([Qe,Co("design:type",Function),Co("design:paramtypes",[Object,Object]),Co("design:returntype",void 0)],e.prototype,"setExpandedNode",null),To([Qe,Co("design:type",Function),Co("design:paramtypes",[]),Co("design:returntype",void 0)],e.prototype,"expandAll",null),To([Qe,Co("design:type",Function),Co("design:paramtypes",[]),Co("design:returntype",void 0)],e.prototype,"collapseAll",null),To([Qe,Co("design:type",Function),Co("design:paramtypes",[Object,Object]),Co("design:returntype",void 0)],e.prototype,"setIsHidden",null),To([Qe,Co("design:type",Function),Co("design:paramtypes",[Object]),Co("design:returntype",void 0)],e.prototype,"setHiddenNodeIds",null),To([Qe,Co("design:type",Function),Co("design:paramtypes",[Object,Object]),Co("design:returntype",void 0)],e.prototype,"filterNodes",null),To([Qe,Co("design:type",Function),Co("design:paramtypes",[]),Co("design:returntype",void 0)],e.prototype,"clearFilter",null),To([Qe,Co("design:type",Function),Co("design:paramtypes",[Object,Object]),Co("design:returntype",void 0)],e.prototype,"moveNode",null),To([Qe,Co("design:type",Function),Co("design:paramtypes",[Object,Object]),Co("design:returntype",void 0)],e.prototype,"copyNode",null),To([Qe,Co("design:type",Function),Co("design:paramtypes",[Object]),Co("design:returntype",void 0)],e.prototype,"setState",null),e})(),Lo=(()=>{class e{constructor(){this._draggedElement=null}set(e){this._draggedElement=e}get(){return this._draggedElement}isDragging(){return!!this.get()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(i.Ib)({factory:function(){return new e},token:e,providedIn:"root"}),e})();var Ro=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},Eo=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};const Ao=150;let Io=(()=>{class e{constructor(e){this.treeModel=e,this.yBlocks=0,this.x=0,this.viewportHeight=null,this.viewport=null,e.virtualScroll=this,this._dispose=[Ze(()=>this.fixScroll())]}get y(){return this.yBlocks*Ao}get totalHeight(){return this.treeModel.virtualRoot?this.treeModel.virtualRoot.height:0}fireEvent(e){this.treeModel.fireEvent(e)}init(){const e=this.recalcPositions.bind(this);e(),this._dispose=[...this._dispose,tt(()=>this.treeModel.roots,e),tt(()=>this.treeModel.expandedNodeIds,e),tt(()=>this.treeModel.hiddenNodeIds,e)],this.treeModel.subscribe(Mo.loadNodeChildren,e)}isEnabled(){return this.treeModel.options.useVirtualScroll}_setYBlocks(e){this.yBlocks=e}recalcPositions(){this.treeModel.virtualRoot.height=this._getPositionAfter(this.treeModel.getVisibleRoots(),0)}_getPositionAfter(e,t){let n=t;return e.forEach(e=>{e.position=n,n=this._getPositionAfterNode(e,n)}),n}_getPositionAfterNode(e,t){let n=e.getSelfHeight()+t;return e.children&&e.isExpanded&&(n=this._getPositionAfter(e.visibleChildren,n)),e.height=n-t,n}clear(){this._dispose.forEach(e=>e())}setViewport(e){Object.assign(this,{viewport:e,x:e.scrollLeft,yBlocks:Math.round(e.scrollTop/Ao),viewportHeight:e.getBoundingClientRect?e.getBoundingClientRect().height:0})}scrollIntoView(e,t,n=!0){if(e.options.scrollContainer){const i=e.options.scrollContainer,r=i.getBoundingClientRect().height,s=i.getBoundingClientRect().top,o=this.viewport.getBoundingClientRect().top+e.position-s;(t||o<i.scrollTop||o+e.getSelfHeight()>i.scrollTop+r)&&(i.scrollTop=n?o-r/2:o)}else(t||e.position<this.y||e.position+e.getSelfHeight()>this.y+this.viewportHeight)&&this.viewport&&(this.viewport.scrollTop=n?e.position-this.viewportHeight/2:e.position,this._setYBlocks(Math.floor(this.viewport.scrollTop/Ao)))}getViewportNodes(e){if(!e)return[];const t=e.filter(e=>!e.isHidden);if(!this.isEnabled())return t;if(!this.viewportHeight||!t.length)return[];const n=Po(t,e=>e.position+500>this.y||e.position+e.height>this.y),i=Po(t,e=>e.position-500>this.y+this.viewportHeight,n),r=[];if(i-n>(1e3+this.viewportHeight)/t[0].treeModel.options.options.nodeHeight)return[];for(let s=n;s<=i;s++)r.push(t[s]);return r}fixScroll(){const e=Math.max(0,this.totalHeight-this.viewportHeight);this.y<0&&this._setYBlocks(0),this.y>e&&this._setYBlocks(e/Ao)}}return e.\u0275fac=function(t){return new(t||e)(i.dc(Oo))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),Ro([te,Eo("design:type",Object)],e.prototype,"yBlocks",void 0),Ro([te,Eo("design:type",Object)],e.prototype,"x",void 0),Ro([te,Eo("design:type",Object)],e.prototype,"viewportHeight",void 0),Ro([se,Eo("design:type",Object),Eo("design:paramtypes",[])],e.prototype,"y",null),Ro([se,Eo("design:type",Object),Eo("design:paramtypes",[])],e.prototype,"totalHeight",null),Ro([Qe,Eo("design:type",Function),Eo("design:paramtypes",[Object]),Eo("design:returntype",void 0)],e.prototype,"_setYBlocks",null),Ro([Qe,Eo("design:type",Function),Eo("design:paramtypes",[]),Eo("design:returntype",void 0)],e.prototype,"recalcPositions",null),Ro([Qe,Eo("design:type",Function),Eo("design:paramtypes",[Object]),Eo("design:returntype",void 0)],e.prototype,"setViewport",null),Ro([Qe,Eo("design:type",Function),Eo("design:paramtypes",[Object,Object,Object]),Eo("design:returntype",void 0)],e.prototype,"scrollIntoView",null),e})();function Po(e,t,n=0){let i=n,r=e.length-1;for(;i!==r;){let n=Math.floor((i+r)/2);t(e[n])?r=n:i=i===n?r:n}return i}let No=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["tree-loading-component"]],inputs:{template:"template",node:"node"},decls:2,vars:5,consts:[[4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,t){1&e&&(i.Mc(0,$s,2,0,"span",0),i.Ob(1,1)),2&e&&(i.pc("ngIf",!t.template),i.yb(1),i.pc("ngTemplateOutlet",t.template)("ngTemplateOutletContext",i.uc(3,Hs,t.node)))},directives:[r.r,r.w],encapsulation:2}),e})(),jo=(()=>{class e{constructor(e,t,n){this.elementRef=e,this.ngZone=t,this.virtualScroll=n,this.setViewport=function(e,t,n){var i=!0,r=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return pn(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),function(e,t,n){var i,r,s,o,a,c,l=0,u=!1,d=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function f(t){var n=i,s=r;return i=r=void 0,l=t,o=e.apply(s,n)}function p(e){return l=e,a=setTimeout(b,t),u?f(e):o}function m(e){var n=e-c;return void 0===c||n>=t||n<0||d&&e-l>=s}function b(){var e=As();if(m(e))return g(e);a=setTimeout(b,function(e){var n=t-(e-c);return d?Ps(n,s-(e-l)):n}(e))}function g(e){return a=void 0,h&&i?f(e):(i=r=void 0,o)}function _(){var e=As(),n=m(e);if(i=arguments,r=this,c=e,n){if(void 0===a)return p(c);if(d)return clearTimeout(a),a=setTimeout(b,t),f(c)}return void 0===a&&(a=setTimeout(b,t)),o}return t=Cs(t)||0,pn(n)&&(u=!!n.leading,s=(d="maxWait"in n)?Is(Cs(n.maxWait)||0,t):s,h="trailing"in n?!!n.trailing:h),_.cancel=function(){void 0!==a&&clearTimeout(a),l=0,i=c=r=a=void 0},_.flush=function(){return void 0===a?o:g(As())},_}(e,t,{leading:i,maxWait:t,trailing:r})}(()=>{this.virtualScroll.setViewport(this.elementRef.nativeElement)},17),this.scrollEventHandler=this.setViewport.bind(this)}ngOnInit(){this.virtualScroll.init()}ngAfterViewInit(){setTimeout(()=>{this.setViewport(),this.virtualScroll.fireEvent({eventName:Mo.initialized})});let e=this.elementRef.nativeElement;this.ngZone.runOutsideAngular(()=>{e.addEventListener("scroll",this.scrollEventHandler)})}ngOnDestroy(){this.virtualScroll.clear(),this.elementRef.nativeElement.removeEventListener("scroll",this.scrollEventHandler)}getTotalHeight(){return this.virtualScroll.isEnabled()&&this.virtualScroll.totalHeight+"px"||"auto"}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(i.A),i.Mb(Io))},e.\u0275cmp=i.Gb({type:e,selectors:[["tree-viewport"]],features:[i.xb([Io])],ngContentSelectors:Bs,decls:1,vars:2,consts:[[4,"treeMobxAutorun"]],template:function(e,t){1&e&&(i.oc(),i.Mc(0,Ws,3,2,"ng-container",0)),2&e&&i.pc("treeMobxAutorun",i.tc(1,Vs))},directives:[yo],encapsulation:2}),e})(),Fo=(()=>{class e{constructor(e,t){this.treeModel=e,this.treeDraggedElement=t,e.eventNames.forEach(e=>this[e]=new i.o),e.subscribeToState(e=>this.stateChange.emit(e))}set nodes(e){}set options(e){}set focused(e){this.treeModel.setFocus(e)}set state(e){this.treeModel.setState(e)}onKeydown(e){if(!this.treeModel.isFocused)return;if(Fs(["input","textarea"],document.activeElement.tagName.toLowerCase()))return;const t=this.treeModel.getFocusedNode();this.treeModel.performKeyAction(t,e)}onMousedown(e){(function e(t,n){return!t||t.localName!==n&&e(t.parentElement,n)})(e.target,"tree-root")&&this.treeModel.setFocus(!1)}ngOnChanges(e){(e.options||e.nodes)&&this.treeModel.setData({options:e.options&&e.options.currentValue,nodes:e.nodes&&e.nodes.currentValue,events:zs(this,this.treeModel.eventNames)})}sizeChanged(){this.viewportComponent.setViewport()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Oo),i.Mb(Lo))},e.\u0275cmp=i.Gb({type:e,selectors:[["Tree"],["tree-root"]],contentQueries:function(e,t,n){var r;1&e&&(i.Fb(n,Us,!0),i.Fb(n,Gs,!0),i.Fb(n,qs,!0),i.Fb(n,Js,!0)),2&e&&(i.zc(r=i.hc())&&(t.loadingTemplate=r.first),i.zc(r=i.hc())&&(t.treeNodeTemplate=r.first),i.zc(r=i.hc())&&(t.treeNodeWrapperTemplate=r.first),i.zc(r=i.hc())&&(t.treeNodeFullTemplate=r.first))},viewQuery:function(e,t){var n;1&e&&i.Tc(Qs,!0),2&e&&i.zc(n=i.hc())&&(t.viewportComponent=n.first)},hostBindings:function(e,t){1&e&&i.gc("keydown",(function(e){return t.onKeydown(e)}),!1,i.Bc)("mousedown",(function(e){return t.onMousedown(e)}),!1,i.Bc)},inputs:{nodes:"nodes",options:"options",focused:"focused",state:"state"},outputs:{toggleExpanded:"toggleExpanded",activate:"activate",deactivate:"deactivate",nodeActivate:"nodeActivate",nodeDeactivate:"nodeDeactivate",select:"select",deselect:"deselect",focus:"focus",blur:"blur",updateData:"updateData",initialized:"initialized",moveNode:"moveNode",copyNode:"copyNode",loadNodeChildren:"loadNodeChildren",changeFilter:"changeFilter",event:"event",stateChange:"stateChange"},features:[i.xb([Oo]),i.wb],decls:5,vars:6,consts:[["viewport",""],[1,"angular-tree-component"],[3,"nodes","treeModel","templates",4,"ngIf"],["class","empty-tree-drop-slot",3,"dropIndex","node",4,"ngIf"],[3,"nodes","treeModel","templates"],[1,"empty-tree-drop-slot",3,"dropIndex","node"]],template:function(e,t){1&e&&(i.Sb(0,"tree-viewport",null,0),i.Sb(2,"div",1),i.Mc(3,Zs,1,8,"tree-node-collection",2),i.Mc(4,Xs,1,2,"tree-node-drop-slot",3),i.Rb(),i.Rb()),2&e&&(i.yb(2),i.Eb("node-dragging",t.treeDraggedElement.isDragging())("angular-tree-component-rtl",t.treeModel.options.rtl),i.yb(1),i.pc("ngIf",t.treeModel.roots),i.yb(1),i.pc("ngIf",t.treeModel.isEmptyTree()))},directives:function(){return[jo,r.r,Zo,$o]},encapsulation:2}),e})(),Yo=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["TreeNode"],["tree-node"]],inputs:{node:"node",index:"index",templates:"templates"},decls:1,vars:2,consts:[[4,"treeMobxAutorun"],[3,"class","tree-node","tree-node-expanded","tree-node-collapsed","tree-node-leaf","tree-node-active","tree-node-focused",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"dropIndex","node",4,"ngIf"],[3,"node","index","templates"],[3,"node","templates"],[3,"dropIndex","node"]],template:function(e,t){1&e&&i.Mc(0,io,3,8,"ng-container",0),2&e&&i.pc("treeMobxAutorun",i.tc(1,Vs))},directives:function(){return[yo,r.r,r.w,Xo,Wo,$o]},encapsulation:2}),e})(),zo=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["tree-node-content"]],inputs:{node:"node",index:"index",template:"template"},decls:2,vars:7,consts:[[4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,t){1&e&&(i.Mc(0,ro,2,1,"span",0),i.Ob(1,1)),2&e&&(i.pc("ngIf",!t.template),i.yb(1),i.pc("ngTemplateOutlet",t.template)("ngTemplateOutletContext",i.wc(3,so,t.node,t.node,t.index)))},directives:[r.r,r.w],encapsulation:2}),e})(),$o=(()=>{class e{onDrop(e){this.node.mouseAction("drop",e.event,{from:e.element,to:{parent:this.node,index:this.dropIndex}})}allowDrop(e,t){return this.node.options.allowDrop(e,{parent:this.node,index:this.dropIndex},t)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["TreeNodeDropSlot"],["tree-node-drop-slot"]],inputs:{node:"node",dropIndex:"dropIndex"},decls:1,vars:2,consts:[[1,"node-drop-slot",3,"treeAllowDrop","allowDragoverStyling","treeDrop"]],template:function(e,t){1&e&&(i.Sb(0,"div",0),i.gc("treeDrop",(function(e){return t.onDrop(e)})),i.Rb()),2&e&&i.pc("treeAllowDrop",t.allowDrop.bind(t))("allowDragoverStyling",!0)},directives:function(){return[ia]},encapsulation:2}),e})(),Ho=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["tree-node-expander"]],inputs:{node:"node"},decls:1,vars:2,consts:[[4,"treeMobxAutorun"],["class","toggle-children-wrapper",3,"toggle-children-wrapper-expanded","toggle-children-wrapper-collapsed","click",4,"ngIf"],["class","toggle-children-placeholder",4,"ngIf"],[1,"toggle-children-wrapper",3,"click"],[1,"toggle-children"],[1,"toggle-children-placeholder"]],template:function(e,t){1&e&&i.Mc(0,co,3,2,"ng-container",0),2&e&&i.pc("treeMobxAutorun",i.tc(1,Vs))},directives:[yo,r.r],encapsulation:2}),e})(),Wo=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["tree-node-children"]],inputs:{node:"node",templates:"templates"},decls:1,vars:2,consts:[[4,"treeMobxAutorun"],[3,"tree-children","tree-children-no-padding",4,"treeAnimateOpen","treeAnimateOpenSpeed","treeAnimateOpenAcceleration","treeAnimateOpenEnabled"],[3,"nodes","templates","treeModel",4,"ngIf"],["class","tree-node-loading",3,"padding-left","template","node",4,"ngIf"],[3,"nodes","templates","treeModel"],[1,"tree-node-loading",3,"template","node"]],template:function(e,t){1&e&&i.Mc(0,fo,2,4,"ng-container",0),2&e&&i.pc("treeMobxAutorun",i.tc(1,Vs))},directives:function(){return[yo,sa,r.r,Zo,No]},encapsulation:2}),e})();function Vo(...e){return Qe(...e)}const Bo=Object.assign(Vo,Qe);function Uo(...e){return se(...e)}const Go=Object.assign(Uo,se);function qo(...e){return te(...e)}const Jo=Object.assign(qo,te);var Qo=function(e,t,n,i){var r,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,n,o):r(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},Ko=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};let Zo=(()=>{class e{constructor(){this._dispose=[]}get nodes(){return this._nodes}set nodes(e){this.setNodes(e)}get marginTop(){const e=this.viewportNodes&&this.viewportNodes.length&&this.viewportNodes[0];return(e&&e.parent?e.position-e.parent.position-e.parent.getSelfHeight():0)+"px"}setNodes(e){this._nodes=e}ngOnInit(){this.virtualScroll=this.treeModel.virtualScroll,this._dispose=[tt(()=>this.virtualScroll.getViewportNodes(this.nodes).map(e=>e.index),e=>{this.viewportNodes=e.map(e=>this.nodes[e])},{compareStructural:!0,fireImmediately:!0}),tt(()=>this.nodes,e=>{this.viewportNodes=this.virtualScroll.getViewportNodes(e)})]}ngOnDestroy(){this._dispose.forEach(e=>e())}trackNode(e,t){return t.id}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["tree-node-collection"]],inputs:{nodes:"nodes",treeModel:"treeModel",templates:"templates"},decls:1,vars:2,consts:[[4,"treeMobxAutorun"],[3,"node","index","templates",4,"ngFor","ngForOf","ngForTrackBy"],[3,"node","index","templates"]],template:function(e,t){1&e&&i.Mc(0,mo,3,4,"ng-container",0),2&e&&i.pc("treeMobxAutorun",i.tc(1,Vs))},directives:[yo,r.q,Yo],encapsulation:2}),Qo([Jo,Ko("design:type",Object)],e.prototype,"_nodes",void 0),Qo([Jo,Ko("design:type",Array)],e.prototype,"viewportNodes",void 0),Qo([Go,Ko("design:type",String),Ko("design:paramtypes",[])],e.prototype,"marginTop",null),Qo([Bo,Ko("design:type",Function),Ko("design:paramtypes",[Object]),Ko("design:returntype",void 0)],e.prototype,"setNodes",null),e})(),Xo=(()=>{class e{constructor(){}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["tree-node-wrapper"]],inputs:{node:"node",index:"index",templates:"templates"},decls:2,vars:8,consts:[["class","node-wrapper",3,"padding-left",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"node-wrapper"],[3,"node",4,"ngIf"],[3,"node"],[1,"node-content-wrapper",3,"treeAllowDrop","allowDragoverStyling","treeDrag","treeDragEnabled","click","dblclick","mouseover","mouseout","contextmenu","treeDrop","treeDropDragOver","treeDropDragLeave","treeDropDragEnter"],[3,"node","index","template"]],template:function(e,t){1&e&&(i.Mc(0,go,5,15,"div",0),i.Ob(1,1)),2&e&&(i.pc("ngIf",!t.templates.treeNodeWrapperTemplate),i.yb(1),i.pc("ngTemplateOutlet",t.templates.treeNodeWrapperTemplate)("ngTemplateOutletContext",i.xc(3,no,t.node,t.node,t.index,t.templates)))},directives:function(){return[r.r,r.w,Ho,ra,ia,zo,ea]},encapsulation:2}),e})(),ea=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["tree-node-checkbox"]],inputs:{node:"node"},decls:1,vars:2,consts:[[4,"treeMobxAutorun"],["type","checkbox",1,"tree-node-checkbox",3,"checked","indeterminate","click"]],template:function(e,t){1&e&&i.Mc(0,_o,2,2,"ng-container",0),2&e&&i.pc("treeMobxAutorun",i.tc(1,Vs))},directives:[yo],encapsulation:2}),e})();const ta="is-dragging-over",na="is-dragging-over-disabled";let ia=(()=>{class e{constructor(e,t,n,r){this.el=e,this.renderer=t,this.treeDraggedElement=n,this.ngZone=r,this.allowDragoverStyling=!0,this.onDropCallback=new i.o,this.onDragOverCallback=new i.o,this.onDragLeaveCallback=new i.o,this.onDragEnterCallback=new i.o,this._allowDrop=(e,t)=>!0,this.dragOverEventHandler=this.onDragOver.bind(this),this.dragEnterEventHandler=this.onDragEnter.bind(this),this.dragLeaveEventHandler=this.onDragLeave.bind(this)}set treeAllowDrop(e){this._allowDrop=e instanceof Function?e:(t,n)=>e}allowDrop(e){return this._allowDrop(this.treeDraggedElement.get(),e)}ngAfterViewInit(){let e=this.el.nativeElement;this.ngZone.runOutsideAngular(()=>{e.addEventListener("dragover",this.dragOverEventHandler),e.addEventListener("dragenter",this.dragEnterEventHandler),e.addEventListener("dragleave",this.dragLeaveEventHandler)})}ngOnDestroy(){let e=this.el.nativeElement;e.removeEventListener("dragover",this.dragOverEventHandler),e.removeEventListener("dragenter",this.dragEnterEventHandler),e.removeEventListener("dragleave",this.dragLeaveEventHandler)}onDragOver(e){if(!this.allowDrop(e))return this.allowDragoverStyling?this.addDisabledClass():void 0;this.onDragOverCallback.emit({event:e,element:this.treeDraggedElement.get()}),e.preventDefault(),this.allowDragoverStyling&&this.addClass()}onDragEnter(e){this.allowDrop(e)&&(e.preventDefault(),this.onDragEnterCallback.emit({event:e,element:this.treeDraggedElement.get()}))}onDragLeave(e){if(!this.allowDrop(e))return this.allowDragoverStyling?this.removeDisabledClass():void 0;this.onDragLeaveCallback.emit({event:e,element:this.treeDraggedElement.get()}),this.allowDragoverStyling&&this.removeClass()}onDrop(e){this.allowDrop(e)&&(e.preventDefault(),this.onDropCallback.emit({event:e,element:this.treeDraggedElement.get()}),this.allowDragoverStyling&&this.removeClass(),this.treeDraggedElement.set(null))}addClass(){this.renderer.addClass(this.el.nativeElement,ta)}removeClass(){this.renderer.removeClass(this.el.nativeElement,ta)}addDisabledClass(){this.renderer.addClass(this.el.nativeElement,na)}removeDisabledClass(){this.renderer.removeClass(this.el.nativeElement,na)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(i.E),i.Mb(Lo),i.Mb(i.A))},e.\u0275dir=i.Hb({type:e,selectors:[["","treeDrop",""]],hostBindings:function(e,t){1&e&&i.gc("drop",(function(e){return t.onDrop(e)}))},inputs:{allowDragoverStyling:"allowDragoverStyling",treeAllowDrop:"treeAllowDrop"},outputs:{onDropCallback:"treeDrop",onDragOverCallback:"treeDropDragOver",onDragLeaveCallback:"treeDropDragLeave",onDragEnterCallback:"treeDropDragEnter"}}),e})(),ra=(()=>{class e{constructor(e,t,n,i){this.el=e,this.renderer=t,this.treeDraggedElement=n,this.ngZone=i,this.dragEventHandler=this.onDrag.bind(this)}ngAfterViewInit(){let e=this.el.nativeElement;this.ngZone.runOutsideAngular(()=>{e.addEventListener("drag",this.dragEventHandler)})}ngDoCheck(){this.renderer.setAttribute(this.el.nativeElement,"draggable",this.treeDragEnabled?"true":"false")}ngOnDestroy(){this.el.nativeElement.removeEventListener("drag",this.dragEventHandler)}onDragStart(e){e.dataTransfer.setData("text",e.target.id),this.treeDraggedElement.set(this.draggedElement),this.draggedElement.mouseAction&&this.draggedElement.mouseAction("dragStart",e)}onDrag(e){this.draggedElement.mouseAction&&this.draggedElement.mouseAction("drag",e)}onDragEnd(){this.draggedElement.mouseAction&&this.draggedElement.mouseAction("dragEnd"),this.treeDraggedElement.set(null)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(i.E),i.Mb(Lo),i.Mb(i.A))},e.\u0275dir=i.Hb({type:e,selectors:[["","treeDrag",""]],hostBindings:function(e,t){1&e&&i.gc("dragstart",(function(e){return t.onDragStart(e)}))("dragend",(function(){return t.onDragEnd()}))},inputs:{draggedElement:["treeDrag","draggedElement"],treeDragEnabled:"treeDragEnabled"}}),e})(),sa=(()=>{class e{constructor(e,t,n){this.renderer=e,this.templateRef=t,this.viewContainerRef=n}set isOpen(e){e?(this._show(),this.isEnabled&&!1===this._isOpen&&this._animateOpen()):this.isEnabled?this._animateClose():this._hide(),this._isOpen=!!e}_show(){this.innerElement||(this.innerElement=this.viewContainerRef.createEmbeddedView(this.templateRef).rootNodes[0])}_hide(){this.viewContainerRef.clear(),this.innerElement=null}_animateOpen(){let e=this.animateSpeed,t=this.animateAcceleration,n=0;this.renderer.setStyle(this.innerElement,"max-height","0"),setTimeout(()=>{const i=setInterval(()=>{if(!this._isOpen||!this.innerElement)return clearInterval(i);n+=e;const r=Math.round(n);this.renderer.setStyle(this.innerElement,"max-height",r+"px");const s=this.innerElement.getBoundingClientRect?this.innerElement.getBoundingClientRect().height:0;e*=t,t*=1.005,s<r&&(this.renderer.setStyle(this.innerElement,"max-height",null),clearInterval(i))},17)})}_animateClose(){if(!this.innerElement)return;let e=this.animateSpeed,t=this.animateAcceleration,n=this.innerElement.getBoundingClientRect().height;const i=setInterval(()=>{if(this._isOpen||!this.innerElement)return clearInterval(i);n-=e,this.renderer.setStyle(this.innerElement,"max-height",n+"px"),e*=t,t*=1.005,n<=0&&(this.viewContainerRef.clear(),this.innerElement=null,clearInterval(i))},17)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.E),i.Mb(i.L),i.Mb(i.P))},e.\u0275dir=i.Hb({type:e,selectors:[["","treeAnimateOpen",""]],inputs:{isOpen:["treeAnimateOpen","isOpen"],animateSpeed:["treeAnimateOpenSpeed","animateSpeed"],animateAcceleration:["treeAnimateOpenAcceleration","animateAcceleration"],isEnabled:["treeAnimateOpenEnabled","isEnabled"]}}),e})(),oa=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},providers:[],imports:[[r.c]]}),e})()},oxzT:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var i=function(e){return e.add="fa fa-plus",e.addCircle="fa fa-plus-circle",e.minusCircle="fa fa-minus-circle",e.edit="fa fa-pencil",e.destroy="fa fa-times",e.destroyCircle="fa fa-times-circle",e.exchange="fa fa-exchange",e.copy="fa fa-copy",e.clipboard="fa fa-clipboard",e.flatten="fa fa-chain-broken",e.trash="fa fa-trash-o",e.lock="fa fa-lock",e.unlock="fa fa-unlock",e.clone="fa fa-clone",e.undo="fa fa-undo",e.search="fa fa-search",e.start="fa fa-play",e.stop="fa fa-stop",e.analyse="fa fa-stethoscope",e.deepCheck="fa fa-cog",e.reweight="fa fa-balance-scale",e.left="fa fa-arrow-left",e.right="fa fa-arrow-right",e.down="fa fa-arrow-down",e.erase="fa fa-eraser",e.user="fa fa-user",e.users="fa fa-users",e.share="fa fa-share-alt",e.key="fa fa-key-modern",e.warning="fa fa-exclamation-triangle",e.info="fa fa-info",e.infoCircle="fa fa-info-circle",e.questionCircle="fa fa-question-circle-o",e.check="fa fa-check",e.show="fa fa-eye",e.paragraph="fa fa-paragraph",e.terminal="fa fa-terminal",e.magic="fa fa-magic",e.hourglass="fa fa-hourglass-o",e.filledHourglass="fa fa-hourglass",e.table="fa fa-table",e.spinner="fa fa-spinner",e.refresh="fa fa-refresh",e.bullseye="fa fa-bullseye",e.disk="fa fa-hdd-o",e.server="fa fa-server",e.filter="fa fa-filter",e.lineChart="fa fa-line-chart",e.signOut="fa fa-sign-out",e.health="fa fa-heartbeat",e.circle="fa fa-circle",e.bell="fa fa-bell",e.tag="fa fa-tag",e.leftArrow="fa fa-angle-left",e.rightArrow="fa fa-angle-right",e.leftArrowDouble="fa fa-angle-double-left",e.rightArrowDouble="fa fa-angle-double-right",e.flag="fa fa-flag",e.clearFilters="fa fa-window-close",e.download="fa fa-download",e.upload="fa fa-upload",e.close="fa fa-times",e.json="fa fa-file-code-o",e.text="fa fa-file-text",e.wrench="fa fa-wrench",e.enter="fa fa-sign-in",e.exit="fa fa-sign-out",e.large="fa fa-lg",e.large2x="fa fa-2x",e.large3x="fa fa-3x",e.stack="fa fa-stack",e.stack1x="fa fa-stack-1x",e.stack2x="fa fa-stack-2x",e.pulse="fa fa-pulse",e.spin="fa fa-spin",e.inverse="fa fa-inverse",e}({})},"p/rL":function(e,t,n){!function(e){"use strict";e.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_M\u025bkalo_Zuw\u025bnkalo_Zuluyekalo_Utikalo_S\u025btanburukalo_\u0254kut\u0254burukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_M\u025b_Zuw_Zul_Uti_S\u025bt_\u0254ku_Now_Des".split("_"),weekdays:"Kari_Nt\u025bn\u025bn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Nt\u025b_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [l\u025br\u025b] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [l\u025br\u025b] HH:mm"},calendar:{sameDay:"[Bi l\u025br\u025b] LT",nextDay:"[Sini l\u025br\u025b] LT",nextWeek:"dddd [don l\u025br\u025b] LT",lastDay:"[Kunu l\u025br\u025b] LT",lastWeek:"dddd [t\u025bm\u025bnen l\u025br\u025b] LT",sameElse:"L"},relativeTime:{future:"%s k\u0254n\u0254",past:"a b\u025b %s b\u0254",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"l\u025br\u025b kelen",hh:"l\u025br\u025b %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}})}(n("wd/R"))},p4Cf:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var i=n("oxzT"),r=n("8Y7J"),s=n("SVse"),o=n("G0yt");function a(e,t){if(1&e&&(r.Nb(0,"div",2),r.nc(1)),2&e){const e=r.ic();r.Ab(e.class),r.pc("innerHtml",e.html,r.Ec)}}const c=function(e){return[e]},l=["*"];let u=(()=>{class e{constructor(){this.icons=i.a}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=r.Gb({type:e,selectors:[["cd-helper"]],inputs:{class:"class",html:"html"},ngContentSelectors:l,decls:3,vars:4,consts:[["popoverTpl",""],["aria-hidden","true",3,"ngClass","ngbPopover","click"],[3,"innerHtml"]],template:function(e,t){if(1&e&&(r.oc(),r.Mc(0,a,2,3,"ng-template",null,0,r.Nc),r.Sb(2,"i",1),r.gc("click",(function(e){return e.preventDefault()})),r.Rb()),2&e){const e=r.Ac(1);r.yb(2),r.pc("ngClass",r.uc(2,c,t.icons.questionCircle))("ngbPopover",e)}},directives:[s.p,o.w],styles:["i[_ngcontent-%COMP%]{color:#2b99a8;cursor:pointer;padding-left:4px}"]}),e})()},pLZG:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("7o/Q");function r(e,t){return function(n){return n.lift(new s(e,t))}}class s{constructor(e,t){this.predicate=e,this.thisArg=t}call(e,t){return t.subscribe(new o(e,this.predicate,this.thisArg))}}class o extends i.a{constructor(e,t,n){super(e),this.predicate=t,this.thisArg=n,this.count=0}_next(e){let t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(n){return void this.destination.error(n)}t&&this.destination.next(e)}}},pkCn:function(e,t,n){"use strict";var i=n("0Dky");e.exports=function(e,t){var n=[][e];return!!n&&i((function(){n.call(null,t||function(){throw 1},1)}))}},ppGB:function(e,t){var n=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},ppaS:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var i=n("8Y7J"),r=n("oxzT"),s=n("DNAf"),o=n("wnGv"),a=n("SVse");const c=["cdSelect"],l=function(e){return[e]};function u(e,t){if(1&e){const e=i.Tb();i.Sb(0,"span"),i.Sb(1,"span",4),i.Sb(2,"span",5),i.Oc(3),i.Rb(),i.Sb(4,"a",6),i.gc("click",(function(){i.Dc(e);const n=t.$implicit;return i.ic(),i.Ac(1).removeItem(n)})),i.Nb(5,"i",7),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=t.$implicit,n=i.ic();i.yb(3),i.Pc(e),i.yb(2),i.pc("ngClass",i.uc(2,l,n.icons.destroy))}}let d=(()=>{class e{constructor(){this.data=[],this.options=[],this.messages=new s.a({}),this.customBadges=!1,this.customBadgeValidators=[],this.selection=new i.o,this.icons=r.a}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-select-badges"]],viewQuery:function(e,t){var n;1&e&&i.Jc(c,!0),2&e&&i.zc(n=i.hc())&&(t.cdSelect=n.first)},inputs:{data:"data",options:"options",messages:"messages",selectionLimit:"selectionLimit",customBadges:"customBadges",customBadgeValidators:"customBadgeValidators"},outputs:{selection:"selection"},decls:4,vars:10,consts:[["elemClass","mr-2 select-menu-edit",3,"data","options","messages","selectionLimit","customBadges","customBadgeValidators","selection"],["cdSelect",""],[3,"ngClass"],[4,"ngFor","ngForOf"],[1,"badge","badge-dark","mr-2"],[1,"mr-2"],[1,"badge-remove",3,"click"],["aria-hidden","true",3,"ngClass"]],template:function(e,t){1&e&&(i.Sb(0,"cd-select",0,1),i.gc("selection",(function(e){return t.selection.emit(e)})),i.Nb(2,"i",2),i.Rb(),i.Mc(3,u,6,4,"span",3)),2&e&&(i.pc("data",t.data)("options",t.options)("messages",t.messages)("selectionLimit",t.selectionLimit)("customBadges",t.customBadges)("customBadgeValidators",t.customBadgeValidators),i.yb(2),i.pc("ngClass",i.uc(8,l,t.icons.edit)),i.yb(1),i.pc("ngForOf",t.data))},directives:[o.a,a.p,a.q],styles:[".badge-remove[_ngcontent-%COMP%]{color:#fff}i.fa-pencil[_ngcontent-%COMP%]{font-size:1.1rem}"]}),e})()},pxpQ:function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return a}));var i=n("7o/Q"),r=n("WMd4");function s(e,t=0){return function(n){return n.lift(new o(e,t))}}class o{constructor(e,t=0){this.scheduler=e,this.delay=t}call(e,t){return t.subscribe(new a(e,this.scheduler,this.delay))}}class a extends i.a{constructor(e,t,n=0){super(e),this.scheduler=t,this.delay=n}static dispatch(e){const{notification:t,destination:n}=e;t.observe(n),this.unsubscribe()}scheduleMessage(e){this.destination.add(this.scheduler.schedule(a.dispatch,this.delay,new c(e,this.destination)))}_next(e){this.scheduleMessage(r.a.createNext(e))}_error(e){this.scheduleMessage(r.a.createError(e)),this.unsubscribe()}_complete(){this.scheduleMessage(r.a.createComplete()),this.unsubscribe()}}class c{constructor(e,t){this.notification=e,this.destination=t}}},quSY:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n("DH7j"),r=n("XoHu"),s=n("n6bG");const o=(()=>{function e(e){return Error.call(this),this.message=e?`${e.length} errors occurred during unsubscription:\n${e.map((e,t)=>`${t+1}) ${e.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e})();let a=(()=>{class e{constructor(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}unsubscribe(){let t;if(this.closed)return;let{_parentOrParents:n,_ctorUnsubscribe:a,_unsubscribe:l,_subscriptions:u}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof e)n.remove(this);else if(null!==n)for(let e=0;e<n.length;++e)n[e].remove(this);if(Object(s.a)(l)){a&&(this._unsubscribe=void 0);try{l.call(this)}catch(d){t=d instanceof o?c(d.errors):[d]}}if(Object(i.a)(u)){let e=-1,n=u.length;for(;++e<n;){const n=u[e];if(Object(r.a)(n))try{n.unsubscribe()}catch(d){t=t||[],d instanceof o?t=t.concat(c(d.errors)):t.push(d)}}}if(t)throw new o(t)}add(t){let n=t;if(!t)return e.EMPTY;switch(typeof t){case"function":n=new e(t);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof e)){const t=n;n=new e,n._subscriptions=[t]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}let{_parentOrParents:i}=n;if(null===i)n._parentOrParents=this;else if(i instanceof e){if(i===this)return n;n._parentOrParents=[i,this]}else{if(-1!==i.indexOf(this))return n;i.push(this)}const r=this._subscriptions;return null===r?this._subscriptions=[n]:r.push(n),n}remove(e){const t=this._subscriptions;if(t){const n=t.indexOf(e);-1!==n&&t.splice(n,1)}}}var t;return e.EMPTY=((t=new e).closed=!0,t),e})();function c(e){return e.reduce((e,t)=>e.concat(t instanceof o?t.errors:t),[])}},qvJo:function(e,t,n){!function(e){"use strict";function t(e,t,n,i){var r={s:["\u0925\u094b\u0921\u092f\u093e \u0938\u0945\u0915\u0902\u0921\u093e\u0902\u0928\u0940","\u0925\u094b\u0921\u0947 \u0938\u0945\u0915\u0902\u0921"],ss:[e+" \u0938\u0945\u0915\u0902\u0921\u093e\u0902\u0928\u0940",e+" \u0938\u0945\u0915\u0902\u0921"],m:["\u090f\u0915\u093e \u092e\u093f\u0923\u091f\u093e\u0928","\u090f\u0915 \u092e\u093f\u0928\u0942\u091f"],mm:[e+" \u092e\u093f\u0923\u091f\u093e\u0902\u0928\u0940",e+" \u092e\u093f\u0923\u091f\u093e\u0902"],h:["\u090f\u0915\u093e \u0935\u0930\u093e\u0928","\u090f\u0915 \u0935\u0930"],hh:[e+" \u0935\u0930\u093e\u0902\u0928\u0940",e+" \u0935\u0930\u093e\u0902"],d:["\u090f\u0915\u093e \u0926\u093f\u0938\u093e\u0928","\u090f\u0915 \u0926\u0940\u0938"],dd:[e+" \u0926\u093f\u0938\u093e\u0902\u0928\u0940",e+" \u0926\u0940\u0938"],M:["\u090f\u0915\u093e \u092e\u094d\u0939\u092f\u0928\u094d\u092f\u093e\u0928","\u090f\u0915 \u092e\u094d\u0939\u092f\u0928\u094b"],MM:[e+" \u092e\u094d\u0939\u092f\u0928\u094d\u092f\u093e\u0928\u0940",e+" \u092e\u094d\u0939\u092f\u0928\u0947"],y:["\u090f\u0915\u093e \u0935\u0930\u094d\u0938\u093e\u0928","\u090f\u0915 \u0935\u0930\u094d\u0938"],yy:[e+" \u0935\u0930\u094d\u0938\u093e\u0902\u0928\u0940",e+" \u0935\u0930\u094d\u0938\u093e\u0902"]};return i?r[n][0]:r[n][1]}e.defineLocale("gom-deva",{months:{standalone:"\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940_\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940_\u092e\u093e\u0930\u094d\u091a_\u090f\u092a\u094d\u0930\u0940\u0932_\u092e\u0947_\u091c\u0942\u0928_\u091c\u0941\u0932\u092f_\u0911\u0917\u0938\u094d\u091f_\u0938\u092a\u094d\u091f\u0947\u0902\u092c\u0930_\u0911\u0915\u094d\u091f\u094b\u092c\u0930_\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930_\u0921\u093f\u0938\u0947\u0902\u092c\u0930".split("_"),format:"\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940\u091a\u094d\u092f\u093e_\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940\u091a\u094d\u092f\u093e_\u092e\u093e\u0930\u094d\u091a\u093e\u091a\u094d\u092f\u093e_\u090f\u092a\u094d\u0930\u0940\u0932\u093e\u091a\u094d\u092f\u093e_\u092e\u0947\u092f\u093e\u091a\u094d\u092f\u093e_\u091c\u0942\u0928\u093e\u091a\u094d\u092f\u093e_\u091c\u0941\u0932\u092f\u093e\u091a\u094d\u092f\u093e_\u0911\u0917\u0938\u094d\u091f\u093e\u091a\u094d\u092f\u093e_\u0938\u092a\u094d\u091f\u0947\u0902\u092c\u0930\u093e\u091a\u094d\u092f\u093e_\u0911\u0915\u094d\u091f\u094b\u092c\u0930\u093e\u091a\u094d\u092f\u093e_\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930\u093e\u091a\u094d\u092f\u093e_\u0921\u093f\u0938\u0947\u0902\u092c\u0930\u093e\u091a\u094d\u092f\u093e".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"\u091c\u093e\u0928\u0947._\u092b\u0947\u092c\u094d\u0930\u0941._\u092e\u093e\u0930\u094d\u091a_\u090f\u092a\u094d\u0930\u0940._\u092e\u0947_\u091c\u0942\u0928_\u091c\u0941\u0932._\u0911\u0917._\u0938\u092a\u094d\u091f\u0947\u0902._\u0911\u0915\u094d\u091f\u094b._\u0928\u094b\u0935\u094d\u0939\u0947\u0902._\u0921\u093f\u0938\u0947\u0902.".split("_"),monthsParseExact:!0,weekdays:"\u0906\u092f\u0924\u093e\u0930_\u0938\u094b\u092e\u093e\u0930_\u092e\u0902\u0917\u0933\u093e\u0930_\u092c\u0941\u0927\u0935\u093e\u0930_\u092c\u093f\u0930\u0947\u0938\u094d\u0924\u093e\u0930_\u0938\u0941\u0915\u094d\u0930\u093e\u0930_\u0936\u0947\u0928\u0935\u093e\u0930".split("_"),weekdaysShort:"\u0906\u092f\u0924._\u0938\u094b\u092e._\u092e\u0902\u0917\u0933._\u092c\u0941\u0927._\u092c\u094d\u0930\u0947\u0938\u094d\u0924._\u0938\u0941\u0915\u094d\u0930._\u0936\u0947\u0928.".split("_"),weekdaysMin:"\u0906_\u0938\u094b_\u092e\u0902_\u092c\u0941_\u092c\u094d\u0930\u0947_\u0938\u0941_\u0936\u0947".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [\u0935\u093e\u091c\u0924\u093e\u0902]",LTS:"A h:mm:ss [\u0935\u093e\u091c\u0924\u093e\u0902]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [\u0935\u093e\u091c\u0924\u093e\u0902]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [\u0935\u093e\u091c\u0924\u093e\u0902]",llll:"ddd, D MMM YYYY, A h:mm [\u0935\u093e\u091c\u0924\u093e\u0902]"},calendar:{sameDay:"[\u0906\u092f\u091c] LT",nextDay:"[\u092b\u093e\u0932\u094d\u092f\u093e\u0902] LT",nextWeek:"[\u092b\u0941\u0921\u0932\u094b] dddd[,] LT",lastDay:"[\u0915\u093e\u0932] LT",lastWeek:"[\u092b\u093e\u091f\u0932\u094b] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s \u0906\u0926\u0940\u0902",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(\u0935\u0947\u0930)/,ordinal:function(e,t){switch(t){case"D":return e+"\u0935\u0947\u0930";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:0,doy:3},meridiemParse:/\u0930\u093e\u0924\u0940|\u0938\u0915\u093e\u0933\u0940\u0902|\u0926\u0928\u092a\u093e\u0930\u093e\u0902|\u0938\u093e\u0902\u091c\u0947/,meridiemHour:function(e,t){return 12===e&&(e=0),"\u0930\u093e\u0924\u0940"===t?e<4?e:e+12:"\u0938\u0915\u093e\u0933\u0940\u0902"===t?e:"\u0926\u0928\u092a\u093e\u0930\u093e\u0902"===t?e>12?e:e+12:"\u0938\u093e\u0902\u091c\u0947"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"\u0930\u093e\u0924\u0940":e<12?"\u0938\u0915\u093e\u0933\u0940\u0902":e<16?"\u0926\u0928\u092a\u093e\u0930\u093e\u0902":e<20?"\u0938\u093e\u0902\u091c\u0947":"\u0930\u093e\u0924\u0940"}})}(n("wd/R"))},rB9j:function(e,t,n){"use strict";var i=n("I+eb"),r=n("kmMV");i({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},rKzb:function(e,t,n){"use strict";var i=n("4syw"),r=n("8YOa").getWeakData,s=n("glrk"),o=n("hh1v"),a=n("GarU"),c=n("ImZN"),l=n("tycR"),u=n("UTVS"),d=n("afO8"),h=d.set,f=d.getterFor,p=l.find,m=l.findIndex,b=0,g=function(e){return e.frozen||(e.frozen=new _)},_=function(){this.entries=[]},y=function(e,t){return p(e.entries,(function(e){return e[0]===t}))};_.prototype={get:function(e){var t=y(this,e);if(t)return t[1]},has:function(e){return!!y(this,e)},set:function(e,t){var n=y(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=m(this.entries,(function(t){return t[0]===e}));return~t&&this.entries.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,l){var d=e((function(e,i){a(e,d,t),h(e,{type:t,id:b++,frozen:void 0}),null!=i&&c(i,e[l],e,n)})),p=f(t),m=function(e,t,n){var i=p(e),o=r(s(t),!0);return!0===o?g(i).set(t,n):o[i.id]=n,e};return i(d.prototype,{delete:function(e){var t=p(this);if(!o(e))return!1;var n=r(e);return!0===n?g(t).delete(e):n&&u(n,t.id)&&delete n[t.id]},has:function(e){var t=p(this);if(!o(e))return!1;var n=r(e);return!0===n?g(t).has(e):n&&u(n,t.id)}}),i(d.prototype,n?{get:function(e){var t=p(this);if(o(e)){var n=r(e);return!0===n?g(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return m(this,e,t)}}:{add:function(e){return m(this,e,!0)}}),d}}},rW0t:function(e,t,n){"use strict";var i=n("glrk");e.exports=function(){var e=i(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},raLr:function(e,t,n){!function(e){"use strict";function t(e,t,n){return"m"===n?t?"\u0445\u0432\u0438\u043b\u0438\u043d\u0430":"\u0445\u0432\u0438\u043b\u0438\u043d\u0443":"h"===n?t?"\u0433\u043e\u0434\u0438\u043d\u0430":"\u0433\u043e\u0434\u0438\u043d\u0443":e+" "+(i=+e,r={ss:t?"\u0441\u0435\u043a\u0443\u043d\u0434\u0430_\u0441\u0435\u043a\u0443\u043d\u0434\u0438_\u0441\u0435\u043a\u0443\u043d\u0434":"\u0441\u0435\u043a\u0443\u043d\u0434\u0443_\u0441\u0435\u043a\u0443\u043d\u0434\u0438_\u0441\u0435\u043a\u0443\u043d\u0434",mm:t?"\u0445\u0432\u0438\u043b\u0438\u043d\u0430_\u0445\u0432\u0438\u043b\u0438\u043d\u0438_\u0445\u0432\u0438\u043b\u0438\u043d":"\u0445\u0432\u0438\u043b\u0438\u043d\u0443_\u0445\u0432\u0438\u043b\u0438\u043d\u0438_\u0445\u0432\u0438\u043b\u0438\u043d",hh:t?"\u0433\u043e\u0434\u0438\u043d\u0430_\u0433\u043e\u0434\u0438\u043d\u0438_\u0433\u043e\u0434\u0438\u043d":"\u0433\u043e\u0434\u0438\u043d\u0443_\u0433\u043e\u0434\u0438\u043d\u0438_\u0433\u043e\u0434\u0438\u043d",dd:"\u0434\u0435\u043d\u044c_\u0434\u043d\u0456_\u0434\u043d\u0456\u0432",MM:"\u043c\u0456\u0441\u044f\u0446\u044c_\u043c\u0456\u0441\u044f\u0446\u0456_\u043c\u0456\u0441\u044f\u0446\u0456\u0432",yy:"\u0440\u0456\u043a_\u0440\u043e\u043a\u0438_\u0440\u043e\u043a\u0456\u0432"}[n].split("_"),i%10==1&&i%100!=11?r[0]:i%10>=2&&i%10<=4&&(i%100<10||i%100>=20)?r[1]:r[2]);var i,r}function n(e){return function(){return e+"\u043e"+(11===this.hours()?"\u0431":"")+"] LT"}}e.defineLocale("uk",{months:{format:"\u0441\u0456\u0447\u043d\u044f_\u043b\u044e\u0442\u043e\u0433\u043e_\u0431\u0435\u0440\u0435\u0437\u043d\u044f_\u043a\u0432\u0456\u0442\u043d\u044f_\u0442\u0440\u0430\u0432\u043d\u044f_\u0447\u0435\u0440\u0432\u043d\u044f_\u043b\u0438\u043f\u043d\u044f_\u0441\u0435\u0440\u043f\u043d\u044f_\u0432\u0435\u0440\u0435\u0441\u043d\u044f_\u0436\u043e\u0432\u0442\u043d\u044f_\u043b\u0438\u0441\u0442\u043e\u043f\u0430\u0434\u0430_\u0433\u0440\u0443\u0434\u043d\u044f".split("_"),standalone:"\u0441\u0456\u0447\u0435\u043d\u044c_\u043b\u044e\u0442\u0438\u0439_\u0431\u0435\u0440\u0435\u0437\u0435\u043d\u044c_\u043a\u0432\u0456\u0442\u0435\u043d\u044c_\u0442\u0440\u0430\u0432\u0435\u043d\u044c_\u0447\u0435\u0440\u0432\u0435\u043d\u044c_\u043b\u0438\u043f\u0435\u043d\u044c_\u0441\u0435\u0440\u043f\u0435\u043d\u044c_\u0432\u0435\u0440\u0435\u0441\u0435\u043d\u044c_\u0436\u043e\u0432\u0442\u0435\u043d\u044c_\u043b\u0438\u0441\u0442\u043e\u043f\u0430\u0434_\u0433\u0440\u0443\u0434\u0435\u043d\u044c".split("_")},monthsShort:"\u0441\u0456\u0447_\u043b\u044e\u0442_\u0431\u0435\u0440_\u043a\u0432\u0456\u0442_\u0442\u0440\u0430\u0432_\u0447\u0435\u0440\u0432_\u043b\u0438\u043f_\u0441\u0435\u0440\u043f_\u0432\u0435\u0440_\u0436\u043e\u0432\u0442_\u043b\u0438\u0441\u0442_\u0433\u0440\u0443\u0434".split("_"),weekdays:function(e,t){var n={nominative:"\u043d\u0435\u0434\u0456\u043b\u044f_\u043f\u043e\u043d\u0435\u0434\u0456\u043b\u043e\u043a_\u0432\u0456\u0432\u0442\u043e\u0440\u043e\u043a_\u0441\u0435\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0435\u0440_\u043f\u2019\u044f\u0442\u043d\u0438\u0446\u044f_\u0441\u0443\u0431\u043e\u0442\u0430".split("_"),accusative:"\u043d\u0435\u0434\u0456\u043b\u044e_\u043f\u043e\u043d\u0435\u0434\u0456\u043b\u043e\u043a_\u0432\u0456\u0432\u0442\u043e\u0440\u043e\u043a_\u0441\u0435\u0440\u0435\u0434\u0443_\u0447\u0435\u0442\u0432\u0435\u0440_\u043f\u2019\u044f\u0442\u043d\u0438\u0446\u044e_\u0441\u0443\u0431\u043e\u0442\u0443".split("_"),genitive:"\u043d\u0435\u0434\u0456\u043b\u0456_\u043f\u043e\u043d\u0435\u0434\u0456\u043b\u043a\u0430_\u0432\u0456\u0432\u0442\u043e\u0440\u043a\u0430_\u0441\u0435\u0440\u0435\u0434\u0438_\u0447\u0435\u0442\u0432\u0435\u0440\u0433\u0430_\u043f\u2019\u044f\u0442\u043d\u0438\u0446\u0456_\u0441\u0443\u0431\u043e\u0442\u0438".split("_")};return!0===e?n.nominative.slice(1,7).concat(n.nominative.slice(0,1)):e?n[/(\[[\u0412\u0432\u0423\u0443]\]) ?dddd/.test(t)?"accusative":/\[?(?:\u043c\u0438\u043d\u0443\u043b\u043e\u0457|\u043d\u0430\u0441\u0442\u0443\u043f\u043d\u043e\u0457)? ?\] ?dddd/.test(t)?"genitive":"nominative"][e.day()]:n.nominative},weekdaysShort:"\u043d\u0434_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),weekdaysMin:"\u043d\u0434_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0440.",LLL:"D MMMM YYYY \u0440., HH:mm",LLLL:"dddd, D MMMM YYYY \u0440., HH:mm"},calendar:{sameDay:n("[\u0421\u044c\u043e\u0433\u043e\u0434\u043d\u0456 "),nextDay:n("[\u0417\u0430\u0432\u0442\u0440\u0430 "),lastDay:n("[\u0412\u0447\u043e\u0440\u0430 "),nextWeek:n("[\u0423] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return n("[\u041c\u0438\u043d\u0443\u043b\u043e\u0457] dddd [").call(this);case 1:case 2:case 4:return n("[\u041c\u0438\u043d\u0443\u043b\u043e\u0433\u043e] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"\u0437\u0430 %s",past:"%s \u0442\u043e\u043c\u0443",s:"\u0434\u0435\u043a\u0456\u043b\u044c\u043a\u0430 \u0441\u0435\u043a\u0443\u043d\u0434",ss:t,m:t,mm:t,h:"\u0433\u043e\u0434\u0438\u043d\u0443",hh:t,d:"\u0434\u0435\u043d\u044c",dd:t,M:"\u043c\u0456\u0441\u044f\u0446\u044c",MM:t,y:"\u0440\u0456\u043a",yy:t},meridiemParse:/\u043d\u043e\u0447\u0456|\u0440\u0430\u043d\u043a\u0443|\u0434\u043d\u044f|\u0432\u0435\u0447\u043e\u0440\u0430/,isPM:function(e){return/^(\u0434\u043d\u044f|\u0432\u0435\u0447\u043e\u0440\u0430)$/.test(e)},meridiem:function(e,t,n){return e<4?"\u043d\u043e\u0447\u0456":e<12?"\u0440\u0430\u043d\u043a\u0443":e<17?"\u0434\u043d\u044f":"\u0432\u0435\u0447\u043e\u0440\u0430"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0439|\u0433\u043e)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e+"-\u0439";case"D":return e+"-\u0433\u043e";default:return e}},week:{dow:1,doy:7}})}(n("wd/R"))},rkAj:function(e,t,n){var i=n("g6v/"),r=n("0Dky"),s=n("UTVS"),o=Object.defineProperty,a={},c=function(e){throw e};e.exports=function(e,t){if(s(a,e))return a[e];t||(t={});var n=[][e],l=!!s(t,"ACCESSORS")&&t.ACCESSORS,u=s(t,0)?t[0]:c,d=s(t,1)?t[1]:void 0;return a[e]=!!n&&!r((function(){if(l&&!i)return!0;var e={length:-1};l?o(e,1,{enumerable:!0,get:c}):e[1]=1,n.call(e,u,d)}))}},rpNk:function(e,t,n){"use strict";var i,r,s,o=n("4WOD"),a=n("kRJp"),c=n("UTVS"),l=n("tiKp"),u=n("xDBR"),d=l("iterator"),h=!1;[].keys&&("next"in(s=[].keys())?(r=o(o(s)))!==Object.prototype&&(i=r):h=!0),null==i&&(i={}),u||c(i,d)||a(i,d,(function(){return this})),e.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:h}},"s+uk":function(e,t,n){!function(e){"use strict";function t(e,t,n,i){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?r[n][0]:r[n][1]}e.defineLocale("de-at",{months:"J\xe4nner_Februar_M\xe4rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"J\xe4n._Feb._M\xe4rz_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},s7LF:function(e,t,n){"use strict";n.d(t,"a",(function(){return fe})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return m})),n.d(t,"d",(function(){return f})),n.d(t,"e",(function(){return be})),n.d(t,"f",(function(){return Ee})),n.d(t,"g",(function(){return Ye})),n.d(t,"h",(function(){return pe})),n.d(t,"i",(function(){return Pe})),n.d(t,"j",(function(){return me})),n.d(t,"k",(function(){return Ce})),n.d(t,"l",(function(){return Le})),n.d(t,"m",(function(){return ze})),n.d(t,"n",(function(){return M})),n.d(t,"o",(function(){return c})),n.d(t,"p",(function(){return g})),n.d(t,"q",(function(){return y})),n.d(t,"r",(function(){return v})),n.d(t,"s",(function(){return ye})),n.d(t,"t",(function(){return ke})),n.d(t,"u",(function(){return H})),n.d(t,"v",(function(){return A})),n.d(t,"w",(function(){return N})),n.d(t,"x",(function(){return $e})),n.d(t,"y",(function(){return je})),n.d(t,"z",(function(){return $})),n.d(t,"A",(function(){return D})),n.d(t,"B",(function(){return U})),n.d(t,"C",(function(){return xe}));var i=n("8Y7J"),r=n("SVse"),s=n("cp0P"),o=n("Cfvw"),a=n("lJxs");const c=new i.r("NgValueAccessor"),l={provide:c,useExisting:Object(i.T)(()=>u),multi:!0};let u=(()=>{class e{constructor(e,t){this._renderer=e,this._elementRef=t,this.onChange=e=>{},this.onTouched=()=>{}}writeValue(e){this._renderer.setProperty(this._elementRef.nativeElement,"checked",e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.E),i.Mb(i.m))},e.\u0275dir=i.Hb({type:e,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(e,t){1&e&&i.gc("change",(function(e){return t.onChange(e.target.checked)}))("blur",(function(){return t.onTouched()}))},features:[i.xb([l])]}),e})();const d={provide:c,useExisting:Object(i.T)(()=>f),multi:!0},h=new i.r("CompositionEventMode");let f=(()=>{class e{constructor(e,t,n){this._renderer=e,this._elementRef=t,this._compositionMode=n,this.onChange=e=>{},this.onTouched=()=>{},this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function(){const e=Object(r.L)()?Object(r.L)().getUserAgent():"";return/android (\d+)/.test(e.toLowerCase())}())}writeValue(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==e?"":e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.E),i.Mb(i.m),i.Mb(h,8))},e.\u0275dir=i.Hb({type:e,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,t){1&e&&i.gc("input",(function(e){return t._handleInput(e.target.value)}))("blur",(function(){return t.onTouched()}))("compositionstart",(function(){return t._compositionStart()}))("compositionend",(function(e){return t._compositionEnd(e.target.value)}))},features:[i.xb([d])]}),e})(),p=(()=>{class e{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}reset(e){this.control&&this.control.reset(e)}hasError(e,t){return!!this.control&&this.control.hasError(e,t)}getError(e,t){return this.control?this.control.getError(e,t):null}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=i.Hb({type:e}),e})(),m=(()=>{class e extends p{get formDirective(){return null}get path(){return null}}return e.\u0275fac=function(t){return b(t||e)},e.\u0275dir=i.Hb({type:e,features:[i.vb]}),e})();const b=i.Ub(m);class g extends p{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null,this._rawValidators=[],this._rawAsyncValidators=[]}get validator(){}get asyncValidator(){}}class _{constructor(e){this._cd=e}get ngClassUntouched(){return!!this._cd.control&&this._cd.control.untouched}get ngClassTouched(){return!!this._cd.control&&this._cd.control.touched}get ngClassPristine(){return!!this._cd.control&&this._cd.control.pristine}get ngClassDirty(){return!!this._cd.control&&this._cd.control.dirty}get ngClassValid(){return!!this._cd.control&&this._cd.control.valid}get ngClassInvalid(){return!!this._cd.control&&this._cd.control.invalid}get ngClassPending(){return!!this._cd.control&&this._cd.control.pending}}let y=(()=>{class e extends _{constructor(e){super(e)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(g,2))},e.\u0275dir=i.Hb({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,t){2&e&&i.Eb("ng-untouched",t.ngClassUntouched)("ng-touched",t.ngClassTouched)("ng-pristine",t.ngClassPristine)("ng-dirty",t.ngClassDirty)("ng-valid",t.ngClassValid)("ng-invalid",t.ngClassInvalid)("ng-pending",t.ngClassPending)},features:[i.vb]}),e})(),v=(()=>{class e extends _{constructor(e){super(e)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(m,2))},e.\u0275dir=i.Hb({type:e,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:14,hostBindings:function(e,t){2&e&&i.Eb("ng-untouched",t.ngClassUntouched)("ng-touched",t.ngClassTouched)("ng-pristine",t.ngClassPristine)("ng-dirty",t.ngClassDirty)("ng-valid",t.ngClassValid)("ng-invalid",t.ngClassInvalid)("ng-pending",t.ngClassPending)},features:[i.vb]}),e})();function w(e){return null==e||0===e.length}function S(e){return null!=e&&"number"==typeof e.length}const M=new i.r("NgValidators"),k=new i.r("NgAsyncValidators"),x=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class D{static min(e){return t=>{if(w(t.value)||w(e))return null;const n=parseFloat(t.value);return!isNaN(n)&&n<e?{min:{min:e,actual:t.value}}:null}}static max(e){return t=>{if(w(t.value)||w(e))return null;const n=parseFloat(t.value);return!isNaN(n)&&n>e?{max:{max:e,actual:t.value}}:null}}static required(e){return w(e.value)?{required:!0}:null}static requiredTrue(e){return!0===e.value?null:{required:!0}}static email(e){return w(e.value)||x.test(e.value)?null:{email:!0}}static minLength(e){return t=>w(t.value)||!S(t.value)?null:t.value.length<e?{minlength:{requiredLength:e,actualLength:t.value.length}}:null}static maxLength(e){return t=>S(t.value)&&t.value.length>e?{maxlength:{requiredLength:e,actualLength:t.value.length}}:null}static pattern(e){if(!e)return D.nullValidator;let t,n;return"string"==typeof e?(n="","^"!==e.charAt(0)&&(n+="^"),n+=e,"$"!==e.charAt(e.length-1)&&(n+="$"),t=new RegExp(n)):(n=e.toString(),t=e),e=>{if(w(e.value))return null;const i=e.value;return t.test(i)?null:{pattern:{requiredPattern:n,actualValue:i}}}}static nullValidator(e){return null}static compose(e){if(!e)return null;const t=e.filter(T);return 0==t.length?null:function(e){return O(L(e,t))}}static composeAsync(e){if(!e)return null;const t=e.filter(T);return 0==t.length?null:function(e){const n=L(e,t).map(C);return Object(s.a)(n).pipe(Object(a.a)(O))}}}function T(e){return null!=e}function C(e){const t=Object(i.qb)(e)?Object(o.a)(e):e;return Object(i.pb)(t),t}function O(e){let t={};return e.forEach(e=>{t=null!=e?Object.assign(Object.assign({},t),e):t}),0===Object.keys(t).length?null:t}function L(e,t){return t.map(t=>t(e))}function R(e){return e.map(e=>function(e){return!e.validate}(e)?e:t=>e.validate(t))}const E={provide:c,useExisting:Object(i.T)(()=>A),multi:!0};let A=(()=>{class e{constructor(e,t){this._renderer=e,this._elementRef=t,this.onChange=e=>{},this.onTouched=()=>{}}writeValue(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==e?"":e)}registerOnChange(e){this.onChange=t=>{e(""==t?null:parseFloat(t))}}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.E),i.Mb(i.m))},e.\u0275dir=i.Hb({type:e,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,t){1&e&&i.gc("input",(function(e){return t.onChange(e.target.value)}))("blur",(function(){return t.onTouched()}))},features:[i.xb([E])]}),e})();const I={provide:c,useExisting:Object(i.T)(()=>N),multi:!0};let P=(()=>{class e{constructor(){this._accessors=[]}add(e,t){this._accessors.push([e,t])}remove(e){for(let t=this._accessors.length-1;t>=0;--t)if(this._accessors[t][1]===e)return void this._accessors.splice(t,1)}select(e){this._accessors.forEach(t=>{this._isSameGroup(t,e)&&t[1]!==e&&t[1].fireUncheck(e.value)})}_isSameGroup(e,t){return!!e[0].control&&e[0]._parent===t._control._parent&&e[1].name===t.name}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})(),N=(()=>{class e{constructor(e,t,n,i){this._renderer=e,this._elementRef=t,this._registry=n,this._injector=i,this.onChange=()=>{},this.onTouched=()=>{}}ngOnInit(){this._control=this._injector.get(g),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}fireUncheck(e){this.writeValue(e)}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}_checkName(){!this.name&&this.formControlName&&(this.name=this.formControlName)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.E),i.Mb(i.m),i.Mb(P),i.Mb(i.s))},e.\u0275dir=i.Hb({type:e,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(e,t){1&e&&i.gc("change",(function(){return t.onChange()}))("blur",(function(){return t.onTouched()}))},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[i.xb([I])]}),e})();const j={provide:c,useExisting:Object(i.T)(()=>F),multi:!0};let F=(()=>{class e{constructor(e,t){this._renderer=e,this._elementRef=t,this.onChange=e=>{},this.onTouched=()=>{}}writeValue(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(e))}registerOnChange(e){this.onChange=t=>{e(""==t?null:parseFloat(t))}}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.E),i.Mb(i.m))},e.\u0275dir=i.Hb({type:e,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(e,t){1&e&&i.gc("change",(function(e){return t.onChange(e.target.value)}))("input",(function(e){return t.onChange(e.target.value)}))("blur",(function(){return t.onTouched()}))},features:[i.xb([j])]}),e})();const Y={provide:c,useExisting:Object(i.T)(()=>$),multi:!0};function z(e,t){return null==e?""+t:(t&&"object"==typeof t&&(t="Object"),`${e}: ${t}`.slice(0,50))}let $=(()=>{class e{constructor(e,t){this._renderer=e,this._elementRef=t,this._optionMap=new Map,this._idCounter=0,this.onChange=e=>{},this.onTouched=()=>{},this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;const t=this._getOptionId(e);null==t&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);const n=z(t,e);this._renderer.setProperty(this._elementRef.nativeElement,"value",n)}registerOnChange(e){this.onChange=t=>{this.value=this._getOptionValue(t),e(this.value)}}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(const t of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(t),e))return t;return null}_getOptionValue(e){const t=function(e){return e.split(":")[0]}(e);return this._optionMap.has(t)?this._optionMap.get(t):e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.E),i.Mb(i.m))},e.\u0275dir=i.Hb({type:e,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(e,t){1&e&&i.gc("change",(function(e){return t.onChange(e.target.value)}))("blur",(function(){return t.onTouched()}))},inputs:{compareWith:"compareWith"},features:[i.xb([Y])]}),e})(),H=(()=>{class e{constructor(e,t,n){this._element=e,this._renderer=t,this._select=n,this._select&&(this.id=this._select._registerOption())}set ngValue(e){null!=this._select&&(this._select._optionMap.set(this.id,e),this._setElementValue(z(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(i.E),i.Mb($,9))},e.\u0275dir=i.Hb({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),e})();const W={provide:c,useExisting:Object(i.T)(()=>B),multi:!0};function V(e,t){return null==e?""+t:("string"==typeof t&&(t=`'${t}'`),t&&"object"==typeof t&&(t="Object"),`${e}: ${t}`.slice(0,50))}let B=(()=>{class e{constructor(e,t){this._renderer=e,this._elementRef=t,this._optionMap=new Map,this._idCounter=0,this.onChange=e=>{},this.onTouched=()=>{},this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){let t;if(this.value=e,Array.isArray(e)){const n=e.map(e=>this._getOptionId(e));t=(e,t)=>{e._setSelected(n.indexOf(t.toString())>-1)}}else t=(e,t)=>{e._setSelected(!1)};this._optionMap.forEach(t)}registerOnChange(e){this.onChange=t=>{const n=[];if(void 0!==t.selectedOptions){const e=t.selectedOptions;for(let t=0;t<e.length;t++){const i=e.item(t),r=this._getOptionValue(i.value);n.push(r)}}else{const e=t.options;for(let t=0;t<e.length;t++){const i=e.item(t);if(i.selected){const e=this._getOptionValue(i.value);n.push(e)}}}this.value=n,e(n)}}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}_registerOption(e){const t=(this._idCounter++).toString();return this._optionMap.set(t,e),t}_getOptionId(e){for(const t of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(t)._value,e))return t;return null}_getOptionValue(e){const t=function(e){return e.split(":")[0]}(e);return this._optionMap.has(t)?this._optionMap.get(t)._value:e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.E),i.Mb(i.m))},e.\u0275dir=i.Hb({type:e,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(e,t){1&e&&i.gc("change",(function(e){return t.onChange(e.target)}))("blur",(function(){return t.onTouched()}))},inputs:{compareWith:"compareWith"},features:[i.xb([W])]}),e})(),U=(()=>{class e{constructor(e,t,n){this._element=e,this._renderer=t,this._select=n,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){null!=this._select&&(this._value=e,this._setElementValue(V(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(V(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(i.E),i.Mb(B,9))},e.\u0275dir=i.Hb({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),e})();function G(e,t){return[...t.path,e]}function q(e,t){e.validator=D.compose([e.validator,t.validator]),e.asyncValidator=D.composeAsync([e.asyncValidator,t.asyncValidator]),t.valueAccessor.writeValue(e.value),function(e,t){t.valueAccessor.registerOnChange(n=>{e._pendingValue=n,e._pendingChange=!0,e._pendingDirty=!0,"change"===e.updateOn&&J(e,t)})}(e,t),function(e,t){e.registerOnChange((e,n)=>{t.valueAccessor.writeValue(e),n&&t.viewToModelUpdate(e)})}(e,t),function(e,t){t.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,"blur"===e.updateOn&&e._pendingChange&&J(e,t),"submit"!==e.updateOn&&e.markAsTouched()})}(e,t),t.valueAccessor.setDisabledState&&e.registerOnDisabledChange(e=>{t.valueAccessor.setDisabledState(e)}),t._rawValidators.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(()=>e.updateValueAndValidity())}),t._rawAsyncValidators.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(()=>e.updateValueAndValidity())})}function J(e,t){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function Q(e,t){e.validator=D.compose([e.validator,t.validator]),e.asyncValidator=D.composeAsync([e.asyncValidator,t.asyncValidator])}function K(e){return null!=e?D.compose(R(e)):null}function Z(e){return null!=e?D.composeAsync(R(e)):null}function X(e,t){if(!e.hasOwnProperty("model"))return!1;const n=e.model;return!!n.isFirstChange()||!Object.is(t,n.currentValue)}const ee=[u,F,A,$,B,N];function te(e,t){e._syncPendingControls(),t.forEach(e=>{const t=e.control;"submit"===t.updateOn&&t._pendingChange&&(e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1)})}function ne(e,t){if(!t)return null;Array.isArray(t);let n=void 0,i=void 0,r=void 0;return t.forEach(e=>{var t;e.constructor===f?n=e:(t=e,ee.some(e=>t.constructor===e)?i=e:r=e)}),r||i||n||null}function ie(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const re="VALID",se="INVALID",oe="PENDING",ae="DISABLED";function ce(e){return(he(e)?e.validators:e)||null}function le(e){return Array.isArray(e)?K(e):e||null}function ue(e,t){return(he(t)?t.asyncValidators:e)||null}function de(e){return Array.isArray(e)?Z(e):e||null}function he(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}class fe{constructor(e,t){this._hasOwnPendingAsyncValidator=!1,this._onCollectionChange=()=>{},this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=e,this._rawAsyncValidators=t,this._composedValidatorFn=le(this._rawValidators),this._composedAsyncValidatorFn=de(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get valid(){return this.status===re}get invalid(){return this.status===se}get pending(){return this.status==oe}get disabled(){return this.status===ae}get enabled(){return this.status!==ae}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._rawValidators=e,this._composedValidatorFn=le(e)}setAsyncValidators(e){this._rawAsyncValidators=e,this._composedAsyncValidatorFn=de(e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){this.touched=!0,this._parent&&!e.onlySelf&&this._parent.markAsTouched(e)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(e=>e.markAllAsTouched())}markAsUntouched(e={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}markAsDirty(e={}){this.pristine=!1,this._parent&&!e.onlySelf&&this._parent.markAsDirty(e)}markAsPristine(e={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}markAsPending(e={}){this.status=oe,!1!==e.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!e.onlySelf&&this._parent.markAsPending(e)}disable(e={}){const t=this._parentMarkedDirty(e.onlySelf);this.status=ae,this.errors=null,this._forEachChild(t=>{t.disable(Object.assign(Object.assign({},e),{onlySelf:!0}))}),this._updateValue(),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},e),{skipPristineCheck:t})),this._onDisabledChange.forEach(e=>e(!0))}enable(e={}){const t=this._parentMarkedDirty(e.onlySelf);this.status=re,this._forEachChild(t=>{t.enable(Object.assign(Object.assign({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},e),{skipPristineCheck:t})),this._onDisabledChange.forEach(e=>e(!1))}_updateAncestors(e){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(e){this._parent=e}updateValueAndValidity(e={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),this.status!==re&&this.status!==oe||this._runAsyncValidator(e.emitEvent)),!1!==e.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(e)}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?ae:re}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e){if(this.asyncValidator){this.status=oe,this._hasOwnPendingAsyncValidator=!0;const t=C(this.asyncValidator(this));this._asyncValidationSubscription=t.subscribe(t=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(t,{emitEvent:e})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(!1!==t.emitEvent)}get(e){return function(e,t,n){if(null==t)return null;if(Array.isArray(t)||(t=t.split(".")),Array.isArray(t)&&0===t.length)return null;let i=e;return t.forEach(e=>{i=i instanceof me?i.controls.hasOwnProperty(e)?i.controls[e]:null:i instanceof be&&i.at(e)||null}),i}(this,e)}getError(e,t){const n=t?this.get(t):this;return n&&n.errors?n.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(e)}_initObservables(){this.valueChanges=new i.o,this.statusChanges=new i.o}_calculateStatus(){return this._allControlsDisabled()?ae:this.errors?se:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(oe)?oe:this._anyControlsHaveStatus(se)?se:re}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e={}){this.pristine=!this._anyControlsDirty(),this._parent&&!e.onlySelf&&this._parent._updatePristine(e)}_updateTouched(e={}){this.touched=this._anyControlsTouched(),this._parent&&!e.onlySelf&&this._parent._updateTouched(e)}_isBoxedValue(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){he(e)&&null!=e.updateOn&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){return!e&&this._parent&&this._parent.dirty&&!this._parent._anyControlsDirty()}}class pe extends fe{constructor(e=null,t,n){super(ce(t),ue(n,t)),this._onChange=[],this._applyFormState(e),this._setUpdateStrategy(t),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),this._initObservables()}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&!1!==t.emitModelToViewChange&&this._onChange.forEach(e=>e(this.value,!1!==t.emitViewToModelChange)),this.updateValueAndValidity(t)}patchValue(e,t={}){this.setValue(e,t)}reset(e=null,t={}){this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_clearChangeFns(){this._onChange=[],this._onDisabledChange=[],this._onCollectionChange=()=>{}}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_forEachChild(e){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(e){this._isBoxedValue(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}}class me extends fe{constructor(e,t,n){super(ce(t),ue(n,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}registerControl(e,t){return this.controls[e]?this.controls[e]:(this.controls[e]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(e,t){this.registerControl(e,t),this.updateValueAndValidity(),this._onCollectionChange()}removeControl(e){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity(),this._onCollectionChange()}setControl(e,t){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],t&&this.registerControl(e,t),this.updateValueAndValidity(),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,t={}){this._checkAllValuesPresent(e),Object.keys(e).forEach(n=>{this._throwIfControlMissing(n),this.controls[n].setValue(e[n],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){Object.keys(e).forEach(n=>{this.controls[n]&&this.controls[n].patchValue(e[n],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}reset(e={},t={}){this._forEachChild((n,i)=>{n.reset(e[i],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(e,t,n)=>(e[n]=t instanceof pe?t.value:t.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(e,t)=>!!t._syncPendingControls()||e);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_throwIfControlMissing(e){if(!Object.keys(this.controls).length)throw new Error("\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.controls[e])throw new Error(`Cannot find form control with name: ${e}.`)}_forEachChild(e){Object.keys(this.controls).forEach(t=>e(this.controls[t],t))}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(const t of Object.keys(this.controls)){const n=this.controls[t];if(this.contains(t)&&e(n))return!0}return!1}_reduceValue(){return this._reduceChildren({},(e,t,n)=>((t.enabled||this.disabled)&&(e[n]=t.value),e))}_reduceChildren(e,t){let n=e;return this._forEachChild((e,i)=>{n=t(n,e,i)}),n}_allControlsDisabled(){for(const e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_checkAllValuesPresent(e){this._forEachChild((t,n)=>{if(void 0===e[n])throw new Error(`Must supply a value for form control with name: '${n}'.`)})}}class be extends fe{constructor(e,t,n){super(ce(t),ue(n,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}at(e){return this.controls[e]}push(e){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity(),this._onCollectionChange()}insert(e,t){this.controls.splice(e,0,t),this._registerControl(t),this.updateValueAndValidity()}removeAt(e){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),this.controls.splice(e,1),this.updateValueAndValidity()}setControl(e,t){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),this.controls.splice(e,1),t&&(this.controls.splice(e,0,t),this._registerControl(t)),this.updateValueAndValidity(),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,t={}){this._checkAllValuesPresent(e),e.forEach((e,n)=>{this._throwIfControlMissing(n),this.at(n).setValue(e,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){e.forEach((e,n)=>{this.at(n)&&this.at(n).patchValue(e,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}reset(e=[],t={}){this._forEachChild((n,i)=>{n.reset(e[i],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t),this._updateTouched(t),this.updateValueAndValidity(t)}getRawValue(){return this.controls.map(e=>e instanceof pe?e.value:e.getRawValue())}clear(){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity())}_syncPendingControls(){let e=this.controls.reduce((e,t)=>!!t._syncPendingControls()||e,!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_throwIfControlMissing(e){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(e))throw new Error("Cannot find form control at index "+e)}_forEachChild(e){this.controls.forEach((t,n)=>{e(t,n)})}_updateValue(){this.value=this.controls.filter(e=>e.enabled||this.disabled).map(e=>e.value)}_anyControls(e){return this.controls.some(t=>t.enabled&&e(t))}_setUpControls(){this._forEachChild(e=>this._registerControl(e))}_checkAllValuesPresent(e){this._forEachChild((t,n)=>{if(void 0===e[n])throw new Error(`Must supply a value for form control at index: ${n}.`)})}_allControlsDisabled(){for(const e of this.controls)if(e.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}}const ge={provide:m,useExisting:Object(i.T)(()=>ye)},_e=(()=>Promise.resolve(null))();let ye=(()=>{class e extends m{constructor(e,t){super(),this.submitted=!1,this._directives=[],this.ngSubmit=new i.o,this.form=new me({},K(e),Z(t))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){_e.then(()=>{const t=this._findContainer(e.path);e.control=t.registerControl(e.name,e.control),q(e.control,e),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.push(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){_e.then(()=>{const t=this._findContainer(e.path);t&&t.removeControl(e.name),ie(this._directives,e)})}addFormGroup(e){_e.then(()=>{const t=this._findContainer(e.path),n=new me({});Q(n,e),t.registerControl(e.name,n),n.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){_e.then(()=>{const t=this._findContainer(e.path);t&&t.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,t){_e.then(()=>{this.form.get(e.path).setValue(t)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,te(this.form,this._directives),this.ngSubmit.emit(e),!1}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(M,10),i.Mb(k,10))},e.\u0275dir=i.Hb({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,t){1&e&&i.gc("submit",(function(e){return t.onSubmit(e)}))("reset",(function(){return t.onReset()}))},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[i.xb([ge]),i.vb]}),e})(),ve=(()=>{class e extends m{ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return G(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}get validator(){return K(this._validators)}get asyncValidator(){return Z(this._asyncValidators)}_checkParentType(){}}return e.\u0275fac=function(t){return we(t||e)},e.\u0275dir=i.Hb({type:e,features:[i.vb]}),e})();const we=i.Ub(ve),Se={provide:g,useExisting:Object(i.T)(()=>ke)},Me=(()=>Promise.resolve(null))();let ke=(()=>{class e extends g{constructor(e,t,n,r){super(),this.control=new pe,this._registered=!1,this.update=new i.o,this._parent=e,this._rawValidators=t||[],this._rawAsyncValidators=n||[],this.valueAccessor=ne(0,r)}ngOnChanges(e){this._checkForErrors(),this._registered||this._setUpControl(),"isDisabled"in e&&this._updateDisabled(e),X(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._parent?G(this.name,this._parent):[this.name]}get formDirective(){return this._parent?this._parent.formDirective:null}get validator(){return K(this._rawValidators)}get asyncValidator(){return Z(this._rawAsyncValidators)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){q(this.control,this),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(e){Me.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1})})}_updateDisabled(e){const t=e.isDisabled.currentValue,n=""===t||t&&"false"!==t;Me.then(()=>{n&&!this.control.disabled?this.control.disable():!n&&this.control.disabled&&this.control.enable()})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(m,9),i.Mb(M,10),i.Mb(k,10),i.Mb(c,10))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[i.xb([Se]),i.vb,i.wb]}),e})(),xe=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=i.Hb({type:e,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),e})();const De=new i.r("NgModelWithFormControlWarning"),Te={provide:m,useExisting:Object(i.T)(()=>Ce)};let Ce=(()=>{class e extends m{constructor(e,t){super(),this._validators=e,this._asyncValidators=t,this.submitted=!1,this.directives=[],this.form=null,this.ngSubmit=new i.o}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations())}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){const t=this.form.get(e.path);return q(t,e),t.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),t}getControl(e){return this.form.get(e.path)}removeControl(e){ie(this.directives,e)}addFormGroup(e){const t=this.form.get(e.path);Q(t,e),t.updateValueAndValidity({emitEvent:!1})}removeFormGroup(e){}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){const t=this.form.get(e.path);Q(t,e),t.updateValueAndValidity({emitEvent:!1})}removeFormArray(e){}getFormArray(e){return this.form.get(e.path)}updateModel(e,t){this.form.get(e.path).setValue(t)}onSubmit(e){return this.submitted=!0,te(this.form,this.directives),this.ngSubmit.emit(e),!1}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{const t=this.form.get(e.path);e.control!==t&&(function(e,t){const n=()=>{};t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n),t._rawValidators.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(null)}),t._rawAsyncValidators.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(null)}),e&&e._clearChangeFns()}(e.control,e),t&&q(t,e),e.control=t)}),this.form._updateTreeValidity({emitEvent:!1})}_updateRegistrations(){this.form._registerOnCollectionChange(()=>this._updateDomValue()),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{}),this._oldForm=this.form}_updateValidators(){const e=K(this._validators);this.form.validator=D.compose([this.form.validator,e]);const t=Z(this._asyncValidators);this.form.asyncValidator=D.composeAsync([this.form.asyncValidator,t])}_checkFormPresent(){}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(M,10),i.Mb(k,10))},e.\u0275dir=i.Hb({type:e,selectors:[["","formGroup",""]],hostBindings:function(e,t){1&e&&i.gc("submit",(function(e){return t.onSubmit(e)}))("reset",(function(){return t.onReset()}))},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[i.xb([Te]),i.vb,i.wb]}),e})();const Oe={provide:m,useExisting:Object(i.T)(()=>Le)};let Le=(()=>{class e extends ve{constructor(e,t,n){super(),this._parent=e,this._validators=t,this._asyncValidators=n}_checkParentType(){Ae(this._parent)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(m,13),i.Mb(M,10),i.Mb(k,10))},e.\u0275dir=i.Hb({type:e,selectors:[["","formGroupName",""]],inputs:{name:["formGroupName","name"]},features:[i.xb([Oe]),i.vb]}),e})();const Re={provide:m,useExisting:Object(i.T)(()=>Ee)};let Ee=(()=>{class e extends m{constructor(e,t,n){super(),this._parent=e,this._validators=t,this._asyncValidators=n}ngOnInit(){this._checkParentType(),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return G(null==this.name?this.name:this.name.toString(),this._parent)}get validator(){return K(this._validators)}get asyncValidator(){return Z(this._asyncValidators)}_checkParentType(){Ae(this._parent)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(m,13),i.Mb(M,10),i.Mb(k,10))},e.\u0275dir=i.Hb({type:e,selectors:[["","formArrayName",""]],inputs:{name:["formArrayName","name"]},features:[i.xb([Re]),i.vb]}),e})();function Ae(e){return!(e instanceof Le||e instanceof Ce||e instanceof Ee)}const Ie={provide:g,useExisting:Object(i.T)(()=>Pe)};let Pe=(()=>{class e extends g{constructor(e,t,n,r,s){super(),this._ngModelWarningConfig=s,this._added=!1,this.update=new i.o,this._ngModelWarningSent=!1,this._parent=e,this._rawValidators=t||[],this._rawAsyncValidators=n||[],this.valueAccessor=ne(0,r)}set isDisabled(e){}ngOnChanges(t){var n,r;this._added||this._setUpControl(),X(t,this.viewModel)&&(n=e,this,r=this._ngModelWarningConfig,Object(i.U)()&&"never"!==r&&((null!==r&&"once"!==r||n._ngModelWarningSentOnce)&&("always"!==r||this._ngModelWarningSent)||(n._ngModelWarningSentOnce=!0,this._ngModelWarningSent=!0)),this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return G(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}get validator(){return K(this._rawValidators)}get asyncValidator(){return Z(this._rawAsyncValidators)}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(m,13),i.Mb(M,10),i.Mb(k,10),i.Mb(c,10),i.Mb(De,8))},e.\u0275dir=i.Hb({type:e,selectors:[["","formControlName",""]],inputs:{isDisabled:["disabled","isDisabled"],name:["formControlName","name"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[i.xb([Ie]),i.vb,i.wb]}),e._ngModelWarningSentOnce=!1,e})();const Ne={provide:M,useExisting:Object(i.T)(()=>je),multi:!0};let je=(()=>{class e{constructor(){this._required=!1}get required(){return this._required}set required(e){this._required=null!=e&&!1!==e&&""+e!="false",this._onChange&&this._onChange()}validate(e){return this.required?D.required(e):null}registerOnValidatorChange(e){this._onChange=e}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=i.Hb({type:e,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(e,t){2&e&&i.zb("required",t.required?"":null)},inputs:{required:"required"},features:[i.xb([Ne])]}),e})(),Fe=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)}}),e})(),Ye=(()=>{class e{group(e,t=null){const n=this._reduceControls(e);let i=null,r=null,s=void 0;return null!=t&&(function(e){return void 0!==e.asyncValidators||void 0!==e.validators||void 0!==e.updateOn}(t)?(i=null!=t.validators?t.validators:null,r=null!=t.asyncValidators?t.asyncValidators:null,s=null!=t.updateOn?t.updateOn:void 0):(i=null!=t.validator?t.validator:null,r=null!=t.asyncValidator?t.asyncValidator:null)),new me(n,{asyncValidators:r,updateOn:s,validators:i})}control(e,t,n){return new pe(e,t,n)}array(e,t,n){const i=e.map(e=>this._createControl(e));return new be(i,t,n)}_reduceControls(e){const t={};return Object.keys(e).forEach(n=>{t[n]=this._createControl(e[n])}),t}_createControl(e){return e instanceof pe||e instanceof me||e instanceof be?e:Array.isArray(e)?this.control(e[0],e.length>1?e[1]:null,e.length>2?e[2]:null):this.control(e)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})(),ze=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},providers:[P],imports:[Fe]}),e})(),$e=(()=>{class e{static withConfig(t){return{ngModule:e,providers:[{provide:De,useValue:t.warnOnNgModelWithFormControl}]}}}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},providers:[Ye,P],imports:[Fe]}),e})()},sEFX:function(e,t,n){"use strict";var i=n("AO7/"),r=n("9d/t");e.exports=i?{}.toString:function(){return"[object "+r(this)+"]"}},sMBO:function(e,t,n){var i=n("g6v/"),r=n("m/L8").f,s=Function.prototype,o=s.toString,a=/^\s*function ([^ (]*)/,c="name";i&&!(c in s)&&r(s,c,{configurable:!0,get:function(){try{return o.call(this).match(a)[1]}catch(e){return""}}})},sVev:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const i=(()=>{function e(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return e.prototype=Object.create(Error.prototype),e})()},sb0X:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var i=n("8Y7J"),r=n("s7LF"),s=n("LvDl"),o=n.n(s),a=n("oxzT"),c=n("ANnk"),l=n("SVse");const u=function(e,t){return[e,t]};function d(e,t){if(1&e&&(i.Sb(0,"span"),i.Nb(1,"i",2),i.Rb()),2&e){const e=i.ic();i.yb(1),i.pc("ngClass",i.vc(1,u,e.icons.spinner,e.icons.spin))}}const h=["*"];let f=(()=>{class e{constructor(e){this.elRef=e,this.type="submit",this.disabled=!1,this.submitAction=new i.o,this.loading=!1,this.icons=a.a}ngOnInit(){this.form.statusChanges.subscribe(()=>{o.a.has(this.form.errors,"cdSubmitButton")&&(this.loading=!1,o.a.unset(this.form.errors,"cdSubmitButton"),this.form instanceof r.a&&this.form.updateValueAndValidity())})}submit(e){this.focusButton(),this.form instanceof r.k&&this.form.onSubmit(e),this.form.invalid?this.focusInvalid():(this.loading=!0,this.submitAction.emit())}focusButton(){this.elRef.nativeElement.offsetParent.querySelector(`button[type="${this.type}"]`).focus()}focusInvalid(){const e=this.elRef.nativeElement.offsetParent.querySelector("input.ng-invalid, select.ng-invalid");e&&e.focus()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-submit-button"]],inputs:{form:"form",type:"type",disabled:"disabled",btnClass:"btnClass"},outputs:{submitAction:"submitAction"},ngContentSelectors:h,decls:3,vars:4,consts:[[1,"btn","btn-accent","tc_submitButton",3,"type","ngClass","disabled","click"],[4,"ngIf"],[3,"ngClass"]],template:function(e,t){1&e&&(i.oc(),i.Sb(0,"button",0),i.gc("click",(function(e){return t.submit(e)})),i.nc(1),i.Mc(2,d,2,4,"span",1),i.Rb()),2&e&&(i.pc("type",t.type)("ngClass",t.btnClass)("disabled",t.loading||t.disabled),i.yb(2),i.pc("ngIf",t.loading))},directives:[c.a,l.p,l.r],styles:[""]}),e})()},sne2:function(e,t,n){"use strict";n.d(t,"c",(function(){return s})),n.d(t,"e",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return c})),n.d(t,"d",(function(){return l}));var i=n("AytR"),r=n("8Y7J");let s=(()=>{class e{}return e.organization="ceph",e.projectName="Ceph Dashboard",e.license="Free software (LGPL 2.1).",e.copyright="Copyright(c) "+i.a.year+" Ceph contributors.",e})();var o=function(e){return e.CREATE="create",e.EDIT="edit",e.UPDATE="update",e.REMOVE="remove",e.DELETE="delete",e.ADD="add",e.COPY="copy",e.CLONE="clone",e.RECREATE="recreate",e.EXPIRE="expire",e}({}),a=function(e){return e.CREATE="Create",e.DELETE="Delete",e.ADD="Add",e.REMOVE="Remove",e.EDIT="Edit",e.CANCEL="Cancel",e.COPY="Copy",e.CLONE="Clone",e.UPDATE="Update",e.EVICT="Evict",e.SHOW="Show",e.RECREATE="Recreate",e.EXPIRE="Expire",e}({});let c=(()=>{class e{constructor(){this.CREATE="Create",this.DELETE="Delete",this.ADD="Add",this.SET="Set",this.SUBMIT="Submit",this.REMOVE="Remove",this.UNSET="Unset",this.EDIT="Edit",this.UPDATE="Update",this.CANCEL="Cancel",this.PREVIEW="Preview",this.MOVE="Move",this.NEXT="Next",this.BACK="Back",this.CLONE="Clone",this.COPY="Copy",this.DEEP_SCRUB="Deep Scrub",this.DESTROY="Destroy",this.EVICT="Evict",this.FLATTEN="Flatten",this.MARK_DOWN="Mark Down",this.MARK_IN="Mark In",this.MARK_LOST="Mark Lost",this.MARK_OUT="Mark Out",this.PROTECT="Protect",this.PURGE="Purge",this.RENAME="Rename",this.RESTORE="Restore",this.REWEIGHT="Reweight",this.ROLLBACK="Rollback",this.SCRUB="Scrub",this.SHOW="Show",this.TRASH="Move to Trash",this.UNPROTECT="Unprotect",this.CHANGE="Change",this.FLAGS="Flags",this.ENTER_MAINTENANCE="Enter Maintenance",this.EXIT_MAINTENANCE="Exit Maintenance",this.RECREATE="Recreate",this.EXPIRE="Expire"}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=r.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),l=(()=>{class e{constructor(){this.CREATED="Created",this.DELETED="Deleted",this.ADDED="Added",this.REMOVED="Removed",this.EDITED="Edited",this.CANCELED="Canceled",this.PREVIEWED="Previewed",this.MOVED="Moved",this.CLONED="Cloned",this.COPIED="Copied",this.DEEP_SCRUBBED="Deep Scrubbed",this.DESTROYED="Destroyed",this.FLATTENED="Flattened",this.MARKED_DOWN="Marked Down",this.MARKED_IN="Marked In",this.MARKED_LOST="Marked Lost",this.MARKED_OUT="Marked Out",this.PROTECTED="Protected",this.PURGED="Purged",this.RENAMED="Renamed",this.RESTORED="Restored",this.REWEIGHTED="Reweighted",this.ROLLED_BACK="Rolled back",this.SCRUBBED="Scrubbed",this.SHOWED="Showed",this.TRASHED="Moved to Trash",this.UNPROTECTED="Unprotected",this.CHANGE="Change",this.RECREATED="Recreated",this.EXPIRED="Expired"}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=r.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},sp3z:function(e,t,n){!function(e){"use strict";e.defineLocale("lo",{months:"\u0ea1\u0eb1\u0e87\u0e81\u0ead\u0e99_\u0e81\u0eb8\u0ea1\u0e9e\u0eb2_\u0ea1\u0eb5\u0e99\u0eb2_\u0ec0\u0ea1\u0eaa\u0eb2_\u0e9e\u0eb6\u0e94\u0eaa\u0eb0\u0e9e\u0eb2_\u0ea1\u0eb4\u0e96\u0eb8\u0e99\u0eb2_\u0e81\u0ecd\u0ea5\u0eb0\u0e81\u0ebb\u0e94_\u0eaa\u0eb4\u0e87\u0eab\u0eb2_\u0e81\u0eb1\u0e99\u0e8d\u0eb2_\u0e95\u0eb8\u0ea5\u0eb2_\u0e9e\u0eb0\u0e88\u0eb4\u0e81_\u0e97\u0eb1\u0e99\u0ea7\u0eb2".split("_"),monthsShort:"\u0ea1\u0eb1\u0e87\u0e81\u0ead\u0e99_\u0e81\u0eb8\u0ea1\u0e9e\u0eb2_\u0ea1\u0eb5\u0e99\u0eb2_\u0ec0\u0ea1\u0eaa\u0eb2_\u0e9e\u0eb6\u0e94\u0eaa\u0eb0\u0e9e\u0eb2_\u0ea1\u0eb4\u0e96\u0eb8\u0e99\u0eb2_\u0e81\u0ecd\u0ea5\u0eb0\u0e81\u0ebb\u0e94_\u0eaa\u0eb4\u0e87\u0eab\u0eb2_\u0e81\u0eb1\u0e99\u0e8d\u0eb2_\u0e95\u0eb8\u0ea5\u0eb2_\u0e9e\u0eb0\u0e88\u0eb4\u0e81_\u0e97\u0eb1\u0e99\u0ea7\u0eb2".split("_"),weekdays:"\u0ead\u0eb2\u0e97\u0eb4\u0e94_\u0e88\u0eb1\u0e99_\u0ead\u0eb1\u0e87\u0e84\u0eb2\u0e99_\u0e9e\u0eb8\u0e94_\u0e9e\u0eb0\u0eab\u0eb1\u0e94_\u0eaa\u0eb8\u0e81_\u0ec0\u0eaa\u0ebb\u0eb2".split("_"),weekdaysShort:"\u0e97\u0eb4\u0e94_\u0e88\u0eb1\u0e99_\u0ead\u0eb1\u0e87\u0e84\u0eb2\u0e99_\u0e9e\u0eb8\u0e94_\u0e9e\u0eb0\u0eab\u0eb1\u0e94_\u0eaa\u0eb8\u0e81_\u0ec0\u0eaa\u0ebb\u0eb2".split("_"),weekdaysMin:"\u0e97_\u0e88_\u0ead\u0e84_\u0e9e_\u0e9e\u0eab_\u0eaa\u0e81_\u0eaa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"\u0ea7\u0eb1\u0e99dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0e95\u0ead\u0e99\u0ec0\u0e8a\u0ebb\u0ec9\u0eb2|\u0e95\u0ead\u0e99\u0ec1\u0ea5\u0e87/,isPM:function(e){return"\u0e95\u0ead\u0e99\u0ec1\u0ea5\u0e87"===e},meridiem:function(e,t,n){return e<12?"\u0e95\u0ead\u0e99\u0ec0\u0e8a\u0ebb\u0ec9\u0eb2":"\u0e95\u0ead\u0e99\u0ec1\u0ea5\u0e87"},calendar:{sameDay:"[\u0ea1\u0eb7\u0ec9\u0e99\u0eb5\u0ec9\u0ec0\u0ea7\u0ea5\u0eb2] LT",nextDay:"[\u0ea1\u0eb7\u0ec9\u0ead\u0eb7\u0ec8\u0e99\u0ec0\u0ea7\u0ea5\u0eb2] LT",nextWeek:"[\u0ea7\u0eb1\u0e99]dddd[\u0edc\u0ec9\u0eb2\u0ec0\u0ea7\u0ea5\u0eb2] LT",lastDay:"[\u0ea1\u0eb7\u0ec9\u0ea7\u0eb2\u0e99\u0e99\u0eb5\u0ec9\u0ec0\u0ea7\u0ea5\u0eb2] LT",lastWeek:"[\u0ea7\u0eb1\u0e99]dddd[\u0ec1\u0ea5\u0ec9\u0ea7\u0e99\u0eb5\u0ec9\u0ec0\u0ea7\u0ea5\u0eb2] LT",sameElse:"L"},relativeTime:{future:"\u0ead\u0eb5\u0e81 %s",past:"%s\u0e9c\u0ec8\u0eb2\u0e99\u0ea1\u0eb2",s:"\u0e9a\u0ecd\u0ec8\u0ec0\u0e97\u0ebb\u0ec8\u0eb2\u0ec3\u0e94\u0ea7\u0eb4\u0e99\u0eb2\u0e97\u0eb5",ss:"%d \u0ea7\u0eb4\u0e99\u0eb2\u0e97\u0eb5",m:"1 \u0e99\u0eb2\u0e97\u0eb5",mm:"%d \u0e99\u0eb2\u0e97\u0eb5",h:"1 \u0e8a\u0ebb\u0ec8\u0ea7\u0ec2\u0ea1\u0e87",hh:"%d \u0e8a\u0ebb\u0ec8\u0ea7\u0ec2\u0ea1\u0e87",d:"1 \u0ea1\u0eb7\u0ec9",dd:"%d \u0ea1\u0eb7\u0ec9",M:"1 \u0ec0\u0e94\u0eb7\u0ead\u0e99",MM:"%d \u0ec0\u0e94\u0eb7\u0ead\u0e99",y:"1 \u0e9b\u0eb5",yy:"%d \u0e9b\u0eb5"},dayOfMonthOrdinalParse:/(\u0e97\u0eb5\u0ec8)\d{1,2}/,ordinal:function(e){return"\u0e97\u0eb5\u0ec8"+e}})}(n("wd/R"))},spCT:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return r}));var i=function(e){return e[e.Loading=0]="Loading",e[e.Ready=1]="Ready",e[e.Error=2]="Error",e[e.None=3]="None",e}({});class r{constructor(){this.loading=i.Loading}loadingStart(){this.loading=i.Loading}loadingReady(){this.loading=i.Ready}loadingError(){this.loading=i.Error}loadingNone(){this.loading=i.None}}},"t+mt":function(e,t,n){!function(e){"use strict";e.defineLocale("en-sg",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n("wd/R"))},"t/zF":function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));class i{constructor(e,t){this.name=e,this.metadata=t}}},tGlX:function(e,t,n){!function(e){"use strict";function t(e,t,n,i){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?r[n][0]:r[n][1]}e.defineLocale("de",{months:"Januar_Februar_M\xe4rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._M\xe4rz_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},tT3J:function(e,t,n){!function(e){"use strict";e.defineLocale("tzm-latn",{months:"innayr_br\u02e4ayr\u02e4_mar\u02e4s\u02e4_ibrir_mayyw_ywnyw_ywlywz_\u0263w\u0161t_\u0161wtanbir_kt\u02e4wbr\u02e4_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_br\u02e4ayr\u02e4_mar\u02e4s\u02e4_ibrir_mayyw_ywnyw_ywlywz_\u0263w\u0161t_\u0161wtanbir_kt\u02e4wbr\u02e4_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asi\u1e0dyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asi\u1e0dyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asi\u1e0dyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minu\u1e0d",mm:"%d minu\u1e0d",h:"sa\u025ba",hh:"%d tassa\u025bin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}})}(n("wd/R"))},tUCv:function(e,t,n){!function(e){"use strict";e.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(e,t){return 12===e&&(e=0),"enjing"===t?e:"siyang"===t?e>=11?e:e+12:"sonten"===t||"ndalu"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"enjing":e<15?"siyang":e<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",ss:"%d detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}})}(n("wd/R"))},tbfe:function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),i=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],r=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-mx",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,i){return e?/-MMM-/.test(i)?n[e.month()]:t[e.month()]:t},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"domingo_lunes_martes_mi\xe9rcoles_jueves_viernes_s\xe1bado".split("_"),weekdaysShort:"dom._lun._mar._mi\xe9._jue._vie._s\xe1b.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_s\xe1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[ma\xf1ana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un d\xeda",dd:"%d d\xedas",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un a\xf1o",yy:"%d a\xf1os"},dayOfMonthOrdinalParse:/\d{1,2}\xba/,ordinal:"%d\xba",week:{dow:0,doy:4},invalidDate:"Fecha inv\xe1lida"})}(n("wd/R"))},tiKp:function(e,t,n){var i=n("2oRo"),r=n("VpIT"),s=n("UTVS"),o=n("kOOl"),a=n("STAE"),c=n("/b8u"),l=r("wks"),u=i.Symbol,d=c?u:u&&u.withoutSetter||o;e.exports=function(e){return s(l,e)||(l[e]=a&&s(u,e)?u[e]:d("Symbol."+e)),l[e]}},tycR:function(e,t,n){var i=n("A2ZE"),r=n("RK3t"),s=n("ewvW"),o=n("UMSQ"),a=n("ZfDv"),c=[].push,l=function(e){var t=1==e,n=2==e,l=3==e,u=4==e,d=6==e,h=5==e||d;return function(f,p,m,b){for(var g,_,y=s(f),v=r(y),w=i(p,m,3),S=o(v.length),M=0,k=b||a,x=t?k(f,S):n?k(f,0):void 0;S>M;M++)if((h||M in v)&&(_=w(g=v[M],M,y),e))if(t)x[M]=_;else if(_)switch(e){case 3:return!0;case 5:return g;case 6:return M;case 2:c.call(x,g)}else if(u)return!1;return d?-1:l||u?u:x}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6)}},tz6c:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var i=n("2Vo4"),r=n("pLZG"),s=n("lJxs"),o=n("SxV6"),a=n("+0ag"),c=n("mSOc"),l=n("8Y7J");let u=(()=>{class e{constructor(e,t){this.summaryservice=e,this.cephReleaseNamePipe=t,this.releaseDataSource=new i.a(null),this.releaseData$=this.releaseDataSource.asObservable(),this.summaryservice.subscribeOnce(e=>{const t=this.cephReleaseNamePipe.transform(e.version);this.releaseDataSource.next(t)})}urlGenerator(e,t="master"){const n=`https://docs.ceph.com/en/${"master"===t?"latest":t}/`,i="https://ceph.io/";return{iscsi:n+"mgr/dashboard/#enabling-iscsi-management",prometheus:n+"mgr/dashboard/#enabling-prometheus-alerting","nfs-ganesha":n+"mgr/dashboard/#configuring-nfs-ganesha-in-the-dashboard","rgw-nfs":n+"radosgw/nfs",rgw:n+"mgr/dashboard/#enabling-the-object-gateway-management-frontend",dashboard:n+"mgr/dashboard",grafana:n+"mgr/dashboard/#enabling-the-embedding-of-grafana-dashboards",orch:n+"mgr/orchestrator",pgs:i+"pgcalc",help:i+"help/",security:i+"security/",trademarks:i+"legal-page/trademarks/","dashboard-landing-page-status":n+"mgr/dashboard/#dashboard-landing-page-status","dashboard-landing-page-performance":n+"mgr/dashboard/#dashboard-landing-page-performance","dashboard-landing-page-capacity":n+"mgr/dashboard/#dashboard-landing-page-capacity"}[e]}subscribeOnce(e,t,n){return this.releaseData$.pipe(Object(r.a)(e=>!!e),Object(s.a)(t=>this.urlGenerator(e,t)),Object(o.a)()).subscribe(t,n)}}return e.\u0275fac=function(t){return new(t||e)(l.dc(c.a),l.dc(a.a))},e.\u0275prov=l.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},u3GI:function(e,t,n){!function(e){"use strict";function t(e,t,n,i){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?r[n][0]:r[n][1]}e.defineLocale("de-ch",{months:"Januar_Februar_M\xe4rz_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._M\xe4rz_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},uEye:function(e,t,n){!function(e){"use strict";e.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"sundag_m\xe5ndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"su._m\xe5._ty._on._to._fr._lau.".split("_"),weekdaysMin:"su_m\xe5_ty_on_to_fr_la".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I g\xe5r klokka] LT",lastWeek:"[F\xf8reg\xe5ande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",ss:"%d sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",w:"ei veke",ww:"%d veker",M:"ein m\xe5nad",MM:"%d m\xe5nader",y:"eit \xe5r",yy:"%d \xe5r"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},uIqm:function(e,t,n){"use strict";n.d(t,"a",(function(){return ve}));var i=n("8Y7J"),r=n("w9WL"),s=n("LvDl"),o=n.n(s),a=n("PqYM"),c=n("HDdC"),l=n("e2NH"),u=n("x38r"),d=n("oxzT");class h{constructor(e){this.errorConfig={resetData:!0,displayError:!0},this.error=e}}var f=n("vCyI"),p=n("SVse"),m=n("G0yt"),b=n("s7LF"),g=n("dgut"),_=n("iInd"),y=n("4DD9"),v=n("o4+5"),w=n("zWsK"),S=n("yT6U"),M=n("TJUb"),k=n("efK2");const x=["tableCellBoldTpl"],D=["sparklineTpl"],T=["routerLinkTpl"],C=["checkIconTpl"],O=["perSecondTpl"],L=["executingTpl"],R=["classAddingTpl"],E=["badgeTpl"],A=["mapTpl"],I=["truncateTpl"],P=["rowDetailsTpl"];function N(e,t){1&e&&(i.Sb(0,"div",20),i.Sb(1,"div",21),i.nc(2),i.Rb(),i.Rb())}function j(e,t){if(1&e){const e=i.Tb();i.Qb(0),i.Sb(1,"button",36),i.gc("click",(function(){i.Dc(e);const n=t.$implicit;return i.ic(3).onSelectFilter(n),!1})),i.Oc(2),i.Rb(),i.Pb()}if(2&e){const e=t.$implicit;i.yb(2),i.Pc(e.column.name)}}const F=function(e){return[e]};function Y(e,t){if(1&e&&i.Nb(0,"i",28),2&e){const e=i.ic(4);i.pc("ngClass",i.uc(1,F,e.icons.check))}}function z(e,t){if(1&e){const e=i.Tb();i.Qb(0),i.Sb(1,"button",36),i.gc("click",(function(){i.Dc(e);const n=t.$implicit,r=i.ic(3);return r.onChangeFilter(r.selectedFilter,n),!1})),i.Oc(2),i.Mc(3,Y,1,3,"i",37),i.Rb(),i.Pb()}if(2&e){const e=t.$implicit,n=i.ic(3);i.yb(2),i.Qc(" ",e.formatted," "),i.yb(1),i.pc("ngIf",void 0!==n.selectedFilter.value&&n.selectedFilter.value.raw===e.raw)}}const $=function(e,t){return[e,t]};function H(e,t){if(1&e&&(i.Sb(0,"div",32),i.Sb(1,"div",33),i.Sb(2,"button",34),i.Nb(3,"i",28),i.Oc(4),i.Rb(),i.Sb(5,"div",29),i.Mc(6,j,3,1,"ng-container",30),i.Rb(),i.Rb(),i.Sb(7,"div",35),i.Sb(8,"button",34),i.Oc(9),i.Rb(),i.Sb(10,"div",29),i.Mc(11,z,4,2,"ng-container",30),i.Rb(),i.Rb(),i.Rb()),2&e){const e=i.ic(2);i.yb(3),i.pc("ngClass",i.vc(7,$,e.icons.large,e.icons.filter)),i.yb(1),i.Qc(" ",e.selectedFilter.column.name," "),i.yb(2),i.pc("ngForOf",e.columnFilters),i.yb(2),i.Eb("disabled",0===e.selectedFilter.options.length),i.yb(1),i.Qc(" ",e.selectedFilter.value?e.selectedFilter.value.formatted:"Any"," "),i.yb(2),i.pc("ngForOf",e.selectedFilter.options)}}function W(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",38),i.Sb(1,"span",39),i.Sb(2,"span",40),i.Nb(3,"i",28),i.Rb(),i.Rb(),i.Sb(4,"input",41),i.gc("ngModelChange",(function(t){return i.Dc(e),i.ic(2).search=t}))("keyup",(function(){return i.Dc(e),i.ic(2).updateFilter()})),i.Rb(),i.Sb(5,"div",42),i.Sb(6,"button",43),i.gc("click",(function(){return i.Dc(e),i.ic(2).onClearSearch()})),i.Nb(7,"i"),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.ic(2);i.yb(3),i.pc("ngClass",i.uc(5,F,e.icons.search)),i.yb(1),i.pc("ngModel",e.search),i.yb(3),i.Bb("icon-prepend ",e.icons.destroy,"")}}function V(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",44),i.Sb(1,"input",45),i.gc("click",(function(t){return i.Dc(e),i.ic(2).setLimit(t)}))("keyup",(function(t){return i.Dc(e),i.ic(2).setLimit(t)}))("blur",(function(t){return i.Dc(e),i.ic(2).setLimit(t)})),i.Rb(),i.Rb()}if(2&e){const e=i.ic(2);i.yb(1),i.pc("value",e.userConfig.limit)}}function B(e,t){if(1&e){const e=i.Tb();i.Sb(0,"button",36),i.gc("click",(function(){i.Dc(e);const t=i.ic().$implicit;return i.ic(2).toggleColumn(t),!1})),i.Sb(1,"div",47),i.Nb(2,"input",48),i.Sb(3,"label",49),i.Oc(4),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.ic().$implicit;i.yb(2),i.pc("name",e.prop)("id",e.prop)("checked",!e.isHidden),i.yb(1),i.pc("for",e.prop),i.yb(1),i.Pc(e.name)}}function U(e,t){if(1&e&&(i.Qb(0),i.Mc(1,B,5,5,"button",46),i.Pb()),2&e){const e=t.$implicit;i.yb(1),i.pc("ngIf",""!==e.name)}}function G(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",50),i.Sb(1,"button",51),i.gc("click",(function(){return i.Dc(e),i.ic(2).refreshBtn()})),i.Nb(2,"i",28),i.Rb(),i.Rb()}if(2&e){const e=i.ic(2);i.yb(1),i.Ab("btn btn-"+e.status.type),i.pc("ngbTooltip",e.status.msg),i.yb(1),i.Eb("fa-spin",e.updating||e.loadingIndicator),i.pc("ngClass",i.vc(6,$,e.icons.large,e.icons.refresh))}}function q(e,t){if(1&e&&(i.Sb(0,"div",20),i.Sb(1,"div",21),i.nc(2,1),i.Rb(),i.Mc(3,H,12,10,"div",22),i.Mc(4,W,8,7,"div",23),i.Mc(5,V,2,1,"div",24),i.Sb(6,"div",25),i.Sb(7,"div",26),i.Sb(8,"button",27),i.Nb(9,"i",28),i.Rb(),i.Sb(10,"div",29),i.Mc(11,U,2,1,"ng-container",30),i.Rb(),i.Rb(),i.Rb(),i.Mc(12,G,3,9,"div",31),i.Rb()),2&e){const e=i.ic();i.yb(3),i.pc("ngIf",0!==e.columnFilters.length),i.yb(1),i.pc("ngIf",e.searchField),i.yb(1),i.pc("ngIf",e.limit),i.yb(4),i.pc("ngClass",i.vc(6,$,e.icons.large,e.icons.table)),i.yb(2),i.pc("ngForOf",e.columns),i.yb(1),i.pc("ngIf",e.fetchData.observers.length>0)}}function J(e,t){if(1&e){const e=i.Tb();i.Sb(0,"span",56),i.Sb(1,"span",57),i.Oc(2),i.Rb(),i.Sb(3,"a",58),i.gc("click",(function(){i.Dc(e);const t=i.ic().$implicit;return i.ic(2).onChangeFilter(t),!1})),i.Nb(4,"i",59),i.Rb(),i.Rb()}if(2&e){const e=i.ic().$implicit,t=i.ic(2);i.yb(2),i.Rc("",e.column.name,": ",e.value.formatted,""),i.yb(2),i.pc("ngClass",i.uc(3,F,t.icons.destroy))}}function Q(e,t){if(1&e&&(i.Sb(0,"span"),i.Mc(1,J,5,5,"span",55),i.Rb()),2&e){const e=t.$implicit;i.yb(1),i.pc("ngIf",e.value)}}function K(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",20),i.Sb(1,"div",52),i.Mc(2,Q,2,1,"span",30),i.Sb(3,"a",53),i.gc("click",(function(){return i.Dc(e),i.ic().onClearFilters(),!1})),i.Qb(4),i.Wb(5,54),i.Pb(),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.ic();i.yb(2),i.pc("ngForOf",e.columnFilters)}}function Z(e,t){1&e&&i.nc(0,2)}function X(e,t){if(1&e&&(i.Sb(0,"span"),i.Oc(1),i.Qb(2),i.Wb(3,64),i.Pb(),i.Oc(4," / "),i.Rb()),2&e){const e=i.ic().selectedCount;i.yb(1),i.Qc(" ",e," ")}}function ee(e,t){if(1&e&&(i.Sb(0,"span"),i.Oc(1),i.Qb(2),i.Wb(3,65),i.Pb(),i.Oc(4," / "),i.Rb()),2&e){const e=i.ic().rowCount;i.yb(1),i.Qc(" ",e," ")}}function te(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",60),i.Mc(1,X,5,1,"span",61),i.Mc(2,ee,5,1,"span",61),i.Sb(3,"span"),i.Oc(4),i.Qb(5),i.Wb(6,62),i.Pb(),i.Rb(),i.Rb(),i.Sb(7,"datatable-pager",63),i.gc("change",(function(t){return i.Dc(e),i.ic(),i.Ac(5).onFooterPage(t)})),i.Rb()}if(2&e){const e=t.rowCount,n=t.pageSize,r=t.curPage,s=i.ic();i.yb(1),i.pc("ngIf",s.selectionType),i.yb(1),i.pc("ngIf",e!=(null==s.data?null:s.data.length)),i.yb(2),i.Qc(" ",(null==s.data?null:s.data.length)||0," "),i.yb(3),i.pc("pagerLeftArrowIcon",s.paginationClasses.pagerLeftArrow)("pagerRightArrowIcon",s.paginationClasses.pagerRightArrow)("pagerPreviousIcon",s.paginationClasses.pagerPrevious)("pagerNextIcon",s.paginationClasses.pagerNext)("page",r)("size",n)("count",e)("hidden",!(e/n>1))}}function ne(e,t){if(1&e&&(i.Sb(0,"strong"),i.Oc(1),i.Rb()),2&e){const e=t.value;i.yb(1),i.Pc(e)}}function ie(e,t){if(1&e&&i.Nb(0,"cd-sparkline",66),2&e){const e=t.row;i.pc("data",t.value)("isBinary",e.cdIsBinary)}}function re(e,t){if(1&e&&(i.Sb(0,"a",67),i.Oc(1),i.Rb()),2&e){const e=t.row,n=t.value;i.pc("routerLink",i.uc(3,F,e.cdLink))("queryParams",e.cdParams),i.yb(1),i.Pc(n)}}function se(e,t){if(1&e&&(i.Nb(0,"i",68),i.jc(1,"boolean")),2&e){const e=t.value,n=i.ic();i.pc("ngClass",i.uc(4,F,n.icons.check))("hidden",!i.kc(1,2,e))}}function oe(e,t){1&e&&(i.Oc(0),i.jc(1,"dimless")),2&e&&i.Qc(" ",i.kc(1,1,t.value)," /s\n")}function ae(e,t){if(1&e&&i.Nb(0,"i",28),2&e){const e=i.ic(2);i.pc("ngClass",i.vc(1,$,e.icons.spinner,e.icons.spin))}}function ce(e,t){if(1&e&&(i.Sb(0,"span",28),i.Oc(1),i.Rb()),2&e){const e=i.ic(),t=e.column,n=e.row;i.pc("ngClass",null!=t&&null!=t.customTemplateConfig&&t.customTemplateConfig.executingClass?t.customTemplateConfig.executingClass:"text-muted italic"),i.yb(1),i.Qc("(",n.cdExecuting,")")}}function le(e,t){if(1&e&&(i.Mc(0,ae,1,4,"i",37),i.Sb(1,"span",28),i.Oc(2),i.Rb(),i.Mc(3,ce,2,2,"span",37)),2&e){const e=t.column,n=t.row,r=t.value;i.pc("ngIf",n.cdExecuting),i.yb(1),i.pc("ngClass",null==e||null==e.customTemplateConfig?null:e.customTemplateConfig.valueClass),i.yb(1),i.Qc(" ",r," "),i.yb(1),i.pc("ngIf",n.cdExecuting)}}function ue(e,t){if(1&e&&(i.Sb(0,"span"),i.jc(1,"pipeFunction"),i.Oc(2),i.Rb()),2&e){const e=t.value,n=i.ic();i.Ab(i.mc(1,4,e,n.useCustomClass,n)),i.yb(2),i.Pc(e)}}function de(e,t){if(1&e&&(i.Sb(0,"span",70),i.Oc(1),i.Rb()),2&e){const e=i.ic().$implicit,t=i.ic().column;i.pc("ngClass",null!=t&&null!=t.customTemplateConfig&&t.customTemplateConfig.map&&null!=t&&null!=t.customTemplateConfig&&null!=t.customTemplateConfig.map[e]&&t.customTemplateConfig.map[e].class?t.customTemplateConfig.map[e].class:null!=t&&null!=t.customTemplateConfig&&t.customTemplateConfig.class?t.customTemplateConfig.class:"badge-primary"),i.yb(1),i.Qc(" ",null!=t&&null!=t.customTemplateConfig&&t.customTemplateConfig.map&&null!=t&&null!=t.customTemplateConfig&&null!=t.customTemplateConfig.map[e]&&t.customTemplateConfig.map[e].value?t.customTemplateConfig.map[e].value:null!=t&&null!=t.customTemplateConfig&&t.customTemplateConfig.prefix?t.customTemplateConfig.prefix+e:e," ")}}function he(e,t){1&e&&(i.Sb(0,"span"),i.Oc(1,"\xa0"),i.Rb())}function fe(e,t){if(1&e&&(i.Sb(0,"span"),i.Mc(1,de,2,2,"span",69),i.Mc(2,he,2,0,"span",61),i.Rb()),2&e){const e=t.$implicit,n=t.last,r=i.ic().column;i.yb(1),i.pc("ngIf",null!=r&&null!=r.customTemplateConfig&&r.customTemplateConfig.map&&null!=r&&null!=r.customTemplateConfig&&null!=r.customTemplateConfig.map[e]&&r.customTemplateConfig.map[e].value?r.customTemplateConfig.map[e].value:null!=r&&null!=r.customTemplateConfig&&r.customTemplateConfig.prefix?r.customTemplateConfig.prefix+e:e),i.yb(1),i.pc("ngIf",!n)}}function pe(e,t){1&e&&(i.Mc(0,fe,3,2,"span",30),i.jc(1,"array")),2&e&&i.pc("ngForOf",i.kc(1,1,t.value))}function me(e,t){if(1&e&&(i.Sb(0,"span"),i.Oc(1),i.jc(2,"map"),i.Rb()),2&e){const e=t.column,n=t.value;i.yb(1),i.Pc(i.lc(2,1,n,null==e?null:e.customTemplateConfig))}}function be(e,t){if(1&e&&(i.Sb(0,"span",71),i.Oc(1),i.jc(2,"truncate"),i.Rb()),2&e){const e=t.column,n=t.value;i.pc("title",n),i.yb(1),i.Pc(i.mc(2,2,n,null==e||null==e.customTemplateConfig?null:e.customTemplateConfig.length,null==e||null==e.customTemplateConfig?null:e.customTemplateConfig.omission))}}function ge(e,t){if(1&e){const e=i.Tb();i.Sb(0,"a",72),i.Yb(1,73),i.gc("click",(function(n){i.Dc(e);const r=t.row,s=t.expanded;return i.ic().toggleExpandRow(r,s,n)})),i.Rb()}if(2&e){const e=t.expanded;i.Eb("expand-collapse-icon-right",!e)("expand-collapse-icon-down",e)}}const _e=[[["",8,"only-table-actions"]],[["",8,"table-actions"]],[["","cdTableDetail",""]]],ye=[".only-table-actions",".table-actions","[cdTableDetail]"];let ve=(()=>{class e{constructor(e,t){this.ngZone=e,this.cdRef=t,this.columnMode="flex",this.onlyActionHeader=!1,this.toolHeader=!0,this.searchField=!0,this.header=!0,this.footer=!0,this.limit=10,this.hasDetails=!1,this.autoReload=5e3,this.identifier="id",this.forceIdentifier=!1,this.selectionType=void 0,this.updateSelectionOnRefresh="onChange",this.updateExpandedOnRefresh="onChange",this.autoSave=!0,this.searchableObjects=!1,this.extraFilterableColumns=[],this.status=new l.a,this.fetchData=new i.o,this.updateSelection=new i.o,this.setExpandedRow=new i.o,this.columnFiltersChanged=new i.o,this.selection=new f.a,this.expanded=void 0,this.icons=d.a,this.cellTemplates={},this.search="",this.rows=[],this.loadingIndicator=!0,this.paginationClasses={pagerLeftArrow:d.a.leftArrowDouble,pagerRightArrow:d.a.rightArrowDouble,pagerPrevious:d.a.leftArrow,pagerNext:d.a.rightArrow},this.userConfig={},this.localStorage=window.localStorage,this.updating=!1,this.columnFilters=[]}get columnFiltered(){return o.a.some(this.columnFilters,e=>void 0!==e.value)}static prepareSearch(e){return(e=e.toLowerCase().replace(/,/g,"")).match(/['"][^'"]+['"]/)&&(e=e.replace(/['"][^'"]+['"]/g,e=>e.replace(/(['"])([^'"]+)(['"])/g,"$2").replace(/ /g,"+"))),e.split(" ").filter(e=>e)}ngOnInit(){if(this.localColumns=o.a.clone(this.columns),this.table.element.addEventListener("mouseenter",e=>e.stopPropagation()),this._addTemplates(),!this.sorts){const e=-1!==o.a.findIndex(this.localColumns,["prop",this.identifier]);this.sorts=this.createSortingDefinition(e?this.identifier:this.localColumns[0].prop+""),e||this.forceIdentifier||(this.identifier=this.localColumns[0].prop+"")}this.initUserConfig(),this.localColumns.forEach(e=>{e.cellTransformation&&(e.cellTemplate=this.cellTemplates[e.cellTransformation]),e.flexGrow||(e.flexGrow=e.prop+""===this.identifier?1:2),e.resizeable||(e.resizeable=!1)}),this.initExpandCollapseColumn(),this.initCheckboxColumn(),this.filterHiddenColumns(),this.initColumnFilters(),this.updateColumnFilterOptions(),this.updateSelection.emit(new f.a),this.fetchData.observers.length>0&&(this.loadingIndicator=!0),o.a.isInteger(this.autoReload)&&this.autoReload>0?this.ngZone.runOutsideAngular(()=>{this.reloadSubscriber=Object(a.a)(0,this.autoReload).subscribe(()=>{this.ngZone.run(()=>this.reloadData())})}):this.autoReload?this.useData():this.reloadData()}initUserConfig(){this.autoSave&&(this.tableName=this._calculateUniqueTableName(this.localColumns),this._loadUserConfig(),this._initUserConfigAutoSave()),this.userConfig.limit||(this.userConfig.limit=this.limit),this.userConfig.sorts||(this.userConfig.sorts=this.sorts),this.userConfig.columns?this.localColumns.forEach((e,t)=>{e.isHidden=this.userConfig.columns[t].isHidden}):this.updateUserColumns()}_calculateUniqueTableName(e){const t=e=>{if(!o.a.isString(e))return 0;let t=0;for(let n=0;n<e.length;n++)t+=e.charCodeAt(n)*n;return t};return e.reduce((e,n,i)=>(t(n.prop)+t(n.name))*(i+1)+e,0).toString()}_loadUserConfig(){const e=this.localStorage.getItem(this.tableName);e&&(this.userConfig=JSON.parse(e))}_initUserConfigAutoSave(){const e=new c.a(this._initUserConfigProxy.bind(this));this.saveSubscriber=e.subscribe(this._saveUserConfig.bind(this))}_initUserConfigProxy(e){this.userConfig=new Proxy(this.userConfig,{set:(t,n,i)=>(t[n]=i,e.next(t),!0)})}_saveUserConfig(e){this.localStorage.setItem(this.tableName,JSON.stringify(e))}updateUserColumns(){this.userConfig.columns=this.localColumns.map(e=>({prop:e.prop,name:e.name,isHidden:!!e.isHidden}))}initCheckboxColumn(){"multiClick"===this.selectionType&&this.localColumns.unshift({prop:void 0,resizeable:!1,sortable:!1,draggable:!1,checkboxable:!0,canAutoResize:!1,cellClass:"cd-datatable-checkbox",width:30})}initExpandCollapseColumn(){this.hasDetails&&this.localColumns.unshift({prop:void 0,resizeable:!1,sortable:!1,draggable:!1,isHidden:!1,canAutoResize:!1,cellClass:"cd-datatable-expand-collapse",width:40,cellTemplate:this.rowDetailsTpl})}filterHiddenColumns(){this.tableColumns=this.localColumns.filter(e=>!e.isHidden)}initColumnFilters(){let e=o.a.filter(this.localColumns,{filterable:!0});e=[...e,...this.extraFilterableColumns],this.columnFilters=e.map(e=>({column:e,options:[],value:e.filterInitValue?this.createColumnFilterOption(e.filterInitValue,e.pipe):void 0})),this.selectedFilter=o.a.first(this.columnFilters)}createColumnFilterOption(e,t){return{raw:o.a.toString(e),formatted:t?t.transform(e):o.a.toString(e)}}updateColumnFilterOptions(){this.columnFilters.forEach(e=>{let t=[];if(o.a.isUndefined(e.column.filterOptions)){const n=o.a.filter(o.a.map(this.data,e.column.prop),e=>o.a.isString(e)&&""!==e||o.a.isBoolean(e)||o.a.isFinite(e)||o.a.isDate(e));t=o.a.sortedUniq(n.sort())}else t=e.column.filterOptions;const n=t.map(t=>this.createColumnFilterOption(t,e.column.pipe));e.value&&o.a.isUndefined(o.a.find(n,{raw:e.value.raw}))&&(e.value=void 0),e.options=n})}onSelectFilter(e){this.selectedFilter=e}onChangeFilter(e,t){e.value=o.a.isEqual(e.value,t)?void 0:t,this.updateFilter()}doColumnFiltering(){const e=[];let t=[...this.data],n=[];return this.columnFilters.forEach(i=>{if(void 0===i.value)return;e.push({name:i.column.name,prop:i.column.prop,value:i.value});const s=o.a.partition(t,e=>{const t=Object(r.j)(i.column.prop)(e,i.column.prop);return o.a.isUndefined(i.column.filterPredicate)?""+t===i.value.raw:i.column.filterPredicate(e,i.value.raw)});t=s[0],n=[...n,...s[1]]}),this.columnFiltersChanged.emit({filters:e,data:t,dataOut:n}),o.a.forEach(this.selection.selected,e=>{void 0===o.a.find(t,{[this.identifier]:e[this.identifier]})&&(this.selection=new f.a,this.onSelect(this.selection))}),t}ngOnDestroy(){this.reloadSubscriber&&this.reloadSubscriber.unsubscribe(),this.saveSubscriber&&this.saveSubscriber.unsubscribe()}ngAfterContentChecked(){this.table&&this.table.element.clientWidth!==this.currentWidth&&(this.currentWidth=this.table.element.clientWidth,this.table.recalculate(),o.a.get(this.table,"cd").markForCheck())}_addTemplates(){this.cellTemplates.bold=this.tableCellBoldTpl,this.cellTemplates.checkIcon=this.checkIconTpl,this.cellTemplates.sparkline=this.sparklineTpl,this.cellTemplates.routerLink=this.routerLinkTpl,this.cellTemplates.perSecond=this.perSecondTpl,this.cellTemplates.executing=this.executingTpl,this.cellTemplates.classAdding=this.classAddingTpl,this.cellTemplates.badge=this.badgeTpl,this.cellTemplates.map=this.mapTpl,this.cellTemplates.truncate=this.truncateTpl}useCustomClass(e){if(!this.customCss)throw new Error("Custom classes are not set!");const t=Object.keys(this.customCss),n=Object.values(this.customCss).map((n,i)=>(o.a.isFunction(n)&&n(e)||n===e)&&t[i]).filter(e=>e).join(" ");return o.a.isEmpty(n)?void 0:n}ngOnChanges(e){e.data&&e.data.currentValue&&this.useData()}setLimit(e){const t=parseInt(e.target.value,10);t>0&&(this.userConfig.limit=t)}reloadData(){if(!this.updating){this.status=new l.a;const e=new h(()=>{e.errorConfig.displayError&&(this.status=new l.a("danger","Failed to load data.")),e.errorConfig.resetData&&(this.data=[]),this.useData()});this.fetchData.emit(e),this.updating=!0}}refreshBtn(){this.loadingIndicator=!0,this.reloadData()}rowIdentity(){return e=>{const t=e[this.identifier];if(o.a.isUndefined(t))throw new Error(`Wrong identifier "${this.identifier}" -> "${t}"`);return t}}useData(){this.data&&(this.updateColumnFilterOptions(),this.updateFilter(),this.reset(),this.updateSelected(),this.updateExpanded())}reset(){this.loadingIndicator=!1,this.updating=!1}updateSelected(){if("never"===this.updateSelectionOnRefresh)return;const e=[];this.selection.selected.forEach(t=>{for(const n of this.data)t[this.identifier]===n[this.identifier]&&e.push(n)}),"onChange"===this.updateSelectionOnRefresh&&o.a.isEqual(this.selection.selected,e)||(this.selection.selected=e,this.onSelect(this.selection))}updateExpanded(){if(o.a.isUndefined(this.expanded)||"never"===this.updateExpandedOnRefresh)return;const e=this.expanded[this.identifier],t=o.a.find(this.data,t=>e===t[this.identifier]);"onChange"===this.updateExpandedOnRefresh&&o.a.isEqual(this.expanded,t)||(this.expanded=t,this.setExpandedRow.emit(t))}onSelect(e){o.a.has(e,"selected")&&(this.selection.selected=e.selected),this.updateSelection.emit(o.a.clone(this.selection))}toggleColumn(e){const t=e.prop,n=!e.isHidden;n&&1===this.tableColumns.length?e.isHidden=!0:(o.a.find(this.localColumns,e=>e.prop===t).isHidden=n,this.updateColumns())}updateColumns(){this.updateUserColumns(),this.filterHiddenColumns();const e=this.userConfig.sorts[0].prop;o.a.find(this.tableColumns,t=>t.prop===e)||(this.userConfig.sorts=this.createSortingDefinition(this.tableColumns[0].prop)),this.table.recalculate(),this.cdRef.detectChanges()}createSortingDefinition(e){return[{prop:e,dir:r.i.asc}]}changeSorting({sorts:e}){this.userConfig.sorts=e}onClearSearch(){this.search="",this.updateFilter()}onClearFilters(){this.columnFilters.forEach(e=>{e.value=void 0}),this.selectedFilter=o.a.first(this.columnFilters),this.updateFilter()}updateFilter(){let t=0!==this.columnFilters.length?this.doColumnFiltering():this.data;if(this.search.length>0&&t){const n=this.localColumns.filter(e=>e.cellTransformation!==u.a.sparkline);t=this.subSearch(t,e.prepareSearch(this.search),n),this.table.offset=0}this.rows=t}subSearch(e,t,n){if(0===t.length||0===e.length)return e;const i=t.pop().replace(/\+/g," ").split(":"),r=[...n];return 2===i.length&&(n=r.filter(e=>-1!==e.name.toLowerCase().indexOf(i[0]))),e=this.basicDataSearch(o.a.last(i),e,n),this.subSearch(e,t,r)}basicDataSearch(e,t,n){return 0===e.length?t:t.filter(t=>n.filter(n=>{let i=o.a.get(t,n.prop);if(o.a.isUndefined(n.pipe)||(i=n.pipe.transform(i)),o.a.isUndefined(i)||o.a.isNull(i))return!1;if(o.a.isArray(i)?i=i.join(" "):(o.a.isNumber(i)||o.a.isBoolean(i))&&(i=i.toString()),o.a.isObjectLike(i)){if(!this.searchableObjects)return!1;i=JSON.stringify(i)}return-1!==i.toLowerCase().indexOf(e)}).length>0)}getRowClass(){return()=>({clickable:!o.a.isUndefined(this.selectionType)})}toggleExpandRow(e,t,n){n.stopPropagation(),t?(this.expanded=void 0,this.setExpandedRow.emit(void 0)):(this.expanded=e,this.table.rowDetail.collapseAllRows(),this.setExpandedRow.emit(e)),this.table.rowDetail.toggleExpandRow(e)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.A),i.Mb(i.h))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-table"]],viewQuery:function(e,t){var n;1&e&&(i.Jc(r.d,!0),i.Jc(x,!0),i.Jc(D,!0),i.Jc(T,!0),i.Jc(C,!0),i.Jc(O,!0),i.Jc(L,!0),i.Jc(R,!0),i.Jc(E,!0),i.Jc(A,!0),i.Jc(I,!0),i.Jc(P,!0)),2&e&&(i.zc(n=i.hc())&&(t.table=n.first),i.zc(n=i.hc())&&(t.tableCellBoldTpl=n.first),i.zc(n=i.hc())&&(t.sparklineTpl=n.first),i.zc(n=i.hc())&&(t.routerLinkTpl=n.first),i.zc(n=i.hc())&&(t.checkIconTpl=n.first),i.zc(n=i.hc())&&(t.perSecondTpl=n.first),i.zc(n=i.hc())&&(t.executingTpl=n.first),i.zc(n=i.hc())&&(t.classAddingTpl=n.first),i.zc(n=i.hc())&&(t.badgeTpl=n.first),i.zc(n=i.hc())&&(t.mapTpl=n.first),i.zc(n=i.hc())&&(t.truncateTpl=n.first),i.zc(n=i.hc())&&(t.rowDetailsTpl=n.first))},inputs:{data:"data",columns:"columns",sorts:"sorts",columnMode:"columnMode",onlyActionHeader:"onlyActionHeader",toolHeader:"toolHeader",searchField:"searchField",header:"header",footer:"footer",limit:"limit",hasDetails:"hasDetails",autoReload:"autoReload",identifier:"identifier",forceIdentifier:"forceIdentifier",selectionType:"selectionType",updateSelectionOnRefresh:"updateSelectionOnRefresh",updateExpandedOnRefresh:"updateExpandedOnRefresh",autoSave:"autoSave",searchableObjects:"searchableObjects",customCss:"customCss",extraFilterableColumns:"extraFilterableColumns",status:"status"},outputs:{fetchData:"fetchData",updateSelection:"updateSelection",setExpandedRow:"setExpandedRow",columnFiltersChanged:"columnFiltersChanged"},features:[i.wb],ngContentSelectors:ye,decls:33,vars:17,consts:function(){return[[1,"dataTables_wrapper"],["class","dataTables_header clearfix",4,"ngIf"],[1,"bootstrap","cd-datatable",3,"cssClasses","selectionType","selected","sorts","columns","columnMode","rows","rowClass","headerHeight","footerHeight","limit","loadingIndicator","rowIdentity","rowHeight","select","sort"],["table",""],["rowHeight","auto"],["detailRow",""],["ngx-datatable-row-detail-template",""],["ngx-datatable-footer-template",""],["tableCellBoldTpl",""],["sparklineTpl",""],["routerLinkTpl",""],["checkIconTpl",""],["perSecondTpl",""],["executingTpl",""],["classAddingTpl",""],["badgeTpl",""],["mapTpl",""],["truncateTpl",""],["ngx-datatable-cell-template",""],["rowDetailsTpl",""],[1,"dataTables_header","clearfix"],[1,"cd-datatable-actions"],["class","btn-group widget-toolbar",4,"ngIf"],["class","input-group search",4,"ngIf"],["class","input-group dataTables_paginate",4,"ngIf"],[1,"widget-toolbar"],["ngbDropdown","","autoClose","outside",1,"tc_menuitem"],["ngbDropdownToggle","",1,"btn","btn-light","tc_columnBtn"],[3,"ngClass"],["ngbDropdownMenu",""],[4,"ngFor","ngForOf"],["class","widget-toolbar tc_refreshBtn",4,"ngIf"],[1,"btn-group","widget-toolbar"],["ngbDropdown","","placement","bottom-right",1,"tc_filter_name"],["ngbDropdownToggle","",1,"btn","btn-light"],["ngbDropdown","","placement","bottom-right",1,"tc_filter_option"],["ngbDropdownItem","",3,"click"],[3,"ngClass",4,"ngIf"],[1,"input-group","search"],[1,"input-group-prepend"],[1,"input-group-text"],["type","text",1,"form-control",3,"ngModel","ngModelChange","keyup"],[1,"input-group-append"],["type","button",1,"btn","btn-light",3,"click"],[1,"input-group","dataTables_paginate"],["type","number","min","1","max","9999",1,"form-control",3,"value","click","keyup","blur"],["ngbDropdownItem","",3,"click",4,"ngIf"],[1,"custom-control","custom-checkbox","py-0"],["type","checkbox",1,"custom-control-input",3,"name","id","checked"],[1,"custom-control-label",3,"for"],[1,"widget-toolbar","tc_refreshBtn"],["type","button",3,"ngbTooltip","click"],[1,"filter-chips"],["href","",1,"tc_clearSelections",3,"click"],"Clear filters",["class","badge badge-info mr-2",4,"ngIf"],[1,"badge","badge-info","mr-2"],[1,"mr-2"],[1,"badge-remove",3,"click"],["aria-hidden","true",3,"ngClass"],[1,"page-count"],[4,"ngIf"],"total",[3,"pagerLeftArrowIcon","pagerRightArrowIcon","pagerPreviousIcon","pagerNextIcon","page","size","count","hidden","change"],"selected","found",[3,"data","isBinary"],[3,"routerLink","queryParams"],[3,"ngClass","hidden"],["class","badge",3,"ngClass",4,"ngIf"],[1,"badge",3,"ngClass"],["data-toggle","tooltip",3,"title"],["href","javascript:void(0)",1,"expand-collapse-icon","tc_expand-collapse",3,"click",6,"title"],["title","Expand/Collapse Row"]]},template:function(e,t){1&e&&(i.oc(_e),i.Sb(0,"div",0),i.Mc(1,N,3,0,"div",1),i.Mc(2,q,13,9,"div",1),i.Mc(3,K,6,1,"div",1),i.Sb(4,"ngx-datatable",2,3),i.gc("select",(function(e){return t.onSelect(e)}))("sort",(function(e){return t.changeSorting(e)})),i.Sb(6,"ngx-datatable-row-detail",4,5),i.Mc(8,Z,1,0,"ng-template",6),i.Rb(),i.Sb(9,"ngx-datatable-footer"),i.Mc(10,te,8,11,"ng-template",7),i.Rb(),i.Rb(),i.Rb(),i.Mc(11,ne,2,1,"ng-template",null,8,i.Nc),i.Mc(13,ie,1,2,"ng-template",null,9,i.Nc),i.Mc(15,re,2,5,"ng-template",null,10,i.Nc),i.Mc(17,se,2,6,"ng-template",null,11,i.Nc),i.Mc(19,oe,2,3,"ng-template",null,12,i.Nc),i.Mc(21,le,4,4,"ng-template",null,13,i.Nc),i.Mc(23,ue,3,8,"ng-template",null,14,i.Nc),i.Mc(25,pe,2,3,"ng-template",null,15,i.Nc),i.Mc(27,me,3,4,"ng-template",null,16,i.Nc),i.Mc(29,be,3,6,"ng-template",null,17,i.Nc),i.Mc(31,ge,2,4,"ng-template",18,19,i.Nc)),2&e&&(i.yb(1),i.pc("ngIf",t.onlyActionHeader),i.yb(1),i.pc("ngIf",t.toolHeader),i.yb(1),i.pc("ngIf",t.toolHeader&&t.columnFiltered),i.yb(1),i.pc("cssClasses",t.paginationClasses)("selectionType",t.selectionType)("selected",t.selection.selected)("sorts",t.userConfig.sorts)("columns",t.tableColumns)("columnMode",t.columnMode)("rows",t.rows)("rowClass",t.getRowClass())("headerHeight",t.header?"auto":0)("footerHeight",t.footer?"auto":0)("limit",t.userConfig.limit>0?t.userConfig.limit:void 0)("loadingIndicator",t.loadingIndicator)("rowIdentity",t.rowIdentity())("rowHeight","auto"))},directives:[p.r,r.d,r.f,r.g,r.e,r.b,r.a,m.i,m.m,p.p,m.k,p.q,m.j,b.d,b.q,b.t,m.D,r.c,g.a,_.h],pipes:[y.a,v.a,w.b,S.a,M.a,k.a],styles:['@charset "UTF-8";.dataTables_wrapper[_ngcontent-%COMP%]{margin-bottom:25px}.dataTables_wrapper[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{border-left:1px solid rgba(0,0,0,.09);display:inline-block;height:30px;margin-left:5px;padding-left:5px;vertical-align:middle}.dataTables_wrapper[_ngcontent-%COMP%] .widget-toolbar[_ngcontent-%COMP%]{border-left:1px solid rgba(0,0,0,.09);float:right;padding:0 8px}.dataTables_wrapper[_ngcontent-%COMP%] .widget-toolbar[_ngcontent-%COMP%] .form-check[_ngcontent-%COMP%]{padding-left:0}.dataTables_wrapper[_ngcontent-%COMP%] .dataTables_length[_ngcontent-%COMP%] > input[_ngcontent-%COMP%]{line-height:25px;text-align:right}.dataTables_header[_ngcontent-%COMP%]{background-color:#f8f9fa;border:1px solid #ced4da;border-bottom:0;padding:5px;position:relative}.dataTables_header[_ngcontent-%COMP%] .cd-datatable-actions[_ngcontent-%COMP%]{float:left}.dataTables_header[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%]{padding-left:8px}.dataTables_header[_ngcontent-%COMP%] .input-group[_ngcontent-%COMP%]{border-left:1px solid rgba(0,0,0,.09);float:right;max-width:250px;padding-left:8px;padding-right:8px;width:40%}.dataTables_header[_ngcontent-%COMP%] .input-group[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]{height:30px}.dataTables_header[_ngcontent-%COMP%] .input-group.dataTables_paginate[_ngcontent-%COMP%]{min-width:85px;padding-right:8px;width:8%}.dataTables_header[_ngcontent-%COMP%] .filter-chips[_ngcontent-%COMP%]{float:right;padding:0 8px}.dataTables_header[_ngcontent-%COMP%] .filter-chips[_ngcontent-%COMP%] .badge-remove[_ngcontent-%COMP%]{color:#fff} cd-table .cd-datatable{border:1px solid #ced4da;margin-bottom:0;max-width:none!important} cd-table .cd-datatable .progress-linear{display:block;height:5px;margin:0;padding:0;position:relative;width:100%} cd-table .cd-datatable .progress-linear .container{background-color:#2b99a8} cd-table .cd-datatable .progress-linear .container .bar{background-color:#2b99a8;height:100%;left:0;overflow:hidden;position:absolute;width:100%} cd-table .cd-datatable .progress-linear .container .bar:before{animation:progress-loading 3s linear infinite;background-color:#2b99a8;content:"";display:block;height:100%;left:-200px;position:absolute;width:200px} cd-table .cd-datatable .datatable-header{background-clip:padding-box;background-color:#f8f9fa;background-image:linear-gradient(180deg,#f8f9fa 0,#e9ecef);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#fffafafa",endColorstr="#ffededed",GradientType=0)} cd-table .cd-datatable .datatable-header .sort-asc, cd-table .cd-datatable .datatable-header .sort-desc{color:#2b99a8} cd-table .cd-datatable .datatable-header .datatable-header-cell{border:0;border-bottom:1px solid #ced4da;border-left:1px solid #ced4da;padding:5px;font-weight:700;text-align:left} cd-table .cd-datatable .datatable-header .datatable-header-cell .datatable-header-cell-label:after{font-family:ForkAwesome;font-weight:400;height:9px;left:10px;line-height:12px;position:relative;vertical-align:initial;width:12px} cd-table .cd-datatable .datatable-header .datatable-header-cell.sortable .datatable-header-cell-label:after{content:" \uf0dc"} cd-table .cd-datatable .datatable-header .datatable-header-cell.sortable.sort-active.sort-asc .datatable-header-cell-label:after{content:" \uf160"} cd-table .cd-datatable .datatable-header .datatable-header-cell.sortable.sort-active.sort-desc .datatable-header-cell-label:after{content:" \uf161"} cd-table .cd-datatable .datatable-header .datatable-header-cell:first-child{border-left:0} cd-table .cd-datatable .datatable-body{margin-bottom:-6px} cd-table .cd-datatable .datatable-body .empty-row{background-color:#c8ecf1;font-style:italic;font-weight:700;padding-bottom:5px;padding-top:5px;text-align:center} cd-table .cd-datatable .datatable-body .datatable-body-row.clickable:hover .datatable-row-group{background-color:#c8ecf1;transition-duration:.3s;transition-property:background;transition-timing-function:linear} cd-table .cd-datatable .datatable-body .datatable-body-row.datatable-row-even{background-color:#fff} cd-table .cd-datatable .datatable-body .datatable-body-row.datatable-row-odd{background-color:#f8f9fa} cd-table .cd-datatable .datatable-body .datatable-body-row.active, cd-table .cd-datatable .datatable-body .datatable-body-row.active:hover{background-color:#9fdee6} cd-table .cd-datatable .datatable-body .datatable-body-row .datatable-body-cell{border:0;border-bottom:1px solid #ced4da;border-left:1px solid #ced4da;padding:5px} cd-table .cd-datatable .datatable-body .datatable-body-row .datatable-body-cell:first-child{border-left:0} cd-table .cd-datatable .datatable-body .datatable-body-row .datatable-body-cell .datatable-body-cell-label{display:block;height:100%} cd-table .cd-datatable .datatable-body .datatable-row-detail{border-bottom:2px solid #ced4da;overflow-y:visible!important;padding:20px} cd-table .cd-datatable .datatable-body .expand-collapse-icon{display:block;height:100%;text-align:center} cd-table .cd-datatable .datatable-body .expand-collapse-icon:hover{text-decoration:none} cd-table .cd-datatable .datatable-body .expand-collapse-icon-right:before{color:#212529;font-family:ForkAwesome,sans-serif;font-size:1rem;line-height:1;content:"\uf105"} cd-table .cd-datatable .datatable-body .expand-collapse-icon-down:before{color:#212529;font-family:ForkAwesome,sans-serif;font-size:1rem;line-height:1;content:"\uf107"} cd-table .cd-datatable .datatable-footer .page-count, cd-table .cd-datatable .datatable-footer .selected-count{font-style:italic;min-height:2rem;padding-left:.3rem;padding-top:.3rem} cd-table .cd-datatable .cd-datatable-checkbox{text-align:center}@keyframes progress-loading{0%{left:-200px;width:15%}50%{width:30%}70%{width:70%}80%{left:50%}95%{left:120%}to{left:100%}}'],changeDetection:0}),e})()},uXwI:function(e,t,n){!function(e){"use strict";var t={ss:"sekundes_sekund\u0113m_sekunde_sekundes".split("_"),m:"min\u016btes_min\u016bt\u0113m_min\u016bte_min\u016btes".split("_"),mm:"min\u016btes_min\u016bt\u0113m_min\u016bte_min\u016btes".split("_"),h:"stundas_stund\u0101m_stunda_stundas".split("_"),hh:"stundas_stund\u0101m_stunda_stundas".split("_"),d:"dienas_dien\u0101m_diena_dienas".split("_"),dd:"dienas_dien\u0101m_diena_dienas".split("_"),M:"m\u0113ne\u0161a_m\u0113ne\u0161iem_m\u0113nesis_m\u0113ne\u0161i".split("_"),MM:"m\u0113ne\u0161a_m\u0113ne\u0161iem_m\u0113nesis_m\u0113ne\u0161i".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function n(e,t,n){return n?t%10==1&&t%100!=11?e[2]:e[3]:t%10==1&&t%100!=11?e[0]:e[1]}function i(e,i,r){return e+" "+n(t[r],e,i)}function r(e,i,r){return n(t[r],e,i)}e.defineLocale("lv",{months:"janv\u0101ris_febru\u0101ris_marts_apr\u012blis_maijs_j\u016bnijs_j\u016blijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_j\u016bn_j\u016bl_aug_sep_okt_nov_dec".split("_"),weekdays:"sv\u0113tdiena_pirmdiena_otrdiena_tre\u0161diena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[\u0160odien pulksten] LT",nextDay:"[R\u012bt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pag\u0101ju\u0161\u0101] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"p\u0113c %s",past:"pirms %s",s:function(e,t){return t?"da\u017eas sekundes":"da\u017e\u0101m sekund\u0113m"},ss:i,m:r,mm:i,h:r,hh:i,d:r,dd:i,M:r,MM:i,y:r,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},uYzU:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("8Y7J");let r=(()=>{class e{transform(e){switch(e){case"user:rbd":return"user:rbd (tcmu-runner)";default:return e}}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"iscsiBackstore",type:e,pure:!0}),e})()},ufoC:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var i=function(e){return e.auth="Login",e.cephfs="CephFS",e.rbd="RBD",e.pool="Pool",e.osd="OSD",e.role="Role",e.user="User",e}({}),r=n("jVDg"),s=n("8Y7J");class o{constructor(e,t,n){this.running=e,this.failure=t,this.success=n}}class a{constructor(e,t,n){this.operation=e,this.involves=t,this.errors=n||(()=>({}))}failure(e){return "Failed to " + this.operation.failure + " " + this.involves(e) + ""}running(e){return`${this.operation.running} ${this.involves(e)}`}success(e){return`${this.operation.success} ${this.involves(e)}`}}let c=(()=>{class e{constructor(){this.defaultMessage=this.newTaskMessage(new o("Executing","execute","Executed"),e=>e&&(i[e.component]||e.component)||"unknown task",()=>({})),this.commonOperations={create:new o("Creating","create","Created"),update:new o("Updating","update","Updated"),delete:new o("Deleting","delete","Deleted"),add:new o("Adding","add","Added"),remove:new o("Removing","remove","Removed"),import:new o("Importing","import","Imported")},this.rbd={default:e=>"RBD '" + e.image_spec + "'",create:e=>{const t=new r.a(e.pool_name,e.namespace,e.image_name).toString();return "RBD '" + t + "'"},child:e=>{const t=new r.a(e.child_pool_name,e.child_namespace,e.child_image_name).toString();return "RBD '" + t + "'"},destination:e=>{const t=new r.a(e.dest_pool_name,e.dest_namespace,e.dest_image_name).toString();return "RBD '" + t + "'"},snapshot:e=>"RBD snapshot '" + e.image_spec + "@" + e.snapshot_name + "'"},this.rbd_mirroring={site_name:()=>"mirroring site name",bootstrap:()=>"bootstrap token",pool:e=>"mirror mode for pool '" + e.pool_name + "'",pool_peer:e=>"mirror peer for pool '" + e.pool_name + "'"},this.grafana={update_dashboards:()=>"all dashboards"},this.messages={"host/create":this.newTaskMessage(this.commonOperations.create,e=>this.host(e)),"host/delete":this.newTaskMessage(this.commonOperations.delete,e=>this.host(e)),"host/identify_device":this.newTaskMessage(new o("Identifying","identify","Identified"),e=>"device '" + e.device + "' on host '" + e.hostname + "'"),"osd/create":this.newTaskMessage(this.commonOperations.create,e=>"OSDs (DriveGroups: " + e.tracking_id + ")"),"osd/delete":this.newTaskMessage(this.commonOperations.delete,e=>this.osd(e)),"pool/create":this.newTaskMessage(this.commonOperations.create,e=>this.pool(e),e=>({17:"Name is already used by " + this.pool(e) + "."})),"pool/edit":this.newTaskMessage(this.commonOperations.update,e=>this.pool(e),e=>({17:"Name is already used by " + this.pool(e) + "."})),"pool/delete":this.newTaskMessage(this.commonOperations.delete,e=>this.pool(e)),"ecp/create":this.newTaskMessage(this.commonOperations.create,e=>this.ecp(e),e=>({17:"Name is already used by " + this.ecp(e) + "."})),"ecp/delete":this.newTaskMessage(this.commonOperations.delete,e=>this.ecp(e)),"crushRule/create":this.newTaskMessage(this.commonOperations.create,e=>this.crushRule(e),e=>({17:"Name is already used by " + this.crushRule(e) + "."})),"crushRule/delete":this.newTaskMessage(this.commonOperations.delete,e=>this.crushRule(e)),"rbd/create":this.newTaskMessage(this.commonOperations.create,this.rbd.create,e=>({17:"Name is already used by " + this.rbd.create(e) + "."})),"rbd/edit":this.newTaskMessage(this.commonOperations.update,this.rbd.default,e=>({17:"Name is already used by " + this.rbd.default(e) + "."})),"rbd/delete":this.newTaskMessage(this.commonOperations.delete,this.rbd.default,e=>({16:"" + this.rbd.default(e) + " is busy.",39:"" + this.rbd.default(e) + " contains snapshots."})),"rbd/clone":this.newTaskMessage(new o("Cloning","clone","Cloned"),this.rbd.child,e=>({17:"Name is already used by " + this.rbd.child(e) + ".",22:"Snapshot of " + this.rbd.child(e) + " must be protected."})),"rbd/copy":this.newTaskMessage(new o("Copying","copy","Copied"),this.rbd.destination,e=>({17:"Name is already used by " + this.rbd.destination(e) + "."})),"rbd/flatten":this.newTaskMessage(new o("Flattening","flatten","Flattened"),this.rbd.default),"rbd/snap/create":this.newTaskMessage(this.commonOperations.create,this.rbd.snapshot,e=>({17:"Name is already used by " + this.rbd.snapshot(e) + "."})),"rbd/snap/edit":this.newTaskMessage(this.commonOperations.update,this.rbd.snapshot,e=>({16:"Cannot unprotect " + this.rbd.snapshot(e) + " because it contains child images."})),"rbd/snap/delete":this.newTaskMessage(this.commonOperations.delete,this.rbd.snapshot,e=>({16:"Cannot delete " + this.rbd.snapshot(e) + " because it's protected."})),"rbd/snap/rollback":this.newTaskMessage(new o("Rolling back","rollback","Rolled back"),this.rbd.snapshot),"rbd/trash/move":this.newTaskMessage(new o("Moving","move","Moved"),e=>"image '" + e.image_spec + "' to trash",()=>({2:"Could not find image."})),"rbd/trash/restore":this.newTaskMessage(new o("Restoring","restore","Restored"),e=>"image '" + e.image_id_spec + "' into '" + e.new_image_name + "'",e=>({17:"Image name '" + e.new_image_name + "' is already in use."})),"rbd/trash/remove":this.newTaskMessage(new o("Deleting","delete","Deleted"),e=>"image '" + e.image_id_spec + "'"),"rbd/trash/purge":this.newTaskMessage(new o("Purging","purge","Purged"),e=>{let t="all pools";return e.pool_name&&(t=`'${e.pool_name}'`),"images from " + t + ""}),"rbd/mirroring/site_name/edit":this.newTaskMessage(this.commonOperations.update,this.rbd_mirroring.site_name,()=>({})),"rbd/mirroring/bootstrap/create":this.newTaskMessage(this.commonOperations.create,this.rbd_mirroring.bootstrap,()=>({})),"rbd/mirroring/bootstrap/import":this.newTaskMessage(this.commonOperations.import,this.rbd_mirroring.bootstrap,()=>({})),"rbd/mirroring/pool/edit":this.newTaskMessage(this.commonOperations.update,this.rbd_mirroring.pool,()=>({16:"Cannot disable mirroring because it contains a peer."})),"rbd/mirroring/peer/add":this.newTaskMessage(this.commonOperations.create,this.rbd_mirroring.pool_peer,()=>({})),"rbd/mirroring/peer/edit":this.newTaskMessage(this.commonOperations.update,this.rbd_mirroring.pool_peer,()=>({})),"rbd/mirroring/peer/delete":this.newTaskMessage(this.commonOperations.delete,this.rbd_mirroring.pool_peer,()=>({})),"iscsi/target/create":this.newTaskMessage(this.commonOperations.create,e=>this.iscsiTarget(e)),"iscsi/target/edit":this.newTaskMessage(this.commonOperations.update,e=>this.iscsiTarget(e)),"iscsi/target/delete":this.newTaskMessage(this.commonOperations.delete,e=>this.iscsiTarget(e)),"nfs/create":this.newTaskMessage(this.commonOperations.create,e=>this.nfs(e)),"nfs/edit":this.newTaskMessage(this.commonOperations.update,e=>this.nfs(e)),"nfs/delete":this.newTaskMessage(this.commonOperations.delete,e=>this.nfs(e)),"grafana/dashboards/update":this.newTaskMessage(this.commonOperations.update,this.grafana.update_dashboards,()=>({})),"service/create":this.newTaskMessage(this.commonOperations.create,e=>this.service(e)),"service/delete":this.newTaskMessage(this.commonOperations.delete,e=>this.service(e))}}newTaskMessage(e,t,n){return new a(e,t,n)}host(e){return "host '" + e.hostname + "'"}osd(e){return "OSD '" + e.svc_id + "'"}pool(e){return "pool '" + e.pool_name + "'"}ecp(e){return "erasure code profile '" + e.name + "'"}crushRule(e){return "crush rule '" + e.name + "'"}iscsiTarget(e){return "target '" + e.target_iqn + "'"}nfs(e){return "NFS '" + e.cluster_id + ":" + (e.export_id ? e.export_id : e.path) + "'"}service(e){return "Service '" + e.service_name + "'"}_getTaskTitle(e){return e.name&&e.name.startsWith("progress/")?this.newTaskMessage(new o(e.name.replace("progress/",""),"",e.name.replace("progress/","")),e=>""):this.messages[e.name]||this.defaultMessage}getSuccessTitle(e){return this._getTaskTitle(e).success(e.metadata)}getErrorMessage(e){return this._getTaskTitle(e).errors(e.metadata)[e.exception.code]||e.exception.detail}getErrorTitle(e){return this._getTaskTitle(e).failure(e.metadata)}getRunningTitle(e){return this._getTaskTitle(e).running(e.metadata)}getRunningText(e){return this._getTaskTitle(e).operation.running}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=s.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})()},uy83:function(e,t,n){var i=n("0Dky");e.exports=!i((function(){return Object.isExtensible(Object.preventExtensions({}))}))},uyHG:function(e,t){var n,i="__lodash_hash_undefined__",r=/^\[object .+?Constructor\]$/,s="object"==typeof global&&global&&global.Object===Object&&global,o="object"==typeof self&&self&&self.Object===Object&&self,a=s||o||Function("return this")(),c=Array.prototype,l=Function.prototype,u=Object.prototype,d=a["__core-js_shared__"],h=(n=/[^.]+$/.exec(d&&d.keys&&d.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",f=l.toString,p=u.hasOwnProperty,m=u.toString,b=RegExp("^"+f.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),g=c.splice,_=x(a,"Map"),y=x(Object,"create");function v(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function S(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function M(e,t){for(var n,i,r=e.length;r--;)if((n=e[r][0])===(i=t)||n!=n&&i!=i)return r;return-1}function k(e,t){var n,i,r=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof t?"string":"hash"]:r.map}function x(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!T(e)||(t=e,h&&h in t))&&(function(e){var t=T(e)?m.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}(e)?b:r).test(function(e){if(null!=e){try{return f.call(e)}catch(t){}try{return e+""}catch(t){}}return""}(e));var t}(n)?n:void 0}function D(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,r=t?t.apply(this,i):i[0],s=n.cache;if(s.has(r))return s.get(r);var o=e.apply(this,i);return n.cache=s.set(r,o),o};return n.cache=new(D.Cache||S),n}function T(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}v.prototype.clear=function(){this.__data__=y?y(null):{}},v.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},v.prototype.get=function(e){var t=this.__data__;if(y){var n=t[e];return n===i?void 0:n}return p.call(t,e)?t[e]:void 0},v.prototype.has=function(e){var t=this.__data__;return y?void 0!==t[e]:p.call(t,e)},v.prototype.set=function(e,t){return this.__data__[e]=y&&void 0===t?i:t,this},w.prototype.clear=function(){this.__data__=[]},w.prototype.delete=function(e){var t=this.__data__,n=M(t,e);return!(n<0||(n==t.length-1?t.pop():g.call(t,n,1),0))},w.prototype.get=function(e){var t=this.__data__,n=M(t,e);return n<0?void 0:t[n][1]},w.prototype.has=function(e){return M(this.__data__,e)>-1},w.prototype.set=function(e,t){var n=this.__data__,i=M(n,e);return i<0?n.push([e,t]):n[i][1]=t,this},S.prototype.clear=function(){this.__data__={hash:new v,map:new(_||w),string:new v}},S.prototype.delete=function(e){return k(this,e).delete(e)},S.prototype.get=function(e){return k(this,e).get(e)},S.prototype.has=function(e){return k(this,e).has(e)},S.prototype.set=function(e,t){return k(this,e).set(e,t),this},D.Cache=S,e.exports=D},vCyI:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));class i{constructor(e){this._selected=[],e&&(this._selected=e),this.update()}update(){this.hasSelection=this._selected.length>0,this.hasSingleSelection=1===this._selected.length,this.hasMultiSelection=this._selected.length>1}set selected(e){this._selected=e,this.update()}get selected(){return this._selected}add(e){this._selected.push(e),this.update()}first(){return this.hasSelection?this._selected[0]:null}}},vkgz:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("7o/Q"),r=n("KqfI"),s=n("n6bG");function o(e,t,n){return function(i){return i.lift(new a(e,t,n))}}class a{constructor(e,t,n){this.nextOrObserver=e,this.error=t,this.complete=n}call(e,t){return t.subscribe(new c(e,this.nextOrObserver,this.error,this.complete))}}class c extends i.a{constructor(e,t,n,i){super(e),this._tapNext=r.a,this._tapError=r.a,this._tapComplete=r.a,this._tapError=n||r.a,this._tapComplete=i||r.a,Object(s.a)(t)?(this._context=this,this._tapNext=t):t&&(this._context=t,this._tapNext=t.next||r.a,this._tapError=t.error||r.a,this._tapComplete=t.complete||r.a)}_next(e){try{this._tapNext.call(this._context,e)}catch(t){return void this.destination.error(t)}this.destination.next(e)}_error(e){try{this._tapError.call(this._context,e)}catch(e){return void this.destination.error(e)}this.destination.error(e)}_complete(){try{this._tapComplete.call(this._context)}catch(e){return void this.destination.error(e)}return this.destination.complete()}}},w1tV:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var i=n("XNiG"),r=n("HDdC"),s=n("7o/Q"),o=n("quSY");function a(){return function(e){return e.lift(new c(e))}}class c{constructor(e){this.connectable=e}call(e,t){const{connectable:n}=this;n._refCount++;const i=new l(e,n),r=t.subscribe(i);return i.closed||(i.connection=n.connect()),r}}class l extends s.a{constructor(e,t){super(e),this.connectable=t}_unsubscribe(){const{connectable:e}=this;if(!e)return void(this.connection=null);this.connectable=null;const t=e._refCount;if(t<=0)return void(this.connection=null);if(e._refCount=t-1,t>1)return void(this.connection=null);const{connection:n}=this,i=e._connection;this.connection=null,!i||n&&i!==n||i.unsubscribe()}}class u extends r.a{constructor(e,t){super(),this.source=e,this.subjectFactory=t,this._refCount=0,this._isComplete=!1}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){const e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject}connect(){let e=this._connection;return e||(this._isComplete=!1,e=this._connection=new o.a,e.add(this.source.subscribe(new h(this.getSubject(),this))),e.closed&&(this._connection=null,e=o.a.EMPTY)),e}refCount(){return a()(this)}}const d=(()=>{const e=u.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:e._subscribe},_isComplete:{value:e._isComplete,writable:!0},getSubject:{value:e.getSubject},connect:{value:e.connect},refCount:{value:e.refCount}}})();class h extends i.b{constructor(e,t){super(e),this.connectable=t}_error(e){this._unsubscribe(),super._error(e)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const e=this.connectable;if(e){this.connectable=null;const t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}}}function f(){return new i.a}function p(){return e=>{return a()((t=f,function(e){let n;n="function"==typeof t?t:function(){return t};const i=Object.create(e,d);return i.source=e,i.subjectFactory=n,i})(e));var t}}},w9WL:function(e,t,n){"use strict";n.d(t,"a",(function(){return Pe})),n.d(t,"b",(function(){return ue})),n.d(t,"c",(function(){return ft})),n.d(t,"d",(function(){return ut})),n.d(t,"e",(function(){return ze})),n.d(t,"f",(function(){return Ye})),n.d(t,"g",(function(){return Fe})),n.d(t,"h",(function(){return kt})),n.d(t,"i",(function(){return ct})),n.d(t,"j",(function(){return ve}));var i=n("8Y7J"),r=n("SVse"),s=n("XNiG"),o=n("xgIS"),a=n("2Vo4"),c=n("1G5W"),l=n("mrSG");const u=["*"];function d(e,t){1&e&&i.Nb(0,"datatable-progress")}function h(e,t){if(1&e&&i.Nb(0,"datatable-summary-row",9),2&e){const e=i.ic(2);i.pc("rowHeight",e.summaryHeight)("offsetX",e.offsetX)("innerWidth",e.innerWidth)("rows",e.rows)("columns",e.columns)}}function f(e,t){if(1&e){const e=i.Tb();i.Sb(0,"datatable-body-row",13),i.gc("treeAction",(function(){i.Dc(e);const t=i.ic().$implicit;return i.ic(2).onTreeAction(t)}))("activate",(function(t){i.Dc(e);const n=i.ic().index,r=i.ic(2);return i.Ac(2).onActivate(t,r.indexes.first+n)})),i.Rb()}if(2&e){const e=i.ic().$implicit,t=i.ic(2),n=i.Ac(2);i.pc("isSelected",n.getRowSelected(e))("innerWidth",t.innerWidth)("offsetX",t.offsetX)("columns",t.columns)("rowHeight",t.getRowHeight(e))("row",e)("rowIndex",t.getRowIndex(e))("expanded",t.getRowExpanded(e))("rowClass",t.rowClass)("displayCheck",t.displayCheck)("treeStatus",e&&e.treeStatus)}}function p(e,t){if(1&e){const e=i.Tb();i.Sb(0,"datatable-body-row",15),i.gc("activate",(function(n){i.Dc(e);const r=t.index;return i.ic(4),i.Ac(2).onActivate(n,r)})),i.Rb()}if(2&e){const e=t.$implicit,n=i.ic(2).$implicit,r=i.ic(2),s=i.Ac(2);i.pc("isSelected",s.getRowSelected(e))("innerWidth",r.innerWidth)("offsetX",r.offsetX)("columns",r.columns)("rowHeight",r.getRowHeight(e))("row",e)("group",n.value)("rowIndex",r.getRowIndex(e))("expanded",r.getRowExpanded(e))("rowClass",r.rowClass)}}function m(e,t){if(1&e&&i.Mc(0,p,1,10,"datatable-body-row",14),2&e){const e=i.ic().$implicit,t=i.ic(2);i.pc("ngForOf",e.value)("ngForTrackBy",t.rowTrackingFn)}}function b(e,t){if(1&e){const e=i.Tb();i.Sb(0,"datatable-row-wrapper",10),i.gc("rowContextmenu",(function(t){return i.Dc(e),i.ic(2).rowContextmenu.emit(t)})),i.Mc(1,f,1,11,"datatable-body-row",11),i.Mc(2,m,1,2,"ng-template",null,12,i.Nc),i.Rb()}if(2&e){const e=t.$implicit,n=t.index,r=i.Ac(3),s=i.ic(2);i.pc("groupedRows",s.groupedRows)("innerWidth",s.innerWidth)("ngStyle",s.getRowsStyles(e))("rowDetail",s.rowDetail)("groupHeader",s.groupHeader)("offsetX",s.offsetX)("detailRowHeight",s.getDetailRowHeight(e&&e[n],n))("row",e)("expanded",s.getRowExpanded(e))("rowIndex",s.getRowIndex(e&&e[n])),i.yb(1),i.pc("ngIf",!s.groupedRows)("ngIfElse",r)}}function g(e,t){if(1&e&&i.Nb(0,"datatable-summary-row",16),2&e){const e=i.ic(2);i.pc("ngStyle",e.getBottomSummaryRowStyles())("rowHeight",e.summaryHeight)("offsetX",e.offsetX)("innerWidth",e.innerWidth)("rows",e.rows)("columns",e.columns)}}function _(e,t){if(1&e){const e=i.Tb();i.Sb(0,"datatable-scroller",5),i.gc("scroll",(function(t){return i.Dc(e),i.ic().onBodyScroll(t)})),i.Mc(1,h,1,5,"datatable-summary-row",6),i.Mc(2,b,4,12,"datatable-row-wrapper",7),i.Mc(3,g,1,6,"datatable-summary-row",8),i.Rb()}if(2&e){const e=i.ic();i.pc("scrollbarV",e.scrollbarV)("scrollbarH",e.scrollbarH)("scrollHeight",e.scrollHeight)("scrollWidth",null==e.columnGroupWidths?null:e.columnGroupWidths.total),i.yb(1),i.pc("ngIf",e.summaryRow&&"top"===e.summaryPosition),i.yb(1),i.pc("ngForOf",e.temp)("ngForTrackBy",e.rowTrackingFn),i.yb(1),i.pc("ngIf",e.summaryRow&&"bottom"===e.summaryPosition)}}function y(e,t){if(1&e&&i.Nb(0,"div",17),2&e){const e=i.ic();i.pc("innerHTML",e.emptyMessage,i.Ec)}}function v(e,t){if(1&e){const e=i.Tb();i.Sb(0,"datatable-header-cell",4),i.gc("resize",(function(n){i.Dc(e);const r=t.$implicit;return i.ic(2).onColumnResized(n,r)}))("longPressStart",(function(t){return i.Dc(e),i.ic(2).onLongPressStart(t)}))("longPressEnd",(function(t){return i.Dc(e),i.ic(2).onLongPressEnd(t)}))("sort",(function(t){return i.Dc(e),i.ic(2).onSort(t)}))("select",(function(t){return i.Dc(e),i.ic(2).select.emit(t)}))("columnContextmenu",(function(t){return i.Dc(e),i.ic(2).columnContextmenu.emit(t)})),i.Rb()}if(2&e){const e=t.$implicit,n=i.ic(2);i.pc("resizeEnabled",e.resizeable)("pressModel",e)("pressEnabled",n.reorderable&&e.draggable)("dragX",n.reorderable&&e.draggable&&e.dragging)("dragY",!1)("dragModel",e)("dragEventTarget",n.dragEventTarget)("headerHeight",n.headerHeight)("isTarget",e.isTarget)("targetMarkerTemplate",n.targetMarkerTemplate)("targetMarkerContext",e.targetMarkerContext)("column",e)("sortType",n.sortType)("sorts",n.sorts)("selectionType",n.selectionType)("sortAscendingIcon",n.sortAscendingIcon)("sortDescendingIcon",n.sortDescendingIcon)("sortUnsetIcon",n.sortUnsetIcon)("allRowsSelected",n.allRowsSelected)}}function w(e,t){if(1&e&&(i.Sb(0,"div",2),i.Mc(1,v,1,19,"datatable-header-cell",3),i.Rb()),2&e){const e=t.$implicit,n=i.ic();i.Ab("datatable-row-"+e.type),i.pc("ngStyle",n._styleByGroup[e.type]),i.yb(1),i.pc("ngForOf",e.columns)("ngForTrackBy",n.columnTrackingFn)}}function S(e,t){if(1&e){const e=i.Tb();i.Sb(0,"datatable-header",4),i.gc("sort",(function(t){return i.Dc(e),i.ic().onColumnSort(t)}))("resize",(function(t){return i.Dc(e),i.ic().onColumnResize(t)}))("reorder",(function(t){return i.Dc(e),i.ic().onColumnReorder(t)}))("select",(function(t){return i.Dc(e),i.ic().onHeaderSelect(t)}))("columnContextmenu",(function(t){return i.Dc(e),i.ic().onColumnContextmenu(t)})),i.jc(1,"async"),i.Rb()}if(2&e){const e=i.ic();i.pc("sorts",e.sorts)("sortType",e.sortType)("scrollbarH",e.scrollbarH)("innerWidth",e._innerWidth)("offsetX",i.kc(1,15,e._offsetX))("dealsWithGroup",void 0!==e.groupedRows)("columns",e._internalColumns)("headerHeight",e.headerHeight)("reorderable",e.reorderable)("targetMarkerTemplate",e.targetMarkerTemplate)("sortAscendingIcon",e.cssClasses.sortAscending)("sortDescendingIcon",e.cssClasses.sortDescending)("sortUnsetIcon",e.cssClasses.sortUnset)("allRowsSelected",e.allRowsSelected)("selectionType",e.selectionType)}}function M(e,t){if(1&e){const e=i.Tb();i.Sb(0,"datatable-footer",5),i.gc("page",(function(t){return i.Dc(e),i.ic().onFooterPage(t)})),i.Rb()}if(2&e){const e=i.ic();i.pc("rowCount",e.rowCount)("pageSize",e.pageSize)("offset",e.offset)("footerHeight",e.footerHeight)("footerTemplate",e.footer)("totalMessage",e.messages.totalMessage)("pagerLeftArrowIcon",e.cssClasses.pagerLeftArrow)("pagerRightArrowIcon",e.cssClasses.pagerRightArrow)("pagerPreviousIcon",e.cssClasses.pagerPrevious)("selectedCount",e.selected.length)("selectedMessage",!!e.selectionType&&e.messages.selectedMessage)("pagerNextIcon",e.cssClasses.pagerNext)}}function k(e,t){}function x(e,t){if(1&e&&i.Mc(0,k,0,0,"ng-template",5),2&e){const e=i.ic();i.pc("ngTemplateOutlet",e.targetMarkerTemplate)("ngTemplateOutletContext",e.targetMarkerContext)}}function D(e,t){if(1&e){const e=i.Tb();i.Sb(0,"label",6),i.Sb(1,"input",7),i.gc("change",(function(){i.Dc(e);const t=i.ic();return t.select.emit(!t.allRowsSelected)})),i.Rb(),i.Rb()}if(2&e){const e=i.ic();i.yb(1),i.pc("checked",e.allRowsSelected)}}function T(e,t){if(1&e){const e=i.Tb();i.Sb(0,"span",8),i.Sb(1,"span",9),i.gc("click",(function(){return i.Dc(e),i.ic().onSort()})),i.Rb(),i.Rb()}if(2&e){const e=i.ic();i.yb(1),i.pc("innerHTML",e.name,i.Ec)}}function C(e,t){}function O(e,t){if(1&e&&i.Mc(0,C,0,0,"ng-template",5),2&e){const e=i.ic();i.pc("ngTemplateOutlet",e.column.headerTemplate)("ngTemplateOutletContext",e.cellContext)}}function L(e,t){}const R=function(e,t,n,i,r){return{rowCount:e,pageSize:t,selectedCount:n,curPage:i,offset:r}};function E(e,t){if(1&e&&i.Mc(0,L,0,0,"ng-template",4),2&e){const e=i.ic();i.pc("ngTemplateOutlet",e.footerTemplate.template)("ngTemplateOutletContext",i.yc(2,R,e.rowCount,e.pageSize,e.selectedCount,e.curPage,e.offset))}}function A(e,t){if(1&e&&(i.Sb(0,"span"),i.Oc(1),i.Rb()),2&e){const e=i.ic(2);i.yb(1),i.Rc(" ",null==e.selectedCount?null:e.selectedCount.toLocaleString()," ",e.selectedMessage," / ")}}function I(e,t){if(1&e&&(i.Sb(0,"div",5),i.Mc(1,A,2,2,"span",1),i.Oc(2),i.Rb()),2&e){const e=i.ic();i.yb(1),i.pc("ngIf",e.selectedMessage),i.yb(1),i.Rc(" ",null==e.rowCount?null:e.rowCount.toLocaleString()," ",e.totalMessage," ")}}function P(e,t){if(1&e){const e=i.Tb();i.Sb(0,"datatable-pager",6),i.gc("change",(function(t){return i.Dc(e),i.ic().page.emit(t)})),i.Rb()}if(2&e){const e=i.ic();i.pc("pagerLeftArrowIcon",e.pagerLeftArrowIcon)("pagerRightArrowIcon",e.pagerRightArrowIcon)("pagerPreviousIcon",e.pagerPreviousIcon)("pagerNextIcon",e.pagerNextIcon)("page",e.curPage)("size",e.pageSize)("count",e.rowCount)("hidden",!e.isVisible)}}const N=function(e){return{"selected-count":e}};function j(e,t){if(1&e){const e=i.Tb();i.Sb(0,"li",6),i.Sb(1,"a",7),i.gc("click",(function(){i.Dc(e);const n=t.$implicit;return i.ic().selectPage(n.number)})),i.Oc(2),i.Rb(),i.Rb()}if(2&e){const e=t.$implicit,n=i.ic();i.Eb("active",e.number===n.page),i.zb("aria-label","page "+e.number),i.yb(2),i.Qc(" ",e.text," ")}}function F(e,t){if(1&e){const e=i.Tb();i.Sb(0,"datatable-body-cell",3),i.gc("activate",(function(n){i.Dc(e);const r=t.index;return i.ic(2).onActivate(n,r)}))("treeAction",(function(){return i.Dc(e),i.ic(2).onTreeAction()})),i.Rb()}if(2&e){const e=t.$implicit,n=i.ic(2);i.pc("row",n.row)("group",n.group)("expanded",n.expanded)("isSelected",n.isSelected)("rowIndex",n.rowIndex)("column",e)("rowHeight",n.rowHeight)("displayCheck",n.displayCheck)("treeStatus",n.treeStatus)}}function Y(e,t){if(1&e&&(i.Sb(0,"div",1),i.Mc(1,F,1,9,"datatable-body-cell",2),i.Rb()),2&e){const e=t.$implicit,n=i.ic();i.Bb("datatable-row-",e.type," datatable-row-group"),i.pc("ngStyle",n._groupStyles[e.type]),i.yb(1),i.pc("ngForOf",e.columns)("ngForTrackBy",n.columnTrackingFn)}}function z(e,t){}function $(e,t){if(1&e&&i.Mc(0,z,0,0,"ng-template",4),2&e){const e=i.ic(2);i.pc("ngTemplateOutlet",e.groupHeader.template)("ngTemplateOutletContext",e.groupContext)}}function H(e,t){if(1&e&&(i.Sb(0,"div",3),i.Mc(1,$,1,2,void 0,1),i.Rb()),2&e){const e=i.ic();i.pc("ngStyle",e.getGroupHeaderStyle()),i.yb(1),i.pc("ngIf",e.groupHeader&&e.groupHeader.template)}}function W(e,t){1&e&&i.nc(0,0,["*ngIf","(groupHeader && groupHeader.template && expanded) || !groupHeader || !groupHeader.template"])}function V(e,t){}function B(e,t){if(1&e&&i.Mc(0,V,0,0,"ng-template",4),2&e){const e=i.ic(2);i.pc("ngTemplateOutlet",e.rowDetail.template)("ngTemplateOutletContext",e.rowContext)}}function U(e,t){if(1&e&&(i.Sb(0,"div",5),i.Mc(1,B,1,2,void 0,1),i.Rb()),2&e){const e=i.ic();i.Kc("height",e.detailRowHeight,"px"),i.yb(1),i.pc("ngIf",e.rowDetail&&e.rowDetail.template)}}const G=["cellTemplate"];function q(e,t){if(1&e){const e=i.Tb();i.Sb(0,"label",4),i.Sb(1,"input",5),i.gc("click",(function(t){return i.Dc(e),i.ic().onCheckboxChange(t)})),i.Rb(),i.Rb()}if(2&e){const e=i.ic();i.yb(1),i.pc("checked",e.isSelected)}}function J(e,t){1&e&&i.Nb(0,"i",11)}function Q(e,t){1&e&&i.Nb(0,"i",12)}function K(e,t){1&e&&i.Nb(0,"i",13)}function Z(e,t){if(1&e){const e=i.Tb();i.Sb(0,"button",7),i.gc("click",(function(){return i.Dc(e),i.ic(2).onTreeAction()})),i.Sb(1,"span"),i.Mc(2,J,1,0,"i",8),i.Mc(3,Q,1,0,"i",9),i.Mc(4,K,1,0,"i",10),i.Rb(),i.Rb()}if(2&e){const e=i.ic(2);i.pc("disabled","disabled"===e.treeStatus),i.yb(2),i.pc("ngIf","loading"===e.treeStatus),i.yb(1),i.pc("ngIf","collapsed"===e.treeStatus),i.yb(1),i.pc("ngIf","expanded"===e.treeStatus||"disabled"===e.treeStatus)}}function X(e,t){}const ee=function(e){return{cellContext:e}};function te(e,t){if(1&e&&i.Mc(0,X,0,0,"ng-template",14),2&e){const e=i.ic(2);i.pc("ngTemplateOutlet",e.column.treeToggleTemplate)("ngTemplateOutletContext",i.uc(2,ee,e.cellContext))}}function ne(e,t){if(1&e&&(i.Qb(0),i.Mc(1,Z,5,4,"button",6),i.Mc(2,te,1,4,void 0,2),i.Pb()),2&e){const e=i.ic();i.yb(1),i.pc("ngIf",!e.column.treeToggleTemplate),i.yb(1),i.pc("ngIf",e.column.treeToggleTemplate)}}function ie(e,t){if(1&e&&i.Nb(0,"span",15),2&e){const e=i.ic();i.pc("title",e.sanitizedValue)("innerHTML",e.value,i.Ec)}}function re(e,t){}function se(e,t){if(1&e&&i.Mc(0,re,0,0,"ng-template",14,16,i.Nc),2&e){const e=i.ic();i.pc("ngTemplateOutlet",e.column.cellTemplate)("ngTemplateOutletContext",e.cellContext)}}function oe(e,t){if(1&e&&i.Nb(0,"datatable-body-row",1),2&e){const e=i.ic();i.pc("innerWidth",e.innerWidth)("offsetX",e.offsetX)("columns",e._internalColumns)("rowHeight",e.rowHeight)("row",e.summaryRow)("rowIndex",-1)}}let ae=(()=>{class e{constructor(e){this.document=e,this.width=this.getWidth()}getWidth(){const e=this.document.createElement("div");e.style.visibility="hidden",e.style.width="100px",e.style.msOverflowStyle="scrollbar",this.document.body.appendChild(e);const t=e.offsetWidth;e.style.overflow="scroll";const n=this.document.createElement("div");n.style.width="100%",e.appendChild(n);const i=n.offsetWidth;return e.parentNode.removeChild(e),t-i}}return e.\u0275fac=function(t){return new(t||e)(i.dc(r.d))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})(),ce=(()=>{class e{getDimensions(e){return e.getBoundingClientRect()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})(),le=(()=>{class e{constructor(){this.columnInputChanges=new s.a}get columnInputChanges$(){return this.columnInputChanges.asObservable()}onInputChange(){this.columnInputChanges.next()}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})(),ue=(()=>{class e{constructor(e){this.template=e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.L))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngx-datatable-footer-template",""]]}),e})(),de=(()=>{class e{constructor(e,t){this.element=e,this.zone=t,this.isVisible=!1,this.visible=new i.o}ngOnInit(){this.runCheck()}ngOnDestroy(){clearTimeout(this.timeout)}onVisibilityChange(){this.zone.run(()=>{this.isVisible=!0,this.visible.emit(!0)})}runCheck(){const e=()=>{const{offsetHeight:t,offsetWidth:n}=this.element.nativeElement;t&&n?(clearTimeout(this.timeout),this.onVisibilityChange()):(clearTimeout(this.timeout),this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>e(),50)}))};this.timeout=setTimeout(()=>e())}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(i.A))},e.\u0275dir=i.Hb({type:e,selectors:[["","visibilityObserver",""]],hostVars:2,hostBindings:function(e,t){2&e&&i.Eb("visible",t.isVisible)},outputs:{visible:"visible"}}),e})(),he=(()=>{class e{constructor(e){this.dragX=!0,this.dragY=!0,this.dragStart=new i.o,this.dragging=new i.o,this.dragEnd=new i.o,this.isDragging=!1,this.element=e.nativeElement}ngOnChanges(e){e.dragEventTarget&&e.dragEventTarget.currentValue&&this.dragModel.dragging&&this.onMousedown(e.dragEventTarget.currentValue)}ngOnDestroy(){this._destroySubscription()}onMouseup(e){this.isDragging&&(this.isDragging=!1,this.element.classList.remove("dragging"),this.subscription&&(this._destroySubscription(),this.dragEnd.emit({event:e,element:this.element,model:this.dragModel})))}onMousedown(e){if(e.target.classList.contains("draggable")&&(this.dragX||this.dragY)){e.preventDefault(),this.isDragging=!0;const t={x:e.clientX,y:e.clientY},n=Object(o.a)(document,"mouseup");this.subscription=n.subscribe(e=>this.onMouseup(e));const i=Object(o.a)(document,"mousemove").pipe(Object(c.a)(n)).subscribe(e=>this.move(e,t));this.subscription.add(i),this.dragStart.emit({event:e,element:this.element,model:this.dragModel})}}move(e,t){if(!this.isDragging)return;const n=e.clientY-t.y;this.dragX&&(this.element.style.left=e.clientX-t.x+"px"),this.dragY&&(this.element.style.top=n+"px"),this.element.classList.add("dragging"),this.dragging.emit({event:e,element:this.element,model:this.dragModel})}_destroySubscription(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m))},e.\u0275dir=i.Hb({type:e,selectors:[["","draggable",""]],inputs:{dragX:"dragX",dragY:"dragY",dragEventTarget:"dragEventTarget",dragModel:"dragModel"},outputs:{dragStart:"dragStart",dragging:"dragging",dragEnd:"dragEnd"},features:[i.wb]}),e})(),fe=(()=>{class e{constructor(e,t){this.renderer=t,this.resizeEnabled=!0,this.resize=new i.o,this.resizing=!1,this.element=e.nativeElement}ngAfterViewInit(){const e=this.renderer;this.resizeHandle=e.createElement("span"),e.addClass(this.resizeHandle,this.resizeEnabled?"resize-handle":"resize-handle--not-resizable"),e.appendChild(this.element,this.resizeHandle)}ngOnDestroy(){this._destroySubscription(),this.renderer.destroyNode?this.renderer.destroyNode(this.resizeHandle):this.resizeHandle&&this.renderer.removeChild(this.renderer.parentNode(this.resizeHandle),this.resizeHandle)}onMouseup(){this.resizing=!1,this.subscription&&!this.subscription.closed&&(this._destroySubscription(),this.resize.emit(this.element.clientWidth))}onMousedown(e){const t=e.target.classList.contains("resize-handle"),n=this.element.clientWidth,i=e.screenX;if(t){e.stopPropagation(),this.resizing=!0;const t=Object(o.a)(document,"mouseup");this.subscription=t.subscribe(e=>this.onMouseup());const r=Object(o.a)(document,"mousemove").pipe(Object(c.a)(t)).subscribe(e=>this.move(e,n,i));this.subscription.add(r)}}move(e,t,n){const i=t+(e.screenX-n);(!this.minWidth||i>=this.minWidth)&&(!this.maxWidth||i<=this.maxWidth)&&(this.element.style.width=i+"px")}_destroySubscription(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(i.E))},e.\u0275dir=i.Hb({type:e,selectors:[["","resizeable",""]],hostVars:2,hostBindings:function(e,t){1&e&&i.gc("mousedown",(function(e){return t.onMousedown(e)})),2&e&&i.Eb("resizeable",t.resizeEnabled)},inputs:{resizeEnabled:"resizeEnabled",minWidth:"minWidth",maxWidth:"maxWidth"},outputs:{resize:"resize"}}),e})(),pe=(()=>{class e{constructor(e,t){this.document=t,this.reorder=new i.o,this.targetChanged=new i.o,this.differ=e.find({}).create()}ngAfterContentInit(){this.updateSubscriptions(),this.draggables.changes.subscribe(this.updateSubscriptions.bind(this))}ngOnDestroy(){this.draggables.forEach(e=>{e.dragStart.unsubscribe(),e.dragging.unsubscribe(),e.dragEnd.unsubscribe()})}updateSubscriptions(){const e=this.differ.diff(this.createMapDiffs());if(e){const t=({currentValue:e,previousValue:t})=>{n({previousValue:t}),e&&(e.dragStart.subscribe(this.onDragStart.bind(this)),e.dragging.subscribe(this.onDragging.bind(this)),e.dragEnd.subscribe(this.onDragEnd.bind(this)))},n=({previousValue:e})=>{e&&(e.dragStart.unsubscribe(),e.dragging.unsubscribe(),e.dragEnd.unsubscribe())};e.forEachAddedItem(t),e.forEachRemovedItem(n)}}onDragStart(){this.positions={};let e=0;for(const t of this.draggables.toArray()){const n=t.element,i=parseInt(n.offsetLeft.toString(),0);this.positions[t.dragModel.prop]={left:i,right:i+parseInt(n.offsetWidth.toString(),0),index:e++,element:n}}}onDragging({model:e,event:t}){const n=this.positions[e.prop],i=this.isTarget(e,t);i?this.lastDraggingIndex!==i.i&&(this.targetChanged.emit({prevIndex:this.lastDraggingIndex,newIndex:i.i,initialIndex:n.index}),this.lastDraggingIndex=i.i):this.lastDraggingIndex!==n.index&&(this.targetChanged.emit({prevIndex:this.lastDraggingIndex,initialIndex:n.index}),this.lastDraggingIndex=n.index)}onDragEnd({element:e,model:t,event:n}){const i=this.positions[t.prop],r=this.isTarget(t,n);r&&this.reorder.emit({prevIndex:i.index,newIndex:r.i,model:t}),this.lastDraggingIndex=void 0,e.style.left="auto"}isTarget(e,t){let n=0;const i=this.document.elementsFromPoint(t.x||t.clientX,t.y||t.clientY);for(const r in this.positions){const t=this.positions[r];if(e.prop!==r&&i.find(e=>e===t.element))return{pos:t,i:n};n++}}createMapDiffs(){return this.draggables.toArray().reduce((e,t)=>(e[t.dragModel.$$id]=t,e),{})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.u),i.Mb(r.d))},e.\u0275dir=i.Hb({type:e,selectors:[["","orderable",""]],contentQueries:function(e,t,n){var r;1&e&&i.Fb(n,he,!0),2&e&&i.zc(r=i.hc())&&(t.draggables=r)},outputs:{reorder:"reorder",targetChanged:"targetChanged"}}),e})(),me=(()=>{class e{constructor(){this.pressEnabled=!0,this.duration=500,this.longPressStart=new i.o,this.longPressing=new i.o,this.longPressEnd=new i.o,this.mouseX=0,this.mouseY=0}get press(){return this.pressing}get isLongPress(){return this.isLongPressing}onMouseDown(e){if(1!==e.which||!this.pressEnabled)return;if(e.target.classList.contains("resize-handle"))return;this.mouseX=e.clientX,this.mouseY=e.clientY,this.pressing=!0,this.isLongPressing=!1;const t=Object(o.a)(document,"mouseup");this.subscription=t.subscribe(e=>this.onMouseup()),this.timeout=setTimeout(()=>{this.isLongPressing=!0,this.longPressStart.emit({event:e,model:this.pressModel}),this.subscription.add(Object(o.a)(document,"mousemove").pipe(Object(c.a)(t)).subscribe(e=>this.onMouseMove(e))),this.loop(e)},this.duration),this.loop(e)}onMouseMove(e){if(this.pressing&&!this.isLongPressing){const t=Math.abs(e.clientX-this.mouseX)>10,n=Math.abs(e.clientY-this.mouseY)>10;(t||n)&&this.endPress()}}loop(e){this.isLongPressing&&(this.timeout=setTimeout(()=>{this.longPressing.emit({event:e,model:this.pressModel}),this.loop(e)},50))}endPress(){clearTimeout(this.timeout),this.isLongPressing=!1,this.pressing=!1,this._destroySubscription(),this.longPressEnd.emit({model:this.pressModel})}onMouseup(){this.endPress()}ngOnDestroy(){this._destroySubscription()}_destroySubscription(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=void 0)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=i.Hb({type:e,selectors:[["","long-press",""]],hostVars:4,hostBindings:function(e,t){1&e&&i.gc("mousedown",(function(e){return t.onMouseDown(e)})),2&e&&i.Eb("press",t.press)("longpress",t.isLongPress)},inputs:{pressEnabled:"pressEnabled",duration:"duration",pressModel:"pressModel"},outputs:{longPressStart:"longPressStart",longPressing:"longPressing",longPressEnd:"longPressEnd"}}),e})(),be=(()=>{class e{constructor(e,t,n){this.ngZone=e,this.renderer=n,this.scrollbarV=!1,this.scrollbarH=!1,this.scroll=new i.o,this.scrollYPos=0,this.scrollXPos=0,this.prevScrollYPos=0,this.prevScrollXPos=0,this._scrollEventListener=null,this.element=t.nativeElement}ngOnInit(){if(this.scrollbarV||this.scrollbarH){const e=this.renderer;this.parentElement=e.parentNode(e.parentNode(this.element)),this._scrollEventListener=this.onScrolled.bind(this),this.parentElement.addEventListener("scroll",this._scrollEventListener)}}ngOnDestroy(){this._scrollEventListener&&(this.parentElement.removeEventListener("scroll",this._scrollEventListener),this._scrollEventListener=null)}setOffset(e){this.parentElement&&(this.parentElement.scrollTop=e)}onScrolled(e){const t=e.currentTarget;requestAnimationFrame(()=>{this.scrollYPos=t.scrollTop,this.scrollXPos=t.scrollLeft,this.updateOffset()})}updateOffset(){let e;this.scrollYPos<this.prevScrollYPos?e="down":this.scrollYPos>this.prevScrollYPos&&(e="up"),this.scroll.emit({direction:e,scrollYPos:this.scrollYPos,scrollXPos:this.scrollXPos}),this.prevScrollYPos=this.scrollYPos,this.prevScrollXPos=this.scrollXPos}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.A),i.Mb(i.m),i.Mb(i.E))},e.\u0275cmp=i.Gb({type:e,selectors:[["datatable-scroller"]],hostAttrs:[1,"datatable-scroll"],hostVars:4,hostBindings:function(e,t){2&e&&i.Kc("height",t.scrollHeight,"px")("width",t.scrollWidth,"px")},inputs:{scrollbarV:"scrollbarV",scrollbarH:"scrollbarH",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth"},outputs:{scroll:"scroll"},ngContentSelectors:u,decls:1,vars:0,template:function(e,t){1&e&&(i.oc(),i.nc(0))},encapsulation:2,changeDetection:0}),e})(),ge=(()=>{class e{constructor(e){this.template=e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.L))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngx-datatable-group-header-template",""]]}),e})(),_e=(()=>{class e{constructor(){this.rowHeight=0,this.toggle=new i.o}get template(){return this._templateInput||this._templateQuery}toggleExpandGroup(e){this.toggle.emit({type:"group",value:e})}expandAllGroups(){this.toggle.emit({type:"all",value:!0})}collapseAllGroups(){this.toggle.emit({type:"all",value:!1})}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=i.Hb({type:e,selectors:[["ngx-datatable-group-header"]],contentQueries:function(e,t,n){var r;1&e&&i.Ic(n,ge,!0,i.L),2&e&&i.zc(r=i.hc())&&(t._templateQuery=r.first)},inputs:{rowHeight:"rowHeight",_templateInput:["template","_templateInput"]},outputs:{toggle:"toggle"}}),e})();function ye(){return""}function ve(e){return null==e?ye:"number"==typeof e?we:-1!==e.indexOf(".")?Me:Se}function we(e,t){if(null==e)return"";if(!e||null==t)return e;const n=e[t];return null==n?"":n}function Se(e,t){if(null==e)return"";if(!e||!t)return e;const n=e[t];return null==n?"":n}function Me(e,t){if(null==e)return"";if(!e||!t)return e;let n=e[t];if(void 0!==n)return n;n=e;const i=t.split(".");if(i.length)for(let r=0;r<i.length;r++)if(n=n[i[r]],null==n)return"";return n}function ke(e){return e&&(t=>ve(e)(t,e))}function xe(e,t,n){if(t&&n){const i={},r=e.length;let s=null;i[0]=new De;const o=e.reduce((e,t)=>{const i=n(t);return-1===e.indexOf(i)&&e.push(i),e},[]);for(let t=0;t<r;t++)i[n(e[t])]=new De(e[t]);for(let c=0;c<r;c++){s=i[n(e[c])];let r=0;const a=t(s.row);a&&o.indexOf(a)>-1&&(r=a),s.parent=i[r],s.row.level=s.parent.row.level+1,s.parent.children.push(s)}let a=[];return i[0].flatten((function(){a=[...a,this.row]}),!0),a}return e}class De{constructor(e=null){e||(e={level:-1,treeStatus:"expanded"}),this.row=e,this.parent=null,this.children=[]}flatten(e,t){if("expanded"===this.row.treeStatus)for(let n=0,i=this.children.length;n<i;n++){const i=this.children[n];e.apply(i,Array.prototype.slice.call(arguments,2)),t&&i.flatten.apply(i,arguments)}}}function Te(e){return(e=(e=(e=e.replace(/[^a-zA-Z0-9 ]/g," ")).replace(/([a-z](?=[A-Z]))/g,"$1 ")).replace(/([^a-zA-Z0-9 ])|^[0-9]+/g,"").trim().toLowerCase()).replace(/([ 0-9]+)([a-zA-Z])/g,(function(e,t,n){return t.trim()+n.toUpperCase()}))}function Ce(e){if(!e)return;let t=!1;for(const n of e)n.$$id||(n.$$id=("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)),Oe(n.prop)&&n.name&&(n.prop=Te(n.name)),n.$$valueGetter||(n.$$valueGetter=ve(n.prop)),!Oe(n.prop)&&Oe(n.name)&&(n.name=String(n.prop).replace(/([A-Z])/g,e=>" "+e).replace(/^./,e=>e.toUpperCase())),Oe(n.prop)&&Oe(n.name)&&(n.name=""),n.hasOwnProperty("resizeable")||(n.resizeable=!0),n.hasOwnProperty("sortable")||(n.sortable=!0),n.hasOwnProperty("draggable")||(n.draggable=!0),n.hasOwnProperty("canAutoResize")||(n.canAutoResize=!0),n.hasOwnProperty("width")||(n.width=150),n.hasOwnProperty("isTreeColumn")&&n.isTreeColumn&&!t?t=!0:n.isTreeColumn=!1}function Oe(e){return null==e}var Le=function(e){return e.standard="standard",e.flex="flex",e.force="force",e}({}),Re=function(e){return e.single="single",e.multi="multi",e.multiClick="multiClick",e.cell="cell",e.checkbox="checkbox",e}({}),Ee=function(e){return e.single="single",e.multi="multi",e}({}),Ae=function(e){return e.header="header",e.body="body",e}({});let Ie=(()=>{class e{constructor(e){this.template=e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.L))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngx-datatable-header-template",""]]}),e})(),Pe=(()=>{class e{constructor(e){this.template=e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.L))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngx-datatable-cell-template",""]]}),e})(),Ne=(()=>{class e{constructor(e){this.template=e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.L))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngx-datatable-tree-toggle",""]]}),e})(),je=(()=>{class e{constructor(e){this.columnChangesService=e,this.isFirstChange=!0}get cellTemplate(){return this._cellTemplateInput||this._cellTemplateQuery}get headerTemplate(){return this._headerTemplateInput||this._headerTemplateQuery}get treeToggleTemplate(){return this._treeToggleTemplateInput||this._treeToggleTemplateQuery}ngOnChanges(){this.isFirstChange?this.isFirstChange=!1:this.columnChangesService.onInputChange()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(le))},e.\u0275dir=i.Hb({type:e,selectors:[["ngx-datatable-column"]],contentQueries:function(e,t,n){var r;1&e&&(i.Ic(n,Pe,!0,i.L),i.Ic(n,Ie,!0,i.L),i.Ic(n,Ne,!0,i.L)),2&e&&(i.zc(r=i.hc())&&(t._cellTemplateQuery=r.first),i.zc(r=i.hc())&&(t._headerTemplateQuery=r.first),i.zc(r=i.hc())&&(t._treeToggleTemplateQuery=r.first))},inputs:{name:"name",prop:"prop",frozenLeft:"frozenLeft",frozenRight:"frozenRight",flexGrow:"flexGrow",resizeable:"resizeable",comparator:"comparator",pipe:"pipe",sortable:"sortable",draggable:"draggable",canAutoResize:"canAutoResize",minWidth:"minWidth",width:"width",maxWidth:"maxWidth",checkboxable:"checkboxable",headerCheckboxable:"headerCheckboxable",headerClass:"headerClass",cellClass:"cellClass",isTreeColumn:"isTreeColumn",treeLevelIndent:"treeLevelIndent",summaryFunc:"summaryFunc",summaryTemplate:"summaryTemplate",_cellTemplateInput:["cellTemplate","_cellTemplateInput"],_headerTemplateInput:["headerTemplate","_headerTemplateInput"],_treeToggleTemplateInput:["treeToggleTemplate","_treeToggleTemplateInput"]},features:[i.wb]}),e})(),Fe=(()=>{class e{constructor(e){this.template=e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.L))},e.\u0275dir=i.Hb({type:e,selectors:[["","ngx-datatable-row-detail-template",""]]}),e})(),Ye=(()=>{class e{constructor(){this.rowHeight=0,this.toggle=new i.o}get template(){return this._templateInput||this._templateQuery}toggleExpandRow(e){this.toggle.emit({type:"row",value:e})}expandAllRows(){this.toggle.emit({type:"all",value:!0})}collapseAllRows(){this.toggle.emit({type:"all",value:!1})}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=i.Hb({type:e,selectors:[["ngx-datatable-row-detail"]],contentQueries:function(e,t,n){var r;1&e&&i.Ic(n,Fe,!0,i.L),2&e&&i.zc(r=i.hc())&&(t._templateQuery=r.first)},inputs:{rowHeight:"rowHeight",_templateInput:["template","_templateInput"]},outputs:{toggle:"toggle"}}),e})(),ze=(()=>{class e{get template(){return this._templateInput||this._templateQuery}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=i.Hb({type:e,selectors:[["ngx-datatable-footer"]],contentQueries:function(e,t,n){var r;1&e&&i.Fb(n,ue,!0,i.L),2&e&&i.zc(r=i.hc())&&(t._templateQuery=r.first)},inputs:{footerHeight:"footerHeight",totalMessage:"totalMessage",selectedMessage:"selectedMessage",pagerLeftArrowIcon:"pagerLeftArrowIcon",pagerRightArrowIcon:"pagerRightArrowIcon",pagerPreviousIcon:"pagerPreviousIcon",pagerNextIcon:"pagerNextIcon",_templateInput:["template","_templateInput"]}}),e})();function $e(e){const t={left:[],center:[],right:[]};if(e)for(const n of e)n.frozenLeft?t.left.push(n):n.frozenRight?t.right.push(n):t.center.push(n);return t}function He(e,t){return{left:We(e.left),center:We(e.center),right:We(e.right),total:Math.floor(We(t))}}function We(e,t){let n=0;if(e)for(const i of e)n+=parseFloat(t&&i[t]?i[t]:i.width);return n}function Ve(e){const t=[],n=$e(e);return t.push({type:"left",columns:n.left}),t.push({type:"center",columns:n.center}),t.push({type:"right",columns:n.right}),t}class Be{constructor(){this.treeArray=[]}clearCache(){this.treeArray=[]}initCache(e){const{rows:t,rowHeight:n,detailRowHeight:i,externalVirtual:r,rowCount:s,rowIndexes:o,rowExpansions:a}=e,c="function"==typeof n,l="function"==typeof i;if(!c&&isNaN(n))throw new Error(`Row Height cache initialization failed. Please ensure that 'rowHeight' is a\n valid number or function value: (${n}) when 'scrollbarV' is enabled.`);if(!l&&isNaN(i))throw new Error(`Row Height cache initialization failed. Please ensure that 'detailRowHeight' is a\n valid number or function value: (${i}) when 'scrollbarV' is enabled.`);const u=r?s:t.length;this.treeArray=new Array(u);for(let d=0;d<u;++d)this.treeArray[d]=0;for(let d=0;d<u;++d){const e=t[d];let r=n;c&&(r=n(e));const s=a.has(e);e&&s&&(r+=l?i(e,o.get(e)):i),this.update(d,r)}}getRowIndex(e){return 0===e?0:this.calcRowIndex(e)}update(e,t){if(!this.treeArray.length)throw new Error(`Update at index ${e} with value ${t} failed:\n Row Height cache not initialized.`);const n=this.treeArray.length;for(e|=0;e<n;)this.treeArray[e]+=t,e|=e+1}query(e){if(!this.treeArray.length)throw new Error(`query at index ${e} failed: Fenwick tree array not initialized.`);let t=0;for(e|=0;e>=0;)t+=this.treeArray[e],e=(e&e+1)-1;return t}queryBetween(e,t){return this.query(t)-this.query(e-1)}calcRowIndex(e){if(!this.treeArray.length)return 0;let t=-1;const n=this.treeArray.length;for(let i=Math.pow(2,n.toString(2).length-1);0!==i;i>>=1){const r=t+i;r<n&&e>=this.treeArray[r]&&(e-=this.treeArray[r],t=r)}return t+1}}const Ue={},Ge="undefined"!=typeof document?document.createElement("div").style:void 0,qe=function(){const e="undefined"!=typeof window?window.getComputedStyle(document.documentElement,""):void 0,t=void 0!==e?Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/):null,n=null!==t?t[1]:void 0,i=void 0!==n?"WebKit|Moz|MS|O".match(new RegExp("("+n+")","i"))[1]:void 0;return i?{dom:i,lowercase:n,css:`-${n}-`,js:n[0].toUpperCase()+n.substr(1)}:void 0}();function Je(e){const t=Te(e);return Ue[t]||(void 0!==qe&&void 0!==Ge[qe.css+e]?Ue[t]=qe.css+e:void 0!==Ge[e]&&(Ue[t]=e)),Ue[t]}const Qe="undefined"!=typeof window?Je("transform"):void 0,Ke="undefined"!=typeof window?Je("backfaceVisibility"):void 0,Ze="undefined"!=typeof window?!!Je("transform"):void 0,Xe="undefined"!=typeof window?!!Je("perspective"):void 0,et="undefined"!=typeof window?window.navigator.userAgent:"Chrome",tt=/Safari\//.test(et)&&!/Chrome\//.test(et);function nt(e,t,n){void 0!==Qe&&Ze?!tt&&Xe?(e[Qe]=`translate3d(${t}px, ${n}px, 0)`,e[Ke]="hidden"):e[Te(Qe)]=`translate(${t}px, ${n}px)`:(e.top=n+"px",e.left=t+"px")}let it=(()=>{class e{constructor(e){this.cd=e,this.selected=[],this.scroll=new i.o,this.page=new i.o,this.activate=new i.o,this.select=new i.o,this.detailToggle=new i.o,this.rowContextmenu=new i.o(!1),this.treeAction=new i.o,this.rowHeightsCache=new Be,this.temp=[],this.offsetY=0,this.indexes={},this.rowIndexes=new WeakMap,this.rowExpansions=[],this.getDetailRowHeight=(e,t)=>{if(!this.rowDetail)return 0;const n=this.rowDetail.rowHeight;return"function"==typeof n?n(e,t):n},this.rowTrackingFn=(e,t)=>{const n=this.getRowIndex(t);return this.trackByProp?t[this.trackByProp]:n}}set pageSize(e){this._pageSize=e,this.recalcLayout()}get pageSize(){return this._pageSize}set rows(e){this._rows=e,this.recalcLayout()}get rows(){return this._rows}set columns(e){this._columns=e;const t=$e(e);this.columnGroupWidths=He(t,e)}get columns(){return this._columns}set offset(e){this._offset=e,(!this.scrollbarV||this.scrollbarV&&!this.virtualization)&&this.recalcLayout()}get offset(){return this._offset}set rowCount(e){this._rowCount=e,this.recalcLayout()}get rowCount(){return this._rowCount}get bodyWidth(){return this.scrollbarH?this.innerWidth+"px":"100%"}set bodyHeight(e){this._bodyHeight=this.scrollbarV?e+"px":"auto",this.recalcLayout()}get bodyHeight(){return this._bodyHeight}get selectEnabled(){return!!this.selectionType}get scrollHeight(){if(this.scrollbarV&&this.virtualization&&this.rowCount)return this.rowHeightsCache.query(this.rowCount-1)}ngOnInit(){this.rowDetail&&(this.listener=this.rowDetail.toggle.subscribe(({type:e,value:t})=>{"row"===e&&this.toggleRowExpansion(t),"all"===e&&this.toggleAllRows(t),this.updateIndexes(),this.updateRows(),this.cd.markForCheck()})),this.groupHeader&&(this.listener=this.groupHeader.toggle.subscribe(({type:e,value:t})=>{"group"===e&&this.toggleRowExpansion(t),"all"===e&&this.toggleAllRows(t),this.updateIndexes(),this.updateRows(),this.cd.markForCheck()}))}ngOnDestroy(){(this.rowDetail||this.groupHeader)&&this.listener.unsubscribe()}updateOffsetY(e){this.scroller&&(this.scrollbarV&&this.virtualization&&e?e=this.rowHeightsCache.query(this.pageSize*e-1):this.scrollbarV&&!this.virtualization&&(e=0),this.scroller.setOffset(e||0))}onBodyScroll(e){const t=e.scrollYPos,n=e.scrollXPos;this.offsetY===t&&this.offsetX===n||this.scroll.emit({offsetY:t,offsetX:n}),this.offsetY=t,this.offsetX=n,this.updateIndexes(),this.updatePage(e.direction),this.updateRows()}updatePage(e){let t=this.indexes.first/this.pageSize;"up"===e?t=Math.ceil(t):"down"===e&&(t=Math.floor(t)),void 0===e||isNaN(t)||this.page.emit({offset:t})}updateRows(){const{first:e,last:t}=this.indexes;let n=e,i=0;const r=[];if(this.groupedRows){let e=3;for(1===this.groupedRows.length&&(e=this.groupedRows[0].value.length);n<t&&n<this.groupedRows.length;){const e=this.groupedRows[n];this.rowIndexes.set(e,n),e.value&&e.value.forEach((e,t)=>{this.rowIndexes.set(e,`${n}-${t}`)}),r[i]=e,i++,n++}}else for(;n<t&&n<this.rowCount;){const e=this.rows[n];e&&(this.rowIndexes.set(e,n),r[i]=e),i++,n++}this.temp=r}getRowHeight(e){return"function"==typeof this.rowHeight?this.rowHeight(e):this.rowHeight}getGroupHeight(e){let t=0;if(e.value)for(let n=0;n<e.value.length;n++)t+=this.getRowAndDetailHeight(e.value[n]);return t}getRowAndDetailHeight(e){let t=this.getRowHeight(e);return this.getRowExpanded(e)&&(t+=this.getDetailRowHeight(e)),t}getRowsStyles(e){const t={};if(this.groupedRows&&(t.width=this.columnGroupWidths.total),this.scrollbarV&&this.virtualization){let n=0;if(this.groupedRows){const t=e[e.length-1];n=t?this.getRowIndex(t):0}else n=this.getRowIndex(e);nt(t,0,this.rowHeightsCache.query(n-1))}return t}getBottomSummaryRowStyles(){if(!this.scrollbarV||!this.rows||!this.rows.length)return null;const e={position:"absolute"};return nt(e,0,this.rowHeightsCache.query(this.rows.length-1)),e}hideIndicator(){setTimeout(()=>this.loadingIndicator=!1,500)}updateIndexes(){let e=0,t=0;if(this.scrollbarV)if(this.virtualization){const n=parseInt(this.bodyHeight,0);e=this.rowHeightsCache.getRowIndex(this.offsetY),t=this.rowHeightsCache.getRowIndex(n+this.offsetY)+1}else e=0,t=this.rowCount;else this.externalPaging||(e=Math.max(this.offset*this.pageSize,0)),t=Math.min(e+this.pageSize,this.rowCount);this.indexes={first:e,last:t}}refreshRowHeightCache(){if(this.scrollbarV&&(!this.scrollbarV||this.virtualization)&&(this.rowHeightsCache.clearCache(),this.rows&&this.rows.length)){const e=new Set;for(const t of this.rows)this.getRowExpanded(t)&&e.add(t);this.rowHeightsCache.initCache({rows:this.rows,rowHeight:this.rowHeight,detailRowHeight:this.getDetailRowHeight,externalVirtual:this.scrollbarV&&this.externalPaging,rowCount:this.rowCount,rowIndexes:this.rowIndexes,rowExpansions:e})}}getAdjustedViewPortIndex(){const e=this.indexes.first;return this.scrollbarV&&this.virtualization&&this.rowHeightsCache.query(e-1)<=this.offsetY?e-1:e}toggleRowExpansion(e){const t=this.getAdjustedViewPortIndex(),n=this.getRowExpandedIdx(e,this.rowExpansions),i=n>-1;if(this.scrollbarV&&this.virtualization){const t=this.getDetailRowHeight(e)*(i?-1:1),n=this.getRowIndex(e);this.rowHeightsCache.update(n,t)}i?this.rowExpansions.splice(n,1):this.rowExpansions.push(e),this.detailToggle.emit({rows:[e],currentIndex:t})}toggleAllRows(e){this.rowExpansions=[];const t=this.getAdjustedViewPortIndex();if(e)for(const n of this.rows)this.rowExpansions.push(n);this.scrollbarV&&this.recalcLayout(),this.detailToggle.emit({rows:this.rows,currentIndex:t})}recalcLayout(){this.refreshRowHeightCache(),this.updateIndexes(),this.updateRows()}columnTrackingFn(e,t){return t.$$id}stylesByGroup(e){const t=this.columnGroupWidths,n=this.offsetX,i={width:t[e]+"px"};if("left"===e)nt(i,n,0);else if("right"===e){const e=parseInt(this.innerWidth+"",0);nt(i,-1*(t.total-e-n),0)}return i}getRowExpanded(e){if(0===this.rowExpansions.length&&this.groupExpansionDefault)for(const t of this.groupedRows)this.rowExpansions.push(t);return this.getRowExpandedIdx(e,this.rowExpansions)>-1}getRowExpandedIdx(e,t){if(!t||!t.length)return-1;const n=this.rowIdentity(e);return t.findIndex(e=>this.rowIdentity(e)===n)}getRowIndex(e){return this.rowIndexes.get(e)||0}onTreeAction(e){this.treeAction.emit({row:e})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.h))},e.\u0275cmp=i.Gb({type:e,selectors:[["datatable-body"]],viewQuery:function(e,t){var n;1&e&&i.Tc(be,!0),2&e&&i.zc(n=i.hc())&&(t.scroller=n.first)},hostAttrs:[1,"datatable-body"],hostVars:4,hostBindings:function(e,t){2&e&&i.Kc("width",t.bodyWidth)("height",t.bodyHeight)},inputs:{selected:"selected",pageSize:"pageSize",rows:"rows",columns:"columns",offset:"offset",rowCount:"rowCount",bodyHeight:"bodyHeight",offsetX:"offsetX",loadingIndicator:"loadingIndicator",scrollbarV:"scrollbarV",scrollbarH:"scrollbarH",externalPaging:"externalPaging",rowHeight:"rowHeight",emptyMessage:"emptyMessage",selectionType:"selectionType",rowIdentity:"rowIdentity",rowDetail:"rowDetail",groupHeader:"groupHeader",selectCheck:"selectCheck",displayCheck:"displayCheck",trackByProp:"trackByProp",rowClass:"rowClass",groupedRows:"groupedRows",groupExpansionDefault:"groupExpansionDefault",innerWidth:"innerWidth",groupRowsBy:"groupRowsBy",virtualization:"virtualization",summaryRow:"summaryRow",summaryPosition:"summaryPosition",summaryHeight:"summaryHeight"},outputs:{scroll:"scroll",page:"page",activate:"activate",select:"select",detailToggle:"detailToggle",rowContextmenu:"rowContextmenu",treeAction:"treeAction"},decls:5,vars:9,consts:[[4,"ngIf"],[3,"selected","rows","selectCheck","selectEnabled","selectionType","rowIdentity","select","activate"],["selector",""],[3,"scrollbarV","scrollbarH","scrollHeight","scrollWidth","scroll",4,"ngIf"],["class","empty-row",3,"innerHTML",4,"ngIf"],[3,"scrollbarV","scrollbarH","scrollHeight","scrollWidth","scroll"],[3,"rowHeight","offsetX","innerWidth","rows","columns",4,"ngIf"],[3,"groupedRows","innerWidth","ngStyle","rowDetail","groupHeader","offsetX","detailRowHeight","row","expanded","rowIndex","rowContextmenu",4,"ngFor","ngForOf","ngForTrackBy"],[3,"ngStyle","rowHeight","offsetX","innerWidth","rows","columns",4,"ngIf"],[3,"rowHeight","offsetX","innerWidth","rows","columns"],[3,"groupedRows","innerWidth","ngStyle","rowDetail","groupHeader","offsetX","detailRowHeight","row","expanded","rowIndex","rowContextmenu"],["tabindex","-1",3,"isSelected","innerWidth","offsetX","columns","rowHeight","row","rowIndex","expanded","rowClass","displayCheck","treeStatus","treeAction","activate",4,"ngIf","ngIfElse"],["groupedRowsTemplate",""],["tabindex","-1",3,"isSelected","innerWidth","offsetX","columns","rowHeight","row","rowIndex","expanded","rowClass","displayCheck","treeStatus","treeAction","activate"],["tabindex","-1",3,"isSelected","innerWidth","offsetX","columns","rowHeight","row","group","rowIndex","expanded","rowClass","activate",4,"ngFor","ngForOf","ngForTrackBy"],["tabindex","-1",3,"isSelected","innerWidth","offsetX","columns","rowHeight","row","group","rowIndex","expanded","rowClass","activate"],[3,"ngStyle","rowHeight","offsetX","innerWidth","rows","columns"],[1,"empty-row",3,"innerHTML"]],template:function(e,t){1&e&&(i.Mc(0,d,1,0,"datatable-progress",0),i.Sb(1,"datatable-selection",1,2),i.gc("select",(function(e){return t.select.emit(e)}))("activate",(function(e){return t.activate.emit(e)})),i.Mc(3,_,4,8,"datatable-scroller",3),i.Mc(4,y,1,1,"div",4),i.Rb()),2&e&&(i.pc("ngIf",t.loadingIndicator),i.yb(1),i.pc("selected",t.selected)("rows",t.rows)("selectCheck",t.selectCheck)("selectEnabled",t.selectEnabled)("selectionType",t.selectionType)("rowIdentity",t.rowIdentity),i.yb(2),i.pc("ngIf",null==t.rows?null:t.rows.length),i.yb(1),i.pc("ngIf",!(null!=t.rows&&t.rows.length||t.loadingIndicator)))},directives:function(){return[r.r,vt,pt,be,r.q,Mt,gt,r.s,bt]},encapsulation:2,changeDetection:0}),e})(),rt=(()=>{class e{constructor(e){this.cd=e,this.sort=new i.o,this.reorder=new i.o,this.resize=new i.o,this.select=new i.o,this.columnContextmenu=new i.o(!1),this._columnGroupWidths={total:100},this._styleByGroup={left:{},center:{},right:{}},this.destroyed=!1}set innerWidth(e){this._innerWidth=e,setTimeout(()=>{if(this._columns){const e=$e(this._columns);this._columnGroupWidths=He(e,this._columns),this.setStylesByGroup()}})}get innerWidth(){return this._innerWidth}set headerHeight(e){this._headerHeight="auto"!==e?e+"px":e}get headerHeight(){return this._headerHeight}set columns(e){this._columns=e;const t=$e(e);this._columnsByPin=Ve(e),setTimeout(()=>{this._columnGroupWidths=He(t,e),this.setStylesByGroup()})}get columns(){return this._columns}set offsetX(e){this._offsetX=e,this.setStylesByGroup()}get offsetX(){return this._offsetX}ngOnDestroy(){this.destroyed=!0}onLongPressStart({event:e,model:t}){t.dragging=!0,this.dragEventTarget=e}onLongPressEnd({event:e,model:t}){this.dragEventTarget=e,setTimeout(()=>{const e=this._columns.find(e=>e.$$id===t.$$id);e&&(e.dragging=!1)},5)}get headerWidth(){return this.scrollbarH?this.innerWidth+"px":"100%"}trackByGroups(e,t){return t.type}columnTrackingFn(e,t){return t.$$id}onColumnResized(e,t){e<=t.minWidth?e=t.minWidth:e>=t.maxWidth&&(e=t.maxWidth),this.resize.emit({column:t,prevValue:t.width,newValue:e})}onColumnReordered({prevIndex:e,newIndex:t,model:n}){const i=this.getColumn(t);i.isTarget=!1,i.targetMarkerContext=void 0,this.reorder.emit({column:n,prevValue:e,newValue:t})}onTargetChanged({prevIndex:e,newIndex:t,initialIndex:n}){if(e||0===e){const t=this.getColumn(e);t.isTarget=!1,t.targetMarkerContext=void 0}if(t||0===t){const e=this.getColumn(t);e.isTarget=!0,n!==t&&(e.targetMarkerContext={class:"targetMarker ".concat(n>t?"dragFromRight":"dragFromLeft")})}}getColumn(e){const t=this._columnsByPin[0].columns.length;if(e<t)return this._columnsByPin[0].columns[e];const n=this._columnsByPin[1].columns.length;return e<t+n?this._columnsByPin[1].columns[e-t]:this._columnsByPin[2].columns[e-t-n]}onSort({column:e,prevValue:t,newValue:n}){if(e.dragging)return;const i=this.calcNewSorts(e,t,n);this.sort.emit({sorts:i,column:e,prevValue:t,newValue:n})}calcNewSorts(e,t,n){let i=0;this.sorts||(this.sorts=[]);const r=this.sorts.map((t,n)=>((t=Object.assign({},t)).prop===e.prop&&(i=n),t));return void 0===n?r.splice(i,1):t?r[i].dir=n:(this.sortType===Ee.single&&r.splice(0,this.sorts.length),r.push({dir:n,prop:e.prop})),r}setStylesByGroup(){this._styleByGroup.left=this.calcStylesByGroup("left"),this._styleByGroup.center=this.calcStylesByGroup("center"),this._styleByGroup.right=this.calcStylesByGroup("right"),this.destroyed||this.cd.detectChanges()}calcStylesByGroup(e){const t=this._columnGroupWidths,n={width:t[e]+"px"};return"center"===e?nt(n,-1*this.offsetX,0):"right"===e&&nt(n,-1*(t.total-this.innerWidth),0),n}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.h))},e.\u0275cmp=i.Gb({type:e,selectors:[["datatable-header"]],hostAttrs:[1,"datatable-header"],hostVars:4,hostBindings:function(e,t){2&e&&i.Kc("height",t.headerHeight)("width",t.headerWidth)},inputs:{innerWidth:"innerWidth",headerHeight:"headerHeight",columns:"columns",offsetX:"offsetX",sorts:"sorts",sortAscendingIcon:"sortAscendingIcon",sortDescendingIcon:"sortDescendingIcon",sortUnsetIcon:"sortUnsetIcon",scrollbarH:"scrollbarH",dealsWithGroup:"dealsWithGroup",targetMarkerTemplate:"targetMarkerTemplate",sortType:"sortType",allRowsSelected:"allRowsSelected",selectionType:"selectionType",reorderable:"reorderable"},outputs:{sort:"sort",reorder:"reorder",resize:"resize",select:"select",columnContextmenu:"columnContextmenu"},decls:2,vars:4,consts:[["orderable","",1,"datatable-header-inner",3,"reorder","targetChanged"],[3,"class","ngStyle",4,"ngFor","ngForOf","ngForTrackBy"],[3,"ngStyle"],["resizeable","","long-press","","draggable","",3,"resizeEnabled","pressModel","pressEnabled","dragX","dragY","dragModel","dragEventTarget","headerHeight","isTarget","targetMarkerTemplate","targetMarkerContext","column","sortType","sorts","selectionType","sortAscendingIcon","sortDescendingIcon","sortUnsetIcon","allRowsSelected","resize","longPressStart","longPressEnd","sort","select","columnContextmenu",4,"ngFor","ngForOf","ngForTrackBy"],["resizeable","","long-press","","draggable","",3,"resizeEnabled","pressModel","pressEnabled","dragX","dragY","dragModel","dragEventTarget","headerHeight","isTarget","targetMarkerTemplate","targetMarkerContext","column","sortType","sorts","selectionType","sortAscendingIcon","sortDescendingIcon","sortUnsetIcon","allRowsSelected","resize","longPressStart","longPressEnd","sort","select","columnContextmenu"]],template:function(e,t){1&e&&(i.Sb(0,"div",0),i.gc("reorder",(function(e){return t.onColumnReordered(e)}))("targetChanged",(function(e){return t.onTargetChanged(e)})),i.Mc(1,w,2,5,"div",1),i.Rb()),2&e&&(i.Kc("width",t._columnGroupWidths.total,"px"),i.yb(1),i.pc("ngForOf",t._columnsByPin)("ngForTrackBy",t.trackByGroups))},directives:function(){return[pe,r.q,r.s,dt,fe,me,he]},encapsulation:2,changeDetection:0}),e})();function st(e,t,n){let i,r,s;n=n||{};let o=null,a=0;function c(){a=!1===n.leading?0:+new Date,o=null,s=e.apply(i,r)}return function(){const l=+new Date;a||!1!==n.leading||(a=l);const u=t-(l-a);return i=this,r=arguments,u<=0?(clearTimeout(o),o=null,a=l,s=e.apply(i,r)):o||!1===n.trailing||(o=setTimeout(c,u)),s}}function ot(e,t){for(const n of t){const t=e.indexOf(n);e.splice(t,1)}}function at(e,t=300){let n=0;for(const i of e)n+=i.width||t;return n}var ct=function(e){return e.asc="asc",e.desc="desc",e}({});function lt(e,t){if(null==e&&(e=0),null==t&&(t=0),e instanceof Date&&t instanceof Date){if(e<t)return-1;if(e>t)return 1}else if(isNaN(parseFloat(e))||!isFinite(e)||isNaN(parseFloat(t))||!isFinite(t)){if(e=String(e),t=String(t),e.toLowerCase()<t.toLowerCase())return-1;if(e.toLowerCase()>t.toLowerCase())return 1}else{if(parseFloat(e)<parseFloat(t))return-1;if(parseFloat(e)>parseFloat(t))return 1}return 0}let ut=(()=>{class e{constructor(e,t,n,r,s,o,c){this.scrollbarHelper=e,this.dimensionsHelper=t,this.cd=n,this.columnChangesService=o,this.configuration=c,this.selected=[],this.scrollbarV=!1,this.scrollbarH=!1,this.rowHeight=30,this.columnMode=Le.standard,this.headerHeight=30,this.footerHeight=0,this.externalPaging=!1,this.externalSorting=!1,this.loadingIndicator=!1,this.reorderable=!0,this.swapColumns=!0,this.sortType=Ee.single,this.sorts=[],this.cssClasses={sortAscending:"datatable-icon-up",sortDescending:"datatable-icon-down",sortUnset:"datatable-icon-sort-unset",pagerLeftArrow:"datatable-icon-left",pagerRightArrow:"datatable-icon-right",pagerPrevious:"datatable-icon-prev",pagerNext:"datatable-icon-skip"},this.messages={emptyMessage:"No data to display",totalMessage:"total",selectedMessage:"selected"},this.groupExpansionDefault=!1,this.selectAllRowsOnPage=!1,this.virtualization=!0,this.summaryRow=!1,this.summaryHeight=30,this.summaryPosition="top",this.scroll=new i.o,this.activate=new i.o,this.select=new i.o,this.sort=new i.o,this.page=new i.o,this.reorder=new i.o,this.resize=new i.o,this.tableContextmenu=new i.o(!1),this.treeAction=new i.o,this.rowCount=0,this._offsetX=new a.a(0),this._count=0,this._offset=0,this._subscriptions=[],this.rowIdentity=e=>this._groupRowsBy?e.key:e,this.element=r.nativeElement,this.rowDiffer=s.find({}).create(),this.configuration&&this.configuration.messages&&(this.messages=Object.assign({},this.configuration.messages))}set rows(e){this._rows=e,e&&(this._internalRows=[...e]),this.externalSorting||this.sortInternalRows(),this._internalRows=xe(this._internalRows,ke(this.treeFromRelation),ke(this.treeToRelation)),this.recalculate(),this._rows&&this._groupRowsBy&&(this.groupedRows=this.groupArrayBy(this._rows,this._groupRowsBy)),this.cd.markForCheck()}get rows(){return this._rows}set groupRowsBy(e){e&&(this._groupRowsBy=e,this._rows&&this._groupRowsBy&&(this.groupedRows=this.groupArrayBy(this._rows,this._groupRowsBy)))}get groupRowsBy(){return this._groupRowsBy}set columns(e){e&&(this._internalColumns=[...e],Ce(this._internalColumns),this.recalculateColumns()),this._columns=e}get columns(){return this._columns}set limit(e){this._limit=e,this.recalculate()}get limit(){return this._limit}set count(e){this._count=e,this.recalculate()}get count(){return this._count}set offset(e){this._offset=e}get offset(){return Math.max(Math.min(this._offset,Math.ceil(this.rowCount/this.pageSize)-1),0)}get isFixedHeader(){const e=this.headerHeight;return"string"!=typeof e||"auto"!==e}get isFixedRow(){return"auto"!==this.rowHeight}get isVertScroll(){return this.scrollbarV}get isVirtualized(){return this.virtualization}get isHorScroll(){return this.scrollbarH}get isSelectable(){return void 0!==this.selectionType}get isCheckboxSelection(){return this.selectionType===Re.checkbox}get isCellSelection(){return this.selectionType===Re.cell}get isSingleSelection(){return this.selectionType===Re.single}get isMultiSelection(){return this.selectionType===Re.multi}get isMultiClickSelection(){return this.selectionType===Re.multiClick}set columnTemplates(e){this._columnTemplates=e,this.translateColumns(e)}get columnTemplates(){return this._columnTemplates}get allRowsSelected(){let e=this.rows&&this.selected&&this.selected.length===this.rows.length;if(this.bodyComponent&&this.selectAllRowsOnPage){const t=this.bodyComponent.indexes;e=this.selected.length===t.last-t.first}return this.selected&&this.rows&&0!==this.rows.length&&e}ngOnInit(){this.recalculate()}ngAfterViewInit(){this.externalSorting||this.sortInternalRows(),"undefined"!=typeof requestAnimationFrame&&requestAnimationFrame(()=>{this.recalculate(),this.externalPaging&&this.scrollbarV&&this.page.emit({count:this.count,pageSize:this.pageSize,limit:this.limit,offset:0})})}ngAfterContentInit(){this.columnTemplates.changes.subscribe(e=>this.translateColumns(e)),this.listenForColumnInputChanges()}translateColumns(e){if(e){const t=e.toArray();t.length&&(this._internalColumns=function(e){const t=[];for(const n of e){const e={},i=Object.getOwnPropertyNames(n);for(const t of i)e[t]=n[t];n.headerTemplate&&(e.headerTemplate=n.headerTemplate),n.cellTemplate&&(e.cellTemplate=n.cellTemplate),n.summaryFunc&&(e.summaryFunc=n.summaryFunc),n.summaryTemplate&&(e.summaryTemplate=n.summaryTemplate),t.push(e)}return t}(t),Ce(this._internalColumns),this.recalculateColumns(),this.sortInternalRows(),this.cd.markForCheck())}}groupArrayBy(e,t){const n=new Map;return e.forEach(e=>{const i=e[t];n.has(i)?n.get(i).push(e):n.set(i,[e])}),Array.from(n,e=>({key:e[0],value:e[1]}))}ngDoCheck(){this.rowDiffer.diff(this.rows)&&(this.externalSorting?this._internalRows=[...this.rows]:this.sortInternalRows(),this._internalRows=xe(this._internalRows,ke(this.treeFromRelation),ke(this.treeToRelation)),this.recalculatePages(),this.cd.markForCheck())}recalculate(){this.recalculateDims(),this.recalculateColumns(),this.cd.markForCheck()}onWindowResize(){this.recalculate()}recalculateColumns(e=this._internalColumns,t=-1,n=this.scrollbarH){if(!e)return;let i=this._innerWidth;return this.scrollbarV&&(i-=this.scrollbarHelper.width),this.columnMode===Le.force?function(e,t,n,i,r=300){const s=e.slice(n+1,e.length).filter(e=>!1!==e.canAutoResize);for(const d of s)d.$$oldWidth||(d.$$oldWidth=d.width);let o=0,a=!1,c=at(e,r),l=t-c;const u=[];do{o=l/s.length,a=c>=t;for(const e of s){if(a&&i)e.width=e.$$oldWidth||e.width||r;else{const t=(e.width||r)+o;e.minWidth&&t<e.minWidth?(e.width=e.minWidth,u.push(e)):e.maxWidth&&t>e.maxWidth?(e.width=e.maxWidth,u.push(e)):e.width=t}e.width=Math.max(0,e.width)}c=at(e),l=t-c,ot(s,u)}while(l>1&&0!==s.length)}(e,i,t,n):this.columnMode===Le.flex&&function(e,t){const n=function(e,t){let n=0;for(const i of e)n+=i.width;return n}(e),i=function(e){let t=0;for(const n of e)t+=n.flexGrow||0;return t}(e),r=$e(e);n!==t&&function(e,t,n){for(const s in e)for(const i of e[s])i.canAutoResize?i.width=0:(t-=i.width,n-=i.flexGrow?i.flexGrow:0);const i={};let r=t;do{const t=r/n;r=0;for(const n in e)for(const s of e[n])if(s.canAutoResize&&!i[s.prop]){const e=s.width+s.flexGrow*t;void 0!==s.minWidth&&e<s.minWidth?(r+=e-s.minWidth,s.width=s.minWidth,i[s.prop]=!0):s.width=e}}while(0!==r)}(r,t,i)}(e,i),e}recalculateDims(){const e=this.dimensionsHelper.getDimensions(this.element);if(this._innerWidth=Math.floor(e.width),this.scrollbarV){let t=e.height;this.headerHeight&&(t-=this.headerHeight),this.footerHeight&&(t-=this.footerHeight),this.bodyHeight=t}this.recalculatePages()}recalculatePages(){this.pageSize=this.calcPageSize(),this.rowCount=this.calcRowCount()}onBodyPage({offset:e}){this.externalPaging&&!this.virtualization||(this.offset=e,this.page.emit({count:this.count,pageSize:this.pageSize,limit:this.limit,offset:this.offset}))}onBodyScroll(e){this._offsetX.next(e.offsetX),this.scroll.emit(e),this.cd.detectChanges()}onFooterPage(e){this.offset=e.page-1,this.bodyComponent.updateOffsetY(this.offset),this.page.emit({count:this.count,pageSize:this.pageSize,limit:this.limit,offset:this.offset}),this.selectAllRowsOnPage&&(this.selected=[],this.select.emit({selected:this.selected}))}calcPageSize(e=this.rows){if(this.scrollbarV&&this.virtualization){const e=Math.ceil(this.bodyHeight/this.rowHeight);return Math.max(e,0)}return void 0!==this.limit?this.limit:e?e.length:0}calcRowCount(e=this.rows){return this.externalPaging?this.count:e?this.groupedRows?this.groupedRows.length:null!=this.treeFromRelation&&null!=this.treeToRelation?this._internalRows.length:e.length:0}onColumnContextmenu({event:e,column:t}){this.tableContextmenu.emit({event:e,type:Ae.header,content:t})}onRowContextmenu({event:e,row:t}){this.tableContextmenu.emit({event:e,type:Ae.body,content:t})}onColumnResize({column:e,newValue:t}){if(void 0===e)return;let n;const i=this._internalColumns.map((i,r)=>((i=Object.assign({},i)).$$id===e.$$id&&(n=r,i.width=t,i.$$oldWidth=t),i));this.recalculateColumns(i,n),this._internalColumns=i,this.resize.emit({column:e,newValue:t})}onColumnReorder({column:e,newValue:t,prevValue:n}){const i=this._internalColumns.map(e=>Object.assign({},e));if(this.swapColumns){const r=i[t];i[t]=e,i[n]=r}else if(t>n){const e=i[n];for(let r=n;r<t;r++)i[r]=i[r+1];i[t]=e}else{const e=i[n];for(let r=n;r>t;r--)i[r]=i[r-1];i[t]=e}this._internalColumns=i,this.reorder.emit({column:e,newValue:t,prevValue:n})}onColumnSort(e){this.selectAllRowsOnPage&&(this.selected=[],this.select.emit({selected:this.selected})),this.sorts=e.sorts,!1===this.externalSorting&&this.sortInternalRows(),this._internalRows=xe(this._internalRows,ke(this.treeFromRelation),ke(this.treeToRelation)),this.offset=0,this.bodyComponent.updateOffsetY(this.offset),this.sort.emit(e)}onHeaderSelect(e){if(this.bodyComponent&&this.selectAllRowsOnPage){const e=this.bodyComponent.indexes.first,t=this.bodyComponent.indexes.last,n=this.selected.length===t-e;this.selected=[],n||this.selected.push(...this._internalRows.slice(e,t))}else{const e=this.selected.length===this.rows.length;this.selected=[],e||this.selected.push(...this.rows)}this.select.emit({selected:this.selected})}onBodySelect(e){this.select.emit(e)}onTreeAction(e){const t=e.row,n=this._rows.findIndex(t=>t[this.treeToRelation]===e.row[this.treeToRelation]);this.treeAction.emit({row:t,rowIndex:n})}ngOnDestroy(){this._subscriptions.forEach(e=>e.unsubscribe())}listenForColumnInputChanges(){this._subscriptions.push(this.columnChangesService.columnInputChanges$.subscribe(()=>{this.columnTemplates&&this.columnTemplates.notifyOnChanges()}))}sortInternalRows(){this._internalRows=function(e,t,n){if(!e)return[];if(!n||!n.length||!t)return[...e];const i=new Map;e.forEach((e,t)=>i.set(e,t));const r=[...e],s=t.reduce((e,t)=>(t.comparator&&"function"==typeof t.comparator&&(e[t.prop]=t.comparator),e),{}),o=n.map(e=>{const t=e.prop;return{prop:t,dir:e.dir,valueGetter:ve(t),compareFn:s[t]||lt}});return r.sort((function(e,t){for(const n of o){const{prop:i,valueGetter:r}=n,s=r(e,i),o=r(t,i),a=n.dir!==ct.desc?n.compareFn(s,o,e,t,n.dir):-n.compareFn(s,o,e,t,n.dir);if(0!==a)return a}return i.has(e)&&i.has(t)?i.get(e)<i.get(t)?-1:1:0}))}(this._internalRows,this._internalColumns,this.sorts)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(ae,4),i.Mb(ce,4),i.Mb(i.h),i.Mb(i.m),i.Mb(i.u),i.Mb(le),i.Mb("configuration",8))},e.\u0275cmp=i.Gb({type:e,selectors:[["ngx-datatable"]],contentQueries:function(e,t,n){var r;1&e&&(i.Fb(n,Ye,!0),i.Fb(n,_e,!0),i.Fb(n,ze,!0),i.Fb(n,je,!1)),2&e&&(i.zc(r=i.hc())&&(t.rowDetail=r.first),i.zc(r=i.hc())&&(t.groupHeader=r.first),i.zc(r=i.hc())&&(t.footer=r.first),i.zc(r=i.hc())&&(t.columnTemplates=r))},viewQuery:function(e,t){var n;1&e&&(i.Tc(it,!0),i.Tc(rt,!0)),2&e&&(i.zc(n=i.hc())&&(t.bodyComponent=n.first),i.zc(n=i.hc())&&(t.headerComponent=n.first))},hostAttrs:[1,"ngx-datatable"],hostVars:22,hostBindings:function(e,t){1&e&&i.gc("resize",(function(){return t.onWindowResize()}),!1,i.Cc),2&e&&i.Eb("fixed-header",t.isFixedHeader)("fixed-row",t.isFixedRow)("scroll-vertical",t.isVertScroll)("virtualized",t.isVirtualized)("scroll-horz",t.isHorScroll)("selectable",t.isSelectable)("checkbox-selection",t.isCheckboxSelection)("cell-selection",t.isCellSelection)("single-selection",t.isSingleSelection)("multi-selection",t.isMultiSelection)("multi-click-selection",t.isMultiClickSelection)},inputs:{selected:"selected",scrollbarV:"scrollbarV",scrollbarH:"scrollbarH",rowHeight:"rowHeight",columnMode:"columnMode",headerHeight:"headerHeight",footerHeight:"footerHeight",externalPaging:"externalPaging",externalSorting:"externalSorting",loadingIndicator:"loadingIndicator",reorderable:"reorderable",swapColumns:"swapColumns",sortType:"sortType",sorts:"sorts",cssClasses:"cssClasses",messages:"messages",groupExpansionDefault:"groupExpansionDefault",selectAllRowsOnPage:"selectAllRowsOnPage",virtualization:"virtualization",summaryRow:"summaryRow",summaryHeight:"summaryHeight",summaryPosition:"summaryPosition",rowIdentity:"rowIdentity",rows:"rows",groupedRows:"groupedRows",groupRowsBy:"groupRowsBy",columns:"columns",limit:"limit",count:"count",offset:"offset",targetMarkerTemplate:"targetMarkerTemplate",selectionType:"selectionType",rowClass:"rowClass",selectCheck:"selectCheck",displayCheck:"displayCheck",trackByProp:"trackByProp",treeFromRelation:"treeFromRelation",treeToRelation:"treeToRelation"},outputs:{scroll:"scroll",activate:"activate",select:"select",sort:"sort",page:"page",reorder:"reorder",resize:"resize",tableContextmenu:"tableContextmenu",treeAction:"treeAction"},decls:5,vars:34,consts:[["visibilityObserver","",3,"visible"],[3,"sorts","sortType","scrollbarH","innerWidth","offsetX","dealsWithGroup","columns","headerHeight","reorderable","targetMarkerTemplate","sortAscendingIcon","sortDescendingIcon","sortUnsetIcon","allRowsSelected","selectionType","sort","resize","reorder","select","columnContextmenu",4,"ngIf"],[3,"groupRowsBy","groupedRows","rows","groupExpansionDefault","scrollbarV","scrollbarH","virtualization","loadingIndicator","externalPaging","rowHeight","rowCount","offset","trackByProp","columns","pageSize","offsetX","rowDetail","groupHeader","selected","innerWidth","bodyHeight","selectionType","emptyMessage","rowIdentity","rowClass","selectCheck","displayCheck","summaryRow","summaryHeight","summaryPosition","page","activate","rowContextmenu","select","scroll","treeAction"],[3,"rowCount","pageSize","offset","footerHeight","footerTemplate","totalMessage","pagerLeftArrowIcon","pagerRightArrowIcon","pagerPreviousIcon","selectedCount","selectedMessage","pagerNextIcon","page",4,"ngIf"],[3,"sorts","sortType","scrollbarH","innerWidth","offsetX","dealsWithGroup","columns","headerHeight","reorderable","targetMarkerTemplate","sortAscendingIcon","sortDescendingIcon","sortUnsetIcon","allRowsSelected","selectionType","sort","resize","reorder","select","columnContextmenu"],[3,"rowCount","pageSize","offset","footerHeight","footerTemplate","totalMessage","pagerLeftArrowIcon","pagerRightArrowIcon","pagerPreviousIcon","selectedCount","selectedMessage","pagerNextIcon","page"]],template:function(e,t){1&e&&(i.Sb(0,"div",0),i.gc("visible",(function(){return t.recalculate()})),i.Mc(1,S,2,17,"datatable-header",1),i.Sb(2,"datatable-body",2),i.gc("page",(function(e){return t.onBodyPage(e)}))("activate",(function(e){return t.activate.emit(e)}))("rowContextmenu",(function(e){return t.onRowContextmenu(e)}))("select",(function(e){return t.onBodySelect(e)}))("scroll",(function(e){return t.onBodyScroll(e)}))("treeAction",(function(e){return t.onTreeAction(e)})),i.jc(3,"async"),i.Rb(),i.Mc(4,M,1,12,"datatable-footer",3),i.Rb()),2&e&&(i.yb(1),i.pc("ngIf",t.headerHeight),i.yb(1),i.pc("groupRowsBy",t.groupRowsBy)("groupedRows",t.groupedRows)("rows",t._internalRows)("groupExpansionDefault",t.groupExpansionDefault)("scrollbarV",t.scrollbarV)("scrollbarH",t.scrollbarH)("virtualization",t.virtualization)("loadingIndicator",t.loadingIndicator)("externalPaging",t.externalPaging)("rowHeight",t.rowHeight)("rowCount",t.rowCount)("offset",t.offset)("trackByProp",t.trackByProp)("columns",t._internalColumns)("pageSize",t.pageSize)("offsetX",i.kc(3,32,t._offsetX))("rowDetail",t.rowDetail)("groupHeader",t.groupHeader)("selected",t.selected)("innerWidth",t._innerWidth)("bodyHeight",t.bodyHeight)("selectionType",t.selectionType)("emptyMessage",t.messages.emptyMessage)("rowIdentity",t.rowIdentity)("rowClass",t.rowClass)("selectCheck",t.selectCheck)("displayCheck",t.displayCheck)("summaryRow",t.summaryRow)("summaryHeight",t.summaryHeight)("summaryPosition",t.summaryPosition),i.yb(2),i.pc("ngIf",t.footerHeight))},directives:function(){return[de,r.r,it,rt,ht]},pipes:function(){return[r.b]},styles:[".ngx-datatable{display:block;justify-content:center;overflow:hidden;position:relative;transform:translateZ(0)}.ngx-datatable [hidden]{display:none!important}.ngx-datatable *,.ngx-datatable :after,.ngx-datatable :before{box-sizing:border-box}.ngx-datatable.scroll-vertical .datatable-body{overflow-y:auto}.ngx-datatable.scroll-vertical.virtualized .datatable-body .datatable-row-wrapper{position:absolute}.ngx-datatable.scroll-horz .datatable-body{-webkit-overflow-scrolling:touch;overflow-x:auto}.ngx-datatable.fixed-header .datatable-header .datatable-header-inner{white-space:nowrap}.ngx-datatable.fixed-header .datatable-header .datatable-header-inner .datatable-header-cell{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ngx-datatable.fixed-row .datatable-scroll,.ngx-datatable.fixed-row .datatable-scroll .datatable-body-row{white-space:nowrap}.ngx-datatable.fixed-row .datatable-scroll .datatable-body-row .datatable-body-cell,.ngx-datatable.fixed-row .datatable-scroll .datatable-body-row .datatable-body-group-cell{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ngx-datatable .datatable-body-row,.ngx-datatable .datatable-header-inner,.ngx-datatable .datatable-row-center{-o-flex-flow:row;display:flex;flex-direction:row;flex-flow:row}.ngx-datatable .datatable-body-cell,.ngx-datatable .datatable-header-cell{display:inline-block;line-height:1.625;overflow-x:hidden;vertical-align:top}.ngx-datatable .datatable-body-cell:focus,.ngx-datatable .datatable-header-cell:focus{outline:none}.ngx-datatable .datatable-row-left,.ngx-datatable .datatable-row-right{z-index:9}.ngx-datatable .datatable-row-center,.ngx-datatable .datatable-row-group,.ngx-datatable .datatable-row-left,.ngx-datatable .datatable-row-right{position:relative}.ngx-datatable .datatable-header{display:block;overflow:hidden}.ngx-datatable .datatable-header .datatable-header-inner{-webkit-align-items:stretch;align-items:stretch}.ngx-datatable .datatable-header .datatable-header-cell{display:inline-block;position:relative}.ngx-datatable .datatable-header .datatable-header-cell.sortable .datatable-header-cell-wrapper{cursor:pointer}.ngx-datatable .datatable-header .datatable-header-cell.longpress .datatable-header-cell-wrapper{cursor:move}.ngx-datatable .datatable-header .datatable-header-cell .sort-btn{cursor:pointer;display:inline-block;line-height:100%;vertical-align:middle}.ngx-datatable .datatable-header .datatable-header-cell .resize-handle,.ngx-datatable .datatable-header .datatable-header-cell .resize-handle--not-resizable{bottom:0;display:inline-block;padding:0 4px;position:absolute;right:0;top:0;visibility:hidden;width:5px}.ngx-datatable .datatable-header .datatable-header-cell .resize-handle{cursor:ew-resize}.ngx-datatable .datatable-header .datatable-header-cell.resizeable:hover .resize-handle,.ngx-datatable .datatable-header .datatable-header-cell:hover .resize-handle--not-resizable{visibility:visible}.ngx-datatable .datatable-header .datatable-header-cell .targetMarker{bottom:0;position:absolute;top:0}.ngx-datatable .datatable-header .datatable-header-cell .targetMarker.dragFromLeft{right:0}.ngx-datatable .datatable-header .datatable-header-cell .targetMarker.dragFromRight{left:0}.ngx-datatable .datatable-header .datatable-header-cell .datatable-header-cell-template-wrap{height:inherit}.ngx-datatable .datatable-body{display:block;position:relative;z-index:10}.ngx-datatable .datatable-body .datatable-scroll{display:inline-block}.ngx-datatable .datatable-body .datatable-row-detail{overflow-y:hidden}.ngx-datatable .datatable-body .datatable-row-wrapper{display:flex;flex-direction:column}.ngx-datatable .datatable-body .datatable-body-row{outline:none}.ngx-datatable .datatable-body .datatable-body-row>div{display:flex}.ngx-datatable .datatable-footer{display:block;overflow:auto;width:100%}.ngx-datatable .datatable-footer .datatable-footer-inner{align-items:center;display:flex;width:100%}.ngx-datatable .datatable-footer .selected-count .page-count{flex:1 1 40%}.ngx-datatable .datatable-footer .selected-count .datatable-pager{flex:1 1 60%}.ngx-datatable .datatable-footer .page-count{flex:1 1 20%}.ngx-datatable .datatable-footer .datatable-pager{flex:1 1 80%;text-align:right}.ngx-datatable .datatable-footer .datatable-pager .pager,.ngx-datatable .datatable-footer .datatable-pager .pager li{display:inline-block;list-style:none;margin:0;padding:0}.ngx-datatable .datatable-footer .datatable-pager .pager li,.ngx-datatable .datatable-footer .datatable-pager .pager li a{outline:none}.ngx-datatable .datatable-footer .datatable-pager .pager li a{cursor:pointer;display:inline-block}.ngx-datatable .datatable-footer .datatable-pager .pager li.disabled a{cursor:not-allowed}"],encapsulation:2,changeDetection:0}),Object(l.b)([function(e,t,n){return{configurable:!0,enumerable:n.enumerable,get:function(){return Object.defineProperty(this,t,{configurable:!0,enumerable:n.enumerable,value:st(n.value,5,void 0)}),this[t]}}}],e.prototype,"onWindowResize",null),e})(),dt=(()=>{class e{constructor(e){this.cd=e,this.sort=new i.o,this.select=new i.o,this.columnContextmenu=new i.o(!1),this.sortFn=this.onSort.bind(this),this.selectFn=this.select.emit.bind(this.select),this.cellContext={column:this.column,sortDir:this.sortDir,sortFn:this.sortFn,allRowsSelected:this.allRowsSelected,selectFn:this.selectFn}}set allRowsSelected(e){this._allRowsSelected=e,this.cellContext.allRowsSelected=e}get allRowsSelected(){return this._allRowsSelected}set column(e){this._column=e,this.cellContext.column=e,this.cd.markForCheck()}get column(){return this._column}set sorts(e){this._sorts=e,this.sortDir=this.calcSortDir(e),this.cellContext.sortDir=this.sortDir,this.sortClass=this.calcSortClass(this.sortDir),this.cd.markForCheck()}get sorts(){return this._sorts}get columnCssClasses(){let e="datatable-header-cell";if(this.column.sortable&&(e+=" sortable"),this.column.resizeable&&(e+=" resizeable"),this.column.headerClass)if("string"==typeof this.column.headerClass)e+=" "+this.column.headerClass;else if("function"==typeof this.column.headerClass){const t=this.column.headerClass({column:this.column});if("string"==typeof t)e+=t;else if("object"==typeof t){const n=Object.keys(t);for(const i of n)!0===t[i]&&(e+=" "+i)}}const t=this.sortDir;return t&&(e+=" sort-active sort-"+t),e}get name(){return void 0===this.column.headerTemplate?this.column.name:void 0}get minWidth(){return this.column.minWidth}get maxWidth(){return this.column.maxWidth}get width(){return this.column.width}get isCheckboxable(){return this.column.checkboxable&&this.column.headerCheckboxable&&this.selectionType===Re.checkbox}onContextmenu(e){this.columnContextmenu.emit({event:e,column:this.column})}ngOnInit(){this.sortClass=this.calcSortClass(this.sortDir)}calcSortDir(e){if(e&&this.column){const t=e.find(e=>e.prop===this.column.prop);if(t)return t.dir}}onSort(){if(!this.column.sortable)return;const e=(t=this.sortDir,this.sortType===Ee.single?t===ct.asc?ct.desc:ct.asc:t?t===ct.asc?ct.desc:void 0:ct.asc);var t;this.sort.emit({column:this.column,prevValue:this.sortDir,newValue:e})}calcSortClass(e){if(this.cellContext.column.sortable)return e===ct.asc?"sort-btn sort-asc "+this.sortAscendingIcon:e===ct.desc?"sort-btn sort-desc "+this.sortDescendingIcon:"sort-btn "+this.sortUnsetIcon}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.h))},e.\u0275cmp=i.Gb({type:e,selectors:[["datatable-header-cell"]],hostAttrs:[1,"datatable-header-cell"],hostVars:11,hostBindings:function(e,t){1&e&&i.gc("contextmenu",(function(e){return t.onContextmenu(e)})),2&e&&(i.zb("title",t.name),i.Ab(t.columnCssClasses),i.Kc("min-width",t.minWidth,"px")("max-width",t.maxWidth,"px")("width",t.width,"px")("height",t.headerHeight,"px"))},inputs:{allRowsSelected:"allRowsSelected",column:"column",sorts:"sorts",sortType:"sortType",sortAscendingIcon:"sortAscendingIcon",sortDescendingIcon:"sortDescendingIcon",sortUnsetIcon:"sortUnsetIcon",isTarget:"isTarget",targetMarkerTemplate:"targetMarkerTemplate",targetMarkerContext:"targetMarkerContext",selectionType:"selectionType",headerHeight:"headerHeight"},outputs:{sort:"sort",select:"select",columnContextmenu:"columnContextmenu"},decls:6,vars:6,consts:[[1,"datatable-header-cell-template-wrap"],[4,"ngIf"],["class","datatable-checkbox",4,"ngIf"],["class","datatable-header-cell-wrapper",4,"ngIf"],[3,"click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"datatable-checkbox"],["type","checkbox",3,"checked","change"],[1,"datatable-header-cell-wrapper"],[1,"datatable-header-cell-label","draggable",3,"innerHTML","click"]],template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Mc(1,x,1,2,void 0,1),i.Mc(2,D,2,1,"label",2),i.Mc(3,T,2,1,"span",3),i.Mc(4,O,1,2,void 0,1),i.Sb(5,"span",4),i.gc("click",(function(){return t.onSort()})),i.Rb(),i.Rb()),2&e&&(i.yb(1),i.pc("ngIf",t.isTarget),i.yb(1),i.pc("ngIf",t.isCheckboxable),i.yb(1),i.pc("ngIf",!t.column.headerTemplate),i.yb(1),i.pc("ngIf",t.column.headerTemplate),i.yb(1),i.Ab(t.sortClass))},directives:[r.r,r.w],encapsulation:2,changeDetection:0}),e})(),ht=(()=>{class e{constructor(){this.selectedCount=0,this.page=new i.o}get isVisible(){return this.rowCount/this.pageSize>1}get curPage(){return this.offset+1}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["datatable-footer"]],hostAttrs:[1,"datatable-footer"],inputs:{selectedCount:"selectedCount",footerHeight:"footerHeight",rowCount:"rowCount",pageSize:"pageSize",offset:"offset",pagerLeftArrowIcon:"pagerLeftArrowIcon",pagerRightArrowIcon:"pagerRightArrowIcon",pagerPreviousIcon:"pagerPreviousIcon",pagerNextIcon:"pagerNextIcon",totalMessage:"totalMessage",footerTemplate:"footerTemplate",selectedMessage:"selectedMessage"},outputs:{page:"page"},decls:4,vars:8,consts:[[1,"datatable-footer-inner",3,"ngClass"],[4,"ngIf"],["class","page-count",4,"ngIf"],[3,"pagerLeftArrowIcon","pagerRightArrowIcon","pagerPreviousIcon","pagerNextIcon","page","size","count","hidden","change",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"page-count"],[3,"pagerLeftArrowIcon","pagerRightArrowIcon","pagerPreviousIcon","pagerNextIcon","page","size","count","hidden","change"]],template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Mc(1,E,1,8,void 0,1),i.Mc(2,I,3,3,"div",2),i.Mc(3,P,1,8,"datatable-pager",3),i.Rb()),2&e&&(i.Kc("height",t.footerHeight,"px"),i.pc("ngClass",i.uc(6,N,t.selectedMessage)),i.yb(1),i.pc("ngIf",t.footerTemplate),i.yb(1),i.pc("ngIf",!t.footerTemplate),i.yb(1),i.pc("ngIf",!t.footerTemplate))},directives:function(){return[r.p,r.r,r.w,ft]},encapsulation:2,changeDetection:0}),e})(),ft=(()=>{class e{constructor(){this.change=new i.o,this._count=0,this._page=1,this._size=0}set size(e){this._size=e,this.pages=this.calcPages()}get size(){return this._size}set count(e){this._count=e,this.pages=this.calcPages()}get count(){return this._count}set page(e){this._page=e,this.pages=this.calcPages()}get page(){return this._page}get totalPages(){const e=this.size<1?1:Math.ceil(this.count/this.size);return Math.max(e||0,1)}canPrevious(){return this.page>1}canNext(){return this.page<this.totalPages}prevPage(){this.selectPage(this.page-1)}nextPage(){this.selectPage(this.page+1)}selectPage(e){e>0&&e<=this.totalPages&&e!==this.page&&(this.page=e,this.change.emit({page:e}))}calcPages(e){const t=[];let n=1,i=this.totalPages;e=e||this.page,5<this.totalPages&&(n=e-Math.floor(2.5),i=e+Math.floor(2.5),n<1?(n=1,i=Math.min(n+5-1,this.totalPages)):i>this.totalPages&&(n=Math.max(this.totalPages-5+1,1),i=this.totalPages));for(let r=n;r<=i;r++)t.push({number:r,text:r});return t}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["datatable-pager"]],hostAttrs:[1,"datatable-pager"],inputs:{size:"size",count:"count",page:"page",pagerLeftArrowIcon:"pagerLeftArrowIcon",pagerRightArrowIcon:"pagerRightArrowIcon",pagerPreviousIcon:"pagerPreviousIcon",pagerNextIcon:"pagerNextIcon"},outputs:{change:"change"},decls:14,vars:21,consts:[[1,"pager"],["role","button","aria-label","go to first page","href","javascript:void(0)",3,"click"],["role","button","aria-label","go to previous page","href","javascript:void(0)",3,"click"],["role","button","class","pages",3,"active",4,"ngFor","ngForOf"],["role","button","aria-label","go to next page","href","javascript:void(0)",3,"click"],["role","button","aria-label","go to last page","href","javascript:void(0)",3,"click"],["role","button",1,"pages"],["href","javascript:void(0)",3,"click"]],template:function(e,t){1&e&&(i.Sb(0,"ul",0),i.Sb(1,"li"),i.Sb(2,"a",1),i.gc("click",(function(){return t.selectPage(1)})),i.Nb(3,"i"),i.Rb(),i.Rb(),i.Sb(4,"li"),i.Sb(5,"a",2),i.gc("click",(function(){return t.prevPage()})),i.Nb(6,"i"),i.Rb(),i.Rb(),i.Mc(7,j,3,4,"li",3),i.Sb(8,"li"),i.Sb(9,"a",4),i.gc("click",(function(){return t.nextPage()})),i.Nb(10,"i"),i.Rb(),i.Rb(),i.Sb(11,"li"),i.Sb(12,"a",5),i.gc("click",(function(){return t.selectPage(t.totalPages)})),i.Nb(13,"i"),i.Rb(),i.Rb(),i.Rb()),2&e&&(i.yb(1),i.Eb("disabled",!t.canPrevious()),i.yb(2),i.Ab(t.pagerPreviousIcon),i.yb(1),i.Eb("disabled",!t.canPrevious()),i.yb(2),i.Ab(t.pagerLeftArrowIcon),i.yb(1),i.pc("ngForOf",t.pages),i.yb(1),i.Eb("disabled",!t.canNext()),i.yb(2),i.Ab(t.pagerRightArrowIcon),i.yb(1),i.Eb("disabled",!t.canNext()),i.yb(2),i.Ab(t.pagerNextIcon))},directives:[r.q],encapsulation:2,changeDetection:0}),e})(),pt=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["datatable-progress"]],decls:3,vars:0,consts:[["role","progressbar",1,"progress-linear"],[1,"container"],[1,"bar"]],template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Sb(1,"div",1),i.Nb(2,"div",2),i.Rb(),i.Rb())},encapsulation:2,changeDetection:0}),e})();var mt=function(e){return e[e.up=38]="up",e[e.down=40]="down",e[e.return=13]="return",e[e.escape=27]="escape",e[e.left=37]="left",e[e.right=39]="right",e}({});let bt=(()=>{class e{constructor(e,t,n,r){this.differs=e,this.scrollbarHelper=t,this.cd=n,this.treeStatus="collapsed",this.activate=new i.o,this.treeAction=new i.o,this._groupStyles={left:{},center:{},right:{}},this._element=r.nativeElement,this._rowDiffer=e.find({}).create()}set columns(e){this._columns=e,this.recalculateColumns(e),this.buildStylesByGroup()}get columns(){return this._columns}set innerWidth(e){if(this._columns){const e=$e(this._columns);this._columnGroupWidths=He(e,this._columns)}this._innerWidth=e,this.recalculateColumns(),this.buildStylesByGroup()}get innerWidth(){return this._innerWidth}set offsetX(e){this._offsetX=e,this.buildStylesByGroup()}get offsetX(){return this._offsetX}get cssClass(){let e="datatable-body-row";if(this.isSelected&&(e+=" active"),this.rowIndex%2!=0&&(e+=" datatable-row-odd"),this.rowIndex%2==0&&(e+=" datatable-row-even"),this.rowClass){const t=this.rowClass(this.row);if("string"==typeof t)e+=" "+t;else if("object"==typeof t){const n=Object.keys(t);for(const i of n)!0===t[i]&&(e+=" "+i)}}return e}get columnsTotalWidths(){return this._columnGroupWidths.total}ngDoCheck(){this._rowDiffer.diff(this.row)&&this.cd.markForCheck()}trackByGroups(e,t){return t.type}columnTrackingFn(e,t){return t.$$id}buildStylesByGroup(){this._groupStyles.left=this.calcStylesByGroup("left"),this._groupStyles.center=this.calcStylesByGroup("center"),this._groupStyles.right=this.calcStylesByGroup("right"),this.cd.markForCheck()}calcStylesByGroup(e){const t=this._columnGroupWidths,n=this.offsetX,i={width:t[e]+"px"};if("left"===e)nt(i,n,0);else if("right"===e){const e=parseInt(this.innerWidth+"",0);nt(i,-1*(t.total-e-n+this.scrollbarHelper.width),0)}return i}onActivate(e,t){e.cellIndex=t,e.rowElement=this._element,this.activate.emit(e)}onKeyDown(e){const t=e.keyCode;(t===mt.return||t===mt.down||t===mt.up||t===mt.left||t===mt.right)&&e.target===this._element&&(e.preventDefault(),e.stopPropagation(),this.activate.emit({type:"keydown",event:e,row:this.row,rowElement:this._element}))}onMouseenter(e){this.activate.emit({type:"mouseenter",event:e,row:this.row,rowElement:this._element})}recalculateColumns(e=this.columns){this._columns=e;const t=$e(this._columns);this._columnsByPin=Ve(this._columns),this._columnGroupWidths=He(t,this._columns)}onTreeAction(){this.treeAction.emit()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.u),i.Mb(ae,4),i.Mb(i.h),i.Mb(i.m))},e.\u0275cmp=i.Gb({type:e,selectors:[["datatable-body-row"]],hostVars:6,hostBindings:function(e,t){1&e&&i.gc("keydown",(function(e){return t.onKeyDown(e)}))("mouseenter",(function(e){return t.onMouseenter(e)})),2&e&&(i.Ab(t.cssClass),i.Kc("width",t.columnsTotalWidths,"px")("height",t.rowHeight,"px"))},inputs:{treeStatus:"treeStatus",columns:"columns",innerWidth:"innerWidth",offsetX:"offsetX",expanded:"expanded",rowClass:"rowClass",row:"row",group:"group",isSelected:"isSelected",rowIndex:"rowIndex",displayCheck:"displayCheck",rowHeight:"rowHeight"},outputs:{activate:"activate",treeAction:"treeAction"},decls:1,vars:2,consts:[[3,"class","ngStyle",4,"ngFor","ngForOf","ngForTrackBy"],[3,"ngStyle"],["tabindex","-1",3,"row","group","expanded","isSelected","rowIndex","column","rowHeight","displayCheck","treeStatus","activate","treeAction",4,"ngFor","ngForOf","ngForTrackBy"],["tabindex","-1",3,"row","group","expanded","isSelected","rowIndex","column","rowHeight","displayCheck","treeStatus","activate","treeAction"]],template:function(e,t){1&e&&i.Mc(0,Y,2,6,"div",0),2&e&&i.pc("ngForOf",t._columnsByPin)("ngForTrackBy",t.trackByGroups)},directives:function(){return[r.q,r.s,_t]},encapsulation:2,changeDetection:0}),e})(),gt=(()=>{class e{constructor(e,t){this.cd=e,this.differs=t,this.rowContextmenu=new i.o(!1),this.groupContext={group:this.row,expanded:this.expanded,rowIndex:this.rowIndex},this.rowContext={row:this.row,expanded:this.expanded,rowIndex:this.rowIndex},this._expanded=!1,this.rowDiffer=t.find({}).create()}set rowIndex(e){this._rowIndex=e,this.rowContext.rowIndex=e,this.groupContext.rowIndex=e,this.cd.markForCheck()}get rowIndex(){return this._rowIndex}set expanded(e){this._expanded=e,this.groupContext.expanded=e,this.rowContext.expanded=e,this.cd.markForCheck()}get expanded(){return this._expanded}ngDoCheck(){this.rowDiffer.diff(this.row)&&(this.rowContext.row=this.row,this.groupContext.group=this.row,this.cd.markForCheck())}onContextmenu(e){this.rowContextmenu.emit({event:e,row:this.row})}getGroupHeaderStyle(){const e={};return e.transform="translate3d("+this.offsetX+"px, 0px, 0px)",e["backface-visibility"]="hidden",e.width=this.innerWidth,e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.h),i.Mb(i.u))},e.\u0275cmp=i.Gb({type:e,selectors:[["datatable-row-wrapper"]],hostAttrs:[1,"datatable-row-wrapper"],hostBindings:function(e,t){1&e&&i.gc("contextmenu",(function(e){return t.onContextmenu(e)}))},inputs:{rowIndex:"rowIndex",expanded:"expanded",innerWidth:"innerWidth",rowDetail:"rowDetail",groupHeader:"groupHeader",offsetX:"offsetX",detailRowHeight:"detailRowHeight",row:"row",groupedRows:"groupedRows"},outputs:{rowContextmenu:"rowContextmenu"},ngContentSelectors:u,decls:3,vars:3,consts:[["class","datatable-group-header",3,"ngStyle",4,"ngIf"],[4,"ngIf"],["class","datatable-row-detail",3,"height",4,"ngIf"],[1,"datatable-group-header",3,"ngStyle"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"datatable-row-detail"]],template:function(e,t){1&e&&(i.oc(),i.Mc(0,H,2,2,"div",0),i.Mc(1,W,1,0,"ng-content",1),i.Mc(2,U,2,3,"div",2)),2&e&&(i.pc("ngIf",t.groupHeader&&t.groupHeader.template),i.yb(1),i.pc("ngIf",t.groupHeader&&t.groupHeader.template&&t.expanded||!t.groupHeader||!t.groupHeader.template),i.yb(1),i.pc("ngIf",t.rowDetail&&t.rowDetail.template&&t.expanded))},directives:[r.r,r.s,r.w],encapsulation:2,changeDetection:0}),e})(),_t=(()=>{class e{constructor(e,t){this.cd=t,this.activate=new i.o,this.treeAction=new i.o,this.isFocused=!1,this.onCheckboxChangeFn=this.onCheckboxChange.bind(this),this.activateFn=this.activate.emit.bind(this.activate),this.cellContext={onCheckboxChangeFn:this.onCheckboxChangeFn,activateFn:this.activateFn,row:this.row,group:this.group,value:this.value,column:this.column,rowHeight:this.rowHeight,isSelected:this.isSelected,rowIndex:this.rowIndex,treeStatus:this.treeStatus,onTreeAction:this.onTreeAction.bind(this)},this._element=e.nativeElement}set group(e){this._group=e,this.cellContext.group=e,this.checkValueUpdates(),this.cd.markForCheck()}get group(){return this._group}set rowHeight(e){this._rowHeight=e,this.cellContext.rowHeight=e,this.checkValueUpdates(),this.cd.markForCheck()}get rowHeight(){return this._rowHeight}set isSelected(e){this._isSelected=e,this.cellContext.isSelected=e,this.cd.markForCheck()}get isSelected(){return this._isSelected}set expanded(e){this._expanded=e,this.cellContext.expanded=e,this.cd.markForCheck()}get expanded(){return this._expanded}set rowIndex(e){this._rowIndex=e,this.cellContext.rowIndex=e,this.checkValueUpdates(),this.cd.markForCheck()}get rowIndex(){return this._rowIndex}set column(e){this._column=e,this.cellContext.column=e,this.checkValueUpdates(),this.cd.markForCheck()}get column(){return this._column}set row(e){this._row=e,this.cellContext.row=e,this.checkValueUpdates(),this.cd.markForCheck()}get row(){return this._row}set sorts(e){this._sorts=e,this.calcSortDir=this.calcSortDir(e)}get sorts(){return this._sorts}set treeStatus(e){this._treeStatus="collapsed"!==e&&"expanded"!==e&&"loading"!==e&&"disabled"!==e?"collapsed":e,this.cellContext.treeStatus=this._treeStatus,this.checkValueUpdates(),this.cd.markForCheck()}get treeStatus(){return this._treeStatus}get columnCssClasses(){let e="datatable-body-cell";if(this.column.cellClass)if("string"==typeof this.column.cellClass)e+=" "+this.column.cellClass;else if("function"==typeof this.column.cellClass){const t=this.column.cellClass({row:this.row,group:this.group,column:this.column,value:this.value,rowHeight:this.rowHeight});if("string"==typeof t)e+=" "+t;else if("object"==typeof t){const n=Object.keys(t);for(const i of n)!0===t[i]&&(e+=" "+i)}}return this.sortDir||(e+=" sort-active"),this.isFocused&&(e+=" active"),this.sortDir===ct.asc&&(e+=" sort-asc"),this.sortDir===ct.desc&&(e+=" sort-desc"),e}get width(){return this.column.width}get minWidth(){return this.column.minWidth}get maxWidth(){return this.column.maxWidth}get height(){const e=this.rowHeight;return isNaN(e)?e:e+"px"}ngDoCheck(){this.checkValueUpdates()}ngOnDestroy(){this.cellTemplate&&this.cellTemplate.clear()}checkValueUpdates(){let e="";if(this.row&&this.column){const t=this.column.$$valueGetter(this.row,this.column.prop),n=this.column.pipe;n?e=n.transform(t):void 0!==e&&(e=t)}else e="";this.value!==e&&(this.value=e,this.cellContext.value=e,this.sanitizedValue=null!=e?this.stripHtml(e):e,this.cd.markForCheck())}onFocus(){this.isFocused=!0}onBlur(){this.isFocused=!1}onClick(e){this.activate.emit({type:"click",event:e,row:this.row,group:this.group,rowHeight:this.rowHeight,column:this.column,value:this.value,cellElement:this._element})}onDblClick(e){this.activate.emit({type:"dblclick",event:e,row:this.row,group:this.group,rowHeight:this.rowHeight,column:this.column,value:this.value,cellElement:this._element})}onKeyDown(e){const t=e.keyCode;(t===mt.return||t===mt.down||t===mt.up||t===mt.left||t===mt.right)&&e.target===this._element&&(e.preventDefault(),e.stopPropagation(),this.activate.emit({type:"keydown",event:e,row:this.row,group:this.group,rowHeight:this.rowHeight,column:this.column,value:this.value,cellElement:this._element}))}onCheckboxChange(e){this.activate.emit({type:"checkbox",event:e,row:this.row,group:this.group,rowHeight:this.rowHeight,column:this.column,value:this.value,cellElement:this._element,treeStatus:"collapsed"})}calcSortDir(e){if(!e)return;const t=e.find(e=>e.prop===this.column.prop);return t?t.dir:void 0}stripHtml(e){return e.replace?e.replace(/<\/?[^>]+(>|$)/g,""):e}onTreeAction(){this.treeAction.emit(this.row)}calcLeftMargin(e,t){return e.isTreeColumn?t.level*(null!=e.treeLevelIndent?e.treeLevelIndent:50):0}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.m),i.Mb(i.h))},e.\u0275cmp=i.Gb({type:e,selectors:[["datatable-body-cell"]],viewQuery:function(e,t){var n;1&e&&i.Jc(G,!0,i.P),2&e&&i.zc(n=i.hc())&&(t.cellTemplate=n.first)},hostVars:10,hostBindings:function(e,t){1&e&&i.gc("focus",(function(){return t.onFocus()}))("blur",(function(){return t.onBlur()}))("click",(function(e){return t.onClick(e)}))("dblclick",(function(e){return t.onDblClick(e)}))("keydown",(function(e){return t.onKeyDown(e)})),2&e&&(i.Ab(t.columnCssClasses),i.Kc("width",t.width,"px")("min-width",t.minWidth,"px")("max-width",t.maxWidth,"px")("height",t.height))},inputs:{group:"group",rowHeight:"rowHeight",isSelected:"isSelected",expanded:"expanded",rowIndex:"rowIndex",column:"column",row:"row",sorts:"sorts",treeStatus:"treeStatus",displayCheck:"displayCheck"},outputs:{activate:"activate",treeAction:"treeAction"},decls:5,vars:6,consts:[[1,"datatable-body-cell-label"],["class","datatable-checkbox",4,"ngIf"],[4,"ngIf"],[3,"title","innerHTML",4,"ngIf"],[1,"datatable-checkbox"],["type","checkbox",3,"checked","click"],["class","datatable-tree-button",3,"disabled","click",4,"ngIf"],[1,"datatable-tree-button",3,"disabled","click"],["class","icon datatable-icon-collapse",4,"ngIf"],["class","icon datatable-icon-up",4,"ngIf"],["class","icon datatable-icon-down",4,"ngIf"],[1,"icon","datatable-icon-collapse"],[1,"icon","datatable-icon-up"],[1,"icon","datatable-icon-down"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"title","innerHTML"],["cellTemplate",""]],template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Mc(1,q,2,1,"label",1),i.Mc(2,ne,3,2,"ng-container",2),i.Mc(3,ie,1,2,"span",3),i.Mc(4,se,2,2,void 0,2),i.Rb()),2&e&&(i.Kc("margin-left",t.calcLeftMargin(t.column,t.row),"px"),i.yb(1),i.pc("ngIf",t.column.checkboxable&&(!t.displayCheck||t.displayCheck(t.row,t.column,t.value))),i.yb(1),i.pc("ngIf",t.column.isTreeColumn),i.yb(1),i.pc("ngIf",!t.column.cellTemplate),i.yb(1),i.pc("ngIf",t.column.cellTemplate))},directives:[r.r,r.w],encapsulation:2,changeDetection:0}),e})();function yt(e,t,n){const i=n(t,e);return i>-1?e.splice(i,1):e.push(t),e}let vt=(()=>{class e{constructor(){this.activate=new i.o,this.select=new i.o}selectRow(e,t,n){if(!this.selectEnabled)return;const i=this.selectionType===Re.checkbox,r=this.selectionType===Re.multiClick;let s=[];s=this.selectionType===Re.multi||i||r?e.shiftKey?function(e,t,n,i,r){const s=n<i;for(let o=0;o<t.length;o++){const r=t[o],a=o>=i&&o<=n,c=o<=i&&o>=n;let l={start:0,end:0};l=s?{start:n,end:i}:{start:i,end:n+1},(s&&c||!s&&a)&&o>=l.start&&o<=l.end&&e.push(r)}return e}([],this.rows,t,this.prevIndex,this.getRowSelectedIdx.bind(this)):yt(e.ctrlKey||e.metaKey||r||i?[...this.selected]:[],n,this.getRowSelectedIdx.bind(this)):yt([],n,this.getRowSelectedIdx.bind(this)),"function"==typeof this.selectCheck&&(s=s.filter(this.selectCheck.bind(this))),this.selected.splice(0,this.selected.length),this.selected.push(...s),this.prevIndex=t,this.select.emit({selected:s})}onActivate(e,t){const{type:n,event:i,row:r}=e,s=this.selectionType===Re.checkbox;!s&&("click"===n||"dblclick"===n)||s&&"checkbox"===n?this.selectRow(i,t,r):"keydown"===n&&(i.keyCode===mt.return?this.selectRow(i,t,r):this.onKeyboardFocus(e)),this.activate.emit(e)}onKeyboardFocus(e){const{keyCode:t}=e.event;if(t===mt.up||t===mt.down||t===mt.right||t===mt.left){const n=this.selectionType===Re.cell;e.cellElement&&n?n&&this.focusCell(e.cellElement,e.rowElement,t,e.cellIndex):this.focusRow(e.rowElement,t)}}focusRow(e,t){const n=this.getPrevNextRow(e,t);n&&n.focus()}getPrevNextRow(e,t){const n=e.parentElement;if(n){let e;if(t===mt.up?e=n.previousElementSibling:t===mt.down&&(e=n.nextElementSibling),e&&e.children.length)return e.children[0]}}focusCell(e,t,n,i){let r;if(n===mt.left)r=e.previousElementSibling;else if(n===mt.right)r=e.nextElementSibling;else if(n===mt.up||n===mt.down){const e=this.getPrevNextRow(t,n);if(e){const t=e.getElementsByClassName("datatable-body-cell");t.length&&(r=t[i])}}r&&r.focus()}getRowSelected(e){return this.getRowSelectedIdx(e,this.selected)>-1}getRowSelectedIdx(e,t){if(!t||!t.length)return-1;const n=this.rowIdentity(e);return t.findIndex(e=>this.rowIdentity(e)===n)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["datatable-selection"]],inputs:{rows:"rows",selected:"selected",selectEnabled:"selectEnabled",selectionType:"selectionType",rowIdentity:"rowIdentity",selectCheck:"selectCheck"},outputs:{activate:"activate",select:"select"},ngContentSelectors:u,decls:1,vars:0,template:function(e,t){1&e&&(i.oc(),i.nc(0))},encapsulation:2,changeDetection:0}),e})();function wt(e){const t=e.filter(e=>!!e);return t.length?t.some(e=>"number"!=typeof e)?null:t.reduce((e,t)=>e+t):null}function St(e){return null}let Mt=(()=>{class e{constructor(){this.summaryRow={}}ngOnChanges(){this.columns&&this.rows&&(this.updateInternalColumns(),this.updateValues())}updateInternalColumns(){this._internalColumns=this.columns.map(e=>Object.assign(Object.assign({},e),{cellTemplate:e.summaryTemplate}))}updateValues(){this.summaryRow={},this.columns.filter(e=>!e.summaryTemplate).forEach(e=>{const t=this.rows.map(t=>t[e.prop]),n=this.getSummaryFunction(e);this.summaryRow[e.prop]=e.pipe?e.pipe.transform(n(t)):n(t)})}getSummaryFunction(e){return void 0===e.summaryFunc?wt:null===e.summaryFunc?St:e.summaryFunc}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["datatable-summary-row"]],hostAttrs:[1,"datatable-summary-row"],inputs:{rows:"rows",columns:"columns",rowHeight:"rowHeight",offsetX:"offsetX",innerWidth:"innerWidth"},features:[i.wb],decls:1,vars:1,consts:[["tabindex","-1",3,"innerWidth","offsetX","columns","rowHeight","row","rowIndex",4,"ngIf"],["tabindex","-1",3,"innerWidth","offsetX","columns","rowHeight","row","rowIndex"]],template:function(e,t){1&e&&i.Mc(0,oe,1,6,"datatable-body-row",0),2&e&&i.pc("ngIf",t.summaryRow&&t._internalColumns)},directives:[r.r,bt],encapsulation:2}),e})(),kt=(()=>{class e{static forRoot(t){return{ngModule:e,providers:[{provide:"configuration",useValue:t}]}}}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},providers:[ae,ce,le],imports:[[r.c]]}),e})();"undefined"==typeof document||document.elementsFromPoint||(document.elementsFromPoint=function(e,t){const n=[],i=[];let r,s,o;for(;(r=document.elementFromPoint(e,t))&&-1===n.indexOf(r)&&null!=r;)n.push(r),i.push({value:r.style.getPropertyValue("pointer-events"),priority:r.style.getPropertyPriority("pointer-events")}),r.style.setProperty("pointer-events","none","important");for(s=i.length;o=i[--s];)n[s].style.setProperty("pointer-events",o.value?o.value:"",o.priority);return n})},wE6v:function(e,t,n){var i=n("hh1v");e.exports=function(e,t){if(!i(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!i(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},wQk9:function(e,t,n){!function(e){"use strict";e.defineLocale("tzm",{months:"\u2d49\u2d4f\u2d4f\u2d30\u2d62\u2d54_\u2d31\u2d55\u2d30\u2d62\u2d55_\u2d4e\u2d30\u2d55\u2d5a_\u2d49\u2d31\u2d54\u2d49\u2d54_\u2d4e\u2d30\u2d62\u2d62\u2d53_\u2d62\u2d53\u2d4f\u2d62\u2d53_\u2d62\u2d53\u2d4d\u2d62\u2d53\u2d63_\u2d56\u2d53\u2d5b\u2d5c_\u2d5b\u2d53\u2d5c\u2d30\u2d4f\u2d31\u2d49\u2d54_\u2d3d\u2d5f\u2d53\u2d31\u2d55_\u2d4f\u2d53\u2d61\u2d30\u2d4f\u2d31\u2d49\u2d54_\u2d37\u2d53\u2d4a\u2d4f\u2d31\u2d49\u2d54".split("_"),monthsShort:"\u2d49\u2d4f\u2d4f\u2d30\u2d62\u2d54_\u2d31\u2d55\u2d30\u2d62\u2d55_\u2d4e\u2d30\u2d55\u2d5a_\u2d49\u2d31\u2d54\u2d49\u2d54_\u2d4e\u2d30\u2d62\u2d62\u2d53_\u2d62\u2d53\u2d4f\u2d62\u2d53_\u2d62\u2d53\u2d4d\u2d62\u2d53\u2d63_\u2d56\u2d53\u2d5b\u2d5c_\u2d5b\u2d53\u2d5c\u2d30\u2d4f\u2d31\u2d49\u2d54_\u2d3d\u2d5f\u2d53\u2d31\u2d55_\u2d4f\u2d53\u2d61\u2d30\u2d4f\u2d31\u2d49\u2d54_\u2d37\u2d53\u2d4a\u2d4f\u2d31\u2d49\u2d54".split("_"),weekdays:"\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59_\u2d30\u2d62\u2d4f\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59_\u2d30\u2d3d\u2d54\u2d30\u2d59_\u2d30\u2d3d\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59".split("_"),weekdaysShort:"\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59_\u2d30\u2d62\u2d4f\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59_\u2d30\u2d3d\u2d54\u2d30\u2d59_\u2d30\u2d3d\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59".split("_"),weekdaysMin:"\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59_\u2d30\u2d62\u2d4f\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59_\u2d30\u2d3d\u2d54\u2d30\u2d59_\u2d30\u2d3d\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59_\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u2d30\u2d59\u2d37\u2d45 \u2d34] LT",nextDay:"[\u2d30\u2d59\u2d3d\u2d30 \u2d34] LT",nextWeek:"dddd [\u2d34] LT",lastDay:"[\u2d30\u2d5a\u2d30\u2d4f\u2d5c \u2d34] LT",lastWeek:"dddd [\u2d34] LT",sameElse:"L"},relativeTime:{future:"\u2d37\u2d30\u2d37\u2d45 \u2d59 \u2d62\u2d30\u2d4f %s",past:"\u2d62\u2d30\u2d4f %s",s:"\u2d49\u2d4e\u2d49\u2d3d",ss:"%d \u2d49\u2d4e\u2d49\u2d3d",m:"\u2d4e\u2d49\u2d4f\u2d53\u2d3a",mm:"%d \u2d4e\u2d49\u2d4f\u2d53\u2d3a",h:"\u2d59\u2d30\u2d44\u2d30",hh:"%d \u2d5c\u2d30\u2d59\u2d59\u2d30\u2d44\u2d49\u2d4f",d:"\u2d30\u2d59\u2d59",dd:"%d o\u2d59\u2d59\u2d30\u2d4f",M:"\u2d30\u2d62o\u2d53\u2d54",MM:"%d \u2d49\u2d62\u2d62\u2d49\u2d54\u2d4f",y:"\u2d30\u2d59\u2d33\u2d30\u2d59",yy:"%d \u2d49\u2d59\u2d33\u2d30\u2d59\u2d4f"},week:{dow:6,doy:12}})}(n("wd/R"))},"wd/R":function(e,t,n){(function(e){e.exports=function(){"use strict";var t,i;function r(){return t.apply(null,arguments)}function s(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function o(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function c(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(a(e,t))return!1;return!0}function l(e){return void 0===e}function u(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function h(e,t){var n,i=[];for(n=0;n<e.length;++n)i.push(t(e[n],n));return i}function f(e,t){for(var n in t)a(t,n)&&(e[n]=t[n]);return a(t,"toString")&&(e.toString=t.toString),a(t,"valueOf")&&(e.valueOf=t.valueOf),e}function p(e,t,n,i){return kt(e,t,n,i,!0).utc()}function m(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function b(e){if(null==e._isValid){var t=m(e),n=i.call(t.parsedDateParts,(function(e){return null!=e})),r=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(r=r&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return r;e._isValid=r}return e._isValid}function g(e){var t=p(NaN);return null!=e?f(m(t),e):m(t).userInvalidated=!0,t}i=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),i=n.length>>>0;for(t=0;t<i;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var _=r.momentProperties=[],y=!1;function v(e,t){var n,i,r;if(l(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),l(t._i)||(e._i=t._i),l(t._f)||(e._f=t._f),l(t._l)||(e._l=t._l),l(t._strict)||(e._strict=t._strict),l(t._tzm)||(e._tzm=t._tzm),l(t._isUTC)||(e._isUTC=t._isUTC),l(t._offset)||(e._offset=t._offset),l(t._pf)||(e._pf=m(t)),l(t._locale)||(e._locale=t._locale),_.length>0)for(n=0;n<_.length;n++)l(r=t[i=_[n]])||(e[i]=r);return e}function w(e){v(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===y&&(y=!0,r.updateOffset(this),y=!1)}function S(e){return e instanceof w||null!=e&&null!=e._isAMomentObject}function M(e){!1===r.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function k(e,t){var n=!0;return f((function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,e),n){var i,s,o,c=[];for(s=0;s<arguments.length;s++){if(i="","object"==typeof arguments[s]){for(o in i+="\n["+s+"] ",arguments[0])a(arguments[0],o)&&(i+=o+": "+arguments[0][o]+", ");i=i.slice(0,-2)}else i=arguments[s];c.push(i)}M(e+"\nArguments: "+Array.prototype.slice.call(c).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var x,D={};function T(e,t){null!=r.deprecationHandler&&r.deprecationHandler(e,t),D[e]||(M(t),D[e]=!0)}function C(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function O(e,t){var n,i=f({},e);for(n in t)a(t,n)&&(o(e[n])&&o(t[n])?(i[n]={},f(i[n],e[n]),f(i[n],t[n])):null!=t[n]?i[n]=t[n]:delete i[n]);for(n in e)a(e,n)&&!a(t,n)&&o(e[n])&&(i[n]=f({},i[n]));return i}function L(e){null!=e&&this.set(e)}function R(e,t,n){var i=""+Math.abs(e);return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,t-i.length)).toString().substr(1)+i}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,x=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)a(e,t)&&n.push(t);return n};var E=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,A=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,I={},P={};function N(e,t,n,i){var r=i;"string"==typeof i&&(r=function(){return this[i]()}),e&&(P[e]=r),t&&(P[t[0]]=function(){return R(r.apply(this,arguments),t[1],t[2])}),n&&(P[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)})}function j(e,t){return e.isValid()?(t=F(t,e.localeData()),I[t]=I[t]||function(e){var t,n,i,r=e.match(E);for(t=0,n=r.length;t<n;t++)r[t]=P[r[t]]?P[r[t]]:(i=r[t]).match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"");return function(t){var i,s="";for(i=0;i<n;i++)s+=C(r[i])?r[i].call(t,e):r[i];return s}}(t),I[t](e)):e.localeData().invalidDate()}function F(e,t){var n=5;function i(e){return t.longDateFormat(e)||e}for(A.lastIndex=0;n>=0&&A.test(e);)e=e.replace(A,i),A.lastIndex=0,n-=1;return e}var Y={};function z(e,t){var n=e.toLowerCase();Y[n]=Y[n+"s"]=Y[t]=e}function $(e){return"string"==typeof e?Y[e]||Y[e.toLowerCase()]:void 0}function H(e){var t,n,i={};for(n in e)a(e,n)&&(t=$(n))&&(i[t]=e[n]);return i}var W={};function V(e,t){W[e]=t}function B(e){return e%4==0&&e%100!=0||e%400==0}function U(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function G(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=U(t)),n}function q(e,t){return function(n){return null!=n?(Q(this,e,n),r.updateOffset(this,t),this):J(this,e)}}function J(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function Q(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&B(e.year())&&1===e.month()&&29===e.date()?(n=G(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Se(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}var K,Z=/\d/,X=/\d\d/,ee=/\d{3}/,te=/\d{4}/,ne=/[+-]?\d{6}/,ie=/\d\d?/,re=/\d\d\d\d?/,se=/\d\d\d\d\d\d?/,oe=/\d{1,3}/,ae=/\d{1,4}/,ce=/[+-]?\d{1,6}/,le=/\d+/,ue=/[+-]?\d+/,de=/Z|[+-]\d\d:?\d\d/gi,he=/Z|[+-]\d\d(?::?\d\d)?/gi,fe=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function pe(e,t,n){K[e]=C(t)?t:function(e,i){return e&&n?n:t}}function me(e,t){return a(K,e)?K[e](t._strict,t._locale):new RegExp(be(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,i,r){return t||n||i||r}))))}function be(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}K={};var ge,_e={};function ye(e,t){var n,i=t;for("string"==typeof e&&(e=[e]),u(t)&&(i=function(e,n){n[t]=G(e)}),n=0;n<e.length;n++)_e[e[n]]=i}function ve(e,t){ye(e,(function(e,n,i,r){i._w=i._w||{},t(e,i._w,i,r)}))}function we(e,t,n){null!=t&&a(_e,e)&&_e[e](t,n._a,n,e)}function Se(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=(t%12+12)%12;return e+=(t-n)/12,1===n?B(e)?29:28:31-n%7%2}ge=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},N("M",["MM",2],"Mo",(function(){return this.month()+1})),N("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),N("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),z("month","M"),V("month",8),pe("M",ie),pe("MM",ie,X),pe("MMM",(function(e,t){return t.monthsShortRegex(e)})),pe("MMMM",(function(e,t){return t.monthsRegex(e)})),ye(["M","MM"],(function(e,t){t[1]=G(e)-1})),ye(["MMM","MMMM"],(function(e,t,n,i){var r=n._locale.monthsParse(e,i,n._strict);null!=r?t[1]=r:m(n).invalidMonth=e}));var Me="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ke="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),xe=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,De=fe,Te=fe;function Ce(e,t,n){var i,r,s,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)s=p([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(s,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(r=ge.call(this._shortMonthsParse,o))?r:null:-1!==(r=ge.call(this._longMonthsParse,o))?r:null:"MMM"===t?-1!==(r=ge.call(this._shortMonthsParse,o))||-1!==(r=ge.call(this._longMonthsParse,o))?r:null:-1!==(r=ge.call(this._longMonthsParse,o))||-1!==(r=ge.call(this._shortMonthsParse,o))?r:null}function Oe(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=G(t);else if(!u(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Se(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Le(e){return null!=e?(Oe(this,e),r.updateOffset(this,!0),this):J(this,"Month")}function Re(){function e(e,t){return t.length-e.length}var t,n,i=[],r=[],s=[];for(t=0;t<12;t++)n=p([2e3,t]),i.push(this.monthsShort(n,"")),r.push(this.months(n,"")),s.push(this.months(n,"")),s.push(this.monthsShort(n,""));for(i.sort(e),r.sort(e),s.sort(e),t=0;t<12;t++)i[t]=be(i[t]),r[t]=be(r[t]);for(t=0;t<24;t++)s[t]=be(s[t]);this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function Ee(e){return B(e)?366:365}N("Y",0,0,(function(){var e=this.year();return e<=9999?R(e,4):"+"+e})),N(0,["YY",2],0,(function(){return this.year()%100})),N(0,["YYYY",4],0,"year"),N(0,["YYYYY",5],0,"year"),N(0,["YYYYYY",6,!0],0,"year"),z("year","y"),V("year",1),pe("Y",ue),pe("YY",ie,X),pe("YYYY",ae,te),pe("YYYYY",ce,ne),pe("YYYYYY",ce,ne),ye(["YYYYY","YYYYYY"],0),ye("YYYY",(function(e,t){t[0]=2===e.length?r.parseTwoDigitYear(e):G(e)})),ye("YY",(function(e,t){t[0]=r.parseTwoDigitYear(e)})),ye("Y",(function(e,t){t[0]=parseInt(e,10)})),r.parseTwoDigitYear=function(e){return G(e)+(G(e)>68?1900:2e3)};var Ae=q("FullYear",!0);function Ie(e,t,n,i,r,s,o){var a;return e<100&&e>=0?(a=new Date(e+400,t,n,i,r,s,o),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,i,r,s,o),a}function Pe(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ne(e,t,n){var i=7+t-n;return-(7+Pe(e,0,i).getUTCDay()-t)%7+i-1}function je(e,t,n,i,r){var s,o,a=1+7*(t-1)+(7+n-i)%7+Ne(e,i,r);return a<=0?o=Ee(s=e-1)+a:a>Ee(e)?(s=e+1,o=a-Ee(e)):(s=e,o=a),{year:s,dayOfYear:o}}function Fe(e,t,n){var i,r,s=Ne(e.year(),t,n),o=Math.floor((e.dayOfYear()-s-1)/7)+1;return o<1?i=o+Ye(r=e.year()-1,t,n):o>Ye(e.year(),t,n)?(i=o-Ye(e.year(),t,n),r=e.year()+1):(r=e.year(),i=o),{week:i,year:r}}function Ye(e,t,n){var i=Ne(e,t,n),r=Ne(e+1,t,n);return(Ee(e)-i+r)/7}function ze(e,t){return e.slice(t,7).concat(e.slice(0,t))}N("w",["ww",2],"wo","week"),N("W",["WW",2],"Wo","isoWeek"),z("week","w"),z("isoWeek","W"),V("week",5),V("isoWeek",5),pe("w",ie),pe("ww",ie,X),pe("W",ie),pe("WW",ie,X),ve(["w","ww","W","WW"],(function(e,t,n,i){t[i.substr(0,1)]=G(e)})),N("d",0,"do","day"),N("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),N("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),N("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),N("e",0,0,"weekday"),N("E",0,0,"isoWeekday"),z("day","d"),z("weekday","e"),z("isoWeekday","E"),V("day",11),V("weekday",11),V("isoWeekday",11),pe("d",ie),pe("e",ie),pe("E",ie),pe("dd",(function(e,t){return t.weekdaysMinRegex(e)})),pe("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),pe("dddd",(function(e,t){return t.weekdaysRegex(e)})),ve(["dd","ddd","dddd"],(function(e,t,n,i){var r=n._locale.weekdaysParse(e,i,n._strict);null!=r?t.d=r:m(n).invalidWeekday=e})),ve(["d","e","E"],(function(e,t,n,i){t[i]=G(e)}));var $e="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),He="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),We="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ve=fe,Be=fe,Ue=fe;function Ge(e,t,n){var i,r,s,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)s=p([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(s,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(r=ge.call(this._weekdaysParse,o))?r:null:"ddd"===t?-1!==(r=ge.call(this._shortWeekdaysParse,o))?r:null:-1!==(r=ge.call(this._minWeekdaysParse,o))?r:null:"dddd"===t?-1!==(r=ge.call(this._weekdaysParse,o))||-1!==(r=ge.call(this._shortWeekdaysParse,o))||-1!==(r=ge.call(this._minWeekdaysParse,o))?r:null:"ddd"===t?-1!==(r=ge.call(this._shortWeekdaysParse,o))||-1!==(r=ge.call(this._weekdaysParse,o))||-1!==(r=ge.call(this._minWeekdaysParse,o))?r:null:-1!==(r=ge.call(this._minWeekdaysParse,o))||-1!==(r=ge.call(this._weekdaysParse,o))||-1!==(r=ge.call(this._shortWeekdaysParse,o))?r:null}function qe(){function e(e,t){return t.length-e.length}var t,n,i,r,s,o=[],a=[],c=[],l=[];for(t=0;t<7;t++)n=p([2e3,1]).day(t),i=be(this.weekdaysMin(n,"")),r=be(this.weekdaysShort(n,"")),s=be(this.weekdays(n,"")),o.push(i),a.push(r),c.push(s),l.push(i),l.push(r),l.push(s);o.sort(e),a.sort(e),c.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Je(){return this.hours()%12||12}function Qe(e,t){N(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Ke(e,t){return t._meridiemParse}N("H",["HH",2],0,"hour"),N("h",["hh",2],0,Je),N("k",["kk",2],0,(function(){return this.hours()||24})),N("hmm",0,0,(function(){return""+Je.apply(this)+R(this.minutes(),2)})),N("hmmss",0,0,(function(){return""+Je.apply(this)+R(this.minutes(),2)+R(this.seconds(),2)})),N("Hmm",0,0,(function(){return""+this.hours()+R(this.minutes(),2)})),N("Hmmss",0,0,(function(){return""+this.hours()+R(this.minutes(),2)+R(this.seconds(),2)})),Qe("a",!0),Qe("A",!1),z("hour","h"),V("hour",13),pe("a",Ke),pe("A",Ke),pe("H",ie),pe("h",ie),pe("k",ie),pe("HH",ie,X),pe("hh",ie,X),pe("kk",ie,X),pe("hmm",re),pe("hmmss",se),pe("Hmm",re),pe("Hmmss",se),ye(["H","HH"],3),ye(["k","kk"],(function(e,t,n){var i=G(e);t[3]=24===i?0:i})),ye(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),ye(["h","hh"],(function(e,t,n){t[3]=G(e),m(n).bigHour=!0})),ye("hmm",(function(e,t,n){var i=e.length-2;t[3]=G(e.substr(0,i)),t[4]=G(e.substr(i)),m(n).bigHour=!0})),ye("hmmss",(function(e,t,n){var i=e.length-4,r=e.length-2;t[3]=G(e.substr(0,i)),t[4]=G(e.substr(i,2)),t[5]=G(e.substr(r)),m(n).bigHour=!0})),ye("Hmm",(function(e,t,n){var i=e.length-2;t[3]=G(e.substr(0,i)),t[4]=G(e.substr(i))})),ye("Hmmss",(function(e,t,n){var i=e.length-4,r=e.length-2;t[3]=G(e.substr(0,i)),t[4]=G(e.substr(i,2)),t[5]=G(e.substr(r))}));var Ze,Xe=q("Hours",!0),et={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Me,monthsShort:ke,week:{dow:0,doy:6},weekdays:$e,weekdaysMin:We,weekdaysShort:He,meridiemParse:/[ap]\.?m?\.?/i},tt={},nt={};function it(e,t){var n,i=Math.min(e.length,t.length);for(n=0;n<i;n+=1)if(e[n]!==t[n])return n;return i}function rt(e){return e?e.toLowerCase().replace("_","-"):e}function st(t){var i=null;if(void 0===tt[t]&&void 0!==e&&e&&e.exports)try{i=Ze._abbr,n("RnhZ")("./"+t),ot(i)}catch(r){tt[t]=null}return tt[t]}function ot(e,t){var n;return e&&((n=l(t)?ct(e):at(e,t))?Ze=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Ze._abbr}function at(e,t){if(null!==t){var n,i=et;if(t.abbr=e,null!=tt[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=tt[e]._config;else if(null!=t.parentLocale)if(null!=tt[t.parentLocale])i=tt[t.parentLocale]._config;else{if(null==(n=st(t.parentLocale)))return nt[t.parentLocale]||(nt[t.parentLocale]=[]),nt[t.parentLocale].push({name:e,config:t}),null;i=n._config}return tt[e]=new L(O(i,t)),nt[e]&&nt[e].forEach((function(e){at(e.name,e.config)})),ot(e),tt[e]}return delete tt[e],null}function ct(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ze;if(!s(e)){if(t=st(e))return t;e=[e]}return function(e){for(var t,n,i,r,s=0;s<e.length;){for(t=(r=rt(e[s]).split("-")).length,n=(n=rt(e[s+1]))?n.split("-"):null;t>0;){if(i=st(r.slice(0,t).join("-")))return i;if(n&&n.length>=t&&it(r,n)>=t-1)break;t--}s++}return Ze}(e)}function lt(e){var t,n=e._a;return n&&-2===m(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>Se(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,m(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),m(e)._overflowWeeks&&-1===t&&(t=7),m(e)._overflowWeekday&&-1===t&&(t=8),m(e).overflow=t),e}var ut=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,dt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ht=/Z|[+-]\d\d(?::?\d\d)?/,ft=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],pt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],mt=/^\/?Date\((-?\d+)/i,bt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,gt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function _t(e){var t,n,i,r,s,o,a=e._i,c=ut.exec(a)||dt.exec(a);if(c){for(m(e).iso=!0,t=0,n=ft.length;t<n;t++)if(ft[t][1].exec(c[1])){r=ft[t][0],i=!1!==ft[t][2];break}if(null==r)return void(e._isValid=!1);if(c[3]){for(t=0,n=pt.length;t<n;t++)if(pt[t][1].exec(c[3])){s=(c[2]||" ")+pt[t][0];break}if(null==s)return void(e._isValid=!1)}if(!i&&null!=s)return void(e._isValid=!1);if(c[4]){if(!ht.exec(c[4]))return void(e._isValid=!1);o="Z"}e._f=r+(s||"")+(o||""),St(e)}else e._isValid=!1}function yt(e){var t,n,i,r,s,o,a,c,l,u=bt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(u){if(n=u[3],i=u[2],r=u[5],s=u[6],o=u[7],a=[(c=u[4],l=parseInt(c,10),l<=49?2e3+l:l<=999?1900+l:l),ke.indexOf(n),parseInt(i,10),parseInt(r,10),parseInt(s,10)],o&&a.push(parseInt(o,10)),!function(e,t,n){return!e||He.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(m(n).weekdayMismatch=!0,n._isValid=!1,!1)}(u[1],t=a,e))return;e._a=t,e._tzm=function(e,t,n){if(e)return gt[e];if(t)return 0;var i=parseInt(n,10),r=i%100;return(i-r)/100*60+r}(u[8],u[9],u[10]),e._d=Pe.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),m(e).rfc2822=!0}else e._isValid=!1}function vt(e,t,n){return null!=e?e:null!=t?t:n}function wt(e){var t,n,i,s,o,a=[];if(!e._d){for(i=function(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[2]&&null==e._a[1]&&function(e){var t,n,i,r,s,o,a,c,l;null!=(t=e._w).GG||null!=t.W||null!=t.E?(s=1,o=4,n=vt(t.GG,e._a[0],Fe(xt(),1,4).year),i=vt(t.W,1),((r=vt(t.E,1))<1||r>7)&&(c=!0)):(s=e._locale._week.dow,o=e._locale._week.doy,l=Fe(xt(),s,o),n=vt(t.gg,e._a[0],l.year),i=vt(t.w,l.week),null!=t.d?((r=t.d)<0||r>6)&&(c=!0):null!=t.e?(r=t.e+s,(t.e<0||t.e>6)&&(c=!0)):r=s),i<1||i>Ye(n,s,o)?m(e)._overflowWeeks=!0:null!=c?m(e)._overflowWeekday=!0:(a=je(n,i,r,s,o),e._a[0]=a.year,e._dayOfYear=a.dayOfYear)}(e),null!=e._dayOfYear&&(o=vt(e._a[0],i[0]),(e._dayOfYear>Ee(o)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),n=Pe(o,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=i[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Pe:Ie).apply(null,a),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==s&&(m(e).weekdayMismatch=!0)}}function St(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],m(e).empty=!0;var t,n,i,s,o,a,c=""+e._i,l=c.length,u=0;for(i=F(e._f,e._locale).match(E)||[],t=0;t<i.length;t++)(n=(c.match(me(s=i[t],e))||[])[0])&&((o=c.substr(0,c.indexOf(n))).length>0&&m(e).unusedInput.push(o),c=c.slice(c.indexOf(n)+n.length),u+=n.length),P[s]?(n?m(e).empty=!1:m(e).unusedTokens.push(s),we(s,n,e)):e._strict&&!n&&m(e).unusedTokens.push(s);m(e).charsLeftOver=l-u,c.length>0&&m(e).unusedInput.push(c),e._a[3]<=12&&!0===m(e).bigHour&&e._a[3]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[3]=function(e,t,n){var i;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((i=e.isPM(n))&&t<12&&(t+=12),i||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),null!==(a=m(e).era)&&(e._a[0]=e._locale.erasConvertYear(a,e._a[0])),wt(e),lt(e)}else yt(e);else _t(e)}function Mt(e){var t=e._i,n=e._f;return e._locale=e._locale||ct(e._l),null===t||void 0===n&&""===t?g({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),S(t)?new w(lt(t)):(d(t)?e._d=t:s(n)?function(e){var t,n,i,r,s,o,a=!1;if(0===e._f.length)return m(e).invalidFormat=!0,void(e._d=new Date(NaN));for(r=0;r<e._f.length;r++)s=0,o=!1,t=v({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[r],St(t),b(t)&&(o=!0),s+=m(t).charsLeftOver,s+=10*m(t).unusedTokens.length,m(t).score=s,a?s<i&&(i=s,n=t):(null==i||s<i||o)&&(i=s,n=t,o&&(a=!0));f(e,n||t)}(e):n?St(e):function(e){var t=e._i;l(t)?e._d=new Date(r.now()):d(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=mt.exec(e._i);null===t?(_t(e),!1===e._isValid&&(delete e._isValid,yt(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:r.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):s(t)?(e._a=h(t.slice(0),(function(e){return parseInt(e,10)})),wt(e)):o(t)?function(e){if(!e._d){var t=H(e._i);e._a=h([t.year,t.month,void 0===t.day?t.date:t.day,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),wt(e)}}(e):u(t)?e._d=new Date(t):r.createFromInputFallback(e)}(e),b(e)||(e._d=null),e))}function kt(e,t,n,i,r){var a,l={};return!0!==t&&!1!==t||(i=t,t=void 0),!0!==n&&!1!==n||(i=n,n=void 0),(o(e)&&c(e)||s(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=r,l._l=n,l._i=e,l._f=t,l._strict=i,(a=new w(lt(Mt(l))))._nextDay&&(a.add(1,"d"),a._nextDay=void 0),a}function xt(e,t,n,i){return kt(e,t,n,i,!1)}r.createFromInputFallback=k("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),r.ISO_8601=function(){},r.RFC_2822=function(){};var Dt=k("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=xt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:g()})),Tt=k("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=xt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:g()}));function Ct(e,t){var n,i;if(1===t.length&&s(t[0])&&(t=t[0]),!t.length)return xt();for(n=t[0],i=1;i<t.length;++i)t[i].isValid()&&!t[i][e](n)||(n=t[i]);return n}var Ot=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Lt(e){var t=H(e),n=t.year||0,i=t.quarter||0,r=t.month||0,s=t.week||t.isoWeek||0,o=t.day||0,c=t.hour||0,l=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=function(e){var t,n,i=!1;for(t in e)if(a(e,t)&&(-1===ge.call(Ot,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<Ot.length;++n)if(e[Ot[n]]){if(i)return!1;parseFloat(e[Ot[n]])!==G(e[Ot[n]])&&(i=!0)}return!0}(t),this._milliseconds=+d+1e3*u+6e4*l+1e3*c*60*60,this._days=+o+7*s,this._months=+r+3*i+12*n,this._data={},this._locale=ct(),this._bubble()}function Rt(e){return e instanceof Lt}function Et(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function At(e,t){N(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+R(~~(e/60),2)+t+R(~~e%60,2)}))}At("Z",":"),At("ZZ",""),pe("Z",he),pe("ZZ",he),ye(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=Pt(he,e)}));var It=/([\+\-]|\d\d)/gi;function Pt(e,t){var n,i,r=(t||"").match(e);return null===r?null:0===(i=60*(n=((r[r.length-1]||[])+"").match(It)||["-",0,0])[1]+G(n[2]))?0:"+"===n[0]?i:-i}function Nt(e,t){var n,i;return t._isUTC?(n=t.clone(),i=(S(e)||d(e)?e.valueOf():xt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),r.updateOffset(n,!1),n):xt(e).local()}function jt(e){return-Math.round(e._d.getTimezoneOffset())}function Ft(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var Yt=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,zt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function $t(e,t){var n,i,r,s,o,c,l=e,d=null;return Rt(e)?l={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(l={},t?l[t]=+e:l.milliseconds=+e):(d=Yt.exec(e))?(n="-"===d[1]?-1:1,l={y:0,d:G(d[2])*n,h:G(d[3])*n,m:G(d[4])*n,s:G(d[5])*n,ms:G(Et(1e3*d[6]))*n}):(d=zt.exec(e))?l={y:Ht(d[2],n="-"===d[1]?-1:1),M:Ht(d[3],n),w:Ht(d[4],n),d:Ht(d[5],n),h:Ht(d[6],n),m:Ht(d[7],n),s:Ht(d[8],n)}:null==l?l={}:"object"==typeof l&&("from"in l||"to"in l)&&(s=xt(l.from),o=xt(l.to),r=s.isValid()&&o.isValid()?(o=Nt(o,s),s.isBefore(o)?c=Wt(s,o):((c=Wt(o,s)).milliseconds=-c.milliseconds,c.months=-c.months),c):{milliseconds:0,months:0},(l={}).ms=r.milliseconds,l.M=r.months),i=new Lt(l),Rt(e)&&a(e,"_locale")&&(i._locale=e._locale),Rt(e)&&a(e,"_isValid")&&(i._isValid=e._isValid),i}function Ht(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Wt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Vt(e,t){return function(n,i){var r;return null===i||isNaN(+i)||(T(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),r=n,n=i,i=r),Bt(this,$t(n,i),e),this}}function Bt(e,t,n,i){var s=t._milliseconds,o=Et(t._days),a=Et(t._months);e.isValid()&&(i=null==i||i,a&&Oe(e,J(e,"Month")+a*n),o&&Q(e,"Date",J(e,"Date")+o*n),s&&e._d.setTime(e._d.valueOf()+s*n),i&&r.updateOffset(e,o||a))}$t.fn=Lt.prototype,$t.invalid=function(){return $t(NaN)};var Ut=Vt(1,"add"),Gt=Vt(-1,"subtract");function qt(e){return"string"==typeof e||e instanceof String}function Jt(e){return S(e)||d(e)||qt(e)||u(e)||function(e){var t=s(e),n=!1;return t&&(n=0===e.filter((function(t){return!u(t)&&qt(e)})).length),t&&n}(e)||function(e){var t,n=o(e)&&!c(e),i=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"];for(t=0;t<r.length;t+=1)i=i||a(e,r[t]);return n&&i}(e)||null==e}function Qt(e){var t,n=o(e)&&!c(e),i=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<r.length;t+=1)i=i||a(e,r[t]);return n&&i}function Kt(e,t){if(e.date()<t.date())return-Kt(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),i=e.clone().add(n,"months");return-(n+(t-i<0?(t-i)/(i-e.clone().add(n-1,"months")):(t-i)/(e.clone().add(n+1,"months")-i)))||0}function Zt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=ct(e))&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Xt=k("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function en(){return this._locale}var tn=1e3,nn=6e4,rn=36e5,sn=126227808e5;function on(e,t){return(e%t+t)%t}function an(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-sn:new Date(e,t,n).valueOf()}function cn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-sn:Date.UTC(e,t,n)}function ln(e,t){return t.erasAbbrRegex(e)}function un(){var e,t,n=[],i=[],r=[],s=[],o=this.eras();for(e=0,t=o.length;e<t;++e)i.push(be(o[e].name)),n.push(be(o[e].abbr)),r.push(be(o[e].narrow)),s.push(be(o[e].name)),s.push(be(o[e].abbr)),s.push(be(o[e].narrow));this._erasRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+i.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}function dn(e,t){N(0,[e,e.length],0,t)}function hn(e,t,n,i,r){var s;return null==e?Fe(this,i,r).year:(t>(s=Ye(e,i,r))&&(t=s),fn.call(this,e,t,n,i,r))}function fn(e,t,n,i,r){var s=je(e,t,n,i,r),o=Pe(s.year,0,s.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}N("N",0,0,"eraAbbr"),N("NN",0,0,"eraAbbr"),N("NNN",0,0,"eraAbbr"),N("NNNN",0,0,"eraName"),N("NNNNN",0,0,"eraNarrow"),N("y",["y",1],"yo","eraYear"),N("y",["yy",2],0,"eraYear"),N("y",["yyy",3],0,"eraYear"),N("y",["yyyy",4],0,"eraYear"),pe("N",ln),pe("NN",ln),pe("NNN",ln),pe("NNNN",(function(e,t){return t.erasNameRegex(e)})),pe("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),ye(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,i){var r=n._locale.erasParse(e,i,n._strict);r?m(n).era=r:m(n).invalidEra=e})),pe("y",le),pe("yy",le),pe("yyy",le),pe("yyyy",le),pe("yo",(function(e,t){return t._eraYearOrdinalRegex||le})),ye(["y","yy","yyy","yyyy"],0),ye(["yo"],(function(e,t,n,i){var r;n._locale._eraYearOrdinalRegex&&(r=e.match(n._locale._eraYearOrdinalRegex)),t[0]=n._locale.eraYearOrdinalParse?n._locale.eraYearOrdinalParse(e,r):parseInt(e,10)})),N(0,["gg",2],0,(function(){return this.weekYear()%100})),N(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),dn("gggg","weekYear"),dn("ggggg","weekYear"),dn("GGGG","isoWeekYear"),dn("GGGGG","isoWeekYear"),z("weekYear","gg"),z("isoWeekYear","GG"),V("weekYear",1),V("isoWeekYear",1),pe("G",ue),pe("g",ue),pe("GG",ie,X),pe("gg",ie,X),pe("GGGG",ae,te),pe("gggg",ae,te),pe("GGGGG",ce,ne),pe("ggggg",ce,ne),ve(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,i){t[i.substr(0,2)]=G(e)})),ve(["gg","GG"],(function(e,t,n,i){t[i]=r.parseTwoDigitYear(e)})),N("Q",0,"Qo","quarter"),z("quarter","Q"),V("quarter",7),pe("Q",Z),ye("Q",(function(e,t){t[1]=3*(G(e)-1)})),N("D",["DD",2],"Do","date"),z("date","D"),V("date",9),pe("D",ie),pe("DD",ie,X),pe("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),ye(["D","DD"],2),ye("Do",(function(e,t){t[2]=G(e.match(ie)[0])}));var pn=q("Date",!0);N("DDD",["DDDD",3],"DDDo","dayOfYear"),z("dayOfYear","DDD"),V("dayOfYear",4),pe("DDD",oe),pe("DDDD",ee),ye(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=G(e)})),N("m",["mm",2],0,"minute"),z("minute","m"),V("minute",14),pe("m",ie),pe("mm",ie,X),ye(["m","mm"],4);var mn=q("Minutes",!1);N("s",["ss",2],0,"second"),z("second","s"),V("second",15),pe("s",ie),pe("ss",ie,X),ye(["s","ss"],5);var bn,gn,_n=q("Seconds",!1);for(N("S",0,0,(function(){return~~(this.millisecond()/100)})),N(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),N(0,["SSS",3],0,"millisecond"),N(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),N(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),N(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),N(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),N(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),N(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),z("millisecond","ms"),V("millisecond",16),pe("S",oe,Z),pe("SS",oe,X),pe("SSS",oe,ee),bn="SSSS";bn.length<=9;bn+="S")pe(bn,le);function yn(e,t){t[6]=G(1e3*("0."+e))}for(bn="S";bn.length<=9;bn+="S")ye(bn,yn);gn=q("Milliseconds",!1),N("z",0,0,"zoneAbbr"),N("zz",0,0,"zoneName");var vn=w.prototype;function wn(e){return e}vn.add=Ut,vn.calendar=function(e,t){1===arguments.length&&(arguments[0]?Jt(arguments[0])?(e=arguments[0],t=void 0):Qt(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||xt(),i=Nt(n,this).startOf("day"),s=r.calendarFormat(this,i)||"sameElse",o=t&&(C(t[s])?t[s].call(this,n):t[s]);return this.format(o||this.localeData().calendar(s,this,xt(n)))},vn.clone=function(){return new w(this)},vn.diff=function(e,t,n){var i,r,s;if(!this.isValid())return NaN;if(!(i=Nt(e,this)).isValid())return NaN;switch(r=6e4*(i.utcOffset()-this.utcOffset()),t=$(t)){case"year":s=Kt(this,i)/12;break;case"month":s=Kt(this,i);break;case"quarter":s=Kt(this,i)/3;break;case"second":s=(this-i)/1e3;break;case"minute":s=(this-i)/6e4;break;case"hour":s=(this-i)/36e5;break;case"day":s=(this-i-r)/864e5;break;case"week":s=(this-i-r)/6048e5;break;default:s=this-i}return n?s:U(s)},vn.endOf=function(e){var t,n;if(void 0===(e=$(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?cn:an,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=rn-on(t+(this._isUTC?0:this.utcOffset()*nn),rn)-1;break;case"minute":t=this._d.valueOf(),t+=nn-on(t,nn)-1;break;case"second":t=this._d.valueOf(),t+=tn-on(t,tn)-1}return this._d.setTime(t),r.updateOffset(this,!0),this},vn.format=function(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=j(this,e);return this.localeData().postformat(t)},vn.from=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||xt(e).isValid())?$t({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},vn.fromNow=function(e){return this.from(xt(),e)},vn.to=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||xt(e).isValid())?$t({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},vn.toNow=function(e){return this.to(xt(),e)},vn.get=function(e){return C(this[e=$(e)])?this[e]():this},vn.invalidAt=function(){return m(this).overflow},vn.isAfter=function(e,t){var n=S(e)?e:xt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=$(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},vn.isBefore=function(e,t){var n=S(e)?e:xt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=$(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},vn.isBetween=function(e,t,n,i){var r=S(e)?e:xt(e),s=S(t)?t:xt(t);return!!(this.isValid()&&r.isValid()&&s.isValid())&&("("===(i=i||"()")[0]?this.isAfter(r,n):!this.isBefore(r,n))&&(")"===i[1]?this.isBefore(s,n):!this.isAfter(s,n))},vn.isSame=function(e,t){var n,i=S(e)?e:xt(e);return!(!this.isValid()||!i.isValid())&&("millisecond"===(t=$(t)||"millisecond")?this.valueOf()===i.valueOf():(n=i.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},vn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},vn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},vn.isValid=function(){return b(this)},vn.lang=Xt,vn.locale=Zt,vn.localeData=en,vn.max=Tt,vn.min=Dt,vn.parsingFlags=function(){return f({},m(this))},vn.set=function(e,t){if("object"==typeof e){var n,i=function(e){var t,n=[];for(t in e)a(e,t)&&n.push({unit:t,priority:W[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}(e=H(e));for(n=0;n<i.length;n++)this[i[n].unit](e[i[n].unit])}else if(C(this[e=$(e)]))return this[e](t);return this},vn.startOf=function(e){var t,n;if(void 0===(e=$(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?cn:an,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=on(t+(this._isUTC?0:this.utcOffset()*nn),rn);break;case"minute":t=this._d.valueOf(),t-=on(t,nn);break;case"second":t=this._d.valueOf(),t-=on(t,tn)}return this._d.setTime(t),r.updateOffset(this,!0),this},vn.subtract=Gt,vn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},vn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},vn.toDate=function(){return new Date(this.valueOf())},vn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?j(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):C(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",j(n,"Z")):j(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},vn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n="moment",i="";return this.isLocal()||(n=0===this.utcOffset()?"moment.utc":"moment.parseZone",i="Z"),e="["+n+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+i+'[")]')},"undefined"!=typeof Symbol&&null!=Symbol.for&&(vn[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),vn.toJSON=function(){return this.isValid()?this.toISOString():null},vn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},vn.unix=function(){return Math.floor(this.valueOf()/1e3)},vn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},vn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},vn.eraName=function(){var e,t,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until)return i[e].name;if(i[e].until<=n&&n<=i[e].since)return i[e].name}return""},vn.eraNarrow=function(){var e,t,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until)return i[e].narrow;if(i[e].until<=n&&n<=i[e].since)return i[e].narrow}return""},vn.eraAbbr=function(){var e,t,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until)return i[e].abbr;if(i[e].until<=n&&n<=i[e].since)return i[e].abbr}return""},vn.eraYear=function(){var e,t,n,i,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(n=s[e].since<=s[e].until?1:-1,i=this.clone().startOf("day").valueOf(),s[e].since<=i&&i<=s[e].until||s[e].until<=i&&i<=s[e].since)return(this.year()-r(s[e].since).year())*n+s[e].offset;return this.year()},vn.year=Ae,vn.isLeapYear=function(){return B(this.year())},vn.weekYear=function(e){return hn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},vn.isoWeekYear=function(e){return hn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},vn.quarter=vn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},vn.month=Le,vn.daysInMonth=function(){return Se(this.year(),this.month())},vn.week=vn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},vn.isoWeek=vn.isoWeeks=function(e){var t=Fe(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},vn.weeksInYear=function(){var e=this.localeData()._week;return Ye(this.year(),e.dow,e.doy)},vn.weeksInWeekYear=function(){var e=this.localeData()._week;return Ye(this.weekYear(),e.dow,e.doy)},vn.isoWeeksInYear=function(){return Ye(this.year(),1,4)},vn.isoWeeksInISOWeekYear=function(){return Ye(this.isoWeekYear(),1,4)},vn.date=pn,vn.day=vn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},vn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},vn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},vn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},vn.hour=vn.hours=Xe,vn.minute=vn.minutes=mn,vn.second=vn.seconds=_n,vn.millisecond=vn.milliseconds=gn,vn.utcOffset=function(e,t,n){var i,s=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Pt(he,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(i=jt(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),s!==e&&(!t||this._changeInProgress?Bt(this,$t(e-s,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?s:jt(this)},vn.utc=function(e){return this.utcOffset(0,e)},vn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(jt(this),"m")),this},vn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Pt(de,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},vn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?xt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},vn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},vn.isLocal=function(){return!!this.isValid()&&!this._isUTC},vn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},vn.isUtc=Ft,vn.isUTC=Ft,vn.zoneAbbr=function(){return this._isUTC?"UTC":""},vn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},vn.dates=k("dates accessor is deprecated. Use date instead.",pn),vn.months=k("months accessor is deprecated. Use month instead",Le),vn.years=k("years accessor is deprecated. Use year instead",Ae),vn.zone=k("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),vn.isDSTShifted=k("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e,t={};return v(t,this),(t=Mt(t))._a?(e=t._isUTC?p(t._a):xt(t._a),this._isDSTShifted=this.isValid()&&function(e,t,n){var i,r=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),o=0;for(i=0;i<r;i++)G(e[i])!==G(t[i])&&o++;return o+s}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}));var Sn=L.prototype;function Mn(e,t,n,i){var r=ct(),s=p().set(i,t);return r[n](s,e)}function kn(e,t,n){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return Mn(e,t,n,"month");var i,r=[];for(i=0;i<12;i++)r[i]=Mn(e,i,n,"month");return r}function xn(e,t,n,i){"boolean"==typeof e?(u(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,u(t)&&(n=t,t=void 0),t=t||"");var r,s=ct(),o=e?s._week.dow:0,a=[];if(null!=n)return Mn(t,(n+o)%7,i,"day");for(r=0;r<7;r++)a[r]=Mn(t,(r+o)%7,i,"day");return a}Sn.calendar=function(e,t,n){var i=this._calendar[e]||this._calendar.sameElse;return C(i)?i.call(t,n):i},Sn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(E).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},Sn.invalidDate=function(){return this._invalidDate},Sn.ordinal=function(e){return this._ordinal.replace("%d",e)},Sn.preparse=wn,Sn.postformat=wn,Sn.relativeTime=function(e,t,n,i){var r=this._relativeTime[n];return C(r)?r(e,t,n,i):r.replace(/%d/i,e)},Sn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return C(n)?n(t):n.replace(/%s/i,t)},Sn.set=function(e){var t,n;for(n in e)a(e,n)&&(C(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},Sn.eras=function(e,t){var n,i,s,o=this._eras||ct("en")._eras;for(n=0,i=o.length;n<i;++n){switch(typeof o[n].since){case"string":s=r(o[n].since).startOf("day"),o[n].since=s.valueOf()}switch(typeof o[n].until){case"undefined":o[n].until=1/0;break;case"string":s=r(o[n].until).startOf("day").valueOf(),o[n].until=s.valueOf()}}return o},Sn.erasParse=function(e,t,n){var i,r,s,o,a,c=this.eras();for(e=e.toUpperCase(),i=0,r=c.length;i<r;++i)if(s=c[i].name.toUpperCase(),o=c[i].abbr.toUpperCase(),a=c[i].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(o===e)return c[i];break;case"NNNN":if(s===e)return c[i];break;case"NNNNN":if(a===e)return c[i]}else if([s,o,a].indexOf(e)>=0)return c[i]},Sn.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*n},Sn.erasAbbrRegex=function(e){return a(this,"_erasAbbrRegex")||un.call(this),e?this._erasAbbrRegex:this._erasRegex},Sn.erasNameRegex=function(e){return a(this,"_erasNameRegex")||un.call(this),e?this._erasNameRegex:this._erasRegex},Sn.erasNarrowRegex=function(e){return a(this,"_erasNarrowRegex")||un.call(this),e?this._erasNarrowRegex:this._erasRegex},Sn.months=function(e,t){return e?s(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||xe).test(t)?"format":"standalone"][e.month()]:s(this._months)?this._months:this._months.standalone},Sn.monthsShort=function(e,t){return e?s(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[xe.test(t)?"format":"standalone"][e.month()]:s(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Sn.monthsParse=function(e,t,n){var i,r,s;if(this._monthsParseExact)return Ce.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(r=p([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(s="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[i]=new RegExp(s.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[i].test(e))return i;if(n&&"MMM"===t&&this._shortMonthsParse[i].test(e))return i;if(!n&&this._monthsParse[i].test(e))return i}},Sn.monthsRegex=function(e){return this._monthsParseExact?(a(this,"_monthsRegex")||Re.call(this),e?this._monthsStrictRegex:this._monthsRegex):(a(this,"_monthsRegex")||(this._monthsRegex=Te),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},Sn.monthsShortRegex=function(e){return this._monthsParseExact?(a(this,"_monthsRegex")||Re.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,"_monthsShortRegex")||(this._monthsShortRegex=De),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},Sn.week=function(e){return Fe(e,this._week.dow,this._week.doy).week},Sn.firstDayOfYear=function(){return this._week.doy},Sn.firstDayOfWeek=function(){return this._week.dow},Sn.weekdays=function(e,t){var n=s(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?ze(n,this._week.dow):e?n[e.day()]:n},Sn.weekdaysMin=function(e){return!0===e?ze(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},Sn.weekdaysShort=function(e){return!0===e?ze(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},Sn.weekdaysParse=function(e,t,n){var i,r,s;if(this._weekdaysParseExact)return Ge.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(r=p([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(s="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(s.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[i].test(e))return i;if(n&&"ddd"===t&&this._shortWeekdaysParse[i].test(e))return i;if(n&&"dd"===t&&this._minWeekdaysParse[i].test(e))return i;if(!n&&this._weekdaysParse[i].test(e))return i}},Sn.weekdaysRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||qe.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=Ve),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},Sn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||qe.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Be),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Sn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||qe.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ue),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Sn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},Sn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},ot("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===G(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=k("moment.lang is deprecated. Use moment.locale instead.",ot),r.langData=k("moment.langData is deprecated. Use moment.localeData instead.",ct);var Dn=Math.abs;function Tn(e,t,n,i){var r=$t(t,n);return e._milliseconds+=i*r._milliseconds,e._days+=i*r._days,e._months+=i*r._months,e._bubble()}function Cn(e){return e<0?Math.floor(e):Math.ceil(e)}function On(e){return 4800*e/146097}function Ln(e){return 146097*e/4800}function Rn(e){return function(){return this.as(e)}}var En=Rn("ms"),An=Rn("s"),In=Rn("m"),Pn=Rn("h"),Nn=Rn("d"),jn=Rn("w"),Fn=Rn("M"),Yn=Rn("Q"),zn=Rn("y");function $n(e){return function(){return this.isValid()?this._data[e]:NaN}}var Hn=$n("milliseconds"),Wn=$n("seconds"),Vn=$n("minutes"),Bn=$n("hours"),Un=$n("days"),Gn=$n("months"),qn=$n("years"),Jn=Math.round,Qn={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Kn(e,t,n,i,r){return r.relativeTime(t||1,!!n,e,i)}var Zn=Math.abs;function Xn(e){return(e>0)-(e<0)||+e}function ei(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,i,r,s,o,a,c=Zn(this._milliseconds)/1e3,l=Zn(this._days),u=Zn(this._months),d=this.asSeconds();return d?(e=U(c/60),t=U(e/60),c%=60,e%=60,n=U(u/12),u%=12,i=c?c.toFixed(3).replace(/\.?0+$/,""):"",r=d<0?"-":"",s=Xn(this._months)!==Xn(d)?"-":"",o=Xn(this._days)!==Xn(d)?"-":"",a=Xn(this._milliseconds)!==Xn(d)?"-":"",r+"P"+(n?s+n+"Y":"")+(u?s+u+"M":"")+(l?o+l+"D":"")+(t||e||c?"T":"")+(t?a+t+"H":"")+(e?a+e+"M":"")+(c?a+i+"S":"")):"P0D"}var ti=Lt.prototype;return ti.isValid=function(){return this._isValid},ti.abs=function(){var e=this._data;return this._milliseconds=Dn(this._milliseconds),this._days=Dn(this._days),this._months=Dn(this._months),e.milliseconds=Dn(e.milliseconds),e.seconds=Dn(e.seconds),e.minutes=Dn(e.minutes),e.hours=Dn(e.hours),e.months=Dn(e.months),e.years=Dn(e.years),this},ti.add=function(e,t){return Tn(this,e,t,1)},ti.subtract=function(e,t){return Tn(this,e,t,-1)},ti.as=function(e){if(!this.isValid())return NaN;var t,n,i=this._milliseconds;if("month"===(e=$(e))||"quarter"===e||"year"===e)switch(n=this._months+On(t=this._days+i/864e5),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Ln(this._months)),e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return 24*t+i/36e5;case"minute":return 1440*t+i/6e4;case"second":return 86400*t+i/1e3;case"millisecond":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+e)}},ti.asMilliseconds=En,ti.asSeconds=An,ti.asMinutes=In,ti.asHours=Pn,ti.asDays=Nn,ti.asWeeks=jn,ti.asMonths=Fn,ti.asQuarters=Yn,ti.asYears=zn,ti.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*G(this._months/12):NaN},ti._bubble=function(){var e,t,n,i,r,s=this._milliseconds,o=this._days,a=this._months,c=this._data;return s>=0&&o>=0&&a>=0||s<=0&&o<=0&&a<=0||(s+=864e5*Cn(Ln(a)+o),o=0,a=0),c.milliseconds=s%1e3,e=U(s/1e3),c.seconds=e%60,t=U(e/60),c.minutes=t%60,n=U(t/60),c.hours=n%24,o+=U(n/24),a+=r=U(On(o)),o-=Cn(Ln(r)),i=U(a/12),a%=12,c.days=o,c.months=a,c.years=i,this},ti.clone=function(){return $t(this)},ti.get=function(e){return e=$(e),this.isValid()?this[e+"s"]():NaN},ti.milliseconds=Hn,ti.seconds=Wn,ti.minutes=Vn,ti.hours=Bn,ti.days=Un,ti.weeks=function(){return U(this.days()/7)},ti.months=Gn,ti.years=qn,ti.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,i,r=!1,s=Qn;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(r=e),"object"==typeof t&&(s=Object.assign({},Qn,t),null!=t.s&&null==t.ss&&(s.ss=t.s-1)),i=function(e,t,n,i){var r=$t(e).abs(),s=Jn(r.as("s")),o=Jn(r.as("m")),a=Jn(r.as("h")),c=Jn(r.as("d")),l=Jn(r.as("M")),u=Jn(r.as("w")),d=Jn(r.as("y")),h=s<=n.ss&&["s",s]||s<n.s&&["ss",s]||o<=1&&["m"]||o<n.m&&["mm",o]||a<=1&&["h"]||a<n.h&&["hh",a]||c<=1&&["d"]||c<n.d&&["dd",c];return null!=n.w&&(h=h||u<=1&&["w"]||u<n.w&&["ww",u]),(h=h||l<=1&&["M"]||l<n.M&&["MM",l]||d<=1&&["y"]||["yy",d])[2]=t,h[3]=+e>0,h[4]=i,Kn.apply(null,h)}(this,!r,s,n=this.localeData()),r&&(i=n.pastFuture(+this,i)),n.postformat(i)},ti.toISOString=ei,ti.toString=ei,ti.toJSON=ei,ti.locale=Zt,ti.localeData=en,ti.toIsoString=k("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ei),ti.lang=Xt,N("X",0,0,"unix"),N("x",0,0,"valueOf"),pe("x",ue),pe("X",/[+-]?\d+(\.\d{1,3})?/),ye("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),ye("x",(function(e,t,n){n._d=new Date(G(e))})),r.version="2.29.1",t=xt,r.fn=vn,r.min=function(){return Ct("isBefore",[].slice.call(arguments,0))},r.max=function(){return Ct("isAfter",[].slice.call(arguments,0))},r.now=function(){return Date.now?Date.now():+new Date},r.utc=p,r.unix=function(e){return xt(1e3*e)},r.months=function(e,t){return kn(e,t,"months")},r.isDate=d,r.locale=ot,r.invalid=g,r.duration=$t,r.isMoment=S,r.weekdays=function(e,t,n){return xn(e,t,n,"weekdays")},r.parseZone=function(){return xt.apply(null,arguments).parseZone()},r.localeData=ct,r.isDuration=Rt,r.monthsShort=function(e,t){return kn(e,t,"monthsShort")},r.weekdaysMin=function(e,t,n){return xn(e,t,n,"weekdaysMin")},r.defineLocale=at,r.updateLocale=function(e,t){if(null!=t){var n,i,r=et;null!=tt[e]&&null!=tt[e].parentLocale?tt[e].set(O(tt[e]._config,t)):(null!=(i=st(e))&&(r=i._config),t=O(r,t),null==i&&(t.abbr=e),(n=new L(t)).parentLocale=tt[e],tt[e]=n),ot(e)}else null!=tt[e]&&(null!=tt[e].parentLocale?(tt[e]=tt[e].parentLocale,e===ot()&&ot(e)):null!=tt[e]&&delete tt[e]);return tt[e]},r.locales=function(){return x(tt)},r.weekdaysShort=function(e,t,n){return xn(e,t,n,"weekdaysShort")},r.normalizeUnits=$,r.relativeTimeRounding=function(e){return void 0===e?Jn:"function"==typeof e&&(Jn=e,!0)},r.relativeTimeThreshold=function(e,t){return void 0!==Qn[e]&&(void 0===t?Qn[e]:(Qn[e]=t,"s"===e&&(Qn.ss=t-1),!0))},r.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},r.prototype=vn,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()}).call(this,n("YuTi")(e))},wg0c:function(e,t,n){var i=n("2oRo"),r=n("WKiH").trim,s=n("WJkJ"),o=i.parseInt,a=/^[+-]?0[Xx]/,c=8!==o(s+"08")||22!==o(s+"0x16");e.exports=c?function(e,t){var n=r(String(e));return o(n,t>>>0||(a.test(n)?16:10))}:o},wnGv:function(e,t,n){"use strict";n.d(t,"a",(function(){return R}));var i=n("8Y7J"),r=n("s7LF"),s=n("LvDl"),o=n.n(s),a=n("oxzT"),c=n("QFaf"),l=n("DNAf"),u=n("a96k"),d=n("SVse"),h=n("NwgZ"),f=n("ANnk"),p=n("f69J"),m=n("G0yt");function b(e,t){if(1&e&&(i.Sb(0,"span",12),i.Oc(1),i.Rb()),2&e){const e=i.ic().$implicit,t=i.ic(2);i.yb(1),i.Qc(" ",t.messages.customValidations[e]," ")}}function g(e,t){if(1&e&&(i.Qb(0),i.Mc(1,b,2,1,"span",11),i.Pb()),2&e){const e=t.$implicit;i.ic();const n=i.Ac(1),r=i.ic();i.yb(1),i.pc("ngIf",r.form.showError("filter",n)&&r.filter.hasError(e))}}const _=function(e){return[e]};function y(e,t){if(1&e&&i.Nb(0,"i",18),2&e){const e=i.ic(3);i.pc("ngClass",i.uc(1,_,e.icons.check))}}function v(e,t){if(1&e&&(i.Qb(0),i.Nb(1,"br"),i.Sb(2,"small",19),i.Oc(3),i.Rb(),i.Pb()),2&e){const e=i.ic().$implicit;i.yb(3),i.Qc(" ",e.description,"\xa0 ")}}const w=function(e){return{"help-block disabled":e}};function S(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",13),i.gc("click",(function(){i.Dc(e);const n=t.$implicit;return i.ic(2).triggerSelection(n)})),i.Sb(1,"div",14),i.Mc(2,y,1,3,"i",15),i.Oc(3," \xa0 "),i.Rb(),i.Sb(4,"div",16),i.Oc(5),i.Mc(6,v,4,1,"ng-container",17),i.Rb(),i.Rb()}if(2&e){const e=t.$implicit,n=i.ic(2);i.pc("ngClass",i.uc(4,w,!(n.data.length!==n.selectionLimit&&e.enabled||e.selected))),i.yb(2),i.pc("ngIf",e.selected),i.yb(3),i.Qc(" ",e.name," "),i.yb(1),i.pc("ngIf",e.description)}}function M(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",20),i.gc("click",(function(){return i.Dc(e),i.ic(2).addCustomOption()})),i.Sb(1,"div",14),i.Nb(2,"i",18),i.Oc(3," \xa0 "),i.Rb(),i.Sb(4,"div",16),i.Oc(5),i.Rb(),i.Rb()}if(2&e){const e=i.ic(2);i.yb(2),i.pc("ngClass",i.uc(3,_,e.icons.tag)),i.yb(3),i.Rc(" ",e.messages.add," '",e.filter.value,"' ")}}function k(e,t){if(1&e&&(i.Sb(0,"span",23),i.Oc(1),i.Rb()),2&e){const e=i.ic(3);i.pc("ngbTooltip",e.messages.selectionLimit.tooltip),i.yb(1),i.Qc(" ",e.messages.selectionLimit.text," ")}}function x(e,t){if(1&e&&(i.Sb(0,"div",21),i.Mc(1,k,2,2,"span",22),i.Rb()),2&e){const e=i.ic(2);i.yb(1),i.pc("ngIf",e.data.length===e.selectionLimit)}}function D(e,t){if(1&e){const e=i.Tb();i.Sb(0,"form",4,5),i.Sb(2,"div"),i.Sb(3,"input",6),i.gc("keyup",(function(t){i.Dc(e);const n=i.ic();return 13==t.keyCode?n.selectOption():n.updateFilter()})),i.Rb(),i.Mc(4,g,2,1,"ng-container",7),i.Rb(),i.Rb(),i.Mc(5,S,7,6,"div",8),i.Mc(6,M,6,5,"div",9),i.Mc(7,x,2,1,"div",10)}if(2&e){const e=i.ic();i.pc("formGroup",e.form),i.yb(3),i.pc("placeholder",e.messages.filter),i.yb(1),i.pc("ngForOf",e.Object.keys(e.messages.customValidations)),i.yb(1),i.pc("ngForOf",e.filteredOptions),i.yb(1),i.pc("ngIf",e.isCreatable()),i.yb(1),i.pc("ngIf",e.data.length===e.selectionLimit)}}function T(e,t){if(1&e&&(i.Sb(0,"a",24),i.nc(1),i.Rb()),2&e){const e=i.ic(),t=i.Ac(1);i.pc("ngClass",e.elemClass)("ngbPopover",t)}}function C(e,t){if(1&e&&(i.Sb(0,"span",25),i.Oc(1),i.Rb()),2&e){const e=i.ic();i.yb(1),i.Qc(" ",e.messages.empty,"\n")}}function O(e,t){if(1&e&&(i.Sb(0,"span",25),i.Oc(1),i.Rb()),2&e){const e=i.ic();i.yb(1),i.Qc(" ",e.messages.noOptions,"\n")}}const L=["*"];let R=(()=>{class e{constructor(){this.data=[],this.options=[],this.messages=new l.a({}),this.customBadges=!1,this.customBadgeValidators=[],this.selection=new i.o,this.Object=Object,this.filteredOptions=[],this.icons=a.a}ngOnInit(){this.initFilter(),this.data.length>0&&this.initMissingOptions(),this.options=o.a.sortBy(this.options,["name"]),this.updateOptions()}initFilter(){this.filter=new r.h("",{validators:this.customBadgeValidators}),this.form=new c.a({filter:this.filter}),this.filteredOptions=[...this.options||[]]}initMissingOptions(){const e=this.options.map(e=>e.name);this.data.filter(t=>-1===e.indexOf(t)).forEach(e=>this.addOption(e)),this.forceOptionsToReflectData()}addOption(e){this.options.push(new u.a(!1,e,"")),this.options=o.a.sortBy(this.options,["name"]),this.triggerSelection(this.options.find(t=>t.name===e))}triggerSelection(e){!e||this.selectionLimit&&!e.selected&&this.data.length>=this.selectionLimit||(e.selected=!e.selected,this.updateOptions(),this.selection.emit({option:e}))}updateOptions(){this.data.splice(0,this.data.length),this.options.forEach(e=>{e.selected&&this.data.push(e.name)}),this.updateFilter()}updateFilter(){this.filteredOptions=this.options.filter(e=>e.name.includes(this.filter.value))}forceOptionsToReflectData(){this.options.forEach(e=>{-1!==this.data.indexOf(e.name)&&(e.selected=!0)})}ngOnChanges(){this.filter&&this.updateFilter(),this.options&&this.data&&0!==this.data.length&&this.forceOptionsToReflectData()}selectOption(){0===this.filteredOptions.length?this.addCustomOption():(this.triggerSelection(this.filteredOptions[0]),this.resetFilter())}addCustomOption(){this.isCreatable()&&(this.addOption(this.filter.value),this.resetFilter())}isCreatable(){return this.customBadges&&this.filter.valid&&this.filter.value.length>0&&this.filteredOptions.every(e=>e.name!==this.filter.value)}resetFilter(){this.filter.setValue(""),this.updateFilter()}removeItem(e){this.triggerSelection(this.options.find(t=>t.name===e&&t.selected))}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-select"]],inputs:{elemClass:"elemClass",data:"data",options:"options",messages:"messages",selectionLimit:"selectionLimit",customBadges:"customBadges",customBadgeValidators:"customBadgeValidators"},outputs:{selection:"selection"},features:[i.wb],ngContentSelectors:L,decls:5,vars:3,consts:[["popTemplate",""],["class","select-menu-edit float-left",3,"ngClass","ngbPopover",4,"ngIf"],["class","form-text text-muted float-left",4,"ngIf"],["class","form-text text-muted float-left",4,"ngIf"],["name","form","novalidate","",3,"formGroup"],["formDir","ngForm"],["type","text","formControlName","filter",1,"form-control","text-center",3,"placeholder","keyup"],[4,"ngFor","ngForOf"],["class","select-menu-item",3,"ngClass","click",4,"ngFor","ngForOf"],["class","select-menu-item",3,"click",4,"ngIf"],["class","is-invalid",4,"ngIf"],["class","invalid-feedback text-center d-block",4,"ngIf"],[1,"invalid-feedback","text-center","d-block"],[1,"select-menu-item",3,"ngClass","click"],[1,"select-menu-item-icon"],["aria-hidden","true",3,"ngClass",4,"ngIf"],[1,"select-menu-item-content"],[4,"ngIf"],["aria-hidden","true",3,"ngClass"],[1,"form-text","text-muted"],[1,"select-menu-item",3,"click"],[1,"is-invalid"],["class","form-text text-muted text-center text-warning",3,"ngbTooltip",4,"ngIf"],[1,"form-text","text-muted","text-center","text-warning",3,"ngbTooltip"],[1,"select-menu-edit","float-left",3,"ngClass","ngbPopover"],[1,"form-text","text-muted","float-left"]],template:function(e,t){1&e&&(i.oc(),i.Mc(0,D,8,6,"ng-template",null,0,i.Nc),i.Mc(2,T,2,2,"a",1),i.Mc(3,C,2,1,"span",2),i.Mc(4,O,2,1,"span",3)),2&e&&(i.yb(2),i.pc("ngIf",t.customBadges||t.options.length>0),i.yb(1),i.pc("ngIf",0===t.data.length&&!(!t.customBadges&&0===t.options.length)),i.yb(1),i.pc("ngIf",!t.customBadges&&0===t.options.length))},directives:[d.r,r.C,r.r,r.k,h.a,f.a,r.d,p.a,r.q,r.i,d.q,d.p,m.D,m.w],styles:[".select-menu-item[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.09);cursor:pointer;display:block;font-size:1rem}.select-menu-item[_ngcontent-%COMP%]:hover{background-color:#e9ecef}.select-menu-item-icon[_ngcontent-%COMP%]{float:left;padding:.5em;width:3em}.select-menu-item-content[_ngcontent-%COMP%]{padding:.5em}.select-menu-item-content[_ngcontent-%COMP%] .form-text[_ngcontent-%COMP%]{display:flex}"]}),e})()},x38r:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var i=function(e){return e.bold="bold",e.sparkline="sparkline",e.perSecond="perSecond",e.checkIcon="checkIcon",e.routerLink="routerLink",e.executing="executing",e.classAdding="classAdding",e.badge="badge",e.map="map",e.truncate="truncate",e}({})},x6pH:function(e,t,n){!function(e){"use strict";e.defineLocale("he",{months:"\u05d9\u05e0\u05d5\u05d0\u05e8_\u05e4\u05d1\u05e8\u05d5\u05d0\u05e8_\u05de\u05e8\u05e5_\u05d0\u05e4\u05e8\u05d9\u05dc_\u05de\u05d0\u05d9_\u05d9\u05d5\u05e0\u05d9_\u05d9\u05d5\u05dc\u05d9_\u05d0\u05d5\u05d2\u05d5\u05e1\u05d8_\u05e1\u05e4\u05d8\u05de\u05d1\u05e8_\u05d0\u05d5\u05e7\u05d8\u05d5\u05d1\u05e8_\u05e0\u05d5\u05d1\u05de\u05d1\u05e8_\u05d3\u05e6\u05de\u05d1\u05e8".split("_"),monthsShort:"\u05d9\u05e0\u05d5\u05f3_\u05e4\u05d1\u05e8\u05f3_\u05de\u05e8\u05e5_\u05d0\u05e4\u05e8\u05f3_\u05de\u05d0\u05d9_\u05d9\u05d5\u05e0\u05d9_\u05d9\u05d5\u05dc\u05d9_\u05d0\u05d5\u05d2\u05f3_\u05e1\u05e4\u05d8\u05f3_\u05d0\u05d5\u05e7\u05f3_\u05e0\u05d5\u05d1\u05f3_\u05d3\u05e6\u05de\u05f3".split("_"),weekdays:"\u05e8\u05d0\u05e9\u05d5\u05df_\u05e9\u05e0\u05d9_\u05e9\u05dc\u05d9\u05e9\u05d9_\u05e8\u05d1\u05d9\u05e2\u05d9_\u05d7\u05de\u05d9\u05e9\u05d9_\u05e9\u05d9\u05e9\u05d9_\u05e9\u05d1\u05ea".split("_"),weekdaysShort:"\u05d0\u05f3_\u05d1\u05f3_\u05d2\u05f3_\u05d3\u05f3_\u05d4\u05f3_\u05d5\u05f3_\u05e9\u05f3".split("_"),weekdaysMin:"\u05d0_\u05d1_\u05d2_\u05d3_\u05d4_\u05d5_\u05e9".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [\u05d1]MMMM YYYY",LLL:"D [\u05d1]MMMM YYYY HH:mm",LLLL:"dddd, D [\u05d1]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[\u05d4\u05d9\u05d5\u05dd \u05d1\u05be]LT",nextDay:"[\u05de\u05d7\u05e8 \u05d1\u05be]LT",nextWeek:"dddd [\u05d1\u05e9\u05e2\u05d4] LT",lastDay:"[\u05d0\u05ea\u05de\u05d5\u05dc \u05d1\u05be]LT",lastWeek:"[\u05d1\u05d9\u05d5\u05dd] dddd [\u05d4\u05d0\u05d7\u05e8\u05d5\u05df \u05d1\u05e9\u05e2\u05d4] LT",sameElse:"L"},relativeTime:{future:"\u05d1\u05e2\u05d5\u05d3 %s",past:"\u05dc\u05e4\u05e0\u05d9 %s",s:"\u05de\u05e1\u05e4\u05e8 \u05e9\u05e0\u05d9\u05d5\u05ea",ss:"%d \u05e9\u05e0\u05d9\u05d5\u05ea",m:"\u05d3\u05e7\u05d4",mm:"%d \u05d3\u05e7\u05d5\u05ea",h:"\u05e9\u05e2\u05d4",hh:function(e){return 2===e?"\u05e9\u05e2\u05ea\u05d9\u05d9\u05dd":e+" \u05e9\u05e2\u05d5\u05ea"},d:"\u05d9\u05d5\u05dd",dd:function(e){return 2===e?"\u05d9\u05d5\u05de\u05d9\u05d9\u05dd":e+" \u05d9\u05de\u05d9\u05dd"},M:"\u05d7\u05d5\u05d3\u05e9",MM:function(e){return 2===e?"\u05d7\u05d5\u05d3\u05e9\u05d9\u05d9\u05dd":e+" \u05d7\u05d5\u05d3\u05e9\u05d9\u05dd"},y:"\u05e9\u05e0\u05d4",yy:function(e){return 2===e?"\u05e9\u05e0\u05ea\u05d9\u05d9\u05dd":e%10==0&&10!==e?e+" \u05e9\u05e0\u05d4":e+" \u05e9\u05e0\u05d9\u05dd"}},meridiemParse:/\u05d0\u05d7\u05d4"\u05e6|\u05dc\u05e4\u05e0\u05d4"\u05e6|\u05d0\u05d7\u05e8\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd|\u05dc\u05e4\u05e0\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd|\u05dc\u05e4\u05e0\u05d5\u05ea \u05d1\u05d5\u05e7\u05e8|\u05d1\u05d1\u05d5\u05e7\u05e8|\u05d1\u05e2\u05e8\u05d1/i,isPM:function(e){return/^(\u05d0\u05d7\u05d4"\u05e6|\u05d0\u05d7\u05e8\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd|\u05d1\u05e2\u05e8\u05d1)$/.test(e)},meridiem:function(e,t,n){return e<5?"\u05dc\u05e4\u05e0\u05d5\u05ea \u05d1\u05d5\u05e7\u05e8":e<10?"\u05d1\u05d1\u05d5\u05e7\u05e8":e<12?n?'\u05dc\u05e4\u05e0\u05d4"\u05e6':"\u05dc\u05e4\u05e0\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd":e<18?n?'\u05d0\u05d7\u05d4"\u05e6':"\u05d0\u05d7\u05e8\u05d9 \u05d4\u05e6\u05d4\u05e8\u05d9\u05d9\u05dd":"\u05d1\u05e2\u05e8\u05d1"}})}(n("wd/R"))},xDBR:function(e,t){e.exports=!1},xTzq:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return o}));var i=n("LvDl"),r=n.n(i);function s(...e){switch(e.length){case 1:return a.apply(void 0,e);case 3:return c.apply(void 0,e);default:throw new Error}}function o(e,t,n){const i="__ignore_"+t;Array.isArray(e[i])?e[i].push(n):e[i]=[n]}function a(e){for(const t of Object.getOwnPropertyNames(e.prototype)){const n=Object.getOwnPropertyDescriptor(e.prototype,t),i="constructor"===t;n.value instanceof Function&&!i&&(c(e.prototype,t,n),Object.defineProperty(e.prototype,t,n))}}function c(e,t,n){void 0===n&&(n=Object.getOwnPropertyDescriptor(e,t));const i=n.value;n.value=function(){const n="__ignore_"+t,s=e[n]||[],o=[];for(let e=0;e<arguments.length;e++)o[e]=r.a.isString(arguments[e])&&-1===s.indexOf(e)?encodeURIComponent(arguments[e]):arguments[e];const a=i.apply(this,o);return a}}},xbPD:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("7o/Q");function r(e=null){return t=>t.lift(new s(e))}class s{constructor(e){this.defaultValue=e}call(e,t){return t.subscribe(new o(e,this.defaultValue))}}class o extends i.a{constructor(e,t){super(e),this.defaultValue=t,this.isEmpty=!0}_next(e){this.isEmpty=!1,this.destination.next(e)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}},xgIS:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n("HDdC"),r=n("DH7j"),s=n("n6bG"),o=n("lJxs");function a(e,t,n,c){return Object(s.a)(n)&&(c=n,n=void 0),c?a(e,t,n).pipe(Object(o.a)(e=>Object(r.a)(e)?c(...e):c(e))):new i.a(i=>{!function e(t,n,i,r,s){let o;if(function(e){return e&&"function"==typeof e.addEventListener&&"function"==typeof e.removeEventListener}(t)){const e=t;t.addEventListener(n,i,s),o=()=>e.removeEventListener(n,i,s)}else if(function(e){return e&&"function"==typeof e.on&&"function"==typeof e.off}(t)){const e=t;t.on(n,i),o=()=>e.off(n,i)}else if(function(e){return e&&"function"==typeof e.addListener&&"function"==typeof e.removeListener}(t)){const e=t;t.addListener(n,i),o=()=>e.removeListener(n,i)}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(let o=0,a=t.length;o<a;o++)e(t[o],n,i,r,s)}r.add(o)}(e,t,(function(e){i.next(arguments.length>1?Array.prototype.slice.call(arguments):e)}),i,n)})}},xrYK:function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},xs3f:function(e,t,n){var i=n("2oRo"),r=n("zk60"),s="__core-js_shared__",o=i[s]||r(s,{});e.exports=o},xutz:function(e,t,n){"use strict";(function(e){var i=n("XqMk"),r="object"==typeof exports&&exports&&!exports.nodeType&&exports,s=r&&"object"==typeof e&&e&&!e.nodeType&&e,o=s&&s.exports===r&&i.a.process,a=function(){try{return s&&s.require&&s.require("util").types||o&&o.binding&&o.binding("util")}catch(e){}}();t.a=a}).call(this,n("3UD+")(e))},yCtX:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("HDdC"),r=n("ngJS"),s=n("jZKg");function o(e,t){return t?Object(s.a)(e,t):new i.a(Object(r.a)(e))}},yGOH:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("8Y7J");let r=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[]]}),e})()},yJti:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var i=function(e){return e[e.ValueOk=0]="ValueOk",e[e.ValueStale=1]="ValueStale",e[e.ValueNone=2]="ValueNone",e[e.ValueException=3]="ValueException",e}({})},yPMs:function(e,t,n){!function(e){"use strict";e.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_N\xebntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_N\xebn_Dhj".split("_"),weekdays:"E Diel_E H\xebn\xeb_E Mart\xeb_E M\xebrkur\xeb_E Enjte_E Premte_E Shtun\xeb".split("_"),weekdaysShort:"Die_H\xebn_Mar_M\xebr_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_M\xeb_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(e){return"M"===e.charAt(0)},meridiem:function(e,t,n){return e<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot n\xeb] LT",nextDay:"[Nes\xebr n\xeb] LT",nextWeek:"dddd [n\xeb] LT",lastDay:"[Dje n\xeb] LT",lastWeek:"dddd [e kaluar n\xeb] LT",sameElse:"L"},relativeTime:{future:"n\xeb %s",past:"%s m\xeb par\xeb",s:"disa sekonda",ss:"%d sekonda",m:"nj\xeb minut\xeb",mm:"%d minuta",h:"nj\xeb or\xeb",hh:"%d or\xeb",d:"nj\xeb dit\xeb",dd:"%d dit\xeb",M:"nj\xeb muaj",MM:"%d muaj",y:"nj\xeb vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},yT6U:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n("LvDl"),r=n.n(i),s=n("8Y7J");let o=(()=>{class e{transform(e,t=!1){let n=e;return(!r.a.isArray(e)||r.a.isArray(e)&&t)&&(n=[e]),n}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=s.Lb({name:"array",type:e,pure:!0}),e})()},yoRg:function(e,t,n){var i=n("UTVS"),r=n("/GqU"),s=n("TWQb").indexOf,o=n("0BK2");e.exports=function(e,t){var n,a=r(e),c=0,l=[];for(n in a)!i(o,n)&&i(a,n)&&l.push(n);for(;t.length>c;)i(a,n=t[c++])&&(~s(l,n)||l.push(n));return l}},"z+Ro":function(e,t,n){"use strict";function i(e){return e&&"function"==typeof e.schedule}n.d(t,"a",(function(){return i}))},z1FC:function(e,t,n){!function(e){"use strict";function t(e,t,n,i){var r={s:["viensas secunds","'iensas secunds"],ss:[e+" secunds",e+" secunds"],m:["'n m\xedut","'iens m\xedut"],mm:[e+" m\xeduts",e+" m\xeduts"],h:["'n \xfeora","'iensa \xfeora"],hh:[e+" \xfeoras",e+" \xfeoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",e+" ars"]};return i||t?r[n][0]:r[n][1]}e.defineLocale("tzl",{months:"Januar_Fevraglh_Mar\xe7_Avr\xefu_Mai_G\xfcn_Julia_Guscht_Setemvar_Listop\xe4ts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_G\xfcn_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"S\xfaladi_L\xfane\xe7i_Maitzi_M\xe1rcuri_Xh\xfaadi_Vi\xe9ner\xe7i_S\xe1turi".split("_"),weekdaysShort:"S\xfal_L\xfan_Mai_M\xe1r_Xh\xfa_Vi\xe9_S\xe1t".split("_"),weekdaysMin:"S\xfa_L\xfa_Ma_M\xe1_Xh_Vi_S\xe1".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(e){return"d'o"===e.toLowerCase()},meridiem:function(e,t,n){return e>11?n?"d'o":"D'O":n?"d'a":"D'A"},calendar:{sameDay:"[oxhi \xe0] LT",nextDay:"[dem\xe0 \xe0] LT",nextWeek:"dddd [\xe0] LT",lastDay:"[ieiri \xe0] LT",lastWeek:"[s\xfcr el] dddd [lasteu \xe0] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},z3Vd:function(e,t,n){!function(e){"use strict";var t="pagh_wa\u2019_cha\u2019_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function n(e,n,i,r){var s=function(e){var n=Math.floor(e%1e3/100),i=Math.floor(e%100/10),r=e%10,s="";return n>0&&(s+=t[n]+"vatlh"),i>0&&(s+=(""!==s?" ":"")+t[i]+"maH"),r>0&&(s+=(""!==s?" ":"")+t[r]),""===s?"pagh":s}(e);switch(i){case"ss":return s+" lup";case"mm":return s+" tup";case"hh":return s+" rep";case"dd":return s+" jaj";case"MM":return s+" jar";case"yy":return s+" DIS"}}e.defineLocale("tlh",{months:"tera\u2019 jar wa\u2019_tera\u2019 jar cha\u2019_tera\u2019 jar wej_tera\u2019 jar loS_tera\u2019 jar vagh_tera\u2019 jar jav_tera\u2019 jar Soch_tera\u2019 jar chorgh_tera\u2019 jar Hut_tera\u2019 jar wa\u2019maH_tera\u2019 jar wa\u2019maH wa\u2019_tera\u2019 jar wa\u2019maH cha\u2019".split("_"),monthsShort:"jar wa\u2019_jar cha\u2019_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa\u2019maH_jar wa\u2019maH wa\u2019_jar wa\u2019maH cha\u2019".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa\u2019leS] LT",nextWeek:"LLL",lastDay:"[wa\u2019Hu\u2019] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:function(e){var t=e;return-1!==e.indexOf("jaj")?t.slice(0,-3)+"leS":-1!==e.indexOf("jar")?t.slice(0,-3)+"waQ":-1!==e.indexOf("DIS")?t.slice(0,-3)+"nem":t+" pIq"},past:function(e){var t=e;return-1!==e.indexOf("jaj")?t.slice(0,-3)+"Hu\u2019":-1!==e.indexOf("jar")?t.slice(0,-3)+"wen":-1!==e.indexOf("DIS")?t.slice(0,-3)+"ben":t+" ret"},s:"puS lup",ss:n,m:"wa\u2019 tup",mm:n,h:"wa\u2019 rep",hh:n,d:"wa\u2019 jaj",dd:n,M:"wa\u2019 jar",MM:n,y:"wa\u2019 DIS",yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n("wd/R"))},z6cu:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var i=n("HDdC");function r(e,t){return new i.a(t?n=>t.schedule(s,0,{error:e,subscriber:n}):t=>t.error(e))}function s({error:e,subscriber:t}){t.error(e)}},zBJ4:function(e,t,n){var i=n("2oRo"),r=n("hh1v"),s=i.document,o=r(s)&&r(s.createElement);e.exports=function(e){return o?s.createElement(e):{}}},zKZe:function(e,t,n){var i=n("I+eb"),r=n("YNrV");i({target:"Object",stat:!0,forced:Object.assign!==r},{assign:r})},zUnb:function(e,t,n){"use strict";n.r(t);var i=n("8Y7J"),r=n("cUpR"),s=n("AytR"),o=n("IheW"),a=n("GS7A");function c(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function l(e){switch(e.length){case 0:return new a.d;case 1:return e[0];default:return new a.k(e)}}function u(e,t,n,i,r={},s={}){const o=[],c=[];let l=-1,u=null;if(i.forEach(e=>{const n=e.offset,i=n==l,d=i&&u||{};Object.keys(e).forEach(n=>{let i=n,c=e[n];if("offset"!==n)switch(i=t.normalizePropertyName(i,o),c){case a.l:c=r[n];break;case a.a:c=s[n];break;default:c=t.normalizeStyleValue(n,i,c,o)}d[i]=c}),i||c.push(d),u=d,l=n}),o.length){const e="\n - ";throw new Error(`Unable to animate due to the following errors:${e}${o.join(e)}`)}return c}function d(e,t,n,i){switch(t){case"start":e.onStart(()=>i(n&&h(n,"start",e)));break;case"done":e.onDone(()=>i(n&&h(n,"done",e)));break;case"destroy":e.onDestroy(()=>i(n&&h(n,"destroy",e)))}}function h(e,t,n){const i=n.totalTime,r=f(e.element,e.triggerName,e.fromState,e.toState,t||e.phaseName,null==i?e.totalTime:i,!!n.disabled),s=e._data;return null!=s&&(r._data=s),r}function f(e,t,n,i,r="",s=0,o){return{element:e,triggerName:t,fromState:n,toState:i,phaseName:r,totalTime:s,disabled:!!o}}function p(e,t,n){let i;return e instanceof Map?(i=e.get(t),i||e.set(t,i=n)):(i=e[t],i||(i=e[t]=n)),i}function m(e){const t=e.indexOf(":");return[e.substring(1,t),e.substr(t+1)]}let b=(e,t)=>!1,g=(e,t)=>!1,_=(e,t,n)=>[];const y=c();(y||"undefined"!=typeof Element)&&(b=(e,t)=>e.contains(t),g=(()=>{if(y||Element.prototype.matches)return(e,t)=>e.matches(t);{const e=Element.prototype,t=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;return t?(e,n)=>t.apply(e,[n]):g}})(),_=(e,t,n)=>{let i=[];if(n)i.push(...e.querySelectorAll(t));else{const n=e.querySelector(t);n&&i.push(n)}return i});let v=null,w=!1;function S(e){v||(v=("undefined"!=typeof document?document.body:null)||{},w=!!v.style&&"WebkitAppearance"in v.style);let t=!0;return v.style&&!function(e){return"ebkit"==e.substring(1,6)}(e)&&(t=e in v.style,!t&&w)&&(t="Webkit"+e.charAt(0).toUpperCase()+e.substr(1)in v.style),t}const M=g,k=b,x=_;function D(e){const t={};return Object.keys(e).forEach(n=>{const i=n.replace(/([a-z])([A-Z])/g,"$1-$2");t[i]=e[n]}),t}let T=(()=>{class e{validateStyleProperty(e){return S(e)}matchesElement(e,t){return M(e,t)}containsElement(e,t){return k(e,t)}query(e,t,n){return x(e,t,n)}computeStyle(e,t,n){return n||""}animate(e,t,n,i,r,s=[],o){return new a.d(n,i)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})(),C=(()=>{class e{}return e.NOOP=new T,e})();const O="ng-enter",L="ng-leave",R="ng-trigger",E=".ng-trigger",A="ng-animating",I=".ng-animating";function P(e){if("number"==typeof e)return e;const t=e.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:N(parseFloat(t[1]),t[2])}function N(e,t){switch(t){case"s":return 1e3*e;default:return e}}function j(e,t,n){return e.hasOwnProperty("duration")?e:function(e,t,n){let i,r=0,s="";if("string"==typeof e){const n=e.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===n)return t.push(`The provided timing value "${e}" is invalid.`),{duration:0,delay:0,easing:""};i=N(parseFloat(n[1]),n[2]);const o=n[3];null!=o&&(r=N(parseFloat(o),n[4]));const a=n[5];a&&(s=a)}else i=e;if(!n){let n=!1,s=t.length;i<0&&(t.push("Duration values below 0 are not allowed for this animation step."),n=!0),r<0&&(t.push("Delay values below 0 are not allowed for this animation step."),n=!0),n&&t.splice(s,0,`The provided timing value "${e}" is invalid.`)}return{duration:i,delay:r,easing:s}}(e,t,n)}function F(e,t={}){return Object.keys(e).forEach(n=>{t[n]=e[n]}),t}function Y(e,t,n={}){if(t)for(let i in e)n[i]=e[i];else F(e,n);return n}function z(e,t,n){return n?t+":"+n+";":""}function $(e){let t="";for(let n=0;n<e.style.length;n++){const i=e.style.item(n);t+=z(0,i,e.style.getPropertyValue(i))}for(const n in e.style)e.style.hasOwnProperty(n)&&!n.startsWith("_")&&(t+=z(0,n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),e.style[n]));e.setAttribute("style",t)}function H(e,t,n){e.style&&(Object.keys(t).forEach(i=>{const r=Q(i);n&&!n.hasOwnProperty(i)&&(n[i]=e.style[r]),e.style[r]=t[i]}),c()&&$(e))}function W(e,t){e.style&&(Object.keys(t).forEach(t=>{const n=Q(t);e.style[n]=""}),c()&&$(e))}function V(e){return Array.isArray(e)?1==e.length?e[0]:Object(a.f)(e):e}const B=new RegExp("{{\\s*(.+?)\\s*}}","g");function U(e){let t=[];if("string"==typeof e){let n;for(;n=B.exec(e);)t.push(n[1]);B.lastIndex=0}return t}function G(e,t,n){const i=e.toString(),r=i.replace(B,(e,i)=>{let r=t[i];return t.hasOwnProperty(i)||(n.push("Please provide a value for the animation param "+i),r=""),r.toString()});return r==i?e:r}function q(e){const t=[];let n=e.next();for(;!n.done;)t.push(n.value),n=e.next();return t}const J=/-+([a-z0-9])/g;function Q(e){return e.replace(J,(...e)=>e[1].toUpperCase())}function K(e,t){return 0===e||0===t}function Z(e,t,n){const i=Object.keys(n);if(i.length&&t.length){let s=t[0],o=[];if(i.forEach(e=>{s.hasOwnProperty(e)||o.push(e),s[e]=n[e]}),o.length)for(var r=1;r<t.length;r++){let n=t[r];o.forEach((function(t){n[t]=ee(e,t)}))}}return t}function X(e,t,n){switch(t.type){case 7:return e.visitTrigger(t,n);case 0:return e.visitState(t,n);case 1:return e.visitTransition(t,n);case 2:return e.visitSequence(t,n);case 3:return e.visitGroup(t,n);case 4:return e.visitAnimate(t,n);case 5:return e.visitKeyframes(t,n);case 6:return e.visitStyle(t,n);case 8:return e.visitReference(t,n);case 9:return e.visitAnimateChild(t,n);case 10:return e.visitAnimateRef(t,n);case 11:return e.visitQuery(t,n);case 12:return e.visitStagger(t,n);default:throw new Error("Unable to resolve animation metadata node #"+t.type)}}function ee(e,t){return window.getComputedStyle(e)[t]}const te="*";function ne(e,t){const n=[];return"string"==typeof e?e.split(/\s*,\s*/).forEach(e=>function(e,t,n){if(":"==e[0]){const i=function(e,t){switch(e){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,t)=>parseFloat(t)>parseFloat(e);case":decrement":return(e,t)=>parseFloat(t)<parseFloat(e);default:return t.push(`The transition alias value "${e}" is not supported`),"* => *"}}(e,n);if("function"==typeof i)return void t.push(i);e=i}const i=e.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return n.push(`The provided transition expression "${e}" is not supported`),t;const r=i[1],s=i[2],o=i[3];t.push(se(r,o)),"<"!=s[0]||r==te&&o==te||t.push(se(o,r))}(e,n,t)):n.push(e),n}const ie=new Set(["true","1"]),re=new Set(["false","0"]);function se(e,t){const n=ie.has(e)||re.has(e),i=ie.has(t)||re.has(t);return(r,s)=>{let o=e==te||e==r,a=t==te||t==s;return!o&&n&&"boolean"==typeof r&&(o=r?ie.has(e):re.has(e)),!a&&i&&"boolean"==typeof s&&(a=s?ie.has(t):re.has(t)),o&&a}}const oe=new RegExp("s*:selfs*,?","g");function ae(e,t,n){return new ce(e).build(t,n)}class ce{constructor(e){this._driver=e}build(e,t){const n=new le(t);return this._resetContextStyleTimingState(n),X(this,V(e),n)}_resetContextStyleTimingState(e){e.currentQuerySelector="",e.collectedStyles={},e.collectedStyles[""]={},e.currentTime=0}visitTrigger(e,t){let n=t.queryCount=0,i=t.depCount=0;const r=[],s=[];return"@"==e.name.charAt(0)&&t.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),e.definitions.forEach(e=>{if(this._resetContextStyleTimingState(t),0==e.type){const n=e,i=n.name;i.toString().split(/\s*,\s*/).forEach(e=>{n.name=e,r.push(this.visitState(n,t))}),n.name=i}else if(1==e.type){const r=this.visitTransition(e,t);n+=r.queryCount,i+=r.depCount,s.push(r)}else t.errors.push("only state() and transition() definitions can sit inside of a trigger()")}),{type:7,name:e.name,states:r,transitions:s,queryCount:n,depCount:i,options:null}}visitState(e,t){const n=this.visitStyle(e.styles,t),i=e.options&&e.options.params||null;if(n.containsDynamicStyles){const r=new Set,s=i||{};if(n.styles.forEach(e=>{if(ue(e)){const t=e;Object.keys(t).forEach(e=>{U(t[e]).forEach(e=>{s.hasOwnProperty(e)||r.add(e)})})}}),r.size){const n=q(r.values());t.errors.push(`state("${e.name}", ...) must define default values for all the following style substitutions: ${n.join(", ")}`)}}return{type:0,name:e.name,style:n,options:i?{params:i}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;const n=X(this,V(e.animation),t);return{type:1,matchers:ne(e.expr,t.errors),animation:n,queryCount:t.queryCount,depCount:t.depCount,options:de(e.options)}}visitSequence(e,t){return{type:2,steps:e.steps.map(e=>X(this,e,t)),options:de(e.options)}}visitGroup(e,t){const n=t.currentTime;let i=0;const r=e.steps.map(e=>{t.currentTime=n;const r=X(this,e,t);return i=Math.max(i,t.currentTime),r});return t.currentTime=i,{type:3,steps:r,options:de(e.options)}}visitAnimate(e,t){const n=function(e,t){let n=null;if(e.hasOwnProperty("duration"))n=e;else if("number"==typeof e)return he(j(e,t).duration,0,"");const i=e;if(i.split(/\s+/).some(e=>"{"==e.charAt(0)&&"{"==e.charAt(1))){const e=he(0,0,"");return e.dynamic=!0,e.strValue=i,e}return n=n||j(i,t),he(n.duration,n.delay,n.easing)}(e.timings,t.errors);let i;t.currentAnimateTimings=n;let r=e.styles?e.styles:Object(a.h)({});if(5==r.type)i=this.visitKeyframes(r,t);else{let r=e.styles,s=!1;if(!r){s=!0;const e={};n.easing&&(e.easing=n.easing),r=Object(a.h)(e)}t.currentTime+=n.duration+n.delay;const o=this.visitStyle(r,t);o.isEmptyStep=s,i=o}return t.currentAnimateTimings=null,{type:4,timings:n,style:i,options:null}}visitStyle(e,t){const n=this._makeStyleAst(e,t);return this._validateStyleAst(n,t),n}_makeStyleAst(e,t){const n=[];Array.isArray(e.styles)?e.styles.forEach(e=>{"string"==typeof e?e==a.a?n.push(e):t.errors.push(`The provided style string value ${e} is not allowed.`):n.push(e)}):n.push(e.styles);let i=!1,r=null;return n.forEach(e=>{if(ue(e)){const t=e,n=t.easing;if(n&&(r=n,delete t.easing),!i)for(let e in t)if(t[e].toString().indexOf("{{")>=0){i=!0;break}}}),{type:6,styles:n,easing:r,offset:e.offset,containsDynamicStyles:i,options:null}}_validateStyleAst(e,t){const n=t.currentAnimateTimings;let i=t.currentTime,r=t.currentTime;n&&r>0&&(r-=n.duration+n.delay),e.styles.forEach(e=>{"string"!=typeof e&&Object.keys(e).forEach(n=>{if(!this._driver.validateStyleProperty(n))return void t.errors.push(`The provided animation property "${n}" is not a supported CSS property for animations`);const s=t.collectedStyles[t.currentQuerySelector],o=s[n];let a=!0;o&&(r!=i&&r>=o.startTime&&i<=o.endTime&&(t.errors.push(`The CSS property "${n}" that exists between the times of "${o.startTime}ms" and "${o.endTime}ms" is also being animated in a parallel animation between the times of "${r}ms" and "${i}ms"`),a=!1),r=o.startTime),a&&(s[n]={startTime:r,endTime:i}),t.options&&function(e,t,n){const i=t.params||{},r=U(e);r.length&&r.forEach(e=>{i.hasOwnProperty(e)||n.push(`Unable to resolve the local animation param ${e} in the given list of values`)})}(e[n],t.options,t.errors)})})}visitKeyframes(e,t){const n={type:5,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push("keyframes() must be placed inside of a call to animate()"),n;let i=0;const r=[];let s=!1,o=!1,a=0;const c=e.steps.map(e=>{const n=this._makeStyleAst(e,t);let c=null!=n.offset?n.offset:function(e){if("string"==typeof e)return null;let t=null;if(Array.isArray(e))e.forEach(e=>{if(ue(e)&&e.hasOwnProperty("offset")){const n=e;t=parseFloat(n.offset),delete n.offset}});else if(ue(e)&&e.hasOwnProperty("offset")){const n=e;t=parseFloat(n.offset),delete n.offset}return t}(n.styles),l=0;return null!=c&&(i++,l=n.offset=c),o=o||l<0||l>1,s=s||l<a,a=l,r.push(l),n});o&&t.errors.push("Please ensure that all keyframe offsets are between 0 and 1"),s&&t.errors.push("Please ensure that all keyframe offsets are in order");const l=e.steps.length;let u=0;i>0&&i<l?t.errors.push("Not all style() steps within the declared keyframes() contain offsets"):0==i&&(u=1/(l-1));const d=l-1,h=t.currentTime,f=t.currentAnimateTimings,p=f.duration;return c.forEach((e,i)=>{const s=u>0?i==d?1:u*i:r[i],o=s*p;t.currentTime=h+f.delay+o,f.duration=o,this._validateStyleAst(e,t),e.offset=s,n.styles.push(e)}),n}visitReference(e,t){return{type:8,animation:X(this,V(e.animation),t),options:de(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:9,options:de(e.options)}}visitAnimateRef(e,t){return{type:10,animation:this.visitReference(e.animation,t),options:de(e.options)}}visitQuery(e,t){const n=t.currentQuerySelector,i=e.options||{};t.queryCount++,t.currentQuery=e;const[r,s]=function(e){const t=!!e.split(/\s*,\s*/).find(e=>":self"==e);return t&&(e=e.replace(oe,"")),[e=e.replace(/@\*/g,E).replace(/@\w+/g,e=>".ng-trigger-"+e.substr(1)).replace(/:animating/g,I),t]}(e.selector);t.currentQuerySelector=n.length?n+" "+r:r,p(t.collectedStyles,t.currentQuerySelector,{});const o=X(this,V(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=n,{type:11,selector:r,limit:i.limit||0,optional:!!i.optional,includeSelf:s,animation:o,originalSelector:e.selector,options:de(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push("stagger() can only be used inside of query()");const n="full"===e.timings?{duration:0,delay:0,easing:"full"}:j(e.timings,t.errors,!0);return{type:12,animation:X(this,V(e.animation),t),timings:n,options:null}}}class le{constructor(e){this.errors=e,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null}}function ue(e){return!Array.isArray(e)&&"object"==typeof e}function de(e){var t;return e?(e=F(e)).params&&(e.params=(t=e.params)?F(t):null):e={},e}function he(e,t,n){return{duration:e,delay:t,easing:n}}function fe(e,t,n,i,r,s,o=null,a=!1){return{type:1,element:e,keyframes:t,preStyleProps:n,postStyleProps:i,duration:r,delay:s,totalTime:r+s,easing:o,subTimeline:a}}class pe{constructor(){this._map=new Map}consume(e){let t=this._map.get(e);return t?this._map.delete(e):t=[],t}append(e,t){let n=this._map.get(e);n||this._map.set(e,n=[]),n.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}}const me=new RegExp(":enter","g"),be=new RegExp(":leave","g");function ge(e,t,n,i,r,s={},o={},a,c,l=[]){return(new _e).buildKeyframes(e,t,n,i,r,s,o,a,c,l)}class _e{buildKeyframes(e,t,n,i,r,s,o,a,c,l=[]){c=c||new pe;const u=new ve(e,t,c,i,r,l,[]);u.options=a,u.currentTimeline.setStyles([s],null,u.errors,a),X(this,n,u);const d=u.timelines.filter(e=>e.containsAnimation());if(d.length&&Object.keys(o).length){const e=d[d.length-1];e.allowOnlyTimelineStyles()||e.setStyles([o],null,u.errors,a)}return d.length?d.map(e=>e.buildKeyframes()):[fe(t,[],[],[],0,0,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){const n=t.subInstructions.consume(t.element);if(n){const i=t.createSubContext(e.options),r=t.currentTimeline.currentTime,s=this._visitSubInstructions(n,i,i.options);r!=s&&t.transformIntoNewTimeline(s)}t.previousNode=e}visitAnimateRef(e,t){const n=t.createSubContext(e.options);n.transformIntoNewTimeline(),this.visitReference(e.animation,n),t.transformIntoNewTimeline(n.currentTimeline.currentTime),t.previousNode=e}_visitSubInstructions(e,t,n){let i=t.currentTimeline.currentTime;const r=null!=n.duration?P(n.duration):null,s=null!=n.delay?P(n.delay):null;return 0!==r&&e.forEach(e=>{const n=t.appendInstructionToTimeline(e,r,s);i=Math.max(i,n.duration+n.delay)}),i}visitReference(e,t){t.updateOptions(e.options,!0),X(this,e.animation,t),t.previousNode=e}visitSequence(e,t){const n=t.subContextCount;let i=t;const r=e.options;if(r&&(r.params||r.delay)&&(i=t.createSubContext(r),i.transformIntoNewTimeline(),null!=r.delay)){6==i.previousNode.type&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=ye);const e=P(r.delay);i.delayNextStep(e)}e.steps.length&&(e.steps.forEach(e=>X(this,e,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>n&&i.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){const n=[];let i=t.currentTimeline.currentTime;const r=e.options&&e.options.delay?P(e.options.delay):0;e.steps.forEach(s=>{const o=t.createSubContext(e.options);r&&o.delayNextStep(r),X(this,s,o),i=Math.max(i,o.currentTimeline.currentTime),n.push(o.currentTimeline)}),n.forEach(e=>t.currentTimeline.mergeTimelineCollectedStyles(e)),t.transformIntoNewTimeline(i),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){const n=e.strValue;return j(t.params?G(n,t.params,t.errors):n,t.errors)}return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){const n=t.currentAnimateTimings=this._visitTiming(e.timings,t),i=t.currentTimeline;n.delay&&(t.incrementTime(n.delay),i.snapshotCurrentStyles());const r=e.style;5==r.type?this.visitKeyframes(r,t):(t.incrementTime(n.duration),this.visitStyle(r,t),i.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){const n=t.currentTimeline,i=t.currentAnimateTimings;!i&&n.getCurrentStyleProperties().length&&n.forwardFrame();const r=i&&i.easing||e.easing;e.isEmptyStep?n.applyEmptyStep(r):n.setStyles(e.styles,r,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){const n=t.currentAnimateTimings,i=t.currentTimeline.duration,r=n.duration,s=t.createSubContext().currentTimeline;s.easing=n.easing,e.styles.forEach(e=>{s.forwardTime((e.offset||0)*r),s.setStyles(e.styles,e.easing,t.errors,t.options),s.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(s),t.transformIntoNewTimeline(i+r),t.previousNode=e}visitQuery(e,t){const n=t.currentTimeline.currentTime,i=e.options||{},r=i.delay?P(i.delay):0;r&&(6===t.previousNode.type||0==n&&t.currentTimeline.getCurrentStyleProperties().length)&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=ye);let s=n;const o=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!i.optional,t.errors);t.currentQueryTotal=o.length;let a=null;o.forEach((n,i)=>{t.currentQueryIndex=i;const o=t.createSubContext(e.options,n);r&&o.delayNextStep(r),n===t.element&&(a=o.currentTimeline),X(this,e.animation,o),o.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,o.currentTimeline.currentTime)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(s),a&&(t.currentTimeline.mergeTimelineCollectedStyles(a),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){const n=t.parentContext,i=t.currentTimeline,r=e.timings,s=Math.abs(r.duration),o=s*(t.currentQueryTotal-1);let a=s*t.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":a=o-a;break;case"full":a=n.currentStaggerTime}const c=t.currentTimeline;a&&c.delayNextStep(a);const l=c.currentTime;X(this,e.animation,t),t.previousNode=e,n.currentStaggerTime=i.currentTime-l+(i.startTime-n.currentTimeline.startTime)}}const ye={};class ve{constructor(e,t,n,i,r,s,o,a){this._driver=e,this.element=t,this.subInstructions=n,this._enterClassName=i,this._leaveClassName=r,this.errors=s,this.timelines=o,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=ye,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=a||new we(this._driver,t,0),o.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;const n=e;let i=this.options;null!=n.duration&&(i.duration=P(n.duration)),null!=n.delay&&(i.delay=P(n.delay));const r=n.params;if(r){let e=i.params;e||(e=this.options.params={}),Object.keys(r).forEach(n=>{t&&e.hasOwnProperty(n)||(e[n]=G(r[n],e,this.errors))})}}_copyOptions(){const e={};if(this.options){const t=this.options.params;if(t){const n=e.params={};Object.keys(t).forEach(e=>{n[e]=t[e]})}}return e}createSubContext(e=null,t,n){const i=t||this.element,r=new ve(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,n||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(e),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(e){return this.previousNode=ye,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,n){const i={duration:null!=t?t:e.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+e.delay,easing:""},r=new Se(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,i,e.stretchStartingKeyframe);return this.timelines.push(r),i}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,n,i,r,s){let o=[];if(i&&o.push(this.element),e.length>0){e=(e=e.replace(me,"."+this._enterClassName)).replace(be,"."+this._leaveClassName);let t=this._driver.query(this.element,e,1!=n);0!==n&&(t=n<0?t.slice(t.length+n,t.length):t.slice(0,n)),o.push(...t)}return r||0!=o.length||s.push(`\`query("${t}")\` returned zero elements. (Use \`query("${t}", { optional: true })\` if you wish to allow this.)`),o}}class we{constructor(e,t,n,i){this._driver=e,this.element=t,this.startTime=n,this._elementTimelineStylesLookup=i,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}getCurrentStyleProperties(){return Object.keys(this._currentKeyframe)}get currentTime(){return this.startTime+this.duration}delayNextStep(e){const t=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new we(this._driver,e,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,t){this._localTimelineStyles[e]=t,this._globalTimelineStyles[e]=t,this._styleSummary[e]={time:this.currentTime,value:t}}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&(this._previousKeyframe.easing=e),Object.keys(this._globalTimelineStyles).forEach(e=>{this._backFill[e]=this._globalTimelineStyles[e]||a.a,this._currentKeyframe[e]=a.a}),this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,n,i){t&&(this._previousKeyframe.easing=t);const r=i&&i.params||{},s=function(e,t){const n={};let i;return e.forEach(e=>{"*"===e?(i=i||Object.keys(t),i.forEach(e=>{n[e]=a.a})):Y(e,!1,n)}),n}(e,this._globalTimelineStyles);Object.keys(s).forEach(e=>{const t=G(s[e],r,n);this._pendingStyles[e]=t,this._localTimelineStyles.hasOwnProperty(e)||(this._backFill[e]=this._globalTimelineStyles.hasOwnProperty(e)?this._globalTimelineStyles[e]:a.a),this._updateStyle(e,t)})}applyStylesToKeyframe(){const e=this._pendingStyles,t=Object.keys(e);0!=t.length&&(this._pendingStyles={},t.forEach(t=>{this._currentKeyframe[t]=e[t]}),Object.keys(this._localTimelineStyles).forEach(e=>{this._currentKeyframe.hasOwnProperty(e)||(this._currentKeyframe[e]=this._localTimelineStyles[e])}))}snapshotCurrentStyles(){Object.keys(this._localTimelineStyles).forEach(e=>{const t=this._localTimelineStyles[e];this._pendingStyles[e]=t,this._updateStyle(e,t)})}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){Object.keys(e._styleSummary).forEach(t=>{const n=this._styleSummary[t],i=e._styleSummary[t];(!n||i.time>n.time)&&this._updateStyle(t,i.value)})}buildKeyframes(){this.applyStylesToKeyframe();const e=new Set,t=new Set,n=1===this._keyframes.size&&0===this.duration;let i=[];this._keyframes.forEach((r,s)=>{const o=Y(r,!0);Object.keys(o).forEach(n=>{const i=o[n];i==a.l?e.add(n):i==a.a&&t.add(n)}),n||(o.offset=s/this.duration),i.push(o)});const r=e.size?q(e.values()):[],s=t.size?q(t.values()):[];if(n){const e=i[0],t=F(e);e.offset=0,t.offset=1,i=[e,t]}return fe(this.element,i,r,s,this.duration,this.startTime,this.easing,!1)}}class Se extends we{constructor(e,t,n,i,r,s,o=!1){super(e,t,s.delay),this.element=t,this.keyframes=n,this.preStyleProps=i,this.postStyleProps=r,this._stretchStartingKeyframe=o,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:n,easing:i}=this.timings;if(this._stretchStartingKeyframe&&t){const r=[],s=n+t,o=t/s,a=Y(e[0],!1);a.offset=0,r.push(a);const c=Y(e[0],!1);c.offset=Me(o),r.push(c);const l=e.length-1;for(let i=1;i<=l;i++){let o=Y(e[i],!1);o.offset=Me((t+o.offset*n)/s),r.push(o)}n=s,t=0,i="",e=r}return fe(this.element,e,this.preStyleProps,this.postStyleProps,n,t,i,!0)}}function Me(e,t=3){const n=Math.pow(10,t-1);return Math.round(e*n)/n}class ke{}class xe extends ke{normalizePropertyName(e,t){return Q(e)}normalizeStyleValue(e,t,n,i){let r="";const s=n.toString().trim();if(De[t]&&0!==n&&"0"!==n)if("number"==typeof n)r="px";else{const t=n.match(/^[+-]?[\d\.]+([a-z]*)$/);t&&0==t[1].length&&i.push(`Please provide a CSS unit value for ${e}:${n}`)}return s+r}}const De=(()=>function(e){const t={};return e.forEach(e=>t[e]=!0),t}("width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(",")))();function Te(e,t,n,i,r,s,o,a,c,l,u,d,h){return{type:0,element:e,triggerName:t,isRemovalTransition:r,fromState:n,fromStyles:s,toState:i,toStyles:o,timelines:a,queriedElements:c,preStyleProps:l,postStyleProps:u,totalTime:d,errors:h}}const Ce={};class Oe{constructor(e,t,n){this._triggerName=e,this.ast=t,this._stateStyles=n}match(e,t,n,i){return function(e,t,n,i,r){return e.some(e=>e(t,n,i,r))}(this.ast.matchers,e,t,n,i)}buildStyles(e,t,n){const i=this._stateStyles["*"],r=this._stateStyles[e],s=i?i.buildStyles(t,n):{};return r?r.buildStyles(t,n):s}build(e,t,n,i,r,s,o,a,c,l){const u=[],d=this.ast.options&&this.ast.options.params||Ce,h=this.buildStyles(n,o&&o.params||Ce,u),f=a&&a.params||Ce,m=this.buildStyles(i,f,u),b=new Set,g=new Map,_=new Map,y="void"===i,v={params:Object.assign(Object.assign({},d),f)},w=l?[]:ge(e,t,this.ast.animation,r,s,h,m,v,c,u);let S=0;if(w.forEach(e=>{S=Math.max(e.duration+e.delay,S)}),u.length)return Te(t,this._triggerName,n,i,y,h,m,[],[],g,_,S,u);w.forEach(e=>{const n=e.element,i=p(g,n,{});e.preStyleProps.forEach(e=>i[e]=!0);const r=p(_,n,{});e.postStyleProps.forEach(e=>r[e]=!0),n!==t&&b.add(n)});const M=q(b.values());return Te(t,this._triggerName,n,i,y,h,m,w,M,g,_,S)}}class Le{constructor(e,t){this.styles=e,this.defaultParams=t}buildStyles(e,t){const n={},i=F(this.defaultParams);return Object.keys(e).forEach(t=>{const n=e[t];null!=n&&(i[t]=n)}),this.styles.styles.forEach(e=>{if("string"!=typeof e){const r=e;Object.keys(r).forEach(e=>{let s=r[e];s.length>1&&(s=G(s,i,t)),n[e]=s})}}),n}}class Re{constructor(e,t){this.name=e,this.ast=t,this.transitionFactories=[],this.states={},t.states.forEach(e=>{this.states[e.name]=new Le(e.style,e.options&&e.options.params||{})}),Ee(this.states,"true","1"),Ee(this.states,"false","0"),t.transitions.forEach(t=>{this.transitionFactories.push(new Oe(e,t,this.states))}),this.fallbackTransition=new Oe(e,{type:1,animation:{type:2,steps:[],options:null},matchers:[(e,t)=>!0],options:null,queryCount:0,depCount:0},this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,n,i){return this.transitionFactories.find(r=>r.match(e,t,n,i))||null}matchStyles(e,t,n){return this.fallbackTransition.buildStyles(e,t,n)}}function Ee(e,t,n){e.hasOwnProperty(t)?e.hasOwnProperty(n)||(e[n]=e[t]):e.hasOwnProperty(n)&&(e[t]=e[n])}const Ae=new pe;class Ie{constructor(e,t,n){this.bodyNode=e,this._driver=t,this._normalizer=n,this._animations={},this._playersById={},this.players=[]}register(e,t){const n=[],i=ae(this._driver,t,n);if(n.length)throw new Error("Unable to build the animation due to the following errors: "+n.join("\n"));this._animations[e]=i}_buildPlayer(e,t,n){const i=e.element,r=u(0,this._normalizer,0,e.keyframes,t,n);return this._driver.animate(i,r,e.duration,e.delay,e.easing,[],!0)}create(e,t,n={}){const i=[],r=this._animations[e];let s;const o=new Map;if(r?(s=ge(this._driver,t,r,O,L,{},{},n,Ae,i),s.forEach(e=>{const t=p(o,e.element,{});e.postStyleProps.forEach(e=>t[e]=null)})):(i.push("The requested animation doesn't exist or has already been destroyed"),s=[]),i.length)throw new Error("Unable to create the animation due to the following errors: "+i.join("\n"));o.forEach((e,t)=>{Object.keys(e).forEach(n=>{e[n]=this._driver.computeStyle(t,n,a.a)})});const c=l(s.map(e=>{const t=o.get(e.element);return this._buildPlayer(e,{},t)}));return this._playersById[e]=c,c.onDestroy(()=>this.destroy(e)),this.players.push(c),c}destroy(e){const t=this._getPlayer(e);t.destroy(),delete this._playersById[e];const n=this.players.indexOf(t);n>=0&&this.players.splice(n,1)}_getPlayer(e){const t=this._playersById[e];if(!t)throw new Error("Unable to find the timeline player referenced by "+e);return t}listen(e,t,n,i){const r=f(t,"","","");return d(this._getPlayer(e),n,r,i),()=>{}}command(e,t,n,i){if("register"==n)return void this.register(e,i[0]);if("create"==n)return void this.create(e,t,i[0]||{});const r=this._getPlayer(e);switch(n){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(e)}}}const Pe="ng-animate-queued",Ne="ng-animate-disabled",je=".ng-animate-disabled",Fe=[],Ye={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},ze={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0};class $e{constructor(e,t=""){this.namespaceId=t;const n=e&&e.hasOwnProperty("value");if(this.value=null!=(i=n?e.value:e)?i:null,n){const t=F(e);delete t.value,this.options=t}else this.options={};var i;this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(e){const t=e.params;if(t){const e=this.options.params;Object.keys(t).forEach(n=>{null==e[n]&&(e[n]=t[n])})}}}const He="void",We=new $e(He);class Ve{constructor(e,t,n){this.id=e,this.hostElement=t,this._engine=n,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,Ke(t,this._hostClassName)}listen(e,t,n,i){if(!this._triggers.hasOwnProperty(t))throw new Error(`Unable to listen on the animation trigger event "${n}" because the animation trigger "${t}" doesn't exist!`);if(null==n||0==n.length)throw new Error(`Unable to listen on the animation trigger "${t}" because the provided event is undefined!`);if("start"!=(r=n)&&"done"!=r)throw new Error(`The provided animation trigger event "${n}" for the animation trigger "${t}" is not supported!`);var r;const s=p(this._elementListeners,e,[]),o={name:t,phase:n,callback:i};s.push(o);const a=p(this._engine.statesByElement,e,{});return a.hasOwnProperty(t)||(Ke(e,R),Ke(e,"ng-trigger-"+t),a[t]=We),()=>{this._engine.afterFlush(()=>{const e=s.indexOf(o);e>=0&&s.splice(e,1),this._triggers[t]||delete a[t]})}}register(e,t){return!this._triggers[e]&&(this._triggers[e]=t,!0)}_getTrigger(e){const t=this._triggers[e];if(!t)throw new Error(`The provided animation trigger "${e}" has not been registered!`);return t}trigger(e,t,n,i=!0){const r=this._getTrigger(t),s=new Ue(this.id,t,e);let o=this._engine.statesByElement.get(e);o||(Ke(e,R),Ke(e,"ng-trigger-"+t),this._engine.statesByElement.set(e,o={}));let a=o[t];const c=new $e(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&a&&c.absorbOptions(a.options),o[t]=c,a||(a=We),c.value!==He&&a.value===c.value){if(!function(e,t){const n=Object.keys(e),i=Object.keys(t);if(n.length!=i.length)return!1;for(let r=0;r<n.length;r++){const i=n[r];if(!t.hasOwnProperty(i)||e[i]!==t[i])return!1}return!0}(a.params,c.params)){const t=[],n=r.matchStyles(a.value,a.params,t),i=r.matchStyles(c.value,c.params,t);t.length?this._engine.reportError(t):this._engine.afterFlush(()=>{W(e,n),H(e,i)})}return}const l=p(this._engine.playersByElement,e,[]);l.forEach(e=>{e.namespaceId==this.id&&e.triggerName==t&&e.queued&&e.destroy()});let u=r.matchTransition(a.value,c.value,e,c.params),d=!1;if(!u){if(!i)return;u=r.fallbackTransition,d=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:u,fromState:a,toState:c,player:s,isFallbackTransition:d}),d||(Ke(e,Pe),s.onStart(()=>{Ze(e,Pe)})),s.onDone(()=>{let t=this.players.indexOf(s);t>=0&&this.players.splice(t,1);const n=this._engine.playersByElement.get(e);if(n){let e=n.indexOf(s);e>=0&&n.splice(e,1)}}),this.players.push(s),l.push(s),s}deregister(e){delete this._triggers[e],this._engine.statesByElement.forEach((t,n)=>{delete t[e]}),this._elementListeners.forEach((t,n)=>{this._elementListeners.set(n,t.filter(t=>t.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);const t=this._engine.playersByElement.get(e);t&&(t.forEach(e=>e.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){const n=this._engine.driver.query(e,E,!0);n.forEach(e=>{if(e.__ng_removed)return;const n=this._engine.fetchNamespacesByElement(e);n.size?n.forEach(n=>n.triggerLeaveAnimation(e,t,!1,!0)):this.clearElementCache(e)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(e=>this.clearElementCache(e)))}triggerLeaveAnimation(e,t,n,i){const r=this._engine.statesByElement.get(e);if(r){const s=[];if(Object.keys(r).forEach(t=>{if(this._triggers[t]){const n=this.trigger(e,t,He,i);n&&s.push(n)}}),s.length)return this._engine.markElementAsRemoved(this.id,e,!0,t),n&&l(s).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){const t=this._elementListeners.get(e);if(t){const n=new Set;t.forEach(t=>{const i=t.name;if(n.has(i))return;n.add(i);const r=this._triggers[i].fallbackTransition,s=this._engine.statesByElement.get(e)[i]||We,o=new $e(He),a=new Ue(this.id,i,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:i,transition:r,fromState:s,toState:o,player:a,isFallbackTransition:!0})})}}removeNode(e,t){const n=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let i=!1;if(n.totalAnimations){const t=n.players.length?n.playersByQueriedElement.get(e):[];if(t&&t.length)i=!0;else{let t=e;for(;t=t.parentNode;)if(n.statesByElement.get(t)){i=!0;break}}}if(this.prepareLeaveAnimationListeners(e),i)n.markElementAsRemoved(this.id,e,!1,t);else{const i=e.__ng_removed;i&&i!==Ye||(n.afterFlush(()=>this.clearElementCache(e)),n.destroyInnerAnimations(e),n._onRemovalComplete(e,t))}}insertNode(e,t){Ke(e,this._hostClassName)}drainQueuedTransitions(e){const t=[];return this._queue.forEach(n=>{const i=n.player;if(i.destroyed)return;const r=n.element,s=this._elementListeners.get(r);s&&s.forEach(t=>{if(t.name==n.triggerName){const i=f(r,n.triggerName,n.fromState.value,n.toState.value);i._data=e,d(n.player,t.phase,i,t.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):t.push(n)}),this._queue=[],t.sort((e,t)=>{const n=e.transition.ast.depCount,i=t.transition.ast.depCount;return 0==n||0==i?n-i:this._engine.driver.containsElement(e.element,t.element)?1:-1})}destroy(e){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}elementContainsData(e){let t=!1;return this._elementListeners.has(e)&&(t=!0),t=!!this._queue.find(t=>t.element===e)||t,t}}class Be{constructor(e,t,n){this.bodyNode=e,this.driver=t,this._normalizer=n,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(e,t)=>{}}_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}get queuedPlayers(){const e=[];return this._namespaceList.forEach(t=>{t.players.forEach(t=>{t.queued&&e.push(t)})}),e}createNamespace(e,t){const n=new Ve(e,t,this);return t.parentNode?this._balanceNamespaceList(n,t):(this.newHostElements.set(t,n),this.collectEnterElement(t)),this._namespaceLookup[e]=n}_balanceNamespaceList(e,t){const n=this._namespaceList.length-1;if(n>=0){let i=!1;for(let r=n;r>=0;r--)if(this.driver.containsElement(this._namespaceList[r].hostElement,t)){this._namespaceList.splice(r+1,0,e),i=!0;break}i||this._namespaceList.splice(0,0,e)}else this._namespaceList.push(e);return this.namespacesByHostElement.set(t,e),e}register(e,t){let n=this._namespaceLookup[e];return n||(n=this.createNamespace(e,t)),n}registerTrigger(e,t,n){let i=this._namespaceLookup[e];i&&i.register(t,n)&&this.totalAnimations++}destroy(e,t){if(!e)return;const n=this._fetchNamespace(e);this.afterFlush(()=>{this.namespacesByHostElement.delete(n.hostElement),delete this._namespaceLookup[e];const t=this._namespaceList.indexOf(n);t>=0&&this._namespaceList.splice(t,1)}),this.afterFlushAnimationsDone(()=>n.destroy(t))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){const t=new Set,n=this.statesByElement.get(e);if(n){const e=Object.keys(n);for(let i=0;i<e.length;i++){const r=n[e[i]].namespaceId;if(r){const e=this._fetchNamespace(r);e&&t.add(e)}}}return t}trigger(e,t,n,i){if(Ge(t)){const r=this._fetchNamespace(e);if(r)return r.trigger(t,n,i),!0}return!1}insertNode(e,t,n,i){if(!Ge(t))return;const r=t.__ng_removed;if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;const e=this.collectedLeaveElements.indexOf(t);e>=0&&this.collectedLeaveElements.splice(e,1)}if(e){const i=this._fetchNamespace(e);i&&i.insertNode(t,n)}i&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),Ke(e,Ne)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),Ze(e,Ne))}removeNode(e,t,n,i){if(Ge(t)){const r=e?this._fetchNamespace(e):null;if(r?r.removeNode(t,i):this.markElementAsRemoved(e,t,!1,i),n){const n=this.namespacesByHostElement.get(t);n&&n.id!==e&&n.removeNode(t,i)}}else this._onRemovalComplete(t,i)}markElementAsRemoved(e,t,n,i){this.collectedLeaveElements.push(t),t.__ng_removed={namespaceId:e,setForRemoval:i,hasAnimation:n,removedBeforeQueried:!1}}listen(e,t,n,i,r){return Ge(t)?this._fetchNamespace(e).listen(t,n,i,r):()=>{}}_buildInstruction(e,t,n,i,r){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,n,i,e.fromState.options,e.toState.options,t,r)}destroyInnerAnimations(e){let t=this.driver.query(e,E,!0);t.forEach(e=>this.destroyActiveAnimationsForElement(e)),0!=this.playersByQueriedElement.size&&(t=this.driver.query(e,I,!0),t.forEach(e=>this.finishActiveQueriedAnimationOnElement(e)))}destroyActiveAnimationsForElement(e){const t=this.playersByElement.get(e);t&&t.forEach(e=>{e.queued?e.markedForDestroy=!0:e.destroy()})}finishActiveQueriedAnimationOnElement(e){const t=this.playersByQueriedElement.get(e);t&&t.forEach(e=>e.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return l(this.players).onDone(()=>e());e()})}processLeaveNode(e){const t=e.__ng_removed;if(t&&t.setForRemoval){if(e.__ng_removed=Ye,t.namespaceId){this.destroyInnerAnimations(e);const n=this._fetchNamespace(t.namespaceId);n&&n.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}this.driver.matchesElement(e,je)&&this.markElementAsDisabled(e,!1),this.driver.query(e,je,!0).forEach(e=>{this.markElementAsDisabled(e,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((e,t)=>this._balanceNamespaceList(e,t)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;n<this.collectedEnterElements.length;n++)Ke(this.collectedEnterElements[n],"ng-star-inserted");if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){const n=[];try{t=this._flushAnimations(n,e)}finally{for(let e=0;e<n.length;e++)n[e]()}}else for(let n=0;n<this.collectedLeaveElements.length;n++)this.processLeaveNode(this.collectedLeaveElements[n]);if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(e=>e()),this._flushFns=[],this._whenQuietFns.length){const e=this._whenQuietFns;this._whenQuietFns=[],t.length?l(t).onDone(()=>{e.forEach(e=>e())}):e.forEach(e=>e())}}reportError(e){throw new Error("Unable to process animations due to the following failed trigger transitions\n "+e.join("\n"))}_flushAnimations(e,t){const n=new pe,i=[],r=new Map,s=[],o=new Map,c=new Map,u=new Map,d=new Set;this.disabledNodes.forEach(e=>{d.add(e);const t=this.driver.query(e,".ng-animate-queued",!0);for(let n=0;n<t.length;n++)d.add(t[n])});const h=this.bodyNode,f=Array.from(this.statesByElement.keys()),m=Qe(f,this.collectedEnterElements),b=new Map;let g=0;m.forEach((e,t)=>{const n=O+g++;b.set(t,n),e.forEach(e=>Ke(e,n))});const _=[],y=new Set,v=new Set;for(let a=0;a<this.collectedLeaveElements.length;a++){const e=this.collectedLeaveElements[a],t=e.__ng_removed;t&&t.setForRemoval&&(_.push(e),y.add(e),t.hasAnimation?this.driver.query(e,".ng-star-inserted",!0).forEach(e=>y.add(e)):v.add(e))}const w=new Map,S=Qe(f,Array.from(y));S.forEach((e,t)=>{const n=L+g++;w.set(t,n),e.forEach(e=>Ke(e,n))}),e.push(()=>{m.forEach((e,t)=>{const n=b.get(t);e.forEach(e=>Ze(e,n))}),S.forEach((e,t)=>{const n=w.get(t);e.forEach(e=>Ze(e,n))}),_.forEach(e=>{this.processLeaveNode(e)})});const M=[],k=[];for(let a=this._namespaceList.length-1;a>=0;a--)this._namespaceList[a].drainQueuedTransitions(t).forEach(e=>{const t=e.player,r=e.element;if(M.push(t),this.collectedEnterElements.length){const e=r.__ng_removed;if(e&&e.setForMove)return void t.destroy()}const a=!h||!this.driver.containsElement(h,r),l=w.get(r),d=b.get(r),f=this._buildInstruction(e,n,d,l,a);if(f.errors&&f.errors.length)k.push(f);else{if(a)return t.onStart(()=>W(r,f.fromStyles)),t.onDestroy(()=>H(r,f.toStyles)),void i.push(t);if(e.isFallbackTransition)return t.onStart(()=>W(r,f.fromStyles)),t.onDestroy(()=>H(r,f.toStyles)),void i.push(t);f.timelines.forEach(e=>e.stretchStartingKeyframe=!0),n.append(r,f.timelines),s.push({instruction:f,player:t,element:r}),f.queriedElements.forEach(e=>p(o,e,[]).push(t)),f.preStyleProps.forEach((e,t)=>{const n=Object.keys(e);if(n.length){let e=c.get(t);e||c.set(t,e=new Set),n.forEach(t=>e.add(t))}}),f.postStyleProps.forEach((e,t)=>{const n=Object.keys(e);let i=u.get(t);i||u.set(t,i=new Set),n.forEach(e=>i.add(e))})}});if(k.length){const e=[];k.forEach(t=>{e.push(`@${t.triggerName} has failed due to:\n`),t.errors.forEach(t=>e.push(`- ${t}\n`))}),M.forEach(e=>e.destroy()),this.reportError(e)}const x=new Map,D=new Map;s.forEach(e=>{const t=e.element;n.has(t)&&(D.set(t,t),this._beforeAnimationBuild(e.player.namespaceId,e.instruction,x))}),i.forEach(e=>{const t=e.element;this._getPreviousPlayers(t,!1,e.namespaceId,e.triggerName,null).forEach(e=>{p(x,t,[]).push(e),e.destroy()})});const T=_.filter(e=>et(e,c,u)),C=new Map;Je(C,this.driver,v,u,a.a).forEach(e=>{et(e,c,u)&&T.push(e)});const R=new Map;m.forEach((e,t)=>{Je(R,this.driver,new Set(e),c,a.l)}),T.forEach(e=>{const t=C.get(e),n=R.get(e);C.set(e,Object.assign(Object.assign({},t),n))});const E=[],A=[],P={};s.forEach(e=>{const{element:t,player:s,instruction:o}=e;if(n.has(t)){if(d.has(t))return s.onDestroy(()=>H(t,o.toStyles)),s.disabled=!0,s.overrideTotalTime(o.totalTime),void i.push(s);let e=P;if(D.size>1){let n=t;const i=[];for(;n=n.parentNode;){const t=D.get(n);if(t){e=t;break}i.push(n)}i.forEach(t=>D.set(t,e))}const n=this._buildAnimation(s.namespaceId,o,x,r,R,C);if(s.setRealPlayer(n),e===P)E.push(s);else{const t=this.playersByElement.get(e);t&&t.length&&(s.parentPlayer=l(t)),i.push(s)}}else W(t,o.fromStyles),s.onDestroy(()=>H(t,o.toStyles)),A.push(s),d.has(t)&&i.push(s)}),A.forEach(e=>{const t=r.get(e.element);if(t&&t.length){const n=l(t);e.setRealPlayer(n)}}),i.forEach(e=>{e.parentPlayer?e.syncPlayerEvents(e.parentPlayer):e.destroy()});for(let a=0;a<_.length;a++){const e=_[a],t=e.__ng_removed;if(Ze(e,L),t&&t.hasAnimation)continue;let n=[];if(o.size){let t=o.get(e);t&&t.length&&n.push(...t);let i=this.driver.query(e,I,!0);for(let e=0;e<i.length;e++){let t=o.get(i[e]);t&&t.length&&n.push(...t)}}const i=n.filter(e=>!e.destroyed);i.length?Xe(this,e,i):this.processLeaveNode(e)}return _.length=0,E.forEach(e=>{this.players.push(e),e.onDone(()=>{e.destroy();const t=this.players.indexOf(e);this.players.splice(t,1)}),e.play()}),E}elementContainsData(e,t){let n=!1;const i=t.__ng_removed;return i&&i.setForRemoval&&(n=!0),this.playersByElement.has(t)&&(n=!0),this.playersByQueriedElement.has(t)&&(n=!0),this.statesByElement.has(t)&&(n=!0),this._fetchNamespace(e).elementContainsData(t)||n}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,n,i,r){let s=[];if(t){const t=this.playersByQueriedElement.get(e);t&&(s=t)}else{const t=this.playersByElement.get(e);if(t){const e=!r||r==He;t.forEach(t=>{t.queued||(e||t.triggerName==i)&&s.push(t)})}}return(n||i)&&(s=s.filter(e=>!(n&&n!=e.namespaceId||i&&i!=e.triggerName))),s}_beforeAnimationBuild(e,t,n){const i=t.element,r=t.isRemovalTransition?void 0:e,s=t.isRemovalTransition?void 0:t.triggerName;for(const o of t.timelines){const e=o.element,a=e!==i,c=p(n,e,[]);this._getPreviousPlayers(e,a,r,s,t.toState).forEach(e=>{const t=e.getRealPlayer();t.beforeDestroy&&t.beforeDestroy(),e.destroy(),c.push(e)})}W(i,t.fromStyles)}_buildAnimation(e,t,n,i,r,s){const o=t.triggerName,c=t.element,d=[],h=new Set,f=new Set,m=t.timelines.map(t=>{const l=t.element;h.add(l);const p=l.__ng_removed;if(p&&p.removedBeforeQueried)return new a.d(t.duration,t.delay);const m=l!==c,b=function(e){const t=[];return function e(t,n){for(let i=0;i<t.length;i++){const r=t[i];r instanceof a.k?e(r.players,n):n.push(r)}}(e,t),t}((n.get(l)||Fe).map(e=>e.getRealPlayer())).filter(e=>!!e.element&&e.element===l),g=r.get(l),_=s.get(l),y=u(0,this._normalizer,0,t.keyframes,g,_),v=this._buildPlayer(t,y,b);if(t.subTimeline&&i&&f.add(l),m){const t=new Ue(e,o,l);t.setRealPlayer(v),d.push(t)}return v});d.forEach(e=>{p(this.playersByQueriedElement,e.element,[]).push(e),e.onDone(()=>function(e,t,n){let i;if(e instanceof Map){if(i=e.get(t),i){if(i.length){const e=i.indexOf(n);i.splice(e,1)}0==i.length&&e.delete(t)}}else if(i=e[t],i){if(i.length){const e=i.indexOf(n);i.splice(e,1)}0==i.length&&delete e[t]}return i}(this.playersByQueriedElement,e.element,e))}),h.forEach(e=>Ke(e,A));const b=l(m);return b.onDestroy(()=>{h.forEach(e=>Ze(e,A)),H(c,t.toStyles)}),f.forEach(e=>{p(i,e,[]).push(b)}),b}_buildPlayer(e,t,n){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,n):new a.d(e.duration,e.delay)}}class Ue{constructor(e,t,n){this.namespaceId=e,this.triggerName=t,this.element=n,this._player=new a.d,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(e){this._containsRealPlayer||(this._player=e,Object.keys(this._queuedCallbacks).forEach(t=>{this._queuedCallbacks[t].forEach(n=>d(e,t,void 0,n))}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){const t=this._player;t.triggerCallback&&e.onStart(()=>t.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,t){p(this._queuedCallbacks,e,[]).push(t)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){const t=this._player;t.triggerCallback&&t.triggerCallback(e)}}function Ge(e){return e&&1===e.nodeType}function qe(e,t){const n=e.style.display;return e.style.display=null!=t?t:"none",n}function Je(e,t,n,i,r){const s=[];n.forEach(e=>s.push(qe(e)));const o=[];i.forEach((n,i)=>{const s={};n.forEach(e=>{const n=s[e]=t.computeStyle(i,e,r);n&&0!=n.length||(i.__ng_removed=ze,o.push(i))}),e.set(i,s)});let a=0;return n.forEach(e=>qe(e,s[a++])),o}function Qe(e,t){const n=new Map;if(e.forEach(e=>n.set(e,[])),0==t.length)return n;const i=new Set(t),r=new Map;return t.forEach(e=>{const t=function e(t){if(!t)return 1;let s=r.get(t);if(s)return s;const o=t.parentNode;return s=n.has(o)?o:i.has(o)?1:e(o),r.set(t,s),s}(e);1!==t&&n.get(t).push(e)}),n}function Ke(e,t){if(e.classList)e.classList.add(t);else{let n=e.$$classes;n||(n=e.$$classes={}),n[t]=!0}}function Ze(e,t){if(e.classList)e.classList.remove(t);else{let n=e.$$classes;n&&delete n[t]}}function Xe(e,t,n){l(n).onDone(()=>e.processLeaveNode(t))}function et(e,t,n){const i=n.get(e);if(!i)return!1;let r=t.get(e);return r?i.forEach(e=>r.add(e)):t.set(e,i),n.delete(e),!0}class tt{constructor(e,t,n){this.bodyNode=e,this._driver=t,this._triggerCache={},this.onRemovalComplete=(e,t)=>{},this._transitionEngine=new Be(e,t,n),this._timelineEngine=new Ie(e,t,n),this._transitionEngine.onRemovalComplete=(e,t)=>this.onRemovalComplete(e,t)}registerTrigger(e,t,n,i,r){const s=e+"-"+i;let o=this._triggerCache[s];if(!o){const e=[],t=ae(this._driver,r,e);if(e.length)throw new Error(`The animation trigger "${i}" has failed to build due to the following errors:\n - ${e.join("\n - ")}`);o=function(e,t){return new Re(e,t)}(i,t),this._triggerCache[s]=o}this._transitionEngine.registerTrigger(t,i,o)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,n,i){this._transitionEngine.insertNode(e,t,n,i)}onRemove(e,t,n,i){this._transitionEngine.removeNode(e,t,i||!1,n)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,n,i){if("@"==n.charAt(0)){const[e,r]=m(n);this._timelineEngine.command(e,t,r,i)}else this._transitionEngine.trigger(e,t,n,i)}listen(e,t,n,i,r){if("@"==n.charAt(0)){const[e,i]=m(n);return this._timelineEngine.listen(e,t,i,r)}return this._transitionEngine.listen(e,t,n,i,r)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}function nt(e,t){let n=null,i=null;return Array.isArray(t)&&t.length?(n=rt(t[0]),t.length>1&&(i=rt(t[t.length-1]))):t&&(n=rt(t)),n||i?new it(e,n,i):null}let it=(()=>{class e{constructor(t,n,i){this._element=t,this._startStyles=n,this._endStyles=i,this._state=0;let r=e.initialStylesByElement.get(t);r||e.initialStylesByElement.set(t,r={}),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&H(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(H(this._element,this._initialStyles),this._endStyles&&(H(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(e.initialStylesByElement.delete(this._element),this._startStyles&&(W(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(W(this._element,this._endStyles),this._endStyles=null),H(this._element,this._initialStyles),this._state=3)}}return e.initialStylesByElement=new WeakMap,e})();function rt(e){let t=null;const n=Object.keys(e);for(let i=0;i<n.length;i++){const r=n[i];st(r)&&(t=t||{},t[r]=e[r])}return t}function st(e){return"display"===e||"position"===e}const ot="animation",at="animationend";class ct{constructor(e,t,n,i,r,s,o){this._element=e,this._name=t,this._duration=n,this._delay=i,this._easing=r,this._fillMode=s,this._onDoneFn=o,this._finished=!1,this._destroyed=!1,this._startTime=0,this._position=0,this._eventFn=e=>this._handleCallback(e)}apply(){!function(e,t){const n=pt(e,"").trim();n.length&&(function(e,t){let n=0;for(let i=0;i<e.length;i++)","===e.charAt(i)&&n++}(n),t=`${n}, ${t}`),ft(e,"",t)}(this._element,`${this._duration}ms ${this._easing} ${this._delay}ms 1 normal ${this._fillMode} ${this._name}`),ht(this._element,this._eventFn,!1),this._startTime=Date.now()}pause(){lt(this._element,this._name,"paused")}resume(){lt(this._element,this._name,"running")}setPosition(e){const t=ut(this._element,this._name);this._position=e*this._duration,ft(this._element,"Delay",`-${this._position}ms`,t)}getPosition(){return this._position}_handleCallback(e){const t=e._ngTestManualTimestamp||Date.now(),n=1e3*parseFloat(e.elapsedTime.toFixed(3));e.animationName==this._name&&Math.max(t-this._startTime,0)>=this._delay&&n>=this._duration&&this.finish()}finish(){this._finished||(this._finished=!0,this._onDoneFn(),ht(this._element,this._eventFn,!0))}destroy(){this._destroyed||(this._destroyed=!0,this.finish(),function(e,t){const n=pt(e,"").split(","),i=dt(n,t);i>=0&&(n.splice(i,1),ft(e,"",n.join(",")))}(this._element,this._name))}}function lt(e,t,n){ft(e,"PlayState",n,ut(e,t))}function ut(e,t){const n=pt(e,"");return n.indexOf(",")>0?dt(n.split(","),t):dt([n],t)}function dt(e,t){for(let n=0;n<e.length;n++)if(e[n].indexOf(t)>=0)return n;return-1}function ht(e,t,n){n?e.removeEventListener(at,t):e.addEventListener(at,t)}function ft(e,t,n,i){const r=ot+t;if(null!=i){const t=e.style[r];if(t.length){const e=t.split(",");e[i]=n,n=e.join(",")}}e.style[r]=n}function pt(e,t){return e.style[ot+t]}class mt{constructor(e,t,n,i,r,s,o,a){this.element=e,this.keyframes=t,this.animationName=n,this._duration=i,this._delay=r,this._finalStyles=o,this._specialStyles=a,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=s||"linear",this.totalTime=i+r,this._buildStyler()}onStart(e){this._onStartFns.push(e)}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}destroy(){this.init(),this._state>=4||(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}_flushDoneFns(){this._onDoneFns.forEach(e=>e()),this._onDoneFns=[]}_flushStartFns(){this._onStartFns.forEach(e=>e()),this._onStartFns=[]}finish(){this.init(),this._state>=3||(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())}setPosition(e){this._styler.setPosition(e)}getPosition(){return this._styler.getPosition()}hasStarted(){return this._state>=2}init(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())}play(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()}pause(){this.init(),this._styler.pause()}restart(){this.reset(),this.play()}reset(){this._styler.destroy(),this._buildStyler(),this._styler.apply()}_buildStyler(){this._styler=new ct(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",()=>this.finish())}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}beforeDestroy(){this.init();const e={};if(this.hasStarted()){const t=this._state>=3;Object.keys(this._finalStyles).forEach(n=>{"offset"!=n&&(e[n]=t?this._finalStyles[n]:ee(this.element,n))})}this.currentSnapshot=e}}class bt extends a.d{constructor(e,t){super(),this.element=e,this._startingStyles={},this.__initialized=!1,this._styles=D(t)}init(){!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(e=>{this._startingStyles[e]=this.element.style[e]}),super.init())}play(){this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(e=>this.element.style.setProperty(e,this._styles[e])),super.play())}destroy(){this._startingStyles&&(Object.keys(this._startingStyles).forEach(e=>{const t=this._startingStyles[e];t?this.element.style.setProperty(e,t):this.element.style.removeProperty(e)}),this._startingStyles=null,super.destroy())}}class gt{constructor(){this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}validateStyleProperty(e){return S(e)}matchesElement(e,t){return M(e,t)}containsElement(e,t){return k(e,t)}query(e,t,n){return x(e,t,n)}computeStyle(e,t,n){return window.getComputedStyle(e)[t]}buildKeyframeElement(e,t,n){n=n.map(e=>D(e));let i=`@keyframes ${t} {\n`,r="";n.forEach(e=>{r=" ";const t=parseFloat(e.offset);i+=`${r}${100*t}% {\n`,r+=" ",Object.keys(e).forEach(t=>{const n=e[t];switch(t){case"offset":return;case"easing":return void(n&&(i+=`${r}animation-timing-function: ${n};\n`));default:return void(i+=`${r}${t}: ${n};\n`)}}),i+=r+"}\n"}),i+="}\n";const s=document.createElement("style");return s.innerHTML=i,s}animate(e,t,n,i,r,s=[],o){o&&this._notifyFaultyScrubber();const a=s.filter(e=>e instanceof mt),c={};K(n,i)&&a.forEach(e=>{let t=e.currentSnapshot;Object.keys(t).forEach(e=>c[e]=t[e])});const l=function(e){let t={};return e&&(Array.isArray(e)?e:[e]).forEach(e=>{Object.keys(e).forEach(n=>{"offset"!=n&&"easing"!=n&&(t[n]=e[n])})}),t}(t=Z(e,t,c));if(0==n)return new bt(e,l);const u="gen_css_kf_"+this._count++,d=this.buildKeyframeElement(e,u,t);document.querySelector("head").appendChild(d);const h=nt(e,t),f=new mt(e,t,u,n,i,r,l,h);return f.onDestroy(()=>{var e;(e=d).parentNode.removeChild(e)}),f}_notifyFaultyScrubber(){this._warningIssued||(console.warn("@angular/animations: please load the web-animations.js polyfill to allow programmatic access...\n"," visit http://bit.ly/IWukam to learn more about using the web-animation-js polyfill."),this._warningIssued=!0)}}class _t{constructor(e,t,n,i){this.element=e,this.keyframes=t,this.options=n,this._specialStyles=i,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:{},this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_triggerWebAnimation(e,t,n){return e.animate(t,n)}onStart(e){this._onStartFns.push(e)}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){this.domPlayer.currentTime=e*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const e={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(t=>{"offset"!=t&&(e[t]=this._finished?this._finalKeyframe[t]:ee(this.element,t))}),this.currentSnapshot=e}triggerCallback(e){const t="start"==e?this._onStartFns:this._onDoneFns;t.forEach(e=>e()),t.length=0}}class yt{constructor(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(vt().toString()),this._cssKeyframesDriver=new gt}validateStyleProperty(e){return S(e)}matchesElement(e,t){return M(e,t)}containsElement(e,t){return k(e,t)}query(e,t,n){return x(e,t,n)}computeStyle(e,t,n){return window.getComputedStyle(e)[t]}overrideWebAnimationsSupport(e){this._isNativeImpl=e}animate(e,t,n,i,r,s=[],o){if(!o&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(e,t,n,i,r,s);const a={duration:n,delay:i,fill:0==i?"both":"forwards"};r&&(a.easing=r);const c={},l=s.filter(e=>e instanceof _t);K(n,i)&&l.forEach(e=>{let t=e.currentSnapshot;Object.keys(t).forEach(e=>c[e]=t[e])});const u=nt(e,t=Z(e,t=t.map(e=>Y(e,!1)),c));return new _t(e,t,a,u)}}function vt(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}var wt=n("SVse");let St=(()=>{class e extends a.b{constructor(e,t){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(t.body,{id:"0",encapsulation:i.Q.None,styles:[],data:{animation:[]}})}build(e){const t=this._nextAnimationId.toString();this._nextAnimationId++;const n=Array.isArray(e)?Object(a.f)(e):e;return xt(this._renderer,null,t,"register",[n]),new Mt(t,this._renderer)}}return e.\u0275fac=function(t){return new(t||e)(i.dc(i.F),i.dc(wt.d))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})();class Mt extends a.c{constructor(e,t){super(),this._id=e,this._renderer=t}create(e,t){return new kt(this._id,e,t||{},this._renderer)}}class kt{constructor(e,t,n,i){this.id=e,this.element=t,this._renderer=i,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",n)}_listen(e,t){return this._renderer.listen(this.element,`@@${this.id}:${e}`,t)}_command(e,...t){return xt(this._renderer,this.element,this.id,e,t)}onDone(e){this._listen("done",e)}onStart(e){this._listen("start",e)}onDestroy(e){this._listen("destroy",e)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset")}setPosition(e){this._command("setPosition",e)}getPosition(){return 0}}function xt(e,t,n,i,r){return e.setProperty(t,`@@${n}:${i}`,r)}const Dt="@",Tt="@.disabled";let Ct=(()=>{class e{constructor(e,t,n){this.delegate=e,this.engine=t,this._zone=n,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),t.onRemovalComplete=(e,t)=>{t&&t.parentNode(e)&&t.removeChild(e.parentNode,e)}}createRenderer(e,t){const n=this.delegate.createRenderer(e,t);if(!(e&&t&&t.data&&t.data.animation)){let e=this._rendererCache.get(n);return e||(e=new Ot("",n,this.engine),this._rendererCache.set(n,e)),e}const i=t.id,r=t.id+"-"+this._currentId;this._currentId++,this.engine.register(r,e);const s=t=>{Array.isArray(t)?t.forEach(s):this.engine.registerTrigger(i,r,e,t.name,t)};return t.data.animation.forEach(s),new Lt(this,r,n,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(e,t,n){e>=0&&e<this._microtaskId?this._zone.run(()=>t(n)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(e=>{const[t,n]=e;t(n)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([t,n]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return e.\u0275fac=function(t){return new(t||e)(i.dc(i.F),i.dc(tt),i.dc(i.A))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})();class Ot{constructor(e,t,n){this.namespaceId=e,this.delegate=t,this.engine=n,this.destroyNode=this.delegate.destroyNode?e=>t.destroyNode(e):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(e,t){return this.delegate.createElement(e,t)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}insertBefore(e,t,n){this.delegate.insertBefore(e,t,n),this.engine.onInsert(this.namespaceId,t,e,!0)}removeChild(e,t,n){this.engine.onRemove(this.namespaceId,t,this.delegate,n)}selectRootElement(e,t){return this.delegate.selectRootElement(e,t)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,t,n,i){this.delegate.setAttribute(e,t,n,i)}removeAttribute(e,t,n){this.delegate.removeAttribute(e,t,n)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,n,i){this.delegate.setStyle(e,t,n,i)}removeStyle(e,t,n){this.delegate.removeStyle(e,t,n)}setProperty(e,t,n){t.charAt(0)==Dt&&t==Tt?this.disableAnimations(e,!!n):this.delegate.setProperty(e,t,n)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,n){return this.delegate.listen(e,t,n)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}}class Lt extends Ot{constructor(e,t,n,i){super(t,n,i),this.factory=e,this.namespaceId=t}setProperty(e,t,n){t.charAt(0)==Dt?"."==t.charAt(1)&&t==Tt?this.disableAnimations(e,n=void 0===n||!!n):this.engine.process(this.namespaceId,e,t.substr(1),n):this.delegate.setProperty(e,t,n)}listen(e,t,n){if(t.charAt(0)==Dt){const i=function(e){switch(e){case"body":return document.body;case"document":return document;case"window":return window;default:return e}}(e);let r=t.substr(1),s="";return r.charAt(0)!=Dt&&([r,s]=function(e){const t=e.indexOf(".");return[e.substring(0,t),e.substr(t+1)]}(r)),this.engine.listen(this.namespaceId,i,r,s,e=>{this.factory.scheduleListenerCallback(e._data||-1,n,e)})}return this.delegate.listen(e,t,n)}}let Rt=(()=>{class e extends tt{constructor(e,t,n){super(e.body,t,n)}}return e.\u0275fac=function(t){return new(t||e)(i.dc(wt.d),i.dc(C),i.dc(ke))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})();const Et=[{provide:C,useFactory:function(){return"function"==typeof vt()?new yt:new gt}},{provide:new i.r("AnimationModuleType"),useValue:"BrowserAnimations"},{provide:a.b,useClass:St},{provide:ke,useFactory:function(){return new xe}},{provide:tt,useClass:Rt},{provide:i.F,useFactory:function(e,t,n){return new Ct(e,t,n)},deps:[r.e,tt,i.A]}];let At=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},providers:Et,imports:[r.a]}),e})();var It=n("EApP"),Pt=n("iInd"),Nt=n("LvDl"),jt=n.n(Nt),Ft=n("mrSG"),Yt=n("xTzq");let zt=(()=>{let e=class{constructor(e){this.http=e,this.baseURL="api/cephfs",this.baseUiURL="ui-api/cephfs"}list(){return this.http.get(""+this.baseURL)}lsDir(e,t){let n=`${this.baseUiURL}/${e}/ls_dir?depth=2`;return t&&(n+="&path="+encodeURIComponent(t)),this.http.get(n)}getCephfs(e){return this.http.get(`${this.baseURL}/${e}`)}getTabs(e){return this.http.get(`ui-api/cephfs/${e}/tabs`)}getClients(e){return this.http.get(`${this.baseURL}/${e}/clients`)}evictClient(e,t){return this.http.delete(`${this.baseURL}/${e}/client/${t}`)}getMdsCounters(e){return this.http.get(`${this.baseURL}/${e}/mds_counters`)}mkSnapshot(e,t,n){let i=new o.e;return i=i.append("path",t),jt.a.isUndefined(n)||(i=i.append("name",n)),this.http.post(`${this.baseURL}/${e}/snapshot`,null,{params:i})}rmSnapshot(e,t,n){let i=new o.e;return i=i.append("path",t),i=i.append("name",n),this.http.delete(`${this.baseURL}/${e}/snapshot`,{params:i})}quota(e,t,n){let i=new o.e;return i=i.append("path",t),this.http.put(`${this.baseURL}/${e}/quota`,n,{observe:"response",params:i})}};return e.\u0275fac=function(t){return new(t||e)(i.dc(o.b))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e=Object(Ft.b)([Yt.a,Object(Ft.d)("design:paramtypes",[o.b])],e),e})();var $t=n("+fVR"),Ht=n("x38r"),Wt=n("vCyI"),Vt=n("a0VL"),Bt=n("uIqm"),Ut=n("PqYM"),Gt=n("VxPD"),qt=n("yJti"),Jt=n("aexS"),Qt=n("G0yt"),Kt=n("JP8w"),Zt=n("Fgil"),Xt=n("o4+5"),en=n("FSuO"),tn=n("wd/R"),nn=n.n(tn),rn=n("NEZu"),sn=n("hrfs");const on=["chartCanvas"],an=["chartTooltip"];let cn=(()=>{class e{constructor(){this.lhsCounter="mds_mem.ino",this.rhsCounter="mds_server.handle_client_request",this.chart={datasets:[{label:this.lhsCounter,yAxisID:"LHS",data:[],lineTension:.1},{label:this.rhsCounter,yAxisID:"RHS",data:[],lineTension:.1}],options:{title:{text:"",display:!0},responsive:!0,maintainAspectRatio:!1,legend:{position:"top"},scales:{xAxes:[{position:"top",type:"time",time:{displayFormats:{quarter:"MMM YYYY"}},ticks:{maxRotation:0}}],yAxes:[{id:"LHS",type:"linear",position:"left"},{id:"RHS",type:"linear",position:"right"}]},tooltips:{enabled:!1,mode:"index",intersect:!1,position:"nearest",callbacks:{title:(e,t)=>{let n=0;if(e.length>0){const i=e[0];n=t.datasets[i.datasetIndex].data[i.index].x}return n.toString()}}}},chartType:"line"}}ngOnInit(){jt.a.isUndefined(this.mdsCounter)||(this.setChartTooltip(),this.updateChart())}ngOnChanges(){jt.a.isUndefined(this.mdsCounter)||this.updateChart()}setChartTooltip(){const e=new rn.a(this.chartCanvas,this.chartTooltip,e=>e.caretX+"px",e=>e.caretY-e.height-23+"px");e.getTitle=e=>nn()(e,"x").format("LTS"),e.checkOffset=!0,jt.a.merge(this.chart,{options:{title:{text:this.mdsCounter.name},tooltips:{custom:t=>e.customTooltips(t)}}})}updateChart(){const e=[{data:this.convertTimeSeries(this.mdsCounter[this.lhsCounter])},{data:this.deltaTimeSeries(this.mdsCounter[this.rhsCounter])}];jt.a.merge(this.chart,{datasets:e}),this.chart.datasets=[...this.chart.datasets]}convertTimeSeries(e){const t=[];return jt.a.each(e,e=>{t.push({x:1e3*e[0],y:e[1]})}),t.shift(),t}deltaTimeSeries(e){let t,n=e[0];const i=[];for(t=1;t<e.length;t++){const r=e[t];i.push({x:1e3*r[0],y:r[1]-n[1]}),n=r}return i}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-cephfs-chart"]],viewQuery:function(e,t){var n;1&e&&(i.Jc(on,!0),i.Jc(an,!0)),2&e&&(i.zc(n=i.hc())&&(t.chartCanvas=n.first),i.zc(n=i.hc())&&(t.chartTooltip=n.first))},inputs:{mdsCounter:"mdsCounter"},features:[i.wb],decls:6,vars:3,consts:[[1,"chart-container"],["baseChart","",3,"datasets","options","chartType"],["chartCanvas",""],[1,"chartjs-tooltip"],["chartTooltip",""]],template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Nb(1,"canvas",1,2),i.Sb(3,"div",3,4),i.Nb(5,"table"),i.Rb(),i.Rb()),2&e&&(i.yb(1),i.pc("datasets",t.chart.datasets)("options",t.chart.options)("chartType",t.chart.chartType))},directives:[sn.a],styles:['.chart-container[_ngcontent-%COMP%]{cursor:pointer;margin:auto;overflow:visible;position:absolute}canvas[_ngcontent-%COMP%]{user-select:none}.chartjs-tooltip[_ngcontent-%COMP%]{background:rgba(0,0,0,.7);border-radius:3px;color:#fff;font-family:Helvetica Neue,Helvetica,Arial,sans-serif!important;opacity:0;pointer-events:none;position:absolute;transform:translate(-50%);transition:all .1s ease}.chartjs-tooltip.transform-left[_ngcontent-%COMP%]{transform:translate(-10%)}.chartjs-tooltip.transform-left[_ngcontent-%COMP%]:after{left:10%}.chartjs-tooltip.transform-right[_ngcontent-%COMP%]{transform:translate(-90%)}.chartjs-tooltip.transform-right[_ngcontent-%COMP%]:after{left:90%}.chartjs-tooltip[_ngcontent-%COMP%]:after{border:5px solid transparent;border-top-color:#000;content:" ";left:50%;margin-left:-5px;position:absolute;top:100%} .chartjs-tooltip-key{display:inline-block;height:10px;margin-right:10px;width:10px}.chart-container[_ngcontent-%COMP%]{height:500px;margin-bottom:20px;position:relative;width:100%}']}),e})();var ln=n("GgAd");const un=["poolUsageTpl"],dn=["activityTmpl"];function hn(e,t){if(1&e&&(i.Sb(0,"div",0),i.Sb(1,"div",11),i.Nb(2,"cd-cephfs-chart",12),i.Rb(),i.Rb()),2&e){const e=t.$implicit;i.yb(2),i.pc("mdsCounter",e)}}function fn(e,t){if(1&e&&i.Nb(0,"cd-usage-bar",13),2&e){const e=t.row;i.pc("total",e.size)("used",e.used)}}function pn(e,t){1&e&&(i.Oc(0),i.jc(1,"dimless")),2&e&&i.Rc(" ","standby-replay"===t.row.state?"Evts":"Reqs",": ",i.kc(1,2,t.value)," /s\n")}let mn=(()=>{class e{constructor(e,t){this.dimlessBinary=e,this.dimless=t,this.standbys=[],this.objectValues=Object.values}ngOnChanges(){this.setStandbys()}setStandbys(){this.standbys=[{key:"Standby daemons",value:this.data.standbys}]}ngOnInit(){this.columns={ranks:[{prop:"rank",name:"Rank"},{prop:"state",name:"State"},{prop:"mds",name:"Daemon"},{prop:"activity",name:"Activity",cellTemplate:this.activityTmpl},{prop:"dns",name:"Dentries",pipe:this.dimless},{prop:"inos",name:"Inodes",pipe:this.dimless},{prop:"dirs",name:"Dirs",pipe:this.dimless},{prop:"caps",name:"Caps",pipe:this.dimless}],pools:[{prop:"pool",name:"Pool"},{prop:"type",name:"Type"},{prop:"size",name:"Size",pipe:this.dimlessBinary},{name:"Usage",cellTemplate:this.poolUsageTpl,comparator:(e,t,n,i)=>{const r=n.used/n.avail,s=i.used/i.avail;return r===s?0:r>s?1:-1}}]}}trackByFn(e,t){return t.name}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Zt.a),i.Mb(Xt.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-cephfs-detail"]],viewQuery:function(e,t){var n;1&e&&(i.Jc(un,!0),i.Jc(dn,!0)),2&e&&(i.zc(n=i.hc())&&(t.poolUsageTpl=n.first),i.zc(n=i.hc())&&(t.activityTmpl=n.first))},inputs:{data:"data"},features:[i.wb],decls:19,vars:9,consts:function(){return[[1,"row"],[1,"col-sm-6"],"Ranks",[3,"data","columns","toolHeader"],"Standbys",[3,"data"],"Pools","MDS performance counters",["class","row",4,"ngFor","ngForOf","ngForTrackBy"],["poolUsageTpl",""],["activityTmpl",""],[1,"col-md-12"],[3,"mdsCounter"],[3,"total","used"]]},template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Sb(1,"div",1),i.Sb(2,"legend"),i.Wb(3,2),i.Rb(),i.Nb(4,"cd-table",3),i.Sb(5,"legend"),i.Wb(6,4),i.Rb(),i.Nb(7,"cd-table-key-value",5),i.Rb(),i.Sb(8,"div",1),i.Sb(9,"legend"),i.Wb(10,6),i.Rb(),i.Nb(11,"cd-table",3),i.Rb(),i.Rb(),i.Sb(12,"legend"),i.Wb(13,7),i.Rb(),i.Mc(14,hn,3,1,"div",8),i.Mc(15,fn,1,2,"ng-template",null,9,i.Nc),i.Mc(17,pn,2,4,"ng-template",null,10,i.Nc)),2&e&&(i.yb(4),i.pc("data",t.data.ranks)("columns",t.columns.ranks)("toolHeader",!1),i.yb(3),i.pc("data",t.standbys),i.yb(4),i.pc("data",t.data.pools)("columns",t.columns.pools)("toolHeader",!1),i.yb(3),i.pc("ngForOf",t.objectValues(t.data.mdsCounters))("ngForTrackBy",t.trackByFn))},directives:[Bt.a,en.a,wt.q,cn,ln.a],pipes:[Xt.a],styles:[".progress[_ngcontent-%COMP%]{margin-bottom:0}"]}),e})();var bn=n("0+/T"),gn=n("sne2"),_n=n("oxzT"),yn=n("mtw6"),vn=n("JK/P"),wn=n("9nlD"),Sn=n("S7zO");let Mn=(()=>{class e{constructor(e,t,n,r,s){this.cephfsService=e,this.modalService=t,this.notificationService=n,this.authStorageService=r,this.actionLabels=s,this.triggerApiUpdate=new i.o,this.selection=new Wt.a,this.permission=this.authStorageService.getPermissions().cephfs,this.tableActions=[{permission:"update",icon:_n.a.signOut,click:()=>this.evictClientModal(),name:this.actionLabels.EVICT}]}ngOnInit(){this.columns=[{prop:"id",name:"id"},{prop:"type",name:"type"},{prop:"state",name:"state"},{prop:"version",name:"version"},{prop:"hostname",name:"Host"},{prop:"root",name:"root"}]}updateSelection(e){this.selection=e}evictClient(e){this.cephfsService.evictClient(this.id,e).subscribe(()=>{this.triggerApiUpdate.emit(),this.modalRef.close(),this.notificationService.show(yn.a.success,"Evicted client '" + e + "'")},()=>{this.modalRef.componentInstance.stopLoadingSpinner()})}evictClientModal(){const e=this.selection.first().id;this.modalRef=this.modalService.show(bn.a,{itemDescription:"client",itemNames:[e],actionDescription:"evict",submitAction:()=>this.evictClient(e)})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(zt),i.Mb(vn.a),i.Mb(wn.a),i.Mb(Jt.a),i.Mb(gn.b))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-cephfs-clients"]],inputs:{id:"id",clients:"clients"},outputs:{triggerApiUpdate:"triggerApiUpdate"},decls:2,vars:7,consts:[["selectionType","single",3,"data","columns","status","autoReload","fetchData","updateSelection"],[1,"table-actions",3,"permission","selection","tableActions"]],template:function(e,t){1&e&&(i.Sb(0,"cd-table",0),i.gc("fetchData",(function(){return t.triggerApiUpdate.emit()}))("updateSelection",(function(e){return t.updateSelection(e)})),i.Nb(1,"cd-table-actions",1),i.Rb()),2&e&&(i.pc("data",t.clients.data)("columns",t.columns)("status",t.clients.status)("autoReload",-1),i.yb(1),i.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions))},directives:[Bt.a,Sn.a],styles:[""]}),e})();var kn=n("s7LF"),xn=n("ohO+"),Dn=n("OLbh"),Tn=n("Rf2I"),Cn=n("1Ni5"),On=n("ANnk");const Ln=["origin"],Rn=function(e,t){return[e,t]};function En(e,t){if(1&e&&i.Nb(0,"i",5),2&e){const e=i.ic(2);i.pc("ngClass",i.vc(1,Rn,e.icons.spinner,e.icons.spin))}}function An(e,t){if(1&e&&(i.Sb(0,"tree-root",10),i.Mc(1,En,1,4,"ng-template",null,11,i.Nc),i.Rb()),2&e){const e=i.ic();i.pc("nodes",e.nodes)("options",e.treeOptions)}}function In(e,t){if(1&e){const e=i.Tb();i.Qb(0),i.Sb(1,"legend"),i.Wb(2,17),i.Rb(),i.Sb(3,"cd-table",18),i.gc("updateSelection",(function(t){return i.Dc(e),i.ic(2).quota.updateSelection(t)})),i.Nb(4,"cd-table-actions",19),i.Rb(),i.Pb()}if(2&e){const e=i.ic(2);i.yb(3),i.pc("data",e.settings)("columns",e.quota.columns)("limit",0)("footer",!1)("onlyActionHeader",!0)("forceIdentifier",!0)("toolHeader",!1),i.yb(1),i.pc("permission",e.permission)("selection",e.quota.selection)("tableActions",e.quota.tableActions)}}function Pn(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",12),i.Sb(1,"div",2),i.Sb(2,"div",3),i.Oc(3),i.Rb(),i.Sb(4,"div",6),i.Mc(5,In,5,10,"ng-container",13),i.Sb(6,"legend"),i.Wb(7,14),i.Rb(),i.Sb(8,"cd-table",15),i.gc("updateSelection",(function(t){return i.Dc(e),i.ic().snapshot.updateSelection(t)})),i.Nb(9,"cd-table-actions",16),i.Rb(),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.ic();i.yb(3),i.Qc(" ",e.selectedDir.path," "),i.yb(2),i.pc("ngIf","/"!==e.selectedDir.path),i.yb(3),i.pc("data",e.selectedDir.snapshots)("columns",e.snapshot.columns),i.yb(1),i.pc("permission",e.permission)("selection",e.snapshot.selection)("tableActions",e.snapshot.tableActions)}}function Nn(e,t){if(1&e){const e=i.Tb();i.Sb(0,"span",20),i.gc("click",(function(){i.Dc(e);const n=t.value;return i.ic().selectOrigin(n)})),i.Oc(1),i.Rb()}if(2&e){const e=t.value;i.yb(1),i.Pc(e)}}let jn=(()=>{class e{constructor(e,t,n,i,r,s,o){this.authStorageService=e,this.modalService=t,this.cephfsService=n,this.cdDatePipe=i,this.actionLabels=r,this.notificationService=s,this.dimlessBinaryPipe=o,this.icons=_n.a,this.loadingIndicator=!1,this.loading={},this.treeOptions={useVirtualScroll:!0,getChildren:e=>this.updateDirectory(e.id),actionMapping:{mouse:{click:this.selectAndShowNode.bind(this),expanderClick:this.selectAndShowNode.bind(this)}}}}selectAndShowNode(e,t,n){xn.a.TOGGLE_EXPANDED(e,t,n),this.selectNode(t)}selectNode(e){xn.a.TOGGLE_ACTIVE(void 0,e,void 0),this.selectedDir=this.getDirectory(e),"/"!==e.id&&this.setSettings(e)}ngOnInit(){this.permission=this.authStorageService.getPermissions().cephfs,this.setUpQuotaTable(),this.setUpSnapshotTable()}setUpQuotaTable(){this.quota={columns:[{prop:"row.name",name:"Name",flexGrow:1},{prop:"row.value",name:"Value",sortable:!1,flexGrow:1},{prop:"row.originPath",name:"Origin",sortable:!1,cellTemplate:this.originTmpl,flexGrow:1}],selection:new Wt.a,updateSelection:e=>{this.quota.selection=e},tableActions:[{name:this.actionLabels.SET,icon:_n.a.edit,permission:"update",visible:e=>!e.hasSelection||e.first()&&0===e.first().dirValue,click:()=>this.updateQuotaModal()},{name:this.actionLabels.UPDATE,icon:_n.a.edit,permission:"update",visible:e=>e.first()&&e.first().dirValue>0,click:()=>this.updateQuotaModal()},{name:this.actionLabels.UNSET,icon:_n.a.destroy,permission:"update",disable:e=>!e.hasSelection||e.first()&&0===e.first().dirValue,click:()=>this.unsetQuotaModal()}]}}setUpSnapshotTable(){this.snapshot={columns:[{prop:"name",name:"Name",flexGrow:1},{prop:"path",name:"Path",isHidden:!0,flexGrow:2},{prop:"created",name:"Created",flexGrow:1,pipe:this.cdDatePipe}],selection:new Wt.a,updateSelection:e=>{this.snapshot.selection=e},tableActions:[{name:this.actionLabels.CREATE,icon:_n.a.add,permission:"create",canBePrimary:e=>!e.hasSelection,click:()=>this.createSnapshot()},{name:this.actionLabels.DELETE,icon:_n.a.destroy,permission:"delete",click:()=>this.deleteSnapshotModal(),canBePrimary:e=>e.hasSelection,disable:e=>!e.hasSelection}]}}ngOnChanges(){this.selectedDir=void 0,this.dirs=[],this.requestedPaths=[],this.nodeIds={},this.id&&(this.setRootNode(),this.firstCall())}setRootNode(){this.nodes=[{name:"/",id:"/",isExpanded:!0}]}firstCall(){setTimeout(()=>{this.getNode("/").loadNodeChildren()},10)}updateDirectory(e){if(this.unsetLoadingIndicator(),this.requestedPaths.includes(e)){if(!0===this.loading[e])return}else this.requestedPaths.push(e);return new Promise(t=>{this.setLoadingIndicator(e,!0),this.cephfsService.lsDir(this.id,e).subscribe(n=>{this.updateTreeStructure(n),this.updateQuotaTable(),this.updateTree(),t(this.getChildren(e)),this.setLoadingIndicator(e,!1)})})}setLoadingIndicator(e,t){this.loading[e]=t,this.unsetLoadingIndicator()}getSubDirectories(e,t=this.dirs){return t.filter(t=>t.parent===e)}getChildren(e){const t=this.getSubTree(e);return jt.a.sortBy(this.getSubDirectories(e),"path").map(e=>this.createNode(e,t))}createNode(e,t){return this.nodeIds[e.path]=e,t||this.getSubTree(e.parent),{name:e.name,id:e.path,hasChildren:this.getSubDirectories(e.path,t).length>0}}getSubTree(e){return this.dirs.filter(t=>t.parent&&t.parent.startsWith(e))}setSettings(e){const t=(e,t)=>e?t?t(e):e:"";this.settings=[this.getQuota(e,"max_files",t),this.getQuota(e,"max_bytes",e=>t(e,e=>this.dimlessBinaryPipe.transform(e)))]}getQuota(e,t,n){const i=e.id;e=this.getOrigin(e,t);const r=this.getDirectory(e),s=r.quotas[t];let o=s,a=r.path;if(e.id===i)if("/"===e.parent.id)o=0;else{const n=this.getDirectory(this.getOrigin(e.parent,t));o=n.quotas[t],a=n.path}return{row:{name:"max_bytes"===t?"Max size":"Max files",value:n(s),originPath:s?r.path:""},quotaKey:t,dirValue:this.nodeIds[i].quotas[t],nextTreeMaximum:{value:o,path:o?a:""}}}getOrigin(e,t){if(e.parent&&"/"!==e.parent.id){const n=this.getQuotaFromTree(e,t),i=this.getOrigin(e.parent,t),r=this.getQuotaFromTree(i,t);return 0===n||0!==r&&r<n?i:e}return e}getQuotaFromTree(e,t){return this.getDirectory(e).quotas[t]}getDirectory(e){return this.nodeIds[e.id]}selectOrigin(e){this.selectNode(this.getNode(e))}getNode(e){return this.treeComponent.treeModel.getNodeById(e)}updateQuotaModal(){const e=this.selectedDir.path,t=this.quota.selection.first(),n=t.nextTreeMaximum,i=t.quotaKey,r=t.dirValue;this.modalService.show(Tn.a,{titleText:this.getModalQuotaTitle(0===r?this.actionLabels.SET:this.actionLabels.UPDATE,e),message:n.value?"The inherited " + this.getQuotaValueFromPathMsg(n.value, n.path) + " is the maximum value to be used.":void 0,fields:[this.getQuotaFormField(t.row.name,i,r,n.value)],submitButtonText:"Save",onSubmit:e=>this.updateQuota(e)})}getModalQuotaTitle(e,t){return "" + e + " CephFS " + this.getQuotaName() + " quota for '" + t + "'"}getQuotaName(){return this.isBytesQuotaSelected()?"size":"files"}isBytesQuotaSelected(){return"max_bytes"===this.quota.selection.first().quotaKey}getQuotaValueFromPathMsg(e,t){return e=this.isBytesQuotaSelected()?this.dimlessBinaryPipe.transform(e):e,"" + this.getQuotaName() + " quota " + e + " from '" + t + "'"}getQuotaFormField(e,t,n,i){const r="max_bytes"===t,s=[r?Cn.a.binaryMin(0):kn.A.min(0)];i&&s.push(r?Cn.a.binaryMax(i):kn.A.max(i));const o={type:r?"binary":"number",label:e,name:t,value:n,validators:s,required:!0};return r||(o.errors={min:"Value has to be at least 0 or more",max:"Value has to be at most " + i + " or less"}),o}updateQuota(e,t){const n=this.selectedDir.path,i=this.quota.selection.first().quotaKey,r=0===this.selectedDir.quotas[i]?this.actionLabels.SET:0===e[i]?this.actionLabels.UNSET:"Updated";this.cephfsService.quota(this.id,n,e).subscribe(()=>{t&&t(),this.notificationService.show(yn.a.success,this.getModalQuotaTitle(r,n)),this.forceDirRefresh()})}unsetQuotaModal(){const e=this.selectedDir.path,t=this.quota.selection.first(),n=t.quotaKey,i=t.nextTreeMaximum,r=t.dirValue,s=this.getQuotaValueFromPathMsg(i.value,i.path),o=i.value>0?i.value>r?"in order to inherit " + s + "":"which isn't used because of the inheritance of " + s + "":"in order to have no quota on the directory";this.modalRef=this.modalService.show(Dn.a,{titleText:this.getModalQuotaTitle(this.actionLabels.UNSET,e),buttonText:this.actionLabels.UNSET,description:"" + this.actionLabels.UNSET + " " + this.getQuotaValueFromPathMsg(r, e) + " " + o + ".",onSubmit:()=>this.updateQuota({[n]:0},()=>this.modalRef.close())})}createSnapshot(){const e=this.selectedDir.path;this.modalService.show(Tn.a,{titleText:"Create Snapshot",message:"Please enter the name of the snapshot.",fields:[{type:"text",name:"name",value:""+nn()().toISOString(!0),required:!0}],submitButtonText:"Create Snapshot",onSubmit:t=>{this.cephfsService.mkSnapshot(this.id,e,t.name).subscribe(t=>{this.notificationService.show(yn.a.success,"Created snapshot '" + t + "' for '" + e + "'"),this.forceDirRefresh()})}})}forceDirRefresh(e){if(!e){const t=this.selectedDir;if(!t)throw new Error("This function can only be called without path if an selection was made");e=t.parent?t.parent:t.path}this.getNode(e).loadNodeChildren()}updateTreeStructure(e){const t=(e,t)=>{const n=e.filter(e=>e.parent===t),i=n.map(e=>e.path);return{children:n,paths:i}};jt.a.uniq(e.map(e=>e.parent).sort()).forEach(n=>{const i=t(e,n),r=t(this.dirs,n);r.children.forEach(e=>{i.paths.includes(e.path)||this.removeOldDirectory(e)}),i.children.forEach(e=>{r.paths.includes(e.path)?this.updateExistingDirectory(r.children,e):this.addNewDirectory(e)})})}removeOldDirectory(e){const t=e.path;jt.a.remove(this.dirs,e=>e.path===t),delete this.nodeIds[t],this.updateDirectoriesParentNode(e)}updateDirectoriesParentNode(e){const t=e.parent;if(!t)return;const n=this.getNode(t);if(!n)return;const i=this.getChildren(t);n.data.children=i,n.data.hasChildren=i.length>0,this.treeComponent.treeModel.update()}addNewDirectory(e){this.dirs.push(e),this.nodeIds[e.path]=e,this.updateDirectoriesParentNode(e)}updateExistingDirectory(e,t){const n=e.find(e=>e.path===t.path);Object.assign(n,t)}updateQuotaTable(){const e=this.selectedDir?this.getNode(this.selectedDir.path):void 0;e&&"/"!==e.id&&this.setSettings(e)}updateTree(e=!1){this.loadingIndicator&&!e||(this.treeComponent.treeModel.update(),this.nodes=[...this.nodes],this.treeComponent.sizeChanged())}deleteSnapshotModal(){this.modalRef=this.modalService.show(bn.a,{itemDescription:"CephFs Snapshot",itemNames:this.snapshot.selection.selected.map(e=>e.name),submitAction:()=>this.deleteSnapshot()})}deleteSnapshot(){const e=this.selectedDir.path;this.snapshot.selection.selected.forEach(t=>{const n=t.name;this.cephfsService.rmSnapshot(this.id,e,n).subscribe(()=>{this.notificationService.show(yn.a.success,"Deleted snapshot '" + n + "' for '" + e + "'")})}),this.modalRef.close(),this.forceDirRefresh()}refreshAllDirectories(){this.loadingIndicator=!0,this.requestedPaths.map(e=>this.forceDirRefresh(e));const e=setInterval(()=>{this.updateTree(!0),this.loadingIndicator||clearInterval(e)},3e3)}unsetLoadingIndicator(){this.loadingIndicator&&(clearTimeout(this.loadingTimeout),this.loadingTimeout=setTimeout(()=>{if(Object.values(this.loading).some(e=>e))return this.unsetLoadingIndicator();this.loadingIndicator=!1,this.updateTree()},3e3))}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Jt.a),i.Mb(vn.a),i.Mb(zt),i.Mb(Vt.a),i.Mb(gn.b),i.Mb(wn.a),i.Mb(Zt.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-cephfs-directories"]],viewQuery:function(e,t){var n;1&e&&(i.Tc(xn.b,!0),i.Jc(Ln,!0)),2&e&&(i.zc(n=i.hc())&&(t.treeComponent=n.first),i.zc(n=i.hc())&&(t.originTmpl=n.first))},inputs:{id:"id"},features:[i.wb],decls:11,vars:10,consts:function(){return[[1,"row"],[1,"col-sm-4","pr-0"],[1,"card"],[1,"card-header"],["type","button",1,"btn","btn-light","pull-right",3,"click"],[3,"ngClass"],[1,"card-body"],[3,"nodes","options",4,"ngIf"],["class","col-sm-8 metadata",4,"ngIf"],["origin",""],[3,"nodes","options"],["loadingTemplate",""],[1,"col-sm-8","metadata"],[4,"ngIf"],"Snapshots",["identifier","name","forceIdentifier","true","selectionType","multiClick",3,"data","columns","updateSelection"],[1,"table-actions",3,"permission","selection","tableActions"],"Quotas",["selectionType","single","identifier","quotaKey",3,"data","columns","limit","footer","onlyActionHeader","forceIdentifier","toolHeader","updateSelection"],[1,"only-table-actions",3,"permission","selection","tableActions"],[1,"quota-origin",3,"click"]]},template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Sb(1,"div",1),i.Sb(2,"div",2),i.Sb(3,"div",3),i.Sb(4,"button",4),i.gc("click",(function(){return t.refreshAllDirectories()})),i.Nb(5,"i",5),i.Rb(),i.Rb(),i.Sb(6,"div",6),i.Mc(7,An,3,2,"tree-root",7),i.Rb(),i.Rb(),i.Rb(),i.Mc(8,Pn,10,7,"div",8),i.Rb(),i.Mc(9,Nn,2,1,"ng-template",null,9,i.Nc)),2&e&&(i.yb(4),i.Eb("disabled",t.loadingIndicator),i.yb(1),i.Eb("fa-spin",t.loadingIndicator),i.pc("ngClass",i.vc(7,Rn,t.icons.large,t.icons.refresh)),i.yb(2),i.pc("ngIf",t.nodes),i.yb(1),i.pc("ngIf",t.selectedDir))},directives:[On.a,wt.p,wt.r,xn.b,Bt.a,Sn.a],styles:["cd-cephfs-directories tree-root .tree-children{overflow:inherit}.quota-origin[_ngcontent-%COMP%]{color:#2b99a8;cursor:pointer}.quota-origin[_ngcontent-%COMP%]:hover{color:#212529}"]}),e})();var Fn=n("insk");function Yn(e,t){if(1&e&&i.Nb(0,"cd-cephfs-detail",15),2&e){const e=i.ic(2);i.pc("data",e.details)}}function zn(e,t){if(1&e){const e=i.Tb();i.Sb(0,"cd-cephfs-clients",16),i.gc("triggerApiUpdate",(function(){return i.Dc(e),i.ic(2).refresh()})),i.Rb()}if(2&e){const e=i.ic(2);i.pc("id",e.id)("clients",e.clients)}}function $n(e,t){if(1&e&&i.Nb(0,"cd-cephfs-directories",17),2&e){const e=i.ic(2);i.pc("id",e.id)}}function Hn(e,t){if(1&e&&i.Nb(0,"cd-grafana",18),2&e){const e=i.ic(2);i.pc("grafanaPath","mds-performance?var-mds_servers=mds."+e.grafanaId)}}function Wn(e,t){if(1&e){const e=i.Tb();i.Qb(0),i.Sb(1,"ul",1,2),i.gc("navChange",(function(){return i.Dc(e),i.ic().softRefresh()})),i.Sb(3,"li",3),i.Sb(4,"a",4),i.Wb(5,5),i.Rb(),i.Mc(6,Yn,1,1,"ng-template",6),i.Rb(),i.Sb(7,"li",7),i.Sb(8,"a",4),i.Qb(9),i.Wb(10,8),i.Pb(),i.Sb(11,"span",9),i.Oc(12),i.Rb(),i.Rb(),i.Mc(13,zn,1,2,"ng-template",6),i.Rb(),i.Sb(14,"li",10),i.Sb(15,"a",4),i.Wb(16,11),i.Rb(),i.Mc(17,$n,1,1,"ng-template",6),i.Rb(),i.Sb(18,"li",12),i.Sb(19,"a",4),i.Wb(20,13),i.Rb(),i.Mc(21,Hn,1,1,"ng-template",6),i.Rb(),i.Rb(),i.Nb(22,"div",14),i.Pb()}if(2&e){const e=i.Ac(2),t=i.ic();i.yb(12),i.Pc(t.clients.data.length),i.yb(10),i.pc("ngbNavOutlet",e)}}let Vn=(()=>{class e{constructor(e,t,n){this.ngZone=e,this.authStorageService=t,this.cephfsService=n,this.clients={data:[],status:new Gt.a(qt.a.ValueNone)},this.details={standbys:"",pools:[],ranks:[],mdsCounters:{},name:""},this.grafanaPermission=this.authStorageService.getPermissions().grafana}ngOnChanges(){this.selection?this.selection.id!==this.id&&this.setupSelected(this.selection.id,this.selection.mdsmap.info):this.unsubscribeInterval()}setupSelected(e,t){this.id=e;const n=jt.a.first(Object.values(t));this.grafanaId=n&&n.name,this.details={standbys:"",pools:[],ranks:[],mdsCounters:{},name:""},this.clients={data:[],status:new Gt.a(qt.a.ValueNone)},this.updateInterval()}updateInterval(){this.unsubscribeInterval(),this.subscribeInterval()}unsubscribeInterval(){this.reloadSubscriber&&this.reloadSubscriber.unsubscribe()}subscribeInterval(){this.ngZone.runOutsideAngular(()=>this.reloadSubscriber=Object(Ut.a)(0,5e3).subscribe(()=>this.ngZone.run(()=>this.refresh())))}refresh(){this.cephfsService.getTabs(this.id).subscribe(e=>{this.data=e,this.softRefresh()},()=>{this.clients.status=new Gt.a(qt.a.ValueException)})}softRefresh(){const e=jt.a.cloneDeep(this.data);this.clients=e.clients,this.clients.status=new Gt.a(this.clients.status),this.details={standbys:e.standbys,pools:e.pools,ranks:e.ranks,mdsCounters:e.mds_counters,name:e.name}}ngOnDestroy(){this.unsubscribeInterval()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(i.A),i.Mb(Jt.a),i.Mb(zt))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-cephfs-tabs"]],inputs:{selection:"selection"},features:[i.wb],decls:1,vars:1,consts:function(){return[[4,"ngIf"],["ngbNav","","cdStatefulTab","cephfs-tabs",1,"nav-tabs",3,"navChange"],["nav","ngbNav"],["ngbNavItem","details"],["ngbNavLink",""],"Details",["ngbNavContent",""],["ngbNavItem","clients"],"Clients",[1,"badge","badge-pill","badge-tab","ml-1"],["ngbNavItem","directories"],"Directories",["ngbNavItem","performance-details"],"Performance Details",[3,"ngbNavOutlet"],[3,"data"],[3,"id","clients","triggerApiUpdate"],[3,"id"],["uid","tbO9LAiZz","grafanaStyle","one",3,"grafanaPath"]]},template:function(e,t){1&e&&i.Mc(0,Wn,23,2,"ng-container",0),2&e&&i.pc("ngIf",t.selection)},directives:[wt.r,Qt.p,Kt.a,Qt.r,Qt.s,Qt.q,Qt.u,mn,Mn,jn,Fn.a],styles:[""]}),e})(),Bn=(()=>{class e extends $t.a{constructor(e,t){super(),this.cephfsService=e,this.cdDatePipe=t,this.filesystems=[],this.selection=new Wt.a}ngOnInit(){this.columns=[{name:"Name",prop:"mdsmap.fs_name",flexGrow:2},{name:"Created",prop:"mdsmap.created",flexGrow:2,pipe:this.cdDatePipe},{name:"Enabled",prop:"mdsmap.enabled",flexGrow:1,cellTransformation:Ht.a.checkIcon}]}loadFilesystems(e){this.cephfsService.list().subscribe(e=>{this.filesystems=e},()=>{e.error()})}updateSelection(e){this.selection=e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(zt),i.Mb(Vt.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-cephfs-list"]],features:[i.vb],decls:2,vars:4,consts:[["columnMode","flex","identifier","id","forceIdentifier","true","selectionType","single",3,"data","columns","hasDetails","fetchData","setExpandedRow","updateSelection"],["cdTableDetail","",3,"selection"]],template:function(e,t){1&e&&(i.Sb(0,"cd-table",0),i.gc("fetchData",(function(e){return t.loadFilesystems(e)}))("setExpandedRow",(function(e){return t.setExpandedRow(e)}))("updateSelection",(function(e){return t.updateSelection(e)})),i.Nb(1,"cd-cephfs-tabs",1),i.Rb()),2&e&&(i.pc("data",t.filesystems)("columns",t.columns)("hasDetails",!0),i.yb(1),i.pc("selection",t.expandedRow))},directives:[Bt.a,Vn],styles:[""]}),e})();var Un=n("MuvH");let Gn=(()=>{class e{static getType(e){const t=jt.a.find(this.knownTypes,t=>t.name===e);if(void 0!==t)return t;throw new Error('Found unknown type "'+e+'" for config option.')}static getTypeValidators(t){const n=e.getType(t.type);if("bool"===n.name||"str"===n.name)return;const i={validators:[],patternHelpText:n.patternHelpText};return n.isNumberType?(t.max&&""!==t.max&&(i.max=t.max,i.validators.push(kn.A.max(t.max))),t.min&&""!==t.min?(i.min=t.min,i.validators.push(kn.A.min(t.min))):"defaultMin"in n&&(i.min=n.defaultMin,i.validators.push(kn.A.min(n.defaultMin))),i.validators.push("float"===t.type?Cn.a.decimalNumber():Cn.a.number(n.allowsNegative))):"addr"===t.type?i.validators=[Cn.a.ip()]:"uuid"===t.type&&(i.validators=[Cn.a.uuid()]),i}static getTypeStep(e,t){if(["uint","int","size","secs"].includes(e))return 1;if("float"===e){if(null!==t&&-1!==t.toString().indexOf(".")){const e=t.toString().split(".");return Math.pow(10,-e[1].length)}return.1}}}return e.knownTypes=[{name:"uint",inputType:"number",humanReadable:"Unsigned integer value",defaultMin:0,patternHelpText:"The entered value needs to be an unsigned number.",isNumberType:!0,allowsNegative:!1},{name:"int",inputType:"number",humanReadable:"Integer value",patternHelpText:"The entered value needs to be a number.",isNumberType:!0,allowsNegative:!0},{name:"size",inputType:"number",humanReadable:"Unsigned integer value (>=16bit)",defaultMin:0,patternHelpText:"The entered value needs to be a unsigned number.",isNumberType:!0,allowsNegative:!1},{name:"secs",inputType:"number",humanReadable:"Number of seconds",defaultMin:1,patternHelpText:"The entered value needs to be a number >= 1.",isNumberType:!0,allowsNegative:!1},{name:"float",inputType:"number",humanReadable:"Double value",patternHelpText:"The entered value needs to be a number or decimal.",isNumberType:!0,allowsNegative:!0},{name:"str",inputType:"text",humanReadable:"Text",isNumberType:!1},{name:"addr",inputType:"text",humanReadable:"IPv4 or IPv6 address",patternHelpText:"The entered value needs to be a valid IP address.",isNumberType:!1},{name:"uuid",inputType:"text",humanReadable:"UUID",patternHelpText:"The entered value is not a valid UUID, e.g.: 67dcac9f-2c03-4d6c-b7bd-1210b3a259a8",isNumberType:!1},{name:"bool",inputType:"checkbox",humanReadable:"Boolean value",isNumberType:!1}],e})();var qn=n("spCT"),Jn=n("QFaf");class Qn{constructor(){this.value=[]}}var Kn=n("zc8c"),Zn=n("NwgZ"),Xn=n("ocLN"),ei=n("f69J"),ti=n("6+kj");function ni(e,t){1&e&&(i.Sb(0,"div",8),i.Sb(1,"label",9),i.Wb(2,20),i.Rb(),i.Sb(3,"div",11),i.Sb(4,"textarea",21),i.Oc(5," "),i.Rb(),i.Rb(),i.Rb())}function ii(e,t){1&e&&(i.Sb(0,"div",8),i.Sb(1,"label",9),i.Wb(2,22),i.Rb(),i.Sb(3,"div",11),i.Sb(4,"textarea",23),i.Oc(5," "),i.Rb(),i.Rb(),i.Rb())}function ri(e,t){1&e&&(i.Sb(0,"div",8),i.Sb(1,"label",9),i.Wb(2,24),i.Rb(),i.Sb(3,"div",11),i.Nb(4,"input",25),i.Rb(),i.Rb())}function si(e,t){1&e&&(i.Sb(0,"div",8),i.Sb(1,"label",9),i.Wb(2,26),i.Rb(),i.Sb(3,"div",11),i.Nb(4,"input",27),i.Rb(),i.Rb())}function oi(e,t){if(1&e&&(i.Sb(0,"span",30),i.Sb(1,"span",31),i.Oc(2),i.Rb(),i.Rb()),2&e){const e=t.$implicit;i.yb(2),i.Pc(e)}}function ai(e,t){if(1&e&&(i.Sb(0,"div",8),i.Sb(1,"label",9),i.Wb(2,28),i.Rb(),i.Sb(3,"div",11),i.Mc(4,oi,3,1,"span",29),i.Rb(),i.Rb()),2&e){const e=i.ic(2);i.yb(4),i.pc("ngForOf",e.configForm.getValue("services"))}}function ci(e,t){if(1&e&&(i.Sb(0,"div",8),i.Sb(1,"label",32),i.Oc(2),i.Rb(),i.Sb(3,"div",11),i.Sb(4,"select",33),i.Sb(5,"option",34),i.Wb(6,35),i.Rb(),i.Sb(7,"option",34),i.Wb(8,36),i.Rb(),i.Sb(9,"option",34),i.Wb(10,37),i.Rb(),i.Rb(),i.Rb(),i.Rb()),2&e){const e=i.ic().$implicit;i.yb(1),i.pc("for",e),i.yb(1),i.Qc("",e," "),i.yb(2),i.pc("formControlName",e),i.yb(1),i.pc("ngValue",null),i.yb(2),i.pc("ngValue",!0),i.yb(2),i.pc("ngValue",!1)}}function li(e,t){if(1&e&&(i.Sb(0,"span",40),i.Oc(1),i.Rb()),2&e){const e=i.ic(4);i.yb(1),i.Qc(" ",e.patternHelpText," ")}}function ui(e,t){if(1&e&&(i.Sb(0,"span",40),i.Oc(1),i.Rb()),2&e){const e=i.ic(4);i.yb(1),i.Qc(" ",e.patternHelpText," ")}}function di(e,t){if(1&e&&(i.Sb(0,"span",40),i.Wb(1,41),i.Rb()),2&e){const e=i.ic(4);i.yb(1),i.ac(e.maxValue),i.Xb(1)}}function hi(e,t){if(1&e&&(i.Sb(0,"span",40),i.Wb(1,42),i.Rb()),2&e){const e=i.ic(4);i.yb(1),i.ac(e.minValue),i.Xb(1)}}function fi(e,t){if(1&e&&(i.Sb(0,"div",8),i.Sb(1,"label",32),i.Oc(2),i.Rb(),i.Sb(3,"div",11),i.Nb(4,"input",38),i.Mc(5,li,2,1,"span",39),i.Mc(6,ui,2,1,"span",39),i.Mc(7,di,2,1,"span",39),i.Mc(8,hi,2,1,"span",39),i.Rb(),i.Rb()),2&e){const e=i.ic().$implicit;i.ic();const t=i.Ac(2),n=i.ic();i.yb(1),i.pc("for",e),i.yb(1),i.Qc("",e," "),i.yb(2),i.pc("type",n.inputType)("id",e)("placeholder",n.humanReadableType)("formControlName",e)("step",n.getStep(n.type,n.configForm.getValue(e))),i.yb(1),i.pc("ngIf",n.configForm.showError(e,t,"pattern")),i.yb(1),i.pc("ngIf",n.configForm.showError(e,t,"invalidUuid")),i.yb(1),i.pc("ngIf",n.configForm.showError(e,t,"max")),i.yb(1),i.pc("ngIf",n.configForm.showError(e,t,"min"))}}function pi(e,t){if(1&e&&(i.Qb(0),i.Mc(1,ci,11,6,"div",13),i.Mc(2,fi,9,11,"div",13),i.Pb()),2&e){const e=i.ic(2);i.yb(1),i.pc("ngIf","bool"===e.type),i.yb(1),i.pc("ngIf","bool"!==e.type)}}function mi(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",1),i.Sb(1,"form",2,3),i.Sb(3,"div",4),i.Sb(4,"div",5),i.Qb(5,6),i.Oc(6,"Edit"),i.Pb(),i.Oc(7),i.Rb(),i.Sb(8,"div",7),i.Sb(9,"div",8),i.Sb(10,"label",9),i.Wb(11,10),i.Rb(),i.Sb(12,"div",11),i.Nb(13,"input",12),i.Rb(),i.Rb(),i.Mc(14,ni,6,0,"div",13),i.Mc(15,ii,6,0,"div",13),i.Mc(16,ri,5,0,"div",13),i.Mc(17,si,5,0,"div",13),i.Mc(18,ai,5,1,"div",13),i.Sb(19,"div",14),i.Sb(20,"h3",15),i.Wb(21,16),i.Rb(),i.Mc(22,pi,3,2,"ng-container",17),i.Rb(),i.Rb(),i.Sb(23,"div",18),i.Sb(24,"cd-form-button-panel",19),i.gc("submitActionEvent",(function(){return i.Dc(e),i.ic().submit()})),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.ic();i.yb(1),i.pc("formGroup",e.configForm),i.yb(6),i.Qc(" ",e.configForm.getValue("name")," "),i.yb(7),i.pc("ngIf",e.configForm.getValue("desc")),i.yb(1),i.pc("ngIf",e.configForm.getValue("long_desc")),i.yb(1),i.pc("ngIf",""!==e.configForm.getValue("default")),i.yb(1),i.pc("ngIf",""!==e.configForm.getValue("daemon_default")),i.yb(1),i.pc("ngIf",e.configForm.getValue("services").length>0),i.yb(4),i.pc("ngForOf",e.availSections),i.yb(2),i.pc("form",e.configForm)("submitText",e.actionLabels.UPDATE)}}let bi=(()=>{class e extends qn.a{constructor(e,t,n,i,r){super(),this.actionLabels=e,this.route=t,this.router=n,this.configService=i,this.notificationService=r,this.availSections=["global","mon","mgr","osd","mds","client"],this.createForm()}createForm(){const e={name:new kn.h({value:null}),desc:new kn.h({value:null}),long_desc:new kn.h({value:null}),values:new kn.j({}),default:new kn.h({value:null}),daemon_default:new kn.h({value:null}),services:new kn.h([])};this.availSections.forEach(t=>{e.values.addControl(t,new kn.h(null))}),this.configForm=new Jn.a(e)}ngOnInit(){this.route.params.subscribe(e=>{this.configService.get(e.name).subscribe(e=>{this.setResponse(e),this.loadingReady()})})}getValidators(e){const t=Gn.getTypeValidators(e);if(t)return this.patternHelpText=t.patternHelpText,"max"in t&&""!==t.max&&(this.maxValue=t.max),"min"in t&&""!==t.min&&(this.minValue=t.min),t.validators}getStep(e,t){return Gn.getTypeStep(e,t)}setResponse(e){this.response=e;const t=this.getValidators(e);this.configForm.get("name").setValue(e.name),this.configForm.get("desc").setValue(e.desc),this.configForm.get("long_desc").setValue(e.long_desc),this.configForm.get("default").setValue(e.default),this.configForm.get("daemon_default").setValue(e.daemon_default),this.configForm.get("services").setValue(e.services),this.response.value&&this.response.value.forEach(e=>{let t=null;t="true"===e.value||"false"!==e.value&&e.value,this.configForm.get("values").get(e.section).setValue(t)}),this.availSections.forEach(e=>{this.configForm.get("values").get(e).setValidators(t)});const n=Gn.getType(e.type);this.type=n.name,this.inputType=n.inputType,this.humanReadableType=n.humanReadable}createRequest(){const e=[];if(this.availSections.forEach(t=>{const n=this.configForm.getValue(t);null!==n&&""!==n&&e.push({section:t,value:n})}),!jt.a.isEqual(this.response.value,e)){const t=new Qn;return t.name=this.configForm.getValue("name"),t.value=e,t}return null}submit(){const e=this.createRequest();e&&this.configService.create(e).subscribe(()=>{this.notificationService.show(yn.a.success,"Updated config option " + e.name + ""),this.router.navigate(["/configuration"])},()=>{this.configForm.setErrors({cdSubmitButton:!0})}),this.router.navigate(["/configuration"])}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(gn.b),i.Mb(Pt.a),i.Mb(Pt.e),i.Mb(Un.a),i.Mb(wn.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-configuration-form"]],features:[i.vb],decls:1,vars:1,consts:function(){return[["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],["name","configForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"card"],[1,"card-header"],["i18",""],[1,"card-body"],[1,"form-group","row"],[1,"cd-col-form-label"],"Name",[1,"cd-col-form-input"],["type","text","id","name","formControlName","name","readonly","",1,"form-control"],["class","form-group row",4,"ngIf"],["formGroupName","values"],[1,"cd-header"],"Values",[4,"ngFor","ngForOf"],[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],"Description",["id","desc","formControlName","desc","readonly","",1,"form-control","resize-vertical"],"Long description",["id","long_desc","formControlName","long_desc","readonly","",1,"form-control","resize-vertical"],"Default",["type","text","id","default","formControlName","default","readonly","",1,"form-control"],"Daemon default",["type","text","id","daemon_default","formControlName","daemon_default","readonly","",1,"form-control"],"Services",["class","form-component-badge",4,"ngFor","ngForOf"],[1,"form-component-badge"],[1,"badge","badge-dark"],[1,"cd-col-form-label",3,"for"],["id","pool","name","pool",1,"form-control","custom-select",3,"formControlName"],[3,"ngValue"],"-- Default --","true","false",[1,"form-control",3,"type","id","placeholder","formControlName","step"],["class","invalid-feedback",4,"ngIf"],[1,"invalid-feedback"],"The entered value is too high! It must not be greater than " + "\ufffd0\ufffd" + ".","The entered value is too low! It must not be lower than " + "\ufffd0\ufffd" + "."]},template:function(e,t){1&e&&i.Mc(0,mi,25,10,"div",0),2&e&&i.pc("cdFormLoading",t.loading)},directives:[Kn.a,kn.C,kn.r,Zn.a,kn.k,Xn.a,On.a,kn.d,ei.a,kn.q,kn.i,wt.r,kn.l,wt.q,ti.a,kn.z,kn.u,kn.B],styles:[".form-component-badge[_ngcontent-%COMP%]{display:block;height:34px}.form-component-badge[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-top:7px}.resize-vertical[_ngcontent-%COMP%]{resize:vertical}"]}),e})();var gi=n("iExv");function _i(e,t){if(1&e&&(i.Sb(0,"span"),i.Oc(1),i.Nb(2,"br"),i.Rb()),2&e){const e=t.$implicit,n=t.last;i.yb(1),i.Sc(" ",e.section,": ",e.value,"",n?"":",","")}}function yi(e,t){if(1&e&&(i.Sb(0,"span"),i.Sb(1,"span",23),i.Sb(2,"span",24),i.Oc(3),i.jc(4,"uppercase"),i.Rb(),i.Rb(),i.Rb()),2&e){const e=t.$implicit,n=i.ic(2);i.yb(1),i.qc("title",n.flags[e]),i.yb(2),i.Pc(i.kc(4,2,e))}}function vi(e,t){if(1&e&&(i.Sb(0,"span"),i.Sb(1,"span",24),i.Oc(2),i.Rb(),i.Rb()),2&e){const e=t.$implicit;i.yb(2),i.Pc(e)}}function wi(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"table",1),i.Sb(2,"tbody"),i.Sb(3,"tr"),i.Sb(4,"td",2),i.Wb(5,3),i.Rb(),i.Sb(6,"td",4),i.Oc(7),i.Rb(),i.Rb(),i.Sb(8,"tr"),i.Sb(9,"td",5),i.Wb(10,6),i.Rb(),i.Sb(11,"td"),i.Oc(12),i.Rb(),i.Rb(),i.Sb(13,"tr"),i.Sb(14,"td",5),i.Wb(15,7),i.Rb(),i.Sb(16,"td"),i.Oc(17),i.Rb(),i.Rb(),i.Sb(18,"tr"),i.Sb(19,"td",5),i.Wb(20,8),i.Rb(),i.Sb(21,"td"),i.Mc(22,_i,3,3,"span",9),i.Rb(),i.Rb(),i.Sb(23,"tr"),i.Sb(24,"td",5),i.Wb(25,10),i.Rb(),i.Sb(26,"td"),i.Oc(27),i.Rb(),i.Rb(),i.Sb(28,"tr"),i.Sb(29,"td",5),i.Wb(30,11),i.Rb(),i.Sb(31,"td"),i.Oc(32),i.Rb(),i.Rb(),i.Sb(33,"tr"),i.Sb(34,"td",5),i.Wb(35,12),i.Rb(),i.Sb(36,"td"),i.Oc(37),i.Rb(),i.Rb(),i.Sb(38,"tr"),i.Sb(39,"td",5),i.Wb(40,13),i.Rb(),i.Sb(41,"td"),i.Oc(42),i.Rb(),i.Rb(),i.Sb(43,"tr"),i.Sb(44,"td",5),i.Wb(45,14),i.Rb(),i.Sb(46,"td"),i.Oc(47),i.Rb(),i.Rb(),i.Sb(48,"tr"),i.Sb(49,"td",5),i.Wb(50,15),i.Rb(),i.Sb(51,"td"),i.Mc(52,yi,5,4,"span",9),i.Rb(),i.Rb(),i.Sb(53,"tr"),i.Sb(54,"td",5),i.Wb(55,16),i.Rb(),i.Sb(56,"td"),i.Mc(57,vi,3,1,"span",9),i.Rb(),i.Rb(),i.Sb(58,"tr"),i.Sb(59,"td",5),i.Wb(60,17),i.Rb(),i.Sb(61,"td"),i.Oc(62),i.Rb(),i.Rb(),i.Sb(63,"tr"),i.Sb(64,"td",5),i.Wb(65,18),i.Rb(),i.Sb(66,"td"),i.Oc(67),i.Rb(),i.Rb(),i.Sb(68,"tr"),i.Sb(69,"td",5),i.Wb(70,19),i.Rb(),i.Sb(71,"td"),i.Oc(72),i.jc(73,"booleanText"),i.Rb(),i.Rb(),i.Sb(74,"tr"),i.Sb(75,"td",5),i.Wb(76,20),i.Rb(),i.Sb(77,"td"),i.Oc(78),i.Rb(),i.Rb(),i.Sb(79,"tr"),i.Sb(80,"td",5),i.Wb(81,21),i.Rb(),i.Sb(82,"td"),i.Oc(83),i.Rb(),i.Rb(),i.Sb(84,"tr"),i.Sb(85,"td",5),i.Wb(86,22),i.Rb(),i.Sb(87,"td"),i.Oc(88),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Pb()),2&e){const e=i.ic();i.yb(7),i.Pc(e.selection.name),i.yb(5),i.Pc(e.selection.desc),i.yb(5),i.Pc(e.selection.long_desc),i.yb(5),i.pc("ngForOf",e.selection.value),i.yb(5),i.Pc(e.selection.default),i.yb(5),i.Pc(e.selection.daemon_default),i.yb(5),i.Pc(e.selection.type),i.yb(5),i.Pc(e.selection.min),i.yb(5),i.Pc(e.selection.max),i.yb(5),i.pc("ngForOf",e.selection.flags),i.yb(5),i.pc("ngForOf",e.selection.services),i.yb(5),i.Pc(e.selection.source),i.yb(5),i.Pc(e.selection.level),i.yb(5),i.Pc(i.kc(73,17,e.selection.can_update_at_runtime)),i.yb(6),i.Pc(e.selection.tags),i.yb(5),i.Pc(e.selection.enum_values),i.yb(5),i.Pc(e.selection.see_also)}}let Si=(()=>{class e{constructor(){this.flags={runtime:"The value can be updated at runtime.",no_mon_update:"Daemons/clients do not pull this value from the\n monitor config database. We disallow setting this option via 'ceph config\n set ...'. This option should be configured via ceph.conf or via the\n command line.",startup:"Option takes effect only during daemon startup.",cluster_create:"Option only affects cluster creation.",create:"Option only affects daemon creation."}}ngOnChanges(){this.selection&&(this.selection.services=jt.a.split(this.selection.services,","))}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-configuration-details"]],inputs:{selection:"selection"},features:[i.wb],decls:1,vars:1,consts:function(){return[[4,"ngIf"],[1,"table","table-striped","table-bordered"],[1,"bold","w-25"],"Name",[1,"w-75"],[1,"bold"],"Description","Long description","Current values",[4,"ngFor","ngForOf"],"Default","Daemon default","Type","Min","Max","Flags","Services","Source","Level","Can be updated at runtime (editable)","Tags","Enum values","See also",[3,"title"],[1,"badge","badge-dark","mr-2"]]},template:function(e,t){1&e&&i.Mc(0,wi,89,19,"ng-container",0),2&e&&i.pc("ngIf",t.selection)},directives:[wt.r,wt.q],pipes:[gi.a,wt.C],styles:[""]}),e})();const Mi=["confValTpl"],ki=["confFlagTpl"];function xi(e,t){if(1&e&&(i.Sb(0,"span"),i.Oc(1),i.Nb(2,"br"),i.Rb()),2&e){const e=t.$implicit,n=t.last;i.yb(1),i.Sc(" ",e.section,": ",e.value,"",n?"":",","")}}function Di(e,t){if(1&e&&(i.Sb(0,"span"),i.Mc(1,xi,3,3,"span",5),i.Rb()),2&e){const e=i.ic().value;i.yb(1),i.pc("ngForOf",e)}}function Ti(e,t){1&e&&i.Mc(0,Di,2,1,"span",4),2&e&&i.pc("ngIf",t.value)}let Ci=(()=>{class e extends $t.a{constructor(e,t,n){super(),this.authStorageService=e,this.configurationService=t,this.actionLabels=n,this.data=[],this.icons=_n.a,this.selection=new Wt.a,this.filters=[{name:"Level",prop:"level",filterOptions:["basic","advanced","dev"],filterInitValue:"basic",filterPredicate:(e,t)=>{let n;return function(e){e[e.basic=0]="basic",e[e.advanced=1]="advanced",e[e.dev=2]="dev"}(n||(n={})),n[e.level]<=n[t]}},{name:"Service",prop:"services",filterOptions:["mon","mgr","osd","mds","common","mds_client","rgw"],filterPredicate:(e,t)=>e.services.includes(t)},{name:"Source",prop:"source",filterOptions:["mon"],filterPredicate:(e,t)=>!!e.hasOwnProperty("source")&&e.source.includes(t)},{name:"Modified",prop:"modified",filterOptions:["yes","no"],filterPredicate:(e,t)=>!("yes"!==t||!e.hasOwnProperty("value"))||"no"===t&&!e.hasOwnProperty("value")}],this.permission=this.authStorageService.getPermissions().configOpt;const i=()=>this.selection.first()&&""+encodeURIComponent(this.selection.first().name);this.tableActions=[{permission:"update",icon:_n.a.edit,routerLink:()=>"/configuration/edit/"+i(),name:this.actionLabels.EDIT,disable:()=>!this.isEditable(this.selection)}]}ngOnInit(){this.columns=[{canAutoResize:!0,prop:"name",name:"Name"},{prop:"desc",name:"Description",cellClass:"wrap"},{prop:"value",name:"Current value",cellClass:"wrap",cellTemplate:this.confValTpl},{prop:"default",name:"Default",cellClass:"wrap"},{prop:"can_update_at_runtime",name:"Editable",cellTransformation:Ht.a.checkIcon,flexGrow:.4,cellClass:"text-center"}]}updateSelection(e){this.selection=e}getConfigurationList(e){this.configurationService.getConfigData().subscribe(e=>{this.data=e},()=>{e.error()})}isEditable(e){return 1===e.selected.length&&e.selected[0].can_update_at_runtime}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Jt.a),i.Mb(Un.a),i.Mb(gn.b))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-configuration"]],viewQuery:function(e,t){var n;1&e&&(i.Jc(Mi,!0),i.Tc(ki,!0)),2&e&&(i.zc(n=i.hc())&&(t.confValTpl=n.first),i.zc(n=i.hc())&&(t.confFlagTpl=n.first))},features:[i.vb],decls:5,vars:8,consts:[["selectionType","single",3,"data","columns","extraFilterableColumns","hasDetails","fetchData","setExpandedRow","updateSelection"],[1,"table-actions",3,"permission","selection","tableActions"],["cdTableDetail","",3,"selection"],["confValTpl",""],[4,"ngIf"],[4,"ngFor","ngForOf"]],template:function(e,t){1&e&&(i.Sb(0,"cd-table",0),i.gc("fetchData",(function(e){return t.getConfigurationList(e)}))("setExpandedRow",(function(e){return t.setExpandedRow(e)}))("updateSelection",(function(e){return t.updateSelection(e)})),i.Nb(1,"cd-table-actions",1),i.Nb(2,"cd-configuration-details",2),i.Rb(),i.Mc(3,Ti,1,1,"ng-template",null,3,i.Nc)),2&e&&(i.pc("data",t.data)("columns",t.columns)("extraFilterableColumns",t.filters)("hasDetails",!0),i.yb(1),i.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions),i.yb(1),i.pc("selection",t.expandedRow))},directives:[Bt.a,Sn.a,Si,wt.r,wt.q],styles:[".filter[_ngcontent-%COMP%]{padding-right:8px}.fa-stack[_ngcontent-%COMP%]{font-size:.79rem}.fa-stack[_ngcontent-%COMP%] .fa-stack-1x[_ngcontent-%COMP%]{margin-left:8px;margin-top:5px} cd-configuration datatable-body-cell.wrap{word-break:break-all}"]}),e})();var Oi=n("quSY");let Li=(()=>{class e{constructor(e){this.http=e}getFullHealth(){return this.http.get("api/health/full")}getMinimalHealth(){return this.http.get("api/health/minimal")}}return e.\u0275fac=function(t){return new(t||e)(i.dc(o.b))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var Ri=n("lOp/");const Ei=["tree"],Ai=function(e,t,n){return[e,t,n]};function Ii(e,t){if(1&e&&i.Nb(0,"i",12),2&e){const e=i.ic();i.pc("ngClass",i.wc(1,Ai,e.icons.large,e.icons.spinner,e.icons.spin))}}const Pi=function(){return["in","up"]},Ni=function(){return["down","out","destroyed"]},ji=function(e,t){return{"badge-success":e,"badge-danger":t}};function Fi(e,t){if(1&e&&(i.Sb(0,"span",15),i.Oc(1),i.Rb()),2&e){const e=i.ic().$implicit;i.pc("ngClass",i.vc(4,ji,i.tc(2,Pi).includes(e.data.status),i.tc(3,Ni).includes(e.data.status))),i.yb(1),i.Qc(" ",e.data.status," ")}}const Yi=function(e){return{"type-osd":e}};function zi(e,t){if(1&e&&(i.Mc(0,Fi,2,7,"span",13),i.Sb(1,"span"),i.Oc(2,"\xa0"),i.Rb(),i.Nb(3,"span",14)),2&e){const e=t.$implicit;i.pc("ngIf",e.data.status),i.yb(3),i.pc("ngClass",i.uc(3,Yi,"osd"===e.data.type))("innerHTML",e.data.name,i.Ec)}}function $i(e,t){if(1&e&&(i.Sb(0,"div",16),i.Sb(1,"legend"),i.Oc(2),i.Rb(),i.Nb(3,"cd-table-key-value",17),i.Rb()),2&e){const e=i.ic();i.yb(2),i.Pc(e.metadataTitle),i.yb(1),i.pc("data",e.metadata)}}let Hi=(()=>{class e{constructor(e,t){this.healthService=e,this.timerService=t,this.sub=new Oi.a,this.icons=_n.a,this.loadingIndicator=!0,this.nodes=[],this.treeOptions={useVirtualScroll:!0,nodeHeight:22,actionMapping:{mouse:{click:this.onNodeSelected.bind(this)}}},this.metadataKeyMap={}}ngOnInit(){this.healthService.getFullHealth().subscribe(e=>{this.loadingIndicator=!1,this.nodes=this.abstractTreeData(e)}),this.sub=this.timerService.get(()=>this.healthService.getFullHealth(),5e3).subscribe(e=>{this.nodes=this.abstractTreeData(e)})}ngOnDestroy(){this.sub.unsubscribe()}abstractTreeData(e){const t=e.osd_map.tree.nodes||[],n={};if(0===t.length)return[{name:"No nodes!"}];const i=[];return t.reverse().forEach(e=>{"root"===e.type&&i.push(e.id),n[e.id]=this.generateTreeLeaf(e,n)}),i.map(e=>n[e])}generateTreeLeaf(e,t){const n=e.id;this.metadataKeyMap[n]=e;const i=[],r={name:e.name+" ("+e.type+")",status:e.status,cdId:n,type:e.type};return e.children&&(e.children.sort().forEach(e=>{i.push(t[e])}),r.children=i),r}onNodeSelected(e,t){if(xn.a.ACTIVATE(e,t,!0),void 0!==t.data.cdId){const e=this.metadataKeyMap[t.data.cdId],{name:n,type:i}=e,r=Object(Ft.f)(e,["name","type","status"]);this.metadata=r,this.metadataTitle=n+" ("+i+")"}else delete this.metadata,delete this.metadataTitle}onUpdateData(){this.tree.treeModel.expandAll()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Li),i.Mb(Ri.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-crushmap"]],viewQuery:function(e,t){var n;1&e&&i.Tc(Ei,!0),2&e&&i.zc(n=i.hc())&&(t.tree=n.first)},decls:14,vars:4,consts:function(){return[[1,"row"],[1,"col-sm-12","col-lg-12"],[1,"card"],[1,"card-header"],"CRUSH map viewer",[1,"card-body"],[1,"col-sm-6","col-lg-6","tree-container"],[3,"ngClass",4,"ngIf"],[3,"nodes","options","updateData"],["tree",""],["treeNodeTemplate",""],["class","col-sm-6 col-lg-6 metadata",4,"ngIf"],[3,"ngClass"],["class","badge",3,"ngClass",4,"ngIf"],[1,"node-name",3,"ngClass","innerHTML"],[1,"badge",3,"ngClass"],[1,"col-sm-6","col-lg-6","metadata"],[3,"data"]]},template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Sb(1,"div",1),i.Sb(2,"div",2),i.Sb(3,"div",3),i.Wb(4,4),i.Rb(),i.Sb(5,"div",5),i.Sb(6,"div",0),i.Sb(7,"div",6),i.Mc(8,Ii,1,5,"i",7),i.Sb(9,"tree-root",8,9),i.gc("updateData",(function(){return t.onUpdateData()})),i.Mc(11,zi,4,5,"ng-template",null,10,i.Nc),i.Rb(),i.Rb(),i.Mc(13,$i,4,2,"div",11),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb()),2&e&&(i.yb(8),i.pc("ngIf",t.loadingIndicator),i.yb(1),i.pc("nodes",t.nodes)("options",t.treeOptions),i.yb(4),i.pc("ngIf",t.metadata))},directives:[wt.r,xn.b,wt.p,en.a],styles:[".tree-container[_ngcontent-%COMP%]{height:calc(100vh - 200px)}"]}),e})();var Wi=n("LRne"),Vi=n("lJxs"),Bi=n("Kqap"),Ui=n("BFxc"),Gi=n("xbPD"),qi=n("mCNh");function Ji(e,t,n){return 0===n?[t]:(e.push(t),e)}function Qi(){return function(e,t){return arguments.length>=2?function(n){return Object(qi.a)(Object(Bi.a)(e,t),Object(Ui.a)(1),Object(Gi.a)(t))(n)}:function(t){return Object(qi.a)(Object(Bi.a)((t,n,i)=>e(t,n,i+1)),Object(Ui.a)(1))(t)}}(Ji,[])}var Ki=n("5+tZ");let Zi=(()=>{class e{calculateAdditionalData(e){if(!e.life_expectancy_min||!e.life_expectancy_max)return e.state="unknown",e;const t=e=>!!Number.parseFloat(e),n=(e,n)=>e&&n&&t(e)&&t(n)?nn.a.duration(nn()(e).diff(nn()(n))).asWeeks():null,i=nn.a.duration(nn()(nn.a.now()).diff(nn()(e.life_expectancy_stamp))).asWeeks(),r=n(e.life_expectancy_max,e.life_expectancy_stamp),s=n(e.life_expectancy_min,e.life_expectancy_stamp);return e.state=i>1?"stale":null!==r&&r<=2?"bad":null!==s&&s<=4?"warning":"good",e.life_expectancy_weeks={max:null!==r?Math.round(r):null,min:null!==s?Math.round(s):null},e}readable(e){return e.readableDaemons=e.daemons.join(" "),e}prepareDevice(e){return this.readable(this.calculateAdditionalData(e))}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),Xi=(()=>{class e{constructor(e,t){this.http=e,this.deviceService=t,this.baseURL="api/host",this.baseUIURL="ui-api/host"}list(){return this.http.get(this.baseURL)}create(e){return this.http.post(this.baseURL,{hostname:e},{observe:"response"})}delete(e){return this.http.delete(`${this.baseURL}/${e}`,{observe:"response"})}getDevices(e){return this.http.get(`${this.baseURL}/${e}/devices`).pipe(Object(Vi.a)(e=>e.map(e=>this.deviceService.prepareDevice(e))))}getSmartData(e){return this.http.get(`${this.baseURL}/${e}/smart`)}getDaemons(e){return this.http.get(`${this.baseURL}/${e}/daemons`)}getLabels(){return this.http.get(this.baseUIURL+"/labels")}update(e,t=!1,n=[],i=!1,r=!1){return this.http.put(`${this.baseURL}/${e}`,{update_labels:t,labels:n,maintenance:i,force:r})}identifyDevice(e,t,n){return this.http.post(`${this.baseURL}/${e}/identify_device`,{device:t,duration:n})}getInventoryParams(e){let t=new o.e;return e&&(t=t.append("refresh",jt.a.toString(e))),t}getInventory(e,t){const n=this.getInventoryParams(t);return this.http.get(`${this.baseURL}/${e}/inventory`,{params:n})}inventoryList(e){const t=this.getInventoryParams(e);return this.http.get(this.baseUIURL+"/inventory",{params:t})}inventoryDeviceList(e,t){let n;return n=e?this.getInventory(e,t).pipe(Qi()):this.inventoryList(t),n.pipe(Object(Ki.a)(e=>{const t=jt.a.flatMap(e,e=>e.devices.map(t=>(t.hostname=e.name,t.uid=t.device_id?t.device_id:`${t.hostname}-${t.path}`,t)));return Object(Wi.a)(t)}))}}return e.\u0275fac=function(t){return new(t||e)(i.dc(o.b),i.dc(Zi))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var er=n("kvvV"),tr=n("kn/O"),nr=n("IZUe"),ir=n("8xTl");function rr(e,t){1&e&&(i.Sb(0,"span",16),i.Wb(1,17),i.Rb())}function sr(e,t){1&e&&(i.Sb(0,"span",16),i.Wb(1,18),i.Rb())}function or(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",1),i.Sb(1,"form",2,3),i.Sb(3,"div",4),i.Sb(4,"div",5),i.Wb(5,6),i.jc(6,"titlecase"),i.jc(7,"upperFirst"),i.Rb(),i.Sb(8,"div",7),i.Sb(9,"div",8),i.Sb(10,"label",9),i.Wb(11,10),i.Rb(),i.Sb(12,"div",11),i.Nb(13,"input",12),i.Mc(14,rr,2,0,"span",13),i.Mc(15,sr,2,0,"span",13),i.Rb(),i.Rb(),i.Rb(),i.Sb(16,"div",14),i.Sb(17,"cd-form-button-panel",15),i.gc("submitActionEvent",(function(){return i.Dc(e),i.ic().submit()})),i.jc(18,"titlecase"),i.jc(19,"upperFirst"),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.Ac(2),t=i.ic();i.yb(1),i.pc("formGroup",t.hostForm),i.yb(6),i.ac(i.kc(6,7,t.action))(i.kc(7,9,t.resource)),i.Xb(5),i.yb(7),i.pc("ngIf",t.hostForm.showError("hostname",e,"required")),i.yb(1),i.pc("ngIf",t.hostForm.showError("hostname",e,"uniqueName")),i.yb(2),i.pc("form",t.hostForm)("submitText",i.kc(18,11,t.action)+" "+i.kc(19,13,t.resource))}}let ar=(()=>{class e extends qn.a{constructor(e,t,n,i){super(),this.router=e,this.actionLabels=t,this.hostService=n,this.taskWrapper=i,this.resource="host",this.action=this.actionLabels.CREATE,this.createForm()}ngOnInit(){this.hostService.list().subscribe(e=>{this.hostnames=e.map(e=>e.hostname),this.loadingReady()})}createForm(){this.hostForm=new Jn.a({hostname:new kn.h("",{validators:[kn.A.required,Cn.a.custom("uniqueName",e=>this.hostnames&&-1!==this.hostnames.indexOf(e))]})})}submit(){const e=this.hostForm.get("hostname").value;this.taskWrapper.wrapTaskAroundCall({task:new er.a("host/"+gn.e.CREATE,{hostname:e}),call:this.hostService.create(e)}).subscribe({error:()=>{this.hostForm.setErrors({cdSubmitButton:!0})},complete:()=>{this.router.navigate(["/hosts"])}})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Pt.e),i.Mb(gn.b),i.Mb(Xi),i.Mb(tr.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-host-form"]],features:[i.vb],decls:1,vars:1,consts:function(){return[["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],["name","hostForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"card"],[1,"card-header"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"card-body"],[1,"form-group","row"],["for","hostname",1,"cd-col-form-label","required"],"Hostname",[1,"cd-col-form-input"],["type","text","placeholder","mon-123","id","hostname","name","hostname","formControlName","hostname","autofocus","",1,"form-control"],["class","invalid-feedback",4,"ngIf"],[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required.","The chosen hostname is already in use."]},template:function(e,t){1&e&&i.Mc(0,or,20,15,"div",0),2&e&&i.pc("cdFormLoading",t.loading)},directives:[Kn.a,kn.C,kn.r,Zn.a,kn.k,Xn.a,On.a,kn.d,ei.a,kn.q,kn.i,nr.a,wt.r,ti.a],pipes:[wt.A,ir.a],styles:[""]}),e})(),cr=(()=>{class e{constructor(e){this.http=e,this.url="api/orchestrator",this.disableMessages={noOrchestrator:"The feature is disabled because Orchestrator is not available.",missingFeature:"The Orchestrator backend doesn't support this feature."}}status(){return this.http.get(this.url+"/status")}hasFeature(e,t){return jt.a.every(t,t=>jt.a.get(e.features,t+".available"))}getTableActionDisableDesc(e,t){return!!e&&(e.available?!this.hasFeature(e,t)&&this.disableMessages.missingFeature:this.disableMessages.noOrchestrator)}}return e.\u0275fac=function(t){return new(t||e)(i.dc(o.b))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var lr=n("DNAf"),ur=function(e){return e.HOST_LIST="get_hosts",e.HOST_CREATE="add_host",e.HOST_DELETE="remove_host",e.HOST_LABEL_ADD="add_host_label",e.HOST_LABEL_REMOVE="remove_host_label",e.HOST_MAINTENANCE_ENTER="enter_host_maintenance",e.HOST_MAINTENANCE_EXIT="exit_host_maintenance",e.SERVICE_LIST="describe_service",e.SERVICE_CREATE="apply",e.SERVICE_DELETE="remove_service",e.SERVICE_RELOAD="service_action",e.DAEMON_LIST="list_daemons",e.OSD_GET_REMOVE_STATUS="remove_osds_status",e.OSD_CREATE="apply_drivegroups",e.OSD_DELETE="remove_osds",e.DEVICE_LIST="get_inventory",e.DEVICE_BLINK_LIGHT="blink_device_light",e}({}),dr=n("85J/"),hr=n("EgGo");n("jKX/");let fr=(()=>{class e{constructor(e,t){this.http=e,this.deviceService=t,this.path="api/osd",this.osdRecvSpeedModalPriorities={KNOWN_PRIORITIES:[{name:null,text:"-- Select the priority --",values:{osd_max_backfills:null,osd_recovery_max_active:null,osd_recovery_max_single_start:null,osd_recovery_sleep:null}},{name:"low",text:"Low",values:{osd_max_backfills:1,osd_recovery_max_active:1,osd_recovery_max_single_start:1,osd_recovery_sleep:.5}},{name:"default",text:"Default",values:{osd_max_backfills:1,osd_recovery_max_active:3,osd_recovery_max_single_start:1,osd_recovery_sleep:0}},{name:"high",text:"High",values:{osd_max_backfills:4,osd_recovery_max_active:4,osd_recovery_max_single_start:4,osd_recovery_sleep:0}}]}}create(e){const t={method:"drive_groups",data:e,tracking_id:jt.a.join(jt.a.map(e,"service_id"),", ")};return this.http.post(this.path,t,{observe:"response"})}getList(){return this.http.get(""+this.path)}getDetails(e){return this.http.get(`${this.path}/${e}`)}getSmartData(e){return this.http.get(`${this.path}/${e}/smart`)}scrub(e,t){return this.http.post(`${this.path}/${e}/scrub?deep=${t}`,null)}getFlags(){return this.http.get(this.path+"/flags")}updateFlags(e){return this.http.put(this.path+"/flags",{flags:e})}updateIndividualFlags(e,t){return this.http.put(this.path+"/flags/individual",{flags:e,ids:t})}markOut(e){return this.http.put(`${this.path}/${e}/mark`,{action:"out"})}markIn(e){return this.http.put(`${this.path}/${e}/mark`,{action:"in"})}markDown(e){return this.http.put(`${this.path}/${e}/mark`,{action:"down"})}reweight(e,t){return this.http.post(`${this.path}/${e}/reweight`,{weight:t})}update(e,t){return this.http.put(`${this.path}/${e}`,{device_class:t})}markLost(e){return this.http.put(`${this.path}/${e}/mark`,{action:"lost"})}purge(e){return this.http.post(`${this.path}/${e}/purge`,null)}destroy(e){return this.http.post(`${this.path}/${e}/destroy`,null)}delete(e,t,n){return this.http.delete(`${this.path}/${e}`,{observe:"response",params:{preserve_id:t?"true":"false",force:n?"true":"false"}})}safeToDestroy(e){return this.http.get(`${this.path}/safe_to_destroy?ids=${e}`)}safeToDelete(e){return this.http.get(`${this.path}/safe_to_delete?svc_ids=${e}`)}getDevices(e){return this.http.get(`${this.path}/${e}/devices`).pipe(Object(Vi.a)(e=>e.map(e=>this.deviceService.prepareDevice(e))))}}return e.\u0275fac=function(t){return new(t||e)(i.dc(o.b),i.dc(Zi))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var pr=n("/NlG");const mr=["deviceLocation"],br=["lifeExpectancy"],gr=["lifeExpectancyTimestamp"];function _r(e,t){if(1&e&&i.Nb(0,"cd-table",5),2&e){const e=i.ic();i.pc("data",e.devices)("columns",e.columns)}}function yr(e,t){1&e&&(i.Sb(0,"cd-alert-panel",6),i.Wb(1,7),i.Rb())}function vr(e,t){if(1&e&&(i.Sb(0,"span"),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.yb(1),i.Pc(e.dev)}}function wr(e,t){1&e&&i.Mc(0,vr,2,1,"span",8),2&e&&i.pc("ngForOf",t.value)}function Sr(e,t){if(1&e&&(i.Sb(0,"span"),i.Oc(1),i.jc(2,"i18nPlural"),i.Rb()),2&e){const e=i.ic().value,t=i.ic();i.yb(1),i.Qc("> ",i.lc(2,1,e.min,t.translationMapping),"")}}function Mr(e,t){if(1&e&&(i.Sb(0,"span"),i.Oc(1),i.jc(2,"i18nPlural"),i.Rb()),2&e){const e=i.ic().value,t=i.ic();i.yb(1),i.Qc("< ",i.lc(2,1,e.max,t.translationMapping),"")}}function kr(e,t){if(1&e&&(i.Sb(0,"span"),i.Oc(1),i.jc(2,"i18nPlural"),i.Rb()),2&e){const e=i.ic().value,t=i.ic();i.yb(1),i.Rc("",e.min," to ",i.lc(2,2,e.max,t.translationMapping),"")}}function xr(e,t){if(1&e&&(i.Mc(0,Sr,3,4,"span",9),i.Mc(1,Mr,3,4,"span",9),i.Mc(2,kr,3,5,"span",9)),2&e){const e=t.value;i.pc("ngIf",e.min&&!e.max),i.yb(1),i.pc("ngIf",e.max&&!e.min),i.yb(1),i.pc("ngIf",e.max&&e.min)}}function Dr(e,t){1&e&&i.Oc(0),2&e&&i.Qc(" ",t.value,"\n")}let Tr=(()=>{class e{constructor(e,t,n){this.hostService=e,this.datePipe=t,this.osdService=n,this.hostname="",this.osdId=null,this.devices=null,this.columns=[],this.translationMapping={"=1":"# week",other:"# weeks"}}ngOnInit(){this.columns=[{prop:"devid",name:"Device ID",minWidth:200},{prop:"state",name:"State of Health",flexGrow:1,cellTransformation:Ht.a.badge,customTemplateConfig:{map:{good:{value:"Good",class:"badge-success"},warning:{value:"Warning",class:"badge-warning"},bad:{value:"Bad",class:"badge-danger"},stale:{value:"Stale",class:"badge-info"},unknown:{value:"Unknown",class:"badge-dark"}}}},{prop:"life_expectancy_weeks",name:"Life Expectancy",cellTemplate:this.lifeExpectancyTemplate},{prop:"life_expectancy_stamp",name:"Prediction Creation Date",cellTemplate:this.lifeExpectancyTimestampTemplate,pipe:this.datePipe,isHidden:!0},{prop:"location",name:"Device Name",cellTemplate:this.locationTemplate},{prop:"readableDaemons",name:"Daemons"}]}ngOnChanges(){const e=e=>this.devices=e;this.hostname?this.hostService.getDevices(this.hostname).subscribe(e):null!==this.osdId&&this.osdService.getDevices(this.osdId).subscribe(e)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Xi),i.Mb(wt.e),i.Mb(fr))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-device-list"]],viewQuery:function(e,t){var n;1&e&&(i.Jc(mr,!0),i.Jc(br,!0),i.Jc(gr,!0)),2&e&&(i.zc(n=i.hc())&&(t.locationTemplate=n.first),i.zc(n=i.hc())&&(t.lifeExpectancyTemplate=n.first),i.zc(n=i.hc())&&(t.lifeExpectancyTimestampTemplate=n.first))},inputs:{hostname:"hostname",osdId:"osdId"},features:[i.wb],decls:8,vars:2,consts:function(){return[[3,"data","columns",4,"ngIf"],["type","warning",4,"ngIf"],["deviceLocation",""],["lifeExpectancy",""],["lifeExpectancyTimestamp",""],[3,"data","columns"],["type","warning"],"Neither hostname nor OSD ID given",[4,"ngFor","ngForOf"],[4,"ngIf"]]},template:function(e,t){1&e&&(i.Mc(0,_r,1,2,"cd-table",0),i.Mc(1,yr,2,0,"cd-alert-panel",1),i.Mc(2,wr,1,1,"ng-template",null,2,i.Nc),i.Mc(4,xr,3,3,"ng-template",null,3,i.Nc),i.Mc(6,Dr,1,1,"ng-template",null,4,i.Nc)),2&e&&(i.pc("ngIf",t.hostname||null!==t.osdId),i.yb(1),i.pc("ngIf",""===t.hostname&&null===t.osdId))},directives:[wt.r,Bt.a,pr.a,wt.q],pipes:[wt.i],styles:[""]}),e})();var Cr=n("6qls");function Or(e,t){1&e&&(i.Sb(0,"cd-alert-panel",2),i.Wb(1,3),i.Rb())}function Lr(e,t){1&e&&(i.Sb(0,"cd-alert-panel",2),i.cc(1,4),i.Nb(2,"cd-doc",5),i.Zb(),i.Rb())}let Rr=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-orchestrator-doc-panel"]],inputs:{missingFeatures:"missingFeatures"},decls:3,vars:2,consts:function(){return[["type","info",4,"ngIf","ngIfElse"],["elseBlock",""],["type","info"],"The feature is not supported in the current Orchestrator.","Orchestrator is not available. Please consult the " + "\ufffd#2\ufffd" + "" + "\ufffd/#2\ufffd" + " on how to configure and enable the functionality.",["section","orch"]]},template:function(e,t){if(1&e&&(i.Mc(0,Or,2,0,"cd-alert-panel",0),i.Mc(1,Lr,3,0,"ng-template",null,1,i.Nc)),2&e){const e=i.Ac(2);i.pc("ngIf",t.missingFeatures)("ngIfElse",e)}},directives:[wt.r,pr.a,Cr.a],styles:[""]}),e})(),Er=(()=>{class e{constructor(e,t,n,r,s,o){this.authStorageService=e,this.dimlessBinary=t,this.modalService=n,this.notificationService=r,this.orchService=s,this.hostService=o,this.devices=[],this.hiddenColumns=[],this.filterColumns=["hostname","human_readable_type","available","sys_api.vendor","sys_api.model","sys_api.size"],this.selectionType=void 0,this.filterChange=new i.o,this.fetchInventory=new i.o,this.icons=_n.a,this.columns=[],this.selection=new Wt.a,this.orchStatus=void 0,this.actionOrchFeatures={identify:[ur.DEVICE_BLINK_LIGHT]}}ngOnInit(){this.permission=this.authStorageService.getPermissions().osd,this.tableActions=[{permission:"update",icon:_n.a.show,click:()=>this.identifyDevice(),name:"Identify",disable:e=>this.getDisable("identify",e),canBePrimary:e=>!e.hasSingleSelection,visible:()=>jt.a.isString(this.selectionType)}];const e=[{name:"Hostname",prop:"hostname",flexGrow:1},{name:"Device path",prop:"path",flexGrow:1},{name:"Type",prop:"human_readable_type",flexGrow:1,cellTransformation:Ht.a.badge,customTemplateConfig:{map:{hdd:{value:"HDD",class:"badge-hdd"},ssd:{value:"SSD",class:"badge-ssd"}}}},{name:"Available",prop:"available",flexGrow:1,cellClass:"text-center",cellTransformation:Ht.a.checkIcon},{name:"Vendor",prop:"sys_api.vendor",flexGrow:1},{name:"Model",prop:"sys_api.model",flexGrow:1},{name:"Size",prop:"sys_api.size",flexGrow:1,pipe:this.dimlessBinary},{name:"OSDs",prop:"osd_ids",flexGrow:1,cellTransformation:Ht.a.badge,customTemplateConfig:{class:"badge-dark",prefix:"osd."}}];this.columns=e.filter(e=>!this.hiddenColumns.includes(e.prop)),jt.a.forEach(this.filterColumns,e=>{const t=jt.a.find(this.columns,{prop:e});t&&(t.filterable=!0)}),this.fetchInventory.observers.length>0&&(this.fetchInventorySub=this.table.fetchData.subscribe(()=>{this.fetchInventory.emit()}))}ngOnDestroy(){this.fetchInventorySub&&this.fetchInventorySub.unsubscribe()}onColumnFiltersChanged(e){this.filterChange.emit(e)}getDisable(e,t){return!t.hasSingleSelection||this.orchService.getTableActionDisableDesc(this.orchStatus,this.actionOrchFeatures[e])}updateSelection(e){this.selection=e}identifyDevice(){const e=this.selection.first(),t=e.hostname,n=e.path||e.device_id;this.modalService.show(Tn.a,{titleText:"Identify device " + n + "",message:"Please enter the duration how long to blink the LED.",fields:[{type:"select",name:"duration",value:300,required:!0,typeConfig:{options:[{text:"1 minute",value:60},{text:"2 minutes",value:120},{text:"5 minutes",value:300},{text:"10 minutes",value:600},{text:"15 minutes",value:900}]}}],submitButtonText:"Execute",onSubmit:e=>{this.hostService.identifyDevice(t,n,e.duration).subscribe(()=>{this.notificationService.show(yn.a.success,"Identifying '" + n + "' started on host '" + t + "'")})}})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Jt.a),i.Mb(Zt.a),i.Mb(vn.a),i.Mb(wn.a),i.Mb(cr),i.Mb(Xi))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-inventory-devices"]],viewQuery:function(e,t){var n;1&e&&i.Jc(Bt.a,!0),2&e&&i.zc(n=i.hc())&&(t.table=n.first)},inputs:{devices:"devices",hiddenColumns:"hiddenColumns",filterColumns:"filterColumns",selectionType:"selectionType",orchStatus:"orchStatus"},outputs:{filterChange:"filterChange",fetchInventory:"fetchInventory"},decls:2,vars:9,consts:[["identifier","uid","columnMode","flex",3,"data","columns","forceIdentifier","selectionType","autoReload","searchField","updateSelection","columnFiltersChanged"],[1,"table-actions",3,"permission","selection","tableActions"]],template:function(e,t){1&e&&(i.Sb(0,"cd-table",0),i.gc("updateSelection",(function(e){return t.updateSelection(e)}))("columnFiltersChanged",(function(e){return t.onColumnFiltersChanged(e)})),i.Nb(1,"cd-table-actions",1),i.Rb()),2&e&&(i.pc("data",t.devices)("columns",t.columns)("forceIdentifier",!0)("selectionType",t.selectionType)("autoReload",!1)("searchField",!1),i.yb(1),i.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions))},directives:[Bt.a,Sn.a],styles:[".filter[_ngcontent-%COMP%]{padding-right:8px}.fa-stack[_ngcontent-%COMP%]{font-size:.79rem}.fa-stack[_ngcontent-%COMP%] .fa-stack-1x[_ngcontent-%COMP%]{margin-left:8px;margin-top:5px}"]}),e})();function Ar(e,t){1&e&&i.Nb(0,"cd-orchestrator-doc-panel")}const Ir=function(){return[]},Pr=function(){return["hostname"]};function Nr(e,t){if(1&e){const e=i.Tb();i.Qb(0),i.Sb(1,"legend"),i.Wb(2,1),i.Rb(),i.Sb(3,"div",2),i.Sb(4,"div",3),i.Sb(5,"cd-inventory-devices",4),i.gc("fetchInventory",(function(){return i.Dc(e),i.ic().refresh()})),i.Rb(),i.Rb(),i.Rb(),i.Pb()}if(2&e){const e=i.ic();i.yb(5),i.pc("devices",e.devices)("hiddenColumns",void 0===e.hostname?i.tc(3,Ir):i.tc(4,Pr))("orchStatus",e.orchStatus)}}let jr=(()=>{class e{constructor(e,t,n){this.orchService=e,this.hostService=t,this.ngZone=n,this.reloadInterval=5e3,this.firstRefresh=!0,this.icons=_n.a,this.showDocPanel=!1,this.devices=[]}ngOnInit(){this.orchService.status().subscribe(e=>{this.orchStatus=e,this.showDocPanel=!e.available,e.available&&this.ngZone.runOutsideAngular(()=>{this.reloadSubscriber=Object(Ut.a)(this.reloadInterval,this.reloadInterval).subscribe(()=>{this.ngZone.run(()=>{this.getInventory(!1)})})})})}ngOnDestroy(){var e;null===(e=this.reloadSubscriber)||void 0===e||e.unsubscribe()}ngOnChanges(){var e;(null===(e=this.orchStatus)||void 0===e?void 0:e.available)&&(this.devices=[],this.getInventory(!1))}getInventory(e){""!==this.hostname&&this.hostService.inventoryDeviceList(this.hostname,e).subscribe(e=>{this.devices=e},()=>{this.devices=[]})}refresh(){this.getInventory(!this.firstRefresh),this.firstRefresh=!1}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(cr),i.Mb(Xi),i.Mb(i.A))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-inventory"]],inputs:{hostname:"hostname"},features:[i.wb],decls:2,vars:2,consts:function(){return[[4,"ngIf"],"Physical Disks",[1,"row"],[1,"col-md-12"],["selectionType","single",3,"devices","hiddenColumns","orchStatus","fetchInventory"]]},template:function(e,t){1&e&&(i.Mc(0,Ar,1,0,"cd-orchestrator-doc-panel",0),i.Mc(1,Nr,6,5,"ng-container",0)),2&e&&(i.pc("ngIf",t.showDocPanel),i.yb(1),i.pc("ngIf",null==t.orchStatus?null:t.orchStatus.available))},directives:[wt.r,Rr,Er],styles:[""]}),e})(),Fr=(()=>{class e{constructor(e){this.http=e,this.url="api/service"}list(e){const t=e?{params:(new o.e).set("service_name",e)}:{};return this.http.get(this.url,t)}getDaemons(e){return this.http.get(`${this.url}/${e}/daemons`)}create(e){return this.http.post(this.url,{service_name:e.service_id?`${e.service_type}.${e.service_id}`:e.service_type,service_spec:e},{observe:"response"})}delete(e){return this.http.delete(`${this.url}/${e}`,{observe:"response"})}getKnownTypes(){return this.http.get(this.url+"/known_types")}}return e.\u0275fac=function(t){return new(t||e)(i.dc(o.b))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var Yr=n("Dwqy"),zr=n("zWsK");const $r=["statusTpl"],Hr=["daemonsTable"];function Wr(e,t){1&e&&i.Nb(0,"cd-orchestrator-doc-panel")}function Vr(e,t){if(1&e){const e=i.Tb();i.Sb(0,"cd-table",3,4),i.gc("fetchData",(function(t){return i.Dc(e),i.ic().getDaemons(t)})),i.Rb()}if(2&e){const e=i.ic();i.pc("data",e.daemons)("columns",e.columns)("autoReload",5e3)}}function Br(e,t){if(1&e&&(i.Sb(0,"span",5),i.jc(1,"pipeFunction"),i.Oc(2),i.Rb()),2&e){const e=t.row,n=i.ic();i.pc("ngClass",i.lc(1,2,e,n.getStatusClass)),i.yb(2),i.Qc(" ",e.status_desc," ")}}let Ur=(()=>{class e{constructor(e,t,n,i){this.hostService=e,this.cephServiceService=t,this.orchService=n,this.relativeDatePipe=i,this.daemons=[],this.columns=[],this.hasOrchestrator=!1,this.showDocPanel=!1}ngOnInit(){this.columns=[{name:"Hostname",prop:"hostname",flexGrow:1,filterable:!0},{name:"Daemon type",prop:"daemon_type",flexGrow:1,filterable:!0},{name:"Daemon ID",prop:"daemon_id",flexGrow:1,filterable:!0},{name:"Container ID",prop:"container_id",flexGrow:3,filterable:!0,cellTransformation:Ht.a.truncate,customTemplateConfig:{length:12}},{name:"Container Image name",prop:"container_image_name",flexGrow:3,filterable:!0},{name:"Container Image ID",prop:"container_image_id",flexGrow:3,filterable:!0,cellTransformation:Ht.a.truncate,customTemplateConfig:{length:12}},{name:"Version",prop:"version",flexGrow:1,filterable:!0},{name:"Status",prop:"status_desc",flexGrow:1,filterable:!0,cellTemplate:this.statusTpl},{name:"Last Refreshed",prop:"last_refresh",pipe:this.relativeDatePipe,flexGrow:2}],this.orchService.status().subscribe(e=>{this.hasOrchestrator=e.available,this.showDocPanel=!e.available})}ngOnChanges(){jt.a.isUndefined(this.daemonsTable)||this.daemonsTable.reloadData()}ngAfterViewInit(){this.daemonsTableTplsSub=this.daemonsTableTpls.changes.subscribe(e=>{this.daemonsTable=e.first})}ngOnDestroy(){this.daemonsTableTplsSub&&this.daemonsTableTplsSub.unsubscribe()}getStatusClass(e){return jt.a.get({"-1":"badge-danger",0:"badge-warning",1:"badge-success"},e.status,"badge-dark")}getDaemons(e){let t;if(this.hostname)t=this.hostService.getDaemons(this.hostname);else{if(!this.serviceName)return void(this.daemons=[]);t=this.cephServiceService.getDaemons(this.serviceName)}t.subscribe(e=>{this.daemons=e},()=>{this.daemons=[],e.error()})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Xi),i.Mb(Fr),i.Mb(cr),i.Mb(Yr.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-service-daemon-list"]],viewQuery:function(e,t){var n;1&e&&(i.Jc($r,!0),i.Tc(Hr,!0)),2&e&&(i.zc(n=i.hc())&&(t.statusTpl=n.first),i.zc(n=i.hc())&&(t.daemonsTableTpls=n))},inputs:{serviceName:"serviceName",hostname:"hostname"},features:[i.wb],decls:4,vars:2,consts:[[4,"ngIf"],["columnMode","flex",3,"data","columns","autoReload","fetchData",4,"ngIf"],["statusTpl",""],["columnMode","flex",3,"data","columns","autoReload","fetchData"],["daemonsTable",""],[1,"badge",3,"ngClass"]],template:function(e,t){1&e&&(i.Mc(0,Wr,1,0,"cd-orchestrator-doc-panel",0),i.Mc(1,Vr,2,3,"cd-table",1),i.Mc(2,Br,3,5,"ng-template",null,2,i.Nc)),2&e&&(i.pc("ngIf",t.showDocPanel),i.yb(1),i.pc("ngIf",t.hasOrchestrator))},directives:[wt.r,Rr,Bt.a,wt.p],pipes:[zr.b],styles:[""]}),e})();var Gr=n("XFyV");const qr=["innerNav"];function Jr(e,t){1&e&&(i.Sb(0,"cd-alert-panel",5),i.Wb(1,6),i.Rb())}function Qr(e,t){1&e&&(i.Sb(0,"cd-alert-panel",7),i.Wb(1,8),i.Rb())}function Kr(e,t){1&e&&(i.Sb(0,"cd-alert-panel",10),i.Wb(1,11),i.Rb())}function Zr(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"cd-alert-panel",20),i.Oc(2),i.Rb(),i.Pb()),2&e){const e=i.ic(2).$implicit;i.yb(2),i.Pc(e.value.userMessage)}}function Xr(e,t){1&e&&(i.Sb(0,"cd-alert-panel",23),i.Yb(1,24),i.Wb(2,25),i.Rb())}function es(e,t){1&e&&(i.Qb(0),i.Sb(1,"cd-alert-panel",27),i.Yb(2,28),i.Wb(3,29),i.Rb(),i.Pb())}function ts(e,t){1&e&&(i.Sb(0,"cd-alert-panel",30),i.Yb(1,31),i.Wb(2,32),i.Rb())}function ns(e,t){if(1&e&&(i.Mc(0,es,4,0,"ng-container",0),i.Mc(1,ts,3,0,"ng-template",null,26,i.Nc)),2&e){const e=i.Ac(2),t=i.ic(3).$implicit;i.pc("ngIf",t.value.info.smart_status.passed)("ngIfElse",e)}}function is(e,t){if(1&e&&(i.Mc(0,Xr,3,0,"cd-alert-panel",21),i.jc(1,"pipeFunction"),i.Mc(2,ns,3,2,"ng-template",null,22,i.Nc)),2&e){const e=i.Ac(3),t=i.ic(2).$implicit,n=i.ic(4);i.pc("ngIf",i.lc(1,2,null==t.value.info?null:t.value.info.smart_status,n.isEmpty))("ngIfElse",e)}}function rs(e,t){if(1&e&&i.Nb(0,"cd-table-key-value",39),2&e){const e=i.ic(4).$implicit;i.pc("renderObjects",!0)("data",e.value.info)}}function ss(e,t){1&e&&(i.Sb(0,"cd-alert-panel",40),i.Wb(1,41),i.Rb())}function os(e,t){if(1&e&&(i.Mc(0,rs,1,2,"cd-table-key-value",37),i.jc(1,"pipeFunction"),i.Mc(2,ss,2,0,"cd-alert-panel",38),i.jc(3,"pipeFunction")),2&e){const e=i.ic(3).$implicit,t=i.ic(4);i.pc("ngIf",!i.lc(1,2,e.value.info,t.isEmpty)),i.yb(2),i.pc("ngIf",i.lc(3,5,e.value.info,t.isEmpty))}}function as(e,t){if(1&e&&i.Nb(0,"cd-table",45),2&e){const e=i.ic(4).$implicit,t=i.ic(4);i.pc("data",e.value.smart.attributes.table)("columns",t.smartDataColumns)}}function cs(e,t){if(1&e&&i.Nb(0,"cd-table-key-value",46),2&e){const e=i.ic(4).$implicit;i.pc("renderObjects",!0)("data",e.value.smart.nvmeData)}}function ls(e,t){1&e&&(i.Sb(0,"cd-alert-panel",47),i.Wb(1,48),i.Rb())}function us(e,t){if(1&e&&(i.Mc(0,as,1,2,"cd-table",42),i.Mc(1,cs,1,2,"cd-table-key-value",43),i.Mc(2,ls,2,0,"cd-alert-panel",44)),2&e){const e=i.ic(3).$implicit;i.pc("ngIf",null==e.value.smart?null:e.value.smart.attributes),i.yb(1),i.pc("ngIf",null==e.value.smart?null:e.value.smart.nvmeData),i.yb(1),i.pc("ngIf",!(null!=e.value.smart&&e.value.smart.attributes||null!=e.value.smart&&e.value.smart.nvmeData))}}function ds(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"ul",12,33),i.Sb(3,"li",34),i.Sb(4,"a",17),i.Wb(5,35),i.Rb(),i.Mc(6,os,4,8,"ng-template",18),i.Rb(),i.Sb(7,"li",34),i.Sb(8,"a",17),i.Wb(9,36),i.Rb(),i.Mc(10,us,3,3,"ng-template",18),i.Rb(),i.Rb(),i.Nb(11,"div",15),i.Pb()),2&e){const e=i.Ac(2);i.yb(3),i.pc("ngbNavItem",1),i.yb(4),i.pc("ngbNavItem",2),i.yb(4),i.pc("ngbNavOutlet",e)}}function hs(e,t){if(1&e&&(i.Mc(0,Zr,3,1,"ng-container",0),i.Mc(1,is,4,5,"ng-template",null,19,i.Nc),i.Mc(3,ds,12,3,"ng-container",4),i.jc(4,"pipeFunction"),i.jc(5,"pipeFunction")),2&e){const e=i.Ac(2),t=i.ic().$implicit,n=i.ic(4);i.pc("ngIf",t.value.error)("ngIfElse",e),i.yb(3),i.pc("ngIf",!i.lc(4,3,t.value.info,n.isEmpty)||!i.lc(5,6,t.value.smart,n.isEmpty))}}function fs(e,t){if(1&e&&(i.Sb(0,"li",16),i.Sb(1,"a",17),i.Oc(2),i.Rb(),i.Mc(3,hs,6,9,"ng-template",18),i.Rb()),2&e){const e=t.$implicit;i.yb(2),i.Rc("",e.value.device," (",e.value.identifier,")")}}function ps(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"ul",12,13),i.Mc(3,fs,4,2,"li",14),i.jc(4,"keyvalue"),i.Rb(),i.Nb(5,"div",15),i.Pb()),2&e){const e=i.Ac(2),t=i.ic(3);i.yb(3),i.pc("ngForOf",i.kc(4,2,t.data)),i.yb(2),i.pc("ngbNavOutlet",e)}}function ms(e,t){if(1&e&&(i.Qb(0),i.Mc(1,Kr,2,0,"cd-alert-panel",9),i.jc(2,"pipeFunction"),i.Mc(3,ps,6,4,"ng-container",4),i.jc(4,"pipeFunction"),i.Pb()),2&e){const e=i.ic(2);i.yb(1),i.pc("ngIf",i.lc(2,2,e.data,e.isEmpty)),i.yb(2),i.pc("ngIf",!i.lc(4,5,e.data,e.isEmpty))}}function bs(e,t){if(1&e&&(i.Qb(0),i.Mc(1,Jr,2,0,"cd-alert-panel",2),i.Mc(2,Qr,2,0,"cd-alert-panel",3),i.Mc(3,ms,5,8,"ng-container",4),i.Pb()),2&e){const e=i.ic();i.yb(1),i.pc("ngIf",e.error),i.yb(1),i.pc("ngIf",e.incompatible),i.yb(1),i.pc("ngIf",!e.error&&!e.incompatible)}}function gs(e,t){1&e&&(i.Sb(0,"cd-loading-panel"),i.Wb(1,49),i.Rb())}let _s=(()=>{class e{constructor(e,t){this.osdService=e,this.hostService=t,this.osdId=null,this.hostname=null,this.loading=!1,this.incompatible=!1,this.error=!1,this.data={},this.isEmpty=jt.a.isEmpty}isSmartError(e){return void 0!==jt.a.get(e,"error")}isNvmeSmartData(e){return"nvme"===jt.a.get(e,"device.protocol","").toLowerCase()}isHddSmartData(e){return"ata"===jt.a.get(e,"device.protocol","").toLowerCase()}fetchData(e){const t={};jt.a.each(e,(e,n)=>{if(this.isSmartError(e)){let i="";i=-22===e.smartctl_error_code?"Smartctl has received an unknown argument (error code " + e.smartctl_error_code + "). You may be using an incompatible version of smartmontools. Version >= 7.0 of smartmontools is required to successfully retrieve data.":"An error with error code " + e.smartctl_error_code + " occurred.",t[n]={error:e.error,smartctl_error_code:e.smartctl_error_code,smartctl_output:e.smartctl_output,userMessage:i,device:e.dev,identifier:e.nvme_vendor}}else 1!==e.json_format_version[0]?this.incompatible=!0:this.isHddSmartData(e)?t[n]=this.extractHddData(e):this.isNvmeSmartData(e)&&(t[n]=this.extractNvmeData(e))}),this.data=t,this.loading=!1}extractNvmeData(e){return{info:jt.a.omitBy(e,(e,t)=>["nvme_smart_health_information_log"].includes(t)),smart:{nvmeData:e.nvme_smart_health_information_log},device:e.device.name,identifier:e.serial_number}}extractHddData(e){const t=jt.a.omitBy(e,(e,t)=>["ata_smart_attributes","ata_smart_selective_self_test_log","ata_smart_data"].includes(t));return{info:t,smart:{attributes:e.ata_smart_attributes,data:e.ata_smart_data},device:t.device.name,identifier:t.serial_number}}updateData(){this.loading=!0,null!==this.osdId?this.osdService.getSmartData(this.osdId).subscribe({next:this.fetchData.bind(this),error:e=>{e.preventDefault(),this.error=e,this.loading=!1}}):null!==this.hostname&&this.hostService.getSmartData(this.hostname).subscribe({next:this.fetchData.bind(this),error:e=>{e.preventDefault(),this.error=e,this.loading=!1}})}ngOnInit(){this.smartDataColumns=[{prop:"id",name:"ID"},{prop:"name",name:"Name"},{prop:"raw.value",name:"Raw"},{prop:"thresh",name:"Threshold"},{prop:"value",name:"Value"},{prop:"when_failed",name:"When Failed"},{prop:"worst",name:"Worst"}]}ngOnChanges(e){this.data={},e.osdId?this.osdId=e.osdId.currentValue:e.hostname&&(this.hostname=e.hostname.currentValue),this.updateData()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(fr),i.Mb(Xi))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-smart-list"]],viewQuery:function(e,t){var n;1&e&&i.Tc(qr,!0),2&e&&i.zc(n=i.hc())&&(t.nav=n.first)},inputs:{osdId:"osdId",hostname:"hostname"},features:[i.wb],decls:3,vars:2,consts:function(){return[[4,"ngIf","ngIfElse"],["isLoading",""],["type","error",4,"ngIf"],["type","warning",4,"ngIf"],[4,"ngIf"],["type","error"],"Failed to retrieve SMART data.",["type","warning"],"The data received has the JSON format version 2.x and is currently incompatible with the dashboard.",["type","info",4,"ngIf"],["type","info"],"No SMART data available.",["ngbNav","",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem","",4,"ngFor","ngForOf"],[3,"ngbNavOutlet"],["ngbNavItem",""],["ngbNavLink",""],["ngbNavContent",""],["noError",""],["id","alert-error","type","warning"],["id","alert-self-test-unknown","size","slim","type","warning",4,"ngIf","ngIfElse",6,"title"],["hasSmartStatus",""],["id","alert-self-test-unknown","size","slim","type","warning",6,"title"],["title","SMART overall-health self-assessment test result"],"unknown",["selfTestFailed",""],["id","alert-self-test-passed","size","slim","type","info",6,"title"],["title","SMART overall-health self-assessment test result"],"passed",["id","alert-self-test-failed","size","slim","type","warning",6,"title"],["title","SMART overall-health self-assessment test result"],"failed",["innerNav","ngbNav"],[3,"ngbNavItem"],"Device Information","SMART",[3,"renderObjects","data",4,"ngIf"],["id","alert-device-info-unavailable","type","info",4,"ngIf"],[3,"renderObjects","data"],["id","alert-device-info-unavailable","type","info"],"No device information available for this device.",["updateSelectionOnRefresh","never",3,"data","columns",4,"ngIf"],["updateSelectionOnRefresh","never",3,"renderObjects","data",4,"ngIf"],["id","alert-device-smart-data-unavailable","type","info",4,"ngIf"],["updateSelectionOnRefresh","never",3,"data","columns"],["updateSelectionOnRefresh","never",3,"renderObjects","data"],["id","alert-device-smart-data-unavailable","type","info"],"No SMART data available for this device.","SMART data is loading."]},template:function(e,t){if(1&e&&(i.Mc(0,bs,4,3,"ng-container",0),i.Mc(1,gs,2,0,"ng-template",null,1,i.Nc)),2&e){const e=i.Ac(2);i.pc("ngIf",!t.loading)("ngIfElse",e)}},directives:[wt.r,pr.a,Qt.p,wt.q,Qt.u,Qt.r,Qt.s,Qt.q,en.a,Bt.a,Gr.a],pipes:[zr.b,wt.k],styles:[""]}),e})();function ys(e,t){if(1&e&&i.Nb(0,"cd-device-list",14),2&e){const e=i.ic(2);i.pc("hostname",e.selection.hostname)}}function vs(e,t){if(1&e&&i.Nb(0,"cd-inventory",14),2&e){const e=i.ic(3);i.pc("hostname",e.selectedHostname)}}function ws(e,t){1&e&&(i.Sb(0,"li",15),i.Sb(1,"a",5),i.Wb(2,16),i.Rb(),i.Mc(3,vs,1,1,"ng-template",7),i.Rb())}function Ss(e,t){if(1&e&&i.Nb(0,"cd-service-daemon-list",14),2&e){const e=i.ic(3);i.pc("hostname",e.selectedHostname)}}function Ms(e,t){1&e&&(i.Sb(0,"li",17),i.Sb(1,"a",5),i.Wb(2,18),i.Rb(),i.Mc(3,Ss,1,1,"ng-template",7),i.Rb())}function ks(e,t){if(1&e&&i.Nb(0,"cd-grafana",21),2&e){const e=i.ic(3);i.pc("grafanaPath","host-details?var-ceph_hosts="+e.selectedHostname)}}function xs(e,t){1&e&&(i.Sb(0,"li",19),i.Sb(1,"a",5),i.Wb(2,20),i.Rb(),i.Mc(3,ks,1,1,"ng-template",7),i.Rb())}function Ds(e,t){if(1&e&&i.Nb(0,"cd-smart-list",14),2&e){const e=i.ic(3);i.pc("hostname",e.selectedHostname)}}function Ts(e,t){if(1&e&&i.Mc(0,Ds,1,1,"cd-smart-list",22),2&e){const e=i.ic(2),t=i.Ac(2);i.pc("ngIf",e.selectedHostname)("ngIfElse",t)}}function Cs(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"ul",2,3),i.Sb(3,"li",4),i.Sb(4,"a",5),i.Wb(5,6),i.Rb(),i.Mc(6,ys,1,1,"ng-template",7),i.Rb(),i.Mc(7,ws,4,0,"li",8),i.Mc(8,Ms,4,0,"li",9),i.Mc(9,xs,4,0,"li",10),i.Sb(10,"li",11),i.Sb(11,"a",5),i.Wb(12,12),i.Rb(),i.Mc(13,Ts,1,2,"ng-template",7),i.Rb(),i.Rb(),i.Nb(14,"div",13),i.Pb()),2&e){const e=i.Ac(2),t=i.ic();i.yb(7),i.pc("ngIf",t.permissions.hosts.read),i.yb(1),i.pc("ngIf",t.permissions.hosts.read),i.yb(1),i.pc("ngIf",t.permissions.grafana.read),i.yb(5),i.pc("ngbNavOutlet",e)}}function Os(e,t){1&e&&(i.Sb(0,"cd-alert-panel",23),i.Wb(1,24),i.Rb())}let Ls=(()=>{class e{get selectedHostname(){return void 0!==this.selection?this.selection.hostname:null}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-host-details"]],inputs:{permissions:"permissions",selection:"selection"},decls:3,vars:1,consts:function(){return[[4,"ngIf"],["noHostname",""],["ngbNav","","cdStatefulTab","host-details",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem","devices"],["ngbNavLink",""],"Devices",["ngbNavContent",""],["ngbNavItem","inventory",4,"ngIf"],["ngbNavItem","daemons",4,"ngIf"],["ngbNavItem","performance-details",4,"ngIf"],["ngbNavItem","device-health"],"Device health",[3,"ngbNavOutlet"],[3,"hostname"],["ngbNavItem","inventory"],"Inventory",["ngbNavItem","daemons"],"Daemons",["ngbNavItem","performance-details"],"Performance Details",["uid","rtOg0AiWz","grafanaStyle","four",3,"grafanaPath"],[3,"hostname",4,"ngIf","ngIfElse"],["type","error"],"No hostname found."]},template:function(e,t){1&e&&(i.Mc(0,Cs,15,4,"ng-container",0),i.Mc(1,Os,2,0,"ng-template",null,1,i.Nc)),2&e&&i.pc("ngIf",t.selection)},directives:[wt.r,Qt.p,Kt.a,Qt.r,Qt.s,Qt.q,Qt.u,Tr,jr,Ur,Fn.a,_s,pr.a],styles:[""]}),e})();const Rs=["servicesTpl"],Es=["maintenanceConfirmTpl"];function As(e,t){if(1&e){const e=i.Tb();i.Sb(0,"cd-table",10),i.gc("fetchData",(function(t){return i.Dc(e),i.ic().getHosts(t)}))("setExpandedRow",(function(t){return i.Dc(e),i.ic().setExpandedRow(t)}))("updateSelection",(function(t){return i.Dc(e),i.ic().updateSelection(t)})),i.Sb(1,"div",11),i.Nb(2,"cd-table-actions",12),i.Rb(),i.Nb(3,"cd-host-details",13),i.Rb()}if(2&e){const e=i.ic();i.pc("data",e.hosts)("columns",e.columns)("hasDetails",!0),i.yb(2),i.pc("permission",e.permissions.hosts)("selection",e.selection)("tableActions",e.tableActions),i.yb(1),i.pc("permissions",e.permissions)("selection",e.expandedRow)}}function Is(e,t){1&e&&i.Nb(0,"cd-grafana",15),2&e&&i.pc("grafanaPath","host-overview?")}function Ps(e,t){1&e&&(i.Sb(0,"li",2),i.Sb(1,"a",3),i.Wb(2,14),i.Rb(),i.Mc(3,Is,1,1,"ng-template",5),i.Rb())}const Ns=function(e){return[e]};function js(e,t){if(1&e&&(i.Sb(0,"a",19),i.Oc(1),i.Rb()),2&e){const e=i.ic().$implicit,t=i.ic(2);i.pc("routerLink",i.uc(4,Ns,e.cdLink))("queryParams",t.cdParams),i.yb(1),i.Rc("",e.type,".",e.id,"")}}function Fs(e,t){if(1&e&&(i.Sb(0,"span"),i.Oc(1),i.Rb()),2&e){const e=i.ic().$implicit;i.yb(1),i.Rc(" ",e.type,".",e.id," ")}}function Ys(e,t){1&e&&(i.Qb(0),i.Oc(1,", "),i.Pb())}function zs(e,t){if(1&e&&(i.Sb(0,"span"),i.Mc(1,js,2,6,"a",17),i.Mc(2,Fs,2,2,"span",18),i.Mc(3,Ys,2,0,"ng-container",18),i.Rb()),2&e){const e=t.$implicit,n=t.last;i.yb(1),i.pc("ngIf",e.canRead),i.yb(1),i.pc("ngIf",!e.canRead),i.yb(1),i.pc("ngIf",!n)}}function $s(e,t){1&e&&i.Mc(0,zs,4,3,"span",16),2&e&&i.pc("ngForOf",t.value)}function Hs(e,t){if(1&e&&(i.Sb(0,"ul"),i.Sb(1,"li"),i.Wb(2,20),i.Rb(),i.Rb()),2&e){const e=i.ic().$implicit;i.yb(2),i.ac(e),i.Xb(2)}}function Ws(e,t){if(1&e&&(i.Sb(0,"div"),i.Mc(1,Hs,3,1,"ul",18),i.Rb()),2&e){const e=t.last,n=i.ic(2);i.yb(1),i.pc("ngIf",!e||"1"==n.errorMessage.length)}}function Vs(e,t){1&e&&(i.Qb(0),i.Wb(1,21),i.Pb())}function Bs(e,t){if(1&e&&(i.Mc(0,Ws,2,1,"div",16),i.Mc(1,Vs,2,0,"ng-container",18)),2&e){const e=i.ic();i.pc("ngForOf",e.errorMessage),i.yb(1),i.pc("ngIf",e.showSubmit)}}let Us=(()=>{class e extends $t.a{constructor(e,t,n,i,r,s,o,a,c,l){super(),this.authStorageService=e,this.hostService=t,this.cephShortVersionPipe=n,this.urlBuilder=i,this.actionLabels=r,this.modalService=s,this.taskWrapper=o,this.router=a,this.notificationService=c,this.orchService=l,this.columns=[],this.hosts=[],this.isLoadingHosts=!1,this.cdParams={fromLink:"/hosts"},this.selection=new Wt.a,this.isExecuting=!1,this.icons=_n.a,this.messages={nonOrchHost:"The feature is disabled because the selected host is not managed by Orchestrator."},this.actionOrchFeatures={create:[ur.HOST_CREATE],edit:[ur.HOST_LABEL_ADD,ur.HOST_LABEL_REMOVE],delete:[ur.HOST_DELETE],maintenance:[ur.HOST_MAINTENANCE_ENTER,ur.HOST_MAINTENANCE_EXIT]},this.permissions=this.authStorageService.getPermissions(),this.tableActions=[{name:this.actionLabels.CREATE,permission:"create",icon:_n.a.add,click:()=>this.router.navigate([this.urlBuilder.getCreate()]),disable:e=>this.getDisable("create",e)},{name:this.actionLabels.EDIT,permission:"update",icon:_n.a.edit,click:()=>this.editAction(),disable:e=>this.getDisable("edit",e)},{name:this.actionLabels.DELETE,permission:"delete",icon:_n.a.destroy,click:()=>this.deleteAction(),disable:e=>this.getDisable("delete",e)},{name:this.actionLabels.ENTER_MAINTENANCE,permission:"update",icon:_n.a.enter,click:()=>this.hostMaintenance(),disable:e=>this.getDisable("maintenance",e)||this.isExecuting||this.enableButton},{name:this.actionLabels.EXIT_MAINTENANCE,permission:"update",icon:_n.a.exit,click:()=>this.hostMaintenance(),disable:e=>this.getDisable("maintenance",e)||this.isExecuting||!this.enableButton}]}ngOnInit(){this.columns=[{name:"Hostname",prop:"hostname",flexGrow:1},{name:"Services",prop:"services",flexGrow:3,cellTemplate:this.servicesTpl},{name:"Labels",prop:"labels",flexGrow:1,cellTransformation:Ht.a.badge,customTemplateConfig:{class:"badge-dark"}},{name:"Status",prop:"status",flexGrow:1,cellTransformation:Ht.a.badge,customTemplateConfig:{map:{maintenance:{class:"badge-warning"}}}},{name:"Version",prop:"ceph_version",flexGrow:1,pipe:this.cephShortVersionPipe}],this.orchService.status().subscribe(e=>{this.orchStatus=e})}updateSelection(e){this.selection=e,this.enableButton=!1,this.selection.hasSelection&&"maintenance"===this.selection.first().status&&(this.enableButton=!0)}editAction(){this.hostService.getLabels().subscribe(e=>{const t=this.selection.first(),n=e.map(e=>({enabled:!0,name:e}));this.modalService.show(Tn.a,{titleText:"Edit Host: " + t.hostname + "",fields:[{type:"select-badges",name:"labels",value:t.labels,label:"Labels",typeConfig:{customBadges:!0,options:n,messages:new lr.a({empty:"There are no labels.",filter:"Filter or add labels",add:"Add label"})}}],submitButtonText:"Edit Host",onSubmit:e=>{this.hostService.update(t.hostname,!0,e.labels).subscribe(()=>{this.notificationService.show(yn.a.success,"Updated Host \"" + t.hostname + "\""),this.table.refreshBtn()})}})})}hostMaintenance(){this.isExecuting=!0;const e=this.selection.first();"maintenance"!==e.status?this.hostService.update(e.hostname,!1,[],!0).subscribe(()=>{this.isExecuting=!1,this.notificationService.show(yn.a.success,"\"" + e.hostname + "\" moved to maintenance"),this.table.refreshBtn()},t=>{if(this.isExecuting=!1,this.errorMessage=t.error.detail.split(/\n/),t.preventDefault(),!t.error.detail.includes("WARNING")||t.error.detail.includes("It is NOT safe to stop")||t.error.detail.includes("ALERT"))this.notificationService.show(yn.a.error,"\"" + e.hostname + "\" cannot be put into maintenance","" + t.error.detail + "");else{const t={titleText:"Warning",buttonText:"Continue",warning:!0,bodyTpl:this.maintenanceConfirmTpl,showSubmit:!0,onSubmit:()=>{this.hostService.update(e.hostname,!1,[],!0,!0).subscribe(()=>{this.modalRef.close()},()=>this.modalRef.close())}};this.modalRef=this.modalService.show(Dn.a,t)}}):this.hostService.update(e.hostname,!1,[],!0).subscribe(()=>{this.isExecuting=!1,this.notificationService.show(yn.a.success,"\"" + e.hostname + "\" has exited maintenance"),this.table.refreshBtn()})}getDisable(e,t){if("delete"===e||"edit"===e||"maintenance"===e){if(!(null==t?void 0:t.hasSingleSelection))return!0;if(!jt.a.every(t.selected,"sources.orchestrator"))return this.messages.nonOrchHost}return this.orchService.getTableActionDisableDesc(this.orchStatus,this.actionOrchFeatures[e])}deleteAction(){const e=this.selection.first().hostname;this.modalRef=this.modalService.show(bn.a,{itemDescription:"Host",itemNames:[e],actionDescription:"delete",submitActionObservable:()=>this.taskWrapper.wrapTaskAroundCall({task:new er.a("host/delete",{hostname:e}),call:this.hostService.delete(e)})})}getHosts(e){if(this.isLoadingHosts)return;const t={mds:"cephfs",mon:"monitor",osd:"osd",rgw:"rgw","rbd-mirror":"rbdMirroring",mgr:"manager","tcmu-runner":"iscsi"};this.isLoadingHosts=!0,this.hostService.list().subscribe(e=>{e.map(e=>(e.services.map(e=>{e.cdLink=`/perf_counters/${e.type}/${encodeURIComponent(e.id)}`;const n=this.permissions[t[e.type]];return e.canRead=!!n&&n.read,e}),e)),this.hosts=e,this.isLoadingHosts=!1},()=>{this.isLoadingHosts=!1,e.error()})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Jt.a),i.Mb(Xi),i.Mb(dr.a),i.Mb(hr.a),i.Mb(gn.b),i.Mb(vn.a),i.Mb(tr.a),i.Mb(Pt.e),i.Mb(wn.a),i.Mb(cr))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-hosts"]],viewQuery:function(e,t){var n;1&e&&(i.Tc(Bt.a,!0),i.Jc(Rs,!0),i.Jc(Es,!0)),2&e&&(i.zc(n=i.hc())&&(t.table=n.first),i.zc(n=i.hc())&&(t.servicesTpl=n.first),i.zc(n=i.hc())&&(t.maintenanceConfirmTpl=n.first))},features:[i.xb([{provide:hr.a,useValue:new hr.a("hosts")}]),i.vb],decls:12,vars:2,consts:function(){return[["ngbNav","",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem",""],["ngbNavLink",""],"Hosts List",["ngbNavContent",""],["ngbNavItem","",4,"ngIf"],[3,"ngbNavOutlet"],["servicesTpl",""],["maintenanceConfirmTpl",""],["columnMode","flex","selectionType","single",3,"data","columns","hasDetails","fetchData","setExpandedRow","updateSelection"],[1,"table-actions","btn-toolbar"],["id","host-actions",1,"btn-group",3,"permission","selection","tableActions"],["cdTableDetail","",3,"permissions","selection"],"Overall Performance",["uid","y0KGL0iZz","grafanaStyle","two",3,"grafanaPath"],[4,"ngFor","ngForOf"],["class","service-link",3,"routerLink","queryParams",4,"ngIf"],[4,"ngIf"],[1,"service-link",3,"routerLink","queryParams"],"" + "\ufffd0\ufffd" + "","Are you sure you want to continue?"]},template:function(e,t){if(1&e&&(i.Sb(0,"ul",0,1),i.Sb(2,"li",2),i.Sb(3,"a",3),i.Wb(4,4),i.Rb(),i.Mc(5,As,4,8,"ng-template",5),i.Rb(),i.Mc(6,Ps,4,0,"li",6),i.Rb(),i.Nb(7,"div",7),i.Mc(8,$s,1,1,"ng-template",null,8,i.Nc),i.Mc(10,Bs,2,2,"ng-template",null,9,i.Nc)),2&e){const e=i.Ac(1);i.yb(6),i.pc("ngIf",t.permissions.grafana.read),i.yb(1),i.pc("ngbNavOutlet",e)}},directives:[Qt.p,Qt.r,Qt.s,Qt.q,wt.r,Qt.u,Bt.a,Sn.a,Ls,Fn.a,wt.q,Pt.h],styles:[""]}),e})(),Gs=(()=>{class e{constructor(e){this.http=e}getLogs(){return this.http.get("api/logs/all")}validateDashboardUrl(e){return this.http.get("api/grafana/validation/"+e)}}return e.\u0275fac=function(t){return new(t||e)(i.dc(o.b))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var qs=n("Iab2");let Js=(()=>{class e{download(e,t){Object(qs.saveAs)(new Blob([e]),t)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();const Qs=function(e){return[e]};function Ks(e,t){if(1&e){const e=i.Tb();i.Sb(0,"button",5),i.gc("click",(function(){return i.Dc(e),i.ic().download("json")})),i.Nb(1,"i",2),i.Sb(2,"span"),i.Oc(3,"JSON"),i.Rb(),i.Rb()}if(2&e){const e=i.ic();i.yb(1),i.pc("ngClass",i.uc(1,Qs,e.icons.json))}}function Zs(e,t){if(1&e){const e=i.Tb();i.Sb(0,"button",5),i.gc("click",(function(){return i.Dc(e),i.ic().download()})),i.Nb(1,"i",2),i.Sb(2,"span"),i.Oc(3,"Text"),i.Rb(),i.Rb()}if(2&e){const e=i.ic();i.yb(1),i.pc("ngClass",i.uc(1,Qs,e.icons.text))}}let Xs=(()=>{class e{constructor(e){this.textToDownloadService=e,this.title="Download",this.icons=_n.a}download(e){this.fileName=`${this.fileName}_${(new Date).toLocaleDateString()}`,"json"===e?this.textToDownloadService.download(JSON.stringify(this.objectItem,null,2),this.fileName+".json"):this.textToDownloadService.download(this.textItem,this.fileName+".txt")}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Js))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-download-button"]],inputs:{objectItem:"objectItem",textItem:"textItem",fileName:"fileName",title:"title"},decls:6,vars:6,consts:[["ngbDropdown","","placement","bottom-right"],["type","button","ngbDropdownToggle","",1,"btn","btn-light","dropdown-toggle-split",3,"title"],[3,"ngClass"],["ngbDropdownMenu",""],["ngbDropdownItem","",3,"click",4,"ngIf"],["ngbDropdownItem","",3,"click"]],template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Sb(1,"button",1),i.Nb(2,"i",2),i.Rb(),i.Sb(3,"div",3),i.Mc(4,Ks,4,3,"button",4),i.Mc(5,Zs,4,3,"button",4),i.Rb(),i.Rb()),2&e&&(i.yb(1),i.pc("title",t.title),i.yb(1),i.pc("ngClass",i.uc(4,Qs,t.icons.download)),i.yb(2),i.pc("ngIf",t.objectItem),i.yb(1),i.pc("ngIf",t.textItem))},directives:[Qt.i,On.a,Qt.m,wt.p,Qt.k,wt.r,Qt.j],styles:[""]}),e})();var eo=n("cEzo"),to=n("E2fk");function no(e,t){1&e&&i.Ob(0)}function io(e,t){if(1&e&&(i.Sb(0,"div",19),i.Nb(1,"cd-download-button",20),i.Nb(2,"cd-copy-2-clipboard-button",21),i.Rb()),2&e){const e=i.ic(4);i.yb(1),i.pc("objectItem",e.clog)("textItem",e.clogText),i.yb(1),i.pc("source",e.clogText)("byId",!1)}}function ro(e,t){if(1&e&&(i.Sb(0,"p"),i.Sb(1,"span",22),i.Oc(2),i.jc(3,"cdDate"),i.Rb(),i.Sb(4,"span"),i.jc(5,"logPriority"),i.Oc(6),i.Rb(),i.Sb(7,"span",23),i.Oc(8),i.Rb(),i.Rb()),2&e){const e=t.$implicit;i.yb(2),i.Pc(i.kc(3,6,e.stamp)),i.yb(2),i.Bb("priority ",i.kc(5,8,e.priority),""),i.yb(2),i.Pc(e.priority),i.yb(2),i.Pc(e.message)}}function so(e,t){1&e&&i.Ob(0)}function oo(e,t){if(1&e&&(i.Sb(0,"div",14),i.Mc(1,io,3,4,"div",15),i.Sb(2,"div",16),i.Mc(3,ro,9,10,"p",17),i.Mc(4,so,1,0,"ng-container",18),i.Rb(),i.Rb()),2&e){const e=i.ic(3),t=i.Ac(4);i.yb(1),i.pc("ngIf",e.clog.length),i.yb(2),i.pc("ngForOf",e.clog),i.yb(1),i.pc("ngIf",0!=e.clog.length)("ngIfElse",t)}}function ao(e,t){if(1&e&&i.Mc(0,oo,5,4,"div",13),2&e){const e=i.ic(2);i.pc("ngIf",e.clog)}}function co(e,t){if(1&e&&(i.Sb(0,"div",19),i.Nb(1,"cd-download-button",24),i.Nb(2,"cd-copy-2-clipboard-button",21),i.Rb()),2&e){const e=i.ic(4);i.yb(1),i.pc("objectItem",e.audit_log)("textItem",e.auditLogText),i.yb(1),i.pc("source",e.auditLogText)("byId",!1)}}function lo(e,t){if(1&e&&(i.Sb(0,"p"),i.Sb(1,"span",22),i.Oc(2),i.jc(3,"cdDate"),i.Rb(),i.Sb(4,"span"),i.jc(5,"logPriority"),i.Oc(6),i.Rb(),i.Sb(7,"span",23),i.Oc(8),i.Rb(),i.Rb()),2&e){const e=t.$implicit;i.yb(2),i.Pc(i.kc(3,6,e.stamp)),i.yb(2),i.Bb("priority ",i.kc(5,8,e.priority),""),i.yb(2),i.Pc(e.priority),i.yb(2),i.Pc(e.message)}}function uo(e,t){1&e&&i.Ob(0)}function ho(e,t){if(1&e&&(i.Sb(0,"div",14),i.Mc(1,co,3,4,"div",15),i.Sb(2,"div",16),i.Mc(3,lo,9,10,"p",17),i.Mc(4,uo,1,0,"ng-container",18),i.Rb(),i.Rb()),2&e){const e=i.ic(3),t=i.Ac(4);i.yb(1),i.pc("ngIf",e.audit_log.length),i.yb(2),i.pc("ngForOf",e.audit_log),i.yb(1),i.pc("ngIf",0!=e.audit_log.length)("ngIfElse",t)}}function fo(e,t){if(1&e&&i.Mc(0,ho,5,4,"div",13),2&e){const e=i.ic(2);i.pc("ngIf",e.audit_log)}}function po(e,t){if(1&e&&(i.Sb(0,"div"),i.Mc(1,no,1,0,"ng-container",3),i.Sb(2,"ul",4,5),i.Sb(4,"li",6),i.Sb(5,"a",7),i.Wb(6,8),i.Rb(),i.Mc(7,ao,1,1,"ng-template",9),i.Rb(),i.Sb(8,"li",10),i.Sb(9,"a",7),i.Wb(10,11),i.Rb(),i.Mc(11,fo,1,1,"ng-template",9),i.Rb(),i.Rb(),i.Nb(12,"div",12),i.Rb()),2&e){const e=i.Ac(3);i.ic();const t=i.Ac(2);i.yb(1),i.pc("ngTemplateOutlet",t),i.yb(11),i.pc("ngbNavOutlet",e)}}function mo(e,t){if(1&e&&(i.Sb(0,"option",46),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e.value),i.yb(1),i.Pc(e.name)}}const bo=function(e){return[e]};function go(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",25),i.Sb(1,"div",26),i.Sb(2,"label",27),i.Wb(3,28),i.Rb(),i.Sb(4,"select",29),i.gc("ngModelChange",(function(t){return i.Dc(e),i.ic().priority=t}))("ngModelChange",(function(){return i.Dc(e),i.ic().filterLogs()})),i.Mc(5,mo,2,2,"option",30),i.Rb(),i.Rb(),i.Sb(6,"div",26),i.Sb(7,"label",31),i.Wb(8,32),i.Rb(),i.Sb(9,"div",33),i.Sb(10,"div",34),i.Sb(11,"span",35),i.Nb(12,"i",36),i.Rb(),i.Rb(),i.Sb(13,"input",37),i.gc("ngModelChange",(function(t){return i.Dc(e),i.ic().search=t}))("keyup",(function(){return i.Dc(e),i.ic().filterLogs()})),i.Rb(),i.Sb(14,"div",38),i.Sb(15,"button",39),i.gc("click",(function(){return i.Dc(e),i.ic().clearSearchKey()})),i.Nb(16,"i"),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Sb(17,"div",26),i.Sb(18,"label",40),i.Wb(19,41),i.Rb(),i.Sb(20,"div",33),i.Sb(21,"input",42,43),i.gc("click",(function(){return i.Dc(e),i.Ac(22).open()}))("ngModelChange",(function(t){return i.Dc(e),i.ic().selectedDate=t}))("ngModelChange",(function(){return i.Dc(e),i.ic().filterLogs()})),i.Rb(),i.Sb(23,"span",38),i.Sb(24,"button",39),i.gc("click",(function(){return i.Dc(e),i.ic().clearDate()})),i.Nb(25,"i"),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Sb(26,"div",26),i.Sb(27,"label"),i.Wb(28,44),i.Rb(),i.Sb(29,"ngb-timepicker",45),i.gc("ngModelChange",(function(t){return i.Dc(e),i.ic().startTime=t}))("ngModelChange",(function(){return i.Dc(e),i.ic().filterLogs()})),i.Rb(),i.Sb(30,"span"),i.Oc(31,"\xa0\u2014\xa0"),i.Rb(),i.Sb(32,"ngb-timepicker",45),i.gc("ngModelChange",(function(t){return i.Dc(e),i.ic().endTime=t}))("ngModelChange",(function(){return i.Dc(e),i.ic().filterLogs()})),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.ic();i.yb(4),i.pc("ngModel",e.priority),i.yb(1),i.pc("ngForOf",e.priorities),i.yb(7),i.pc("ngClass",i.uc(16,bo,e.icons.search)),i.yb(1),i.pc("ngModel",e.search),i.yb(3),i.Bb("icon-prepend ",e.icons.destroy,""),i.yb(5),i.pc("maxDate",e.maxDate)("ngModel",e.selectedDate),i.yb(4),i.Bb("icon-prepend ",e.icons.destroy,""),i.yb(4),i.pc("spinners",!1)("ngModel",e.startTime),i.yb(3),i.pc("spinners",!1)("ngModel",e.endTime)}}function _o(e,t){if(1&e){const e=i.Tb();i.Sb(0,"span"),i.Wb(1,47),i.Rb(),i.Sb(2,"span"),i.Oc(3,"\xa0"),i.Rb(),i.Sb(4,"a",48),i.gc("click",(function(){return i.Dc(e),i.ic().resetFilter()})),i.Wb(5,49),i.Rb()}}let yo=(()=>{class e{constructor(e,t,n){this.logsService=e,this.datePipe=t,this.ngZone=n,this.icons=_n.a,this.priorities=[{name:"Debug",value:"[DBG]"},{name:"Info",value:"[INF]"},{name:"Warning",value:"[WRN]"},{name:"Error",value:"[ERR]"},{name:"All",value:"All"}],this.priority="All",this.search="",this.startTime={hour:0,minute:0},this.endTime={hour:23,minute:59},this.maxDate={year:(new Date).getFullYear(),month:(new Date).getMonth()+1,day:(new Date).getDate()}}ngOnInit(){this.getInfo(),this.ngZone.runOutsideAngular(()=>{this.interval=window.setInterval(()=>{this.ngZone.run(()=>{this.getInfo()})},5e3)})}ngOnDestroy(){clearInterval(this.interval)}getInfo(){this.logsService.getLogs().subscribe(e=>{this.contentData=e,this.clogText=this.logToText(this.contentData.clog),this.auditLogText=this.logToText(this.contentData.audit_log),this.filterLogs()})}abstractFilters(){var e,t,n,i,r,s,o,a;const c=this.priority,l=this.search.toLowerCase().replace(/,/g,"");let u;if(this.selectedDate){const e=this.selectedDate.month,t=this.selectedDate.day;u=`${this.selectedDate.year}-${e<=9?"0"+e:""+e}-${t<=9?"0"+t:""+t}`}else u="";return{priority:c,key:l,yearMonthDay:u,sTime:60*(null!==(t=null===(e=this.startTime)||void 0===e?void 0:e.hour)&&void 0!==t?t:0)+(null!==(i=null===(n=this.startTime)||void 0===n?void 0:n.minute)&&void 0!==i?i:0),eTime:60*(null!==(s=null===(r=this.endTime)||void 0===r?void 0:r.hour)&&void 0!==s?s:23)+(null!==(a=null===(o=this.endTime)||void 0===o?void 0:o.minute)&&void 0!==a?a:59)}}filterExecutor(e,t){return e.filter(e=>{const n=this.datePipe.transform(e.stamp,"mediumTime"),i=parseInt(n.split(":")[0],10),r=parseInt(n.split(":")[1],10);let s,o,a;return s="All"===t.priority?e.priority:t.priority,o=t.yearMonthDay?t.yearMonthDay:e.stamp,a=60*i+r,e.priority===s&&-1!==e.message.toLowerCase().indexOf(t.key)&&-1!==e.stamp.indexOf(o)&&a>=t.sTime&&a<=t.eTime})}filterLogs(){const e=this.abstractFilters();this.clog=this.filterExecutor(this.contentData.clog,e),this.audit_log=this.filterExecutor(this.contentData.audit_log,e)}clearSearchKey(){this.search="",this.filterLogs()}clearDate(){this.selectedDate=null,this.filterLogs()}resetFilter(){return this.priority="All",this.search="",this.selectedDate=null,this.startTime={hour:0,minute:0},this.endTime={hour:23,minute:59},this.filterLogs(),!1}logToText(e){let t="";for(const n of Object.keys(e))t=t+this.datePipe.transform(e[n].stamp,"medium")+"\t"+e[n].priority+"\t"+e[n].message+"\n";return t}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Gs),i.Mb(wt.e),i.Mb(i.A))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-logs"]],decls:5,vars:1,consts:function(){return[[4,"ngIf"],["logFiltersTpl",""],["noEntriesTpl",""],[4,"ngTemplateOutlet"],["ngbNav","","cdStatefulTab","logs",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem","cluster-logs"],["ngbNavLink",""],"Cluster Logs",["ngbNavContent",""],["ngbNavItem","audit-logs"],"Audit Logs",[3,"ngbNavOutlet"],["class","card bg-light mb-3",4,"ngIf"],[1,"card","bg-light","mb-3"],["class","btn-group","role","group",4,"ngIf"],[1,"card-body"],[4,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],["role","group",1,"btn-group"],["fileName","cluster_log",3,"objectItem","textItem"],[3,"source","byId"],[1,"timestamp"],[1,"message"],["fileName","audit_log",3,"objectItem","textItem"],[1,"form-inline"],[1,"form-group"],["for","logs-priority"],"Priority:",["id","logs-priority",1,"form-control","custom-select",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["for","logs-keyword"],"Keyword:",[1,"input-group"],[1,"input-group-prepend"],[1,"input-group-text"],[3,"ngClass"],["id","logs-keyword","type","text",1,"form-control",3,"ngModel","ngModelChange","keyup"],[1,"input-group-append"],["type","button",1,"btn","btn-light",3,"click"],["for","logs-date"],"Date:",["id","logs-date","placeholder","YYYY-MM-DD","ngbDatepicker","",1,"form-control",3,"maxDate","ngModel","click","ngModelChange"],["d","ngbDatepicker"],"Time range:",[3,"spinners","ngModel","ngModelChange"],[3,"value"],"No log entries found. Please try to select different filter options.",["href","#",3,"click"],"Reset filter."]},template:function(e,t){1&e&&(i.Mc(0,po,13,2,"div",0),i.Mc(1,go,33,18,"ng-template",null,1,i.Nc),i.Mc(3,_o,6,0,"ng-template",null,2,i.Nc)),2&e&&i.pc("ngIf",t.contentData)},directives:[wt.r,wt.w,Qt.p,Kt.a,Qt.r,Qt.s,Qt.q,Qt.u,wt.q,Xs,eo.a,Xn.a,On.a,kn.z,ei.a,kn.q,kn.t,wt.p,kn.d,Qt.n,Qt.B,kn.u,kn.B],pipes:[Vt.a,to.a],styles:["p[_ngcontent-%COMP%]{font-family:monospace}.card[_ngcontent-%COMP%] .btn-group[_ngcontent-%COMP%]{margin-top:-45px;position:absolute;right:0}.card[_ngcontent-%COMP%] div[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:flex}.card[_ngcontent-%COMP%] div[_ngcontent-%COMP%] p[_ngcontent-%COMP%]:last-child{margin-bottom:0}.card[_ngcontent-%COMP%] .timestamp[_ngcontent-%COMP%]{flex-shrink:0;font-weight:700}.card[_ngcontent-%COMP%] .priority[_ngcontent-%COMP%]{margin-left:.5rem}.card[_ngcontent-%COMP%] .message[_ngcontent-%COMP%]{margin-left:1rem}.card[_ngcontent-%COMP%] .err[_ngcontent-%COMP%]{color:#ef5c55}.card[_ngcontent-%COMP%] .warn[_ngcontent-%COMP%]{color:#ffc200}.card[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{color:#2b99a8}.card[_ngcontent-%COMP%] .debug[_ngcontent-%COMP%]{color:#495057} cd-logs ngb-timepicker input.ngb-tp-input{width:3.5rem!important}"]}),e})();var vo=n("cp0P");let wo=(()=>{class e{constructor(e){this.http=e,this.url="api/mgr/module"}list(){return this.http.get(""+this.url)}getConfig(e){return this.http.get(`${this.url}/${e}`)}updateConfig(e,t){return this.http.put(`${this.url}/${e}`,{config:t})}enable(e){return this.http.post(`${this.url}/${e}/enable`,null)}disable(e){return this.http.post(`${this.url}/${e}/disable`,null)}getOptions(e){return this.http.get(`${this.url}/${e}/options`)}}return e.\u0275fac=function(t){return new(t||e)(i.dc(o.b))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var So=n("2EZI"),Mo=n("p4Cf");function ko(e,t){if(1&e&&(i.Sb(0,"cd-helper"),i.Oc(1),i.jc(2,"upperFirst"),i.Rb()),2&e){const e=i.ic().$implicit;i.yb(1),i.Qc(" ",i.kc(2,1,e.value.long_desc||e.value.desc)," ")}}function xo(e,t){if(1&e&&(i.Sb(0,"div",15),i.Sb(1,"div",16),i.Nb(2,"input",17),i.Nb(3,"label",18),i.Rb(),i.Rb()),2&e){const e=i.ic().$implicit;i.yb(2),i.qc("id",e.value.name),i.qc("formControlName",e.value.name),i.yb(1),i.qc("for",e.value.name)}}function Do(e,t){if(1&e&&i.Nb(0,"input",22),2&e){const e=i.ic(2).$implicit;i.qc("id",e.value.name),i.qc("formControlName",e.value.name)}}function To(e,t){if(1&e&&(i.Sb(0,"option",25),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("ngValue",e),i.yb(1),i.Qc(" ",e," ")}}function Co(e,t){if(1&e&&(i.Sb(0,"select",23),i.Mc(1,To,2,2,"option",24),i.Rb()),2&e){const e=i.ic(2).$implicit;i.qc("id",e.value.name),i.qc("formControlName",e.value.name),i.yb(1),i.pc("ngForOf",e.value.enum_allowed)}}function Oo(e,t){1&e&&(i.Sb(0,"span",26),i.Wb(1,27),i.Rb())}function Lo(e,t){1&e&&(i.Sb(0,"span",26),i.Wb(1,28),i.Rb())}function Ro(e,t){if(1&e&&(i.Sb(0,"div",15),i.Mc(1,Do,1,2,"input",19),i.Mc(2,Co,2,3,"select",20),i.Mc(3,Oo,2,0,"span",21),i.Mc(4,Lo,2,0,"span",21),i.Rb()),2&e){const e=i.ic().$implicit;i.ic();const t=i.Ac(2),n=i.ic();i.yb(1),i.pc("ngIf",0===e.value.enum_allowed.length),i.yb(1),i.pc("ngIf",e.value.enum_allowed.length>0),i.yb(1),i.pc("ngIf",n.mgrModuleForm.showError(e.value.name,t,"invalidUuid")),i.yb(1),i.pc("ngIf",n.mgrModuleForm.showError(e.value.name,t,"pattern"))}}function Eo(e,t){1&e&&(i.Sb(0,"span",26),i.Wb(1,30),i.Rb())}function Ao(e,t){if(1&e&&(i.Sb(0,"span",26),i.Wb(1,31),i.Rb()),2&e){const e=i.ic(2).$implicit;i.yb(1),i.ac(e.value.max),i.Xb(1)}}function Io(e,t){if(1&e&&(i.Sb(0,"span",26),i.Wb(1,32),i.Rb()),2&e){const e=i.ic(2).$implicit;i.yb(1),i.ac(e.value.min),i.Xb(1)}}function Po(e,t){1&e&&(i.Sb(0,"span",26),i.Wb(1,33),i.Rb())}function No(e,t){if(1&e&&(i.Sb(0,"div",15),i.Nb(1,"input",29),i.Mc(2,Eo,2,0,"span",21),i.Mc(3,Ao,2,1,"span",21),i.Mc(4,Io,2,1,"span",21),i.Mc(5,Po,2,0,"span",21),i.Rb()),2&e){const e=i.ic().$implicit;i.ic();const t=i.Ac(2),n=i.ic();i.yb(1),i.qc("id",e.value.name),i.qc("formControlName",e.value.name),i.qc("min",e.value.min),i.qc("max",e.value.max),i.yb(1),i.pc("ngIf",n.mgrModuleForm.showError(e.value.name,t,"required")),i.yb(1),i.pc("ngIf",n.mgrModuleForm.showError(e.value.name,t,"max")),i.yb(1),i.pc("ngIf",n.mgrModuleForm.showError(e.value.name,t,"min")),i.yb(1),i.pc("ngIf",n.mgrModuleForm.showError(e.value.name,t,"pattern"))}}function jo(e,t){1&e&&(i.Sb(0,"span",26),i.Wb(1,35),i.Rb())}function Fo(e,t){1&e&&(i.Sb(0,"span",26),i.Wb(1,36),i.Rb())}function Yo(e,t){if(1&e&&(i.Sb(0,"div",15),i.Nb(1,"input",34),i.Mc(2,jo,2,0,"span",21),i.Mc(3,Fo,2,0,"span",21),i.Rb()),2&e){const e=i.ic().$implicit;i.ic();const t=i.Ac(2),n=i.ic();i.yb(1),i.qc("id",e.value.name),i.qc("formControlName",e.value.name),i.yb(1),i.pc("ngIf",n.mgrModuleForm.showError(e.value.name,t,"required")),i.yb(1),i.pc("ngIf",n.mgrModuleForm.showError(e.value.name,t,"pattern"))}}const zo=function(){return["addr","str","uuid"]},$o=function(){return["uint","int","size","secs"]};function Ho(e,t){if(1&e&&(i.Sb(0,"div",11),i.Sb(1,"label",12),i.Oc(2),i.Mc(3,ko,3,3,"cd-helper",13),i.Rb(),i.Mc(4,xo,4,3,"div",14),i.Mc(5,Ro,5,4,"div",14),i.Mc(6,No,6,8,"div",14),i.Mc(7,Yo,4,4,"div",14),i.Rb()),2&e){const e=t.$implicit;i.yb(1),i.qc("for",e.value.name),i.yb(1),i.Qc(" ",e.value.name," "),i.yb(1),i.pc("ngIf",e.value.long_desc||e.value.desc),i.yb(1),i.pc("ngIf","bool"===e.value.type),i.yb(1),i.pc("ngIf",i.tc(7,zo).includes(e.value.type)),i.yb(1),i.pc("ngIf",i.tc(8,$o).includes(e.value.type)),i.yb(1),i.pc("ngIf","float"===e.value.type)}}function Wo(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",1),i.Sb(1,"form",2,3),i.Sb(3,"div",4),i.Sb(4,"div",5),i.Wb(5,6),i.Rb(),i.Sb(6,"div",7),i.Mc(7,Ho,8,9,"div",8),i.jc(8,"keyvalue"),i.Rb(),i.Sb(9,"div",9),i.Sb(10,"cd-form-button-panel",10),i.gc("submitActionEvent",(function(){return i.Dc(e),i.ic().onSubmit()})),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.ic();i.yb(1),i.pc("formGroup",e.mgrModuleForm),i.yb(6),i.pc("ngForOf",i.kc(8,4,e.moduleOptions)),i.yb(3),i.pc("form",e.mgrModuleForm)("submitText",e.actionLabels.UPDATE)}}let Vo=(()=>{class e extends qn.a{constructor(e,t,n,i,r,s){super(),this.actionLabels=e,this.route=t,this.router=n,this.formBuilder=i,this.mgrModuleService=r,this.notificationService=s,this.moduleName="",this.moduleOptions=[]}ngOnInit(){this.route.params.subscribe(e=>{this.moduleName=decodeURIComponent(e.name);const t=[this.mgrModuleService.getOptions(this.moduleName),this.mgrModuleService.getConfig(this.moduleName)];Object(vo.a)(t).subscribe(e=>{this.moduleOptions=e[0],this.createForm(),this.mgrModuleForm.setValue(e[1]),this.loadingReady()},e=>{this.loadingError()})})}getValidators(e){const t=[];switch(e.type){case"addr":t.push(Cn.a.ip());break;case"uint":case"int":case"size":case"secs":t.push(Cn.a.number()),t.push(kn.A.required),jt.a.isNumber(e.min)&&t.push(kn.A.min(e.min)),jt.a.isNumber(e.max)&&t.push(kn.A.max(e.max));break;case"str":jt.a.isNumber(e.min)&&t.push(kn.A.minLength(e.min)),jt.a.isNumber(e.max)&&t.push(kn.A.maxLength(e.max));break;case"float":t.push(kn.A.required),t.push(Cn.a.decimalNumber());break;case"uuid":t.push(Cn.a.uuid())}return t}createForm(){const e={};jt.a.forEach(this.moduleOptions,t=>{e[t.name]=[t.default_value,this.getValidators(t)]}),this.mgrModuleForm=this.formBuilder.group(e)}goToListView(){this.router.navigate(["/mgr-modules"])}onSubmit(){if(this.mgrModuleForm.pristine)return void this.goToListView();const e={};jt.a.forEach(this.moduleOptions,t=>{const n=this.mgrModuleForm.get(t.name);n.dirty&&n.valid&&(e[t.name]=n.value)}),this.mgrModuleService.updateConfig(this.moduleName,e).subscribe(()=>{this.notificationService.show(yn.a.success,"Updated options for module '" + this.moduleName + "'."),this.goToListView()},()=>{this.mgrModuleForm.setErrors({cdSubmitButton:!0})})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(gn.b),i.Mb(Pt.a),i.Mb(Pt.e),i.Mb(So.a),i.Mb(wo),i.Mb(wn.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-mgr-module-form"]],features:[i.vb],decls:1,vars:1,consts:function(){return[["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],["name","mgrModuleForm","novalidate","",3,"formGroup"],["frm","ngForm"],[1,"card"],[1,"card-header"],"Edit Manager module",[1,"card-body"],["class","form-group row",4,"ngFor","ngForOf"],[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],[1,"form-group","row"],[1,"cd-col-form-label",3,"for"],[4,"ngIf"],["class","cd-col-form-input",4,"ngIf"],[1,"cd-col-form-input"],[1,"custom-control","custom-checkbox"],["type","checkbox",1,"custom-control-input",3,"id","formControlName"],[1,"custom-control-label",3,"for"],["class","form-control","type","text",3,"id","formControlName",4,"ngIf"],["class","form-control custom-select",3,"id","formControlName",4,"ngIf"],["class","invalid-feedback",4,"ngIf"],["type","text",1,"form-control",3,"id","formControlName"],[1,"form-control","custom-select",3,"id","formControlName"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngValue"],[1,"invalid-feedback"],"The entered value is not a valid UUID, e.g.: 67dcac9f-2c03-4d6c-b7bd-1210b3a259a8","The entered value needs to be a valid IP address.",["type","number",1,"form-control",3,"id","formControlName","min","max"],"This field is required.","The entered value is too high! It must be lower or equal to " + "\ufffd0\ufffd" + ".","The entered value is too low! It must be greater or equal to " + "\ufffd0\ufffd" + ".","The entered value needs to be a number.",["type","number",1,"form-control",3,"id","formControlName"],"This field is required.","The entered value needs to be a number or decimal."]},template:function(e,t){1&e&&i.Mc(0,Wo,11,6,"div",0),2&e&&i.pc("cdFormLoading",t.loading)},directives:[Kn.a,kn.C,kn.r,kn.k,Zn.a,wt.q,ti.a,Xn.a,wt.r,Mo.a,On.a,kn.b,ei.a,kn.q,kn.i,kn.d,kn.z,kn.u,kn.B,kn.v],pipes:[wt.k,ir.a],styles:[""]}),e})();var Bo=n("jtHE");const Uo=["*"],Go=["templateOutlet"];function qo(e,t){if(1&e&&(i.Sb(0,"div",6),i.Oc(1),i.Rb()),2&e){const e=i.ic(2);i.yb(1),i.Qc(" ",e.message||e.defaultMessage," ")}}function Jo(e,t){if(1&e&&(i.Sb(0,"div",3),i.Nb(1,"div",4),i.Mc(2,qo,2,1,"div",5),i.Rb()),2&e){const e=i.ic();i.yb(2),i.pc("ngIf",e.message||e.defaultMessage)}}function Qo(e,t){}function Ko(e,t){1&e&&i.Mc(0,Qo,0,0,"ng-template",null,7,i.Nc)}const Zo=function(e){return{active:e}};let Xo=(()=>{class e{}return e.START="start",e.STOP="stop",e.UPDATE="update",e.RESET="reset",e.RESET_GLOBAL="reset_global",e.UNSUBSCRIBE="unsubscribe",e})();const ea="block-ui-main";let ta=(()=>{let e=class{constructor(){this.blockUISettings={},this.blockUIInstances={},this.blockUISubject=new Bo.a(1),this.blockUIObservable=this.blockUISubject.asObservable(),this.blockUIObservable.subscribe(this.blockUIMiddleware.bind(this))}getSettings(){return this.blockUISettings}updateSettings(e={}){this.blockUISettings=Object.assign(Object.assign({},this.blockUISettings),e)}decorate(e="block-ui-main"){const t={name:e,isActive:!1,blockCount:0,start:this.dispatch(this.blockUISubject,Xo.START,e),update:this.dispatch(this.blockUISubject,Xo.UPDATE,e),stop:this.dispatch(this.blockUISubject,Xo.STOP,e),reset:this.dispatch(this.blockUISubject,Xo.RESET,e),resetGlobal:this.dispatch(this.blockUISubject,Xo.RESET_GLOBAL,e),unsubscribe:this.dispatch(this.blockUISubject,Xo.UNSUBSCRIBE,e)};return this.blockUIInstances[e]=this.blockUIInstances[e]||t,t}observe(){return this.blockUIObservable}clearInstance(e){this.dispatch(this.blockUISubject,Xo.RESET,e)}blockUIMiddleware({action:e,name:t}){let n=null;switch(e){case Xo.START:n=!0;break;case Xo.STOP:case Xo.RESET:n=!1}null!==n&&(this.blockUIInstances[t].isActive=n)}dispatch(e,t,n="block-ui-main"){return i=>{e.next({name:n,action:t,message:i})}}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Ib({token:e,factory:function(t){return e.\u0275fac(t)}}),e})(),na=(()=>{let e=class{constructor(e){this.blockUI=e}ngOnInit(){this.name=this.name||ea,this.template=this.template||this.blockUI.blockUISettings.template}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(ta))},e.\u0275cmp=i.Gb({type:e,selectors:[["block-ui"]],inputs:{name:"name",template:"template",message:"message",delayStart:"delayStart",delayStop:"delayStop"},ngContentSelectors:Uo,decls:2,vars:5,consts:[[3,"name","message","template","delayStart","delayStop"]],template:function(e,t){1&e&&(i.oc(),i.nc(0),i.Nb(1,"block-ui-content",0)),2&e&&(i.yb(1),i.pc("name",t.name)("message",t.message)("template",t.template)("delayStart",t.delayStart)("delayStop",t.delayStop))},directives:function(){return[ia]},encapsulation:2}),e})(),ia=(()=>{let e=class{constructor(e,t,n){this.blockUI=e,this.resolver=t,this.changeDetectionRef=n,this.name=ea,this.defaultBlockState={startTimeouts:[],stopTimeouts:[],updateTimeouts:[],blockCount:0,startCallCount:0,stopCallCount:0},this.state=Object.assign({},this.defaultBlockState)}ngOnInit(){this.settings=this.blockUI.getSettings(),this.blockUISubscription=this.subscribeToBlockUI(this.blockUI.observe())}ngAfterViewInit(){try{if(!this.templateCmp)return!1;if(this.templateCmp instanceof i.L)this.templateOutlet.createEmbeddedView(this.templateCmp);else{const e=this.resolver.resolveComponentFactory(this.templateCmp);this.templateCompRef=this.templateOutlet.createComponent(e),this.updateBlockTemplate(this.message)}}catch(e){console.error("ng-block-ui:",e)}}ngAfterViewChecked(){this.detectChanges()}subscribeToBlockUI(e){return e.subscribe(e=>this.onDispatchedEvent(e))}onDispatchedEvent(e){switch(e.action){case Xo.START:this.onStart(e);break;case Xo.STOP:this.onStop(e);break;case Xo.UPDATE:this.onUpdate(e);break;case Xo.RESET:this.onReset(e);break;case Xo.RESET_GLOBAL:this.resetState();break;case Xo.UNSUBSCRIBE:this.onStop(e),this.onUnsubscribe(e.name)}}onStart({name:e,message:t}){if(e===this.name){const e=this.delayStart||this.settings.delayStart||0;this.state.startCallCount+=1;const n=setTimeout(()=>{this.state.blockCount+=1,this.showBlock(t),this.updateInstanceBlockCount()},e);this.state.startTimeouts.push(n)}}onStop({name:e}){if(e===this.name){const e=this.state.stopCallCount+1;if(this.state.startCallCount-e>=0){const t=this.delayStop||this.settings.delayStop||0;this.state.stopCallCount=e;const n=setTimeout(()=>{this.state.blockCount-=1,this.updateInstanceBlockCount(),this.detectChanges()},t);this.state.stopTimeouts.push(n)}}}onUpdate({name:e,message:t}){if(e===this.name){const e=this.delayStart||this.settings.delayStart||0;clearTimeout(this.state.updateTimeouts[0]);const n=setTimeout(()=>{this.updateMessage(t)},e);this.state.updateTimeouts.push(n)}}onReset({name:e}){e===this.name&&this.resetState()}updateMessage(e){this.showBlock(e)}showBlock(e){this.message=e||this.defaultMessage||this.settings.message,this.updateBlockTemplate(this.message),this.detectChanges()}updateBlockTemplate(e){this.templateCompRef&&this.templateCompRef instanceof i.k&&(this.templateCompRef.instance.message=e)}resetState(){[...this.state.startTimeouts,...this.state.stopTimeouts,...this.state.updateTimeouts].forEach(clearTimeout),this.state=Object.assign({},this.defaultBlockState),this.updateInstanceBlockCount(),this.detectChanges()}onUnsubscribe(e){this.blockUISubscription&&e===this.name&&this.blockUISubscription.unsubscribe()}updateInstanceBlockCount(){if(this.blockUI.blockUIInstances[this.name]){const{blockCount:e}=this.state;this.blockUI.blockUIInstances[this.name].blockCount=e}}detectChanges(){this.changeDetectionRef.destroyed||this.changeDetectionRef.detectChanges()}ngOnDestroy(){this.resetState(),this.onUnsubscribe(this.name),this.blockUI.clearInstance(this.name)}};return e.\u0275fac=function(t){return new(t||e)(i.Mb(ta),i.Mb(i.j),i.Mb(i.h))},e.\u0275cmp=i.Gb({type:e,selectors:[["block-ui-content"]],viewQuery:function(e,t){var n;1&e&&i.Tc(Go,!0,i.P),2&e&&i.zc(n=i.hc())&&(t.templateOutlet=n.first)},inputs:{name:"name",delayStart:"delayStart",delayStop:"delayStop",defaultMessage:["message","defaultMessage"],templateCmp:["template","templateCmp"]},decls:3,vars:9,consts:[[3,"ngClass"],["class","block-ui-spinner",4,"ngIf"],[4,"ngIf"],[1,"block-ui-spinner"],[1,"loader"],["class","message",4,"ngIf"],[1,"message"],["templateOutlet",""]],template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Mc(1,Jo,3,1,"div",1),i.Mc(2,Ko,2,0,void 0,2),i.Rb()),2&e&&(i.Cb("block-ui-wrapper ",t.name," ",t.className,""),i.pc("ngClass",i.uc(7,Zo,t.state.blockCount>0)),i.yb(1),i.pc("ngIf",!t.templateCmp),i.yb(1),i.pc("ngIf",t.templateCmp))},directives:[wt.p,wt.r],styles:["\n.block-ui-wrapper {\n display: none;\n position: fixed;\n height: 100%;\n width: 100%;\n top: 0;\n left: 0;\n background: rgba(0, 0, 0, 0.70);\n z-index: 30000;\n cursor: wait;\n}\n\n.block-ui-wrapper.block-ui-wrapper--element {\n position: absolute;\n}\n\n.block-ui-wrapper.active {\n display: block;\n}\n\n.block-ui-wrapper.block-ui-main {\n position: fixed;\n}\n\n.block-ui-spinner,\n.block-ui-template {\n position: absolute;\n top: 40%;\n margin: 0 auto;\n left: 0;\n right: 0;\n transform: translateY(-50%);\n}\n\n.block-ui-spinner > .message {\n font-size: 1.3em;\n text-align: center;\n color: #fff;\n}\n\n.block-ui__element {\n position: relative;\n}\n\n.loader,\n.loader:after {\n border-radius: 50%;\n width: 10em;\n height: 10em;\n}\n.loader {\n margin: 7px auto;\n font-size: 5px;\n position: relative;\n text-indent: -9999em;\n border-top: 1.1em solid rgba(255, 255, 255, 0.2);\n border-right: 1.1em solid rgba(255, 255, 255, 0.2);\n border-bottom: 1.1em solid rgba(255, 255, 255, 0.2);\n border-left: 1.1em solid #ffffff;\n -webkit-transform: translateZ(0);\n -ms-transform: translateZ(0);\n transform: translateZ(0);\n -webkit-animation: load8 1.1s infinite linear;\n animation: load8 1.1s infinite linear;\n}\n\n@-webkit-keyframes load8 {\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 load8 {\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"],encapsulation:2}),e})(),ra=(()=>{let e=class{constructor(e){this.blockUIInstance=e,this.globalDispatch=this.blockUIInstance.decorate()}start(e,t){this.dispatch(e,Xo.START,t)}stop(e){this.dispatch(e,Xo.STOP)}reset(e){this.dispatch(e,Xo.RESET)}resetGlobal(){this.globalDispatch.resetGlobal()}update(e,t){this.dispatch(e,Xo.UPDATE,t)}unsubscribe(e){this.dispatch(e,Xo.UNSUBSCRIBE)}isActive(e=null){const t=e?this.toArray(e):null,n=this.blockUIInstance.blockUIInstances;return Object.keys(n).some(e=>t?t.indexOf(n[e].name)>=0&&n[e].isActive:n[e].isActive)}dispatch(e=[],t,n){this.toArray(e).forEach(e=>this.blockUIInstance.decorate(e)[t](n))}toArray(e=[]){return"string"==typeof e?[e]:e}};return e.\u0275fac=function(t){return new(t||e)(i.dc(ta))},e.\u0275prov=i.Ib({token:e,factory:function(t){return e.\u0275fac(t)}}),e})();var sa;const oa=new ta,aa=new i.r("BlockUIModuleSettings");function ca(e){return oa.updateSettings(e),oa}let la=(()=>{let e=sa=class{static forRoot(e={}){return{ngModule:sa,providers:[{provide:aa,useValue:e},{provide:ta,useFactory:ca,deps:[aa]},ra]}}};return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[wt.c]]}),e})(),ua=1;function da(e,t={}){return t.scopeToInstance?function(t,n){const i=`_${n}-block-ui`;Object.defineProperty(t,n,{get:function(){if(this[i])return this[i];const t=`${e}-${ua++}`;return this[i]=oa.decorate(t),this[i]},set:function(e){this[i]=e}})}:function(t,n){t[n]=oa.decorate(e)}}function ha(e,t){if(1&e&&(i.Qb(0),i.Nb(1,"cd-table-key-value",1),i.Pb()),2&e){const e=i.ic();i.yb(1),i.pc("data",e.module_config)}}let fa=(()=>{class e{constructor(e){this.mgrModuleService=e}ngOnChanges(){this.selection&&this.mgrModuleService.getConfig(this.selection.name).subscribe(e=>{this.module_config=e})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(wo))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-mgr-module-details"]],inputs:{selection:"selection"},features:[i.wb],decls:1,vars:1,consts:[[4,"ngIf"],[3,"data"]],template:function(e,t){1&e&&i.Mc(0,ha,2,1,"ng-container",0),2&e&&i.pc("ngIf",t.selection)},directives:[wt.r,en.a],styles:[""]}),e})(),pa=(()=>{class e extends $t.a{constructor(e,t,n){super(),this.authStorageService=e,this.mgrModuleService=t,this.notificationService=n,this.columns=[],this.modules=[],this.selection=new Wt.a,this.permission=this.authStorageService.getPermissions().configOpt,this.columns=[{name:"Name",prop:"name",flexGrow:1},{name:"Enabled",prop:"enabled",flexGrow:1,cellClass:"text-center",cellTransformation:Ht.a.checkIcon},{name:"Always-On",prop:"always_on",flexGrow:1,cellClass:"text-center",cellTransformation:Ht.a.checkIcon}];const i=()=>this.selection.first()&&encodeURIComponent(this.selection.first().name);this.tableActions=[{name:"Edit",permission:"update",disable:()=>!this.selection.hasSelection||0===Object.values(this.selection.first().options).length,routerLink:()=>"/mgr-modules/edit/"+i(),icon:_n.a.edit},{name:"Enable",permission:"update",click:()=>this.updateModuleState(),disable:()=>this.isTableActionDisabled("enabled"),icon:_n.a.start},{name:"Disable",permission:"update",click:()=>this.updateModuleState(),disable:()=>this.getTableActionDisabledDesc(),icon:_n.a.stop}]}getModuleList(e){this.mgrModuleService.list().subscribe(e=>{this.modules=e},()=>{e.error()})}updateSelection(e){this.selection=e}isTableActionDisabled(e){if(!this.selection.hasSelection)return!0;const t=this.selection.first();if("dashboard"===t.name)return!0;if(t.always_on)return!0;switch(e){case"enabled":return t.enabled;case"disabled":return!t.enabled}}getTableActionDisabledDesc(){var e;return(null===(e=this.selection.first())||void 0===e?void 0:e.always_on)?"This Manager module is always on.":this.isTableActionDisabled("disabled")}updateModuleState(){if(!this.selection.hasSelection)return;let e;const t=()=>{Object(Ut.a)(2e3).subscribe(()=>{this.mgrModuleService.list().subscribe(()=>{this.notificationService.suspendToasties(!1),this.blockUI.stop(),this.table.refreshBtn()},()=>{t()})})},n=this.selection.first();e=n.enabled?this.mgrModuleService.disable(n.name):this.mgrModuleService.enable(n.name),e.subscribe(()=>{},()=>{this.notificationService.suspendToasties(!0),this.blockUI.start("Reconnecting, please wait ..."),t()})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Jt.a),i.Mb(wo),i.Mb(wn.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-mgr-module-list"]],viewQuery:function(e,t){var n;1&e&&i.Jc(Bt.a,!0),2&e&&i.zc(n=i.hc())&&(t.table=n.first)},features:[i.vb],decls:4,vars:8,consts:[["columnMode","flex","selectionType","single","identifier","module",3,"autoReload","data","columns","hasDetails","setExpandedRow","updateSelection","fetchData"],["table",""],[1,"table-actions",3,"permission","selection","tableActions"],["cdTableDetail","",3,"selection"]],template:function(e,t){1&e&&(i.Sb(0,"cd-table",0,1),i.gc("setExpandedRow",(function(e){return t.setExpandedRow(e)}))("updateSelection",(function(e){return t.updateSelection(e)}))("fetchData",(function(e){return t.getModuleList(e)})),i.Nb(2,"cd-table-actions",2),i.Nb(3,"cd-mgr-module-details",3),i.Rb()),2&e&&(i.pc("autoReload",!1)("data",t.modules)("columns",t.columns)("hasDetails",!0),i.yb(2),i.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions),i.yb(1),i.pc("selection",t.expandedRow))},directives:[Bt.a,Sn.a,fa],styles:[""]}),Object(Ft.b)([da(),Object(Ft.d)("design:type",Object)],e.prototype,"blockUI",void 0),e})(),ma=(()=>{class e{constructor(e){this.http=e}getMonitor(){return this.http.get("api/monitor")}}return e.\u0275fac=function(t){return new(t||e)(i.dc(o.b))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();function ba(e,t){if(1&e&&(i.Sb(0,"table",11),i.Sb(1,"tr"),i.Sb(2,"td",12),i.Wb(3,13),i.Rb(),i.Sb(4,"td"),i.Oc(5),i.Rb(),i.Rb(),i.Sb(6,"tr"),i.Sb(7,"td",12),i.Wb(8,14),i.Rb(),i.Sb(9,"td"),i.Oc(10),i.jc(11,"relativeDate"),i.Rb(),i.Rb(),i.Sb(12,"tr"),i.Sb(13,"td",12),i.Wb(14,15),i.Rb(),i.Sb(15,"td"),i.Oc(16),i.Rb(),i.Rb(),i.Sb(17,"tr"),i.Sb(18,"td",12),i.Wb(19,16),i.Rb(),i.Sb(20,"td"),i.Oc(21),i.Rb(),i.Rb(),i.Sb(22,"tr"),i.Sb(23,"td",12),i.Wb(24,17),i.Rb(),i.Sb(25,"td"),i.Oc(26),i.Rb(),i.Rb(),i.Sb(27,"tr"),i.Sb(28,"td",12),i.Wb(29,18),i.Rb(),i.Sb(30,"td"),i.Oc(31),i.Rb(),i.Rb(),i.Sb(32,"tr"),i.Sb(33,"td",12),i.Wb(34,19),i.Rb(),i.Sb(35,"td"),i.Oc(36),i.Rb(),i.Rb(),i.Rb()),2&e){const e=i.ic();i.yb(5),i.Pc(e.mon_status.monmap.fsid),i.yb(5),i.Pc(i.kc(11,7,e.mon_status.monmap.modified)),i.yb(6),i.Pc(e.mon_status.monmap.epoch),i.yb(5),i.Pc(e.mon_status.features.quorum_con),i.yb(5),i.Pc(e.mon_status.features.quorum_mon),i.yb(5),i.Pc(e.mon_status.features.required_con),i.yb(5),i.Pc(e.mon_status.features.required_mon)}}let ga=(()=>{class e{constructor(e){this.monitorService=e,this.inQuorum={columns:[{prop:"name",name:"Name",cellTransformation:Ht.a.routerLink},{prop:"rank",name:"Rank"},{prop:"public_addr",name:"Public Address"},{prop:"cdOpenSessions",name:"Open Sessions",cellTransformation:Ht.a.sparkline,comparator:(e,t)=>{const n=jt.a.last(e),i=jt.a.last(t);return n&&i&&n!==i?n>i?1:-1:0}}]},this.notInQuorum={columns:[{prop:"name",name:"Name",cellTransformation:Ht.a.routerLink},{prop:"rank",name:"Rank"},{prop:"public_addr",name:"Public Address"}]}}refresh(){this.monitorService.getMonitor().subscribe(e=>{e.in_quorum.map(e=>(e.cdOpenSessions=e.stats.num_sessions.map(e=>e[1]),e.cdLink="/perf_counters/mon/"+e.name,e.cdParams={fromLink:"/monitor"},e)),e.out_quorum.map(e=>(e.cdLink="/perf_counters/mon/"+e.name,e.cdParams={fromLink:"/monitor"},e)),this.inQuorum.data=[...e.in_quorum],this.notInQuorum.data=[...e.out_quorum],this.mon_status=e.mon_status})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(ma))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-monitor"]],decls:13,vars:5,consts:function(){return[[1,"row"],[1,"col-lg-4"],[1,"cd-header"],"Status",["class","table table-striped",4,"ngIf"],[1,"col-lg-8"],[1,"in-quorum","cd-header"],"In Quorum",[3,"data","columns"],"Not In Quorum",[3,"data","columns","fetchData"],[1,"table","table-striped"],[1,"bold"],"Cluster ID","monmap modified","monmap epoch","quorum con","quorum mon","required con","required mon"]},template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Sb(1,"div",1),i.Sb(2,"fieldset"),i.Sb(3,"legend",2),i.Wb(4,3),i.Rb(),i.Mc(5,ba,37,9,"table",4),i.Rb(),i.Rb(),i.Sb(6,"div",5),i.Sb(7,"legend",6),i.Wb(8,7),i.Rb(),i.Nb(9,"cd-table",8),i.Sb(10,"legend",6),i.Wb(11,9),i.Rb(),i.Sb(12,"cd-table",10),i.gc("fetchData",(function(){return t.refresh()})),i.Rb(),i.Rb(),i.Rb()),2&e&&(i.yb(5),i.pc("ngIf",t.mon_status),i.yb(4),i.pc("data",t.inQuorum.data)("columns",t.inQuorum.columns),i.yb(3),i.pc("data",t.notInQuorum.data)("columns",t.notInQuorum.columns))},directives:[wt.r,Bt.a],pipes:[Yr.a],styles:[""]}),e})();var _a=n("ajRT");let ya=(()=>{class e{constructor(e,t,n,r,s){this.activeModal=e,this.actionLabels=t,this.formBuilder=n,this.osdService=r,this.taskWrapper=s,this.driveGroups=[],this.submitAction=new i.o,this.action=t.CREATE,this.createForm()}createForm(){this.formGroup=this.formBuilder.group({})}onSubmit(){this.taskWrapper.wrapTaskAroundCall({task:new er.a("osd/"+gn.e.CREATE,{tracking_id:jt.a.join(jt.a.map(this.driveGroups,"service_id"),", ")}),call:this.osdService.create(this.driveGroups)}).subscribe({error:()=>{this.formGroup.setErrors({cdSubmitButton:!0})},complete:()=>{this.submitAction.emit(),this.activeModal.close()}})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Qt.a),i.Mb(gn.b),i.Mb(So.a),i.Mb(fr),i.Mb(tr.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-osd-creation-preview-modal"]],inputs:{driveGroups:"driveGroups"},outputs:{submitAction:"submitAction"},decls:15,vars:9,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"OSD creation preview",[1,"modal-content"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],"DriveGroups",[1,"modal-footer"],[3,"form","submitText","submitActionEvent"]]},template:function(e,t){1&e&&(i.Sb(0,"cd-modal",0),i.Qb(1,1),i.Wb(2,2),i.Pb(),i.Qb(3,3),i.Sb(4,"form",4,5),i.Sb(6,"div",6),i.Sb(7,"h4"),i.Wb(8,7),i.Rb(),i.Sb(9,"pre"),i.Oc(10),i.jc(11,"json"),i.Rb(),i.Rb(),i.Sb(12,"div",8),i.Sb(13,"cd-form-button-panel",9),i.gc("submitActionEvent",(function(){return t.onSubmit()})),i.jc(14,"titlecase"),i.Rb(),i.Rb(),i.Rb(),i.Pb(),i.Rb()),2&e&&(i.pc("modalRef",t.activeModal),i.yb(4),i.pc("formGroup",t.formGroup),i.yb(6),i.Pc(i.kc(11,5,t.driveGroups)),i.yb(3),i.pc("form",t.formGroup)("submitText",i.kc(14,7,t.action)))},directives:[_a.a,kn.C,kn.r,Zn.a,kn.k,ti.a],pipes:[wt.j,wt.A],styles:[""]}),e})();const va=["inventoryDevices"];function wa(e,t){if(1&e&&(i.Sb(0,"span",16),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.yb(1),i.Qc(" ",e," ")}}function Sa(e,t){if(1&e&&(i.Sb(0,"cd-alert-panel",13),i.Qb(1),i.Wb(2,14),i.Pb(),i.Mc(3,wa,2,1,"span",15),i.Rb()),2&e){const e=i.ic();i.pc("showTitle",!1),i.yb(3),i.pc("ngForOf",e.requiredFilters)}}function Ma(e,t){if(1&e&&(i.Sb(0,"div"),i.Sb(1,"p",17),i.Sb(2,"span"),i.Wb(3,18),i.jc(4,"dimlessBinary"),i.Rb(),i.Rb(),i.Rb()),2&e){const e=i.ic();i.yb(4),i.ac(e.filteredDevices.length)(i.kc(4,2,e.capacity)),i.Xb(3)}}const ka=function(){return["available","osd_ids"]};let xa=(()=>{class e{constructor(e,t,n){this.formBuilder=e,this.activeModal=t,this.actionLabels=n,this.submitAction=new i.o,this.icons=_n.a,this.filterColumns=[],this.devices=[],this.filteredDevices=[],this.capacity=0,this.canSubmit=!1,this.requiredFilters=[],this.action=n.ADD,this.createForm()}ngAfterViewInit(){const e=jt.a.filter(this.inventoryDevices.columns,e=>this.filterColumns.includes(e.prop)&&"hostname"!==e.prop);setTimeout(()=>{this.requiredFilters=jt.a.map(e,"name")},0)}createForm(){this.formGroup=this.formBuilder.group({})}onFilterChange(e){if(this.capacity=0,this.canSubmit=!1,jt.a.isEmpty(e.filters))this.filteredDevices=[],this.event=void 0;else{const t=e.filters.filter(e=>"hostname"!==e.prop);this.canSubmit=!jt.a.isEmpty(t),this.filteredDevices=e.data,this.capacity=jt.a.sumBy(this.filteredDevices,"sys_api.size"),this.event=e}}onSubmit(){this.submitAction.emit(this.event),this.activeModal.close()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(So.a),i.Mb(Qt.a),i.Mb(gn.b))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-osd-devices-selection-modal"]],viewQuery:function(e,t){var n;1&e&&i.Tc(va,!0),2&e&&i.zc(n=i.hc())&&(t.inventoryDevices=n.first)},outputs:{submitAction:"submitAction"},decls:14,vars:14,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"" + "\ufffd0\ufffd" + " devices",[1,"modal-content"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"modal-body"],["type","warning","size","slim",3,"showTitle",4,"ngIf"],[3,"devices","filterColumns","hiddenColumns","filterChange"],["inventoryDevices",""],[4,"ngIf"],[1,"modal-footer"],[3,"form","disabled","submitText","submitActionEvent"],["type","warning","size","slim",3,"showTitle"],"At least one of these filters must be applied in order to proceed:",["class","badge badge-dark ml-2",4,"ngFor","ngForOf"],[1,"badge","badge-dark","ml-2"],[1,"text-center"],"Number of devices: " + "\ufffd0\ufffd" + ". Raw capacity: " + "\ufffd1\ufffd" + "."]},template:function(e,t){1&e&&(i.Sb(0,"cd-modal",0),i.Qb(1,1),i.Wb(2,2),i.Pb(),i.Qb(3,3),i.Sb(4,"form",4,5),i.Sb(6,"div",6),i.Mc(7,Sa,4,2,"cd-alert-panel",7),i.Sb(8,"cd-inventory-devices",8,9),i.gc("filterChange",(function(e){return t.onFilterChange(e)})),i.Rb(),i.Mc(10,Ma,5,4,"div",10),i.Rb(),i.Sb(11,"div",11),i.Sb(12,"cd-form-button-panel",12),i.gc("submitActionEvent",(function(){return t.onSubmit()})),i.jc(13,"titlecase"),i.Rb(),i.Rb(),i.Rb(),i.Pb(),i.Rb()),2&e&&(i.pc("modalRef",t.activeModal),i.yb(2),i.ac(t.deviceType),i.Xb(2),i.yb(2),i.pc("formGroup",t.formGroup),i.yb(3),i.pc("ngIf",!t.canSubmit),i.yb(1),i.pc("devices",t.devices)("filterColumns",t.filterColumns)("hiddenColumns",i.tc(13,ka)),i.yb(2),i.pc("ngIf",t.canSubmit),i.yb(2),i.pc("form",t.formGroup)("disabled",!t.canSubmit||0===t.filteredDevices.length)("submitText",i.kc(13,11,t.action)))},directives:[_a.a,kn.C,kn.r,Zn.a,kn.k,wt.r,Er,ti.a,pr.a,wt.q],pipes:[wt.A,Zt.a],styles:[""]}),e})();function Da(e,t){1&e&&(i.Sb(0,"span"),i.Wb(1,7),i.Rb())}function Ta(e,t){1&e&&(i.Sb(0,"span"),i.Wb(1,8),i.Rb())}function Ca(e,t){1&e&&(i.Sb(0,"span"),i.Wb(1,9),i.Rb())}const Oa=function(e){return[e]};function La(e,t){if(1&e){const e=i.Tb();i.Qb(0),i.Sb(1,"button",10),i.gc("click",(function(){return i.Dc(e),i.ic().showSelectionModal()})),i.Nb(2,"i",11),i.Qb(3),i.Wb(4,12),i.Pb(),i.Rb(),i.Pb()}if(2&e){const e=i.ic();i.yb(1),i.pc("title",e.addButtonTooltip)("disabled",0===e.availDevices.length||!e.canSelect),i.yb(1),i.pc("ngClass",i.uc(3,Oa,e.icons.add))}}function Ra(e,t){if(1&e&&(i.Sb(0,"span"),i.Sb(1,"span",19),i.Oc(2),i.Rb(),i.Rb()),2&e){const e=t.$implicit;i.yb(2),i.Rc("",e.name,": ",e.value.formatted,"")}}function Ea(e,t){if(1&e&&(i.Sb(0,"div",20),i.Sb(1,"span"),i.Wb(2,21),i.jc(3,"dimlessBinary"),i.Rb(),i.Rb()),2&e){const e=i.ic(2);i.yb(3),i.ac(i.kc(3,1,e.capacity)),i.Xb(2)}}const Aa=function(){return["available","osd_ids"]},Ia=function(){return[]};function Pa(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",13),i.Mc(1,Ra,3,2,"span",14),i.Sb(2,"a",15),i.gc("click",(function(){return i.Dc(e),i.ic().clearDevices(),!1})),i.Nb(3,"i",11),i.Qb(4),i.Wb(5,16),i.Pb(),i.Rb(),i.Rb(),i.Sb(6,"div"),i.Nb(7,"cd-inventory-devices",17),i.Rb(),i.Mc(8,Ea,4,3,"div",18)}if(2&e){const e=i.ic();i.yb(1),i.pc("ngForOf",e.appliedFilters),i.yb(2),i.pc("ngClass",i.uc(6,Oa,e.icons.clearFilters)),i.yb(4),i.pc("devices",e.devices)("hiddenColumns",i.tc(8,Aa))("filterColumns",i.tc(9,Ia)),i.yb(1),i.pc("ngIf","data"===e.type)}}let Na=(()=>{class e{constructor(e){this.modalService=e,this.selected=new i.o,this.cleared=new i.o,this.icons=_n.a,this.devices=[],this.capacity=0,this.appliedFilters=[],this.tooltips={noAvailDevices:"No available devices",addPrimaryFirst:"Please add primary devices first",addByFilters:"Add devices by using filters"}}ngOnInit(){this.updateAddButtonTooltip()}ngOnChanges(){this.updateAddButtonTooltip()}showSelectionModal(){let e=["human_readable_type","sys_api.vendor","sys_api.model","sys_api.size"];"data"===this.type&&(e=["hostname",...e]),this.modalService.show(xa,{hostname:this.hostname,deviceType:this.name,devices:this.availDevices,filterColumns:e},{size:"xl"}).componentInstance.submitAction.subscribe(e=>{this.devices=e.data,this.capacity=jt.a.sumBy(this.devices,"sys_api.size"),this.appliedFilters=e.filters;const t=jt.a.assign({type:this.type},e);this.selected.emit(t)})}updateAddButtonTooltip(){this.addButtonTooltip="data"===this.type&&0===this.availDevices.length?this.tooltips.noAvailDevices:this.canSelect?0===this.availDevices.length?this.tooltips.noAvailDevices:this.tooltips.addByFilters:this.tooltips.addPrimaryFirst}clearDevices(){const e={type:this.type,clearedDevices:[...this.devices]};this.devices=[],this.cleared.emit(e)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(vn.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-osd-devices-selection-groups"]],inputs:{type:"type",name:"name",hostname:"hostname",availDevices:"availDevices",canSelect:"canSelect"},outputs:{selected:"selected",cleared:"cleared"},features:[i.wb],decls:12,vars:6,consts:function(){return[[1,"form-group","row"],["for","createDeleteButton",1,"cd-col-form-label"],"" + "\ufffd0\ufffd" + " devices",[4,"ngIf"],[1,"cd-col-form-input"],[4,"ngIf","ngIfElse"],["blockClearDevices",""],"The primary storage devices. These devices contain all OSD data.","Write-Ahead-Log devices. These devices are used for BlueStore\u2019s internal journal. It is only useful to use a WAL device if the device is faster than the primary device (e.g. NVME devices or SSDs). If there is only a small amount of fast storage available (e.g., less than a gigabyte), we recommend using it as a WAL device.","DB devices can be used for storing BlueStore\u2019s internal metadata. It is only helpful to provision a DB device if it is faster than the primary device (e.g. NVME devices or SSD).",["type","button","data-toggle","tooltip",1,"btn","btn-light",3,"title","disabled","click"],[3,"ngClass"],"Add",[1,"pb-2","my-2","border-bottom"],[4,"ngFor","ngForOf"],["href","",1,"tc_clearSelections",3,"click"],"Clear",[3,"devices","hiddenColumns","filterColumns"],["class","float-right",4,"ngIf"],[1,"badge","badge-dark","mr-2"],[1,"float-right"],"Raw capacity: " + "\ufffd0\ufffd" + ""]},template:function(e,t){if(1&e&&(i.Sb(0,"div",0),i.Sb(1,"label",1),i.Qb(2),i.Wb(3,2),i.Pb(),i.Sb(4,"cd-helper"),i.Mc(5,Da,2,0,"span",3),i.Mc(6,Ta,2,0,"span",3),i.Mc(7,Ca,2,0,"span",3),i.Rb(),i.Rb(),i.Sb(8,"div",4),i.Mc(9,La,5,5,"ng-container",5),i.Mc(10,Pa,9,10,"ng-template",null,6,i.Nc),i.Rb(),i.Rb()),2&e){const e=i.Ac(11);i.yb(3),i.ac(t.name),i.Xb(3),i.yb(2),i.pc("ngIf","data"===t.type),i.yb(1),i.pc("ngIf","wal"===t.type),i.yb(1),i.pc("ngIf","db"===t.type),i.yb(2),i.pc("ngIf",0===t.devices.length)("ngIfElse",e)}},directives:[Xn.a,Mo.a,wt.r,On.a,wt.p,wt.q,Er],pipes:[Zt.a],styles:[".tc_clearSelections[_ngcontent-%COMP%]{text-decoration:none}"]}),e})();var ja=n("aXbf");class Fa{constructor(){this.reset(),this.formatterService=new ja.a,this.deviceSelectionAttrs={"sys_api.vendor":{name:"vendor"},"sys_api.model":{name:"model"},device_id:{name:"device_id"},human_readable_type:{name:"rotational",formatter:e=>"hdd"===e.toLowerCase()},"sys_api.size":{name:"size",formatter:e=>this.formatterService.format_number(e,1024,["B","KB","MB","GB","TB","PB"]).replace(" ","")}}}reset(){this.spec={service_type:"osd",service_id:"dashboard-"+jt.a.now()}}setName(e){this.spec.service_id=e}setHostPattern(e){this.spec.host_pattern=e}setDeviceSelection(e,t){const n=e+"_devices";this.spec[n]={},t.forEach(e=>{const t=this.deviceSelectionAttrs[e.prop];t&&(this.spec[n][t.name]=t.formatter?t.formatter(e.value.raw):e.value.raw)})}clearDeviceSelection(e){delete this.spec[e+"_devices"]}setSlots(e,t){const n=e+"_slots";0===t?delete this.spec[n]:this.spec[n]=t}setFeature(e,t){t?this.spec[e]=!0:delete this.spec[e]}}const Ya=["dataDeviceSelectionGroups"],za=["walDeviceSelectionGroups"],$a=["dbDeviceSelectionGroups"],Ha=["previewButtonPanel"];function Wa(e,t){1&e&&i.Nb(0,"cd-orchestrator-doc-panel")}function Va(e,t){1&e&&(i.Sb(0,"span",33),i.Wb(1,34),i.Rb())}function Ba(e,t){if(1&e&&(i.Sb(0,"div",26),i.Sb(1,"label",27),i.Qb(2),i.Wb(3,28),i.Pb(),i.Sb(4,"cd-helper"),i.Sb(5,"span"),i.Wb(6,29),i.Rb(),i.Nb(7,"br"),i.Sb(8,"span"),i.Wb(9,30),i.Rb(),i.Rb(),i.Rb(),i.Sb(10,"div",21),i.Nb(11,"input",31),i.Mc(12,Va,2,0,"span",32),i.Rb(),i.Rb()),2&e){i.ic();const e=i.Ac(2),t=i.ic();i.yb(12),i.pc("ngIf",t.form.showError("walSlots",e,"min"))}}function Ua(e,t){1&e&&(i.Sb(0,"span",33),i.Wb(1,40),i.Rb())}function Ga(e,t){if(1&e&&(i.Sb(0,"div",26),i.Sb(1,"label",35),i.Qb(2),i.Wb(3,36),i.Pb(),i.Sb(4,"cd-helper"),i.Sb(5,"span"),i.Wb(6,37),i.Rb(),i.Nb(7,"br"),i.Sb(8,"span"),i.Wb(9,38),i.Rb(),i.Rb(),i.Rb(),i.Sb(10,"div",21),i.Nb(11,"input",39),i.Mc(12,Ua,2,0,"span",32),i.Rb(),i.Rb()),2&e){i.ic();const e=i.Ac(2),t=i.ic();i.yb(12),i.pc("ngIf",t.form.showError("dbSlots",e,"min"))}}function qa(e,t){if(1&e&&(i.Sb(0,"div",41),i.Nb(1,"input",42),i.Sb(2,"label",43),i.Oc(3),i.Rb(),i.Rb()),2&e){const e=t.$implicit;i.yb(1),i.qc("id",e.key),i.qc("name",e.key),i.qc("formControlName",e.key),i.yb(1),i.qc("for",e.key),i.yb(1),i.Pc(e.desc)}}function Ja(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",2),i.Sb(1,"form",3,4),i.Sb(3,"div",5),i.Sb(4,"div",6),i.Wb(5,7),i.jc(6,"titlecase"),i.jc(7,"upperFirst"),i.Rb(),i.Sb(8,"div",8),i.Sb(9,"fieldset"),i.Sb(10,"cd-osd-devices-selection-groups",9,10),i.gc("selected",(function(t){return i.Dc(e),i.ic().onDevicesSelected(t)}))("cleared",(function(t){return i.Dc(e),i.ic().onDevicesCleared(t)})),i.Rb(),i.Rb(),i.Sb(12,"fieldset"),i.Sb(13,"legend"),i.Wb(14,11),i.Rb(),i.Sb(15,"cd-osd-devices-selection-groups",12,13),i.gc("selected",(function(t){return i.Dc(e),i.ic().onDevicesSelected(t)}))("cleared",(function(t){return i.Dc(e),i.ic().onDevicesCleared(t)})),i.Rb(),i.Mc(17,Ba,13,1,"div",14),i.Sb(18,"cd-osd-devices-selection-groups",15,16),i.gc("selected",(function(t){return i.Dc(e),i.ic().onDevicesSelected(t)}))("cleared",(function(t){return i.Dc(e),i.ic().onDevicesCleared(t)})),i.Rb(),i.Mc(20,Ga,13,1,"div",14),i.Rb(),i.Sb(21,"fieldset"),i.Sb(22,"legend"),i.Wb(23,17),i.Rb(),i.Sb(24,"div",18),i.Sb(25,"label",19),i.Wb(26,20),i.Rb(),i.Sb(27,"div",21),i.Mc(28,qa,4,5,"div",22),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Sb(29,"div",23),i.Sb(30,"cd-form-button-panel",24,25),i.gc("submitActionEvent",(function(){return i.Dc(e),i.ic().submit()})),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.Ac(11),t=i.Ac(16),n=i.Ac(19),r=i.ic();i.yb(1),i.pc("formGroup",r.form),i.yb(6),i.ac(i.kc(6,15,r.action))(i.kc(7,17,r.resource)),i.Xb(5),i.yb(3),i.pc("availDevices",r.availDevices)("canSelect",0!==r.availDevices.length),i.yb(5),i.pc("availDevices",r.availDevices)("canSelect",0!==e.devices.length),i.yb(2),i.pc("ngIf",0!==t.devices.length),i.yb(1),i.pc("availDevices",r.availDevices)("canSelect",0!==e.devices.length),i.yb(2),i.pc("ngIf",0!==n.devices.length),i.yb(8),i.pc("ngForOf",r.featureList),i.yb(2),i.pc("form",r.form)("disabled",0===e.devices.length)("submitText",r.actionLabels.PREVIEW)}}let Qa=(()=>{class e extends qn.a{constructor(e,t,n,i,r,s){super(),this.actionLabels=e,this.authStorageService=t,this.orchService=n,this.hostService=i,this.router=r,this.modalService=s,this.icons=_n.a,this.columns=[],this.allDevices=[],this.availDevices=[],this.dataDeviceFilters=[],this.dbDeviceFilters=[],this.walDeviceFilters=[],this.hostname="",this.driveGroup=new Fa,this.featureList=[],this.hasOrchestrator=!0,this.resource="OSDs",this.action=this.actionLabels.CREATE,this.features={encrypted:{key:"encrypted",desc:"Encryption"}},this.featureList=jt.a.map(this.features,(e,t)=>Object.assign(e,{key:t})),this.createForm()}ngOnInit(){this.orchService.status().subscribe(e=>{this.hasOrchestrator=e.available,e.available?this.getDataDevices():this.loadingNone()}),this.form.get("walSlots").valueChanges.subscribe(e=>this.setSlots("wal",e)),this.form.get("dbSlots").valueChanges.subscribe(e=>this.setSlots("db",e)),jt.a.each(this.features,e=>{this.form.get("features").get(e.key).valueChanges.subscribe(t=>this.featureFormUpdate(e.key,t))})}createForm(){this.form=new Jn.a({walSlots:new kn.h(0,{validators:[kn.A.min(0)]}),dbSlots:new kn.h(0,{validators:[kn.A.min(0)]}),features:new Jn.a(this.featureList.reduce((e,t)=>(e[t.key]=new kn.h({value:!1,disabled:!0}),e),{}))})}getDataDevices(){this.hostService.inventoryDeviceList().subscribe(e=>{this.allDevices=jt.a.filter(e,"available"),this.availDevices=[...this.allDevices],this.loadingReady()},()=>{this.allDevices=[],this.availDevices=[],this.loadingError()})}setSlots(e,t){"number"==typeof t&&t>=0&&this.driveGroup.setSlots(e,t)}featureFormUpdate(e,t){this.driveGroup.setFeature(e,t)}enableFeatures(){this.featureList.forEach(e=>{this.form.get(e.key).enable({emitEvent:!1})})}disableFeatures(){this.featureList.forEach(e=>{const t=this.form.get(e.key);t.disable({emitEvent:!1}),t.setValue(!1,{emitEvent:!1})})}onDevicesSelected(e){if(this.availDevices=e.dataOut,"data"===e.type){const t=jt.a.find(e.filters,{prop:"hostname"});t?(this.hostname=t.value.raw,this.availDevices=e.dataOut.filter(e=>e.hostname===this.hostname),this.driveGroup.setHostPattern(this.hostname)):this.driveGroup.setHostPattern("*"),this.enableFeatures()}this.driveGroup.setDeviceSelection(e.type,e.filters)}onDevicesCleared(e){"data"===e.type?(this.availDevices=[...this.allDevices],this.walDeviceSelectionGroups.devices=[],this.dbDeviceSelectionGroups.devices=[],this.disableFeatures(),this.driveGroup.reset(),this.form.get("walSlots").setValue(0,{emitEvent:!1}),this.form.get("dbSlots").setValue(0,{emitEvent:!1})):(this.availDevices=[...this.availDevices,...e.clearedDevices],this.driveGroup.clearDeviceSelection(e.type),this.form.get(e.type+"Slots").setValue(0,{emitEvent:!1}))}submit(){const e=this.authStorageService.getUsername();this.driveGroup.setName(`dashboard-${e}-${jt.a.now()}`),this.modalService.show(ya,{driveGroups:[this.driveGroup.spec]}).componentInstance.submitAction.subscribe(()=>{this.router.navigate(["/osd"])}),this.previewButtonPanel.submitButton.loading=!1}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(gn.b),i.Mb(Jt.a),i.Mb(cr),i.Mb(Xi),i.Mb(Pt.e),i.Mb(vn.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-osd-form"]],viewQuery:function(e,t){var n;1&e&&(i.Tc(Ya,!0),i.Tc(za,!0),i.Tc($a,!0),i.Tc(Ha,!0)),2&e&&(i.zc(n=i.hc())&&(t.dataDeviceSelectionGroups=n.first),i.zc(n=i.hc())&&(t.walDeviceSelectionGroups=n.first),i.zc(n=i.hc())&&(t.dbDeviceSelectionGroups=n.first),i.zc(n=i.hc())&&(t.previewButtonPanel=n.first))},features:[i.vb],decls:2,vars:2,consts:function(){return[[4,"ngIf"],["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],["name","form","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"card"],[1,"card-header"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"card-body"],["name","Primary","type","data",3,"availDevices","canSelect","selected","cleared"],["dataDeviceSelectionGroups",""],"Shared devices",["name","WAL","type","wal",3,"availDevices","canSelect","selected","cleared"],["walDeviceSelectionGroups",""],["class","form-group row",4,"ngIf"],["name","DB","type","db",3,"availDevices","canSelect","selected","cleared"],["dbDeviceSelectionGroups",""],"Configuration",["formGroupName","features",1,"form-group","row"],["for","features",1,"cd-col-form-label"],"Features",[1,"cd-col-form-input"],["class","custom-control custom-checkbox",4,"ngFor","ngForOf"],[1,"card-footer"],["wrappingClass","text-right",3,"form","disabled","submitText","submitActionEvent"],["previewButtonPanel",""],[1,"form-group","row"],["for","walSlots",1,"cd-col-form-label"],"WAL slots","How many OSDs per WAL device.","Specify 0 to let Orchestrator backend decide it.",["id","walSlots","name","walSlots","type","number","min","0","formControlName","walSlots",1,"form-control"],["class","invalid-feedback",4,"ngIf"],[1,"invalid-feedback"],"Value should be greater than or equal to 0",["for","dbSlots",1,"cd-col-form-label"],"DB slots","How many OSDs per DB device.","Specify 0 to let Orchestrator backend decide it.",["id","dbSlots","name","dbSlots","type","number","min","0","formControlName","dbSlots",1,"form-control"],"Value should be greater than or equal to 0",[1,"custom-control","custom-checkbox"],["type","checkbox",1,"custom-control-input",3,"id","name","formControlName"],[1,"custom-control-label",3,"for"]]},template:function(e,t){1&e&&(i.Mc(0,Wa,1,0,"cd-orchestrator-doc-panel",0),i.Mc(1,Ja,32,19,"div",1)),2&e&&(i.pc("ngIf",!t.hasOrchestrator),i.yb(1),i.pc("cdFormLoading",t.loading))},directives:[wt.r,Kn.a,Rr,kn.C,kn.r,Zn.a,kn.k,Na,Xn.a,kn.l,wt.q,ti.a,Mo.a,On.a,kn.v,kn.d,ei.a,kn.q,kn.i,kn.b],pipes:[wt.A,ir.a],styles:[""]}),e})();function Ka(e,t){if(1&e&&(i.Sb(0,"span",18),i.Wb(1,19),i.Rb()),2&e){const e=i.ic(2);i.pc("ngbTooltip",e.clusterWideTooltip)}}function Za(e,t){1&e&&i.Nb(0,"hr",20)}function Xa(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",12),i.Sb(1,"input",13),i.gc("change",(function(){i.Dc(e);const n=t.$implicit;return i.ic().changeValue(n)})),i.Rb(),i.Sb(2,"label",14),i.Sb(3,"strong"),i.Oc(4),i.Rb(),i.Mc(5,Ka,2,1,"span",15),i.Nb(6,"br"),i.Sb(7,"span",16),i.Oc(8),i.Rb(),i.Rb(),i.Mc(9,Za,1,0,"hr",17),i.Rb()}if(2&e){const e=t.$implicit,n=t.last;i.yb(1),i.pc("checked",e.value)("indeterminate",e.indeterminate)("name",e.code)("id",e.code),i.yb(1),i.pc("for",e.code),i.yb(2),i.Pc(e.name),i.yb(1),i.pc("ngIf",e.clusterWide),i.yb(3),i.Pc(e.description),i.yb(1),i.pc("ngIf",!n)}}let ec=(()=>{class e{constructor(e,t,n,i,r){this.activeModal=e,this.actionLabels=t,this.authStorageService=n,this.osdService=i,this.notificationService=r,this.initialSelection=[],this.osdFlagsForm=new kn.j({}),this.flags=[{code:"noup",name:"No Up",description:"OSDs are not allowed to start",value:!1,clusterWide:!1,indeterminate:!1},{code:"nodown",name:"No Down",description:"OSD failure reports are being ignored, such that the monitors will not mark OSDs down",value:!1,clusterWide:!1,indeterminate:!1},{code:"noin",name:"No In",description:"OSDs that were previously marked out will not be marked back in when they start",value:!1,clusterWide:!1,indeterminate:!1},{code:"noout",name:"No Out",description:"OSDs will not automatically be marked out after the configured interval",value:!1,clusterWide:!1,indeterminate:!1}],this.clusterWideTooltip="The flag has been enabled for the entire cluster.",this.permissions=this.authStorageService.getPermissions()}ngOnInit(){const e=this.selected.length;this.osdService.getFlags().subscribe(t=>{const n=this.getActivatedIndivFlags();this.flags.forEach(i=>{const r=n[i.code];t.includes(i.code)&&(i.clusterWide=!0),r===e?i.value=!0:r>0&&(i.indeterminate=!0)}),this.initialSelection=jt.a.cloneDeep(this.flags)})}getActivatedIndivFlags(){const e={};return this.flags.forEach(t=>{e[t.code]=0}),[].concat(...this.selected.map(e=>e.state)).map(t=>{Object.keys(e).includes(t)&&(e[t]=e[t]+1)}),e}changeValue(e){e.value=!e.value,e.indeterminate=!1}resetSelection(){this.flags=jt.a.cloneDeep(this.initialSelection)}submitAction(){const e={};this.flags.forEach(t=>{e[t.code]=t.indeterminate?null:t.value});const t=this.selected.map(e=>e.osd);this.osdService.updateIndividualFlags(e,t).subscribe(()=>{this.notificationService.show(yn.a.success,"Updated OSD Flags"),this.activeModal.close()},()=>{this.activeModal.close()})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Qt.a),i.Mb(gn.b),i.Mb(Jt.a),i.Mb(fr),i.Mb(wn.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-osd-flags-indiv-modal"]],decls:12,vars:6,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"Individual OSD Flags",[1,"modal-content"],["name","osdFlagsForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"modal-body","osd-modal"],["class","custom-control custom-checkbox",4,"ngFor","ngForOf"],[1,"modal-footer"],["type","button",1,"btn","btn-light",3,"click"],"Restore previous selection",[3,"form","showSubmit","submitText","submitActionEvent"],[1,"custom-control","custom-checkbox"],["type","checkbox",1,"custom-control-input",3,"checked","indeterminate","name","id","change"],["ng-class","['tc_' + key]",1,"custom-control-label",3,"for"],["class","badge badge-hdd ml-2",3,"ngbTooltip",4,"ngIf"],[1,"form-text","text-muted"],["class","m-1",4,"ngIf"],[1,"badge","badge-hdd","ml-2",3,"ngbTooltip"],"Cluster-wide",[1,"m-1"]]},template:function(e,t){1&e&&(i.Sb(0,"cd-modal",0),i.Qb(1,1),i.Wb(2,2),i.Pb(),i.Qb(3,3),i.Sb(4,"form",4,5),i.Sb(6,"div",6),i.Mc(7,Xa,10,9,"div",7),i.Rb(),i.Sb(8,"div",8),i.Sb(9,"button",9),i.gc("click",(function(){return t.resetSelection()})),i.Wb(10,10),i.Rb(),i.Sb(11,"cd-form-button-panel",11),i.gc("submitActionEvent",(function(){return t.submitAction()})),i.Rb(),i.Rb(),i.Rb(),i.Pb(),i.Rb()),2&e&&(i.pc("modalRef",t.activeModal),i.yb(4),i.pc("formGroup",t.osdFlagsForm),i.yb(3),i.pc("ngForOf",t.flags),i.yb(4),i.pc("form",t.osdFlagsForm)("showSubmit",t.permissions.osd.update)("submitText",t.actionLabels.UPDATE))},directives:[_a.a,kn.C,kn.r,Zn.a,kn.k,wt.q,On.a,ti.a,ei.a,wt.r,Qt.D],styles:[""]}),e})();var tc=n("f/UV");function nc(e,t){1&e&&i.Nb(0,"hr",15)}function ic(e,t){if(1&e&&(i.Sb(0,"div",10),i.Sb(1,"input",11),i.gc("change",(function(){const e=t.$implicit;return e.value=!e.value})),i.Rb(),i.Sb(2,"label",12),i.Sb(3,"strong"),i.Oc(4),i.Rb(),i.Nb(5,"br"),i.Sb(6,"span",13),i.Oc(7),i.Rb(),i.Rb(),i.Mc(8,nc,1,0,"hr",14),i.Rb()),2&e){const e=t.$implicit,n=t.last;i.yb(1),i.pc("checked",e.value)("name",e.code)("id",e.code)("disabled",e.disabled),i.yb(1),i.pc("for",e.code),i.yb(2),i.Pc(e.name),i.yb(3),i.Pc(e.description),i.yb(1),i.pc("ngIf",!n)}}let rc=(()=>{class e{constructor(e,t,n,i,r){this.activeModal=e,this.actionLabels=t,this.authStorageService=n,this.osdService=i,this.notificationService=r,this.osdFlagsForm=new kn.j({}),this.allFlags={noin:{code:"noin",name:"No In",value:!1,description:"OSDs that were previously marked out will not be marked back in when they start"},noout:{code:"noout",name:"No Out",value:!1,description:"OSDs will not automatically be marked out after the configured interval"},noup:{code:"noup",name:"No Up",value:!1,description:"OSDs are not allowed to start"},nodown:{code:"nodown",name:"No Down",value:!1,description:"OSD failure reports are being ignored, such that the monitors will not mark OSDs down"},pause:{code:"pause",name:"Pause",value:!1,description:"Pauses reads and writes"},noscrub:{code:"noscrub",name:"No Scrub",value:!1,description:"Scrubbing is disabled"},"nodeep-scrub":{code:"nodeep-scrub",name:"No Deep Scrub",value:!1,description:"Deep Scrubbing is disabled"},nobackfill:{code:"nobackfill",name:"No Backfill",value:!1,description:"Backfilling of PGs is suspended"},norebalance:{code:"norebalance",name:"No Rebalance",value:!1,description:"OSD will choose not to backfill unless PG is also degraded"},norecover:{code:"norecover",name:"No Recover",value:!1,description:"Recovery of PGs is suspended"},sortbitwise:{code:"sortbitwise",name:"Bitwise Sort",value:!1,description:"Use bitwise sort",disabled:!0},purged_snapdirs:{code:"purged_snapdirs",name:"Purged Snapdirs",value:!1,description:"OSDs have converted snapsets",disabled:!0},recovery_deletes:{code:"recovery_deletes",name:"Recovery Deletes",value:!1,description:"Deletes performed during recovery instead of peering",disabled:!0},pglog_hardlimit:{code:"pglog_hardlimit",name:"PG Log Hard Limit",value:!1,description:"Puts a hard limit on pg log length",disabled:!0}},this.unknownFlags=[],this.permissions=this.authStorageService.getPermissions()}ngOnInit(){this.osdService.getFlags().subscribe(e=>{e.forEach(e=>{this.allFlags[e]?this.allFlags[e].value=!0:this.unknownFlags.push(e)}),this.flags=jt.a.toArray(this.allFlags)})}submitAction(){const e=this.flags.filter(e=>e.value).map(e=>e.code).concat(this.unknownFlags);this.osdService.updateFlags(e).subscribe(()=>{this.notificationService.show(yn.a.success,"Updated OSD Flags"),this.activeModal.close()},()=>{this.activeModal.close()})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Qt.a),i.Mb(gn.b),i.Mb(Jt.a),i.Mb(fr),i.Mb(wn.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-osd-flags-modal"]],decls:10,vars:6,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"Cluster-wide OSD Flags",[1,"modal-content"],["name","osdFlagsForm","novalidate","","cdFormScope","osd",3,"formGroup"],["formDir","ngForm"],[1,"modal-body","osd-modal"],["class","custom-control custom-checkbox",4,"ngFor","ngForOf"],[1,"modal-footer"],[3,"form","showSubmit","submitText","submitActionEvent"],[1,"custom-control","custom-checkbox"],["type","checkbox",1,"custom-control-input",3,"checked","name","id","disabled","change"],["ng-class","['tc_' + key]",1,"custom-control-label",3,"for"],[1,"form-text","text-muted"],["class","m-1",4,"ngIf"],[1,"m-1"]]},template:function(e,t){1&e&&(i.Sb(0,"cd-modal",0),i.Qb(1,1),i.Wb(2,2),i.Pb(),i.Qb(3,3),i.Sb(4,"form",4,5),i.Sb(6,"div",6),i.Mc(7,ic,9,8,"div",7),i.Rb(),i.Sb(8,"div",8),i.Sb(9,"cd-form-button-panel",9),i.gc("submitActionEvent",(function(){return t.submitAction()})),i.Rb(),i.Rb(),i.Rb(),i.Pb(),i.Rb()),2&e&&(i.pc("modalRef",t.activeModal),i.yb(4),i.pc("formGroup",t.osdFlagsForm),i.yb(3),i.pc("ngForOf",t.flags),i.yb(2),i.pc("form",t.osdFlagsForm)("showSubmit",t.permissions.osd.update)("submitText",t.actionLabels.UPDATE))},directives:[_a.a,kn.C,kn.r,tc.a,Zn.a,kn.k,wt.q,ti.a,On.a,ei.a,wt.r],styles:[""]}),e})();function sc(e,t){if(1&e&&(i.Sb(0,"cd-helper"),i.Oc(1),i.Rb()),2&e){const e=i.ic(2).$implicit;i.yb(1),i.Qc(" ",e.long_desc,"")}}function oc(e,t){if(1&e&&(i.Sb(0,"div",4),i.Sb(1,"label",5),i.Sb(2,"b"),i.Oc(3),i.Rb(),i.Nb(4,"br"),i.Sb(5,"span",6),i.Oc(6),i.Mc(7,sc,2,1,"cd-helper",7),i.Rb(),i.Rb(),i.Sb(8,"div",8),i.Sb(9,"div",9),i.Nb(10,"input",10),i.Nb(11,"label",11),i.Rb(),i.Rb(),i.Rb()),2&e){const e=i.ic().$implicit;i.yb(1),i.pc("for",e.name),i.yb(2),i.Pc(e.text),i.yb(3),i.Qc(" ",e.desc," "),i.yb(1),i.pc("ngIf",e.long_desc),i.yb(3),i.pc("id",e.name)("formControlName",e.name),i.yb(1),i.pc("for",e.name)}}function ac(e,t){if(1&e&&(i.Sb(0,"cd-helper"),i.Oc(1),i.Rb()),2&e){const e=i.ic(2).$implicit;i.yb(1),i.Qc(" ",e.long_desc,"")}}const cc=function(e){return[e]};function lc(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",16),i.Sb(1,"button",17),i.Yb(2,18),i.gc("click",(function(){i.Dc(e);const t=i.ic(2).$implicit;return i.ic().resetValue(t.name)})),i.Nb(3,"i",19),i.Rb(),i.Rb()}if(2&e){const e=i.ic(3);i.yb(3),i.pc("ngClass",i.uc(1,cc,e.icons.erase))}}function uc(e,t){if(1&e&&(i.Sb(0,"span",20),i.Oc(1),i.Rb()),2&e){const e=i.ic(2).$implicit;i.yb(1),i.Qc(" ",e.additionalTypeInfo.patternHelpText,"")}}function dc(e,t){if(1&e&&(i.Sb(0,"span",20),i.Oc(1),i.Rb()),2&e){const e=i.ic(2).$implicit;i.yb(1),i.Qc(" ",e.additionalTypeInfo.patternHelpText,"")}}function hc(e,t){if(1&e&&(i.Sb(0,"span",20),i.Wb(1,21),i.Rb()),2&e){const e=i.ic(2).$implicit;i.yb(1),i.ac(e.maxValue),i.Xb(1)}}function fc(e,t){if(1&e&&(i.Sb(0,"span",20),i.Wb(1,22),i.Rb()),2&e){const e=i.ic(2).$implicit;i.yb(1),i.ac(e.minValue),i.Xb(1)}}function pc(e,t){if(1&e&&(i.Sb(0,"div",4),i.Sb(1,"label",5),i.Oc(2),i.Nb(3,"br"),i.Sb(4,"span",6),i.Oc(5),i.Mc(6,ac,2,1,"cd-helper",7),i.Rb(),i.Rb(),i.Sb(7,"div",8),i.Sb(8,"div",12),i.Nb(9,"input",13),i.Mc(10,lc,4,3,"div",14),i.Rb(),i.Mc(11,uc,2,1,"span",15),i.Mc(12,dc,2,1,"span",15),i.Mc(13,hc,2,1,"span",15),i.Mc(14,fc,2,1,"span",15),i.Rb(),i.Rb()),2&e){const e=i.ic().$implicit,t=i.ic();i.yb(1),i.pc("for",e.name),i.yb(1),i.Qc("",e.text," "),i.yb(3),i.Qc(" ",e.desc," "),i.yb(1),i.pc("ngIf",e.long_desc),i.yb(3),i.pc("type",e.additionalTypeInfo.inputType)("id",e.name)("placeholder",e.additionalTypeInfo.humanReadable)("formControlName",e.name)("step",t.getStep(e.type,t.optionsForm.getValue(e.name))),i.yb(1),i.pc("ngIf",t.optionsFormShowReset),i.yb(1),i.pc("ngIf",t.optionsForm.showError(e.name,t.optionsFormDir,"pattern")),i.yb(1),i.pc("ngIf",t.optionsForm.showError(e.name,t.optionsFormDir,"invalidUuid")),i.yb(1),i.pc("ngIf",t.optionsForm.showError(e.name,t.optionsFormDir,"max")),i.yb(1),i.pc("ngIf",t.optionsForm.showError(e.name,t.optionsFormDir,"min"))}}function mc(e,t){1&e&&i.Nb(0,"hr",23)}function bc(e,t){if(1&e&&(i.Sb(0,"div"),i.Mc(1,oc,12,7,"div",2),i.Mc(2,pc,15,14,"div",2),i.Mc(3,mc,1,0,"hr",3),i.Rb()),2&e){const e=t.$implicit,n=t.last;i.yb(1),i.pc("ngIf","bool"===e.type),i.yb(1),i.pc("ngIf","bool"!==e.type),i.yb(1),i.pc("ngIf",!n)}}let gc=(()=>{class e{constructor(e){this.configService=e,this.optionNames=[],this.optionsForm=new Jn.a({}),this.optionsFormDir=new kn.s([],[]),this.optionsFormGroupName="",this.optionsFormShowReset=!0,this.icons=_n.a,this.options=[],this.optionsFormGroup=new Jn.a({})}static optionNameToText(e){const t=["mon","mgr","osd","mds","client"];return e.split("_").filter((e,n)=>0!==n||!t.includes(e)).map(e=>e.charAt(0).toUpperCase()+e.substring(1)).join(" ")}ngOnInit(){this.createForm(),this.loadStoredData()}createForm(){this.optionsForm.addControl(this.optionsFormGroupName,this.optionsFormGroup),this.optionNames.forEach(e=>{this.optionsFormGroup.addControl(e,new kn.h(null))})}getStep(e,t){return Gn.getTypeStep(e,t)}loadStoredData(){this.configService.filter(this.optionNames).subscribe(t=>{this.options=t.map(t=>{const n=this.optionsForm.get(t.name),i=Gn.getTypeValidators(t);return t.additionalTypeInfo=Gn.getType(t.type),t.text=e.optionNameToText(t.name),t.value=jt.a.find(t.value,e=>"osd"===e.section),t.value&&n.setValue("bool"===t.additionalTypeInfo.name?"true"===t.value.value:t.value.value),i&&(t.patternHelpText=i.patternHelpText,"max"in i&&""!==i.max&&(t.maxValue=i.max),"min"in i&&""!==i.min&&(t.minValue=i.min),n.setValidators(i.validators)),t})})}saveValues(){const e={};return this.optionNames.forEach(t=>{const n=this.optionsForm.getValue(t);null!==n&&""!==n&&(e[t]={section:"osd",value:n})}),this.configService.bulkCreate({options:e})}resetValue(e){this.configService.delete(e,"osd").subscribe(()=>{this.optionsForm.get(e).reset()})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Un.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-config-option"]],inputs:{optionNames:"optionNames",optionsForm:"optionsForm",optionsFormDir:"optionsFormDir",optionsFormGroupName:"optionsFormGroupName",optionsFormShowReset:"optionsFormShowReset"},decls:2,vars:2,consts:function(){return[[3,"formGroup"],[4,"ngFor","ngForOf"],["class","form-group row pt-2",4,"ngIf"],["class","my-2",4,"ngIf"],[1,"form-group","row","pt-2"],[1,"cd-col-form-label",3,"for"],[1,"text-muted"],[4,"ngIf"],[1,"cd-col-form-input"],[1,"custom-control","custom-checkbox"],["type","checkbox",1,"custom-control-input",3,"id","formControlName"],[1,"custom-control-label",3,"for"],[1,"input-group"],[1,"form-control",3,"type","id","placeholder","formControlName","step"],["class","input-group-append",4,"ngIf"],["class","invalid-feedback",4,"ngIf"],[1,"input-group-append"],["type","button","data-toggle","button",1,"btn","btn-light",3,"click",6,"title"],["title","Remove the custom configuration value. The default configuration will be inherited and used instead."],["aria-hidden","true",3,"ngClass"],[1,"invalid-feedback"],"The entered value is too high! It must not be greater than " + "\ufffd0\ufffd" + ".","The entered value is too low! It must not be lower than " + "\ufffd0\ufffd" + ".",[1,"my-2"]]},template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Mc(1,bc,4,3,"div",1),i.Rb()),2&e&&(i.pc("formGroup",t.optionsFormGroup),i.yb(1),i.pc("ngForOf",t.options))},directives:[kn.r,kn.k,Zn.a,wt.q,wt.r,Xn.a,On.a,kn.b,ei.a,kn.q,kn.i,Mo.a,kn.d,wt.p],styles:[".custom-checkbox[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .custom-checkbox[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{cursor:pointer}.col-form-label[_ngcontent-%COMP%]{text-align:left}"]}),e})(),_c=(()=>{class e{}return e.basicOptions=["osd_scrub_during_recovery","osd_scrub_begin_hour","osd_scrub_end_hour","osd_scrub_begin_week_day","osd_scrub_end_week_day","osd_scrub_min_interval","osd_scrub_max_interval","osd_deep_scrub_interval","osd_scrub_auto_repair","osd_max_scrubs","osd_scrub_priority","osd_scrub_sleep"],e.advancedOptions=["osd_scrub_auto_repair_num_errors","osd_debug_deep_scrub_sleep","osd_deep_scrub_keys","osd_deep_scrub_large_omap_object_key_threshold","osd_deep_scrub_large_omap_object_value_sum_threshold","osd_deep_scrub_randomize_ratio","osd_deep_scrub_stride","osd_deep_scrub_update_digest_min_age","osd_requested_scrub_priority","osd_scrub_backoff_ratio","osd_scrub_chunk_max","osd_scrub_chunk_min","osd_scrub_cost","osd_scrub_interval_randomize_ratio","osd_scrub_invalid_stats","osd_scrub_load_threshold","osd_scrub_max_preemptions"],e})();const yc=["basicOptionsValues"],vc=["advancedOptionsValues"];function wc(e,t){if(1&e){const e=i.Tb();i.Sb(0,"a",15),i.gc("click",(function(){return i.Dc(e),i.ic().advancedEnabled=!0})),i.Wb(1,16),i.Rb()}}function Sc(e,t){if(1&e&&(i.Sb(0,"div"),i.Sb(1,"h3",17),i.Wb(2,18),i.Rb(),i.Nb(3,"cd-config-option",7,19),i.Rb()),2&e){const e=i.ic(),t=i.Ac(7);i.yb(3),i.pc("optionNames",e.advancedOptions)("optionsForm",e.osdPgScrubForm)("optionsFormDir",t)("optionsFormGroupName","advancedFormGroup")}}let Mc=(()=>{class e{constructor(e,t,n,i){this.activeModal=e,this.authStorageService=t,this.notificationService=n,this.actionLabels=i,this.basicOptions=_c.basicOptions,this.advancedOptions=_c.advancedOptions,this.advancedEnabled=!1,this.osdPgScrubForm=new Jn.a({}),this.resource="PG scrub options",this.action=this.actionLabels.EDIT,this.permissions=this.authStorageService.getPermissions()}submitAction(){const e=[this.basicOptionsValues.saveValues()];this.advancedOptionsValues&&e.push(this.advancedOptionsValues.saveValues()),Object(vo.a)(e).subscribe(()=>{this.notificationService.show(yn.a.success,"Updated PG scrub options"),this.activeModal.close()},()=>{this.activeModal.close()})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Qt.a),i.Mb(Jt.a),i.Mb(wn.a),i.Mb(gn.b))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-osd-pg-scrub-modal"]],viewQuery:function(e,t){var n;1&e&&(i.Jc(yc,!0),i.Tc(vc,!0)),2&e&&(i.zc(n=i.hc())&&(t.basicOptionsValues=n.first),i.zc(n=i.hc())&&(t.advancedOptionsValues=n.first))},decls:19,vars:21,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"modal-content"],["novalidate","","cdFormScope","osd",3,"formGroup"],["formDir","ngForm"],[1,"modal-body","osd-modal"],[3,"optionNames","optionsForm","optionsFormDir","optionsFormGroupName"],["basicOptionsValues",""],[1,"row"],[1,"col-sm-12"],["class","pull-right margin-right-md",3,"click",4,"ngIf"],[4,"ngIf"],[1,"modal-footer"],[3,"form","showSubmit","submitText","submitActionEvent"],[1,"pull-right","margin-right-md",3,"click"],"Advanced...",[1,"page-header"],"Advanced configuration options",["advancedOptionsValues",""]]},template:function(e,t){if(1&e&&(i.Sb(0,"cd-modal",0),i.Qb(1,1),i.Wb(2,2),i.jc(3,"titlecase"),i.jc(4,"upperFirst"),i.Pb(),i.Qb(5,3),i.Sb(6,"form",4,5),i.Sb(8,"div",6),i.Nb(9,"cd-config-option",7,8),i.Sb(11,"div",9),i.Sb(12,"div",10),i.Mc(13,wc,2,0,"a",11),i.Rb(),i.Rb(),i.Mc(14,Sc,5,4,"div",12),i.Rb(),i.Sb(15,"div",13),i.Sb(16,"cd-form-button-panel",14),i.gc("submitActionEvent",(function(){return t.submitAction()})),i.jc(17,"titlecase"),i.jc(18,"upperFirst"),i.Rb(),i.Rb(),i.Rb(),i.Pb(),i.Rb()),2&e){const e=i.Ac(7);i.pc("modalRef",t.activeModal),i.yb(4),i.ac(i.kc(3,13,t.action))(i.kc(4,15,t.resource)),i.Xb(2),i.yb(2),i.pc("formGroup",t.osdPgScrubForm),i.yb(3),i.pc("optionNames",t.basicOptions)("optionsForm",t.osdPgScrubForm)("optionsFormDir",e)("optionsFormGroupName","basicFormGroup"),i.yb(4),i.pc("ngIf",!t.advancedEnabled),i.yb(1),i.pc("ngIf",t.advancedEnabled),i.yb(2),i.pc("form",t.osdPgScrubForm)("showSubmit",t.permissions.configOpt.update)("submitText",i.kc(17,17,t.action)+" "+i.kc(18,19,t.resource))}},directives:[_a.a,kn.C,kn.r,tc.a,Zn.a,kn.k,gc,wt.r,ti.a],pipes:[wt.A,ir.a],styles:[""]}),e})();function kc(e,t){if(1&e&&(i.Sb(0,"option",22),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e.name),i.yb(1),i.Qc(" ",e.text," ")}}function xc(e,t){1&e&&(i.Sb(0,"span",23),i.Wb(1,24),i.Rb())}function Dc(e,t){if(1&e&&(i.Sb(0,"cd-helper"),i.Oc(1),i.Rb()),2&e){const e=i.ic().$implicit;i.yb(1),i.Pc(e.value.desc)}}function Tc(e,t){1&e&&(i.Sb(0,"span",23),i.Wb(1,29),i.Rb())}function Cc(e,t){if(1&e&&(i.Sb(0,"span",23),i.Wb(1,30),i.Rb()),2&e){const e=i.ic().$implicit;i.yb(1),i.ac(e.value.patternHelpText),i.Xb(1)}}function Oc(e,t){if(1&e&&(i.Sb(0,"span",23),i.Wb(1,31),i.Rb()),2&e){const e=i.ic().$implicit;i.yb(1),i.ac(e.value.maxValue),i.Xb(1)}}function Lc(e,t){if(1&e&&(i.Sb(0,"span",23),i.Wb(1,32),i.Rb()),2&e){const e=i.ic().$implicit;i.yb(1),i.ac(e.value.minValue),i.Xb(1)}}const Rc=function(e){return{required:e}};function Ec(e,t){if(1&e&&(i.Sb(0,"div",7),i.Sb(1,"label",25),i.Sb(2,"span",26),i.Oc(3),i.Rb(),i.Mc(4,Dc,2,1,"cd-helper",27),i.Rb(),i.Sb(5,"div",10),i.Nb(6,"input",28),i.Mc(7,Tc,2,0,"span",13),i.Mc(8,Cc,2,1,"span",13),i.Mc(9,Oc,2,1,"span",13),i.Mc(10,Lc,2,1,"span",13),i.Rb(),i.Rb()),2&e){const e=t.$implicit,n=i.ic(),r=i.Ac(5);i.yb(1),i.pc("for",e.key),i.yb(1),i.pc("ngClass",i.uc(11,Rc,n.osdRecvSpeedForm.getValue("customizePriority"))),i.yb(1),i.Qc(" ",e.value.text," "),i.yb(1),i.pc("ngIf",e.value.desc),i.yb(2),i.pc("id",e.key)("formControlName",e.key)("readonly",!n.osdRecvSpeedForm.getValue("customizePriority")),i.yb(1),i.pc("ngIf",n.osdRecvSpeedForm.getValue("customizePriority")&&n.osdRecvSpeedForm.showError(e.key,r,"required")),i.yb(1),i.pc("ngIf",n.osdRecvSpeedForm.getValue("customizePriority")&&n.osdRecvSpeedForm.showError(e.key,r,"pattern")),i.yb(1),i.pc("ngIf",n.osdRecvSpeedForm.getValue("customizePriority")&&n.osdRecvSpeedForm.showError(e.key,r,"max")),i.yb(1),i.pc("ngIf",n.osdRecvSpeedForm.getValue("customizePriority")&&n.osdRecvSpeedForm.showError(e.key,r,"min"))}}let Ac=(()=>{class e{constructor(e,t,n,i,r,s){this.activeModal=e,this.actionLabels=t,this.authStorageService=n,this.configService=i,this.notificationService=r,this.osdService=s,this.priorities=[],this.priorityAttrs={},this.permissions=this.authStorageService.getPermissions(),this.priorities=this.osdService.osdRecvSpeedModalPriorities.KNOWN_PRIORITIES,this.osdRecvSpeedForm=new Jn.a({priority:new kn.h(null,{validators:[kn.A.required]}),customizePriority:new kn.h(!1)}),this.priorityAttrs={osd_max_backfills:{text:"Max Backfills",desc:"",patternHelpText:"",maxValue:void 0,minValue:void 0},osd_recovery_max_active:{text:"Recovery Max Active",desc:"",patternHelpText:"",maxValue:void 0,minValue:void 0},osd_recovery_max_single_start:{text:"Recovery Max Single Start",desc:"",patternHelpText:"",maxValue:void 0,minValue:void 0},osd_recovery_sleep:{text:"Recovery Sleep",desc:"",patternHelpText:"",maxValue:void 0,minValue:void 0}},Object.keys(this.priorityAttrs).forEach(e=>{this.osdRecvSpeedForm.addControl(e,new kn.h(null,{validators:[kn.A.required]}))})}ngOnInit(){this.configService.filter(Object.keys(this.priorityAttrs)).subscribe(e=>{const t=this.getCurrentValues(e);this.detectPriority(t.values,e=>{this.setPriority(e)}),this.setDescription(t.configOptions),this.setValidators(t.configOptions)})}detectPriority(e,t){const n=jt.a.find(this.priorities,t=>jt.a.isEqual(t.values,e));return this.osdRecvSpeedForm.controls.customizePriority.setValue(!1),n?t(n):4===Object.entries(e).length?(this.osdRecvSpeedForm.controls.customizePriority.setValue(!0),t(Object({name:"custom",text:"Custom",values:e}))):t(this.priorities[0])}getCurrentValues(e){const t={values:{},configOptions:[]};return e.forEach(e=>{t.configOptions.push(e),"value"in e?e.value.forEach(n=>{"osd"===n.section&&(t.values[e.name]=Number(n.value))}):"default"in e&&null!==e.default&&(t.values[e.name]=Number(e.default))}),t}setDescription(e){e.forEach(e=>{""!==e.desc&&(this.priorityAttrs[e.name].desc=e.desc)})}setPriority(e){const t=jt.a.find(this.priorities,e=>"custom"===e.name);"custom"===e.name?t||this.priorities.push(e):t&&this.priorities.splice(this.priorities.indexOf(t),1),this.osdRecvSpeedForm.controls.priority.setValue(e.name),Object.entries(e.values).forEach(([e,t])=>{this.osdRecvSpeedForm.controls[e].setValue(t)})}setValidators(e){e.forEach(e=>{const t=Gn.getTypeValidators(e);t?(t.validators.push(kn.A.required),"max"in t&&""!==t.max&&(this.priorityAttrs[e.name].maxValue=t.max),"min"in t&&""!==t.min&&(this.priorityAttrs[e.name].minValue=t.min),this.priorityAttrs[e.name].patternHelpText=t.patternHelpText,this.osdRecvSpeedForm.controls[e.name].setValidators(t.validators)):this.osdRecvSpeedForm.controls[e.name].setValidators(kn.A.required)})}onCustomizePriorityChange(){const e={};if(Object.keys(this.priorityAttrs).forEach(t=>{e[t]=this.osdRecvSpeedForm.getValue(t)}),this.osdRecvSpeedForm.getValue("customizePriority")){const t={name:"custom",text:"Custom",values:e};this.setPriority(t)}else this.detectPriority(e,e=>{this.setPriority(e)})}onPriorityChange(e){const t=jt.a.find(this.priorities,t=>t.name===e)||this.priorities[0];this.osdRecvSpeedForm.get("customizePriority").setValue(!1),this.setPriority(t)}submitAction(){const e={};Object.keys(this.priorityAttrs).forEach(t=>{e[t]={section:"osd",value:this.osdRecvSpeedForm.getValue(t)}}),this.configService.bulkCreate({options:e}).subscribe(()=>{this.notificationService.show(yn.a.success,"Updated OSD recovery speed priority '" + this.osdRecvSpeedForm.getValue("priority") + "'"),this.activeModal.close()},()=>{this.activeModal.close()})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Qt.a),i.Mb(gn.b),i.Mb(Jt.a),i.Mb(Un.a),i.Mb(wn.a),i.Mb(fr))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-osd-recv-speed-modal"]],decls:24,vars:10,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"OSD Recovery Priority",[1,"modal-content"],["novalidate","","cdFormScope","osd",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","priority",1,"cd-col-form-label","required"],"Priority",[1,"cd-col-form-input"],["formControlName","priority","id","priority",1,"form-control","custom-select",3,"change"],[3,"value",4,"ngFor","ngForOf"],["class","invalid-feedback",4,"ngIf"],[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["formControlName","customizePriority","id","customizePriority","name","customizePriority","type","checkbox",1,"custom-control-input",3,"change"],["for","customizePriority",1,"custom-control-label"],"Customize priority values",["class","form-group row",4,"ngFor","ngForOf"],[1,"modal-footer"],[3,"form","submitText","showSubmit","submitActionEvent"],[3,"value"],[1,"invalid-feedback"],"This field is required.",[1,"cd-col-form-label",3,"for"],[3,"ngClass"],[4,"ngIf"],["type","number",1,"form-control",3,"id","formControlName","readonly"],"This field is required!","" + "\ufffd0\ufffd" + "","The entered value is too high! It must not be greater than " + "\ufffd0\ufffd" + ".","The entered value is too low! It must not be lower than " + "\ufffd0\ufffd" + "."]},template:function(e,t){if(1&e&&(i.Sb(0,"cd-modal",0),i.Qb(1,1),i.Wb(2,2),i.Pb(),i.Qb(3,3),i.Sb(4,"form",4,5),i.Sb(6,"div",6),i.Sb(7,"div",7),i.Sb(8,"label",8),i.Wb(9,9),i.Rb(),i.Sb(10,"div",10),i.Sb(11,"select",11),i.gc("change",(function(e){return t.onPriorityChange(e.target.value)})),i.Mc(12,kc,2,2,"option",12),i.Rb(),i.Mc(13,xc,2,0,"span",13),i.Rb(),i.Rb(),i.Sb(14,"div",7),i.Sb(15,"div",14),i.Sb(16,"div",15),i.Sb(17,"input",16),i.gc("change",(function(){return t.onCustomizePriorityChange()})),i.Rb(),i.Sb(18,"label",17),i.Wb(19,18),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Mc(20,Ec,11,13,"div",19),i.jc(21,"keyvalue"),i.Rb(),i.Sb(22,"div",20),i.Sb(23,"cd-form-button-panel",21),i.gc("submitActionEvent",(function(){return t.submitAction()})),i.Rb(),i.Rb(),i.Rb(),i.Pb(),i.Rb()),2&e){const e=i.Ac(5);i.pc("modalRef",t.activeModal),i.yb(4),i.pc("formGroup",t.osdRecvSpeedForm),i.yb(8),i.pc("ngForOf",t.priorities),i.yb(1),i.pc("ngIf",t.osdRecvSpeedForm.showError("priority",e,"required")),i.yb(7),i.pc("ngForOf",i.kc(21,8,t.priorityAttrs)),i.yb(3),i.pc("form",t.osdRecvSpeedForm)("submitText",t.actionLabels.UPDATE)("showSubmit",t.permissions.configOpt.update)}},directives:[_a.a,kn.C,kn.r,tc.a,Zn.a,kn.k,Xn.a,On.a,kn.z,ei.a,kn.q,kn.i,wt.q,wt.r,kn.b,ti.a,kn.u,kn.B,wt.p,kn.v,kn.d,Mo.a],pipes:[wt.k],styles:[""]}),e})();function Ic(e,t){1&e&&(i.Sb(0,"span"),i.Wb(1,15),i.Rb())}function Pc(e,t){1&e&&(i.Sb(0,"span"),i.Wb(1,16),i.Rb())}function Nc(e,t){if(1&e&&(i.Sb(0,"span",13),i.Mc(1,Ic,2,0,"span",14),i.Mc(2,Pc,2,0,"span",14),i.Rb()),2&e){const e=i.ic();i.yb(1),i.pc("ngIf",null==e.weight.errors?null:e.weight.errors.required),i.yb(1),i.pc("ngIf",(null==e.weight.errors?null:e.weight.errors.max)||(null==e.weight.errors?null:e.weight.errors.min))}}let jc=(()=>{class e{constructor(e,t,n,i){this.actionLabels=e,this.activeModal=t,this.osdService=n,this.fb=i,this.currentWeight=1}get weight(){return this.reweightForm.get("weight")}ngOnInit(){this.reweightForm=this.fb.group({weight:this.fb.control(this.currentWeight,[kn.A.required,kn.A.max(1),kn.A.min(0)])})}reweight(){this.osdService.reweight(this.osdId,this.reweightForm.value.weight).subscribe(()=>this.activeModal.close())}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(gn.b),i.Mb(Qt.a),i.Mb(fr),i.Mb(So.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-osd-reweight-modal"]],decls:14,vars:7,consts:function(){return[[3,"modalRef"],[1,"modal-title"],"Reweight OSD: " + "\ufffd0\ufffd" + "",[1,"modal-content"],[3,"formGroup"],[1,"modal-body"],[1,"row"],["for","weight",1,"cd-col-form-label"],[1,"cd-col-form-input"],["id","weight","type","number","step","0.1","formControlName","weight","min","0","max","1",1,"form-control",3,"value"],["class","invalid-feedback",4,"ngIf"],[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],[4,"ngIf"],"This field is required.","The value needs to be between 0 and 1."]},template:function(e,t){1&e&&(i.Sb(0,"cd-modal",0),i.Qb(1,1),i.Wb(2,2),i.Pb(),i.Qb(3,3),i.Sb(4,"form",4),i.Sb(5,"div",5),i.Sb(6,"div",6),i.Sb(7,"label",7),i.Oc(8,"Weight"),i.Rb(),i.Sb(9,"div",8),i.Nb(10,"input",9),i.Mc(11,Nc,3,2,"span",10),i.Rb(),i.Rb(),i.Rb(),i.Sb(12,"div",11),i.Sb(13,"cd-form-button-panel",12),i.gc("submitActionEvent",(function(){return t.reweight()})),i.Rb(),i.Rb(),i.Rb(),i.Pb(),i.Rb()),2&e&&(i.pc("modalRef",t.activeModal),i.yb(2),i.ac(t.osdId),i.Xb(2),i.yb(2),i.pc("formGroup",t.reweightForm),i.yb(6),i.pc("value",t.currentWeight),i.yb(1),i.pc("ngIf",t.weight.errors),i.yb(2),i.pc("form",t.reweightForm)("submitText",t.actionLabels.REWEIGHT))},directives:[_a.a,kn.C,kn.r,Zn.a,kn.k,On.a,kn.v,kn.d,ei.a,kn.q,kn.i,wt.r,ti.a],styles:[""]}),e})();var Fc=n("FFMq");let Yc=(()=>{class e{constructor(e,t,n,i,r){this.activeModal=e,this.actionLabels=t,this.osdService=n,this.notificationService=i,this.joinPipe=r,this.selected=[]}ngOnInit(){this.scrubForm=new kn.j({})}scrub(){Object(vo.a)(this.selected.map(e=>this.osdService.scrub(e,this.deep))).subscribe(()=>{this.notificationService.show(yn.a.success,"" + (this.deep ? "Deep scrub" : "Scrub") + " was initialized in the following OSD(s): " + this.joinPipe.transform(this.selected) + ""),this.activeModal.close()},()=>this.activeModal.close())}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Qt.a),i.Mb(gn.b),i.Mb(fr),i.Mb(wn.a),i.Mb(Fc.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-osd-scrub-modal"]],decls:13,vars:9,consts:function(){var e,t,n;return e="{VAR_SELECT, select, true {Deep } other {}}",e=i.bc(e,{VAR_SELECT:"\ufffd0\ufffd"}),t="OSDs " + e + "Scrub",n="{VAR_SELECT, select, true {deep } other {}}",n=i.bc(n,{VAR_SELECT:"\ufffd0\ufffd"}),[[3,"modalRef"],[1,"modal-title"],t,[1,"modal-content"],["name","scrubForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],"You are about to apply a " + n + "scrub to the OSD(s): " + "\ufffd#9\ufffd" + "" + "\ufffd1\ufffd" + "" + "\ufffd/#9\ufffd" + ".",[1,"modal-footer"],[3,"form","submitText","submitActionEvent"]]},template:function(e,t){1&e&&(i.Sb(0,"cd-modal",0),i.Sb(1,"span",1),i.Wb(2,2),i.Rb(),i.Qb(3,3),i.Sb(4,"form",4,5),i.Sb(6,"div",6),i.Sb(7,"p"),i.cc(8,7),i.Nb(9,"strong"),i.jc(10,"join"),i.Zb(),i.Rb(),i.Rb(),i.Sb(11,"div",8),i.Sb(12,"cd-form-button-panel",9),i.gc("submitActionEvent",(function(){return t.scrub()})),i.Rb(),i.Rb(),i.Rb(),i.Pb(),i.Rb()),2&e&&(i.pc("modalRef",t.activeModal),i.yb(2),i.ac(t.deep),i.Xb(2),i.yb(2),i.pc("formGroup",t.scrubForm),i.yb(6),i.ac(t.deep)(i.kc(10,7,t.selected)),i.Xb(8),i.yb(2),i.pc("form",t.scrubForm)("submitText",t.actionLabels.UPDATE))},directives:[_a.a,kn.C,kn.r,Zn.a,kn.k,ti.a],pipes:[Fc.a],styles:[""]}),e})();var zc=n("b5OY");function $c(e,t){if(1&e&&i.Nb(0,"cd-device-list",17),2&e){const e=i.ic(2);i.pc("osdId",null==e.osd?null:e.osd.id)}}function Hc(e,t){if(1&e&&i.Nb(0,"cd-table-key-value",18),2&e){const e=i.ic(2);i.pc("data",null==e.osd||null==e.osd.details?null:e.osd.details.osd_map)}}function Wc(e,t){if(1&e){const e=i.Tb();i.Sb(0,"cd-table-key-value",21),i.gc("fetchData",(function(){return i.Dc(e),i.ic(3).refresh()})),i.Rb()}if(2&e){const e=i.ic(3);i.pc("data",null==e.osd||null==e.osd.details?null:e.osd.details.osd_metadata)}}function Vc(e,t){1&e&&(i.Sb(0,"cd-alert-panel",22),i.Wb(1,23),i.Rb())}function Bc(e,t){if(1&e&&(i.Mc(0,Wc,1,1,"cd-table-key-value",19),i.Mc(1,Vc,2,0,"ng-template",null,20,i.Nc)),2&e){const e=i.Ac(2),t=i.ic(2);i.pc("ngIf",null==t.osd||null==t.osd.details?null:t.osd.details.osd_metadata)("ngIfElse",e)}}function Uc(e,t){if(1&e&&i.Nb(0,"cd-smart-list",17),2&e){const e=i.ic(2);i.pc("osdId",null==e.osd?null:e.osd.id)}}function Gc(e,t){if(1&e&&i.Nb(0,"cd-table-performance-counter",25),2&e){const e=i.ic(3);i.pc("serviceId",null==e.osd?null:e.osd.id)}}function qc(e,t){if(1&e&&i.Mc(0,Gc,1,1,"cd-table-performance-counter",24),2&e){const e=i.ic(2);i.pc("ngIf",null==e.osd?null:e.osd.details)}}function Jc(e,t){if(1&e&&i.Nb(0,"cd-grafana",28),2&e){const e=i.ic(3);i.pc("grafanaPath","osd-device-details?var-osd=osd."+e.osd.id)}}function Qc(e,t){1&e&&(i.Sb(0,"li",26),i.Sb(1,"a",4),i.Wb(2,27),i.Rb(),i.Mc(3,Jc,1,1,"ng-template",6),i.Rb())}function Kc(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"ul",1,2),i.Sb(3,"li",3),i.Sb(4,"a",4),i.Wb(5,5),i.Rb(),i.Mc(6,$c,1,1,"ng-template",6),i.Rb(),i.Sb(7,"li",7),i.Sb(8,"a",4),i.Wb(9,8),i.Rb(),i.Mc(10,Hc,1,1,"ng-template",6),i.Rb(),i.Sb(11,"li",9),i.Sb(12,"a",4),i.Wb(13,10),i.Rb(),i.Mc(14,Bc,3,2,"ng-template",6),i.Rb(),i.Sb(15,"li",11),i.Sb(16,"a",4),i.Wb(17,12),i.Rb(),i.Mc(18,Uc,1,1,"ng-template",6),i.Rb(),i.Sb(19,"li",13),i.Sb(20,"a",4),i.Wb(21,14),i.Rb(),i.Mc(22,qc,1,1,"ng-template",6),i.Rb(),i.Mc(23,Qc,4,0,"li",15),i.Rb(),i.Nb(24,"div",16),i.Pb()),2&e){const e=i.Ac(2),t=i.ic();i.yb(23),i.pc("ngIf",t.grafanaPermission.read),i.yb(1),i.pc("ngbNavOutlet",e)}}let Zc=(()=>{class e{constructor(e,t){this.osdService=e,this.authStorageService=t,this.grafanaPermission=this.authStorageService.getPermissions().grafana}ngOnChanges(){var e,t,n;(null===(e=this.osd)||void 0===e?void 0:e.id)!==(null===(t=this.selection)||void 0===t?void 0:t.id)&&(this.osd=this.selection),jt.a.isNumber(null===(n=this.osd)||void 0===n?void 0:n.id)&&this.refresh()}refresh(){this.osdService.getDetails(this.osd.id).subscribe(e=>{this.osd.details=e})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(fr),i.Mb(Jt.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-osd-details"]],inputs:{selection:"selection"},features:[i.wb],decls:1,vars:1,consts:function(){return[[4,"ngIf"],["ngbNav","","id","tabset-osd-details","cdStatefulTab","osd-details",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem","devices"],["ngbNavLink",""],"Devices",["ngbNavContent",""],["ngbNavItem","attributes"],"Attributes (OSD map)",["ngbNavItem","metadata"],"Metadata",["ngbNavItem","device-health"],"Device health",["ngbNavItem","performance-counter"],"Performance counter",["ngbNavItem","performance-details",4,"ngIf"],[3,"ngbNavOutlet"],[3,"osdId"],[3,"data"],[3,"data","fetchData",4,"ngIf","ngIfElse"],["noMetaData",""],[3,"data","fetchData"],["type","warning"],"Metadata not available",["serviceType","osd",3,"serviceId",4,"ngIf"],["serviceType","osd",3,"serviceId"],["ngbNavItem","performance-details"],"Performance Details",["uid","CrAHE0iZz","grafanaStyle","three",3,"grafanaPath"]]},template:function(e,t){1&e&&i.Mc(0,Kc,25,2,"ng-container",0),2&e&&i.pc("ngIf",t.selection)},directives:[wt.r,Qt.p,Kt.a,Qt.r,Qt.s,Qt.q,Qt.u,Tr,en.a,pr.a,_s,zc.a,Fn.a],styles:[""]}),e})();const Xc=["osdUsageTpl"],el=["markOsdConfirmationTpl"],tl=["criticalConfirmationTpl"],nl=["reweightBodyTpl"],il=["safeToDestroyBodyTpl"],rl=["deleteOsdExtraTpl"],sl=["flagsTpl"],ol=function(){return{read:!0}};function al(e,t){if(1&e){const e=i.Tb();i.Sb(0,"cd-table",13),i.gc("fetchData",(function(){return i.Dc(e),i.ic().getOsdList()}))("setExpandedRow",(function(t){return i.Dc(e),i.ic().setExpandedRow(t)}))("updateSelection",(function(t){return i.Dc(e),i.ic().updateSelection(t)})),i.Sb(1,"div",14),i.Nb(2,"cd-table-actions",15),i.Nb(3,"cd-table-actions",16),i.Rb(),i.Nb(4,"cd-osd-details",17),i.Rb()}if(2&e){const e=i.ic();i.pc("data",e.osds)("columns",e.columns)("hasDetails",!0)("updateSelectionOnRefresh","never"),i.yb(2),i.pc("permission",e.permissions.osd)("selection",e.selection)("tableActions",e.tableActions),i.yb(1),i.pc("permission",i.tc(11,ol))("selection",e.selection)("tableActions",e.clusterWideActions),i.yb(1),i.pc("selection",e.expandedRow)}}function cl(e,t){1&e&&i.Nb(0,"cd-grafana",19),2&e&&i.pc("grafanaPath","osd-overview?")}function ll(e,t){1&e&&(i.Sb(0,"li",2),i.Sb(1,"a",3),i.Wb(2,18),i.Rb(),i.Mc(3,cl,1,1,"ng-template",5),i.Rb())}function ul(e,t){if(1&e&&(i.Qb(0),i.cc(1,20),i.Nb(2,"strong"),i.jc(3,"join"),i.Nb(4,"strong"),i.Zb(),i.Pb()),2&e){const e=t.markActionDescription,n=t.osdIds;i.yb(4),i.ac(i.kc(3,2,n))(e),i.Xb(1)}}function dl(e,t){if(1&e&&(i.Sb(0,"div",23),i.Sb(1,"cd-alert-panel",24),i.Wb(2,25),i.Rb(),i.Rb()),2&e){const e=i.ic(),t=e.actionDescription,n=e.message,r=i.ic();i.yb(2),i.ac(r.selection.hasSingleSelection)(t)(n),i.Xb(2)}}function hl(e,t){if(1&e&&(i.Mc(0,dl,3,3,"div",21),i.Qb(1),i.cc(2,22),i.Nb(3,"strong"),i.jc(4,"join"),i.Nb(5,"strong"),i.Zb(),i.Pb()),2&e){const e=t.actionDescription,n=t.osdIds;i.pc("ngIf",!t.safeToPerform),i.yb(5),i.ac(i.kc(4,3,n))(e),i.Xb(2)}}function fl(e,t){if(1&e&&(i.Sb(0,"span",28),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.yb(1),i.Pc(e)}}function pl(e,t){if(1&e&&(i.Sb(0,"span",29),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.yb(1),i.Pc(e)}}function ml(e,t){if(1&e&&(i.Mc(0,fl,2,1,"span",26),i.Mc(1,pl,2,1,"span",27)),2&e){const e=t.row;i.pc("ngForOf",e.cdClusterFlags),i.yb(1),i.pc("ngForOf",e.cdIndivFlags)}}function bl(e,t){if(1&e&&i.Nb(0,"cd-usage-bar",30),2&e){const e=t.row;i.pc("total",e.stats.stat_bytes)("used",e.stats.stat_bytes_used)}}function gl(e,t){1&e&&(i.Qb(0,31),i.Qb(1,32),i.Sb(2,"div",33),i.Sb(3,"div",34),i.Nb(4,"input",35),i.Sb(5,"label",36),i.Wb(6,37),i.Rb(),i.Rb(),i.Rb(),i.Pb(),i.Pb()),2&e&&i.pc("formGroup",t.form)}let _l=(()=>{class e extends $t.a{constructor(e,t,n,i,r,s,o,a,c,l){super(),this.authStorageService=e,this.osdService=t,this.dimlessBinaryPipe=n,this.modalService=i,this.urlBuilder=r,this.router=s,this.taskWrapper=o,this.actionLabels=a,this.notificationService=c,this.orchService=l,this.icons=_n.a,this.selection=new Wt.a,this.osds=[],this.disabledFlags=["sortbitwise","purged_snapdirs","recovery_deletes","pglog_hardlimit"],this.indivFlagNames=["noup","nodown","noin","noout"],this.actionOrchFeatures={create:[ur.OSD_CREATE],delete:[ur.OSD_DELETE]},this.permissions=this.authStorageService.getPermissions(),this.tableActions=[{name:this.actionLabels.CREATE,permission:"create",icon:_n.a.add,click:()=>this.router.navigate([this.urlBuilder.getCreate()]),disable:e=>this.getDisable("create",e),canBePrimary:e=>!e.hasSelection},{name:this.actionLabels.EDIT,permission:"update",icon:_n.a.edit,click:()=>this.editAction()},{name:this.actionLabels.FLAGS,permission:"update",icon:_n.a.flag,click:()=>this.configureFlagsIndivAction(),disable:()=>!this.hasOsdSelected},{name:this.actionLabels.SCRUB,permission:"update",icon:_n.a.analyse,click:()=>this.scrubAction(!1),disable:()=>!this.hasOsdSelected,canBePrimary:e=>e.hasSelection},{name:this.actionLabels.DEEP_SCRUB,permission:"update",icon:_n.a.deepCheck,click:()=>this.scrubAction(!0),disable:()=>!this.hasOsdSelected},{name:this.actionLabels.REWEIGHT,permission:"update",click:()=>this.reweight(),disable:()=>!this.hasOsdSelected||!this.selection.hasSingleSelection,icon:_n.a.reweight},{name:this.actionLabels.MARK_OUT,permission:"update",click:()=>this.showConfirmationModal("out",this.osdService.markOut),disable:()=>this.isNotSelectedOrInState("out"),icon:_n.a.left},{name:this.actionLabels.MARK_IN,permission:"update",click:()=>this.showConfirmationModal("in",this.osdService.markIn),disable:()=>this.isNotSelectedOrInState("in"),icon:_n.a.right},{name:this.actionLabels.MARK_DOWN,permission:"update",click:()=>this.showConfirmationModal("down",this.osdService.markDown),disable:()=>this.isNotSelectedOrInState("down"),icon:_n.a.down},{name:this.actionLabels.MARK_LOST,permission:"delete",click:()=>this.showCriticalConfirmationModal("Mark","OSD lost","marked lost",e=>this.osdService.safeToDestroy(JSON.stringify(e)),"is_safe_to_destroy",this.osdService.markLost),disable:()=>this.isNotSelectedOrInState("up"),icon:_n.a.flatten},{name:this.actionLabels.PURGE,permission:"delete",click:()=>this.showCriticalConfirmationModal("Purge","OSD","purged",e=>this.osdService.safeToDestroy(JSON.stringify(e)),"is_safe_to_destroy",e=>(this.selection=new Wt.a,this.osdService.purge(e))),disable:()=>this.isNotSelectedOrInState("up"),icon:_n.a.erase},{name:this.actionLabels.DESTROY,permission:"delete",click:()=>this.showCriticalConfirmationModal("destroy","OSD","destroyed",e=>this.osdService.safeToDestroy(JSON.stringify(e)),"is_safe_to_destroy",e=>(this.selection=new Wt.a,this.osdService.destroy(e))),disable:()=>this.isNotSelectedOrInState("up"),icon:_n.a.destroyCircle},{name:this.actionLabels.DELETE,permission:"delete",click:()=>this.delete(),disable:e=>this.getDisable("delete",e),icon:_n.a.destroy}]}static collectStates(e){const t=[e.in?"in":"out"];return e.up?t.push("up"):e.state.includes("destroyed")?t.push("destroyed"):t.push("down"),t}ngOnInit(){this.clusterWideActions=[{name:"Flags",icon:_n.a.flag,click:()=>this.configureFlagsAction(),permission:"read",visible:()=>this.permissions.osd.read},{name:"Recovery Priority",icon:_n.a.deepCheck,click:()=>this.configureQosParamsAction(),permission:"read",visible:()=>this.permissions.configOpt.read},{name:"PG scrub",icon:_n.a.analyse,click:()=>this.configurePgScrubAction(),permission:"read",visible:()=>this.permissions.configOpt.read}],this.columns=[{prop:"id",name:"ID",flexGrow:1,cellTransformation:Ht.a.executing,customTemplateConfig:{valueClass:"bold"}},{prop:"host.name",name:"Host"},{prop:"collectedStates",name:"Status",flexGrow:1,cellTransformation:Ht.a.badge,customTemplateConfig:{map:{in:{class:"badge-success"},up:{class:"badge-success"},down:{class:"badge-danger"},out:{class:"badge-danger"},destroyed:{class:"badge-danger"}}}},{prop:"tree.device_class",name:"Device class",flexGrow:1.2,cellTransformation:Ht.a.badge,customTemplateConfig:{map:{hdd:{class:"badge-hdd"},ssd:{class:"badge-ssd"}}}},{prop:"stats.numpg",name:"PGs",flexGrow:1},{prop:"stats.stat_bytes",name:"Size",flexGrow:1,pipe:this.dimlessBinaryPipe},{prop:"state",name:"Flags",cellTemplate:this.flagsTpl},{prop:"stats.usage",name:"Usage",cellTemplate:this.osdUsageTpl},{prop:"stats_history.out_bytes",name:"Read bytes",cellTransformation:Ht.a.sparkline},{prop:"stats_history.in_bytes",name:"Write bytes",cellTransformation:Ht.a.sparkline},{prop:"stats.op_r",name:"Read ops",cellTransformation:Ht.a.perSecond},{prop:"stats.op_w",name:"Write ops",cellTransformation:Ht.a.perSecond}],this.orchService.status().subscribe(e=>this.orchStatus=e)}getDisable(e,t){if("delete"===e){if(!t.hasSelection)return!0;if(jt.a.some(this.getSelectedOsds(),e=>{const t=jt.a.get(e,"operational_status");return"deleting"===t||"unmanaged"===t}))return!0}return this.orchService.getTableActionDisableDesc(this.orchStatus,this.actionOrchFeatures[e])}getSelectedOsdIds(){const e=this.osds.map(e=>e.id);return this.selection.selected.map(e=>e.id).filter(t=>e.includes(t)).sort()}getSelectedOsds(){return this.osds.filter(e=>!jt.a.isUndefined(e)&&this.getSelectedOsdIds().includes(e.id))}get hasOsdSelected(){return this.getSelectedOsdIds().length>0}updateSelection(e){this.selection=e}isNotSelectedOrInState(e){const t=this.getSelectedOsds();if(0===t.length)return!0;switch(e){case"in":return t.some(e=>1===e.in);case"out":return t.some(e=>1!==e.in);case"down":return t.some(e=>1!==e.up);case"up":return t.some(e=>1===e.up)}}getOsdList(){const t=[this.osdService.getList(),this.osdService.getFlags()];Object(vo.a)(t).subscribe(t=>{this.osds=t[0].map(n=>{n.collectedStates=e.collectStates(n),n.stats_history.out_bytes=n.stats_history.op_out_bytes.map(e=>e[1]),n.stats_history.in_bytes=n.stats_history.op_in_bytes.map(e=>e[1]),n.stats.usage=n.stats.stat_bytes_used/n.stats.stat_bytes,n.cdIsBinary=!0,n.cdIndivFlags=n.state.filter(e=>this.indivFlagNames.includes(e)),n.cdClusterFlags=t[1].filter(e=>!this.disabledFlags.includes(e));const i=jt.a.get(n,"operational_status","unmanaged");return"unmanaged"!==i&&"working"!==i&&(n.cdExecuting=i),n})})}editAction(){const e=jt.a.filter(this.osds,["id",this.selection.first().id]).pop();this.modalService.show(Tn.a,{titleText:"Edit OSD: " + e.id + "",fields:[{type:"text",name:"deviceClass",value:e.tree.device_class,label:"Device class",required:!0}],submitButtonText:"Edit OSD",onSubmit:t=>{this.osdService.update(e.id,t.deviceClass).subscribe(()=>{this.notificationService.show(yn.a.success,"Updated OSD '" + e.id + "'"),this.getOsdList()})}})}scrubAction(e){if(!this.hasOsdSelected)return;const t={selected:this.getSelectedOsdIds(),deep:e};this.bsModalRef=this.modalService.show(Yc,t)}configureFlagsAction(){this.bsModalRef=this.modalService.show(rc)}configureFlagsIndivAction(){const e={selected:this.getSelectedOsds()};this.bsModalRef=this.modalService.show(ec,e)}showConfirmationModal(e,t){const n=this.getSelectedOsdIds();this.bsModalRef=this.modalService.show(Dn.a,{titleText:"Mark OSD " + e + "",buttonText:"Mark " + e + "",bodyTpl:this.markOsdConfirmationTpl,bodyContext:{markActionDescription:e,osdIds:n},onSubmit:()=>{Object(vo.a)(this.getSelectedOsdIds().map(e=>t.call(this.osdService,e))).subscribe(()=>this.bsModalRef.close())}})}reweight(){const e=this.osds.filter(e=>e.id===this.selection.first().id).pop();this.bsModalRef=this.modalService.show(jc,{currentWeight:e.weight,osdId:e.id})}delete(){const e=new Jn.a({preserve:new kn.h(!1)});this.showCriticalConfirmationModal("delete","OSD","deleted",e=>this.osdService.safeToDelete(JSON.stringify(e)),"is_safe_to_delete",t=>(this.selection=new Wt.a,this.taskWrapper.wrapTaskAroundCall({task:new er.a("osd/"+gn.e.DELETE,{svc_id:t}),call:this.osdService.delete(t,e.value.preserve,!0)})),!0,e,this.deleteOsdExtraTpl)}showCriticalConfirmationModal(e,t,n,i,r,s,o=!1,a,c){i(this.getSelectedOsdIds()).subscribe(i=>{const l=this.modalService.show(bn.a,{actionDescription:e,itemDescription:t,bodyTemplate:this.criticalConfirmationTpl,bodyContext:{safeToPerform:i[r],message:i.message,actionDescription:n,osdIds:this.getSelectedOsdIds()},childFormGroup:a,childFormGroupTemplate:c,submitAction:()=>{const e=Object(vo.a)(this.getSelectedOsdIds().map(e=>s.call(this.osdService,e)));o?e.subscribe({error:()=>{this.getOsdList(),l.close()},complete:()=>l.close()}):e.subscribe(()=>{this.getOsdList(),l.close()},()=>l.close())}})})}configureQosParamsAction(){this.bsModalRef=this.modalService.show(Ac)}configurePgScrubAction(){this.bsModalRef=this.modalService.show(Mc,void 0,{size:"lg"})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Jt.a),i.Mb(fr),i.Mb(Zt.a),i.Mb(vn.a),i.Mb(hr.a),i.Mb(Pt.e),i.Mb(tr.a),i.Mb(gn.b),i.Mb(wn.a),i.Mb(cr))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-osd-list"]],viewQuery:function(e,t){var n;1&e&&(i.Jc(Xc,!0),i.Jc(el,!0),i.Jc(tl,!0),i.Tc(nl,!0),i.Tc(il,!0),i.Tc(rl,!0),i.Jc(sl,!0)),2&e&&(i.zc(n=i.hc())&&(t.osdUsageTpl=n.first),i.zc(n=i.hc())&&(t.markOsdConfirmationTpl=n.first),i.zc(n=i.hc())&&(t.criticalConfirmationTpl=n.first),i.zc(n=i.hc())&&(t.reweightBodyTpl=n.first),i.zc(n=i.hc())&&(t.safeToDestroyBodyTpl=n.first),i.zc(n=i.hc())&&(t.deleteOsdExtraTpl=n.first),i.zc(n=i.hc())&&(t.flagsTpl=n.first))},features:[i.xb([{provide:hr.a,useValue:new hr.a("osd")}]),i.vb],decls:18,vars:2,consts:function(){var e,t,n,r,s;return e="OSDs List",t="Overall Performance",n="" + "[\ufffd#2\ufffd|\ufffd#4\ufffd]" + "OSD(s) " + "\ufffd0\ufffd" + "" + "[\ufffd/#2\ufffd|\ufffd/#4\ufffd]" + " will be marked " + "[\ufffd#2\ufffd|\ufffd#4\ufffd]" + "" + "\ufffd1\ufffd" + "" + "[\ufffd/#2\ufffd|\ufffd/#4\ufffd]" + " if you proceed.",n=i.bc(n),r="" + "[\ufffd#3\ufffd|\ufffd#5\ufffd]" + "OSD " + "\ufffd0\ufffd" + "" + "[\ufffd/#3\ufffd|\ufffd/#5\ufffd]" + " will be " + "[\ufffd#3\ufffd|\ufffd#5\ufffd]" + "" + "\ufffd1\ufffd" + "" + "[\ufffd/#3\ufffd|\ufffd/#5\ufffd]" + " if you proceed.",r=i.bc(r),s="{VAR_SELECT, select, true {OSD is} other {OSDs are}}",s=i.bc(s,{VAR_SELECT:"\ufffd0\ufffd"}),[["ngbNav","",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem",""],["ngbNavLink",""],e,["ngbNavContent",""],["ngbNavItem","",4,"ngIf"],[3,"ngbNavOutlet"],["markOsdConfirmationTpl",""],["criticalConfirmationTpl",""],["flagsTpl",""],["osdUsageTpl",""],["deleteOsdExtraTpl",""],["selectionType","multiClick",3,"data","columns","hasDetails","updateSelectionOnRefresh","fetchData","setExpandedRow","updateSelection"],[1,"table-actions","btn-toolbar"],["id","osd-actions",1,"btn-group",3,"permission","selection","tableActions"],["dropDownOnly","Cluster-wide configuration","btnColor","light","id","cluster-wide-actions",1,"btn-group",3,"permission","selection","tableActions"],["cdTableDetail","",3,"selection"],t,["uid","lo02I1Aiz","grafanaStyle","four",3,"grafanaPath"],n,["class","danger",4,"ngIf"],r,[1,"danger"],["type","warning"],"The " + s + " not safe to be " + "\ufffd1\ufffd" + "! " + "\ufffd2\ufffd" + "",["class","badge badge-hdd mr-1",4,"ngFor","ngForOf"],["class","badge badge-info mr-1",4,"ngFor","ngForOf"],[1,"badge","badge-hdd","mr-1"],[1,"badge","badge-info","mr-1"],[3,"total","used"],[3,"formGroup"],["formGroupName","child"],[1,"form-group"],[1,"custom-control","custom-checkbox"],["type","checkbox","name","preserve","id","preserve","formControlName","preserve",1,"custom-control-input"],["for","preserve",1,"custom-control-label"],"Preserve OSD ID(s) for replacement."]},template:function(e,t){if(1&e&&(i.Sb(0,"ul",0,1),i.Sb(2,"li",2),i.Sb(3,"a",3),i.Wb(4,4),i.Rb(),i.Mc(5,al,5,12,"ng-template",5),i.Rb(),i.Mc(6,ll,4,0,"li",6),i.Rb(),i.Nb(7,"div",7),i.Mc(8,ul,5,4,"ng-template",null,8,i.Nc),i.Mc(10,hl,6,5,"ng-template",null,9,i.Nc),i.Mc(12,ml,2,2,"ng-template",null,10,i.Nc),i.Mc(14,bl,1,2,"ng-template",null,11,i.Nc),i.Mc(16,gl,7,1,"ng-template",null,12,i.Nc)),2&e){const e=i.Ac(1);i.yb(6),i.pc("ngIf",t.permissions.grafana.read),i.yb(1),i.pc("ngbNavOutlet",e)}},directives:[Qt.p,Qt.r,Qt.s,Qt.q,wt.r,Qt.u,Bt.a,Sn.a,Zc,Fn.a,pr.a,wt.q,ln.a,Zn.a,kn.r,kn.k,kn.l,Xn.a,On.a,kn.b,ei.a,kn.q,kn.i],pipes:[Fc.a],styles:[""]}),e})();var yl=n("20UP");let vl=(()=>{class e{constructor(e,t){this.http=e,this.settingsService=t,this.baseURL="api/prometheus",this.settingsKey={alertmanager:"api/settings/alertmanager-api-host",prometheus:"api/settings/prometheus-api-host"}}ifAlertmanagerConfigured(e,t){this.settingsService.ifSettingConfigured(this.settingsKey.alertmanager,e,t)}disableAlertmanagerConfig(){this.settingsService.disableSetting(this.settingsKey.alertmanager)}ifPrometheusConfigured(e,t){this.settingsService.ifSettingConfigured(this.settingsKey.prometheus,e,t)}disablePrometheusConfig(){this.settingsService.disableSetting(this.settingsKey.prometheus)}getAlerts(e={}){return this.http.get(this.baseURL,{params:e})}getSilences(e={}){return this.http.get(this.baseURL+"/silences",{params:e})}getRules(e="all"){return this.http.get(this.baseURL+"/rules").pipe(Object(Vi.a)(t=>(["alerting","rewrites"].includes(e)&&t.groups.map(t=>{t.rules=t.rules.filter(t=>t.type===e)}),t)))}setSilence(e){return this.http.post(this.baseURL+"/silence",e,{observe:"response"})}expireSilence(e){return this.http.delete(`${this.baseURL}/silence/${e}`,{observe:"response"})}getNotifications(e){return this.http.get(`${this.baseURL}/notifications?from=${e&&e.id?e.id:"last"}`)}}return e.\u0275fac=function(t){return new(t||e)(i.dc(o.b),i.dc(yl.a))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var wl=n("G1I9");let Sl=(()=>{class e{constructor(e){this.notificationService=e}sendNotifications(e){e.forEach(e=>this.notificationService.show(e))}convertToCustomAlerts(e){return jt.a.uniqWith(e.map(e=>({status:jt.a.isObject(e.status)?e.status.state:this.getPrometheusNotificationStatus(e),name:e.labels.alertname,url:e.generatorURL,description:e.annotations.description,fingerprint:jt.a.isObject(e.status)&&e.fingerprint})),jt.a.isEqual)}getPrometheusNotificationStatus(e){const t=e.status;return"firing"===t?"active":t}convertAlertToNotification(e){return new wl.b(this.formatType(e.status),`${e.name} (${e.status})`,this.appendSourceLink(e,e.description),void 0,"Prometheus")}formatType(e){return yn.a[jt.a.findKey({error:["firing","active"],info:["suppressed","unprocessed"],success:["resolved"]},t=>t.includes(e))]}appendSourceLink(e,t){return`${t} <a href="${e.url}" target="_blank"><i class="${_n.a.lineChart}"></i></a>`}}return e.\u0275fac=function(t){return new(t||e)(i.dc(wn.a))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),Ml=(()=>{class e{constructor(e,t){this.alertFormatter=e,this.prometheusService=t,this.canAlertsBeNotified=!1,this.alerts=[],this.rules=[]}getAlerts(){this.prometheusService.ifAlertmanagerConfigured(()=>{this.prometheusService.getAlerts().subscribe(e=>this.handleAlerts(e),e=>{[404,504].includes(e.status)&&this.prometheusService.disableAlertmanagerConfig()})})}getRules(){this.prometheusService.ifPrometheusConfigured(()=>{this.prometheusService.getRules("alerting").subscribe(e=>{this.rules=e.groups.reduce((e,t)=>e.concat(t.rules.map(e=>(e.group=t.name,e))),[])})})}refresh(){this.getAlerts(),this.getRules()}handleAlerts(e){this.canAlertsBeNotified&&this.notifyOnAlertChanges(e,this.alerts),this.activeAlerts=jt.a.reduce(this.alerts,(e,t)=>"active"===t.status.state?++e:e,0),this.alerts=e,this.canAlertsBeNotified=!0}notifyOnAlertChanges(e,t){const n=this.getChangedAlerts(this.alertFormatter.convertToCustomAlerts(e),this.alertFormatter.convertToCustomAlerts(t)).map(e=>this.alertFormatter.convertAlertToNotification(e));this.alertFormatter.sendNotifications(n)}getChangedAlerts(e,t){return jt.a.differenceWith(e,t,jt.a.isEqual).concat(this.getVanishedAlerts(e,t))}getVanishedAlerts(e,t){return jt.a.differenceWith(t,e,(e,t)=>e.fingerprint===t.fingerprint).map(e=>(e.status="resolved",e))}}return e.\u0275fac=function(t){return new(t||e)(i.dc(Sl),i.dc(vl))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),kl=(()=>{class e extends $t.a{constructor(e){super(),this.prometheusService=e,this.isPrometheusConfigured=!1,this.isAlertmanagerConfigured=!1}ngOnInit(){this.prometheusService.ifAlertmanagerConfigured(()=>{this.isAlertmanagerConfigured=!0}),this.prometheusService.ifPrometheusConfigured(()=>{this.isPrometheusConfigured=!0})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(vl))},e.\u0275dir=i.Hb({type:e,features:[i.vb]}),e})(),xl=(()=>{class e{constructor(e){this.router=e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Pt.e))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-prometheus-tabs"]],decls:11,vars:1,consts:function(){return[["ngbNav","",1,"nav-tabs",3,"activeId","navChange"],["nav","ngbNav"],["ngbNavItem","/monitoring/active-alerts"],["ngbNavLink",""],"Active Alerts",["ngbNavItem","/monitoring/alerts"],"Alerts",["ngbNavItem","/monitoring/silences"],"Silences"]},template:function(e,t){1&e&&(i.Sb(0,"ul",0,1),i.gc("navChange",(function(e){return t.router.navigate([e.nextId])})),i.Sb(2,"li",2),i.Sb(3,"a",3),i.Wb(4,4),i.Rb(),i.Rb(),i.Sb(5,"li",5),i.Sb(6,"a",3),i.Wb(7,6),i.Rb(),i.Rb(),i.Sb(8,"li",7),i.Sb(9,"a",3),i.Wb(10,8),i.Rb(),i.Rb(),i.Rb()),2&e&&i.pc("activeId",t.router.url)},directives:[Qt.p,Qt.r,Qt.s],styles:[""]}),e})();const Dl=["externalLinkTpl"];function Tl(e,t){1&e&&(i.Sb(0,"cd-alert-panel",3),i.cc(1,4),i.Nb(2,"cd-doc",5),i.Zb(),i.Rb())}function Cl(e,t){if(1&e&&i.Nb(0,"cd-table-key-value",9),2&e){const e=i.ic(2);i.pc("renderObjects",!0)("hideEmpty",!0)("appendParentKey",!1)("data",e.expandedRow)("customCss",e.customCss)("autoReload",!1)}}function Ol(e,t){if(1&e){const e=i.Tb();i.Sb(0,"cd-table",6),i.gc("setExpandedRow",(function(t){return i.Dc(e),i.ic().setExpandedRow(t)}))("updateSelection",(function(t){return i.Dc(e),i.ic().updateSelection(t)})),i.Nb(1,"cd-table-actions",7),i.Mc(2,Cl,1,6,"cd-table-key-value",8),i.Rb()}if(2&e){const e=i.ic();i.pc("data",e.prometheusAlertService.alerts)("columns",e.columns)("forceIdentifier",!0)("customCss",e.customCss)("hasDetails",!0),i.yb(1),i.pc("permission",e.permission)("selection",e.selection)("tableActions",e.tableActions),i.yb(1),i.pc("ngIf",e.expandedRow)}}const Ll=function(e){return[e]};function Rl(e,t){if(1&e&&(i.Sb(0,"a",10),i.Nb(1,"i",11),i.Oc(2," Source"),i.Rb()),2&e){const e=t.value,n=i.ic();i.pc("href",e,i.Gc),i.yb(1),i.pc("ngClass",i.uc(2,Ll,n.icons.lineChart))}}let El=(()=>{class e extends kl{constructor(e,t,n,i,r){super(r),this.authStorageService=e,this.prometheusAlertService=t,this.urlBuilder=n,this.cdDatePipe=i,this.selection=new Wt.a,this.icons=_n.a,this.customCss={"badge badge-danger":"active","badge badge-warning":"unprocessed","badge badge-info":"suppressed"},this.permission=this.authStorageService.getPermissions().prometheus,this.tableActions=[{permission:"create",canBePrimary:e=>e.hasSingleSelection,disable:e=>!e.hasSingleSelection||e.first().cdExecuting,icon:_n.a.add,routerLink:()=>"/monitoring"+this.urlBuilder.getCreateFrom(this.selection.first().fingerprint),name:"Create Silence"}]}ngOnInit(){super.ngOnInit(),this.columns=[{name:"Name",prop:"labels.alertname",flexGrow:2},{name:"Job",prop:"labels.job",flexGrow:2},{name:"Severity",prop:"labels.severity"},{name:"State",prop:"status.state",cellTransformation:Ht.a.classAdding},{name:"Started",prop:"startsAt",pipe:this.cdDatePipe},{name:"URL",prop:"generatorURL",sortable:!1,cellTemplate:this.externalLinkTpl}]}updateSelection(e){this.selection=e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Jt.a),i.Mb(Ml),i.Mb(hr.a),i.Mb(Vt.a),i.Mb(vl))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-active-alert-list"]],viewQuery:function(e,t){var n;1&e&&i.Jc(Dl,!0),2&e&&i.zc(n=i.hc())&&(t.externalLinkTpl=n.first)},features:[i.xb([{provide:hr.a,useValue:new hr.a("silences")}]),i.vb],decls:5,vars:2,consts:function(){return[["type","info",4,"ngIf"],["identifier","fingerprint","selectionType","single",3,"data","columns","forceIdentifier","customCss","hasDetails","setExpandedRow","updateSelection",4,"ngIf"],["externalLinkTpl",""],["type","info"],"To see all active Prometheus alerts, please provide the URL to the API of Prometheus' Alertmanager as described in the " + "\ufffd#2\ufffd" + "" + "\ufffd/#2\ufffd" + ".",["section","prometheus"],["identifier","fingerprint","selectionType","single",3,"data","columns","forceIdentifier","customCss","hasDetails","setExpandedRow","updateSelection"],[1,"table-actions",3,"permission","selection","tableActions"],["cdTableDetail","",3,"renderObjects","hideEmpty","appendParentKey","data","customCss","autoReload",4,"ngIf"],["cdTableDetail","",3,"renderObjects","hideEmpty","appendParentKey","data","customCss","autoReload"],["target","_blank",3,"href"],[3,"ngClass"]]},template:function(e,t){1&e&&(i.Nb(0,"cd-prometheus-tabs"),i.Mc(1,Tl,3,0,"cd-alert-panel",0),i.Mc(2,Ol,3,9,"cd-table",1),i.Mc(3,Rl,3,4,"ng-template",null,2,i.Nc)),2&e&&(i.yb(1),i.pc("ngIf",!t.isAlertmanagerConfigured),i.yb(1),i.pc("ngIf",t.isAlertmanagerConfigured))},directives:[xl,wt.r,pr.a,Cr.a,Bt.a,Sn.a,en.a,wt.p],styles:[""]}),e})(),Al=(()=>{class e{transform(e){const t=[[""+Math.floor(e/31536e3),"years"],[""+Math.floor(e%31536e3/86400),"days"],[""+Math.floor(e%86400/3600),"hours"],[""+Math.floor(e%3600/60),"minutes"],[""+Math.floor(e%60),"seconds"]];let n="";for(let i=0,r=t.length;i<r;i++)"0"!==t[i][0]&&(n+=" "+t[i][0]+" "+("1"===t[i][0]?t[i][1].substr(0,t[i][1].length-1):t[i][1]));return n.trim()||"1 second"}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"duration",type:e,pure:!1}),e})();function Il(e,t){1&e&&(i.Sb(0,"cd-alert-panel",2),i.cc(1,3),i.Nb(2,"cd-doc",4),i.Zb(),i.Rb())}function Pl(e,t){if(1&e&&i.Nb(0,"cd-table-key-value",7),2&e){const e=i.ic(2);i.pc("data",e.expandedRow)("renderObjects",!0)("hideKeys",e.hideKeys)}}function Nl(e,t){if(1&e){const e=i.Tb();i.Sb(0,"cd-table",5),i.gc("updateSelection",(function(t){return i.Dc(e),i.ic().setExpandedRow(t)})),i.Mc(1,Pl,1,3,"cd-table-key-value",6),i.Rb()}if(2&e){const e=i.ic();i.pc("data",e.prometheusAlertService.rules)("columns",e.columns)("hasDetails",!0)("selectionType","single"),i.yb(1),i.pc("ngIf",e.expandedRow)}}let jl=(()=>{class e extends kl{constructor(e,t){super(t),this.prometheusAlertService=e,this.hideKeys=["alerts","type"]}ngOnInit(){super.ngOnInit(),this.columns=[{prop:"name",name:"Name"},{prop:"labels.severity",name:"Severity"},{prop:"group",name:"Group"},{prop:"duration",name:"Duration",pipe:new Al},{prop:"query",name:"Query",isHidden:!0},{prop:"annotations.description",name:"Description"}]}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Ml),i.Mb(vl))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-rules-list"]],features:[i.vb],decls:3,vars:2,consts:function(){return[["type","info",4,"ngIf"],[3,"data","columns","hasDetails","selectionType","updateSelection",4,"ngIf"],["type","info"],"To see all configured Prometheus alerts, please provide the URL to the API of Prometheus as described in the " + "\ufffd#2\ufffd" + "" + "\ufffd/#2\ufffd" + ".",["section","prometheus"],[3,"data","columns","hasDetails","selectionType","updateSelection"],["cdTableDetail","",3,"data","renderObjects","hideKeys",4,"ngIf"],["cdTableDetail","",3,"data","renderObjects","hideKeys"]]},template:function(e,t){1&e&&(i.Nb(0,"cd-prometheus-tabs"),i.Mc(1,Il,3,0,"cd-alert-panel",0),i.Mc(2,Nl,2,5,"cd-table",1)),2&e&&(i.yb(1),i.pc("ngIf",!t.isPrometheusConfigured),i.yb(1),i.pc("ngIf",t.isPrometheusConfigured))},directives:[xl,wt.r,pr.a,Cr.a,Bt.a,en.a],styles:[""]}),e})();var Fl=n("WE5d");let Yl=(()=>{class e{constructor(){this.valueAttributePath={alertname:"name",instance:"alerts.0.labels.instance",job:"alerts.0.labels.job",severity:"labels.severity"}}singleMatch(e,t){return this.multiMatch([e],t)}multiMatch(e,t){if(!e.some(e=>e.isRegex))return e.forEach(e=>{t=this.getMatchedRules(e,t)}),this.describeMatch(t)}getMatchedRules(e,t){const n=this.getAttributePath(e.name);return t.filter(t=>jt.a.get(t,n)===e.value)}describeMatch(e){let t=0;return e.forEach(e=>t+=e.alerts.length),{status:this.getMatchText(e.length,t),cssClass:t?"has-success":"has-warning"}}getAttributePath(e){return this.valueAttributePath[e]}getMatchText(e,t){const n={noRule:"Your matcher seems to match no currently defined rule or active alert.",noAlerts:"no active alerts",alert:"1 active alert",alerts:"" + t + " active alerts",rule:"Matches 1 rule",rules:"Matches " + e + " rules"};return e?"" + (e > 1 ? n.rules : n.rule) + " with " + (t ? t > 1 ? n.alerts : n.alert : n.noAlerts) + ".":n.noRule}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),zl=(()=>{class e{calculateDuration(e,t){const n=+e,i=+t,r=this.getDuration(Math.abs(n-i));return n>i?"-"+r:r}getDuration(e){const t=new Date(e),n=t.getUTCHours(),i=t.getUTCMinutes(),r=(e,t)=>e?e+t:e;return[r(Math.floor(e/864e5),"d"),r(n,"h"),r(i,"m")].filter(e=>e).join(" ")}calculateDate(e,t,n){const i=+e;if(jt.a.isNaN(i))return;const r=this.getDurationMs(t)*(n?-1:1);return new Date(i+r)}getDurationMs(e){return 6e4*(60*(24*this.getNumbersFromString(e,"d")+this.getNumbersFromString(e,"h"))+this.getNumbersFromString(e,"m"))}getNumbersFromString(e,t){const n=e.match(new RegExp("[0-9 ]+"+t,"i"));return n?parseInt(n[0],10):0}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var $l=n("XNiG"),Hl=n("VRyK"),Wl=n("7o/Q"),Vl=n("D0XW");function Bl(e,t=Vl.a){return n=>n.lift(new Ul(e,t))}class Ul{constructor(e,t){this.dueTime=e,this.scheduler=t}call(e,t){return t.subscribe(new Gl(e,this.dueTime,this.scheduler))}}class Gl extends Wl.a{constructor(e,t,n){super(e),this.dueTime=t,this.scheduler=n,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(e){this.clearDebounce(),this.lastValue=e,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(ql,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:e}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(e)}}clearDebounce(){const e=this.debouncedSubscription;null!==e&&(this.remove(e),e.unsubscribe(),this.debouncedSubscription=null)}}function ql(e){e.debouncedNext()}var Jl=n("/uUt"),Ql=n("pLZG");function Kl(e,t){if(1&e&&(i.Sb(0,"option",27),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e),i.yb(1),i.Qc(" ",e," ")}}function Zl(e,t){1&e&&(i.Sb(0,"span",28),i.Wb(1,29),i.Rb())}function Xl(e,t){1&e&&(i.Sb(0,"span",28),i.Wb(1,30),i.Rb())}function eu(e,t){if(1&e&&(i.Sb(0,"div",31),i.Sb(1,"span"),i.Oc(2),i.Rb(),i.Rb()),2&e){const e=i.ic();i.Bb("cd-col-form-offset ",e.matcherMatch.cssClass,""),i.yb(1),i.Bb("text-muted ",e.matcherMatch.cssClass,""),i.yb(1),i.Qc(" ",e.matcherMatch.status," ")}}let tu=(()=>{class e{constructor(e,t,n,r){this.formBuilder=e,this.silenceMatcher=t,this.activeModal=n,this.actionLabels=r,this.submitAction=new i.o,this.editMode=!1,this.nameAttributes=["alertname","instance","job","severity"],this.possibleValues=[],this.matcherMatch=void 0,this.valueClick=new $l.a,this.valueFocus=new $l.a,this.search=e=>Object(Hl.a)(e.pipe(Bl(200),Object(Jl.a)()),this.valueFocus,this.valueClick.pipe(Object(Ql.a)(()=>!this.typeahead.isPopupOpen()))).pipe(Object(Vi.a)(e=>(""===e?this.possibleValues:this.possibleValues.filter(t=>t.toLowerCase().indexOf(e.toLowerCase())>-1)).slice(0,10))),this.createForm(),this.subscribeToChanges()}createForm(){this.form=this.formBuilder.group({name:[null,[kn.A.required]],value:[{value:"",disabled:!0},[kn.A.required]],isRegex:new kn.h(!1)})}subscribeToChanges(){this.form.get("name").valueChanges.subscribe(e=>{null!==e?(this.setPossibleValues(e),this.form.get("value").enable()):this.form.get("value").disable()}),this.form.get("value").valueChanges.subscribe(e=>{const t=this.form.value;t.value=e,this.matcherMatch=this.silenceMatcher.singleMatch(t,this.rules)})}setPossibleValues(e){this.possibleValues=jt.a.sortedUniq(this.rules.map(t=>jt.a.get(t,this.silenceMatcher.getAttributePath(e))).filter(e=>e))}getMode(){return this.editMode?this.actionLabels.EDIT:this.actionLabels.ADD}preFillControls(e){this.form.setValue(e)}onSubmit(){this.submitAction.emit(this.form.value),this.activeModal.close()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(So.a),i.Mb(Yl),i.Mb(Qt.a),i.Mb(gn.b))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-silence-matcher-modal"]],viewQuery:function(e,t){var n;1&e&&i.Jc(Qt.G,!0),2&e&&i.zc(n=i.hc())&&(t.typeahead=n.first)},outputs:{submitAction:"submitAction"},decls:31,vars:11,consts:function(){var e;return e="{VAR_SELECT, select, true {Edit} other {Add}}",e=i.bc(e,{VAR_SELECT:"\ufffd0\ufffd"}),[[3,"modalRef"],[1,"modal-title"],"" + e + " Matcher",[1,"modal-content"],["novalidate","",1,"form",3,"formGroup"],["formDir","ngForm"],[1,"modal-body"],[1,"form-group","row"],["for","name",1,"cd-col-form-label","required"],"Name",[1,"cd-col-form-input"],["id","name","formControlName","name","name","name",1,"form-control"],[3,"ngValue"],"-- Select an attribute to match against --",[3,"value",4,"ngFor","ngForOf"],["class","help-block",4,"ngIf"],["for","value",1,"cd-col-form-label","required"],"Value",["id","value","container","body","type","text","formControlName","value",1,"form-control",3,"ngbTypeahead","focus","click"],["id","match-state",3,"class",4,"ngIf"],[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["type","checkbox","formControlName","isRegex","name","is-regex","id","is-regex",1,"custom-control-input"],["for","is-regex",1,"custom-control-label"],"Use regular expression",[1,"modal-footer"],[3,"form","submitText","submitActionEvent"],[3,"value"],[1,"help-block"],"This field is required!","This field is required!",["id","match-state"]]},template:function(e,t){if(1&e&&(i.Sb(0,"cd-modal",0),i.Sb(1,"span",1),i.Wb(2,2),i.Rb(),i.Qb(3,3),i.Sb(4,"form",4,5),i.Sb(6,"div",6),i.Sb(7,"div",7),i.Sb(8,"label",8),i.Wb(9,9),i.Rb(),i.Sb(10,"div",10),i.Sb(11,"select",11),i.Sb(12,"option",12),i.Wb(13,13),i.Rb(),i.Mc(14,Kl,2,2,"option",14),i.Rb(),i.Mc(15,Zl,2,0,"span",15),i.Rb(),i.Rb(),i.Sb(16,"div",7),i.Sb(17,"label",16),i.Wb(18,17),i.Rb(),i.Sb(19,"div",10),i.Sb(20,"input",18),i.gc("focus",(function(e){return t.valueFocus.next(e.target.value)}))("click",(function(e){return t.valueClick.next(e.target.value)})),i.Rb(),i.Mc(21,Xl,2,0,"span",15),i.Rb(),i.Mc(22,eu,3,7,"div",19),i.Rb(),i.Sb(23,"div",7),i.Sb(24,"div",20),i.Sb(25,"div",21),i.Nb(26,"input",22),i.Sb(27,"label",23),i.Wb(28,24),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Sb(29,"div",25),i.Sb(30,"cd-form-button-panel",26),i.gc("submitActionEvent",(function(){return t.onSubmit()})),i.Rb(),i.Rb(),i.Rb(),i.Pb(),i.Rb()),2&e){const e=i.Ac(5);i.pc("modalRef",t.activeModal),i.yb(2),i.ac(t.editMode),i.Xb(2),i.yb(2),i.pc("formGroup",t.form),i.yb(8),i.pc("ngValue",null),i.yb(2),i.pc("ngForOf",t.nameAttributes),i.yb(1),i.pc("ngIf",t.form.showError("name",e,"required")),i.yb(5),i.pc("ngbTypeahead",t.search),i.yb(1),i.pc("ngIf",t.form.showError("value",e,"required")),i.yb(1),i.pc("ngIf",t.form.getValue("value")&&!t.form.getValue("isRegex")&&t.matcherMatch),i.yb(8),i.pc("form",t.form)("submitText",t.getMode())}},directives:[_a.a,kn.C,kn.r,Zn.a,kn.k,Xn.a,On.a,kn.z,ei.a,kn.q,kn.i,kn.u,kn.B,wt.q,wt.r,kn.d,Qt.G,kn.b,ti.a],styles:[""]}),e})();var nu=n("MAOJ");function iu(e,t){if(1&e&&(i.Qb(0),i.Nb(1,"input",54),i.Pb()),2&e){const e=i.ic().$implicit,t=i.ic(),n=t.index,r=t.matcher;i.yb(1),i.sc("id","matcher-",e.attribute,"-",n,""),i.pc("value",r[e.attribute])}}function ru(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"div",47),i.Sb(2,"div",55),i.Nb(3,"input",56),i.Rb(),i.Rb(),i.Pb()),2&e){const e=i.ic().$implicit,t=i.ic(),n=t.index,r=t.matcher;i.yb(3),i.sc("id","matcher-",e.attribute,"-",n,""),i.pc("checked",r[e.attribute])}}const su=function(e){return[e]};function ou(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"div",52),i.Sb(2,"span",53),i.Nb(3,"i",38),i.Rb(),i.Rb(),i.Mc(4,iu,2,3,"ng-container",7),i.Mc(5,ru,4,3,"ng-container",7),i.Pb()),2&e){const e=t.$implicit;i.yb(2),i.pc("ngbTooltip",e.tooltip),i.yb(1),i.pc("ngClass",i.uc(4,su,e.icon)),i.yb(1),i.pc("ngIf","isRegex"!==e.attribute),i.yb(1),i.pc("ngIf","isRegex"===e.attribute)}}function au(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",46),i.Mc(1,ou,6,6,"ng-container",34),i.Sb(2,"span",47),i.Sb(3,"button",48),i.Yb(4,49),i.gc("click",(function(){i.Dc(e);const n=t.index;return i.ic().showMatcherModal(n)})),i.Nb(5,"i",38),i.Rb(),i.Sb(6,"button",48),i.Yb(7,50),i.gc("click",(function(){i.Dc(e);const n=t.index;return i.ic().deleteMatcher(n)})),i.Nb(8,"i",38),i.Rb(),i.Rb(),i.Rb(),i.Nb(9,"span",51)}if(2&e){const e=t.index,n=i.ic();i.yb(1),i.pc("ngForOf",n.matcherConfig),i.yb(2),i.rc("id","matcher-edit-",e,""),i.yb(2),i.pc("ngClass",i.uc(5,su,n.icons.edit)),i.yb(1),i.rc("id","matcher-delete-",e,""),i.yb(2),i.pc("ngClass",i.uc(7,su,n.icons.trash))}}function cu(e,t){1&e&&(i.Sb(0,"cd-helper"),i.Wb(1,57),i.Rb())}function lu(e,t){1&e&&(i.Sb(0,"span",58),i.Wb(1,59),i.Rb())}function uu(e,t){1&e&&(i.Sb(0,"span",58),i.Wb(1,60),i.Rb())}function du(e,t){1&e&&(i.Sb(0,"span",58),i.Wb(1,61),i.Rb())}function hu(e,t){1&e&&(i.Sb(0,"span",58),i.Wb(1,62),i.Rb())}function fu(e,t){1&e&&(i.Sb(0,"span",58),i.Wb(1,63),i.Rb())}const pu=function(e,t){return{"text-warning":e,"text-danger":t}};function mu(e,t){if(1&e&&(i.Sb(0,"h5",38),i.Sb(1,"strong"),i.Wb(2,64),i.Rb(),i.Rb()),2&e){i.ic();const e=i.Ac(4);i.pc("ngClass",i.vc(1,pu,!e.submitted,e.submitted))}}function bu(e,t){1&e&&i.Ob(0)}const gu=function(e,t){return{index:e,matcher:t}};function _u(e,t){if(1&e&&(i.Sb(0,"span"),i.Mc(1,bu,1,0,"ng-container",65),i.Rb()),2&e){const e=t.$implicit,n=t.index;i.ic();const r=i.Ac(1);i.yb(1),i.pc("ngTemplateOutlet",r)("ngTemplateOutletContext",i.vc(2,gu,n,e))}}function yu(e,t){if(1&e&&(i.Sb(0,"div",66),i.Sb(1,"span"),i.Oc(2),i.Rb(),i.Rb()),2&e){const e=i.ic();i.Bb("cd-col-form-offset ",e.matcherMatch.cssClass,""),i.yb(1),i.Bb("text-muted ",e.matcherMatch.cssClass,""),i.yb(1),i.Qc(" ",e.matcherMatch.status," ")}}function vu(e,t){if(1&e&&i.Nb(0,"cd-date-time-picker",67),2&e){const e=i.ic();i.pc("control",e.form.get("startsAt"))("hasSeconds",!1)}}function wu(e,t){if(1&e&&i.Nb(0,"cd-date-time-picker",67),2&e){const e=i.ic();i.pc("control",e.form.get("endsAt"))("hasSeconds",!1)}}const Su=function(e){return{"btn-warning":e}};let Mu=(()=>{class e{constructor(e,t,n,i,r,s,o,a,c,l,u){this.router=e,this.authStorageService=t,this.formBuilder=n,this.prometheusService=i,this.notificationService=r,this.route=s,this.timeDiff=o,this.modalService=a,this.silenceMatcher=c,this.actionLabels=l,this.succeededLabels=u,this.icons=_n.a,this.recreate=!1,this.edit=!1,this.resource="silence",this.matchers=[],this.matcherMatch=void 0,this.matcherConfig=[{tooltip:"Attribute name",icon:this.icons.paragraph,attribute:"name"},{tooltip:"Value",icon:this.icons.terminal,attribute:"value"},{tooltip:"Regular expression",icon:this.icons.magic,attribute:"isRegex"}],this.datetimeFormat="YYYY-MM-DD HH:mm",this.init()}init(){this.chooseMode(),this.authenticate(),this.createForm(),this.setupDates(),this.getData()}chooseMode(){this.edit=this.router.url.startsWith("/monitoring/silences/edit"),this.recreate=this.router.url.startsWith("/monitoring/silences/recreate"),this.action=this.edit?this.actionLabels.EDIT:this.recreate?this.actionLabels.RECREATE:this.actionLabels.CREATE}authenticate(){if(this.permission=this.authStorageService.getPermissions().prometheus,!this.permission.read||!(this.edit?this.permission.update:this.permission.create))throw new Fl.b}createForm(){const e=Cn.a.custom("format",e=>!(""===e||nn()(e,this.datetimeFormat).isValid()));this.form=this.formBuilder.group({startsAt:["",[kn.A.required,e]],duration:["2h",[kn.A.min(1)]],endsAt:["",[kn.A.required,e]],createdBy:[this.authStorageService.getUsername(),[kn.A.required]],comment:[null,[kn.A.required]]},{validators:Cn.a.custom("matcherRequired",()=>0===this.matchers.length)})}setupDates(){const e=nn()().format(this.datetimeFormat);this.form.silentSet("startsAt",e),this.updateDate(),this.subscribeDateChanges()}updateDate(e){const t=nn()(this.form.getValue(e?"endsAt":"startsAt"),this.datetimeFormat).toDate(),n=this.timeDiff.calculateDate(t,this.form.getValue("duration"),e);if(n){const t=nn()(n).format(this.datetimeFormat);this.form.silentSet(e?"startsAt":"endsAt",t)}}subscribeDateChanges(){this.form.get("startsAt").valueChanges.subscribe(()=>{this.onDateChange()}),this.form.get("duration").valueChanges.subscribe(()=>{this.updateDate()}),this.form.get("endsAt").valueChanges.subscribe(()=>{this.onDateChange(!0)})}onDateChange(e){const t=nn()(this.form.getValue("startsAt"),this.datetimeFormat),n=nn()(this.form.getValue("endsAt"),this.datetimeFormat);t.isBefore(n)?this.updateDuration():this.updateDate(e)}updateDuration(){const e=nn()(this.form.getValue("startsAt"),this.datetimeFormat).toDate(),t=nn()(this.form.getValue("endsAt"),this.datetimeFormat).toDate();this.form.silentSet("duration",this.timeDiff.calculateDuration(e,t))}getData(){this.getRules(),this.getModeSpecificData()}getRules(){this.prometheusService.ifPrometheusConfigured(()=>this.prometheusService.getRules().subscribe(e=>{this.rules=e.groups.reduce((e,t)=>jt.a.concat(e,t.rules),[])},()=>{this.prometheusService.disablePrometheusConfig(),this.rules=[]}),()=>{this.rules=[],this.notificationService.show(yn.a.info,"Please add your Prometheus host to the dashboard configuration and refresh the page",void 0,void 0,"Prometheus")})}getModeSpecificData(){this.route.params.subscribe(e=>{e.id&&(this.edit||this.recreate?this.prometheusService.getSilences(e).subscribe(e=>{this.fillFormWithSilence(e[0])}):this.prometheusService.getAlerts(e).subscribe(e=>{this.fillFormByAlert(e[0])}))})}fillFormWithSilence(e){this.id=e.id,this.edit&&(["startsAt","endsAt"].forEach(t=>this.form.silentSet(t,nn()(e[t]).format(this.datetimeFormat))),this.updateDuration()),["createdBy","comment"].forEach(t=>this.form.silentSet(t,e[t])),this.matchers=e.matchers,this.validateMatchers()}validateMatchers(){this.rules?(this.matcherMatch=this.silenceMatcher.multiMatch(this.matchers,this.rules),this.form.markAsDirty(),this.form.updateValueAndValidity()):window.setTimeout(()=>this.validateMatchers(),100)}fillFormByAlert(e){const t=e.labels;Object.keys(t).forEach(e=>this.setMatcher({name:e,value:t[e],isRegex:!1}))}setMatcher(e,t){jt.a.isNumber(t)?this.matchers[t]=e:this.matchers.push(e),this.validateMatchers()}showMatcherModal(e){const t=this.modalService.show(tu).componentInstance;t.rules=this.rules,jt.a.isNumber(e)&&(t.editMode=!0,t.preFillControls(this.matchers[e])),t.submitAction.subscribe(t=>{this.setMatcher(t,e)})}deleteMatcher(e){this.matchers.splice(e,1),this.validateMatchers()}submit(){this.form.invalid||this.prometheusService.setSilence(this.getSubmitData()).subscribe(e=>{this.router.navigate(["/monitoring/silences"]),this.notificationService.show(yn.a.success,this.getNotificationTile(e.body.silenceId),void 0,void 0,"Prometheus")},()=>this.form.setErrors({cdSubmitButton:!0}))}getSubmitData(){const e=this.form.value;return delete e.duration,e.startsAt=nn()(e.startsAt,this.datetimeFormat).toISOString(),e.endsAt=nn()(e.endsAt,this.datetimeFormat).toISOString(),e.matchers=this.matchers,this.edit&&(e.id=this.id),e}getNotificationTile(e){let t;return t=this.edit?this.succeededLabels.EDITED:this.recreate?this.succeededLabels.RECREATED:this.succeededLabels.CREATED,`${t} ${this.resource} ${e}`}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Pt.e),i.Mb(Jt.a),i.Mb(So.a),i.Mb(vl),i.Mb(wn.a),i.Mb(Pt.a),i.Mb(zl),i.Mb(vn.a),i.Mb(Yl),i.Mb(gn.b),i.Mb(gn.d))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-prometheus-form"]],decls:71,vars:30,consts:function(){return[["matcherTpl",""],[1,"cd-col-form"],["name","form","novalidate","",1,"form",3,"formGroup"],["formDir","ngForm"],[1,"card"],[1,"card-header"]," " + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + " ",[4,"ngIf"],[1,"card-body"],[1,"form-group","row"],["for","created-by",1,"cd-col-form-label","required"],"Creator",[1,"cd-col-form-input"],["formControlName","createdBy","id","created-by","name","created-by","type","text",1,"form-control"],["class","invalid-feedback",4,"ngIf"],["for","comment",1,"cd-col-form-label","required"],"Comment",["formControlName","comment","id","comment","name","comment","type","text",1,"form-control"],["for","starts-at",1,"cd-col-form-label"],[1,"required"],"Start time","If the start time lies in the past the creation time will be used",["formControlName","startsAt","triggers","manual",1,"form-control",3,"ngbPopover","click","keypress"],["ps","ngbPopover"],["for","duration",1,"cd-col-form-label","required"],"Duration",["formControlName","duration","id","duration","name","duration","type","text",1,"form-control"],["for","ends-at",1,"cd-col-form-label","required"],"End time",["formControlName","endsAt","triggers","manual",1,"form-control",3,"ngbPopover","click","keypress"],["pe","ngbPopover"],"Matchers",[1,"cd-col-form-offset"],[3,"ngClass",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"row"],[1,"col-12"],["type","button","id","add-matcher",1,"btn","btn-light","float-right","my-3",3,"ngClass","click"],[3,"ngClass"],"Add matcher",["id","match-state",3,"class",4,"ngIf"],[1,"card-footer"],[1,"text-right"],[3,"form","submitText","submitActionEvent"],["popStart",""],["popEnd",""],[1,"input-group","my-2"],[1,"input-group-append"],["type","button",1,"btn","btn-light",3,"id","click",6,"ngbTooltip"],["ngbTooltip","Edit"],["ngbTooltip","Delete"],[1,"help-block"],[1,"input-group-prepend"],[1,"input-group-text",3,"ngbTooltip"],["type","text","disabled","","readonly","",1,"form-control",3,"id","value"],[1,"input-group-text"],["type","checkbox","disabled","","readonly","",3,"id","checked"],"Editing a silence will expire the old silence and recreate it as a new silence",[1,"invalid-feedback"],"This field is required!","This field is required!","This field is required!","This field is required!","This field is required!","A silence requires at least one matcher",[4,"ngTemplateOutlet","ngTemplateOutletContext"],["id","match-state"],[3,"control","hasSeconds"]]},template:function(e,t){if(1&e){const e=i.Tb();i.Mc(0,au,10,9,"ng-template",null,0,i.Nc),i.Sb(2,"div",1),i.Sb(3,"form",2,3),i.Sb(5,"div",4),i.Sb(6,"div",5),i.Sb(7,"span"),i.Wb(8,6),i.jc(9,"titlecase"),i.jc(10,"upperFirst"),i.Rb(),i.Mc(11,cu,2,0,"cd-helper",7),i.Rb(),i.Sb(12,"div",8),i.Sb(13,"div",9),i.Sb(14,"label",10),i.Wb(15,11),i.Rb(),i.Sb(16,"div",12),i.Nb(17,"input",13),i.Mc(18,lu,2,0,"span",14),i.Rb(),i.Rb(),i.Sb(19,"div",9),i.Sb(20,"label",15),i.Wb(21,16),i.Rb(),i.Sb(22,"div",12),i.Sb(23,"textarea",17),i.Oc(24," "),i.Rb(),i.Mc(25,uu,2,0,"span",14),i.Rb(),i.Rb(),i.Sb(26,"div",9),i.Sb(27,"label",18),i.Sb(28,"span",19),i.Wb(29,20),i.Rb(),i.Sb(30,"cd-helper"),i.Wb(31,21),i.Rb(),i.Rb(),i.Sb(32,"div",12),i.Sb(33,"input",22,23),i.gc("click",(function(){return i.Dc(e),i.Ac(34).open()}))("keypress",(function(){return i.Dc(e),i.Ac(34).close()})),i.Rb(),i.Mc(35,du,2,0,"span",14),i.Rb(),i.Rb(),i.Sb(36,"div",9),i.Sb(37,"label",24),i.Wb(38,25),i.Rb(),i.Sb(39,"div",12),i.Nb(40,"input",26),i.Mc(41,hu,2,0,"span",14),i.Rb(),i.Rb(),i.Sb(42,"div",9),i.Sb(43,"label",27),i.Wb(44,28),i.Rb(),i.Sb(45,"div",12),i.Sb(46,"input",29,30),i.gc("click",(function(){return i.Dc(e),i.Ac(47).open()}))("keypress",(function(){return i.Dc(e),i.Ac(47).close()})),i.Rb(),i.Mc(48,fu,2,0,"span",14),i.Rb(),i.Rb(),i.Sb(49,"fieldset"),i.Sb(50,"legend",19),i.Wb(51,31),i.Rb(),i.Sb(52,"div",32),i.Mc(53,mu,3,4,"h5",33),i.Mc(54,_u,2,5,"span",34),i.Sb(55,"div",35),i.Sb(56,"div",36),i.Sb(57,"button",37),i.gc("click",(function(){return t.showMatcherModal()})),i.Nb(58,"i",38),i.Qb(59),i.Wb(60,39),i.Pb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Mc(61,yu,3,7,"div",40),i.Rb(),i.Rb(),i.Sb(62,"div",41),i.Sb(63,"div",42),i.Sb(64,"cd-form-button-panel",43),i.gc("submitActionEvent",(function(){return t.submit()})),i.jc(65,"titlecase"),i.jc(66,"upperFirst"),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Mc(67,vu,1,2,"ng-template",null,44,i.Nc),i.Mc(69,wu,1,2,"ng-template",null,45,i.Nc)}if(2&e){const e=i.Ac(4),n=i.Ac(68),r=i.Ac(70);i.yb(3),i.pc("formGroup",t.form),i.yb(7),i.ac(i.kc(9,18,t.action))(i.kc(10,20,t.resource)),i.Xb(8),i.yb(1),i.pc("ngIf",t.edit),i.yb(7),i.pc("ngIf",t.form.showError("createdBy",e,"required")),i.yb(7),i.pc("ngIf",t.form.showError("comment",e,"required")),i.yb(8),i.pc("ngbPopover",n),i.yb(2),i.pc("ngIf",t.form.showError("startsAt",e,"required")),i.yb(6),i.pc("ngIf",t.form.showError("duration",e,"required")),i.yb(5),i.pc("ngbPopover",r),i.yb(2),i.pc("ngIf",t.form.showError("endsAt",e,"required")),i.yb(5),i.pc("ngIf",0===t.matchers.length),i.yb(1),i.pc("ngForOf",t.matchers),i.yb(3),i.pc("ngClass",i.uc(26,Su,e.submitted&&0===t.matchers.length)),i.yb(1),i.pc("ngClass",i.uc(28,su,t.icons.add)),i.yb(3),i.pc("ngIf",t.matchers.length&&t.matcherMatch),i.yb(3),i.pc("form",t.form)("submitText",i.kc(65,22,t.action)+" "+i.kc(66,24,t.resource))}},directives:[kn.C,kn.r,Zn.a,kn.k,wt.r,Xn.a,On.a,kn.d,ei.a,kn.q,kn.i,Mo.a,Qt.w,wt.q,wt.p,ti.a,Qt.D,wt.w,nu.a],pipes:[wt.A,ir.a],styles:["textarea[_ngcontent-%COMP%]{resize:vertical}"]}),e})();var ku=n("w9WL"),xu=n("HDdC");function Du(e,t){1&e&&(i.Sb(0,"cd-alert-panel",2),i.cc(1,3),i.Nb(2,"cd-doc",4),i.Zb(),i.Rb())}function Tu(e,t){if(1&e&&i.Nb(0,"cd-table-key-value",8),2&e){const e=i.ic(2);i.pc("renderObjects",!0)("hideEmpty",!0)("appendParentKey",!1)("data",e.expandedRow)("customCss",e.customCss)("autoReload",!1)}}function Cu(e,t){if(1&e){const e=i.Tb();i.Sb(0,"cd-table",5),i.gc("setExpandedRow",(function(t){return i.Dc(e),i.ic().setExpandedRow(t)}))("fetchData",(function(){return i.Dc(e),i.ic().refresh()}))("updateSelection",(function(t){return i.Dc(e),i.ic().updateSelection(t)})),i.Nb(1,"cd-table-actions",6),i.Mc(2,Tu,1,6,"cd-table-key-value",7),i.Rb()}if(2&e){const e=i.ic();i.pc("data",e.silences)("columns",e.columns)("forceIdentifier",!0)("customCss",e.customCss)("sorts",e.sorts)("hasDetails",!0),i.yb(1),i.pc("permission",e.permission)("selection",e.selection)("tableActions",e.tableActions),i.yb(1),i.pc("ngIf",e.expandedRow)}}let Ou=(()=>{class e extends kl{constructor(e,t,n,i,r,s,o,a){super(a),this.authStorageService=e,this.cdDatePipe=t,this.modalService=n,this.notificationService=i,this.urlBuilder=r,this.actionLabels=s,this.succeededLabels=o,this.silences=[],this.selection=new Wt.a,this.customCss={"badge badge-danger":"active","badge badge-warning":"pending","badge badge-default":"expired"},this.sorts=[{prop:"endsAt",dir:ku.i.desc}],this.permission=this.authStorageService.getPermissions().prometheus;const c=e=>e.first()&&e.first().status&&"expired"===e.first().status.state;this.tableActions=[{permission:"create",icon:_n.a.add,routerLink:()=>this.urlBuilder.getCreate(),canBePrimary:e=>!e.hasSingleSelection,name:this.actionLabels.CREATE},{permission:"create",canBePrimary:e=>e.hasSingleSelection&&c(e),disable:e=>!e.hasSingleSelection||e.first().cdExecuting||e.first().cdExecuting&&c(e)||!c(e),icon:_n.a.copy,routerLink:()=>this.urlBuilder.getRecreate(this.selection.first().id),name:this.actionLabels.RECREATE},{permission:"update",icon:_n.a.edit,canBePrimary:e=>e.hasSingleSelection&&!c(e),disable:e=>!e.hasSingleSelection||e.first().cdExecuting||e.first().cdExecuting&&!c(e)||c(e),routerLink:()=>this.urlBuilder.getEdit(this.selection.first().id),name:this.actionLabels.EDIT},{permission:"delete",icon:_n.a.trash,canBePrimary:e=>e.hasSingleSelection&&!c(e),disable:e=>!e.hasSingleSelection||e.first().cdExecuting||c(e),click:()=>this.expireSilence(),name:this.actionLabels.EXPIRE}],this.columns=[{name:"ID",prop:"id",flexGrow:3},{name:"Created by",prop:"createdBy",flexGrow:2},{name:"Started",prop:"startsAt",pipe:this.cdDatePipe},{name:"Updated",prop:"updatedAt",pipe:this.cdDatePipe},{name:"Ends",prop:"endsAt",pipe:this.cdDatePipe},{name:"Status",prop:"status.state",cellTransformation:Ht.a.classAdding}]}refresh(){this.prometheusService.ifAlertmanagerConfigured(()=>{this.prometheusService.getSilences().subscribe(e=>{this.silences=e},()=>{this.prometheusService.disableAlertmanagerConfig()})})}updateSelection(e){this.selection=e}expireSilence(){const e=this.selection.first().id,t="Silence",n="Prometheus";this.modalRef=this.modalService.show(bn.a,{itemDescription:t,itemNames:[e],actionDescription:this.actionLabels.EXPIRE,submitActionObservable:()=>new xu.a(i=>{this.prometheusService.expireSilence(e).subscribe(()=>{this.notificationService.show(yn.a.success,`${this.succeededLabels.EXPIRED} ${t} ${e}`,void 0,void 0,n)},e=>{e.application=n,i.error(e)},()=>{i.complete(),this.refresh()})})})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Jt.a),i.Mb(Vt.a),i.Mb(vn.a),i.Mb(wn.a),i.Mb(hr.a),i.Mb(gn.b),i.Mb(gn.d),i.Mb(vl))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-silences-list"]],features:[i.xb([{provide:hr.a,useValue:new hr.a("monitoring/silences")}]),i.vb],decls:3,vars:2,consts:function(){return[["type","info",4,"ngIf"],["selectionType","single",3,"data","columns","forceIdentifier","customCss","sorts","hasDetails","setExpandedRow","fetchData","updateSelection",4,"ngIf"],["type","info"],"To enable Silences, please provide the URL to the API of the Prometheus' Alertmanager as described in the " + "\ufffd#2\ufffd" + "" + "\ufffd/#2\ufffd" + ".",["section","prometheus"],["selectionType","single",3,"data","columns","forceIdentifier","customCss","sorts","hasDetails","setExpandedRow","fetchData","updateSelection"],[1,"table-actions",3,"permission","selection","tableActions"],["cdTableDetail","",3,"renderObjects","hideEmpty","appendParentKey","data","customCss","autoReload",4,"ngIf"],["cdTableDetail","",3,"renderObjects","hideEmpty","appendParentKey","data","customCss","autoReload"]]},template:function(e,t){1&e&&(i.Nb(0,"cd-prometheus-tabs"),i.Mc(1,Du,3,0,"cd-alert-panel",0),i.Mc(2,Cu,3,10,"cd-table",1)),2&e&&(i.yb(1),i.pc("ngIf",!t.isAlertmanagerConfigured),i.yb(1),i.pc("ngIf",t.isAlertmanagerConfigured))},directives:[xl,wt.r,pr.a,Cr.a,Bt.a,Sn.a,en.a],styles:[""]}),e})();var Lu=n("Ekvf"),Ru=n("a96k"),Eu=n("ppaS"),Au=n("D4zM");function Iu(e,t){if(1&e&&(i.Sb(0,"option",29),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e),i.yb(1),i.Qc(" ",e," ")}}function Pu(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,31),i.Rb())}function Nu(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,32),i.Rb())}function ju(e,t){1&e&&(i.Sb(0,"span",30),i.cc(1,33),i.Nb(2,"strong"),i.Zb(),i.Rb())}function Fu(e,t){1&e&&(i.Sb(0,"div",7),i.Sb(1,"label",34),i.Wb(2,35),i.Rb(),i.Sb(3,"div",10),i.Sb(4,"select",36),i.Sb(5,"option",37),i.Wb(6,38),i.Rb(),i.Sb(7,"option",39),i.Wb(8,40),i.Rb(),i.Rb(),i.Rb(),i.Rb())}function Yu(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,44),i.Rb())}function zu(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",7),i.Sb(1,"label",41),i.Wb(2,42),i.Rb(),i.Sb(3,"div",10),i.Sb(4,"input",43),i.gc("focus",(function(t){return i.Dc(e),i.ic().labelFocus.next(t.target.value)}))("click",(function(t){return i.Dc(e),i.ic().labelClick.next(t.target.value)})),i.Rb(),i.Mc(5,Yu,2,0,"span",15),i.Rb(),i.Rb()}if(2&e){const e=i.ic(),t=i.Ac(2);i.yb(4),i.pc("ngbTypeahead",e.searchLabels),i.yb(1),i.pc("ngIf",e.serviceForm.showError("label",t,"required"))}}function $u(e,t){if(1&e&&(i.Sb(0,"div",7),i.Sb(1,"label",45),i.Wb(2,46),i.Rb(),i.Sb(3,"div",10),i.Nb(4,"cd-select-badges",47),i.Rb(),i.Rb()),2&e){const e=i.ic();i.yb(4),i.pc("data",e.serviceForm.controls.hosts.value)("options",e.hosts.options)("messages",e.hosts.messages)}}function Hu(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,52),i.Rb())}function Wu(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,53),i.Rb())}function Vu(e,t){if(1&e&&(i.Sb(0,"div",7),i.Sb(1,"label",48),i.Sb(2,"span"),i.Wb(3,49),i.Rb(),i.Sb(4,"cd-helper"),i.Wb(5,50),i.Rb(),i.Rb(),i.Sb(6,"div",10),i.Nb(7,"input",51),i.Mc(8,Hu,2,0,"span",15),i.Mc(9,Wu,2,0,"span",15),i.Rb(),i.Rb()),2&e){const e=i.ic(),t=i.Ac(2);i.yb(8),i.pc("ngIf",e.serviceForm.showError("count",t,"min")),i.yb(1),i.pc("ngIf",e.serviceForm.showError("count",t,"pattern"))}}function Bu(e,t){1&e&&(i.Sb(0,"option",12),i.Wb(1,61),i.Rb()),2&e&&i.pc("ngValue",null)}function Uu(e,t){1&e&&(i.Sb(0,"option",12),i.Wb(1,62),i.Rb()),2&e&&i.pc("ngValue",null)}function Gu(e,t){1&e&&(i.Sb(0,"option",12),i.Wb(1,63),i.Rb()),2&e&&i.pc("ngValue",null)}function qu(e,t){if(1&e&&(i.Sb(0,"option",29),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e.pool_name),i.yb(1),i.Pc(e.pool_name)}}function Ju(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,64),i.Rb())}function Qu(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"div",7),i.Sb(2,"label",54),i.Wb(3,55),i.Rb(),i.Sb(4,"div",10),i.Sb(5,"select",56),i.Mc(6,Bu,2,1,"option",57),i.Mc(7,Uu,2,1,"option",57),i.Mc(8,Gu,2,1,"option",57),i.Mc(9,qu,2,2,"option",14),i.Rb(),i.Mc(10,Ju,2,0,"span",15),i.Rb(),i.Rb(),i.Sb(11,"div",7),i.Sb(12,"label",58),i.Wb(13,59),i.Rb(),i.Sb(14,"div",10),i.Nb(15,"input",60),i.Rb(),i.Rb(),i.Pb()),2&e){const e=i.ic(),t=i.Ac(2);i.yb(6),i.pc("ngIf",null===e.pools),i.yb(1),i.pc("ngIf",null!==e.pools&&0===e.pools.length),i.yb(1),i.pc("ngIf",null!==e.pools&&e.pools.length>0),i.yb(1),i.pc("ngForOf",e.pools),i.yb(1),i.pc("ngIf",e.serviceForm.showError("pool",t,"required"))}}function Ku(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,68),i.Rb())}function Zu(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,69),i.Rb())}function Xu(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,70),i.Rb())}function ed(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"div",7),i.Sb(2,"label",65),i.Wb(3,66),i.Rb(),i.Sb(4,"div",10),i.Nb(5,"input",67),i.Mc(6,Ku,2,0,"span",15),i.Mc(7,Zu,2,0,"span",15),i.Mc(8,Xu,2,0,"span",15),i.Rb(),i.Rb(),i.Pb()),2&e){const e=i.ic(),t=i.Ac(2);i.yb(6),i.pc("ngIf",e.serviceForm.showError("rgw_frontend_port",t,"pattern")),i.yb(1),i.pc("ngIf",e.serviceForm.showError("rgw_frontend_port",t,"min")),i.yb(1),i.pc("ngIf",e.serviceForm.showError("rgw_frontend_port",t,"max"))}}function td(e,t){1&e&&(i.Sb(0,"option",12),i.Wb(1,90),i.Rb()),2&e&&i.pc("ngValue",null)}function nd(e,t){1&e&&(i.Sb(0,"option",12),i.Wb(1,91),i.Rb()),2&e&&i.pc("ngValue",null)}function id(e,t){1&e&&(i.Sb(0,"option",12),i.Wb(1,92),i.Rb()),2&e&&i.pc("ngValue",null)}function rd(e,t){if(1&e&&(i.Sb(0,"option",29),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e.pool_name),i.yb(1),i.Pc(e.pool_name)}}function sd(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,93),i.Rb())}function od(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,94),i.Rb())}function ad(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,95),i.Rb())}function cd(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,96),i.Rb())}function ld(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,97),i.Rb())}function ud(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,98),i.Rb())}const dd=function(){return["iscsi"]},hd=function(e){return{required:e}};function fd(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"div",7),i.Sb(2,"label",54),i.Wb(3,71),i.Rb(),i.Sb(4,"div",10),i.Sb(5,"select",56),i.Mc(6,td,2,1,"option",57),i.Mc(7,nd,2,1,"option",57),i.Mc(8,id,2,1,"option",57),i.Mc(9,rd,2,2,"option",14),i.Rb(),i.Mc(10,sd,2,0,"span",15),i.Rb(),i.Rb(),i.Sb(11,"div",7),i.Sb(12,"label",72),i.Sb(13,"span"),i.Wb(14,73),i.Rb(),i.Sb(15,"cd-helper"),i.Sb(16,"span"),i.Wb(17,74),i.Rb(),i.Nb(18,"br"),i.Sb(19,"span"),i.cc(20,75),i.Nb(21,"b"),i.Zb(),i.Rb(),i.Rb(),i.Rb(),i.Sb(22,"div",10),i.Nb(23,"input",76),i.Rb(),i.Rb(),i.Sb(24,"div",7),i.Sb(25,"label",77),i.Wb(26,78),i.Rb(),i.Sb(27,"div",10),i.Nb(28,"input",79),i.Mc(29,od,2,0,"span",15),i.Mc(30,ad,2,0,"span",15),i.Mc(31,cd,2,0,"span",15),i.Rb(),i.Rb(),i.Sb(32,"div",7),i.Sb(33,"label",80),i.Wb(34,81),i.Rb(),i.Sb(35,"div",10),i.Nb(36,"input",82),i.Mc(37,ld,2,0,"span",15),i.Rb(),i.Rb(),i.Sb(38,"div",7),i.Sb(39,"label",83),i.Wb(40,84),i.Rb(),i.Sb(41,"div",10),i.Sb(42,"div",85),i.Nb(43,"input",86),i.Sb(44,"span",87),i.Nb(45,"button",88),i.Nb(46,"cd-copy-2-clipboard-button",89),i.Rb(),i.Mc(47,ud,2,0,"span",15),i.Rb(),i.Rb(),i.Rb(),i.Pb()),2&e){const e=i.ic(),t=i.Ac(2);i.yb(6),i.pc("ngIf",null===e.pools),i.yb(1),i.pc("ngIf",null!==e.pools&&0===e.pools.length),i.yb(1),i.pc("ngIf",null!==e.pools&&e.pools.length>0),i.yb(1),i.pc("ngForOf",e.pools),i.yb(1),i.pc("ngIf",e.serviceForm.showError("pool",t,"required")),i.yb(19),i.pc("ngIf",e.serviceForm.showError("api_port",t,"pattern")),i.yb(1),i.pc("ngIf",e.serviceForm.showError("api_port",t,"min")),i.yb(1),i.pc("ngIf",e.serviceForm.showError("api_port",t,"max")),i.yb(2),i.pc("ngClass",i.uc(13,hd,i.tc(12,dd).includes(e.serviceForm.controls.service_type.value))),i.yb(4),i.pc("ngIf",e.serviceForm.showError("api_user",t,"required")),i.yb(2),i.pc("ngClass",i.uc(16,hd,i.tc(15,dd).includes(e.serviceForm.controls.service_type.value))),i.yb(8),i.pc("ngIf",e.serviceForm.showError("api_password",t,"required"))}}function pd(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,107),i.Rb())}function md(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,108),i.Rb())}function bd(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",7),i.Sb(1,"label",102),i.Sb(2,"span"),i.Wb(3,103),i.Rb(),i.Sb(4,"cd-helper"),i.Wb(5,104),i.Rb(),i.Rb(),i.Sb(6,"div",10),i.Sb(7,"textarea",105),i.Oc(8," "),i.Rb(),i.Sb(9,"input",106),i.gc("change",(function(t){return i.Dc(e),i.ic(2).fileUpload(t.target.files,"ssl_cert")})),i.Rb(),i.Mc(10,pd,2,0,"span",15),i.Mc(11,md,2,0,"span",15),i.Rb(),i.Rb()}if(2&e){const e=i.ic(2),t=i.Ac(2);i.yb(10),i.pc("ngIf",e.serviceForm.showError("ssl_cert",t,"required")),i.yb(1),i.pc("ngIf",e.serviceForm.showError("ssl_cert",t,"pattern"))}}function gd(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,113),i.Rb())}function _d(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,114),i.Rb())}function yd(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",7),i.Sb(1,"label",109),i.Sb(2,"span"),i.Wb(3,110),i.Rb(),i.Sb(4,"cd-helper"),i.Wb(5,111),i.Rb(),i.Rb(),i.Sb(6,"div",10),i.Sb(7,"textarea",112),i.Oc(8," "),i.Rb(),i.Sb(9,"input",106),i.gc("change",(function(t){return i.Dc(e),i.ic(2).fileUpload(t.target.files,"ssl_key")})),i.Rb(),i.Mc(10,gd,2,0,"span",15),i.Mc(11,_d,2,0,"span",15),i.Rb(),i.Rb()}if(2&e){const e=i.ic(2),t=i.Ac(2);i.yb(10),i.pc("ngIf",e.serviceForm.showError("ssl_key",t,"required")),i.yb(1),i.pc("ngIf",e.serviceForm.showError("ssl_key",t,"pattern"))}}function vd(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"div",7),i.Sb(2,"div",19),i.Sb(3,"div",20),i.Nb(4,"input",99),i.Sb(5,"label",100),i.Wb(6,101),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Mc(7,bd,12,2,"div",24),i.Mc(8,yd,12,2,"div",24),i.Pb()),2&e){const e=i.ic();i.yb(7),i.pc("ngIf",e.serviceForm.controls.ssl.value),i.yb(1),i.pc("ngIf",e.serviceForm.controls.ssl.value)}}const wd=function(){return["mds","rgw","nfs","iscsi"]},Sd=function(){return["rgw","iscsi"]};let Md=(()=>{class e extends qn.a{constructor(e,t,n,i,r,s,o){super(),this.actionLabels=e,this.cephServiceService=t,this.formBuilder=n,this.hostService=i,this.poolService=r,this.router=s,this.taskWrapperService=o,this.serviceTypes=[],this.labelClick=new $l.a,this.labelFocus=new $l.a,this.searchLabels=e=>Object(Hl.a)(e.pipe(Bl(200),Object(Jl.a)()),this.labelFocus,this.labelClick.pipe(Object(Ql.a)(()=>!this.typeahead.isPopupOpen()))).pipe(Object(Vi.a)(e=>this.labels.filter(t=>t.toLowerCase().indexOf(e.toLowerCase())>-1).slice(0,10))),this.resource="service",this.hosts={options:[],messages:new lr.a({empty:"There are no hosts.",filter:"Filter hosts"})},this.createForm()}createForm(){this.serviceForm=this.formBuilder.group({service_type:[null,[kn.A.required]],service_id:[null,[Cn.a.requiredIf({service_type:"mds"}),Cn.a.requiredIf({service_type:"nfs"}),Cn.a.requiredIf({service_type:"iscsi"}),Cn.a.composeIf({service_type:"rgw"},[kn.A.required,Cn.a.custom("rgwPattern",e=>!jt.a.isEmpty(e)&&!/^[^.]+\.[^.]+(\.[^.]+)?$/.test(e))])]],placement:["hosts"],label:[null,[Cn.a.requiredIf({placement:"label",unmanaged:!1})]],hosts:[[]],count:[null,[Cn.a.number(!1),kn.A.min(1)]],unmanaged:[!1],pool:[null,[Cn.a.requiredIf({service_type:"nfs",unmanaged:!1}),Cn.a.requiredIf({service_type:"iscsi",unmanaged:!1})]],namespace:[null],rgw_frontend_port:[null,[Cn.a.number(!1),kn.A.min(1),kn.A.max(65535)]],trusted_ip_list:[null],api_port:[null,[Cn.a.number(!1),kn.A.min(1),kn.A.max(65535)]],api_user:[null,[Cn.a.requiredIf({service_type:"iscsi",unmanaged:!1})]],api_password:[null,[Cn.a.requiredIf({service_type:"iscsi",unmanaged:!1})]],ssl:[!1],ssl_cert:["",[Cn.a.composeIf({service_type:"rgw",unmanaged:!1,ssl:!0},[kn.A.required,Cn.a.sslCert()]),Cn.a.composeIf({service_type:"iscsi",unmanaged:!1,ssl:!0},[kn.A.required,Cn.a.sslCert()])]],ssl_key:["",[Cn.a.composeIf({service_type:"rgw",unmanaged:!1,ssl:!0},[kn.A.required,Cn.a.sslPrivKey()]),Cn.a.composeIf({service_type:"iscsi",unmanaged:!1,ssl:!0},[kn.A.required,Cn.a.sslPrivKey()])]]})}ngOnInit(){this.action=this.actionLabels.CREATE,this.cephServiceService.getKnownTypes().subscribe(e=>{this.serviceTypes=jt.a.difference(e,["container","osd"]).sort()}),this.hostService.list().subscribe(e=>{const t=[];jt.a.forEach(e,e=>{if(jt.a.get(e,"sources.orchestrator",!1)){const n=new Ru.a(!1,jt.a.get(e,"hostname"),"");t.push(n)}}),this.hosts.options=[...t]}),this.hostService.getLabels().subscribe(e=>{this.labels=e}),this.poolService.getList().subscribe(e=>{this.pools=e})}goToListView(){this.router.navigate(["/services"])}fileUpload(e,t){const n=e[0],i=new FileReader;i.addEventListener("load",e=>{const n=this.serviceForm.get(t);n.setValue(e.target.result),n.markAsDirty(),n.markAsTouched(),n.updateValueAndValidity()}),i.readAsText(n,"utf8")}onSubmit(){const e=this,t=this.serviceForm.value,n=t.service_id,i=t.service_type,r={service_type:i,placement:{},unmanaged:t.unmanaged};let s=i;if(jt.a.isString(n)&&!jt.a.isEmpty(n)&&(s=`${i}.${n}`,r.service_id=n),!t.unmanaged){switch(t.placement){case"hosts":t.hosts.length>0&&(r.placement.hosts=t.hosts);break;case"label":r.placement.label=t.label}switch(jt.a.isNumber(t.count)&&t.count>0&&(r.placement.count=t.count),i){case"nfs":r.pool=t.pool,jt.a.isString(t.namespace)&&!jt.a.isEmpty(t.namespace)&&(r.namespace=t.namespace);break;case"rgw":jt.a.isNumber(t.rgw_frontend_port)&&t.rgw_frontend_port>0&&(r.rgw_frontend_port=t.rgw_frontend_port),r.ssl=t.ssl,t.ssl&&(r.rgw_frontend_ssl_certificate=t.ssl_cert.trim(),r.rgw_frontend_ssl_key=t.ssl_key.trim());break;case"iscsi":r.pool=t.pool,jt.a.isString(t.trusted_ip_list)&&!jt.a.isEmpty(t.trusted_ip_list)&&(r.trusted_ip_list=t.trusted_ip_list.trim()),jt.a.isNumber(t.api_port)&&t.api_port>0&&(r.api_port=t.api_port),r.api_user=t.api_user,r.api_password=t.api_password,r.api_secure=t.ssl,t.ssl&&(r.ssl_cert=t.ssl_cert.trim(),r.ssl_key=t.ssl_key.trim())}}this.taskWrapperService.wrapTaskAroundCall({task:new er.a("service/"+gn.e.CREATE,{service_name:s}),call:this.cephServiceService.create(r)}).subscribe({error(){e.serviceForm.setErrors({cdSubmitButton:!0})},complete(){e.goToListView()}})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(gn.b),i.Mb(Fr),i.Mb(So.a),i.Mb(Xi),i.Mb(Lu.a),i.Mb(Pt.e),i.Mb(tr.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-service-form"]],viewQuery:function(e,t){var n;1&e&&i.Tc(Qt.G,!0),2&e&&i.zc(n=i.hc())&&(t.typeahead=n.first)},features:[i.vb],decls:44,vars:31,consts:function(){return[[1,"cd-col-form"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"card"],[1,"card-header"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"card-body"],[1,"form-group","row"],["for","service_type",1,"cd-col-form-label","required"],"Type",[1,"cd-col-form-input"],["id","service_type","formControlName","service_type",1,"form-control","custom-select"],[3,"ngValue"],"-- Select a service type --",[3,"value",4,"ngFor","ngForOf"],["class","invalid-feedback",4,"ngIf"],["for","service_id",1,"cd-col-form-label",3,"ngClass"],"Id",["id","service_id","type","text","formControlName","service_id",1,"form-control"],[1,"cd-col-form-offset"],[1,"custom-control","custom-checkbox"],["id","unmanaged","type","checkbox","formControlName","unmanaged",1,"custom-control-input"],["for","unmanaged",1,"custom-control-label"],"Unmanaged",["class","form-group row",4,"ngIf"],[4,"ngIf"],[1,"card-footer"],[1,"text-right"],[3,"form","submitText","submitActionEvent"],[3,"value"],[1,"invalid-feedback"],"This field is required.","This field is required.","The value does not match the pattern " + "\ufffd#2\ufffd" + "<realm_name>.<zone_name>[.<subcluster>]" + "\ufffd/#2\ufffd" + ".",["for","placement",1,"cd-col-form-label"],"Placement",["id","placement","formControlName","placement",1,"form-control","custom-select"],["value","hosts"],"Hosts",["value","label"],"Label",["for","label",1,"cd-col-form-label"],"Label",["id","label","type","text","formControlName","label",1,"form-control",3,"ngbTypeahead","focus","click"],"This field is required.",["for","hosts",1,"cd-col-form-label"],"Hosts",["id","hosts",3,"data","options","messages"],["for","count",1,"cd-col-form-label"],"Count","Only that number of daemons will be created.",["id","count","type","number","formControlName","count","min","1",1,"form-control"],"The value must be at least 1.","The entered value needs to be a number.",["for","pool",1,"cd-col-form-label","required"],"Pool",["id","pool","name","pool","formControlName","pool",1,"form-control","custom-select"],[3,"ngValue",4,"ngIf"],["for","namespace",1,"cd-col-form-label"],"Namespace",["id","namespace","type","text","formControlName","namespace",1,"form-control"],"Loading...","-- No pools available --","-- Select a pool --","This field is required.",["for","rgw_frontend_port",1,"cd-col-form-label"],"Port",["id","rgw_frontend_port","type","number","formControlName","rgw_frontend_port","min","1","max","65535",1,"form-control"],"The entered value needs to be a number.","The value must be at least 1.","The value cannot exceed 65535.","Pool",["for","trusted_ip_list",1,"cd-col-form-label"],"Trusted IPs","Comma separated list of IP addresses.","Please add the " + "\ufffd#21\ufffd" + "Ceph Manager" + "\ufffd/#21\ufffd" + " IP addresses here, otherwise the iSCSI gateways can't be reached.",["id","trusted_ip_list","type","text","formControlName","trusted_ip_list",1,"form-control"],["for","api_port",1,"cd-col-form-label"],"Port",["id","api_port","type","number","formControlName","api_port","min","1","max","65535",1,"form-control"],["for","api_user",1,"cd-col-form-label",3,"ngClass"],"User",["id","api_user","type","text","formControlName","api_user",1,"form-control"],["for","api_password",1,"cd-col-form-label",3,"ngClass"],"Password",[1,"input-group"],["id","api_password","type","password","autocomplete","new-password","formControlName","api_password",1,"form-control"],[1,"input-group-append"],["type","button","cdPasswordButton","api_password",1,"btn","btn-light"],["source","api_password"],"Loading...","-- No pools available --","-- Select a pool --","This field is required.","The entered value needs to be a number.","The value must be at least 1.","The value cannot exceed 65535.","This field is required.","This field is required.",["id","ssl","type","checkbox","formControlName","ssl",1,"custom-control-input"],["for","ssl",1,"custom-control-label"],"SSL",["for","ssl_cert",1,"cd-col-form-label"],"Certificate","The SSL certificate in PEM format.",["id","ssl_cert","formControlName","ssl_cert","rows","5",1,"form-control","resize-vertical","text-monospace","text-pre"],["type","file",3,"change"],"This field is required.","Invalid SSL certificate.",["for","ssl_key",1,"cd-col-form-label"],"Private key","The SSL private key in PEM format.",["id","ssl_key","formControlName","ssl_key","rows","5",1,"form-control","resize-vertical","text-monospace","text-pre"],"This field is required.","Invalid SSL private key."]},template:function(e,t){if(1&e&&(i.Sb(0,"div",0),i.Sb(1,"form",1,2),i.Sb(3,"div",3),i.Sb(4,"div",4),i.Wb(5,5),i.jc(6,"titlecase"),i.jc(7,"upperFirst"),i.Rb(),i.Sb(8,"div",6),i.Sb(9,"div",7),i.Sb(10,"label",8),i.Wb(11,9),i.Rb(),i.Sb(12,"div",10),i.Sb(13,"select",11),i.Sb(14,"option",12),i.Wb(15,13),i.Rb(),i.Mc(16,Iu,2,2,"option",14),i.Rb(),i.Mc(17,Pu,2,0,"span",15),i.Rb(),i.Rb(),i.Sb(18,"div",7),i.Sb(19,"label",16),i.Wb(20,17),i.Rb(),i.Sb(21,"div",10),i.Nb(22,"input",18),i.Mc(23,Nu,2,0,"span",15),i.Mc(24,ju,3,0,"span",15),i.Rb(),i.Rb(),i.Sb(25,"div",7),i.Sb(26,"div",19),i.Sb(27,"div",20),i.Nb(28,"input",21),i.Sb(29,"label",22),i.Wb(30,23),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Mc(31,Fu,9,0,"div",24),i.Mc(32,zu,6,2,"div",24),i.Mc(33,$u,5,3,"div",24),i.Mc(34,Vu,10,2,"div",24),i.Mc(35,Qu,16,5,"ng-container",25),i.Mc(36,ed,9,3,"ng-container",25),i.Mc(37,fd,48,18,"ng-container",25),i.Mc(38,vd,9,2,"ng-container",25),i.Rb(),i.Sb(39,"div",26),i.Sb(40,"div",27),i.Sb(41,"cd-form-button-panel",28),i.gc("submitActionEvent",(function(){return t.onSubmit()})),i.jc(42,"titlecase"),i.jc(43,"upperFirst"),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb()),2&e){const e=i.Ac(2);i.yb(1),i.pc("formGroup",t.serviceForm),i.yb(6),i.ac(i.kc(6,19,t.action))(i.kc(7,21,t.resource)),i.Xb(5),i.yb(7),i.pc("ngValue",null),i.yb(2),i.pc("ngForOf",t.serviceTypes),i.yb(1),i.pc("ngIf",t.serviceForm.showError("service_type",e,"required")),i.yb(2),i.pc("ngClass",i.uc(28,hd,i.tc(27,wd).includes(t.serviceForm.controls.service_type.value))),i.yb(4),i.pc("ngIf",t.serviceForm.showError("service_id",e,"required")),i.yb(1),i.pc("ngIf",t.serviceForm.showError("service_id",e,"rgwPattern")),i.yb(7),i.pc("ngIf",!t.serviceForm.controls.unmanaged.value),i.yb(1),i.pc("ngIf",!t.serviceForm.controls.unmanaged.value&&"label"===t.serviceForm.controls.placement.value),i.yb(1),i.pc("ngIf",!t.serviceForm.controls.unmanaged.value&&"hosts"===t.serviceForm.controls.placement.value),i.yb(1),i.pc("ngIf",!t.serviceForm.controls.unmanaged.value),i.yb(1),i.pc("ngIf",!t.serviceForm.controls.unmanaged.value&&"nfs"===t.serviceForm.controls.service_type.value),i.yb(1),i.pc("ngIf",!t.serviceForm.controls.unmanaged.value&&"rgw"===t.serviceForm.controls.service_type.value),i.yb(1),i.pc("ngIf",!t.serviceForm.controls.unmanaged.value&&"iscsi"===t.serviceForm.controls.service_type.value),i.yb(1),i.pc("ngIf",!t.serviceForm.controls.unmanaged.value&&i.tc(30,Sd).includes(t.serviceForm.controls.service_type.value)),i.yb(3),i.pc("form",t.serviceForm)("submitText",i.kc(42,23,t.action)+" "+i.kc(43,25,t.resource))}},directives:[kn.C,kn.r,Zn.a,kn.k,Xn.a,On.a,kn.z,ei.a,kn.q,kn.i,kn.u,kn.B,wt.q,wt.r,wt.p,kn.d,kn.b,ti.a,Qt.G,Eu.a,Mo.a,kn.v,Au.a,eo.a],pipes:[wt.A,ir.a],styles:[""]}),e})();var kd=n("3E0/"),xd=n("nYR2");let Dd=(()=>{class e{transform(e){if(jt.a.isUndefined(e))return "no spec";if(jt.a.get(e,"unmanaged",!1))return "unmanaged";const t=[],n=jt.a.get(e,"placement.hosts"),i=jt.a.get(e,"placement.count"),r=jt.a.get(e,"placement.label"),s=jt.a.get(e,"placement.host_pattern");return jt.a.isArray(n)&&t.push(...n),jt.a.isNumber(i)&&t.push("count:" + i + ""),jt.a.isString(r)&&t.push("label:" + r + ""),jt.a.isString(s)&&t.push(...s),t.join(";")}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"placement",type:e,pure:!0}),e})();function Td(e,t){if(1&e&&(i.Qb(0),i.Nb(1,"cd-service-daemon-list",1),i.Pb()),2&e){const e=i.ic();i.yb(1),i.pc("serviceName",e.selection.service_name)}}let Cd=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-service-details"]],inputs:{permissions:"permissions",selection:"selection"},decls:1,vars:1,consts:[[4,"ngIf"],[3,"serviceName"]],template:function(e,t){1&e&&i.Mc(0,Td,2,1,"ng-container",0),2&e&&i.pc("ngIf",t.selection)},directives:[wt.r,Ur],styles:[""]}),e})();function Od(e,t){1&e&&i.Nb(0,"cd-orchestrator-doc-panel")}function Ld(e,t){if(1&e){const e=i.Tb();i.Qb(0),i.Sb(1,"cd-table",1),i.gc("fetchData",(function(t){return i.Dc(e),i.ic().getServices(t)}))("setExpandedRow",(function(t){return i.Dc(e),i.ic().setExpandedRow(t)}))("updateSelection",(function(t){return i.Dc(e),i.ic().updateSelection(t)})),i.Nb(2,"cd-table-actions",2),i.Nb(3,"cd-service-details",3),i.Rb(),i.Pb()}if(2&e){const e=i.ic();i.yb(1),i.pc("data",e.services)("columns",e.columns)("autoReload",5e3)("hasDetails",!0),i.yb(1),i.pc("permission",e.permissions.hosts)("selection",e.selection)("tableActions",e.tableActions),i.yb(1),i.pc("permissions",e.permissions)("selection",e.expandedRow)}}let Rd=(()=>{class e extends $t.a{constructor(e,t,n,i,r,s,o,a){super(),this.actionLabels=e,this.authStorageService=t,this.modalService=n,this.orchService=i,this.cephServiceService=r,this.relativeDatePipe=s,this.taskWrapperService=o,this.urlBuilder=a,this.hiddenColumns=[],this.showDocPanel=!1,this.actionOrchFeatures={create:[ur.SERVICE_CREATE],delete:[ur.SERVICE_DELETE]},this.columns=[],this.services=[],this.isLoadingServices=!1,this.selection=new Wt.a,this.permissions=this.authStorageService.getPermissions(),this.tableActions=[{permission:"create",icon:_n.a.add,routerLink:()=>this.urlBuilder.getCreate(),name:this.actionLabels.CREATE,canBePrimary:e=>!e.hasSelection,disable:e=>this.getDisable("create",e)},{permission:"delete",icon:_n.a.destroy,click:()=>this.deleteAction(),name:this.actionLabels.DELETE,disable:e=>this.getDisable("delete",e)}]}ngOnInit(){const e=[{name:"Service",prop:"service_name",flexGrow:1},{name:"Container image name",prop:"status.container_image_name",flexGrow:3},{name:"Container image ID",prop:"status.container_image_id",flexGrow:3,cellTransformation:Ht.a.truncate,customTemplateConfig:{length:12}},{name:"Placement",prop:"",pipe:new Dd,flexGrow:1},{name:"Running",prop:"status.running",flexGrow:1},{name:"Size",prop:"status.size",flexGrow:1},{name:"Last Refreshed",prop:"status.last_refresh",pipe:this.relativeDatePipe,flexGrow:1}];this.columns=e.filter(e=>!this.hiddenColumns.includes(e.prop)),this.orchService.status().subscribe(e=>{this.orchStatus=e,this.showDocPanel=!e.available})}ngOnChanges(){var e;(null===(e=this.orchStatus)||void 0===e?void 0:e.available)&&(this.services=[],this.table.reloadData())}getDisable(e,t){return"delete"===e&&!(null==t?void 0:t.hasSingleSelection)||this.orchService.getTableActionDisableDesc(this.orchStatus,this.actionOrchFeatures[e])}getServices(e){this.isLoadingServices||(this.isLoadingServices=!0,this.cephServiceService.list().subscribe(e=>{this.services=e,this.isLoadingServices=!1},()=>{this.isLoadingServices=!1,this.services=[],e.error()}))}updateSelection(e){this.selection=e}deleteAction(){const e=this.selection.first();this.modalService.show(bn.a,{itemDescription:"Service",itemNames:[e.service_name],actionDescription:"delete",submitActionObservable:()=>this.taskWrapperService.wrapTaskAroundCall({task:new er.a("service/"+gn.e.DELETE,{service_name:e.service_name}),call:this.cephServiceService.delete(e.service_name)}).pipe(Object(kd.a)(2e3),Object(xd.a)(()=>{this.table.refreshBtn()}))})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(gn.b),i.Mb(Jt.a),i.Mb(vn.a),i.Mb(cr),i.Mb(Fr),i.Mb(Yr.a),i.Mb(tr.a),i.Mb(hr.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-services"]],viewQuery:function(e,t){var n;1&e&&i.Jc(Bt.a,!0),2&e&&i.zc(n=i.hc())&&(t.table=n.first)},inputs:{hostname:"hostname",hiddenColumns:"hiddenColumns"},features:[i.xb([{provide:hr.a,useValue:new hr.a("services")}]),i.vb,i.wb],decls:2,vars:2,consts:[[4,"ngIf"],["identifier","service_name","forceIdentifier","true","columnMode","flex","selectionType","single",3,"data","columns","autoReload","hasDetails","fetchData","setExpandedRow","updateSelection"],[1,"table-actions",3,"permission","selection","tableActions"],["cdTableDetail","",3,"permissions","selection"]],template:function(e,t){1&e&&(i.Mc(0,Od,1,0,"cd-orchestrator-doc-panel",0),i.Mc(1,Ld,4,9,"ng-container",0)),2&e&&(i.pc("ngIf",t.showDocPanel),i.yb(1),i.pc("ngIf",null==t.orchStatus?null:t.orchStatus.available))},directives:[wt.r,Rr,Bt.a,Sn.a,Cd],styles:[""]}),e})(),Ed=(()=>{class e{constructor(e){this.http=e,this.url="api/telemetry"}getReport(){return this.http.get(this.url+"/report")}enable(e=!0){const t={enable:e};return e&&(t.license_name="sharing-1-0"),this.http.put(""+this.url,t)}}return e.\u0275fac=function(t){return new(t||e)(i.dc(o.b))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),Ad=(()=>{class e{constructor(){this.visible=!1,this.update=new i.o}setVisibility(e){this.visible=e,this.update.emit(e)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();function Id(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div"),i.Oc(1," The plugin is already "),i.Sb(2,"b"),i.Oc(3,"enabled"),i.Rb(),i.Oc(4,". Click "),i.Sb(5,"b"),i.Oc(6,"Deactivate"),i.Rb(),i.Oc(7," to disable it.\xa0 "),i.Sb(8,"button",71),i.gc("click",(function(){return i.Dc(e),i.ic(3).disableModule("The Telemetry module has been disabled successfully.")})),i.Wb(9,72),i.Rb(),i.Rb()}}function Pd(e,t){1&e&&(i.Sb(0,"span",73),i.Wb(1,74),i.Rb())}function Nd(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div"),i.Sb(1,"form",4,5),i.Sb(3,"div",6),i.Sb(4,"div",7),i.Wb(5,8),i.Rb(),i.Sb(6,"div",9),i.Sb(7,"p"),i.cc(8,10),i.Nb(9,"br"),i.Nb(10,"a",11),i.Nb(11,"br"),i.Nb(12,"br"),i.Nb(13,"b"),i.Zb(),i.Rb(),i.Mc(14,Id,10,0,"div",12),i.Sb(15,"legend"),i.Wb(16,13),i.Rb(),i.Sb(17,"p"),i.Wb(18,14),i.Rb(),i.Sb(19,"div",15),i.Sb(20,"label",16),i.Qb(21),i.Wb(22,17),i.Pb(),i.Sb(23,"cd-helper"),i.Qb(24),i.Wb(25,18),i.Pb(),i.Sb(26,"ul"),i.Sb(27,"li"),i.Wb(28,19),i.Rb(),i.Sb(29,"li"),i.Wb(30,20),i.Rb(),i.Sb(31,"li"),i.Wb(32,21),i.Rb(),i.Sb(33,"li"),i.Wb(34,22),i.Rb(),i.Sb(35,"li"),i.Wb(36,23),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Sb(37,"div",24),i.Sb(38,"div",25),i.Nb(39,"input",26),i.Nb(40,"label",27),i.Rb(),i.Rb(),i.Rb(),i.Sb(41,"div",15),i.Sb(42,"label",28),i.Qb(43),i.Wb(44,29),i.Pb(),i.Sb(45,"cd-helper"),i.Qb(46),i.Wb(47,30),i.Pb(),i.Sb(48,"ul"),i.Sb(49,"li"),i.Wb(50,31),i.Rb(),i.Sb(51,"li"),i.Wb(52,32),i.Rb(),i.Sb(53,"li"),i.Wb(54,33),i.Rb(),i.Sb(55,"li"),i.Wb(56,34),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Sb(57,"div",24),i.Sb(58,"div",25),i.Nb(59,"input",35),i.Nb(60,"label",36),i.Rb(),i.Rb(),i.Rb(),i.Sb(61,"div",15),i.Sb(62,"label",37),i.Qb(63),i.Wb(64,38),i.Pb(),i.Sb(65,"cd-helper",39),i.Yb(66,40),i.Rb(),i.Rb(),i.Sb(67,"div",24),i.Sb(68,"div",25),i.Nb(69,"input",41),i.Nb(70,"label",42),i.Rb(),i.Rb(),i.Rb(),i.Sb(71,"div",15),i.Sb(72,"label",43),i.Qb(73),i.Wb(74,44),i.Pb(),i.Sb(75,"cd-helper"),i.Qb(76),i.Wb(77,45),i.Pb(),i.Sb(78,"ul"),i.Sb(79,"li"),i.Oc(80,"Cluster description"),i.Rb(),i.Sb(81,"li"),i.Oc(82,"Contact email address"),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Sb(83,"div",24),i.Sb(84,"div",25),i.Nb(85,"input",46),i.Nb(86,"label",47),i.Rb(),i.Rb(),i.Rb(),i.Sb(87,"legend"),i.Qb(88),i.Wb(89,48),i.Pb(),i.Sb(90,"cd-helper"),i.Wb(91,49),i.Rb(),i.Rb(),i.Sb(92,"div",15),i.Sb(93,"label",50),i.Wb(94,51),i.Rb(),i.Sb(95,"div",24),i.Nb(96,"input",52),i.Rb(),i.Rb(),i.Sb(97,"div",15),i.Sb(98,"label",53),i.Wb(99,54),i.Rb(),i.Sb(100,"div",24),i.Sb(101,"input",55),i.Yb(102,56),i.Rb(),i.Rb(),i.Rb(),i.Sb(103,"legend"),i.Wb(104,57),i.Rb(),i.Sb(105,"div",15),i.Sb(106,"label",58),i.Qb(107),i.Wb(108,59),i.Pb(),i.Sb(109,"cd-helper"),i.Wb(110,60),i.Rb(),i.Rb(),i.Sb(111,"div",24),i.Nb(112,"input",61),i.Mc(113,Pd,2,0,"span",62),i.Rb(),i.Rb(),i.Sb(114,"div",15),i.Sb(115,"label",63),i.Qb(116),i.Wb(117,64),i.Pb(),i.Sb(118,"cd-helper"),i.Sb(119,"p"),i.Wb(120,65),i.Rb(),i.Sb(121,"p"),i.Wb(122,66),i.Rb(),i.Rb(),i.Rb(),i.Sb(123,"div",24),i.Nb(124,"input",67),i.Rb(),i.Rb(),i.Nb(125,"br"),i.Sb(126,"p"),i.cc(127,68),i.Nb(128,"b"),i.Zb(),i.Rb(),i.Rb(),i.Sb(129,"div",69),i.Sb(130,"div",70),i.Sb(131,"button",71),i.gc("click",(function(){return i.Dc(e),i.ic(2).next()})),i.Qb(132),i.Oc(133),i.Pb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.Ac(2),t=i.ic(2);i.yb(1),i.pc("formGroup",t.configForm),i.yb(4),i.ac(t.step),i.Xb(5),i.yb(8),i.ac(t.sendToUrl)(t.sendToDeviceUrl),i.Xb(8),i.yb(1),i.pc("ngIf",t.moduleEnabled),i.yb(99),i.pc("ngIf",t.configForm.showError("interval",e,"min")),i.yb(20),i.Pc(t.actionLabels.NEXT)}}function jd(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div"),i.Sb(1,"form",75,76),i.Sb(3,"div",6),i.Sb(4,"div",7),i.Wb(5,77),i.Rb(),i.Sb(6,"div",9),i.Sb(7,"div",15),i.Sb(8,"label",78),i.cc(9,79),i.Sb(10,"cd-helper",39),i.Yb(11,80),i.Rb(),i.Zb(),i.Rb(),i.Sb(12,"div",24),i.Nb(13,"input",81),i.Rb(),i.Rb(),i.Sb(14,"div",15),i.Sb(15,"label",82),i.cc(16,83),i.Sb(17,"cd-helper",39),i.Yb(18,84),i.Rb(),i.Zb(),i.Rb(),i.Sb(19,"div",24),i.Nb(20,"textarea",85),i.Rb(),i.Rb(),i.Sb(21,"div",15),i.Sb(22,"div",86),i.Sb(23,"div",87),i.Nb(24,"cd-download-button",88),i.Nb(25,"cd-copy-2-clipboard-button",89),i.Rb(),i.Rb(),i.Rb(),i.Sb(26,"div",15),i.Sb(27,"div",86),i.Sb(28,"div",25),i.Nb(29,"input",90),i.Sb(30,"label",91),i.cc(31,92),i.Nb(32,"a",93),i.Zb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Sb(33,"div",69),i.Sb(34,"div",70),i.Sb(35,"cd-form-button-panel",94),i.gc("submitActionEvent",(function(){return i.Dc(e),i.ic(2).onSubmit()}))("backActionEvent",(function(){return i.Dc(e),i.ic(2).back()})),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.ic(2);i.yb(1),i.pc("formGroup",e.previewForm),i.yb(4),i.ac(e.step),i.Xb(5),i.yb(19),i.pc("objectItem",e.report),i.yb(11),i.pc("form",e.previewForm)("submitText",e.actionLabels.UPDATE)("cancelText",e.actionLabels.BACK)}}function Fd(e,t){if(1&e&&(i.Sb(0,"div",1),i.Qb(1,2),i.Mc(2,Nd,134,7,"div",3),i.Mc(3,jd,36,6,"div",3),i.Pb(),i.Rb()),2&e){const e=i.ic();i.yb(1),i.pc("ngSwitch",e.step),i.yb(1),i.pc("ngSwitchCase",1),i.yb(1),i.pc("ngSwitchCase",2)}}let Yd=(()=>{class e extends qn.a{constructor(e,t,n,i,r,s,o){super(),this.actionLabels=e,this.formBuilder=t,this.mgrModuleService=n,this.notificationService=i,this.router=r,this.telemetryService=s,this.telemetryNotificationService=o,this.licenseAgrmt=!1,this.options={},this.requiredFields=["channel_basic","channel_crash","channel_device","channel_ident","interval","proxy","contact","description"],this.report=void 0,this.reportId=void 0,this.sendToUrl="",this.sendToDeviceUrl="",this.step=1}ngOnInit(){const e=[this.mgrModuleService.getOptions("telemetry"),this.mgrModuleService.getConfig("telemetry")];Object(vo.a)(e).subscribe(e=>{const t=e[1];this.moduleEnabled=t.enabled,this.sendToUrl=t.url,this.sendToDeviceUrl=t.device_url,this.options=jt.a.pick(e[0],this.requiredFields);const n=jt.a.pick(t,this.requiredFields);this.createConfigForm(),this.configForm.setValue(n),this.loadingReady()},e=>{this.loadingError()})}createConfigForm(){const e={};jt.a.forEach(Object.values(this.options),t=>{e[t.name]=[t.default_value,this.getValidators(t)]}),this.configForm=this.formBuilder.group(e)}createPreviewForm(){const e={report:JSON.stringify(this.report,null,2),reportId:this.reportId,licenseAgrmt:[this.licenseAgrmt,kn.A.requiredTrue]};this.previewForm=this.formBuilder.group(e)}getValidators(e){const t=[];switch(e.type){case"int":t.push(Cn.a.number()),t.push(kn.A.required),jt.a.isNumber(e.min)&&t.push(kn.A.min(e.min)),jt.a.isNumber(e.max)&&t.push(kn.A.max(e.max));break;case"str":jt.a.isNumber(e.min)&&t.push(kn.A.minLength(e.min)),jt.a.isNumber(e.max)&&t.push(kn.A.maxLength(e.max))}return t}getReport(){this.loadingStart(),this.telemetryService.getReport().subscribe(e=>{this.report=e,this.reportId=e.report.report_id,this.createPreviewForm(),this.loadingReady(),this.step++},e=>{this.loadingError()})}updateConfig(){const e={};jt.a.forEach(Object.values(this.options),t=>{const n=this.configForm.get(t.name);n.dirty&&n.valid&&(e[t.name]=n.value)}),this.mgrModuleService.updateConfig("telemetry",e).subscribe(()=>{this.disableModule("Your settings have been applied successfully. Due to privacy/legal reasons the Telemetry module is now disabled until you complete the next step and accept the license.",()=>{this.getReport()})},()=>{this.configForm.setErrors({cdSubmitButton:!0})})}disableModule(e=null,t=null){this.telemetryService.enable(!1).subscribe(()=>{this.telemetryNotificationService.setVisibility(!0),e&&this.notificationService.show(yn.a.success,e),t?t():this.router.navigate([""])})}next(){this.configForm.pristine?this.getReport():this.updateConfig()}back(){this.step--}onSubmit(){this.telemetryService.enable().subscribe(()=>{this.telemetryNotificationService.setVisibility(!1),this.notificationService.show(yn.a.success,"The Telemetry module has been configured and activated successfully."),this.router.navigate([""])})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(gn.b),i.Mb(So.a),i.Mb(wo),i.Mb(wn.a),i.Mb(Pt.e),i.Mb(Ed),i.Mb(Ad))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-telemetry"]],features:[i.vb],decls:1,vars:1,consts:function(){var e,t,n,r,s,o,a,c,l,u,d,h,f,p,m,b,g,_,y,v,w,S,M,k,x,D,T,C,O,L,R,E,A,I,P,N,j,F,Y;return e="Step " + "\ufffd0\ufffd" + " of 2: Telemetry report configuration",t="The telemetry module sends anonymous data about this Ceph cluster back to the Ceph developers to help understand how Ceph is used and what problems users may be experiencing." + "[\ufffd#9\ufffd\ufffd/#9\ufffd|\ufffd#11\ufffd\ufffd/#11\ufffd|\ufffd#12\ufffd\ufffd/#12\ufffd]" + " This data is visualized on " + "\ufffd#10\ufffd" + "public dashboards" + "\ufffd/#10\ufffd" + " that allow the community to quickly see summary statistics on how many clusters are reporting, their total capacity and OSD count, and version distribution trends." + "[\ufffd#9\ufffd\ufffd/#9\ufffd|\ufffd#11\ufffd\ufffd/#11\ufffd|\ufffd#12\ufffd\ufffd/#12\ufffd]" + "" + "[\ufffd#9\ufffd\ufffd/#9\ufffd|\ufffd#11\ufffd\ufffd/#11\ufffd|\ufffd#12\ufffd\ufffd/#12\ufffd]" + " The data being reported does " + "\ufffd#13\ufffd" + "not" + "\ufffd/#13\ufffd" + " contain any sensitive data like pool names, object names, object contents, hostnames, or device serial numbers. It contains counters and statistics on how the cluster has been deployed, the version of Ceph, the distribution of the hosts and other parameters which help the project to gain a better understanding of the way Ceph is used. The data is sent secured to " + "\ufffd0\ufffd" + " and " + "\ufffd1\ufffd" + " (device report).",t=i.bc(t),n="Channels",r="The telemetry report is broken down into several \"channels\", each with a different type of information that can be configured below.",s="Basic",o="Includes basic information about the cluster:",a="Capacity of the cluster",c="Number of monitors, managers, OSDs, MDSs, object gateways, or other daemons",l="Software version currently being used",u="Number and types of RADOS pools and CephFS file systems",d="Names of configuration options that have been changed from their default (but not their values)",h="Crash",f="Includes information about daemon crashes:",p="Type of daemon",m="Version of the daemon",b="Operating system (OS distribution, kernel version)",g="Stack trace identifying where in the Ceph code the crash occurred",_="Device",y="Includes information about device metrics like anonymized SMART metrics.",v="Ident",w="Includes user-provided identifying information about the cluster:",S="Contact Information",M="Submitting any contact information is completely optional and disabled by default.",k="Contact",x="Description",D="My first Ceph cluster",T="Advanced Settings",C="Interval",O="The module compiles and sends a new report every 24 hours by default. You can adjust this interval by setting a different number of hours.",L="Proxy",R="If the cluster cannot directly connect to the configured telemetry endpoint (default telemetry.ceph.com), you can configure a HTTP/HTTPS proxy server by e.g. adding https://10.0.0.1:8080",E="You can also include a user:pass if needed e.g. https://ceph:telemetry@10.0.0.1:8080",A="" + "\ufffd#128\ufffd" + "Note:" + "\ufffd/#128\ufffd" + " By clicking 'Next' you will first see a preview of the report content before you can activate the automatic submission of your data.",I="Deactivate",P="The entered value is too low! It must be greater or equal to 8.",N="Step " + "\ufffd0\ufffd" + " of 2: Telemetry report preview",j="A randomized UUID to identify a particular cluster over the course of several telemetry reports.",F="Report ID " + "\ufffd#10\ufffd" + "" + "\ufffd/#10\ufffd" + "",Y="The actual telemetry data that will be submitted.",[["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],[3,"ngSwitch"],[4,"ngSwitchCase"],["name","form","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"card"],[1,"card-header"],e,[1,"card-body"],t,["href","https://telemetry-public.ceph.com/"],[4,"ngIf"],n,r,[1,"form-group","row"],["for","channel_basic",1,"cd-col-form-label"],s,o,a,c,l,u,d,[1,"cd-col-form-input"],[1,"custom-control","custom-checkbox"],["type","checkbox","id","channel_basic","formControlName","channel_basic",1,"custom-control-input"],["for","channel_basic",1,"custom-control-label"],["for","channel_crash",1,"cd-col-form-label"],h,f,p,m,b,g,["type","checkbox","id","channel_crash","formControlName","channel_crash",1,"custom-control-input"],["for","channel_crash",1,"custom-control-label"],["for","channel_device",1,"cd-col-form-label"],_,[6,"html"],["html",y],["type","checkbox","id","channel_device","formControlName","channel_device",1,"custom-control-input"],["for","channel_device",1,"custom-control-label"],["for","channel_ident",1,"cd-col-form-label"],v,w,["type","checkbox","id","channel_ident","formControlName","channel_ident",1,"custom-control-input"],["for","channel_ident",1,"custom-control-label"],S,M,["for","contact",1,"cd-col-form-label"],k,["id","contact","type","text","formControlName","contact","placeholder","Example User <user@example.com>",1,"form-control"],["for","description",1,"cd-col-form-label"],x,["id","description","type","text","formControlName","description",1,"form-control",6,"placeholder"],["placeholder",D],T,["for","interval",1,"cd-col-form-label"],C,O,["id","interval","type","number","formControlName","interval",1,"form-control"],["class","invalid-feedback",4,"ngIf"],["for","proxy",1,"cd-col-form-label"],L,R,E,["id","proxy","type","text","formControlName","proxy","placeholder","https://10.0.0.1:8080",1,"form-control"],A,[1,"card-footer"],[1,"button-group","text-right"],["type","button",1,"btn","btn-light",3,"click"],I,[1,"invalid-feedback"],P,["name","previewForm","novalidate","",3,"formGroup"],["frm","ngForm"],N,["for","reportId",1,"cd-col-form-label"],F,["html",j],["type","text","id","reportId","formControlName","reportId","readonly","",1,"form-control"],["for","report",1,"cd-col-form-label"],"Report preview " + "\ufffd#17\ufffd" + "" + "\ufffd/#17\ufffd" + "",["html",Y],["id","report","formControlName","report","rows","15","readonly","",1,"form-control"],[1,"cd-col-form-offset"],["role","group",1,"btn-group"],["fileName","telemetry_report",3,"objectItem"],["source","report"],["type","checkbox","id","licenseAgrmt","name","licenseAgrmt","formControlName","licenseAgrmt",1,"custom-control-input"],["for","licenseAgrmt",1,"custom-control-label"],"I agree to my telemetry data being submitted under the " + "\ufffd#32\ufffd" + "Community Data License Agreement - Sharing - Version 1.0" + "\ufffd/#32\ufffd" + "",["href","https://cdla.io/sharing-1-0/"],[3,"form","submitText","cancelText","submitActionEvent","backActionEvent"]]},template:function(e,t){1&e&&i.Mc(0,Fd,4,3,"div",0),2&e&&i.pc("cdFormLoading",t.loading)},directives:[Kn.a,wt.t,wt.u,kn.C,kn.r,Zn.a,kn.k,wt.r,Xn.a,Mo.a,On.a,kn.b,ei.a,kn.q,kn.i,kn.d,kn.v,Xs,eo.a,ti.a],styles:[""]}),e})();var zd=n("2Vo4"),$d=n("Y7HM");function Hd(e){const{subscriber:t,counter:n,period:i}=e;t.next(n),this.schedule({subscriber:t,counter:n+1,period:i},i)}let Wd=(()=>{class e{constructor(e){this.ngZone=e,this.intervalDataSource=new zd.a(null),this.intervalData$=this.intervalDataSource.asObservable();const t=parseInt(sessionStorage.getItem("dashboard_interval"),10)||5e3;this.setRefreshInterval(t)}setRefreshInterval(e){this.intervalTime=e,sessionStorage.setItem("dashboard_interval",e.toString()),this.intervalSubscription&&this.intervalSubscription.unsubscribe(),this.ngZone.runOutsideAngular(()=>{this.intervalSubscription=function(e=0,t=Vl.a){return(!Object($d.a)(e)||e<0)&&(e=0),t&&"function"==typeof t.schedule||(t=Vl.a),new xu.a(n=>(n.add(t.schedule(Hd,e,{subscriber:n,counter:0,period:e})),n))}(this.intervalTime).subscribe(()=>this.ngZone.run(()=>{this.intervalDataSource.next(this.intervalTime)}))})}getRefreshInterval(){return this.intervalTime}ngOnDestroy(){this.intervalSubscription&&this.intervalSubscription.unsubscribe()}}return e.\u0275fac=function(t){return new(t||e)(i.dc(i.A))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();function Vd(e,t){if(1&e&&(i.Sb(0,"option",8),i.Oc(1),i.Rb()),2&e){const e=t.$implicit,n=i.ic();i.pc("value",n.intervalList[e]),i.yb(1),i.Pc(e)}}let Bd=(()=>{class e{constructor(e){this.refreshIntervalService=e,this.intervalList={"5 s":5e3,"10 s":1e4,"15 s":15e3,"30 s":3e4,"1 min":6e4,"3 min":18e4,"5 min":3e5},this.intervalKeys=Object.keys(this.intervalList)}ngOnInit(){this.selectedInterval=this.refreshIntervalService.getRefreshInterval()||5e3}changeRefreshInterval(e){this.refreshIntervalService.setRefreshInterval(e)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Wd))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-refresh-selector"]],decls:8,vars:2,consts:function(){return[[1,"container-fluid"],[1,"row"],[1,"col","d-flex","justify-content-end"],[1,"form-inline"],["for","refreshInterval",1,"col-form-label","my-0","mx-2"],"Refresh",["id","refreshInterval","name","refreshInterval",1,"form-control","custom-select",3,"ngModel","change","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]]},template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Sb(1,"div",1),i.Sb(2,"div",2),i.Sb(3,"form",3),i.Sb(4,"label",4),i.Wb(5,5),i.Rb(),i.Sb(6,"select",6),i.gc("change",(function(e){return t.changeRefreshInterval(e.target.value)}))("ngModelChange",(function(e){return t.selectedInterval=e})),i.Mc(7,Vd,2,2,"option",7),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb()),2&e&&(i.yb(6),i.pc("ngModel",t.selectedInterval),i.yb(1),i.pc("ngForOf",t.intervalKeys))},directives:[kn.C,kn.r,kn.s,On.a,kn.z,ei.a,kn.q,kn.t,wt.q,kn.u,kn.B],styles:[""]}),e})();var Ud=n("d+Og"),Gd=n("ej+x"),qd=n("+EN/"),Jd=n.n(qd);function Qd(e,t){if(1&e&&(i.Sb(0,"div",6),i.cc(1,7),i.jc(2,"lowercase"),i.Sb(3,"cd-doc",8),i.Yb(4,9),i.jc(5,"lowercase"),i.Rb(),i.Zb(),i.Rb()),2&e){const e=i.ic();i.yb(3),i.rc("section","dashboard-landing-page-",i.kc(5,4,e.groupTitle),""),i.yb(2),i.ac(i.kc(2,2,e.groupTitle)),i.Xb(1)}}const Kd=function(e,t){return[e,t]},Zd=["*"];let Xd=(()=>{class e{constructor(){this.icons=_n.a}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-info-group"]],inputs:{groupTitle:"groupTitle"},ngContentSelectors:Zd,decls:11,vars:6,consts:function(){var e;return e="here",[[1,"row"],["triggers","",1,"info-group-title",3,"ngbPopover"],["popInfo","ngbPopover"],["type","button",1,"popover-icon","btn","btn-link","p-0",3,"click"],[3,"ngClass"],["popInfoTemplate",""],[1,"text-center"],"For an overview of " + "\ufffd0\ufffd" + " widgets click " + "\ufffd#3\ufffd" + "" + "\ufffd/#3\ufffd" + "",[3,"section",6,"docText"],["docText",e]]},template:function(e,t){if(1&e){const e=i.Tb();i.oc(),i.Sb(0,"div",0),i.Sb(1,"div",1,2),i.Sb(3,"span"),i.Oc(4),i.Rb(),i.Sb(5,"button",3),i.gc("click",(function(){return i.Dc(e),i.Ac(2).toggle()})),i.Nb(6,"i",4),i.Rb(),i.Rb(),i.Rb(),i.Sb(7,"div",0),i.nc(8),i.Rb(),i.Mc(9,Qd,6,6,"ng-template",null,5,i.Nc)}if(2&e){const e=i.Ac(10);i.yb(1),i.pc("ngbPopover",e),i.yb(3),i.Pc(t.groupTitle),i.yb(2),i.pc("ngClass",i.vc(3,Kd,t.icons.infoCircle,t.icons.large))}},directives:[Qt.w,On.a,wt.p,Cr.a],pipes:[wt.o],styles:[".info-group-title[_ngcontent-%COMP%]{font-size:1.75rem;margin:0 0 .5vw .5vw}.popover-icon[_ngcontent-%COMP%]:focus{box-shadow:none}"]}),e})();function eh(e,t){if(1&e&&(i.Sb(0,"a",6),i.Oc(1),i.Rb()),2&e){const e=i.ic();i.pc("routerLink",e.link),i.yb(1),i.Pc(e.cardTitle)}}function th(e,t){if(1&e&&i.Oc(0),2&e){const e=i.ic();i.Qc(" ",e.cardTitle," ")}}const nh=["*"];let ih=(()=>{class e{constructor(){this.cardClass=""}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-info-card"]],inputs:{cardTitle:"cardTitle",link:"link",cardClass:"cardClass",contentClass:"contentClass"},ngContentSelectors:nh,decls:8,vars:4,consts:[[1,"card","shadow-sm",3,"ngClass"],[1,"card-body","d-flex","align-items-center","justify-content-center"],[1,"card-title","m-4"],[3,"routerLink",4,"ngIf","ngIfElse"],["noLinkTitle",""],[1,"card-text","text-center",3,"ngClass"],[3,"routerLink"]],template:function(e,t){if(1&e&&(i.oc(),i.Sb(0,"div",0),i.Sb(1,"div",1),i.Sb(2,"h4",2),i.Mc(3,eh,2,2,"a",3),i.Mc(4,th,1,1,"ng-template",null,4,i.Nc),i.Rb(),i.Sb(6,"div",5),i.nc(7),i.Rb(),i.Rb(),i.Rb()),2&e){const e=i.Ac(5);i.pc("ngClass",t.cardClass),i.yb(3),i.pc("ngIf",t.link)("ngIfElse",e),i.yb(3),i.pc("ngClass",t.contentClass)}},directives:[wt.p,wt.r,Pt.h],styles:[".card[_ngcontent-%COMP%]{font-size:12px;border:.5px solid #dee2e6;border-radius:3px;height:100%}@media screen and (min-width:320px){.card[_ngcontent-%COMP%]{font-size:calc(12px + 9 * ((100vw - 320px) / 1728))}}@media screen and (min-width:2048px){.card[_ngcontent-%COMP%]{font-size:21px}}.card[_ngcontent-%COMP%] .card-body[_ngcontent-%COMP%]{padding-top:40px!important}.card[_ngcontent-%COMP%] .card-body[_ngcontent-%COMP%] .card-title[_ngcontent-%COMP%]{left:-.6rem;position:absolute;top:-.3rem}.no-center[_ngcontent-%COMP%]{left:unset;position:unset;top:unset;transform:unset}.content-highlight[_ngcontent-%COMP%]{font-weight:700}"]}),e})();var rh=n("MO+k");const sh=["chartCanvas"],oh=["chartTooltip"];let ah=(()=>{class e{constructor(e,t){this.dimlessBinary=e,this.dimless=t,this.config={},this.isBytesData=!1,this.showLabelAsTooltip=!1,this.prepareFn=new i.o,this.chartConfig={chartType:"doughnut",dataset:[{label:null,borderWidth:0}],colors:[{backgroundColor:[Jd.a.chartHealthColorGreen,Jd.a.chartHealthColorYellow,Jd.a.chartHealthColorOrange,Jd.a.chartHealthColorRed,Jd.a.chartHealthColorBlue]}],options:{cutoutPercentage:90,events:["click","mouseout","touchstart"],legend:{display:!0,position:"right",labels:{boxWidth:10,usePointStyle:!1}},plugins:{center_text:!0},tooltips:{enabled:!0,displayColors:!1,backgroundColor:Jd.a.chartHealthTootlipBgColor,cornerRadius:0,bodyFontSize:14,bodyFontStyle:"600",position:"nearest",xPadding:12,yPadding:12,callbacks:{label:(e,t)=>{let n=t.labels[e.index];return n.includes("%")||(n=`${n} (${t.datasets[e.datasetIndex].data[e.index]}%)`),n}}},title:{display:!1}}},this.doughnutChartPlugins=[{id:"center_text",beforeDraw(e){const t="Helvetica Neue, Helvetica, Arial, sans-serif";rh.defaults.global.defaultFontFamily=t;const n=e.ctx;if(!e.options.plugins.center_text||!e.data.datasets[0].label)return;n.save();const i=e.data.datasets[0].label.split("\n"),r=(e.chartArea.left+e.chartArea.right)/2,s=(e.chartArea.top+e.chartArea.bottom)/2;n.textAlign="center",n.textBaseline="middle",n.font="24px "+t,n.fillStyle=Jd.a.chartHealthCenterTextColor,n.fillText(i[0],r,s-10),i.length>1&&(n.font="14px "+t,n.fillStyle=Jd.a.chartHealthCenterTextDescriptionColor,n.fillText(i[1],r,s+10)),n.restore()}}]}ngOnInit(){new rn.a(this.chartCanvasRef,this.chartTooltipRef,(e,t)=>t+e.caretX+"px",(e,t)=>t+e.caretY-e.height-10+"px").getBody=e=>this.getChartTooltipBody(e),jt.a.merge(this.chartConfig,this.config),this.prepareFn.emit([this.chartConfig,this.data])}ngOnChanges(){this.prepareFn.emit([this.chartConfig,this.data]),this.setChartSliceBorderWidth()}getChartTooltipBody(e){const t=e[0].split(": ");return this.showLabelAsTooltip?t[0]:(t[1]=this.isBytesData?this.dimlessBinary.transform(t[1]):this.dimless.transform(t[1]),t.join(": "))}setChartSliceBorderWidth(){let e=0;jt.a.forEach(this.chartConfig.dataset[0].data,(function(t){t>0&&(e+=1)})),this.chartConfig.dataset[0].borderWidth=e>1?1:0}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Zt.a),i.Mb(Xt.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-health-pie"]],viewQuery:function(e,t){var n;1&e&&(i.Jc(sh,!0),i.Jc(oh,!0)),2&e&&(i.zc(n=i.hc())&&(t.chartCanvasRef=n.first),i.zc(n=i.hc())&&(t.chartTooltipRef=n.first))},inputs:{data:"data",config:"config",isBytesData:"isBytesData",tooltipFn:"tooltipFn",showLabelAsTooltip:"showLabelAsTooltip"},outputs:{prepareFn:"prepareFn"},features:[i.wb],decls:6,vars:6,consts:[[1,"chart-container"],["baseChart","",1,"chart-canvas",3,"datasets","chartType","options","labels","colors","plugins"],["chartCanvas",""],[1,"chartjs-tooltip"],["chartTooltip",""]],template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Nb(1,"canvas",1,2),i.Sb(3,"div",3,4),i.Nb(5,"table"),i.Rb(),i.Rb()),2&e&&(i.yb(1),i.pc("datasets",t.chartConfig.dataset)("chartType",t.chartConfig.chartType)("options",t.chartConfig.options)("labels",t.chartConfig.labels)("colors",t.chartConfig.colors)("plugins",t.doughnutChartPlugins))},directives:[sn.a],styles:['.chart-container[_ngcontent-%COMP%]{cursor:pointer;margin:auto;overflow:visible;position:absolute}canvas[_ngcontent-%COMP%]{user-select:none}.chartjs-tooltip[_ngcontent-%COMP%]{background:rgba(0,0,0,.7);border-radius:3px;color:#fff;font-family:Helvetica Neue,Helvetica,Arial,sans-serif!important;opacity:0;pointer-events:none;position:absolute;transform:translate(-50%);transition:all .1s ease}.chartjs-tooltip.transform-left[_ngcontent-%COMP%]{transform:translate(-10%)}.chartjs-tooltip.transform-left[_ngcontent-%COMP%]:after{left:10%}.chartjs-tooltip.transform-right[_ngcontent-%COMP%]{transform:translate(-90%)}.chartjs-tooltip.transform-right[_ngcontent-%COMP%]:after{left:90%}.chartjs-tooltip[_ngcontent-%COMP%]:after{border:5px solid transparent;border-top-color:#000;content:" ";left:50%;margin-left:-5px;position:absolute;top:100%} .chartjs-tooltip-key{display:inline-block;height:10px;margin-right:10px;width:10px}.chart-canvas[_ngcontent-%COMP%], .chart-container[_ngcontent-%COMP%]{height:100%;margin-left:auto;margin-right:auto;position:unset;width:100%}.chart-canvas[_ngcontent-%COMP%]{max-height:100%;max-width:100%}']}),e})(),ch=(()=>{class e{transform(e){if(!e)return"";let t=0,n=0;jt.a.each(e.osds,e=>{e.in&&t++,e.up&&n++});const i=[{content:`${e.osds.length} ${"total"}`,class:""}];i.push({content:"",class:"card-text-line-break"}),i.push({content:`${n} ${"up"}, ${t} ${"in"}`,class:""});const r=e.osds.length-n,s=n-t;if(r>0||s>0){i.push({content:"",class:"card-text-line-break"});const e=r>0?`${r} ${"down"}`:"",t=s>0?`${s} ${"out"}`:"";i.push({content:`${e}${r>0&&s>0?", ":""}${t}`,class:"card-text-error"})}return i}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"osdSummary",type:e,pure:!0}),e})(),lh=(()=>{class e{transform(e){if(!e)return"";let t="",n="",i=0,r=0,s=0;jt.a.each(e.standbys,()=>{i+=1}),e.standbys&&!e.filesystems?(t=`${i} ${"up"}`,n="no filesystems"):0===e.filesystems.length?t="no filesystems":(jt.a.each(e.filesystems,e=>{jt.a.each(e.mdsmap.info,e=>{"up:standby-replay"===e.state?s+=1:r+=1})}),t=`${r} ${"active"}`,n=`${i+s} ${"standby"}`);const o=e.standbys.map(e=>e.name).join(", "),a=o?`${"standby daemons"}: ${o}`:"",c=e.filesystems?e.filesystems.length:0,l=Object.values(c>0?e.filesystems[0].mdsmap.info:{}).map(e=>e.name).join(", ");let u=l?`${"active daemon"}: ${l}`:"";!r&&c>0&&(u=`${s} ${"standbyReplay"}`);const d=[{content:t,class:"popover-info",titleText:u}];return n&&(d.push({content:"",class:"card-text-line-break",titleText:""}),d.push({content:n,class:"popover-info",titleText:a})),d}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"mdsSummary",type:e,pure:!0}),e})(),uh=(()=>{class e{}return e.HEALTH_ERR=Jd.a.healthColorError,e.HEALTH_WARN=Jd.a.healthColorWarning,e.HEALTH_OK=Jd.a.healthColorHealthy,e})(),dh=(()=>{class e{transform(e){return uh[e]?{color:uh[e]}:null}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"healthColor",type:e,pure:!0}),e})(),hh=(()=>{class e{transform(e){return e?"" + e.monmap.mons.length.toString() + " (quorum " + e.quorum.join(", ") + ")":""}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"monSummary",type:e,pure:!0}),e})(),fh=(()=>{class e{transform(e){if(!e)return"";let t="n/a";const n=jt.a.isUndefined(e.active_name)?"":`${"active daemon"}: ${e.active_name}`;n.length>0&&(t="1");const i=e.standbys.map(e=>e.name).join(", "),r=i?`${"standby daemons"}: ${i}`:"",s=e.standbys.length,o=[{content:`${t} ${"active"}`,class:"popover-info",titleText:n}];return o.push({content:"",class:"card-text-line-break",titleText:""}),o.push({content:`${s} ${"standby"}`,class:"popover-info",titleText:r}),o}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"mgrSummary",type:e,pure:!0}),e})();function ph(e,t){1&e&&i.Ob(0)}function mh(e,t){if(1&e&&(i.Sb(0,"li"),i.Sb(1,"span",21),i.jc(2,"healthColor"),i.Oc(3),i.Rb(),i.Oc(4),i.Rb()),2&e){const e=t.$implicit;i.yb(1),i.pc("ngStyle",i.kc(2,3,e.severity)),i.yb(2),i.Pc(e.type),i.yb(1),i.Qc(": ",e.summary.message," ")}}function bh(e,t){if(1&e&&(i.Mc(0,ph,1,0,"ng-container",19),i.Sb(1,"ul"),i.Mc(2,mh,5,5,"li",20),i.Rb()),2&e){i.ic(4);const e=i.Ac(5),t=i.ic();i.pc("ngTemplateOutlet",e),i.yb(2),i.pc("ngForOf",t.healthData.health.checks)}}function gh(e,t){1&e&&i.Nb(0,"i",22)}function _h(e,t){if(1&e&&(i.Qb(0),i.Mc(1,bh,3,2,"ng-template",null,16,i.Nc),i.Sb(3,"div",17),i.jc(4,"healthColor"),i.Oc(5),i.Mc(6,gh,1,0,"i",18),i.Rb(),i.Pb()),2&e){const e=i.Ac(2),t=i.ic(4);i.yb(3),i.pc("ngStyle",i.kc(4,4,t.healthData.health.status))("ngbPopover",e),i.yb(2),i.Qc(" ",t.healthData.health.status," "),i.yb(1),i.pc("ngIf","HEALTH_OK"!=(null==t.healthData.health?null:t.healthData.health.status))}}function yh(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"div",21),i.jc(2,"healthColor"),i.Oc(3),i.Rb(),i.Pb()),2&e){const e=i.ic(4);i.yb(1),i.pc("ngStyle",i.kc(2,2,e.healthData.health.status)),i.yb(2),i.Qc(" ",e.healthData.health.status," ")}}function vh(e,t){if(1&e&&(i.Sb(0,"cd-info-card",13),i.Yb(1,14),i.Mc(2,_h,7,6,"ng-container",15),i.Mc(3,yh,4,4,"ng-container",15),i.Rb()),2&e){const e=i.ic(3);i.yb(2),i.pc("ngIf",(null==e.healthData.health||null==e.healthData.health.checks?null:e.healthData.health.checks.length)>0),i.yb(1),i.pc("ngIf",!(null!=e.healthData.health&&null!=e.healthData.health.checks&&e.healthData.health.checks.length))}}function wh(e,t){if(1&e&&(i.Sb(0,"cd-info-card",23),i.Yb(1,24),i.Oc(2),i.Rb()),2&e){const e=i.ic(3);i.yb(2),i.Qc(" ",e.healthData.hosts," total ")}}function Sh(e,t){if(1&e&&(i.Sb(0,"cd-info-card",25),i.Yb(1,26),i.Oc(2),i.jc(3,"monSummary"),i.Rb()),2&e){const e=i.ic(3);i.yb(2),i.Qc(" ",i.kc(3,1,e.healthData.mon_status)," ")}}function Mh(e,t){if(1&e&&(i.Sb(0,"span",30),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("ngClass",e.class),i.yb(1),i.Qc(" ",e.content," ")}}function kh(e,t){if(1&e&&(i.Sb(0,"cd-info-card",27),i.Yb(1,28),i.Mc(2,Mh,2,2,"span",29),i.Rb()),2&e){const e=t.ngIf;i.yb(2),i.pc("ngForOf",e)}}function xh(e,t){if(1&e&&(i.Sb(0,"span",33),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("ngClass",e.class)("title",null!=e.titleText?e.titleText:""),i.yb(1),i.Qc(" ",e.content," ")}}function Dh(e,t){if(1&e&&(i.Sb(0,"cd-info-card",13),i.Yb(1,31),i.Mc(2,xh,2,3,"span",32),i.jc(3,"mgrSummary"),i.Rb()),2&e){const e=i.ic(3);i.yb(2),i.pc("ngForOf",i.kc(3,1,e.healthData.mgr_map))}}function Th(e,t){if(1&e&&(i.Sb(0,"cd-info-card",34),i.Yb(1,35),i.Oc(2),i.Rb()),2&e){const e=i.ic(3);i.yb(2),i.Qc(" ",e.healthData.rgw," total ")}}function Ch(e,t){if(1&e&&(i.Sb(0,"span",33),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("ngClass",e.class)("title",null!=e.titleText?e.titleText:""),i.yb(1),i.Qc(" ",e.content," ")}}function Oh(e,t){if(1&e&&(i.Sb(0,"cd-info-card",36),i.Yb(1,37),i.Mc(2,Ch,2,3,"span",32),i.Rb()),2&e){const e=t.ngIf;i.pc("contentClass",(e.length>1?"text-area-size-2":"")+" content-highlight"),i.yb(2),i.pc("ngForOf",e)}}const Lh=function(e){return{"card-text-error":e}};function Rh(e,t){if(1&e&&(i.Sb(0,"cd-info-card",38),i.Yb(1,39),i.Oc(2),i.Nb(3,"span",40),i.Oc(4),i.Sb(5,"span",30),i.Oc(6),i.Rb(),i.Rb()),2&e){const e=i.ic(3);i.yb(2),i.Qc(" ",e.healthData.iscsi_daemons.up+e.healthData.iscsi_daemons.down," total "),i.yb(2),i.Qc(" ",e.healthData.iscsi_daemons.up," up, "),i.yb(1),i.pc("ngClass",i.uc(4,Lh,e.healthData.iscsi_daemons.down>0)),i.yb(1),i.Qc("",e.healthData.iscsi_daemons.down," down")}}function Eh(e,t){if(1&e&&(i.Sb(0,"cd-info-group",4),i.Yb(1,5),i.Mc(2,vh,4,2,"cd-info-card",6),i.Mc(3,wh,3,1,"cd-info-card",7),i.Mc(4,Sh,4,3,"cd-info-card",8),i.Mc(5,kh,3,1,"cd-info-card",9),i.jc(6,"osdSummary"),i.Mc(7,Dh,4,3,"cd-info-card",6),i.Mc(8,Th,3,1,"cd-info-card",10),i.Mc(9,Oh,3,2,"cd-info-card",11),i.jc(10,"mdsSummary"),i.Mc(11,Rh,7,6,"cd-info-card",12),i.Rb()),2&e){const e=i.ic().ngIf,t=i.ic();i.yb(2),i.pc("ngIf",null==t.healthData.health?null:t.healthData.health.status),i.yb(1),i.pc("ngIf",null!=t.healthData.hosts),i.yb(1),i.pc("ngIf",t.healthData.mon_status),i.yb(1),i.pc("ngIf",i.kc(6,8,t.healthData.osd_map)),i.yb(2),i.pc("ngIf",t.healthData.mgr_map),i.yb(1),i.pc("ngIf",e.rgw&&null!=t.healthData.rgw),i.yb(1),i.pc("ngIf",i.kc(10,10,e.cephfs&&t.healthData.fs_map)),i.yb(2),i.pc("ngIf",e.iscsi&&null!=t.healthData.iscsi_daemons)}}function Ah(e,t){if(1&e){const e=i.Tb();i.Sb(0,"cd-info-card",45),i.Yb(1,46),i.Sb(2,"cd-health-pie",47),i.gc("prepareFn",(function(t){return i.Dc(e),i.ic(3).prepareRawUsage(t[0],t[1])})),i.Rb(),i.Rb()}if(2&e){const e=i.ic(3);i.yb(2),i.pc("data",e.healthData)("config",e.rawCapacityChartConfig)("isBytesData",!0)}}function Ih(e,t){if(1&e){const e=i.Tb();i.Sb(0,"cd-info-card",45),i.Yb(1,48),i.Sb(2,"cd-health-pie",49),i.gc("prepareFn",(function(t){return i.Dc(e),i.ic(3).prepareObjects(t[0],t[1])})),i.Rb(),i.Rb()}if(2&e){const e=i.ic(3);i.yb(2),i.pc("data",e.healthData)}}function Ph(e,t){1&e&&i.Ob(0)}function Nh(e,t){if(1&e&&(i.Sb(0,"li"),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.yb(1),i.Rc(" ",e.key,": ",e.value," ")}}function jh(e,t){if(1&e&&(i.Mc(0,Ph,1,0,"ng-container",19),i.Sb(1,"ul"),i.Mc(2,Nh,2,2,"li",20),i.jc(3,"keyvalue"),i.Rb()),2&e){i.ic(3);const e=i.Ac(5),t=i.ic();i.pc("ngTemplateOutlet",e),i.yb(2),i.pc("ngForOf",i.kc(3,2,t.healthData.pg_info.statuses))}}function Fh(e,t){if(1&e){const e=i.Tb();i.Sb(0,"cd-info-card",45),i.Yb(1,50),i.Mc(2,jh,4,4,"ng-template",null,51,i.Nc),i.Sb(4,"div",52),i.Sb(5,"div",53),i.Sb(6,"cd-health-pie",54),i.gc("prepareFn",(function(t){return i.Dc(e),i.ic(3).preparePgStatus(t[0],t[1])})),i.Rb(),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.Ac(3),t=i.ic(3);i.yb(5),i.pc("ngbPopover",e),i.yb(1),i.pc("data",t.healthData)("config",t.pgStatusChartConfig)}}function Yh(e,t){if(1&e&&(i.Sb(0,"cd-info-card",55),i.Yb(1,56),i.Oc(2),i.Rb()),2&e){const e=i.ic(3);i.yb(2),i.Qc(" ",e.healthData.pools.length," ")}}function zh(e,t){if(1&e&&(i.Sb(0,"cd-info-card",57),i.Yb(1,58),i.Oc(2),i.jc(3,"dimless"),i.Rb()),2&e){const e=i.ic(3);i.yb(2),i.Qc(" ",i.kc(3,1,e.healthData.pg_info.pgs_per_osd)," ")}}function $h(e,t){if(1&e&&(i.Sb(0,"cd-info-group",4),i.Yb(1,41),i.Mc(2,Ah,3,3,"cd-info-card",42),i.Mc(3,Ih,3,1,"cd-info-card",42),i.Mc(4,Fh,7,3,"cd-info-card",42),i.Mc(5,Yh,3,1,"cd-info-card",43),i.Mc(6,zh,4,3,"cd-info-card",44),i.Rb()),2&e){const e=i.ic(2);i.yb(2),i.pc("ngIf",e.healthData.df),i.yb(1),i.pc("ngIf",null!=(null==e.healthData.pg_info||null==e.healthData.pg_info.object_stats?null:e.healthData.pg_info.object_stats.num_objects)),i.yb(1),i.pc("ngIf",e.healthData.pg_info),i.yb(1),i.pc("ngIf",e.healthData.pools),i.yb(1),i.pc("ngIf",e.healthData.pg_info)}}function Hh(e,t){if(1&e){const e=i.Tb();i.Sb(0,"cd-info-card",62),i.Yb(1,63),i.Sb(2,"cd-health-pie",54),i.gc("prepareFn",(function(t){return i.Dc(e),i.ic(3).prepareReadWriteRatio(t[0],t[1])})),i.Rb(),i.Rb()}if(2&e){const e=i.ic(3);i.yb(2),i.pc("data",e.healthData)("config",e.clientStatsConfig)}}function Wh(e,t){if(1&e){const e=i.Tb();i.Sb(0,"cd-info-card",62),i.Yb(1,64),i.Sb(2,"cd-health-pie",54),i.gc("prepareFn",(function(t){return i.Dc(e),i.ic(3).prepareClientThroughput(t[0],t[1])})),i.Rb(),i.Rb()}if(2&e){const e=i.ic(3);i.yb(2),i.pc("data",e.healthData)("config",e.clientStatsConfig)}}function Vh(e,t){if(1&e&&(i.Sb(0,"cd-info-card",65),i.Yb(1,66),i.Oc(2),i.jc(3,"dimlessBinary"),i.Rb()),2&e){const e=i.ic(3);i.yb(2),i.Qc(" ",i.kc(3,1,e.healthData.client_perf.recovering_bytes_per_sec)+"/s"," ")}}function Bh(e,t){if(1&e&&(i.Sb(0,"cd-info-card",65),i.Yb(1,67),i.Oc(2),i.Rb()),2&e){const e=i.ic(3);i.yb(2),i.Qc(" ",e.healthData.scrub_status," ")}}function Uh(e,t){if(1&e&&(i.Sb(0,"cd-info-group",4),i.Yb(1,59),i.Mc(2,Hh,3,2,"cd-info-card",60),i.Mc(3,Wh,3,2,"cd-info-card",60),i.Mc(4,Vh,4,3,"cd-info-card",61),i.Mc(5,Bh,3,1,"cd-info-card",61),i.Rb()),2&e){const e=i.ic(2);i.yb(2),i.pc("ngIf",e.healthData.client_perf),i.yb(1),i.pc("ngIf",e.healthData.client_perf),i.yb(1),i.pc("ngIf",e.healthData.client_perf),i.yb(1),i.pc("ngIf",e.healthData.scrub_status)}}const Gh=function(e){return[e]};function qh(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"p",68),i.cc(2,69),i.Nb(3,"i",30),i.Nb(4,"a",70),i.Zb(),i.Rb(),i.Pb()),2&e){const e=i.ic(3);i.yb(3),i.pc("ngClass",i.uc(1,Gh,e.icons.infoCircle))}}function Jh(e,t){if(1&e&&i.Mc(0,qh,5,3,"ng-container",15),2&e){const e=i.ic(2);i.pc("ngIf",e.permissions.log.read)}}function Qh(e,t){if(1&e&&(i.Sb(0,"div",1),i.Mc(1,Eh,12,12,"cd-info-group",2),i.Mc(2,$h,7,5,"cd-info-group",2),i.Mc(3,Uh,6,4,"cd-info-group",2),i.Mc(4,Jh,1,1,"ng-template",null,3,i.Nc),i.Rb()),2&e){const e=i.ic();i.yb(1),i.pc("ngIf",(null==e.healthData.health?null:e.healthData.health.status)||e.healthData.mon_status||e.healthData.osd_map||e.healthData.mgr_map||null!=e.healthData.hosts||null!=e.healthData.rgw||e.healthData.fs_map||null!=e.healthData.iscsi_daemons),i.yb(1),i.pc("ngIf",e.healthData.pools||e.healthData.df||e.healthData.pg_info),i.yb(1),i.pc("ngIf",e.healthData.client_perf||e.healthData.scrub_status)}}let Kh=(()=>{class e{constructor(e,t,n,i,r,s,o){this.healthService=e,this.authStorageService=t,this.pgCategoryService=n,this.featureToggles=i,this.refreshIntervalService=r,this.dimlessBinary=s,this.dimless=o,this.interval=new Oi.a,this.icons=_n.a,this.clientStatsConfig={colors:[{backgroundColor:[Jd.a.chartHealthColorCyan,Jd.a.chartHealthColorPurple]}]},this.rawCapacityChartConfig={colors:[{backgroundColor:[Jd.a.chartHealthColorBlue,Jd.a.chartHealthColorGray]}]},this.pgStatusChartConfig={options:{events:[""]}},this.permissions=this.authStorageService.getPermissions(),this.enabledFeature$=this.featureToggles.get()}ngOnInit(){this.interval=this.refreshIntervalService.intervalData$.subscribe(()=>{this.getHealth()})}ngOnDestroy(){this.interval.unsubscribe()}getHealth(){this.healthService.getMinimalHealth().subscribe(e=>{this.healthData=e})}prepareReadWriteRatio(e){const t=[],n=[],i=this.healthData.client_perf.write_op_per_sec+this.healthData.client_perf.read_op_per_sec;t.push(`${"Reads"}: ${this.dimless.transform(this.healthData.client_perf.read_op_per_sec)} ${"/s"}`),n.push(this.calcPercentage(this.healthData.client_perf.read_op_per_sec,i)),t.push(`${"Writes"}: ${this.dimless.transform(this.healthData.client_perf.write_op_per_sec)} ${"/s"}`),n.push(this.calcPercentage(this.healthData.client_perf.write_op_per_sec,i)),e.labels=t,e.dataset[0].data=n,e.dataset[0].label=`${this.dimless.transform(i)}\n${"IOPS"}`}prepareClientThroughput(e){const t=[],n=[],i=this.healthData.client_perf.read_bytes_sec+this.healthData.client_perf.write_bytes_sec;t.push(`${"Reads"}: ${this.dimlessBinary.transform(this.healthData.client_perf.read_bytes_sec)}${"/s"}`),n.push(this.calcPercentage(this.healthData.client_perf.read_bytes_sec,i)),t.push(`${"Writes"}: ${this.dimlessBinary.transform(this.healthData.client_perf.write_bytes_sec)}${"/s"}`),n.push(this.calcPercentage(this.healthData.client_perf.write_bytes_sec,i)),e.labels=t,e.dataset[0].data=n,e.dataset[0].label=`${this.dimlessBinary.transform(i).replace(" ","\n")}${"/s"}`}prepareRawUsage(e,t){const n=this.calcPercentage(t.df.stats.total_bytes-t.df.stats.total_used_raw_bytes,t.df.stats.total_bytes),i=this.calcPercentage(t.df.stats.total_used_raw_bytes,t.df.stats.total_bytes);e.dataset[0].data=[i,n],e.labels=[`${"Used"}: ${this.dimlessBinary.transform(t.df.stats.total_used_raw_bytes)}`,`${"Avail."}: ${this.dimlessBinary.transform(t.df.stats.total_bytes-t.df.stats.total_used_raw_bytes)}`],e.dataset[0].label=`${i}%\nof ${this.dimlessBinary.transform(t.df.stats.total_bytes)}`}preparePgStatus(e,t){const n={};let i=0;jt.a.forEach(t.pg_info.statuses,(e,t)=>{const r=this.pgCategoryService.getTypeByStates(t);jt.a.isUndefined(n[r])&&(n[r]=0),n[r]+=e,i+=e});for(const r of this.pgCategoryService.getAllTypes())jt.a.isUndefined(n[r])&&(n[r]=0);e.dataset[0].data=this.pgCategoryService.getAllTypes().map(e=>this.calcPercentage(n[e],i)),e.labels=[`${"Clean"}: ${this.dimless.transform(n.clean)}`,`${"Working"}: ${this.dimless.transform(n.working)}`,`${"Warning"}: ${this.dimless.transform(n.warning)}`,`${"Unknown"}: ${this.dimless.transform(n.unknown)}`],e.dataset[0].label=`${i}\n${"PGs"}`}prepareObjects(e,t){const n=t.pg_info.object_stats.num_object_copies,i=this.calcPercentage(n-t.pg_info.object_stats.num_objects_misplaced-t.pg_info.object_stats.num_objects_degraded-t.pg_info.object_stats.num_objects_unfound,n),r=this.calcPercentage(t.pg_info.object_stats.num_objects_misplaced,n),s=this.calcPercentage(t.pg_info.object_stats.num_objects_degraded,n),o=this.calcPercentage(t.pg_info.object_stats.num_objects_unfound,n);e.labels=[`${"Healthy"}: ${i}%`,`${"Misplaced"}: ${r}%`,`${"Degraded"}: ${s}%`,`${"Unfound"}: ${o}%`],e.dataset[0].data=[i,r,s,o],e.dataset[0].label=`${this.dimless.transform(t.pg_info.object_stats.num_objects)}\n${"objects"}`}isClientReadWriteChartShowable(){return(this.healthData.client_perf.read_op_per_sec||0)+(this.healthData.client_perf.write_op_per_sec||0)>0}calcPercentage(e,t){return jt.a.isNumber(e)&&jt.a.isNumber(t)&&0!==t?Math.round(e/t*100):0}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Li),i.Mb(Jt.a),i.Mb(Ud.a),i.Mb(Gd.a),i.Mb(Wd),i.Mb(Zt.a),i.Mb(Xt.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-health"]],decls:2,vars:3,consts:function(){return[["class","container-fluid",4,"ngIf"],[1,"container-fluid"],[4,"ngIf",6,"groupTitle"],["logsLink",""],[6,"groupTitle"],["groupTitle","Status"],["class","cd-status-card","contentClass","content-highlight",4,"ngIf",6,"cardTitle"],["link","/hosts","class","cd-status-card","contentClass","content-highlight",4,"ngIf",6,"cardTitle"],["link","/monitor","class","cd-status-card","contentClass","content-highlight",4,"ngIf",6,"cardTitle"],["link","/osd","class","cd-status-card","contentClass","content-highlight",4,"ngIf",6,"cardTitle"],["link","/rgw/daemon","class","cd-status-card","contentClass","content-highlight",4,"ngIf",6,"cardTitle"],["class","cd-status-card",3,"contentClass",4,"ngIf",6,"cardTitle"],["link","/block/iscsi","class","cd-status-card","contentClass","content-highlight",4,"ngIf",6,"cardTitle"],["contentClass","content-highlight",1,"cd-status-card",6,"cardTitle"],["cardTitle","Cluster Status"],[4,"ngIf"],["healthChecks",""],["popoverClass","info-card-popover-cluster-status",1,"info-card-content-clickable",3,"ngStyle","ngbPopover"],["class","fa fa-exclamation-triangle",4,"ngIf"],[4,"ngTemplateOutlet"],[4,"ngFor","ngForOf"],[3,"ngStyle"],[1,"fa","fa-exclamation-triangle"],["link","/hosts","contentClass","content-highlight",1,"cd-status-card",6,"cardTitle"],["cardTitle","Hosts"],["link","/monitor","contentClass","content-highlight",1,"cd-status-card",6,"cardTitle"],["cardTitle","Monitors"],["link","/osd","contentClass","content-highlight",1,"cd-status-card",6,"cardTitle"],["cardTitle","OSDs"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],["cardTitle","Managers"],[3,"ngClass","title",4,"ngFor","ngForOf"],[3,"ngClass","title"],["link","/rgw/daemon","contentClass","content-highlight",1,"cd-status-card",6,"cardTitle"],["cardTitle","Object Gateways"],[1,"cd-status-card",3,"contentClass",6,"cardTitle"],["cardTitle","Metadata Servers"],["link","/block/iscsi","contentClass","content-highlight",1,"cd-status-card",6,"cardTitle"],["cardTitle","iSCSI Gateways"],[1,"card-text-line-break"],["groupTitle","Capacity"],["class","cd-capacity-card cd-chart-card","contentClass","content-chart",4,"ngIf",6,"cardTitle"],["link","/pool","class","cd-capacity-card","contentClass","content-highlight",4,"ngIf",6,"cardTitle"],["class","cd-capacity-card","contentClass","content-highlight",4,"ngIf",6,"cardTitle"],["contentClass","content-chart",1,"cd-capacity-card","cd-chart-card",6,"cardTitle"],["cardTitle","Raw Capacity"],[3,"data","config","isBytesData","prepareFn"],["cardTitle","Objects"],[3,"data","prepareFn"],["cardTitle","PG Status"],["pgStatus",""],[1,"pg-status-popover-wrapper"],[3,"ngbPopover"],[3,"data","config","prepareFn"],["link","/pool","contentClass","content-highlight",1,"cd-capacity-card",6,"cardTitle"],["cardTitle","Pools"],["contentClass","content-highlight",1,"cd-capacity-card",6,"cardTitle"],["cardTitle","PGs per OSD"],["groupTitle","Performance"],["class","cd-performance-card cd-chart-card","contentClass","content-chart",4,"ngIf",6,"cardTitle"],["class","cd-performance-card","contentClass","content-highlight",4,"ngIf",6,"cardTitle"],["contentClass","content-chart",1,"cd-performance-card","cd-chart-card",6,"cardTitle"],["cardTitle","Client Read/Write"],["cardTitle","Client Throughput"],["contentClass","content-highlight",1,"cd-performance-card",6,"cardTitle"],["cardTitle","Recovery Throughput"],["cardTitle","Scrubbing"],[1,"logs-link"],"" + "\ufffd#3\ufffd" + "" + "\ufffd/#3\ufffd" + " See " + "\ufffd#4\ufffd" + "Logs" + "\ufffd/#4\ufffd" + " for more details.",["routerLink","/logs"]]},template:function(e,t){1&e&&(i.Mc(0,Qh,6,3,"div",0),i.jc(1,"async")),2&e&&i.pc("ngIf",i.kc(1,1,t.healthData&&t.enabledFeature$))},directives:[wt.r,Xd,ih,wt.s,Qt.w,wt.w,wt.q,wt.p,ah,Pt.h],pipes:[wt.b,ch,lh,dh,hh,fh,wt.k,Xt.a,Zt.a],styles:['cd-info-card[_ngcontent-%COMP%]{padding:0 .5vw} cd-health .pg-status-popover-wrapper{position:relative} cd-health .pg-status-popover-wrapper .popover{max-height:20vh;max-width:unset!important;min-width:unset!important;position:absolute;width:116%} cd-health .pg-status-popover-wrapper .popover .popover-body{font-size:1rem;max-height:19vh;max-width:100%}.logs-link[_ngcontent-%COMP%]{text-align:center}.card-text-error[_ngcontent-%COMP%]{color:#ef5c55;display:inline}.card-text-line-break[_ngcontent-%COMP%]:after{content:"\\a";white-space:pre}.popover-info[_ngcontent-%COMP%]:hover{cursor:pointer}']}),e})();function Zh(e,t){1&e&&i.Nb(0,"cd-health")}function Xh(e,t){}function ef(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"ul",1,2),i.Sb(3,"li",3),i.Sb(4,"a",4),i.Wb(5,5),i.Rb(),i.Mc(6,Zh,1,0,"ng-template",6),i.Rb(),i.Sb(7,"li",3),i.Sb(8,"a",4),i.Wb(9,7),i.Rb(),i.Mc(10,Xh,0,0,"ng-template",6),i.Rb(),i.Rb(),i.Nb(11,"div",8),i.Pb()),2&e){const e=i.Ac(2);i.yb(11),i.pc("ngbNavOutlet",e)}}function tf(e,t){1&e&&i.Nb(0,"cd-health")}let nf=(()=>{class e{constructor(){this.hasGrafana=!1}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-dashboard"]],decls:4,vars:2,consts:function(){return[[4,"ngIf"],["ngbNav","",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem",""],["ngbNavLink",""],"Health",["ngbNavContent",""],"Statistics",[3,"ngbNavOutlet"]]},template:function(e,t){1&e&&(i.Sb(0,"div"),i.Nb(1,"cd-refresh-selector"),i.Mc(2,ef,12,1,"ng-container",0),i.Mc(3,tf,1,0,"cd-health",0),i.Rb()),2&e&&(i.yb(2),i.pc("ngIf",t.hasGrafana),i.yb(1),i.pc("ngIf",!t.hasGrafana))},directives:[Bd,wt.r,Qt.p,Qt.r,Qt.s,Qt.q,Qt.u,Kh],styles:["div[_ngcontent-%COMP%]{padding-top:20px}"]}),e})(),rf=(()=>{class e{constructor(e){this.http=e,this.apiPath="api/nfs-ganesha",this.uiApiPath="ui-api/nfs-ganesha",this.nfsAccessType=[{value:"RW",help:"Allows all operations"},{value:"RO",help:"Allows only operations that do not modify the server"},{value:"MDONLY",help:"Does not allow read or write operations, but allows any other operation"},{value:"MDONLY_RO",help:"Does not allow read, write, or any operation that modifies file attributes or directory content"},{value:"NONE",help:"Allows no access at all"}],this.nfsFsal=[{value:"CEPH",descr:"CephFS"},{value:"RGW",descr:"Object Gateway"}],this.nfsSquash=["no_root_squash","root_id_squash","root_squash","all_squash"]}list(){return this.http.get(this.apiPath+"/export")}get(e,t){return this.http.get(`${this.apiPath}/export/${e}/${t}`)}create(e){return this.http.post(this.apiPath+"/export",e,{observe:"response"})}update(e,t,n){return this.http.put(`${this.apiPath}/export/${e}/${t}`,n,{observe:"response"})}delete(e,t){return this.http.delete(`${this.apiPath}/export/${e}/${t}`,{observe:"response"})}lsDir(e,t){return this.http.get(`${this.uiApiPath}/lsdir/${e}?root_dir=${t}`)}buckets(e){return this.http.get(`${this.uiApiPath}/rgw/buckets?user_id=${e}`)}clients(){return this.http.get(this.uiApiPath+"/cephx/clients")}fsals(){return this.http.get(this.uiApiPath+"/fsals")}filesystems(){return this.http.get(this.uiApiPath+"/cephfs/filesystems")}daemon(){return this.http.get(this.apiPath+"/daemon")}start(e){return this.http.put(`${this.apiPath}/service/${e}/start`,null,{observe:"response"})}stop(e){return this.http.put(`${this.apiPath}/service/${e}/stop`,null,{observe:"response"})}}return e.\u0275fac=function(t){return new(t||e)(i.dc(o.b))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var sf=n("P8lu"),of=function(e){return e.user="user",e.orchestrator="orchestrator",e}({}),af=n("TYzs");function cf(e,t){1&e&&(i.Sb(0,"span",14),i.Sb(1,"span",15),i.Wb(2,16),i.Rb(),i.Rb())}function lf(e,t){1&e&&(i.Sb(0,"span"),i.Wb(1,36),i.Rb())}function uf(e,t){1&e&&(i.Sb(0,"span"),i.Qb(1),i.Wb(2,37),i.Pb(),i.Nb(3,"br"),i.Qb(4),i.Wb(5,38),i.Pb(),i.Oc(6," 192.168.0.10, 192.168.1.0/8 "),i.Rb())}function df(e,t){if(1&e&&(i.Sb(0,"option",39),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e.value),i.yb(1),i.Pc(e.value)}}function hf(e,t){if(1&e&&(i.Sb(0,"span",15),i.Oc(1),i.Rb()),2&e){const e=i.ic().index,t=i.ic();i.yb(1),i.Qc(" ",t.getAccessTypeHelp(e)," ")}}function ff(e,t){if(1&e&&(i.Sb(0,"option",39),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e),i.yb(1),i.Pc(e)}}function pf(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div"),i.Sb(1,"div",17),i.Sb(2,"div",18),i.Oc(3),i.jc(4,"ordinal"),i.Sb(5,"span",19),i.gc("click",(function(){i.Dc(e);const n=t.index;return i.ic().removeClient(n)})),i.Oc(6,"\xd7"),i.Rb(),i.Rb(),i.Sb(7,"div",20),i.Sb(8,"div",0),i.Sb(9,"label",21),i.Wb(10,22),i.Rb(),i.Sb(11,"div",23),i.Nb(12,"input",24),i.Sb(13,"span",25),i.Mc(14,lf,2,0,"span",26),i.Mc(15,uf,7,0,"span",26),i.Rb(),i.Rb(),i.Rb(),i.Sb(16,"div",0),i.Sb(17,"label",27),i.Wb(18,28),i.Rb(),i.Sb(19,"div",23),i.Sb(20,"select",29),i.Sb(21,"option",30),i.Oc(22),i.Rb(),i.Mc(23,df,2,2,"option",31),i.Rb(),i.Mc(24,hf,2,1,"span",32),i.Rb(),i.Rb(),i.Sb(25,"div",0),i.Sb(26,"label",33),i.Wb(27,34),i.Rb(),i.Sb(28,"div",23),i.Sb(29,"select",35),i.Sb(30,"option",30),i.Oc(31),i.Rb(),i.Mc(32,ff,2,2,"option",31),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=t.index,n=i.ic(),r=i.Ac(4);i.yb(1),i.pc("formGroupName",e),i.yb(2),i.Qc(" ",i.kc(4,9,e+1)," "),i.yb(11),i.pc("ngIf",n.showError(e,"addresses",r,"required")),i.yb(1),i.pc("ngIf",n.showError(e,"addresses",r,"pattern")),i.yb(7),i.Pc(n.getNoAccessTypeDescr()),i.yb(1),i.pc("ngForOf",n.nfsAccessType),i.yb(1),i.pc("ngIf",n.getValue(e,"access_type")),i.yb(7),i.Pc(n.getNoSquashDescr()),i.yb(1),i.pc("ngForOf",n.nfsSquash)}}const mf=function(e){return[e]};let bf=(()=>{class e{constructor(e){this.nfsService=e,this.nfsSquash=this.nfsService.nfsSquash,this.nfsAccessType=this.nfsService.nfsAccessType,this.icons=_n.a}ngOnInit(){jt.a.forEach(this.clients,e=>{this.addClient().patchValue(e)})}getNoAccessTypeDescr(){return this.form.getValue("access_type")?`${this.form.getValue("access_type")} ${"(inherited from global config)"}`:"-- Select the access type --"}getAccessTypeHelp(e){const t=this.nfsAccessType.find(t=>this.getValue(e,"access_type")===t.value);return jt.a.isObjectLike(t)?t.help:""}getNoSquashDescr(){return this.form.getValue("squash")?`${this.form.getValue("squash")} (${"inherited from global config"})`:"-- Select what kind of user id squashing is performed --"}addClient(){const e=this.form.get("clients"),t="(([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3}).([0-9]{1,3})([/](\\d|[1-2]\\d|3[0-2]))?)",n=new Jn.a({addresses:new kn.h("",{validators:[kn.A.required,kn.A.pattern(`${t}([ ,]{1,2}${t})*`)]}),access_type:new kn.h(""),squash:new kn.h("")});return e.push(n),n}removeClient(e){this.form.get("clients").removeAt(e)}showError(e,t,n,i){return this.form.controls.clients.controls[e].showError(t,n,i)}getValue(e,t){return this.form.get("clients").at(e).getValue(t)}trackByFn(e){return e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(rf))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-nfs-form-client"]],inputs:{form:"form",clients:"clients"},decls:15,vars:7,consts:function(){return[[1,"form-group","row"],[1,"cd-col-form-label"],"Clients",[1,"cd-col-form-input",3,"formGroup"],["formDir","ngForm"],["class","no-border text-muted",4,"ngIf"],["formArrayName","clients"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"row"],[1,"col-12"],[1,"float-right"],[1,"btn","btn-light",3,"click"],[3,"ngClass"],"Add clients",[1,"no-border","text-muted"],[1,"form-text","text-muted"],"Any client can access",[1,"card",3,"formGroupName"],[1,"card-header"],["ngbTooltip","Remove",1,"float-right","clickable",3,"click"],[1,"card-body"],["for","addresses",1,"cd-col-form-label"],"Addresses",[1,"cd-col-form-input"],["type","text","name","addresses","id","addresses","formControlName","addresses","placeholder","192.168.0.10, 192.168.1.0/8",1,"form-control"],[1,"invalid-feedback"],[4,"ngIf"],["for","access_type",1,"cd-col-form-label"],"Access Type",["name","access_type","id","access_type","formControlName","access_type",1,"form-control","custom-select"],["value",""],[3,"value",4,"ngFor","ngForOf"],["class","form-text text-muted",4,"ngIf"],["for","squash",1,"cd-col-form-label"],"Squash",["name","squash","id","squash","formControlName","squash",1,"form-control","custom-select"],"This field is required.","Must contain one or more comma-separated values","For example:",[3,"value"]]},template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Sb(1,"label",1),i.Wb(2,2),i.Rb(),i.Sb(3,"div",3,4),i.Mc(5,cf,3,0,"span",5),i.Qb(6,6),i.Mc(7,pf,33,11,"div",7),i.Pb(),i.Sb(8,"div",8),i.Sb(9,"div",9),i.Sb(10,"div",10),i.Sb(11,"button",11),i.gc("click",(function(){return t.addClient()})),i.Nb(12,"i",12),i.Qb(13),i.Wb(14,13),i.Pb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb()),2&e&&(i.yb(3),i.pc("formGroup",t.form),i.yb(2),i.pc("ngIf",0===t.form.get("clients").value.length),i.yb(2),i.pc("ngForOf",t.form.get("clients").value)("ngForTrackBy",t.trackByFn),i.yb(5),i.pc("ngClass",i.uc(5,mf,t.icons.add)))},directives:[Xn.a,kn.r,kn.k,Zn.a,wt.r,kn.f,wt.q,On.a,wt.p,kn.l,Qt.D,kn.d,ei.a,kn.q,kn.i,kn.z,kn.u,kn.B],pipes:[af.a],styles:[""]}),e})();var gf=n("wnGv");const _f=["nfsClients"];function yf(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,51),i.Rb())}function vf(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,52),i.Rb())}function wf(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,53),i.Rb())}function Sf(e,t){if(1&e&&(i.Sb(0,"option",54),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e.cluster_id),i.yb(1),i.Pc(e.cluster_id)}}function Mf(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,56),i.Rb())}function kf(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",10),i.Sb(1,"label",47),i.Wb(2,48),i.Rb(),i.Sb(3,"div",13),i.Sb(4,"select",49),i.gc("change",(function(){return i.Dc(e),i.ic(2).onClusterChange()})),i.Mc(5,yf,2,0,"option",15),i.Mc(6,vf,2,0,"option",15),i.Mc(7,wf,2,0,"option",15),i.Mc(8,Sf,2,2,"option",16),i.Rb(),i.Mc(9,Mf,2,0,"span",17),i.Rb(),i.Rb()}if(2&e){i.ic();const e=i.Ac(2),t=i.ic();i.yb(5),i.pc("ngIf",null===t.allClusters),i.yb(1),i.pc("ngIf",null!==t.allClusters&&0===t.allClusters.length),i.yb(1),i.pc("ngIf",null!==t.allClusters&&t.allClusters.length>0),i.yb(1),i.pc("ngForOf",t.allClusters),i.yb(1),i.pc("ngIf",t.nfsForm.showError("cluster_id",e,"required"))}}const xf=function(e){return[e]};function Df(e,t){if(1&e){const e=i.Tb();i.Sb(0,"span",64),i.Sb(1,"button",65),i.gc("click",(function(){i.Dc(e);const t=i.ic(),n=t.index,r=t.$implicit;return i.ic(3).removeDaemon(n,r)})),i.Nb(2,"i",66),i.Rb(),i.Rb()}if(2&e){const e=i.ic(4);i.yb(2),i.pc("ngClass",i.uc(1,xf,e.icons.destroy))}}function Tf(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"div",61),i.Nb(2,"input",62),i.Mc(3,Df,3,3,"span",63),i.Rb(),i.Pb()),2&e){const e=t.$implicit,n=i.ic(3);i.yb(2),i.pc("value",e),i.yb(1),i.pc("ngIf","user"===n.clusterType)}}function Cf(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",67),i.Sb(1,"div",68),i.Sb(2,"cd-select",69),i.gc("selection",(function(){return i.Dc(e),i.ic(3).onDaemonSelection()})),i.Nb(3,"i",70),i.Qb(4),i.Wb(5,71),i.Pb(),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.ic(3);i.yb(2),i.pc("data",e.nfsForm.get("daemons").value)("options",e.daemonsSelections)("messages",e.daemonsMessages),i.yb(1),i.pc("ngClass",i.uc(4,xf,e.icons.add))}}function Of(e,t){1&e&&(i.Qb(0),i.Wb(1,75),i.Pb())}function Lf(e,t){1&e&&(i.Qb(0),i.Wb(1,76),i.Pb())}function Rf(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",67),i.Sb(1,"div",68),i.Sb(2,"button",72),i.gc("click",(function(){return i.Dc(e),i.ic(3).onToggleAllDaemonsSelection()})),i.Nb(3,"i",70),i.Mc(4,Of,2,0,"ng-container",73),i.Mc(5,Lf,2,0,"ng-template",null,74,i.Nc),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.Ac(6),t=i.ic(3);i.yb(3),i.pc("ngClass",i.uc(3,xf,t.icons.add)),i.yb(1),i.pc("ngIf",0===t.nfsForm.getValue("daemons").length)("ngIfElse",e)}}function Ef(e,t){if(1&e&&(i.Sb(0,"div",10),i.Sb(1,"label",57),i.Qb(2),i.Wb(3,58),i.Pb(),i.Rb(),i.Sb(4,"div",13),i.Mc(5,Tf,4,2,"ng-container",59),i.Mc(6,Cf,6,6,"div",60),i.Mc(7,Rf,7,5,"div",60),i.Rb(),i.Rb()),2&e){const e=i.ic(2);i.yb(5),i.pc("ngForOf",e.nfsForm.getValue("daemons")),i.yb(1),i.pc("ngIf","user"===e.clusterType),i.yb(1),i.pc("ngIf","orchestrator"===e.clusterType)}}function Af(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,77),i.Rb())}function If(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,78),i.Rb())}function Pf(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,79),i.Rb())}function Nf(e,t){if(1&e&&(i.Sb(0,"option",54),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e.value),i.yb(1),i.Pc(e.descr)}}function jf(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,80),i.Rb())}function Ff(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,84),i.Rb())}function Yf(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,85),i.Rb())}function zf(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,86),i.Rb())}function $f(e,t){if(1&e&&(i.Sb(0,"option",54),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e),i.yb(1),i.Pc(e)}}function Hf(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,87),i.Rb())}function Wf(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",10),i.Sb(1,"label",81),i.Wb(2,82),i.Rb(),i.Sb(3,"div",13),i.Sb(4,"select",83),i.gc("change",(function(){return i.Dc(e),i.ic(2).rgwUserIdChangeHandler()})),i.Mc(5,Ff,2,0,"option",15),i.Mc(6,Yf,2,0,"option",15),i.Mc(7,zf,2,0,"option",15),i.Mc(8,$f,2,2,"option",16),i.Rb(),i.Mc(9,Hf,2,0,"span",17),i.Rb(),i.Rb()}if(2&e){i.ic();const e=i.Ac(2),t=i.ic();i.yb(5),i.pc("ngIf",null===t.allRgwUsers),i.yb(1),i.pc("ngIf",null!==t.allRgwUsers&&0===t.allRgwUsers.length),i.yb(1),i.pc("ngIf",null!==t.allRgwUsers&&t.allRgwUsers.length>0),i.yb(1),i.pc("ngForOf",t.allRgwUsers),i.yb(1),i.pc("ngIf",t.nfsForm.showError("rgw_user_id",e,"required"))}}function Vf(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,91),i.Rb())}function Bf(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,92),i.Rb())}function Uf(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,93),i.Rb())}function Gf(e,t){if(1&e&&(i.Sb(0,"option",54),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e),i.yb(1),i.Pc(e)}}function qf(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,94),i.Rb())}function Jf(e,t){if(1&e&&(i.Sb(0,"div",10),i.Sb(1,"label",88),i.Wb(2,89),i.Rb(),i.Sb(3,"div",13),i.Sb(4,"select",90),i.Mc(5,Vf,2,0,"option",15),i.Mc(6,Bf,2,0,"option",15),i.Mc(7,Uf,2,0,"option",15),i.Mc(8,Gf,2,2,"option",16),i.Rb(),i.Mc(9,qf,2,0,"span",17),i.Rb(),i.Rb()),2&e){i.ic();const e=i.Ac(2),t=i.ic();i.yb(5),i.pc("ngIf",null===t.allCephxClients),i.yb(1),i.pc("ngIf",null!==t.allCephxClients&&0===t.allCephxClients.length),i.yb(1),i.pc("ngIf",null!==t.allCephxClients&&t.allCephxClients.length>0),i.yb(1),i.pc("ngForOf",t.allCephxClients),i.yb(1),i.pc("ngIf",t.nfsForm.showError("user_id",e,"required"))}}function Qf(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,98),i.Rb())}function Kf(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,99),i.Rb())}function Zf(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,100),i.Rb())}function Xf(e,t){if(1&e&&(i.Sb(0,"option",54),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e.name),i.yb(1),i.Pc(e.name)}}function ep(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,101),i.Rb())}function tp(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",10),i.Sb(1,"label",95),i.Wb(2,96),i.Rb(),i.Sb(3,"div",13),i.Sb(4,"select",97),i.gc("change",(function(){return i.Dc(e),i.ic(2).rgwUserIdChangeHandler()})),i.Mc(5,Qf,2,0,"option",15),i.Mc(6,Kf,2,0,"option",15),i.Mc(7,Zf,2,0,"option",15),i.Mc(8,Xf,2,2,"option",16),i.Rb(),i.Mc(9,ep,2,0,"span",17),i.Rb(),i.Rb()}if(2&e){i.ic();const e=i.Ac(2),t=i.ic();i.yb(5),i.pc("ngIf",null===t.allFsNames),i.yb(1),i.pc("ngIf",null!==t.allFsNames&&0===t.allFsNames.length),i.yb(1),i.pc("ngIf",null!==t.allFsNames&&t.allFsNames.length>0),i.yb(1),i.pc("ngForOf",t.allFsNames),i.yb(1),i.pc("ngIf",t.nfsForm.showError("fs_name",e,"required"))}}function np(e,t){1&e&&i.Nb(0,"input",108)}function ip(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,109),i.Rb())}const rp=function(e){return{required:e}};function sp(e,t){if(1&e&&(i.Sb(0,"div",10),i.Sb(1,"label",102),i.Wb(2,103),i.Rb(),i.Sb(3,"div",13),i.Sb(4,"div",20),i.Nb(5,"input",104),i.Sb(6,"label",105),i.Wb(7,106),i.Rb(),i.Rb(),i.Nb(8,"br"),i.Mc(9,np,1,0,"input",107),i.Mc(10,ip,2,0,"span",17),i.Rb(),i.Rb()),2&e){i.ic();const e=i.Ac(2),t=i.ic();i.yb(1),i.pc("ngClass",i.uc(3,rp,t.nfsForm.getValue("security_label"))),i.yb(8),i.pc("ngIf",t.nfsForm.getValue("security_label")),i.yb(1),i.pc("ngIf",t.nfsForm.showError("sec_label_xattr",e,"required"))}}function op(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,113),i.Rb())}function ap(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,114),i.Rb())}function cp(e,t){1&e&&(i.Sb(0,"span",115),i.Wb(1,116),i.Rb())}function lp(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",10),i.Sb(1,"label",110),i.Wb(2,111),i.Rb(),i.Sb(3,"div",13),i.Sb(4,"input",112),i.gc("selectItem",(function(){return i.Dc(e),i.ic(2).pathChangeHandler()}))("blur",(function(){return i.Dc(e),i.ic(2).pathChangeHandler()})),i.Rb(),i.Mc(5,op,2,0,"span",17),i.Mc(6,ap,2,0,"span",17),i.Mc(7,cp,2,0,"span",30),i.Rb(),i.Rb()}if(2&e){i.ic();const e=i.Ac(2),t=i.ic();i.yb(4),i.pc("ngbTypeahead",t.pathDataSource),i.yb(1),i.pc("ngIf",t.nfsForm.showError("path",e,"required")),i.yb(1),i.pc("ngIf",t.nfsForm.showError("path",e,"pattern")),i.yb(1),i.pc("ngIf",t.isNewDirectory&&!t.nfsForm.showError("path",e))}}function up(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,118),i.Rb())}function dp(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,119),i.Rb())}function hp(e,t){1&e&&(i.Sb(0,"span",115),i.Wb(1,120),i.Rb())}function fp(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",10),i.Sb(1,"label",110),i.Wb(2,117),i.Rb(),i.Sb(3,"div",13),i.Sb(4,"input",112),i.gc("selectItem",(function(){return i.Dc(e),i.ic(2).bucketChangeHandler()}))("blur",(function(){return i.Dc(e),i.ic(2).bucketChangeHandler()})),i.Rb(),i.Mc(5,up,2,0,"span",17),i.Mc(6,dp,2,0,"span",17),i.Mc(7,hp,2,0,"span",30),i.Rb(),i.Rb()}if(2&e){i.ic();const e=i.Ac(2),t=i.ic();i.yb(4),i.pc("ngbTypeahead",t.bucketDataSource),i.yb(1),i.pc("ngIf",t.nfsForm.showError("path",e,"required")),i.yb(1),i.pc("ngIf",t.nfsForm.showError("path",e,"pattern")),i.yb(1),i.pc("ngIf",t.isNewBucket&&!t.nfsForm.showError("path",e))}}function pp(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,121),i.Rb())}function mp(e,t){1&e&&(i.Sb(0,"div",10),i.Sb(1,"label",122),i.Qb(2),i.Wb(3,123),i.Pb(),i.Sb(4,"cd-helper"),i.Sb(5,"p"),i.cc(6,124),i.Nb(7,"strong"),i.Zb(),i.Rb(),i.Sb(8,"p"),i.Wb(9,125),i.Rb(),i.Sb(10,"p"),i.Wb(11,126),i.Rb(),i.Rb(),i.Rb(),i.Sb(12,"div",13),i.Nb(13,"input",127),i.Rb(),i.Rb())}function bp(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,134),i.Rb())}function gp(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,135),i.Rb())}function _p(e,t){if(1&e&&(i.Sb(0,"div",10),i.Sb(1,"label",128),i.Sb(2,"span",129),i.Wb(3,130),i.Rb(),i.Sb(4,"cd-helper"),i.Sb(5,"p"),i.cc(6,131),i.Nb(7,"strong"),i.Nb(8,"strong"),i.Zb(),i.Rb(),i.Sb(9,"p"),i.Wb(10,132),i.Rb(),i.Rb(),i.Rb(),i.Sb(11,"div",13),i.Nb(12,"input",133),i.Mc(13,bp,2,0,"span",17),i.Mc(14,gp,2,0,"span",17),i.Rb(),i.Rb()),2&e){i.ic();const e=i.Ac(2),t=i.ic();i.yb(13),i.pc("ngIf",t.nfsForm.showError("pseudo",e,"required")),i.yb(1),i.pc("ngIf",t.nfsForm.showError("pseudo",e,"pattern"))}}function yp(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,136),i.Rb())}function vp(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,137),i.Rb())}function wp(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,138),i.Rb())}function Sp(e,t){if(1&e&&(i.Sb(0,"option",54),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e.value),i.yb(1),i.Pc(e.value)}}function Mp(e,t){if(1&e&&(i.Sb(0,"span",115),i.Oc(1),i.Rb()),2&e){const e=i.ic(2);i.yb(1),i.Qc(" ",e.getAccessTypeHelp(e.nfsForm.getValue("access_type"))," ")}}function kp(e,t){1&e&&(i.Sb(0,"span",139),i.cc(1,140),i.Nb(2,"cd-doc",141),i.Zb(),i.Rb())}function xp(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,142),i.Rb())}function Dp(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,143),i.Rb())}function Tp(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,144),i.Rb())}function Cp(e,t){1&e&&(i.Sb(0,"option",50),i.Wb(1,145),i.Rb())}function Op(e,t){if(1&e&&(i.Sb(0,"option",54),i.Oc(1),i.Rb()),2&e){const e=t.$implicit;i.pc("value",e),i.yb(1),i.Pc(e)}}function Lp(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,146),i.Rb())}function Rp(e,t){1&e&&(i.Sb(0,"span",55),i.Wb(1,147),i.Rb())}function Ep(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",1),i.Sb(1,"form",2,3),i.Sb(3,"div",4),i.Sb(4,"div",5),i.Wb(5,6),i.jc(6,"titlecase"),i.jc(7,"upperFirst"),i.Rb(),i.Sb(8,"div",7),i.Mc(9,kf,10,5,"div",8),i.Mc(10,Ef,8,3,"div",8),i.Sb(11,"div",9),i.Sb(12,"div",10),i.Sb(13,"label",11),i.Wb(14,12),i.Rb(),i.Sb(15,"div",13),i.Sb(16,"select",14),i.gc("change",(function(){return i.Dc(e),i.ic().fsalChangeHandler()})),i.Mc(17,Af,2,0,"option",15),i.Mc(18,If,2,0,"option",15),i.Mc(19,Pf,2,0,"option",15),i.Mc(20,Nf,2,2,"option",16),i.Rb(),i.Mc(21,jf,2,0,"span",17),i.Rb(),i.Rb(),i.Mc(22,Wf,10,5,"div",8),i.Mc(23,Jf,10,5,"div",8),i.Mc(24,tp,10,5,"div",8),i.Rb(),i.Mc(25,sp,11,5,"div",8),i.Mc(26,lp,8,4,"div",8),i.Mc(27,fp,8,4,"div",8),i.Sb(28,"div",10),i.Sb(29,"label",18),i.Wb(30,19),i.Rb(),i.Sb(31,"div",13),i.Sb(32,"div",20),i.Nb(33,"input",21),i.Sb(34,"label",22),i.Wb(35,23),i.Rb(),i.Rb(),i.Sb(36,"div",20),i.Nb(37,"input",24),i.Sb(38,"label",25),i.Wb(39,26),i.Rb(),i.Rb(),i.Mc(40,pp,2,0,"span",17),i.Rb(),i.Rb(),i.Mc(41,mp,14,0,"div",8),i.Mc(42,_p,15,2,"div",8),i.Sb(43,"div",10),i.Sb(44,"label",27),i.Wb(45,28),i.Rb(),i.Sb(46,"div",13),i.Sb(47,"select",29),i.gc("change",(function(){return i.Dc(e),i.ic().accessTypeChangeHandler()})),i.Mc(48,yp,2,0,"option",15),i.Mc(49,vp,2,0,"option",15),i.Mc(50,wp,2,0,"option",15),i.Mc(51,Sp,2,2,"option",16),i.Rb(),i.Mc(52,Mp,2,1,"span",30),i.Mc(53,kp,3,0,"span",31),i.Mc(54,xp,2,0,"span",17),i.Rb(),i.Rb(),i.Sb(55,"div",10),i.Sb(56,"label",32),i.Wb(57,33),i.Rb(),i.Sb(58,"div",13),i.Sb(59,"select",34),i.Mc(60,Dp,2,0,"option",15),i.Mc(61,Tp,2,0,"option",15),i.Mc(62,Cp,2,0,"option",15),i.Mc(63,Op,2,2,"option",16),i.Rb(),i.Mc(64,Lp,2,0,"span",17),i.Rb(),i.Rb(),i.Sb(65,"div",10),i.Sb(66,"label",35),i.Wb(67,36),i.Rb(),i.Sb(68,"div",13),i.Sb(69,"div",20),i.Nb(70,"input",37),i.Sb(71,"label",38),i.Wb(72,39),i.Rb(),i.Rb(),i.Sb(73,"div",20),i.Nb(74,"input",40),i.Sb(75,"label",41),i.Wb(76,42),i.Rb(),i.Rb(),i.Mc(77,Rp,2,0,"span",17),i.Nb(78,"hr"),i.Rb(),i.Rb(),i.Nb(79,"cd-nfs-form-client",43,44),i.Rb(),i.Sb(81,"div",45),i.Sb(82,"cd-form-button-panel",46),i.gc("submitActionEvent",(function(){return i.Dc(e),i.ic().submitAction()})),i.jc(83,"titlecase"),i.jc(84,"upperFirst"),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.Ac(2),t=i.ic();i.yb(1),i.pc("formGroup",t.nfsForm),i.yb(6),i.ac(i.kc(6,36,t.action))(i.kc(7,38,t.resource)),i.Xb(5),i.yb(2),i.pc("ngIf",!t.isDefaultCluster),i.yb(1),i.pc("ngIf",t.clusterType),i.yb(7),i.pc("ngIf",null===t.allFsals),i.yb(1),i.pc("ngIf",null!==t.allFsals&&0===t.allFsals.length),i.yb(1),i.pc("ngIf",null!==t.allFsals&&t.allFsals.length>0),i.yb(1),i.pc("ngForOf",t.allFsals),i.yb(1),i.pc("ngIf",t.nfsForm.showError("name",e,"required")),i.yb(1),i.pc("ngIf","RGW"===t.nfsForm.getValue("name")),i.yb(1),i.pc("ngIf","CEPH"===t.nfsForm.getValue("name")),i.yb(1),i.pc("ngIf","CEPH"===t.nfsForm.getValue("name")),i.yb(1),i.pc("ngIf","CEPH"===t.nfsForm.getValue("name")),i.yb(1),i.pc("ngIf","CEPH"===t.nfsForm.getValue("name")),i.yb(1),i.pc("ngIf","RGW"===t.nfsForm.getValue("name")),i.yb(13),i.pc("ngIf",t.nfsForm.showError("protocolNfsv3",e,"required")||t.nfsForm.showError("protocolNfsv4",e,"required")),i.yb(1),i.pc("ngIf",t.nfsForm.getValue("protocolNfsv3")),i.yb(1),i.pc("ngIf",t.nfsForm.getValue("protocolNfsv4")),i.yb(6),i.pc("ngIf",null===t.nfsAccessType),i.yb(1),i.pc("ngIf",null!==t.nfsAccessType&&0===t.nfsAccessType.length),i.yb(1),i.pc("ngIf",null!==t.nfsAccessType&&t.nfsAccessType.length>0),i.yb(1),i.pc("ngForOf",t.nfsAccessType),i.yb(1),i.pc("ngIf",t.nfsForm.getValue("access_type")),i.yb(1),i.pc("ngIf","RW"===t.nfsForm.getValue("access_type")&&"RGW"===t.nfsForm.getValue("name")),i.yb(1),i.pc("ngIf",t.nfsForm.showError("access_type",e,"required")),i.yb(6),i.pc("ngIf",null===t.nfsSquash),i.yb(1),i.pc("ngIf",null!==t.nfsSquash&&0===t.nfsSquash.length),i.yb(1),i.pc("ngIf",null!==t.nfsSquash&&t.nfsSquash.length>0),i.yb(1),i.pc("ngForOf",t.nfsSquash),i.yb(1),i.pc("ngIf",t.nfsForm.showError("squash",e,"required")),i.yb(13),i.pc("ngIf",t.nfsForm.showError("transportUDP",e,"required")||t.nfsForm.showError("transportTCP",e,"required")),i.yb(2),i.pc("form",t.nfsForm)("clients",t.clients),i.yb(3),i.pc("form",t.nfsForm)("submitText",i.kc(83,40,t.action)+" "+i.kc(84,42,t.resource))}}let Ap=(()=>{class e extends qn.a{constructor(e,t,n,i,r,s,o,a,c){super(),this.authStorageService=e,this.nfsService=t,this.route=n,this.router=i,this.rgwUserService=r,this.formBuilder=s,this.taskWrapper=o,this.cdRef=a,this.actionLabels=c,this.clients=[],this.isEdit=!1,this.cluster_id=null,this.clusterType=null,this.export_id=null,this.isNewDirectory=!1,this.isNewBucket=!1,this.isDefaultCluster=!1,this.allClusters=null,this.allDaemons={},this.icons=_n.a,this.allFsals=[],this.allRgwUsers=[],this.allCephxClients=null,this.allFsNames=null,this.defaultAccessType={RGW:"RO"},this.nfsAccessType=this.nfsService.nfsAccessType,this.nfsSquash=this.nfsService.nfsSquash,this.daemonsSelections=[],this.daemonsMessages=new lr.a({noOptions:"There are no daemons available."}),this.pathDataSource=e=>e.pipe(Bl(200),Object(Jl.a)(),Object(Ki.a)(e=>this.getPathTypeahead(e)),Object(Vi.a)(e=>e.paths)),this.bucketDataSource=e=>e.pipe(Bl(200),Object(Jl.a)(),Object(Ki.a)(e=>this.getBucketTypeahead(e))),this.permission=this.authStorageService.getPermissions().pool,this.resource="NFS export",this.createForm()}ngOnInit(){const e=[this.nfsService.daemon(),this.nfsService.fsals(),this.nfsService.clients(),this.nfsService.filesystems()];this.router.url.startsWith("/nfs/edit")&&(this.isEdit=!0),this.isEdit?(this.action=this.actionLabels.EDIT,this.route.params.subscribe(t=>{this.cluster_id=decodeURIComponent(t.cluster_id),this.export_id=decodeURIComponent(t.export_id),e.push(this.nfsService.get(this.cluster_id,this.export_id)),this.getData(e)}),this.nfsForm.get("cluster_id").disable()):(this.action=this.actionLabels.CREATE,this.getData(e))}getData(e){Object(vo.a)(e).subscribe(e=>{this.resolveDaemons(e[0]),this.resolveFsals(e[1]),this.resolveClients(e[2]),this.resolveFilesystems(e[3]),e[4]&&this.resolveModel(e[4]),this.loadingReady()})}createForm(){this.nfsForm=new Jn.a({cluster_id:new kn.h("",{validators:[kn.A.required]}),daemons:new kn.h([]),fsal:new Jn.a({name:new kn.h("",{validators:[kn.A.required]}),user_id:new kn.h("",{validators:[Cn.a.requiredIf({name:"CEPH"})]}),fs_name:new kn.h("",{validators:[Cn.a.requiredIf({name:"CEPH"})]}),rgw_user_id:new kn.h("",{validators:[Cn.a.requiredIf({name:"RGW"})]})}),path:new kn.h(""),protocolNfsv3:new kn.h(!0,{validators:[Cn.a.requiredIf({protocolNfsv4:!1},e=>!e)]}),protocolNfsv4:new kn.h(!0,{validators:[Cn.a.requiredIf({protocolNfsv3:!1},e=>!e)]}),tag:new kn.h(""),pseudo:new kn.h("",{validators:[Cn.a.requiredIf({protocolNfsv4:!0}),kn.A.pattern("^/[^><|&()]*$")]}),access_type:new kn.h("RW",{validators:[kn.A.required]}),squash:new kn.h("",{validators:[kn.A.required]}),transportUDP:new kn.h(!0,{validators:[Cn.a.requiredIf({transportTCP:!1},e=>!e)]}),transportTCP:new kn.h(!0,{validators:[Cn.a.requiredIf({transportUDP:!1},e=>!e)]}),clients:this.formBuilder.array([]),security_label:new kn.h(!1),sec_label_xattr:new kn.h("security.selinux",Cn.a.requiredIf({security_label:!0,"fsal.name":"CEPH"}))})}resolveModel(e){"CEPH"===e.fsal.name&&(e.sec_label_xattr=e.fsal.sec_label_xattr),this.clusterType===of.user&&(this.daemonsSelections=jt.a.map(this.allDaemons[e.cluster_id],t=>new Ru.a(-1!==e.daemons.indexOf(t),t,"")),this.daemonsSelections=[...this.daemonsSelections]),e.protocolNfsv3=-1!==e.protocols.indexOf(3),e.protocolNfsv4=-1!==e.protocols.indexOf(4),delete e.protocols,e.transportTCP=-1!==e.transports.indexOf("TCP"),e.transportUDP=-1!==e.transports.indexOf("UDP"),delete e.transports,e.clients.forEach(e=>{let t="";e.addresses.forEach(e=>{t+=e+", "}),t.length>=2&&(t=t.substring(0,t.length-2)),e.addresses=t}),this.nfsForm.patchValue(e),this.setPathValidation(),this.clients=e.clients}resolveDaemons(e){var t;e=jt.a.sortBy(e,["daemon_id"]);const n=jt.a.groupBy(e,"cluster_id");this.allClusters=[],jt.a.forIn(n,(e,t)=>{this.allClusters.push({cluster_id:t,cluster_type:e[0].cluster_type}),this.allDaemons[t]=[]}),jt.a.forEach(e,e=>{this.allDaemons[e.cluster_id].push(e.daemon_id)}),this.isEdit&&(this.clusterType=null===(t=jt.a.find(this.allClusters,{cluster_id:this.cluster_id}))||void 0===t?void 0:t.cluster_type);const i=jt.a.isArray(this.allClusters)&&1===this.allClusters.length;this.isDefaultCluster=i&&"_default_"===this.allClusters[0].cluster_id,i&&(this.nfsForm.patchValue({cluster_id:this.allClusters[0].cluster_id}),this.onClusterChange())}resolveFsals(e){e.forEach(e=>{const t=this.nfsService.nfsFsal.find(t=>e===t.value);jt.a.isObjectLike(t)&&(this.allFsals.push(t),"RGW"===t.value&&this.rgwUserService.list().subscribe(e=>{e.forEach(e=>{0===e.suspended&&e.keys.length>0&&this.allRgwUsers.push(e.user_id)})}))}),1===this.allFsals.length&&jt.a.isUndefined(this.nfsForm.getValue("fsal"))&&this.nfsForm.patchValue({fsal:this.allFsals[0]})}resolveClients(e){this.allCephxClients=e}resolveFilesystems(e){this.allFsNames=e,1===e.length&&this.nfsForm.patchValue({fsal:{fs_name:e[0].name}})}fsalChangeHandler(){this.nfsForm.patchValue({tag:this._generateTag(),pseudo:this._generatePseudo(),access_type:this._updateAccessType()}),this.setPathValidation(),this.cdRef.detectChanges()}accessTypeChangeHandler(){const e=this.nfsForm.getValue("name"),t=this.nfsForm.getValue("access_type");this.defaultAccessType[e]=t}setPathValidation(){"RGW"===this.nfsForm.getValue("name")?this.nfsForm.get("path").setValidators([kn.A.required,kn.A.pattern("^(/|[^/><|&()#?]+)$")]):this.nfsForm.get("path").setValidators([kn.A.required,kn.A.pattern("^/[^><|&()?]*$")])}rgwUserIdChangeHandler(){this.nfsForm.patchValue({pseudo:this._generatePseudo()})}getAccessTypeHelp(e){const t=this.nfsAccessType.find(t=>{if(e===t.value)return t});return jt.a.isObjectLike(t)?t.help:""}getId(){return jt.a.isString(this.nfsForm.getValue("cluster_id"))&&jt.a.isString(this.nfsForm.getValue("path"))?this.nfsForm.getValue("cluster_id")+":"+this.nfsForm.getValue("path"):""}getPathTypeahead(e){if(!jt.a.isString(e)||"/"===e)return Object(Wi.a)([]);const t=this.nfsForm.getValue("fsal").fs_name;return this.nfsService.lsDir(t,e)}pathChangeHandler(){this.nfsForm.patchValue({pseudo:this._generatePseudo()});const e=this.nfsForm.getValue("path");this.getPathTypeahead(e).subscribe(t=>{this.isNewDirectory="/"!==e&&-1===t.paths.indexOf(e)})}bucketChangeHandler(){this.nfsForm.patchValue({tag:this._generateTag(),pseudo:this._generatePseudo()});const e=this.nfsForm.getValue("path");this.getBucketTypeahead(e).subscribe(t=>{this.isNewBucket=""!==e&&-1===t.indexOf(e)})}getBucketTypeahead(e){const t=this.nfsForm.getValue("rgw_user_id");return jt.a.isString(t)&&jt.a.isString(e)&&"/"!==e&&""!==e?this.nfsService.buckets(t):Object(Wi.a)([])}_generateTag(){let e=this.nfsForm.getValue("tag");return this.nfsForm.get("tag").dirty||(e=void 0,"RGW"===this.nfsForm.getValue("fsal")&&(e=this.nfsForm.getValue("path"))),e}_generatePseudo(){let e=this.nfsForm.getValue("pseudo");return this.nfsForm.get("pseudo")&&!this.nfsForm.get("pseudo").dirty&&(e=void 0,"CEPH"===this.nfsForm.getValue("fsal")?(e="/cephfs",jt.a.isString(this.nfsForm.getValue("path"))&&(e+=this.nfsForm.getValue("path"))):"RGW"===this.nfsForm.getValue("fsal")&&jt.a.isString(this.nfsForm.getValue("rgw_user_id"))&&(e="/"+this.nfsForm.getValue("rgw_user_id"),jt.a.isString(this.nfsForm.getValue("path"))&&(e+="/"+this.nfsForm.getValue("path")))),e}_updateAccessType(){const e=this.nfsForm.getValue("name");let t=this.defaultAccessType[e];return t||(t="RW"),t}onClusterChange(){var e;const t=this.nfsForm.getValue("cluster_id");this.clusterType=null===(e=jt.a.find(this.allClusters,{cluster_id:t}))||void 0===e?void 0:e.cluster_type,this.clusterType===of.user?(this.daemonsSelections=jt.a.map(this.allDaemons[t],e=>new Ru.a(!1,e,"")),this.daemonsSelections=[...this.daemonsSelections]):this.daemonsSelections=[],this.nfsForm.patchValue({daemons:[]})}removeDaemon(e,t){this.daemonsSelections.forEach(e=>{e.name===t&&(e.selected=!1)});const n=this.nfsForm.get("daemons");return n.value.splice(e,1),n.setValue(n.value),!1}onDaemonSelection(){this.nfsForm.get("daemons").setValue(this.nfsForm.getValue("daemons"))}onToggleAllDaemonsSelection(){const e=this.nfsForm.getValue("cluster_id"),t=0===this.nfsForm.getValue("daemons").length?this.allDaemons[e]:[];this.nfsForm.patchValue({daemons:t})}submitAction(){let e;const t=this._buildRequest();e=this.taskWrapper.wrapTaskAroundCall(this.isEdit?{task:new er.a("nfs/edit",{cluster_id:this.cluster_id,export_id:this.export_id}),call:this.nfsService.update(this.cluster_id,this.export_id,t)}:{task:new er.a("nfs/create",{path:t.path,fsal:t.fsal,cluster_id:t.cluster_id}),call:this.nfsService.create(t)}),e.subscribe({error:()=>this.nfsForm.setErrors({cdSubmitButton:!0}),complete:()=>this.router.navigate(["/nfs"])})}_buildRequest(){const e=jt.a.cloneDeep(this.nfsForm.value);return(jt.a.isUndefined(e.tag)||""===e.tag)&&(e.tag=null),this.isEdit&&(e.export_id=this.export_id),"CEPH"===e.fsal.name?delete e.fsal.rgw_user_id:(delete e.fsal.fs_name,delete e.fsal.user_id),e.protocols=[],e.protocolNfsv3?e.protocols.push(3):e.tag=null,delete e.protocolNfsv3,e.protocolNfsv4?e.protocols.push(4):e.pseudo=null,delete e.protocolNfsv4,e.transports=[],e.transportTCP&&e.transports.push("TCP"),delete e.transportTCP,e.transportUDP&&e.transports.push("UDP"),delete e.transportUDP,e.clients.forEach(t=>{t.addresses=jt.a.isString(t.addresses)?jt()(t.addresses).split(/[ ,]+/).uniq().filter(e=>""!==e).value():[],t.squash||(t.squash=e.squash),t.access_type||(t.access_type=e.access_type)}),e.fsal.sec_label_xattr=!1===e.security_label||"RGW"===e.fsal.name?null:e.sec_label_xattr,delete e.sec_label_xattr,e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Jt.a),i.Mb(rf),i.Mb(Pt.a),i.Mb(Pt.e),i.Mb(sf.a),i.Mb(So.a),i.Mb(tr.a),i.Mb(i.h),i.Mb(gn.b))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-nfs-form"]],viewQuery:function(e,t){var n;1&e&&i.Jc(_f,!0),2&e&&i.zc(n=i.hc())&&(t.nfsClients=n.first)},features:[i.vb],decls:1,vars:1,consts:function(){var e,t,n,r,s,o,a,c,l,u,d,h,f,p,m,b,g,_,y,v,w,S,M,k,x,D,T,C,O,L,R,E,A,I,P,N,j,F,Y,z,$,H,W,V,B,U,G,q,J,Q,K,Z,X,ee,te,ne;return e="" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",t="Storage Backend",n="NFS Protocol",r="NFSv3",s="NFSv4",o="Access Type",a="Squash",c="Transport Protocol",l="UDP",u="TCP",d="Cluster",h="Loading...",f="-- No cluster available --",p="-- Select the cluster --",m="This field is required.",b="Daemons",g="Add daemon",_="Add all daemons",y="Remove all daemons",v="Loading...",w="-- No data pools available --",S="-- Select the storage backend --",M="This field is required.",k="Object Gateway User",x="Loading...",D="-- No users available --",T="-- Select the object gateway user --",C="This field is required.",O="CephFS User ID",L="Loading...",R="-- No clients available --",E="-- Select the cephx client --",A="This field is required.",I="CephFS Name",P="Loading...",N="-- No CephFS filesystem available --",j="-- Select the CephFS filesystem --",F="This field is required.",Y="Security Label",z="Enable security label",$="This field is required.",H="CephFS Path",W="This field is required.",V="Path need to start with a '/' and can be followed by a word",B="New directory will be created",U="Path",G="This field is required.",q="Path can only be a single '/' or a word",J="New bucket will be created",Q="This field is required.",K="NFS Tag",Z="Alternative access for " + "\ufffd#7\ufffd" + "NFS v3" + "\ufffd/#7\ufffd" + " mounts (it must not have a leading /).",X="Clients may not mount subdirectories (i.e. if Tag = foo, the client may not mount foo/baz).",ee="By using different Tag options, the same Path may be exported multiple times.",te="Pseudo",ne="The position that this " + "[\ufffd#7\ufffd|\ufffd#8\ufffd]" + "NFS v4" + "[\ufffd/#7\ufffd|\ufffd/#8\ufffd]" + " export occupies in the " + "[\ufffd#7\ufffd|\ufffd#8\ufffd]" + "Pseudo FS" + "[\ufffd/#7\ufffd|\ufffd/#8\ufffd]" + " (it must be unique).",[["class","cd-col-form",4,"cdFormLoading"],[1,"cd-col-form"],["name","nfsForm","novalidate","",3,"formGroup"],["formDir","ngForm"],[1,"card"],[1,"card-header"],e,[1,"card-body"],["class","form-group row",4,"ngIf"],["formGroupName","fsal"],[1,"form-group","row"],["for","name",1,"cd-col-form-label","required"],t,[1,"cd-col-form-input"],["formControlName","name","name","name","id","name",1,"form-control","custom-select",3,"change"],["value","",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],["class","invalid-feedback",4,"ngIf"],["for","protocols",1,"cd-col-form-label","required"],n,[1,"custom-control","custom-checkbox"],["type","checkbox","id","protocolNfsv3","name","protocolNfsv3","formControlName","protocolNfsv3",1,"custom-control-input"],["for","protocolNfsv3",1,"custom-control-label"],r,["type","checkbox","formControlName","protocolNfsv4","name","protocolNfsv4","id","protocolNfsv4",1,"custom-control-input"],["for","protocolNfsv4",1,"custom-control-label"],s,["for","access_type",1,"cd-col-form-label","required"],o,["formControlName","access_type","name","access_type","id","access_type",1,"form-control","custom-select",3,"change"],["class","form-text text-muted",4,"ngIf"],["class","form-text text-warning",4,"ngIf"],["for","squash",1,"cd-col-form-label","required"],a,["name","squash","formControlName","squash","id","squash",1,"form-control","custom-select"],["for","transports",1,"cd-col-form-label","required"],c,["type","checkbox","formControlName","transportUDP","name","transportUDP","id","transportUDP",1,"custom-control-input"],["for","transportUDP",1,"custom-control-label"],l,["type","checkbox","formControlName","transportTCP","name","transportTCP","id","transportTCP",1,"custom-control-input"],["for","transportTCP",1,"custom-control-label"],u,[3,"form","clients"],["nfsClients",""],[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],["for","cluster_id",1,"cd-col-form-label","required"],d,["formControlName","cluster_id","name","cluster_id","id","cluster_id",1,"form-control","custom-select",3,"change"],["value",""],h,f,p,[3,"value"],[1,"invalid-feedback"],m,["for","daemons",1,"cd-col-form-label"],b,[4,"ngFor","ngForOf"],["class","row",4,"ngIf"],[1,"input-group","cd-mb"],["type","text","disabled","",1,"cd-form-control",3,"value"],["class","input-group-append",4,"ngIf"],[1,"input-group-append"],["type","button",1,"btn","btn-light",3,"click"],["aria-hidden","true",3,"ngClass"],[1,"row"],[1,"col-md-12"],["elemClass","btn btn-light float-right",3,"data","options","messages","selection"],[3,"ngClass"],g,["type","button",1,"btn","btn-light","float-right",3,"click"],[4,"ngIf","ngIfElse"],["hasDaemons",""],_,y,v,w,S,M,["for","rgw_user_id",1,"cd-col-form-label","required"],k,["formControlName","rgw_user_id","name","rgw_user_id","id","rgw_user_id",1,"form-control","custom-select",3,"change"],x,D,T,C,["for","user_id",1,"cd-col-form-label","required"],O,["formControlName","user_id","name","user_id","id","user_id",1,"form-control","custom-select"],L,R,E,A,["for","fs_name",1,"cd-col-form-label","required"],I,["formControlName","fs_name","name","fs_name","id","fs_name",1,"form-control","custom-select",3,"change"],P,N,j,F,["for","security_label",1,"cd-col-form-label",3,"ngClass"],Y,["type","checkbox","formControlName","security_label","name","security_label","id","security_label",1,"custom-control-input"],["for","security_label",1,"custom-control-label"],z,["type","text","class","form-control","name","sec_label_xattr","id","sec_label_xattr","formControlName","sec_label_xattr",4,"ngIf"],["type","text","name","sec_label_xattr","id","sec_label_xattr","formControlName","sec_label_xattr",1,"form-control"],$,["for","path",1,"cd-col-form-label","required"],H,["type","text","name","path","id","path","formControlName","path",1,"form-control",3,"ngbTypeahead","selectItem","blur"],W,V,[1,"form-text","text-muted"],B,U,G,q,J,Q,["for","tag",1,"cd-col-form-label"],K,Z,X,ee,["type","text","name","tag","id","tag","formControlName","tag",1,"form-control"],["for","pseudo",1,"cd-col-form-label"],[1,"required"],te,ne=i.bc(ne),"By using different Pseudo options, the same Path may be exported multiple times.",["type","text","name","pseudo","id","pseudo","formControlName","pseudo",1,"form-control"],"This field is required.","Pseudo needs to start with a '/' and can't contain any of the following: >, <, |, &, ( or ).","Loading...","-- No access type available --","-- Select the access type --",[1,"form-text","text-warning"],"The Object Gateway NFS backend has a number of limitations which will seriously affect applications writing to the share. Please consult the " + "\ufffd#2\ufffd" + "" + "\ufffd/#2\ufffd" + " for details before enabling write access.",["section","rgw-nfs"],"This field is required.","Loading...","-- No squash available --","--Select what kind of user id squashing is performed --","This field is required.","This field is required."]},template:function(e,t){1&e&&i.Mc(0,Ep,85,44,"div",0),2&e&&i.pc("cdFormLoading",t.loading)},directives:[Kn.a,kn.C,kn.r,kn.k,Zn.a,wt.r,kn.l,Xn.a,On.a,kn.z,ei.a,kn.q,kn.i,wt.q,kn.b,bf,ti.a,kn.u,kn.B,wt.p,gf.a,kn.d,Qt.G,Mo.a,Cr.a],pipes:[wt.A,ir.a],styles:[".cd-mb[_ngcontent-%COMP%]{margin-bottom:10px}"]}),e})();var Ip=n("VTlA");function Pp(e,t){if(1&e&&i.Nb(0,"cd-table-key-value",10),2&e){const e=i.ic(2);i.pc("data",e.data)}}function Np(e,t){if(1&e&&i.Nb(0,"cd-table",11,12),2&e){const e=i.ic(2);i.pc("data",e.clients)("columns",e.clientsColumns)}}function jp(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"ul",1,2),i.Sb(3,"li",3),i.Sb(4,"a",4),i.Wb(5,5),i.Rb(),i.Mc(6,Pp,1,1,"ng-template",6),i.Rb(),i.Sb(7,"li",7),i.Sb(8,"a",4),i.Wb(9,8),i.Rb(),i.Mc(10,Np,2,2,"ng-template",6),i.Rb(),i.Rb(),i.Nb(11,"div",9),i.Pb()),2&e){const e=i.Ac(2),t=i.ic();i.yb(9),i.ac(t.clients.length),i.Xb(9),i.yb(2),i.pc("ngbNavOutlet",e)}}let Fp=(()=>{class e{constructor(){this.clients=[],this.clientsColumns=[{name:"Addresses",prop:"addresses",flexGrow:2},{name:"Access Type",prop:"access_type",flexGrow:1},{name:"Squash",prop:"squash",flexGrow:1}]}ngOnChanges(){this.selection&&(this.selectedItem=this.selection,this.clients=this.selectedItem.clients,this.data={},this.data["Cluster"]=this.selectedItem.cluster_id,this.data["Daemons"]=this.selectedItem.daemons,this.data["NFS Protocol"]=this.selectedItem.protocols.map(e=>"NFSv"+e),this.data["Pseudo"]=this.selectedItem.pseudo,this.data["Access Type"]=this.selectedItem.access_type,this.data["Squash"]=this.selectedItem.squash,this.data["Transport"]=this.selectedItem.transports,this.data["Path"]=this.selectedItem.path,"CEPH"===this.selectedItem.fsal.name?(this.data["Storage Backend"]="CephFS",this.data["CephFS User"]=this.selectedItem.fsal.user_id,this.data["CephFS Filesystem"]=this.selectedItem.fsal.fs_name,this.data["Security Label"]=this.selectedItem.fsal.sec_label_xattr):(this.data["Storage Backend"]="Object Gateway",this.data["Object Gateway User"]=this.selectedItem.fsal.rgw_user_id))}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-nfs-details"]],inputs:{selection:"selection"},features:[i.wb],decls:1,vars:1,consts:function(){return[[4,"ngIf"],["ngbNav","","cdStatefulTab","nfs-details",1,"nav-tabs"],["nav","ngbNav"],["ngbNavItem","details"],["ngbNavLink",""],"Details",["ngbNavContent",""],["ngbNavItem","clients"],"Clients (" + "\ufffd0\ufffd" + ")",[3,"ngbNavOutlet"],[3,"data"],["columnMode","flex","identifier","addresses","forceIdentifier","true","selectionType","",3,"data","columns"],["table",""]]},template:function(e,t){1&e&&i.Mc(0,jp,12,2,"ng-container",0),2&e&&i.pc("ngIf",t.selection)},directives:[wt.r,Qt.p,Kt.a,Qt.r,Qt.s,Qt.q,Qt.u,en.a,Bt.a],styles:[""]}),e})();const Yp=["nfsState"],zp=["nfsFsal"],$p=["table"];function Hp(e,t){1&e&&(i.Qb(0),i.Wb(1,7),i.Pb())}function Wp(e,t){1&e&&(i.Qb(0),i.Wb(1,8),i.Pb())}function Vp(e,t){if(1&e&&(i.Mc(0,Hp,2,0,"ng-container",6),i.Mc(1,Wp,2,0,"ng-container",6)),2&e){const e=t.value;i.pc("ngIf","CEPH"===e.name),i.yb(1),i.pc("ngIf","RGW"===e.name)}}let Bp=(()=>{class e extends $t.a{constructor(e,t,n,i,r,s){super(),this.authStorageService=e,this.modalService=t,this.nfsService=n,this.taskListService=i,this.taskWrapper=r,this.actionLabels=s,this.selection=new Wt.a,this.isDefaultCluster=!1,this.builders={"nfs/create":e=>({path:e.path,cluster_id:e.cluster_id,fsal:e.fsal})},this.permission=this.authStorageService.getPermissions().nfs;const o=()=>this.selection.first()&&`${encodeURI(this.selection.first().cluster_id)}/${encodeURI(this.selection.first().export_id)}`;this.tableActions=[{permission:"create",icon:_n.a.add,routerLink:()=>"/nfs/create",canBePrimary:e=>!e.hasSingleSelection,name:this.actionLabels.CREATE},{permission:"update",icon:_n.a.edit,routerLink:()=>"/nfs/edit/"+o(),name:this.actionLabels.EDIT},{permission:"delete",icon:_n.a.destroy,click:()=>this.deleteNfsModal(),name:this.actionLabels.DELETE}]}ngOnInit(){this.columns=[{name:"Path",prop:"path",flexGrow:2,cellTransformation:Ht.a.executing},{name:"Pseudo",prop:"pseudo",flexGrow:2},{name:"Cluster",prop:"cluster_id",flexGrow:2},{name:"Daemons",prop:"daemons",flexGrow:2},{name:"Storage Backend",prop:"fsal",flexGrow:2,cellTemplate:this.nfsFsal},{name:"Access Type",prop:"access_type",flexGrow:2}],this.nfsService.daemon().subscribe(e=>{const t=jt()(e).map(e=>e.cluster_id).uniq().value();this.isDefaultCluster=1===t.length&&"_default_"===t[0],this.columns[2].isHidden=this.isDefaultCluster,this.table&&this.table.updateColumns(),this.taskListService.init(()=>this.nfsService.list(),e=>this.prepareResponse(e),e=>this.exports=e,()=>this.onFetchError(),this.taskFilter,this.itemFilter,this.builders)},()=>{this.onFetchError()})}ngOnDestroy(){this.summaryDataSubscription&&this.summaryDataSubscription.unsubscribe()}prepareResponse(e){let t=[];return e.forEach(e=>{e.id=`${e.cluster_id}:${e.export_id}`,e.state="LOADING",t=t.concat(e)}),t}onFetchError(){this.table.reset(),this.viewCacheStatus={status:qt.a.ValueException}}itemFilter(e,t){return e.cluster_id===t.metadata.cluster_id&&e.export_id===t.metadata.export_id}taskFilter(e){return["nfs/create","nfs/delete","nfs/edit"].includes(e.name)}updateSelection(e){this.selection=e}deleteNfsModal(){const e=this.selection.first().cluster_id,t=this.selection.first().export_id;this.modalRef=this.modalService.show(bn.a,{itemDescription:"NFS export",itemNames:[`${e}:${t}`],submitActionObservable:()=>this.taskWrapper.wrapTaskAroundCall({task:new er.a("nfs/delete",{cluster_id:e,export_id:t}),call:this.nfsService.delete(e,t)})})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Jt.a),i.Mb(vn.a),i.Mb(rf),i.Mb(Ip.a),i.Mb(tr.a),i.Mb(gn.b))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-nfs-list"]],viewQuery:function(e,t){var n;1&e&&(i.Tc(Yp,!0),i.Jc(zp,!0),i.Jc($p,!0)),2&e&&(i.zc(n=i.hc())&&(t.nfsState=n.first),i.zc(n=i.hc())&&(t.nfsFsal=n.first),i.zc(n=i.hc())&&(t.table=n.first))},features:[i.xb([Ip.a]),i.vb],decls:7,vars:7,consts:function(){return[["columnMode","flex","identifier","id","forceIdentifier","true","selectionType","single",3,"data","columns","hasDetails","setExpandedRow","updateSelection"],["table",""],[1,"table-actions","btn-toolbar"],[1,"btn-group",3,"permission","selection","tableActions"],["cdTableDetail","",3,"selection"],["nfsFsal",""],[4,"ngIf"],"CephFS","Object Gateway"]},template:function(e,t){1&e&&(i.Sb(0,"cd-table",0,1),i.gc("setExpandedRow",(function(e){return t.setExpandedRow(e)}))("updateSelection",(function(e){return t.updateSelection(e)})),i.Sb(2,"div",2),i.Nb(3,"cd-table-actions",3),i.Rb(),i.Nb(4,"cd-nfs-details",4),i.Rb(),i.Mc(5,Vp,2,2,"ng-template",null,5,i.Nc)),2&e&&(i.pc("data",t.exports)("columns",t.columns)("hasDetails",!0),i.yb(3),i.pc("permission",t.permission)("selection",t.selection)("tableActions",t.tableActions),i.yb(1),i.pc("selection",t.expandedRow))},directives:[Bt.a,Sn.a,Fp,wt.r],styles:[""]}),e})(),Up=(()=>{class e{constructor(t){this.route=t,this.route.queryParams.subscribe(t=>{this.fromLink=t.fromLink||e.defaultFromLink}),this.route.params.subscribe(e=>{this.serviceId=decodeURIComponent(e.id),this.serviceType=e.type})}}return e.defaultFromLink="/hosts",e.\u0275fac=function(t){return new(t||e)(i.Mb(Pt.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-performance-counter"]],decls:3,vars:4,consts:[[3,"serviceType","serviceId"]],template:function(e,t){1&e&&(i.Sb(0,"legend"),i.Oc(1),i.Rb(),i.Nb(2,"cd-table-performance-counter",0)),2&e&&(i.yb(1),i.Rc("",t.serviceType,".",t.serviceId,""),i.yb(1),i.pc("serviceType",t.serviceType)("serviceId",t.serviceId))},directives:[zc.a],styles:[""]}),e})();var Gp=n("DSvg"),qp=n("Mxhz"),Jp=n("1nQr");function Qp(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,31),i.Rb())}function Kp(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,32),i.Rb())}function Zp(e,t){if(1&e&&i.Nb(0,"cd-helper",33),2&e){const e=i.ic();i.qc("html",e.passwordPolicyHelpText)}}function Xp(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,34),i.Rb())}function em(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,35),i.Rb())}function tm(e,t){if(1&e&&(i.Sb(0,"span",30),i.Oc(1),i.Rb()),2&e){const e=i.ic();i.yb(1),i.Qc(" ",e.passwordValuation," ")}}function nm(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,36),i.Rb())}function im(e,t){1&e&&(i.Sb(0,"span",30),i.Wb(1,37),i.Rb())}let rm=(()=>{class e{constructor(e,t,n,i,r,s,o){this.actionLabels=e,this.notificationService=t,this.userService=n,this.authStorageService=i,this.formBuilder=r,this.router=s,this.passwordPolicyService=o,this.passwordPolicyHelpText="",this.icons=_n.a,this.action=this.actionLabels.CHANGE,this.resource="password",this.createForm()}createForm(){this.passwordPolicyService.getHelpText().subscribe(e=>{this.passwordPolicyHelpText=e}),this.userForm=this.formBuilder.group({oldpassword:[null,[kn.A.required,Cn.a.custom("notmatch",()=>this.userForm&&this.userForm.getValue("newpassword")===this.userForm.getValue("oldpassword"))]],newpassword:[null,[kn.A.required,Cn.a.custom("notmatch",()=>this.userForm&&this.userForm.getValue("oldpassword")===this.userForm.getValue("newpassword"))],[Cn.a.passwordPolicy(this.userService,()=>this.authStorageService.getUsername(),(e,t,n)=>{this.passwordStrengthLevelClass=this.passwordPolicyService.mapCreditsToCssClass(t),this.passwordValuation=jt.a.defaultTo(n,"")})]],confirmnewpassword:[null,[kn.A.required]]},{validators:[Cn.a.match("newpassword","confirmnewpassword")]})}onSubmit(){if(this.userForm.pristine)return;const e=this.authStorageService.getUsername(),t=this.userForm.getValue("oldpassword"),n=this.userForm.getValue("newpassword");this.userService.changePassword(e,t,n).subscribe(()=>this.onPasswordChange(),()=>{this.userForm.setErrors({cdSubmitButton:!0})})}onPasswordChange(){this.notificationService.show(yn.a.success,"Updated user password\""),this.router.navigate(["/login"])}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(gn.b),i.Mb(wn.a),i.Mb(qp.a),i.Mb(Jt.a),i.Mb(So.a),i.Mb(Pt.e),i.Mb(Jp.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-user-password-form"]],decls:48,vars:25,consts:function(){return[[1,"cd-col-form"],["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"card"],[1,"card-header"],"" + "\ufffd0\ufffd" + " " + "\ufffd1\ufffd" + "",[1,"card-body"],[1,"form-group","row"],["for","oldpassword",1,"cd-col-form-label","required"],"Old password",[1,"cd-col-form-input"],[1,"input-group"],["type","password","placeholder","Old password...","id","oldpassword","formControlName","oldpassword","autocomplete","new-password","autofocus","",1,"form-control"],[1,"input-group-append"],["cdPasswordButton","oldpassword",1,"btn","btn-light"],["class","invalid-feedback",4,"ngIf"],["for","newpassword",1,"cd-col-form-label"],[1,"required"],"New password",["class","text-pre-wrap",3,"html",4,"ngIf"],["type","password","placeholder","Password...","id","newpassword","autocomplete","new-password","formControlName","newpassword",1,"form-control"],["type","button","cdPasswordButton","newpassword",1,"btn","btn-light"],[1,"password-strength-level"],["data-toggle","tooltip",3,"title"],["for","confirmnewpassword",1,"cd-col-form-label","required"],"Confirm new password",["type","password","autocomplete","new-password","placeholder","Confirm new password...","id","confirmnewpassword","formControlName","confirmnewpassword",1,"form-control"],["cdPasswordButton","confirmnewpassword",1,"btn","btn-light"],[1,"card-footer"],["wrappingClass","text-right",3,"form","submitText","submitActionEvent"],[1,"invalid-feedback"],"This field is required.","The old and new passwords must be different.",[1,"text-pre-wrap",3,"html"],"This field is required.","The old and new passwords must be different.","This field is required.","Password confirmation doesn't match the new password."]},template:function(e,t){if(1&e&&(i.Sb(0,"div",0),i.Sb(1,"form",1,2),i.Sb(3,"div",3),i.Sb(4,"div",4),i.Wb(5,5),i.jc(6,"titlecase"),i.jc(7,"upperFirst"),i.Rb(),i.Sb(8,"div",6),i.Sb(9,"div",7),i.Sb(10,"label",8),i.Wb(11,9),i.Rb(),i.Sb(12,"div",10),i.Sb(13,"div",11),i.Nb(14,"input",12),i.Sb(15,"span",13),i.Nb(16,"button",14),i.Rb(),i.Rb(),i.Mc(17,Qp,2,0,"span",15),i.Mc(18,Kp,2,0,"span",15),i.Rb(),i.Rb(),i.Sb(19,"div",7),i.Sb(20,"label",16),i.Sb(21,"span",17),i.Wb(22,18),i.Rb(),i.Mc(23,Zp,1,1,"cd-helper",19),i.Rb(),i.Sb(24,"div",10),i.Sb(25,"div",11),i.Nb(26,"input",20),i.Sb(27,"span",13),i.Nb(28,"button",21),i.Rb(),i.Rb(),i.Sb(29,"div",22),i.Nb(30,"div",23),i.Rb(),i.Mc(31,Xp,2,0,"span",15),i.Mc(32,em,2,0,"span",15),i.Mc(33,tm,2,1,"span",15),i.Rb(),i.Rb(),i.Sb(34,"div",7),i.Sb(35,"label",24),i.Wb(36,25),i.Rb(),i.Sb(37,"div",10),i.Sb(38,"div",11),i.Nb(39,"input",26),i.Sb(40,"span",13),i.Nb(41,"button",27),i.Rb(),i.Rb(),i.Mc(42,nm,2,0,"span",15),i.Mc(43,im,2,0,"span",15),i.Rb(),i.Rb(),i.Rb(),i.Sb(44,"div",28),i.Sb(45,"cd-form-button-panel",29),i.gc("submitActionEvent",(function(){return t.onSubmit()})),i.jc(46,"titlecase"),i.jc(47,"upperFirst"),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb()),2&e){const e=i.Ac(2);i.yb(1),i.pc("formGroup",t.userForm),i.yb(6),i.ac(i.kc(6,17,t.action))(i.kc(7,19,t.resource)),i.Xb(5),i.yb(10),i.pc("ngIf",t.userForm.showError("oldpassword",e,"required")),i.yb(1),i.pc("ngIf",t.userForm.showError("oldpassword",e,"notmatch")),i.yb(5),i.pc("ngIf",t.passwordPolicyHelpText.length>0),i.yb(7),i.Ab(t.passwordStrengthLevelClass),i.qc("title",t.passwordValuation),i.yb(1),i.pc("ngIf",t.userForm.showError("newpassword",e,"required")),i.yb(1),i.pc("ngIf",t.userForm.showError("newpassword",e,"notmatch")),i.yb(1),i.pc("ngIf",t.userForm.showError("newpassword",e,"passwordPolicy")),i.yb(9),i.pc("ngIf",t.userForm.showError("confirmnewpassword",e,"required")),i.yb(1),i.pc("ngIf",t.userForm.showError("confirmnewpassword",e,"match")),i.yb(2),i.pc("form",t.userForm)("submitText",i.kc(46,21,t.action)+" "+i.kc(47,23,t.resource))}},directives:[kn.C,kn.r,kn.k,Zn.a,Xn.a,On.a,kn.d,ei.a,kn.q,kn.i,nr.a,Au.a,wt.r,ti.a,Mo.a],pipes:[wt.A,ir.a],styles:[""]}),e})();function sm(e,t){1&e&&(i.Sb(0,"span",17),i.Wb(1,18),i.Rb())}function om(e,t){1&e&&(i.Sb(0,"span",17),i.Wb(1,19),i.Rb())}function am(e,t){1&e&&(i.Sb(0,"span",17),i.Wb(1,20),i.Rb())}function cm(e,t){1&e&&(i.Sb(0,"span",17),i.Wb(1,21),i.Rb())}function lm(e,t){if(1&e&&(i.Sb(0,"span",17),i.Oc(1),i.Rb()),2&e){const e=i.ic();i.yb(1),i.Qc(" ",e.passwordValuation," ")}}function um(e,t){1&e&&(i.Sb(0,"span",17),i.Wb(1,22),i.Rb())}function dm(e,t){1&e&&(i.Sb(0,"span",17),i.Wb(1,23),i.Rb())}let hm=(()=>{class e extends rm{constructor(e,t,n,i,r,s,o,a){super(e,t,n,i,r,s,o),this.actionLabels=e,this.notificationService=t,this.userService=n,this.authStorageService=i,this.formBuilder=r,this.router=s,this.passwordPolicyService=o,this.authService=a}onPasswordChange(){this.authService.logout()}onCancel(){this.authService.logout()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(gn.b),i.Mb(wn.a),i.Mb(qp.a),i.Mb(Jt.a),i.Mb(So.a),i.Mb(Pt.e),i.Mb(Jp.a),i.Mb(Gp.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-login-password-form"]],features:[i.vb],decls:34,vars:19,consts:function(){return["Please set a new password.","You will be redirected to the login page afterwards.",["novalidate","",3,"formGroup"],["frm","ngForm"],[1,"form-group","has-feedback"],[1,"input-group"],["type","password","placeholder","Old password...","id","oldpassword","formControlName","oldpassword","autocomplete","new-password","autofocus","",1,"form-control"],[1,"input-group-append"],["cdPasswordButton","oldpassword",1,"btn","btn-outline-light","btn-password"],["class","invalid-feedback",4,"ngIf"],["type","password","placeholder","New password...","id","newpassword","autocomplete","new-password","formControlName","newpassword",1,"form-control"],["type","button","cdPasswordButton","newpassword",1,"btn","btn-outline-light","btn-password"],[1,"password-strength-level"],["data-toggle","tooltip",3,"title"],["type","password","autocomplete","new-password","placeholder","Confirm new password...","id","confirmnewpassword","formControlName","confirmnewpassword",1,"form-control"],["cdPasswordButton","confirmnewpassword",1,"btn","btn-outline-light","btn-password"],["wrappingClass","text-right",3,"form","disabled","submitText","submitActionEvent","backActionEvent"],[1,"invalid-feedback"],"This field is required.","The old and new passwords must be different.","This field is required.","The old and new passwords must be different.","This field is required.","Password confirmation doesn't match the new password."]},template:function(e,t){if(1&e&&(i.Sb(0,"div"),i.Sb(1,"h2"),i.Wb(2,0),i.Rb(),i.Sb(3,"h4"),i.Wb(4,1),i.Rb(),i.Sb(5,"form",2,3),i.Sb(7,"div",4),i.Sb(8,"div",5),i.Nb(9,"input",6),i.Sb(10,"span",7),i.Nb(11,"button",8),i.Rb(),i.Rb(),i.Mc(12,sm,2,0,"span",9),i.Mc(13,om,2,0,"span",9),i.Rb(),i.Sb(14,"div",4),i.Sb(15,"div",5),i.Nb(16,"input",10),i.Sb(17,"span",7),i.Nb(18,"button",11),i.Rb(),i.Rb(),i.Sb(19,"div",12),i.Nb(20,"div",13),i.Rb(),i.Mc(21,am,2,0,"span",9),i.Mc(22,cm,2,0,"span",9),i.Mc(23,lm,2,1,"span",9),i.Rb(),i.Sb(24,"div",4),i.Sb(25,"div",5),i.Nb(26,"input",14),i.Sb(27,"span",7),i.Nb(28,"button",15),i.Rb(),i.Rb(),i.Mc(29,um,2,0,"span",9),i.Mc(30,dm,2,0,"span",9),i.Rb(),i.Sb(31,"cd-form-button-panel",16),i.gc("submitActionEvent",(function(){return t.onSubmit()}))("backActionEvent",(function(){return t.onCancel()})),i.jc(32,"titlecase"),i.jc(33,"upperFirst"),i.Rb(),i.Rb(),i.Rb()),2&e){const e=i.Ac(6);i.yb(5),i.pc("formGroup",t.userForm),i.yb(7),i.pc("ngIf",t.userForm.showError("oldpassword",e,"required")),i.yb(1),i.pc("ngIf",t.userForm.showError("oldpassword",e,"notmatch")),i.yb(7),i.Ab(t.passwordStrengthLevelClass),i.qc("title",t.passwordValuation),i.yb(1),i.pc("ngIf",t.userForm.showError("newpassword",e,"required")),i.yb(1),i.pc("ngIf",t.userForm.showError("newpassword",e,"notmatch")),i.yb(1),i.pc("ngIf",t.userForm.showError("newpassword",e,"passwordPolicy")),i.yb(6),i.pc("ngIf",t.userForm.showError("confirmnewpassword",e,"required")),i.yb(1),i.pc("ngIf",t.userForm.showError("confirmnewpassword",e,"match")),i.yb(1),i.pc("form",t.userForm)("disabled",t.userForm.invalid)("submitText",i.kc(32,15,t.action)+" "+i.kc(33,17,t.resource))}},directives:[kn.C,kn.r,kn.k,Zn.a,Xn.a,On.a,kn.d,ei.a,kn.q,kn.i,nr.a,Au.a,wt.r,ti.a],pipes:[wt.A,ir.a],styles:["cd-login-password-form h4{margin:0 0 30px} cd-login-password-form .form-group{background-color:#2e373d;border-left:4px solid #fff} cd-login-password-form .form-group:focus-within{border-left:4px solid #ef5c55} cd-login-password-form .btn-password, cd-login-password-form .btn-password:focus, cd-login-password-form .form-control, cd-login-password-form .form-control:focus{background-color:#2e373d;border:0;box-shadow:none;color:#f8f9fa;filter:none;outline:none} cd-login-password-form .form-control::placeholder{color:#6c757d} cd-login-password-form .btn-password:focus{outline-color:#2b99a8} cd-login-password-form button.btn:not(:first-child){margin-left:5px}@keyframes autofill{to{background-color:#2e373d;color:#f8f9fa}}input[_ngcontent-%COMP%]:-webkit-autofill{animation-fill-mode:both;animation-name:autofill;border-radius:0;box-shadow:inset 0 0 0 1000px #2e373d;-webkit-text-fill-color:#f8f9fa;-webkit-transition-property:none;transition-property:none}.invalid-feedback[_ngcontent-%COMP%]{padding-left:9px}.is-invalid.cd-form-control[_ngcontent-%COMP%]{border-color:transparent}"]}),e})();class fm{}function pm(e,t){1&e&&(i.Sb(0,"div",21),i.Wb(1,22),i.Rb())}function mm(e,t){1&e&&(i.Sb(0,"div",21),i.Wb(1,23),i.Rb())}function bm(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",1),i.Sb(1,"form",2,3),i.gc("ngSubmit",(function(){return i.Dc(e),i.ic().login()})),i.Sb(3,"div",4),i.Sb(4,"label",5),i.Wb(5,6),i.Rb(),i.Sb(6,"input",7,8),i.gc("ngModelChange",(function(t){return i.Dc(e),i.ic().model.username=t})),i.Rb(),i.Mc(8,pm,2,0,"div",9),i.Rb(),i.Sb(9,"div",10),i.Sb(10,"div",11),i.Sb(11,"div",12),i.Sb(12,"label",13),i.Wb(13,14),i.Rb(),i.Sb(14,"input",15,16),i.gc("ngModelChange",(function(t){return i.Dc(e),i.ic().model.password=t})),i.Rb(),i.Mc(16,mm,2,0,"div",9),i.Rb(),i.Sb(17,"span",17),i.Nb(18,"button",18),i.Rb(),i.Rb(),i.Rb(),i.Sb(19,"input",19),i.Yb(20,20),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.Ac(2),t=i.Ac(7),n=i.Ac(15),r=i.ic();i.yb(6),i.pc("ngModel",r.model.username),i.zb("aria-invalid",t.invalid),i.yb(2),i.pc("ngIf",(e.submitted||t.dirty)&&t.invalid),i.yb(6),i.pc("ngModel",r.model.password),i.zb("aria-invalid",n.invalid),i.yb(2),i.pc("ngIf",(e.submitted||n.dirty)&&n.invalid),i.yb(3),i.pc("disabled",e.invalid)}}let gm=(()=>{class e{constructor(e,t,n,i,r){this.authService=e,this.authStorageService=t,this.modalService=n,this.route=i,this.router=r,this.model=new fm,this.isLoginActive=!1}ngOnInit(){if(this.authStorageService.isLoggedIn())this.router.navigate([""]);else{this.modalService.dismissAll();let e=null;if(-1!==window.location.hash.indexOf("access_token=")){e=window.location.hash.split("access_token=")[1];const t=window.location.toString();window.history.replaceState({},document.title,t.split("?")[0])}this.authService.check(e).subscribe(e=>{e.login_url?"#/login"===e.login_url?this.isLoginActive=!0:window.location.replace(e.login_url):(this.authStorageService.set(e.username,e.permissions,e.sso,e.pwdExpirationDate),this.router.navigate([""]))})}}login(){this.authService.login(this.model).subscribe(()=>{const e=jt.a.get(this.route.snapshot.queryParams,"returnUrl","/");this.router.navigate([e])})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Gp.a),i.Mb(Jt.a),i.Mb(vn.a),i.Mb(Pt.a),i.Mb(Pt.e))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-login"]],decls:1,vars:1,consts:function(){return[["class","container",4,"ngIf"],[1,"container"],["name","loginForm","novalidate","",3,"ngSubmit"],["loginForm","ngForm"],[1,"form-group","has-feedback","d-flex","flex-column","py-3"],["for","username",1,"placeholder","pl-4"],"Username",["id","username","name","username","type","text","aria-labelledby","username","required","","autofocus","",1,"form-control","pl-4",3,"ngModel","ngModelChange"],["username","ngModel"],["class","invalid-feedback pl-4",4,"ngIf"],["id","password-div",1,"form-group","has-feedback"],[1,"input-group","d-flex","flex-nowrap"],[1,"d-flex","flex-column","flex-grow-1","py-3"],["for","password",1,"placeholder","pl-4"],"Password",["id","password","name","password","type","password","aria-labelledby","password","required","",1,"form-control","pl-4",3,"ngModel","ngModelChange"],["password","ngModel"],[1,"form-group-append"],["type","button","cdPasswordButton","password",1,"btn","btn-outline-light","btn-password","h-100","px-4"],["type","submit",1,"btn","btn-accent","px-5","py-2",3,"disabled",6,"value"],["value","Log in"],[1,"invalid-feedback","pl-4"],"Username is required","Password is required"]},template:function(e,t){1&e&&i.Mc(0,bm,21,7,"div",0),2&e&&i.pc("ngIf",t.isLoginActive)},directives:[wt.r,kn.C,kn.r,kn.s,Xn.a,On.a,kn.d,ei.a,kn.y,nr.a,kn.q,kn.t,Au.a],styles:["cd-login .form-group{background-color:#2e373d;border-left:4px solid #fff;height:auto;margin-bottom:2rem} cd-login .form-group:focus-within{border-left:4px solid #ef5c55} cd-login .btn-password, cd-login .btn-password:focus, cd-login .form-control, cd-login .form-control:focus{background-color:#2e373d;border:0;box-shadow:none;color:#f8f9fa;filter:none;outline:none} cd-login .placeholder{color:#6c757d} cd-login .btn-password:focus{outline-color:#2b99a8}@keyframes autofill{to{background-color:#2e373d;color:#f8f9fa}}input[_ngcontent-%COMP%]:-webkit-autofill{animation-fill-mode:both;animation-name:autofill;border-radius:0;box-shadow:inset 0 0 0 1000px #2e373d;-webkit-text-fill-color:#f8f9fa;-webkit-transition-property:none;transition-property:none}"]}),e})();var _m=n("tz6c");function ym(e,t){if(1&e&&(i.Sb(0,"div"),i.Nb(1,"i",8),i.Nb(2,"br"),i.Nb(3,"br"),i.Nb(4,"br"),i.Sb(5,"h3"),i.Sb(6,"b"),i.Oc(7),i.Rb(),i.Rb(),i.Nb(8,"br"),i.Sb(9,"h4"),i.Oc(10),i.Rb(),i.Rb()),2&e){const e=i.ic();i.yb(1),i.Ab(e.icon),i.yb(6),i.Pc(e.header),i.yb(3),i.Pc(e.message)}}function vm(e,t){1&e&&(i.Nb(0,"i",9),i.Nb(1,"br"),i.Nb(2,"br"),i.Nb(3,"br"),i.Sb(4,"h3"),i.cc(5,10),i.Nb(6,"b"),i.Zb(),i.Rb(),i.Nb(7,"br"),i.Sb(8,"h4"),i.Wb(9,11),i.Rb())}function wm(e,t){if(1&e&&(i.Sb(0,"div"),i.Sb(1,"h4"),i.cc(2,12),i.Nb(3,"a",13),i.Zb(),i.Rb(),i.Rb()),2&e){const e=i.ic();i.yb(3),i.qc("href",e.docUrl,i.Gc),i.ac(e.section_info),i.Xb(2)}}let Sm=(()=>{class e{constructor(e,t){this.router=e,this.docService=t}ngOnInit(){this.fetchData(),this.routerSubscription=this.router.events.pipe(Object(Ql.a)(e=>e instanceof Pt.b)).subscribe(()=>{this.fetchData()})}unloadHandler(e){e.returnValue=!1}fetchData(){try{this.router.onSameUrlNavigation="reload",this.message=history.state.message,this.header=history.state.header,this.section=history.state.section,this.section_info=history.state.section_info,this.icon=history.state.icon,this.source=history.state.source,this.docUrl=this.docService.urlGenerator(this.section)}catch(e){this.router.navigate(["/error"])}}ngOnDestroy(){this.routerSubscription&&this.routerSubscription.unsubscribe()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Pt.e),i.Mb(_m.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-error"]],hostBindings:function(e,t){1&e&&i.gc("beforeunload",(function(e){return t.unloadHandler(e)}),!1,i.Cc)},decls:16,vars:4,consts:function(){return[["target","_blank"],[1,"dashboard","row"],[1,"text-center","content"],[4,"ngIf","ngIfElse"],["elseBlock",""],[4,"ngIf"],[1,"btn","btn-primary",3,"routerLink"],"Go To Dashboard",["aria-hidden","true"],["aria-hidden","true",1,"fa","fa-exclamation-triangle"],"" + "\ufffd#6\ufffd" + "Page not Found" + "\ufffd/#6\ufffd" + "","Sorry, we couldn\u2019t find what you were looking for. The page you requested may have been changed or moved.","Please consult the " + "\ufffd#3\ufffd" + "documentation" + "\ufffd/#3\ufffd" + " on how to configure and enable the " + "\ufffd0\ufffd" + " management functionality.",[3,"href"]]},template:function(e,t){if(1&e&&(i.Sb(0,"head"),i.Sb(1,"title"),i.Oc(2,"Error Page"),i.Rb(),i.Nb(3,"base",0),i.Rb(),i.Sb(4,"div",1),i.Sb(5,"div",2),i.Nb(6,"br"),i.Mc(7,ym,11,5,"div",3),i.Mc(8,vm,10,0,"ng-template",null,4,i.Nc),i.Mc(10,wm,4,2,"div",5),i.Nb(11,"br"),i.Nb(12,"br"),i.Sb(13,"div"),i.Sb(14,"button",6),i.Wb(15,7),i.Rb(),i.Rb(),i.Rb(),i.Rb()),2&e){const e=i.Ac(9);i.yb(7),i.pc("ngIf",t.header&&t.message)("ngIfElse",e),i.yb(3),i.pc("ngIf",t.section),i.yb(4),i.pc("routerLink","/dashboard")}},directives:[wt.r,On.a,Pt.f],styles:["h4[_ngcontent-%COMP%]{color:#495057}i[_ngcontent-%COMP%]{font-size:6em;margin-top:120px}.dashboard[_ngcontent-%COMP%], .text-center[_ngcontent-%COMP%]{background-color:#e9ecef}.dashboard[_ngcontent-%COMP%]{height:100%;position:relative}.content[_ngcontent-%COMP%]{left:50%;position:absolute;top:40%;transform:translate(-50%,-50%);width:100%}.row[_ngcontent-%COMP%]{display:block;margin-left:-29px;margin-right:-29px;padding-top:10em}.fa-exclamation-triangle[_ngcontent-%COMP%], .fa-lock[_ngcontent-%COMP%]{color:#ef5c55}.fa-wrench[_ngcontent-%COMP%]{color:#2b99a8}"]}),e})(),Mm=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-blank-layout"]],decls:1,vars:0,template:function(e,t){1&e&&i.Nb(0,"router-outlet")},directives:[Pt.j],styles:[""]}),e})(),km=(()=>{class e{constructor(e,t){this.http=e,this.localeId=t}getLocale(){return this.localeId||s.a.default_lang}setLocale(e){document.cookie="cd-lang="+e}getLanguages(){return this.http.get("ui-api/langs")}}return e.\u0275fac=function(t){return new(t||e)(i.dc(o.b),i.dc(i.v))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var xm=function(e){return e.cs="\u010ce\u0161tina",e.de="Deutsch",e["en-US"]="English",e.es="Espa\xf1ol",e.fr="Fran\xe7ais",e.id="Bahasa Indonesia",e.it="Italiano",e.ja="\u65e5\u672c\u8a9e",e.ko="\ud55c\uad6d\uc5b4",e.pl="Polski",e.pt="Portugu\xeas (brasileiro)",e["zh-Hans"]="\u4e2d\u6587 (\u7b80\u4f53)",e["zh-Hant"]="\u4e2d\u6587 (\u7e41\u9ad4\uff09",e}({});function Dm(e,t){if(1&e){const e=i.Tb();i.Qb(0),i.Sb(1,"button",5),i.gc("click",(function(){i.Dc(e);const n=t.$implicit;return i.ic().changeLanguage(n.key)})),i.Oc(2),i.Rb(),i.Pb()}if(2&e){const e=t.$implicit;i.yb(2),i.Qc(" ",e.value," ")}}let Tm=(()=>{class e{constructor(e){this.languageService=e,this.allLanguages=xm,this.supportedLanguages={}}ngOnInit(){this.selectedLanguage=this.languageService.getLocale(),this.languageService.getLanguages().subscribe(e=>{this.supportedLanguages=jt.a.pick(xm,e)})}reloadWindow(){window.location.reload()}changeLanguage(e){this.languageService.setLocale(e),this.reloadWindow()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(km))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-language-selector"]],decls:7,vars:4,consts:function(){return[["ngbDropdown","","placement","bottom-right"],["ngbDropdownToggle","",6,"title"],["title","Select a Language"],["ngbDropdownMenu",""],[4,"ngFor","ngForOf"],["ngbDropdownItem","",3,"click"]]},template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Sb(1,"a",1),i.Yb(2,2),i.Oc(3),i.Rb(),i.Sb(4,"div",3),i.Mc(5,Dm,3,1,"ng-container",4),i.jc(6,"keyvalue"),i.Rb(),i.Rb()),2&e&&(i.yb(3),i.Qc(" ",t.allLanguages[t.selectedLanguage]," "),i.yb(2),i.pc("ngForOf",i.kc(6,2,t.supportedLanguages)))},directives:[Qt.i,Qt.m,Qt.k,wt.q,On.a,Qt.j],pipes:[wt.k],styles:[""]}),e})();function Cm(e,t){if(1&e&&(i.Sb(0,"li",10),i.Sb(1,"cd-doc",11),i.Yb(2,12),i.Rb(),i.Rb()),2&e){const e=t.$implicit;i.yb(1),i.ac(e.text),i.Xb(2),i.qc("section",e.section)}}let Om=(()=>{class e{constructor(){this.docItems=[{section:"help",text:"Help"},{section:"security",text:"Security"},{section:"trademarks",text:"Trademarks"}]}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-login-layout"]],decls:15,vars:1,consts:function(){return[[1,"login","full-height"],[1,"navbar","p-4"],[1,"navbar-brand"],[1,"form-inline"],[1,"container"],[1,"row","full-height","vertical-align"],[1,"col-sm-12","col-md-6","d-sm-block"],["src","assets/Ceph_Ceph_Logo_with_text_white.svg","alt","Ceph",1,"img-fluid"],[1,"list-inline"],["class","list-inline-item p-3",4,"ngFor","ngForOf"],[1,"list-inline-item","p-3"],["noSubscribe","true",3,"section",6,"docText"],["docText","" + "\ufffd0\ufffd" + ""]]},template:function(e,t){1&e&&(i.Sb(0,"main",0),i.Sb(1,"header"),i.Sb(2,"nav",1),i.Nb(3,"a",2),i.Sb(4,"div",3),i.Nb(5,"cd-language-selector"),i.Rb(),i.Rb(),i.Rb(),i.Sb(6,"section"),i.Sb(7,"div",4),i.Sb(8,"div",5),i.Sb(9,"div",6),i.Nb(10,"router-outlet"),i.Rb(),i.Sb(11,"div",6),i.Nb(12,"img",7),i.Sb(13,"ul",8),i.Mc(14,Cm,3,2,"li",9),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb()),2&e&&(i.yb(14),i.pc("ngForOf",t.docItems))},directives:[Qt.v,Tm,Pt.j,wt.q,Cr.a],styles:["cd-login-layout .login{background-color:#374249;background-image:url(ceph_background.e82dd79127290ddbe8cb.gif);background-position:100% 100%;background-repeat:no-repeat;color:#f8f9fa} cd-login-layout .login header{position:absolute;width:100vw} cd-login-layout .login header .navbar .dropdown-menu{margin-top:.2rem} cd-login-layout .login header .navbar .dropdown-menu li a:hover{background-color:#2b99a8} cd-login-layout .login section{display:inline-flex;min-height:100vh;width:100vw} cd-login-layout .login .list-inline{margin-bottom:20%;margin-left:20%} cd-login-layout .login a{color:#fff} cd-login-layout .login a:hover{color:#adb5bd}"]}),e})();var Lm=n("mSOc");let Rm=(()=>{class e{constructor(e,t){this.document=e,this.summaryService=t}init(){var e;this.url=null===(e=this.document.getElementById("cdFavicon"))||void 0===e?void 0:e.getAttribute("href"),this.sub=this.summaryService.subscribe(e=>{this.changeIcon(e.health_status)})}changeIcon(e){if(e===this.oldStatus)return;this.oldStatus=e;const t=this.document.getElementById("cdFavicon"),n=this.document.createElement("canvas");n.width=16,n.height=16;const i=n.getContext("2d"),r=this.document.createElement("img");r.src=this.url,r.onload=()=>{i.drawImage(r,0,0,16,16),uh[e]&&(i.save(),i.globalCompositeOperation="destination-out",i.beginPath(),i.arc(n.width-4,4,6,0,2*Math.PI),i.fill(),i.restore(),i.beginPath(),i.arc(n.width-4,4,4,0,2*Math.PI),i.fillStyle=uh[e],i.fill()),t.setAttribute("href",n.toDataURL("image/png"))}}ngOnDestroy(){var e;this.changeIcon(),null===(e=this.sub)||void 0===e||e.unsubscribe()}}return e.\u0275fac=function(t){return new(t||e)(i.dc(wt.d),i.dc(Lm.a))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})();var Em=n("VXsX"),Am=n("oMSZ");function Im(e,t){1&e&&(i.Sb(0,"div"),i.cc(1,3),i.Nb(2,"strong"),i.Nb(3,"a",4),i.Zb(),i.Rb())}function Pm(e,t){if(1&e&&(i.Sb(0,"div"),i.cc(1,5),i.Nb(2,"strong"),i.Nb(3,"a",4),i.Zb(),i.Rb()),2&e){const e=i.ic(2);i.yb(3),i.ac(e.expirationDays),i.Xb(1)}}function Nm(e,t){if(1&e){const e=i.Tb();i.Sb(0,"ngb-alert",1),i.gc("close",(function(t){return i.Dc(e),i.ic().close(t)})),i.Mc(1,Im,4,0,"div",2),i.Mc(2,Pm,4,1,"div",2),i.Rb()}if(2&e){const e=i.ic();i.qc("type",e.alertType),i.yb(1),i.pc("ngIf",0===e.expirationDays),i.yb(1),i.pc("ngIf",e.expirationDays>0)}}let jm=(()=>{class e{constructor(e,t){this.settingsService=e,this.authStorageService=t,this.displayNotification=!1}ngOnInit(){this.settingsService.getStandardSettings().subscribe(e=>{this.pwdExpirationSettings=new Am.a(e);const t=this.authStorageService.getPwdExpirationDate();t&&(this.expirationDays=this.getExpirationDays(t),this.alertType=this.expirationDays<=this.pwdExpirationSettings.pwdExpirationWarning2?"danger":"warning",this.displayNotification=this.expirationDays<=this.pwdExpirationSettings.pwdExpirationWarning1,this.authStorageService.isPwdDisplayedSource.next(this.displayNotification))})}ngOnDestroy(){this.authStorageService.isPwdDisplayedSource.next(!1)}getExpirationDays(e){const t=new Date,n=new Date(1e3*e);return Math.floor((n.valueOf()-t.valueOf())/864e5)}close(){this.authStorageService.isPwdDisplayedSource.next(!1),this.displayNotification=!1}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(yl.a),i.Mb(Jt.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-pwd-expiration-notification"]],decls:1,vars:1,consts:function(){return[["class","no-margin-bottom",3,"type","close",4,"ngIf"],[1,"no-margin-bottom",3,"type","close"],[4,"ngIf"],"Your password will expire in " + "\ufffd#2\ufffd" + "less than 1" + "\ufffd/#2\ufffd" + " day. Click " + "\ufffd#3\ufffd" + "here" + "\ufffd/#3\ufffd" + " to change it now.",["routerLink","/user-profile/edit",1,"alert-link"],"Your password will expire in " + "\ufffd#2\ufffd" + "" + "\ufffd0\ufffd" + "" + "\ufffd/#2\ufffd" + " day(s). Click " + "\ufffd#3\ufffd" + "here" + "\ufffd/#3\ufffd" + " to change it now."]},template:function(e,t){1&e&&i.Mc(0,Nm,3,3,"ngb-alert",0),2&e&&i.pc("ngIf",t.displayNotification)},directives:[wt.r,Qt.b,Pt.h],styles:["cd-pwd-expiration-notification .no-margin-bottom{margin-bottom:0}"]}),e})();function Fm(e,t){if(1&e){const e=i.Tb();i.Sb(0,"ngb-alert",1),i.gc("close",(function(t){return i.Dc(e),i.ic().close(t)})),i.Sb(1,"div"),i.cc(2,2),i.Nb(3,"a",3),i.Nb(4,"a",4),i.Zb(),i.Rb(),i.Rb()}}let Ym=(()=>{class e{constructor(e,t,n,i){this.mgrModuleService=e,this.authStorageService=t,this.notificationService=n,this.telemetryNotificationService=i,this.displayNotification=!1}ngOnInit(){if(this.telemetryNotificationService.update.subscribe(e=>{this.displayNotification=e}),!this.isNotificationHidden()){const e=this.authStorageService.getPermissions().configOpt;jt.a.every(Object.values(e))&&this.mgrModuleService.getConfig("telemetry").subscribe(e=>{e.enabled||this.telemetryNotificationService.setVisibility(!0)})}}ngOnDestroy(){this.telemetryNotificationService.setVisibility(!1)}isNotificationHidden(){return"true"===localStorage.getItem("telemetry_notification_hidden")}close(){this.telemetryNotificationService.setVisibility(!1),localStorage.setItem("telemetry_notification_hidden","true"),this.notificationService.show(yn.a.success,"Telemetry activation reminder muted","You can activate the module on the Telemetry configuration page (<b>Dashboard Settings</b> -> <b>Telemetry configuration</b>) at any time.")}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(wo),i.Mb(Jt.a),i.Mb(wn.a),i.Mb(Ad))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-telemetry-notification"]],decls:1,vars:1,consts:function(){var e;return e="The Ceph community needs your help to continue improving: please " + "\ufffd#3\ufffd" + "Activate" + "[\ufffd/#3\ufffd|\ufffd/#4\ufffd]" + " the " + "\ufffd#4\ufffd" + "Telemetry" + "[\ufffd/#3\ufffd|\ufffd/#4\ufffd]" + " module.",[["class","no-margin-bottom","type","warning",3,"close",4,"ngIf"],["type","warning",1,"no-margin-bottom",3,"close"],e=i.bc(e),["routerLink","/telemetry",1,"btn","activate-button","alert-link","activate-text"],["href","https://docs.ceph.com/en/latest/mgr/telemetry/"]]},template:function(e,t){1&e&&i.Mc(0,Fm,5,0,"ngb-alert",0),2&e&&i.pc("ngIf",t.displayNotification)},directives:[wt.r,Qt.b,Pt.h],styles:["cd-telemetry-notification .no-margin-bottom{margin-bottom:0}.activate-button[_ngcontent-%COMP%]{background-color:#fcecba;border:.5px solid #495057;border-radius:10%;padding:.1rem .4rem}.activate-text[_ngcontent-%COMP%]{color:#495057;font-weight:700}"]}),e})();var zm=function(){function e(e){if(this._maxConcurrency=e,this._queue=[],e<=0)throw new Error("semaphore must be initialized to a positive value");this._value=e}return e.prototype.acquire=function(){var e=this,t=this.isLocked(),n=new Promise((function(t){return e._queue.push(t)}));return t||this._dispatch(),n},e.prototype.runExclusive=function(e){return Object(Ft.a)(this,void 0,void 0,(function(){var t,n,i;return Object(Ft.c)(this,(function(r){switch(r.label){case 0:return[4,this.acquire()];case 1:t=r.sent(),n=t[0],i=t[1],r.label=2;case 2:return r.trys.push([2,,4,5]),[4,e(n)];case 3:return[2,r.sent()];case 4:return i(),[7];case 5:return[2]}}))}))},e.prototype.isLocked=function(){return this._value<=0},e.prototype.release=function(){if(this._maxConcurrency>1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");this._currentReleaser&&(this._currentReleaser(),this._currentReleaser=void 0)},e.prototype._dispatch=function(){var e=this,t=this._queue.shift();if(t){var n=!1;this._currentReleaser=function(){n||(n=!0,e._value++,e._dispatch())},t([this._value--,this._currentReleaser])}},e}(),$m=function(){function e(){this._semaphore=new zm(1)}return e.prototype.acquire=function(){return Object(Ft.a)(this,void 0,void 0,(function(){return Object(Ft.c)(this,(function(e){switch(e.label){case 0:return[4,this._semaphore.acquire()];case 1:return[2,e.sent()[1]]}}))}))},e.prototype.runExclusive=function(e){return this._semaphore.runExclusive((function(){return e()}))},e.prototype.isLocked=function(){return this._semaphore.isLocked()},e.prototype.release=function(){this._semaphore.release()},e}();let Hm=(()=>{class e{constructor(e,t){this.alertFormatter=e,this.prometheusService=t,this.backendFailure=!1,this.notifications=[]}refresh(){this.backendFailure||this.prometheusService.getNotifications(jt.a.last(this.notifications)).subscribe(e=>this.handleNotifications(e),()=>this.backendFailure=!0)}handleNotifications(e){0!==e.length&&(this.notifications.length>0&&this.alertFormatter.sendNotifications(jt.a.flatten(e.map(e=>this.formatNotification(e)))),this.notifications=this.notifications.concat(e))}formatNotification(e){return this.alertFormatter.convertToCustomAlerts(e.alerts).map(e=>this.alertFormatter.convertAlertToNotification(e))}}return e.\u0275fac=function(t){return new(t||e)(i.dc(Sl),i.dc(vl))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var Wm=n("ufoC"),Vm=n("Hicy"),Bm=n("WF9J");const Um=function(e,t){return[e,t]},Gm=function(e,t,n,i){return[e,t,n,i]};function qm(e,t){if(1&e&&(i.Sb(0,"div"),i.Sb(1,"div",12),i.Sb(2,"div",13),i.Sb(3,"div",14),i.Sb(4,"span",15),i.Nb(5,"i",7),i.Nb(6,"i",7),i.Rb(),i.Rb(),i.Sb(7,"div",16),i.Sb(8,"div",17),i.Sb(9,"h6",18),i.Oc(10),i.Rb(),i.Sb(11,"div",19),i.Nb(12,"ngb-progressbar",20),i.Rb(),i.Sb(13,"p",21),i.Sb(14,"small",22),i.Oc(15),i.jc(16,"cdDate"),i.Rb(),i.Sb(17,"span",23),i.Oc(18),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Nb(19,"hr"),i.Rb()),2&e){const e=t.$implicit,n=i.ic(2);i.yb(4),i.pc("ngClass",i.vc(11,Um,n.icons.stack,n.icons.large2x)),i.yb(1),i.pc("ngClass",i.vc(14,Um,n.icons.stack2x,n.icons.circle)),i.yb(1),i.pc("ngClass",i.xc(17,Gm,n.icons.stack1x,n.icons.spinner,n.icons.spin,n.icons.inverse)),i.yb(4),i.Pc(e.description),i.yb(2),i.pc("value",null==e?null:e.progress)("striped",!0)("animated",!0),i.yb(3),i.Qc(" ",i.kc(16,9,e.begin_time)," "),i.yb(3),i.Qc(" ",e.progress||0," % ")}}function Jm(e,t){if(1&e&&i.Mc(0,qm,20,22,"div",11),2&e){const e=i.ic();i.pc("ngForOf",e.executingTasks)("ngForTrackBy",e.trackByFn)}}function Qm(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"small"),i.Qb(2),i.Wb(3,36),i.Pb(),i.Oc(4),i.jc(5,"duration"),i.Rb(),i.Nb(6,"br"),i.Pb()),2&e){const e=i.ic().$implicit;i.yb(4),i.Qc(" ",i.kc(5,1,e.duration)," ")}}const Km=function(e,t,n){return[e,t,n]},Zm=function(e){return[e]};function Xm(e,t){if(1&e){const e=i.Tb();i.Sb(0,"div",7),i.Sb(1,"div",29),i.Sb(2,"div",13),i.Sb(3,"div",14),i.Sb(4,"span",7),i.Nb(5,"i",7),i.Nb(6,"i",7),i.Rb(),i.Rb(),i.Sb(7,"div",30),i.Sb(8,"div",17),i.Sb(9,"button",31),i.Yb(10,32),i.gc("click",(function(n){i.Dc(e);const r=t.index;return i.ic(3).remove(r),n.stopPropagation()})),i.Nb(11,"i",7),i.Rb(),i.Sb(12,"h6",18),i.Oc(13),i.Rb(),i.Nb(14,"p",33),i.Sb(15,"p",21),i.Mc(16,Qm,7,3,"ng-container",24),i.Sb(17,"small",34),i.jc(18,"cdDate"),i.Oc(19),i.jc(20,"relativeDate"),i.Rb(),i.Nb(21,"i",35),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Nb(22,"hr"),i.Rb()}if(2&e){const e=t.$implicit,n=i.ic(3);i.pc("ngClass",e.borderClass),i.yb(4),i.pc("ngClass",i.wc(16,Km,n.icons.stack,n.icons.large2x,e.textClass)),i.yb(1),i.pc("ngClass",i.vc(20,Um,n.icons.circle,n.icons.stack2x)),i.yb(1),i.pc("ngClass",i.wc(23,Km,n.icons.stack1x,n.icons.inverse,e.iconClass)),i.yb(5),i.pc("ngClass",i.uc(27,Zm,n.icons.trash)),i.yb(2),i.Pc(e.title),i.yb(1),i.pc("innerHtml",e.message,i.Ec),i.yb(2),i.pc("ngIf",e.duration),i.yb(1),i.pc("title",i.kc(18,12,e.timestamp)),i.yb(2),i.Pc(i.kc(20,14,e.timestamp)),i.yb(2),i.pc("ngClass",i.uc(29,Zm,e.applicationClass))("title",e.application)}}function eb(e,t){if(1&e){const e=i.Tb();i.Qb(0),i.Sb(1,"button",25),i.gc("click",(function(t){return i.Dc(e),i.ic(2).removeAll(),t.stopPropagation()})),i.Nb(2,"i",26),i.Oc(3," \xa0 "),i.Qb(4),i.Wb(5,27),i.Pb(),i.Rb(),i.Nb(6,"hr"),i.Mc(7,Xm,23,31,"div",28),i.Pb()}if(2&e){const e=i.ic(2);i.yb(2),i.pc("ngClass",i.uc(2,Zm,e.icons.trash)),i.yb(5),i.pc("ngForOf",e.notifications)}}function tb(e,t){if(1&e&&i.Mc(0,eb,8,4,"ng-container",24),2&e){const e=i.ic();i.pc("ngIf",e.notifications.length>0)}}function nb(e,t){1&e&&(i.Sb(0,"div"),i.Sb(1,"div",37),i.Wb(2,38),i.Rb(),i.Rb())}function ib(e,t){if(1&e&&i.Mc(0,nb,3,0,"div",24),2&e){const e=i.ic();i.pc("ngIf",0===e.notifications.length&&0===e.executingTasks.length)}}function rb(e,t){1&e&&i.Ob(0)}function sb(e,t){1&e&&i.Ob(0)}function ob(e,t){1&e&&i.Ob(0)}let ab=(()=>{class e{constructor(e,t,n,i,r,s,o,a){this.notificationService=e,this.summaryService=t,this.taskMessageService=n,this.prometheusNotificationService=i,this.authStorageService=r,this.prometheusAlertService=s,this.ngZone=o,this.cdRef=a,this.isSidebarOpened=!1,this.executingTasks=[],this.subs=new Oi.a,this.icons=_n.a,this.last_task="",this.mutex=new $m,this.simplebar={autoHide:!1},this.notifications=[]}ngOnDestroy(){window.clearInterval(this.interval),window.clearTimeout(this.timeout),this.subs.unsubscribe()}ngOnInit(){this.last_task=window.localStorage.getItem("last_task");const e=this.authStorageService.getPermissions();e.prometheus.read&&e.configOpt.read&&(this.triggerPrometheusAlerts(),this.ngZone.runOutsideAngular(()=>{this.interval=window.setInterval(()=>{this.ngZone.run(()=>{this.triggerPrometheusAlerts()})},5e3)})),this.subs.add(this.notificationService.data$.subscribe(e=>{this.notifications=jt.a.orderBy(e,["timestamp"],["desc"]),this.cdRef.detectChanges()})),this.subs.add(this.notificationService.sidebarSubject.subscribe(e=>{this.isSidebarOpened=!e&&!this.isSidebarOpened,window.clearTimeout(this.timeout),this.timeout=window.setTimeout(()=>{this.cdRef.detectChanges()},0)})),this.subs.add(this.summaryService.subscribe(e=>{this._handleTasks(e.executing_tasks),this.mutex.acquire().then(t=>{jt.a.filter(e.finished_tasks,e=>!this.last_task||nn()(e.end_time).isAfter(this.last_task)).forEach(e=>{const t=this.notificationService.finishedTaskToNotification(e,e.success),n=new wl.a(t);n.timestamp=e.end_time,n.duration=e.duration,this.last_task&&!nn()(e.end_time).isAfter(this.last_task)||(this.last_task=e.end_time,window.localStorage.setItem("last_task",this.last_task)),this.notificationService.save(n)}),this.cdRef.detectChanges(),t()})}))}_handleTasks(e){for(const t of e)t.description=this.taskMessageService.getRunningTitle(t);this.executingTasks=e}triggerPrometheusAlerts(){this.prometheusAlertService.refresh(),this.prometheusNotificationService.refresh()}removeAll(){this.notificationService.removeAll()}remove(e){this.notificationService.remove(e)}closeSidebar(){this.isSidebarOpened=!1}trackByFn(e){return e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(wn.a),i.Mb(Lm.a),i.Mb(Wm.a),i.Mb(Hm),i.Mb(Jt.a),i.Mb(Ml),i.Mb(i.A),i.Mb(i.h))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-notifications-sidebar"]],hostVars:2,hostBindings:function(e,t){2&e&&i.Eb("active",t.isSidebarOpened)},decls:18,vars:6,consts:function(){return[["tasksTpl",""],["notificationsTpl",""],["emptyTpl",""],[1,"card",3,"clickOutsideEnabled","clickOutside"],[1,"card-header"],"Tasks and Notifications",["tabindex","-1","type","button",1,"close","float-right",3,"click"],[3,"ngClass"],[3,"options"],[1,"card-body"],[4,"ngTemplateOutlet"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"card","tc_task","border-0"],[1,"row","no-gutters"],[1,"col-md-2","text-center"],[1,"text-info",3,"ngClass"],[1,"col-md-9"],[1,"card-body","p-1"],[1,"card-title","bold"],[1,"mb-1"],["type","info",3,"value","striped","animated"],[1,"card-text","text-muted"],[1,"date","float-left"],[1,"float-right"],[4,"ngIf"],["type","button",1,"btn","btn-light","btn-block",3,"click"],["aria-hidden","true",3,"ngClass"],"Clear notifications",[3,"ngClass",4,"ngFor","ngForOf"],[1,"card","tc_notification","border-0"],[1,"col-md-10"],[1,"btn","btn-link","float-right","mt-0","pt-0",3,"click",6,"title"],["title","Remove notification"],[1,"card-text",3,"innerHtml"],[1,"date",3,"title"],[1,"float-right","custom-icon",3,"ngClass","title"],"Duration:",[1,"message","text-center"],"There are no notifications."]},template:function(e,t){if(1&e&&(i.Mc(0,Jm,1,2,"ng-template",null,0,i.Nc),i.Mc(2,tb,1,1,"ng-template",null,1,i.Nc),i.Mc(4,ib,1,1,"ng-template",null,2,i.Nc),i.Sb(6,"div",3),i.gc("clickOutside",(function(){return t.closeSidebar()})),i.Sb(7,"div",4),i.Qb(8),i.Wb(9,5),i.Pb(),i.Sb(10,"button",6),i.gc("click",(function(){return t.closeSidebar()})),i.Sb(11,"span"),i.Nb(12,"i",7),i.Rb(),i.Rb(),i.Rb(),i.Sb(13,"ngx-simplebar",8),i.Sb(14,"div",9),i.Mc(15,rb,1,0,"ng-container",10),i.Mc(16,sb,1,0,"ng-container",10),i.Mc(17,ob,1,0,"ng-container",10),i.Rb(),i.Rb(),i.Rb()),2&e){const e=i.Ac(1),n=i.Ac(3),r=i.Ac(5);i.yb(6),i.pc("clickOutsideEnabled",t.isSidebarOpened),i.yb(6),i.pc("ngClass",t.icons.close),i.yb(1),i.pc("options",t.simplebar),i.yb(2),i.pc("ngTemplateOutlet",e),i.yb(1),i.pc("ngTemplateOutlet",n),i.yb(1),i.pc("ngTemplateOutlet",r)}},directives:[Vm.a,On.a,wt.p,Bm.a,wt.w,wt.q,Qt.z,wt.r],pipes:[Vt.a,Yr.a,Al],styles:["[_nghost-%COMP%]{bottom:10px;max-width:90vw;position:fixed;right:-350px;top:53px;transition:all .6s;width:350px;z-index:9}.active[_nghost-%COMP%]{right:20px}.card[_ngcontent-%COMP%]{height:100%}.card-body[_ngcontent-%COMP%]{padding-left:0;padding-right:5px;padding-top:3px}ngx-simplebar[_ngcontent-%COMP%]{height:calc(100% - 42.2px)}.separator[_ngcontent-%COMP%]{background-color:#e9ecef;color:#6c757d;font-size:1rem;padding:5px 12px}.btn-block[_ngcontent-%COMP%]{width:98%}.btn-link[_ngcontent-%COMP%] .fa-trash-o[_ngcontent-%COMP%]{color:#000}table[_ngcontent-%COMP%]{width:100%}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0;padding-bottom:1rem;padding-top:1rem}hr[_ngcontent-%COMP%]{margin-bottom:2px;margin-top:2px}.card-text[_ngcontent-%COMP%]{margin-right:15px}"],changeDetection:0}),e})();function cb(e,t){1&e&&i.Nb(0,"span",6)}const lb=function(e){return{running:e}},ub=function(e){return[e]};let db=(()=>{class e{constructor(e,t){this.notificationService=e,this.summaryService=t,this.icons=_n.a,this.hasRunningTasks=!1,this.hasNotifications=!1,this.subs=new Oi.a}ngOnInit(){this.subs.add(this.summaryService.subscribe(e=>{this.hasRunningTasks=e.executing_tasks.length>0})),this.subs.add(this.notificationService.data$.subscribe(e=>{this.hasNotifications=e.length>0}))}ngOnDestroy(){this.subs.unsubscribe()}toggleSidebar(){this.notificationService.toggleSidebar()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(wn.a),i.Mb(Lm.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-notifications"]],decls:6,vars:7,consts:function(){return[[3,"ngClass","click",6,"title"],["title","Tasks and Notifications"],[3,"ngClass"],["class","dot",4,"ngIf"],[1,"d-md-none"],"Tasks and Notifications",[1,"dot"]]},template:function(e,t){1&e&&(i.Sb(0,"a",0),i.Yb(1,1),i.gc("click",(function(){return t.toggleSidebar()})),i.Nb(2,"i",2),i.Mc(3,cb,1,0,"span",3),i.Sb(4,"span",4),i.Wb(5,5),i.Rb(),i.Rb()),2&e&&(i.pc("ngClass",i.uc(3,lb,t.hasRunningTasks)),i.yb(2),i.pc("ngClass",i.uc(5,ub,t.icons.bell)),i.yb(1),i.pc("ngIf",t.hasNotifications))},directives:[wt.p,wt.r],styles:[".running[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#2b99a8}.running[_ngcontent-%COMP%]:hover i[_ngcontent-%COMP%]{color:#fff}a[_ngcontent-%COMP%] .dot[_ngcontent-%COMP%]{background-color:#2b99a8;border:2px solid #374249;border-radius:50%;height:11px;position:absolute;right:17px;top:10px;width:10px}a[_ngcontent-%COMP%]:hover .dot[_ngcontent-%COMP%]{background-color:#fff;border-color:#2b99a8}"]}),e})();var hb=n("e0ae");let fb=(()=>{class e{constructor(e,t,n,i){this.activeModal=e,this.summaryService=t,this.userService=n,this.authStorageService=i,this.userPermission=this.authStorageService.getPermissions().user}ngOnInit(){this.projectConstants=gn.c,this.hostAddr=window.location.hostname,this.modalVariables=this.setVariables(),this.subs=this.summaryService.subscribe(e=>{const t=e.version.replace("ceph version ","").split(" ");this.hostAddr=e.mgr_host.replace(/(^\w+:|^)\/\//,"").replace(/\/$/,""),this.versionNumber=t[0],this.versionHash=t[1],this.versionName=t.slice(2,t.length).join(" ")})}ngOnDestroy(){this.subs.unsubscribe()}setVariables(){const e={};e.user=localStorage.getItem("dashboard_username"),e.role="user",this.userPermission.read&&this.userService.get(e.user).subscribe(t=>{e.role=t.roles});const t=Object(hb.a)();return e.browserName=t&&t.name?t.name:"Not detected",e.browserVersion=t&&t.version?t.version:"Not detected",e.browserOS=t&&t.os?t.os:"Not detected",e}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Qt.a),i.Mb(Lm.a),i.Mb(qp.a),i.Mb(Jt.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-about"]],decls:46,vars:13,consts:[[1,"about-container"],[1,"modal-header"],["type","button","aria-label","Close",1,"close","float-right",3,"click"],["aria-hidden","true"],[1,"modal-body"],["src","assets/Ceph_Ceph_Logo_with_text_red_white.svg",1,"ceph-logo",3,"alt"],[1,"product-versions"],[1,"modal-footer"],[1,"text-left"]],template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Sb(1,"div",1),i.Sb(2,"button",2),i.gc("click",(function(){return t.activeModal.close()})),i.Sb(3,"span",3),i.Oc(4,"\xd7"),i.Rb(),i.Rb(),i.Rb(),i.Sb(5,"div",4),i.Nb(6,"img",5),i.Sb(7,"h3"),i.Sb(8,"strong"),i.Oc(9),i.Rb(),i.Rb(),i.Sb(10,"div",6),i.Sb(11,"strong"),i.Oc(12,"Version"),i.Rb(),i.Nb(13,"br"),i.Oc(14),i.Nb(15,"br"),i.Oc(16),i.Rb(),i.Nb(17,"br"),i.Sb(18,"dl"),i.Sb(19,"dt"),i.Oc(20,"Ceph Manager"),i.Rb(),i.Sb(21,"dd"),i.Oc(22),i.Rb(),i.Sb(23,"dt"),i.Oc(24,"User"),i.Rb(),i.Sb(25,"dd"),i.Oc(26),i.Rb(),i.Sb(27,"dt"),i.Oc(28,"User Role"),i.Rb(),i.Sb(29,"dd"),i.Oc(30),i.Rb(),i.Sb(31,"dt"),i.Oc(32,"Browser"),i.Rb(),i.Sb(33,"dd"),i.Oc(34),i.Rb(),i.Sb(35,"dt"),i.Oc(36,"Browser Version"),i.Rb(),i.Sb(37,"dd"),i.Oc(38),i.Rb(),i.Sb(39,"dt"),i.Oc(40,"Browser OS"),i.Rb(),i.Sb(41,"dd"),i.Oc(42),i.Rb(),i.Rb(),i.Rb(),i.Sb(43,"div",7),i.Sb(44,"div",8),i.Oc(45),i.Rb(),i.Rb(),i.Rb()),2&e&&(i.yb(6),i.qc("alt",t.projectConstants.organization),i.yb(3),i.Pc(t.projectConstants.projectName),i.yb(5),i.Rc(" ",t.versionNumber," ",t.versionHash," "),i.yb(2),i.Qc(" ",t.versionName," "),i.yb(6),i.Pc(t.hostAddr),i.yb(4),i.Pc(t.modalVariables.user),i.yb(4),i.Pc(t.modalVariables.role),i.yb(4),i.Pc(t.modalVariables.browserName),i.yb(4),i.Pc(t.modalVariables.browserVersion),i.yb(4),i.Pc(t.modalVariables.browserOS),i.yb(3),i.Rc(" ",t.projectConstants.copyright," ",t.projectConstants.license," "))},directives:[On.a],styles:[".about-container[_ngcontent-%COMP%]{background-color:#374249;background-image:url(ceph_background.e82dd79127290ddbe8cb.gif);background-position:100% 100%;background-repeat:no-repeat;color:#fff;text-shadow:1px 1px #374249}.product-versions[_ngcontent-%COMP%]{margin-top:30px}.product-versions[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{margin-right:10px}.modal-header[_ngcontent-%COMP%]{border-bottom:0}.modal-header[_ngcontent-%COMP%] .close[_ngcontent-%COMP%]{color:#fff;font-size:2em}.modal-body[_ngcontent-%COMP%]{padding-left:80px;padding-right:80px}.ceph-logo[_ngcontent-%COMP%]{margin-bottom:30px;width:25%}.modal-footer[_ngcontent-%COMP%]{border-top:0;display:block;padding:15px 80px 35px}"]}),e})();const pb=["docsForm"],mb=function(e){return[e]},bb=function(e){return{disabled:e}};let gb=(()=>{class e{constructor(e,t){this.modalService=e,this.docService=t,this.icons=_n.a}ngOnInit(){this.docService.subscribeOnce("dashboard",e=>{this.docsUrl=e})}openAboutModal(){this.modalRef=this.modalService.show(fb,null,{size:"lg"})}goToApiDocs(){this.docsFormElement.nativeElement.submit()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(vn.a),i.Mb(_m.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-dashboard-help"]],viewQuery:function(e,t){var n;1&e&&i.Jc(pb,!0),2&e&&i.zc(n=i.hc())&&(t.docsFormElement=n.first)},decls:16,vars:7,consts:function(){return[["action","/docs","target","_blank","method","post"],["docsForm",""],["type","hidden","name","token"],["ngbDropdown","","placement","bottom-right"],["ngbDropdownToggle","",6,"title"],["title","Help"],[3,"ngClass"],[1,"d-md-none"],"Help",["ngbDropdownMenu",""],["ngbDropdownItem","","target","_blank",1,"text-capitalize",3,"ngClass","href"],"documentation",["ngbDropdownItem","",3,"click"],"API","About"]},template:function(e,t){1&e&&(i.Sb(0,"form",0,1),i.Nb(2,"input",2),i.Rb(),i.Sb(3,"div",3),i.Sb(4,"a",4),i.Yb(5,5),i.Nb(6,"i",6),i.Sb(7,"span",7),i.Wb(8,8),i.Rb(),i.Rb(),i.Sb(9,"div",9),i.Sb(10,"a",10),i.Wb(11,11),i.Rb(),i.Sb(12,"button",12),i.gc("click",(function(){return t.goToApiDocs()})),i.Wb(13,13),i.Rb(),i.Sb(14,"button",12),i.gc("click",(function(){return t.openAboutModal()})),i.Wb(15,14),i.Rb(),i.Rb(),i.Rb()),2&e&&(i.yb(6),i.pc("ngClass",i.uc(3,mb,t.icons.questionCircle)),i.yb(4),i.qc("href",t.docsUrl,i.Gc),i.pc("ngClass",i.uc(5,bb,!t.docsUrl)))},directives:[On.a,Qt.i,Qt.m,wt.p,Qt.k,Qt.j],styles:[""]}),e})();function _b(e,t){1&e&&(i.Sb(0,"button",10),i.Wb(1,11),i.Rb())}function yb(e,t){1&e&&(i.Sb(0,"button",12),i.Wb(1,13),i.Rb())}const vb=function(e){return[e]};function wb(e,t){if(1&e&&(i.Sb(0,"div",1),i.Sb(1,"a",2),i.Yb(2,3),i.Nb(3,"i",4),i.Sb(4,"span",5),i.Wb(5,6),i.Rb(),i.Rb(),i.Sb(6,"div",7),i.Mc(7,_b,2,0,"button",8),i.Mc(8,yb,2,0,"button",9),i.Rb(),i.Rb()),2&e){const e=i.ic();i.yb(3),i.pc("ngClass",i.uc(3,vb,e.icons.deepCheck)),i.yb(4),i.pc("ngIf",e.userPermission.read),i.yb(1),i.pc("ngIf",e.configOptPermission.read)}}let Sb=(()=>{class e{constructor(e){this.authStorageService=e,this.icons=_n.a;const t=this.authStorageService.getPermissions();this.userPermission=t.user,this.configOptPermission=t.configOpt}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Jt.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-administration"]],decls:1,vars:1,consts:function(){return[["ngbDropdown","","placement","bottom-right",4,"ngIf"],["ngbDropdown","","placement","bottom-right"],["ngbDropdownToggle","",1,"dropdown-toggle",6,"title"],["title","Dashboard Settings"],[3,"ngClass"],[1,"d-md-none"],"Dashboard Settings",["ngbDropdownMenu",""],["ngbDropdownItem","","routerLink","/user-management",4,"ngIf"],["ngbDropdownItem","","routerLink","/telemetry",4,"ngIf"],["ngbDropdownItem","","routerLink","/user-management"],"User management",["ngbDropdownItem","","routerLink","/telemetry"],"Telemetry configuration"]},template:function(e,t){1&e&&i.Mc(0,wb,9,5,"div",0),2&e&&i.pc("ngIf",t.userPermission.read)},directives:[wt.r,Qt.i,Qt.m,wt.p,Qt.k,On.a,Qt.j,Pt.f],styles:[""]}),e})();const Mb=function(e){return[e]};function kb(e,t){if(1&e&&(i.Sb(0,"button",13),i.Nb(1,"i",3),i.Sb(2,"span"),i.Wb(3,14),i.Rb(),i.Rb()),2&e){const e=i.ic();i.yb(1),i.pc("ngClass",i.uc(1,Mb,e.icons.lock))}}let xb=(()=>{class e{constructor(e,t){this.authStorageService=e,this.authService=t,this.icons=_n.a}ngOnInit(){this.username=this.authStorageService.getUsername(),this.sso=this.authStorageService.isSSO()}logout(){this.authService.logout()}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Jt.a),i.Mb(Gp.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-identity"]],decls:16,vars:8,consts:function(){return[["ngbDropdown","","placement","bottom-right"],["ngbDropdownToggle","",6,"title"],["title","Logged in user"],[3,"ngClass"],[1,"d-md-none"],"Logged in user",["ngbDropdownMenu",""],["ngbDropdownItem","","disabled",""],"Signed in as " + "\ufffd#9\ufffd" + "" + "\ufffd0\ufffd" + "" + "\ufffd/#9\ufffd" + "",[1,"dropdown-divider"],["ngbDropdownItem","","routerLink","/user-profile/edit",4,"ngIf"],["ngbDropdownItem","",3,"click"],"Sign out",["ngbDropdownItem","","routerLink","/user-profile/edit"],"Change password"]},template:function(e,t){1&e&&(i.Sb(0,"div",0),i.Sb(1,"a",1),i.Yb(2,2),i.Nb(3,"i",3),i.Sb(4,"span",4),i.Wb(5,5),i.Rb(),i.Rb(),i.Sb(6,"div",6),i.Sb(7,"button",7),i.cc(8,8),i.Nb(9,"strong"),i.Zb(),i.Rb(),i.Nb(10,"li",9),i.Mc(11,kb,4,3,"button",10),i.Sb(12,"button",11),i.gc("click",(function(){return t.logout()})),i.Nb(13,"i",3),i.Sb(14,"span"),i.Wb(15,12),i.Rb(),i.Rb(),i.Rb(),i.Rb()),2&e&&(i.yb(3),i.pc("ngClass",i.uc(4,Mb,t.icons.user)),i.yb(6),i.ac(t.username),i.Xb(8),i.yb(2),i.pc("ngIf",!t.sso),i.yb(2),i.pc("ngClass",i.uc(6,Mb,t.icons.signOut)))},directives:[Qt.i,Qt.m,wt.p,Qt.k,On.a,Qt.j,wt.r,Pt.f],styles:[""]}),e})();function Db(e,t){1&e&&i.Ob(0)}function Tb(e,t){1&e&&i.Ob(0)}function Cb(e,t){1&e&&(i.Sb(0,"li",21),i.Nb(1,"cd-language-selector",22),i.Rb(),i.Sb(2,"li",21),i.Nb(3,"cd-notifications",22),i.Rb(),i.Sb(4,"li",21),i.Nb(5,"cd-dashboard-help",22),i.Rb(),i.Sb(6,"li",21),i.Nb(7,"cd-administration",22),i.Rb(),i.Sb(8,"li",21),i.Nb(9,"cd-identity",22),i.Rb())}function Ob(e,t){1&e&&(i.Sb(0,"li",48),i.Sb(1,"a",49),i.Wb(2,50),i.Rb(),i.Rb())}function Lb(e,t){1&e&&(i.Sb(0,"li",51),i.Sb(1,"a",52),i.Wb(2,53),i.Rb(),i.Rb())}function Rb(e,t){1&e&&(i.Sb(0,"li",54),i.Sb(1,"a",55),i.Wb(2,56),i.Rb(),i.Rb())}function Eb(e,t){1&e&&(i.Sb(0,"li",57),i.Sb(1,"a",58),i.Wb(2,59),i.Rb(),i.Rb())}function Ab(e,t){1&e&&(i.Sb(0,"li",60),i.Sb(1,"a",61),i.Wb(2,62),i.Rb(),i.Rb())}function Ib(e,t){1&e&&(i.Sb(0,"li",63),i.Sb(1,"a",64),i.Wb(2,65),i.Rb(),i.Rb())}function Pb(e,t){1&e&&(i.Sb(0,"li",66),i.Sb(1,"a",67),i.Wb(2,68),i.Rb(),i.Rb())}function Nb(e,t){1&e&&(i.Sb(0,"li",69),i.Sb(1,"a",70),i.Wb(2,71),i.Rb(),i.Rb())}function jb(e,t){1&e&&(i.Sb(0,"li",72),i.Sb(1,"a",73),i.Wb(2,74),i.Rb(),i.Rb())}function Fb(e,t){if(1&e&&(i.Sb(0,"small",79),i.Oc(1),i.Rb()),2&e){const e=i.ic(5);i.yb(1),i.Pc(e.prometheusAlertService.activeAlerts)}}function Yb(e,t){if(1&e&&(i.Sb(0,"li",75),i.Sb(1,"a",76),i.Qb(2),i.Wb(3,77),i.Pb(),i.Mc(4,Fb,2,1,"small",78),i.Rb(),i.Rb()),2&e){const e=i.ic(4);i.yb(4),i.pc("ngIf",e.prometheusAlertService.activeAlerts>0)}}function zb(e,t){if(1&e){const e=i.Tb();i.Sb(0,"li",34),i.Sb(1,"a",35),i.gc("click",(function(){return i.Dc(e),i.ic(3).toggleSubMenu("cluster")})),i.Qb(2),i.Wb(3,36),i.Pb(),i.Rb(),i.Sb(4,"ul",37),i.Mc(5,Ob,3,0,"li",38),i.Mc(6,Lb,3,0,"li",39),i.Mc(7,Rb,3,0,"li",40),i.Mc(8,Eb,3,0,"li",41),i.Mc(9,Ab,3,0,"li",42),i.Mc(10,Ib,3,0,"li",43),i.Mc(11,Pb,3,0,"li",44),i.Mc(12,Nb,3,0,"li",45),i.Mc(13,jb,3,0,"li",46),i.Mc(14,Yb,5,1,"li",47),i.Rb(),i.Rb()}if(2&e){const e=i.ic(3);i.yb(1),i.zb("aria-expanded","cluster"==e.displayedSubMenu),i.yb(3),i.pc("ngbCollapse","cluster"!==e.displayedSubMenu),i.yb(1),i.pc("ngIf",e.permissions.hosts.read),i.yb(1),i.pc("ngIf",e.permissions.hosts.read),i.yb(1),i.pc("ngIf",e.permissions.monitor.read),i.yb(1),i.pc("ngIf",e.permissions.hosts.read),i.yb(1),i.pc("ngIf",e.permissions.osd.read),i.yb(1),i.pc("ngIf",e.permissions.configOpt.read),i.yb(1),i.pc("ngIf",e.permissions.osd.read),i.yb(1),i.pc("ngIf",e.permissions.configOpt.read),i.yb(1),i.pc("ngIf",e.permissions.log.read),i.yb(1),i.pc("ngIf",e.permissions.prometheus.read)}}function $b(e,t){1&e&&(i.Sb(0,"li",80),i.Sb(1,"a",81),i.Wb(2,82),i.Rb(),i.Rb())}function Hb(e,t){1&e&&(i.Sb(0,"li",89),i.Sb(1,"a",90),i.Wb(2,91),i.Rb(),i.Rb())}function Wb(e,t){if(1&e&&(i.Sb(0,"small",96),i.Oc(1),i.Rb()),2&e){const e=i.ic(5);i.yb(1),i.Pc(null==e.summaryData||null==e.summaryData.rbd_mirroring?null:e.summaryData.rbd_mirroring.warnings)}}function Vb(e,t){if(1&e&&(i.Sb(0,"small",79),i.Oc(1),i.Rb()),2&e){const e=i.ic(5);i.yb(1),i.Pc(null==e.summaryData||null==e.summaryData.rbd_mirroring?null:e.summaryData.rbd_mirroring.errors)}}function Bb(e,t){if(1&e&&(i.Sb(0,"li",92),i.Sb(1,"a",93),i.Qb(2),i.Wb(3,94),i.Pb(),i.Mc(4,Wb,2,1,"small",95),i.Mc(5,Vb,2,1,"small",78),i.Rb(),i.Rb()),2&e){const e=i.ic(4);i.yb(4),i.pc("ngIf",0!==(null==e.summaryData||null==e.summaryData.rbd_mirroring?null:e.summaryData.rbd_mirroring.warnings)),i.yb(1),i.pc("ngIf",0!==(null==e.summaryData||null==e.summaryData.rbd_mirroring?null:e.summaryData.rbd_mirroring.errors))}}function Ub(e,t){1&e&&(i.Sb(0,"li",97),i.Sb(1,"a",98),i.Wb(2,99),i.Rb(),i.Rb())}function Gb(e,t){if(1&e){const e=i.Tb();i.Sb(0,"li",83),i.Sb(1,"a",84),i.gc("click",(function(){return i.Dc(e),i.ic(3).toggleSubMenu("block")})),i.Qb(2),i.Wb(3,85),i.Pb(),i.Rb(),i.Sb(4,"ul",37),i.Mc(5,Hb,3,0,"li",86),i.Mc(6,Bb,6,2,"li",87),i.Mc(7,Ub,3,0,"li",88),i.Rb(),i.Rb()}if(2&e){const e=i.ic().ngIf,t=i.ic(2);i.yb(1),i.pc("ngStyle",t.blockHealthColor()),i.zb("aria-expanded","block"==t.displayedSubMenu),i.yb(3),i.pc("ngbCollapse","block"!==t.displayedSubMenu),i.yb(1),i.pc("ngIf",t.permissions.rbdImage.read&&e.rbd),i.yb(1),i.pc("ngIf",t.permissions.rbdMirroring.read&&e.mirroring),i.yb(1),i.pc("ngIf",t.permissions.iscsi.read&&e.iscsi)}}function qb(e,t){1&e&&(i.Sb(0,"li",100),i.Sb(1,"a",101),i.Wb(2,102),i.Rb(),i.Rb())}function Jb(e,t){1&e&&(i.Sb(0,"li",103),i.Sb(1,"a",104),i.Wb(2,105),i.Rb(),i.Rb())}function Qb(e,t){if(1&e){const e=i.Tb();i.Sb(0,"li",106),i.Sb(1,"a",35),i.gc("click",(function(){return i.Dc(e),i.ic(3).toggleSubMenu("rgw")})),i.Qb(2),i.Wb(3,107),i.Pb(),i.Rb(),i.Sb(4,"ul",37),i.Sb(5,"li",108),i.Sb(6,"a",109),i.Wb(7,110),i.Rb(),i.Rb(),i.Sb(8,"li",111),i.Sb(9,"a",112),i.Wb(10,113),i.Rb(),i.Rb(),i.Sb(11,"li",114),i.Sb(12,"a",115),i.Wb(13,116),i.Rb(),i.Rb(),i.Rb(),i.Rb()}if(2&e){const e=i.ic(3);i.yb(1),i.zb("aria-expanded","rgw"==e.displayedSubMenu),i.yb(3),i.pc("ngbCollapse","rgw"!==e.displayedSubMenu)}}const Kb=function(e){return[e]};function Zb(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"li",24),i.Sb(2,"a",25),i.Sb(3,"span"),i.Wb(4,26),i.Rb(),i.Oc(5,"\xa0 "),i.Nb(6,"i",27),i.jc(7,"healthColor"),i.Rb(),i.Rb(),i.Mc(8,zb,15,12,"li",28),i.Mc(9,$b,3,0,"li",29),i.Mc(10,Gb,8,6,"li",30),i.Mc(11,qb,3,0,"li",31),i.Mc(12,Jb,3,0,"li",32),i.Mc(13,Qb,14,2,"li",33),i.Pb()),2&e){const e=t.ngIf,n=i.ic(2);i.yb(6),i.pc("ngClass",i.uc(10,Kb,n.icons.health))("ngStyle",i.kc(7,8,null==n.summaryData?null:n.summaryData.health_status)),i.yb(2),i.pc("ngIf",n.permissions.hosts.read||n.permissions.monitor.read||n.permissions.osd.read||n.permissions.configOpt.read||n.permissions.log.read||n.permissions.prometheus.read),i.yb(1),i.pc("ngIf",n.permissions.pool.read),i.yb(1),i.pc("ngIf",(n.permissions.rbdImage.read||n.permissions.rbdMirroring.read||n.permissions.iscsi.read)&&(e.rbd||e.mirroring||e.iscsi)),i.yb(1),i.pc("ngIf",n.permissions.nfs.read&&e.nfs),i.yb(1),i.pc("ngIf",n.permissions.cephfs.read&&e.cephfs),i.yb(1),i.pc("ngIf",n.permissions.rgw.read&&e.rgw)}}function Xb(e,t){if(1&e&&(i.Mc(0,Zb,14,12,"ng-container",23),i.jc(1,"async")),2&e){const e=i.ic();i.pc("ngIf",i.kc(1,1,e.enabledFeature$))}}const eg=function(e){return{active:e}},tg=["*"];let ng=(()=>{class e{constructor(e,t,n,i,r){this.authStorageService=e,this.summaryService=t,this.featureToggles=n,this.telemetryNotificationService=i,this.prometheusAlertService=r,this.notifications=[],this.icons=_n.a,this.isCollapsed=!0,this.showMenuSidebar=!0,this.displayedSubMenu="",this.simplebar={autoHide:!1},this.subs=new Oi.a,this.permissions=this.authStorageService.getPermissions(),this.enabledFeature$=this.featureToggles.get()}get class(){return"top-notification-"+this.notifications.length}ngOnInit(){this.subs.add(this.summaryService.subscribe(e=>{this.summaryData=e})),this.subs.add(this.authStorageService.isPwdDisplayed$.subscribe(e=>{this.showTopNotification("isPwdDisplayed",e)})),this.subs.add(this.telemetryNotificationService.update.subscribe(e=>{this.showTopNotification("telemetryNotificationEnabled",e)}))}ngOnDestroy(){this.subs.unsubscribe()}blockHealthColor(){if(this.summaryData&&this.summaryData.rbd_mirroring){if(this.summaryData.rbd_mirroring.errors>0)return{color:"#d9534f"};if(this.summaryData.rbd_mirroring.warnings>0)return{color:"#f0ad4e"}}}toggleSubMenu(e){this.displayedSubMenu=this.displayedSubMenu===e?"":e}showTopNotification(e,t){if(t)this.notifications.includes(e)||this.notifications.push(e);else{const t=this.notifications.indexOf(e);t>=0&&this.notifications.splice(t,1)}}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Jt.a),i.Mb(Lm.a),i.Mb(Gd.a),i.Mb(Ad),i.Mb(Ml))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-navigation"]],hostVars:2,hostBindings:function(e,t){2&e&&i.Ab(t.class)},ngContentSelectors:tg,decls:28,vars:9,consts:function(){return[[1,"cd-navbar-top"],[1,"navbar","fixed-top","navbar-expand-md","navbar-dark","cd-navbar-brand"],[1,"btn","btn-link","py-0",3,"click"],["aria-hidden","true",1,"fa","fa-bars","fa-2x"],["href","#",1,"navbar-brand","ml-2"],["src","assets/Ceph_Ceph_Logo_with_text_white.svg","alt","Ceph"],["type","button",1,"navbar-toggler",3,"click"],[1,"sr-only"],"Toggle navigation",[1,""],[1,"fa","fa-navicon","fa-lg"],[1,"collapse","navbar-collapse"],[1,"nav","navbar-nav","cd-navbar-utility","my-2","my-md-0"],[4,"ngTemplateOutlet"],[1,"wrapper"],["id","sidebar",3,"ngClass"],[3,"options"],[1,"list-unstyled","components","cd-navbar-primary"],["id","content",3,"ngClass"],["cd_utilities",""],["cd_menu",""],[1,"nav-item"],[1,"cd-navbar"],[4,"ngIf"],["routerLinkActive","active",1,"nav-item","tc_menuitem_dashboard"],["routerLink","/dashboard",1,"nav-link"],"Dashboard",[3,"ngClass","ngStyle"],["routerLinkActive","active","class","nav-item tc_menuitem_cluster",4,"ngIf"],["routerLinkActive","active","class","nav-item tc_menuitem_pool",4,"ngIf"],["routerLinkActive","active","class","nav-item tc_menuitem_block",4,"ngIf"],["routerLinkActive","active","class","nav-item tc_menuitem_nfs",4,"ngIf"],["routerLinkActive","active","class","nav-item tc_menuitem_cephfs",4,"ngIf"],["routerLinkActive","active","class","nav-item tc_menuitem_rgw",4,"ngIf"],["routerLinkActive","active",1,"nav-item","tc_menuitem_cluster"],["aria-controls","collapseBasic",1,"nav-link","dropdown-toggle",3,"click"],"Cluster",[1,"list-unstyled",3,"ngbCollapse"],["routerLinkActive","active","class","tc_submenuitem tc_submenuitem_hosts",4,"ngIf"],["routerLinkActive","active","class","tc_submenuitem tc_submenuitem_cluster_inventory",4,"ngIf"],["routerLinkActive","active","class","tc_submenuitem tc_submenuitem_cluster_monitor",4,"ngIf"],["routerLinkActive","active","class","tc_submenuitem tc_submenuitem_cluster_services",4,"ngIf"],["routerLinkActive","active","class","tc_submenuitem tc_submenuitem_osds",4,"ngIf"],["routerLinkActive","active","class","tc_submenuitem tc_submenuitem_configuration",4,"ngIf"],["routerLinkActive","active","class","tc_submenuitem tc_submenuitem_crush",4,"ngIf"],["routerLinkActive","active","class","tc_submenuitem tc_submenuitem_modules",4,"ngIf"],["routerLinkActive","active","class","tc_submenuitem tc_submenuitem_log",4,"ngIf"],["routerLinkActive","active","class","tc_submenuitem tc_submenuitem_monitoring",4,"ngIf"],["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_hosts"],["routerLink","/hosts"],"Hosts",["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_cluster_inventory"],["routerLink","/inventory"],"Inventory",["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_cluster_monitor"],["routerLink","/monitor/"],"Monitors",["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_cluster_services"],["routerLink","/services/"],"Services",["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_osds"],["routerLink","/osd"],"OSDs",["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_configuration"],["routerLink","/configuration"],"Configuration",["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_crush"],["routerLink","/crush-map"],"CRUSH map",["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_modules"],["routerLink","/mgr-modules"],"Manager Modules",["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_log"],["routerLink","/logs"],"Logs",["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_monitoring"],["routerLink","/monitoring"],"Monitoring",["class","badge badge-danger",4,"ngIf"],[1,"badge","badge-danger"],["routerLinkActive","active",1,"nav-item","tc_menuitem_pool"],["routerLink","/pool",1,"nav-link"],"Pools",["routerLinkActive","active",1,"nav-item","tc_menuitem_block"],["aria-controls","collapseBasic",1,"nav-link","dropdown-toggle",3,"ngStyle","click"],"Block",["routerLinkActive","active","class","tc_submenuitem tc_submenuitem_block_images",4,"ngIf"],["routerLinkActive","active","class","tc_submenuitem tc_submenuitem_block_mirroring",4,"ngIf"],["routerLinkActive","active","class","tc_submenuitem tc_submenuitem_block_iscsi",4,"ngIf"],["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_block_images"],["routerLink","/block/rbd"],"Images",["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_block_mirroring"],["routerLink","/block/mirroring"],"Mirroring",["class","badge badge-warning",4,"ngIf"],[1,"badge","badge-warning"],["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_block_iscsi"],["routerLink","/block/iscsi"],"iSCSI",["routerLinkActive","active",1,"nav-item","tc_menuitem_nfs"],["routerLink","/nfs",1,"nav-link"],"NFS",["routerLinkActive","active",1,"nav-item","tc_menuitem_cephfs"],["routerLink","/cephfs",1,"nav-link"],"Filesystems",["routerLinkActive","active",1,"nav-item","tc_menuitem_rgw"],"Object Gateway",["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_rgw_daemons"],["routerLink","/rgw/daemon"],"Daemons",["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_rgw_users"],["routerLink","/rgw/user"],"Users",["routerLinkActive","active",1,"tc_submenuitem","tc_submenuitem_rgw_buckets"],["routerLink","/rgw/bucket"],"Buckets"]},template:function(e,t){if(1&e&&(i.oc(),i.Nb(0,"cd-pwd-expiration-notification"),i.Nb(1,"cd-telemetry-notification"),i.Nb(2,"cd-notifications-sidebar"),i.Sb(3,"div",0),i.Sb(4,"nav",1),i.Sb(5,"button",2),i.gc("click",(function(){return t.showMenuSidebar=!t.showMenuSidebar})),i.Nb(6,"i",3),i.Rb(),i.Sb(7,"a",4),i.Nb(8,"img",5),i.Rb(),i.Sb(9,"button",6),i.gc("click",(function(){return t.isCollapsed=!t.isCollapsed})),i.Sb(10,"span",7),i.Wb(11,8),i.Rb(),i.Sb(12,"span",9),i.Nb(13,"i",10),i.Rb(),i.Rb(),i.Sb(14,"div",11),i.Sb(15,"ul",12),i.Mc(16,Db,1,0,"ng-container",13),i.Rb(),i.Rb(),i.Rb(),i.Rb(),i.Sb(17,"div",14),i.Sb(18,"nav",15),i.Sb(19,"ngx-simplebar",16),i.Sb(20,"ul",17),i.Mc(21,Tb,1,0,"ng-container",13),i.Rb(),i.Rb(),i.Rb(),i.Sb(22,"div",18),i.nc(23),i.Rb(),i.Rb(),i.Mc(24,Cb,10,0,"ng-template",null,19,i.Nc),i.Mc(26,Xb,2,3,"ng-template",null,20,i.Nc)),2&e){const e=i.Ac(25),n=i.Ac(27);i.yb(16),i.pc("ngTemplateOutlet",e),i.yb(2),i.pc("ngClass",i.uc(5,eg,!t.showMenuSidebar)),i.yb(1),i.pc("options",t.simplebar),i.yb(2),i.pc("ngTemplateOutlet",n),i.yb(1),i.pc("ngClass",i.uc(7,eg,!t.showMenuSidebar))}},directives:[jm,Ym,ab,Qt.v,On.a,wt.w,wt.p,Bm.a,Tm,db,gb,Sb,xb,wt.r,Pt.g,Pt.h,wt.s,Qt.e],pipes:[wt.b,dh],styles:['@charset "UTF-8"; cd-navigation .cd-navbar-top .cd-navbar-brand{background:#374249;border-top:4px solid #2b99a8} cd-navigation .cd-navbar-top .cd-navbar-brand.isPwdDisplayed{top:37.6px} cd-navigation .cd-navbar-top .cd-navbar-brand .navbar-brand, cd-navigation .cd-navbar-top .cd-navbar-brand .navbar-brand:hover{color:#e9ecef;height:auto;padding:0} cd-navigation .cd-navbar-top .cd-navbar-brand .navbar-brand>img{height:25px} cd-navigation .cd-navbar-top .cd-navbar-brand .navbar-toggler{border:0} cd-navigation .cd-navbar-top .cd-navbar-brand .navbar-toggler:focus, cd-navigation .cd-navbar-top .cd-navbar-brand .navbar-toggler:hover{outline:0} cd-navigation .cd-navbar-top .cd-navbar-brand .navbar-toggler .fa-navicon{color:#e9ecef} cd-navigation .cd-navbar-top .cd-navbar-brand .navbar-collapse{padding:0} cd-navigation .cd-navbar-top .cd-navbar-brand .cd-navbar-utility>.active>a{background-color:#2b99a8;color:#e9ecef} cd-navigation .cd-navbar-top .cd-navbar-brand .cd-navbar-utility>li>.open>a, cd-navigation .cd-navbar-top .cd-navbar-brand .cd-navbar-utility>li>.open>a:focus, cd-navigation .cd-navbar-top .cd-navbar-brand .cd-navbar-utility>li>.open>a:hover{background-color:initial;border-color:transparent;color:#e9ecef} cd-navigation .cd-navbar-top .navbar-nav>li>.cd-navbar>[ngbDropdown]>a, cd-navigation .cd-navbar-top .navbar-nav>li>.cd-navbar>a, cd-navigation .cd-navbar-top .navbar-nav>li>a{color:#e9ecef;display:block;line-height:1;padding:13.5px 18px!important;position:relative;text-decoration:none} cd-navigation .cd-navbar-top .navbar-nav .nav-link, cd-navigation .cd-navbar-top .navbar-nav .nav-link:hover{color:#e9ecef} cd-navigation .cd-navbar-top .navbar-nav>li:hover, cd-navigation .cd-navbar-top .navbar-nav>li>.cd-navbar>[ngbDropdown].open>a, cd-navigation .cd-navbar-top .navbar-nav>li>.cd-navbar>[ngbDropdown]>a:hover, cd-navigation .cd-navbar-top .navbar-nav>li>.cd-navbar>a:hover, cd-navigation .cd-navbar-top .navbar-nav>li>a:hover{background-color:#2b99a8} cd-navigation .cd-navbar-top .navbar-nav>.open>.cd-navbar>[ngbDropdown]>a, cd-navigation .cd-navbar-top .navbar-nav>.open>.cd-navbar>[ngbDropdown]>a:hover, cd-navigation .cd-navbar-top .navbar-nav>.open>.cd-navbar>a, cd-navigation .cd-navbar-top .navbar-nav>.open>.cd-navbar>a:focus, cd-navigation .cd-navbar-top .navbar-nav>.open>.cd-navbar>a:hover, cd-navigation .cd-navbar-top .navbar-nav>.open>.cd-navbar>li>a:focus, cd-navigation .cd-navbar-top .navbar-nav>.open>a, cd-navigation .cd-navbar-top .navbar-nav>.open>a:focus, cd-navigation .cd-navbar-top .navbar-nav>.open>a:hover{background-color:initial;border-color:transparent;color:#e9ecef}@media (min-width:768px){ cd-navigation .cd-navbar-top .cd-navbar-utility{border-bottom:0;font-size:1.1rem;position:absolute;right:0;top:0}}@media (max-width:calc(768px - 1px)){ cd-navigation .cd-navbar-top .navbar-nav{margin:0} cd-navigation .cd-navbar-top .navbar-nav .fa{margin-right:.5em} cd-navigation .cd-navbar-top .navbar-nav .open .dropdown-menu{background-color:#2b99a8;border:0;padding-bottom:0;padding-top:0} cd-navigation .cd-navbar-top .navbar-nav .open .dropdown-menu>li>a{color:#e9ecef;padding:5px 15px 5px 35px} cd-navigation .cd-navbar-top .navbar-nav .open .dropdown-menu>.active>a, cd-navigation .cd-navbar-top .navbar-nav>li>a:hover{background-color:#2b99a8}}.cd-navbar-primary[_ngcontent-%COMP%] .active[_ngcontent-%COMP%] > a[_ngcontent-%COMP%], .cd-navbar-primary[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]:focus, .cd-navbar-primary[_ngcontent-%COMP%] > .active[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]:hover{background-color:#2b99a8!important;border:0!important;color:#e9ecef!important}.wrapper[_ngcontent-%COMP%]{display:flex;width:100%}.wrapper[_ngcontent-%COMP%] #sidebar[_ngcontent-%COMP%]{background:#374249;bottom:0;color:#fff;left:0;overflow-y:auto;position:fixed;top:43px;transition:all .3s;width:200px;z-index:999}.wrapper[_ngcontent-%COMP%] #sidebar.active[_ngcontent-%COMP%]{margin-left:-200px}.wrapper[_ngcontent-%COMP%] #sidebar[_ngcontent-%COMP%] ul.component[_ngcontent-%COMP%]{margin:0;padding:20px 0}.wrapper[_ngcontent-%COMP%] #sidebar[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#fff;padding:10px}.wrapper[_ngcontent-%COMP%] #sidebar[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#fff;display:block;font-size:1.1em;padding:10px 10px 10px 27px;text-decoration:none}.wrapper[_ngcontent-%COMP%] #sidebar[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{background:#2b99a8;color:#fff}.wrapper[_ngcontent-%COMP%] #sidebar[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] a[_ngcontent-%COMP%] > .badge[_ngcontent-%COMP%]{margin-left:5px}.wrapper[_ngcontent-%COMP%] #sidebar[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li.active[_ngcontent-%COMP%] > a[_ngcontent-%COMP%], .wrapper[_ngcontent-%COMP%] #sidebar[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] > a[_ngcontent-%COMP%] a[aria-expanded=true][_ngcontent-%COMP%]{color:#fff}.wrapper[_ngcontent-%COMP%] a.dropdown-toggle[_ngcontent-%COMP%]{position:relative}.wrapper[_ngcontent-%COMP%] a.dropdown-toggle[_ngcontent-%COMP%]:after{border:0;content:"\uf054";font-family:ForkAwesome;font-size:1rem;position:absolute;right:20px;transition:transform .3s ease-in-out}.wrapper[_ngcontent-%COMP%] a.dropdown-toggle[aria-expanded=true][_ngcontent-%COMP%]:after{transform:rotate(90deg)}.wrapper[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{background:#4d5c66;font-size:.9em!important;padding-left:40px!important}.wrapper[_ngcontent-%COMP%] .cd-navbar-primary[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:focus{outline:none}.wrapper[_ngcontent-%COMP%] ngx-simplebar[_ngcontent-%COMP%]{height:100%}#content[_ngcontent-%COMP%]{bottom:0;position:absolute;right:0;top:43px;transition:all .3s;width:calc(100% - 200px)}#content.active[_ngcontent-%COMP%]{width:100vw}.top-notification-1[_nghost-%COMP%] .cd-navbar-top[_ngcontent-%COMP%] .cd-navbar-brand[_ngcontent-%COMP%]{top:37.6px}.top-notification-1[_nghost-%COMP%] #content[_ngcontent-%COMP%], .top-notification-1[_nghost-%COMP%] #sidebar[_ngcontent-%COMP%]{top:80.6px}.top-notification-1[_nghost-%COMP%] cd-notifications-sidebar[_ngcontent-%COMP%]{top:90.6px}.top-notification-2[_nghost-%COMP%] .cd-navbar-top[_ngcontent-%COMP%] .cd-navbar-brand[_ngcontent-%COMP%]{top:75.2px}.top-notification-2[_nghost-%COMP%] #content[_ngcontent-%COMP%], .top-notification-2[_nghost-%COMP%] #sidebar[_ngcontent-%COMP%]{top:118.2px}.top-notification-2[_nghost-%COMP%] cd-notifications-sidebar[_ngcontent-%COMP%]{top:128.2px}']}),e})();var ig=n("5yfJ"),rg=n("9xzX");function sg(e,t){if(1&e){const e=i.Tb();i.Qb(0),i.Sb(1,"button",9),i.gc("click",(function(){i.Dc(e);const n=t.$implicit;return i.ic(3).onDaemonSelection(n)})),i.Oc(2),i.Rb(),i.Pb()}if(2&e){const e=t.$implicit;i.yb(2),i.Rc(" ",e.id," ( ",e.zonegroup_name," ) ")}}function og(e,t){if(1&e&&(i.Qb(0),i.Sb(1,"div",1),i.Sb(2,"span",2),i.Wb(3,3),i.Rb(),i.Sb(4,"div",4),i.Sb(5,"button",5),i.Yb(6,6),i.Oc(7),i.Rb(),i.Sb(8,"div",7),i.Mc(9,sg,3,2,"ng-container",8),i.Rb(),i.Rb(),i.Rb(),i.Pb()),2&e){const e=i.ic().ngIf;i.yb(7),i.Rc(" ",e.selectedDaemon.id," ( ",e.selectedDaemon.zonegroup_name," ) "),i.yb(2),i.pc("ngForOf",e.daemons)}}function ag(e,t){if(1&e&&(i.Qb(0),i.Mc(1,og,10,3,"ng-container",0),i.Pb()),2&e){const e=t.ngIf,n=i.ic();i.yb(1),i.pc("ngIf",e.ftMap&&e.ftMap.rgw&&n.permissions.rgw.read&&n.isRgwRoute&&e.daemons.length>1)}}const cg=function(e,t,n){return{ftMap:e,daemons:t,selectedDaemon:n}};let lg=(()=>{class e{constructor(e,t,n,i,r){this.authStorageService=e,this.featureToggles=t,this.router=n,this.timerService=i,this.rgwDaemonService=r,this.REFRESH_INTERVAL=5e3,this.subs=new Oi.a,this.rgwUrlPrefix="/rgw",this.isRgwRoute=document.location.href.includes(this.rgwUrlPrefix)}ngOnInit(){this.permissions=this.authStorageService.getPermissions(),this.featureToggleMap$=this.featureToggles.get(),this.subs.add(this.router.events.pipe(Object(Ql.a)(e=>e instanceof Pt.b)).subscribe(()=>this.isRgwRoute=this.router.url.includes(this.rgwUrlPrefix))),this.subs.add(this.timerService.get(()=>this.isRgwRoute?this.rgwDaemonService.list():ig.a,this.REFRESH_INTERVAL).subscribe())}ngOnDestroy(){this.subs.unsubscribe()}onDaemonSelection(e){this.rgwDaemonService.selectDaemon(e),this.reloadData()}reloadData(){const e=this.router.url;this.router.navigateByUrl(this.rgwUrlPrefix,{skipLocationChange:!0}).finally(()=>{this.router.navigate([e])})}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Jt.a),i.Mb(Gd.a),i.Mb(Pt.e),i.Mb(Ri.a),i.Mb(rg.a))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-context"]],decls:4,vars:11,consts:function(){return[[4,"ngIf"],[1,"cd-context-bar","pt-3","pb-3"],[1,"mr-1"],"Selected Object Gateway:",["ngbDropdown","","placement","bottom-left",1,"d-inline-block","ml-2"],["ngbDropdownToggle","",1,"btn","btn-outline-info","ctx-bar-selected-rgw-daemon",6,"title"],["title","Select Object Gateway"],["ngbDropdownMenu",""],[4,"ngFor","ngForOf"],["ngbDropdownItem","",1,"ctx-bar-available-rgw-daemon",3,"click"]]},template:function(e,t){1&e&&(i.Mc(0,ag,2,1,"ng-container",0),i.jc(1,"async"),i.jc(2,"async"),i.jc(3,"async")),2&e&&i.pc("ngIf",i.wc(7,cg,i.kc(1,1,t.featureToggleMap$),i.kc(2,3,t.rgwDaemonService.daemons$),i.kc(3,5,t.rgwDaemonService.selectedDaemon$)))},directives:[wt.r,Qt.i,On.a,Qt.m,Qt.k,wt.q,Qt.j],pipes:[wt.b],styles:[".cd-context-bar[_ngcontent-%COMP%]{border-bottom:1px solid #dee2e6}"]}),e})();var ug=n("GyhO"),dg=n("Cfvw"),hg=n("zx2A");class fg{constructor(e,t){this.keySelector=e,this.flushes=t}call(e,t){return t.subscribe(new pg(e,this.keySelector,this.flushes))}}class pg extends hg.b{constructor(e,t,n){super(e),this.keySelector=t,this.values=new Set,n&&this.add(Object(hg.c)(n,new hg.a(this)))}notifyNext(){this.values.clear()}notifyError(e){this._error(e)}_next(e){this.keySelector?this._useKeySelector(e):this._finalizeNext(e,e)}_useKeySelector(e){let t;const{destination:n}=this;try{t=this.keySelector(e)}catch(i){return void n.error(i)}this._finalizeNext(t,e)}_finalizeNext(e,t){const{values:n}=this;n.has(e)||(n.add(e),this.destination.next(t))}}var mg=n("SxV6");class bg{resolve(e){const t=e.routeConfig.data,n=null===t.path?null:this.getFullPath(e),i=[{text:"string"==typeof t.breadcrumbs?t.breadcrumbs:t.breadcrumbs.text||t.text||n,path:n}];return Object(Wi.a)(i)}getFullPath(e){return(e=>e.reduce((e,t)=>e+t.url.reduce((e,t)=>e+"/"+t.path,""),""))(e.pathFromRoot)}}function gg(e,t){if(1&e&&(i.Sb(0,"a",6),i.Oc(1),i.Rb()),2&e){const e=i.ic().$implicit;i.pc("routerLink",e.path),i.yb(1),i.Pc(e.text)}}function _g(e,t){if(1&e&&(i.Sb(0,"span"),i.Oc(1),i.Rb()),2&e){const e=i.ic().$implicit;i.yb(1),i.Pc(e.text)}}const yg=function(e){return{active:e}};function vg(e,t){if(1&e&&(i.Sb(0,"li",3),i.Mc(1,gg,2,2,"a",4),i.Mc(2,_g,2,1,"span",5),i.Rb()),2&e){const e=t.$implicit,n=t.last,r=i.ic(2);i.pc("ngClass",i.uc(3,yg,n&&r.finished)),i.yb(1),i.pc("ngIf",!n&&null!==e.path),i.yb(1),i.pc("ngIf",n||null===e.path)}}function wg(e,t){if(1&e&&(i.Sb(0,"ol",1),i.Mc(1,vg,3,5,"li",2),i.Rb()),2&e){const e=i.ic();i.yb(1),i.pc("ngForOf",e.crumbs)}}let Sg=(()=>{class e{constructor(e,t){this.router=e,this.injector=t,this.crumbs=[],this.finished=!1,this.defaultResolver=new bg,this.subscription=this.router.events.pipe(Object(Ql.a)(e=>e instanceof Pt.c)).subscribe(()=>{this.finished=!1}),this.subscription=this.router.events.pipe(Object(Ql.a)(e=>e instanceof Pt.b)).subscribe(()=>{var t;this._resolveCrumbs(e.routerState.snapshot.root).pipe(Object(Ki.a)(e=>e),(t=e=>e.text,e=>e.lift(new fg(t,void 0))),Qi(),Object(Ki.a)(e=>{const t=this.postProcess(e);return this.wrapIntoObservable(t).pipe(Object(mg.a)())})).subscribe(e=>{this.finished=!0,this.crumbs=e})})}ngOnDestroy(){this.subscription.unsubscribe()}_resolveCrumbs(e){let t;const n=e.routeConfig&&e.routeConfig.data;if(n&&n.breadcrumbs){let i;i=n.breadcrumbs.prototype instanceof bg?this.injector.get(n.breadcrumbs):this.defaultResolver;const r=i.resolve(e);t=this.wrapIntoObservable(r).pipe(Object(mg.a)())}else t=Object(Wi.a)([]);return e.firstChild&&(t=Object(ug.a)(t,this._resolveCrumbs(e.firstChild))),t}postProcess(e){const t=[];return e.forEach(e=>{const n=e.text.split("/");if(n.length>1){e.text=n[n.length-1];for(let e=0;e<n.length-1;e++)t.push({text:n[e],path:null})}t.push(e)}),t}isPromise(e){return e&&"function"==typeof e.then}wrapIntoObservable(e){return e instanceof xu.a?e:this.isPromise(e)?Object(dg.a)(Promise.resolve(e)):Object(Wi.a)(e)}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Pt.e),i.Mb(i.s))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-breadcrumbs"]],decls:1,vars:1,consts:[["class","breadcrumb",4,"ngIf"],[1,"breadcrumb"],["class","breadcrumb-item",3,"ngClass",4,"ngFor","ngForOf"],[1,"breadcrumb-item",3,"ngClass"],["preserveFragment","",3,"routerLink",4,"ngIf"],[4,"ngIf"],["preserveFragment","",3,"routerLink"]],template:function(e,t){1&e&&i.Mc(0,wg,2,1,"ol",0),2&e&&i.pc("ngIf",t.crumbs.length)},directives:[wt.r,wt.q,wt.p,Pt.h],styles:['@charset "UTF-8";.breadcrumb[_ngcontent-%COMP%]{background-color:initial;border-radius:0;margin-top:8px;padding:8px 0}.breadcrumb[_ngcontent-%COMP%] > li[_ngcontent-%COMP%] + li[_ngcontent-%COMP%]:before{content:"\uf101";font-family:ForkAwesome;padding:0 5px 0 7px}']}),e})();const Mg=function(e){return{dashboard:e}};let kg=(()=>{class e{constructor(e,t,n,i){this.router=e,this.summaryService=t,this.taskManagerService=n,this.faviconService=i,this.subs=new Oi.a}ngOnInit(){this.subs.add(this.summaryService.startPolling()),this.subs.add(this.taskManagerService.init(this.summaryService)),this.faviconService.init()}ngOnDestroy(){this.subs.unsubscribe()}isDashboardPage(){return"/dashboard"===this.router.url}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Pt.e),i.Mb(Lm.a),i.Mb(Em.a),i.Mb(Rm))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-workbench-layout"]],features:[i.xb([Rm])],decls:6,vars:3,consts:[[1,"container-fluid","h-100",3,"ngClass"]],template:function(e,t){1&e&&(i.Sb(0,"block-ui"),i.Sb(1,"cd-navigation"),i.Sb(2,"div",0),i.Nb(3,"cd-context"),i.Nb(4,"cd-breadcrumbs"),i.Nb(5,"router-outlet"),i.Rb(),i.Rb(),i.Rb()),2&e&&(i.yb(2),i.pc("ngClass",i.uc(1,Mg,t.isDashboardPage())))},directives:[na,ng,wt.p,lg,Sg,Pt.j],styles:[".dashboard[_ngcontent-%COMP%]{background-color:#e9ecef;margin:0;padding:0}.container-fluid[_ngcontent-%COMP%]{overflow:auto}"]}),e})();var xg=n("Avrn");let Dg=(()=>{class e{constructor(e,t){this.router=e,this.authStorageService=t}canActivate(){return!(this.authStorageService.isLoggedIn()&&!this.authStorageService.isSSO()&&this.authStorageService.getPwdUpdateRequired()&&(this.router.navigate(["/login-change-password"]),1))}canActivateChild(){return this.canActivate()}}return e.\u0275fac=function(t){return new(t||e)(i.dc(Pt.e),i.dc(Jt.a))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})();var Tg=n("Vhfg"),Cg=n("JIr8");let Og=(()=>{class e{constructor(e,t){this.http=e,this.router=t}canActivate(e){return this.doCheck(e)}canActivateChild(e){return this.doCheck(e)}doCheck(t){if(t.url.length>0&&e.ALLOWLIST.includes(t.url[0].path))return Object(Wi.a)(!0);const n=t.data.moduleStatusGuardConfig;return this.http.get(`api/${n.apiPath}/status`).pipe(Object(Vi.a)(e=>(e.available||this.router.navigate([n.redirectTo||""],{state:{header:n.header,message:e.message,section:n.section,section_info:n.section_info,icon:_n.a.wrench}}),e.available)),Object(Cg.a)(()=>(this.router.navigate([n.redirectTo]),Object(Wi.a)(!1))))}}return e.ALLOWLIST=["501"],e.\u0275fac=function(t){return new(t||e)(i.dc(o.b),i.dc(Pt.e))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),Lg=(()=>{class e{constructor(e){this.authStorageService=e}canActivate(){if(!this.authStorageService.isSSO())return!0;throw new Fl.c}canActivateChild(){return this.canActivate()}}return e.\u0275fac=function(t){return new(t||e)(i.dc(Jt.a))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),Rg=(()=>{class e extends bg{resolve(e){const t=[],n=e.queryParams.fromLink||null;let i="";switch(n){case"/monitor":i="Monitors";break;case"/hosts":i="Hosts"}return t.push({text:"Cluster",path:null}),t.push({text:i,path:n}),t.push({text:"Performance Counters",path:""}),t}}return e.\u0275fac=function(t){return Eg(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})();const Eg=i.Ub(Rg);let Ag=(()=>{class e extends bg{resolve(e){const t=e.params.name;return[{text:jt.a.startCase(t)+"/Edit",path:t}]}}return e.\u0275fac=function(t){return Ig(t||e)},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})();const Ig=i.Ub(Ag),Pg=[{path:"",redirectTo:"dashboard",pathMatch:"full"},{path:"",component:kg,canActivate:[xg.a,Dg],canActivateChild:[xg.a,Dg],children:[{path:"dashboard",component:nf},{path:"error",component:Sm},{path:"hosts",data:{breadcrumbs:"Cluster/Hosts"},children:[{path:"",component:Us},{path:gn.e.CREATE,component:ar,data:{breadcrumbs:gn.a.CREATE}}]},{path:"monitor",component:ga,data:{breadcrumbs:"Cluster/Monitors"}},{path:"services",canActivateChild:[Og],data:{moduleStatusGuardConfig:{apiPath:"orchestrator",redirectTo:"error",section:"orch",section_info:"Orchestrator",header:"Orchestrator is not available"},breadcrumbs:"Cluster/Services"},children:[{path:"",component:Rd},{path:gn.e.CREATE,component:Md,data:{breadcrumbs:gn.a.CREATE}}]},{path:"inventory",canActivate:[Og],component:jr,data:{moduleStatusGuardConfig:{apiPath:"orchestrator",redirectTo:"error",section:"orch",section_info:"Orchestrator",header:"Orchestrator is not available"},breadcrumbs:"Cluster/Inventory"}},{path:"osd",data:{breadcrumbs:"Cluster/OSDs"},children:[{path:"",component:_l},{path:gn.e.CREATE,component:Qa,data:{breadcrumbs:gn.a.CREATE}}]},{path:"configuration",data:{breadcrumbs:"Cluster/Configuration"},children:[{path:"",component:Ci},{path:"edit/:name",component:bi,data:{breadcrumbs:gn.a.EDIT}}]},{path:"crush-map",component:Hi,data:{breadcrumbs:"Cluster/CRUSH map"}},{path:"logs",component:yo,data:{breadcrumbs:"Cluster/Logs"}},{path:"telemetry",component:Yd,data:{breadcrumbs:"Telemetry configuration"}},{path:"monitoring",data:{breadcrumbs:"Cluster/Monitoring"},children:[{path:"",redirectTo:"active-alerts",pathMatch:"full"},{path:"active-alerts",data:{breadcrumbs:"Active Alerts"},component:El},{path:"alerts",data:{breadcrumbs:"Alerts"},component:jl},{path:"silences",data:{breadcrumbs:"Silences"},children:[{path:"",component:Ou},{path:gn.e.CREATE,component:Mu,data:{breadcrumbs:gn.a.CREATE+" Silence"}},{path:gn.e.CREATE+"/:id",component:Mu,data:{breadcrumbs:gn.a.CREATE}},{path:gn.e.EDIT+"/:id",component:Mu,data:{breadcrumbs:gn.a.EDIT}},{path:gn.e.RECREATE+"/:id",component:Mu,data:{breadcrumbs:gn.a.RECREATE}}]}]},{path:"perf_counters/:type/:id",component:Up,data:{breadcrumbs:Rg}},{path:"mgr-modules",data:{breadcrumbs:"Cluster/Manager Modules"},children:[{path:"",component:pa},{path:"edit/:name",component:Vo,data:{breadcrumbs:Ag}}]},{path:"pool",data:{breadcrumbs:"Pools"},loadChildren:()=>Promise.all([n.e(1),n.e(5)]).then(n.bind(null,"5azF")).then(e=>e.RoutedPoolModule)},{path:"block",data:{breadcrumbs:!0,text:"Block",path:null},loadChildren:()=>n.e(1).then(n.bind(null,"k/xb")).then(e=>e.RoutedBlockModule)},{path:"cephfs",component:Bn,canActivate:[Tg.a],data:{breadcrumbs:"Filesystems"}},{path:"rgw",canActivateChild:[Tg.a,Og],data:{moduleStatusGuardConfig:{apiPath:"rgw",redirectTo:"error",section:"rgw",section_info:"Object Gateway",header:"The Object Gateway Service is not configured"},breadcrumbs:!0,text:"Object Gateway",path:null},loadChildren:()=>n.e(6).then(n.bind(null,"OkK6")).then(e=>e.RoutedRgwModule)},{path:"user-management",data:{breadcrumbs:"User management",path:null},loadChildren:()=>Promise.resolve().then(n.bind(null,"LceX")).then(e=>e.RoutedAuthModule)},{path:"user-profile",data:{breadcrumbs:"User profile",path:null},children:[{path:gn.e.EDIT,component:rm,canActivate:[Lg],data:{breadcrumbs:gn.a.EDIT}}]},{path:"nfs",canActivateChild:[Tg.a,Og],data:{moduleStatusGuardConfig:{apiPath:"nfs-ganesha",redirectTo:"error",section:"nfs-ganesha",section_info:"NFS GANESHA",header:"NFS-Ganesha is not configured"},breadcrumbs:"NFS"},children:[{path:"",component:Bp},{path:gn.e.CREATE,component:Ap,data:{breadcrumbs:gn.a.CREATE}},{path:gn.e.EDIT+"/:cluster_id/:export_id",component:Ap,data:{breadcrumbs:gn.a.EDIT}}]}]},{path:"",component:Om,children:[{path:"login",component:gm},{path:"login-change-password",component:hm,canActivate:[Lg]}]},{path:"",component:Mm,children:[{path:"**",redirectTo:"/error"}]}];let Ng=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},providers:[Ag,Rg],imports:[[Pt.i.forRoot(Pg,{useHash:!0,preloadingStrategy:Pt.d})],Pt.i]}),e})(),jg=(()=>{class e{constructor(e,t){e.autoClose="outside",e.container="body",e.placement="bottom",t.container="body"}}return e.\u0275fac=function(t){return new(t||e)(i.Mb(Qt.x),i.Mb(Qt.E))},e.\u0275cmp=i.Gb({type:e,selectors:[["cd-root"]],decls:1,vars:0,template:function(e,t){1&e&&i.Nb(0,"router-outlet")},directives:[Pt.j],styles:[""]}),e})();var Fg=n("PCNd");let Yg=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[wt.c,Fg.a,Ng,sn.b,xn.c,Qt.t]]}),e})();var zg=n("G6Q+"),$g=n("kJI8");let Hg=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[Ng,wt.c,kn.x,Fg.a,Qt.t]]}),e})(),Wg=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[wt.c,zg.a,Qt.t,Fg.a,Pt.i,kn.m,kn.x,Qt.F,Hg,Qt.H,Qt.C,xn.c,$g.a,Qt.h,Qt.y,Qt.l,zr.a]]}),e})(),Vg=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[$g.a,wt.c,Qt.t,Fg.a,sn.b,Pt.i,Qt.y]]}),e})(),Bg=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[kn.x,Pt.i,Fg.a,Qt.t,wt.c,Qt.H,Qt.F]]}),e})(),Ug=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[wt.c,Wg,Vg,zg.a,Yg,Bg,Fg.a]]}),e})();var Gg=n("LceX");let qg=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[wt.c,Gg.AuthModule,Qt.f,Qt.l,Ng,Fg.a,Bm.b,Pt.i]]}),e})(),Jg=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},imports:[[la.forRoot(),wt.c,qg,Qt.l,Pt.i,Fg.a],qg]}),e})();var Qg=n("z6cu");let Kg=(()=>{class e{constructor(e,t,n){this.router=e,this.authStorageService=t,this.notificationService=n}intercept(e,t){const n=e.headers.get("Accept");let i;return i=n&&n.startsWith("application/vnd.ceph.api.v")?e.clone():e.clone({setHeaders:{Accept:"application/vnd.ceph.api.v1.0+json"}}),t.handle(i).pipe(Object(Cg.a)(e=>{if(e instanceof o.d){let t;switch(e.status){case 400:const n=new er.a,i=e.error.task;jt.a.isPlainObject(i)?(i.metadata.component=i.metadata.component||e.error.component,n.name=i.name,n.metadata=i.metadata):n.metadata=e.error,n.success=!1,n.exception=e.error,t=this.notificationService.notifyTask(n);break;case 401:this.authStorageService.remove(),this.router.navigate(["/login"]);break;case 403:this.router.navigate(["error"],{state:{message:"Sorry, you don\u2019t have permission to view this page or resource.",header:"Access Denied",icon:"fa fa-lock",source:"forbidden"}});break;default:t=this.prepareNotification(e)}e.preventDefault=()=>{this.notificationService.cancel(t)},e.ignoreStatusCode=function(e){this.status===e&&this.preventDefault()}}return Object(Qg.a)(e)}))}prepareNotification(e){return this.notificationService.show(()=>{let t="";return jt.a.isPlainObject(e.error)&&jt.a.isString(e.error.detail)?t=e.error.detail:jt.a.isString(e.error)?t=e.error:jt.a.isString(e.message)&&(t=e.message),new wl.b(yn.a.error,`${e.status} - ${e.statusText}`,t,void 0,e.application)})}}return e.\u0275fac=function(t){return new(t||e)(i.dc(Pt.e),i.dc(Jt.a),i.dc(wn.a))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),Zg=(()=>{class e{constructor(e){this.http=e}jsError(e,t,n){return this.http.post("ui-api/logging/js-error",{url:e,message:t,stack:n})}}return e.\u0275fac=function(t){return new(t||e)(i.dc(o.b))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac,providedIn:"root"}),e})(),Xg=(()=>{class e{constructor(e,t){this.injector=e,this.router=t}handleError(e){const t=this.injector.get(Zg),n=window.location.href;if(t.jsError(n,e&&e.message,e&&e.stack).subscribe(),!(e.rejection instanceof Fl.a))throw e;setTimeout(()=>this.router.navigate(["error"],{state:{message:e.rejection.message,header:e.rejection.header,icon:e.rejection.icon}}),50)}}return e.\u0275fac=function(t){return new(t||e)(i.dc(i.s),i.dc(Pt.e))},e.\u0275prov=i.Ib({token:e,factory:e.\u0275fac}),e})(),e_=(()=>{class e{}return e.\u0275mod=i.Kb({type:e,bootstrap:[jg]}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)},providers:[{provide:i.n,useClass:Xg},{provide:o.a,useClass:Kg,multi:!0}],imports:[[o.c,r.a,At,It.a.forRoot({positionClass:"toast-top-right",preventDuplicates:!0,enableHtml:!0}),Ng,Jg,Fg.a,Ug],Fg.a]}),e})();s.a.production&&Object(i.S)(),r.d().bootstrapModule(e_).then(e=>{if(Object(i.U)()){const t=e.injector.get(i.g).components[0];Object(r.c)(t)}}).catch(e=>console.log(e))},zWsK:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return r}));var i=n("8Y7J");let r=(()=>{class e{transform(e,t,n){return n?t.call(n,e):t(e)}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275pipe=i.Lb({name:"pipeFunction",type:e,pure:!0}),e})(),s=(()=>{class e{}return e.\u0275mod=i.Kb({type:e}),e.\u0275inj=i.Jb({factory:function(t){return new(t||e)}}),e})()},zc8c:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var i=n("/NlG"),r=n("XFyV"),s=n("spCT"),o=n("8Y7J");let a=(()=>{class e{constructor(e,t,n){this.templateRef=e,this.viewContainer=t,this.componentFactoryResolver=n}set cdFormLoading(e){let t,n;switch(this.viewContainer.clear(),e){case s.b.Loading:t=this.componentFactoryResolver.resolveComponentFactory(r.a),n=this.resolveNgContent("Loading form data..."),this.viewContainer.createComponent(t,null,null,n);break;case s.b.Ready:this.viewContainer.createEmbeddedView(this.templateRef);break;case s.b.Error:t=this.componentFactoryResolver.resolveComponentFactory(i.a),n=this.resolveNgContent("Form data could not be loaded."),this.viewContainer.createComponent(t,null,null,n).instance.type="error"}}resolveNgContent(e){return[[document.createTextNode(e)]]}}return e.\u0275fac=function(t){return new(t||e)(o.Mb(o.L),o.Mb(o.P),o.Mb(o.j))},e.\u0275dir=o.Hb({type:e,selectors:[["","cdFormLoading",""]],inputs:{cdFormLoading:"cdFormLoading"}}),e})()},zk60:function(e,t,n){var i=n("2oRo"),r=n("kRJp");e.exports=function(e,t){try{r(i,e,t)}catch(n){i[e]=t}return t}},zn8P:function(e,t){function n(e){return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}))}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id="zn8P"},zx2A:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return c}));var i=n("7o/Q"),r=n("HDdC"),s=n("SeVD");class o extends i.a{constructor(e){super(),this.parent=e}_next(e){this.parent.notifyNext(e)}_error(e){this.parent.notifyError(e),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class a extends i.a{notifyNext(e){this.destination.next(e)}notifyError(e){this.destination.error(e)}notifyComplete(){this.destination.complete()}}function c(e,t){if(!t.closed)return e instanceof r.a?e.subscribe(t):Object(s.a)(e)(t)}},zx6S:function(e,t,n){!function(e){"use strict";var t={words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,i){var r=t.words[i];return 1===i.length?n?r[0]:r[1]:e+" "+t.correctGrammaticalCase(e,r)}};e.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_\u010detvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._\u010det._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_\u010de_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[ju\u010de u] LT",lastWeek:function(){return["[pro\u0161le] [nedelje] [u] LT","[pro\u0161log] [ponedeljka] [u] LT","[pro\u0161log] [utorka] [u] LT","[pro\u0161le] [srede] [u] LT","[pro\u0161log] [\u010detvrtka] [u] LT","[pro\u0161log] [petka] [u] LT","[pro\u0161le] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n("wd/R"))}},[[0,0]]]);
\ No newline at end of file
+++ /dev/null
-@charset "UTF-8";.tree-children.tree-children-no-padding{padding-left:0}.tree-children{overflow:hidden}.node-drop-slot{display:block;height:2px}.node-drop-slot.is-dragging-over{background:#dfe;height:20px;border:2px dotted #888}.toggle-children-wrapper-expanded .toggle-children{transform:rotate(90deg)}.toggle-children-wrapper-collapsed .toggle-children{transform:rotate(0)}.toggle-children-wrapper{padding:2px 3px 5px 1px}.toggle-children{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAASCAYAAABSO15qAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABAhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ1dWlkOjY1RTYzOTA2ODZDRjExREJBNkUyRDg4N0NFQUNCNDA3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkYzRkRFQjcxODUzNTExRTU4RTQwRkQwODFEOUZEMEE3IiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkYzRkRFQjcwODUzNTExRTU4RTQwRkQwODFEOUZEMEE3IiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE1IChNYWNpbnRvc2gpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MTk5NzA1OGEtZDI3OC00NDZkLWE4ODgtNGM4MGQ4YWI1NzNmIiBzdFJlZjpkb2N1bWVudElEPSJhZG9iZTpkb2NpZDpwaG90b3Nob3A6YzRkZmQxMGMtY2NlNS0xMTc4LWE5OGQtY2NkZmM5ODk5YWYwIi8+IDxkYzp0aXRsZT4gPHJkZjpBbHQ+IDxyZGY6bGkgeG1sOmxhbmc9IngtZGVmYXVsdCI+Z2x5cGhpY29uczwvcmRmOmxpPiA8L3JkZjpBbHQ+IDwvZGM6dGl0bGU+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+5iogFwAAAGhJREFUeNpiYGBgKABigf///zOQg0EARH4A4gZyDIIZ8B/JoAJKDIDhB0CcQIkBRBtEyABkgxwoMQCGD6AbRKoBGAYxQgXIBRuZGKgAKPIC3QLxArnRSHZCIjspk52ZKMrOFBUoAAEGAKnq593MQAZtAAAAAElFTkSuQmCC");height:8px;width:9px;background-size:contain;background-repeat:no-repeat;background-position:50%}.toggle-children,.toggle-children-placeholder{display:inline-block;position:relative;top:1px}.toggle-children-placeholder{height:10px;width:10px;padding-right:3px}.node-content-wrapper{display:inline-block;padding:2px 5px;border-radius:2px;transition:background-color .15s,box-shadow .15s}.node-wrapper{display:flex;align-items:flex-start}.node-content-wrapper-active,.node-content-wrapper-active.node-content-wrapper-focused,.node-content-wrapper.node-content-wrapper-active:hover{background:#beebff}.node-content-wrapper-focused{background:#e7f4f9}.node-content-wrapper:hover{background:#f7fbff}.node-content-wrapper-active,.node-content-wrapper-focused,.node-content-wrapper:hover{box-shadow:inset 0 0 1px #999}.node-content-wrapper.is-dragging-over{background:#dfe;box-shadow:inset 0 0 1px #999}.node-content-wrapper.is-dragging-over-disabled{opacity:.5}tree-viewport{-webkit-tap-highlight-color:transparent;height:100%;overflow:auto;display:block}.tree-children{padding-left:20px}.empty-tree-drop-slot .node-drop-slot{height:20px;min-width:100px}.angular-tree-component{width:100%;position:relative;display:inline-block;cursor:pointer;-webkit-touch-callout:none;user-select:none}tree-root .angular-tree-component-rtl{direction:rtl}tree-root .angular-tree-component-rtl .toggle-children-wrapper-collapsed .toggle-children{transform:rotate(180deg)!important}tree-root .angular-tree-component-rtl .tree-children{padding-right:20px;padding-left:0}tree-node-checkbox{padding:1px}
-/*!
- * Bootstrap v4.5.2 (https://getbootstrap.com/)
- * Copyright 2011-2020 The Bootstrap Authors
- * Copyright 2011-2020 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
- */:root{--blue:#007bff;--indigo:#6610f2;--purple:#6f42c1;--pink:#a94442;--red:#ef5c55;--orange:#fd7e14;--yellow:#ffc200;--green:#0b0;--teal:#20c997;--cyan:#17a2b8;--white:#fff;--gray:#6c757d;--gray-dark:#343a40;--primary:#2b99a8;--secondary:#374249;--success:#0b0;--info:#2b99a8;--warning:#ffc200;--danger:#ef5c55;--light:#f8f9fa;--dark:#777;--accent:#ef5c55;--warning-dark:#fd7e14;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--breakpoint-2xl:1450px;--font-family-sans-serif:"Helvetica Neue",Helvetica,Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}*,:after,:before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:Helvetica Neue,Helvetica,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:initial;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;text-decoration:underline dotted;cursor:help;border-bottom:0;text-decoration-skip-ink:none}address{font-style:normal;line-height:inherit}address,dl,ol,ul{margin-bottom:1rem}dl,ol,ul{margin-top:0}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}a{color:#2b99a8;text-decoration:none;background-color:initial}a:hover{color:#1b626b;text-decoration:underline}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{border-style:none}img,svg{vertical-align:middle}svg{overflow:hidden}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:initial}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:2.5rem}.h2,h2{font-size:2rem}.h3,h3{font-size:1.75rem}.h4,h4{font-size:1.5rem}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:6rem}.display-1,.display-2{font-weight:300;line-height:1.2}.display-2{font-size:5.5rem}.display-3{font-size:4.5rem}.display-3,.display-4{font-weight:300;line-height:1.2}.display-4{font-size:3.5rem}hr{margin-top:1rem;margin-bottom:1rem;border:0;border-top:1px solid rgba(0,0,0,.1)}.small,small{font-size:80%;font-weight:400}.mark,mark{padding:.2em;background-color:#fcf8e3}.list-inline,.list-unstyled{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:90%;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote-footer{display:block;font-size:80%;color:#6c757d}.blockquote-footer:before{content:"— "}.img-fluid,.img-thumbnail{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:#fff;border:1px solid #dee2e6;border-radius:.25rem}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:90%;color:#6c757d}code{font-size:87.5%;color:#a94442;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:87.5%;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:100%;font-weight:700}pre{display:block;font-size:87.5%;color:#212529}pre code{font-size:inherit;color:inherit;word-break:normal}.pre-scrollable{max-height:340px;overflow-y:scroll}.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:576px){.container,.container-sm{max-width:540px}}@media (min-width:768px){.container,.container-md,.container-sm{max-width:720px}}@media (min-width:992px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media (min-width:1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1140px}}.row,cd-about dl{display:flex;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}.no-gutters{margin-right:0;margin-left:0}.no-gutters>.col,.no-gutters>[class*=col-]{padding-right:0;padding-left:0}.cd-col-form,.cd-col-form-input,.cd-col-form-label,.cd-col-form-offset,.col,.col-1,.col-2,.col-2xl,.col-2xl-1,.col-2xl-2,.col-2xl-3,.col-2xl-4,.col-2xl-5,.col-2xl-6,.col-2xl-7,.col-2xl-8,.col-2xl-9,.col-2xl-10,.col-2xl-11,.col-2xl-12,.col-2xl-auto,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-10,.col-11,.col-12,.col-auto,.col-lg,.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-auto,.col-md,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-md-auto,.col-sm,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-auto,.col-xl,.col-xl-1,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-auto,cd-about dd,cd-about dt,cd-health cd-info-card,cd-health cd-info-card.cd-capacity-card,cd-health cd-info-card.cd-chart-card,cd-health cd-info-card.cd-performance-card,cd-health cd-info-card.cd-status-card,cd-modal .cd-col-form-input,cd-modal .cd-col-form-label,cd-modal .cd-col-form-offset{position:relative;width:100%;padding-right:15px;padding-left:15px}.col{flex-basis:0;flex-grow:1;max-width:100%}.row-cols-1>*{flex:0 0 100%;max-width:100%}.row-cols-2>*{flex:0 0 50%;max-width:50%}.row-cols-3>*{flex:0 0 33.3333333333%;max-width:33.3333333333%}.row-cols-4>*{flex:0 0 25%;max-width:25%}.row-cols-5>*{flex:0 0 20%;max-width:20%}.row-cols-6>*{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-auto{flex:0 0 auto;width:auto;max-width:100%}.col-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-3{flex:0 0 25%;max-width:25%}.col-4,cd-about dt{flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.col-6{flex:0 0 50%;max-width:50%}.col-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.col-8,cd-about dd{flex:0 0 66.6666666667%;max-width:66.6666666667%}.col-9{flex:0 0 75%;max-width:75%}.col-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.cd-col-form,.col-12,cd-health cd-info-card{flex:0 0 100%;max-width:100%}.order-first{order:-1}.order-last{order:13}.order-0{order:0}.order-1{order:1}.order-2{order:2}.order-3{order:3}.order-4{order:4}.order-5{order:5}.order-6{order:6}.order-7{order:7}.order-8{order:8}.order-9{order:9}.order-10{order:10}.order-11{order:11}.order-12{order:12}.offset-1{margin-left:8.3333333333%}.offset-2{margin-left:16.6666666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.3333333333%}.offset-5{margin-left:41.6666666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.3333333333%}.offset-8{margin-left:66.6666666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.3333333333%}.offset-11{margin-left:91.6666666667%}@media (min-width:576px){.col-sm{flex-basis:0;flex-grow:1;max-width:100%}.row-cols-sm-1>*{flex:0 0 100%;max-width:100%}.row-cols-sm-2>*{flex:0 0 50%;max-width:50%}.row-cols-sm-3>*{flex:0 0 33.3333333333%;max-width:33.3333333333%}.row-cols-sm-4>*{flex:0 0 25%;max-width:25%}.row-cols-sm-5>*{flex:0 0 20%;max-width:20%}.row-cols-sm-6>*{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-sm-auto{flex:0 0 auto;width:auto;max-width:100%}.col-sm-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-sm-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-sm-3{flex:0 0 25%;max-width:25%}.cd-col-form-label,.col-sm-4{flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-sm-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.col-sm-6{flex:0 0 50%;max-width:50%}.col-sm-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.cd-col-form-input,.cd-col-form-offset,.col-sm-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.col-sm-9{flex:0 0 75%;max-width:75%}.col-sm-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-sm-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.col-sm-12,cd-health cd-info-card{flex:0 0 100%;max-width:100%}.order-sm-first{order:-1}.order-sm-last{order:13}.order-sm-0{order:0}.order-sm-1{order:1}.order-sm-2{order:2}.order-sm-3{order:3}.order-sm-4{order:4}.order-sm-5{order:5}.order-sm-6{order:6}.order-sm-7{order:7}.order-sm-8{order:8}.order-sm-9{order:9}.order-sm-10{order:10}.order-sm-11{order:11}.order-sm-12{order:12}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.3333333333%}.offset-sm-2{margin-left:16.6666666667%}.offset-sm-3{margin-left:25%}.cd-col-form-offset,.offset-sm-4{margin-left:33.3333333333%}.offset-sm-5{margin-left:41.6666666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.3333333333%}.offset-sm-8{margin-left:66.6666666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.3333333333%}.offset-sm-11{margin-left:91.6666666667%}}@media (min-width:768px){.col-md{flex-basis:0;flex-grow:1;max-width:100%}.row-cols-md-1>*{flex:0 0 100%;max-width:100%}.row-cols-md-2>*{flex:0 0 50%;max-width:50%}.row-cols-md-3>*{flex:0 0 33.3333333333%;max-width:33.3333333333%}.row-cols-md-4>*{flex:0 0 25%;max-width:25%}.row-cols-md-5>*{flex:0 0 20%;max-width:20%}.row-cols-md-6>*{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-md-auto{flex:0 0 auto;width:auto;max-width:100%}.col-md-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-md-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-md-3{flex:0 0 25%;max-width:25%}.cd-col-form-label,.col-md-4{flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-md-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.col-md-6,cd-health cd-info-card{flex:0 0 50%;max-width:50%}.col-md-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.cd-col-form-input,.cd-col-form-offset,.col-md-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.col-md-9{flex:0 0 75%;max-width:75%}.col-md-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-md-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.col-md-12,cd-health cd-info-card.cd-chart-card{flex:0 0 100%;max-width:100%}.order-md-first{order:-1}.order-md-last{order:13}.order-md-0{order:0}.order-md-1{order:1}.order-md-2{order:2}.order-md-3{order:3}.order-md-4{order:4}.order-md-5{order:5}.order-md-6{order:6}.order-md-7{order:7}.order-md-8{order:8}.order-md-9{order:9}.order-md-10{order:10}.order-md-11{order:11}.order-md-12{order:12}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.3333333333%}.offset-md-2{margin-left:16.6666666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.3333333333%}.offset-md-5{margin-left:41.6666666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.3333333333%}.offset-md-8{margin-left:66.6666666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.3333333333%}.offset-md-11{margin-left:91.6666666667%}}@media (min-width:992px){.col-lg{flex-basis:0;flex-grow:1;max-width:100%}.row-cols-lg-1>*{flex:0 0 100%;max-width:100%}.row-cols-lg-2>*{flex:0 0 50%;max-width:50%}.row-cols-lg-3>*{flex:0 0 33.3333333333%;max-width:33.3333333333%}.row-cols-lg-4>*{flex:0 0 25%;max-width:25%}.row-cols-lg-5>*{flex:0 0 20%;max-width:20%}.row-cols-lg-6>*{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-lg-auto{flex:0 0 auto;width:auto;max-width:100%}.col-lg-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-lg-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.cd-col-form-label,.col-lg-3,cd-health cd-info-card.cd-capacity-card{flex:0 0 25%;max-width:25%}.col-lg-4,cd-health cd-info-card,cd-modal .cd-col-form-label{flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-lg-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.col-lg-6,cd-health cd-info-card.cd-chart-card,cd-health cd-info-card.cd-performance-card{flex:0 0 50%;max-width:50%}.col-lg-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.cd-col-form,.col-lg-8,cd-modal .cd-col-form-input,cd-modal .cd-col-form-offset{flex:0 0 66.6666666667%;max-width:66.6666666667%}.cd-col-form-input,.cd-col-form-offset,.col-lg-9{flex:0 0 75%;max-width:75%}.col-lg-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-lg-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.col-lg-12{flex:0 0 100%;max-width:100%}.order-lg-first{order:-1}.order-lg-last{order:13}.order-lg-0{order:0}.order-lg-1{order:1}.order-lg-2{order:2}.order-lg-3{order:3}.order-lg-4{order:4}.order-lg-5{order:5}.order-lg-6{order:6}.order-lg-7{order:7}.order-lg-8{order:8}.order-lg-9{order:9}.order-lg-10{order:10}.order-lg-11{order:11}.order-lg-12{order:12}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.3333333333%}.offset-lg-2{margin-left:16.6666666667%}.cd-col-form-offset,.offset-lg-3{margin-left:25%}.offset-lg-4,cd-modal .cd-col-form-offset{margin-left:33.3333333333%}.offset-lg-5{margin-left:41.6666666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.3333333333%}.offset-lg-8{margin-left:66.6666666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.3333333333%}.offset-lg-11{margin-left:91.6666666667%}}@media (min-width:1200px){.col-xl,cd-health cd-info-card.cd-capacity-card,cd-health cd-info-card.cd-performance-card{flex-basis:0;flex-grow:1;max-width:100%}.row-cols-xl-1>*{flex:0 0 100%;max-width:100%}.row-cols-xl-2>*{flex:0 0 50%;max-width:50%}.row-cols-xl-3>*{flex:0 0 33.3333333333%;max-width:33.3333333333%}.row-cols-xl-4>*{flex:0 0 25%;max-width:25%}.row-cols-xl-5>*{flex:0 0 20%;max-width:20%}.row-cols-xl-6>*{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-xl-auto{flex:0 0 auto;width:auto;max-width:100%}.col-xl-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-xl-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-xl-3,cd-health cd-info-card.cd-status-card{flex:0 0 25%;max-width:25%}.col-xl-4,cd-health cd-info-card.cd-chart-card{flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-xl-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.cd-col-form,.col-xl-6{flex:0 0 50%;max-width:50%}.col-xl-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.col-xl-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.col-xl-9{flex:0 0 75%;max-width:75%}.col-xl-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-xl-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.col-xl-12{flex:0 0 100%;max-width:100%}.order-xl-first{order:-1}.order-xl-last{order:13}.order-xl-0{order:0}.order-xl-1{order:1}.order-xl-2{order:2}.order-xl-3{order:3}.order-xl-4{order:4}.order-xl-5{order:5}.order-xl-6{order:6}.order-xl-7{order:7}.order-xl-8{order:8}.order-xl-9{order:9}.order-xl-10{order:10}.order-xl-11{order:11}.order-xl-12{order:12}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.3333333333%}.offset-xl-2{margin-left:16.6666666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.3333333333%}.offset-xl-5{margin-left:41.6666666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.3333333333%}.offset-xl-8{margin-left:66.6666666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.3333333333%}.offset-xl-11{margin-left:91.6666666667%}}@media (min-width:1450px){.col-2xl{flex-basis:0;flex-grow:1;max-width:100%}.row-cols-2xl-1>*{flex:0 0 100%;max-width:100%}.row-cols-2xl-2>*{flex:0 0 50%;max-width:50%}.row-cols-2xl-3>*{flex:0 0 33.3333333333%;max-width:33.3333333333%}.row-cols-2xl-4>*{flex:0 0 25%;max-width:25%}.row-cols-2xl-5>*{flex:0 0 20%;max-width:20%}.row-cols-2xl-6>*{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-2xl-auto{flex:0 0 auto;width:auto;max-width:100%}.col-2xl-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-2xl-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-2xl-3,cd-health cd-info-card.cd-chart-card{flex:0 0 25%;max-width:25%}.col-2xl-4{flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-2xl-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.col-2xl-6{flex:0 0 50%;max-width:50%}.col-2xl-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.col-2xl-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.col-2xl-9{flex:0 0 75%;max-width:75%}.col-2xl-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-2xl-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.col-2xl-12{flex:0 0 100%;max-width:100%}.order-2xl-first{order:-1}.order-2xl-last{order:13}.order-2xl-0{order:0}.order-2xl-1{order:1}.order-2xl-2{order:2}.order-2xl-3{order:3}.order-2xl-4{order:4}.order-2xl-5{order:5}.order-2xl-6{order:6}.order-2xl-7{order:7}.order-2xl-8{order:8}.order-2xl-9{order:9}.order-2xl-10{order:10}.order-2xl-11{order:11}.order-2xl-12{order:12}.offset-2xl-0{margin-left:0}.offset-2xl-1{margin-left:8.3333333333%}.offset-2xl-2{margin-left:16.6666666667%}.offset-2xl-3{margin-left:25%}.offset-2xl-4{margin-left:33.3333333333%}.offset-2xl-5{margin-left:41.6666666667%}.offset-2xl-6{margin-left:50%}.offset-2xl-7{margin-left:58.3333333333%}.offset-2xl-8{margin-left:66.6666666667%}.offset-2xl-9{margin-left:75%}.offset-2xl-10{margin-left:83.3333333333%}.offset-2xl-11{margin-left:91.6666666667%}}.table{width:100%;margin-bottom:1rem;color:#212529}.table td,.table th{padding:.75rem;vertical-align:top;border-top:1px solid #dee2e6}.table thead th{vertical-align:bottom;border-bottom:2px solid #dee2e6}.table tbody+tbody{border-top:2px solid #dee2e6}.table-sm td,.table-sm th{padding:.3rem}.table-bordered,.table-bordered td,.table-bordered th{border:1px solid #dee2e6}.table-bordered thead td,.table-bordered thead th{border-bottom-width:2px}.table-borderless tbody+tbody,.table-borderless td,.table-borderless th,.table-borderless thead th{border:0}.table-striped tbody tr:nth-of-type(odd){background-color:rgba(0,0,0,.05)}.table-hover tbody tr:hover{color:#212529;background-color:rgba(0,0,0,.075)}.table-primary,.table-primary>td,.table-primary>th{background-color:#c4e2e7}.table-primary tbody+tbody,.table-primary td,.table-primary th,.table-primary thead th{border-color:#91cad2}.table-hover .table-primary:hover,.table-hover .table-primary:hover>td,.table-hover .table-primary:hover>th{background-color:#b2d9e0}.table-secondary,.table-secondary>td,.table-secondary>th{background-color:#c7cacc}.table-secondary tbody+tbody,.table-secondary td,.table-secondary th,.table-secondary thead th{border-color:#979da0}.table-hover .table-secondary:hover,.table-hover .table-secondary:hover>td,.table-hover .table-secondary:hover>th{background-color:#babdc0}.table-success,.table-success>td,.table-success>th{background-color:#b8ecb8}.table-success tbody+tbody,.table-success td,.table-success th,.table-success thead th{border-color:#7adc7a}.table-hover .table-success:hover,.table-hover .table-success:hover>td,.table-hover .table-success:hover>th{background-color:#a4e7a4}.table-info,.table-info>td,.table-info>th{background-color:#c4e2e7}.table-info tbody+tbody,.table-info td,.table-info th,.table-info thead th{border-color:#91cad2}.table-hover .table-info:hover,.table-hover .table-info:hover>td,.table-hover .table-info:hover>th{background-color:#b2d9e0}.table-warning,.table-warning>td,.table-warning>th{background-color:#ffeeb8}.table-warning tbody+tbody,.table-warning td,.table-warning th,.table-warning thead th{border-color:#ffdf7a}.table-hover .table-warning:hover,.table-hover .table-warning:hover>td,.table-hover .table-warning:hover>th{background-color:#ffe89f}.table-danger,.table-danger>td,.table-danger>th{background-color:#fbd1cf}.table-danger tbody+tbody,.table-danger td,.table-danger th,.table-danger thead th{border-color:#f7aaa7}.table-hover .table-danger:hover,.table-hover .table-danger:hover>td,.table-hover .table-danger:hover>th{background-color:#f9bab7}.table-light,.table-light>td,.table-light>th{background-color:#fdfdfe}.table-light tbody+tbody,.table-light td,.table-light th,.table-light thead th{border-color:#fbfcfc}.table-hover .table-light:hover,.table-hover .table-light:hover>td,.table-hover .table-light:hover>th{background-color:#ececf6}.table-dark,.table-dark>td,.table-dark>th{background-color:#d9d9d9}.table-dark tbody+tbody,.table-dark td,.table-dark th,.table-dark thead th{border-color:#b8b8b8}.table-hover .table-dark:hover,.table-hover .table-dark:hover>td,.table-hover .table-dark:hover>th{background-color:#ccc}.table-accent,.table-accent>td,.table-accent>th{background-color:#fbd1cf}.table-accent tbody+tbody,.table-accent td,.table-accent th,.table-accent thead th{border-color:#f7aaa7}.table-hover .table-accent:hover,.table-hover .table-accent:hover>td,.table-hover .table-accent:hover>th{background-color:#f9bab7}.table-warning-dark,.table-warning-dark>td,.table-warning-dark>th{background-color:#fedbbd}.table-warning-dark tbody+tbody,.table-warning-dark td,.table-warning-dark th,.table-warning-dark thead th{border-color:#febc85}.table-hover .table-warning-dark:hover,.table-hover .table-warning-dark:hover>td,.table-hover .table-warning-dark:hover>th{background-color:#fecda4}.table-active,.table-active>td,.table-active>th,.table-hover .table-active:hover,.table-hover .table-active:hover>td,.table-hover .table-active:hover>th{background-color:rgba(0,0,0,.075)}.table .thead-dark th{color:#fff;background-color:#343a40;border-color:#454d55}.table .thead-light th{color:#495057;background-color:#e9ecef;border-color:#dee2e6}.table-dark{color:#fff;background-color:#343a40}.table-dark td,.table-dark th,.table-dark thead th{border-color:#454d55}.table-dark.table-bordered{border:0}.table-dark.table-striped tbody tr:nth-of-type(odd){background-color:hsla(0,0%,100%,.05)}.table-dark.table-hover tbody tr:hover{color:#fff;background-color:hsla(0,0%,100%,.075)}@media (max-width:575.98px){.table-responsive-sm{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-sm>.table-bordered{border:0}}@media (max-width:767.98px){.table-responsive-md{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-md>.table-bordered{border:0}}@media (max-width:991.98px){.table-responsive-lg{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-lg>.table-bordered{border:0}}@media (max-width:1199.98px){.table-responsive-xl{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-xl>.table-bordered{border:0}}@media (max-width:1449.98px){.table-responsive-2xl{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-2xl>.table-bordered{border:0}}.table-responsive{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive>.table-bordered{border:0}.cd-form-control,.form-control{display:block;width:100%;height:calc(1.5em + .75rem + 2px);padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;border-radius:.25rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.cd-form-control,.form-control{transition:none}}.cd-form-control::-ms-expand,.form-control::-ms-expand{background-color:initial;border:0}.cd-form-control:-moz-focusring,.form-control:-moz-focusring{color:transparent;text-shadow:0 0 0 #495057}.cd-form-control:focus,.form-control:focus{color:#495057;background-color:#fff;border-color:#76d0dc;box-shadow:0 0 0 .2rem rgba(43,153,168,.25)}.cd-form-control::placeholder,.form-control::placeholder{color:#6c757d;opacity:1}.cd-form-control:disabled,.form-control:disabled,.form-control[readonly],[readonly].cd-form-control{background-color:#e9ecef;opacity:1}input[type=date].cd-form-control,input[type=date].form-control,input[type=datetime-local].cd-form-control,input[type=datetime-local].form-control,input[type=month].cd-form-control,input[type=month].form-control,input[type=time].cd-form-control,input[type=time].form-control{-moz-appearance:none;appearance:none}select.cd-form-control:focus::-ms-value,select.form-control:focus::-ms-value{color:#495057;background-color:#fff}.form-control-file,.form-control-range{display:block;width:100%}.cd-col-form-label,.col-form-label{padding-top:calc(.375rem + 1px);padding-bottom:calc(.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(.5rem + 1px);padding-bottom:calc(.5rem + 1px);font-size:1.25rem;line-height:1.5}.col-form-label-sm{padding-top:calc(.25rem + 1px);padding-bottom:calc(.25rem + 1px);font-size:.875rem;line-height:1.5}.form-control-plaintext{display:block;width:100%;padding:.375rem 0;margin-bottom:0;font-size:1rem;line-height:1.5;color:#212529;background-color:initial;border:solid transparent;border-width:1px 0}.form-control-plaintext.form-control-lg,.form-control-plaintext.form-control-sm{padding-right:0;padding-left:0}.form-control-sm{height:calc(1.5em + .5rem + 2px);padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.form-control-lg{height:calc(1.5em + 1rem + 2px);padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}select.form-control[multiple],select.form-control[size],select[multiple].cd-form-control,select[size].cd-form-control,textarea.cd-form-control,textarea.form-control{height:auto}.form-group{margin-bottom:1rem}.form-text{display:block;margin-top:.25rem}.form-row{display:flex;flex-wrap:wrap;margin-right:-5px;margin-left:-5px}.form-row>.col,.form-row>[class*=col-]{padding-right:5px;padding-left:5px}.form-check{position:relative;display:block;padding-left:1.25rem}.form-check-input{position:absolute;margin-top:.3rem;margin-left:-1.25rem}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{color:#6c757d}.form-check-label{margin-bottom:0}.form-check-inline{display:inline-flex;align-items:center;padding-left:0;margin-right:.75rem}.form-check-inline .form-check-input{position:static;margin-top:0;margin-right:.3125rem;margin-left:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:100%;color:#0b0}.valid-tooltip{position:absolute;top:100%;left:0;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(0,187,0,.9);border-radius:.25rem}.is-valid~.valid-feedback,.is-valid~.valid-tooltip,.was-validated :valid~.valid-feedback,.was-validated :valid~.valid-tooltip{display:block}.form-control.is-valid,.is-valid.cd-form-control,.was-validated .cd-form-control:valid,.was-validated .form-control:valid{border-color:#0b0;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%230b0' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-valid:focus,.is-valid.cd-form-control:focus,.was-validated .cd-form-control:valid:focus,.was-validated .form-control:valid:focus{border-color:#0b0;box-shadow:0 0 0 .2rem rgba(0,187,0,.25)}.was-validated textarea.cd-form-control:valid,.was-validated textarea.form-control:valid,textarea.form-control.is-valid,textarea.is-valid.cd-form-control{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.custom-select.is-valid,.was-validated .custom-select:valid{border-color:#0b0;padding-right:calc(.75em + 2.3125rem);background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px,url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%230b0' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") #fff no-repeat center right 1.75rem/calc(.75em + .375rem) calc(.75em + .375rem)}.custom-select.is-valid:focus,.was-validated .custom-select:valid:focus{border-color:#0b0;box-shadow:0 0 0 .2rem rgba(0,187,0,.25)}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:#0b0}.form-check-input.is-valid~.valid-feedback,.form-check-input.is-valid~.valid-tooltip,.was-validated .form-check-input:valid~.valid-feedback,.was-validated .form-check-input:valid~.valid-tooltip{display:block}.custom-control-input.is-valid~.custom-control-label,.was-validated .custom-control-input:valid~.custom-control-label{color:#0b0}.custom-control-input.is-valid~.custom-control-label:before,.was-validated .custom-control-input:valid~.custom-control-label:before{border-color:#0b0}.custom-control-input.is-valid:checked~.custom-control-label:before,.was-validated .custom-control-input:valid:checked~.custom-control-label:before{border-color:#0e0;background-color:#0e0}.custom-control-input.is-valid:focus~.custom-control-label:before,.was-validated .custom-control-input:valid:focus~.custom-control-label:before{box-shadow:0 0 0 .2rem rgba(0,187,0,.25)}.custom-control-input.is-valid:focus:not(:checked)~.custom-control-label:before,.custom-file-input.is-valid~.custom-file-label,.was-validated .custom-control-input:valid:focus:not(:checked)~.custom-control-label:before,.was-validated .custom-file-input:valid~.custom-file-label{border-color:#0b0}.custom-file-input.is-valid:focus~.custom-file-label,.was-validated .custom-file-input:valid:focus~.custom-file-label{border-color:#0b0;box-shadow:0 0 0 .2rem rgba(0,187,0,.25)}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:100%;color:#ef5c55}.invalid-tooltip{position:absolute;top:100%;left:0;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(239,92,85,.9);border-radius:.25rem}.is-invalid~.invalid-feedback,.is-invalid~.invalid-tooltip,.was-validated :invalid~.invalid-feedback,.was-validated :invalid~.invalid-tooltip{display:block}.form-control.is-invalid,.is-invalid.cd-form-control,.was-validated .cd-form-control:invalid,.was-validated .form-control:invalid{border-color:#ef5c55;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23ef5c55' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23ef5c55' stroke='none'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-invalid:focus,.is-invalid.cd-form-control:focus,.was-validated .cd-form-control:invalid:focus,.was-validated .form-control:invalid:focus{border-color:#ef5c55;box-shadow:0 0 0 .2rem rgba(239,92,85,.25)}.was-validated textarea.cd-form-control:invalid,.was-validated textarea.form-control:invalid,textarea.form-control.is-invalid,textarea.is-invalid.cd-form-control{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.custom-select.is-invalid,.was-validated .custom-select:invalid{border-color:#ef5c55;padding-right:calc(.75em + 2.3125rem);background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px,url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23ef5c55' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23ef5c55' stroke='none'/%3e%3c/svg%3e") #fff no-repeat center right 1.75rem/calc(.75em + .375rem) calc(.75em + .375rem)}.custom-select.is-invalid:focus,.was-validated .custom-select:invalid:focus{border-color:#ef5c55;box-shadow:0 0 0 .2rem rgba(239,92,85,.25)}.form-check-input.is-invalid~.form-check-label,.was-validated .form-check-input:invalid~.form-check-label{color:#ef5c55}.form-check-input.is-invalid~.invalid-feedback,.form-check-input.is-invalid~.invalid-tooltip,.was-validated .form-check-input:invalid~.invalid-feedback,.was-validated .form-check-input:invalid~.invalid-tooltip{display:block}.custom-control-input.is-invalid~.custom-control-label,.was-validated .custom-control-input:invalid~.custom-control-label{color:#ef5c55}.custom-control-input.is-invalid~.custom-control-label:before,.was-validated .custom-control-input:invalid~.custom-control-label:before{border-color:#ef5c55}.custom-control-input.is-invalid:checked~.custom-control-label:before,.was-validated .custom-control-input:invalid:checked~.custom-control-label:before{border-color:#f38984;background-color:#f38984}.custom-control-input.is-invalid:focus~.custom-control-label:before,.was-validated .custom-control-input:invalid:focus~.custom-control-label:before{box-shadow:0 0 0 .2rem rgba(239,92,85,.25)}.custom-control-input.is-invalid:focus:not(:checked)~.custom-control-label:before,.custom-file-input.is-invalid~.custom-file-label,.was-validated .custom-control-input:invalid:focus:not(:checked)~.custom-control-label:before,.was-validated .custom-file-input:invalid~.custom-file-label{border-color:#ef5c55}.custom-file-input.is-invalid:focus~.custom-file-label,.was-validated .custom-file-input:invalid:focus~.custom-file-label{border-color:#ef5c55;box-shadow:0 0 0 .2rem rgba(239,92,85,.25)}.form-inline{display:flex;flex-flow:row wrap;align-items:center}.form-inline .form-check{width:100%}@media (min-width:576px){.form-inline label{justify-content:center}.form-inline .form-group,.form-inline label{display:flex;align-items:center;margin-bottom:0}.form-inline .form-group{flex:0 0 auto;flex-flow:row wrap}.form-inline .cd-form-control,.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-plaintext{display:inline-block}.form-inline .custom-select,.form-inline .input-group{width:auto}.form-inline .form-check{display:flex;align-items:center;justify-content:center;width:auto;padding-left:0}.form-inline .form-check-input{position:relative;flex-shrink:0;margin-top:0;margin-right:.25rem;margin-left:0}.form-inline .custom-control{align-items:center;justify-content:center}.form-inline .custom-control-label{margin-bottom:0}}.btn{display:inline-block;font-weight:400;color:#212529;text-align:center;vertical-align:middle;user-select:none;background-color:initial;border:1px solid transparent;padding:.375rem .75rem;font-size:1rem;line-height:1.5;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn:hover{color:#212529;text-decoration:none}.btn.focus,.btn:focus{outline:0;box-shadow:0 0 0 .2rem rgba(43,153,168,.25)}.btn.disabled,.btn:disabled{opacity:.65}.btn:not(:disabled):not(.disabled){cursor:pointer}a.btn.disabled,fieldset:disabled a.btn{pointer-events:none}.btn-primary{color:#fff;background-color:#2b99a8;border-color:#2b99a8}.btn-primary.focus,.btn-primary:focus,.btn-primary:hover{color:#fff;background-color:#237d8a;border-color:#21747f}.btn-primary.focus,.btn-primary:focus{box-shadow:0 0 0 .2rem rgba(75,168,181,.5)}.btn-primary.disabled,.btn-primary:disabled{color:#fff;background-color:#2b99a8;border-color:#2b99a8}.btn-primary:not(:disabled):not(.disabled).active,.btn-primary:not(:disabled):not(.disabled):active,.show>.btn-primary.dropdown-toggle{color:#fff;background-color:#21747f;border-color:#1e6b75}.btn-primary:not(:disabled):not(.disabled).active:focus,.btn-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(75,168,181,.5)}.btn-secondary{color:#fff;background-color:#374249;border-color:#374249}.btn-secondary.focus,.btn-secondary:focus,.btn-secondary:hover{color:#fff;background-color:#272e33;border-color:#21282c}.btn-secondary.focus,.btn-secondary:focus{box-shadow:0 0 0 .2rem rgba(85,94,100,.5)}.btn-secondary.disabled,.btn-secondary:disabled{color:#fff;background-color:#374249;border-color:#374249}.btn-secondary:not(:disabled):not(.disabled).active,.btn-secondary:not(:disabled):not(.disabled):active,.show>.btn-secondary.dropdown-toggle{color:#fff;background-color:#21282c;border-color:#1c2125}.btn-secondary:not(:disabled):not(.disabled).active:focus,.btn-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(85,94,100,.5)}.btn-success{color:#fff;background-color:#0b0;border-color:#0b0}.btn-success.focus,.btn-success:focus,.btn-success:hover{color:#fff;background-color:#009500;border-color:#080}.btn-success.focus,.btn-success:focus{box-shadow:0 0 0 .2rem rgba(38,197,38,.5)}.btn-success.disabled,.btn-success:disabled{color:#fff;background-color:#0b0;border-color:#0b0}.btn-success:not(:disabled):not(.disabled).active,.btn-success:not(:disabled):not(.disabled):active,.show>.btn-success.dropdown-toggle{color:#fff;background-color:#080;border-color:#007b00}.btn-success:not(:disabled):not(.disabled).active:focus,.btn-success:not(:disabled):not(.disabled):active:focus,.show>.btn-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(38,197,38,.5)}.btn-info{color:#fff;background-color:#2b99a8;border-color:#2b99a8}.btn-info.focus,.btn-info:focus,.btn-info:hover{color:#fff;background-color:#237d8a;border-color:#21747f}.btn-info.focus,.btn-info:focus{box-shadow:0 0 0 .2rem rgba(75,168,181,.5)}.btn-info.disabled,.btn-info:disabled{color:#fff;background-color:#2b99a8;border-color:#2b99a8}.btn-info:not(:disabled):not(.disabled).active,.btn-info:not(:disabled):not(.disabled):active,.show>.btn-info.dropdown-toggle{color:#fff;background-color:#21747f;border-color:#1e6b75}.btn-info:not(:disabled):not(.disabled).active:focus,.btn-info:not(:disabled):not(.disabled):active:focus,.show>.btn-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(75,168,181,.5)}.btn-warning{color:#212529;background-color:#ffc200;border-color:#ffc200}.btn-warning.focus,.btn-warning:focus,.btn-warning:hover{color:#212529;background-color:#d9a500;border-color:#cc9b00}.btn-warning.focus,.btn-warning:focus{box-shadow:0 0 0 .2rem rgba(222,170,6,.5)}.btn-warning.disabled,.btn-warning:disabled{color:#212529;background-color:#ffc200;border-color:#ffc200}.btn-warning:not(:disabled):not(.disabled).active,.btn-warning:not(:disabled):not(.disabled):active,.show>.btn-warning.dropdown-toggle{color:#212529;background-color:#cc9b00;border-color:#bf9200}.btn-warning:not(:disabled):not(.disabled).active:focus,.btn-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(222,170,6,.5)}.btn-danger{color:#fff;background-color:#ef5c55;border-color:#ef5c55}.btn-danger.focus,.btn-danger:focus,.btn-danger:hover{color:#fff;background-color:#ec3a32;border-color:#eb2f26}.btn-danger.focus,.btn-danger:focus{box-shadow:0 0 0 .2rem rgba(241,116,111,.5)}.btn-danger.disabled,.btn-danger:disabled{color:#fff;background-color:#ef5c55;border-color:#ef5c55}.btn-danger:not(:disabled):not(.disabled).active,.btn-danger:not(:disabled):not(.disabled):active,.show>.btn-danger.dropdown-toggle{color:#fff;background-color:#eb2f26;border-color:#ea241b}.btn-danger:not(:disabled):not(.disabled).active:focus,.btn-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(241,116,111,.5)}.btn-light{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light.focus,.btn-light:focus,.btn-light:hover{color:#212529;background-color:#e2e6ea;border-color:#dae0e5}.btn-light.focus,.btn-light:focus{box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}.btn-light.disabled,.btn-light:disabled{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:not(:disabled):not(.disabled).active,.btn-light:not(:disabled):not(.disabled):active,.show>.btn-light.dropdown-toggle{color:#212529;background-color:#dae0e5;border-color:#d3d9df}.btn-light:not(:disabled):not(.disabled).active:focus,.btn-light:not(:disabled):not(.disabled):active:focus,.show>.btn-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}.btn-dark{color:#fff;background-color:#777;border-color:#777}.btn-dark.focus,.btn-dark:focus,.btn-dark:hover{color:#fff;background-color:#646464;border-color:#5e5e5e}.btn-dark.focus,.btn-dark:focus{box-shadow:0 0 0 .2rem hsla(0,0%,54.5%,.5)}.btn-dark.disabled,.btn-dark:disabled{color:#fff;background-color:#777;border-color:#777}.btn-dark:not(:disabled):not(.disabled).active,.btn-dark:not(:disabled):not(.disabled):active,.show>.btn-dark.dropdown-toggle{color:#fff;background-color:#5e5e5e;border-color:#575757}.btn-dark:not(:disabled):not(.disabled).active:focus,.btn-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem hsla(0,0%,54.5%,.5)}.btn-accent{color:#fff;background-color:#ef5c55;border-color:#ef5c55}.btn-accent.focus,.btn-accent:focus,.btn-accent:hover{color:#fff;background-color:#ec3a32;border-color:#eb2f26}.btn-accent.focus,.btn-accent:focus{box-shadow:0 0 0 .2rem rgba(241,116,111,.5)}.btn-accent.disabled,.btn-accent:disabled{color:#fff;background-color:#ef5c55;border-color:#ef5c55}.btn-accent:not(:disabled):not(.disabled).active,.btn-accent:not(:disabled):not(.disabled):active,.show>.btn-accent.dropdown-toggle{color:#fff;background-color:#eb2f26;border-color:#ea241b}.btn-accent:not(:disabled):not(.disabled).active:focus,.btn-accent:not(:disabled):not(.disabled):active:focus,.show>.btn-accent.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(241,116,111,.5)}.btn-warning-dark{color:#212529;background-color:#fd7e14;border-color:#fd7e14}.btn-warning-dark.focus,.btn-warning-dark:focus,.btn-warning-dark:hover{color:#fff;background-color:#e96b02;border-color:#dc6502}.btn-warning-dark.focus,.btn-warning-dark:focus{box-shadow:0 0 0 .2rem rgba(220,113,23,.5)}.btn-warning-dark.disabled,.btn-warning-dark:disabled{color:#212529;background-color:#fd7e14;border-color:#fd7e14}.btn-warning-dark:not(:disabled):not(.disabled).active,.btn-warning-dark:not(:disabled):not(.disabled):active,.show>.btn-warning-dark.dropdown-toggle{color:#fff;background-color:#dc6502;border-color:#cf5f02}.btn-warning-dark:not(:disabled):not(.disabled).active:focus,.btn-warning-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-warning-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(220,113,23,.5)}.btn-outline-primary{color:#2b99a8;border-color:#2b99a8}.btn-outline-primary:hover{color:#fff;background-color:#2b99a8;border-color:#2b99a8}.btn-outline-primary.focus,.btn-outline-primary:focus{box-shadow:0 0 0 .2rem rgba(43,153,168,.5)}.btn-outline-primary.disabled,.btn-outline-primary:disabled{color:#2b99a8;background-color:initial}.btn-outline-primary:not(:disabled):not(.disabled).active,.btn-outline-primary:not(:disabled):not(.disabled):active,.show>.btn-outline-primary.dropdown-toggle{color:#fff;background-color:#2b99a8;border-color:#2b99a8}.btn-outline-primary:not(:disabled):not(.disabled).active:focus,.btn-outline-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(43,153,168,.5)}.btn-outline-secondary{color:#374249;border-color:#374249}.btn-outline-secondary:hover{color:#fff;background-color:#374249;border-color:#374249}.btn-outline-secondary.focus,.btn-outline-secondary:focus{box-shadow:0 0 0 .2rem rgba(55,66,73,.5)}.btn-outline-secondary.disabled,.btn-outline-secondary:disabled{color:#374249;background-color:initial}.btn-outline-secondary:not(:disabled):not(.disabled).active,.btn-outline-secondary:not(:disabled):not(.disabled):active,.show>.btn-outline-secondary.dropdown-toggle{color:#fff;background-color:#374249;border-color:#374249}.btn-outline-secondary:not(:disabled):not(.disabled).active:focus,.btn-outline-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(55,66,73,.5)}.btn-outline-success{color:#0b0;border-color:#0b0}.btn-outline-success:hover{color:#fff;background-color:#0b0;border-color:#0b0}.btn-outline-success.focus,.btn-outline-success:focus{box-shadow:0 0 0 .2rem rgba(0,187,0,.5)}.btn-outline-success.disabled,.btn-outline-success:disabled{color:#0b0;background-color:initial}.btn-outline-success:not(:disabled):not(.disabled).active,.btn-outline-success:not(:disabled):not(.disabled):active,.show>.btn-outline-success.dropdown-toggle{color:#fff;background-color:#0b0;border-color:#0b0}.btn-outline-success:not(:disabled):not(.disabled).active:focus,.btn-outline-success:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(0,187,0,.5)}.btn-outline-info{color:#2b99a8;border-color:#2b99a8}.btn-outline-info:hover{color:#fff;background-color:#2b99a8;border-color:#2b99a8}.btn-outline-info.focus,.btn-outline-info:focus{box-shadow:0 0 0 .2rem rgba(43,153,168,.5)}.btn-outline-info.disabled,.btn-outline-info:disabled{color:#2b99a8;background-color:initial}.btn-outline-info:not(:disabled):not(.disabled).active,.btn-outline-info:not(:disabled):not(.disabled):active,.show>.btn-outline-info.dropdown-toggle{color:#fff;background-color:#2b99a8;border-color:#2b99a8}.btn-outline-info:not(:disabled):not(.disabled).active:focus,.btn-outline-info:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(43,153,168,.5)}.btn-outline-warning{color:#ffc200;border-color:#ffc200}.btn-outline-warning:hover{color:#212529;background-color:#ffc200;border-color:#ffc200}.btn-outline-warning.focus,.btn-outline-warning:focus{box-shadow:0 0 0 .2rem rgba(255,194,0,.5)}.btn-outline-warning.disabled,.btn-outline-warning:disabled{color:#ffc200;background-color:initial}.btn-outline-warning:not(:disabled):not(.disabled).active,.btn-outline-warning:not(:disabled):not(.disabled):active,.show>.btn-outline-warning.dropdown-toggle{color:#212529;background-color:#ffc200;border-color:#ffc200}.btn-outline-warning:not(:disabled):not(.disabled).active:focus,.btn-outline-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(255,194,0,.5)}.btn-outline-danger{color:#ef5c55;border-color:#ef5c55}.btn-outline-danger:hover{color:#fff;background-color:#ef5c55;border-color:#ef5c55}.btn-outline-danger.focus,.btn-outline-danger:focus{box-shadow:0 0 0 .2rem rgba(239,92,85,.5)}.btn-outline-danger.disabled,.btn-outline-danger:disabled{color:#ef5c55;background-color:initial}.btn-outline-danger:not(:disabled):not(.disabled).active,.btn-outline-danger:not(:disabled):not(.disabled):active,.show>.btn-outline-danger.dropdown-toggle{color:#fff;background-color:#ef5c55;border-color:#ef5c55}.btn-outline-danger:not(:disabled):not(.disabled).active:focus,.btn-outline-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(239,92,85,.5)}.btn-outline-light{color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:hover{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light.focus,.btn-outline-light:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-outline-light.disabled,.btn-outline-light:disabled{color:#f8f9fa;background-color:initial}.btn-outline-light:not(:disabled):not(.disabled).active,.btn-outline-light:not(:disabled):not(.disabled):active,.show>.btn-outline-light.dropdown-toggle{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:not(:disabled):not(.disabled).active:focus,.btn-outline-light:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-outline-dark{color:#777;border-color:#777}.btn-outline-dark:hover{color:#fff;background-color:#777;border-color:#777}.btn-outline-dark.focus,.btn-outline-dark:focus{box-shadow:0 0 0 .2rem hsla(0,0%,46.7%,.5)}.btn-outline-dark.disabled,.btn-outline-dark:disabled{color:#777;background-color:initial}.btn-outline-dark:not(:disabled):not(.disabled).active,.btn-outline-dark:not(:disabled):not(.disabled):active,.show>.btn-outline-dark.dropdown-toggle{color:#fff;background-color:#777;border-color:#777}.btn-outline-dark:not(:disabled):not(.disabled).active:focus,.btn-outline-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem hsla(0,0%,46.7%,.5)}.btn-outline-accent{color:#ef5c55;border-color:#ef5c55}.btn-outline-accent:hover{color:#fff;background-color:#ef5c55;border-color:#ef5c55}.btn-outline-accent.focus,.btn-outline-accent:focus{box-shadow:0 0 0 .2rem rgba(239,92,85,.5)}.btn-outline-accent.disabled,.btn-outline-accent:disabled{color:#ef5c55;background-color:initial}.btn-outline-accent:not(:disabled):not(.disabled).active,.btn-outline-accent:not(:disabled):not(.disabled):active,.show>.btn-outline-accent.dropdown-toggle{color:#fff;background-color:#ef5c55;border-color:#ef5c55}.btn-outline-accent:not(:disabled):not(.disabled).active:focus,.btn-outline-accent:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-accent.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(239,92,85,.5)}.btn-outline-warning-dark{color:#fd7e14;border-color:#fd7e14}.btn-outline-warning-dark:hover{color:#212529;background-color:#fd7e14;border-color:#fd7e14}.btn-outline-warning-dark.focus,.btn-outline-warning-dark:focus{box-shadow:0 0 0 .2rem rgba(253,126,20,.5)}.btn-outline-warning-dark.disabled,.btn-outline-warning-dark:disabled{color:#fd7e14;background-color:initial}.btn-outline-warning-dark:not(:disabled):not(.disabled).active,.btn-outline-warning-dark:not(:disabled):not(.disabled):active,.show>.btn-outline-warning-dark.dropdown-toggle{color:#212529;background-color:#fd7e14;border-color:#fd7e14}.btn-outline-warning-dark:not(:disabled):not(.disabled).active:focus,.btn-outline-warning-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-warning-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(253,126,20,.5)}.btn-link{font-weight:400;color:#2b99a8;text-decoration:none}.btn-link:hover{color:#1b626b}.btn-link.focus,.btn-link:focus,.btn-link:hover{text-decoration:underline}.btn-link.disabled,.btn-link:disabled{color:#6c757d;pointer-events:none}.btn-group-lg>.btn,.btn-lg{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.btn-group-sm>.btn,.btn-sm{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:.5rem}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{transition:opacity .15s linear}@media (prefers-reduced-motion:reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{position:relative;height:0;overflow:hidden;transition:height .35s ease}@media (prefers-reduced-motion:reduce){.collapsing{transition:none}}.dropdown,.dropleft,.dropright,.dropup{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle:after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty:after{margin-left:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:10rem;padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#212529;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}.dropdown-menu-left{right:auto;left:0}.dropdown-menu-right{right:0;left:auto}@media (min-width:576px){.dropdown-menu-sm-left{right:auto;left:0}.dropdown-menu-sm-right{right:0;left:auto}}@media (min-width:768px){.dropdown-menu-md-left{right:auto;left:0}.dropdown-menu-md-right{right:0;left:auto}}@media (min-width:992px){.dropdown-menu-lg-left{right:auto;left:0}.dropdown-menu-lg-right{right:0;left:auto}}@media (min-width:1200px){.dropdown-menu-xl-left{right:auto;left:0}.dropdown-menu-xl-right{right:0;left:auto}}@media (min-width:1450px){.dropdown-menu-2xl-left{right:auto;left:0}.dropdown-menu-2xl-right{right:0;left:auto}}.dropup .dropdown-menu{top:auto;bottom:100%;margin-top:0;margin-bottom:.125rem}.dropup .dropdown-toggle:after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty:after{margin-left:0}.dropright .dropdown-menu{top:0;right:auto;left:100%;margin-top:0;margin-left:.125rem}.dropright .dropdown-toggle:after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropright .dropdown-toggle:empty:after{margin-left:0}.dropright .dropdown-toggle:after{vertical-align:0}.dropleft .dropdown-menu{top:0;right:100%;left:auto;margin-top:0;margin-right:.125rem}.dropleft .dropdown-toggle:after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";display:none}.dropleft .dropdown-toggle:before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropleft .dropdown-toggle:empty:after{margin-left:0}.dropleft .dropdown-toggle:before{vertical-align:0}.dropdown-menu[x-placement^=bottom],.dropdown-menu[x-placement^=left],.dropdown-menu[x-placement^=right],.dropdown-menu[x-placement^=top]{right:auto;bottom:auto}.dropdown-divider{height:0;margin:.5rem 0;overflow:hidden;border-top:1px solid #e9ecef}.dropdown-item{display:block;width:100%;padding:.25rem 1.5rem;clear:both;font-weight:400;color:#212529;text-align:inherit;white-space:nowrap;background-color:initial;border:0}.dropdown-item:focus,.dropdown-item:hover{color:#16181b;text-decoration:none;background-color:#f8f9fa}.dropdown-item.active,.dropdown-item:active{color:#fff;text-decoration:none;background-color:#2b99a8}.dropdown-item.disabled,.dropdown-item:disabled{color:#6c757d;pointer-events:none;background-color:initial}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:.5rem 1.5rem;margin-bottom:0;font-size:.875rem;color:#6c757d;white-space:nowrap}.dropdown-item-text{display:block;padding:.25rem 1.5rem;color:#212529}.btn-group,.btn-group-vertical{position:relative;display:inline-flex;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;flex:1 1 auto}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:1}.btn-toolbar{display:flex;flex-wrap:wrap;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group>.btn-group:not(:first-child),.btn-group>.btn:not(:first-child){margin-left:-1px}.btn-group>.btn-group:not(:last-child)>.btn,.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:not(:first-child)>.btn,.btn-group>.btn:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split:after,.dropright .dropdown-toggle-split:after,.dropup .dropdown-toggle-split:after{margin-left:0}.dropleft .dropdown-toggle-split:before{margin-right:0}.btn-group-sm>.btn+.dropdown-toggle-split,.btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-group-lg>.btn+.dropdown-toggle-split,.btn-lg+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{flex-direction:column;align-items:flex-start;justify-content:center}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{width:100%}.btn-group-vertical>.btn-group:not(:first-child),.btn-group-vertical>.btn:not(:first-child){margin-top:-1px}.btn-group-vertical>.btn-group:not(:last-child)>.btn,.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child)>.btn,.btn-group-vertical>.btn:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.btn-group-toggle>.btn,.btn-group-toggle>.btn-group>.btn{margin-bottom:0}.btn-group-toggle>.btn-group>.btn input[type=checkbox],.btn-group-toggle>.btn-group>.btn input[type=radio],.btn-group-toggle>.btn input[type=checkbox],.btn-group-toggle>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:flex;flex-wrap:wrap;align-items:stretch;width:100%}.input-group>.cd-form-control,.input-group>.custom-file,.input-group>.custom-select,.input-group>.form-control,.input-group>.form-control-plaintext{position:relative;flex:1 1 auto;width:1%;min-width:0;margin-bottom:0}.input-group>.cd-form-control+.cd-form-control,.input-group>.cd-form-control+.custom-file,.input-group>.cd-form-control+.custom-select,.input-group>.cd-form-control+.form-control,.input-group>.custom-file+.cd-form-control,.input-group>.custom-file+.custom-file,.input-group>.custom-file+.custom-select,.input-group>.custom-file+.form-control,.input-group>.custom-select+.cd-form-control,.input-group>.custom-select+.custom-file,.input-group>.custom-select+.custom-select,.input-group>.custom-select+.form-control,.input-group>.form-control+.cd-form-control,.input-group>.form-control+.custom-file,.input-group>.form-control+.custom-select,.input-group>.form-control+.form-control,.input-group>.form-control-plaintext+.cd-form-control,.input-group>.form-control-plaintext+.custom-file,.input-group>.form-control-plaintext+.custom-select,.input-group>.form-control-plaintext+.form-control{margin-left:-1px}.input-group>.cd-form-control:focus,.input-group>.custom-file .custom-file-input:focus~.custom-file-label,.input-group>.custom-select:focus,.input-group>.form-control:focus{z-index:3}.input-group>.custom-file .custom-file-input:focus{z-index:4}.input-group>.cd-form-control:not(:last-child),.input-group>.custom-select:not(:last-child),.input-group>.form-control:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.cd-form-control:not(:first-child),.input-group>.custom-select:not(:first-child),.input-group>.form-control:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.custom-file{display:flex;align-items:center}.input-group>.custom-file:not(:last-child) .custom-file-label,.input-group>.custom-file:not(:last-child) .custom-file-label:after{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.custom-file:not(:first-child) .custom-file-label{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-append,.input-group-prepend{display:flex}.input-group-append .btn,.input-group-prepend .btn{position:relative;z-index:2}.input-group-append .btn:focus,.input-group-prepend .btn:focus{z-index:3}.input-group-append .btn+.btn,.input-group-append .btn+.input-group-text,.input-group-append .input-group-text+.btn,.input-group-append .input-group-text+.input-group-text,.input-group-prepend .btn+.btn,.input-group-prepend .btn+.input-group-text,.input-group-prepend .input-group-text+.btn,.input-group-prepend .input-group-text+.input-group-text{margin-left:-1px}.input-group-prepend{margin-right:-1px}.input-group-append{margin-left:-1px}.input-group-text{display:flex;align-items:center;padding:.375rem .75rem;margin-bottom:0;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:.25rem}.input-group-text input[type=checkbox],.input-group-text input[type=radio]{margin-top:0}.input-group-lg>.cd-form-control:not(textarea),.input-group-lg>.custom-select,.input-group-lg>.form-control:not(textarea){height:calc(1.5em + 1rem + 2px)}.input-group-lg>.cd-form-control,.input-group-lg>.custom-select,.input-group-lg>.form-control,.input-group-lg>.input-group-append>.btn,.input-group-lg>.input-group-append>.input-group-text,.input-group-lg>.input-group-prepend>.btn,.input-group-lg>.input-group-prepend>.input-group-text{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.input-group-sm>.cd-form-control:not(textarea),.input-group-sm>.custom-select,.input-group-sm>.form-control:not(textarea){height:calc(1.5em + .5rem + 2px)}.input-group-sm>.cd-form-control,.input-group-sm>.custom-select,.input-group-sm>.form-control,.input-group-sm>.input-group-append>.btn,.input-group-sm>.input-group-append>.input-group-text,.input-group-sm>.input-group-prepend>.btn,.input-group-sm>.input-group-prepend>.input-group-text{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.input-group-lg>.custom-select,.input-group-sm>.custom-select{padding-right:1.75rem}.input-group>.input-group-append:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group>.input-group-append:last-child>.input-group-text:not(:last-child),.input-group>.input-group-append:not(:last-child)>.btn,.input-group>.input-group-append:not(:last-child)>.input-group-text,.input-group>.input-group-prepend>.btn,.input-group>.input-group-prepend>.input-group-text{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.input-group-append>.btn,.input-group>.input-group-append>.input-group-text,.input-group>.input-group-prepend:first-child>.btn:not(:first-child),.input-group>.input-group-prepend:first-child>.input-group-text:not(:first-child),.input-group>.input-group-prepend:not(:first-child)>.btn,.input-group>.input-group-prepend:not(:first-child)>.input-group-text{border-top-left-radius:0;border-bottom-left-radius:0}.custom-control{position:relative;z-index:1;display:block;min-height:1.5rem;padding-left:1.5rem}.custom-control-inline{display:inline-flex;margin-right:1rem}.custom-control-input{position:absolute;left:0;z-index:-1;width:1rem;height:1.25rem;opacity:0}.custom-control-input:checked~.custom-control-label:before{color:#fff;border-color:#2b99a8;background-color:#2b99a8}.custom-control-input:focus~.custom-control-label:before{box-shadow:0 0 0 .2rem rgba(43,153,168,.25)}.custom-control-input:focus:not(:checked)~.custom-control-label:before{border-color:#76d0dc}.custom-control-input:not(:disabled):active~.custom-control-label:before{color:#fff;background-color:#9fdee6;border-color:#9fdee6}.custom-control-input:disabled~.custom-control-label,.custom-control-input[disabled]~.custom-control-label{color:#6c757d}.custom-control-input:disabled~.custom-control-label:before,.custom-control-input[disabled]~.custom-control-label:before{background-color:#e9ecef}.custom-control-label{position:relative;margin-bottom:0;vertical-align:top}.custom-control-label:before{pointer-events:none;background-color:#fff;border:1px solid #adb5bd}.custom-control-label:after,.custom-control-label:before{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;content:""}.custom-control-label:after{background:no-repeat 50%/50% 50%}.custom-checkbox .custom-control-label:before{border-radius:.25rem}.custom-checkbox .custom-control-input:checked~.custom-control-label:after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26l2.974 2.99L8 2.193z'/%3e%3c/svg%3e")}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label:before{border-color:#2b99a8;background-color:#2b99a8}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label:after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3e%3cpath stroke='%23fff' d='M0 2h4'/%3e%3c/svg%3e")}.custom-checkbox .custom-control-input:disabled:checked~.custom-control-label:before,.custom-checkbox .custom-control-input:disabled:indeterminate~.custom-control-label:before{background-color:rgba(43,153,168,.5)}.custom-radio .custom-control-label:before{border-radius:50%}.custom-radio .custom-control-input:checked~.custom-control-label:after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e")}.custom-radio .custom-control-input:disabled:checked~.custom-control-label:before{background-color:rgba(43,153,168,.5)}.custom-switch{padding-left:2.25rem}.custom-switch .custom-control-label:before{left:-2.25rem;width:1.75rem;pointer-events:all;border-radius:.5rem}.custom-switch .custom-control-label:after{top:calc(.25rem + 2px);left:calc(-2.25rem + 2px);width:calc(1rem - 4px);height:calc(1rem - 4px);background-color:#adb5bd;border-radius:.5rem;transition:transform .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.custom-switch .custom-control-label:after{transition:none}}.custom-switch .custom-control-input:checked~.custom-control-label:after{background-color:#fff;transform:translateX(.75rem)}.custom-switch .custom-control-input:disabled:checked~.custom-control-label:before{background-color:rgba(43,153,168,.5)}.custom-select{display:inline-block;width:100%;height:calc(1.5em + .75rem + 2px);padding:.375rem 1.75rem .375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;vertical-align:middle;background:#fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px;border:1px solid #ced4da;border-radius:.25rem;-moz-appearance:none;appearance:none}.custom-select:focus{border-color:#76d0dc;outline:0;box-shadow:0 0 0 .2rem rgba(43,153,168,.25)}.custom-select:focus::-ms-value{color:#495057;background-color:#fff}.custom-select[multiple],.custom-select[size]:not([size="1"]){height:auto;padding-right:.75rem;background-image:none}.custom-select:disabled{color:#6c757d;background-color:#e9ecef}.custom-select::-ms-expand{display:none}.custom-select:-moz-focusring{color:transparent;text-shadow:0 0 0 #495057}.custom-select-sm{height:calc(1.5em + .5rem + 2px);padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;font-size:.875rem}.custom-select-lg{height:calc(1.5em + 1rem + 2px);padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.25rem}.custom-file{display:inline-block;margin-bottom:0}.custom-file,.custom-file-input{position:relative;width:100%;height:calc(1.5em + .75rem + 2px)}.custom-file-input{z-index:2;margin:0;opacity:0}.custom-file-input:focus~.custom-file-label{border-color:#76d0dc;box-shadow:0 0 0 .2rem rgba(43,153,168,.25)}.custom-file-input:disabled~.custom-file-label,.custom-file-input[disabled]~.custom-file-label{background-color:#e9ecef}.custom-file-input:lang(en)~.custom-file-label:after{content:"Browse"}.custom-file-input~.custom-file-label[data-browse]:after{content:attr(data-browse)}.custom-file-label{left:0;z-index:1;height:calc(1.5em + .75rem + 2px);font-weight:400;background-color:#fff;border:1px solid #ced4da;border-radius:.25rem}.custom-file-label,.custom-file-label:after{position:absolute;top:0;right:0;padding:.375rem .75rem;line-height:1.5;color:#495057}.custom-file-label:after{bottom:0;z-index:3;display:block;height:calc(1.5em + .75rem);content:"Browse";background-color:#e9ecef;border-left:inherit;border-radius:0 .25rem .25rem 0}.custom-range{width:100%;height:1.4rem;padding:0;background-color:initial;-moz-appearance:none;appearance:none}.custom-range:focus{outline:none}.custom-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(43,153,168,.25)}.custom-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(43,153,168,.25)}.custom-range:focus::-ms-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(43,153,168,.25)}.custom-range::-moz-focus-outer{border:0}.custom-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;background-color:#2b99a8;border:0;border-radius:1rem;-webkit-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-webkit-slider-thumb{-webkit-transition:none;transition:none}}.custom-range::-webkit-slider-thumb:active{background-color:#9fdee6}.custom-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.custom-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#2b99a8;border:0;border-radius:1rem;-moz-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-moz-range-thumb{-moz-transition:none;transition:none}}.custom-range::-moz-range-thumb:active{background-color:#9fdee6}.custom-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.custom-range::-ms-thumb{width:1rem;height:1rem;margin-top:0;margin-right:.2rem;margin-left:.2rem;background-color:#2b99a8;border:0;border-radius:1rem;-ms-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-ms-thumb{-ms-transition:none;transition:none}}.custom-range::-ms-thumb:active{background-color:#9fdee6}.custom-range::-ms-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:initial;border-color:transparent;border-width:.5rem}.custom-range::-ms-fill-lower,.custom-range::-ms-fill-upper{background-color:#dee2e6;border-radius:1rem}.custom-range::-ms-fill-upper{margin-right:15px}.custom-range:disabled::-webkit-slider-thumb{background-color:#adb5bd}.custom-range:disabled::-webkit-slider-runnable-track{cursor:default}.custom-range:disabled::-moz-range-thumb{background-color:#adb5bd}.custom-range:disabled::-moz-range-track{cursor:default}.custom-range:disabled::-ms-thumb{background-color:#adb5bd}.custom-control-label:before,.custom-file-label,.custom-select{transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.custom-control-label:before,.custom-file-label,.custom-select{transition:none}}.nav{display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:.5rem 1rem}.nav-link:focus,.nav-link:hover{text-decoration:none}.nav-link.disabled{color:#6c757d;pointer-events:none;cursor:default}.nav-tabs{border-bottom:1px solid #dee2e6}.nav-tabs .nav-item{margin-bottom:-1px}.nav-tabs .nav-link{border:1px solid transparent;border-top-left-radius:.25rem;border-top-right-radius:.25rem}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{border-color:#e9ecef #e9ecef #dee2e6}.nav-tabs .nav-link.disabled{color:#6c757d;background-color:initial;border-color:transparent}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:#495057;background-color:#fff;border-color:#dee2e6 #dee2e6 #fff}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.nav-pills .nav-link{border-radius:.25rem}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:#fff;background-color:#2b99a8}.nav-fill .nav-item,.nav-fill>.nav-link{flex:1 1 auto;text-align:center}.nav-justified .nav-item,.nav-justified>.nav-link{flex-basis:0;flex-grow:1;text-align:center}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{position:relative;padding:.5rem 1rem}.navbar,.navbar .container,.navbar .container-fluid,.navbar .container-lg,.navbar .container-md,.navbar .container-sm,.navbar .container-xl{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between}.navbar-brand{display:inline-block;padding-top:.3125rem;padding-bottom:.3125rem;margin-right:1rem;font-size:1.25rem;line-height:inherit;white-space:nowrap}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-nav{display:flex;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link{padding-right:0;padding-left:0}.navbar-nav .dropdown-menu{position:static;float:none}.navbar-text{display:inline-block;padding-top:.5rem;padding-bottom:.5rem}.navbar-collapse{flex-basis:100%;flex-grow:1;align-items:center}.navbar-toggler{padding:.25rem .75rem;font-size:1.25rem;line-height:1;background-color:initial;border:1px solid transparent;border-radius:.25rem}.navbar-toggler:focus,.navbar-toggler:hover{text-decoration:none}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;content:"";background:no-repeat 50%;background-size:100% 100%}@media (max-width:575.98px){.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid,.navbar-expand-sm>.container-lg,.navbar-expand-sm>.container-md,.navbar-expand-sm>.container-sm,.navbar-expand-sm>.container-xl{padding-right:0;padding-left:0}}@media (min-width:576px){.navbar-expand-sm{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand-sm .navbar-nav{flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid,.navbar-expand-sm>.container-lg,.navbar-expand-sm>.container-md,.navbar-expand-sm>.container-sm,.navbar-expand-sm>.container-xl{flex-wrap:nowrap}.navbar-expand-sm .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}}@media (max-width:767.98px){.navbar-expand-md>.container,.navbar-expand-md>.container-fluid,.navbar-expand-md>.container-lg,.navbar-expand-md>.container-md,.navbar-expand-md>.container-sm,.navbar-expand-md>.container-xl{padding-right:0;padding-left:0}}@media (min-width:768px){.navbar-expand-md{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand-md .navbar-nav{flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-md>.container,.navbar-expand-md>.container-fluid,.navbar-expand-md>.container-lg,.navbar-expand-md>.container-md,.navbar-expand-md>.container-sm,.navbar-expand-md>.container-xl{flex-wrap:nowrap}.navbar-expand-md .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}}@media (max-width:991.98px){.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid,.navbar-expand-lg>.container-lg,.navbar-expand-lg>.container-md,.navbar-expand-lg>.container-sm,.navbar-expand-lg>.container-xl{padding-right:0;padding-left:0}}@media (min-width:992px){.navbar-expand-lg{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand-lg .navbar-nav{flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid,.navbar-expand-lg>.container-lg,.navbar-expand-lg>.container-md,.navbar-expand-lg>.container-sm,.navbar-expand-lg>.container-xl{flex-wrap:nowrap}.navbar-expand-lg .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}}@media (max-width:1199.98px){.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid,.navbar-expand-xl>.container-lg,.navbar-expand-xl>.container-md,.navbar-expand-xl>.container-sm,.navbar-expand-xl>.container-xl{padding-right:0;padding-left:0}}@media (min-width:1200px){.navbar-expand-xl{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand-xl .navbar-nav{flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid,.navbar-expand-xl>.container-lg,.navbar-expand-xl>.container-md,.navbar-expand-xl>.container-sm,.navbar-expand-xl>.container-xl{flex-wrap:nowrap}.navbar-expand-xl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}}@media (max-width:1449.98px){.navbar-expand-2xl>.container,.navbar-expand-2xl>.container-fluid,.navbar-expand-2xl>.container-lg,.navbar-expand-2xl>.container-md,.navbar-expand-2xl>.container-sm,.navbar-expand-2xl>.container-xl{padding-right:0;padding-left:0}}@media (min-width:1450px){.navbar-expand-2xl{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand-2xl .navbar-nav{flex-direction:row}.navbar-expand-2xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-2xl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-2xl>.container,.navbar-expand-2xl>.container-fluid,.navbar-expand-2xl>.container-lg,.navbar-expand-2xl>.container-md,.navbar-expand-2xl>.container-sm,.navbar-expand-2xl>.container-xl{flex-wrap:nowrap}.navbar-expand-2xl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-2xl .navbar-toggler{display:none}}.navbar-expand{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand>.container,.navbar-expand>.container-fluid,.navbar-expand>.container-lg,.navbar-expand>.container-md,.navbar-expand>.container-sm,.navbar-expand>.container-xl{padding-right:0;padding-left:0}.navbar-expand .navbar-nav{flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand>.container,.navbar-expand>.container-fluid,.navbar-expand>.container-lg,.navbar-expand>.container-md,.navbar-expand>.container-sm,.navbar-expand>.container-xl{flex-wrap:nowrap}.navbar-expand .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-light .navbar-brand,.navbar-light .navbar-brand:focus,.navbar-light .navbar-brand:hover{color:rgba(0,0,0,.9)}.navbar-light .navbar-nav .nav-link{color:rgba(0,0,0,.5)}.navbar-light .navbar-nav .nav-link:focus,.navbar-light .navbar-nav .nav-link:hover{color:rgba(0,0,0,.7)}.navbar-light .navbar-nav .nav-link.disabled{color:rgba(0,0,0,.3)}.navbar-light .navbar-nav .active>.nav-link,.navbar-light .navbar-nav .nav-link.active,.navbar-light .navbar-nav .nav-link.show,.navbar-light .navbar-nav .show>.nav-link{color:rgba(0,0,0,.9)}.navbar-light .navbar-toggler{color:rgba(0,0,0,.5);border-color:rgba(0,0,0,.1)}.navbar-light .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-light .navbar-text{color:rgba(0,0,0,.5)}.navbar-light .navbar-text a,.navbar-light .navbar-text a:focus,.navbar-light .navbar-text a:hover{color:rgba(0,0,0,.9)}.navbar-dark .navbar-brand,.navbar-dark .navbar-brand:focus,.navbar-dark .navbar-brand:hover{color:#fff}.navbar-dark .navbar-nav .nav-link{color:hsla(0,0%,100%,.5)}.navbar-dark .navbar-nav .nav-link:focus,.navbar-dark .navbar-nav .nav-link:hover{color:hsla(0,0%,100%,.75)}.navbar-dark .navbar-nav .nav-link.disabled{color:hsla(0,0%,100%,.25)}.navbar-dark .navbar-nav .active>.nav-link,.navbar-dark .navbar-nav .nav-link.active,.navbar-dark .navbar-nav .nav-link.show,.navbar-dark .navbar-nav .show>.nav-link{color:#fff}.navbar-dark .navbar-toggler{color:hsla(0,0%,100%,.5);border-color:hsla(0,0%,100%,.1)}.navbar-dark .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-dark .navbar-text{color:hsla(0,0%,100%,.5)}.navbar-dark .navbar-text a,.navbar-dark .navbar-text a:focus,.navbar-dark .navbar-text a:hover{color:#fff}.card,pre{position:relative;display:flex;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:initial;border:1px solid rgba(0,0,0,.125);border-radius:.25rem}.card>hr,pre>hr{margin-right:0;margin-left:0}.card>.list-group,pre>.list-group{border-top:inherit;border-bottom:inherit}.card>.list-group:first-child,pre>.list-group:first-child{border-top-width:0;border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card>.list-group:last-child,pre>.list-group:last-child{border-bottom-width:0;border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card>.card-header+.list-group,.card>.list-group+.card-footer,pre>.card-header+.list-group,pre>.list-group+.card-footer{border-top:0}.card-body{flex:1 1 auto;min-height:1px;padding:1.25rem}.card-title{margin-bottom:.75rem}.card-subtitle{margin-top:-.375rem}.card-subtitle,.card-text:last-child{margin-bottom:0}.card-link:hover{text-decoration:none}.card-link+.card-link{margin-left:1.25rem}.card-header{padding:.75rem 1.25rem;margin-bottom:0;background-color:#f8f9fa;border-bottom:1px solid rgba(0,0,0,.125)}.card-header:first-child{border-radius:calc(.25rem - 1px) calc(.25rem - 1px) 0 0}.card-footer{padding:.75rem 1.25rem;background-color:#f8f9fa;border-top:1px solid rgba(0,0,0,.125)}.card-footer:last-child{border-radius:0 0 calc(.25rem - 1px) calc(.25rem - 1px)}.card-header-tabs{margin-bottom:-.75rem;border-bottom:0}.card-header-pills,.card-header-tabs{margin-right:-.625rem;margin-left:-.625rem}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:1.25rem;border-radius:calc(.25rem - 1px)}.card-img,.card-img-bottom,.card-img-top{flex-shrink:0;width:100%}.card-img,.card-img-top{border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card-img,.card-img-bottom{border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card-deck .card,.card-deck pre{margin-bottom:15px}@media (min-width:576px){.card-deck{display:flex;flex-flow:row wrap;margin-right:-15px;margin-left:-15px}.card-deck .card,.card-deck pre{flex:1 0 0%;margin-right:15px;margin-bottom:0;margin-left:15px}}.card-group>.card,.card-group>pre{margin-bottom:15px}@media (min-width:576px){.card-group{display:flex;flex-flow:row wrap}.card-group>.card,.card-group>pre{flex:1 0 0%;margin-bottom:0}.card-group>.card+.card,.card-group>.card+pre,.card-group>pre+.card,.card-group>pre+pre{margin-left:0;border-left:0}.card-group>.card:not(:last-child),.card-group>pre:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:not(:last-child) .card-header,.card-group>.card:not(:last-child) .card-img-top,.card-group>pre:not(:last-child) .card-header,.card-group>pre:not(:last-child) .card-img-top{border-top-right-radius:0}.card-group>.card:not(:last-child) .card-footer,.card-group>.card:not(:last-child) .card-img-bottom,.card-group>pre:not(:last-child) .card-footer,.card-group>pre:not(:last-child) .card-img-bottom{border-bottom-right-radius:0}.card-group>.card:not(:first-child),.card-group>pre:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:not(:first-child) .card-header,.card-group>.card:not(:first-child) .card-img-top,.card-group>pre:not(:first-child) .card-header,.card-group>pre:not(:first-child) .card-img-top{border-top-left-radius:0}.card-group>.card:not(:first-child) .card-footer,.card-group>.card:not(:first-child) .card-img-bottom,.card-group>pre:not(:first-child) .card-footer,.card-group>pre:not(:first-child) .card-img-bottom{border-bottom-left-radius:0}}.card-columns .card,.card-columns pre{margin-bottom:.75rem}@media (min-width:576px){.card-columns{column-count:3;column-gap:1.25rem;orphans:1;widows:1}.card-columns .card,.card-columns pre{display:inline-block;width:100%}}.accordion{overflow-anchor:none}.accordion>.card,.accordion>pre{overflow:hidden}.accordion>.card:not(:last-of-type),.accordion>pre:not(:last-of-type){border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.accordion>.card:not(:first-of-type),.accordion>pre:not(:first-of-type){border-top-left-radius:0;border-top-right-radius:0}.accordion>.card>.card-header,.accordion>pre>.card-header{border-radius:0;margin-bottom:-1px}.breadcrumb{flex-wrap:wrap;padding:.75rem 1rem;margin-bottom:1rem;list-style:none;background-color:#e9ecef;border-radius:.25rem}.breadcrumb,.breadcrumb-item{display:flex}.breadcrumb-item+.breadcrumb-item{padding-left:.5rem}.breadcrumb-item+.breadcrumb-item:before{display:inline-block;padding-right:.5rem;color:#6c757d;content:"/"}.breadcrumb-item+.breadcrumb-item:hover:before{text-decoration:underline;text-decoration:none}.breadcrumb-item.active{color:#6c757d}.pagination,cd-table .cd-datatable .datatable-footer .datatable-pager ul{display:flex;padding-left:0;list-style:none;border-radius:.25rem}.page-link,cd-table .cd-datatable .datatable-footer .datatable-pager ul li a{position:relative;display:block;padding:.5rem .75rem;margin-left:-1px;line-height:1.25;color:#2b99a8;background-color:#fff;border:1px solid #dee2e6}.page-link:hover,cd-table .cd-datatable .datatable-footer .datatable-pager ul li a:hover{z-index:2;color:#1b626b;text-decoration:none;background-color:#e9ecef;border-color:#dee2e6}.page-link:focus,cd-table .cd-datatable .datatable-footer .datatable-pager ul li a:focus{z-index:3;outline:0;box-shadow:0 0 0 .2rem rgba(43,153,168,.25)}.page-item:first-child .page-link,.page-item:first-child cd-table .cd-datatable .datatable-footer .datatable-pager ul li a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li .page-item:first-child a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li:first-child .page-link,cd-table .cd-datatable .datatable-footer .datatable-pager ul li:first-child a{margin-left:0;border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.page-item:last-child .page-link,.page-item:last-child cd-table .cd-datatable .datatable-footer .datatable-pager ul li a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li .page-item:last-child a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li:last-child .page-link,cd-table .cd-datatable .datatable-footer .datatable-pager ul li:last-child a{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.page-item.active .page-link,.page-item.active cd-table .cd-datatable .datatable-footer .datatable-pager ul li a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li.active .page-link,cd-table .cd-datatable .datatable-footer .datatable-pager ul li.active a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li .page-item.active a{z-index:3;color:#fff;background-color:#2b99a8;border-color:#2b99a8}.page-item.disabled .page-link,.page-item.disabled cd-table .cd-datatable .datatable-footer .datatable-pager ul li a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li.disabled .page-link,cd-table .cd-datatable .datatable-footer .datatable-pager ul li.disabled a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li .page-item.disabled a{color:#6c757d;pointer-events:none;cursor:auto;background-color:#fff;border-color:#dee2e6}.pagination-lg .page-link,.pagination-lg cd-table .cd-datatable .datatable-footer .datatable-pager ul li a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li .pagination-lg a{padding:.75rem 1.5rem;font-size:1.25rem;line-height:1.5}.pagination-lg .page-item:first-child .page-link,.pagination-lg .page-item:first-child cd-table .cd-datatable .datatable-footer .datatable-pager ul li a,.pagination-lg cd-table .cd-datatable .datatable-footer .datatable-pager ul li:first-child .page-link,.pagination-lg cd-table .cd-datatable .datatable-footer .datatable-pager ul li:first-child a,cd-table .cd-datatable .datatable-footer .datatable-pager ul .pagination-lg li:first-child .page-link,cd-table .cd-datatable .datatable-footer .datatable-pager ul .pagination-lg li:first-child a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li .pagination-lg .page-item:first-child a{border-top-left-radius:.3rem;border-bottom-left-radius:.3rem}.pagination-lg .page-item:last-child .page-link,.pagination-lg .page-item:last-child cd-table .cd-datatable .datatable-footer .datatable-pager ul li a,.pagination-lg cd-table .cd-datatable .datatable-footer .datatable-pager ul li:last-child .page-link,.pagination-lg cd-table .cd-datatable .datatable-footer .datatable-pager ul li:last-child a,cd-table .cd-datatable .datatable-footer .datatable-pager ul .pagination-lg li:last-child .page-link,cd-table .cd-datatable .datatable-footer .datatable-pager ul .pagination-lg li:last-child a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li .pagination-lg .page-item:last-child a{border-top-right-radius:.3rem;border-bottom-right-radius:.3rem}.pagination-sm .page-link,.pagination-sm cd-table .cd-datatable .datatable-footer .datatable-pager ul li a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li .pagination-sm a{padding:.25rem .5rem;font-size:.875rem;line-height:1.5}.pagination-sm .page-item:first-child .page-link,.pagination-sm .page-item:first-child cd-table .cd-datatable .datatable-footer .datatable-pager ul li a,.pagination-sm cd-table .cd-datatable .datatable-footer .datatable-pager ul li:first-child .page-link,.pagination-sm cd-table .cd-datatable .datatable-footer .datatable-pager ul li:first-child a,cd-table .cd-datatable .datatable-footer .datatable-pager ul .pagination-sm li:first-child .page-link,cd-table .cd-datatable .datatable-footer .datatable-pager ul .pagination-sm li:first-child a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li .pagination-sm .page-item:first-child a{border-top-left-radius:.2rem;border-bottom-left-radius:.2rem}.pagination-sm .page-item:last-child .page-link,.pagination-sm .page-item:last-child cd-table .cd-datatable .datatable-footer .datatable-pager ul li a,.pagination-sm cd-table .cd-datatable .datatable-footer .datatable-pager ul li:last-child .page-link,.pagination-sm cd-table .cd-datatable .datatable-footer .datatable-pager ul li:last-child a,cd-table .cd-datatable .datatable-footer .datatable-pager ul .pagination-sm li:last-child .page-link,cd-table .cd-datatable .datatable-footer .datatable-pager ul .pagination-sm li:last-child a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li .pagination-sm .page-item:last-child a{border-top-right-radius:.2rem;border-bottom-right-radius:.2rem}.badge{display:inline-block;padding:.25em .4em;font-size:1rem;font-weight:700;line-height:1;text-align:center;white-space:nowrap;vertical-align:initial;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.badge{transition:none}}a.badge:focus,a.badge:hover{text-decoration:none}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.badge-pill{padding-right:.6em;padding-left:.6em;border-radius:10rem}.badge-primary{color:#fff;background-color:#2b99a8}a.badge-primary:focus,a.badge-primary:hover{color:#fff;background-color:#21747f}a.badge-primary.focus,a.badge-primary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(43,153,168,.5)}.badge-secondary{color:#fff;background-color:#374249}a.badge-secondary:focus,a.badge-secondary:hover{color:#fff;background-color:#21282c}a.badge-secondary.focus,a.badge-secondary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(55,66,73,.5)}.badge-success{color:#fff;background-color:#0b0}a.badge-success:focus,a.badge-success:hover{color:#fff;background-color:#080}a.badge-success.focus,a.badge-success:focus{outline:0;box-shadow:0 0 0 .2rem rgba(0,187,0,.5)}.badge-info{color:#fff;background-color:#2b99a8}a.badge-info:focus,a.badge-info:hover{color:#fff;background-color:#21747f}a.badge-info.focus,a.badge-info:focus{outline:0;box-shadow:0 0 0 .2rem rgba(43,153,168,.5)}.badge-warning{color:#212529;background-color:#ffc200}a.badge-warning:focus,a.badge-warning:hover{color:#212529;background-color:#cc9b00}a.badge-warning.focus,a.badge-warning:focus{outline:0;box-shadow:0 0 0 .2rem rgba(255,194,0,.5)}.badge-danger{color:#fff;background-color:#ef5c55}a.badge-danger:focus,a.badge-danger:hover{color:#fff;background-color:#eb2f26}a.badge-danger.focus,a.badge-danger:focus{outline:0;box-shadow:0 0 0 .2rem rgba(239,92,85,.5)}.badge-light{color:#212529;background-color:#f8f9fa}a.badge-light:focus,a.badge-light:hover{color:#212529;background-color:#dae0e5}a.badge-light.focus,a.badge-light:focus{outline:0;box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.badge-dark{color:#fff;background-color:#777}a.badge-dark:focus,a.badge-dark:hover{color:#fff;background-color:#5e5e5e}a.badge-dark.focus,a.badge-dark:focus{outline:0;box-shadow:0 0 0 .2rem hsla(0,0%,46.7%,.5)}.badge-accent{color:#fff;background-color:#ef5c55}a.badge-accent:focus,a.badge-accent:hover{color:#fff;background-color:#eb2f26}a.badge-accent.focus,a.badge-accent:focus{outline:0;box-shadow:0 0 0 .2rem rgba(239,92,85,.5)}.badge-warning-dark{color:#212529;background-color:#fd7e14}a.badge-warning-dark:focus,a.badge-warning-dark:hover{color:#212529;background-color:#dc6502}a.badge-warning-dark.focus,a.badge-warning-dark:focus{outline:0;box-shadow:0 0 0 .2rem rgba(253,126,20,.5)}.jumbotron{padding:2rem 1rem;margin-bottom:2rem;background-color:#e9ecef;border-radius:.3rem}@media (min-width:576px){.jumbotron{padding:4rem 2rem}}.jumbotron-fluid{padding-right:0;padding-left:0;border-radius:0}.alert{position:relative;padding:.75rem 1.25rem;margin-bottom:1rem;border:1px solid transparent;border-radius:.25rem}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:4rem}.alert-dismissible .close{position:absolute;top:0;right:0;padding:.75rem 1.25rem;color:inherit}.alert-primary{color:#165057;background-color:#d5ebee;border-color:#c4e2e7}.alert-primary hr{border-top-color:#b2d9e0}.alert-primary .alert-link{color:#0c2b2e}.alert-secondary{color:#1d2226;background-color:#d7d9db;border-color:#c7cacc}.alert-secondary hr{border-top-color:#babdc0}.alert-secondary .alert-link{color:#070809}.alert-success{color:#006100;background-color:#ccf1cc;border-color:#b8ecb8}.alert-success hr{border-top-color:#a4e7a4}.alert-success .alert-link{color:#002e00}.alert-info{color:#165057;background-color:#d5ebee;border-color:#c4e2e7}.alert-info hr{border-top-color:#b2d9e0}.alert-info .alert-link{color:#0c2b2e}.alert-warning{color:#856500;background-color:#fff3cc;border-color:#ffeeb8}.alert-warning hr{border-top-color:#ffe89f}.alert-warning .alert-link{color:#523e00}.alert-danger{color:#7c302c;background-color:#fcdedd;border-color:#fbd1cf}.alert-danger hr{border-top-color:#f9bab7}.alert-danger .alert-link{color:#56211f}.alert-light{color:#818182;background-color:#fefefe;border-color:#fdfdfe}.alert-light hr{border-top-color:#ececf6}.alert-light .alert-link{color:#686868}.alert-dark{color:#3e3e3e;background-color:#e4e4e4;border-color:#d9d9d9}.alert-dark hr{border-top-color:#ccc}.alert-dark .alert-link{color:#252525}.alert-accent{color:#7c302c;background-color:#fcdedd;border-color:#fbd1cf}.alert-accent hr{border-top-color:#f9bab7}.alert-accent .alert-link{color:#56211f}.alert-warning-dark{color:#84420a;background-color:#ffe5d0;border-color:#fedbbd}.alert-warning-dark hr{border-top-color:#fecda4}.alert-warning-dark .alert-link{color:#552a06}@keyframes progress-bar-stripes{0%{background-position:1rem 0}to{background-position:0 0}}.progress{height:1rem;line-height:0;font-size:.75rem;background-color:#e9ecef;border-radius:.25rem}.progress,.progress-bar{display:flex;overflow:hidden}.progress-bar{flex-direction:column;justify-content:center;color:#fff;text-align:center;white-space:nowrap;background-color:#2b99a8;transition:width .6s ease}@media (prefers-reduced-motion:reduce){.progress-bar{transition:none}}.progress-bar-striped{background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-size:1rem 1rem}.progress-bar-animated{animation:progress-bar-stripes 1s linear infinite}@media (prefers-reduced-motion:reduce){.progress-bar-animated{animation:none}}.media{display:flex;align-items:flex-start}.media-body{flex:1}.list-group{display:flex;flex-direction:column;padding-left:0;margin-bottom:0;border-radius:.25rem}.list-group-item-action{width:100%;color:#495057;text-align:inherit}.list-group-item-action:focus,.list-group-item-action:hover{z-index:1;color:#495057;text-decoration:none;background-color:#f8f9fa}.list-group-item-action:active{color:#212529;background-color:#e9ecef}.list-group-item{position:relative;display:block;padding:.75rem 1.25rem;background-color:#fff;border:1px solid rgba(0,0,0,.125)}.list-group-item:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.list-group-item:last-child{border-bottom-right-radius:inherit;border-bottom-left-radius:inherit}.list-group-item.disabled,.list-group-item:disabled{color:#6c757d;pointer-events:none;background-color:#fff}.list-group-item.active{z-index:2;color:#fff;background-color:#2b99a8;border-color:#2b99a8}.list-group-item+.list-group-item{border-top-width:0}.list-group-item+.list-group-item.active{margin-top:-1px;border-top-width:1px}.list-group-horizontal{flex-direction:row}.list-group-horizontal>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal>.list-group-item.active{margin-top:0}.list-group-horizontal>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}@media (min-width:576px){.list-group-horizontal-sm{flex-direction:row}.list-group-horizontal-sm>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-sm>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-sm>.list-group-item.active{margin-top:0}.list-group-horizontal-sm>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-sm>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:768px){.list-group-horizontal-md{flex-direction:row}.list-group-horizontal-md>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-md>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-md>.list-group-item.active{margin-top:0}.list-group-horizontal-md>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-md>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:992px){.list-group-horizontal-lg{flex-direction:row}.list-group-horizontal-lg>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-lg>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-lg>.list-group-item.active{margin-top:0}.list-group-horizontal-lg>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-lg>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:1200px){.list-group-horizontal-xl{flex-direction:row}.list-group-horizontal-xl>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-xl>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-xl>.list-group-item.active{margin-top:0}.list-group-horizontal-xl>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-xl>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:1450px){.list-group-horizontal-2xl{flex-direction:row}.list-group-horizontal-2xl>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-2xl>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-2xl>.list-group-item.active{margin-top:0}.list-group-horizontal-2xl>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-2xl>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}.list-group-flush{border-radius:0}.list-group-flush>.list-group-item{border-width:0 0 1px}.list-group-flush>.list-group-item:last-child{border-bottom-width:0}.list-group-item-primary{color:#165057;background-color:#c4e2e7}.list-group-item-primary.list-group-item-action:focus,.list-group-item-primary.list-group-item-action:hover{color:#165057;background-color:#b2d9e0}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#165057;border-color:#165057}.list-group-item-secondary{color:#1d2226;background-color:#c7cacc}.list-group-item-secondary.list-group-item-action:focus,.list-group-item-secondary.list-group-item-action:hover{color:#1d2226;background-color:#babdc0}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#1d2226;border-color:#1d2226}.list-group-item-success{color:#006100;background-color:#b8ecb8}.list-group-item-success.list-group-item-action:focus,.list-group-item-success.list-group-item-action:hover{color:#006100;background-color:#a4e7a4}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#006100;border-color:#006100}.list-group-item-info{color:#165057;background-color:#c4e2e7}.list-group-item-info.list-group-item-action:focus,.list-group-item-info.list-group-item-action:hover{color:#165057;background-color:#b2d9e0}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#165057;border-color:#165057}.list-group-item-warning{color:#856500;background-color:#ffeeb8}.list-group-item-warning.list-group-item-action:focus,.list-group-item-warning.list-group-item-action:hover{color:#856500;background-color:#ffe89f}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#856500;border-color:#856500}.list-group-item-danger{color:#7c302c;background-color:#fbd1cf}.list-group-item-danger.list-group-item-action:focus,.list-group-item-danger.list-group-item-action:hover{color:#7c302c;background-color:#f9bab7}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#7c302c;border-color:#7c302c}.list-group-item-light{color:#818182;background-color:#fdfdfe}.list-group-item-light.list-group-item-action:focus,.list-group-item-light.list-group-item-action:hover{color:#818182;background-color:#ececf6}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#818182;border-color:#818182}.list-group-item-dark{color:#3e3e3e;background-color:#d9d9d9}.list-group-item-dark.list-group-item-action:focus,.list-group-item-dark.list-group-item-action:hover{color:#3e3e3e;background-color:#ccc}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#3e3e3e;border-color:#3e3e3e}.list-group-item-accent{color:#7c302c;background-color:#fbd1cf}.list-group-item-accent.list-group-item-action:focus,.list-group-item-accent.list-group-item-action:hover{color:#7c302c;background-color:#f9bab7}.list-group-item-accent.list-group-item-action.active{color:#fff;background-color:#7c302c;border-color:#7c302c}.list-group-item-warning-dark{color:#84420a;background-color:#fedbbd}.list-group-item-warning-dark.list-group-item-action:focus,.list-group-item-warning-dark.list-group-item-action:hover{color:#84420a;background-color:#fecda4}.list-group-item-warning-dark.list-group-item-action.active{color:#fff;background-color:#84420a;border-color:#84420a}.close{float:right;font-size:1.5rem;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.5}.close:hover{color:#000;text-decoration:none}.close:not(:disabled):not(.disabled):focus,.close:not(:disabled):not(.disabled):hover{opacity:.75}button.close{padding:0;background-color:initial;border:0}a.close.disabled{pointer-events:none}.toast{flex-basis:350px;max-width:350px;font-size:.875rem;background-color:hsla(0,0%,100%,.85);background-clip:padding-box;border:1px solid rgba(0,0,0,.1);box-shadow:0 .25rem .75rem rgba(0,0,0,.1);opacity:0;border-radius:.25rem}.toast:not(:last-child){margin-bottom:.75rem}.toast.showing{opacity:1}.toast.show{display:block;opacity:1}.toast.hide{display:none}.toast-header{display:flex;align-items:center;padding:.25rem .75rem;color:#6c757d;background-color:hsla(0,0%,100%,.85);background-clip:padding-box;border-bottom:1px solid rgba(0,0,0,.05);border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.toast-body{padding:.75rem}.modal-open{overflow:hidden}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal{position:fixed;top:0;left:0;z-index:1050;display:none;width:100%;height:100%;overflow:hidden;outline:0}.modal-dialog{position:relative;width:auto;margin:.5rem;pointer-events:none}.modal.fade .modal-dialog{transition:transform .3s ease-out;transform:translateY(-50px)}@media (prefers-reduced-motion:reduce){.modal.fade .modal-dialog{transition:none}}.modal.show .modal-dialog{transform:none}.modal.modal-static .modal-dialog{transform:scale(1.02)}.modal-dialog-scrollable{display:flex;max-height:calc(100% - 1rem)}.modal-dialog-scrollable .modal-content{max-height:calc(100vh - 1rem);overflow:hidden}.modal-dialog-scrollable .modal-footer,.modal-dialog-scrollable .modal-header{flex-shrink:0}.modal-dialog-scrollable .modal-body{overflow-y:auto}.modal-dialog-centered{display:flex;align-items:center;min-height:calc(100% - 1rem)}.modal-dialog-centered:before{display:block;height:calc(100vh - 1rem);height:min-content;content:""}.modal-dialog-centered.modal-dialog-scrollable{flex-direction:column;justify-content:center;height:100%}.modal-dialog-centered.modal-dialog-scrollable .modal-content{max-height:none}.modal-dialog-centered.modal-dialog-scrollable:before{content:none}.modal-content{position:relative;display:flex;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem;outline:0}.modal-backdrop{position:fixed;top:0;left:0;z-index:1040;width:100vw;height:100vh;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:.5}.modal-header{display:flex;align-items:flex-start;justify-content:space-between;padding:1rem;border-bottom:1px solid #dee2e6;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.modal-header .close{padding:1rem;margin:-1rem -1rem -1rem auto}.modal-title{margin-bottom:0;line-height:1.5}.modal-body{position:relative;flex:1 1 auto;padding:1rem}.modal-footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;padding:.75rem;border-top:1px solid #dee2e6;border-bottom-right-radius:calc(.3rem - 1px);border-bottom-left-radius:calc(.3rem - 1px)}.modal-footer>*{margin:.25rem}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:576px){.modal-dialog{max-width:500px;margin:1.75rem auto}.modal-dialog-scrollable{max-height:calc(100% - 3.5rem)}.modal-dialog-scrollable .modal-content{max-height:calc(100vh - 3.5rem)}.modal-dialog-centered{min-height:calc(100% - 3.5rem)}.modal-dialog-centered:before{height:calc(100vh - 3.5rem);height:min-content}.modal-sm{max-width:300px}}@media (min-width:992px){.modal-lg,.modal-xl{max-width:800px}}@media (min-width:1200px){.modal-xl{max-width:1140px}}.tooltip{position:absolute;z-index:1070;display:block;margin:0;font-family:Helvetica Neue,Helvetica,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;opacity:0}.tooltip.show{opacity:.9}.tooltip .arrow{position:absolute;display:block;width:.8rem;height:.4rem}.tooltip .arrow:before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-auto[x-placement^=top],.bs-tooltip-top{padding:.4rem 0}.bs-tooltip-auto[x-placement^=top] .arrow,.bs-tooltip-top .arrow{bottom:0}.bs-tooltip-auto[x-placement^=top] .arrow:before,.bs-tooltip-top .arrow:before{top:0;border-width:.4rem .4rem 0;border-top-color:#212529}.bs-tooltip-auto[x-placement^=right],.bs-tooltip-right{padding:0 .4rem}.bs-tooltip-auto[x-placement^=right] .arrow,.bs-tooltip-right .arrow{left:0;width:.4rem;height:.8rem}.bs-tooltip-auto[x-placement^=right] .arrow:before,.bs-tooltip-right .arrow:before{right:0;border-width:.4rem .4rem .4rem 0;border-right-color:#212529}.bs-tooltip-auto[x-placement^=bottom],.bs-tooltip-bottom{padding:.4rem 0}.bs-tooltip-auto[x-placement^=bottom] .arrow,.bs-tooltip-bottom .arrow{top:0}.bs-tooltip-auto[x-placement^=bottom] .arrow:before,.bs-tooltip-bottom .arrow:before{bottom:0;border-width:0 .4rem .4rem;border-bottom-color:#212529}.bs-tooltip-auto[x-placement^=left],.bs-tooltip-left{padding:0 .4rem}.bs-tooltip-auto[x-placement^=left] .arrow,.bs-tooltip-left .arrow{right:0;width:.4rem;height:.8rem}.bs-tooltip-auto[x-placement^=left] .arrow:before,.bs-tooltip-left .arrow:before{left:0;border-width:.4rem 0 .4rem .4rem;border-left-color:#212529}.tooltip-inner{max-width:200px;padding:.25rem .5rem;color:#fff;text-align:center;background-color:#212529;border-radius:.25rem}.popover{top:0;left:0;z-index:1060;max-width:350px;font-family:Helvetica Neue,Helvetica,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:1rem;word-wrap:break-word;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem}.popover,.popover .arrow{position:absolute;display:block}.popover .arrow{width:1rem;height:.5rem;margin:0 .3rem}.popover .arrow:after,.popover .arrow:before{position:absolute;display:block;content:"";border-color:transparent;border-style:solid}.bs-popover-auto[x-placement^=top],.bs-popover-top{margin-bottom:.5rem}.bs-popover-auto[x-placement^=top]>.arrow,.bs-popover-top>.arrow{bottom:calc(-.5rem - 1px)}.bs-popover-auto[x-placement^=top]>.arrow:before,.bs-popover-top>.arrow:before{bottom:0;border-width:.5rem .5rem 0;border-top-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=top]>.arrow:after,.bs-popover-top>.arrow:after{bottom:1px;border-width:.5rem .5rem 0;border-top-color:#fff}.bs-popover-auto[x-placement^=right],.bs-popover-right{margin-left:.5rem}.bs-popover-auto[x-placement^=right]>.arrow,.bs-popover-right>.arrow{left:calc(-.5rem - 1px);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-auto[x-placement^=right]>.arrow:before,.bs-popover-right>.arrow:before{left:0;border-width:.5rem .5rem .5rem 0;border-right-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=right]>.arrow:after,.bs-popover-right>.arrow:after{left:1px;border-width:.5rem .5rem .5rem 0;border-right-color:#fff}.bs-popover-auto[x-placement^=bottom],.bs-popover-bottom{margin-top:.5rem}.bs-popover-auto[x-placement^=bottom]>.arrow,.bs-popover-bottom>.arrow{top:calc(-.5rem - 1px)}.bs-popover-auto[x-placement^=bottom]>.arrow:before,.bs-popover-bottom>.arrow:before{top:0;border-width:0 .5rem .5rem;border-bottom-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=bottom]>.arrow:after,.bs-popover-bottom>.arrow:after{top:1px;border-width:0 .5rem .5rem;border-bottom-color:#fff}.bs-popover-auto[x-placement^=bottom] .popover-header:before,.bs-popover-bottom .popover-header:before{position:absolute;top:0;left:50%;display:block;width:1rem;margin-left:-.5rem;content:"";border-bottom:1px solid #f7f7f7}.bs-popover-auto[x-placement^=left],.bs-popover-left{margin-right:.5rem}.bs-popover-auto[x-placement^=left]>.arrow,.bs-popover-left>.arrow{right:calc(-.5rem - 1px);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-auto[x-placement^=left]>.arrow:before,.bs-popover-left>.arrow:before{right:0;border-width:.5rem 0 .5rem .5rem;border-left-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=left]>.arrow:after,.bs-popover-left>.arrow:after{right:1px;border-width:.5rem 0 .5rem .5rem;border-left-color:#fff}.popover-header{padding:.5rem .75rem;margin-bottom:0;font-size:1rem;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.popover-header:empty{display:none}.popover-body{padding:.5rem .75rem;color:#212529}.carousel{position:relative}.carousel.pointer-event{touch-action:pan-y}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner:after{display:block;clear:both;content:""}.carousel-item{position:relative;display:none;float:left;width:100%;margin-right:-100%;backface-visibility:hidden;transition:transform .6s ease-in-out}@media (prefers-reduced-motion:reduce){.carousel-item{transition:none}}.carousel-item-next,.carousel-item-prev,.carousel-item.active{display:block}.active.carousel-item-right,.carousel-item-next:not(.carousel-item-left){transform:translateX(100%)}.active.carousel-item-left,.carousel-item-prev:not(.carousel-item-right){transform:translateX(-100%)}.carousel-fade .carousel-item{opacity:0;transition-property:opacity;transform:none}.carousel-fade .carousel-item-next.carousel-item-left,.carousel-fade .carousel-item-prev.carousel-item-right,.carousel-fade .carousel-item.active{z-index:1;opacity:1}.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-right{z-index:0;opacity:0;transition:opacity 0s .6s}@media (prefers-reduced-motion:reduce){.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-right{transition:none}}.carousel-control-next,.carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:flex;align-items:center;justify-content:center;width:15%;color:#fff;text-align:center;opacity:.5;transition:opacity .15s ease}@media (prefers-reduced-motion:reduce){.carousel-control-next,.carousel-control-prev{transition:none}}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-next-icon,.carousel-control-prev-icon{display:inline-block;width:20px;height:20px;background:no-repeat 50%/100% 100%}.carousel-control-prev-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M5.25 0l-4 4 4 4 1.5-1.5L4.25 4l2.5-2.5L5.25 0z'/%3e%3c/svg%3e")}.carousel-control-next-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M2.75 0l-1.5 1.5L3.75 4l-2.5 2.5L2.75 8l4-4-4-4z'/%3e%3c/svg%3e")}.carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:15;display:flex;justify-content:center;padding-left:0;margin-right:15%;margin-left:15%;list-style:none}.carousel-indicators li{box-sizing:initial;flex:0 1 auto;width:30px;height:3px;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:#fff;background-clip:padding-box;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:.5;transition:opacity .6s ease}@media (prefers-reduced-motion:reduce){.carousel-indicators li{transition:none}}.carousel-indicators .active{opacity:1}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center}@keyframes spinner-border{to{transform:rotate(1turn)}}.spinner-border{display:inline-block;width:2rem;height:2rem;vertical-align:text-bottom;border:.25em solid;border-right:.25em solid transparent;border-radius:50%;animation:spinner-border .75s linear infinite}.spinner-border-sm{width:1rem;height:1rem;border-width:.2em}@keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}.spinner-grow{display:inline-block;width:2rem;height:2rem;vertical-align:text-bottom;background-color:currentColor;border-radius:50%;opacity:0;animation:spinner-grow .75s linear infinite}.spinner-grow-sm{width:1rem;height:1rem}.align-baseline{vertical-align:initial!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.bg-primary{background-color:#2b99a8!important}a.bg-primary:focus,a.bg-primary:hover,button.bg-primary:focus,button.bg-primary:hover{background-color:#21747f!important}.bg-secondary{background-color:#374249!important}a.bg-secondary:focus,a.bg-secondary:hover,button.bg-secondary:focus,button.bg-secondary:hover{background-color:#21282c!important}.bg-success{background-color:#0b0!important}a.bg-success:focus,a.bg-success:hover,button.bg-success:focus,button.bg-success:hover{background-color:#080!important}.bg-info{background-color:#2b99a8!important}a.bg-info:focus,a.bg-info:hover,button.bg-info:focus,button.bg-info:hover{background-color:#21747f!important}.bg-warning{background-color:#ffc200!important}a.bg-warning:focus,a.bg-warning:hover,button.bg-warning:focus,button.bg-warning:hover{background-color:#cc9b00!important}.bg-danger{background-color:#ef5c55!important}a.bg-danger:focus,a.bg-danger:hover,button.bg-danger:focus,button.bg-danger:hover{background-color:#eb2f26!important}.bg-light,pre{background-color:#f8f9fa!important}a.bg-light:focus,a.bg-light:hover,button.bg-light:focus,button.bg-light:hover{background-color:#dae0e5!important}.bg-dark{background-color:#777!important}a.bg-dark:focus,a.bg-dark:hover,button.bg-dark:focus,button.bg-dark:hover{background-color:#5e5e5e!important}.bg-accent{background-color:#ef5c55!important}a.bg-accent:focus,a.bg-accent:hover,button.bg-accent:focus,button.bg-accent:hover{background-color:#eb2f26!important}.bg-warning-dark{background-color:#fd7e14!important}a.bg-warning-dark:focus,a.bg-warning-dark:hover,button.bg-warning-dark:focus,button.bg-warning-dark:hover{background-color:#dc6502!important}.bg-white{background-color:#fff!important}.bg-transparent{background-color:initial!important}.border{border:1px solid #dee2e6!important}.border-top{border-top:1px solid #dee2e6!important}.border-right{border-right:1px solid #dee2e6!important}.border-bottom,.cd-header,legend{border-bottom:1px solid #dee2e6!important}.border-left{border-left:1px solid #dee2e6!important}.border-0{border:0!important}.border-top-0{border-top:0!important}.border-right-0{border-right:0!important}.border-bottom-0{border-bottom:0!important}.border-left-0{border-left:0!important}.border-primary{border-color:#2b99a8!important}.border-secondary{border-color:#374249!important}.border-success{border-color:#0b0!important}.border-info{border-color:#2b99a8!important}.border-warning{border-color:#ffc200!important}.border-danger{border-color:#ef5c55!important}.border-light{border-color:#f8f9fa!important}.border-dark{border-color:#777!important}.border-accent{border-color:#ef5c55!important}.border-warning-dark{border-color:#fd7e14!important}.border-white{border-color:#fff!important}.rounded-sm{border-radius:.2rem!important}.rounded{border-radius:.25rem!important}.rounded-top{border-top-left-radius:.25rem!important}.rounded-right,.rounded-top{border-top-right-radius:.25rem!important}.rounded-bottom,.rounded-right{border-bottom-right-radius:.25rem!important}.rounded-bottom,.rounded-left{border-bottom-left-radius:.25rem!important}.rounded-left{border-top-left-radius:.25rem!important}.rounded-lg{border-radius:.3rem!important}.rounded-circle{border-radius:50%!important}.rounded-pill{border-radius:50rem!important}.rounded-0{border-radius:0!important}.clearfix:after{display:block;clear:both;content:""}.d-none{display:none!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex,cd-health cd-info-card{display:flex!important}.d-inline-flex{display:inline-flex!important}@media (min-width:576px){.d-sm-none{display:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:flex!important}.d-sm-inline-flex{display:inline-flex!important}}@media (min-width:768px){.d-md-none{display:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:flex!important}.d-md-inline-flex{display:inline-flex!important}}@media (min-width:992px){.d-lg-none{display:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:flex!important}.d-lg-inline-flex{display:inline-flex!important}}@media (min-width:1200px){.d-xl-none{display:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:flex!important}.d-xl-inline-flex{display:inline-flex!important}}@media (min-width:1450px){.d-2xl-none{display:none!important}.d-2xl-inline{display:inline!important}.d-2xl-inline-block{display:inline-block!important}.d-2xl-block{display:block!important}.d-2xl-table{display:table!important}.d-2xl-table-row{display:table-row!important}.d-2xl-table-cell{display:table-cell!important}.d-2xl-flex{display:flex!important}.d-2xl-inline-flex{display:inline-flex!important}}@media print{.d-print-none{display:none!important}.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:flex!important}.d-print-inline-flex{display:inline-flex!important}}.embed-responsive{position:relative;display:block;width:100%;padding:0;overflow:hidden}.embed-responsive:before{display:block;content:""}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-21by9:before{padding-top:42.8571428571%}.embed-responsive-16by9:before{padding-top:56.25%}.embed-responsive-4by3:before{padding-top:75%}.embed-responsive-1by1:before{padding-top:100%}.flex-row{flex-direction:row!important}.flex-column,cd-health cd-info-card{flex-direction:column!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-column-reverse{flex-direction:column-reverse!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.flex-wrap-reverse{flex-wrap:wrap-reverse!important}.flex-fill{flex:1 1 auto!important}.flex-grow-0{flex-grow:0!important}.flex-grow-1{flex-grow:1!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.justify-content-start{justify-content:flex-start!important}.justify-content-end{justify-content:flex-end!important}.justify-content-center{justify-content:center!important}.justify-content-between{justify-content:space-between!important}.justify-content-around{justify-content:space-around!important}.align-items-start{align-items:flex-start!important}.align-items-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-baseline{align-items:baseline!important}.align-items-stretch{align-items:stretch!important}.align-content-start{align-content:flex-start!important}.align-content-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-between{align-content:space-between!important}.align-content-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-self-auto{align-self:auto!important}.align-self-start{align-self:flex-start!important}.align-self-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-baseline{align-self:baseline!important}.align-self-stretch{align-self:stretch!important}@media (min-width:576px){.flex-sm-row{flex-direction:row!important}.flex-sm-column{flex-direction:column!important}.flex-sm-row-reverse{flex-direction:row-reverse!important}.flex-sm-column-reverse{flex-direction:column-reverse!important}.flex-sm-wrap{flex-wrap:wrap!important}.flex-sm-nowrap{flex-wrap:nowrap!important}.flex-sm-wrap-reverse{flex-wrap:wrap-reverse!important}.flex-sm-fill{flex:1 1 auto!important}.flex-sm-grow-0{flex-grow:0!important}.flex-sm-grow-1{flex-grow:1!important}.flex-sm-shrink-0{flex-shrink:0!important}.flex-sm-shrink-1{flex-shrink:1!important}.justify-content-sm-start{justify-content:flex-start!important}.justify-content-sm-end{justify-content:flex-end!important}.justify-content-sm-center{justify-content:center!important}.justify-content-sm-between{justify-content:space-between!important}.justify-content-sm-around{justify-content:space-around!important}.align-items-sm-start{align-items:flex-start!important}.align-items-sm-end{align-items:flex-end!important}.align-items-sm-center{align-items:center!important}.align-items-sm-baseline{align-items:baseline!important}.align-items-sm-stretch{align-items:stretch!important}.align-content-sm-start{align-content:flex-start!important}.align-content-sm-end{align-content:flex-end!important}.align-content-sm-center{align-content:center!important}.align-content-sm-between{align-content:space-between!important}.align-content-sm-around{align-content:space-around!important}.align-content-sm-stretch{align-content:stretch!important}.align-self-sm-auto{align-self:auto!important}.align-self-sm-start{align-self:flex-start!important}.align-self-sm-end{align-self:flex-end!important}.align-self-sm-center{align-self:center!important}.align-self-sm-baseline{align-self:baseline!important}.align-self-sm-stretch{align-self:stretch!important}}@media (min-width:768px){.flex-md-row{flex-direction:row!important}.flex-md-column{flex-direction:column!important}.flex-md-row-reverse{flex-direction:row-reverse!important}.flex-md-column-reverse{flex-direction:column-reverse!important}.flex-md-wrap{flex-wrap:wrap!important}.flex-md-nowrap{flex-wrap:nowrap!important}.flex-md-wrap-reverse{flex-wrap:wrap-reverse!important}.flex-md-fill{flex:1 1 auto!important}.flex-md-grow-0{flex-grow:0!important}.flex-md-grow-1{flex-grow:1!important}.flex-md-shrink-0{flex-shrink:0!important}.flex-md-shrink-1{flex-shrink:1!important}.justify-content-md-start{justify-content:flex-start!important}.justify-content-md-end{justify-content:flex-end!important}.justify-content-md-center{justify-content:center!important}.justify-content-md-between{justify-content:space-between!important}.justify-content-md-around{justify-content:space-around!important}.align-items-md-start{align-items:flex-start!important}.align-items-md-end{align-items:flex-end!important}.align-items-md-center{align-items:center!important}.align-items-md-baseline{align-items:baseline!important}.align-items-md-stretch{align-items:stretch!important}.align-content-md-start{align-content:flex-start!important}.align-content-md-end{align-content:flex-end!important}.align-content-md-center{align-content:center!important}.align-content-md-between{align-content:space-between!important}.align-content-md-around{align-content:space-around!important}.align-content-md-stretch{align-content:stretch!important}.align-self-md-auto{align-self:auto!important}.align-self-md-start{align-self:flex-start!important}.align-self-md-end{align-self:flex-end!important}.align-self-md-center{align-self:center!important}.align-self-md-baseline{align-self:baseline!important}.align-self-md-stretch{align-self:stretch!important}}@media (min-width:992px){.flex-lg-row{flex-direction:row!important}.flex-lg-column{flex-direction:column!important}.flex-lg-row-reverse{flex-direction:row-reverse!important}.flex-lg-column-reverse{flex-direction:column-reverse!important}.flex-lg-wrap{flex-wrap:wrap!important}.flex-lg-nowrap{flex-wrap:nowrap!important}.flex-lg-wrap-reverse{flex-wrap:wrap-reverse!important}.flex-lg-fill{flex:1 1 auto!important}.flex-lg-grow-0{flex-grow:0!important}.flex-lg-grow-1{flex-grow:1!important}.flex-lg-shrink-0{flex-shrink:0!important}.flex-lg-shrink-1{flex-shrink:1!important}.justify-content-lg-start{justify-content:flex-start!important}.justify-content-lg-end{justify-content:flex-end!important}.justify-content-lg-center{justify-content:center!important}.justify-content-lg-between{justify-content:space-between!important}.justify-content-lg-around{justify-content:space-around!important}.align-items-lg-start{align-items:flex-start!important}.align-items-lg-end{align-items:flex-end!important}.align-items-lg-center{align-items:center!important}.align-items-lg-baseline{align-items:baseline!important}.align-items-lg-stretch{align-items:stretch!important}.align-content-lg-start{align-content:flex-start!important}.align-content-lg-end{align-content:flex-end!important}.align-content-lg-center{align-content:center!important}.align-content-lg-between{align-content:space-between!important}.align-content-lg-around{align-content:space-around!important}.align-content-lg-stretch{align-content:stretch!important}.align-self-lg-auto{align-self:auto!important}.align-self-lg-start{align-self:flex-start!important}.align-self-lg-end{align-self:flex-end!important}.align-self-lg-center{align-self:center!important}.align-self-lg-baseline{align-self:baseline!important}.align-self-lg-stretch{align-self:stretch!important}}@media (min-width:1200px){.flex-xl-row{flex-direction:row!important}.flex-xl-column{flex-direction:column!important}.flex-xl-row-reverse{flex-direction:row-reverse!important}.flex-xl-column-reverse{flex-direction:column-reverse!important}.flex-xl-wrap{flex-wrap:wrap!important}.flex-xl-nowrap{flex-wrap:nowrap!important}.flex-xl-wrap-reverse{flex-wrap:wrap-reverse!important}.flex-xl-fill{flex:1 1 auto!important}.flex-xl-grow-0{flex-grow:0!important}.flex-xl-grow-1{flex-grow:1!important}.flex-xl-shrink-0{flex-shrink:0!important}.flex-xl-shrink-1{flex-shrink:1!important}.justify-content-xl-start{justify-content:flex-start!important}.justify-content-xl-end{justify-content:flex-end!important}.justify-content-xl-center{justify-content:center!important}.justify-content-xl-between{justify-content:space-between!important}.justify-content-xl-around{justify-content:space-around!important}.align-items-xl-start{align-items:flex-start!important}.align-items-xl-end{align-items:flex-end!important}.align-items-xl-center{align-items:center!important}.align-items-xl-baseline{align-items:baseline!important}.align-items-xl-stretch{align-items:stretch!important}.align-content-xl-start{align-content:flex-start!important}.align-content-xl-end{align-content:flex-end!important}.align-content-xl-center{align-content:center!important}.align-content-xl-between{align-content:space-between!important}.align-content-xl-around{align-content:space-around!important}.align-content-xl-stretch{align-content:stretch!important}.align-self-xl-auto{align-self:auto!important}.align-self-xl-start{align-self:flex-start!important}.align-self-xl-end{align-self:flex-end!important}.align-self-xl-center{align-self:center!important}.align-self-xl-baseline{align-self:baseline!important}.align-self-xl-stretch{align-self:stretch!important}}@media (min-width:1450px){.flex-2xl-row{flex-direction:row!important}.flex-2xl-column{flex-direction:column!important}.flex-2xl-row-reverse{flex-direction:row-reverse!important}.flex-2xl-column-reverse{flex-direction:column-reverse!important}.flex-2xl-wrap{flex-wrap:wrap!important}.flex-2xl-nowrap{flex-wrap:nowrap!important}.flex-2xl-wrap-reverse{flex-wrap:wrap-reverse!important}.flex-2xl-fill{flex:1 1 auto!important}.flex-2xl-grow-0{flex-grow:0!important}.flex-2xl-grow-1{flex-grow:1!important}.flex-2xl-shrink-0{flex-shrink:0!important}.flex-2xl-shrink-1{flex-shrink:1!important}.justify-content-2xl-start{justify-content:flex-start!important}.justify-content-2xl-end{justify-content:flex-end!important}.justify-content-2xl-center{justify-content:center!important}.justify-content-2xl-between{justify-content:space-between!important}.justify-content-2xl-around{justify-content:space-around!important}.align-items-2xl-start{align-items:flex-start!important}.align-items-2xl-end{align-items:flex-end!important}.align-items-2xl-center{align-items:center!important}.align-items-2xl-baseline{align-items:baseline!important}.align-items-2xl-stretch{align-items:stretch!important}.align-content-2xl-start{align-content:flex-start!important}.align-content-2xl-end{align-content:flex-end!important}.align-content-2xl-center{align-content:center!important}.align-content-2xl-between{align-content:space-between!important}.align-content-2xl-around{align-content:space-around!important}.align-content-2xl-stretch{align-content:stretch!important}.align-self-2xl-auto{align-self:auto!important}.align-self-2xl-start{align-self:flex-start!important}.align-self-2xl-end{align-self:flex-end!important}.align-self-2xl-center{align-self:center!important}.align-self-2xl-baseline{align-self:baseline!important}.align-self-2xl-stretch{align-self:stretch!important}}.float-left{float:left!important}.float-right{float:right!important}.float-none{float:none!important}@media (min-width:576px){.float-sm-left{float:left!important}.float-sm-right{float:right!important}.float-sm-none{float:none!important}}@media (min-width:768px){.float-md-left{float:left!important}.float-md-right{float:right!important}.float-md-none{float:none!important}}@media (min-width:992px){.float-lg-left{float:left!important}.float-lg-right{float:right!important}.float-lg-none{float:none!important}}@media (min-width:1200px){.float-xl-left{float:left!important}.float-xl-right{float:right!important}.float-xl-none{float:none!important}}@media (min-width:1450px){.float-2xl-left{float:left!important}.float-2xl-right{float:right!important}.float-2xl-none{float:none!important}}.user-select-all{user-select:all!important}.user-select-auto{user-select:auto!important}.user-select-none{user-select:none!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:sticky!important}.fixed-top{top:0}.fixed-bottom,.fixed-top{position:fixed;right:0;left:0;z-index:1030}.fixed-bottom{bottom:0}@supports (position:sticky){.sticky-top{position:sticky;top:0;z-index:1020}}.sr-only{white-space:nowrap}.sr-only-focusable:active,.sr-only-focusable:focus{white-space:normal}.shadow-sm{box-shadow:0 .125rem .25rem rgba(0,0,0,.075)!important}.shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15)!important}.shadow-lg{box-shadow:0 1rem 3rem rgba(0,0,0,.175)!important}.shadow-none{box-shadow:none!important}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mw-100{max-width:100%!important}.mh-100{max-height:100%!important}.min-vw-100{min-width:100vw!important}.min-vh-100{min-height:100vh!important}.vw-100{width:100vw!important}.vh-100{height:100vh!important}.m-0{margin:0!important}.mt-0,.my-0{margin-top:0!important}.mr-0,.mx-0{margin-right:0!important}.mb-0,.my-0{margin-bottom:0!important}.ml-0,.mx-0{margin-left:0!important}.m-1{margin:.25rem!important}.mt-1,.my-1{margin-top:.25rem!important}.mr-1,.mx-1{margin-right:.25rem!important}.mb-1,.my-1{margin-bottom:.25rem!important}.ml-1,.mx-1{margin-left:.25rem!important}.m-2{margin:.5rem!important}.mt-2,.my-2{margin-top:.5rem!important}.btn-toolbar cd-table-actions.btn-group,.mr-2,.mx-2,cd-logs label{margin-right:.5rem!important}.mb-2,.my-2{margin-bottom:.5rem!important}.ml-2,.mx-2{margin-left:.5rem!important}.m-3{margin:1rem!important}.mt-3,.my-3{margin-top:1rem!important}.mr-3,.mx-3,cd-logs .form-inline>.form-group{margin-right:1rem!important}.mb-3,.my-3,cd-logs .form-inline>.form-group{margin-bottom:1rem!important}.ml-3,.mx-3{margin-left:1rem!important}.m-4{margin:1.5rem!important}.cd-header,.mt-4,.my-4,legend{margin-top:1.5rem!important}.mr-4,.mx-4{margin-right:1.5rem!important}.cd-header,.mb-4,.my-4,cd-health cd-info-card,legend{margin-bottom:1.5rem!important}.ml-4,.mx-4{margin-left:1.5rem!important}.m-5{margin:3rem!important}.mt-5,.my-5{margin-top:3rem!important}.mr-5,.mx-5{margin-right:3rem!important}.mb-5,.my-5{margin-bottom:3rem!important}.ml-5,.mx-5{margin-left:3rem!important}.p-0{padding:0!important}.pt-0,.py-0{padding-top:0!important}.pr-0,.px-0{padding-right:0!important}.pb-0,.py-0{padding-bottom:0!important}.pl-0,.px-0{padding-left:0!important}.p-1{padding:.25rem!important}.pt-1,.py-1{padding-top:.25rem!important}.pr-1,.px-1{padding-right:.25rem!important}.cd-header,.pb-1,.py-1,legend{padding-bottom:.25rem!important}.pl-1,.px-1{padding-left:.25rem!important}.p-2,cd-table .cd-datatable .datatable-footer,pre{padding:.5rem!important}.pt-2,.py-2,cd-info-card .card .card-body .card-text,cd-info-card pre .card-body .card-text{padding-top:.5rem!important}.pr-2,.px-2{padding-right:.5rem!important}.pb-2,.py-2,cd-info-card .card,cd-info-card pre{padding-bottom:.5rem!important}.pl-2,.px-2,cd-info-card .card .card-body .card-title,cd-info-card pre .card-body .card-title{padding-left:.5rem!important}.p-3{padding:1rem!important}.pt-3,.py-3{padding-top:1rem!important}.pr-3,.px-3{padding-right:1rem!important}.pb-3,.py-3{padding-bottom:1rem!important}.pl-3,.px-3{padding-left:1rem!important}.p-4{padding:1.5rem!important}.pt-4,.py-4{padding-top:1.5rem!important}.pr-4,.px-4{padding-right:1.5rem!important}.pb-4,.py-4{padding-bottom:1.5rem!important}.pl-4,.px-4{padding-left:1.5rem!important}.p-5{padding:3rem!important}.pt-5,.py-5{padding-top:3rem!important}.pr-5,.px-5{padding-right:3rem!important}.pb-5,.py-5{padding-bottom:3rem!important}.pl-5,.px-5{padding-left:3rem!important}.m-n1{margin:-.25rem!important}.mt-n1,.my-n1{margin-top:-.25rem!important}.mr-n1,.mx-n1{margin-right:-.25rem!important}.mb-n1,.my-n1{margin-bottom:-.25rem!important}.ml-n1,.mx-n1{margin-left:-.25rem!important}.m-n2{margin:-.5rem!important}.mt-n2,.my-n2{margin-top:-.5rem!important}.mr-n2,.mx-n2{margin-right:-.5rem!important}.mb-n2,.my-n2{margin-bottom:-.5rem!important}.ml-n2,.mx-n2{margin-left:-.5rem!important}.m-n3{margin:-1rem!important}.mt-n3,.my-n3{margin-top:-1rem!important}.mr-n3,.mx-n3{margin-right:-1rem!important}.mb-n3,.my-n3{margin-bottom:-1rem!important}.ml-n3,.mx-n3{margin-left:-1rem!important}.m-n4{margin:-1.5rem!important}.mt-n4,.my-n4{margin-top:-1.5rem!important}.mr-n4,.mx-n4{margin-right:-1.5rem!important}.mb-n4,.my-n4{margin-bottom:-1.5rem!important}.ml-n4,.mx-n4{margin-left:-1.5rem!important}.m-n5{margin:-3rem!important}.mt-n5,.my-n5{margin-top:-3rem!important}.mr-n5,.mx-n5{margin-right:-3rem!important}.mb-n5,.my-n5{margin-bottom:-3rem!important}.ml-n5,.mx-n5{margin-left:-3rem!important}.m-auto{margin:auto!important}.mt-auto,.my-auto{margin-top:auto!important}.mr-auto,.mx-auto{margin-right:auto!important}.mb-auto,.my-auto{margin-bottom:auto!important}.ml-auto,.mx-auto{margin-left:auto!important}@media (min-width:576px){.m-sm-0{margin:0!important}.mt-sm-0,.my-sm-0{margin-top:0!important}.mr-sm-0,.mx-sm-0{margin-right:0!important}.mb-sm-0,.my-sm-0{margin-bottom:0!important}.ml-sm-0,.mx-sm-0{margin-left:0!important}.m-sm-1{margin:.25rem!important}.mt-sm-1,.my-sm-1{margin-top:.25rem!important}.mr-sm-1,.mx-sm-1{margin-right:.25rem!important}.mb-sm-1,.my-sm-1{margin-bottom:.25rem!important}.ml-sm-1,.mx-sm-1{margin-left:.25rem!important}.m-sm-2{margin:.5rem!important}.mt-sm-2,.my-sm-2{margin-top:.5rem!important}.mr-sm-2,.mx-sm-2{margin-right:.5rem!important}.mb-sm-2,.my-sm-2{margin-bottom:.5rem!important}.ml-sm-2,.mx-sm-2{margin-left:.5rem!important}.m-sm-3{margin:1rem!important}.mt-sm-3,.my-sm-3{margin-top:1rem!important}.mr-sm-3,.mx-sm-3{margin-right:1rem!important}.mb-sm-3,.my-sm-3{margin-bottom:1rem!important}.ml-sm-3,.mx-sm-3{margin-left:1rem!important}.m-sm-4{margin:1.5rem!important}.mt-sm-4,.my-sm-4{margin-top:1.5rem!important}.mr-sm-4,.mx-sm-4{margin-right:1.5rem!important}.mb-sm-4,.my-sm-4{margin-bottom:1.5rem!important}.ml-sm-4,.mx-sm-4{margin-left:1.5rem!important}.m-sm-5{margin:3rem!important}.mt-sm-5,.my-sm-5{margin-top:3rem!important}.mr-sm-5,.mx-sm-5{margin-right:3rem!important}.mb-sm-5,.my-sm-5{margin-bottom:3rem!important}.ml-sm-5,.mx-sm-5{margin-left:3rem!important}.p-sm-0{padding:0!important}.pt-sm-0,.py-sm-0{padding-top:0!important}.pr-sm-0,.px-sm-0{padding-right:0!important}.pb-sm-0,.py-sm-0{padding-bottom:0!important}.pl-sm-0,.px-sm-0{padding-left:0!important}.p-sm-1{padding:.25rem!important}.pt-sm-1,.py-sm-1{padding-top:.25rem!important}.pr-sm-1,.px-sm-1{padding-right:.25rem!important}.pb-sm-1,.py-sm-1{padding-bottom:.25rem!important}.pl-sm-1,.px-sm-1{padding-left:.25rem!important}.p-sm-2{padding:.5rem!important}.pt-sm-2,.py-sm-2{padding-top:.5rem!important}.pr-sm-2,.px-sm-2{padding-right:.5rem!important}.pb-sm-2,.py-sm-2{padding-bottom:.5rem!important}.pl-sm-2,.px-sm-2{padding-left:.5rem!important}.p-sm-3{padding:1rem!important}.pt-sm-3,.py-sm-3{padding-top:1rem!important}.pr-sm-3,.px-sm-3{padding-right:1rem!important}.pb-sm-3,.py-sm-3{padding-bottom:1rem!important}.pl-sm-3,.px-sm-3{padding-left:1rem!important}.p-sm-4{padding:1.5rem!important}.pt-sm-4,.py-sm-4{padding-top:1.5rem!important}.pr-sm-4,.px-sm-4{padding-right:1.5rem!important}.pb-sm-4,.py-sm-4{padding-bottom:1.5rem!important}.pl-sm-4,.px-sm-4{padding-left:1.5rem!important}.p-sm-5{padding:3rem!important}.pt-sm-5,.py-sm-5{padding-top:3rem!important}.pr-sm-5,.px-sm-5{padding-right:3rem!important}.pb-sm-5,.py-sm-5{padding-bottom:3rem!important}.pl-sm-5,.px-sm-5{padding-left:3rem!important}.m-sm-n1{margin:-.25rem!important}.mt-sm-n1,.my-sm-n1{margin-top:-.25rem!important}.mr-sm-n1,.mx-sm-n1{margin-right:-.25rem!important}.mb-sm-n1,.my-sm-n1{margin-bottom:-.25rem!important}.ml-sm-n1,.mx-sm-n1{margin-left:-.25rem!important}.m-sm-n2{margin:-.5rem!important}.mt-sm-n2,.my-sm-n2{margin-top:-.5rem!important}.mr-sm-n2,.mx-sm-n2{margin-right:-.5rem!important}.mb-sm-n2,.my-sm-n2{margin-bottom:-.5rem!important}.ml-sm-n2,.mx-sm-n2{margin-left:-.5rem!important}.m-sm-n3{margin:-1rem!important}.mt-sm-n3,.my-sm-n3{margin-top:-1rem!important}.mr-sm-n3,.mx-sm-n3{margin-right:-1rem!important}.mb-sm-n3,.my-sm-n3{margin-bottom:-1rem!important}.ml-sm-n3,.mx-sm-n3{margin-left:-1rem!important}.m-sm-n4{margin:-1.5rem!important}.mt-sm-n4,.my-sm-n4{margin-top:-1.5rem!important}.mr-sm-n4,.mx-sm-n4{margin-right:-1.5rem!important}.mb-sm-n4,.my-sm-n4{margin-bottom:-1.5rem!important}.ml-sm-n4,.mx-sm-n4{margin-left:-1.5rem!important}.m-sm-n5{margin:-3rem!important}.mt-sm-n5,.my-sm-n5{margin-top:-3rem!important}.mr-sm-n5,.mx-sm-n5{margin-right:-3rem!important}.mb-sm-n5,.my-sm-n5{margin-bottom:-3rem!important}.ml-sm-n5,.mx-sm-n5{margin-left:-3rem!important}.m-sm-auto{margin:auto!important}.mt-sm-auto,.my-sm-auto{margin-top:auto!important}.mr-sm-auto,.mx-sm-auto{margin-right:auto!important}.mb-sm-auto,.my-sm-auto{margin-bottom:auto!important}.ml-sm-auto,.mx-sm-auto{margin-left:auto!important}}@media (min-width:768px){.m-md-0{margin:0!important}.mt-md-0,.my-md-0{margin-top:0!important}.mr-md-0,.mx-md-0{margin-right:0!important}.mb-md-0,.my-md-0{margin-bottom:0!important}.ml-md-0,.mx-md-0{margin-left:0!important}.m-md-1{margin:.25rem!important}.mt-md-1,.my-md-1{margin-top:.25rem!important}.mr-md-1,.mx-md-1{margin-right:.25rem!important}.mb-md-1,.my-md-1{margin-bottom:.25rem!important}.ml-md-1,.mx-md-1{margin-left:.25rem!important}.m-md-2{margin:.5rem!important}.mt-md-2,.my-md-2{margin-top:.5rem!important}.mr-md-2,.mx-md-2{margin-right:.5rem!important}.mb-md-2,.my-md-2{margin-bottom:.5rem!important}.ml-md-2,.mx-md-2{margin-left:.5rem!important}.m-md-3{margin:1rem!important}.mt-md-3,.my-md-3{margin-top:1rem!important}.mr-md-3,.mx-md-3{margin-right:1rem!important}.mb-md-3,.my-md-3{margin-bottom:1rem!important}.ml-md-3,.mx-md-3{margin-left:1rem!important}.m-md-4{margin:1.5rem!important}.mt-md-4,.my-md-4{margin-top:1.5rem!important}.mr-md-4,.mx-md-4{margin-right:1.5rem!important}.mb-md-4,.my-md-4{margin-bottom:1.5rem!important}.ml-md-4,.mx-md-4{margin-left:1.5rem!important}.m-md-5{margin:3rem!important}.mt-md-5,.my-md-5{margin-top:3rem!important}.mr-md-5,.mx-md-5{margin-right:3rem!important}.mb-md-5,.my-md-5{margin-bottom:3rem!important}.ml-md-5,.mx-md-5{margin-left:3rem!important}.p-md-0{padding:0!important}.pt-md-0,.py-md-0{padding-top:0!important}.pr-md-0,.px-md-0{padding-right:0!important}.pb-md-0,.py-md-0{padding-bottom:0!important}.pl-md-0,.px-md-0{padding-left:0!important}.p-md-1{padding:.25rem!important}.pt-md-1,.py-md-1{padding-top:.25rem!important}.pr-md-1,.px-md-1{padding-right:.25rem!important}.pb-md-1,.py-md-1{padding-bottom:.25rem!important}.pl-md-1,.px-md-1{padding-left:.25rem!important}.p-md-2{padding:.5rem!important}.pt-md-2,.py-md-2{padding-top:.5rem!important}.pr-md-2,.px-md-2{padding-right:.5rem!important}.pb-md-2,.py-md-2{padding-bottom:.5rem!important}.pl-md-2,.px-md-2{padding-left:.5rem!important}.p-md-3{padding:1rem!important}.pt-md-3,.py-md-3{padding-top:1rem!important}.pr-md-3,.px-md-3{padding-right:1rem!important}.pb-md-3,.py-md-3{padding-bottom:1rem!important}.pl-md-3,.px-md-3{padding-left:1rem!important}.p-md-4{padding:1.5rem!important}.pt-md-4,.py-md-4{padding-top:1.5rem!important}.pr-md-4,.px-md-4{padding-right:1.5rem!important}.pb-md-4,.py-md-4{padding-bottom:1.5rem!important}.pl-md-4,.px-md-4{padding-left:1.5rem!important}.p-md-5{padding:3rem!important}.pt-md-5,.py-md-5{padding-top:3rem!important}.pr-md-5,.px-md-5{padding-right:3rem!important}.pb-md-5,.py-md-5{padding-bottom:3rem!important}.pl-md-5,.px-md-5{padding-left:3rem!important}.m-md-n1{margin:-.25rem!important}.mt-md-n1,.my-md-n1{margin-top:-.25rem!important}.mr-md-n1,.mx-md-n1{margin-right:-.25rem!important}.mb-md-n1,.my-md-n1{margin-bottom:-.25rem!important}.ml-md-n1,.mx-md-n1{margin-left:-.25rem!important}.m-md-n2{margin:-.5rem!important}.mt-md-n2,.my-md-n2{margin-top:-.5rem!important}.mr-md-n2,.mx-md-n2{margin-right:-.5rem!important}.mb-md-n2,.my-md-n2{margin-bottom:-.5rem!important}.ml-md-n2,.mx-md-n2{margin-left:-.5rem!important}.m-md-n3{margin:-1rem!important}.mt-md-n3,.my-md-n3{margin-top:-1rem!important}.mr-md-n3,.mx-md-n3{margin-right:-1rem!important}.mb-md-n3,.my-md-n3{margin-bottom:-1rem!important}.ml-md-n3,.mx-md-n3{margin-left:-1rem!important}.m-md-n4{margin:-1.5rem!important}.mt-md-n4,.my-md-n4{margin-top:-1.5rem!important}.mr-md-n4,.mx-md-n4{margin-right:-1.5rem!important}.mb-md-n4,.my-md-n4{margin-bottom:-1.5rem!important}.ml-md-n4,.mx-md-n4{margin-left:-1.5rem!important}.m-md-n5{margin:-3rem!important}.mt-md-n5,.my-md-n5{margin-top:-3rem!important}.mr-md-n5,.mx-md-n5{margin-right:-3rem!important}.mb-md-n5,.my-md-n5{margin-bottom:-3rem!important}.ml-md-n5,.mx-md-n5{margin-left:-3rem!important}.m-md-auto{margin:auto!important}.mt-md-auto,.my-md-auto{margin-top:auto!important}.mr-md-auto,.mx-md-auto{margin-right:auto!important}.mb-md-auto,.my-md-auto{margin-bottom:auto!important}.ml-md-auto,.mx-md-auto{margin-left:auto!important}}@media (min-width:992px){.m-lg-0{margin:0!important}.mt-lg-0,.my-lg-0{margin-top:0!important}.mr-lg-0,.mx-lg-0{margin-right:0!important}.mb-lg-0,.my-lg-0{margin-bottom:0!important}.ml-lg-0,.mx-lg-0{margin-left:0!important}.m-lg-1{margin:.25rem!important}.mt-lg-1,.my-lg-1{margin-top:.25rem!important}.mr-lg-1,.mx-lg-1{margin-right:.25rem!important}.mb-lg-1,.my-lg-1{margin-bottom:.25rem!important}.ml-lg-1,.mx-lg-1{margin-left:.25rem!important}.m-lg-2{margin:.5rem!important}.mt-lg-2,.my-lg-2{margin-top:.5rem!important}.mr-lg-2,.mx-lg-2{margin-right:.5rem!important}.mb-lg-2,.my-lg-2{margin-bottom:.5rem!important}.ml-lg-2,.mx-lg-2{margin-left:.5rem!important}.m-lg-3{margin:1rem!important}.mt-lg-3,.my-lg-3{margin-top:1rem!important}.mr-lg-3,.mx-lg-3{margin-right:1rem!important}.mb-lg-3,.my-lg-3{margin-bottom:1rem!important}.ml-lg-3,.mx-lg-3{margin-left:1rem!important}.m-lg-4{margin:1.5rem!important}.mt-lg-4,.my-lg-4{margin-top:1.5rem!important}.mr-lg-4,.mx-lg-4{margin-right:1.5rem!important}.mb-lg-4,.my-lg-4{margin-bottom:1.5rem!important}.ml-lg-4,.mx-lg-4{margin-left:1.5rem!important}.m-lg-5{margin:3rem!important}.mt-lg-5,.my-lg-5{margin-top:3rem!important}.mr-lg-5,.mx-lg-5{margin-right:3rem!important}.mb-lg-5,.my-lg-5{margin-bottom:3rem!important}.ml-lg-5,.mx-lg-5{margin-left:3rem!important}.p-lg-0{padding:0!important}.pt-lg-0,.py-lg-0{padding-top:0!important}.pr-lg-0,.px-lg-0{padding-right:0!important}.pb-lg-0,.py-lg-0{padding-bottom:0!important}.pl-lg-0,.px-lg-0{padding-left:0!important}.p-lg-1{padding:.25rem!important}.pt-lg-1,.py-lg-1{padding-top:.25rem!important}.pr-lg-1,.px-lg-1{padding-right:.25rem!important}.pb-lg-1,.py-lg-1{padding-bottom:.25rem!important}.pl-lg-1,.px-lg-1{padding-left:.25rem!important}.p-lg-2{padding:.5rem!important}.pt-lg-2,.py-lg-2{padding-top:.5rem!important}.pr-lg-2,.px-lg-2{padding-right:.5rem!important}.pb-lg-2,.py-lg-2{padding-bottom:.5rem!important}.pl-lg-2,.px-lg-2{padding-left:.5rem!important}.p-lg-3{padding:1rem!important}.pt-lg-3,.py-lg-3{padding-top:1rem!important}.pr-lg-3,.px-lg-3{padding-right:1rem!important}.pb-lg-3,.py-lg-3{padding-bottom:1rem!important}.pl-lg-3,.px-lg-3{padding-left:1rem!important}.p-lg-4{padding:1.5rem!important}.pt-lg-4,.py-lg-4{padding-top:1.5rem!important}.pr-lg-4,.px-lg-4{padding-right:1.5rem!important}.pb-lg-4,.py-lg-4{padding-bottom:1.5rem!important}.pl-lg-4,.px-lg-4{padding-left:1.5rem!important}.p-lg-5{padding:3rem!important}.pt-lg-5,.py-lg-5{padding-top:3rem!important}.pr-lg-5,.px-lg-5{padding-right:3rem!important}.pb-lg-5,.py-lg-5{padding-bottom:3rem!important}.pl-lg-5,.px-lg-5{padding-left:3rem!important}.m-lg-n1{margin:-.25rem!important}.mt-lg-n1,.my-lg-n1{margin-top:-.25rem!important}.mr-lg-n1,.mx-lg-n1{margin-right:-.25rem!important}.mb-lg-n1,.my-lg-n1{margin-bottom:-.25rem!important}.ml-lg-n1,.mx-lg-n1{margin-left:-.25rem!important}.m-lg-n2{margin:-.5rem!important}.mt-lg-n2,.my-lg-n2{margin-top:-.5rem!important}.mr-lg-n2,.mx-lg-n2{margin-right:-.5rem!important}.mb-lg-n2,.my-lg-n2{margin-bottom:-.5rem!important}.ml-lg-n2,.mx-lg-n2{margin-left:-.5rem!important}.m-lg-n3{margin:-1rem!important}.mt-lg-n3,.my-lg-n3{margin-top:-1rem!important}.mr-lg-n3,.mx-lg-n3{margin-right:-1rem!important}.mb-lg-n3,.my-lg-n3{margin-bottom:-1rem!important}.ml-lg-n3,.mx-lg-n3{margin-left:-1rem!important}.m-lg-n4{margin:-1.5rem!important}.mt-lg-n4,.my-lg-n4{margin-top:-1.5rem!important}.mr-lg-n4,.mx-lg-n4{margin-right:-1.5rem!important}.mb-lg-n4,.my-lg-n4{margin-bottom:-1.5rem!important}.ml-lg-n4,.mx-lg-n4{margin-left:-1.5rem!important}.m-lg-n5{margin:-3rem!important}.mt-lg-n5,.my-lg-n5{margin-top:-3rem!important}.mr-lg-n5,.mx-lg-n5{margin-right:-3rem!important}.mb-lg-n5,.my-lg-n5{margin-bottom:-3rem!important}.ml-lg-n5,.mx-lg-n5{margin-left:-3rem!important}.m-lg-auto{margin:auto!important}.mt-lg-auto,.my-lg-auto{margin-top:auto!important}.mr-lg-auto,.mx-lg-auto{margin-right:auto!important}.mb-lg-auto,.my-lg-auto{margin-bottom:auto!important}.ml-lg-auto,.mx-lg-auto{margin-left:auto!important}}@media (min-width:1200px){.m-xl-0{margin:0!important}.mt-xl-0,.my-xl-0{margin-top:0!important}.mr-xl-0,.mx-xl-0{margin-right:0!important}.mb-xl-0,.my-xl-0{margin-bottom:0!important}.ml-xl-0,.mx-xl-0{margin-left:0!important}.m-xl-1{margin:.25rem!important}.mt-xl-1,.my-xl-1{margin-top:.25rem!important}.mr-xl-1,.mx-xl-1{margin-right:.25rem!important}.mb-xl-1,.my-xl-1{margin-bottom:.25rem!important}.ml-xl-1,.mx-xl-1{margin-left:.25rem!important}.m-xl-2{margin:.5rem!important}.mt-xl-2,.my-xl-2{margin-top:.5rem!important}.mr-xl-2,.mx-xl-2{margin-right:.5rem!important}.mb-xl-2,.my-xl-2{margin-bottom:.5rem!important}.ml-xl-2,.mx-xl-2{margin-left:.5rem!important}.m-xl-3{margin:1rem!important}.mt-xl-3,.my-xl-3{margin-top:1rem!important}.mr-xl-3,.mx-xl-3{margin-right:1rem!important}.mb-xl-3,.my-xl-3{margin-bottom:1rem!important}.ml-xl-3,.mx-xl-3{margin-left:1rem!important}.m-xl-4{margin:1.5rem!important}.mt-xl-4,.my-xl-4{margin-top:1.5rem!important}.mr-xl-4,.mx-xl-4{margin-right:1.5rem!important}.mb-xl-4,.my-xl-4{margin-bottom:1.5rem!important}.ml-xl-4,.mx-xl-4{margin-left:1.5rem!important}.m-xl-5{margin:3rem!important}.mt-xl-5,.my-xl-5{margin-top:3rem!important}.mr-xl-5,.mx-xl-5{margin-right:3rem!important}.mb-xl-5,.my-xl-5{margin-bottom:3rem!important}.ml-xl-5,.mx-xl-5{margin-left:3rem!important}.p-xl-0{padding:0!important}.pt-xl-0,.py-xl-0{padding-top:0!important}.pr-xl-0,.px-xl-0{padding-right:0!important}.pb-xl-0,.py-xl-0{padding-bottom:0!important}.pl-xl-0,.px-xl-0{padding-left:0!important}.p-xl-1{padding:.25rem!important}.pt-xl-1,.py-xl-1{padding-top:.25rem!important}.pr-xl-1,.px-xl-1{padding-right:.25rem!important}.pb-xl-1,.py-xl-1{padding-bottom:.25rem!important}.pl-xl-1,.px-xl-1{padding-left:.25rem!important}.p-xl-2{padding:.5rem!important}.pt-xl-2,.py-xl-2{padding-top:.5rem!important}.pr-xl-2,.px-xl-2{padding-right:.5rem!important}.pb-xl-2,.py-xl-2{padding-bottom:.5rem!important}.pl-xl-2,.px-xl-2{padding-left:.5rem!important}.p-xl-3{padding:1rem!important}.pt-xl-3,.py-xl-3{padding-top:1rem!important}.pr-xl-3,.px-xl-3{padding-right:1rem!important}.pb-xl-3,.py-xl-3{padding-bottom:1rem!important}.pl-xl-3,.px-xl-3{padding-left:1rem!important}.p-xl-4{padding:1.5rem!important}.pt-xl-4,.py-xl-4{padding-top:1.5rem!important}.pr-xl-4,.px-xl-4{padding-right:1.5rem!important}.pb-xl-4,.py-xl-4{padding-bottom:1.5rem!important}.pl-xl-4,.px-xl-4{padding-left:1.5rem!important}.p-xl-5{padding:3rem!important}.pt-xl-5,.py-xl-5{padding-top:3rem!important}.pr-xl-5,.px-xl-5{padding-right:3rem!important}.pb-xl-5,.py-xl-5{padding-bottom:3rem!important}.pl-xl-5,.px-xl-5{padding-left:3rem!important}.m-xl-n1{margin:-.25rem!important}.mt-xl-n1,.my-xl-n1{margin-top:-.25rem!important}.mr-xl-n1,.mx-xl-n1{margin-right:-.25rem!important}.mb-xl-n1,.my-xl-n1{margin-bottom:-.25rem!important}.ml-xl-n1,.mx-xl-n1{margin-left:-.25rem!important}.m-xl-n2{margin:-.5rem!important}.mt-xl-n2,.my-xl-n2{margin-top:-.5rem!important}.mr-xl-n2,.mx-xl-n2{margin-right:-.5rem!important}.mb-xl-n2,.my-xl-n2{margin-bottom:-.5rem!important}.ml-xl-n2,.mx-xl-n2{margin-left:-.5rem!important}.m-xl-n3{margin:-1rem!important}.mt-xl-n3,.my-xl-n3{margin-top:-1rem!important}.mr-xl-n3,.mx-xl-n3{margin-right:-1rem!important}.mb-xl-n3,.my-xl-n3{margin-bottom:-1rem!important}.ml-xl-n3,.mx-xl-n3{margin-left:-1rem!important}.m-xl-n4{margin:-1.5rem!important}.mt-xl-n4,.my-xl-n4{margin-top:-1.5rem!important}.mr-xl-n4,.mx-xl-n4{margin-right:-1.5rem!important}.mb-xl-n4,.my-xl-n4{margin-bottom:-1.5rem!important}.ml-xl-n4,.mx-xl-n4{margin-left:-1.5rem!important}.m-xl-n5{margin:-3rem!important}.mt-xl-n5,.my-xl-n5{margin-top:-3rem!important}.mr-xl-n5,.mx-xl-n5{margin-right:-3rem!important}.mb-xl-n5,.my-xl-n5{margin-bottom:-3rem!important}.ml-xl-n5,.mx-xl-n5{margin-left:-3rem!important}.m-xl-auto{margin:auto!important}.mt-xl-auto,.my-xl-auto{margin-top:auto!important}.mr-xl-auto,.mx-xl-auto{margin-right:auto!important}.mb-xl-auto,.my-xl-auto{margin-bottom:auto!important}.ml-xl-auto,.mx-xl-auto{margin-left:auto!important}}@media (min-width:1450px){.m-2xl-0{margin:0!important}.mt-2xl-0,.my-2xl-0{margin-top:0!important}.mr-2xl-0,.mx-2xl-0{margin-right:0!important}.mb-2xl-0,.my-2xl-0{margin-bottom:0!important}.ml-2xl-0,.mx-2xl-0{margin-left:0!important}.m-2xl-1{margin:.25rem!important}.mt-2xl-1,.my-2xl-1{margin-top:.25rem!important}.mr-2xl-1,.mx-2xl-1{margin-right:.25rem!important}.mb-2xl-1,.my-2xl-1{margin-bottom:.25rem!important}.ml-2xl-1,.mx-2xl-1{margin-left:.25rem!important}.m-2xl-2{margin:.5rem!important}.mt-2xl-2,.my-2xl-2{margin-top:.5rem!important}.mr-2xl-2,.mx-2xl-2{margin-right:.5rem!important}.mb-2xl-2,.my-2xl-2{margin-bottom:.5rem!important}.ml-2xl-2,.mx-2xl-2{margin-left:.5rem!important}.m-2xl-3{margin:1rem!important}.mt-2xl-3,.my-2xl-3{margin-top:1rem!important}.mr-2xl-3,.mx-2xl-3{margin-right:1rem!important}.mb-2xl-3,.my-2xl-3{margin-bottom:1rem!important}.ml-2xl-3,.mx-2xl-3{margin-left:1rem!important}.m-2xl-4{margin:1.5rem!important}.mt-2xl-4,.my-2xl-4{margin-top:1.5rem!important}.mr-2xl-4,.mx-2xl-4{margin-right:1.5rem!important}.mb-2xl-4,.my-2xl-4{margin-bottom:1.5rem!important}.ml-2xl-4,.mx-2xl-4{margin-left:1.5rem!important}.m-2xl-5{margin:3rem!important}.mt-2xl-5,.my-2xl-5{margin-top:3rem!important}.mr-2xl-5,.mx-2xl-5{margin-right:3rem!important}.mb-2xl-5,.my-2xl-5{margin-bottom:3rem!important}.ml-2xl-5,.mx-2xl-5{margin-left:3rem!important}.p-2xl-0{padding:0!important}.pt-2xl-0,.py-2xl-0{padding-top:0!important}.pr-2xl-0,.px-2xl-0{padding-right:0!important}.pb-2xl-0,.py-2xl-0{padding-bottom:0!important}.pl-2xl-0,.px-2xl-0{padding-left:0!important}.p-2xl-1{padding:.25rem!important}.pt-2xl-1,.py-2xl-1{padding-top:.25rem!important}.pr-2xl-1,.px-2xl-1{padding-right:.25rem!important}.pb-2xl-1,.py-2xl-1{padding-bottom:.25rem!important}.pl-2xl-1,.px-2xl-1{padding-left:.25rem!important}.p-2xl-2{padding:.5rem!important}.pt-2xl-2,.py-2xl-2{padding-top:.5rem!important}.pr-2xl-2,.px-2xl-2{padding-right:.5rem!important}.pb-2xl-2,.py-2xl-2{padding-bottom:.5rem!important}.pl-2xl-2,.px-2xl-2{padding-left:.5rem!important}.p-2xl-3{padding:1rem!important}.pt-2xl-3,.py-2xl-3{padding-top:1rem!important}.pr-2xl-3,.px-2xl-3{padding-right:1rem!important}.pb-2xl-3,.py-2xl-3{padding-bottom:1rem!important}.pl-2xl-3,.px-2xl-3{padding-left:1rem!important}.p-2xl-4{padding:1.5rem!important}.pt-2xl-4,.py-2xl-4{padding-top:1.5rem!important}.pr-2xl-4,.px-2xl-4{padding-right:1.5rem!important}.pb-2xl-4,.py-2xl-4{padding-bottom:1.5rem!important}.pl-2xl-4,.px-2xl-4{padding-left:1.5rem!important}.p-2xl-5{padding:3rem!important}.pt-2xl-5,.py-2xl-5{padding-top:3rem!important}.pr-2xl-5,.px-2xl-5{padding-right:3rem!important}.pb-2xl-5,.py-2xl-5{padding-bottom:3rem!important}.pl-2xl-5,.px-2xl-5{padding-left:3rem!important}.m-2xl-n1{margin:-.25rem!important}.mt-2xl-n1,.my-2xl-n1{margin-top:-.25rem!important}.mr-2xl-n1,.mx-2xl-n1{margin-right:-.25rem!important}.mb-2xl-n1,.my-2xl-n1{margin-bottom:-.25rem!important}.ml-2xl-n1,.mx-2xl-n1{margin-left:-.25rem!important}.m-2xl-n2{margin:-.5rem!important}.mt-2xl-n2,.my-2xl-n2{margin-top:-.5rem!important}.mr-2xl-n2,.mx-2xl-n2{margin-right:-.5rem!important}.mb-2xl-n2,.my-2xl-n2{margin-bottom:-.5rem!important}.ml-2xl-n2,.mx-2xl-n2{margin-left:-.5rem!important}.m-2xl-n3{margin:-1rem!important}.mt-2xl-n3,.my-2xl-n3{margin-top:-1rem!important}.mr-2xl-n3,.mx-2xl-n3{margin-right:-1rem!important}.mb-2xl-n3,.my-2xl-n3{margin-bottom:-1rem!important}.ml-2xl-n3,.mx-2xl-n3{margin-left:-1rem!important}.m-2xl-n4{margin:-1.5rem!important}.mt-2xl-n4,.my-2xl-n4{margin-top:-1.5rem!important}.mr-2xl-n4,.mx-2xl-n4{margin-right:-1.5rem!important}.mb-2xl-n4,.my-2xl-n4{margin-bottom:-1.5rem!important}.ml-2xl-n4,.mx-2xl-n4{margin-left:-1.5rem!important}.m-2xl-n5{margin:-3rem!important}.mt-2xl-n5,.my-2xl-n5{margin-top:-3rem!important}.mr-2xl-n5,.mx-2xl-n5{margin-right:-3rem!important}.mb-2xl-n5,.my-2xl-n5{margin-bottom:-3rem!important}.ml-2xl-n5,.mx-2xl-n5{margin-left:-3rem!important}.m-2xl-auto{margin:auto!important}.mt-2xl-auto,.my-2xl-auto{margin-top:auto!important}.mr-2xl-auto,.mx-2xl-auto{margin-right:auto!important}.mb-2xl-auto,.my-2xl-auto{margin-bottom:auto!important}.ml-2xl-auto,.mx-2xl-auto{margin-left:auto!important}}.stretched-link:after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;pointer-events:auto;content:"";background-color:transparent}.text-monospace{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace!important}.text-justify{text-align:justify!important}.text-wrap{white-space:normal!important}.text-nowrap{white-space:nowrap!important}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-left{text-align:left!important}.text-right{text-align:right!important}.text-center{text-align:center!important}@media (min-width:576px){.text-sm-left{text-align:left!important}.text-sm-right{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:768px){.text-md-left{text-align:left!important}.text-md-right{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:992px){.text-lg-left{text-align:left!important}.text-lg-right{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.text-xl-left{text-align:left!important}.text-xl-right{text-align:right!important}.text-xl-center{text-align:center!important}}@media (min-width:1450px){.text-2xl-left{text-align:left!important}.text-2xl-right{text-align:right!important}.text-2xl-center{text-align:center!important}}.text-lowercase{text-transform:lowercase!important}.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.font-weight-light{font-weight:300!important}.font-weight-lighter{font-weight:lighter!important}.font-weight-normal{font-weight:400!important}.font-weight-bold,cd-about dt{font-weight:700!important}.font-weight-bolder{font-weight:bolder!important}.font-italic{font-style:italic!important}.text-white{color:#fff!important}.text-primary{color:#2b99a8!important}a.text-primary:focus,a.text-primary:hover{color:#1b626b!important}.text-secondary{color:#374249!important}a.text-secondary:focus,a.text-secondary:hover{color:#161b1d!important}.text-success{color:#0b0!important}a.text-success:focus,a.text-success:hover{color:#006f00!important}.text-info{color:#2b99a8!important}a.text-info:focus,a.text-info:hover{color:#1b626b!important}.text-warning{color:#ffc200!important}a.text-warning:focus,a.text-warning:hover{color:#b38800!important}.text-danger{color:#ef5c55!important}a.text-danger:focus,a.text-danger:hover{color:#e21f15!important}.text-light{color:#f8f9fa!important}a.text-light:focus,a.text-light:hover{color:#cbd3da!important}.text-dark{color:#777!important}a.text-dark:focus,a.text-dark:hover{color:#515151!important}.text-accent{color:#ef5c55!important}a.text-accent:focus,a.text-accent:hover{color:#e21f15!important}.text-warning-dark{color:#fd7e14!important}a.text-warning-dark:focus,a.text-warning-dark:hover{color:#c35a02!important}.text-body{color:#212529!important}.text-muted{color:#6c757d!important}.text-black-50{color:rgba(0,0,0,.5)!important}.text-white-50{color:hsla(0,0%,100%,.5)!important}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:initial;border:0}.text-decoration-none{text-decoration:none!important}.text-break{word-break:break-word!important;overflow-wrap:break-word!important}.text-reset{color:inherit!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}@media print{*,:after,:before{text-shadow:none!important;box-shadow:none!important}a:not(.btn){text-decoration:underline}abbr[title]:after{content:" (" attr(title) ")"}pre{white-space:pre-wrap!important}blockquote,pre{border:1px solid #adb5bd;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}@page{size:a3}.container,body{min-width:992px!important}.navbar{display:none}.badge{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #dee2e6!important}.table-dark{color:inherit}.table-dark tbody+tbody,.table-dark td,.table-dark th,.table-dark thead th{border-color:#dee2e6}.table .thead-dark th{color:inherit;border-color:#dee2e6}}
-/*!
-Fork Awesome 1.1.7
-License - https://forkaweso.me/Fork-Awesome/license
-
-Copyright 2018 Dave Gandy & Fork Awesome
-
-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.
- */@font-face{font-family:ForkAwesome;src:url(forkawesome-webfont.e182ad6df04f9177b326.eot?v=1.1.7);src:url(forkawesome-webfont.e182ad6df04f9177b326.eot?#iefix&v=1.1.7) format("embedded-opentype"),url(forkawesome-webfont.7c20758e3e7c7dff7c8d.woff2?v=1.1.7) format("woff2"),url(forkawesome-webfont.2dfb5f36fc148e26e398.woff?v=1.1.7) format("woff"),url(forkawesome-webfont.ee4d8bfd0af89fc714a2.ttf?v=1.1.7) format("truetype"),url(forkawesome-webfont.86541105409e56d17291.svg?v=1.1.7#forkawesomeregular) format("svg");font-weight:400;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 ForkAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.3333333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa,.fa-fw{width:1.2857142857em;text-align:center}.fa-ul{padding-left:0;margin-left:2.1428571429em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.1428571429em;width:2.1428571429em;top:.1428571429em;text-align:center}.fa-li.fa-lg{left:-1.8571428571em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{animation:fa-spin 2s linear infinite}.fa-pulse{animation:fa-spin 1s steps(8) infinite}@keyframes fa-spin{0%{transform:rotate(0deg)}to{transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";transform:scaleX(-1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";transform:scaleY(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-close:before,.fa-remove:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-cog:before,.fa-gear:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-repeat:before,.fa-rotate-right:before{content:""}.fa-refresh:before,.fa-sync:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before,.fa-video:before{content:""}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-exclamation-triangle:before,.fa-warning:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-cogs:before,.fa-gears:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell-o:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-globe-e:before{content:""}.fa-globe-w:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-community:before,.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-floppy-o:before,.fa-save:before{content:""}.fa-square:before{content:""}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus-g:before,.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-sort:before,.fa-unsorted:before{content:""}.fa-sort-desc:before,.fa-sort-down:before{content:""}.fa-sort-asc:before,.fa-sort-up:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-gavel:before,.fa-legal:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-bolt:before,.fa-flash:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-clipboard:before,.fa-paste:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before,.fa-utensils:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-chain-broken:before,.fa-unlink:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:""}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:""}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:""}.fa-eur:before,.fa-euro:before{content:""}.fa-gbp:before,.fa-pound:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-inr:before,.fa-rupee:before{content:""}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:""}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:""}.fa-krw:before,.fa-won:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before,.fa-sort-alpha-down:before{content:""}.fa-sort-alpha-desc:before,.fa-sort-alpha-up:before{content:""}.fa-sort-amount-asc:before,.fa-sort-amount-down:before{content:""}.fa-sort-amount-desc:before,.fa-sort-amount-up:before{content:""}.fa-sort-numeric-asc:before,.fa-sort-numeric-down:before{content:""}.fa-sort-numeric-desc:before,.fa-sort-numeric-up:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-try:before,.fa-turkish-lira:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-bank:before,.fa-institution:before,.fa-university:before{content:""}.fa-graduation-cap:before,.fa-mortar-board:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before,.fa-utensil-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:""}.fa-file-archive-o:before,.fa-file-zip-o:before{content:""}.fa-file-audio-o:before,.fa-file-sound-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before,.fa-resistance:before{content:""}.fa-empire:before,.fa-ge:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-paper-plane:before,.fa-send:before{content:""}.fa-paper-plane-o:before,.fa-send-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before,.fa-heading:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before,.fa-closed-captioning:before{content:""}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before,.fa-gem:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-bed:before,.fa-hotel:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-medium-square:before{content:""}.fa-y-combinator:before,.fa-yc:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before,.fa-battery:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-television:before,.fa-tv:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo-v:before,.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-phone-volume:before,.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-american-sign-language-interpreting:before,.fa-asl-interpreting:before{content:""}.fa-deaf:before,.fa-deafness:before,.fa-hard-of-hearing:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-sign-language:before,.fa-signing:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-address-card:before,.fa-vcard:before{content:""}.fa-address-card-o:before,.fa-vcard-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer-full:before,.fa-thermometer:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bath:before,.fa-bathtub:before,.fa-s15:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.fa-mastodon:before{content:""}.fa-mastodon-alt:before{content:""}.fa-fork-awesome:before,.fa-fork-circle:before{content:""}.fa-peertube:before{content:""}.fa-diaspora:before{content:""}.fa-friendica:before{content:""}.fa-gnu-social:before{content:""}.fa-liberapay-square:before{content:""}.fa-liberapay:before{content:""}.fa-scuttlebutt:before,.fa-ssb:before{content:""}.fa-hubzilla:before{content:""}.fa-social-home:before{content:""}.fa-artstation:before{content:""}.fa-discord:before{content:""}.fa-discord-alt:before{content:""}.fa-patreon:before{content:""}.fa-snowdrift:before{content:""}.fa-activitypub:before{content:""}.fa-ethereum:before{content:""}.fa-keybase:before{content:""}.fa-shaarli:before{content:""}.fa-shaarli-o:before{content:""}.fa-cut-key:before,.fa-key-modern:before{content:""}.fa-xmpp:before{content:""}.fa-archive-org:before{content:""}.fa-freedombox:before{content:""}.fa-facebook-messenger:before{content:""}.fa-debian:before{content:""}.fa-mastodon-square:before{content:""}.fa-tipeee:before{content:""}.fa-react:before{content:""}.fa-dogmazic:before{content:""}.fa-zotero:before{content:""}.fa-nodejs:before{content:""}.fa-nextcloud:before{content:""}.fa-nextcloud-square:before{content:""}.fa-hackaday:before{content:""}.fa-laravel:before{content:""}.fa-signalapp:before{content:""}.fa-gnupg:before{content:""}.fa-php:before{content:""}.fa-ffmpeg:before{content:""}.fa-joplin:before{content:""}.fa-syncthing:before{content:""}.fa-inkscape:before{content:""}.fa-matrix-org:before{content:""}.fa-pixelfed:before{content:""}.fa-bootstrap:before{content:""}.fa-dev-to:before{content:""}.fa-hashnode:before{content:""}.fa-jirafeau:before{content:""}.fa-emby:before{content:""}.fa-wikidata:before{content:""}.fa-gimp:before{content:""}.fa-c:before{content:""}.fa-digitalocean:before{content:""}.fa-att:before{content:""}.fa-gitea:before{content:""}.fa-file-epub:before{content:""}.fa-python:before{content:""}.fa-archlinux:before{content:""}.fa-pleroma:before{content:""}.fa-unsplash:before{content:""}.fa-hackster:before{content:""}.fa-spell-check:before{content:""}.fa-moon:before{content:""}.fa-sun:before{content:""}.fa-f-droid:before{content:""}.fa-biometric:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.info-card-popover-cluster-status{max-height:20vh;max-width:23vw}.info-card-popover-cluster-status .popover-body{font-size:1rem;max-height:19vh;max-width:100%;overflow:auto}@media (max-width:calc(1200px - 1px)){.info-card-popover-cluster-status{max-width:31vw}}@media (max-width:calc(992px - 1px)){.info-card-popover-cluster-status{max-width:46vw}}@media (max-width:calc(768px - 1px)){.info-card-popover-cluster-status{max-width:83vw}}.info-card-content-clickable{border:1px solid #e9ecef;border-radius:3px;cursor:pointer;padding:7px}.info-card-content-clickable:hover{background-color:#e9ecef;border-color:#ced4da}html{background-color:#fff}body,html{font-size:12px;height:100%;width:100%}option{font-style:normal;font-weight:400}.full-height{height:100vh}.full-width{width:100vw}.vertical-align{align-items:center;display:flex}.horizontal-align{display:flex;justify-content:center}.loading{left:50%;position:absolute;top:50%}.margin-right-md{margin-right:15px}.no-border{border:0;box-shadow:0 0 0!important}.italic{font-style:italic}.bold{font-weight:700}.text-right{text-align:right}.text-monospace{font-family:monospace}.text-pre-wrap{white-space:pre-wrap}.text-pre{white-space:pre}.border-danger{border-left:4px solid #ef5c55}.border-info{border-left:4px solid #2b99a8}.border-success{border-left:4px solid #0b0}.custom-control-input.is-valid~.custom-control-label,.was-validated .custom-control-input:valid~.custom-control-label{color:initial}.custom-control-input.is-valid:checked~.custom-control-label:before,.was-validated .custom-control-input:valid:checked~.custom-control-label:before{background-color:#2b99a8;border-color:#2b99a8}.custom-control-input.is-valid~.custom-control-label:before,.was-validated .custom-control-input:valid~.custom-control-label:before{border-color:#adb5bd}.custom-control-input.is-valid:focus~.custom-control-label:before,.was-validated .custom-control-input:valid:focus~.custom-control-label:before{box-shadow:0 0 0 .2rem rgba(43,153,168,.25)}.custom-control-input.is-valid:focus:not(:checked)~.custom-control-label:before,.was-validated .custom-control-input:valid:focus:not(:checked)~.custom-control-label:before{border-color:#76d0dc}.btn-light{background-color:#fff;border-color:#ced4da!important}.btn-light:hover{background-color:#dee2e6;border-color:#6c757d!important}.btn-light:disabled{background-color:#e9ecef;border-color:#ced4da!important}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:0}.btn.disabled{border:0;box-shadow:none}.btn-primary .badge{background-color:#e9ecef;color:#2b99a8}.btn-group>.btn>i.fa,.cd-datatable-actions button.btn i.fa{margin-right:5px}.card-footer button.btn:not(:first-child){margin-left:5px}.dropdown-menu{min-width:50px;z-index:999999}.dropdown-menu button.dropdown-item:focus{outline:none}.dropdown-menu>li>a{cursor:pointer}.dropdown-menu>li>a>i.fa{margin-right:5px}.dropdown-menu>.active>a{background-color:#2b99a8;color:#e9ecef}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{background-color:#21747f}.dataTables_wrapper .dropdown-menu>li.dropdown-divider{cursor:auto}.required:after{color:#ef5c55;content:"*";font-size:1.167rem;padding-left:4px}.form-footer{display:flex;width:100%}.cd-form-control,.form-control{display:table-cell}.cd-form-control:focus,.form-control:focus{border-color:rgba(43,153,168,.8);box-shadow:0 0 3px 2px rgba(43,153,168,.5);outline:0}.custom-checkbox{padding-top:7px}.invalid-feedback{display:block}.container-fluid,.container-lg,.container-md,.container-sm,.container-xl{padding:0 30px}.ceph-icon{background:url(Ceph_Logo.487a0001b327fa7f5232.svg)}.prometheus-icon{background:url(prometheus_logo.8b3183e5a2db0e87bb2b.svg)}.custom-icon{background-clip:padding-box;background-repeat:no-repeat;background-size:contain;margin-right:8px;padding:10px}.nav-tabs{margin-bottom:1rem}#toast-container{margin-top:2vw}@media (max-width:1600px){#toast-container{margin-top:2.5vw}}@media (max-width:calc(992px - 1px)){#toast-container{margin-top:9vw}}@media (max-width:900px){#toast-container{margin-top:10vw}}@media (max-width:319px){#toast-container{margin-top:11vw}}@media (max-width:260px){#toast-container{margin-top:14vw}}.toast-message>ul{margin:0;padding-left:1rem}.noscript{padding-top:5em}@media (min-width:576px){.cd-col-form-label,.col-form-label{text-align:right}}.cd-col-form-label,.col-form-label{font-weight:700}.password-strength-level{flex:100%;margin-top:2px}.password-strength-level .ok,.password-strength-level .strong,.password-strength-level .very-strong,.password-strength-level .weak{border-radius:.25rem;height:13px}.password-strength-level .weak{background:#ef5c55;width:25%}.password-strength-level .ok{background:#ffc200;width:50%}.password-strength-level .strong{background:#0b0;width:75%}.password-strength-level .very-strong{background:#006f00;width:100%}.badge-background-gray,.badge-hdd{background-color:#6c757d;color:#fff}.badge-background-primary,.badge-ssd{background-color:#2b99a8;color:#fff}.badge-tab{background-color:#e9ecef;color:#495057}tree-root tree-viewport{min-height:1em}tags-input .tags{border:1px solid #ced4da;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.09)}.card-header{font-size:1.3em}.card-body h2:first-child{margin-top:0}.disabled{pointer-events:none}.clickable,a{cursor:pointer}
\ No newline at end of file
+++ /dev/null
-!function(e){function r(r){for(var n,a,i=r[0],f=r[1],c=r[2],p=0,s=[];p<i.length;p++)a=i[p],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&s.push(o[a][0]),o[a]=0;for(n in f)Object.prototype.hasOwnProperty.call(f,n)&&(e[n]=f[n]);for(l&&l(r);s.length;)s.shift()();return u.push.apply(u,c||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++)0!==o[t[i]]&&(n=!1);n&&(u.splice(r--,1),e=a(a.s=t[0]))}return e}var n={},o={0:0},u=[];function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var u,i=document.createElement("script");i.charset="utf-8",i.timeout=120,a.nc&&i.setAttribute("nonce",a.nc),i.src=function(e){return a.p+""+({}[e]||e)+"."+{1:"0f6133f836c4310d2d34",5:"f1a521f29ba388aefe88",6:"5aa9ef51cf028c8fa150"}[e]+".js"}(e);var f=new Error;u=function(r){i.onerror=i.onload=null,clearTimeout(c);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),u=r&&r.target&&r.target.src;f.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",f.name="ChunkLoadError",f.type=n,f.request=u,t[1](f)}o[e]=void 0}};var c=setTimeout((function(){u({type:"timeout",target:i})}),12e4);i.onerror=i.onload=u,document.head.appendChild(i)}return Promise.all(r)},a.m=e,a.c=n,a.d=function(e,r,t){a.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,r){if(1&r&&(e=a(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)a.d(t,n,(function(r){return e[r]}).bind(null,n));return t},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="",a.oe=function(e){throw console.error(e),e};var i=window.webpackJsonp=window.webpackJsonp||[],f=i.push.bind(i);i.push=r,i=i.slice();for(var c=0;c<i.length;c++)r(i[c]);var l=f;t()}([]);
\ No newline at end of file
--- /dev/null
+!function(e){function r(r){for(var n,a,i=r[0],c=r[1],f=r[2],p=0,s=[];p<i.length;p++)a=i[p],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&s.push(o[a][0]),o[a]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(l&&l(r);s.length;)s.shift()();return u.push.apply(u,f||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++)0!==o[t[i]]&&(n=!1);n&&(u.splice(r--,1),e=a(a.s=t[0]))}return e}var n={},o={0:0},u=[];function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var u,i=document.createElement("script");i.charset="utf-8",i.timeout=120,a.nc&&i.setAttribute("nonce",a.nc),i.src=function(e){return a.p+""+({}[e]||e)+"."+{1:"1c3aa698fdc6e2e06036",5:"7ef5282604f6c3e77fd4",6:"93b626d621206efed808"}[e]+".js"}(e);var c=new Error;u=function(r){i.onerror=i.onload=null,clearTimeout(f);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),u=r&&r.target&&r.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,t[1](c)}o[e]=void 0}};var f=setTimeout((function(){u({type:"timeout",target:i})}),12e4);i.onerror=i.onload=u,document.head.appendChild(i)}return Promise.all(r)},a.m=e,a.c=n,a.d=function(e,r,t){a.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,r){if(1&r&&(e=a(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)a.d(t,n,(function(r){return e[r]}).bind(null,n));return t},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="",a.oe=function(e){throw console.error(e),e};var i=window.webpackJsonp=window.webpackJsonp||[],c=i.push.bind(i);i.push=r,i=i.slice();for(var f=0;f<i.length;f++)r(i[f]);var l=c;t()}([]);
\ No newline at end of file
+++ /dev/null
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Chart=e()}(this,(function(){"use strict";var t={rgb2hsl:e,rgb2hsv:n,rgb2hwb:i,rgb2cmyk:a,rgb2keyword:o,rgb2xyz:s,rgb2lab:l,rgb2lch:function(t){return v(l(t))},hsl2rgb:u,hsl2hsv:function(t){var e=t[1]/100,n=t[2]/100;return 0===n?[0,0,0]:[t[0],2*(e*=(n*=2)<=1?n:2-n)/(n+e)*100,(n+e)/2*100]},hsl2hwb:function(t){return i(u(t))},hsl2cmyk:function(t){return a(u(t))},hsl2keyword:function(t){return o(u(t))},hsv2rgb:d,hsv2hsl:function(t){var e,n,i=t[1]/100,a=t[2]/100;return e=i*a,[t[0],100*(e=(e/=(n=(2-i)*a)<=1?n:2-n)||0),100*(n/=2)]},hsv2hwb:function(t){return i(d(t))},hsv2cmyk:function(t){return a(d(t))},hsv2keyword:function(t){return o(d(t))},hwb2rgb:h,hwb2hsl:function(t){return e(h(t))},hwb2hsv:function(t){return n(h(t))},hwb2cmyk:function(t){return a(h(t))},hwb2keyword:function(t){return o(h(t))},cmyk2rgb:c,cmyk2hsl:function(t){return e(c(t))},cmyk2hsv:function(t){return n(c(t))},cmyk2hwb:function(t){return i(c(t))},cmyk2keyword:function(t){return o(c(t))},keyword2rgb:_,keyword2hsl:function(t){return e(_(t))},keyword2hsv:function(t){return n(_(t))},keyword2hwb:function(t){return i(_(t))},keyword2cmyk:function(t){return a(_(t))},keyword2lab:function(t){return l(_(t))},keyword2xyz:function(t){return s(_(t))},xyz2rgb:f,xyz2lab:m,xyz2lch:function(t){return v(m(t))},lab2xyz:p,lab2rgb:y,lab2lch:v,lch2lab:x,lch2xyz:function(t){return p(x(t))},lch2rgb:function(t){return y(x(t))}};function e(t){var e,n,i=t[0]/255,a=t[1]/255,r=t[2]/255,o=Math.min(i,a,r),s=Math.max(i,a,r),l=s-o;return s==o?e=0:i==s?e=(a-r)/l:a==s?e=2+(r-i)/l:r==s&&(e=4+(i-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),n=(o+s)/2,[e,100*(s==o?0:n<=.5?l/(s+o):l/(2-s-o)),100*n]}function n(t){var e,n,i=t[0],a=t[1],r=t[2],o=Math.min(i,a,r),s=Math.max(i,a,r),l=s-o;return n=0==s?0:l/s*1e3/10,s==o?e=0:i==s?e=(a-r)/l:a==s?e=2+(r-i)/l:r==s&&(e=4+(i-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),[e,n,s/255*1e3/10]}function i(t){var n=t[0],i=t[1],a=t[2];return[e(t)[0],1/255*Math.min(n,Math.min(i,a))*100,100*(a=1-1/255*Math.max(n,Math.max(i,a)))]}function a(t){var e,n=t[0]/255,i=t[1]/255,a=t[2]/255;return[100*((1-n-(e=Math.min(1-n,1-i,1-a)))/(1-e)||0),100*((1-i-e)/(1-e)||0),100*((1-a-e)/(1-e)||0),100*e]}function o(t){return w[JSON.stringify(t)]}function s(t){var e=t[0]/255,n=t[1]/255,i=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)),100*(.2126*e+.7152*n+.0722*i),100*(.0193*e+.1192*n+.9505*i)]}function l(t){var e=s(t),n=e[0],i=e[1],a=e[2];return i/=100,a/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(n-i),200*(i-(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116))]}function u(t){var e,n,i,a,r,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0==s)return[r=255*l,r,r];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var u=0;u<3;u++)(i=o+1/3*-(u-1))<0&&i++,i>1&&i--,a[u]=255*(r=6*i<1?e+6*(n-e)*i:2*i<1?n:3*i<2?e+(n-e)*(2/3-i)*6:e);return a}function d(t){var e=t[0]/60,n=t[1]/100,i=t[2]/100,a=Math.floor(e)%6,r=e-Math.floor(e),o=255*i*(1-n),s=255*i*(1-n*r),l=255*i*(1-n*(1-r));switch(i*=255,a){case 0:return[i,l,o];case 1:return[s,i,o];case 2:return[o,i,l];case 3:return[o,s,i];case 4:return[l,o,i];case 5:return[i,o,s]}}function h(t){var e,n,i,a,o=t[0]/360,s=t[1]/100,l=t[2]/100,u=s+l;switch(u>1&&(s/=u,l/=u),i=6*o-(e=Math.floor(6*o)),0!=(1&e)&&(i=1-i),a=s+i*((n=1-l)-s),e){default:case 6:case 0:r=n,g=a,b=s;break;case 1:r=a,g=n,b=s;break;case 2:r=s,g=n,b=a;break;case 3:r=s,g=a,b=n;break;case 4:r=a,g=s,b=n;break;case 5:r=n,g=s,b=a}return[255*r,255*g,255*b]}function c(t){var e=t[1]/100,n=t[2]/100,i=t[3]/100;return[255*(1-Math.min(1,t[0]/100*(1-i)+i)),255*(1-Math.min(1,e*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i))]}function f(t){var e,n,i,a=t[0]/100,r=t[1]/100,o=t[2]/100;return n=-.9689*a+1.8758*r+.0415*o,i=.0557*a+-.204*r+1.057*o,e=(e=3.2406*a+-1.5372*r+-.4986*o)>.0031308?1.055*Math.pow(e,1/2.4)-.055:e*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:i*=12.92,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(i=Math.min(Math.max(0,i),1))]}function m(t){var e=t[0],n=t[1],i=t[2];return n/=100,i/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]}function p(t){var e,n,i,a,r=t[0],o=t[1],s=t[2];return r<=8?a=(n=100*r/903.3)/100*7.787+16/116:(n=100*Math.pow((r+16)/116,3),a=Math.pow(n/100,1/3)),[e=e/95.047<=.008856?e=95.047*(o/500+a-16/116)/7.787:95.047*Math.pow(o/500+a,3),n,i=i/108.883<=.008859?i=108.883*(a-s/200-16/116)/7.787:108.883*Math.pow(a-s/200,3)]}function v(t){var e,n=t[0],i=t[1],a=t[2];return(e=360*Math.atan2(a,i)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(i*i+a*a),e]}function y(t){return f(p(t))}function x(t){var e,n=t[1];return e=t[2]/360*2*Math.PI,[t[0],n*Math.cos(e),n*Math.sin(e)]}function _(t){return k[t]}var k={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},w={};for(var M in k)w[JSON.stringify(k[M])]=M;var S=function(){return new O};for(var D in t){S[D+"Raw"]=function(e){return function(n){return"number"==typeof n&&(n=Array.prototype.slice.call(arguments)),t[e](n)}}(D);var C=/(\w+)2(\w+)/.exec(D),P=C[1],T=C[2];(S[P]=S[P]||{})[T]=S[D]=function(e){return function(n){"number"==typeof n&&(n=Array.prototype.slice.call(arguments));var i=t[e](n);if("string"==typeof i||void 0===i)return i;for(var a=0;a<i.length;a++)i[a]=Math.round(i[a]);return i}}(D)}var O=function(){this.convs={}};O.prototype.routeSpace=function(t,e){var n=e[0];return void 0===n?this.getValues(t):("number"==typeof n&&(n=Array.prototype.slice.call(e)),this.setValues(t,n))},O.prototype.setValues=function(t,e){return this.space=t,this.convs={},this.convs[t]=e,this},O.prototype.getValues=function(t){var e=this.convs[t];if(!e){var n=this.space;e=S[n][t](this.convs[n]),this.convs[t]=e}return e},["rgb","hsl","hsv","cmyk","keyword"].forEach((function(t){O.prototype[t]=function(e){return this.routeSpace(t,arguments)}}));var I=S,A={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},F={getRgba:R,getHsla:L,getRgb:function(t){var e=R(t);return e&&e.slice(0,3)},getHsl:function(t){var e=L(t);return e&&e.slice(0,3)},getHwb:W,getAlpha:function(t){var e=R(t);return e||(e=L(t))||(e=W(t))?e[3]:void 0},hexString:function(t,e){return e=void 0!==e&&3===t.length?e:t[3],"#"+H(t[0])+H(t[1])+H(t[2])+(e>=0&&e<1?H(Math.round(255*e)):"")},rgbString:function(t,e){return e<1||t[3]&&t[3]<1?Y(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:Y,percentString:function(t,e){return e<1||t[3]&&t[3]<1?N(t,e):"rgb("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%)"},percentaString:N,hslString:function(t,e){return e<1||t[3]&&t[3]<1?z(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:z,hwbString:function(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return E[t.slice(0,3)]}};function R(t){if(t){var e=[0,0,0],n=1,i=t.match(/^#([a-fA-F0-9]{3,4})$/i),a="";if(i){a=(i=i[1])[3];for(var r=0;r<e.length;r++)e[r]=parseInt(i[r]+i[r],16);a&&(n=Math.round(parseInt(a+a,16)/255*100)/100)}else if(i=t.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){for(a=i[2],i=i[1],r=0;r<e.length;r++)e[r]=parseInt(i.slice(2*r,2*r+2),16);a&&(n=Math.round(parseInt(a,16)/255*100)/100)}else if(i=t.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(r=0;r<e.length;r++)e[r]=parseInt(i[r+1]);n=parseFloat(i[4])}else if(i=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(r=0;r<e.length;r++)e[r]=Math.round(2.55*parseFloat(i[r+1]));n=parseFloat(i[4])}else if(i=t.match(/(\w+)/)){if("transparent"==i[1])return[0,0,0,0];if(!(e=A[i[1]]))return}for(r=0;r<e.length;r++)e[r]=V(e[r],0,255);return n=n||0==n?V(n,0,1):1,e[3]=n,e}}function L(t){if(t){var e=t.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var n=parseFloat(e[4]);return[V(parseInt(e[1]),0,360),V(parseFloat(e[2]),0,100),V(parseFloat(e[3]),0,100),V(isNaN(n)?1:n,0,1)]}}}function W(t){if(t){var e=t.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var n=parseFloat(e[4]);return[V(parseInt(e[1]),0,360),V(parseFloat(e[2]),0,100),V(parseFloat(e[3]),0,100),V(isNaN(n)?1:n,0,1)]}}}function Y(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function N(t,e){return"rgba("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%, "+(e||t[3]||1)+")"}function z(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function V(t,e,n){return Math.min(Math.max(e,t),n)}function H(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var E={};for(var B in A)E[A[B]]=B;var j=function(t){return t instanceof j?t:this instanceof j?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof t?(e=F.getRgba(t))?this.setValues("rgb",e):(e=F.getHsla(t))?this.setValues("hsl",e):(e=F.getHwb(t))&&this.setValues("hwb",e):"object"==typeof t&&(void 0!==(e=t).r||void 0!==e.red?this.setValues("rgb",e):void 0!==e.l||void 0!==e.lightness?this.setValues("hsl",e):void 0!==e.v||void 0!==e.value?this.setValues("hsv",e):void 0!==e.w||void 0!==e.whiteness?this.setValues("hwb",e):void 0===e.c&&void 0===e.cyan||this.setValues("cmyk",e)))):new j(t);var e};j.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t&&(t=(t%=360)<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return F.hexString(this.values.rgb)},rgbString:function(){return F.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return F.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return F.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return F.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return F.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return F.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return F.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],n=0;n<t.length;n++){var i=t[n]/255;e[n]=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),n=t.luminosity();return e>n?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=this,i=t,a=void 0===e?.5:e,r=2*a-1,o=n.alpha()-i.alpha(),s=((r*o==-1?r:(r+o)/(1+r*o))+1)/2,l=1-s;return this.rgb(s*n.red()+l*i.red(),s*n.green()+l*i.green(),s*n.blue()+l*i.blue()).alpha(n.alpha()*a+i.alpha()*(1-a))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new j,i=this.values,a=n.values;for(var r in i)i.hasOwnProperty(r)&&("[object Array]"===(e={}.toString.call(t=i[r]))?a[r]=t.slice(0):"[object Number]"===e?a[r]=t:console.error("unexpected color value:",t));return n}},j.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},j.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},j.prototype.getValues=function(t){for(var e=this.values,n={},i=0;i<t.length;i++)n[t.charAt(i)]=e[t][i];return 1!==e.alpha&&(n.a=e.alpha),n},j.prototype.setValues=function(t,e){var n,i,a=this.values,r=this.spaces,o=this.maxes,s=1;if(this.valid=!0,"alpha"===t)s=e;else if(e.length)a[t]=e.slice(0,t.length),s=e[t.length];else if(void 0!==e[t.charAt(0)]){for(n=0;n<t.length;n++)a[t][n]=e[t.charAt(n)];s=e.a}else if(void 0!==e[r[t][0]]){var l=r[t];for(n=0;n<t.length;n++)a[t][n]=e[l[n]];s=e.alpha}if(a.alpha=Math.max(0,Math.min(1,void 0===s?a.alpha:s)),"alpha"===t)return!1;for(n=0;n<t.length;n++)i=Math.max(0,Math.min(o[t][n],a[t][n])),a[t][n]=Math.round(i);for(var u in r)u!==t&&(a[u]=I[t][u](a[t]));return!0},j.prototype.setSpace=function(t,e){var n=e[0];return void 0===n?this.getValues(t):("number"==typeof n&&(n=Array.prototype.slice.call(e)),this.setValues(t,n),this)},j.prototype.setChannel=function(t,e,n){var i=this.values[t];return void 0===n?i[e]:(n===i[e]||(i[e]=n,this.setValues(t,i)),this)},"undefined"!=typeof window&&(window.Color=j);var U,G=j,q={noop:function(){},uid:(U=0,function(){return U++}),isNullOrUndef:function(t){return null==t},isArray:function(t){if(Array.isArray&&Array.isArray(t))return!0;var e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},isFinite:function(t){return("number"==typeof t||t instanceof Number)&&isFinite(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,n){return q.valueOrDefault(q.isArray(t)?t[e]:t,n)},callback:function(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)},each:function(t,e,n,i){var a,r,o;if(q.isArray(t))if(r=t.length,i)for(a=r-1;a>=0;a--)e.call(n,t[a],a);else for(a=0;a<r;a++)e.call(n,t[a],a);else if(q.isObject(t))for(r=(o=Object.keys(t)).length,a=0;a<r;a++)e.call(n,t[o[a]],o[a])},arrayEquals:function(t,e){var n,i,a,r;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;++n)if(r=e[n],(a=t[n])instanceof Array&&r instanceof Array){if(!q.arrayEquals(a,r))return!1}else if(a!==r)return!1;return!0},clone:function(t){if(q.isArray(t))return t.map(q.clone);if(q.isObject(t)){for(var e={},n=Object.keys(t),i=n.length,a=0;a<i;++a)e[n[a]]=q.clone(t[n[a]]);return e}return t},_merger:function(t,e,n,i){var a=e[t],r=n[t];q.isObject(a)&&q.isObject(r)?q.merge(a,r,i):e[t]=q.clone(r)},_mergerIf:function(t,e,n){var i=e[t],a=n[t];q.isObject(i)&&q.isObject(a)?q.mergeIf(i,a):e.hasOwnProperty(t)||(e[t]=q.clone(a))},merge:function(t,e,n){var i,a,r,o,s,l=q.isArray(e)?e:[e],u=l.length;if(!q.isObject(t))return t;for(i=(n=n||{}).merger||q._merger,a=0;a<u;++a)if(q.isObject(e=l[a]))for(s=0,o=(r=Object.keys(e)).length;s<o;++s)i(r[s],t,e,n);return t},mergeIf:function(t,e){return q.merge(t,e,{merger:q._mergerIf})},extend:function(t){for(var e=function(e,n){t[n]=e},n=1,i=arguments.length;n<i;++n)q.each(arguments[n],e);return t},inherits:function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},i=function(){this.constructor=n};return i.prototype=e.prototype,n.prototype=new i,n.extend=q.inherits,t&&q.extend(n.prototype,t),n.__super__=e.prototype,n}},Z=q;q.callCallback=q.callback,q.indexOf=function(t,e,n){return Array.prototype.indexOf.call(t,e,n)},q.getValueOrDefault=q.valueOrDefault,q.getValueAtIndexOrDefault=q.valueAtIndexOrDefault;var $={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return(t-=1)*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-((t-=1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return(t-=1)*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return 1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return t>=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),t<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-$.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*$.easeInBounce(2*t):.5*$.easeOutBounce(2*t-1)+.5}},X={effects:$};Z.easingEffects=$;var J=Math.PI,K=J/180,Q=2*J,tt=J/2,et=J/4,nt=2*J/3,it={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,a,r){if(r){var o=Math.min(r,a/2,i/2),s=e+o,l=n+o,u=e+i-o,d=n+a-o;t.moveTo(e,l),s<u&&l<d?(t.arc(s,l,o,-J,-tt),t.arc(u,l,o,-tt,0),t.arc(u,d,o,0,tt),t.arc(s,d,o,tt,J)):s<u?(t.moveTo(s,n),t.arc(u,l,o,-tt,tt),t.arc(s,l,o,tt,J+tt)):l<d?(t.arc(s,l,o,-J,0),t.arc(s,d,o,0,J)):t.arc(s,l,o,-J,J),t.closePath(),t.moveTo(e,n)}else t.rect(e,n,i,a)},drawPoint:function(t,e,n,i,a,r){var o,s,l,u,d,h=(r||0)*K;if(!e||"object"!=typeof e||"[object HTMLImageElement]"!==(o=e.toString())&&"[object HTMLCanvasElement]"!==o){if(!(isNaN(n)||n<=0)){switch(t.beginPath(),e){default:t.arc(i,a,n,0,Q),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(h)*n,a-Math.cos(h)*n),h+=nt,t.lineTo(i+Math.sin(h)*n,a-Math.cos(h)*n),h+=nt,t.lineTo(i+Math.sin(h)*n,a-Math.cos(h)*n),t.closePath();break;case"rectRounded":u=n-(d=.516*n),s=Math.cos(h+et)*u,l=Math.sin(h+et)*u,t.arc(i-s,a-l,d,h-J,h-tt),t.arc(i+l,a-s,d,h-tt,h),t.arc(i+s,a+l,d,h,h+tt),t.arc(i-l,a+s,d,h+tt,h+J),t.closePath();break;case"rect":if(!r){u=Math.SQRT1_2*n,t.rect(i-u,a-u,2*u,2*u);break}h+=et;case"rectRot":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+l,a-s),t.lineTo(i+s,a+l),t.lineTo(i-l,a+s),t.closePath();break;case"crossRot":h+=et;case"cross":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i+l,a-s),t.lineTo(i-l,a+s);break;case"star":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i+l,a-s),t.lineTo(i-l,a+s),h+=et,s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i+l,a-s),t.lineTo(i-l,a+s);break;case"line":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l);break;case"dash":t.moveTo(i,a),t.lineTo(i+Math.cos(h)*n,a+Math.sin(h)*n)}t.fill(),t.stroke()}}else t.drawImage(e,i-e.width/2,a-e.height/2,e.width,e.height)},_isPointInArea:function(t,e){var n=1e-6;return t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,n,i){var a=n.steppedLine;if(a){if("middle"===a){var r=(e.x+n.x)/2;t.lineTo(r,i?n.y:e.y),t.lineTo(r,i?e.y:n.y)}else"after"===a&&!i||"after"!==a&&i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}else n.tension?t.bezierCurveTo(i?e.controlPointPreviousX:e.controlPointNextX,i?e.controlPointPreviousY:e.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},at=it;Z.clear=it.clear,Z.drawRoundedRectangle=function(t){t.beginPath(),it.roundedRect.apply(it,arguments)};var rt={_set:function(t,e){return Z.merge(this[t]||(this[t]={}),e)}};rt._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0});var ot=rt,st=Z.valueOrDefault,lt={toLineHeight:function(t,e){var n=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,n,i,a;return Z.isObject(t)?(e=+t.top||0,n=+t.right||0,i=+t.bottom||0,a=+t.left||0):e=n=i=a=+t||0,{top:e,right:n,bottom:i,left:a,height:e+i,width:a+n}},_parseFont:function(t){var e=ot.global,n=st(t.fontSize,e.defaultFontSize),i={family:st(t.fontFamily,e.defaultFontFamily),lineHeight:Z.options.toLineHeight(st(t.lineHeight,e.defaultLineHeight),n),size:n,style:st(t.fontStyle,e.defaultFontStyle),weight:null,string:""};return i.string=function(t){return!t||Z.isNullOrUndef(t.size)||Z.isNullOrUndef(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(i),i},resolve:function(t,e,n){var i,a,r;for(i=0,a=t.length;i<a;++i)if(void 0!==(r=t[i])&&(void 0!==e&&"function"==typeof r&&(r=r(e)),void 0!==n&&Z.isArray(r)&&(r=r[n]),void 0!==r))return r}},ut=Z,dt=at,ht=lt;ut.easing=X,ut.canvas=dt,ut.options=ht;var ct=function(t){ut.extend(this,t),this.initialize.apply(this,arguments)};ut.extend(ct.prototype,{initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=ut.clone(t._model)),t._start={},t},transition:function(t){var e=this,n=e._model,i=e._start,a=e._view;return n&&1!==t?(a||(a=e._view={}),i||(i=e._start={}),function(t,e,n,i){var a,r,o,s,l,u,d,h,c,f=Object.keys(n);for(a=0,r=f.length;a<r;++a)if(u=n[o=f[a]],e.hasOwnProperty(o)||(e[o]=u),(s=e[o])!==u&&"_"!==o[0]){if(t.hasOwnProperty(o)||(t[o]=s),(d=typeof u)==typeof(l=t[o]))if("string"===d){if((h=G(l)).valid&&(c=G(u)).valid){e[o]=c.mix(h,i).rgbString();continue}}else if(ut.isFinite(l)&&ut.isFinite(u)){e[o]=l+(u-l)*i;continue}e[o]=u}}(i,a,n,t),e):(e._view=n,e._start=null,e)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return ut.isNumber(this._model.x)&&ut.isNumber(this._model.y)}}),ct.extend=ut.inherits;var ft=ct,gt=ft.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),mt=gt;Object.defineProperty(gt.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(gt.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}}),ot._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:ut.noop,onComplete:ut.noop}});var pt={animations:[],request:null,addAnimation:function(t,e,n,i){var a,r,o=this.animations;for(e.chart=t,e.startTime=Date.now(),e.duration=n,i||(t.animating=!0),a=0,r=o.length;a<r;++a)if(o[a].chart===t)return void(o[a]=e);o.push(e),1===o.length&&this.requestAnimationFrame()},cancelAnimation:function(t){var e=ut.findIndex(this.animations,(function(e){return e.chart===t}));-1!==e&&(this.animations.splice(e,1),t.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=ut.requestAnimFrame.call(window,(function(){t.request=null,t.startDigest()})))},startDigest:function(){var t=this;t.advance(),t.animations.length>0&&t.requestAnimationFrame()},advance:function(){for(var t,e,n,i,a=this.animations,r=0;r<a.length;)e=(t=a[r]).chart,n=t.numSteps,i=Math.floor((Date.now()-t.startTime)/t.duration*n)+1,t.currentStep=Math.min(i,n),ut.callback(t.render,[e,t],e),ut.callback(t.onAnimationProgress,[t],e),t.currentStep>=n?(ut.callback(t.onAnimationComplete,[t],e),e.animating=!1,a.splice(r,1)):++r}},vt=ut.options.resolve,yt=["push","pop","shift","splice","unshift"];function bt(t,e){var n=t._chartjs;if(n){var i=n.listeners,a=i.indexOf(e);-1!==a&&i.splice(a,1),i.length>0||(yt.forEach((function(e){delete t[e]})),delete t._chartjs)}}var xt=function(t,e){this.initialize(t,e)};ut.extend(xt.prototype,{datasetElementType:null,dataElementType:null,initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements()},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),n=t.getDataset();null!==e.xAxisID&&e.xAxisID in t.chart.scales||(e.xAxisID=n.xAxisID||t.chart.options.scales.xAxes[0].id),null!==e.yAxisID&&e.yAxisID in t.chart.scales||(e.yAxisID=n.yAxisID||t.chart.options.scales.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this.update(!0)},destroy:function(){this._data&&bt(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,n=e.dataElementType;return n&&new n({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,n=this,i=n.getMeta(),a=n.getDataset().data||[],r=i.data;for(t=0,e=a.length;t<e;++t)r[t]=r[t]||n.createMetaData(t);i.dataset=i.dataset||n.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var t,e,n=this,i=n.getDataset(),a=i.data||(i.data=[]);n._data!==a&&(n._data&&bt(n._data,n),a&&Object.isExtensible(a)&&(e=n,(t=a)._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),yt.forEach((function(e){var n="onData"+e.charAt(0).toUpperCase()+e.slice(1),i=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),a=i.apply(this,e);return ut.each(t._chartjs.listeners,(function(t){"function"==typeof t[n]&&t[n].apply(t,e)})),a}})})))),n._data=a),n.resyncElements()},update:ut.noop,transition:function(t){for(var e=this.getMeta(),n=e.data||[],i=n.length,a=0;a<i;++a)n[a].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],n=e.length,i=0;for(t.dataset&&t.dataset.draw();i<n;++i)e[i].draw()},removeHoverStyle:function(t){ut.merge(t._model,t.$previousStyle||{}),delete t.$previousStyle},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t._index,i=t.custom||{},a=t._model,r=ut.getHoverColor;t.$previousStyle={backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderWidth:a.borderWidth},a.backgroundColor=vt([i.hoverBackgroundColor,e.hoverBackgroundColor,r(a.backgroundColor)],void 0,n),a.borderColor=vt([i.hoverBorderColor,e.hoverBorderColor,r(a.borderColor)],void 0,n),a.borderWidth=vt([i.hoverBorderWidth,e.hoverBorderWidth,a.borderWidth],void 0,n)},resyncElements:function(){var t=this,e=t.getMeta(),n=t.getDataset().data,i=e.data.length,a=n.length;a<i?e.data.splice(a,i-a):a>i&&t.insertElements(i,a-i)},insertElements:function(t,e){for(var n=0;n<e;++n)this.addElementAndReset(t+n)},onDataPush:function(){var t=arguments.length;this.insertElements(this.getDataset().data.length-t,t)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(t,e){this.getMeta().data.splice(t,e),this.insertElements(t,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),xt.extend=ut.inherits;var _t=xt;ot._set("global",{elements:{arc:{backgroundColor:ot.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var kt=ft.extend({inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2)},inRange:function(t,e){var n=this._view;if(n){for(var i=ut.getAngleFromPoint(n,{x:t,y:e}),a=i.angle,r=i.distance,o=n.startAngle,s=n.endAngle;s<o;)s+=2*Math.PI;for(;a>s;)a-=2*Math.PI;for(;a<o;)a+=2*Math.PI;return a>=o&&a<=s&&r>=n.innerRadius&&r<=n.outerRadius}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t,e=this._chart.ctx,n=this._view,i=n.startAngle,a=n.endAngle,r="inner"===n.borderAlign?.33:0;e.save(),e.beginPath(),e.arc(n.x,n.y,Math.max(n.outerRadius-r,0),i,a),e.arc(n.x,n.y,n.innerRadius,a,i,!0),e.closePath(),e.fillStyle=n.backgroundColor,e.fill(),n.borderWidth&&("inner"===n.borderAlign?(e.beginPath(),e.arc(n.x,n.y,n.outerRadius,i-(t=r/n.outerRadius),a+t),n.innerRadius>r?e.arc(n.x,n.y,n.innerRadius-r,a+(t=r/n.innerRadius),i-t,!0):e.arc(n.x,n.y,r,a+Math.PI/2,i-Math.PI/2),e.closePath(),e.clip(),e.beginPath(),e.arc(n.x,n.y,n.outerRadius,i,a),e.arc(n.x,n.y,n.innerRadius,a,i,!0),e.closePath(),e.lineWidth=2*n.borderWidth,e.lineJoin="round"):(e.lineWidth=n.borderWidth,e.lineJoin="bevel"),e.strokeStyle=n.borderColor,e.stroke()),e.restore()}}),wt=ut.valueOrDefault,Mt=ot.global.defaultColor;ot._set("global",{elements:{line:{tension:.4,backgroundColor:Mt,borderWidth:3,borderColor:Mt,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var St=ft.extend({draw:function(){var t,e,n,i,a=this,r=a._view,o=a._chart.ctx,s=r.spanGaps,l=a._children.slice(),u=ot.global,d=u.elements.line,h=-1;for(a._loop&&l.length&&l.push(l[0]),o.save(),o.lineCap=r.borderCapStyle||d.borderCapStyle,o.setLineDash&&o.setLineDash(r.borderDash||d.borderDash),o.lineDashOffset=wt(r.borderDashOffset,d.borderDashOffset),o.lineJoin=r.borderJoinStyle||d.borderJoinStyle,o.lineWidth=wt(r.borderWidth,d.borderWidth),o.strokeStyle=r.borderColor||u.defaultColor,o.beginPath(),h=-1,t=0;t<l.length;++t)e=l[t],n=ut.previousItem(l,t),i=e._view,0===t?i.skip||(o.moveTo(i.x,i.y),h=t):(n=-1===h?n:l[h],i.skip||(h!==t-1&&!s||-1===h?o.moveTo(i.x,i.y):ut.canvas.lineTo(o,n._view,e._view),h=t));o.stroke(),o.restore()}}),Dt=ut.valueOrDefault,Ct=ot.global.defaultColor;function Pt(t){var e=this._view;return!!e&&Math.abs(t-e.x)<e.radius+e.hitRadius}ot._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:Ct,borderColor:Ct,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var Tt=ft.extend({inRange:function(t,e){var n=this._view;return!!n&&Math.pow(t-n.x,2)+Math.pow(e-n.y,2)<Math.pow(n.hitRadius+n.radius,2)},inLabelRange:Pt,inXRange:Pt,inYRange:function(t){var e=this._view;return!!e&&Math.abs(t-e.y)<e.radius+e.hitRadius},getCenterPoint:function(){var t=this._view;return{x:t.x,y:t.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(t){var e=this._view,n=this._chart.ctx,i=e.pointStyle,a=e.rotation,r=e.radius,o=e.x,s=e.y,l=ot.global,u=l.defaultColor;e.skip||(void 0===t||ut.canvas._isPointInArea(e,t))&&(n.strokeStyle=e.borderColor||u,n.lineWidth=Dt(e.borderWidth,l.elements.point.borderWidth),n.fillStyle=e.backgroundColor||u,ut.canvas.drawPoint(n,i,r,o,s,a))}}),Ot=ot.global.defaultColor;function It(t){return t&&void 0!==t.width}function At(t){var e,n,i,a,r;return It(t)?(e=t.x-(r=t.width/2),n=t.x+r,i=Math.min(t.y,t.base),a=Math.max(t.y,t.base)):(r=t.height/2,e=Math.min(t.x,t.base),n=Math.max(t.x,t.base),i=t.y-r,a=t.y+r),{left:e,top:i,right:n,bottom:a}}function Ft(t,e,n){return t===e?n:t===n?e:t}function Rt(t,e,n){var i=null===e,a=null===n,r=!(!t||i&&a)&&At(t);return r&&(i||e>=r.left&&e<=r.right)&&(a||n>=r.top&&n<=r.bottom)}ot._set("global",{elements:{rectangle:{backgroundColor:Ot,borderColor:Ot,borderSkipped:"bottom",borderWidth:0}}});var Lt=ft.extend({draw:function(){var t=this._chart.ctx,e=this._view,n=function(t){var e=At(t),n=e.right-e.left,i=e.bottom-e.top,a=function(t,e,n){var i,a,r,o,s=t.borderWidth,l=function(t){var e=t.borderSkipped,n={};return e?(t.horizontal?t.base>t.x&&(e=Ft(e,"left","right")):t.base<t.y&&(e=Ft(e,"bottom","top")),n[e]=!0,n):n}(t);return ut.isObject(s)?(i=+s.top||0,a=+s.right||0,r=+s.bottom||0,o=+s.left||0):i=a=r=o=+s||0,{t:l.top||i<0?0:i>n?n:i,r:l.right||a<0?0:a>e?e:a,b:l.bottom||r<0?0:r>n?n:r,l:l.left||o<0?0:o>e?e:o}}(t,n/2,i/2);return{outer:{x:e.left,y:e.top,w:n,h:i},inner:{x:e.left+a.l,y:e.top+a.t,w:n-a.l-a.r,h:i-a.t-a.b}}}(e),i=n.outer,a=n.inner;t.fillStyle=e.backgroundColor,t.fillRect(i.x,i.y,i.w,i.h),i.w===a.w&&i.h===a.h||(t.save(),t.beginPath(),t.rect(i.x,i.y,i.w,i.h),t.clip(),t.fillStyle=e.borderColor,t.rect(a.x,a.y,a.w,a.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return Rt(this._view,t,e)},inLabelRange:function(t,e){var n=this._view;return It(n)?Rt(n,t,null):Rt(n,null,e)},inXRange:function(t){return Rt(this._view,t,null)},inYRange:function(t){return Rt(this._view,null,t)},getCenterPoint:function(){var t,e,n=this._view;return It(n)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return It(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),Wt={},Yt=St,Nt=Tt,zt=Lt;Wt.Arc=kt,Wt.Line=Yt,Wt.Point=Nt,Wt.Rectangle=zt;var Vt=ut.options.resolve;ot._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}});var Ht=_t.extend({dataElementType:Wt.Rectangle,initialize:function(){var t,e=this;_t.prototype.initialize.apply(e,arguments),(t=e.getMeta()).stack=e.getDataset().stack,t.bar=!0},update:function(t){var e,n,i=this,a=i.getMeta().data;for(i._ruler=i.getRuler(),e=0,n=a.length;e<n;++e)i.updateElement(a[e],e,t)},updateElement:function(t,e,n){var i=this,a=i.getMeta(),r=i.getDataset(),o=i._resolveElementOptions(t,e);t._xScale=i.getScaleForId(a.xAxisID),t._yScale=i.getScaleForId(a.yAxisID),t._datasetIndex=i.index,t._index=e,t._model={backgroundColor:o.backgroundColor,borderColor:o.borderColor,borderSkipped:o.borderSkipped,borderWidth:o.borderWidth,datasetLabel:r.label,label:i.chart.data.labels[e]},i._updateElementGeometry(t,e,n),t.pivot()},_updateElementGeometry:function(t,e,n){var i=this,a=t._model,r=i._getValueScale(),o=r.getBasePixel(),s=r.isHorizontal(),l=i._ruler||i.getRuler(),u=i.calculateBarValuePixels(i.index,e),d=i.calculateBarIndexPixels(i.index,e,l);a.horizontal=s,a.base=n?o:u.base,a.x=s?n?o:u.head:d.center,a.y=s?d.center:n?o:u.head,a.height=s?d.size:void 0,a.width=s?void 0:d.size},_getStacks:function(t){var e,n,i=this.chart,a=this._getIndexScale().options.stacked,r=void 0===t?i.data.datasets.length:t+1,o=[];for(e=0;e<r;++e)(n=i.getDatasetMeta(e)).bar&&i.isDatasetVisible(e)&&(!1===a||!0===a&&-1===o.indexOf(n.stack)||void 0===a&&(void 0===n.stack||-1===o.indexOf(n.stack)))&&o.push(n.stack);return o},getStackCount:function(){return this._getStacks().length},getStackIndex:function(t,e){var n=this._getStacks(t),i=void 0!==e?n.indexOf(e):-1;return-1===i?n.length-1:i},getRuler:function(){var t,e,n=this,i=n._getIndexScale(),a=n.getStackCount(),r=n.index,o=i.isHorizontal(),s=o?i.left:i.top,l=s+(o?i.width:i.height),u=[];for(t=0,e=n.getMeta().data.length;t<e;++t)u.push(i.getPixelForValue(null,t,r));return{min:ut.isNullOrUndef(i.options.barThickness)?function(t,e){var n,i,a,r,o=t.isHorizontal()?t.width:t.height,s=t.getTicks();for(a=1,r=e.length;a<r;++a)o=Math.min(o,Math.abs(e[a]-e[a-1]));for(a=0,r=s.length;a<r;++a)i=t.getPixelForTick(a),o=a>0?Math.min(o,i-n):o,n=i;return o}(i,u):-1,pixels:u,start:s,end:l,stackCount:a,scale:i}},calculateBarValuePixels:function(t,e){var n,i,a,r,o,s,l=this,u=l.chart,d=l.getMeta(),h=l._getValueScale(),c=h.isHorizontal(),f=u.data.datasets,g=+h.getRightValue(f[t].data[e]),m=h.options.minBarLength,p=h.options.stacked,v=d.stack,y=0;if(p||void 0===p&&void 0!==v)for(n=0;n<t;++n)(i=u.getDatasetMeta(n)).bar&&i.stack===v&&i.controller._getValueScaleId()===h.id&&u.isDatasetVisible(n)&&(a=+h.getRightValue(f[n].data[e]),(g<0&&a<0||g>=0&&a>0)&&(y+=a));return r=h.getPixelForValue(y),s=(o=h.getPixelForValue(y+g))-r,void 0!==m&&Math.abs(s)<m&&(s=m,o=g>=0&&!c||g<0&&c?r-m:r+m),{size:s,base:r,head:o,center:o+s/2}},calculateBarIndexPixels:function(t,e,n){var i=n.scale.options,a="flex"===i.barThickness?function(t,e,n){var i,a=e.pixels,r=a[t],o=t>0?a[t-1]:null,s=t<a.length-1?a[t+1]:null,l=n.categoryPercentage;return null===o&&(o=r-(null===s?e.end-e.start:s-r)),null===s&&(s=r+r-o),i=r-(r-Math.min(o,s))/2*l,{chunk:Math.abs(s-o)/2*l/e.stackCount,ratio:n.barPercentage,start:i}}(e,n,i):function(t,e,n){var i,a,r=n.barThickness,o=e.stackCount,s=e.pixels[t];return ut.isNullOrUndef(r)?(i=e.min*n.categoryPercentage,a=n.barPercentage):(i=r*o,a=1),{chunk:i/o,ratio:a,start:s-i/2}}(e,n,i),r=this.getStackIndex(t,this.getMeta().stack),o=a.start+a.chunk*r+a.chunk/2,s=Math.min(ut.valueOrDefault(i.maxBarThickness,1/0),a.chunk*a.ratio);return{base:o-s/2,head:o+s/2,center:o,size:s}},draw:function(){var t=this,e=t.chart,n=t._getValueScale(),i=t.getMeta().data,a=t.getDataset(),r=i.length,o=0;for(ut.canvas.clipArea(e.ctx,e.chartArea);o<r;++o)isNaN(n.getRightValue(a.data[o]))||i[o].draw();ut.canvas.unclipArea(e.ctx)},_resolveElementOptions:function(t,e){var n,i,a,r=this,o=r.chart,s=o.data.datasets[r.index],l=t.custom||{},u=o.options.elements.rectangle,d={},h={chart:o,dataIndex:e,dataset:s,datasetIndex:r.index},c=["backgroundColor","borderColor","borderSkipped","borderWidth"];for(n=0,i=c.length;n<i;++n)d[a=c[n]]=Vt([l[a],s[a],u[a]],h,e);return d}}),Et=ut.valueOrDefault,Bt=ut.options.resolve;ot._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return(e.datasets[t.datasetIndex].label||"")+": ("+t.xLabel+", "+t.yLabel+", "+e.datasets[t.datasetIndex].data[t.index].r+")"}}}});var jt=_t.extend({dataElementType:Wt.Point,update:function(t){var e=this,n=e.getMeta();ut.each(n.data,(function(n,i){e.updateElement(n,i,t)}))},updateElement:function(t,e,n){var i=this,a=i.getMeta(),r=t.custom||{},o=i.getScaleForId(a.xAxisID),s=i.getScaleForId(a.yAxisID),l=i._resolveElementOptions(t,e),u=i.getDataset().data[e],d=i.index,h=n?o.getPixelForDecimal(.5):o.getPixelForValue("object"==typeof u?u:NaN,e,d),c=n?s.getBasePixel():s.getPixelForValue(u,e,d);t._xScale=o,t._yScale=s,t._options=l,t._datasetIndex=d,t._index=e,t._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,rotation:l.rotation,radius:n?0:l.radius,skip:r.skip||isNaN(h)||isNaN(c),x:h,y:c},t.pivot()},setHoverStyle:function(t){var e=t._model,n=t._options,i=ut.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Et(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Et(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Et(n.hoverBorderWidth,n.borderWidth),e.radius=n.radius+n.hoverRadius},_resolveElementOptions:function(t,e){var n,i,a,r=this,o=r.chart,s=o.data.datasets[r.index],l=t.custom||{},u=o.options.elements.point,d=s.data[e],h={},c={chart:o,dataIndex:e,dataset:s,datasetIndex:r.index},f=["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"];for(n=0,i=f.length;n<i;++n)h[a=f[n]]=Bt([l[a],s[a],u[a]],c,e);return h.radius=Bt([l.radius,d?d.r:void 0,s.radius,u.radius],c,e),h}}),Ut=ut.options.resolve,Gt=ut.valueOrDefault;ot._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');var n=t.data,i=n.datasets,a=n.labels;if(i.length)for(var r=0;r<i[0].data.length;++r)e.push('<li><span style="background-color:'+i[0].backgroundColor[r]+'"></span>'),a[r]&&e.push(a[r]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,i){var a=t.getDatasetMeta(0),r=e.datasets[0],o=a.data[i],s=o&&o.custom||{},l=t.options.elements.arc;return{text:n,fillStyle:Ut([s.backgroundColor,r.backgroundColor,l.backgroundColor],void 0,i),strokeStyle:Ut([s.borderColor,r.borderColor,l.borderColor],void 0,i),lineWidth:Ut([s.borderWidth,r.borderWidth,l.borderWidth],void 0,i),hidden:isNaN(r.data[i])||a.data[i].hidden,index:i}})):[]}},onClick:function(t,e){var n,i,a,r=e.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n<i;++n)(a=o.getDatasetMeta(n)).data[r]&&(a.data[r].hidden=!a.data[r].hidden);o.update()}},cutoutPercentage:50,rotation:-.5*Math.PI,circumference:2*Math.PI,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.labels[t.index],i=": "+e.datasets[t.datasetIndex].data[t.index];return ut.isArray(n)?(n=n.slice())[0]+=i:n+=i,n}}}});var qt=_t.extend({dataElementType:Wt.Arc,linkScales:ut.noop,getRingIndex:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&++e;return e},update:function(t){var e,n,i=this,a=i.chart,r=a.chartArea,o=a.options,s=r.right-r.left,l=r.bottom-r.top,u=Math.min(s,l),d={x:0,y:0},h=i.getMeta(),c=h.data,f=o.cutoutPercentage,g=o.circumference,m=i._getRingWeight(i.index);if(g<2*Math.PI){var p=o.rotation%(2*Math.PI),v=(p+=2*Math.PI*(p>=Math.PI?-1:p<-Math.PI?1:0))+g,y={x:Math.cos(p),y:Math.sin(p)},b={x:Math.cos(v),y:Math.sin(v)},x=p<=0&&v>=0||p<=2*Math.PI&&2*Math.PI<=v,_=p<=.5*Math.PI&&.5*Math.PI<=v||p<=2.5*Math.PI&&2.5*Math.PI<=v,k=p<=-Math.PI&&-Math.PI<=v||p<=Math.PI&&Math.PI<=v,w=p<=.5*-Math.PI&&.5*-Math.PI<=v||p<=1.5*Math.PI&&1.5*Math.PI<=v,M=f/100,S={x:k?-1:Math.min(y.x*(y.x<0?1:M),b.x*(b.x<0?1:M)),y:w?-1:Math.min(y.y*(y.y<0?1:M),b.y*(b.y<0?1:M))},D={x:x?1:Math.max(y.x*(y.x>0?1:M),b.x*(b.x>0?1:M)),y:_?1:Math.max(y.y*(y.y>0?1:M),b.y*(b.y>0?1:M))},C={width:.5*(D.x-S.x),height:.5*(D.y-S.y)};u=Math.min(s/C.width,l/C.height),d={x:-.5*(D.x+S.x),y:-.5*(D.y+S.y)}}for(e=0,n=c.length;e<n;++e)c[e]._options=i._resolveElementOptions(c[e],e);for(a.borderWidth=i.getMaxBorderWidth(),a.outerRadius=Math.max((u-a.borderWidth)/2,0),a.innerRadius=Math.max(f?a.outerRadius/100*f:0,0),a.radiusLength=(a.outerRadius-a.innerRadius)/(i._getVisibleDatasetWeightTotal()||1),a.offsetX=d.x*a.outerRadius,a.offsetY=d.y*a.outerRadius,h.total=i.calculateTotal(),i.outerRadius=a.outerRadius-a.radiusLength*i._getRingWeightOffset(i.index),i.innerRadius=Math.max(i.outerRadius-a.radiusLength*m,0),e=0,n=c.length;e<n;++e)i.updateElement(c[e],e,t)},updateElement:function(t,e,n){var i=this,a=i.chart,r=a.chartArea,o=a.options,s=o.animation,l=(r.left+r.right)/2,u=(r.top+r.bottom)/2,d=o.rotation,h=o.rotation,c=i.getDataset(),f=n&&s.animateRotate||t.hidden?0:i.calculateCircumference(c.data[e])*(o.circumference/(2*Math.PI)),g=t._options||{};ut.extend(t,{_datasetIndex:i.index,_index:e,_model:{backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,borderAlign:g.borderAlign,x:l+a.offsetX,y:u+a.offsetY,startAngle:d,endAngle:h,circumference:f,outerRadius:n&&s.animateScale?0:i.outerRadius,innerRadius:n&&s.animateScale?0:i.innerRadius,label:ut.valueAtIndexOrDefault(c.label,e,a.data.labels[e])}});var m=t._model;n&&s.animateRotate||(m.startAngle=0===e?o.rotation:i.getMeta().data[e-1]._model.endAngle,m.endAngle=m.startAngle+m.circumference),t.pivot()},calculateTotal:function(){var t,e=this.getDataset(),n=this.getMeta(),i=0;return ut.each(n.data,(function(n,a){t=e.data[a],isNaN(t)||n.hidden||(i+=Math.abs(t))})),i},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?2*Math.PI*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,n,i,a,r,o,s,l,u=0,d=this.chart;if(!t)for(e=0,n=d.data.datasets.length;e<n;++e)if(d.isDatasetVisible(e)){t=(i=d.getDatasetMeta(e)).data,e!==this.index&&(r=i.controller);break}if(!t)return 0;for(e=0,n=t.length;e<n;++e)a=t[e],"inner"!==(o=r?r._resolveElementOptions(a,e):a._options).borderAlign&&(u=(l=o.hoverBorderWidth)>(u=(s=o.borderWidth)>u?s:u)?l:u);return u},setHoverStyle:function(t){var e=t._model,n=t._options,i=ut.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=Gt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Gt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Gt(n.hoverBorderWidth,n.borderWidth)},_resolveElementOptions:function(t,e){var n,i,a,r=this,o=r.chart,s=r.getDataset(),l=t.custom||{},u=o.options.elements.arc,d={},h={chart:o,dataIndex:e,dataset:s,datasetIndex:r.index},c=["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"];for(n=0,i=c.length;n<i;++n)d[a=c[n]]=Ut([l[a],s[a],u[a]],h,e);return d},_getRingWeightOffset:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e},_getRingWeight:function(t){return Math.max(Gt(this.chart.data.datasets[t].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});ot._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}});var Zt=Ht.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),$t=ut.valueOrDefault,Xt=ut.options.resolve,Jt=ut.canvas._isPointInArea;function Kt(t,e){return $t(t.showLine,e.showLines)}ot._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var Qt=_t.extend({datasetElementType:Wt.Line,dataElementType:Wt.Point,update:function(t){var e,n,i=this,a=i.getMeta(),r=a.dataset,o=a.data||[],s=i.getScaleForId(a.yAxisID),l=i.getDataset(),u=Kt(l,i.chart.options);for(u&&(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),r._scale=s,r._datasetIndex=i.index,r._children=o,r._model=i._resolveLineOptions(r),r.pivot()),e=0,n=o.length;e<n;++e)i.updateElement(o[e],e,t);for(u&&0!==r._model.tension&&i.updateBezierControlPoints(),e=0,n=o.length;e<n;++e)o[e].pivot()},updateElement:function(t,e,n){var i,a,r=this,o=r.getMeta(),s=t.custom||{},l=r.getDataset(),u=r.index,d=l.data[e],h=r.getScaleForId(o.yAxisID),c=r.getScaleForId(o.xAxisID),f=o.dataset._model,g=r._resolvePointOptions(t,e);i=c.getPixelForValue("object"==typeof d?d:NaN,e,u),a=n?h.getBasePixel():r.calculatePointY(d,e,u),t._xScale=c,t._yScale=h,t._options=g,t._datasetIndex=u,t._index=e,t._model={x:i,y:a,skip:s.skip||isNaN(i)||isNaN(a),radius:g.radius,pointStyle:g.pointStyle,rotation:g.rotation,backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,tension:$t(s.tension,f?f.tension:0),steppedLine:!!f&&f.steppedLine,hitRadius:g.hitRadius}},_resolvePointOptions:function(t,e){var n,i,a,r=this,o=r.chart,s=o.data.datasets[r.index],l=t.custom||{},u=o.options.elements.point,d={},h={chart:o,dataIndex:e,dataset:s,datasetIndex:r.index},c={backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},f=Object.keys(c);for(n=0,i=f.length;n<i;++n)d[a=f[n]]=Xt([l[a],s[c[a]],s[a],u[a]],h,e);return d},_resolveLineOptions:function(t){var e,n,i,a=this.chart,r=a.data.datasets[this.index],o=t.custom||{},s=a.options,l=s.elements.line,u={},d=["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill","cubicInterpolationMode"];for(e=0,n=d.length;e<n;++e)u[i=d[e]]=Xt([o[i],r[i],l[i]]);return u.spanGaps=$t(r.spanGaps,s.spanGaps),u.tension=$t(r.lineTension,l.tension),u.steppedLine=Xt([o.steppedLine,r.steppedLine,l.stepped]),u},calculatePointY:function(t,e,n){var i,a,r,o=this,s=o.chart,l=o.getMeta(),u=o.getScaleForId(l.yAxisID),d=0,h=0;if(u.options.stacked){for(i=0;i<n;i++)if(a=s.data.datasets[i],"line"===(r=s.getDatasetMeta(i)).type&&r.yAxisID===u.id&&s.isDatasetVisible(i)){var c=Number(u.getRightValue(a.data[e]));c<0?h+=c||0:d+=c||0}var f=Number(u.getRightValue(t));return u.getPixelForValue(f<0?h+f:d+f)}return u.getPixelForValue(t)},updateBezierControlPoints:function(){var t,e,n,i,a=this.chart,r=this.getMeta(),o=r.dataset._model,s=a.chartArea,l=r.data||[];function u(t,e,n){return Math.max(Math.min(t,n),e)}if(o.spanGaps&&(l=l.filter((function(t){return!t._model.skip}))),"monotone"===o.cubicInterpolationMode)ut.splineCurveMonotone(l);else for(t=0,e=l.length;t<e;++t)n=l[t]._model,i=ut.splineCurve(ut.previousItem(l,t)._model,n,ut.nextItem(l,t)._model,o.tension),n.controlPointPreviousX=i.previous.x,n.controlPointPreviousY=i.previous.y,n.controlPointNextX=i.next.x,n.controlPointNextY=i.next.y;if(a.options.elements.line.capBezierPoints)for(t=0,e=l.length;t<e;++t)Jt(n=l[t]._model,s)&&(t>0&&Jt(l[t-1]._model,s)&&(n.controlPointPreviousX=u(n.controlPointPreviousX,s.left,s.right),n.controlPointPreviousY=u(n.controlPointPreviousY,s.top,s.bottom)),t<l.length-1&&Jt(l[t+1]._model,s)&&(n.controlPointNextX=u(n.controlPointNextX,s.left,s.right),n.controlPointNextY=u(n.controlPointNextY,s.top,s.bottom)))},draw:function(){var t,e=this,n=e.chart,i=e.getMeta(),a=i.data||[],r=n.chartArea,o=a.length,s=0;for(Kt(e.getDataset(),n.options)&&(ut.canvas.clipArea(n.ctx,{left:r.left,right:r.right,top:r.top-(t=(i.dataset._model.borderWidth||0)/2),bottom:r.bottom+t}),i.dataset.draw(),ut.canvas.unclipArea(n.ctx));s<o;++s)a[s].draw(r)},setHoverStyle:function(t){var e=t._model,n=t._options,i=ut.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=$t(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=$t(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=$t(n.hoverBorderWidth,n.borderWidth),e.radius=$t(n.hoverRadius,n.radius)}}),te=ut.options.resolve;ot._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');var n=t.data,i=n.datasets,a=n.labels;if(i.length)for(var r=0;r<i[0].data.length;++r)e.push('<li><span style="background-color:'+i[0].backgroundColor[r]+'"></span>'),a[r]&&e.push(a[r]),e.push("</li>");return e.push("</ul>"),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,i){var a=t.getDatasetMeta(0),r=e.datasets[0],o=a.data[i].custom||{},s=t.options.elements.arc;return{text:n,fillStyle:te([o.backgroundColor,r.backgroundColor,s.backgroundColor],void 0,i),strokeStyle:te([o.borderColor,r.borderColor,s.borderColor],void 0,i),lineWidth:te([o.borderWidth,r.borderWidth,s.borderWidth],void 0,i),hidden:isNaN(r.data[i])||a.data[i].hidden,index:i}})):[]}},onClick:function(t,e){var n,i,a,r=e.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n<i;++n)(a=o.getDatasetMeta(n)).data[r].hidden=!a.data[r].hidden;o.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}});var ee=_t.extend({dataElementType:Wt.Arc,linkScales:ut.noop,update:function(t){var e,n,i,a=this,r=a.getDataset(),o=a.getMeta(),s=a.chart.options.startAngle||0,l=a._starts=[],u=a._angles=[],d=o.data;for(a._updateRadius(),o.count=a.countVisibleElements(),e=0,n=r.data.length;e<n;e++)l[e]=s,i=a._computeAngle(e),u[e]=i,s+=i;for(e=0,n=d.length;e<n;++e)d[e]._options=a._resolveElementOptions(d[e],e),a.updateElement(d[e],e,t)},_updateRadius:function(){var t=this,e=t.chart,n=e.chartArea,i=e.options,a=Math.min(n.right-n.left,n.bottom-n.top);e.outerRadius=Math.max(a/2,0),e.innerRadius=Math.max(i.cutoutPercentage?e.outerRadius/100*i.cutoutPercentage:1,0),e.radiusLength=(e.outerRadius-e.innerRadius)/e.getVisibleDatasetCount(),t.outerRadius=e.outerRadius-e.radiusLength*t.index,t.innerRadius=t.outerRadius-e.radiusLength},updateElement:function(t,e,n){var i=this,a=i.chart,r=i.getDataset(),o=a.options,s=o.animation,l=a.scale,u=a.data.labels,d=l.xCenter,h=l.yCenter,c=o.startAngle,f=t.hidden?0:l.getDistanceFromCenterForValue(r.data[e]),g=i._starts[e],m=g+(t.hidden?0:i._angles[e]),p=s.animateScale?0:l.getDistanceFromCenterForValue(r.data[e]),v=t._options||{};ut.extend(t,{_datasetIndex:i.index,_index:e,_scale:l,_model:{backgroundColor:v.backgroundColor,borderColor:v.borderColor,borderWidth:v.borderWidth,borderAlign:v.borderAlign,x:d,y:h,innerRadius:0,outerRadius:n?p:f,startAngle:n&&s.animateRotate?c:g,endAngle:n&&s.animateRotate?c:m,label:ut.valueAtIndexOrDefault(u,e,u[e])}}),t.pivot()},countVisibleElements:function(){var t=this.getDataset(),e=this.getMeta(),n=0;return ut.each(e.data,(function(e,i){isNaN(t.data[i])||e.hidden||n++})),n},setHoverStyle:function(t){var e=t._model,n=t._options,i=ut.getHoverColor,a=ut.valueOrDefault;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=a(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=a(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=a(n.hoverBorderWidth,n.borderWidth)},_resolveElementOptions:function(t,e){var n,i,a,r=this,o=r.chart,s=r.getDataset(),l=t.custom||{},u=o.options.elements.arc,d={},h={chart:o,dataIndex:e,dataset:s,datasetIndex:r.index},c=["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"];for(n=0,i=c.length;n<i;++n)d[a=c[n]]=te([l[a],s[a],u[a]],h,e);return d},_computeAngle:function(t){var e=this,n=this.getMeta().count,i=e.getDataset(),a=e.getMeta();return isNaN(i.data[t])||a.data[t].hidden?0:te([e.chart.options.elements.arc.angle,2*Math.PI/n],{chart:e.chart,dataIndex:t,dataset:i,datasetIndex:e.index},t)}});ot._set("pie",ut.clone(ot.doughnut)),ot._set("pie",{cutoutPercentage:0});var ne=qt,ie=ut.valueOrDefault,ae=ut.options.resolve;ot._set("radar",{scale:{type:"radialLinear"},elements:{line:{tension:0}}});var re=_t.extend({datasetElementType:Wt.Line,dataElementType:Wt.Point,linkScales:ut.noop,update:function(t){var e,n,i=this,a=i.getMeta(),r=a.dataset,o=a.data||[],s=i.chart.scale,l=i.getDataset();for(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),r._scale=s,r._datasetIndex=i.index,r._children=o,r._loop=!0,r._model=i._resolveLineOptions(r),r.pivot(),e=0,n=o.length;e<n;++e)i.updateElement(o[e],e,t);for(i.updateBezierControlPoints(),e=0,n=o.length;e<n;++e)o[e].pivot()},updateElement:function(t,e,n){var i=this,a=t.custom||{},r=i.getDataset(),o=i.chart.scale,s=o.getPointPositionForValue(e,r.data[e]),l=i._resolvePointOptions(t,e),u=i.getMeta().dataset._model,d=n?o.xCenter:s.x,h=n?o.yCenter:s.y;t._scale=o,t._options=l,t._datasetIndex=i.index,t._index=e,t._model={x:d,y:h,skip:a.skip||isNaN(d)||isNaN(h),radius:l.radius,pointStyle:l.pointStyle,rotation:l.rotation,backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,tension:ie(a.tension,u?u.tension:0),hitRadius:l.hitRadius}},_resolvePointOptions:function(t,e){var n,i,a,r=this,o=r.chart,s=o.data.datasets[r.index],l=t.custom||{},u=o.options.elements.point,d={},h={chart:o,dataIndex:e,dataset:s,datasetIndex:r.index},c={backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},f=Object.keys(c);for(n=0,i=f.length;n<i;++n)d[a=f[n]]=ae([l[a],s[c[a]],s[a],u[a]],h,e);return d},_resolveLineOptions:function(t){var e,n,i,a=this.chart,r=a.data.datasets[this.index],o=t.custom||{},s=a.options.elements.line,l={},u=["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"];for(e=0,n=u.length;e<n;++e)l[i=u[e]]=ae([o[i],r[i],s[i]]);return l.tension=ie(r.lineTension,s.tension),l},updateBezierControlPoints:function(){var t,e,n,i,a=this.getMeta(),r=this.chart.chartArea,o=a.data||[];function s(t,e,n){return Math.max(Math.min(t,n),e)}for(t=0,e=o.length;t<e;++t)n=o[t]._model,i=ut.splineCurve(ut.previousItem(o,t,!0)._model,n,ut.nextItem(o,t,!0)._model,n.tension),n.controlPointPreviousX=s(i.previous.x,r.left,r.right),n.controlPointPreviousY=s(i.previous.y,r.top,r.bottom),n.controlPointNextX=s(i.next.x,r.left,r.right),n.controlPointNextY=s(i.next.y,r.top,r.bottom)},setHoverStyle:function(t){var e=t._model,n=t._options,i=ut.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=ie(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=ie(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=ie(n.hoverBorderWidth,n.borderWidth),e.radius=ie(n.hoverRadius,n.radius)}});ot._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},showLines:!1,tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}});var oe={bar:Ht,bubble:jt,doughnut:qt,horizontalBar:Zt,line:Qt,polarArea:ee,pie:ne,radar:re,scatter:Qt};function se(t,e){return t.native?{x:t.x,y:t.y}:ut.getRelativePosition(t,e)}function le(t,e){var n,i,a,r,o;for(i=0,r=t.data.datasets.length;i<r;++i)if(t.isDatasetVisible(i))for(a=0,o=(n=t.getDatasetMeta(i)).data.length;a<o;++a){var s=n.data[a];s._view.skip||e(s)}}function ue(t,e){var n=[];return le(t,(function(t){t.inRange(e.x,e.y)&&n.push(t)})),n}function de(t,e,n,i){var a=Number.POSITIVE_INFINITY,r=[];return le(t,(function(t){if(!n||t.inRange(e.x,e.y)){var o=t.getCenterPoint(),s=i(e,o);s<a?(r=[t],a=s):s===a&&r.push(t)}})),r}function he(t){var e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,i){var a=e?Math.abs(t.x-i.x):0,r=n?Math.abs(t.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(r,2))}}function ce(t,e,n){var i=se(e,t);n.axis=n.axis||"x";var a=he(n.axis),r=n.intersect?ue(t,i):de(t,i,!1,a),o=[];return r.length?(t.data.datasets.forEach((function(e,n){if(t.isDatasetVisible(n)){var i=t.getDatasetMeta(n).data[r[0]._index];i&&!i._view.skip&&o.push(i)}})),o):[]}var fe={modes:{single:function(t,e){var n=se(e,t),i=[];return le(t,(function(t){if(t.inRange(n.x,n.y))return i.push(t),i})),i.slice(0,1)},label:ce,index:ce,dataset:function(t,e,n){var i=se(e,t);n.axis=n.axis||"xy";var a=he(n.axis),r=n.intersect?ue(t,i):de(t,i,!1,a);return r.length>0&&(r=t.getDatasetMeta(r[0]._datasetIndex).data),r},"x-axis":function(t,e){return ce(t,e,{intersect:!1})},point:function(t,e){return ue(t,se(e,t))},nearest:function(t,e,n){var i=se(e,t);n.axis=n.axis||"xy";var a=he(n.axis);return de(t,i,n.intersect,a)},x:function(t,e,n){var i=se(e,t),a=[],r=!1;return le(t,(function(t){t.inXRange(i.x)&&a.push(t),t.inRange(i.x,i.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a},y:function(t,e,n){var i=se(e,t),a=[],r=!1;return le(t,(function(t){t.inYRange(i.y)&&a.push(t),t.inRange(i.x,i.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a}}};function ge(t,e){return ut.where(t,(function(t){return t.position===e}))}function me(t,e){t.forEach((function(t,e){return t._tmpIndex_=e,t})),t.sort((function(t,n){var i=e?n:t,a=e?t:n;return i.weight===a.weight?i._tmpIndex_-a._tmpIndex_:i.weight-a.weight})),t.forEach((function(t){delete t._tmpIndex_}))}function pe(t,e){ut.each(t,(function(t){e[t.position]+=t.isHorizontal()?t.height:t.width}))}ot._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var ve={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,t.boxes.push(e)},removeBox:function(t,e){var n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure:function(t,e,n){for(var i,a=["fullWidth","position","weight"],r=a.length,o=0;o<r;++o)n.hasOwnProperty(i=a[o])&&(e[i]=n[i])},update:function(t,e,n){if(t){var i=ut.options.toPadding((t.options.layout||{}).padding),a=i.left,r=i.right,o=i.top,s=i.bottom,l=ge(t.boxes,"left"),u=ge(t.boxes,"right"),d=ge(t.boxes,"top"),h=ge(t.boxes,"bottom"),c=ge(t.boxes,"chartArea");me(l,!0),me(u,!1),me(d,!0),me(h,!1);var f,g=l.concat(u),m=d.concat(h),p=g.concat(m),v=e-a-r,y=n-o-s,b=(e-v/2)/g.length,x=v,_=y,k={top:o,left:a,bottom:s,right:r},w=[];ut.each(p,(function(t){var e,n=t.isHorizontal();n?(e=t.update(t.fullWidth?v:x,y/2),_-=e.height):(e=t.update(b,_),x-=e.width),w.push({horizontal:n,width:e.width,box:t})})),f=function(t){var e=0,n=0,i=0,a=0;return ut.each(t,(function(t){if(t.getPadding){var r=t.getPadding();e=Math.max(e,r.top),n=Math.max(n,r.left),i=Math.max(i,r.bottom),a=Math.max(a,r.right)}})),{top:e,left:n,bottom:i,right:a}}(p),ut.each(g,O),pe(g,k),ut.each(m,O),pe(m,k),ut.each(g,(function(t){var e=ut.findNextWhere(w,(function(e){return e.box===t}));e&&t.update(e.width,_,{left:0,right:0,top:k.top,bottom:k.bottom})})),pe(p,k={top:o,left:a,bottom:s,right:r});var M=Math.max(f.left-k.left,0);k.left+=M,k.right+=Math.max(f.right-k.right,0);var S=Math.max(f.top-k.top,0);k.top+=S,k.bottom+=Math.max(f.bottom-k.bottom,0);var D=n-k.top-k.bottom,C=e-k.left-k.right;C===x&&D===_||(ut.each(g,(function(t){t.height=D})),ut.each(m,(function(t){t.fullWidth||(t.width=C)})),_=D,x=C);var P=a+M,T=o+S;ut.each(l.concat(d),I),P+=x,T+=_,ut.each(u,I),ut.each(h,I),t.chartArea={left:k.left,top:k.top,right:k.left+x,bottom:k.top+_},ut.each(c,(function(e){e.left=t.chartArea.left,e.top=t.chartArea.top,e.right=t.chartArea.right,e.bottom=t.chartArea.bottom,e.update(x,_)}))}function O(t){var e=ut.findNextWhere(w,(function(e){return e.box===t}));if(e)if(e.horizontal){var n={left:Math.max(k.left,f.left),right:Math.max(k.right,f.right),top:0,bottom:0};t.update(t.fullWidth?v:x,y/2,n)}else t.update(e.width,_)}function I(t){t.isHorizontal()?(t.left=t.fullWidth?a:k.left,t.right=t.fullWidth?e-r:k.left+x,t.top=T,t.bottom=T+t.height,T=t.bottom):(t.left=P,t.right=P+t.width,t.top=k.top,t.bottom=k.top+_,P=t.right)}}};"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var ye,be=(ye=Object.freeze({default:"/*\n * DOM element rendering detection\n * https://davidwalsh.name/detect-node-insertion\n */\n@keyframes chartjs-render-animation {\n\tfrom { opacity: 0.99; }\n\tto { opacity: 1; }\n}\n\n.chartjs-render-monitor {\n\tanimation: chartjs-render-animation 0.001s;\n}\n\n/*\n * DOM element resizing detection\n * https://github.com/marcj/css-element-queries\n */\n.chartjs-size-monitor,\n.chartjs-size-monitor-expand,\n.chartjs-size-monitor-shrink {\n\tposition: absolute;\n\tdirection: ltr;\n\tleft: 0;\n\ttop: 0;\n\tright: 0;\n\tbottom: 0;\n\toverflow: hidden;\n\tpointer-events: none;\n\tvisibility: hidden;\n\tz-index: -1;\n}\n\n.chartjs-size-monitor-expand > div {\n\tposition: absolute;\n\twidth: 1000000px;\n\theight: 1000000px;\n\tleft: 0;\n\ttop: 0;\n}\n\n.chartjs-size-monitor-shrink > div {\n\tposition: absolute;\n\twidth: 200%;\n\theight: 200%;\n\tleft: 0;\n\ttop: 0;\n}\n"}))&&ye.default||ye,xe="chartjs-size-monitor",_e="chartjs-render-monitor",ke=["animationstart","webkitAnimationStart"],we={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function Me(t,e){var n=ut.getStyle(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?Number(i[1]):void 0}var Se=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(n){}return t}()&&{passive:!0};function De(t,e,n){t.addEventListener(e,n,Se)}function Ce(t,e,n){t.removeEventListener(e,n,Se)}function Pe(t,e,n,i,a){return{type:t,chart:e,native:a||null,x:void 0!==n?n:null,y:void 0!==i?i:null}}function Te(t){var e=document.createElement("div");return e.className=t||"",e}var Oe={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(){this._loaded||(this._loaded=!0,this.disableCSSInjection||function(t,e){var n=t._style||document.createElement("style");t._style||(t._style=n,e="/* Chart.js */\n"+e,n.setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(n)),n.appendChild(document.createTextNode(e))}(this,be))},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var n=t&&t.getContext&&t.getContext("2d");return this._ensureLoaded(),n&&n.canvas===t?(function(t,e){var n=t.style,i=t.getAttribute("height"),a=t.getAttribute("width");if(t.$chartjs={initial:{height:i,width:a,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===a||""===a){var r=Me(t,"width");void 0!==r&&(t.width=r)}if(null===i||""===i)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var o=Me(t,"height");void 0!==r&&(t.height=o)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e.$chartjs){var n=e.$chartjs.initial;["height","width"].forEach((function(t){var i=n[t];ut.isNullOrUndef(i)?e.removeAttribute(t):e.setAttribute(t,i)})),ut.each(n.style||{},(function(t,n){e.style[n]=t})),e.width=e.width,delete e.$chartjs}},addEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var a=n.$chartjs||(n.$chartjs={});De(i,e,(a.proxies||(a.proxies={}))[t.id+"_"+e]=function(e){n(function(t,e){var n=we[t.type]||t.type,i=ut.getRelativePosition(t,e);return Pe(n,e,i.x,i.y,t)}(e,t))})}else!function(t,e,n){var i,a,r,o,s=t.$chartjs||(t.$chartjs={}),l=s.resizer=function(t){var e=1e6,n=Te(xe),i=Te(xe+"-expand"),a=Te(xe+"-shrink");i.appendChild(Te()),a.appendChild(Te()),n.appendChild(i),n.appendChild(a),n._reset=function(){i.scrollLeft=e,i.scrollTop=e,a.scrollLeft=e,a.scrollTop=e};var r=function(){n._reset(),t()};return De(i,"scroll",r.bind(i,"expand")),De(a,"scroll",r.bind(a,"shrink")),n}((i=function(){if(s.resizer){var i=n.options.maintainAspectRatio&&t.parentNode,a=i?i.clientWidth:0;e(Pe("resize",n)),i&&i.clientWidth<a&&n.canvas&&e(Pe("resize",n))}},r=!1,o=[],function(){o=Array.prototype.slice.call(arguments),a=a||this,r||(r=!0,ut.requestAnimFrame.call(window,(function(){r=!1,i.apply(a,o)})))}));!function(t,e){var n=t.$chartjs||(t.$chartjs={}),i=n.renderProxy=function(t){"chartjs-render-animation"===t.animationName&&e()};ut.each(ke,(function(e){De(t,e,i)})),n.reflow=!!t.offsetParent,t.classList.add(_e)}(t,(function(){if(s.resizer){var e=t.parentNode;e&&e!==l.parentNode&&e.insertBefore(l,e.firstChild),l._reset()}}))}(i,n,t)},removeEventListener:function(t,e,n){var i,a,r,o=t.canvas;if("resize"!==e){var s=((n.$chartjs||{}).proxies||{})[t.id+"_"+e];s&&Ce(o,e,s)}else r=(a=(i=o).$chartjs||{}).resizer,delete a.resizer,function(t){var e=t.$chartjs||{},n=e.renderProxy;n&&(ut.each(ke,(function(e){Ce(t,e,n)})),delete e.renderProxy),t.classList.remove(_e)}(i),r&&r.parentNode&&r.parentNode.removeChild(r)}};ut.addEvent=De,ut.removeEvent=Ce;var Ie=ut.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},Oe._enabled?Oe:{acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}});ot._set("global",{plugins:{}});var Ae={_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach((function(t){-1===e.indexOf(t)&&e.push(t)})),this._cacheId++},unregister:function(t){var e=this._plugins;[].concat(t).forEach((function(t){var n=e.indexOf(t);-1!==n&&e.splice(n,1)})),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,n){var i,a,r,o,s,l=this.descriptors(t),u=l.length;for(i=0;i<u;++i)if("function"==typeof(s=(r=(a=l[i]).plugin)[e])&&((o=[t].concat(n||[])).push(a.options),!1===s.apply(r,o)))return!1;return!0},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId)return e.descriptors;var n=[],i=[],a=t&&t.config||{},r=a.options&&a.options.plugins||{};return this._plugins.concat(a.plugins||[]).forEach((function(t){if(-1===n.indexOf(t)){var e=t.id,a=r[e];!1!==a&&(!0===a&&(a=ut.clone(ot.global.plugins[e])),n.push(t),i.push({plugin:t,options:a||{}}))}})),e.descriptors=i,e.id=this._cacheId,i},_invalidate:function(t){delete t.$plugins}},Fe={constructors:{},defaults:{},registerScaleType:function(t,e,n){this.constructors[t]=e,this.defaults[t]=ut.clone(n)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?ut.merge({},[ot.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){var n=this;n.defaults.hasOwnProperty(t)&&(n.defaults[t]=ut.extend(n.defaults[t],e))},addScalesToLayout:function(t){ut.each(t.scales,(function(e){e.fullWidth=e.options.fullWidth,e.position=e.options.position,e.weight=e.options.weight,ve.addBox(t,e)}))}},Re=ut.valueOrDefault;ot._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:ut.noop,title:function(t,e){var n="",i=e.labels,a=i?i.length:0;if(t.length>0){var r=t[0];r.label?n=r.label:r.xLabel?n=r.xLabel:a>0&&r.index<a&&(n=i[r.index])}return n},afterTitle:ut.noop,beforeBody:ut.noop,beforeLabel:ut.noop,label:function(t,e){var n=e.datasets[t.datasetIndex].label||"";return n&&(n+=": "),ut.isNullOrUndef(t.value)?n+=t.yLabel:n+=t.value,n},labelColor:function(t,e){var n=e.getDatasetMeta(t.datasetIndex).data[t.index]._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:ut.noop,afterBody:ut.noop,beforeFooter:ut.noop,footer:ut.noop,afterFooter:ut.noop}}});var Le={average:function(t){if(!t.length)return!1;var e,n,i=0,a=0,r=0;for(e=0,n=t.length;e<n;++e){var o=t[e];if(o&&o.hasValue()){var s=o.tooltipPosition();i+=s.x,a+=s.y,++r}}return{x:i/r,y:a/r}},nearest:function(t,e){var n,i,a,r=e.x,o=e.y,s=Number.POSITIVE_INFINITY;for(n=0,i=t.length;n<i;++n){var l=t[n];if(l&&l.hasValue()){var u=l.getCenterPoint(),d=ut.distanceBetweenPoints(e,u);d<s&&(s=d,a=l)}}if(a){var h=a.tooltipPosition();r=h.x,o=h.y}return{x:r,y:o}}};function We(t,e){return e&&(ut.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Ye(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function Ne(t){var e=ot.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,bodyFontColor:t.bodyFontColor,_bodyFontFamily:Re(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:Re(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:Re(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:Re(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:Re(t.titleFontStyle,e.defaultFontStyle),titleFontSize:Re(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:Re(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:Re(t.footerFontStyle,e.defaultFontStyle),footerFontSize:Re(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function ze(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function Ve(t){return We([],Ye(t))}var He=ft.extend({initialize:function(){this._model=Ne(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options,n=e.callbacks,i=n.beforeTitle.apply(t,arguments),a=n.title.apply(t,arguments),r=n.afterTitle.apply(t,arguments),o=[];return o=We(o,Ye(i)),o=We(o,Ye(a)),We(o,Ye(r))},getBeforeBody:function(){return Ve(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var n=this,i=n._options.callbacks,a=[];return ut.each(t,(function(t){var r={before:[],lines:[],after:[]};We(r.before,Ye(i.beforeLabel.call(n,t,e))),We(r.lines,i.label.call(n,t,e)),We(r.after,Ye(i.afterLabel.call(n,t,e))),a.push(r)})),a},getAfterBody:function(){return Ve(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this,e=t._options.callbacks,n=e.beforeFooter.apply(t,arguments),i=e.footer.apply(t,arguments),a=e.afterFooter.apply(t,arguments),r=[];return r=We(r,Ye(n)),r=We(r,Ye(i)),We(r,Ye(a))},update:function(t){var e,n,i,a,r,o,s,l,u,d,h=this,c=h._options,f=h._model,g=h._model=Ne(c),m=h._active,p=h._data,v={xAlign:f.xAlign,yAlign:f.yAlign},y={x:f.x,y:f.y},b={width:f.width,height:f.height},x={x:f.caretX,y:f.caretY};if(m.length){g.opacity=1;var _=[],k=[];x=Le[c.position].call(h,m,h._eventPosition);var w=[];for(e=0,n=m.length;e<n;++e)w.push((a=void 0,r=void 0,l=void 0,u=void 0,d=void 0,a=(i=m[e])._xScale,r=i._yScale||i._scale,o=i._index,u=(l=i._chart.getDatasetMeta(s=i._datasetIndex).controller)._getIndexScale(),d=l._getValueScale(),{xLabel:a?a.getLabelForIndex(o,s):"",yLabel:r?r.getLabelForIndex(o,s):"",label:u?""+u.getLabelForIndex(o,s):"",value:d?""+d.getLabelForIndex(o,s):"",index:o,datasetIndex:s,x:i._model.x,y:i._model.y}));c.filter&&(w=w.filter((function(t){return c.filter(t,p)}))),c.itemSort&&(w=w.sort((function(t,e){return c.itemSort(t,e,p)}))),ut.each(w,(function(t){_.push(c.callbacks.labelColor.call(h,t,h._chart)),k.push(c.callbacks.labelTextColor.call(h,t,h._chart))})),g.title=h.getTitle(w,p),g.beforeBody=h.getBeforeBody(w,p),g.body=h.getBody(w,p),g.afterBody=h.getAfterBody(w,p),g.footer=h.getFooter(w,p),g.x=x.x,g.y=x.y,g.caretPadding=c.caretPadding,g.labelColors=_,g.labelTextColors=k,g.dataPoints=w,b=function(t,e){var n=t._chart.ctx,i=2*e.yPadding,a=0,r=e.body,o=r.reduce((function(t,e){return t+e.before.length+e.lines.length+e.after.length}),0),s=e.title.length,l=e.footer.length,u=e.titleFontSize,d=e.bodyFontSize,h=e.footerFontSize;i+=s*u,i+=s?(s-1)*e.titleSpacing:0,i+=s?e.titleMarginBottom:0,i+=(o+=e.beforeBody.length+e.afterBody.length)*d,i+=o?(o-1)*e.bodySpacing:0,i+=l?e.footerMarginTop:0,i+=l*h,i+=l?(l-1)*e.footerSpacing:0;var c=0,f=function(t){a=Math.max(a,n.measureText(t).width+c)};return n.font=ut.fontString(u,e._titleFontStyle,e._titleFontFamily),ut.each(e.title,f),n.font=ut.fontString(d,e._bodyFontStyle,e._bodyFontFamily),ut.each(e.beforeBody.concat(e.afterBody),f),c=e.displayColors?d+2:0,ut.each(r,(function(t){ut.each(t.before,f),ut.each(t.lines,f),ut.each(t.after,f)})),c=0,n.font=ut.fontString(h,e._footerFontStyle,e._footerFontFamily),ut.each(e.footer,f),{width:a+=2*e.xPadding,height:i}}(this,g),y=function(t,e,n,i){var a=t.x,r=t.y,o=t.caretPadding,s=n.xAlign,l=n.yAlign,u=t.caretSize+o,d=t.cornerRadius+o;return"right"===s?a-=e.width:"center"===s&&((a-=e.width/2)+e.width>i.width&&(a=i.width-e.width),a<0&&(a=0)),"top"===l?r+=u:r-="bottom"===l?e.height+u:e.height/2,"center"===l?"left"===s?a+=u:"right"===s&&(a-=u):"left"===s?a-=d:"right"===s&&(a+=d),{x:a,y:r}}(g,b,v=function(t,e){var n,i,a,r,o,s=t._model,l=t._chart,u=t._chart.chartArea,d="center",h="center";s.y<e.height?h="top":s.y>l.height-e.height&&(h="bottom");var c=(u.left+u.right)/2,f=(u.top+u.bottom)/2;"center"===h?(n=function(t){return t<=c},i=function(t){return t>c}):(n=function(t){return t<=e.width/2},i=function(t){return t>=l.width-e.width/2}),a=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},r=function(t){return t-e.width-s.caretSize-s.caretPadding<0},o=function(t){return t<=f?"top":"bottom"},n(s.x)?(d="left",a(s.x)&&(d="center",h=o(s.y))):i(s.x)&&(d="right",r(s.x)&&(d="center",h=o(s.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:d,yAlign:g.yAlign?g.yAlign:h}}(this,b),h._chart)}else g.opacity=0;return g.xAlign=v.xAlign,g.yAlign=v.yAlign,g.x=y.x,g.y=y.y,g.width=b.width,g.height=b.height,g.caretX=x.x,g.caretY=x.y,h._model=g,t&&c.custom&&c.custom.call(h,g),h},drawCaret:function(t,e){var n=this._chart.ctx,i=this.getCaretPosition(t,e,this._view);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)},getCaretPosition:function(t,e,n){var i,a,r,o,s,l,u=n.caretSize,d=n.cornerRadius,h=n.xAlign,c=n.yAlign,f=t.x,g=t.y,m=e.width,p=e.height;if("center"===c)s=g+p/2,"left"===h?(a=(i=f)-u,r=i,o=s+u,l=s-u):(a=(i=f+m)+u,r=i,o=s-u,l=s+u);else if("left"===h?(i=(a=f+d+u)-u,r=a+u):"right"===h?(i=(a=f+m-d-u)-u,r=a+u):(i=(a=n.caretX)-u,r=a+u),"top"===c)s=(o=g)-u,l=o;else{s=(o=g+p)+u,l=o;var v=r;r=i,i=v}return{x1:i,x2:a,x3:r,y1:o,y2:s,y3:l}},drawTitle:function(t,e,n){var i=e.title;if(i.length){t.x=ze(e,e._titleAlign),n.textAlign=e._titleAlign,n.textBaseline="top";var a,r,o=e.titleFontSize,s=e.titleSpacing;for(n.fillStyle=e.titleFontColor,n.font=ut.fontString(o,e._titleFontStyle,e._titleFontFamily),a=0,r=i.length;a<r;++a)n.fillText(i[a],t.x,t.y),t.y+=o+s,a+1===i.length&&(t.y+=e.titleMarginBottom-s)}},drawBody:function(t,e,n){var i,a=e.bodyFontSize,r=e.bodySpacing,o=e._bodyAlign,s=e.body,l=e.displayColors,u=e.labelColors,d=0,h=l?ze(e,"left"):0;n.textAlign=o,n.textBaseline="top",n.font=ut.fontString(a,e._bodyFontStyle,e._bodyFontFamily),t.x=ze(e,o);var c=function(e){n.fillText(e,t.x+d,t.y),t.y+=a+r};n.fillStyle=e.bodyFontColor,ut.each(e.beforeBody,c),d=l&&"right"!==o?"center"===o?a/2+1:a+2:0,ut.each(s,(function(r,o){n.fillStyle=i=e.labelTextColors[o],ut.each(r.before,c),ut.each(r.lines,(function(r){l&&(n.fillStyle=e.legendColorBackground,n.fillRect(h,t.y,a,a),n.lineWidth=1,n.strokeStyle=u[o].borderColor,n.strokeRect(h,t.y,a,a),n.fillStyle=u[o].backgroundColor,n.fillRect(h+1,t.y+1,a-2,a-2),n.fillStyle=i),c(r)})),ut.each(r.after,c)})),d=0,ut.each(e.afterBody,c),t.y-=r},drawFooter:function(t,e,n){var i=e.footer;i.length&&(t.x=ze(e,e._footerAlign),t.y+=e.footerMarginTop,n.textAlign=e._footerAlign,n.textBaseline="top",n.fillStyle=e.footerFontColor,n.font=ut.fontString(e.footerFontSize,e._footerFontStyle,e._footerFontFamily),ut.each(i,(function(i){n.fillText(i,t.x,t.y),t.y+=e.footerFontSize+e.footerSpacing})))},drawBackground:function(t,e,n,i){n.fillStyle=e.backgroundColor,n.strokeStyle=e.borderColor,n.lineWidth=e.borderWidth;var a=e.xAlign,r=e.yAlign,o=t.x,s=t.y,l=i.width,u=i.height,d=e.cornerRadius;n.beginPath(),n.moveTo(o+d,s),"top"===r&&this.drawCaret(t,i),n.lineTo(o+l-d,s),n.quadraticCurveTo(o+l,s,o+l,s+d),"center"===r&&"right"===a&&this.drawCaret(t,i),n.lineTo(o+l,s+u-d),n.quadraticCurveTo(o+l,s+u,o+l-d,s+u),"bottom"===r&&this.drawCaret(t,i),n.lineTo(o+d,s+u),n.quadraticCurveTo(o,s+u,o,s+u-d),"center"===r&&"left"===a&&this.drawCaret(t,i),n.lineTo(o,s+d),n.quadraticCurveTo(o,s,o+d,s),n.closePath(),n.fill(),e.borderWidth>0&&n.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},i={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity;this._options.enabled&&(e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length)&&(t.save(),t.globalAlpha=a,this.drawBackground(i,e,t,n),i.y+=e.yPadding,this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),t.restore())}},handleEvent:function(t){var e,n=this,i=n._options;return n._lastActive=n._lastActive||[],n._active="mouseout"===t.type?[]:n._chart.getElementsAtEventForMode(t,i.mode,i),(e=!ut.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(i.enabled||i.custom)&&(n._eventPosition={x:t.x,y:t.y},n.update(!0),n.pivot())),e}});He.positioners=Le;var Ee=ut.valueOrDefault;function Be(){return ut.merge({},[].slice.call(arguments),{merger:function(t,e,n,i){if("xAxes"===t||"yAxes"===t){var a,r,o,s=n[t].length;for(e[t]||(e[t]=[]),a=0;a<s;++a)r=Ee((o=n[t][a]).type,"xAxes"===t?"category":"linear"),a>=e[t].length&&e[t].push({}),ut.merge(e[t][a],!e[t][a].type||o.type&&o.type!==e[t][a].type?[Fe.getScaleDefaults(r),o]:o)}else ut._merger(t,e,n,i)}})}function je(){return ut.merge({},[].slice.call(arguments),{merger:function(t,e,n,i){var a=e[t]||{},r=n[t];"scales"===t?e[t]=Be(a,r):"scale"===t?e[t]=ut.merge(a,[Fe.getScaleDefaults(r.type),r]):ut._merger(t,e,n,i)}})}function Ue(t){var e=t.options;ut.each(t.scales,(function(e){ve.removeBox(t,e)})),e=je(ot.global,ot[t.config.type],e),t.options=t.config.options=e,t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.tooltip._options=e.tooltips,t.tooltip.initialize()}function Ge(t){return"top"===t||"bottom"===t}ot._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var qe=function(t,e){return this.construct(t,e),this};ut.extend(qe.prototype,{construct:function(t,e){var n=this;e=function(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=je(ot.global,ot[t.type],t.options||{}),t}(e);var i=Ie.acquireContext(t,e),a=i&&i.canvas,r=a&&a.height,o=a&&a.width;n.id=ut.uid(),n.ctx=i,n.canvas=a,n.config=e,n.width=o,n.height=r,n.aspectRatio=r?o/r:null,n.options=e.options,n._bufferedRender=!1,n.chart=n,n.controller=n,qe.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),i&&a?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return Ae.notify(t,"beforeInit"),ut.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.initToolTip(),Ae.notify(t,"afterInit"),t},clear:function(){return ut.canvas.clear(this),this},stop:function(){return pt.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,a=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(ut.getMaximumWidth(i))),o=Math.max(0,Math.floor(a?r/a:ut.getMaximumHeight(i)));if((e.width!==r||e.height!==o)&&(i.width=e.width=r,i.height=e.height=o,i.style.width=r+"px",i.style.height=o+"px",ut.retinaScale(e,n.devicePixelRatio),!t)){var s={width:r,height:o};Ae.notify(e,"resize",[s]),n.onResize&&n.onResize(e,s),e.stop(),e.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;ut.each(e.xAxes,(function(t,e){t.id=t.id||"x-axis-"+e})),ut.each(e.yAxes,(function(t,e){t.id=t.id||"y-axis-"+e})),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,n=t.scales||{},i=[],a=Object.keys(n).reduce((function(t,e){return t[e]=!1,t}),{});e.scales&&(i=i.concat((e.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(e.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),e.scale&&i.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),ut.each(i,(function(e){var i=e.options,r=i.id,o=Ee(i.type,e.dtype);Ge(i.position)!==Ge(e.dposition)&&(i.position=e.dposition),a[r]=!0;var s=null;if(r in n&&n[r].type===o)(s=n[r]).options=i,s.ctx=t.ctx,s.chart=t;else{var l=Fe.getScaleConstructor(o);if(!l)return;s=new l({id:r,type:o,options:i,ctx:t.ctx,chart:t}),n[s.id]=s}s.mergeTicksOptions(),e.isDefault&&(t.scale=s)})),ut.each(a,(function(t,e){t||delete n[e]})),t.scales=n,Fe.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t=this,e=[];return ut.each(t.data.datasets,(function(n,i){var a=t.getDatasetMeta(i),r=n.type||t.config.type;if(a.type&&a.type!==r&&(t.destroyDatasetMeta(i),a=t.getDatasetMeta(i)),a.type=r,a.controller)a.controller.updateIndex(i),a.controller.linkScales();else{var o=oe[a.type];if(void 0===o)throw new Error('"'+a.type+'" is not a chart type.');a.controller=new o(t,i),e.push(a.controller)}}),t),e},resetElements:function(){var t=this;ut.each(t.data.datasets,(function(e,n){t.getDatasetMeta(n).controller.reset()}),t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),Ue(e),Ae._invalidate(e),!1!==Ae.notify(e,"beforeUpdate")){e.tooltip._data=e.data;var n=e.buildOrUpdateControllers();ut.each(e.data.datasets,(function(t,n){e.getDatasetMeta(n).controller.buildOrUpdateElements()}),e),e.updateLayout(),e.options.animation&&e.options.animation.duration&&ut.each(n,(function(t){t.reset()})),e.updateDatasets(),e.tooltip.initialize(),e.lastActive=[],Ae.notify(e,"afterUpdate"),e._bufferedRender?e._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:e.render(t)}},updateLayout:function(){var t=this;!1!==Ae.notify(t,"beforeLayout")&&(ve.update(this,this.width,this.height),Ae.notify(t,"afterScaleUpdate"),Ae.notify(t,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==Ae.notify(t,"beforeDatasetsUpdate")){for(var e=0,n=t.data.datasets.length;e<n;++e)t.updateDataset(e);Ae.notify(t,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this,n=e.getDatasetMeta(t),i={meta:n,index:t};!1!==Ae.notify(e,"beforeDatasetUpdate",[i])&&(n.controller.update(),Ae.notify(e,"afterDatasetUpdate",[i]))},render:function(t){var e=this;t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]});var n=e.options.animation,i=Ee(t.duration,n&&n.duration),a=t.lazy;if(!1!==Ae.notify(e,"beforeRender")){var r=function(t){Ae.notify(e,"afterRender"),ut.callback(n&&n.onComplete,[t],e)};if(n&&i){var o=new mt({numSteps:i/16.66,easing:t.easing||n.easing,render:function(t,e){var n=e.currentStep,i=n/e.numSteps;t.draw((0,ut.easing.effects[e.easing])(i),i,n)},onAnimationProgress:n.onProgress,onAnimationComplete:r});pt.addAnimation(e,o,i,a)}else e.draw(),r(new mt({numSteps:0,chart:e}));return e}},draw:function(t){var e=this;e.clear(),ut.isNullOrUndef(t)&&(t=1),e.transition(t),e.width<=0||e.height<=0||!1!==Ae.notify(e,"beforeDraw",[t])&&(ut.each(e.boxes,(function(t){t.draw(e.chartArea)}),e),e.drawDatasets(t),e._drawTooltip(t),Ae.notify(e,"afterDraw",[t]))},transition:function(t){for(var e=this,n=0,i=(e.data.datasets||[]).length;n<i;++n)e.isDatasetVisible(n)&&e.getDatasetMeta(n).controller.transition(t);e.tooltip.transition(t)},drawDatasets:function(t){var e=this;if(!1!==Ae.notify(e,"beforeDatasetsDraw",[t])){for(var n=(e.data.datasets||[]).length-1;n>=0;--n)e.isDatasetVisible(n)&&e.drawDataset(n,t);Ae.notify(e,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n=this,i=n.getDatasetMeta(t),a={meta:i,index:t,easingValue:e};!1!==Ae.notify(n,"beforeDatasetDraw",[a])&&(i.controller.draw(e),Ae.notify(n,"afterDatasetDraw",[a]))},_drawTooltip:function(t){var e=this,n=e.tooltip,i={tooltip:n,easingValue:t};!1!==Ae.notify(e,"beforeTooltipDraw",[i])&&(n.draw(),Ae.notify(e,"afterTooltipDraw",[i]))},getElementAtEvent:function(t){return fe.modes.single(this,t)},getElementsAtEvent:function(t){return fe.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return fe.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var i=fe.modes[e];return"function"==typeof i?i(this,t,n):[]},getDatasetAtEvent:function(t){return fe.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,n=e.data.datasets[t];n._meta||(n._meta={});var i=n._meta[e.id];return i||(i=n._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null}),i},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e<n;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(t){var e=this.id,n=this.data.datasets[t],i=n._meta&&n._meta[e];i&&(i.controller.destroy(),delete n._meta[e])},destroy:function(){var t,e,n=this,i=n.canvas;for(n.stop(),t=0,e=n.data.datasets.length;t<e;++t)n.destroyDatasetMeta(t);i&&(n.unbindEvents(),ut.canvas.clear(n),Ie.releaseContext(n.ctx),n.canvas=null,n.ctx=null),Ae.notify(n,"destroy"),delete qe.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var t=this;t.tooltip=new He({_chart:t,_chartInstance:t,_data:t.data,_options:t.options.tooltips},t)},bindEvents:function(){var t=this,e=t._listeners={},n=function(){t.eventHandler.apply(t,arguments)};ut.each(t.options.events,(function(i){Ie.addEventListener(t,i,n),e[i]=n})),t.options.responsive&&(n=function(){t.resize()},Ie.addEventListener(t,"resize",n),e.resize=n)},unbindEvents:function(){var t=this,e=t._listeners;e&&(delete t._listeners,ut.each(e,(function(e,n){Ie.removeEventListener(t,n,e)})))},updateHoverStyle:function(t,e,n){var i,a,r,o=n?"setHoverStyle":"removeHoverStyle";for(a=0,r=t.length;a<r;++a)(i=t[a])&&this.getDatasetMeta(i._datasetIndex).controller[o](i)},eventHandler:function(t){var e=this,n=e.tooltip;if(!1!==Ae.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var i=e.handleEvent(t);n&&(i=n._start?n.handleEvent(t):i|n.handleEvent(t)),Ae.notify(e,"afterEvent",[t]);var a=e._bufferedRequest;return a?e.render(a):i&&!e.animating&&(e.stop(),e.render({duration:e.options.hover.animationDuration,lazy:!0})),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e,n=this,i=n.options||{},a=i.hover;return n.lastActive=n.lastActive||[],n.active="mouseout"===t.type?[]:n.getElementsAtEventForMode(t,a.mode,a),ut.callback(i.onHover||i.hover.onHover,[t.native,n.active],n),"mouseup"!==t.type&&"click"!==t.type||i.onClick&&i.onClick.call(n,t.native,n.active),n.lastActive.length&&n.updateHoverStyle(n.lastActive,a.mode,!1),n.active.length&&a.mode&&n.updateHoverStyle(n.active,a.mode,!0),e=!ut.arrayEquals(n.active,n.lastActive),n.lastActive=n.active,e}}),qe.instances={};var Ze=qe;function $e(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function Xe(t){this.options=t||{}}qe.Controller=qe,qe.types={},ut.configMerge=je,ut.scaleMerge=Be,ut.extend(Xe.prototype,{formats:$e,parse:$e,format:$e,add:$e,diff:$e,startOf:$e,endOf:$e,_create:function(t){return t}}),Xe.override=function(t){ut.extend(Xe.prototype,t)};var Je={_date:Xe},Ke={formatters:{values:function(t){return ut.isArray(t)?t:""+t},linear:function(t,e,n){var i=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(i)>1&&t!==Math.floor(t)&&(i=t-Math.floor(t));var a=ut.log10(Math.abs(i)),r="";if(0!==t)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var o=ut.log10(Math.abs(t));r=t.toExponential(Math.floor(o)-Math.floor(a))}else{var s=-1*Math.floor(a);s=Math.max(Math.min(s,20),0),r=t.toFixed(s)}else r="0";return r},logarithmic:function(t,e,n){var i=t/Math.pow(10,Math.floor(ut.log10(t)));return 0===t?"0":1===i||2===i||5===i||0===e||e===n.length-1?t.toExponential():""}}},Qe=ut.valueOrDefault,tn=ut.valueAtIndexOrDefault;function en(t){var e,n,i=[];for(e=0,n=t.length;e<n;++e)i.push(t[e].label);return i}function nn(t,e,n){return ut.isArray(e)?ut.longestText(t,n,e):t.measureText(e).width}ot._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:Ke.formatters.values,minor:{},major:{}}});var an=ft.extend({getPadding:function(){var t=this;return{left:t.paddingLeft||0,top:t.paddingTop||0,right:t.paddingRight||0,bottom:t.paddingBottom||0}},getTicks:function(){return this._ticks},mergeTicksOptions:function(){var t=this.options.ticks;for(var e in!1===t.minor&&(t.minor={display:!1}),!1===t.major&&(t.major={display:!1}),t)"major"!==e&&"minor"!==e&&(void 0===t.minor[e]&&(t.minor[e]=t[e]),void 0===t.major[e]&&(t.major[e]=t[e]))},beforeUpdate:function(){ut.callback(this.options.beforeUpdate,[this])},update:function(t,e,n){var i,a,r,o,s,l,u=this;for(u.beforeUpdate(),u.maxWidth=t,u.maxHeight=e,u.margins=ut.extend({left:0,right:0,top:0,bottom:0},n),u._maxLabelLines=0,u.longestLabelWidth=0,u.longestTextCache=u.longestTextCache||{},u.beforeSetDimensions(),u.setDimensions(),u.afterSetDimensions(),u.beforeDataLimits(),u.determineDataLimits(),u.afterDataLimits(),u.beforeBuildTicks(),s=u.buildTicks()||[],s=u.afterBuildTicks(s)||s,u.beforeTickToLabelConversion(),r=u.convertTicksToLabels(s)||u.ticks,u.afterTickToLabelConversion(),u.ticks=r,i=0,a=r.length;i<a;++i)o=r[i],(l=s[i])?l.label=o:s.push(l={label:o,major:!1});return u._ticks=s,u.beforeCalculateTickRotation(),u.calculateTickRotation(),u.afterCalculateTickRotation(),u.beforeFit(),u.fit(),u.afterFit(),u.afterUpdate(),u.minSize},afterUpdate:function(){ut.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){ut.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){ut.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){ut.callback(this.options.beforeDataLimits,[this])},determineDataLimits:ut.noop,afterDataLimits:function(){ut.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){ut.callback(this.options.beforeBuildTicks,[this])},buildTicks:ut.noop,afterBuildTicks:function(t){var e=this;return ut.isArray(t)&&t.length?ut.callback(e.options.afterBuildTicks,[e,t]):(e.ticks=ut.callback(e.options.afterBuildTicks,[e,e.ticks])||e.ticks,t)},beforeTickToLabelConversion:function(){ut.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this,e=t.options.ticks;t.ticks=t.ticks.map(e.userCallback||e.callback,this)},afterTickToLabelConversion:function(){ut.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){ut.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t=this,e=t.ctx,n=t.options.ticks,i=en(t._ticks),a=ut.options._parseFont(n);e.font=a.string;var r=n.minRotation||0;if(i.length&&t.options.display&&t.isHorizontal())for(var o,s=ut.longestText(e,a.string,i,t.longestTextCache),l=s,u=t.getPixelForTick(1)-t.getPixelForTick(0)-6;l>u&&r<n.maxRotation;){var d=ut.toRadians(r);if(o=Math.cos(d),Math.sin(d)*s>t.maxHeight){r--;break}r++,l=o*s}t.labelRotation=r},afterCalculateTickRotation:function(){ut.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){ut.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},n=en(t._ticks),i=t.options,a=i.ticks,r=i.scaleLabel,o=i.gridLines,s=t._isVisible(),l=i.position,u=t.isHorizontal(),d=ut.options._parseFont,h=d(a),c=i.gridLines.tickMarkLength;if(e.width=u?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:s&&o.drawTicks?c:0,e.height=u?s&&o.drawTicks?c:0:t.maxHeight,r.display&&s){var f=d(r),g=ut.options.toPadding(r.padding),m=f.lineHeight+g.height;u?e.height+=m:e.width+=m}if(a.display&&s){var p=ut.longestText(t.ctx,h.string,n,t.longestTextCache),v=ut.numberOfLabelLines(n),y=.5*h.size,b=t.options.ticks.padding;if(t._maxLabelLines=v,t.longestLabelWidth=p,u){var x=ut.toRadians(t.labelRotation),_=Math.cos(x),k=Math.sin(x);e.height=Math.min(t.maxHeight,e.height+(k*p+h.lineHeight*v+y)+b),t.ctx.font=h.string;var w,M,S=nn(t.ctx,n[0],h.string),D=nn(t.ctx,n[n.length-1],h.string),C=t.getPixelForTick(0)-t.left,P=t.right-t.getPixelForTick(n.length-1);0!==t.labelRotation?(w="bottom"===l?_*S:_*y,M="bottom"===l?_*y:_*D):(w=S/2,M=D/2),t.paddingLeft=Math.max(w-C,0)+3,t.paddingRight=Math.max(M-P,0)+3}else a.mirror?p=0:p+=b+y,e.width=Math.min(t.maxWidth,e.width+p),t.paddingTop=h.size/2,t.paddingBottom=h.size/2}t.handleMargins(),t.width=e.width,t.height=e.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){ut.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(ut.isNullOrUndef(t))return NaN;if(("number"==typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},getLabelForIndex:ut.noop,getPixelForValue:ut.noop,getValueForPixel:ut.noop,getPixelForTick:function(t){var e=this,n=e.options.offset;if(e.isHorizontal()){var i=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(n?0:1),1),a=i*t+e.paddingLeft;return n&&(a+=i/2),e.left+a+(e.isFullWidth()?e.margins.left:0)}return e.top+t*((e.height-(e.paddingTop+e.paddingBottom))/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;return e.isHorizontal()?e.left+((e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft)+(e.isFullWidth()?e.margins.left:0):e.top+t*e.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this,e=t.min,n=t.max;return t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0},_autoSkip:function(t){var e,n,i=this,a=i.isHorizontal(),r=t.length,o=!1,s=i.options.ticks.minor.maxTicksLimit,l=i._tickSize()*(r-1),u=a?i.width-(i.paddingLeft+i.paddingRight):i.height-(i.paddingTop+i.PaddingBottom),d=[];for(l>u&&(o=1+Math.floor(l/u)),r>s&&(o=Math.max(o,1+Math.floor(r/s))),e=0;e<r;e++)n=t[e],o>1&&e%o>0&&delete n.label,d.push(n);return d},_tickSize:function(){var t=this,e=t.isHorizontal(),n=t.options.ticks.minor,i=ut.toRadians(t.labelRotation),a=Math.abs(Math.cos(i)),r=Math.abs(Math.sin(i)),o=n.autoSkipPadding||0,s=t.longestLabelWidth+o||0,l=ut.options._parseFont(n),u=t._maxLabelLines*l.lineHeight+o||0;return e?u*a>s*r?s/a:u/r:u*r<s*a?u/a:s/r},_isVisible:function(){var t,e,n,i=this,a=i.chart,r=i.options.display;if("auto"!==r)return!!r;for(t=0,e=a.data.datasets.length;t<e;++t)if(a.isDatasetVisible(t)&&((n=a.getDatasetMeta(t)).xAxisID===i.id||n.yAxisID===i.id))return!0;return!1},draw:function(t){var e=this,n=e.options;if(e._isVisible()){var i,a,r,o=e.chart,s=e.ctx,l=ot.global.defaultFontColor,u=n.ticks.minor,d=n.ticks.major||u,h=n.gridLines,c=n.scaleLabel,f=n.position,g=0!==e.labelRotation,m=u.mirror,p=e.isHorizontal(),v=ut.options._parseFont,y=u.display&&u.autoSkip?e._autoSkip(e.getTicks()):e.getTicks(),b=Qe(u.fontColor,l),x=v(u),_=x.lineHeight,k=Qe(d.fontColor,l),w=v(d),M=u.padding,S=u.labelOffset,D=h.drawTicks?h.tickMarkLength:0,C=Qe(c.fontColor,l),P=v(c),T=ut.options.toPadding(c.padding),O=ut.toRadians(e.labelRotation),I=[],A=h.drawBorder?tn(h.lineWidth,0,0):0,F=ut._alignPixel;if("top"===f?(i=F(o,e.bottom,A),a=e.bottom-D,r=i-A/2):"bottom"===f?(i=F(o,e.top,A),a=i+A/2,r=e.top+D):"left"===f?(i=F(o,e.right,A),a=e.right-D,r=i-A/2):(i=F(o,e.left,A),a=i+A/2,r=e.left+D),ut.each(y,(function(i,s){if(!ut.isNullOrUndef(i.label)){var l,u,d,c,v,y,b,x,k,w,C,P,T,R,L,W,Y=i.label;s===e.zeroLineIndex&&n.offset===h.offsetGridLines?(l=h.zeroLineWidth,u=h.zeroLineColor,d=h.zeroLineBorderDash||[],c=h.zeroLineBorderDashOffset||0):(l=tn(h.lineWidth,s),u=tn(h.color,s),d=h.borderDash||[],c=h.borderDashOffset||0);var N=ut.isArray(Y)?Y.length:1,z=function(t,e,n){var i=t.getPixelForTick(e);return n&&(1===t.getTicks().length?i-=t.isHorizontal()?Math.max(i-t.left,t.right-i):Math.max(i-t.top,t.bottom-i):i-=0===e?(t.getPixelForTick(1)-i)/2:(i-t.getPixelForTick(e-1))/2),i}(e,s,h.offsetGridLines);if(p){var V=D+M;z<e.left-1e-7&&(u="rgba(0,0,0,0)"),v=b=k=C=F(o,z,l),y=a,x=r,T=e.getPixelForTick(s)+S,"top"===f?(w=F(o,t.top,A)+A/2,P=t.bottom,L=((g?1:.5)-N)*_,W=g?"left":"center",R=e.bottom-V):(w=t.top,P=F(o,t.bottom,A)-A/2,L=(g?0:.5)*_,W=g?"right":"center",R=e.top+V)}else{var H=(m?0:D)+M;z<e.top-1e-7&&(u="rgba(0,0,0,0)"),v=a,b=r,y=x=w=P=F(o,z,l),R=e.getPixelForTick(s)+S,L=(1-N)*_/2,"left"===f?(k=F(o,t.left,A)+A/2,C=t.right,W=m?"left":"right",T=e.right-H):(k=t.left,C=F(o,t.right,A)-A/2,W=m?"right":"left",T=e.left+H)}I.push({tx1:v,ty1:y,tx2:b,ty2:x,x1:k,y1:w,x2:C,y2:P,labelX:T,labelY:R,glWidth:l,glColor:u,glBorderDash:d,glBorderDashOffset:c,rotation:-1*O,label:Y,major:i.major,textOffset:L,textAlign:W})}})),ut.each(I,(function(t){var e=t.glWidth,n=t.glColor;if(h.display&&e&&n&&(s.save(),s.lineWidth=e,s.strokeStyle=n,s.setLineDash&&(s.setLineDash(t.glBorderDash),s.lineDashOffset=t.glBorderDashOffset),s.beginPath(),h.drawTicks&&(s.moveTo(t.tx1,t.ty1),s.lineTo(t.tx2,t.ty2)),h.drawOnChartArea&&(s.moveTo(t.x1,t.y1),s.lineTo(t.x2,t.y2)),s.stroke(),s.restore()),u.display){s.save(),s.translate(t.labelX,t.labelY),s.rotate(t.rotation),s.font=t.major?w.string:x.string,s.fillStyle=t.major?k:b,s.textBaseline="middle",s.textAlign=t.textAlign;var i=t.label,a=t.textOffset;if(ut.isArray(i))for(var r=0;r<i.length;++r)s.fillText(""+i[r],0,a),a+=_;else s.fillText(i,0,a);s.restore()}})),c.display){var R,L,W=0,Y=P.lineHeight/2;if(p)R=e.left+(e.right-e.left)/2,L="bottom"===f?e.bottom-Y-T.bottom:e.top+Y+T.top;else{var N="left"===f;R=N?e.left+Y+T.top:e.right-Y-T.top,L=e.top+(e.bottom-e.top)/2,W=N?-.5*Math.PI:.5*Math.PI}s.save(),s.translate(R,L),s.rotate(W),s.textAlign="center",s.textBaseline="middle",s.fillStyle=C,s.font=P.string,s.fillText(c.labelString,0,0),s.restore()}if(A){var z,V,H,E,B=A,j=tn(h.lineWidth,y.length-1,0);p?(z=F(o,e.left,B)-B/2,V=F(o,e.right,j)+j/2,H=E=i):(H=F(o,e.top,B)-B/2,E=F(o,e.bottom,j)+j/2,z=V=i),s.lineWidth=A,s.strokeStyle=tn(h.color,0),s.beginPath(),s.moveTo(z,H),s.lineTo(V,E),s.stroke()}}}}),rn=an.extend({getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels},determineDataLimits:function(){var t,e=this,n=e.getLabels();e.minIndex=0,e.maxIndex=n.length-1,void 0!==e.options.ticks.min&&(t=n.indexOf(e.options.ticks.min),e.minIndex=-1!==t?t:e.minIndex),void 0!==e.options.ticks.max&&(t=n.indexOf(e.options.ticks.max),e.maxIndex=-1!==t?t:e.maxIndex),e.min=n[e.minIndex],e.max=n[e.maxIndex]},buildTicks:function(){var t=this,e=t.getLabels();t.ticks=0===t.minIndex&&t.maxIndex===e.length-1?e:e.slice(t.minIndex,t.maxIndex+1)},getLabelForIndex:function(t,e){var n=this,i=n.chart;return i.getDatasetMeta(e).controller._getValueScaleId()===n.id?n.getRightValue(i.data.datasets[e].data[t]):n.ticks[t-n.minIndex]},getPixelForValue:function(t,e){var n,i=this,a=i.options.offset,r=Math.max(i.maxIndex+1-i.minIndex-(a?0:1),1);if(null!=t&&(n=i.isHorizontal()?t.x:t.y),void 0!==n||void 0!==t&&isNaN(e)){var o=i.getLabels().indexOf(t=n||t);e=-1!==o?o:e}if(i.isHorizontal()){var s=i.width/r,l=s*(e-i.minIndex);return a&&(l+=s/2),i.left+l}var u=i.height/r,d=u*(e-i.minIndex);return a&&(d+=u/2),i.top+d},getPixelForTick:function(t){return this.getPixelForValue(this.ticks[t],t+this.minIndex,null)},getValueForPixel:function(t){var e=this,n=e.options.offset,i=Math.max(e._ticks.length-(n?0:1),1),a=e.isHorizontal(),r=(a?e.width:e.height)/i;return t-=a?e.left:e.top,n&&(t-=r/2),(t<=0?0:Math.round(t/r))+e.minIndex},getBasePixel:function(){return this.bottom}});rn._defaults={position:"bottom"};var on=ut.isNullOrUndef,sn=an.extend({getRightValue:function(t){return"string"==typeof t?+t:an.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var n=ut.sign(t.min),i=ut.sign(t.max);n<0&&i<0?t.max=0:n>0&&i>0&&(t.min=0)}var a=void 0!==e.min||void 0!==e.suggestedMin,r=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(t.min=null===t.min?e.suggestedMin:Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(t.max=null===t.max?e.suggestedMax:Math.max(t.max,e.suggestedMax)),a!==r&&t.min>=t.max&&(a?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this,n=e.options.ticks,i=n.stepSize,a=n.maxTicksLimit;return i?t=Math.ceil(e.max/i)-Math.floor(e.min/i)+1:(t=e._computeTickLimit(),a=a||11),a&&(t=Math.min(a,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:ut.noop,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),i={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,precision:e.precision,stepSize:ut.valueOrDefault(e.fixedStepSize,e.stepSize)},a=t.ticks=function(t,e){var n,i,a,r,o=[],s=t.stepSize,l=s||1,u=t.maxTicks-1,d=t.min,h=t.max,c=t.precision,f=e.min,g=e.max,m=ut.niceNum((g-f)/u/l)*l;if(m<1e-14&&on(d)&&on(h))return[f,g];(r=Math.ceil(g/m)-Math.floor(f/m))>u&&(m=ut.niceNum(r*m/u/l)*l),s||on(c)?n=Math.pow(10,ut._decimalPlaces(m)):(n=Math.pow(10,c),m=Math.ceil(m*n)/n),i=Math.floor(f/m)*m,a=Math.ceil(g/m)*m,s&&(!on(d)&&ut.almostWhole(d/m,m/1e3)&&(i=d),!on(h)&&ut.almostWhole(h/m,m/1e3)&&(a=h)),r=ut.almostEquals(r=(a-i)/m,Math.round(r),m/1e3)?Math.round(r):Math.ceil(r),i=Math.round(i*n)/n,a=Math.round(a*n)/n,o.push(on(d)?i:d);for(var p=1;p<r;++p)o.push(Math.round((i+p*m)*n)/n);return o.push(on(h)?a:h),o}(i,t);t.handleDirectionalChanges(),t.max=ut.max(a),t.min=ut.min(a),e.reverse?(a.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var t=this;t.ticksAsNumbers=t.ticks.slice(),t.zeroLineIndex=t.ticks.indexOf(0),an.prototype.convertTicksToLabels.call(t)}}),ln={position:"left",ticks:{callback:Ke.formatters.linear}},un=sn.extend({determineDataLimits:function(){var t=this,e=t.options,n=t.chart,i=n.data.datasets,a=t.isHorizontal();function r(e){return a?e.xAxisID===t.id:e.yAxisID===t.id}t.min=null,t.max=null;var o=e.stacked;if(void 0===o&&ut.each(i,(function(t,e){if(!o){var i=n.getDatasetMeta(e);n.isDatasetVisible(e)&&r(i)&&void 0!==i.stack&&(o=!0)}})),e.stacked||o){var s={};ut.each(i,(function(i,a){var o=n.getDatasetMeta(a),l=[o.type,void 0===e.stacked&&void 0===o.stack?a:"",o.stack].join(".");void 0===s[l]&&(s[l]={positiveValues:[],negativeValues:[]});var u=s[l].positiveValues,d=s[l].negativeValues;n.isDatasetVisible(a)&&r(o)&&ut.each(i.data,(function(n,i){var a=+t.getRightValue(n);isNaN(a)||o.data[i].hidden||(u[i]=u[i]||0,d[i]=d[i]||0,e.relativePoints?u[i]=100:a<0?d[i]+=a:u[i]+=a)}))})),ut.each(s,(function(e){var n=e.positiveValues.concat(e.negativeValues),i=ut.min(n),a=ut.max(n);t.min=null===t.min?i:Math.min(t.min,i),t.max=null===t.max?a:Math.max(t.max,a)}))}else ut.each(i,(function(e,i){var a=n.getDatasetMeta(i);n.isDatasetVisible(i)&&r(a)&&ut.each(e.data,(function(e,n){var i=+t.getRightValue(e);isNaN(i)||a.data[n].hidden||((null===t.min||i<t.min)&&(t.min=i),(null===t.max||i>t.max)&&(t.max=i))}))}));t.min=isFinite(t.min)&&!isNaN(t.min)?t.min:0,t.max=isFinite(t.max)&&!isNaN(t.max)?t.max:1,this.handleTickRangeOptions()},_computeTickLimit:function(){var t,e=this;return e.isHorizontal()?Math.ceil(e.width/40):(t=ut.options._parseFont(e.options.ticks),Math.ceil(e.height/t.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e=this,n=e.start,i=+e.getRightValue(t),a=e.end-n;return e.isHorizontal()?e.left+e.width/a*(i-n):e.bottom-e.height/a*(i-n)},getValueForPixel:function(t){var e=this,n=e.isHorizontal();return e.start+(n?t-e.left:e.bottom-t)/(n?e.width:e.height)*(e.end-e.start)},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});un._defaults=ln;var dn=ut.valueOrDefault,hn={position:"left",ticks:{callback:Ke.formatters.logarithmic}};function cn(t,e){return ut.isFinite(t)&&t>=0?t:e}var fn=an.extend({determineDataLimits:function(){var t=this,e=t.options,n=t.chart,i=n.data.datasets,a=t.isHorizontal();function r(e){return a?e.xAxisID===t.id:e.yAxisID===t.id}t.min=null,t.max=null,t.minNotZero=null;var o=e.stacked;if(void 0===o&&ut.each(i,(function(t,e){if(!o){var i=n.getDatasetMeta(e);n.isDatasetVisible(e)&&r(i)&&void 0!==i.stack&&(o=!0)}})),e.stacked||o){var s={};ut.each(i,(function(i,a){var o=n.getDatasetMeta(a),l=[o.type,void 0===e.stacked&&void 0===o.stack?a:"",o.stack].join(".");n.isDatasetVisible(a)&&r(o)&&(void 0===s[l]&&(s[l]=[]),ut.each(i.data,(function(e,n){var i=s[l],a=+t.getRightValue(e);isNaN(a)||o.data[n].hidden||a<0||(i[n]=i[n]||0,i[n]+=a)})))})),ut.each(s,(function(e){if(e.length>0){var n=ut.min(e),i=ut.max(e);t.min=null===t.min?n:Math.min(t.min,n),t.max=null===t.max?i:Math.max(t.max,i)}}))}else ut.each(i,(function(e,i){var a=n.getDatasetMeta(i);n.isDatasetVisible(i)&&r(a)&&ut.each(e.data,(function(e,n){var i=+t.getRightValue(e);isNaN(i)||a.data[n].hidden||i<0||((null===t.min||i<t.min)&&(t.min=i),(null===t.max||i>t.max)&&(t.max=i),0!==i&&(null===t.minNotZero||i<t.minNotZero)&&(t.minNotZero=i))}))}));this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;t.min=cn(e.min,t.min),t.max=cn(e.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor(ut.log10(t.min))-1),t.max=Math.pow(10,Math.floor(ut.log10(t.max))+1)):(t.min=1,t.max=10)),null===t.min&&(t.min=Math.pow(10,Math.floor(ut.log10(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor(ut.log10(t.min))+1):10),null===t.minNotZero&&(t.minNotZero=t.min>0?t.min:t.max<1?Math.pow(10,Math.floor(ut.log10(t.max))):1)},buildTicks:function(){var t=this,e=t.options.ticks,n=!t.isHorizontal(),i={min:cn(e.min),max:cn(e.max)},a=t.ticks=function(t,e){var n,i,a=[],r=dn(t.min,Math.pow(10,Math.floor(ut.log10(e.min)))),o=Math.floor(ut.log10(e.max)),s=Math.ceil(e.max/Math.pow(10,o));0===r?(n=Math.floor(ut.log10(e.minNotZero)),i=Math.floor(e.minNotZero/Math.pow(10,n)),a.push(r),r=i*Math.pow(10,n)):(n=Math.floor(ut.log10(r)),i=Math.floor(r/Math.pow(10,n)));var l=n<0?Math.pow(10,Math.abs(n)):1;do{a.push(r),10==++i&&(i=1,l=++n>=0?1:l),r=Math.round(i*Math.pow(10,n)*l)/l}while(n<o||n===o&&i<s);var u=dn(t.max,r);return a.push(u),a}(i,t);t.max=ut.max(a),t.min=ut.min(a),e.reverse?(n=!n,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),n&&a.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),an.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){return this.getPixelForValue(this.tickValues[t])},_getFirstTickValue:function(t){var e=Math.floor(ut.log10(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},getPixelForValue:function(t){var e,n,i,a,r,o=this,s=o.options.ticks,l=s.reverse,u=ut.log10,d=o._getFirstTickValue(o.minNotZero),h=0;return t=+o.getRightValue(t),l?(i=o.end,a=o.start,r=-1):(i=o.start,a=o.end,r=1),o.isHorizontal()?(e=o.width,n=l?o.right:o.left):(e=o.height,r*=-1,n=l?o.top:o.bottom),t!==i&&(0===i&&(e-=h=dn(s.fontSize,ot.global.defaultFontSize),i=d),0!==t&&(h+=e/(u(a)-u(i))*(u(t)-u(i))),n+=r*h),n},getValueForPixel:function(t){var e,n,i,a,r=this,o=r.options.ticks,s=o.reverse,l=ut.log10,u=r._getFirstTickValue(r.minNotZero);if(s?(n=r.end,i=r.start):(n=r.start,i=r.end),r.isHorizontal()?(e=r.width,a=s?r.right-t:t-r.left):(e=r.height,a=s?t-r.top:r.bottom-t),a!==n){if(0===n){var d=dn(o.fontSize,ot.global.defaultFontSize);a-=d,e-=d,n=u}a*=l(i)-l(n),a/=e,a=Math.pow(10,l(n)+a)}return a}});fn._defaults=hn;var gn=ut.valueOrDefault,mn=ut.valueAtIndexOrDefault,pn=ut.options.resolve,vn={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0, 0, 0, 0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:Ke.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function yn(t){var e=t.options;return e.angleLines.display||e.pointLabels.display?t.chart.data.labels.length:0}function bn(t){var e=t.ticks;return e.display&&t.display?gn(e.fontSize,ot.global.defaultFontSize)+2*e.backdropPaddingY:0}function xn(t,e,n,i,a){return t===i||t===a?{start:e-n/2,end:e+n/2}:t<i||t>a?{start:e-n,end:e}:{start:e,end:e+n}}function _n(t){return 0===t||180===t?"center":t<180?"left":"right"}function kn(t,e,n,i){var a,r,o=n.y+i/2;if(ut.isArray(e))for(a=0,r=e.length;a<r;++a)t.fillText(e[a],n.x,o),o+=i;else t.fillText(e,n.x,o)}function wn(t,e,n){90===t||270===t?n.y-=e.h/2:(t>270||t<90)&&(n.y-=e.h)}function Mn(t){return ut.isNumber(t)?t:0}var Sn=sn.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=bn(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var t=this,e=t.chart,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;ut.each(e.data.datasets,(function(a,r){if(e.isDatasetVisible(r)){var o=e.getDatasetMeta(r);ut.each(a.data,(function(e,a){var r=+t.getRightValue(e);isNaN(r)||o.data[a].hidden||(n=Math.min(r,n),i=Math.max(r,i))}))}})),t.min=n===Number.POSITIVE_INFINITY?0:n,t.max=i===Number.NEGATIVE_INFINITY?0:i,t.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/bn(this.options))},convertTicksToLabels:function(){var t=this;sn.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map(t.options.pointLabels.callback,t)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this,e=t.options;e.display&&e.pointLabels.display?function(t){var e,n,i,a=ut.options._parseFont(t.options.pointLabels),r={l:0,r:t.width,t:0,b:t.height-t.paddingTop},o={};t.ctx.font=a.string,t._pointLabelSizes=[];var s,l,u,d=yn(t);for(e=0;e<d;e++){i=t.getPointPosition(e,t.drawingArea+5),s=t.ctx,l=a.lineHeight,n=ut.isArray(u=t.pointLabels[e]||"")?{w:ut.longestText(s,s.font,u),h:u.length*l}:{w:s.measureText(u).width,h:l},t._pointLabelSizes[e]=n;var h=t.getIndexAngle(e),c=ut.toDegrees(h)%360,f=xn(c,i.x,n.w,0,180),g=xn(c,i.y,n.h,90,270);f.start<r.l&&(r.l=f.start,o.l=h),f.end>r.r&&(r.r=f.end,o.r=h),g.start<r.t&&(r.t=g.start,o.t=h),g.end>r.b&&(r.b=g.end,o.b=h)}t.setReductions(t.drawingArea,r,o)}(t):t.setCenterPoint(0,0,0,0)},setReductions:function(t,e,n){var i=this,a=e.l/Math.sin(n.l),r=Math.max(e.r-i.width,0)/Math.sin(n.r),o=-e.t/Math.cos(n.t),s=-Math.max(e.b-(i.height-i.paddingTop),0)/Math.cos(n.b);a=Mn(a),r=Mn(r),o=Mn(o),s=Mn(s),i.drawingArea=Math.min(Math.floor(t-(a+r)/2),Math.floor(t-(o+s)/2)),i.setCenterPoint(a,r,o,s)},setCenterPoint:function(t,e,n,i){var a=this,r=n+a.drawingArea,o=a.height-a.paddingTop-i-a.drawingArea;a.xCenter=Math.floor((t+a.drawingArea+(a.width-e-a.drawingArea))/2+a.left),a.yCenter=Math.floor((r+o)/2+a.top+a.paddingTop)},getIndexAngle:function(t){return t*(2*Math.PI/yn(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(null===t)return 0;var n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this,i=n.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(i)*e+n.xCenter,y:Math.sin(i)*e+n.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this,e=t.min,n=t.max;return t.getPointPositionForValue(0,t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},draw:function(){var t=this,e=t.options,n=e.gridLines,i=e.ticks;if(e.display){var a=t.ctx,r=this.getIndexAngle(0),o=ut.options._parseFont(i);(e.angleLines.display||e.pointLabels.display)&&function(t){var e=t.ctx,n=t.options,i=n.angleLines,a=n.gridLines,r=n.pointLabels,o=gn(i.lineWidth,a.lineWidth),s=gn(i.color,a.color),l=bn(n);e.save(),e.lineWidth=o,e.strokeStyle=s,e.setLineDash&&(e.setLineDash(pn([i.borderDash,a.borderDash,[]])),e.lineDashOffset=pn([i.borderDashOffset,a.borderDashOffset,0]));var u=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),d=ut.options._parseFont(r);e.font=d.string,e.textBaseline="middle";for(var h=yn(t)-1;h>=0;h--){if(i.display&&o&&s){var c=t.getPointPosition(h,u);e.beginPath(),e.moveTo(t.xCenter,t.yCenter),e.lineTo(c.x,c.y),e.stroke()}if(r.display){var f=t.getPointPosition(h,u+(0===h?l/2:0)+5),g=mn(r.fontColor,h,ot.global.defaultFontColor);e.fillStyle=g;var m=t.getIndexAngle(h),p=ut.toDegrees(m);e.textAlign=_n(p),wn(p,t._pointLabelSizes[h],f),kn(e,t.pointLabels[h]||"",f,d.lineHeight)}}e.restore()}(t),ut.each(t.ticks,(function(e,s){if(s>0||i.reverse){var l=t.getDistanceFromCenterForValue(t.ticksAsNumbers[s]);if(n.display&&0!==s&&function(t,e,n,i){var a,r=t.ctx,o=e.circular,s=yn(t),l=mn(e.color,i-1),u=mn(e.lineWidth,i-1);if((o||s)&&l&&u){if(r.save(),r.strokeStyle=l,r.lineWidth=u,r.setLineDash&&(r.setLineDash(e.borderDash||[]),r.lineDashOffset=e.borderDashOffset||0),r.beginPath(),o)r.arc(t.xCenter,t.yCenter,n,0,2*Math.PI);else{a=t.getPointPosition(0,n),r.moveTo(a.x,a.y);for(var d=1;d<s;d++)a=t.getPointPosition(d,n),r.lineTo(a.x,a.y)}r.closePath(),r.stroke(),r.restore()}}(t,n,l,s),i.display){var u=gn(i.fontColor,ot.global.defaultFontColor);if(a.font=o.string,a.save(),a.translate(t.xCenter,t.yCenter),a.rotate(r),i.showLabelBackdrop){var d=a.measureText(e).width;a.fillStyle=i.backdropColor,a.fillRect(-d/2-i.backdropPaddingX,-l-o.size/2-i.backdropPaddingY,d+2*i.backdropPaddingX,o.size+2*i.backdropPaddingY)}a.textAlign="center",a.textBaseline="middle",a.fillStyle=u,a.fillText(e,0,-l),a.restore()}}}))}}});Sn._defaults=vn;var Dn=ut.valueOrDefault,Cn=Number.MIN_SAFE_INTEGER||-9007199254740991,Pn=Number.MAX_SAFE_INTEGER||9007199254740991,Tn={millisecond:{common:!0,size:1,steps:[1,2,5,10,20,50,100,250,500]},second:{common:!0,size:1e3,steps:[1,2,5,10,15,30]},minute:{common:!0,size:6e4,steps:[1,2,5,10,15,30]},hour:{common:!0,size:36e5,steps:[1,2,3,6,12]},day:{common:!0,size:864e5,steps:[1,2,5]},week:{common:!1,size:6048e5,steps:[1,2,3,4]},month:{common:!0,size:2628e6,steps:[1,2,3]},quarter:{common:!1,size:7884e6,steps:[1,2,3,4]},year:{common:!0,size:3154e7}},On=Object.keys(Tn);function In(t,e){return t-e}function An(t){var e,n,i,a={},r=[];for(e=0,n=t.length;e<n;++e)a[i=t[e]]||(a[i]=!0,r.push(i));return r}function Fn(t,e,n,i){var a=function(t,e,n){for(var i,a,r,o=0,s=t.length-1;o>=0&&o<=s;){if(r=t[i=o+s>>1],!(a=t[i-1]||null))return{lo:null,hi:r};if(r[e]<n)o=i+1;else{if(!(a[e]>n))return{lo:a,hi:r};s=i-1}}return{lo:r,hi:null}}(t,e,n),r=a.lo?a.hi?a.lo:t[t.length-2]:t[0],o=a.lo?a.hi?a.hi:t[t.length-1]:t[1],s=o[e]-r[e];return r[i]+(o[i]-r[i])*(s?(n-r[e])/s:0)}function Rn(t,e){var n=t._adapter,i=t.options.time,a=i.parser,r=a||i.format,o=e;return"function"==typeof a&&(o=a(o)),ut.isFinite(o)||(o="string"==typeof r?n.parse(o,r):n.parse(o)),null!==o?+o:(a||"function"!=typeof r||(o=r(e),ut.isFinite(o)||(o=n.parse(o))),o)}function Ln(t,e){if(ut.isNullOrUndef(e))return null;var n=t.options.time,i=Rn(t,t.getRightValue(e));return null===i||n.round&&(i=+t._adapter.startOf(i,n.round)),i}function Wn(t){for(var e=On.indexOf(t)+1,n=On.length;e<n;++e)if(Tn[On[e]].common)return On[e]}var Yn=an.extend({initialize:function(){this.mergeTicksOptions(),an.prototype.initialize.call(this)},update:function(){var t=this,e=t.options,n=e.time||(e.time={}),i=t._adapter=new Je._date(e.adapters.date);return n.format&&console.warn("options.time.format is deprecated and replaced by options.time.parser."),ut.mergeIf(n.displayFormats,i.formats()),an.prototype.update.apply(t,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),an.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,n,i,a,r,o=this,s=o.chart,l=o._adapter,u=o.options.time,d=u.unit||"day",h=Pn,c=Cn,f=[],g=[],m=[],p=s.data.labels||[];for(t=0,n=p.length;t<n;++t)m.push(Ln(o,p[t]));for(t=0,n=(s.data.datasets||[]).length;t<n;++t)if(s.isDatasetVisible(t))if(ut.isObject((a=s.data.datasets[t].data)[0]))for(g[t]=[],e=0,i=a.length;e<i;++e)r=Ln(o,a[e]),f.push(r),g[t][e]=r;else{for(e=0,i=m.length;e<i;++e)f.push(m[e]);g[t]=m.slice(0)}else g[t]=[];m.length&&(m=An(m).sort(In),h=Math.min(h,m[0]),c=Math.max(c,m[m.length-1])),f.length&&(f=An(f).sort(In),h=Math.min(h,f[0]),c=Math.max(c,f[f.length-1])),h=Ln(o,u.min)||h,c=Ln(o,u.max)||c,h=h===Pn?+l.startOf(Date.now(),d):h,c=c===Cn?+l.endOf(Date.now(),d)+1:c,o.min=Math.min(h,c),o.max=Math.max(h+1,c),o._horizontal=o.isHorizontal(),o._table=[],o._timestamps={data:f,datasets:g,labels:m}},buildTicks:function(){var t,e,n,i=this,a=i.min,r=i.max,o=i.options,s=o.time,l=[],u=[];switch(o.ticks.source){case"data":l=i._timestamps.data;break;case"labels":l=i._timestamps.labels;break;case"auto":default:l=function(t,e,n,i){var a,r=t._adapter,o=t.options,s=o.time,l=s.unit||function(t,e,n,i){var a,r,o=On.length;for(a=On.indexOf(t);a<o-1;++a)if((r=Tn[On[a]]).common&&Math.ceil((n-e)/((r.steps?r.steps[r.steps.length-1]:Pn)*r.size))<=i)return On[a];return On[o-1]}(s.minUnit,e,n,i),u=Wn(l),d=Dn(s.stepSize,s.unitStepSize),h="week"===l&&s.isoWeekday,c=o.ticks.major.enabled,f=Tn[l],g=e,m=n,p=[];for(d||(d=function(t,e,n,i){var a,r,o,s=e-t,l=Tn[n],u=l.size,d=l.steps;if(!d)return Math.ceil(s/(i*u));for(a=0,r=d.length;a<r&&(o=d[a],!(Math.ceil(s/(u*o))<=i));++a);return o}(e,n,l,i)),h&&(g=+r.startOf(g,"isoWeek",h),m=+r.startOf(m,"isoWeek",h)),g=+r.startOf(g,h?"day":l),(m=+r.startOf(m,h?"day":l))<n&&(m=+r.add(m,1,l)),a=g,c&&u&&!h&&!s.round&&(a=+r.startOf(a,u),a=+r.add(a,~~((g-a)/(f.size*d))*d,l));a<m;a=+r.add(a,d,l))p.push(+a);return p.push(+a),p}(i,a,r,i.getLabelCapacity(a))}for("ticks"===o.bounds&&l.length&&(a=l[0],r=l[l.length-1]),a=Ln(i,s.min)||a,r=Ln(i,s.max)||r,t=0,e=l.length;t<e;++t)(n=l[t])>=a&&n<=r&&u.push(n);return i.min=a,i.max=r,i._unit=s.unit||function(t,e,n,i,a){var r,o;for(r=On.length-1;r>=On.indexOf(n);r--)if(Tn[o=On[r]].common&&t._adapter.diff(a,i,o)>=e.length)return o;return On[n?On.indexOf(n):0]}(i,u,s.minUnit,i.min,i.max),i._majorUnit=Wn(i._unit),i._table=function(t,e,n,i){if("linear"===i||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var a,r,o,s,l,u=[],d=[e];for(a=0,r=t.length;a<r;++a)(s=t[a])>e&&s<n&&d.push(s);for(d.push(n),a=0,r=d.length;a<r;++a)l=d[a+1],s=d[a],void 0!==(o=d[a-1])&&void 0!==l&&Math.round((l+o)/2)===s||u.push({time:s,pos:a/(r-1)});return u}(i._timestamps.data,a,r,o.distribution),i._offsets=function(t,e,n,i,a){var r,o,s=0,l=0;return a.offset&&e.length&&(a.time.min||(r=Fn(t,"time",e[0],"pos"),s=1===e.length?1-r:(Fn(t,"time",e[1],"pos")-r)/2),a.time.max||(o=Fn(t,"time",e[e.length-1],"pos"),l=1===e.length?o:(o-Fn(t,"time",e[e.length-2],"pos"))/2)),{start:s,end:l}}(i._table,u,0,0,o),o.ticks.reverse&&u.reverse(),function(t,e,n){var i,a,r,o,s=[];for(i=0,a=e.length;i<a;++i)r=e[i],o=!!n&&r===+t._adapter.startOf(r,n),s.push({value:r,major:o});return s}(i,u,i._majorUnit)},getLabelForIndex:function(t,e){var n=this,i=n._adapter,a=n.chart.data,r=n.options.time,o=a.labels&&t<a.labels.length?a.labels[t]:"",s=a.datasets[e].data[t];return ut.isObject(s)&&(o=n.getRightValue(s)),r.tooltipFormat?i.format(Rn(n,o),r.tooltipFormat):"string"==typeof o?o:i.format(Rn(n,o),r.displayFormats.datetime)},tickFormatFunction:function(t,e,n,i){var a=this,r=a._adapter,o=a.options,s=o.time.displayFormats,l=s[a._unit],u=a._majorUnit,d=s[u],h=+r.startOf(t,u),c=o.ticks.major,f=c.enabled&&u&&d&&t===h,g=r.format(t,i||(f?d:l)),m=f?c:o.ticks.minor,p=Dn(m.callback,m.userCallback);return p?p(g,e,n):g},convertTicksToLabels:function(t){var e,n,i=[];for(e=0,n=t.length;e<n;++e)i.push(this.tickFormatFunction(t[e].value,e,t));return i},getPixelForOffset:function(t){var e=this,n=e.options.ticks.reverse,i=e._horizontal?e.width:e.height,a=e._horizontal?n?e.right:e.left:n?e.bottom:e.top,r=Fn(e._table,"time",t,"pos"),o=i*(e._offsets.start+r)/(e._offsets.start+1+e._offsets.end);return n?a-o:a+o},getPixelForValue:function(t,e,n){var i=this,a=null;if(void 0!==e&&void 0!==n&&(a=i._timestamps.datasets[n][e]),null===a&&(a=Ln(i,t)),null!==a)return i.getPixelForOffset(a)},getPixelForTick:function(t){var e=this.getTicks();return t>=0&&t<e.length?this.getPixelForOffset(e[t].value):null},getValueForPixel:function(t){var e=this,n=e._horizontal?e.width:e.height,i=Fn(e._table,"pos",(n?(t-(e._horizontal?e.left:e.top))/n:0)*(e._offsets.start+1+e._offsets.start)-e._offsets.end,"time");return e._adapter._create(i)},getLabelWidth:function(t){var e=this.options.ticks,n=this.ctx.measureText(t).width,i=ut.toRadians(e.maxRotation),a=Math.cos(i),r=Math.sin(i);return n*a+Dn(e.fontSize,ot.global.defaultFontSize)*r},getLabelCapacity:function(t){var e=this,n=e.tickFormatFunction(t,0,[],e.options.time.displayFormats.millisecond),i=e.getLabelWidth(n),a=e.isHorizontal()?e.width:e.height,r=Math.floor(a/i);return r>0?r:1}});Yn._defaults={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,format:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};var Nn={category:rn,linear:un,logarithmic:fn,radialLinear:Sn,time:Yn},zn=function(t,e){return function(t,e){t.exports=function(){var e,n;function i(){return e.apply(null,arguments)}function a(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function r(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function o(t){return void 0===t}function s(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function l(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function u(t,e){var n,i=[];for(n=0;n<t.length;++n)i.push(e(t[n],n));return i}function d(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function h(t,e){for(var n in e)d(e,n)&&(t[n]=e[n]);return d(e,"toString")&&(t.toString=e.toString),d(e,"valueOf")&&(t.valueOf=e.valueOf),t}function c(t,e,n,i){return we(t,e,n,i,!0).utc()}function f(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function g(t){if(null==t._isValid){var e=f(t),i=n.call(e.parsedDateParts,(function(t){return null!=t})),a=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&i);if(t._strict&&(a=a&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return a;t._isValid=a}return t._isValid}function m(t){var e=c(NaN);return null!=t?h(f(e),t):f(e).userInvalidated=!0,e}n=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),n=e.length>>>0,i=0;i<n;i++)if(i in e&&t.call(this,e[i],i,e))return!0;return!1};var p=i.momentProperties=[];function v(t,e){var n,i,a;if(o(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),o(e._i)||(t._i=e._i),o(e._f)||(t._f=e._f),o(e._l)||(t._l=e._l),o(e._strict)||(t._strict=e._strict),o(e._tzm)||(t._tzm=e._tzm),o(e._isUTC)||(t._isUTC=e._isUTC),o(e._offset)||(t._offset=e._offset),o(e._pf)||(t._pf=f(e)),o(e._locale)||(t._locale=e._locale),p.length>0)for(n=0;n<p.length;n++)o(a=e[i=p[n]])||(t[i]=a);return t}var y=!1;function b(t){v(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===y&&(y=!0,i.updateOffset(this),y=!1)}function x(t){return t instanceof b||null!=t&&null!=t._isAMomentObject}function _(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function k(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=_(e)),n}function w(t,e,n){var i,a=Math.min(t.length,e.length),r=Math.abs(t.length-e.length),o=0;for(i=0;i<a;i++)(n&&t[i]!==e[i]||!n&&k(t[i])!==k(e[i]))&&o++;return o+r}function M(t){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function S(t,e){var n=!0;return h((function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,t),n){for(var a,r=[],o=0;o<arguments.length;o++){if(a="","object"==typeof arguments[o]){for(var s in a+="\n["+o+"] ",arguments[0])a+=s+": "+arguments[0][s]+", ";a=a.slice(0,-2)}else a=arguments[o];r.push(a)}M(t+"\nArguments: "+Array.prototype.slice.call(r).join("")+"\n"+(new Error).stack),n=!1}return e.apply(this,arguments)}),e)}var D,C={};function P(t,e){null!=i.deprecationHandler&&i.deprecationHandler(t,e),C[t]||(M(e),C[t]=!0)}function T(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function O(t,e){var n,i=h({},t);for(n in e)d(e,n)&&(r(t[n])&&r(e[n])?(i[n]={},h(i[n],t[n]),h(i[n],e[n])):null!=e[n]?i[n]=e[n]:delete i[n]);for(n in t)d(t,n)&&!d(e,n)&&r(t[n])&&(i[n]=h({},i[n]));return i}function I(t){null!=t&&this.set(t)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,D=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)d(t,e)&&n.push(e);return n};var A={};function F(t,e){var n=t.toLowerCase();A[n]=A[n+"s"]=A[e]=t}function R(t){return"string"==typeof t?A[t]||A[t.toLowerCase()]:void 0}function L(t){var e,n,i={};for(n in t)d(t,n)&&(e=R(n))&&(i[e]=t[n]);return i}var W={};function Y(t,e){W[t]=e}function N(t,e,n){var i=""+Math.abs(t);return(t>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,e-i.length)).toString().substr(1)+i}var z=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,V=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,H={},E={};function B(t,e,n,i){var a=i;"string"==typeof i&&(a=function(){return this[i]()}),t&&(E[t]=a),e&&(E[e[0]]=function(){return N(a.apply(this,arguments),e[1],e[2])}),n&&(E[n]=function(){return this.localeData().ordinal(a.apply(this,arguments),t)})}function j(t,e){return t.isValid()?(e=U(e,t.localeData()),H[e]=H[e]||function(t){var e,n,i,a=t.match(z);for(e=0,n=a.length;e<n;e++)a[e]=E[a[e]]?E[a[e]]:(i=a[e]).match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"");return function(e){var i,r="";for(i=0;i<n;i++)r+=T(a[i])?a[i].call(e,t):a[i];return r}}(e),H[e](t)):t.localeData().invalidDate()}function U(t,e){var n=5;function i(t){return e.longDateFormat(t)||t}for(V.lastIndex=0;n>=0&&V.test(t);)t=t.replace(V,i),V.lastIndex=0,n-=1;return t}var G=/\d/,q=/\d\d/,Z=/\d{3}/,$=/\d{4}/,X=/[+-]?\d{6}/,J=/\d\d?/,K=/\d\d\d\d?/,Q=/\d\d\d\d\d\d?/,tt=/\d{1,3}/,et=/\d{1,4}/,nt=/[+-]?\d{1,6}/,it=/\d+/,at=/[+-]?\d+/,rt=/Z|[+-]\d\d:?\d\d/gi,ot=/Z|[+-]\d\d(?::?\d\d)?/gi,st=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,lt={};function ut(t,e,n){lt[t]=T(e)?e:function(t,i){return t&&n?n:e}}function dt(t,e){return d(lt,t)?lt[t](e._strict,e._locale):new RegExp(ht(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,n,i,a){return e||n||i||a}))))}function ht(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var ct={};function ft(t,e){var n,i=e;for("string"==typeof t&&(t=[t]),s(e)&&(i=function(t,n){n[e]=k(t)}),n=0;n<t.length;n++)ct[t[n]]=i}function gt(t,e){ft(t,(function(t,n,i,a){i._w=i._w||{},e(t,i._w,i,a)}))}function mt(t,e,n){null!=e&&d(ct,t)&&ct[t](e,n._a,n,t)}function pt(t){return vt(t)?366:365}function vt(t){return t%4==0&&t%100!=0||t%400==0}B("Y",0,0,(function(){var t=this.year();return t<=9999?""+t:"+"+t})),B(0,["YY",2],0,(function(){return this.year()%100})),B(0,["YYYY",4],0,"year"),B(0,["YYYYY",5],0,"year"),B(0,["YYYYYY",6,!0],0,"year"),F("year","y"),Y("year",1),ut("Y",at),ut("YY",J,q),ut("YYYY",et,$),ut("YYYYY",nt,X),ut("YYYYYY",nt,X),ft(["YYYYY","YYYYYY"],0),ft("YYYY",(function(t,e){e[0]=2===t.length?i.parseTwoDigitYear(t):k(t)})),ft("YY",(function(t,e){e[0]=i.parseTwoDigitYear(t)})),ft("Y",(function(t,e){e[0]=parseInt(t,10)})),i.parseTwoDigitYear=function(t){return k(t)+(k(t)>68?1900:2e3)};var yt,bt=xt("FullYear",!0);function xt(t,e){return function(n){return null!=n?(kt(this,t,n),i.updateOffset(this,e),this):_t(this,t)}}function _t(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function kt(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&vt(t.year())&&1===t.month()&&29===t.date()?t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),wt(n,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](n))}function wt(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=function(t,e){return(t%e+e)%e}(e,12);return t+=(e-n)/12,1===n?vt(t)?29:28:31-n%7%2}yt=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},B("M",["MM",2],"Mo",(function(){return this.month()+1})),B("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),B("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),F("month","M"),Y("month",8),ut("M",J),ut("MM",J,q),ut("MMM",(function(t,e){return e.monthsShortRegex(t)})),ut("MMMM",(function(t,e){return e.monthsRegex(t)})),ft(["M","MM"],(function(t,e){e[1]=k(t)-1})),ft(["MMM","MMMM"],(function(t,e,n,i){var a=n._locale.monthsParse(t,i,n._strict);null!=a?e[1]=a:f(n).invalidMonth=t}));var Mt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,St="January_February_March_April_May_June_July_August_September_October_November_December".split("_");var Dt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Ct(t,e,n){var i,a,r,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)r=c([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===e?-1!==(a=yt.call(this._shortMonthsParse,o))?a:null:-1!==(a=yt.call(this._longMonthsParse,o))?a:null:"MMM"===e?-1!==(a=yt.call(this._shortMonthsParse,o))||-1!==(a=yt.call(this._longMonthsParse,o))?a:null:-1!==(a=yt.call(this._longMonthsParse,o))||-1!==(a=yt.call(this._shortMonthsParse,o))?a:null}function Pt(t,e){var n;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=k(e);else if(!s(e=t.localeData().monthsParse(e)))return t;return n=Math.min(t.date(),wt(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function Tt(t){return null!=t?(Pt(this,t),i.updateOffset(this,!0),this):_t(this,"Month")}var Ot=st;var It=st;function At(){function t(t,e){return e.length-t.length}var e,n,i=[],a=[],r=[];for(e=0;e<12;e++)n=c([2e3,e]),i.push(this.monthsShort(n,"")),a.push(this.months(n,"")),r.push(this.months(n,"")),r.push(this.monthsShort(n,""));for(i.sort(t),a.sort(t),r.sort(t),e=0;e<12;e++)i[e]=ht(i[e]),a[e]=ht(a[e]);for(e=0;e<24;e++)r[e]=ht(r[e]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function Ft(t,e,n,i,a,r,o){var s;return t<100&&t>=0?(s=new Date(t+400,e,n,i,a,r,o),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,n,i,a,r,o),s}function Rt(t){var e;if(t<100&&t>=0){var n=Array.prototype.slice.call(arguments);n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)}else e=new Date(Date.UTC.apply(null,arguments));return e}function Lt(t,e,n){var i=7+e-n;return-(7+Rt(t,0,i).getUTCDay()-e)%7+i-1}function Wt(t,e,n,i,a){var r,o,s=1+7*(e-1)+(7+n-i)%7+Lt(t,i,a);return s<=0?o=pt(r=t-1)+s:s>pt(t)?(r=t+1,o=s-pt(t)):(r=t,o=s),{year:r,dayOfYear:o}}function Yt(t,e,n){var i,a,r=Lt(t.year(),e,n),o=Math.floor((t.dayOfYear()-r-1)/7)+1;return o<1?i=o+Nt(a=t.year()-1,e,n):o>Nt(t.year(),e,n)?(i=o-Nt(t.year(),e,n),a=t.year()+1):(a=t.year(),i=o),{week:i,year:a}}function Nt(t,e,n){var i=Lt(t,e,n),a=Lt(t+1,e,n);return(pt(t)-i+a)/7}B("w",["ww",2],"wo","week"),B("W",["WW",2],"Wo","isoWeek"),F("week","w"),F("isoWeek","W"),Y("week",5),Y("isoWeek",5),ut("w",J),ut("ww",J,q),ut("W",J),ut("WW",J,q),gt(["w","ww","W","WW"],(function(t,e,n,i){e[i.substr(0,1)]=k(t)}));function zt(t,e){return t.slice(e,7).concat(t.slice(0,e))}B("d",0,"do","day"),B("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),B("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),B("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),B("e",0,0,"weekday"),B("E",0,0,"isoWeekday"),F("day","d"),F("weekday","e"),F("isoWeekday","E"),Y("day",11),Y("weekday",11),Y("isoWeekday",11),ut("d",J),ut("e",J),ut("E",J),ut("dd",(function(t,e){return e.weekdaysMinRegex(t)})),ut("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),ut("dddd",(function(t,e){return e.weekdaysRegex(t)})),gt(["dd","ddd","dddd"],(function(t,e,n,i){var a=n._locale.weekdaysParse(t,i,n._strict);null!=a?e.d=a:f(n).invalidWeekday=t})),gt(["d","e","E"],(function(t,e,n,i){e[i]=k(t)}));var Vt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Ht="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Et="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Bt(t,e,n){var i,a,r,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)r=c([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(a=yt.call(this._weekdaysParse,o))?a:null:"ddd"===e?-1!==(a=yt.call(this._shortWeekdaysParse,o))?a:null:-1!==(a=yt.call(this._minWeekdaysParse,o))?a:null:"dddd"===e?-1!==(a=yt.call(this._weekdaysParse,o))||-1!==(a=yt.call(this._shortWeekdaysParse,o))||-1!==(a=yt.call(this._minWeekdaysParse,o))?a:null:"ddd"===e?-1!==(a=yt.call(this._shortWeekdaysParse,o))||-1!==(a=yt.call(this._weekdaysParse,o))||-1!==(a=yt.call(this._minWeekdaysParse,o))?a:null:-1!==(a=yt.call(this._minWeekdaysParse,o))||-1!==(a=yt.call(this._weekdaysParse,o))||-1!==(a=yt.call(this._shortWeekdaysParse,o))?a:null}var jt=st;var Ut=st;var Gt=st;function qt(){function t(t,e){return e.length-t.length}var e,n,i,a,r,o=[],s=[],l=[],u=[];for(e=0;e<7;e++)n=c([2e3,1]).day(e),i=this.weekdaysMin(n,""),a=this.weekdaysShort(n,""),r=this.weekdays(n,""),o.push(i),s.push(a),l.push(r),u.push(i),u.push(a),u.push(r);for(o.sort(t),s.sort(t),l.sort(t),u.sort(t),e=0;e<7;e++)s[e]=ht(s[e]),l[e]=ht(l[e]),u[e]=ht(u[e]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Zt(){return this.hours()%12||12}function $t(t,e){B(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function Xt(t,e){return e._meridiemParse}B("H",["HH",2],0,"hour"),B("h",["hh",2],0,Zt),B("k",["kk",2],0,(function(){return this.hours()||24})),B("hmm",0,0,(function(){return""+Zt.apply(this)+N(this.minutes(),2)})),B("hmmss",0,0,(function(){return""+Zt.apply(this)+N(this.minutes(),2)+N(this.seconds(),2)})),B("Hmm",0,0,(function(){return""+this.hours()+N(this.minutes(),2)})),B("Hmmss",0,0,(function(){return""+this.hours()+N(this.minutes(),2)+N(this.seconds(),2)})),$t("a",!0),$t("A",!1),F("hour","h"),Y("hour",13),ut("a",Xt),ut("A",Xt),ut("H",J),ut("h",J),ut("k",J),ut("HH",J,q),ut("hh",J,q),ut("kk",J,q),ut("hmm",K),ut("hmmss",Q),ut("Hmm",K),ut("Hmmss",Q),ft(["H","HH"],3),ft(["k","kk"],(function(t,e,n){var i=k(t);e[3]=24===i?0:i})),ft(["a","A"],(function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t})),ft(["h","hh"],(function(t,e,n){e[3]=k(t),f(n).bigHour=!0})),ft("hmm",(function(t,e,n){var i=t.length-2;e[3]=k(t.substr(0,i)),e[4]=k(t.substr(i)),f(n).bigHour=!0})),ft("hmmss",(function(t,e,n){var i=t.length-4,a=t.length-2;e[3]=k(t.substr(0,i)),e[4]=k(t.substr(i,2)),e[5]=k(t.substr(a)),f(n).bigHour=!0})),ft("Hmm",(function(t,e,n){var i=t.length-2;e[3]=k(t.substr(0,i)),e[4]=k(t.substr(i))})),ft("Hmmss",(function(t,e,n){var i=t.length-4,a=t.length-2;e[3]=k(t.substr(0,i)),e[4]=k(t.substr(i,2)),e[5]=k(t.substr(a))}));var Jt,Kt=xt("Hours",!0),Qt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:St,monthsShort:Dt,week:{dow:0,doy:6},weekdays:Vt,weekdaysMin:Et,weekdaysShort:Ht,meridiemParse:/[ap]\.?m?\.?/i},te={},ee={};function ne(t){return t?t.toLowerCase().replace("_","-"):t}function ie(e){var n=null;if(!te[e]&&t&&t.exports)try{n=Jt._abbr,function(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}(),ae(n)}catch(i){}return te[e]}function ae(t,e){var n;return t&&((n=o(e)?oe(t):re(t,e))?Jt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),Jt._abbr}function re(t,e){if(null!==e){var n,i=Qt;if(e.abbr=t,null!=te[t])P("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=te[t]._config;else if(null!=e.parentLocale)if(null!=te[e.parentLocale])i=te[e.parentLocale]._config;else{if(null==(n=ie(e.parentLocale)))return ee[e.parentLocale]||(ee[e.parentLocale]=[]),ee[e.parentLocale].push({name:t,config:e}),null;i=n._config}return te[t]=new I(O(i,e)),ee[t]&&ee[t].forEach((function(t){re(t.name,t.config)})),ae(t),te[t]}return delete te[t],null}function oe(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Jt;if(!a(t)){if(e=ie(t))return e;t=[t]}return function(t){for(var e,n,i,a,r=0;r<t.length;){for(e=(a=ne(t[r]).split("-")).length,n=(n=ne(t[r+1]))?n.split("-"):null;e>0;){if(i=ie(a.slice(0,e).join("-")))return i;if(n&&n.length>=e&&w(a,n,!0)>=e-1)break;e--}r++}return Jt}(t)}function se(t){var e,n=t._a;return n&&-2===f(t).overflow&&(e=n[1]<0||n[1]>11?1:n[2]<1||n[2]>wt(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,f(t)._overflowDayOfYear&&(e<0||e>2)&&(e=2),f(t)._overflowWeeks&&-1===e&&(e=7),f(t)._overflowWeekday&&-1===e&&(e=8),f(t).overflow=e),t}function le(t,e,n){return null!=t?t:null!=e?e:n}function ue(t){var e,n,a,r,o,s=[];if(!t._d){for(a=function(t){var e=new Date(i.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}(t),t._w&&null==t._a[2]&&null==t._a[1]&&function(t){var e,n,i,a,r,o,s,l;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)r=1,o=4,n=le(e.GG,t._a[0],Yt(Me(),1,4).year),i=le(e.W,1),((a=le(e.E,1))<1||a>7)&&(l=!0);else{r=t._locale._week.dow,o=t._locale._week.doy;var u=Yt(Me(),r,o);n=le(e.gg,t._a[0],u.year),i=le(e.w,u.week),null!=e.d?((a=e.d)<0||a>6)&&(l=!0):null!=e.e?(a=e.e+r,(e.e<0||e.e>6)&&(l=!0)):a=r}i<1||i>Nt(n,r,o)?f(t)._overflowWeeks=!0:null!=l?f(t)._overflowWeekday=!0:(s=Wt(n,i,a,r,o),t._a[0]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(o=le(t._a[0],a[0]),(t._dayOfYear>pt(o)||0===t._dayOfYear)&&(f(t)._overflowDayOfYear=!0),n=Rt(o,0,t._dayOfYear),t._a[1]=n.getUTCMonth(),t._a[2]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=a[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[3]&&0===t._a[4]&&0===t._a[5]&&0===t._a[6]&&(t._nextDay=!0,t._a[3]=0),t._d=(t._useUTC?Rt:Ft).apply(null,s),r=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[3]=24),t._w&&void 0!==t._w.d&&t._w.d!==r&&(f(t).weekdayMismatch=!0)}}var de=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,he=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ce=/Z|[+-]\d\d(?::?\d\d)?/,fe=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],ge=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],me=/^\/?Date\((\-?\d+)/i;function pe(t){var e,n,i,a,r,o,s=t._i,l=de.exec(s)||he.exec(s);if(l){for(f(t).iso=!0,e=0,n=fe.length;e<n;e++)if(fe[e][1].exec(l[1])){a=fe[e][0],i=!1!==fe[e][2];break}if(null==a)return void(t._isValid=!1);if(l[3]){for(e=0,n=ge.length;e<n;e++)if(ge[e][1].exec(l[3])){r=(l[2]||" ")+ge[e][0];break}if(null==r)return void(t._isValid=!1)}if(!i&&null!=r)return void(t._isValid=!1);if(l[4]){if(!ce.exec(l[4]))return void(t._isValid=!1);o="Z"}t._f=a+(r||"")+(o||""),_e(t)}else t._isValid=!1}var ve=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;function ye(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}var be={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function xe(t){var e,n,i,a,r,o,s=ve.exec(t._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(s){var l=(e=s[3],n=s[2],i=s[5],a=s[6],r=s[7],o=[ye(s[4]),Dt.indexOf(e),parseInt(n,10),parseInt(i,10),parseInt(a,10)],r&&o.push(parseInt(r,10)),o);if(!function(t,e,n){return!t||Ht.indexOf(t)===new Date(e[0],e[1],e[2]).getDay()||(f(n).weekdayMismatch=!0,n._isValid=!1,!1)}(s[1],l,t))return;t._a=l,t._tzm=function(t,e,n){if(t)return be[t];if(e)return 0;var i=parseInt(n,10),a=i%100;return(i-a)/100*60+a}(s[8],s[9],s[10]),t._d=Rt.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),f(t).rfc2822=!0}else t._isValid=!1}function _e(t){if(t._f!==i.ISO_8601)if(t._f!==i.RFC_2822){t._a=[],f(t).empty=!0;var e,n,a,r,o,s=""+t._i,l=s.length,u=0;for(a=U(t._f,t._locale).match(z)||[],e=0;e<a.length;e++)(n=(s.match(dt(r=a[e],t))||[])[0])&&((o=s.substr(0,s.indexOf(n))).length>0&&f(t).unusedInput.push(o),s=s.slice(s.indexOf(n)+n.length),u+=n.length),E[r]?(n?f(t).empty=!1:f(t).unusedTokens.push(r),mt(r,n,t)):t._strict&&!n&&f(t).unusedTokens.push(r);f(t).charsLeftOver=l-u,s.length>0&&f(t).unusedInput.push(s),t._a[3]<=12&&!0===f(t).bigHour&&t._a[3]>0&&(f(t).bigHour=void 0),f(t).parsedDateParts=t._a.slice(0),f(t).meridiem=t._meridiem,t._a[3]=function(t,e,n){var i;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?((i=t.isPM(n))&&e<12&&(e+=12),i||12!==e||(e=0),e):e}(t._locale,t._a[3],t._meridiem),ue(t),se(t)}else xe(t);else pe(t)}function ke(t){var e=t._i,n=t._f;return t._locale=t._locale||oe(t._l),null===e||void 0===n&&""===e?m({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),x(e)?new b(se(e)):(l(e)?t._d=e:a(n)?function(t){var e,n,i,a,r;if(0===t._f.length)return f(t).invalidFormat=!0,void(t._d=new Date(NaN));for(a=0;a<t._f.length;a++)r=0,e=v({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[a],_e(e),g(e)&&(r+=f(e).charsLeftOver,r+=10*f(e).unusedTokens.length,f(e).score=r,(null==i||r<i)&&(i=r,n=e));h(t,n||e)}(t):n?_e(t):function(t){var e=t._i;o(e)?t._d=new Date(i.now()):l(e)?t._d=new Date(e.valueOf()):"string"==typeof e?function(t){var e=me.exec(t._i);null===e?(pe(t),!1===t._isValid&&(delete t._isValid,xe(t),!1===t._isValid&&(delete t._isValid,i.createFromInputFallback(t)))):t._d=new Date(+e[1])}(t):a(e)?(t._a=u(e.slice(0),(function(t){return parseInt(t,10)})),ue(t)):r(e)?function(t){if(!t._d){var e=L(t._i);t._a=u([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],(function(t){return t&&parseInt(t,10)})),ue(t)}}(t):s(e)?t._d=new Date(e):i.createFromInputFallback(t)}(t),g(t)||(t._d=null),t))}function we(t,e,n,i,o){var s,l={};return!0!==n&&!1!==n||(i=n,n=void 0),(r(t)&&function(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(t.hasOwnProperty(e))return!1;return!0}(t)||a(t)&&0===t.length)&&(t=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=o,l._l=n,l._i=t,l._f=e,l._strict=i,(s=new b(se(ke(l))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function Me(t,e,n,i){return we(t,e,n,i,!1)}i.createFromInputFallback=S("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))})),i.ISO_8601=function(){},i.RFC_2822=function(){};var Se=S("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=Me.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:m()})),De=S("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=Me.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:m()}));function Ce(t,e){var n,i;if(1===e.length&&a(e[0])&&(e=e[0]),!e.length)return Me();for(n=e[0],i=1;i<e.length;++i)e[i].isValid()&&!e[i][t](n)||(n=e[i]);return n}var Pe=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Te(t){var e=L(t),n=e.year||0,i=e.quarter||0,a=e.month||0,r=e.week||e.isoWeek||0,o=e.day||0,s=e.hour||0,l=e.minute||0,u=e.second||0,d=e.millisecond||0;this._isValid=function(t){for(var e in t)if(-1===yt.call(Pe,e)||null!=t[e]&&isNaN(t[e]))return!1;for(var n=!1,i=0;i<Pe.length;++i)if(t[Pe[i]]){if(n)return!1;parseFloat(t[Pe[i]])!==k(t[Pe[i]])&&(n=!0)}return!0}(e),this._milliseconds=+d+1e3*u+6e4*l+1e3*s*60*60,this._days=+o+7*r,this._months=+a+3*i+12*n,this._data={},this._locale=oe(),this._bubble()}function Oe(t){return t instanceof Te}function Ie(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Ae(t,e){B(t,0,0,(function(){var t=this.utcOffset(),n="+";return t<0&&(t=-t,n="-"),n+N(~~(t/60),2)+e+N(~~t%60,2)}))}Ae("Z",":"),Ae("ZZ",""),ut("Z",ot),ut("ZZ",ot),ft(["Z","ZZ"],(function(t,e,n){n._useUTC=!0,n._tzm=Re(ot,t)}));var Fe=/([\+\-]|\d\d)/gi;function Re(t,e){var n=(e||"").match(t);if(null===n)return null;var i=((n[n.length-1]||[])+"").match(Fe)||["-",0,0],a=60*i[1]+k(i[2]);return 0===a?0:"+"===i[0]?a:-a}function Le(t,e){var n,a;return e._isUTC?(n=e.clone(),a=(x(t)||l(t)?t.valueOf():Me(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+a),i.updateOffset(n,!1),n):Me(t).local()}function We(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Ye(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var Ne=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,ze=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ve(t,e){var n,i,a,r,o,l,u=t,h=null;return Oe(t)?u={ms:t._milliseconds,d:t._days,M:t._months}:s(t)?(u={},e?u[e]=t:u.milliseconds=t):(h=Ne.exec(t))?(n="-"===h[1]?-1:1,u={y:0,d:k(h[2])*n,h:k(h[3])*n,m:k(h[4])*n,s:k(h[5])*n,ms:k(Ie(1e3*h[6]))*n}):(h=ze.exec(t))?u={y:He(h[2],n="-"===h[1]?-1:1),M:He(h[3],n),w:He(h[4],n),d:He(h[5],n),h:He(h[6],n),m:He(h[7],n),s:He(h[8],n)}:null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(r=Me(u.from),o=Me(u.to),a=r.isValid()&&o.isValid()?(o=Le(o,r),r.isBefore(o)?l=Ee(r,o):((l=Ee(o,r)).milliseconds=-l.milliseconds,l.months=-l.months),l):{milliseconds:0,months:0},(u={}).ms=a.milliseconds,u.M=a.months),i=new Te(u),Oe(t)&&d(t,"_locale")&&(i._locale=t._locale),i}function He(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Ee(t,e){var n={};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function Be(t,e){return function(n,i){var a;return null===i||isNaN(+i)||(P(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=i,i=a),je(this,Ve(n="string"==typeof n?+n:n,i),t),this}}function je(t,e,n,a){var r=e._milliseconds,o=Ie(e._days),s=Ie(e._months);t.isValid()&&(a=null==a||a,s&&Pt(t,_t(t,"Month")+s*n),o&&kt(t,"Date",_t(t,"Date")+o*n),r&&t._d.setTime(t._d.valueOf()+r*n),a&&i.updateOffset(t,o||s))}Ve.fn=Te.prototype,Ve.invalid=function(){return Ve(NaN)};var Ue=Be(1,"add"),Ge=Be(-1,"subtract");function qe(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),i=t.clone().add(n,"months");return-(n+(e-i<0?(e-i)/(i-t.clone().add(n-1,"months")):(e-i)/(t.clone().add(n+1,"months")-i)))||0}function Ze(t){var e;return void 0===t?this._locale._abbr:(null!=(e=oe(t))&&(this._locale=e),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var $e=S("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(t){return void 0===t?this.localeData():this.locale(t)}));function Xe(){return this._locale}var Je=1e3,Ke=6e4,Qe=36e5,tn=126227808e5;function en(t,e){return(t%e+e)%e}function nn(t,e,n){return t<100&&t>=0?new Date(t+400,e,n)-tn:new Date(t,e,n).valueOf()}function an(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-tn:Date.UTC(t,e,n)}function rn(t,e){B(0,[t,t.length],0,e)}function on(t,e,n,i,a){var r;return null==t?Yt(this,i,a).year:(e>(r=Nt(t,i,a))&&(e=r),sn.call(this,t,e,n,i,a))}function sn(t,e,n,i,a){var r=Wt(t,e,n,i,a),o=Rt(r.year,0,r.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}B(0,["gg",2],0,(function(){return this.weekYear()%100})),B(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),rn("gggg","weekYear"),rn("ggggg","weekYear"),rn("GGGG","isoWeekYear"),rn("GGGGG","isoWeekYear"),F("weekYear","gg"),F("isoWeekYear","GG"),Y("weekYear",1),Y("isoWeekYear",1),ut("G",at),ut("g",at),ut("GG",J,q),ut("gg",J,q),ut("GGGG",et,$),ut("gggg",et,$),ut("GGGGG",nt,X),ut("ggggg",nt,X),gt(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,n,i){e[i.substr(0,2)]=k(t)})),gt(["gg","GG"],(function(t,e,n,a){e[a]=i.parseTwoDigitYear(t)})),B("Q",0,"Qo","quarter"),F("quarter","Q"),Y("quarter",7),ut("Q",G),ft("Q",(function(t,e){e[1]=3*(k(t)-1)})),B("D",["DD",2],"Do","date"),F("date","D"),Y("date",9),ut("D",J),ut("DD",J,q),ut("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),ft(["D","DD"],2),ft("Do",(function(t,e){e[2]=k(t.match(J)[0])}));var ln=xt("Date",!0);B("DDD",["DDDD",3],"DDDo","dayOfYear"),F("dayOfYear","DDD"),Y("dayOfYear",4),ut("DDD",tt),ut("DDDD",Z),ft(["DDD","DDDD"],(function(t,e,n){n._dayOfYear=k(t)})),B("m",["mm",2],0,"minute"),F("minute","m"),Y("minute",14),ut("m",J),ut("mm",J,q),ft(["m","mm"],4);var un=xt("Minutes",!1);B("s",["ss",2],0,"second"),F("second","s"),Y("second",15),ut("s",J),ut("ss",J,q),ft(["s","ss"],5);var dn,hn=xt("Seconds",!1);for(B("S",0,0,(function(){return~~(this.millisecond()/100)})),B(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),B(0,["SSS",3],0,"millisecond"),B(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),B(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),B(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),B(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),B(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),B(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),F("millisecond","ms"),Y("millisecond",16),ut("S",tt,G),ut("SS",tt,q),ut("SSS",tt,Z),dn="SSSS";dn.length<=9;dn+="S")ut(dn,it);function cn(t,e){e[6]=k(1e3*("0."+t))}for(dn="S";dn.length<=9;dn+="S")ft(dn,cn);var fn=xt("Milliseconds",!1);B("z",0,0,"zoneAbbr"),B("zz",0,0,"zoneName");var gn=b.prototype;function mn(t){return t}gn.add=Ue,gn.calendar=function(t,e){var n=t||Me(),a=Le(n,this).startOf("day"),r=i.calendarFormat(this,a)||"sameElse",o=e&&(T(e[r])?e[r].call(this,n):e[r]);return this.format(o||this.localeData().calendar(r,this,Me(n)))},gn.clone=function(){return new b(this)},gn.diff=function(t,e,n){var i,a,r;if(!this.isValid())return NaN;if(!(i=Le(t,this)).isValid())return NaN;switch(a=6e4*(i.utcOffset()-this.utcOffset()),e=R(e)){case"year":r=qe(this,i)/12;break;case"month":r=qe(this,i);break;case"quarter":r=qe(this,i)/3;break;case"second":r=(this-i)/1e3;break;case"minute":r=(this-i)/6e4;break;case"hour":r=(this-i)/36e5;break;case"day":r=(this-i-a)/864e5;break;case"week":r=(this-i-a)/6048e5;break;default:r=this-i}return n?r:_(r)},gn.endOf=function(t){var e;if(void 0===(t=R(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?an:nn;switch(t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=Qe-en(e+(this._isUTC?0:this.utcOffset()*Ke),Qe)-1;break;case"minute":e=this._d.valueOf(),e+=Ke-en(e,Ke)-1;break;case"second":e=this._d.valueOf(),e+=Je-en(e,Je)-1}return this._d.setTime(e),i.updateOffset(this,!0),this},gn.format=function(t){t||(t=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var e=j(this,t);return this.localeData().postformat(e)},gn.from=function(t,e){return this.isValid()&&(x(t)&&t.isValid()||Me(t).isValid())?Ve({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},gn.fromNow=function(t){return this.from(Me(),t)},gn.to=function(t,e){return this.isValid()&&(x(t)&&t.isValid()||Me(t).isValid())?Ve({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},gn.toNow=function(t){return this.to(Me(),t)},gn.get=function(t){return T(this[t=R(t)])?this[t]():this},gn.invalidAt=function(){return f(this).overflow},gn.isAfter=function(t,e){var n=x(t)?t:Me(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=R(e)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())},gn.isBefore=function(t,e){var n=x(t)?t:Me(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=R(e)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())},gn.isBetween=function(t,e,n,i){var a=x(t)?t:Me(t),r=x(e)?e:Me(e);return!!(this.isValid()&&a.isValid()&&r.isValid())&&("("===(i=i||"()")[0]?this.isAfter(a,n):!this.isBefore(a,n))&&(")"===i[1]?this.isBefore(r,n):!this.isAfter(r,n))},gn.isSame=function(t,e){var n,i=x(t)?t:Me(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=R(e)||"millisecond")?this.valueOf()===i.valueOf():(n=i.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))},gn.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},gn.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},gn.isValid=function(){return g(this)},gn.lang=$e,gn.locale=Ze,gn.localeData=Xe,gn.max=De,gn.min=Se,gn.parsingFlags=function(){return h({},f(this))},gn.set=function(t,e){if("object"==typeof t)for(var n=function(t){var e=[];for(var n in t)e.push({unit:n,priority:W[n]});return e.sort((function(t,e){return t.priority-e.priority})),e}(t=L(t)),i=0;i<n.length;i++)this[n[i].unit](t[n[i].unit]);else if(T(this[t=R(t)]))return this[t](e);return this},gn.startOf=function(t){var e;if(void 0===(t=R(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?an:nn;switch(t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=en(e+(this._isUTC?0:this.utcOffset()*Ke),Qe);break;case"minute":e=this._d.valueOf(),e-=en(e,Ke);break;case"second":e=this._d.valueOf(),e-=en(e,Je)}return this._d.setTime(e),i.updateOffset(this,!0),this},gn.subtract=Ge,gn.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},gn.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},gn.toDate=function(){return new Date(this.valueOf())},gn.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,n=e?this.clone().utc():this;return n.year()<0||n.year()>9999?j(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):T(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",j(n,"Z")):j(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},gn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var n="["+t+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY";return this.format(n+i+"-MM-DD[T]HH:mm:ss.SSS"+e+'[")]')},gn.toJSON=function(){return this.isValid()?this.toISOString():null},gn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},gn.unix=function(){return Math.floor(this.valueOf()/1e3)},gn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},gn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},gn.year=bt,gn.isLeapYear=function(){return vt(this.year())},gn.weekYear=function(t){return on.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},gn.isoWeekYear=function(t){return on.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},gn.quarter=gn.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},gn.month=Tt,gn.daysInMonth=function(){return wt(this.year(),this.month())},gn.week=gn.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},gn.isoWeek=gn.isoWeeks=function(t){var e=Yt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},gn.weeksInYear=function(){var t=this.localeData()._week;return Nt(this.year(),t.dow,t.doy)},gn.isoWeeksInYear=function(){return Nt(this.year(),1,4)},gn.date=ln,gn.day=gn.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=function(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}(t,this.localeData()),this.add(t-e,"d")):e},gn.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},gn.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=function(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7},gn.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},gn.hour=gn.hours=Kt,gn.minute=gn.minutes=un,gn.second=gn.seconds=hn,gn.millisecond=gn.milliseconds=fn,gn.utcOffset=function(t,e,n){var a,r=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=Re(ot,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(a=We(this)),this._offset=t,this._isUTC=!0,null!=a&&this.add(a,"m"),r!==t&&(!e||this._changeInProgress?je(this,Ve(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?r:We(this)},gn.utc=function(t){return this.utcOffset(0,t)},gn.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(We(this),"m")),this},gn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=Re(rt,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},gn.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?Me(t).utcOffset():0,(this.utcOffset()-t)%60==0)},gn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},gn.isLocal=function(){return!!this.isValid()&&!this._isUTC},gn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},gn.isUtc=Ye,gn.isUTC=Ye,gn.zoneAbbr=function(){return this._isUTC?"UTC":""},gn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},gn.dates=S("dates accessor is deprecated. Use date instead.",ln),gn.months=S("months accessor is deprecated. Use month instead",Tt),gn.years=S("years accessor is deprecated. Use year instead",bt),gn.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()})),gn.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!o(this._isDSTShifted))return this._isDSTShifted;var t={};if(v(t,this),(t=ke(t))._a){var e=t._isUTC?c(t._a):Me(t._a);this._isDSTShifted=this.isValid()&&w(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var pn=I.prototype;function vn(t,e,n,i){var a=oe(),r=c().set(i,e);return a[n](r,t)}function yn(t,e,n){if(s(t)&&(e=t,t=void 0),t=t||"",null!=e)return vn(t,e,n,"month");var i,a=[];for(i=0;i<12;i++)a[i]=vn(t,i,n,"month");return a}function bn(t,e,n,i){"boolean"==typeof t?(s(e)&&(n=e,e=void 0),e=e||""):(n=e=t,t=!1,s(e)&&(n=e,e=void 0),e=e||"");var a,r=oe(),o=t?r._week.dow:0;if(null!=n)return vn(e,(n+o)%7,i,"day");var l=[];for(a=0;a<7;a++)l[a]=vn(e,(a+o)%7,i,"day");return l}pn.calendar=function(t,e,n){var i=this._calendar[t]||this._calendar.sameElse;return T(i)?i.call(e,n):i},pn.longDateFormat=function(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,(function(t){return t.slice(1)})),this._longDateFormat[t])},pn.invalidDate=function(){return this._invalidDate},pn.ordinal=function(t){return this._ordinal.replace("%d",t)},pn.preparse=mn,pn.postformat=mn,pn.relativeTime=function(t,e,n,i){var a=this._relativeTime[n];return T(a)?a(t,e,n,i):a.replace(/%d/i,t)},pn.pastFuture=function(t,e){var n=this._relativeTime[t>0?"future":"past"];return T(n)?n(e):n.replace(/%s/i,e)},pn.set=function(t){var e,n;for(n in t)T(e=t[n])?this[n]=e:this["_"+n]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},pn.months=function(t,e){return t?a(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Mt).test(e)?"format":"standalone"][t.month()]:a(this._months)?this._months:this._months.standalone},pn.monthsShort=function(t,e){return t?a(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Mt.test(e)?"format":"standalone"][t.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},pn.monthsParse=function(t,e,n){var i,a,r;if(this._monthsParseExact)return Ct.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(a=c([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(r="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[i]=new RegExp(r.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[i].test(t))return i;if(n&&"MMM"===e&&this._shortMonthsParse[i].test(t))return i;if(!n&&this._monthsParse[i].test(t))return i}},pn.monthsRegex=function(t){return this._monthsParseExact?(d(this,"_monthsRegex")||At.call(this),t?this._monthsStrictRegex:this._monthsRegex):(d(this,"_monthsRegex")||(this._monthsRegex=It),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},pn.monthsShortRegex=function(t){return this._monthsParseExact?(d(this,"_monthsRegex")||At.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(d(this,"_monthsShortRegex")||(this._monthsShortRegex=Ot),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},pn.week=function(t){return Yt(t,this._week.dow,this._week.doy).week},pn.firstDayOfYear=function(){return this._week.doy},pn.firstDayOfWeek=function(){return this._week.dow},pn.weekdays=function(t,e){var n=a(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?zt(n,this._week.dow):t?n[t.day()]:n},pn.weekdaysMin=function(t){return!0===t?zt(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},pn.weekdaysShort=function(t){return!0===t?zt(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},pn.weekdaysParse=function(t,e,n){var i,a,r;if(this._weekdaysParseExact)return Bt.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(a=c([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(r="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[i]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[i].test(t))return i;if(n&&"ddd"===e&&this._shortWeekdaysParse[i].test(t))return i;if(n&&"dd"===e&&this._minWeekdaysParse[i].test(t))return i;if(!n&&this._weekdaysParse[i].test(t))return i}},pn.weekdaysRegex=function(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||qt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=jt),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},pn.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||qt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ut),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},pn.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||qt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Gt),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},pn.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},pn.meridiem=function(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"},ae("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===k(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),i.lang=S("moment.lang is deprecated. Use moment.locale instead.",ae),i.langData=S("moment.langData is deprecated. Use moment.localeData instead.",oe);var xn=Math.abs;function _n(t,e,n,i){var a=Ve(e,n);return t._milliseconds+=i*a._milliseconds,t._days+=i*a._days,t._months+=i*a._months,t._bubble()}function kn(t){return t<0?Math.floor(t):Math.ceil(t)}function wn(t){return 4800*t/146097}function Mn(t){return 146097*t/4800}function Sn(t){return function(){return this.as(t)}}var Dn=Sn("ms"),Cn=Sn("s"),Pn=Sn("m"),Tn=Sn("h"),On=Sn("d"),In=Sn("w"),An=Sn("M"),Fn=Sn("Q"),Rn=Sn("y");function Ln(t){return function(){return this.isValid()?this._data[t]:NaN}}var Wn=Ln("milliseconds"),Yn=Ln("seconds"),Nn=Ln("minutes"),zn=Ln("hours"),Vn=Ln("days"),Hn=Ln("months"),En=Ln("years");var Bn=Math.round,jn={ss:44,s:45,m:45,h:22,d:26,M:11};function Un(t,e,n,i,a){return a.relativeTime(e||1,!!n,t,i)}var Gn=Math.abs;function qn(t){return(t>0)-(t<0)||+t}function Zn(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n=Gn(this._milliseconds)/1e3,i=Gn(this._days),a=Gn(this._months);t=_(n/60),e=_(t/60),n%=60,t%=60;var r=_(a/12),o=a%=12,s=i,l=e,u=t,d=n?n.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var c=h<0?"-":"",f=qn(this._months)!==qn(h)?"-":"",g=qn(this._days)!==qn(h)?"-":"",m=qn(this._milliseconds)!==qn(h)?"-":"";return c+"P"+(r?f+r+"Y":"")+(o?f+o+"M":"")+(s?g+s+"D":"")+(l||u||d?"T":"")+(l?m+l+"H":"")+(u?m+u+"M":"")+(d?m+d+"S":"")}var $n=Te.prototype;return $n.isValid=function(){return this._isValid},$n.abs=function(){var t=this._data;return this._milliseconds=xn(this._milliseconds),this._days=xn(this._days),this._months=xn(this._months),t.milliseconds=xn(t.milliseconds),t.seconds=xn(t.seconds),t.minutes=xn(t.minutes),t.hours=xn(t.hours),t.months=xn(t.months),t.years=xn(t.years),this},$n.add=function(t,e){return _n(this,t,e,1)},$n.subtract=function(t,e){return _n(this,t,e,-1)},$n.as=function(t){if(!this.isValid())return NaN;var e,n,i=this._milliseconds;if("month"===(t=R(t))||"quarter"===t||"year"===t)switch(n=this._months+wn(e=this._days+i/864e5),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(Mn(this._months)),t){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return 24*e+i/36e5;case"minute":return 1440*e+i/6e4;case"second":return 86400*e+i/1e3;case"millisecond":return Math.floor(864e5*e)+i;default:throw new Error("Unknown unit "+t)}},$n.asMilliseconds=Dn,$n.asSeconds=Cn,$n.asMinutes=Pn,$n.asHours=Tn,$n.asDays=On,$n.asWeeks=In,$n.asMonths=An,$n.asQuarters=Fn,$n.asYears=Rn,$n.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},$n._bubble=function(){var t,e,n,i,a,r=this._milliseconds,o=this._days,s=this._months,l=this._data;return r>=0&&o>=0&&s>=0||r<=0&&o<=0&&s<=0||(r+=864e5*kn(Mn(s)+o),o=0,s=0),l.milliseconds=r%1e3,t=_(r/1e3),l.seconds=t%60,e=_(t/60),l.minutes=e%60,n=_(e/60),l.hours=n%24,o+=_(n/24),s+=a=_(wn(o)),o-=kn(Mn(a)),i=_(s/12),s%=12,l.days=o,l.months=s,l.years=i,this},$n.clone=function(){return Ve(this)},$n.get=function(t){return t=R(t),this.isValid()?this[t+"s"]():NaN},$n.milliseconds=Wn,$n.seconds=Yn,$n.minutes=Nn,$n.hours=zn,$n.days=Vn,$n.weeks=function(){return _(this.days()/7)},$n.months=Hn,$n.years=En,$n.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e=this.localeData(),n=function(t,e,n){var i=Ve(t).abs(),a=Bn(i.as("s")),r=Bn(i.as("m")),o=Bn(i.as("h")),s=Bn(i.as("d")),l=Bn(i.as("M")),u=Bn(i.as("y")),d=a<=jn.ss&&["s",a]||a<jn.s&&["ss",a]||r<=1&&["m"]||r<jn.m&&["mm",r]||o<=1&&["h"]||o<jn.h&&["hh",o]||s<=1&&["d"]||s<jn.d&&["dd",s]||l<=1&&["M"]||l<jn.M&&["MM",l]||u<=1&&["y"]||["yy",u];return d[2]=e,d[3]=+t>0,d[4]=n,Un.apply(null,d)}(this,!t,e);return t&&(n=e.pastFuture(+this,n)),e.postformat(n)},$n.toISOString=Zn,$n.toString=Zn,$n.toJSON=Zn,$n.locale=Ze,$n.localeData=Xe,$n.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Zn),$n.lang=$e,B("X",0,0,"unix"),B("x",0,0,"valueOf"),ut("x",at),ut("X",/[+-]?\d+(\.\d{1,3})?/),ft("X",(function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))})),ft("x",(function(t,e,n){n._d=new Date(k(t))})),i.version="2.24.0",e=Me,i.fn=gn,i.min=function(){return Ce("isBefore",[].slice.call(arguments,0))},i.max=function(){return Ce("isAfter",[].slice.call(arguments,0))},i.now=function(){return Date.now?Date.now():+new Date},i.utc=c,i.unix=function(t){return Me(1e3*t)},i.months=function(t,e){return yn(t,e,"months")},i.isDate=l,i.locale=ae,i.invalid=m,i.duration=Ve,i.isMoment=x,i.weekdays=function(t,e,n){return bn(t,e,n,"weekdays")},i.parseZone=function(){return Me.apply(null,arguments).parseZone()},i.localeData=oe,i.isDuration=Oe,i.monthsShort=function(t,e){return yn(t,e,"monthsShort")},i.weekdaysMin=function(t,e,n){return bn(t,e,n,"weekdaysMin")},i.defineLocale=re,i.updateLocale=function(t,e){if(null!=e){var n,i,a=Qt;null!=(i=ie(t))&&(a=i._config),(n=new I(e=O(a,e))).parentLocale=te[t],te[t]=n,ae(t)}else null!=te[t]&&(null!=te[t].parentLocale?te[t]=te[t].parentLocale:null!=te[t]&&delete te[t]);return te[t]},i.locales=function(){return D(te)},i.weekdaysShort=function(t,e,n){return bn(t,e,n,"weekdaysShort")},i.normalizeUnits=R,i.relativeTimeRounding=function(t){return void 0===t?Bn:"function"==typeof t&&(Bn=t,!0)},i.relativeTimeThreshold=function(t,e){return void 0!==jn[t]&&(void 0===e?jn[t]:(jn[t]=e,"s"===t&&(jn.ss=e-1),!0))},i.calendarFormat=function(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},i.prototype=gn,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i}()}(e={exports:{}}),e.exports}(),Vn={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};Je._date.override("function"==typeof zn?{_id:"moment",formats:function(){return Vn},parse:function(t,e){return"string"==typeof t&&"string"==typeof e?t=zn(t,e):t instanceof zn||(t=zn(t)),t.isValid()?t.valueOf():null},format:function(t,e){return zn(t).format(e)},add:function(t,e,n){return zn(t).add(e,n).valueOf()},diff:function(t,e,n){return zn.duration(zn(t).diff(zn(e))).as(n)},startOf:function(t,e,n){return t=zn(t),"isoWeek"===e?t.isoWeekday(n).valueOf():t.startOf(e).valueOf()},endOf:function(t,e){return zn(t).endOf(e).valueOf()},_create:function(t){return zn(t)}}:{}),ot._set("global",{plugins:{filler:{propagate:!0}}});var Hn={dataset:function(t){var e=t.fill,n=t.chart,i=n.getDatasetMeta(e),a=i&&n.isDatasetVisible(e)&&i.dataset._children||[],r=a.length||0;return r?function(t,e){return e<r&&a[e]._view||null}:null},boundary:function(t){var e=t.boundary,n=e?e.x:null,i=e?e.y:null;return function(t){return{x:null===n?t.x:n,y:null===i?t.y:i}}}};function En(t,e,n){var i,a=t._model||{},r=a.fill;if(void 0===r&&(r=!!a.backgroundColor),!1===r||null===r)return!1;if(!0===r)return"origin";if(i=parseFloat(r,10),isFinite(i)&&Math.floor(i)===i)return"-"!==r[0]&&"+"!==r[0]||(i=e+i),!(i===e||i<0||i>=n)&&i;switch(r){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return r;default:return!1}}function Bn(t){var e,n=t.el._model||{},i=t.el._scale||{},a=t.fill,r=null;if(isFinite(a))return null;if("start"===a?r=void 0===n.scaleBottom?i.bottom:n.scaleBottom:"end"===a?r=void 0===n.scaleTop?i.top:n.scaleTop:void 0!==n.scaleZero?r=n.scaleZero:i.getBasePosition?r=i.getBasePosition():i.getBasePixel&&(r=i.getBasePixel()),null!=r){if(void 0!==r.x&&void 0!==r.y)return r;if(ut.isFinite(r))return{x:(e=i.isHorizontal())?r:null,y:e?null:r}}return null}function jn(t,e,n){var i,a=t[e].fill,r=[e];if(!n)return a;for(;!1!==a&&-1===r.indexOf(a);){if(!isFinite(a))return a;if(!(i=t[a]))return!1;if(i.visible)return a;r.push(a),a=i.fill}return!1}function Un(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),Hn[n](t))}function Gn(t){return t&&!t.skip}function qn(t,e,n,i,a){var r;if(i&&a){for(t.moveTo(e[0].x,e[0].y),r=1;r<i;++r)ut.canvas.lineTo(t,e[r-1],e[r]);for(t.lineTo(n[a-1].x,n[a-1].y),r=a-1;r>0;--r)ut.canvas.lineTo(t,n[r],n[r-1],!0)}}var Zn={id:"filler",afterDatasetsUpdate:function(t,e){var n,i,a,r,o=(t.data.datasets||[]).length,s=e.propagate,l=[];for(i=0;i<o;++i)r=null,(a=(n=t.getDatasetMeta(i)).dataset)&&a._model&&a instanceof Wt.Line&&(r={visible:t.isDatasetVisible(i),fill:En(a,i,o),chart:t,el:a}),n.$filler=r,l.push(r);for(i=0;i<o;++i)(r=l[i])&&(r.fill=jn(l,i,s),r.boundary=Bn(r),r.mapper=Un(r))},beforeDatasetDraw:function(t,e){var n=e.meta.$filler;if(n){var i=t.ctx,a=n.el,r=a._view,o=a._children||[],s=n.mapper,l=r.backgroundColor||ot.global.defaultColor;s&&l&&o.length&&(ut.canvas.clipArea(i,t.chartArea),function(t,e,n,i,a,r){var o,s,l,u,d,h,c,f=e.length,g=i.spanGaps,m=[],p=[],v=0,y=0;for(t.beginPath(),o=0,s=f+!!r;o<s;++o)d=n(u=e[l=o%f]._view,l,i),h=Gn(u),c=Gn(d),h&&c?(v=m.push(u),y=p.push(d)):v&&y&&(g?(h&&m.push(u),c&&p.push(d)):(qn(t,m,p,v,y),v=y=0,m=[],p=[]));qn(t,m,p,v,y),t.closePath(),t.fillStyle=a,t.fill()}(i,o,s,r,l,a._loop),ut.canvas.unclipArea(i))}}},$n=ut.noop,Xn=ut.valueOrDefault;function Jn(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}ot._set("global",{legend:{display:!0,position:"top",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var n=e.datasetIndex,i=this.chart,a=i.getDatasetMeta(n);a.hidden=null===a.hidden?!i.data.datasets[n].hidden:null,i.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data;return ut.isArray(e.datasets)?e.datasets.map((function(e,n){return{text:e.label,fillStyle:ut.isArray(e.backgroundColor)?e.backgroundColor[0]:e.backgroundColor,hidden:!t.isDatasetVisible(n),lineCap:e.borderCapStyle,lineDash:e.borderDash,lineDashOffset:e.borderDashOffset,lineJoin:e.borderJoinStyle,lineWidth:e.borderWidth,strokeStyle:e.borderColor,pointStyle:e.pointStyle,datasetIndex:n}}),this):[]}}},legendCallback:function(t){var e=[];e.push('<ul class="'+t.id+'-legend">');for(var n=0;n<t.data.datasets.length;n++)e.push('<li><span style="background-color:'+t.data.datasets[n].backgroundColor+'"></span>'),t.data.datasets[n].label&&e.push(t.data.datasets[n].label),e.push("</li>");return e.push("</ul>"),e.join("")}});var Kn=ft.extend({initialize:function(t){ut.extend(this,t),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:$n,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:$n,beforeSetDimensions:$n,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:$n,beforeBuildLabels:$n,buildLabels:function(){var t=this,e=t.options.labels||{},n=ut.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter((function(n){return e.filter(n,t.chart.data)}))),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:$n,beforeFit:$n,fit:function(){var t=this,e=t.options,n=e.labels,i=e.display,a=t.ctx,r=ut.options._parseFont(n),o=r.size,s=t.legendHitBoxes=[],l=t.minSize,u=t.isHorizontal();if(u?(l.width=t.maxWidth,l.height=i?10:0):(l.width=i?10:0,l.height=t.maxHeight),i)if(a.font=r.string,u){var d=t.lineWidths=[0],h=0;a.textAlign="left",a.textBaseline="top",ut.each(t.legendItems,(function(t,e){var i=Jn(n,o)+o/2+a.measureText(t.text).width;(0===e||d[d.length-1]+i+n.padding>l.width)&&(h+=o+n.padding,d[d.length-(e>0?0:1)]=n.padding),s[e]={left:0,top:0,width:i,height:o},d[d.length-1]+=i+n.padding})),l.height+=h}else{var c=n.padding,f=t.columnWidths=[],g=n.padding,m=0,p=0,v=o+c;ut.each(t.legendItems,(function(t,e){var i=Jn(n,o)+o/2+a.measureText(t.text).width;e>0&&p+v>l.height-c&&(g+=m+n.padding,f.push(m),m=0,p=0),m=Math.max(m,i),p+=v,s[e]={left:0,top:0,width:i,height:o}})),g+=m,f.push(m),l.width+=g}t.width=l.width,t.height=l.height},afterFit:$n,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,n=e.labels,i=ot.global,a=i.defaultColor,r=i.elements.line,o=t.width,s=t.lineWidths;if(e.display){var l,u=t.ctx,d=Xn(n.fontColor,i.defaultFontColor),h=ut.options._parseFont(n),c=h.size;u.textAlign="left",u.textBaseline="middle",u.lineWidth=.5,u.strokeStyle=d,u.fillStyle=d,u.font=h.string;var f=Jn(n,c),g=t.legendHitBoxes,m=t.isHorizontal();l=m?{x:t.left+(o-s[0])/2+n.padding,y:t.top+n.padding,line:0}:{x:t.left+n.padding,y:t.top+n.padding,line:0};var p=c+n.padding;ut.each(t.legendItems,(function(i,d){var h=u.measureText(i.text).width,v=f+c/2+h,y=l.x,b=l.y;m?d>0&&y+v+n.padding>t.left+t.minSize.width&&(b=l.y+=p,l.line++,y=l.x=t.left+(o-s[l.line])/2+n.padding):d>0&&b+p>t.top+t.minSize.height&&(y=l.x=y+t.columnWidths[l.line]+n.padding,b=l.y=t.top+n.padding,l.line++),function(t,n,i){if(!(isNaN(f)||f<=0)){u.save();var o=Xn(i.lineWidth,r.borderWidth);if(u.fillStyle=Xn(i.fillStyle,a),u.lineCap=Xn(i.lineCap,r.borderCapStyle),u.lineDashOffset=Xn(i.lineDashOffset,r.borderDashOffset),u.lineJoin=Xn(i.lineJoin,r.borderJoinStyle),u.lineWidth=o,u.strokeStyle=Xn(i.strokeStyle,a),u.setLineDash&&u.setLineDash(Xn(i.lineDash,r.borderDash)),e.labels&&e.labels.usePointStyle){var s=f*Math.SQRT2/2;ut.canvas.drawPoint(u,i.pointStyle,s,t+f/2,n+c/2)}else 0!==o&&u.strokeRect(t,n,f,c),u.fillRect(t,n,f,c);u.restore()}}(y,b,i),g[d].left=y,g[d].top=b,function(t,e,n,i){var a=c/2,r=f+a+t,o=e+a;u.fillText(n.text,r,o),n.hidden&&(u.beginPath(),u.lineWidth=2,u.moveTo(r,o),u.lineTo(r+i,o),u.stroke())}(y,b,i,h),m?l.x+=v+n.padding:l.y+=p}))}},_getLegendItemAt:function(t,e){var n,i,a,r=this;if(t>=r.left&&t<=r.right&&e>=r.top&&e<=r.bottom)for(a=r.legendHitBoxes,n=0;n<a.length;++n)if(t>=(i=a[n]).left&&t<=i.left+i.width&&e>=i.top&&e<=i.top+i.height)return r.legendItems[n];return null},handleEvent:function(t){var e,n=this,i=n.options,a="mouseup"===t.type?"click":t.type;if("mousemove"===a){if(!i.onHover&&!i.onLeave)return}else{if("click"!==a)return;if(!i.onClick)return}e=n._getLegendItemAt(t.x,t.y),"click"===a?e&&i.onClick&&i.onClick.call(n,t.native,e):(i.onLeave&&e!==n._hoveredItem&&(n._hoveredItem&&i.onLeave.call(n,t.native,n._hoveredItem),n._hoveredItem=e),i.onHover&&e&&i.onHover.call(n,t.native,e))}});function Qn(t,e){var n=new Kn({ctx:t.ctx,options:e,chart:t});ve.configure(t,n,e),ve.addBox(t,n),t.legend=n}var ti={id:"legend",_element:Kn,beforeInit:function(t){var e=t.options.legend;e&&Qn(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(ut.mergeIf(e,ot.global.legend),n?(ve.configure(t,n,e),n.options=e):Qn(t,e)):n&&(ve.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}},ei=ut.noop;ot._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var ni=ft.extend({initialize:function(t){ut.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:ei,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:ei,beforeSetDimensions:ei,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:ei,beforeBuildLabels:ei,buildLabels:ei,afterBuildLabels:ei,beforeFit:ei,fit:function(){var t=this,e=t.options,n=e.display,i=t.minSize,a=ut.isArray(e.text)?e.text.length:1,r=ut.options._parseFont(e),o=n?a*r.lineHeight+2*e.padding:0;t.isHorizontal()?(i.width=t.maxWidth,i.height=o):(i.width=o,i.height=t.maxHeight),t.width=i.width,t.height=i.height},afterFit:ei,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=t.options;if(n.display){var i,a,r,o=ut.options._parseFont(n),s=o.lineHeight,l=s/2+n.padding,u=0,d=t.top,h=t.left,c=t.bottom,f=t.right;e.fillStyle=ut.valueOrDefault(n.fontColor,ot.global.defaultFontColor),e.font=o.string,t.isHorizontal()?(a=h+(f-h)/2,r=d+l,i=f-h):(a="left"===n.position?h+l:f-l,r=d+(c-d)/2,i=c-d,u=Math.PI*("left"===n.position?-.5:.5)),e.save(),e.translate(a,r),e.rotate(u),e.textAlign="center",e.textBaseline="middle";var g=n.text;if(ut.isArray(g))for(var m=0,p=0;p<g.length;++p)e.fillText(g[p],0,m,i),m+=s;else e.fillText(g,0,0,i);e.restore()}}});function ii(t,e){var n=new ni({ctx:t.ctx,options:e,chart:t});ve.configure(t,n,e),ve.addBox(t,n),t.titleBlock=n}var ai={},ri=Zn,oi=ti,si={id:"title",_element:ni,beforeInit:function(t){var e=t.options.title;e&&ii(t,e)},beforeUpdate:function(t){var e=t.options.title,n=t.titleBlock;e?(ut.mergeIf(e,ot.global.title),n?(ve.configure(t,n,e),n.options=e):ii(t,e)):n&&(ve.removeBox(t,n),delete t.titleBlock)}};for(var li in ai.filler=ri,ai.legend=oi,ai.title=si,Ze.helpers=ut,function(){function t(t,e,n){var i;return"string"==typeof t?(i=parseInt(t,10),-1!==t.indexOf("%")&&(i=i/100*e.parentNode[n])):i=t,i}function e(t){return null!=t&&"none"!==t}function n(n,i,a){var r=document.defaultView,o=ut._getParentNode(n),s=r.getComputedStyle(n)[i],l=r.getComputedStyle(o)[i],u=e(s),d=e(l),h=Number.POSITIVE_INFINITY;return u||d?Math.min(u?t(s,n,a):h,d?t(l,o,a):h):"none"}ut.where=function(t,e){if(ut.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return ut.each(t,(function(t){e(t)&&n.push(t)})),n},ut.findIndex=Array.prototype.findIndex?function(t,e,n){return t.findIndex(e,n)}:function(t,e,n){n=void 0===n?t:n;for(var i=0,a=t.length;i<a;++i)if(e.call(n,t[i],i,t))return i;return-1},ut.findNextWhere=function(t,e,n){ut.isNullOrUndef(n)&&(n=-1);for(var i=n+1;i<t.length;i++){var a=t[i];if(e(a))return a}},ut.findPreviousWhere=function(t,e,n){ut.isNullOrUndef(n)&&(n=t.length);for(var i=n-1;i>=0;i--){var a=t[i];if(e(a))return a}},ut.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},ut.almostEquals=function(t,e,n){return Math.abs(t-e)<n},ut.almostWhole=function(t,e){var n=Math.round(t);return n-e<t&&n+e>t},ut.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},ut.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},ut.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},ut.log10=Math.log10?function(t){return Math.log10(t)}:function(t){var e=Math.log(t)*Math.LOG10E,n=Math.round(e);return t===Math.pow(10,n)?n:e},ut.toRadians=function(t){return t*(Math.PI/180)},ut.toDegrees=function(t){return t*(180/Math.PI)},ut._decimalPlaces=function(t){if(ut.isFinite(t)){for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}},ut.getAngleFromPoint=function(t,e){var n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i),r=Math.atan2(i,n);return r<-.5*Math.PI&&(r+=2*Math.PI),{angle:r,distance:a}},ut.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},ut.aliasPixel=function(t){return t%2==0?0:.5},ut._alignPixel=function(t,e,n){var i=t.currentDevicePixelRatio,a=n/2;return Math.round((e-a)*i)/i+a},ut.splineCurve=function(t,e,n,i){var a=t.skip?e:t,r=e,o=n.skip?e:n,s=Math.sqrt(Math.pow(r.x-a.x,2)+Math.pow(r.y-a.y,2)),l=Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.y,2)),u=s/(s+l),d=l/(s+l),h=i*(u=isNaN(u)?0:u),c=i*(d=isNaN(d)?0:d);return{previous:{x:r.x-h*(o.x-a.x),y:r.y-h*(o.y-a.y)},next:{x:r.x+c*(o.x-a.x),y:r.y+c*(o.y-a.y)}}},ut.EPSILON=Number.EPSILON||1e-14,ut.splineCurveMonotone=function(t){var e,n,i,a,r,o,s,l,u,d=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),h=d.length;for(e=0;e<h;++e)if(!(i=d[e]).model.skip){if(n=e>0?d[e-1]:null,(a=e<h-1?d[e+1]:null)&&!a.model.skip){var c=a.model.x-i.model.x;i.deltaK=0!==c?(a.model.y-i.model.y)/c:0}i.mK=!n||n.model.skip?i.deltaK:!a||a.model.skip?n.deltaK:this.sign(n.deltaK)!==this.sign(i.deltaK)?0:(n.deltaK+i.deltaK)/2}for(e=0;e<h-1;++e)a=d[e+1],(i=d[e]).model.skip||a.model.skip||(ut.almostEquals(i.deltaK,0,this.EPSILON)?i.mK=a.mK=0:(r=i.mK/i.deltaK,o=a.mK/i.deltaK,(l=Math.pow(r,2)+Math.pow(o,2))<=9||(s=3/Math.sqrt(l),i.mK=r*s*i.deltaK,a.mK=o*s*i.deltaK)));for(e=0;e<h;++e)(i=d[e]).model.skip||(a=e<h-1?d[e+1]:null,(n=e>0?d[e-1]:null)&&!n.model.skip&&(i.model.controlPointPreviousX=i.model.x-(u=(i.model.x-n.model.x)/3),i.model.controlPointPreviousY=i.model.y-u*i.mK),a&&!a.model.skip&&(i.model.controlPointNextX=i.model.x+(u=(a.model.x-i.model.x)/3),i.model.controlPointNextY=i.model.y+u*i.mK))},ut.nextItem=function(t,e,n){return n?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},ut.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},ut.niceNum=function(t,e){var n=Math.floor(ut.log10(t)),i=t/Math.pow(10,n);return(e?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,n)},ut.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},ut.getRelativePosition=function(t,e){var n,i,a=t.originalEvent||t,r=t.target||t.srcElement,o=r.getBoundingClientRect(),s=a.touches;s&&s.length>0?(n=s[0].clientX,i=s[0].clientY):(n=a.clientX,i=a.clientY);var l=parseFloat(ut.getStyle(r,"padding-left")),u=parseFloat(ut.getStyle(r,"padding-top")),d=parseFloat(ut.getStyle(r,"padding-right")),h=parseFloat(ut.getStyle(r,"padding-bottom")),c=o.bottom-o.top-u-h;return{x:n=Math.round((n-o.left-l)/(o.right-o.left-l-d)*r.width/e.currentDevicePixelRatio),y:i=Math.round((i-o.top-u)/c*r.height/e.currentDevicePixelRatio)}},ut.getConstraintWidth=function(t){return n(t,"max-width","clientWidth")},ut.getConstraintHeight=function(t){return n(t,"max-height","clientHeight")},ut._calculatePadding=function(t,e,n){return(e=ut.getStyle(t,e)).indexOf("%")>-1?n*parseInt(e,10)/100:parseInt(e,10)},ut._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},ut.getMaximumWidth=function(t){var e=ut._getParentNode(t);if(!e)return t.clientWidth;var n=e.clientWidth,i=n-ut._calculatePadding(e,"padding-left",n)-ut._calculatePadding(e,"padding-right",n),a=ut.getConstraintWidth(t);return isNaN(a)?i:Math.min(i,a)},ut.getMaximumHeight=function(t){var e=ut._getParentNode(t);if(!e)return t.clientHeight;var n=e.clientHeight,i=n-ut._calculatePadding(e,"padding-top",n)-ut._calculatePadding(e,"padding-bottom",n),a=ut.getConstraintHeight(t);return isNaN(a)?i:Math.min(i,a)},ut.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},ut.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var i=t.canvas,a=t.height,r=t.width;i.height=a*n,i.width=r*n,t.ctx.scale(n,n),i.style.height||i.style.width||(i.style.height=a+"px",i.style.width=r+"px")}},ut.fontString=function(t,e,n){return e+" "+t+"px "+n},ut.longestText=function(t,e,n,i){var a=(i=i||{}).data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(a=i.data={},r=i.garbageCollect=[],i.font=e),t.font=e;var o=0;ut.each(n,(function(e){null!=e&&!0!==ut.isArray(e)?o=ut.measureText(t,a,r,o,e):ut.isArray(e)&&ut.each(e,(function(e){null==e||ut.isArray(e)||(o=ut.measureText(t,a,r,o,e))}))}));var s=r.length/2;if(s>n.length){for(var l=0;l<s;l++)delete a[r[l]];r.splice(0,s)}return o},ut.measureText=function(t,e,n,i,a){var r=e[a];return r||(r=e[a]=t.measureText(a).width,n.push(a)),r>i&&(i=r),i},ut.numberOfLabelLines=function(t){var e=1;return ut.each(t,(function(t){ut.isArray(t)&&t.length>e&&(e=t.length)})),e},ut.color=G?function(t){return t instanceof CanvasGradient&&(t=ot.global.defaultColor),G(t)}:function(t){return console.error("Color.js not found!"),t},ut.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:ut.color(t).saturate(.5).darken(.1).rgbString()}}(),Ze._adapters=Je,Ze.Animation=mt,Ze.animationService=pt,Ze.controllers=oe,Ze.DatasetController=_t,Ze.defaults=ot,Ze.Element=ft,Ze.elements=Wt,Ze.Interaction=fe,Ze.layouts=ve,Ze.platform=Ie,Ze.plugins=Ae,Ze.Scale=an,Ze.scaleService=Fe,Ze.Ticks=Ke,Ze.Tooltip=He,Ze.helpers.each(Nn,(function(t,e){Ze.scaleService.registerScaleType(e,t,t._defaults)})),ai)ai.hasOwnProperty(li)&&Ze.plugins.register(ai[li]);Ze.platform.initialize();var ui=Ze;return"undefined"!=typeof window&&(window.Chart=Ze),Ze.Chart=Ze,Ze.Legend=ai.legend._element,Ze.Title=ai.title._element,Ze.pluginService=Ze.plugins,Ze.PluginBase=Ze.Element.extend({}),Ze.canvasHelpers=Ze.helpers.canvas,Ze.layoutService=Ze.layouts,Ze.LinearScaleBase=sn,Ze.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],(function(t){Ze[t]=function(e,n){return new Ze(e,Ze.helpers.merge(n||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}})),ui}));
\ No newline at end of file
--- /dev/null
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Chart=e()}(this,(function(){"use strict";function t(t,e){return t(e={exports:{}},e.exports),e.exports}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var e={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},n=t((function(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[e[i]]=i);var a=t.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var r in a)if(a.hasOwnProperty(r)){if(!("channels"in a[r]))throw new Error("missing channels property: "+r);if(!("labels"in a[r]))throw new Error("missing channel labels property: "+r);if(a[r].labels.length!==a[r].channels)throw new Error("channel and label counts mismatch: "+r);var o=a[r].channels,s=a[r].labels;delete a[r].channels,delete a[r].labels,Object.defineProperty(a[r],"channels",{value:o}),Object.defineProperty(a[r],"labels",{value:s})}a.rgb.hsl=function(t){var e,n,i=t[0]/255,a=t[1]/255,r=t[2]/255,o=Math.min(i,a,r),s=Math.max(i,a,r),l=s-o;return s===o?e=0:i===s?e=(a-r)/l:a===s?e=2+(r-i)/l:r===s&&(e=4+(i-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),n=(o+s)/2,[e,100*(s===o?0:n<=.5?l/(s+o):l/(2-s-o)),100*n]},a.rgb.hsv=function(t){var e,n,i,a,r,o=t[0]/255,s=t[1]/255,l=t[2]/255,u=Math.max(o,s,l),d=u-Math.min(o,s,l),h=function(t){return(u-t)/6/d+.5};return 0===d?a=r=0:(r=d/u,e=h(o),n=h(s),i=h(l),o===u?a=i-n:s===u?a=1/3+e-i:l===u&&(a=2/3+n-e),a<0?a+=1:a>1&&(a-=1)),[360*a,100*r,100*u]},a.rgb.hwb=function(t){var e=t[0],n=t[1],i=t[2];return[a.rgb.hsl(t)[0],1/255*Math.min(e,Math.min(n,i))*100,100*(i=1-1/255*Math.max(e,Math.max(n,i)))]},a.rgb.cmyk=function(t){var e,n=t[0]/255,i=t[1]/255,a=t[2]/255;return[100*((1-n-(e=Math.min(1-n,1-i,1-a)))/(1-e)||0),100*((1-i-e)/(1-e)||0),100*((1-a-e)/(1-e)||0),100*e]},a.rgb.keyword=function(t){var i=n[t];if(i)return i;var a,r,o,s=1/0;for(var l in e)if(e.hasOwnProperty(l)){var u=(r=t,o=e[l],Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)+Math.pow(r[2]-o[2],2));u<s&&(s=u,a=l)}return a},a.keyword.rgb=function(t){return e[t]},a.rgb.xyz=function(t){var e=t[0]/255,n=t[1]/255,i=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)),100*(.2126*e+.7152*n+.0722*i),100*(.0193*e+.1192*n+.9505*i)]},a.rgb.lab=function(t){var e=a.rgb.xyz(t),n=e[0],i=e[1],r=e[2];return i/=100,r/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(n-i),200*(i-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},a.hsl.rgb=function(t){var e,n,i,a,r,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[r=255*l,r,r];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var u=0;u<3;u++)(i=o+1/3*-(u-1))<0&&i++,i>1&&i--,a[u]=255*(r=6*i<1?e+6*(n-e)*i:2*i<1?n:3*i<2?e+(n-e)*(2/3-i)*6:e);return a},a.hsl.hsv=function(t){var e=t[0],n=t[1]/100,i=t[2]/100,a=n,r=Math.max(i,.01);return n*=(i*=2)<=1?i:2-i,a*=r<=1?r:2-r,[e,100*(0===i?2*a/(r+a):2*n/(i+n)),(i+n)/2*100]},a.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,i=t[2]/100,a=Math.floor(e)%6,r=e-Math.floor(e),o=255*i*(1-n),s=255*i*(1-n*r),l=255*i*(1-n*(1-r));switch(i*=255,a){case 0:return[i,l,o];case 1:return[s,i,o];case 2:return[o,i,l];case 3:return[o,s,i];case 4:return[l,o,i];case 5:return[i,o,s]}},a.hsv.hsl=function(t){var e,n,i,a=t[0],r=t[1]/100,o=t[2]/100,s=Math.max(o,.01);return i=(2-r)*o,n=r*s,[a,100*(n=(n/=(e=(2-r)*s)<=1?e:2-e)||0),100*(i/=2)]},a.hwb.rgb=function(t){var e,n,i,a,r,o,s,l=t[0]/360,u=t[1]/100,d=t[2]/100,h=u+d;switch(h>1&&(u/=h,d/=h),i=6*l-(e=Math.floor(6*l)),0!=(1&e)&&(i=1-i),a=u+i*((n=1-d)-u),e){default:case 6:case 0:r=n,o=a,s=u;break;case 1:r=a,o=n,s=u;break;case 2:r=u,o=n,s=a;break;case 3:r=u,o=a,s=n;break;case 4:r=a,o=u,s=n;break;case 5:r=n,o=u,s=a}return[255*r,255*o,255*s]},a.cmyk.rgb=function(t){var e=t[1]/100,n=t[2]/100,i=t[3]/100;return[255*(1-Math.min(1,t[0]/100*(1-i)+i)),255*(1-Math.min(1,e*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i))]},a.xyz.rgb=function(t){var e,n,i,a=t[0]/100,r=t[1]/100,o=t[2]/100;return n=-.9689*a+1.8758*r+.0415*o,i=.0557*a+-.204*r+1.057*o,e=(e=3.2406*a+-1.5372*r+-.4986*o)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:12.92*i,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(i=Math.min(Math.max(0,i),1))]},a.xyz.lab=function(t){var e=t[0],n=t[1],i=t[2];return n/=100,i/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},a.lab.xyz=function(t){var e,n,i;e=t[1]/500+(n=(t[0]+16)/116),i=n-t[2]/200;var a=Math.pow(n,3),r=Math.pow(e,3),o=Math.pow(i,3);return n=a>.008856?a:(n-16/116)/7.787,e=r>.008856?r:(e-16/116)/7.787,i=o>.008856?o:(i-16/116)/7.787,[e*=95.047,n*=100,i*=108.883]},a.lab.lch=function(t){var e,n=t[0],i=t[1],a=t[2];return(e=360*Math.atan2(a,i)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(i*i+a*a),e]},a.lch.lab=function(t){var e,n=t[1];return e=t[2]/360*2*Math.PI,[t[0],n*Math.cos(e),n*Math.sin(e)]},a.rgb.ansi16=function(t){var e=t[0],n=t[1],i=t[2],r=1 in arguments?arguments[1]:a.rgb.hsv(t)[2];if(0===(r=Math.round(r/50)))return 30;var o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(e/255));return 2===r&&(o+=60),o},a.hsv.ansi16=function(t){return a.rgb.ansi16(a.hsv.rgb(t),t[2])},a.rgb.ansi256=function(t){var e=t[0],n=t[1],i=t[2];return e===n&&n===i?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},a.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var n=.5*(1+~~(t>50));return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},a.ansi256.rgb=function(t){if(t>=232){var e=10*(t-232)+8;return[e,e,e]}var n;return t-=16,[Math.floor(t/36)/5*255,Math.floor((n=t%36)/6)/5*255,n%6/5*255]},a.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},a.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var n=e[0];3===e[0].length&&(n=n.split("").map((function(t){return t+t})).join(""));var i=parseInt(n,16);return[i>>16&255,i>>8&255,255&i]},a.rgb.hcg=function(t){var e,n=t[0]/255,i=t[1]/255,a=t[2]/255,r=Math.max(Math.max(n,i),a),o=Math.min(Math.min(n,i),a),s=r-o;return e=s<=0?0:r===n?(i-a)/s%6:r===i?2+(a-n)/s:4+(n-i)/s+4,e/=6,[360*(e%=1),100*s,100*(s<1?o/(1-s):0)]},a.hsl.hcg=function(t){var e,n=t[1]/100,i=t[2]/100,a=0;return(e=i<.5?2*n*i:2*n*(1-i))<1&&(a=(i-.5*e)/(1-e)),[t[0],100*e,100*a]},a.hsv.hcg=function(t){var e=t[2]/100,n=t[1]/100*e,i=0;return n<1&&(i=(e-n)/(1-n)),[t[0],100*n,100*i]},a.hcg.rgb=function(t){var e=t[1]/100,n=t[2]/100;if(0===e)return[255*n,255*n,255*n];var i,a=[0,0,0],r=t[0]/360%1*6,o=r%1,s=1-o;switch(Math.floor(r)){case 0:a[0]=1,a[1]=o,a[2]=0;break;case 1:a[0]=s,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=o;break;case 3:a[0]=0,a[1]=s,a[2]=1;break;case 4:a[0]=o,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=s}return[255*(e*a[0]+(i=(1-e)*n)),255*(e*a[1]+i),255*(e*a[2]+i)]},a.hcg.hsv=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e),i=0;return n>0&&(i=e/n),[t[0],100*i,100*n]},a.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],100*i,100*n]},a.hcg.hwb=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e);return[t[0],100*(n-e),100*(1-n)]},a.hwb.hcg=function(t){var e=1-t[2]/100,n=e-t[1]/100,i=0;return n<1&&(i=(e-n)/(1-n)),[t[0],100*n,100*i]},a.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},a.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},a.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},a.gray.hsl=a.gray.hsv=function(t){return[0,0,t[0]]},a.gray.hwb=function(t){return[0,100,t[0]]},a.gray.cmyk=function(t){return[0,0,0,t[0]]},a.gray.lab=function(t){return[t[0],0,0]},a.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},a.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}}));function i(t,e){return function(n){return e(t(n))}}function a(t,e){for(var a=[e[t].parent,t],r=n[e[t].parent][t],o=e[t].parent;e[o].parent;)a.unshift(e[o].parent),r=i(n[e[o].parent][o],r),o=e[o].parent;return r.conversion=a,r}var r={};Object.keys(n).forEach((function(t){r[t]={},Object.defineProperty(r[t],"channels",{value:n[t].channels}),Object.defineProperty(r[t],"labels",{value:n[t].labels});var e=function(t){for(var e=function(t){var e=function(){for(var t={},e=Object.keys(n),i=e.length,a=0;a<i;a++)t[e[a]]={distance:-1,parent:null};return t}(),i=[t];for(e[t].distance=0;i.length;)for(var a=i.pop(),r=Object.keys(n[a]),o=r.length,s=0;s<o;s++){var l=r[s],u=e[l];-1===u.distance&&(u.distance=e[a].distance+1,u.parent=a,i.unshift(l))}return e}(t),i={},r=Object.keys(e),o=r.length,s=0;s<o;s++){var l=r[s];null!==e[l].parent&&(i[l]=a(l,e))}return i}(t);Object.keys(e).forEach((function(n){var i=e[n];r[t][n]=function(t){var e=function(e){if(null==e)return e;arguments.length>1&&(e=Array.prototype.slice.call(arguments));var n=t(e);if("object"==typeof n)for(var i=n.length,a=0;a<i;a++)n[a]=Math.round(n[a]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}(i),r[t][n].raw=function(t){var e=function(e){return null==e?e:(arguments.length>1&&(e=Array.prototype.slice.call(arguments)),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(i)}))}));var o=r,s={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},l={getRgba:u,getHsla:d,getRgb:function(t){var e=u(t);return e&&e.slice(0,3)},getHsl:function(t){var e=d(t);return e&&e.slice(0,3)},getHwb:h,getAlpha:function(t){var e=u(t);return e||(e=d(t))||(e=h(t))?e[3]:void 0},hexString:function(t,e){return e=void 0!==e&&3===t.length?e:t[3],"#"+p(t[0])+p(t[1])+p(t[2])+(e>=0&&e<1?p(Math.round(255*e)):"")},rgbString:function(t,e){return e<1||t[3]&&t[3]<1?c(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:c,percentString:function(t,e){return e<1||t[3]&&t[3]<1?f(t,e):"rgb("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%)"},percentaString:f,hslString:function(t,e){return e<1||t[3]&&t[3]<1?g(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:g,hwbString:function(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return v[t.slice(0,3)]}};function u(t){if(t){var e=[0,0,0],n=1,i=t.match(/^#([a-fA-F0-9]{3,4})$/i),a="";if(i){a=(i=i[1])[3];for(var r=0;r<e.length;r++)e[r]=parseInt(i[r]+i[r],16);a&&(n=Math.round(parseInt(a+a,16)/255*100)/100)}else if(i=t.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){for(a=i[2],i=i[1],r=0;r<e.length;r++)e[r]=parseInt(i.slice(2*r,2*r+2),16);a&&(n=Math.round(parseInt(a,16)/255*100)/100)}else if(i=t.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(r=0;r<e.length;r++)e[r]=parseInt(i[r+1]);n=parseFloat(i[4])}else if(i=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(r=0;r<e.length;r++)e[r]=Math.round(2.55*parseFloat(i[r+1]));n=parseFloat(i[4])}else if(i=t.match(/(\w+)/)){if("transparent"==i[1])return[0,0,0,0];if(!(e=s[i[1]]))return}for(r=0;r<e.length;r++)e[r]=m(e[r],0,255);return n=n||0==n?m(n,0,1):1,e[3]=n,e}}function d(t){if(t){var e=t.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var n=parseFloat(e[4]);return[m(parseInt(e[1]),0,360),m(parseFloat(e[2]),0,100),m(parseFloat(e[3]),0,100),m(isNaN(n)?1:n,0,1)]}}}function h(t){if(t){var e=t.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var n=parseFloat(e[4]);return[m(parseInt(e[1]),0,360),m(parseFloat(e[2]),0,100),m(parseFloat(e[3]),0,100),m(isNaN(n)?1:n,0,1)]}}}function c(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function f(t,e){return"rgba("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%, "+(e||t[3]||1)+")"}function g(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function m(t,e,n){return Math.min(Math.max(e,t),n)}function p(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var v={};for(var b in s)v[s[b]]=b;var y=function(t){return t instanceof y?t:this instanceof y?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof t?(e=l.getRgba(t))?this.setValues("rgb",e):(e=l.getHsla(t))?this.setValues("hsl",e):(e=l.getHwb(t))&&this.setValues("hwb",e):"object"==typeof t&&(void 0!==(e=t).r||void 0!==e.red?this.setValues("rgb",e):void 0!==e.l||void 0!==e.lightness?this.setValues("hsl",e):void 0!==e.v||void 0!==e.value?this.setValues("hsv",e):void 0!==e.w||void 0!==e.whiteness?this.setValues("hwb",e):void 0===e.c&&void 0===e.cyan||this.setValues("cmyk",e)))):new y(t);var e};y.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t&&(t=(t%=360)<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return l.hexString(this.values.rgb)},rgbString:function(){return l.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return l.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return l.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return l.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return l.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return l.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return l.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],n=0;n<t.length;n++){var i=t[n]/255;e[n]=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),n=t.luminosity();return e>n?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=this,i=t,a=void 0===e?.5:e,r=2*a-1,o=n.alpha()-i.alpha(),s=((r*o==-1?r:(r+o)/(1+r*o))+1)/2,l=1-s;return this.rgb(s*n.red()+l*i.red(),s*n.green()+l*i.green(),s*n.blue()+l*i.blue()).alpha(n.alpha()*a+i.alpha()*(1-a))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new y,i=this.values,a=n.values;for(var r in i)i.hasOwnProperty(r)&&("[object Array]"===(e={}.toString.call(t=i[r]))?a[r]=t.slice(0):"[object Number]"===e?a[r]=t:console.error("unexpected color value:",t));return n}},y.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},y.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},y.prototype.getValues=function(t){for(var e=this.values,n={},i=0;i<t.length;i++)n[t.charAt(i)]=e[t][i];return 1!==e.alpha&&(n.a=e.alpha),n},y.prototype.setValues=function(t,e){var n,i,a=this.values,r=this.spaces,s=this.maxes,l=1;if(this.valid=!0,"alpha"===t)l=e;else if(e.length)a[t]=e.slice(0,t.length),l=e[t.length];else if(void 0!==e[t.charAt(0)]){for(n=0;n<t.length;n++)a[t][n]=e[t.charAt(n)];l=e.a}else if(void 0!==e[r[t][0]]){var u=r[t];for(n=0;n<t.length;n++)a[t][n]=e[u[n]];l=e.alpha}if(a.alpha=Math.max(0,Math.min(1,void 0===l?a.alpha:l)),"alpha"===t)return!1;for(n=0;n<t.length;n++)i=Math.max(0,Math.min(s[t][n],a[t][n])),a[t][n]=Math.round(i);for(var d in r)d!==t&&(a[d]=o[t][d](a[t]));return!0},y.prototype.setSpace=function(t,e){var n=e[0];return void 0===n?this.getValues(t):("number"==typeof n&&(n=Array.prototype.slice.call(e)),this.setValues(t,n),this)},y.prototype.setChannel=function(t,e,n){var i=this.values[t];return void 0===n?i[e]:(n===i[e]||(i[e]=n,this.setValues(t,i)),this)},"undefined"!=typeof window&&(window.Color=y);var x=y;function _(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}var w,k={noop:function(){},uid:(w=0,function(){return w++}),isNullOrUndef:function(t){return null==t},isArray:function(t){if(Array.isArray&&Array.isArray(t))return!0;var e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},isFinite:function(t){return("number"==typeof t||t instanceof Number)&&isFinite(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,n){return k.valueOrDefault(k.isArray(t)?t[e]:t,n)},callback:function(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)},each:function(t,e,n,i){var a,r,o;if(k.isArray(t))if(r=t.length,i)for(a=r-1;a>=0;a--)e.call(n,t[a],a);else for(a=0;a<r;a++)e.call(n,t[a],a);else if(k.isObject(t))for(r=(o=Object.keys(t)).length,a=0;a<r;a++)e.call(n,t[o[a]],o[a])},arrayEquals:function(t,e){var n,i,a,r;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;++n)if(r=e[n],(a=t[n])instanceof Array&&r instanceof Array){if(!k.arrayEquals(a,r))return!1}else if(a!==r)return!1;return!0},clone:function(t){if(k.isArray(t))return t.map(k.clone);if(k.isObject(t)){for(var e=Object.create(t),n=Object.keys(t),i=n.length,a=0;a<i;++a)e[n[a]]=k.clone(t[n[a]]);return e}return t},_merger:function(t,e,n,i){if(_(t)){var a=e[t],r=n[t];k.isObject(a)&&k.isObject(r)?k.merge(a,r,i):e[t]=k.clone(r)}},_mergerIf:function(t,e,n){if(_(t)){var i=e[t],a=n[t];k.isObject(i)&&k.isObject(a)?k.mergeIf(i,a):e.hasOwnProperty(t)||(e[t]=k.clone(a))}},merge:function(t,e,n){var i,a,r,o,s,l=k.isArray(e)?e:[e],u=l.length;if(!k.isObject(t))return t;for(i=(n=n||{}).merger||k._merger,a=0;a<u;++a)if(k.isObject(e=l[a]))for(s=0,o=(r=Object.keys(e)).length;s<o;++s)i(r[s],t,e,n);return t},mergeIf:function(t,e){return k.merge(t,e,{merger:k._mergerIf})},extend:Object.assign||function(t){return k.merge(t,[].slice.call(arguments,1),{merger:function(t,e,n){e[t]=n[t]}})},inherits:function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},i=function(){this.constructor=n};return i.prototype=e.prototype,n.prototype=new i,n.extend=k.inherits,t&&k.extend(n.prototype,t),n.__super__=e.prototype,n},_deprecated:function(t,e,n,i){void 0!==e&&console.warn(t+': "'+n+'" is deprecated. Please use "'+i+'" instead')}},M=k;k.callCallback=k.callback,k.indexOf=function(t,e,n){return Array.prototype.indexOf.call(t,e,n)},k.getValueOrDefault=k.valueOrDefault,k.getValueAtIndexOrDefault=k.valueAtIndexOrDefault;var S={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return(t-=1)*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-((t-=1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return(t-=1)*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return 1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return t>=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),t<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-S.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*S.easeInBounce(2*t):.5*S.easeOutBounce(2*t-1)+.5}},D={effects:S};M.easingEffects=S;var C=Math.PI,P=C/180,T=2*C,O=C/2,A=C/4,F=2*C/3,I={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,a,r){if(r){var o=Math.min(r,a/2,i/2),s=e+o,l=n+o,u=e+i-o,d=n+a-o;t.moveTo(e,l),s<u&&l<d?(t.arc(s,l,o,-C,-O),t.arc(u,l,o,-O,0),t.arc(u,d,o,0,O),t.arc(s,d,o,O,C)):s<u?(t.moveTo(s,n),t.arc(u,l,o,-O,O),t.arc(s,l,o,O,C+O)):l<d?(t.arc(s,l,o,-C,0),t.arc(s,d,o,0,C)):t.arc(s,l,o,-C,C),t.closePath(),t.moveTo(e,n)}else t.rect(e,n,i,a)},drawPoint:function(t,e,n,i,a,r){var o,s,l,u,d,h=(r||0)*P;if(e&&"object"==typeof e&&("[object HTMLImageElement]"===(o=e.toString())||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,a),t.rotate(h),t.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),void t.restore();if(!(isNaN(n)||n<=0)){switch(t.beginPath(),e){default:t.arc(i,a,n,0,T),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(h)*n,a-Math.cos(h)*n),h+=F,t.lineTo(i+Math.sin(h)*n,a-Math.cos(h)*n),h+=F,t.lineTo(i+Math.sin(h)*n,a-Math.cos(h)*n),t.closePath();break;case"rectRounded":u=n-(d=.516*n),s=Math.cos(h+A)*u,l=Math.sin(h+A)*u,t.arc(i-s,a-l,d,h-C,h-O),t.arc(i+l,a-s,d,h-O,h),t.arc(i+s,a+l,d,h,h+O),t.arc(i-l,a+s,d,h+O,h+C),t.closePath();break;case"rect":if(!r){u=Math.SQRT1_2*n,t.rect(i-u,a-u,2*u,2*u);break}h+=A;case"rectRot":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+l,a-s),t.lineTo(i+s,a+l),t.lineTo(i-l,a+s),t.closePath();break;case"crossRot":h+=A;case"cross":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i+l,a-s),t.lineTo(i-l,a+s);break;case"star":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i+l,a-s),t.lineTo(i-l,a+s),h+=A,s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i+l,a-s),t.lineTo(i-l,a+s);break;case"line":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l);break;case"dash":t.moveTo(i,a),t.lineTo(i+Math.cos(h)*n,a+Math.sin(h)*n)}t.fill(),t.stroke()}},_isPointInArea:function(t,e){var n=1e-6;return t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,n,i){var a=n.steppedLine;if(a){if("middle"===a){var r=(e.x+n.x)/2;t.lineTo(r,i?n.y:e.y),t.lineTo(r,i?e.y:n.y)}else"after"===a&&!i||"after"!==a&&i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}else n.tension?t.bezierCurveTo(i?e.controlPointPreviousX:e.controlPointNextX,i?e.controlPointPreviousY:e.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},L=I;M.clear=I.clear,M.drawRoundedRectangle=function(t){t.beginPath(),I.roundedRect.apply(I,arguments)};var R={_set:function(t,e){return M.merge(this[t]||(this[t]={}),e)}};R._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0});var N=R,W=M.valueOrDefault,Y={toLineHeight:function(t,e){var n=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,n,i,a;return M.isObject(t)?(e=+t.top||0,n=+t.right||0,i=+t.bottom||0,a=+t.left||0):e=n=i=a=+t||0,{top:e,right:n,bottom:i,left:a,height:e+i,width:a+n}},_parseFont:function(t){var e=N.global,n=W(t.fontSize,e.defaultFontSize),i={family:W(t.fontFamily,e.defaultFontFamily),lineHeight:M.options.toLineHeight(W(t.lineHeight,e.defaultLineHeight),n),size:n,style:W(t.fontStyle,e.defaultFontStyle),weight:null,string:""};return i.string=function(t){return!t||M.isNullOrUndef(t.size)||M.isNullOrUndef(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(i),i},resolve:function(t,e,n,i){var a,r,o,s=!0;for(a=0,r=t.length;a<r;++a)if(void 0!==(o=t[a])&&(void 0!==e&&"function"==typeof o&&(o=o(e),s=!1),void 0!==n&&M.isArray(o)&&(o=o[n],s=!1),void 0!==o))return i&&!s&&(i.cacheable=!1),o}},z={_factorize:function(t){var e,n=[],i=Math.sqrt(t);for(e=1;e<i;e++)t%e==0&&(n.push(e),n.push(t/e));return i===(0|i)&&n.push(i),n.sort((function(t,e){return t-e})).pop(),n},log10:Math.log10||function(t){var e=Math.log(t)*Math.LOG10E,n=Math.round(e);return t===Math.pow(10,n)?n:e}},E=z;M.log10=z.log10;var V=M,H=L,B=Y,j=E;V.easing=D,V.canvas=H,V.options=B,V.math=j,V.rtl={getRtlAdapter:function(t,e,n){return t?function(t,e){return{x:function(n){return t+t+e-n},setWidth:function(t){e=t},textAlign:function(t){return"center"===t?t:"right"===t?"left":"right"},xPlus:function(t,e){return t-e},leftForLtr:function(t,e){return t-e}}}(e,n):{x:function(t){return t},setWidth:function(t){},textAlign:function(t){return t},xPlus:function(t,e){return t+e},leftForLtr:function(t,e){return t}}},overrideTextDirection:function(t,e){var n,i;"ltr"!==e&&"rtl"!==e||(i=[(n=t.canvas.style).getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)},restoreTextDirection:function(t){var e=t.prevTextDirection;void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}};var U=function(t){V.extend(this,t),this.initialize.apply(this,arguments)};V.extend(U.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=V.extend({},t._model)),t._start={},t},transition:function(t){var e=this,n=e._model,i=e._start,a=e._view;return n&&1!==t?(a||(a=e._view={}),i||(i=e._start={}),function(t,e,n,i){var a,r,o,s,l,u,d,h,c,f=Object.keys(n);for(a=0,r=f.length;a<r;++a)if(u=n[o=f[a]],e.hasOwnProperty(o)||(e[o]=u),(s=e[o])!==u&&"_"!==o[0]){if(t.hasOwnProperty(o)||(t[o]=s),(d=typeof u)==typeof(l=t[o]))if("string"===d){if((h=x(l)).valid&&(c=x(u)).valid){e[o]=c.mix(h,i).rgbString();continue}}else if(V.isFinite(l)&&V.isFinite(u)){e[o]=l+(u-l)*i;continue}e[o]=u}}(i,a,n,t),e):(e._view=V.extend({},n),e._start=null,e)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return V.isNumber(this._model.x)&&V.isNumber(this._model.y)}}),U.extend=V.inherits;var G=U,q=G.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),Z=q;Object.defineProperty(q.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(q.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}}),N._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:V.noop,onComplete:V.noop}});var $={animations:[],request:null,addAnimation:function(t,e,n,i){var a,r,o=this.animations;for(e.chart=t,e.startTime=Date.now(),e.duration=n,i||(t.animating=!0),a=0,r=o.length;a<r;++a)if(o[a].chart===t)return void(o[a]=e);o.push(e),1===o.length&&this.requestAnimationFrame()},cancelAnimation:function(t){var e=V.findIndex(this.animations,(function(e){return e.chart===t}));-1!==e&&(this.animations.splice(e,1),t.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=V.requestAnimFrame.call(window,(function(){t.request=null,t.startDigest()})))},startDigest:function(){var t=this;t.advance(),t.animations.length>0&&t.requestAnimationFrame()},advance:function(){for(var t,e,n,i,a=this.animations,r=0;r<a.length;)e=(t=a[r]).chart,n=t.numSteps,i=Math.floor((Date.now()-t.startTime)/t.duration*n)+1,t.currentStep=Math.min(i,n),V.callback(t.render,[e,t],e),V.callback(t.onAnimationProgress,[t],e),t.currentStep>=n?(V.callback(t.onAnimationComplete,[t],e),e.animating=!1,a.splice(r,1)):++r}},X=V.options.resolve,J=["push","pop","shift","splice","unshift"];function K(t,e){var n=t._chartjs;if(n){var i=n.listeners,a=i.indexOf(e);-1!==a&&i.splice(a,1),i.length>0||(J.forEach((function(e){delete t[e]})),delete t._chartjs)}}var Q=function(t,e){this.initialize(t,e)};V.extend(Q.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),n=t.chart,i=n.scales,a=t.getDataset(),r=n.options.scales;null!==e.xAxisID&&e.xAxisID in i&&!a.xAxisID||(e.xAxisID=a.xAxisID||r.xAxes[0].id),null!==e.yAxisID&&e.yAxisID in i&&!a.yAxisID||(e.yAxisID=a.yAxisID||r.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&K(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,n=e.dataElementType;return n&&new n({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,n=this,i=n.getMeta(),a=n.getDataset().data||[],r=i.data;for(t=0,e=a.length;t<e;++t)r[t]=r[t]||n.createMetaData(t);i.dataset=i.dataset||n.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var t,e,n=this,i=n.getDataset(),a=i.data||(i.data=[]);n._data!==a&&(n._data&&K(n._data,n),a&&Object.isExtensible(a)&&(e=n,(t=a)._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),J.forEach((function(e){var n="onData"+e.charAt(0).toUpperCase()+e.slice(1),i=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),a=i.apply(this,e);return V.each(t._chartjs.listeners,(function(t){"function"==typeof t[n]&&t[n].apply(t,e)})),a}})})))),n._data=a),n.resyncElements()},_configure:function(){var t=this;t._config=V.merge(Object.create(null),[t.chart.options.datasets[t._type],t.getDataset()],{merger:function(t,e,n){"_meta"!==t&&"data"!==t&&V._merger(t,e,n)}})},_update:function(t){var e=this;e._configure(),e._cachedDataOpts=null,e.update(t)},update:V.noop,transition:function(t){for(var e=this.getMeta(),n=e.data||[],i=n.length,a=0;a<i;++a)n[a].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],n=e.length,i=0;for(t.dataset&&t.dataset.draw();i<n;++i)e[i].draw()},getStyle:function(t){var e,n=this,i=n.getMeta(),a=i.dataset;return n._configure(),!1!==(e=a&&void 0===t?n._resolveDatasetElementOptions(a||{}):n._resolveDataElementOptions(i.data[t=t||0]||{},t)).fill&&null!==e.fill||(e.backgroundColor=e.borderColor),e},_resolveDatasetElementOptions:function(t,e){var n,i,a,r,o=this,s=o.chart,l=o._config,u=t.custom||{},d=s.options.elements[o.datasetElementType.prototype._type]||{},h=o._datasetElementOptions,c={},f={chart:s,dataset:o.getDataset(),datasetIndex:o.index,hover:e};for(n=0,i=h.length;n<i;++n)a=h[n],r=e?"hover"+a.charAt(0).toUpperCase()+a.slice(1):a,c[a]=X([u[r],l[r],d[r]],f);return c},_resolveDataElementOptions:function(t,e){var n=this,i=t&&t.custom,a=n._cachedDataOpts;if(a&&!i)return a;var r,o,s,l,u=n.chart,d=n._config,h=u.options.elements[n.dataElementType.prototype._type]||{},c=n._dataElementOptions,f={},g={chart:u,dataIndex:e,dataset:n.getDataset(),datasetIndex:n.index},m={cacheable:!i};if(i=i||{},V.isArray(c))for(o=0,s=c.length;o<s;++o)f[l=c[o]]=X([i[l],d[l],h[l]],g,e,m);else for(o=0,s=(r=Object.keys(c)).length;o<s;++o)f[l=r[o]]=X([i[l],d[c[l]],d[l],h[l]],g,e,m);return m.cacheable&&(n._cachedDataOpts=Object.freeze(f)),f},removeHoverStyle:function(t){V.merge(t._model,t.$previousStyle||{}),delete t.$previousStyle},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t._index,i=t.custom||{},a=t._model,r=V.getHoverColor;t.$previousStyle={backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderWidth:a.borderWidth},a.backgroundColor=X([i.hoverBackgroundColor,e.hoverBackgroundColor,r(a.backgroundColor)],void 0,n),a.borderColor=X([i.hoverBorderColor,e.hoverBorderColor,r(a.borderColor)],void 0,n),a.borderWidth=X([i.hoverBorderWidth,e.hoverBorderWidth,a.borderWidth],void 0,n)},_removeDatasetHoverStyle:function(){var t=this.getMeta().dataset;t&&this.removeHoverStyle(t)},_setDatasetHoverStyle:function(){var t,e,n,i,a,r,o=this.getMeta().dataset,s={};if(o){for(r=o._model,a=this._resolveDatasetElementOptions(o,!0),t=0,e=(i=Object.keys(a)).length;t<e;++t)s[n=i[t]]=r[n],r[n]=a[n];o.$previousStyle=s}},resyncElements:function(){var t=this,e=t.getMeta(),n=t.getDataset().data,i=e.data.length,a=n.length;a<i?e.data.splice(a,i-a):a>i&&t.insertElements(i,a-i)},insertElements:function(t,e){for(var n=0;n<e;++n)this.addElementAndReset(t+n)},onDataPush:function(){var t=arguments.length;this.insertElements(this.getDataset().data.length-t,t)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(t,e){this.getMeta().data.splice(t,e),this.insertElements(t,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),Q.extend=V.inherits;var tt=Q,et=2*Math.PI;function nt(t,e){var n=e.startAngle,i=e.endAngle,a=e.pixelMargin,r=a/e.outerRadius,o=e.x,s=e.y;t.beginPath(),t.arc(o,s,e.outerRadius,n-r,i+r),e.innerRadius>a?t.arc(o,s,e.innerRadius-a,i+(r=a/e.innerRadius),n-r,!0):t.arc(o,s,a,i+Math.PI/2,n-Math.PI/2),t.closePath(),t.clip()}N._set("global",{elements:{arc:{backgroundColor:N.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var it=G.extend({_type:"arc",inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2)},inRange:function(t,e){var n=this._view;if(n){for(var i=V.getAngleFromPoint(n,{x:t,y:e}),a=i.angle,r=i.distance,o=n.startAngle,s=n.endAngle;s<o;)s+=et;for(;a>s;)a-=et;for(;a<o;)a+=et;return a>=o&&a<=s&&r>=n.innerRadius&&r<=n.outerRadius}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t,e=this._chart.ctx,n=this._view,i="inner"===n.borderAlign?.33:0,a={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-i,0),pixelMargin:i,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/et)};if(e.save(),e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,a.fullCircles){for(a.endAngle=a.startAngle+et,e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),t=0;t<a.fullCircles;++t)e.fill();a.endAngle=a.startAngle+n.circumference%et}e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),e.fill(),n.borderWidth&&function(t,e,n){var i="inner"===e.borderAlign;i?(t.lineWidth=2*e.borderWidth,t.lineJoin="round"):(t.lineWidth=e.borderWidth,t.lineJoin="bevel"),n.fullCircles&&function(t,e,n,i){var a,r=n.endAngle;for(i&&(n.endAngle=n.startAngle+et,nt(t,n),n.endAngle=r,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=et,n.fullCircles--)),t.beginPath(),t.arc(n.x,n.y,n.innerRadius,n.startAngle+et,n.startAngle,!0),a=0;a<n.fullCircles;++a)t.stroke();for(t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.startAngle+et),a=0;a<n.fullCircles;++a)t.stroke()}(t,e,n,i),i&&nt(t,n),t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.endAngle),t.arc(n.x,n.y,n.innerRadius,n.endAngle,n.startAngle,!0),t.closePath(),t.stroke()}(e,n,a),e.restore()}}),at=V.valueOrDefault,rt=N.global.defaultColor;N._set("global",{elements:{line:{tension:.4,backgroundColor:rt,borderWidth:3,borderColor:rt,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var ot=G.extend({_type:"line",draw:function(){var t,e,n,i=this,a=i._view,r=i._chart.ctx,o=a.spanGaps,s=i._children.slice(),l=N.global,u=l.elements.line,d=-1,h=i._loop;if(s.length){if(i._loop){for(t=0;t<s.length;++t)if(e=V.previousItem(s,t),!s[t]._view.skip&&e._view.skip){s=s.slice(t).concat(s.slice(0,t)),h=o;break}h&&s.push(s[0])}for(r.save(),r.lineCap=a.borderCapStyle||u.borderCapStyle,r.setLineDash&&r.setLineDash(a.borderDash||u.borderDash),r.lineDashOffset=at(a.borderDashOffset,u.borderDashOffset),r.lineJoin=a.borderJoinStyle||u.borderJoinStyle,r.lineWidth=at(a.borderWidth,u.borderWidth),r.strokeStyle=a.borderColor||l.defaultColor,r.beginPath(),(n=s[0]._view).skip||(r.moveTo(n.x,n.y),d=0),t=1;t<s.length;++t)n=s[t]._view,e=-1===d?V.previousItem(s,t):s[d],n.skip||(d!==t-1&&!o||-1===d?r.moveTo(n.x,n.y):V.canvas.lineTo(r,e._view,n),d=t);h&&r.closePath(),r.stroke(),r.restore()}}}),st=V.valueOrDefault,lt=N.global.defaultColor;function ut(t){var e=this._view;return!!e&&Math.abs(t-e.x)<e.radius+e.hitRadius}N._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:lt,borderColor:lt,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var dt=G.extend({_type:"point",inRange:function(t,e){var n=this._view;return!!n&&Math.pow(t-n.x,2)+Math.pow(e-n.y,2)<Math.pow(n.hitRadius+n.radius,2)},inLabelRange:ut,inXRange:ut,inYRange:function(t){var e=this._view;return!!e&&Math.abs(t-e.y)<e.radius+e.hitRadius},getCenterPoint:function(){var t=this._view;return{x:t.x,y:t.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(t){var e=this._view,n=this._chart.ctx,i=e.pointStyle,a=e.rotation,r=e.radius,o=e.x,s=e.y,l=N.global,u=l.defaultColor;e.skip||(void 0===t||V.canvas._isPointInArea(e,t))&&(n.strokeStyle=e.borderColor||u,n.lineWidth=st(e.borderWidth,l.elements.point.borderWidth),n.fillStyle=e.backgroundColor||u,V.canvas.drawPoint(n,i,r,o,s,a))}}),ht=N.global.defaultColor;function ct(t){return t&&void 0!==t.width}function ft(t){var e,n,i,a,r;return ct(t)?(e=t.x-(r=t.width/2),n=t.x+r,i=Math.min(t.y,t.base),a=Math.max(t.y,t.base)):(r=t.height/2,e=Math.min(t.x,t.base),n=Math.max(t.x,t.base),i=t.y-r,a=t.y+r),{left:e,top:i,right:n,bottom:a}}function gt(t,e,n){return t===e?n:t===n?e:t}function mt(t,e,n){var i=null===e,a=null===n,r=!(!t||i&&a)&&ft(t);return r&&(i||e>=r.left&&e<=r.right)&&(a||n>=r.top&&n<=r.bottom)}N._set("global",{elements:{rectangle:{backgroundColor:ht,borderColor:ht,borderSkipped:"bottom",borderWidth:0}}});var pt=G.extend({_type:"rectangle",draw:function(){var t=this._chart.ctx,e=this._view,n=function(t){var e=ft(t),n=e.right-e.left,i=e.bottom-e.top,a=function(t,e,n){var i,a,r,o,s=t.borderWidth,l=function(t){var e=t.borderSkipped,n={};return e?(t.horizontal?t.base>t.x&&(e=gt(e,"left","right")):t.base<t.y&&(e=gt(e,"bottom","top")),n[e]=!0,n):n}(t);return V.isObject(s)?(i=+s.top||0,a=+s.right||0,r=+s.bottom||0,o=+s.left||0):i=a=r=o=+s||0,{t:l.top||i<0?0:i>n?n:i,r:l.right||a<0?0:a>e?e:a,b:l.bottom||r<0?0:r>n?n:r,l:l.left||o<0?0:o>e?e:o}}(t,n/2,i/2);return{outer:{x:e.left,y:e.top,w:n,h:i},inner:{x:e.left+a.l,y:e.top+a.t,w:n-a.l-a.r,h:i-a.t-a.b}}}(e),i=n.outer,a=n.inner;t.fillStyle=e.backgroundColor,t.fillRect(i.x,i.y,i.w,i.h),i.w===a.w&&i.h===a.h||(t.save(),t.beginPath(),t.rect(i.x,i.y,i.w,i.h),t.clip(),t.fillStyle=e.borderColor,t.rect(a.x,a.y,a.w,a.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return mt(this._view,t,e)},inLabelRange:function(t,e){var n=this._view;return ct(n)?mt(n,t,null):mt(n,null,e)},inXRange:function(t){return mt(this._view,t,null)},inYRange:function(t){return mt(this._view,null,t)},getCenterPoint:function(){var t,e,n=this._view;return ct(n)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return ct(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),vt={},bt=ot,yt=dt,xt=pt;vt.Arc=it,vt.Line=bt,vt.Point=yt,vt.Rectangle=xt;var _t=V._deprecated,wt=V.valueOrDefault;N._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),N._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var kt=tt.extend({dataElementType:vt.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t,e,n=this;tt.prototype.initialize.apply(n,arguments),(t=n.getMeta()).stack=n.getDataset().stack,t.bar=!0,e=n._getIndexScale().options,_t("bar chart",e.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),_t("bar chart",e.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),_t("bar chart",e.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),_t("bar chart",n._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),_t("bar chart",e.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(t){var e,n,i=this,a=i.getMeta().data;for(i._ruler=i.getRuler(),e=0,n=a.length;e<n;++e)i.updateElement(a[e],e,t)},updateElement:function(t,e,n){var i=this,a=i.getMeta(),r=i.getDataset(),o=i._resolveDataElementOptions(t,e);t._xScale=i.getScaleForId(a.xAxisID),t._yScale=i.getScaleForId(a.yAxisID),t._datasetIndex=i.index,t._index=e,t._model={backgroundColor:o.backgroundColor,borderColor:o.borderColor,borderSkipped:o.borderSkipped,borderWidth:o.borderWidth,datasetLabel:r.label,label:i.chart.data.labels[e]},V.isArray(r.data[e])&&(t._model.borderSkipped=null),i._updateElementGeometry(t,e,n,o),t.pivot()},_updateElementGeometry:function(t,e,n,i){var a=this,r=t._model,o=a._getValueScale(),s=o.getBasePixel(),l=o.isHorizontal(),u=a._ruler||a.getRuler(),d=a.calculateBarValuePixels(a.index,e,i),h=a.calculateBarIndexPixels(a.index,e,u,i);r.horizontal=l,r.base=n?s:d.base,r.x=l?n?s:d.head:h.center,r.y=l?h.center:n?s:d.head,r.height=l?h.size:void 0,r.width=l?void 0:h.size},_getStacks:function(t){var e,n,i=this._getIndexScale(),a=i._getMatchingVisibleMetas(this._type),r=i.options.stacked,o=a.length,s=[];for(e=0;e<o&&(n=a[e],(!1===r||-1===s.indexOf(n.stack)||void 0===r&&void 0===n.stack)&&s.push(n.stack),n.index!==t);++e);return s},getStackCount:function(){return this._getStacks().length},getStackIndex:function(t,e){var n=this._getStacks(t),i=void 0!==e?n.indexOf(e):-1;return-1===i?n.length-1:i},getRuler:function(){var t,e,n=this,i=n._getIndexScale(),a=[];for(t=0,e=n.getMeta().data.length;t<e;++t)a.push(i.getPixelForValue(null,t,n.index));return{pixels:a,start:i._startPixel,end:i._endPixel,stackCount:n.getStackCount(),scale:i}},calculateBarValuePixels:function(t,e,n){var i,a,r,o,s,l,u,d=this,h=d.chart,c=d._getValueScale(),f=c.isHorizontal(),g=h.data.datasets,m=c._getMatchingVisibleMetas(d._type),p=c._parseValue(g[t].data[e]),v=n.minBarLength,b=c.options.stacked,y=d.getMeta().stack,x=void 0===p.start?0:p.max>=0&&p.min>=0?p.min:p.max,_=void 0===p.start?p.end:p.max>=0&&p.min>=0?p.max-p.min:p.min-p.max,w=m.length;if(b||void 0===b&&void 0!==y)for(i=0;i<w&&(a=m[i]).index!==t;++i)a.stack===y&&(r=void 0===(u=c._parseValue(g[a.index].data[e])).start?u.end:u.min>=0&&u.max>=0?u.max:u.min,(p.min<0&&r<0||p.max>=0&&r>0)&&(x+=r));return o=c.getPixelForValue(x),l=(s=c.getPixelForValue(x+_))-o,void 0!==v&&Math.abs(l)<v&&(l=v,s=_>=0&&!f||_<0&&f?o-v:o+v),{size:l,base:o,head:s,center:s+l/2}},calculateBarIndexPixels:function(t,e,n,i){var a="flex"===i.barThickness?function(t,e,n){var i,a=e.pixels,r=a[t],o=t>0?a[t-1]:null,s=t<a.length-1?a[t+1]:null,l=n.categoryPercentage;return null===o&&(o=r-(null===s?e.end-e.start:s-r)),null===s&&(s=r+r-o),i=r-(r-Math.min(o,s))/2*l,{chunk:Math.abs(s-o)/2*l/e.stackCount,ratio:n.barPercentage,start:i}}(e,n,i):function(t,e,n){var i,a,r=n.barThickness,o=e.stackCount,s=e.pixels[t],l=V.isNullOrUndef(r)?function(t,e){var n,i,a,r,o=t._length;for(a=1,r=e.length;a<r;++a)o=Math.min(o,Math.abs(e[a]-e[a-1]));for(a=0,r=t.getTicks().length;a<r;++a)i=t.getPixelForTick(a),o=a>0?Math.min(o,Math.abs(i-n)):o,n=i;return o}(e.scale,e.pixels):-1;return V.isNullOrUndef(r)?(i=l*n.categoryPercentage,a=n.barPercentage):(i=r*o,a=1),{chunk:i/o,ratio:a,start:s-i/2}}(e,n,i),r=this.getStackIndex(t,this.getMeta().stack),o=a.start+a.chunk*r+a.chunk/2,s=Math.min(wt(i.maxBarThickness,1/0),a.chunk*a.ratio);return{base:o-s/2,head:o+s/2,center:o,size:s}},draw:function(){var t=this,e=t.chart,n=t._getValueScale(),i=t.getMeta().data,a=t.getDataset(),r=i.length,o=0;for(V.canvas.clipArea(e.ctx,e.chartArea);o<r;++o){var s=n._parseValue(a.data[o]);isNaN(s.min)||isNaN(s.max)||i[o].draw()}V.canvas.unclipArea(e.ctx)},_resolveDataElementOptions:function(){var t=this,e=V.extend({},tt.prototype._resolveDataElementOptions.apply(t,arguments)),n=t._getIndexScale().options,i=t._getValueScale().options;return e.barPercentage=wt(n.barPercentage,e.barPercentage),e.barThickness=wt(n.barThickness,e.barThickness),e.categoryPercentage=wt(n.categoryPercentage,e.categoryPercentage),e.maxBarThickness=wt(n.maxBarThickness,e.maxBarThickness),e.minBarLength=wt(i.minBarLength,e.minBarLength),e}}),Mt=V.valueOrDefault,St=V.options.resolve;N._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return(e.datasets[t.datasetIndex].label||"")+": ("+t.xLabel+", "+t.yLabel+", "+e.datasets[t.datasetIndex].data[t.index].r+")"}}}});var Dt=tt.extend({dataElementType:vt.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(t){var e=this,n=e.getMeta();V.each(n.data,(function(n,i){e.updateElement(n,i,t)}))},updateElement:function(t,e,n){var i=this,a=i.getMeta(),r=t.custom||{},o=i.getScaleForId(a.xAxisID),s=i.getScaleForId(a.yAxisID),l=i._resolveDataElementOptions(t,e),u=i.getDataset().data[e],d=i.index,h=n?o.getPixelForDecimal(.5):o.getPixelForValue("object"==typeof u?u:NaN,e,d),c=n?s.getBasePixel():s.getPixelForValue(u,e,d);t._xScale=o,t._yScale=s,t._options=l,t._datasetIndex=d,t._index=e,t._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,rotation:l.rotation,radius:n?0:l.radius,skip:r.skip||isNaN(h)||isNaN(c),x:h,y:c},t.pivot()},setHoverStyle:function(t){var e=t._model,n=t._options,i=V.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Mt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Mt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Mt(n.hoverBorderWidth,n.borderWidth),e.radius=n.radius+n.hoverRadius},_resolveDataElementOptions:function(t,e){var n=this,i=n.chart,a=n.getDataset(),r=t.custom||{},o=a.data[e]||{},s=tt.prototype._resolveDataElementOptions.apply(n,arguments),l={chart:i,dataIndex:e,dataset:a,datasetIndex:n.index};return n._cachedDataOpts===s&&(s=V.extend({},s)),s.radius=St([r.radius,o.r,n._config.radius,i.options.elements.point.radius],l,e),s}}),Ct=V.valueOrDefault,Pt=Math.PI,Tt=2*Pt,Ot=Pt/2;N._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e,n,i,a=document.createElement("ul"),r=t.data,o=r.datasets,s=r.labels;if(a.setAttribute("class",t.id+"-legend"),o.length)for(e=0,n=o[0].data.length;e<n;++e)(i=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[e],s[e]&&i.appendChild(document.createTextNode(s[e]));return a.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,i){var a=t.getDatasetMeta(0),r=a.controller.getStyle(i);return{text:n,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,hidden:isNaN(e.datasets[0].data[i])||a.data[i].hidden,index:i}})):[]}},onClick:function(t,e){var n,i,a,r=e.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n<i;++n)(a=o.getDatasetMeta(n)).data[r]&&(a.data[r].hidden=!a.data[r].hidden);o.update()}},cutoutPercentage:50,rotation:-Ot,circumference:Tt,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.labels[t.index],i=": "+e.datasets[t.datasetIndex].data[t.index];return V.isArray(n)?(n=n.slice())[0]+=i:n+=i,n}}}});var At=tt.extend({dataElementType:vt.Arc,linkScales:V.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&++e;return e},update:function(t){var e,n,i=this,a=i.chart,r=a.chartArea,o=a.options,s=1,l=1,u=0,d=0,h=i.getMeta(),c=h.data,f=o.cutoutPercentage/100||0,g=o.circumference,m=i._getRingWeight(i.index);if(g<Tt){var p=o.rotation%Tt,v=(p+=p>=Pt?-Tt:p<-Pt?Tt:0)+g,b=Math.cos(p),y=Math.sin(p),x=Math.cos(v),_=Math.sin(v),w=p<=0&&v>=0||v>=Tt,k=p<=Ot&&v>=Ot||v>=Tt+Ot,M=p<=-Ot&&v>=-Ot||v>=Pt+Ot,S=p===-Pt||v>=Pt?-1:Math.min(b,b*f,x,x*f),D=M?-1:Math.min(y,y*f,_,_*f),C=w?1:Math.max(b,b*f,x,x*f),P=k?1:Math.max(y,y*f,_,_*f);s=(C-S)/2,l=(P-D)/2,u=-(C+S)/2,d=-(P+D)/2}for(e=0,n=c.length;e<n;++e)c[e]._options=i._resolveDataElementOptions(c[e],e);for(a.borderWidth=i.getMaxBorderWidth(),a.outerRadius=Math.max(Math.min((r.right-r.left-a.borderWidth)/s,(r.bottom-r.top-a.borderWidth)/l)/2,0),a.innerRadius=Math.max(a.outerRadius*f,0),a.radiusLength=(a.outerRadius-a.innerRadius)/(i._getVisibleDatasetWeightTotal()||1),a.offsetX=u*a.outerRadius,a.offsetY=d*a.outerRadius,h.total=i.calculateTotal(),i.outerRadius=a.outerRadius-a.radiusLength*i._getRingWeightOffset(i.index),i.innerRadius=Math.max(i.outerRadius-a.radiusLength*m,0),e=0,n=c.length;e<n;++e)i.updateElement(c[e],e,t)},updateElement:function(t,e,n){var i=this,a=i.chart,r=a.chartArea,o=a.options,s=o.animation,l=(r.left+r.right)/2,u=(r.top+r.bottom)/2,d=o.rotation,h=o.rotation,c=i.getDataset(),f=n&&s.animateRotate||t.hidden?0:i.calculateCircumference(c.data[e])*(o.circumference/Tt),g=t._options||{};V.extend(t,{_datasetIndex:i.index,_index:e,_model:{backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,borderAlign:g.borderAlign,x:l+a.offsetX,y:u+a.offsetY,startAngle:d,endAngle:h,circumference:f,outerRadius:n&&s.animateScale?0:i.outerRadius,innerRadius:n&&s.animateScale?0:i.innerRadius,label:V.valueAtIndexOrDefault(c.label,e,a.data.labels[e])}});var m=t._model;n&&s.animateRotate||(m.startAngle=0===e?o.rotation:i.getMeta().data[e-1]._model.endAngle,m.endAngle=m.startAngle+m.circumference),t.pivot()},calculateTotal:function(){var t,e=this.getDataset(),n=this.getMeta(),i=0;return V.each(n.data,(function(n,a){t=e.data[a],isNaN(t)||n.hidden||(i+=Math.abs(t))})),i},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?Tt*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,n,i,a,r,o,s,l,u=0,d=this.chart;if(!t)for(e=0,n=d.data.datasets.length;e<n;++e)if(d.isDatasetVisible(e)){t=(i=d.getDatasetMeta(e)).data,e!==this.index&&(r=i.controller);break}if(!t)return 0;for(e=0,n=t.length;e<n;++e)a=t[e],r?(r._configure(),o=r._resolveDataElementOptions(a,e)):o=a._options,"inner"!==o.borderAlign&&(u=(l=o.hoverBorderWidth)>(u=(s=o.borderWidth)>u?s:u)?l:u);return u},setHoverStyle:function(t){var e=t._model,n=t._options,i=V.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=Ct(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Ct(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Ct(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e},_getRingWeight:function(t){return Math.max(Ct(this.chart.data.datasets[t].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});N._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}}),N._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var Ft=kt.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),It=V.valueOrDefault,Lt=V.options.resolve,Rt=V.canvas._isPointInArea;function Nt(t,e){var n=t&&t.options.ticks||{},i=n.reverse,a=void 0===n.min?e:0,r=void 0===n.max?e:0;return{start:i?r:a,end:i?a:r}}function Wt(t,e,n){var i=n/2,a=Nt(t,i),r=Nt(e,i);return{top:r.end,right:a.end,bottom:r.start,left:a.start}}function Yt(t){var e,n,i,a;return V.isObject(t)?(e=t.top,n=t.right,i=t.bottom,a=t.left):e=n=i=a=t,{top:e,right:n,bottom:i,left:a}}N._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var zt=tt.extend({datasetElementType:vt.Line,dataElementType:vt.Point,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth","cubicInterpolationMode","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},update:function(t){var e,n,i=this,a=i.getMeta(),r=a.dataset,o=a.data||[],s=i._config,l=i._showLine=It(s.showLine,i.chart.options.showLines);for(i._xScale=i.getScaleForId(a.xAxisID),i._yScale=i.getScaleForId(a.yAxisID),l&&(void 0!==s.tension&&void 0===s.lineTension&&(s.lineTension=s.tension),r._scale=i._yScale,r._datasetIndex=i.index,r._children=o,r._model=i._resolveDatasetElementOptions(r),r.pivot()),e=0,n=o.length;e<n;++e)i.updateElement(o[e],e,t);for(l&&0!==r._model.tension&&i.updateBezierControlPoints(),e=0,n=o.length;e<n;++e)o[e].pivot()},updateElement:function(t,e,n){var i,a,r=this,o=r.getMeta(),s=t.custom||{},l=r.getDataset(),u=r.index,d=l.data[e],h=r._xScale,c=r._yScale,f=o.dataset._model,g=r._resolveDataElementOptions(t,e);i=h.getPixelForValue("object"==typeof d?d:NaN,e,u),a=n?c.getBasePixel():r.calculatePointY(d,e,u),t._xScale=h,t._yScale=c,t._options=g,t._datasetIndex=u,t._index=e,t._model={x:i,y:a,skip:s.skip||isNaN(i)||isNaN(a),radius:g.radius,pointStyle:g.pointStyle,rotation:g.rotation,backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,tension:It(s.tension,f?f.tension:0),steppedLine:!!f&&f.steppedLine,hitRadius:g.hitRadius}},_resolveDatasetElementOptions:function(t){var e=this,n=e._config,i=t.custom||{},a=e.chart.options,r=a.elements.line,o=tt.prototype._resolveDatasetElementOptions.apply(e,arguments);return o.spanGaps=It(n.spanGaps,a.spanGaps),o.tension=It(n.lineTension,r.tension),o.steppedLine=Lt([i.steppedLine,n.steppedLine,r.stepped]),o.clip=Yt(It(n.clip,Wt(e._xScale,e._yScale,o.borderWidth))),o},calculatePointY:function(t,e,n){var i,a,r,o,s,l,u=this.chart,d=this._yScale,h=0,c=0;if(d.options.stacked){for(o=+d.getRightValue(t),l=(s=u._getSortedVisibleDatasetMetas()).length,i=0;i<l&&(a=s[i]).index!==n;++i)"line"===a.type&&a.yAxisID===d.id&&((r=+d.getRightValue(u.data.datasets[a.index].data[e]))<0?c+=r||0:h+=r||0);return d.getPixelForValue(o<0?c+o:h+o)}return d.getPixelForValue(t)},updateBezierControlPoints:function(){var t,e,n,i,a=this.chart,r=this.getMeta(),o=r.dataset._model,s=a.chartArea,l=r.data||[];function u(t,e,n){return Math.max(Math.min(t,n),e)}if(o.spanGaps&&(l=l.filter((function(t){return!t._model.skip}))),"monotone"===o.cubicInterpolationMode)V.splineCurveMonotone(l);else for(t=0,e=l.length;t<e;++t)n=l[t]._model,i=V.splineCurve(V.previousItem(l,t)._model,n,V.nextItem(l,t)._model,o.tension),n.controlPointPreviousX=i.previous.x,n.controlPointPreviousY=i.previous.y,n.controlPointNextX=i.next.x,n.controlPointNextY=i.next.y;if(a.options.elements.line.capBezierPoints)for(t=0,e=l.length;t<e;++t)Rt(n=l[t]._model,s)&&(t>0&&Rt(l[t-1]._model,s)&&(n.controlPointPreviousX=u(n.controlPointPreviousX,s.left,s.right),n.controlPointPreviousY=u(n.controlPointPreviousY,s.top,s.bottom)),t<l.length-1&&Rt(l[t+1]._model,s)&&(n.controlPointNextX=u(n.controlPointNextX,s.left,s.right),n.controlPointNextY=u(n.controlPointNextY,s.top,s.bottom)))},draw:function(){var t,e=this,n=e.chart,i=e.getMeta(),a=i.data||[],r=n.chartArea,o=n.canvas,s=0,l=a.length;for(e._showLine&&(V.canvas.clipArea(n.ctx,{left:!1===(t=i.dataset._model.clip).left?0:r.left-t.left,right:!1===t.right?o.width:r.right+t.right,top:!1===t.top?0:r.top-t.top,bottom:!1===t.bottom?o.height:r.bottom+t.bottom}),i.dataset.draw(),V.canvas.unclipArea(n.ctx));s<l;++s)a[s].draw(r)},setHoverStyle:function(t){var e=t._model,n=t._options,i=V.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=It(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=It(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=It(n.hoverBorderWidth,n.borderWidth),e.radius=It(n.hoverRadius,n.radius)}}),Et=V.options.resolve;N._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(t){var e,n,i,a=document.createElement("ul"),r=t.data,o=r.datasets,s=r.labels;if(a.setAttribute("class",t.id+"-legend"),o.length)for(e=0,n=o[0].data.length;e<n;++e)(i=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[e],s[e]&&i.appendChild(document.createTextNode(s[e]));return a.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,i){var a=t.getDatasetMeta(0),r=a.controller.getStyle(i);return{text:n,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,hidden:isNaN(e.datasets[0].data[i])||a.data[i].hidden,index:i}})):[]}},onClick:function(t,e){var n,i,a,r=e.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n<i;++n)(a=o.getDatasetMeta(n)).data[r].hidden=!a.data[r].hidden;o.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}});var Vt=tt.extend({dataElementType:vt.Arc,linkScales:V.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,n,i,a=this,r=a.getDataset(),o=a.getMeta(),s=a.chart.options.startAngle||0,l=a._starts=[],u=a._angles=[],d=o.data;for(a._updateRadius(),o.count=a.countVisibleElements(),e=0,n=r.data.length;e<n;e++)l[e]=s,i=a._computeAngle(e),u[e]=i,s+=i;for(e=0,n=d.length;e<n;++e)d[e]._options=a._resolveDataElementOptions(d[e],e),a.updateElement(d[e],e,t)},_updateRadius:function(){var t=this,e=t.chart,n=e.chartArea,i=e.options,a=Math.min(n.right-n.left,n.bottom-n.top);e.outerRadius=Math.max(a/2,0),e.innerRadius=Math.max(i.cutoutPercentage?e.outerRadius/100*i.cutoutPercentage:1,0),e.radiusLength=(e.outerRadius-e.innerRadius)/e.getVisibleDatasetCount(),t.outerRadius=e.outerRadius-e.radiusLength*t.index,t.innerRadius=t.outerRadius-e.radiusLength},updateElement:function(t,e,n){var i=this,a=i.chart,r=i.getDataset(),o=a.options,s=o.animation,l=a.scale,u=a.data.labels,d=l.xCenter,h=l.yCenter,c=o.startAngle,f=t.hidden?0:l.getDistanceFromCenterForValue(r.data[e]),g=i._starts[e],m=g+(t.hidden?0:i._angles[e]),p=s.animateScale?0:l.getDistanceFromCenterForValue(r.data[e]),v=t._options||{};V.extend(t,{_datasetIndex:i.index,_index:e,_scale:l,_model:{backgroundColor:v.backgroundColor,borderColor:v.borderColor,borderWidth:v.borderWidth,borderAlign:v.borderAlign,x:d,y:h,innerRadius:0,outerRadius:n?p:f,startAngle:n&&s.animateRotate?c:g,endAngle:n&&s.animateRotate?c:m,label:V.valueAtIndexOrDefault(u,e,u[e])}}),t.pivot()},countVisibleElements:function(){var t=this.getDataset(),e=this.getMeta(),n=0;return V.each(e.data,(function(e,i){isNaN(t.data[i])||e.hidden||n++})),n},setHoverStyle:function(t){var e=t._model,n=t._options,i=V.getHoverColor,a=V.valueOrDefault;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=a(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=a(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=a(n.hoverBorderWidth,n.borderWidth)},_computeAngle:function(t){var e=this,n=this.getMeta().count,i=e.getDataset(),a=e.getMeta();return isNaN(i.data[t])||a.data[t].hidden?0:Et([e.chart.options.elements.arc.angle,2*Math.PI/n],{chart:e.chart,dataIndex:t,dataset:i,datasetIndex:e.index},t)}});N._set("pie",V.clone(N.doughnut)),N._set("pie",{cutoutPercentage:0});var Ht=At,Bt=V.valueOrDefault;N._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var jt=tt.extend({datasetElementType:vt.Line,dataElementType:vt.Point,linkScales:V.noop,_datasetElementOptions:["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,n,i=this,a=i.getMeta(),r=a.dataset,o=a.data||[],s=i.chart.scale,l=i._config;for(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),r._scale=s,r._datasetIndex=i.index,r._children=o,r._loop=!0,r._model=i._resolveDatasetElementOptions(r),r.pivot(),e=0,n=o.length;e<n;++e)i.updateElement(o[e],e,t);for(i.updateBezierControlPoints(),e=0,n=o.length;e<n;++e)o[e].pivot()},updateElement:function(t,e,n){var i=this,a=t.custom||{},r=i.getDataset(),o=i.chart.scale,s=o.getPointPositionForValue(e,r.data[e]),l=i._resolveDataElementOptions(t,e),u=i.getMeta().dataset._model,d=n?o.xCenter:s.x,h=n?o.yCenter:s.y;t._scale=o,t._options=l,t._datasetIndex=i.index,t._index=e,t._model={x:d,y:h,skip:a.skip||isNaN(d)||isNaN(h),radius:l.radius,pointStyle:l.pointStyle,rotation:l.rotation,backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,tension:Bt(a.tension,u?u.tension:0),hitRadius:l.hitRadius}},_resolveDatasetElementOptions:function(){var t=this,e=t._config,n=t.chart.options,i=tt.prototype._resolveDatasetElementOptions.apply(t,arguments);return i.spanGaps=Bt(e.spanGaps,n.spanGaps),i.tension=Bt(e.lineTension,n.elements.line.tension),i},updateBezierControlPoints:function(){var t,e,n,i,a=this.getMeta(),r=this.chart.chartArea,o=a.data||[];function s(t,e,n){return Math.max(Math.min(t,n),e)}for(a.dataset._model.spanGaps&&(o=o.filter((function(t){return!t._model.skip}))),t=0,e=o.length;t<e;++t)n=o[t]._model,i=V.splineCurve(V.previousItem(o,t,!0)._model,n,V.nextItem(o,t,!0)._model,n.tension),n.controlPointPreviousX=s(i.previous.x,r.left,r.right),n.controlPointPreviousY=s(i.previous.y,r.top,r.bottom),n.controlPointNextX=s(i.next.x,r.left,r.right),n.controlPointNextY=s(i.next.y,r.top,r.bottom)},setHoverStyle:function(t){var e=t._model,n=t._options,i=V.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Bt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Bt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Bt(n.hoverBorderWidth,n.borderWidth),e.radius=Bt(n.hoverRadius,n.radius)}});N._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),N._set("global",{datasets:{scatter:{showLine:!1}}});var Ut={bar:kt,bubble:Dt,doughnut:At,horizontalBar:Ft,line:zt,polarArea:Vt,pie:Ht,radar:jt,scatter:zt};function Gt(t,e){return t.native?{x:t.x,y:t.y}:V.getRelativePosition(t,e)}function qt(t,e){var n,i,a,r,o,s,l=t._getSortedVisibleDatasetMetas();for(i=0,r=l.length;i<r;++i)for(a=0,o=(n=l[i].data).length;a<o;++a)(s=n[a])._view.skip||e(s)}function Zt(t,e){var n=[];return qt(t,(function(t){t.inRange(e.x,e.y)&&n.push(t)})),n}function $t(t,e,n,i){var a=Number.POSITIVE_INFINITY,r=[];return qt(t,(function(t){if(!n||t.inRange(e.x,e.y)){var o=t.getCenterPoint(),s=i(e,o);s<a?(r=[t],a=s):s===a&&r.push(t)}})),r}function Xt(t){var e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,i){var a=e?Math.abs(t.x-i.x):0,r=n?Math.abs(t.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(r,2))}}function Jt(t,e,n){var i=Gt(e,t);n.axis=n.axis||"x";var a=Xt(n.axis),r=n.intersect?Zt(t,i):$t(t,i,!1,a),o=[];return r.length?(t._getSortedVisibleDatasetMetas().forEach((function(t){var e=t.data[r[0]._index];e&&!e._view.skip&&o.push(e)})),o):[]}var Kt={modes:{single:function(t,e){var n=Gt(e,t),i=[];return qt(t,(function(t){if(t.inRange(n.x,n.y))return i.push(t),i})),i.slice(0,1)},label:Jt,index:Jt,dataset:function(t,e,n){var i=Gt(e,t);n.axis=n.axis||"xy";var a=Xt(n.axis),r=n.intersect?Zt(t,i):$t(t,i,!1,a);return r.length>0&&(r=t.getDatasetMeta(r[0]._datasetIndex).data),r},"x-axis":function(t,e){return Jt(t,e,{intersect:!1})},point:function(t,e){return Zt(t,Gt(e,t))},nearest:function(t,e,n){var i=Gt(e,t);n.axis=n.axis||"xy";var a=Xt(n.axis);return $t(t,i,n.intersect,a)},x:function(t,e,n){var i=Gt(e,t),a=[],r=!1;return qt(t,(function(t){t.inXRange(i.x)&&a.push(t),t.inRange(i.x,i.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a},y:function(t,e,n){var i=Gt(e,t),a=[],r=!1;return qt(t,(function(t){t.inYRange(i.y)&&a.push(t),t.inRange(i.x,i.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a}}},Qt=V.extend;function te(t,e){return V.where(t,(function(t){return t.pos===e}))}function ee(t,e){return t.sort((function(t,n){var i=e?n:t,a=e?t:n;return i.weight===a.weight?i.index-a.index:i.weight-a.weight}))}function ne(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function ie(t,e,n){var i,a,r=n.box,o=t.maxPadding;if(n.size&&(t[n.pos]-=n.size),n.size=n.horizontal?r.height:r.width,t[n.pos]+=n.size,r.getPadding){var s=r.getPadding();o.top=Math.max(o.top,s.top),o.left=Math.max(o.left,s.left),o.bottom=Math.max(o.bottom,s.bottom),o.right=Math.max(o.right,s.right)}if(i=e.outerWidth-ne(o,t,"left","right"),a=e.outerHeight-ne(o,t,"top","bottom"),i!==t.w||a!==t.h){t.w=i,t.h=a;var l=n.horizontal?[i,t.w]:[a,t.h];return!(l[0]===l[1]||isNaN(l[0])&&isNaN(l[1]))}}function ae(t,e){var n,i=e.maxPadding;return n={left:0,top:0,right:0,bottom:0},(t?["left","right"]:["top","bottom"]).forEach((function(t){n[t]=Math.max(e[t],i[t])})),n}function re(t,e,n){var i,a,r,o,s,l,u=[];for(i=0,a=t.length;i<a;++i)(o=(r=t[i]).box).update(r.width||e.w,r.height||e.h,ae(r.horizontal,e)),ie(e,n,r)&&(l=!0,u.length&&(s=!0)),o.fullWidth||u.push(r);return s&&re(u,e,n)||l}function oe(t,e,n){var i,a,r,o,s=n.padding,l=e.x,u=e.y;for(i=0,a=t.length;i<a;++i)o=(r=t[i]).box,r.horizontal?(o.left=o.fullWidth?s.left:e.left,o.right=o.fullWidth?n.outerWidth-s.right:e.left+e.w,o.top=u,o.bottom=u+o.height,o.width=o.right-o.left,u=o.bottom):(o.left=l,o.right=l+o.width,o.top=e.top,o.bottom=e.top+e.h,o.height=o.bottom-o.top,l=o.right);e.x=l,e.y=u}N._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var se,le={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw:function(){e.draw.apply(e,arguments)}}]},t.boxes.push(e)},removeBox:function(t,e){var n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure:function(t,e,n){for(var i,a=["fullWidth","position","weight"],r=a.length,o=0;o<r;++o)n.hasOwnProperty(i=a[o])&&(e[i]=n[i])},update:function(t,e,n){if(t){var i=V.options.toPadding((t.options.layout||{}).padding),a=e-i.width,r=n-i.height,o=function(t){var e=function(t){var e,n,i,a=[];for(e=0,n=(t||[]).length;e<n;++e)a.push({index:e,box:i=t[e],pos:i.position,horizontal:i.isHorizontal(),weight:i.weight});return a}(t),n=ee(te(e,"left"),!0),i=ee(te(e,"right")),a=ee(te(e,"top"),!0),r=ee(te(e,"bottom"));return{leftAndTop:n.concat(a),rightAndBottom:i.concat(r),chartArea:te(e,"chartArea"),vertical:n.concat(i),horizontal:a.concat(r)}}(t.boxes),s=o.vertical,l=o.horizontal,u=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:a,vBoxMaxWidth:a/2/s.length,hBoxMaxHeight:r/2}),d=Qt({maxPadding:Qt({},i),w:a,h:r,x:i.left,y:i.top},i);!function(t,e){var n,i,a;for(n=0,i=t.length;n<i;++n)(a=t[n]).width=a.horizontal?a.box.fullWidth&&e.availableWidth:e.vBoxMaxWidth,a.height=a.horizontal&&e.hBoxMaxHeight}(s.concat(l),u),re(s,d,u),re(l,d,u)&&re(s,d,u),function(t){var e=t.maxPadding;function n(n){var i=Math.max(e[n]-t[n],0);return t[n]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}(d),oe(o.leftAndTop,d,u),d.x+=d.w,d.y+=d.h,oe(o.rightAndBottom,d,u),t.chartArea={left:d.left,top:d.top,right:d.left+d.w,bottom:d.top+d.h},V.each(o.chartArea,(function(e){var n=e.box;Qt(n,t.chartArea),n.update(d.w,d.h)}))}}},ue=(se=Object.freeze({__proto__:null,default:"/*\r\n * DOM element rendering detection\r\n * https://davidwalsh.name/detect-node-insertion\r\n */\r\n@keyframes chartjs-render-animation {\r\n\tfrom { opacity: 0.99; }\r\n\tto { opacity: 1; }\r\n}\r\n\r\n.chartjs-render-monitor {\r\n\tanimation: chartjs-render-animation 0.001s;\r\n}\r\n\r\n/*\r\n * DOM element resizing detection\r\n * https://github.com/marcj/css-element-queries\r\n */\r\n.chartjs-size-monitor,\r\n.chartjs-size-monitor-expand,\r\n.chartjs-size-monitor-shrink {\r\n\tposition: absolute;\r\n\tdirection: ltr;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n\toverflow: hidden;\r\n\tpointer-events: none;\r\n\tvisibility: hidden;\r\n\tz-index: -1;\r\n}\r\n\r\n.chartjs-size-monitor-expand > div {\r\n\tposition: absolute;\r\n\twidth: 1000000px;\r\n\theight: 1000000px;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n\r\n.chartjs-size-monitor-shrink > div {\r\n\tposition: absolute;\r\n\twidth: 200%;\r\n\theight: 200%;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n"}))&&se.default||se,de="chartjs-size-monitor",he="chartjs-render-monitor",ce=["animationstart","webkitAnimationStart"],fe={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function ge(t,e){var n=V.getStyle(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?Number(i[1]):void 0}var me=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(n){}return t}()&&{passive:!0};function pe(t,e,n){t.addEventListener(e,n,me)}function ve(t,e,n){t.removeEventListener(e,n,me)}function be(t,e,n,i,a){return{type:t,chart:e,native:a||null,x:void 0!==n?n:null,y:void 0!==i?i:null}}function ye(t){var e=document.createElement("div");return e.className=t||"",e}var xe={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(t){if(!this.disableCSSInjection){var e=t.getRootNode?t.getRootNode():document;!function(t,e){var n=t.$chartjs||(t.$chartjs={});if(!n.containsStyles){n.containsStyles=!0,e="/* Chart.js */\n"+e;var i=document.createElement("style");i.setAttribute("type","text/css"),i.appendChild(document.createTextNode(e)),t.appendChild(i)}}(e.host?e:document.head,ue)}},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(this._ensureLoaded(t),function(t,e){var n=t.style,i=t.getAttribute("height"),a=t.getAttribute("width");if(t.$chartjs={initial:{height:i,width:a,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===a||""===a){var r=ge(t,"width");void 0!==r&&(t.width=r)}if(null===i||""===i)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var o=ge(t,"height");void 0!==r&&(t.height=o)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e.$chartjs){var n=e.$chartjs.initial;["height","width"].forEach((function(t){var i=n[t];V.isNullOrUndef(i)?e.removeAttribute(t):e.setAttribute(t,i)})),V.each(n.style||{},(function(t,n){e.style[n]=t})),e.width=e.width,delete e.$chartjs}},addEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var a=n.$chartjs||(n.$chartjs={});pe(i,e,(a.proxies||(a.proxies={}))[t.id+"_"+e]=function(e){n(function(t,e){var n=fe[t.type]||t.type,i=V.getRelativePosition(t,e);return be(n,e,i.x,i.y,t)}(e,t))})}else!function(t,e,n){var i,a,r,o,s=t.$chartjs||(t.$chartjs={}),l=s.resizer=function(t){var e=1e6,n=ye(de),i=ye(de+"-expand"),a=ye(de+"-shrink");i.appendChild(ye()),a.appendChild(ye()),n.appendChild(i),n.appendChild(a),n._reset=function(){i.scrollLeft=e,i.scrollTop=e,a.scrollLeft=e,a.scrollTop=e};var r=function(){n._reset(),t()};return pe(i,"scroll",r.bind(i,"expand")),pe(a,"scroll",r.bind(a,"shrink")),n}((i=function(){if(s.resizer){var i=n.options.maintainAspectRatio&&t.parentNode,a=i?i.clientWidth:0;e(be("resize",n)),i&&i.clientWidth<a&&n.canvas&&e(be("resize",n))}},r=!1,o=[],function(){o=Array.prototype.slice.call(arguments),a=a||this,r||(r=!0,V.requestAnimFrame.call(window,(function(){r=!1,i.apply(a,o)})))}));!function(t,e){var n=t.$chartjs||(t.$chartjs={}),i=n.renderProxy=function(t){"chartjs-render-animation"===t.animationName&&e()};V.each(ce,(function(e){pe(t,e,i)})),n.reflow=!!t.offsetParent,t.classList.add(he)}(t,(function(){if(s.resizer){var e=t.parentNode;e&&e!==l.parentNode&&e.insertBefore(l,e.firstChild),l._reset()}}))}(i,n,t)},removeEventListener:function(t,e,n){var i,a,r,o=t.canvas;if("resize"!==e){var s=((n.$chartjs||{}).proxies||{})[t.id+"_"+e];s&&ve(o,e,s)}else r=(a=(i=o).$chartjs||{}).resizer,delete a.resizer,function(t){var e=t.$chartjs||{},n=e.renderProxy;n&&(V.each(ce,(function(e){ve(t,e,n)})),delete e.renderProxy),t.classList.remove(he)}(i),r&&r.parentNode&&r.parentNode.removeChild(r)}};V.addEvent=pe,V.removeEvent=ve;var _e=V.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},xe._enabled?xe:{acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}});N._set("global",{plugins:{}});var we={_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach((function(t){-1===e.indexOf(t)&&e.push(t)})),this._cacheId++},unregister:function(t){var e=this._plugins;[].concat(t).forEach((function(t){var n=e.indexOf(t);-1!==n&&e.splice(n,1)})),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,n){var i,a,r,o,s,l=this.descriptors(t),u=l.length;for(i=0;i<u;++i)if("function"==typeof(s=(r=(a=l[i]).plugin)[e])&&((o=[t].concat(n||[])).push(a.options),!1===s.apply(r,o)))return!1;return!0},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId)return e.descriptors;var n=[],i=[],a=t&&t.config||{},r=a.options&&a.options.plugins||{};return this._plugins.concat(a.plugins||[]).forEach((function(t){if(-1===n.indexOf(t)){var e=t.id,a=r[e];!1!==a&&(!0===a&&(a=V.clone(N.global.plugins[e])),n.push(t),i.push({plugin:t,options:a||{}}))}})),e.descriptors=i,e.id=this._cacheId,i},_invalidate:function(t){delete t.$plugins}},ke={constructors:{},defaults:{},registerScaleType:function(t,e,n){this.constructors[t]=e,this.defaults[t]=V.clone(n)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?V.merge(Object.create(null),[N.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){var n=this;n.defaults.hasOwnProperty(t)&&(n.defaults[t]=V.extend(n.defaults[t],e))},addScalesToLayout:function(t){V.each(t.scales,(function(e){e.fullWidth=e.options.fullWidth,e.position=e.options.position,e.weight=e.options.weight,le.addBox(t,e)}))}},Me=V.valueOrDefault,Se=V.rtl.getRtlAdapter;N._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:V.noop,title:function(t,e){var n="",i=e.labels,a=i?i.length:0;if(t.length>0){var r=t[0];r.label?n=r.label:r.xLabel?n=r.xLabel:a>0&&r.index<a&&(n=i[r.index])}return n},afterTitle:V.noop,beforeBody:V.noop,beforeLabel:V.noop,label:function(t,e){var n=e.datasets[t.datasetIndex].label||"";return n&&(n+=": "),V.isNullOrUndef(t.value)?n+=t.yLabel:n+=t.value,n},labelColor:function(t,e){var n=e.getDatasetMeta(t.datasetIndex).data[t.index]._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:V.noop,afterBody:V.noop,beforeFooter:V.noop,footer:V.noop,afterFooter:V.noop}}});var De={average:function(t){if(!t.length)return!1;var e,n,i=0,a=0,r=0;for(e=0,n=t.length;e<n;++e){var o=t[e];if(o&&o.hasValue()){var s=o.tooltipPosition();i+=s.x,a+=s.y,++r}}return{x:i/r,y:a/r}},nearest:function(t,e){var n,i,a,r=e.x,o=e.y,s=Number.POSITIVE_INFINITY;for(n=0,i=t.length;n<i;++n){var l=t[n];if(l&&l.hasValue()){var u=l.getCenterPoint(),d=V.distanceBetweenPoints(e,u);d<s&&(s=d,a=l)}}if(a){var h=a.tooltipPosition();r=h.x,o=h.y}return{x:r,y:o}}};function Ce(t,e){return e&&(V.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Pe(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function Te(t){var e=N.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:Me(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:Me(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:Me(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:Me(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:Me(t.titleFontStyle,e.defaultFontStyle),titleFontSize:Me(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:Me(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:Me(t.footerFontStyle,e.defaultFontStyle),footerFontSize:Me(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function Oe(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function Ae(t){return Ce([],Pe(t))}var Fe=G.extend({initialize:function(){this._model=Te(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options,n=e.callbacks,i=n.beforeTitle.apply(t,arguments),a=n.title.apply(t,arguments),r=n.afterTitle.apply(t,arguments),o=[];return o=Ce(o,Pe(i)),o=Ce(o,Pe(a)),Ce(o,Pe(r))},getBeforeBody:function(){return Ae(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var n=this,i=n._options.callbacks,a=[];return V.each(t,(function(t){var r={before:[],lines:[],after:[]};Ce(r.before,Pe(i.beforeLabel.call(n,t,e))),Ce(r.lines,i.label.call(n,t,e)),Ce(r.after,Pe(i.afterLabel.call(n,t,e))),a.push(r)})),a},getAfterBody:function(){return Ae(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this,e=t._options.callbacks,n=e.beforeFooter.apply(t,arguments),i=e.footer.apply(t,arguments),a=e.afterFooter.apply(t,arguments),r=[];return r=Ce(r,Pe(n)),r=Ce(r,Pe(i)),Ce(r,Pe(a))},update:function(t){var e,n,i,a,r,o,s,l,u,d,h=this,c=h._options,f=h._model,g=h._model=Te(c),m=h._active,p=h._data,v={xAlign:f.xAlign,yAlign:f.yAlign},b={x:f.x,y:f.y},y={width:f.width,height:f.height},x={x:f.caretX,y:f.caretY};if(m.length){g.opacity=1;var _=[],w=[];x=De[c.position].call(h,m,h._eventPosition);var k=[];for(e=0,n=m.length;e<n;++e)k.push((a=void 0,r=void 0,l=void 0,u=void 0,d=void 0,a=(i=m[e])._xScale,r=i._yScale||i._scale,o=i._index,u=(l=i._chart.getDatasetMeta(s=i._datasetIndex).controller)._getIndexScale(),d=l._getValueScale(),{xLabel:a?a.getLabelForIndex(o,s):"",yLabel:r?r.getLabelForIndex(o,s):"",label:u?""+u.getLabelForIndex(o,s):"",value:d?""+d.getLabelForIndex(o,s):"",index:o,datasetIndex:s,x:i._model.x,y:i._model.y}));c.filter&&(k=k.filter((function(t){return c.filter(t,p)}))),c.itemSort&&(k=k.sort((function(t,e){return c.itemSort(t,e,p)}))),V.each(k,(function(t){_.push(c.callbacks.labelColor.call(h,t,h._chart)),w.push(c.callbacks.labelTextColor.call(h,t,h._chart))})),g.title=h.getTitle(k,p),g.beforeBody=h.getBeforeBody(k,p),g.body=h.getBody(k,p),g.afterBody=h.getAfterBody(k,p),g.footer=h.getFooter(k,p),g.x=x.x,g.y=x.y,g.caretPadding=c.caretPadding,g.labelColors=_,g.labelTextColors=w,g.dataPoints=k,y=function(t,e){var n=t._chart.ctx,i=2*e.yPadding,a=0,r=e.body,o=r.reduce((function(t,e){return t+e.before.length+e.lines.length+e.after.length}),0),s=e.title.length,l=e.footer.length,u=e.titleFontSize,d=e.bodyFontSize,h=e.footerFontSize;i+=s*u,i+=s?(s-1)*e.titleSpacing:0,i+=s?e.titleMarginBottom:0,i+=(o+=e.beforeBody.length+e.afterBody.length)*d,i+=o?(o-1)*e.bodySpacing:0,i+=l?e.footerMarginTop:0,i+=l*h,i+=l?(l-1)*e.footerSpacing:0;var c=0,f=function(t){a=Math.max(a,n.measureText(t).width+c)};return n.font=V.fontString(u,e._titleFontStyle,e._titleFontFamily),V.each(e.title,f),n.font=V.fontString(d,e._bodyFontStyle,e._bodyFontFamily),V.each(e.beforeBody.concat(e.afterBody),f),c=e.displayColors?d+2:0,V.each(r,(function(t){V.each(t.before,f),V.each(t.lines,f),V.each(t.after,f)})),c=0,n.font=V.fontString(h,e._footerFontStyle,e._footerFontFamily),V.each(e.footer,f),{width:a+=2*e.xPadding,height:i}}(this,g),b=function(t,e,n,i){var a=t.x,r=t.y,o=t.caretPadding,s=n.xAlign,l=n.yAlign,u=t.caretSize+o,d=t.cornerRadius+o;return"right"===s?a-=e.width:"center"===s&&((a-=e.width/2)+e.width>i.width&&(a=i.width-e.width),a<0&&(a=0)),"top"===l?r+=u:r-="bottom"===l?e.height+u:e.height/2,"center"===l?"left"===s?a+=u:"right"===s&&(a-=u):"left"===s?a-=d:"right"===s&&(a+=d),{x:a,y:r}}(g,y,v=function(t,e){var n,i,a,r,o,s=t._model,l=t._chart,u=t._chart.chartArea,d="center",h="center";s.y<e.height?h="top":s.y>l.height-e.height&&(h="bottom");var c=(u.left+u.right)/2,f=(u.top+u.bottom)/2;"center"===h?(n=function(t){return t<=c},i=function(t){return t>c}):(n=function(t){return t<=e.width/2},i=function(t){return t>=l.width-e.width/2}),a=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},r=function(t){return t-e.width-s.caretSize-s.caretPadding<0},o=function(t){return t<=f?"top":"bottom"},n(s.x)?(d="left",a(s.x)&&(d="center",h=o(s.y))):i(s.x)&&(d="right",r(s.x)&&(d="center",h=o(s.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:d,yAlign:g.yAlign?g.yAlign:h}}(this,y),h._chart)}else g.opacity=0;return g.xAlign=v.xAlign,g.yAlign=v.yAlign,g.x=b.x,g.y=b.y,g.width=y.width,g.height=y.height,g.caretX=x.x,g.caretY=x.y,h._model=g,t&&c.custom&&c.custom.call(h,g),h},drawCaret:function(t,e){var n=this._chart.ctx,i=this.getCaretPosition(t,e,this._view);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)},getCaretPosition:function(t,e,n){var i,a,r,o,s,l,u=n.caretSize,d=n.cornerRadius,h=n.xAlign,c=n.yAlign,f=t.x,g=t.y,m=e.width,p=e.height;if("center"===c)s=g+p/2,"left"===h?(a=(i=f)-u,r=i,o=s+u,l=s-u):(a=(i=f+m)+u,r=i,o=s-u,l=s+u);else if("left"===h?(i=(a=f+d+u)-u,r=a+u):"right"===h?(i=(a=f+m-d-u)-u,r=a+u):(i=(a=n.caretX)-u,r=a+u),"top"===c)s=(o=g)-u,l=o;else{s=(o=g+p)+u,l=o;var v=r;r=i,i=v}return{x1:i,x2:a,x3:r,y1:o,y2:s,y3:l}},drawTitle:function(t,e,n){var i,a,r,o=e.title,s=o.length;if(s){var l=Se(e.rtl,e.x,e.width);for(t.x=Oe(e,e._titleAlign),n.textAlign=l.textAlign(e._titleAlign),n.textBaseline="middle",i=e.titleFontSize,a=e.titleSpacing,n.fillStyle=e.titleFontColor,n.font=V.fontString(i,e._titleFontStyle,e._titleFontFamily),r=0;r<s;++r)n.fillText(o[r],l.x(t.x),t.y+i/2),t.y+=i+a,r+1===s&&(t.y+=e.titleMarginBottom-a)}},drawBody:function(t,e,n){var i,a,r,o,s,l,u,d,h=e.bodyFontSize,c=e.bodySpacing,f=e._bodyAlign,g=e.body,m=e.displayColors,p=0,v=m?Oe(e,"left"):0,b=Se(e.rtl,e.x,e.width),y=function(e){n.fillText(e,b.x(t.x+p),t.y+h/2),t.y+=h+c},x=b.textAlign(f);for(n.textAlign=f,n.textBaseline="middle",n.font=V.fontString(h,e._bodyFontStyle,e._bodyFontFamily),t.x=Oe(e,x),n.fillStyle=e.bodyFontColor,V.each(e.beforeBody,y),p=m&&"right"!==x?"center"===f?h/2+1:h+2:0,s=0,u=g.length;s<u;++s){for(i=g[s],r=e.labelColors[s],n.fillStyle=a=e.labelTextColors[s],V.each(i.before,y),l=0,d=(o=i.lines).length;l<d;++l){if(m){var _=b.x(v);n.fillStyle=e.legendColorBackground,n.fillRect(b.leftForLtr(_,h),t.y,h,h),n.lineWidth=1,n.strokeStyle=r.borderColor,n.strokeRect(b.leftForLtr(_,h),t.y,h,h),n.fillStyle=r.backgroundColor,n.fillRect(b.leftForLtr(b.xPlus(_,1),h-2),t.y+1,h-2,h-2),n.fillStyle=a}y(o[l])}V.each(i.after,y)}p=0,V.each(e.afterBody,y),t.y-=c},drawFooter:function(t,e,n){var i,a,r=e.footer,o=r.length;if(o){var s=Se(e.rtl,e.x,e.width);for(t.x=Oe(e,e._footerAlign),t.y+=e.footerMarginTop,n.textAlign=s.textAlign(e._footerAlign),n.textBaseline="middle",i=e.footerFontSize,n.fillStyle=e.footerFontColor,n.font=V.fontString(i,e._footerFontStyle,e._footerFontFamily),a=0;a<o;++a)n.fillText(r[a],s.x(t.x),t.y+i/2),t.y+=i+e.footerSpacing}},drawBackground:function(t,e,n,i){n.fillStyle=e.backgroundColor,n.strokeStyle=e.borderColor,n.lineWidth=e.borderWidth;var a=e.xAlign,r=e.yAlign,o=t.x,s=t.y,l=i.width,u=i.height,d=e.cornerRadius;n.beginPath(),n.moveTo(o+d,s),"top"===r&&this.drawCaret(t,i),n.lineTo(o+l-d,s),n.quadraticCurveTo(o+l,s,o+l,s+d),"center"===r&&"right"===a&&this.drawCaret(t,i),n.lineTo(o+l,s+u-d),n.quadraticCurveTo(o+l,s+u,o+l-d,s+u),"bottom"===r&&this.drawCaret(t,i),n.lineTo(o+d,s+u),n.quadraticCurveTo(o,s+u,o,s+u-d),"center"===r&&"left"===a&&this.drawCaret(t,i),n.lineTo(o,s+d),n.quadraticCurveTo(o,s,o+d,s),n.closePath(),n.fill(),e.borderWidth>0&&n.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},i={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity;this._options.enabled&&(e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length)&&(t.save(),t.globalAlpha=a,this.drawBackground(i,e,t,n),i.y+=e.yPadding,V.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),V.rtl.restoreTextDirection(t,e.textDirection),t.restore())}},handleEvent:function(t){var e,n=this,i=n._options;return n._lastActive=n._lastActive||[],"mouseout"===t.type?n._active=[]:(n._active=n._chart.getElementsAtEventForMode(t,i.mode,i),i.reverse&&n._active.reverse()),(e=!V.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(i.enabled||i.custom)&&(n._eventPosition={x:t.x,y:t.y},n.update(!0),n.pivot())),e}});Fe.positioners=De;var Ie=V.valueOrDefault;function Le(){return V.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,i){if("xAxes"===t||"yAxes"===t){var a,r,o,s=n[t].length;for(e[t]||(e[t]=[]),a=0;a<s;++a)r=Ie((o=n[t][a]).type,"xAxes"===t?"category":"linear"),a>=e[t].length&&e[t].push({}),V.merge(e[t][a],!e[t][a].type||o.type&&o.type!==e[t][a].type?[ke.getScaleDefaults(r),o]:o)}else V._merger(t,e,n,i)}})}function Re(){return V.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,i){var a=e[t]||Object.create(null),r=n[t];"scales"===t?e[t]=Le(a,r):"scale"===t?e[t]=V.merge(a,[ke.getScaleDefaults(r.type),r]):V._merger(t,e,n,i)}})}function Ne(t){var e=t.options;V.each(t.scales,(function(e){le.removeBox(t,e)})),e=Re(N.global,N[t.config.type],e),t.options=t.config.options=e,t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.tooltip._options=e.tooltips,t.tooltip.initialize()}function We(t,e,n){var i,a=function(t){return t.id===i};do{i=e+n++}while(V.findIndex(t,a)>=0);return i}function Ye(t){return"top"===t||"bottom"===t}function ze(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}N._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var Ee=function(t,e){return this.construct(t,e),this};V.extend(Ee.prototype,{construct:function(t,e){var n=this;e=function(t){var e=(t=t||Object.create(null)).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=Re(N.global,N[t.type],t.options||{}),t}(e);var i=_e.acquireContext(t,e),a=i&&i.canvas,r=a&&a.height,o=a&&a.width;n.id=V.uid(),n.ctx=i,n.canvas=a,n.config=e,n.width=o,n.height=r,n.aspectRatio=r?o/r:null,n.options=e.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,Ee.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),i&&a?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return we.notify(t,"beforeInit"),V.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),we.notify(t,"afterInit"),t},clear:function(){return V.canvas.clear(this),this},stop:function(){return $.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,a=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(V.getMaximumWidth(i))),o=Math.max(0,Math.floor(a?r/a:V.getMaximumHeight(i)));if((e.width!==r||e.height!==o)&&(i.width=e.width=r,i.height=e.height=o,i.style.width=r+"px",i.style.height=o+"px",V.retinaScale(e,n.devicePixelRatio),!t)){var s={width:r,height:o};we.notify(e,"resize",[s]),n.onResize&&n.onResize(e,s),e.stop(),e.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;V.each(e.xAxes,(function(t,n){t.id||(t.id=We(e.xAxes,"x-axis-",n))})),V.each(e.yAxes,(function(t,n){t.id||(t.id=We(e.yAxes,"y-axis-",n))})),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,n=t.scales||{},i=[],a=Object.keys(n).reduce((function(t,e){return t[e]=!1,t}),{});e.scales&&(i=i.concat((e.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(e.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),e.scale&&i.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),V.each(i,(function(e){var i=e.options,r=i.id,o=Ie(i.type,e.dtype);Ye(i.position)!==Ye(e.dposition)&&(i.position=e.dposition),a[r]=!0;var s=null;if(r in n&&n[r].type===o)(s=n[r]).options=i,s.ctx=t.ctx,s.chart=t;else{var l=ke.getScaleConstructor(o);if(!l)return;s=new l({id:r,type:o,options:i,ctx:t.ctx,chart:t}),n[s.id]=s}s.mergeTicksOptions(),e.isDefault&&(t.scale=s)})),V.each(a,(function(t,e){t||delete n[e]})),t.scales=n,ke.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,n=this,i=[],a=n.data.datasets;for(t=0,e=a.length;t<e;t++){var r=a[t],o=n.getDatasetMeta(t),s=r.type||n.config.type;if(o.type&&o.type!==s&&(n.destroyDatasetMeta(t),o=n.getDatasetMeta(t)),o.type=s,o.order=r.order||0,o.index=t,o.controller)o.controller.updateIndex(t),o.controller.linkScales();else{var l=Ut[o.type];if(void 0===l)throw new Error('"'+o.type+'" is not a chart type.');o.controller=new l(n,t),i.push(o.controller)}}return i},resetElements:function(){var t=this;V.each(t.data.datasets,(function(e,n){t.getDatasetMeta(n).controller.reset()}),t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,n,i=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),Ne(i),we._invalidate(i),!1!==we.notify(i,"beforeUpdate")){i.tooltip._data=i.data;var a=i.buildOrUpdateControllers();for(e=0,n=i.data.datasets.length;e<n;e++)i.getDatasetMeta(e).controller.buildOrUpdateElements();i.updateLayout(),i.options.animation&&i.options.animation.duration&&V.each(a,(function(t){t.reset()})),i.updateDatasets(),i.tooltip.initialize(),i.lastActive=[],we.notify(i,"afterUpdate"),i._layers.sort(ze("z","_idx")),i._bufferedRender?i._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:i.render(t)}},updateLayout:function(){var t=this;!1!==we.notify(t,"beforeLayout")&&(le.update(this,this.width,this.height),t._layers=[],V.each(t.boxes,(function(e){e._configure&&e._configure(),t._layers.push.apply(t._layers,e._layers())}),t),t._layers.forEach((function(t,e){t._idx=e})),we.notify(t,"afterScaleUpdate"),we.notify(t,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==we.notify(t,"beforeDatasetsUpdate")){for(var e=0,n=t.data.datasets.length;e<n;++e)t.updateDataset(e);we.notify(t,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this,n=e.getDatasetMeta(t),i={meta:n,index:t};!1!==we.notify(e,"beforeDatasetUpdate",[i])&&(n.controller._update(),we.notify(e,"afterDatasetUpdate",[i]))},render:function(t){var e=this;t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]});var n=e.options.animation,i=Ie(t.duration,n&&n.duration),a=t.lazy;if(!1!==we.notify(e,"beforeRender")){var r=function(t){we.notify(e,"afterRender"),V.callback(n&&n.onComplete,[t],e)};if(n&&i){var o=new Z({numSteps:i/16.66,easing:t.easing||n.easing,render:function(t,e){var n=e.currentStep,i=n/e.numSteps;t.draw((0,V.easing.effects[e.easing])(i),i,n)},onAnimationProgress:n.onProgress,onAnimationComplete:r});$.addAnimation(e,o,i,a)}else e.draw(),r(new Z({numSteps:0,chart:e}));return e}},draw:function(t){var e,n,i=this;if(i.clear(),V.isNullOrUndef(t)&&(t=1),i.transition(t),!(i.width<=0||i.height<=0)&&!1!==we.notify(i,"beforeDraw",[t])){for(n=i._layers,e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(i.chartArea);for(i.drawDatasets(t);e<n.length;++e)n[e].draw(i.chartArea);i._drawTooltip(t),we.notify(i,"afterDraw",[t])}},transition:function(t){for(var e=this,n=0,i=(e.data.datasets||[]).length;n<i;++n)e.isDatasetVisible(n)&&e.getDatasetMeta(n).controller.transition(t);e.tooltip.transition(t)},_getSortedDatasetMetas:function(t){var e,n,i=this,a=[];for(e=0,n=(i.data.datasets||[]).length;e<n;++e)t&&!i.isDatasetVisible(e)||a.push(i.getDatasetMeta(e));return a.sort(ze("order","index")),a},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(t){var e,n,i=this;if(!1!==we.notify(i,"beforeDatasetsDraw",[t])){for(n=(e=i._getSortedVisibleDatasetMetas()).length-1;n>=0;--n)i.drawDataset(e[n],t);we.notify(i,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n={meta:t,index:t.index,easingValue:e};!1!==we.notify(this,"beforeDatasetDraw",[n])&&(t.controller.draw(e),we.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this,n=e.tooltip,i={tooltip:n,easingValue:t};!1!==we.notify(e,"beforeTooltipDraw",[i])&&(n.draw(),we.notify(e,"afterTooltipDraw",[i]))},getElementAtEvent:function(t){return Kt.modes.single(this,t)},getElementsAtEvent:function(t){return Kt.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return Kt.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var i=Kt.modes[e];return"function"==typeof i?i(this,t,n):[]},getDatasetAtEvent:function(t){return Kt.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,n=e.data.datasets[t];n._meta||(n._meta={});var i=n._meta[e.id];return i||(i=n._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n.order||0,index:t}),i},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e<n;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(t){var e=this.id,n=this.data.datasets[t],i=n._meta&&n._meta[e];i&&(i.controller.destroy(),delete n._meta[e])},destroy:function(){var t,e,n=this,i=n.canvas;for(n.stop(),t=0,e=n.data.datasets.length;t<e;++t)n.destroyDatasetMeta(t);i&&(n.unbindEvents(),V.canvas.clear(n),_e.releaseContext(n.ctx),n.canvas=null,n.ctx=null),we.notify(n,"destroy"),delete Ee.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var t=this;t.tooltip=new Fe({_chart:t,_chartInstance:t,_data:t.data,_options:t.options.tooltips},t)},bindEvents:function(){var t=this,e=t._listeners={},n=function(){t.eventHandler.apply(t,arguments)};V.each(t.options.events,(function(i){_e.addEventListener(t,i,n),e[i]=n})),t.options.responsive&&(n=function(){t.resize()},_e.addEventListener(t,"resize",n),e.resize=n)},unbindEvents:function(){var t=this,e=t._listeners;e&&(delete t._listeners,V.each(e,(function(e,n){_e.removeEventListener(t,n,e)})))},updateHoverStyle:function(t,e,n){var i,a,r,o=n?"set":"remove";for(a=0,r=t.length;a<r;++a)(i=t[a])&&this.getDatasetMeta(i._datasetIndex).controller[o+"HoverStyle"](i);"dataset"===e&&this.getDatasetMeta(t[0]._datasetIndex).controller["_"+o+"DatasetHoverStyle"]()},eventHandler:function(t){var e=this,n=e.tooltip;if(!1!==we.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var i=e.handleEvent(t);n&&(i=n._start?n.handleEvent(t):i|n.handleEvent(t)),we.notify(e,"afterEvent",[t]);var a=e._bufferedRequest;return a?e.render(a):i&&!e.animating&&(e.stop(),e.render({duration:e.options.hover.animationDuration,lazy:!0})),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e,n=this,i=n.options||{},a=i.hover;return n.lastActive=n.lastActive||[],n.active="mouseout"===t.type?[]:n.getElementsAtEventForMode(t,a.mode,a),V.callback(i.onHover||i.hover.onHover,[t.native,n.active],n),"mouseup"!==t.type&&"click"!==t.type||i.onClick&&i.onClick.call(n,t.native,n.active),n.lastActive.length&&n.updateHoverStyle(n.lastActive,a.mode,!1),n.active.length&&a.mode&&n.updateHoverStyle(n.active,a.mode,!0),e=!V.arrayEquals(n.active,n.lastActive),n.lastActive=n.active,e}}),Ee.instances={};var Ve=Ee;function He(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function Be(t){this.options=t||{}}Ee.Controller=Ee,Ee.types={},V.configMerge=Re,V.scaleMerge=Le,V.extend(Be.prototype,{formats:He,parse:He,format:He,add:He,diff:He,startOf:He,endOf:He,_create:function(t){return t}}),Be.override=function(t){V.extend(Be.prototype,t)};var je={_date:Be},Ue={formatters:{values:function(t){return V.isArray(t)?t:""+t},linear:function(t,e,n){var i=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(i)>1&&t!==Math.floor(t)&&(i=t-Math.floor(t));var a=V.log10(Math.abs(i)),r="";if(0!==t)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var o=V.log10(Math.abs(t)),s=Math.floor(o)-Math.floor(a);s=Math.max(Math.min(s,20),0),r=t.toExponential(s)}else{var l=-1*Math.floor(a);l=Math.max(Math.min(l,20),0),r=t.toFixed(l)}else r="0";return r},logarithmic:function(t,e,n){var i=t/Math.pow(10,Math.floor(V.log10(t)));return 0===t?"0":1===i||2===i||5===i||0===e||e===n.length-1?t.toExponential():""}}},Ge=V.isArray,qe=V.isNullOrUndef,Ze=V.valueOrDefault,$e=V.valueAtIndexOrDefault;function Xe(t,e,n){var i,a=t.getTicks().length,r=Math.min(e,a-1),o=t.getPixelForTick(r),s=t._startPixel,l=t._endPixel,u=1e-6;if(!(n&&(i=1===a?Math.max(o-s,l-o):0===e?(t.getPixelForTick(1)-o)/2:(o-t.getPixelForTick(r-1))/2,(o+=r<e?i:-i)<s-u||o>l+u)))return o}function Je(t){return t.drawTicks?t.tickMarkLength:0}function Ke(t){var e,n;return t.display?(e=V.options._parseFont(t),n=V.options.toPadding(t.padding),e.lineHeight+n.height):0}function Qe(t,e){return V.extend(V.options._parseFont({fontFamily:Ze(e.fontFamily,t.fontFamily),fontSize:Ze(e.fontSize,t.fontSize),fontStyle:Ze(e.fontStyle,t.fontStyle),lineHeight:Ze(e.lineHeight,t.lineHeight)}),{color:V.options.resolve([e.fontColor,t.fontColor,N.global.defaultFontColor])})}function tn(t){var e=Qe(t,t.minor);return{minor:e,major:t.major.enabled?Qe(t,t.major):e}}function en(t){var e,n,i,a=[];for(n=0,i=t.length;n<i;++n)void 0!==(e=t[n])._index&&a.push(e);return a}function nn(t,e,n,i){var a,r,o,s,l=Ze(n,0),u=Math.min(Ze(i,t.length),t.length),d=0;for(e=Math.ceil(e),i&&(e=(a=i-n)/Math.floor(a/e)),s=l;s<0;)d++,s=Math.round(l+d*e);for(r=Math.max(l,0);r<u;r++)o=t[r],r===s?(o._index=r,d++,s=Math.round(l+d*e)):delete o.label}N._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:Ue.formatters.values,minor:{},major:{}}});var an=G.extend({zeroLineIndex:0,getPadding:function(){var t=this;return{left:t.paddingLeft||0,top:t.paddingTop||0,right:t.paddingRight||0,bottom:t.paddingBottom||0}},getTicks:function(){return this._ticks},_getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){V.callback(this.options.beforeUpdate,[this])},update:function(t,e,n){var i,a,r,o,s,l=this,u=l.options.ticks,d=u.sampleSize;if(l.beforeUpdate(),l.maxWidth=t,l.maxHeight=e,l.margins=V.extend({left:0,right:0,top:0,bottom:0},n),l._ticks=null,l.ticks=null,l._labelSizes=null,l._maxLabelLines=0,l.longestLabelWidth=0,l.longestTextCache=l.longestTextCache||{},l._gridLineItems=null,l._labelItems=null,l.beforeSetDimensions(),l.setDimensions(),l.afterSetDimensions(),l.beforeDataLimits(),l.determineDataLimits(),l.afterDataLimits(),l.beforeBuildTicks(),o=l.buildTicks()||[],(!(o=l.afterBuildTicks(o)||o)||!o.length)&&l.ticks)for(o=[],i=0,a=l.ticks.length;i<a;++i)o.push({value:l.ticks[i],major:!1});return l._ticks=o,r=l._convertTicksToLabels((s=d<o.length)?function(t,e){for(var n=[],i=t.length/e,a=0,r=t.length;a<r;a+=i)n.push(t[Math.floor(a)]);return n}(o,d):o),l._configure(),l.beforeCalculateTickRotation(),l.calculateTickRotation(),l.afterCalculateTickRotation(),l.beforeFit(),l.fit(),l.afterFit(),l._ticksToDraw=u.display&&(u.autoSkip||"auto"===u.source)?l._autoSkip(o):o,s&&(r=l._convertTicksToLabels(l._ticksToDraw)),l.ticks=r,l.afterUpdate(),l.minSize},_configure:function(){var t,e,n=this,i=n.options.ticks.reverse;n.isHorizontal()?(t=n.left,e=n.right):(t=n.top,e=n.bottom,i=!i),n._startPixel=t,n._endPixel=e,n._reversePixels=i,n._length=e-t},afterUpdate:function(){V.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){V.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){V.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){V.callback(this.options.beforeDataLimits,[this])},determineDataLimits:V.noop,afterDataLimits:function(){V.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){V.callback(this.options.beforeBuildTicks,[this])},buildTicks:V.noop,afterBuildTicks:function(t){var e=this;return Ge(t)&&t.length?V.callback(e.options.afterBuildTicks,[e,t]):(e.ticks=V.callback(e.options.afterBuildTicks,[e,e.ticks])||e.ticks,t)},beforeTickToLabelConversion:function(){V.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this,e=t.options.ticks;t.ticks=t.ticks.map(e.userCallback||e.callback,this)},afterTickToLabelConversion:function(){V.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){V.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t,e,n,i,a,r,o,s=this,l=s.options,u=l.ticks,d=s.getTicks().length,h=u.minRotation||0,c=u.maxRotation,f=h;!s._isVisible()||!u.display||h>=c||d<=1||!s.isHorizontal()?s.labelRotation=h:(e=(t=s._getLabelSizes()).widest.width,n=t.highest.height-t.highest.offset,i=Math.min(s.maxWidth,s.chart.width-e),e+6>(a=l.offset?s.maxWidth/d:i/(d-1))&&(a=i/(d-(l.offset?.5:1)),r=s.maxHeight-Je(l.gridLines)-u.padding-Ke(l.scaleLabel),o=Math.sqrt(e*e+n*n),f=V.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/a,1)),Math.asin(Math.min(r/o,1))-Math.asin(n/o))),f=Math.max(h,Math.min(c,f))),s.labelRotation=f)},afterCalculateTickRotation:function(){V.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){V.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},n=t.chart,i=t.options,a=i.ticks,r=i.scaleLabel,o=i.gridLines,s=t._isVisible(),l="bottom"===i.position,u=t.isHorizontal();if(u?e.width=t.maxWidth:s&&(e.width=Je(o)+Ke(r)),u?s&&(e.height=Je(o)+Ke(r)):e.height=t.maxHeight,a.display&&s){var d=tn(a),h=t._getLabelSizes(),c=h.first,f=h.last,g=h.widest,m=h.highest,p=.4*d.minor.lineHeight,v=a.padding;if(u){var b=0!==t.labelRotation,y=V.toRadians(t.labelRotation),x=Math.cos(y),_=Math.sin(y);e.height=Math.min(t.maxHeight,e.height+(_*g.width+x*(m.height-(b?m.offset:0))+(b?0:p))+v);var w,k,M=t.getPixelForTick(0)-t.left,S=t.right-t.getPixelForTick(t.getTicks().length-1);b?(w=l?x*c.width+_*c.offset:_*(c.height-c.offset),k=l?_*(f.height-f.offset):x*f.width+_*f.offset):(w=c.width/2,k=f.width/2),t.paddingLeft=Math.max((w-M)*t.width/(t.width-M),0)+3,t.paddingRight=Math.max((k-S)*t.width/(t.width-S),0)+3}else e.width=Math.min(t.maxWidth,e.width+(a.mirror?0:g.width+v+p)),t.paddingTop=c.height/2,t.paddingBottom=f.height/2}t.handleMargins(),u?(t.width=t._length=n.width-t.margins.left-t.margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=n.height-t.margins.top-t.margins.bottom)},handleMargins:function(){var t=this;t.margins&&(t.margins.left=Math.max(t.paddingLeft,t.margins.left),t.margins.top=Math.max(t.paddingTop,t.margins.top),t.margins.right=Math.max(t.paddingRight,t.margins.right),t.margins.bottom=Math.max(t.paddingBottom,t.margins.bottom))},afterFit:function(){V.callback(this.options.afterFit,[this])},isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(qe(t))return NaN;if(("number"==typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},_convertTicksToLabels:function(t){var e,n,i,a=this;for(a.ticks=t.map((function(t){return t.value})),a.beforeTickToLabelConversion(),e=a.convertTicksToLabels(t)||a.ticks,a.afterTickToLabelConversion(),n=0,i=t.length;n<i;++n)t[n].label=e[n];return e},_getLabelSizes:function(){var t=this,e=t._labelSizes;return e||(t._labelSizes=e=function(t,e,n,i){var a,r,o,s,l,u,d,h,c,f,g,m,p,v=n.length,b=[],y=[],x=[],_=0,w=0;for(a=0;a<v;++a){if(s=n[a].label,t.font=u=(l=n[a].major?e.major:e.minor).string,d=i[u]=i[u]||{data:{},gc:[]},h=l.lineHeight,c=f=0,qe(s)||Ge(s)){if(Ge(s))for(r=0,o=s.length;r<o;++r)qe(g=s[r])||Ge(g)||(c=V.measureText(t,d.data,d.gc,c,g),f+=h)}else c=V.measureText(t,d.data,d.gc,c,s),f=h;b.push(c),y.push(f),x.push(h/2),_=Math.max(c,_),w=Math.max(f,w)}function k(t){return{width:b[t]||0,height:y[t]||0,offset:x[t]||0}}return function(t,e){V.each(t,(function(t){var n,i=t.gc,a=i.length/2;if(a>e){for(n=0;n<a;++n)delete t.data[i[n]];i.splice(0,a)}}))}(i,v),m=b.indexOf(_),p=y.indexOf(w),{first:k(0),last:k(v-1),widest:k(m),highest:k(p)}}(t.ctx,tn(t.options.ticks),t.getTicks(),t.longestTextCache),t.longestLabelWidth=e.widest.width),e},_parseValue:function(t){var e,n,i,a;return Ge(t)?(e=+this.getRightValue(t[0]),n=+this.getRightValue(t[1]),i=Math.min(e,n),a=Math.max(e,n)):(e=void 0,n=t=+this.getRightValue(t),i=t,a=t),{min:i,max:a,start:e,end:n}},_getScaleLabel:function(t){var e=this._parseValue(t);return void 0!==e.start?"["+e.start+", "+e.end+"]":+this.getRightValue(t)},getLabelForIndex:V.noop,getPixelForValue:V.noop,getValueForPixel:V.noop,getPixelForTick:function(t){var e=this,n=e.options.offset,i=e._ticks.length,a=1/Math.max(i-(n?0:1),1);return t<0||t>i-1?null:e.getPixelForDecimal(t*a+(n?a/2:0))},getPixelForDecimal:function(t){var e=this;return e._reversePixels&&(t=1-t),e._startPixel+t*e._length},getDecimalForPixel:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this,e=t.min,n=t.max;return t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0},_autoSkip:function(t){var e,n,i,a,r=this,o=r.options.ticks,s=o.maxTicksLimit||r._length/r._tickSize()+1,l=o.major.enabled?function(t){var e,n,i=[];for(e=0,n=t.length;e<n;e++)t[e].major&&i.push(e);return i}(t):[],u=l.length,d=l[0],h=l[u-1];if(u>s)return function(t,e,n){var i,a,r=0,o=e[0];for(n=Math.ceil(n),i=0;i<t.length;i++)a=t[i],i===o?(a._index=i,o=e[++r*n]):delete a.label}(t,l,u/s),en(t);if(i=function(t,e,n,i){var a,r,o,s,l=function(t){var e,n,i=t.length;if(i<2)return!1;for(n=t[0],e=1;e<i;++e)if(t[e]-t[e-1]!==n)return!1;return n}(t),u=(e.length-1)/i;if(!l)return Math.max(u,1);for(o=0,s=(a=V.math._factorize(l)).length-1;o<s;o++)if((r=a[o])>u)return r;return Math.max(u,1)}(l,t,0,s),u>0){for(e=0,n=u-1;e<n;e++)nn(t,i,l[e],l[e+1]);return nn(t,i,V.isNullOrUndef(a=u>1?(h-d)/(u-1):null)?0:d-a,d),nn(t,i,h,V.isNullOrUndef(a)?t.length:h+a),en(t)}return nn(t,i),en(t)},_tickSize:function(){var t=this,e=t.options.ticks,n=V.toRadians(t.labelRotation),i=Math.abs(Math.cos(n)),a=Math.abs(Math.sin(n)),r=t._getLabelSizes(),o=e.autoSkipPadding||0,s=r?r.widest.width+o:0,l=r?r.highest.height+o:0;return t.isHorizontal()?l*i>s*a?s/i:l/a:l*a<s*i?l/i:s/a},_isVisible:function(){var t,e,n,i=this,a=i.chart,r=i.options.display;if("auto"!==r)return!!r;for(t=0,e=a.data.datasets.length;t<e;++t)if(a.isDatasetVisible(t)&&((n=a.getDatasetMeta(t)).xAxisID===i.id||n.yAxisID===i.id))return!0;return!1},_computeGridLineItems:function(t){var e,n,i,a,r,o,s,l,u,d,h,c,f,g,m,p,v,b=this,y=b.chart,x=b.options,_=x.gridLines,w=x.position,k=_.offsetGridLines,M=b.isHorizontal(),S=b._ticksToDraw,D=S.length+(k?1:0),C=Je(_),P=[],T=_.drawBorder?$e(_.lineWidth,0,0):0,O=T/2,A=V._alignPixel,F=function(t){return A(y,t,T)};for("top"===w?(e=F(b.bottom),s=b.bottom-C,u=e-O,h=F(t.top)+O,f=t.bottom):"bottom"===w?(e=F(b.top),h=t.top,f=F(t.bottom)-O,s=e+O,u=b.top+C):"left"===w?(e=F(b.right),o=b.right-C,l=e-O,d=F(t.left)+O,c=t.right):(e=F(b.left),d=t.left,c=F(t.right)-O,o=e+O,l=b.left+C),n=0;n<D;++n)qe((i=S[n]||{}).label)&&n<S.length||(n===b.zeroLineIndex&&x.offset===k?(g=_.zeroLineWidth,m=_.zeroLineColor,p=_.zeroLineBorderDash||[],v=_.zeroLineBorderDashOffset||0):(g=$e(_.lineWidth,n,1),m=$e(_.color,n,"rgba(0,0,0,0.1)"),p=_.borderDash||[],v=_.borderDashOffset||0),void 0!==(a=Xe(b,i._index||n,k))&&(r=A(y,a,g),M?o=l=d=c=r:s=u=h=f=r,P.push({tx1:o,ty1:s,tx2:l,ty2:u,x1:d,y1:h,x2:c,y2:f,width:g,color:m,borderDash:p,borderDashOffset:v})));return P.ticksLength=D,P.borderValue=e,P},_computeLabelItems:function(){var t,e,n,i,a,r,o,s,l,u,d,h,c=this,f=c.options,g=f.ticks,m=f.position,p=g.mirror,v=c.isHorizontal(),b=c._ticksToDraw,y=tn(g),x=g.padding,_=Je(f.gridLines),w=-V.toRadians(c.labelRotation),k=[];for("top"===m?(r=c.bottom-_-x,o=w?"left":"center"):"bottom"===m?(r=c.top+_+x,o=w?"right":"center"):"left"===m?(a=c.right-(p?0:_)-x,o=p?"left":"right"):(a=c.left+(p?0:_)+x,o=p?"right":"left"),t=0,e=b.length;t<e;++t)qe(i=(n=b[t]).label)||(s=c.getPixelForTick(n._index||t)+g.labelOffset,u=(l=n.major?y.major:y.minor).lineHeight,d=Ge(i)?i.length:1,v?(a=s,h="top"===m?((w?1:.5)-d)*u:(w?0:.5)*u):(r=s,h=(1-d)*u/2),k.push({x:a,y:r,rotation:w,label:i,font:l,textOffset:h,textAlign:o}));return k},_drawGrid:function(t){var e=this,n=e.options.gridLines;if(n.display){var i,a,r,o,s,l=e.ctx,u=e.chart,d=V._alignPixel,h=n.drawBorder?$e(n.lineWidth,0,0):0,c=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));for(r=0,o=c.length;r<o;++r)a=(s=c[r]).color,(i=s.width)&&a&&(l.save(),l.lineWidth=i,l.strokeStyle=a,l.setLineDash&&(l.setLineDash(s.borderDash),l.lineDashOffset=s.borderDashOffset),l.beginPath(),n.drawTicks&&(l.moveTo(s.tx1,s.ty1),l.lineTo(s.tx2,s.ty2)),n.drawOnChartArea&&(l.moveTo(s.x1,s.y1),l.lineTo(s.x2,s.y2)),l.stroke(),l.restore());if(h){var f,g,m,p,v=h,b=$e(n.lineWidth,c.ticksLength-1,1),y=c.borderValue;e.isHorizontal()?(f=d(u,e.left,v)-v/2,g=d(u,e.right,b)+b/2,m=p=y):(m=d(u,e.top,v)-v/2,p=d(u,e.bottom,b)+b/2,f=g=y),l.lineWidth=h,l.strokeStyle=$e(n.color,0),l.beginPath(),l.moveTo(f,m),l.lineTo(g,p),l.stroke()}}},_drawLabels:function(){var t=this;if(t.options.ticks.display){var e,n,i,a,r,o,s,l,u=t.ctx,d=t._labelItems||(t._labelItems=t._computeLabelItems());for(e=0,i=d.length;e<i;++e){if(o=(r=d[e]).font,u.save(),u.translate(r.x,r.y),u.rotate(r.rotation),u.font=o.string,u.fillStyle=o.color,u.textBaseline="middle",u.textAlign=r.textAlign,l=r.textOffset,Ge(s=r.label))for(n=0,a=s.length;n<a;++n)u.fillText(""+s[n],0,l),l+=o.lineHeight;else u.fillText(s,0,l);u.restore()}}},_drawTitle:function(){var t=this,e=t.ctx,n=t.options,i=n.scaleLabel;if(i.display){var a,r,o=Ze(i.fontColor,N.global.defaultFontColor),s=V.options._parseFont(i),l=V.options.toPadding(i.padding),u=s.lineHeight/2,d=n.position,h=0;if(t.isHorizontal())a=t.left+t.width/2,r="bottom"===d?t.bottom-u-l.bottom:t.top+u+l.top;else{var c="left"===d;a=c?t.left+u+l.top:t.right-u-l.top,r=t.top+t.height/2,h=c?-.5*Math.PI:.5*Math.PI}e.save(),e.translate(a,r),e.rotate(h),e.textAlign="center",e.textBaseline="middle",e.fillStyle=o,e.font=s.string,e.fillText(i.labelString,0,0),e.restore()}},draw:function(t){var e=this;e._isVisible()&&(e._drawGrid(t),e._drawTitle(),e._drawLabels())},_layers:function(){var t=this,e=t.options,n=e.ticks&&e.ticks.z||0,i=e.gridLines&&e.gridLines.z||0;return t._isVisible()&&n!==i&&t.draw===t._draw?[{z:i,draw:function(){t._drawGrid.apply(t,arguments),t._drawTitle.apply(t,arguments)}},{z:n,draw:function(){t._drawLabels.apply(t,arguments)}}]:[{z:n,draw:function(){t.draw.apply(t,arguments)}}]},_getMatchingVisibleMetas:function(t){var e=this,n=e.isHorizontal();return e.chart._getSortedVisibleDatasetMetas().filter((function(i){return(!t||i.type===t)&&(n?i.xAxisID===e.id:i.yAxisID===e.id)}))}});an.prototype._draw=an.prototype.draw;var rn=an,on=V.isNullOrUndef,sn=rn.extend({determineDataLimits:function(){var t,e=this,n=e._getLabels(),i=e.options.ticks,a=i.min,r=i.max,o=0,s=n.length-1;void 0!==a&&(t=n.indexOf(a))>=0&&(o=t),void 0!==r&&(t=n.indexOf(r))>=0&&(s=t),e.minIndex=o,e.maxIndex=s,e.min=n[o],e.max=n[s]},buildTicks:function(){var t=this,e=t._getLabels(),n=t.minIndex,i=t.maxIndex;t.ticks=0===n&&i===e.length-1?e:e.slice(n,i+1)},getLabelForIndex:function(t,e){var n=this,i=n.chart;return i.getDatasetMeta(e).controller._getValueScaleId()===n.id?n.getRightValue(i.data.datasets[e].data[t]):n._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,n=t.ticks;rn.prototype._configure.call(t),t.isHorizontal()||(t._reversePixels=!t._reversePixels),n&&(t._startValue=t.minIndex-(e?.5:0),t._valueRange=Math.max(n.length-(e?0:1),1))},getPixelForValue:function(t,e,n){var i,a,r,o=this;return on(e)||on(n)||(t=o.chart.data.datasets[n].data[e]),on(t)||(i=o.isHorizontal()?t.x:t.y),(void 0!==i||void 0!==t&&isNaN(e))&&(a=o._getLabels(),t=V.valueOrDefault(i,t),e=-1!==(r=a.indexOf(t))?r:e,isNaN(e)&&(e=t)),o.getPixelForDecimal((e-o._startValue)/o._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=this,n=Math.round(e._startValue+e.getDecimalForPixel(t)*e._valueRange);return Math.min(Math.max(n,0),e.ticks.length-1)},getBasePixel:function(){return this.bottom}});sn._defaults={position:"bottom"};var ln=V.isNullOrUndef,un=rn.extend({getRightValue:function(t){return"string"==typeof t?+t:rn.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var n=V.sign(t.min),i=V.sign(t.max);n<0&&i<0?t.max=0:n>0&&i>0&&(t.min=0)}var a=void 0!==e.min||void 0!==e.suggestedMin,r=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(t.min=null===t.min?e.suggestedMin:Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(t.max=null===t.max?e.suggestedMax:Math.max(t.max,e.suggestedMax)),a!==r&&t.min>=t.max&&(a?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this,n=e.options.ticks,i=n.stepSize,a=n.maxTicksLimit;return i?t=Math.ceil(e.max/i)-Math.floor(e.min/i)+1:(t=e._computeTickLimit(),a=a||11),a&&(t=Math.min(a,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:V.noop,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),i={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,precision:e.precision,stepSize:V.valueOrDefault(e.fixedStepSize,e.stepSize)},a=t.ticks=function(t,e){var n,i,a,r,o=[],s=t.stepSize,l=s||1,u=t.maxTicks-1,d=t.min,h=t.max,c=t.precision,f=e.min,g=e.max,m=V.niceNum((g-f)/u/l)*l;if(m<1e-14&&ln(d)&&ln(h))return[f,g];(r=Math.ceil(g/m)-Math.floor(f/m))>u&&(m=V.niceNum(r*m/u/l)*l),s||ln(c)?n=Math.pow(10,V._decimalPlaces(m)):(n=Math.pow(10,c),m=Math.ceil(m*n)/n),i=Math.floor(f/m)*m,a=Math.ceil(g/m)*m,s&&(!ln(d)&&V.almostWhole(d/m,m/1e3)&&(i=d),!ln(h)&&V.almostWhole(h/m,m/1e3)&&(a=h)),r=V.almostEquals(r=(a-i)/m,Math.round(r),m/1e3)?Math.round(r):Math.ceil(r),i=Math.round(i*n)/n,a=Math.round(a*n)/n,o.push(ln(d)?i:d);for(var p=1;p<r;++p)o.push(Math.round((i+p*m)*n)/n);return o.push(ln(h)?a:h),o}(i,t);t.handleDirectionalChanges(),t.max=V.max(a),t.min=V.min(a),e.reverse?(a.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var t=this;t.ticksAsNumbers=t.ticks.slice(),t.zeroLineIndex=t.ticks.indexOf(0),rn.prototype.convertTicksToLabels.call(t)},_configure:function(){var t,e=this,n=e.getTicks(),i=e.min,a=e.max;rn.prototype._configure.call(e),e.options.offset&&n.length&&(i-=t=(a-i)/Math.max(n.length-1,1)/2,a+=t),e._startValue=i,e._endValue=a,e._valueRange=a-i}}),dn={position:"left",ticks:{callback:Ue.formatters.linear}};function hn(t,e,n,i){var a,r,o=t.options,s=function(t,e,n){var i=[n.type,void 0===e&&void 0===n.stack?n.index:"",n.stack].join(".");return void 0===t[i]&&(t[i]={pos:[],neg:[]}),t[i]}(e,o.stacked,n),l=s.pos,u=s.neg,d=i.length;for(a=0;a<d;++a)r=t._parseValue(i[a]),isNaN(r.min)||isNaN(r.max)||n.data[a].hidden||(l[a]=l[a]||0,u[a]=u[a]||0,o.relativePoints?l[a]=100:r.min<0||r.max<0?u[a]+=r.min:l[a]+=r.max)}function cn(t,e,n){var i,a,r=n.length;for(i=0;i<r;++i)a=t._parseValue(n[i]),isNaN(a.min)||isNaN(a.max)||e.data[i].hidden||(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}var fn=un.extend({determineDataLimits:function(){var t,e,n,i,a=this,r=a.options,o=a.chart.data.datasets,s=a._getMatchingVisibleMetas(),l=r.stacked,u={},d=s.length;if(a.min=Number.POSITIVE_INFINITY,a.max=Number.NEGATIVE_INFINITY,void 0===l)for(t=0;!l&&t<d;++t)l=void 0!==(e=s[t]).stack;for(t=0;t<d;++t)n=o[(e=s[t]).index].data,l?hn(a,u,e,n):cn(a,e,n);V.each(u,(function(t){i=t.pos.concat(t.neg),a.min=Math.min(a.min,V.min(i)),a.max=Math.max(a.max,V.max(i))})),a.min=V.isFinite(a.min)&&!isNaN(a.min)?a.min:0,a.max=V.isFinite(a.max)&&!isNaN(a.max)?a.max:1,a.handleTickRangeOptions()},_computeTickLimit:function(){var t,e=this;return e.isHorizontal()?Math.ceil(e.width/40):(t=V.options._parseFont(e.options.ticks),Math.ceil(e.height/t.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e=this;return e.getPixelForDecimal((+e.getRightValue(t)-e._startValue)/e._valueRange)},getValueForPixel:function(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange},getPixelForTick:function(t){var e=this.ticksAsNumbers;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])}});fn._defaults=dn;var gn=V.valueOrDefault,mn=V.math.log10,pn={position:"left",ticks:{callback:Ue.formatters.logarithmic}};function vn(t,e){return V.isFinite(t)&&t>=0?t:e}var bn=rn.extend({determineDataLimits:function(){var t,e,n,i,a,r,o=this,s=o.options,l=o.chart,u=l.data.datasets,d=o.isHorizontal();function h(t){return d?t.xAxisID===o.id:t.yAxisID===o.id}o.min=Number.POSITIVE_INFINITY,o.max=Number.NEGATIVE_INFINITY,o.minNotZero=Number.POSITIVE_INFINITY;var c=s.stacked;if(void 0===c)for(t=0;t<u.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&h(e)&&void 0!==e.stack){c=!0;break}if(s.stacked||c){var f={};for(t=0;t<u.length;t++){var g=[(e=l.getDatasetMeta(t)).type,void 0===s.stacked&&void 0===e.stack?t:"",e.stack].join(".");if(l.isDatasetVisible(t)&&h(e))for(void 0===f[g]&&(f[g]=[]),a=0,r=(i=u[t].data).length;a<r;a++){var m=f[g];n=o._parseValue(i[a]),isNaN(n.min)||isNaN(n.max)||e.data[a].hidden||n.min<0||n.max<0||(m[a]=m[a]||0,m[a]+=n.max)}}V.each(f,(function(t){if(t.length>0){var e=V.min(t),n=V.max(t);o.min=Math.min(o.min,e),o.max=Math.max(o.max,n)}}))}else for(t=0;t<u.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&h(e))for(a=0,r=(i=u[t].data).length;a<r;a++)n=o._parseValue(i[a]),isNaN(n.min)||isNaN(n.max)||e.data[a].hidden||n.min<0||n.max<0||(o.min=Math.min(n.min,o.min),o.max=Math.max(n.max,o.max),0!==n.min&&(o.minNotZero=Math.min(n.min,o.minNotZero)));o.min=V.isFinite(o.min)?o.min:null,o.max=V.isFinite(o.max)?o.max:null,o.minNotZero=V.isFinite(o.minNotZero)?o.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;t.min=vn(e.min,t.min),t.max=vn(e.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor(mn(t.min))-1),t.max=Math.pow(10,Math.floor(mn(t.max))+1)):(t.min=1,t.max=10)),null===t.min&&(t.min=Math.pow(10,Math.floor(mn(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor(mn(t.min))+1):10),null===t.minNotZero&&(t.minNotZero=t.min>0?t.min:t.max<1?Math.pow(10,Math.floor(mn(t.max))):1)},buildTicks:function(){var t=this,e=t.options.ticks,n=!t.isHorizontal(),i={min:vn(e.min),max:vn(e.max)},a=t.ticks=function(t,e){var n,i,a=[],r=gn(t.min,Math.pow(10,Math.floor(mn(e.min)))),o=Math.floor(mn(e.max)),s=Math.ceil(e.max/Math.pow(10,o));0===r?(n=Math.floor(mn(e.minNotZero)),i=Math.floor(e.minNotZero/Math.pow(10,n)),a.push(r),r=i*Math.pow(10,n)):(n=Math.floor(mn(r)),i=Math.floor(r/Math.pow(10,n)));var l=n<0?Math.pow(10,Math.abs(n)):1;do{a.push(r),10==++i&&(i=1,l=++n>=0?1:l),r=Math.round(i*Math.pow(10,n)*l)/l}while(n<o||n===o&&i<s);var u=gn(t.max,r);return a.push(u),a}(i,t);t.max=V.max(a),t.min=V.min(a),e.reverse?(n=!n,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),n&&a.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),rn.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){var e=this.tickValues;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])},_getFirstTickValue:function(t){var e=Math.floor(mn(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,n=0;rn.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),n=gn(t.options.ticks.fontSize,N.global.defaultFontSize)/t._length),t._startValue=mn(e),t._valueOffset=n,t._valueRange=(mn(t.max)-mn(e))/(1-n)},getPixelForValue:function(t){var e=this,n=0;return(t=+e.getRightValue(t))>e.min&&t>0&&(n=(mn(t)-e._startValue)/e._valueRange+e._valueOffset),e.getPixelForDecimal(n)},getValueForPixel:function(t){var e=this,n=e.getDecimalForPixel(t);return 0===n&&0===e.min?0:Math.pow(10,e._startValue+(n-e._valueOffset)*e._valueRange)}});bn._defaults=pn;var yn=V.valueOrDefault,xn=V.valueAtIndexOrDefault,_n=V.options.resolve,wn={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:Ue.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function kn(t){var e=t.ticks;return e.display&&t.display?yn(e.fontSize,N.global.defaultFontSize)+2*e.backdropPaddingY:0}function Mn(t,e,n,i,a){return t===i||t===a?{start:e-n/2,end:e+n/2}:t<i||t>a?{start:e-n,end:e}:{start:e,end:e+n}}function Sn(t){return 0===t||180===t?"center":t<180?"left":"right"}function Dn(t,e,n,i){var a,r,o=n.y+i/2;if(V.isArray(e))for(a=0,r=e.length;a<r;++a)t.fillText(e[a],n.x,o),o+=i;else t.fillText(e,n.x,o)}function Cn(t,e,n){90===t||270===t?n.y-=e.h/2:(t>270||t<90)&&(n.y-=e.h)}function Pn(t){return V.isNumber(t)?t:0}var Tn=un.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=kn(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var t=this,e=t.chart,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;V.each(e.data.datasets,(function(a,r){if(e.isDatasetVisible(r)){var o=e.getDatasetMeta(r);V.each(a.data,(function(e,a){var r=+t.getRightValue(e);isNaN(r)||o.data[a].hidden||(n=Math.min(r,n),i=Math.max(r,i))}))}})),t.min=n===Number.POSITIVE_INFINITY?0:n,t.max=i===Number.NEGATIVE_INFINITY?0:i,t.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/kn(this.options))},convertTicksToLabels:function(){var t=this;un.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map((function(){var e=V.callback(t.options.pointLabels.callback,arguments,t);return e||0===e?e:""}))},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this,e=t.options;e.display&&e.pointLabels.display?function(t){var e,n,i,a=V.options._parseFont(t.options.pointLabels),r={l:0,r:t.width,t:0,b:t.height-t.paddingTop},o={};t.ctx.font=a.string,t._pointLabelSizes=[];var s,l,u,d=t.chart.data.labels.length;for(e=0;e<d;e++){i=t.getPointPosition(e,t.drawingArea+5),s=t.ctx,l=a.lineHeight,n=V.isArray(u=t.pointLabels[e])?{w:V.longestText(s,s.font,u),h:u.length*l}:{w:s.measureText(u).width,h:l},t._pointLabelSizes[e]=n;var h=t.getIndexAngle(e),c=V.toDegrees(h)%360,f=Mn(c,i.x,n.w,0,180),g=Mn(c,i.y,n.h,90,270);f.start<r.l&&(r.l=f.start,o.l=h),f.end>r.r&&(r.r=f.end,o.r=h),g.start<r.t&&(r.t=g.start,o.t=h),g.end>r.b&&(r.b=g.end,o.b=h)}t.setReductions(t.drawingArea,r,o)}(t):t.setCenterPoint(0,0,0,0)},setReductions:function(t,e,n){var i=this,a=e.l/Math.sin(n.l),r=Math.max(e.r-i.width,0)/Math.sin(n.r),o=-e.t/Math.cos(n.t),s=-Math.max(e.b-(i.height-i.paddingTop),0)/Math.cos(n.b);a=Pn(a),r=Pn(r),o=Pn(o),s=Pn(s),i.drawingArea=Math.min(Math.floor(t-(a+r)/2),Math.floor(t-(o+s)/2)),i.setCenterPoint(a,r,o,s)},setCenterPoint:function(t,e,n,i){var a=this,r=n+a.drawingArea,o=a.height-a.paddingTop-i-a.drawingArea;a.xCenter=Math.floor((t+a.drawingArea+(a.width-e-a.drawingArea))/2+a.left),a.yCenter=Math.floor((r+o)/2+a.top+a.paddingTop)},getIndexAngle:function(t){var e=this.chart,n=(t*(360/e.data.labels.length)+((e.options||{}).startAngle||0))%360;return(n<0?n+360:n)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(V.isNullOrUndef(t))return NaN;var n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this,i=n.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(i)*e+n.xCenter,y:Math.sin(i)*e+n.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(t){var e=this,n=e.min,i=e.max;return e.getPointPositionForValue(t||0,e.beginAtZero?0:n<0&&i<0?i:n>0&&i>0?n:0)},_drawGrid:function(){var t,e,n,i=this,a=i.ctx,r=i.options,o=r.gridLines,s=r.angleLines,l=yn(s.lineWidth,o.lineWidth),u=yn(s.color,o.color);if(r.pointLabels.display&&function(t){var e=t.ctx,n=t.options,i=n.pointLabels,a=kn(n),r=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),o=V.options._parseFont(i);e.save(),e.font=o.string,e.textBaseline="middle";for(var s=t.chart.data.labels.length-1;s>=0;s--){var l=t.getPointPosition(s,r+(0===s?a/2:0)+5),u=xn(i.fontColor,s,N.global.defaultFontColor);e.fillStyle=u;var d=t.getIndexAngle(s),h=V.toDegrees(d);e.textAlign=Sn(h),Cn(h,t._pointLabelSizes[s],l),Dn(e,t.pointLabels[s],l,o.lineHeight)}e.restore()}(i),o.display&&V.each(i.ticks,(function(t,n){0!==n&&(e=i.getDistanceFromCenterForValue(i.ticksAsNumbers[n]),function(t,e,n,i){var a,r=t.ctx,o=e.circular,s=t.chart.data.labels.length,l=xn(e.color,i-1),u=xn(e.lineWidth,i-1);if((o||s)&&l&&u){if(r.save(),r.strokeStyle=l,r.lineWidth=u,r.setLineDash&&(r.setLineDash(e.borderDash||[]),r.lineDashOffset=e.borderDashOffset||0),r.beginPath(),o)r.arc(t.xCenter,t.yCenter,n,0,2*Math.PI);else{a=t.getPointPosition(0,n),r.moveTo(a.x,a.y);for(var d=1;d<s;d++)a=t.getPointPosition(d,n),r.lineTo(a.x,a.y)}r.closePath(),r.stroke(),r.restore()}}(i,o,e,n))})),s.display&&l&&u){for(a.save(),a.lineWidth=l,a.strokeStyle=u,a.setLineDash&&(a.setLineDash(_n([s.borderDash,o.borderDash,[]])),a.lineDashOffset=_n([s.borderDashOffset,o.borderDashOffset,0])),t=i.chart.data.labels.length-1;t>=0;t--)e=i.getDistanceFromCenterForValue(r.ticks.reverse?i.min:i.max),n=i.getPointPosition(t,e),a.beginPath(),a.moveTo(i.xCenter,i.yCenter),a.lineTo(n.x,n.y),a.stroke();a.restore()}},_drawLabels:function(){var t=this,e=t.ctx,n=t.options.ticks;if(n.display){var i,a,r=t.getIndexAngle(0),o=V.options._parseFont(n),s=yn(n.fontColor,N.global.defaultFontColor);e.save(),e.font=o.string,e.translate(t.xCenter,t.yCenter),e.rotate(r),e.textAlign="center",e.textBaseline="middle",V.each(t.ticks,(function(r,l){(0!==l||n.reverse)&&(i=t.getDistanceFromCenterForValue(t.ticksAsNumbers[l]),n.showLabelBackdrop&&(a=e.measureText(r).width,e.fillStyle=n.backdropColor,e.fillRect(-a/2-n.backdropPaddingX,-i-o.size/2-n.backdropPaddingY,a+2*n.backdropPaddingX,o.size+2*n.backdropPaddingY)),e.fillStyle=s,e.fillText(r,0,-i))})),e.restore()}},_drawTitle:V.noop});Tn._defaults=wn;var On=V._deprecated,An=V.options.resolve,Fn=V.valueOrDefault,In=Number.MIN_SAFE_INTEGER||-9007199254740991,Ln=Number.MAX_SAFE_INTEGER||9007199254740991,Rn={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Nn=Object.keys(Rn);function Wn(t,e){return t-e}function Yn(t){return V.valueOrDefault(t.time.min,t.ticks.min)}function zn(t){return V.valueOrDefault(t.time.max,t.ticks.max)}function En(t,e,n,i){var a=function(t,e,n){for(var i,a,r,o=0,s=t.length-1;o>=0&&o<=s;){if(r=t[i=o+s>>1],!(a=t[i-1]||null))return{lo:null,hi:r};if(r[e]<n)o=i+1;else{if(!(a[e]>n))return{lo:a,hi:r};s=i-1}}return{lo:r,hi:null}}(t,e,n),r=a.lo?a.hi?a.lo:t[t.length-2]:t[0],o=a.lo?a.hi?a.hi:t[t.length-1]:t[1],s=o[e]-r[e];return r[i]+(o[i]-r[i])*(s?(n-r[e])/s:0)}function Vn(t,e){var n=t._adapter,i=t.options.time,a=i.parser,r=a||i.format,o=e;return"function"==typeof a&&(o=a(o)),V.isFinite(o)||(o="string"==typeof r?n.parse(o,r):n.parse(o)),null!==o?+o:(a||"function"!=typeof r||(o=r(e),V.isFinite(o)||(o=n.parse(o))),o)}function Hn(t,e){if(V.isNullOrUndef(e))return null;var n=t.options.time,i=Vn(t,t.getRightValue(e));return null===i||n.round&&(i=+t._adapter.startOf(i,n.round)),i}function Bn(t,e,n,i){var a,r,o=Nn.length;for(a=Nn.indexOf(t);a<o-1;++a)if((r=Rn[Nn[a]]).common&&Math.ceil((n-e)/((r.steps?r.steps:Ln)*r.size))<=i)return Nn[a];return Nn[o-1]}function jn(t,e,n){var i,a,r=[],o={},s=e.length;for(i=0;i<s;++i)o[a=e[i]]=i,r.push({value:a,major:!1});return 0!==s&&n?function(t,e,n,i){var a,r,o=t._adapter,s=+o.startOf(e[0].value,i),l=e[e.length-1].value;for(a=s;a<=l;a=+o.add(a,1,i))(r=n[a])>=0&&(e[r].major=!0);return e}(t,r,o,n):r}var Un=rn.extend({initialize:function(){this.mergeTicksOptions(),rn.prototype.initialize.call(this)},update:function(){var t=this,e=t.options,n=e.time||(e.time={}),i=t._adapter=new je._date(e.adapters.date);return On("time scale",n.format,"time.format","time.parser"),On("time scale",n.min,"time.min","ticks.min"),On("time scale",n.max,"time.max","ticks.max"),V.mergeIf(n.displayFormats,i.formats()),rn.prototype.update.apply(t,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),rn.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,n,i,a,r,o,s=this,l=s.chart,u=s._adapter,d=s.options,h=d.time.unit||"day",c=Ln,f=In,g=[],m=[],p=[],v=s._getLabels();for(t=0,n=v.length;t<n;++t)p.push(Hn(s,v[t]));for(t=0,n=(l.data.datasets||[]).length;t<n;++t)if(l.isDatasetVisible(t))if(V.isObject((a=l.data.datasets[t].data)[0]))for(m[t]=[],e=0,i=a.length;e<i;++e)r=Hn(s,a[e]),g.push(r),m[t][e]=r;else m[t]=p.slice(0),o||(g=g.concat(p),o=!0);else m[t]=[];p.length&&(c=Math.min(c,p[0]),f=Math.max(f,p[p.length-1])),g.length&&(g=n>1?function(t){var e,n,i,a={},r=[];for(e=0,n=t.length;e<n;++e)a[i=t[e]]||(a[i]=!0,r.push(i));return r}(g).sort(Wn):g.sort(Wn),c=Math.min(c,g[0]),f=Math.max(f,g[g.length-1])),c=Hn(s,Yn(d))||c,f=Hn(s,zn(d))||f,c=c===Ln?+u.startOf(Date.now(),h):c,f=f===In?+u.endOf(Date.now(),h)+1:f,s.min=Math.min(c,f),s.max=Math.max(c+1,f),s._table=[],s._timestamps={data:g,datasets:m,labels:p}},buildTicks:function(){var t,e,n,i=this,a=i.min,r=i.max,o=i.options,s=o.ticks,l=o.time,u=i._timestamps,d=[],h=i.getLabelCapacity(a),c=s.source,f=o.distribution;for(u="data"===c||"auto"===c&&"series"===f?u.data:"labels"===c?u.labels:function(t,e,n,i){var a,r=t._adapter,o=t.options,s=o.time,l=s.unit||Bn(s.minUnit,e,n,i),u=An([s.stepSize,s.unitStepSize,1]),d="week"===l&&s.isoWeekday,h=e,c=[];if(d&&(h=+r.startOf(h,"isoWeek",d)),h=+r.startOf(h,d?"day":l),r.diff(n,e,l)>1e5*u)throw e+" and "+n+" are too far apart with stepSize of "+u+" "+l;for(a=h;a<n;a=+r.add(a,u,l))c.push(a);return a!==n&&"ticks"!==o.bounds||c.push(a),c}(i,a,r,h),"ticks"===o.bounds&&u.length&&(a=u[0],r=u[u.length-1]),a=Hn(i,Yn(o))||a,r=Hn(i,zn(o))||r,t=0,e=u.length;t<e;++t)(n=u[t])>=a&&n<=r&&d.push(n);return i.min=a,i.max=r,i._unit=l.unit||(s.autoSkip?Bn(l.minUnit,i.min,i.max,h):function(t,e,n,i,a){var r,o;for(r=Nn.length-1;r>=Nn.indexOf(n);r--)if(Rn[o=Nn[r]].common&&t._adapter.diff(a,i,o)>=e-1)return o;return Nn[n?Nn.indexOf(n):0]}(i,d.length,l.minUnit,i.min,i.max)),i._majorUnit=s.major.enabled&&"year"!==i._unit?function(t){for(var e=Nn.indexOf(t)+1,n=Nn.length;e<n;++e)if(Rn[Nn[e]].common)return Nn[e]}(i._unit):void 0,i._table=function(t,e,n,i){if("linear"===i||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var a,r,o,s,l,u=[],d=[e];for(a=0,r=t.length;a<r;++a)(s=t[a])>e&&s<n&&d.push(s);for(d.push(n),a=0,r=d.length;a<r;++a)l=d[a+1],s=d[a],void 0!==(o=d[a-1])&&void 0!==l&&Math.round((l+o)/2)===s||u.push({time:s,pos:a/(r-1)});return u}(i._timestamps.data,a,r,f),i._offsets=function(t,e,n,i,a){var r,o,s=0,l=0;return a.offset&&e.length&&(r=En(t,"time",e[0],"pos"),s=1===e.length?1-r:(En(t,"time",e[1],"pos")-r)/2,o=En(t,"time",e[e.length-1],"pos"),l=1===e.length?o:(o-En(t,"time",e[e.length-2],"pos"))/2),{start:s,end:l,factor:1/(s+1+l)}}(i._table,d,0,0,o),s.reverse&&d.reverse(),jn(i,d,i._majorUnit)},getLabelForIndex:function(t,e){var n=this,i=n._adapter,a=n.chart.data,r=n.options.time,o=a.labels&&t<a.labels.length?a.labels[t]:"",s=a.datasets[e].data[t];return V.isObject(s)&&(o=n.getRightValue(s)),r.tooltipFormat?i.format(Vn(n,o),r.tooltipFormat):"string"==typeof o?o:i.format(Vn(n,o),r.displayFormats.datetime)},tickFormatFunction:function(t,e,n,i){var a=this,r=a.options,o=r.time.displayFormats,s=a._majorUnit,l=o[s],u=n[e],d=r.ticks,h=s&&l&&u&&u.major,c=a._adapter.format(t,i||(h?l:o[a._unit])),f=h?d.major:d.minor,g=An([f.callback,f.userCallback,d.callback,d.userCallback]);return g?g(c,e,n):c},convertTicksToLabels:function(t){var e,n,i=[];for(e=0,n=t.length;e<n;++e)i.push(this.tickFormatFunction(t[e].value,e,t));return i},getPixelForOffset:function(t){var e=this,n=e._offsets,i=En(e._table,"time",t,"pos");return e.getPixelForDecimal((n.start+i)*n.factor)},getPixelForValue:function(t,e,n){var i=this,a=null;if(void 0!==e&&void 0!==n&&(a=i._timestamps.datasets[n][e]),null===a&&(a=Hn(i,t)),null!==a)return i.getPixelForOffset(a)},getPixelForTick:function(t){var e=this.getTicks();return t>=0&&t<e.length?this.getPixelForOffset(e[t].value):null},getValueForPixel:function(t){var e=this,n=e._offsets,i=e.getDecimalForPixel(t)/n.factor-n.end,a=En(e._table,"pos",i,"time");return e._adapter._create(a)},_getLabelSize:function(t){var e=this,n=e.options.ticks,i=e.ctx.measureText(t).width,a=V.toRadians(e.isHorizontal()?n.maxRotation:n.minRotation),r=Math.cos(a),o=Math.sin(a),s=Fn(n.fontSize,N.global.defaultFontSize);return{w:i*r+s*o,h:i*o+s*r}},getLabelWidth:function(t){return this._getLabelSize(t).w},getLabelCapacity:function(t){var e=this,n=e.options.time,i=n.displayFormats,a=i[n.unit]||i.millisecond,r=e.tickFormatFunction(t,0,jn(e,[t],e._majorUnit),a),o=e._getLabelSize(r),s=Math.floor(e.isHorizontal()?e.width/o.w:e.height/o.h);return e.options.offset&&s--,s>0?s:1}});Un._defaults={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};var Gn={category:sn,linear:fn,logarithmic:bn,radialLinear:Tn,time:Un},qn=t((function(t,e){t.exports=function(){var e,n;function i(){return e.apply(null,arguments)}function a(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function r(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function o(t){return void 0===t}function s(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function l(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function u(t,e){var n,i=[];for(n=0;n<t.length;++n)i.push(e(t[n],n));return i}function d(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function h(t,e){for(var n in e)d(e,n)&&(t[n]=e[n]);return d(e,"toString")&&(t.toString=e.toString),d(e,"valueOf")&&(t.valueOf=e.valueOf),t}function c(t,e,n,i){return we(t,e,n,i,!0).utc()}function f(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function g(t){if(null==t._isValid){var e=f(t),i=n.call(e.parsedDateParts,(function(t){return null!=t})),a=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&i);if(t._strict&&(a=a&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return a;t._isValid=a}return t._isValid}function m(t){var e=c(NaN);return null!=t?h(f(e),t):f(e).userInvalidated=!0,e}n=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),n=e.length>>>0,i=0;i<n;i++)if(i in e&&t.call(this,e[i],i,e))return!0;return!1};var p=i.momentProperties=[];function v(t,e){var n,i,a;if(o(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),o(e._i)||(t._i=e._i),o(e._f)||(t._f=e._f),o(e._l)||(t._l=e._l),o(e._strict)||(t._strict=e._strict),o(e._tzm)||(t._tzm=e._tzm),o(e._isUTC)||(t._isUTC=e._isUTC),o(e._offset)||(t._offset=e._offset),o(e._pf)||(t._pf=f(e)),o(e._locale)||(t._locale=e._locale),p.length>0)for(n=0;n<p.length;n++)o(a=e[i=p[n]])||(t[i]=a);return t}var b=!1;function y(t){v(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,i.updateOffset(this),b=!1)}function x(t){return t instanceof y||null!=t&&null!=t._isAMomentObject}function _(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function w(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=_(e)),n}function k(t,e,n){var i,a=Math.min(t.length,e.length),r=Math.abs(t.length-e.length),o=0;for(i=0;i<a;i++)(n&&t[i]!==e[i]||!n&&w(t[i])!==w(e[i]))&&o++;return o+r}function M(t){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function S(t,e){var n=!0;return h((function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,t),n){for(var a,r=[],o=0;o<arguments.length;o++){if(a="","object"==typeof arguments[o]){for(var s in a+="\n["+o+"] ",arguments[0])a+=s+": "+arguments[0][s]+", ";a=a.slice(0,-2)}else a=arguments[o];r.push(a)}M(t+"\nArguments: "+Array.prototype.slice.call(r).join("")+"\n"+(new Error).stack),n=!1}return e.apply(this,arguments)}),e)}var D,C={};function P(t,e){null!=i.deprecationHandler&&i.deprecationHandler(t,e),C[t]||(M(e),C[t]=!0)}function T(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function O(t,e){var n,i=h({},t);for(n in e)d(e,n)&&(r(t[n])&&r(e[n])?(i[n]={},h(i[n],t[n]),h(i[n],e[n])):null!=e[n]?i[n]=e[n]:delete i[n]);for(n in t)d(t,n)&&!d(e,n)&&r(t[n])&&(i[n]=h({},i[n]));return i}function A(t){null!=t&&this.set(t)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,D=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)d(t,e)&&n.push(e);return n};var F={};function I(t,e){var n=t.toLowerCase();F[n]=F[n+"s"]=F[e]=t}function L(t){return"string"==typeof t?F[t]||F[t.toLowerCase()]:void 0}function R(t){var e,n,i={};for(n in t)d(t,n)&&(e=L(n))&&(i[e]=t[n]);return i}var N={};function W(t,e){N[t]=e}function Y(t,e,n){var i=""+Math.abs(t);return(t>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,e-i.length)).toString().substr(1)+i}var z=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,E=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,V={},H={};function B(t,e,n,i){var a=i;"string"==typeof i&&(a=function(){return this[i]()}),t&&(H[t]=a),e&&(H[e[0]]=function(){return Y(a.apply(this,arguments),e[1],e[2])}),n&&(H[n]=function(){return this.localeData().ordinal(a.apply(this,arguments),t)})}function j(t,e){return t.isValid()?(e=U(e,t.localeData()),V[e]=V[e]||function(t){var e,n,i,a=t.match(z);for(e=0,n=a.length;e<n;e++)a[e]=H[a[e]]?H[a[e]]:(i=a[e]).match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"");return function(e){var i,r="";for(i=0;i<n;i++)r+=T(a[i])?a[i].call(e,t):a[i];return r}}(e),V[e](t)):t.localeData().invalidDate()}function U(t,e){var n=5;function i(t){return e.longDateFormat(t)||t}for(E.lastIndex=0;n>=0&&E.test(t);)t=t.replace(E,i),E.lastIndex=0,n-=1;return t}var G=/\d/,q=/\d\d/,Z=/\d{3}/,$=/\d{4}/,X=/[+-]?\d{6}/,J=/\d\d?/,K=/\d\d\d\d?/,Q=/\d\d\d\d\d\d?/,tt=/\d{1,3}/,et=/\d{1,4}/,nt=/[+-]?\d{1,6}/,it=/\d+/,at=/[+-]?\d+/,rt=/Z|[+-]\d\d:?\d\d/gi,ot=/Z|[+-]\d\d(?::?\d\d)?/gi,st=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,lt={};function ut(t,e,n){lt[t]=T(e)?e:function(t,i){return t&&n?n:e}}function dt(t,e){return d(lt,t)?lt[t](e._strict,e._locale):new RegExp(ht(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,n,i,a){return e||n||i||a}))))}function ht(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var ct={};function ft(t,e){var n,i=e;for("string"==typeof t&&(t=[t]),s(e)&&(i=function(t,n){n[e]=w(t)}),n=0;n<t.length;n++)ct[t[n]]=i}function gt(t,e){ft(t,(function(t,n,i,a){i._w=i._w||{},e(t,i._w,i,a)}))}function mt(t,e,n){null!=e&&d(ct,t)&&ct[t](e,n._a,n,t)}function pt(t){return vt(t)?366:365}function vt(t){return t%4==0&&t%100!=0||t%400==0}B("Y",0,0,(function(){var t=this.year();return t<=9999?""+t:"+"+t})),B(0,["YY",2],0,(function(){return this.year()%100})),B(0,["YYYY",4],0,"year"),B(0,["YYYYY",5],0,"year"),B(0,["YYYYYY",6,!0],0,"year"),I("year","y"),W("year",1),ut("Y",at),ut("YY",J,q),ut("YYYY",et,$),ut("YYYYY",nt,X),ut("YYYYYY",nt,X),ft(["YYYYY","YYYYYY"],0),ft("YYYY",(function(t,e){e[0]=2===t.length?i.parseTwoDigitYear(t):w(t)})),ft("YY",(function(t,e){e[0]=i.parseTwoDigitYear(t)})),ft("Y",(function(t,e){e[0]=parseInt(t,10)})),i.parseTwoDigitYear=function(t){return w(t)+(w(t)>68?1900:2e3)};var bt,yt=xt("FullYear",!0);function xt(t,e){return function(n){return null!=n?(wt(this,t,n),i.updateOffset(this,e),this):_t(this,t)}}function _t(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function wt(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&vt(t.year())&&1===t.month()&&29===t.date()?t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),kt(n,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](n))}function kt(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=function(t,e){return(t%12+12)%12}(e);return t+=(e-n)/12,1===n?vt(t)?29:28:31-n%7%2}bt=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},B("M",["MM",2],"Mo",(function(){return this.month()+1})),B("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),B("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),I("month","M"),W("month",8),ut("M",J),ut("MM",J,q),ut("MMM",(function(t,e){return e.monthsShortRegex(t)})),ut("MMMM",(function(t,e){return e.monthsRegex(t)})),ft(["M","MM"],(function(t,e){e[1]=w(t)-1})),ft(["MMM","MMMM"],(function(t,e,n,i){var a=n._locale.monthsParse(t,i,n._strict);null!=a?e[1]=a:f(n).invalidMonth=t}));var Mt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,St="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Dt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Ct(t,e,n){var i,a,r,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)r=c([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===e?-1!==(a=bt.call(this._shortMonthsParse,o))?a:null:-1!==(a=bt.call(this._longMonthsParse,o))?a:null:"MMM"===e?-1!==(a=bt.call(this._shortMonthsParse,o))||-1!==(a=bt.call(this._longMonthsParse,o))?a:null:-1!==(a=bt.call(this._longMonthsParse,o))||-1!==(a=bt.call(this._shortMonthsParse,o))?a:null}function Pt(t,e){var n;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=w(e);else if(!s(e=t.localeData().monthsParse(e)))return t;return n=Math.min(t.date(),kt(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function Tt(t){return null!=t?(Pt(this,t),i.updateOffset(this,!0),this):_t(this,"Month")}var Ot=st,At=st;function Ft(){function t(t,e){return e.length-t.length}var e,n,i=[],a=[],r=[];for(e=0;e<12;e++)n=c([2e3,e]),i.push(this.monthsShort(n,"")),a.push(this.months(n,"")),r.push(this.months(n,"")),r.push(this.monthsShort(n,""));for(i.sort(t),a.sort(t),r.sort(t),e=0;e<12;e++)i[e]=ht(i[e]),a[e]=ht(a[e]);for(e=0;e<24;e++)r[e]=ht(r[e]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function It(t,e,n,i,a,r,o){var s;return t<100&&t>=0?(s=new Date(t+400,e,n,i,a,r,o),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,n,i,a,r,o),s}function Lt(t){var e;if(t<100&&t>=0){var n=Array.prototype.slice.call(arguments);n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)}else e=new Date(Date.UTC.apply(null,arguments));return e}function Rt(t,e,n){var i=7+e-n;return-(7+Lt(t,0,i).getUTCDay()-e)%7+i-1}function Nt(t,e,n,i,a){var r,o,s=1+7*(e-1)+(7+n-i)%7+Rt(t,i,a);return s<=0?o=pt(r=t-1)+s:s>pt(t)?(r=t+1,o=s-pt(t)):(r=t,o=s),{year:r,dayOfYear:o}}function Wt(t,e,n){var i,a,r=Rt(t.year(),e,n),o=Math.floor((t.dayOfYear()-r-1)/7)+1;return o<1?i=o+Yt(a=t.year()-1,e,n):o>Yt(t.year(),e,n)?(i=o-Yt(t.year(),e,n),a=t.year()+1):(a=t.year(),i=o),{week:i,year:a}}function Yt(t,e,n){var i=Rt(t,e,n),a=Rt(t+1,e,n);return(pt(t)-i+a)/7}function zt(t,e){return t.slice(e,7).concat(t.slice(0,e))}B("w",["ww",2],"wo","week"),B("W",["WW",2],"Wo","isoWeek"),I("week","w"),I("isoWeek","W"),W("week",5),W("isoWeek",5),ut("w",J),ut("ww",J,q),ut("W",J),ut("WW",J,q),gt(["w","ww","W","WW"],(function(t,e,n,i){e[i.substr(0,1)]=w(t)})),B("d",0,"do","day"),B("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),B("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),B("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),B("e",0,0,"weekday"),B("E",0,0,"isoWeekday"),I("day","d"),I("weekday","e"),I("isoWeekday","E"),W("day",11),W("weekday",11),W("isoWeekday",11),ut("d",J),ut("e",J),ut("E",J),ut("dd",(function(t,e){return e.weekdaysMinRegex(t)})),ut("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),ut("dddd",(function(t,e){return e.weekdaysRegex(t)})),gt(["dd","ddd","dddd"],(function(t,e,n,i){var a=n._locale.weekdaysParse(t,i,n._strict);null!=a?e.d=a:f(n).invalidWeekday=t})),gt(["d","e","E"],(function(t,e,n,i){e[i]=w(t)}));var Et="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Vt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ht="Su_Mo_Tu_We_Th_Fr_Sa".split("_");function Bt(t,e,n){var i,a,r,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)r=c([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(a=bt.call(this._weekdaysParse,o))?a:null:"ddd"===e?-1!==(a=bt.call(this._shortWeekdaysParse,o))?a:null:-1!==(a=bt.call(this._minWeekdaysParse,o))?a:null:"dddd"===e?-1!==(a=bt.call(this._weekdaysParse,o))||-1!==(a=bt.call(this._shortWeekdaysParse,o))||-1!==(a=bt.call(this._minWeekdaysParse,o))?a:null:"ddd"===e?-1!==(a=bt.call(this._shortWeekdaysParse,o))||-1!==(a=bt.call(this._weekdaysParse,o))||-1!==(a=bt.call(this._minWeekdaysParse,o))?a:null:-1!==(a=bt.call(this._minWeekdaysParse,o))||-1!==(a=bt.call(this._weekdaysParse,o))||-1!==(a=bt.call(this._shortWeekdaysParse,o))?a:null}var jt=st,Ut=st,Gt=st;function qt(){function t(t,e){return e.length-t.length}var e,n,i,a,r,o=[],s=[],l=[],u=[];for(e=0;e<7;e++)n=c([2e3,1]).day(e),i=this.weekdaysMin(n,""),a=this.weekdaysShort(n,""),r=this.weekdays(n,""),o.push(i),s.push(a),l.push(r),u.push(i),u.push(a),u.push(r);for(o.sort(t),s.sort(t),l.sort(t),u.sort(t),e=0;e<7;e++)s[e]=ht(s[e]),l[e]=ht(l[e]),u[e]=ht(u[e]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Zt(){return this.hours()%12||12}function $t(t,e){B(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function Xt(t,e){return e._meridiemParse}B("H",["HH",2],0,"hour"),B("h",["hh",2],0,Zt),B("k",["kk",2],0,(function(){return this.hours()||24})),B("hmm",0,0,(function(){return""+Zt.apply(this)+Y(this.minutes(),2)})),B("hmmss",0,0,(function(){return""+Zt.apply(this)+Y(this.minutes(),2)+Y(this.seconds(),2)})),B("Hmm",0,0,(function(){return""+this.hours()+Y(this.minutes(),2)})),B("Hmmss",0,0,(function(){return""+this.hours()+Y(this.minutes(),2)+Y(this.seconds(),2)})),$t("a",!0),$t("A",!1),I("hour","h"),W("hour",13),ut("a",Xt),ut("A",Xt),ut("H",J),ut("h",J),ut("k",J),ut("HH",J,q),ut("hh",J,q),ut("kk",J,q),ut("hmm",K),ut("hmmss",Q),ut("Hmm",K),ut("Hmmss",Q),ft(["H","HH"],3),ft(["k","kk"],(function(t,e,n){var i=w(t);e[3]=24===i?0:i})),ft(["a","A"],(function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t})),ft(["h","hh"],(function(t,e,n){e[3]=w(t),f(n).bigHour=!0})),ft("hmm",(function(t,e,n){var i=t.length-2;e[3]=w(t.substr(0,i)),e[4]=w(t.substr(i)),f(n).bigHour=!0})),ft("hmmss",(function(t,e,n){var i=t.length-4,a=t.length-2;e[3]=w(t.substr(0,i)),e[4]=w(t.substr(i,2)),e[5]=w(t.substr(a)),f(n).bigHour=!0})),ft("Hmm",(function(t,e,n){var i=t.length-2;e[3]=w(t.substr(0,i)),e[4]=w(t.substr(i))})),ft("Hmmss",(function(t,e,n){var i=t.length-4,a=t.length-2;e[3]=w(t.substr(0,i)),e[4]=w(t.substr(i,2)),e[5]=w(t.substr(a))}));var Jt,Kt=xt("Hours",!0),Qt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:St,monthsShort:Dt,week:{dow:0,doy:6},weekdays:Et,weekdaysMin:Ht,weekdaysShort:Vt,meridiemParse:/[ap]\.?m?\.?/i},te={},ee={};function ne(t){return t?t.toLowerCase().replace("_","-"):t}function ie(e){var n=null;if(!te[e]&&t&&t.exports)try{n=Jt._abbr,function(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}(),ae(n)}catch(i){}return te[e]}function ae(t,e){var n;return t&&((n=o(e)?oe(t):re(t,e))?Jt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),Jt._abbr}function re(t,e){if(null!==e){var n,i=Qt;if(e.abbr=t,null!=te[t])P("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=te[t]._config;else if(null!=e.parentLocale)if(null!=te[e.parentLocale])i=te[e.parentLocale]._config;else{if(null==(n=ie(e.parentLocale)))return ee[e.parentLocale]||(ee[e.parentLocale]=[]),ee[e.parentLocale].push({name:t,config:e}),null;i=n._config}return te[t]=new A(O(i,e)),ee[t]&&ee[t].forEach((function(t){re(t.name,t.config)})),ae(t),te[t]}return delete te[t],null}function oe(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Jt;if(!a(t)){if(e=ie(t))return e;t=[t]}return function(t){for(var e,n,i,a,r=0;r<t.length;){for(e=(a=ne(t[r]).split("-")).length,n=(n=ne(t[r+1]))?n.split("-"):null;e>0;){if(i=ie(a.slice(0,e).join("-")))return i;if(n&&n.length>=e&&k(a,n,!0)>=e-1)break;e--}r++}return Jt}(t)}function se(t){var e,n=t._a;return n&&-2===f(t).overflow&&(e=n[1]<0||n[1]>11?1:n[2]<1||n[2]>kt(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,f(t)._overflowDayOfYear&&(e<0||e>2)&&(e=2),f(t)._overflowWeeks&&-1===e&&(e=7),f(t)._overflowWeekday&&-1===e&&(e=8),f(t).overflow=e),t}function le(t,e,n){return null!=t?t:null!=e?e:n}function ue(t){var e,n,a,r,o,s=[];if(!t._d){for(a=function(t){var e=new Date(i.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}(t),t._w&&null==t._a[2]&&null==t._a[1]&&function(t){var e,n,i,a,r,o,s,l;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)r=1,o=4,n=le(e.GG,t._a[0],Wt(ke(),1,4).year),i=le(e.W,1),((a=le(e.E,1))<1||a>7)&&(l=!0);else{r=t._locale._week.dow,o=t._locale._week.doy;var u=Wt(ke(),r,o);n=le(e.gg,t._a[0],u.year),i=le(e.w,u.week),null!=e.d?((a=e.d)<0||a>6)&&(l=!0):null!=e.e?(a=e.e+r,(e.e<0||e.e>6)&&(l=!0)):a=r}i<1||i>Yt(n,r,o)?f(t)._overflowWeeks=!0:null!=l?f(t)._overflowWeekday=!0:(s=Nt(n,i,a,r,o),t._a[0]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(o=le(t._a[0],a[0]),(t._dayOfYear>pt(o)||0===t._dayOfYear)&&(f(t)._overflowDayOfYear=!0),n=Lt(o,0,t._dayOfYear),t._a[1]=n.getUTCMonth(),t._a[2]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=a[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[3]&&0===t._a[4]&&0===t._a[5]&&0===t._a[6]&&(t._nextDay=!0,t._a[3]=0),t._d=(t._useUTC?Lt:It).apply(null,s),r=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[3]=24),t._w&&void 0!==t._w.d&&t._w.d!==r&&(f(t).weekdayMismatch=!0)}}var de=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,he=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ce=/Z|[+-]\d\d(?::?\d\d)?/,fe=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],ge=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],me=/^\/?Date\((\-?\d+)/i;function pe(t){var e,n,i,a,r,o,s=t._i,l=de.exec(s)||he.exec(s);if(l){for(f(t).iso=!0,e=0,n=fe.length;e<n;e++)if(fe[e][1].exec(l[1])){a=fe[e][0],i=!1!==fe[e][2];break}if(null==a)return void(t._isValid=!1);if(l[3]){for(e=0,n=ge.length;e<n;e++)if(ge[e][1].exec(l[3])){r=(l[2]||" ")+ge[e][0];break}if(null==r)return void(t._isValid=!1)}if(!i&&null!=r)return void(t._isValid=!1);if(l[4]){if(!ce.exec(l[4]))return void(t._isValid=!1);o="Z"}t._f=a+(r||"")+(o||""),xe(t)}else t._isValid=!1}var ve=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;var be={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ye(t){var e,n,i,a,r,o,s,l,u=ve.exec(t._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(u){var d=(e=u[3],n=u[2],i=u[5],a=u[6],r=u[7],o=[(s=u[4],l=parseInt(s,10),l<=49?2e3+l:l<=999?1900+l:l),Dt.indexOf(e),parseInt(n,10),parseInt(i,10),parseInt(a,10)],r&&o.push(parseInt(r,10)),o);if(!function(t,e,n){return!t||Vt.indexOf(t)===new Date(e[0],e[1],e[2]).getDay()||(f(n).weekdayMismatch=!0,n._isValid=!1,!1)}(u[1],d,t))return;t._a=d,t._tzm=function(t,e,n){if(t)return be[t];if(e)return 0;var i=parseInt(n,10),a=i%100;return(i-a)/100*60+a}(u[8],u[9],u[10]),t._d=Lt.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),f(t).rfc2822=!0}else t._isValid=!1}function xe(t){if(t._f!==i.ISO_8601)if(t._f!==i.RFC_2822){t._a=[],f(t).empty=!0;var e,n,a,r,o,s=""+t._i,l=s.length,u=0;for(a=U(t._f,t._locale).match(z)||[],e=0;e<a.length;e++)(n=(s.match(dt(r=a[e],t))||[])[0])&&((o=s.substr(0,s.indexOf(n))).length>0&&f(t).unusedInput.push(o),s=s.slice(s.indexOf(n)+n.length),u+=n.length),H[r]?(n?f(t).empty=!1:f(t).unusedTokens.push(r),mt(r,n,t)):t._strict&&!n&&f(t).unusedTokens.push(r);f(t).charsLeftOver=l-u,s.length>0&&f(t).unusedInput.push(s),t._a[3]<=12&&!0===f(t).bigHour&&t._a[3]>0&&(f(t).bigHour=void 0),f(t).parsedDateParts=t._a.slice(0),f(t).meridiem=t._meridiem,t._a[3]=function(t,e,n){var i;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?((i=t.isPM(n))&&e<12&&(e+=12),i||12!==e||(e=0),e):e}(t._locale,t._a[3],t._meridiem),ue(t),se(t)}else ye(t);else pe(t)}function _e(t){var e=t._i,n=t._f;return t._locale=t._locale||oe(t._l),null===e||void 0===n&&""===e?m({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),x(e)?new y(se(e)):(l(e)?t._d=e:a(n)?function(t){var e,n,i,a,r;if(0===t._f.length)return f(t).invalidFormat=!0,void(t._d=new Date(NaN));for(a=0;a<t._f.length;a++)r=0,e=v({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[a],xe(e),g(e)&&(r+=f(e).charsLeftOver,r+=10*f(e).unusedTokens.length,f(e).score=r,(null==i||r<i)&&(i=r,n=e));h(t,n||e)}(t):n?xe(t):function(t){var e=t._i;o(e)?t._d=new Date(i.now()):l(e)?t._d=new Date(e.valueOf()):"string"==typeof e?function(t){var e=me.exec(t._i);null===e?(pe(t),!1===t._isValid&&(delete t._isValid,ye(t),!1===t._isValid&&(delete t._isValid,i.createFromInputFallback(t)))):t._d=new Date(+e[1])}(t):a(e)?(t._a=u(e.slice(0),(function(t){return parseInt(t,10)})),ue(t)):r(e)?function(t){if(!t._d){var e=R(t._i);t._a=u([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],(function(t){return t&&parseInt(t,10)})),ue(t)}}(t):s(e)?t._d=new Date(e):i.createFromInputFallback(t)}(t),g(t)||(t._d=null),t))}function we(t,e,n,i,o){var s,l={};return!0!==n&&!1!==n||(i=n,n=void 0),(r(t)&&function(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(t.hasOwnProperty(e))return!1;return!0}(t)||a(t)&&0===t.length)&&(t=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=o,l._l=n,l._i=t,l._f=e,l._strict=i,(s=new y(se(_e(l))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function ke(t,e,n,i){return we(t,e,n,i,!1)}i.createFromInputFallback=S("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))})),i.ISO_8601=function(){},i.RFC_2822=function(){};var Me=S("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=ke.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:m()})),Se=S("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=ke.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:m()}));function De(t,e){var n,i;if(1===e.length&&a(e[0])&&(e=e[0]),!e.length)return ke();for(n=e[0],i=1;i<e.length;++i)e[i].isValid()&&!e[i][t](n)||(n=e[i]);return n}var Ce=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Pe(t){var e=R(t),n=e.year||0,i=e.quarter||0,a=e.month||0,r=e.week||e.isoWeek||0,o=e.day||0,s=e.hour||0,l=e.minute||0,u=e.second||0,d=e.millisecond||0;this._isValid=function(t){for(var e in t)if(-1===bt.call(Ce,e)||null!=t[e]&&isNaN(t[e]))return!1;for(var n=!1,i=0;i<Ce.length;++i)if(t[Ce[i]]){if(n)return!1;parseFloat(t[Ce[i]])!==w(t[Ce[i]])&&(n=!0)}return!0}(e),this._milliseconds=+d+1e3*u+6e4*l+1e3*s*60*60,this._days=+o+7*r,this._months=+a+3*i+12*n,this._data={},this._locale=oe(),this._bubble()}function Te(t){return t instanceof Pe}function Oe(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Ae(t,e){B(t,0,0,(function(){var t=this.utcOffset(),n="+";return t<0&&(t=-t,n="-"),n+Y(~~(t/60),2)+e+Y(~~t%60,2)}))}Ae("Z",":"),Ae("ZZ",""),ut("Z",ot),ut("ZZ",ot),ft(["Z","ZZ"],(function(t,e,n){n._useUTC=!0,n._tzm=Ie(ot,t)}));var Fe=/([\+\-]|\d\d)/gi;function Ie(t,e){var n=(e||"").match(t);if(null===n)return null;var i=((n[n.length-1]||[])+"").match(Fe)||["-",0,0],a=60*i[1]+w(i[2]);return 0===a?0:"+"===i[0]?a:-a}function Le(t,e){var n,a;return e._isUTC?(n=e.clone(),a=(x(t)||l(t)?t.valueOf():ke(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+a),i.updateOffset(n,!1),n):ke(t).local()}function Re(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Ne(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var We=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ye=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function ze(t,e){var n,i,a,r,o,l,u=t,h=null;return Te(t)?u={ms:t._milliseconds,d:t._days,M:t._months}:s(t)?(u={},e?u[e]=t:u.milliseconds=t):(h=We.exec(t))?(n="-"===h[1]?-1:1,u={y:0,d:w(h[2])*n,h:w(h[3])*n,m:w(h[4])*n,s:w(h[5])*n,ms:w(Oe(1e3*h[6]))*n}):(h=Ye.exec(t))?u={y:Ee(h[2],n="-"===h[1]?-1:1),M:Ee(h[3],n),w:Ee(h[4],n),d:Ee(h[5],n),h:Ee(h[6],n),m:Ee(h[7],n),s:Ee(h[8],n)}:null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(r=ke(u.from),o=ke(u.to),a=r.isValid()&&o.isValid()?(o=Le(o,r),r.isBefore(o)?l=Ve(r,o):((l=Ve(o,r)).milliseconds=-l.milliseconds,l.months=-l.months),l):{milliseconds:0,months:0},(u={}).ms=a.milliseconds,u.M=a.months),i=new Pe(u),Te(t)&&d(t,"_locale")&&(i._locale=t._locale),i}function Ee(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Ve(t,e){var n={};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function He(t,e){return function(n,i){var a;return null===i||isNaN(+i)||(P(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=i,i=a),Be(this,ze(n="string"==typeof n?+n:n,i),t),this}}function Be(t,e,n,a){var r=e._milliseconds,o=Oe(e._days),s=Oe(e._months);t.isValid()&&(a=null==a||a,s&&Pt(t,_t(t,"Month")+s*n),o&&wt(t,"Date",_t(t,"Date")+o*n),r&&t._d.setTime(t._d.valueOf()+r*n),a&&i.updateOffset(t,o||s))}ze.fn=Pe.prototype,ze.invalid=function(){return ze(NaN)};var je=He(1,"add"),Ue=He(-1,"subtract");function Ge(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),i=t.clone().add(n,"months");return-(n+(e-i<0?(e-i)/(i-t.clone().add(n-1,"months")):(e-i)/(t.clone().add(n+1,"months")-i)))||0}function qe(t){var e;return void 0===t?this._locale._abbr:(null!=(e=oe(t))&&(this._locale=e),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Ze=S("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(t){return void 0===t?this.localeData():this.locale(t)}));function $e(){return this._locale}var Xe=1e3,Je=6e4,Ke=36e5,Qe=126227808e5;function tn(t,e){return(t%e+e)%e}function en(t,e,n){return t<100&&t>=0?new Date(t+400,e,n)-Qe:new Date(t,e,n).valueOf()}function nn(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-Qe:Date.UTC(t,e,n)}function an(t,e){B(0,[t,t.length],0,e)}function rn(t,e,n,i,a){var r;return null==t?Wt(this,i,a).year:(e>(r=Yt(t,i,a))&&(e=r),on.call(this,t,e,n,i,a))}function on(t,e,n,i,a){var r=Nt(t,e,n,i,a),o=Lt(r.year,0,r.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}B(0,["gg",2],0,(function(){return this.weekYear()%100})),B(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),an("gggg","weekYear"),an("ggggg","weekYear"),an("GGGG","isoWeekYear"),an("GGGGG","isoWeekYear"),I("weekYear","gg"),I("isoWeekYear","GG"),W("weekYear",1),W("isoWeekYear",1),ut("G",at),ut("g",at),ut("GG",J,q),ut("gg",J,q),ut("GGGG",et,$),ut("gggg",et,$),ut("GGGGG",nt,X),ut("ggggg",nt,X),gt(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,n,i){e[i.substr(0,2)]=w(t)})),gt(["gg","GG"],(function(t,e,n,a){e[a]=i.parseTwoDigitYear(t)})),B("Q",0,"Qo","quarter"),I("quarter","Q"),W("quarter",7),ut("Q",G),ft("Q",(function(t,e){e[1]=3*(w(t)-1)})),B("D",["DD",2],"Do","date"),I("date","D"),W("date",9),ut("D",J),ut("DD",J,q),ut("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),ft(["D","DD"],2),ft("Do",(function(t,e){e[2]=w(t.match(J)[0])}));var sn=xt("Date",!0);B("DDD",["DDDD",3],"DDDo","dayOfYear"),I("dayOfYear","DDD"),W("dayOfYear",4),ut("DDD",tt),ut("DDDD",Z),ft(["DDD","DDDD"],(function(t,e,n){n._dayOfYear=w(t)})),B("m",["mm",2],0,"minute"),I("minute","m"),W("minute",14),ut("m",J),ut("mm",J,q),ft(["m","mm"],4);var ln=xt("Minutes",!1);B("s",["ss",2],0,"second"),I("second","s"),W("second",15),ut("s",J),ut("ss",J,q),ft(["s","ss"],5);var un,dn=xt("Seconds",!1);for(B("S",0,0,(function(){return~~(this.millisecond()/100)})),B(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),B(0,["SSS",3],0,"millisecond"),B(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),B(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),B(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),B(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),B(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),B(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),I("millisecond","ms"),W("millisecond",16),ut("S",tt,G),ut("SS",tt,q),ut("SSS",tt,Z),un="SSSS";un.length<=9;un+="S")ut(un,it);function hn(t,e){e[6]=w(1e3*("0."+t))}for(un="S";un.length<=9;un+="S")ft(un,hn);var cn=xt("Milliseconds",!1);B("z",0,0,"zoneAbbr"),B("zz",0,0,"zoneName");var fn=y.prototype;function gn(t){return t}fn.add=je,fn.calendar=function(t,e){var n=t||ke(),a=Le(n,this).startOf("day"),r=i.calendarFormat(this,a)||"sameElse",o=e&&(T(e[r])?e[r].call(this,n):e[r]);return this.format(o||this.localeData().calendar(r,this,ke(n)))},fn.clone=function(){return new y(this)},fn.diff=function(t,e,n){var i,a,r;if(!this.isValid())return NaN;if(!(i=Le(t,this)).isValid())return NaN;switch(a=6e4*(i.utcOffset()-this.utcOffset()),e=L(e)){case"year":r=Ge(this,i)/12;break;case"month":r=Ge(this,i);break;case"quarter":r=Ge(this,i)/3;break;case"second":r=(this-i)/1e3;break;case"minute":r=(this-i)/6e4;break;case"hour":r=(this-i)/36e5;break;case"day":r=(this-i-a)/864e5;break;case"week":r=(this-i-a)/6048e5;break;default:r=this-i}return n?r:_(r)},fn.endOf=function(t){var e;if(void 0===(t=L(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?nn:en;switch(t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=Ke-tn(e+(this._isUTC?0:this.utcOffset()*Je),Ke)-1;break;case"minute":e=this._d.valueOf(),e+=Je-tn(e,Je)-1;break;case"second":e=this._d.valueOf(),e+=Xe-tn(e,Xe)-1}return this._d.setTime(e),i.updateOffset(this,!0),this},fn.format=function(t){t||(t=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var e=j(this,t);return this.localeData().postformat(e)},fn.from=function(t,e){return this.isValid()&&(x(t)&&t.isValid()||ke(t).isValid())?ze({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},fn.fromNow=function(t){return this.from(ke(),t)},fn.to=function(t,e){return this.isValid()&&(x(t)&&t.isValid()||ke(t).isValid())?ze({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},fn.toNow=function(t){return this.to(ke(),t)},fn.get=function(t){return T(this[t=L(t)])?this[t]():this},fn.invalidAt=function(){return f(this).overflow},fn.isAfter=function(t,e){var n=x(t)?t:ke(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=L(e)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())},fn.isBefore=function(t,e){var n=x(t)?t:ke(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=L(e)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())},fn.isBetween=function(t,e,n,i){var a=x(t)?t:ke(t),r=x(e)?e:ke(e);return!!(this.isValid()&&a.isValid()&&r.isValid())&&("("===(i=i||"()")[0]?this.isAfter(a,n):!this.isBefore(a,n))&&(")"===i[1]?this.isBefore(r,n):!this.isAfter(r,n))},fn.isSame=function(t,e){var n,i=x(t)?t:ke(t);return!(!this.isValid()||!i.isValid())&&("millisecond"===(e=L(e)||"millisecond")?this.valueOf()===i.valueOf():(n=i.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))},fn.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},fn.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},fn.isValid=function(){return g(this)},fn.lang=Ze,fn.locale=qe,fn.localeData=$e,fn.max=Se,fn.min=Me,fn.parsingFlags=function(){return h({},f(this))},fn.set=function(t,e){if("object"==typeof t)for(var n=function(t){var e=[];for(var n in t)e.push({unit:n,priority:N[n]});return e.sort((function(t,e){return t.priority-e.priority})),e}(t=R(t)),i=0;i<n.length;i++)this[n[i].unit](t[n[i].unit]);else if(T(this[t=L(t)]))return this[t](e);return this},fn.startOf=function(t){var e;if(void 0===(t=L(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?nn:en;switch(t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=tn(e+(this._isUTC?0:this.utcOffset()*Je),Ke);break;case"minute":e=this._d.valueOf(),e-=tn(e,Je);break;case"second":e=this._d.valueOf(),e-=tn(e,Xe)}return this._d.setTime(e),i.updateOffset(this,!0),this},fn.subtract=Ue,fn.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},fn.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},fn.toDate=function(){return new Date(this.valueOf())},fn.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,n=e?this.clone().utc():this;return n.year()<0||n.year()>9999?j(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):T(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",j(n,"Z")):j(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},fn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var n="["+t+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY";return this.format(n+i+"-MM-DD[T]HH:mm:ss.SSS"+e+'[")]')},fn.toJSON=function(){return this.isValid()?this.toISOString():null},fn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},fn.unix=function(){return Math.floor(this.valueOf()/1e3)},fn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},fn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},fn.year=yt,fn.isLeapYear=function(){return vt(this.year())},fn.weekYear=function(t){return rn.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},fn.isoWeekYear=function(t){return rn.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},fn.quarter=fn.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},fn.month=Tt,fn.daysInMonth=function(){return kt(this.year(),this.month())},fn.week=fn.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},fn.isoWeek=fn.isoWeeks=function(t){var e=Wt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},fn.weeksInYear=function(){var t=this.localeData()._week;return Yt(this.year(),t.dow,t.doy)},fn.isoWeeksInYear=function(){return Yt(this.year(),1,4)},fn.date=sn,fn.day=fn.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=function(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}(t,this.localeData()),this.add(t-e,"d")):e},fn.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},fn.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=function(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7},fn.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},fn.hour=fn.hours=Kt,fn.minute=fn.minutes=ln,fn.second=fn.seconds=dn,fn.millisecond=fn.milliseconds=cn,fn.utcOffset=function(t,e,n){var a,r=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=Ie(ot,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(a=Re(this)),this._offset=t,this._isUTC=!0,null!=a&&this.add(a,"m"),r!==t&&(!e||this._changeInProgress?Be(this,ze(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?r:Re(this)},fn.utc=function(t){return this.utcOffset(0,t)},fn.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Re(this),"m")),this},fn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=Ie(rt,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},fn.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?ke(t).utcOffset():0,(this.utcOffset()-t)%60==0)},fn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},fn.isLocal=function(){return!!this.isValid()&&!this._isUTC},fn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},fn.isUtc=Ne,fn.isUTC=Ne,fn.zoneAbbr=function(){return this._isUTC?"UTC":""},fn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},fn.dates=S("dates accessor is deprecated. Use date instead.",sn),fn.months=S("months accessor is deprecated. Use month instead",Tt),fn.years=S("years accessor is deprecated. Use year instead",yt),fn.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()})),fn.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!o(this._isDSTShifted))return this._isDSTShifted;var t={};if(v(t,this),(t=_e(t))._a){var e=t._isUTC?c(t._a):ke(t._a);this._isDSTShifted=this.isValid()&&k(t._a,e.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}));var mn=A.prototype;function pn(t,e,n,i){var a=oe(),r=c().set(i,e);return a[n](r,t)}function vn(t,e,n){if(s(t)&&(e=t,t=void 0),t=t||"",null!=e)return pn(t,e,n,"month");var i,a=[];for(i=0;i<12;i++)a[i]=pn(t,i,n,"month");return a}function bn(t,e,n,i){"boolean"==typeof t?(s(e)&&(n=e,e=void 0),e=e||""):(n=e=t,t=!1,s(e)&&(n=e,e=void 0),e=e||"");var a,r=oe(),o=t?r._week.dow:0;if(null!=n)return pn(e,(n+o)%7,i,"day");var l=[];for(a=0;a<7;a++)l[a]=pn(e,(a+o)%7,i,"day");return l}mn.calendar=function(t,e,n){var i=this._calendar[t]||this._calendar.sameElse;return T(i)?i.call(e,n):i},mn.longDateFormat=function(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,(function(t){return t.slice(1)})),this._longDateFormat[t])},mn.invalidDate=function(){return this._invalidDate},mn.ordinal=function(t){return this._ordinal.replace("%d",t)},mn.preparse=gn,mn.postformat=gn,mn.relativeTime=function(t,e,n,i){var a=this._relativeTime[n];return T(a)?a(t,e,n,i):a.replace(/%d/i,t)},mn.pastFuture=function(t,e){var n=this._relativeTime[t>0?"future":"past"];return T(n)?n(e):n.replace(/%s/i,e)},mn.set=function(t){var e,n;for(n in t)T(e=t[n])?this[n]=e:this["_"+n]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},mn.months=function(t,e){return t?a(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Mt).test(e)?"format":"standalone"][t.month()]:a(this._months)?this._months:this._months.standalone},mn.monthsShort=function(t,e){return t?a(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Mt.test(e)?"format":"standalone"][t.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},mn.monthsParse=function(t,e,n){var i,a,r;if(this._monthsParseExact)return Ct.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(a=c([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(r="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[i]=new RegExp(r.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[i].test(t))return i;if(n&&"MMM"===e&&this._shortMonthsParse[i].test(t))return i;if(!n&&this._monthsParse[i].test(t))return i}},mn.monthsRegex=function(t){return this._monthsParseExact?(d(this,"_monthsRegex")||Ft.call(this),t?this._monthsStrictRegex:this._monthsRegex):(d(this,"_monthsRegex")||(this._monthsRegex=At),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},mn.monthsShortRegex=function(t){return this._monthsParseExact?(d(this,"_monthsRegex")||Ft.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(d(this,"_monthsShortRegex")||(this._monthsShortRegex=Ot),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},mn.week=function(t){return Wt(t,this._week.dow,this._week.doy).week},mn.firstDayOfYear=function(){return this._week.doy},mn.firstDayOfWeek=function(){return this._week.dow},mn.weekdays=function(t,e){var n=a(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?zt(n,this._week.dow):t?n[t.day()]:n},mn.weekdaysMin=function(t){return!0===t?zt(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},mn.weekdaysShort=function(t){return!0===t?zt(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},mn.weekdaysParse=function(t,e,n){var i,a,r;if(this._weekdaysParseExact)return Bt.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(a=c([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(r="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[i]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[i].test(t))return i;if(n&&"ddd"===e&&this._shortWeekdaysParse[i].test(t))return i;if(n&&"dd"===e&&this._minWeekdaysParse[i].test(t))return i;if(!n&&this._weekdaysParse[i].test(t))return i}},mn.weekdaysRegex=function(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||qt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=jt),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},mn.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||qt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ut),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},mn.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||qt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Gt),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},mn.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},mn.meridiem=function(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"},ae("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===w(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),i.lang=S("moment.lang is deprecated. Use moment.locale instead.",ae),i.langData=S("moment.langData is deprecated. Use moment.localeData instead.",oe);var yn=Math.abs;function xn(t,e,n,i){var a=ze(e,n);return t._milliseconds+=i*a._milliseconds,t._days+=i*a._days,t._months+=i*a._months,t._bubble()}function _n(t){return t<0?Math.floor(t):Math.ceil(t)}function wn(t){return 4800*t/146097}function kn(t){return 146097*t/4800}function Mn(t){return function(){return this.as(t)}}var Sn=Mn("ms"),Dn=Mn("s"),Cn=Mn("m"),Pn=Mn("h"),Tn=Mn("d"),On=Mn("w"),An=Mn("M"),Fn=Mn("Q"),In=Mn("y");function Ln(t){return function(){return this.isValid()?this._data[t]:NaN}}var Rn=Ln("milliseconds"),Nn=Ln("seconds"),Wn=Ln("minutes"),Yn=Ln("hours"),zn=Ln("days"),En=Ln("months"),Vn=Ln("years"),Hn=Math.round,Bn={ss:44,s:45,m:45,h:22,d:26,M:11};function jn(t,e,n,i,a){return a.relativeTime(e||1,!!n,t,i)}var Un=Math.abs;function Gn(t){return(t>0)-(t<0)||+t}function qn(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n=Un(this._milliseconds)/1e3,i=Un(this._days),a=Un(this._months);t=_(n/60),e=_(t/60),n%=60,t%=60;var r=_(a/12),o=a%=12,s=i,l=e,u=t,d=n?n.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var c=h<0?"-":"",f=Gn(this._months)!==Gn(h)?"-":"",g=Gn(this._days)!==Gn(h)?"-":"",m=Gn(this._milliseconds)!==Gn(h)?"-":"";return c+"P"+(r?f+r+"Y":"")+(o?f+o+"M":"")+(s?g+s+"D":"")+(l||u||d?"T":"")+(l?m+l+"H":"")+(u?m+u+"M":"")+(d?m+d+"S":"")}var Zn=Pe.prototype;return Zn.isValid=function(){return this._isValid},Zn.abs=function(){var t=this._data;return this._milliseconds=yn(this._milliseconds),this._days=yn(this._days),this._months=yn(this._months),t.milliseconds=yn(t.milliseconds),t.seconds=yn(t.seconds),t.minutes=yn(t.minutes),t.hours=yn(t.hours),t.months=yn(t.months),t.years=yn(t.years),this},Zn.add=function(t,e){return xn(this,t,e,1)},Zn.subtract=function(t,e){return xn(this,t,e,-1)},Zn.as=function(t){if(!this.isValid())return NaN;var e,n,i=this._milliseconds;if("month"===(t=L(t))||"quarter"===t||"year"===t)switch(n=this._months+wn(e=this._days+i/864e5),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(kn(this._months)),t){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return 24*e+i/36e5;case"minute":return 1440*e+i/6e4;case"second":return 86400*e+i/1e3;case"millisecond":return Math.floor(864e5*e)+i;default:throw new Error("Unknown unit "+t)}},Zn.asMilliseconds=Sn,Zn.asSeconds=Dn,Zn.asMinutes=Cn,Zn.asHours=Pn,Zn.asDays=Tn,Zn.asWeeks=On,Zn.asMonths=An,Zn.asQuarters=Fn,Zn.asYears=In,Zn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12):NaN},Zn._bubble=function(){var t,e,n,i,a,r=this._milliseconds,o=this._days,s=this._months,l=this._data;return r>=0&&o>=0&&s>=0||r<=0&&o<=0&&s<=0||(r+=864e5*_n(kn(s)+o),o=0,s=0),l.milliseconds=r%1e3,t=_(r/1e3),l.seconds=t%60,e=_(t/60),l.minutes=e%60,n=_(e/60),l.hours=n%24,o+=_(n/24),s+=a=_(wn(o)),o-=_n(kn(a)),i=_(s/12),s%=12,l.days=o,l.months=s,l.years=i,this},Zn.clone=function(){return ze(this)},Zn.get=function(t){return t=L(t),this.isValid()?this[t+"s"]():NaN},Zn.milliseconds=Rn,Zn.seconds=Nn,Zn.minutes=Wn,Zn.hours=Yn,Zn.days=zn,Zn.weeks=function(){return _(this.days()/7)},Zn.months=En,Zn.years=Vn,Zn.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e=this.localeData(),n=function(t,e,n){var i=ze(t).abs(),a=Hn(i.as("s")),r=Hn(i.as("m")),o=Hn(i.as("h")),s=Hn(i.as("d")),l=Hn(i.as("M")),u=Hn(i.as("y")),d=a<=Bn.ss&&["s",a]||a<Bn.s&&["ss",a]||r<=1&&["m"]||r<Bn.m&&["mm",r]||o<=1&&["h"]||o<Bn.h&&["hh",o]||s<=1&&["d"]||s<Bn.d&&["dd",s]||l<=1&&["M"]||l<Bn.M&&["MM",l]||u<=1&&["y"]||["yy",u];return d[2]=e,d[3]=+t>0,d[4]=n,jn.apply(null,d)}(this,!t,e);return t&&(n=e.pastFuture(+this,n)),e.postformat(n)},Zn.toISOString=qn,Zn.toString=qn,Zn.toJSON=qn,Zn.locale=qe,Zn.localeData=$e,Zn.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",qn),Zn.lang=Ze,B("X",0,0,"unix"),B("x",0,0,"valueOf"),ut("x",at),ut("X",/[+-]?\d+(\.\d{1,3})?/),ft("X",(function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))})),ft("x",(function(t,e,n){n._d=new Date(w(t))})),i.version="2.24.0",e=ke,i.fn=fn,i.min=function(){return De("isBefore",[].slice.call(arguments,0))},i.max=function(){return De("isAfter",[].slice.call(arguments,0))},i.now=function(){return Date.now?Date.now():+new Date},i.utc=c,i.unix=function(t){return ke(1e3*t)},i.months=function(t,e){return vn(t,e,"months")},i.isDate=l,i.locale=ae,i.invalid=m,i.duration=ze,i.isMoment=x,i.weekdays=function(t,e,n){return bn(t,e,n,"weekdays")},i.parseZone=function(){return ke.apply(null,arguments).parseZone()},i.localeData=oe,i.isDuration=Te,i.monthsShort=function(t,e){return vn(t,e,"monthsShort")},i.weekdaysMin=function(t,e,n){return bn(t,e,n,"weekdaysMin")},i.defineLocale=re,i.updateLocale=function(t,e){if(null!=e){var n,i,a=Qt;null!=(i=ie(t))&&(a=i._config),(n=new A(e=O(a,e))).parentLocale=te[t],te[t]=n,ae(t)}else null!=te[t]&&(null!=te[t].parentLocale?te[t]=te[t].parentLocale:null!=te[t]&&delete te[t]);return te[t]},i.locales=function(){return D(te)},i.weekdaysShort=function(t,e,n){return bn(t,e,n,"weekdaysShort")},i.normalizeUnits=L,i.relativeTimeRounding=function(t){return void 0===t?Hn:"function"==typeof t&&(Hn=t,!0)},i.relativeTimeThreshold=function(t,e){return void 0!==Bn[t]&&(void 0===e?Bn[t]:(Bn[t]=e,"s"===t&&(Bn.ss=e-1),!0))},i.calendarFormat=function(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},i.prototype=fn,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i}()})),Zn={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};je._date.override("function"==typeof qn?{_id:"moment",formats:function(){return Zn},parse:function(t,e){return"string"==typeof t&&"string"==typeof e?t=qn(t,e):t instanceof qn||(t=qn(t)),t.isValid()?t.valueOf():null},format:function(t,e){return qn(t).format(e)},add:function(t,e,n){return qn(t).add(e,n).valueOf()},diff:function(t,e,n){return qn(t).diff(qn(e),n)},startOf:function(t,e,n){return t=qn(t),"isoWeek"===e?t.isoWeekday(n).valueOf():t.startOf(e).valueOf()},endOf:function(t,e){return qn(t).endOf(e).valueOf()},_create:function(t){return qn(t)}}:{}),N._set("global",{plugins:{filler:{propagate:!0}}});var $n={dataset:function(t){var e=t.fill,n=t.chart,i=n.getDatasetMeta(e),a=i&&n.isDatasetVisible(e)&&i.dataset._children||[],r=a.length||0;return r?function(t,e){return e<r&&a[e]._view||null}:null},boundary:function(t){var e=t.boundary,n=e?e.x:null,i=e?e.y:null;return V.isArray(e)?function(t,n){return e[n]}:function(t){return{x:null===n?t.x:n,y:null===i?t.y:i}}}};function Xn(t,e,n){var i,a=t._model||{},r=a.fill;if(void 0===r&&(r=!!a.backgroundColor),!1===r||null===r)return!1;if(!0===r)return"origin";if(i=parseFloat(r,10),isFinite(i)&&Math.floor(i)===i)return"-"!==r[0]&&"+"!==r[0]||(i=e+i),!(i===e||i<0||i>=n)&&i;switch(r){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return r;default:return!1}}function Jn(t){return(t.el._scale||{}).getPointPositionForValue?function(t){var e,n,i,a,r,o=t.el._scale,s=o.options,l=o.chart.data.labels.length,u=t.fill,d=[];if(!l)return null;for(n=s.ticks.reverse?o.min:o.max,i=o.getPointPositionForValue(0,e=s.ticks.reverse?o.max:o.min),a=0;a<l;++a)r="start"===u||"end"===u?o.getPointPositionForValue(a,"start"===u?e:n):o.getBasePosition(a),s.gridLines.circular&&(r.cx=i.x,r.cy=i.y,r.angle=o.getIndexAngle(a)-Math.PI/2),d.push(r);return d}(t):function(t){var e,n=t.el._model||{},i=t.el._scale||{},a=t.fill,r=null;if(isFinite(a))return null;if("start"===a?r=void 0===n.scaleBottom?i.bottom:n.scaleBottom:"end"===a?r=void 0===n.scaleTop?i.top:n.scaleTop:void 0!==n.scaleZero?r=n.scaleZero:i.getBasePixel&&(r=i.getBasePixel()),null!=r){if(void 0!==r.x&&void 0!==r.y)return r;if(V.isFinite(r))return{x:(e=i.isHorizontal())?r:null,y:e?null:r}}return null}(t)}function Kn(t,e,n){var i,a=t[e].fill,r=[e];if(!n)return a;for(;!1!==a&&-1===r.indexOf(a);){if(!isFinite(a))return a;if(!(i=t[a]))return!1;if(i.visible)return a;r.push(a),a=i.fill}return!1}function Qn(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),$n[n](t))}function ti(t){return t&&!t.skip}function ei(t,e,n,i,a){var r,o,s,l;if(i&&a){for(t.moveTo(e[0].x,e[0].y),r=1;r<i;++r)V.canvas.lineTo(t,e[r-1],e[r]);if(void 0===n[0].angle)for(t.lineTo(n[a-1].x,n[a-1].y),r=a-1;r>0;--r)V.canvas.lineTo(t,n[r],n[r-1],!0);else for(o=n[0].cx,s=n[0].cy,l=Math.sqrt(Math.pow(n[0].x-o,2)+Math.pow(n[0].y-s,2)),r=a-1;r>0;--r)t.arc(o,s,l,n[r].angle,n[r-1].angle,!0)}}function ni(t,e,n,i,a,r){var o,s,l,u,d,h,c,f,g=e.length,m=i.spanGaps,p=[],v=[],b=0,y=0;for(t.beginPath(),o=0,s=g;o<s;++o)d=n(u=e[l=o%g]._view,l,i),h=ti(u),c=ti(d),r&&void 0===f&&h&&(s=g+(f=o+1)),h&&c?(b=p.push(u),y=v.push(d)):b&&y&&(m?(h&&p.push(u),c&&v.push(d)):(ei(t,p,v,b,y),b=y=0,p=[],v=[]));ei(t,p,v,b,y),t.closePath(),t.fillStyle=a,t.fill()}var ii={id:"filler",afterDatasetsUpdate:function(t,e){var n,i,a,r,o=(t.data.datasets||[]).length,s=e.propagate,l=[];for(i=0;i<o;++i)r=null,(a=(n=t.getDatasetMeta(i)).dataset)&&a._model&&a instanceof vt.Line&&(r={visible:t.isDatasetVisible(i),fill:Xn(a,i,o),chart:t,el:a}),n.$filler=r,l.push(r);for(i=0;i<o;++i)(r=l[i])&&(r.fill=Kn(l,i,s),r.boundary=Jn(r),r.mapper=Qn(r))},beforeDatasetsDraw:function(t){var e,n,i,a,r,o,s,l=t._getSortedVisibleDatasetMetas(),u=t.ctx;for(n=l.length-1;n>=0;--n)(e=l[n].$filler)&&e.visible&&(r=(i=e.el)._children||[],s=(a=i._view).backgroundColor||N.global.defaultColor,(o=e.mapper)&&s&&r.length&&(V.canvas.clipArea(u,t.chartArea),ni(u,r,o,a,s,i._loop),V.canvas.unclipArea(u)))}},ai=V.rtl.getRtlAdapter,ri=V.noop,oi=V.valueOrDefault;function si(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}N._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var n=e.datasetIndex,i=this.chart,a=i.getDatasetMeta(n);a.hidden=null===a.hidden?!i.data.datasets[n].hidden:null,i.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,n=t.options.legend||{},i=n.labels&&n.labels.usePointStyle;return t._getSortedDatasetMetas().map((function(n){var a=n.controller.getStyle(i?0:void 0);return{text:e[n.index].label,fillStyle:a.backgroundColor,hidden:!t.isDatasetVisible(n.index),lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:a.borderWidth,strokeStyle:a.borderColor,pointStyle:a.pointStyle,rotation:a.rotation,datasetIndex:n.index}}),this)}}},legendCallback:function(t){var e,n,i,a=document.createElement("ul"),r=t.data.datasets;for(a.setAttribute("class",t.id+"-legend"),e=0,n=r.length;e<n;e++)(i=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=r[e].backgroundColor,r[e].label&&i.appendChild(document.createTextNode(r[e].label));return a.outerHTML}});var li=G.extend({initialize:function(t){var e=this;V.extend(e,t),e.legendHitBoxes=[],e._hoveredItem=null,e.doughnutMode=!1},beforeUpdate:ri,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:ri,beforeSetDimensions:ri,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:ri,beforeBuildLabels:ri,buildLabels:function(){var t=this,e=t.options.labels||{},n=V.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter((function(n){return e.filter(n,t.chart.data)}))),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:ri,beforeFit:ri,fit:function(){var t=this,e=t.options,n=e.labels,i=e.display,a=t.ctx,r=V.options._parseFont(n),o=r.size,s=t.legendHitBoxes=[],l=t.minSize,u=t.isHorizontal();if(u?(l.width=t.maxWidth,l.height=i?10:0):(l.width=i?10:0,l.height=t.maxHeight),i){if(a.font=r.string,u){var d=t.lineWidths=[0],h=0;a.textAlign="left",a.textBaseline="middle",V.each(t.legendItems,(function(t,e){var i=si(n,o)+o/2+a.measureText(t.text).width;(0===e||d[d.length-1]+i+2*n.padding>l.width)&&(h+=o+n.padding,d[d.length-(e>0?0:1)]=0),s[e]={left:0,top:0,width:i,height:o},d[d.length-1]+=i+n.padding})),l.height+=h}else{var c=n.padding,f=t.columnWidths=[],g=t.columnHeights=[],m=n.padding,p=0,v=0;V.each(t.legendItems,(function(t,e){var i=si(n,o)+o/2+a.measureText(t.text).width;e>0&&v+o+2*c>l.height&&(m+=p+n.padding,f.push(p),g.push(v),p=0,v=0),p=Math.max(p,i),v+=o+c,s[e]={left:0,top:0,width:i,height:o}})),m+=p,f.push(p),g.push(v),l.width+=m}t.width=l.width,t.height=l.height}else t.width=l.width=t.height=l.height=0},afterFit:ri,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,n=e.labels,i=N.global,a=i.defaultColor,r=i.elements.line,o=t.height,s=t.columnHeights,l=t.width,u=t.lineWidths;if(e.display){var d,h=ai(e.rtl,t.left,t.minSize.width),c=t.ctx,f=oi(n.fontColor,i.defaultFontColor),g=V.options._parseFont(n),m=g.size;c.textAlign=h.textAlign("left"),c.textBaseline="middle",c.lineWidth=.5,c.strokeStyle=f,c.fillStyle=f,c.font=g.string;var p=si(n,m),v=t.legendHitBoxes,b=function(t,i){switch(e.align){case"start":return n.padding;case"end":return t-i;default:return(t-i+n.padding)/2}},y=t.isHorizontal();d=y?{x:t.left+b(l,u[0]),y:t.top+n.padding,line:0}:{x:t.left+n.padding,y:t.top+b(o,s[0]),line:0},V.rtl.overrideTextDirection(t.ctx,e.textDirection);var x=m+n.padding;V.each(t.legendItems,(function(e,i){var f=c.measureText(e.text).width,g=p+m/2+f,_=d.x,w=d.y;h.setWidth(t.minSize.width),y?i>0&&_+g+n.padding>t.left+t.minSize.width&&(w=d.y+=x,d.line++,_=d.x=t.left+b(l,u[d.line])):i>0&&w+x>t.top+t.minSize.height&&(_=d.x=_+t.columnWidths[d.line]+n.padding,d.line++,w=d.y=t.top+b(o,s[d.line]));var k=h.x(_);!function(t,e,i){if(!(isNaN(p)||p<=0)){c.save();var o=oi(i.lineWidth,r.borderWidth);if(c.fillStyle=oi(i.fillStyle,a),c.lineCap=oi(i.lineCap,r.borderCapStyle),c.lineDashOffset=oi(i.lineDashOffset,r.borderDashOffset),c.lineJoin=oi(i.lineJoin,r.borderJoinStyle),c.lineWidth=o,c.strokeStyle=oi(i.strokeStyle,a),c.setLineDash&&c.setLineDash(oi(i.lineDash,r.borderDash)),n&&n.usePointStyle){var s=p*Math.SQRT2/2,l=h.xPlus(t,p/2);V.canvas.drawPoint(c,i.pointStyle,s,l,e+m/2,i.rotation)}else c.fillRect(h.leftForLtr(t,p),e,p,m),0!==o&&c.strokeRect(h.leftForLtr(t,p),e,p,m);c.restore()}}(k,w,e),v[i].left=h.leftForLtr(k,v[i].width),v[i].top=w,function(t,e,n,i){var a=m/2,r=h.xPlus(t,p+a),o=e+a;c.fillText(n.text,r,o),n.hidden&&(c.beginPath(),c.lineWidth=2,c.moveTo(r,o),c.lineTo(h.xPlus(r,i),o),c.stroke())}(k,w,e,f),y?d.x+=g+n.padding:d.y+=x})),V.rtl.restoreTextDirection(t.ctx,e.textDirection)}},_getLegendItemAt:function(t,e){var n,i,a,r=this;if(t>=r.left&&t<=r.right&&e>=r.top&&e<=r.bottom)for(a=r.legendHitBoxes,n=0;n<a.length;++n)if(t>=(i=a[n]).left&&t<=i.left+i.width&&e>=i.top&&e<=i.top+i.height)return r.legendItems[n];return null},handleEvent:function(t){var e,n=this,i=n.options,a="mouseup"===t.type?"click":t.type;if("mousemove"===a){if(!i.onHover&&!i.onLeave)return}else{if("click"!==a)return;if(!i.onClick)return}e=n._getLegendItemAt(t.x,t.y),"click"===a?e&&i.onClick&&i.onClick.call(n,t.native,e):(i.onLeave&&e!==n._hoveredItem&&(n._hoveredItem&&i.onLeave.call(n,t.native,n._hoveredItem),n._hoveredItem=e),i.onHover&&e&&i.onHover.call(n,t.native,e))}});function ui(t,e){var n=new li({ctx:t.ctx,options:e,chart:t});le.configure(t,n,e),le.addBox(t,n),t.legend=n}var di={id:"legend",_element:li,beforeInit:function(t){var e=t.options.legend;e&&ui(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(V.mergeIf(e,N.global.legend),n?(le.configure(t,n,e),n.options=e):ui(t,e)):n&&(le.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}},hi=V.noop;N._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var ci=G.extend({initialize:function(t){V.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:hi,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:hi,beforeSetDimensions:hi,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:hi,beforeBuildLabels:hi,buildLabels:hi,afterBuildLabels:hi,beforeFit:hi,fit:function(){var t,e=this,n=e.options,i=e.minSize={},a=e.isHorizontal();n.display?(t=(V.isArray(n.text)?n.text.length:1)*V.options._parseFont(n).lineHeight+2*n.padding,e.width=i.width=a?e.maxWidth:t,e.height=i.height=a?t:e.maxHeight):e.width=i.width=e.height=i.height=0},afterFit:hi,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=t.options;if(n.display){var i,a,r,o=V.options._parseFont(n),s=o.lineHeight,l=s/2+n.padding,u=0,d=t.top,h=t.left,c=t.bottom,f=t.right;e.fillStyle=V.valueOrDefault(n.fontColor,N.global.defaultFontColor),e.font=o.string,t.isHorizontal()?(a=h+(f-h)/2,r=d+l,i=f-h):(a="left"===n.position?h+l:f-l,r=d+(c-d)/2,i=c-d,u=Math.PI*("left"===n.position?-.5:.5)),e.save(),e.translate(a,r),e.rotate(u),e.textAlign="center",e.textBaseline="middle";var g=n.text;if(V.isArray(g))for(var m=0,p=0;p<g.length;++p)e.fillText(g[p],0,m,i),m+=s;else e.fillText(g,0,0,i);e.restore()}}});function fi(t,e){var n=new ci({ctx:t.ctx,options:e,chart:t});le.configure(t,n,e),le.addBox(t,n),t.titleBlock=n}var gi={},mi=ii,pi=di,vi={id:"title",_element:ci,beforeInit:function(t){var e=t.options.title;e&&fi(t,e)},beforeUpdate:function(t){var e=t.options.title,n=t.titleBlock;e?(V.mergeIf(e,N.global.title),n?(le.configure(t,n,e),n.options=e):fi(t,e)):n&&(le.removeBox(t,n),delete t.titleBlock)}};for(var bi in gi.filler=mi,gi.legend=pi,gi.title=vi,Ve.helpers=V,function(){function t(t,e,n){var i;return"string"==typeof t?(i=parseInt(t,10),-1!==t.indexOf("%")&&(i=i/100*e.parentNode[n])):i=t,i}function e(t){return null!=t&&"none"!==t}function n(n,i,a){var r=document.defaultView,o=V._getParentNode(n),s=r.getComputedStyle(n)[i],l=r.getComputedStyle(o)[i],u=e(s),d=e(l),h=Number.POSITIVE_INFINITY;return u||d?Math.min(u?t(s,n,a):h,d?t(l,o,a):h):"none"}V.where=function(t,e){if(V.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return V.each(t,(function(t){e(t)&&n.push(t)})),n},V.findIndex=Array.prototype.findIndex?function(t,e,n){return t.findIndex(e,n)}:function(t,e,n){n=void 0===n?t:n;for(var i=0,a=t.length;i<a;++i)if(e.call(n,t[i],i,t))return i;return-1},V.findNextWhere=function(t,e,n){V.isNullOrUndef(n)&&(n=-1);for(var i=n+1;i<t.length;i++){var a=t[i];if(e(a))return a}},V.findPreviousWhere=function(t,e,n){V.isNullOrUndef(n)&&(n=t.length);for(var i=n-1;i>=0;i--){var a=t[i];if(e(a))return a}},V.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},V.almostEquals=function(t,e,n){return Math.abs(t-e)<n},V.almostWhole=function(t,e){var n=Math.round(t);return n-e<=t&&n+e>=t},V.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},V.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},V.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},V.toRadians=function(t){return t*(Math.PI/180)},V.toDegrees=function(t){return t*(180/Math.PI)},V._decimalPlaces=function(t){if(V.isFinite(t)){for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}},V.getAngleFromPoint=function(t,e){var n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i),r=Math.atan2(i,n);return r<-.5*Math.PI&&(r+=2*Math.PI),{angle:r,distance:a}},V.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},V.aliasPixel=function(t){return t%2==0?0:.5},V._alignPixel=function(t,e,n){var i=t.currentDevicePixelRatio,a=n/2;return Math.round((e-a)*i)/i+a},V.splineCurve=function(t,e,n,i){var a=t.skip?e:t,r=e,o=n.skip?e:n,s=Math.sqrt(Math.pow(r.x-a.x,2)+Math.pow(r.y-a.y,2)),l=Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.y,2)),u=s/(s+l),d=l/(s+l),h=i*(u=isNaN(u)?0:u),c=i*(d=isNaN(d)?0:d);return{previous:{x:r.x-h*(o.x-a.x),y:r.y-h*(o.y-a.y)},next:{x:r.x+c*(o.x-a.x),y:r.y+c*(o.y-a.y)}}},V.EPSILON=Number.EPSILON||1e-14,V.splineCurveMonotone=function(t){var e,n,i,a,r,o,s,l,u,d=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),h=d.length;for(e=0;e<h;++e)if(!(i=d[e]).model.skip){if(n=e>0?d[e-1]:null,(a=e<h-1?d[e+1]:null)&&!a.model.skip){var c=a.model.x-i.model.x;i.deltaK=0!==c?(a.model.y-i.model.y)/c:0}i.mK=!n||n.model.skip?i.deltaK:!a||a.model.skip?n.deltaK:this.sign(n.deltaK)!==this.sign(i.deltaK)?0:(n.deltaK+i.deltaK)/2}for(e=0;e<h-1;++e)a=d[e+1],(i=d[e]).model.skip||a.model.skip||(V.almostEquals(i.deltaK,0,this.EPSILON)?i.mK=a.mK=0:(r=i.mK/i.deltaK,o=a.mK/i.deltaK,(l=Math.pow(r,2)+Math.pow(o,2))<=9||(s=3/Math.sqrt(l),i.mK=r*s*i.deltaK,a.mK=o*s*i.deltaK)));for(e=0;e<h;++e)(i=d[e]).model.skip||(a=e<h-1?d[e+1]:null,(n=e>0?d[e-1]:null)&&!n.model.skip&&(i.model.controlPointPreviousX=i.model.x-(u=(i.model.x-n.model.x)/3),i.model.controlPointPreviousY=i.model.y-u*i.mK),a&&!a.model.skip&&(i.model.controlPointNextX=i.model.x+(u=(a.model.x-i.model.x)/3),i.model.controlPointNextY=i.model.y+u*i.mK))},V.nextItem=function(t,e,n){return n?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},V.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},V.niceNum=function(t,e){var n=Math.floor(V.log10(t)),i=t/Math.pow(10,n);return(e?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,n)},V.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},V.getRelativePosition=function(t,e){var n,i,a=t.originalEvent||t,r=t.target||t.srcElement,o=r.getBoundingClientRect(),s=a.touches;s&&s.length>0?(n=s[0].clientX,i=s[0].clientY):(n=a.clientX,i=a.clientY);var l=parseFloat(V.getStyle(r,"padding-left")),u=parseFloat(V.getStyle(r,"padding-top")),d=parseFloat(V.getStyle(r,"padding-right")),h=parseFloat(V.getStyle(r,"padding-bottom")),c=o.bottom-o.top-u-h;return{x:n=Math.round((n-o.left-l)/(o.right-o.left-l-d)*r.width/e.currentDevicePixelRatio),y:i=Math.round((i-o.top-u)/c*r.height/e.currentDevicePixelRatio)}},V.getConstraintWidth=function(t){return n(t,"max-width","clientWidth")},V.getConstraintHeight=function(t){return n(t,"max-height","clientHeight")},V._calculatePadding=function(t,e,n){return(e=V.getStyle(t,e)).indexOf("%")>-1?n*parseInt(e,10)/100:parseInt(e,10)},V._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},V.getMaximumWidth=function(t){var e=V._getParentNode(t);if(!e)return t.clientWidth;var n=e.clientWidth,i=n-V._calculatePadding(e,"padding-left",n)-V._calculatePadding(e,"padding-right",n),a=V.getConstraintWidth(t);return isNaN(a)?i:Math.min(i,a)},V.getMaximumHeight=function(t){var e=V._getParentNode(t);if(!e)return t.clientHeight;var n=e.clientHeight,i=n-V._calculatePadding(e,"padding-top",n)-V._calculatePadding(e,"padding-bottom",n),a=V.getConstraintHeight(t);return isNaN(a)?i:Math.min(i,a)},V.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},V.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var i=t.canvas,a=t.height,r=t.width;i.height=a*n,i.width=r*n,t.ctx.scale(n,n),i.style.height||i.style.width||(i.style.height=a+"px",i.style.width=r+"px")}},V.fontString=function(t,e,n){return e+" "+t+"px "+n},V.longestText=function(t,e,n,i){var a=(i=i||{}).data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(a=i.data={},r=i.garbageCollect=[],i.font=e),t.font=e;var o,s,l,u,d,h=0,c=n.length;for(o=0;o<c;o++)if(null!=(u=n[o])&&!0!==V.isArray(u))h=V.measureText(t,a,r,h,u);else if(V.isArray(u))for(s=0,l=u.length;s<l;s++)null==(d=u[s])||V.isArray(d)||(h=V.measureText(t,a,r,h,d));var f=r.length/2;if(f>n.length){for(o=0;o<f;o++)delete a[r[o]];r.splice(0,f)}return h},V.measureText=function(t,e,n,i,a){var r=e[a];return r||(r=e[a]=t.measureText(a).width,n.push(a)),r>i&&(i=r),i},V.numberOfLabelLines=function(t){var e=1;return V.each(t,(function(t){V.isArray(t)&&t.length>e&&(e=t.length)})),e},V.color=x?function(t){return t instanceof CanvasGradient&&(t=N.global.defaultColor),x(t)}:function(t){return console.error("Color.js not found!"),t},V.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:V.color(t).saturate(.5).darken(.1).rgbString()}}(),Ve._adapters=je,Ve.Animation=Z,Ve.animationService=$,Ve.controllers=Ut,Ve.DatasetController=tt,Ve.defaults=N,Ve.Element=G,Ve.elements=vt,Ve.Interaction=Kt,Ve.layouts=le,Ve.platform=_e,Ve.plugins=we,Ve.Scale=rn,Ve.scaleService=ke,Ve.Ticks=Ue,Ve.Tooltip=Fe,Ve.helpers.each(Gn,(function(t,e){Ve.scaleService.registerScaleType(e,t,t._defaults)})),gi)gi.hasOwnProperty(bi)&&Ve.plugins.register(gi[bi]);Ve.platform.initialize();var yi=Ve;return"undefined"!=typeof window&&(window.Chart=Ve),Ve.Chart=Ve,Ve.Legend=gi.legend._element,Ve.Title=gi.title._element,Ve.pluginService=Ve.plugins,Ve.PluginBase=Ve.Element.extend({}),Ve.canvasHelpers=Ve.helpers.canvas,Ve.layoutService=Ve.layouts,Ve.LinearScaleBase=un,Ve.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],(function(t){Ve[t]=function(e,n){return new Ve(e,Ve.helpers.merge(n||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}})),yi}));
\ No newline at end of file
+++ /dev/null
-@charset "UTF-8";.toast-center-center{top:50%;left:50%;transform:translate(-50%,-50%)}.toast-top-center{top:0;right:0;width:100%}.toast-bottom-center{bottom:0;right:0;width:100%}.toast-top-full-width{top:0;right:0;width:100%}.toast-bottom-full-width{bottom:0;right:0;width:100%}.toast-top-left{top:12px;left:12px}.toast-top-right{top:12px;right:12px}.toast-bottom-right{right:12px;bottom:12px}.toast-bottom-left{bottom:12px;left:12px}.toast-title{font-weight:700}.toast-message{word-wrap:break-word}.toast-message a,.toast-message label{color:#fff}.toast-message a:hover{color:#ccc;text-decoration:none}.toast-close-button{position:relative;right:-.3em;top:-.3em;float:right;font-size:20px;font-weight:700;color:#fff;text-shadow:0 1px 0 #fff}.toast-close-button:focus,.toast-close-button:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.4}button.toast-close-button{padding:0;cursor:pointer;background:transparent;border:0}.toast-container{pointer-events:none;position:fixed;z-index:999999}.toast-container *{box-sizing:border-box}.toast-container .ngx-toastr{position:relative;overflow:hidden;margin:0 0 6px;padding:15px 15px 15px 50px;width:300px;border-radius:3px 3px 3px 3px;background-position:15px;background-repeat:no-repeat;background-size:24px;box-shadow:0 0 12px #999;color:#fff}.toast-container .ngx-toastr:hover{box-shadow:0 0 12px #000;opacity:1;cursor:pointer}.toast-info{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' width='512' height='512'%3E%3Cpath fill='rgb(255,255,255)' d='M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z'/%3E%3C/svg%3E")}.toast-error{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' width='512' height='512'%3E%3Cpath fill='rgb(255,255,255)' d='M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z'/%3E%3C/svg%3E")}.toast-success{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' width='512' height='512'%3E%3Cpath fill='rgb(255,255,255)' d='M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z'/%3E%3C/svg%3E")}.toast-warning{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512' width='576' height='512'%3E%3Cpath fill='rgb(255,255,255)' d='M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z'/%3E%3C/svg%3E")}.toast-container.toast-bottom-center .ngx-toastr,.toast-container.toast-top-center .ngx-toastr{width:300px;margin-left:auto;margin-right:auto}.toast-container.toast-bottom-full-width .ngx-toastr,.toast-container.toast-top-full-width .ngx-toastr{width:96%;margin-left:auto;margin-right:auto}.ngx-toastr{background-color:#030303;pointer-events:auto}.toast-success{background-color:#51a351}.toast-error{background-color:#bd362f}.toast-info{background-color:#2f96b4}.toast-warning{background-color:#f89406}.toast-progress{position:absolute;left:0;bottom:0;height:4px;background-color:#000;opacity:.4}@media (max-width:240px){.toast-container .ngx-toastr.div{padding:8px 8px 8px 50px;width:11em}.toast-container .toast-close-button{right:-.2em;top:-.2em}}@media (min-width:241px) and (max-width:480px){.toast-container .ngx-toastr.div{padding:8px 8px 8px 50px;width:18em}.toast-container .toast-close-button{right:-.2em;top:-.2em}}@media (min-width:481px) and (max-width:768px){.toast-container .ngx-toastr.div{padding:15px 15px 15px 50px;width:25em}}.tree-children.tree-children-no-padding{padding-left:0}.tree-children{overflow:hidden}.node-drop-slot{display:block;height:2px}.node-drop-slot.is-dragging-over{background:#dfe;height:20px;border:2px dotted #888}.toggle-children-wrapper-expanded .toggle-children{transform:rotate(90deg)}.toggle-children-wrapper-collapsed .toggle-children{transform:rotate(0)}.toggle-children-wrapper{padding:2px 3px 5px 1px}.toggle-children{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAASCAYAAABSO15qAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABAhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ1dWlkOjY1RTYzOTA2ODZDRjExREJBNkUyRDg4N0NFQUNCNDA3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkYzRkRFQjcxODUzNTExRTU4RTQwRkQwODFEOUZEMEE3IiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkYzRkRFQjcwODUzNTExRTU4RTQwRkQwODFEOUZEMEE3IiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE1IChNYWNpbnRvc2gpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MTk5NzA1OGEtZDI3OC00NDZkLWE4ODgtNGM4MGQ4YWI1NzNmIiBzdFJlZjpkb2N1bWVudElEPSJhZG9iZTpkb2NpZDpwaG90b3Nob3A6YzRkZmQxMGMtY2NlNS0xMTc4LWE5OGQtY2NkZmM5ODk5YWYwIi8+IDxkYzp0aXRsZT4gPHJkZjpBbHQ+IDxyZGY6bGkgeG1sOmxhbmc9IngtZGVmYXVsdCI+Z2x5cGhpY29uczwvcmRmOmxpPiA8L3JkZjpBbHQ+IDwvZGM6dGl0bGU+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+5iogFwAAAGhJREFUeNpiYGBgKABigf///zOQg0EARH4A4gZyDIIZ8B/JoAJKDIDhB0CcQIkBRBtEyABkgxwoMQCGD6AbRKoBGAYxQgXIBRuZGKgAKPIC3QLxArnRSHZCIjspk52ZKMrOFBUoAAEGAKnq593MQAZtAAAAAElFTkSuQmCC");height:8px;width:9px;background-size:contain;background-repeat:no-repeat;background-position:50%}.toggle-children,.toggle-children-placeholder{display:inline-block;position:relative;top:1px}.toggle-children-placeholder{height:10px;width:10px;padding-right:3px}.node-content-wrapper{display:inline-block;padding:2px 5px;border-radius:2px;transition:background-color .15s,box-shadow .15s}.node-wrapper{display:flex;align-items:flex-start}.node-content-wrapper-active,.node-content-wrapper-active.node-content-wrapper-focused,.node-content-wrapper.node-content-wrapper-active:hover{background:#beebff}.node-content-wrapper-focused{background:#e7f4f9}.node-content-wrapper:hover{background:#f7fbff}.node-content-wrapper-active,.node-content-wrapper-focused,.node-content-wrapper:hover{box-shadow:inset 0 0 1px #999}.node-content-wrapper.is-dragging-over{background:#dfe;box-shadow:inset 0 0 1px #999}.node-content-wrapper.is-dragging-over-disabled{opacity:.5}tree-viewport{-webkit-tap-highlight-color:transparent;height:100%;overflow:auto;display:block}.tree-children{padding-left:20px}.empty-tree-drop-slot .node-drop-slot{height:20px;min-width:100px}.angular-tree-component{width:100%;position:relative;display:inline-block;cursor:pointer;-webkit-touch-callout:none;user-select:none}tree-root .angular-tree-component-rtl{direction:rtl}tree-root .angular-tree-component-rtl .toggle-children-wrapper-collapsed .toggle-children{transform:rotate(180deg)!important}tree-root .angular-tree-component-rtl .tree-children{padding-right:20px;padding-left:0}tree-node-checkbox{padding:1px}
-/*!
- * Bootstrap v4.5.2 (https://getbootstrap.com/)
- * Copyright 2011-2020 The Bootstrap Authors
- * Copyright 2011-2020 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
- */:root{--blue:#007bff;--indigo:#6610f2;--purple:#6f42c1;--pink:#a94442;--red:#ef5c55;--orange:#fd7e14;--yellow:#ffc200;--green:#0b0;--teal:#20c997;--cyan:#17a2b8;--white:#fff;--gray:#6c757d;--gray-dark:#343a40;--primary:#2b99a8;--secondary:#374249;--success:#0b0;--info:#2b99a8;--warning:#ffc200;--danger:#ef5c55;--light:#f8f9fa;--dark:#777;--accent:#ef5c55;--warning-dark:#fd7e14;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--breakpoint-2xl:1450px;--font-family-sans-serif:"Helvetica Neue",Helvetica,Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}*,:after,:before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:Helvetica Neue,Helvetica,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:initial;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;text-decoration:underline dotted;cursor:help;border-bottom:0;text-decoration-skip-ink:none}address{font-style:normal;line-height:inherit}address,dl,ol,ul{margin-bottom:1rem}dl,ol,ul{margin-top:0}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}a{color:#2b99a8;text-decoration:none;background-color:initial}a:hover{color:#1b626b;text-decoration:underline}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{border-style:none}img,svg{vertical-align:middle}svg{overflow:hidden}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:initial}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:2.5rem}.h2,h2{font-size:2rem}.h3,h3{font-size:1.75rem}.h4,h4{font-size:1.5rem}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:6rem}.display-1,.display-2{font-weight:300;line-height:1.2}.display-2{font-size:5.5rem}.display-3{font-size:4.5rem}.display-3,.display-4{font-weight:300;line-height:1.2}.display-4{font-size:3.5rem}hr{margin-top:1rem;margin-bottom:1rem;border:0;border-top:1px solid rgba(0,0,0,.1)}.small,small{font-size:80%;font-weight:400}.mark,mark{padding:.2em;background-color:#fcf8e3}.list-inline,.list-unstyled{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:90%;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote-footer{display:block;font-size:80%;color:#6c757d}.blockquote-footer:before{content:"— "}.img-fluid,.img-thumbnail{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:#fff;border:1px solid #dee2e6;border-radius:.25rem}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:90%;color:#6c757d}code{font-size:87.5%;color:#a94442;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:87.5%;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:100%;font-weight:700}pre{display:block;font-size:87.5%;color:#212529}pre code{font-size:inherit;color:inherit;word-break:normal}.pre-scrollable{max-height:340px;overflow-y:scroll}.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:576px){.container,.container-sm{max-width:540px}}@media (min-width:768px){.container,.container-md,.container-sm{max-width:720px}}@media (min-width:992px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media (min-width:1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1140px}}.row,cd-about dl{display:flex;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}.no-gutters{margin-right:0;margin-left:0}.no-gutters>.col,.no-gutters>[class*=col-]{padding-right:0;padding-left:0}.cd-col-form,.cd-col-form-input,.cd-col-form-label,.cd-col-form-offset,.col,.col-1,.col-2,.col-2xl,.col-2xl-1,.col-2xl-2,.col-2xl-3,.col-2xl-4,.col-2xl-5,.col-2xl-6,.col-2xl-7,.col-2xl-8,.col-2xl-9,.col-2xl-10,.col-2xl-11,.col-2xl-12,.col-2xl-auto,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-10,.col-11,.col-12,.col-auto,.col-lg,.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-auto,.col-md,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-md-auto,.col-sm,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-auto,.col-xl,.col-xl-1,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-auto,cd-about dd,cd-about dt,cd-health cd-info-card,cd-health cd-info-card.cd-capacity-card,cd-health cd-info-card.cd-chart-card,cd-health cd-info-card.cd-performance-card,cd-health cd-info-card.cd-status-card,cd-modal .cd-col-form-input,cd-modal .cd-col-form-label,cd-modal .cd-col-form-offset{position:relative;width:100%;padding-right:15px;padding-left:15px}.col{flex-basis:0;flex-grow:1;max-width:100%}.row-cols-1>*{flex:0 0 100%;max-width:100%}.row-cols-2>*{flex:0 0 50%;max-width:50%}.row-cols-3>*{flex:0 0 33.3333333333%;max-width:33.3333333333%}.row-cols-4>*{flex:0 0 25%;max-width:25%}.row-cols-5>*{flex:0 0 20%;max-width:20%}.row-cols-6>*{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-auto{flex:0 0 auto;width:auto;max-width:100%}.col-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-3{flex:0 0 25%;max-width:25%}.col-4,cd-about dt{flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.col-6{flex:0 0 50%;max-width:50%}.col-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.col-8,cd-about dd{flex:0 0 66.6666666667%;max-width:66.6666666667%}.col-9{flex:0 0 75%;max-width:75%}.col-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.cd-col-form,.col-12,cd-health cd-info-card{flex:0 0 100%;max-width:100%}.order-first{order:-1}.order-last{order:13}.order-0{order:0}.order-1{order:1}.order-2{order:2}.order-3{order:3}.order-4{order:4}.order-5{order:5}.order-6{order:6}.order-7{order:7}.order-8{order:8}.order-9{order:9}.order-10{order:10}.order-11{order:11}.order-12{order:12}.offset-1{margin-left:8.3333333333%}.offset-2{margin-left:16.6666666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.3333333333%}.offset-5{margin-left:41.6666666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.3333333333%}.offset-8{margin-left:66.6666666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.3333333333%}.offset-11{margin-left:91.6666666667%}@media (min-width:576px){.col-sm{flex-basis:0;flex-grow:1;max-width:100%}.row-cols-sm-1>*{flex:0 0 100%;max-width:100%}.row-cols-sm-2>*{flex:0 0 50%;max-width:50%}.row-cols-sm-3>*{flex:0 0 33.3333333333%;max-width:33.3333333333%}.row-cols-sm-4>*{flex:0 0 25%;max-width:25%}.row-cols-sm-5>*{flex:0 0 20%;max-width:20%}.row-cols-sm-6>*{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-sm-auto{flex:0 0 auto;width:auto;max-width:100%}.col-sm-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-sm-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-sm-3{flex:0 0 25%;max-width:25%}.cd-col-form-label,.col-sm-4{flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-sm-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.col-sm-6{flex:0 0 50%;max-width:50%}.col-sm-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.cd-col-form-input,.cd-col-form-offset,.col-sm-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.col-sm-9{flex:0 0 75%;max-width:75%}.col-sm-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-sm-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.col-sm-12,cd-health cd-info-card{flex:0 0 100%;max-width:100%}.order-sm-first{order:-1}.order-sm-last{order:13}.order-sm-0{order:0}.order-sm-1{order:1}.order-sm-2{order:2}.order-sm-3{order:3}.order-sm-4{order:4}.order-sm-5{order:5}.order-sm-6{order:6}.order-sm-7{order:7}.order-sm-8{order:8}.order-sm-9{order:9}.order-sm-10{order:10}.order-sm-11{order:11}.order-sm-12{order:12}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.3333333333%}.offset-sm-2{margin-left:16.6666666667%}.offset-sm-3{margin-left:25%}.cd-col-form-offset,.offset-sm-4{margin-left:33.3333333333%}.offset-sm-5{margin-left:41.6666666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.3333333333%}.offset-sm-8{margin-left:66.6666666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.3333333333%}.offset-sm-11{margin-left:91.6666666667%}}@media (min-width:768px){.col-md{flex-basis:0;flex-grow:1;max-width:100%}.row-cols-md-1>*{flex:0 0 100%;max-width:100%}.row-cols-md-2>*{flex:0 0 50%;max-width:50%}.row-cols-md-3>*{flex:0 0 33.3333333333%;max-width:33.3333333333%}.row-cols-md-4>*{flex:0 0 25%;max-width:25%}.row-cols-md-5>*{flex:0 0 20%;max-width:20%}.row-cols-md-6>*{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-md-auto{flex:0 0 auto;width:auto;max-width:100%}.col-md-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-md-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-md-3{flex:0 0 25%;max-width:25%}.cd-col-form-label,.col-md-4{flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-md-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.col-md-6,cd-health cd-info-card{flex:0 0 50%;max-width:50%}.col-md-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.cd-col-form-input,.cd-col-form-offset,.col-md-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.col-md-9{flex:0 0 75%;max-width:75%}.col-md-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-md-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.col-md-12,cd-health cd-info-card.cd-chart-card{flex:0 0 100%;max-width:100%}.order-md-first{order:-1}.order-md-last{order:13}.order-md-0{order:0}.order-md-1{order:1}.order-md-2{order:2}.order-md-3{order:3}.order-md-4{order:4}.order-md-5{order:5}.order-md-6{order:6}.order-md-7{order:7}.order-md-8{order:8}.order-md-9{order:9}.order-md-10{order:10}.order-md-11{order:11}.order-md-12{order:12}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.3333333333%}.offset-md-2{margin-left:16.6666666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.3333333333%}.offset-md-5{margin-left:41.6666666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.3333333333%}.offset-md-8{margin-left:66.6666666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.3333333333%}.offset-md-11{margin-left:91.6666666667%}}@media (min-width:992px){.col-lg{flex-basis:0;flex-grow:1;max-width:100%}.row-cols-lg-1>*{flex:0 0 100%;max-width:100%}.row-cols-lg-2>*{flex:0 0 50%;max-width:50%}.row-cols-lg-3>*{flex:0 0 33.3333333333%;max-width:33.3333333333%}.row-cols-lg-4>*{flex:0 0 25%;max-width:25%}.row-cols-lg-5>*{flex:0 0 20%;max-width:20%}.row-cols-lg-6>*{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-lg-auto{flex:0 0 auto;width:auto;max-width:100%}.col-lg-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-lg-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.cd-col-form-label,.col-lg-3,cd-health cd-info-card.cd-capacity-card{flex:0 0 25%;max-width:25%}.col-lg-4,cd-health cd-info-card,cd-modal .cd-col-form-label{flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-lg-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.col-lg-6,cd-health cd-info-card.cd-chart-card,cd-health cd-info-card.cd-performance-card{flex:0 0 50%;max-width:50%}.col-lg-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.cd-col-form,.col-lg-8,cd-modal .cd-col-form-input,cd-modal .cd-col-form-offset{flex:0 0 66.6666666667%;max-width:66.6666666667%}.cd-col-form-input,.cd-col-form-offset,.col-lg-9{flex:0 0 75%;max-width:75%}.col-lg-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-lg-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.col-lg-12{flex:0 0 100%;max-width:100%}.order-lg-first{order:-1}.order-lg-last{order:13}.order-lg-0{order:0}.order-lg-1{order:1}.order-lg-2{order:2}.order-lg-3{order:3}.order-lg-4{order:4}.order-lg-5{order:5}.order-lg-6{order:6}.order-lg-7{order:7}.order-lg-8{order:8}.order-lg-9{order:9}.order-lg-10{order:10}.order-lg-11{order:11}.order-lg-12{order:12}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.3333333333%}.offset-lg-2{margin-left:16.6666666667%}.cd-col-form-offset,.offset-lg-3{margin-left:25%}.offset-lg-4,cd-modal .cd-col-form-offset{margin-left:33.3333333333%}.offset-lg-5{margin-left:41.6666666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.3333333333%}.offset-lg-8{margin-left:66.6666666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.3333333333%}.offset-lg-11{margin-left:91.6666666667%}}@media (min-width:1200px){.col-xl,cd-health cd-info-card.cd-capacity-card,cd-health cd-info-card.cd-performance-card{flex-basis:0;flex-grow:1;max-width:100%}.row-cols-xl-1>*{flex:0 0 100%;max-width:100%}.row-cols-xl-2>*{flex:0 0 50%;max-width:50%}.row-cols-xl-3>*{flex:0 0 33.3333333333%;max-width:33.3333333333%}.row-cols-xl-4>*{flex:0 0 25%;max-width:25%}.row-cols-xl-5>*{flex:0 0 20%;max-width:20%}.row-cols-xl-6>*{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-xl-auto{flex:0 0 auto;width:auto;max-width:100%}.col-xl-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-xl-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-xl-3,cd-health cd-info-card.cd-status-card{flex:0 0 25%;max-width:25%}.col-xl-4,cd-health cd-info-card.cd-chart-card{flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-xl-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.cd-col-form,.col-xl-6{flex:0 0 50%;max-width:50%}.col-xl-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.col-xl-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.col-xl-9{flex:0 0 75%;max-width:75%}.col-xl-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-xl-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.col-xl-12{flex:0 0 100%;max-width:100%}.order-xl-first{order:-1}.order-xl-last{order:13}.order-xl-0{order:0}.order-xl-1{order:1}.order-xl-2{order:2}.order-xl-3{order:3}.order-xl-4{order:4}.order-xl-5{order:5}.order-xl-6{order:6}.order-xl-7{order:7}.order-xl-8{order:8}.order-xl-9{order:9}.order-xl-10{order:10}.order-xl-11{order:11}.order-xl-12{order:12}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.3333333333%}.offset-xl-2{margin-left:16.6666666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.3333333333%}.offset-xl-5{margin-left:41.6666666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.3333333333%}.offset-xl-8{margin-left:66.6666666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.3333333333%}.offset-xl-11{margin-left:91.6666666667%}}@media (min-width:1450px){.col-2xl{flex-basis:0;flex-grow:1;max-width:100%}.row-cols-2xl-1>*{flex:0 0 100%;max-width:100%}.row-cols-2xl-2>*{flex:0 0 50%;max-width:50%}.row-cols-2xl-3>*{flex:0 0 33.3333333333%;max-width:33.3333333333%}.row-cols-2xl-4>*{flex:0 0 25%;max-width:25%}.row-cols-2xl-5>*{flex:0 0 20%;max-width:20%}.row-cols-2xl-6>*{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-2xl-auto{flex:0 0 auto;width:auto;max-width:100%}.col-2xl-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-2xl-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-2xl-3,cd-health cd-info-card.cd-chart-card{flex:0 0 25%;max-width:25%}.col-2xl-4{flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-2xl-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.col-2xl-6{flex:0 0 50%;max-width:50%}.col-2xl-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.col-2xl-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.col-2xl-9{flex:0 0 75%;max-width:75%}.col-2xl-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-2xl-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.col-2xl-12{flex:0 0 100%;max-width:100%}.order-2xl-first{order:-1}.order-2xl-last{order:13}.order-2xl-0{order:0}.order-2xl-1{order:1}.order-2xl-2{order:2}.order-2xl-3{order:3}.order-2xl-4{order:4}.order-2xl-5{order:5}.order-2xl-6{order:6}.order-2xl-7{order:7}.order-2xl-8{order:8}.order-2xl-9{order:9}.order-2xl-10{order:10}.order-2xl-11{order:11}.order-2xl-12{order:12}.offset-2xl-0{margin-left:0}.offset-2xl-1{margin-left:8.3333333333%}.offset-2xl-2{margin-left:16.6666666667%}.offset-2xl-3{margin-left:25%}.offset-2xl-4{margin-left:33.3333333333%}.offset-2xl-5{margin-left:41.6666666667%}.offset-2xl-6{margin-left:50%}.offset-2xl-7{margin-left:58.3333333333%}.offset-2xl-8{margin-left:66.6666666667%}.offset-2xl-9{margin-left:75%}.offset-2xl-10{margin-left:83.3333333333%}.offset-2xl-11{margin-left:91.6666666667%}}.table{width:100%;margin-bottom:1rem;color:#212529}.table td,.table th{padding:.75rem;vertical-align:top;border-top:1px solid #dee2e6}.table thead th{vertical-align:bottom;border-bottom:2px solid #dee2e6}.table tbody+tbody{border-top:2px solid #dee2e6}.table-sm td,.table-sm th{padding:.3rem}.table-bordered,.table-bordered td,.table-bordered th{border:1px solid #dee2e6}.table-bordered thead td,.table-bordered thead th{border-bottom-width:2px}.table-borderless tbody+tbody,.table-borderless td,.table-borderless th,.table-borderless thead th{border:0}.table-striped tbody tr:nth-of-type(odd){background-color:rgba(0,0,0,.05)}.table-hover tbody tr:hover{color:#212529;background-color:rgba(0,0,0,.075)}.table-primary,.table-primary>td,.table-primary>th{background-color:#c4e2e7}.table-primary tbody+tbody,.table-primary td,.table-primary th,.table-primary thead th{border-color:#91cad2}.table-hover .table-primary:hover,.table-hover .table-primary:hover>td,.table-hover .table-primary:hover>th{background-color:#b2d9e0}.table-secondary,.table-secondary>td,.table-secondary>th{background-color:#c7cacc}.table-secondary tbody+tbody,.table-secondary td,.table-secondary th,.table-secondary thead th{border-color:#979da0}.table-hover .table-secondary:hover,.table-hover .table-secondary:hover>td,.table-hover .table-secondary:hover>th{background-color:#babdc0}.table-success,.table-success>td,.table-success>th{background-color:#b8ecb8}.table-success tbody+tbody,.table-success td,.table-success th,.table-success thead th{border-color:#7adc7a}.table-hover .table-success:hover,.table-hover .table-success:hover>td,.table-hover .table-success:hover>th{background-color:#a4e7a4}.table-info,.table-info>td,.table-info>th{background-color:#c4e2e7}.table-info tbody+tbody,.table-info td,.table-info th,.table-info thead th{border-color:#91cad2}.table-hover .table-info:hover,.table-hover .table-info:hover>td,.table-hover .table-info:hover>th{background-color:#b2d9e0}.table-warning,.table-warning>td,.table-warning>th{background-color:#ffeeb8}.table-warning tbody+tbody,.table-warning td,.table-warning th,.table-warning thead th{border-color:#ffdf7a}.table-hover .table-warning:hover,.table-hover .table-warning:hover>td,.table-hover .table-warning:hover>th{background-color:#ffe89f}.table-danger,.table-danger>td,.table-danger>th{background-color:#fbd1cf}.table-danger tbody+tbody,.table-danger td,.table-danger th,.table-danger thead th{border-color:#f7aaa7}.table-hover .table-danger:hover,.table-hover .table-danger:hover>td,.table-hover .table-danger:hover>th{background-color:#f9bab7}.table-light,.table-light>td,.table-light>th{background-color:#fdfdfe}.table-light tbody+tbody,.table-light td,.table-light th,.table-light thead th{border-color:#fbfcfc}.table-hover .table-light:hover,.table-hover .table-light:hover>td,.table-hover .table-light:hover>th{background-color:#ececf6}.table-dark,.table-dark>td,.table-dark>th{background-color:#d9d9d9}.table-dark tbody+tbody,.table-dark td,.table-dark th,.table-dark thead th{border-color:#b8b8b8}.table-hover .table-dark:hover,.table-hover .table-dark:hover>td,.table-hover .table-dark:hover>th{background-color:#ccc}.table-accent,.table-accent>td,.table-accent>th{background-color:#fbd1cf}.table-accent tbody+tbody,.table-accent td,.table-accent th,.table-accent thead th{border-color:#f7aaa7}.table-hover .table-accent:hover,.table-hover .table-accent:hover>td,.table-hover .table-accent:hover>th{background-color:#f9bab7}.table-warning-dark,.table-warning-dark>td,.table-warning-dark>th{background-color:#fedbbd}.table-warning-dark tbody+tbody,.table-warning-dark td,.table-warning-dark th,.table-warning-dark thead th{border-color:#febc85}.table-hover .table-warning-dark:hover,.table-hover .table-warning-dark:hover>td,.table-hover .table-warning-dark:hover>th{background-color:#fecda4}.table-active,.table-active>td,.table-active>th,.table-hover .table-active:hover,.table-hover .table-active:hover>td,.table-hover .table-active:hover>th{background-color:rgba(0,0,0,.075)}.table .thead-dark th{color:#fff;background-color:#343a40;border-color:#454d55}.table .thead-light th{color:#495057;background-color:#e9ecef;border-color:#dee2e6}.table-dark{color:#fff;background-color:#343a40}.table-dark td,.table-dark th,.table-dark thead th{border-color:#454d55}.table-dark.table-bordered{border:0}.table-dark.table-striped tbody tr:nth-of-type(odd){background-color:hsla(0,0%,100%,.05)}.table-dark.table-hover tbody tr:hover{color:#fff;background-color:hsla(0,0%,100%,.075)}@media (max-width:575.98px){.table-responsive-sm{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-sm>.table-bordered{border:0}}@media (max-width:767.98px){.table-responsive-md{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-md>.table-bordered{border:0}}@media (max-width:991.98px){.table-responsive-lg{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-lg>.table-bordered{border:0}}@media (max-width:1199.98px){.table-responsive-xl{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-xl>.table-bordered{border:0}}@media (max-width:1449.98px){.table-responsive-2xl{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-2xl>.table-bordered{border:0}}.table-responsive{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive>.table-bordered{border:0}.cd-form-control,.form-control{display:block;width:100%;height:calc(1.5em + .75rem + 2px);padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;border-radius:.25rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.cd-form-control,.form-control{transition:none}}.cd-form-control::-ms-expand,.form-control::-ms-expand{background-color:initial;border:0}.cd-form-control:-moz-focusring,.form-control:-moz-focusring{color:transparent;text-shadow:0 0 0 #495057}.cd-form-control:focus,.form-control:focus{color:#495057;background-color:#fff;border-color:#76d0dc;box-shadow:0 0 0 .2rem rgba(43,153,168,.25)}.cd-form-control::placeholder,.form-control::placeholder{color:#6c757d;opacity:1}.cd-form-control:disabled,.form-control:disabled,.form-control[readonly],[readonly].cd-form-control{background-color:#e9ecef;opacity:1}input[type=date].cd-form-control,input[type=date].form-control,input[type=datetime-local].cd-form-control,input[type=datetime-local].form-control,input[type=month].cd-form-control,input[type=month].form-control,input[type=time].cd-form-control,input[type=time].form-control{-moz-appearance:none;appearance:none}select.cd-form-control:focus::-ms-value,select.form-control:focus::-ms-value{color:#495057;background-color:#fff}.form-control-file,.form-control-range{display:block;width:100%}.cd-col-form-label,.col-form-label{padding-top:calc(.375rem + 1px);padding-bottom:calc(.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(.5rem + 1px);padding-bottom:calc(.5rem + 1px);font-size:1.25rem;line-height:1.5}.col-form-label-sm{padding-top:calc(.25rem + 1px);padding-bottom:calc(.25rem + 1px);font-size:.875rem;line-height:1.5}.form-control-plaintext{display:block;width:100%;padding:.375rem 0;margin-bottom:0;font-size:1rem;line-height:1.5;color:#212529;background-color:initial;border:solid transparent;border-width:1px 0}.form-control-plaintext.form-control-lg,.form-control-plaintext.form-control-sm{padding-right:0;padding-left:0}.form-control-sm{height:calc(1.5em + .5rem + 2px);padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.form-control-lg{height:calc(1.5em + 1rem + 2px);padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}select.form-control[multiple],select.form-control[size],select[multiple].cd-form-control,select[size].cd-form-control,textarea.cd-form-control,textarea.form-control{height:auto}.form-group{margin-bottom:1rem}.form-text{display:block;margin-top:.25rem}.form-row{display:flex;flex-wrap:wrap;margin-right:-5px;margin-left:-5px}.form-row>.col,.form-row>[class*=col-]{padding-right:5px;padding-left:5px}.form-check{position:relative;display:block;padding-left:1.25rem}.form-check-input{position:absolute;margin-top:.3rem;margin-left:-1.25rem}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{color:#6c757d}.form-check-label{margin-bottom:0}.form-check-inline{display:inline-flex;align-items:center;padding-left:0;margin-right:.75rem}.form-check-inline .form-check-input{position:static;margin-top:0;margin-right:.3125rem;margin-left:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:100%;color:#0b0}.valid-tooltip{position:absolute;top:100%;left:0;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(0,187,0,.9);border-radius:.25rem}.is-valid~.valid-feedback,.is-valid~.valid-tooltip,.was-validated :valid~.valid-feedback,.was-validated :valid~.valid-tooltip{display:block}.form-control.is-valid,.is-valid.cd-form-control,.was-validated .cd-form-control:valid,.was-validated .form-control:valid{border-color:#0b0;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%230b0' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-valid:focus,.is-valid.cd-form-control:focus,.was-validated .cd-form-control:valid:focus,.was-validated .form-control:valid:focus{border-color:#0b0;box-shadow:0 0 0 .2rem rgba(0,187,0,.25)}.was-validated textarea.cd-form-control:valid,.was-validated textarea.form-control:valid,textarea.form-control.is-valid,textarea.is-valid.cd-form-control{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.custom-select.is-valid,.was-validated .custom-select:valid{border-color:#0b0;padding-right:calc(.75em + 2.3125rem);background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px,url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%230b0' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") #fff no-repeat center right 1.75rem/calc(.75em + .375rem) calc(.75em + .375rem)}.custom-select.is-valid:focus,.was-validated .custom-select:valid:focus{border-color:#0b0;box-shadow:0 0 0 .2rem rgba(0,187,0,.25)}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:#0b0}.form-check-input.is-valid~.valid-feedback,.form-check-input.is-valid~.valid-tooltip,.was-validated .form-check-input:valid~.valid-feedback,.was-validated .form-check-input:valid~.valid-tooltip{display:block}.custom-control-input.is-valid~.custom-control-label,.was-validated .custom-control-input:valid~.custom-control-label{color:#0b0}.custom-control-input.is-valid~.custom-control-label:before,.was-validated .custom-control-input:valid~.custom-control-label:before{border-color:#0b0}.custom-control-input.is-valid:checked~.custom-control-label:before,.was-validated .custom-control-input:valid:checked~.custom-control-label:before{border-color:#0e0;background-color:#0e0}.custom-control-input.is-valid:focus~.custom-control-label:before,.was-validated .custom-control-input:valid:focus~.custom-control-label:before{box-shadow:0 0 0 .2rem rgba(0,187,0,.25)}.custom-control-input.is-valid:focus:not(:checked)~.custom-control-label:before,.custom-file-input.is-valid~.custom-file-label,.was-validated .custom-control-input:valid:focus:not(:checked)~.custom-control-label:before,.was-validated .custom-file-input:valid~.custom-file-label{border-color:#0b0}.custom-file-input.is-valid:focus~.custom-file-label,.was-validated .custom-file-input:valid:focus~.custom-file-label{border-color:#0b0;box-shadow:0 0 0 .2rem rgba(0,187,0,.25)}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:100%;color:#ef5c55}.invalid-tooltip{position:absolute;top:100%;left:0;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(239,92,85,.9);border-radius:.25rem}.is-invalid~.invalid-feedback,.is-invalid~.invalid-tooltip,.was-validated :invalid~.invalid-feedback,.was-validated :invalid~.invalid-tooltip{display:block}.form-control.is-invalid,.is-invalid.cd-form-control,.was-validated .cd-form-control:invalid,.was-validated .form-control:invalid{border-color:#ef5c55;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23ef5c55' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23ef5c55' stroke='none'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-invalid:focus,.is-invalid.cd-form-control:focus,.was-validated .cd-form-control:invalid:focus,.was-validated .form-control:invalid:focus{border-color:#ef5c55;box-shadow:0 0 0 .2rem rgba(239,92,85,.25)}.was-validated textarea.cd-form-control:invalid,.was-validated textarea.form-control:invalid,textarea.form-control.is-invalid,textarea.is-invalid.cd-form-control{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.custom-select.is-invalid,.was-validated .custom-select:invalid{border-color:#ef5c55;padding-right:calc(.75em + 2.3125rem);background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px,url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23ef5c55' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23ef5c55' stroke='none'/%3e%3c/svg%3e") #fff no-repeat center right 1.75rem/calc(.75em + .375rem) calc(.75em + .375rem)}.custom-select.is-invalid:focus,.was-validated .custom-select:invalid:focus{border-color:#ef5c55;box-shadow:0 0 0 .2rem rgba(239,92,85,.25)}.form-check-input.is-invalid~.form-check-label,.was-validated .form-check-input:invalid~.form-check-label{color:#ef5c55}.form-check-input.is-invalid~.invalid-feedback,.form-check-input.is-invalid~.invalid-tooltip,.was-validated .form-check-input:invalid~.invalid-feedback,.was-validated .form-check-input:invalid~.invalid-tooltip{display:block}.custom-control-input.is-invalid~.custom-control-label,.was-validated .custom-control-input:invalid~.custom-control-label{color:#ef5c55}.custom-control-input.is-invalid~.custom-control-label:before,.was-validated .custom-control-input:invalid~.custom-control-label:before{border-color:#ef5c55}.custom-control-input.is-invalid:checked~.custom-control-label:before,.was-validated .custom-control-input:invalid:checked~.custom-control-label:before{border-color:#f38984;background-color:#f38984}.custom-control-input.is-invalid:focus~.custom-control-label:before,.was-validated .custom-control-input:invalid:focus~.custom-control-label:before{box-shadow:0 0 0 .2rem rgba(239,92,85,.25)}.custom-control-input.is-invalid:focus:not(:checked)~.custom-control-label:before,.custom-file-input.is-invalid~.custom-file-label,.was-validated .custom-control-input:invalid:focus:not(:checked)~.custom-control-label:before,.was-validated .custom-file-input:invalid~.custom-file-label{border-color:#ef5c55}.custom-file-input.is-invalid:focus~.custom-file-label,.was-validated .custom-file-input:invalid:focus~.custom-file-label{border-color:#ef5c55;box-shadow:0 0 0 .2rem rgba(239,92,85,.25)}.form-inline{display:flex;flex-flow:row wrap;align-items:center}.form-inline .form-check{width:100%}@media (min-width:576px){.form-inline label{justify-content:center}.form-inline .form-group,.form-inline label{display:flex;align-items:center;margin-bottom:0}.form-inline .form-group{flex:0 0 auto;flex-flow:row wrap}.form-inline .cd-form-control,.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-plaintext{display:inline-block}.form-inline .custom-select,.form-inline .input-group{width:auto}.form-inline .form-check{display:flex;align-items:center;justify-content:center;width:auto;padding-left:0}.form-inline .form-check-input{position:relative;flex-shrink:0;margin-top:0;margin-right:.25rem;margin-left:0}.form-inline .custom-control{align-items:center;justify-content:center}.form-inline .custom-control-label{margin-bottom:0}}.btn{display:inline-block;font-weight:400;color:#212529;text-align:center;vertical-align:middle;user-select:none;background-color:initial;border:1px solid transparent;padding:.375rem .75rem;font-size:1rem;line-height:1.5;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn:hover{color:#212529;text-decoration:none}.btn.focus,.btn:focus{outline:0;box-shadow:0 0 0 .2rem rgba(43,153,168,.25)}.btn.disabled,.btn:disabled{opacity:.65}.btn:not(:disabled):not(.disabled){cursor:pointer}a.btn.disabled,fieldset:disabled a.btn{pointer-events:none}.btn-primary{color:#fff;background-color:#2b99a8;border-color:#2b99a8}.btn-primary.focus,.btn-primary:focus,.btn-primary:hover{color:#fff;background-color:#237d8a;border-color:#21747f}.btn-primary.focus,.btn-primary:focus{box-shadow:0 0 0 .2rem rgba(75,168,181,.5)}.btn-primary.disabled,.btn-primary:disabled{color:#fff;background-color:#2b99a8;border-color:#2b99a8}.btn-primary:not(:disabled):not(.disabled).active,.btn-primary:not(:disabled):not(.disabled):active,.show>.btn-primary.dropdown-toggle{color:#fff;background-color:#21747f;border-color:#1e6b75}.btn-primary:not(:disabled):not(.disabled).active:focus,.btn-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(75,168,181,.5)}.btn-secondary{color:#fff;background-color:#374249;border-color:#374249}.btn-secondary.focus,.btn-secondary:focus,.btn-secondary:hover{color:#fff;background-color:#272e33;border-color:#21282c}.btn-secondary.focus,.btn-secondary:focus{box-shadow:0 0 0 .2rem rgba(85,94,100,.5)}.btn-secondary.disabled,.btn-secondary:disabled{color:#fff;background-color:#374249;border-color:#374249}.btn-secondary:not(:disabled):not(.disabled).active,.btn-secondary:not(:disabled):not(.disabled):active,.show>.btn-secondary.dropdown-toggle{color:#fff;background-color:#21282c;border-color:#1c2125}.btn-secondary:not(:disabled):not(.disabled).active:focus,.btn-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(85,94,100,.5)}.btn-success{color:#fff;background-color:#0b0;border-color:#0b0}.btn-success.focus,.btn-success:focus,.btn-success:hover{color:#fff;background-color:#009500;border-color:#080}.btn-success.focus,.btn-success:focus{box-shadow:0 0 0 .2rem rgba(38,197,38,.5)}.btn-success.disabled,.btn-success:disabled{color:#fff;background-color:#0b0;border-color:#0b0}.btn-success:not(:disabled):not(.disabled).active,.btn-success:not(:disabled):not(.disabled):active,.show>.btn-success.dropdown-toggle{color:#fff;background-color:#080;border-color:#007b00}.btn-success:not(:disabled):not(.disabled).active:focus,.btn-success:not(:disabled):not(.disabled):active:focus,.show>.btn-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(38,197,38,.5)}.btn-info{color:#fff;background-color:#2b99a8;border-color:#2b99a8}.btn-info.focus,.btn-info:focus,.btn-info:hover{color:#fff;background-color:#237d8a;border-color:#21747f}.btn-info.focus,.btn-info:focus{box-shadow:0 0 0 .2rem rgba(75,168,181,.5)}.btn-info.disabled,.btn-info:disabled{color:#fff;background-color:#2b99a8;border-color:#2b99a8}.btn-info:not(:disabled):not(.disabled).active,.btn-info:not(:disabled):not(.disabled):active,.show>.btn-info.dropdown-toggle{color:#fff;background-color:#21747f;border-color:#1e6b75}.btn-info:not(:disabled):not(.disabled).active:focus,.btn-info:not(:disabled):not(.disabled):active:focus,.show>.btn-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(75,168,181,.5)}.btn-warning{color:#212529;background-color:#ffc200;border-color:#ffc200}.btn-warning.focus,.btn-warning:focus,.btn-warning:hover{color:#212529;background-color:#d9a500;border-color:#cc9b00}.btn-warning.focus,.btn-warning:focus{box-shadow:0 0 0 .2rem rgba(222,170,6,.5)}.btn-warning.disabled,.btn-warning:disabled{color:#212529;background-color:#ffc200;border-color:#ffc200}.btn-warning:not(:disabled):not(.disabled).active,.btn-warning:not(:disabled):not(.disabled):active,.show>.btn-warning.dropdown-toggle{color:#212529;background-color:#cc9b00;border-color:#bf9200}.btn-warning:not(:disabled):not(.disabled).active:focus,.btn-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(222,170,6,.5)}.btn-danger{color:#fff;background-color:#ef5c55;border-color:#ef5c55}.btn-danger.focus,.btn-danger:focus,.btn-danger:hover{color:#fff;background-color:#ec3a32;border-color:#eb2f26}.btn-danger.focus,.btn-danger:focus{box-shadow:0 0 0 .2rem rgba(241,116,111,.5)}.btn-danger.disabled,.btn-danger:disabled{color:#fff;background-color:#ef5c55;border-color:#ef5c55}.btn-danger:not(:disabled):not(.disabled).active,.btn-danger:not(:disabled):not(.disabled):active,.show>.btn-danger.dropdown-toggle{color:#fff;background-color:#eb2f26;border-color:#ea241b}.btn-danger:not(:disabled):not(.disabled).active:focus,.btn-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(241,116,111,.5)}.btn-light{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light.focus,.btn-light:focus,.btn-light:hover{color:#212529;background-color:#e2e6ea;border-color:#dae0e5}.btn-light.focus,.btn-light:focus{box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}.btn-light.disabled,.btn-light:disabled{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:not(:disabled):not(.disabled).active,.btn-light:not(:disabled):not(.disabled):active,.show>.btn-light.dropdown-toggle{color:#212529;background-color:#dae0e5;border-color:#d3d9df}.btn-light:not(:disabled):not(.disabled).active:focus,.btn-light:not(:disabled):not(.disabled):active:focus,.show>.btn-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}.btn-dark{color:#fff;background-color:#777;border-color:#777}.btn-dark.focus,.btn-dark:focus,.btn-dark:hover{color:#fff;background-color:#646464;border-color:#5e5e5e}.btn-dark.focus,.btn-dark:focus{box-shadow:0 0 0 .2rem hsla(0,0%,54.5%,.5)}.btn-dark.disabled,.btn-dark:disabled{color:#fff;background-color:#777;border-color:#777}.btn-dark:not(:disabled):not(.disabled).active,.btn-dark:not(:disabled):not(.disabled):active,.show>.btn-dark.dropdown-toggle{color:#fff;background-color:#5e5e5e;border-color:#575757}.btn-dark:not(:disabled):not(.disabled).active:focus,.btn-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem hsla(0,0%,54.5%,.5)}.btn-accent{color:#fff;background-color:#ef5c55;border-color:#ef5c55}.btn-accent.focus,.btn-accent:focus,.btn-accent:hover{color:#fff;background-color:#ec3a32;border-color:#eb2f26}.btn-accent.focus,.btn-accent:focus{box-shadow:0 0 0 .2rem rgba(241,116,111,.5)}.btn-accent.disabled,.btn-accent:disabled{color:#fff;background-color:#ef5c55;border-color:#ef5c55}.btn-accent:not(:disabled):not(.disabled).active,.btn-accent:not(:disabled):not(.disabled):active,.show>.btn-accent.dropdown-toggle{color:#fff;background-color:#eb2f26;border-color:#ea241b}.btn-accent:not(:disabled):not(.disabled).active:focus,.btn-accent:not(:disabled):not(.disabled):active:focus,.show>.btn-accent.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(241,116,111,.5)}.btn-warning-dark{color:#212529;background-color:#fd7e14;border-color:#fd7e14}.btn-warning-dark.focus,.btn-warning-dark:focus,.btn-warning-dark:hover{color:#fff;background-color:#e96b02;border-color:#dc6502}.btn-warning-dark.focus,.btn-warning-dark:focus{box-shadow:0 0 0 .2rem rgba(220,113,23,.5)}.btn-warning-dark.disabled,.btn-warning-dark:disabled{color:#212529;background-color:#fd7e14;border-color:#fd7e14}.btn-warning-dark:not(:disabled):not(.disabled).active,.btn-warning-dark:not(:disabled):not(.disabled):active,.show>.btn-warning-dark.dropdown-toggle{color:#fff;background-color:#dc6502;border-color:#cf5f02}.btn-warning-dark:not(:disabled):not(.disabled).active:focus,.btn-warning-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-warning-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(220,113,23,.5)}.btn-outline-primary{color:#2b99a8;border-color:#2b99a8}.btn-outline-primary:hover{color:#fff;background-color:#2b99a8;border-color:#2b99a8}.btn-outline-primary.focus,.btn-outline-primary:focus{box-shadow:0 0 0 .2rem rgba(43,153,168,.5)}.btn-outline-primary.disabled,.btn-outline-primary:disabled{color:#2b99a8;background-color:initial}.btn-outline-primary:not(:disabled):not(.disabled).active,.btn-outline-primary:not(:disabled):not(.disabled):active,.show>.btn-outline-primary.dropdown-toggle{color:#fff;background-color:#2b99a8;border-color:#2b99a8}.btn-outline-primary:not(:disabled):not(.disabled).active:focus,.btn-outline-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(43,153,168,.5)}.btn-outline-secondary{color:#374249;border-color:#374249}.btn-outline-secondary:hover{color:#fff;background-color:#374249;border-color:#374249}.btn-outline-secondary.focus,.btn-outline-secondary:focus{box-shadow:0 0 0 .2rem rgba(55,66,73,.5)}.btn-outline-secondary.disabled,.btn-outline-secondary:disabled{color:#374249;background-color:initial}.btn-outline-secondary:not(:disabled):not(.disabled).active,.btn-outline-secondary:not(:disabled):not(.disabled):active,.show>.btn-outline-secondary.dropdown-toggle{color:#fff;background-color:#374249;border-color:#374249}.btn-outline-secondary:not(:disabled):not(.disabled).active:focus,.btn-outline-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(55,66,73,.5)}.btn-outline-success{color:#0b0;border-color:#0b0}.btn-outline-success:hover{color:#fff;background-color:#0b0;border-color:#0b0}.btn-outline-success.focus,.btn-outline-success:focus{box-shadow:0 0 0 .2rem rgba(0,187,0,.5)}.btn-outline-success.disabled,.btn-outline-success:disabled{color:#0b0;background-color:initial}.btn-outline-success:not(:disabled):not(.disabled).active,.btn-outline-success:not(:disabled):not(.disabled):active,.show>.btn-outline-success.dropdown-toggle{color:#fff;background-color:#0b0;border-color:#0b0}.btn-outline-success:not(:disabled):not(.disabled).active:focus,.btn-outline-success:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(0,187,0,.5)}.btn-outline-info{color:#2b99a8;border-color:#2b99a8}.btn-outline-info:hover{color:#fff;background-color:#2b99a8;border-color:#2b99a8}.btn-outline-info.focus,.btn-outline-info:focus{box-shadow:0 0 0 .2rem rgba(43,153,168,.5)}.btn-outline-info.disabled,.btn-outline-info:disabled{color:#2b99a8;background-color:initial}.btn-outline-info:not(:disabled):not(.disabled).active,.btn-outline-info:not(:disabled):not(.disabled):active,.show>.btn-outline-info.dropdown-toggle{color:#fff;background-color:#2b99a8;border-color:#2b99a8}.btn-outline-info:not(:disabled):not(.disabled).active:focus,.btn-outline-info:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(43,153,168,.5)}.btn-outline-warning{color:#ffc200;border-color:#ffc200}.btn-outline-warning:hover{color:#212529;background-color:#ffc200;border-color:#ffc200}.btn-outline-warning.focus,.btn-outline-warning:focus{box-shadow:0 0 0 .2rem rgba(255,194,0,.5)}.btn-outline-warning.disabled,.btn-outline-warning:disabled{color:#ffc200;background-color:initial}.btn-outline-warning:not(:disabled):not(.disabled).active,.btn-outline-warning:not(:disabled):not(.disabled):active,.show>.btn-outline-warning.dropdown-toggle{color:#212529;background-color:#ffc200;border-color:#ffc200}.btn-outline-warning:not(:disabled):not(.disabled).active:focus,.btn-outline-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(255,194,0,.5)}.btn-outline-danger{color:#ef5c55;border-color:#ef5c55}.btn-outline-danger:hover{color:#fff;background-color:#ef5c55;border-color:#ef5c55}.btn-outline-danger.focus,.btn-outline-danger:focus{box-shadow:0 0 0 .2rem rgba(239,92,85,.5)}.btn-outline-danger.disabled,.btn-outline-danger:disabled{color:#ef5c55;background-color:initial}.btn-outline-danger:not(:disabled):not(.disabled).active,.btn-outline-danger:not(:disabled):not(.disabled):active,.show>.btn-outline-danger.dropdown-toggle{color:#fff;background-color:#ef5c55;border-color:#ef5c55}.btn-outline-danger:not(:disabled):not(.disabled).active:focus,.btn-outline-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(239,92,85,.5)}.btn-outline-light{color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:hover{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light.focus,.btn-outline-light:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-outline-light.disabled,.btn-outline-light:disabled{color:#f8f9fa;background-color:initial}.btn-outline-light:not(:disabled):not(.disabled).active,.btn-outline-light:not(:disabled):not(.disabled):active,.show>.btn-outline-light.dropdown-toggle{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:not(:disabled):not(.disabled).active:focus,.btn-outline-light:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-outline-dark{color:#777;border-color:#777}.btn-outline-dark:hover{color:#fff;background-color:#777;border-color:#777}.btn-outline-dark.focus,.btn-outline-dark:focus{box-shadow:0 0 0 .2rem hsla(0,0%,46.7%,.5)}.btn-outline-dark.disabled,.btn-outline-dark:disabled{color:#777;background-color:initial}.btn-outline-dark:not(:disabled):not(.disabled).active,.btn-outline-dark:not(:disabled):not(.disabled):active,.show>.btn-outline-dark.dropdown-toggle{color:#fff;background-color:#777;border-color:#777}.btn-outline-dark:not(:disabled):not(.disabled).active:focus,.btn-outline-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem hsla(0,0%,46.7%,.5)}.btn-outline-accent{color:#ef5c55;border-color:#ef5c55}.btn-outline-accent:hover{color:#fff;background-color:#ef5c55;border-color:#ef5c55}.btn-outline-accent.focus,.btn-outline-accent:focus{box-shadow:0 0 0 .2rem rgba(239,92,85,.5)}.btn-outline-accent.disabled,.btn-outline-accent:disabled{color:#ef5c55;background-color:initial}.btn-outline-accent:not(:disabled):not(.disabled).active,.btn-outline-accent:not(:disabled):not(.disabled):active,.show>.btn-outline-accent.dropdown-toggle{color:#fff;background-color:#ef5c55;border-color:#ef5c55}.btn-outline-accent:not(:disabled):not(.disabled).active:focus,.btn-outline-accent:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-accent.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(239,92,85,.5)}.btn-outline-warning-dark{color:#fd7e14;border-color:#fd7e14}.btn-outline-warning-dark:hover{color:#212529;background-color:#fd7e14;border-color:#fd7e14}.btn-outline-warning-dark.focus,.btn-outline-warning-dark:focus{box-shadow:0 0 0 .2rem rgba(253,126,20,.5)}.btn-outline-warning-dark.disabled,.btn-outline-warning-dark:disabled{color:#fd7e14;background-color:initial}.btn-outline-warning-dark:not(:disabled):not(.disabled).active,.btn-outline-warning-dark:not(:disabled):not(.disabled):active,.show>.btn-outline-warning-dark.dropdown-toggle{color:#212529;background-color:#fd7e14;border-color:#fd7e14}.btn-outline-warning-dark:not(:disabled):not(.disabled).active:focus,.btn-outline-warning-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-warning-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(253,126,20,.5)}.btn-link{font-weight:400;color:#2b99a8;text-decoration:none}.btn-link:hover{color:#1b626b}.btn-link.focus,.btn-link:focus,.btn-link:hover{text-decoration:underline}.btn-link.disabled,.btn-link:disabled{color:#6c757d;pointer-events:none}.btn-group-lg>.btn,.btn-lg{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.btn-group-sm>.btn,.btn-sm{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:.5rem}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{transition:opacity .15s linear}@media (prefers-reduced-motion:reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{position:relative;height:0;overflow:hidden;transition:height .35s ease}@media (prefers-reduced-motion:reduce){.collapsing{transition:none}}.dropdown,.dropleft,.dropright,.dropup{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle:after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty:after{margin-left:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:10rem;padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#212529;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}.dropdown-menu-left{right:auto;left:0}.dropdown-menu-right{right:0;left:auto}@media (min-width:576px){.dropdown-menu-sm-left{right:auto;left:0}.dropdown-menu-sm-right{right:0;left:auto}}@media (min-width:768px){.dropdown-menu-md-left{right:auto;left:0}.dropdown-menu-md-right{right:0;left:auto}}@media (min-width:992px){.dropdown-menu-lg-left{right:auto;left:0}.dropdown-menu-lg-right{right:0;left:auto}}@media (min-width:1200px){.dropdown-menu-xl-left{right:auto;left:0}.dropdown-menu-xl-right{right:0;left:auto}}@media (min-width:1450px){.dropdown-menu-2xl-left{right:auto;left:0}.dropdown-menu-2xl-right{right:0;left:auto}}.dropup .dropdown-menu{top:auto;bottom:100%;margin-top:0;margin-bottom:.125rem}.dropup .dropdown-toggle:after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty:after{margin-left:0}.dropright .dropdown-menu{top:0;right:auto;left:100%;margin-top:0;margin-left:.125rem}.dropright .dropdown-toggle:after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropright .dropdown-toggle:empty:after{margin-left:0}.dropright .dropdown-toggle:after{vertical-align:0}.dropleft .dropdown-menu{top:0;right:100%;left:auto;margin-top:0;margin-right:.125rem}.dropleft .dropdown-toggle:after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";display:none}.dropleft .dropdown-toggle:before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropleft .dropdown-toggle:empty:after{margin-left:0}.dropleft .dropdown-toggle:before{vertical-align:0}.dropdown-menu[x-placement^=bottom],.dropdown-menu[x-placement^=left],.dropdown-menu[x-placement^=right],.dropdown-menu[x-placement^=top]{right:auto;bottom:auto}.dropdown-divider{height:0;margin:.5rem 0;overflow:hidden;border-top:1px solid #e9ecef}.dropdown-item{display:block;width:100%;padding:.25rem 1.5rem;clear:both;font-weight:400;color:#212529;text-align:inherit;white-space:nowrap;background-color:initial;border:0}.dropdown-item:focus,.dropdown-item:hover{color:#16181b;text-decoration:none;background-color:#f8f9fa}.dropdown-item.active,.dropdown-item:active{color:#fff;text-decoration:none;background-color:#2b99a8}.dropdown-item.disabled,.dropdown-item:disabled{color:#6c757d;pointer-events:none;background-color:initial}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:.5rem 1.5rem;margin-bottom:0;font-size:.875rem;color:#6c757d;white-space:nowrap}.dropdown-item-text{display:block;padding:.25rem 1.5rem;color:#212529}.btn-group,.btn-group-vertical{position:relative;display:inline-flex;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;flex:1 1 auto}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:1}.btn-toolbar{display:flex;flex-wrap:wrap;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group>.btn-group:not(:first-child),.btn-group>.btn:not(:first-child){margin-left:-1px}.btn-group>.btn-group:not(:last-child)>.btn,.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:not(:first-child)>.btn,.btn-group>.btn:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split:after,.dropright .dropdown-toggle-split:after,.dropup .dropdown-toggle-split:after{margin-left:0}.dropleft .dropdown-toggle-split:before{margin-right:0}.btn-group-sm>.btn+.dropdown-toggle-split,.btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-group-lg>.btn+.dropdown-toggle-split,.btn-lg+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{flex-direction:column;align-items:flex-start;justify-content:center}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{width:100%}.btn-group-vertical>.btn-group:not(:first-child),.btn-group-vertical>.btn:not(:first-child){margin-top:-1px}.btn-group-vertical>.btn-group:not(:last-child)>.btn,.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child)>.btn,.btn-group-vertical>.btn:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.btn-group-toggle>.btn,.btn-group-toggle>.btn-group>.btn{margin-bottom:0}.btn-group-toggle>.btn-group>.btn input[type=checkbox],.btn-group-toggle>.btn-group>.btn input[type=radio],.btn-group-toggle>.btn input[type=checkbox],.btn-group-toggle>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:flex;flex-wrap:wrap;align-items:stretch;width:100%}.input-group>.cd-form-control,.input-group>.custom-file,.input-group>.custom-select,.input-group>.form-control,.input-group>.form-control-plaintext{position:relative;flex:1 1 auto;width:1%;min-width:0;margin-bottom:0}.input-group>.cd-form-control+.cd-form-control,.input-group>.cd-form-control+.custom-file,.input-group>.cd-form-control+.custom-select,.input-group>.cd-form-control+.form-control,.input-group>.custom-file+.cd-form-control,.input-group>.custom-file+.custom-file,.input-group>.custom-file+.custom-select,.input-group>.custom-file+.form-control,.input-group>.custom-select+.cd-form-control,.input-group>.custom-select+.custom-file,.input-group>.custom-select+.custom-select,.input-group>.custom-select+.form-control,.input-group>.form-control+.cd-form-control,.input-group>.form-control+.custom-file,.input-group>.form-control+.custom-select,.input-group>.form-control+.form-control,.input-group>.form-control-plaintext+.cd-form-control,.input-group>.form-control-plaintext+.custom-file,.input-group>.form-control-plaintext+.custom-select,.input-group>.form-control-plaintext+.form-control{margin-left:-1px}.input-group>.cd-form-control:focus,.input-group>.custom-file .custom-file-input:focus~.custom-file-label,.input-group>.custom-select:focus,.input-group>.form-control:focus{z-index:3}.input-group>.custom-file .custom-file-input:focus{z-index:4}.input-group>.cd-form-control:not(:last-child),.input-group>.custom-select:not(:last-child),.input-group>.form-control:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.cd-form-control:not(:first-child),.input-group>.custom-select:not(:first-child),.input-group>.form-control:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.custom-file{display:flex;align-items:center}.input-group>.custom-file:not(:last-child) .custom-file-label,.input-group>.custom-file:not(:last-child) .custom-file-label:after{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.custom-file:not(:first-child) .custom-file-label{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-append,.input-group-prepend{display:flex}.input-group-append .btn,.input-group-prepend .btn{position:relative;z-index:2}.input-group-append .btn:focus,.input-group-prepend .btn:focus{z-index:3}.input-group-append .btn+.btn,.input-group-append .btn+.input-group-text,.input-group-append .input-group-text+.btn,.input-group-append .input-group-text+.input-group-text,.input-group-prepend .btn+.btn,.input-group-prepend .btn+.input-group-text,.input-group-prepend .input-group-text+.btn,.input-group-prepend .input-group-text+.input-group-text{margin-left:-1px}.input-group-prepend{margin-right:-1px}.input-group-append{margin-left:-1px}.input-group-text{display:flex;align-items:center;padding:.375rem .75rem;margin-bottom:0;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:.25rem}.input-group-text input[type=checkbox],.input-group-text input[type=radio]{margin-top:0}.input-group-lg>.cd-form-control:not(textarea),.input-group-lg>.custom-select,.input-group-lg>.form-control:not(textarea){height:calc(1.5em + 1rem + 2px)}.input-group-lg>.cd-form-control,.input-group-lg>.custom-select,.input-group-lg>.form-control,.input-group-lg>.input-group-append>.btn,.input-group-lg>.input-group-append>.input-group-text,.input-group-lg>.input-group-prepend>.btn,.input-group-lg>.input-group-prepend>.input-group-text{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.input-group-sm>.cd-form-control:not(textarea),.input-group-sm>.custom-select,.input-group-sm>.form-control:not(textarea){height:calc(1.5em + .5rem + 2px)}.input-group-sm>.cd-form-control,.input-group-sm>.custom-select,.input-group-sm>.form-control,.input-group-sm>.input-group-append>.btn,.input-group-sm>.input-group-append>.input-group-text,.input-group-sm>.input-group-prepend>.btn,.input-group-sm>.input-group-prepend>.input-group-text{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.input-group-lg>.custom-select,.input-group-sm>.custom-select{padding-right:1.75rem}.input-group>.input-group-append:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group>.input-group-append:last-child>.input-group-text:not(:last-child),.input-group>.input-group-append:not(:last-child)>.btn,.input-group>.input-group-append:not(:last-child)>.input-group-text,.input-group>.input-group-prepend>.btn,.input-group>.input-group-prepend>.input-group-text{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.input-group-append>.btn,.input-group>.input-group-append>.input-group-text,.input-group>.input-group-prepend:first-child>.btn:not(:first-child),.input-group>.input-group-prepend:first-child>.input-group-text:not(:first-child),.input-group>.input-group-prepend:not(:first-child)>.btn,.input-group>.input-group-prepend:not(:first-child)>.input-group-text{border-top-left-radius:0;border-bottom-left-radius:0}.custom-control{position:relative;z-index:1;display:block;min-height:1.5rem;padding-left:1.5rem}.custom-control-inline{display:inline-flex;margin-right:1rem}.custom-control-input{position:absolute;left:0;z-index:-1;width:1rem;height:1.25rem;opacity:0}.custom-control-input:checked~.custom-control-label:before{color:#fff;border-color:#2b99a8;background-color:#2b99a8}.custom-control-input:focus~.custom-control-label:before{box-shadow:0 0 0 .2rem rgba(43,153,168,.25)}.custom-control-input:focus:not(:checked)~.custom-control-label:before{border-color:#76d0dc}.custom-control-input:not(:disabled):active~.custom-control-label:before{color:#fff;background-color:#9fdee6;border-color:#9fdee6}.custom-control-input:disabled~.custom-control-label,.custom-control-input[disabled]~.custom-control-label{color:#6c757d}.custom-control-input:disabled~.custom-control-label:before,.custom-control-input[disabled]~.custom-control-label:before{background-color:#e9ecef}.custom-control-label{position:relative;margin-bottom:0;vertical-align:top}.custom-control-label:before{pointer-events:none;background-color:#fff;border:1px solid #adb5bd}.custom-control-label:after,.custom-control-label:before{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;content:""}.custom-control-label:after{background:no-repeat 50%/50% 50%}.custom-checkbox .custom-control-label:before{border-radius:.25rem}.custom-checkbox .custom-control-input:checked~.custom-control-label:after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26l2.974 2.99L8 2.193z'/%3e%3c/svg%3e")}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label:before{border-color:#2b99a8;background-color:#2b99a8}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label:after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3e%3cpath stroke='%23fff' d='M0 2h4'/%3e%3c/svg%3e")}.custom-checkbox .custom-control-input:disabled:checked~.custom-control-label:before,.custom-checkbox .custom-control-input:disabled:indeterminate~.custom-control-label:before{background-color:rgba(43,153,168,.5)}.custom-radio .custom-control-label:before{border-radius:50%}.custom-radio .custom-control-input:checked~.custom-control-label:after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e")}.custom-radio .custom-control-input:disabled:checked~.custom-control-label:before{background-color:rgba(43,153,168,.5)}.custom-switch{padding-left:2.25rem}.custom-switch .custom-control-label:before{left:-2.25rem;width:1.75rem;pointer-events:all;border-radius:.5rem}.custom-switch .custom-control-label:after{top:calc(.25rem + 2px);left:calc(-2.25rem + 2px);width:calc(1rem - 4px);height:calc(1rem - 4px);background-color:#adb5bd;border-radius:.5rem;transition:transform .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.custom-switch .custom-control-label:after{transition:none}}.custom-switch .custom-control-input:checked~.custom-control-label:after{background-color:#fff;transform:translateX(.75rem)}.custom-switch .custom-control-input:disabled:checked~.custom-control-label:before{background-color:rgba(43,153,168,.5)}.custom-select{display:inline-block;width:100%;height:calc(1.5em + .75rem + 2px);padding:.375rem 1.75rem .375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;vertical-align:middle;background:#fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px;border:1px solid #ced4da;border-radius:.25rem;-moz-appearance:none;appearance:none}.custom-select:focus{border-color:#76d0dc;outline:0;box-shadow:0 0 0 .2rem rgba(43,153,168,.25)}.custom-select:focus::-ms-value{color:#495057;background-color:#fff}.custom-select[multiple],.custom-select[size]:not([size="1"]){height:auto;padding-right:.75rem;background-image:none}.custom-select:disabled{color:#6c757d;background-color:#e9ecef}.custom-select::-ms-expand{display:none}.custom-select:-moz-focusring{color:transparent;text-shadow:0 0 0 #495057}.custom-select-sm{height:calc(1.5em + .5rem + 2px);padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;font-size:.875rem}.custom-select-lg{height:calc(1.5em + 1rem + 2px);padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.25rem}.custom-file{display:inline-block;margin-bottom:0}.custom-file,.custom-file-input{position:relative;width:100%;height:calc(1.5em + .75rem + 2px)}.custom-file-input{z-index:2;margin:0;opacity:0}.custom-file-input:focus~.custom-file-label{border-color:#76d0dc;box-shadow:0 0 0 .2rem rgba(43,153,168,.25)}.custom-file-input:disabled~.custom-file-label,.custom-file-input[disabled]~.custom-file-label{background-color:#e9ecef}.custom-file-input:lang(en)~.custom-file-label:after{content:"Browse"}.custom-file-input~.custom-file-label[data-browse]:after{content:attr(data-browse)}.custom-file-label{left:0;z-index:1;height:calc(1.5em + .75rem + 2px);font-weight:400;background-color:#fff;border:1px solid #ced4da;border-radius:.25rem}.custom-file-label,.custom-file-label:after{position:absolute;top:0;right:0;padding:.375rem .75rem;line-height:1.5;color:#495057}.custom-file-label:after{bottom:0;z-index:3;display:block;height:calc(1.5em + .75rem);content:"Browse";background-color:#e9ecef;border-left:inherit;border-radius:0 .25rem .25rem 0}.custom-range{width:100%;height:1.4rem;padding:0;background-color:initial;-moz-appearance:none;appearance:none}.custom-range:focus{outline:none}.custom-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(43,153,168,.25)}.custom-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(43,153,168,.25)}.custom-range:focus::-ms-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(43,153,168,.25)}.custom-range::-moz-focus-outer{border:0}.custom-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;background-color:#2b99a8;border:0;border-radius:1rem;-webkit-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-webkit-slider-thumb{-webkit-transition:none;transition:none}}.custom-range::-webkit-slider-thumb:active{background-color:#9fdee6}.custom-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.custom-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#2b99a8;border:0;border-radius:1rem;-moz-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-moz-range-thumb{-moz-transition:none;transition:none}}.custom-range::-moz-range-thumb:active{background-color:#9fdee6}.custom-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.custom-range::-ms-thumb{width:1rem;height:1rem;margin-top:0;margin-right:.2rem;margin-left:.2rem;background-color:#2b99a8;border:0;border-radius:1rem;-ms-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-ms-thumb{-ms-transition:none;transition:none}}.custom-range::-ms-thumb:active{background-color:#9fdee6}.custom-range::-ms-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:initial;border-color:transparent;border-width:.5rem}.custom-range::-ms-fill-lower,.custom-range::-ms-fill-upper{background-color:#dee2e6;border-radius:1rem}.custom-range::-ms-fill-upper{margin-right:15px}.custom-range:disabled::-webkit-slider-thumb{background-color:#adb5bd}.custom-range:disabled::-webkit-slider-runnable-track{cursor:default}.custom-range:disabled::-moz-range-thumb{background-color:#adb5bd}.custom-range:disabled::-moz-range-track{cursor:default}.custom-range:disabled::-ms-thumb{background-color:#adb5bd}.custom-control-label:before,.custom-file-label,.custom-select{transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.custom-control-label:before,.custom-file-label,.custom-select{transition:none}}.nav{display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:.5rem 1rem}.nav-link:focus,.nav-link:hover{text-decoration:none}.nav-link.disabled{color:#6c757d;pointer-events:none;cursor:default}.nav-tabs{border-bottom:1px solid #dee2e6}.nav-tabs .nav-item{margin-bottom:-1px}.nav-tabs .nav-link{border:1px solid transparent;border-top-left-radius:.25rem;border-top-right-radius:.25rem}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{border-color:#e9ecef #e9ecef #dee2e6}.nav-tabs .nav-link.disabled{color:#6c757d;background-color:initial;border-color:transparent}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:#495057;background-color:#fff;border-color:#dee2e6 #dee2e6 #fff}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.nav-pills .nav-link{border-radius:.25rem}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:#fff;background-color:#2b99a8}.nav-fill .nav-item,.nav-fill>.nav-link{flex:1 1 auto;text-align:center}.nav-justified .nav-item,.nav-justified>.nav-link{flex-basis:0;flex-grow:1;text-align:center}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{position:relative;padding:.5rem 1rem}.navbar,.navbar .container,.navbar .container-fluid,.navbar .container-lg,.navbar .container-md,.navbar .container-sm,.navbar .container-xl{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between}.navbar-brand{display:inline-block;padding-top:.3125rem;padding-bottom:.3125rem;margin-right:1rem;font-size:1.25rem;line-height:inherit;white-space:nowrap}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-nav{display:flex;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link{padding-right:0;padding-left:0}.navbar-nav .dropdown-menu{position:static;float:none}.navbar-text{display:inline-block;padding-top:.5rem;padding-bottom:.5rem}.navbar-collapse{flex-basis:100%;flex-grow:1;align-items:center}.navbar-toggler{padding:.25rem .75rem;font-size:1.25rem;line-height:1;background-color:initial;border:1px solid transparent;border-radius:.25rem}.navbar-toggler:focus,.navbar-toggler:hover{text-decoration:none}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;content:"";background:no-repeat 50%;background-size:100% 100%}@media (max-width:575.98px){.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid,.navbar-expand-sm>.container-lg,.navbar-expand-sm>.container-md,.navbar-expand-sm>.container-sm,.navbar-expand-sm>.container-xl{padding-right:0;padding-left:0}}@media (min-width:576px){.navbar-expand-sm{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand-sm .navbar-nav{flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid,.navbar-expand-sm>.container-lg,.navbar-expand-sm>.container-md,.navbar-expand-sm>.container-sm,.navbar-expand-sm>.container-xl{flex-wrap:nowrap}.navbar-expand-sm .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}}@media (max-width:767.98px){.navbar-expand-md>.container,.navbar-expand-md>.container-fluid,.navbar-expand-md>.container-lg,.navbar-expand-md>.container-md,.navbar-expand-md>.container-sm,.navbar-expand-md>.container-xl{padding-right:0;padding-left:0}}@media (min-width:768px){.navbar-expand-md{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand-md .navbar-nav{flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-md>.container,.navbar-expand-md>.container-fluid,.navbar-expand-md>.container-lg,.navbar-expand-md>.container-md,.navbar-expand-md>.container-sm,.navbar-expand-md>.container-xl{flex-wrap:nowrap}.navbar-expand-md .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}}@media (max-width:991.98px){.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid,.navbar-expand-lg>.container-lg,.navbar-expand-lg>.container-md,.navbar-expand-lg>.container-sm,.navbar-expand-lg>.container-xl{padding-right:0;padding-left:0}}@media (min-width:992px){.navbar-expand-lg{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand-lg .navbar-nav{flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid,.navbar-expand-lg>.container-lg,.navbar-expand-lg>.container-md,.navbar-expand-lg>.container-sm,.navbar-expand-lg>.container-xl{flex-wrap:nowrap}.navbar-expand-lg .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}}@media (max-width:1199.98px){.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid,.navbar-expand-xl>.container-lg,.navbar-expand-xl>.container-md,.navbar-expand-xl>.container-sm,.navbar-expand-xl>.container-xl{padding-right:0;padding-left:0}}@media (min-width:1200px){.navbar-expand-xl{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand-xl .navbar-nav{flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid,.navbar-expand-xl>.container-lg,.navbar-expand-xl>.container-md,.navbar-expand-xl>.container-sm,.navbar-expand-xl>.container-xl{flex-wrap:nowrap}.navbar-expand-xl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}}@media (max-width:1449.98px){.navbar-expand-2xl>.container,.navbar-expand-2xl>.container-fluid,.navbar-expand-2xl>.container-lg,.navbar-expand-2xl>.container-md,.navbar-expand-2xl>.container-sm,.navbar-expand-2xl>.container-xl{padding-right:0;padding-left:0}}@media (min-width:1450px){.navbar-expand-2xl{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand-2xl .navbar-nav{flex-direction:row}.navbar-expand-2xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-2xl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-2xl>.container,.navbar-expand-2xl>.container-fluid,.navbar-expand-2xl>.container-lg,.navbar-expand-2xl>.container-md,.navbar-expand-2xl>.container-sm,.navbar-expand-2xl>.container-xl{flex-wrap:nowrap}.navbar-expand-2xl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-2xl .navbar-toggler{display:none}}.navbar-expand{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand>.container,.navbar-expand>.container-fluid,.navbar-expand>.container-lg,.navbar-expand>.container-md,.navbar-expand>.container-sm,.navbar-expand>.container-xl{padding-right:0;padding-left:0}.navbar-expand .navbar-nav{flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand>.container,.navbar-expand>.container-fluid,.navbar-expand>.container-lg,.navbar-expand>.container-md,.navbar-expand>.container-sm,.navbar-expand>.container-xl{flex-wrap:nowrap}.navbar-expand .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-light .navbar-brand,.navbar-light .navbar-brand:focus,.navbar-light .navbar-brand:hover{color:rgba(0,0,0,.9)}.navbar-light .navbar-nav .nav-link{color:rgba(0,0,0,.5)}.navbar-light .navbar-nav .nav-link:focus,.navbar-light .navbar-nav .nav-link:hover{color:rgba(0,0,0,.7)}.navbar-light .navbar-nav .nav-link.disabled{color:rgba(0,0,0,.3)}.navbar-light .navbar-nav .active>.nav-link,.navbar-light .navbar-nav .nav-link.active,.navbar-light .navbar-nav .nav-link.show,.navbar-light .navbar-nav .show>.nav-link{color:rgba(0,0,0,.9)}.navbar-light .navbar-toggler{color:rgba(0,0,0,.5);border-color:rgba(0,0,0,.1)}.navbar-light .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-light .navbar-text{color:rgba(0,0,0,.5)}.navbar-light .navbar-text a,.navbar-light .navbar-text a:focus,.navbar-light .navbar-text a:hover{color:rgba(0,0,0,.9)}.navbar-dark .navbar-brand,.navbar-dark .navbar-brand:focus,.navbar-dark .navbar-brand:hover{color:#fff}.navbar-dark .navbar-nav .nav-link{color:hsla(0,0%,100%,.5)}.navbar-dark .navbar-nav .nav-link:focus,.navbar-dark .navbar-nav .nav-link:hover{color:hsla(0,0%,100%,.75)}.navbar-dark .navbar-nav .nav-link.disabled{color:hsla(0,0%,100%,.25)}.navbar-dark .navbar-nav .active>.nav-link,.navbar-dark .navbar-nav .nav-link.active,.navbar-dark .navbar-nav .nav-link.show,.navbar-dark .navbar-nav .show>.nav-link{color:#fff}.navbar-dark .navbar-toggler{color:hsla(0,0%,100%,.5);border-color:hsla(0,0%,100%,.1)}.navbar-dark .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-dark .navbar-text{color:hsla(0,0%,100%,.5)}.navbar-dark .navbar-text a,.navbar-dark .navbar-text a:focus,.navbar-dark .navbar-text a:hover{color:#fff}.card,pre{position:relative;display:flex;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:initial;border:1px solid rgba(0,0,0,.125);border-radius:.25rem}.card>hr,pre>hr{margin-right:0;margin-left:0}.card>.list-group,pre>.list-group{border-top:inherit;border-bottom:inherit}.card>.list-group:first-child,pre>.list-group:first-child{border-top-width:0;border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card>.list-group:last-child,pre>.list-group:last-child{border-bottom-width:0;border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card>.card-header+.list-group,.card>.list-group+.card-footer,pre>.card-header+.list-group,pre>.list-group+.card-footer{border-top:0}.card-body{flex:1 1 auto;min-height:1px;padding:1.25rem}.card-title{margin-bottom:.75rem}.card-subtitle{margin-top:-.375rem}.card-subtitle,.card-text:last-child{margin-bottom:0}.card-link:hover{text-decoration:none}.card-link+.card-link{margin-left:1.25rem}.card-header{padding:.75rem 1.25rem;margin-bottom:0;background-color:#f8f9fa;border-bottom:1px solid rgba(0,0,0,.125)}.card-header:first-child{border-radius:calc(.25rem - 1px) calc(.25rem - 1px) 0 0}.card-footer{padding:.75rem 1.25rem;background-color:#f8f9fa;border-top:1px solid rgba(0,0,0,.125)}.card-footer:last-child{border-radius:0 0 calc(.25rem - 1px) calc(.25rem - 1px)}.card-header-tabs{margin-bottom:-.75rem;border-bottom:0}.card-header-pills,.card-header-tabs{margin-right:-.625rem;margin-left:-.625rem}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:1.25rem;border-radius:calc(.25rem - 1px)}.card-img,.card-img-bottom,.card-img-top{flex-shrink:0;width:100%}.card-img,.card-img-top{border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card-img,.card-img-bottom{border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card-deck .card,.card-deck pre{margin-bottom:15px}@media (min-width:576px){.card-deck{display:flex;flex-flow:row wrap;margin-right:-15px;margin-left:-15px}.card-deck .card,.card-deck pre{flex:1 0 0%;margin-right:15px;margin-bottom:0;margin-left:15px}}.card-group>.card,.card-group>pre{margin-bottom:15px}@media (min-width:576px){.card-group{display:flex;flex-flow:row wrap}.card-group>.card,.card-group>pre{flex:1 0 0%;margin-bottom:0}.card-group>.card+.card,.card-group>.card+pre,.card-group>pre+.card,.card-group>pre+pre{margin-left:0;border-left:0}.card-group>.card:not(:last-child),.card-group>pre:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:not(:last-child) .card-header,.card-group>.card:not(:last-child) .card-img-top,.card-group>pre:not(:last-child) .card-header,.card-group>pre:not(:last-child) .card-img-top{border-top-right-radius:0}.card-group>.card:not(:last-child) .card-footer,.card-group>.card:not(:last-child) .card-img-bottom,.card-group>pre:not(:last-child) .card-footer,.card-group>pre:not(:last-child) .card-img-bottom{border-bottom-right-radius:0}.card-group>.card:not(:first-child),.card-group>pre:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:not(:first-child) .card-header,.card-group>.card:not(:first-child) .card-img-top,.card-group>pre:not(:first-child) .card-header,.card-group>pre:not(:first-child) .card-img-top{border-top-left-radius:0}.card-group>.card:not(:first-child) .card-footer,.card-group>.card:not(:first-child) .card-img-bottom,.card-group>pre:not(:first-child) .card-footer,.card-group>pre:not(:first-child) .card-img-bottom{border-bottom-left-radius:0}}.card-columns .card,.card-columns pre{margin-bottom:.75rem}@media (min-width:576px){.card-columns{column-count:3;column-gap:1.25rem;orphans:1;widows:1}.card-columns .card,.card-columns pre{display:inline-block;width:100%}}.accordion{overflow-anchor:none}.accordion>.card,.accordion>pre{overflow:hidden}.accordion>.card:not(:last-of-type),.accordion>pre:not(:last-of-type){border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.accordion>.card:not(:first-of-type),.accordion>pre:not(:first-of-type){border-top-left-radius:0;border-top-right-radius:0}.accordion>.card>.card-header,.accordion>pre>.card-header{border-radius:0;margin-bottom:-1px}.breadcrumb{flex-wrap:wrap;padding:.75rem 1rem;margin-bottom:1rem;list-style:none;background-color:#e9ecef;border-radius:.25rem}.breadcrumb,.breadcrumb-item{display:flex}.breadcrumb-item+.breadcrumb-item{padding-left:.5rem}.breadcrumb-item+.breadcrumb-item:before{display:inline-block;padding-right:.5rem;color:#6c757d;content:"/"}.breadcrumb-item+.breadcrumb-item:hover:before{text-decoration:underline;text-decoration:none}.breadcrumb-item.active{color:#6c757d}.pagination,cd-table .cd-datatable .datatable-footer .datatable-pager ul{display:flex;padding-left:0;list-style:none;border-radius:.25rem}.page-link,cd-table .cd-datatable .datatable-footer .datatable-pager ul li a{position:relative;display:block;padding:.5rem .75rem;margin-left:-1px;line-height:1.25;color:#2b99a8;background-color:#fff;border:1px solid #dee2e6}.page-link:hover,cd-table .cd-datatable .datatable-footer .datatable-pager ul li a:hover{z-index:2;color:#1b626b;text-decoration:none;background-color:#e9ecef;border-color:#dee2e6}.page-link:focus,cd-table .cd-datatable .datatable-footer .datatable-pager ul li a:focus{z-index:3;outline:0;box-shadow:0 0 0 .2rem rgba(43,153,168,.25)}.page-item:first-child .page-link,.page-item:first-child cd-table .cd-datatable .datatable-footer .datatable-pager ul li a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li .page-item:first-child a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li:first-child .page-link,cd-table .cd-datatable .datatable-footer .datatable-pager ul li:first-child a{margin-left:0;border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.page-item:last-child .page-link,.page-item:last-child cd-table .cd-datatable .datatable-footer .datatable-pager ul li a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li .page-item:last-child a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li:last-child .page-link,cd-table .cd-datatable .datatable-footer .datatable-pager ul li:last-child a{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.page-item.active .page-link,.page-item.active cd-table .cd-datatable .datatable-footer .datatable-pager ul li a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li.active .page-link,cd-table .cd-datatable .datatable-footer .datatable-pager ul li.active a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li .page-item.active a{z-index:3;color:#fff;background-color:#2b99a8;border-color:#2b99a8}.page-item.disabled .page-link,.page-item.disabled cd-table .cd-datatable .datatable-footer .datatable-pager ul li a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li.disabled .page-link,cd-table .cd-datatable .datatable-footer .datatable-pager ul li.disabled a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li .page-item.disabled a{color:#6c757d;pointer-events:none;cursor:auto;background-color:#fff;border-color:#dee2e6}.pagination-lg .page-link,.pagination-lg cd-table .cd-datatable .datatable-footer .datatable-pager ul li a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li .pagination-lg a{padding:.75rem 1.5rem;font-size:1.25rem;line-height:1.5}.pagination-lg .page-item:first-child .page-link,.pagination-lg .page-item:first-child cd-table .cd-datatable .datatable-footer .datatable-pager ul li a,.pagination-lg cd-table .cd-datatable .datatable-footer .datatable-pager ul li:first-child .page-link,.pagination-lg cd-table .cd-datatable .datatable-footer .datatable-pager ul li:first-child a,cd-table .cd-datatable .datatable-footer .datatable-pager ul .pagination-lg li:first-child .page-link,cd-table .cd-datatable .datatable-footer .datatable-pager ul .pagination-lg li:first-child a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li .pagination-lg .page-item:first-child a{border-top-left-radius:.3rem;border-bottom-left-radius:.3rem}.pagination-lg .page-item:last-child .page-link,.pagination-lg .page-item:last-child cd-table .cd-datatable .datatable-footer .datatable-pager ul li a,.pagination-lg cd-table .cd-datatable .datatable-footer .datatable-pager ul li:last-child .page-link,.pagination-lg cd-table .cd-datatable .datatable-footer .datatable-pager ul li:last-child a,cd-table .cd-datatable .datatable-footer .datatable-pager ul .pagination-lg li:last-child .page-link,cd-table .cd-datatable .datatable-footer .datatable-pager ul .pagination-lg li:last-child a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li .pagination-lg .page-item:last-child a{border-top-right-radius:.3rem;border-bottom-right-radius:.3rem}.pagination-sm .page-link,.pagination-sm cd-table .cd-datatable .datatable-footer .datatable-pager ul li a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li .pagination-sm a{padding:.25rem .5rem;font-size:.875rem;line-height:1.5}.pagination-sm .page-item:first-child .page-link,.pagination-sm .page-item:first-child cd-table .cd-datatable .datatable-footer .datatable-pager ul li a,.pagination-sm cd-table .cd-datatable .datatable-footer .datatable-pager ul li:first-child .page-link,.pagination-sm cd-table .cd-datatable .datatable-footer .datatable-pager ul li:first-child a,cd-table .cd-datatable .datatable-footer .datatable-pager ul .pagination-sm li:first-child .page-link,cd-table .cd-datatable .datatable-footer .datatable-pager ul .pagination-sm li:first-child a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li .pagination-sm .page-item:first-child a{border-top-left-radius:.2rem;border-bottom-left-radius:.2rem}.pagination-sm .page-item:last-child .page-link,.pagination-sm .page-item:last-child cd-table .cd-datatable .datatable-footer .datatable-pager ul li a,.pagination-sm cd-table .cd-datatable .datatable-footer .datatable-pager ul li:last-child .page-link,.pagination-sm cd-table .cd-datatable .datatable-footer .datatable-pager ul li:last-child a,cd-table .cd-datatable .datatable-footer .datatable-pager ul .pagination-sm li:last-child .page-link,cd-table .cd-datatable .datatable-footer .datatable-pager ul .pagination-sm li:last-child a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li .pagination-sm .page-item:last-child a{border-top-right-radius:.2rem;border-bottom-right-radius:.2rem}.badge{display:inline-block;padding:.25em .4em;font-size:1rem;font-weight:700;line-height:1;text-align:center;white-space:nowrap;vertical-align:initial;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.badge{transition:none}}a.badge:focus,a.badge:hover{text-decoration:none}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.badge-pill{padding-right:.6em;padding-left:.6em;border-radius:10rem}.badge-primary{color:#fff;background-color:#2b99a8}a.badge-primary:focus,a.badge-primary:hover{color:#fff;background-color:#21747f}a.badge-primary.focus,a.badge-primary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(43,153,168,.5)}.badge-secondary{color:#fff;background-color:#374249}a.badge-secondary:focus,a.badge-secondary:hover{color:#fff;background-color:#21282c}a.badge-secondary.focus,a.badge-secondary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(55,66,73,.5)}.badge-success{color:#fff;background-color:#0b0}a.badge-success:focus,a.badge-success:hover{color:#fff;background-color:#080}a.badge-success.focus,a.badge-success:focus{outline:0;box-shadow:0 0 0 .2rem rgba(0,187,0,.5)}.badge-info{color:#fff;background-color:#2b99a8}a.badge-info:focus,a.badge-info:hover{color:#fff;background-color:#21747f}a.badge-info.focus,a.badge-info:focus{outline:0;box-shadow:0 0 0 .2rem rgba(43,153,168,.5)}.badge-warning{color:#212529;background-color:#ffc200}a.badge-warning:focus,a.badge-warning:hover{color:#212529;background-color:#cc9b00}a.badge-warning.focus,a.badge-warning:focus{outline:0;box-shadow:0 0 0 .2rem rgba(255,194,0,.5)}.badge-danger{color:#fff;background-color:#ef5c55}a.badge-danger:focus,a.badge-danger:hover{color:#fff;background-color:#eb2f26}a.badge-danger.focus,a.badge-danger:focus{outline:0;box-shadow:0 0 0 .2rem rgba(239,92,85,.5)}.badge-light{color:#212529;background-color:#f8f9fa}a.badge-light:focus,a.badge-light:hover{color:#212529;background-color:#dae0e5}a.badge-light.focus,a.badge-light:focus{outline:0;box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.badge-dark{color:#fff;background-color:#777}a.badge-dark:focus,a.badge-dark:hover{color:#fff;background-color:#5e5e5e}a.badge-dark.focus,a.badge-dark:focus{outline:0;box-shadow:0 0 0 .2rem hsla(0,0%,46.7%,.5)}.badge-accent{color:#fff;background-color:#ef5c55}a.badge-accent:focus,a.badge-accent:hover{color:#fff;background-color:#eb2f26}a.badge-accent.focus,a.badge-accent:focus{outline:0;box-shadow:0 0 0 .2rem rgba(239,92,85,.5)}.badge-warning-dark{color:#212529;background-color:#fd7e14}a.badge-warning-dark:focus,a.badge-warning-dark:hover{color:#212529;background-color:#dc6502}a.badge-warning-dark.focus,a.badge-warning-dark:focus{outline:0;box-shadow:0 0 0 .2rem rgba(253,126,20,.5)}.jumbotron{padding:2rem 1rem;margin-bottom:2rem;background-color:#e9ecef;border-radius:.3rem}@media (min-width:576px){.jumbotron{padding:4rem 2rem}}.jumbotron-fluid{padding-right:0;padding-left:0;border-radius:0}.alert{position:relative;padding:.75rem 1.25rem;margin-bottom:1rem;border:1px solid transparent;border-radius:.25rem}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:4rem}.alert-dismissible .close{position:absolute;top:0;right:0;padding:.75rem 1.25rem;color:inherit}.alert-primary{color:#165057;background-color:#d5ebee;border-color:#c4e2e7}.alert-primary hr{border-top-color:#b2d9e0}.alert-primary .alert-link{color:#0c2b2e}.alert-secondary{color:#1d2226;background-color:#d7d9db;border-color:#c7cacc}.alert-secondary hr{border-top-color:#babdc0}.alert-secondary .alert-link{color:#070809}.alert-success{color:#006100;background-color:#ccf1cc;border-color:#b8ecb8}.alert-success hr{border-top-color:#a4e7a4}.alert-success .alert-link{color:#002e00}.alert-info{color:#165057;background-color:#d5ebee;border-color:#c4e2e7}.alert-info hr{border-top-color:#b2d9e0}.alert-info .alert-link{color:#0c2b2e}.alert-warning{color:#856500;background-color:#fff3cc;border-color:#ffeeb8}.alert-warning hr{border-top-color:#ffe89f}.alert-warning .alert-link{color:#523e00}.alert-danger{color:#7c302c;background-color:#fcdedd;border-color:#fbd1cf}.alert-danger hr{border-top-color:#f9bab7}.alert-danger .alert-link{color:#56211f}.alert-light{color:#818182;background-color:#fefefe;border-color:#fdfdfe}.alert-light hr{border-top-color:#ececf6}.alert-light .alert-link{color:#686868}.alert-dark{color:#3e3e3e;background-color:#e4e4e4;border-color:#d9d9d9}.alert-dark hr{border-top-color:#ccc}.alert-dark .alert-link{color:#252525}.alert-accent{color:#7c302c;background-color:#fcdedd;border-color:#fbd1cf}.alert-accent hr{border-top-color:#f9bab7}.alert-accent .alert-link{color:#56211f}.alert-warning-dark{color:#84420a;background-color:#ffe5d0;border-color:#fedbbd}.alert-warning-dark hr{border-top-color:#fecda4}.alert-warning-dark .alert-link{color:#552a06}@keyframes progress-bar-stripes{0%{background-position:1rem 0}to{background-position:0 0}}.progress{height:1rem;line-height:0;font-size:.75rem;background-color:#e9ecef;border-radius:.25rem}.progress,.progress-bar{display:flex;overflow:hidden}.progress-bar{flex-direction:column;justify-content:center;color:#fff;text-align:center;white-space:nowrap;background-color:#2b99a8;transition:width .6s ease}@media (prefers-reduced-motion:reduce){.progress-bar{transition:none}}.progress-bar-striped{background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-size:1rem 1rem}.progress-bar-animated{animation:progress-bar-stripes 1s linear infinite}@media (prefers-reduced-motion:reduce){.progress-bar-animated{animation:none}}.media{display:flex;align-items:flex-start}.media-body{flex:1}.list-group{display:flex;flex-direction:column;padding-left:0;margin-bottom:0;border-radius:.25rem}.list-group-item-action{width:100%;color:#495057;text-align:inherit}.list-group-item-action:focus,.list-group-item-action:hover{z-index:1;color:#495057;text-decoration:none;background-color:#f8f9fa}.list-group-item-action:active{color:#212529;background-color:#e9ecef}.list-group-item{position:relative;display:block;padding:.75rem 1.25rem;background-color:#fff;border:1px solid rgba(0,0,0,.125)}.list-group-item:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.list-group-item:last-child{border-bottom-right-radius:inherit;border-bottom-left-radius:inherit}.list-group-item.disabled,.list-group-item:disabled{color:#6c757d;pointer-events:none;background-color:#fff}.list-group-item.active{z-index:2;color:#fff;background-color:#2b99a8;border-color:#2b99a8}.list-group-item+.list-group-item{border-top-width:0}.list-group-item+.list-group-item.active{margin-top:-1px;border-top-width:1px}.list-group-horizontal{flex-direction:row}.list-group-horizontal>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal>.list-group-item.active{margin-top:0}.list-group-horizontal>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}@media (min-width:576px){.list-group-horizontal-sm{flex-direction:row}.list-group-horizontal-sm>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-sm>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-sm>.list-group-item.active{margin-top:0}.list-group-horizontal-sm>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-sm>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:768px){.list-group-horizontal-md{flex-direction:row}.list-group-horizontal-md>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-md>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-md>.list-group-item.active{margin-top:0}.list-group-horizontal-md>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-md>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:992px){.list-group-horizontal-lg{flex-direction:row}.list-group-horizontal-lg>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-lg>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-lg>.list-group-item.active{margin-top:0}.list-group-horizontal-lg>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-lg>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:1200px){.list-group-horizontal-xl{flex-direction:row}.list-group-horizontal-xl>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-xl>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-xl>.list-group-item.active{margin-top:0}.list-group-horizontal-xl>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-xl>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:1450px){.list-group-horizontal-2xl{flex-direction:row}.list-group-horizontal-2xl>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-2xl>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-2xl>.list-group-item.active{margin-top:0}.list-group-horizontal-2xl>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-2xl>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}.list-group-flush{border-radius:0}.list-group-flush>.list-group-item{border-width:0 0 1px}.list-group-flush>.list-group-item:last-child{border-bottom-width:0}.list-group-item-primary{color:#165057;background-color:#c4e2e7}.list-group-item-primary.list-group-item-action:focus,.list-group-item-primary.list-group-item-action:hover{color:#165057;background-color:#b2d9e0}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#165057;border-color:#165057}.list-group-item-secondary{color:#1d2226;background-color:#c7cacc}.list-group-item-secondary.list-group-item-action:focus,.list-group-item-secondary.list-group-item-action:hover{color:#1d2226;background-color:#babdc0}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#1d2226;border-color:#1d2226}.list-group-item-success{color:#006100;background-color:#b8ecb8}.list-group-item-success.list-group-item-action:focus,.list-group-item-success.list-group-item-action:hover{color:#006100;background-color:#a4e7a4}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#006100;border-color:#006100}.list-group-item-info{color:#165057;background-color:#c4e2e7}.list-group-item-info.list-group-item-action:focus,.list-group-item-info.list-group-item-action:hover{color:#165057;background-color:#b2d9e0}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#165057;border-color:#165057}.list-group-item-warning{color:#856500;background-color:#ffeeb8}.list-group-item-warning.list-group-item-action:focus,.list-group-item-warning.list-group-item-action:hover{color:#856500;background-color:#ffe89f}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#856500;border-color:#856500}.list-group-item-danger{color:#7c302c;background-color:#fbd1cf}.list-group-item-danger.list-group-item-action:focus,.list-group-item-danger.list-group-item-action:hover{color:#7c302c;background-color:#f9bab7}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#7c302c;border-color:#7c302c}.list-group-item-light{color:#818182;background-color:#fdfdfe}.list-group-item-light.list-group-item-action:focus,.list-group-item-light.list-group-item-action:hover{color:#818182;background-color:#ececf6}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#818182;border-color:#818182}.list-group-item-dark{color:#3e3e3e;background-color:#d9d9d9}.list-group-item-dark.list-group-item-action:focus,.list-group-item-dark.list-group-item-action:hover{color:#3e3e3e;background-color:#ccc}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#3e3e3e;border-color:#3e3e3e}.list-group-item-accent{color:#7c302c;background-color:#fbd1cf}.list-group-item-accent.list-group-item-action:focus,.list-group-item-accent.list-group-item-action:hover{color:#7c302c;background-color:#f9bab7}.list-group-item-accent.list-group-item-action.active{color:#fff;background-color:#7c302c;border-color:#7c302c}.list-group-item-warning-dark{color:#84420a;background-color:#fedbbd}.list-group-item-warning-dark.list-group-item-action:focus,.list-group-item-warning-dark.list-group-item-action:hover{color:#84420a;background-color:#fecda4}.list-group-item-warning-dark.list-group-item-action.active{color:#fff;background-color:#84420a;border-color:#84420a}.close{float:right;font-size:1.5rem;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.5}.close:hover{color:#000;text-decoration:none}.close:not(:disabled):not(.disabled):focus,.close:not(:disabled):not(.disabled):hover{opacity:.75}button.close{padding:0;background-color:initial;border:0}a.close.disabled{pointer-events:none}.toast{flex-basis:350px;max-width:350px;font-size:.875rem;background-color:hsla(0,0%,100%,.85);background-clip:padding-box;border:1px solid rgba(0,0,0,.1);box-shadow:0 .25rem .75rem rgba(0,0,0,.1);opacity:0;border-radius:.25rem}.toast:not(:last-child){margin-bottom:.75rem}.toast.showing{opacity:1}.toast.show{display:block;opacity:1}.toast.hide{display:none}.toast-header{display:flex;align-items:center;padding:.25rem .75rem;color:#6c757d;background-color:hsla(0,0%,100%,.85);background-clip:padding-box;border-bottom:1px solid rgba(0,0,0,.05);border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.toast-body{padding:.75rem}.modal-open{overflow:hidden}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal{position:fixed;top:0;left:0;z-index:1050;display:none;width:100%;height:100%;overflow:hidden;outline:0}.modal-dialog{position:relative;width:auto;margin:.5rem;pointer-events:none}.modal.fade .modal-dialog{transition:transform .3s ease-out;transform:translateY(-50px)}@media (prefers-reduced-motion:reduce){.modal.fade .modal-dialog{transition:none}}.modal.show .modal-dialog{transform:none}.modal.modal-static .modal-dialog{transform:scale(1.02)}.modal-dialog-scrollable{display:flex;max-height:calc(100% - 1rem)}.modal-dialog-scrollable .modal-content{max-height:calc(100vh - 1rem);overflow:hidden}.modal-dialog-scrollable .modal-footer,.modal-dialog-scrollable .modal-header{flex-shrink:0}.modal-dialog-scrollable .modal-body{overflow-y:auto}.modal-dialog-centered{display:flex;align-items:center;min-height:calc(100% - 1rem)}.modal-dialog-centered:before{display:block;height:calc(100vh - 1rem);height:min-content;content:""}.modal-dialog-centered.modal-dialog-scrollable{flex-direction:column;justify-content:center;height:100%}.modal-dialog-centered.modal-dialog-scrollable .modal-content{max-height:none}.modal-dialog-centered.modal-dialog-scrollable:before{content:none}.modal-content{position:relative;display:flex;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem;outline:0}.modal-backdrop{position:fixed;top:0;left:0;z-index:1040;width:100vw;height:100vh;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:.5}.modal-header{display:flex;align-items:flex-start;justify-content:space-between;padding:1rem;border-bottom:1px solid #dee2e6;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.modal-header .close{padding:1rem;margin:-1rem -1rem -1rem auto}.modal-title{margin-bottom:0;line-height:1.5}.modal-body{position:relative;flex:1 1 auto;padding:1rem}.modal-footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;padding:.75rem;border-top:1px solid #dee2e6;border-bottom-right-radius:calc(.3rem - 1px);border-bottom-left-radius:calc(.3rem - 1px)}.modal-footer>*{margin:.25rem}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:576px){.modal-dialog{max-width:500px;margin:1.75rem auto}.modal-dialog-scrollable{max-height:calc(100% - 3.5rem)}.modal-dialog-scrollable .modal-content{max-height:calc(100vh - 3.5rem)}.modal-dialog-centered{min-height:calc(100% - 3.5rem)}.modal-dialog-centered:before{height:calc(100vh - 3.5rem);height:min-content}.modal-sm{max-width:300px}}@media (min-width:992px){.modal-lg,.modal-xl{max-width:800px}}@media (min-width:1200px){.modal-xl{max-width:1140px}}.tooltip{position:absolute;z-index:1070;display:block;margin:0;font-family:Helvetica Neue,Helvetica,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;opacity:0}.tooltip.show{opacity:.9}.tooltip .arrow{position:absolute;display:block;width:.8rem;height:.4rem}.tooltip .arrow:before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-auto[x-placement^=top],.bs-tooltip-top{padding:.4rem 0}.bs-tooltip-auto[x-placement^=top] .arrow,.bs-tooltip-top .arrow{bottom:0}.bs-tooltip-auto[x-placement^=top] .arrow:before,.bs-tooltip-top .arrow:before{top:0;border-width:.4rem .4rem 0;border-top-color:#212529}.bs-tooltip-auto[x-placement^=right],.bs-tooltip-right{padding:0 .4rem}.bs-tooltip-auto[x-placement^=right] .arrow,.bs-tooltip-right .arrow{left:0;width:.4rem;height:.8rem}.bs-tooltip-auto[x-placement^=right] .arrow:before,.bs-tooltip-right .arrow:before{right:0;border-width:.4rem .4rem .4rem 0;border-right-color:#212529}.bs-tooltip-auto[x-placement^=bottom],.bs-tooltip-bottom{padding:.4rem 0}.bs-tooltip-auto[x-placement^=bottom] .arrow,.bs-tooltip-bottom .arrow{top:0}.bs-tooltip-auto[x-placement^=bottom] .arrow:before,.bs-tooltip-bottom .arrow:before{bottom:0;border-width:0 .4rem .4rem;border-bottom-color:#212529}.bs-tooltip-auto[x-placement^=left],.bs-tooltip-left{padding:0 .4rem}.bs-tooltip-auto[x-placement^=left] .arrow,.bs-tooltip-left .arrow{right:0;width:.4rem;height:.8rem}.bs-tooltip-auto[x-placement^=left] .arrow:before,.bs-tooltip-left .arrow:before{left:0;border-width:.4rem 0 .4rem .4rem;border-left-color:#212529}.tooltip-inner{max-width:200px;padding:.25rem .5rem;color:#fff;text-align:center;background-color:#212529;border-radius:.25rem}.popover{top:0;left:0;z-index:1060;max-width:350px;font-family:Helvetica Neue,Helvetica,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:1rem;word-wrap:break-word;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem}.popover,.popover .arrow{position:absolute;display:block}.popover .arrow{width:1rem;height:.5rem;margin:0 .3rem}.popover .arrow:after,.popover .arrow:before{position:absolute;display:block;content:"";border-color:transparent;border-style:solid}.bs-popover-auto[x-placement^=top],.bs-popover-top{margin-bottom:.5rem}.bs-popover-auto[x-placement^=top]>.arrow,.bs-popover-top>.arrow{bottom:calc(-.5rem - 1px)}.bs-popover-auto[x-placement^=top]>.arrow:before,.bs-popover-top>.arrow:before{bottom:0;border-width:.5rem .5rem 0;border-top-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=top]>.arrow:after,.bs-popover-top>.arrow:after{bottom:1px;border-width:.5rem .5rem 0;border-top-color:#fff}.bs-popover-auto[x-placement^=right],.bs-popover-right{margin-left:.5rem}.bs-popover-auto[x-placement^=right]>.arrow,.bs-popover-right>.arrow{left:calc(-.5rem - 1px);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-auto[x-placement^=right]>.arrow:before,.bs-popover-right>.arrow:before{left:0;border-width:.5rem .5rem .5rem 0;border-right-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=right]>.arrow:after,.bs-popover-right>.arrow:after{left:1px;border-width:.5rem .5rem .5rem 0;border-right-color:#fff}.bs-popover-auto[x-placement^=bottom],.bs-popover-bottom{margin-top:.5rem}.bs-popover-auto[x-placement^=bottom]>.arrow,.bs-popover-bottom>.arrow{top:calc(-.5rem - 1px)}.bs-popover-auto[x-placement^=bottom]>.arrow:before,.bs-popover-bottom>.arrow:before{top:0;border-width:0 .5rem .5rem;border-bottom-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=bottom]>.arrow:after,.bs-popover-bottom>.arrow:after{top:1px;border-width:0 .5rem .5rem;border-bottom-color:#fff}.bs-popover-auto[x-placement^=bottom] .popover-header:before,.bs-popover-bottom .popover-header:before{position:absolute;top:0;left:50%;display:block;width:1rem;margin-left:-.5rem;content:"";border-bottom:1px solid #f7f7f7}.bs-popover-auto[x-placement^=left],.bs-popover-left{margin-right:.5rem}.bs-popover-auto[x-placement^=left]>.arrow,.bs-popover-left>.arrow{right:calc(-.5rem - 1px);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-auto[x-placement^=left]>.arrow:before,.bs-popover-left>.arrow:before{right:0;border-width:.5rem 0 .5rem .5rem;border-left-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=left]>.arrow:after,.bs-popover-left>.arrow:after{right:1px;border-width:.5rem 0 .5rem .5rem;border-left-color:#fff}.popover-header{padding:.5rem .75rem;margin-bottom:0;font-size:1rem;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.popover-header:empty{display:none}.popover-body{padding:.5rem .75rem;color:#212529}.carousel{position:relative}.carousel.pointer-event{touch-action:pan-y}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner:after{display:block;clear:both;content:""}.carousel-item{position:relative;display:none;float:left;width:100%;margin-right:-100%;backface-visibility:hidden;transition:transform .6s ease-in-out}@media (prefers-reduced-motion:reduce){.carousel-item{transition:none}}.carousel-item-next,.carousel-item-prev,.carousel-item.active{display:block}.active.carousel-item-right,.carousel-item-next:not(.carousel-item-left){transform:translateX(100%)}.active.carousel-item-left,.carousel-item-prev:not(.carousel-item-right){transform:translateX(-100%)}.carousel-fade .carousel-item{opacity:0;transition-property:opacity;transform:none}.carousel-fade .carousel-item-next.carousel-item-left,.carousel-fade .carousel-item-prev.carousel-item-right,.carousel-fade .carousel-item.active{z-index:1;opacity:1}.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-right{z-index:0;opacity:0;transition:opacity 0s .6s}@media (prefers-reduced-motion:reduce){.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-right{transition:none}}.carousel-control-next,.carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:flex;align-items:center;justify-content:center;width:15%;color:#fff;text-align:center;opacity:.5;transition:opacity .15s ease}@media (prefers-reduced-motion:reduce){.carousel-control-next,.carousel-control-prev{transition:none}}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-next-icon,.carousel-control-prev-icon{display:inline-block;width:20px;height:20px;background:no-repeat 50%/100% 100%}.carousel-control-prev-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M5.25 0l-4 4 4 4 1.5-1.5L4.25 4l2.5-2.5L5.25 0z'/%3e%3c/svg%3e")}.carousel-control-next-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M2.75 0l-1.5 1.5L3.75 4l-2.5 2.5L2.75 8l4-4-4-4z'/%3e%3c/svg%3e")}.carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:15;display:flex;justify-content:center;padding-left:0;margin-right:15%;margin-left:15%;list-style:none}.carousel-indicators li{box-sizing:initial;flex:0 1 auto;width:30px;height:3px;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:#fff;background-clip:padding-box;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:.5;transition:opacity .6s ease}@media (prefers-reduced-motion:reduce){.carousel-indicators li{transition:none}}.carousel-indicators .active{opacity:1}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center}@keyframes spinner-border{to{transform:rotate(1turn)}}.spinner-border{display:inline-block;width:2rem;height:2rem;vertical-align:text-bottom;border:.25em solid;border-right:.25em solid transparent;border-radius:50%;animation:spinner-border .75s linear infinite}.spinner-border-sm{width:1rem;height:1rem;border-width:.2em}@keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}.spinner-grow{display:inline-block;width:2rem;height:2rem;vertical-align:text-bottom;background-color:currentColor;border-radius:50%;opacity:0;animation:spinner-grow .75s linear infinite}.spinner-grow-sm{width:1rem;height:1rem}.align-baseline{vertical-align:initial!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.bg-primary{background-color:#2b99a8!important}a.bg-primary:focus,a.bg-primary:hover,button.bg-primary:focus,button.bg-primary:hover{background-color:#21747f!important}.bg-secondary{background-color:#374249!important}a.bg-secondary:focus,a.bg-secondary:hover,button.bg-secondary:focus,button.bg-secondary:hover{background-color:#21282c!important}.bg-success{background-color:#0b0!important}a.bg-success:focus,a.bg-success:hover,button.bg-success:focus,button.bg-success:hover{background-color:#080!important}.bg-info{background-color:#2b99a8!important}a.bg-info:focus,a.bg-info:hover,button.bg-info:focus,button.bg-info:hover{background-color:#21747f!important}.bg-warning{background-color:#ffc200!important}a.bg-warning:focus,a.bg-warning:hover,button.bg-warning:focus,button.bg-warning:hover{background-color:#cc9b00!important}.bg-danger{background-color:#ef5c55!important}a.bg-danger:focus,a.bg-danger:hover,button.bg-danger:focus,button.bg-danger:hover{background-color:#eb2f26!important}.bg-light,pre{background-color:#f8f9fa!important}a.bg-light:focus,a.bg-light:hover,button.bg-light:focus,button.bg-light:hover{background-color:#dae0e5!important}.bg-dark{background-color:#777!important}a.bg-dark:focus,a.bg-dark:hover,button.bg-dark:focus,button.bg-dark:hover{background-color:#5e5e5e!important}.bg-accent{background-color:#ef5c55!important}a.bg-accent:focus,a.bg-accent:hover,button.bg-accent:focus,button.bg-accent:hover{background-color:#eb2f26!important}.bg-warning-dark{background-color:#fd7e14!important}a.bg-warning-dark:focus,a.bg-warning-dark:hover,button.bg-warning-dark:focus,button.bg-warning-dark:hover{background-color:#dc6502!important}.bg-white{background-color:#fff!important}.bg-transparent{background-color:initial!important}.border{border:1px solid #dee2e6!important}.border-top{border-top:1px solid #dee2e6!important}.border-right{border-right:1px solid #dee2e6!important}.border-bottom,.cd-header,legend{border-bottom:1px solid #dee2e6!important}.border-left{border-left:1px solid #dee2e6!important}.border-0{border:0!important}.border-top-0{border-top:0!important}.border-right-0{border-right:0!important}.border-bottom-0{border-bottom:0!important}.border-left-0{border-left:0!important}.border-primary{border-color:#2b99a8!important}.border-secondary{border-color:#374249!important}.border-success{border-color:#0b0!important}.border-info{border-color:#2b99a8!important}.border-warning{border-color:#ffc200!important}.border-danger{border-color:#ef5c55!important}.border-light{border-color:#f8f9fa!important}.border-dark{border-color:#777!important}.border-accent{border-color:#ef5c55!important}.border-warning-dark{border-color:#fd7e14!important}.border-white{border-color:#fff!important}.rounded-sm{border-radius:.2rem!important}.rounded{border-radius:.25rem!important}.rounded-top{border-top-left-radius:.25rem!important}.rounded-right,.rounded-top{border-top-right-radius:.25rem!important}.rounded-bottom,.rounded-right{border-bottom-right-radius:.25rem!important}.rounded-bottom,.rounded-left{border-bottom-left-radius:.25rem!important}.rounded-left{border-top-left-radius:.25rem!important}.rounded-lg{border-radius:.3rem!important}.rounded-circle{border-radius:50%!important}.rounded-pill{border-radius:50rem!important}.rounded-0{border-radius:0!important}.clearfix:after{display:block;clear:both;content:""}.d-none{display:none!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex,cd-health cd-info-card{display:flex!important}.d-inline-flex{display:inline-flex!important}@media (min-width:576px){.d-sm-none{display:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:flex!important}.d-sm-inline-flex{display:inline-flex!important}}@media (min-width:768px){.d-md-none{display:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:flex!important}.d-md-inline-flex{display:inline-flex!important}}@media (min-width:992px){.d-lg-none{display:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:flex!important}.d-lg-inline-flex{display:inline-flex!important}}@media (min-width:1200px){.d-xl-none{display:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:flex!important}.d-xl-inline-flex{display:inline-flex!important}}@media (min-width:1450px){.d-2xl-none{display:none!important}.d-2xl-inline{display:inline!important}.d-2xl-inline-block{display:inline-block!important}.d-2xl-block{display:block!important}.d-2xl-table{display:table!important}.d-2xl-table-row{display:table-row!important}.d-2xl-table-cell{display:table-cell!important}.d-2xl-flex{display:flex!important}.d-2xl-inline-flex{display:inline-flex!important}}@media print{.d-print-none{display:none!important}.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:flex!important}.d-print-inline-flex{display:inline-flex!important}}.embed-responsive{position:relative;display:block;width:100%;padding:0;overflow:hidden}.embed-responsive:before{display:block;content:""}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-21by9:before{padding-top:42.8571428571%}.embed-responsive-16by9:before{padding-top:56.25%}.embed-responsive-4by3:before{padding-top:75%}.embed-responsive-1by1:before{padding-top:100%}.flex-row{flex-direction:row!important}.flex-column,cd-health cd-info-card{flex-direction:column!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-column-reverse{flex-direction:column-reverse!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.flex-wrap-reverse{flex-wrap:wrap-reverse!important}.flex-fill{flex:1 1 auto!important}.flex-grow-0{flex-grow:0!important}.flex-grow-1{flex-grow:1!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.justify-content-start{justify-content:flex-start!important}.justify-content-end{justify-content:flex-end!important}.justify-content-center{justify-content:center!important}.justify-content-between{justify-content:space-between!important}.justify-content-around{justify-content:space-around!important}.align-items-start{align-items:flex-start!important}.align-items-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-baseline{align-items:baseline!important}.align-items-stretch{align-items:stretch!important}.align-content-start{align-content:flex-start!important}.align-content-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-between{align-content:space-between!important}.align-content-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-self-auto{align-self:auto!important}.align-self-start{align-self:flex-start!important}.align-self-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-baseline{align-self:baseline!important}.align-self-stretch{align-self:stretch!important}@media (min-width:576px){.flex-sm-row{flex-direction:row!important}.flex-sm-column{flex-direction:column!important}.flex-sm-row-reverse{flex-direction:row-reverse!important}.flex-sm-column-reverse{flex-direction:column-reverse!important}.flex-sm-wrap{flex-wrap:wrap!important}.flex-sm-nowrap{flex-wrap:nowrap!important}.flex-sm-wrap-reverse{flex-wrap:wrap-reverse!important}.flex-sm-fill{flex:1 1 auto!important}.flex-sm-grow-0{flex-grow:0!important}.flex-sm-grow-1{flex-grow:1!important}.flex-sm-shrink-0{flex-shrink:0!important}.flex-sm-shrink-1{flex-shrink:1!important}.justify-content-sm-start{justify-content:flex-start!important}.justify-content-sm-end{justify-content:flex-end!important}.justify-content-sm-center{justify-content:center!important}.justify-content-sm-between{justify-content:space-between!important}.justify-content-sm-around{justify-content:space-around!important}.align-items-sm-start{align-items:flex-start!important}.align-items-sm-end{align-items:flex-end!important}.align-items-sm-center{align-items:center!important}.align-items-sm-baseline{align-items:baseline!important}.align-items-sm-stretch{align-items:stretch!important}.align-content-sm-start{align-content:flex-start!important}.align-content-sm-end{align-content:flex-end!important}.align-content-sm-center{align-content:center!important}.align-content-sm-between{align-content:space-between!important}.align-content-sm-around{align-content:space-around!important}.align-content-sm-stretch{align-content:stretch!important}.align-self-sm-auto{align-self:auto!important}.align-self-sm-start{align-self:flex-start!important}.align-self-sm-end{align-self:flex-end!important}.align-self-sm-center{align-self:center!important}.align-self-sm-baseline{align-self:baseline!important}.align-self-sm-stretch{align-self:stretch!important}}@media (min-width:768px){.flex-md-row{flex-direction:row!important}.flex-md-column{flex-direction:column!important}.flex-md-row-reverse{flex-direction:row-reverse!important}.flex-md-column-reverse{flex-direction:column-reverse!important}.flex-md-wrap{flex-wrap:wrap!important}.flex-md-nowrap{flex-wrap:nowrap!important}.flex-md-wrap-reverse{flex-wrap:wrap-reverse!important}.flex-md-fill{flex:1 1 auto!important}.flex-md-grow-0{flex-grow:0!important}.flex-md-grow-1{flex-grow:1!important}.flex-md-shrink-0{flex-shrink:0!important}.flex-md-shrink-1{flex-shrink:1!important}.justify-content-md-start{justify-content:flex-start!important}.justify-content-md-end{justify-content:flex-end!important}.justify-content-md-center{justify-content:center!important}.justify-content-md-between{justify-content:space-between!important}.justify-content-md-around{justify-content:space-around!important}.align-items-md-start{align-items:flex-start!important}.align-items-md-end{align-items:flex-end!important}.align-items-md-center{align-items:center!important}.align-items-md-baseline{align-items:baseline!important}.align-items-md-stretch{align-items:stretch!important}.align-content-md-start{align-content:flex-start!important}.align-content-md-end{align-content:flex-end!important}.align-content-md-center{align-content:center!important}.align-content-md-between{align-content:space-between!important}.align-content-md-around{align-content:space-around!important}.align-content-md-stretch{align-content:stretch!important}.align-self-md-auto{align-self:auto!important}.align-self-md-start{align-self:flex-start!important}.align-self-md-end{align-self:flex-end!important}.align-self-md-center{align-self:center!important}.align-self-md-baseline{align-self:baseline!important}.align-self-md-stretch{align-self:stretch!important}}@media (min-width:992px){.flex-lg-row{flex-direction:row!important}.flex-lg-column{flex-direction:column!important}.flex-lg-row-reverse{flex-direction:row-reverse!important}.flex-lg-column-reverse{flex-direction:column-reverse!important}.flex-lg-wrap{flex-wrap:wrap!important}.flex-lg-nowrap{flex-wrap:nowrap!important}.flex-lg-wrap-reverse{flex-wrap:wrap-reverse!important}.flex-lg-fill{flex:1 1 auto!important}.flex-lg-grow-0{flex-grow:0!important}.flex-lg-grow-1{flex-grow:1!important}.flex-lg-shrink-0{flex-shrink:0!important}.flex-lg-shrink-1{flex-shrink:1!important}.justify-content-lg-start{justify-content:flex-start!important}.justify-content-lg-end{justify-content:flex-end!important}.justify-content-lg-center{justify-content:center!important}.justify-content-lg-between{justify-content:space-between!important}.justify-content-lg-around{justify-content:space-around!important}.align-items-lg-start{align-items:flex-start!important}.align-items-lg-end{align-items:flex-end!important}.align-items-lg-center{align-items:center!important}.align-items-lg-baseline{align-items:baseline!important}.align-items-lg-stretch{align-items:stretch!important}.align-content-lg-start{align-content:flex-start!important}.align-content-lg-end{align-content:flex-end!important}.align-content-lg-center{align-content:center!important}.align-content-lg-between{align-content:space-between!important}.align-content-lg-around{align-content:space-around!important}.align-content-lg-stretch{align-content:stretch!important}.align-self-lg-auto{align-self:auto!important}.align-self-lg-start{align-self:flex-start!important}.align-self-lg-end{align-self:flex-end!important}.align-self-lg-center{align-self:center!important}.align-self-lg-baseline{align-self:baseline!important}.align-self-lg-stretch{align-self:stretch!important}}@media (min-width:1200px){.flex-xl-row{flex-direction:row!important}.flex-xl-column{flex-direction:column!important}.flex-xl-row-reverse{flex-direction:row-reverse!important}.flex-xl-column-reverse{flex-direction:column-reverse!important}.flex-xl-wrap{flex-wrap:wrap!important}.flex-xl-nowrap{flex-wrap:nowrap!important}.flex-xl-wrap-reverse{flex-wrap:wrap-reverse!important}.flex-xl-fill{flex:1 1 auto!important}.flex-xl-grow-0{flex-grow:0!important}.flex-xl-grow-1{flex-grow:1!important}.flex-xl-shrink-0{flex-shrink:0!important}.flex-xl-shrink-1{flex-shrink:1!important}.justify-content-xl-start{justify-content:flex-start!important}.justify-content-xl-end{justify-content:flex-end!important}.justify-content-xl-center{justify-content:center!important}.justify-content-xl-between{justify-content:space-between!important}.justify-content-xl-around{justify-content:space-around!important}.align-items-xl-start{align-items:flex-start!important}.align-items-xl-end{align-items:flex-end!important}.align-items-xl-center{align-items:center!important}.align-items-xl-baseline{align-items:baseline!important}.align-items-xl-stretch{align-items:stretch!important}.align-content-xl-start{align-content:flex-start!important}.align-content-xl-end{align-content:flex-end!important}.align-content-xl-center{align-content:center!important}.align-content-xl-between{align-content:space-between!important}.align-content-xl-around{align-content:space-around!important}.align-content-xl-stretch{align-content:stretch!important}.align-self-xl-auto{align-self:auto!important}.align-self-xl-start{align-self:flex-start!important}.align-self-xl-end{align-self:flex-end!important}.align-self-xl-center{align-self:center!important}.align-self-xl-baseline{align-self:baseline!important}.align-self-xl-stretch{align-self:stretch!important}}@media (min-width:1450px){.flex-2xl-row{flex-direction:row!important}.flex-2xl-column{flex-direction:column!important}.flex-2xl-row-reverse{flex-direction:row-reverse!important}.flex-2xl-column-reverse{flex-direction:column-reverse!important}.flex-2xl-wrap{flex-wrap:wrap!important}.flex-2xl-nowrap{flex-wrap:nowrap!important}.flex-2xl-wrap-reverse{flex-wrap:wrap-reverse!important}.flex-2xl-fill{flex:1 1 auto!important}.flex-2xl-grow-0{flex-grow:0!important}.flex-2xl-grow-1{flex-grow:1!important}.flex-2xl-shrink-0{flex-shrink:0!important}.flex-2xl-shrink-1{flex-shrink:1!important}.justify-content-2xl-start{justify-content:flex-start!important}.justify-content-2xl-end{justify-content:flex-end!important}.justify-content-2xl-center{justify-content:center!important}.justify-content-2xl-between{justify-content:space-between!important}.justify-content-2xl-around{justify-content:space-around!important}.align-items-2xl-start{align-items:flex-start!important}.align-items-2xl-end{align-items:flex-end!important}.align-items-2xl-center{align-items:center!important}.align-items-2xl-baseline{align-items:baseline!important}.align-items-2xl-stretch{align-items:stretch!important}.align-content-2xl-start{align-content:flex-start!important}.align-content-2xl-end{align-content:flex-end!important}.align-content-2xl-center{align-content:center!important}.align-content-2xl-between{align-content:space-between!important}.align-content-2xl-around{align-content:space-around!important}.align-content-2xl-stretch{align-content:stretch!important}.align-self-2xl-auto{align-self:auto!important}.align-self-2xl-start{align-self:flex-start!important}.align-self-2xl-end{align-self:flex-end!important}.align-self-2xl-center{align-self:center!important}.align-self-2xl-baseline{align-self:baseline!important}.align-self-2xl-stretch{align-self:stretch!important}}.float-left{float:left!important}.float-right{float:right!important}.float-none{float:none!important}@media (min-width:576px){.float-sm-left{float:left!important}.float-sm-right{float:right!important}.float-sm-none{float:none!important}}@media (min-width:768px){.float-md-left{float:left!important}.float-md-right{float:right!important}.float-md-none{float:none!important}}@media (min-width:992px){.float-lg-left{float:left!important}.float-lg-right{float:right!important}.float-lg-none{float:none!important}}@media (min-width:1200px){.float-xl-left{float:left!important}.float-xl-right{float:right!important}.float-xl-none{float:none!important}}@media (min-width:1450px){.float-2xl-left{float:left!important}.float-2xl-right{float:right!important}.float-2xl-none{float:none!important}}.user-select-all{user-select:all!important}.user-select-auto{user-select:auto!important}.user-select-none{user-select:none!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:sticky!important}.fixed-top{top:0}.fixed-bottom,.fixed-top{position:fixed;right:0;left:0;z-index:1030}.fixed-bottom{bottom:0}@supports (position:sticky){.sticky-top{position:sticky;top:0;z-index:1020}}.sr-only{white-space:nowrap}.sr-only-focusable:active,.sr-only-focusable:focus{white-space:normal}.shadow-sm{box-shadow:0 .125rem .25rem rgba(0,0,0,.075)!important}.shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15)!important}.shadow-lg{box-shadow:0 1rem 3rem rgba(0,0,0,.175)!important}.shadow-none{box-shadow:none!important}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mw-100{max-width:100%!important}.mh-100{max-height:100%!important}.min-vw-100{min-width:100vw!important}.min-vh-100{min-height:100vh!important}.vw-100{width:100vw!important}.vh-100{height:100vh!important}.m-0{margin:0!important}.mt-0,.my-0{margin-top:0!important}.mr-0,.mx-0{margin-right:0!important}.mb-0,.my-0{margin-bottom:0!important}.ml-0,.mx-0{margin-left:0!important}.m-1{margin:.25rem!important}.mt-1,.my-1{margin-top:.25rem!important}.mr-1,.mx-1{margin-right:.25rem!important}.mb-1,.my-1{margin-bottom:.25rem!important}.ml-1,.mx-1{margin-left:.25rem!important}.m-2{margin:.5rem!important}.mt-2,.my-2{margin-top:.5rem!important}.btn-toolbar cd-table-actions.btn-group,.mr-2,.mx-2,cd-logs label{margin-right:.5rem!important}.mb-2,.my-2{margin-bottom:.5rem!important}.ml-2,.mx-2{margin-left:.5rem!important}.m-3{margin:1rem!important}.mt-3,.my-3{margin-top:1rem!important}.mr-3,.mx-3,cd-logs .form-inline>.form-group{margin-right:1rem!important}.mb-3,.my-3,cd-logs .form-inline>.form-group{margin-bottom:1rem!important}.ml-3,.mx-3{margin-left:1rem!important}.m-4{margin:1.5rem!important}.cd-header,.mt-4,.my-4,legend{margin-top:1.5rem!important}.mr-4,.mx-4{margin-right:1.5rem!important}.cd-header,.mb-4,.my-4,cd-health cd-info-card,legend{margin-bottom:1.5rem!important}.ml-4,.mx-4{margin-left:1.5rem!important}.m-5{margin:3rem!important}.mt-5,.my-5{margin-top:3rem!important}.mr-5,.mx-5{margin-right:3rem!important}.mb-5,.my-5{margin-bottom:3rem!important}.ml-5,.mx-5{margin-left:3rem!important}.p-0{padding:0!important}.pt-0,.py-0{padding-top:0!important}.pr-0,.px-0{padding-right:0!important}.pb-0,.py-0{padding-bottom:0!important}.pl-0,.px-0{padding-left:0!important}.p-1{padding:.25rem!important}.pt-1,.py-1{padding-top:.25rem!important}.pr-1,.px-1{padding-right:.25rem!important}.cd-header,.pb-1,.py-1,legend{padding-bottom:.25rem!important}.pl-1,.px-1{padding-left:.25rem!important}.p-2,cd-table .cd-datatable .datatable-footer,pre{padding:.5rem!important}.pt-2,.py-2,cd-info-card .card .card-body .card-text,cd-info-card pre .card-body .card-text{padding-top:.5rem!important}.pr-2,.px-2{padding-right:.5rem!important}.pb-2,.py-2,cd-info-card .card,cd-info-card pre{padding-bottom:.5rem!important}.pl-2,.px-2,cd-info-card .card .card-body .card-title,cd-info-card pre .card-body .card-title{padding-left:.5rem!important}.p-3{padding:1rem!important}.pt-3,.py-3{padding-top:1rem!important}.pr-3,.px-3{padding-right:1rem!important}.pb-3,.py-3{padding-bottom:1rem!important}.pl-3,.px-3{padding-left:1rem!important}.p-4{padding:1.5rem!important}.pt-4,.py-4{padding-top:1.5rem!important}.pr-4,.px-4{padding-right:1.5rem!important}.pb-4,.py-4{padding-bottom:1.5rem!important}.pl-4,.px-4{padding-left:1.5rem!important}.p-5{padding:3rem!important}.pt-5,.py-5{padding-top:3rem!important}.pr-5,.px-5{padding-right:3rem!important}.pb-5,.py-5{padding-bottom:3rem!important}.pl-5,.px-5{padding-left:3rem!important}.m-n1{margin:-.25rem!important}.mt-n1,.my-n1{margin-top:-.25rem!important}.mr-n1,.mx-n1{margin-right:-.25rem!important}.mb-n1,.my-n1{margin-bottom:-.25rem!important}.ml-n1,.mx-n1{margin-left:-.25rem!important}.m-n2{margin:-.5rem!important}.mt-n2,.my-n2{margin-top:-.5rem!important}.mr-n2,.mx-n2{margin-right:-.5rem!important}.mb-n2,.my-n2{margin-bottom:-.5rem!important}.ml-n2,.mx-n2{margin-left:-.5rem!important}.m-n3{margin:-1rem!important}.mt-n3,.my-n3{margin-top:-1rem!important}.mr-n3,.mx-n3{margin-right:-1rem!important}.mb-n3,.my-n3{margin-bottom:-1rem!important}.ml-n3,.mx-n3{margin-left:-1rem!important}.m-n4{margin:-1.5rem!important}.mt-n4,.my-n4{margin-top:-1.5rem!important}.mr-n4,.mx-n4{margin-right:-1.5rem!important}.mb-n4,.my-n4{margin-bottom:-1.5rem!important}.ml-n4,.mx-n4{margin-left:-1.5rem!important}.m-n5{margin:-3rem!important}.mt-n5,.my-n5{margin-top:-3rem!important}.mr-n5,.mx-n5{margin-right:-3rem!important}.mb-n5,.my-n5{margin-bottom:-3rem!important}.ml-n5,.mx-n5{margin-left:-3rem!important}.m-auto{margin:auto!important}.mt-auto,.my-auto{margin-top:auto!important}.mr-auto,.mx-auto{margin-right:auto!important}.mb-auto,.my-auto{margin-bottom:auto!important}.ml-auto,.mx-auto{margin-left:auto!important}@media (min-width:576px){.m-sm-0{margin:0!important}.mt-sm-0,.my-sm-0{margin-top:0!important}.mr-sm-0,.mx-sm-0{margin-right:0!important}.mb-sm-0,.my-sm-0{margin-bottom:0!important}.ml-sm-0,.mx-sm-0{margin-left:0!important}.m-sm-1{margin:.25rem!important}.mt-sm-1,.my-sm-1{margin-top:.25rem!important}.mr-sm-1,.mx-sm-1{margin-right:.25rem!important}.mb-sm-1,.my-sm-1{margin-bottom:.25rem!important}.ml-sm-1,.mx-sm-1{margin-left:.25rem!important}.m-sm-2{margin:.5rem!important}.mt-sm-2,.my-sm-2{margin-top:.5rem!important}.mr-sm-2,.mx-sm-2{margin-right:.5rem!important}.mb-sm-2,.my-sm-2{margin-bottom:.5rem!important}.ml-sm-2,.mx-sm-2{margin-left:.5rem!important}.m-sm-3{margin:1rem!important}.mt-sm-3,.my-sm-3{margin-top:1rem!important}.mr-sm-3,.mx-sm-3{margin-right:1rem!important}.mb-sm-3,.my-sm-3{margin-bottom:1rem!important}.ml-sm-3,.mx-sm-3{margin-left:1rem!important}.m-sm-4{margin:1.5rem!important}.mt-sm-4,.my-sm-4{margin-top:1.5rem!important}.mr-sm-4,.mx-sm-4{margin-right:1.5rem!important}.mb-sm-4,.my-sm-4{margin-bottom:1.5rem!important}.ml-sm-4,.mx-sm-4{margin-left:1.5rem!important}.m-sm-5{margin:3rem!important}.mt-sm-5,.my-sm-5{margin-top:3rem!important}.mr-sm-5,.mx-sm-5{margin-right:3rem!important}.mb-sm-5,.my-sm-5{margin-bottom:3rem!important}.ml-sm-5,.mx-sm-5{margin-left:3rem!important}.p-sm-0{padding:0!important}.pt-sm-0,.py-sm-0{padding-top:0!important}.pr-sm-0,.px-sm-0{padding-right:0!important}.pb-sm-0,.py-sm-0{padding-bottom:0!important}.pl-sm-0,.px-sm-0{padding-left:0!important}.p-sm-1{padding:.25rem!important}.pt-sm-1,.py-sm-1{padding-top:.25rem!important}.pr-sm-1,.px-sm-1{padding-right:.25rem!important}.pb-sm-1,.py-sm-1{padding-bottom:.25rem!important}.pl-sm-1,.px-sm-1{padding-left:.25rem!important}.p-sm-2{padding:.5rem!important}.pt-sm-2,.py-sm-2{padding-top:.5rem!important}.pr-sm-2,.px-sm-2{padding-right:.5rem!important}.pb-sm-2,.py-sm-2{padding-bottom:.5rem!important}.pl-sm-2,.px-sm-2{padding-left:.5rem!important}.p-sm-3{padding:1rem!important}.pt-sm-3,.py-sm-3{padding-top:1rem!important}.pr-sm-3,.px-sm-3{padding-right:1rem!important}.pb-sm-3,.py-sm-3{padding-bottom:1rem!important}.pl-sm-3,.px-sm-3{padding-left:1rem!important}.p-sm-4{padding:1.5rem!important}.pt-sm-4,.py-sm-4{padding-top:1.5rem!important}.pr-sm-4,.px-sm-4{padding-right:1.5rem!important}.pb-sm-4,.py-sm-4{padding-bottom:1.5rem!important}.pl-sm-4,.px-sm-4{padding-left:1.5rem!important}.p-sm-5{padding:3rem!important}.pt-sm-5,.py-sm-5{padding-top:3rem!important}.pr-sm-5,.px-sm-5{padding-right:3rem!important}.pb-sm-5,.py-sm-5{padding-bottom:3rem!important}.pl-sm-5,.px-sm-5{padding-left:3rem!important}.m-sm-n1{margin:-.25rem!important}.mt-sm-n1,.my-sm-n1{margin-top:-.25rem!important}.mr-sm-n1,.mx-sm-n1{margin-right:-.25rem!important}.mb-sm-n1,.my-sm-n1{margin-bottom:-.25rem!important}.ml-sm-n1,.mx-sm-n1{margin-left:-.25rem!important}.m-sm-n2{margin:-.5rem!important}.mt-sm-n2,.my-sm-n2{margin-top:-.5rem!important}.mr-sm-n2,.mx-sm-n2{margin-right:-.5rem!important}.mb-sm-n2,.my-sm-n2{margin-bottom:-.5rem!important}.ml-sm-n2,.mx-sm-n2{margin-left:-.5rem!important}.m-sm-n3{margin:-1rem!important}.mt-sm-n3,.my-sm-n3{margin-top:-1rem!important}.mr-sm-n3,.mx-sm-n3{margin-right:-1rem!important}.mb-sm-n3,.my-sm-n3{margin-bottom:-1rem!important}.ml-sm-n3,.mx-sm-n3{margin-left:-1rem!important}.m-sm-n4{margin:-1.5rem!important}.mt-sm-n4,.my-sm-n4{margin-top:-1.5rem!important}.mr-sm-n4,.mx-sm-n4{margin-right:-1.5rem!important}.mb-sm-n4,.my-sm-n4{margin-bottom:-1.5rem!important}.ml-sm-n4,.mx-sm-n4{margin-left:-1.5rem!important}.m-sm-n5{margin:-3rem!important}.mt-sm-n5,.my-sm-n5{margin-top:-3rem!important}.mr-sm-n5,.mx-sm-n5{margin-right:-3rem!important}.mb-sm-n5,.my-sm-n5{margin-bottom:-3rem!important}.ml-sm-n5,.mx-sm-n5{margin-left:-3rem!important}.m-sm-auto{margin:auto!important}.mt-sm-auto,.my-sm-auto{margin-top:auto!important}.mr-sm-auto,.mx-sm-auto{margin-right:auto!important}.mb-sm-auto,.my-sm-auto{margin-bottom:auto!important}.ml-sm-auto,.mx-sm-auto{margin-left:auto!important}}@media (min-width:768px){.m-md-0{margin:0!important}.mt-md-0,.my-md-0{margin-top:0!important}.mr-md-0,.mx-md-0{margin-right:0!important}.mb-md-0,.my-md-0{margin-bottom:0!important}.ml-md-0,.mx-md-0{margin-left:0!important}.m-md-1{margin:.25rem!important}.mt-md-1,.my-md-1{margin-top:.25rem!important}.mr-md-1,.mx-md-1{margin-right:.25rem!important}.mb-md-1,.my-md-1{margin-bottom:.25rem!important}.ml-md-1,.mx-md-1{margin-left:.25rem!important}.m-md-2{margin:.5rem!important}.mt-md-2,.my-md-2{margin-top:.5rem!important}.mr-md-2,.mx-md-2{margin-right:.5rem!important}.mb-md-2,.my-md-2{margin-bottom:.5rem!important}.ml-md-2,.mx-md-2{margin-left:.5rem!important}.m-md-3{margin:1rem!important}.mt-md-3,.my-md-3{margin-top:1rem!important}.mr-md-3,.mx-md-3{margin-right:1rem!important}.mb-md-3,.my-md-3{margin-bottom:1rem!important}.ml-md-3,.mx-md-3{margin-left:1rem!important}.m-md-4{margin:1.5rem!important}.mt-md-4,.my-md-4{margin-top:1.5rem!important}.mr-md-4,.mx-md-4{margin-right:1.5rem!important}.mb-md-4,.my-md-4{margin-bottom:1.5rem!important}.ml-md-4,.mx-md-4{margin-left:1.5rem!important}.m-md-5{margin:3rem!important}.mt-md-5,.my-md-5{margin-top:3rem!important}.mr-md-5,.mx-md-5{margin-right:3rem!important}.mb-md-5,.my-md-5{margin-bottom:3rem!important}.ml-md-5,.mx-md-5{margin-left:3rem!important}.p-md-0{padding:0!important}.pt-md-0,.py-md-0{padding-top:0!important}.pr-md-0,.px-md-0{padding-right:0!important}.pb-md-0,.py-md-0{padding-bottom:0!important}.pl-md-0,.px-md-0{padding-left:0!important}.p-md-1{padding:.25rem!important}.pt-md-1,.py-md-1{padding-top:.25rem!important}.pr-md-1,.px-md-1{padding-right:.25rem!important}.pb-md-1,.py-md-1{padding-bottom:.25rem!important}.pl-md-1,.px-md-1{padding-left:.25rem!important}.p-md-2{padding:.5rem!important}.pt-md-2,.py-md-2{padding-top:.5rem!important}.pr-md-2,.px-md-2{padding-right:.5rem!important}.pb-md-2,.py-md-2{padding-bottom:.5rem!important}.pl-md-2,.px-md-2{padding-left:.5rem!important}.p-md-3{padding:1rem!important}.pt-md-3,.py-md-3{padding-top:1rem!important}.pr-md-3,.px-md-3{padding-right:1rem!important}.pb-md-3,.py-md-3{padding-bottom:1rem!important}.pl-md-3,.px-md-3{padding-left:1rem!important}.p-md-4{padding:1.5rem!important}.pt-md-4,.py-md-4{padding-top:1.5rem!important}.pr-md-4,.px-md-4{padding-right:1.5rem!important}.pb-md-4,.py-md-4{padding-bottom:1.5rem!important}.pl-md-4,.px-md-4{padding-left:1.5rem!important}.p-md-5{padding:3rem!important}.pt-md-5,.py-md-5{padding-top:3rem!important}.pr-md-5,.px-md-5{padding-right:3rem!important}.pb-md-5,.py-md-5{padding-bottom:3rem!important}.pl-md-5,.px-md-5{padding-left:3rem!important}.m-md-n1{margin:-.25rem!important}.mt-md-n1,.my-md-n1{margin-top:-.25rem!important}.mr-md-n1,.mx-md-n1{margin-right:-.25rem!important}.mb-md-n1,.my-md-n1{margin-bottom:-.25rem!important}.ml-md-n1,.mx-md-n1{margin-left:-.25rem!important}.m-md-n2{margin:-.5rem!important}.mt-md-n2,.my-md-n2{margin-top:-.5rem!important}.mr-md-n2,.mx-md-n2{margin-right:-.5rem!important}.mb-md-n2,.my-md-n2{margin-bottom:-.5rem!important}.ml-md-n2,.mx-md-n2{margin-left:-.5rem!important}.m-md-n3{margin:-1rem!important}.mt-md-n3,.my-md-n3{margin-top:-1rem!important}.mr-md-n3,.mx-md-n3{margin-right:-1rem!important}.mb-md-n3,.my-md-n3{margin-bottom:-1rem!important}.ml-md-n3,.mx-md-n3{margin-left:-1rem!important}.m-md-n4{margin:-1.5rem!important}.mt-md-n4,.my-md-n4{margin-top:-1.5rem!important}.mr-md-n4,.mx-md-n4{margin-right:-1.5rem!important}.mb-md-n4,.my-md-n4{margin-bottom:-1.5rem!important}.ml-md-n4,.mx-md-n4{margin-left:-1.5rem!important}.m-md-n5{margin:-3rem!important}.mt-md-n5,.my-md-n5{margin-top:-3rem!important}.mr-md-n5,.mx-md-n5{margin-right:-3rem!important}.mb-md-n5,.my-md-n5{margin-bottom:-3rem!important}.ml-md-n5,.mx-md-n5{margin-left:-3rem!important}.m-md-auto{margin:auto!important}.mt-md-auto,.my-md-auto{margin-top:auto!important}.mr-md-auto,.mx-md-auto{margin-right:auto!important}.mb-md-auto,.my-md-auto{margin-bottom:auto!important}.ml-md-auto,.mx-md-auto{margin-left:auto!important}}@media (min-width:992px){.m-lg-0{margin:0!important}.mt-lg-0,.my-lg-0{margin-top:0!important}.mr-lg-0,.mx-lg-0{margin-right:0!important}.mb-lg-0,.my-lg-0{margin-bottom:0!important}.ml-lg-0,.mx-lg-0{margin-left:0!important}.m-lg-1{margin:.25rem!important}.mt-lg-1,.my-lg-1{margin-top:.25rem!important}.mr-lg-1,.mx-lg-1{margin-right:.25rem!important}.mb-lg-1,.my-lg-1{margin-bottom:.25rem!important}.ml-lg-1,.mx-lg-1{margin-left:.25rem!important}.m-lg-2{margin:.5rem!important}.mt-lg-2,.my-lg-2{margin-top:.5rem!important}.mr-lg-2,.mx-lg-2{margin-right:.5rem!important}.mb-lg-2,.my-lg-2{margin-bottom:.5rem!important}.ml-lg-2,.mx-lg-2{margin-left:.5rem!important}.m-lg-3{margin:1rem!important}.mt-lg-3,.my-lg-3{margin-top:1rem!important}.mr-lg-3,.mx-lg-3{margin-right:1rem!important}.mb-lg-3,.my-lg-3{margin-bottom:1rem!important}.ml-lg-3,.mx-lg-3{margin-left:1rem!important}.m-lg-4{margin:1.5rem!important}.mt-lg-4,.my-lg-4{margin-top:1.5rem!important}.mr-lg-4,.mx-lg-4{margin-right:1.5rem!important}.mb-lg-4,.my-lg-4{margin-bottom:1.5rem!important}.ml-lg-4,.mx-lg-4{margin-left:1.5rem!important}.m-lg-5{margin:3rem!important}.mt-lg-5,.my-lg-5{margin-top:3rem!important}.mr-lg-5,.mx-lg-5{margin-right:3rem!important}.mb-lg-5,.my-lg-5{margin-bottom:3rem!important}.ml-lg-5,.mx-lg-5{margin-left:3rem!important}.p-lg-0{padding:0!important}.pt-lg-0,.py-lg-0{padding-top:0!important}.pr-lg-0,.px-lg-0{padding-right:0!important}.pb-lg-0,.py-lg-0{padding-bottom:0!important}.pl-lg-0,.px-lg-0{padding-left:0!important}.p-lg-1{padding:.25rem!important}.pt-lg-1,.py-lg-1{padding-top:.25rem!important}.pr-lg-1,.px-lg-1{padding-right:.25rem!important}.pb-lg-1,.py-lg-1{padding-bottom:.25rem!important}.pl-lg-1,.px-lg-1{padding-left:.25rem!important}.p-lg-2{padding:.5rem!important}.pt-lg-2,.py-lg-2{padding-top:.5rem!important}.pr-lg-2,.px-lg-2{padding-right:.5rem!important}.pb-lg-2,.py-lg-2{padding-bottom:.5rem!important}.pl-lg-2,.px-lg-2{padding-left:.5rem!important}.p-lg-3{padding:1rem!important}.pt-lg-3,.py-lg-3{padding-top:1rem!important}.pr-lg-3,.px-lg-3{padding-right:1rem!important}.pb-lg-3,.py-lg-3{padding-bottom:1rem!important}.pl-lg-3,.px-lg-3{padding-left:1rem!important}.p-lg-4{padding:1.5rem!important}.pt-lg-4,.py-lg-4{padding-top:1.5rem!important}.pr-lg-4,.px-lg-4{padding-right:1.5rem!important}.pb-lg-4,.py-lg-4{padding-bottom:1.5rem!important}.pl-lg-4,.px-lg-4{padding-left:1.5rem!important}.p-lg-5{padding:3rem!important}.pt-lg-5,.py-lg-5{padding-top:3rem!important}.pr-lg-5,.px-lg-5{padding-right:3rem!important}.pb-lg-5,.py-lg-5{padding-bottom:3rem!important}.pl-lg-5,.px-lg-5{padding-left:3rem!important}.m-lg-n1{margin:-.25rem!important}.mt-lg-n1,.my-lg-n1{margin-top:-.25rem!important}.mr-lg-n1,.mx-lg-n1{margin-right:-.25rem!important}.mb-lg-n1,.my-lg-n1{margin-bottom:-.25rem!important}.ml-lg-n1,.mx-lg-n1{margin-left:-.25rem!important}.m-lg-n2{margin:-.5rem!important}.mt-lg-n2,.my-lg-n2{margin-top:-.5rem!important}.mr-lg-n2,.mx-lg-n2{margin-right:-.5rem!important}.mb-lg-n2,.my-lg-n2{margin-bottom:-.5rem!important}.ml-lg-n2,.mx-lg-n2{margin-left:-.5rem!important}.m-lg-n3{margin:-1rem!important}.mt-lg-n3,.my-lg-n3{margin-top:-1rem!important}.mr-lg-n3,.mx-lg-n3{margin-right:-1rem!important}.mb-lg-n3,.my-lg-n3{margin-bottom:-1rem!important}.ml-lg-n3,.mx-lg-n3{margin-left:-1rem!important}.m-lg-n4{margin:-1.5rem!important}.mt-lg-n4,.my-lg-n4{margin-top:-1.5rem!important}.mr-lg-n4,.mx-lg-n4{margin-right:-1.5rem!important}.mb-lg-n4,.my-lg-n4{margin-bottom:-1.5rem!important}.ml-lg-n4,.mx-lg-n4{margin-left:-1.5rem!important}.m-lg-n5{margin:-3rem!important}.mt-lg-n5,.my-lg-n5{margin-top:-3rem!important}.mr-lg-n5,.mx-lg-n5{margin-right:-3rem!important}.mb-lg-n5,.my-lg-n5{margin-bottom:-3rem!important}.ml-lg-n5,.mx-lg-n5{margin-left:-3rem!important}.m-lg-auto{margin:auto!important}.mt-lg-auto,.my-lg-auto{margin-top:auto!important}.mr-lg-auto,.mx-lg-auto{margin-right:auto!important}.mb-lg-auto,.my-lg-auto{margin-bottom:auto!important}.ml-lg-auto,.mx-lg-auto{margin-left:auto!important}}@media (min-width:1200px){.m-xl-0{margin:0!important}.mt-xl-0,.my-xl-0{margin-top:0!important}.mr-xl-0,.mx-xl-0{margin-right:0!important}.mb-xl-0,.my-xl-0{margin-bottom:0!important}.ml-xl-0,.mx-xl-0{margin-left:0!important}.m-xl-1{margin:.25rem!important}.mt-xl-1,.my-xl-1{margin-top:.25rem!important}.mr-xl-1,.mx-xl-1{margin-right:.25rem!important}.mb-xl-1,.my-xl-1{margin-bottom:.25rem!important}.ml-xl-1,.mx-xl-1{margin-left:.25rem!important}.m-xl-2{margin:.5rem!important}.mt-xl-2,.my-xl-2{margin-top:.5rem!important}.mr-xl-2,.mx-xl-2{margin-right:.5rem!important}.mb-xl-2,.my-xl-2{margin-bottom:.5rem!important}.ml-xl-2,.mx-xl-2{margin-left:.5rem!important}.m-xl-3{margin:1rem!important}.mt-xl-3,.my-xl-3{margin-top:1rem!important}.mr-xl-3,.mx-xl-3{margin-right:1rem!important}.mb-xl-3,.my-xl-3{margin-bottom:1rem!important}.ml-xl-3,.mx-xl-3{margin-left:1rem!important}.m-xl-4{margin:1.5rem!important}.mt-xl-4,.my-xl-4{margin-top:1.5rem!important}.mr-xl-4,.mx-xl-4{margin-right:1.5rem!important}.mb-xl-4,.my-xl-4{margin-bottom:1.5rem!important}.ml-xl-4,.mx-xl-4{margin-left:1.5rem!important}.m-xl-5{margin:3rem!important}.mt-xl-5,.my-xl-5{margin-top:3rem!important}.mr-xl-5,.mx-xl-5{margin-right:3rem!important}.mb-xl-5,.my-xl-5{margin-bottom:3rem!important}.ml-xl-5,.mx-xl-5{margin-left:3rem!important}.p-xl-0{padding:0!important}.pt-xl-0,.py-xl-0{padding-top:0!important}.pr-xl-0,.px-xl-0{padding-right:0!important}.pb-xl-0,.py-xl-0{padding-bottom:0!important}.pl-xl-0,.px-xl-0{padding-left:0!important}.p-xl-1{padding:.25rem!important}.pt-xl-1,.py-xl-1{padding-top:.25rem!important}.pr-xl-1,.px-xl-1{padding-right:.25rem!important}.pb-xl-1,.py-xl-1{padding-bottom:.25rem!important}.pl-xl-1,.px-xl-1{padding-left:.25rem!important}.p-xl-2{padding:.5rem!important}.pt-xl-2,.py-xl-2{padding-top:.5rem!important}.pr-xl-2,.px-xl-2{padding-right:.5rem!important}.pb-xl-2,.py-xl-2{padding-bottom:.5rem!important}.pl-xl-2,.px-xl-2{padding-left:.5rem!important}.p-xl-3{padding:1rem!important}.pt-xl-3,.py-xl-3{padding-top:1rem!important}.pr-xl-3,.px-xl-3{padding-right:1rem!important}.pb-xl-3,.py-xl-3{padding-bottom:1rem!important}.pl-xl-3,.px-xl-3{padding-left:1rem!important}.p-xl-4{padding:1.5rem!important}.pt-xl-4,.py-xl-4{padding-top:1.5rem!important}.pr-xl-4,.px-xl-4{padding-right:1.5rem!important}.pb-xl-4,.py-xl-4{padding-bottom:1.5rem!important}.pl-xl-4,.px-xl-4{padding-left:1.5rem!important}.p-xl-5{padding:3rem!important}.pt-xl-5,.py-xl-5{padding-top:3rem!important}.pr-xl-5,.px-xl-5{padding-right:3rem!important}.pb-xl-5,.py-xl-5{padding-bottom:3rem!important}.pl-xl-5,.px-xl-5{padding-left:3rem!important}.m-xl-n1{margin:-.25rem!important}.mt-xl-n1,.my-xl-n1{margin-top:-.25rem!important}.mr-xl-n1,.mx-xl-n1{margin-right:-.25rem!important}.mb-xl-n1,.my-xl-n1{margin-bottom:-.25rem!important}.ml-xl-n1,.mx-xl-n1{margin-left:-.25rem!important}.m-xl-n2{margin:-.5rem!important}.mt-xl-n2,.my-xl-n2{margin-top:-.5rem!important}.mr-xl-n2,.mx-xl-n2{margin-right:-.5rem!important}.mb-xl-n2,.my-xl-n2{margin-bottom:-.5rem!important}.ml-xl-n2,.mx-xl-n2{margin-left:-.5rem!important}.m-xl-n3{margin:-1rem!important}.mt-xl-n3,.my-xl-n3{margin-top:-1rem!important}.mr-xl-n3,.mx-xl-n3{margin-right:-1rem!important}.mb-xl-n3,.my-xl-n3{margin-bottom:-1rem!important}.ml-xl-n3,.mx-xl-n3{margin-left:-1rem!important}.m-xl-n4{margin:-1.5rem!important}.mt-xl-n4,.my-xl-n4{margin-top:-1.5rem!important}.mr-xl-n4,.mx-xl-n4{margin-right:-1.5rem!important}.mb-xl-n4,.my-xl-n4{margin-bottom:-1.5rem!important}.ml-xl-n4,.mx-xl-n4{margin-left:-1.5rem!important}.m-xl-n5{margin:-3rem!important}.mt-xl-n5,.my-xl-n5{margin-top:-3rem!important}.mr-xl-n5,.mx-xl-n5{margin-right:-3rem!important}.mb-xl-n5,.my-xl-n5{margin-bottom:-3rem!important}.ml-xl-n5,.mx-xl-n5{margin-left:-3rem!important}.m-xl-auto{margin:auto!important}.mt-xl-auto,.my-xl-auto{margin-top:auto!important}.mr-xl-auto,.mx-xl-auto{margin-right:auto!important}.mb-xl-auto,.my-xl-auto{margin-bottom:auto!important}.ml-xl-auto,.mx-xl-auto{margin-left:auto!important}}@media (min-width:1450px){.m-2xl-0{margin:0!important}.mt-2xl-0,.my-2xl-0{margin-top:0!important}.mr-2xl-0,.mx-2xl-0{margin-right:0!important}.mb-2xl-0,.my-2xl-0{margin-bottom:0!important}.ml-2xl-0,.mx-2xl-0{margin-left:0!important}.m-2xl-1{margin:.25rem!important}.mt-2xl-1,.my-2xl-1{margin-top:.25rem!important}.mr-2xl-1,.mx-2xl-1{margin-right:.25rem!important}.mb-2xl-1,.my-2xl-1{margin-bottom:.25rem!important}.ml-2xl-1,.mx-2xl-1{margin-left:.25rem!important}.m-2xl-2{margin:.5rem!important}.mt-2xl-2,.my-2xl-2{margin-top:.5rem!important}.mr-2xl-2,.mx-2xl-2{margin-right:.5rem!important}.mb-2xl-2,.my-2xl-2{margin-bottom:.5rem!important}.ml-2xl-2,.mx-2xl-2{margin-left:.5rem!important}.m-2xl-3{margin:1rem!important}.mt-2xl-3,.my-2xl-3{margin-top:1rem!important}.mr-2xl-3,.mx-2xl-3{margin-right:1rem!important}.mb-2xl-3,.my-2xl-3{margin-bottom:1rem!important}.ml-2xl-3,.mx-2xl-3{margin-left:1rem!important}.m-2xl-4{margin:1.5rem!important}.mt-2xl-4,.my-2xl-4{margin-top:1.5rem!important}.mr-2xl-4,.mx-2xl-4{margin-right:1.5rem!important}.mb-2xl-4,.my-2xl-4{margin-bottom:1.5rem!important}.ml-2xl-4,.mx-2xl-4{margin-left:1.5rem!important}.m-2xl-5{margin:3rem!important}.mt-2xl-5,.my-2xl-5{margin-top:3rem!important}.mr-2xl-5,.mx-2xl-5{margin-right:3rem!important}.mb-2xl-5,.my-2xl-5{margin-bottom:3rem!important}.ml-2xl-5,.mx-2xl-5{margin-left:3rem!important}.p-2xl-0{padding:0!important}.pt-2xl-0,.py-2xl-0{padding-top:0!important}.pr-2xl-0,.px-2xl-0{padding-right:0!important}.pb-2xl-0,.py-2xl-0{padding-bottom:0!important}.pl-2xl-0,.px-2xl-0{padding-left:0!important}.p-2xl-1{padding:.25rem!important}.pt-2xl-1,.py-2xl-1{padding-top:.25rem!important}.pr-2xl-1,.px-2xl-1{padding-right:.25rem!important}.pb-2xl-1,.py-2xl-1{padding-bottom:.25rem!important}.pl-2xl-1,.px-2xl-1{padding-left:.25rem!important}.p-2xl-2{padding:.5rem!important}.pt-2xl-2,.py-2xl-2{padding-top:.5rem!important}.pr-2xl-2,.px-2xl-2{padding-right:.5rem!important}.pb-2xl-2,.py-2xl-2{padding-bottom:.5rem!important}.pl-2xl-2,.px-2xl-2{padding-left:.5rem!important}.p-2xl-3{padding:1rem!important}.pt-2xl-3,.py-2xl-3{padding-top:1rem!important}.pr-2xl-3,.px-2xl-3{padding-right:1rem!important}.pb-2xl-3,.py-2xl-3{padding-bottom:1rem!important}.pl-2xl-3,.px-2xl-3{padding-left:1rem!important}.p-2xl-4{padding:1.5rem!important}.pt-2xl-4,.py-2xl-4{padding-top:1.5rem!important}.pr-2xl-4,.px-2xl-4{padding-right:1.5rem!important}.pb-2xl-4,.py-2xl-4{padding-bottom:1.5rem!important}.pl-2xl-4,.px-2xl-4{padding-left:1.5rem!important}.p-2xl-5{padding:3rem!important}.pt-2xl-5,.py-2xl-5{padding-top:3rem!important}.pr-2xl-5,.px-2xl-5{padding-right:3rem!important}.pb-2xl-5,.py-2xl-5{padding-bottom:3rem!important}.pl-2xl-5,.px-2xl-5{padding-left:3rem!important}.m-2xl-n1{margin:-.25rem!important}.mt-2xl-n1,.my-2xl-n1{margin-top:-.25rem!important}.mr-2xl-n1,.mx-2xl-n1{margin-right:-.25rem!important}.mb-2xl-n1,.my-2xl-n1{margin-bottom:-.25rem!important}.ml-2xl-n1,.mx-2xl-n1{margin-left:-.25rem!important}.m-2xl-n2{margin:-.5rem!important}.mt-2xl-n2,.my-2xl-n2{margin-top:-.5rem!important}.mr-2xl-n2,.mx-2xl-n2{margin-right:-.5rem!important}.mb-2xl-n2,.my-2xl-n2{margin-bottom:-.5rem!important}.ml-2xl-n2,.mx-2xl-n2{margin-left:-.5rem!important}.m-2xl-n3{margin:-1rem!important}.mt-2xl-n3,.my-2xl-n3{margin-top:-1rem!important}.mr-2xl-n3,.mx-2xl-n3{margin-right:-1rem!important}.mb-2xl-n3,.my-2xl-n3{margin-bottom:-1rem!important}.ml-2xl-n3,.mx-2xl-n3{margin-left:-1rem!important}.m-2xl-n4{margin:-1.5rem!important}.mt-2xl-n4,.my-2xl-n4{margin-top:-1.5rem!important}.mr-2xl-n4,.mx-2xl-n4{margin-right:-1.5rem!important}.mb-2xl-n4,.my-2xl-n4{margin-bottom:-1.5rem!important}.ml-2xl-n4,.mx-2xl-n4{margin-left:-1.5rem!important}.m-2xl-n5{margin:-3rem!important}.mt-2xl-n5,.my-2xl-n5{margin-top:-3rem!important}.mr-2xl-n5,.mx-2xl-n5{margin-right:-3rem!important}.mb-2xl-n5,.my-2xl-n5{margin-bottom:-3rem!important}.ml-2xl-n5,.mx-2xl-n5{margin-left:-3rem!important}.m-2xl-auto{margin:auto!important}.mt-2xl-auto,.my-2xl-auto{margin-top:auto!important}.mr-2xl-auto,.mx-2xl-auto{margin-right:auto!important}.mb-2xl-auto,.my-2xl-auto{margin-bottom:auto!important}.ml-2xl-auto,.mx-2xl-auto{margin-left:auto!important}}.stretched-link:after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;pointer-events:auto;content:"";background-color:transparent}.text-monospace{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace!important}.text-justify{text-align:justify!important}.text-wrap{white-space:normal!important}.text-nowrap{white-space:nowrap!important}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-left{text-align:left!important}.text-right{text-align:right!important}.text-center{text-align:center!important}@media (min-width:576px){.text-sm-left{text-align:left!important}.text-sm-right{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:768px){.text-md-left{text-align:left!important}.text-md-right{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:992px){.text-lg-left{text-align:left!important}.text-lg-right{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.text-xl-left{text-align:left!important}.text-xl-right{text-align:right!important}.text-xl-center{text-align:center!important}}@media (min-width:1450px){.text-2xl-left{text-align:left!important}.text-2xl-right{text-align:right!important}.text-2xl-center{text-align:center!important}}.text-lowercase{text-transform:lowercase!important}.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.font-weight-light{font-weight:300!important}.font-weight-lighter{font-weight:lighter!important}.font-weight-normal{font-weight:400!important}.font-weight-bold,cd-about dt{font-weight:700!important}.font-weight-bolder{font-weight:bolder!important}.font-italic{font-style:italic!important}.text-white{color:#fff!important}.text-primary{color:#2b99a8!important}a.text-primary:focus,a.text-primary:hover{color:#1b626b!important}.text-secondary{color:#374249!important}a.text-secondary:focus,a.text-secondary:hover{color:#161b1d!important}.text-success{color:#0b0!important}a.text-success:focus,a.text-success:hover{color:#006f00!important}.text-info{color:#2b99a8!important}a.text-info:focus,a.text-info:hover{color:#1b626b!important}.text-warning{color:#ffc200!important}a.text-warning:focus,a.text-warning:hover{color:#b38800!important}.text-danger{color:#ef5c55!important}a.text-danger:focus,a.text-danger:hover{color:#e21f15!important}.text-light{color:#f8f9fa!important}a.text-light:focus,a.text-light:hover{color:#cbd3da!important}.text-dark{color:#777!important}a.text-dark:focus,a.text-dark:hover{color:#515151!important}.text-accent{color:#ef5c55!important}a.text-accent:focus,a.text-accent:hover{color:#e21f15!important}.text-warning-dark{color:#fd7e14!important}a.text-warning-dark:focus,a.text-warning-dark:hover{color:#c35a02!important}.text-body{color:#212529!important}.text-muted{color:#6c757d!important}.text-black-50{color:rgba(0,0,0,.5)!important}.text-white-50{color:hsla(0,0%,100%,.5)!important}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:initial;border:0}.text-decoration-none{text-decoration:none!important}.text-break{word-break:break-word!important;overflow-wrap:break-word!important}.text-reset{color:inherit!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}@media print{*,:after,:before{text-shadow:none!important;box-shadow:none!important}a:not(.btn){text-decoration:underline}abbr[title]:after{content:" (" attr(title) ")"}pre{white-space:pre-wrap!important}blockquote,pre{border:1px solid #adb5bd;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}@page{size:a3}.container,body{min-width:992px!important}.navbar{display:none}.badge{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #dee2e6!important}.table-dark{color:inherit}.table-dark tbody+tbody,.table-dark td,.table-dark th,.table-dark thead th{border-color:#dee2e6}.table .thead-dark th{color:inherit;border-color:#dee2e6}}
-/*!
-Fork Awesome 1.1.7
-License - https://forkaweso.me/Fork-Awesome/license
-
-Copyright 2018 Dave Gandy & Fork Awesome
-
-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.
- */@font-face{font-family:ForkAwesome;src:url(forkawesome-webfont.e182ad6df04f9177b326.eot?v=1.1.7);src:url(forkawesome-webfont.e182ad6df04f9177b326.eot?#iefix&v=1.1.7) format("embedded-opentype"),url(forkawesome-webfont.7c20758e3e7c7dff7c8d.woff2?v=1.1.7) format("woff2"),url(forkawesome-webfont.2dfb5f36fc148e26e398.woff?v=1.1.7) format("woff"),url(forkawesome-webfont.ee4d8bfd0af89fc714a2.ttf?v=1.1.7) format("truetype"),url(forkawesome-webfont.86541105409e56d17291.svg?v=1.1.7#forkawesomeregular) format("svg");font-weight:400;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 ForkAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.3333333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa,.fa-fw{width:1.2857142857em;text-align:center}.fa-ul{padding-left:0;margin-left:2.1428571429em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.1428571429em;width:2.1428571429em;top:.1428571429em;text-align:center}.fa-li.fa-lg{left:-1.8571428571em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{animation:fa-spin 2s linear infinite}.fa-pulse{animation:fa-spin 1s steps(8) infinite}@keyframes fa-spin{0%{transform:rotate(0deg)}to{transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";transform:scaleX(-1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";transform:scaleY(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-close:before,.fa-remove:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-cog:before,.fa-gear:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-repeat:before,.fa-rotate-right:before{content:""}.fa-refresh:before,.fa-sync:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before,.fa-video:before{content:""}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-exclamation-triangle:before,.fa-warning:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-cogs:before,.fa-gears:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell-o:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-globe-e:before{content:""}.fa-globe-w:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-community:before,.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-floppy-o:before,.fa-save:before{content:""}.fa-square:before{content:""}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus-g:before,.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-sort:before,.fa-unsorted:before{content:""}.fa-sort-desc:before,.fa-sort-down:before{content:""}.fa-sort-asc:before,.fa-sort-up:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-gavel:before,.fa-legal:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-bolt:before,.fa-flash:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-clipboard:before,.fa-paste:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before,.fa-utensils:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-chain-broken:before,.fa-unlink:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:""}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:""}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:""}.fa-eur:before,.fa-euro:before{content:""}.fa-gbp:before,.fa-pound:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-inr:before,.fa-rupee:before{content:""}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:""}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:""}.fa-krw:before,.fa-won:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before,.fa-sort-alpha-down:before{content:""}.fa-sort-alpha-desc:before,.fa-sort-alpha-up:before{content:""}.fa-sort-amount-asc:before,.fa-sort-amount-down:before{content:""}.fa-sort-amount-desc:before,.fa-sort-amount-up:before{content:""}.fa-sort-numeric-asc:before,.fa-sort-numeric-down:before{content:""}.fa-sort-numeric-desc:before,.fa-sort-numeric-up:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-try:before,.fa-turkish-lira:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-bank:before,.fa-institution:before,.fa-university:before{content:""}.fa-graduation-cap:before,.fa-mortar-board:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before,.fa-utensil-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:""}.fa-file-archive-o:before,.fa-file-zip-o:before{content:""}.fa-file-audio-o:before,.fa-file-sound-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before,.fa-resistance:before{content:""}.fa-empire:before,.fa-ge:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-paper-plane:before,.fa-send:before{content:""}.fa-paper-plane-o:before,.fa-send-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before,.fa-heading:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before,.fa-closed-captioning:before{content:""}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before,.fa-gem:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-bed:before,.fa-hotel:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-medium-square:before{content:""}.fa-y-combinator:before,.fa-yc:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before,.fa-battery:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-television:before,.fa-tv:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo-v:before,.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-phone-volume:before,.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-american-sign-language-interpreting:before,.fa-asl-interpreting:before{content:""}.fa-deaf:before,.fa-deafness:before,.fa-hard-of-hearing:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-sign-language:before,.fa-signing:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-address-card:before,.fa-vcard:before{content:""}.fa-address-card-o:before,.fa-vcard-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer-full:before,.fa-thermometer:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bath:before,.fa-bathtub:before,.fa-s15:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.fa-mastodon:before{content:""}.fa-mastodon-alt:before{content:""}.fa-fork-awesome:before,.fa-fork-circle:before{content:""}.fa-peertube:before{content:""}.fa-diaspora:before{content:""}.fa-friendica:before{content:""}.fa-gnu-social:before{content:""}.fa-liberapay-square:before{content:""}.fa-liberapay:before{content:""}.fa-scuttlebutt:before,.fa-ssb:before{content:""}.fa-hubzilla:before{content:""}.fa-social-home:before{content:""}.fa-artstation:before{content:""}.fa-discord:before{content:""}.fa-discord-alt:before{content:""}.fa-patreon:before{content:""}.fa-snowdrift:before{content:""}.fa-activitypub:before{content:""}.fa-ethereum:before{content:""}.fa-keybase:before{content:""}.fa-shaarli:before{content:""}.fa-shaarli-o:before{content:""}.fa-cut-key:before,.fa-key-modern:before{content:""}.fa-xmpp:before{content:""}.fa-archive-org:before{content:""}.fa-freedombox:before{content:""}.fa-facebook-messenger:before{content:""}.fa-debian:before{content:""}.fa-mastodon-square:before{content:""}.fa-tipeee:before{content:""}.fa-react:before{content:""}.fa-dogmazic:before{content:""}.fa-zotero:before{content:""}.fa-nodejs:before{content:""}.fa-nextcloud:before{content:""}.fa-nextcloud-square:before{content:""}.fa-hackaday:before{content:""}.fa-laravel:before{content:""}.fa-signalapp:before{content:""}.fa-gnupg:before{content:""}.fa-php:before{content:""}.fa-ffmpeg:before{content:""}.fa-joplin:before{content:""}.fa-syncthing:before{content:""}.fa-inkscape:before{content:""}.fa-matrix-org:before{content:""}.fa-pixelfed:before{content:""}.fa-bootstrap:before{content:""}.fa-dev-to:before{content:""}.fa-hashnode:before{content:""}.fa-jirafeau:before{content:""}.fa-emby:before{content:""}.fa-wikidata:before{content:""}.fa-gimp:before{content:""}.fa-c:before{content:""}.fa-digitalocean:before{content:""}.fa-att:before{content:""}.fa-gitea:before{content:""}.fa-file-epub:before{content:""}.fa-python:before{content:""}.fa-archlinux:before{content:""}.fa-pleroma:before{content:""}.fa-unsplash:before{content:""}.fa-hackster:before{content:""}.fa-spell-check:before{content:""}.fa-moon:before{content:""}.fa-sun:before{content:""}.fa-f-droid:before{content:""}.fa-biometric:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.info-card-popover-cluster-status{max-height:20vh;max-width:23vw}.info-card-popover-cluster-status .popover-body{font-size:1rem;max-height:19vh;max-width:100%;overflow:auto}@media (max-width:calc(1200px - 1px)){.info-card-popover-cluster-status{max-width:31vw}}@media (max-width:calc(992px - 1px)){.info-card-popover-cluster-status{max-width:46vw}}@media (max-width:calc(768px - 1px)){.info-card-popover-cluster-status{max-width:83vw}}.info-card-content-clickable{border:1px solid #e9ecef;border-radius:3px;cursor:pointer;padding:7px}.info-card-content-clickable:hover{background-color:#e9ecef;border-color:#ced4da}html{background-color:#fff}body,html{font-size:12px;height:100%;width:100%}option{font-style:normal;font-weight:400}.full-height{height:100vh}.full-width{width:100vw}.vertical-align{align-items:center;display:flex}.horizontal-align{display:flex;justify-content:center}.loading{left:50%;position:absolute;top:50%}.margin-right-md{margin-right:15px}.no-border{border:0;box-shadow:0 0 0!important}.italic{font-style:italic}.bold{font-weight:700}.text-right{text-align:right}.text-monospace{font-family:monospace}.text-pre-wrap{white-space:pre-wrap}.text-pre{white-space:pre}.border-danger{border-left:4px solid #ef5c55}.border-info{border-left:4px solid #2b99a8}.border-success{border-left:4px solid #0b0}.custom-control-input.is-valid~.custom-control-label,.was-validated .custom-control-input:valid~.custom-control-label{color:initial}.custom-control-input.is-valid:checked~.custom-control-label:before,.was-validated .custom-control-input:valid:checked~.custom-control-label:before{background-color:#2b99a8;border-color:#2b99a8}.custom-control-input.is-valid~.custom-control-label:before,.was-validated .custom-control-input:valid~.custom-control-label:before{border-color:#adb5bd}.custom-control-input.is-valid:focus~.custom-control-label:before,.was-validated .custom-control-input:valid:focus~.custom-control-label:before{box-shadow:0 0 0 .2rem rgba(43,153,168,.25)}.custom-control-input.is-valid:focus:not(:checked)~.custom-control-label:before,.was-validated .custom-control-input:valid:focus:not(:checked)~.custom-control-label:before{border-color:#76d0dc}.btn-light{background-color:#fff;border-color:#ced4da!important}.btn-light:hover{background-color:#dee2e6;border-color:#6c757d!important}.btn-light:disabled{background-color:#e9ecef;border-color:#ced4da!important}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:0}.btn.disabled{border:0;box-shadow:none}.btn-primary .badge{background-color:#e9ecef;color:#2b99a8}.btn-group>.btn>i.fa,.cd-datatable-actions button.btn i.fa{margin-right:5px}.card-footer button.btn:not(:first-child){margin-left:5px}.dropdown-menu{min-width:50px;z-index:999999}.dropdown-menu button.dropdown-item:focus{outline:none}.dropdown-menu>li>a{cursor:pointer}.dropdown-menu>li>a>i.fa{margin-right:5px}.dropdown-menu>.active>a{background-color:#2b99a8;color:#e9ecef}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{background-color:#21747f}.dataTables_wrapper .dropdown-menu>li.dropdown-divider{cursor:auto}.required:after{color:#ef5c55;content:"*";font-size:1.167rem;padding-left:4px}.form-footer{display:flex;width:100%}.cd-form-control,.form-control{display:table-cell}.cd-form-control:focus,.form-control:focus{border-color:rgba(43,153,168,.8);box-shadow:0 0 3px 2px rgba(43,153,168,.5);outline:0}.custom-checkbox{padding-top:7px}.invalid-feedback{display:block}.container-fluid,.container-lg,.container-md,.container-sm,.container-xl{padding:0 30px}.ceph-icon{background:url(Ceph_Logo.487a0001b327fa7f5232.svg)}.prometheus-icon{background:url(prometheus_logo.8b3183e5a2db0e87bb2b.svg)}.custom-icon{background-clip:padding-box;background-repeat:no-repeat;background-size:contain;margin-right:8px;padding:10px}.nav-tabs{margin-bottom:1rem}#toast-container{margin-top:2vw}@media (max-width:1600px){#toast-container{margin-top:2.5vw}}@media (max-width:calc(992px - 1px)){#toast-container{margin-top:9vw}}@media (max-width:900px){#toast-container{margin-top:10vw}}@media (max-width:319px){#toast-container{margin-top:11vw}}@media (max-width:260px){#toast-container{margin-top:14vw}}.toast-message>ul{margin:0;padding-left:1rem}.noscript{padding-top:5em}@media (min-width:576px){.cd-col-form-label,.col-form-label{text-align:right}}.cd-col-form-label,.col-form-label{font-weight:700}.password-strength-level{flex:100%;margin-top:2px}.password-strength-level .ok,.password-strength-level .strong,.password-strength-level .very-strong,.password-strength-level .weak{border-radius:.25rem;height:13px}.password-strength-level .weak{background:#ef5c55;width:25%}.password-strength-level .ok{background:#ffc200;width:50%}.password-strength-level .strong{background:#0b0;width:75%}.password-strength-level .very-strong{background:#006f00;width:100%}.badge-background-gray,.badge-hdd{background-color:#6c757d;color:#fff}.badge-background-primary,.badge-ssd{background-color:#2b99a8;color:#fff}.badge-tab{background-color:#e9ecef;color:#495057}tree-root tree-viewport{min-height:1em}tags-input .tags{border:1px solid #ced4da;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.09)}.card-header{font-size:1.3em}.card-body h2:first-child{margin-top:0}.disabled{pointer-events:none}.clickable,a{cursor:pointer}
\ No newline at end of file
--- /dev/null
+@charset "UTF-8";.toast-center-center{top:50%;left:50%;transform:translate(-50%,-50%)}.toast-top-center{top:0;right:0;width:100%}.toast-bottom-center{bottom:0;right:0;width:100%}.toast-top-full-width{top:0;right:0;width:100%}.toast-bottom-full-width{bottom:0;right:0;width:100%}.toast-top-left{top:12px;left:12px}.toast-top-right{top:12px;right:12px}.toast-bottom-right{right:12px;bottom:12px}.toast-bottom-left{bottom:12px;left:12px}.toast-title{font-weight:700}.toast-message{word-wrap:break-word}.toast-message a,.toast-message label{color:#fff}.toast-message a:hover{color:#ccc;text-decoration:none}.toast-close-button{position:relative;right:-.3em;top:-.3em;float:right;font-size:20px;font-weight:700;color:#fff;text-shadow:0 1px 0 #fff}.toast-close-button:focus,.toast-close-button:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.4}button.toast-close-button{padding:0;cursor:pointer;background:transparent;border:0}.toast-container{pointer-events:none;position:fixed;z-index:999999}.toast-container *{box-sizing:border-box}.toast-container .ngx-toastr{position:relative;overflow:hidden;margin:0 0 6px;padding:15px 15px 15px 50px;width:300px;border-radius:3px 3px 3px 3px;background-position:15px;background-repeat:no-repeat;background-size:24px;box-shadow:0 0 12px #999;color:#fff}.toast-container .ngx-toastr:hover{box-shadow:0 0 12px #000;opacity:1;cursor:pointer}.toast-info{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' width='512' height='512'%3E%3Cpath fill='rgb(255,255,255)' d='M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z'/%3E%3C/svg%3E")}.toast-error{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' width='512' height='512'%3E%3Cpath fill='rgb(255,255,255)' d='M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z'/%3E%3C/svg%3E")}.toast-success{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' width='512' height='512'%3E%3Cpath fill='rgb(255,255,255)' d='M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z'/%3E%3C/svg%3E")}.toast-warning{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512' width='576' height='512'%3E%3Cpath fill='rgb(255,255,255)' d='M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z'/%3E%3C/svg%3E")}.toast-container.toast-bottom-center .ngx-toastr,.toast-container.toast-top-center .ngx-toastr{width:300px;margin-left:auto;margin-right:auto}.toast-container.toast-bottom-full-width .ngx-toastr,.toast-container.toast-top-full-width .ngx-toastr{width:96%;margin-left:auto;margin-right:auto}.ngx-toastr{background-color:#030303;pointer-events:auto}.toast-success{background-color:#51a351}.toast-error{background-color:#bd362f}.toast-info{background-color:#2f96b4}.toast-warning{background-color:#f89406}.toast-progress{position:absolute;left:0;bottom:0;height:4px;background-color:#000;opacity:.4}@media (max-width:240px){.toast-container .ngx-toastr.div{padding:8px 8px 8px 50px;width:11em}.toast-container .toast-close-button{right:-.2em;top:-.2em}}@media (min-width:241px) and (max-width:480px){.toast-container .ngx-toastr.div{padding:8px 8px 8px 50px;width:18em}.toast-container .toast-close-button{right:-.2em;top:-.2em}}@media (min-width:481px) and (max-width:768px){.toast-container .ngx-toastr.div{padding:15px 15px 15px 50px;width:25em}}.tree-children.tree-children-no-padding{padding-left:0}.tree-children{overflow:hidden}.node-drop-slot{display:block;height:2px}.node-drop-slot.is-dragging-over{background:#dfe;height:20px;border:2px dotted #888}.toggle-children-wrapper-expanded .toggle-children{transform:rotate(90deg)}.toggle-children-wrapper-collapsed .toggle-children{transform:rotate(0)}.toggle-children-wrapper{padding:2px 3px 5px 1px}.toggle-children{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAASCAYAAABSO15qAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABAhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ1dWlkOjY1RTYzOTA2ODZDRjExREJBNkUyRDg4N0NFQUNCNDA3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkYzRkRFQjcxODUzNTExRTU4RTQwRkQwODFEOUZEMEE3IiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkYzRkRFQjcwODUzNTExRTU4RTQwRkQwODFEOUZEMEE3IiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE1IChNYWNpbnRvc2gpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MTk5NzA1OGEtZDI3OC00NDZkLWE4ODgtNGM4MGQ4YWI1NzNmIiBzdFJlZjpkb2N1bWVudElEPSJhZG9iZTpkb2NpZDpwaG90b3Nob3A6YzRkZmQxMGMtY2NlNS0xMTc4LWE5OGQtY2NkZmM5ODk5YWYwIi8+IDxkYzp0aXRsZT4gPHJkZjpBbHQ+IDxyZGY6bGkgeG1sOmxhbmc9IngtZGVmYXVsdCI+Z2x5cGhpY29uczwvcmRmOmxpPiA8L3JkZjpBbHQ+IDwvZGM6dGl0bGU+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+5iogFwAAAGhJREFUeNpiYGBgKABigf///zOQg0EARH4A4gZyDIIZ8B/JoAJKDIDhB0CcQIkBRBtEyABkgxwoMQCGD6AbRKoBGAYxQgXIBRuZGKgAKPIC3QLxArnRSHZCIjspk52ZKMrOFBUoAAEGAKnq593MQAZtAAAAAElFTkSuQmCC");height:8px;width:9px;background-size:contain;background-repeat:no-repeat;background-position:50%}.toggle-children,.toggle-children-placeholder{display:inline-block;position:relative;top:1px}.toggle-children-placeholder{height:10px;width:10px;padding-right:3px}.node-content-wrapper{display:inline-block;padding:2px 5px;border-radius:2px;transition:background-color .15s,box-shadow .15s}.node-wrapper{display:flex;align-items:flex-start}.node-content-wrapper-active,.node-content-wrapper-active.node-content-wrapper-focused,.node-content-wrapper.node-content-wrapper-active:hover{background:#beebff}.node-content-wrapper-focused{background:#e7f4f9}.node-content-wrapper:hover{background:#f7fbff}.node-content-wrapper-active,.node-content-wrapper-focused,.node-content-wrapper:hover{box-shadow:inset 0 0 1px #999}.node-content-wrapper.is-dragging-over{background:#dfe;box-shadow:inset 0 0 1px #999}.node-content-wrapper.is-dragging-over-disabled{opacity:.5}tree-viewport{-webkit-tap-highlight-color:transparent;height:100%;overflow:auto;display:block}.tree-children{padding-left:20px}.empty-tree-drop-slot .node-drop-slot{height:20px;min-width:100px}.angular-tree-component{width:100%;position:relative;display:inline-block;cursor:pointer;-webkit-touch-callout:none;user-select:none}tree-root .angular-tree-component-rtl{direction:rtl}tree-root .angular-tree-component-rtl .toggle-children-wrapper-collapsed .toggle-children{transform:rotate(180deg)!important}tree-root .angular-tree-component-rtl .tree-children{padding-right:20px;padding-left:0}tree-node-checkbox{padding:1px}:root{--gray-100:#f8f9fa;--gray-200:#e9ecef;--gray-300:#dee2e6;--gray-400:#ced4da;--gray-500:#adb5bd;--gray-600:#6c757d;--gray-700:#495057;--gray-800:#343a40;--gray-900:#212529;--black:#000;--barley-white:#fcecba;--fg-color-over-dark-bg:#fff;--fg-hover-color-over-dark-bg:#adb5bd;--body-color-bright:#f8f9fa;--body-bg:#fff;--body-color:#212529;--body-bg-alt:#e9ecef;--health-color-error:red;--health-color-healthy:#0b0;--health-color-warning:orange;--chart-color-red:#c9190b;--chart-color-blue:#06c;--chart-color-orange:#ef9234;--chart-color-yellow:#f6d173;--chart-color-green:#7cc674;--chart-color-gray:#ededed;--chart-color-cyan:#73c5c5;--chart-color-purple:#3c3d99;--chart-color-center-text:#151515;--chart-color-center-text-description:#72767b;--chart-color-tooltip-background:#000;--card-cap-bg:#f8f9fa;--grid-gutter-width:30px;--datatable-divider-color:rgba(0,0,0,0.09);--nav-tabs-margin-bottom:1rem;--tooltip-color:#fff;--tooltip-bg:#212529;--screen-sm-min:576px;--screen-md-min:768px;--screen-lg-min:992px;--screen-xl-min:1200px;--screen-xs-max:calc(576px - 1px);--screen-sm-max:calc(768px - 1px);--screen-md-max:calc(992px - 1px);--screen-lg-max:calc(1200px - 1px);--navbar-height:43px;--top-notification-height:37.6px;--blue:#007bff;--indigo:#6610f2;--purple:#6f42c1;--pink:#a94442;--red:#ef5c55;--orange:#fd7e14;--yellow:#ffc200;--green:#0b0;--teal:#20c997;--cyan:#17a2b8;--white:#fff;--gray:#6c757d;--gray-dark:#343a40;--primary:#2b99a8;--secondary:#374249;--success:#0b0;--info:#2b99a8;--warning:#ffc200;--danger:#ef5c55;--light:#f8f9fa;--dark:#777;--accent:#ef5c55;--warning-dark:#fd7e14;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--breakpoint-2xl:1450px;--font-family-sans-serif:"Helvetica Neue",Helvetica,Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}
+/*!
+ * Bootstrap v4.5.2 (https://getbootstrap.com/)
+ * Copyright 2011-2020 The Bootstrap Authors
+ * Copyright 2011-2020 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ */*,:after,:before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:Helvetica Neue,Helvetica,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0!important}hr{box-sizing:initial;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;text-decoration:underline dotted;cursor:help;border-bottom:0;text-decoration-skip-ink:none}address{font-style:normal;line-height:inherit}address,dl,ol,ul{margin-bottom:1rem}dl,ol,ul{margin-top:0}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}a{color:#2b99a8;text-decoration:none;background-color:initial}a:hover{color:#1b626b;text-decoration:underline}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{border-style:none}img,svg{vertical-align:middle}svg{overflow:hidden}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:initial}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:2.5rem}.h2,h2{font-size:2rem}.h3,h3{font-size:1.75rem}.h4,h4{font-size:1.5rem}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:6rem}.display-1,.display-2{font-weight:300;line-height:1.2}.display-2{font-size:5.5rem}.display-3{font-size:4.5rem}.display-3,.display-4{font-weight:300;line-height:1.2}.display-4{font-size:3.5rem}hr{margin-top:1rem;margin-bottom:1rem;border:0;border-top:1px solid rgba(0,0,0,.1)}.small,small{font-size:80%;font-weight:400}.mark,mark{padding:.2em;background-color:#fcf8e3}.list-inline,.list-unstyled{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:90%;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote-footer{display:block;font-size:80%;color:#6c757d}.blockquote-footer:before{content:"— "}.img-fluid,.img-thumbnail{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:#fff;border:1px solid #dee2e6;border-radius:.25rem}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:90%;color:#6c757d}code{font-size:87.5%;color:#a94442;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:87.5%;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:100%;font-weight:700}pre{display:block;font-size:87.5%;color:#212529}pre code{font-size:inherit;color:inherit;word-break:normal}.pre-scrollable{max-height:340px;overflow-y:scroll}.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:576px){.container,.container-sm{max-width:540px}}@media (min-width:768px){.container,.container-md,.container-sm{max-width:720px}}@media (min-width:992px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media (min-width:1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1140px}}.row,cd-about dl{display:flex;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}.no-gutters{margin-right:0;margin-left:0}.no-gutters>.col,.no-gutters>[class*=col-]{padding-right:0;padding-left:0}.cd-col-form,.cd-col-form-input,.cd-col-form-label,.cd-col-form-offset,.col,.col-1,.col-2,.col-2xl,.col-2xl-1,.col-2xl-2,.col-2xl-3,.col-2xl-4,.col-2xl-5,.col-2xl-6,.col-2xl-7,.col-2xl-8,.col-2xl-9,.col-2xl-10,.col-2xl-11,.col-2xl-12,.col-2xl-auto,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-10,.col-11,.col-12,.col-auto,.col-lg,.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-auto,.col-md,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-md-auto,.col-sm,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-auto,.col-xl,.col-xl-1,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-auto,cd-about dd,cd-about dt,cd-health cd-info-card,cd-health cd-info-card.cd-capacity-card,cd-health cd-info-card.cd-chart-card,cd-health cd-info-card.cd-performance-card,cd-health cd-info-card.cd-status-card,cd-modal .cd-col-form-input,cd-modal .cd-col-form-label,cd-modal .cd-col-form-offset{position:relative;width:100%;padding-right:15px;padding-left:15px}.col{flex-basis:0;flex-grow:1;max-width:100%}.row-cols-1>*{flex:0 0 100%;max-width:100%}.row-cols-2>*{flex:0 0 50%;max-width:50%}.row-cols-3>*{flex:0 0 33.3333333333%;max-width:33.3333333333%}.row-cols-4>*{flex:0 0 25%;max-width:25%}.row-cols-5>*{flex:0 0 20%;max-width:20%}.row-cols-6>*{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-auto{flex:0 0 auto;width:auto;max-width:100%}.col-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-3{flex:0 0 25%;max-width:25%}.col-4,cd-about dt{flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.col-6{flex:0 0 50%;max-width:50%}.col-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.col-8,cd-about dd{flex:0 0 66.6666666667%;max-width:66.6666666667%}.col-9{flex:0 0 75%;max-width:75%}.col-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.cd-col-form,.col-12,cd-health cd-info-card{flex:0 0 100%;max-width:100%}.order-first{order:-1}.order-last{order:13}.order-0{order:0}.order-1{order:1}.order-2{order:2}.order-3{order:3}.order-4{order:4}.order-5{order:5}.order-6{order:6}.order-7{order:7}.order-8{order:8}.order-9{order:9}.order-10{order:10}.order-11{order:11}.order-12{order:12}.offset-1{margin-left:8.3333333333%}.offset-2{margin-left:16.6666666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.3333333333%}.offset-5{margin-left:41.6666666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.3333333333%}.offset-8{margin-left:66.6666666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.3333333333%}.offset-11{margin-left:91.6666666667%}@media (min-width:576px){.col-sm{flex-basis:0;flex-grow:1;max-width:100%}.row-cols-sm-1>*{flex:0 0 100%;max-width:100%}.row-cols-sm-2>*{flex:0 0 50%;max-width:50%}.row-cols-sm-3>*{flex:0 0 33.3333333333%;max-width:33.3333333333%}.row-cols-sm-4>*{flex:0 0 25%;max-width:25%}.row-cols-sm-5>*{flex:0 0 20%;max-width:20%}.row-cols-sm-6>*{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-sm-auto{flex:0 0 auto;width:auto;max-width:100%}.col-sm-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-sm-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-sm-3{flex:0 0 25%;max-width:25%}.cd-col-form-label,.col-sm-4{flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-sm-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.col-sm-6{flex:0 0 50%;max-width:50%}.col-sm-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.cd-col-form-input,.cd-col-form-offset,.col-sm-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.col-sm-9{flex:0 0 75%;max-width:75%}.col-sm-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-sm-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.col-sm-12,cd-health cd-info-card{flex:0 0 100%;max-width:100%}.order-sm-first{order:-1}.order-sm-last{order:13}.order-sm-0{order:0}.order-sm-1{order:1}.order-sm-2{order:2}.order-sm-3{order:3}.order-sm-4{order:4}.order-sm-5{order:5}.order-sm-6{order:6}.order-sm-7{order:7}.order-sm-8{order:8}.order-sm-9{order:9}.order-sm-10{order:10}.order-sm-11{order:11}.order-sm-12{order:12}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.3333333333%}.offset-sm-2{margin-left:16.6666666667%}.offset-sm-3{margin-left:25%}.cd-col-form-offset,.offset-sm-4{margin-left:33.3333333333%}.offset-sm-5{margin-left:41.6666666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.3333333333%}.offset-sm-8{margin-left:66.6666666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.3333333333%}.offset-sm-11{margin-left:91.6666666667%}}@media (min-width:768px){.col-md{flex-basis:0;flex-grow:1;max-width:100%}.row-cols-md-1>*{flex:0 0 100%;max-width:100%}.row-cols-md-2>*{flex:0 0 50%;max-width:50%}.row-cols-md-3>*{flex:0 0 33.3333333333%;max-width:33.3333333333%}.row-cols-md-4>*{flex:0 0 25%;max-width:25%}.row-cols-md-5>*{flex:0 0 20%;max-width:20%}.row-cols-md-6>*{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-md-auto{flex:0 0 auto;width:auto;max-width:100%}.col-md-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-md-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-md-3{flex:0 0 25%;max-width:25%}.cd-col-form-label,.col-md-4{flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-md-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.col-md-6,cd-health cd-info-card{flex:0 0 50%;max-width:50%}.col-md-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.cd-col-form-input,.cd-col-form-offset,.col-md-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.col-md-9{flex:0 0 75%;max-width:75%}.col-md-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-md-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.col-md-12,cd-health cd-info-card.cd-chart-card{flex:0 0 100%;max-width:100%}.order-md-first{order:-1}.order-md-last{order:13}.order-md-0{order:0}.order-md-1{order:1}.order-md-2{order:2}.order-md-3{order:3}.order-md-4{order:4}.order-md-5{order:5}.order-md-6{order:6}.order-md-7{order:7}.order-md-8{order:8}.order-md-9{order:9}.order-md-10{order:10}.order-md-11{order:11}.order-md-12{order:12}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.3333333333%}.offset-md-2{margin-left:16.6666666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.3333333333%}.offset-md-5{margin-left:41.6666666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.3333333333%}.offset-md-8{margin-left:66.6666666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.3333333333%}.offset-md-11{margin-left:91.6666666667%}}@media (min-width:992px){.col-lg{flex-basis:0;flex-grow:1;max-width:100%}.row-cols-lg-1>*{flex:0 0 100%;max-width:100%}.row-cols-lg-2>*{flex:0 0 50%;max-width:50%}.row-cols-lg-3>*{flex:0 0 33.3333333333%;max-width:33.3333333333%}.row-cols-lg-4>*{flex:0 0 25%;max-width:25%}.row-cols-lg-5>*{flex:0 0 20%;max-width:20%}.row-cols-lg-6>*{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-lg-auto{flex:0 0 auto;width:auto;max-width:100%}.col-lg-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-lg-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.cd-col-form-label,.col-lg-3,cd-health cd-info-card.cd-capacity-card{flex:0 0 25%;max-width:25%}.col-lg-4,cd-health cd-info-card,cd-modal .cd-col-form-label{flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-lg-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.col-lg-6,cd-health cd-info-card.cd-chart-card,cd-health cd-info-card.cd-performance-card{flex:0 0 50%;max-width:50%}.col-lg-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.cd-col-form,.col-lg-8,cd-modal .cd-col-form-input,cd-modal .cd-col-form-offset{flex:0 0 66.6666666667%;max-width:66.6666666667%}.cd-col-form-input,.cd-col-form-offset,.col-lg-9{flex:0 0 75%;max-width:75%}.col-lg-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-lg-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.col-lg-12{flex:0 0 100%;max-width:100%}.order-lg-first{order:-1}.order-lg-last{order:13}.order-lg-0{order:0}.order-lg-1{order:1}.order-lg-2{order:2}.order-lg-3{order:3}.order-lg-4{order:4}.order-lg-5{order:5}.order-lg-6{order:6}.order-lg-7{order:7}.order-lg-8{order:8}.order-lg-9{order:9}.order-lg-10{order:10}.order-lg-11{order:11}.order-lg-12{order:12}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.3333333333%}.offset-lg-2{margin-left:16.6666666667%}.cd-col-form-offset,.offset-lg-3{margin-left:25%}.offset-lg-4,cd-modal .cd-col-form-offset{margin-left:33.3333333333%}.offset-lg-5{margin-left:41.6666666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.3333333333%}.offset-lg-8{margin-left:66.6666666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.3333333333%}.offset-lg-11{margin-left:91.6666666667%}}@media (min-width:1200px){.col-xl,cd-health cd-info-card.cd-capacity-card,cd-health cd-info-card.cd-performance-card{flex-basis:0;flex-grow:1;max-width:100%}.row-cols-xl-1>*{flex:0 0 100%;max-width:100%}.row-cols-xl-2>*{flex:0 0 50%;max-width:50%}.row-cols-xl-3>*{flex:0 0 33.3333333333%;max-width:33.3333333333%}.row-cols-xl-4>*{flex:0 0 25%;max-width:25%}.row-cols-xl-5>*{flex:0 0 20%;max-width:20%}.row-cols-xl-6>*{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-xl-auto{flex:0 0 auto;width:auto;max-width:100%}.col-xl-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-xl-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-xl-3,cd-health cd-info-card.cd-status-card{flex:0 0 25%;max-width:25%}.col-xl-4,cd-health cd-info-card.cd-chart-card{flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-xl-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.cd-col-form,.col-xl-6{flex:0 0 50%;max-width:50%}.col-xl-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.col-xl-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.col-xl-9{flex:0 0 75%;max-width:75%}.col-xl-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-xl-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.col-xl-12{flex:0 0 100%;max-width:100%}.order-xl-first{order:-1}.order-xl-last{order:13}.order-xl-0{order:0}.order-xl-1{order:1}.order-xl-2{order:2}.order-xl-3{order:3}.order-xl-4{order:4}.order-xl-5{order:5}.order-xl-6{order:6}.order-xl-7{order:7}.order-xl-8{order:8}.order-xl-9{order:9}.order-xl-10{order:10}.order-xl-11{order:11}.order-xl-12{order:12}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.3333333333%}.offset-xl-2{margin-left:16.6666666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.3333333333%}.offset-xl-5{margin-left:41.6666666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.3333333333%}.offset-xl-8{margin-left:66.6666666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.3333333333%}.offset-xl-11{margin-left:91.6666666667%}}@media (min-width:1450px){.col-2xl{flex-basis:0;flex-grow:1;max-width:100%}.row-cols-2xl-1>*{flex:0 0 100%;max-width:100%}.row-cols-2xl-2>*{flex:0 0 50%;max-width:50%}.row-cols-2xl-3>*{flex:0 0 33.3333333333%;max-width:33.3333333333%}.row-cols-2xl-4>*{flex:0 0 25%;max-width:25%}.row-cols-2xl-5>*{flex:0 0 20%;max-width:20%}.row-cols-2xl-6>*{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-2xl-auto{flex:0 0 auto;width:auto;max-width:100%}.col-2xl-1{flex:0 0 8.3333333333%;max-width:8.3333333333%}.col-2xl-2{flex:0 0 16.6666666667%;max-width:16.6666666667%}.col-2xl-3,cd-health cd-info-card.cd-chart-card{flex:0 0 25%;max-width:25%}.col-2xl-4{flex:0 0 33.3333333333%;max-width:33.3333333333%}.col-2xl-5{flex:0 0 41.6666666667%;max-width:41.6666666667%}.col-2xl-6{flex:0 0 50%;max-width:50%}.col-2xl-7{flex:0 0 58.3333333333%;max-width:58.3333333333%}.col-2xl-8{flex:0 0 66.6666666667%;max-width:66.6666666667%}.col-2xl-9{flex:0 0 75%;max-width:75%}.col-2xl-10{flex:0 0 83.3333333333%;max-width:83.3333333333%}.col-2xl-11{flex:0 0 91.6666666667%;max-width:91.6666666667%}.col-2xl-12{flex:0 0 100%;max-width:100%}.order-2xl-first{order:-1}.order-2xl-last{order:13}.order-2xl-0{order:0}.order-2xl-1{order:1}.order-2xl-2{order:2}.order-2xl-3{order:3}.order-2xl-4{order:4}.order-2xl-5{order:5}.order-2xl-6{order:6}.order-2xl-7{order:7}.order-2xl-8{order:8}.order-2xl-9{order:9}.order-2xl-10{order:10}.order-2xl-11{order:11}.order-2xl-12{order:12}.offset-2xl-0{margin-left:0}.offset-2xl-1{margin-left:8.3333333333%}.offset-2xl-2{margin-left:16.6666666667%}.offset-2xl-3{margin-left:25%}.offset-2xl-4{margin-left:33.3333333333%}.offset-2xl-5{margin-left:41.6666666667%}.offset-2xl-6{margin-left:50%}.offset-2xl-7{margin-left:58.3333333333%}.offset-2xl-8{margin-left:66.6666666667%}.offset-2xl-9{margin-left:75%}.offset-2xl-10{margin-left:83.3333333333%}.offset-2xl-11{margin-left:91.6666666667%}}.table{width:100%;margin-bottom:1rem;color:#212529}.table td,.table th{padding:.75rem;vertical-align:top;border-top:1px solid #dee2e6}.table thead th{vertical-align:bottom;border-bottom:2px solid #dee2e6}.table tbody+tbody{border-top:2px solid #dee2e6}.table-sm td,.table-sm th{padding:.3rem}.table-bordered,.table-bordered td,.table-bordered th{border:1px solid #dee2e6}.table-bordered thead td,.table-bordered thead th{border-bottom-width:2px}.table-borderless tbody+tbody,.table-borderless td,.table-borderless th,.table-borderless thead th{border:0}.table-striped tbody tr:nth-of-type(odd){background-color:rgba(0,0,0,.05)}.table-hover tbody tr:hover{color:#212529;background-color:rgba(0,0,0,.075)}.table-primary,.table-primary>td,.table-primary>th{background-color:#c4e2e7}.table-primary tbody+tbody,.table-primary td,.table-primary th,.table-primary thead th{border-color:#91cad2}.table-hover .table-primary:hover,.table-hover .table-primary:hover>td,.table-hover .table-primary:hover>th{background-color:#b2d9e0}.table-secondary,.table-secondary>td,.table-secondary>th{background-color:#c7cacc}.table-secondary tbody+tbody,.table-secondary td,.table-secondary th,.table-secondary thead th{border-color:#979da0}.table-hover .table-secondary:hover,.table-hover .table-secondary:hover>td,.table-hover .table-secondary:hover>th{background-color:#babdc0}.table-success,.table-success>td,.table-success>th{background-color:#b8ecb8}.table-success tbody+tbody,.table-success td,.table-success th,.table-success thead th{border-color:#7adc7a}.table-hover .table-success:hover,.table-hover .table-success:hover>td,.table-hover .table-success:hover>th{background-color:#a4e7a4}.table-info,.table-info>td,.table-info>th{background-color:#c4e2e7}.table-info tbody+tbody,.table-info td,.table-info th,.table-info thead th{border-color:#91cad2}.table-hover .table-info:hover,.table-hover .table-info:hover>td,.table-hover .table-info:hover>th{background-color:#b2d9e0}.table-warning,.table-warning>td,.table-warning>th{background-color:#ffeeb8}.table-warning tbody+tbody,.table-warning td,.table-warning th,.table-warning thead th{border-color:#ffdf7a}.table-hover .table-warning:hover,.table-hover .table-warning:hover>td,.table-hover .table-warning:hover>th{background-color:#ffe89f}.table-danger,.table-danger>td,.table-danger>th{background-color:#fbd1cf}.table-danger tbody+tbody,.table-danger td,.table-danger th,.table-danger thead th{border-color:#f7aaa7}.table-hover .table-danger:hover,.table-hover .table-danger:hover>td,.table-hover .table-danger:hover>th{background-color:#f9bab7}.table-light,.table-light>td,.table-light>th{background-color:#fdfdfe}.table-light tbody+tbody,.table-light td,.table-light th,.table-light thead th{border-color:#fbfcfc}.table-hover .table-light:hover,.table-hover .table-light:hover>td,.table-hover .table-light:hover>th{background-color:#ececf6}.table-dark,.table-dark>td,.table-dark>th{background-color:#d9d9d9}.table-dark tbody+tbody,.table-dark td,.table-dark th,.table-dark thead th{border-color:#b8b8b8}.table-hover .table-dark:hover,.table-hover .table-dark:hover>td,.table-hover .table-dark:hover>th{background-color:#ccc}.table-accent,.table-accent>td,.table-accent>th{background-color:#fbd1cf}.table-accent tbody+tbody,.table-accent td,.table-accent th,.table-accent thead th{border-color:#f7aaa7}.table-hover .table-accent:hover,.table-hover .table-accent:hover>td,.table-hover .table-accent:hover>th{background-color:#f9bab7}.table-warning-dark,.table-warning-dark>td,.table-warning-dark>th{background-color:#fedbbd}.table-warning-dark tbody+tbody,.table-warning-dark td,.table-warning-dark th,.table-warning-dark thead th{border-color:#febc85}.table-hover .table-warning-dark:hover,.table-hover .table-warning-dark:hover>td,.table-hover .table-warning-dark:hover>th{background-color:#fecda4}.table-active,.table-active>td,.table-active>th,.table-hover .table-active:hover,.table-hover .table-active:hover>td,.table-hover .table-active:hover>th{background-color:rgba(0,0,0,.075)}.table .thead-dark th{color:#fff;background-color:#343a40;border-color:#454d55}.table .thead-light th{color:#495057;background-color:#e9ecef;border-color:#dee2e6}.table-dark{color:#fff;background-color:#343a40}.table-dark td,.table-dark th,.table-dark thead th{border-color:#454d55}.table-dark.table-bordered{border:0}.table-dark.table-striped tbody tr:nth-of-type(odd){background-color:hsla(0,0%,100%,.05)}.table-dark.table-hover tbody tr:hover{color:#fff;background-color:hsla(0,0%,100%,.075)}@media (max-width:575.98px){.table-responsive-sm{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-sm>.table-bordered{border:0}}@media (max-width:767.98px){.table-responsive-md{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-md>.table-bordered{border:0}}@media (max-width:991.98px){.table-responsive-lg{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-lg>.table-bordered{border:0}}@media (max-width:1199.98px){.table-responsive-xl{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-xl>.table-bordered{border:0}}@media (max-width:1449.98px){.table-responsive-2xl{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-2xl>.table-bordered{border:0}}.table-responsive{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive>.table-bordered{border:0}.cd-form-control,.form-control{display:block;width:100%;height:calc(1.5em + .75rem + 2px);padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;border-radius:.25rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.cd-form-control,.form-control{transition:none}}.cd-form-control::-ms-expand,.form-control::-ms-expand{background-color:initial;border:0}.cd-form-control:-moz-focusring,.form-control:-moz-focusring{color:transparent;text-shadow:0 0 0 #495057}.cd-form-control:focus,.form-control:focus{color:#495057;background-color:#fff;border-color:#76d0dc;box-shadow:0 0 0 .2rem rgba(43,153,168,.25)}.cd-form-control::placeholder,.form-control::placeholder{color:#6c757d;opacity:1}.cd-form-control:disabled,.form-control:disabled,.form-control[readonly],[readonly].cd-form-control{background-color:#e9ecef;opacity:1}input[type=date].cd-form-control,input[type=date].form-control,input[type=datetime-local].cd-form-control,input[type=datetime-local].form-control,input[type=month].cd-form-control,input[type=month].form-control,input[type=time].cd-form-control,input[type=time].form-control{-moz-appearance:none;appearance:none}select.cd-form-control:focus::-ms-value,select.form-control:focus::-ms-value{color:#495057;background-color:#fff}.form-control-file,.form-control-range{display:block;width:100%}.cd-col-form-label,.col-form-label{padding-top:calc(.375rem + 1px);padding-bottom:calc(.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(.5rem + 1px);padding-bottom:calc(.5rem + 1px);font-size:1.25rem;line-height:1.5}.col-form-label-sm{padding-top:calc(.25rem + 1px);padding-bottom:calc(.25rem + 1px);font-size:.875rem;line-height:1.5}.form-control-plaintext{display:block;width:100%;padding:.375rem 0;margin-bottom:0;font-size:1rem;line-height:1.5;color:#212529;background-color:initial;border:solid transparent;border-width:1px 0}.form-control-plaintext.form-control-lg,.form-control-plaintext.form-control-sm{padding-right:0;padding-left:0}.form-control-sm{height:calc(1.5em + .5rem + 2px);padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.form-control-lg{height:calc(1.5em + 1rem + 2px);padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}select.form-control[multiple],select.form-control[size],select[multiple].cd-form-control,select[size].cd-form-control,textarea.cd-form-control,textarea.form-control{height:auto}.form-group{margin-bottom:1rem}.form-text{display:block;margin-top:.25rem}.form-row{display:flex;flex-wrap:wrap;margin-right:-5px;margin-left:-5px}.form-row>.col,.form-row>[class*=col-]{padding-right:5px;padding-left:5px}.form-check{position:relative;display:block;padding-left:1.25rem}.form-check-input{position:absolute;margin-top:.3rem;margin-left:-1.25rem}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{color:#6c757d}.form-check-label{margin-bottom:0}.form-check-inline{display:inline-flex;align-items:center;padding-left:0;margin-right:.75rem}.form-check-inline .form-check-input{position:static;margin-top:0;margin-right:.3125rem;margin-left:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:100%;color:#0b0}.valid-tooltip{position:absolute;top:100%;left:0;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(0,187,0,.9);border-radius:.25rem}.is-valid~.valid-feedback,.is-valid~.valid-tooltip,.was-validated :valid~.valid-feedback,.was-validated :valid~.valid-tooltip{display:block}.form-control.is-valid,.is-valid.cd-form-control,.was-validated .cd-form-control:valid,.was-validated .form-control:valid{border-color:#0b0;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%230b0' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-valid:focus,.is-valid.cd-form-control:focus,.was-validated .cd-form-control:valid:focus,.was-validated .form-control:valid:focus{border-color:#0b0;box-shadow:0 0 0 .2rem rgba(0,187,0,.25)}.was-validated textarea.cd-form-control:valid,.was-validated textarea.form-control:valid,textarea.form-control.is-valid,textarea.is-valid.cd-form-control{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.custom-select.is-valid,.was-validated .custom-select:valid{border-color:#0b0;padding-right:calc(.75em + 2.3125rem);background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px,url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%230b0' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e") #fff no-repeat center right 1.75rem/calc(.75em + .375rem) calc(.75em + .375rem)}.custom-select.is-valid:focus,.was-validated .custom-select:valid:focus{border-color:#0b0;box-shadow:0 0 0 .2rem rgba(0,187,0,.25)}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:#0b0}.form-check-input.is-valid~.valid-feedback,.form-check-input.is-valid~.valid-tooltip,.was-validated .form-check-input:valid~.valid-feedback,.was-validated .form-check-input:valid~.valid-tooltip{display:block}.custom-control-input.is-valid~.custom-control-label,.was-validated .custom-control-input:valid~.custom-control-label{color:#0b0}.custom-control-input.is-valid~.custom-control-label:before,.was-validated .custom-control-input:valid~.custom-control-label:before{border-color:#0b0}.custom-control-input.is-valid:checked~.custom-control-label:before,.was-validated .custom-control-input:valid:checked~.custom-control-label:before{border-color:#0e0;background-color:#0e0}.custom-control-input.is-valid:focus~.custom-control-label:before,.was-validated .custom-control-input:valid:focus~.custom-control-label:before{box-shadow:0 0 0 .2rem rgba(0,187,0,.25)}.custom-control-input.is-valid:focus:not(:checked)~.custom-control-label:before,.custom-file-input.is-valid~.custom-file-label,.was-validated .custom-control-input:valid:focus:not(:checked)~.custom-control-label:before,.was-validated .custom-file-input:valid~.custom-file-label{border-color:#0b0}.custom-file-input.is-valid:focus~.custom-file-label,.was-validated .custom-file-input:valid:focus~.custom-file-label{border-color:#0b0;box-shadow:0 0 0 .2rem rgba(0,187,0,.25)}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:100%;color:#ef5c55}.invalid-tooltip{position:absolute;top:100%;left:0;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(239,92,85,.9);border-radius:.25rem}.is-invalid~.invalid-feedback,.is-invalid~.invalid-tooltip,.was-validated :invalid~.invalid-feedback,.was-validated :invalid~.invalid-tooltip{display:block}.form-control.is-invalid,.is-invalid.cd-form-control,.was-validated .cd-form-control:invalid,.was-validated .form-control:invalid{border-color:#ef5c55;padding-right:calc(1.5em + .75rem);background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23ef5c55' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23ef5c55' stroke='none'/%3e%3c/svg%3e");background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-invalid:focus,.is-invalid.cd-form-control:focus,.was-validated .cd-form-control:invalid:focus,.was-validated .form-control:invalid:focus{border-color:#ef5c55;box-shadow:0 0 0 .2rem rgba(239,92,85,.25)}.was-validated textarea.cd-form-control:invalid,.was-validated textarea.form-control:invalid,textarea.form-control.is-invalid,textarea.is-invalid.cd-form-control{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.custom-select.is-invalid,.was-validated .custom-select:invalid{border-color:#ef5c55;padding-right:calc(.75em + 2.3125rem);background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px,url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23ef5c55' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23ef5c55' stroke='none'/%3e%3c/svg%3e") #fff no-repeat center right 1.75rem/calc(.75em + .375rem) calc(.75em + .375rem)}.custom-select.is-invalid:focus,.was-validated .custom-select:invalid:focus{border-color:#ef5c55;box-shadow:0 0 0 .2rem rgba(239,92,85,.25)}.form-check-input.is-invalid~.form-check-label,.was-validated .form-check-input:invalid~.form-check-label{color:#ef5c55}.form-check-input.is-invalid~.invalid-feedback,.form-check-input.is-invalid~.invalid-tooltip,.was-validated .form-check-input:invalid~.invalid-feedback,.was-validated .form-check-input:invalid~.invalid-tooltip{display:block}.custom-control-input.is-invalid~.custom-control-label,.was-validated .custom-control-input:invalid~.custom-control-label{color:#ef5c55}.custom-control-input.is-invalid~.custom-control-label:before,.was-validated .custom-control-input:invalid~.custom-control-label:before{border-color:#ef5c55}.custom-control-input.is-invalid:checked~.custom-control-label:before,.was-validated .custom-control-input:invalid:checked~.custom-control-label:before{border-color:#f38984;background-color:#f38984}.custom-control-input.is-invalid:focus~.custom-control-label:before,.was-validated .custom-control-input:invalid:focus~.custom-control-label:before{box-shadow:0 0 0 .2rem rgba(239,92,85,.25)}.custom-control-input.is-invalid:focus:not(:checked)~.custom-control-label:before,.custom-file-input.is-invalid~.custom-file-label,.was-validated .custom-control-input:invalid:focus:not(:checked)~.custom-control-label:before,.was-validated .custom-file-input:invalid~.custom-file-label{border-color:#ef5c55}.custom-file-input.is-invalid:focus~.custom-file-label,.was-validated .custom-file-input:invalid:focus~.custom-file-label{border-color:#ef5c55;box-shadow:0 0 0 .2rem rgba(239,92,85,.25)}.form-inline{display:flex;flex-flow:row wrap;align-items:center}.form-inline .form-check{width:100%}@media (min-width:576px){.form-inline label{justify-content:center}.form-inline .form-group,.form-inline label{display:flex;align-items:center;margin-bottom:0}.form-inline .form-group{flex:0 0 auto;flex-flow:row wrap}.form-inline .cd-form-control,.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-plaintext{display:inline-block}.form-inline .custom-select,.form-inline .input-group{width:auto}.form-inline .form-check{display:flex;align-items:center;justify-content:center;width:auto;padding-left:0}.form-inline .form-check-input{position:relative;flex-shrink:0;margin-top:0;margin-right:.25rem;margin-left:0}.form-inline .custom-control{align-items:center;justify-content:center}.form-inline .custom-control-label{margin-bottom:0}}.btn{display:inline-block;font-weight:400;color:#212529;text-align:center;vertical-align:middle;user-select:none;background-color:initial;border:1px solid transparent;padding:.375rem .75rem;font-size:1rem;line-height:1.5;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.btn{transition:none}}.btn:hover{color:#212529;text-decoration:none}.btn.focus,.btn:focus{outline:0;box-shadow:0 0 0 .2rem rgba(43,153,168,.25)}.btn.disabled,.btn:disabled{opacity:.65}.btn:not(:disabled):not(.disabled){cursor:pointer}a.btn.disabled,fieldset:disabled a.btn{pointer-events:none}.btn-primary{color:#fff;background-color:#2b99a8;border-color:#2b99a8}.btn-primary.focus,.btn-primary:focus,.btn-primary:hover{color:#fff;background-color:#237d8a;border-color:#21747f}.btn-primary.focus,.btn-primary:focus{box-shadow:0 0 0 .2rem rgba(75,168,181,.5)}.btn-primary.disabled,.btn-primary:disabled{color:#fff;background-color:#2b99a8;border-color:#2b99a8}.btn-primary:not(:disabled):not(.disabled).active,.btn-primary:not(:disabled):not(.disabled):active,.show>.btn-primary.dropdown-toggle{color:#fff;background-color:#21747f;border-color:#1e6b75}.btn-primary:not(:disabled):not(.disabled).active:focus,.btn-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(75,168,181,.5)}.btn-secondary{color:#fff;background-color:#374249;border-color:#374249}.btn-secondary.focus,.btn-secondary:focus,.btn-secondary:hover{color:#fff;background-color:#272e33;border-color:#21282c}.btn-secondary.focus,.btn-secondary:focus{box-shadow:0 0 0 .2rem rgba(85,94,100,.5)}.btn-secondary.disabled,.btn-secondary:disabled{color:#fff;background-color:#374249;border-color:#374249}.btn-secondary:not(:disabled):not(.disabled).active,.btn-secondary:not(:disabled):not(.disabled):active,.show>.btn-secondary.dropdown-toggle{color:#fff;background-color:#21282c;border-color:#1c2125}.btn-secondary:not(:disabled):not(.disabled).active:focus,.btn-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(85,94,100,.5)}.btn-success{color:#fff;background-color:#0b0;border-color:#0b0}.btn-success.focus,.btn-success:focus,.btn-success:hover{color:#fff;background-color:#009500;border-color:#080}.btn-success.focus,.btn-success:focus{box-shadow:0 0 0 .2rem rgba(38,197,38,.5)}.btn-success.disabled,.btn-success:disabled{color:#fff;background-color:#0b0;border-color:#0b0}.btn-success:not(:disabled):not(.disabled).active,.btn-success:not(:disabled):not(.disabled):active,.show>.btn-success.dropdown-toggle{color:#fff;background-color:#080;border-color:#007b00}.btn-success:not(:disabled):not(.disabled).active:focus,.btn-success:not(:disabled):not(.disabled):active:focus,.show>.btn-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(38,197,38,.5)}.btn-info{color:#fff;background-color:#2b99a8;border-color:#2b99a8}.btn-info.focus,.btn-info:focus,.btn-info:hover{color:#fff;background-color:#237d8a;border-color:#21747f}.btn-info.focus,.btn-info:focus{box-shadow:0 0 0 .2rem rgba(75,168,181,.5)}.btn-info.disabled,.btn-info:disabled{color:#fff;background-color:#2b99a8;border-color:#2b99a8}.btn-info:not(:disabled):not(.disabled).active,.btn-info:not(:disabled):not(.disabled):active,.show>.btn-info.dropdown-toggle{color:#fff;background-color:#21747f;border-color:#1e6b75}.btn-info:not(:disabled):not(.disabled).active:focus,.btn-info:not(:disabled):not(.disabled):active:focus,.show>.btn-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(75,168,181,.5)}.btn-warning{color:#212529;background-color:#ffc200;border-color:#ffc200}.btn-warning.focus,.btn-warning:focus,.btn-warning:hover{color:#212529;background-color:#d9a500;border-color:#cc9b00}.btn-warning.focus,.btn-warning:focus{box-shadow:0 0 0 .2rem rgba(222,170,6,.5)}.btn-warning.disabled,.btn-warning:disabled{color:#212529;background-color:#ffc200;border-color:#ffc200}.btn-warning:not(:disabled):not(.disabled).active,.btn-warning:not(:disabled):not(.disabled):active,.show>.btn-warning.dropdown-toggle{color:#212529;background-color:#cc9b00;border-color:#bf9200}.btn-warning:not(:disabled):not(.disabled).active:focus,.btn-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(222,170,6,.5)}.btn-danger{color:#fff;background-color:#ef5c55;border-color:#ef5c55}.btn-danger.focus,.btn-danger:focus,.btn-danger:hover{color:#fff;background-color:#ec3a32;border-color:#eb2f26}.btn-danger.focus,.btn-danger:focus{box-shadow:0 0 0 .2rem rgba(241,116,111,.5)}.btn-danger.disabled,.btn-danger:disabled{color:#fff;background-color:#ef5c55;border-color:#ef5c55}.btn-danger:not(:disabled):not(.disabled).active,.btn-danger:not(:disabled):not(.disabled):active,.show>.btn-danger.dropdown-toggle{color:#fff;background-color:#eb2f26;border-color:#ea241b}.btn-danger:not(:disabled):not(.disabled).active:focus,.btn-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(241,116,111,.5)}.btn-light{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light.focus,.btn-light:focus,.btn-light:hover{color:#212529;background-color:#e2e6ea;border-color:#dae0e5}.btn-light.focus,.btn-light:focus{box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}.btn-light.disabled,.btn-light:disabled{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:not(:disabled):not(.disabled).active,.btn-light:not(:disabled):not(.disabled):active,.show>.btn-light.dropdown-toggle{color:#212529;background-color:#dae0e5;border-color:#d3d9df}.btn-light:not(:disabled):not(.disabled).active:focus,.btn-light:not(:disabled):not(.disabled):active:focus,.show>.btn-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}.btn-dark{color:#fff;background-color:#777;border-color:#777}.btn-dark.focus,.btn-dark:focus,.btn-dark:hover{color:#fff;background-color:#646464;border-color:#5e5e5e}.btn-dark.focus,.btn-dark:focus{box-shadow:0 0 0 .2rem hsla(0,0%,54.5%,.5)}.btn-dark.disabled,.btn-dark:disabled{color:#fff;background-color:#777;border-color:#777}.btn-dark:not(:disabled):not(.disabled).active,.btn-dark:not(:disabled):not(.disabled):active,.show>.btn-dark.dropdown-toggle{color:#fff;background-color:#5e5e5e;border-color:#575757}.btn-dark:not(:disabled):not(.disabled).active:focus,.btn-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem hsla(0,0%,54.5%,.5)}.btn-accent{color:#fff;background-color:#ef5c55;border-color:#ef5c55}.btn-accent.focus,.btn-accent:focus,.btn-accent:hover{color:#fff;background-color:#ec3a32;border-color:#eb2f26}.btn-accent.focus,.btn-accent:focus{box-shadow:0 0 0 .2rem rgba(241,116,111,.5)}.btn-accent.disabled,.btn-accent:disabled{color:#fff;background-color:#ef5c55;border-color:#ef5c55}.btn-accent:not(:disabled):not(.disabled).active,.btn-accent:not(:disabled):not(.disabled):active,.show>.btn-accent.dropdown-toggle{color:#fff;background-color:#eb2f26;border-color:#ea241b}.btn-accent:not(:disabled):not(.disabled).active:focus,.btn-accent:not(:disabled):not(.disabled):active:focus,.show>.btn-accent.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(241,116,111,.5)}.btn-warning-dark{color:#212529;background-color:#fd7e14;border-color:#fd7e14}.btn-warning-dark.focus,.btn-warning-dark:focus,.btn-warning-dark:hover{color:#fff;background-color:#e96b02;border-color:#dc6502}.btn-warning-dark.focus,.btn-warning-dark:focus{box-shadow:0 0 0 .2rem rgba(220,113,23,.5)}.btn-warning-dark.disabled,.btn-warning-dark:disabled{color:#212529;background-color:#fd7e14;border-color:#fd7e14}.btn-warning-dark:not(:disabled):not(.disabled).active,.btn-warning-dark:not(:disabled):not(.disabled):active,.show>.btn-warning-dark.dropdown-toggle{color:#fff;background-color:#dc6502;border-color:#cf5f02}.btn-warning-dark:not(:disabled):not(.disabled).active:focus,.btn-warning-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-warning-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(220,113,23,.5)}.btn-outline-primary{color:#2b99a8;border-color:#2b99a8}.btn-outline-primary:hover{color:#fff;background-color:#2b99a8;border-color:#2b99a8}.btn-outline-primary.focus,.btn-outline-primary:focus{box-shadow:0 0 0 .2rem rgba(43,153,168,.5)}.btn-outline-primary.disabled,.btn-outline-primary:disabled{color:#2b99a8;background-color:initial}.btn-outline-primary:not(:disabled):not(.disabled).active,.btn-outline-primary:not(:disabled):not(.disabled):active,.show>.btn-outline-primary.dropdown-toggle{color:#fff;background-color:#2b99a8;border-color:#2b99a8}.btn-outline-primary:not(:disabled):not(.disabled).active:focus,.btn-outline-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(43,153,168,.5)}.btn-outline-secondary{color:#374249;border-color:#374249}.btn-outline-secondary:hover{color:#fff;background-color:#374249;border-color:#374249}.btn-outline-secondary.focus,.btn-outline-secondary:focus{box-shadow:0 0 0 .2rem rgba(55,66,73,.5)}.btn-outline-secondary.disabled,.btn-outline-secondary:disabled{color:#374249;background-color:initial}.btn-outline-secondary:not(:disabled):not(.disabled).active,.btn-outline-secondary:not(:disabled):not(.disabled):active,.show>.btn-outline-secondary.dropdown-toggle{color:#fff;background-color:#374249;border-color:#374249}.btn-outline-secondary:not(:disabled):not(.disabled).active:focus,.btn-outline-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(55,66,73,.5)}.btn-outline-success{color:#0b0;border-color:#0b0}.btn-outline-success:hover{color:#fff;background-color:#0b0;border-color:#0b0}.btn-outline-success.focus,.btn-outline-success:focus{box-shadow:0 0 0 .2rem rgba(0,187,0,.5)}.btn-outline-success.disabled,.btn-outline-success:disabled{color:#0b0;background-color:initial}.btn-outline-success:not(:disabled):not(.disabled).active,.btn-outline-success:not(:disabled):not(.disabled):active,.show>.btn-outline-success.dropdown-toggle{color:#fff;background-color:#0b0;border-color:#0b0}.btn-outline-success:not(:disabled):not(.disabled).active:focus,.btn-outline-success:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(0,187,0,.5)}.btn-outline-info{color:#2b99a8;border-color:#2b99a8}.btn-outline-info:hover{color:#fff;background-color:#2b99a8;border-color:#2b99a8}.btn-outline-info.focus,.btn-outline-info:focus{box-shadow:0 0 0 .2rem rgba(43,153,168,.5)}.btn-outline-info.disabled,.btn-outline-info:disabled{color:#2b99a8;background-color:initial}.btn-outline-info:not(:disabled):not(.disabled).active,.btn-outline-info:not(:disabled):not(.disabled):active,.show>.btn-outline-info.dropdown-toggle{color:#fff;background-color:#2b99a8;border-color:#2b99a8}.btn-outline-info:not(:disabled):not(.disabled).active:focus,.btn-outline-info:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(43,153,168,.5)}.btn-outline-warning{color:#ffc200;border-color:#ffc200}.btn-outline-warning:hover{color:#212529;background-color:#ffc200;border-color:#ffc200}.btn-outline-warning.focus,.btn-outline-warning:focus{box-shadow:0 0 0 .2rem rgba(255,194,0,.5)}.btn-outline-warning.disabled,.btn-outline-warning:disabled{color:#ffc200;background-color:initial}.btn-outline-warning:not(:disabled):not(.disabled).active,.btn-outline-warning:not(:disabled):not(.disabled):active,.show>.btn-outline-warning.dropdown-toggle{color:#212529;background-color:#ffc200;border-color:#ffc200}.btn-outline-warning:not(:disabled):not(.disabled).active:focus,.btn-outline-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(255,194,0,.5)}.btn-outline-danger{color:#ef5c55;border-color:#ef5c55}.btn-outline-danger:hover{color:#fff;background-color:#ef5c55;border-color:#ef5c55}.btn-outline-danger.focus,.btn-outline-danger:focus{box-shadow:0 0 0 .2rem rgba(239,92,85,.5)}.btn-outline-danger.disabled,.btn-outline-danger:disabled{color:#ef5c55;background-color:initial}.btn-outline-danger:not(:disabled):not(.disabled).active,.btn-outline-danger:not(:disabled):not(.disabled):active,.show>.btn-outline-danger.dropdown-toggle{color:#fff;background-color:#ef5c55;border-color:#ef5c55}.btn-outline-danger:not(:disabled):not(.disabled).active:focus,.btn-outline-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(239,92,85,.5)}.btn-outline-light{color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:hover{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light.focus,.btn-outline-light:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-outline-light.disabled,.btn-outline-light:disabled{color:#f8f9fa;background-color:initial}.btn-outline-light:not(:disabled):not(.disabled).active,.btn-outline-light:not(:disabled):not(.disabled):active,.show>.btn-outline-light.dropdown-toggle{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:not(:disabled):not(.disabled).active:focus,.btn-outline-light:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-outline-dark{color:#777;border-color:#777}.btn-outline-dark:hover{color:#fff;background-color:#777;border-color:#777}.btn-outline-dark.focus,.btn-outline-dark:focus{box-shadow:0 0 0 .2rem hsla(0,0%,46.7%,.5)}.btn-outline-dark.disabled,.btn-outline-dark:disabled{color:#777;background-color:initial}.btn-outline-dark:not(:disabled):not(.disabled).active,.btn-outline-dark:not(:disabled):not(.disabled):active,.show>.btn-outline-dark.dropdown-toggle{color:#fff;background-color:#777;border-color:#777}.btn-outline-dark:not(:disabled):not(.disabled).active:focus,.btn-outline-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem hsla(0,0%,46.7%,.5)}.btn-outline-accent{color:#ef5c55;border-color:#ef5c55}.btn-outline-accent:hover{color:#fff;background-color:#ef5c55;border-color:#ef5c55}.btn-outline-accent.focus,.btn-outline-accent:focus{box-shadow:0 0 0 .2rem rgba(239,92,85,.5)}.btn-outline-accent.disabled,.btn-outline-accent:disabled{color:#ef5c55;background-color:initial}.btn-outline-accent:not(:disabled):not(.disabled).active,.btn-outline-accent:not(:disabled):not(.disabled):active,.show>.btn-outline-accent.dropdown-toggle{color:#fff;background-color:#ef5c55;border-color:#ef5c55}.btn-outline-accent:not(:disabled):not(.disabled).active:focus,.btn-outline-accent:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-accent.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(239,92,85,.5)}.btn-outline-warning-dark{color:#fd7e14;border-color:#fd7e14}.btn-outline-warning-dark:hover{color:#212529;background-color:#fd7e14;border-color:#fd7e14}.btn-outline-warning-dark.focus,.btn-outline-warning-dark:focus{box-shadow:0 0 0 .2rem rgba(253,126,20,.5)}.btn-outline-warning-dark.disabled,.btn-outline-warning-dark:disabled{color:#fd7e14;background-color:initial}.btn-outline-warning-dark:not(:disabled):not(.disabled).active,.btn-outline-warning-dark:not(:disabled):not(.disabled):active,.show>.btn-outline-warning-dark.dropdown-toggle{color:#212529;background-color:#fd7e14;border-color:#fd7e14}.btn-outline-warning-dark:not(:disabled):not(.disabled).active:focus,.btn-outline-warning-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-warning-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(253,126,20,.5)}.btn-link{font-weight:400;color:#2b99a8;text-decoration:none}.btn-link:hover{color:#1b626b}.btn-link.focus,.btn-link:focus,.btn-link:hover{text-decoration:underline}.btn-link.disabled,.btn-link:disabled{color:#6c757d;pointer-events:none}.btn-group-lg>.btn,.btn-lg{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.btn-group-sm>.btn,.btn-sm{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:.5rem}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{transition:opacity .15s linear}@media (prefers-reduced-motion:reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{position:relative;height:0;overflow:hidden;transition:height .35s ease}@media (prefers-reduced-motion:reduce){.collapsing{transition:none}}.dropdown,.dropleft,.dropright,.dropup{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle:after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty:after{margin-left:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:10rem;padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#212529;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}.dropdown-menu-left{right:auto;left:0}.dropdown-menu-right{right:0;left:auto}@media (min-width:576px){.dropdown-menu-sm-left{right:auto;left:0}.dropdown-menu-sm-right{right:0;left:auto}}@media (min-width:768px){.dropdown-menu-md-left{right:auto;left:0}.dropdown-menu-md-right{right:0;left:auto}}@media (min-width:992px){.dropdown-menu-lg-left{right:auto;left:0}.dropdown-menu-lg-right{right:0;left:auto}}@media (min-width:1200px){.dropdown-menu-xl-left{right:auto;left:0}.dropdown-menu-xl-right{right:0;left:auto}}@media (min-width:1450px){.dropdown-menu-2xl-left{right:auto;left:0}.dropdown-menu-2xl-right{right:0;left:auto}}.dropup .dropdown-menu{top:auto;bottom:100%;margin-top:0;margin-bottom:.125rem}.dropup .dropdown-toggle:after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty:after{margin-left:0}.dropright .dropdown-menu{top:0;right:auto;left:100%;margin-top:0;margin-left:.125rem}.dropright .dropdown-toggle:after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropright .dropdown-toggle:empty:after{margin-left:0}.dropright .dropdown-toggle:after{vertical-align:0}.dropleft .dropdown-menu{top:0;right:100%;left:auto;margin-top:0;margin-right:.125rem}.dropleft .dropdown-toggle:after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";display:none}.dropleft .dropdown-toggle:before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropleft .dropdown-toggle:empty:after{margin-left:0}.dropleft .dropdown-toggle:before{vertical-align:0}.dropdown-menu[x-placement^=bottom],.dropdown-menu[x-placement^=left],.dropdown-menu[x-placement^=right],.dropdown-menu[x-placement^=top]{right:auto;bottom:auto}.dropdown-divider{height:0;margin:.5rem 0;overflow:hidden;border-top:1px solid #e9ecef}.dropdown-item{display:block;width:100%;padding:.25rem 1.5rem;clear:both;font-weight:400;color:#212529;text-align:inherit;white-space:nowrap;background-color:initial;border:0}.dropdown-item:focus,.dropdown-item:hover{color:#16181b;text-decoration:none;background-color:#f8f9fa}.dropdown-item.active,.dropdown-item:active{color:#fff;text-decoration:none;background-color:#2b99a8}.dropdown-item.disabled,.dropdown-item:disabled{color:#6c757d;pointer-events:none;background-color:initial}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:.5rem 1.5rem;margin-bottom:0;font-size:.875rem;color:#6c757d;white-space:nowrap}.dropdown-item-text{display:block;padding:.25rem 1.5rem;color:#212529}.btn-group,.btn-group-vertical{position:relative;display:inline-flex;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;flex:1 1 auto}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:1}.btn-toolbar{display:flex;flex-wrap:wrap;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group>.btn-group:not(:first-child),.btn-group>.btn:not(:first-child){margin-left:-1px}.btn-group>.btn-group:not(:last-child)>.btn,.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:not(:first-child)>.btn,.btn-group>.btn:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split:after,.dropright .dropdown-toggle-split:after,.dropup .dropdown-toggle-split:after{margin-left:0}.dropleft .dropdown-toggle-split:before{margin-right:0}.btn-group-sm>.btn+.dropdown-toggle-split,.btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-group-lg>.btn+.dropdown-toggle-split,.btn-lg+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{flex-direction:column;align-items:flex-start;justify-content:center}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{width:100%}.btn-group-vertical>.btn-group:not(:first-child),.btn-group-vertical>.btn:not(:first-child){margin-top:-1px}.btn-group-vertical>.btn-group:not(:last-child)>.btn,.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child)>.btn,.btn-group-vertical>.btn:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.btn-group-toggle>.btn,.btn-group-toggle>.btn-group>.btn{margin-bottom:0}.btn-group-toggle>.btn-group>.btn input[type=checkbox],.btn-group-toggle>.btn-group>.btn input[type=radio],.btn-group-toggle>.btn input[type=checkbox],.btn-group-toggle>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:flex;flex-wrap:wrap;align-items:stretch;width:100%}.input-group>.cd-form-control,.input-group>.custom-file,.input-group>.custom-select,.input-group>.form-control,.input-group>.form-control-plaintext{position:relative;flex:1 1 auto;width:1%;min-width:0;margin-bottom:0}.input-group>.cd-form-control+.cd-form-control,.input-group>.cd-form-control+.custom-file,.input-group>.cd-form-control+.custom-select,.input-group>.cd-form-control+.form-control,.input-group>.custom-file+.cd-form-control,.input-group>.custom-file+.custom-file,.input-group>.custom-file+.custom-select,.input-group>.custom-file+.form-control,.input-group>.custom-select+.cd-form-control,.input-group>.custom-select+.custom-file,.input-group>.custom-select+.custom-select,.input-group>.custom-select+.form-control,.input-group>.form-control+.cd-form-control,.input-group>.form-control+.custom-file,.input-group>.form-control+.custom-select,.input-group>.form-control+.form-control,.input-group>.form-control-plaintext+.cd-form-control,.input-group>.form-control-plaintext+.custom-file,.input-group>.form-control-plaintext+.custom-select,.input-group>.form-control-plaintext+.form-control{margin-left:-1px}.input-group>.cd-form-control:focus,.input-group>.custom-file .custom-file-input:focus~.custom-file-label,.input-group>.custom-select:focus,.input-group>.form-control:focus{z-index:3}.input-group>.custom-file .custom-file-input:focus{z-index:4}.input-group>.cd-form-control:not(:last-child),.input-group>.custom-select:not(:last-child),.input-group>.form-control:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.cd-form-control:not(:first-child),.input-group>.custom-select:not(:first-child),.input-group>.form-control:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.custom-file{display:flex;align-items:center}.input-group>.custom-file:not(:last-child) .custom-file-label,.input-group>.custom-file:not(:last-child) .custom-file-label:after{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.custom-file:not(:first-child) .custom-file-label{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-append,.input-group-prepend{display:flex}.input-group-append .btn,.input-group-prepend .btn{position:relative;z-index:2}.input-group-append .btn:focus,.input-group-prepend .btn:focus{z-index:3}.input-group-append .btn+.btn,.input-group-append .btn+.input-group-text,.input-group-append .input-group-text+.btn,.input-group-append .input-group-text+.input-group-text,.input-group-prepend .btn+.btn,.input-group-prepend .btn+.input-group-text,.input-group-prepend .input-group-text+.btn,.input-group-prepend .input-group-text+.input-group-text{margin-left:-1px}.input-group-prepend{margin-right:-1px}.input-group-append{margin-left:-1px}.input-group-text{display:flex;align-items:center;padding:.375rem .75rem;margin-bottom:0;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:.25rem}.input-group-text input[type=checkbox],.input-group-text input[type=radio]{margin-top:0}.input-group-lg>.cd-form-control:not(textarea),.input-group-lg>.custom-select,.input-group-lg>.form-control:not(textarea){height:calc(1.5em + 1rem + 2px)}.input-group-lg>.cd-form-control,.input-group-lg>.custom-select,.input-group-lg>.form-control,.input-group-lg>.input-group-append>.btn,.input-group-lg>.input-group-append>.input-group-text,.input-group-lg>.input-group-prepend>.btn,.input-group-lg>.input-group-prepend>.input-group-text{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.input-group-sm>.cd-form-control:not(textarea),.input-group-sm>.custom-select,.input-group-sm>.form-control:not(textarea){height:calc(1.5em + .5rem + 2px)}.input-group-sm>.cd-form-control,.input-group-sm>.custom-select,.input-group-sm>.form-control,.input-group-sm>.input-group-append>.btn,.input-group-sm>.input-group-append>.input-group-text,.input-group-sm>.input-group-prepend>.btn,.input-group-sm>.input-group-prepend>.input-group-text{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.input-group-lg>.custom-select,.input-group-sm>.custom-select{padding-right:1.75rem}.input-group>.input-group-append:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group>.input-group-append:last-child>.input-group-text:not(:last-child),.input-group>.input-group-append:not(:last-child)>.btn,.input-group>.input-group-append:not(:last-child)>.input-group-text,.input-group>.input-group-prepend>.btn,.input-group>.input-group-prepend>.input-group-text{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.input-group-append>.btn,.input-group>.input-group-append>.input-group-text,.input-group>.input-group-prepend:first-child>.btn:not(:first-child),.input-group>.input-group-prepend:first-child>.input-group-text:not(:first-child),.input-group>.input-group-prepend:not(:first-child)>.btn,.input-group>.input-group-prepend:not(:first-child)>.input-group-text{border-top-left-radius:0;border-bottom-left-radius:0}.custom-control{position:relative;z-index:1;display:block;min-height:1.5rem;padding-left:1.5rem}.custom-control-inline{display:inline-flex;margin-right:1rem}.custom-control-input{position:absolute;left:0;z-index:-1;width:1rem;height:1.25rem;opacity:0}.custom-control-input:checked~.custom-control-label:before{color:#fff;border-color:#2b99a8;background-color:#2b99a8}.custom-control-input:focus~.custom-control-label:before{box-shadow:0 0 0 .2rem rgba(43,153,168,.25)}.custom-control-input:focus:not(:checked)~.custom-control-label:before{border-color:#76d0dc}.custom-control-input:not(:disabled):active~.custom-control-label:before{color:#fff;background-color:#9fdee6;border-color:#9fdee6}.custom-control-input:disabled~.custom-control-label,.custom-control-input[disabled]~.custom-control-label{color:#6c757d}.custom-control-input:disabled~.custom-control-label:before,.custom-control-input[disabled]~.custom-control-label:before{background-color:#e9ecef}.custom-control-label{position:relative;margin-bottom:0;vertical-align:top}.custom-control-label:before{pointer-events:none;background-color:#fff;border:1px solid #adb5bd}.custom-control-label:after,.custom-control-label:before{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;content:""}.custom-control-label:after{background:no-repeat 50%/50% 50%}.custom-checkbox .custom-control-label:before{border-radius:.25rem}.custom-checkbox .custom-control-input:checked~.custom-control-label:after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26l2.974 2.99L8 2.193z'/%3e%3c/svg%3e")}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label:before{border-color:#2b99a8;background-color:#2b99a8}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label:after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3e%3cpath stroke='%23fff' d='M0 2h4'/%3e%3c/svg%3e")}.custom-checkbox .custom-control-input:disabled:checked~.custom-control-label:before,.custom-checkbox .custom-control-input:disabled:indeterminate~.custom-control-label:before{background-color:rgba(43,153,168,.5)}.custom-radio .custom-control-label:before{border-radius:50%}.custom-radio .custom-control-input:checked~.custom-control-label:after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e")}.custom-radio .custom-control-input:disabled:checked~.custom-control-label:before{background-color:rgba(43,153,168,.5)}.custom-switch{padding-left:2.25rem}.custom-switch .custom-control-label:before{left:-2.25rem;width:1.75rem;pointer-events:all;border-radius:.5rem}.custom-switch .custom-control-label:after{top:calc(.25rem + 2px);left:calc(-2.25rem + 2px);width:calc(1rem - 4px);height:calc(1rem - 4px);background-color:#adb5bd;border-radius:.5rem;transition:transform .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.custom-switch .custom-control-label:after{transition:none}}.custom-switch .custom-control-input:checked~.custom-control-label:after{background-color:#fff;transform:translateX(.75rem)}.custom-switch .custom-control-input:disabled:checked~.custom-control-label:before{background-color:rgba(43,153,168,.5)}.custom-select{display:inline-block;width:100%;height:calc(1.5em + .75rem + 2px);padding:.375rem 1.75rem .375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;vertical-align:middle;background:#fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px;border:1px solid #ced4da;border-radius:.25rem;-moz-appearance:none;appearance:none}.custom-select:focus{border-color:#76d0dc;outline:0;box-shadow:0 0 0 .2rem rgba(43,153,168,.25)}.custom-select:focus::-ms-value{color:#495057;background-color:#fff}.custom-select[multiple],.custom-select[size]:not([size="1"]){height:auto;padding-right:.75rem;background-image:none}.custom-select:disabled{color:#6c757d;background-color:#e9ecef}.custom-select::-ms-expand{display:none}.custom-select:-moz-focusring{color:transparent;text-shadow:0 0 0 #495057}.custom-select-sm{height:calc(1.5em + .5rem + 2px);padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;font-size:.875rem}.custom-select-lg{height:calc(1.5em + 1rem + 2px);padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.25rem}.custom-file{display:inline-block;margin-bottom:0}.custom-file,.custom-file-input{position:relative;width:100%;height:calc(1.5em + .75rem + 2px)}.custom-file-input{z-index:2;margin:0;opacity:0}.custom-file-input:focus~.custom-file-label{border-color:#76d0dc;box-shadow:0 0 0 .2rem rgba(43,153,168,.25)}.custom-file-input:disabled~.custom-file-label,.custom-file-input[disabled]~.custom-file-label{background-color:#e9ecef}.custom-file-input:lang(en)~.custom-file-label:after{content:"Browse"}.custom-file-input~.custom-file-label[data-browse]:after{content:attr(data-browse)}.custom-file-label{left:0;z-index:1;height:calc(1.5em + .75rem + 2px);font-weight:400;background-color:#fff;border:1px solid #ced4da;border-radius:.25rem}.custom-file-label,.custom-file-label:after{position:absolute;top:0;right:0;padding:.375rem .75rem;line-height:1.5;color:#495057}.custom-file-label:after{bottom:0;z-index:3;display:block;height:calc(1.5em + .75rem);content:"Browse";background-color:#e9ecef;border-left:inherit;border-radius:0 .25rem .25rem 0}.custom-range{width:100%;height:1.4rem;padding:0;background-color:initial;-moz-appearance:none;appearance:none}.custom-range:focus{outline:none}.custom-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(43,153,168,.25)}.custom-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(43,153,168,.25)}.custom-range:focus::-ms-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(43,153,168,.25)}.custom-range::-moz-focus-outer{border:0}.custom-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;background-color:#2b99a8;border:0;border-radius:1rem;-webkit-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-webkit-slider-thumb{-webkit-transition:none;transition:none}}.custom-range::-webkit-slider-thumb:active{background-color:#9fdee6}.custom-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.custom-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#2b99a8;border:0;border-radius:1rem;-moz-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-moz-appearance:none;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-moz-range-thumb{-moz-transition:none;transition:none}}.custom-range::-moz-range-thumb:active{background-color:#9fdee6}.custom-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.custom-range::-ms-thumb{width:1rem;height:1rem;margin-top:0;margin-right:.2rem;margin-left:.2rem;background-color:#2b99a8;border:0;border-radius:1rem;-ms-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;appearance:none}@media (prefers-reduced-motion:reduce){.custom-range::-ms-thumb{-ms-transition:none;transition:none}}.custom-range::-ms-thumb:active{background-color:#9fdee6}.custom-range::-ms-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:initial;border-color:transparent;border-width:.5rem}.custom-range::-ms-fill-lower,.custom-range::-ms-fill-upper{background-color:#dee2e6;border-radius:1rem}.custom-range::-ms-fill-upper{margin-right:15px}.custom-range:disabled::-webkit-slider-thumb{background-color:#adb5bd}.custom-range:disabled::-webkit-slider-runnable-track{cursor:default}.custom-range:disabled::-moz-range-thumb{background-color:#adb5bd}.custom-range:disabled::-moz-range-track{cursor:default}.custom-range:disabled::-ms-thumb{background-color:#adb5bd}.custom-control-label:before,.custom-file-label,.custom-select{transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.custom-control-label:before,.custom-file-label,.custom-select{transition:none}}.nav{display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:.5rem 1rem}.nav-link:focus,.nav-link:hover{text-decoration:none}.nav-link.disabled{color:#6c757d;pointer-events:none;cursor:default}.nav-tabs{border-bottom:1px solid #dee2e6}.nav-tabs .nav-item{margin-bottom:-1px}.nav-tabs .nav-link{border:1px solid transparent;border-top-left-radius:.25rem;border-top-right-radius:.25rem}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{border-color:#e9ecef #e9ecef #dee2e6}.nav-tabs .nav-link.disabled{color:#6c757d;background-color:initial;border-color:transparent}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:#495057;background-color:#fff;border-color:#dee2e6 #dee2e6 #fff}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.nav-pills .nav-link{border-radius:.25rem}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:#fff;background-color:#2b99a8}.nav-fill .nav-item,.nav-fill>.nav-link{flex:1 1 auto;text-align:center}.nav-justified .nav-item,.nav-justified>.nav-link{flex-basis:0;flex-grow:1;text-align:center}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{position:relative;padding:.5rem 1rem}.navbar,.navbar .container,.navbar .container-fluid,.navbar .container-lg,.navbar .container-md,.navbar .container-sm,.navbar .container-xl{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between}.navbar-brand{display:inline-block;padding-top:.3125rem;padding-bottom:.3125rem;margin-right:1rem;font-size:1.25rem;line-height:inherit;white-space:nowrap}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-nav{display:flex;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link{padding-right:0;padding-left:0}.navbar-nav .dropdown-menu{position:static;float:none}.navbar-text{display:inline-block;padding-top:.5rem;padding-bottom:.5rem}.navbar-collapse{flex-basis:100%;flex-grow:1;align-items:center}.navbar-toggler{padding:.25rem .75rem;font-size:1.25rem;line-height:1;background-color:initial;border:1px solid transparent;border-radius:.25rem}.navbar-toggler:focus,.navbar-toggler:hover{text-decoration:none}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;content:"";background:no-repeat 50%;background-size:100% 100%}@media (max-width:575.98px){.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid,.navbar-expand-sm>.container-lg,.navbar-expand-sm>.container-md,.navbar-expand-sm>.container-sm,.navbar-expand-sm>.container-xl{padding-right:0;padding-left:0}}@media (min-width:576px){.navbar-expand-sm{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand-sm .navbar-nav{flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid,.navbar-expand-sm>.container-lg,.navbar-expand-sm>.container-md,.navbar-expand-sm>.container-sm,.navbar-expand-sm>.container-xl{flex-wrap:nowrap}.navbar-expand-sm .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}}@media (max-width:767.98px){.navbar-expand-md>.container,.navbar-expand-md>.container-fluid,.navbar-expand-md>.container-lg,.navbar-expand-md>.container-md,.navbar-expand-md>.container-sm,.navbar-expand-md>.container-xl{padding-right:0;padding-left:0}}@media (min-width:768px){.navbar-expand-md{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand-md .navbar-nav{flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-md>.container,.navbar-expand-md>.container-fluid,.navbar-expand-md>.container-lg,.navbar-expand-md>.container-md,.navbar-expand-md>.container-sm,.navbar-expand-md>.container-xl{flex-wrap:nowrap}.navbar-expand-md .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}}@media (max-width:991.98px){.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid,.navbar-expand-lg>.container-lg,.navbar-expand-lg>.container-md,.navbar-expand-lg>.container-sm,.navbar-expand-lg>.container-xl{padding-right:0;padding-left:0}}@media (min-width:992px){.navbar-expand-lg{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand-lg .navbar-nav{flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid,.navbar-expand-lg>.container-lg,.navbar-expand-lg>.container-md,.navbar-expand-lg>.container-sm,.navbar-expand-lg>.container-xl{flex-wrap:nowrap}.navbar-expand-lg .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}}@media (max-width:1199.98px){.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid,.navbar-expand-xl>.container-lg,.navbar-expand-xl>.container-md,.navbar-expand-xl>.container-sm,.navbar-expand-xl>.container-xl{padding-right:0;padding-left:0}}@media (min-width:1200px){.navbar-expand-xl{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand-xl .navbar-nav{flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid,.navbar-expand-xl>.container-lg,.navbar-expand-xl>.container-md,.navbar-expand-xl>.container-sm,.navbar-expand-xl>.container-xl{flex-wrap:nowrap}.navbar-expand-xl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}}@media (max-width:1449.98px){.navbar-expand-2xl>.container,.navbar-expand-2xl>.container-fluid,.navbar-expand-2xl>.container-lg,.navbar-expand-2xl>.container-md,.navbar-expand-2xl>.container-sm,.navbar-expand-2xl>.container-xl{padding-right:0;padding-left:0}}@media (min-width:1450px){.navbar-expand-2xl{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand-2xl .navbar-nav{flex-direction:row}.navbar-expand-2xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-2xl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-2xl>.container,.navbar-expand-2xl>.container-fluid,.navbar-expand-2xl>.container-lg,.navbar-expand-2xl>.container-md,.navbar-expand-2xl>.container-sm,.navbar-expand-2xl>.container-xl{flex-wrap:nowrap}.navbar-expand-2xl .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand-2xl .navbar-toggler{display:none}}.navbar-expand{flex-flow:row nowrap;justify-content:flex-start}.navbar-expand>.container,.navbar-expand>.container-fluid,.navbar-expand>.container-lg,.navbar-expand>.container-md,.navbar-expand>.container-sm,.navbar-expand>.container-xl{padding-right:0;padding-left:0}.navbar-expand .navbar-nav{flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand>.container,.navbar-expand>.container-fluid,.navbar-expand>.container-lg,.navbar-expand>.container-md,.navbar-expand>.container-sm,.navbar-expand>.container-xl{flex-wrap:nowrap}.navbar-expand .navbar-collapse{display:flex!important;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-light .navbar-brand,.navbar-light .navbar-brand:focus,.navbar-light .navbar-brand:hover{color:rgba(0,0,0,.9)}.navbar-light .navbar-nav .nav-link{color:rgba(0,0,0,.5)}.navbar-light .navbar-nav .nav-link:focus,.navbar-light .navbar-nav .nav-link:hover{color:rgba(0,0,0,.7)}.navbar-light .navbar-nav .nav-link.disabled{color:rgba(0,0,0,.3)}.navbar-light .navbar-nav .active>.nav-link,.navbar-light .navbar-nav .nav-link.active,.navbar-light .navbar-nav .nav-link.show,.navbar-light .navbar-nav .show>.nav-link{color:rgba(0,0,0,.9)}.navbar-light .navbar-toggler{color:rgba(0,0,0,.5);border-color:rgba(0,0,0,.1)}.navbar-light .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-light .navbar-text{color:rgba(0,0,0,.5)}.navbar-light .navbar-text a,.navbar-light .navbar-text a:focus,.navbar-light .navbar-text a:hover{color:rgba(0,0,0,.9)}.navbar-dark .navbar-brand,.navbar-dark .navbar-brand:focus,.navbar-dark .navbar-brand:hover{color:#fff}.navbar-dark .navbar-nav .nav-link{color:hsla(0,0%,100%,.5)}.navbar-dark .navbar-nav .nav-link:focus,.navbar-dark .navbar-nav .nav-link:hover{color:hsla(0,0%,100%,.75)}.navbar-dark .navbar-nav .nav-link.disabled{color:hsla(0,0%,100%,.25)}.navbar-dark .navbar-nav .active>.nav-link,.navbar-dark .navbar-nav .nav-link.active,.navbar-dark .navbar-nav .nav-link.show,.navbar-dark .navbar-nav .show>.nav-link{color:#fff}.navbar-dark .navbar-toggler{color:hsla(0,0%,100%,.5);border-color:hsla(0,0%,100%,.1)}.navbar-dark .navbar-toggler-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")}.navbar-dark .navbar-text{color:hsla(0,0%,100%,.5)}.navbar-dark .navbar-text a,.navbar-dark .navbar-text a:focus,.navbar-dark .navbar-text a:hover{color:#fff}.card,pre{position:relative;display:flex;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:initial;border:1px solid rgba(0,0,0,.125);border-radius:.25rem}.card>hr,pre>hr{margin-right:0;margin-left:0}.card>.list-group,pre>.list-group{border-top:inherit;border-bottom:inherit}.card>.list-group:first-child,pre>.list-group:first-child{border-top-width:0;border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card>.list-group:last-child,pre>.list-group:last-child{border-bottom-width:0;border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card>.card-header+.list-group,.card>.list-group+.card-footer,pre>.card-header+.list-group,pre>.list-group+.card-footer{border-top:0}.card-body{flex:1 1 auto;min-height:1px;padding:1.25rem}.card-title{margin-bottom:.75rem}.card-subtitle{margin-top:-.375rem}.card-subtitle,.card-text:last-child{margin-bottom:0}.card-link:hover{text-decoration:none}.card-link+.card-link{margin-left:1.25rem}.card-header{padding:.75rem 1.25rem;margin-bottom:0;background-color:#f8f9fa;border-bottom:1px solid rgba(0,0,0,.125)}.card-header:first-child{border-radius:calc(.25rem - 1px) calc(.25rem - 1px) 0 0}.card-footer{padding:.75rem 1.25rem;background-color:#f8f9fa;border-top:1px solid rgba(0,0,0,.125)}.card-footer:last-child{border-radius:0 0 calc(.25rem - 1px) calc(.25rem - 1px)}.card-header-tabs{margin-bottom:-.75rem;border-bottom:0}.card-header-pills,.card-header-tabs{margin-right:-.625rem;margin-left:-.625rem}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:1.25rem;border-radius:calc(.25rem - 1px)}.card-img,.card-img-bottom,.card-img-top{flex-shrink:0;width:100%}.card-img,.card-img-top{border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card-img,.card-img-bottom{border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card-deck .card,.card-deck pre{margin-bottom:15px}@media (min-width:576px){.card-deck{display:flex;flex-flow:row wrap;margin-right:-15px;margin-left:-15px}.card-deck .card,.card-deck pre{flex:1 0 0%;margin-right:15px;margin-bottom:0;margin-left:15px}}.card-group>.card,.card-group>pre{margin-bottom:15px}@media (min-width:576px){.card-group{display:flex;flex-flow:row wrap}.card-group>.card,.card-group>pre{flex:1 0 0%;margin-bottom:0}.card-group>.card+.card,.card-group>.card+pre,.card-group>pre+.card,.card-group>pre+pre{margin-left:0;border-left:0}.card-group>.card:not(:last-child),.card-group>pre:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:not(:last-child) .card-header,.card-group>.card:not(:last-child) .card-img-top,.card-group>pre:not(:last-child) .card-header,.card-group>pre:not(:last-child) .card-img-top{border-top-right-radius:0}.card-group>.card:not(:last-child) .card-footer,.card-group>.card:not(:last-child) .card-img-bottom,.card-group>pre:not(:last-child) .card-footer,.card-group>pre:not(:last-child) .card-img-bottom{border-bottom-right-radius:0}.card-group>.card:not(:first-child),.card-group>pre:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:not(:first-child) .card-header,.card-group>.card:not(:first-child) .card-img-top,.card-group>pre:not(:first-child) .card-header,.card-group>pre:not(:first-child) .card-img-top{border-top-left-radius:0}.card-group>.card:not(:first-child) .card-footer,.card-group>.card:not(:first-child) .card-img-bottom,.card-group>pre:not(:first-child) .card-footer,.card-group>pre:not(:first-child) .card-img-bottom{border-bottom-left-radius:0}}.card-columns .card,.card-columns pre{margin-bottom:.75rem}@media (min-width:576px){.card-columns{column-count:3;column-gap:1.25rem;orphans:1;widows:1}.card-columns .card,.card-columns pre{display:inline-block;width:100%}}.accordion{overflow-anchor:none}.accordion>.card,.accordion>pre{overflow:hidden}.accordion>.card:not(:last-of-type),.accordion>pre:not(:last-of-type){border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.accordion>.card:not(:first-of-type),.accordion>pre:not(:first-of-type){border-top-left-radius:0;border-top-right-radius:0}.accordion>.card>.card-header,.accordion>pre>.card-header{border-radius:0;margin-bottom:-1px}.breadcrumb{flex-wrap:wrap;padding:.75rem 1rem;margin-bottom:1rem;list-style:none;background-color:#e9ecef;border-radius:.25rem}.breadcrumb,.breadcrumb-item{display:flex}.breadcrumb-item+.breadcrumb-item{padding-left:.5rem}.breadcrumb-item+.breadcrumb-item:before{display:inline-block;padding-right:.5rem;color:#6c757d;content:"/"}.breadcrumb-item+.breadcrumb-item:hover:before{text-decoration:underline;text-decoration:none}.breadcrumb-item.active{color:#6c757d}.pagination,cd-table .cd-datatable .datatable-footer .datatable-pager ul{display:flex;padding-left:0;list-style:none;border-radius:.25rem}.page-link,cd-table .cd-datatable .datatable-footer .datatable-pager ul li a{position:relative;display:block;padding:.5rem .75rem;margin-left:-1px;line-height:1.25;color:#2b99a8;background-color:#fff;border:1px solid #dee2e6}.page-link:hover,cd-table .cd-datatable .datatable-footer .datatable-pager ul li a:hover{z-index:2;color:#1b626b;text-decoration:none;background-color:#e9ecef;border-color:#dee2e6}.page-link:focus,cd-table .cd-datatable .datatable-footer .datatable-pager ul li a:focus{z-index:3;outline:0;box-shadow:0 0 0 .2rem rgba(43,153,168,.25)}.page-item:first-child .page-link,.page-item:first-child cd-table .cd-datatable .datatable-footer .datatable-pager ul li a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li .page-item:first-child a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li:first-child .page-link,cd-table .cd-datatable .datatable-footer .datatable-pager ul li:first-child a{margin-left:0;border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.page-item:last-child .page-link,.page-item:last-child cd-table .cd-datatable .datatable-footer .datatable-pager ul li a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li .page-item:last-child a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li:last-child .page-link,cd-table .cd-datatable .datatable-footer .datatable-pager ul li:last-child a{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.page-item.active .page-link,.page-item.active cd-table .cd-datatable .datatable-footer .datatable-pager ul li a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li.active .page-link,cd-table .cd-datatable .datatable-footer .datatable-pager ul li.active a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li .page-item.active a{z-index:3;color:#fff;background-color:#2b99a8;border-color:#2b99a8}.page-item.disabled .page-link,.page-item.disabled cd-table .cd-datatable .datatable-footer .datatable-pager ul li a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li.disabled .page-link,cd-table .cd-datatable .datatable-footer .datatable-pager ul li.disabled a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li .page-item.disabled a{color:#6c757d;pointer-events:none;cursor:auto;background-color:#fff;border-color:#dee2e6}.pagination-lg .page-link,.pagination-lg cd-table .cd-datatable .datatable-footer .datatable-pager ul li a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li .pagination-lg a{padding:.75rem 1.5rem;font-size:1.25rem;line-height:1.5}.pagination-lg .page-item:first-child .page-link,.pagination-lg .page-item:first-child cd-table .cd-datatable .datatable-footer .datatable-pager ul li a,.pagination-lg cd-table .cd-datatable .datatable-footer .datatable-pager ul li:first-child .page-link,.pagination-lg cd-table .cd-datatable .datatable-footer .datatable-pager ul li:first-child a,cd-table .cd-datatable .datatable-footer .datatable-pager ul .pagination-lg li:first-child .page-link,cd-table .cd-datatable .datatable-footer .datatable-pager ul .pagination-lg li:first-child a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li .pagination-lg .page-item:first-child a{border-top-left-radius:.3rem;border-bottom-left-radius:.3rem}.pagination-lg .page-item:last-child .page-link,.pagination-lg .page-item:last-child cd-table .cd-datatable .datatable-footer .datatable-pager ul li a,.pagination-lg cd-table .cd-datatable .datatable-footer .datatable-pager ul li:last-child .page-link,.pagination-lg cd-table .cd-datatable .datatable-footer .datatable-pager ul li:last-child a,cd-table .cd-datatable .datatable-footer .datatable-pager ul .pagination-lg li:last-child .page-link,cd-table .cd-datatable .datatable-footer .datatable-pager ul .pagination-lg li:last-child a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li .pagination-lg .page-item:last-child a{border-top-right-radius:.3rem;border-bottom-right-radius:.3rem}.pagination-sm .page-link,.pagination-sm cd-table .cd-datatable .datatable-footer .datatable-pager ul li a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li .pagination-sm a{padding:.25rem .5rem;font-size:.875rem;line-height:1.5}.pagination-sm .page-item:first-child .page-link,.pagination-sm .page-item:first-child cd-table .cd-datatable .datatable-footer .datatable-pager ul li a,.pagination-sm cd-table .cd-datatable .datatable-footer .datatable-pager ul li:first-child .page-link,.pagination-sm cd-table .cd-datatable .datatable-footer .datatable-pager ul li:first-child a,cd-table .cd-datatable .datatable-footer .datatable-pager ul .pagination-sm li:first-child .page-link,cd-table .cd-datatable .datatable-footer .datatable-pager ul .pagination-sm li:first-child a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li .pagination-sm .page-item:first-child a{border-top-left-radius:.2rem;border-bottom-left-radius:.2rem}.pagination-sm .page-item:last-child .page-link,.pagination-sm .page-item:last-child cd-table .cd-datatable .datatable-footer .datatable-pager ul li a,.pagination-sm cd-table .cd-datatable .datatable-footer .datatable-pager ul li:last-child .page-link,.pagination-sm cd-table .cd-datatable .datatable-footer .datatable-pager ul li:last-child a,cd-table .cd-datatable .datatable-footer .datatable-pager ul .pagination-sm li:last-child .page-link,cd-table .cd-datatable .datatable-footer .datatable-pager ul .pagination-sm li:last-child a,cd-table .cd-datatable .datatable-footer .datatable-pager ul li .pagination-sm .page-item:last-child a{border-top-right-radius:.2rem;border-bottom-right-radius:.2rem}.badge{display:inline-block;padding:.25em .4em;font-size:1rem;font-weight:700;line-height:1;text-align:center;white-space:nowrap;vertical-align:initial;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.badge{transition:none}}a.badge:focus,a.badge:hover{text-decoration:none}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.badge-pill{padding-right:.6em;padding-left:.6em;border-radius:10rem}.badge-primary{color:#fff;background-color:#2b99a8}a.badge-primary:focus,a.badge-primary:hover{color:#fff;background-color:#21747f}a.badge-primary.focus,a.badge-primary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(43,153,168,.5)}.badge-secondary{color:#fff;background-color:#374249}a.badge-secondary:focus,a.badge-secondary:hover{color:#fff;background-color:#21282c}a.badge-secondary.focus,a.badge-secondary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(55,66,73,.5)}.badge-success{color:#fff;background-color:#0b0}a.badge-success:focus,a.badge-success:hover{color:#fff;background-color:#080}a.badge-success.focus,a.badge-success:focus{outline:0;box-shadow:0 0 0 .2rem rgba(0,187,0,.5)}.badge-info{color:#fff;background-color:#2b99a8}a.badge-info:focus,a.badge-info:hover{color:#fff;background-color:#21747f}a.badge-info.focus,a.badge-info:focus{outline:0;box-shadow:0 0 0 .2rem rgba(43,153,168,.5)}.badge-warning{color:#212529;background-color:#ffc200}a.badge-warning:focus,a.badge-warning:hover{color:#212529;background-color:#cc9b00}a.badge-warning.focus,a.badge-warning:focus{outline:0;box-shadow:0 0 0 .2rem rgba(255,194,0,.5)}.badge-danger{color:#fff;background-color:#ef5c55}a.badge-danger:focus,a.badge-danger:hover{color:#fff;background-color:#eb2f26}a.badge-danger.focus,a.badge-danger:focus{outline:0;box-shadow:0 0 0 .2rem rgba(239,92,85,.5)}.badge-light{color:#212529;background-color:#f8f9fa}a.badge-light:focus,a.badge-light:hover{color:#212529;background-color:#dae0e5}a.badge-light.focus,a.badge-light:focus{outline:0;box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.badge-dark{color:#fff;background-color:#777}a.badge-dark:focus,a.badge-dark:hover{color:#fff;background-color:#5e5e5e}a.badge-dark.focus,a.badge-dark:focus{outline:0;box-shadow:0 0 0 .2rem hsla(0,0%,46.7%,.5)}.badge-accent{color:#fff;background-color:#ef5c55}a.badge-accent:focus,a.badge-accent:hover{color:#fff;background-color:#eb2f26}a.badge-accent.focus,a.badge-accent:focus{outline:0;box-shadow:0 0 0 .2rem rgba(239,92,85,.5)}.badge-warning-dark{color:#212529;background-color:#fd7e14}a.badge-warning-dark:focus,a.badge-warning-dark:hover{color:#212529;background-color:#dc6502}a.badge-warning-dark.focus,a.badge-warning-dark:focus{outline:0;box-shadow:0 0 0 .2rem rgba(253,126,20,.5)}.jumbotron{padding:2rem 1rem;margin-bottom:2rem;background-color:#e9ecef;border-radius:.3rem}@media (min-width:576px){.jumbotron{padding:4rem 2rem}}.jumbotron-fluid{padding-right:0;padding-left:0;border-radius:0}.alert{position:relative;padding:.75rem 1.25rem;margin-bottom:1rem;border:1px solid transparent;border-radius:.25rem}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:4rem}.alert-dismissible .close{position:absolute;top:0;right:0;padding:.75rem 1.25rem;color:inherit}.alert-primary{color:#165057;background-color:#d5ebee;border-color:#c4e2e7}.alert-primary hr{border-top-color:#b2d9e0}.alert-primary .alert-link{color:#0c2b2e}.alert-secondary{color:#1d2226;background-color:#d7d9db;border-color:#c7cacc}.alert-secondary hr{border-top-color:#babdc0}.alert-secondary .alert-link{color:#070809}.alert-success{color:#006100;background-color:#ccf1cc;border-color:#b8ecb8}.alert-success hr{border-top-color:#a4e7a4}.alert-success .alert-link{color:#002e00}.alert-info{color:#165057;background-color:#d5ebee;border-color:#c4e2e7}.alert-info hr{border-top-color:#b2d9e0}.alert-info .alert-link{color:#0c2b2e}.alert-warning{color:#856500;background-color:#fff3cc;border-color:#ffeeb8}.alert-warning hr{border-top-color:#ffe89f}.alert-warning .alert-link{color:#523e00}.alert-danger{color:#7c302c;background-color:#fcdedd;border-color:#fbd1cf}.alert-danger hr{border-top-color:#f9bab7}.alert-danger .alert-link{color:#56211f}.alert-light{color:#818182;background-color:#fefefe;border-color:#fdfdfe}.alert-light hr{border-top-color:#ececf6}.alert-light .alert-link{color:#686868}.alert-dark{color:#3e3e3e;background-color:#e4e4e4;border-color:#d9d9d9}.alert-dark hr{border-top-color:#ccc}.alert-dark .alert-link{color:#252525}.alert-accent{color:#7c302c;background-color:#fcdedd;border-color:#fbd1cf}.alert-accent hr{border-top-color:#f9bab7}.alert-accent .alert-link{color:#56211f}.alert-warning-dark{color:#84420a;background-color:#ffe5d0;border-color:#fedbbd}.alert-warning-dark hr{border-top-color:#fecda4}.alert-warning-dark .alert-link{color:#552a06}@keyframes progress-bar-stripes{0%{background-position:1rem 0}to{background-position:0 0}}.progress{height:1rem;line-height:0;font-size:.75rem;background-color:#e9ecef;border-radius:.25rem}.progress,.progress-bar{display:flex;overflow:hidden}.progress-bar{flex-direction:column;justify-content:center;color:#fff;text-align:center;white-space:nowrap;background-color:#2b99a8;transition:width .6s ease}@media (prefers-reduced-motion:reduce){.progress-bar{transition:none}}.progress-bar-striped{background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-size:1rem 1rem}.progress-bar-animated{animation:progress-bar-stripes 1s linear infinite}@media (prefers-reduced-motion:reduce){.progress-bar-animated{animation:none}}.media{display:flex;align-items:flex-start}.media-body{flex:1}.list-group{display:flex;flex-direction:column;padding-left:0;margin-bottom:0;border-radius:.25rem}.list-group-item-action{width:100%;color:#495057;text-align:inherit}.list-group-item-action:focus,.list-group-item-action:hover{z-index:1;color:#495057;text-decoration:none;background-color:#f8f9fa}.list-group-item-action:active{color:#212529;background-color:#e9ecef}.list-group-item{position:relative;display:block;padding:.75rem 1.25rem;background-color:#fff;border:1px solid rgba(0,0,0,.125)}.list-group-item:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.list-group-item:last-child{border-bottom-right-radius:inherit;border-bottom-left-radius:inherit}.list-group-item.disabled,.list-group-item:disabled{color:#6c757d;pointer-events:none;background-color:#fff}.list-group-item.active{z-index:2;color:#fff;background-color:#2b99a8;border-color:#2b99a8}.list-group-item+.list-group-item{border-top-width:0}.list-group-item+.list-group-item.active{margin-top:-1px;border-top-width:1px}.list-group-horizontal{flex-direction:row}.list-group-horizontal>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal>.list-group-item.active{margin-top:0}.list-group-horizontal>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}@media (min-width:576px){.list-group-horizontal-sm{flex-direction:row}.list-group-horizontal-sm>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-sm>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-sm>.list-group-item.active{margin-top:0}.list-group-horizontal-sm>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-sm>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:768px){.list-group-horizontal-md{flex-direction:row}.list-group-horizontal-md>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-md>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-md>.list-group-item.active{margin-top:0}.list-group-horizontal-md>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-md>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:992px){.list-group-horizontal-lg{flex-direction:row}.list-group-horizontal-lg>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-lg>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-lg>.list-group-item.active{margin-top:0}.list-group-horizontal-lg>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-lg>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:1200px){.list-group-horizontal-xl{flex-direction:row}.list-group-horizontal-xl>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-xl>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-xl>.list-group-item.active{margin-top:0}.list-group-horizontal-xl>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-xl>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media (min-width:1450px){.list-group-horizontal-2xl{flex-direction:row}.list-group-horizontal-2xl>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-2xl>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-2xl>.list-group-item.active{margin-top:0}.list-group-horizontal-2xl>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-2xl>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}.list-group-flush{border-radius:0}.list-group-flush>.list-group-item{border-width:0 0 1px}.list-group-flush>.list-group-item:last-child{border-bottom-width:0}.list-group-item-primary{color:#165057;background-color:#c4e2e7}.list-group-item-primary.list-group-item-action:focus,.list-group-item-primary.list-group-item-action:hover{color:#165057;background-color:#b2d9e0}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#165057;border-color:#165057}.list-group-item-secondary{color:#1d2226;background-color:#c7cacc}.list-group-item-secondary.list-group-item-action:focus,.list-group-item-secondary.list-group-item-action:hover{color:#1d2226;background-color:#babdc0}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#1d2226;border-color:#1d2226}.list-group-item-success{color:#006100;background-color:#b8ecb8}.list-group-item-success.list-group-item-action:focus,.list-group-item-success.list-group-item-action:hover{color:#006100;background-color:#a4e7a4}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#006100;border-color:#006100}.list-group-item-info{color:#165057;background-color:#c4e2e7}.list-group-item-info.list-group-item-action:focus,.list-group-item-info.list-group-item-action:hover{color:#165057;background-color:#b2d9e0}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#165057;border-color:#165057}.list-group-item-warning{color:#856500;background-color:#ffeeb8}.list-group-item-warning.list-group-item-action:focus,.list-group-item-warning.list-group-item-action:hover{color:#856500;background-color:#ffe89f}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#856500;border-color:#856500}.list-group-item-danger{color:#7c302c;background-color:#fbd1cf}.list-group-item-danger.list-group-item-action:focus,.list-group-item-danger.list-group-item-action:hover{color:#7c302c;background-color:#f9bab7}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#7c302c;border-color:#7c302c}.list-group-item-light{color:#818182;background-color:#fdfdfe}.list-group-item-light.list-group-item-action:focus,.list-group-item-light.list-group-item-action:hover{color:#818182;background-color:#ececf6}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#818182;border-color:#818182}.list-group-item-dark{color:#3e3e3e;background-color:#d9d9d9}.list-group-item-dark.list-group-item-action:focus,.list-group-item-dark.list-group-item-action:hover{color:#3e3e3e;background-color:#ccc}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#3e3e3e;border-color:#3e3e3e}.list-group-item-accent{color:#7c302c;background-color:#fbd1cf}.list-group-item-accent.list-group-item-action:focus,.list-group-item-accent.list-group-item-action:hover{color:#7c302c;background-color:#f9bab7}.list-group-item-accent.list-group-item-action.active{color:#fff;background-color:#7c302c;border-color:#7c302c}.list-group-item-warning-dark{color:#84420a;background-color:#fedbbd}.list-group-item-warning-dark.list-group-item-action:focus,.list-group-item-warning-dark.list-group-item-action:hover{color:#84420a;background-color:#fecda4}.list-group-item-warning-dark.list-group-item-action.active{color:#fff;background-color:#84420a;border-color:#84420a}.close{float:right;font-size:1.5rem;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.5}.close:hover{color:#000;text-decoration:none}.close:not(:disabled):not(.disabled):focus,.close:not(:disabled):not(.disabled):hover{opacity:.75}button.close{padding:0;background-color:initial;border:0}a.close.disabled{pointer-events:none}.toast{flex-basis:350px;max-width:350px;font-size:.875rem;background-color:hsla(0,0%,100%,.85);background-clip:padding-box;border:1px solid rgba(0,0,0,.1);box-shadow:0 .25rem .75rem rgba(0,0,0,.1);opacity:0;border-radius:.25rem}.toast:not(:last-child){margin-bottom:.75rem}.toast.showing{opacity:1}.toast.show{display:block;opacity:1}.toast.hide{display:none}.toast-header{display:flex;align-items:center;padding:.25rem .75rem;color:#6c757d;background-color:hsla(0,0%,100%,.85);background-clip:padding-box;border-bottom:1px solid rgba(0,0,0,.05);border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.toast-body{padding:.75rem}.modal-open{overflow:hidden}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal{position:fixed;top:0;left:0;z-index:1050;display:none;width:100%;height:100%;overflow:hidden;outline:0}.modal-dialog{position:relative;width:auto;margin:.5rem;pointer-events:none}.modal.fade .modal-dialog{transition:transform .3s ease-out;transform:translateY(-50px)}@media (prefers-reduced-motion:reduce){.modal.fade .modal-dialog{transition:none}}.modal.show .modal-dialog{transform:none}.modal.modal-static .modal-dialog{transform:scale(1.02)}.modal-dialog-scrollable{display:flex;max-height:calc(100% - 1rem)}.modal-dialog-scrollable .modal-content{max-height:calc(100vh - 1rem);overflow:hidden}.modal-dialog-scrollable .modal-footer,.modal-dialog-scrollable .modal-header{flex-shrink:0}.modal-dialog-scrollable .modal-body{overflow-y:auto}.modal-dialog-centered{display:flex;align-items:center;min-height:calc(100% - 1rem)}.modal-dialog-centered:before{display:block;height:calc(100vh - 1rem);height:min-content;content:""}.modal-dialog-centered.modal-dialog-scrollable{flex-direction:column;justify-content:center;height:100%}.modal-dialog-centered.modal-dialog-scrollable .modal-content{max-height:none}.modal-dialog-centered.modal-dialog-scrollable:before{content:none}.modal-content{position:relative;display:flex;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem;outline:0}.modal-backdrop{position:fixed;top:0;left:0;z-index:1040;width:100vw;height:100vh;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:.5}.modal-header{display:flex;align-items:flex-start;justify-content:space-between;padding:1rem;border-bottom:1px solid #dee2e6;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.modal-header .close{padding:1rem;margin:-1rem -1rem -1rem auto}.modal-title{margin-bottom:0;line-height:1.5}.modal-body{position:relative;flex:1 1 auto;padding:1rem}.modal-footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;padding:.75rem;border-top:1px solid #dee2e6;border-bottom-right-radius:calc(.3rem - 1px);border-bottom-left-radius:calc(.3rem - 1px)}.modal-footer>*{margin:.25rem}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:576px){.modal-dialog{max-width:500px;margin:1.75rem auto}.modal-dialog-scrollable{max-height:calc(100% - 3.5rem)}.modal-dialog-scrollable .modal-content{max-height:calc(100vh - 3.5rem)}.modal-dialog-centered{min-height:calc(100% - 3.5rem)}.modal-dialog-centered:before{height:calc(100vh - 3.5rem);height:min-content}.modal-sm{max-width:300px}}@media (min-width:992px){.modal-lg,.modal-xl{max-width:800px}}@media (min-width:1200px){.modal-xl{max-width:1140px}}.tooltip{position:absolute;z-index:1070;display:block;margin:0;font-family:Helvetica Neue,Helvetica,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;opacity:0}.tooltip.show{opacity:.9}.tooltip .arrow{position:absolute;display:block;width:.8rem;height:.4rem}.tooltip .arrow:before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-auto[x-placement^=top],.bs-tooltip-top{padding:.4rem 0}.bs-tooltip-auto[x-placement^=top] .arrow,.bs-tooltip-top .arrow{bottom:0}.bs-tooltip-auto[x-placement^=top] .arrow:before,.bs-tooltip-top .arrow:before{top:0;border-width:.4rem .4rem 0;border-top-color:#212529}.bs-tooltip-auto[x-placement^=right],.bs-tooltip-right{padding:0 .4rem}.bs-tooltip-auto[x-placement^=right] .arrow,.bs-tooltip-right .arrow{left:0;width:.4rem;height:.8rem}.bs-tooltip-auto[x-placement^=right] .arrow:before,.bs-tooltip-right .arrow:before{right:0;border-width:.4rem .4rem .4rem 0;border-right-color:#212529}.bs-tooltip-auto[x-placement^=bottom],.bs-tooltip-bottom{padding:.4rem 0}.bs-tooltip-auto[x-placement^=bottom] .arrow,.bs-tooltip-bottom .arrow{top:0}.bs-tooltip-auto[x-placement^=bottom] .arrow:before,.bs-tooltip-bottom .arrow:before{bottom:0;border-width:0 .4rem .4rem;border-bottom-color:#212529}.bs-tooltip-auto[x-placement^=left],.bs-tooltip-left{padding:0 .4rem}.bs-tooltip-auto[x-placement^=left] .arrow,.bs-tooltip-left .arrow{right:0;width:.4rem;height:.8rem}.bs-tooltip-auto[x-placement^=left] .arrow:before,.bs-tooltip-left .arrow:before{left:0;border-width:.4rem 0 .4rem .4rem;border-left-color:#212529}.tooltip-inner{max-width:200px;padding:.25rem .5rem;color:#fff;text-align:center;background-color:#212529;border-radius:.25rem}.popover{top:0;left:0;z-index:1060;max-width:350px;font-family:Helvetica Neue,Helvetica,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:1rem;word-wrap:break-word;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem}.popover,.popover .arrow{position:absolute;display:block}.popover .arrow{width:1rem;height:.5rem;margin:0 .3rem}.popover .arrow:after,.popover .arrow:before{position:absolute;display:block;content:"";border-color:transparent;border-style:solid}.bs-popover-auto[x-placement^=top],.bs-popover-top{margin-bottom:.5rem}.bs-popover-auto[x-placement^=top]>.arrow,.bs-popover-top>.arrow{bottom:calc(-.5rem - 1px)}.bs-popover-auto[x-placement^=top]>.arrow:before,.bs-popover-top>.arrow:before{bottom:0;border-width:.5rem .5rem 0;border-top-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=top]>.arrow:after,.bs-popover-top>.arrow:after{bottom:1px;border-width:.5rem .5rem 0;border-top-color:#fff}.bs-popover-auto[x-placement^=right],.bs-popover-right{margin-left:.5rem}.bs-popover-auto[x-placement^=right]>.arrow,.bs-popover-right>.arrow{left:calc(-.5rem - 1px);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-auto[x-placement^=right]>.arrow:before,.bs-popover-right>.arrow:before{left:0;border-width:.5rem .5rem .5rem 0;border-right-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=right]>.arrow:after,.bs-popover-right>.arrow:after{left:1px;border-width:.5rem .5rem .5rem 0;border-right-color:#fff}.bs-popover-auto[x-placement^=bottom],.bs-popover-bottom{margin-top:.5rem}.bs-popover-auto[x-placement^=bottom]>.arrow,.bs-popover-bottom>.arrow{top:calc(-.5rem - 1px)}.bs-popover-auto[x-placement^=bottom]>.arrow:before,.bs-popover-bottom>.arrow:before{top:0;border-width:0 .5rem .5rem;border-bottom-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=bottom]>.arrow:after,.bs-popover-bottom>.arrow:after{top:1px;border-width:0 .5rem .5rem;border-bottom-color:#fff}.bs-popover-auto[x-placement^=bottom] .popover-header:before,.bs-popover-bottom .popover-header:before{position:absolute;top:0;left:50%;display:block;width:1rem;margin-left:-.5rem;content:"";border-bottom:1px solid #f7f7f7}.bs-popover-auto[x-placement^=left],.bs-popover-left{margin-right:.5rem}.bs-popover-auto[x-placement^=left]>.arrow,.bs-popover-left>.arrow{right:calc(-.5rem - 1px);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-auto[x-placement^=left]>.arrow:before,.bs-popover-left>.arrow:before{right:0;border-width:.5rem 0 .5rem .5rem;border-left-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=left]>.arrow:after,.bs-popover-left>.arrow:after{right:1px;border-width:.5rem 0 .5rem .5rem;border-left-color:#fff}.popover-header{padding:.5rem .75rem;margin-bottom:0;font-size:1rem;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.popover-header:empty{display:none}.popover-body{padding:.5rem .75rem;color:#212529}.carousel{position:relative}.carousel.pointer-event{touch-action:pan-y}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner:after{display:block;clear:both;content:""}.carousel-item{position:relative;display:none;float:left;width:100%;margin-right:-100%;backface-visibility:hidden;transition:transform .6s ease-in-out}@media (prefers-reduced-motion:reduce){.carousel-item{transition:none}}.carousel-item-next,.carousel-item-prev,.carousel-item.active{display:block}.active.carousel-item-right,.carousel-item-next:not(.carousel-item-left){transform:translateX(100%)}.active.carousel-item-left,.carousel-item-prev:not(.carousel-item-right){transform:translateX(-100%)}.carousel-fade .carousel-item{opacity:0;transition-property:opacity;transform:none}.carousel-fade .carousel-item-next.carousel-item-left,.carousel-fade .carousel-item-prev.carousel-item-right,.carousel-fade .carousel-item.active{z-index:1;opacity:1}.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-right{z-index:0;opacity:0;transition:opacity 0s .6s}@media (prefers-reduced-motion:reduce){.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-right{transition:none}}.carousel-control-next,.carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:flex;align-items:center;justify-content:center;width:15%;color:#fff;text-align:center;opacity:.5;transition:opacity .15s ease}@media (prefers-reduced-motion:reduce){.carousel-control-next,.carousel-control-prev{transition:none}}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-next-icon,.carousel-control-prev-icon{display:inline-block;width:20px;height:20px;background:no-repeat 50%/100% 100%}.carousel-control-prev-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M5.25 0l-4 4 4 4 1.5-1.5L4.25 4l2.5-2.5L5.25 0z'/%3e%3c/svg%3e")}.carousel-control-next-icon{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M2.75 0l-1.5 1.5L3.75 4l-2.5 2.5L2.75 8l4-4-4-4z'/%3e%3c/svg%3e")}.carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:15;display:flex;justify-content:center;padding-left:0;margin-right:15%;margin-left:15%;list-style:none}.carousel-indicators li{box-sizing:initial;flex:0 1 auto;width:30px;height:3px;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:#fff;background-clip:padding-box;border-top:10px solid transparent;border-bottom:10px solid transparent;opacity:.5;transition:opacity .6s ease}@media (prefers-reduced-motion:reduce){.carousel-indicators li{transition:none}}.carousel-indicators .active{opacity:1}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center}@keyframes spinner-border{to{transform:rotate(1turn)}}.spinner-border{display:inline-block;width:2rem;height:2rem;vertical-align:text-bottom;border:.25em solid;border-right:.25em solid transparent;border-radius:50%;animation:spinner-border .75s linear infinite}.spinner-border-sm{width:1rem;height:1rem;border-width:.2em}@keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}.spinner-grow{display:inline-block;width:2rem;height:2rem;vertical-align:text-bottom;background-color:currentColor;border-radius:50%;opacity:0;animation:spinner-grow .75s linear infinite}.spinner-grow-sm{width:1rem;height:1rem}.align-baseline{vertical-align:initial!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.bg-primary{background-color:#2b99a8!important}a.bg-primary:focus,a.bg-primary:hover,button.bg-primary:focus,button.bg-primary:hover{background-color:#21747f!important}.bg-secondary{background-color:#374249!important}a.bg-secondary:focus,a.bg-secondary:hover,button.bg-secondary:focus,button.bg-secondary:hover{background-color:#21282c!important}.bg-success{background-color:#0b0!important}a.bg-success:focus,a.bg-success:hover,button.bg-success:focus,button.bg-success:hover{background-color:#080!important}.bg-info{background-color:#2b99a8!important}a.bg-info:focus,a.bg-info:hover,button.bg-info:focus,button.bg-info:hover{background-color:#21747f!important}.bg-warning{background-color:#ffc200!important}a.bg-warning:focus,a.bg-warning:hover,button.bg-warning:focus,button.bg-warning:hover{background-color:#cc9b00!important}.bg-danger{background-color:#ef5c55!important}a.bg-danger:focus,a.bg-danger:hover,button.bg-danger:focus,button.bg-danger:hover{background-color:#eb2f26!important}.bg-light,pre{background-color:#f8f9fa!important}a.bg-light:focus,a.bg-light:hover,button.bg-light:focus,button.bg-light:hover{background-color:#dae0e5!important}.bg-dark{background-color:#777!important}a.bg-dark:focus,a.bg-dark:hover,button.bg-dark:focus,button.bg-dark:hover{background-color:#5e5e5e!important}.bg-accent{background-color:#ef5c55!important}a.bg-accent:focus,a.bg-accent:hover,button.bg-accent:focus,button.bg-accent:hover{background-color:#eb2f26!important}.bg-warning-dark{background-color:#fd7e14!important}a.bg-warning-dark:focus,a.bg-warning-dark:hover,button.bg-warning-dark:focus,button.bg-warning-dark:hover{background-color:#dc6502!important}.bg-white{background-color:#fff!important}.bg-transparent{background-color:initial!important}.border{border:1px solid #dee2e6!important}.border-top{border-top:1px solid #dee2e6!important}.border-right{border-right:1px solid #dee2e6!important}.border-bottom,.cd-header,legend{border-bottom:1px solid #dee2e6!important}.border-left{border-left:1px solid #dee2e6!important}.border-0{border:0!important}.border-top-0{border-top:0!important}.border-right-0{border-right:0!important}.border-bottom-0{border-bottom:0!important}.border-left-0{border-left:0!important}.border-primary{border-color:#2b99a8!important}.border-secondary{border-color:#374249!important}.border-success{border-color:#0b0!important}.border-info{border-color:#2b99a8!important}.border-warning{border-color:#ffc200!important}.border-danger{border-color:#ef5c55!important}.border-light{border-color:#f8f9fa!important}.border-dark{border-color:#777!important}.border-accent{border-color:#ef5c55!important}.border-warning-dark{border-color:#fd7e14!important}.border-white{border-color:#fff!important}.rounded-sm{border-radius:.2rem!important}.rounded{border-radius:.25rem!important}.rounded-top{border-top-left-radius:.25rem!important}.rounded-right,.rounded-top{border-top-right-radius:.25rem!important}.rounded-bottom,.rounded-right{border-bottom-right-radius:.25rem!important}.rounded-bottom,.rounded-left{border-bottom-left-radius:.25rem!important}.rounded-left{border-top-left-radius:.25rem!important}.rounded-lg{border-radius:.3rem!important}.rounded-circle{border-radius:50%!important}.rounded-pill{border-radius:50rem!important}.rounded-0{border-radius:0!important}.clearfix:after{display:block;clear:both;content:""}.d-none{display:none!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex,cd-health cd-info-card{display:flex!important}.d-inline-flex{display:inline-flex!important}@media (min-width:576px){.d-sm-none{display:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:flex!important}.d-sm-inline-flex{display:inline-flex!important}}@media (min-width:768px){.d-md-none{display:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:flex!important}.d-md-inline-flex{display:inline-flex!important}}@media (min-width:992px){.d-lg-none{display:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:flex!important}.d-lg-inline-flex{display:inline-flex!important}}@media (min-width:1200px){.d-xl-none{display:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:flex!important}.d-xl-inline-flex{display:inline-flex!important}}@media (min-width:1450px){.d-2xl-none{display:none!important}.d-2xl-inline{display:inline!important}.d-2xl-inline-block{display:inline-block!important}.d-2xl-block{display:block!important}.d-2xl-table{display:table!important}.d-2xl-table-row{display:table-row!important}.d-2xl-table-cell{display:table-cell!important}.d-2xl-flex{display:flex!important}.d-2xl-inline-flex{display:inline-flex!important}}@media print{.d-print-none{display:none!important}.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:flex!important}.d-print-inline-flex{display:inline-flex!important}}.embed-responsive{position:relative;display:block;width:100%;padding:0;overflow:hidden}.embed-responsive:before{display:block;content:""}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-21by9:before{padding-top:42.8571428571%}.embed-responsive-16by9:before{padding-top:56.25%}.embed-responsive-4by3:before{padding-top:75%}.embed-responsive-1by1:before{padding-top:100%}.flex-row{flex-direction:row!important}.flex-column,cd-health cd-info-card{flex-direction:column!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-column-reverse{flex-direction:column-reverse!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.flex-wrap-reverse{flex-wrap:wrap-reverse!important}.flex-fill{flex:1 1 auto!important}.flex-grow-0{flex-grow:0!important}.flex-grow-1{flex-grow:1!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.justify-content-start{justify-content:flex-start!important}.justify-content-end{justify-content:flex-end!important}.justify-content-center{justify-content:center!important}.justify-content-between{justify-content:space-between!important}.justify-content-around{justify-content:space-around!important}.align-items-start{align-items:flex-start!important}.align-items-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-baseline{align-items:baseline!important}.align-items-stretch{align-items:stretch!important}.align-content-start{align-content:flex-start!important}.align-content-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-between{align-content:space-between!important}.align-content-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-self-auto{align-self:auto!important}.align-self-start{align-self:flex-start!important}.align-self-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-baseline{align-self:baseline!important}.align-self-stretch{align-self:stretch!important}@media (min-width:576px){.flex-sm-row{flex-direction:row!important}.flex-sm-column{flex-direction:column!important}.flex-sm-row-reverse{flex-direction:row-reverse!important}.flex-sm-column-reverse{flex-direction:column-reverse!important}.flex-sm-wrap{flex-wrap:wrap!important}.flex-sm-nowrap{flex-wrap:nowrap!important}.flex-sm-wrap-reverse{flex-wrap:wrap-reverse!important}.flex-sm-fill{flex:1 1 auto!important}.flex-sm-grow-0{flex-grow:0!important}.flex-sm-grow-1{flex-grow:1!important}.flex-sm-shrink-0{flex-shrink:0!important}.flex-sm-shrink-1{flex-shrink:1!important}.justify-content-sm-start{justify-content:flex-start!important}.justify-content-sm-end{justify-content:flex-end!important}.justify-content-sm-center{justify-content:center!important}.justify-content-sm-between{justify-content:space-between!important}.justify-content-sm-around{justify-content:space-around!important}.align-items-sm-start{align-items:flex-start!important}.align-items-sm-end{align-items:flex-end!important}.align-items-sm-center{align-items:center!important}.align-items-sm-baseline{align-items:baseline!important}.align-items-sm-stretch{align-items:stretch!important}.align-content-sm-start{align-content:flex-start!important}.align-content-sm-end{align-content:flex-end!important}.align-content-sm-center{align-content:center!important}.align-content-sm-between{align-content:space-between!important}.align-content-sm-around{align-content:space-around!important}.align-content-sm-stretch{align-content:stretch!important}.align-self-sm-auto{align-self:auto!important}.align-self-sm-start{align-self:flex-start!important}.align-self-sm-end{align-self:flex-end!important}.align-self-sm-center{align-self:center!important}.align-self-sm-baseline{align-self:baseline!important}.align-self-sm-stretch{align-self:stretch!important}}@media (min-width:768px){.flex-md-row{flex-direction:row!important}.flex-md-column{flex-direction:column!important}.flex-md-row-reverse{flex-direction:row-reverse!important}.flex-md-column-reverse{flex-direction:column-reverse!important}.flex-md-wrap{flex-wrap:wrap!important}.flex-md-nowrap{flex-wrap:nowrap!important}.flex-md-wrap-reverse{flex-wrap:wrap-reverse!important}.flex-md-fill{flex:1 1 auto!important}.flex-md-grow-0{flex-grow:0!important}.flex-md-grow-1{flex-grow:1!important}.flex-md-shrink-0{flex-shrink:0!important}.flex-md-shrink-1{flex-shrink:1!important}.justify-content-md-start{justify-content:flex-start!important}.justify-content-md-end{justify-content:flex-end!important}.justify-content-md-center{justify-content:center!important}.justify-content-md-between{justify-content:space-between!important}.justify-content-md-around{justify-content:space-around!important}.align-items-md-start{align-items:flex-start!important}.align-items-md-end{align-items:flex-end!important}.align-items-md-center{align-items:center!important}.align-items-md-baseline{align-items:baseline!important}.align-items-md-stretch{align-items:stretch!important}.align-content-md-start{align-content:flex-start!important}.align-content-md-end{align-content:flex-end!important}.align-content-md-center{align-content:center!important}.align-content-md-between{align-content:space-between!important}.align-content-md-around{align-content:space-around!important}.align-content-md-stretch{align-content:stretch!important}.align-self-md-auto{align-self:auto!important}.align-self-md-start{align-self:flex-start!important}.align-self-md-end{align-self:flex-end!important}.align-self-md-center{align-self:center!important}.align-self-md-baseline{align-self:baseline!important}.align-self-md-stretch{align-self:stretch!important}}@media (min-width:992px){.flex-lg-row{flex-direction:row!important}.flex-lg-column{flex-direction:column!important}.flex-lg-row-reverse{flex-direction:row-reverse!important}.flex-lg-column-reverse{flex-direction:column-reverse!important}.flex-lg-wrap{flex-wrap:wrap!important}.flex-lg-nowrap{flex-wrap:nowrap!important}.flex-lg-wrap-reverse{flex-wrap:wrap-reverse!important}.flex-lg-fill{flex:1 1 auto!important}.flex-lg-grow-0{flex-grow:0!important}.flex-lg-grow-1{flex-grow:1!important}.flex-lg-shrink-0{flex-shrink:0!important}.flex-lg-shrink-1{flex-shrink:1!important}.justify-content-lg-start{justify-content:flex-start!important}.justify-content-lg-end{justify-content:flex-end!important}.justify-content-lg-center{justify-content:center!important}.justify-content-lg-between{justify-content:space-between!important}.justify-content-lg-around{justify-content:space-around!important}.align-items-lg-start{align-items:flex-start!important}.align-items-lg-end{align-items:flex-end!important}.align-items-lg-center{align-items:center!important}.align-items-lg-baseline{align-items:baseline!important}.align-items-lg-stretch{align-items:stretch!important}.align-content-lg-start{align-content:flex-start!important}.align-content-lg-end{align-content:flex-end!important}.align-content-lg-center{align-content:center!important}.align-content-lg-between{align-content:space-between!important}.align-content-lg-around{align-content:space-around!important}.align-content-lg-stretch{align-content:stretch!important}.align-self-lg-auto{align-self:auto!important}.align-self-lg-start{align-self:flex-start!important}.align-self-lg-end{align-self:flex-end!important}.align-self-lg-center{align-self:center!important}.align-self-lg-baseline{align-self:baseline!important}.align-self-lg-stretch{align-self:stretch!important}}@media (min-width:1200px){.flex-xl-row{flex-direction:row!important}.flex-xl-column{flex-direction:column!important}.flex-xl-row-reverse{flex-direction:row-reverse!important}.flex-xl-column-reverse{flex-direction:column-reverse!important}.flex-xl-wrap{flex-wrap:wrap!important}.flex-xl-nowrap{flex-wrap:nowrap!important}.flex-xl-wrap-reverse{flex-wrap:wrap-reverse!important}.flex-xl-fill{flex:1 1 auto!important}.flex-xl-grow-0{flex-grow:0!important}.flex-xl-grow-1{flex-grow:1!important}.flex-xl-shrink-0{flex-shrink:0!important}.flex-xl-shrink-1{flex-shrink:1!important}.justify-content-xl-start{justify-content:flex-start!important}.justify-content-xl-end{justify-content:flex-end!important}.justify-content-xl-center{justify-content:center!important}.justify-content-xl-between{justify-content:space-between!important}.justify-content-xl-around{justify-content:space-around!important}.align-items-xl-start{align-items:flex-start!important}.align-items-xl-end{align-items:flex-end!important}.align-items-xl-center{align-items:center!important}.align-items-xl-baseline{align-items:baseline!important}.align-items-xl-stretch{align-items:stretch!important}.align-content-xl-start{align-content:flex-start!important}.align-content-xl-end{align-content:flex-end!important}.align-content-xl-center{align-content:center!important}.align-content-xl-between{align-content:space-between!important}.align-content-xl-around{align-content:space-around!important}.align-content-xl-stretch{align-content:stretch!important}.align-self-xl-auto{align-self:auto!important}.align-self-xl-start{align-self:flex-start!important}.align-self-xl-end{align-self:flex-end!important}.align-self-xl-center{align-self:center!important}.align-self-xl-baseline{align-self:baseline!important}.align-self-xl-stretch{align-self:stretch!important}}@media (min-width:1450px){.flex-2xl-row{flex-direction:row!important}.flex-2xl-column{flex-direction:column!important}.flex-2xl-row-reverse{flex-direction:row-reverse!important}.flex-2xl-column-reverse{flex-direction:column-reverse!important}.flex-2xl-wrap{flex-wrap:wrap!important}.flex-2xl-nowrap{flex-wrap:nowrap!important}.flex-2xl-wrap-reverse{flex-wrap:wrap-reverse!important}.flex-2xl-fill{flex:1 1 auto!important}.flex-2xl-grow-0{flex-grow:0!important}.flex-2xl-grow-1{flex-grow:1!important}.flex-2xl-shrink-0{flex-shrink:0!important}.flex-2xl-shrink-1{flex-shrink:1!important}.justify-content-2xl-start{justify-content:flex-start!important}.justify-content-2xl-end{justify-content:flex-end!important}.justify-content-2xl-center{justify-content:center!important}.justify-content-2xl-between{justify-content:space-between!important}.justify-content-2xl-around{justify-content:space-around!important}.align-items-2xl-start{align-items:flex-start!important}.align-items-2xl-end{align-items:flex-end!important}.align-items-2xl-center{align-items:center!important}.align-items-2xl-baseline{align-items:baseline!important}.align-items-2xl-stretch{align-items:stretch!important}.align-content-2xl-start{align-content:flex-start!important}.align-content-2xl-end{align-content:flex-end!important}.align-content-2xl-center{align-content:center!important}.align-content-2xl-between{align-content:space-between!important}.align-content-2xl-around{align-content:space-around!important}.align-content-2xl-stretch{align-content:stretch!important}.align-self-2xl-auto{align-self:auto!important}.align-self-2xl-start{align-self:flex-start!important}.align-self-2xl-end{align-self:flex-end!important}.align-self-2xl-center{align-self:center!important}.align-self-2xl-baseline{align-self:baseline!important}.align-self-2xl-stretch{align-self:stretch!important}}.float-left{float:left!important}.float-right{float:right!important}.float-none{float:none!important}@media (min-width:576px){.float-sm-left{float:left!important}.float-sm-right{float:right!important}.float-sm-none{float:none!important}}@media (min-width:768px){.float-md-left{float:left!important}.float-md-right{float:right!important}.float-md-none{float:none!important}}@media (min-width:992px){.float-lg-left{float:left!important}.float-lg-right{float:right!important}.float-lg-none{float:none!important}}@media (min-width:1200px){.float-xl-left{float:left!important}.float-xl-right{float:right!important}.float-xl-none{float:none!important}}@media (min-width:1450px){.float-2xl-left{float:left!important}.float-2xl-right{float:right!important}.float-2xl-none{float:none!important}}.user-select-all{user-select:all!important}.user-select-auto{user-select:auto!important}.user-select-none{user-select:none!important}.overflow-auto{overflow:auto!important}.overflow-hidden{overflow:hidden!important}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:sticky!important}.fixed-top{top:0}.fixed-bottom,.fixed-top{position:fixed;right:0;left:0;z-index:1030}.fixed-bottom{bottom:0}@supports (position:sticky){.sticky-top{position:sticky;top:0;z-index:1020}}.sr-only{white-space:nowrap}.sr-only-focusable:active,.sr-only-focusable:focus{white-space:normal}.shadow-sm{box-shadow:0 .125rem .25rem rgba(0,0,0,.075)!important}.shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15)!important}.shadow-lg{box-shadow:0 1rem 3rem rgba(0,0,0,.175)!important}.shadow-none{box-shadow:none!important}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mw-100{max-width:100%!important}.mh-100{max-height:100%!important}.min-vw-100{min-width:100vw!important}.min-vh-100{min-height:100vh!important}.vw-100{width:100vw!important}.vh-100{height:100vh!important}.m-0{margin:0!important}.mt-0,.my-0{margin-top:0!important}.mr-0,.mx-0{margin-right:0!important}.mb-0,.my-0{margin-bottom:0!important}.ml-0,.mx-0{margin-left:0!important}.m-1{margin:.25rem!important}.mt-1,.my-1{margin-top:.25rem!important}.mr-1,.mx-1{margin-right:.25rem!important}.mb-1,.my-1{margin-bottom:.25rem!important}.ml-1,.mx-1{margin-left:.25rem!important}.m-2{margin:.5rem!important}.mt-2,.my-2{margin-top:.5rem!important}.btn-toolbar cd-table-actions.btn-group,.mr-2,.mx-2,cd-logs label{margin-right:.5rem!important}.mb-2,.my-2{margin-bottom:.5rem!important}.ml-2,.mx-2{margin-left:.5rem!important}.m-3{margin:1rem!important}.mt-3,.my-3{margin-top:1rem!important}.mr-3,.mx-3,cd-logs .form-inline>.form-group{margin-right:1rem!important}.mb-3,.my-3,cd-logs .form-inline>.form-group{margin-bottom:1rem!important}.ml-3,.mx-3{margin-left:1rem!important}.m-4{margin:1.5rem!important}.cd-header,.mt-4,.my-4,legend{margin-top:1.5rem!important}.mr-4,.mx-4{margin-right:1.5rem!important}.cd-header,.mb-4,.my-4,cd-health cd-info-card,legend{margin-bottom:1.5rem!important}.ml-4,.mx-4{margin-left:1.5rem!important}.m-5{margin:3rem!important}.mt-5,.my-5{margin-top:3rem!important}.mr-5,.mx-5{margin-right:3rem!important}.mb-5,.my-5{margin-bottom:3rem!important}.ml-5,.mx-5{margin-left:3rem!important}.p-0{padding:0!important}.pt-0,.py-0{padding-top:0!important}.pr-0,.px-0{padding-right:0!important}.pb-0,.py-0{padding-bottom:0!important}.pl-0,.px-0{padding-left:0!important}.p-1{padding:.25rem!important}.pt-1,.py-1{padding-top:.25rem!important}.pr-1,.px-1{padding-right:.25rem!important}.cd-header,.pb-1,.py-1,legend{padding-bottom:.25rem!important}.pl-1,.px-1{padding-left:.25rem!important}.p-2,cd-table .cd-datatable .datatable-footer,pre{padding:.5rem!important}.pt-2,.py-2,cd-info-card .card .card-body .card-text,cd-info-card pre .card-body .card-text{padding-top:.5rem!important}.pr-2,.px-2{padding-right:.5rem!important}.pb-2,.py-2,cd-info-card .card,cd-info-card pre{padding-bottom:.5rem!important}.pl-2,.px-2,cd-info-card .card .card-body .card-title,cd-info-card pre .card-body .card-title{padding-left:.5rem!important}.p-3{padding:1rem!important}.pt-3,.py-3{padding-top:1rem!important}.pr-3,.px-3{padding-right:1rem!important}.pb-3,.py-3{padding-bottom:1rem!important}.pl-3,.px-3{padding-left:1rem!important}.p-4{padding:1.5rem!important}.pt-4,.py-4{padding-top:1.5rem!important}.pr-4,.px-4{padding-right:1.5rem!important}.pb-4,.py-4{padding-bottom:1.5rem!important}.pl-4,.px-4{padding-left:1.5rem!important}.p-5{padding:3rem!important}.pt-5,.py-5{padding-top:3rem!important}.pr-5,.px-5{padding-right:3rem!important}.pb-5,.py-5{padding-bottom:3rem!important}.pl-5,.px-5{padding-left:3rem!important}.m-n1{margin:-.25rem!important}.mt-n1,.my-n1{margin-top:-.25rem!important}.mr-n1,.mx-n1{margin-right:-.25rem!important}.mb-n1,.my-n1{margin-bottom:-.25rem!important}.ml-n1,.mx-n1{margin-left:-.25rem!important}.m-n2{margin:-.5rem!important}.mt-n2,.my-n2{margin-top:-.5rem!important}.mr-n2,.mx-n2{margin-right:-.5rem!important}.mb-n2,.my-n2{margin-bottom:-.5rem!important}.ml-n2,.mx-n2{margin-left:-.5rem!important}.m-n3{margin:-1rem!important}.mt-n3,.my-n3{margin-top:-1rem!important}.mr-n3,.mx-n3{margin-right:-1rem!important}.mb-n3,.my-n3{margin-bottom:-1rem!important}.ml-n3,.mx-n3{margin-left:-1rem!important}.m-n4{margin:-1.5rem!important}.mt-n4,.my-n4{margin-top:-1.5rem!important}.mr-n4,.mx-n4{margin-right:-1.5rem!important}.mb-n4,.my-n4{margin-bottom:-1.5rem!important}.ml-n4,.mx-n4{margin-left:-1.5rem!important}.m-n5{margin:-3rem!important}.mt-n5,.my-n5{margin-top:-3rem!important}.mr-n5,.mx-n5{margin-right:-3rem!important}.mb-n5,.my-n5{margin-bottom:-3rem!important}.ml-n5,.mx-n5{margin-left:-3rem!important}.m-auto{margin:auto!important}.mt-auto,.my-auto{margin-top:auto!important}.mr-auto,.mx-auto{margin-right:auto!important}.mb-auto,.my-auto{margin-bottom:auto!important}.ml-auto,.mx-auto{margin-left:auto!important}@media (min-width:576px){.m-sm-0{margin:0!important}.mt-sm-0,.my-sm-0{margin-top:0!important}.mr-sm-0,.mx-sm-0{margin-right:0!important}.mb-sm-0,.my-sm-0{margin-bottom:0!important}.ml-sm-0,.mx-sm-0{margin-left:0!important}.m-sm-1{margin:.25rem!important}.mt-sm-1,.my-sm-1{margin-top:.25rem!important}.mr-sm-1,.mx-sm-1{margin-right:.25rem!important}.mb-sm-1,.my-sm-1{margin-bottom:.25rem!important}.ml-sm-1,.mx-sm-1{margin-left:.25rem!important}.m-sm-2{margin:.5rem!important}.mt-sm-2,.my-sm-2{margin-top:.5rem!important}.mr-sm-2,.mx-sm-2{margin-right:.5rem!important}.mb-sm-2,.my-sm-2{margin-bottom:.5rem!important}.ml-sm-2,.mx-sm-2{margin-left:.5rem!important}.m-sm-3{margin:1rem!important}.mt-sm-3,.my-sm-3{margin-top:1rem!important}.mr-sm-3,.mx-sm-3{margin-right:1rem!important}.mb-sm-3,.my-sm-3{margin-bottom:1rem!important}.ml-sm-3,.mx-sm-3{margin-left:1rem!important}.m-sm-4{margin:1.5rem!important}.mt-sm-4,.my-sm-4{margin-top:1.5rem!important}.mr-sm-4,.mx-sm-4{margin-right:1.5rem!important}.mb-sm-4,.my-sm-4{margin-bottom:1.5rem!important}.ml-sm-4,.mx-sm-4{margin-left:1.5rem!important}.m-sm-5{margin:3rem!important}.mt-sm-5,.my-sm-5{margin-top:3rem!important}.mr-sm-5,.mx-sm-5{margin-right:3rem!important}.mb-sm-5,.my-sm-5{margin-bottom:3rem!important}.ml-sm-5,.mx-sm-5{margin-left:3rem!important}.p-sm-0{padding:0!important}.pt-sm-0,.py-sm-0{padding-top:0!important}.pr-sm-0,.px-sm-0{padding-right:0!important}.pb-sm-0,.py-sm-0{padding-bottom:0!important}.pl-sm-0,.px-sm-0{padding-left:0!important}.p-sm-1{padding:.25rem!important}.pt-sm-1,.py-sm-1{padding-top:.25rem!important}.pr-sm-1,.px-sm-1{padding-right:.25rem!important}.pb-sm-1,.py-sm-1{padding-bottom:.25rem!important}.pl-sm-1,.px-sm-1{padding-left:.25rem!important}.p-sm-2{padding:.5rem!important}.pt-sm-2,.py-sm-2{padding-top:.5rem!important}.pr-sm-2,.px-sm-2{padding-right:.5rem!important}.pb-sm-2,.py-sm-2{padding-bottom:.5rem!important}.pl-sm-2,.px-sm-2{padding-left:.5rem!important}.p-sm-3{padding:1rem!important}.pt-sm-3,.py-sm-3{padding-top:1rem!important}.pr-sm-3,.px-sm-3{padding-right:1rem!important}.pb-sm-3,.py-sm-3{padding-bottom:1rem!important}.pl-sm-3,.px-sm-3{padding-left:1rem!important}.p-sm-4{padding:1.5rem!important}.pt-sm-4,.py-sm-4{padding-top:1.5rem!important}.pr-sm-4,.px-sm-4{padding-right:1.5rem!important}.pb-sm-4,.py-sm-4{padding-bottom:1.5rem!important}.pl-sm-4,.px-sm-4{padding-left:1.5rem!important}.p-sm-5{padding:3rem!important}.pt-sm-5,.py-sm-5{padding-top:3rem!important}.pr-sm-5,.px-sm-5{padding-right:3rem!important}.pb-sm-5,.py-sm-5{padding-bottom:3rem!important}.pl-sm-5,.px-sm-5{padding-left:3rem!important}.m-sm-n1{margin:-.25rem!important}.mt-sm-n1,.my-sm-n1{margin-top:-.25rem!important}.mr-sm-n1,.mx-sm-n1{margin-right:-.25rem!important}.mb-sm-n1,.my-sm-n1{margin-bottom:-.25rem!important}.ml-sm-n1,.mx-sm-n1{margin-left:-.25rem!important}.m-sm-n2{margin:-.5rem!important}.mt-sm-n2,.my-sm-n2{margin-top:-.5rem!important}.mr-sm-n2,.mx-sm-n2{margin-right:-.5rem!important}.mb-sm-n2,.my-sm-n2{margin-bottom:-.5rem!important}.ml-sm-n2,.mx-sm-n2{margin-left:-.5rem!important}.m-sm-n3{margin:-1rem!important}.mt-sm-n3,.my-sm-n3{margin-top:-1rem!important}.mr-sm-n3,.mx-sm-n3{margin-right:-1rem!important}.mb-sm-n3,.my-sm-n3{margin-bottom:-1rem!important}.ml-sm-n3,.mx-sm-n3{margin-left:-1rem!important}.m-sm-n4{margin:-1.5rem!important}.mt-sm-n4,.my-sm-n4{margin-top:-1.5rem!important}.mr-sm-n4,.mx-sm-n4{margin-right:-1.5rem!important}.mb-sm-n4,.my-sm-n4{margin-bottom:-1.5rem!important}.ml-sm-n4,.mx-sm-n4{margin-left:-1.5rem!important}.m-sm-n5{margin:-3rem!important}.mt-sm-n5,.my-sm-n5{margin-top:-3rem!important}.mr-sm-n5,.mx-sm-n5{margin-right:-3rem!important}.mb-sm-n5,.my-sm-n5{margin-bottom:-3rem!important}.ml-sm-n5,.mx-sm-n5{margin-left:-3rem!important}.m-sm-auto{margin:auto!important}.mt-sm-auto,.my-sm-auto{margin-top:auto!important}.mr-sm-auto,.mx-sm-auto{margin-right:auto!important}.mb-sm-auto,.my-sm-auto{margin-bottom:auto!important}.ml-sm-auto,.mx-sm-auto{margin-left:auto!important}}@media (min-width:768px){.m-md-0{margin:0!important}.mt-md-0,.my-md-0{margin-top:0!important}.mr-md-0,.mx-md-0{margin-right:0!important}.mb-md-0,.my-md-0{margin-bottom:0!important}.ml-md-0,.mx-md-0{margin-left:0!important}.m-md-1{margin:.25rem!important}.mt-md-1,.my-md-1{margin-top:.25rem!important}.mr-md-1,.mx-md-1{margin-right:.25rem!important}.mb-md-1,.my-md-1{margin-bottom:.25rem!important}.ml-md-1,.mx-md-1{margin-left:.25rem!important}.m-md-2{margin:.5rem!important}.mt-md-2,.my-md-2{margin-top:.5rem!important}.mr-md-2,.mx-md-2{margin-right:.5rem!important}.mb-md-2,.my-md-2{margin-bottom:.5rem!important}.ml-md-2,.mx-md-2{margin-left:.5rem!important}.m-md-3{margin:1rem!important}.mt-md-3,.my-md-3{margin-top:1rem!important}.mr-md-3,.mx-md-3{margin-right:1rem!important}.mb-md-3,.my-md-3{margin-bottom:1rem!important}.ml-md-3,.mx-md-3{margin-left:1rem!important}.m-md-4{margin:1.5rem!important}.mt-md-4,.my-md-4{margin-top:1.5rem!important}.mr-md-4,.mx-md-4{margin-right:1.5rem!important}.mb-md-4,.my-md-4{margin-bottom:1.5rem!important}.ml-md-4,.mx-md-4{margin-left:1.5rem!important}.m-md-5{margin:3rem!important}.mt-md-5,.my-md-5{margin-top:3rem!important}.mr-md-5,.mx-md-5{margin-right:3rem!important}.mb-md-5,.my-md-5{margin-bottom:3rem!important}.ml-md-5,.mx-md-5{margin-left:3rem!important}.p-md-0{padding:0!important}.pt-md-0,.py-md-0{padding-top:0!important}.pr-md-0,.px-md-0{padding-right:0!important}.pb-md-0,.py-md-0{padding-bottom:0!important}.pl-md-0,.px-md-0{padding-left:0!important}.p-md-1{padding:.25rem!important}.pt-md-1,.py-md-1{padding-top:.25rem!important}.pr-md-1,.px-md-1{padding-right:.25rem!important}.pb-md-1,.py-md-1{padding-bottom:.25rem!important}.pl-md-1,.px-md-1{padding-left:.25rem!important}.p-md-2{padding:.5rem!important}.pt-md-2,.py-md-2{padding-top:.5rem!important}.pr-md-2,.px-md-2{padding-right:.5rem!important}.pb-md-2,.py-md-2{padding-bottom:.5rem!important}.pl-md-2,.px-md-2{padding-left:.5rem!important}.p-md-3{padding:1rem!important}.pt-md-3,.py-md-3{padding-top:1rem!important}.pr-md-3,.px-md-3{padding-right:1rem!important}.pb-md-3,.py-md-3{padding-bottom:1rem!important}.pl-md-3,.px-md-3{padding-left:1rem!important}.p-md-4{padding:1.5rem!important}.pt-md-4,.py-md-4{padding-top:1.5rem!important}.pr-md-4,.px-md-4{padding-right:1.5rem!important}.pb-md-4,.py-md-4{padding-bottom:1.5rem!important}.pl-md-4,.px-md-4{padding-left:1.5rem!important}.p-md-5{padding:3rem!important}.pt-md-5,.py-md-5{padding-top:3rem!important}.pr-md-5,.px-md-5{padding-right:3rem!important}.pb-md-5,.py-md-5{padding-bottom:3rem!important}.pl-md-5,.px-md-5{padding-left:3rem!important}.m-md-n1{margin:-.25rem!important}.mt-md-n1,.my-md-n1{margin-top:-.25rem!important}.mr-md-n1,.mx-md-n1{margin-right:-.25rem!important}.mb-md-n1,.my-md-n1{margin-bottom:-.25rem!important}.ml-md-n1,.mx-md-n1{margin-left:-.25rem!important}.m-md-n2{margin:-.5rem!important}.mt-md-n2,.my-md-n2{margin-top:-.5rem!important}.mr-md-n2,.mx-md-n2{margin-right:-.5rem!important}.mb-md-n2,.my-md-n2{margin-bottom:-.5rem!important}.ml-md-n2,.mx-md-n2{margin-left:-.5rem!important}.m-md-n3{margin:-1rem!important}.mt-md-n3,.my-md-n3{margin-top:-1rem!important}.mr-md-n3,.mx-md-n3{margin-right:-1rem!important}.mb-md-n3,.my-md-n3{margin-bottom:-1rem!important}.ml-md-n3,.mx-md-n3{margin-left:-1rem!important}.m-md-n4{margin:-1.5rem!important}.mt-md-n4,.my-md-n4{margin-top:-1.5rem!important}.mr-md-n4,.mx-md-n4{margin-right:-1.5rem!important}.mb-md-n4,.my-md-n4{margin-bottom:-1.5rem!important}.ml-md-n4,.mx-md-n4{margin-left:-1.5rem!important}.m-md-n5{margin:-3rem!important}.mt-md-n5,.my-md-n5{margin-top:-3rem!important}.mr-md-n5,.mx-md-n5{margin-right:-3rem!important}.mb-md-n5,.my-md-n5{margin-bottom:-3rem!important}.ml-md-n5,.mx-md-n5{margin-left:-3rem!important}.m-md-auto{margin:auto!important}.mt-md-auto,.my-md-auto{margin-top:auto!important}.mr-md-auto,.mx-md-auto{margin-right:auto!important}.mb-md-auto,.my-md-auto{margin-bottom:auto!important}.ml-md-auto,.mx-md-auto{margin-left:auto!important}}@media (min-width:992px){.m-lg-0{margin:0!important}.mt-lg-0,.my-lg-0{margin-top:0!important}.mr-lg-0,.mx-lg-0{margin-right:0!important}.mb-lg-0,.my-lg-0{margin-bottom:0!important}.ml-lg-0,.mx-lg-0{margin-left:0!important}.m-lg-1{margin:.25rem!important}.mt-lg-1,.my-lg-1{margin-top:.25rem!important}.mr-lg-1,.mx-lg-1{margin-right:.25rem!important}.mb-lg-1,.my-lg-1{margin-bottom:.25rem!important}.ml-lg-1,.mx-lg-1{margin-left:.25rem!important}.m-lg-2{margin:.5rem!important}.mt-lg-2,.my-lg-2{margin-top:.5rem!important}.mr-lg-2,.mx-lg-2{margin-right:.5rem!important}.mb-lg-2,.my-lg-2{margin-bottom:.5rem!important}.ml-lg-2,.mx-lg-2{margin-left:.5rem!important}.m-lg-3{margin:1rem!important}.mt-lg-3,.my-lg-3{margin-top:1rem!important}.mr-lg-3,.mx-lg-3{margin-right:1rem!important}.mb-lg-3,.my-lg-3{margin-bottom:1rem!important}.ml-lg-3,.mx-lg-3{margin-left:1rem!important}.m-lg-4{margin:1.5rem!important}.mt-lg-4,.my-lg-4{margin-top:1.5rem!important}.mr-lg-4,.mx-lg-4{margin-right:1.5rem!important}.mb-lg-4,.my-lg-4{margin-bottom:1.5rem!important}.ml-lg-4,.mx-lg-4{margin-left:1.5rem!important}.m-lg-5{margin:3rem!important}.mt-lg-5,.my-lg-5{margin-top:3rem!important}.mr-lg-5,.mx-lg-5{margin-right:3rem!important}.mb-lg-5,.my-lg-5{margin-bottom:3rem!important}.ml-lg-5,.mx-lg-5{margin-left:3rem!important}.p-lg-0{padding:0!important}.pt-lg-0,.py-lg-0{padding-top:0!important}.pr-lg-0,.px-lg-0{padding-right:0!important}.pb-lg-0,.py-lg-0{padding-bottom:0!important}.pl-lg-0,.px-lg-0{padding-left:0!important}.p-lg-1{padding:.25rem!important}.pt-lg-1,.py-lg-1{padding-top:.25rem!important}.pr-lg-1,.px-lg-1{padding-right:.25rem!important}.pb-lg-1,.py-lg-1{padding-bottom:.25rem!important}.pl-lg-1,.px-lg-1{padding-left:.25rem!important}.p-lg-2{padding:.5rem!important}.pt-lg-2,.py-lg-2{padding-top:.5rem!important}.pr-lg-2,.px-lg-2{padding-right:.5rem!important}.pb-lg-2,.py-lg-2{padding-bottom:.5rem!important}.pl-lg-2,.px-lg-2{padding-left:.5rem!important}.p-lg-3{padding:1rem!important}.pt-lg-3,.py-lg-3{padding-top:1rem!important}.pr-lg-3,.px-lg-3{padding-right:1rem!important}.pb-lg-3,.py-lg-3{padding-bottom:1rem!important}.pl-lg-3,.px-lg-3{padding-left:1rem!important}.p-lg-4{padding:1.5rem!important}.pt-lg-4,.py-lg-4{padding-top:1.5rem!important}.pr-lg-4,.px-lg-4{padding-right:1.5rem!important}.pb-lg-4,.py-lg-4{padding-bottom:1.5rem!important}.pl-lg-4,.px-lg-4{padding-left:1.5rem!important}.p-lg-5{padding:3rem!important}.pt-lg-5,.py-lg-5{padding-top:3rem!important}.pr-lg-5,.px-lg-5{padding-right:3rem!important}.pb-lg-5,.py-lg-5{padding-bottom:3rem!important}.pl-lg-5,.px-lg-5{padding-left:3rem!important}.m-lg-n1{margin:-.25rem!important}.mt-lg-n1,.my-lg-n1{margin-top:-.25rem!important}.mr-lg-n1,.mx-lg-n1{margin-right:-.25rem!important}.mb-lg-n1,.my-lg-n1{margin-bottom:-.25rem!important}.ml-lg-n1,.mx-lg-n1{margin-left:-.25rem!important}.m-lg-n2{margin:-.5rem!important}.mt-lg-n2,.my-lg-n2{margin-top:-.5rem!important}.mr-lg-n2,.mx-lg-n2{margin-right:-.5rem!important}.mb-lg-n2,.my-lg-n2{margin-bottom:-.5rem!important}.ml-lg-n2,.mx-lg-n2{margin-left:-.5rem!important}.m-lg-n3{margin:-1rem!important}.mt-lg-n3,.my-lg-n3{margin-top:-1rem!important}.mr-lg-n3,.mx-lg-n3{margin-right:-1rem!important}.mb-lg-n3,.my-lg-n3{margin-bottom:-1rem!important}.ml-lg-n3,.mx-lg-n3{margin-left:-1rem!important}.m-lg-n4{margin:-1.5rem!important}.mt-lg-n4,.my-lg-n4{margin-top:-1.5rem!important}.mr-lg-n4,.mx-lg-n4{margin-right:-1.5rem!important}.mb-lg-n4,.my-lg-n4{margin-bottom:-1.5rem!important}.ml-lg-n4,.mx-lg-n4{margin-left:-1.5rem!important}.m-lg-n5{margin:-3rem!important}.mt-lg-n5,.my-lg-n5{margin-top:-3rem!important}.mr-lg-n5,.mx-lg-n5{margin-right:-3rem!important}.mb-lg-n5,.my-lg-n5{margin-bottom:-3rem!important}.ml-lg-n5,.mx-lg-n5{margin-left:-3rem!important}.m-lg-auto{margin:auto!important}.mt-lg-auto,.my-lg-auto{margin-top:auto!important}.mr-lg-auto,.mx-lg-auto{margin-right:auto!important}.mb-lg-auto,.my-lg-auto{margin-bottom:auto!important}.ml-lg-auto,.mx-lg-auto{margin-left:auto!important}}@media (min-width:1200px){.m-xl-0{margin:0!important}.mt-xl-0,.my-xl-0{margin-top:0!important}.mr-xl-0,.mx-xl-0{margin-right:0!important}.mb-xl-0,.my-xl-0{margin-bottom:0!important}.ml-xl-0,.mx-xl-0{margin-left:0!important}.m-xl-1{margin:.25rem!important}.mt-xl-1,.my-xl-1{margin-top:.25rem!important}.mr-xl-1,.mx-xl-1{margin-right:.25rem!important}.mb-xl-1,.my-xl-1{margin-bottom:.25rem!important}.ml-xl-1,.mx-xl-1{margin-left:.25rem!important}.m-xl-2{margin:.5rem!important}.mt-xl-2,.my-xl-2{margin-top:.5rem!important}.mr-xl-2,.mx-xl-2{margin-right:.5rem!important}.mb-xl-2,.my-xl-2{margin-bottom:.5rem!important}.ml-xl-2,.mx-xl-2{margin-left:.5rem!important}.m-xl-3{margin:1rem!important}.mt-xl-3,.my-xl-3{margin-top:1rem!important}.mr-xl-3,.mx-xl-3{margin-right:1rem!important}.mb-xl-3,.my-xl-3{margin-bottom:1rem!important}.ml-xl-3,.mx-xl-3{margin-left:1rem!important}.m-xl-4{margin:1.5rem!important}.mt-xl-4,.my-xl-4{margin-top:1.5rem!important}.mr-xl-4,.mx-xl-4{margin-right:1.5rem!important}.mb-xl-4,.my-xl-4{margin-bottom:1.5rem!important}.ml-xl-4,.mx-xl-4{margin-left:1.5rem!important}.m-xl-5{margin:3rem!important}.mt-xl-5,.my-xl-5{margin-top:3rem!important}.mr-xl-5,.mx-xl-5{margin-right:3rem!important}.mb-xl-5,.my-xl-5{margin-bottom:3rem!important}.ml-xl-5,.mx-xl-5{margin-left:3rem!important}.p-xl-0{padding:0!important}.pt-xl-0,.py-xl-0{padding-top:0!important}.pr-xl-0,.px-xl-0{padding-right:0!important}.pb-xl-0,.py-xl-0{padding-bottom:0!important}.pl-xl-0,.px-xl-0{padding-left:0!important}.p-xl-1{padding:.25rem!important}.pt-xl-1,.py-xl-1{padding-top:.25rem!important}.pr-xl-1,.px-xl-1{padding-right:.25rem!important}.pb-xl-1,.py-xl-1{padding-bottom:.25rem!important}.pl-xl-1,.px-xl-1{padding-left:.25rem!important}.p-xl-2{padding:.5rem!important}.pt-xl-2,.py-xl-2{padding-top:.5rem!important}.pr-xl-2,.px-xl-2{padding-right:.5rem!important}.pb-xl-2,.py-xl-2{padding-bottom:.5rem!important}.pl-xl-2,.px-xl-2{padding-left:.5rem!important}.p-xl-3{padding:1rem!important}.pt-xl-3,.py-xl-3{padding-top:1rem!important}.pr-xl-3,.px-xl-3{padding-right:1rem!important}.pb-xl-3,.py-xl-3{padding-bottom:1rem!important}.pl-xl-3,.px-xl-3{padding-left:1rem!important}.p-xl-4{padding:1.5rem!important}.pt-xl-4,.py-xl-4{padding-top:1.5rem!important}.pr-xl-4,.px-xl-4{padding-right:1.5rem!important}.pb-xl-4,.py-xl-4{padding-bottom:1.5rem!important}.pl-xl-4,.px-xl-4{padding-left:1.5rem!important}.p-xl-5{padding:3rem!important}.pt-xl-5,.py-xl-5{padding-top:3rem!important}.pr-xl-5,.px-xl-5{padding-right:3rem!important}.pb-xl-5,.py-xl-5{padding-bottom:3rem!important}.pl-xl-5,.px-xl-5{padding-left:3rem!important}.m-xl-n1{margin:-.25rem!important}.mt-xl-n1,.my-xl-n1{margin-top:-.25rem!important}.mr-xl-n1,.mx-xl-n1{margin-right:-.25rem!important}.mb-xl-n1,.my-xl-n1{margin-bottom:-.25rem!important}.ml-xl-n1,.mx-xl-n1{margin-left:-.25rem!important}.m-xl-n2{margin:-.5rem!important}.mt-xl-n2,.my-xl-n2{margin-top:-.5rem!important}.mr-xl-n2,.mx-xl-n2{margin-right:-.5rem!important}.mb-xl-n2,.my-xl-n2{margin-bottom:-.5rem!important}.ml-xl-n2,.mx-xl-n2{margin-left:-.5rem!important}.m-xl-n3{margin:-1rem!important}.mt-xl-n3,.my-xl-n3{margin-top:-1rem!important}.mr-xl-n3,.mx-xl-n3{margin-right:-1rem!important}.mb-xl-n3,.my-xl-n3{margin-bottom:-1rem!important}.ml-xl-n3,.mx-xl-n3{margin-left:-1rem!important}.m-xl-n4{margin:-1.5rem!important}.mt-xl-n4,.my-xl-n4{margin-top:-1.5rem!important}.mr-xl-n4,.mx-xl-n4{margin-right:-1.5rem!important}.mb-xl-n4,.my-xl-n4{margin-bottom:-1.5rem!important}.ml-xl-n4,.mx-xl-n4{margin-left:-1.5rem!important}.m-xl-n5{margin:-3rem!important}.mt-xl-n5,.my-xl-n5{margin-top:-3rem!important}.mr-xl-n5,.mx-xl-n5{margin-right:-3rem!important}.mb-xl-n5,.my-xl-n5{margin-bottom:-3rem!important}.ml-xl-n5,.mx-xl-n5{margin-left:-3rem!important}.m-xl-auto{margin:auto!important}.mt-xl-auto,.my-xl-auto{margin-top:auto!important}.mr-xl-auto,.mx-xl-auto{margin-right:auto!important}.mb-xl-auto,.my-xl-auto{margin-bottom:auto!important}.ml-xl-auto,.mx-xl-auto{margin-left:auto!important}}@media (min-width:1450px){.m-2xl-0{margin:0!important}.mt-2xl-0,.my-2xl-0{margin-top:0!important}.mr-2xl-0,.mx-2xl-0{margin-right:0!important}.mb-2xl-0,.my-2xl-0{margin-bottom:0!important}.ml-2xl-0,.mx-2xl-0{margin-left:0!important}.m-2xl-1{margin:.25rem!important}.mt-2xl-1,.my-2xl-1{margin-top:.25rem!important}.mr-2xl-1,.mx-2xl-1{margin-right:.25rem!important}.mb-2xl-1,.my-2xl-1{margin-bottom:.25rem!important}.ml-2xl-1,.mx-2xl-1{margin-left:.25rem!important}.m-2xl-2{margin:.5rem!important}.mt-2xl-2,.my-2xl-2{margin-top:.5rem!important}.mr-2xl-2,.mx-2xl-2{margin-right:.5rem!important}.mb-2xl-2,.my-2xl-2{margin-bottom:.5rem!important}.ml-2xl-2,.mx-2xl-2{margin-left:.5rem!important}.m-2xl-3{margin:1rem!important}.mt-2xl-3,.my-2xl-3{margin-top:1rem!important}.mr-2xl-3,.mx-2xl-3{margin-right:1rem!important}.mb-2xl-3,.my-2xl-3{margin-bottom:1rem!important}.ml-2xl-3,.mx-2xl-3{margin-left:1rem!important}.m-2xl-4{margin:1.5rem!important}.mt-2xl-4,.my-2xl-4{margin-top:1.5rem!important}.mr-2xl-4,.mx-2xl-4{margin-right:1.5rem!important}.mb-2xl-4,.my-2xl-4{margin-bottom:1.5rem!important}.ml-2xl-4,.mx-2xl-4{margin-left:1.5rem!important}.m-2xl-5{margin:3rem!important}.mt-2xl-5,.my-2xl-5{margin-top:3rem!important}.mr-2xl-5,.mx-2xl-5{margin-right:3rem!important}.mb-2xl-5,.my-2xl-5{margin-bottom:3rem!important}.ml-2xl-5,.mx-2xl-5{margin-left:3rem!important}.p-2xl-0{padding:0!important}.pt-2xl-0,.py-2xl-0{padding-top:0!important}.pr-2xl-0,.px-2xl-0{padding-right:0!important}.pb-2xl-0,.py-2xl-0{padding-bottom:0!important}.pl-2xl-0,.px-2xl-0{padding-left:0!important}.p-2xl-1{padding:.25rem!important}.pt-2xl-1,.py-2xl-1{padding-top:.25rem!important}.pr-2xl-1,.px-2xl-1{padding-right:.25rem!important}.pb-2xl-1,.py-2xl-1{padding-bottom:.25rem!important}.pl-2xl-1,.px-2xl-1{padding-left:.25rem!important}.p-2xl-2{padding:.5rem!important}.pt-2xl-2,.py-2xl-2{padding-top:.5rem!important}.pr-2xl-2,.px-2xl-2{padding-right:.5rem!important}.pb-2xl-2,.py-2xl-2{padding-bottom:.5rem!important}.pl-2xl-2,.px-2xl-2{padding-left:.5rem!important}.p-2xl-3{padding:1rem!important}.pt-2xl-3,.py-2xl-3{padding-top:1rem!important}.pr-2xl-3,.px-2xl-3{padding-right:1rem!important}.pb-2xl-3,.py-2xl-3{padding-bottom:1rem!important}.pl-2xl-3,.px-2xl-3{padding-left:1rem!important}.p-2xl-4{padding:1.5rem!important}.pt-2xl-4,.py-2xl-4{padding-top:1.5rem!important}.pr-2xl-4,.px-2xl-4{padding-right:1.5rem!important}.pb-2xl-4,.py-2xl-4{padding-bottom:1.5rem!important}.pl-2xl-4,.px-2xl-4{padding-left:1.5rem!important}.p-2xl-5{padding:3rem!important}.pt-2xl-5,.py-2xl-5{padding-top:3rem!important}.pr-2xl-5,.px-2xl-5{padding-right:3rem!important}.pb-2xl-5,.py-2xl-5{padding-bottom:3rem!important}.pl-2xl-5,.px-2xl-5{padding-left:3rem!important}.m-2xl-n1{margin:-.25rem!important}.mt-2xl-n1,.my-2xl-n1{margin-top:-.25rem!important}.mr-2xl-n1,.mx-2xl-n1{margin-right:-.25rem!important}.mb-2xl-n1,.my-2xl-n1{margin-bottom:-.25rem!important}.ml-2xl-n1,.mx-2xl-n1{margin-left:-.25rem!important}.m-2xl-n2{margin:-.5rem!important}.mt-2xl-n2,.my-2xl-n2{margin-top:-.5rem!important}.mr-2xl-n2,.mx-2xl-n2{margin-right:-.5rem!important}.mb-2xl-n2,.my-2xl-n2{margin-bottom:-.5rem!important}.ml-2xl-n2,.mx-2xl-n2{margin-left:-.5rem!important}.m-2xl-n3{margin:-1rem!important}.mt-2xl-n3,.my-2xl-n3{margin-top:-1rem!important}.mr-2xl-n3,.mx-2xl-n3{margin-right:-1rem!important}.mb-2xl-n3,.my-2xl-n3{margin-bottom:-1rem!important}.ml-2xl-n3,.mx-2xl-n3{margin-left:-1rem!important}.m-2xl-n4{margin:-1.5rem!important}.mt-2xl-n4,.my-2xl-n4{margin-top:-1.5rem!important}.mr-2xl-n4,.mx-2xl-n4{margin-right:-1.5rem!important}.mb-2xl-n4,.my-2xl-n4{margin-bottom:-1.5rem!important}.ml-2xl-n4,.mx-2xl-n4{margin-left:-1.5rem!important}.m-2xl-n5{margin:-3rem!important}.mt-2xl-n5,.my-2xl-n5{margin-top:-3rem!important}.mr-2xl-n5,.mx-2xl-n5{margin-right:-3rem!important}.mb-2xl-n5,.my-2xl-n5{margin-bottom:-3rem!important}.ml-2xl-n5,.mx-2xl-n5{margin-left:-3rem!important}.m-2xl-auto{margin:auto!important}.mt-2xl-auto,.my-2xl-auto{margin-top:auto!important}.mr-2xl-auto,.mx-2xl-auto{margin-right:auto!important}.mb-2xl-auto,.my-2xl-auto{margin-bottom:auto!important}.ml-2xl-auto,.mx-2xl-auto{margin-left:auto!important}}.stretched-link:after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;pointer-events:auto;content:"";background-color:transparent}.text-monospace{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace!important}.text-justify{text-align:justify!important}.text-wrap{white-space:normal!important}.text-nowrap{white-space:nowrap!important}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-left{text-align:left!important}.text-right{text-align:right!important}.text-center{text-align:center!important}@media (min-width:576px){.text-sm-left{text-align:left!important}.text-sm-right{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:768px){.text-md-left{text-align:left!important}.text-md-right{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:992px){.text-lg-left{text-align:left!important}.text-lg-right{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.text-xl-left{text-align:left!important}.text-xl-right{text-align:right!important}.text-xl-center{text-align:center!important}}@media (min-width:1450px){.text-2xl-left{text-align:left!important}.text-2xl-right{text-align:right!important}.text-2xl-center{text-align:center!important}}.text-lowercase{text-transform:lowercase!important}.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.font-weight-light{font-weight:300!important}.font-weight-lighter{font-weight:lighter!important}.font-weight-normal{font-weight:400!important}.font-weight-bold,cd-about dt{font-weight:700!important}.font-weight-bolder{font-weight:bolder!important}.font-italic{font-style:italic!important}.text-white{color:#fff!important}.text-primary{color:#2b99a8!important}a.text-primary:focus,a.text-primary:hover{color:#1b626b!important}.text-secondary{color:#374249!important}a.text-secondary:focus,a.text-secondary:hover{color:#161b1d!important}.text-success{color:#0b0!important}a.text-success:focus,a.text-success:hover{color:#006f00!important}.text-info{color:#2b99a8!important}a.text-info:focus,a.text-info:hover{color:#1b626b!important}.text-warning{color:#ffc200!important}a.text-warning:focus,a.text-warning:hover{color:#b38800!important}.text-danger{color:#ef5c55!important}a.text-danger:focus,a.text-danger:hover{color:#e21f15!important}.text-light{color:#f8f9fa!important}a.text-light:focus,a.text-light:hover{color:#cbd3da!important}.text-dark{color:#777!important}a.text-dark:focus,a.text-dark:hover{color:#515151!important}.text-accent{color:#ef5c55!important}a.text-accent:focus,a.text-accent:hover{color:#e21f15!important}.text-warning-dark{color:#fd7e14!important}a.text-warning-dark:focus,a.text-warning-dark:hover{color:#c35a02!important}.text-body{color:#212529!important}.text-muted{color:#6c757d!important}.text-black-50{color:rgba(0,0,0,.5)!important}.text-white-50{color:hsla(0,0%,100%,.5)!important}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:initial;border:0}.text-decoration-none{text-decoration:none!important}.text-break{word-break:break-word!important;overflow-wrap:break-word!important}.text-reset{color:inherit!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}@media print{*,:after,:before{text-shadow:none!important;box-shadow:none!important}a:not(.btn){text-decoration:underline}abbr[title]:after{content:" (" attr(title) ")"}pre{white-space:pre-wrap!important}blockquote,pre{border:1px solid #adb5bd;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}@page{size:a3}.container,body{min-width:992px!important}.navbar{display:none}.badge{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #dee2e6!important}.table-dark{color:inherit}.table-dark tbody+tbody,.table-dark td,.table-dark th,.table-dark thead th{border-color:#dee2e6}.table .thead-dark th{color:inherit;border-color:#dee2e6}}
+/*!
+Fork Awesome 1.1.7
+License - https://forkaweso.me/Fork-Awesome/license
+
+Copyright 2018 Dave Gandy & Fork Awesome
+
+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.
+ */@font-face{font-family:ForkAwesome;src:url(forkawesome-webfont.e182ad6df04f9177b326.eot?v=1.1.7);src:url(forkawesome-webfont.e182ad6df04f9177b326.eot?#iefix&v=1.1.7) format("embedded-opentype"),url(forkawesome-webfont.7c20758e3e7c7dff7c8d.woff2?v=1.1.7) format("woff2"),url(forkawesome-webfont.2dfb5f36fc148e26e398.woff?v=1.1.7) format("woff"),url(forkawesome-webfont.ee4d8bfd0af89fc714a2.ttf?v=1.1.7) format("truetype"),url(forkawesome-webfont.86541105409e56d17291.svg?v=1.1.7#forkawesomeregular) format("svg");font-weight:400;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 ForkAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.3333333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa,.fa-fw{width:1.2857142857em;text-align:center}.fa-ul{padding-left:0;margin-left:2.1428571429em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.1428571429em;width:2.1428571429em;top:.1428571429em;text-align:center}.fa-li.fa-lg{left:-1.8571428571em}.fa-border{padding:.2em .25em .15em;border:.08em solid #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{animation:fa-spin 2s linear infinite}.fa-pulse{animation:fa-spin 1s steps(8) infinite}@keyframes fa-spin{0%{transform:rotate(0deg)}to{transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";transform:scaleX(-1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";transform:scaleY(-1)}:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:""}.fa-music:before{content:""}.fa-search:before{content:""}.fa-envelope-o:before{content:""}.fa-heart:before{content:""}.fa-star:before{content:""}.fa-star-o:before{content:""}.fa-user:before{content:""}.fa-film:before{content:""}.fa-th-large:before{content:""}.fa-th:before{content:""}.fa-th-list:before{content:""}.fa-check:before{content:""}.fa-close:before,.fa-remove:before,.fa-times:before{content:""}.fa-search-plus:before{content:""}.fa-search-minus:before{content:""}.fa-power-off:before{content:""}.fa-signal:before{content:""}.fa-cog:before,.fa-gear:before{content:""}.fa-trash-o:before{content:""}.fa-home:before{content:""}.fa-file-o:before{content:""}.fa-clock-o:before{content:""}.fa-road:before{content:""}.fa-download:before{content:""}.fa-arrow-circle-o-down:before{content:""}.fa-arrow-circle-o-up:before{content:""}.fa-inbox:before{content:""}.fa-play-circle-o:before{content:""}.fa-repeat:before,.fa-rotate-right:before{content:""}.fa-refresh:before,.fa-sync:before{content:""}.fa-list-alt:before{content:""}.fa-lock:before{content:""}.fa-flag:before{content:""}.fa-headphones:before{content:""}.fa-volume-off:before{content:""}.fa-volume-down:before{content:""}.fa-volume-up:before{content:""}.fa-qrcode:before{content:""}.fa-barcode:before{content:""}.fa-tag:before{content:""}.fa-tags:before{content:""}.fa-book:before{content:""}.fa-bookmark:before{content:""}.fa-print:before{content:""}.fa-camera:before{content:""}.fa-font:before{content:""}.fa-bold:before{content:""}.fa-italic:before{content:""}.fa-text-height:before{content:""}.fa-text-width:before{content:""}.fa-align-left:before{content:""}.fa-align-center:before{content:""}.fa-align-right:before{content:""}.fa-align-justify:before{content:""}.fa-list:before{content:""}.fa-dedent:before,.fa-outdent:before{content:""}.fa-indent:before{content:""}.fa-video-camera:before,.fa-video:before{content:""}.fa-image:before,.fa-photo:before,.fa-picture-o:before{content:""}.fa-pencil:before{content:""}.fa-map-marker:before{content:""}.fa-adjust:before{content:""}.fa-tint:before{content:""}.fa-edit:before,.fa-pencil-square-o:before{content:""}.fa-share-square-o:before{content:""}.fa-check-square-o:before{content:""}.fa-arrows:before{content:""}.fa-step-backward:before{content:""}.fa-fast-backward:before{content:""}.fa-backward:before{content:""}.fa-play:before{content:""}.fa-pause:before{content:""}.fa-stop:before{content:""}.fa-forward:before{content:""}.fa-fast-forward:before{content:""}.fa-step-forward:before{content:""}.fa-eject:before{content:""}.fa-chevron-left:before{content:""}.fa-chevron-right:before{content:""}.fa-plus-circle:before{content:""}.fa-minus-circle:before{content:""}.fa-times-circle:before{content:""}.fa-check-circle:before{content:""}.fa-question-circle:before{content:""}.fa-info-circle:before{content:""}.fa-crosshairs:before{content:""}.fa-times-circle-o:before{content:""}.fa-check-circle-o:before{content:""}.fa-ban:before{content:""}.fa-arrow-left:before{content:""}.fa-arrow-right:before{content:""}.fa-arrow-up:before{content:""}.fa-arrow-down:before{content:""}.fa-mail-forward:before,.fa-share:before{content:""}.fa-expand:before{content:""}.fa-compress:before{content:""}.fa-plus:before{content:""}.fa-minus:before{content:""}.fa-asterisk:before{content:""}.fa-exclamation-circle:before{content:""}.fa-gift:before{content:""}.fa-leaf:before{content:""}.fa-fire:before{content:""}.fa-eye:before{content:""}.fa-eye-slash:before{content:""}.fa-exclamation-triangle:before,.fa-warning:before{content:""}.fa-plane:before{content:""}.fa-calendar:before{content:""}.fa-random:before{content:""}.fa-comment:before{content:""}.fa-magnet:before{content:""}.fa-chevron-up:before{content:""}.fa-chevron-down:before{content:""}.fa-retweet:before{content:""}.fa-shopping-cart:before{content:""}.fa-folder:before{content:""}.fa-folder-open:before{content:""}.fa-arrows-v:before{content:""}.fa-arrows-h:before{content:""}.fa-bar-chart-o:before,.fa-bar-chart:before{content:""}.fa-twitter-square:before{content:""}.fa-facebook-square:before{content:""}.fa-camera-retro:before{content:""}.fa-key:before{content:""}.fa-cogs:before,.fa-gears:before{content:""}.fa-comments:before{content:""}.fa-thumbs-o-up:before{content:""}.fa-thumbs-o-down:before{content:""}.fa-star-half:before{content:""}.fa-heart-o:before{content:""}.fa-sign-out:before{content:""}.fa-linkedin-square:before{content:""}.fa-thumb-tack:before{content:""}.fa-external-link:before{content:""}.fa-sign-in:before{content:""}.fa-trophy:before{content:""}.fa-github-square:before{content:""}.fa-upload:before{content:""}.fa-lemon-o:before{content:""}.fa-phone:before{content:""}.fa-square-o:before{content:""}.fa-bookmark-o:before{content:""}.fa-phone-square:before{content:""}.fa-twitter:before{content:""}.fa-facebook-f:before,.fa-facebook:before{content:""}.fa-github:before{content:""}.fa-unlock:before{content:""}.fa-credit-card:before{content:""}.fa-feed:before,.fa-rss:before{content:""}.fa-hdd-o:before{content:""}.fa-bullhorn:before{content:""}.fa-bell-o:before{content:""}.fa-certificate:before{content:""}.fa-hand-o-right:before{content:""}.fa-hand-o-left:before{content:""}.fa-hand-o-up:before{content:""}.fa-hand-o-down:before{content:""}.fa-arrow-circle-left:before{content:""}.fa-arrow-circle-right:before{content:""}.fa-arrow-circle-up:before{content:""}.fa-arrow-circle-down:before{content:""}.fa-globe:before{content:""}.fa-globe-e:before{content:""}.fa-globe-w:before{content:""}.fa-wrench:before{content:""}.fa-tasks:before{content:""}.fa-filter:before{content:""}.fa-briefcase:before{content:""}.fa-arrows-alt:before{content:""}.fa-community:before,.fa-group:before,.fa-users:before{content:""}.fa-chain:before,.fa-link:before{content:""}.fa-cloud:before{content:""}.fa-flask:before{content:""}.fa-cut:before,.fa-scissors:before{content:""}.fa-copy:before,.fa-files-o:before{content:""}.fa-paperclip:before{content:""}.fa-floppy-o:before,.fa-save:before{content:""}.fa-square:before{content:""}.fa-bars:before,.fa-navicon:before,.fa-reorder:before{content:""}.fa-list-ul:before{content:""}.fa-list-ol:before{content:""}.fa-strikethrough:before{content:""}.fa-underline:before{content:""}.fa-table:before{content:""}.fa-magic:before{content:""}.fa-truck:before{content:""}.fa-pinterest:before{content:""}.fa-pinterest-square:before{content:""}.fa-google-plus-square:before{content:""}.fa-google-plus-g:before,.fa-google-plus:before{content:""}.fa-money:before{content:""}.fa-caret-down:before{content:""}.fa-caret-up:before{content:""}.fa-caret-left:before{content:""}.fa-caret-right:before{content:""}.fa-columns:before{content:""}.fa-sort:before,.fa-unsorted:before{content:""}.fa-sort-desc:before,.fa-sort-down:before{content:""}.fa-sort-asc:before,.fa-sort-up:before{content:""}.fa-envelope:before{content:""}.fa-linkedin:before{content:""}.fa-rotate-left:before,.fa-undo:before{content:""}.fa-gavel:before,.fa-legal:before{content:""}.fa-dashboard:before,.fa-tachometer:before{content:""}.fa-comment-o:before{content:""}.fa-comments-o:before{content:""}.fa-bolt:before,.fa-flash:before{content:""}.fa-sitemap:before{content:""}.fa-umbrella:before{content:""}.fa-clipboard:before,.fa-paste:before{content:""}.fa-lightbulb-o:before{content:""}.fa-exchange:before{content:""}.fa-cloud-download:before{content:""}.fa-cloud-upload:before{content:""}.fa-user-md:before{content:""}.fa-stethoscope:before{content:""}.fa-suitcase:before{content:""}.fa-bell:before{content:""}.fa-coffee:before{content:""}.fa-cutlery:before,.fa-utensils:before{content:""}.fa-file-text-o:before{content:""}.fa-building-o:before{content:""}.fa-hospital-o:before{content:""}.fa-ambulance:before{content:""}.fa-medkit:before{content:""}.fa-fighter-jet:before{content:""}.fa-beer:before{content:""}.fa-h-square:before{content:""}.fa-plus-square:before{content:""}.fa-angle-double-left:before{content:""}.fa-angle-double-right:before{content:""}.fa-angle-double-up:before{content:""}.fa-angle-double-down:before{content:""}.fa-angle-left:before{content:""}.fa-angle-right:before{content:""}.fa-angle-up:before{content:""}.fa-angle-down:before{content:""}.fa-desktop:before{content:""}.fa-laptop:before{content:""}.fa-tablet:before{content:""}.fa-mobile-phone:before,.fa-mobile:before{content:""}.fa-circle-o:before{content:""}.fa-quote-left:before{content:""}.fa-quote-right:before{content:""}.fa-spinner:before{content:""}.fa-circle:before{content:""}.fa-mail-reply:before,.fa-reply:before{content:""}.fa-github-alt:before{content:""}.fa-folder-o:before{content:""}.fa-folder-open-o:before{content:""}.fa-smile-o:before{content:""}.fa-frown-o:before{content:""}.fa-meh-o:before{content:""}.fa-gamepad:before{content:""}.fa-keyboard-o:before{content:""}.fa-flag-o:before{content:""}.fa-flag-checkered:before{content:""}.fa-terminal:before{content:""}.fa-code:before{content:""}.fa-mail-reply-all:before,.fa-reply-all:before{content:""}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:""}.fa-location-arrow:before{content:""}.fa-crop:before{content:""}.fa-code-fork:before{content:""}.fa-chain-broken:before,.fa-unlink:before{content:""}.fa-question:before{content:""}.fa-info:before{content:""}.fa-exclamation:before{content:""}.fa-superscript:before{content:""}.fa-subscript:before{content:""}.fa-eraser:before{content:""}.fa-puzzle-piece:before{content:""}.fa-microphone:before{content:""}.fa-microphone-slash:before{content:""}.fa-shield:before{content:""}.fa-calendar-o:before{content:""}.fa-fire-extinguisher:before{content:""}.fa-rocket:before{content:""}.fa-maxcdn:before{content:""}.fa-chevron-circle-left:before{content:""}.fa-chevron-circle-right:before{content:""}.fa-chevron-circle-up:before{content:""}.fa-chevron-circle-down:before{content:""}.fa-html5:before{content:""}.fa-css3:before{content:""}.fa-anchor:before{content:""}.fa-unlock-alt:before{content:""}.fa-bullseye:before{content:""}.fa-ellipsis-h:before{content:""}.fa-ellipsis-v:before{content:""}.fa-rss-square:before{content:""}.fa-play-circle:before{content:""}.fa-ticket:before{content:""}.fa-minus-square:before{content:""}.fa-minus-square-o:before{content:""}.fa-level-up:before{content:""}.fa-level-down:before{content:""}.fa-check-square:before{content:""}.fa-pencil-square:before{content:""}.fa-external-link-square:before{content:""}.fa-share-square:before{content:""}.fa-compass:before{content:""}.fa-caret-square-o-down:before,.fa-toggle-down:before{content:""}.fa-caret-square-o-up:before,.fa-toggle-up:before{content:""}.fa-caret-square-o-right:before,.fa-toggle-right:before{content:""}.fa-eur:before,.fa-euro:before{content:""}.fa-gbp:before,.fa-pound:before{content:""}.fa-dollar:before,.fa-usd:before{content:""}.fa-inr:before,.fa-rupee:before{content:""}.fa-cny:before,.fa-jpy:before,.fa-rmb:before,.fa-yen:before{content:""}.fa-rouble:before,.fa-rub:before,.fa-ruble:before{content:""}.fa-krw:before,.fa-won:before{content:""}.fa-bitcoin:before,.fa-btc:before{content:""}.fa-file:before{content:""}.fa-file-text:before{content:""}.fa-sort-alpha-asc:before,.fa-sort-alpha-down:before{content:""}.fa-sort-alpha-desc:before,.fa-sort-alpha-up:before{content:""}.fa-sort-amount-asc:before,.fa-sort-amount-down:before{content:""}.fa-sort-amount-desc:before,.fa-sort-amount-up:before{content:""}.fa-sort-numeric-asc:before,.fa-sort-numeric-down:before{content:""}.fa-sort-numeric-desc:before,.fa-sort-numeric-up:before{content:""}.fa-thumbs-up:before{content:""}.fa-thumbs-down:before{content:""}.fa-youtube-square:before{content:""}.fa-youtube:before{content:""}.fa-xing:before{content:""}.fa-xing-square:before{content:""}.fa-youtube-play:before{content:""}.fa-dropbox:before{content:""}.fa-stack-overflow:before{content:""}.fa-instagram:before{content:""}.fa-flickr:before{content:""}.fa-adn:before{content:""}.fa-bitbucket:before{content:""}.fa-bitbucket-square:before{content:""}.fa-tumblr:before{content:""}.fa-tumblr-square:before{content:""}.fa-long-arrow-down:before{content:""}.fa-long-arrow-up:before{content:""}.fa-long-arrow-left:before{content:""}.fa-long-arrow-right:before{content:""}.fa-apple:before{content:""}.fa-windows:before{content:""}.fa-android:before{content:""}.fa-linux:before{content:""}.fa-dribbble:before{content:""}.fa-skype:before{content:""}.fa-foursquare:before{content:""}.fa-trello:before{content:""}.fa-female:before{content:""}.fa-male:before{content:""}.fa-gittip:before,.fa-gratipay:before{content:""}.fa-sun-o:before{content:""}.fa-moon-o:before{content:""}.fa-archive:before{content:""}.fa-bug:before{content:""}.fa-vk:before{content:""}.fa-weibo:before{content:""}.fa-renren:before{content:""}.fa-pagelines:before{content:""}.fa-stack-exchange:before{content:""}.fa-arrow-circle-o-right:before{content:""}.fa-arrow-circle-o-left:before{content:""}.fa-caret-square-o-left:before,.fa-toggle-left:before{content:""}.fa-dot-circle-o:before{content:""}.fa-wheelchair:before{content:""}.fa-vimeo-square:before{content:""}.fa-try:before,.fa-turkish-lira:before{content:""}.fa-plus-square-o:before{content:""}.fa-space-shuttle:before{content:""}.fa-slack:before{content:""}.fa-envelope-square:before{content:""}.fa-wordpress:before{content:""}.fa-openid:before{content:""}.fa-bank:before,.fa-institution:before,.fa-university:before{content:""}.fa-graduation-cap:before,.fa-mortar-board:before{content:""}.fa-yahoo:before{content:""}.fa-google:before{content:""}.fa-reddit:before{content:""}.fa-reddit-square:before{content:""}.fa-stumbleupon-circle:before{content:""}.fa-stumbleupon:before{content:""}.fa-delicious:before{content:""}.fa-digg:before{content:""}.fa-drupal:before{content:""}.fa-joomla:before{content:""}.fa-language:before{content:""}.fa-fax:before{content:""}.fa-building:before{content:""}.fa-child:before{content:""}.fa-paw:before{content:""}.fa-spoon:before,.fa-utensil-spoon:before{content:""}.fa-cube:before{content:""}.fa-cubes:before{content:""}.fa-behance:before{content:""}.fa-behance-square:before{content:""}.fa-steam:before{content:""}.fa-steam-square:before{content:""}.fa-recycle:before{content:""}.fa-automobile:before,.fa-car:before{content:""}.fa-cab:before,.fa-taxi:before{content:""}.fa-tree:before{content:""}.fa-spotify:before{content:""}.fa-deviantart:before{content:""}.fa-soundcloud:before{content:""}.fa-database:before{content:""}.fa-file-pdf-o:before{content:""}.fa-file-word-o:before{content:""}.fa-file-excel-o:before{content:""}.fa-file-powerpoint-o:before{content:""}.fa-file-image-o:before,.fa-file-photo-o:before,.fa-file-picture-o:before{content:""}.fa-file-archive-o:before,.fa-file-zip-o:before{content:""}.fa-file-audio-o:before,.fa-file-sound-o:before{content:""}.fa-file-movie-o:before,.fa-file-video-o:before{content:""}.fa-file-code-o:before{content:""}.fa-vine:before{content:""}.fa-codepen:before{content:""}.fa-jsfiddle:before{content:""}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-ring:before,.fa-life-saver:before,.fa-support:before{content:""}.fa-circle-o-notch:before{content:""}.fa-ra:before,.fa-rebel:before,.fa-resistance:before{content:""}.fa-empire:before,.fa-ge:before{content:""}.fa-git-square:before{content:""}.fa-git:before{content:""}.fa-hacker-news:before,.fa-y-combinator-square:before,.fa-yc-square:before{content:""}.fa-tencent-weibo:before{content:""}.fa-qq:before{content:""}.fa-wechat:before,.fa-weixin:before{content:""}.fa-paper-plane:before,.fa-send:before{content:""}.fa-paper-plane-o:before,.fa-send-o:before{content:""}.fa-history:before{content:""}.fa-circle-thin:before{content:""}.fa-header:before,.fa-heading:before{content:""}.fa-paragraph:before{content:""}.fa-sliders:before{content:""}.fa-share-alt:before{content:""}.fa-share-alt-square:before{content:""}.fa-bomb:before{content:""}.fa-futbol-o:before,.fa-soccer-ball-o:before{content:""}.fa-tty:before{content:""}.fa-binoculars:before{content:""}.fa-plug:before{content:""}.fa-slideshare:before{content:""}.fa-twitch:before{content:""}.fa-yelp:before{content:""}.fa-newspaper-o:before{content:""}.fa-wifi:before{content:""}.fa-calculator:before{content:""}.fa-paypal:before{content:""}.fa-google-wallet:before{content:""}.fa-cc-visa:before{content:""}.fa-cc-mastercard:before{content:""}.fa-cc-discover:before{content:""}.fa-cc-amex:before{content:""}.fa-cc-paypal:before{content:""}.fa-cc-stripe:before{content:""}.fa-bell-slash:before{content:""}.fa-bell-slash-o:before{content:""}.fa-trash:before{content:""}.fa-copyright:before{content:""}.fa-at:before{content:""}.fa-eyedropper:before{content:""}.fa-paint-brush:before{content:""}.fa-birthday-cake:before{content:""}.fa-area-chart:before{content:""}.fa-pie-chart:before{content:""}.fa-line-chart:before{content:""}.fa-lastfm:before{content:""}.fa-lastfm-square:before{content:""}.fa-toggle-off:before{content:""}.fa-toggle-on:before{content:""}.fa-bicycle:before{content:""}.fa-bus:before{content:""}.fa-ioxhost:before{content:""}.fa-angellist:before{content:""}.fa-cc:before,.fa-closed-captioning:before{content:""}.fa-ils:before,.fa-shekel:before,.fa-sheqel:before{content:""}.fa-meanpath:before{content:""}.fa-buysellads:before{content:""}.fa-connectdevelop:before{content:""}.fa-dashcube:before{content:""}.fa-forumbee:before{content:""}.fa-leanpub:before{content:""}.fa-sellsy:before{content:""}.fa-shirtsinbulk:before{content:""}.fa-simplybuilt:before{content:""}.fa-skyatlas:before{content:""}.fa-cart-plus:before{content:""}.fa-cart-arrow-down:before{content:""}.fa-diamond:before,.fa-gem:before{content:""}.fa-ship:before{content:""}.fa-user-secret:before{content:""}.fa-motorcycle:before{content:""}.fa-street-view:before{content:""}.fa-heartbeat:before{content:""}.fa-venus:before{content:""}.fa-mars:before{content:""}.fa-mercury:before{content:""}.fa-intersex:before,.fa-transgender:before{content:""}.fa-transgender-alt:before{content:""}.fa-venus-double:before{content:""}.fa-mars-double:before{content:""}.fa-venus-mars:before{content:""}.fa-mars-stroke:before{content:""}.fa-mars-stroke-v:before{content:""}.fa-mars-stroke-h:before{content:""}.fa-neuter:before{content:""}.fa-genderless:before{content:""}.fa-facebook-official:before{content:""}.fa-pinterest-p:before{content:""}.fa-whatsapp:before{content:""}.fa-server:before{content:""}.fa-user-plus:before{content:""}.fa-user-times:before{content:""}.fa-bed:before,.fa-hotel:before{content:""}.fa-viacoin:before{content:""}.fa-train:before{content:""}.fa-subway:before{content:""}.fa-medium:before{content:""}.fa-medium-square:before{content:""}.fa-y-combinator:before,.fa-yc:before{content:""}.fa-optin-monster:before{content:""}.fa-opencart:before{content:""}.fa-expeditedssl:before{content:""}.fa-battery-4:before,.fa-battery-full:before,.fa-battery:before{content:""}.fa-battery-3:before,.fa-battery-three-quarters:before{content:""}.fa-battery-2:before,.fa-battery-half:before{content:""}.fa-battery-1:before,.fa-battery-quarter:before{content:""}.fa-battery-0:before,.fa-battery-empty:before{content:""}.fa-mouse-pointer:before{content:""}.fa-i-cursor:before{content:""}.fa-object-group:before{content:""}.fa-object-ungroup:before{content:""}.fa-sticky-note:before{content:""}.fa-sticky-note-o:before{content:""}.fa-cc-jcb:before{content:""}.fa-cc-diners-club:before{content:""}.fa-clone:before{content:""}.fa-balance-scale:before{content:""}.fa-hourglass-o:before{content:""}.fa-hourglass-1:before,.fa-hourglass-start:before{content:""}.fa-hourglass-2:before,.fa-hourglass-half:before{content:""}.fa-hourglass-3:before,.fa-hourglass-end:before{content:""}.fa-hourglass:before{content:""}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:""}.fa-hand-paper-o:before,.fa-hand-stop-o:before{content:""}.fa-hand-scissors-o:before{content:""}.fa-hand-lizard-o:before{content:""}.fa-hand-spock-o:before{content:""}.fa-hand-pointer-o:before{content:""}.fa-hand-peace-o:before{content:""}.fa-trademark:before{content:""}.fa-registered:before{content:""}.fa-creative-commons:before{content:""}.fa-gg:before{content:""}.fa-gg-circle:before{content:""}.fa-tripadvisor:before{content:""}.fa-odnoklassniki:before{content:""}.fa-odnoklassniki-square:before{content:""}.fa-get-pocket:before{content:""}.fa-wikipedia-w:before{content:""}.fa-safari:before{content:""}.fa-chrome:before{content:""}.fa-firefox:before{content:""}.fa-opera:before{content:""}.fa-internet-explorer:before{content:""}.fa-television:before,.fa-tv:before{content:""}.fa-contao:before{content:""}.fa-500px:before{content:""}.fa-amazon:before{content:""}.fa-calendar-plus-o:before{content:""}.fa-calendar-minus-o:before{content:""}.fa-calendar-times-o:before{content:""}.fa-calendar-check-o:before{content:""}.fa-industry:before{content:""}.fa-map-pin:before{content:""}.fa-map-signs:before{content:""}.fa-map-o:before{content:""}.fa-map:before{content:""}.fa-commenting:before{content:""}.fa-commenting-o:before{content:""}.fa-houzz:before{content:""}.fa-vimeo-v:before,.fa-vimeo:before{content:""}.fa-black-tie:before{content:""}.fa-fonticons:before{content:""}.fa-reddit-alien:before{content:""}.fa-edge:before{content:""}.fa-credit-card-alt:before{content:""}.fa-codiepie:before{content:""}.fa-modx:before{content:""}.fa-fort-awesome:before{content:""}.fa-usb:before{content:""}.fa-product-hunt:before{content:""}.fa-mixcloud:before{content:""}.fa-scribd:before{content:""}.fa-pause-circle:before{content:""}.fa-pause-circle-o:before{content:""}.fa-stop-circle:before{content:""}.fa-stop-circle-o:before{content:""}.fa-shopping-bag:before{content:""}.fa-shopping-basket:before{content:""}.fa-hashtag:before{content:""}.fa-bluetooth:before{content:""}.fa-bluetooth-b:before{content:""}.fa-percent:before{content:""}.fa-gitlab:before{content:""}.fa-wpbeginner:before{content:""}.fa-wpforms:before{content:""}.fa-envira:before{content:""}.fa-universal-access:before{content:""}.fa-wheelchair-alt:before{content:""}.fa-question-circle-o:before{content:""}.fa-blind:before{content:""}.fa-audio-description:before{content:""}.fa-phone-volume:before,.fa-volume-control-phone:before{content:""}.fa-braille:before{content:""}.fa-assistive-listening-systems:before{content:""}.fa-american-sign-language-interpreting:before,.fa-asl-interpreting:before{content:""}.fa-deaf:before,.fa-deafness:before,.fa-hard-of-hearing:before{content:""}.fa-glide:before{content:""}.fa-glide-g:before{content:""}.fa-sign-language:before,.fa-signing:before{content:""}.fa-low-vision:before{content:""}.fa-viadeo:before{content:""}.fa-viadeo-square:before{content:""}.fa-snapchat:before{content:""}.fa-snapchat-ghost:before{content:""}.fa-snapchat-square:before{content:""}.fa-first-order:before{content:""}.fa-yoast:before{content:""}.fa-themeisle:before{content:""}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:""}.fa-fa:before,.fa-font-awesome:before{content:""}.fa-handshake-o:before{content:""}.fa-envelope-open:before{content:""}.fa-envelope-open-o:before{content:""}.fa-linode:before{content:""}.fa-address-book:before{content:""}.fa-address-book-o:before{content:""}.fa-address-card:before,.fa-vcard:before{content:""}.fa-address-card-o:before,.fa-vcard-o:before{content:""}.fa-user-circle:before{content:""}.fa-user-circle-o:before{content:""}.fa-user-o:before{content:""}.fa-id-badge:before{content:""}.fa-drivers-license:before,.fa-id-card:before{content:""}.fa-drivers-license-o:before,.fa-id-card-o:before{content:""}.fa-quora:before{content:""}.fa-free-code-camp:before{content:""}.fa-telegram:before{content:""}.fa-thermometer-4:before,.fa-thermometer-full:before,.fa-thermometer:before{content:""}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:""}.fa-thermometer-2:before,.fa-thermometer-half:before{content:""}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:""}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:""}.fa-shower:before{content:""}.fa-bath:before,.fa-bathtub:before,.fa-s15:before{content:""}.fa-podcast:before{content:""}.fa-window-maximize:before{content:""}.fa-window-minimize:before{content:""}.fa-window-restore:before{content:""}.fa-times-rectangle:before,.fa-window-close:before{content:""}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:""}.fa-bandcamp:before{content:""}.fa-grav:before{content:""}.fa-etsy:before{content:""}.fa-imdb:before{content:""}.fa-ravelry:before{content:""}.fa-eercast:before{content:""}.fa-microchip:before{content:""}.fa-snowflake-o:before{content:""}.fa-superpowers:before{content:""}.fa-wpexplorer:before{content:""}.fa-meetup:before{content:""}.fa-mastodon:before{content:""}.fa-mastodon-alt:before{content:""}.fa-fork-awesome:before,.fa-fork-circle:before{content:""}.fa-peertube:before{content:""}.fa-diaspora:before{content:""}.fa-friendica:before{content:""}.fa-gnu-social:before{content:""}.fa-liberapay-square:before{content:""}.fa-liberapay:before{content:""}.fa-scuttlebutt:before,.fa-ssb:before{content:""}.fa-hubzilla:before{content:""}.fa-social-home:before{content:""}.fa-artstation:before{content:""}.fa-discord:before{content:""}.fa-discord-alt:before{content:""}.fa-patreon:before{content:""}.fa-snowdrift:before{content:""}.fa-activitypub:before{content:""}.fa-ethereum:before{content:""}.fa-keybase:before{content:""}.fa-shaarli:before{content:""}.fa-shaarli-o:before{content:""}.fa-cut-key:before,.fa-key-modern:before{content:""}.fa-xmpp:before{content:""}.fa-archive-org:before{content:""}.fa-freedombox:before{content:""}.fa-facebook-messenger:before{content:""}.fa-debian:before{content:""}.fa-mastodon-square:before{content:""}.fa-tipeee:before{content:""}.fa-react:before{content:""}.fa-dogmazic:before{content:""}.fa-zotero:before{content:""}.fa-nodejs:before{content:""}.fa-nextcloud:before{content:""}.fa-nextcloud-square:before{content:""}.fa-hackaday:before{content:""}.fa-laravel:before{content:""}.fa-signalapp:before{content:""}.fa-gnupg:before{content:""}.fa-php:before{content:""}.fa-ffmpeg:before{content:""}.fa-joplin:before{content:""}.fa-syncthing:before{content:""}.fa-inkscape:before{content:""}.fa-matrix-org:before{content:""}.fa-pixelfed:before{content:""}.fa-bootstrap:before{content:""}.fa-dev-to:before{content:""}.fa-hashnode:before{content:""}.fa-jirafeau:before{content:""}.fa-emby:before{content:""}.fa-wikidata:before{content:""}.fa-gimp:before{content:""}.fa-c:before{content:""}.fa-digitalocean:before{content:""}.fa-att:before{content:""}.fa-gitea:before{content:""}.fa-file-epub:before{content:""}.fa-python:before{content:""}.fa-archlinux:before{content:""}.fa-pleroma:before{content:""}.fa-unsplash:before{content:""}.fa-hackster:before{content:""}.fa-spell-check:before{content:""}.fa-moon:before{content:""}.fa-sun:before{content:""}.fa-f-droid:before{content:""}.fa-biometric:before{content:""}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}.info-card-popover-cluster-status{max-height:20vh;max-width:23vw}.info-card-popover-cluster-status .popover-body{font-size:1rem;max-height:19vh;max-width:100%;overflow:auto}@media (max-width:calc(1200px - 1px)){.info-card-popover-cluster-status{max-width:31vw}}@media (max-width:calc(992px - 1px)){.info-card-popover-cluster-status{max-width:46vw}}@media (max-width:calc(768px - 1px)){.info-card-popover-cluster-status{max-width:83vw}}.info-card-content-clickable{border:1px solid #e9ecef;border-radius:3px;cursor:pointer;padding:7px}.info-card-content-clickable:hover{background-color:#e9ecef;border-color:#ced4da}html{background-color:#fff}body,html{font-size:12px;height:100%;width:100%}option{font-style:normal;font-weight:400}.full-height{height:100vh}.full-width{width:100vw}.vertical-align{align-items:center;display:flex}.horizontal-align{display:flex;justify-content:center}.loading{left:50%;position:absolute;top:50%}.margin-right-md{margin-right:15px}.no-border{border:0;box-shadow:0 0 0!important}.italic{font-style:italic}.bold{font-weight:700}.text-right{text-align:right}.text-monospace{font-family:monospace}.text-pre-wrap{white-space:pre-wrap}.text-pre{white-space:pre}.border-danger{border-left:4px solid #ef5c55}.border-info{border-left:4px solid #2b99a8}.border-success{border-left:4px solid #0b0}.custom-control-input.is-valid~.custom-control-label,.was-validated .custom-control-input:valid~.custom-control-label{color:initial}.custom-control-input.is-valid:checked~.custom-control-label:before,.was-validated .custom-control-input:valid:checked~.custom-control-label:before{background-color:#2b99a8;border-color:#2b99a8}.custom-control-input.is-valid~.custom-control-label:before,.was-validated .custom-control-input:valid~.custom-control-label:before{border-color:#adb5bd}.custom-control-input.is-valid:focus~.custom-control-label:before,.was-validated .custom-control-input:valid:focus~.custom-control-label:before{box-shadow:0 0 0 .2rem rgba(43,153,168,.25)}.custom-control-input.is-valid:focus:not(:checked)~.custom-control-label:before,.was-validated .custom-control-input:valid:focus:not(:checked)~.custom-control-label:before{border-color:#76d0dc}.btn-light{background-color:#fff;border-color:#ced4da!important}.btn-light:hover{background-color:#dee2e6;border-color:#6c757d!important}.btn-light:disabled{background-color:#e9ecef;border-color:#ced4da!important}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:0}.btn.disabled{border:0;box-shadow:none}.btn-primary .badge{background-color:#e9ecef;color:#2b99a8}.btn-group>.btn>i.fa,.cd-datatable-actions button.btn i.fa{margin-right:5px}.card-footer button.btn:not(:first-child){margin-left:5px}.dropdown-menu{min-width:50px;z-index:999999}.dropdown-menu button.dropdown-item:focus{outline:none}.dropdown-menu>li>a{cursor:pointer}.dropdown-menu>li>a>i.fa{margin-right:5px}.dropdown-menu>.active>a{background-color:#2b99a8;color:#e9ecef}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{background-color:#21747f}.dataTables_wrapper .dropdown-menu>li.dropdown-divider{cursor:auto}.required:after{color:#ef5c55;content:"*";font-size:1.167rem;padding-left:4px}.form-footer{display:flex;width:100%}.cd-form-control,.form-control{display:table-cell}.cd-form-control:focus,.form-control:focus{border-color:rgba(43,153,168,.8);box-shadow:0 0 3px 2px rgba(43,153,168,.5);outline:0}.custom-checkbox{padding-top:7px}.invalid-feedback{display:block}.container-fluid,.container-lg,.container-md,.container-sm,.container-xl{padding:0 30px}.ceph-icon{background:url(Ceph_Logo.487a0001b327fa7f5232.svg)}.prometheus-icon{background:url(prometheus_logo.8b3183e5a2db0e87bb2b.svg)}.custom-icon{background-clip:padding-box;background-repeat:no-repeat;background-size:contain;margin-right:8px;padding:10px}.nav-tabs{margin-bottom:1rem}#toast-container{margin-top:2vw}@media (max-width:1600px){#toast-container{margin-top:2.5vw}}@media (max-width:calc(992px - 1px)){#toast-container{margin-top:9vw}}@media (max-width:900px){#toast-container{margin-top:10vw}}@media (max-width:319px){#toast-container{margin-top:11vw}}@media (max-width:260px){#toast-container{margin-top:14vw}}.toast-message>ul{margin:0;padding-left:1rem}.noscript{padding-top:5em}@media (min-width:576px){.cd-col-form-label,.col-form-label{text-align:right}}.cd-col-form-label,.col-form-label{font-weight:700}.password-strength-level{flex:100%;margin-top:2px}.password-strength-level .ok,.password-strength-level .strong,.password-strength-level .very-strong,.password-strength-level .weak{border-radius:.25rem;height:13px}.password-strength-level .weak{background:#ef5c55;width:25%}.password-strength-level .ok{background:#ffc200;width:50%}.password-strength-level .strong{background:#0b0;width:75%}.password-strength-level .very-strong{background:#006f00;width:100%}.badge-background-gray,.badge-hdd{background-color:#6c757d;color:#fff}.badge-background-primary,.badge-ssd{background-color:#2b99a8;color:#fff}.badge-tab{background-color:#e9ecef;color:#495057}tree-root tree-viewport{min-height:1em}tags-input .tags{border:1px solid #ced4da;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.09)}.card-header{font-size:1.3em}.card-body h2:first-child{margin-top:0}.disabled{pointer-events:none}.clickable,a{cursor:pointer}
\ No newline at end of file
"requires": true,
"dependencies": {
"@aduh95/viz.js": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/@aduh95/viz.js/-/viz.js-3.2.0.tgz",
- "integrity": "sha512-x31hjqWcLePXK3se/7EW9VwIpQNwB4xQenCEXPhjtsDtFsd01dnky9dN5idEGonS1w95h/u9sTcnVPdcaFlyjA==",
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/@aduh95/viz.js/-/viz.js-3.4.0.tgz",
+ "integrity": "sha512-KI2nVf9JdwWCXqK6RVf+9/096G7VWN4Z84mnynlyZKao2xQENW8WNEjLmvdlxS5X8PNWXFC1zqwm7tveOXw/4A==",
"dev": true
},
"@angular-devkit/architect": {
- "version": "0.1001.6",
- "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1001.6.tgz",
- "integrity": "sha512-Wy10cGRdZ/g+akXbWfv0sq/pjVJrhrilSChe03ovu8nOsbcyZp76z+rnqf3YBYN6yZpWaBB80cW4QC/ar7Kv4Q==",
+ "version": "0.1002.3",
+ "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1002.3.tgz",
+ "integrity": "sha512-7ainXRNO1njZ6bBbJXGpMzCh0OYrzuIRe/+zRj0ncV1YfEsJb2yWBuiza0+y2Ljco7hdd4wr+7eJm7cfn+NvAw==",
"dev": true,
"requires": {
- "@angular-devkit/core": "10.1.6",
+ "@angular-devkit/core": "10.2.3",
"rxjs": "6.6.2"
},
"dependencies": {
}
},
"@angular-devkit/build-angular": {
- "version": "0.1001.6",
- "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-0.1001.6.tgz",
- "integrity": "sha512-/W/qDOWBdWN2F6N+6HEpqm6+u8LZ5vJPa9aNW8+WcvieCP9RjCfipGn61vFb+Cth/NmO+N7REx2BlUDtpfgXiA==",
+ "version": "0.1002.3",
+ "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-0.1002.3.tgz",
+ "integrity": "sha512-NjM8H2AUpLjcf+3mKYd99VbFgN4kwT++IBmR9BRQkqOZ4fD63g8jLPzC0KTsWGIVkZtR9Qc88YW/5sC8C3SVFQ==",
"dev": true,
"requires": {
- "@angular-devkit/architect": "0.1001.6",
- "@angular-devkit/build-optimizer": "0.1001.6",
- "@angular-devkit/build-webpack": "0.1001.6",
- "@angular-devkit/core": "10.1.6",
+ "@angular-devkit/architect": "0.1002.3",
+ "@angular-devkit/build-optimizer": "0.1002.3",
+ "@angular-devkit/build-webpack": "0.1002.3",
+ "@angular-devkit/core": "10.2.3",
"@babel/core": "7.11.1",
"@babel/generator": "7.11.0",
"@babel/plugin-transform-runtime": "7.11.0",
"@babel/runtime": "7.11.2",
"@babel/template": "7.10.4",
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
- "@ngtools/webpack": "10.1.6",
+ "@ngtools/webpack": "10.2.3",
"autoprefixer": "9.8.6",
"babel-loader": "8.1.0",
"browserslist": "^4.9.1",
"circular-dependency-plugin": "5.2.0",
"copy-webpack-plugin": "6.0.3",
"core-js": "3.6.4",
- "css-loader": "3.6.0",
+ "css-loader": "4.2.2",
"cssnano": "4.1.10",
"file-loader": "6.0.0",
"find-cache-dir": "3.3.1",
"postcss-loader": "3.0.0",
"raw-loader": "4.0.1",
"regenerator-runtime": "0.13.7",
- "resolve-url-loader": "3.1.1",
+ "resolve-url-loader": "3.1.2",
"rimraf": "3.0.2",
"rollup": "2.26.5",
"rxjs": "6.6.2",
}
}
},
- "camelcase": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.1.0.tgz",
- "integrity": "sha512-WCMml9ivU60+8rEJgELlFp1gxFcEGxwYleE3bziHEDeqsqAWGHdimB7beBFGjLzVNgPGyDsfgXLQEYMpmIFnVQ==",
- "dev": true
+ "@babel/template": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz",
+ "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "^7.10.4",
+ "@babel/parser": "^7.10.4",
+ "@babel/types": "^7.10.4"
+ }
},
"core-js": {
"version": "3.6.4",
"integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==",
"dev": true
},
- "css-loader": {
- "version": "3.6.0"
- },
"glob": {
"version": "7.1.6",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
}
},
"@angular-devkit/build-optimizer": {
- "version": "0.1001.6",
- "resolved": "https://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.1001.6.tgz",
- "integrity": "sha512-lZfqaQCaspszk+uc8w1rTlvZlhxPoKCMT8vwNRDpf5CD19GUO1HziYppPXGhV9hdS4HXAKi/Ji7qzCxI72Kwmg==",
+ "version": "0.1002.3",
+ "resolved": "https://registry.npmjs.org/@angular-devkit/build-optimizer/-/build-optimizer-0.1002.3.tgz",
+ "integrity": "sha512-/0KbxVmmvt3S7ghk5zUH8/PWjW8ki0uSmPsnjopY8jRgAxuXN/7PXZbqswItNlUBoEj34hj2UADBUJVic7fcnQ==",
"dev": true,
"requires": {
"loader-utils": "2.0.0",
}
},
"@angular-devkit/build-webpack": {
- "version": "0.1001.6",
- "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1001.6.tgz",
- "integrity": "sha512-8b90fnXfyeXi2+N6+LjUm5gxaXW6Zz/wRyUl9zJs93iSE+VqGa1cxmh6mBb/VhVzHrO6kKjkg757X5+r6g0ztQ==",
+ "version": "0.1002.3",
+ "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1002.3.tgz",
+ "integrity": "sha512-ngvPPA3VuYGYV275PM6X0pVI0Nl/uWx4eu2S6SUFe6mniN4BQkUHAyeCUMIbM3hkau/NAcF9xUs5AvZ9GDpvPw==",
"dev": true,
"requires": {
- "@angular-devkit/architect": "0.1001.6",
- "@angular-devkit/core": "10.1.6",
+ "@angular-devkit/architect": "0.1002.3",
+ "@angular-devkit/core": "10.2.3",
"rxjs": "6.6.2"
},
"dependencies": {
}
},
"@angular-devkit/core": {
- "version": "10.1.6",
- "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-10.1.6.tgz",
- "integrity": "sha512-RhZCbX2I+ukR6/yu1OxwtyveBkQy+knRSQ7oxsBbwkS4M0XzmUswlf0p8lTfJI9pxrJnc2SODatMfEKeOYWmkA==",
+ "version": "10.2.3",
+ "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-10.2.3.tgz",
+ "integrity": "sha512-pMM1v9Xjqx6YLOQxQYs0D+03H6XPDZLS8cyEtoQX2iYdh8qlKHZVbJa2WsfzwMoIPtgcXfQAXn113VEgrQPLFA==",
"dev": true,
"requires": {
"ajv": "6.12.4",
"rxjs": "6.6.2"
},
"dependencies": {
+ "@angular-devkit/core": {
+ "version": "10.1.6",
+ "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-10.1.6.tgz",
+ "integrity": "sha512-RhZCbX2I+ukR6/yu1OxwtyveBkQy+knRSQ7oxsBbwkS4M0XzmUswlf0p8lTfJI9pxrJnc2SODatMfEKeOYWmkA==",
+ "dev": true,
+ "requires": {
+ "ajv": "6.12.4",
+ "fast-json-stable-stringify": "2.1.0",
+ "magic-string": "0.25.7",
+ "rxjs": "6.6.2",
+ "source-map": "0.7.3"
+ }
+ },
"rxjs": {
"version": "6.6.2",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.2.tgz",
"tslib": "^1.9.0"
}
},
+ "source-map": {
+ "version": "0.7.3",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz",
+ "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==",
+ "dev": true
+ },
"tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"uuid": "8.3.0"
},
"dependencies": {
+ "@angular-devkit/architect": {
+ "version": "0.1001.6",
+ "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1001.6.tgz",
+ "integrity": "sha512-Wy10cGRdZ/g+akXbWfv0sq/pjVJrhrilSChe03ovu8nOsbcyZp76z+rnqf3YBYN6yZpWaBB80cW4QC/ar7Kv4Q==",
+ "dev": true,
+ "requires": {
+ "@angular-devkit/core": "10.1.6",
+ "rxjs": "6.6.2"
+ }
+ },
+ "@angular-devkit/core": {
+ "version": "10.1.6",
+ "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-10.1.6.tgz",
+ "integrity": "sha512-RhZCbX2I+ukR6/yu1OxwtyveBkQy+knRSQ7oxsBbwkS4M0XzmUswlf0p8lTfJI9pxrJnc2SODatMfEKeOYWmkA==",
+ "dev": true,
+ "requires": {
+ "ajv": "6.12.4",
+ "fast-json-stable-stringify": "2.1.0",
+ "magic-string": "0.25.7",
+ "rxjs": "6.6.2",
+ "source-map": "0.7.3"
+ }
+ },
"ansi-colors": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz",
"ms": "^2.1.1"
}
},
+ "rxjs": {
+ "version": "6.6.2",
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.2.tgz",
+ "integrity": "sha512-BHdBMVoWC2sL26w//BCu3YzKT4s2jip/WhwsGEDmeKYBhKDZeYezVUnHatYB7L85v5xs0BAQmg6BEYJEKxBabg==",
+ "dev": true,
+ "requires": {
+ "tslib": "^1.9.0"
+ }
+ },
"semver": {
"version": "7.3.2",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
"integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
"dev": true
},
+ "source-map": {
+ "version": "0.7.3",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz",
+ "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==",
+ "dev": true
+ },
+ "tslib": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
+ "dev": true
+ },
"uuid": {
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.0.tgz",
}
},
"@babel/code-frame": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
- "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz",
+ "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==",
"requires": {
- "@babel/highlight": "^7.10.4"
+ "@babel/highlight": "^7.12.13"
}
},
"@babel/compat-data": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.12.1.tgz",
- "integrity": "sha512-725AQupWJZ8ba0jbKceeFblZTY90McUBWMwHhkFQ9q1zKPJ95GUktljFcgcsIVwRnTnRKlcYzfiNImg5G9m6ZQ==",
+ "version": "7.14.0",
+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.14.0.tgz",
+ "integrity": "sha512-vu9V3uMM/1o5Hl5OekMUowo3FqXLJSw+s+66nt0fSWVWTtmosdzn45JHOB3cPtZoe6CTBDzvSw0RdOY85Q37+Q==",
"dev": true
},
"@babel/core": {
}
},
"@babel/generator": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.1.tgz",
- "integrity": "sha512-DB+6rafIdc9o72Yc3/Ph5h+6hUjeOp66pF0naQBgUFFuPqzQwIlPTm3xZR7YNvduIMtkDIj2t21LSQwnbCrXvg==",
+ "version": "7.14.1",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.1.tgz",
+ "integrity": "sha512-TMGhsXMXCP/O1WtQmZjpEYDhCYC9vFhayWZPJSZCGkPJgUqX0rF0wwtrYvnzVxIjcF80tkUertXVk5cwqi5cAQ==",
"requires": {
- "@babel/types": "^7.12.1",
+ "@babel/types": "^7.14.1",
"jsesc": "^2.5.1",
"source-map": "^0.5.0"
}
},
"@babel/helper-annotate-as-pure": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz",
- "integrity": "sha512-XQlqKQP4vXFB7BN8fEEerrmYvHp3fK/rBkRFz9jaJbzK0B1DSfej9Kc7ZzE8Z/OnId1jpJdNAZ3BFQjWG68rcA==",
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.13.tgz",
+ "integrity": "sha512-7YXfX5wQ5aYM/BOlbSccHDbuXXFPxeoUmfWtz8le2yTkTZc+BxsiEnENFoi2SlmA8ewDkG2LgIMIVzzn2h8kfw==",
"dev": true,
"requires": {
- "@babel/types": "^7.10.4"
+ "@babel/types": "^7.12.13"
}
},
"@babel/helper-builder-binary-assignment-operator-visitor": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.10.4.tgz",
- "integrity": "sha512-L0zGlFrGWZK4PbT8AszSfLTM5sDU1+Az/En9VrdT8/LmEiJt4zXt+Jve9DCAnQcbqDhCI+29y/L93mrDzddCcg==",
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.12.13.tgz",
+ "integrity": "sha512-CZOv9tGphhDRlVjVkAgm8Nhklm9RzSmWpX2my+t7Ua/KT616pEzXsQCjinzvkRvHWJ9itO4f296efroX23XCMA==",
"dev": true,
"requires": {
- "@babel/helper-explode-assignable-expression": "^7.10.4",
- "@babel/types": "^7.10.4"
+ "@babel/helper-explode-assignable-expression": "^7.12.13",
+ "@babel/types": "^7.12.13"
}
},
"@babel/helper-compilation-targets": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.12.1.tgz",
- "integrity": "sha512-jtBEif7jsPwP27GPHs06v4WBV0KrE8a/P7n0N0sSvHn2hwUCYnolP/CLmz51IzAW4NlN+HuoBtb9QcwnRo9F/g==",
+ "version": "7.13.16",
+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.16.tgz",
+ "integrity": "sha512-3gmkYIrpqsLlieFwjkGgLaSHmhnvlAYzZLlYVjlW+QwI+1zE17kGxuJGmIqDQdYp56XdmGeD+Bswx0UTyG18xA==",
"dev": true,
"requires": {
- "@babel/compat-data": "^7.12.1",
- "@babel/helper-validator-option": "^7.12.1",
- "browserslist": "^4.12.0",
- "semver": "^5.5.0"
+ "@babel/compat-data": "^7.13.15",
+ "@babel/helper-validator-option": "^7.12.17",
+ "browserslist": "^4.14.5",
+ "semver": "^6.3.0"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+ "dev": true
+ }
}
},
"@babel/helper-create-class-features-plugin": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.12.1.tgz",
- "integrity": "sha512-hkL++rWeta/OVOBTRJc9a5Azh5mt5WgZUGAKMD8JM141YsE08K//bp1unBBieO6rUKkIPyUE0USQ30jAy3Sk1w==",
+ "version": "7.14.1",
+ "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.14.1.tgz",
+ "integrity": "sha512-r8rsUahG4ywm0QpGcCrLaUSOuNAISR3IZCg4Fx05Ozq31aCUrQsTLH6KPxy0N5ULoQ4Sn9qjNdGNtbPWAC6hYg==",
"dev": true,
"requires": {
- "@babel/helper-function-name": "^7.10.4",
- "@babel/helper-member-expression-to-functions": "^7.12.1",
- "@babel/helper-optimise-call-expression": "^7.10.4",
- "@babel/helper-replace-supers": "^7.12.1",
- "@babel/helper-split-export-declaration": "^7.10.4"
+ "@babel/helper-annotate-as-pure": "^7.12.13",
+ "@babel/helper-function-name": "^7.12.13",
+ "@babel/helper-member-expression-to-functions": "^7.13.12",
+ "@babel/helper-optimise-call-expression": "^7.12.13",
+ "@babel/helper-replace-supers": "^7.13.12",
+ "@babel/helper-split-export-declaration": "^7.12.13"
}
},
"@babel/helper-create-regexp-features-plugin": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.1.tgz",
- "integrity": "sha512-rsZ4LGvFTZnzdNZR5HZdmJVuXK8834R5QkF3WvcnBhrlVtF0HSIUC6zbreL9MgjTywhKokn8RIYRiq99+DLAxA==",
+ "version": "7.12.17",
+ "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.17.tgz",
+ "integrity": "sha512-p2VGmBu9oefLZ2nQpgnEnG0ZlRPvL8gAGvPUMQwUdaE8k49rOMuZpOwdQoy5qJf6K8jL3bcAMhVUlHAjIgJHUg==",
"dev": true,
"requires": {
- "@babel/helper-annotate-as-pure": "^7.10.4",
- "@babel/helper-regex": "^7.10.4",
+ "@babel/helper-annotate-as-pure": "^7.12.13",
"regexpu-core": "^4.7.1"
}
},
- "@babel/helper-define-map": {
- "version": "7.10.5",
- "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.10.5.tgz",
- "integrity": "sha512-fMw4kgFB720aQFXSVaXr79pjjcW5puTCM16+rECJ/plGS+zByelE8l9nCpV1GibxTnFVmUuYG9U8wYfQHdzOEQ==",
- "dev": true,
- "requires": {
- "@babel/helper-function-name": "^7.10.4",
- "@babel/types": "^7.10.5",
- "lodash": "^4.17.19"
- }
- },
"@babel/helper-explode-assignable-expression": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.12.1.tgz",
- "integrity": "sha512-dmUwH8XmlrUpVqgtZ737tK88v07l840z9j3OEhCLwKTkjlvKpfqXVIZ0wpK3aeOxspwGrf/5AP5qLx4rO3w5rA==",
+ "version": "7.13.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.13.0.tgz",
+ "integrity": "sha512-qS0peLTDP8kOisG1blKbaoBg/o9OSa1qoumMjTK5pM+KDTtpxpsiubnCGP34vK8BXGcb2M9eigwgvoJryrzwWA==",
"dev": true,
"requires": {
- "@babel/types": "^7.12.1"
+ "@babel/types": "^7.13.0"
}
},
"@babel/helper-function-name": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz",
- "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==",
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz",
+ "integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==",
"requires": {
- "@babel/helper-get-function-arity": "^7.10.4",
- "@babel/template": "^7.10.4",
- "@babel/types": "^7.10.4"
+ "@babel/helper-get-function-arity": "^7.12.13",
+ "@babel/template": "^7.12.13",
+ "@babel/types": "^7.12.13"
}
},
"@babel/helper-get-function-arity": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz",
- "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==",
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz",
+ "integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==",
"requires": {
- "@babel/types": "^7.10.4"
+ "@babel/types": "^7.12.13"
}
},
"@babel/helper-hoist-variables": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.10.4.tgz",
- "integrity": "sha512-wljroF5PgCk2juF69kanHVs6vrLwIPNp6DLD+Lrl3hoQ3PpPPikaDRNFA+0t81NOoMt2DL6WW/mdU8k4k6ZzuA==",
+ "version": "7.13.16",
+ "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.13.16.tgz",
+ "integrity": "sha512-1eMtTrXtrwscjcAeO4BVK+vvkxaLJSPFz1w1KLawz6HLNi9bPFGBNwwDyVfiu1Tv/vRRFYfoGaKhmAQPGPn5Wg==",
"dev": true,
"requires": {
- "@babel/types": "^7.10.4"
+ "@babel/traverse": "^7.13.15",
+ "@babel/types": "^7.13.16"
}
},
"@babel/helper-member-expression-to-functions": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.1.tgz",
- "integrity": "sha512-k0CIe3tXUKTRSoEx1LQEPFU9vRQfqHtl+kf8eNnDqb4AUJEy5pz6aIiog+YWtVm2jpggjS1laH68bPsR+KWWPQ==",
+ "version": "7.13.12",
+ "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.12.tgz",
+ "integrity": "sha512-48ql1CLL59aKbU94Y88Xgb2VFy7a95ykGRbJJaaVv+LX5U8wFpLfiGXJJGUozsmA1oEh/o5Bp60Voq7ACyA/Sw==",
"dev": true,
"requires": {
- "@babel/types": "^7.12.1"
+ "@babel/types": "^7.13.12"
}
},
"@babel/helper-module-imports": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.1.tgz",
- "integrity": "sha512-ZeC1TlMSvikvJNy1v/wPIazCu3NdOwgYZLIkmIyAsGhqkNpiDoQQRmaCK8YP4Pq3GPTLPV9WXaPCJKvx06JxKA==",
+ "version": "7.13.12",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.13.12.tgz",
+ "integrity": "sha512-4cVvR2/1B693IuOvSI20xqqa/+bl7lqAMR59R4iu39R9aOX8/JoYY1sFaNvUMyMBGnHdwvJgUrzNLoUZxXypxA==",
"dev": true,
"requires": {
- "@babel/types": "^7.12.1"
+ "@babel/types": "^7.13.12"
}
},
"@babel/helper-module-transforms": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.12.1.tgz",
- "integrity": "sha512-QQzehgFAZ2bbISiCpmVGfiGux8YVFXQ0abBic2Envhej22DVXV9nCFaS5hIQbkyo1AdGb+gNME2TSh3hYJVV/w==",
- "dev": true,
- "requires": {
- "@babel/helper-module-imports": "^7.12.1",
- "@babel/helper-replace-supers": "^7.12.1",
- "@babel/helper-simple-access": "^7.12.1",
- "@babel/helper-split-export-declaration": "^7.11.0",
- "@babel/helper-validator-identifier": "^7.10.4",
- "@babel/template": "^7.10.4",
- "@babel/traverse": "^7.12.1",
- "@babel/types": "^7.12.1",
- "lodash": "^4.17.19"
+ "version": "7.14.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.14.0.tgz",
+ "integrity": "sha512-L40t9bxIuGOfpIGA3HNkJhU9qYrf4y5A5LUSw7rGMSn+pcG8dfJ0g6Zval6YJGd2nEjI7oP00fRdnhLKndx6bw==",
+ "dev": true,
+ "requires": {
+ "@babel/helper-module-imports": "^7.13.12",
+ "@babel/helper-replace-supers": "^7.13.12",
+ "@babel/helper-simple-access": "^7.13.12",
+ "@babel/helper-split-export-declaration": "^7.12.13",
+ "@babel/helper-validator-identifier": "^7.14.0",
+ "@babel/template": "^7.12.13",
+ "@babel/traverse": "^7.14.0",
+ "@babel/types": "^7.14.0"
}
},
"@babel/helper-optimise-call-expression": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz",
- "integrity": "sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg==",
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz",
+ "integrity": "sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA==",
"dev": true,
"requires": {
- "@babel/types": "^7.10.4"
+ "@babel/types": "^7.12.13"
}
},
"@babel/helper-plugin-utils": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz",
- "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==",
+ "version": "7.13.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz",
+ "integrity": "sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ==",
"dev": true
},
- "@babel/helper-regex": {
- "version": "7.10.5",
- "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.10.5.tgz",
- "integrity": "sha512-68kdUAzDrljqBrio7DYAEgCoJHxppJOERHOgOrDN7WjOzP0ZQ1LsSDRXcemzVZaLvjaJsJEESb6qt+znNuENDg==",
- "dev": true,
- "requires": {
- "lodash": "^4.17.19"
- }
- },
"@babel/helper-remap-async-to-generator": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.12.1.tgz",
- "integrity": "sha512-9d0KQCRM8clMPcDwo8SevNs+/9a8yWVVmaE80FGJcEP8N1qToREmWEGnBn8BUlJhYRFz6fqxeRL1sl5Ogsed7A==",
+ "version": "7.13.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.13.0.tgz",
+ "integrity": "sha512-pUQpFBE9JvC9lrQbpX0TmeNIy5s7GnZjna2lhhcHC7DzgBs6fWn722Y5cfwgrtrqc7NAJwMvOa0mKhq6XaE4jg==",
"dev": true,
"requires": {
- "@babel/helper-annotate-as-pure": "^7.10.4",
- "@babel/helper-wrap-function": "^7.10.4",
- "@babel/types": "^7.12.1"
+ "@babel/helper-annotate-as-pure": "^7.12.13",
+ "@babel/helper-wrap-function": "^7.13.0",
+ "@babel/types": "^7.13.0"
}
},
"@babel/helper-replace-supers": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.12.1.tgz",
- "integrity": "sha512-zJjTvtNJnCFsCXVi5rUInstLd/EIVNmIKA1Q9ynESmMBWPWd+7sdR+G4/wdu+Mppfep0XLyG2m7EBPvjCeFyrw==",
+ "version": "7.13.12",
+ "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.13.12.tgz",
+ "integrity": "sha512-Gz1eiX+4yDO8mT+heB94aLVNCL+rbuT2xy4YfyNqu8F+OI6vMvJK891qGBTqL9Uc8wxEvRW92Id6G7sDen3fFw==",
"dev": true,
"requires": {
- "@babel/helper-member-expression-to-functions": "^7.12.1",
- "@babel/helper-optimise-call-expression": "^7.10.4",
- "@babel/traverse": "^7.12.1",
- "@babel/types": "^7.12.1"
+ "@babel/helper-member-expression-to-functions": "^7.13.12",
+ "@babel/helper-optimise-call-expression": "^7.12.13",
+ "@babel/traverse": "^7.13.0",
+ "@babel/types": "^7.13.12"
}
},
"@babel/helper-simple-access": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.12.1.tgz",
- "integrity": "sha512-OxBp7pMrjVewSSC8fXDFrHrBcJATOOFssZwv16F3/6Xtc138GHybBfPbm9kfiqQHKhYQrlamWILwlDCeyMFEaA==",
+ "version": "7.13.12",
+ "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.13.12.tgz",
+ "integrity": "sha512-7FEjbrx5SL9cWvXioDbnlYTppcZGuCY6ow3/D5vMggb2Ywgu4dMrpTJX0JdQAIcRRUElOIxF3yEooa9gUb9ZbA==",
"dev": true,
"requires": {
- "@babel/types": "^7.12.1"
+ "@babel/types": "^7.13.12"
}
},
"@babel/helper-skip-transparent-expression-wrappers": {
}
},
"@babel/helper-split-export-declaration": {
- "version": "7.11.0",
- "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz",
- "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==",
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz",
+ "integrity": "sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg==",
"requires": {
- "@babel/types": "^7.11.0"
+ "@babel/types": "^7.12.13"
}
},
"@babel/helper-validator-identifier": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz",
- "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw=="
+ "version": "7.14.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz",
+ "integrity": "sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A=="
},
"@babel/helper-validator-option": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.1.tgz",
- "integrity": "sha512-YpJabsXlJVWP0USHjnC/AQDTLlZERbON577YUVO/wLpqyj6HAtVYnWaQaN0iUN+1/tWn3c+uKKXjRut5115Y2A==",
+ "version": "7.12.17",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz",
+ "integrity": "sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw==",
"dev": true
},
"@babel/helper-wrap-function": {
- "version": "7.12.3",
- "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.12.3.tgz",
- "integrity": "sha512-Cvb8IuJDln3rs6tzjW3Y8UeelAOdnpB8xtQ4sme2MSZ9wOxrbThporC0y/EtE16VAtoyEfLM404Xr1e0OOp+ow==",
+ "version": "7.13.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.13.0.tgz",
+ "integrity": "sha512-1UX9F7K3BS42fI6qd2A4BjKzgGjToscyZTdp1DjknHLCIvpgne6918io+aL5LXFcER/8QWiwpoY902pVEqgTXA==",
"dev": true,
"requires": {
- "@babel/helper-function-name": "^7.10.4",
- "@babel/template": "^7.10.4",
- "@babel/traverse": "^7.10.4",
- "@babel/types": "^7.10.4"
+ "@babel/helper-function-name": "^7.12.13",
+ "@babel/template": "^7.12.13",
+ "@babel/traverse": "^7.13.0",
+ "@babel/types": "^7.13.0"
}
},
"@babel/helpers": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.12.1.tgz",
- "integrity": "sha512-9JoDSBGoWtmbay98efmT2+mySkwjzeFeAL9BuWNoVQpkPFQF8SIIFUfY5os9u8wVzglzoiPRSW7cuJmBDUt43g==",
+ "version": "7.14.0",
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.14.0.tgz",
+ "integrity": "sha512-+ufuXprtQ1D1iZTO/K9+EBRn+qPWMJjZSw/S0KlFrxCw4tkrzv9grgpDHkY9MeQTjTY8i2sp7Jep8DfU6tN9Mg==",
"requires": {
- "@babel/template": "^7.10.4",
- "@babel/traverse": "^7.12.1",
- "@babel/types": "^7.12.1"
+ "@babel/template": "^7.12.13",
+ "@babel/traverse": "^7.14.0",
+ "@babel/types": "^7.14.0"
}
},
"@babel/highlight": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz",
- "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==",
+ "version": "7.14.0",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.0.tgz",
+ "integrity": "sha512-YSCOwxvTYEIMSGaBQb5kDDsCopDdiUGsqpatp3fOlI4+2HQSkTmEVWnVuySdAC5EWCqSWWTv0ib63RjR7dTBdg==",
"requires": {
- "@babel/helper-validator-identifier": "^7.10.4",
+ "@babel/helper-validator-identifier": "^7.14.0",
"chalk": "^2.0.0",
"js-tokens": "^4.0.0"
}
},
"@babel/parser": {
- "version": "7.12.3",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.3.tgz",
- "integrity": "sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw=="
+ "version": "7.14.1",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.1.tgz",
+ "integrity": "sha512-muUGEKu8E/ftMTPlNp+mc6zL3E9zKWmF5sDHZ5MSsoTP9Wyz64AhEf9kD08xYJ7w6Hdcu8H550ircnPyWSIF0Q=="
},
"@babel/plugin-proposal-async-generator-functions": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.12.1.tgz",
- "integrity": "sha512-d+/o30tJxFxrA1lhzJqiUcEJdI6jKlNregCv5bASeGf2Q4MXmnwH7viDo7nhx1/ohf09oaH8j1GVYG/e3Yqk6A==",
+ "version": "7.13.15",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.13.15.tgz",
+ "integrity": "sha512-VapibkWzFeoa6ubXy/NgV5U2U4MVnUlvnx6wo1XhlsaTrLYWE0UFpDQsVrmn22q5CzeloqJ8gEMHSKxuee6ZdA==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4",
- "@babel/helper-remap-async-to-generator": "^7.12.1",
- "@babel/plugin-syntax-async-generators": "^7.8.0"
+ "@babel/helper-plugin-utils": "^7.13.0",
+ "@babel/helper-remap-async-to-generator": "^7.13.0",
+ "@babel/plugin-syntax-async-generators": "^7.8.4"
}
},
"@babel/plugin-proposal-class-properties": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.12.1.tgz",
- "integrity": "sha512-cKp3dlQsFsEs5CWKnN7BnSHOd0EOW8EKpEjkoz1pO2E5KzIDNV9Ros1b0CnmbVgAGXJubOYVBOGCT1OmJwOI7w==",
+ "version": "7.13.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.13.0.tgz",
+ "integrity": "sha512-KnTDjFNC1g+45ka0myZNvSBFLhNCLN+GeGYLDEA8Oq7MZ6yMgfLoIRh86GRT0FjtJhZw8JyUskP9uvj5pHM9Zg==",
"dev": true,
"requires": {
- "@babel/helper-create-class-features-plugin": "^7.12.1",
- "@babel/helper-plugin-utils": "^7.10.4"
+ "@babel/helper-create-class-features-plugin": "^7.13.0",
+ "@babel/helper-plugin-utils": "^7.13.0"
}
},
"@babel/plugin-proposal-dynamic-import": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.12.1.tgz",
- "integrity": "sha512-a4rhUSZFuq5W8/OO8H7BL5zspjnc1FLd9hlOxIK/f7qG4a0qsqk8uvF/ywgBA8/OmjsapjpvaEOYItfGG1qIvQ==",
+ "version": "7.13.8",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.13.8.tgz",
+ "integrity": "sha512-ONWKj0H6+wIRCkZi9zSbZtE/r73uOhMVHh256ys0UzfM7I3d4n+spZNWjOnJv2gzopumP2Wxi186vI8N0Y2JyQ==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4",
- "@babel/plugin-syntax-dynamic-import": "^7.8.0"
+ "@babel/helper-plugin-utils": "^7.13.0",
+ "@babel/plugin-syntax-dynamic-import": "^7.8.3"
}
},
"@babel/plugin-proposal-export-namespace-from": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.12.1.tgz",
- "integrity": "sha512-6CThGf0irEkzujYS5LQcjBx8j/4aQGiVv7J9+2f7pGfxqyKh3WnmVJYW3hdrQjyksErMGBPQrCnHfOtna+WLbw==",
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.12.13.tgz",
+ "integrity": "sha512-INAgtFo4OnLN3Y/j0VwAgw3HDXcDtX+C/erMvWzuV9v71r7urb6iyMXu7eM9IgLr1ElLlOkaHjJ0SbCmdOQ3Iw==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4",
+ "@babel/helper-plugin-utils": "^7.12.13",
"@babel/plugin-syntax-export-namespace-from": "^7.8.3"
}
},
"@babel/plugin-proposal-json-strings": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.12.1.tgz",
- "integrity": "sha512-GoLDUi6U9ZLzlSda2Df++VSqDJg3CG+dR0+iWsv6XRw1rEq+zwt4DirM9yrxW6XWaTpmai1cWJLMfM8qQJf+yw==",
+ "version": "7.13.8",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.13.8.tgz",
+ "integrity": "sha512-w4zOPKUFPX1mgvTmL/fcEqy34hrQ1CRcGxdphBc6snDnnqJ47EZDIyop6IwXzAC8G916hsIuXB2ZMBCExC5k7Q==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4",
- "@babel/plugin-syntax-json-strings": "^7.8.0"
+ "@babel/helper-plugin-utils": "^7.13.0",
+ "@babel/plugin-syntax-json-strings": "^7.8.3"
}
},
"@babel/plugin-proposal-logical-assignment-operators": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.12.1.tgz",
- "integrity": "sha512-k8ZmVv0JU+4gcUGeCDZOGd0lCIamU/sMtIiX3UWnUc5yzgq6YUGyEolNYD+MLYKfSzgECPcqetVcJP9Afe/aCA==",
+ "version": "7.13.8",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.13.8.tgz",
+ "integrity": "sha512-aul6znYB4N4HGweImqKn59Su9RS8lbUIqxtXTOcAGtNIDczoEFv+l1EhmX8rUBp3G1jMjKJm8m0jXVp63ZpS4A==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4",
+ "@babel/helper-plugin-utils": "^7.13.0",
"@babel/plugin-syntax-logical-assignment-operators": "^7.10.4"
}
},
"@babel/plugin-proposal-nullish-coalescing-operator": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.12.1.tgz",
- "integrity": "sha512-nZY0ESiaQDI1y96+jk6VxMOaL4LPo/QDHBqL+SF3/vl6dHkTwHlOI8L4ZwuRBHgakRBw5zsVylel7QPbbGuYgg==",
+ "version": "7.13.8",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.13.8.tgz",
+ "integrity": "sha512-iePlDPBn//UhxExyS9KyeYU7RM9WScAG+D3Hhno0PLJebAEpDZMocbDe64eqynhNAnwz/vZoL/q/QB2T1OH39A==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4",
- "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0"
+ "@babel/helper-plugin-utils": "^7.13.0",
+ "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3"
}
},
"@babel/plugin-proposal-numeric-separator": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.12.1.tgz",
- "integrity": "sha512-MR7Ok+Af3OhNTCxYVjJZHS0t97ydnJZt/DbR4WISO39iDnhiD8XHrY12xuSJ90FFEGjir0Fzyyn7g/zY6hxbxA==",
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.12.13.tgz",
+ "integrity": "sha512-O1jFia9R8BUCl3ZGB7eitaAPu62TXJRHn7rh+ojNERCFyqRwJMTmhz+tJ+k0CwI6CLjX/ee4qW74FSqlq9I35w==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4",
+ "@babel/helper-plugin-utils": "^7.12.13",
"@babel/plugin-syntax-numeric-separator": "^7.10.4"
}
},
"@babel/plugin-proposal-object-rest-spread": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.12.1.tgz",
- "integrity": "sha512-s6SowJIjzlhx8o7lsFx5zmY4At6CTtDvgNQDdPzkBQucle58A6b/TTeEBYtyDgmcXjUTM+vE8YOGHZzzbc/ioA==",
+ "version": "7.13.8",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.13.8.tgz",
+ "integrity": "sha512-DhB2EuB1Ih7S3/IRX5AFVgZ16k3EzfRbq97CxAVI1KSYcW+lexV8VZb7G7L8zuPVSdQMRn0kiBpf/Yzu9ZKH0g==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4",
- "@babel/plugin-syntax-object-rest-spread": "^7.8.0",
- "@babel/plugin-transform-parameters": "^7.12.1"
+ "@babel/compat-data": "^7.13.8",
+ "@babel/helper-compilation-targets": "^7.13.8",
+ "@babel/helper-plugin-utils": "^7.13.0",
+ "@babel/plugin-syntax-object-rest-spread": "^7.8.3",
+ "@babel/plugin-transform-parameters": "^7.13.0"
}
},
"@babel/plugin-proposal-optional-catch-binding": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.12.1.tgz",
- "integrity": "sha512-hFvIjgprh9mMw5v42sJWLI1lzU5L2sznP805zeT6rySVRA0Y18StRhDqhSxlap0oVgItRsB6WSROp4YnJTJz0g==",
+ "version": "7.13.8",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.13.8.tgz",
+ "integrity": "sha512-0wS/4DUF1CuTmGo+NiaHfHcVSeSLj5S3e6RivPTg/2k3wOv3jO35tZ6/ZWsQhQMvdgI7CwphjQa/ccarLymHVA==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4",
- "@babel/plugin-syntax-optional-catch-binding": "^7.8.0"
+ "@babel/helper-plugin-utils": "^7.13.0",
+ "@babel/plugin-syntax-optional-catch-binding": "^7.8.3"
}
},
"@babel/plugin-proposal-optional-chaining": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.12.1.tgz",
- "integrity": "sha512-c2uRpY6WzaVDzynVY9liyykS+kVU+WRZPMPYpkelXH8KBt1oXoI89kPbZKKG/jDT5UK92FTW2fZkZaJhdiBabw==",
+ "version": "7.13.12",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.13.12.tgz",
+ "integrity": "sha512-fcEdKOkIB7Tf4IxrgEVeFC4zeJSTr78no9wTdBuZZbqF64kzllU0ybo2zrzm7gUQfxGhBgq4E39oRs8Zx/RMYQ==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4",
+ "@babel/helper-plugin-utils": "^7.13.0",
"@babel/helper-skip-transparent-expression-wrappers": "^7.12.1",
- "@babel/plugin-syntax-optional-chaining": "^7.8.0"
+ "@babel/plugin-syntax-optional-chaining": "^7.8.3"
}
},
"@babel/plugin-proposal-private-methods": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.12.1.tgz",
- "integrity": "sha512-mwZ1phvH7/NHK6Kf8LP7MYDogGV+DKB1mryFOEwx5EBNQrosvIczzZFTUmWaeujd5xT6G1ELYWUz3CutMhjE1w==",
+ "version": "7.13.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.13.0.tgz",
+ "integrity": "sha512-MXyyKQd9inhx1kDYPkFRVOBXQ20ES8Pto3T7UZ92xj2mY0EVD8oAVzeyYuVfy/mxAdTSIayOvg+aVzcHV2bn6Q==",
"dev": true,
"requires": {
- "@babel/helper-create-class-features-plugin": "^7.12.1",
- "@babel/helper-plugin-utils": "^7.10.4"
+ "@babel/helper-create-class-features-plugin": "^7.13.0",
+ "@babel/helper-plugin-utils": "^7.13.0"
}
},
"@babel/plugin-proposal-unicode-property-regex": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.12.1.tgz",
- "integrity": "sha512-MYq+l+PvHuw/rKUz1at/vb6nCnQ2gmJBNaM62z0OgH7B2W1D9pvkpYtlti9bGtizNIU1K3zm4bZF9F91efVY0w==",
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.12.13.tgz",
+ "integrity": "sha512-XyJmZidNfofEkqFV5VC/bLabGmO5QzenPO/YOfGuEbgU+2sSwMmio3YLb4WtBgcmmdwZHyVyv8on77IUjQ5Gvg==",
"dev": true,
"requires": {
- "@babel/helper-create-regexp-features-plugin": "^7.12.1",
- "@babel/helper-plugin-utils": "^7.10.4"
+ "@babel/helper-create-regexp-features-plugin": "^7.12.13",
+ "@babel/helper-plugin-utils": "^7.12.13"
}
},
"@babel/plugin-syntax-async-generators": {
}
},
"@babel/plugin-syntax-class-properties": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.1.tgz",
- "integrity": "sha512-U40A76x5gTwmESz+qiqssqmeEsKvcSyvtgktrm0uzcARAmM9I1jR221f6Oq+GmHrcD+LvZDag1UTOTe2fL3TeA==",
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz",
+ "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4"
+ "@babel/helper-plugin-utils": "^7.12.13"
}
},
"@babel/plugin-syntax-dynamic-import": {
}
},
"@babel/plugin-syntax-top-level-await": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.1.tgz",
- "integrity": "sha512-i7ooMZFS+a/Om0crxZodrTzNEPJHZrlMVGMTEpFAj6rYY/bKCddB0Dk/YxfPuYXOopuhKk/e1jV6h+WUU9XN3A==",
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.13.tgz",
+ "integrity": "sha512-A81F9pDwyS7yM//KwbCSDqy3Uj4NMIurtplxphWxoYtNPov7cJsDkAFNNyVlIZ3jwGycVsurZ+LtOA8gZ376iQ==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4"
+ "@babel/helper-plugin-utils": "^7.12.13"
}
},
"@babel/plugin-transform-arrow-functions": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.12.1.tgz",
- "integrity": "sha512-5QB50qyN44fzzz4/qxDPQMBCTHgxg3n0xRBLJUmBlLoU/sFvxVWGZF/ZUfMVDQuJUKXaBhbupxIzIfZ6Fwk/0A==",
+ "version": "7.13.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.13.0.tgz",
+ "integrity": "sha512-96lgJagobeVmazXFaDrbmCLQxBysKu7U6Do3mLsx27gf5Dk85ezysrs2BZUpXD703U/Su1xTBDxxar2oa4jAGg==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4"
+ "@babel/helper-plugin-utils": "^7.13.0"
}
},
"@babel/plugin-transform-async-to-generator": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.12.1.tgz",
- "integrity": "sha512-SDtqoEcarK1DFlRJ1hHRY5HvJUj5kX4qmtpMAm2QnhOlyuMC4TMdCRgW6WXpv93rZeYNeLP22y8Aq2dbcDRM1A==",
+ "version": "7.13.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.13.0.tgz",
+ "integrity": "sha512-3j6E004Dx0K3eGmhxVJxwwI89CTJrce7lg3UrtFuDAVQ/2+SJ/h/aSFOeE6/n0WB1GsOffsJp6MnPQNQ8nmwhg==",
"dev": true,
"requires": {
- "@babel/helper-module-imports": "^7.12.1",
- "@babel/helper-plugin-utils": "^7.10.4",
- "@babel/helper-remap-async-to-generator": "^7.12.1"
+ "@babel/helper-module-imports": "^7.12.13",
+ "@babel/helper-plugin-utils": "^7.13.0",
+ "@babel/helper-remap-async-to-generator": "^7.13.0"
}
},
"@babel/plugin-transform-block-scoped-functions": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.12.1.tgz",
- "integrity": "sha512-5OpxfuYnSgPalRpo8EWGPzIYf0lHBWORCkj5M0oLBwHdlux9Ri36QqGW3/LR13RSVOAoUUMzoPI/jpE4ABcHoA==",
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.12.13.tgz",
+ "integrity": "sha512-zNyFqbc3kI/fVpqwfqkg6RvBgFpC4J18aKKMmv7KdQ/1GgREapSJAykLMVNwfRGO3BtHj3YQZl8kxCXPcVMVeg==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4"
+ "@babel/helper-plugin-utils": "^7.12.13"
}
},
"@babel/plugin-transform-block-scoping": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.1.tgz",
- "integrity": "sha512-zJyAC9sZdE60r1nVQHblcfCj29Dh2Y0DOvlMkcqSo0ckqjiCwNiUezUKw+RjOCwGfpLRwnAeQ2XlLpsnGkvv9w==",
+ "version": "7.14.1",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.14.1.tgz",
+ "integrity": "sha512-2mQXd0zBrwfp0O1moWIhPpEeTKDvxyHcnma3JATVP1l+CctWBuot6OJG8LQ4DnBj4ZZPSmlb/fm4mu47EOAnVA==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4"
+ "@babel/helper-plugin-utils": "^7.13.0"
}
},
"@babel/plugin-transform-classes": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.12.1.tgz",
- "integrity": "sha512-/74xkA7bVdzQTBeSUhLLJgYIcxw/dpEpCdRDiHgPJ3Mv6uC11UhjpOhl72CgqbBCmt1qtssCyB2xnJm1+PFjog==",
+ "version": "7.13.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.13.0.tgz",
+ "integrity": "sha512-9BtHCPUARyVH1oXGcSJD3YpsqRLROJx5ZNP6tN5vnk17N0SVf9WCtf8Nuh1CFmgByKKAIMstitKduoCmsaDK5g==",
"dev": true,
"requires": {
- "@babel/helper-annotate-as-pure": "^7.10.4",
- "@babel/helper-define-map": "^7.10.4",
- "@babel/helper-function-name": "^7.10.4",
- "@babel/helper-optimise-call-expression": "^7.10.4",
- "@babel/helper-plugin-utils": "^7.10.4",
- "@babel/helper-replace-supers": "^7.12.1",
- "@babel/helper-split-export-declaration": "^7.10.4",
+ "@babel/helper-annotate-as-pure": "^7.12.13",
+ "@babel/helper-function-name": "^7.12.13",
+ "@babel/helper-optimise-call-expression": "^7.12.13",
+ "@babel/helper-plugin-utils": "^7.13.0",
+ "@babel/helper-replace-supers": "^7.13.0",
+ "@babel/helper-split-export-declaration": "^7.12.13",
"globals": "^11.1.0"
}
},
"@babel/plugin-transform-computed-properties": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.12.1.tgz",
- "integrity": "sha512-vVUOYpPWB7BkgUWPo4C44mUQHpTZXakEqFjbv8rQMg7TC6S6ZhGZ3otQcRH6u7+adSlE5i0sp63eMC/XGffrzg==",
+ "version": "7.13.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.13.0.tgz",
+ "integrity": "sha512-RRqTYTeZkZAz8WbieLTvKUEUxZlUTdmL5KGMyZj7FnMfLNKV4+r5549aORG/mgojRmFlQMJDUupwAMiF2Q7OUg==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4"
+ "@babel/helper-plugin-utils": "^7.13.0"
}
},
"@babel/plugin-transform-destructuring": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.12.1.tgz",
- "integrity": "sha512-fRMYFKuzi/rSiYb2uRLiUENJOKq4Gnl+6qOv5f8z0TZXg3llUwUhsNNwrwaT/6dUhJTzNpBr+CUvEWBtfNY1cw==",
+ "version": "7.13.17",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.13.17.tgz",
+ "integrity": "sha512-UAUqiLv+uRLO+xuBKKMEpC+t7YRNVRqBsWWq1yKXbBZBje/t3IXCiSinZhjn/DC3qzBfICeYd2EFGEbHsh5RLA==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4"
+ "@babel/helper-plugin-utils": "^7.13.0"
}
},
"@babel/plugin-transform-dotall-regex": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.12.1.tgz",
- "integrity": "sha512-B2pXeRKoLszfEW7J4Hg9LoFaWEbr/kzo3teWHmtFCszjRNa/b40f9mfeqZsIDLLt/FjwQ6pz/Gdlwy85xNckBA==",
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.12.13.tgz",
+ "integrity": "sha512-foDrozE65ZFdUC2OfgeOCrEPTxdB3yjqxpXh8CH+ipd9CHd4s/iq81kcUpyH8ACGNEPdFqbtzfgzbT/ZGlbDeQ==",
"dev": true,
"requires": {
- "@babel/helper-create-regexp-features-plugin": "^7.12.1",
- "@babel/helper-plugin-utils": "^7.10.4"
+ "@babel/helper-create-regexp-features-plugin": "^7.12.13",
+ "@babel/helper-plugin-utils": "^7.12.13"
}
},
"@babel/plugin-transform-duplicate-keys": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.12.1.tgz",
- "integrity": "sha512-iRght0T0HztAb/CazveUpUQrZY+aGKKaWXMJ4uf9YJtqxSUe09j3wteztCUDRHs+SRAL7yMuFqUsLoAKKzgXjw==",
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.12.13.tgz",
+ "integrity": "sha512-NfADJiiHdhLBW3pulJlJI2NB0t4cci4WTZ8FtdIuNc2+8pslXdPtRRAEWqUY+m9kNOk2eRYbTAOipAxlrOcwwQ==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4"
+ "@babel/helper-plugin-utils": "^7.12.13"
}
},
"@babel/plugin-transform-exponentiation-operator": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.12.1.tgz",
- "integrity": "sha512-7tqwy2bv48q+c1EHbXK0Zx3KXd2RVQp6OC7PbwFNt/dPTAV3Lu5sWtWuAj8owr5wqtWnqHfl2/mJlUmqkChKug==",
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.12.13.tgz",
+ "integrity": "sha512-fbUelkM1apvqez/yYx1/oICVnGo2KM5s63mhGylrmXUxK/IAXSIf87QIxVfZldWf4QsOafY6vV3bX8aMHSvNrA==",
"dev": true,
"requires": {
- "@babel/helper-builder-binary-assignment-operator-visitor": "^7.10.4",
- "@babel/helper-plugin-utils": "^7.10.4"
+ "@babel/helper-builder-binary-assignment-operator-visitor": "^7.12.13",
+ "@babel/helper-plugin-utils": "^7.12.13"
}
},
"@babel/plugin-transform-for-of": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.12.1.tgz",
- "integrity": "sha512-Zaeq10naAsuHo7heQvyV0ptj4dlZJwZgNAtBYBnu5nNKJoW62m0zKcIEyVECrUKErkUkg6ajMy4ZfnVZciSBhg==",
+ "version": "7.13.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.13.0.tgz",
+ "integrity": "sha512-IHKT00mwUVYE0zzbkDgNRP6SRzvfGCYsOxIRz8KsiaaHCcT9BWIkO+H9QRJseHBLOGBZkHUdHiqj6r0POsdytg==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4"
+ "@babel/helper-plugin-utils": "^7.13.0"
}
},
"@babel/plugin-transform-function-name": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.12.1.tgz",
- "integrity": "sha512-JF3UgJUILoFrFMEnOJLJkRHSk6LUSXLmEFsA23aR2O5CSLUxbeUX1IZ1YQ7Sn0aXb601Ncwjx73a+FVqgcljVw==",
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.12.13.tgz",
+ "integrity": "sha512-6K7gZycG0cmIwwF7uMK/ZqeCikCGVBdyP2J5SKNCXO5EOHcqi+z7Jwf8AmyDNcBgxET8DrEtCt/mPKPyAzXyqQ==",
"dev": true,
"requires": {
- "@babel/helper-function-name": "^7.10.4",
- "@babel/helper-plugin-utils": "^7.10.4"
+ "@babel/helper-function-name": "^7.12.13",
+ "@babel/helper-plugin-utils": "^7.12.13"
}
},
"@babel/plugin-transform-literals": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.12.1.tgz",
- "integrity": "sha512-+PxVGA+2Ag6uGgL0A5f+9rklOnnMccwEBzwYFL3EUaKuiyVnUipyXncFcfjSkbimLrODoqki1U9XxZzTvfN7IQ==",
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.12.13.tgz",
+ "integrity": "sha512-FW+WPjSR7hiUxMcKqyNjP05tQ2kmBCdpEpZHY1ARm96tGQCCBvXKnpjILtDplUnJ/eHZ0lALLM+d2lMFSpYJrQ==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4"
+ "@babel/helper-plugin-utils": "^7.12.13"
}
},
"@babel/plugin-transform-member-expression-literals": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.12.1.tgz",
- "integrity": "sha512-1sxePl6z9ad0gFMB9KqmYofk34flq62aqMt9NqliS/7hPEpURUCMbyHXrMPlo282iY7nAvUB1aQd5mg79UD9Jg==",
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.12.13.tgz",
+ "integrity": "sha512-kxLkOsg8yir4YeEPHLuO2tXP9R/gTjpuTOjshqSpELUN3ZAg2jfDnKUvzzJxObun38sw3wm4Uu69sX/zA7iRvg==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4"
+ "@babel/helper-plugin-utils": "^7.12.13"
}
},
"@babel/plugin-transform-modules-amd": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.12.1.tgz",
- "integrity": "sha512-tDW8hMkzad5oDtzsB70HIQQRBiTKrhfgwC/KkJeGsaNFTdWhKNt/BiE8c5yj19XiGyrxpbkOfH87qkNg1YGlOQ==",
+ "version": "7.14.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.14.0.tgz",
+ "integrity": "sha512-CF4c5LX4LQ03LebQxJ5JZes2OYjzBuk1TdiF7cG7d5dK4lAdw9NZmaxq5K/mouUdNeqwz3TNjnW6v01UqUNgpQ==",
"dev": true,
"requires": {
- "@babel/helper-module-transforms": "^7.12.1",
- "@babel/helper-plugin-utils": "^7.10.4",
+ "@babel/helper-module-transforms": "^7.14.0",
+ "@babel/helper-plugin-utils": "^7.13.0",
"babel-plugin-dynamic-import-node": "^2.3.3"
}
},
"@babel/plugin-transform-modules-commonjs": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.12.1.tgz",
- "integrity": "sha512-dY789wq6l0uLY8py9c1B48V8mVL5gZh/+PQ5ZPrylPYsnAvnEMjqsUXkuoDVPeVK+0VyGar+D08107LzDQ6pag==",
+ "version": "7.14.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.14.0.tgz",
+ "integrity": "sha512-EX4QePlsTaRZQmw9BsoPeyh5OCtRGIhwfLquhxGp5e32w+dyL8htOcDwamlitmNFK6xBZYlygjdye9dbd9rUlQ==",
"dev": true,
"requires": {
- "@babel/helper-module-transforms": "^7.12.1",
- "@babel/helper-plugin-utils": "^7.10.4",
- "@babel/helper-simple-access": "^7.12.1",
+ "@babel/helper-module-transforms": "^7.14.0",
+ "@babel/helper-plugin-utils": "^7.13.0",
+ "@babel/helper-simple-access": "^7.13.12",
"babel-plugin-dynamic-import-node": "^2.3.3"
}
},
"@babel/plugin-transform-modules-systemjs": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.12.1.tgz",
- "integrity": "sha512-Hn7cVvOavVh8yvW6fLwveFqSnd7rbQN3zJvoPNyNaQSvgfKmDBO9U1YL9+PCXGRlZD9tNdWTy5ACKqMuzyn32Q==",
+ "version": "7.13.8",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.13.8.tgz",
+ "integrity": "sha512-hwqctPYjhM6cWvVIlOIe27jCIBgHCsdH2xCJVAYQm7V5yTMoilbVMi9f6wKg0rpQAOn6ZG4AOyvCqFF/hUh6+A==",
"dev": true,
"requires": {
- "@babel/helper-hoist-variables": "^7.10.4",
- "@babel/helper-module-transforms": "^7.12.1",
- "@babel/helper-plugin-utils": "^7.10.4",
- "@babel/helper-validator-identifier": "^7.10.4",
+ "@babel/helper-hoist-variables": "^7.13.0",
+ "@babel/helper-module-transforms": "^7.13.0",
+ "@babel/helper-plugin-utils": "^7.13.0",
+ "@babel/helper-validator-identifier": "^7.12.11",
"babel-plugin-dynamic-import-node": "^2.3.3"
}
},
"@babel/plugin-transform-modules-umd": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.12.1.tgz",
- "integrity": "sha512-aEIubCS0KHKM0zUos5fIoQm+AZUMt1ZvMpqz0/H5qAQ7vWylr9+PLYurT+Ic7ID/bKLd4q8hDovaG3Zch2uz5Q==",
+ "version": "7.14.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.14.0.tgz",
+ "integrity": "sha512-nPZdnWtXXeY7I87UZr9VlsWme3Y0cfFFE41Wbxz4bbaexAjNMInXPFUpRRUJ8NoMm0Cw+zxbqjdPmLhcjfazMw==",
"dev": true,
"requires": {
- "@babel/helper-module-transforms": "^7.12.1",
- "@babel/helper-plugin-utils": "^7.10.4"
+ "@babel/helper-module-transforms": "^7.14.0",
+ "@babel/helper-plugin-utils": "^7.13.0"
}
},
"@babel/plugin-transform-named-capturing-groups-regex": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.12.1.tgz",
- "integrity": "sha512-tB43uQ62RHcoDp9v2Nsf+dSM8sbNodbEicbQNA53zHz8pWUhsgHSJCGpt7daXxRydjb0KnfmB+ChXOv3oADp1Q==",
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.12.13.tgz",
+ "integrity": "sha512-Xsm8P2hr5hAxyYblrfACXpQKdQbx4m2df9/ZZSQ8MAhsadw06+jW7s9zsSw6he+mJZXRlVMyEnVktJo4zjk1WA==",
"dev": true,
"requires": {
- "@babel/helper-create-regexp-features-plugin": "^7.12.1"
+ "@babel/helper-create-regexp-features-plugin": "^7.12.13"
}
},
"@babel/plugin-transform-new-target": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.12.1.tgz",
- "integrity": "sha512-+eW/VLcUL5L9IvJH7rT1sT0CzkdUTvPrXC2PXTn/7z7tXLBuKvezYbGdxD5WMRoyvyaujOq2fWoKl869heKjhw==",
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.12.13.tgz",
+ "integrity": "sha512-/KY2hbLxrG5GTQ9zzZSc3xWiOy379pIETEhbtzwZcw9rvuaVV4Fqy7BYGYOWZnaoXIQYbbJ0ziXLa/sKcGCYEQ==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4"
+ "@babel/helper-plugin-utils": "^7.12.13"
}
},
"@babel/plugin-transform-object-super": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.12.1.tgz",
- "integrity": "sha512-AvypiGJH9hsquNUn+RXVcBdeE3KHPZexWRdimhuV59cSoOt5kFBmqlByorAeUlGG2CJWd0U+4ZtNKga/TB0cAw==",
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.12.13.tgz",
+ "integrity": "sha512-JzYIcj3XtYspZDV8j9ulnoMPZZnF/Cj0LUxPOjR89BdBVx+zYJI9MdMIlUZjbXDX+6YVeS6I3e8op+qQ3BYBoQ==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4",
- "@babel/helper-replace-supers": "^7.12.1"
+ "@babel/helper-plugin-utils": "^7.12.13",
+ "@babel/helper-replace-supers": "^7.12.13"
}
},
"@babel/plugin-transform-parameters": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.12.1.tgz",
- "integrity": "sha512-xq9C5EQhdPK23ZeCdMxl8bbRnAgHFrw5EOC3KJUsSylZqdkCaFEXxGSBuTSObOpiiHHNyb82es8M1QYgfQGfNg==",
+ "version": "7.13.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.13.0.tgz",
+ "integrity": "sha512-Jt8k/h/mIwE2JFEOb3lURoY5C85ETcYPnbuAJ96zRBzh1XHtQZfs62ChZ6EP22QlC8c7Xqr9q+e1SU5qttwwjw==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4"
+ "@babel/helper-plugin-utils": "^7.13.0"
}
},
"@babel/plugin-transform-property-literals": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.12.1.tgz",
- "integrity": "sha512-6MTCR/mZ1MQS+AwZLplX4cEySjCpnIF26ToWo942nqn8hXSm7McaHQNeGx/pt7suI1TWOWMfa/NgBhiqSnX0cQ==",
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.12.13.tgz",
+ "integrity": "sha512-nqVigwVan+lR+g8Fj8Exl0UQX2kymtjcWfMOYM1vTYEKujeyv2SkMgazf2qNcK7l4SDiKyTA/nHCPqL4e2zo1A==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4"
+ "@babel/helper-plugin-utils": "^7.12.13"
}
},
"@babel/plugin-transform-regenerator": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.12.1.tgz",
- "integrity": "sha512-gYrHqs5itw6i4PflFX3OdBPMQdPbF4bj2REIUxlMRUFk0/ZOAIpDFuViuxPjUL7YC8UPnf+XG7/utJvqXdPKng==",
+ "version": "7.13.15",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.13.15.tgz",
+ "integrity": "sha512-Bk9cOLSz8DiurcMETZ8E2YtIVJbFCPGW28DJWUakmyVWtQSm6Wsf0p4B4BfEr/eL2Nkhe/CICiUiMOCi1TPhuQ==",
"dev": true,
"requires": {
"regenerator-transform": "^0.14.2"
}
},
"@babel/plugin-transform-reserved-words": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.12.1.tgz",
- "integrity": "sha512-pOnUfhyPKvZpVyBHhSBoX8vfA09b7r00Pmm1sH+29ae2hMTKVmSp4Ztsr8KBKjLjx17H0eJqaRC3bR2iThM54A==",
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.12.13.tgz",
+ "integrity": "sha512-xhUPzDXxZN1QfiOy/I5tyye+TRz6lA7z6xaT4CLOjPRMVg1ldRf0LHw0TDBpYL4vG78556WuHdyO9oi5UmzZBg==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4"
+ "@babel/helper-plugin-utils": "^7.12.13"
}
},
"@babel/plugin-transform-runtime": {
}
},
"@babel/plugin-transform-shorthand-properties": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.12.1.tgz",
- "integrity": "sha512-GFZS3c/MhX1OusqB1MZ1ct2xRzX5ppQh2JU1h2Pnfk88HtFTM+TWQqJNfwkmxtPQtb/s1tk87oENfXJlx7rSDw==",
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.12.13.tgz",
+ "integrity": "sha512-xpL49pqPnLtf0tVluuqvzWIgLEhuPpZzvs2yabUHSKRNlN7ScYU7aMlmavOeyXJZKgZKQRBlh8rHbKiJDraTSw==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4"
+ "@babel/helper-plugin-utils": "^7.12.13"
}
},
"@babel/plugin-transform-spread": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.12.1.tgz",
- "integrity": "sha512-vuLp8CP0BE18zVYjsEBZ5xoCecMK6LBMMxYzJnh01rxQRvhNhH1csMMmBfNo5tGpGO+NhdSNW2mzIvBu3K1fng==",
+ "version": "7.13.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.13.0.tgz",
+ "integrity": "sha512-V6vkiXijjzYeFmQTr3dBxPtZYLPcUfY34DebOU27jIl2M/Y8Egm52Hw82CSjjPqd54GTlJs5x+CR7HeNr24ckg==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4",
+ "@babel/helper-plugin-utils": "^7.13.0",
"@babel/helper-skip-transparent-expression-wrappers": "^7.12.1"
}
},
"@babel/plugin-transform-sticky-regex": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.12.1.tgz",
- "integrity": "sha512-CiUgKQ3AGVk7kveIaPEET1jNDhZZEl1RPMWdTBE1799bdz++SwqDHStmxfCtDfBhQgCl38YRiSnrMuUMZIWSUQ==",
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.12.13.tgz",
+ "integrity": "sha512-Jc3JSaaWT8+fr7GRvQP02fKDsYk4K/lYwWq38r/UGfaxo89ajud321NH28KRQ7xy1Ybc0VUE5Pz8psjNNDUglg==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4",
- "@babel/helper-regex": "^7.10.4"
+ "@babel/helper-plugin-utils": "^7.12.13"
}
},
"@babel/plugin-transform-template-literals": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.12.1.tgz",
- "integrity": "sha512-b4Zx3KHi+taXB1dVRBhVJtEPi9h1THCeKmae2qP0YdUHIFhVjtpqqNfxeVAa1xeHVhAy4SbHxEwx5cltAu5apw==",
+ "version": "7.13.0",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.13.0.tgz",
+ "integrity": "sha512-d67umW6nlfmr1iehCcBv69eSUSySk1EsIS8aTDX4Xo9qajAh6mYtcl4kJrBkGXuxZPEgVr7RVfAvNW6YQkd4Mw==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4"
+ "@babel/helper-plugin-utils": "^7.13.0"
}
},
"@babel/plugin-transform-typeof-symbol": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.12.1.tgz",
- "integrity": "sha512-EPGgpGy+O5Kg5pJFNDKuxt9RdmTgj5sgrus2XVeMp/ZIbOESadgILUbm50SNpghOh3/6yrbsH+NB5+WJTmsA7Q==",
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.12.13.tgz",
+ "integrity": "sha512-eKv/LmUJpMnu4npgfvs3LiHhJua5fo/CysENxa45YCQXZwKnGCQKAg87bvoqSW1fFT+HA32l03Qxsm8ouTY3ZQ==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4"
+ "@babel/helper-plugin-utils": "^7.12.13"
}
},
"@babel/plugin-transform-unicode-escapes": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.12.1.tgz",
- "integrity": "sha512-I8gNHJLIc7GdApm7wkVnStWssPNbSRMPtgHdmH3sRM1zopz09UWPS4x5V4n1yz/MIWTVnJ9sp6IkuXdWM4w+2Q==",
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.12.13.tgz",
+ "integrity": "sha512-0bHEkdwJ/sN/ikBHfSmOXPypN/beiGqjo+o4/5K+vxEFNPRPdImhviPakMKG4x96l85emoa0Z6cDflsdBusZbw==",
"dev": true,
"requires": {
- "@babel/helper-plugin-utils": "^7.10.4"
+ "@babel/helper-plugin-utils": "^7.12.13"
}
},
"@babel/plugin-transform-unicode-regex": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.12.1.tgz",
- "integrity": "sha512-SqH4ClNngh/zGwHZOOQMTD+e8FGWexILV+ePMyiDJttAWRh5dhDL8rcl5lSgU3Huiq6Zn6pWTMvdPAb21Dwdyg==",
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.12.13.tgz",
+ "integrity": "sha512-mDRzSNY7/zopwisPZ5kM9XKCfhchqIYwAKRERtEnhYscZB79VRekuRSoYbN0+KVe3y8+q1h6A4svXtP7N+UoCA==",
"dev": true,
"requires": {
- "@babel/helper-create-regexp-features-plugin": "^7.12.1",
- "@babel/helper-plugin-utils": "^7.10.4"
+ "@babel/helper-create-regexp-features-plugin": "^7.12.13",
+ "@babel/helper-plugin-utils": "^7.12.13"
}
},
"@babel/preset-env": {
}
},
"@babel/template": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz",
- "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==",
+ "version": "7.12.13",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz",
+ "integrity": "sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA==",
"requires": {
- "@babel/code-frame": "^7.10.4",
- "@babel/parser": "^7.10.4",
- "@babel/types": "^7.10.4"
+ "@babel/code-frame": "^7.12.13",
+ "@babel/parser": "^7.12.13",
+ "@babel/types": "^7.12.13"
}
},
"@babel/traverse": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.1.tgz",
- "integrity": "sha512-MA3WPoRt1ZHo2ZmoGKNqi20YnPt0B1S0GTZEPhhd+hw2KGUzBlHuVunj6K4sNuK+reEvyiPwtp0cpaqLzJDmAw==",
- "requires": {
- "@babel/code-frame": "^7.10.4",
- "@babel/generator": "^7.12.1",
- "@babel/helper-function-name": "^7.10.4",
- "@babel/helper-split-export-declaration": "^7.11.0",
- "@babel/parser": "^7.12.1",
- "@babel/types": "^7.12.1",
+ "version": "7.14.0",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.14.0.tgz",
+ "integrity": "sha512-dZ/a371EE5XNhTHomvtuLTUyx6UEoJmYX+DT5zBCQN3McHemsuIaKKYqsc/fs26BEkHs/lBZy0J571LP5z9kQA==",
+ "requires": {
+ "@babel/code-frame": "^7.12.13",
+ "@babel/generator": "^7.14.0",
+ "@babel/helper-function-name": "^7.12.13",
+ "@babel/helper-split-export-declaration": "^7.12.13",
+ "@babel/parser": "^7.14.0",
+ "@babel/types": "^7.14.0",
"debug": "^4.1.0",
- "globals": "^11.1.0",
- "lodash": "^4.17.19"
+ "globals": "^11.1.0"
}
},
"@babel/types": {
- "version": "7.12.1",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.1.tgz",
- "integrity": "sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA==",
+ "version": "7.14.1",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.1.tgz",
+ "integrity": "sha512-S13Qe85fzLs3gYRUnrpyeIrBJIMYv33qSTg1qoBwiG6nPKwUWAD9odSzWhEedpwOIzSEI6gbdQIWEMiCI42iBA==",
"requires": {
- "@babel/helper-validator-identifier": "^7.10.4",
- "lodash": "^4.17.19",
+ "@babel/helper-validator-identifier": "^7.14.0",
"to-fast-properties": "^2.0.0"
}
},
}
},
"glob": {
- "version": "7.1.6",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
- "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+ "version": "7.1.7",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz",
+ "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
"dev": true
},
"typescript": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.3.tgz",
- "integrity": "sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg==",
+ "version": "4.2.4",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.4.tgz",
+ "integrity": "sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==",
"dev": true
}
}
},
"dependencies": {
"fs-extra": {
- "version": "9.0.1",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.1.tgz",
- "integrity": "sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ==",
+ "version": "9.1.0",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
+ "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
"dev": true,
"requires": {
"at-least-node": "^1.0.0",
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
- "universalify": "^1.0.0"
+ "universalify": "^2.0.0"
}
},
"jsonfile": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.0.1.tgz",
- "integrity": "sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg==",
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
+ "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
"dev": true,
"requires": {
"graceful-fs": "^4.1.6",
- "universalify": "^1.0.0"
+ "universalify": "^2.0.0"
}
},
"universalify": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz",
- "integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==",
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
+ "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
"dev": true
}
}
},
"dependencies": {
"debug": {
- "version": "3.2.6",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
- "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
+ "version": "3.2.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
"dev": true,
"requires": {
"ms": "^2.1.1"
"is-negated-glob": "^1.0.0"
}
},
- "@hapi/address": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/@hapi/address/-/address-4.1.0.tgz",
- "integrity": "sha512-SkszZf13HVgGmChdHo/PxchnSaCJ6cetVqLzyciudzZRT0jcOouIF/Q93mgjw8cce+D+4F4C1Z/WrfFN+O3VHQ==",
- "dev": true,
- "requires": {
- "@hapi/hoek": "^9.0.0"
- }
- },
- "@hapi/formula": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/@hapi/formula/-/formula-2.0.0.tgz",
- "integrity": "sha512-V87P8fv7PI0LH7LiVi8Lkf3x+KCO7pQozXRssAHNXXL9L1K+uyu4XypLXwxqVDKgyQai6qj3/KteNlrqDx4W5A==",
- "dev": true
- },
"@hapi/hoek": {
- "version": "9.1.0",
- "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.1.0.tgz",
- "integrity": "sha512-i9YbZPN3QgfighY/1X1Pu118VUz2Fmmhd6b2n0/O8YVgGGfw0FbUYoA97k7FkpGJ+pLCFEDLUmAPPV4D1kpeFw==",
- "dev": true
- },
- "@hapi/pinpoint": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/@hapi/pinpoint/-/pinpoint-2.0.0.tgz",
- "integrity": "sha512-vzXR5MY7n4XeIvLpfl3HtE3coZYO4raKXW766R6DZw/6aLqR26iuZ109K7a0NtF2Db0jxqh7xz2AxkUwpUFybw==",
+ "version": "9.2.0",
+ "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.2.0.tgz",
+ "integrity": "sha512-sqKVVVOe5ivCaXDWivIJYVSaEgdQK9ul7a4Kity5Iw7u9+wBAPbX1RMSnLLmp7O4Vzj0WOWwMAJsTL00xwaNug==",
"dev": true
},
"@hapi/topo": {
}
},
"@istanbuljs/schema": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.2.tgz",
- "integrity": "sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==",
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz",
+ "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==",
"dev": true
},
"@jest/console": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/console/-/console-26.5.2.tgz",
- "integrity": "sha512-lJELzKINpF1v74DXHbCRIkQ/+nUV1M+ntj+X1J8LxCgpmJZjfLmhFejiMSbjjD66fayxl5Z06tbs3HMyuik6rw==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/console/-/console-26.6.2.tgz",
+ "integrity": "sha512-IY1R2i2aLsLr7Id3S6p2BA82GNWryt4oSvEXLAKc+L2zdi89dSkE8xC1C+0kpATG4JhBJREnQOH7/zmccM2B0g==",
"dev": true,
"requires": {
- "@jest/types": "^26.5.2",
+ "@jest/types": "^26.6.2",
"@types/node": "*",
"chalk": "^4.0.0",
- "jest-message-util": "^26.5.2",
- "jest-util": "^26.5.2",
+ "jest-message-util": "^26.6.2",
+ "jest-util": "^26.6.2",
"slash": "^3.0.0"
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
}
},
"@jest/core": {
- "version": "26.5.3",
- "resolved": "https://registry.npmjs.org/@jest/core/-/core-26.5.3.tgz",
- "integrity": "sha512-CiU0UKFF1V7KzYTVEtFbFmGLdb2g4aTtY0WlyUfLgj/RtoTnJFhh50xKKr7OYkdmBUlGFSa2mD1TU3UZ6OLd4g==",
+ "version": "26.6.3",
+ "resolved": "https://registry.npmjs.org/@jest/core/-/core-26.6.3.tgz",
+ "integrity": "sha512-xvV1kKbhfUqFVuZ8Cyo+JPpipAHHAV3kcDBftiduK8EICXmTFddryy3P7NfZt8Pv37rA9nEJBKCCkglCPt/Xjw==",
"dev": true,
"requires": {
- "@jest/console": "^26.5.2",
- "@jest/reporters": "^26.5.3",
- "@jest/test-result": "^26.5.2",
- "@jest/transform": "^26.5.2",
- "@jest/types": "^26.5.2",
+ "@jest/console": "^26.6.2",
+ "@jest/reporters": "^26.6.2",
+ "@jest/test-result": "^26.6.2",
+ "@jest/transform": "^26.6.2",
+ "@jest/types": "^26.6.2",
"@types/node": "*",
"ansi-escapes": "^4.2.1",
"chalk": "^4.0.0",
"exit": "^0.1.2",
"graceful-fs": "^4.2.4",
- "jest-changed-files": "^26.5.2",
- "jest-config": "^26.5.3",
- "jest-haste-map": "^26.5.2",
- "jest-message-util": "^26.5.2",
+ "jest-changed-files": "^26.6.2",
+ "jest-config": "^26.6.3",
+ "jest-haste-map": "^26.6.2",
+ "jest-message-util": "^26.6.2",
"jest-regex-util": "^26.0.0",
- "jest-resolve": "^26.5.2",
- "jest-resolve-dependencies": "^26.5.3",
- "jest-runner": "^26.5.3",
- "jest-runtime": "^26.5.3",
- "jest-snapshot": "^26.5.3",
- "jest-util": "^26.5.2",
- "jest-validate": "^26.5.3",
- "jest-watcher": "^26.5.2",
+ "jest-resolve": "^26.6.2",
+ "jest-resolve-dependencies": "^26.6.3",
+ "jest-runner": "^26.6.3",
+ "jest-runtime": "^26.6.3",
+ "jest-snapshot": "^26.6.2",
+ "jest-util": "^26.6.2",
+ "jest-validate": "^26.6.2",
+ "jest-watcher": "^26.6.2",
"micromatch": "^4.0.2",
"p-each-series": "^2.1.0",
"rimraf": "^3.0.0",
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
}
},
"@jest/environment": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-26.5.2.tgz",
- "integrity": "sha512-YjhCD/Zhkz0/1vdlS/QN6QmuUdDkpgBdK4SdiVg4Y19e29g4VQYN5Xg8+YuHjdoWGY7wJHMxc79uDTeTOy9Ngw==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-26.6.2.tgz",
+ "integrity": "sha512-nFy+fHl28zUrRsCeMB61VDThV1pVTtlEokBRgqPrcT1JNq4yRNIyTHfyht6PqtUvY9IsuLGTrbG8kPXjSZIZwA==",
"dev": true,
"requires": {
- "@jest/fake-timers": "^26.5.2",
- "@jest/types": "^26.5.2",
+ "@jest/fake-timers": "^26.6.2",
+ "@jest/types": "^26.6.2",
"@types/node": "*",
- "jest-mock": "^26.5.2"
+ "jest-mock": "^26.6.2"
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
}
},
"@jest/fake-timers": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-26.5.2.tgz",
- "integrity": "sha512-09Hn5Oraqt36V1akxQeWMVL0fR9c6PnEhpgLaYvREXZJAh2H2Y+QLCsl0g7uMoJeoWJAuz4tozk1prbR1Fc1sw==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-26.6.2.tgz",
+ "integrity": "sha512-14Uleatt7jdzefLPYM3KLcnUl1ZNikaKq34enpb5XG9i81JpppDb5muZvonvKyrl7ftEHkKS5L5/eB/kxJ+bvA==",
"dev": true,
"requires": {
- "@jest/types": "^26.5.2",
+ "@jest/types": "^26.6.2",
"@sinonjs/fake-timers": "^6.0.1",
"@types/node": "*",
- "jest-message-util": "^26.5.2",
- "jest-mock": "^26.5.2",
- "jest-util": "^26.5.2"
+ "jest-message-util": "^26.6.2",
+ "jest-mock": "^26.6.2",
+ "jest-util": "^26.6.2"
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
}
},
"@jest/globals": {
- "version": "26.5.3",
- "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-26.5.3.tgz",
- "integrity": "sha512-7QztI0JC2CuB+Wx1VdnOUNeIGm8+PIaqngYsZXQCkH2QV0GFqzAYc9BZfU0nuqA6cbYrWh5wkuMzyii3P7deug==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-26.6.2.tgz",
+ "integrity": "sha512-85Ltnm7HlB/KesBUuALwQ68YTU72w9H2xW9FjZ1eL1U3lhtefjjl5c2MiUbpXt/i6LaPRvoOFJ22yCBSfQ0JIA==",
"dev": true,
"requires": {
- "@jest/environment": "^26.5.2",
- "@jest/types": "^26.5.2",
- "expect": "^26.5.3"
+ "@jest/environment": "^26.6.2",
+ "@jest/types": "^26.6.2",
+ "expect": "^26.6.2"
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
}
},
"@jest/reporters": {
- "version": "26.5.3",
- "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-26.5.3.tgz",
- "integrity": "sha512-X+vR0CpfMQzYcYmMFKNY9n4jklcb14Kffffp7+H/MqitWnb0440bW2L76NGWKAa+bnXhNoZr+lCVtdtPmfJVOQ==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-26.6.2.tgz",
+ "integrity": "sha512-h2bW53APG4HvkOnVMo8q3QXa6pcaNt1HkwVsOPMBV6LD/q9oSpxNSYZQYkAnjdMjrJ86UuYeLo+aEZClV6opnw==",
"dev": true,
"requires": {
"@bcoe/v8-coverage": "^0.2.3",
- "@jest/console": "^26.5.2",
- "@jest/test-result": "^26.5.2",
- "@jest/transform": "^26.5.2",
- "@jest/types": "^26.5.2",
+ "@jest/console": "^26.6.2",
+ "@jest/test-result": "^26.6.2",
+ "@jest/transform": "^26.6.2",
+ "@jest/types": "^26.6.2",
"chalk": "^4.0.0",
"collect-v8-coverage": "^1.0.0",
"exit": "^0.1.2",
"istanbul-lib-report": "^3.0.0",
"istanbul-lib-source-maps": "^4.0.0",
"istanbul-reports": "^3.0.2",
- "jest-haste-map": "^26.5.2",
- "jest-resolve": "^26.5.2",
- "jest-util": "^26.5.2",
- "jest-worker": "^26.5.0",
+ "jest-haste-map": "^26.6.2",
+ "jest-resolve": "^26.6.2",
+ "jest-util": "^26.6.2",
+ "jest-worker": "^26.6.2",
"node-notifier": "^8.0.0",
"slash": "^3.0.0",
"source-map": "^0.6.0",
"string-length": "^4.0.1",
"terminal-link": "^2.0.0",
- "v8-to-istanbul": "^6.0.1"
+ "v8-to-istanbul": "^7.0.0"
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"dev": true
},
"jest-worker": {
- "version": "26.5.0",
- "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.5.0.tgz",
- "integrity": "sha512-kTw66Dn4ZX7WpjZ7T/SUDgRhapFRKWmisVAF0Rv4Fu8SLFD7eLbqpLvbxVqYhSgaWa7I+bW7pHnbyfNsH6stug==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz",
+ "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==",
"dev": true,
"requires": {
"@types/node": "*",
}
},
"@jest/source-map": {
- "version": "26.5.0",
- "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-26.5.0.tgz",
- "integrity": "sha512-jWAw9ZwYHJMe9eZq/WrsHlwF8E3hM9gynlcDpOyCb9bR8wEd9ZNBZCi7/jZyzHxC7t3thZ10gO2IDhu0bPKS5g==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-26.6.2.tgz",
+ "integrity": "sha512-YwYcCwAnNmOVsZ8mr3GfnzdXDAl4LaenZP5z+G0c8bzC9/dugL8zRmxZzdoTl4IaS3CryS1uWnROLPFmb6lVvA==",
"dev": true,
"requires": {
"callsites": "^3.0.0",
}
},
"@jest/test-result": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-26.5.2.tgz",
- "integrity": "sha512-E/Zp6LURJEGSCWpoMGmCFuuEI1OWuI3hmZwmULV0GsgJBh7u0rwqioxhRU95euUuviqBDN8ruX/vP/4bwYolXw==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-26.6.2.tgz",
+ "integrity": "sha512-5O7H5c/7YlojphYNrK02LlDIV2GNPYisKwHm2QTKjNZeEzezCbwYs9swJySv2UfPMyZ0VdsmMv7jIlD/IKYQpQ==",
"dev": true,
"requires": {
- "@jest/console": "^26.5.2",
- "@jest/types": "^26.5.2",
+ "@jest/console": "^26.6.2",
+ "@jest/types": "^26.6.2",
"@types/istanbul-lib-coverage": "^2.0.0",
"collect-v8-coverage": "^1.0.0"
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
}
},
"@jest/test-sequencer": {
- "version": "26.5.3",
- "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-26.5.3.tgz",
- "integrity": "sha512-Wqzb7aQ13L3T47xHdpUqYMOpiqz6Dx2QDDghp5AV/eUDXR7JieY+E1s233TQlNyl+PqtqgjVokmyjzX/HA51BA==",
+ "version": "26.6.3",
+ "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-26.6.3.tgz",
+ "integrity": "sha512-YHlVIjP5nfEyjlrSr8t/YdNfU/1XEt7c5b4OxcXCjyRhjzLYu/rO69/WHPuYcbCWkz8kAeZVZp2N2+IOLLEPGw==",
"dev": true,
"requires": {
- "@jest/test-result": "^26.5.2",
+ "@jest/test-result": "^26.6.2",
"graceful-fs": "^4.2.4",
- "jest-haste-map": "^26.5.2",
- "jest-runner": "^26.5.3",
- "jest-runtime": "^26.5.3"
+ "jest-haste-map": "^26.6.2",
+ "jest-runner": "^26.6.3",
+ "jest-runtime": "^26.6.3"
}
},
"@jest/transform": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-26.5.2.tgz",
- "integrity": "sha512-AUNjvexh+APhhmS8S+KboPz+D3pCxPvEAGduffaAJYxIFxGi/ytZQkrqcKDUU0ERBAo5R7087fyOYr2oms1seg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-26.6.2.tgz",
+ "integrity": "sha512-E9JjhUgNzvuQ+vVAL21vlyfy12gP0GhazGgJC4h6qUt1jSdUXGWJ1wfu/X7Sd8etSgxV4ovT1pb9v5D6QW4XgA==",
"dev": true,
"requires": {
"@babel/core": "^7.1.0",
- "@jest/types": "^26.5.2",
+ "@jest/types": "^26.6.2",
"babel-plugin-istanbul": "^6.0.0",
"chalk": "^4.0.0",
"convert-source-map": "^1.4.0",
"fast-json-stable-stringify": "^2.0.0",
"graceful-fs": "^4.2.4",
- "jest-haste-map": "^26.5.2",
+ "jest-haste-map": "^26.6.2",
"jest-regex-util": "^26.0.0",
- "jest-util": "^26.5.2",
+ "jest-util": "^26.6.2",
"micromatch": "^4.0.2",
"pirates": "^4.0.1",
"slash": "^3.0.0",
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
}
},
"@ngtools/webpack": {
- "version": "10.1.6",
- "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-10.1.6.tgz",
- "integrity": "sha512-EOHGM/4AwOWrKlwVAyBkxdMdPmHc9qXRATg3SD0MXmNPX92tU94uZaP7cHqMzuUYl9D+0MzzXRtYSocl7bN1SQ==",
+ "version": "10.2.3",
+ "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-10.2.3.tgz",
+ "integrity": "sha512-h7JJMMca1bHY/0Prpxu2P3bvnC6pUKmBAfqN0h0HaRN9LTU9IDWtDRTIL1Aqhs/tcTUio/DowVKnVi2CWHAOmg==",
"dev": true,
"requires": {
- "@angular-devkit/core": "10.1.6",
+ "@angular-devkit/core": "10.2.3",
"enhanced-resolve": "4.3.0",
"webpack-sources": "1.4.3"
}
},
"@nodelib/fs.scandir": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz",
- "integrity": "sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==",
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz",
+ "integrity": "sha512-33g3pMJk3bg5nXbL/+CY6I2eJDzZAni49PfJnL5fghPTggPvBd/pFNSgJsdAgWptuFu7qq/ERvOYFlhvsLTCKA==",
"dev": true,
"requires": {
- "@nodelib/fs.stat": "2.0.3",
+ "@nodelib/fs.stat": "2.0.4",
"run-parallel": "^1.1.9"
}
},
"@nodelib/fs.stat": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz",
- "integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==",
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.4.tgz",
+ "integrity": "sha512-IYlHJA0clt2+Vg7bccq+TzRdJvv19c2INqBSsoOLp1je7xjtr7J26+WXR72MCdvU9q1qTzIWDfhMf+DRvQJK4Q==",
"dev": true
},
"@nodelib/fs.walk": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz",
- "integrity": "sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==",
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.6.tgz",
+ "integrity": "sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow==",
"dev": true,
"requires": {
- "@nodelib/fs.scandir": "2.1.3",
+ "@nodelib/fs.scandir": "2.1.4",
"fastq": "^1.6.0"
}
},
"@npmcli/move-file": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.0.1.tgz",
- "integrity": "sha512-Uv6h1sT+0DrblvIrolFtbvM1FgWm+/sy4B3pvLp67Zys+thcukzS5ekn7HsZFGpWP4Q3fYJCljbWQE/XivMRLw==",
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.1.2.tgz",
+ "integrity": "sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg==",
"dev": true,
"requires": {
- "mkdirp": "^1.0.4"
+ "mkdirp": "^1.0.4",
+ "rimraf": "^3.0.2"
},
"dependencies": {
"mkdirp": {
"@angular-devkit/core": "10.1.6",
"@angular-devkit/schematics": "10.1.6",
"jsonc-parser": "2.3.0"
+ },
+ "dependencies": {
+ "@angular-devkit/core": {
+ "version": "10.1.6",
+ "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-10.1.6.tgz",
+ "integrity": "sha512-RhZCbX2I+ukR6/yu1OxwtyveBkQy+knRSQ7oxsBbwkS4M0XzmUswlf0p8lTfJI9pxrJnc2SODatMfEKeOYWmkA==",
+ "dev": true,
+ "requires": {
+ "ajv": "6.12.4",
+ "fast-json-stable-stringify": "2.1.0",
+ "magic-string": "0.25.7",
+ "rxjs": "6.6.2",
+ "source-map": "0.7.3"
+ }
+ },
+ "rxjs": {
+ "version": "6.6.2",
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.2.tgz",
+ "integrity": "sha512-BHdBMVoWC2sL26w//BCu3YzKT4s2jip/WhwsGEDmeKYBhKDZeYezVUnHatYB7L85v5xs0BAQmg6BEYJEKxBabg==",
+ "dev": true,
+ "requires": {
+ "tslib": "^1.9.0"
+ }
+ },
+ "source-map": {
+ "version": "0.7.3",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz",
+ "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==",
+ "dev": true
+ },
+ "tslib": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
+ "dev": true
+ }
}
},
"@schematics/update": {
"semver-intersect": "1.4.0"
},
"dependencies": {
+ "@angular-devkit/core": {
+ "version": "10.1.6",
+ "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-10.1.6.tgz",
+ "integrity": "sha512-RhZCbX2I+ukR6/yu1OxwtyveBkQy+knRSQ7oxsBbwkS4M0XzmUswlf0p8lTfJI9pxrJnc2SODatMfEKeOYWmkA==",
+ "dev": true,
+ "requires": {
+ "ajv": "6.12.4",
+ "fast-json-stable-stringify": "2.1.0",
+ "magic-string": "0.25.7",
+ "rxjs": "6.6.2",
+ "source-map": "0.7.3"
+ }
+ },
+ "rxjs": {
+ "version": "6.6.2",
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.2.tgz",
+ "integrity": "sha512-BHdBMVoWC2sL26w//BCu3YzKT4s2jip/WhwsGEDmeKYBhKDZeYezVUnHatYB7L85v5xs0BAQmg6BEYJEKxBabg==",
+ "dev": true,
+ "requires": {
+ "tslib": "^1.9.0"
+ }
+ },
"semver": {
"version": "7.3.2",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
"integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
"dev": true
+ },
+ "source-map": {
+ "version": "0.7.3",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz",
+ "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==",
+ "dev": true
+ },
+ "tslib": {
+ "version": "1.14.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
+ "dev": true
}
}
},
+ "@sideway/address": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.2.tgz",
+ "integrity": "sha512-idTz8ibqWFrPU8kMirL0CoPH/A29XOzzAzpyN3zQ4kAWnzmNfFmRaoMNN6VI8ske5M73HZyhIaW4OuSFIdM4oA==",
+ "dev": true,
+ "requires": {
+ "@hapi/hoek": "^9.0.0"
+ }
+ },
+ "@sideway/formula": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.0.tgz",
+ "integrity": "sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg==",
+ "dev": true
+ },
+ "@sideway/pinpoint": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz",
+ "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==",
+ "dev": true
+ },
"@sinonjs/commons": {
- "version": "1.8.1",
- "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.1.tgz",
- "integrity": "sha512-892K+kWUUi3cl+LlqEWIDrhvLgdL79tECi8JZUyq6IviKy/DNhuzCRlbHUjxK89f4ypPMMaFnFuR9Ie6DoIMsw==",
+ "version": "1.8.3",
+ "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz",
+ "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==",
"dev": true,
"requires": {
"type-detect": "4.0.8"
},
"dependencies": {
"@babel/core": {
- "version": "7.12.3",
- "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.3.tgz",
- "integrity": "sha512-0qXcZYKZp3/6N2jKYVxZv0aNCsxTSVCiK72DTiTYZAu7sjg73W0/aynWjMbiGd87EQL4WyA8reiJVh92AVla9g==",
- "dev": true,
- "requires": {
- "@babel/code-frame": "^7.10.4",
- "@babel/generator": "^7.12.1",
- "@babel/helper-module-transforms": "^7.12.1",
- "@babel/helpers": "^7.12.1",
- "@babel/parser": "^7.12.3",
- "@babel/template": "^7.10.4",
- "@babel/traverse": "^7.12.1",
- "@babel/types": "^7.12.1",
+ "version": "7.14.0",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.14.0.tgz",
+ "integrity": "sha512-8YqpRig5NmIHlMLw09zMlPTvUVMILjqCOtVgu+TVNWEBvy9b5I3RRyhqnrV4hjgEK7n8P9OqvkWJAFmEL6Wwfw==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "^7.12.13",
+ "@babel/generator": "^7.14.0",
+ "@babel/helper-compilation-targets": "^7.13.16",
+ "@babel/helper-module-transforms": "^7.14.0",
+ "@babel/helpers": "^7.14.0",
+ "@babel/parser": "^7.14.0",
+ "@babel/template": "^7.12.13",
+ "@babel/traverse": "^7.14.0",
+ "@babel/types": "^7.14.0",
"convert-source-map": "^1.7.0",
"debug": "^4.1.0",
- "gensync": "^1.0.0-beta.1",
+ "gensync": "^1.0.0-beta.2",
"json5": "^2.1.2",
- "lodash": "^4.17.19",
- "resolve": "^1.3.2",
- "semver": "^5.4.1",
+ "semver": "^6.3.0",
"source-map": "^0.5.0"
}
+ },
+ "semver": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+ "dev": true
}
}
},
"@stylelint/postcss-markdown": {
- "version": "0.36.1",
- "resolved": "https://registry.npmjs.org/@stylelint/postcss-markdown/-/postcss-markdown-0.36.1.tgz",
- "integrity": "sha512-iDxMBWk9nB2BPi1VFQ+Dc5+XpvODBHw2n3tYpaBZuEAFQlbtF9If0Qh5LTTwSi/XwdbJ2jt+0dis3i8omyggpw==",
+ "version": "0.36.2",
+ "resolved": "https://registry.npmjs.org/@stylelint/postcss-markdown/-/postcss-markdown-0.36.2.tgz",
+ "integrity": "sha512-2kGbqUVJUGE8dM+bMzXG/PYUWKkjLIkRLWNh39OaADkiabDRdw8ATFCgbMz5xdIcvwspPAluSL7uY+ZiTWdWmQ==",
"dev": true,
"requires": {
- "remark": "^12.0.0",
- "unist-util-find-all-after": "^3.0.1"
+ "remark": "^13.0.0",
+ "unist-util-find-all-after": "^3.0.2"
}
},
"@swimlane/ngx-datatable": {
}
},
"@types/babel__core": {
- "version": "7.1.10",
- "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.10.tgz",
- "integrity": "sha512-x8OM8XzITIMyiwl5Vmo2B1cR1S1Ipkyv4mdlbJjMa1lmuKvKY9FrBbEANIaMlnWn5Rf7uO+rC/VgYabNkE17Hw==",
+ "version": "7.1.14",
+ "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.14.tgz",
+ "integrity": "sha512-zGZJzzBUVDo/eV6KgbE0f0ZI7dInEYvo12Rb70uNQDshC3SkRMb67ja0GgRHZgAX3Za6rhaWlvbDO8rrGyAb1g==",
"dev": true,
"requires": {
"@babel/parser": "^7.1.0",
}
},
"@types/babel__template": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.0.3.tgz",
- "integrity": "sha512-uCoznIPDmnickEi6D0v11SBpW0OuVqHJCa7syXqQHy5uktSCreIlt0iglsCnmvz8yCb38hGcWeseA8cWJSwv5Q==",
+ "version": "7.4.0",
+ "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.0.tgz",
+ "integrity": "sha512-NTPErx4/FiPCGScH7foPyr+/1Dkzkni+rHiYHHoTjvwou7AQzJkNeD60A9CXRy+ZEN2B1bggmkTMCDb+Mv5k+A==",
"dev": true,
"requires": {
"@babel/parser": "^7.1.0",
}
},
"@types/babel__traverse": {
- "version": "7.0.15",
- "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.0.15.tgz",
- "integrity": "sha512-Pzh9O3sTK8V6I1olsXpCfj2k/ygO2q1X0vhhnDrEQyYLHZesWz+zMZMVcwXLCYf0U36EtmyYaFGPfXlTtDHe3A==",
+ "version": "7.11.1",
+ "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.11.1.tgz",
+ "integrity": "sha512-Vs0hm0vPahPMYi9tDjtP66llufgO3ST16WXaSTtDGEl9cewAl3AibmxWw6TINOqHPT9z0uABKAYjT9jNSg4npw==",
"dev": true,
"requires": {
"@babel/types": "^7.3.0"
}
},
"@types/chart.js": {
- "version": "2.9.26",
- "resolved": "https://registry.npmjs.org/@types/chart.js/-/chart.js-2.9.26.tgz",
- "integrity": "sha512-X2I0sRdvRB3QKtC240cYQtQHxPX9c7IPOZ2TRF1VOs1wtGfRsC7/AEUFWxPtJgaWV0SS+zK/Qh8jDEvNfa3KxQ==",
+ "version": "2.9.32",
+ "resolved": "https://registry.npmjs.org/@types/chart.js/-/chart.js-2.9.32.tgz",
+ "integrity": "sha512-d45JiRQwEOlZiKwukjqmqpbqbYzUX2yrXdH9qVn6kXpPDsTYCo6YbfFOlnUaJ8S/DhJwbBJiLsMjKpW5oP8B2A==",
"requires": {
"moment": "^2.10.2"
}
}
},
"@types/graceful-fs": {
- "version": "4.1.3",
- "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.3.tgz",
- "integrity": "sha512-AiHRaEB50LQg0pZmm659vNBb9f4SJ0qrAnteuzhSeAUcJKxoYgEnprg/83kppCnc2zvtCKbdZry1a5pVY3lOTQ==",
+ "version": "4.1.5",
+ "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz",
+ "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==",
"dev": true,
"requires": {
"@types/node": "*"
}
},
"@types/json-schema": {
- "version": "7.0.6",
- "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.6.tgz",
- "integrity": "sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==",
+ "version": "7.0.7",
+ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz",
+ "integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==",
"dev": true
},
"@types/lodash": {
"integrity": "sha512-EP6O3Jkr7bXvZZSZYlsgt5DIjiGr0dXP1/jVEwVLTFgg0d+3lWVQkRavYVQszV7dYUwvg0B8R0MBDpcmXg7XIA==",
"dev": true
},
- "@types/minimatch": {
+ "@types/mdast": {
"version": "3.0.3",
- "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz",
- "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==",
+ "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.3.tgz",
+ "integrity": "sha512-SXPBMnFVQg1s00dlMCc/jCdvPqdE4mXaMMCeRlxLDmTAEoegHT53xKtkDnzDTOcmMHUfcjyf36/YYZ6SxRdnsw==",
+ "dev": true,
+ "requires": {
+ "@types/unist": "*"
+ }
+ },
+ "@types/minimatch": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.4.tgz",
+ "integrity": "sha512-1z8k4wzFnNjVK/tlxvrWuK5WMt6mydWWP7+zvH5eFep4oj+UkrfiJTRtjCeBXNpwaA/FYqqtb4/QS4ianFpIRA==",
"dev": true
},
"@types/minimist": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.0.tgz",
- "integrity": "sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY=",
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.1.tgz",
+ "integrity": "sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg==",
"dev": true
},
"@types/node": {
"dev": true
},
"@types/prettier": {
- "version": "2.1.5",
- "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.1.5.tgz",
- "integrity": "sha512-UEyp8LwZ4Dg30kVU2Q3amHHyTn1jEdhCIE59ANed76GaT1Vp76DD3ZWSAxgCrw6wJ0TqeoBpqmfUHiUDPs//HQ==",
+ "version": "2.2.3",
+ "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.2.3.tgz",
+ "integrity": "sha512-PijRCG/K3s3w1We6ynUKdxEc5AcuuH3NBmMDP8uvKVp6X43UY7NQlTzczakXP3DJR0F4dfNQIGjU2cUeRYs2AA==",
"dev": true
},
"@types/q": {
"dev": true
},
"@types/sizzle": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.2.tgz",
- "integrity": "sha512-7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg==",
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.3.tgz",
+ "integrity": "sha512-JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ==",
"dev": true
},
"@types/source-list-map": {
}
},
"@types/yargs": {
- "version": "15.0.9",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.9.tgz",
- "integrity": "sha512-HmU8SeIRhZCWcnRskCs36Q1Q00KBV6Cqh/ora8WN1+22dY07AZdn6Gel8QZ3t26XYPImtcL8WV/eqjhVmMEw4g==",
+ "version": "15.0.13",
+ "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.13.tgz",
+ "integrity": "sha512-kQ5JNTrbDv3Rp5X2n/iUu37IJBDU2gsZ5R/g1/KHOOEc5IKfUFjXT6DENPGduh08I/pamwtEq4oul7gUqKTQDQ==",
"dev": true,
"requires": {
"@types/yargs-parser": "*"
}
},
"@types/yargs-parser": {
- "version": "15.0.0",
- "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-15.0.0.tgz",
- "integrity": "sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw==",
+ "version": "20.2.0",
+ "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.0.tgz",
+ "integrity": "sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA==",
"dev": true
},
"@webassemblyjs/ast": {
"dev": true
},
"adjust-sourcemap-loader": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/adjust-sourcemap-loader/-/adjust-sourcemap-loader-2.0.0.tgz",
- "integrity": "sha512-4hFsTsn58+YjrU9qKzML2JSSDqKvN8mUGQ0nNIrfPi8hmIONT4L3uUaT6MKdMsZ9AjsU6D2xDkZxCkbQPxChrA==",
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/adjust-sourcemap-loader/-/adjust-sourcemap-loader-3.0.0.tgz",
+ "integrity": "sha512-YBrGyT2/uVQ/c6Rr+t6ZJXniY03YtHGMJQYal368burRGYKqhx9qGTWqcBU5s1CwYY9E/ri63RYyG1IacMZtqw==",
"dev": true,
"requires": {
- "assert": "1.4.1",
- "camelcase": "5.0.0",
- "loader-utils": "1.2.3",
- "object-path": "0.11.4",
- "regex-parser": "2.2.10"
- },
- "dependencies": {
- "camelcase": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz",
- "integrity": "sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA==",
- "dev": true
- },
- "emojis-list": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz",
- "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=",
- "dev": true
- },
- "json5": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
- "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
- "dev": true,
- "requires": {
- "minimist": "^1.2.0"
- }
- },
- "loader-utils": {
- "version": "1.2.3",
- "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz",
- "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==",
- "dev": true,
- "requires": {
- "big.js": "^5.2.2",
- "emojis-list": "^2.0.0",
- "json5": "^1.0.1"
- }
- }
+ "loader-utils": "^2.0.0",
+ "regex-parser": "^2.2.11"
}
},
"agent-base": {
"dev": true
},
"ansi-escapes": {
- "version": "4.3.1",
- "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz",
- "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==",
+ "version": "4.3.2",
+ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz",
+ "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==",
"dev": true,
"requires": {
- "type-fest": "^0.11.0"
+ "type-fest": "^0.21.3"
}
},
"ansi-gray": {
"dev": true
},
"anymatch": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
- "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==",
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz",
+ "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==",
"dev": true,
"requires": {
"normalize-path": "^3.0.0",
"dev": true
},
"arch": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/arch/-/arch-2.1.2.tgz",
- "integrity": "sha512-NTBIIbAfkJeIletyABbVtdPgeKfDafR+1mZV/AyyfC1UkVkp9iUjV+wwmqtUgphHYajbI86jejBJp5e+jkGTiQ==",
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz",
+ "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==",
"dev": true
},
"arg": {
},
"dependencies": {
"bn.js": {
- "version": "4.11.9",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz",
- "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==",
+ "version": "4.12.0",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
+ "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
+ "dev": true
+ }
+ }
+ },
+ "assert": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz",
+ "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==",
+ "dev": true,
+ "requires": {
+ "object-assign": "^4.1.1",
+ "util": "0.10.3"
+ },
+ "dependencies": {
+ "inherits": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
+ "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=",
"dev": true
+ },
+ "util": {
+ "version": "0.10.3",
+ "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
+ "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
+ "dev": true,
+ "requires": {
+ "inherits": "2.0.1"
+ }
}
}
},
- "assert": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz",
- "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=",
- "dev": true,
- "requires": {
- "util": "0.10.3"
- }
- },
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"dev": true
},
"aws4": {
- "version": "1.10.1",
- "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.1.tgz",
- "integrity": "sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA==",
+ "version": "1.11.0",
+ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz",
+ "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==",
"dev": true
},
"axios": {
- "version": "0.19.2",
- "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz",
- "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==",
+ "version": "0.21.1",
+ "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
+ "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
"dev": true,
"requires": {
- "follow-redirects": "1.5.10"
- },
- "dependencies": {
- "debug": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
- "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
- "dev": true,
- "requires": {
- "ms": "2.0.0"
- }
- },
- "follow-redirects": {
- "version": "1.5.10",
- "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
- "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==",
- "dev": true,
- "requires": {
- "debug": "=3.1.0"
- }
- },
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
- "dev": true
- }
+ "follow-redirects": "^1.10.0"
}
},
"axobject-query": {
}
},
"babel-jest": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-26.5.2.tgz",
- "integrity": "sha512-U3KvymF3SczA3vOL/cgiUFOznfMET+XDIXiWnoJV45siAp2pLMG8i2+/MGZlAC3f/F6Q40LR4M4qDrWZ9wkK8A==",
+ "version": "26.6.3",
+ "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-26.6.3.tgz",
+ "integrity": "sha512-pl4Q+GAVOHwvjrck6jKjvmGhnO3jHX/xuB9d27f+EJZ/6k+6nMuPjorrYp7s++bKKdANwzElBWnLWaObvTnaZA==",
"dev": true,
"requires": {
- "@jest/transform": "^26.5.2",
- "@jest/types": "^26.5.2",
+ "@jest/transform": "^26.6.2",
+ "@jest/types": "^26.6.2",
"@types/babel__core": "^7.1.7",
"babel-plugin-istanbul": "^6.0.0",
- "babel-preset-jest": "^26.5.0",
+ "babel-preset-jest": "^26.6.2",
"chalk": "^4.0.0",
"graceful-fs": "^4.2.4",
"slash": "^3.0.0"
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
}
},
"babel-plugin-jest-hoist": {
- "version": "26.5.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.5.0.tgz",
- "integrity": "sha512-ck17uZFD3CDfuwCLATWZxkkuGGFhMij8quP8CNhwj8ek1mqFgbFzRJ30xwC04LLscj/aKsVFfRST+b5PT7rSuw==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.6.2.tgz",
+ "integrity": "sha512-PO9t0697lNTmcEHH69mdtYiOIkkOlj9fySqfO3K1eCcdISevLAE0xY59VLLUj0SoiPiTX/JU2CYFpILydUa5Lw==",
"dev": true,
"requires": {
"@babel/template": "^7.3.3",
}
},
"babel-preset-current-node-syntax": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-0.1.4.tgz",
- "integrity": "sha512-5/INNCYhUGqw7VbVjT/hb3ucjgkVHKXY7lX3ZjlN4gm565VyFmJUrJ/h+h16ECVB38R/9SF6aACydpKMLZ/c9w==",
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz",
+ "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==",
"dev": true,
"requires": {
"@babel/plugin-syntax-async-generators": "^7.8.4",
"@babel/plugin-syntax-numeric-separator": "^7.8.3",
"@babel/plugin-syntax-object-rest-spread": "^7.8.3",
"@babel/plugin-syntax-optional-catch-binding": "^7.8.3",
- "@babel/plugin-syntax-optional-chaining": "^7.8.3"
+ "@babel/plugin-syntax-optional-chaining": "^7.8.3",
+ "@babel/plugin-syntax-top-level-await": "^7.8.3"
}
},
"babel-preset-jest": {
- "version": "26.5.0",
- "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-26.5.0.tgz",
- "integrity": "sha512-F2vTluljhqkiGSJGBg/jOruA8vIIIL11YrxRcO7nviNTMbbofPSHwnm8mgP7d/wS7wRSexRoI6X1A6T74d4LQA==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-26.6.2.tgz",
+ "integrity": "sha512-YvdtlVm9t3k777c5NPQIv6cxFFFapys25HiUmuSgHwIZhfifweR5c5Sf5nwE3MAbfu327CYSvps8Yx6ANLyleQ==",
"dev": true,
"requires": {
- "babel-plugin-jest-hoist": "^26.5.0",
- "babel-preset-current-node-syntax": "^0.1.3"
+ "babel-plugin-jest-hoist": "^26.6.2",
+ "babel-preset-current-node-syntax": "^1.0.0"
}
},
"babel-runtime": {
},
"dependencies": {
"core-js": {
- "version": "2.6.11",
- "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz",
- "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==",
+ "version": "2.6.12",
+ "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz",
+ "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==",
"dev": true
},
"regenerator-runtime": {
"dev": true
},
"balanced-match": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
- "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
},
"base": {
"version": "0.11.2",
}
},
"base64-js": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz",
- "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==",
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
+ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
"dev": true
},
"basic-auth": {
"dev": true
},
"binary-extensions": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz",
- "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==",
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
+ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
"dev": true
},
"blob-util": {
"dev": true
},
"bn.js": {
- "version": "5.1.3",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.3.tgz",
- "integrity": "sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==",
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz",
+ "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==",
"dev": true
},
"body-parser": {
}
},
"browserify-rsa": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz",
- "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=",
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz",
+ "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==",
"dev": true,
"requires": {
- "bn.js": "^4.1.0",
+ "bn.js": "^5.0.0",
"randombytes": "^2.0.1"
- },
- "dependencies": {
- "bn.js": {
- "version": "4.11.9",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz",
- "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==",
- "dev": true
- }
}
},
"browserify-sign": {
}
},
"browserslist": {
- "version": "4.14.5",
- "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.14.5.tgz",
- "integrity": "sha512-Z+vsCZIvCBvqLoYkBFTwEYH3v5MCQbsAjp50ERycpOjnPmolg1Gjy4+KaWWpm8QOJt9GHkhdqAl14NpCX73CWA==",
+ "version": "4.16.6",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz",
+ "integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==",
"dev": true,
"requires": {
- "caniuse-lite": "^1.0.30001135",
- "electron-to-chromium": "^1.3.571",
- "escalade": "^3.1.0",
- "node-releases": "^1.1.61"
+ "caniuse-lite": "^1.0.30001219",
+ "colorette": "^1.2.2",
+ "electron-to-chromium": "^1.3.723",
+ "escalade": "^3.1.1",
+ "node-releases": "^1.1.71"
}
},
"bs-logger": {
},
"dependencies": {
"glob": {
- "version": "7.1.6",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
- "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+ "version": "7.1.7",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz",
+ "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
"integrity": "sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw==",
"dev": true
},
+ "call-bind": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
+ "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
+ "dev": true,
+ "requires": {
+ "function-bind": "^1.1.1",
+ "get-intrinsic": "^1.0.2"
+ }
+ },
"call-me-maybe": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz",
}
},
"caniuse-lite": {
- "version": "1.0.30001148",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001148.tgz",
- "integrity": "sha512-E66qcd0KMKZHNJQt9hiLZGE3J4zuTqE1OnU53miEVtylFbwOEmeA5OsRu90noZful+XGSQOni1aT2tiqu/9yYw==",
+ "version": "1.0.30001228",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001228.tgz",
+ "integrity": "sha512-QQmLOGJ3DEgokHbMSA8cj2a+geXqmnpyOFT0lhQV6P3/YOJvGDEwoedcwxEQ30gJIwIIunHIicunJ2rzK5gB2A==",
"dev": true
},
"canonical-path": {
"dev": true
},
"ccount": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.0.5.tgz",
- "integrity": "sha512-MOli1W+nfbPLlKEhInaxhRdp7KVLFxLN5ykwzHgLsLI3H3gs5jjFAK4Eoj3OzzcxCtumDaI8onoVDeQyWaNTkw==",
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/ccount/-/ccount-1.1.0.tgz",
+ "integrity": "sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg==",
"dev": true
},
"chalk": {
"dev": true
},
"chart.js": {
- "version": "2.8.0",
- "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-2.8.0.tgz",
- "integrity": "sha512-Di3wUL4BFvqI5FB5K26aQ+hvWh8wnP9A3DWGvXHVkO13D3DSnaSsdZx29cXlEsYKVkn1E2az+ZYFS4t0zi8x0w==",
+ "version": "2.9.4",
+ "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-2.9.4.tgz",
+ "integrity": "sha512-B07aAzxcrikjAPyV+01j7BmOpxtQETxTSlQ26BEYJ+3iUkbNKaOJ/nDbT6JjyqYxseM0ON12COHYdU2cTIjC7A==",
"requires": {
"chartjs-color": "^2.1.0",
"moment": "^2.10.2"
"dev": true
},
"cheerio": {
- "version": "1.0.0-rc.3",
- "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.3.tgz",
- "integrity": "sha512-0td5ijfUPuubwLUu0OBoe98gZj8C/AA+RW3v67GPlGOrvxWjZmBXiBCRU+I8VEiNyJzjth40POfHiz2RB3gImA==",
+ "version": "1.0.0-rc.9",
+ "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.9.tgz",
+ "integrity": "sha512-QF6XVdrLONO6DXRF5iaolY+odmhj2CLj+xzNod7INPWMi/x9X4SOylH0S/vaPpX+AUU6t04s34SQNh7DbkuCng==",
+ "dev": true,
+ "requires": {
+ "cheerio-select": "^1.4.0",
+ "dom-serializer": "^1.3.1",
+ "domhandler": "^4.2.0",
+ "htmlparser2": "^6.1.0",
+ "parse5": "^6.0.1",
+ "parse5-htmlparser2-tree-adapter": "^6.0.1",
+ "tslib": "^2.2.0"
+ },
+ "dependencies": {
+ "dom-serializer": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.1.tgz",
+ "integrity": "sha512-Pv2ZluG5ife96udGgEDovOOOA5UELkltfJpnIExPrAk1LTvecolUGn6lIaoLh86d83GiB86CjzciMd9BuRB71Q==",
+ "dev": true,
+ "requires": {
+ "domelementtype": "^2.0.1",
+ "domhandler": "^4.0.0",
+ "entities": "^2.0.0"
+ }
+ },
+ "domelementtype": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz",
+ "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==",
+ "dev": true
+ },
+ "tslib": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.2.0.tgz",
+ "integrity": "sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==",
+ "dev": true
+ }
+ }
+ },
+ "cheerio-select": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-1.4.0.tgz",
+ "integrity": "sha512-sobR3Yqz27L553Qa7cK6rtJlMDbiKPdNywtR95Sj/YgfpLfy0u6CGJuaBKe5YE/vTc23SCRKxWSdlon/w6I/Ew==",
"dev": true,
"requires": {
- "css-select": "~1.2.0",
- "dom-serializer": "~0.1.1",
- "entities": "~1.1.1",
- "htmlparser2": "^3.9.1",
- "lodash": "^4.15.0",
- "parse5": "^3.0.1"
+ "css-select": "^4.1.2",
+ "css-what": "^5.0.0",
+ "domelementtype": "^2.2.0",
+ "domhandler": "^4.2.0",
+ "domutils": "^2.6.0"
},
"dependencies": {
"css-select": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz",
- "integrity": "sha1-KzoRBTnFNV8c2NMUYj6HCxIeyFg=",
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.1.2.tgz",
+ "integrity": "sha512-nu5ye2Hg/4ISq4XqdLY2bEatAcLIdt3OYGFc9Tm9n7VSlFBcfRv0gBNksHRgSdUDQGtN3XrZ94ztW+NfzkFSUw==",
"dev": true,
"requires": {
- "boolbase": "~1.0.0",
- "css-what": "2.1",
- "domutils": "1.5.1",
- "nth-check": "~1.0.1"
+ "boolbase": "^1.0.0",
+ "css-what": "^5.0.0",
+ "domhandler": "^4.2.0",
+ "domutils": "^2.6.0",
+ "nth-check": "^2.0.0"
}
},
"css-what": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz",
- "integrity": "sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg==",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.0.0.tgz",
+ "integrity": "sha512-qxyKHQvgKwzwDWC/rGbT821eJalfupxYW2qbSJSAtdSTimsr/MlaGONoNLllaUPZWf8QnbcKM/kPVYUQuEKAFA==",
"dev": true
},
"dom-serializer": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.1.tgz",
- "integrity": "sha512-l0IU0pPzLWSHBcieZbpOKgkIn3ts3vAh7ZuFyXNwJxJXk/c4Gwj9xaTJwIDVQCXawWD0qb3IzMGH5rglQaO0XA==",
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.1.tgz",
+ "integrity": "sha512-Pv2ZluG5ife96udGgEDovOOOA5UELkltfJpnIExPrAk1LTvecolUGn6lIaoLh86d83GiB86CjzciMd9BuRB71Q==",
"dev": true,
"requires": {
- "domelementtype": "^1.3.0",
- "entities": "^1.1.1"
+ "domelementtype": "^2.0.1",
+ "domhandler": "^4.0.0",
+ "entities": "^2.0.0"
}
},
+ "domelementtype": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz",
+ "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==",
+ "dev": true
+ },
"domutils": {
- "version": "1.5.1",
- "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz",
- "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=",
+ "version": "2.6.0",
+ "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.6.0.tgz",
+ "integrity": "sha512-y0BezHuy4MDYxh6OvolXYsH+1EMGmFbwv5FKW7ovwMG6zTPWqNPq3WF9ayZssFq+UlKdffGLbOEaghNdaOm1WA==",
"dev": true,
"requires": {
- "dom-serializer": "0",
- "domelementtype": "1"
+ "dom-serializer": "^1.0.1",
+ "domelementtype": "^2.2.0",
+ "domhandler": "^4.2.0"
}
},
- "entities": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz",
- "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==",
- "dev": true
- },
- "parse5": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/parse5/-/parse5-3.0.3.tgz",
- "integrity": "sha512-rgO9Zg5LLLkfJF9E6CCmXlSE4UVceloys8JrFqCcHloC3usd/kJCyPDwH2SOlzix2j3xaP9sUX3e8+kvkuleAA==",
+ "nth-check": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.0.tgz",
+ "integrity": "sha512-i4sc/Kj8htBrAiH1viZ0TgU8Y5XqCaV/FziYK6TBczxmeKm3AEFWqqF3195yKudrarqy7Zu80Ra5dobFjn9X/Q==",
"dev": true,
"requires": {
- "@types/node": "*"
+ "boolbase": "^1.0.0"
}
}
}
},
"chokidar": {
- "version": "3.4.3",
- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz",
- "integrity": "sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==",
+ "version": "3.5.1",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz",
+ "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==",
"dev": true,
"requires": {
"anymatch": "~3.1.1",
"dev": true
},
"chrome-trace-event": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz",
- "integrity": "sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ==",
- "dev": true,
- "requires": {
- "tslib": "^1.9.0"
- },
- "dependencies": {
- "tslib": {
- "version": "1.14.1",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
- "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
- "dev": true
- }
- }
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz",
+ "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==",
+ "dev": true
},
"ci-info": {
"version": "2.0.0",
"integrity": "sha512-7p4Kn/gffhQaavNfyDFg7LS5S/UT1JAjyGd4UqR2+jzoYF02eDkj0Ec3+48TsIa4zghjLY87nQHIh/ecK9qLdw==",
"dev": true
},
+ "cjs-module-lexer": {
+ "version": "0.6.0",
+ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-0.6.0.tgz",
+ "integrity": "sha512-uc2Vix1frTfnuzxxu1Hp4ktSvM3QaI4oXl4ZUqL1wjTu/BGki9TrCWoqLTg/drR1KwAEarXuRFCG2Svr1GxPFw==",
+ "dev": true
+ },
"cjson": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/cjson/-/cjson-0.5.0.tgz",
}
},
"cli-spinners": {
- "version": "2.5.0",
- "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.5.0.tgz",
- "integrity": "sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ==",
+ "version": "2.6.0",
+ "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.0.tgz",
+ "integrity": "sha512-t+4/y50K/+4xcCRosKkA7W4gTr1MySvLV0q+PxmG7FJ5g+66ChKurYjxBCjHggHH3HA5Hh9cy+lcUGWDqVH+4Q==",
"dev": true
},
"cli-table3": {
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
},
"color-string": {
- "version": "1.5.4",
- "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.4.tgz",
- "integrity": "sha512-57yF5yt8Xa3czSEW1jfQDE79Idk0+AkN/4KWad6tbdxUmAs3MvjxlWSWD4deYytcRfoZ9nhKyFl1kj5tBvidbw==",
+ "version": "1.5.5",
+ "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.5.tgz",
+ "integrity": "sha512-jgIoum0OfQfq9Whcfc2z/VhCNcmQjWbey6qBX0vqt7YICflUmBCh9E9CiQD5GSJ+Uehixm3NUwHVhqUAWRivZg==",
"dev": true,
"requires": {
"color-name": "^1.0.0",
"dev": true
},
"colorette": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz",
- "integrity": "sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==",
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz",
+ "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==",
"dev": true
},
"colors": {
"integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=",
"dev": true
},
+ "copy-anything": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.3.tgz",
+ "integrity": "sha512-GK6QUtisv4fNS+XcI7shX0Gx9ORg7QqIznyfho79JTnX1XhLiyZHfftvGiziqzRiEi/Bjhgpi+D2o7HxJFPnDQ==",
+ "dev": true,
+ "requires": {
+ "is-what": "^3.12.0"
+ }
+ },
"copy-concurrently": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz",
},
"dependencies": {
"glob": {
- "version": "7.1.6",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
- "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+ "version": "7.1.7",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz",
+ "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
},
"dependencies": {
"p-limit": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.0.2.tgz",
- "integrity": "sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg==",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
"dev": true,
"requires": {
- "p-try": "^2.0.0"
+ "yocto-queue": "^0.1.0"
}
}
}
},
"core-js": {
- "version": "3.6.5",
- "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz",
- "integrity": "sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA=="
+ "version": "3.12.1",
+ "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.12.1.tgz",
+ "integrity": "sha512-Ne9DKPHTObRuB09Dru5AjwKjY4cJHVGu+y5f7coGn1E9Grkc3p2iBwE9AI/nJzsE29mQF7oq+mhYYRqOMFN1Bw=="
},
"core-js-compat": {
- "version": "3.6.5",
- "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.5.tgz",
- "integrity": "sha512-7ItTKOhOZbznhXAQ2g/slGg1PJV5zDO/WdkTwi7UEOJmkvsE32PWvx6mKtDjiMpjnR2CNf6BAD6sSxIlv7ptng==",
+ "version": "3.12.1",
+ "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.12.1.tgz",
+ "integrity": "sha512-i6h5qODpw6EsHAoIdQhKoZdWn+dGBF3dSS8m5tif36RlWvW3A6+yu2S16QHUo3CrkzrnEskMAt9f8FxmY9fhWQ==",
"dev": true,
"requires": {
- "browserslist": "^4.8.5",
+ "browserslist": "^4.16.6",
"semver": "7.0.0"
},
"dependencies": {
},
"dependencies": {
"bn.js": {
- "version": "4.11.9",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz",
- "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==",
+ "version": "4.12.0",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
+ "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
"dev": true
}
}
}
},
"css-loader": {
+ "version": "4.2.2",
+ "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-4.2.2.tgz",
+ "integrity": "sha512-omVGsTkZPVwVRpckeUnLshPp12KsmMSLqYxs12+RzM9jRR5Y+Idn/tBffjXRvOE+qW7if24cuceFJqYR5FmGBg==",
"dev": true,
"requires": {
- "camelcase": "^5.3.1",
+ "camelcase": "^6.0.0",
"cssesc": "^3.0.0",
"icss-utils": "^4.1.1",
- "loader-utils": "^1.2.3",
- "normalize-path": "^3.0.0",
+ "loader-utils": "^2.0.0",
"postcss": "^7.0.32",
"postcss-modules-extract-imports": "^2.0.0",
- "postcss-modules-local-by-default": "^3.0.2",
+ "postcss-modules-local-by-default": "^3.0.3",
"postcss-modules-scope": "^2.2.0",
"postcss-modules-values": "^3.0.0",
"postcss-value-parser": "^4.1.0",
"schema-utils": "^2.7.0",
- "semver": "^6.3.0"
+ "semver": "^7.3.2"
},
"dependencies": {
- "json5": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
- "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
- "dev": true,
- "requires": {
- "minimist": "^1.2.0"
- }
+ "camelcase": {
+ "version": "6.2.0",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz",
+ "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==",
+ "dev": true
},
- "loader-utils": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz",
- "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==",
+ "semver": {
+ "version": "7.3.5",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
+ "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
"dev": true,
"requires": {
- "big.js": "^5.2.2",
- "emojis-list": "^3.0.0",
- "json5": "^1.0.1"
+ "lru-cache": "^6.0.0"
}
- },
- "semver": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
- "dev": true
}
- },
- "version": "3.6.0"
+ }
},
"css-parse": {
"version": "2.0.0",
}
},
"cssnano-preset-default": {
- "version": "4.0.7",
- "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-4.0.7.tgz",
- "integrity": "sha512-x0YHHx2h6p0fCl1zY9L9roD7rnlltugGu7zXSKQx6k2rYw0Hi3IqxcoAGF7u9Q5w1nt7vK0ulxV8Lo+EvllGsA==",
+ "version": "4.0.8",
+ "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-4.0.8.tgz",
+ "integrity": "sha512-LdAyHuq+VRyeVREFmuxUZR1TXjQm8QQU/ktoo/x7bz+SdOge1YKc5eMN6pRW7YWBmyq59CqYba1dJ5cUukEjLQ==",
"dev": true,
"requires": {
"css-declaration-sorter": "^4.0.1",
"postcss-ordered-values": "^4.1.2",
"postcss-reduce-initial": "^4.0.3",
"postcss-reduce-transforms": "^4.0.2",
- "postcss-svgo": "^4.0.2",
+ "postcss-svgo": "^4.0.3",
"postcss-unique-selectors": "^4.0.1"
}
},
"dev": true
},
"csso": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/csso/-/csso-4.0.3.tgz",
- "integrity": "sha512-NL3spysxUkcrOgnpsT4Xdl2aiEiBG6bXswAABQVHcMrfjjBisFOKwLDOmf4wf32aPdcJws1zds2B0Rg+jqMyHQ==",
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz",
+ "integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==",
"dev": true,
"requires": {
- "css-tree": "1.0.0-alpha.39"
+ "css-tree": "^1.1.2"
},
"dependencies": {
"css-tree": {
- "version": "1.0.0-alpha.39",
- "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.39.tgz",
- "integrity": "sha512-7UvkEYgBAHRG9Nt980lYxjsTrCyHFN53ky3wVsDkiMdVqylqRt+Zc+jm5qw7/qyOvN2dHSYtX0e4MbCCExSvnA==",
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz",
+ "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==",
"dev": true,
"requires": {
- "mdn-data": "2.0.6",
+ "mdn-data": "2.0.14",
"source-map": "^0.6.1"
}
},
"mdn-data": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.6.tgz",
- "integrity": "sha512-rQvjv71olwNHgiTbfPZFkJtjNMciWgswYeciZhtvWLO8bmX3TnhyA62I6sTWOyZssWHJJjY6/KiWwqQsWWsqOA==",
+ "version": "2.0.14",
+ "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz",
+ "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==",
"dev": true
},
"source-map": {
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
}
},
"execa": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/execa/-/execa-4.0.3.tgz",
- "integrity": "sha512-WFDXGHckXPWZX19t1kCsXzOpqX9LWYNqn4C+HqZlk/V0imTkzJZqf87ZBhvpHaftERYknpk0fjSylnXVlVgI0A==",
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz",
+ "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==",
"dev": true,
"requires": {
"cross-spawn": "^7.0.0",
}
},
"fs-extra": {
- "version": "9.0.1",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.1.tgz",
- "integrity": "sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ==",
+ "version": "9.1.0",
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
+ "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
"dev": true,
"requires": {
"at-least-node": "^1.0.0",
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
- "universalify": "^1.0.0"
+ "universalify": "^2.0.0"
}
},
"get-stream": {
"dev": true
},
"jsonfile": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.0.1.tgz",
- "integrity": "sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg==",
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
+ "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
"dev": true,
"requires": {
"graceful-fs": "^4.1.6",
- "universalify": "^1.0.0"
+ "universalify": "^2.0.0"
}
},
"npm-run-path": {
}
},
"universalify": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz",
- "integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==",
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
+ "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
"dev": true
},
"which": {
}
},
"damerau-levenshtein": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.6.tgz",
- "integrity": "sha512-JVrozIeElnj3QzfUIt8tB8YMluBJom4Vw9qTPpjGYQ9fYlB3D/rb6OordUxf3xeFB35LKWs0xqcO5U6ySvBtug==",
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.7.tgz",
+ "integrity": "sha512-VvdQIPGdWP0SqFXghj79Wf/5LArmreyMsGLa6FG6iC4t3j7j5s71TrwWmT/4akbDQIqjfACkLZmjXhA7g2oUZw==",
"dev": true
},
"dash-ast": {
"dev": true
},
"debug": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz",
- "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==",
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
+ "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
"requires": {
"ms": "2.1.2"
}
},
"dependencies": {
"glob": {
- "version": "7.1.6",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
- "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+ "version": "7.1.7",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz",
+ "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
"dev": true
},
"detect-node": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.4.tgz",
- "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==",
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.5.tgz",
+ "integrity": "sha512-qi86tE6hRcFHy8jI1m2VG+LaPUR1LhqDa5G8tVjuUXmOrpuAgqsA1pN0+ldgr3aKUH+QLI9hCY/OcRYisERejw==",
"dev": true
},
"dezalgo": {
},
"dependencies": {
"bn.js": {
- "version": "4.11.9",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz",
- "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==",
+ "version": "4.12.0",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
+ "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
"dev": true
}
}
},
"dependencies": {
"domelementtype": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.2.tgz",
- "integrity": "sha512-wFwTwCVebUrMgGeAwRL/NhZtHAUyT9n9yg4IMDwf10+6iCMxSkVq9MGCVEH+QZWo1nNidy8kNvwmv4zWHDTqvA==",
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz",
+ "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==",
"dev": true
}
}
}
},
"domhandler": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz",
- "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==",
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.0.tgz",
+ "integrity": "sha512-zk7sgt970kzPks2Bf+dwT/PLzghLnsivb9CcxkvR8Mzr66Olr0Ofd8neSbglHJHaHa2MadfoSdNlKYAaafmWfA==",
"dev": true,
"requires": {
- "domelementtype": "1"
+ "domelementtype": "^2.2.0"
+ },
+ "dependencies": {
+ "domelementtype": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz",
+ "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==",
+ "dev": true
+ }
}
},
"domutils": {
"dev": true
},
"electron-to-chromium": {
- "version": "1.3.582",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.582.tgz",
- "integrity": "sha512-0nCJ7cSqnkMC+kUuPs0YgklFHraWGl/xHqtZWWtOeVtyi+YqkoAOMGuZQad43DscXCQI/yizcTa3u6B5r+BLww==",
+ "version": "1.3.727",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.727.tgz",
+ "integrity": "sha512-Mfz4FIB4FSvEwBpDfdipRIrwd6uo8gUDoRDF4QEYb4h4tSuI3ov594OrjU6on042UlFHouIJpClDODGkPcBSbg==",
"dev": true
},
"elegant-spinner": {
"dev": true
},
"elliptic": {
- "version": "6.5.3",
- "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz",
- "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==",
+ "version": "6.5.4",
+ "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz",
+ "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==",
"dev": true,
"requires": {
- "bn.js": "^4.4.0",
- "brorand": "^1.0.1",
+ "bn.js": "^4.11.9",
+ "brorand": "^1.1.0",
"hash.js": "^1.0.0",
- "hmac-drbg": "^1.0.0",
- "inherits": "^2.0.1",
- "minimalistic-assert": "^1.0.0",
- "minimalistic-crypto-utils": "^1.0.0"
+ "hmac-drbg": "^1.0.1",
+ "inherits": "^2.0.4",
+ "minimalistic-assert": "^1.0.1",
+ "minimalistic-crypto-utils": "^1.0.1"
},
"dependencies": {
"bn.js": {
- "version": "4.11.9",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz",
- "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==",
+ "version": "4.12.0",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
+ "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
"dev": true
}
}
}
},
"entities": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz",
- "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==",
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz",
+ "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==",
"dev": true
},
"err-code": {
"dev": true
},
"errno": {
- "version": "0.1.7",
- "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz",
- "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==",
+ "version": "0.1.8",
+ "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz",
+ "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==",
"dev": true,
"requires": {
"prr": "~1.0.1"
}
},
"es-abstract": {
- "version": "1.18.0-next.1",
- "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz",
- "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==",
+ "version": "1.18.0",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0.tgz",
+ "integrity": "sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw==",
"dev": true,
"requires": {
+ "call-bind": "^1.0.2",
"es-to-primitive": "^1.2.1",
"function-bind": "^1.1.1",
+ "get-intrinsic": "^1.1.1",
"has": "^1.0.3",
- "has-symbols": "^1.0.1",
- "is-callable": "^1.2.2",
- "is-negative-zero": "^2.0.0",
- "is-regex": "^1.1.1",
- "object-inspect": "^1.8.0",
+ "has-symbols": "^1.0.2",
+ "is-callable": "^1.2.3",
+ "is-negative-zero": "^2.0.1",
+ "is-regex": "^1.1.2",
+ "is-string": "^1.0.5",
+ "object-inspect": "^1.9.0",
"object-keys": "^1.1.1",
- "object.assign": "^4.1.1",
- "string.prototype.trimend": "^1.0.1",
- "string.prototype.trimstart": "^1.0.1"
+ "object.assign": "^4.1.2",
+ "string.prototype.trimend": "^1.0.4",
+ "string.prototype.trimstart": "^1.0.4",
+ "unbox-primitive": "^1.0.0"
}
},
"es-to-primitive": {
}
},
"eventemitter2": {
- "version": "6.4.3",
- "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.3.tgz",
- "integrity": "sha512-t0A2msp6BzOf+QAcI6z9XMktLj52OjGQg+8SJH6v5+3uxNpWYRR3wQmfA+6xtMU9kOC59qk9licus5dYcrYkMQ==",
+ "version": "6.4.4",
+ "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.4.tgz",
+ "integrity": "sha512-HLU3NDY6wARrLCEwyGKRBvuWYyvW6mHYv72SJJAH3iJN3a6eVUvkjFkcxah1bcTgGVBBrFdIopBJPhCQFMLyXw==",
"dev": true
},
"eventemitter3": {
"dev": true
},
"events": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/events/-/events-3.2.0.tgz",
- "integrity": "sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==",
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
+ "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
"dev": true
},
"eventsource": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-1.0.7.tgz",
- "integrity": "sha512-4Ln17+vVT0k8aWq+t/bF5arcS3EpT9gYtW66EPacdj/mAFevznsnyoHLPy2BA8gbIQeIHoPsvwmfBftfcG//BQ==",
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-1.1.0.tgz",
+ "integrity": "sha512-VSJjT5oCNrFvCS6igjzPAt5hBzQ2qPBFIbJ03zLI9SE0mxwZpMw6BfJrbFHm1a141AavMEB8JHmBhWAd66PfCg==",
"dev": true,
"requires": {
"original": "^1.0.0"
}
},
"exec-sh": {
- "version": "0.3.4",
- "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.4.tgz",
- "integrity": "sha512-sEFIkc61v75sWeOe72qyrqg2Qg0OuLESziUDk/O/z2qgS15y2gWVFrI6f2Qn/qw/0/NCfCEsmNA4zOjkwEZT1A==",
+ "version": "0.3.6",
+ "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.6.tgz",
+ "integrity": "sha512-nQn+hI3yp+oD0huYhKwvYI32+JFeq+XkNcD1GAo3Y/MjxsfVGmrrzrnzjWiNY6f+pUCP440fThsFh5gZrRAU/w==",
"dev": true
},
"execa": {
}
},
"expect": {
- "version": "26.5.3",
- "resolved": "https://registry.npmjs.org/expect/-/expect-26.5.3.tgz",
- "integrity": "sha512-kkpOhGRWGOr+TEFUnYAjfGvv35bfP+OlPtqPIJpOCR9DVtv8QV+p8zG0Edqafh80fsjeE+7RBcVUq1xApnYglw==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/expect/-/expect-26.6.2.tgz",
+ "integrity": "sha512-9/hlOBkQl2l/PLHJx6JjoDF6xPKcJEsUlWKb23rKE7KzeDqUZKXKNMW27KIue5JMdBV9HgmoJPcc8HtO85t9IA==",
"dev": true,
"requires": {
- "@jest/types": "^26.5.2",
+ "@jest/types": "^26.6.2",
"ansi-styles": "^4.0.0",
"jest-get-type": "^26.3.0",
- "jest-matcher-utils": "^26.5.2",
- "jest-message-util": "^26.5.2",
+ "jest-matcher-utils": "^26.6.2",
+ "jest-message-util": "^26.6.2",
"jest-regex-util": "^26.0.0"
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
},
"dependencies": {
"type": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/type/-/type-2.1.0.tgz",
- "integrity": "sha512-G9absDWvhAWCV2gmF1zKud3OyC61nZDwWvBL2DApaVFogI07CprggiQAOOjvp2NRjYWFzPyu7vwtDrQFq8jeSA==",
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/type/-/type-2.5.0.tgz",
+ "integrity": "sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw==",
"dev": true
}
}
"dev": true
},
"fast-glob": {
- "version": "3.2.4",
- "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.4.tgz",
- "integrity": "sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ==",
+ "version": "3.2.5",
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz",
+ "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==",
"dev": true,
"requires": {
"@nodelib/fs.stat": "^2.0.2",
"dev": true
},
"fastq": {
- "version": "1.8.0",
- "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.8.0.tgz",
- "integrity": "sha512-SMIZoZdLh/fgofivvIkmknUXyPnvxRE3DhtZ5Me3Mrsk5gyPL42F0xr51TdRXskBxHfMp+07bcYzfsYEsSQA9Q==",
+ "version": "1.11.0",
+ "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz",
+ "integrity": "sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==",
"dev": true,
"requires": {
"reusify": "^1.0.4"
}
},
"file-entry-cache": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz",
- "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==",
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
+ "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==",
"dev": true,
"requires": {
- "flat-cache": "^2.0.1"
+ "flat-cache": "^3.0.4"
}
},
"file-loader": {
"dev": true
},
"flat-cache": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz",
- "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==",
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz",
+ "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==",
"dev": true,
"requires": {
- "flatted": "^2.0.0",
- "rimraf": "2.6.3",
- "write": "1.0.3"
- },
- "dependencies": {
- "glob": {
- "version": "7.1.6",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
- "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
- "dev": true,
- "requires": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.0.4",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- }
- },
- "rimraf": {
- "version": "2.6.3",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",
- "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
- "dev": true,
- "requires": {
- "glob": "^7.1.3"
- }
- }
+ "flatted": "^3.1.0",
+ "rimraf": "^3.0.2"
}
},
"flatted": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz",
- "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==",
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz",
+ "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==",
"dev": true
},
"flush-write-stream": {
}
},
"follow-redirects": {
- "version": "1.13.0",
- "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.0.tgz",
- "integrity": "sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==",
+ "version": "1.14.1",
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.1.tgz",
+ "integrity": "sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg==",
"dev": true
},
"fontkit": {
"function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
- "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
- "dev": true
+ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
},
"genfun": {
"version": "5.0.0",
"dev": true
},
"gensync": {
- "version": "1.0.0-beta.1",
- "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz",
- "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg=="
+ "version": "1.0.0-beta.2",
+ "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
+ "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg=="
},
"get-assigned-identifiers": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
},
+ "get-intrinsic": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
+ "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==",
+ "dev": true,
+ "requires": {
+ "function-bind": "^1.1.1",
+ "has": "^1.0.3",
+ "has-symbols": "^1.0.1"
+ }
+ },
"get-package-type": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz",
}
},
"glob-parent": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz",
- "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==",
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
"dev": true,
"requires": {
"is-glob": "^4.0.1"
"dev": true
},
"global-dirs": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.0.1.tgz",
- "integrity": "sha512-5HqUqdhkEovj2Of/ms3IeS/EekcO54ytHRLV4PEY2rhRwrHXLQjeVEES0Lhka0xwNDtGYn58wyC4s5+MHsOO6A==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.1.0.tgz",
+ "integrity": "sha512-MG6kdOUh/xBnyo9cJFeIKkLEc1AyFq42QTU4XiX51i2NEdxLxLWXIjEjmqKeSuKR7pAZjTqUVoT2b2huxVLgYQ==",
"dev": true,
"requires": {
- "ini": "^1.3.5"
+ "ini": "1.3.7"
+ },
+ "dependencies": {
+ "ini": {
+ "version": "1.3.7",
+ "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz",
+ "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==",
+ "dev": true
+ }
}
},
"global-modules": {
"integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA=="
},
"globby": {
- "version": "11.0.1",
- "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.1.tgz",
- "integrity": "sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==",
+ "version": "11.0.3",
+ "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.3.tgz",
+ "integrity": "sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg==",
"dev": true,
"requires": {
"array-union": "^2.1.0",
}
},
"graceful-fs": {
- "version": "4.2.4",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz",
- "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==",
+ "version": "4.2.6",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz",
+ "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==",
"dev": true
},
"growly": {
"dev": true
},
"handlebars": {
- "version": "4.7.6",
- "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz",
- "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==",
+ "version": "4.7.7",
+ "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz",
+ "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==",
"dev": true,
"requires": {
"minimist": "^1.2.5",
"dev": true
},
"harmony-reflect": {
- "version": "1.6.1",
- "resolved": "https://registry.npmjs.org/harmony-reflect/-/harmony-reflect-1.6.1.tgz",
- "integrity": "sha512-WJTeyp0JzGtHcuMsi7rw2VwtkvLa+JyfEKJCFyfcS0+CDkjQ5lHPu7zEhFZP+PDSRrEgXa5Ah0l1MbgbE41XjA==",
+ "version": "1.6.2",
+ "resolved": "https://registry.npmjs.org/harmony-reflect/-/harmony-reflect-1.6.2.tgz",
+ "integrity": "sha512-HIp/n38R9kQjDEziXyDTuW3vvoxxyxjxFzXLrBr18uB47GnSt+G9D29fqrpM5ZkspMcPICud3XsBJQ4Y2URg8g==",
"dev": true
},
"has": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
- "dev": true,
"requires": {
"function-bind": "^1.1.1"
}
}
}
},
+ "has-bigints": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz",
+ "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==",
+ "dev": true
+ },
"has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
},
"has-symbols": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
- "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
+ "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==",
"dev": true
},
"has-value": {
}
},
"hosted-git-info": {
- "version": "3.0.7",
- "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.7.tgz",
- "integrity": "sha512-fWqc0IcuXs+BmE9orLDyVykAG9GJtGLGuZAAqgcckPgv5xad4AcXGIv8galtQvlwutxSlaMcdw7BUtq2EIvqCQ==",
+ "version": "3.0.8",
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.8.tgz",
+ "integrity": "sha512-aXpmwoOhRBrw6X3j0h5RloK4x1OzsxMPyxqIHyNfSe2pypkVTZFpEiRoSipPEPlMrh0HW/XsjkJ5WgnCirpNUw==",
"dev": true,
"requires": {
"lru-cache": "^6.0.0"
"integrity": "sha1-wc56MWjIxmFAM6S194d/OyJfnDg=",
"dev": true
},
- "html-comment-regex": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.2.tgz",
- "integrity": "sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ==",
- "dev": true
- },
"html-encoding-sniffer": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz",
}
},
"html-entities": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.3.1.tgz",
- "integrity": "sha512-rhE/4Z3hIhzHAUKbW8jVcCyuT5oJCXXqhN/6mXXVCpzTmvJnoH2HL/bt3EZ6p55jbFJBeAe1ZNpL5BugLujxNA==",
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.4.0.tgz",
+ "integrity": "sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA==",
"dev": true
},
"html-escaper": {
"htmlparser2": "^3.10.0",
"lodash": "^4.17.11",
"promise": "^8.0.2"
+ },
+ "dependencies": {
+ "domhandler": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz",
+ "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==",
+ "dev": true,
+ "requires": {
+ "domelementtype": "1"
+ }
+ },
+ "entities": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz",
+ "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==",
+ "dev": true
+ },
+ "htmlparser2": {
+ "version": "3.10.1",
+ "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz",
+ "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==",
+ "dev": true,
+ "requires": {
+ "domelementtype": "^1.3.1",
+ "domhandler": "^2.3.0",
+ "domutils": "^1.5.1",
+ "entities": "^1.1.1",
+ "inherits": "^2.0.1",
+ "readable-stream": "^3.1.1"
+ }
+ },
+ "readable-stream": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
+ "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
+ "dev": true,
+ "requires": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ }
+ }
}
},
"htmllint-cli": {
}
},
"y18n": {
- "version": "3.2.1",
- "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz",
- "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=",
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz",
+ "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==",
"dev": true
},
"yargs": {
}
},
"htmlparser2": {
- "version": "3.10.1",
- "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz",
- "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==",
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz",
+ "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==",
"dev": true,
"requires": {
- "domelementtype": "^1.3.1",
- "domhandler": "^2.3.0",
- "domutils": "^1.5.1",
- "entities": "^1.1.1",
- "inherits": "^2.0.1",
- "readable-stream": "^3.1.1"
+ "domelementtype": "^2.0.1",
+ "domhandler": "^4.0.0",
+ "domutils": "^2.5.2",
+ "entities": "^2.0.0"
},
"dependencies": {
- "entities": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz",
- "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==",
+ "dom-serializer": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.1.tgz",
+ "integrity": "sha512-Pv2ZluG5ife96udGgEDovOOOA5UELkltfJpnIExPrAk1LTvecolUGn6lIaoLh86d83GiB86CjzciMd9BuRB71Q==",
+ "dev": true,
+ "requires": {
+ "domelementtype": "^2.0.1",
+ "domhandler": "^4.0.0",
+ "entities": "^2.0.0"
+ }
+ },
+ "domelementtype": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz",
+ "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==",
"dev": true
},
- "readable-stream": {
- "version": "3.6.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
- "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
+ "domutils": {
+ "version": "2.6.0",
+ "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.6.0.tgz",
+ "integrity": "sha512-y0BezHuy4MDYxh6OvolXYsH+1EMGmFbwv5FKW7ovwMG6zTPWqNPq3WF9ayZssFq+UlKdffGLbOEaghNdaOm1WA==",
"dev": true,
"requires": {
- "inherits": "^2.0.3",
- "string_decoder": "^1.1.1",
- "util-deprecate": "^1.0.1"
+ "dom-serializer": "^1.0.1",
+ "domelementtype": "^2.2.0",
+ "domhandler": "^4.2.0"
}
}
}
},
"dependencies": {
"debug": {
- "version": "3.2.6",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
- "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
+ "version": "3.2.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
"dev": true,
"requires": {
"ms": "^2.1.1"
}
},
"ieee754": {
- "version": "1.1.13",
- "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz",
- "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==",
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
+ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
"dev": true
},
"iferr": {
"dev": true
},
"ignore-walk": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz",
- "integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==",
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.4.tgz",
+ "integrity": "sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ==",
"dev": true,
"requires": {
"minimatch": "^3.0.4"
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
}
},
"is-arguments": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz",
- "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==",
- "dev": true
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz",
+ "integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==",
+ "dev": true,
+ "requires": {
+ "call-bind": "^1.0.0"
+ }
},
"is-arrayish": {
"version": "0.2.1",
"integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
"dev": true
},
+ "is-bigint": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.2.tgz",
+ "integrity": "sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA==",
+ "dev": true
+ },
"is-binary-path": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
"binary-extensions": "^2.0.0"
}
},
+ "is-boolean-object": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.1.tgz",
+ "integrity": "sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng==",
+ "dev": true,
+ "requires": {
+ "call-bind": "^1.0.2"
+ }
+ },
"is-buffer": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
"dev": true
},
"is-callable": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz",
- "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==",
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz",
+ "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==",
"dev": true
},
"is-ci": {
"rgba-regex": "^1.0.0"
}
},
+ "is-core-module": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.4.0.tgz",
+ "integrity": "sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A==",
+ "requires": {
+ "has": "^1.0.3"
+ }
+ },
"is-data-descriptor": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
}
},
"is-date-object": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz",
- "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==",
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.4.tgz",
+ "integrity": "sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A==",
"dev": true
},
"is-decimal": {
"dev": true
},
"is-docker": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.1.1.tgz",
- "integrity": "sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw==",
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
+ "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
"dev": true
},
"is-extendable": {
},
"dependencies": {
"is-path-inside": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.2.tgz",
- "integrity": "sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==",
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
+ "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
"dev": true
}
}
"dev": true
},
"is-negative-zero": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.0.tgz",
- "integrity": "sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE=",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz",
+ "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==",
"dev": true
},
"is-number": {
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true
},
+ "is-number-object": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.5.tgz",
+ "integrity": "sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw==",
+ "dev": true
+ },
"is-obj": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
}
},
"is-potential-custom-element-name": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.0.tgz",
- "integrity": "sha1-DFLlS8yjkbssSUsh6GJtczbG45c=",
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz",
+ "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==",
"dev": true
},
"is-promise": {
"dev": true
},
"is-regex": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz",
- "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==",
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.3.tgz",
+ "integrity": "sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ==",
"dev": true,
"requires": {
- "has-symbols": "^1.0.1"
+ "call-bind": "^1.0.2",
+ "has-symbols": "^1.0.2"
}
},
"is-regexp": {
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=",
"dev": true
},
- "is-svg": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-3.0.0.tgz",
- "integrity": "sha512-gi4iHK53LR2ujhLVVj+37Ykh9GLqYHX6JOVXbLAucaG/Cqw9xwdFOjDM2qeifLs1sF1npXXFvDu0r5HNgCMrzQ==",
- "dev": true,
- "requires": {
- "html-comment-regex": "^1.1.0"
- }
+ "is-string": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.6.tgz",
+ "integrity": "sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w==",
+ "dev": true
},
"is-symbol": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
- "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==",
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz",
+ "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==",
"dev": true,
"requires": {
- "has-symbols": "^1.0.1"
+ "has-symbols": "^1.0.2"
}
},
"is-typedarray": {
"unc-path-regex": "^0.1.2"
}
},
+ "is-unicode-supported": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz",
+ "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==",
+ "dev": true
+ },
+ "is-what": {
+ "version": "3.14.1",
+ "resolved": "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz",
+ "integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==",
+ "dev": true
+ },
"is-whitespace-character": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.4.tgz",
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
}
},
"jest-cli": {
- "version": "26.5.3",
- "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-26.5.3.tgz",
- "integrity": "sha512-HkbSvtugpSXBf2660v9FrNVUgxvPkssN8CRGj9gPM8PLhnaa6zziFiCEKQAkQS4uRzseww45o0TR+l6KeRYV9A==",
+ "version": "26.6.3",
+ "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-26.6.3.tgz",
+ "integrity": "sha512-GF9noBSa9t08pSyl3CY4frMrqp+aQXFGFkf5hEPbh/pIUFYWMK6ZLTfbmadxJVcJrdRoChlWQsA2VkJcDFK8hg==",
"dev": true,
"requires": {
- "@jest/core": "^26.5.3",
- "@jest/test-result": "^26.5.2",
- "@jest/types": "^26.5.2",
+ "@jest/core": "^26.6.3",
+ "@jest/test-result": "^26.6.2",
+ "@jest/types": "^26.6.2",
"chalk": "^4.0.0",
"exit": "^0.1.2",
"graceful-fs": "^4.2.4",
"import-local": "^3.0.2",
"is-ci": "^2.0.0",
- "jest-config": "^26.5.3",
- "jest-util": "^26.5.2",
- "jest-validate": "^26.5.3",
+ "jest-config": "^26.6.3",
+ "jest-util": "^26.6.2",
+ "jest-validate": "^26.6.2",
"prompts": "^2.0.1",
"yargs": "^15.4.1"
}
}
},
"jest-changed-files": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-26.5.2.tgz",
- "integrity": "sha512-qSmssmiIdvM5BWVtyK/nqVpN3spR5YyvkvPqz1x3BR1bwIxsWmU/MGwLoCrPNLbkG2ASAKfvmJpOduEApBPh2w==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-26.6.2.tgz",
+ "integrity": "sha512-fDS7szLcY9sCtIip8Fjry9oGf3I2ht/QT21bAHm5Dmf0mD4X3ReNUf17y+bO6fR8WgbIZTlbyG1ak/53cbRzKQ==",
"dev": true,
"requires": {
- "@jest/types": "^26.5.2",
+ "@jest/types": "^26.6.2",
"execa": "^4.0.0",
"throat": "^5.0.0"
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
}
},
"execa": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/execa/-/execa-4.0.3.tgz",
- "integrity": "sha512-WFDXGHckXPWZX19t1kCsXzOpqX9LWYNqn4C+HqZlk/V0imTkzJZqf87ZBhvpHaftERYknpk0fjSylnXVlVgI0A==",
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz",
+ "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==",
"dev": true,
"requires": {
"cross-spawn": "^7.0.0",
}
},
"jest-config": {
- "version": "26.5.3",
- "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-26.5.3.tgz",
- "integrity": "sha512-NVhZiIuN0GQM6b6as4CI5FSCyXKxdrx5ACMCcv/7Pf+TeCajJhJc+6dwgdAVPyerUFB9pRBIz3bE7clSrRge/w==",
+ "version": "26.6.3",
+ "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-26.6.3.tgz",
+ "integrity": "sha512-t5qdIj/bCj2j7NFVHb2nFB4aUdfucDn3JRKgrZnplb8nieAirAzRSHP8uDEd+qV6ygzg9Pz4YG7UTJf94LPSyg==",
"dev": true,
"requires": {
"@babel/core": "^7.1.0",
- "@jest/test-sequencer": "^26.5.3",
- "@jest/types": "^26.5.2",
- "babel-jest": "^26.5.2",
+ "@jest/test-sequencer": "^26.6.3",
+ "@jest/types": "^26.6.2",
+ "babel-jest": "^26.6.3",
"chalk": "^4.0.0",
"deepmerge": "^4.2.2",
"glob": "^7.1.1",
"graceful-fs": "^4.2.4",
- "jest-environment-jsdom": "^26.5.2",
- "jest-environment-node": "^26.5.2",
+ "jest-environment-jsdom": "^26.6.2",
+ "jest-environment-node": "^26.6.2",
"jest-get-type": "^26.3.0",
- "jest-jasmine2": "^26.5.3",
+ "jest-jasmine2": "^26.6.3",
"jest-regex-util": "^26.0.0",
- "jest-resolve": "^26.5.2",
- "jest-util": "^26.5.2",
- "jest-validate": "^26.5.3",
+ "jest-resolve": "^26.6.2",
+ "jest-util": "^26.6.2",
+ "jest-validate": "^26.6.2",
"micromatch": "^4.0.2",
- "pretty-format": "^26.5.2"
+ "pretty-format": "^26.6.2"
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"dev": true
},
"pretty-format": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.5.2.tgz",
- "integrity": "sha512-VizyV669eqESlkOikKJI8Ryxl/kPpbdLwNdPs2GrbQs18MpySB5S0Yo0N7zkg2xTRiFq4CFw8ct5Vg4a0xP0og==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz",
+ "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==",
"dev": true,
"requires": {
- "@jest/types": "^26.5.2",
+ "@jest/types": "^26.6.2",
"ansi-regex": "^5.0.0",
"ansi-styles": "^4.0.0",
- "react-is": "^16.12.0"
+ "react-is": "^17.0.1"
}
},
+ "react-is": {
+ "version": "17.0.2",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
+ "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
+ "dev": true
+ },
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
}
},
"jest-each": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-26.5.2.tgz",
- "integrity": "sha512-w7D9FNe0m2D3yZ0Drj9CLkyF/mGhmBSULMQTypzAKR746xXnjUrK8GUJdlLTWUF6dd0ks3MtvGP7/xNFr9Aphg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-26.6.2.tgz",
+ "integrity": "sha512-Mer/f0KaATbjl8MCJ+0GEpNdqmnVmDYqCTJYTvoo7rqmRiDllmp2AYN+06F93nXcY3ur9ShIjS+CO/uD+BbH4A==",
"dev": true,
"requires": {
- "@jest/types": "^26.5.2",
+ "@jest/types": "^26.6.2",
"chalk": "^4.0.0",
"jest-get-type": "^26.3.0",
- "jest-util": "^26.5.2",
- "pretty-format": "^26.5.2"
+ "jest-util": "^26.6.2",
+ "pretty-format": "^26.6.2"
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"dev": true
},
"pretty-format": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.5.2.tgz",
- "integrity": "sha512-VizyV669eqESlkOikKJI8Ryxl/kPpbdLwNdPs2GrbQs18MpySB5S0Yo0N7zkg2xTRiFq4CFw8ct5Vg4a0xP0og==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz",
+ "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==",
"dev": true,
"requires": {
- "@jest/types": "^26.5.2",
+ "@jest/types": "^26.6.2",
"ansi-regex": "^5.0.0",
"ansi-styles": "^4.0.0",
- "react-is": "^16.12.0"
+ "react-is": "^17.0.1"
}
},
+ "react-is": {
+ "version": "17.0.2",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
+ "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
+ "dev": true
+ },
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
}
},
"jest-environment-jsdom": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-26.5.2.tgz",
- "integrity": "sha512-fWZPx0bluJaTQ36+PmRpvUtUlUFlGGBNyGX1SN3dLUHHMcQ4WseNEzcGGKOw4U5towXgxI4qDoI3vwR18H0RTw==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-26.6.2.tgz",
+ "integrity": "sha512-jgPqCruTlt3Kwqg5/WVFyHIOJHsiAvhcp2qiR2QQstuG9yWox5+iHpU3ZrcBxW14T4fe5Z68jAfLRh7joCSP2Q==",
"dev": true,
"requires": {
- "@jest/environment": "^26.5.2",
- "@jest/fake-timers": "^26.5.2",
- "@jest/types": "^26.5.2",
+ "@jest/environment": "^26.6.2",
+ "@jest/fake-timers": "^26.6.2",
+ "@jest/types": "^26.6.2",
"@types/node": "*",
- "jest-mock": "^26.5.2",
- "jest-util": "^26.5.2",
+ "jest-mock": "^26.6.2",
+ "jest-util": "^26.6.2",
"jsdom": "^16.4.0"
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
}
},
"jest-environment-node": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-26.5.2.tgz",
- "integrity": "sha512-YHjnDsf/GKFCYMGF1V+6HF7jhY1fcLfLNBDjhAOvFGvt6d8vXvNdJGVM7uTZ2VO/TuIyEFhPGaXMX5j3h7fsrA==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-26.6.2.tgz",
+ "integrity": "sha512-zhtMio3Exty18dy8ee8eJ9kjnRyZC1N4C1Nt/VShN1apyXc8rWGtJ9lI7vqiWcyyXS4BVSEn9lxAM2D+07/Tag==",
"dev": true,
"requires": {
- "@jest/environment": "^26.5.2",
- "@jest/fake-timers": "^26.5.2",
- "@jest/types": "^26.5.2",
+ "@jest/environment": "^26.6.2",
+ "@jest/fake-timers": "^26.6.2",
+ "@jest/types": "^26.6.2",
"@types/node": "*",
- "jest-mock": "^26.5.2",
- "jest-util": "^26.5.2"
+ "jest-mock": "^26.6.2",
+ "jest-util": "^26.6.2"
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"dev": true
},
"jest-haste-map": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.5.2.tgz",
- "integrity": "sha512-lJIAVJN3gtO3k4xy+7i2Xjtwh8CfPcH08WYjZpe9xzveDaqGw9fVNCpkYu6M525wKFVkLmyi7ku+DxCAP1lyMA==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.6.2.tgz",
+ "integrity": "sha512-easWIJXIw71B2RdR8kgqpjQrbMRWQBgiBwXYEhtGUTaX+doCjBheluShdDMeR8IMfJiTqH4+zfhtg29apJf/8w==",
"dev": true,
"requires": {
- "@jest/types": "^26.5.2",
+ "@jest/types": "^26.6.2",
"@types/graceful-fs": "^4.1.2",
"@types/node": "*",
"anymatch": "^3.0.3",
"fsevents": "2.1.3",
"graceful-fs": "^4.2.4",
"jest-regex-util": "^26.0.0",
- "jest-serializer": "^26.5.0",
- "jest-util": "^26.5.2",
- "jest-worker": "^26.5.0",
+ "jest-serializer": "^26.6.2",
+ "jest-util": "^26.6.2",
+ "jest-worker": "^26.6.2",
"micromatch": "^4.0.2",
"sane": "^4.0.3",
"walker": "^1.0.7"
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"dev": true
},
"jest-worker": {
- "version": "26.5.0",
- "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.5.0.tgz",
- "integrity": "sha512-kTw66Dn4ZX7WpjZ7T/SUDgRhapFRKWmisVAF0Rv4Fu8SLFD7eLbqpLvbxVqYhSgaWa7I+bW7pHnbyfNsH6stug==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz",
+ "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==",
"dev": true,
"requires": {
"@types/node": "*",
}
},
"jest-jasmine2": {
- "version": "26.5.3",
- "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-26.5.3.tgz",
- "integrity": "sha512-nFlZOpnGlNc7y/+UkkeHnvbOM+rLz4wB1AimgI9QhtnqSZte0wYjbAm8hf7TCwXlXgDwZxAXo6z0a2Wzn9FoOg==",
+ "version": "26.6.3",
+ "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-26.6.3.tgz",
+ "integrity": "sha512-kPKUrQtc8aYwBV7CqBg5pu+tmYXlvFlSFYn18ev4gPFtrRzB15N2gW/Roew3187q2w2eHuu0MU9TJz6w0/nPEg==",
"dev": true,
"requires": {
"@babel/traverse": "^7.1.0",
- "@jest/environment": "^26.5.2",
- "@jest/source-map": "^26.5.0",
- "@jest/test-result": "^26.5.2",
- "@jest/types": "^26.5.2",
+ "@jest/environment": "^26.6.2",
+ "@jest/source-map": "^26.6.2",
+ "@jest/test-result": "^26.6.2",
+ "@jest/types": "^26.6.2",
"@types/node": "*",
"chalk": "^4.0.0",
"co": "^4.6.0",
- "expect": "^26.5.3",
+ "expect": "^26.6.2",
"is-generator-fn": "^2.0.0",
- "jest-each": "^26.5.2",
- "jest-matcher-utils": "^26.5.2",
- "jest-message-util": "^26.5.2",
- "jest-runtime": "^26.5.3",
- "jest-snapshot": "^26.5.3",
- "jest-util": "^26.5.2",
- "pretty-format": "^26.5.2",
+ "jest-each": "^26.6.2",
+ "jest-matcher-utils": "^26.6.2",
+ "jest-message-util": "^26.6.2",
+ "jest-runtime": "^26.6.3",
+ "jest-snapshot": "^26.6.2",
+ "jest-util": "^26.6.2",
+ "pretty-format": "^26.6.2",
"throat": "^5.0.0"
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"dev": true
},
"pretty-format": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.5.2.tgz",
- "integrity": "sha512-VizyV669eqESlkOikKJI8Ryxl/kPpbdLwNdPs2GrbQs18MpySB5S0Yo0N7zkg2xTRiFq4CFw8ct5Vg4a0xP0og==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz",
+ "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==",
"dev": true,
"requires": {
- "@jest/types": "^26.5.2",
+ "@jest/types": "^26.6.2",
"ansi-regex": "^5.0.0",
"ansi-styles": "^4.0.0",
- "react-is": "^16.12.0"
+ "react-is": "^17.0.1"
}
},
+ "react-is": {
+ "version": "17.0.2",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
+ "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
+ "dev": true
+ },
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
}
},
"jest-leak-detector": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-26.5.2.tgz",
- "integrity": "sha512-h7ia3dLzBFItmYERaLPEtEKxy3YlcbcRSjj0XRNJgBEyODuu+3DM2o62kvIFvs3PsaYoIIv+e+nLRI61Dj1CNw==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-26.6.2.tgz",
+ "integrity": "sha512-i4xlXpsVSMeKvg2cEKdfhh0H39qlJlP5Ex1yQxwF9ubahboQYMgTtz5oML35AVA3B4Eu+YsmwaiKVev9KCvLxg==",
"dev": true,
"requires": {
"jest-get-type": "^26.3.0",
- "pretty-format": "^26.5.2"
+ "pretty-format": "^26.6.2"
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"dev": true
},
"pretty-format": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.5.2.tgz",
- "integrity": "sha512-VizyV669eqESlkOikKJI8Ryxl/kPpbdLwNdPs2GrbQs18MpySB5S0Yo0N7zkg2xTRiFq4CFw8ct5Vg4a0xP0og==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz",
+ "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==",
"dev": true,
"requires": {
- "@jest/types": "^26.5.2",
+ "@jest/types": "^26.6.2",
"ansi-regex": "^5.0.0",
"ansi-styles": "^4.0.0",
- "react-is": "^16.12.0"
+ "react-is": "^17.0.1"
}
},
+ "react-is": {
+ "version": "17.0.2",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
+ "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
+ "dev": true
+ },
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
}
},
"jest-matcher-utils": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-26.5.2.tgz",
- "integrity": "sha512-W9GO9KBIC4gIArsNqDUKsLnhivaqf8MSs6ujO/JDcPIQrmY+aasewweXVET8KdrJ6ADQaUne5UzysvF/RR7JYA==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-26.6.2.tgz",
+ "integrity": "sha512-llnc8vQgYcNqDrqRDXWwMr9i7rS5XFiCwvh6DTP7Jqa2mqpcCBBlpCbn+trkG0KNhPu/h8rzyBkriOtBstvWhw==",
"dev": true,
"requires": {
"chalk": "^4.0.0",
- "jest-diff": "^26.5.2",
+ "jest-diff": "^26.6.2",
"jest-get-type": "^26.3.0",
- "pretty-format": "^26.5.2"
+ "pretty-format": "^26.6.2"
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"dev": true
},
"diff-sequences": {
- "version": "26.5.0",
- "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.5.0.tgz",
- "integrity": "sha512-ZXx86srb/iYy6jG71k++wBN9P9J05UNQ5hQHQd9MtMPvcqXPx/vKU69jfHV637D00Q2gSgPk2D+jSx3l1lDW/Q==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz",
+ "integrity": "sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==",
"dev": true
},
"has-flag": {
"dev": true
},
"jest-diff": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.5.2.tgz",
- "integrity": "sha512-HCSWDUGwsov5oTlGzrRM+UPJI/Dpqi9jzeV0fdRNi3Ch5bnoXhnyJMmVg2juv9081zLIy3HGPI5mcuGgXM2xRA==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.2.tgz",
+ "integrity": "sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA==",
"dev": true,
"requires": {
"chalk": "^4.0.0",
- "diff-sequences": "^26.5.0",
+ "diff-sequences": "^26.6.2",
"jest-get-type": "^26.3.0",
- "pretty-format": "^26.5.2"
+ "pretty-format": "^26.6.2"
}
},
"jest-get-type": {
"dev": true
},
"pretty-format": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.5.2.tgz",
- "integrity": "sha512-VizyV669eqESlkOikKJI8Ryxl/kPpbdLwNdPs2GrbQs18MpySB5S0Yo0N7zkg2xTRiFq4CFw8ct5Vg4a0xP0og==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz",
+ "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==",
"dev": true,
"requires": {
- "@jest/types": "^26.5.2",
+ "@jest/types": "^26.6.2",
"ansi-regex": "^5.0.0",
"ansi-styles": "^4.0.0",
- "react-is": "^16.12.0"
+ "react-is": "^17.0.1"
}
},
+ "react-is": {
+ "version": "17.0.2",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
+ "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
+ "dev": true
+ },
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
}
},
"jest-message-util": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.5.2.tgz",
- "integrity": "sha512-Ocp9UYZ5Jl15C5PNsoDiGEk14A4NG0zZKknpWdZGoMzJuGAkVt10e97tnEVMYpk7LnQHZOfuK2j/izLBMcuCZw==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.6.2.tgz",
+ "integrity": "sha512-rGiLePzQ3AzwUshu2+Rn+UMFk0pHN58sOG+IaJbk5Jxuqo3NYO1U2/MIR4S1sKgsoYSXSzdtSa0TgrmtUwEbmA==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
- "@jest/types": "^26.5.2",
+ "@jest/types": "^26.6.2",
"@types/stack-utils": "^2.0.0",
"chalk": "^4.0.0",
"graceful-fs": "^4.2.4",
"micromatch": "^4.0.2",
+ "pretty-format": "^26.6.2",
"slash": "^3.0.0",
"stack-utils": "^2.0.2"
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true
},
+ "pretty-format": {
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz",
+ "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==",
+ "dev": true,
+ "requires": {
+ "@jest/types": "^26.6.2",
+ "ansi-regex": "^5.0.0",
+ "ansi-styles": "^4.0.0",
+ "react-is": "^17.0.1"
+ }
+ },
+ "react-is": {
+ "version": "17.0.2",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
+ "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
+ "dev": true
+ },
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
}
},
"jest-mock": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-26.5.2.tgz",
- "integrity": "sha512-9SiU4b5PtO51v0MtJwVRqeGEroH66Bnwtq4ARdNP7jNXbpT7+ByeWNAk4NeT/uHfNSVDXEXgQo1XRuwEqS6Rdw==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-26.6.2.tgz",
+ "integrity": "sha512-YyFjePHHp1LzpzYcmgqkJ0nm0gg/lJx2aZFzFy1S6eUqNjXsOqTK10zNRff2dNfssgokjkG65OlWNcIlgd3zew==",
"dev": true,
"requires": {
- "@jest/types": "^26.5.2",
+ "@jest/types": "^26.6.2",
"@types/node": "*"
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"dev": true
},
"pretty-format": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.5.2.tgz",
- "integrity": "sha512-VizyV669eqESlkOikKJI8Ryxl/kPpbdLwNdPs2GrbQs18MpySB5S0Yo0N7zkg2xTRiFq4CFw8ct5Vg4a0xP0og==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz",
+ "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==",
"dev": true,
"requires": {
- "@jest/types": "^26.5.2",
+ "@jest/types": "^26.6.2",
"ansi-regex": "^5.0.0",
"ansi-styles": "^4.0.0",
- "react-is": "^16.12.0"
+ "react-is": "^17.0.1"
}
},
+ "react-is": {
+ "version": "17.0.2",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
+ "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
+ "dev": true
+ },
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"dev": true
},
"jest-resolve": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-26.5.2.tgz",
- "integrity": "sha512-XsPxojXGRA0CoDD7Vis59ucz2p3cQFU5C+19tz3tLEAlhYKkK77IL0cjYjikY9wXnOaBeEdm1rOgSJjbZWpcZg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-26.6.2.tgz",
+ "integrity": "sha512-sOxsZOq25mT1wRsfHcbtkInS+Ek7Q8jCHUB0ZUTP0tc/c41QHriU/NunqMfCUWsL4H3MHpvQD4QR9kSYhS7UvQ==",
"dev": true,
"requires": {
- "@jest/types": "^26.5.2",
+ "@jest/types": "^26.6.2",
"chalk": "^4.0.0",
"graceful-fs": "^4.2.4",
"jest-pnp-resolver": "^1.2.2",
- "jest-util": "^26.5.2",
+ "jest-util": "^26.6.2",
"read-pkg-up": "^7.0.1",
- "resolve": "^1.17.0",
+ "resolve": "^1.18.1",
"slash": "^3.0.0"
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
}
},
"jest-resolve-dependencies": {
- "version": "26.5.3",
- "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-26.5.3.tgz",
- "integrity": "sha512-+KMDeke/BFK+mIQ2IYSyBz010h7zQaVt4Xie6cLqUGChorx66vVeQVv4ErNoMwInnyYHi1Ud73tDS01UbXbfLQ==",
+ "version": "26.6.3",
+ "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-26.6.3.tgz",
+ "integrity": "sha512-pVwUjJkxbhe4RY8QEWzN3vns2kqyuldKpxlxJlzEYfKSvY6/bMvxoFrYYzUO1Gx28yKWN37qyV7rIoIp2h8fTg==",
"dev": true,
"requires": {
- "@jest/types": "^26.5.2",
+ "@jest/types": "^26.6.2",
"jest-regex-util": "^26.0.0",
- "jest-snapshot": "^26.5.3"
+ "jest-snapshot": "^26.6.2"
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
}
},
"jest-runner": {
- "version": "26.5.3",
- "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-26.5.3.tgz",
- "integrity": "sha512-qproP0Pq7IIule+263W57k2+8kWCszVJTC9TJWGUz0xJBr+gNiniGXlG8rotd0XxwonD5UiJloYoSO5vbUr5FQ==",
+ "version": "26.6.3",
+ "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-26.6.3.tgz",
+ "integrity": "sha512-atgKpRHnaA2OvByG/HpGA4g6CSPS/1LK0jK3gATJAoptC1ojltpmVlYC3TYgdmGp+GLuhzpH30Gvs36szSL2JQ==",
"dev": true,
"requires": {
- "@jest/console": "^26.5.2",
- "@jest/environment": "^26.5.2",
- "@jest/test-result": "^26.5.2",
- "@jest/types": "^26.5.2",
+ "@jest/console": "^26.6.2",
+ "@jest/environment": "^26.6.2",
+ "@jest/test-result": "^26.6.2",
+ "@jest/types": "^26.6.2",
"@types/node": "*",
"chalk": "^4.0.0",
"emittery": "^0.7.1",
"exit": "^0.1.2",
"graceful-fs": "^4.2.4",
- "jest-config": "^26.5.3",
+ "jest-config": "^26.6.3",
"jest-docblock": "^26.0.0",
- "jest-haste-map": "^26.5.2",
- "jest-leak-detector": "^26.5.2",
- "jest-message-util": "^26.5.2",
- "jest-resolve": "^26.5.2",
- "jest-runtime": "^26.5.3",
- "jest-util": "^26.5.2",
- "jest-worker": "^26.5.0",
+ "jest-haste-map": "^26.6.2",
+ "jest-leak-detector": "^26.6.2",
+ "jest-message-util": "^26.6.2",
+ "jest-resolve": "^26.6.2",
+ "jest-runtime": "^26.6.3",
+ "jest-util": "^26.6.2",
+ "jest-worker": "^26.6.2",
"source-map-support": "^0.5.6",
"throat": "^5.0.0"
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"dev": true
},
"jest-worker": {
- "version": "26.5.0",
- "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.5.0.tgz",
- "integrity": "sha512-kTw66Dn4ZX7WpjZ7T/SUDgRhapFRKWmisVAF0Rv4Fu8SLFD7eLbqpLvbxVqYhSgaWa7I+bW7pHnbyfNsH6stug==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz",
+ "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==",
"dev": true,
"requires": {
"@types/node": "*",
}
},
"jest-runtime": {
- "version": "26.5.3",
- "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-26.5.3.tgz",
- "integrity": "sha512-IDjalmn2s/Tc4GvUwhPHZ0iaXCdMRq5p6taW9P8RpU+FpG01O3+H8z+p3rDCQ9mbyyyviDgxy/LHPLzrIOKBkQ==",
- "dev": true,
- "requires": {
- "@jest/console": "^26.5.2",
- "@jest/environment": "^26.5.2",
- "@jest/fake-timers": "^26.5.2",
- "@jest/globals": "^26.5.3",
- "@jest/source-map": "^26.5.0",
- "@jest/test-result": "^26.5.2",
- "@jest/transform": "^26.5.2",
- "@jest/types": "^26.5.2",
+ "version": "26.6.3",
+ "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-26.6.3.tgz",
+ "integrity": "sha512-lrzyR3N8sacTAMeonbqpnSka1dHNux2uk0qqDXVkMv2c/A3wYnvQ4EXuI013Y6+gSKSCxdaczvf4HF0mVXHRdw==",
+ "dev": true,
+ "requires": {
+ "@jest/console": "^26.6.2",
+ "@jest/environment": "^26.6.2",
+ "@jest/fake-timers": "^26.6.2",
+ "@jest/globals": "^26.6.2",
+ "@jest/source-map": "^26.6.2",
+ "@jest/test-result": "^26.6.2",
+ "@jest/transform": "^26.6.2",
+ "@jest/types": "^26.6.2",
"@types/yargs": "^15.0.0",
"chalk": "^4.0.0",
+ "cjs-module-lexer": "^0.6.0",
"collect-v8-coverage": "^1.0.0",
"exit": "^0.1.2",
"glob": "^7.1.3",
"graceful-fs": "^4.2.4",
- "jest-config": "^26.5.3",
- "jest-haste-map": "^26.5.2",
- "jest-message-util": "^26.5.2",
- "jest-mock": "^26.5.2",
+ "jest-config": "^26.6.3",
+ "jest-haste-map": "^26.6.2",
+ "jest-message-util": "^26.6.2",
+ "jest-mock": "^26.6.2",
"jest-regex-util": "^26.0.0",
- "jest-resolve": "^26.5.2",
- "jest-snapshot": "^26.5.3",
- "jest-util": "^26.5.2",
- "jest-validate": "^26.5.3",
+ "jest-resolve": "^26.6.2",
+ "jest-snapshot": "^26.6.2",
+ "jest-util": "^26.6.2",
+ "jest-validate": "^26.6.2",
"slash": "^3.0.0",
"strip-bom": "^4.0.0",
"yargs": "^15.4.1"
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"dev": true
},
"glob": {
- "version": "7.1.6",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
- "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+ "version": "7.1.7",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz",
+ "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
}
},
"jest-serializer": {
- "version": "26.5.0",
- "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-26.5.0.tgz",
- "integrity": "sha512-+h3Gf5CDRlSLdgTv7y0vPIAoLgX/SI7T4v6hy+TEXMgYbv+ztzbg5PSN6mUXAT/hXYHvZRWm+MaObVfqkhCGxA==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-26.6.2.tgz",
+ "integrity": "sha512-S5wqyz0DXnNJPd/xfIzZ5Xnp1HrJWBczg8mMfMpN78OJ5eDxXyf+Ygld9wX1DnUWbIbhM1YDY95NjR4CBXkb2g==",
"dev": true,
"requires": {
"@types/node": "*",
"integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
"dev": true
},
+ "escape-string-regexp": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
+ "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
+ "dev": true
+ },
"fill-range": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
"dev": true
},
"stack-utils": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.2.tgz",
- "integrity": "sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA==",
- "dev": true
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.5.tgz",
+ "integrity": "sha512-KZiTzuV3CnSnSvgMRrARVCj+Ht7rMbauGDK0LdVFRGyenwdylpajAp4Q0i6SX8rEmbTpMMf6ryq2gb8pPq2WgQ==",
+ "dev": true,
+ "requires": {
+ "escape-string-regexp": "^2.0.0"
+ }
},
"to-regex-range": {
"version": "2.1.1",
}
},
"jest-snapshot": {
- "version": "26.5.3",
- "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-26.5.3.tgz",
- "integrity": "sha512-ZgAk0Wm0JJ75WS4lGaeRfa0zIgpL0KD595+XmtwlIEMe8j4FaYHyZhP1LNOO+8fXq7HJ3hll54+sFV9X4+CGVw==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-26.6.2.tgz",
+ "integrity": "sha512-OLhxz05EzUtsAmOMzuupt1lHYXCNib0ECyuZ/PZOx9TrZcC8vL0x+DUG3TL+GLX3yHG45e6YGjIm0XwDc3q3og==",
"dev": true,
"requires": {
"@babel/types": "^7.0.0",
- "@jest/types": "^26.5.2",
+ "@jest/types": "^26.6.2",
"@types/babel__traverse": "^7.0.4",
"@types/prettier": "^2.0.0",
"chalk": "^4.0.0",
- "expect": "^26.5.3",
+ "expect": "^26.6.2",
"graceful-fs": "^4.2.4",
- "jest-diff": "^26.5.2",
+ "jest-diff": "^26.6.2",
"jest-get-type": "^26.3.0",
- "jest-haste-map": "^26.5.2",
- "jest-matcher-utils": "^26.5.2",
- "jest-message-util": "^26.5.2",
- "jest-resolve": "^26.5.2",
+ "jest-haste-map": "^26.6.2",
+ "jest-matcher-utils": "^26.6.2",
+ "jest-message-util": "^26.6.2",
+ "jest-resolve": "^26.6.2",
"natural-compare": "^1.4.0",
- "pretty-format": "^26.5.2",
+ "pretty-format": "^26.6.2",
"semver": "^7.3.2"
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"dev": true
},
"diff-sequences": {
- "version": "26.5.0",
- "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.5.0.tgz",
- "integrity": "sha512-ZXx86srb/iYy6jG71k++wBN9P9J05UNQ5hQHQd9MtMPvcqXPx/vKU69jfHV637D00Q2gSgPk2D+jSx3l1lDW/Q==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz",
+ "integrity": "sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==",
"dev": true
},
"has-flag": {
"dev": true
},
"jest-diff": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.5.2.tgz",
- "integrity": "sha512-HCSWDUGwsov5oTlGzrRM+UPJI/Dpqi9jzeV0fdRNi3Ch5bnoXhnyJMmVg2juv9081zLIy3HGPI5mcuGgXM2xRA==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.2.tgz",
+ "integrity": "sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA==",
"dev": true,
"requires": {
"chalk": "^4.0.0",
- "diff-sequences": "^26.5.0",
+ "diff-sequences": "^26.6.2",
"jest-get-type": "^26.3.0",
- "pretty-format": "^26.5.2"
+ "pretty-format": "^26.6.2"
}
},
"jest-get-type": {
"dev": true
},
"pretty-format": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.5.2.tgz",
- "integrity": "sha512-VizyV669eqESlkOikKJI8Ryxl/kPpbdLwNdPs2GrbQs18MpySB5S0Yo0N7zkg2xTRiFq4CFw8ct5Vg4a0xP0og==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz",
+ "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==",
"dev": true,
"requires": {
- "@jest/types": "^26.5.2",
+ "@jest/types": "^26.6.2",
"ansi-regex": "^5.0.0",
"ansi-styles": "^4.0.0",
- "react-is": "^16.12.0"
+ "react-is": "^17.0.1"
}
},
- "semver": {
- "version": "7.3.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
- "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
+ "react-is": {
+ "version": "17.0.2",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
+ "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
"dev": true
},
+ "semver": {
+ "version": "7.3.5",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
+ "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ }
+ },
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
}
},
"jest-util": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.5.2.tgz",
- "integrity": "sha512-WTL675bK+GSSAYgS8z9FWdCT2nccO1yTIplNLPlP0OD8tUk/H5IrWKMMRudIQQ0qp8bb4k+1Qa8CxGKq9qnYdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz",
+ "integrity": "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==",
"dev": true,
"requires": {
- "@jest/types": "^26.5.2",
+ "@jest/types": "^26.6.2",
"@types/node": "*",
"chalk": "^4.0.0",
"graceful-fs": "^4.2.4",
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
}
},
"jest-validate": {
- "version": "26.5.3",
- "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-26.5.3.tgz",
- "integrity": "sha512-LX07qKeAtY+lsU0o3IvfDdN5KH9OulEGOMN1sFo6PnEf5/qjS1LZIwNk9blcBeW94pQUI9dLN9FlDYDWI5tyaA==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-26.6.2.tgz",
+ "integrity": "sha512-NEYZ9Aeyj0i5rQqbq+tpIOom0YS1u2MVu6+euBsvpgIme+FOfRmoC4R5p0JiAUpaFvFy24xgrpMknarR/93XjQ==",
"dev": true,
"requires": {
- "@jest/types": "^26.5.2",
+ "@jest/types": "^26.6.2",
"camelcase": "^6.0.0",
"chalk": "^4.0.0",
"jest-get-type": "^26.3.0",
"leven": "^3.1.0",
- "pretty-format": "^26.5.2"
+ "pretty-format": "^26.6.2"
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"camelcase": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.1.0.tgz",
- "integrity": "sha512-WCMml9ivU60+8rEJgELlFp1gxFcEGxwYleE3bziHEDeqsqAWGHdimB7beBFGjLzVNgPGyDsfgXLQEYMpmIFnVQ==",
+ "version": "6.2.0",
+ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz",
+ "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==",
"dev": true
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"dev": true
},
"pretty-format": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.5.2.tgz",
- "integrity": "sha512-VizyV669eqESlkOikKJI8Ryxl/kPpbdLwNdPs2GrbQs18MpySB5S0Yo0N7zkg2xTRiFq4CFw8ct5Vg4a0xP0og==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz",
+ "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==",
"dev": true,
"requires": {
- "@jest/types": "^26.5.2",
+ "@jest/types": "^26.6.2",
"ansi-regex": "^5.0.0",
"ansi-styles": "^4.0.0",
- "react-is": "^16.12.0"
+ "react-is": "^17.0.1"
}
},
+ "react-is": {
+ "version": "17.0.2",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
+ "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
+ "dev": true
+ },
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
}
},
"jest-watcher": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-26.5.2.tgz",
- "integrity": "sha512-i3m1NtWzF+FXfJ3ljLBB/WQEp4uaNhX7QcQUWMokcifFTUQBDFyUMEwk0JkJ1kopHbx7Een3KX0Q7+9koGM/Pw==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-26.6.2.tgz",
+ "integrity": "sha512-WKJob0P/Em2csiVthsI68p6aGKTIcsfjH9Gsx1f0A3Italz43e3ho0geSAVsmj09RWOELP1AZ/DXyJgOgDKxXQ==",
"dev": true,
"requires": {
- "@jest/test-result": "^26.5.2",
- "@jest/types": "^26.5.2",
+ "@jest/test-result": "^26.6.2",
+ "@jest/types": "^26.6.2",
"@types/node": "*",
"ansi-escapes": "^4.2.1",
"chalk": "^4.0.0",
- "jest-util": "^26.5.2",
+ "jest-util": "^26.6.2",
"string-length": "^4.0.1"
},
"dependencies": {
"@jest/types": {
- "version": "26.5.2",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.5.2.tgz",
- "integrity": "sha512-QDs5d0gYiyetI8q+2xWdkixVQMklReZr4ltw7GFDtb4fuJIBCE6mzj2LnitGqCuAlLap6wPyb8fpoHgwZz5fdg==",
+ "version": "26.6.2",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+ "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.0",
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"dev": true
},
"joi": {
- "version": "17.2.1",
- "resolved": "https://registry.npmjs.org/joi/-/joi-17.2.1.tgz",
- "integrity": "sha512-YT3/4Ln+5YRpacdmfEfrrKh50/kkgX3LgBltjqnlMPIYiZ4hxXZuVJcxmsvxsdeHg9soZfE3qXxHC2tMpCCBOA==",
+ "version": "17.4.0",
+ "resolved": "https://registry.npmjs.org/joi/-/joi-17.4.0.tgz",
+ "integrity": "sha512-F4WiW2xaV6wc1jxete70Rw4V/VuMd6IN+a5ilZsxG4uYtUXWu2kq9W5P2dz30e7Gmw8RCbY/u/uk+dMPma9tAg==",
"dev": true,
"requires": {
- "@hapi/address": "^4.1.0",
- "@hapi/formula": "^2.0.0",
"@hapi/hoek": "^9.0.0",
- "@hapi/pinpoint": "^2.0.0",
- "@hapi/topo": "^5.0.0"
+ "@hapi/topo": "^5.0.0",
+ "@sideway/address": "^4.1.0",
+ "@sideway/formula": "^3.0.0",
+ "@sideway/pinpoint": "^2.0.0"
}
},
"js-tokens": {
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
},
"js-yaml": {
- "version": "3.14.0",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz",
- "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==",
+ "version": "3.14.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
+ "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
"dev": true,
"requires": {
"argparse": "^1.0.7",
"dev": true
},
"jsdom": {
- "version": "16.4.0",
- "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.4.0.tgz",
- "integrity": "sha512-lYMm3wYdgPhrl7pDcRmvzPhhrGVBeVhPIqeHjzeiHN3DFmD1RBpbExbi8vU7BJdH8VAZYovR8DMt0PNNDM7k8w==",
+ "version": "16.5.3",
+ "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.5.3.tgz",
+ "integrity": "sha512-Qj1H+PEvUsOtdPJ056ewXM4UJPCi4hhLA8wpiz9F2YvsRBhuFsXxtrIFAgGBDynQA9isAMGE91PfUYbdMPXuTA==",
"dev": true,
"requires": {
- "abab": "^2.0.3",
- "acorn": "^7.1.1",
+ "abab": "^2.0.5",
+ "acorn": "^8.1.0",
"acorn-globals": "^6.0.0",
"cssom": "^0.4.4",
- "cssstyle": "^2.2.0",
+ "cssstyle": "^2.3.0",
"data-urls": "^2.0.0",
- "decimal.js": "^10.2.0",
+ "decimal.js": "^10.2.1",
"domexception": "^2.0.1",
- "escodegen": "^1.14.1",
+ "escodegen": "^2.0.0",
"html-encoding-sniffer": "^2.0.1",
"is-potential-custom-element-name": "^1.0.0",
"nwsapi": "^2.2.0",
- "parse5": "5.1.1",
+ "parse5": "6.0.1",
"request": "^2.88.2",
- "request-promise-native": "^1.0.8",
- "saxes": "^5.0.0",
+ "request-promise-native": "^1.0.9",
+ "saxes": "^5.0.1",
"symbol-tree": "^3.2.4",
- "tough-cookie": "^3.0.1",
+ "tough-cookie": "^4.0.0",
"w3c-hr-time": "^1.0.2",
"w3c-xmlserializer": "^2.0.0",
"webidl-conversions": "^6.1.0",
"whatwg-encoding": "^1.0.5",
"whatwg-mimetype": "^2.3.0",
- "whatwg-url": "^8.0.0",
- "ws": "^7.2.3",
+ "whatwg-url": "^8.5.0",
+ "ws": "^7.4.4",
"xml-name-validator": "^3.0.0"
},
"dependencies": {
"acorn": {
- "version": "7.4.1",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz",
- "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
+ "version": "8.2.4",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.2.4.tgz",
+ "integrity": "sha512-Ibt84YwBDDA890eDiDCEqcbwvHlBvzzDkU2cGBBDDI1QWT12jTiXIOn2CIw5KK4i6N5Z2HUxwYjzriDyqaqqZg==",
"dev": true
},
- "parse5": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz",
- "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==",
+ "escodegen": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz",
+ "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==",
+ "dev": true,
+ "requires": {
+ "esprima": "^4.0.1",
+ "estraverse": "^5.2.0",
+ "esutils": "^2.0.2",
+ "optionator": "^0.8.1",
+ "source-map": "~0.6.1"
+ }
+ },
+ "estraverse": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz",
+ "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==",
"dev": true
},
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true,
+ "optional": true
+ },
"tough-cookie": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz",
- "integrity": "sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz",
+ "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==",
"dev": true,
"requires": {
- "ip-regex": "^2.1.0",
- "psl": "^1.1.28",
- "punycode": "^2.1.1"
+ "psl": "^1.1.33",
+ "punycode": "^2.1.1",
+ "universalify": "^0.1.2"
}
},
"ws": {
- "version": "7.3.1",
- "resolved": "https://registry.npmjs.org/ws/-/ws-7.3.1.tgz",
- "integrity": "sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA==",
+ "version": "7.4.5",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.5.tgz",
+ "integrity": "sha512-xzyu3hFvomRfXKH8vOFMU3OguG6oOvhXMo3xsGy3xWExqaM2dxBbVxuD99O7m3ZUFMvvscsZDqxfgMaRr/Nr1g==",
"dev": true
}
}
"dev": true
},
"json5": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz",
- "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==",
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz",
+ "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==",
"requires": {
"minimist": "^1.2.5"
}
"dev": true
},
"known-css-properties": {
- "version": "0.19.0",
- "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.19.0.tgz",
- "integrity": "sha512-eYboRV94Vco725nKMlpkn3nV2+96p9c3gKXRsYqAJSswSENvBhN7n5L+uDhY58xQa0UukWsDMTGELzmD8Q+wTA==",
+ "version": "0.21.0",
+ "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.21.0.tgz",
+ "integrity": "sha512-sZLUnTqimCkvkgRS+kbPlYW5o8q5w1cu+uIisKpEWkj31I8mx8kNG162DwRav8Zirkva6N5uoFsm9kzK4mUXjw==",
"dev": true
},
"lazy-ass": {
}
},
"less": {
- "version": "3.12.2",
- "resolved": "https://registry.npmjs.org/less/-/less-3.12.2.tgz",
- "integrity": "sha512-+1V2PCMFkL+OIj2/HrtrvZw0BC0sYLMICJfbQjuj/K8CEnlrFX6R5cKKgzzttsZDHyxQNL1jqMREjKN3ja/E3Q==",
+ "version": "3.13.1",
+ "resolved": "https://registry.npmjs.org/less/-/less-3.13.1.tgz",
+ "integrity": "sha512-SwA1aQXGUvp+P5XdZslUOhhLnClSLIjWvJhmd+Vgib5BFIr9lMNlQwmwUNOjXThF/A0x+MCYYPeWEfeWiLRnTw==",
"dev": true,
"requires": {
+ "copy-anything": "^2.0.1",
"errno": "^0.1.1",
"graceful-fs": "^4.1.2",
"image-size": "~0.5.0",
}
},
"lodash": {
- "version": "4.17.20",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
- "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA=="
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
"lodash-es": {
- "version": "4.17.15",
- "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.15.tgz",
- "integrity": "sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ=="
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz",
+ "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw=="
},
"lodash.clonedeep": {
"version": "4.5.0",
"integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=",
"dev": true
},
- "lodash.sortby": {
- "version": "4.7.0",
- "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz",
- "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=",
- "dev": true
- },
"lodash.throttle": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz",
"integrity": "sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ="
},
+ "lodash.truncate": {
+ "version": "4.4.2",
+ "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz",
+ "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=",
+ "dev": true
+ },
"lodash.uniq": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz",
"dev": true
},
"log-symbols": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz",
- "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==",
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz",
+ "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==",
"dev": true,
"requires": {
- "chalk": "^4.0.0"
+ "chalk": "^4.1.0",
+ "is-unicode-supported": "^0.1.0"
},
"dependencies": {
"ansi-styles": {
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
}
},
"loglevel": {
- "version": "1.7.0",
- "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.7.0.tgz",
- "integrity": "sha512-i2sY04nal5jDcagM3FMfG++T69GEEM8CYuOfeOIvmXzOIcwE9a/CJPR0MFM97pYMj/u10lzz7/zd7+qwhrBTqQ==",
+ "version": "1.7.1",
+ "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.7.1.tgz",
+ "integrity": "sha512-Hesni4s5UkWkwCGJMQGAh71PaLUmKFM60dHvq0zi/vDhhrzuk+4GgNbTXJ12YYQJn6ZKBDNIjYcuQGKudvqrIw==",
"dev": true
},
"loglevel-plugin-prefix": {
"dev": true
},
"glob": {
- "version": "7.1.6",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
- "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+ "version": "7.1.7",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz",
+ "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
}
},
"ssri": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz",
- "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==",
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.2.tgz",
+ "integrity": "sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==",
"dev": true,
"requires": {
"figgy-pudding": "^3.5.1"
"dev": true
},
"map-obj": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.1.0.tgz",
- "integrity": "sha512-glc9y00wgtwcDmp7GaE/0b0OnxpNJsVf3ael/An6Fe2Q51LLwN1er6sdomLRzz5h0+yMpiYLhWYF5R7HeqVd4g==",
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.2.1.tgz",
+ "integrity": "sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ==",
"dev": true
},
"map-stream": {
"dev": true
},
"markdown-table": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-2.0.0.tgz",
- "integrity": "sha512-Ezda85ToJUBhM6WGaG6veasyym+Tbs3cMAw/ZhOPqXiYsr0jgocBV3j3nx+4lk47plLlIqjwuTm/ywVI+zjJ/A==",
- "dev": true,
- "requires": {
- "repeat-string": "^1.0.0"
- }
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.3.tgz",
+ "integrity": "sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==",
+ "dev": true
},
"marked": {
"version": "0.7.0",
}
},
"mdast-util-compact": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/mdast-util-compact/-/mdast-util-compact-2.0.1.tgz",
- "integrity": "sha512-7GlnT24gEwDrdAwEHrU4Vv5lLWrEer4KOkAiKT9nYstsTad7Oc1TwqT2zIMKRdZF7cTuaf+GA1E4Kv7jJh8mPA==",
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/mdast-util-compact/-/mdast-util-compact-1.0.4.tgz",
+ "integrity": "sha512-3YDMQHI5vRiS2uygEFYaqckibpJtKq5Sj2c8JioeOQBU6INpKbdWzfyLqFFnDwEcEnRFIdMsguzs5pC1Jp4Isg==",
+ "dev": true,
+ "requires": {
+ "unist-util-visit": "^1.1.0"
+ }
+ },
+ "mdast-util-from-markdown": {
+ "version": "0.8.5",
+ "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.5.tgz",
+ "integrity": "sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==",
+ "dev": true,
+ "requires": {
+ "@types/mdast": "^3.0.0",
+ "mdast-util-to-string": "^2.0.0",
+ "micromark": "~2.11.0",
+ "parse-entities": "^2.0.0",
+ "unist-util-stringify-position": "^2.0.0"
+ }
+ },
+ "mdast-util-to-markdown": {
+ "version": "0.6.5",
+ "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-0.6.5.tgz",
+ "integrity": "sha512-XeV9sDE7ZlOQvs45C9UKMtfTcctcaj/pGwH8YLbMHoMOXNNCn2LsqVQOqrF1+/NU8lKDAqozme9SCXWyo9oAcQ==",
"dev": true,
"requires": {
- "unist-util-visit": "^2.0.0"
+ "@types/unist": "^2.0.0",
+ "longest-streak": "^2.0.0",
+ "mdast-util-to-string": "^2.0.0",
+ "parse-entities": "^2.0.0",
+ "repeat-string": "^1.0.0",
+ "zwitch": "^1.0.0"
}
},
+ "mdast-util-to-string": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz",
+ "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==",
+ "dev": true
+ },
"mdn-data": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz",
"dev": true
},
"meow": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/meow/-/meow-7.1.1.tgz",
- "integrity": "sha512-GWHvA5QOcS412WCo8vwKDlTelGLsCGBVevQB5Kva961rmNfun0PCbv5+xta2kUMFJyR8/oWnn7ddeKdosbAPbA==",
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz",
+ "integrity": "sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==",
"dev": true,
"requires": {
"@types/minimist": "^1.2.0",
"camelcase-keys": "^6.2.2",
+ "decamelize": "^1.2.0",
"decamelize-keys": "^1.1.0",
"hard-rejection": "^2.1.0",
"minimist-options": "4.1.0",
- "normalize-package-data": "^2.5.0",
+ "normalize-package-data": "^3.0.0",
"read-pkg-up": "^7.0.1",
"redent": "^3.0.0",
"trim-newlines": "^3.0.0",
- "type-fest": "^0.13.1",
- "yargs-parser": "^18.1.3"
+ "type-fest": "^0.18.0",
+ "yargs-parser": "^20.2.3"
},
"dependencies": {
+ "hosted-git-info": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.0.2.tgz",
+ "integrity": "sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ }
+ },
+ "normalize-package-data": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.2.tgz",
+ "integrity": "sha512-6CdZocmfGaKnIHPVFhJJZ3GuR8SsLKvDANFp47Jmy51aKIr8akjAWTSxtpI+MBgBFdSMRyo4hMpDlT6dTffgZg==",
+ "dev": true,
+ "requires": {
+ "hosted-git-info": "^4.0.1",
+ "resolve": "^1.20.0",
+ "semver": "^7.3.4",
+ "validate-npm-package-license": "^3.0.1"
+ }
+ },
+ "semver": {
+ "version": "7.3.5",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
+ "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ }
+ },
"type-fest": {
- "version": "0.13.1",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz",
- "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==",
+ "version": "0.18.1",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz",
+ "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==",
+ "dev": true
+ },
+ "yargs-parser": {
+ "version": "20.2.7",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.7.tgz",
+ "integrity": "sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw==",
"dev": true
}
}
"integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=",
"dev": true
},
+ "micromark": {
+ "version": "2.11.4",
+ "resolved": "https://registry.npmjs.org/micromark/-/micromark-2.11.4.tgz",
+ "integrity": "sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==",
+ "dev": true,
+ "requires": {
+ "debug": "^4.0.0",
+ "parse-entities": "^2.0.0"
+ }
+ },
"micromatch": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz",
- "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==",
+ "version": "4.0.4",
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz",
+ "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==",
"dev": true,
"requires": {
"braces": "^3.0.1",
- "picomatch": "^2.0.5"
+ "picomatch": "^2.2.3"
}
},
"miller-rabin": {
},
"dependencies": {
"bn.js": {
- "version": "4.11.9",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz",
- "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==",
+ "version": "4.12.0",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
+ "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
"dev": true
}
}
"dev": true
},
"mime-db": {
- "version": "1.44.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz",
- "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==",
+ "version": "1.47.0",
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz",
+ "integrity": "sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw==",
"dev": true
},
"mime-types": {
- "version": "2.1.27",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz",
- "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==",
+ "version": "2.1.30",
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.30.tgz",
+ "integrity": "sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg==",
"dev": true,
"requires": {
- "mime-db": "1.44.0"
+ "mime-db": "1.47.0"
}
},
"mimic-fn": {
},
"dependencies": {
"glob": {
- "version": "7.1.6",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
- "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+ "version": "7.1.7",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz",
+ "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
}
},
"native-request": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/native-request/-/native-request-1.0.7.tgz",
- "integrity": "sha512-9nRjinI9bmz+S7dgNtf4A70+/vPhnd+2krGpy4SUlADuOuSa24IDkNaZ+R/QT1wQ6S8jBdi6wE7fLekFZNfUpQ==",
+ "version": "1.0.8",
+ "resolved": "https://registry.npmjs.org/native-request/-/native-request-1.0.8.tgz",
+ "integrity": "sha512-vU2JojJVelUGp6jRcLwToPoWGxSx23z/0iX+I77J3Ht17rf2INGjrhOoQnjVo60nQd8wVsgzKkPfRXBiVdD2ag==",
"dev": true,
"optional": true
},
"dev": true
},
"ng2-charts": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/ng2-charts/-/ng2-charts-2.3.0.tgz",
- "integrity": "sha512-D5K7OqF0m5lOBYvNOsraoEo4OPHja9zfGNj+HWy2nUcP0LP2s+Y/QaQlkG/1rHlwXq9HPm8rLxzSutA0eLHxGQ==",
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/ng2-charts/-/ng2-charts-2.4.2.tgz",
+ "integrity": "sha512-mY3C2uKCaApHCQizS2YxEOqQ7sSZZLxdV6N1uM9u/VvUgVtYvlPtdcXbKpN52ak93ZE22I73DiLWVDnDNG4/AQ==",
"requires": {
- "@types/chart.js": "^2.7.48",
- "lodash": "^4.17.11",
- "tslib": "^1.9.0"
- },
- "dependencies": {
- "tslib": {
- "version": "1.14.1",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
- "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
- }
+ "@types/chart.js": "^2.9.24",
+ "lodash-es": "^4.17.15",
+ "tslib": "^2.0.0"
}
},
"ngx-pipe-function": {
"vm-browserify": "^1.0.1"
},
"dependencies": {
- "inherits": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
- "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
- "dev": true
- },
"punycode": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
"integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
"dev": true
- },
- "util": {
- "version": "0.11.1",
- "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz",
- "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==",
- "dev": true,
- "requires": {
- "inherits": "2.0.3"
- }
}
}
},
"dev": true
},
"node-notifier": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-8.0.0.tgz",
- "integrity": "sha512-46z7DUmcjoYdaWyXouuFNNfUo6eFa94t23c53c+lG/9Cvauk4a98rAUp9672X5dxGdQmLpPzTxzu8f/OeEPaFA==",
+ "version": "8.0.2",
+ "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-8.0.2.tgz",
+ "integrity": "sha512-oJP/9NAdd9+x2Q+rfphB2RJCHjod70RcRLjosiPMMu5gjIfwVnOUGq2nbTjTUbmy0DJ/tFIVT30+Qe3nzl4TJg==",
"dev": true,
"optional": true,
"requires": {
},
"dependencies": {
"semver": {
- "version": "7.3.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
- "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
+ "version": "7.3.5",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
+ "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
"dev": true,
- "optional": true
+ "optional": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ }
},
"uuid": {
- "version": "8.3.1",
- "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz",
- "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==",
+ "version": "8.3.2",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
+ "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
"dev": true,
"optional": true
},
}
},
"node-releases": {
- "version": "1.1.63",
- "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.63.tgz",
- "integrity": "sha512-ukW3iCfQaoxJkSPN+iK7KznTeqDGVJatAEuXsJERYHa9tn/KaT5lBdIyxQjLEVTzSkyjJEuQ17/vaEjrOauDkg==",
+ "version": "1.1.71",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz",
+ "integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==",
"dev": true
},
"normalize-package-data": {
},
"dependencies": {
"hosted-git-info": {
- "version": "2.8.8",
- "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz",
- "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==",
+ "version": "2.8.9",
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
+ "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==",
"dev": true
}
}
"dev": true
},
"npm-bundled": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.1.tgz",
- "integrity": "sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==",
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.2.tgz",
+ "integrity": "sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==",
"dev": true,
"requires": {
"npm-normalize-package-bin": "^1.0.1"
},
"dependencies": {
"semver": {
- "version": "7.3.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
- "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
- "dev": true
+ "version": "7.3.5",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
+ "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ }
}
}
},
},
"dependencies": {
"semver": {
- "version": "7.3.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
- "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
- "dev": true
+ "version": "7.3.5",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
+ "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ }
}
}
},
},
"dependencies": {
"semver": {
- "version": "7.3.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
- "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
- "dev": true
+ "version": "7.3.5",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
+ "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ }
}
}
},
},
"dependencies": {
"hosted-git-info": {
- "version": "2.8.8",
- "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz",
- "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==",
+ "version": "2.8.9",
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
+ "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==",
"dev": true
},
"lru-cache": {
}
},
"object-inspect": {
- "version": "1.8.0",
- "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz",
- "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==",
+ "version": "1.10.3",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.10.3.tgz",
+ "integrity": "sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw==",
"dev": true
},
"object-is": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.3.tgz",
- "integrity": "sha512-teyqLvFWzLkq5B9ki8FVWA902UER2qkxmdA4nLf+wjOLAWgxzCWZNCxpDq9MvE8MmhWNr+I8w3BN49Vx36Y6Xg==",
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz",
+ "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==",
"dev": true,
"requires": {
- "define-properties": "^1.1.3",
- "es-abstract": "^1.18.0-next.1"
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.1.3"
}
},
"object-keys": {
"integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
"dev": true
},
- "object-path": {
- "version": "0.11.4",
- "resolved": "https://registry.npmjs.org/object-path/-/object-path-0.11.4.tgz",
- "integrity": "sha1-NwrnUvvzfePqcKhhwju6iRVpGUk=",
- "dev": true
- },
"object-visit": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz",
}
},
"object.assign": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.1.tgz",
- "integrity": "sha512-VT/cxmx5yaoHSOTSyrCygIDFco+RsibY2NM0a4RdEeY/4KgqezwFtK1yr3U67xYhqJSlASm2pKhLVzPj2lr4bA==",
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz",
+ "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==",
"dev": true,
"requires": {
+ "call-bind": "^1.0.0",
"define-properties": "^1.1.3",
- "es-abstract": "^1.18.0-next.0",
"has-symbols": "^1.0.1",
"object-keys": "^1.1.1"
}
}
},
"object.getownpropertydescriptors": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz",
- "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==",
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz",
+ "integrity": "sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ==",
"dev": true,
"requires": {
+ "call-bind": "^1.0.2",
"define-properties": "^1.1.3",
- "es-abstract": "^1.17.0-next.1"
- },
- "dependencies": {
- "es-abstract": {
- "version": "1.17.7",
- "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz",
- "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==",
- "dev": true,
- "requires": {
- "es-to-primitive": "^1.2.1",
- "function-bind": "^1.1.1",
- "has": "^1.0.3",
- "has-symbols": "^1.0.1",
- "is-callable": "^1.2.2",
- "is-regex": "^1.1.1",
- "object-inspect": "^1.8.0",
- "object-keys": "^1.1.1",
- "object.assign": "^4.1.1",
- "string.prototype.trimend": "^1.0.1",
- "string.prototype.trimstart": "^1.0.1"
- }
- }
+ "es-abstract": "^1.18.0-next.2"
}
},
"object.map": {
}
},
"object.values": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz",
- "integrity": "sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==",
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.3.tgz",
+ "integrity": "sha512-nkF6PfDB9alkOUxpf1HNm/QlkeW3SReqL5WXeBLpEJJnlPSvRaDQpW3gQTksTN3fgJX4hL42RzKyOin6ff3tyw==",
"dev": true,
"requires": {
+ "call-bind": "^1.0.2",
"define-properties": "^1.1.3",
- "es-abstract": "^1.17.0-next.1",
- "function-bind": "^1.1.1",
+ "es-abstract": "^1.18.0-next.2",
"has": "^1.0.3"
- },
- "dependencies": {
- "es-abstract": {
- "version": "1.17.7",
- "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz",
- "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==",
- "dev": true,
- "requires": {
- "es-to-primitive": "^1.2.1",
- "function-bind": "^1.1.1",
- "has": "^1.0.3",
- "has-symbols": "^1.0.1",
- "is-callable": "^1.2.2",
- "is-regex": "^1.1.1",
- "object-inspect": "^1.8.0",
- "object-keys": "^1.1.1",
- "object.assign": "^4.1.1",
- "string.prototype.trimend": "^1.0.1",
- "string.prototype.trimstart": "^1.0.1"
- }
- }
}
},
"obuf": {
}
},
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"dev": true
},
"p-each-series": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.1.0.tgz",
- "integrity": "sha512-ZuRs1miPT4HrjFa+9fRfOFXxGJfORgelKV9f9nNOWw2gl6gVsRaVDOQP0+MI0G0wGKns1Yacsu0GjOFbTK0JFQ==",
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz",
+ "integrity": "sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==",
"dev": true
},
"p-finally": {
}
},
"glob": {
- "version": "7.1.6",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
- "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+ "version": "7.1.7",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz",
+ "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
}
},
"hosted-git-info": {
- "version": "2.8.8",
- "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz",
- "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==",
+ "version": "2.8.9",
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
+ "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==",
"dev": true
},
"lru-cache": {
}
},
"ssri": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz",
- "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==",
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.2.tgz",
+ "integrity": "sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==",
"dev": true,
"requires": {
"figgy-pudding": "^3.5.1"
}
},
"pbkdf2": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz",
- "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==",
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz",
+ "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==",
"dev": true,
"requires": {
"create-hash": "^1.1.2",
}
},
"pdfkit": {
- "version": "0.11.0",
- "resolved": "https://registry.npmjs.org/pdfkit/-/pdfkit-0.11.0.tgz",
- "integrity": "sha512-1s9gaumXkYxcVF1iRtSmLiISF2r4nHtsTgpwXiK8Swe+xwk/1pm8FJjYqN7L3x13NsWnGyUFntWcO8vfqq+wwA==",
+ "version": "0.12.1",
+ "resolved": "https://registry.npmjs.org/pdfkit/-/pdfkit-0.12.1.tgz",
+ "integrity": "sha512-ruNLx49hVW3ePJziKjHtWdTHN1VZHLCUCcbui/vx4lYwFLEM1d8W0L7ObYPbN8EifK7s281ZMugCLgSbk+KRhg==",
"dev": true,
"requires": {
- "crypto-js": "^3.1.9-1",
- "fontkit": "^1.8.0",
+ "crypto-js": "^3.3.0",
+ "fontkit": "^1.8.1",
"linebreak": "^1.0.2",
"png-js": "^1.0.0"
}
},
"pdfmake": {
- "version": "0.1.68",
- "resolved": "https://registry.npmjs.org/pdfmake/-/pdfmake-0.1.68.tgz",
- "integrity": "sha512-oE1VEjkluro3+QqvLbFgFU/rRgyKdbPy/Fh8SS/nsUxnsiUcm85ChpmD6YD0hQW1E0d3hppAo4Yh+xdXucenIA==",
+ "version": "0.1.71",
+ "resolved": "https://registry.npmjs.org/pdfmake/-/pdfmake-0.1.71.tgz",
+ "integrity": "sha512-uXUy+NZ8R5pwJ6rYLJRu7VRw/w5ogBScNk440CHpMZ6Z0+E1uc1XvwK4I1U5ry0UZQ3qPD0dpSvbzAkRBKYoJA==",
"dev": true,
"requires": {
"iconv-lite": "^0.6.2",
"linebreak": "^1.0.2",
- "pdfkit": "^0.11.0",
+ "pdfkit": "^0.12.0",
"svg-to-pdfkit": "^0.1.8",
"xmldoc": "^1.1.2"
}
"dev": true
},
"picomatch": {
- "version": "2.2.2",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz",
- "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==",
+ "version": "2.2.3",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz",
+ "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==",
"dev": true
},
"pidtree": {
},
"dependencies": {
"debug": {
- "version": "3.2.6",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
- "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
+ "version": "3.2.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
"dev": true,
"requires": {
"ms": "^2.1.1"
"dev": true,
"requires": {
"htmlparser2": "^3.10.0"
+ },
+ "dependencies": {
+ "domhandler": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz",
+ "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==",
+ "dev": true,
+ "requires": {
+ "domelementtype": "1"
+ }
+ },
+ "entities": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz",
+ "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==",
+ "dev": true
+ },
+ "htmlparser2": {
+ "version": "3.10.1",
+ "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz",
+ "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==",
+ "dev": true,
+ "requires": {
+ "domelementtype": "^1.3.1",
+ "domhandler": "^2.3.0",
+ "domutils": "^1.5.1",
+ "entities": "^1.1.1",
+ "inherits": "^2.0.1",
+ "readable-stream": "^3.1.1"
+ }
+ },
+ "readable-stream": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
+ "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
+ "dev": true,
+ "requires": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ }
+ }
}
},
"postcss-import": {
},
"dependencies": {
"is-buffer": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz",
- "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==",
- "dev": true
- },
- "markdown-table": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/markdown-table/-/markdown-table-1.1.3.tgz",
- "integrity": "sha512-1RUZVgQlpJSPWYbFSpmudq5nHY1doEIv89gBtF0s4gW1GF2XorxcA/70M5vq7rLv0a6mhOUccRsqkwhwLCIQ2Q==",
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz",
+ "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==",
"dev": true
},
- "mdast-util-compact": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/mdast-util-compact/-/mdast-util-compact-1.0.4.tgz",
- "integrity": "sha512-3YDMQHI5vRiS2uygEFYaqckibpJtKq5Sj2c8JioeOQBU6INpKbdWzfyLqFFnDwEcEnRFIdMsguzs5pC1Jp4Isg==",
- "dev": true,
- "requires": {
- "unist-util-visit": "^1.1.0"
- }
- },
"parse-entities": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-1.2.2.tgz",
"xtend": "^4.0.1"
}
},
- "stringify-entities": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-1.3.2.tgz",
- "integrity": "sha512-nrBAQClJAPN2p+uGCVJRPIPakKeKWZ9GtBCmormE7pWOSlHat7+x5A8gx85M7HM5Dt0BP3pP5RhVW77WdbJJ3A==",
- "dev": true,
- "requires": {
- "character-entities-html4": "^1.0.0",
- "character-entities-legacy": "^1.0.0",
- "is-alphanumerical": "^1.0.0",
- "is-hexadecimal": "^1.0.0"
- }
- },
"unified": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/unified/-/unified-7.1.0.tgz",
"integrity": "sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A==",
"dev": true
},
- "unist-util-remove-position": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-1.1.4.tgz",
- "integrity": "sha512-tLqd653ArxJIPnKII6LMZwH+mb5q+n/GtXQZo6S6csPRs5zB0u79Yw8ouR3wTw8wxvdJFhpP6Y7jorWdCgLO0A==",
- "dev": true,
- "requires": {
- "unist-util-visit": "^1.1.0"
- }
- },
"unist-util-stringify-position": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-1.1.2.tgz",
"integrity": "sha512-pNCVrk64LZv1kElr0N1wPiHEUoXNVFERp+mlTg/s9R5Lwg87f9bM/3sQB99w+N9D/qnM9ar3+AKDBwo/gm/iQQ==",
"dev": true
},
- "unist-util-visit": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-1.4.1.tgz",
- "integrity": "sha512-AvGNk7Bb//EmJZyhtRUnNMEpId/AZ5Ph/KUpTI09WHQuDZHKovQ1oEv3mfmKpWKtoMzyMC4GLBm1Zy5k12fjIw==",
- "dev": true,
- "requires": {
- "unist-util-visit-parents": "^2.0.0"
- }
- },
- "unist-util-visit-parents": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-2.1.2.tgz",
- "integrity": "sha512-DyN5vD4NE3aSeB+PXYNKxzGsfocxp6asDc2XXE3b0ekO2BaRUpBicbbUygfSvYfUz1IkmjFR1YF7dPklraMZ2g==",
- "dev": true,
- "requires": {
- "unist-util-is": "^3.0.0"
- }
- },
"vfile": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/vfile/-/vfile-3.0.1.tgz",
"vfile-message": "^1.0.0"
}
},
- "vfile-location": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-2.0.6.tgz",
- "integrity": "sha512-sSFdyCP3G6Ka0CEmN83A2YCMKIieHx0EDaj5IDP4g1pa5ZJ4FJDvpO0WODLxo4LUX4oe52gmSCK7Jw4SBghqxA==",
- "dev": true
- },
"vfile-message": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-1.1.1.tgz",
}
},
"postcss-selector-parser": {
- "version": "6.0.4",
- "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.4.tgz",
- "integrity": "sha512-gjMeXBempyInaBqpp8gODmwZ52WaYsVOsfr4L4lDQ7n3ncD6mEyySiDtgzCT+NYC0mmeOLvtsF8iaEf0YT6dBw==",
+ "version": "6.0.6",
+ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.6.tgz",
+ "integrity": "sha512-9LXrvaaX3+mcv5xkg5kFwqSzSH1JIObIx51PrndZwlmznwXRfxMddDvo9gve3gVR8ZTKgoFDdWkbRFmEhT4PMg==",
"dev": true,
"requires": {
"cssesc": "^3.0.0",
- "indexes-of": "^1.0.1",
- "uniq": "^1.0.1",
"util-deprecate": "^1.0.2"
}
},
}
},
"postcss-svgo": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-4.0.2.tgz",
- "integrity": "sha512-C6wyjo3VwFm0QgBy+Fu7gCYOkCmgmClghO+pjcxvrcBKtiKt0uCF+hvbMO1fyv5BMImRK90SMb+dwUnfbGd+jw==",
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-4.0.3.tgz",
+ "integrity": "sha512-NoRbrcMWTtUghzuKSoIm6XV+sJdvZ7GZSc3wdBN0W19FTtp2ko8NqLsgoh/m9CzNhU3KLPvQmjIwtaNFkaFTvw==",
"dev": true,
"requires": {
- "is-svg": "^3.0.0",
"postcss": "^7.0.0",
"postcss-value-parser": "^3.0.0",
"svgo": "^1.0.0"
"dev": true
},
"pretty-bytes": {
- "version": "5.4.1",
- "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.4.1.tgz",
- "integrity": "sha512-s1Iam6Gwz3JI5Hweaz4GoCD1WUNUIyzePFy5+Js2hjwGVt2Z79wNN+ZKOZ2vB6C+Xs6njyB84Z1IthQg8d9LxA==",
+ "version": "5.6.0",
+ "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz",
+ "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==",
"dev": true
},
"pretty-format": {
}
},
"execa": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/execa/-/execa-4.0.3.tgz",
- "integrity": "sha512-WFDXGHckXPWZX19t1kCsXzOpqX9LWYNqn4C+HqZlk/V0imTkzJZqf87ZBhvpHaftERYknpk0fjSylnXVlVgI0A==",
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz",
+ "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==",
"dev": true,
"requires": {
"cross-spawn": "^7.0.0",
}
},
"prompts": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.3.2.tgz",
- "integrity": "sha512-Q06uKs2CkNYVID0VqwfAl9mipo99zkBv/n2JtWY89Yxa3ZabWSrs0e2KTudKVa3peLUvYXMefDqIleLPVUBZMA==",
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.1.tgz",
+ "integrity": "sha512-EQyfIuO2hPDsX1L/blblV+H7I0knhgAd82cVneCwcdND9B8AuCDuRcBH6yIcG4dFzlOUqbazQqwGjx5xmsNLuQ==",
"dev": true,
"requires": {
"kleur": "^3.0.3",
- "sisteransi": "^1.0.4"
+ "sisteransi": "^1.0.5"
}
},
"protoduck": {
},
"dependencies": {
"bn.js": {
- "version": "4.11.9",
- "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz",
- "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==",
+ "version": "4.12.0",
+ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
+ "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
"dev": true
}
}
"integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==",
"dev": true
},
+ "queue-microtask": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
+ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
+ "dev": true
+ },
"quick-lru": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz",
},
"dependencies": {
"parse-json": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.1.0.tgz",
- "integrity": "sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==",
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
+ "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
"dev": true
},
"regenerate": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.1.tgz",
- "integrity": "sha512-j2+C8+NtXQgEKWk49MMP5P/u2GhnahTtVkRIHr5R5lVRlbKvmQ+oS+A5aLKWp2ma5VkT8sh6v+v4hbH0YHR66A==",
+ "version": "1.4.2",
+ "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz",
+ "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==",
"dev": true
},
"regenerate-unicode-properties": {
}
},
"regex-parser": {
- "version": "2.2.10",
- "resolved": "https://registry.npmjs.org/regex-parser/-/regex-parser-2.2.10.tgz",
- "integrity": "sha512-8t6074A68gHfU8Neftl0Le6KTDwfGAj7IyjPIMSfikI2wJUTHDMaIq42bUsfVnj8mhx0R+45rdUXHGpN164avA==",
+ "version": "2.2.11",
+ "resolved": "https://registry.npmjs.org/regex-parser/-/regex-parser-2.2.11.tgz",
+ "integrity": "sha512-jbD/FT0+9MBU2XAZluI7w2OBs1RBi6p9M83nkoZayQXXU9e8Robt69FcZc7wU4eJD/YFTjn1JdCk3rbMJajz8Q==",
"dev": true
},
"regexp.prototype.flags": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz",
- "integrity": "sha512-2+Q0C5g951OlYlJz6yu5/M33IcsESLlLfsyIaLJaG4FA2r4yP8MvVMJUUP/fVBkSpbbbZlS5gynbEWLipiiXiQ==",
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz",
+ "integrity": "sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA==",
"dev": true,
"requires": {
- "define-properties": "^1.1.3",
- "es-abstract": "^1.17.0-next.1"
- },
- "dependencies": {
- "es-abstract": {
- "version": "1.17.7",
- "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz",
- "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==",
- "dev": true,
- "requires": {
- "es-to-primitive": "^1.2.1",
- "function-bind": "^1.1.1",
- "has": "^1.0.3",
- "has-symbols": "^1.0.1",
- "is-callable": "^1.2.2",
- "is-regex": "^1.1.1",
- "object-inspect": "^1.8.0",
- "object-keys": "^1.1.1",
- "object.assign": "^4.1.1",
- "string.prototype.trimend": "^1.0.1",
- "string.prototype.trimstart": "^1.0.1"
- }
- }
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.1.3"
}
},
"regexpu-core": {
"dev": true
},
"regjsparser": {
- "version": "0.6.4",
- "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.4.tgz",
- "integrity": "sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw==",
+ "version": "0.6.9",
+ "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.9.tgz",
+ "integrity": "sha512-ZqbNRz1SNjLAiYuwY0zoXW8Ne675IX5q+YHioAGbCw4X96Mjl2+dcX9B2ciaeyYjViDAfvIjFpQjJgLttTEERQ==",
"dev": true,
"requires": {
"jsesc": "~0.5.0"
}
},
"remark": {
- "version": "12.0.1",
- "resolved": "https://registry.npmjs.org/remark/-/remark-12.0.1.tgz",
- "integrity": "sha512-gS7HDonkdIaHmmP/+shCPejCEEW+liMp/t/QwmF0Xt47Rpuhl32lLtDV1uKWvGoq+kxr5jSgg5oAIpGuyULjUw==",
+ "version": "13.0.0",
+ "resolved": "https://registry.npmjs.org/remark/-/remark-13.0.0.tgz",
+ "integrity": "sha512-HDz1+IKGtOyWN+QgBiAT0kn+2s6ovOxHyPAFGKVE81VSzJ+mq7RwHFledEvB5F1p4iJvOah/LOKdFuzvRnNLCA==",
"dev": true,
"requires": {
- "remark-parse": "^8.0.0",
- "remark-stringify": "^8.0.0",
- "unified": "^9.0.0"
+ "remark-parse": "^9.0.0",
+ "remark-stringify": "^9.0.0",
+ "unified": "^9.1.0"
}
},
"remark-parse": {
- "version": "8.0.3",
- "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-8.0.3.tgz",
- "integrity": "sha512-E1K9+QLGgggHxCQtLt++uXltxEprmWzNfg+MxpfHsZlrddKzZ/hZyWHDbK3/Ap8HJQqYJRXP+jHczdL6q6i85Q==",
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-9.0.0.tgz",
+ "integrity": "sha512-geKatMwSzEXKHuzBNU1z676sGcDcFoChMK38TgdHJNAYfFtsfHDQG7MoJAjs6sgYMqyLduCYWDIWZIxiPeafEw==",
"dev": true,
- "requires": {
- "ccount": "^1.0.0",
- "collapse-white-space": "^1.0.2",
- "is-alphabetical": "^1.0.0",
- "is-decimal": "^1.0.0",
- "is-whitespace-character": "^1.0.0",
- "is-word-character": "^1.0.0",
- "markdown-escapes": "^1.0.0",
- "parse-entities": "^2.0.0",
- "repeat-string": "^1.5.4",
- "state-toggle": "^1.0.0",
- "trim": "0.0.1",
- "trim-trailing-lines": "^1.0.0",
- "unherit": "^1.0.4",
- "unist-util-remove-position": "^2.0.0",
- "vfile-location": "^3.0.0",
- "xtend": "^4.0.1"
+ "requires": {
+ "mdast-util-from-markdown": "^0.8.0"
}
},
"remark-stringify": {
- "version": "8.1.1",
- "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-8.1.1.tgz",
- "integrity": "sha512-q4EyPZT3PcA3Eq7vPpT6bIdokXzFGp9i85igjmhRyXWmPs0Y6/d2FYwUNotKAWyLch7g0ASZJn/KHHcHZQ163A==",
+ "version": "9.0.1",
+ "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-9.0.1.tgz",
+ "integrity": "sha512-mWmNg3ZtESvZS8fv5PTvaPckdL4iNlCHTt8/e/8oN08nArHRHjNZMKzA/YW3+p7/lYqIw4nx1XsjCBo/AxNChg==",
"dev": true,
"requires": {
- "ccount": "^1.0.0",
- "is-alphanumeric": "^1.0.0",
- "is-decimal": "^1.0.0",
- "is-whitespace-character": "^1.0.0",
- "longest-streak": "^2.0.1",
- "markdown-escapes": "^1.0.0",
- "markdown-table": "^2.0.0",
- "mdast-util-compact": "^2.0.0",
- "parse-entities": "^2.0.0",
- "repeat-string": "^1.5.4",
- "state-toggle": "^1.0.0",
- "stringify-entities": "^3.0.0",
- "unherit": "^1.0.4",
- "xtend": "^4.0.1"
+ "mdast-util-to-markdown": "^0.6.0"
}
},
"remove-trailing-separator": {
"dev": true
},
"repeat-element": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz",
- "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==",
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz",
+ "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==",
"dev": true
},
"repeat-string": {
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I="
},
+ "require-from-string": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
+ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
+ "dev": true
+ },
"require-main-filename": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
"integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
},
"resolve": {
- "version": "1.17.0",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz",
- "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==",
+ "version": "1.20.0",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz",
+ "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==",
"requires": {
+ "is-core-module": "^2.2.0",
"path-parse": "^1.0.6"
}
},
"dev": true
},
"resolve-url-loader": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/resolve-url-loader/-/resolve-url-loader-3.1.1.tgz",
- "integrity": "sha512-K1N5xUjj7v0l2j/3Sgs5b8CjrrgtC70SmdCuZiJ8tSyb5J+uk3FoeZ4b7yTnH6j7ngI+Bc5bldHJIa8hYdu2gQ==",
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/resolve-url-loader/-/resolve-url-loader-3.1.2.tgz",
+ "integrity": "sha512-QEb4A76c8Mi7I3xNKXlRKQSlLBwjUV/ULFMP+G7n3/7tJZ8MG5wsZ3ucxP1Jz8Vevn6fnJsxDx9cIls+utGzPQ==",
"dev": true,
"requires": {
- "adjust-sourcemap-loader": "2.0.0",
+ "adjust-sourcemap-loader": "3.0.0",
"camelcase": "5.3.1",
"compose-function": "3.0.3",
"convert-source-map": "1.7.0",
},
"dependencies": {
"glob": {
- "version": "7.1.6",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
- "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+ "version": "7.1.7",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz",
+ "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
"dev": true
},
"run-parallel": {
- "version": "1.1.9",
- "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz",
- "integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==",
- "dev": true
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
+ "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
+ "dev": true,
+ "requires": {
+ "queue-microtask": "^1.2.2"
+ }
},
"run-queue": {
"version": "1.0.3",
},
"dependencies": {
"semver": {
- "version": "7.3.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
- "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
- "dev": true
+ "version": "7.3.5",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
+ "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ }
}
}
},
"dev": true
},
"selfsigned": {
- "version": "1.10.8",
- "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.8.tgz",
- "integrity": "sha512-2P4PtieJeEwVgTU9QEcwIRDQ/mXJLX8/+I3ur+Pg16nS8oNbrGxEso9NyYWy8NAmXiNl4dlAp5MwoNeCWzON4w==",
+ "version": "1.10.11",
+ "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.11.tgz",
+ "integrity": "sha512-aVmbPOfViZqOZPgRBT0+3u4yZFHpmnIghLMlAcb5/xhp5ZtB/RVnKhz5vl2M32CLXAqR4kha9zfhNg0Lf/sxKA==",
"dev": true,
"requires": {
"node-forge": "^0.10.0"
}
},
"simplebar": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/simplebar/-/simplebar-5.3.0.tgz",
- "integrity": "sha512-LgrGdIWpwHLLlI9HqfnGql62H/iZlF0KDZ7w3ZNbd2ZLwh9NKsODLHPzQgUlqQ8aZe7Y6/1xJMXK1PU5e810+w==",
+ "version": "5.3.3",
+ "resolved": "https://registry.npmjs.org/simplebar/-/simplebar-5.3.3.tgz",
+ "integrity": "sha512-OfuSX47Axq9aR6rp9WK3YefAg+1Qw3UKKxS46PdElPpd+FWXMj17/nispYxsHtU3F7mv+ilmqELWmRt7KUgHgg==",
"requires": {
"can-use-dom": "^0.1.0",
"core-js": "^3.0.1",
},
"dependencies": {
"debug": {
- "version": "3.2.6",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
- "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
+ "version": "3.2.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
"dev": true,
"requires": {
"ms": "^2.1.1"
}
},
"source-map-url": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz",
- "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=",
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz",
+ "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==",
"dev": true
},
"sourcemap-codec": {
}
},
"spdx-license-ids": {
- "version": "3.0.6",
- "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.6.tgz",
- "integrity": "sha512-+orQK83kyMva3WyPf59k1+Y525csj5JejicWut55zeTWANuN17qSiSLUXWtzHeNWORSvT7GLDJ/E/XiIWoXBTw==",
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz",
+ "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==",
"dev": true
},
"spdy": {
}
},
"ssri": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.0.tgz",
- "integrity": "sha512-aq/pz989nxVYwn16Tsbj1TqFpD5LLrQxHf5zaHuieFV+R0Bbr4y8qUsOA45hXT/N4/9UNXTarBjnjVmjSOVaAA==",
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz",
+ "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==",
"dev": true,
"requires": {
"minipass": "^3.1.1"
"dev": true
},
"stack-utils": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.2.tgz",
- "integrity": "sha512-0H7QK2ECz3fyZMzQ8rH0j2ykpfbnd20BFtfg/SqVC2+sCTtcw0aDTGB7dk+de4U4uUeuz6nOtJcrkFFLG1B0Rg==",
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.3.tgz",
+ "integrity": "sha512-gL//fkxfWUsIlFL2Tl42Cl6+HFALEaB1FU76I/Fy+oZjRreP7OPMXFlGbxM7NQsI0ZpUfw76sHnv0WNYuTb7Iw==",
"dev": true,
"requires": {
"escape-string-regexp": "^2.0.0"
}
},
"start-server-and-test": {
- "version": "1.11.5",
- "resolved": "https://registry.npmjs.org/start-server-and-test/-/start-server-and-test-1.11.5.tgz",
- "integrity": "sha512-XUGifPzbJcgD6tqWMFvbxnra1KByRuiw6Oc9FHR3tPm7UxB70a4iFDIuXfOAFtMJLvOJuwB3gnMUZxko8gtLow==",
+ "version": "1.12.1",
+ "resolved": "https://registry.npmjs.org/start-server-and-test/-/start-server-and-test-1.12.1.tgz",
+ "integrity": "sha512-qGQ2HQiF2yDIfyaHsXkHfoE5UOl4zJUbJ/gx2xOkfX7iPMXW9qHmoFyaMfIDJVLNkxCK7RxSrvWEI9hNVKQluw==",
"dev": true,
"requires": {
"bluebird": "3.7.2",
"check-more-types": "2.24.0",
- "debug": "4.2.0",
+ "debug": "4.3.1",
"execa": "3.4.0",
"lazy-ass": "1.6.0",
"ps-tree": "1.2.0",
- "wait-on": "5.2.0"
+ "wait-on": "5.3.0"
},
"dependencies": {
"cross-spawn": {
"dev": true
},
"string-length": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.1.tgz",
- "integrity": "sha512-PKyXUd0LK0ePjSOnWn34V2uD6acUWev9uy0Ft05k0E8xRW+SKcA0F7eMr7h5xlzfn+4O3N+55rduYyet3Jk+jw==",
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz",
+ "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==",
"dev": true,
"requires": {
"char-regex": "^1.0.2",
}
},
"string-width": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
- "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
+ "version": "4.2.2",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz",
+ "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==",
"requires": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
}
},
"string.prototype.padend": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.0.tgz",
- "integrity": "sha512-3aIv8Ffdp8EZj8iLwREGpQaUZiPyrWrpzMBHvkiSW/bK/EGve9np07Vwy7IJ5waydpGXzQZu/F8Oze2/IWkBaA==",
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.2.tgz",
+ "integrity": "sha512-/AQFLdYvePENU3W5rgurfWSMU6n+Ww8n/3cUt7E+vPBB/D7YDG8x+qjoFs4M/alR2bW7Qg6xMjVwWUOvuQ0XpQ==",
"dev": true,
"requires": {
+ "call-bind": "^1.0.2",
"define-properties": "^1.1.3",
- "es-abstract": "^1.17.0-next.1"
- },
- "dependencies": {
- "es-abstract": {
- "version": "1.17.7",
- "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz",
- "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==",
- "dev": true,
- "requires": {
- "es-to-primitive": "^1.2.1",
- "function-bind": "^1.1.1",
- "has": "^1.0.3",
- "has-symbols": "^1.0.1",
- "is-callable": "^1.2.2",
- "is-regex": "^1.1.1",
- "object-inspect": "^1.8.0",
- "object-keys": "^1.1.1",
- "object.assign": "^4.1.1",
- "string.prototype.trimend": "^1.0.1",
- "string.prototype.trimstart": "^1.0.1"
- }
- }
+ "es-abstract": "^1.18.0-next.2"
}
},
"string.prototype.trimend": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz",
- "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==",
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz",
+ "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==",
"dev": true,
"requires": {
- "define-properties": "^1.1.3",
- "es-abstract": "^1.17.5"
- },
- "dependencies": {
- "es-abstract": {
- "version": "1.17.7",
- "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz",
- "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==",
- "dev": true,
- "requires": {
- "es-to-primitive": "^1.2.1",
- "function-bind": "^1.1.1",
- "has": "^1.0.3",
- "has-symbols": "^1.0.1",
- "is-callable": "^1.2.2",
- "is-regex": "^1.1.1",
- "object-inspect": "^1.8.0",
- "object-keys": "^1.1.1",
- "object.assign": "^4.1.1",
- "string.prototype.trimend": "^1.0.1",
- "string.prototype.trimstart": "^1.0.1"
- }
- }
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.1.3"
}
},
"string.prototype.trimstart": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz",
- "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==",
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz",
+ "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==",
"dev": true,
"requires": {
- "define-properties": "^1.1.3",
- "es-abstract": "^1.17.5"
- },
- "dependencies": {
- "es-abstract": {
- "version": "1.17.7",
- "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz",
- "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==",
- "dev": true,
- "requires": {
- "es-to-primitive": "^1.2.1",
- "function-bind": "^1.1.1",
- "has": "^1.0.3",
- "has-symbols": "^1.0.1",
- "is-callable": "^1.2.2",
- "is-regex": "^1.1.1",
- "object-inspect": "^1.8.0",
- "object-keys": "^1.1.1",
- "object.assign": "^4.1.1",
- "string.prototype.trimend": "^1.0.1",
- "string.prototype.trimstart": "^1.0.1"
- }
- }
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.1.3"
}
},
"string_decoder": {
}
},
"stringify-entities": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-3.1.0.tgz",
- "integrity": "sha512-3FP+jGMmMV/ffZs86MoghGqAoqXAdxLrJP4GUdrDN1aIScYih5tuIO3eF4To5AJZ79KDZ8Fpdy7QJnK8SsL1Vg==",
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-1.3.2.tgz",
+ "integrity": "sha512-nrBAQClJAPN2p+uGCVJRPIPakKeKWZ9GtBCmormE7pWOSlHat7+x5A8gx85M7HM5Dt0BP3pP5RhVW77WdbJJ3A==",
"dev": true,
"requires": {
"character-entities-html4": "^1.0.0",
"character-entities-legacy": "^1.0.0",
- "xtend": "^4.0.0"
+ "is-alphanumerical": "^1.0.0",
+ "is-hexadecimal": "^1.0.0"
}
},
"strip-ansi": {
}
},
"stylelint": {
- "version": "13.7.2",
- "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-13.7.2.tgz",
- "integrity": "sha512-mmieorkfmO+ZA6CNDu1ic9qpt4tFvH2QUB7vqXgrMVHe5ENU69q7YDq0YUg/UHLuCsZOWhUAvcMcLzLDIERzSg==",
+ "version": "13.13.1",
+ "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-13.13.1.tgz",
+ "integrity": "sha512-Mv+BQr5XTUrKqAXmpqm6Ddli6Ief+AiPZkRsIrAoUKFuq/ElkUh9ZMYxXD0iQNZ5ADghZKLOWz1h7hTClB7zgQ==",
"dev": true,
"requires": {
"@stylelint/postcss-css-in-js": "^0.37.2",
- "@stylelint/postcss-markdown": "^0.36.1",
+ "@stylelint/postcss-markdown": "^0.36.2",
"autoprefixer": "^9.8.6",
- "balanced-match": "^1.0.0",
- "chalk": "^4.1.0",
+ "balanced-match": "^2.0.0",
+ "chalk": "^4.1.1",
"cosmiconfig": "^7.0.0",
- "debug": "^4.1.1",
+ "debug": "^4.3.1",
"execall": "^2.0.0",
- "fast-glob": "^3.2.4",
+ "fast-glob": "^3.2.5",
"fastest-levenshtein": "^1.0.12",
- "file-entry-cache": "^5.0.1",
+ "file-entry-cache": "^6.0.1",
"get-stdin": "^8.0.0",
"global-modules": "^2.0.0",
- "globby": "^11.0.1",
+ "globby": "^11.0.3",
"globjoin": "^0.1.4",
"html-tags": "^3.1.0",
"ignore": "^5.1.8",
"import-lazy": "^4.0.0",
"imurmurhash": "^0.1.4",
- "known-css-properties": "^0.19.0",
- "lodash": "^4.17.20",
- "log-symbols": "^4.0.0",
+ "known-css-properties": "^0.21.0",
+ "lodash": "^4.17.21",
+ "log-symbols": "^4.1.0",
"mathml-tag-names": "^2.1.3",
- "meow": "^7.1.1",
- "micromatch": "^4.0.2",
+ "meow": "^9.0.0",
+ "micromatch": "^4.0.4",
"normalize-selector": "^0.2.0",
- "postcss": "^7.0.32",
+ "postcss": "^7.0.35",
"postcss-html": "^0.36.0",
"postcss-less": "^3.1.4",
"postcss-media-query-parser": "^0.2.3",
"postcss-safe-parser": "^4.0.2",
"postcss-sass": "^0.4.4",
"postcss-scss": "^2.1.1",
- "postcss-selector-parser": "^6.0.2",
+ "postcss-selector-parser": "^6.0.5",
"postcss-syntax": "^0.36.2",
"postcss-value-parser": "^4.1.0",
"resolve-from": "^5.0.0",
"slash": "^3.0.0",
"specificity": "^0.4.1",
- "string-width": "^4.2.0",
+ "string-width": "^4.2.2",
"strip-ansi": "^6.0.0",
"style-search": "^0.1.0",
"sugarss": "^2.0.0",
"svg-tags": "^1.0.0",
- "table": "^6.0.1",
- "v8-compile-cache": "^2.1.1",
+ "table": "^6.6.0",
+ "v8-compile-cache": "^2.3.0",
"write-file-atomic": "^3.0.3"
},
"dependencies": {
"color-convert": "^2.0.1"
}
},
+ "balanced-match": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz",
+ "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==",
+ "dev": true
+ },
"chalk": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
- "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+ "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"dev": true
},
"import-fresh": {
- "version": "3.2.1",
- "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz",
- "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==",
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
+ "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
"dev": true,
"requires": {
"parent-module": "^1.0.0",
}
},
"parse-json": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.1.0.tgz",
- "integrity": "sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==",
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
+ "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
"lines-and-columns": "^1.1.6"
}
},
+ "postcss": {
+ "version": "7.0.35",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz",
+ "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==",
+ "dev": true,
+ "requires": {
+ "chalk": "^2.4.2",
+ "source-map": "^0.6.1",
+ "supports-color": "^6.1.0"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ },
+ "dependencies": {
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ }
+ }
+ },
+ "color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "dev": true,
+ "requires": {
+ "color-name": "1.1.3"
+ }
+ },
+ "color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+ "dev": true
+ },
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
+ "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ }
+ }
+ },
"resolve-from": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
"integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
"dev": true
},
+ "source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true
+ },
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
}
}
},
+ "file-entry-cache": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz",
+ "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==",
+ "dev": true,
+ "requires": {
+ "flat-cache": "^2.0.1"
+ }
+ },
"fill-range": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
"locate-path": "^2.0.0"
}
},
+ "flat-cache": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz",
+ "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==",
+ "dev": true,
+ "requires": {
+ "flatted": "^2.0.0",
+ "rimraf": "2.6.3",
+ "write": "1.0.3"
+ }
+ },
+ "flatted": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz",
+ "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==",
+ "dev": true
+ },
"get-stdin": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-7.0.0.tgz",
"dev": true
},
"glob": {
- "version": "7.1.6",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
- "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+ "version": "7.1.7",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz",
+ "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
"integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
"dev": true
},
+ "rimraf": {
+ "version": "2.6.3",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",
+ "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
+ "dev": true,
+ "requires": {
+ "glob": "^7.1.3"
+ }
+ },
"slice-ansi": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz",
}
},
"stylelint-scss": {
- "version": "3.18.0",
- "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-3.18.0.tgz",
- "integrity": "sha512-LD7+hv/6/ApNGt7+nR/50ft7cezKP2HM5rI8avIdGaUWre3xlHfV4jKO/DRZhscfuN+Ewy9FMhcTq0CcS0C/SA==",
+ "version": "3.19.0",
+ "resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-3.19.0.tgz",
+ "integrity": "sha512-Ic5bsmpS4wVucOw44doC1Yi9f5qbeVL4wPFiEOaUElgsOuLEN6Ofn/krKI8BeNL2gAn53Zu+IcVV4E345r6rBw==",
"dev": true,
"requires": {
"lodash": "^4.17.15",
}
},
"glob": {
- "version": "7.1.6",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
- "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+ "version": "7.1.7",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz",
+ "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
}
},
"supports-hyperlinks": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.1.0.tgz",
- "integrity": "sha512-zoE5/e+dnEijk6ASB6/qrK+oYdm2do1hjoLWrqUC/8WEIW1gbxFcKuBof7sW8ArN6e+AYvsE8HBGiVRWL/F5CA==",
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz",
+ "integrity": "sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==",
"dev": true,
"requires": {
"has-flag": "^4.0.0",
"dev": true
},
"table": {
- "version": "6.0.3",
- "resolved": "https://registry.npmjs.org/table/-/table-6.0.3.tgz",
- "integrity": "sha512-8321ZMcf1B9HvVX/btKv8mMZahCjn2aYrDlpqHaBFCfnox64edeH9kEid0vTLTRR8gWR2A20aDgeuTTea4sVtw==",
+ "version": "6.7.0",
+ "resolved": "https://registry.npmjs.org/table/-/table-6.7.0.tgz",
+ "integrity": "sha512-SAM+5p6V99gYiiy2gT5ArdzgM1dLDed0nkrWmG6Fry/bUS/m9x83BwpJUOf1Qj/x2qJd+thL6IkIx7qPGRxqBw==",
"dev": true,
"requires": {
- "ajv": "^6.12.4",
- "lodash": "^4.17.20",
+ "ajv": "^8.0.1",
+ "lodash.clonedeep": "^4.5.0",
+ "lodash.truncate": "^4.4.2",
"slice-ansi": "^4.0.0",
- "string-width": "^4.2.0"
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.0"
},
"dependencies": {
+ "ajv": {
+ "version": "8.3.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.3.0.tgz",
+ "integrity": "sha512-RYE7B5An83d7eWnDR8kbdaIFqmKCNsP16ay1hDbJEU+sa0e3H9SebskCt0Uufem6cfAVu7Col6ubcn/W+Sm8/Q==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.1",
+ "json-schema-traverse": "^1.0.0",
+ "require-from-string": "^2.0.2",
+ "uri-js": "^4.2.2"
+ }
+ },
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
+ "json-schema-traverse": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
+ "dev": true
+ },
"slice-ansi": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz",
"dev": true
},
"tar": {
- "version": "6.0.5",
- "resolved": "https://registry.npmjs.org/tar/-/tar-6.0.5.tgz",
- "integrity": "sha512-0b4HOimQHj9nXNEAA7zWwMM91Zhhba3pspja6sQbgTpynOJf+bkjBnfybNYzbpLbnwXnbyB4LOREvlyXLkCHSg==",
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.0.tgz",
+ "integrity": "sha512-DUCttfhsnLCjwoDoFcI+B2iJgYa93vBnDUATYEeRx6sntCTdN01VnqsIuTlALXla/LWooNg0yEGeB+Y8WdFxGA==",
"dev": true,
"requires": {
"chownr": "^2.0.0",
},
"dependencies": {
"p-limit": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.0.2.tgz",
- "integrity": "sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg==",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
"dev": true,
"requires": {
- "p-try": "^2.0.0"
+ "yocto-queue": "^0.1.0"
}
},
"source-map": {
},
"dependencies": {
"glob": {
- "version": "7.1.6",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
- "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+ "version": "7.1.7",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz",
+ "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
"dev": true
},
"timers-browserify": {
- "version": "2.0.11",
- "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.11.tgz",
- "integrity": "sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ==",
+ "version": "2.0.12",
+ "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz",
+ "integrity": "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==",
"dev": true,
"requires": {
"setimmediate": "^1.0.4"
"dev": true
},
"trim-trailing-lines": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.3.tgz",
- "integrity": "sha512-4ku0mmjXifQcTVfYDfR5lpgV7zVqPg6zV9rdZmwOPqq0+Zq19xDqEgagqVbc4pOOShbncuAOIs59R3+3gcF3ZA==",
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.4.tgz",
+ "integrity": "sha512-rjUWSqnfTNrjbB9NQWfPMH/xRK1deHeGsHoVfpxJ++XeYXE0d6B1En37AHfw3jtfTU7dzMzZL2jjpe8Qb5gLIQ==",
"dev": true
},
"trough": {
"dev": true
},
"ts-jest": {
- "version": "26.4.1",
- "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-26.4.1.tgz",
- "integrity": "sha512-F4aFq01aS6mnAAa0DljNmKr/Kk9y4HVZ1m6/rtJ0ED56cuxINGq3Q9eVAh+z5vcYKe5qnTMvv90vE8vUMFxomg==",
+ "version": "26.5.6",
+ "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-26.5.6.tgz",
+ "integrity": "sha512-rua+rCP8DxpA8b4DQD/6X2HQS8Zy/xzViVYfEs2OQu68tkCuKLV0Md8pmX55+W24uRIyAsf/BajRfxOs+R2MKA==",
"dev": true,
"requires": {
- "@types/jest": "26.x",
"bs-logger": "0.x",
"buffer-from": "1.x",
"fast-json-stable-stringify": "2.x",
"jest-util": "^26.1.0",
"json5": "2.x",
- "lodash.memoize": "4.x",
+ "lodash": "4.x",
"make-error": "1.x",
"mkdirp": "1.x",
"semver": "7.x",
"dev": true
},
"semver": {
- "version": "7.3.2",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
- "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
- "dev": true
+ "version": "7.3.5",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
+ "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ }
},
"yargs-parser": {
- "version": "20.2.3",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.3.tgz",
- "integrity": "sha512-emOFRT9WVHw03QSvN5qor9QQT9+sw5vwxfYweivSMHTcAXPefwVae2FjO7JJjj8hCE4CzPOPeFM83VwT29HCww==",
+ "version": "20.2.7",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.7.tgz",
+ "integrity": "sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw==",
"dev": true
}
}
"dev": true
},
"type-fest": {
- "version": "0.11.0",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz",
- "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==",
+ "version": "0.21.3",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz",
+ "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==",
"dev": true
},
"type-is": {
"dev": true
},
"uglify-js": {
- "version": "3.11.3",
- "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.11.3.tgz",
- "integrity": "sha512-wDRziHG94mNj2n3R864CvYw/+pc9y/RNImiTyrrf8BzgWn75JgFSwYvXrtZQMnMnOp/4UTrf3iCSQxSStPiByA==",
+ "version": "3.13.6",
+ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.6.tgz",
+ "integrity": "sha512-rRprLwl8RVaS+Qvx3Wh5hPfPBn9++G6xkGlUupya0s5aDmNjI7z3lnRLB3u7sN4OmbB0pWgzhM9BEJyiWAwtAA==",
"dev": true,
"optional": true
},
+ "unbox-primitive": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz",
+ "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==",
+ "dev": true,
+ "requires": {
+ "function-bind": "^1.1.1",
+ "has-bigints": "^1.0.1",
+ "has-symbols": "^1.0.2",
+ "which-boxed-primitive": "^1.0.2"
+ }
+ },
"unc-path-regex": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz",
}
},
"unified": {
- "version": "9.2.0",
- "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.0.tgz",
- "integrity": "sha512-vx2Z0vY+a3YoTj8+pttM3tiJHCwY5UFbYdiWrwBEbHmK8pvsPj2rtAX2BFfgXen8T39CJWblWRDT4L5WGXtDdg==",
+ "version": "9.2.1",
+ "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.1.tgz",
+ "integrity": "sha512-juWjuI8Z4xFg8pJbnEZ41b5xjGUWGHqXALmBZ3FC3WX0PIx1CZBIIJ6mXbYMcf6Yw4Fi0rFUTA1cdz/BglbOhA==",
"dev": true,
"requires": {
"bail": "^1.0.0",
},
"dependencies": {
"is-buffer": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz",
- "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==",
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz",
+ "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==",
"dev": true
},
"is-plain-obj": {
}
},
"unist-util-find-all-after": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/unist-util-find-all-after/-/unist-util-find-all-after-3.0.1.tgz",
- "integrity": "sha512-0GICgc++sRJesLwEYDjFVJPJttBpVQaTNgc6Jw0Jhzvfs+jtKePEMu+uD+PqkRUrAvGQqwhpDwLGWo1PK8PDEw==",
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/unist-util-find-all-after/-/unist-util-find-all-after-3.0.2.tgz",
+ "integrity": "sha512-xaTC/AGZ0rIM2gM28YVRAFPIZpzbpDtU3dRmp7EXlNVA8ziQc4hY3H7BHXM1J49nEmiqc3svnqMReW+PGqbZKQ==",
"dev": true,
"requires": {
"unist-util-is": "^4.0.0"
}
},
"unist-util-is": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.2.tgz",
- "integrity": "sha512-Ofx8uf6haexJwI1gxWMGg6I/dLnF2yE+KibhD3/diOqY2TinLcqHXCV6OI5gFVn3xQqDH+u0M625pfKwIwgBKQ==",
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.1.0.tgz",
+ "integrity": "sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==",
"dev": true
},
"unist-util-remove-position": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-2.0.1.tgz",
- "integrity": "sha512-fDZsLYIe2uT+oGFnuZmy73K6ZxOPG/Qcm+w7jbEjaFcJgbQ6cqjs/eSPzXhsmGpAsWPkqZM9pYjww5QTn3LHMA==",
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-1.1.4.tgz",
+ "integrity": "sha512-tLqd653ArxJIPnKII6LMZwH+mb5q+n/GtXQZo6S6csPRs5zB0u79Yw8ouR3wTw8wxvdJFhpP6Y7jorWdCgLO0A==",
"dev": true,
"requires": {
- "unist-util-visit": "^2.0.0"
+ "unist-util-visit": "^1.1.0"
}
},
"unist-util-stringify-position": {
}
},
"unist-util-visit": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.3.tgz",
- "integrity": "sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q==",
+ "version": "1.4.1",
+ "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-1.4.1.tgz",
+ "integrity": "sha512-AvGNk7Bb//EmJZyhtRUnNMEpId/AZ5Ph/KUpTI09WHQuDZHKovQ1oEv3mfmKpWKtoMzyMC4GLBm1Zy5k12fjIw==",
"dev": true,
"requires": {
- "@types/unist": "^2.0.0",
- "unist-util-is": "^4.0.0",
- "unist-util-visit-parents": "^3.0.0"
+ "unist-util-visit-parents": "^2.0.0"
}
},
"unist-util-visit-parents": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.1.0.tgz",
- "integrity": "sha512-0g4wbluTF93npyPrp/ymd3tCDTMnP0yo2akFD2FIBAYXq/Sga3lwaU1D8OYKbtpioaI6CkDcQ6fsMnmtzt7htw==",
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-2.1.2.tgz",
+ "integrity": "sha512-DyN5vD4NE3aSeB+PXYNKxzGsfocxp6asDc2XXE3b0ekO2BaRUpBicbbUygfSvYfUz1IkmjFR1YF7dPklraMZ2g==",
"dev": true,
"requires": {
- "@types/unist": "^2.0.0",
- "unist-util-is": "^4.0.0"
+ "unist-util-is": "^3.0.0"
+ },
+ "dependencies": {
+ "unist-util-is": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-3.0.0.tgz",
+ "integrity": "sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A==",
+ "dev": true
+ }
}
},
"universal-analytics": {
"dev": true
},
"uri-js": {
- "version": "4.4.0",
- "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.0.tgz",
- "integrity": "sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==",
+ "version": "4.4.1",
+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
+ "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
"dev": true,
"requires": {
"punycode": "^2.1.0"
}
},
"url-parse": {
- "version": "1.4.7",
- "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.7.tgz",
- "integrity": "sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg==",
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.1.tgz",
+ "integrity": "sha512-HOfCOUJt7iSYzEx/UqgtwKRMC6EU91NFhsCHMv9oM03VJcVo2Qrp8T8kI9D7amFf1cu+/3CEhgb3rF9zL7k85Q==",
"dev": true,
"requires": {
"querystringify": "^2.1.1",
"dev": true
},
"util": {
- "version": "0.10.3",
- "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
- "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
+ "version": "0.11.1",
+ "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz",
+ "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==",
"dev": true,
"requires": {
- "inherits": "2.0.1"
+ "inherits": "2.0.3"
},
"dependencies": {
"inherits": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
- "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=",
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
"dev": true
}
}
"es-abstract": "^1.17.2",
"has-symbols": "^1.0.1",
"object.getownpropertydescriptors": "^2.1.0"
- },
- "dependencies": {
- "es-abstract": {
- "version": "1.17.7",
- "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz",
- "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==",
- "dev": true,
- "requires": {
- "es-to-primitive": "^1.2.1",
- "function-bind": "^1.1.1",
- "has": "^1.0.3",
- "has-symbols": "^1.0.1",
- "is-callable": "^1.2.2",
- "is-regex": "^1.1.1",
- "object-inspect": "^1.8.0",
- "object-keys": "^1.1.1",
- "object.assign": "^4.1.1",
- "string.prototype.trimend": "^1.0.1",
- "string.prototype.trimstart": "^1.0.1"
- }
- }
}
},
"utils-merge": {
"dev": true
},
"v8-compile-cache": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz",
- "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==",
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz",
+ "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==",
"dev": true
},
"v8-to-istanbul": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-6.0.1.tgz",
- "integrity": "sha512-PzM1WlqquhBvsV+Gco6WSFeg1AGdD53ccMRkFeyHRE/KRZaVacPOmQYP3EeVgDBtKD2BJ8kgynBQ5OtKiHCH+w==",
+ "version": "7.1.2",
+ "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-7.1.2.tgz",
+ "integrity": "sha512-TxNb7YEUwkLXCQYeudi6lgQ/SZrzNO4kMdlqVxaZPUIUjCv6iSSypUQX70kNBSERpQ8fk48+d61FXk+tgqcWow==",
"dev": true,
"requires": {
"@types/istanbul-lib-coverage": "^2.0.1",
}
},
"vfile": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.0.tgz",
- "integrity": "sha512-a/alcwCvtuc8OX92rqqo7PflxiCgXRFjdyoGVuYV+qbgCb0GgZJRvIgCD4+U/Kl1yhaRsaTwksF88xbPyGsgpw==",
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz",
+ "integrity": "sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==",
"dev": true,
"requires": {
"@types/unist": "^2.0.0",
"is-buffer": "^2.0.0",
- "replace-ext": "1.0.0",
"unist-util-stringify-position": "^2.0.0",
"vfile-message": "^2.0.0"
},
"dependencies": {
"is-buffer": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz",
- "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==",
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz",
+ "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==",
"dev": true
}
}
},
"vfile-location": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-3.1.0.tgz",
- "integrity": "sha512-FCZ4AN9xMcjFIG1oGmZKo61PjwJHRVA+0/tPUP2ul4uIwjGGndIxavEMRpWn5p4xwm/ZsdXp9YNygf1ZyE4x8g==",
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/vfile-location/-/vfile-location-2.0.6.tgz",
+ "integrity": "sha512-sSFdyCP3G6Ka0CEmN83A2YCMKIieHx0EDaj5IDP4g1pa5ZJ4FJDvpO0WODLxo4LUX4oe52gmSCK7Jw4SBghqxA==",
"dev": true
},
"vfile-message": {
}
},
"wait-on": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-5.2.0.tgz",
- "integrity": "sha512-U1D9PBgGw2XFc6iZqn45VBubw02VsLwnZWteQ1au4hUVHasTZuFSKRzlTB2dqgLhji16YVI8fgpEpwUdCr8B6g==",
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-5.3.0.tgz",
+ "integrity": "sha512-DwrHrnTK+/0QFaB9a8Ol5Lna3k7WvUR4jzSKmz0YaPBpuN2sACyiPVKVfj6ejnjcajAcvn3wlbTyMIn9AZouOg==",
"dev": true,
"requires": {
- "axios": "^0.19.2",
- "joi": "^17.1.1",
- "lodash": "^4.17.19",
+ "axios": "^0.21.1",
+ "joi": "^17.3.0",
+ "lodash": "^4.17.21",
"minimist": "^1.2.5",
- "rxjs": "^6.5.5"
+ "rxjs": "^6.6.3"
}
},
"walker": {
}
},
"watchpack": {
- "version": "1.7.4",
- "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.4.tgz",
- "integrity": "sha512-aWAgTW4MoSJzZPAicljkO1hsi1oKj/RRq/OJQh2PKI2UKL04c2Bs+MBOB+BBABHTXJpf9mCwHN7ANCvYsvY2sg==",
+ "version": "1.7.5",
+ "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.5.tgz",
+ "integrity": "sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ==",
"dev": true,
"requires": {
"chokidar": "^3.4.1",
"graceful-fs": "^4.1.2",
"neo-async": "^2.5.0",
- "watchpack-chokidar2": "^2.0.0"
+ "watchpack-chokidar2": "^2.0.1"
}
},
"watchpack-chokidar2": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/watchpack-chokidar2/-/watchpack-chokidar2-2.0.0.tgz",
- "integrity": "sha512-9TyfOyN/zLUbA288wZ8IsMZ+6cbzvsNyEzSBp6e/zkifi6xxbl8SmQ/CxQq32k8NNqrdVEVUVSEf56L4rQ/ZxA==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/watchpack-chokidar2/-/watchpack-chokidar2-2.0.1.tgz",
+ "integrity": "sha512-nCFfBIPKr5Sh61s4LPpy1Wtfi0HE8isJ3d2Yb5/Ppw2P2B/3eVSEBjKfN0fmHJSK14+31KwMKmcrzs2GM4P0Ww==",
"dev": true,
"optional": true,
"requires": {
}
},
"glob": {
- "version": "7.1.6",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
- "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+ "version": "7.1.7",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz",
+ "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
"dev": true
},
"ssri": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz",
- "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==",
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.2.tgz",
+ "integrity": "sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==",
"dev": true,
"requires": {
"figgy-pudding": "^3.5.1"
}
},
"mime": {
- "version": "2.4.6",
- "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.6.tgz",
- "integrity": "sha512-RZKhC3EmpBchfTGBVb8fb+RL2cWyw/32lshnsETttkBAyAUXSGHxbEJWWRXc751DrIxG1q04b8QwMbAwkRPpUA==",
+ "version": "2.5.2",
+ "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz",
+ "integrity": "sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg==",
"dev": true
}
}
"dev": true
},
"whatwg-url": {
- "version": "8.4.0",
- "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.4.0.tgz",
- "integrity": "sha512-vwTUFf6V4zhcPkWp/4CQPr1TW9Ml6SF4lVyaIMBdJw5i6qUUJ1QWM4Z6YYVkfka0OUIzVo/0aNtGVGk256IKWw==",
+ "version": "8.5.0",
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.5.0.tgz",
+ "integrity": "sha512-fy+R77xWv0AiqfLl4nuGUlQ3/6b5uNfQ4WAbGQVMYshCTCCPK9psC1nWh3XHuxGVCtlcDDQPQW1csmmIQo+fwg==",
"dev": true,
"requires": {
- "lodash.sortby": "^4.7.0",
+ "lodash": "^4.7.0",
"tr46": "^2.0.2",
"webidl-conversions": "^6.1.0"
}
"isexe": "^2.0.0"
}
},
+ "which-boxed-primitive": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz",
+ "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==",
+ "dev": true,
+ "requires": {
+ "is-bigint": "^1.0.1",
+ "is-boolean-object": "^1.1.0",
+ "is-number-object": "^1.0.4",
+ "is-string": "^1.0.5",
+ "is-symbol": "^1.0.3"
+ }
+ },
"which-module": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
"dev": true
},
"y18n": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
- "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w=="
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz",
+ "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ=="
},
"yallist": {
"version": "4.0.0",
"dev": true
},
"yaml": {
- "version": "1.10.0",
- "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.0.tgz",
- "integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==",
+ "version": "1.10.2",
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
+ "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==",
"dev": true
},
"yargs": {
"integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==",
"dev": true
},
+ "yocto-queue": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
+ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
+ "dev": true
+ },
"zone.js": {
"version": "0.10.3",
"resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.10.3.tgz",
"integrity": "sha512-LXVLVEq0NNOqK/fLJo3d0kfzd4sxwn2/h67/02pjCjfKDxgx1i9QqpvtHD8CrBnSSwMw5+dy11O7FRX5mkO7Cg=="
+ },
+ "zwitch": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz",
+ "integrity": "sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==",
+ "dev": true
}
}
}
\ No newline at end of file
"postbuild:localize": "node cd --res",
"env_build": "node cd --env",
"i18n": "npm run i18n:extract && npm run i18n:push && npm run i18n:pull && npm run i18n:merge",
- "i18n:extract": "ng xi18n --output-path src/locale --ivy",
+ "i18n:extract": "ng xi18n --output-path src/locale --ivy --progress=false",
"i18n:push": "npx i18ntool push -c i18n.config.json",
"i18n:pull": "npx i18ntool pull -c i18n.config.json",
"i18n:merge": "npx i18ntool merge -c i18n.config.json",
"@types/file-saver": "2.0.1",
"async-mutex": "0.2.4",
"bootstrap": "4.5.2",
- "chart.js": "2.8.0",
+ "chart.js": "2.9.4",
"detect-browser": "5.2.0",
"file-saver": "2.0.2",
"fork-awesome": "1.1.7",
- "lodash": "4.17.20",
+ "lodash": "4.17.21",
"moment": "2.29.1",
"ng-block-ui": "3.0.2",
"ng-click-outside": "7.0.0",
- "ng2-charts": "2.3.0",
+ "ng2-charts": "2.4.2",
"ngx-pipe-function": "^1.0.0",
"ngx-toastr": "13.1.0",
"rxjs": "6.6.3",
"zone.js": "0.10.3"
},
"devDependencies": {
- "@angular-devkit/build-angular": "0.1001.6",
+ "@angular-devkit/build-angular": "0.1002.3",
"@angular/cli": "10.1.6",
"@angular/compiler-cli": "10.1.5",
"@angular/language-service": "10.1.5",
"@types/node": "12.12.62",
"@types/simplebar": "5.1.1",
"codelyzer": "6.0.1",
- "css-loader": "3.6.0",
"cypress": "5.3.0",
"cypress-multi-reporters": "1.4.0",
"html-linter": "1.1.1",
"npm-run-all": "4.1.5",
"prettier": "2.1.2",
"pretty-quick": "3.0.2",
- "start-server-and-test": "1.11.5",
- "stylelint": "13.7.2",
+ "start-server-and-test": "1.12.1",
+ "stylelint": "13.13.1",
"stylelint-config-sass-guidelines": "7.1.0",
"stylelint-declaration-use-variable": "1.7.2",
"transifex-i18ntool": "1.1.0",
"typescript": "3.9.6"
},
"resolutions": {
- "fsevents": "2.1.3",
- "css-loader": "3.6.0"
+ "fsevents": "2.1.3"
}
}
data: { breadcrumbs: true, text: 'Block', path: null },
loadChildren: () => import('./ceph/block/block.module').then((m) => m.RoutedBlockModule)
},
- // Filesystems
+ // File Systems
{
path: 'cephfs',
component: CephfsListComponent,
canActivate: [FeatureTogglesGuardService],
- data: { breadcrumbs: 'Filesystems' }
+ data: { breadcrumbs: 'File Systems' }
},
// Object Gateway
{
+import { APP_BASE_HREF } from '@angular/common';
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { ErrorHandler, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
provide: HTTP_INTERCEPTORS,
useClass: ApiInterceptorService,
multi: true
+ },
+ {
+ provide: APP_BASE_HREF,
+ useValue: '/' + (window.location.pathname.split('/', 1)[1] || '')
}
],
bootstrap: [AppComponent]
<ng-container i18n>Only available for RBD images with <strong>fast-diff</strong> enabled</ng-container>
</ng-template>
-<ng-container *ngIf="selection">
+<ng-container *ngIf="selection && selection.source !== 'REMOVING'">
<ul ngbNav
#nav="ngbNav"
class="nav-tabs"
<div [ngbNavOutlet]="nav"></div>
</ng-container>
+<ng-container *ngIf="selection && selection.source === 'REMOVING'">
+ <cd-alert-panel type="warning"
+ i18n>Information can not be displayed for RBD in status 'Removing'.</cd-alert-panel>
+</ng-container>
<ng-template #poolConfigurationSourceTpl
let-row="row"
/* Configuration */
configuration: RbdConfigurationEntry[];
+
+ /* Deletion process */
+ source?: string;
}
</ng-container>
</div>
</ng-template>
+
+<ng-template #removingStatTpl
+ let-column="column"
+ let-value="value"
+ let-row="row">
+
+ <i [ngClass]="[icons.spinner, icons.spin]"
+ *ngIf="row.cdExecuting"></i>
+ <span [ngClass]="column?.customTemplateConfig?.valueClass">
+ {{ value }}
+ </span>
+ <span *ngIf="row.cdExecuting"
+ [ngClass]="column?.customTemplateConfig?.executingClass ?
+ column.customTemplateConfig.executingClass :
+ 'text-muted italic'">
+ ({{ row.cdExecuting }})
+ </span>
+ <i *ngIf="row.source && row.source === 'REMOVING'"
+ i18n-title
+ title="RBD in status 'Removing'"
+ class="{{ icons.warning }} warn"></i>
+</ng-template>
+@use './src/styles/vendor/variables' as vv;
+
+.warn {
+ color: vv.$warning;
+}
const getActionDisable = (name: string) =>
component.tableActions.find((o) => o.name === name).disable;
- const testActions = (selection: any, expected: string | boolean) => {
- expect(getActionDisable('Edit')(selection)).toBe(expected);
- expect(getActionDisable('Delete')(selection)).toBe(expected);
- expect(getActionDisable('Copy')(selection)).toBe(expected);
+ const testActions = (selection: any, expected: { [action: string]: string | boolean }) => {
+ expect(getActionDisable('Edit')(selection)).toBe(expected.edit || false);
+ expect(getActionDisable('Delete')(selection)).toBe(expected.delete || false);
+ expect(getActionDisable('Copy')(selection)).toBe(expected.copy || false);
expect(getActionDisable('Flatten')(selection)).toBeTruthy();
- expect(getActionDisable('Move to Trash')(selection)).toBe(expected);
+ expect(getActionDisable('Move to Trash')(selection)).toBe(expected.moveTrash || false);
};
it('should test TableActions with valid/invalid image name', () => {
snapshots: []
}
];
- testActions(component.selection, false);
+ testActions(component.selection, {});
component.selection.selected = [
{
snapshots: []
}
];
- testActions(
- component.selection,
- `This RBD image has an invalid name and can't be managed by ceph.`
- );
+ const message = `This RBD image has an invalid name and can't be managed by ceph.`;
+ const expected = {
+ edit: message,
+ delete: message,
+ copy: message,
+ moveTrash: message
+ };
+ testActions(component.selection, expected);
+ });
+
+ it('should disable edit, copy, flatten and move action if RBD is in status `Removing`', () => {
+ component.selection.selected = [
+ {
+ name: 'foobar',
+ pool_name: 'rbd',
+ snapshots: [],
+ source: 'REMOVING'
+ }
+ ];
+
+ const message = `Action not possible for an RBD in status 'Removing'`;
+ const expected = {
+ edit: message,
+ copy: message,
+ moveTrash: message
+ };
+ testActions(component.selection, expected);
});
});
import { CriticalConfirmationModalComponent } from '~/app/shared/components/critical-confirmation-modal/critical-confirmation-modal.component';
import { ActionLabelsI18n } from '~/app/shared/constants/app.constants';
import { TableComponent } from '~/app/shared/datatable/table/table.component';
-import { CellTemplate } from '~/app/shared/enum/cell-template.enum';
import { Icons } from '~/app/shared/enum/icons.enum';
import { ViewCacheStatus } from '~/app/shared/enum/view-cache-status.enum';
import { CdTableAction } from '~/app/shared/models/cd-table-action';
flattenTpl: TemplateRef<any>;
@ViewChild('deleteTpl', { static: true })
deleteTpl: TemplateRef<any>;
+ @ViewChild('removingStatTpl', { static: true })
+ removingStatTpl: TemplateRef<any>;
permission: Permission;
tableActions: CdTableAction[];
retries: number;
tableStatus = new TableStatusViewCache();
selection = new CdTableSelection();
+ icons = Icons;
modalRef: NgbModalRef;
icon: Icons.edit,
routerLink: () => this.urlBuilder.getEdit(getImageUri()),
name: this.actionLabels.EDIT,
- disable: this.getInvalidNameDisable
+ disable: (selection: CdTableSelection) =>
+ this.getRemovingStatusDesc(selection) || this.getInvalidNameDisable(selection)
};
const deleteAction: CdTableAction = {
permission: 'delete',
permission: 'create',
canBePrimary: (selection: CdTableSelection) => selection.hasSingleSelection,
disable: (selection: CdTableSelection) =>
- this.getInvalidNameDisable(selection) || !!selection.first().cdExecuting,
+ this.getRemovingStatusDesc(selection) ||
+ this.getInvalidNameDisable(selection) ||
+ !!selection.first().cdExecuting,
icon: Icons.copy,
routerLink: () => `/block/rbd/copy/${getImageUri()}`,
name: this.actionLabels.COPY
const flattenAction: CdTableAction = {
permission: 'update',
disable: (selection: CdTableSelection) =>
+ this.getRemovingStatusDesc(selection) ||
this.getInvalidNameDisable(selection) ||
selection.first().cdExecuting ||
!selection.first().parent,
click: () => this.trashRbdModal(),
name: this.actionLabels.TRASH,
disable: (selection: CdTableSelection) =>
+ this.getRemovingStatusDesc(selection) ||
this.getInvalidNameDisable(selection) ||
selection.first().image_format === RBDImageFormat.V1
};
name: $localize`Name`,
prop: 'name',
flexGrow: 2,
- cellTransformation: CellTemplate.executing
+ cellTemplate: this.removingStatTpl
},
{
name: $localize`Pool`,
return !selection.first() || !selection.hasSingleSelection;
}
+
+ getRemovingStatusDesc(selection: CdTableSelection): string | boolean {
+ const first = selection.first();
+ if (first?.source === 'REMOVING') {
+ return $localize`Action not possible for an RBD in status 'Removing'`;
+ }
+ return false;
+ }
}
import { HttpClientTestingModule } from '@angular/common/http/testing';
-import { DebugElement, Type } from '@angular/core';
-import { ComponentFixture, TestBed } from '@angular/core/testing';
+import { DebugElement } from '@angular/core';
+import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
import { TreeModule } from '@circlon/angular-tree-component';
import { of } from 'rxjs';
-import { HealthService } from '~/app/shared/api/health.service';
+import { CrushRuleService } from '~/app/shared/api/crush-rule.service';
import { SharedModule } from '~/app/shared/shared.module';
import { configureTestBed } from '~/testing/unit-test-helper';
import { CrushmapComponent } from './crushmap.component';
let component: CrushmapComponent;
let fixture: ComponentFixture<CrushmapComponent>;
let debugElement: DebugElement;
+ let crushRuleService: CrushRuleService;
+ let crushRuleServiceInfoSpy: jasmine.Spy;
configureTestBed({
imports: [HttpClientTestingModule, TreeModule, SharedModule],
- declarations: [CrushmapComponent],
- providers: [HealthService]
+ declarations: [CrushmapComponent]
});
beforeEach(() => {
fixture = TestBed.createComponent(CrushmapComponent);
component = fixture.componentInstance;
debugElement = fixture.debugElement;
+ crushRuleService = TestBed.inject(CrushRuleService);
+ crushRuleServiceInfoSpy = spyOn(crushRuleService, 'getInfo');
});
it('should create', () => {
});
it('should display right title', () => {
- fixture.detectChanges();
const span = debugElement.nativeElement.querySelector('.card-header');
expect(span.textContent).toBe('CRUSH map viewer');
});
- describe('test tree', () => {
- let healthService: HealthService;
- const prepareGetHealth = (nodes: object[]) => {
- spyOn(healthService, 'getFullHealth').and.returnValue(
- of({ osd_map: { tree: { nodes: nodes } } })
- );
- fixture.detectChanges();
- };
-
- beforeEach(() => {
- healthService = debugElement.injector.get(HealthService as Type<HealthService>);
- });
-
- it('should display "No nodes!" if ceph tree nodes is empty array', () => {
- prepareGetHealth([]);
- expect(healthService.getFullHealth).toHaveBeenCalled();
- expect(component.nodes[0].name).toEqual('No nodes!');
- });
+ it('should display "No nodes!" if ceph tree nodes is empty array', fakeAsync(() => {
+ crushRuleServiceInfoSpy.and.returnValue(of({ nodes: [] }));
+ fixture.detectChanges();
+ tick(5000);
+ expect(crushRuleService.getInfo).toHaveBeenCalled();
+ expect(component.nodes[0].name).toEqual('No nodes!');
+ component.ngOnDestroy();
+ }));
- describe('nodes not empty', () => {
- beforeEach(() => {
- prepareGetHealth([
+ it('should have two root nodes', fakeAsync(() => {
+ crushRuleServiceInfoSpy.and.returnValue(
+ of({
+ nodes: [
{ children: [-2], type: 'root', name: 'default', id: -1 },
{ children: [1, 0, 2], type: 'host', name: 'my-host', id: -2 },
{ status: 'up', type: 'osd', name: 'osd.0', id: 0 },
{ status: 'down', type: 'osd', name: 'osd.1', id: 1 },
{ status: 'up', type: 'osd', name: 'osd.2', id: 2 },
- { children: [-4], type: 'root', name: 'default-2', id: -3 },
+ { children: [-4], type: 'datacenter', name: 'site1', id: -3 },
{ children: [4], type: 'host', name: 'my-host-2', id: -4 },
{ status: 'up', type: 'osd', name: 'osd.0-2', id: 4 }
- ]);
- });
-
- it('should have two root nodes', () => {
- expect(component.nodes).toEqual([
+ ],
+ roots: [-1, -3, -6]
+ })
+ );
+ fixture.detectChanges();
+ tick(10000);
+ expect(crushRuleService.getInfo).toHaveBeenCalled();
+ expect(component.nodes).toEqual([
+ {
+ cdId: -3,
+ children: [
{
- cdId: -3,
children: [
{
- children: [
- {
- id: component.nodes[0].children[0].children[0].id,
- cdId: 4,
- status: 'up',
- type: 'osd',
- name: 'osd.0-2 (osd)'
- }
- ],
- id: component.nodes[0].children[0].id,
- cdId: -4,
- status: undefined,
- type: 'host',
- name: 'my-host-2 (host)'
+ id: component.nodes[0].children[0].children[0].id,
+ cdId: 4,
+ status: 'up',
+ type: 'osd',
+ name: 'osd.0-2 (osd)'
}
],
- id: component.nodes[0].id,
+ id: component.nodes[0].children[0].id,
+ cdId: -4,
status: undefined,
- type: 'root',
- name: 'default-2 (root)'
- },
+ type: 'host',
+ name: 'my-host-2 (host)'
+ }
+ ],
+ id: component.nodes[0].id,
+ status: undefined,
+ type: 'datacenter',
+ name: 'site1 (datacenter)'
+ },
+ {
+ children: [
{
children: [
{
- children: [
- {
- id: component.nodes[1].children[0].children[0].id,
- cdId: 0,
- status: 'up',
- type: 'osd',
- name: 'osd.0 (osd)'
- },
- {
- id: component.nodes[1].children[0].children[1].id,
- cdId: 1,
- status: 'down',
- type: 'osd',
- name: 'osd.1 (osd)'
- },
- {
- id: component.nodes[1].children[0].children[2].id,
- cdId: 2,
- status: 'up',
- type: 'osd',
- name: 'osd.2 (osd)'
- }
- ],
- id: component.nodes[1].children[0].id,
- cdId: -2,
- status: undefined,
- type: 'host',
- name: 'my-host (host)'
+ id: component.nodes[1].children[0].children[0].id,
+ cdId: 0,
+ status: 'up',
+ type: 'osd',
+ name: 'osd.0 (osd)'
+ },
+ {
+ id: component.nodes[1].children[0].children[1].id,
+ cdId: 1,
+ status: 'down',
+ type: 'osd',
+ name: 'osd.1 (osd)'
+ },
+ {
+ id: component.nodes[1].children[0].children[2].id,
+ cdId: 2,
+ status: 'up',
+ type: 'osd',
+ name: 'osd.2 (osd)'
}
],
- id: component.nodes[1].id,
- cdId: -1,
+ id: component.nodes[1].children[0].id,
+ cdId: -2,
status: undefined,
- type: 'root',
- name: 'default (root)'
+ type: 'host',
+ name: 'my-host (host)'
}
- ]);
- });
- });
- });
+ ],
+ id: component.nodes[1].id,
+ cdId: -1,
+ status: undefined,
+ type: 'root',
+ name: 'default (root)'
+ }
+ ]);
+ component.ngOnDestroy();
+ }));
});
TreeNode,
TREE_ACTIONS
} from '@circlon/angular-tree-component';
-import { Subscription } from 'rxjs';
+import { Observable, Subscription } from 'rxjs';
-import { HealthService } from '~/app/shared/api/health.service';
+import { CrushRuleService } from '~/app/shared/api/crush-rule.service';
import { Icons } from '~/app/shared/enum/icons.enum';
import { TimerService } from '~/app/shared/services/timer.service';
templateUrl: './crushmap.component.html',
styleUrls: ['./crushmap.component.scss']
})
-export class CrushmapComponent implements OnInit, OnDestroy {
+export class CrushmapComponent implements OnDestroy, OnInit {
private sub = new Subscription();
@ViewChild('tree') tree: TreeComponent;
metadata: any;
metadataTitle: string;
metadataKeyMap: { [key: number]: any } = {};
+ data$: Observable<object>;
- constructor(private healthService: HealthService, private timerService: TimerService) {}
+ constructor(private crushRuleService: CrushRuleService, private timerService: TimerService) {}
ngOnInit() {
- this.healthService.getFullHealth().subscribe((data: any) => {
- this.loadingIndicator = false;
- this.nodes = this.abstractTreeData(data);
- });
this.sub = this.timerService
- .get(() => this.healthService.getFullHealth(), 5000)
+ .get(() => this.crushRuleService.getInfo(), 5000)
.subscribe((data: any) => {
+ this.loadingIndicator = false;
this.nodes = this.abstractTreeData(data);
});
}
}
private abstractTreeData(data: any): any[] {
- const nodes = data.osd_map.tree.nodes || [];
+ const nodes = data.nodes || [];
+ const rootNodes = data.roots || [];
const treeNodeMap: { [key: number]: any } = {};
if (0 === nodes.length) {
const roots: any[] = [];
nodes.reverse().forEach((node: any) => {
- if (node.type === 'root') {
+ if (rootNodes.includes(node.id)) {
roots.push(node.id);
}
treeNodeMap[node.id] = this.generateTreeLeaf(node, treeNodeMap);
<a ngbNavLink
i18n>Daemons</a>
<ng-template ngbNavContent>
- <cd-service-daemon-list [hostname]="selectedHostname">
+ <cd-service-daemon-list [hostname]="selectedHostname"
+ flag="hostDetails">
</cd-service-daemon-list>
</ng-template>
</li>
i18n>The chosen hostname is already in use.</span>
</div>
</div>
+
+ <!-- Address -->
+ <div class="form-group row">
+ <label class="cd-col-form-label"
+ for="addr"
+ i18n>Nework address</label>
+ <div class="cd-col-form-input">
+ <input class="form-control"
+ type="text"
+ placeholder="192.168.0.1"
+ id="addr"
+ name="addr"
+ formControlName="addr">
+ <span class="invalid-feedback"
+ *ngIf="hostForm.showError('addr', formDir, 'pattern')"
+ i18n>The value is not a valid IP address.</span>
+ </div>
+ </div>
+
+ <!-- Labels -->
+ <div class="form-group row">
+ <label i18n
+ for="labels"
+ class="cd-col-form-label">Labels</label>
+ <div class="cd-col-form-input">
+ <cd-select-badges id="labels"
+ [data]="hostForm.controls.labels.value"
+ [customBadges]="true"
+ [messages]="messages">
+ </cd-select-badges>
+ </div>
+ </div>
+
+ <!-- Maintenance Mode -->
+ <div class="form-group row">
+ <div class="cd-col-form-offset">
+ <div class="custom-control custom-checkbox">
+ <input class="custom-control-input"
+ id="maintenance"
+ type="checkbox"
+ formControlName="maintenance">
+ <label class="custom-control-label"
+ for="maintenance"
+ i18n>Maintenance Mode</label>
+ </div>
+ </div>
+ </div>
</div>
<div class="card-footer">
import { HttpClientTestingModule } from '@angular/common/http/testing';
-import { ComponentFixture, TestBed } from '@angular/core/testing';
+import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
import { ReactiveFormsModule } from '@angular/forms';
import { RouterTestingModule } from '@angular/router/testing';
import { LoadingPanelComponent } from '~/app/shared/components/loading-panel/loading-panel.component';
import { SharedModule } from '~/app/shared/shared.module';
-import { configureTestBed } from '~/testing/unit-test-helper';
+import { configureTestBed, FormHelper } from '~/testing/unit-test-helper';
import { HostFormComponent } from './host-form.component';
describe('HostFormComponent', () => {
let component: HostFormComponent;
let fixture: ComponentFixture<HostFormComponent>;
+ let formHelper: FormHelper;
configureTestBed(
{
beforeEach(() => {
fixture = TestBed.createComponent(HostFormComponent);
component = fixture.componentInstance;
+ formHelper = new FormHelper(component.hostForm);
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
+
+ it('should validate the network address is valid', fakeAsync(() => {
+ formHelper.setValue('addr', '115.42.150.37', true);
+ tick();
+ formHelper.expectValid('addr');
+ }));
+
+ it('should show error if network address is invalid', fakeAsync(() => {
+ formHelper.setValue('addr', '666.10.10.20', true);
+ tick();
+ formHelper.expectError('addr', 'pattern');
+ }));
+
+ it('should submit the network address', () => {
+ component.hostForm.get('addr').setValue('127.0.0.1');
+ fixture.detectChanges();
+ component.submit();
+ expect(component.addr).toBe('127.0.0.1');
+ });
+
+ it('should validate the labels are added', () => {
+ const labels = ['label1', 'label2'];
+ component.hostForm.get('labels').patchValue(labels);
+ fixture.detectChanges();
+ component.submit();
+ expect(component.allLabels).toBe(labels);
+ });
+
+ it('should select maintenance mode', () => {
+ component.hostForm.get('maintenance').setValue(true);
+ fixture.detectChanges();
+ component.submit();
+ expect(component.status).toBe('maintenance');
+ });
});
import { Router } from '@angular/router';
import { HostService } from '~/app/shared/api/host.service';
+import { SelectMessages } from '~/app/shared/components/select/select-messages.model';
import { ActionLabelsI18n, URLVerbs } from '~/app/shared/constants/app.constants';
import { CdForm } from '~/app/shared/forms/cd-form';
import { CdFormGroup } from '~/app/shared/forms/cd-form-group';
action: string;
resource: string;
hostnames: string[];
+ addr: string;
+ status: string;
+ allLabels: any;
+
+ messages = new SelectMessages({
+ empty: $localize`There are no labels.`,
+ filter: $localize`Filter or add labels`,
+ add: $localize`Add label`
+ });
constructor(
private router: Router,
return this.hostnames && this.hostnames.indexOf(hostname) !== -1;
})
]
- })
+ }),
+ addr: new FormControl('', {
+ validators: [CdValidators.ip()]
+ }),
+ labels: new FormControl([]),
+ maintenance: new FormControl(false)
});
}
submit() {
const hostname = this.hostForm.get('hostname').value;
+ this.addr = this.hostForm.get('addr').value;
+ this.status = this.hostForm.get('maintenance').value ? 'maintenance' : '';
+ this.allLabels = this.hostForm.get('labels').value;
this.taskWrapper
.wrapTaskAroundCall({
task: new FinishedTask('host/' + URLVerbs.CREATE, {
hostname: hostname
}),
- call: this.hostService.create(hostname)
+ call: this.hostService.create(hostname, this.addr, this.allLabels, this.status)
})
.subscribe({
error: () => {
} from '~/testing/unit-test-helper';
import { HostsComponent } from './hosts.component';
+class MockShowForceMaintenanceModal {
+ showModal = false;
+ showModalDialog(msg: string) {
+ if (
+ msg.includes('WARNING') &&
+ !msg.includes('It is NOT safe to stop') &&
+ !msg.includes('ALERT') &&
+ !msg.includes('unable to stop')
+ ) {
+ this.showModal = true;
+ }
+ }
+}
+
describe('HostsComponent', () => {
let component: HostsComponent;
let fixture: ComponentFixture<HostsComponent>;
let hostListSpy: jasmine.Spy;
let orchService: OrchestratorService;
+ let showForceMaintenanceModal: MockShowForceMaintenanceModal;
const fakeAuthStorageService = {
getPermissions: () => {
});
beforeEach(() => {
+ showForceMaintenanceModal = new MockShowForceMaintenanceModal();
fixture = TestBed.createComponent(HostsComponent);
component = fixture.componentInstance;
hostListSpy = spyOn(TestBed.inject(HostService), 'list');
});
});
+ it('should show force maintenance modal when it is safe to stop host', () => {
+ const errorMsg = `WARNING: Stopping 1 out of 1 daemons in Grafana service.
+ Service will not be operational with no daemons left. At
+ least 1 daemon must be running to guarantee service.`;
+ showForceMaintenanceModal.showModalDialog(errorMsg);
+ expect(showForceMaintenanceModal.showModal).toBeTruthy();
+ });
+
+ it('should not show force maintenance modal when error is an ALERT', () => {
+ const errorMsg = `ALERT: Cannot stop active Mgr daemon, Please switch active Mgrs
+ with 'ceph mgr fail ceph-node-00'`;
+ showForceMaintenanceModal.showModalDialog(errorMsg);
+ expect(showForceMaintenanceModal.showModal).toBeFalsy();
+ });
+
+ it('should not show force maintenance modal when it is not safe to stop host', () => {
+ const errorMsg = `WARNING: Stopping 1 out of 1 daemons in Grafana service.
+ Service will not be operational with no daemons left. At
+ least 1 daemon must be running to guarantee service.
+ It is NOT safe to stop ['mon.ceph-node-00']: not enough
+ monitors would be available (ceph-node-02) after stopping mons`;
+ showForceMaintenanceModal.showModalDialog(errorMsg);
+ expect(showForceMaintenanceModal.showModal).toBeFalsy();
+ });
+
+ it('should not show force maintenance modal when it is unable to stop host', () => {
+ const errorMsg = 'unable to stop osd.0 because of some unknown reason';
+ showForceMaintenanceModal.showModalDialog(errorMsg);
+ expect(showForceMaintenanceModal.showModal).toBeFalsy();
+ });
+
describe('table actions', () => {
const fakeHosts = require('./fixtures/host_list_response.json');
if (
error.error['detail'].includes('WARNING') &&
!error.error['detail'].includes('It is NOT safe to stop') &&
- !error.error['detail'].includes('ALERT')
+ !error.error['detail'].includes('ALERT') &&
+ !error.error['detail'].includes('unable to stop')
) {
const modalVarialbes = {
titleText: $localize`Warning`,
expect(
pipe.transform({
placement: {
- host_pattern: '*'
+ host_pattern: 'abc.ceph.xyz.com'
}
})
- ).toBe('*');
+ ).toBe('abc.ceph.xyz.com');
});
it('transforms placement (6)', () => {
kv.push($localize`label:${label}`);
}
if (_.isString(hostPattern)) {
- kv.push(...hostPattern);
+ kv.push(hostPattern);
}
return kv.join(';');
}
<cd-orchestrator-doc-panel *ngIf="showDocPanel"></cd-orchestrator-doc-panel>
-<cd-table *ngIf="hasOrchestrator"
- #daemonsTable
- [data]="daemons"
- [columns]="columns"
- columnMode="flex"
- [autoReload]="5000"
- (fetchData)="getDaemons($event)">
-</cd-table>
+
+<div *ngIf="flag === 'hostDetails'; else serviceDetailsTpl">
+ <cd-table *ngIf="hasOrchestrator"
+ #daemonsTable
+ [data]="daemons"
+ [columns]="columns"
+ columnMode="flex"
+ (fetchData)="getDaemons($event)">
+ </cd-table>
+</div>
+
+<ng-template #serviceDetailsTpl>
+ <ng-container>
+ <ul ngbNav
+ #nav="ngbNav"
+ class="nav-tabs"
+ cdStatefulTab="service-details">
+ <li ngbNavItem="details">
+ <a ngbNavLink
+ i18n>Details</a>
+ <ng-template ngbNavContent>
+ <cd-table *ngIf="hasOrchestrator"
+ #daemonsTable
+ [data]="daemons"
+ [columns]="columns"
+ columnMode="flex"
+ (fetchData)="getDaemons($event)">
+ </cd-table>
+ </ng-template>
+ </li>
+ <li ngbNavItem="service_events">
+ <a ngbNavLink
+ i18n>Service Events</a>
+ <ng-template ngbNavContent>
+ <cd-table *ngIf="hasOrchestrator"
+ #serviceTable
+ [data]="services"
+ [columns]="serviceColumns"
+ columnMode="flex"
+ (fetchData)="getServices($event)">
+ </cd-table>
+ </ng-template>
+ </li>
+ </ul>
+ <div [ngbNavOutlet]="nav"></div>
+ </ng-container>
+</ng-template>
<ng-template #statusTpl
let-row="row">
{{ row.status_desc }}
</span>
</ng-template>
+
+<ng-template #listTpl
+ let-events="value">
+ <div *ngIf="events.length == 0 || events == undefined">
+ <span>No data available</span>
+ </div>
+ <div *ngIf="events.length != 0 && events != undefined"
+ class="ul-margin">
+ <ul *ngFor="let event of events; trackBy:trackByFn">
+ <li><b>{{ event.created | relativeDate }} - </b>
+ <span class="badge badge-info">{{ event.subject }}</span><br>
+ <span *ngIf="event.level == 'INFO'">
+ <i [ngClass]="[icons.infoCircle]"
+ aria-hidden="true"></i>
+ </span>
+ <span *ngIf="event.level == 'ERROR'">
+ <i [ngClass]="[icons.warning]"
+ aria-hidden="true"></i>
+ </span>
+ {{ event.message }}</li>
+ </ul>
+ </div>
+</ng-template>
+@use './src/styles/vendor/variables' as vv;
+
+.fa-info-circle {
+ color: vv.$info;
+}
+
+.fa-exclamation-triangle {
+ color: vv.$danger;
+}
+
+.ul-margin {
+ margin-left: -30px;
+}
}
];
+ const services = [
+ {
+ service_type: 'osd',
+ service_name: 'osd',
+ status: {
+ container_image_id: 'e70344c77bcbf3ee389b9bf5128f635cf95f3d59e005c5d8e67fc19bcc74ed23',
+ container_image_name: 'docker.io/ceph/daemon-base:latest-master-devel',
+ size: 3,
+ running: 3,
+ last_refresh: '2020-02-25T04:33:26.465699'
+ },
+ events: '2021-03-22T07:34:48.582163Z service:osd [INFO] "service was created"'
+ },
+ {
+ service_type: 'crash',
+ service_name: 'crash',
+ status: {
+ container_image_id: 'e70344c77bcbf3ee389b9bf5128f635cf95f3d59e005c5d8e67fc19bcc74ed23',
+ container_image_name: 'docker.io/ceph/daemon-base:latest-master-devel',
+ size: 1,
+ running: 1,
+ last_refresh: '2020-02-25T04:33:26.465766'
+ },
+ events: '2021-03-22T07:34:48.582163Z service:osd [INFO] "service was created"'
+ }
+ ];
+
const getDaemonsByHostname = (hostname?: string) => {
return hostname ? _.filter(daemons, { hostname: hostname }) : daemons;
};
spyOn(cephServiceService, 'getDaemons').and.callFake(() =>
of(getDaemonsByServiceName(component.serviceName))
);
+ spyOn(cephServiceService, 'list').and.returnValue(of(services));
fixture.detectChanges();
});
expect(component.daemons.length).toBe(3);
});
+ it('should list services', () => {
+ component.getServices(new CdTableFetchDataContext(() => undefined));
+ expect(component.services.length).toBe(2);
+ });
+
it('should not display doc panel if orchestrator is available', () => {
expect(component.showDocPanel).toBeFalsy();
});
import { OrchestratorService } from '~/app/shared/api/orchestrator.service';
import { TableComponent } from '~/app/shared/datatable/table/table.component';
import { CellTemplate } from '~/app/shared/enum/cell-template.enum';
+import { Icons } from '~/app/shared/enum/icons.enum';
import { CdTableColumn } from '~/app/shared/models/cd-table-column';
import { CdTableFetchDataContext } from '~/app/shared/models/cd-table-fetch-data-context';
import { Daemon } from '~/app/shared/models/daemon.interface';
+import { CephServiceSpec } from '~/app/shared/models/service.interface';
import { RelativeDatePipe } from '~/app/shared/pipes/relative-date.pipe';
@Component({
@ViewChild('statusTpl', { static: true })
statusTpl: TemplateRef<any>;
+ @ViewChild('listTpl', { static: true })
+ listTpl: TemplateRef<any>;
+
@ViewChildren('daemonsTable')
daemonsTableTpls: QueryList<TemplateRef<TableComponent>>;
@Input()
hostname?: string;
+ @Input()
+ flag?: string;
+
+ icons = Icons;
+
daemons: Daemon[] = [];
+ services: Array<CephServiceSpec> = [];
columns: CdTableColumn[] = [];
+ serviceColumns: CdTableColumn[] = [];
hasOrchestrator = false;
showDocPanel = false;
private daemonsTable: TableComponent;
private daemonsTableTplsSub: Subscription;
+ private serviceSub: Subscription;
constructor(
private hostService: HostService,
{
name: $localize`Hostname`,
prop: 'hostname',
- flexGrow: 1,
+ flexGrow: 2,
filterable: true
},
{
{
name: $localize`Container ID`,
prop: 'container_id',
- flexGrow: 3,
+ flexGrow: 2,
filterable: true,
cellTransformation: CellTemplate.truncate,
customTemplateConfig: {
{
name: $localize`Container Image ID`,
prop: 'container_image_id',
- flexGrow: 3,
+ flexGrow: 2,
filterable: true,
cellTransformation: CellTemplate.truncate,
customTemplateConfig: {
name: $localize`Last Refreshed`,
prop: 'last_refresh',
pipe: this.relativeDatePipe,
- flexGrow: 2
+ flexGrow: 1
+ },
+ {
+ name: $localize`Daemon Events`,
+ prop: 'events',
+ flexGrow: 5,
+ cellTemplate: this.listTpl
+ }
+ ];
+
+ this.serviceColumns = [
+ {
+ name: $localize`Service Name`,
+ prop: 'service_name',
+ flexGrow: 2,
+ filterable: true
+ },
+ {
+ name: $localize`Service Type`,
+ prop: 'service_type',
+ flexGrow: 1,
+ filterable: true
+ },
+ {
+ name: $localize`Service Events`,
+ prop: 'events',
+ flexGrow: 5,
+ cellTemplate: this.listTpl
}
];
if (this.daemonsTableTplsSub) {
this.daemonsTableTplsSub.unsubscribe();
}
+ if (this.serviceSub) {
+ this.serviceSub.unsubscribe();
+ }
}
getStatusClass(row: Daemon): string {
}
);
}
+
+ getServices(context: CdTableFetchDataContext) {
+ this.serviceSub = this.cephServiceService.list(this.serviceName).subscribe(
+ (services: CephServiceSpec[]) => {
+ this.services = services;
+ },
+ () => {
+ this.services = [];
+ context.error();
+ }
+ );
+ }
+
+ trackByFn(_index: any, item: any) {
+ return item.created;
+ }
}
i18n>Type</label>
<div class="cd-col-form-input">
<select id="service_type"
+ name="service_type"
class="form-control custom-select"
formControlName="service_type">
<option i18n
</div>
</div>
+ <!-- backend_service -->
+ <div *ngIf="serviceForm.controls.service_type.value === 'ingress'"
+ class="form-group row">
+ <label i18n
+ class="cd-col-form-label"
+ [ngClass]="{'required': ['ingress'].includes(serviceForm.controls.service_type.value)}"
+ for="backend_service">Backend Service</label>
+ <div class="cd-col-form-input">
+ <select id="backend_service"
+ name="backend_service"
+ class="form-control custom-select"
+ formControlName="backend_service"
+ (change)="prePopulateId()">
+ <option *ngIf="services === null"
+ [ngValue]="null"
+ i18n>Loading...</option>
+ <option *ngIf="services !== null && services.length === 0"
+ [ngValue]="null"
+ i18n>-- No service available --</option>
+ <option *ngIf="services !== null && services.length > 0"
+ [ngValue]="null"
+ i18n>-- Select an existing RGW service --</option>
+ <option *ngFor="let service of services"
+ [value]="service.service_name">{{ service.service_name }}</option>
+ </select>
+ <span class="invalid-feedback"
+ *ngIf="serviceForm.showError('backend_service', frm, 'required')"
+ i18n>This field is required.</span>
+ </div>
+ </div>
+
<!-- Service id -->
<div class="form-group row">
<label i18n
class="cd-col-form-label"
- [ngClass]="{'required': ['mds', 'rgw', 'nfs', 'iscsi'].includes(serviceForm.controls.service_type.value)}"
+ [ngClass]="{'required': ['mds', 'rgw', 'nfs', 'iscsi', 'ingress'].includes(serviceForm.controls.service_type.value)}"
for="service_id">Id</label>
<div class="cd-col-form-input">
<input id="service_id"
</div>
</ng-container>
- <!-- RGW & iSCSI -->
- <ng-container *ngIf="!serviceForm.controls.unmanaged.value && ['rgw', 'iscsi'].includes(serviceForm.controls.service_type.value)">
+ <!-- Ingress -->
+ <ng-container *ngIf="!serviceForm.controls.unmanaged.value && serviceForm.controls.service_type.value === 'ingress'">
+ <!-- virtual_ip -->
+ <div class="form-group row">
+ <label class="cd-col-form-label"
+ [ngClass]="{'required': ['ingress'].includes(serviceForm.controls.service_type.value)}"
+ for="virtual_ip">
+ <span i18n>Virtual IP</span>
+ <cd-helper>
+ <span i18n>The virtual IP address and subnet (in CIDR notation) where the ingress service will be available.</span>
+ </cd-helper>
+ </label>
+ <div class="cd-col-form-input">
+ <input id="virtual_ip"
+ class="form-control"
+ type="text"
+ formControlName="virtual_ip">
+ <span class="invalid-feedback"
+ *ngIf="serviceForm.showError('virtual_ip', frm, 'required')"
+ i18n>This field is required.</span>
+ </div>
+ </div>
+
+ <!-- frontend_port -->
+ <div class="form-group row">
+ <label class="cd-col-form-label"
+ [ngClass]="{'required': ['ingress'].includes(serviceForm.controls.service_type.value)}"
+ for="frontend_port">
+ <span i18n>Frontend Port</span>
+ <cd-helper>
+ <span i18n>The port used to access the ingress service.</span>
+ </cd-helper>
+ </label>
+ <div class="cd-col-form-input">
+ <input id="frontend_port"
+ class="form-control"
+ type="number"
+ formControlName="frontend_port"
+ min="1"
+ max="65535">
+ <span class="invalid-feedback"
+ *ngIf="serviceForm.showError('frontend_port', frm, 'pattern')"
+ i18n>The entered value needs to be a number.</span>
+ <span class="invalid-feedback"
+ *ngIf="serviceForm.showError('frontend_port', frm, 'min')"
+ i18n>The value must be at least 1.</span>
+ <span class="invalid-feedback"
+ *ngIf="serviceForm.showError('frontend_port', frm, 'max')"
+ i18n>The value cannot exceed 65535.</span>
+ <span class="invalid-feedback"
+ *ngIf="serviceForm.showError('frontend_port', frm, 'required')"
+ i18n>This field is required.</span>
+ </div>
+ </div>
+
+ <!-- monitor_port -->
+ <div class="form-group row">
+ <label class="cd-col-form-label"
+ [ngClass]="{'required': ['ingress'].includes(serviceForm.controls.service_type.value)}"
+ for="monitor_port">
+ <span i18n>Monitor Port</span>
+ <cd-helper>
+ <span i18n>The port used by haproxy for load balancer status.</span>
+ </cd-helper>
+ </label>
+ <div class="cd-col-form-input">
+ <input id="monitor_port"
+ class="form-control"
+ type="number"
+ formControlName="monitor_port"
+ min="1"
+ max="65535">
+ <span class="invalid-feedback"
+ *ngIf="serviceForm.showError('monitor_port', frm, 'pattern')"
+ i18n>The entered value needs to be a number.</span>
+ <span class="invalid-feedback"
+ *ngIf="serviceForm.showError('monitor_port', frm, 'min')"
+ i18n>The value must be at least 1.</span>
+ <span class="invalid-feedback"
+ *ngIf="serviceForm.showError('monitor_port', frm, 'max')"
+ i18n>The value cannot exceed 65535.</span>
+ <span class="invalid-feedback"
+ *ngIf="serviceForm.showError('monitor_port', frm, 'required')"
+ i18n>This field is required.</span>
+ </div>
+ </div>
+ <!-- virtual_interface_networks -->
+ <div class="form-group row">
+ <label class="cd-col-form-label"
+ for="virtual_interface_networks">
+ <span i18n>CIDR Networks</span>
+ <cd-helper>
+ <span i18n>A list of networks to identify which network interface to use for the virtual IP address.</span>
+ </cd-helper>
+ </label>
+ <div class="cd-col-form-input">
+ <input id="virtual_interface_networks"
+ class="form-control"
+ type="text"
+ formControlName="virtual_interface_networks">
+ </div>
+ </div>
+ </ng-container>
+ <!-- RGW, Ingress & iSCSI -->
+ <ng-container *ngIf="!serviceForm.controls.unmanaged.value && ['rgw', 'iscsi', 'ingress'].includes(serviceForm.controls.service_type.value)">
<!-- ssl -->
<div class="form-group row">
<div class="cd-col-form-offset">
formHelper.expectError('api_port', 'pattern');
});
});
+
+ describe('should test service ingress', () => {
+ beforeEach(() => {
+ formHelper.setValue('service_type', 'ingress');
+ formHelper.setValue('backend_service', 'rgw.foo');
+ formHelper.setValue('virtual_ip', '192.168.20.1/24');
+ formHelper.setValue('ssl', false);
+ });
+
+ it('should submit ingress', () => {
+ component.onSubmit();
+ expect(cephServiceService.create).toHaveBeenCalledWith({
+ service_type: 'ingress',
+ placement: {},
+ unmanaged: false,
+ backend_service: 'rgw.foo',
+ service_id: 'rgw.foo',
+ virtual_ip: '192.168.20.1/24',
+ virtual_interface_networks: null,
+ ssl: false
+ });
+ });
+
+ it('should pre-populate the service id', () => {
+ component.prePopulateId();
+ const prePopulatedID = component.serviceForm.getValue('service_id');
+ expect(prePopulatedID).toBe('rgw.foo');
+ });
+
+ it('should submit valid frontend and monitor port', () => {
+ // min value
+ formHelper.setValue('frontend_port', 1);
+ formHelper.setValue('monitor_port', 1);
+ component.onSubmit();
+ formHelper.expectValid('frontend_port');
+ formHelper.expectValid('monitor_port');
+
+ // max value
+ formHelper.setValue('frontend_port', 65535);
+ formHelper.setValue('monitor_port', 65535);
+ component.onSubmit();
+ formHelper.expectValid('frontend_port');
+ formHelper.expectValid('monitor_port');
+ });
+
+ it('should submit invalid frontend and monitor port', () => {
+ // min
+ formHelper.setValue('frontend_port', 0);
+ formHelper.setValue('monitor_port', 0);
+ component.onSubmit();
+ formHelper.expectError('frontend_port', 'min');
+ formHelper.expectError('monitor_port', 'min');
+
+ // max
+ formHelper.setValue('frontend_port', 65536);
+ formHelper.setValue('monitor_port', 65536);
+ component.onSubmit();
+ formHelper.expectError('frontend_port', 'max');
+ formHelper.expectError('monitor_port', 'max');
+
+ // pattern
+ formHelper.setValue('frontend_port', 'abc');
+ formHelper.setValue('monitor_port', 'abc');
+ component.onSubmit();
+ formHelper.expectError('frontend_port', 'pattern');
+ formHelper.expectError('monitor_port', 'pattern');
+ });
+ });
});
});
import { CdFormGroup } from '~/app/shared/forms/cd-form-group';
import { CdValidators } from '~/app/shared/forms/cd-validators';
import { FinishedTask } from '~/app/shared/models/finished-task';
+import { CephServiceSpec } from '~/app/shared/models/service.interface';
import { TaskWrapperService } from '~/app/shared/services/task-wrapper.service';
@Component({
labelClick = new Subject<string>();
labelFocus = new Subject<string>();
pools: Array<object>;
+ services: Array<CephServiceSpec> = [];
constructor(
public actionLabels: ActionLabelsI18n,
CdValidators.requiredIf({
service_type: 'iscsi'
}),
+ CdValidators.requiredIf({
+ service_type: 'ingress'
+ }),
CdValidators.composeIf(
{
service_type: 'rgw'
})
]
],
- // RGW & iSCSI
+ // Ingress
+ backend_service: [
+ null,
+ [
+ CdValidators.requiredIf({
+ service_type: 'ingress',
+ unmanaged: false
+ })
+ ]
+ ],
+ virtual_ip: [
+ null,
+ [
+ CdValidators.requiredIf({
+ service_type: 'ingress',
+ unmanaged: false
+ })
+ ]
+ ],
+ frontend_port: [null, [CdValidators.number(false), Validators.min(1), Validators.max(65535)]],
+ monitor_port: [null, [CdValidators.number(false), Validators.min(1), Validators.max(65535)]],
+ virtual_interface_networks: [null],
+ // RGW, Ingress & iSCSI
ssl: [false],
ssl_cert: [
'',
this.poolService.getList().subscribe((resp: Array<object>) => {
this.pools = resp;
});
+ this.cephServiceService.list().subscribe((services: CephServiceSpec[]) => {
+ this.services = services.filter((service: any) => service.service_type === 'rgw');
+ });
}
goToListView() {
reader.readAsText(file, 'utf8');
}
+ prePopulateId() {
+ const control: AbstractControl = this.serviceForm.get('service_id');
+ const backendService = this.serviceForm.getValue('backend_service');
+ // Set Id as read-only
+ control.reset({ value: backendService, disabled: true });
+ }
+
onSubmit() {
const self = this;
const values: object = this.serviceForm.value;
serviceSpec['ssl_key'] = values['ssl_key'].trim();
}
break;
+ case 'ingress':
+ serviceSpec['backend_service'] = values['backend_service'];
+ serviceSpec['service_id'] = values['backend_service'];
+ if (_.isString(values['virtual_ip']) && !_.isEmpty(values['virtual_ip'])) {
+ serviceSpec['virtual_ip'] = values['virtual_ip'].trim();
+ }
+ if (_.isNumber(values['frontend_port']) && values['frontend_port'] > 0) {
+ serviceSpec['frontend_port'] = values['frontend_port'];
+ }
+ if (_.isNumber(values['monitor_port']) && values['monitor_port'] > 0) {
+ serviceSpec['monitor_port'] = values['monitor_port'];
+ }
+ serviceSpec['ssl'] = values['ssl'];
+ if (values['ssl']) {
+ serviceSpec['ssl_cert'] = values['ssl_cert'].trim();
+ serviceSpec['ssl_key'] = values['ssl_key'].trim();
+ }
+ serviceSpec['virtual_interface_networks'] = values['virtual_interface_networks'];
+ break;
}
}
this.taskWrapperService
service_type: 'osd',
service_name: 'osd',
status: {
- container_image_id: 'e70344c77bcbf3ee389b9bf5128f635cf95f3d59e005c5d8e67fc19bcc74ed23',
- container_image_name: 'docker.io/ceph/daemon-base:latest-master-devel',
size: 3,
running: 3,
last_refresh: '2020-02-25T04:33:26.465699'
service_type: 'crash',
service_name: 'crash',
status: {
- container_image_id: 'e70344c77bcbf3ee389b9bf5128f635cf95f3d59e005c5d8e67fc19bcc74ed23',
- container_image_name: 'docker.io/ceph/daemon-base:latest-master-devel',
size: 1,
running: 1,
last_refresh: '2020-02-25T04:33:26.465766'
import { Component, Input, OnChanges, OnInit, ViewChild } from '@angular/core';
-import { delay, finalize } from 'rxjs/operators';
+import { delay } from 'rxjs/operators';
import { CephServiceService } from '~/app/shared/api/ceph-service.service';
import { OrchestratorService } from '~/app/shared/api/orchestrator.service';
import { CriticalConfirmationModalComponent } from '~/app/shared/components/critical-confirmation-modal/critical-confirmation-modal.component';
import { ActionLabelsI18n, URLVerbs } from '~/app/shared/constants/app.constants';
import { TableComponent } from '~/app/shared/datatable/table/table.component';
-import { CellTemplate } from '~/app/shared/enum/cell-template.enum';
import { Icons } from '~/app/shared/enum/icons.enum';
import { CdTableAction } from '~/app/shared/models/cd-table-action';
import { CdTableColumn } from '~/app/shared/models/cd-table-column';
prop: 'service_name',
flexGrow: 1
},
- {
- name: $localize`Container image name`,
- prop: 'status.container_image_name',
- flexGrow: 3
- },
- {
- name: $localize`Container image ID`,
- prop: 'status.container_image_id',
- flexGrow: 3,
- cellTransformation: CellTemplate.truncate,
- customTemplateConfig: {
- length: 12
- }
- },
{
name: $localize`Placement`,
prop: '',
pipe: new PlacementPipe(),
- flexGrow: 1
+ flexGrow: 2
},
{
name: $localize`Running`,
})
.pipe(
// Delay closing the dialog, otherwise the datatable still
- // shows the deleted service after forcing a reload.
+ // shows the deleted service after an auto-reload.
// Showing the dialog while delaying is done to increase
// the user experience.
- delay(2000),
- finalize(() => {
- // Force reloading the data table content because it is
- // auto-reloaded only every 60s.
- this.table.refreshBtn();
- })
+ delay(5000)
)
});
}
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
+import { CssHelper } from '~/app/shared/classes/css-helper';
import { DimlessBinaryPipe } from '~/app/shared/pipes/dimless-binary.pipe';
import { DimlessPipe } from '~/app/shared/pipes/dimless.pipe';
import { FormatterService } from '~/app/shared/services/formatter.service';
configureTestBed({
schemas: [NO_ERRORS_SCHEMA],
declarations: [HealthPieComponent],
- providers: [DimlessBinaryPipe, DimlessPipe, FormatterService]
+ providers: [DimlessBinaryPipe, DimlessPipe, FormatterService, CssHelper]
});
beforeEach(() => {
import _ from 'lodash';
import { PluginServiceGlobalRegistrationAndOptions } from 'ng2-charts';
+import { CssHelper } from '~/app/shared/classes/css-helper';
import { ChartTooltip } from '~/app/shared/models/chart-tooltip';
import { DimlessBinaryPipe } from '~/app/shared/pipes/dimless-binary.pipe';
import { DimlessPipe } from '~/app/shared/pipes/dimless.pipe';
-import styles from '~/styles.scss';
@Component({
selector: 'cd-health-pie',
colors: [
{
backgroundColor: [
- styles.chartHealthColorGreen,
- styles.chartHealthColorYellow,
- styles.chartHealthColorOrange,
- styles.chartHealthColorRed,
- styles.chartHealthColorBlue
+ this.cssHelper.propertyValue('chart-color-green'),
+ this.cssHelper.propertyValue('chart-color-yellow'),
+ this.cssHelper.propertyValue('chart-color-orange'),
+ this.cssHelper.propertyValue('chart-color-red'),
+ this.cssHelper.propertyValue('chart-color-blue')
]
}
],
tooltips: {
enabled: true,
displayColors: false,
- backgroundColor: styles.chartHealthTootlipBgColor,
+ backgroundColor: this.cssHelper.propertyValue('chart-color-tooltip-background'),
cornerRadius: 0,
bodyFontSize: 14,
bodyFontStyle: '600',
{
id: 'center_text',
beforeDraw(chart: Chart) {
+ const cssHelper = new CssHelper();
const defaultFontFamily = 'Helvetica Neue, Helvetica, Arial, sans-serif';
Chart.defaults.global.defaultFontFamily = defaultFontFamily;
const ctx = chart.ctx;
ctx.textBaseline = 'middle';
ctx.font = `24px ${defaultFontFamily}`;
- ctx.fillStyle = styles.chartHealthCenterTextColor;
+ ctx.fillStyle = cssHelper.propertyValue('chart-color-center-text');
ctx.fillText(label[0], centerX, centerY - 10);
if (label.length > 1) {
ctx.font = `14px ${defaultFontFamily}`;
- ctx.fillStyle = styles.chartHealthCenterTextDescriptionColor;
+ ctx.fillStyle = cssHelper.propertyValue('chart-color-center-text-description');
ctx.fillText(label[1], centerX, centerY + 10);
}
ctx.restore();
}
];
- constructor(private dimlessBinary: DimlessBinaryPipe, private dimless: DimlessPipe) {}
+ constructor(
+ private dimlessBinary: DimlessBinaryPipe,
+ private dimless: DimlessPipe,
+ private cssHelper: CssHelper
+ ) {}
ngOnInit() {
const getStyleTop = (tooltip: any, positionY: number) => {
import { PgCategoryService } from '~/app/ceph/shared/pg-category.service';
import { HealthService } from '~/app/shared/api/health.service';
+import { CssHelper } from '~/app/shared/classes/css-helper';
import { Permissions } from '~/app/shared/models/permissions';
import { AuthStorageService } from '~/app/shared/services/auth-storage.service';
import { FeatureTogglesService } from '~/app/shared/services/feature-toggles.service';
providers: [
{ provide: AuthStorageService, useValue: fakeAuthStorageService },
PgCategoryService,
- RefreshIntervalService
+ RefreshIntervalService,
+ CssHelper
]
});
import { PgCategoryService } from '~/app/ceph/shared/pg-category.service';
import { HealthService } from '~/app/shared/api/health.service';
+import { CssHelper } from '~/app/shared/classes/css-helper';
import { Icons } from '~/app/shared/enum/icons.enum';
import { Permissions } from '~/app/shared/models/permissions';
import { DimlessBinaryPipe } from '~/app/shared/pipes/dimless-binary.pipe';
FeatureTogglesService
} from '~/app/shared/services/feature-toggles.service';
import { RefreshIntervalService } from '~/app/shared/services/refresh-interval.service';
-import styles from '~/styles.scss';
@Component({
selector: 'cd-health',
clientStatsConfig = {
colors: [
{
- backgroundColor: [styles.chartHealthColorCyan, styles.chartHealthColorPurple]
+ backgroundColor: [
+ this.cssHelper.propertyValue('chart-color-cyan'),
+ this.cssHelper.propertyValue('chart-color-purple')
+ ]
}
]
};
rawCapacityChartConfig = {
colors: [
{
- backgroundColor: [styles.chartHealthColorBlue, styles.chartHealthColorGray]
+ backgroundColor: [
+ this.cssHelper.propertyValue('chart-color-blue'),
+ this.cssHelper.propertyValue('chart-color-gray')
+ ]
}
]
};
private featureToggles: FeatureTogglesService,
private refreshIntervalService: RefreshIntervalService,
private dimlessBinary: DimlessBinaryPipe,
- private dimless: DimlessPipe
+ private dimless: DimlessPipe,
+ private cssHelper: CssHelper
) {
this.permissions = this.authStorageService.getPermissions();
this.enabledFeature$ = this.featureToggles.get();
]);
});
- it('transforms having 3 osd with 2 up, 1 in, 1 down, 1 out', () => {
+ it('transforms having 3 osd with 2 up, 1 in, 1 down, 2 out', () => {
const value = {
osds: [
{ up: 1, in: 1 },
class: 'card-text-line-break'
},
{
- content: '1 down, 1 out',
+ content: '1 down, 2 out',
class: 'card-text-error'
}
]);
});
- it('transforms having 3 osd with 2 up, 2 in, 1 down, 0 out', () => {
+ it('transforms having 3 osd with 2 up, 3 in, 1 down, 0 out', () => {
const value = {
osds: [
{ up: 1, in: 1 },
{ up: 1, in: 1 },
- { up: 0, in: 0 }
+ { up: 0, in: 1 }
]
};
expect(pipe.transform(value)).toEqual([
class: 'card-text-line-break'
},
{
- content: '2 up, 2 in',
+ content: '2 up, 3 in',
class: ''
},
{
}
]);
});
+
+ it('transforms having 4 osd with 3 up, 2 in, 1 down, another 2 out', () => {
+ const value = {
+ osds: [
+ { up: 1, in: 1 },
+ { up: 1, in: 0 },
+ { up: 1, in: 0 },
+ { up: 0, in: 1 }
+ ]
+ };
+ expect(pipe.transform(value)).toEqual([
+ {
+ content: '4 total',
+ class: ''
+ },
+ {
+ content: '',
+ class: 'card-text-line-break'
+ },
+ {
+ content: '3 up, 2 in',
+ class: ''
+ },
+ {
+ content: '',
+ class: 'card-text-line-break'
+ },
+ {
+ content: '1 down, 2 out',
+ class: 'card-text-error'
+ }
+ ]);
+ });
});
});
const downCount = value.osds.length - upCount;
- const outCount = upCount - inCount;
+ const outCount = value.osds.length - inCount;
if (downCount > 0 || outCount > 0) {
osdSummary.push({
content: '',
class="custom-control-input"
id="protocolNfsv3"
name="protocolNfsv3"
- formControlName="protocolNfsv3">
+ formControlName="protocolNfsv3"
+ disabled>
<label i18n
class="custom-control-label"
for="protocolNfsv3">NFSv3</label>
httpTesting.expectOne('ui-api/nfs-ganesha/fsals').flush(['CEPH', 'RGW']);
httpTesting.expectOne('ui-api/nfs-ganesha/cephx/clients').flush(['admin', 'fs', 'rgw']);
httpTesting.expectOne('ui-api/nfs-ganesha/cephfs/filesystems').flush([{ id: 1, name: 'a' }]);
- httpTesting.expectOne(`api/rgw/user?${RgwHelper.DAEMON_QUERY_PARAM}`).flush(['test', 'dev']);
+ httpTesting
+ .expectOne(`api/rgw/user?${RgwHelper.DAEMON_QUERY_PARAM}`)
+ .flush(['test', 'dev', 'tenant$user']);
const user_dev = {
suspended: 0,
user_id: 'dev',
keys: ['a']
};
httpTesting.expectOne(`api/rgw/user/test?${RgwHelper.DAEMON_QUERY_PARAM}`).flush(user_test);
+ const tenantUser = {
+ suspended: 0,
+ tenant: 'tenant',
+ user_id: 'user',
+ keys: ['a']
+ };
+ httpTesting
+ .expectOne(`api/rgw/user/tenant%24user?${RgwHelper.DAEMON_QUERY_PARAM}`)
+ .flush(tenantUser);
httpTesting.verify();
});
]);
expect(component.allCephxClients).toEqual(['admin', 'fs', 'rgw']);
expect(component.allFsNames).toEqual([{ id: 1, name: 'a' }]);
- expect(component.allRgwUsers).toEqual(['dev']);
+ expect(component.allRgwUsers).toEqual(['dev', 'tenant$user']);
});
it('should create the form', () => {
daemons: [],
fsal: { fs_name: 'a', name: '', rgw_user_id: '', user_id: '' },
path: '',
- protocolNfsv3: true,
+ protocolNfsv3: false,
protocolNfsv4: true,
pseudo: '',
sec_label_xattr: 'security.selinux',
expect(component.nfsForm.get('cluster_id').disabled).toBeTruthy();
});
+ it('should mark NFSv4 protocol as required', () => {
+ component.nfsForm.patchValue({
+ protocolNfsv4: false
+ });
+ component.nfsForm.updateValueAndValidity({ emitEvent: false });
+ expect(component.nfsForm.valid).toBeFalsy();
+ expect(component.nfsForm.get('protocolNfsv4').hasError('required')).toBeTruthy();
+ });
+
describe('should submit request', () => {
beforeEach(() => {
component.nfsForm.patchValue({
})
}),
path: new FormControl(''),
- protocolNfsv3: new FormControl(true, {
+ protocolNfsv3: new FormControl(false, {
validators: [
CdValidators.requiredIf({ protocolNfsv4: false }, (value: boolean) => {
return !value;
this.rgwUserService.list().subscribe((result: any) => {
result.forEach((user: Record<string, any>) => {
if (user.suspended === 0 && user.keys.length > 0) {
- this.allRgwUsers.push(user.user_id);
+ const userId = user.tenant ? `${user.tenant}$${user.user_id}` : user.user_id;
+ this.allRgwUsers.push(userId);
}
});
});
class="bold">Days</td>
<td>{{ selection.lock_retention_period_days }}</td>
</tr>
- <tr>
- <td i18n
- class="bold">Years</td>
- <td>{{ selection.lock_retention_period_years }}</td>
- </tr>
</ng-container>
</tbody>
</table>
ngOnChanges() {
if (this.selection) {
this.rgwBucketService.get(this.selection.bid).subscribe((bucket: object) => {
+ bucket['lock_retention_period_days'] = this.rgwBucketService.getLockDays(bucket);
this.selection = bucket;
});
}
<span class="invalid-feedback"
*ngIf="bucketForm.showError('bid', frm, 'bucketNameExists')"
i18n>The chosen name is already in use.</span>
+ <span class="invalid-feedback"
+ *ngIf="bucketForm.showError('bid', frm, 'containsUpperCase')"
+ i18n>Bucket names must not contain uppercase characters or underscores.</span>
+ <span class="invalid-feedback"
+ *ngIf="bucketForm.showError('bid', frm, 'lowerCaseOrNumber')"
+ i18n>Each label must start and end with a lowercase letter or a number.</span>
+ <span class="invalid-feedback"
+ *ngIf="bucketForm.showError('bid', frm, 'ipAddress')"
+ i18n>Bucket names cannot be formatted as IP address.</span>
+ <span class="invalid-feedback"
+ *ngIf="bucketForm.showError('bid', frm, 'onlyLowerCaseAndNumbers')"
+ i18n>Bucket names can only contain lowercase letters, numbers, and hyphens.</span>
+ <span class="invalid-feedback"
+ *ngIf="bucketForm.showError('bid', frm, 'shouldBeInRange')"
+ i18n>Bucket names must be 3 to 63 characters long.</span>
</div>
</div>
*ngIf="bucketForm.showError('lock_retention_period_days', frm, 'pattern')"
i18n>The entered value must be a positive integer.</span>
<span class="invalid-feedback"
- *ngIf="bucketForm.showError('lock_retention_period_days', frm, 'eitherDaysOrYears')"
- i18n>Retention period requires either Days or Years.</span>
- </div>
- </div>
-
- <!-- Retention period (years) -->
- <div *ngIf="bucketForm.getValue('lock_enabled')"
- class="form-group row">
- <label class="cd-col-form-label"
- for="lock_retention_period_years">
- <ng-container i18n>Years</ng-container>
- <cd-helper i18n>The number of years that you want to specify for the default retention period that will be applied to new objects placed in this bucket.</cd-helper>
- </label>
- <div class="cd-col-form-input">
- <input class="form-control"
- type="number"
- id="lock_retention_period_years"
- formControlName="lock_retention_period_years"
- min="0">
- <span class="invalid-feedback"
- *ngIf="bucketForm.showError('lock_retention_period_days', frm, 'pattern')"
- i18n>The entered value must be a positive integer.</span>
- <span class="invalid-feedback"
- *ngIf="bucketForm.showError('lock_retention_period_years', frm, 'eitherDaysOrYears')"
- i18n>Retention period requires either Days or Years.</span>
+ *ngIf="bucketForm.showError('lock_retention_period_days', frm, 'lockDays')"
+ i18n>Retention Days must be a positive integer.</span>
</div>
</div>
</fieldset>
import { HttpClientTestingModule } from '@angular/common/http/testing';
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-import { FormControl, ReactiveFormsModule } from '@angular/forms';
+import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
+import { ReactiveFormsModule } from '@angular/forms';
import { Router } from '@angular/router';
import { RouterTestingModule } from '@angular/router/testing';
import _ from 'lodash';
import { ToastrModule } from 'ngx-toastr';
-import { of as observableOf } from 'rxjs';
+import { of as observableOf, throwError } from 'rxjs';
import { RgwBucketService } from '~/app/shared/api/rgw-bucket.service';
import { RgwSiteService } from '~/app/shared/api/rgw-site.service';
});
describe('bucketNameValidator', () => {
- const testValidator = (name: string, valid: boolean) => {
- const validatorFn = component.bucketNameValidator();
- const ctrl = new FormControl(name);
- ctrl.markAsDirty();
- const validatorPromise = validatorFn(ctrl);
- expect(validatorPromise instanceof Promise).toBeTruthy();
- if (validatorPromise instanceof Promise) {
- validatorPromise.then((resp) => {
- if (valid) {
- expect(resp).toBe(null);
- } else {
- expect(resp instanceof Object).toBeTruthy();
- expect(resp.bucketNameInvalid).toBeTruthy();
- }
- });
+ const testValidator = (name: string, valid: boolean, expectedError?: string) => {
+ rgwBucketServiceGetSpy.and.returnValue(throwError('foo'));
+ formHelper.setValue('bid', name, true);
+ tick();
+ if (valid) {
+ formHelper.expectValid('bid');
+ } else {
+ formHelper.expectError('bid', expectedError);
}
};
- it('should validate empty name', () => {
- testValidator('', true);
- });
+ it('should validate empty name', fakeAsync(() => {
+ formHelper.expectErrorChange('bid', '', 'required', true);
+ }));
- it('bucket names cannot be formatted as IP address', () => {
- testValidator('172.10.4.51', false);
- });
+ it('bucket names cannot be formatted as IP address', fakeAsync(() => {
+ const testIPs = ['1.1.1.01', '001.1.1.01', '127.0.0.1'];
+ for (const ip of testIPs) {
+ testValidator(ip, false, 'ipAddress');
+ }
+ }));
- it('bucket name must be >= 3 characters long (1/2)', () => {
- testValidator('ab', false);
- });
+ it('bucket name must be >= 3 characters long (1/2)', fakeAsync(() => {
+ testValidator('ab', false, 'shouldBeInRange');
+ }));
- it('bucket name must be >= 3 characters long (2/2)', () => {
+ it('bucket name must be >= 3 characters long (2/2)', fakeAsync(() => {
testValidator('abc', true);
- });
+ }));
- it('bucket name must be <= than 63 characters long (1/2)', () => {
- testValidator(_.repeat('a', 64), false);
- });
+ it('bucket name must be <= than 63 characters long (1/2)', fakeAsync(() => {
+ testValidator(_.repeat('a', 64), false, 'shouldBeInRange');
+ }));
- it('bucket name must be <= than 63 characters long (2/2)', () => {
+ it('bucket name must be <= than 63 characters long (2/2)', fakeAsync(() => {
testValidator(_.repeat('a', 63), true);
- });
+ }));
- it('bucket names must not contain uppercase characters or underscores (1/2)', () => {
- testValidator('iAmInvalid', false);
- });
+ it('bucket names must not contain uppercase characters or underscores (1/2)', fakeAsync(() => {
+ testValidator('iAmInvalid', false, 'containsUpperCase');
+ }));
- it('bucket names must not contain uppercase characters or underscores (2/2)', () => {
- testValidator('i_am_invalid', false);
- });
+ it('bucket names can only contain lowercase letters, numbers, and hyphens', fakeAsync(() => {
+ testValidator('$$$', false, 'onlyLowerCaseAndNumbers');
+ }));
- it('bucket names with invalid labels (1/3)', () => {
- testValidator('abc.1def.Ghi2', false);
- });
+ it('bucket names must not contain uppercase characters or underscores (2/2)', fakeAsync(() => {
+ testValidator('i_am_invalid', false, 'containsUpperCase');
+ }));
- it('bucket names with invalid labels (2/3)', () => {
- testValidator('abc.1-xy', false);
- });
+ it('bucket names must start and end with letters or numbers', fakeAsync(() => {
+ testValidator('abcd-', false, 'lowerCaseOrNumber');
+ }));
- it('bucket names with invalid labels (3/3)', () => {
- testValidator('abc.*def', false);
- });
+ it('bucket names with invalid labels (1/3)', fakeAsync(() => {
+ testValidator('abc.1def.Ghi2', false, 'containsUpperCase');
+ }));
- it('bucket names must be a series of one or more labels and can contain lowercase letters, numbers, and hyphens (1/3)', () => {
+ it('bucket names with invalid labels (2/3)', fakeAsync(() => {
+ testValidator('abc.1_xy', false, 'containsUpperCase');
+ }));
+
+ it('bucket names with invalid labels (3/3)', fakeAsync(() => {
+ testValidator('abc.*def', false, 'lowerCaseOrNumber');
+ }));
+
+ it('bucket names must be a series of one or more labels and can contain lowercase letters, numbers, and hyphens (1/3)', fakeAsync(() => {
testValidator('xyz.abc', true);
- });
+ }));
- it('bucket names must be a series of one or more labels and can contain lowercase letters, numbers, and hyphens (2/3)', () => {
+ it('bucket names must be a series of one or more labels and can contain lowercase letters, numbers, and hyphens (2/3)', fakeAsync(() => {
testValidator('abc.1-def', true);
- });
+ }));
- it('bucket names must be a series of one or more labels and can contain lowercase letters, numbers, and hyphens (3/3)', () => {
+ it('bucket names must be a series of one or more labels and can contain lowercase letters, numbers, and hyphens (3/3)', fakeAsync(() => {
testValidator('abc.ghi2', true);
- });
+ }));
- it('bucket names must be unique', () => {
- spyOn(rgwBucketService, 'enumerate').and.returnValue(observableOf(['abcd']));
- const validatorFn = component.bucketNameValidator();
- const ctrl = new FormControl('abcd');
- ctrl.markAsDirty();
- const validatorPromise = validatorFn(ctrl);
- expect(validatorPromise instanceof Promise).toBeTruthy();
- if (validatorPromise instanceof Promise) {
- validatorPromise.then((resp) => {
- expect(resp instanceof Object).toBeTruthy();
- expect(resp.bucketNameExists).toBeTruthy();
- });
- }
- });
+ it('bucket names must be unique', fakeAsync(() => {
+ testValidator('bucket-name-is-unique', true);
+ }));
+
+ it('bucket names must not contain spaces', fakeAsync(() => {
+ testValidator('bucket name with spaces', false, 'onlyLowerCaseAndNumbers');
+ }));
it('should get zonegroup and placement targets', () => {
const payload: Record<string, any> = {
});
describe('object locking', () => {
- const setDaysAndYears = (fn: (name: string) => void) => {
- ['lock_retention_period_days', 'lock_retention_period_years'].forEach(fn);
- };
-
const expectPatternLockError = (value: string) => {
formHelper.setValue('lock_enabled', true, true);
- setDaysAndYears((name: string) => {
- formHelper.setValue(name, value);
- formHelper.expectError(name, 'pattern');
- });
+ formHelper.setValue('lock_retention_period_days', value);
+ formHelper.expectError('lock_retention_period_days', 'pattern');
};
- const expectValidLockInputs = (enabled: boolean, mode: string, days: string, years: string) => {
+ const expectValidLockInputs = (enabled: boolean, mode: string, days: string) => {
formHelper.setValue('lock_enabled', enabled);
formHelper.setValue('lock_mode', mode);
formHelper.setValue('lock_retention_period_days', days);
- formHelper.setValue('lock_retention_period_years', years);
- [
- 'lock_enabled',
- 'lock_mode',
- 'lock_retention_period_days',
- 'lock_retention_period_years'
- ].forEach((name) => {
+ ['lock_enabled', 'lock_mode', 'lock_retention_period_days'].forEach((name) => {
const control = component.bucketForm.get(name);
expect(control.valid).toBeTruthy();
expect(control.errors).toBeNull();
expect(control.disabled).toBeTruthy();
});
- it('should have the "eitherDaysOrYears" error', () => {
+ it('should have the "lockDays" error', () => {
formHelper.setValue('lock_enabled', true);
- setDaysAndYears((name: string) => {
- const control = component.bucketForm.get(name);
- control.updateValueAndValidity();
- expect(control.value).toBe(0);
- expect(control.invalid).toBeTruthy();
- formHelper.expectError(control, 'eitherDaysOrYears');
- });
+ const control = component.bucketForm.get('lock_retention_period_days');
+ control.updateValueAndValidity();
+ expect(control.value).toBe(0);
+ expect(control.invalid).toBeTruthy();
+ formHelper.expectError(control, 'lockDays');
});
it('should have the "pattern" error [1]', () => {
});
it('should have valid values [1]', () => {
- expectValidLockInputs(true, 'Governance', '0', '1');
+ expectValidLockInputs(true, 'Governance', '1');
});
it('should have valid values [2]', () => {
- expectValidLockInputs(false, 'Compliance', '100', '0');
+ expectValidLockInputs(false, 'Compliance', '2');
});
});
});
import { ActivatedRoute, Router } from '@angular/router';
import _ from 'lodash';
-import { forkJoin } from 'rxjs';
+import { forkJoin, Observable, of as observableOf, timer as observableTimer } from 'rxjs';
+import { map, switchMapTo } from 'rxjs/operators';
import { RgwBucketService } from '~/app/shared/api/rgw-bucket.service';
import { RgwSiteService } from '~/app/shared/api/rgw-site.service';
createForm() {
const self = this;
- const eitherDaysOrYears = CdValidators.custom('eitherDaysOrYears', () => {
+ const lockDaysValidator = CdValidators.custom('lockDays', () => {
if (!self.bucketForm || !_.get(self.bucketForm.getRawValue(), 'lock_enabled')) {
return false;
}
- const years = self.bucketForm.getValue('lock_retention_period_years');
- const days = self.bucketForm.getValue('lock_retention_period_days');
- return (days > 0 && years > 0) || (days === 0 && years === 0);
+ const lockDays = Number(self.bucketForm.getValue('lock_retention_period_days'));
+ return !Number.isInteger(lockDays) || lockDays === 0;
});
- const lockPeriodDefinition = [0, [CdValidators.number(false), eitherDaysOrYears]];
this.bucketForm = this.formBuilder.group({
id: [null],
bid: [null, [Validators.required], this.editing ? [] : [this.bucketNameValidator()]],
'mfa-token-pin': [''],
lock_enabled: [{ value: false, disabled: this.editing }],
lock_mode: ['COMPLIANCE'],
- lock_retention_period_days: lockPeriodDefinition,
- lock_retention_period_years: lockPeriodDefinition
+ lock_retention_period_days: [0, [CdValidators.number(false), lockDaysValidator]]
});
}
// the Angular react framework will throw an error if there is no
// field for a given key.
let value: object = _.pick(bidResp, _.keys(defaults));
+ value['lock_retention_period_days'] = this.rgwBucketService.getLockDays(bidResp);
value['placement-target'] = bidResp['placement_rule'];
value['versioning'] = bidResp['versioning'] === RgwBucketVersioning.ENABLED;
value['mfa-delete'] = bidResp['mfa_delete'] === RgwBucketMfaDelete.ENABLED;
this.isVersioningAlreadyEnabled = this.isVersioningEnabled;
this.isMfaDeleteAlreadyEnabled = this.isMfaDeleteEnabled;
this.setMfaDeleteValidators();
+ if (value['lock_enabled']) {
+ this.bucketForm.controls['versioning'].disable();
+ }
}
}
values['mfa-token-serial'],
values['mfa-token-pin'],
values['lock_mode'],
- values['lock_retention_period_days'],
- values['lock_retention_period_years']
+ values['lock_retention_period_days']
)
.subscribe(
() => {
values['placement-target'],
values['lock_enabled'],
values['lock_mode'],
- values['lock_retention_period_days'],
- values['lock_retention_period_years']
+ values['lock_retention_period_days']
)
.subscribe(
() => {
* start and end with a lowercase letter or a number.
*/
bucketNameValidator(): AsyncValidatorFn {
- const rgwBucketService = this.rgwBucketService;
- return (control: AbstractControl): Promise<ValidationErrors | null> => {
- return new Promise((resolve) => {
- // Exit immediately if user has not interacted with the control yet
- // or the control value is empty.
- if (control.pristine || control.value === '') {
- resolve(null);
- return;
+ return (control: AbstractControl): Observable<ValidationErrors | null> => {
+ // Exit immediately if user has not interacted with the control yet
+ // or the control value is empty.
+ if (control.pristine || control.value === '') {
+ return observableOf(null);
+ }
+ const constraints = [];
+ let errorName: string;
+ // - Bucket names cannot be formatted as IP address.
+ constraints.push(() => {
+ const ipv4Rgx = /^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i;
+ const ipv6Rgx = /^(?:[a-f0-9]{1,4}:){7}[a-f0-9]{1,4}$/i;
+ const name = this.bucketForm.get('bid').value;
+ let notIP = true;
+ if (ipv4Rgx.test(name) || ipv6Rgx.test(name)) {
+ errorName = 'ipAddress';
+ notIP = false;
}
- const constraints = [];
- // - Bucket names cannot be formatted as IP address.
- constraints.push((name: AbstractControl) => {
- const validatorFn = CdValidators.ip();
- return !validatorFn(name);
- });
- // - Bucket names can be between 3 and 63 characters long.
- constraints.push((name: string) => _.inRange(name.length, 3, 64));
- // - Bucket names must not contain uppercase characters or underscores.
- // - Bucket names must start with a lowercase letter or number.
- // - Bucket names must be a series of one or more labels. Adjacent
- // labels are separated by a single period (.). Bucket names can
- // contain lowercase letters, numbers, and hyphens. Each label must
- // start and end with a lowercase letter or a number.
- constraints.push((name: string) => {
- const labels = _.split(name, '.');
- return _.every(labels, (label) => {
- // Bucket names must not contain uppercase characters or underscores.
- if (label !== _.toLower(label) || label.includes('_')) {
- return false;
- }
- // Bucket names can contain lowercase letters, numbers, and hyphens.
- if (!/[0-9a-z-]/.test(label)) {
- return false;
- }
- // Each label must start and end with a lowercase letter or a number.
- return _.every([0, label.length], (index) => {
- return /[a-z]/.test(label[index]) || _.isInteger(_.parseInt(label[index]));
- });
+ return notIP;
+ });
+ // - Bucket names can be between 3 and 63 characters long.
+ constraints.push((name: string) => {
+ if (!_.inRange(name.length, 3, 64)) {
+ errorName = 'shouldBeInRange';
+ return false;
+ }
+ return true;
+ });
+ // - Bucket names must not contain uppercase characters or underscores.
+ // - Bucket names must start with a lowercase letter or number.
+ // - Bucket names must be a series of one or more labels. Adjacent
+ // labels are separated by a single period (.). Bucket names can
+ // contain lowercase letters, numbers, and hyphens. Each label must
+ // start and end with a lowercase letter or a number.
+ constraints.push((name: string) => {
+ const labels = _.split(name, '.');
+ return _.every(labels, (label) => {
+ // Bucket names must not contain uppercase characters or underscores.
+ if (label !== _.toLower(label) || label.includes('_')) {
+ errorName = 'containsUpperCase';
+ return false;
+ }
+ // Bucket names can contain lowercase letters, numbers, and hyphens.
+ if (!/^\S*$/.test(name) || !/[0-9a-z-]/.test(label)) {
+ errorName = 'onlyLowerCaseAndNumbers';
+ return false;
+ }
+ // Each label must start and end with a lowercase letter or a number.
+ return _.every([0, label.length - 1], (index) => {
+ errorName = 'lowerCaseOrNumber';
+ return /[a-z]/.test(label[index]) || _.isInteger(_.parseInt(label[index]));
});
});
- if (!_.every(constraints, (func: Function) => func(control.value))) {
- resolve({ bucketNameInvalid: true });
- return;
- }
- // - Bucket names must be unique.
- rgwBucketService.exists(control.value).subscribe((resp: boolean) => {
+ });
+ if (!_.every(constraints, (func: Function) => func(control.value))) {
+ return observableTimer().pipe(
+ map(() => {
+ switch (errorName) {
+ case 'onlyLowerCaseAndNumbers':
+ return { onlyLowerCaseAndNumbers: true };
+ case 'shouldBeInRange':
+ return { shouldBeInRange: true };
+ case 'ipAddress':
+ return { ipAddress: true };
+ case 'containsUpperCase':
+ return { containsUpperCase: true };
+ case 'lowerCaseOrNumber':
+ return { lowerCaseOrNumber: true };
+ default:
+ return { bucketNameInvalid: true };
+ }
+ })
+ );
+ }
+ // - Bucket names must be unique.
+ return observableTimer().pipe(
+ switchMapTo(this.rgwBucketService.exists.call(this.rgwBucketService, control.value)),
+ map((resp: boolean) => {
if (!resp) {
- resolve(null);
+ return null;
} else {
- resolve({ bucketNameExists: true });
+ return { bucketNameExists: true };
}
- });
- });
+ })
+ );
};
}
size_actual: 4,
num_objects: 2
},
- 'rgw.another': {
+ 'rgw.none': {
size_actual: 6,
num_objects: 6
}
owner: 'testid',
usage: {
'rgw.main': { size_actual: 4, num_objects: 2 },
- 'rgw.another': { size_actual: 6, num_objects: 6 }
+ 'rgw.none': { size_actual: 6, num_objects: 6 }
},
bucket_quota: {
max_size: 20,
max_objects: 10,
enabled: true
},
- bucket_size: 10,
- num_objects: 8,
- size_usage: 0.5,
- object_usage: 0.8
+ bucket_size: 4,
+ num_objects: 2,
+ size_usage: 0.2,
+ object_usage: 0.2
}
]);
});
transformBucketData() {
_.forEach(this.buckets, (bucketKey) => {
- const usageList = bucketKey['usage'];
const maxBucketSize = bucketKey['bucket_quota']['max_size'];
const maxBucketObjects = bucketKey['bucket_quota']['max_objects'];
- let totalBucketSize = 0;
- let numOfObjects = 0;
- _.forEach(usageList, (usageKey) => {
- totalBucketSize = totalBucketSize + usageKey.size_actual;
- numOfObjects = numOfObjects + usageKey.num_objects;
- });
- bucketKey['bucket_size'] = totalBucketSize;
- bucketKey['num_objects'] = numOfObjects;
- bucketKey['size_usage'] = maxBucketSize > 0 ? totalBucketSize / maxBucketSize : undefined;
+ bucketKey['bucket_size'] = 0;
+ bucketKey['num_objects'] = 0;
+ if (!_.isEmpty(bucketKey['usage'])) {
+ bucketKey['bucket_size'] = bucketKey['usage']['rgw.main']['size_actual'];
+ bucketKey['num_objects'] = bucketKey['usage']['rgw.main']['num_objects'];
+ }
+ bucketKey['size_usage'] =
+ maxBucketSize > 0 ? bucketKey['bucket_size'] / maxBucketSize : undefined;
bucketKey['object_usage'] =
- maxBucketObjects > 0 ? numOfObjects / maxBucketObjects : undefined;
+ maxBucketObjects > 0 ? bucketKey['num_objects'] / maxBucketObjects : undefined;
});
}
it('should validate that username is valid', fakeAsync(() => {
spyOn(rgwUserService, 'get').and.returnValue(throwError('foo'));
formHelper.setValue('user_id', 'ab', true);
- tick(500);
+ tick();
formHelper.expectValid('user_id');
}));
it('should validate that username is invalid', fakeAsync(() => {
spyOn(rgwUserService, 'get').and.returnValue(observableOf({}));
formHelper.setValue('user_id', 'abc', true);
- tick(500);
+ tick();
formHelper.expectError('user_id', 'notUnique');
}));
});
import { Component, NgZone, OnInit, TemplateRef, ViewChild } from '@angular/core';
-import * as _ from 'lodash';
+import _ from 'lodash';
import { forkJoin as observableForkJoin, Observable, Subscriber } from 'rxjs';
import { RgwUserService } from '~/app/shared/api/rgw-user.service';
import { ToastrModule } from 'ngx-toastr';
import { RbdService } from '~/app/shared/api/rbd.service';
+import { CssHelper } from '~/app/shared/classes/css-helper';
import { PipesModule } from '~/app/shared/pipes/pipes.module';
import { AuthStorageService } from '~/app/shared/services/auth-storage.service';
import { configureTestBed } from '~/testing/unit-test-helper';
imports: [RouterTestingModule, ToastrModule.forRoot(), PipesModule, HttpClientTestingModule],
declarations: [WorkbenchLayoutComponent],
schemas: [NO_ERRORS_SCHEMA],
- providers: [AuthStorageService, RbdService]
+ providers: [AuthStorageService, CssHelper, RbdService]
});
beforeEach(() => {
-<form #docsForm
- action="/docs"
- target="_blank"
- method="post">
- <input type="hidden"
- name="token" />
-</form>
-
<div ngbDropdown
placement="bottom-right">
<a ngbDropdownToggle
href="{{ docsUrl }}"
target="_blank"
i18n>documentation</a>
- <button ngbDropdownItem
- (click)="goToApiDocs()"
- i18n>API</button>
+ <a ngbDropdownItem
+ href="/docs"
+ target="_blank"
+ i18n>API</a>
<button ngbDropdownItem
(click)="openAboutModal()"
i18n>About</button>
-import { Component, OnInit, ViewChild } from '@angular/core';
+import { Component, OnInit } from '@angular/core';
import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap';
styleUrls: ['./dashboard-help.component.scss']
})
export class DashboardHelpComponent implements OnInit {
- @ViewChild('docsForm', { static: true })
- docsFormElement: any;
docsUrl: string;
modalRef: NgbModalRef;
icons = Icons;
openAboutModal() {
this.modalRef = this.modalService.show(AboutComponent, null, { size: 'lg' });
}
-
- goToApiDocs() {
- this.docsFormElement.nativeElement.submit();
- }
}
<button type="button"
class="navbar-toggler"
- (click)="isCollapsed = !isCollapsed">
+ (click)="toggleRightSidebar()">
<span i18n
class="sr-only">Toggle navigation</span>
<span class="">
</span>
</button>
- <div class="collapse navbar-collapse">
+ <div class="collapse navbar-collapse"
+ [ngClass]="{'show': rightSidebarOpen}">
<ul class="nav navbar-nav cd-navbar-utility my-2 my-md-0">
<ng-container *ngTemplateOutlet="cd_utilities"> </ng-container>
</ul>
<cd-language-selector class="cd-navbar"></cd-language-selector>
</li>
<li class="nav-item ">
- <cd-notifications class="cd-navbar"></cd-notifications>
+ <cd-notifications class="cd-navbar"
+ (click)="toggleRightSidebar()"></cd-notifications>
</li>
<li class="nav-item ">
<cd-dashboard-help class="cd-navbar"></cd-dashboard-help>
*ngIf="permissions.cephfs.read && enabledFeature.cephfs">
<a i18n
class="nav-link"
- routerLink="/cephfs">Filesystems</a>
+ routerLink="/cephfs">File Systems</a>
</li>
<!-- Object Gateway -->
summaryData: any;
icons = Icons;
- isCollapsed = true;
+ rightSidebarOpen = false; // rightSidebar only opens when width is less than 768px
showMenuSidebar = true;
displayedSubMenu = '';
}
}
+ toggleRightSidebar() {
+ this.rightSidebarOpen = !this.rightSidebarOpen;
+ }
+
showTopNotification(name: string, isDisplayed: boolean) {
if (isDisplayed) {
if (!this.notifications.includes(name)) {
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
-import { Router } from '@angular/router';
+import { ActivatedRoute, Router } from '@angular/router';
+import * as _ from 'lodash';
import { Observable } from 'rxjs';
import { tap } from 'rxjs/operators';
constructor(
private authStorageService: AuthStorageService,
private http: HttpClient,
- private router: Router
+ private router: Router,
+ private route: ActivatedRoute
) {}
check(token: string) {
logout(callback: Function = null) {
return this.http.post('api/auth/logout', null).subscribe((resp: any) => {
this.authStorageService.remove();
- this.router.navigate(['/login'], { skipLocationChange: true });
+ const url = _.get(this.route.snapshot.queryParams, 'returnUrl', '/login');
+ this.router.navigate([url], { skipLocationChange: true });
if (callback) {
callback();
}
return this.http.get<object[]>(this.baseURL);
}
- create(hostname: string) {
- return this.http.post(this.baseURL, { hostname: hostname }, { observe: 'response' });
+ create(hostname: string, addr: string, labels: string[], status: string) {
+ return this.http.post(
+ this.baseURL,
+ { hostname: hostname, addr: addr, labels: labels, status: status },
+ { observe: 'response', headers: { Accept: 'application/vnd.ceph.api.v0.1+json' } }
+ );
}
delete(hostname: string) {
maintenance = false,
force = false
) {
- return this.http.put(`${this.baseURL}/${hostname}`, {
- update_labels: updateLabels,
- labels: labels,
- maintenance: maintenance,
- force: force
- });
+ return this.http.put(
+ `${this.baseURL}/${hostname}`,
+ {
+ update_labels: updateLabels,
+ labels: labels,
+ maintenance: maintenance,
+ force: force
+ },
+ { headers: { Accept: 'application/vnd.ceph.api.v0.1+json' } }
+ );
}
identifyDevice(hostname: string, device: string, duration: number) {
it('should call create', () => {
service
- .create('foo', 'bar', 'default', 'default-placement', false, 'COMPLIANCE', '10', '0')
+ .create('foo', 'bar', 'default', 'default-placement', false, 'COMPLIANCE', '5')
.subscribe();
const req = httpTesting.expectOne(
- `api/rgw/bucket?bucket=foo&uid=bar&zonegroup=default&placement_target=default-placement&lock_enabled=false&lock_mode=COMPLIANCE&lock_retention_period_days=10&lock_retention_period_years=0&${RgwHelper.DAEMON_QUERY_PARAM}`
+ `api/rgw/bucket?bucket=foo&uid=bar&zonegroup=default&placement_target=default-placement&lock_enabled=false&lock_mode=COMPLIANCE&lock_retention_period_days=5&${RgwHelper.DAEMON_QUERY_PARAM}`
);
expect(req.request.method).toBe('POST');
});
it('should call update', () => {
service
- .update('foo', 'bar', 'baz', 'Enabled', 'Enabled', '1', '223344', 'GOVERNANCE', '0', '1')
+ .update('foo', 'bar', 'baz', 'Enabled', 'Enabled', '1', '223344', 'GOVERNANCE', '10')
.subscribe();
const req = httpTesting.expectOne(
- `api/rgw/bucket/foo?${RgwHelper.DAEMON_QUERY_PARAM}&bucket_id=bar&uid=baz&versioning_state=Enabled&mfa_delete=Enabled&mfa_token_serial=1&mfa_token_pin=223344&lock_mode=GOVERNANCE&lock_retention_period_days=0&lock_retention_period_years=1`
+ `api/rgw/bucket/foo?${RgwHelper.DAEMON_QUERY_PARAM}&bucket_id=bar&uid=baz&versioning_state=Enabled&mfa_delete=Enabled&mfa_token_serial=1&mfa_token_pin=223344&lock_mode=GOVERNANCE&lock_retention_period_days=10`
);
expect(req.request.method).toBe('PUT');
});
service.exists('foo').subscribe((resp) => {
result = resp;
});
- const req = httpTesting.expectOne(`api/rgw/bucket?${RgwHelper.DAEMON_QUERY_PARAM}`);
+ const req = httpTesting.expectOne(`api/rgw/bucket/foo?${RgwHelper.DAEMON_QUERY_PARAM}`);
expect(req.request.method).toBe('GET');
req.flush(['foo', 'bar']);
expect(result).toBe(true);
});
+
+ it('should convert lock retention period to days', () => {
+ expect(service.getLockDays({ lock_retention_period_years: 1000 })).toBe(365242);
+ expect(service.getLockDays({ lock_retention_period_days: 5 })).toBe(5);
+ expect(service.getLockDays({})).toBe(0);
+ });
});
import _ from 'lodash';
import { of as observableOf } from 'rxjs';
-import { mergeMap } from 'rxjs/operators';
+import { catchError, mapTo } from 'rxjs/operators';
import { RgwDaemonService } from '~/app/shared/api/rgw-daemon.service';
import { cdEncode } from '~/app/shared/decorators/cd-encode';
});
}
- /**
- * Get the list of bucket names.
- * @return Observable<string[]>
- */
- enumerate() {
- return this.rgwDaemonService.request((params: HttpParams) => {
- return this.http.get(this.url, { params: params });
- });
- }
-
get(bucket: string) {
return this.rgwDaemonService.request((params: HttpParams) => {
return this.http.get(`${this.url}/${bucket}`, { params: params });
placementTarget: string,
lockEnabled: boolean,
lock_mode: 'GOVERNANCE' | 'COMPLIANCE',
- lock_retention_period_days: string,
- lock_retention_period_years: string
+ lock_retention_period_days: string
) {
return this.rgwDaemonService.request((params: HttpParams) => {
return this.http.post(this.url, null, {
lock_enabled: String(lockEnabled),
lock_mode,
lock_retention_period_days,
- lock_retention_period_years,
daemon_name: params.get('daemon_name')
}
})
mfaTokenSerial: string,
mfaTokenPin: string,
lockMode: 'GOVERNANCE' | 'COMPLIANCE',
- lockRetentionPeriodDays: string,
- lockRetentionPeriodYears: string
+ lockRetentionPeriodDays: string
) {
return this.rgwDaemonService.request((params: HttpParams) => {
params = params.append('bucket_id', bucketId);
params = params.append('mfa_token_pin', mfaTokenPin);
params = params.append('lock_mode', lockMode);
params = params.append('lock_retention_period_days', lockRetentionPeriodDays);
- params = params.append('lock_retention_period_years', lockRetentionPeriodYears);
return this.http.put(`${this.url}/${bucket}`, null, { params: params });
});
}
* @return Observable<boolean>
*/
exists(bucket: string) {
- return this.enumerate().pipe(
- mergeMap((resp: string[]) => {
- const index = _.indexOf(resp, bucket);
- return observableOf(-1 !== index);
+ return this.get(bucket).pipe(
+ mapTo(true),
+ catchError((error: Event) => {
+ if (_.isFunction(error.preventDefault)) {
+ error.preventDefault();
+ }
+ return observableOf(false);
})
);
}
+
+ getLockDays(bucketData: object): number {
+ if (bucketData['lock_retention_period_years'] > 0) {
+ return Math.floor(bucketData['lock_retention_period_years'] * 365.242);
+ }
+
+ return bucketData['lock_retention_period_days'] || 0;
+ }
}
-import * as _ from 'lodash';
+import _ from 'lodash';
export class CdHelperClass {
/**
--- /dev/null
+export class CssHelper {
+ propertyValue(propertyName: string): string {
+ return getComputedStyle(document.body).getPropertyValue(`--${propertyName}`);
+ }
+}
describe('GrafanaComponent', () => {
let component: GrafanaComponent;
let fixture: ComponentFixture<GrafanaComponent>;
+ const expected_url =
+ 'http:localhost:3000/d/foo/somePath&refresh=2s&var-datasource=Dashboard1&kiosk&from=now-1h&to=now';
configureTestBed({
declarations: [GrafanaComponent, AlertPanelComponent, LoadingPanelComponent, DocComponent],
expect(component.grafanaExist).toBe(true);
expect(component.baseUrl).toBe('http:localhost:3000/d/');
expect(component.loading).toBe(false);
- expect(component.url).toBe(
- 'http:localhost:3000/d/foo/somePath&refresh=2s&kiosk&from=now-1h&to=now'
- );
+ expect(component.url).toBe(expected_url);
expect(component.grafanaSrc).toEqual({
- changingThisBreaksApplicationSecurity:
- 'http:localhost:3000/d/foo/somePath&refresh=2s&kiosk&from=now-1h&to=now'
+ changingThisBreaksApplicationSecurity: expected_url
});
});
it('should reset the values', () => {
component.reset();
expect(component.time).toBe('from=now-1h&to=now');
- expect(component.url).toBe(
- 'http:localhost:3000/d/foo/somePath&refresh=2s&kiosk&from=now-1h&to=now'
- );
+ expect(component.url).toBe(expected_url);
expect(component.grafanaSrc).toEqual({
- changingThisBreaksApplicationSecurity:
- 'http:localhost:3000/d/foo/somePath&refresh=2s&kiosk&from=now-1h&to=now'
+ changingThisBreaksApplicationSecurity: expected_url
});
});
panelStyle: any;
grafanaExist = false;
mode = '&kiosk';
+ datasource = 'Dashboard1';
loading = true;
styles: Record<string, string> = {};
dashboardExist = true;
'/' +
this.grafanaPath +
'&refresh=2s' +
+ `&var-datasource=${this.datasource}` +
this.mode +
'&' +
this.time;
+++ /dev/null
-import styles from '~/styles.scss';
-
-export class Color {
- // HEALTH
- static HEALTH_ERR = styles.healthColorError;
- static HEALTH_WARN = styles.healthColorWarning;
- static HEALTH_OK = styles.healthColorHealthy;
-}
--- /dev/null
+export enum HealthColor {
+ HEALTH_ERR = 'health-color-error',
+ HEALTH_WARN = 'health-color-warning',
+ HEALTH_OK = 'health-color-healthy'
+}
serviceFn: existsServiceFn,
serviceFnThis: any = null,
usernameFn?: Function,
- uidfield = false,
- dueTime = 500
+ uidField = false
): AsyncValidatorFn {
- let uname: string;
+ let uName: string;
return (control: AbstractControl): Observable<ValidationErrors | null> => {
// Exit immediately if user has not interacted with the control yet
// or the control value is empty.
if (control.pristine || isEmptyInputValue(control.value)) {
return observableOf(null);
}
- uname = control.value;
+ uName = control.value;
if (_.isFunction(usernameFn) && usernameFn() !== null && usernameFn() !== '') {
- if (uidfield) {
- uname = `${control.value}$${usernameFn()}`;
+ if (uidField) {
+ uName = `${control.value}$${usernameFn()}`;
} else {
- uname = `${usernameFn()}$${control.value}`;
+ uName = `${usernameFn()}$${control.value}`;
}
}
- // Forgot previous requests if a new one arrives within the specified
- // delay time.
- return observableTimer(dueTime).pipe(
- switchMapTo(serviceFn.call(serviceFnThis, uname)),
+ return observableTimer().pipe(
+ switchMapTo(serviceFn.call(serviceFnThis, uName)),
map((resp: boolean) => {
if (!resp) {
return null;
-import styles from '~/styles.scss';
-import { HealthColorPipe } from './health-color.pipe';
+import { CssHelper } from '~/app/shared/classes/css-helper';
+import { HealthColorPipe } from '~/app/shared/pipes/health-color.pipe';
+
+class CssHelperStub extends CssHelper {
+ propertyValue(propertyName: string) {
+ if (propertyName === 'health-color-healthy') {
+ return 'fakeGreen';
+ }
+ if (propertyName === 'health-color-warning') {
+ return 'fakeOrange';
+ }
+ if (propertyName === 'health-color-error') {
+ return 'fakeRed';
+ }
+ return '';
+ }
+}
describe('HealthColorPipe', () => {
- const pipe = new HealthColorPipe();
+ const pipe = new HealthColorPipe(new CssHelperStub());
it('create an instance', () => {
expect(pipe).toBeTruthy();
});
it('transforms "HEALTH_OK"', () => {
- expect(pipe.transform('HEALTH_OK')).toEqual({ color: styles.healthColorHealthy });
+ expect(pipe.transform('HEALTH_OK')).toEqual({
+ color: 'fakeGreen'
+ });
});
it('transforms "HEALTH_WARN"', () => {
- expect(pipe.transform('HEALTH_WARN')).toEqual({ color: styles.healthColorWarning });
+ expect(pipe.transform('HEALTH_WARN')).toEqual({
+ color: 'fakeOrange'
+ });
});
it('transforms "HEALTH_ERR"', () => {
- expect(pipe.transform('HEALTH_ERR')).toEqual({ color: styles.healthColorError });
+ expect(pipe.transform('HEALTH_ERR')).toEqual({
+ color: 'fakeRed'
+ });
});
it('transforms others', () => {
import { Pipe, PipeTransform } from '@angular/core';
-import { Color } from '../enum/color.enum';
+import { CssHelper } from '~/app/shared/classes/css-helper';
+import { HealthColor } from '~/app/shared/enum/health-color.enum';
@Pipe({
name: 'healthColor'
})
export class HealthColorPipe implements PipeTransform {
+ constructor(private cssHelper: CssHelper) {}
+
transform(value: any): any {
- return Color[value] ? { color: Color[value] } : null;
+ return Object.keys(HealthColor).includes(value as HealthColor)
+ ? { color: this.cssHelper.propertyValue(HealthColor[value]) }
+ : null;
}
}
import { Component, NgZone } from '@angular/core';
import { fakeAsync, TestBed, tick } from '@angular/core/testing';
-import { Router, Routes } from '@angular/router';
+import { ActivatedRouteSnapshot, Router, RouterStateSnapshot, Routes } from '@angular/router';
import { RouterTestingModule } from '@angular/router/testing';
import { configureTestBed } from '~/testing/unit-test-helper';
let service: ChangePasswordGuardService;
let authStorageService: AuthStorageService;
let ngZone: NgZone;
+ let route: ActivatedRouteSnapshot;
+ let state: RouterStateSnapshot;
@Component({ selector: 'cd-login-password-form', template: '' })
class LoginPasswordFormComponent {}
it('should do nothing (not logged in)', () => {
spyOn(authStorageService, 'isLoggedIn').and.returnValue(false);
- expect(service.canActivate()).toBeTruthy();
+ expect(service.canActivate(route, state)).toBeTruthy();
});
it('should do nothing (SSO enabled)', () => {
spyOn(authStorageService, 'isLoggedIn').and.returnValue(true);
spyOn(authStorageService, 'isSSO').and.returnValue(true);
- expect(service.canActivate()).toBeTruthy();
+ expect(service.canActivate(route, state)).toBeTruthy();
});
it('should do nothing (no update pwd required)', () => {
spyOn(authStorageService, 'isLoggedIn').and.returnValue(true);
spyOn(authStorageService, 'getPwdUpdateRequired').and.returnValue(false);
- expect(service.canActivate()).toBeTruthy();
+ expect(service.canActivate(route, state)).toBeTruthy();
});
- it('should redirect to change password page', fakeAsync(() => {
+ it('should redirect to change password page by preserving the query params', fakeAsync(() => {
+ route = null;
+ state = { url: '/host', root: null };
spyOn(authStorageService, 'isLoggedIn').and.returnValue(true);
spyOn(authStorageService, 'isSSO').and.returnValue(false);
spyOn(authStorageService, 'getPwdUpdateRequired').and.returnValue(true);
const router = TestBed.inject(Router);
ngZone.run(() => {
- expect(service.canActivate()).toBeFalsy();
+ expect(service.canActivate(route, state)).toBeFalsy();
});
tick();
- expect(router.url).toBe('/login-change-password');
+ expect(router.url).toBe('/login-change-password?returnUrl=%2Fhost');
}));
});
import { Injectable } from '@angular/core';
-import { CanActivate, CanActivateChild, Router } from '@angular/router';
+import {
+ ActivatedRouteSnapshot,
+ CanActivate,
+ CanActivateChild,
+ Router,
+ RouterStateSnapshot
+} from '@angular/router';
import { AuthStorageService } from './auth-storage.service';
export class ChangePasswordGuardService implements CanActivate, CanActivateChild {
constructor(private router: Router, private authStorageService: AuthStorageService) {}
- canActivate() {
+ canActivate(_route: ActivatedRouteSnapshot, state: RouterStateSnapshot) {
// Redirect to '/login-change-password' when the following constraints
// are fulfilled:
// - The user must be logged in.
!this.authStorageService.isSSO() &&
this.authStorageService.getPwdUpdateRequired()
) {
- this.router.navigate(['/login-change-password']);
+ this.router.navigate(['/login-change-password'], { queryParams: { returnUrl: state.url } });
return false;
}
return true;
}
- canActivateChild(): boolean {
- return this.canActivate();
+ canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {
+ return this.canActivate(childRoute, state);
}
}
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
+import { CssHelper } from '~/app/shared/classes/css-helper';
import { configureTestBed } from '~/testing/unit-test-helper';
import { FaviconService } from './favicon.service';
configureTestBed({
imports: [HttpClientTestingModule],
- providers: [FaviconService]
+ providers: [FaviconService, CssHelper]
});
beforeEach(() => {
import { Subscription } from 'rxjs';
-import { Color } from '../enum/color.enum';
+import { CssHelper } from '~/app/shared/classes/css-helper';
+import { HealthColor } from '~/app/shared/enum/health-color.enum';
import { SummaryService } from './summary.service';
@Injectable()
constructor(
@Inject(DOCUMENT) private document: HTMLDocument,
- private summaryService: SummaryService
+ private summaryService: SummaryService,
+ private cssHelper: CssHelper
) {}
init() {
// Draw Original Favicon as Background
context.drawImage(img, 0, 0, faviconSize, faviconSize);
- if (Color[status]) {
+ if (Object.keys(HealthColor).includes(status as HealthColor)) {
// Cut notification circle area
context.save();
context.globalCompositeOperation = 'destination-out';
context.beginPath();
context.arc(canvas.width - radius, radius, radius, 0, 2 * Math.PI);
- context.fillStyle = Color[status];
+ context.fillStyle = this.cssHelper.propertyValue(HealthColor[status]);
context.fill();
}
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
+import { CssHelper } from '~/app/shared/classes/css-helper';
import { ComponentsModule } from './components/components.module';
import { DataTableModule } from './datatable/datatable.module';
import { DirectivesModule } from './directives/directives.module';
imports: [CommonModule, PipesModule, ComponentsModule, DataTableModule, DirectivesModule],
declarations: [],
exports: [ComponentsModule, PipesModule, DataTableModule, DirectivesModule],
- providers: [AuthStorageService, AuthGuardService, FormatterService]
+ providers: [AuthStorageService, AuthGuardService, FormatterService, CssHelper]
})
export class SharedModule {}
<meta charset="utf-8">
<title>Ceph</title>
- <script>
- document.write('<base href="' + document.location+ '" />');
- </script>
-
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="icon" type="image/x-icon" id="cdFavicon" href="favicon.ico">
</head>
import 'jest-preset-angular';
import './jestGlobalMocks';
+
+process.on('unhandledRejection', (error) => {
+ const stack = error['stack'] || '';
+ // Avoid potential hang on test failure when running tests in parallel.
+ throw `WARNING: unhandled rejection: ${error} ${stack}`;
+});
a {
cursor: pointer;
}
-
-:export {
- chartHealthCenterTextColor: #151515;
- chartHealthCenterTextDescriptionColor: #72767b;
- chartHealthColorBlue: #06c;
- chartHealthColorCyan: #73c5c5;
- chartHealthColorGray: #ededed;
- chartHealthColorGreen: #7cc674;
- chartHealthColorLightBlue: #519de9;
- chartHealthColorLightYellow: #f9e0a2;
- chartHealthColorMagenta: #009596;
- chartHealthColorOrange: #ef9234;
- chartHealthColorPurple: #3c3d99;
- chartHealthColorRed: #c9190b;
- chartHealthColorYellow: #f6d173;
- chartHealthTootlipBgColor: #000;
-
- healthColorError: #f00;
- healthColorHealthy: #0b0;
- healthColorWarning: #ffa500;
-}
+++ /dev/null
-export interface Styles {
- chartHealthColorRed: string;
- chartHealthColorBlue: string;
- chartHealthColorOrange: string;
- chartHealthColorYellow: string;
- chartHealthColorMagenta: string;
- chartHealthColorGreen: string;
- chartHealthColorGray: string;
- chartHealthColorLightBlue: string;
- chartHealthColorLightYellow: string;
- chartHealthColorCyan: string;
- chartHealthColorPurple: string;
-
- chartHealthCenterTextColor: string;
- chartHealthCenterTextDescriptionColor: string;
- chartHealthTootlipBgColor: string;
-
- healthColorError: string;
- healthColorWarning: string;
- healthColorHealthy: string;
-}
-
-export const styles: Styles;
-
-export default styles;
) !default;
// Body
-
$body-color-bright: $light !default;
$body-bg: $white !default;
$body-color: $gray-900 !default;
$body-bg-alt: $gray-200 !default;
+// Health colors.
+$health-color-error: #f00 !default;
+$health-color-healthy: $green !default;
+$health-color-warning: #ffa500 !default;
+
+// Chart colors.
+$chart-color-red: #c9190b !default;
+$chart-color-blue: #06c !default;
+$chart-color-orange: #ef9234 !default;
+$chart-color-yellow: #f6d173 !default;
+$chart-color-green: #7cc674 !default;
+$chart-color-gray: #ededed !default;
+$chart-color-cyan: #73c5c5 !default;
+$chart-color-purple: #3c3d99 !default;
+$chart-color-center-text: #151515 !default;
+$chart-color-center-text-description: #72767b !default;
+$chart-color-tooltip-background: $black !default;
+
// Typography
$font-family-sans-serif: 'Helvetica Neue', Helvetica, Arial, 'Noto Sans', sans-serif,
@forward 'style-overrides';
@forward 'variables';
+
+@use 'sass:meta';
+@use 'variables';
+
+@function custom-property-name($name) {
+ @return '--' + $name;
+}
+
+@mixin define-custom-property($name, $value) {
+ #{custom-property-name($name)}: meta.inspect($value);
+}
+
+:root {
+ // Make vendor variables accessible to JS/TS code via CSS custom property definition.
+ @each $key_name, $value in meta.module-variables('variables') {
+ @if type-of($value) != 'map' {
+ @include define-custom-property($key_name, $value);
+ }
+ }
+}
import errno
import logging
import os
-import socket
import ssl
import sys
import tempfile
else:
server_port = self.get_localized_module_option('ssl_server_port', 8443) # type: ignore
+ if server_addr == '::':
+ server_addr = self.get_mgr_ip() # type: ignore
if server_addr is None:
raise ServerConfigException(
'no server_addr configured; '
uri = "{0}://{1}:{2}{3}/".format(
'https' if use_ssl else 'http',
- socket.getfqdn(server_addr if server_addr != '::' else ''),
+ server_addr,
server_port,
self.url_prefix
)
application/json:
schema:
properties:
+ addr:
+ description: Network Address
+ type: string
hostname:
+ description: Hostname
+ type: string
+ labels:
+ description: Host Labels
+ items:
+ type: string
+ type: array
+ status:
+ description: Host Status
type: string
required:
- hostname
responses:
'201':
content:
- application/vnd.ceph.api.v1.0+json:
+ application/vnd.ceph.api.v0.1+json:
type: object
description: Resource created.
'202':
content:
- application/vnd.ceph.api.v1.0+json:
+ application/vnd.ceph.api.v0.1+json:
type: object
description: Operation is still executing. Please check the task queue.
'400':
responses:
'200':
content:
- application/vnd.ceph.api.v1.0+json:
+ application/vnd.ceph.api.v0.1+json:
schema:
properties: {}
type: object
description: Resource updated.
'202':
content:
- application/vnd.ceph.api.v1.0+json:
+ application/vnd.ceph.api.v0.1+json:
type: object
description: Operation is still executing. Please check the task queue.
'400':
pybind_dir+=":$LOCAL_BUILD_DIR/src/pybind"
fi
export PYTHONPATH=$source_dir/qa:$LOCAL_BUILD_DIR/lib/cython_modules/lib.3/:$pybind_dir:$python_common_dir:${COVERAGE_PATH}
- export RGW=${RGW:-1}
+ export DASHBOARD_SSL=1
+ export NFS=0
+ export RGW=1
export COVERAGE_ENABLED=true
export COVERAGE_FILE=.coverage.mgr.dashboard
version = cls.VERSION
return "{}{}".format(cls.ACDB_CONFIG_KEY, version)
+ def check_and_update_db(self):
+ logger.debug("Checking for previous DB versions")
+
+ def check_migrate_v1_to_current():
+ # Check if version 1 exists in the DB and migrate it to current version
+ v1_db = mgr.get_store(self.accessdb_config_key(1))
+ if v1_db:
+ logger.debug("Found database v1 credentials")
+ v1_db = json.loads(v1_db)
+
+ for user, _ in v1_db['users'].items():
+ v1_db['users'][user]['enabled'] = True
+ v1_db['users'][user]['pwdExpirationDate'] = None
+ v1_db['users'][user]['pwdUpdateRequired'] = False
+
+ self.roles = {rn: Role.from_dict(r) for rn, r in v1_db.get('roles', {}).items()}
+ self.users = {un: User.from_dict(u, dict(self.roles, **SYSTEM_ROLES))
+ for un, u in v1_db.get('users', {}).items()}
+
+ self.save()
+
+ check_migrate_v1_to_current()
+
@classmethod
def load(cls):
logger.info("Loading user roles DB version=%s", cls.VERSION)
if json_db is None:
logger.debug("No DB v%s found, creating new...", cls.VERSION)
db = cls(cls.VERSION, {}, {})
+ # check if we can update from a previous version database
+ db.check_and_update_db()
return db
dict_db = json.loads(json_db)
return hosts[0] if hosts else None
@wait_api_result
- def add(self, hostname: str):
- return self.api.add_host(HostSpec(hostname))
+ def add(self, hostname: str, addr: str, labels: List[str]):
+ return self.api.add_host(HostSpec(hostname, addr=addr, labels=labels))
@wait_api_result
def remove(self, hostname: str):
# pylint: disable=unused-argument
from __future__ import absolute_import
+import errno
+
import cherrypy
import rbd
return stat
@classmethod
- def _rbd_image_names(cls, ioctx):
+ def _rbd_image_refs(cls, ioctx):
rbd_inst = rbd.RBD()
- return rbd_inst.list(ioctx)
+ return rbd_inst.list2(ioctx)
@classmethod
def _rbd_image_stat(cls, ioctx, pool_name, namespace, image_name):
return cls._rbd_image(ioctx, pool_name, namespace, image_name)
+ @classmethod
+ def _rbd_image_stat_removing(cls, ioctx, pool_name, namespace, image_id):
+ rbd_inst = rbd.RBD()
+ img = rbd_inst.trash_get(ioctx, image_id)
+ img_spec = get_image_spec(pool_name, namespace, image_id)
+
+ if img['source'] == 'REMOVING':
+ img['unique_id'] = img_spec
+ img['pool_name'] = pool_name
+ img['namespace'] = namespace
+ img['deletion_time'] = "{}Z".format(img['deletion_time'].isoformat())
+ img['deferment_end_time'] = "{}Z".format(img['deferment_end_time'].isoformat())
+ return img
+ raise rbd.ImageNotFound('No image {} in status `REMOVING` found.'.format(img_spec),
+ errno=errno.ENOENT)
+
@classmethod
@ViewCache()
def rbd_pool_list(cls, pool_name, namespace=None):
namespaces.append('')
for current_namespace in namespaces:
ioctx.set_namespace(current_namespace)
- names = cls._rbd_image_names(ioctx)
- for name in names:
+ image_refs = cls._rbd_image_refs(ioctx)
+ for image_ref in image_refs:
try:
- stat = cls._rbd_image_stat(ioctx, pool_name, current_namespace, name)
+ stat = cls._rbd_image_stat(
+ ioctx, pool_name, current_namespace, image_ref['name'])
except rbd.ImageNotFound:
- # may have been removed in the meanwhile
- continue
+ # Check if the RBD has been deleted partially. This happens for example if
+ # the deletion process of the RBD has been started and was interrupted.
+ try:
+ stat = cls._rbd_image_stat_removing(
+ ioctx, pool_name, current_namespace, image_ref['id'])
+ except rbd.ImageNotFound:
+ continue
result.append(stat)
return result
from ..tools import build_url, dict_contains_path, dict_get, json_str_to_object
try:
- from typing import Any, Dict, List, Optional, Tuple
+ from typing import Any, Dict, List, Optional, Tuple, Union
except ImportError:
pass # For typing only
@RestClient.api_put('/{bucket_name}?object-lock')
def set_bucket_locking(self,
- bucket_name,
- mode,
- retention_period_days,
- retention_period_years,
- request=None):
- # type: (str, str, int, int, Optional[object]) -> None
+ bucket_name: str,
+ mode: str,
+ retention_period_days: Optional[Union[int, str]] = None,
+ retention_period_years: Optional[Union[int, str]] = None,
+ request: Optional[object] = None) -> None:
"""
Places the locking configuration on the specified bucket. The
locking configuration will be applied by default to every new
# pylint: disable=unused-argument
# Do some validations.
+ try:
+ retention_period_days = int(retention_period_days) if retention_period_days else 0
+ retention_period_years = int(retention_period_years) if retention_period_years else 0
+ if retention_period_days < 0 or retention_period_years < 0:
+ raise ValueError
+ except (TypeError, ValueError):
+ msg = "Retention period must be a positive integer."
+ raise DashboardException(msg=msg, component='rgw')
if retention_period_days and retention_period_years:
# https://docs.aws.amazon.com/AmazonS3/latest/API/archive-RESTBucketPUTObjectLockConfiguration.html
msg = "Retention period requires either Days or Years. "\
msg = "Retention period requires either Days or Years. "\
"You must specify at least one."
raise DashboardException(msg=msg, component='rgw')
+ if not isinstance(mode, str) or mode.upper() not in ['COMPLIANCE', 'GOVERNANCE']:
+ msg = "Retention mode must be either COMPLIANCE or GOVERNANCE."
+ raise DashboardException(msg=msg, component='rgw')
# Generate the XML data like this:
# <ObjectLockConfiguration>
self.validate_persistent_user('admin', ['read-only'], pass_hash,
'admin User', 'admin@user.com')
+ def test_load_v1(self):
+ self.CONFIG_KEY_DICT['accessdb_v1'] = '''
+ {{
+ "users": {{
+ "admin": {{
+ "username": "admin",
+ "password":
+ "$2b$12$sd0Az7mm3FaJl8kN3b/xwOuztaN0sWUwC1SJqjM4wcDw/s5cmGbLK",
+ "roles": ["block-manager", "test_role"],
+ "name": "admin User",
+ "email": "admin@user.com",
+ "lastUpdate": {}
+ }}
+ }},
+ "roles": {{
+ "test_role": {{
+ "name": "test_role",
+ "description": "Test Role",
+ "scopes_permissions": {{
+ "{}": ["{}", "{}"],
+ "{}": ["{}"]
+ }}
+ }}
+ }},
+ "version": 1
+ }}
+ '''.format(int(round(time.time())), Scope.ISCSI, Permission.READ,
+ Permission.UPDATE, Scope.POOL, Permission.CREATE)
+
+ load_access_control_db()
+ role = self.exec_cmd('ac-role-show', rolename="test_role")
+ self.assertDictEqual(role, {
+ 'name': 'test_role',
+ 'description': "Test Role",
+ 'scopes_permissions': {
+ Scope.ISCSI: [Permission.READ, Permission.UPDATE],
+ Scope.POOL: [Permission.CREATE]
+ }
+ })
+ user = self.exec_cmd('ac-user-show', username="admin")
+ self.assertDictEqual(user, {
+ 'username': 'admin',
+ 'lastUpdate': user['lastUpdate'],
+ 'password':
+ "$2b$12$sd0Az7mm3FaJl8kN3b/xwOuztaN0sWUwC1SJqjM4wcDw/s5cmGbLK",
+ 'pwdExpirationDate': None,
+ 'pwdUpdateRequired': False,
+ 'name': 'admin User',
+ 'email': 'admin@user.com',
+ 'roles': ['block-manager', 'test_role'],
+ 'enabled': True
+ })
+
+ def test_load_v2(self):
+ self.CONFIG_KEY_DICT['accessdb_v2'] = '''
+ {{
+ "users": {{
+ "admin": {{
+ "username": "admin",
+ "password":
+ "$2b$12$sd0Az7mm3FaJl8kN3b/xwOuztaN0sWUwC1SJqjM4wcDw/s5cmGbLK",
+ "pwdExpirationDate": null,
+ "pwdUpdateRequired": false,
+ "roles": ["block-manager", "test_role"],
+ "name": "admin User",
+ "email": "admin@user.com",
+ "lastUpdate": {},
+ "enabled": true
+ }}
+ }},
+ "roles": {{
+ "test_role": {{
+ "name": "test_role",
+ "description": "Test Role",
+ "scopes_permissions": {{
+ "{}": ["{}", "{}"],
+ "{}": ["{}"]
+ }}
+ }}
+ }},
+ "version": 2
+ }}
+ '''.format(int(round(time.time())), Scope.ISCSI, Permission.READ,
+ Permission.UPDATE, Scope.POOL, Permission.CREATE)
+
+ load_access_control_db()
+ role = self.exec_cmd('ac-role-show', rolename="test_role")
+ self.assertDictEqual(role, {
+ 'name': 'test_role',
+ 'description': "Test Role",
+ 'scopes_permissions': {
+ Scope.ISCSI: [Permission.READ, Permission.UPDATE],
+ Scope.POOL: [Permission.CREATE]
+ }
+ })
+ user = self.exec_cmd('ac-user-show', username="admin")
+ self.assertDictEqual(user, {
+ 'username': 'admin',
+ 'lastUpdate': user['lastUpdate'],
+ 'password':
+ "$2b$12$sd0Az7mm3FaJl8kN3b/xwOuztaN0sWUwC1SJqjM4wcDw/s5cmGbLK",
+ 'pwdExpirationDate': None,
+ 'pwdUpdateRequired': False,
+ 'name': 'admin User',
+ 'email': 'admin@user.com',
+ 'roles': ['block-manager', 'test_role'],
+ 'enabled': True
+ })
+
def test_password_policy_pw_length(self):
Settings.PWD_POLICY_CHECK_LENGTH_ENABLED = True
Settings.PWD_POLICY_MIN_LENGTH = 3
# # -*- coding: utf-8 -*-
from __future__ import absolute_import
-from .. import DEFAULT_VERSION
from ..api.doc import SchemaType
from ..controllers import ApiController, ControllerDoc, Endpoint, EndpointDoc, RESTController
from ..controllers.docs import Docs
},
)
@Endpoint(json_response=False)
- @RESTController.Resource('PUT')
+ @RESTController.Resource('PUT', version='0.1')
def decorated_func(self, parameter):
pass
+ @RESTController.MethodMap(version='0.1')
+ def list(self):
+ pass
+
# To assure functionality of @EndpointDoc, @GroupDoc
class DocDecoratorsTest(ControllerTestCase):
self.assertEqual(Docs()._type_to_str(None), str(SchemaType.OBJECT))
def test_gen_paths(self):
- outcome = Docs()._gen_paths(False)['/api/doctest//{doctest}/decorated_func']['put']
+ outcome = Docs().gen_paths(False)['/api/doctest//{doctest}/decorated_func']['put']
self.assertIn('tags', outcome)
self.assertIn('summary', outcome)
self.assertIn('parameters', outcome)
expected_response_content = {
'200': {
- 'application/vnd.ceph.api.v{}+json'.format(DEFAULT_VERSION): {
+ 'application/vnd.ceph.api.v0.1+json': {
'schema': {'type': 'array',
'items': {'type': 'object', 'properties': {
'my_prop': {
'description': '200 property desc.'}}},
'required': ['my_prop']}}},
'202': {
- 'application/vnd.ceph.api.v{}+json'.format(DEFAULT_VERSION): {
+ 'application/vnd.ceph.api.v0.1+json': {
'schema': {'type': 'object',
'properties': {'my_prop': {
'type': 'string',
# Check that a schema of type 'object' is received in the response.
self.assertEqual(expected_response_content['202'], outcome['responses']['202']['content'])
+ def test_gen_method_paths(self):
+ outcome = Docs().gen_paths(False)['/api/doctest/']['get']
+
+ self.assertEqual({'application/vnd.ceph.api.v0.1+json': {'type': 'object'}},
+ outcome['responses']['200']['content'])
+
def test_gen_paths_all(self):
- paths = Docs()._gen_paths(False)
+ paths = Docs().gen_paths(False)
for key in paths:
self.assertTrue(any(base in key.split('/')[1] for base in ['api', 'ui-api']))
self._get('{}/node1'.format(self.URL_HOST))
self.assertStatus(200)
self.assertIn('labels', self.json_body())
+ self.assertIn('status', self.json_body())
+ self.assertIn('addr', self.json_body())
def test_get_3(self):
mgr.list_servers.return_value = []
self._get('{}/node1'.format(self.URL_HOST))
self.assertStatus(200)
self.assertIn('labels', self.json_body())
+ self.assertIn('status', self.json_body())
+ self.assertIn('addr', self.json_body())
+
+ @mock.patch('dashboard.controllers.host.add_host')
+ def test_add_host(self, mock_add_host):
+ with patch_orch(True):
+ payload = {
+ 'hostname': 'node0',
+ 'addr': '192.0.2.0',
+ 'labels': 'mon',
+ 'status': 'maintenance'
+ }
+ self._post(self.URL_HOST, payload, version='0.1')
+ self.assertStatus(201)
+ mock_add_host.assert_called()
def test_set_labels(self):
mgr.list_servers.return_value = []
fake_client.hosts.add_label = mock.Mock()
payload = {'update_labels': True, 'labels': ['bbb', 'ccc']}
- self._put('{}/node0'.format(self.URL_HOST), payload)
+ self._put('{}/node0'.format(self.URL_HOST), payload, version='0.1')
self.assertStatus(200)
+ self.assertHeader('Content-Type',
+ 'application/vnd.ceph.api.v0.1+json')
fake_client.hosts.remove_label.assert_called_once_with('node0', 'aaa')
fake_client.hosts.add_label.assert_called_once_with('node0', 'ccc')
# return 400 if type other than List[str]
self._put('{}/node0'.format(self.URL_HOST), {'update_labels': True,
- 'labels': 'ddd'})
+ 'labels': 'ddd'}, version='0.1')
self.assertStatus(400)
def test_host_maintenance(self):
]
with patch_orch(True, hosts=orch_hosts):
# enter maintenance mode
- self._put('{}/node0'.format(self.URL_HOST), {'maintenance': True})
+ self._put('{}/node0'.format(self.URL_HOST), {'maintenance': True}, version='0.1')
self.assertStatus(200)
+ self.assertHeader('Content-Type',
+ 'application/vnd.ceph.api.v0.1+json')
# force enter maintenance mode
- self._put('{}/node1'.format(self.URL_HOST), {'maintenance': True, 'force': True})
+ self._put('{}/node1'.format(self.URL_HOST), {'maintenance': True, 'force': True},
+ version='0.1')
self.assertStatus(200)
# exit maintenance mode
- self._put('{}/node0'.format(self.URL_HOST), {'maintenance': True})
+ self._put('{}/node0'.format(self.URL_HOST), {'maintenance': True}, version='0.1')
self.assertStatus(200)
- self._put('{}/node1'.format(self.URL_HOST), {'maintenance': True})
+ self._put('{}/node1'.format(self.URL_HOST), {'maintenance': True}, version='0.1')
self.assertStatus(200)
# maintenance without orchestrator service
with patch_orch(False):
- self._put('{}/node0'.format(self.URL_HOST), {'maintenance': True})
+ self._put('{}/node0'.format(self.URL_HOST), {'maintenance': True}, version='0.1')
self.assertStatus(503)
@mock.patch('dashboard.controllers.host.time')
from __future__ import absolute_import
import unittest
+from datetime import datetime
+from unittest.mock import MagicMock
try:
import mock
except ImportError:
import unittest.mock as mock
-from ..services.rbd import RbdConfiguration, get_image_spec, parse_image_spec
+from .. import mgr
+from ..services.rbd import RbdConfiguration, RbdService, get_image_spec, parse_image_spec
+
+
+class ImageNotFoundStub(Exception):
+ def __init__(self, message, errno=None):
+ super(ImageNotFoundStub, self).__init__(
+ 'RBD image not found (%s)' % message, errno)
class RbdServiceTest(unittest.TestCase):
self.assertEqual(config.list(), [])
config = RbdConfiguration('good-pool')
self.assertEqual(config.list(), [1, 2, 3])
+
+ @mock.patch('dashboard.services.rbd.rbd.RBD')
+ def test_rbd_image_stat_removing(self, rbd_mock):
+ time = datetime.utcnow()
+ rbd_inst_mock = rbd_mock.return_value
+ rbd_inst_mock.trash_get.return_value = {
+ 'id': '3c1a5ee60a88',
+ 'name': 'test_rbd',
+ 'source': 'REMOVING',
+ 'deletion_time': time,
+ 'deferment_end_time': time
+ }
+
+ ioctx_mock = MagicMock()
+
+ # pylint: disable=protected-access
+ rbd = RbdService._rbd_image_stat_removing(ioctx_mock, 'test_pool', '', '3c1a5ee60a88')
+ self.assertEqual(rbd, {
+ 'id': '3c1a5ee60a88',
+ 'unique_id': 'test_pool/3c1a5ee60a88',
+ 'name': 'test_rbd',
+ 'source': 'REMOVING',
+ 'deletion_time': '{}Z'.format(time.isoformat()),
+ 'deferment_end_time': '{}Z'.format(time.isoformat()),
+ 'pool_name': 'test_pool',
+ 'namespace': ''
+ })
+
+ @mock.patch('dashboard.services.rbd.rbd.ImageNotFound', new_callable=lambda: ImageNotFoundStub)
+ @mock.patch('dashboard.services.rbd.rbd.RBD')
+ def test_rbd_image_stat_filter_source_user(self, rbd_mock, _):
+ rbd_inst_mock = rbd_mock.return_value
+ rbd_inst_mock.trash_get.return_value = {
+ 'id': '3c1a5ee60a88',
+ 'name': 'test_rbd',
+ 'source': 'USER'
+ }
+
+ ioctx_mock = MagicMock()
+ with self.assertRaises(ImageNotFoundStub) as ctx:
+ # pylint: disable=protected-access
+ RbdService._rbd_image_stat_removing(ioctx_mock, 'test_pool', '', '3c1a5ee60a88')
+ self.assertIn('No image test_pool/3c1a5ee60a88 in status `REMOVING` found.',
+ str(ctx.exception))
+
+ @mock.patch('dashboard.services.rbd.rbd.ImageNotFound', new_callable=lambda: ImageNotFoundStub)
+ @mock.patch('dashboard.services.rbd.RbdService._rbd_image_stat_removing')
+ @mock.patch('dashboard.services.rbd.RbdService._rbd_image_stat')
+ @mock.patch('dashboard.services.rbd.RbdService._rbd_image_refs')
+ @mock.patch('dashboard.services.rbd.rbd.RBD')
+ def test_rbd_pool_list(self, rbd_mock, rbd_image_ref_mock, rbd_image_stat_mock,
+ rbd_image_stat_removing_mock, _):
+ time = datetime.utcnow()
+
+ ioctx_mock = MagicMock()
+ mgr.rados = MagicMock()
+ mgr.rados.open_ioctx.return_value = ioctx_mock
+
+ rbd_inst_mock = rbd_mock.return_value
+ rbd_inst_mock.namespace_list.return_value = []
+ rbd_image_ref_mock.return_value = [{'name': 'test_rbd', 'id': '3c1a5ee60a88'}]
+
+ rbd_image_stat_mock.side_effect = mock.Mock(side_effect=ImageNotFoundStub(
+ 'RBD image not found test_pool/3c1a5ee60a88'))
+
+ rbd_image_stat_removing_mock.return_value = {
+ 'id': '3c1a5ee60a88',
+ 'unique_id': 'test_pool/3c1a5ee60a88',
+ 'name': 'test_rbd',
+ 'source': 'REMOVING',
+ 'deletion_time': '{}Z'.format(time.isoformat()),
+ 'deferment_end_time': '{}Z'.format(time.isoformat()),
+ 'pool_name': 'test_pool',
+ 'namespace': ''
+ }
+
+ rbd_pool_list = RbdService.rbd_pool_list('test_pool')
+ self.assertEqual(rbd_pool_list, (0, [{
+ 'id': '3c1a5ee60a88',
+ 'unique_id': 'test_pool/3c1a5ee60a88',
+ 'name': 'test_rbd',
+ 'source': 'REMOVING',
+ 'deletion_time': '{}Z'.format(time.isoformat()),
+ 'deferment_end_time': '{}Z'.format(time.isoformat()),
+ 'pool_name': 'test_pool',
+ 'namespace': ''
+ }]))
self.assertEqual(['realm1', 'realm2'], instance.get_realms())
self.assertEqual([], instance.get_realms())
+ def test_set_bucket_locking_error(self):
+ instance = RgwClient.admin_instance()
+ test_params = [
+ ('COMPLIANCE', 'null', None, 'must be a positive integer'),
+ ('COMPLIANCE', None, 'null', 'must be a positive integer'),
+ ('COMPLIANCE', -1, None, 'must be a positive integer'),
+ ('COMPLIANCE', None, -1, 'must be a positive integer'),
+ ('COMPLIANCE', 1, 1, 'You can\'t specify both at the same time'),
+ ('COMPLIANCE', None, None, 'You must specify at least one'),
+ ('COMPLIANCE', 0, 0, 'You must specify at least one'),
+ (None, 1, 0, 'must be either COMPLIANCE or GOVERNANCE'),
+ ('', 1, 0, 'must be either COMPLIANCE or GOVERNANCE'),
+ ('FAKE_MODE', 1, 0, 'must be either COMPLIANCE or GOVERNANCE')
+ ]
+ for params in test_params:
+ mode, days, years, error_msg = params
+ with self.assertRaises(DashboardException) as cm:
+ instance.set_bucket_locking(
+ bucket_name='test',
+ mode=mode,
+ retention_period_days=days,
+ retention_period_years=years
+ )
+ self.assertIn(error_msg, str(cm.exception))
+
+ @patch('dashboard.rest_client._Request', Mock())
+ def test_set_bucket_locking_success(self):
+ instance = RgwClient.admin_instance()
+ test_params = [
+ ('Compliance', '1', None),
+ ('Governance', 1, None),
+ ('COMPLIANCE', None, '1'),
+ ('GOVERNANCE', None, 1),
+ ]
+ for params in test_params:
+ mode, days, years = params
+ self.assertIsNone(instance.set_bucket_locking(
+ bucket_name='test',
+ mode=mode,
+ retention_period_days=days,
+ retention_period_years=years
+ ))
+
class RgwClientHelperTest(TestCase):
def test_parse_frontend_config_1(self):
class VTest(RESTController):
RESOURCE_ID = "vid"
+ @RESTController.MethodMap(version="0.1")
def list(self):
return {'version': ""}
def setup_server(cls):
cls.setup_controllers([VTest], "/test")
+ def test_list(self):
+ for (version, expected_status) in [
+ ("0.1", 200),
+ ("2.0", 415)
+ ]:
+ with self.subTest(version=version):
+ self._get('/test/api/vtest', version=version)
+ self.assertStatus(expected_status)
+
def test_v1(self):
for (version, expected_status) in [
("1.0", 200),
(daemon_type, daemon_id) = who.split('.')
return self.scrape_daemon(daemon_type, daemon_id)
- @CLICommand('device scrape-daemon-health-metrics',
+ @CLICommand('device scrape-health-metrics',
perm='r')
def do_scrape_health_metrics(self, devid: Optional[str] = None) -> Tuple[int, str, str]:
'''
from enum import IntEnum
import rados
import re
+import socket
import sys
import time
from ceph_argparse import CephArgtype
def find_takes(self) -> List[int]:
return self._find_takes().get('takes', [])
+ def find_roots(self) -> List[int]:
+ return self._find_roots().get('roots', [])
+
def get_take_weight_osd_map(self, root: int) -> Dict[int, float]:
uglymap = self._get_take_weight_osd_map(root)
return {int(k): v for k, v in uglymap.get('weights', {}).items()}
def get_active_uri(self) -> str:
return self._ceph_get_active_uri()
+ def get(self, data_name: str):
+ return self._ceph_get(data_name)
+
+ def get_mgr_ip(self) -> str:
+ ips = self.get("mgr_ips").get('ips', [])
+ if not ips:
+ return socket.gethostname()
+ return ips[0]
+
def get_localized_module_option(self, key: str, default: OptionValue = None) -> OptionValue:
r = self._ceph_get_module_option(key, self.get_mgr_id())
if r is None:
"""
return self._ceph_get_mgr_id()
+ def get_ceph_conf_path(self) -> str:
+ return self._ceph_get_ceph_conf_path()
+
+ def get_mgr_ip(self) -> str:
+ ips = self.get("mgr_ips").get('ips', [])
+ if not ips:
+ return socket.gethostname()
+ return ips[0]
+
def get_ceph_option(self, key: str) -> OptionValue:
return self._ceph_get_option(key)
logger.debug("Setting user ID and group ID of CephFS mount as root...")
self.fs.conf_set("client_mount_uid", "0")
self.fs.conf_set("client_mount_gid", "0")
+ self.fs.conf_set("client_check_pool_perm", "false")
logger.debug("CephFS initializing...")
self.fs.init()
logger.debug("CephFS mounting...")
self.dir_states[dir_path] = DirectoryState(instance_id, dir_map['last_shuffled'])
dir_state = self.dir_states[dir_path]
state = State.INITIALIZING if instance_id else State.ASSOCIATING
- if instance_id:
- purging = dir_mapping.get('purging', False)
- if purging:
- dir_state.purging = True
- state = State.DISASSOCIATING
- else:
- state = State.INITIALIZING
- else:
- state = State.ASSOCIATING
- log.debug(f'starting state: {dir_path} {state}')
+ purging = dir_map.get('purging', 0)
+ if purging:
+ dir_state.purging = True
+ state = State.DISASSOCIATING
+ if not instance_id:
+ dir_state.transition = StateTransition.transit(state,
+ dir_state.transition.action_type)
+ log.debug(f'starting state: {dir_path} {state}: {dir_state}')
self.set_state(dir_state, state)
log.debug(f'init dir_state: {dir_state}')
stalled = not self.execute_policy_action(dir_path, dir_state,
dir_state.transition.start_policy_action)
if stalled:
- dir_state.stalled = True
- log.debug(f'state machine stalled')
- return ActionType.NONE
+ next_action = ActionType.NONE
+ if dir_state.purging:
+ dir_state.next_state = None
+ dir_state.state = State.UNASSOCIATED
+ dir_state.transition = StateTransition.transit(State.DISASSOCIATING, ActionType.NONE)
+ self.set_state(dir_state, State.DISASSOCIATING)
+ next_action = dir_state.transition.action_type
+ else:
+ dir_state.stalled = True
+ log.debug(f'state machine stalled')
+ return next_action
return dir_state.transition.action_type
def finish_action(self, dir_path, r):
return False
log.debug(f'removing dir_state: {dir_state}')
dir_state.purging = True
- return self.set_state(dir_state, State.DISASSOCIATING)
+ # advance the state machine with DISASSOCIATING state for removal
+ if dir_state.stalled:
+ dir_state.state = State.UNASSOCIATED
+ dir_state.transition = StateTransition.transit(State.DISASSOCIATING, ActionType.NONE)
+ r = self.set_state(dir_state, State.DISASSOCIATING)
+ log.debug(f'dir_state: {dir_state}')
+ return r
def add_instances_initial(self, instance_ids):
"""Take care of figuring out instances which no longer exist
import stat
import threading
import uuid
+from typing import Dict, Any
import cephfs
import rados
return True
return False
- def get_mirror_info(self, remote_fs):
+ @staticmethod
+ def get_mirror_info(fs):
try:
- val = remote_fs.getxattr('/', 'ceph.mirror.info')
+ val = fs.getxattr('/', 'ceph.mirror.info')
match = re.search(r'^cluster_id=([a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}) fs_id=(\d+)$',
val.decode('utf-8'))
if match and len(match.groups()) == 2:
return {'cluster_id': match.group(1),
'fs_id': int(match.group(2))
}
- return None
+ raise MirrorException(-errno.EINVAL, 'invalid ceph.mirror.info value format')
except cephfs.Error as e:
- return None
+ raise MirrorException(-e.errno, 'error fetching ceph.mirror.info xattr')
- def set_mirror_info(self, local_cluster_id, local_fsid, remote_fs):
+ @staticmethod
+ def set_mirror_info(local_cluster_id, local_fsid, remote_fs):
log.info(f'setting {local_cluster_id}::{local_fsid} on remote')
try:
remote_fs.setxattr('/', 'ceph.mirror.info',
f'cluster_id={local_cluster_id} fs_id={local_fsid}'.encode('utf-8'), os.XATTR_CREATE)
except cephfs.Error as e:
if e.errno == errno.EEXIST:
- mi = self.get_mirror_info(remote_fs)
- if not mi:
- log.error(f'error fetching mirror info when setting mirror info')
- raise Exception(-errno.EINVAL)
- cluster_id = mi['cluster_id']
- fs_id = mi['fs_id']
- if not (cluster_id == local_cluster_id and fs_id == local_fsid):
- raise MirrorException(-errno.EEXIST, f'peer mirrorred by: (cluster_id: {cluster_id}, fs_id: {fs_id})')
+ try:
+ mi = FSSnapshotMirror.get_mirror_info(remote_fs)
+ cluster_id = mi['cluster_id']
+ fs_id = mi['fs_id']
+ if not (cluster_id == local_cluster_id and fs_id == local_fsid):
+ raise MirrorException(-errno.EEXIST, f'peer mirrorred by: (cluster_id: {cluster_id}, fs_id: {fs_id})')
+ except MirrorException:
+ # if mirror info cannot be fetched for some reason, let's just
+ # fail.
+ raise MirrorException(-errno.EEXIST, f'already an active peer')
else:
log.error(f'error setting mirrored fsid: {e}')
raise Exception(-e.errno)
client_name, cluster_name = FSSnapshotMirror.split_spec(remote_cluster_spec)
remote_cluster, remote_fs = connect_to_filesystem(client_name, cluster_name, remote_fs_name,
'remote', conf_dct=remote_conf)
- if 'fsid' in remote_conf:
- if not remote_cluster.get_fsid() == remote_conf['fsid']:
- raise MirrorException(-errno.EINVAL, 'FSID mismatch between bootstrap token and remote cluster')
-
- local_fsid = FSSnapshotMirror.get_filesystem_id(local_fs_name, self.fs_map)
- if local_fsid is None:
- log.error(f'error looking up filesystem id for {local_fs_name}')
- raise Exception(-errno.EINVAL)
-
- # post cluster id comparison, filesystem name comparison would suffice
- local_cluster_id = self.rados.get_fsid()
- remote_cluster_id = remote_cluster.get_fsid()
- log.debug(f'local_cluster_id={local_cluster_id} remote_cluster_id={remote_cluster_id}')
- if local_cluster_id == remote_cluster_id and local_fs_name == remote_fs_name:
- raise MirrorException(-errno.EINVAL, "'Source and destination cluster fsid and "\
- "file-system name can't be the same")
-
try:
- self.set_mirror_info(local_cluster_id, local_fsid, remote_fs)
+ local_cluster_id = self.rados.get_fsid()
+ remote_cluster_id = remote_cluster.get_fsid()
+ log.debug(f'local_cluster_id={local_cluster_id} remote_cluster_id={remote_cluster_id}')
+ if 'fsid' in remote_conf:
+ if not remote_cluster_id == remote_conf['fsid']:
+ raise MirrorException(-errno.EINVAL, 'FSID mismatch between bootstrap token and remote cluster')
+
+ local_fscid = remote_fscid = None
+ with open_filesystem(self.local_fs, local_fs_name) as local_fsh:
+ local_fscid = local_fsh.get_fscid()
+ remote_fscid = remote_fs.get_fscid()
+ log.debug(f'local_fscid={local_fscid} remote_fscid={remote_fscid}')
+ mi = None
+ try:
+ mi = FSSnapshotMirror.get_mirror_info(local_fsh)
+ except MirrorException as me:
+ if me.args[0] != -errno.ENODATA:
+ raise Exception(-errno.EINVAL)
+ if mi and mi['cluster_id'] == remote_cluster_id and mi['fs_id'] == remote_fscid:
+ raise MirrorException(-errno.EINVAL, f'file system is an active peer for file system: {remote_fs_name}')
+
+ if local_cluster_id == remote_cluster_id and local_fscid == remote_fscid:
+ raise MirrorException(-errno.EINVAL, "'Source and destination cluster fsid and "\
+ "file-system name can't be the same")
+ FSSnapshotMirror.set_mirror_info(local_cluster_id, local_fscid, remote_fs)
finally:
disconnect_from_filesystem(cluster_name, remote_fs_name, remote_cluster, remote_fs)
fspolicy = self.pool_policy.get(filesystem, None)
if not fspolicy:
raise MirrorException(-errno.EINVAL, f'filesystem {filesystem} is not mirrored')
- daemons = {}
+ daemons = []
sm = self.mgr.get('service_map')
daemon_entry = sm['services'].get('cephfs-mirror', None)
- if daemon_entry:
- for daemon_key in daemon_entry['daemons']:
- try:
- daemon_id = int(daemon_key)
- daemon_status = self.mgr.get_daemon_status('cephfs-mirror', daemon_key)
- if not daemon_status:
- # temporary, should get updated soon
- log.debug(f'daemon status not yet availble for daemon_id {daemon_id}')
- continue
- try:
- daemons[daemon_id] = json.loads(daemon_status['status_json'])
- except KeyError:
- # temporary, should get updated soon
- log.debug(f'daemon status not yet available for daemon_id {daemon_id}')
- except ValueError:
- pass
+ log.debug(f'daemon_entry: {daemon_entry}')
+ for daemon_key in daemon_entry.get('daemons', []):
+ try:
+ daemon_id = int(daemon_key)
+ except ValueError:
+ continue
+ daemon = {
+ 'daemon_id' : daemon_id,
+ 'filesystems' : []
+ } # type: Dict[str, Any]
+ daemon_status = self.mgr.get_daemon_status('cephfs-mirror', daemon_key)
+ if not daemon_status:
+ log.debug(f'daemon status not yet availble for cephfs-mirror daemon: {daemon_key}')
+ continue
+ status = json.loads(daemon_status['status_json'])
+ for fs_id, fs_desc in status.items():
+ fs = {'filesystem_id' : int(fs_id),
+ 'name' : fs_desc['name'],
+ 'directory_count' : fs_desc['directory_count'],
+ 'peers' : []
+ } # type: Dict[str, Any]
+ for peer_uuid, peer_desc in fs_desc['peers'].items():
+ peer = {
+ 'uuid' : peer_uuid,
+ 'remote' : peer_desc['remote'],
+ 'stats' : peer_desc['stats']
+ }
+ fs['peers'].append(peer)
+ daemon['filesystems'].append(fs)
+ daemons.append(daemon)
return 0, json.dumps(daemons), ''
except MirrorException as me:
return me.args[0], '', me.args[1]
fs = cephfs.LibCephFS(rados_inst=cluster)
fs.conf_set("client_mount_uid", "0")
fs.conf_set("client_mount_gid", "0")
+ fs.conf_set("client_check_pool_perm", "false")
log.debug('CephFS initializing...')
fs.init()
log.debug('CephFS mounting...')
--- /dev/null
+from .module import Module
--- /dev/null
+import logging
+import socket
+import json
+import re
+from typing import cast, Dict, List, Any, Union, Optional
+
+from ceph.deployment.service_spec import NFSServiceSpec, PlacementSpec, IngressSpec
+
+import orchestrator
+
+from .exception import NFSInvalidOperation, ClusterNotFound
+from .utils import POOL_NAME, available_clusters, restart_nfs_service
+from .export import NFSRados, exception_handler
+
+log = logging.getLogger(__name__)
+
+
+def resolve_ip(hostname: str) -> str:
+ try:
+ r = socket.getaddrinfo(hostname, None, flags=socket.AI_CANONNAME,
+ type=socket.SOCK_STREAM)
+ # pick first v4 IP, if present
+ for a in r:
+ if a[0] == socket.AF_INET:
+ return a[4][0]
+ return r[0][4][0]
+ except socket.gaierror as e:
+ raise NFSInvalidOperation(f"Cannot resolve IP for host {hostname}: {e}")
+
+
+def cluster_setter(func):
+ def set_pool_ns_clusterid(nfs, *args, **kwargs):
+ nfs._set_pool_namespace(kwargs['cluster_id'])
+ nfs._set_cluster_id(kwargs['cluster_id'])
+ return func(nfs, *args, **kwargs)
+ return set_pool_ns_clusterid
+
+
+def create_ganesha_pool(mgr, pool):
+ pool_list = [p['pool_name'] for p in mgr.get_osdmap().dump().get('pools', [])]
+ if pool not in pool_list:
+ mgr.check_mon_command({'prefix': 'osd pool create', 'pool': pool})
+ mgr.check_mon_command({'prefix': 'osd pool application enable',
+ 'pool': pool,
+ 'app': 'nfs'})
+
+
+class NFSCluster:
+ def __init__(self, mgr):
+ self.pool_name = POOL_NAME
+ self.pool_ns = ''
+ self.mgr = mgr
+
+ def _set_cluster_id(self, cluster_id):
+ self.cluster_id = cluster_id
+
+ def _set_pool_namespace(self, cluster_id):
+ self.pool_ns = cluster_id
+
+ def _get_common_conf_obj_name(self):
+ return f'conf-nfs.{self.cluster_id}'
+
+ def _get_user_conf_obj_name(self):
+ return f'userconf-nfs.{self.cluster_id}'
+
+ def _call_orch_apply_nfs(self, placement, virtual_ip=None):
+ if virtual_ip:
+ # nfs + ingress
+ # run NFS on non-standard port
+ spec = NFSServiceSpec(service_type='nfs', service_id=self.cluster_id,
+ pool=self.pool_name, namespace=self.pool_ns,
+ placement=PlacementSpec.from_string(placement),
+ # use non-default port so we don't conflict with ingress
+ port=12049)
+ completion = self.mgr.apply_nfs(spec)
+ orchestrator.raise_if_exception(completion)
+ ispec = IngressSpec(service_type='ingress',
+ service_id='nfs.' + self.cluster_id,
+ backend_service='nfs.' + self.cluster_id,
+ frontend_port=2049, # default nfs port
+ monitor_port=9049,
+ virtual_ip=virtual_ip)
+ completion = self.mgr.apply_ingress(ispec)
+ orchestrator.raise_if_exception(completion)
+ else:
+ # standalone nfs
+ spec = NFSServiceSpec(service_type='nfs', service_id=self.cluster_id,
+ pool=self.pool_name, namespace=self.pool_ns,
+ placement=PlacementSpec.from_string(placement))
+ completion = self.mgr.apply_nfs(spec)
+ orchestrator.raise_if_exception(completion)
+
+ def create_empty_rados_obj(self):
+ common_conf = self._get_common_conf_obj_name()
+ NFSRados(self.mgr, self.pool_ns).write_obj('', self._get_common_conf_obj_name())
+ log.info(f"Created empty object:{common_conf}")
+
+ def delete_config_obj(self):
+ NFSRados(self.mgr, self.pool_ns).remove_all_obj()
+ log.info(f"Deleted {self._get_common_conf_obj_name()} object and all objects in "
+ f"{self.pool_ns}")
+
+ @cluster_setter
+ def create_nfs_cluster(self,
+ cluster_id: str,
+ placement: Optional[str],
+ virtual_ip: Optional[str],
+ ingress: Optional[bool] = None):
+ try:
+ if virtual_ip and not ingress:
+ raise NFSInvalidOperation('virtual_ip can only be provided with ingress enabled')
+ if not virtual_ip and ingress:
+ raise NFSInvalidOperation('ingress currently requires a virtual_ip')
+ invalid_str = re.search('[^A-Za-z0-9-_.]', cluster_id)
+ if invalid_str:
+ raise NFSInvalidOperation(f"cluster id {cluster_id} is invalid. "
+ f"{invalid_str.group()} is char not permitted")
+
+ create_ganesha_pool(self.mgr, self.pool_name)
+
+ self.create_empty_rados_obj()
+
+ if cluster_id not in available_clusters(self.mgr):
+ self._call_orch_apply_nfs(placement, virtual_ip)
+ return 0, "NFS Cluster Created Successfully", ""
+ return 0, "", f"{cluster_id} cluster already exists"
+ except Exception as e:
+ return exception_handler(e, f"NFS Cluster {cluster_id} could not be created")
+
+ @cluster_setter
+ def delete_nfs_cluster(self, cluster_id):
+ try:
+ cluster_list = available_clusters(self.mgr)
+ if cluster_id in cluster_list:
+ self.mgr.export_mgr.delete_all_exports(cluster_id)
+ completion = self.mgr.remove_service('ingress.nfs.' + self.cluster_id)
+ orchestrator.raise_if_exception(completion)
+ completion = self.mgr.remove_service('nfs.' + self.cluster_id)
+ orchestrator.raise_if_exception(completion)
+ self.delete_config_obj()
+ return 0, "NFS Cluster Deleted Successfully", ""
+ return 0, "", "Cluster does not exist"
+ except Exception as e:
+ return exception_handler(e, f"Failed to delete NFS Cluster {cluster_id}")
+
+ def list_nfs_cluster(self):
+ try:
+ return 0, '\n'.join(available_clusters(self.mgr)), ""
+ except Exception as e:
+ return exception_handler(e, "Failed to list NFS Cluster")
+
+ def _show_nfs_cluster_info(self, cluster_id: str) -> Dict[str, Any]:
+ self._set_cluster_id(cluster_id)
+ completion = self.mgr.list_daemons(daemon_type='nfs')
+ orchestrator.raise_if_exception(completion)
+ backends: List[Dict[str, Union[str, int]]] = []
+ # Here completion.result is a list DaemonDescription objects
+ for cluster in completion.result:
+ if self.cluster_id == cluster.service_id():
+ try:
+ if cluster.ip:
+ ip = cluster.ip
+ else:
+ c = self.mgr.get_hosts()
+ orchestrator.raise_if_exception(c)
+ hosts = [h for h in c.result
+ if h.hostname == cluster.hostname]
+ if hosts:
+ ip = resolve_ip(hosts[0].addr)
+ else:
+ # sigh
+ ip = resolve_ip(cluster.hostname)
+ backends.append({
+ "hostname": cluster.hostname,
+ "ip": ip,
+ "port": cluster.ports[0]
+ })
+ except orchestrator.OrchestratorError:
+ continue
+
+ r: Dict[str, Any] = {
+ 'virtual_ip': None,
+ 'backend': backends,
+ }
+ sc = self.mgr.describe_service(service_type='ingress')
+ orchestrator.raise_if_exception(sc)
+ for i in sc.result:
+ spec = cast(IngressSpec, i.spec)
+ if spec.backend_service == f'nfs.{cluster_id}':
+ r['virtual_ip'] = i.virtual_ip.split('/')[0]
+ if i.ports:
+ r['port'] = i.ports[0]
+ if len(i.ports) > 1:
+ r['monitor_port'] = i.ports[1]
+ return r
+
+ def show_nfs_cluster_info(self, cluster_id=None):
+ try:
+ cluster_ls = []
+ info_res = {}
+ if cluster_id:
+ cluster_ls = [cluster_id]
+ else:
+ cluster_ls = available_clusters(self.mgr)
+
+ for cluster_id in cluster_ls:
+ res = self._show_nfs_cluster_info(cluster_id)
+ if res:
+ info_res[cluster_id] = res
+ return (0, json.dumps(info_res, indent=4), '')
+ except Exception as e:
+ return exception_handler(e, "Failed to show info for cluster")
+
+ @cluster_setter
+ def set_nfs_cluster_config(self, cluster_id, nfs_config):
+ try:
+ if not nfs_config:
+ raise NFSInvalidOperation("Empty Config!!")
+ if cluster_id in available_clusters(self.mgr):
+ rados_obj = NFSRados(self.mgr, self.pool_ns)
+ if rados_obj.check_user_config():
+ return 0, "", "NFS-Ganesha User Config already exists"
+ rados_obj.write_obj(nfs_config, self._get_user_conf_obj_name(),
+ self._get_common_conf_obj_name())
+ restart_nfs_service(self.mgr, cluster_id)
+ return 0, "NFS-Ganesha Config Set Successfully", ""
+ raise ClusterNotFound()
+ except NotImplementedError:
+ return 0, "NFS-Ganesha Config Added Successfully "\
+ "(Manual Restart of NFS PODS required)", ""
+ except Exception as e:
+ return exception_handler(e, f"Setting NFS-Ganesha Config failed for {cluster_id}")
+
+ @cluster_setter
+ def reset_nfs_cluster_config(self, cluster_id):
+ try:
+ if cluster_id in available_clusters(self.mgr):
+ rados_obj = NFSRados(self.mgr, self.pool_ns)
+ if not rados_obj.check_user_config():
+ return 0, "", "NFS-Ganesha User Config does not exist"
+ rados_obj.remove_obj(self._get_user_conf_obj_name(),
+ self._get_common_conf_obj_name())
+ restart_nfs_service(self.mgr, cluster_id)
+ return 0, "NFS-Ganesha Config Reset Successfully", ""
+ raise ClusterNotFound()
+ except NotImplementedError:
+ return 0, "NFS-Ganesha Config Removed Successfully "\
+ "(Manual Restart of NFS PODS required)", ""
+ except Exception as e:
+ return exception_handler(e, f"Resetting NFS-Ganesha Config failed for {cluster_id}")
--- /dev/null
+import errno
+
+
+class NFSException(Exception):
+ def __init__(self, errno, err_msg):
+ super(NFSException, self).__init__(errno, err_msg)
+ self.errno = errno
+ self.err_msg = err_msg
+
+ def __str__(self):
+ return self.err_msg
+
+
+class NFSInvalidOperation(NFSException):
+ def __init__(self, err_msg):
+ super(NFSInvalidOperation, self).__init__(-errno.EINVAL, err_msg)
+
+
+class NFSObjectNotFound(NFSException):
+ def __init__(self, err_msg):
+ super(NFSObjectNotFound, self).__init__(-errno.ENOENT, err_msg)
+
+
+class FSNotFound(NFSObjectNotFound):
+ def __init__(self, fs_name):
+ super(FSNotFound, self).__init__(f'filesystem {fs_name} not found')
+
+
+class ClusterNotFound(NFSObjectNotFound):
+ def __init__(self):
+ super(ClusterNotFound, self).__init__('cluster does not exist')
--- /dev/null
+import errno
+import json
+import logging
+from typing import List
+from os.path import isabs, normpath
+
+from rados import TimedOut, ObjectNotFound
+
+from .export_utils import GaneshaConfParser, Export
+from .exception import NFSException, NFSInvalidOperation, NFSObjectNotFound, FSNotFound, \
+ ClusterNotFound
+from .utils import POOL_NAME, available_clusters, restart_nfs_service, check_fs
+
+log = logging.getLogger(__name__)
+
+
+def export_cluster_checker(func):
+ def cluster_check(fs_export, *args, **kwargs):
+ """
+ This method checks if cluster exists and sets rados namespace.
+ """
+ if kwargs['cluster_id'] not in available_clusters(fs_export.mgr):
+ return -errno.ENOENT, "", "Cluster does not exists"
+ fs_export.rados_namespace = kwargs['cluster_id']
+ return func(fs_export, *args, **kwargs)
+ return cluster_check
+
+
+def exception_handler(exception_obj, log_msg=""):
+ if log_msg:
+ log.exception(log_msg)
+ return getattr(exception_obj, 'errno', -1), "", str(exception_obj)
+
+
+class NFSRados:
+ def __init__(self, mgr, namespace):
+ self.mgr = mgr
+ self.pool = POOL_NAME
+ self.namespace = namespace
+
+ def _make_rados_url(self, obj):
+ return "rados://{}/{}/{}".format(self.pool, self.namespace, obj)
+
+ def _create_url_block(self, obj_name):
+ return {'block_name': '%url', 'value': self._make_rados_url(obj_name)}
+
+ def write_obj(self, conf_block, obj, config_obj=''):
+ if 'export-' in obj:
+ conf_block = GaneshaConfParser.write_block(conf_block)
+
+ with self.mgr.rados.open_ioctx(self.pool) as ioctx:
+ ioctx.set_namespace(self.namespace)
+ ioctx.write_full(obj, conf_block.encode('utf-8'))
+ if not config_obj:
+ # Return after creating empty common config object
+ return
+ log.debug("write configuration into rados object "
+ f"{self.pool}/{self.namespace}/{obj}:\n{conf_block}")
+
+ # Add created obj url to common config obj
+ ioctx.append(config_obj, GaneshaConfParser.write_block(
+ self._create_url_block(obj)).encode('utf-8'))
+ ExportMgr._check_rados_notify(ioctx, config_obj)
+ log.debug(f"Added {obj} url to {config_obj}")
+
+ def update_obj(self, conf_block, obj, config_obj):
+ with self.mgr.rados.open_ioctx(self.pool) as ioctx:
+ ioctx.set_namespace(self.namespace)
+ ioctx.write_full(obj, conf_block.encode('utf-8'))
+ log.debug("write configuration into rados object "
+ f"{self.pool}/{self.namespace}/{obj}:\n{conf_block}")
+ ExportMgr._check_rados_notify(ioctx, config_obj)
+ log.debug(f"Update export {obj} in {config_obj}")
+
+ def remove_obj(self, obj, config_obj):
+ with self.mgr.rados.open_ioctx(self.pool) as ioctx:
+ ioctx.set_namespace(self.namespace)
+ export_urls = ioctx.read(config_obj)
+ url = '%url "{}"\n\n'.format(self._make_rados_url(obj))
+ export_urls = export_urls.replace(url.encode('utf-8'), b'')
+ ioctx.remove_object(obj)
+ ioctx.write_full(config_obj, export_urls)
+ ExportMgr._check_rados_notify(ioctx, config_obj)
+ log.debug("Object deleted: {}".format(url))
+
+ def remove_all_obj(self):
+ with self.mgr.rados.open_ioctx(self.pool) as ioctx:
+ ioctx.set_namespace(self.namespace)
+ for obj in ioctx.list_objects():
+ obj.remove()
+
+ def check_user_config(self):
+ with self.mgr.rados.open_ioctx(self.pool) as ioctx:
+ ioctx.set_namespace(self.namespace)
+ for obj in ioctx.list_objects():
+ if obj.key.startswith("userconf-nfs"):
+ return True
+ return False
+
+
+class ValidateExport:
+ @staticmethod
+ def pseudo_path(path):
+ if not isabs(path) or path == "/":
+ raise NFSInvalidOperation(f"pseudo path {path} is invalid. It should be an absolute "
+ "path and it cannot be just '/'.")
+
+ @staticmethod
+ def squash(squash):
+ valid_squash_ls = ["root", "root_squash", "rootsquash", "rootid", "root_id_squash",
+ "rootidsquash", "all", "all_squash", "allsquash", "all_anomnymous",
+ "allanonymous", "no_root_squash", "none", "noidsquash"]
+ if squash not in valid_squash_ls:
+ raise NFSInvalidOperation(f"squash {squash} not in valid list {valid_squash_ls}")
+
+ @staticmethod
+ def security_label(label):
+ if not isinstance(label, bool):
+ raise NFSInvalidOperation('Only boolean values allowed')
+
+ @staticmethod
+ def protocols(proto):
+ for p in proto:
+ if p not in [3, 4]:
+ raise NFSInvalidOperation(f"Invalid protocol {p}")
+ if 3 in proto:
+ log.warning("NFS V3 is an old version, it might not work")
+
+ @staticmethod
+ def transport(transport):
+ valid_transport = ["UDP", "TCP"]
+ for trans in transport:
+ if trans.upper() not in valid_transport:
+ raise NFSInvalidOperation(f'{trans} is not a valid transport protocol')
+
+ @staticmethod
+ def access_type(access_type):
+ valid_ones = ['RW', 'RO']
+ if access_type not in valid_ones:
+ raise NFSInvalidOperation(f'{access_type} is invalid, valid access type are'
+ f'{valid_ones}')
+
+ @staticmethod
+ def fsal(mgr, old, new):
+ if old.name != new['name']:
+ raise NFSInvalidOperation('FSAL name change not allowed')
+ if old.user_id != new['user_id']:
+ raise NFSInvalidOperation('User ID modification is not allowed')
+ if new['sec_label_xattr']:
+ raise NFSInvalidOperation('Security label xattr cannot be changed')
+ if old.fs_name != new['fs_name']:
+ if not check_fs(mgr, new['fs_name']):
+ raise FSNotFound(new['fs_name'])
+ return 1
+
+ @staticmethod
+ def _client(client):
+ ValidateExport.access_type(client['access_type'])
+ ValidateExport.squash(client['squash'])
+
+ @staticmethod
+ def clients(clients_ls):
+ for client in clients_ls:
+ ValidateExport._client(client)
+
+
+class ExportMgr:
+ def __init__(self, mgr, namespace=None, export_ls=None):
+ self.mgr = mgr
+ self.rados_pool = POOL_NAME
+ self.rados_namespace = namespace
+ self._exports = export_ls
+
+ @staticmethod
+ def _check_rados_notify(ioctx, obj):
+ try:
+ ioctx.notify(obj)
+ except TimedOut:
+ log.exception(f"Ganesha timed out")
+
+ @property
+ def exports(self):
+ if self._exports is None:
+ self._exports = {}
+ log.info("Begin export parsing")
+ for cluster_id in available_clusters(self.mgr):
+ self.export_conf_objs = [] # type: List[Export]
+ self._read_raw_config(cluster_id)
+ self.exports[cluster_id] = self.export_conf_objs
+ log.info(f"Exports parsed successfully {self.exports.items()}")
+ return self._exports
+
+ def _fetch_export(self, pseudo_path):
+ try:
+ for ex in self.exports[self.rados_namespace]:
+ if ex.pseudo == pseudo_path:
+ return ex
+ except KeyError:
+ pass
+
+ def _delete_user(self, entity):
+ self.mgr.check_mon_command({
+ 'prefix': 'auth rm',
+ 'entity': 'client.{}'.format(entity),
+ })
+ log.info(f"Export user deleted is {entity}")
+
+ def _gen_export_id(self):
+ exports = sorted([ex.export_id for ex in self.exports[self.rados_namespace]])
+ nid = 1
+ for e_id in exports:
+ if e_id == nid:
+ nid += 1
+ else:
+ break
+ return nid
+
+ def _read_raw_config(self, rados_namespace):
+ with self.mgr.rados.open_ioctx(self.rados_pool) as ioctx:
+ ioctx.set_namespace(rados_namespace)
+ for obj in ioctx.list_objects():
+ if obj.key.startswith("export-"):
+ size, _ = obj.stat()
+ raw_config = obj.read(size)
+ raw_config = raw_config.decode("utf-8")
+ log.debug("read export configuration from rados "
+ "object %s/%s/%s:\n%s", self.rados_pool,
+ rados_namespace, obj.key, raw_config)
+ self.export_conf_objs.append(Export.from_export_block(
+ GaneshaConfParser(raw_config).parse()[0], rados_namespace))
+
+ def _save_export(self, export):
+ self.exports[self.rados_namespace].append(export)
+ NFSRados(self.mgr, self.rados_namespace).write_obj(export.to_export_block(),
+ f'export-{export.export_id}', f'conf-nfs.{export.cluster_id}')
+
+ def _delete_export(self, cluster_id, pseudo_path, export_obj=None):
+ try:
+ if export_obj:
+ export = export_obj
+ else:
+ export = self._fetch_export(pseudo_path)
+
+ if export:
+ if pseudo_path:
+ NFSRados(self.mgr, self.rados_namespace).remove_obj(
+ f'export-{export.export_id}', f'conf-nfs.{cluster_id}')
+ self.exports[cluster_id].remove(export)
+ self._delete_user(export.fsal.user_id)
+ if not self.exports[cluster_id]:
+ del self.exports[cluster_id]
+ return 0, "Successfully deleted export", ""
+ return 0, "", "Export does not exist"
+ except Exception as e:
+ return exception_handler(e, f"Failed to delete {pseudo_path} export for {cluster_id}")
+
+ def _fetch_export_obj(self, ex_id):
+ try:
+ with self.mgr.rados.open_ioctx(self.rados_pool) as ioctx:
+ ioctx.set_namespace(self.rados_namespace)
+ export = Export.from_export_block(GaneshaConfParser(ioctx.read(f"export-{ex_id}"
+ ).decode("utf-8")).parse()[0], self.rados_namespace)
+ return export
+ except ObjectNotFound:
+ log.exception(f"Export ID: {ex_id} not found")
+
+ def _update_export(self, export):
+ self.exports[self.rados_namespace].append(export)
+ NFSRados(self.mgr, self.rados_namespace).update_obj(
+ GaneshaConfParser.write_block(export.to_export_block()),
+ f'export-{export.export_id}', f'conf-nfs.{export.cluster_id}')
+
+ def format_path(self, path):
+ if path:
+ path = normpath(path.strip())
+ if path[:2] == "//":
+ path = path[1:]
+ return path
+
+ @export_cluster_checker
+ def create_export(self, **kwargs):
+ try:
+ fsal_type = kwargs.pop('fsal_type')
+ if fsal_type == 'cephfs':
+ return FSExport(self).create_export(**kwargs)
+ raise NotImplementedError()
+ except Exception as e:
+ return exception_handler(e, f"Failed to create {kwargs['pseudo_path']} export for {kwargs['cluster_id']}")
+
+ @export_cluster_checker
+ def delete_export(self, cluster_id, pseudo_path):
+ return self._delete_export(cluster_id, pseudo_path)
+
+ def delete_all_exports(self, cluster_id):
+ try:
+ export_list = list(self.exports[cluster_id])
+ except KeyError:
+ log.info("No exports to delete")
+ return
+ self.rados_namespace = cluster_id
+ for export in export_list:
+ ret, out, err = self._delete_export(cluster_id=cluster_id, pseudo_path=None,
+ export_obj=export)
+ if ret != 0:
+ raise NFSException(-1, f"Failed to delete exports: {err} and {ret}")
+ log.info(f"All exports successfully deleted for cluster id: {cluster_id}")
+
+ @export_cluster_checker
+ def list_exports(self, cluster_id, detailed):
+ try:
+ if detailed:
+ result = [export.to_dict() for export in self.exports[cluster_id]]
+ else:
+ result = [export.pseudo for export in self.exports[cluster_id]]
+ return 0, json.dumps(result, indent=2), ''
+ except KeyError:
+ log.warning(f"No exports to list for {cluster_id}")
+ return 0, '', ''
+ except Exception as e:
+ return exception_handler(e, f"Failed to list exports for {cluster_id}")
+
+ @export_cluster_checker
+ def get_export(self, cluster_id, pseudo_path):
+ try:
+ export = self._fetch_export(pseudo_path)
+ if export:
+ return 0, json.dumps(export.to_dict(), indent=2), ''
+ log.warning(f"No {pseudo_path} export to show for {cluster_id}")
+ return 0, '', ''
+ except Exception as e:
+ return exception_handler(e, f"Failed to get {pseudo_path} export for {cluster_id}")
+
+ def update_export(self, export_config):
+ try:
+ if not export_config:
+ raise NFSInvalidOperation("Empty Config!!")
+ new_export = json.loads(export_config)
+ # check export type
+ return FSExport(self).update_export(new_export)
+ except NotImplementedError:
+ return 0, " Manual Restart of NFS PODS required for successful update of exports", ""
+ except Exception as e:
+ return exception_handler(e, f'Failed to update export: {e}')
+
+
+class FSExport(ExportMgr):
+ def __init__(self, export_mgr_obj):
+ super().__init__(export_mgr_obj.mgr, export_mgr_obj.rados_namespace,
+ export_mgr_obj._exports)
+
+ def _validate_export(self, new_export_dict):
+ if new_export_dict['cluster_id'] not in available_clusters(self.mgr):
+ raise ClusterNotFound()
+
+ export = self._fetch_export(new_export_dict['pseudo'])
+ out_msg = ''
+ if export:
+ # Check if export id matches
+ if export.export_id != new_export_dict['export_id']:
+ raise NFSInvalidOperation('Export ID changed, Cannot update export')
+ else:
+ # Fetch export based on export id object
+ export = self._fetch_export_obj(new_export_dict['export_id'])
+ if not export:
+ raise NFSObjectNotFound('Export does not exist')
+ else:
+ new_export_dict['pseudo'] = self.format_path(new_export_dict['pseudo'])
+ ValidateExport.pseudo_path(new_export_dict['pseudo'])
+ log.debug(f"Pseudo path has changed from {export.pseudo} to "
+ f"{new_export_dict['pseudo']}")
+ # Check if squash changed
+ if export.squash != new_export_dict['squash']:
+ if new_export_dict['squash']:
+ new_export_dict['squash'] = new_export_dict['squash'].lower()
+ ValidateExport.squash(new_export_dict['squash'])
+ log.debug(f"squash has changed from {export.squash} to {new_export_dict['squash']}")
+ # Security label check
+ if export.security_label != new_export_dict['security_label']:
+ ValidateExport.security_label(new_export_dict['security_label'])
+ # Protocol Checking
+ if export.protocols != new_export_dict['protocols']:
+ ValidateExport.protocols(new_export_dict['protocols'])
+ # Transport checking
+ if export.transports != new_export_dict['transports']:
+ ValidateExport.transport(new_export_dict['transports'])
+ # Path check
+ if export.path != new_export_dict['path']:
+ new_export_dict['path'] = self.format_path(new_export_dict['path'])
+ out_msg = 'update caps'
+ # Check Access Type
+ if export.access_type != new_export_dict['access_type']:
+ ValidateExport.access_type(new_export_dict['access_type'])
+ # Fsal block check
+ if export.fsal != new_export_dict['fsal']:
+ ret = ValidateExport.fsal(self.mgr, export.fsal, new_export_dict['fsal'])
+ if ret == 1 and not out_msg:
+ out_msg = 'update caps'
+ # Check client block
+ if export.clients != new_export_dict['clients']:
+ ValidateExport.clients(new_export_dict['clients'])
+ log.debug(f'Validation succeeded for Export {export.pseudo}')
+ return export, out_msg
+
+ def _update_user_id(self, path, access_type, fs_name, user_id):
+ osd_cap = 'allow rw pool={} namespace={}, allow rw tag cephfs data={}'.format(
+ self.rados_pool, self.rados_namespace, fs_name)
+ access_type = 'r' if access_type == 'RO' else 'rw'
+
+ self.mgr.check_mon_command({
+ 'prefix': 'auth caps',
+ 'entity': f'client.{user_id}',
+ 'caps': ['mon', 'allow r', 'osd', osd_cap, 'mds', 'allow {} path={}'.format(
+ access_type, path)],
+ })
+
+ log.info(f"Export user updated {user_id}")
+
+ def _create_user_key(self, entity, path, fs_name, fs_ro):
+ osd_cap = 'allow rw pool={} namespace={}, allow rw tag cephfs data={}'.format(
+ self.rados_pool, self.rados_namespace, fs_name)
+ access_type = 'r' if fs_ro else 'rw'
+
+ ret, out, err = self.mgr.check_mon_command({
+ 'prefix': 'auth get-or-create',
+ 'entity': 'client.{}'.format(entity),
+ 'caps': ['mon', 'allow r', 'osd', osd_cap, 'mds', 'allow {} path={}'.format(
+ access_type, path)],
+ 'format': 'json',
+ })
+
+ json_res = json.loads(out)
+ log.info("Export user created is {}".format(json_res[0]['entity']))
+ return json_res[0]['entity'], json_res[0]['key']
+
+ def create_export(self, fs_name, cluster_id, pseudo_path, read_only, path):
+ if not check_fs(self.mgr, fs_name):
+ raise FSNotFound(fs_name)
+
+ pseudo_path = self.format_path(pseudo_path)
+ ValidateExport.pseudo_path(pseudo_path)
+
+ if cluster_id not in self.exports:
+ self.exports[cluster_id] = []
+
+ if not self._fetch_export(pseudo_path):
+ ex_id = self._gen_export_id()
+ user_id = f"{cluster_id}{ex_id}"
+ user_out, key = self._create_user_key(user_id, path, fs_name, read_only)
+ access_type = "RW"
+ if read_only:
+ access_type = "RO"
+ ex_dict = {
+ 'path': self.format_path(path),
+ 'pseudo': pseudo_path,
+ 'cluster_id': cluster_id,
+ 'access_type': access_type,
+ 'fsal': {"name": "CEPH", "user_id": user_id,
+ "fs_name": fs_name, "sec_label_xattr": ""},
+ 'clients': []
+ }
+ export = Export.from_dict(ex_id, ex_dict)
+ export.fsal.cephx_key = key
+ self._save_export(export)
+ result = {
+ "bind": pseudo_path,
+ "fs": fs_name,
+ "path": path,
+ "cluster": cluster_id,
+ "mode": access_type,
+ }
+ return (0, json.dumps(result, indent=4), '')
+ return 0, "", "Export already exists"
+
+ def update_export(self, new_export):
+ old_export, update_user_caps = self._validate_export(new_export)
+ if update_user_caps:
+ self._update_user_id(new_export['path'], new_export['access_type'],
+ new_export['fsal']['fs_name'], new_export['fsal']['user_id'])
+ new_export = Export.from_dict(new_export['export_id'], new_export)
+ new_export.fsal.cephx_key = old_export.fsal.cephx_key
+ self._update_export(new_export)
+ export_ls = self.exports[self.rados_namespace]
+ if old_export not in export_ls:
+ # This happens when export is fetched by ID
+ old_export = self._fetch_export(old_export.pseudo)
+ export_ls.remove(old_export)
+ restart_nfs_service(self.mgr, new_export.cluster_id)
+ return 0, "Successfully updated export", ""
--- /dev/null
+class GaneshaConfParser:
+ def __init__(self, raw_config):
+ self.pos = 0
+ self.text = ""
+ self.clean_config(raw_config)
+
+ def clean_config(self, raw_config):
+ for line in raw_config.split("\n"):
+ self.text += line
+ if line.startswith("%"):
+ self.text += "\n"
+
+ def remove_whitespaces_quotes(self):
+ if self.text.startswith("%url"):
+ self.text = self.text.replace('"', "")
+ else:
+ self.text = "".join(self.text.split())
+
+ def stream(self):
+ return self.text[self.pos:]
+
+ def parse_block_name(self):
+ idx = self.stream().find('{')
+ if idx == -1:
+ raise Exception("Cannot find block name")
+ block_name = self.stream()[:idx]
+ self.pos += idx+1
+ return block_name
+
+ def parse_block_or_section(self):
+ if self.stream().startswith("%url "):
+ # section line
+ self.pos += 5
+ idx = self.stream().find('\n')
+ if idx == -1:
+ value = self.stream()
+ self.pos += len(value)
+ else:
+ value = self.stream()[:idx]
+ self.pos += idx+1
+ block_dict = {'block_name': '%url', 'value': value}
+ return block_dict
+
+ block_dict = {'block_name': self.parse_block_name().upper()}
+ self.parse_block_body(block_dict)
+ if self.stream()[0] != '}':
+ raise Exception("No closing bracket '}' found at the end of block")
+ self.pos += 1
+ return block_dict
+
+ def parse_parameter_value(self, raw_value):
+ if raw_value.find(',') != -1:
+ return [self.parse_parameter_value(v.strip())
+ for v in raw_value.split(',')]
+ try:
+ return int(raw_value)
+ except ValueError:
+ if raw_value == "true":
+ return True
+ if raw_value == "false":
+ return False
+ if raw_value.find('"') == 0:
+ return raw_value[1:-1]
+ return raw_value
+
+ def parse_stanza(self, block_dict):
+ equal_idx = self.stream().find('=')
+ if equal_idx == -1:
+ raise Exception("Malformed stanza: no equal symbol found.")
+ semicolon_idx = self.stream().find(';')
+ parameter_name = self.stream()[:equal_idx].lower()
+ parameter_value = self.stream()[equal_idx+1:semicolon_idx]
+ block_dict[parameter_name] = self.parse_parameter_value(parameter_value)
+ self.pos += semicolon_idx+1
+
+ def parse_block_body(self, block_dict):
+ while True:
+ if self.stream().find('}') == 0:
+ # block end
+ return
+
+ last_pos = self.pos
+ semicolon_idx = self.stream().find(';')
+ lbracket_idx = self.stream().find('{')
+ is_semicolon = (semicolon_idx != -1)
+ is_lbracket = (lbracket_idx != -1)
+ is_semicolon_lt_lbracket = (semicolon_idx < lbracket_idx)
+
+ if is_semicolon and ((is_lbracket and is_semicolon_lt_lbracket) or not is_lbracket):
+ self.parse_stanza(block_dict)
+ elif is_lbracket and ((is_semicolon and not is_semicolon_lt_lbracket) or
+ (not is_semicolon)):
+ if '_blocks_' not in block_dict:
+ block_dict['_blocks_'] = []
+ block_dict['_blocks_'].append(self.parse_block_or_section())
+ else:
+ raise Exception("Malformed stanza: no semicolon found.")
+
+ if last_pos == self.pos:
+ raise Exception("Infinite loop while parsing block content")
+
+ def parse(self):
+ self.remove_whitespaces_quotes()
+ blocks = []
+ while self.stream():
+ blocks.append(self.parse_block_or_section())
+ return blocks
+
+ @staticmethod
+ def _indentation(depth, size=4):
+ conf_str = ""
+ for _ in range(0, depth*size):
+ conf_str += " "
+ return conf_str
+
+ @staticmethod
+ def write_block_body(block, depth=0):
+ def format_val(key, val):
+ if isinstance(val, list):
+ return ', '.join([format_val(key, v) for v in val])
+ if isinstance(val, bool):
+ return str(val).lower()
+ if isinstance(val, int) or (block['block_name'] == 'CLIENT'
+ and key == 'clients'):
+ return '{}'.format(val)
+ return '"{}"'.format(val)
+
+ conf_str = ""
+ for key, val in block.items():
+ if key == 'block_name':
+ continue
+ elif key == '_blocks_':
+ for blo in val:
+ conf_str += GaneshaConfParser.write_block(blo, depth)
+ elif val:
+ conf_str += GaneshaConfParser._indentation(depth)
+ conf_str += '{} = {};\n'.format(key, format_val(key, val))
+ return conf_str
+
+ @staticmethod
+ def write_block(block, depth=0):
+ if block['block_name'] == "%url":
+ return '%url "{}"\n\n'.format(block['value'])
+
+ conf_str = ""
+ conf_str += GaneshaConfParser._indentation(depth)
+ conf_str += format(block['block_name'])
+ conf_str += " {\n"
+ conf_str += GaneshaConfParser.write_block_body(block, depth+1)
+ conf_str += GaneshaConfParser._indentation(depth)
+ conf_str += "}\n"
+ return conf_str
+
+
+class CephFSFSal:
+ def __init__(self, name, user_id=None, fs_name=None, sec_label_xattr=None,
+ cephx_key=None):
+ self.name = name
+ self.fs_name = fs_name
+ self.user_id = user_id
+ self.sec_label_xattr = sec_label_xattr
+ self.cephx_key = cephx_key
+
+ @classmethod
+ def from_fsal_block(cls, fsal_block):
+ return cls(fsal_block['name'],
+ fsal_block.get('user_id', None),
+ fsal_block.get('filesystem', None),
+ fsal_block.get('sec_label_xattr', None),
+ fsal_block.get('secret_access_key', None))
+
+ def to_fsal_block(self):
+ result = {
+ 'block_name': 'FSAL',
+ 'name': self.name,
+ }
+ if self.user_id:
+ result['user_id'] = self.user_id
+ if self.fs_name:
+ result['filesystem'] = self.fs_name
+ if self.sec_label_xattr:
+ result['sec_label_xattr'] = self.sec_label_xattr
+ if self.cephx_key:
+ result['secret_access_key'] = self.cephx_key
+ return result
+
+ @classmethod
+ def from_dict(cls, fsal_dict):
+ return cls(fsal_dict['name'], fsal_dict['user_id'],
+ fsal_dict['fs_name'], fsal_dict['sec_label_xattr'], None)
+
+ def to_dict(self):
+ return {
+ 'name': self.name,
+ 'user_id': self.user_id,
+ 'fs_name': self.fs_name,
+ 'sec_label_xattr': self.sec_label_xattr
+ }
+
+
+class Client:
+ def __init__(self, addresses, access_type=None, squash=None):
+ self.addresses = addresses
+ self.access_type = access_type
+ self.squash = squash
+
+ @classmethod
+ def from_client_block(cls, client_block):
+ addresses = client_block['clients']
+ if not isinstance(addresses, list):
+ addresses = [addresses]
+ return cls(addresses,
+ client_block.get('access_type', None),
+ client_block.get('squash', None))
+
+ def to_client_block(self):
+ result = {
+ 'block_name': 'CLIENT',
+ 'clients': self.addresses,
+ }
+ if self.access_type:
+ result['access_type'] = self.access_type
+ if self.squash:
+ result['squash'] = self.squash
+ return result
+
+ @classmethod
+ def from_dict(cls, client_dict):
+ return cls(client_dict['addresses'], client_dict['access_type'],
+ client_dict['squash'])
+
+ def to_dict(self):
+ return {
+ 'addresses': self.addresses,
+ 'access_type': self.access_type,
+ 'squash': self.squash
+ }
+
+
+class Export:
+ def __init__(self, export_id, path, cluster_id, pseudo, access_type, squash, security_label,
+ protocols, transports, fsal, clients=None):
+ self.export_id = export_id
+ self.path = path
+ self.fsal = fsal
+ self.cluster_id = cluster_id
+ self.pseudo = pseudo
+ self.access_type = access_type
+ self.squash = squash
+ self.attr_expiration_time = 0
+ self.security_label = security_label
+ self.protocols = protocols
+ self.transports = transports
+ self.clients = clients
+
+ @classmethod
+ def from_export_block(cls, export_block, cluster_id):
+ fsal_block = [b for b in export_block['_blocks_']
+ if b['block_name'] == "FSAL"]
+
+ client_blocks = [b for b in export_block['_blocks_']
+ if b['block_name'] == "CLIENT"]
+
+ protocols = export_block.get('protocols')
+ if not isinstance(protocols, list):
+ protocols = [protocols]
+
+ transports = export_block.get('transports')
+ if not isinstance(transports, list):
+ transports = [transports]
+
+ return cls(export_block['export_id'],
+ export_block['path'],
+ cluster_id,
+ export_block['pseudo'],
+ export_block['access_type'],
+ export_block['squash'],
+ export_block['security_label'],
+ protocols,
+ transports,
+ CephFSFSal.from_fsal_block(fsal_block[0]),
+ [Client.from_client_block(client)
+ for client in client_blocks])
+
+ def to_export_block(self):
+ result = {
+ 'block_name': 'EXPORT',
+ 'export_id': self.export_id,
+ 'path': self.path,
+ 'pseudo': self.pseudo,
+ 'access_type': self.access_type,
+ 'squash': self.squash,
+ 'attr_expiration_time': self.attr_expiration_time,
+ 'security_label': self.security_label,
+ 'protocols': self.protocols,
+ 'transports': self.transports,
+ }
+ result['_blocks_'] = [self.fsal.to_fsal_block()]
+ result['_blocks_'].extend([client.to_client_block()
+ for client in self.clients])
+ return result
+
+ @classmethod
+ def from_dict(cls, export_id, ex_dict):
+ return cls(export_id,
+ ex_dict['path'],
+ ex_dict['cluster_id'],
+ ex_dict['pseudo'],
+ ex_dict.get('access_type', 'R'),
+ ex_dict.get('squash', 'no_root_squash'),
+ ex_dict.get('security_label', True),
+ ex_dict.get('protocols', [4]),
+ ex_dict.get('transports', ['TCP']),
+ CephFSFSal.from_dict(ex_dict['fsal']),
+ [Client.from_dict(client) for client in ex_dict['clients']])
+
+ def to_dict(self):
+ return {
+ 'export_id': self.export_id,
+ 'path': self.path,
+ 'cluster_id': self.cluster_id,
+ 'pseudo': self.pseudo,
+ 'access_type': self.access_type,
+ 'squash': self.squash,
+ 'security_label': self.security_label,
+ 'protocols': sorted([p for p in self.protocols]),
+ 'transports': sorted([t for t in self.transports]),
+ 'fsal': self.fsal.to_dict(),
+ 'clients': [client.to_dict() for client in self.clients]
+ }
--- /dev/null
+import errno
+import logging
+import threading
+from typing import Tuple, Optional, List
+
+from mgr_module import MgrModule, CLICommand, Option
+import orchestrator
+
+from .export import ExportMgr
+from .cluster import NFSCluster
+
+log = logging.getLogger(__name__)
+
+
+class Module(orchestrator.OrchestratorClientMixin, MgrModule):
+ MODULE_OPTIONS: List[Option] = []
+
+ def __init__(self, *args, **kwargs):
+ self.inited = False
+ self.lock = threading.Lock()
+ super(Module, self).__init__(*args, **kwargs)
+ with self.lock:
+ self.export_mgr = ExportMgr(self)
+ self.nfs = NFSCluster(self)
+ self.inited = True
+
+ @CLICommand('nfs export create cephfs', perm='rw')
+ def _cmd_nfs_export_create_cephfs(self,
+ fsname: str,
+ clusterid: str,
+ binding: str,
+ readonly: bool = False,
+ path: str = '/') -> Tuple[int, str, str]:
+ """Create a cephfs export"""
+ # TODO Extend export creation for rgw.
+ return self.export_mgr.create_export(fsal_type='cephfs', fs_name=fsname,
+ cluster_id=clusterid, pseudo_path=binding,
+ read_only=readonly, path=path)
+
+ @CLICommand('nfs export rm', perm='rw')
+ def _cmd_nfs_export_rm(self, clusterid: str, binding: str) -> Tuple[int, str, str]:
+ """Remove a cephfs export"""
+ return self.export_mgr.delete_export(cluster_id=clusterid, pseudo_path=binding)
+
+ @CLICommand('nfs export delete', perm='rw')
+ def _cmd_nfs_export_delete(self, clusterid: str, binding: str) -> Tuple[int, str, str]:
+ """Delete a cephfs export (DEPRECATED)"""
+ return self.export_mgr.delete_export(cluster_id=clusterid, pseudo_path=binding)
+
+ @CLICommand('nfs export ls', perm='r')
+ def _cmd_nfs_export_ls(self, clusterid: str, detailed: bool = False) -> Tuple[int, str, str]:
+ """List exports of a NFS cluster"""
+ return self.export_mgr.list_exports(cluster_id=clusterid, detailed=detailed)
+
+ @CLICommand('nfs export get', perm='r')
+ def _cmd_nfs_export_get(self, clusterid: str, binding: str) -> Tuple[int, str, str]:
+ """Fetch a export of a NFS cluster given the pseudo path/binding"""
+ return self.export_mgr.get_export(cluster_id=clusterid, pseudo_path=binding)
+
+ @CLICommand('nfs export update', perm='rw')
+ def _cmd_nfs_export_update(self, inbuf: str) -> Tuple[int, str, str]:
+ """Update an export of a NFS cluster by `-i <json_file>`"""
+ # The export <json_file> is passed to -i and it's processing is handled by the Ceph CLI.
+ return self.export_mgr.update_export(export_config=inbuf)
+
+ @CLICommand('nfs cluster create', perm='rw')
+ def _cmd_nfs_cluster_create(self,
+ clusterid: str,
+ placement: Optional[str]=None,
+ ingress: Optional[bool]=None,
+ virtual_ip: Optional[str]=None) -> Tuple[int, str, str]:
+ """Create an NFS Cluster"""
+ return self.nfs.create_nfs_cluster(cluster_id=clusterid, placement=placement,
+ virtual_ip=virtual_ip, ingress=ingress)
+
+ @CLICommand('nfs cluster rm', perm='rw')
+ def _cmd_nfs_cluster_rm(self, clusterid: str) -> Tuple[int, str, str]:
+ """Removes an NFS Cluster"""
+ return self.nfs.delete_nfs_cluster(cluster_id=clusterid)
+
+ @CLICommand('nfs cluster delete', perm='rw')
+ def _cmd_nfs_cluster_delete(self, clusterid: str) -> Tuple[int, str, str]:
+ """Removes an NFS Cluster (DEPRECATED)"""
+ return self.nfs.delete_nfs_cluster(cluster_id=clusterid)
+
+ @CLICommand('nfs cluster ls', perm='r')
+ def _cmd_nfs_cluster_ls(self) -> Tuple[int, str, str]:
+ """List NFS Clusters"""
+ return self.nfs.list_nfs_cluster()
+
+ @CLICommand('nfs cluster info', perm='r')
+ def _cmd_nfs_cluster_info(self, clusterid: Optional[str] = None) -> Tuple[int, str, str]:
+ """Displays NFS Cluster info"""
+ return self.nfs.show_nfs_cluster_info(cluster_id=clusterid)
+
+ @CLICommand('nfs cluster config set', perm='rw')
+ def _cmd_nfs_cluster_config_set(self, clusterid: str, inbuf: str) -> Tuple[int, str, str]:
+ """Set NFS-Ganesha config by `-i <config_file>`"""
+ return self.nfs.set_nfs_cluster_config(cluster_id=clusterid, nfs_config=inbuf)
+
+ @CLICommand('nfs cluster config reset', perm='rw')
+ def _cmd_nfs_cluster_config_reset(self, clusterid: str) -> Tuple[int, str, str]:
+ """Reset NFS-Ganesha Config to default"""
+ return self.nfs.reset_nfs_cluster_config(cluster_id=clusterid)
--- /dev/null
+import orchestrator
+
+POOL_NAME = 'nfs-ganesha'
+
+
+def available_clusters(mgr):
+ '''
+ This method returns list of available cluster ids.
+ Service name is service_type.service_id
+ Example:
+ completion.result value:
+ <ServiceDescription of <NFSServiceSpec for service_name=nfs.vstart>>
+ return value: ['vstart']
+ '''
+ # TODO check cephadm cluster list with rados pool conf objects
+ completion = mgr.describe_service(service_type='nfs')
+ orchestrator.raise_if_exception(completion)
+ return [cluster.spec.service_id for cluster in completion.result
+ if cluster.spec.service_id]
+
+
+def restart_nfs_service(mgr, cluster_id):
+ '''
+ This methods restarts the nfs daemons
+ '''
+ completion = mgr.service_action(action='restart',
+ service_name='nfs.'+cluster_id)
+ orchestrator.raise_if_exception(completion)
+
+
+def check_fs(mgr, fs_name):
+ '''
+ This method checks if given fs is valid
+ '''
+ fs_map = mgr.get('fs_map')
+ return fs_name in [fs['mdsmap']['fs_name'] for fs in fs_map['filesystems']]
ports: Optional[List[int]] = None,
ip: Optional[str] = None,
deployed_by: Optional[List[str]] = None,
+ rank: Optional[int] = None,
+ rank_generation: Optional[int] = None,
) -> None:
# Host is at the same granularity as InventoryHost
# in the FSMap/ServiceMap.
self.daemon_id: Optional[str] = daemon_id
+ # Some daemon types have a numeric rank assigned
+ self.rank: Optional[int] = rank
+ self.rank_generation: Optional[int] = rank_generation
+
self._service_name: Optional[str] = service_name
# Service version that was deployed
out: Dict[str, Any] = OrderedDict()
out['daemon_type'] = self.daemon_type
out['daemon_id'] = self.daemon_id
+ out['service_name'] = self._service_name
out['hostname'] = self.hostname
out['container_id'] = self.container_id
out['container_image_id'] = self.container_image_id
out['is_active'] = self.is_active
out['ports'] = self.ports
out['ip'] = self.ip
+ out['rank'] = self.rank
+ out['rank_generation'] = self.rank_generation
for k in ['last_refresh', 'created', 'started', 'last_deployed',
'last_configured']:
del out[e]
return out
+ def to_dict(self) -> dict:
+ out: Dict[str, Any] = OrderedDict()
+ out['daemon_type'] = self.daemon_type
+ out['daemon_id'] = self.daemon_id
+ out['hostname'] = self.hostname
+ out['container_id'] = self.container_id
+ out['container_image_id'] = self.container_image_id
+ out['container_image_name'] = self.container_image_name
+ out['container_image_digests'] = self.container_image_digests
+ out['memory_usage'] = self.memory_usage
+ out['memory_request'] = self.memory_request
+ out['memory_limit'] = self.memory_limit
+ out['version'] = self.version
+ out['status'] = self.status.value if self.status is not None else None
+ out['status_desc'] = self.status_desc
+ if self.daemon_type == 'osd':
+ out['osdspec_affinity'] = self.osdspec_affinity
+ out['is_active'] = self.is_active
+ out['ports'] = self.ports
+ out['ip'] = self.ip
+
+ for k in ['last_refresh', 'created', 'started', 'last_deployed',
+ 'last_configured']:
+ if getattr(self, k):
+ out[k] = datetime_to_str(getattr(self, k))
+
+ if self.events:
+ out['events'] = [e.to_dict() for e in self.events]
+
+ empty = [k for k, v in out.items() if v is None]
+ for e in empty:
+ del out[e]
+ return out
+
@classmethod
@handle_type_error
def from_json(cls, data: dict) -> 'DaemonDescription':
out['events'] = [e.to_json() for e in self.events]
return out
+ def to_dict(self) -> OrderedDict:
+ out = self.spec.to_json()
+ status = {
+ 'container_image_id': self.container_image_id,
+ 'container_image_name': self.container_image_name,
+ 'rados_config_location': self.rados_config_location,
+ 'service_url': self.service_url,
+ 'size': self.size,
+ 'running': self.running,
+ 'last_refresh': self.last_refresh,
+ 'created': self.created,
+ 'virtual_ip': self.virtual_ip,
+ 'ports': self.ports if self.ports else None,
+ }
+ for k in ['last_refresh', 'created']:
+ if getattr(self, k):
+ status[k] = datetime_to_str(getattr(self, k))
+ status = {k: v for (k, v) in status.items() if v is not None}
+ out['status'] = status
+ if self.events:
+ out['events'] = [e.to_dict() for e in self.events]
+ return out
+
@classmethod
@handle_type_error
def from_json(cls, data: dict) -> 'ServiceDescription':
created = datetime_to_str(self.created)
return f'{created} {self.kind_subject()} [{self.level}] "{self.message}"'
+ def to_dict(self) -> dict:
+ # Convert events data to dict.
+ return {
+ 'created': datetime_to_str(self.created),
+ 'subject': self.kind_subject(),
+ 'level': self.level,
+ 'message': self.message
+ }
+
@classmethod
@handle_type_error
def from_json(cls, data: str) -> "OrchestratorEvent":
from ceph.deployment.hostspec import SpecValidationError
from ceph.utils import datetime_now
-from mgr_util import to_pretty_timedelta, format_dimless
+from mgr_util import to_pretty_timedelta, format_dimless, format_bytes
from mgr_module import MgrModule, HandleCommandResult, Option
from ._interface import OrchestratorClientMixin, DeviceLightLoc, _cli_read_command, \
return '-'
+def nice_bytes(v: Optional[int]) -> str:
+ if not v:
+ return '-'
+ return format_bytes(v, 5)
+
+
class Format(enum.Enum):
plain = 'plain'
json = 'json'
return cast(str, self.get_module_option("orchestrator"))
@_cli_write_command('orch host add')
- def _add_host(self, hostname: str, addr: Optional[str] = None, labels: Optional[List[str]] = None, maintenance: Optional[bool] = False) -> HandleCommandResult:
+ def _add_host(self,
+ hostname: str,
+ addr: Optional[str] = None,
+ labels: Optional[List[str]] = None,
+ maintenance: Optional[bool] = False) -> HandleCommandResult:
"""Add a host"""
_status = 'maintenance' if maintenance else ''
table = PrettyTable(
['NAME', 'HOST', 'PORTS',
'STATUS', 'REFRESHED', 'AGE',
+ 'MEM USE', 'MEM LIM',
'VERSION', 'IMAGE ID', 'CONTAINER ID'],
border=False)
table.align = 'l'
+ table._align['REFRESHED'] = 'r'
+ table._align['AGE'] = 'r'
+ table._align['MEM USE'] = 'r'
+ table._align['MEM LIM'] = 'r'
table.left_padding_width = 0
table.right_padding_width = 2
for s in sorted(daemons, key=lambda s: s.name()):
status,
nice_delta(now, s.last_refresh, ' ago'),
nice_delta(now, s.created),
+ nice_bytes(s.memory_usage),
+ nice_bytes(s.memory_request),
ukn(s.version),
ukn(s.container_image_id)[0:12],
ukn(s.container_id)))
@_cli_write_command('orch osd rm')
def _osd_rm_start(self,
- svc_id: List[str],
+ osd_id: List[str],
replace: bool = False,
force: bool = False) -> HandleCommandResult:
- """Remove OSD services"""
- completion = self.remove_osds(svc_id, replace=replace, force=force)
+ """Remove OSD daemons"""
+ completion = self.remove_osds(osd_id, replace=replace, force=force)
raise_if_exception(completion)
return HandleCommandResult(stdout=completion.result_str())
@_cli_write_command('orch osd rm stop')
- def _osd_rm_stop(self, svc_id: List[str]) -> HandleCommandResult:
- """Remove OSD services"""
- completion = self.stop_remove_osds(svc_id)
+ def _osd_rm_stop(self, osd_id: List[str]) -> HandleCommandResult:
+ """Cancel ongoing OSD removal operation"""
+ completion = self.stop_remove_osds(osd_id)
raise_if_exception(completion)
return HandleCommandResult(stdout=completion.result_str())
@_cli_write_command('orch osd rm status')
def _osd_rm_status(self, format: Format = Format.plain) -> HandleCommandResult:
- """status of OSD removal operation"""
+ """Status of OSD removal operation"""
completion = self.remove_osds_status()
raise_if_exception(completion)
report = completion.result
@_cli_write_command('orch apply nfs')
def _apply_nfs(self,
svc_id: str,
- pool: str,
- namespace: Optional[str] = None,
placement: Optional[str] = None,
format: Format = Format.plain,
+ pool: Optional[str] = None,
+ namespace: Optional[str] = None,
+ port: Optional[int] = None,
dry_run: bool = False,
unmanaged: bool = False,
no_overwrite: bool = False,
service_id=svc_id,
pool=pool,
namespace=namespace,
+ port=port,
placement=PlacementSpec.from_string(placement),
unmanaged=unmanaged,
preview_only=dry_run
@_cli_write_command('orch cancel')
def _cancel(self) -> HandleCommandResult:
"""
- cancels ongoing operations
-
- ProgressReferences might get stuck. Let's unstuck them.
+ Cancel ongoing background operations
"""
self.cancel_completions()
return HandleCommandResult()
import datetime
import uuid
import time
-
+import logging
import json
# type: () -> bool
return self._add_to_ceph_s
-
@property
def progress(self):
# type: () -> float
d["failure_message"] = self._failure_message
return d
+
class GlobalRecoveryEvent(Event):
"""
An event whoese completion is determined by active+clean/total_pg_num
self._active_clean_num = active_clean_num
self._refresh()
- def global_event_update_progress(self, pg_dump):
- # type: (Dict) -> None
+ def global_event_update_progress(self, pg_dump, log):
+ # type: (Dict, logging.Logger) -> None
"Update progress of Global Recovery Event"
-
pgs = pg_dump['pg_stats']
new_active_clean_num = 0
- for pg in pgs:
+ skipped_pgs = 0
- if int(pg['reported_epoch']) < int(self._start_epoch):
- continue
+ for pg in pgs:
+ # Disregard PGs that are not being reported
+ # if the states are active+clean. Since it is
+ # possible that some pgs might not have any movement
+ # even before the start of the event.
state = pg['state']
states = state.split("+")
+ if pg['reported_epoch'] < self._start_epoch:
+ if "active" in states and "clean" in states:
+ log.debug("Skipping pg {0} since reported_epoch {1} < start_epoch {2}"
+ .format(pg['pgid'], pg['reported_epoch'], self._start_epoch))
+ skipped_pgs += 1
+ continue
if "active" in states and "clean" in states:
new_active_clean_num += 1
# the progress
try:
# Might be that total_pg_num is 0
- self._progress = float(new_active_clean_num) / total_pg_num
+ self._progress = float(new_active_clean_num) / (total_pg_num - skipped_pgs)
except ZeroDivisionError:
self._progress = 0.0
+ log.debug("Updated progress to %s", self.summary())
self._refresh()
@property
# FIXME: far more fields getting pythonized than we really care about
# Sanity check to see if there are any missing PGs and to assign
# empty array and dictionary if there hasn't been any recovery
- pg_to_state = dict([(p['pgid'], p) for p in raw_pg_stats['pg_stats']]) # type: Dict[str, Any]
+ pg_to_state = dict((p['pgid'], p) for p in raw_pg_stats['pg_stats']) # type: Dict[str, Any]
if self._original_bytes_recovered is None:
self._original_bytes_recovered = {}
missing_pgs = []
self._pgs = list(set(self._pgs) ^ complete)
completed_pgs = self._original_pg_count - len(self._pgs)
- self._progress = (completed_pgs + complete_accumulate)\
- / self._original_pg_count
+ completed_pgs = max(completed_pgs, 0)
+ try:
+ prog = (completed_pgs + complete_accumulate)\
+ / self._original_pg_count
+ except ZeroDivisionError:
+ prog = 0.0
+
+ self._progress = min(max(prog, 0.0), 1.0)
self._refresh()
log.info("Updated progress to %s", self.summary())
super(Module, self).__init__(*args, **kwargs)
self._events = {} # type: Dict[str, Union[RemoteEvent, PgRecoveryEvent, GlobalRecoveryEvent]]
- self._completed_events = [] # type: List[GhostEvent]
+ self._completed_events = [] # type: List[GhostEvent]
self._old_osd_map = None # type: Optional[OSDMap]
self.log.warning("{0} PGs affected by osd.{1} being marked {2}".format(
len(affected_pgs), osd_id, marked))
-
# In the case of the osd coming back in, we might need to cancel
# previous recovery event for that osd
if marked == "in":
active_clean_num = 0
for pg in pgs:
state = pg['state']
-
+ # TODO right here we can keep track of epoch as well
+ # and parse it to global_event_update_progress()
states = state.split("+")
if "active" in states and "clean" in states:
except ZeroDivisionError:
return
if progress < 1.0:
+ self.log.warning(("Starting Global Recovery Event,"
+ "%d pgs not in active + clean state"),
+ total_pg_num - active_clean_num)
ev = GlobalRecoveryEvent("Global Recovery Event",
- refs=[("global","")],
+ refs=[("global", "")],
add_to_ceph_s=True,
start_epoch=self.get_osdmap().get_epoch(),
active_clean_num=active_clean_num)
- ev.global_event_update_progress(pg_dump)
+ ev.global_event_update_progress(self.get('pg_stats'), self.log)
self._events[ev.id] = ev
def notify(self, notify_type, notify_data):
assert old_osdmap
assert self._latest_osdmap
- self.log.info("Processing OSDMap change {0}..{1}".format(
- old_osdmap.get_epoch(), self._latest_osdmap.get_epoch()
- ))
+ self.log.info(("Processing OSDMap change %d..%d"),
+ old_osdmap.get_epoch(), self._latest_osdmap.get_epoch())
+
self._osdmap_changed(old_osdmap, self._latest_osdmap)
elif notify_type == "pg_summary":
# if there are no events we will skip this here to avoid
self.maybe_complete(ev)
elif isinstance(ev, GlobalRecoveryEvent):
global_event = True
- ev.global_event_update_progress(data)
+ ev.global_event_update_progress(data, self.log)
self.maybe_complete(ev)
if not global_event:
import math
import os
import re
-import socket
import threading
import time
from mgr_module import CLIReadCommand, MgrModule, MgrStandbyModule, PG_STATES, Option, ServiceInfoT
from rbd import RBD
from collections import namedtuple
try:
- from typing import DefaultDict, Optional, Dict, Any, List, Set, Tuple, Union, cast
+ from typing import DefaultDict, Optional, Dict, Any, Set, cast, Tuple, Union, List
except ImportError:
pass
DF_POOL = ['max_avail', 'stored', 'stored_raw', 'objects', 'dirty',
'quota_bytes', 'quota_objects', 'rd', 'rd_bytes', 'wr', 'wr_bytes',
- 'compress_bytes_used', 'compress_under_bytes']
+ 'compress_bytes_used', 'compress_under_bytes', 'bytes_used', 'percent_used']
OSD_POOL_STATS = ('recovering_objects_per_sec', 'recovering_bytes_per_sec',
'recovering_keys_per_sec', 'num_objects_recovered',
OSD_STATS = ['apply_latency_ms', 'commit_latency_ms']
-POOL_METADATA = ('pool_id', 'name')
+POOL_METADATA = ('pool_id', 'name', 'type', 'description', 'compression_mode')
RGW_METADATA = ('ceph_daemon', 'hostname', 'ceph_version')
self.name = name
self.desc = desc
self.labelnames = labels # tuple if present
- self.value: Dict[Tuple[str, ...], Union[float, int]] = {} # indexed by label values
+ self.value: Dict[Tuple[str, ...], Union[float, int]
+ ] = {} # indexed by label values
def clear(self) -> None:
self.value = {}
self.log.info("Missing dev node metadata for osd {0}, skipping "
"occupation record for this osd".format(id_))
+ ec_profiles = osd_map.get('erasure_code_profiles', {})
+
+ def _get_pool_info(pool: Dict[str, Any]) -> Tuple[str, str]:
+ pool_type = 'unknown'
+ description = 'unknown'
+
+ if pool['type'] == 1:
+ pool_type = "replicated"
+ description = f"replica:{pool['size']}"
+ elif pool['type'] == 3:
+ pool_type = "erasure"
+ name = pool.get('erasure_code_profile', '')
+ profile = ec_profiles.get(name, {})
+ if profile:
+ description = f"ec:{profile['k']}+{profile['m']}"
+ else:
+ description = "ec:unknown"
+
+ return pool_type, description
+
for pool in osd_map['pools']:
+
+ compression_mode = 'none'
+ pool_type, pool_description = _get_pool_info(pool)
+
+ if 'options' in pool:
+ compression_mode = pool['options'].get('compression_mode', 'none')
+
self.metrics['pool_metadata'].set(
- 1, (pool['pool'], pool['pool_name']))
+ 1, (
+ pool['pool'],
+ pool['pool_name'],
+ pool_type,
+ pool_description,
+ compression_mode)
+ )
# Populate other servers metadata
for key, value in servers.items():
# Publish the URI that others may use to access the service we're
# about to start serving
- self.set_uri('http://{0}:{1}/'.format(
- socket.getfqdn() if server_addr in ['::', '0.0.0.0'] else server_addr,
- server_port
- ))
+ if server_addr in ['::', '0.0.0.0']:
+ server_addr = self.get_mgr_ip()
+ self.set_uri('http://{0}:{1}/'.format(server_addr, server_port))
cherrypy.config.update({
'server.socket_host': server_addr,
# Publish the URI that others may use to access the service we're
# about to start serving
self.set_uri("https://{0}:{1}/".format(
- socket.gethostname() if server_addr == "::" else server_addr,
+ self.get_mgr_ip() if server_addr == "::" else server_addr,
server_port
))
import errno
import json
import sqlite3
-from typing import Sequence, Optional
+from typing import Dict, Sequence, Optional
from .fs.schedule_client import SnapSchedClient
from mgr_module import MgrModule, CLIReadCommand, CLIWriteCommand, Option
from mgr_util import CephfsConnectionException
return e.to_tuple()
if format == 'json':
json_report = ','.join([ret_sched.report_json() for ret_sched in ret_scheds])
- return 0, f'{json_report}', ''
+ return 0, f'[{json_report}]', ''
return 0, '\n===\n'.join([ret_sched.report() for ret_sched in ret_scheds]), ''
@CLIReadCommand('fs snap-schedule list')
except CephfsConnectionException as e:
return e.to_tuple()
if not scheds:
+ if format == 'json':
+ output = {} # type: Dict[str,str]
+ return 0, json.dumps(output), ''
return -errno.ENOENT, '', f'SnapSchedule for {path} not found'
if format == 'json':
# json_list = ','.join([sched.json_list() for sched in scheds])
super(M, self).__init__()
self._ceph_get_version = mock.Mock()
+ self._ceph_get_ceph_conf_path = mock.MagicMock()
self._ceph_get_option = mock.MagicMock()
self._ceph_get_context = mock.MagicMock()
self._ceph_register_client = mock.MagicMock()
+++ /dev/null
-import errno
-import json
-import logging
-from typing import List
-import socket
-from os.path import isabs, normpath
-
-from ceph.deployment.service_spec import NFSServiceSpec, PlacementSpec
-from rados import TimedOut, ObjectNotFound
-
-import orchestrator
-
-from .fs_util import create_pool
-
-log = logging.getLogger(__name__)
-POOL_NAME = 'nfs-ganesha'
-
-
-def available_clusters(mgr):
- '''
- This method returns list of available cluster ids.
- Service name is service_type.service_id
- Example:
- completion.result value:
- <ServiceDescription of <NFSServiceSpec for service_name=nfs.vstart>>
- return value: ['vstart']
- '''
- # TODO check cephadm cluster list with rados pool conf objects
- completion = mgr.describe_service(service_type='nfs')
- orchestrator.raise_if_exception(completion)
- return [cluster.spec.service_id for cluster in completion.result
- if cluster.spec.service_id]
-
-
-def restart_nfs_service(mgr, cluster_id):
- '''
- This methods restarts the nfs daemons
- '''
- completion = mgr.service_action(action='restart',
- service_name='nfs.'+cluster_id)
- orchestrator.raise_if_exception(completion)
-
-
-def export_cluster_checker(func):
- def cluster_check(fs_export, *args, **kwargs):
- """
- This method checks if cluster exists and sets rados namespace.
- """
- if kwargs['cluster_id'] not in available_clusters(fs_export.mgr):
- return -errno.ENOENT, "", "Cluster does not exists"
- fs_export.rados_namespace = kwargs['cluster_id']
- return func(fs_export, *args, **kwargs)
- return cluster_check
-
-
-def cluster_setter(func):
- def set_pool_ns_clusterid(nfs, *args, **kwargs):
- nfs._set_pool_namespace(kwargs['cluster_id'])
- nfs._set_cluster_id(kwargs['cluster_id'])
- return func(nfs, *args, **kwargs)
- return set_pool_ns_clusterid
-
-
-class FSExportError(Exception):
- def __init__(self, err_msg, errno=-errno.EINVAL):
- self.errno = errno
- self.err_msg = err_msg
-
- def __str__(self):
- return self.err_msg
-
-class GaneshaConfParser(object):
- def __init__(self, raw_config):
- self.pos = 0
- self.text = ""
- self.clean_config(raw_config)
-
- def clean_config(self, raw_config):
- for line in raw_config.split("\n"):
- self.text += line
- if line.startswith("%"):
- self.text += "\n"
-
- def remove_whitespaces_quotes(self):
- if self.text.startswith("%url"):
- self.text = self.text.replace('"', "")
- else:
- self.text = "".join(self.text.split())
-
- def stream(self):
- return self.text[self.pos:]
-
- def parse_block_name(self):
- idx = self.stream().find('{')
- if idx == -1:
- raise Exception("Cannot find block name")
- block_name = self.stream()[:idx]
- self.pos += idx+1
- return block_name
-
- def parse_block_or_section(self):
- if self.stream().startswith("%url "):
- # section line
- self.pos += 5
- idx = self.stream().find('\n')
- if idx == -1:
- value = self.stream()
- self.pos += len(value)
- else:
- value = self.stream()[:idx]
- self.pos += idx+1
- block_dict = {'block_name': '%url', 'value': value}
- return block_dict
-
- block_dict = {'block_name': self.parse_block_name().upper()}
- self.parse_block_body(block_dict)
- if self.stream()[0] != '}':
- raise Exception("No closing bracket '}' found at the end of block")
- self.pos += 1
- return block_dict
-
- def parse_parameter_value(self, raw_value):
- if raw_value.find(',') != -1:
- return [self.parse_parameter_value(v.strip())
- for v in raw_value.split(',')]
- try:
- return int(raw_value)
- except ValueError:
- if raw_value == "true":
- return True
- if raw_value == "false":
- return False
- if raw_value.find('"') == 0:
- return raw_value[1:-1]
- return raw_value
-
- def parse_stanza(self, block_dict):
- equal_idx = self.stream().find('=')
- if equal_idx == -1:
- raise Exception("Malformed stanza: no equal symbol found.")
- semicolon_idx = self.stream().find(';')
- parameter_name = self.stream()[:equal_idx].lower()
- parameter_value = self.stream()[equal_idx+1:semicolon_idx]
- block_dict[parameter_name] = self.parse_parameter_value(parameter_value)
- self.pos += semicolon_idx+1
-
- def parse_block_body(self, block_dict):
- while True:
- if self.stream().find('}') == 0:
- # block end
- return
-
- last_pos = self.pos
- semicolon_idx = self.stream().find(';')
- lbracket_idx = self.stream().find('{')
- is_semicolon = (semicolon_idx != -1)
- is_lbracket = (lbracket_idx != -1)
- is_semicolon_lt_lbracket = (semicolon_idx < lbracket_idx)
-
- if is_semicolon and ((is_lbracket and is_semicolon_lt_lbracket) or not is_lbracket):
- self.parse_stanza(block_dict)
- elif is_lbracket and ((is_semicolon and not is_semicolon_lt_lbracket) or
- (not is_semicolon)):
- if '_blocks_' not in block_dict:
- block_dict['_blocks_'] = []
- block_dict['_blocks_'].append(self.parse_block_or_section())
- else:
- raise Exception("Malformed stanza: no semicolon found.")
-
- if last_pos == self.pos:
- raise Exception("Infinite loop while parsing block content")
-
- def parse(self):
- self.remove_whitespaces_quotes()
- blocks = []
- while self.stream():
- blocks.append(self.parse_block_or_section())
- return blocks
-
- @staticmethod
- def _indentation(depth, size=4):
- conf_str = ""
- for _ in range(0, depth*size):
- conf_str += " "
- return conf_str
-
- @staticmethod
- def write_block_body(block, depth=0):
- def format_val(key, val):
- if isinstance(val, list):
- return ', '.join([format_val(key, v) for v in val])
- if isinstance(val, bool):
- return str(val).lower()
- if isinstance(val, int) or (block['block_name'] == 'CLIENT'
- and key == 'clients'):
- return '{}'.format(val)
- return '"{}"'.format(val)
-
- conf_str = ""
- for key, val in block.items():
- if key == 'block_name':
- continue
- elif key == '_blocks_':
- for blo in val:
- conf_str += GaneshaConfParser.write_block(blo, depth)
- elif val:
- conf_str += GaneshaConfParser._indentation(depth)
- conf_str += '{} = {};\n'.format(key, format_val(key, val))
- return conf_str
-
- @staticmethod
- def write_block(block, depth=0):
- if block['block_name'] == "%url":
- return '%url "{}"\n\n'.format(block['value'])
-
- conf_str = ""
- conf_str += GaneshaConfParser._indentation(depth)
- conf_str += format(block['block_name'])
- conf_str += " {\n"
- conf_str += GaneshaConfParser.write_block_body(block, depth+1)
- conf_str += GaneshaConfParser._indentation(depth)
- conf_str += "}\n"
- return conf_str
-
-
-class CephFSFSal():
- def __init__(self, name, user_id=None, fs_name=None, sec_label_xattr=None,
- cephx_key=None):
- self.name = name
- self.fs_name = fs_name
- self.user_id = user_id
- self.sec_label_xattr = sec_label_xattr
- self.cephx_key = cephx_key
-
- @classmethod
- def from_fsal_block(cls, fsal_block):
- return cls(fsal_block['name'],
- fsal_block.get('user_id', None),
- fsal_block.get('filesystem', None),
- fsal_block.get('sec_label_xattr', None),
- fsal_block.get('secret_access_key', None))
-
- def to_fsal_block(self):
- result = {
- 'block_name': 'FSAL',
- 'name': self.name,
- }
- if self.user_id:
- result['user_id'] = self.user_id
- if self.fs_name:
- result['filesystem'] = self.fs_name
- if self.sec_label_xattr:
- result['sec_label_xattr'] = self.sec_label_xattr
- if self.cephx_key:
- result['secret_access_key'] = self.cephx_key
- return result
-
- @classmethod
- def from_dict(cls, fsal_dict):
- return cls(fsal_dict['name'], fsal_dict['user_id'],
- fsal_dict['fs_name'], fsal_dict['sec_label_xattr'], None)
-
- def to_dict(self):
- return {
- 'name': self.name,
- 'user_id': self.user_id,
- 'fs_name': self.fs_name,
- 'sec_label_xattr': self.sec_label_xattr
- }
-
-
-class Client(object):
- def __init__(self, addresses, access_type=None, squash=None):
- self.addresses = addresses
- self.access_type = access_type
- self.squash = squash
-
- @classmethod
- def from_client_block(cls, client_block):
- addresses = client_block['clients']
- if not isinstance(addresses, list):
- addresses = [addresses]
- return cls(addresses,
- client_block.get('access_type', None),
- client_block.get('squash', None))
-
- def to_client_block(self):
- result = {
- 'block_name': 'CLIENT',
- 'clients': self.addresses,
- }
- if self.access_type:
- result['access_type'] = self.access_type
- if self.squash:
- result['squash'] = self.squash
- return result
-
- @classmethod
- def from_dict(cls, client_dict):
- return cls(client_dict['addresses'], client_dict['access_type'],
- client_dict['squash'])
-
- def to_dict(self):
- return {
- 'addresses': self.addresses,
- 'access_type': self.access_type,
- 'squash': self.squash
- }
-
-
-class NFSRados:
- def __init__(self, mgr, namespace):
- self.mgr = mgr
- self.pool = POOL_NAME
- self.namespace = namespace
-
- def _make_rados_url(self, obj):
- return "rados://{}/{}/{}".format(self.pool, self.namespace, obj)
-
- def _create_url_block(self, obj_name):
- return {'block_name': '%url', 'value': self._make_rados_url(obj_name)}
-
- def write_obj(self, conf_block, obj, config_obj=''):
- if 'export-' in obj:
- conf_block = GaneshaConfParser.write_block(conf_block)
-
- with self.mgr.rados.open_ioctx(self.pool) as ioctx:
- ioctx.set_namespace(self.namespace)
- ioctx.write_full(obj, conf_block.encode('utf-8'))
- if not config_obj:
- # Return after creating empty common config object
- return
- log.debug("write configuration into rados object "
- f"{self.pool}/{self.namespace}/{obj}:\n{conf_block}")
-
- # Add created obj url to common config obj
- ioctx.append(config_obj, GaneshaConfParser.write_block(
- self._create_url_block(obj)).encode('utf-8'))
- FSExport._check_rados_notify(ioctx, config_obj)
- log.debug(f"Added {obj} url to {config_obj}")
-
- def update_obj(self, conf_block, obj, config_obj):
- with self.mgr.rados.open_ioctx(self.pool) as ioctx:
- ioctx.set_namespace(self.namespace)
- ioctx.write_full(obj, conf_block.encode('utf-8'))
- log.debug("write configuration into rados object "
- f"{self.pool}/{self.namespace}/{obj}:\n{conf_block}")
- FSExport._check_rados_notify(ioctx, config_obj)
- log.debug(f"Update export {obj} in {config_obj}")
-
- def remove_obj(self, obj, config_obj):
- with self.mgr.rados.open_ioctx(self.pool) as ioctx:
- ioctx.set_namespace(self.namespace)
- export_urls = ioctx.read(config_obj)
- url = '%url "{}"\n\n'.format(self._make_rados_url(obj))
- export_urls = export_urls.replace(url.encode('utf-8'), b'')
- ioctx.remove_object(obj)
- ioctx.write_full(config_obj, export_urls)
- FSExport._check_rados_notify(ioctx, config_obj)
- log.debug("Object deleted: {}".format(url))
-
- def remove_all_obj(self):
- with self.mgr.rados.open_ioctx(self.pool) as ioctx:
- ioctx.set_namespace(self.namespace)
- for obj in ioctx.list_objects():
- obj.remove()
-
- def check_user_config(self):
- with self.mgr.rados.open_ioctx(self.pool) as ioctx:
- ioctx.set_namespace(self.namespace)
- for obj in ioctx.list_objects():
- if obj.key.startswith("userconf-nfs"):
- return True
- return False
-
-
-class Export(object):
- # pylint: disable=R0902
- def __init__(self, export_id, path, cluster_id, pseudo, access_type, squash, security_label,
- protocols, transports, fsal, clients=None):
- self.export_id = export_id
- self.path = path
- self.fsal = fsal
- self.cluster_id = cluster_id
- self.pseudo = pseudo
- self.access_type = access_type
- self.squash = squash
- self.attr_expiration_time = 0
- self.security_label = security_label
- self.protocols = protocols
- self.transports = transports
- self.clients = clients
-
- @classmethod
- def from_export_block(cls, export_block, cluster_id):
- log.debug("parsing export block: %s", export_block)
-
- fsal_block = [b for b in export_block['_blocks_']
- if b['block_name'] == "FSAL"]
-
- client_blocks = [b for b in export_block['_blocks_']
- if b['block_name'] == "CLIENT"]
-
- return cls(export_block['export_id'],
- export_block['path'],
- cluster_id,
- export_block['pseudo'],
- export_block['access_type'],
- export_block['squash'],
- export_block['security_label'],
- export_block['protocols'],
- export_block['transports'],
- CephFSFSal.from_fsal_block(fsal_block[0]),
- [Client.from_client_block(client)
- for client in client_blocks])
-
- def to_export_block(self):
- # pylint: disable=too-many-branches
- result = {
- 'block_name': 'EXPORT',
- 'export_id': self.export_id,
- 'path': self.path,
- 'pseudo': self.pseudo,
- 'access_type': self.access_type,
- 'squash': self.squash,
- 'attr_expiration_time': self.attr_expiration_time,
- 'security_label': self.security_label,
- 'protocols': self.protocols,
- 'transports': self.transports,
- }
- result['_blocks_'] = [self.fsal.to_fsal_block()]
- result['_blocks_'].extend([client.to_client_block()
- for client in self.clients])
- return result
-
- @classmethod
- def from_dict(cls, export_id, ex_dict):
- return cls(export_id,
- ex_dict['path'],
- ex_dict['cluster_id'],
- ex_dict['pseudo'],
- ex_dict.get('access_type', 'R'),
- ex_dict.get('squash', 'no_root_squash'),
- ex_dict.get('security_label', True),
- ex_dict.get('protocols', [4]),
- ex_dict.get('transports', ['TCP']),
- CephFSFSal.from_dict(ex_dict['fsal']),
- [Client.from_dict(client) for client in ex_dict['clients']])
-
- def to_dict(self):
- return {
- 'export_id': self.export_id,
- 'path': self.path,
- 'cluster_id': self.cluster_id,
- 'pseudo': self.pseudo,
- 'access_type': self.access_type,
- 'squash': self.squash,
- 'security_label': self.security_label,
- 'protocols': sorted([p for p in self.protocols]),
- 'transports': sorted([t for t in self.transports]),
- 'fsal': self.fsal.to_dict(),
- 'clients': [client.to_dict() for client in self.clients]
- }
-
-
-class FSExport(object):
- def __init__(self, mgr, namespace=None):
- self.mgr = mgr
- self.rados_pool = POOL_NAME
- self.rados_namespace = namespace
- self._exports = None
-
- @staticmethod
- def _check_rados_notify(ioctx, obj):
- try:
- ioctx.notify(obj)
- except TimedOut:
- log.exception(f"Ganesha timed out")
-
- @property
- def exports(self):
- if self._exports is None:
- self._exports = {}
- log.info("Begin export parsing")
- for cluster_id in available_clusters(self.mgr):
- self.export_conf_objs = [] # type: List[Export]
- self._read_raw_config(cluster_id)
- self.exports[cluster_id] = self.export_conf_objs
- log.info(f"Exports parsed successfully {self.exports.items()}")
- return self._exports
-
- def _fetch_export(self, pseudo_path):
- try:
- for ex in self.exports[self.rados_namespace]:
- if ex.pseudo == pseudo_path:
- return ex
- except KeyError:
- pass
-
- def _create_user_key(self, entity, path, fs_name, fs_ro):
- osd_cap = 'allow rw pool={} namespace={}, allow rw tag cephfs data={}'.format(
- self.rados_pool, self.rados_namespace, fs_name)
- access_type = 'r' if fs_ro else 'rw'
-
- ret, out, err = self.mgr.check_mon_command({
- 'prefix': 'auth get-or-create',
- 'entity': 'client.{}'.format(entity),
- 'caps': ['mon', 'allow r', 'osd', osd_cap, 'mds', 'allow {} path={}'.format(
- access_type, path)],
- 'format': 'json',
- })
-
- json_res = json.loads(out)
- log.info("Export user created is {}".format(json_res[0]['entity']))
- return json_res[0]['entity'], json_res[0]['key']
-
- def _delete_user(self, entity):
- self.mgr.check_mon_command({
- 'prefix': 'auth rm',
- 'entity': 'client.{}'.format(entity),
- })
- log.info(f"Export user deleted is {entity}")
-
- def _gen_export_id(self):
- exports = sorted([ex.export_id for ex in self.exports[self.rados_namespace]])
- nid = 1
- for e_id in exports:
- if e_id == nid:
- nid += 1
- else:
- break
- return nid
-
- def _read_raw_config(self, rados_namespace):
- with self.mgr.rados.open_ioctx(self.rados_pool) as ioctx:
- ioctx.set_namespace(rados_namespace)
- for obj in ioctx.list_objects():
- if obj.key.startswith("export-"):
- size, _ = obj.stat()
- raw_config = obj.read(size)
- raw_config = raw_config.decode("utf-8")
- log.debug("read export configuration from rados "
- "object %s/%s/%s:\n%s", self.rados_pool,
- rados_namespace, obj.key, raw_config)
- self.export_conf_objs.append(Export.from_export_block(
- GaneshaConfParser(raw_config).parse()[0], rados_namespace))
-
- def _save_export(self, export):
- self.exports[self.rados_namespace].append(export)
- NFSRados(self.mgr, self.rados_namespace).write_obj(export.to_export_block(),
- f'export-{export.export_id}', f'conf-nfs.{export.cluster_id}')
-
- def _delete_export(self, cluster_id, pseudo_path, export_obj=None):
- try:
- if export_obj:
- export = export_obj
- else:
- export = self._fetch_export(pseudo_path)
-
- if export:
- if pseudo_path:
- NFSRados(self.mgr, self.rados_namespace).remove_obj(
- f'export-{export.export_id}', f'conf-nfs.{cluster_id}')
- self.exports[cluster_id].remove(export)
- self._delete_user(export.fsal.user_id)
- if not self.exports[cluster_id]:
- del self.exports[cluster_id]
- return 0, "Successfully deleted export", ""
- return 0, "", "Export does not exist"
- except Exception as e:
- log.exception(f"Failed to delete {pseudo_path} export for {cluster_id}")
- return getattr(e, 'errno', -1), "", str(e)
-
- def format_path(self, path):
- if path:
- path = normpath(path.strip())
- if path[:2] == "//":
- path = path[1:]
- return path
-
- def check_fs(self, fs_name):
- fs_map = self.mgr.get('fs_map')
- return fs_name in [fs['mdsmap']['fs_name'] for fs in fs_map['filesystems']]
-
- @export_cluster_checker
- def create_export(self, fs_name, cluster_id, pseudo_path, read_only, path):
- try:
- if not self.check_fs(fs_name):
- return -errno.ENOENT, "", f"filesystem {fs_name} not found"
-
- pseudo_path = self.format_path(pseudo_path)
- self._validate_pseudo_path(pseudo_path)
-
- if cluster_id not in self.exports:
- self.exports[cluster_id] = []
-
- if not self._fetch_export(pseudo_path):
- ex_id = self._gen_export_id()
- user_id = f"{cluster_id}{ex_id}"
- user_out, key = self._create_user_key(user_id, path, fs_name, read_only)
- access_type = "RW"
- if read_only:
- access_type = "RO"
- ex_dict = {
- 'path': self.format_path(path),
- 'pseudo': pseudo_path,
- 'cluster_id': cluster_id,
- 'access_type': access_type,
- 'fsal': {"name": "CEPH", "user_id": user_id,
- "fs_name": fs_name, "sec_label_xattr": ""},
- 'clients': []
- }
- export = Export.from_dict(ex_id, ex_dict)
- export.fsal.cephx_key = key
- self._save_export(export)
- result = {
- "bind": pseudo_path,
- "fs": fs_name,
- "path": path,
- "cluster": cluster_id,
- "mode": access_type,
- }
- return (0, json.dumps(result, indent=4), '')
- return 0, "", "Export already exists"
- except Exception as e:
- log.exception(f"Failed to create {pseudo_path} export for {cluster_id}")
- return getattr(e, 'errno', -1), "", str(e)
-
- @export_cluster_checker
- def delete_export(self, cluster_id, pseudo_path):
- return self._delete_export(cluster_id, pseudo_path)
-
- def delete_all_exports(self, cluster_id):
- try:
- export_list = list(self.exports[cluster_id])
- except KeyError:
- log.info("No exports to delete")
- return
- self.rados_namespace = cluster_id
- for export in export_list:
- ret, out, err = self._delete_export(cluster_id=cluster_id, pseudo_path=None,
- export_obj=export)
- if ret != 0:
- raise Exception(f"Failed to delete exports: {err} and {ret}")
- log.info(f"All exports successfully deleted for cluster id: {cluster_id}")
-
- @export_cluster_checker
- def list_exports(self, cluster_id, detailed):
- try:
- if detailed:
- result = [export.to_dict() for export in self.exports[cluster_id]]
- else:
- result = [export.pseudo for export in self.exports[cluster_id]]
- return 0, json.dumps(result, indent=2), ''
- except KeyError:
- log.warning(f"No exports to list for {cluster_id}")
- return 0, '', ''
- except Exception as e:
- log.exception(f"Failed to list exports for {cluster_id}")
- return getattr(e, 'errno', -1), "", str(e)
-
- @export_cluster_checker
- def get_export(self, cluster_id, pseudo_path):
- try:
- export = self._fetch_export(pseudo_path)
- if export:
- return 0, json.dumps(export.to_dict(), indent=2), ''
- log.warning(f"No {pseudo_path} export to show for {cluster_id}")
- return 0, '', ''
- except Exception as e:
- log.exception(f"Failed to get {pseudo_path} export for {cluster_id}")
- return getattr(e, 'errno', -1), "", str(e)
-
- def _validate_pseudo_path(self, path):
- if not isabs(path) or path == "/":
- raise FSExportError(f"pseudo path {path} is invalid. "\
- "It should be an absolute path and it cannot be just '/'.")
-
- def _validate_squash(self, squash):
- valid_squash_ls = ["root", "root_squash", "rootsquash", "rootid", "root_id_squash",
- "rootidsquash", "all", "all_squash", "allsquash", "all_anomnymous", "allanonymous",
- "no_root_squash", "none", "noidsquash"]
- if squash not in valid_squash_ls:
- raise FSExportError(f"squash {squash} not in valid list {valid_squash_ls}")
-
- def _validate_security_label(self, label):
- if not isinstance(label, bool):
- raise FSExportError('Only boolean values allowed')
-
- def _validate_protocols(self, proto):
- for p in proto:
- if p not in [3, 4]:
- raise FSExportError(f"Invalid protocol {p}")
- if 3 in proto:
- log.warning("NFS V3 is an old version, it might not work")
-
- def _validate_transport(self, transport):
- valid_transport = ["UDP", "TCP"]
- for trans in transport:
- if trans.upper() not in valid_transport:
- raise FSExportError(f'{trans} is not a valid transport protocol')
-
- def _validate_access_type(self, access_type):
- valid_ones = ['RW', 'RO']
- if access_type not in valid_ones:
- raise FSExportError(f'{access_type} is invalid, valid access type are {valid_ones}')
-
- def _validate_fsal(self, old, new):
- if old.name != new['name']:
- raise FSExportError('FSAL name change not allowed')
- if old.user_id != new['user_id']:
- raise FSExportError('User ID modification is not allowed')
- if new['sec_label_xattr']:
- raise FSExportError('Security label xattr cannot be changed')
- if old.fs_name != new['fs_name']:
- if not self.check_fs(new['fs_name']):
- raise FSExportError(f"filesystem {new['fs_name']} not found")
- return 1
-
- def _validate_client(self, client):
- self._validate_access_type(client['access_type'])
- self._validate_squash(client['squash'])
-
- def _validate_clients(self, clients_ls):
- for client in clients_ls:
- self._validate_client(client)
-
- def _fetch_export_obj(self, ex_id):
- try:
- with self.mgr.rados.open_ioctx(self.rados_pool) as ioctx:
- ioctx.set_namespace(self.rados_namespace)
- export = Export.from_export_block(GaneshaConfParser(ioctx.read(f"export-{ex_id}"
- ).decode("utf-8")).parse()[0], self.rados_namespace)
- return export
- except ObjectNotFound:
- log.exception(f"Export ID: {ex_id} not found")
-
- def _validate_export(self, new_export_dict):
- if new_export_dict['cluster_id'] not in available_clusters(self.mgr):
- raise FSExportError(f"Cluster {new_export_dict['cluster_id']} does not exists",
- -errno.ENOENT)
- export = self._fetch_export(new_export_dict['pseudo'])
- out_msg = ''
- if export:
- # Check if export id matches
- if export.export_id != new_export_dict['export_id']:
- raise FSExportError('Export ID changed, Cannot update export')
- else:
- # Fetch export based on export id object
- export = self._fetch_export_obj(new_export_dict['export_id'])
- if not export:
- raise FSExportError('Export does not exist')
- else:
- new_export_dict['pseudo'] = self.format_path(new_export_dict['pseudo'])
- self._validate_pseudo_path(new_export_dict['pseudo'])
- log.debug(f"Pseudo path has changed from {export.pseudo} to "\
- f"{new_export_dict['pseudo']}")
- # Check if squash changed
- if export.squash != new_export_dict['squash']:
- if new_export_dict['squash']:
- new_export_dict['squash'] = new_export_dict['squash'].lower()
- self._validate_squash(new_export_dict['squash'])
- log.debug(f"squash has changed from {export.squash} to {new_export_dict['squash']}")
- # Security label check
- if export.security_label != new_export_dict['security_label']:
- self._validate_security_label(new_export_dict['security_label'])
- # Protocol Checking
- if export.protocols != new_export_dict['protocols']:
- self._validate_protocols(new_export_dict['protocols'])
- # Transport checking
- if export.transports != new_export_dict['transports']:
- self._validate_transport(new_export_dict['transports'])
- # Path check
- if export.path != new_export_dict['path']:
- new_export_dict['path'] = self.format_path(new_export_dict['path'])
- out_msg = 'update caps'
- # Check Access Type
- if export.access_type != new_export_dict['access_type']:
- self._validate_access_type(new_export_dict['access_type'])
- # Fsal block check
- if export.fsal != new_export_dict['fsal']:
- ret = self._validate_fsal(export.fsal, new_export_dict['fsal'])
- if ret == 1 and not out_msg:
- out_msg = 'update caps'
- # Check client block
- if export.clients != new_export_dict['clients']:
- self._validate_clients(new_export_dict['clients'])
- log.debug(f'Validation succeeded for Export {export.pseudo}')
- return export, out_msg
-
- def _update_user_id(self, path, access_type, fs_name, user_id):
- osd_cap = 'allow rw pool={} namespace={}, allow rw tag cephfs data={}'.format(
- self.rados_pool, self.rados_namespace, fs_name)
- access_type = 'r' if access_type == 'RO' else 'rw'
-
- self.mgr.check_mon_command({
- 'prefix': 'auth caps',
- 'entity': f'client.{user_id}',
- 'caps': ['mon', 'allow r', 'osd', osd_cap, 'mds', 'allow {} path={}'.format(
- access_type, path)],
- })
-
- log.info(f"Export user updated {user_id}")
-
- def _update_export(self, export):
- self.exports[self.rados_namespace].append(export)
- NFSRados(self.mgr, self.rados_namespace).update_obj(
- GaneshaConfParser.write_block(export.to_export_block()),
- f'export-{export.export_id}', f'conf-nfs.{export.cluster_id}')
-
- def update_export(self, export_config):
- try:
- if not export_config:
- return -errno.EINVAL, "", "Empty Config!!"
- update_export = json.loads(export_config)
- old_export, update_user_caps = self._validate_export(update_export)
- if update_user_caps:
- self._update_user_id(update_export['path'], update_export['access_type'],
- update_export['fsal']['fs_name'], update_export['fsal']['user_id'])
- update_export = Export.from_dict(update_export['export_id'], update_export)
- update_export.fsal.cephx_key = old_export.fsal.cephx_key
- self._update_export(update_export)
- export_ls = self.exports[self.rados_namespace]
- if old_export not in export_ls:
- # This happens when export is fetched by ID
- old_export = self._fetch_export(old_export.pseudo)
- export_ls.remove(old_export)
- restart_nfs_service(self.mgr, update_export.cluster_id)
- return 0, "Successfully updated export", ""
- except NotImplementedError:
- return 0, " Manual Restart of NFS PODS required for successful update of exports", ""
- except Exception as e:
- return getattr(e, 'errno', -1), '', f'Failed to update export: {e}'
-
-
-class NFSCluster:
- def __init__(self, mgr):
- self.pool_name = POOL_NAME
- self.pool_ns = ''
- self.mgr = mgr
-
- def _set_cluster_id(self, cluster_id):
- self.cluster_id = cluster_id
-
- def _set_pool_namespace(self, cluster_id):
- self.pool_ns = cluster_id
-
- def _get_common_conf_obj_name(self):
- return f'conf-nfs.{self.cluster_id}'
-
- def _get_user_conf_obj_name(self):
- return f'userconf-nfs.{self.cluster_id}'
-
- def _call_orch_apply_nfs(self, placement):
- spec = NFSServiceSpec(service_type='nfs', service_id=self.cluster_id,
- pool=self.pool_name, namespace=self.pool_ns,
- placement=PlacementSpec.from_string(placement))
- completion = self.mgr.apply_nfs(spec)
- orchestrator.raise_if_exception(completion)
-
- def create_empty_rados_obj(self):
- common_conf = self._get_common_conf_obj_name()
- NFSRados(self.mgr, self.pool_ns).write_obj('', self._get_common_conf_obj_name())
- log.info(f"Created empty object:{common_conf}")
-
- def delete_config_obj(self):
- NFSRados(self.mgr, self.pool_ns).remove_all_obj()
- log.info(f"Deleted {self._get_common_conf_obj_name()} object and all objects in "
- f"{self.pool_ns}")
-
- @cluster_setter
- def create_nfs_cluster(self, export_type, cluster_id, placement):
- if export_type != 'cephfs':
- return -errno.EINVAL, "", f"Invalid export type: {export_type}"
- try:
- pool_list = [p['pool_name'] for p in self.mgr.get_osdmap().dump().get('pools', [])]
-
- if self.pool_name not in pool_list:
- r, out, err = create_pool(self.mgr, self.pool_name)
- if r != 0:
- return r, out, err
- log.info(f"Pool Status: {out}")
-
- self.mgr.check_mon_command({'prefix': 'osd pool application enable',
- 'pool': self.pool_name, 'app': 'nfs'})
-
- self.create_empty_rados_obj()
-
- if cluster_id not in available_clusters(self.mgr):
- self._call_orch_apply_nfs(placement)
- return 0, "NFS Cluster Created Successfully", ""
- return 0, "", f"{cluster_id} cluster already exists"
- except Exception as e:
- log.exception(f"NFS Cluster {cluster_id} could not be created")
- return getattr(e, 'errno', -1), "", str(e)
-
- @cluster_setter
- def update_nfs_cluster(self, cluster_id, placement):
- try:
- if cluster_id in available_clusters(self.mgr):
- self._call_orch_apply_nfs(placement)
- return 0, "NFS Cluster Updated Successfully", ""
- return -errno.ENOENT, "", "Cluster does not exist"
- except Exception as e:
- log.exception(f"NFS Cluster {cluster_id} could not be updated")
- return getattr(e, 'errno', -1), "", str(e)
-
- @cluster_setter
- def delete_nfs_cluster(self, cluster_id):
- try:
- cluster_list = available_clusters(self.mgr)
- if cluster_id in cluster_list:
- self.mgr.fs_export.delete_all_exports(cluster_id)
- completion = self.mgr.remove_service('nfs.' + self.cluster_id)
- orchestrator.raise_if_exception(completion)
- self.delete_config_obj()
- return 0, "NFS Cluster Deleted Successfully", ""
- return 0, "", "Cluster does not exist"
- except Exception as e:
- log.exception(f"Failed to delete NFS Cluster {cluster_id}")
- return getattr(e, 'errno', -1), "", str(e)
-
- def list_nfs_cluster(self):
- try:
- return 0, '\n'.join(available_clusters(self.mgr)), ""
- except Exception as e:
- log.exception("Failed to list NFS Cluster")
- return getattr(e, 'errno', -1), "", str(e)
-
- def _show_nfs_cluster_info(self, cluster_id):
- self._set_cluster_id(cluster_id)
- completion = self.mgr.list_daemons(daemon_type='nfs')
- orchestrator.raise_if_exception(completion)
- host_ip = []
- # Here completion.result is a list DaemonDescription objects
- for cluster in completion.result:
- if self.cluster_id == cluster.service_id():
- """
- getaddrinfo sample output: [(<AddressFamily.AF_INET: 2>,
- <SocketKind.SOCK_STREAM: 1>, 6, 'xyz', ('172.217.166.98',2049)),
- (<AddressFamily.AF_INET6: 10>, <SocketKind.SOCK_STREAM: 1>, 6, '',
- ('2404:6800:4009:80d::200e', 2049, 0, 0))]
- """
- try:
- host_ip.append({
- "hostname": cluster.hostname,
- "ip": list(set([ip[4][0] for ip in socket.getaddrinfo(
- cluster.hostname, 2049, flags=socket.AI_CANONNAME,
- type=socket.SOCK_STREAM)])),
- "port": 2049 # Default ganesha port
- })
- except socket.gaierror:
- continue
- return host_ip
-
- def show_nfs_cluster_info(self, cluster_id=None):
- try:
- cluster_ls = []
- info_res = {}
- if cluster_id:
- cluster_ls = [cluster_id]
- else:
- cluster_ls = available_clusters(self.mgr)
-
- for cluster_id in cluster_ls:
- res = self._show_nfs_cluster_info(cluster_id)
- if res:
- info_res[cluster_id] = res
- return (0, json.dumps(info_res, indent=4), '')
- except Exception as e:
- log.exception(f"Failed to show info for cluster")
- return getattr(e, 'errno', -1), "", str(e)
-
- @cluster_setter
- def set_nfs_cluster_config(self, cluster_id, nfs_config):
- try:
- if not nfs_config:
- return -errno.EINVAL, "", "Empty Config!!"
- if cluster_id in available_clusters(self.mgr):
- rados_obj = NFSRados(self.mgr, self.pool_ns)
- if rados_obj.check_user_config():
- return 0, "", "NFS-Ganesha User Config already exists"
- rados_obj.write_obj(nfs_config, self._get_user_conf_obj_name(),
- self._get_common_conf_obj_name())
- restart_nfs_service(self.mgr, cluster_id)
- return 0, "NFS-Ganesha Config Set Successfully", ""
- return -errno.ENOENT, "", "Cluster does not exist"
- except NotImplementedError:
- return 0, "NFS-Ganesha Config Added Successfully (Manual Restart of NFS PODS required)", ""
- except Exception as e:
- log.exception(f"Setting NFS-Ganesha Config failed for {cluster_id}")
- return getattr(e, 'errno', -1), "", str(e)
-
- @cluster_setter
- def reset_nfs_cluster_config(self, cluster_id):
- try:
- if cluster_id in available_clusters(self.mgr):
- rados_obj = NFSRados(self.mgr, self.pool_ns)
- if not rados_obj.check_user_config():
- return 0, "", "NFS-Ganesha User Config does not exist"
- rados_obj.remove_obj(self._get_user_conf_obj_name(),
- self._get_common_conf_obj_name())
- restart_nfs_service(self.mgr, cluster_id)
- return 0, "NFS-Ganesha Config Reset Successfully", ""
- return -errno.ENOENT, "", "Cluster does not exist"
- except NotImplementedError:
- return 0, "NFS-Ganesha Config Removed Successfully (Manual Restart of NFS PODS required)", ""
- except Exception as e:
- log.exception(f"Resetting NFS-Ganesha Config failed for {cluster_id}")
- return getattr(e, 'errno', -1), "", str(e)
import orchestrator
from .fs.volume import VolumeClient
-from .fs.nfs import NFSCluster, FSExport
log = logging.getLogger(__name__)
'desc': "Cancel an pending or ongoing clone operation.",
'perm': 'r'
},
- {
- 'cmd': 'nfs export create cephfs '
- 'name=fsname,type=CephString '
- 'name=clusterid,type=CephString '
- 'name=binding,type=CephString '
- 'name=readonly,type=CephBool,req=false '
- 'name=path,type=CephString,req=false ',
- 'desc': "Create a cephfs export",
- 'perm': 'rw'
- },
- {
- 'cmd': 'nfs export delete '
- 'name=clusterid,type=CephString '
- 'name=binding,type=CephString ',
- 'desc': "Delete a cephfs export",
- 'perm': 'rw'
- },
- {
- 'cmd': 'nfs export ls '
- 'name=clusterid,type=CephString '
- 'name=detailed,type=CephBool,req=false ',
- 'desc': "List exports of a NFS cluster",
- 'perm': 'r'
- },
- {
- 'cmd': 'nfs export get '
- 'name=clusterid,type=CephString '
- 'name=binding,type=CephString ',
- 'desc': "Fetch a export of a NFS cluster given the pseudo path/binding",
- 'perm': 'r'
- },
- {
- 'cmd': 'nfs export update ',
- 'desc': "Update an export of a NFS cluster by `-i <json_file>`",
- 'perm': 'rw'
- },
- {
- 'cmd': 'nfs cluster create '
- 'name=type,type=CephString '
- f'name=clusterid,type=CephString,goodchars={goodchars} '
- 'name=placement,type=CephString,req=false ',
- 'desc': "Create an NFS Cluster",
- 'perm': 'rw'
- },
- {
- 'cmd': 'nfs cluster update '
- 'name=clusterid,type=CephString '
- 'name=placement,type=CephString ',
- 'desc': "Updates an NFS Cluster",
- 'perm': 'rw'
- },
- {
- 'cmd': 'nfs cluster delete '
- 'name=clusterid,type=CephString ',
- 'desc': "Deletes an NFS Cluster",
- 'perm': 'rw'
- },
- {
- 'cmd': 'nfs cluster ls ',
- 'desc': "List NFS Clusters",
- 'perm': 'r'
- },
- {
- 'cmd': 'nfs cluster info '
- 'name=clusterid,type=CephString,req=false ',
- 'desc': "Displays NFS Cluster info",
- 'perm': 'r'
- },
- {
- 'cmd': 'nfs cluster config set '
- 'name=clusterid,type=CephString ',
- 'desc': "Set NFS-Ganesha config by `-i <config_file>`",
- 'perm': 'rw'
- },
- {
- 'cmd': 'nfs cluster config reset '
- 'name=clusterid,type=CephString ',
- 'desc': "Reset NFS-Ganesha Config to default",
- 'perm': 'rw'
- },
# volume ls [recursive]
# subvolume ls <volume>
# volume authorize/deauthorize
self.config_notify()
with self.lock:
self.vc = VolumeClient(self)
- self.fs_export = FSExport(self)
- self.nfs = NFSCluster(self)
self.inited = True
def __del__(self):
def _cmd_fs_clone_cancel(self, inbuf, cmd):
return self.vc.clone_cancel(
vol_name=cmd['vol_name'], clone_name=cmd['clone_name'], group_name=cmd.get('group_name', None))
-
- @mgr_cmd_wrap
- def _cmd_nfs_export_create_cephfs(self, inbuf, cmd):
- #TODO Extend export creation for rgw.
- return self.fs_export.create_export(fs_name=cmd['fsname'], cluster_id=cmd['clusterid'],
- pseudo_path=cmd['binding'], read_only=cmd.get('readonly', False), path=cmd.get('path', '/'))
-
- @mgr_cmd_wrap
- def _cmd_nfs_export_delete(self, inbuf, cmd):
- return self.fs_export.delete_export(cluster_id=cmd['clusterid'], pseudo_path=cmd['binding'])
-
- @mgr_cmd_wrap
- def _cmd_nfs_export_ls(self, inbuf, cmd):
- return self.fs_export.list_exports(cluster_id=cmd['clusterid'], detailed=cmd.get('detailed', False))
-
- @mgr_cmd_wrap
- def _cmd_nfs_export_get(self, inbuf, cmd):
- return self.fs_export.get_export(cluster_id=cmd['clusterid'], pseudo_path=cmd['binding'])
-
- @mgr_cmd_wrap
- def _cmd_nfs_export_update(self, inbuf, cmd):
- # The export <json_file> is passed to -i and it's processing is handled by the Ceph CLI.
- return self.fs_export.update_export(export_config=inbuf)
-
- @mgr_cmd_wrap
- def _cmd_nfs_cluster_create(self, inbuf, cmd):
- return self.nfs.create_nfs_cluster(cluster_id=cmd['clusterid'], export_type=cmd['type'],
- placement=cmd.get('placement', None))
-
- @mgr_cmd_wrap
- def _cmd_nfs_cluster_update(self, inbuf, cmd):
- return self.nfs.update_nfs_cluster(cluster_id=cmd['clusterid'], placement=cmd['placement'])
-
- @mgr_cmd_wrap
- def _cmd_nfs_cluster_delete(self, inbuf, cmd):
- return self.nfs.delete_nfs_cluster(cluster_id=cmd['clusterid'])
-
- @mgr_cmd_wrap
- def _cmd_nfs_cluster_ls(self, inbuf, cmd):
- return self.nfs.list_nfs_cluster()
-
- @mgr_cmd_wrap
- def _cmd_nfs_cluster_info(self, inbuf, cmd):
- return self.nfs.show_nfs_cluster_info(cluster_id=cmd.get('clusterid', None))
-
- def _cmd_nfs_cluster_config_set(self, inbuf, cmd):
- return self.nfs.set_nfs_cluster_config(cluster_id=cmd['clusterid'], nfs_config=inbuf)
-
- def _cmd_nfs_cluster_config_reset(self, inbuf, cmd):
- return self.nfs.reset_nfs_cluster_config(cluster_id=cmd['clusterid'])
:return: A Tuple with normalized output (10, 'GB')
:rtype: tuple
"""
- return re.findall(r"\d+", data)[0], cls._parse_suffix(data)
+ return re.findall(r"\d+\.?\d*", data)[0], cls._parse_suffix(data)
def _parse_filter(self) -> None:
""" Identifies which type of 'size' filter is applied
if high:
self.high = self._get_k_v(high.group())
- exact = re.match(r"^\d+[A-Z]{1,2}$", self.value)
+ exact = re.match(r"^\d+\.?\d*[A-Z]{1,2}$", self.value)
if exact:
self.exact = self._get_k_v(exact.group())
+from collections import OrderedDict
import errno
try:
- from typing import Optional, List, Any
+ from typing import Optional, List, Any, Dict
except ImportError:
pass # just for type checking
Information about hosts. Like e.g. ``kubectl get nodes``
"""
def __init__(self,
- hostname, # type: str
- addr=None, # type: Optional[str]
- labels=None, # type: Optional[List[str]]
- status=None, # type: Optional[str]
+ hostname: str,
+ addr: Optional[str] = None,
+ labels: Optional[List[str]] = None,
+ status: Optional[str] = None,
+ location: Optional[Dict[str, str]] = None,
):
self.service_type = 'host'
#: human readable status
self.status = status or '' # type: str
- def to_json(self) -> dict:
- return {
+ self.location = location
+
+ def to_json(self) -> Dict[str, Any]:
+ r: Dict[str, Any] = {
'hostname': self.hostname,
'addr': self.addr,
- 'labels': list(set((self.labels))),
+ 'labels': list(OrderedDict.fromkeys((self.labels))),
'status': self.status,
}
+ if self.location:
+ r['location'] = self.location
+ return r
@classmethod
def from_json(cls, host_spec: dict) -> 'HostSpec':
host_spec = cls.normalize_json(host_spec)
- _cls = cls(host_spec['hostname'],
- host_spec['addr'] if 'addr' in host_spec else None,
- list(set(host_spec['labels'])) if 'labels' in host_spec else None,
- host_spec['status'] if 'status' in host_spec else None)
+ _cls = cls(
+ host_spec['hostname'],
+ host_spec['addr'] if 'addr' in host_spec else None,
+ list(OrderedDict.fromkeys(
+ host_spec['labels'])) if 'labels' in host_spec else None,
+ host_spec['status'] if 'status' in host_spec else None,
+ host_spec.get('location'),
+ )
return _cls
@staticmethod
def normalize_json(host_spec: dict) -> dict:
labels = host_spec.get('labels')
- if labels is None:
- return host_spec
- if isinstance(labels, list):
- return host_spec
- if not isinstance(labels, str):
- raise SpecValidationError(f'Labels ({labels}) must be a string or list of strings')
- host_spec['labels'] = [labels]
+ if labels is not None:
+ if isinstance(labels, str):
+ host_spec['labels'] = [labels]
+ elif (
+ not isinstance(labels, list)
+ or any(not isinstance(v, str) for v in labels)
+ ):
+ raise SpecValidationError(
+ f'Labels ({labels}) must be a string or list of strings'
+ )
+
+ loc = host_spec.get('location')
+ if loc is not None:
+ if (
+ not isinstance(loc, dict)
+ or any(not isinstance(k, str) for k in loc.keys())
+ or any(not isinstance(v, str) for v in loc.values())
+ ):
+ raise SpecValidationError(
+ f'Location ({loc}) must be a dictionary of strings to strings'
+ )
+
return host_spec
def __repr__(self) -> str:
args.append(self.labels)
if self.status:
args.append(self.status)
+ if self.location:
+ args.append(self.location)
return "HostSpec({})".format(', '.join(map(repr, args)))
# Let's omit `status` for the moment, as it is still the very same host.
return self.hostname == other.hostname and \
self.addr == other.addr and \
- self.labels == other.labels
+ sorted(self.labels) == sorted(other.labels) and \
+ self.location == other.location
'alertmanager': AlertManagerSpec,
'ingress': IngressSpec,
'container': CustomContainerSpec,
+ 'grafana': MonitoringSpec,
+ 'node-exporter': MonitoringSpec,
+ 'prometheus': MonitoringSpec,
}.get(service_type, cls)
if ret == ServiceSpec and not service_type:
raise SpecValidationError('Spec needs a "service_type" key.')
class NFSServiceSpec(ServiceSpec):
+ DEFAULT_POOL = 'nfs-ganesha'
+
def __init__(self,
service_type: str = 'nfs',
service_id: Optional[str] = None,
- pool: Optional[str] = None,
- namespace: Optional[str] = None,
placement: Optional[PlacementSpec] = None,
unmanaged: bool = False,
preview_only: bool = False,
config: Optional[Dict[str, str]] = None,
networks: Optional[List[str]] = None,
+ pool: Optional[str] = None,
+ namespace: Optional[str] = None,
+ port: Optional[int] = None,
):
assert service_type == 'nfs'
super(NFSServiceSpec, self).__init__(
config=config, networks=networks)
#: RADOS pool where NFS client recovery data is stored.
- self.pool = pool
+ self.pool = pool or self.DEFAULT_POOL
#: RADOS namespace where NFS client recovery data is stored in the pool.
- self.namespace = namespace
+ self.namespace = namespace or self.service_id
+
+ self.port = port
+
+ def get_port_start(self) -> List[int]:
+ if self.port:
+ return [self.port]
+ return []
def validate(self) -> None:
super(NFSServiceSpec, self).validate()
user_data: Optional[Dict[str, Any]] = None,
config: Optional[Dict[str, str]] = None,
networks: Optional[List[str]] = None,
+ port: Optional[int] = None,
):
assert service_type == 'alertmanager'
super(AlertManagerSpec, self).__init__(
# added to the default receivers'
# <webhook_configs> configuration.
self.user_data = user_data or {}
+ self.port = port
+
+ def get_port_start(self) -> List[int]:
+ return [self.get_port(), 9094]
+
+ def get_port(self) -> int:
+ if self.port:
+ return self.port
+ else:
+ return 9093
+
+ def validate(self) -> None:
+ super(AlertManagerSpec, self).validate()
+
+ if self.port == 9094:
+ raise SpecValidationError(
+ 'Port 9094 is reserved for AlertManager cluster listen address')
yaml.add_representer(AlertManagerSpec, ServiceSpec.yaml_representer)
backend_service: Optional[str] = None,
frontend_port: Optional[int] = None,
ssl_cert: Optional[str] = None,
+ ssl_key: Optional[str] = None,
ssl_dh_param: Optional[str] = None,
ssl_ciphers: Optional[List[str]] = None,
ssl_options: Optional[List[str]] = None,
keepalived_password: Optional[str] = None,
virtual_ip: Optional[str] = None,
virtual_interface_networks: Optional[List[str]] = [],
- haproxy_container_image: Optional[str] = None,
- keepalived_container_image: Optional[str] = None,
+ unmanaged: bool = False,
+ ssl: bool = False
):
assert service_type == 'ingress'
super(IngressSpec, self).__init__(
self.backend_service = backend_service
self.frontend_port = frontend_port
self.ssl_cert = ssl_cert
+ self.ssl_key = ssl_key
self.ssl_dh_param = ssl_dh_param
self.ssl_ciphers = ssl_ciphers
self.ssl_options = ssl_options
self.keepalived_password = keepalived_password
self.virtual_ip = virtual_ip
self.virtual_interface_networks = virtual_interface_networks or []
- self.haproxy_container_image = haproxy_container_image
- self.keepalived_container_image = keepalived_container_image
+ self.unmanaged = unmanaged
+ self.ssl = ssl
def get_port_start(self) -> List[int]:
return [cast(int, self.frontend_port),
'Cannot add ingress: No virtual_ip provided')
+yaml.add_representer(IngressSpec, ServiceSpec.yaml_representer)
+
+
class CustomContainerSpec(ServiceSpec):
def __init__(self,
service_type: str = 'container',
yaml.add_representer(CustomContainerSpec, ServiceSpec.yaml_representer)
+
+
+class MonitoringSpec(ServiceSpec):
+ def __init__(self,
+ service_type: str,
+ service_id: Optional[str] = None,
+ config: Optional[Dict[str, str]] = None,
+ networks: Optional[List[str]] = None,
+ placement: Optional[PlacementSpec] = None,
+ unmanaged: bool = False,
+ preview_only: bool = False,
+ port: Optional[int] = None,
+ ):
+ assert service_type in ['grafana', 'node-exporter', 'prometheus']
+
+ super(MonitoringSpec, self).__init__(
+ service_type, service_id,
+ placement=placement, unmanaged=unmanaged,
+ preview_only=preview_only, config=config,
+ networks=networks)
+
+ self.service_type = service_type
+ self.port = port
+
+ def get_port_start(self) -> List[int]:
+ return [self.get_port()]
+
+ def get_port(self) -> int:
+ if self.port:
+ return self.port
+ else:
+ return {'prometheus': 9095,
+ 'node-exporter': 9100,
+ 'grafana': 3000}[self.service_type]
ret = matcher.compare(disk_dict)
assert ret is True
+ def test_compare_exact_decimal(self):
+
+ matcher = drive_selection.SizeMatcher('size', '20.12GB')
+ disk_dict = Device(path='/dev/vdb', sys_api=dict(size='20.12 GB'))
+ ret = matcher.compare(disk_dict)
+ assert ret is True
+
@pytest.mark.parametrize("test_input,expected", [
("1.00 GB", False),
("20.00 GB", True),
--- /dev/null
+# flake8: noqa
+import json
+import yaml
+
+import pytest
+
+from ceph.deployment.hostspec import HostSpec, SpecValidationError
+
+
+@pytest.mark.parametrize(
+ "test_input,expected",
+ [
+ ({"hostname": "foo"}, HostSpec('foo')),
+ ({"hostname": "foo", "labels": "l1"}, HostSpec('foo', labels=['l1'])),
+ ({"hostname": "foo", "labels": ["l1", "l2"]}, HostSpec('foo', labels=['l1', 'l2'])),
+ ({"hostname": "foo", "location": {"rack": "foo"}}, HostSpec('foo', location={'rack': 'foo'})),
+ ]
+)
+def test_parse_host_specs(test_input, expected):
+ hs = HostSpec.from_json(test_input)
+ assert hs == expected
+
+
+@pytest.mark.parametrize(
+ "bad_input",
+ [
+ ({"hostname": "foo", "labels": 124}),
+ ({"hostname": "foo", "labels": {"a", "b"}}),
+ ({"hostname": "foo", "labels": {"a", "b"}}),
+ ({"hostname": "foo", "labels": ["a", 2]}),
+ ({"hostname": "foo", "location": "rack=bar"}),
+ ({"hostname": "foo", "location": ["a"]}),
+ ({"hostname": "foo", "location": {"rack", 1}}),
+ ({"hostname": "foo", "location": {1: "rack"}}),
+ ]
+)
+def test_parse_host_specs(bad_input):
+ with pytest.raises(SpecValidationError):
+ hs = HostSpec.from_json(bad_input)
+
op->exec(fifo::op::CLASS, fifo::op::CREATE_META, in);
}
-int get_meta(lr::IoCtx& ioctx, const std::string& oid,
+int get_meta(const DoutPrefixProvider *dpp, lr::IoCtx& ioctx, const std::string& oid,
std::optional<fifo::objv> objv, fifo::info* info,
std::uint32_t* part_header_size,
std::uint32_t* part_entry_overhead,
op.exec(fifo::op::CLASS, fifo::op::GET_META, in,
&bl, nullptr);
- auto r = rgw_rados_operate(ioctx, oid, &op, nullptr, y);
+ auto r = rgw_rados_operate(dpp, ioctx, oid, &op, nullptr, y);
if (r >= 0) try {
fifo::op::get_meta_reply reply;
auto iter = bl.cbegin();
if (part_entry_overhead)
*part_entry_overhead = reply.part_entry_overhead;
} catch (const cb::error& err) {
- lderr(static_cast<CephContext*>(ioctx.cct()))
+ ldpp_dout(dpp, -1)
<< __PRETTY_FUNCTION__ << ":" << __LINE__
<< " decode failed: " << err.what()
<< " tid=" << tid << dendl;
r = from_error_code(err.code());
} else if (!(probe && (r == -ENOENT || r == -ENODATA))) {
- lderr(static_cast<CephContext*>(ioctx.cct()))
+ ldpp_dout(dpp, -1)
<< __PRETTY_FUNCTION__ << ":" << __LINE__
<< " fifo::op::GET_META failed r=" << r << " tid=" << tid
<< dendl;
op->exec(fifo::op::CLASS, fifo::op::INIT_PART, in);
}
-int push_part(lr::IoCtx& ioctx, const std::string& oid, std::string_view tag,
+int push_part(const DoutPrefixProvider *dpp, lr::IoCtx& ioctx, const std::string& oid, std::string_view tag,
std::deque<cb::list> data_bufs, std::uint64_t tid,
optional_yield y)
{
encode(pp, in);
auto retval = 0;
op.exec(fifo::op::CLASS, fifo::op::PUSH_PART, in, nullptr, &retval);
- auto r = rgw_rados_operate(ioctx, oid, &op, y, lr::OPERATION_RETURNVEC);
+ auto r = rgw_rados_operate(dpp, ioctx, oid, &op, y, lr::OPERATION_RETURNVEC);
if (r < 0) {
- lderr(static_cast<CephContext*>(ioctx.cct()))
+ ldpp_dout(dpp, -1)
<< __PRETTY_FUNCTION__ << ":" << __LINE__
<< " fifo::op::PUSH_PART failed r=" << r
<< " tid=" << tid << dendl;
return r;
}
if (retval < 0) {
- lderr(static_cast<CephContext*>(ioctx.cct()))
+ ldpp_dout(dpp, -1)
<< __PRETTY_FUNCTION__ << ":" << __LINE__
<< " error handling response retval=" << retval
<< " tid=" << tid << dendl;
op->exec(fifo::op::CLASS, fifo::op::TRIM_PART, in);
}
-int list_part(lr::IoCtx& ioctx, const std::string& oid,
+int list_part(const DoutPrefixProvider *dpp, lr::IoCtx& ioctx, const std::string& oid,
std::optional<std::string_view> tag, std::uint64_t ofs,
std::uint64_t max_entries,
std::vector<fifo::part_list_entry>* entries,
encode(lp, in);
cb::list bl;
op.exec(fifo::op::CLASS, fifo::op::LIST_PART, in, &bl, nullptr);
- auto r = rgw_rados_operate(ioctx, oid, &op, nullptr, y);
+ auto r = rgw_rados_operate(dpp, ioctx, oid, &op, nullptr, y);
if (r >= 0) try {
fifo::op::list_part_reply reply;
auto iter = bl.cbegin();
if (full_part) *full_part = reply.full_part;
if (ptag) *ptag = reply.tag;
} catch (const cb::error& err) {
- lderr(static_cast<CephContext*>(ioctx.cct()))
+ ldpp_dout(dpp, -1)
<< __PRETTY_FUNCTION__ << ":" << __LINE__
<< " decode failed: " << err.what()
<< " tid=" << tid << dendl;
r = from_error_code(err.code());
} else if (r != -ENOENT) {
- lderr(static_cast<CephContext*>(ioctx.cct()))
+ ldpp_dout(dpp, -1)
<< __PRETTY_FUNCTION__ << ":" << __LINE__
<< " fifo::op::LIST_PART failed r=" << r << " tid=" << tid
<< dendl;
return op;
}
-int get_part_info(lr::IoCtx& ioctx, const std::string& oid,
+int get_part_info(const DoutPrefixProvider *dpp, lr::IoCtx& ioctx, const std::string& oid,
fifo::part_header* header,
std::uint64_t tid, optional_yield y)
{
cb::list bl;
encode(gpi, in);
op.exec(fifo::op::CLASS, fifo::op::GET_PART_INFO, in, &bl, nullptr);
- auto r = rgw_rados_operate(ioctx, oid, &op, nullptr, y);
+ auto r = rgw_rados_operate(dpp, ioctx, oid, &op, nullptr, y);
if (r >= 0) try {
fifo::op::get_part_info_reply reply;
auto iter = bl.cbegin();
decode(reply, iter);
if (header) *header = std::move(reply.header);
} catch (const cb::error& err) {
- lderr(static_cast<CephContext*>(ioctx.cct()))
+ ldpp_dout(dpp, -1)
<< __PRETTY_FUNCTION__ << ":" << __LINE__
<< " decode failed: " << err.what()
<< " tid=" << tid << dendl;
r = from_error_code(err.code());
} else {
- lderr(static_cast<CephContext*>(ioctx.cct()))
+ ldpp_dout(dpp, -1)
<< __PRETTY_FUNCTION__ << ":" << __LINE__
<< " fifo::op::GET_PART_INFO failed r=" << r << " tid=" << tid
<< dendl;
return {};
}
-int FIFO::_update_meta(const fifo::update& update,
+int FIFO::_update_meta(const DoutPrefixProvider *dpp, const fifo::update& update,
fifo::objv version, bool* pcanceled,
std::uint64_t tid, optional_yield y)
{
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " entering: tid=" << tid << dendl;
lr::ObjectWriteOperation op;
bool canceled = false;
update_meta(&op, info.version, update);
- auto r = rgw_rados_operate(ioctx, oid, &op, y);
+ auto r = rgw_rados_operate(dpp, ioctx, oid, &op, y);
if (r >= 0 || r == -ECANCELED) {
canceled = (r == -ECANCELED);
if (!canceled) {
if (r < 0) canceled = true;
}
if (canceled) {
- r = read_meta(tid, y);
+ r = read_meta(dpp, tid, y);
canceled = r < 0 ? false : true;
}
}
if (pcanceled) *pcanceled = canceled;
if (canceled) {
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " canceled: tid=" << tid << dendl;
}
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " returning error: r=" << r << " tid=" << tid << dendl;
}
return r;
bool reread = false;
bool* pcanceled = nullptr;
std::uint64_t tid;
- Updater(FIFO* fifo, lr::AioCompletion* super,
+ Updater(const DoutPrefixProvider *dpp, FIFO* fifo, lr::AioCompletion* super,
const fifo::update& update, fifo::objv version,
bool* pcanceled, std::uint64_t tid)
- : Completion(super), fifo(fifo), update(update), version(version),
+ : Completion(dpp, super), fifo(fifo), update(update), version(version),
pcanceled(pcanceled) {}
- void handle(Ptr&& p, int r) {
- ldout(fifo->cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ void handle(const DoutPrefixProvider *dpp, Ptr&& p, int r) {
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " entering: tid=" << tid << dendl;
if (reread)
handle_reread(std::move(p), r);
else
- handle_update(std::move(p), r);
+ handle_update(dpp, std::move(p), r);
}
- void handle_update(Ptr&& p, int r) {
- ldout(fifo->cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ void handle_update(const DoutPrefixProvider *dpp, Ptr&& p, int r) {
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " handling async update_meta: tid="
<< tid << dendl;
if (r < 0 && r != -ECANCELED) {
- lderr(fifo->cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " update failed: r=" << r << " tid=" << tid << dendl;
complete(std::move(p), r);
return;
if (!canceled) {
int r = fifo->apply_update(&fifo->info, version, update, tid);
if (r < 0) {
- ldout(fifo->cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " update failed, marking canceled: r=" << r
<< " tid=" << tid << dendl;
canceled = true;
}
if (canceled) {
reread = true;
- fifo->read_meta(tid, call(std::move(p)));
+ fifo->read_meta(dpp, tid, call(std::move(p)));
return;
}
if (pcanceled)
*pcanceled = false;
- ldout(fifo->cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " completing: tid=" << tid << dendl;
complete(std::move(p), 0);
}
}
};
-void FIFO::_update_meta(const fifo::update& update,
+void FIFO::_update_meta(const DoutPrefixProvider *dpp, const fifo::update& update,
fifo::objv version, bool* pcanceled,
std::uint64_t tid, lr::AioCompletion* c)
{
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " entering: tid=" << tid << dendl;
lr::ObjectWriteOperation op;
update_meta(&op, info.version, update);
- auto updater = std::make_unique<Updater>(this, c, update, version, pcanceled,
+ auto updater = std::make_unique<Updater>(dpp, this, c, update, version, pcanceled,
tid);
auto r = ioctx.aio_operate(oid, Updater::call(std::move(updater)), &op);
assert(r >= 0);
}
-int FIFO::create_part(int64_t part_num, std::string_view tag, std::uint64_t tid,
+int FIFO::create_part(const DoutPrefixProvider *dpp, int64_t part_num, std::string_view tag, std::uint64_t tid,
optional_yield y)
{
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " entering: tid=" << tid << dendl;
lr::ObjectWriteOperation op;
op.create(false); /* We don't need exclusivity, part_init ensures
part_init(&op, tag, info.params);
auto oid = info.part_oid(part_num);
l.unlock();
- auto r = rgw_rados_operate(ioctx, oid, &op, y);
+ auto r = rgw_rados_operate(dpp, ioctx, oid, &op, y);
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " part_init failed: r=" << r << " tid="
<< tid << dendl;
}
return r;
}
-int FIFO::remove_part(int64_t part_num, std::string_view tag, std::uint64_t tid,
+int FIFO::remove_part(const DoutPrefixProvider *dpp, int64_t part_num, std::string_view tag, std::uint64_t tid,
optional_yield y)
{
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " entering: tid=" << tid << dendl;
lr::ObjectWriteOperation op;
op.remove();
std::unique_lock l(m);
auto oid = info.part_oid(part_num);
l.unlock();
- auto r = rgw_rados_operate(ioctx, oid, &op, y);
+ auto r = rgw_rados_operate(dpp, ioctx, oid, &op, y);
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " remove failed: r=" << r << " tid="
<< tid << dendl;
}
return r;
}
-int FIFO::process_journal(std::uint64_t tid, optional_yield y)
+int FIFO::process_journal(const DoutPrefixProvider *dpp, std::uint64_t tid, optional_yield y)
{
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " entering: tid=" << tid << dendl;
std::vector<fifo::journal_entry> processed;
int r = 0;
for (auto& [n, entry] : tmpjournal) {
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " processing entry: entry=" << entry << " tid=" << tid
<< dendl;
switch (entry.op) {
case fifo::journal_entry::Op::create:
- r = create_part(entry.part_num, entry.part_tag, tid, y);
+ r = create_part(dpp, entry.part_num, entry.part_tag, tid, y);
if (entry.part_num > new_max) {
new_max = entry.part_num;
}
}
break;
case fifo::journal_entry::Op::remove:
- r = remove_part(entry.part_num, entry.part_tag, tid, y);
+ r = remove_part(dpp, entry.part_num, entry.part_tag, tid, y);
if (r == -ENOENT) r = 0;
if (entry.part_num >= new_tail) {
new_tail = entry.part_num + 1;
}
break;
default:
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " unknown journaled op: entry=" << entry << " tid="
<< tid << dendl;
return -EIO;
}
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " processing entry failed: entry=" << entry
<< " r=" << r << " tid=" << tid << dendl;
return -r;
bool canceled = true;
for (auto i = 0; canceled && i < MAX_RACE_RETRIES; ++i) {
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " postprocessing: i=" << i << " tid=" << tid << dendl;
std::optional<int64_t> tail_part_num;
if (processed.empty() &&
!tail_part_num &&
!max_part_num) {
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " nothing to update any more: i=" << i << " tid="
<< tid << dendl;
canceled = false;
auto u = fifo::update().tail_part_num(tail_part_num)
.head_part_num(head_part_num).max_push_part_num(max_part_num)
.journal_entries_rm(processed);
- r = _update_meta(u, objv, &canceled, tid, y);
+ r = _update_meta(dpp, u, objv, &canceled, tid, y);
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " _update_meta failed: update=" << u
<< " r=" << r << " tid=" << tid << dendl;
break;
if (canceled) {
std::vector<fifo::journal_entry> new_processed;
std::unique_lock l(m);
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " update canceled, retrying: i=" << i << " tid="
<< tid << dendl;
for (auto& e : processed) {
}
}
if (r == 0 && canceled) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " canceled too many times, giving up: tid=" << tid << dendl;
r = -ECANCELED;
}
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " failed, r=: " << r << " tid=" << tid << dendl;
}
return r;
}
-int FIFO::_prepare_new_part(bool is_head, std::uint64_t tid, optional_yield y)
+int FIFO::_prepare_new_part(const DoutPrefixProvider *dpp, bool is_head, std::uint64_t tid, optional_yield y)
{
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " entering: tid=" << tid << dendl;
std::unique_lock l(m);
std::vector jentries = { info.next_journal_entry(generate_tag()) };
if (info.journal.find(jentries.front().part_num) != info.journal.end()) {
l.unlock();
- ldout(cct, 5) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 5) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " new part journaled, but not processed: tid="
<< tid << dendl;
- auto r = process_journal(tid, y);
+ auto r = process_journal(dpp, tid, y);
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " process_journal failed: r=" << r << " tid=" << tid << dendl;
}
return r;
auto version = info.version;
if (is_head) {
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " needs new head: tid=" << tid << dendl;
auto new_head_jentry = jentries.front();
new_head_jentry.op = fifo::journal_entry::Op::set_head;
bool canceled = true;
for (auto i = 0; canceled && i < MAX_RACE_RETRIES; ++i) {
canceled = false;
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " updating metadata: i=" << i << " tid=" << tid << dendl;
auto u = fifo::update{}.journal_entries_add(jentries);
- r = _update_meta(u, version, &canceled, tid, y);
+ r = _update_meta(dpp, u, version, &canceled, tid, y);
if (r >= 0 && canceled) {
std::unique_lock l(m);
auto found = (info.journal.find(jentries.front().part_num) !=
info.journal.end());
if ((info.max_push_part_num >= jentries.front().part_num &&
info.head_part_num >= new_head_part_num)) {
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " raced, but journaled and processed: i=" << i
<< " tid=" << tid << dendl;
return 0;
}
if (found) {
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " raced, journaled but not processed: i=" << i
<< " tid=" << tid << dendl;
canceled = false;
l.unlock();
}
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " _update_meta failed: update=" << u << " r=" << r
<< " tid=" << tid << dendl;
return r;
}
}
if (canceled) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " canceled too many times, giving up: tid=" << tid << dendl;
return -ECANCELED;
}
- r = process_journal(tid, y);
+ r = process_journal(dpp, tid, y);
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " process_journal failed: r=" << r << " tid=" << tid << dendl;
}
return r;
}
-int FIFO::_prepare_new_head(std::uint64_t tid, optional_yield y)
+int FIFO::_prepare_new_head(const DoutPrefixProvider *dpp, std::uint64_t tid, optional_yield y)
{
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " entering: tid=" << tid << dendl;
std::unique_lock l(m);
std::int64_t new_head_num = info.head_part_num + 1;
int r = 0;
if (max_push_part_num < new_head_num) {
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " need new part: tid=" << tid << dendl;
- r = _prepare_new_part(true, tid, y);
+ r = _prepare_new_part(dpp, true, tid, y);
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " _prepare_new_part failed: r=" << r
<< " tid=" << tid << dendl;
return r;
}
std::unique_lock l(m);
if (info.max_push_part_num < new_head_num) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " inconsistency, push part less than head part: "
<< " tid=" << tid << dendl;
return -EIO;
bool canceled = true;
for (auto i = 0; canceled && i < MAX_RACE_RETRIES; ++i) {
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " updating head: i=" << i << " tid=" << tid << dendl;
auto u = fifo::update{}.head_part_num(new_head_num);
- r = _update_meta(u, version, &canceled, tid, y);
+ r = _update_meta(dpp, u, version, &canceled, tid, y);
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " _update_meta failed: update=" << u << " r=" << r
<< " tid=" << tid << dendl;
return r;
version = info.version;
l.unlock();
if (canceled && (head_part_num >= new_head_num)) {
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " raced, but completed by the other caller: i=" << i
<< " tid=" << tid << dendl;
canceled = false;
}
}
if (canceled) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " canceled too many times, giving up: tid=" << tid << dendl;
return -ECANCELED;
}
bool canceled = false;
uint64_t tid;
- NewPartPreparer(FIFO* f, lr::AioCompletion* super,
+ NewPartPreparer(const DoutPrefixProvider *dpp, FIFO* f, lr::AioCompletion* super,
std::vector<fifo::journal_entry> jentries,
std::int64_t new_head_part_num,
std::uint64_t tid)
- : Completion(super), f(f), jentries(std::move(jentries)),
+ : Completion(dpp, super), f(f), jentries(std::move(jentries)),
new_head_part_num(new_head_part_num), tid(tid) {}
- void handle(Ptr&& p, int r) {
- ldout(f->cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ void handle(const DoutPrefixProvider *dpp, Ptr&& p, int r) {
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " entering: tid=" << tid << dendl;
if (r < 0) {
- lderr(f->cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " _update_meta failed: r=" << r
<< " tid=" << tid << dendl;
complete(std::move(p), r);
l.unlock();
if ((max_push_part_num >= jentries.front().part_num &&
head_part_num >= new_head_part_num)) {
- ldout(f->cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " raced, but journaled and processed: i=" << i
<< " tid=" << tid << dendl;
complete(std::move(p), 0);
}
if (!found) {
++i;
- f->_update_meta(fifo::update{}
+ f->_update_meta(dpp, fifo::update{}
.journal_entries_add(jentries),
version, &canceled, tid, call(std::move(p)));
return;
} else {
- ldout(f->cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " raced, journaled but not processed: i=" << i
<< " tid=" << tid << dendl;
canceled = false;
}
// Fall through. We still need to process the journal.
}
- f->process_journal(tid, super());
+ f->process_journal(dpp, tid, super());
return;
}
};
-void FIFO::_prepare_new_part(bool is_head, std::uint64_t tid,
+void FIFO::_prepare_new_part(const DoutPrefixProvider *dpp, bool is_head, std::uint64_t tid,
lr::AioCompletion* c)
{
std::unique_lock l(m);
std::vector jentries = { info.next_journal_entry(generate_tag()) };
if (info.journal.find(jentries.front().part_num) != info.journal.end()) {
l.unlock();
- ldout(cct, 5) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 5) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " new part journaled, but not processed: tid="
<< tid << dendl;
- process_journal(tid, c);
+ process_journal(dpp, tid, c);
return;
}
std::int64_t new_head_part_num = info.head_part_num;
}
l.unlock();
- auto n = std::make_unique<NewPartPreparer>(this, c, jentries,
+ auto n = std::make_unique<NewPartPreparer>(dpp, this, c, jentries,
new_head_part_num, tid);
auto np = n.get();
- _update_meta(fifo::update{}.journal_entries_add(jentries), version,
+ _update_meta(dpp, fifo::update{}.journal_entries_add(jentries), version,
&np->canceled, tid, NewPartPreparer::call(std::move(n)));
}
bool canceled = false;
std::uint64_t tid;
- NewHeadPreparer(FIFO* f, lr::AioCompletion* super,
+ NewHeadPreparer(const DoutPrefixProvider *dpp, FIFO* f, lr::AioCompletion* super,
bool newpart, std::int64_t new_head_num, std::uint64_t tid)
- : Completion(super), f(f), newpart(newpart), new_head_num(new_head_num),
+ : Completion(dpp, super), f(f), newpart(newpart), new_head_num(new_head_num),
tid(tid) {}
- void handle(Ptr&& p, int r) {
+ void handle(const DoutPrefixProvider *dpp, Ptr&& p, int r) {
if (newpart)
handle_newpart(std::move(p), r);
else
- handle_update(std::move(p), r);
+ handle_update(dpp, std::move(p), r);
}
void handle_newpart(Ptr&& p, int r) {
}
}
- void handle_update(Ptr&& p, int r) {
+ void handle_update(const DoutPrefixProvider *dpp, Ptr&& p, int r) {
std::unique_lock l(f->m);
auto head_part_num = f->info.head_part_num;
auto version = f->info.version;
l.unlock();
if (r < 0) {
- lderr(f->cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " _update_meta failed: r=" << r
<< " tid=" << tid << dendl;
complete(std::move(p), r);
}
if (canceled) {
if (i >= MAX_RACE_RETRIES) {
- lderr(f->cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " canceled too many times, giving up: tid=" << tid << dendl;
complete(std::move(p), -ECANCELED);
return;
if (head_part_num < new_head_num) {
canceled = false;
++i;
- ldout(f->cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " updating head: i=" << i << " tid=" << tid << dendl;
- f->_update_meta(fifo::update{}.head_part_num(new_head_num),
+ f->_update_meta(dpp, fifo::update{}.head_part_num(new_head_num),
version, &this->canceled, tid, call(std::move(p)));
return;
}
}
- ldout(f->cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " succeeded : i=" << i << " tid=" << tid << dendl;
complete(std::move(p), 0);
return;
}
};
-void FIFO::_prepare_new_head(std::uint64_t tid, lr::AioCompletion* c)
+void FIFO::_prepare_new_head(const DoutPrefixProvider *dpp, std::uint64_t tid, lr::AioCompletion* c)
{
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " entering: tid=" << tid << dendl;
std::unique_lock l(m);
int64_t new_head_num = info.head_part_num + 1;
l.unlock();
if (max_push_part_num < new_head_num) {
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " need new part: tid=" << tid << dendl;
- auto n = std::make_unique<NewHeadPreparer>(this, c, true, new_head_num,
+ auto n = std::make_unique<NewHeadPreparer>(dpp, this, c, true, new_head_num,
tid);
- _prepare_new_part(true, tid, NewHeadPreparer::call(std::move(n)));
+ _prepare_new_part(dpp, true, tid, NewHeadPreparer::call(std::move(n)));
} else {
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " updating head: tid=" << tid << dendl;
- auto n = std::make_unique<NewHeadPreparer>(this, c, false, new_head_num,
+ auto n = std::make_unique<NewHeadPreparer>(dpp, this, c, false, new_head_num,
tid);
auto np = n.get();
- _update_meta(fifo::update{}.head_part_num(new_head_num), version,
+ _update_meta(dpp, fifo::update{}.head_part_num(new_head_num), version,
&np->canceled, tid, NewHeadPreparer::call(std::move(n)));
}
}
-int FIFO::push_entries(const std::deque<cb::list>& data_bufs,
+int FIFO::push_entries(const DoutPrefixProvider *dpp, const std::deque<cb::list>& data_bufs,
std::uint64_t tid, optional_yield y)
{
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " entering: tid=" << tid << dendl;
std::unique_lock l(m);
auto head_part_num = info.head_part_num;
const auto part_oid = info.part_oid(head_part_num);
l.unlock();
- auto r = push_part(ioctx, part_oid, tag, data_bufs, tid, y);
+ auto r = push_part(dpp, ioctx, part_oid, tag, data_bufs, tid, y);
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " push_part failed: r=" << r << " tid=" << tid << dendl;
}
return r;
push_part(ioctx, part_oid, tag, data_bufs, tid, c);
}
-int FIFO::trim_part(int64_t part_num, uint64_t ofs,
+int FIFO::trim_part(const DoutPrefixProvider *dpp, int64_t part_num, uint64_t ofs,
std::optional<std::string_view> tag,
bool exclusive, std::uint64_t tid,
optional_yield y)
{
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " entering: tid=" << tid << dendl;
lr::ObjectWriteOperation op;
std::unique_lock l(m);
const auto part_oid = info.part_oid(part_num);
l.unlock();
rgw::cls::fifo::trim_part(&op, tag, ofs, exclusive);
- auto r = rgw_rados_operate(ioctx, part_oid, &op, y);
+ auto r = rgw_rados_operate(dpp, ioctx, part_oid, &op, y);
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " trim_part failed: r=" << r << " tid=" << tid << dendl;
}
return 0;
ceph_assert(r >= 0);
}
-int FIFO::open(lr::IoCtx ioctx, std::string oid, std::unique_ptr<FIFO>* fifo,
+int FIFO::open(const DoutPrefixProvider *dpp, lr::IoCtx ioctx, std::string oid, std::unique_ptr<FIFO>* fifo,
optional_yield y, std::optional<fifo::objv> objv,
bool probe)
{
- auto cct = static_cast<CephContext*>(ioctx.cct());
- ldout(cct, 20)
+ ldpp_dout(dpp, 20)
<< __PRETTY_FUNCTION__ << ":" << __LINE__
<< " entering" << dendl;
fifo::info info;
std::uint32_t size;
std::uint32_t over;
- int r = get_meta(ioctx, std::move(oid), objv, &info, &size, &over, 0, y,
+ int r = get_meta(dpp, ioctx, std::move(oid), objv, &info, &size, &over, 0, y,
probe);
if (r < 0) {
if (!(probe && (r == -ENOENT || r == -ENODATA))) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " get_meta failed: r=" << r << dendl;
}
return r;
// If there are journal entries, process them, in case
// someone crashed mid-transaction.
if (!info.journal.empty()) {
- ldout(cct, 20)
+ ldpp_dout(dpp, 20)
<< __PRETTY_FUNCTION__ << ":" << __LINE__
<< " processing leftover journal" << dendl;
- r = f->process_journal(0, y);
+ r = f->process_journal(dpp, 0, y);
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " process_journal failed: r=" << r << dendl;
return r;
}
return 0;
}
-int FIFO::create(lr::IoCtx ioctx, std::string oid, std::unique_ptr<FIFO>* fifo,
+int FIFO::create(const DoutPrefixProvider *dpp, lr::IoCtx ioctx, std::string oid, std::unique_ptr<FIFO>* fifo,
optional_yield y, std::optional<fifo::objv> objv,
std::optional<std::string_view> oid_prefix,
bool exclusive, std::uint64_t max_part_size,
std::uint64_t max_entry_size)
{
- auto cct = static_cast<CephContext*>(ioctx.cct());
- ldout(cct, 20)
+ ldpp_dout(dpp, 20)
<< __PRETTY_FUNCTION__ << ":" << __LINE__
<< " entering" << dendl;
lr::ObjectWriteOperation op;
create_meta(&op, oid, objv, oid_prefix, exclusive, max_part_size,
max_entry_size);
- auto r = rgw_rados_operate(ioctx, oid, &op, y);
+ auto r = rgw_rados_operate(dpp, ioctx, oid, &op, y);
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " create_meta failed: r=" << r << dendl;
return r;
}
- r = open(std::move(ioctx), std::move(oid), fifo, y, objv);
+ r = open(dpp, std::move(ioctx), std::move(oid), fifo, y, objv);
return r;
}
-int FIFO::read_meta(std::uint64_t tid, optional_yield y) {
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+int FIFO::read_meta(const DoutPrefixProvider *dpp, std::uint64_t tid, optional_yield y) {
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " entering: tid=" << tid << dendl;
fifo::info _info;
std::uint32_t _phs;
std::uint32_t _peo;
- auto r = get_meta(ioctx, oid, nullopt, &_info, &_phs, &_peo, tid, y);
+ auto r = get_meta(dpp, ioctx, oid, nullopt, &_info, &_phs, &_peo, tid, y);
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " get_meta failed: r=" << r << " tid=" << tid << dendl;
return r;
}
return 0;
}
-int FIFO::read_meta(optional_yield y) {
+int FIFO::read_meta(const DoutPrefixProvider *dpp, optional_yield y) {
std::unique_lock l(m);
auto tid = ++next_tid;
l.unlock();
- return read_meta(tid, y);
+ return read_meta(dpp, tid, y);
}
struct Reader : public Completion<Reader> {
FIFO* fifo;
cb::list bl;
std::uint64_t tid;
- Reader(FIFO* fifo, lr::AioCompletion* super, std::uint64_t tid)
- : Completion(super), fifo(fifo), tid(tid) {}
+ Reader(const DoutPrefixProvider *dpp, FIFO* fifo, lr::AioCompletion* super, std::uint64_t tid)
+ : Completion(dpp, super), fifo(fifo), tid(tid) {}
- void handle(Ptr&& p, int r) {
- auto cct = fifo->cct;
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ void handle(const DoutPrefixProvider *dpp, Ptr&& p, int r) {
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " entering: tid=" << tid << dendl;
if (r >= 0) try {
fifo::op::get_meta_reply reply;
fifo->part_entry_overhead = reply.part_entry_overhead;
}
} catch (const cb::error& err) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " failed to decode response err=" << err.what()
<< " tid=" << tid << dendl;
r = from_error_code(err.code());
} else {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " read_meta failed r=" << r
<< " tid=" << tid << dendl;
}
}
};
-void FIFO::read_meta(std::uint64_t tid, lr::AioCompletion* c)
+void FIFO::read_meta(const DoutPrefixProvider *dpp, std::uint64_t tid, lr::AioCompletion* c)
{
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " entering: tid=" << tid << dendl;
lr::ObjectReadOperation op;
fifo::op::get_meta gm;
cb::list in;
encode(gm, in);
- auto reader = std::make_unique<Reader>(this, c, tid);
+ auto reader = std::make_unique<Reader>(dpp, this, c, tid);
auto rp = reader.get();
auto r = ioctx.aio_exec(oid, Reader::call(std::move(reader)), fifo::op::CLASS,
fifo::op::GET_META, in, &rp->bl);
return {part_header_size, part_entry_overhead};
}
-int FIFO::push(const cb::list& bl, optional_yield y) {
- return push(std::vector{ bl }, y);
+int FIFO::push(const DoutPrefixProvider *dpp, const cb::list& bl, optional_yield y) {
+ return push(dpp, std::vector{ bl }, y);
}
-void FIFO::push(const cb::list& bl, lr::AioCompletion* c) {
- push(std::vector{ bl }, c);
+void FIFO::push(const DoutPrefixProvider *dpp, const cb::list& bl, lr::AioCompletion* c) {
+ push(dpp, std::vector{ bl }, c);
}
-int FIFO::push(const std::vector<cb::list>& data_bufs, optional_yield y)
+int FIFO::push(const DoutPrefixProvider *dpp, const std::vector<cb::list>& data_bufs, optional_yield y)
{
std::unique_lock l(m);
auto tid = ++next_tid;
auto max_entry_size = info.params.max_entry_size;
auto need_new_head = info.need_new_head();
l.unlock();
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " entering: tid=" << tid << dendl;
if (data_bufs.empty()) {
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " empty push, returning success tid=" << tid << dendl;
return 0;
}
// Validate sizes
for (const auto& bl : data_bufs) {
if (bl.length() > max_entry_size) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " entry bigger than max_entry_size tid=" << tid << dendl;
return -E2BIG;
}
int r = 0;
if (need_new_head) {
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " need new head tid=" << tid << dendl;
- r = _prepare_new_head(tid, y);
+ r = _prepare_new_head(dpp, tid, y);
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " _prepare_new_head failed: r=" << r
<< " tid=" << tid << dendl;
return r;
bool canceled = true;
while ((!remaining.empty() || !batch.empty()) &&
(retries <= MAX_RACE_RETRIES)) {
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " preparing push: remaining=" << remaining.size()
<< " batch=" << batch.size() << " retries=" << retries
<< " tid=" << tid << dendl;
batch.push_back(std::move(remaining.front()));
remaining.pop_front();
}
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " prepared push: remaining=" << remaining.size()
<< " batch=" << batch.size() << " retries=" << retries
<< " batch_len=" << batch_len
<< " tid=" << tid << dendl;
- auto r = push_entries(batch, tid, y);
+ auto r = push_entries(dpp, batch, tid, y);
if (r == -ERANGE) {
canceled = true;
++retries;
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " need new head tid=" << tid << dendl;
- r = _prepare_new_head(tid, y);
+ r = _prepare_new_head(dpp, tid, y);
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " prepare_new_head failed: r=" << r
<< " tid=" << tid << dendl;
return r;
continue;
}
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " push_entries failed: r=" << r
<< " tid=" << tid << dendl;
return r;
}
}
if (canceled) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " canceled too many times, giving up: tid=" << tid << dendl;
return -ECANCELED;
}
f->push_entries(batch, tid, call(std::move(p)));
}
- void new_head(Ptr&& p) {
+ void new_head(const DoutPrefixProvider *dpp, Ptr&& p) {
new_heading = true;
- f->_prepare_new_head(tid, call(std::move(p)));
+ f->_prepare_new_head(dpp, tid, call(std::move(p)));
}
- void handle(Ptr&& p, int r) {
+ void handle(const DoutPrefixProvider *dpp, Ptr&& p, int r) {
if (!new_heading) {
if (r == -ERANGE) {
- ldout(f->cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " need new head tid=" << tid << dendl;
- new_head(std::move(p));
+ new_head(dpp, std::move(p));
return;
}
if (r < 0) {
- lderr(f->cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " push_entries failed: r=" << r
<< " tid=" << tid << dendl;
complete(std::move(p), r);
prep_then_push(std::move(p), r);
} else {
if (r < 0) {
- lderr(f->cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " prepare_new_head failed: r=" << r
<< " tid=" << tid << dendl;
complete(std::move(p), r);
}
}
- Pusher(FIFO* f, std::deque<cb::list>&& remaining,
+ Pusher(const DoutPrefixProvider *dpp, FIFO* f, std::deque<cb::list>&& remaining,
std::uint64_t tid, lr::AioCompletion* super)
- : Completion(super), f(f), remaining(std::move(remaining)),
+ : Completion(dpp, super), f(f), remaining(std::move(remaining)),
tid(tid) {}
};
-void FIFO::push(const std::vector<cb::list>& data_bufs,
+void FIFO::push(const DoutPrefixProvider *dpp, const std::vector<cb::list>& data_bufs,
lr::AioCompletion* c)
{
std::unique_lock l(m);
auto max_entry_size = info.params.max_entry_size;
auto need_new_head = info.need_new_head();
l.unlock();
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " entering: tid=" << tid << dendl;
- auto p = std::make_unique<Pusher>(this, std::deque<cb::list>(data_bufs.begin(), data_bufs.end()),
+ auto p = std::make_unique<Pusher>(dpp, this, std::deque<cb::list>(data_bufs.begin(), data_bufs.end()),
tid, c);
// Validate sizes
for (const auto& bl : data_bufs) {
if (bl.length() > max_entry_size) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " entry bigger than max_entry_size tid=" << tid << dendl;
Pusher::complete(std::move(p), -E2BIG);
return;
}
if (data_bufs.empty() ) {
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " empty push, returning success tid=" << tid << dendl;
Pusher::complete(std::move(p), 0);
return;
}
if (need_new_head) {
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " need new head tid=" << tid << dendl;
- p->new_head(std::move(p));
+ p->new_head(dpp, std::move(p));
} else {
p->prep_then_push(std::move(p), 0);
}
}
-int FIFO::list(int max_entries,
+int FIFO::list(const DoutPrefixProvider *dpp, int max_entries,
std::optional<std::string_view> markstr,
std::vector<list_entry>* presult, bool* pmore,
optional_yield y)
auto tid = ++next_tid;
std::int64_t part_num = info.tail_part_num;
l.unlock();
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " entering: tid=" << tid << dendl;
std::uint64_t ofs = 0;
if (markstr) {
auto marker = to_marker(*markstr);
if (!marker) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " invalid marker string: " << markstr
<< " tid= "<< tid << dendl;
return -EINVAL;
std::vector<fifo::part_list_entry> entries;
int r = 0;
while (max_entries > 0) {
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " max_entries=" << max_entries << " tid=" << tid << dendl;
bool part_more = false;
bool part_full = false;
auto part_oid = info.part_oid(part_num);
l.unlock();
- r = list_part(ioctx, part_oid, {}, ofs, max_entries, &entries,
+ r = list_part(dpp, ioctx, part_oid, {}, ofs, max_entries, &entries,
&part_more, &part_full, nullptr, tid, y);
if (r == -ENOENT) {
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " missing part, rereading metadata"
<< " tid= "<< tid << dendl;
- r = read_meta(tid, y);
+ r = read_meta(dpp, tid, y);
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " read_meta failed: r=" << r
<< " tid= "<< tid << dendl;
return r;
}
if (part_num < info.tail_part_num) {
/* raced with trim? restart */
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " raced with trim, restarting: tid=" << tid << dendl;
max_entries += result.size();
result.clear();
ofs = 0;
continue;
}
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " assuming part was not written yet, so end of data: "
<< "tid=" << tid << dendl;
more = false;
break;
}
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " list_entries failed: r=" << r
<< " tid= "<< tid << dendl;
return r;
}
if (!part_full) {
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " head part is not full, so we can assume we're done: "
<< "tid=" << tid << dendl;
break;
return 0;
}
-int FIFO::trim(std::string_view markstr, bool exclusive, optional_yield y)
+int FIFO::trim(const DoutPrefixProvider *dpp, std::string_view markstr, bool exclusive, optional_yield y)
{
bool overshoot = false;
auto marker = to_marker(markstr);
const auto max_part_size = info.params.max_part_size;
if (part_num > hn) {
l.unlock();
- auto r = read_meta(tid, y);
+ auto r = read_meta(dpp, tid, y);
if (r < 0) {
return r;
}
}
auto pn = info.tail_part_num;
l.unlock();
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " entering: tid=" << tid << dendl;
int r = 0;
while (pn < part_num) {
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " pn=" << pn << " tid=" << tid << dendl;
std::unique_lock l(m);
l.unlock();
- r = trim_part(pn, max_part_size, std::nullopt, false, tid, y);
+ r = trim_part(dpp, pn, max_part_size, std::nullopt, false, tid, y);
if (r < 0 && r == -ENOENT) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " trim_part failed: r=" << r
<< " tid= "<< tid << dendl;
return r;
}
++pn;
}
- r = trim_part(part_num, ofs, std::nullopt, exclusive, tid, y);
+ r = trim_part(dpp, part_num, ofs, std::nullopt, exclusive, tid, y);
if (r < 0 && r != -ENOENT) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " trim_part failed: r=" << r
<< " tid= "<< tid << dendl;
return r;
while ((tail_part_num < part_num) &&
canceled &&
(retries <= MAX_RACE_RETRIES)) {
- r = _update_meta(fifo::update{}.tail_part_num(part_num), objv, &canceled,
+ r = _update_meta(dpp, fifo::update{}.tail_part_num(part_num), objv, &canceled,
tid, y);
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " _update_meta failed: r=" << r
<< " tid= "<< tid << dendl;
return r;
}
if (canceled) {
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " canceled: retries=" << retries
<< " tid=" << tid << dendl;
l.lock();
}
}
if (canceled) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " canceled too many times, giving up: tid=" << tid << dendl;
return -EIO;
}
bool overshoot = false;
int retries = 0;
- Trimmer(FIFO* fifo, std::int64_t part_num, std::uint64_t ofs, std::int64_t pn,
+ Trimmer(const DoutPrefixProvider *dpp, FIFO* fifo, std::int64_t part_num, std::uint64_t ofs, std::int64_t pn,
bool exclusive, lr::AioCompletion* super, std::uint64_t tid)
- : Completion(super), fifo(fifo), part_num(part_num), ofs(ofs), pn(pn),
+ : Completion(dpp, super), fifo(fifo), part_num(part_num), ofs(ofs), pn(pn),
exclusive(exclusive), tid(tid) {}
- void handle(Ptr&& p, int r) {
- auto cct = fifo->cct;
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ void handle(const DoutPrefixProvider *dpp, Ptr&& p, int r) {
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " entering: tid=" << tid << dendl;
if (reread) {
reread = false;
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " read_meta failed: r="
<< r << " tid=" << tid << dendl;
complete(std::move(p), r);
}
pn = tail_part_num;
if (pn < part_num) {
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " pn=" << pn << " tid=" << tid << dendl;
fifo->trim_part(pn++, max_part_size, std::nullopt,
false, tid, call(std::move(p)));
}
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< (update ? " update_meta " : " trim ") << "failed: r="
<< r << " tid=" << tid << dendl;
complete(std::move(p), r);
}
if (!update) {
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " handling preceding trim callback: tid=" << tid << dendl;
retries = 0;
if (pn < part_num) {
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " pn=" << pn << " tid=" << tid << dendl;
std::unique_lock l(fifo->m);
const auto max_part_size = fifo->info.params.max_part_size;
return;
}
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " handling update-needed callback: tid=" << tid << dendl;
std::unique_lock l(fifo->m);
auto tail_part_num = fifo->info.tail_part_num;
if ((tail_part_num < part_num) &&
canceled) {
if (retries > MAX_RACE_RETRIES) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " canceled too many times, giving up: tid=" << tid << dendl;
complete(std::move(p), -EIO);
return;
}
++retries;
- fifo->_update_meta(fifo::update{}
+ fifo->_update_meta(dpp, fifo::update{}
.tail_part_num(part_num), objv, &canceled,
tid, call(std::move(p)));
} else {
}
};
-void FIFO::trim(std::string_view markstr, bool exclusive,
+void FIFO::trim(const DoutPrefixProvider *dpp, std::string_view markstr, bool exclusive,
lr::AioCompletion* c) {
auto marker = to_marker(markstr);
auto realmark = marker.value_or(::rgw::cls::fifo::marker{});
const auto part_oid = info.part_oid(pn);
auto tid = ++next_tid;
l.unlock();
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " entering: tid=" << tid << dendl;
- auto trimmer = std::make_unique<Trimmer>(this, realmark.num, realmark.ofs,
+ auto trimmer = std::make_unique<Trimmer>(dpp, this, realmark.num, realmark.ofs,
pn, exclusive, c, tid);
if (!marker) {
Trimmer::complete(std::move(trimmer), -EINVAL);
auto ofs = marker->ofs;
if (marker->num > hn) {
trimmer->reread = true;
- read_meta(tid, Trimmer::call(std::move(trimmer)));
+ read_meta(dpp, tid, Trimmer::call(std::move(trimmer)));
return;
}
if (pn < marker->num) {
- ldout(cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " pn=" << pn << " tid=" << tid << dendl;
ofs = max_part_size;
} else {
tid, Trimmer::call(std::move(trimmer)));
}
-int FIFO::get_part_info(int64_t part_num,
+int FIFO::get_part_info(const DoutPrefixProvider *dpp, int64_t part_num,
fifo::part_header* header,
optional_yield y)
{
const auto part_oid = info.part_oid(part_num);
auto tid = ++next_tid;
l.unlock();
- auto r = rgw::cls::fifo::get_part_info(ioctx, part_oid, header, tid, y);
+ auto r = rgw::cls::fifo::get_part_info(dpp, ioctx, part_oid, header, tid, y);
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " get_part_info failed: r="
<< r << " tid=" << tid << dendl;
}
std::uint64_t tid;
bool headerread = false;
- InfoGetter(FIFO* fifo, fu2::function<void(int r, fifo::part_header&&)> f,
+ InfoGetter(const DoutPrefixProvider *dpp, FIFO* fifo, fu2::function<void(int r, fifo::part_header&&)> f,
std::uint64_t tid, lr::AioCompletion* super)
- : Completion(super), fifo(fifo), f(std::move(f)), tid(tid) {}
- void handle(Ptr&& p, int r) {
+ : Completion(dpp, super), fifo(fifo), f(std::move(f)), tid(tid) {}
+ void handle(const DoutPrefixProvider *dpp, Ptr&& p, int r) {
if (!headerread) {
if (r < 0) {
- lderr(fifo->cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " read_meta failed: r="
<< r << " tid=" << tid << dendl;
if (f)
auto info = fifo->meta();
auto hpn = info.head_part_num;
if (hpn < 0) {
- ldout(fifo->cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " no head, returning empty partinfo r="
<< r << " tid=" << tid << dendl;
if (f)
}
if (r < 0) {
- lderr(fifo->cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " get_part_info failed: r="
<< r << " tid=" << tid << dendl;
}
}
};
-void FIFO::get_head_info(fu2::unique_function<void(int r,
+void FIFO::get_head_info(const DoutPrefixProvider *dpp, fu2::unique_function<void(int r,
fifo::part_header&&)> f,
lr::AioCompletion* c)
{
std::unique_lock l(m);
auto tid = ++next_tid;
l.unlock();
- auto ig = std::make_unique<InfoGetter>(this, std::move(f), tid, c);
- read_meta(tid, InfoGetter::call(std::move(ig)));
+ auto ig = std::make_unique<InfoGetter>(dpp, this, std::move(f), tid, c);
+ read_meta(dpp, tid, InfoGetter::call(std::move(ig)));
}
struct JournalProcessor : public Completion<JournalProcessor> {
return;
}
- void finish_je(Ptr&& p, int r,
+ void finish_je(const DoutPrefixProvider *dpp, Ptr&& p, int r,
const fifo::journal_entry& entry) {
- ldout(fifo->cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " entering: tid=" << tid << dendl;
- ldout(fifo->cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " finishing entry: entry=" << entry
<< " tid=" << tid << dendl;
r = 0;
if (r < 0) {
- lderr(fifo->cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " processing entry failed: entry=" << entry
<< " r=" << r << " tid=" << tid << dendl;
complete(std::move(p), r);
processed.push_back(entry);
}
++iter;
- process(std::move(p));
+ process(dpp, std::move(p));
}
- void postprocess(Ptr&& p) {
- ldout(fifo->cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ void postprocess(const DoutPrefixProvider *dpp, Ptr&& p) {
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " entering: tid=" << tid << dendl;
if (processed.empty()) {
- ldout(fifo->cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " nothing to update any more: race_retries="
<< race_retries << " tid=" << tid << dendl;
complete(std::move(p), 0);
return;
}
- pp_run(std::move(p), 0, false);
+ pp_run(dpp, std::move(p), 0, false);
}
public:
- JournalProcessor(FIFO* fifo, std::uint64_t tid, lr::AioCompletion* super)
- : Completion(super), fifo(fifo), tid(tid) {
+ JournalProcessor(const DoutPrefixProvider *dpp, FIFO* fifo, std::uint64_t tid, lr::AioCompletion* super)
+ : Completion(dpp, super), fifo(fifo), tid(tid) {
std::unique_lock l(fifo->m);
journal = fifo->info.journal;
iter = journal.begin();
new_max = fifo->info.max_push_part_num;
}
- void pp_run(Ptr&& p, int r, bool canceled) {
- ldout(fifo->cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ void pp_run(const DoutPrefixProvider *dpp, Ptr&& p, int r, bool canceled) {
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " entering: tid=" << tid << dendl;
std::optional<int64_t> tail_part_num;
std::optional<int64_t> head_part_num;
std::optional<int64_t> max_part_num;
if (r < 0) {
- lderr(fifo->cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " failed, r=: " << r << " tid=" << tid << dendl;
complete(std::move(p), r);
}
- ldout(fifo->cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " postprocessing: race_retries="
<< race_retries << " tid=" << tid << dendl;
if (!first_pp && r == 0 && !canceled) {
- ldout(fifo->cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " nothing to update any more: race_retries="
<< race_retries << " tid=" << tid << dendl;
complete(std::move(p), 0);
if (canceled) {
if (race_retries >= MAX_RACE_RETRIES) {
- lderr(fifo->cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " canceled too many times, giving up: tid="
<< tid << dendl;
complete(std::move(p), -ECANCELED);
return;
}
- ldout(fifo->cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " update canceled, retrying: race_retries="
<< race_retries << " tid=" << tid << dendl;
!tail_part_num &&
!max_part_num) {
/* nothing to update anymore */
- ldout(fifo->cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " nothing to update any more: race_retries="
<< race_retries << " tid=" << tid << dendl;
complete(std::move(p), 0);
return;
}
state = pp_callback;
- fifo->_update_meta(fifo::update{}
+ fifo->_update_meta(dpp, fifo::update{}
.tail_part_num(tail_part_num)
.head_part_num(head_part_num)
.max_push_part_num(max_part_num)
JournalProcessor(JournalProcessor&&) = delete;
JournalProcessor& operator =(JournalProcessor&&) = delete;
- void process(Ptr&& p) {
- ldout(fifo->cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ void process(const DoutPrefixProvider *dpp, Ptr&& p) {
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " entering: tid=" << tid << dendl;
while (iter != journal.end()) {
- ldout(fifo->cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " processing entry: entry=" << *iter
<< " tid=" << tid << dendl;
const auto entry = iter->second;
return;
}
}
- postprocess(std::move(p));
+ postprocess(dpp, std::move(p));
return;
}
- void handle(Ptr&& p, int r) {
- ldout(fifo->cct, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ void handle(const DoutPrefixProvider *dpp, Ptr&& p, int r) {
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " entering: tid=" << tid << dendl;
switch (state) {
case entry_callback:
- finish_je(std::move(p), r, iter->second);
+ finish_je(dpp, std::move(p), r, iter->second);
return;
case pp_callback:
auto c = canceled;
canceled = false;
- pp_run(std::move(p), r, c);
+ pp_run(dpp, std::move(p), r, c);
return;
}
};
-void FIFO::process_journal(std::uint64_t tid, lr::AioCompletion* c) {
- auto p = std::make_unique<JournalProcessor>(this, tid, c);
- p->process(std::move(p));
+void FIFO::process_journal(const DoutPrefixProvider *dpp, std::uint64_t tid, lr::AioCompletion* c) {
+ auto p = std::make_unique<JournalProcessor>(dpp, this, tid, c);
+ p->process(dpp, std::move(p));
}
struct Lister : Completion<Lister> {
}
public:
- Lister(FIFO* f, std::int64_t part_num, std::uint64_t ofs, int max_entries,
+ Lister(const DoutPrefixProvider *dpp, FIFO* f, std::int64_t part_num, std::uint64_t ofs, int max_entries,
std::vector<list_entry>* entries_out, bool* more_out,
std::uint64_t tid, lr::AioCompletion* super)
- : Completion(super), f(f), part_num(part_num), ofs(ofs), max_entries(max_entries),
+ : Completion(dpp, super), f(f), part_num(part_num), ofs(ofs), max_entries(max_entries),
entries_out(entries_out), more_out(more_out), tid(tid) {
result.reserve(max_entries);
}
Lister(Lister&&) = delete;
Lister& operator =(Lister&&) = delete;
- void handle(Ptr&& p, int r) {
+ void handle(const DoutPrefixProvider *dpp, Ptr&& p, int r) {
if (read)
handle_read(std::move(p), r);
else
- handle_list(std::move(p), r);
+ handle_list(dpp, std::move(p), r);
}
void list(Ptr&& p) {
return;
}
- void handle_list(Ptr&& p, int r) {
+ void handle_list(const DoutPrefixProvider *dpp, Ptr&& p, int r) {
if (r >= 0) r = r_out;
r_out = 0;
std::unique_lock l(f->m);
l.unlock();
if (r == -ENOENT) {
read = true;
- f->read_meta(tid, call(std::move(p)));
+ f->read_meta(dpp, tid, call(std::move(p)));
return;
}
if (r < 0) {
}
};
-void FIFO::list(int max_entries,
+void FIFO::list(const DoutPrefixProvider *dpp, int max_entries,
std::optional<std::string_view> markstr,
std::vector<list_entry>* out,
bool* more,
}
}
- auto ls = std::make_unique<Lister>(this, part_num, ofs, max_entries, out,
+ auto ls = std::make_unique<Lister>(dpp, this, part_num, ofs, max_entries, out,
more, tid, c);
if (markstr && !marker) {
auto l = ls.get();
bool exclusive = false,
std::uint64_t max_part_size = default_max_part_size,
std::uint64_t max_entry_size = default_max_entry_size);
-int get_meta(lr::IoCtx& ioctx, const std::string& oid,
+int get_meta(const DoutPrefixProvider *dpp, lr::IoCtx& ioctx, const std::string& oid,
std::optional<fifo::objv> objv, fifo::info* info,
std::uint32_t* part_header_size,
std::uint32_t* part_entry_overhead,
std::uint64_t tid, optional_yield y,
bool probe = false);
-
struct marker {
std::int64_t num = 0;
std::uint64_t ofs = 0;
const fifo::objv& objv,
const fifo::update& update,
std::uint64_t tid);
- int _update_meta(const fifo::update& update,
+ int _update_meta(const DoutPrefixProvider *dpp, const fifo::update& update,
fifo::objv version, bool* pcanceled,
std::uint64_t tid, optional_yield y);
- void _update_meta(const fifo::update& update,
+ void _update_meta(const DoutPrefixProvider *dpp, const fifo::update& update,
fifo::objv version, bool* pcanceled,
std::uint64_t tid, lr::AioCompletion* c);
- int create_part(int64_t part_num, std::string_view tag, std::uint64_t tid,
+ int create_part(const DoutPrefixProvider *dpp, int64_t part_num, std::string_view tag, std::uint64_t tid,
optional_yield y);
- int remove_part(int64_t part_num, std::string_view tag, std::uint64_t tid,
+ int remove_part(const DoutPrefixProvider *dpp, int64_t part_num, std::string_view tag, std::uint64_t tid,
optional_yield y);
- int process_journal(std::uint64_t tid, optional_yield y);
- void process_journal(std::uint64_t tid, lr::AioCompletion* c);
- int _prepare_new_part(bool is_head, std::uint64_t tid, optional_yield y);
- void _prepare_new_part(bool is_head, std::uint64_t tid, lr::AioCompletion* c);
- int _prepare_new_head(std::uint64_t tid, optional_yield y);
- void _prepare_new_head(std::uint64_t tid, lr::AioCompletion* c);
- int push_entries(const std::deque<cb::list>& data_bufs,
+ int process_journal(const DoutPrefixProvider *dpp, std::uint64_t tid, optional_yield y);
+ void process_journal(const DoutPrefixProvider *dpp, std::uint64_t tid, lr::AioCompletion* c);
+ int _prepare_new_part(const DoutPrefixProvider *dpp, bool is_head, std::uint64_t tid, optional_yield y);
+ void _prepare_new_part(const DoutPrefixProvider *dpp, bool is_head, std::uint64_t tid, lr::AioCompletion* c);
+ int _prepare_new_head(const DoutPrefixProvider *dpp, std::uint64_t tid, optional_yield y);
+ void _prepare_new_head(const DoutPrefixProvider *dpp, std::uint64_t tid, lr::AioCompletion* c);
+ int push_entries(const DoutPrefixProvider *dpp, const std::deque<cb::list>& data_bufs,
std::uint64_t tid, optional_yield y);
void push_entries(const std::deque<cb::list>& data_bufs,
std::uint64_t tid, lr::AioCompletion* c);
- int trim_part(int64_t part_num, uint64_t ofs,
+ int trim_part(const DoutPrefixProvider *dpp, int64_t part_num, uint64_t ofs,
std::optional<std::string_view> tag, bool exclusive,
std::uint64_t tid, optional_yield y);
void trim_part(int64_t part_num, uint64_t ofs,
std::uint64_t tid, lr::AioCompletion* c);
/// Force refresh of metadata, yielding/blocking style
- int read_meta(std::uint64_t tid, optional_yield y);
+ int read_meta(const DoutPrefixProvider *dpp, std::uint64_t tid, optional_yield y);
/// Force refresh of metadata, with a librados Completion
- void read_meta(std::uint64_t tid, lr::AioCompletion* c);
+ void read_meta(const DoutPrefixProvider *dpp, std::uint64_t tid, lr::AioCompletion* c);
public:
FIFO& operator =(FIFO&&) = delete;
/// Open an existing FIFO.
- static int open(lr::IoCtx ioctx, //< IO Context
+ static int open(const DoutPrefixProvider *dpp, lr::IoCtx ioctx, //< IO Context
std::string oid, //< OID for metadata object
std::unique_ptr<FIFO>* fifo, //< OUT: Pointer to FIFO object
optional_yield y, //< Optional yield context
/// can't find it.
bool probe = false);
/// Create a new or open an existing FIFO.
- static int create(lr::IoCtx ioctx, //< IO Context
+ static int create(const DoutPrefixProvider *dpp, lr::IoCtx ioctx, //< IO Context
std::string oid, //< OID for metadata object
std::unique_ptr<FIFO>* fifo, //< OUT: Pointer to FIFO object
optional_yield y, //< Optional yield context
std::uint64_t max_entry_size = default_max_entry_size);
/// Force refresh of metadata, yielding/blocking style
- int read_meta(optional_yield y);
+ int read_meta(const DoutPrefixProvider *dpp, optional_yield y);
/// Get currently known metadata
const fifo::info& meta() const;
/// Get partition header and entry overhead size
std::pair<std::uint32_t, std::uint32_t> get_part_layout_info() const;
/// Push an entry to the FIFO
- int push(const cb::list& bl, //< Entry to push
+ int push(const DoutPrefixProvider *dpp,
+ const cb::list& bl, //< Entry to push
optional_yield y //< Optional yield
);
/// Push an entry to the FIFO
- void push(const cb::list& bl, //< Entry to push
+ void push(const DoutPrefixProvider *dpp, const cb::list& bl, //< Entry to push
lr::AioCompletion* c //< Async Completion
);
/// Push entries to the FIFO
- int push(const std::vector<cb::list>& data_bufs, //< Entries to push
+ int push(const DoutPrefixProvider *dpp, const std::vector<cb::list>& data_bufs, //< Entries to push
optional_yield y //< Optional yield
);
/// Push entries to the FIFO
- void push(const std::vector<cb::list>& data_bufs, //< Entries to push
+ void push(const DoutPrefixProvider *dpp, const std::vector<cb::list>& data_bufs, //< Entries to push
lr::AioCompletion* c //< Async Completion
);
/// List entries
- int list(int max_entries, //< Maximum entries to list
+ int list(const DoutPrefixProvider *dpp,
+ int max_entries, //< Maximum entries to list
/// Point after which to begin listing. Start at tail if null
std::optional<std::string_view> markstr,
std::vector<list_entry>* out, //< OUT: entries
bool* more,
optional_yield y //< Optional yield
);
- void list(int max_entries, //< Maximum entries to list
+ void list(const DoutPrefixProvider *dpp,
+ int max_entries, //< Maximum entries to list
/// Point after which to begin listing. Start at tail if null
std::optional<std::string_view> markstr,
std::vector<list_entry>* out, //< OUT: entries
lr::AioCompletion* c //< Async Completion
);
/// Trim entries, coroutine/block style
- int trim(std::string_view markstr, //< Position to which to trim, inclusive
+ int trim(const DoutPrefixProvider *dpp,
+ std::string_view markstr, //< Position to which to trim, inclusive
bool exclusive, //< If true, do not trim the target entry
//< itself, just all those before it.
optional_yield y //< Optional yield
);
/// Trim entries, librados AioCompletion style
- void trim(std::string_view markstr, //< Position to which to trim, inclusive
+ void trim(const DoutPrefixProvider *dpp,
+ std::string_view markstr, //< Position to which to trim, inclusive
bool exclusive, //< If true, do not trim the target entry
//< itself, just all those before it.
lr::AioCompletion* c //< librados AIO Completion
);
/// Get part info
- int get_part_info(int64_t part_num, /// Part number
+ int get_part_info(const DoutPrefixProvider *dpp, int64_t part_num, /// Part number
fifo::part_header* header, //< OUT: Information
optional_yield y //< Optional yield
);
/// A convenience method to fetch the part information for the FIFO
/// head, using librados::AioCompletion, since
/// libradio::AioCompletions compose lousily.
- void get_head_info(fu2::unique_function< //< Function to receive info
+ void get_head_info(const DoutPrefixProvider *dpp, fu2::unique_function< //< Function to receive info
void(int r, fifo::part_header&&)>,
lr::AioCompletion* c //< AIO Completion
);
template<typename T>
struct Completion {
private:
+ const DoutPrefixProvider *_dpp;
lr::AioCompletion* _cur = nullptr;
lr::AioCompletion* _super;
public:
return _super;
}
- Completion(lr::AioCompletion* super) : _super(super) {
+ Completion(const DoutPrefixProvider *dpp, lr::AioCompletion* super) : _dpp(dpp), _super(super) {
super->pc->get();
}
auto r = t->_cur->get_return_value();
t->_cur->release();
t->_cur = nullptr;
- t->handle(Ptr(t), r);
+ t->handle(t->_dpp, Ptr(t), r);
}
};
#include <string>
#include <mutex>
-
#define dout_subsys ceph_subsys_rgw
bool global_stop = false;
RGWLibFS* fs = iter->first->ref();
uniq.unlock();
fs->gc();
- fs->update_user();
+ const DoutPrefix dp(cct, dout_subsys, "librgw: ");
+ fs->update_user(&dp);
fs->rele();
uniq.lock();
if (cur_gen != gen)
}
}
- void RGWLibProcess::handle_request(RGWRequest* r)
+ void RGWLibProcess::handle_request(const DoutPrefixProvider *dpp, RGWRequest* r)
{
/*
* invariant: valid requests are derived from RGWLibRequst
*/
RGWOp *op = (req->op) ? req->op : dynamic_cast<RGWOp*>(req);
if (! op) {
- dout(1) << "failed to derive cognate RGWOp (invalid op?)" << dendl;
+ ldpp_dout(op, 1) << "failed to derive cognate RGWOp (invalid op?)" << dendl;
return -EINVAL;
}
/* XXX and -then- stash req_state pointers everywhere they are needed */
ret = req->init(rgw_env, &rados_ctx, io, s);
if (ret < 0) {
- dout(10) << "failed to initialize request" << dendl;
+ ldpp_dout(op, 10) << "failed to initialize request" << dendl;
abort_req(s, op, ret);
goto done;
}
ret = op->verify_permission(null_yield);
if (ret < 0) {
if (s->system_request) {
- dout(2) << "overriding permissions due to system operation" << dendl;
+ ldpp_dout(op, 2) << "overriding permissions due to system operation" << dendl;
} else if (s->auth.identity->is_admin_of(s->user->get_id())) {
- dout(2) << "overriding permissions due to admin operation" << dendl;
+ ldpp_dout(op, 2) << "overriding permissions due to admin operation" << dendl;
} else {
abort_req(s, op, ret);
goto done;
ldpp_dout(s, 2) << "http status=" << http_ret << dendl;
- dout(1) << "====== " << __func__
+ ldpp_dout(op, 1) << "====== " << __func__
<< " req done req=" << hex << req << dec << " http_status="
<< http_ret
<< " ======" << dendl;
*/
RGWOp *op = (req->op) ? req->op : dynamic_cast<RGWOp*>(req);
if (! op) {
- dout(1) << "failed to derive cognate RGWOp (invalid op?)" << dendl;
+ ldpp_dout(op, 1) << "failed to derive cognate RGWOp (invalid op?)" << dendl;
return -EINVAL;
}
int ret = req->init(rgw_env, &rados_ctx, &io_ctx, s);
if (ret < 0) {
- dout(10) << "failed to initialize request" << dendl;
+ ldpp_dout(op, 10) << "failed to initialize request" << dendl;
abort_req(s, op, ret);
goto done;
}
ret = op->verify_permission(null_yield);
if (ret < 0) {
if (s->system_request) {
- dout(2) << "overriding permissions due to system operation" << dendl;
+ ldpp_dout(op, 2) << "overriding permissions due to system operation" << dendl;
} else if (s->auth.identity->is_admin_of(s->user->get_id())) {
- dout(2) << "overriding permissions due to admin operation" << dendl;
+ ldpp_dout(op, 2) << "overriding permissions due to admin operation" << dendl;
} else {
abort_req(s, op, ret);
goto done;
{
RGWOp *op = (req->op) ? req->op : dynamic_cast<RGWOp*>(req);
if (! op) {
- dout(1) << "failed to derive cognate RGWOp (invalid op?)" << dendl;
+ ldpp_dout(op, 1) << "failed to derive cognate RGWOp (invalid op?)" << dendl;
return -EINVAL;
}
int ret = req->exec_finish();
int op_ret = op->get_ret();
- dout(1) << "====== " << __func__
+ ldpp_dout(op, 1) << "====== " << __func__
<< " finishing continued request req=" << hex << req << dec
<< " op status=" << op_ret
<< " ======" << dendl;
g_conf()->rgw_run_sync_thread &&
g_conf()->rgw_nfs_run_sync_thread;
- store = RGWStoreManager::get_storage(g_ceph_context,
+ store = RGWStoreManager::get_storage(this, g_ceph_context,
run_gc,
run_lc,
run_quota,
int RGWLibIO::set_uid(rgw::sal::RGWRadosStore *store, const rgw_user& uid)
{
- int ret = store->ctl()->user->get_info_by_uid(uid, &user_info, null_yield);
+ const DoutPrefix dp(store->ctx(), dout_subsys, "librgw: ");
+ int ret = store->ctl()->user->get_info_by_uid(&dp, uid, &user_info, null_yield);
if (ret < 0) {
derr << "ERROR: failed reading user info: uid=" << uid << " ret="
<< ret << dendl;
int RGWLibRequest::read_permissions(RGWOp* op, optional_yield y) {
/* bucket and object ops */
int ret =
- rgw_build_bucket_policies(rgwlib.get_store(), get_state(), y);
+ rgw_build_bucket_policies(op, rgwlib.get_store(), get_state(), y);
if (ret < 0) {
- ldout(get_state()->cct, 10) << "read_permissions (bucket policy) on "
+ ldpp_dout(op, 10) << "read_permissions (bucket policy) on "
<< get_state()->bucket << ":"
<< get_state()->object
<< " only_bucket=" << only_bucket()
ret = -EACCES;
} else if (! only_bucket()) {
/* object ops */
- ret = rgw_build_object_policies(rgwlib.get_store(), get_state(),
+ ret = rgw_build_object_policies(op, rgwlib.get_store(), get_state(),
op->prefetch_data(), y);
if (ret < 0) {
- ldout(get_state()->cct, 10) << "read_permissions (object policy) on"
+ ldpp_dout(op, 10) << "read_permissions (object policy) on"
<< get_state()->bucket << ":"
<< get_state()->object
<< " ret=" << ret << dendl;
return perm_mask & auth_identity.get_perms_from_aclspec(dpp, acl_user_map);
}
-uint32_t RGWAccessControlList::get_group_perm(ACLGroupTypeEnum group,
+uint32_t RGWAccessControlList::get_group_perm(const DoutPrefixProvider *dpp,
+ ACLGroupTypeEnum group,
const uint32_t perm_mask) const
{
- ldout(cct, 5) << "Searching permissions for group=" << (int)group
+ ldpp_dout(dpp, 5) << "Searching permissions for group=" << (int)group
<< " mask=" << perm_mask << dendl;
const auto iter = acl_group_map.find((uint32_t)group);
if (iter != acl_group_map.end()) {
- ldout(cct, 5) << "Found permission: " << iter->second << dendl;
+ ldpp_dout(dpp, 5) << "Found permission: " << iter->second << dendl;
return iter->second & perm_mask;
}
- ldout(cct, 5) << "Permissions for group not found" << dendl;
+ ldpp_dout(dpp, 5) << "Permissions for group not found" << dendl;
return 0;
}
/* should we continue looking up? */
if (!ignore_public_acls && ((perm & perm_mask) != perm_mask)) {
- perm |= acl.get_group_perm(ACL_GROUP_ALL_USERS, perm_mask);
+ perm |= acl.get_group_perm(dpp, ACL_GROUP_ALL_USERS, perm_mask);
if (false == auth_identity.is_owner_of(rgw_user(RGW_USER_ANON_ID))) {
/* this is not the anonymous user */
- perm |= acl.get_group_perm(ACL_GROUP_AUTHENTICATED_USERS, perm_mask);
+ perm |= acl.get_group_perm(dpp, ACL_GROUP_AUTHENTICATED_USERS, perm_mask);
}
}
}
-bool RGWAccessControlPolicy::is_public() const
+bool RGWAccessControlPolicy::is_public(const DoutPrefixProvider *dpp) const
{
static constexpr auto public_groups = {ACL_GROUP_ALL_USERS,
ACL_GROUP_AUTHENTICATED_USERS};
return std::any_of(public_groups.begin(), public_groups.end(),
- [&](ACLGroupTypeEnum g) {
- auto p = acl.get_group_perm(g, RGW_PERM_FULL_CONTROL);
+ [&, dpp](ACLGroupTypeEnum g) {
+ auto p = acl.get_group_perm(dpp, g, RGW_PERM_FULL_CONTROL);
return (p != RGW_PERM_NONE) && (p != RGW_PERM_INVALID);
}
);
uint32_t get_perm(const DoutPrefixProvider* dpp,
const rgw::auth::Identity& auth_identity,
uint32_t perm_mask);
- uint32_t get_group_perm(ACLGroupTypeEnum group, uint32_t perm_mask) const;
+ uint32_t get_group_perm(const DoutPrefixProvider *dpp, ACLGroupTypeEnum group, uint32_t perm_mask) const;
uint32_t get_referer_perm(uint32_t current_perm,
std::string http_referer,
uint32_t perm_mask);
}
virtual bool compare_group_name(string& id, ACLGroupTypeEnum group) { return false; }
- bool is_public() const;
+ bool is_public(const DoutPrefixProvider *dpp) const;
friend bool operator==(const RGWAccessControlPolicy& lhs, const RGWAccessControlPolicy& rhs);
friend bool operator!=(const RGWAccessControlPolicy& lhs, const RGWAccessControlPolicy& rhs);
return env->get(header, NULL);
}
-static int parse_grantee_str(RGWUserCtl *user_ctl, string& grantee_str,
+static int parse_grantee_str(const DoutPrefixProvider *dpp, RGWUserCtl *user_ctl, string& grantee_str,
const struct s3_acl_header *perm, ACLGrant& grant)
{
string id_type, id_val_quoted;
string id_val = rgw_trim_quotes(id_val_quoted);
if (strcasecmp(id_type.c_str(), "emailAddress") == 0) {
- ret = user_ctl->get_info_by_email(id_val, &info, null_yield);
+ ret = user_ctl->get_info_by_email(dpp, id_val, &info, null_yield);
if (ret < 0)
return ret;
grant.set_canon(info.user_id, info.display_name, rgw_perm);
} else if (strcasecmp(id_type.c_str(), "id") == 0) {
rgw_user user(id_val);
- ret = user_ctl->get_info_by_uid(user, &info, null_yield);
+ ret = user_ctl->get_info_by_uid(dpp, user, &info, null_yield);
if (ret < 0)
return ret;
return 0;
}
-static int parse_acl_header(RGWUserCtl *user_ctl, const RGWEnv *env,
+static int parse_acl_header(const DoutPrefixProvider *dpp, RGWUserCtl *user_ctl, const RGWEnv *env,
const struct s3_acl_header *perm, std::list<ACLGrant>& _grants)
{
std::list<string> grantees;
for (list<string>::iterator it = grantees.begin(); it != grantees.end(); ++it) {
ACLGrant grant;
- int ret = parse_grantee_str(user_ctl, *it, perm, grant);
+ int ret = parse_grantee_str(dpp, user_ctl, *it, perm, grant);
if (ret < 0)
return ret;
{0, NULL}
};
-int RGWAccessControlPolicy_S3::create_from_headers(RGWUserCtl *user_ctl, const RGWEnv *env, ACLOwner& _owner)
+int RGWAccessControlPolicy_S3::create_from_headers(const DoutPrefixProvider *dpp, RGWUserCtl *user_ctl, const RGWEnv *env, ACLOwner& _owner)
{
std::list<ACLGrant> grants;
int r = 0;
for (const struct s3_acl_header *p = acl_header_perms; p->rgw_perm; p++) {
- r = parse_acl_header(user_ctl, env, p, grants);
+ r = parse_acl_header(dpp, user_ctl, env, p, grants);
if (r < 0) {
return r;
}
/*
can only be called on object that was parsed
*/
-int RGWAccessControlPolicy_S3::rebuild(RGWUserCtl *user_ctl, ACLOwner *owner, RGWAccessControlPolicy& dest,
+int RGWAccessControlPolicy_S3::rebuild(const DoutPrefixProvider *dpp, RGWUserCtl *user_ctl, ACLOwner *owner, RGWAccessControlPolicy& dest,
std::string &err_msg)
{
if (!owner)
}
RGWUserInfo owner_info;
- if (user_ctl->get_info_by_uid(owner->get_id(), &owner_info, null_yield) < 0) {
- ldout(cct, 10) << "owner info does not exist" << dendl;
+ if (user_ctl->get_info_by_uid(dpp, owner->get_id(), &owner_info, null_yield) < 0) {
+ ldpp_dout(dpp, 10) << "owner info does not exist" << dendl;
err_msg = "Invalid id";
return -EINVAL;
}
dest_owner.set_id(owner->get_id());
dest_owner.set_name(owner_info.display_name);
- ldout(cct, 20) << "owner id=" << owner->get_id() << dendl;
- ldout(cct, 20) << "dest owner id=" << dest.get_owner().get_id() << dendl;
+ ldpp_dout(dpp, 20) << "owner id=" << owner->get_id() << dendl;
+ ldpp_dout(dpp, 20) << "dest owner id=" << dest.get_owner().get_id() << dendl;
RGWAccessControlList& dst_acl = dest.get_acl();
string email;
rgw_user u;
if (!src_grant.get_id(u)) {
- ldout(cct, 0) << "ERROR: src_grant.get_id() failed" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: src_grant.get_id() failed" << dendl;
return -EINVAL;
}
email = u.id;
- ldout(cct, 10) << "grant user email=" << email << dendl;
- if (user_ctl->get_info_by_email(email, &grant_user, null_yield) < 0) {
- ldout(cct, 10) << "grant user email not found or other error" << dendl;
+ ldpp_dout(dpp, 10) << "grant user email=" << email << dendl;
+ if (user_ctl->get_info_by_email(dpp, email, &grant_user, null_yield) < 0) {
+ ldpp_dout(dpp, 10) << "grant user email not found or other error" << dendl;
err_msg = "The e-mail address you provided does not match any account on record.";
return -ERR_UNRESOLVABLE_EMAIL;
}
{
if (type.get_type() == ACL_TYPE_CANON_USER) {
if (!src_grant.get_id(uid)) {
- ldout(cct, 0) << "ERROR: src_grant.get_id() failed" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: src_grant.get_id() failed" << dendl;
err_msg = "Invalid id";
return -EINVAL;
}
}
- if (grant_user.user_id.empty() && user_ctl->get_info_by_uid(uid, &grant_user, null_yield) < 0) {
- ldout(cct, 10) << "grant user does not exist:" << uid << dendl;
+ if (grant_user.user_id.empty() && user_ctl->get_info_by_uid(dpp, uid, &grant_user, null_yield) < 0) {
+ ldpp_dout(dpp, 10) << "grant user does not exist:" << uid << dendl;
err_msg = "Invalid id";
return -EINVAL;
} else {
grant_ok = true;
rgw_user new_id;
new_grant.get_id(new_id);
- ldout(cct, 10) << "new grant: " << new_id << ":" << grant_user.display_name << dendl;
+ ldpp_dout(dpp, 10) << "new grant: " << new_id << ":" << grant_user.display_name << dendl;
}
}
break;
if (ACLGrant_S3::group_to_uri(src_grant.get_group(), uri)) {
new_grant = src_grant;
grant_ok = true;
- ldout(cct, 10) << "new grant: " << uri << dendl;
+ ldpp_dout(dpp, 10) << "new grant: " << uri << dendl;
} else {
- ldout(cct, 10) << "bad grant group:" << (int)src_grant.get_group() << dendl;
+ ldpp_dout(dpp, 10) << "bad grant group:" << (int)src_grant.get_group() << dendl;
err_msg = "Invalid group uri";
return -EINVAL;
}
bool xml_end(const char *el) override;
void to_xml(ostream& out);
- int rebuild(RGWUserCtl *user_ctl, ACLOwner *owner, RGWAccessControlPolicy& dest,
+ int rebuild(const DoutPrefixProvider *dpp, RGWUserCtl *user_ctl, ACLOwner *owner, RGWAccessControlPolicy& dest,
std::string &err_msg);
bool compare_group_name(string& id, ACLGroupTypeEnum group) override;
int ret = _acl.create_canned(owner, bucket_owner, canned_acl);
return ret;
}
- int create_from_headers(RGWUserCtl *user_ctl, const RGWEnv *env, ACLOwner& _owner);
+ int create_from_headers(const DoutPrefixProvider *dpp, RGWUserCtl *user_ctl, const RGWEnv *env, ACLOwner& _owner);
};
/**
}
}
-static ACLGrant user_to_grant(CephContext* const cct,
+static ACLGrant user_to_grant(const DoutPrefixProvider *dpp,
+ CephContext* const cct,
RGWUserCtl* const user_ctl,
const std::string& uid,
const uint32_t perm)
RGWUserInfo grant_user;
ACLGrant grant;
- if (user_ctl->get_info_by_uid(user, &grant_user, null_yield) < 0) {
+ if (user_ctl->get_info_by_uid(dpp, user, &grant_user, null_yield) < 0) {
ldout(cct, 10) << "grant user does not exist: " << uid << dendl;
/* skipping silently */
grant.set_canon(user, std::string(), perm);
return grant;
}
-int RGWAccessControlPolicy_SWIFT::add_grants(RGWUserCtl* const user_ctl,
+int RGWAccessControlPolicy_SWIFT::add_grants(const DoutPrefixProvider *dpp,
+ RGWUserCtl* const user_ctl,
const std::vector<std::string>& uids,
const uint32_t perm)
{
for (const auto& uid : uids) {
boost::optional<ACLGrant> grant;
- ldout(cct, 20) << "trying to add grant for ACL uid=" << uid << dendl;
+ ldpp_dout(dpp, 20) << "trying to add grant for ACL uid=" << uid << dendl;
/* Let's check whether the item has a separator potentially indicating
* a special meaning (like an HTTP referral-based grant). */
const size_t pos = uid.find(':');
if (std::string::npos == pos) {
/* No, it don't have -- we've got just a regular user identifier. */
- grant = user_to_grant(cct, user_ctl, uid, perm);
+ grant = user_to_grant(dpp, cct, user_ctl, uid, perm);
} else {
/* Yes, *potentially* an HTTP referral. */
auto designator = uid.substr(0, pos);
boost::algorithm::trim(designatee);
if (! boost::algorithm::starts_with(designator, ".")) {
- grant = user_to_grant(cct, user_ctl, uid, perm);
+ grant = user_to_grant(dpp, cct, user_ctl, uid, perm);
} else if ((perm & SWIFT_PERM_WRITE) == 0 && is_referrer(designator)) {
/* HTTP referrer-based ACLs aren't acceptable for writes. */
grant = referrer_to_grant(designatee, perm);
}
-int RGWAccessControlPolicy_SWIFT::create(RGWUserCtl* const user_ctl,
+int RGWAccessControlPolicy_SWIFT::create(const DoutPrefixProvider *dpp,
+ RGWUserCtl* const user_ctl,
const rgw_user& id,
const std::string& name,
const char* read_list,
std::vector<std::string> uids;
int r = parse_list(read_list, uids);
if (r < 0) {
- ldout(cct, 0) << "ERROR: parse_list for read returned r="
+ ldpp_dout(dpp, 0) << "ERROR: parse_list for read returned r="
<< r << dendl;
return r;
}
- r = add_grants(user_ctl, uids, SWIFT_PERM_READ);
+ r = add_grants(dpp, user_ctl, uids, SWIFT_PERM_READ);
if (r < 0) {
ldout(cct, 0) << "ERROR: add_grants for read returned r="
<< r << dendl;
std::vector<std::string> uids;
int r = parse_list(write_list, uids);
if (r < 0) {
- ldout(cct, 0) << "ERROR: parse_list for write returned r="
+ ldpp_dout(dpp, 0) << "ERROR: parse_list for write returned r="
<< r << dendl;
return r;
}
- r = add_grants(user_ctl, uids, SWIFT_PERM_WRITE);
+ r = add_grants(dpp, user_ctl, uids, SWIFT_PERM_WRITE);
if (r < 0) {
ldout(cct, 0) << "ERROR: add_grants for write returned r="
<< r << dendl;
}
}
-void RGWAccessControlPolicy_SWIFTAcct::add_grants(RGWUserCtl * const user_ctl,
+void RGWAccessControlPolicy_SWIFTAcct::add_grants(const DoutPrefixProvider *dpp,
+ RGWUserCtl * const user_ctl,
const std::vector<std::string>& uids,
const uint32_t perm)
{
} else {
rgw_user user(uid);
- if (user_ctl->get_info_by_uid(user, &grant_user, null_yield) < 0) {
+ if (user_ctl->get_info_by_uid(dpp, user, &grant_user, null_yield) < 0) {
ldout(cct, 10) << "grant user does not exist:" << uid << dendl;
/* skipping silently */
grant.set_canon(user, std::string(), perm);
}
}
-bool RGWAccessControlPolicy_SWIFTAcct::create(RGWUserCtl * const user_ctl,
+bool RGWAccessControlPolicy_SWIFTAcct::create(const DoutPrefixProvider *dpp,
+ RGWUserCtl * const user_ctl,
const rgw_user& id,
const std::string& name,
const std::string& acl_str)
JSONParser parser;
if (!parser.parse(acl_str.c_str(), acl_str.length())) {
- ldout(cct, 0) << "ERROR: JSONParser::parse returned error=" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: JSONParser::parse returned error=" << dendl;
return false;
}
decode_json_obj(admin, *iter);
ldout(cct, 0) << "admins: " << admin << dendl;
- add_grants(user_ctl, admin, SWIFT_PERM_ADMIN);
+ add_grants(dpp, user_ctl, admin, SWIFT_PERM_ADMIN);
}
iter = parser.find_first("read-write");
decode_json_obj(readwrite, *iter);
ldout(cct, 0) << "read-write: " << readwrite << dendl;
- add_grants(user_ctl, readwrite, SWIFT_PERM_RWRT);
+ add_grants(dpp, user_ctl, readwrite, SWIFT_PERM_RWRT);
}
iter = parser.find_first("read-only");
decode_json_obj(readonly, *iter);
ldout(cct, 0) << "read-only: " << readonly << dendl;
- add_grants(user_ctl, readonly, SWIFT_PERM_READ);
+ add_grants(dpp, user_ctl, readonly, SWIFT_PERM_READ);
}
return true;
class RGWAccessControlPolicy_SWIFT : public RGWAccessControlPolicy
{
- int add_grants(RGWUserCtl *user_ctl,
+ int add_grants(const DoutPrefixProvider *dpp, RGWUserCtl *user_ctl,
const std::vector<std::string>& uids,
uint32_t perm);
}
~RGWAccessControlPolicy_SWIFT() override = default;
- int create(RGWUserCtl *user_ctl,
+ int create(const DoutPrefixProvider *dpp,
+ RGWUserCtl *user_ctl,
const rgw_user& id,
const std::string& name,
const char* read_list,
}
~RGWAccessControlPolicy_SWIFTAcct() override {}
- void add_grants(RGWUserCtl *user_ctl,
+ void add_grants(const DoutPrefixProvider *dpp,
+ RGWUserCtl *user_ctl,
const std::vector<std::string>& uids,
uint32_t perm);
- bool create(RGWUserCtl *user_ctl,
+ bool create(const DoutPrefixProvider *dpp,
+ RGWUserCtl *user_ctl,
const rgw_user& id,
const std::string& name,
const std::string& acl_str);
static const DoutPrefixProvider* dpp() {
struct GlobalPrefix : public DoutPrefixProvider {
- CephContext *get_cct() const override { return store->ctx(); }
+ CephContext *get_cct() const override { return dout_context; }
unsigned get_subsys() const override { return dout_subsys; }
std::ostream& gen_prefix(std::ostream& out) const override { return out; }
};
auto obj_ctx = store->svc()->sysobj->init_obj_ctx();
int r;
if (bucket_id.empty()) {
- r = store->getRados()->get_bucket_info(store->svc(), tenant_name, bucket_name, bucket_info, nullptr, null_yield, pattrs);
+ r = store->getRados()->get_bucket_info(store->svc(), tenant_name, bucket_name, bucket_info, nullptr, null_yield, dpp(), pattrs);
} else {
string bucket_instance_id = bucket_name + ":" + bucket_id;
- r = store->getRados()->get_bucket_instance_info(obj_ctx, bucket_instance_id, bucket_info, NULL, pattrs, null_yield);
+ r = store->getRados()->get_bucket_instance_info(obj_ctx, bucket_instance_id, bucket_info, NULL, pattrs, null_yield, dpp());
}
if (r < 0) {
cerr << "could not get bucket info for bucket=" << bucket_name << std::endl;
{
RGWBucketInfo bucket_info;
map<string, bufferlist> attrs;
- int r = store->getRados()->get_bucket_info(store->svc(), tenant_name, bucket_name, bucket_info, NULL, null_yield, &attrs);
+ int r = store->getRados()->get_bucket_info(store->svc(), tenant_name, bucket_name, bucket_info, NULL, null_yield, dpp(), &attrs);
if (r < 0) {
cerr << "could not get bucket info for bucket=" << bucket_name << ": " << cpp_strerror(-r) << std::endl;
return -r;
set_quota_info(bucket_info.quota, opt_cmd, max_size, max_objects, have_max_size, have_max_objects);
- r = store->getRados()->put_bucket_instance_info(bucket_info, false, real_time(), &attrs);
+ r = store->getRados()->put_bucket_instance_info(bucket_info, false, real_time(), &attrs, dpp());
if (r < 0) {
cerr << "ERROR: failed writing bucket instance info: " << cpp_strerror(-r) << std::endl;
return -r;
op_state.set_bucket_quota(user_info.bucket_quota);
string err;
- int r = user.modify(op_state, null_yield, &err);
+ int r = user.modify(dpp(), op_state, null_yield, &err);
if (r < 0) {
cerr << "ERROR: failed updating user info: " << cpp_strerror(-r) << ": " << err << std::endl;
return -r;
op_state.set_user_quota(user_info.user_quota);
string err;
- int r = user.modify(op_state, null_yield, &err);
+ int r = user.modify(dpp(), op_state, null_yield, &err);
if (r < 0) {
cerr << "ERROR: failed updating user info: " << cpp_strerror(-r) << ": " << err << std::endl;
return -r;
int check_min_obj_stripe_size(rgw::sal::RGWRadosStore *store, RGWBucketInfo& bucket_info, rgw::sal::RGWObject* obj, uint64_t min_stripe_size, bool *need_rewrite)
{
RGWObjectCtx obj_ctx(store);
- int ret = obj->get_obj_attrs(&obj_ctx, null_yield);
+ int ret = obj->get_obj_attrs(&obj_ctx, null_yield, dpp());
if (ret < 0) {
- lderr(store->ctx()) << "ERROR: failed to stat object, returned error: " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp(), -1) << "ERROR: failed to stat object, returned error: " << cpp_strerror(-ret) << dendl;
return ret;
}
auto biter = bl.cbegin();
decode(manifest, biter);
} catch (buffer::error& err) {
- ldout(store->ctx(), 0) << "ERROR: failed to decode manifest" << dendl;
+ ldpp_dout(dpp(), 0) << "ERROR: failed to decode manifest" << dendl;
return -EIO;
}
RGWRados::Object op_target(store->getRados(), bucket_info, obj_ctx, obj);
RGWRados::Object::Read read_op(&op_target);
- int ret = read_op.prepare(null_yield);
+ int ret = read_op.prepare(null_yield, dpp());
bool needs_fixing = (ret == -ENOENT);
f->dump_bool("needs_fixing", needs_fixing);
string status = (needs_fixing ? "needs_fixing" : "ok");
if ((needs_fixing || remove_bad) && fix) {
- ret = store->getRados()->fix_head_obj_locator(bucket_info, needs_fixing, remove_bad, key);
+ ret = store->getRados()->fix_head_obj_locator(dpp(), bucket_info, needs_fixing, remove_bad, key);
if (ret < 0) {
cerr << "ERROR: fix_head_object_locator() returned ret=" << ret << std::endl;
goto done;
bool needs_fixing;
string status;
- int ret = store->getRados()->fix_tail_obj_locator(bucket_info, key, fix, &needs_fixing, null_yield);
+ int ret = store->getRados()->fix_tail_obj_locator(dpp(), bucket_info, key, fix, &needs_fixing, null_yield);
if (ret < 0) {
cerr << "ERROR: fix_tail_object_locator_underscore() returned ret=" << ret << std::endl;
status = "failed";
f->open_array_section("check_objects");
do {
- ret = list_op.list_objects(max_entries - count, &result, &common_prefixes, &truncated, null_yield);
+ ret = list_op.list_objects(dpp(), max_entries - count, &result, &common_prefixes, &truncated, null_yield);
if (ret < 0) {
cerr << "ERROR: store->list_objects(): " << cpp_strerror(-ret) << std::endl;
return -ret;
ceph::bufferlist response;
rgw_user user;
- int ret = conn->forward(user, info, nullptr, MAX_REST_RESPONSE, &in_data, &response, null_yield);
+ int ret = conn->forward(dpp(), user, info, nullptr, MAX_REST_RESPONSE, &in_data, &response, null_yield);
int parse_ret = parser.parse(response.c_str(), response.length());
if (parse_ret < 0) {
RGWRESTSimpleRequest req(g_ceph_context, info.method, url, NULL, ¶ms);
bufferlist response;
- int ret = req.forward_request(key, info, MAX_REST_RESPONSE, &in_data, &response, null_yield);
+ int ret = req.forward_request(dpp(), key, info, MAX_REST_RESPONSE, &in_data, &response, null_yield);
int parse_ret = parser.parse(response.c_str(), response.length());
if (parse_ret < 0) {
if (store->svc()->zone->zone_id() == master_zone) {
// read the current period
RGWPeriod current_period;
- int ret = current_period.init(g_ceph_context,
+ int ret = current_period.init(dpp(), g_ceph_context,
store->svc()->sysobj, realm.get_id(),
null_yield);
if (ret < 0) {
return ret;
}
// the master zone can commit locally
- ret = period.commit(store, realm, current_period, cerr, null_yield, force);
+ ret = period.commit(dpp(), store, realm, current_period, cerr, null_yield, force);
if (ret < 0) {
cerr << "failed to commit period: " << cpp_strerror(-ret) << std::endl;
}
}
// the master zone gave us back the period that it committed, so it's
// safe to save it as our latest epoch
- ret = period.store_info(false, null_yield);
+ ret = period.store_info(dpp(), false, null_yield);
if (ret < 0) {
cerr << "Error storing committed period " << period.get_id() << ": "
<< cpp_strerror(ret) << std::endl;
return ret;
}
- ret = period.set_latest_epoch(null_yield, period.get_epoch());
+ ret = period.set_latest_epoch(dpp(), null_yield, period.get_epoch());
if (ret < 0) {
cerr << "Error updating period epoch: " << cpp_strerror(ret) << std::endl;
return ret;
}
- ret = period.reflect(null_yield);
+ ret = period.reflect(dpp(), null_yield);
if (ret < 0) {
cerr << "Error updating local objects: " << cpp_strerror(ret) << std::endl;
return ret;
}
- realm.notify_new_period(period, null_yield);
+ realm.notify_new_period(dpp(), period, null_yield);
return ret;
}
Formatter *formatter, bool force)
{
RGWRealm realm(realm_id, realm_name);
- int ret = realm.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = realm.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0 ) {
cerr << "Error initializing realm " << cpp_strerror(-ret) << std::endl;
return ret;
epoch = atoi(period_epoch.c_str());
}
RGWPeriod period(period_id, epoch);
- ret = period.init(g_ceph_context, store->svc()->sysobj, realm.get_id(), null_yield);
+ ret = period.init(dpp(), g_ceph_context, store->svc()->sysobj, realm.get_id(), null_yield);
if (ret < 0) {
cerr << "period init failed: " << cpp_strerror(-ret) << std::endl;
return ret;
}
period.fork();
- ret = period.update(null_yield);
+ ret = period.update(dpp(), null_yield);
if(ret < 0) {
// Dropping the error message here, as both the ret codes were handled in
// period.update()
return ret;
}
- ret = period.store_info(false, null_yield);
+ ret = period.store_info(dpp(), false, null_yield);
if (ret < 0) {
cerr << "failed to store period: " << cpp_strerror(-ret) << std::endl;
return ret;
cerr << "request failed: " << cpp_strerror(-ret) << std::endl;
return ret;
}
- ret = period->init(g_ceph_context, store->svc()->sysobj, null_yield, false);
+ ret = period->init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield, false);
if (ret < 0) {
cerr << "faile to init period " << cpp_strerror(-ret) << std::endl;
return ret;
cout << "failed to decode JSON input: " << e.what() << std::endl;
return -EINVAL;
}
- ret = period->store_info(false, null_yield);
+ ret = period->store_info(dpp(), false, null_yield);
if (ret < 0) {
cerr << "Error storing period " << period->get_id() << ": " << cpp_strerror(ret) << std::endl;
}
// store latest epoch (ignore errors)
- period->update_latest_epoch(period->get_epoch(), null_yield);
+ period->update_latest_epoch(dpp(), period->get_epoch(), null_yield);
return 0;
}
std::string* period_id)
{
RGWRealm realm(realm_id, realm_name);
- int ret = realm.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = realm.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
std::cerr << "failed to read realm: " << cpp_strerror(-ret) << std::endl;
return ret;
{
RGWMetaSyncStatusManager sync(store, store->svc()->rados->get_async_processor());
- int ret = sync.init();
+ int ret = sync.init(dpp());
if (ret < 0) {
status.push_back(string("failed to retrieve sync info: sync.init() failed: ") + cpp_strerror(-ret));
return;
}
rgw_meta_sync_status sync_status;
- ret = sync.read_sync_status(&sync_status);
+ ret = sync.read_sync_status(dpp(), &sync_status);
if (ret < 0) {
status.push_back(string("failed to read sync status: ") + cpp_strerror(-ret));
return;
map<int, RGWMetadataLogInfo> master_shards_info;
string master_period = store->svc()->zone->get_current_period_id();
- ret = sync.read_master_log_shards_info(master_period, &master_shards_info);
+ ret = sync.read_master_log_shards_info(dpp(), master_period, &master_shards_info);
if (ret < 0) {
status.push_back(string("failed to fetch master sync status: ") + cpp_strerror(-ret));
return;
push_ss(ss, status) << "behind shards: " << "[" << shards_behind_set << "]";
map<int, rgw_mdlog_shard_data> master_pos;
- ret = sync.read_master_log_shards_next(sync_status.sync_info.period, shards_behind, &master_pos);
+ ret = sync.read_master_log_shards_next(dpp(), sync_status.sync_info.period, shards_behind, &master_pos);
if (ret < 0) {
derr << "ERROR: failed to fetch master next positions (" << cpp_strerror(-ret) << ")" << dendl;
} else {
}
RGWDataSyncStatusManager sync(store, store->svc()->rados->get_async_processor(), source_zone, nullptr);
- int ret = sync.init();
+ int ret = sync.init(dpp());
if (ret < 0) {
push_ss(ss, status, tab) << string("failed to retrieve sync info: ") + cpp_strerror(-ret);
flush_ss(ss, status);
}
rgw_data_sync_status sync_status;
- ret = sync.read_sync_status(&sync_status);
+ ret = sync.read_sync_status(dpp(), &sync_status);
if (ret < 0 && ret != -ENOENT) {
push_ss(ss, status, tab) << string("failed read sync status: ") + cpp_strerror(-ret);
return;
}
set<int> recovering_shards;
- ret = sync.read_recovering_shards(sync_status.sync_info.num_shards, recovering_shards);
+ ret = sync.read_recovering_shards(dpp(), sync_status.sync_info.num_shards, recovering_shards);
if (ret < 0 && ret != ENOENT) {
push_ss(ss, status, tab) << string("failed read recovering shards: ") + cpp_strerror(-ret);
return;
map<int, RGWDataChangesLogInfo> source_shards_info;
- ret = sync.read_source_log_shards_info(&source_shards_info);
+ ret = sync.read_source_log_shards_info(dpp(), &source_shards_info);
if (ret < 0) {
push_ss(ss, status, tab) << string("failed to fetch source sync status: ") + cpp_strerror(-ret);
return;
push_ss(ss, status, tab) << "behind shards: " << "[" << shards_behind_set << "]" ;
map<int, rgw_datalog_shard_data> master_pos;
- ret = sync.read_source_log_shards_next(shards_behind, &master_pos);
+ ret = sync.read_source_log_shards_next(dpp(), shards_behind, &master_pos);
if (ret < 0) {
derr << "ERROR: failed to fetch next positions (" << cpp_strerror(-ret) << ")" << dendl;
} else {
return out << std::setw(h.w) << h.header << std::setw(1) << ' ';
}
-static int bucket_source_sync_status(rgw::sal::RGWRadosStore *store, const RGWZone& zone,
+static int bucket_source_sync_status(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *store, const RGWZone& zone,
const RGWZone& source, RGWRESTConn *conn,
const RGWBucketInfo& bucket_info,
rgw_sync_bucket_pipe pipe,
}
if (!pipe.source.bucket) {
- lderr(store->ctx()) << __func__ << "(): missing source bucket" << dendl;
+ ldpp_dout(dpp, -1) << __func__ << "(): missing source bucket" << dendl;
return -EINVAL;
}
rgw_bucket source_bucket;
int r = init_bucket(*pipe.source.bucket, source_bucket_info, source_bucket);
if (r < 0) {
- lderr(store->ctx()) << "failed to read source bucket info: " << cpp_strerror(r) << dendl;
+ ldpp_dout(dpp, -1) << "failed to read source bucket info: " << cpp_strerror(r) << dendl;
return r;
}
pipe.dest.bucket = bucket_info.bucket;
std::vector<rgw_bucket_shard_sync_info> status;
- r = rgw_bucket_sync_status(dpp(), store, pipe, bucket_info, &source_bucket_info, &status);
+ r = rgw_bucket_sync_status(dpp, store, pipe, bucket_info, &source_bucket_info, &status);
if (r < 0) {
- lderr(store->ctx()) << "failed to read bucket sync status: " << cpp_strerror(r) << dendl;
+ ldpp_dout(dpp, -1) << "failed to read bucket sync status: " << cpp_strerror(r) << dendl;
return r;
}
out << indented{width} << "incremental sync: " << num_inc << "/" << total_shards << " shards\n";
BucketIndexShardsManager remote_markers;
- r = rgw_read_remote_bilog_info(conn, source_bucket, remote_markers, null_yield);
+ r = rgw_read_remote_bilog_info(dpp, conn, source_bucket, remote_markers, null_yield);
if (r < 0) {
- lderr(store->ctx()) << "failed to read remote log: " << cpp_strerror(r) << dendl;
+ ldpp_dout(dpp, -1) << "failed to read remote log: " << cpp_strerror(r) << dendl;
return r;
}
rgw_bucket hint_bucket;
int ret = init_bucket(b, hint_bucket_info, hint_bucket);
if (ret < 0) {
- ldout(store->ctx(), 20) << "could not init bucket info for hint bucket=" << b << " ... skipping" << dendl;
+ ldpp_dout(dpp(), 20) << "could not init bucket info for hint bucket=" << b << " ... skipping" << dendl;
continue;
}
bucket_handler.reset(handler->alloc_child(*eff_bucket, nullopt));
}
- ret = bucket_handler->init(null_yield);
+ ret = bucket_handler->init(dpp(), null_yield);
if (ret < 0) {
cerr << "ERROR: failed to init bucket sync policy handler: " << cpp_strerror(-ret) << " (ret=" << ret << ")" << std::endl;
return ret;
auto& hint_bucket = *hint_entity.bucket;
RGWBucketSyncPolicyHandlerRef hint_bucket_handler;
- int r = store->ctl()->bucket->get_sync_policy_handler(zid, hint_bucket, &hint_bucket_handler, null_yield);
+ int r = store->ctl()->bucket->get_sync_policy_handler(zid, hint_bucket, &hint_bucket_handler, null_yield, dpp());
if (r < 0) {
- ldout(store->ctx(), 20) << "could not get bucket sync policy handler for hint bucket=" << hint_bucket << " ... skipping" << dendl;
+ ldpp_dout(dpp(), 20) << "could not get bucket sync policy handler for hint bucket=" << hint_bucket << " ... skipping" << dendl;
continue;
}
out << indented{width, "zone"} << zone.id << " (" << zone.name << ")\n";
out << indented{width, "bucket"} << info.bucket << "\n\n";
- if (!store->ctl()->bucket->bucket_imports_data(info.bucket, null_yield)) {
+ if (!store->ctl()->bucket->bucket_imports_data(info.bucket, null_yield, dpp())) {
out << "Sync is disabled for bucket " << info.bucket.name << '\n';
return 0;
}
RGWBucketSyncPolicyHandlerRef handler;
- int r = store->ctl()->bucket->get_sync_policy_handler(std::nullopt, info.bucket, &handler, null_yield);
+ int r = store->ctl()->bucket->get_sync_policy_handler(std::nullopt, info.bucket, &handler, null_yield, dpp());
if (r < 0) {
- lderr(store->ctx()) << "ERROR: failed to get policy handler for bucket (" << info.bucket << "): r=" << r << ": " << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp(), -1) << "ERROR: failed to get policy handler for bucket (" << info.bucket << "): r=" << r << ": " << cpp_strerror(-r) << dendl;
return r;
}
out << indented{width, "zone"} << zone.id << " (" << zone.name << ")\n";
out << indented{width, "bucket"} << info.bucket << "\n\n";
- if (!store->ctl()->bucket->bucket_imports_data(info.bucket, null_yield)) {
+ if (!store->ctl()->bucket->bucket_imports_data(info.bucket, null_yield, dpp())) {
out << "Sync is disabled for bucket " << info.bucket.name << " or bucket has no sync sources" << std::endl;
return 0;
}
RGWBucketSyncPolicyHandlerRef handler;
- int r = store->ctl()->bucket->get_sync_policy_handler(std::nullopt, info.bucket, &handler, null_yield);
+ int r = store->ctl()->bucket->get_sync_policy_handler(std::nullopt, info.bucket, &handler, null_yield, dpp());
if (r < 0) {
- lderr(store->ctx()) << "ERROR: failed to get policy handler for bucket (" << info.bucket << "): r=" << r << ": " << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp(), -1) << "ERROR: failed to get policy handler for bucket (" << info.bucket << "): r=" << r << ": " << cpp_strerror(-r) << dendl;
return r;
}
if (!source_zone_id.empty()) {
auto z = zonegroup.zones.find(source_zone_id);
if (z == zonegroup.zones.end()) {
- lderr(store->ctx()) << "Source zone not found in zonegroup "
+ ldpp_dout(dpp(), -1) << "Source zone not found in zonegroup "
<< zonegroup.get_name() << dendl;
return -EINVAL;
}
auto c = zone_conn_map.find(source_zone_id);
if (c == zone_conn_map.end()) {
- lderr(store->ctx()) << "No connection to zone " << z->second.name << dendl;
+ ldpp_dout(dpp(), -1) << "No connection to zone " << z->second.name << dendl;
return -EINVAL;
}
zone_ids.insert(source_zone_id);
continue;
}
if (pipe.source.zone.value_or(rgw_zone_id()) == z->second.id) {
- bucket_source_sync_status(store, zone, z->second,
+ bucket_source_sync_status(dpp(), store, zone, z->second,
c->second,
info, pipe,
width, out);
pins[1].c_str());
if (rc != OATH_INVALID_OTP) {
*pofs = time_ofs - step_size + step_size * totp.window / 2;
- ldout(cct, 20) << "found at time=" << start_time - time_ofs << " time_ofs=" << time_ofs << dendl;
+ ldpp_dout(dpp(), 20) << "found at time=" << start_time - time_ofs << " time_ofs=" << time_ofs << dendl;
return 0;
}
}
shard_id);
// call cls_log_trim() until it returns -ENODATA
for (;;) {
- int ret = store->svc()->cls->timelog.trim(oid, {}, {}, {}, marker, nullptr,
+ int ret = store->svc()->cls->timelog.trim(dpp(), oid, {}, {}, {}, marker, nullptr,
null_yield);
if (ret == -ENODATA) {
return 0;
bucket(_bucket) {}
int init() {
- int ret = zonegroup.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = zonegroup.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "failed to init zonegroup: " << cpp_strerror(-ret) << std::endl;
return ret;
int write_policy() {
if (!bucket) {
- int ret = zonegroup.update(null_yield);
+ int ret = zonegroup.update(dpp(), null_yield);
if (ret < 0) {
cerr << "failed to update zonegroup: " << cpp_strerror(-ret) << std::endl;
return -ret;
return 0;
}
- int ret = store->getRados()->put_bucket_instance_info(bucket_info, false, real_time(), &bucket_attrs);
+ int ret = store->getRados()->put_bucket_instance_info(bucket_info, false, real_time(), &bucket_attrs, dpp());
if (ret < 0) {
cerr << "failed to store bucket info: " << cpp_strerror(-ret) << std::endl;
return -ret;
bool need_cache = readonly_ops_list.find(opt_cmd) == readonly_ops_list.end();
if (raw_storage_op) {
- store = RGWStoreManager::get_raw_storage(g_ceph_context);
+ store = RGWStoreManager::get_raw_storage(dpp(), g_ceph_context);
} else {
- store = RGWStoreManager::get_storage(g_ceph_context, false, false, false, false, false,
+ store = RGWStoreManager::get_storage(dpp(), g_ceph_context, false, false, false, false, false,
need_cache && g_conf()->rgw_cache_enabled);
}
if (!store) {
return EINVAL;
}
RGWPeriod period(period_id);
- int ret = period.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = period.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "period.init failed: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
- ret = period.delete_obj(null_yield);
+ ret = period.delete_obj(dpp(), null_yield);
if (ret < 0) {
cerr << "ERROR: couldn't delete period: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
if (staging) {
RGWRealm realm(realm_id, realm_name);
- int ret = realm.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = realm.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0 ) {
cerr << "Error initializing realm " << cpp_strerror(-ret) << std::endl;
return -ret;
epoch = 1;
}
RGWPeriod period(period_id, epoch);
- int ret = period.init(g_ceph_context, store->svc()->sysobj, realm_id,
+ int ret = period.init(dpp(), g_ceph_context, store->svc()->sysobj, realm_id,
null_yield, realm_name);
if (ret < 0) {
cerr << "period init failed: " << cpp_strerror(-ret) << std::endl;
case OPT::PERIOD_LIST:
{
list<string> periods;
- int ret = store->svc()->zone->list_periods(periods);
+ int ret = store->svc()->zone->list_periods(dpp(), periods);
if (ret < 0) {
cerr << "failed to list periods: " << cpp_strerror(-ret) << std::endl;
return -ret;
if (url.empty()) {
// load current period for endpoints
RGWRealm realm(realm_id, realm_name);
- int ret = realm.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = realm.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "failed to init realm: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
RGWPeriod current_period(realm.get_current_period());
- ret = current_period.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ ret = current_period.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "failed to init current period: " << cpp_strerror(-ret) << std::endl;
return -ret;
RGWRealm realm(g_ceph_context, store->svc()->sysobj);
if (!realm_name.empty()) {
// look up realm_id for the given realm_name
- int ret = realm.read_id(realm_name, realm_id, null_yield);
+ int ret = realm.read_id(dpp(), realm_name, realm_id, null_yield);
if (ret < 0) {
cerr << "ERROR: failed to read realm for " << realm_name
<< ": " << cpp_strerror(-ret) << std::endl;
}
} else {
// use default realm_id when none is given
- int ret = realm.read_default_id(realm_id, null_yield);
+ int ret = realm.read_default_id(dpp(), realm_id, null_yield);
if (ret < 0 && ret != -ENOENT) { // on ENOENT, use empty realm_id
cerr << "ERROR: failed to read default realm: "
<< cpp_strerror(-ret) << std::endl;
}
RGWPeriodConfig period_config;
- int ret = period_config.read(store->svc()->sysobj, realm_id, null_yield);
+ int ret = period_config.read(dpp(), store->svc()->sysobj, realm_id, null_yield);
if (ret < 0 && ret != -ENOENT) {
cerr << "ERROR: failed to read period config: "
<< cpp_strerror(-ret) << std::endl;
if (opt_cmd != OPT::GLOBAL_QUOTA_GET) {
// write the modified period config
- ret = period_config.write(store->svc()->sysobj, realm_id, null_yield);
+ ret = period_config.write(dpp(), store->svc()->sysobj, realm_id, null_yield);
if (ret < 0) {
cerr << "ERROR: failed to write period config: "
<< cpp_strerror(-ret) << std::endl;
}
RGWRealm realm(realm_name, g_ceph_context, store->svc()->sysobj);
- int ret = realm.create(null_yield);
+ int ret = realm.create(dpp(), null_yield);
if (ret < 0) {
cerr << "ERROR: couldn't create realm " << realm_name << ": " << cpp_strerror(-ret) << std::endl;
return -ret;
}
if (set_default) {
- ret = realm.set_as_default(null_yield);
+ ret = realm.set_as_default(dpp(), null_yield);
if (ret < 0) {
cerr << "failed to set realm " << realm_name << " as default: " << cpp_strerror(-ret) << std::endl;
}
cerr << "missing realm name or id" << std::endl;
return EINVAL;
}
- int ret = realm.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = realm.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "realm.init failed: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
- ret = realm.delete_obj(null_yield);
+ ret = realm.delete_obj(dpp(), null_yield);
if (ret < 0) {
cerr << "ERROR: couldn't : " << cpp_strerror(-ret) << std::endl;
return -ret;
case OPT::REALM_GET:
{
RGWRealm realm(realm_id, realm_name);
- int ret = realm.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = realm.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
if (ret == -ENOENT && realm_name.empty() && realm_id.empty()) {
cerr << "missing realm name or id, or default realm not found" << std::endl;
{
RGWRealm realm(g_ceph_context, store->svc()->sysobj);
string default_id;
- int ret = realm.read_default_id(default_id, null_yield);
+ int ret = realm.read_default_id(dpp(), default_id, null_yield);
if (ret == -ENOENT) {
cout << "No default realm is set" << std::endl;
return -ret;
{
RGWRealm realm(g_ceph_context, store->svc()->sysobj);
string default_id;
- int ret = realm.read_default_id(default_id, null_yield);
+ int ret = realm.read_default_id(dpp(), default_id, null_yield);
if (ret < 0 && ret != -ENOENT) {
cerr << "could not determine default realm: " << cpp_strerror(-ret) << std::endl;
}
list<string> realms;
- ret = store->svc()->zone->list_realms(realms);
+ ret = store->svc()->zone->list_realms(dpp(), realms);
if (ret < 0) {
cerr << "failed to list realms: " << cpp_strerror(-ret) << std::endl;
return -ret;
return -ret;
}
list<string> periods;
- ret = store->svc()->zone->list_periods(period_id, periods, null_yield);
+ ret = store->svc()->zone->list_periods(dpp(), period_id, periods, null_yield);
if (ret < 0) {
cerr << "list periods failed: " << cpp_strerror(-ret) << std::endl;
return -ret;
cerr << "missing realm name or id" << std::endl;
return EINVAL;
}
- int ret = realm.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = realm.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "realm.init failed: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
- ret = realm.rename(realm_new_name, null_yield);
+ ret = realm.rename(dpp(), realm_new_name, null_yield);
if (ret < 0) {
cerr << "realm.rename failed: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
RGWRealm realm(realm_id, realm_name);
bool new_realm = false;
- int ret = realm.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = realm.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0 && ret != -ENOENT) {
cerr << "failed to init realm: " << cpp_strerror(-ret) << std::endl;
return -ret;
if (new_realm) {
cout << "clearing period and epoch for new realm" << std::endl;
realm.clear_current_period_and_epoch();
- ret = realm.create(null_yield);
+ ret = realm.create(dpp(), null_yield);
if (ret < 0) {
cerr << "ERROR: couldn't create new realm: " << cpp_strerror(-ret) << std::endl;
return 1;
}
} else {
- ret = realm.update(null_yield);
+ ret = realm.update(dpp(), null_yield);
if (ret < 0) {
cerr << "ERROR: couldn't store realm info: " << cpp_strerror(-ret) << std::endl;
return 1;
}
if (set_default) {
- ret = realm.set_as_default(null_yield);
+ ret = realm.set_as_default(dpp(), null_yield);
if (ret < 0) {
cerr << "failed to set realm " << realm_name << " as default: " << cpp_strerror(-ret) << std::endl;
}
case OPT::REALM_DEFAULT:
{
RGWRealm realm(realm_id, realm_name);
- int ret = realm.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = realm.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "failed to init realm: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
- ret = realm.set_as_default(null_yield);
+ ret = realm.set_as_default(dpp(), null_yield);
if (ret < 0) {
cerr << "failed to set realm as default: " << cpp_strerror(-ret) << std::endl;
return -ret;
return -ret;
}
RGWRealm realm;
- realm.init(g_ceph_context, store->svc()->sysobj, null_yield, false);
+ realm.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield, false);
try {
decode_json_obj(realm, &p);
} catch (const JSONDecoder::err& e) {
return -ret;
}
}
- ret = realm.create(null_yield, false);
+ ret = realm.create(dpp(), null_yield, false);
if (ret < 0 && ret != -EEXIST) {
cerr << "Error storing realm " << realm.get_id() << ": "
<< cpp_strerror(ret) << std::endl;
return -ret;
} else if (ret ==-EEXIST) {
- ret = realm.update(null_yield);
+ ret = realm.update(dpp(), null_yield);
if (ret < 0) {
cerr << "Error storing realm " << realm.get_id() << ": "
<< cpp_strerror(ret) << std::endl;
}
if (set_default) {
- ret = realm.set_as_default(null_yield);
+ ret = realm.set_as_default(dpp(), null_yield);
if (ret < 0) {
cerr << "failed to set realm " << realm_name << " as default: " << cpp_strerror(-ret) << std::endl;
}
}
RGWZoneGroup zonegroup(zonegroup_id,zonegroup_name);
- int ret = zonegroup.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = zonegroup.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "failed to initialize zonegroup " << zonegroup_name << " id " << zonegroup_id << " :"
<< cpp_strerror(-ret) << std::endl;
return -ret;
}
RGWZoneParams zone(zone_id, zone_name);
- ret = zone.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ ret = zone.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "unable to initialize zone: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
if (zone.realm_id != zonegroup.realm_id) {
zone.realm_id = zonegroup.realm_id;
- ret = zone.update(null_yield);
+ ret = zone.update(dpp(), null_yield);
if (ret < 0) {
cerr << "failed to save zone info: " << cpp_strerror(-ret) << std::endl;
return -ret;
bool *psync_from_all = (sync_from_all_specified ? &sync_from_all : nullptr);
string *predirect_zone = (redirect_zone_set ? &redirect_zone : nullptr);
- ret = zonegroup.add_zone(zone,
+ ret = zonegroup.add_zone(dpp(), zone,
(is_master_set ? &is_master : NULL),
(is_read_only_set ? &read_only : NULL),
endpoints, ptier_type,
return EINVAL;
}
RGWRealm realm(realm_id, realm_name);
- int ret = realm.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = realm.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "failed to init realm: " << cpp_strerror(-ret) << std::endl;
return -ret;
RGWZoneGroup zonegroup(zonegroup_name, is_master, g_ceph_context, store->svc()->sysobj, realm.get_id(), endpoints);
zonegroup.api_name = (api_name.empty() ? zonegroup_name : api_name);
- ret = zonegroup.create(null_yield);
+ ret = zonegroup.create(dpp(), null_yield);
if (ret < 0) {
cerr << "failed to create zonegroup " << zonegroup_name << ": " << cpp_strerror(-ret) << std::endl;
return -ret;
}
if (set_default) {
- ret = zonegroup.set_as_default(null_yield);
+ ret = zonegroup.set_as_default(dpp(), null_yield);
if (ret < 0) {
cerr << "failed to set zonegroup " << zonegroup_name << " as default: " << cpp_strerror(-ret) << std::endl;
}
}
RGWZoneGroup zonegroup(zonegroup_id, zonegroup_name);
- int ret = zonegroup.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = zonegroup.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "failed to init zonegroup: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
- ret = zonegroup.set_as_default(null_yield);
+ ret = zonegroup.set_as_default(dpp(), null_yield);
if (ret < 0) {
cerr << "failed to set zonegroup as default: " << cpp_strerror(-ret) << std::endl;
return -ret;
return EINVAL;
}
RGWZoneGroup zonegroup(zonegroup_id, zonegroup_name);
- int ret = zonegroup.init(g_ceph_context, store->svc()->sysobj,
+ int ret = zonegroup.init(dpp(), g_ceph_context, store->svc()->sysobj,
null_yield);
if (ret < 0) {
cerr << "failed to init zonegroup: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
- ret = zonegroup.delete_obj(null_yield);
+ ret = zonegroup.delete_obj(dpp(), null_yield);
if (ret < 0) {
cerr << "ERROR: couldn't delete zonegroup: " << cpp_strerror(-ret) << std::endl;
return -ret;
case OPT::ZONEGROUP_GET:
{
RGWZoneGroup zonegroup(zonegroup_id, zonegroup_name);
- int ret = zonegroup.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = zonegroup.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "failed to init zonegroup: " << cpp_strerror(-ret) << std::endl;
return -ret;
case OPT::ZONEGROUP_LIST:
{
RGWZoneGroup zonegroup;
- int ret = zonegroup.init(g_ceph_context, store->svc()->sysobj,
+ int ret = zonegroup.init(dpp(), g_ceph_context, store->svc()->sysobj,
null_yield, false);
if (ret < 0) {
cerr << "failed to init zonegroup: " << cpp_strerror(-ret) << std::endl;
}
list<string> zonegroups;
- ret = store->svc()->zone->list_zonegroups(zonegroups);
+ ret = store->svc()->zone->list_zonegroups(dpp(), zonegroups);
if (ret < 0) {
cerr << "failed to list zonegroups: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
string default_zonegroup;
- ret = zonegroup.read_default_id(default_zonegroup, null_yield);
+ ret = zonegroup.read_default_id(dpp(), default_zonegroup, null_yield);
if (ret < 0 && ret != -ENOENT) {
cerr << "could not determine default zonegroup: " << cpp_strerror(-ret) << std::endl;
}
case OPT::ZONEGROUP_MODIFY:
{
RGWZoneGroup zonegroup(zonegroup_id, zonegroup_name);
- int ret = zonegroup.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = zonegroup.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "failed to init zonegroup: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
if (is_master_set) {
- zonegroup.update_master(is_master, null_yield);
+ zonegroup.update_master(dpp(), is_master, null_yield);
need_update = true;
}
} else if (!realm_name.empty()) {
// get realm id from name
RGWRealm realm{g_ceph_context, store->svc()->sysobj};
- ret = realm.read_id(realm_name, zonegroup.realm_id, null_yield);
+ ret = realm.read_id(dpp(), realm_name, zonegroup.realm_id, null_yield);
if (ret < 0) {
cerr << "failed to find realm by name " << realm_name << std::endl;
return -ret;
}
if (need_update) {
- ret = zonegroup.update(null_yield);
+ ret = zonegroup.update(dpp(), null_yield);
if (ret < 0) {
cerr << "failed to update zonegroup: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
if (set_default) {
- ret = zonegroup.set_as_default(null_yield);
+ ret = zonegroup.set_as_default(dpp(), null_yield);
if (ret < 0) {
cerr << "failed to set zonegroup " << zonegroup_name << " as default: " << cpp_strerror(-ret) << std::endl;
}
case OPT::ZONEGROUP_SET:
{
RGWRealm realm(realm_id, realm_name);
- int ret = realm.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = realm.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
bool default_realm_not_exist = (ret == -ENOENT && realm_id.empty() && realm_name.empty());
if (ret < 0 && !default_realm_not_exist ) {
}
RGWZoneGroup zonegroup;
- ret = zonegroup.init(g_ceph_context, store->svc()->sysobj,
+ ret = zonegroup.init(dpp(), g_ceph_context, store->svc()->sysobj,
null_yield, false);
if (ret < 0) {
cerr << "failed to init zonegroup: " << cpp_strerror(-ret) << std::endl;
if (zonegroup.realm_id.empty() && !default_realm_not_exist) {
zonegroup.realm_id = realm.get_id();
}
- ret = zonegroup.create(null_yield);
+ ret = zonegroup.create(dpp(), null_yield);
if (ret < 0 && ret != -EEXIST) {
cerr << "ERROR: couldn't create zonegroup info: " << cpp_strerror(-ret) << std::endl;
return 1;
} else if (ret == -EEXIST) {
- ret = zonegroup.update(null_yield);
+ ret = zonegroup.update(dpp(), null_yield);
if (ret < 0) {
cerr << "ERROR: couldn't store zonegroup info: " << cpp_strerror(-ret) << std::endl;
return 1;
}
if (set_default) {
- ret = zonegroup.set_as_default(null_yield);
+ ret = zonegroup.set_as_default(dpp(), null_yield);
if (ret < 0) {
cerr << "failed to set zonegroup " << zonegroup_name << " as default: " << cpp_strerror(-ret) << std::endl;
}
case OPT::ZONEGROUP_REMOVE:
{
RGWZoneGroup zonegroup(zonegroup_id, zonegroup_name);
- int ret = zonegroup.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = zonegroup.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "failed to init zonegroup: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
}
- ret = zonegroup.remove_zone(zone_id, null_yield);
+ ret = zonegroup.remove_zone(dpp(), zone_id, null_yield);
if (ret < 0) {
cerr << "failed to remove zone: " << cpp_strerror(-ret) << std::endl;
return -ret;
return EINVAL;
}
RGWZoneGroup zonegroup(zonegroup_id, zonegroup_name);
- int ret = zonegroup.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = zonegroup.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "failed to init zonegroup: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
- ret = zonegroup.rename(zonegroup_new_name, null_yield);
+ ret = zonegroup.rename(dpp(), zonegroup_new_name, null_yield);
if (ret < 0) {
cerr << "failed to rename zonegroup: " << cpp_strerror(-ret) << std::endl;
return -ret;
case OPT::ZONEGROUP_PLACEMENT_LIST:
{
RGWZoneGroup zonegroup(zonegroup_id, zonegroup_name);
- int ret = zonegroup.init(g_ceph_context, store->svc()->sysobj,
+ int ret = zonegroup.init(dpp(), g_ceph_context, store->svc()->sysobj,
null_yield);
if (ret < 0) {
cerr << "failed to init zonegroup: " << cpp_strerror(-ret) << std::endl;
}
RGWZoneGroup zonegroup(zonegroup_id, zonegroup_name);
- int ret = zonegroup.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = zonegroup.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "failed to init zonegroup: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
RGWZoneGroup zonegroup(zonegroup_id, zonegroup_name);
- int ret = zonegroup.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = zonegroup.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "failed to init zonegroup: " << cpp_strerror(-ret) << std::endl;
return -ret;
zonegroup.default_placement = rule;
}
- zonegroup.post_process_params(null_yield);
- ret = zonegroup.update(null_yield);
+ zonegroup.post_process_params(dpp(), null_yield);
+ ret = zonegroup.update(dpp(), null_yield);
if (ret < 0) {
cerr << "failed to update zonegroup: " << cpp_strerror(-ret) << std::endl;
return -ret;
RGWZoneGroup zonegroup(zonegroup_id, zonegroup_name);
/* if the user didn't provide zonegroup info , create stand alone zone */
if (!zonegroup_id.empty() || !zonegroup_name.empty()) {
- ret = zonegroup.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ ret = zonegroup.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "unable to initialize zonegroup " << zonegroup_name << ": " << cpp_strerror(-ret) << std::endl;
return -ret;
}
RGWZoneParams zone(zone_id, zone_name);
- ret = zone.init(g_ceph_context, store->svc()->sysobj, null_yield, false);
+ ret = zone.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield, false);
if (ret < 0) {
cerr << "unable to initialize zone: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
}
- ret = zone.create(null_yield);
+ ret = zone.create(dpp(), null_yield);
if (ret < 0) {
cerr << "failed to create zone " << zone_name << ": " << cpp_strerror(-ret) << std::endl;
return -ret;
string *ptier_type = (tier_type_specified ? &tier_type : nullptr);
bool *psync_from_all = (sync_from_all_specified ? &sync_from_all : nullptr);
string *predirect_zone = (redirect_zone_set ? &redirect_zone : nullptr);
- ret = zonegroup.add_zone(zone,
+ ret = zonegroup.add_zone(dpp(), zone,
(is_master_set ? &is_master : NULL),
(is_read_only_set ? &read_only : NULL),
endpoints,
}
if (set_default) {
- ret = zone.set_as_default(null_yield);
+ ret = zone.set_as_default(dpp(), null_yield);
if (ret < 0) {
cerr << "failed to set zone " << zone_name << " as default: " << cpp_strerror(-ret) << std::endl;
}
case OPT::ZONE_DEFAULT:
{
RGWZoneGroup zonegroup(zonegroup_id,zonegroup_name);
- int ret = zonegroup.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = zonegroup.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "WARNING: failed to initialize zonegroup " << zonegroup_name << std::endl;
}
return EINVAL;
}
RGWZoneParams zone(zone_id, zone_name);
- ret = zone.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ ret = zone.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "unable to initialize zone: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
- ret = zone.set_as_default(null_yield);
+ ret = zone.set_as_default(dpp(), null_yield);
if (ret < 0) {
cerr << "failed to set zone as default: " << cpp_strerror(-ret) << std::endl;
return -ret;
return EINVAL;
}
RGWZoneParams zone(zone_id, zone_name);
- int ret = zone.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = zone.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "unable to initialize zone: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
list<string> zonegroups;
- ret = store->svc()->zone->list_zonegroups(zonegroups);
+ ret = store->svc()->zone->list_zonegroups(dpp(), zonegroups);
if (ret < 0) {
cerr << "failed to list zonegroups: " << cpp_strerror(-ret) << std::endl;
return -ret;
for (list<string>::iterator iter = zonegroups.begin(); iter != zonegroups.end(); ++iter) {
RGWZoneGroup zonegroup(string(), *iter);
- int ret = zonegroup.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = zonegroup.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "WARNING: failed to initialize zonegroup " << zonegroup_name << std::endl;
continue;
}
- ret = zonegroup.remove_zone(zone.get_id(), null_yield);
+ ret = zonegroup.remove_zone(dpp(), zone.get_id(), null_yield);
if (ret < 0 && ret != -ENOENT) {
cerr << "failed to remove zone " << zone_name << " from zonegroup " << zonegroup.get_name() << ": "
<< cpp_strerror(-ret) << std::endl;
}
}
- ret = zone.delete_obj(null_yield);
+ ret = zone.delete_obj(dpp(), null_yield);
if (ret < 0) {
cerr << "failed to delete zone " << zone_name << ": " << cpp_strerror(-ret) << std::endl;
return -ret;
case OPT::ZONE_GET:
{
RGWZoneParams zone(zone_id, zone_name);
- int ret = zone.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = zone.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "unable to initialize zone: " << cpp_strerror(-ret) << std::endl;
return -ret;
case OPT::ZONE_SET:
{
RGWZoneParams zone(zone_name);
- int ret = zone.init(g_ceph_context, store->svc()->sysobj, null_yield,
+ int ret = zone.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield,
false);
if (ret < 0) {
return -ret;
}
- ret = zone.read(null_yield);
+ ret = zone.read(dpp(), null_yield);
if (ret < 0 && ret != -ENOENT) {
cerr << "zone.read() returned ret=" << ret << std::endl;
return -ret;
if(zone.realm_id.empty()) {
RGWRealm realm(realm_id, realm_name);
- int ret = realm.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = realm.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0 && ret != -ENOENT) {
cerr << "failed to init realm: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
cerr << "zone id " << zone.get_id();
- ret = zone.fix_pool_names(null_yield);
+ ret = zone.fix_pool_names(dpp(), null_yield);
if (ret < 0) {
cerr << "ERROR: couldn't fix zone: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
- ret = zone.write(false, null_yield);
+ ret = zone.write(dpp(), false, null_yield);
if (ret < 0) {
cerr << "ERROR: couldn't create zone: " << cpp_strerror(-ret) << std::endl;
return 1;
}
if (set_default) {
- ret = zone.set_as_default(null_yield);
+ ret = zone.set_as_default(dpp(), null_yield);
if (ret < 0) {
cerr << "failed to set zone " << zone_name << " as default: " << cpp_strerror(-ret) << std::endl;
}
case OPT::ZONE_LIST:
{
list<string> zones;
- int ret = store->svc()->zone->list_zones(zones);
+ int ret = store->svc()->zone->list_zones(dpp(), zones);
if (ret < 0) {
cerr << "failed to list zones: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
RGWZoneParams zone;
- ret = zone.init(g_ceph_context, store->svc()->sysobj, null_yield, false);
+ ret = zone.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield, false);
if (ret < 0) {
cerr << "failed to init zone: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
string default_zone;
- ret = zone.read_default_id(default_zone, null_yield);
+ ret = zone.read_default_id(dpp(), default_zone, null_yield);
if (ret < 0 && ret != -ENOENT) {
cerr << "could not determine default zone: " << cpp_strerror(-ret) << std::endl;
}
case OPT::ZONE_MODIFY:
{
RGWZoneParams zone(zone_id, zone_name);
- int ret = zone.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = zone.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "failed to init zone: " << cpp_strerror(-ret) << std::endl;
return -ret;
} else if (!realm_name.empty()) {
// get realm id from name
RGWRealm realm{g_ceph_context, store->svc()->sysobj};
- ret = realm.read_id(realm_name, zone.realm_id, null_yield);
+ ret = realm.read_id(dpp(), realm_name, zone.realm_id, null_yield);
if (ret < 0) {
cerr << "failed to find realm by name " << realm_name << std::endl;
return -ret;
}
if (need_zone_update) {
- ret = zone.update(null_yield);
+ ret = zone.update(dpp(), null_yield);
if (ret < 0) {
cerr << "failed to save zone info: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
RGWZoneGroup zonegroup(zonegroup_id, zonegroup_name);
- ret = zonegroup.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ ret = zonegroup.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "failed to init zonegroup: " << cpp_strerror(-ret) << std::endl;
return -ret;
bool *psync_from_all = (sync_from_all_specified ? &sync_from_all : nullptr);
string *predirect_zone = (redirect_zone_set ? &redirect_zone : nullptr);
- ret = zonegroup.add_zone(zone,
+ ret = zonegroup.add_zone(dpp(), zone,
(is_master_set ? &is_master : NULL),
(is_read_only_set ? &read_only : NULL),
endpoints, ptier_type,
return -ret;
}
- ret = zonegroup.update(null_yield);
+ ret = zonegroup.update(dpp(), null_yield);
if (ret < 0) {
cerr << "failed to update zonegroup: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
if (set_default) {
- ret = zone.set_as_default(null_yield);
+ ret = zone.set_as_default(dpp(), null_yield);
if (ret < 0) {
cerr << "failed to set zone " << zone_name << " as default: " << cpp_strerror(-ret) << std::endl;
}
return EINVAL;
}
RGWZoneParams zone(zone_id,zone_name);
- int ret = zone.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = zone.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "unable to initialize zone: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
- ret = zone.rename(zone_new_name, null_yield);
+ ret = zone.rename(dpp(), zone_new_name, null_yield);
if (ret < 0) {
cerr << "failed to rename zone " << zone_name << " to " << zone_new_name << ": " << cpp_strerror(-ret)
<< std::endl;
return -ret;
}
RGWZoneGroup zonegroup(zonegroup_id, zonegroup_name);
- ret = zonegroup.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ ret = zonegroup.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "WARNING: failed to initialize zonegroup " << zonegroup_name << std::endl;
} else {
- ret = zonegroup.rename_zone(zone, null_yield);
+ ret = zonegroup.rename_zone(dpp(), zone, null_yield);
if (ret < 0) {
cerr << "Error in zonegroup rename for " << zone_name << ": " << cpp_strerror(-ret) << std::endl;
return -ret;
}
RGWZoneParams zone(zone_id, zone_name);
- int ret = zone.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = zone.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "failed to init zone: " << cpp_strerror(-ret) << std::endl;
return -ret;
if (opt_cmd == OPT::ZONE_PLACEMENT_ADD ||
opt_cmd == OPT::ZONE_PLACEMENT_MODIFY) {
RGWZoneGroup zonegroup(zonegroup_id, zonegroup_name);
- ret = zonegroup.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ ret = zonegroup.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "failed to init zonegroup: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
}
- ret = zone.update(null_yield);
+ ret = zone.update(dpp(), null_yield);
if (ret < 0) {
cerr << "failed to save zone info: " << cpp_strerror(-ret) << std::endl;
return -ret;
case OPT::ZONE_PLACEMENT_LIST:
{
RGWZoneParams zone(zone_id, zone_name);
- int ret = zone.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = zone.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "unable to initialize zone: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
RGWZoneParams zone(zone_id, zone_name);
- int ret = zone.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = zone.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "unable to initialize zone: " << cpp_strerror(-ret) << std::endl;
return -ret;
RGWUser user;
int ret = 0;
if (!(user_id.empty() && access_key.empty()) || !subuser.empty()) {
- ret = user.init(store, user_op, null_yield);
+ ret = user.init(dpp(), store, user_op, null_yield);
if (ret < 0) {
cerr << "user.init failed: " << cpp_strerror(-ret) << std::endl;
return -ret;
if (!user_op.has_existing_user()) {
user_op.set_generate_key(); // generate a new key by default
}
- ret = user.add(user_op, null_yield, &err_msg);
+ ret = user.add(dpp(), user_op, null_yield, &err_msg);
if (ret < 0) {
cerr << "could not create user: " << err_msg << std::endl;
if (ret == -ERR_INVALID_TENANT_NAME)
return -ret;
}
if (!subuser.empty()) {
- ret = user.subusers.add(user_op, null_yield, &err_msg);
+ ret = user.subusers.add(dpp(), user_op, null_yield, &err_msg);
if (ret < 0) {
cerr << "could not create subuser: " << err_msg << std::endl;
return -ret;
}
break;
case OPT::USER_RM:
- ret = user.remove(user_op, null_yield, &err_msg);
+ ret = user.remove(dpp(), user_op, null_yield, &err_msg);
if (ret < 0) {
cerr << "could not remove user: " << err_msg << std::endl;
return -ret;
if (yes_i_really_mean_it) {
user_op.set_overwrite_new_user(true);
}
- ret = user.rename(user_op, null_yield, &err_msg);
+ ret = user.rename(user_op, null_yield, dpp(), &err_msg);
if (ret < 0) {
if (ret == -EEXIST) {
err_msg += ". to overwrite this user, add --yes-i-really-mean-it";
case OPT::USER_ENABLE:
case OPT::USER_SUSPEND:
case OPT::USER_MODIFY:
- ret = user.modify(user_op, null_yield, &err_msg);
+ ret = user.modify(dpp(), user_op, null_yield, &err_msg);
if (ret < 0) {
cerr << "could not modify user: " << err_msg << std::endl;
return -ret;
break;
case OPT::SUBUSER_CREATE:
- ret = user.subusers.add(user_op, null_yield, &err_msg);
+ ret = user.subusers.add(dpp(), user_op, null_yield, &err_msg);
if (ret < 0) {
cerr << "could not create subuser: " << err_msg << std::endl;
return -ret;
break;
case OPT::SUBUSER_MODIFY:
- ret = user.subusers.modify(user_op, null_yield, &err_msg);
+ ret = user.subusers.modify(dpp(), user_op, null_yield, &err_msg);
if (ret < 0) {
cerr << "could not modify subuser: " << err_msg << std::endl;
return -ret;
break;
case OPT::SUBUSER_RM:
- ret = user.subusers.remove(user_op, null_yield, &err_msg);
+ ret = user.subusers.remove(dpp(), user_op, null_yield, &err_msg);
if (ret < 0) {
cerr << "could not remove subuser: " << err_msg << std::endl;
return -ret;
break;
case OPT::CAPS_ADD:
- ret = user.caps.add(user_op, null_yield, &err_msg);
+ ret = user.caps.add(dpp(), user_op, null_yield, &err_msg);
if (ret < 0) {
cerr << "could not add caps: " << err_msg << std::endl;
return -ret;
break;
case OPT::CAPS_RM:
- ret = user.caps.remove(user_op, null_yield, &err_msg);
+ ret = user.caps.remove(dpp(), user_op, null_yield, &err_msg);
if (ret < 0) {
cerr << "could not remove caps: " << err_msg << std::endl;
return -ret;
break;
case OPT::KEY_CREATE:
- ret = user.keys.add(user_op, null_yield, &err_msg);
+ ret = user.keys.add(dpp(), user_op, null_yield, &err_msg);
if (ret < 0) {
cerr << "could not create key: " << err_msg << std::endl;
return -ret;
break;
case OPT::KEY_RM:
- ret = user.keys.remove(user_op, null_yield, &err_msg);
+ ret = user.keys.remove(dpp(), user_op, null_yield, &err_msg);
if (ret < 0) {
cerr << "could not remove key: " << err_msg << std::endl;
return -ret;
// load the period
RGWPeriod period(period_id);
- int ret = period.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = period.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "period init failed: " << cpp_strerror(-ret) << std::endl;
return -ret;
{
// read realm and staging period
RGWRealm realm(realm_id, realm_name);
- int ret = realm.init(g_ceph_context, store->svc()->sysobj, null_yield);
+ int ret = realm.init(dpp(), g_ceph_context, store->svc()->sysobj, null_yield);
if (ret < 0) {
cerr << "Error initializing realm: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
RGWPeriod period(RGWPeriod::get_staging_id(realm.get_id()), 1);
- ret = period.init(g_ceph_context, store->svc()->sysobj, realm.get_id(), null_yield);
+ ret = period.init(dpp(), g_ceph_context, store->svc()->sysobj, realm.get_id(), null_yield);
if (ret < 0) {
cerr << "period init failed: " << cpp_strerror(-ret) << std::endl;
return -ret;
return -EINVAL;
}
RGWRole role(g_ceph_context, store->getRados()->pctl, role_name, path, assume_role_doc, tenant);
- ret = role.create(true, null_yield);
+ ret = role.create(dpp(), true, null_yield);
if (ret < 0) {
return -ret;
}
return -EINVAL;
}
RGWRole role(g_ceph_context, store->getRados()->pctl, role_name, tenant);
- ret = role.delete_obj(null_yield);
+ ret = role.delete_obj(dpp(), null_yield);
if (ret < 0) {
return -ret;
}
return -EINVAL;
}
RGWRole role(g_ceph_context, store->getRados()->pctl, role_name, tenant);
- ret = role.get(null_yield);
+ ret = role.get(dpp(), null_yield);
if (ret < 0) {
return -ret;
}
}
RGWRole role(g_ceph_context, store->getRados()->pctl, role_name, tenant);
- ret = role.get(null_yield);
+ ret = role.get(dpp(), null_yield);
if (ret < 0) {
return -ret;
}
role.update_trust_policy(assume_role_doc);
- ret = role.update(null_yield);
+ ret = role.update(dpp(), null_yield);
if (ret < 0) {
return -ret;
}
case OPT::ROLE_LIST:
{
vector<RGWRole> result;
- ret = RGWRole::get_roles_by_path_prefix(store->getRados(), g_ceph_context, path_prefix, tenant, result, null_yield);
+ ret = RGWRole::get_roles_by_path_prefix(dpp(), store->getRados(), g_ceph_context, path_prefix, tenant, result, null_yield);
if (ret < 0) {
return -ret;
}
}
RGWRole role(g_ceph_context, store->getRados()->pctl, role_name, tenant);
- ret = role.get(null_yield);
+ ret = role.get(dpp(), null_yield);
if (ret < 0) {
return -ret;
}
role.set_perm_policy(policy_name, perm_policy_doc);
- ret = role.update(null_yield);
+ ret = role.update(dpp(), null_yield);
if (ret < 0) {
return -ret;
}
return -EINVAL;
}
RGWRole role(g_ceph_context, store->getRados()->pctl, role_name, tenant);
- ret = role.get(null_yield);
+ ret = role.get(dpp(), null_yield);
if (ret < 0) {
return -ret;
}
return -EINVAL;
}
RGWRole role(g_ceph_context, store->getRados()->pctl, role_name, tenant);
- int ret = role.get(null_yield);
+ int ret = role.get(dpp(), null_yield);
if (ret < 0) {
return -ret;
}
return -EINVAL;
}
RGWRole role(g_ceph_context, store->getRados()->pctl, role_name, tenant);
- ret = role.get(null_yield);
+ ret = role.get(dpp(), null_yield);
if (ret < 0) {
return -ret;
}
if (ret < 0) {
return -ret;
}
- ret = role.update(null_yield);
+ ret = role.update(dpp(), null_yield);
if (ret < 0) {
return -ret;
}
if (opt_cmd == OPT::POLICY) {
if (format == "xml") {
- int ret = RGWBucketAdminOp::dump_s3_policy(store, bucket_op, cout);
+ int ret = RGWBucketAdminOp::dump_s3_policy(store, bucket_op, cout, dpp());
if (ret < 0) {
cerr << "ERROR: failed to get policy: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
} else {
- int ret = RGWBucketAdminOp::get_policy(store, bucket_op, f);
+ int ret = RGWBucketAdminOp::get_policy(store, bucket_op, f, dpp());
if (ret < 0) {
cerr << "ERROR: failed to get policy: " << cpp_strerror(-ret) << std::endl;
return -ret;
user_ids.push_back(user_id.id);
ret =
RGWBucketAdminOp::limit_check(store, bucket_op, user_ids, f,
- null_yield, warnings_only);
+ null_yield, dpp(), warnings_only);
} else {
/* list users in groups of max-keys, then perform user-bucket
* limit-check on each group */
- ret = store->ctl()->meta.mgr->list_keys_init(metadata_key, &handle);
+ ret = store->ctl()->meta.mgr->list_keys_init(dpp(), metadata_key, &handle);
if (ret < 0) {
cerr << "ERROR: buckets limit check can't get user metadata_key: "
<< cpp_strerror(-ret) << std::endl;
/* ok, do the limit checks for this group */
ret =
RGWBucketAdminOp::limit_check(store, bucket_op, user_ids, f,
- null_yield, warnings_only);
+ null_yield, dpp(), warnings_only);
if (ret < 0)
break;
}
return -ENOENT;
}
}
- RGWBucketAdminOp::info(store, bucket_op, f, null_yield);
+ RGWBucketAdminOp::info(store, bucket_op, f, null_yield, dpp());
} else {
RGWBucketInfo bucket_info;
int ret = init_bucket(tenant, bucket_name, bucket_id, bucket_info, bucket);
do {
const int remaining = max_entries - count;
- ret = list_op.list_objects(std::min(remaining, paginate_size),
+ ret = list_op.list_objects(dpp(), std::min(remaining, paginate_size),
&result, &common_prefixes, &truncated,
null_yield);
if (ret < 0) {
}
if (bucket_name.empty()) {
- ret = lister.run();
+ ret = lister.run(dpp());
} else {
- ret = lister.run(bucket_name);
+ ret = lister.run(dpp(), bucket_name);
}
if (ret < 0) {
if (opt_cmd == OPT::BUCKET_STATS) {
if (bucket_name.empty() && !bucket_id.empty()) {
rgw_bucket bucket;
- if (!rgw_find_bucket_by_id(store->ctx(), store->ctl()->meta.mgr, marker, bucket_id, &bucket)) {
+ if (!rgw_find_bucket_by_id(dpp(), store->ctx(), store->ctl()->meta.mgr, marker, bucket_id, &bucket)) {
cerr << "failure: no such bucket id" << std::endl;
return -ENOENT;
}
}
bucket_op.set_fetch_stats(true);
- int r = RGWBucketAdminOp::info(store, bucket_op, f, null_yield);
+ int r = RGWBucketAdminOp::info(store, bucket_op, f, null_yield, dpp());
if (r < 0) {
cerr << "failure: " << cpp_strerror(-r) << ": " << err << std::endl;
return -r;
bucket_op.set_bucket_id(bucket_id);
bucket_op.set_new_bucket_name(new_bucket_name);
string err;
- int r = RGWBucketAdminOp::link(store, bucket_op, &err);
+ int r = RGWBucketAdminOp::link(store, bucket_op, dpp(), &err);
if (r < 0) {
cerr << "failure: " << cpp_strerror(-r) << ": " << err << std::endl;
return -r;
}
if (opt_cmd == OPT::BUCKET_UNLINK) {
- int r = RGWBucketAdminOp::unlink(store, bucket_op);
+ int r = RGWBucketAdminOp::unlink(store, bucket_op, dpp());
if (r < 0) {
cerr << "failure: " << cpp_strerror(-r) << std::endl;
return -r;
string err;
string marker;
- int r = RGWBucketAdminOp::chown(store, bucket_op, marker, &err);
+ int r = RGWBucketAdminOp::chown(store, bucket_op, marker, dpp(), &err);
if (r < 0) {
cerr << "failure: " << cpp_strerror(-r) << ": " << err << std::endl;
return -r;
formatter->reset();
formatter->open_array_section("logs");
RGWAccessHandle h;
- int r = store->getRados()->log_list_init(date, &h);
+ int r = store->getRados()->log_list_init(dpp(), date, &h);
if (r == -ENOENT) {
// no logs.
} else {
if (opt_cmd == OPT::LOG_SHOW) {
RGWAccessHandle h;
- int r = store->getRados()->log_show_init(oid, &h);
+ int r = store->getRados()->log_show_init(dpp(), oid, &h);
if (r < 0) {
cerr << "error opening log " << oid << ": " << cpp_strerror(-r) << std::endl;
return -r;
cout << std::endl;
}
if (opt_cmd == OPT::LOG_RM) {
- int r = store->getRados()->log_remove(oid);
+ int r = store->getRados()->log_remove(dpp(), oid);
if (r < 0) {
cerr << "error removing log " << oid << ": " << cpp_strerror(-r) << std::endl;
return -r;
exit(1);
}
- int ret = store->svc()->zone->add_bucket_placement(pool, null_yield);
+ int ret = store->svc()->zone->add_bucket_placement(dpp(), pool, null_yield);
if (ret < 0)
cerr << "failed to add bucket placement: " << cpp_strerror(-ret) << std::endl;
}
exit(1);
}
- int ret = store->svc()->zone->remove_bucket_placement(pool, null_yield);
+ int ret = store->svc()->zone->remove_bucket_placement(dpp(), pool, null_yield);
if (ret < 0)
cerr << "failed to remove bucket placement: " << cpp_strerror(-ret) << std::endl;
}
if (opt_cmd == OPT::POOLS_LIST) {
set<rgw_pool> pools;
- int ret = store->svc()->zone->list_placement_set(pools, null_yield);
+ int ret = store->svc()->zone->list_placement_set(dpp(), pools, null_yield);
if (ret < 0) {
cerr << "could not list placement set: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
- ret = RGWUsage::show(store->getRados(), user_id, bucket_name, start_epoch, end_epoch,
+ ret = RGWUsage::show(dpp(), store->getRados(), user_id, bucket_name, start_epoch, end_epoch,
show_log_entries, show_log_sum, &categories,
f);
if (ret < 0) {
}
}
- ret = RGWUsage::trim(store->getRados(), user_id, bucket_name, start_epoch, end_epoch);
+ ret = RGWUsage::trim(dpp(), store->getRados(), user_id, bucket_name, start_epoch, end_epoch);
if (ret < 0) {
cerr << "ERROR: read_usage() returned ret=" << ret << std::endl;
return 1;
return 1;
}
- ret = RGWUsage::clear(store->getRados());
+ ret = RGWUsage::clear(dpp(), store->getRados());
if (ret < 0) {
return ret;
}
}
RGWOLHInfo olh;
rgw_obj obj(bucket, object);
- ret = store->getRados()->get_olh(bucket_info, obj, &olh);
+ ret = store->getRados()->get_olh(dpp(), bucket_info, obj, &olh);
if (ret < 0) {
cerr << "ERROR: failed reading olh: " << cpp_strerror(-ret) << std::endl;
return -ret;
RGWObjState *state;
- ret = store->getRados()->get_obj_state(&rctx, bucket_info, obj, &state, false, null_yield); /* don't follow olh */
+ ret = store->getRados()->get_obj_state(dpp(), &rctx, bucket_info, obj, &state, false, null_yield); /* don't follow olh */
if (ret < 0) {
return -ret;
}
- ret = store->getRados()->bucket_index_read_olh_log(bucket_info, *state, obj, 0, &log, &is_truncated);
+ ret = store->getRados()->bucket_index_read_olh_log(dpp(), bucket_info, *state, obj, 0, &log, &is_truncated);
if (ret < 0) {
cerr << "ERROR: failed reading olh: " << cpp_strerror(-ret) << std::endl;
return -ret;
rgw_cls_bi_entry entry;
- ret = store->getRados()->bi_get(bucket_info, obj, bi_index_type, &entry);
+ ret = store->getRados()->bi_get(dpp(), bucket_info, obj, bi_index_type, &entry);
if (ret < 0) {
cerr << "ERROR: bi_get(): " << cpp_strerror(-ret) << std::endl;
return -ret;
rgw_obj obj(bucket, key);
- ret = store->getRados()->bi_put(bucket, obj, entry);
+ ret = store->getRados()->bi_put(dpp(), bucket, obj, entry);
if (ret < 0) {
cerr << "ERROR: bi_put(): " << cpp_strerror(-ret) << std::endl;
return -ret;
RGWRados::BucketShard bs(store->getRados());
int shard_id = (bucket_info.layout.current_index.layout.normal.num_shards > 0 ? i : -1);
- int ret = bs.init(bucket, shard_id, bucket_info.layout.current_index, nullptr /* no RGWBucketInfo */);
+ int ret = bs.init(bucket, shard_id, bucket_info.layout.current_index, nullptr /* no RGWBucketInfo */, dpp());
marker.clear();
if (ret < 0) {
for (int i = 0; i < max_shards; i++) {
RGWRados::BucketShard bs(store->getRados());
int shard_id = (bucket_info.layout.current_index.layout.normal.num_shards > 0 ? i : -1);
- int ret = bs.init(bucket, shard_id, bucket_info.layout.current_index, nullptr /* no RGWBucketInfo */);
+ int ret = bs.init(bucket, shard_id, bucket_info.layout.current_index, nullptr /* no RGWBucketInfo */, dpp());
if (ret < 0) {
cerr << "ERROR: bs.init(bucket=" << bucket << ", shard=" << shard_id << "): " << cpp_strerror(-ret) << std::endl;
return -ret;
RGWDataAccess::BucketRef b;
RGWDataAccess::ObjectRef obj;
- int ret = data_access.get_bucket(tenant, bucket_name, bucket_id, &b, null_yield);
+ int ret = data_access.get_bucket(dpp(), tenant, bucket_name, bucket_id, &b, null_yield);
if (ret < 0) {
cerr << "ERROR: failed to init bucket: " << cpp_strerror(-ret) << std::endl;
return -ret;
return -ret;
}
rgw_obj_key key(object, object_version);
- ret = rgw_remove_object(store, bucket_info, bucket, key);
+ ret = rgw_remove_object(dpp(), store, bucket_info, bucket, key);
if (ret < 0) {
cerr << "ERROR: object remove returned: " << cpp_strerror(-ret) << std::endl;
if (min_rewrite_stripe_size > 0) {
ret = check_min_obj_stripe_size(store, bucket_info, &obj, min_rewrite_stripe_size, &need_rewrite);
if (ret < 0) {
- ldout(store->ctx(), 0) << "WARNING: check_min_obj_stripe_size failed, r=" << ret << dendl;
+ ldpp_dout(dpp(), 0) << "WARNING: check_min_obj_stripe_size failed, r=" << ret << dendl;
}
}
if (need_rewrite) {
return -ret;
}
} else {
- ldout(store->ctx(), 20) << "skipped object" << dendl;
+ ldpp_dout(dpp(), 20) << "skipped object" << dendl;
}
}
if (opt_cmd == OPT::OBJECTS_EXPIRE) {
- if (!store->getRados()->process_expire_objects()) {
+ if (!store->getRados()->process_expire_objects(dpp())) {
cerr << "ERROR: process_expire_objects() processing returned error." << std::endl;
return 1;
}
}
if (opt_cmd == OPT::OBJECTS_EXPIRE_STALE_LIST) {
- ret = RGWBucketAdminOp::fix_obj_expiry(store, bucket_op, f, true);
+ ret = RGWBucketAdminOp::fix_obj_expiry(store, bucket_op, f, dpp(), true);
if (ret < 0) {
cerr << "ERROR: listing returned " << cpp_strerror(-ret) << std::endl;
return -ret;
}
if (opt_cmd == OPT::OBJECTS_EXPIRE_STALE_RM) {
- ret = RGWBucketAdminOp::fix_obj_expiry(store, bucket_op, f, false);
+ ret = RGWBucketAdminOp::fix_obj_expiry(store, bucket_op, f, dpp(), false);
if (ret < 0) {
cerr << "ERROR: removing returned " << cpp_strerror(-ret) << std::endl;
return -ret;
result.reserve(NUM_ENTRIES);
int r = store->getRados()->cls_bucket_list_ordered(
- bucket_info, RGW_NO_SHARD,
+ dpp(), bucket_info, RGW_NO_SHARD,
marker, empty_prefix, empty_delimiter,
NUM_ENTRIES, true, expansion_factor,
result, &is_truncated, &cls_filtered, &marker,
if (min_rewrite_stripe_size > 0) {
r = check_min_obj_stripe_size(store, bucket_info, &obj, min_rewrite_stripe_size, &need_rewrite);
if (r < 0) {
- ldout(store->ctx(), 0) << "WARNING: check_min_obj_stripe_size failed, r=" << r << dendl;
+ ldpp_dout(dpp(), 0) << "WARNING: check_min_obj_stripe_size failed, r=" << r << dendl;
}
}
if (!need_rewrite) {
max_entries = DEFAULT_RESHARD_MAX_ENTRIES;
}
- return br.execute(num_shards, max_entries,
+ return br.execute(num_shards, max_entries, dpp(),
verbose, &cout, formatter.get());
}
int num_source_shards = (bucket_info.layout.current_index.layout.normal.num_shards > 0 ? bucket_info.layout.current_index.layout.normal.num_shards : 1);
- RGWReshard reshard(store);
+ RGWReshard reshard(store, dpp());
cls_rgw_reshard_entry entry;
entry.time = real_clock::now();
entry.tenant = tenant;
entry.old_num_shards = num_source_shards;
entry.new_num_shards = num_shards;
- return reshard.add(entry);
+ return reshard.add(dpp(), entry);
}
if (opt_cmd == OPT::RESHARD_LIST) {
int num_logshards =
store->ctx()->_conf.get_val<uint64_t>("rgw_reshard_num_logs");
- RGWReshard reshard(store);
+ RGWReshard reshard(store, dpp());
formatter->open_array_section("reshard");
for (int i = 0; i < num_logshards; i++) {
RGWBucketReshard br(store, bucket_info, attrs, nullptr /* no callback */);
list<cls_rgw_bucket_instance_entry> status;
- int r = br.get_status(&status);
+ int r = br.get_status(dpp(), &status);
if (r < 0) {
cerr << "ERROR: could not get resharding status for bucket " <<
bucket_name << std::endl;
if (opt_cmd == OPT::RESHARD_PROCESS) {
RGWReshard reshard(store, true, &cout);
- int ret = reshard.process_all_logshards();
+ int ret = reshard.process_all_logshards(dpp());
if (ret < 0) {
cerr << "ERROR: failed to process reshard logs, error=" << cpp_strerror(-ret) << std::endl;
return -ret;
// we did not encounter an error, so let's work with the bucket
RGWBucketReshard br(store, bucket_info, attrs,
nullptr /* no callback */);
- int ret = br.cancel();
+ int ret = br.cancel(dpp());
if (ret < 0) {
if (ret == -EBUSY) {
cerr << "There is ongoing resharding, please retry after " <<
}
}
- RGWReshard reshard(store);
+ RGWReshard reshard(store, dpp());
cls_rgw_reshard_entry entry;
entry.tenant = tenant;
entry.bucket_name = bucket_name;
//entry.bucket_id = bucket_id;
- ret = reshard.remove(entry);
+ ret = reshard.remove(dpp(), entry);
if (ret < 0 && ret != -ENOENT) {
cerr << "Error in updating reshard log with bucket " <<
bucket_name << ": " << cpp_strerror(-ret) << std::endl;
rgw_obj_index_key index_key;
key.get_index_key(&index_key);
oid_list.push_back(index_key);
- ret = store->getRados()->remove_objs_from_index(bucket_info, oid_list);
+ ret = store->getRados()->remove_objs_from_index(dpp(), bucket_info, oid_list);
if (ret < 0) {
cerr << "ERROR: remove_obj_from_index() returned error: " << cpp_strerror(-ret) << std::endl;
return 1;
read_op.params.attrs = &attrs;
read_op.params.obj_size = &obj_size;
- ret = read_op.prepare(null_yield);
+ ret = read_op.prepare(null_yield, dpp());
if (ret < 0) {
cerr << "ERROR: failed to stat object, returned error: " << cpp_strerror(-ret) << std::endl;
return 1;
}
do_check_object_locator(tenant, bucket_name, fix, remove_bad, formatter.get());
} else {
- RGWBucketAdminOp::check_index(store, bucket_op, f, null_yield);
+ RGWBucketAdminOp::check_index(store, bucket_op, f, null_yield, dpp());
}
}
if (opt_cmd == OPT::BUCKET_RM) {
if (!inconsistent_index) {
- RGWBucketAdminOp::remove_bucket(store, bucket_op, null_yield, bypass_gc, true);
+ RGWBucketAdminOp::remove_bucket(store, bucket_op, null_yield, dpp(), bypass_gc, true);
} else {
if (!yes_i_really_mean_it) {
cerr << "using --inconsistent_index can corrupt the bucket index " << std::endl
<< "do you really mean it? (requires --yes-i-really-mean-it)" << std::endl;
return 1;
}
- RGWBucketAdminOp::remove_bucket(store, bucket_op, null_yield, bypass_gc, false);
+ RGWBucketAdminOp::remove_bucket(store, bucket_op, null_yield, dpp(), bypass_gc, false);
}
}
if (opt_cmd == OPT::LC_RESHARD_FIX) {
- ret = RGWBucketAdminOp::fix_lc_shards(store, bucket_op,f);
+ ret = RGWBucketAdminOp::fix_lc_shards(store, bucket_op, f, dpp());
if (ret < 0) {
cerr << "ERROR: listing stale instances" << cpp_strerror(-ret) << std::endl;
}
info.job_name = job_id;
info.num_shards = num_shards;
- int ret = search.init(job_id, &info, detail);
+ int ret = search.init(dpp(), job_id, &info, detail);
if (ret < 0) {
cerr << "could not init search, ret=" << ret << std::endl;
return -ret;
}
- ret = search.run();
+ ret = search.run(dpp());
if (ret < 0) {
return -ret;
}
cerr << "ERROR: --job-id not specified" << std::endl;
return EINVAL;
}
- int ret = search.init(job_id, NULL);
+ int ret = search.init(dpp(), job_id, NULL);
if (ret < 0) {
if (ret == -ENOENT) {
cerr << "job not found" << std::endl;
}
RGWOrphanStore orphan_store(store);
- int ret = orphan_store.init();
+ int ret = orphan_store.init(dpp());
if (ret < 0){
cerr << "connection to cluster failed!" << std::endl;
return -ret;
}
if (opt_cmd == OPT::USER_CHECK) {
- check_bad_user_bucket_mapping(store, user_id, fix, null_yield);
+ check_bad_user_bucket_mapping(store, user_id, fix, null_yield, dpp());
}
if (opt_cmd == OPT::USER_STATS) {
"so at most one of the two should be specified" << std::endl;
return EINVAL;
}
- ret = store->ctl()->user->reset_stats(user_id, null_yield);
+ ret = store->ctl()->user->reset_stats(dpp(), user_id, null_yield);
if (ret < 0) {
cerr << "ERROR: could not reset user stats: " << cpp_strerror(-ret) <<
std::endl;
cerr << "ERROR: could not init bucket: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
- ret = store->ctl()->bucket->sync_user_stats(user_id, bucket_info, null_yield);
+ ret = store->ctl()->bucket->sync_user_stats(dpp(), user_id, bucket_info, null_yield);
if (ret < 0) {
cerr << "ERROR: could not sync bucket stats: " <<
cpp_strerror(-ret) << std::endl;
return -ret;
}
} else {
- int ret = rgw_user_sync_all_stats(store, user_id, null_yield);
+ int ret = rgw_user_sync_all_stats(dpp(), store, user_id, null_yield);
if (ret < 0) {
cerr << "ERROR: could not sync user stats: " <<
cpp_strerror(-ret) << std::endl;
RGWStorageStats stats;
ceph::real_time last_stats_sync;
ceph::real_time last_stats_update;
- int ret = store->ctl()->user->read_stats(user_id, &stats, null_yield,
+ int ret = store->ctl()->user->read_stats(dpp(), user_id, &stats, null_yield,
&last_stats_sync,
&last_stats_update);
if (ret < 0) {
}
if (opt_cmd == OPT::METADATA_GET) {
- int ret = store->ctl()->meta.mgr->get(metadata_key, formatter.get(), null_yield);
+ int ret = store->ctl()->meta.mgr->get(metadata_key, formatter.get(), null_yield, dpp());
if (ret < 0) {
cerr << "ERROR: can't get key: " << cpp_strerror(-ret) << std::endl;
return -ret;
cerr << "ERROR: failed to read input: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
- ret = store->ctl()->meta.mgr->put(metadata_key, bl, null_yield, RGWMDLogSyncType::APPLY_ALWAYS, false);
+ ret = store->ctl()->meta.mgr->put(metadata_key, bl, null_yield, dpp(), RGWMDLogSyncType::APPLY_ALWAYS, false);
if (ret < 0) {
cerr << "ERROR: can't put key: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
if (opt_cmd == OPT::METADATA_RM) {
- int ret = store->ctl()->meta.mgr->remove(metadata_key, null_yield);
+ int ret = store->ctl()->meta.mgr->remove(metadata_key, null_yield, dpp());
if (ret < 0) {
cerr << "ERROR: can't remove key: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
void *handle;
int max = 1000;
- int ret = store->ctl()->meta.mgr->list_keys_init(metadata_key, marker, &handle);
+ int ret = store->ctl()->meta.mgr->list_keys_init(dpp(), metadata_key, marker, &handle);
if (ret < 0) {
cerr << "ERROR: can't get key: " << cpp_strerror(-ret) << std::endl;
return -ret;
meta_log->init_list_entries(i, {}, {}, marker, &handle);
bool truncated;
do {
- int ret = meta_log->list_entries(handle, 1000, entries, NULL, &truncated);
+ int ret = meta_log->list_entries(dpp(), handle, 1000, entries, NULL, &truncated);
if (ret < 0) {
cerr << "ERROR: meta_log->list_entries(): " << cpp_strerror(-ret) << std::endl;
return -ret;
for (; i < g_ceph_context->_conf->rgw_md_log_max_shards; i++) {
RGWMetadataLogInfo info;
- meta_log->get_info(i, &info);
+ meta_log->get_info(dpp(), i, &info);
::encode_json("info", info, formatter.get());
if (opt_cmd == OPT::MDLOG_AUTOTRIM) {
// need a full history for purging old mdlog periods
- store->svc()->mdlog->init_oldest_log_period(null_yield);
+ store->svc()->mdlog->init_oldest_log_period(null_yield, dpp());
RGWCoroutinesManager crs(store->ctx(), store->getRados()->get_cr_registry());
RGWHTTPManager http(store->ctx(), crs.get_completion_mgr());
}
auto num_shards = g_conf()->rgw_md_log_max_shards;
- ret = crs.run(create_admin_meta_log_trim_cr(dpp(), store, &http, num_shards));
+ ret = crs.run(dpp(), create_admin_meta_log_trim_cr(dpp(), store, &http, num_shards));
if (ret < 0) {
cerr << "automated mdlog trim failed with " << cpp_strerror(ret) << std::endl;
return -ret;
// trim until -ENODATA
do {
- ret = meta_log->trim(shard_id, {}, {}, {}, marker);
+ ret = meta_log->trim(dpp(), shard_id, {}, {}, {}, marker);
} while (ret == 0);
if (ret < 0 && ret != -ENODATA) {
cerr << "ERROR: meta_log->trim(): " << cpp_strerror(-ret) << std::endl;
if (opt_cmd == OPT::METADATA_SYNC_STATUS) {
RGWMetaSyncStatusManager sync(store, store->svc()->rados->get_async_processor());
- int ret = sync.init();
+ int ret = sync.init(dpp());
if (ret < 0) {
cerr << "ERROR: sync.init() returned ret=" << ret << std::endl;
return -ret;
}
rgw_meta_sync_status sync_status;
- ret = sync.read_sync_status(&sync_status);
+ ret = sync.read_sync_status(dpp(), &sync_status);
if (ret < 0) {
cerr << "ERROR: sync.read_sync_status() returned ret=" << ret << std::endl;
return -ret;
if (opt_cmd == OPT::METADATA_SYNC_INIT) {
RGWMetaSyncStatusManager sync(store, store->svc()->rados->get_async_processor());
- int ret = sync.init();
+ int ret = sync.init(dpp());
if (ret < 0) {
cerr << "ERROR: sync.init() returned ret=" << ret << std::endl;
return -ret;
}
- ret = sync.init_sync_status();
+ ret = sync.init_sync_status(dpp());
if (ret < 0) {
cerr << "ERROR: sync.init_sync_status() returned ret=" << ret << std::endl;
return -ret;
if (opt_cmd == OPT::METADATA_SYNC_RUN) {
RGWMetaSyncStatusManager sync(store, store->svc()->rados->get_async_processor());
- int ret = sync.init();
+ int ret = sync.init(dpp());
if (ret < 0) {
cerr << "ERROR: sync.init() returned ret=" << ret << std::endl;
return -ret;
}
- ret = sync.run(null_yield);
+ ret = sync.run(dpp(), null_yield);
if (ret < 0) {
cerr << "ERROR: sync.run() returned ret=" << ret << std::endl;
return -ret;
}
RGWDataSyncStatusManager sync(store, store->svc()->rados->get_async_processor(), source_zone, nullptr);
- int ret = sync.init();
+ int ret = sync.init(dpp());
if (ret < 0) {
cerr << "ERROR: sync.init() returned ret=" << ret << std::endl;
return -ret;
set<string> pending_buckets;
set<string> recovering_buckets;
rgw_data_sync_marker sync_marker;
- ret = sync.read_shard_status(shard_id, pending_buckets, recovering_buckets, &sync_marker,
+ ret = sync.read_shard_status(dpp(), shard_id, pending_buckets, recovering_buckets, &sync_marker,
max_entries_specified ? max_entries : 20);
if (ret < 0 && ret != -ENOENT) {
cerr << "ERROR: sync.read_shard_status() returned ret=" << ret << std::endl;
formatter->close_section();
formatter->flush(cout);
} else {
- ret = sync.read_sync_status(&sync_status);
+ ret = sync.read_sync_status(dpp(), &sync_status);
if (ret < 0 && ret != -ENOENT) {
cerr << "ERROR: sync.read_sync_status() returned ret=" << ret << std::endl;
return -ret;
RGWDataSyncStatusManager sync(store, store->svc()->rados->get_async_processor(), source_zone, nullptr);
- int ret = sync.init();
+ int ret = sync.init(dpp());
if (ret < 0) {
cerr << "ERROR: sync.init() returned ret=" << ret << std::endl;
return -ret;
}
- ret = sync.init_sync_status();
+ ret = sync.init_sync_status(dpp());
if (ret < 0) {
cerr << "ERROR: sync.init_sync_status() returned ret=" << ret << std::endl;
return -ret;
int ret = store->svc()->sync_modules->get_manager()->create_instance(g_ceph_context, store->svc()->zone->get_zone().tier_type,
store->svc()->zone->get_zone_params().tier_config, &sync_module);
if (ret < 0) {
- lderr(cct) << "ERROR: failed to init sync module instance, ret=" << ret << dendl;
+ ldpp_dout(dpp(), -1) << "ERROR: failed to init sync module instance, ret=" << ret << dendl;
return ret;
}
RGWDataSyncStatusManager sync(store, store->svc()->rados->get_async_processor(), source_zone, nullptr, sync_module);
- ret = sync.init();
+ ret = sync.init(dpp());
if (ret < 0) {
cerr << "ERROR: sync.init() returned ret=" << ret << std::endl;
return -ret;
}
- ret = sync.run();
+ ret = sync.run(dpp());
if (ret < 0) {
cerr << "ERROR: sync.run() returned ret=" << ret << std::endl;
return -ret;
RGWBucketPipeSyncStatusManager sync(store, source_zone, opt_sb, bucket);
- ret = sync.init();
+ ret = sync.init(dpp());
if (ret < 0) {
cerr << "ERROR: sync.init() returned ret=" << ret << std::endl;
return -ret;
}
- ret = sync.init_sync_status();
+ ret = sync.init_sync_status(dpp());
if (ret < 0) {
cerr << "ERROR: sync.init_sync_status() returned ret=" << ret << std::endl;
return -ret;
return -ret;
}
- if (!store->ctl()->bucket->bucket_imports_data(bucket_info.bucket, null_yield)) {
+ if (!store->ctl()->bucket->bucket_imports_data(bucket_info.bucket, null_yield, dpp())) {
std::cout << "Sync is disabled for bucket " << bucket_name << std::endl;
return 0;
}
RGWBucketSyncPolicyHandlerRef handler;
- ret = store->ctl()->bucket->get_sync_policy_handler(std::nullopt, bucket, &handler, null_yield);
+ ret = store->ctl()->bucket->get_sync_policy_handler(std::nullopt, bucket, &handler, null_yield, dpp());
if (ret < 0) {
std::cerr << "ERROR: failed to get policy handler for bucket ("
<< bucket_info.bucket << "): r=" << ret << ": " << cpp_strerror(-ret) << std::endl;
opt_source_zone, opt_source_bucket,
opt_retry_delay_ms, timeout_at);
if (ret < 0) {
- lderr(store->ctx()) << "bucket sync checkpoint failed: " << cpp_strerror(ret) << dendl;
+ ldpp_dout(dpp(), -1) << "bucket sync checkpoint failed: " << cpp_strerror(ret) << dendl;
return -ret;
}
}
}
bucket_op.set_tenant(tenant);
string err_msg;
- ret = RGWBucketAdminOp::sync_bucket(store, bucket_op, &err_msg);
+ ret = RGWBucketAdminOp::sync_bucket(store, bucket_op, dpp(), &err_msg);
if (ret < 0) {
cerr << err_msg << std::endl;
return -ret;
}
RGWBucketPipeSyncStatusManager sync(store, source_zone, opt_source_bucket, bucket);
- ret = sync.init();
+ ret = sync.init(dpp());
if (ret < 0) {
cerr << "ERROR: sync.init() returned ret=" << ret << std::endl;
return -ret;
}
- ret = sync.read_sync_status();
+ ret = sync.read_sync_status(dpp());
if (ret < 0) {
cerr << "ERROR: sync.read_sync_status() returned ret=" << ret << std::endl;
return -ret;
}
RGWBucketPipeSyncStatusManager sync(store, source_zone, opt_source_bucket, bucket);
- ret = sync.init();
+ ret = sync.init(dpp());
if (ret < 0) {
cerr << "ERROR: sync.init() returned ret=" << ret << std::endl;
return -ret;
}
- ret = sync.run();
+ ret = sync.run(dpp());
if (ret < 0) {
cerr << "ERROR: sync.run() returned ret=" << ret << std::endl;
return -ret;
do {
list<rgw_bi_log_entry> entries;
- ret = store->svc()->bilog_rados->log_list(bucket_info, shard_id, marker, max_entries - count, entries, &truncated);
+ ret = store->svc()->bilog_rados->log_list(dpp(), bucket_info, shard_id, marker, max_entries - count, entries, &truncated);
if (ret < 0) {
cerr << "ERROR: list_bi_log_entries(): " << cpp_strerror(-ret) << std::endl;
return -ret;
do {
list<cls_log_entry> entries;
- ret = store->svc()->cls->timelog.list(oid, {}, {}, max_entries - count, entries, marker, &marker, &truncated,
+ ret = store->svc()->cls->timelog.list(dpp(), oid, {}, {}, max_entries - count, entries, marker, &marker, &truncated,
null_yield);
if (ret == -ENOENT) {
break;
cerr << "ERROR: could not init bucket: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
- ret = store->svc()->bilog_rados->log_trim(bucket_info, shard_id, start_marker, end_marker);
+ ret = store->svc()->bilog_rados->log_trim(dpp(), bucket_info, shard_id, start_marker, end_marker);
if (ret < 0) {
cerr << "ERROR: trim_bi_log_entries(): " << cpp_strerror(-ret) << std::endl;
return -ret;
return -ret;
}
map<int, string> markers;
- ret = store->svc()->bilog_rados->get_log_status(bucket_info, shard_id,
+ ret = store->svc()->bilog_rados->get_log_status(dpp(), bucket_info, shard_id,
&markers, null_yield);
if (ret < 0) {
cerr << "ERROR: get_bi_log_status(): " << cpp_strerror(-ret) << std::endl;
cerr << "trim manager init failed with " << cpp_strerror(ret) << std::endl;
return -ret;
}
- ret = crs.run(trim.create_admin_bucket_trim_cr(&http));
+ ret = crs.run(dpp(), trim.create_admin_bucket_trim_cr(&http));
if (ret < 0) {
cerr << "automated bilog trim failed with " << cpp_strerror(ret) << std::endl;
return -ret;
do {
std::vector<rgw_data_change_log_entry> entries;
if (specified_shard_id) {
- ret = datalog_svc->list_entries(shard_id, max_entries - count,
+ ret = datalog_svc->list_entries(dpp(), shard_id, max_entries - count,
entries,
marker.empty() ?
std::nullopt :
std::make_optional(marker),
&marker, &truncated);
} else {
- ret = datalog_svc->list_entries(max_entries - count, entries,
+ ret = datalog_svc->list_entries(dpp(), max_entries - count, entries,
log_marker, &truncated);
}
if (ret < 0) {
list<cls_log_entry> entries;
RGWDataChangesLogInfo info;
- store->svc()->datalog_rados->get_info(i, &info);
+ store->svc()->datalog_rados->get_info(dpp(), i, &info);
::encode_json("info", info, formatter.get());
auto num_shards = g_conf()->rgw_data_log_num_shards;
std::vector<std::string> markers(num_shards);
- ret = crs.run(create_admin_data_log_trim_cr(store, &http, num_shards, markers));
+ ret = crs.run(dpp(), create_admin_data_log_trim_cr(dpp(), store, &http, num_shards, markers));
if (ret < 0) {
cerr << "automated datalog trim failed with " << cpp_strerror(ret) << std::endl;
return -ret;
// loop until -ENODATA
do {
auto datalog = store->svc()->datalog_rados;
- ret = datalog->trim_entries(shard_id, marker);
+ ret = datalog->trim_entries(dpp(), shard_id, marker);
} while (ret == 0);
if (ret < 0 && ret != -ENODATA) {
return -EINVAL;
}
auto datalog = static_cast<rgw::sal::RGWRadosStore*>(store)->svc()->datalog_rados;
- ret = datalog->change_format(*opt_log_type, null_yield);
+ ret = datalog->change_format(dpp(), *opt_log_type, null_yield);
if (ret < 0) {
cerr << "ERROR: change_format(): " << cpp_strerror(-ret) << std::endl;
return -ret;
if (opt_cmd == OPT::DATALOG_PRUNE) {
auto datalog = static_cast<rgw::sal::RGWRadosStore*>(store)->svc()->datalog_rados;
std::optional<uint64_t> through;
- ret = datalog->trim_generations(through);
+ ret = datalog->trim_generations(dpp(), through);
if (ret < 0) {
cerr << "ERROR: trim_generations(): " << cpp_strerror(-ret) << std::endl;
int ret = store->ctl()->meta.mgr->mutate(RGWSI_MetaBackend_OTP::get_meta_key(user_id),
mtime, &objv_tracker,
- null_yield,
+ null_yield, dpp(),
MDLOG_STATUS_WRITE,
[&] {
- return store->svc()->cls->mfa.create_mfa(user_id, config, &objv_tracker, mtime, null_yield);
+ return store->svc()->cls->mfa.create_mfa(dpp(), user_id, config, &objv_tracker, mtime, null_yield);
});
if (ret < 0) {
cerr << "MFA creation failed, error: " << cpp_strerror(-ret) << std::endl;
user_info.mfa_ids.insert(totp_serial);
user_op.set_mfa_ids(user_info.mfa_ids);
string err;
- ret = user.modify(user_op, null_yield, &err);
+ ret = user.modify(dpp(), user_op, null_yield, &err);
if (ret < 0) {
cerr << "ERROR: failed storing user info, error: " << err << std::endl;
return -ret;
int ret = store->ctl()->meta.mgr->mutate(RGWSI_MetaBackend_OTP::get_meta_key(user_id),
mtime, &objv_tracker,
- null_yield,
+ null_yield, dpp(),
MDLOG_STATUS_WRITE,
[&] {
- return store->svc()->cls->mfa.remove_mfa(user_id, totp_serial, &objv_tracker, mtime, null_yield);
+ return store->svc()->cls->mfa.remove_mfa(dpp(), user_id, totp_serial, &objv_tracker, mtime, null_yield);
});
if (ret < 0) {
cerr << "MFA removal failed, error: " << cpp_strerror(-ret) << std::endl;
user_info.mfa_ids.erase(totp_serial);
user_op.set_mfa_ids(user_info.mfa_ids);
string err;
- ret = user.modify(user_op, null_yield, &err);
+ ret = user.modify(dpp(), user_op, null_yield, &err);
if (ret < 0) {
cerr << "ERROR: failed storing user info, error: " << err << std::endl;
return -ret;
}
rados::cls::otp::otp_info_t result;
- int ret = store->svc()->cls->mfa.get_mfa(user_id, totp_serial, &result, null_yield);
+ int ret = store->svc()->cls->mfa.get_mfa(dpp(), user_id, totp_serial, &result, null_yield);
if (ret < 0) {
if (ret == -ENOENT || ret == -ENODATA) {
cerr << "MFA serial id not found" << std::endl;
}
list<rados::cls::otp::otp_info_t> result;
- int ret = store->svc()->cls->mfa.list_mfa(user_id, &result, null_yield);
+ int ret = store->svc()->cls->mfa.list_mfa(dpp(), user_id, &result, null_yield);
if (ret < 0) {
cerr << "MFA listing failed, error: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
list<rados::cls::otp::otp_info_t> result;
- int ret = store->svc()->cls->mfa.check_mfa(user_id, totp_serial, totp_pin.front(), null_yield);
+ int ret = store->svc()->cls->mfa.check_mfa(dpp(), user_id, totp_serial, totp_pin.front(), null_yield);
if (ret < 0) {
cerr << "MFA check failed, error: " << cpp_strerror(-ret) << std::endl;
return -ret;
}
rados::cls::otp::otp_info_t config;
- int ret = store->svc()->cls->mfa.get_mfa(user_id, totp_serial, &config, null_yield);
+ int ret = store->svc()->cls->mfa.get_mfa(dpp(), user_id, totp_serial, &config, null_yield);
if (ret < 0) {
if (ret == -ENOENT || ret == -ENODATA) {
cerr << "MFA serial id not found" << std::endl;
ceph::real_time now;
- ret = store->svc()->cls->mfa.otp_get_current_time(user_id, &now, null_yield);
+ ret = store->svc()->cls->mfa.otp_get_current_time(dpp(), user_id, &now, null_yield);
if (ret < 0) {
cerr << "ERROR: failed to fetch current time from osd: " << cpp_strerror(-ret) << std::endl;
return -ret;
ret = store->ctl()->meta.mgr->mutate(RGWSI_MetaBackend_OTP::get_meta_key(user_id),
mtime, &objv_tracker,
- null_yield,
+ null_yield, dpp(),
MDLOG_STATUS_WRITE,
[&] {
- return store->svc()->cls->mfa.create_mfa(user_id, config, &objv_tracker, mtime, null_yield);
+ return store->svc()->cls->mfa.create_mfa(dpp(), user_id, config, &objv_tracker, mtime, null_yield);
});
if (ret < 0) {
cerr << "MFA update failed, error: " << cpp_strerror(-ret) << std::endl;
return EINVAL;
}
- ret = RGWBucketAdminOp::list_stale_instances(store, bucket_op,f);
+ ret = RGWBucketAdminOp::list_stale_instances(store, bucket_op, f, dpp());
if (ret < 0) {
cerr << "ERROR: listing stale instances" << cpp_strerror(-ret) << std::endl;
}
return EINVAL;
}
- ret = RGWBucketAdminOp::clear_stale_instances(store, bucket_op,f);
+ ret = RGWBucketAdminOp::clear_stale_instances(store, bucket_op,f, dpp());
if (ret < 0) {
cerr << "ERROR: deleting stale instances" << cpp_strerror(-ret) << std::endl;
}
RGWPubSub ps(store, tenant);
- ret = ps.remove_topic(topic_name, null_yield);
+ ret = ps.remove_topic(dpp(), topic_name, null_yield);
if (ret < 0) {
cerr << "ERROR: could not remove topic: " << cpp_strerror(-ret) << std::endl;
return -ret;
RGWPubSub ps(store, tenant);
auto sub = ps.get_sub(sub_name);
- ret = sub->unsubscribe(topic_name, null_yield);
+ ret = sub->unsubscribe(dpp(), topic_name, null_yield);
if (ret < 0) {
cerr << "ERROR: could not get subscription info: " << cpp_strerror(-ret) << std::endl;
return -ret;
max_entries = RGWPubSub::Sub::DEFAULT_MAX_EVENTS;
}
auto sub = ps.get_sub_with_events(sub_name);
- ret = sub->list_events(marker, max_entries);
+ ret = sub->list_events(dpp(), marker, max_entries);
if (ret < 0) {
cerr << "ERROR: could not list events: " << cpp_strerror(-ret) << std::endl;
return -ret;
RGWPubSub ps(store, tenant);
auto sub = ps.get_sub_with_events(sub_name);
- ret = sub->remove_event(event_id);
+ ret = sub->remove_event(dpp(), event_id);
if (ret < 0) {
cerr << "ERROR: could not remove event: " << cpp_strerror(-ret) << std::endl;
return -ret;
cerr << "ERROR: invalid script context: " << *str_script_ctx << ". must be one of: preRequest, postRequest" << std::endl;
return EINVAL;
}
- rc = rgw::lua::write_script(store, tenant, null_yield, script_ctx, script);
+ rc = rgw::lua::write_script(dpp(), store, tenant, null_yield, script_ctx, script);
if (rc < 0) {
cerr << "ERROR: failed to put script. error: " << rc << std::endl;
return -rc;
cerr << "ERROR: invalid script context: " << *str_script_ctx << ". must be one of: preRequest, postRequest" << std::endl;
return EINVAL;
}
- const auto rc = rgw::lua::delete_script(store, tenant, null_yield, script_ctx);
+ const auto rc = rgw::lua::delete_script(dpp(), store, tenant, null_yield, script_ctx);
if (rc < 0) {
cerr << "ERROR: failed to remove script. error: " << rc << std::endl;
return -rc;
cerr << "ERROR: lua package name was not provided (via --package)" << std::endl;
return EINVAL;
}
- const auto rc = rgw::lua::add_package(store, null_yield, *script_package, bool(allow_compilation));
+ const auto rc = rgw::lua::add_package(dpp(), store, null_yield, *script_package, bool(allow_compilation));
if (rc < 0) {
cerr << "ERROR: failed to add lua package: " << script_package << " .error: " << rc << std::endl;
return -rc;
cerr << "ERROR: lua package name was not provided (via --package)" << std::endl;
return EINVAL;
}
- const auto rc = rgw::lua::remove_package(store, null_yield, *script_package);
+ const auto rc = rgw::lua::remove_package(dpp(), store, null_yield, *script_package);
if (rc == -ENOENT) {
cerr << "WARNING: package " << script_package << " did not exists or already removed" << std::endl;
return 0;
if (opt_cmd == OPT::SCRIPT_PACKAGE_LIST) {
#ifdef WITH_RADOSGW_LUA_PACKAGES
rgw::lua::packages_t packages;
- const auto rc = rgw::lua::list_packages(store, null_yield, packages);
+ const auto rc = rgw::lua::list_packages(dpp(), store, null_yield, packages);
if (rc == -ENOENT) {
std::cout << "no lua packages in allowlist" << std::endl;
} else if (rc < 0) {
}
uint32_t get_perms_from_aclspec(const DoutPrefixProvider* dpp, const aclspec_t& aclspec) const override {
- return rgw_perms_from_aclspec_default_strategy(id, aclspec);
+ return rgw_perms_from_aclspec_default_strategy(id, aclspec, dpp);
}
bool is_admin_of(const rgw_user& acct_id) const override {
uint32_t rgw_perms_from_aclspec_default_strategy(
const rgw_user& uid,
- const rgw::auth::Identity::aclspec_t& aclspec)
+ const rgw::auth::Identity::aclspec_t& aclspec,
+ const DoutPrefixProvider *dpp)
{
- dout(5) << "Searching permissions for uid=" << uid << dendl;
+ ldpp_dout(dpp, 5) << "Searching permissions for uid=" << uid << dendl;
const auto iter = aclspec.find(uid.to_str());
if (std::end(aclspec) != iter) {
- dout(5) << "Found permission: " << iter->second << dendl;
+ ldpp_dout(dpp, 5) << "Found permission: " << iter->second << dendl;
return iter->second;
}
- dout(5) << "Permissions for user not found" << dendl;
+ ldpp_dout(dpp, 5) << "Permissions for user not found" << dendl;
return 0;
}
rgw_apply_default_bucket_quota(user_info.bucket_quota, cct->_conf);
rgw_apply_default_user_quota(user_info.user_quota, cct->_conf);
- int ret = ctl->user->store_info(user_info, null_yield,
+ int ret = ctl->user->store_info(dpp, user_info, null_yield,
RGWUserCtl::PutParams().set_exclusive(true));
if (ret < 0) {
ldpp_dout(dpp, 0) << "ERROR: failed to store new user info: user="
federated_user.ns = "oidc";
//Check in oidc namespace
- if (ctl->user->get_info_by_uid(federated_user, &user_info, null_yield) >= 0) {
+ if (ctl->user->get_info_by_uid(dpp, federated_user, &user_info, null_yield) >= 0) {
/* Succeeded. */
return;
}
federated_user.ns.clear();
//Check for old users which wouldn't have been created in oidc namespace
- if (ctl->user->get_info_by_uid(federated_user, &user_info, null_yield) >= 0) {
+ if (ctl->user->get_info_by_uid(dpp, federated_user, &user_info, null_yield) >= 0) {
/* Succeeded. */
return;
}
//Check if user_id.buckets already exists, may have been from the time, when shadow users didnt exist
RGWStorageStats stats;
- int ret = ctl->user->read_stats(federated_user, &stats, null_yield);
+ int ret = ctl->user->read_stats(dpp, federated_user, &stats, null_yield);
if (ret < 0 && ret != -ENOENT) {
ldpp_dout(dpp, 0) << "ERROR: reading stats for the user returned error " << ret << dendl;
return;
/* For backward compatibility with ACLOwner. */
perm |= rgw_perms_from_aclspec_default_strategy(info.acct_user,
- aclspec);
+ aclspec, dpp);
/* We also need to cover cases where rgw_keystone_implicit_tenants
* was enabled. */
const rgw_user tenanted_acct_user(info.acct_user.id, info.acct_user.id);
perm |= rgw_perms_from_aclspec_default_strategy(tenanted_acct_user,
- aclspec);
+ aclspec, dpp);
}
/* Now it's a time for invoking additional strategy that was supplied by
rgw_apply_default_bucket_quota(user_info.bucket_quota, cct->_conf);
rgw_apply_default_user_quota(user_info.user_quota, cct->_conf);
- int ret = ctl->user->store_info(user_info, null_yield,
+ int ret = ctl->user->store_info(dpp, user_info, null_yield,
RGWUserCtl::PutParams().set_exclusive(true));
if (ret < 0) {
ldpp_dout(dpp, 0) << "ERROR: failed to store new user info: user="
else if (acct_user.tenant.empty()) {
const rgw_user tenanted_uid(acct_user.id, acct_user.id);
- if (ctl->user->get_info_by_uid(tenanted_uid, &user_info, null_yield) >= 0) {
+ if (ctl->user->get_info_by_uid(dpp, tenanted_uid, &user_info, null_yield) >= 0) {
/* Succeeded. */
return;
}
if (split_mode && implicit_tenant)
; /* suppress lookup for id used by "other" protocol */
- else if (ctl->user->get_info_by_uid(acct_user, &user_info, null_yield) >= 0) {
+ else if (ctl->user->get_info_by_uid(dpp, acct_user, &user_info, null_yield) >= 0) {
/* Succeeded. */
return;
}
uint32_t rgw::auth::LocalApplier::get_perms_from_aclspec(const DoutPrefixProvider* dpp, const aclspec_t& aclspec) const
{
- return rgw_perms_from_aclspec_default_strategy(user_info.user_id, aclspec);
+ return rgw_perms_from_aclspec_default_strategy(user_info.user_id, aclspec, dpp);
}
bool rgw::auth::LocalApplier::is_admin_of(const rgw_user& uid) const
uint32_t rgw_perms_from_aclspec_default_strategy(
const rgw_user& uid,
- const rgw::auth::Identity::aclspec_t& aclspec);
+ const rgw::auth::Identity::aclspec_t& aclspec,
+ const DoutPrefixProvider *dpp);
#endif /* CEPH_RGW_AUTH_H */
if (acct_user_override.tenant.empty()) {
const rgw_user tenanted_uid(acct_user_override.id, acct_user_override.id);
- if (ctl->user->get_info_by_uid(tenanted_uid, &user_info, null_yield) >= 0) {
+ if (ctl->user->get_info_by_uid(dpp, tenanted_uid, &user_info, null_yield) >= 0) {
/* Succeeded. */
return;
}
}
- const int ret = ctl->user->get_info_by_uid(acct_user_override, &user_info, null_yield);
+ const int ret = ctl->user->get_info_by_uid(dpp, acct_user_override, &user_info, null_yield);
if (ret < 0) {
/* We aren't trying to recover from ENOENT here. It's supposed that creating
* someone else's account isn't a thing we want to support in this filter. */
* reasons. rgw_get_user_info_by_uid doesn't trigger the operator=() but
* calls ::decode instead. */
RGWUserInfo euser_info;
- if (ctl->user->get_info_by_uid(effective_uid, &euser_info, null_yield) < 0) {
+ if (ctl->user->get_info_by_uid(dpp, effective_uid, &euser_info, null_yield) < 0) {
//ldpp_dout(dpp, 0) << "User lookup failed!" << dendl;
throw -EACCES;
}
* ?get the canonical representation of the object's location
*/
static std::string
-get_canon_resource(const char* const request_uri,
+get_canon_resource(const DoutPrefixProvider *dpp, const char* const request_uri,
const std::map<std::string, std::string>& sub_resources)
{
std::string dest;
}
}
- dout(10) << "get_canon_resource(): dest=" << dest << dendl;
+ ldpp_dout(dpp, 10) << "get_canon_resource(): dest=" << dest << dendl;
return dest;
}
* compute a request's signature
*/
void rgw_create_s3_canonical_header(
+ const DoutPrefixProvider *dpp,
const char* const method,
const char* const content_md5,
const char* const content_type,
dest.append(get_canon_amz_hdr(meta_map));
dest.append(get_canon_amz_hdr(qs_map));
- dest.append(get_canon_resource(request_uri, sub_resources));
+ dest.append(get_canon_resource(dpp, request_uri, sub_resources));
dest_str = dest;
}
* get the header authentication information required to
* compute a request's signature
*/
-bool rgw_create_s3_canonical_header(const req_info& info,
+bool rgw_create_s3_canonical_header(const DoutPrefixProvider *dpp,
+ const req_info& info,
utime_t* const header_time,
std::string& dest,
const bool qsr)
if (content_md5) {
for (const char *p = content_md5; *p; p++) {
if (!is_base64_for_content_md5(*p)) {
- dout(0) << "NOTICE: bad content-md5 provided (not base64),"
+ ldpp_dout(dpp, 0) << "NOTICE: bad content-md5 provided (not base64),"
<< " aborting request p=" << *p << " " << (int)*p << dendl;
return false;
}
if (str == NULL) {
req_date = info.env->get("HTTP_DATE");
if (!req_date) {
- dout(0) << "NOTICE: missing date for auth header" << dendl;
+ ldpp_dout(dpp, 0) << "NOTICE: missing date for auth header" << dendl;
return false;
}
date = req_date;
if (header_time) {
struct tm t;
if (!parse_rfc2616(req_date, &t)) {
- dout(0) << "NOTICE: failed to parse date for auth header" << dendl;
+ ldpp_dout(dpp, 0) << "NOTICE: failed to parse date for auth header" << dendl;
return false;
}
if (t.tm_year < 70) {
- dout(0) << "NOTICE: bad date (predates epoch): " << req_date << dendl;
+ ldpp_dout(dpp, 0) << "NOTICE: bad date (predates epoch): " << req_date << dendl;
return false;
}
*header_time = utime_t(internal_timegm(&t), 0);
request_uri = info.effective_uri;
}
- rgw_create_s3_canonical_header(info.method, content_md5, content_type,
+ rgw_create_s3_canonical_header(dpp, info.method, content_md5, content_type,
date.c_str(), meta_map, qs_map,
request_uri.c_str(), sub_resources, dest);
return true;
std::string_view& signedheaders, /* out */
std::string_view& signature, /* out */
std::string_view& date, /* out */
- std::string_view& sessiontoken) /* out */
+ std::string_view& sessiontoken, /* out */
+ const DoutPrefixProvider *dpp)
{
std::string_view input(info.env->get("HTTP_AUTHORIZATION", ""));
try {
} catch (std::out_of_range&) {
/* We should never ever run into this situation as the presence of
* AWS4_HMAC_SHA256_STR had been verified earlier. */
- dout(10) << "credentials string is too short" << dendl;
+ ldpp_dout(dpp, 10) << "credentials string is too short" << dendl;
return -EINVAL;
}
if (parsed_pair) {
kv[parsed_pair->first] = parsed_pair->second;
} else {
- dout(10) << "NOTICE: failed to parse auth header (s=" << s << ")"
+ ldpp_dout(dpp, 10) << "NOTICE: failed to parse auth header (s=" << s << ")"
<< dendl;
return -EINVAL;
}
/* Ensure that the presigned required keys are really there. */
for (const auto& k : required_keys) {
if (kv.find(k) == std::end(kv)) {
- dout(10) << "NOTICE: auth header missing key: " << k << dendl;
+ ldpp_dout(dpp, 10) << "NOTICE: auth header missing key: " << k << dendl;
return -EINVAL;
}
}
signature = kv["Signature"];
/* sig hex str */
- dout(10) << "v4 signature format = " << signature << dendl;
+ ldpp_dout(dpp, 10) << "v4 signature format = " << signature << dendl;
/* ------------------------- handle x-amz-date header */
const char *d = info.env->get("HTTP_X_AMZ_DATE");
struct tm t;
if (!parse_iso8601(d, &t, NULL, false)) {
- dout(10) << "error reading date via http_x_amz_date" << dendl;
+ ldpp_dout(dpp, 10) << "error reading date via http_x_amz_date" << dendl;
return -EACCES;
}
date = d;
std::string_view& signature, /* out */
std::string_view& date, /* out */
std::string_view& session_token, /* out */
- const bool using_qs) /* in */
+ const bool using_qs, /* in */
+ const DoutPrefixProvider *dpp)
{
std::string_view credential;
int ret;
signature, date, session_token);
} else {
ret = parse_v4_auth_header(info, credential, signedheaders,
- signature, date, session_token);
+ signature, date, session_token, dpp);
}
if (ret < 0) {
}
/* access_key/YYYYMMDD/region/service/aws4_request */
- dout(10) << "v4 credential format = " << credential << dendl;
+ ldpp_dout(dpp, 10) << "v4 credential format = " << credential << dendl;
if (std::count(credential.begin(), credential.end(), '/') != 4) {
return -EINVAL;
/* grab access key id */
const size_t pos = credential.find("/");
access_key_id = credential.substr(0, pos);
- dout(10) << "access key id = " << access_key_id << dendl;
+ ldpp_dout(dpp, 10) << "access key id = " << access_key_id << dendl;
/* grab credential scope */
credential_scope = credential.substr(pos + 1);
- dout(10) << "credential scope = " << credential_scope << dendl;
+ ldpp_dout(dpp, 10) << "credential scope = " << credential_scope << dendl;
return 0;
}
const std::string& canonical_qs,
const std::string& canonical_hdrs,
const std::string_view& signed_hdrs,
- const std::string_view& request_payload_hash)
+ const std::string_view& request_payload_hash,
+ const DoutPrefixProvider *dpp)
{
- ldout(cct, 10) << "payload request hash = " << request_payload_hash << dendl;
+ ldpp_dout(dpp, 10) << "payload request hash = " << request_payload_hash << dendl;
const auto canonical_req = string_join_reserve("\n",
http_verb,
const auto canonical_req_hash = calc_hash_sha256(canonical_req);
using sanitize = rgw::crypt_sanitize::log_content;
- ldout(cct, 10) << "canonical request = " << sanitize{canonical_req} << dendl;
- ldout(cct, 10) << "canonical request hash = "
+ ldpp_dout(dpp, 10) << "canonical request = " << sanitize{canonical_req} << dendl;
+ ldpp_dout(dpp, 10) << "canonical request hash = "
<< canonical_req_hash << dendl;
return canonical_req_hash;
const std::string_view& algorithm,
const std::string_view& request_date,
const std::string_view& credential_scope,
- const sha256_digest_t& canonreq_hash)
+ const sha256_digest_t& canonreq_hash,
+ const DoutPrefixProvider *dpp)
{
const auto hexed_cr_hash = canonreq_hash.to_str();
const std::string_view hexed_cr_hash_str(hexed_cr_hash);
credential_scope,
hexed_cr_hash_str);
- ldout(cct, 10) << "string to sign = "
+ ldpp_dout(dpp, 10) << "string to sign = "
<< rgw::crypt_sanitize::log_content{string_to_sign}
<< dendl;
static sha256_digest_t
get_v4_signing_key(CephContext* const cct,
const std::string_view& credential_scope,
- const std::string_view& secret_access_key)
+ const std::string_view& secret_access_key,
+ const DoutPrefixProvider *dpp)
{
std::string_view date, region, service;
std::tie(date, region, service) = parse_cred_scope(credential_scope);
const auto signing_key = calc_hmac_sha256(service_k,
std::string_view("aws4_request"));
- ldout(cct, 10) << "date_k = " << date_k << dendl;
- ldout(cct, 10) << "region_k = " << region_k << dendl;
- ldout(cct, 10) << "service_k = " << service_k << dendl;
- ldout(cct, 10) << "signing_k = " << signing_key << dendl;
+ ldpp_dout(dpp, 10) << "date_k = " << date_k << dendl;
+ ldpp_dout(dpp, 10) << "region_k = " << region_k << dendl;
+ ldpp_dout(dpp, 10) << "service_k = " << service_k << dendl;
+ ldpp_dout(dpp, 10) << "signing_k = " << signing_key << dendl;
return signing_key;
}
get_v4_signature(const std::string_view& credential_scope,
CephContext* const cct,
const std::string_view& secret_key,
- const AWSEngine::VersionAbstractor::string_to_sign_t& string_to_sign)
+ const AWSEngine::VersionAbstractor::string_to_sign_t& string_to_sign,
+ const DoutPrefixProvider *dpp)
{
- auto signing_key = get_v4_signing_key(cct, credential_scope, secret_key);
+ auto signing_key = get_v4_signing_key(cct, credential_scope, secret_key, dpp);
/* The server-side generated digest for comparison. */
const auto digest = calc_hmac_sha256(signing_key, string_to_sign);
digest.SIZE * 2);
buf_to_hex(digest.v, digest.SIZE, signature.begin());
- ldout(cct, 10) << "generated signature = " << signature << dendl;
+ ldpp_dout(dpp, 10) << "generated signature = " << signature << dendl;
return signature;
}
}
const auto signing_key = \
- rgw::auth::s3::get_v4_signing_key(s->cct, credential_scope, *secret_key);
+ rgw::auth::s3::get_v4_signing_key(s->cct, credential_scope, *secret_key, s);
return std::make_shared<AWSv4ComplMulti>(s,
std::move(date),
} /* namespace rgw */
void rgw_create_s3_canonical_header(
+ const DoutPrefixProvider *dpp,
const char *method,
const char *content_md5,
const char *content_type,
const char *request_uri,
const std::map<std::string, std::string>& sub_resources,
std::string& dest_str);
-bool rgw_create_s3_canonical_header(const req_info& info,
+bool rgw_create_s3_canonical_header(const DoutPrefixProvider *dpp,
+ const req_info& info,
utime_t *header_time, /* out */
std::string& dest, /* out */
bool qsr);
static inline std::tuple<bool, std::string, utime_t>
-rgw_create_s3_canonical_header(const req_info& info, const bool qsr) {
+rgw_create_s3_canonical_header(const DoutPrefixProvider *dpp, const req_info& info, const bool qsr) {
std::string dest;
utime_t header_time;
- const bool ok = rgw_create_s3_canonical_header(info, &header_time, dest, qsr);
+ const bool ok = rgw_create_s3_canonical_header(dpp, info, &header_time, dest, qsr);
return std::make_tuple(ok, dest, header_time);
}
std::string_view& signature, /* out */
std::string_view& date, /* out */
std::string_view& session_token, /* out */
- const bool using_qs); /* in */
+ const bool using_qs, /* in */
+ const DoutPrefixProvider *dpp); /* in */
static inline bool char_needs_aws4_escaping(const char c, bool encode_slash)
{
const std::string& canonical_qs,
const std::string& canonical_hdrs,
const std::string_view& signed_hdrs,
- const std::string_view& request_payload_hash);
+ const std::string_view& request_payload_hash,
+ const DoutPrefixProvider *dpp);
AWSEngine::VersionAbstractor::string_to_sign_t
get_v4_string_to_sign(CephContext* cct,
const std::string_view& algorithm,
const std::string_view& request_date,
const std::string_view& credential_scope,
- const sha256_digest_t& canonreq_hash);
+ const sha256_digest_t& canonreq_hash,
+ const DoutPrefixProvider *dpp);
extern AWSEngine::VersionAbstractor::server_signature_t
get_v4_signature(const std::string_view& credential_scope,
CephContext* const cct,
const std::string_view& secret_key,
- const AWSEngine::VersionAbstractor::string_to_sign_t& string_to_sign);
+ const AWSEngine::VersionAbstractor::string_to_sign_t& string_to_sign,
+ const DoutPrefixProvider *dpp);
extern AWSEngine::VersionAbstractor::server_signature_t
get_v2_signature(CephContext*,
* Get all the buckets owned by a user and fill up an RGWUserBuckets with them.
* Returns: 0 on success, -ERR# on failure.
*/
-int rgw_read_user_buckets(rgw::sal::RGWRadosStore * store,
+int rgw_read_user_buckets(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore * store,
const rgw_user& user_id,
rgw::sal::RGWBucketList& buckets,
const string& marker,
optional_yield y)
{
rgw::sal::RGWRadosUser user(store, user_id);
- return user.list_buckets(marker, end_marker, max, need_stats, buckets, y);
+ return user.list_buckets(dpp, marker, end_marker, max, need_stats, buckets, y);
}
int rgw_bucket_parse_bucket_instance(const string& bucket_instance, string *bucket_name, string *bucket_id, int *shard_id)
void check_bad_user_bucket_mapping(rgw::sal::RGWRadosStore *store, const rgw_user& user_id,
bool fix,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
rgw::sal::RGWBucketList user_buckets;
rgw::sal::RGWRadosUser user(store, user_id);
size_t max_entries = cct->_conf->rgw_list_buckets_max_chunk;
do {
- int ret = user.list_buckets(marker, string(), max_entries, false, user_buckets, y);
+ int ret = user.list_buckets(dpp, marker, string(), max_entries, false, user_buckets, y);
if (ret < 0) {
ldout(store->ctx(), 0) << "failed to read user buckets: "
<< cpp_strerror(-ret) << dendl;
RGWBucketInfo bucket_info;
real_time mtime;
- int r = store->getRados()->get_bucket_info(store->svc(), user_id.tenant, bucket->get_name(), bucket_info, &mtime, null_yield);
+ int r = store->getRados()->get_bucket_info(store->svc(), user_id.tenant, bucket->get_name(), bucket_info, &mtime, null_yield, dpp);
if (r < 0) {
ldout(store->ctx(), 0) << "could not get bucket info for bucket=" << bucket << dendl;
continue;
cout << "fixing" << std::endl;
r = store->ctl()->bucket->link_bucket(user_id, actual_bucket,
bucket_info.creation_time,
- null_yield);
+ null_yield, dpp);
if (r < 0) {
cerr << "failed to fix bucket: " << cpp_strerror(-r) << std::endl;
}
return rgw_obj_key::oid_to_key_in_ns(oid, &key, ns);
}
-int rgw_remove_object(rgw::sal::RGWRadosStore *store, const RGWBucketInfo& bucket_info, const rgw_bucket& bucket, rgw_obj_key& key)
+int rgw_remove_object(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *store, const RGWBucketInfo& bucket_info, const rgw_bucket& bucket, rgw_obj_key& key)
{
RGWObjectCtx rctx(store);
rgw_obj obj(bucket, key);
- return store->getRados()->delete_obj(rctx, bucket_info, obj, bucket_info.versioning_status());
+ return store->getRados()->delete_obj(dpp, rctx, bucket_info, obj, bucket_info.versioning_status());
}
static int aio_wait(librados::AioCompletion *handle)
int rgw_remove_bucket_bypass_gc(rgw::sal::RGWRadosStore *store, rgw_bucket& bucket,
int concurrent_max, bool keep_index_consistent,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
int ret;
map<RGWObjCategory, RGWStorageStats> stats;
string bucket_ver, master_ver;
- ret = store->getRados()->get_bucket_info(store->svc(), bucket.tenant, bucket.name, info, NULL, null_yield);
+ ret = store->getRados()->get_bucket_info(store->svc(), bucket.tenant, bucket.name, info, NULL, null_yield, dpp);
if (ret < 0)
return ret;
- ret = store->getRados()->get_bucket_stats(info, RGW_NO_SHARD, &bucket_ver, &master_ver, stats, NULL);
+ ret = store->getRados()->get_bucket_stats(dpp, info, RGW_NO_SHARD, &bucket_ver, &master_ver, stats, NULL);
if (ret < 0)
return ret;
string prefix, delimiter;
- ret = abort_bucket_multiparts(store, cct, info, prefix, delimiter);
+ ret = abort_bucket_multiparts(dpp, store, cct, info, prefix, delimiter);
if (ret < 0) {
return ret;
}
while (is_truncated) {
objs.clear();
- ret = list_op.list_objects(listing_max_entries, &objs, &common_prefixes,
+ ret = list_op.list_objects(dpp, listing_max_entries, &objs, &common_prefixes,
&is_truncated, null_yield);
if (ret < 0)
return ret;
RGWObjState *astate = NULL;
rgw_obj obj(bucket, (*it).key);
- ret = store->getRados()->get_obj_state(&obj_ctx, info, obj, &astate, false, y);
+ ret = store->getRados()->get_obj_state(dpp, &obj_ctx, info, obj, &astate, false, y);
if (ret == -ENOENT) {
- dout(1) << "WARNING: cannot find obj state for obj " << obj.get_oid() << dendl;
+ ldpp_dout(dpp, 1) << "WARNING: cannot find obj state for obj " << obj.get_oid() << dendl;
continue;
}
if (ret < 0) {
- lderr(store->ctx()) << "ERROR: get obj state returned with error " << ret << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: get obj state returned with error " << ret << dendl;
return ret;
}
if (astate->manifest) {
RGWObjManifest& manifest = *astate->manifest;
- RGWObjManifest::obj_iterator miter = manifest.obj_begin();
+ RGWObjManifest::obj_iterator miter = manifest.obj_begin(dpp);
rgw_obj head_obj = manifest.get_obj();
rgw_raw_obj raw_head_obj;
store->getRados()->obj_to_raw(info.placement_rule, head_obj, &raw_head_obj);
- for (; miter != manifest.obj_end() && max_aio--; ++miter) {
+ for (; miter != manifest.obj_end(dpp) && max_aio--; ++miter) {
if (!max_aio) {
ret = drain_handles(handles);
if (ret < 0) {
- lderr(store->ctx()) << "ERROR: could not drain handles as aio completion returned with " << ret << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: could not drain handles as aio completion returned with " << ret << dendl;
return ret;
}
max_aio = concurrent_max;
continue;
}
- ret = store->getRados()->delete_raw_obj_aio(last_obj, handles);
+ ret = store->getRados()->delete_raw_obj_aio(dpp, last_obj, handles);
if (ret < 0) {
- lderr(store->ctx()) << "ERROR: delete obj aio failed with " << ret << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: delete obj aio failed with " << ret << dendl;
return ret;
}
} // for all shadow objs
- ret = store->getRados()->delete_obj_aio(head_obj, info, astate, handles, keep_index_consistent, null_yield);
+ ret = store->getRados()->delete_obj_aio(dpp, head_obj, info, astate, handles, keep_index_consistent, null_yield);
if (ret < 0) {
- lderr(store->ctx()) << "ERROR: delete obj aio failed with " << ret << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: delete obj aio failed with " << ret << dendl;
return ret;
}
}
if (!max_aio) {
ret = drain_handles(handles);
if (ret < 0) {
- lderr(store->ctx()) << "ERROR: could not drain handles as aio completion returned with " << ret << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: could not drain handles as aio completion returned with " << ret << dendl;
return ret;
}
max_aio = concurrent_max;
ret = drain_handles(handles);
if (ret < 0) {
- lderr(store->ctx()) << "ERROR: could not drain handles as aio completion returned with " << ret << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: could not drain handles as aio completion returned with " << ret << dendl;
return ret;
}
- ret = store->ctl()->bucket->sync_user_stats(info.owner, info, y);
+ ret = store->ctl()->bucket->sync_user_stats(dpp, info.owner, info, y);
if (ret < 0) {
- dout(1) << "WARNING: failed sync user stats before bucket delete. ret=" << ret << dendl;
+ ldpp_dout(dpp, 1) << "WARNING: failed sync user stats before bucket delete. ret=" << ret << dendl;
}
RGWObjVersionTracker objv_tracker;
// this function can only be run if caller wanted children to be
// deleted, so we can ignore the check for children as any that
// remain are detritus from a prior bug
- ret = store->getRados()->delete_bucket(info, objv_tracker, y, false);
+ ret = store->getRados()->delete_bucket(info, objv_tracker, y, dpp, false);
if (ret < 0) {
- lderr(store->ctx()) << "ERROR: could not remove bucket " << bucket.name << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: could not remove bucket " << bucket.name << dendl;
return ret;
}
- ret = store->ctl()->bucket->unlink_bucket(info.owner, bucket, null_yield, false);
+ ret = store->ctl()->bucket->unlink_bucket(info.owner, bucket, null_yield, dpp, false);
if (ret < 0) {
- lderr(store->ctx()) << "ERROR: unable to remove user bucket information" << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: unable to remove user bucket information" << dendl;
}
return ret;
}
int RGWBucket::init(rgw::sal::RGWRadosStore *storage, RGWBucketAdminOpState& op_state,
- optional_yield y, std::string *err_msg,
+ optional_yield y, const DoutPrefixProvider *dpp, std::string *err_msg,
map<string, bufferlist> *pattrs)
{
if (!storage) {
if (!bucket.name.empty()) {
int r = store->ctl()->bucket->read_bucket_info(
- bucket, &bucket_info, y,
+ bucket, &bucket_info, y, dpp,
RGWBucketCtl::BucketInstance::GetParams().set_attrs(pattrs),
&ep_objv);
if (r < 0) {
}
if (!user_id.empty()) {
- int r = store->ctl()->user->get_info_by_uid(user_id, &user_info, y);
+ int r = store->ctl()->user->get_info_by_uid(dpp, user_id, &user_info, y);
if (r < 0) {
set_err_msg(err_msg, "failed to fetch user info");
return r;
return 0;
}
-bool rgw_find_bucket_by_id(CephContext *cct, RGWMetadataManager *mgr,
+bool rgw_find_bucket_by_id(const DoutPrefixProvider *dpp, CephContext *cct, RGWMetadataManager *mgr,
const string& marker, const string& bucket_id, rgw_bucket* bucket_out)
{
void *handle = NULL;
bool truncated = false;
string s;
- int ret = mgr->list_keys_init("bucket.instance", marker, &handle);
+ int ret = mgr->list_keys_init(dpp, "bucket.instance", marker, &handle);
if (ret < 0) {
cerr << "ERROR: can't get key: " << cpp_strerror(-ret) << std::endl;
mgr->list_keys_complete(handle);
return false;
}
-int RGWBucket::link(RGWBucketAdminOpState& op_state, optional_yield y,
+int RGWBucket::link(RGWBucketAdminOpState& op_state, optional_yield y, const DoutPrefixProvider *dpp,
map<string, bufferlist>& attrs, std::string *err_msg)
{
if (!op_state.is_user_op()) {
map<string, bufferlist>::iterator aiter = attrs.find(RGW_ATTR_ACL);
if (aiter == attrs.end()) {
// should never happen; only pre-argonaut buckets lacked this.
- ldout(store->ctx(), 0) << "WARNING: can't bucket link because no acl on bucket=" << old_bucket.name << dendl;
+ ldpp_dout(dpp, 0) << "WARNING: can't bucket link because no acl on bucket=" << old_bucket.name << dendl;
set_err_msg(err_msg,
"While crossing the Anavros you have displeased the goddess Hera."
" You must sacrifice your ancient bucket " + bucket.bucket_id);
}
auto bucket_ctl = store->ctl()->bucket;
- int r = bucket_ctl->unlink_bucket(owner.get_id(), old_bucket, y, false);
+ int r = bucket_ctl->unlink_bucket(owner.get_id(), old_bucket, y, dpp, false);
if (r < 0) {
set_err_msg(err_msg, "could not unlink policy from user " + owner.get_id().to_str());
return r;
// now update the user for the bucket...
if (display_name.empty()) {
- ldout(store->ctx(), 0) << "WARNING: user " << user_info.user_id << " has no display name set" << dendl;
+ ldpp_dout(dpp, 0) << "WARNING: user " << user_info.user_id << " has no display name set" << dendl;
}
RGWAccessControlPolicy policy_instance;
instance_params.set_exclusive(true);
}
- r = bucket_ctl->store_bucket_instance_info(bucket, bucket_info, y, instance_params);
+ r = bucket_ctl->store_bucket_instance_info(bucket, bucket_info, y, dpp, instance_params);
if (r < 0) {
set_err_msg(err_msg, "ERROR: failed writing bucket instance info: " + cpp_strerror(-r));
return r;
r = store->ctl()->bucket->link_bucket(user_info.user_id,
bucket_info.bucket,
ep.creation_time,
- y, true, &ep_data);
+ y, dpp, true, &ep_data);
if (r < 0) {
set_err_msg(err_msg, "failed to relink bucket");
return r;
if (bucket != old_bucket) {
// like RGWRados::delete_bucket -- excepting no bucket_index work.
- r = bucket_ctl->remove_bucket_entrypoint_info(old_bucket, y,
+ r = bucket_ctl->remove_bucket_entrypoint_info(old_bucket, y, dpp,
RGWBucketCtl::Bucket::RemoveParams()
.set_objv_tracker(&ep_data.ep_objv));
if (r < 0) {
return r;
}
- r = bucket_ctl->remove_bucket_instance_info(old_bucket, bucket_info, y,
+ r = bucket_ctl->remove_bucket_instance_info(old_bucket, bucket_info, y, dpp,
RGWBucketCtl::BucketInstance::RemoveParams()
.set_objv_tracker(&old_version));
if (r < 0) {
}
int RGWBucket::chown(RGWBucketAdminOpState& op_state, const string& marker,
- optional_yield y, std::string *err_msg)
+ optional_yield y, const DoutPrefixProvider *dpp, std::string *err_msg)
{
int ret = store->ctl()->bucket->chown(store, bucket_info, user_info.user_id,
- user_info.display_name, marker, y);
+ user_info.display_name, marker, y, dpp);
if (ret < 0) {
set_err_msg(err_msg, "Failed to change object ownership: " + cpp_strerror(-ret));
}
return ret;
}
-int RGWBucket::unlink(RGWBucketAdminOpState& op_state, optional_yield y, std::string *err_msg)
+int RGWBucket::unlink(RGWBucketAdminOpState& op_state, optional_yield y, const DoutPrefixProvider *dpp, std::string *err_msg)
{
rgw_bucket bucket = op_state.get_bucket();
return -EINVAL;
}
- int r = store->ctl()->bucket->unlink_bucket(user_info.user_id, bucket, y);
+ int r = store->ctl()->bucket->unlink_bucket(user_info.user_id, bucket, y, dpp);
if (r < 0) {
set_err_msg(err_msg, "error unlinking bucket" + cpp_strerror(-r));
}
return r;
}
-int RGWBucket::set_quota(RGWBucketAdminOpState& op_state, std::string *err_msg)
+int RGWBucket::set_quota(RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp, std::string *err_msg)
{
rgw_bucket bucket = op_state.get_bucket();
RGWBucketInfo bucket_info;
map<string, bufferlist> attrs;
- int r = store->getRados()->get_bucket_info(store->svc(), bucket.tenant, bucket.name, bucket_info, NULL, null_yield, &attrs);
+ int r = store->getRados()->get_bucket_info(store->svc(), bucket.tenant, bucket.name, bucket_info, NULL, null_yield, dpp, &attrs);
if (r < 0) {
set_err_msg(err_msg, "could not get bucket info for bucket=" + bucket.name + ": " + cpp_strerror(-r));
return r;
}
bucket_info.quota = op_state.quota;
- r = store->getRados()->put_bucket_instance_info(bucket_info, false, real_time(), &attrs);
+ r = store->getRados()->put_bucket_instance_info(bucket_info, false, real_time(), &attrs, dpp);
if (r < 0) {
set_err_msg(err_msg, "ERROR: failed writing bucket instance info: " + cpp_strerror(-r));
return r;
return r;
}
-int RGWBucket::remove_object(RGWBucketAdminOpState& op_state, std::string *err_msg)
+int RGWBucket::remove_object(const DoutPrefixProvider *dpp, RGWBucketAdminOpState& op_state, std::string *err_msg)
{
rgw_bucket bucket = op_state.get_bucket();
std::string object_name = op_state.get_object_name();
rgw_obj_key key(object_name);
- int ret = rgw_remove_object(store, bucket_info, bucket, key);
+ int ret = rgw_remove_object(dpp, store, bucket_info, bucket, key);
if (ret < 0) {
set_err_msg(err_msg, "unable to remove object" + cpp_strerror(-ret));
return ret;
}
int RGWBucket::check_bad_index_multipart(RGWBucketAdminOpState& op_state,
- RGWFormatterFlusher& flusher ,std::string *err_msg)
+ RGWFormatterFlusher& flusher,
+ const DoutPrefixProvider *dpp, std::string *err_msg)
{
bool fix_index = op_state.will_fix_index();
rgw_bucket bucket = op_state.get_bucket();
RGWBucketInfo bucket_info;
auto obj_ctx = store->svc()->sysobj->init_obj_ctx();
- int r = store->getRados()->get_bucket_instance_info(obj_ctx, bucket, bucket_info, nullptr, nullptr, null_yield);
+ int r = store->getRados()->get_bucket_instance_info(obj_ctx, bucket, bucket_info, nullptr, nullptr, null_yield, dpp);
if (r < 0) {
- ldout(store->ctx(), 0) << "ERROR: " << __func__ << "(): get_bucket_instance_info(bucket=" << bucket << ") returned r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: " << __func__ << "(): get_bucket_instance_info(bucket=" << bucket << ") returned r=" << r << dendl;
return r;
}
do {
vector<rgw_bucket_dir_entry> result;
- int r = list_op.list_objects(listing_max_entries, &result,
+ int r = list_op.list_objects(dpp, listing_max_entries, &result,
&common_prefixes, &is_truncated, null_yield);
if (r < 0) {
set_err_msg(err_msg, "failed to list objects in bucket=" + bucket.name +
if (objs_to_unlink.size() > listing_max_entries) {
if (fix_index) {
- int r = store->getRados()->remove_objs_from_index(bucket_info, objs_to_unlink);
+ int r = store->getRados()->remove_objs_from_index(dpp, bucket_info, objs_to_unlink);
if (r < 0) {
set_err_msg(err_msg, "ERROR: remove_obj_from_index() returned error: " +
cpp_strerror(-r));
}
if (fix_index) {
- int r = store->getRados()->remove_objs_from_index(bucket_info, objs_to_unlink);
+ int r = store->getRados()->remove_objs_from_index(dpp, bucket_info, objs_to_unlink);
if (r < 0) {
set_err_msg(err_msg, "ERROR: remove_obj_from_index() returned error: " +
cpp_strerror(-r));
return 0;
}
-int RGWBucket::check_object_index(RGWBucketAdminOpState& op_state,
+int RGWBucket::check_object_index(const DoutPrefixProvider *dpp,
+ RGWBucketAdminOpState& op_state,
RGWFormatterFlusher& flusher,
optional_yield y,
std::string *err_msg)
return -EINVAL;
}
- store->getRados()->cls_obj_set_bucket_tag_timeout(bucket_info, BUCKET_TAG_TIMEOUT);
+ store->getRados()->cls_obj_set_bucket_tag_timeout(dpp, bucket_info, BUCKET_TAG_TIMEOUT);
string prefix;
string empty_delimiter;
result.reserve(listing_max_entries);
int r = store->getRados()->cls_bucket_list_ordered(
- bucket_info, RGW_NO_SHARD, marker, prefix, empty_delimiter,
+ dpp, bucket_info, RGW_NO_SHARD, marker, prefix, empty_delimiter,
listing_max_entries, true, expansion_factor,
result, &is_truncated, &cls_filtered, &marker,
y, rgw_bucket_object_check_filter);
formatter->close_section();
- store->getRados()->cls_obj_set_bucket_tag_timeout(bucket_info, 0);
+ store->getRados()->cls_obj_set_bucket_tag_timeout(dpp, bucket_info, 0);
return 0;
}
-int RGWBucket::check_index(RGWBucketAdminOpState& op_state,
+int RGWBucket::check_index(const DoutPrefixProvider *dpp,
+ RGWBucketAdminOpState& op_state,
map<RGWObjCategory, RGWStorageStats>& existing_stats,
map<RGWObjCategory, RGWStorageStats>& calculated_stats,
std::string *err_msg)
{
bool fix_index = op_state.will_fix_index();
- int r = store->getRados()->bucket_check_index(bucket_info, &existing_stats, &calculated_stats);
+ int r = store->getRados()->bucket_check_index(dpp, bucket_info, &existing_stats, &calculated_stats);
if (r < 0) {
set_err_msg(err_msg, "failed to check index error=" + cpp_strerror(-r));
return r;
}
if (fix_index) {
- r = store->getRados()->bucket_rebuild_index(bucket_info);
+ r = store->getRados()->bucket_rebuild_index(dpp, bucket_info);
if (r < 0) {
set_err_msg(err_msg, "failed to rebuild index err=" + cpp_strerror(-r));
return r;
return 0;
}
-int RGWBucket::sync(RGWBucketAdminOpState& op_state, map<string, bufferlist> *attrs, std::string *err_msg)
+int RGWBucket::sync(RGWBucketAdminOpState& op_state, map<string, bufferlist> *attrs, const DoutPrefixProvider *dpp, std::string *err_msg)
{
if (!store->svc()->zone->is_meta_master()) {
set_err_msg(err_msg, "ERROR: failed to update bucket sync: only allowed on meta master zone");
bucket_info.flags |= BUCKET_DATASYNC_DISABLED;
}
- int r = store->getRados()->put_bucket_instance_info(bucket_info, false, real_time(), attrs);
+ int r = store->getRados()->put_bucket_instance_info(bucket_info, false, real_time(), attrs, dpp);
if (r < 0) {
set_err_msg(err_msg, "ERROR: failed writing bucket instance info:" + cpp_strerror(-r));
return r;
int shard_id = bucket_info.layout.current_index.layout.normal.num_shards? 0 : -1;
if (!sync) {
- r = store->svc()->bilog_rados->log_stop(bucket_info, -1);
+ r = store->svc()->bilog_rados->log_stop(dpp, bucket_info, -1);
if (r < 0) {
set_err_msg(err_msg, "ERROR: failed writing stop bilog:" + cpp_strerror(-r));
return r;
}
} else {
- r = store->svc()->bilog_rados->log_start(bucket_info, -1);
+ r = store->svc()->bilog_rados->log_start(dpp, bucket_info, -1);
if (r < 0) {
set_err_msg(err_msg, "ERROR: failed writing resync bilog:" + cpp_strerror(-r));
return r;
}
for (int i = 0; i < shards_num; ++i, ++shard_id) {
- r = store->svc()->datalog_rados->add_entry(bucket_info, shard_id);
+ r = store->svc()->datalog_rados->add_entry(dpp, bucket_info, shard_id);
if (r < 0) {
set_err_msg(err_msg, "ERROR: failed writing data log:" + cpp_strerror(-r));
return r;
return 0;
}
-int rgw_object_get_attr(rgw::sal::RGWRadosStore* store, const RGWBucketInfo& bucket_info,
+int rgw_object_get_attr(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore* store, const RGWBucketInfo& bucket_info,
const rgw_obj& obj, const char* attr_name,
bufferlist& out_bl, optional_yield y)
{
RGWRados::Object op_target(store->getRados(), bucket_info, obj_ctx, obj);
RGWRados::Object::Read rop(&op_target);
- return rop.get_attr(attr_name, out_bl, y);
+ return rop.get_attr(dpp, attr_name, out_bl, y);
}
-int RGWBucket::get_policy(RGWBucketAdminOpState& op_state, RGWAccessControlPolicy& policy, optional_yield y)
+int RGWBucket::get_policy(RGWBucketAdminOpState& op_state, RGWAccessControlPolicy& policy, optional_yield y, const DoutPrefixProvider *dpp)
{
std::string object_name = op_state.get_object_name();
rgw_bucket bucket = op_state.get_bucket();
RGWBucketInfo bucket_info;
map<string, bufferlist> attrs;
- int ret = store->getRados()->get_bucket_info(store->svc(), bucket.tenant, bucket.name, bucket_info, NULL, null_yield, &attrs);
+ int ret = store->getRados()->get_bucket_info(store->svc(), bucket.tenant, bucket.name, bucket_info, NULL, null_yield, dpp, &attrs);
if (ret < 0) {
return ret;
}
bufferlist bl;
rgw_obj obj(bucket, object_name);
- ret = rgw_object_get_attr(store, bucket_info, obj, RGW_ATTR_ACL, bl, y);
+ ret = rgw_object_get_attr(dpp, store, bucket_info, obj, RGW_ATTR_ACL, bl, y);
if (ret < 0){
return ret;
}
int RGWBucketAdminOp::get_policy(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state,
- RGWAccessControlPolicy& policy)
+ RGWAccessControlPolicy& policy, const DoutPrefixProvider *dpp)
{
RGWBucket bucket;
- int ret = bucket.init(store, op_state, null_yield);
+ int ret = bucket.init(store, op_state, null_yield, dpp);
if (ret < 0)
return ret;
- ret = bucket.get_policy(op_state, policy, null_yield);
+ ret = bucket.get_policy(op_state, policy, null_yield, dpp);
if (ret < 0)
return ret;
int RGWBucketAdminOp::get_policy(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state,
- RGWFormatterFlusher& flusher)
+ RGWFormatterFlusher& flusher, const DoutPrefixProvider *dpp)
{
RGWAccessControlPolicy policy(store->ctx());
- int ret = get_policy(store, op_state, policy);
+ int ret = get_policy(store, op_state, policy, dpp);
if (ret < 0)
return ret;
}
int RGWBucketAdminOp::dump_s3_policy(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state,
- ostream& os)
+ ostream& os, const DoutPrefixProvider *dpp)
{
RGWAccessControlPolicy_S3 policy(store->ctx());
- int ret = get_policy(store, op_state, policy);
+ int ret = get_policy(store, op_state, policy, dpp);
if (ret < 0)
return ret;
return 0;
}
-int RGWBucketAdminOp::unlink(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state)
+int RGWBucketAdminOp::unlink(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp)
{
RGWBucket bucket;
- int ret = bucket.init(store, op_state, null_yield);
+ int ret = bucket.init(store, op_state, null_yield, dpp);
if (ret < 0)
return ret;
- return bucket.unlink(op_state, null_yield);
+ return bucket.unlink(op_state, null_yield, dpp);
}
-int RGWBucketAdminOp::link(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state, string *err)
+int RGWBucketAdminOp::link(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp, string *err)
{
RGWBucket bucket;
map<string, bufferlist> attrs;
- int ret = bucket.init(store, op_state, null_yield, err, &attrs);
+ int ret = bucket.init(store, op_state, null_yield, dpp, err, &attrs);
if (ret < 0)
return ret;
- return bucket.link(op_state, null_yield, attrs, err);
+ return bucket.link(op_state, null_yield, dpp, attrs, err);
}
-int RGWBucketAdminOp::chown(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state, const string& marker, string *err)
+int RGWBucketAdminOp::chown(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state, const string& marker, const DoutPrefixProvider *dpp, string *err)
{
RGWBucket bucket;
map<string, bufferlist> attrs;
- int ret = bucket.init(store, op_state, null_yield, err, &attrs);
+ int ret = bucket.init(store, op_state, null_yield, dpp, err, &attrs);
if (ret < 0)
return ret;
- ret = bucket.link(op_state, null_yield, attrs, err);
+ ret = bucket.link(op_state, null_yield, dpp, attrs, err);
if (ret < 0)
return ret;
- return bucket.chown(op_state, marker, null_yield, err);
+ return bucket.chown(op_state, marker, null_yield, dpp, err);
}
int RGWBucketAdminOp::check_index(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state,
- RGWFormatterFlusher& flusher, optional_yield y)
+ RGWFormatterFlusher& flusher, optional_yield y, const DoutPrefixProvider *dpp)
{
int ret;
map<RGWObjCategory, RGWStorageStats> existing_stats;
RGWBucket bucket;
- ret = bucket.init(store, op_state, null_yield);
+ ret = bucket.init(store, op_state, null_yield, dpp);
if (ret < 0)
return ret;
Formatter *formatter = flusher.get_formatter();
flusher.start(0);
- ret = bucket.check_bad_index_multipart(op_state, flusher);
+ ret = bucket.check_bad_index_multipart(op_state, flusher, dpp);
if (ret < 0)
return ret;
- ret = bucket.check_object_index(op_state, flusher, y);
+ ret = bucket.check_object_index(dpp, op_state, flusher, y);
if (ret < 0)
return ret;
- ret = bucket.check_index(op_state, existing_stats, calculated_stats);
+ ret = bucket.check_index(dpp, op_state, existing_stats, calculated_stats);
if (ret < 0)
return ret;
}
int RGWBucketAdminOp::remove_bucket(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state,
- optional_yield y, bool bypass_gc, bool keep_index_consistent)
+ optional_yield y, const DoutPrefixProvider *dpp,
+ bool bypass_gc, bool keep_index_consistent)
{
std::unique_ptr<rgw::sal::RGWBucket> bucket;
std::unique_ptr<rgw::sal::RGWUser> user = store->get_user(op_state.get_user_id());
- int ret = store->get_bucket(user.get(), user->get_tenant(), op_state.get_bucket_name(),
+ int ret = store->get_bucket(dpp, user.get(), user->get_tenant(), op_state.get_bucket_name(),
&bucket, y);
if (ret < 0)
return ret;
if (bypass_gc)
- ret = rgw_remove_bucket_bypass_gc(store, bucket->get_key(), op_state.get_max_aio(), keep_index_consistent, y);
+ ret = rgw_remove_bucket_bypass_gc(store, bucket->get_key(), op_state.get_max_aio(), keep_index_consistent, y, dpp);
else
- ret = bucket->remove_bucket(op_state.will_delete_children(), string(), string(),
+ ret = bucket->remove_bucket(dpp, op_state.will_delete_children(), string(), string(),
false, nullptr, y);
return ret;
}
-int RGWBucketAdminOp::remove_object(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state)
+int RGWBucketAdminOp::remove_object(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp)
{
RGWBucket bucket;
- int ret = bucket.init(store, op_state, null_yield);
+ int ret = bucket.init(store, op_state, null_yield, dpp);
if (ret < 0)
return ret;
- return bucket.remove_object(op_state);
+ return bucket.remove_object(dpp, op_state);
}
-int RGWBucketAdminOp::sync_bucket(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state, string *err_msg)
+int RGWBucketAdminOp::sync_bucket(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp, string *err_msg)
{
RGWBucket bucket;
map<string, bufferlist> attrs;
- int ret = bucket.init(store, op_state, null_yield, err_msg, &attrs);
+ int ret = bucket.init(store, op_state, null_yield, dpp, err_msg, &attrs);
if (ret < 0)
{
return ret;
}
- return bucket.sync(op_state, &attrs, err_msg);
+ return bucket.sync(op_state, &attrs, dpp, err_msg);
}
static int bucket_stats(rgw::sal::RGWRadosStore *store,
const std::string& tenant_name,
const std::string& bucket_name,
- Formatter *formatter)
+ Formatter *formatter,
+ const DoutPrefixProvider *dpp)
{
RGWBucketInfo bucket_info;
map<RGWObjCategory, RGWStorageStats> stats;
real_time mtime;
int r = store->getRados()->get_bucket_info(store->svc(),
tenant_name, bucket_name, bucket_info,
- &mtime, null_yield, &attrs);
+ &mtime, null_yield, dpp, &attrs);
if (r < 0) {
return r;
}
string bucket_ver, master_ver;
string max_marker;
- int ret = store->getRados()->get_bucket_stats(bucket_info, RGW_NO_SHARD,
+ int ret = store->getRados()->get_bucket_stats(dpp, bucket_info, RGW_NO_SHARD,
&bucket_ver, &master_ver, stats,
&max_marker);
if (ret < 0) {
RGWBucketAdminOpState& op_state,
const std::list<std::string>& user_ids,
RGWFormatterFlusher& flusher, optional_yield y,
+ const DoutPrefixProvider *dpp,
bool warnings_only)
{
int ret = 0;
do {
rgw::sal::RGWRadosUser user(store, rgw_user(user_id));
- ret = user.list_buckets(marker, string(), max_entries, false, buckets, y);
+ ret = user.list_buckets(dpp, marker, string(), max_entries, false, buckets, y);
if (ret < 0)
return ret;
ret = store->getRados()->get_bucket_info(store->svc(), bucket->get_tenant(),
bucket->get_name(), info, nullptr,
- null_yield);
+ null_yield, dpp);
if (ret < 0)
continue;
/* need stats for num_entries */
string bucket_ver, master_ver;
std::map<RGWObjCategory, RGWStorageStats> stats;
- ret = store->getRados()->get_bucket_stats(info, RGW_NO_SHARD, &bucket_ver,
+ ret = store->getRados()->get_bucket_stats(dpp, info, RGW_NO_SHARD, &bucket_ver,
&master_ver, stats, nullptr);
if (ret < 0)
int RGWBucketAdminOp::info(rgw::sal::RGWRadosStore *store,
RGWBucketAdminOpState& op_state,
RGWFormatterFlusher& flusher,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
RGWBucket bucket;
int ret = 0;
const std::string& bucket_name = op_state.get_bucket_name();
if (!bucket_name.empty()) {
- ret = bucket.init(store, op_state, null_yield);
+ ret = bucket.init(store, op_state, null_yield, dpp);
if (-ENOENT == ret)
return -ERR_NO_SUCH_BUCKET;
else if (ret < 0)
constexpr bool no_need_stats = false; // set need_stats to false
do {
- ret = user.list_buckets(marker, empty_end_marker, max_entries,
+ ret = user.list_buckets(dpp, marker, empty_end_marker, max_entries,
no_need_stats, buckets, y);
if (ret < 0) {
return ret;
}
if (show_stats) {
- bucket_stats(store, user_id.tenant, obj_name, formatter);
+ bucket_stats(store, user_id.tenant, obj_name, formatter, dpp);
} else {
formatter->dump_string("bucket", obj_name);
}
formatter->close_section();
} else if (!bucket_name.empty()) {
- ret = bucket_stats(store, user_id.tenant, bucket_name, formatter);
+ ret = bucket_stats(store, user_id.tenant, bucket_name, formatter, dpp);
if (ret < 0) {
return ret;
}
bool truncated = true;
formatter->open_array_section("buckets");
- ret = store->ctl()->meta.mgr->list_keys_init("bucket", &handle);
+ ret = store->ctl()->meta.mgr->list_keys_init(dpp, "bucket", &handle);
while (ret == 0 && truncated) {
std::list<std::string> buckets;
constexpr int max_keys = 1000;
&truncated);
for (auto& bucket_name : buckets) {
if (show_stats) {
- bucket_stats(store, user_id.tenant, bucket_name, formatter);
+ bucket_stats(store, user_id.tenant, bucket_name, formatter, dpp);
} else {
formatter->dump_string("bucket", bucket_name);
}
return 0;
}
-int RGWBucketAdminOp::set_quota(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state)
+int RGWBucketAdminOp::set_quota(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp)
{
RGWBucket bucket;
- int ret = bucket.init(store, op_state, null_yield);
+ int ret = bucket.init(store, op_state, null_yield, dpp);
if (ret < 0)
return ret;
- return bucket.set_quota(op_state);
+ return bucket.set_quota(op_state, dpp);
}
-static int purge_bucket_instance(rgw::sal::RGWRadosStore *store, const RGWBucketInfo& bucket_info)
+static int purge_bucket_instance(rgw::sal::RGWRadosStore *store, const RGWBucketInfo& bucket_info, const DoutPrefixProvider *dpp)
{
int max_shards = (bucket_info.layout.current_index.layout.normal.num_shards > 0 ? bucket_info.layout.current_index.layout.normal.num_shards : 1);
for (int i = 0; i < max_shards; i++) {
RGWRados::BucketShard bs(store->getRados());
int shard_id = (bucket_info.layout.current_index.layout.normal.num_shards > 0 ? i : -1);
- int ret = bs.init(bucket_info.bucket, shard_id, bucket_info.layout.current_index, nullptr);
+ int ret = bs.init(bucket_info.bucket, shard_id, bucket_info.layout.current_index, nullptr, dpp);
if (ret < 0) {
cerr << "ERROR: bs.init(bucket=" << bucket_info.bucket << ", shard=" << shard_id
<< "): " << cpp_strerror(-ret) << std::endl;
using bucket_instance_ls = std::vector<RGWBucketInfo>;
void get_stale_instances(rgw::sal::RGWRadosStore *store, const std::string& bucket_name,
const vector<std::string>& lst,
- bucket_instance_ls& stale_instances)
+ bucket_instance_ls& stale_instances,
+ const DoutPrefixProvider *dpp)
{
auto obj_ctx = store->svc()->sysobj->init_obj_ctx();
for (const auto& bucket_instance : lst){
RGWBucketInfo binfo;
int r = store->getRados()->get_bucket_instance_info(obj_ctx, bucket_instance,
- binfo, nullptr,nullptr, null_yield);
+ binfo, nullptr,nullptr, null_yield, dpp);
if (r < 0){
// this can only happen if someone deletes us right when we're processing
- lderr(store->ctx()) << "Bucket instance is invalid: " << bucket_instance
+ ldpp_dout(dpp, -1) << "Bucket instance is invalid: " << bucket_instance
<< cpp_strerror(-r) << dendl;
continue;
}
// all the instances
auto [tenant, bucket] = split_tenant(bucket_name);
RGWBucketInfo cur_bucket_info;
- int r = store->getRados()->get_bucket_info(store->svc(), tenant, bucket, cur_bucket_info, nullptr, null_yield);
+ int r = store->getRados()->get_bucket_info(store->svc(), tenant, bucket, cur_bucket_info, nullptr, null_yield, dpp);
if (r < 0) {
if (r == -ENOENT) {
// bucket doesn't exist, everything is stale then
std::make_move_iterator(other_instances.end()));
} else {
// all bets are off if we can't read the bucket, just return the sureshot stale instances
- lderr(store->ctx()) << "error: reading bucket info for bucket: "
+ ldpp_dout(dpp, -1) << "error: reading bucket info for bucket: "
<< bucket << cpp_strerror(-r) << dendl;
}
return;
r = reshard_lock.lock();
if (r < 0) {
// most likely bucket is under reshard, return the sureshot stale instances
- ldout(store->ctx(), 5) << __func__
+ ldpp_dout(dpp, 5) << __func__
<< "failed to take reshard lock; reshard underway likey" << dendl;
return;
}
static int process_stale_instances(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state,
RGWFormatterFlusher& flusher,
+ const DoutPrefixProvider *dpp,
std::function<void(const bucket_instance_ls&,
Formatter *,
rgw::sal::RGWRadosStore*)> process_f)
Formatter *formatter = flusher.get_formatter();
static constexpr auto default_max_keys = 1000;
- int ret = store->ctl()->meta.mgr->list_keys_init("bucket.instance", marker, &handle);
+ int ret = store->ctl()->meta.mgr->list_keys_init(dpp, "bucket.instance", marker, &handle);
if (ret < 0) {
cerr << "ERROR: can't get key: " << cpp_strerror(-ret) << std::endl;
return ret;
}
for (const auto& kv: bucket_instance_map) {
bucket_instance_ls stale_lst;
- get_stale_instances(store, kv.first, kv.second, stale_lst);
+ get_stale_instances(store, kv.first, kv.second, stale_lst, dpp);
process_f(stale_lst, formatter, store);
}
}
int RGWBucketAdminOp::list_stale_instances(rgw::sal::RGWRadosStore *store,
RGWBucketAdminOpState& op_state,
- RGWFormatterFlusher& flusher)
+ RGWFormatterFlusher& flusher,
+ const DoutPrefixProvider *dpp)
{
auto process_f = [](const bucket_instance_ls& lst,
Formatter *formatter,
for (const auto& binfo: lst)
formatter->dump_string("key", binfo.bucket.get_key());
};
- return process_stale_instances(store, op_state, flusher, process_f);
+ return process_stale_instances(store, op_state, flusher, dpp, process_f);
}
int RGWBucketAdminOp::clear_stale_instances(rgw::sal::RGWRadosStore *store,
RGWBucketAdminOpState& op_state,
- RGWFormatterFlusher& flusher)
+ RGWFormatterFlusher& flusher,
+ const DoutPrefixProvider *dpp)
{
- auto process_f = [](const bucket_instance_ls& lst,
+ auto process_f = [dpp](const bucket_instance_ls& lst,
Formatter *formatter,
- rgw::sal::RGWRadosStore *store){
+ rgw::sal::RGWRadosStore *store) {
for (const auto &binfo: lst) {
- int ret = purge_bucket_instance(store, binfo);
+ int ret = purge_bucket_instance(store, binfo, dpp);
if (ret == 0){
auto md_key = "bucket.instance:" + binfo.bucket.get_key();
- ret = store->ctl()->meta.mgr->remove(md_key, null_yield);
+ ret = store->ctl()->meta.mgr->remove(md_key, null_yield, dpp);
}
formatter->open_object_section("delete_status");
formatter->dump_string("bucket_instance", binfo.bucket.get_key());
}
};
- return process_stale_instances(store, op_state, flusher, process_f);
+ return process_stale_instances(store, op_state, flusher, dpp, process_f);
}
static int fix_single_bucket_lc(rgw::sal::RGWRadosStore *store,
const std::string& tenant_name,
- const std::string& bucket_name)
+ const std::string& bucket_name,
+ const DoutPrefixProvider *dpp)
{
RGWBucketInfo bucket_info;
map <std::string, bufferlist> bucket_attrs;
int ret = store->getRados()->get_bucket_info(store->svc(), tenant_name, bucket_name,
- bucket_info, nullptr, null_yield, &bucket_attrs);
+ bucket_info, nullptr, null_yield, dpp, &bucket_attrs);
if (ret < 0) {
// TODO: Should we handle the case where the bucket could've been removed between
// listing and fetching?
return ret;
}
- return rgw::lc::fix_lc_shard_entry(store, store->get_rgwlc()->get_lc(), bucket_info,
+ return rgw::lc::fix_lc_shard_entry(dpp, store, store->get_rgwlc()->get_lc(), bucket_info,
bucket_attrs);
}
static void process_single_lc_entry(rgw::sal::RGWRadosStore *store,
Formatter *formatter,
const std::string& tenant_name,
- const std::string& bucket_name)
+ const std::string& bucket_name,
+ const DoutPrefixProvider *dpp)
{
- int ret = fix_single_bucket_lc(store, tenant_name, bucket_name);
+ int ret = fix_single_bucket_lc(store, tenant_name, bucket_name, dpp);
format_lc_status(formatter, tenant_name, bucket_name, -ret);
}
int RGWBucketAdminOp::fix_lc_shards(rgw::sal::RGWRadosStore *store,
RGWBucketAdminOpState& op_state,
- RGWFormatterFlusher& flusher)
+ RGWFormatterFlusher& flusher,
+ const DoutPrefixProvider *dpp)
{
std::string marker;
void *handle;
if (const std::string& bucket_name = op_state.get_bucket_name();
! bucket_name.empty()) {
const rgw_user user_id = op_state.get_user_id();
- process_single_lc_entry(store, formatter, user_id.tenant, bucket_name);
+ process_single_lc_entry(store, formatter, user_id.tenant, bucket_name, dpp);
formatter->flush(cout);
} else {
- int ret = store->ctl()->meta.mgr->list_keys_init("bucket", marker, &handle);
+ int ret = store->ctl()->meta.mgr->list_keys_init(dpp, "bucket", marker, &handle);
if (ret < 0) {
std::cerr << "ERROR: can't get key: " << cpp_strerror(-ret) << std::endl;
return ret;
} if (ret != -ENOENT) {
for (const auto &key:keys) {
auto [tenant_name, bucket_name] = split_tenant(key);
- process_single_lc_entry(store, formatter, tenant_name, bucket_name);
+ process_single_lc_entry(store, formatter, tenant_name, bucket_name, dpp);
}
}
formatter->flush(cout); // regularly flush every 1k entries
}
-static bool has_object_expired(rgw::sal::RGWRadosStore *store,
+static bool has_object_expired(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store,
const RGWBucketInfo& bucket_info,
const rgw_obj_key& key, utime_t& delete_at)
{
rgw_obj obj(bucket_info.bucket, key);
bufferlist delete_at_bl;
- int ret = rgw_object_get_attr(store, bucket_info, obj, RGW_ATTR_DELETE_AT, delete_at_bl, null_yield);
+ int ret = rgw_object_get_attr(dpp, store, bucket_info, obj, RGW_ATTR_DELETE_AT, delete_at_bl, null_yield);
if (ret < 0) {
return false; // no delete at attr, proceed
}
return false;
}
-static int fix_bucket_obj_expiry(rgw::sal::RGWRadosStore *store,
+static int fix_bucket_obj_expiry(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store,
const RGWBucketInfo& bucket_info,
RGWFormatterFlusher& flusher, bool dry_run)
{
if (bucket_info.bucket.bucket_id == bucket_info.bucket.marker) {
- lderr(store->ctx()) << "Not a resharded bucket skipping" << dendl;
+ ldpp_dout(dpp, -1) << "Not a resharded bucket skipping" << dendl;
return 0; // not a resharded bucket, move along
}
do {
std::vector<rgw_bucket_dir_entry> objs;
- int ret = list_op.list_objects(listing_max_entries, &objs, nullptr,
+ int ret = list_op.list_objects(dpp, listing_max_entries, &objs, nullptr,
&is_truncated, null_yield);
if (ret < 0) {
- lderr(store->ctx()) << "ERROR failed to list objects in the bucket" << dendl;
+ ldpp_dout(dpp, -1) << "ERROR failed to list objects in the bucket" << dendl;
return ret;
}
for (const auto& obj : objs) {
rgw_obj_key key(obj.key);
utime_t delete_at;
- if (has_object_expired(store, bucket_info, key, delete_at)) {
+ if (has_object_expired(dpp, store, bucket_info, key, delete_at)) {
formatter->open_object_section("object_status");
formatter->dump_string("object", key.name);
formatter->dump_stream("delete_at") << delete_at;
if (!dry_run) {
- ret = rgw_remove_object(store, bucket_info, bucket_info.bucket, key);
+ ret = rgw_remove_object(dpp, store, bucket_info, bucket_info.bucket, key);
formatter->dump_int("status", ret);
}
int RGWBucketAdminOp::fix_obj_expiry(rgw::sal::RGWRadosStore *store,
RGWBucketAdminOpState& op_state,
- RGWFormatterFlusher& flusher, bool dry_run)
+ RGWFormatterFlusher& flusher,
+ const DoutPrefixProvider *dpp, bool dry_run)
{
RGWBucket admin_bucket;
- int ret = admin_bucket.init(store, op_state, null_yield);
+ int ret = admin_bucket.init(store, op_state, null_yield, dpp);
if (ret < 0) {
- lderr(store->ctx()) << "failed to initialize bucket" << dendl;
+ ldpp_dout(dpp, -1) << "failed to initialize bucket" << dendl;
return ret;
}
- return fix_bucket_obj_expiry(store, admin_bucket.get_bucket_info(), flusher, dry_run);
+ return fix_bucket_obj_expiry(dpp, store, admin_bucket.get_bucket_info(), flusher, dry_run);
}
void RGWBucketCompleteInfo::dump(Formatter *f) const {
return new RGWBucketEntryMetadataObject(be, objv, mtime);
}
- int do_get(RGWSI_MetaBackend_Handler::Op *op, string& entry, RGWMetadataObject **obj, optional_yield y) override {
+ int do_get(RGWSI_MetaBackend_Handler::Op *op, string& entry, RGWMetadataObject **obj, optional_yield y, const DoutPrefixProvider *dpp) override {
RGWObjVersionTracker ot;
RGWBucketEntryPoint be;
RGWSI_Bucket_EP_Ctx ctx(op->ctx());
- int ret = svc.bucket->read_bucket_entrypoint_info(ctx, entry, &be, &ot, &mtime, &attrs, y);
+ int ret = svc.bucket->read_bucket_entrypoint_info(ctx, entry, &be, &ot, &mtime, &attrs, y, dpp);
if (ret < 0)
return ret;
RGWMetadataObject *obj,
RGWObjVersionTracker& objv_tracker,
optional_yield y,
+ const DoutPrefixProvider *dpp,
RGWMDLogSyncType type, bool from_remote_zone) override;
int do_remove(RGWSI_MetaBackend_Handler::Op *op, string& entry, RGWObjVersionTracker& objv_tracker,
- optional_yield y) override {
+ optional_yield y, const DoutPrefixProvider *dpp) override {
RGWBucketEntryPoint be;
real_time orig_mtime;
RGWSI_Bucket_EP_Ctx ctx(op->ctx());
- int ret = svc.bucket->read_bucket_entrypoint_info(ctx, entry, &be, &objv_tracker, &orig_mtime, nullptr, y);
+ int ret = svc.bucket->read_bucket_entrypoint_info(ctx, entry, &be, &objv_tracker, &orig_mtime, nullptr, y, dpp);
if (ret < 0)
return ret;
* it immediately and don't want to invalidate our cached objv_version or the bucket obj removal
* will incorrectly fail.
*/
- ret = ctl.bucket->unlink_bucket(be.owner, be.bucket, y, false);
+ ret = ctl.bucket->unlink_bucket(be.owner, be.bucket, y, dpp, false);
if (ret < 0) {
- lderr(svc.bucket->ctx()) << "could not unlink bucket=" << entry << " owner=" << be.owner << dendl;
+ ldpp_dout(dpp, -1) << "could not unlink bucket=" << entry << " owner=" << be.owner << dendl;
}
- ret = svc.bucket->remove_bucket_entrypoint_info(ctx, entry, &objv_tracker, y);
+ ret = svc.bucket->remove_bucket_entrypoint_info(ctx, entry, &objv_tracker, y, dpp);
if (ret < 0) {
- lderr(svc.bucket->ctx()) << "could not delete bucket=" << entry << dendl;
+ ldpp_dout(dpp, -1) << "could not delete bucket=" << entry << dendl;
}
/* idempotent */
return 0;
obj->get_ep().encode(*bl);
}
- int put_checked() override;
- int put_post() override;
+ int put_checked(const DoutPrefixProvider *dpp) override;
+ int put_post(const DoutPrefixProvider *dpp) override;
};
int RGWBucketMetadataHandler::do_put(RGWSI_MetaBackend_Handler::Op *op, string& entry,
RGWMetadataObject *obj,
RGWObjVersionTracker& objv_tracker,
optional_yield y,
+ const DoutPrefixProvider *dpp,
RGWMDLogSyncType type, bool from_remote_zone)
{
RGWMetadataHandlerPut_Bucket put_op(this, op, entry, obj, objv_tracker, y, type, from_remote_zone);
- return do_put_operate(&put_op);
+ return do_put_operate(&put_op, dpp);
}
-int RGWMetadataHandlerPut_Bucket::put_checked()
+int RGWMetadataHandlerPut_Bucket::put_checked(const DoutPrefixProvider *dpp)
{
RGWBucketEntryMetadataObject *orig_obj = static_cast<RGWBucketEntryMetadataObject *>(old_obj);
mtime,
pattrs,
&objv_tracker,
- y);
+ y,
+ dpp);
}
-int RGWMetadataHandlerPut_Bucket::put_post()
+int RGWMetadataHandlerPut_Bucket::put_post(const DoutPrefixProvider *dpp)
{
auto& be = obj->get_ep();
/* link bucket */
if (be.linked) {
- ret = bhandler->ctl.bucket->link_bucket(be.owner, be.bucket, be.creation_time, y, false);
+ ret = bhandler->ctl.bucket->link_bucket(be.owner, be.bucket, be.creation_time, y, dpp, false);
} else {
- ret = bhandler->ctl.bucket->unlink_bucket(be.owner, be.bucket, y, false);
+ ret = bhandler->ctl.bucket->unlink_bucket(be.owner, be.bucket, y, dpp, false);
}
return ret;
RGWArchiveBucketMetadataHandler() {}
int do_remove(RGWSI_MetaBackend_Handler::Op *op, string& entry, RGWObjVersionTracker& objv_tracker,
- optional_yield y) override {
+ optional_yield y, const DoutPrefixProvider *dpp) override {
auto cct = svc.bucket->ctx();
RGWSI_Bucket_EP_Ctx ctx(op->ctx());
- ldout(cct, 5) << "SKIP: bucket removal is not allowed on archive zone: bucket:" << entry << " ... proceeding to rename" << dendl;
+ ldpp_dout(dpp, 5) << "SKIP: bucket removal is not allowed on archive zone: bucket:" << entry << " ... proceeding to rename" << dendl;
string tenant_name, bucket_name;
parse_bucket(entry, &tenant_name, &bucket_name);
RGWBucketEntryPoint be;
map<string, bufferlist> attrs;
- int ret = svc.bucket->read_bucket_entrypoint_info(ctx, entry, &be, &objv_tracker, &mtime, &attrs, y);
+ int ret = svc.bucket->read_bucket_entrypoint_info(ctx, entry, &be, &objv_tracker, &mtime, &attrs, y, dpp);
if (ret < 0) {
return ret;
}
ceph::real_time orig_mtime;
RGWBucketInfo old_bi;
- ret = ctl.bucket->read_bucket_instance_info(be.bucket, &old_bi, y, RGWBucketCtl::BucketInstance::GetParams()
+ ret = ctl.bucket->read_bucket_instance_info(be.bucket, &old_bi, y, dpp, RGWBucketCtl::BucketInstance::GetParams()
.set_mtime(&orig_mtime)
.set_attrs(&attrs_m));
if (ret < 0) {
new_be.bucket.name = new_bucket_name;
- ret = ctl.bucket->store_bucket_instance_info(be.bucket, new_bi, y, RGWBucketCtl::BucketInstance::PutParams()
+ ret = ctl.bucket->store_bucket_instance_info(be.bucket, new_bi, y, dpp, RGWBucketCtl::BucketInstance::PutParams()
.set_exclusive(false)
.set_mtime(orig_mtime)
.set_attrs(&attrs_m)
.set_orig_info(&old_bi));
if (ret < 0) {
- ldout(cct, 0) << "ERROR: failed to put new bucket instance info for bucket=" << new_bi.bucket << " ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to put new bucket instance info for bucket=" << new_bi.bucket << " ret=" << ret << dendl;
return ret;
}
ot.generate_new_write_ver(cct);
ret = svc.bucket->store_bucket_entrypoint_info(ctx, RGWSI_Bucket::get_entrypoint_meta_key(new_be.bucket),
- new_be, true, mtime, &attrs, nullptr, y);
+ new_be, true, mtime, &attrs, nullptr, y, dpp);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: failed to put new bucket entrypoint for bucket=" << new_be.bucket << " ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to put new bucket entrypoint for bucket=" << new_be.bucket << " ret=" << ret << dendl;
return ret;
}
/* link new bucket */
- ret = ctl.bucket->link_bucket(new_be.owner, new_be.bucket, new_be.creation_time, y, false);
+ ret = ctl.bucket->link_bucket(new_be.owner, new_be.bucket, new_be.creation_time, y, dpp, false);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: failed to link new bucket for bucket=" << new_be.bucket << " ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to link new bucket for bucket=" << new_be.bucket << " ret=" << ret << dendl;
return ret;
}
/* clean up old stuff */
- ret = ctl.bucket->unlink_bucket(be.owner, entry_bucket, y, false);
+ ret = ctl.bucket->unlink_bucket(be.owner, entry_bucket, y, dpp, false);
if (ret < 0) {
- lderr(cct) << "could not unlink bucket=" << entry << " owner=" << be.owner << dendl;
+ ldpp_dout(dpp, -1) << "could not unlink bucket=" << entry << " owner=" << be.owner << dendl;
}
// if (ret == -ECANCELED) it means that there was a race here, and someone
ret = svc.bucket->remove_bucket_entrypoint_info(ctx,
RGWSI_Bucket::get_entrypoint_meta_key(be.bucket),
&objv_tracker,
- y);
+ y,
+ dpp);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: failed to put new bucket entrypoint for bucket=" << new_be.bucket << " ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to put new bucket entrypoint for bucket=" << new_be.bucket << " ret=" << ret << dendl;
return ret;
}
- ret = ctl.bucket->remove_bucket_instance_info(be.bucket, old_bi, y);
+ ret = ctl.bucket->remove_bucket_instance_info(be.bucket, old_bi, y, dpp);
if (ret < 0) {
- lderr(cct) << "could not delete bucket=" << entry << dendl;
+ ldpp_dout(dpp, -1) << "could not delete bucket=" << entry << dendl;
}
int do_put(RGWSI_MetaBackend_Handler::Op *op, string& entry,
RGWMetadataObject *obj,
RGWObjVersionTracker& objv_tracker,
- optional_yield y,
+ optional_yield y, const DoutPrefixProvider *dpp,
RGWMDLogSyncType type, bool from_remote_zone) override {
if (entry.find("-deleted-") != string::npos) {
RGWObjVersionTracker ot;
RGWMetadataObject *robj;
- int ret = do_get(op, entry, &robj, y);
+ int ret = do_get(op, entry, &robj, y, dpp);
if (ret != -ENOENT) {
if (ret < 0) {
return ret;
ot.read_version = robj->get_version();
delete robj;
- ret = do_remove(op, entry, ot, y);
+ ret = do_remove(op, entry, ot, y, dpp);
if (ret < 0) {
return ret;
}
}
return RGWBucketMetadataHandler::do_put(op, entry, obj,
- objv_tracker, y, type, from_remote_zone);
+ objv_tracker, y, dpp, type, from_remote_zone);
}
};
const string& entry,
RGWBucketCompleteInfo *bi,
ceph::real_time *pmtime,
- optional_yield y) {
+ optional_yield y,
+ const DoutPrefixProvider *dpp) {
return svc.bucket->read_bucket_instance_info(ctx,
entry,
&bi->info,
pmtime, &bi->attrs,
- y);
+ y,
+ dpp);
}
public:
return new RGWBucketInstanceMetadataObject(bci, objv, mtime);
}
- int do_get(RGWSI_MetaBackend_Handler::Op *op, string& entry, RGWMetadataObject **obj, optional_yield y) override {
+ int do_get(RGWSI_MetaBackend_Handler::Op *op, string& entry, RGWMetadataObject **obj, optional_yield y, const DoutPrefixProvider *dpp) override {
RGWBucketCompleteInfo bci;
real_time mtime;
RGWSI_Bucket_BI_Ctx ctx(op->ctx());
- int ret = svc.bucket->read_bucket_instance_info(ctx, entry, &bci.info, &mtime, &bci.attrs, y);
+ int ret = svc.bucket->read_bucket_instance_info(ctx, entry, &bci.info, &mtime, &bci.attrs, y, dpp);
if (ret < 0)
return ret;
int do_put(RGWSI_MetaBackend_Handler::Op *op, string& entry,
RGWMetadataObject *_obj, RGWObjVersionTracker& objv_tracker,
- optional_yield y,
+ optional_yield y, const DoutPrefixProvider *dpp,
RGWMDLogSyncType sync_type, bool from_remote_zone) override;
int do_remove(RGWSI_MetaBackend_Handler::Op *op, string& entry, RGWObjVersionTracker& objv_tracker,
- optional_yield y) override {
+ optional_yield y, const DoutPrefixProvider *dpp) override {
RGWBucketCompleteInfo bci;
RGWSI_Bucket_BI_Ctx ctx(op->ctx());
- int ret = read_bucket_instance_entry(ctx, entry, &bci, nullptr, y);
+ int ret = read_bucket_instance_entry(ctx, entry, &bci, nullptr, y, dpp);
if (ret < 0 && ret != -ENOENT)
return ret;
- return svc.bucket->remove_bucket_instance_info(ctx, entry, bci.info, &bci.info.objv_tracker, y);
+ return svc.bucket->remove_bucket_instance_info(ctx, entry, bci.info, &bci.info.objv_tracker, y, dpp);
}
int call(std::function<int(RGWSI_Bucket_BI_Ctx& ctx)> f) {
obj->get_bucket_info().encode(*bl);
}
- int put_check() override;
- int put_checked() override;
- int put_post() override;
+ int put_check(const DoutPrefixProvider *dpp) override;
+ int put_checked(const DoutPrefixProvider *dpp) override;
+ int put_post(const DoutPrefixProvider *dpp) override;
};
int RGWBucketInstanceMetadataHandler::do_put(RGWSI_MetaBackend_Handler::Op *op,
RGWMetadataObject *obj,
RGWObjVersionTracker& objv_tracker,
optional_yield y,
+ const DoutPrefixProvider *dpp,
RGWMDLogSyncType type, bool from_remote_zone)
{
RGWMetadataHandlerPut_BucketInstance put_op(svc.bucket->ctx(), this, op, entry, obj,
objv_tracker, y, type, from_remote_zone);
- return do_put_operate(&put_op);
+ return do_put_operate(&put_op, dpp);
}
void init_default_bucket_layout(CephContext *cct, rgw::BucketLayout& layout,
}
}
-int RGWMetadataHandlerPut_BucketInstance::put_check()
+int RGWMetadataHandlerPut_BucketInstance::put_check(const DoutPrefixProvider *dpp)
{
int ret;
bci.info.bucket.tenant = tenant_name;
// if the sync module never writes data, don't require the zone to specify all placement targets
if (bihandler->svc.zone->sync_module_supports_writes()) {
- ret = bihandler->svc.zone->select_bucket_location_by_rule(bci.info.placement_rule, &rule_info, y);
+ ret = bihandler->svc.zone->select_bucket_location_by_rule(dpp, bci.info.placement_rule, &rule_info, y);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: select_bucket_placement() returned " << ret << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: select_bucket_placement() returned " << ret << dendl;
return ret;
}
}
return 0;
}
-int RGWMetadataHandlerPut_BucketInstance::put_checked()
+int RGWMetadataHandlerPut_BucketInstance::put_checked(const DoutPrefixProvider *dpp)
{
RGWBucketInstanceMetadataObject *orig_obj = static_cast<RGWBucketInstanceMetadataObject *>(old_obj);
false,
mtime,
pattrs,
- y);
+ y,
+ dpp);
}
-int RGWMetadataHandlerPut_BucketInstance::put_post()
+int RGWMetadataHandlerPut_BucketInstance::put_post(const DoutPrefixProvider *dpp)
{
RGWBucketCompleteInfo& bci = obj->get_bci();
objv_tracker = bci.info.objv_tracker;
- int ret = bihandler->svc.bi->init_index(bci.info);
+ int ret = bihandler->svc.bi->init_index(dpp, bci.info);
if (ret < 0) {
return ret;
}
public:
RGWArchiveBucketInstanceMetadataHandler() {}
- int do_remove(RGWSI_MetaBackend_Handler::Op *op, string& entry, RGWObjVersionTracker& objv_tracker, optional_yield y) override {
- ldout(cct, 0) << "SKIP: bucket instance removal is not allowed on archive zone: bucket.instance:" << entry << dendl;
+ int do_remove(RGWSI_MetaBackend_Handler::Op *op, string& entry, RGWObjVersionTracker& objv_tracker, optional_yield y, const DoutPrefixProvider *dpp) override {
+ ldpp_dout(dpp, 0) << "SKIP: bucket instance removal is not allowed on archive zone: bucket.instance:" << entry << dendl;
return 0;
}
};
void RGWBucketCtl::init(RGWUserCtl *user_ctl,
RGWBucketMetadataHandler *_bm_handler,
RGWBucketInstanceMetadataHandler *_bmi_handler,
- RGWDataChangesLog *datalog)
+ RGWDataChangesLog *datalog,
+ const DoutPrefixProvider *dpp)
{
ctl.user = user_ctl;
bi_be_handler = bmi_handler->get_be_handler();
datalog->set_bucket_filter(
- [this](const rgw_bucket& bucket, optional_yield y) {
- return bucket_exports_data(bucket, y);
+ [this](const rgw_bucket& bucket, optional_yield y, const DoutPrefixProvider *dpp) {
+ return bucket_exports_data(bucket, y, dpp);
});
}
int RGWBucketCtl::read_bucket_entrypoint_info(const rgw_bucket& bucket,
RGWBucketEntryPoint *info,
- optional_yield y,
+ optional_yield y, const DoutPrefixProvider *dpp,
const Bucket::GetParams& params)
{
return bm_handler->call(params.bectx_params, [&](RGWSI_Bucket_EP_Ctx& ctx) {
params.mtime,
params.attrs,
y,
+ dpp,
params.cache_info,
params.refresh_version);
});
int RGWBucketCtl::store_bucket_entrypoint_info(const rgw_bucket& bucket,
RGWBucketEntryPoint& info,
optional_yield y,
+ const DoutPrefixProvider *dpp,
const Bucket::PutParams& params)
{
return bm_handler->call([&](RGWSI_Bucket_EP_Ctx& ctx) {
params.mtime,
params.attrs,
params.objv_tracker,
- y);
+ y,
+ dpp);
});
}
int RGWBucketCtl::remove_bucket_entrypoint_info(const rgw_bucket& bucket,
optional_yield y,
+ const DoutPrefixProvider *dpp,
const Bucket::RemoveParams& params)
{
return bm_handler->call([&](RGWSI_Bucket_EP_Ctx& ctx) {
return svc.bucket->remove_bucket_entrypoint_info(ctx,
RGWSI_Bucket::get_entrypoint_meta_key(bucket),
params.objv_tracker,
- y);
+ y,
+ dpp);
});
}
int RGWBucketCtl::read_bucket_instance_info(const rgw_bucket& bucket,
RGWBucketInfo *info,
optional_yield y,
+ const DoutPrefixProvider *dpp,
const BucketInstance::GetParams& params)
{
int ret = bmi_handler->call(params.bectx_params, [&](RGWSI_Bucket_BI_Ctx& ctx) {
params.mtime,
params.attrs,
y,
+ dpp,
params.cache_info,
params.refresh_version);
});
int RGWBucketCtl::read_bucket_info(const rgw_bucket& bucket,
RGWBucketInfo *info,
optional_yield y,
+ const DoutPrefixProvider *dpp,
const BucketInstance::GetParams& params,
RGWObjVersionTracker *ep_objv_tracker)
{
if (b->bucket_id.empty()) {
ep.emplace();
- int r = read_bucket_entrypoint_info(*b, &(*ep), y, RGWBucketCtl::Bucket::GetParams()
+ int r = read_bucket_entrypoint_info(*b, &(*ep), y, dpp, RGWBucketCtl::Bucket::GetParams()
.set_bectx_params(params.bectx_params)
.set_objv_tracker(ep_objv_tracker));
if (r < 0) {
info,
params.mtime,
params.attrs,
- y,
+ y, dpp,
params.cache_info,
params.refresh_version);
});
const rgw_bucket& bucket,
RGWBucketInfo& info,
optional_yield y,
+ const DoutPrefixProvider *dpp,
const BucketInstance::PutParams& params)
{
if (params.objv_tracker) {
params.exclusive,
params.mtime,
params.attrs,
- y);
+ y,
+ dpp);
}
int RGWBucketCtl::store_bucket_instance_info(const rgw_bucket& bucket,
RGWBucketInfo& info,
optional_yield y,
+ const DoutPrefixProvider *dpp,
const BucketInstance::PutParams& params)
{
return bmi_handler->call([&](RGWSI_Bucket_BI_Ctx& ctx) {
- return do_store_bucket_instance_info(ctx, bucket, info, y, params);
+ return do_store_bucket_instance_info(ctx, bucket, info, y, dpp, params);
});
}
int RGWBucketCtl::remove_bucket_instance_info(const rgw_bucket& bucket,
RGWBucketInfo& info,
optional_yield y,
+ const DoutPrefixProvider *dpp,
const BucketInstance::RemoveParams& params)
{
if (params.objv_tracker) {
RGWSI_Bucket::get_bi_meta_key(bucket),
info,
&info.objv_tracker,
- y);
+ y,
+ dpp);
});
}
obj_version *pep_objv,
map<string, bufferlist> *pattrs,
bool create_entry_point,
- optional_yield y)
+ optional_yield y, const DoutPrefixProvider *dpp)
{
bool create_head = !info.has_instance_obj || create_entry_point;
orig_info,
exclusive,
mtime, pattrs,
- y);
+ y, dpp);
if (ret < 0) {
return ret;
}
mtime,
pattrs,
&ot,
- y);
+ y,
+ dpp);
if (ret < 0)
return ret;
}
int RGWBucketCtl::convert_old_bucket_info(RGWSI_Bucket_X_Ctx& ctx,
const rgw_bucket& bucket,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
RGWBucketEntryPoint entry_point;
real_time ep_mtime;
RGWBucketInfo info;
auto cct = svc.bucket->ctx();
- ldout(cct, 10) << "RGWRados::convert_old_bucket_info(): bucket=" << bucket << dendl;
+ ldpp_dout(dpp, 10) << "RGWRados::convert_old_bucket_info(): bucket=" << bucket << dendl;
int ret = svc.bucket->read_bucket_entrypoint_info(ctx.ep,
RGWSI_Bucket::get_entrypoint_meta_key(bucket),
- &entry_point, &ot, &ep_mtime, &attrs, y);
+ &entry_point, &ot, &ep_mtime, &attrs, y, dpp);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: get_bucket_entrypoint_info() returned " << ret << " bucket=" << bucket << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: get_bucket_entrypoint_info() returned " << ret << " bucket=" << bucket << dendl;
return ret;
}
ot.generate_new_write_ver(cct);
- ret = do_store_linked_bucket_info(ctx, info, nullptr, false, ep_mtime, &ot.write_version, &attrs, true, y);
+ ret = do_store_linked_bucket_info(ctx, info, nullptr, false, ep_mtime, &ot.write_version, &attrs, true, y, dpp);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: failed to put_linked_bucket_info(): " << ret << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to put_linked_bucket_info(): " << ret << dendl;
return ret;
}
int RGWBucketCtl::set_bucket_instance_attrs(RGWBucketInfo& bucket_info,
map<string, bufferlist>& attrs,
RGWObjVersionTracker *objv_tracker,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
return call([&](RGWSI_Bucket_X_Ctx& ctx) {
rgw_bucket& bucket = bucket_info.bucket;
if (!bucket_info.has_instance_obj) {
/* an old bucket object, need to convert it */
- int ret = convert_old_bucket_info(ctx, bucket, y);
+ int ret = convert_old_bucket_info(ctx, bucket, y, dpp);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: failed converting old bucket info: " << ret << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed converting old bucket info: " << ret << dendl;
return ret;
}
}
bucket,
bucket_info,
y,
+ dpp,
BucketInstance::PutParams().set_attrs(&attrs)
.set_objv_tracker(objv_tracker)
.set_orig_info(&bucket_info));
const rgw_bucket& bucket,
ceph::real_time creation_time,
optional_yield y,
+ const DoutPrefixProvider *dpp,
bool update_entrypoint,
rgw_ep_info *pinfo)
{
return bm_handler->call([&](RGWSI_Bucket_EP_Ctx& ctx) {
return do_link_bucket(ctx, user_id, bucket, creation_time,
- update_entrypoint, pinfo, y);
+ update_entrypoint, pinfo, y, dpp);
});
}
ceph::real_time creation_time,
bool update_entrypoint,
rgw_ep_info *pinfo,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
int ret;
meta_key,
&ep, &rot,
nullptr, &attrs,
- y);
+ y, dpp);
if (ret < 0 && ret != -ENOENT) {
- ldout(cct, 0) << "ERROR: store->get_bucket_entrypoint_info() returned: "
+ ldpp_dout(dpp, 0) << "ERROR: store->get_bucket_entrypoint_info() returned: "
<< cpp_strerror(-ret) << dendl;
}
pattrs = &attrs;
}
}
- ret = ctl.user->add_bucket(user_id, bucket, creation_time, y);
+ ret = ctl.user->add_bucket(dpp, user_id, bucket, creation_time, y);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: error adding bucket to user directory:"
+ ldpp_dout(dpp, 0) << "ERROR: error adding bucket to user directory:"
<< " user=" << user_id
<< " bucket=" << bucket
<< " err=" << cpp_strerror(-ret)
ep.owner = user_id;
ep.bucket = bucket;
ret = svc.bucket->store_bucket_entrypoint_info(
- ctx, meta_key, ep, false, real_time(), pattrs, &rot, y);
+ ctx, meta_key, ep, false, real_time(), pattrs, &rot, y, dpp);
if (ret < 0)
goto done_err;
return 0;
done_err:
- int r = do_unlink_bucket(ctx, user_id, bucket, true, y);
+ int r = do_unlink_bucket(ctx, user_id, bucket, true, y, dpp);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed unlinking bucket on error cleanup: "
+ ldpp_dout(dpp, 0) << "ERROR: failed unlinking bucket on error cleanup: "
<< cpp_strerror(-r) << dendl;
}
return ret;
}
-int RGWBucketCtl::unlink_bucket(const rgw_user& user_id, const rgw_bucket& bucket, optional_yield y, bool update_entrypoint)
+int RGWBucketCtl::unlink_bucket(const rgw_user& user_id, const rgw_bucket& bucket, optional_yield y, const DoutPrefixProvider *dpp, bool update_entrypoint)
{
return bm_handler->call([&](RGWSI_Bucket_EP_Ctx& ctx) {
- return do_unlink_bucket(ctx, user_id, bucket, update_entrypoint, y);
+ return do_unlink_bucket(ctx, user_id, bucket, update_entrypoint, y, dpp);
});
}
const rgw_user& user_id,
const rgw_bucket& bucket,
bool update_entrypoint,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
- int ret = ctl.user->remove_bucket(user_id, bucket, y);
+ int ret = ctl.user->remove_bucket(dpp, user_id, bucket, y);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: error removing bucket from directory: "
+ ldpp_dout(dpp, 0) << "ERROR: error removing bucket from directory: "
<< cpp_strerror(-ret)<< dendl;
}
RGWObjVersionTracker ot;
map<string, bufferlist> attrs;
string meta_key = RGWSI_Bucket::get_entrypoint_meta_key(bucket);
- ret = svc.bucket->read_bucket_entrypoint_info(ctx, meta_key, &ep, &ot, nullptr, &attrs, y);
+ ret = svc.bucket->read_bucket_entrypoint_info(ctx, meta_key, &ep, &ot, nullptr, &attrs, y, dpp);
if (ret == -ENOENT)
return 0;
if (ret < 0)
return 0;
if (ep.owner != user_id) {
- ldout(cct, 0) << "bucket entry point user mismatch, can't unlink bucket: " << ep.owner << " != " << user_id << dendl;
+ ldpp_dout(dpp, 0) << "bucket entry point user mismatch, can't unlink bucket: " << ep.owner << " != " << user_id << dendl;
return -EINVAL;
}
ep.linked = false;
- return svc.bucket->store_bucket_entrypoint_info(ctx, meta_key, ep, false, real_time(), &attrs, &ot, y);
+ return svc.bucket->store_bucket_entrypoint_info(ctx, meta_key, ep, false, real_time(), &attrs, &ot, y, dpp);
}
int RGWBucketCtl::set_acl(ACLOwner& owner, rgw_bucket& bucket,
RGWBucketInfo& bucket_info, bufferlist& bl,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
// set owner and acl
bucket_info.owner = owner.get_id();
std::map<std::string, bufferlist> attrs{{RGW_ATTR_ACL, bl}};
- int r = store_bucket_instance_info(bucket, bucket_info, y,
+ int r = store_bucket_instance_info(bucket, bucket_info, y, dpp,
BucketInstance::PutParams().set_attrs(&attrs));
if (r < 0) {
cerr << "ERROR: failed to set bucket owner: " << cpp_strerror(-r) << std::endl;
// TODO: remove RGWRados dependency for bucket listing
int RGWBucketCtl::chown(rgw::sal::RGWRadosStore *store, RGWBucketInfo& bucket_info,
const rgw_user& user_id, const std::string& display_name,
- const std::string& marker, optional_yield y)
+ const std::string& marker, optional_yield y, const DoutPrefixProvider *dpp)
{
RGWObjectCtx obj_ctx(store);
std::vector<rgw_bucket_dir_entry> objs;
do {
objs.clear();
- int ret = list_op.list_objects(max_entries, &objs, &common_prefixes, &is_truncated, y);
+ int ret = list_op.list_objects(dpp, max_entries, &objs, &common_prefixes, &is_truncated, y);
if (ret < 0) {
- ldout(store->ctx(), 0) << "ERROR: list objects failed: " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: list objects failed: " << cpp_strerror(-ret) << dendl;
return ret;
}
map<string, bufferlist> attrs;
read_op.params.attrs = &attrs;
- ret = read_op.prepare(y);
+ ret = read_op.prepare(y, dpp);
if (ret < 0){
- ldout(store->ctx(), 0) << "ERROR: failed to read object " << obj.key.name << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to read object " << obj.key.name << cpp_strerror(-ret) << dendl;
continue;
}
const auto& aiter = attrs.find(RGW_ATTR_ACL);
if (aiter == attrs.end()) {
- ldout(store->ctx(), 0) << "ERROR: no acls found for object " << obj.key.name << " .Continuing with next object." << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: no acls found for object " << obj.key.name << " .Continuing with next object." << dendl;
continue;
} else {
bufferlist& bl = aiter->second;
decode(policy, bl);
owner = policy.get_owner();
} catch (buffer::error& err) {
- ldout(store->ctx(), 0) << "ERROR: decode policy failed" << err.what()
+ ldpp_dout(dpp, 0) << "ERROR: decode policy failed" << err.what()
<< dendl;
return -EIO;
}
encode(policy, bl);
obj_ctx.set_atomic(r_obj);
- ret = store->getRados()->set_attr(&obj_ctx, bucket_info, r_obj, RGW_ATTR_ACL, bl);
+ ret = store->getRados()->set_attr(dpp, &obj_ctx, bucket_info, r_obj, RGW_ATTR_ACL, bl);
if (ret < 0) {
- ldout(store->ctx(), 0) << "ERROR: modify attr failed " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: modify attr failed " << cpp_strerror(-ret) << dendl;
return ret;
}
}
int RGWBucketCtl::read_bucket_stats(const rgw_bucket& bucket,
RGWBucketEnt *result,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
return call([&](RGWSI_Bucket_X_Ctx& ctx) {
- return svc.bucket->read_bucket_stats(ctx, bucket, result, y);
+ return svc.bucket->read_bucket_stats(ctx, bucket, result, y, dpp);
});
}
int RGWBucketCtl::read_buckets_stats(map<string, RGWBucketEnt>& m,
- optional_yield y)
+ optional_yield y, const DoutPrefixProvider *dpp)
{
return call([&](RGWSI_Bucket_X_Ctx& ctx) {
- return svc.bucket->read_buckets_stats(ctx, m, y);
+ return svc.bucket->read_buckets_stats(ctx, m, y, dpp);
});
}
-int RGWBucketCtl::sync_user_stats(const rgw_user& user_id,
+int RGWBucketCtl::sync_user_stats(const DoutPrefixProvider *dpp,
+ const rgw_user& user_id,
const RGWBucketInfo& bucket_info,
optional_yield y,
RGWBucketEnt* pent)
if (!pent) {
pent = &ent;
}
- int r = svc.bi->read_stats(bucket_info, pent, null_yield);
+ int r = svc.bi->read_stats(dpp, bucket_info, pent, null_yield);
if (r < 0) {
- ldout(cct, 20) << __func__ << "(): failed to read bucket stats (r=" << r << ")" << dendl;
+ ldpp_dout(dpp, 20) << __func__ << "(): failed to read bucket stats (r=" << r << ")" << dendl;
return r;
}
- return ctl.user->flush_bucket_stats(user_id, *pent, y);
+ return ctl.user->flush_bucket_stats(dpp, user_id, *pent, y);
}
int RGWBucketCtl::get_sync_policy_handler(std::optional<rgw_zone_id> zone,
std::optional<rgw_bucket> bucket,
RGWBucketSyncPolicyHandlerRef *phandler,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
int r = call([&](RGWSI_Bucket_X_Ctx& ctx) {
- return svc.bucket_sync->get_policy_handler(ctx, zone, bucket, phandler, y);
+ return svc.bucket_sync->get_policy_handler(ctx, zone, bucket, phandler, y, dpp);
});
if (r < 0) {
- ldout(cct, 20) << __func__ << "(): failed to get policy handler for bucket=" << bucket << " (r=" << r << ")" << dendl;
+ ldpp_dout(dpp, 20) << __func__ << "(): failed to get policy handler for bucket=" << bucket << " (r=" << r << ")" << dendl;
return r;
}
return 0;
}
int RGWBucketCtl::bucket_exports_data(const rgw_bucket& bucket,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
RGWBucketSyncPolicyHandlerRef handler;
- int r = get_sync_policy_handler(std::nullopt, bucket, &handler, y);
+ int r = get_sync_policy_handler(std::nullopt, bucket, &handler, y, dpp);
if (r < 0) {
return r;
}
}
int RGWBucketCtl::bucket_imports_data(const rgw_bucket& bucket,
- optional_yield y)
+ optional_yield y, const DoutPrefixProvider *dpp)
{
RGWBucketSyncPolicyHandlerRef handler;
- int r = get_sync_policy_handler(std::nullopt, bucket, &handler, y);
+ int r = get_sync_policy_handler(std::nullopt, bucket, &handler, y, dpp);
if (r < 0) {
return r;
}
* Get all the buckets owned by a user and fill up an RGWUserBuckets with them.
* Returns: 0 on success, -ERR# on failure.
*/
-extern int rgw_read_user_buckets(rgw::sal::RGWRadosStore *store,
+extern int rgw_read_user_buckets(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store,
const rgw_user& user_id,
rgw::sal::RGWBucketList& buckets,
const string& marker,
bool need_stats,
optional_yield y);
-extern int rgw_remove_object(rgw::sal::RGWRadosStore *store, const RGWBucketInfo& bucket_info, const rgw_bucket& bucket, rgw_obj_key& key);
+extern int rgw_remove_object(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *store, const RGWBucketInfo& bucket_info, const rgw_bucket& bucket, rgw_obj_key& key);
extern int rgw_remove_bucket_bypass_gc(rgw::sal::RGWRadosStore *store, rgw_bucket& bucket, int concurrent_max, optional_yield y);
extern int rgw_object_get_attr(rgw::sal::RGWRadosStore* store, const RGWBucketInfo& bucket_info,
const rgw_obj& obj, const char* attr_name,
bufferlist& out_bl, optional_yield y);
-extern void check_bad_user_bucket_mapping(rgw::sal::RGWRadosStore *store, const rgw_user& user_id, bool fix, optional_yield y);
+extern void check_bad_user_bucket_mapping(rgw::sal::RGWRadosStore *store, const rgw_user& user_id, bool fix, optional_yield y, const DoutPrefixProvider *dpp);
struct RGWBucketAdminOpState {
rgw_user uid;
public:
RGWBucket() : store(NULL), handle(NULL), failure(false) {}
int init(rgw::sal::RGWRadosStore *storage, RGWBucketAdminOpState& op_state, optional_yield y,
- std::string *err_msg = NULL, map<string, bufferlist> *pattrs = NULL);
+ const DoutPrefixProvider *dpp, std::string *err_msg = NULL, map<string, bufferlist> *pattrs = NULL);
int check_bad_index_multipart(RGWBucketAdminOpState& op_state,
- RGWFormatterFlusher& flusher, std::string *err_msg = NULL);
+ RGWFormatterFlusher& flusher,
+ const DoutPrefixProvider *dpp, std::string *err_msg = NULL);
- int check_object_index(RGWBucketAdminOpState& op_state,
+ int check_object_index(const DoutPrefixProvider *dpp,
+ RGWBucketAdminOpState& op_state,
RGWFormatterFlusher& flusher,
optional_yield y,
std::string *err_msg = NULL);
- int check_index(RGWBucketAdminOpState& op_state,
+ int check_index(const DoutPrefixProvider *dpp,
+ RGWBucketAdminOpState& op_state,
map<RGWObjCategory, RGWStorageStats>& existing_stats,
map<RGWObjCategory, RGWStorageStats>& calculated_stats,
std::string *err_msg = NULL);
- int link(RGWBucketAdminOpState& op_state, optional_yield y,
+ int link(RGWBucketAdminOpState& op_state, optional_yield y, const DoutPrefixProvider *dpp,
map<string, bufferlist>& attrs, std::string *err_msg = NULL);
int chown(RGWBucketAdminOpState& op_state, const string& marker,
- optional_yield y, std::string *err_msg = NULL);
- int unlink(RGWBucketAdminOpState& op_state, optional_yield y, std::string *err_msg = NULL);
- int set_quota(RGWBucketAdminOpState& op_state, std::string *err_msg = NULL);
+ optional_yield y, const DoutPrefixProvider *dpp, std::string *err_msg = NULL);
+ int unlink(RGWBucketAdminOpState& op_state, optional_yield y, const DoutPrefixProvider *dpp, std::string *err_msg = NULL);
+ int set_quota(RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp, std::string *err_msg = NULL);
- int remove_object(RGWBucketAdminOpState& op_state, std::string *err_msg = NULL);
+ int remove_object(const DoutPrefixProvider *dpp, RGWBucketAdminOpState& op_state, std::string *err_msg = NULL);
int policy_bl_to_stream(bufferlist& bl, ostream& o);
- int get_policy(RGWBucketAdminOpState& op_state, RGWAccessControlPolicy& policy, optional_yield y);
- int sync(RGWBucketAdminOpState& op_state, map<string, bufferlist> *attrs, std::string *err_msg = NULL);
+ int get_policy(RGWBucketAdminOpState& op_state, RGWAccessControlPolicy& policy, optional_yield y, const DoutPrefixProvider *dpp);
+ int sync(RGWBucketAdminOpState& op_state, map<string, bufferlist> *attrs, const DoutPrefixProvider *dpp, std::string *err_msg = NULL);
void clear_failure() { failure = false; }
{
public:
static int get_policy(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state,
- RGWFormatterFlusher& flusher);
+ RGWFormatterFlusher& flusher, const DoutPrefixProvider *dpp);
static int get_policy(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state,
- RGWAccessControlPolicy& policy);
+ RGWAccessControlPolicy& policy, const DoutPrefixProvider *dpp);
static int dump_s3_policy(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state,
- ostream& os);
+ ostream& os, const DoutPrefixProvider *dpp);
- static int unlink(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state);
- static int link(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state, string *err_msg = NULL);
- static int chown(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state, const string& marker, string *err_msg = NULL);
+ static int unlink(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp);
+ static int link(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp, string *err_msg = NULL);
+ static int chown(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state, const string& marker, const DoutPrefixProvider *dpp, string *err_msg = NULL);
static int check_index(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state,
- RGWFormatterFlusher& flusher, optional_yield y);
+ RGWFormatterFlusher& flusher, optional_yield y, const DoutPrefixProvider *dpp);
- static int remove_bucket(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state, optional_yield y, bool bypass_gc = false, bool keep_index_consistent = true);
- static int remove_object(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state);
- static int info(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y);
+ static int remove_bucket(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state, optional_yield y,
+ const DoutPrefixProvider *dpp, bool bypass_gc = false, bool keep_index_consistent = true);
+ static int remove_object(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp);
+ static int info(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y, const DoutPrefixProvider *dpp);
static int limit_check(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state,
const std::list<std::string>& user_ids,
RGWFormatterFlusher& flusher, optional_yield y,
+ const DoutPrefixProvider *dpp,
bool warnings_only = false);
- static int set_quota(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state);
+ static int set_quota(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp);
static int list_stale_instances(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state,
- RGWFormatterFlusher& flusher);
+ RGWFormatterFlusher& flusher, const DoutPrefixProvider *dpp);
static int clear_stale_instances(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state,
- RGWFormatterFlusher& flusher);
+ RGWFormatterFlusher& flusher, const DoutPrefixProvider *dpp);
static int fix_lc_shards(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state,
- RGWFormatterFlusher& flusher);
+ RGWFormatterFlusher& flusher, const DoutPrefixProvider *dpp);
static int fix_obj_expiry(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state,
- RGWFormatterFlusher& flusher, bool dry_run = false);
+ RGWFormatterFlusher& flusher, const DoutPrefixProvider *dpp, bool dry_run = false);
- static int sync_bucket(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state, string *err_msg = NULL);
+ static int sync_bucket(rgw::sal::RGWRadosStore *store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp, string *err_msg = NULL);
};
struct rgw_ep_info {
void init(RGWUserCtl *user_ctl,
RGWBucketMetadataHandler *_bm_handler,
RGWBucketInstanceMetadataHandler *_bmi_handler,
- RGWDataChangesLog *datalog);
+ RGWDataChangesLog *datalog,
+ const DoutPrefixProvider *dpp);
struct Bucket {
struct GetParams {
int read_bucket_entrypoint_info(const rgw_bucket& bucket,
RGWBucketEntryPoint *info,
optional_yield y,
+ const DoutPrefixProvider *dpp,
const Bucket::GetParams& params = {});
int store_bucket_entrypoint_info(const rgw_bucket& bucket,
RGWBucketEntryPoint& info,
optional_yield y,
+ const DoutPrefixProvider *dpp,
const Bucket::PutParams& params = {});
int remove_bucket_entrypoint_info(const rgw_bucket& bucket,
optional_yield y,
+ const DoutPrefixProvider *dpp,
const Bucket::RemoveParams& params = {});
/* bucket instance */
int read_bucket_instance_info(const rgw_bucket& bucket,
RGWBucketInfo *info,
optional_yield y,
+ const DoutPrefixProvider *dpp,
const BucketInstance::GetParams& params = {});
int store_bucket_instance_info(const rgw_bucket& bucket,
RGWBucketInfo& info,
optional_yield y,
+ const DoutPrefixProvider *dpp,
const BucketInstance::PutParams& params = {});
int remove_bucket_instance_info(const rgw_bucket& bucket,
RGWBucketInfo& info,
optional_yield y,
+ const DoutPrefixProvider *dpp,
const BucketInstance::RemoveParams& params = {});
/*
int read_bucket_info(const rgw_bucket& bucket,
RGWBucketInfo *info,
optional_yield y,
+ const DoutPrefixProvider *dpp,
const BucketInstance::GetParams& params = {},
RGWObjVersionTracker *ep_objv_tracker = nullptr);
int set_bucket_instance_attrs(RGWBucketInfo& bucket_info,
map<string, bufferlist>& attrs,
RGWObjVersionTracker *objv_tracker,
- optional_yield y);
+ optional_yield y,
+ const DoutPrefixProvider *dpp);
/* user/bucket */
int link_bucket(const rgw_user& user_id,
const rgw_bucket& bucket,
ceph::real_time creation_time,
optional_yield y,
+ const DoutPrefixProvider *dpp,
bool update_entrypoint = true,
rgw_ep_info *pinfo = nullptr);
int unlink_bucket(const rgw_user& user_id,
const rgw_bucket& bucket,
optional_yield y,
+ const DoutPrefixProvider *dpp,
bool update_entrypoint = true);
int chown(rgw::sal::RGWRadosStore *store, RGWBucketInfo& bucket_info,
const rgw_user& user_id, const std::string& display_name,
- const std::string& marker, optional_yield y);
+ const std::string& marker, optional_yield y, const DoutPrefixProvider *dpp);
int set_acl(ACLOwner& owner, rgw_bucket& bucket,
- RGWBucketInfo& bucket_info, bufferlist& bl, optional_yield y);
+ RGWBucketInfo& bucket_info, bufferlist& bl, optional_yield y,
+ const DoutPrefixProvider *dpp);
int read_buckets_stats(map<string, RGWBucketEnt>& m,
- optional_yield y);
+ optional_yield y,
+ const DoutPrefixProvider *dpp);
int read_bucket_stats(const rgw_bucket& bucket,
RGWBucketEnt *result,
- optional_yield y);
+ optional_yield y,
+ const DoutPrefixProvider *dpp);
/* quota related */
- int sync_user_stats(const rgw_user& user_id, const RGWBucketInfo& bucket_info,
+ int sync_user_stats(const DoutPrefixProvider *dpp,
+ const rgw_user& user_id, const RGWBucketInfo& bucket_info,
optional_yield y,
RGWBucketEnt* pent = nullptr);
int get_sync_policy_handler(std::optional<rgw_zone_id> zone,
std::optional<rgw_bucket> bucket,
RGWBucketSyncPolicyHandlerRef *phandler,
- optional_yield y);
+ optional_yield y,
+ const DoutPrefixProvider *dpp);
int bucket_exports_data(const rgw_bucket& bucket,
- optional_yield y);
+ optional_yield y,
+ const DoutPrefixProvider *dpp);
int bucket_imports_data(const rgw_bucket& bucket,
- optional_yield y);
+ optional_yield y,
+ const DoutPrefixProvider *dpp);
private:
int convert_old_bucket_info(RGWSI_Bucket_X_Ctx& ctx,
const rgw_bucket& bucket,
- optional_yield y);
+ optional_yield y,
+ const DoutPrefixProvider *dpp);
int do_store_bucket_instance_info(RGWSI_Bucket_BI_Ctx& ctx,
const rgw_bucket& bucket,
RGWBucketInfo& info,
optional_yield y,
+ const DoutPrefixProvider *dpp,
const BucketInstance::PutParams& params);
int do_store_linked_bucket_info(RGWSI_Bucket_X_Ctx& ctx,
obj_version *pep_objv,
map<string, bufferlist> *pattrs,
bool create_entry_point,
- optional_yield);
+ optional_yield,
+ const DoutPrefixProvider *dpp);
int do_link_bucket(RGWSI_Bucket_EP_Ctx& ctx,
const rgw_user& user,
ceph::real_time creation_time,
bool update_entrypoint,
rgw_ep_info *pinfo,
- optional_yield y);
+ optional_yield y,
+ const DoutPrefixProvider *dpp);
int do_unlink_bucket(RGWSI_Bucket_EP_Ctx& ctx,
const rgw_user& user_id,
const rgw_bucket& bucket,
bool update_entrypoint,
- optional_yield y);
+ optional_yield y,
+ const DoutPrefixProvider *dpp);
};
-bool rgw_find_bucket_by_id(CephContext *cct, RGWMetadataManager *mgr, const string& marker,
+bool rgw_find_bucket_by_id(const DoutPrefixProvider *dpp, CephContext *cct, RGWMetadataManager *mgr, const string& marker,
const string& bucket_id, rgw_bucket* bucket_out);
#endif
return new RGWBucketSyncPolicyHandler(this, bucket, sync_policy);
}
-int RGWBucketSyncPolicyHandler::init(optional_yield y)
+int RGWBucketSyncPolicyHandler::init(const DoutPrefixProvider *dpp, optional_yield y)
{
- int r = bucket_sync_svc->get_bucket_sync_hints(bucket.value_or(rgw_bucket()),
+ int r = bucket_sync_svc->get_bucket_sync_hints(dpp, bucket.value_or(rgw_bucket()),
&source_hints,
&target_hints,
y);
if (r < 0) {
- ldout(bucket_sync_svc->ctx(), 0) << "ERROR: failed to initialize bucket sync policy handler: get_bucket_sync_hints() on bucket="
+ ldpp_dout(dpp, 0) << "ERROR: failed to initialize bucket sync policy handler: get_bucket_sync_hints() on bucket="
<< bucket << " returned r=" << r << dendl;
return r;
}
RGWBucketSyncPolicyHandler *alloc_child(const rgw_bucket& bucket,
std::optional<rgw_sync_policy_info> sync_policy) const;
- int init(optional_yield y);
+ int init(const DoutPrefixProvider *dpp, optional_yield y);
void reflect(RGWBucketSyncFlowManager::pipe_set *psource_pipes,
RGWBucketSyncFlowManager::pipe_set *ptarget_pipes,
#define dout_subsys ceph_subsys_rgw
-int ObjectCache::get(const string& name, ObjectCacheInfo& info, uint32_t mask, rgw_cache_entry_info *cache_info)
+int ObjectCache::get(const DoutPrefixProvider *dpp, const string& name, ObjectCacheInfo& info, uint32_t mask, rgw_cache_entry_info *cache_info)
{
std::shared_lock rl{lock};
}
auto iter = cache_map.find(name);
if (iter == cache_map.end()) {
- ldout(cct, 10) << "cache get: name=" << name << " : miss" << dendl;
+ ldpp_dout(dpp, 10) << "cache get: name=" << name << " : miss" << dendl;
if (perfcounter) {
perfcounter->inc(l_rgw_cache_miss);
}
if (expiry.count() &&
(ceph::coarse_mono_clock::now() - iter->second.info.time_added) > expiry) {
- ldout(cct, 10) << "cache get: name=" << name << " : expiry miss" << dendl;
+ ldpp_dout(dpp, 10) << "cache get: name=" << name << " : expiry miss" << dendl;
rl.unlock();
std::unique_lock wl{lock}; // write lock for insertion
// check that wasn't already removed by other thread
ObjectCacheEntry *entry = &iter->second;
if (lru_counter - entry->lru_promotion_ts > lru_window) {
- ldout(cct, 20) << "cache get: touching lru, lru_counter=" << lru_counter
+ ldpp_dout(dpp, 20) << "cache get: touching lru, lru_counter=" << lru_counter
<< " promotion_ts=" << entry->lru_promotion_ts << dendl;
rl.unlock();
std::unique_lock wl{lock}; // write lock for insertion
/* need to redo this because entry might have dropped off the cache */
iter = cache_map.find(name);
if (iter == cache_map.end()) {
- ldout(cct, 10) << "lost race! cache get: name=" << name << " : miss" << dendl;
+ ldpp_dout(dpp, 10) << "lost race! cache get: name=" << name << " : miss" << dendl;
if(perfcounter) perfcounter->inc(l_rgw_cache_miss);
return -ENOENT;
}
entry = &iter->second;
/* check again, we might have lost a race here */
if (lru_counter - entry->lru_promotion_ts > lru_window) {
- touch_lru(name, *entry, iter->second.lru_iter);
+ touch_lru(dpp, name, *entry, iter->second.lru_iter);
}
}
ObjectCacheInfo& src = iter->second.info;
if(src.status == -ENOENT) {
- ldout(cct, 10) << "cache get: name=" << name << " : hit (negative entry)" << dendl;
+ ldpp_dout(dpp, 10) << "cache get: name=" << name << " : hit (negative entry)" << dendl;
if (perfcounter) perfcounter->inc(l_rgw_cache_hit);
return -ENODATA;
}
if ((src.flags & mask) != mask) {
- ldout(cct, 10) << "cache get: name=" << name << " : type miss (requested=0x"
+ ldpp_dout(dpp, 10) << "cache get: name=" << name << " : type miss (requested=0x"
<< std::hex << mask << ", cached=0x" << src.flags
<< std::dec << ")" << dendl;
if(perfcounter) perfcounter->inc(l_rgw_cache_miss);
return -ENOENT;
}
- ldout(cct, 10) << "cache get: name=" << name << " : hit (requested=0x"
+ ldpp_dout(dpp, 10) << "cache get: name=" << name << " : hit (requested=0x"
<< std::hex << mask << ", cached=0x" << src.flags
<< std::dec << ")" << dendl;
return 0;
}
-bool ObjectCache::chain_cache_entry(std::initializer_list<rgw_cache_entry_info*> cache_info_entries,
+bool ObjectCache::chain_cache_entry(const DoutPrefixProvider *dpp,
+ std::initializer_list<rgw_cache_entry_info*> cache_info_entries,
RGWChainedCache::Entry *chained_entry)
{
std::unique_lock l{lock};
entries.reserve(cache_info_entries.size());
/* first verify that all entries are still valid */
for (auto cache_info : cache_info_entries) {
- ldout(cct, 10) << "chain_cache_entry: cache_locator="
+ ldpp_dout(dpp, 10) << "chain_cache_entry: cache_locator="
<< cache_info->cache_locator << dendl;
auto iter = cache_map.find(cache_info->cache_locator);
if (iter == cache_map.end()) {
- ldout(cct, 20) << "chain_cache_entry: couldn't find cache locator" << dendl;
+ ldpp_dout(dpp, 20) << "chain_cache_entry: couldn't find cache locator" << dendl;
return false;
}
auto entry = &iter->second;
if (entry->gen != cache_info->gen) {
- ldout(cct, 20) << "chain_cache_entry: entry.gen (" << entry->gen
+ ldpp_dout(dpp, 20) << "chain_cache_entry: entry.gen (" << entry->gen
<< ") != cache_info.gen (" << cache_info->gen << ")"
<< dendl;
return false;
return true;
}
-void ObjectCache::put(const string& name, ObjectCacheInfo& info, rgw_cache_entry_info *cache_info)
+void ObjectCache::put(const DoutPrefixProvider *dpp, const string& name, ObjectCacheInfo& info, rgw_cache_entry_info *cache_info)
{
std::unique_lock l{lock};
return;
}
- ldout(cct, 10) << "cache put: name=" << name << " info.flags=0x"
+ ldpp_dout(dpp, 10) << "cache put: name=" << name << " info.flags=0x"
<< std::hex << info.flags << std::dec << dendl;
auto [iter, inserted] = cache_map.emplace(name, ObjectCacheEntry{});
entry.chained_entries.clear();
entry.gen++;
- touch_lru(name, entry, entry.lru_iter);
+ touch_lru(dpp, name, entry, entry.lru_iter);
target.status = info.status;
target.xattrs = info.xattrs;
map<string, bufferlist>::iterator iter;
for (iter = target.xattrs.begin(); iter != target.xattrs.end(); ++iter) {
- ldout(cct, 10) << "updating xattr: name=" << iter->first << " bl.length()=" << iter->second.length() << dendl;
+ ldpp_dout(dpp, 10) << "updating xattr: name=" << iter->first << " bl.length()=" << iter->second.length() << dendl;
}
} else if (info.flags & CACHE_FLAG_MODIFY_XATTRS) {
map<string, bufferlist>::iterator iter;
for (iter = info.rm_xattrs.begin(); iter != info.rm_xattrs.end(); ++iter) {
- ldout(cct, 10) << "removing xattr: name=" << iter->first << dendl;
+ ldpp_dout(dpp, 10) << "removing xattr: name=" << iter->first << dendl;
target.xattrs.erase(iter->first);
}
for (iter = info.xattrs.begin(); iter != info.xattrs.end(); ++iter) {
- ldout(cct, 10) << "appending xattr: name=" << iter->first << " bl.length()=" << iter->second.length() << dendl;
+ ldpp_dout(dpp, 10) << "appending xattr: name=" << iter->first << " bl.length()=" << iter->second.length() << dendl;
target.xattrs[iter->first] = iter->second;
}
}
target.version = info.version;
}
-bool ObjectCache::remove(const string& name)
+bool ObjectCache::remove(const DoutPrefixProvider *dpp, const string& name)
{
std::unique_lock l{lock};
if (iter == cache_map.end())
return false;
- ldout(cct, 10) << "removing " << name << " from cache" << dendl;
+ ldpp_dout(dpp, 10) << "removing " << name << " from cache" << dendl;
ObjectCacheEntry& entry = iter->second;
for (auto& kv : entry.chained_entries) {
return true;
}
-void ObjectCache::touch_lru(const string& name, ObjectCacheEntry& entry,
+void ObjectCache::touch_lru(const DoutPrefixProvider *dpp, const string& name, ObjectCacheEntry& entry,
std::list<string>::iterator& lru_iter)
{
while (lru_size > (size_t)cct->_conf->rgw_cache_lru_size) {
lru.push_back(name);
lru_size++;
lru_iter--;
- ldout(cct, 10) << "adding " << name << " to cache LRU end" << dendl;
+ ldpp_dout(dpp, 10) << "adding " << name << " to cache LRU end" << dendl;
} else {
- ldout(cct, 10) << "moving " << name << " to cache LRU end" << dendl;
+ ldpp_dout(dpp, 10) << "moving " << name << " to cache LRU end" << dendl;
lru.erase(lru_iter);
lru.push_back(name);
lru_iter = lru.end();
bool enabled;
ceph::timespan expiry;
- void touch_lru(const string& name, ObjectCacheEntry& entry,
+ void touch_lru(const DoutPrefixProvider *dpp, const string& name, ObjectCacheEntry& entry,
std::list<string>::iterator& lru_iter);
void remove_lru(const string& name, std::list<string>::iterator& lru_iter);
void invalidate_lru(ObjectCacheEntry& entry);
public:
ObjectCache() : lru_size(0), lru_counter(0), lru_window(0), cct(NULL), enabled(false) { }
~ObjectCache();
- int get(const std::string& name, ObjectCacheInfo& bl, uint32_t mask, rgw_cache_entry_info *cache_info);
- std::optional<ObjectCacheInfo> get(const std::string& name) {
+ int get(const DoutPrefixProvider *dpp, const std::string& name, ObjectCacheInfo& bl, uint32_t mask, rgw_cache_entry_info *cache_info);
+ std::optional<ObjectCacheInfo> get(const DoutPrefixProvider *dpp, const std::string& name) {
std::optional<ObjectCacheInfo> info{std::in_place};
- auto r = get(name, *info, 0, nullptr);
+ auto r = get(dpp, name, *info, 0, nullptr);
return r < 0 ? std::nullopt : info;
}
}
}
- void put(const std::string& name, ObjectCacheInfo& bl, rgw_cache_entry_info *cache_info);
- bool remove(const std::string& name);
+ void put(const DoutPrefixProvider *dpp, const std::string& name, ObjectCacheInfo& bl, rgw_cache_entry_info *cache_info);
+ bool remove(const DoutPrefixProvider *dpp, const std::string& name);
void set_ctx(CephContext *_cct) {
cct = _cct;
lru_window = cct->_conf->rgw_cache_lru_size / 2;
expiry = std::chrono::seconds(cct->_conf.get_val<uint64_t>(
"rgw_cache_expiry_interval"));
}
- bool chain_cache_entry(std::initializer_list<rgw_cache_entry_info*> cache_info_entries,
+ bool chain_cache_entry(const DoutPrefixProvider *dpp,
+ std::initializer_list<rgw_cache_entry_info*> cache_info_entries,
RGWChainedCache::Entry *chained_entry);
void set_enabled(bool status);
STR_LEN_ENTRY("HTTP_X_ACCOUNT"),
{NULL, 0} };
-void req_info::init_meta_info(bool *found_bad_meta)
+void req_info::init_meta_info(const DoutPrefixProvider *dpp, bool *found_bad_meta)
{
x_meta_map.clear();
int len = meta_prefixes[prefix_num].len;
const char *p = header_name.c_str();
if (strncmp(p, prefix, len) == 0) {
- dout(10) << "meta>> " << p << dendl;
+ ldpp_dout(dpp, 10) << "meta>> " << p << dendl;
const char *name = p+len; /* skip the prefix */
int name_len = header_name.size() - len;
}
}
for (const auto& kv: x_meta_map) {
- dout(10) << "x>> " << kv.first << ":" << rgw::crypt_sanitize::x_meta_map{kv.first, kv.second} << dendl;
+ ldpp_dout(dpp, 10) << "x>> " << kv.first << ":" << rgw::crypt_sanitize::x_meta_map{kv.first, kv.second} << dendl;
}
}
return ret;
}
-int RGWHTTPArgs::parse()
+int RGWHTTPArgs::parse(const DoutPrefixProvider *dpp)
{
int pos = 0;
bool end = false;
});
}
string& val = nv.get_val();
- dout(10) << "name: " << name << " val: " << val << dendl;
+ ldpp_dout(dpp, 10) << "name: " << name << " val: " << val << dendl;
append(name, val);
}
bool admin_subresource_added = false;
public:
RGWHTTPArgs() = default;
- explicit RGWHTTPArgs(const std::string& s) {
+ explicit RGWHTTPArgs(const std::string& s, const DoutPrefixProvider *dpp) {
set(s);
- parse();
+ parse(dpp);
}
/** Set the arguments; as received */
str = s;
}
/** parse the received arguments */
- int parse();
+ int parse(const DoutPrefixProvider *dpp);
void append(const std::string& name, const string& val);
/** Get the value for a specific argument parameter */
const string& get(const std::string& name, bool *exists = NULL) const;
req_info(CephContext *cct, const RGWEnv *env);
void rebuild_from(req_info& src);
- void init_meta_info(bool *found_bad_meta);
+ void init_meta_info(const DoutPrefixProvider *dpp, bool *found_bad_meta);
};
typedef cls_rgw_obj_key rgw_obj_index_key;
}
}
-int RGWCoroutinesStack::operate(RGWCoroutinesEnv *_env)
+int RGWCoroutinesStack::operate(const DoutPrefixProvider *dpp, RGWCoroutinesEnv *_env)
{
env = _env;
RGWCoroutine *op = *pos;
op->stack = this;
- ldout(cct, 20) << *op << ": operate()" << dendl;
- int r = op->operate_wrapper();
+ ldpp_dout(dpp, 20) << *op << ": operate()" << dendl;
+ int r = op->operate_wrapper(dpp);
if (r < 0) {
- ldout(cct, 20) << *op << ": operate() returned r=" << r << dendl;
+ ldpp_dout(dpp, 20) << *op << ": operate() returned r=" << r << dendl;
}
error_flag = op->is_error();
cr->io_complete(io_id);
}
-int RGWCoroutinesManager::run(list<RGWCoroutinesStack *>& stacks)
+int RGWCoroutinesManager::run(const DoutPrefixProvider *dpp, list<RGWCoroutinesStack *>& stacks)
{
int ret = 0;
int blocked_count = 0;
lock.unlock();
- ret = stack->operate(&env);
+ ret = stack->operate(dpp, &env);
lock.lock();
stack->set_is_scheduled(false);
if (ret < 0) {
- ldout(cct, 20) << "stack->operate() returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 20) << "stack->operate() returned ret=" << ret << dendl;
}
if (stack->is_error()) {
return ret;
}
-int RGWCoroutinesManager::run(RGWCoroutine *op)
+int RGWCoroutinesManager::run(const DoutPrefixProvider *dpp, RGWCoroutine *op)
{
if (!op) {
return 0;
stacks.push_back(stack);
- int r = run(stacks);
+ int r = run(dpp, stacks);
if (r < 0) {
- ldout(cct, 20) << "run(stacks) returned r=" << r << dendl;
+ ldpp_dout(dpp, 20) << "run(stacks) returned r=" << r << dendl;
} else {
r = op->get_ret_status();
}
request_cleanup();
}
-int RGWSimpleCoroutine::operate()
+int RGWSimpleCoroutine::operate(const DoutPrefixProvider *dpp)
{
int ret = 0;
reenter(this) {
yield return state_init();
- yield return state_send_request();
+ yield return state_send_request(dpp);
yield return state_request_complete();
yield return state_all_complete();
drain_all();
return 0;
}
-int RGWSimpleCoroutine::state_send_request()
+int RGWSimpleCoroutine::state_send_request(const DoutPrefixProvider *dpp)
{
- int ret = send_request();
+ int ret = send_request(dpp);
if (ret < 0) {
call_cleanup();
return set_state(RGWCoroutine_Error, ret);
return status;
}
- virtual int operate_wrapper() {
- return operate();
+ virtual int operate_wrapper(const DoutPrefixProvider *dpp) {
+ return operate(dpp);
}
public:
RGWCoroutine(CephContext *_cct) : status(_cct), _yield_ret(false), cct(_cct), stack(NULL), retcode(0), state(RGWCoroutine_Run) {}
~RGWCoroutine() override;
- virtual int operate() = 0;
+ virtual int operate(const DoutPrefixProvider *dpp) = 0;
bool is_done() { return (state == RGWCoroutine_Done || state == RGWCoroutine_Error); }
bool is_error() { return (state == RGWCoroutine_Error); }
return id;
}
- int operate(RGWCoroutinesEnv *env);
+ int operate(const DoutPrefixProvider *dpp, RGWCoroutinesEnv *env);
bool is_done() {
return done_flag;
}
}
- int run(list<RGWCoroutinesStack *>& ops);
- int run(RGWCoroutine *op);
+ int run(const DoutPrefixProvider *dpp, list<RGWCoroutinesStack *>& ops);
+ int run(const DoutPrefixProvider *dpp, RGWCoroutine *op);
void stop() {
bool expected = false;
if (going_down.compare_exchange_strong(expected, true)) {
class RGWSimpleCoroutine : public RGWCoroutine {
bool called_cleanup;
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
int state_init();
- int state_send_request();
+ int state_send_request(const DoutPrefixProvider *dpp);
int state_request_complete();
int state_all_complete();
~RGWSimpleCoroutine() override;
virtual int init() { return 0; }
- virtual int send_request() = 0;
+ virtual int send_request(const DoutPrefixProvider *dpp) = 0;
virtual int request_complete() = 0;
virtual int finish() { return 0; }
virtual void request_cleanup() {}
if (obj) {
for( ; obj; obj = iter.get_next()) {
const char *s = obj->get_data().c_str();
- dout(10) << "RGWCORSRule::xml_end, el : " << el << ", data : " << s << dendl;
+ ldpp_dout(dpp, 10) << "RGWCORSRule::xml_end, el : " << el << ", data : " << s << dendl;
if (strcasecmp(s, "GET") == 0) {
allowed_methods |= RGW_CORS_GET;
} else if (strcasecmp(s, "POST") == 0) {
if (xml_id != NULL) {
string data = xml_id->get_data();
if (data.length() > 255) {
- dout(0) << "RGWCORSRule has id of length greater than 255" << dendl;
+ ldpp_dout(dpp, 0) << "RGWCORSRule has id of length greater than 255" << dendl;
return false;
}
- dout(10) << "RGWCORRule id : " << data << dendl;
+ ldpp_dout(dpp, 10) << "RGWCORRule id : " << data << dendl;
id = data;
}
/*Check if there is atleast one AllowedOrigin*/
iter = find("AllowedOrigin");
if (!(obj = iter.get_next())) {
- dout(0) << "RGWCORSRule does not have even one AllowedOrigin" << dendl;
+ ldpp_dout(dpp, 0) << "RGWCORSRule does not have even one AllowedOrigin" << dendl;
return false;
}
for( ; obj; obj = iter.get_next()) {
- dout(10) << "RGWCORSRule - origin : " << obj->get_data() << dendl;
+ ldpp_dout(dpp, 10) << "RGWCORSRule - origin : " << obj->get_data() << dendl;
/*Just take the hostname*/
string host = obj->get_data();
if (validate_name_string(host) != 0)
unsigned long long ull = strtoull(obj->get_data().c_str(), &end, 10);
if (*end != '\0') {
- dout(0) << "RGWCORSRule's MaxAgeSeconds " << obj->get_data() << " is an invalid integer" << dendl;
+ ldpp_dout(dpp, 0) << "RGWCORSRule's MaxAgeSeconds " << obj->get_data() << " is an invalid integer" << dendl;
return false;
}
if (ull >= 0x100000000ull) {
} else {
max_age = (uint32_t)ull;
}
- dout(10) << "RGWCORSRule : max_age : " << max_age << dendl;
+ ldpp_dout(dpp, 10) << "RGWCORSRule : max_age : " << max_age << dendl;
}
/*Check and update ExposeHeader*/
iter = find("ExposeHeader");
if ((obj = iter.get_next())) {
for(; obj; obj = iter.get_next()) {
- dout(10) << "RGWCORSRule - exp_hdr : " << obj->get_data() << dendl;
+ ldpp_dout(dpp, 10) << "RGWCORSRule - exp_hdr : " << obj->get_data() << dendl;
exposable_hdrs.push_back(obj->get_data());
}
}
iter = find("AllowedHeader");
if ((obj = iter.get_next())) {
for(; obj; obj = iter.get_next()) {
- dout(10) << "RGWCORSRule - allowed_hdr : " << obj->get_data() << dendl;
+ ldpp_dout(dpp, 10) << "RGWCORSRule - allowed_hdr : " << obj->get_data() << dendl;
string s = obj->get_data();
if (validate_name_string(s) != 0)
return false;
XMLObjIter iter = find("CORSRule");
RGWCORSRule_S3 *obj;
if (!(obj = static_cast<RGWCORSRule_S3 *>(iter.get_next()))) {
- dout(0) << "CORSConfiguration should have atleast one CORSRule" << dendl;
+ ldpp_dout(dpp, 0) << "CORSConfiguration should have atleast one CORSRule" << dendl;
return false;
}
for(; obj; obj = static_cast<RGWCORSRule_S3 *>(iter.get_next())) {
XMLObj *RGWCORSXMLParser_S3::alloc_obj(const char *el) {
if (strcmp(el, "CORSConfiguration") == 0) {
- return new RGWCORSConfiguration_S3;
+ return new RGWCORSConfiguration_S3(dpp);
} else if (strcmp(el, "CORSRule") == 0) {
- return new RGWCORSRule_S3;
+ return new RGWCORSRule_S3(dpp);
} else if (strcmp(el, "ID") == 0) {
return new CORSRuleID_S3;
} else if (strcmp(el, "AllowedOrigin") == 0) {
#include <include/types.h>
#include <common/Formatter.h>
+#include <common/dout.h>
#include "rgw_xml.h"
#include "rgw_cors.h"
class RGWCORSRule_S3 : public RGWCORSRule, public XMLObj
{
+ const DoutPrefixProvider *dpp;
public:
- RGWCORSRule_S3() {}
+ RGWCORSRule_S3(const DoutPrefixProvider *dpp) : dpp(dpp) {}
~RGWCORSRule_S3() override {}
bool xml_end(const char *el) override;
class RGWCORSConfiguration_S3 : public RGWCORSConfiguration, public XMLObj
{
+ const DoutPrefixProvider *dpp;
public:
- RGWCORSConfiguration_S3() {}
+ RGWCORSConfiguration_S3(const DoutPrefixProvider *dpp) : dpp(dpp) {}
~RGWCORSConfiguration_S3() override {}
bool xml_end(const char *el) override;
class RGWCORSXMLParser_S3 : public RGWXMLParser
{
+ const DoutPrefixProvider *dpp;
CephContext *cct;
XMLObj *alloc_obj(const char *el) override;
public:
- explicit RGWCORSXMLParser_S3(CephContext *_cct) : cct(_cct) {}
+ explicit RGWCORSXMLParser_S3(const DoutPrefixProvider *_dpp, CephContext *_cct) : dpp(_dpp), cct(_cct) {}
};
#endif /*CEPH_RGW_CORS_S3_H*/
}
void RGWAsyncRadosProcessor::RGWWQ::_process(RGWAsyncRadosRequest *req, ThreadPool::TPHandle& handle) {
- processor->handle_request(req);
+ processor->handle_request(this, req);
processor->req_throttle.put(1);
}
}
}
-void RGWAsyncRadosProcessor::handle_request(RGWAsyncRadosRequest *req) {
- req->send_request();
+void RGWAsyncRadosProcessor::handle_request(const DoutPrefixProvider *dpp, RGWAsyncRadosRequest *req) {
+ req->send_request(dpp);
req->put();
}
req_wq.queue(req);
}
-int RGWAsyncGetSystemObj::_send_request()
+int RGWAsyncGetSystemObj::_send_request(const DoutPrefixProvider *dpp)
{
map<string, bufferlist> *pattrs = want_attrs ? &attrs : nullptr;
.set_objv_tracker(&objv_tracker)
.set_attrs(pattrs)
.set_raw_attrs(raw_attrs)
- .read(&bl, null_yield);
+ .read(dpp, &bl, null_yield);
}
-RGWAsyncGetSystemObj::RGWAsyncGetSystemObj(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, RGWSI_SysObj *_svc,
+RGWAsyncGetSystemObj::RGWAsyncGetSystemObj(const DoutPrefixProvider *_dpp, RGWCoroutine *caller, RGWAioCompletionNotifier *cn, RGWSI_SysObj *_svc,
RGWObjVersionTracker *_objv_tracker, const rgw_raw_obj& _obj,
bool want_attrs, bool raw_attrs)
- : RGWAsyncRadosRequest(caller, cn), obj_ctx(_svc),
+ : RGWAsyncRadosRequest(caller, cn), dpp(_dpp), obj_ctx(_svc),
obj(_obj), want_attrs(want_attrs), raw_attrs(raw_attrs)
{
if (_objv_tracker) {
}
}
-int RGWSimpleRadosReadAttrsCR::send_request()
+int RGWSimpleRadosReadAttrsCR::send_request(const DoutPrefixProvider *dpp)
{
- req = new RGWAsyncGetSystemObj(this, stack->create_completion_notifier(),
+ req = new RGWAsyncGetSystemObj(dpp, this, stack->create_completion_notifier(),
svc, objv_tracker, obj, true, raw_attrs);
async_rados->queue(req);
return 0;
return req->get_ret_status();
}
-int RGWAsyncPutSystemObj::_send_request()
+int RGWAsyncPutSystemObj::_send_request(const DoutPrefixProvider *dpp)
{
auto obj_ctx = svc->init_obj_ctx();
auto sysobj = obj_ctx.get_obj(obj);
return sysobj.wop()
.set_objv_tracker(&objv_tracker)
.set_exclusive(exclusive)
- .write_data(bl, null_yield);
+ .write_data(dpp, bl, null_yield);
}
-RGWAsyncPutSystemObj::RGWAsyncPutSystemObj(RGWCoroutine *caller, RGWAioCompletionNotifier *cn,
+RGWAsyncPutSystemObj::RGWAsyncPutSystemObj(const DoutPrefixProvider *_dpp,
+ RGWCoroutine *caller,
+ RGWAioCompletionNotifier *cn,
RGWSI_SysObj *_svc,
RGWObjVersionTracker *_objv_tracker, const rgw_raw_obj& _obj,
bool _exclusive, bufferlist _bl)
- : RGWAsyncRadosRequest(caller, cn), svc(_svc),
+ : RGWAsyncRadosRequest(caller, cn), dpp(_dpp), svc(_svc),
obj(_obj), exclusive(_exclusive), bl(std::move(_bl))
{
if (_objv_tracker) {
}
}
-int RGWAsyncPutSystemObjAttrs::_send_request()
+int RGWAsyncPutSystemObjAttrs::_send_request(const DoutPrefixProvider *dpp)
{
auto obj_ctx = svc->init_obj_ctx();
auto sysobj = obj_ctx.get_obj(obj);
.set_objv_tracker(&objv_tracker)
.set_exclusive(false)
.set_attrs(attrs)
- .write_attrs(null_yield);
+ .write_attrs(dpp, null_yield);
}
-RGWAsyncPutSystemObjAttrs::RGWAsyncPutSystemObjAttrs(RGWCoroutine *caller, RGWAioCompletionNotifier *cn,
+RGWAsyncPutSystemObjAttrs::RGWAsyncPutSystemObjAttrs(const DoutPrefixProvider *_dpp, RGWCoroutine *caller, RGWAioCompletionNotifier *cn,
RGWSI_SysObj *_svc,
RGWObjVersionTracker *_objv_tracker, const rgw_raw_obj& _obj,
map<string, bufferlist> _attrs)
- : RGWAsyncRadosRequest(caller, cn), svc(_svc),
+ : RGWAsyncRadosRequest(caller, cn), dpp(_dpp), svc(_svc),
obj(_obj), attrs(std::move(_attrs))
{
if (_objv_tracker) {
{
}
-int RGWAsyncLockSystemObj::_send_request()
+int RGWAsyncLockSystemObj::_send_request(const DoutPrefixProvider *dpp)
{
rgw_rados_ref ref;
- int r = store->getRados()->get_raw_obj_ref(obj, &ref);
+ int r = store->getRados()->get_raw_obj_ref(dpp, obj, &ref);
if (r < 0) {
- lderr(store->ctx()) << "ERROR: failed to get ref for (" << obj << ") ret=" << r << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: failed to get ref for (" << obj << ") ret=" << r << dendl;
return r;
}
{
}
-int RGWAsyncUnlockSystemObj::_send_request()
+int RGWAsyncUnlockSystemObj::_send_request(const DoutPrefixProvider *dpp)
{
rgw_rados_ref ref;
- int r = store->getRados()->get_raw_obj_ref(obj, &ref);
+ int r = store->getRados()->get_raw_obj_ref(dpp, obj, &ref);
if (r < 0) {
- lderr(store->ctx()) << "ERROR: failed to get ref for (" << obj << ") ret=" << r << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: failed to get ref for (" << obj << ") ret=" << r << dendl;
return r;
}
s << "]";
}
-int RGWRadosSetOmapKeysCR::send_request()
+int RGWRadosSetOmapKeysCR::send_request(const DoutPrefixProvider *dpp)
{
- int r = store->getRados()->get_raw_obj_ref(obj, &ref);
+ int r = store->getRados()->get_raw_obj_ref(dpp, obj, &ref);
if (r < 0) {
- lderr(store->ctx()) << "ERROR: failed to get ref for (" << obj << ") ret=" << r << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: failed to get ref for (" << obj << ") ret=" << r << dendl;
return r;
}
set_description() << "get omap keys dest=" << obj << " marker=" << marker;
}
-int RGWRadosGetOmapKeysCR::send_request() {
- int r = store->getRados()->get_raw_obj_ref(obj, &result->ref);
+int RGWRadosGetOmapKeysCR::send_request(const DoutPrefixProvider *dpp) {
+ int r = store->getRados()->get_raw_obj_ref(dpp, obj, &result->ref);
if (r < 0) {
- lderr(store->ctx()) << "ERROR: failed to get ref for (" << obj << ") ret=" << r << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: failed to get ref for (" << obj << ") ret=" << r << dendl;
return r;
}
set_description() << "get omap keys dest=" << obj << " marker=" << marker;
}
-int RGWRadosGetOmapValsCR::send_request() {
- int r = store->getRados()->get_raw_obj_ref(obj, &result->ref);
+int RGWRadosGetOmapValsCR::send_request(const DoutPrefixProvider *dpp) {
+ int r = store->getRados()->get_raw_obj_ref(dpp, obj, &result->ref);
if (r < 0) {
- lderr(store->ctx()) << "ERROR: failed to get ref for (" << obj << ") ret=" << r << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: failed to get ref for (" << obj << ") ret=" << r << dendl;
return r;
}
set_description() << "remove omap keys dest=" << obj << " keys=" << keys;
}
-int RGWRadosRemoveOmapKeysCR::send_request() {
- int r = store->getRados()->get_raw_obj_ref(obj, &ref);
+int RGWRadosRemoveOmapKeysCR::send_request(const DoutPrefixProvider *dpp) {
+ int r = store->getRados()->get_raw_obj_ref(dpp, obj, &ref);
if (r < 0) {
- lderr(store->ctx()) << "ERROR: failed to get ref for (" << obj << ") ret=" << r << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: failed to get ref for (" << obj << ") ret=" << r << dendl;
return r;
}
set_description() << "remove dest=" << obj;
}
-int RGWRadosRemoveCR::send_request()
+int RGWRadosRemoveCR::send_request(const DoutPrefixProvider *dpp)
{
auto rados = store->getRados()->get_rados_handle();
int r = rados->ioctx_create(obj.pool.name.c_str(), ioctx);
}
}
-int RGWSimpleRadosLockCR::send_request()
+int RGWSimpleRadosLockCR::send_request(const DoutPrefixProvider *dpp)
{
set_status() << "sending request";
req = new RGWAsyncLockSystemObj(this, stack->create_completion_notifier(),
}
}
-int RGWSimpleRadosUnlockCR::send_request()
+int RGWSimpleRadosUnlockCR::send_request(const DoutPrefixProvider *dpp)
{
set_status() << "sending request";
return req->get_ret_status();
}
-int RGWOmapAppend::operate() {
+int RGWOmapAppend::operate(const DoutPrefixProvider *dpp) {
reenter(this) {
for (;;) {
if (!has_product() && going_down) {
return (!is_done());
}
-int RGWAsyncGetBucketInstanceInfo::_send_request()
+int RGWAsyncGetBucketInstanceInfo::_send_request(const DoutPrefixProvider *dpp)
{
int r;
if (!bucket.bucket_id.empty()) {
RGWSysObjectCtx obj_ctx = store->svc()->sysobj->init_obj_ctx();
- r = store->getRados()->get_bucket_instance_info(obj_ctx, bucket, bucket_info, nullptr, &attrs, null_yield);
+ r = store->getRados()->get_bucket_instance_info(obj_ctx, bucket, bucket_info, nullptr, &attrs, null_yield, dpp);
} else {
- r = store->ctl()->bucket->read_bucket_info(bucket, &bucket_info, null_yield,
+ r = store->ctl()->bucket->read_bucket_info(bucket, &bucket_info, null_yield, dpp,
RGWBucketCtl::BucketInstance::GetParams().set_attrs(&attrs));
}
if (r < 0) {
- ldout(store->ctx(), 0) << "ERROR: failed to get bucket instance info for "
+ ldpp_dout(dpp, 0) << "ERROR: failed to get bucket instance info for "
<< bucket << dendl;
return r;
}
return 0;
}
-RGWRadosBILogTrimCR::RGWRadosBILogTrimCR(rgw::sal::RGWRadosStore *store,
+RGWRadosBILogTrimCR::RGWRadosBILogTrimCR(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store,
const RGWBucketInfo& bucket_info,
int shard_id,
const std::string& start_marker,
start_marker(BucketIndexShardsManager::get_shard_marker(start_marker)),
end_marker(BucketIndexShardsManager::get_shard_marker(end_marker))
{
- bs.init(bucket_info, bucket_info.layout.current_index, shard_id);
+ bs.init(dpp, bucket_info, bucket_info.layout.current_index, shard_id);
}
-int RGWRadosBILogTrimCR::send_request()
+int RGWRadosBILogTrimCR::send_request(const DoutPrefixProvider *dpp)
{
bufferlist in;
cls_rgw_bi_log_trim_op call;
return r;
}
-int RGWAsyncFetchRemoteObj::_send_request()
+int RGWAsyncFetchRemoteObj::_send_request(const DoutPrefixProvider *dpp)
{
RGWObjectCtx obj_ctx(store);
&bytes_transferred);
if (r < 0) {
- ldout(store->ctx(), 0) << "store->fetch_remote_obj() returned r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "store->fetch_remote_obj() returned r=" << r << dendl;
if (counters) {
counters->inc(sync_counters::l_fetch_err, 1);
}
return r;
}
-int RGWAsyncStatRemoteObj::_send_request()
+int RGWAsyncStatRemoteObj::_send_request(const DoutPrefixProvider *dpp)
{
RGWObjectCtx obj_ctx(store);
rgw::sal::RGWRadosBucket bucket(store, src_bucket);
rgw::sal::RGWRadosObject src_obj(store, key, &bucket);
- int r = store->getRados()->stat_remote_obj(obj_ctx,
+ int r = store->getRados()->stat_remote_obj(dpp,
+ obj_ctx,
rgw_user(user_id),
nullptr, /* req_info */
source_zone,
petag); /* string *petag, */
if (r < 0) {
- ldout(store->ctx(), 0) << "store->fetch_remote_obj() returned r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "store->fetch_remote_obj() returned r=" << r << dendl;
}
return r;
}
-int RGWAsyncRemoveObj::_send_request()
+int RGWAsyncRemoveObj::_send_request(const DoutPrefixProvider *dpp)
{
RGWObjectCtx obj_ctx(store);
rgw_obj obj(bucket_info.bucket, key);
- ldout(store->ctx(), 0) << __func__ << "(): deleting obj=" << obj << dendl;
+ ldpp_dout(dpp, 0) << __func__ << "(): deleting obj=" << obj << dendl;
obj_ctx.set_atomic(obj);
RGWObjState *state;
- int ret = store->getRados()->get_obj_state(&obj_ctx, bucket_info, obj, &state, null_yield);
+ int ret = store->getRados()->get_obj_state(dpp, &obj_ctx, bucket_info, obj, &state, null_yield);
if (ret < 0) {
- ldout(store->ctx(), 20) << __func__ << "(): get_obj_state() obj=" << obj << " returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 20) << __func__ << "(): get_obj_state() obj=" << obj << " returned ret=" << ret << dendl;
return ret;
}
/* has there been any racing object write? */
if (del_if_older && (state->mtime > timestamp)) {
- ldout(store->ctx(), 20) << __func__ << "(): skipping object removal obj=" << obj << " (obj mtime=" << state->mtime << ", request timestamp=" << timestamp << ")" << dendl;
+ ldpp_dout(dpp, 20) << __func__ << "(): skipping object removal obj=" << obj << " (obj mtime=" << state->mtime << ", request timestamp=" << timestamp << ")" << dendl;
return 0;
}
try {
policy.decode(bliter);
} catch (buffer::error& err) {
- ldout(store->ctx(), 0) << "ERROR: could not decode policy, caught buffer::error" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: could not decode policy, caught buffer::error" << dendl;
return -EIO;
}
}
del_op.params.high_precision_time = true;
del_op.params.zones_trace = &zones_trace;
- ret = del_op.delete_obj(null_yield);
+ ret = del_op.delete_obj(null_yield, dpp);
if (ret < 0) {
- ldout(store->ctx(), 20) << __func__ << "(): delete_obj() obj=" << obj << " returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 20) << __func__ << "(): delete_obj() obj=" << obj << " returned ret=" << ret << dendl;
}
return ret;
}
-int RGWContinuousLeaseCR::operate()
+int RGWContinuousLeaseCR::operate(const DoutPrefixProvider *dpp)
{
if (aborted) {
caller->set_sleeping(false);
return 0;
}
-RGWRadosTimelogAddCR::RGWRadosTimelogAddCR(rgw::sal::RGWRadosStore *_store, const string& _oid,
+RGWRadosTimelogAddCR::RGWRadosTimelogAddCR(const DoutPrefixProvider *_dpp, rgw::sal::RGWRadosStore *_store, const string& _oid,
const cls_log_entry& entry) : RGWSimpleCoroutine(_store->ctx()),
+ dpp(_dpp),
store(_store),
oid(_oid), cn(NULL)
{
entries.push_back(entry);
}
-int RGWRadosTimelogAddCR::send_request()
+int RGWRadosTimelogAddCR::send_request(const DoutPrefixProvider *dpp)
{
set_status() << "sending request";
cn = stack->create_completion_notifier();
- return store->svc()->cls->timelog.add(oid, entries, cn->completion(), true, null_yield);
+ return store->svc()->cls->timelog.add(dpp, oid, entries, cn->completion(), true, null_yield);
}
int RGWRadosTimelogAddCR::request_complete()
return r;
}
-RGWRadosTimelogTrimCR::RGWRadosTimelogTrimCR(rgw::sal::RGWRadosStore *store,
+RGWRadosTimelogTrimCR::RGWRadosTimelogTrimCR(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store,
const std::string& oid,
const real_time& start_time,
const real_time& end_time,
const std::string& from_marker,
const std::string& to_marker)
- : RGWSimpleCoroutine(store->ctx()), store(store), oid(oid),
+ : RGWSimpleCoroutine(store->ctx()), dpp(dpp), store(store), oid(oid),
start_time(start_time), end_time(end_time),
from_marker(from_marker), to_marker(to_marker)
{
<< " from_marker=" << from_marker << " to_marker=" << to_marker;
}
-int RGWRadosTimelogTrimCR::send_request()
+int RGWRadosTimelogTrimCR::send_request(const DoutPrefixProvider *dpp)
{
set_status() << "sending request";
cn = stack->create_completion_notifier();
- return store->svc()->cls->timelog.trim(oid, start_time, end_time, from_marker,
+ return store->svc()->cls->timelog.trim(dpp, oid, start_time, end_time, from_marker,
to_marker, cn->completion(),
null_yield);
}
}
-RGWSyncLogTrimCR::RGWSyncLogTrimCR(rgw::sal::RGWRadosStore *store, const std::string& oid,
+RGWSyncLogTrimCR::RGWSyncLogTrimCR(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store, const std::string& oid,
const std::string& to_marker,
std::string *last_trim_marker)
- : RGWRadosTimelogTrimCR(store, oid, real_time{}, real_time{},
+ : RGWRadosTimelogTrimCR(dpp, store, oid, real_time{}, real_time{},
std::string{}, to_marker),
cct(store->ctx()), last_trim_marker(last_trim_marker)
{
}
-int RGWAsyncStatObj::_send_request()
+int RGWAsyncStatObj::_send_request(const DoutPrefixProvider *dpp)
{
rgw_raw_obj raw_obj;
store->getRados()->obj_to_raw(bucket_info.placement_rule, obj, &raw_obj);
- return store->getRados()->raw_obj_stat(raw_obj, psize, pmtime, pepoch,
+ return store->getRados()->raw_obj_stat(dpp, raw_obj, psize, pmtime, pepoch,
nullptr, nullptr, objv_tracker, null_yield);
}
-RGWStatObjCR::RGWStatObjCR(RGWAsyncRadosProcessor *async_rados, rgw::sal::RGWRadosStore *store,
+RGWStatObjCR::RGWStatObjCR(const DoutPrefixProvider *dpp,
+ RGWAsyncRadosProcessor *async_rados, rgw::sal::RGWRadosStore *store,
const RGWBucketInfo& _bucket_info, const rgw_obj& obj, uint64_t *psize,
real_time* pmtime, uint64_t *pepoch,
RGWObjVersionTracker *objv_tracker)
- : RGWSimpleCoroutine(store->ctx()), store(store), async_rados(async_rados),
+ : RGWSimpleCoroutine(store->ctx()), dpp(dpp), store(store), async_rados(async_rados),
bucket_info(_bucket_info), obj(obj), psize(psize), pmtime(pmtime), pepoch(pepoch),
objv_tracker(objv_tracker)
{
}
}
-int RGWStatObjCR::send_request()
+int RGWStatObjCR::send_request(const DoutPrefixProvider *dpp)
{
- req = new RGWAsyncStatObj(this, stack->create_completion_notifier(),
+ req = new RGWAsyncStatObj(dpp, this, stack->create_completion_notifier(),
store, bucket_info, obj, psize, pmtime, pepoch, objv_tracker);
async_rados->queue(req);
return 0;
set_description() << "notify dest=" << obj;
}
-int RGWRadosNotifyCR::send_request()
+int RGWRadosNotifyCR::send_request(const DoutPrefixProvider *dpp)
{
- int r = store->getRados()->get_raw_obj_ref(obj, &ref);
+ int r = store->getRados()->get_raw_obj_ref(dpp, obj, &ref);
if (r < 0) {
- lderr(store->ctx()) << "ERROR: failed to get ref for (" << obj << ") ret=" << r << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: failed to get ref for (" << obj << ") ret=" << r << dendl;
return r;
}
#include "services/svc_sys_obj.h"
#include "services/svc_bucket.h"
+#define dout_subsys ceph_subsys_rgw
+
class RGWAsyncRadosRequest : public RefCountedObject {
RGWCoroutine *caller;
RGWAioCompletionNotifier *notifier;
ceph::mutex lock = ceph::make_mutex("RGWAsyncRadosRequest::lock");
protected:
- virtual int _send_request() = 0;
+ virtual int _send_request(const DoutPrefixProvider *dpp) = 0;
public:
RGWAsyncRadosRequest(RGWCoroutine *_caller, RGWAioCompletionNotifier *_cn)
: caller(_caller), notifier(_cn), retcode(0) {
}
}
- void send_request() {
+ void send_request(const DoutPrefixProvider *dpp) {
get();
- retcode = _send_request();
+ retcode = _send_request(dpp);
{
std::lock_guard l{lock};
if (notifier) {
ThreadPool m_tp;
Throttle req_throttle;
- struct RGWWQ : public ThreadPool::WorkQueue<RGWAsyncRadosRequest> {
+ struct RGWWQ : public DoutPrefixProvider, public ThreadPool::WorkQueue<RGWAsyncRadosRequest> {
RGWAsyncRadosProcessor *processor;
RGWWQ(RGWAsyncRadosProcessor *p,
ceph::timespan timeout, ceph::timespan suicide_timeout,
void _clear() override {
ceph_assert(processor->m_req_queue.empty());
}
+
+ CephContext *get_cct() const { return processor->cct; }
+ unsigned get_subsys() const { return ceph_subsys_rgw; }
+ std::ostream& gen_prefix(std::ostream& out) const { return out << "rgw async rados processor: ";}
+
} req_wq;
public:
~RGWAsyncRadosProcessor() {}
void start();
void stop();
- void handle_request(RGWAsyncRadosRequest *req);
+ void handle_request(const DoutPrefixProvider *dpp, RGWAsyncRadosRequest *req);
void queue(RGWAsyncRadosRequest *req);
bool is_going_down() {
return going_down;
}
+
};
template <class P>
P params;
const DoutPrefixProvider *dpp;
protected:
- int _send_request() override;
+ int _send_request(const DoutPrefixProvider *dpp) override;
public:
Request(RGWCoroutine *caller,
RGWAioCompletionNotifier *cn,
}
}
- int send_request() override {
+ int send_request(const DoutPrefixProvider *dpp) override {
req = new Request(this,
stack->create_completion_notifier(),
store,
P params;
std::shared_ptr<R> result;
+ const DoutPrefixProvider *dpp;
class Request : public RGWAsyncRadosRequest {
rgw::sal::RGWRadosStore *store;
P params;
std::shared_ptr<R> result;
+ const DoutPrefixProvider *dpp;
protected:
- int _send_request() override;
+ int _send_request(const DoutPrefixProvider *dpp) override;
public:
- Request(RGWCoroutine *caller,
+ Request(const DoutPrefixProvider *dpp,
+ RGWCoroutine *caller,
RGWAioCompletionNotifier *cn,
rgw::sal::RGWRadosStore *_store,
const P& _params,
- std::shared_ptr<R>& _result) : RGWAsyncRadosRequest(caller, cn),
+ std::shared_ptr<R>& _result,
+ const DoutPrefixProvider *_dpp) : RGWAsyncRadosRequest(caller, cn),
store(_store),
params(_params),
- result(_result) {}
+ result(_result),
+ dpp(_dpp) {}
} *req{nullptr};
public:
RGWSimpleAsyncCR(RGWAsyncRadosProcessor *_async_rados,
rgw::sal::RGWRadosStore *_store,
const P& _params,
- std::shared_ptr<R>& _result) : RGWSimpleCoroutine(_store->ctx()),
+ std::shared_ptr<R>& _result,
+ const DoutPrefixProvider *_dpp) : RGWSimpleCoroutine(_store->ctx()),
async_rados(_async_rados),
store(_store),
params(_params),
- result(_result) {}
+ result(_result),
+ dpp(_dpp) {}
~RGWSimpleAsyncCR() override {
request_cleanup();
}
}
- int send_request() override {
- req = new Request(this,
+ int send_request(const DoutPrefixProvider *dpp) override {
+ req = new Request(dpp,
+ this,
stack->create_completion_notifier(),
store,
params,
- result);
+ result,
+ dpp);
async_rados->queue(req);
return 0;
class Request : public RGWAsyncRadosRequest {
std::shared_ptr<Action> action;
protected:
- int _send_request() override {
+ int _send_request(const DoutPrefixProvider *dpp) override {
if (!action) {
return 0;
}
return action->operate();
}
public:
- Request(RGWCoroutine *caller,
+ Request(const DoutPrefixProvider *dpp,
+ RGWCoroutine *caller,
RGWAioCompletionNotifier *cn,
std::shared_ptr<Action>& _action) : RGWAsyncRadosRequest(caller, cn),
action(_action) {}
}
}
- int send_request() override {
- req = new Request(this,
+ int send_request(const DoutPrefixProvider *dpp) override {
+ req = new Request(dpp, this,
stack->create_completion_notifier(),
action);
class RGWAsyncGetSystemObj : public RGWAsyncRadosRequest {
+ const DoutPrefixProvider *dpp;
RGWSysObjectCtx obj_ctx;
rgw_raw_obj obj;
const bool want_attrs;
const bool raw_attrs;
protected:
- int _send_request() override;
+ int _send_request(const DoutPrefixProvider *dpp) override;
public:
- RGWAsyncGetSystemObj(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, RGWSI_SysObj *_svc,
+ RGWAsyncGetSystemObj(const DoutPrefixProvider *dpp,
+ RGWCoroutine *caller, RGWAioCompletionNotifier *cn, RGWSI_SysObj *_svc,
RGWObjVersionTracker *_objv_tracker, const rgw_raw_obj& _obj,
bool want_attrs, bool raw_attrs);
};
class RGWAsyncPutSystemObj : public RGWAsyncRadosRequest {
+ const DoutPrefixProvider *dpp;
RGWSI_SysObj *svc;
rgw_raw_obj obj;
bool exclusive;
bufferlist bl;
protected:
- int _send_request() override;
+ int _send_request(const DoutPrefixProvider *dpp) override;
public:
- RGWAsyncPutSystemObj(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, RGWSI_SysObj *_svc,
+ RGWAsyncPutSystemObj(const DoutPrefixProvider *dpp, RGWCoroutine *caller,
+ RGWAioCompletionNotifier *cn, RGWSI_SysObj *_svc,
RGWObjVersionTracker *_objv_tracker, const rgw_raw_obj& _obj,
bool _exclusive, bufferlist _bl);
};
class RGWAsyncPutSystemObjAttrs : public RGWAsyncRadosRequest {
+ const DoutPrefixProvider *dpp;
RGWSI_SysObj *svc;
rgw_raw_obj obj;
map<string, bufferlist> attrs;
protected:
- int _send_request() override;
+ int _send_request(const DoutPrefixProvider *dpp) override;
public:
- RGWAsyncPutSystemObjAttrs(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, RGWSI_SysObj *_svc,
+ RGWAsyncPutSystemObjAttrs(const DoutPrefixProvider *dpp, RGWCoroutine *caller, RGWAioCompletionNotifier *cn, RGWSI_SysObj *_svc,
RGWObjVersionTracker *_objv_tracker, const rgw_raw_obj& _obj,
map<string, bufferlist> _attrs);
uint32_t duration_secs;
protected:
- int _send_request() override;
+ int _send_request(const DoutPrefixProvider *dpp) override;
public:
RGWAsyncLockSystemObj(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RGWRadosStore *_store,
RGWObjVersionTracker *_objv_tracker, const rgw_raw_obj& _obj,
string cookie;
protected:
- int _send_request() override;
+ int _send_request(const DoutPrefixProvider *dpp) override;
public:
RGWAsyncUnlockSystemObj(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RGWRadosStore *_store,
RGWObjVersionTracker *_objv_tracker, const rgw_raw_obj& _obj,
template <class T>
class RGWSimpleRadosReadCR : public RGWSimpleCoroutine {
+ const DoutPrefixProvider *dpp;
RGWAsyncRadosProcessor *async_rados;
RGWSI_SysObj *svc;
RGWAsyncGetSystemObj *req{nullptr};
public:
- RGWSimpleRadosReadCR(RGWAsyncRadosProcessor *_async_rados, RGWSI_SysObj *_svc,
+ RGWSimpleRadosReadCR(const DoutPrefixProvider *_dpp,
+ RGWAsyncRadosProcessor *_async_rados, RGWSI_SysObj *_svc,
const rgw_raw_obj& _obj,
T *_result, bool empty_on_enoent = true,
RGWObjVersionTracker *objv_tracker = nullptr)
- : RGWSimpleCoroutine(_svc->ctx()), async_rados(_async_rados), svc(_svc),
+ : RGWSimpleCoroutine(_svc->ctx()), dpp(_dpp), async_rados(_async_rados), svc(_svc),
obj(_obj), result(_result),
empty_on_enoent(empty_on_enoent), objv_tracker(objv_tracker) {}
~RGWSimpleRadosReadCR() override {
}
}
- int send_request() override;
+ int send_request(const DoutPrefixProvider *dpp) override;
int request_complete() override;
virtual int handle_data(T& data) {
};
template <class T>
-int RGWSimpleRadosReadCR<T>::send_request()
+int RGWSimpleRadosReadCR<T>::send_request(const DoutPrefixProvider *dpp)
{
- req = new RGWAsyncGetSystemObj(this, stack->create_completion_notifier(), svc,
+ req = new RGWAsyncGetSystemObj(dpp, this, stack->create_completion_notifier(), svc,
objv_tracker, obj, false, false);
async_rados->queue(req);
return 0;
}
class RGWSimpleRadosReadAttrsCR : public RGWSimpleCoroutine {
+ const DoutPrefixProvider *dpp;
RGWAsyncRadosProcessor *async_rados;
RGWSI_SysObj *svc;
RGWAsyncGetSystemObj *req = nullptr;
public:
- RGWSimpleRadosReadAttrsCR(RGWAsyncRadosProcessor *_async_rados, RGWSI_SysObj *_svc,
+ RGWSimpleRadosReadAttrsCR(const DoutPrefixProvider *_dpp, RGWAsyncRadosProcessor *_async_rados, RGWSI_SysObj *_svc,
const rgw_raw_obj& _obj, map<string, bufferlist> *_pattrs,
bool _raw_attrs, RGWObjVersionTracker* objv_tracker = nullptr)
: RGWSimpleCoroutine(_svc->ctx()),
+ dpp(_dpp),
async_rados(_async_rados), svc(_svc),
obj(_obj),
pattrs(_pattrs),
}
}
- int send_request() override;
+ int send_request(const DoutPrefixProvider *dpp) override;
int request_complete() override;
};
template <class T>
class RGWSimpleRadosWriteCR : public RGWSimpleCoroutine {
+ const DoutPrefixProvider *dpp;
RGWAsyncRadosProcessor *async_rados;
RGWSI_SysObj *svc;
bufferlist bl;
RGWAsyncPutSystemObj *req{nullptr};
public:
- RGWSimpleRadosWriteCR(RGWAsyncRadosProcessor *_async_rados, RGWSI_SysObj *_svc,
+ RGWSimpleRadosWriteCR(const DoutPrefixProvider *_dpp,
+ RGWAsyncRadosProcessor *_async_rados, RGWSI_SysObj *_svc,
const rgw_raw_obj& _obj,
const T& _data, RGWObjVersionTracker *objv_tracker = nullptr)
- : RGWSimpleCoroutine(_svc->ctx()), async_rados(_async_rados),
+ : RGWSimpleCoroutine(_svc->ctx()), dpp(_dpp), async_rados(_async_rados),
svc(_svc), obj(_obj), objv_tracker(objv_tracker) {
encode(_data, bl);
}
}
}
- int send_request() override {
- req = new RGWAsyncPutSystemObj(this, stack->create_completion_notifier(),
+ int send_request(const DoutPrefixProvider *dpp) override {
+ req = new RGWAsyncPutSystemObj(dpp, this, stack->create_completion_notifier(),
svc, objv_tracker, obj, false, std::move(bl));
async_rados->queue(req);
return 0;
};
class RGWSimpleRadosWriteAttrsCR : public RGWSimpleCoroutine {
+ const DoutPrefixProvider *dpp;
RGWAsyncRadosProcessor *async_rados;
RGWSI_SysObj *svc;
RGWObjVersionTracker *objv_tracker;
RGWAsyncPutSystemObjAttrs *req = nullptr;
public:
- RGWSimpleRadosWriteAttrsCR(RGWAsyncRadosProcessor *_async_rados,
+ RGWSimpleRadosWriteAttrsCR(const DoutPrefixProvider *_dpp,
+ RGWAsyncRadosProcessor *_async_rados,
RGWSI_SysObj *_svc, const rgw_raw_obj& _obj,
map<string, bufferlist> _attrs,
RGWObjVersionTracker *objv_tracker = nullptr)
- : RGWSimpleCoroutine(_svc->ctx()), async_rados(_async_rados),
+ : RGWSimpleCoroutine(_svc->ctx()), dpp(_dpp), async_rados(_async_rados),
svc(_svc), objv_tracker(objv_tracker), obj(_obj),
attrs(std::move(_attrs)) {
}
}
}
- int send_request() override {
- req = new RGWAsyncPutSystemObjAttrs(this, stack->create_completion_notifier(),
+ int send_request(const DoutPrefixProvider *dpp) override {
+ req = new RGWAsyncPutSystemObjAttrs(dpp, this, stack->create_completion_notifier(),
svc, objv_tracker, obj, std::move(attrs));
async_rados->queue(req);
return 0;
const rgw_raw_obj& _obj,
map<string, bufferlist>& _entries);
- int send_request() override;
+ int send_request(const DoutPrefixProvider *dpp) override;
int request_complete() override;
};
const string& _marker, int _max_entries,
ResultPtr result);
- int send_request() override;
+ int send_request(const DoutPrefixProvider *dpp) override;
int request_complete() override;
private:
const string& _marker, int _max_entries,
ResultPtr result);
- int send_request() override;
+ int send_request(const DoutPrefixProvider *dpp) override;
int request_complete() override;
private:
const rgw_raw_obj& _obj,
const set<string>& _keys);
- int send_request() override;
+ int send_request(const DoutPrefixProvider *dpp) override;
int request_complete() override;
};
RGWRadosRemoveCR(rgw::sal::RGWRadosStore *store, const rgw_raw_obj& obj,
RGWObjVersionTracker* objv_tracker = nullptr);
- int send_request() override;
+ int send_request(const DoutPrefixProvider *dpp) override;
int request_complete() override;
};
}
void request_cleanup() override;
- int send_request() override;
+ int send_request(const DoutPrefixProvider *dpp) override;
int request_complete() override;
static std::string gen_random_cookie(CephContext* cct) {
}
void request_cleanup() override;
- int send_request() override;
+ int send_request(const DoutPrefixProvider *dpp) override;
int request_complete() override;
};
RGWOmapAppend(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RGWRadosStore *_store,
const rgw_raw_obj& _obj,
uint64_t _window_size = OMAP_APPEND_MAX_ENTRIES_DEFAULT);
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
void flush_pending();
bool append(const string& s);
bool finish();
class RGWAsyncGetBucketInstanceInfo : public RGWAsyncRadosRequest {
rgw::sal::RGWRadosStore *store;
rgw_bucket bucket;
+ const DoutPrefixProvider *dpp;
protected:
- int _send_request() override;
+ int _send_request(const DoutPrefixProvider *dpp) override;
public:
RGWAsyncGetBucketInstanceInfo(RGWCoroutine *caller, RGWAioCompletionNotifier *cn,
- rgw::sal::RGWRadosStore *_store, const rgw_bucket& bucket)
- : RGWAsyncRadosRequest(caller, cn), store(_store), bucket(bucket) {}
+ rgw::sal::RGWRadosStore *_store, const rgw_bucket& bucket,
+ const DoutPrefixProvider *dpp)
+ : RGWAsyncRadosRequest(caller, cn), store(_store), bucket(bucket), dpp(dpp) {}
RGWBucketInfo bucket_info;
map<string, bufferlist> attrs;
rgw_bucket bucket;
RGWBucketInfo *bucket_info;
map<string, bufferlist> *pattrs;
+ const DoutPrefixProvider *dpp;
RGWAsyncGetBucketInstanceInfo *req{nullptr};
// rgw_bucket constructor
RGWGetBucketInstanceInfoCR(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RGWRadosStore *_store,
const rgw_bucket& _bucket, RGWBucketInfo *_bucket_info,
- map<string, bufferlist> *_pattrs)
+ map<string, bufferlist> *_pattrs, const DoutPrefixProvider *dpp)
: RGWSimpleCoroutine(_store->ctx()), async_rados(_async_rados), store(_store),
- bucket(_bucket), bucket_info(_bucket_info), pattrs(_pattrs) {}
+ bucket(_bucket), bucket_info(_bucket_info), pattrs(_pattrs), dpp(dpp) {}
~RGWGetBucketInstanceInfoCR() override {
request_cleanup();
}
}
}
- int send_request() override {
- req = new RGWAsyncGetBucketInstanceInfo(this, stack->create_completion_notifier(), store, bucket);
+ int send_request(const DoutPrefixProvider *dpp) override {
+ req = new RGWAsyncGetBucketInstanceInfo(this, stack->create_completion_notifier(), store, bucket, dpp);
async_rados->queue(req);
return 0;
}
std::string end_marker;
boost::intrusive_ptr<RGWAioCompletionNotifier> cn;
public:
- RGWRadosBILogTrimCR(rgw::sal::RGWRadosStore *store, const RGWBucketInfo& bucket_info,
+ RGWRadosBILogTrimCR(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store, const RGWBucketInfo& bucket_info,
int shard_id, const std::string& start_marker,
const std::string& end_marker);
- int send_request() override;
+ int send_request(const DoutPrefixProvider *dpp) override;
int request_complete() override;
};
const DoutPrefixProvider *dpp;
protected:
- int _send_request() override;
+ int _send_request(const DoutPrefixProvider *dpp) override;
public:
RGWAsyncFetchRemoteObj(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RGWRadosStore *_store,
const rgw_zone_id& _source_zone,
}
}
- int send_request() override {
+ int send_request(const DoutPrefixProvider *dpp) override {
req = new RGWAsyncFetchRemoteObj(this, stack->create_completion_notifier(), store,
source_zone, user_id, src_bucket, dest_placement_rule, dest_bucket_info,
key, dest_key, versioned_epoch, copy_if_newer, filter,
map<string, string> *pheaders;
protected:
- int _send_request() override;
+ int _send_request(const DoutPrefixProvider *dpp) override;
public:
RGWAsyncStatRemoteObj(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RGWRadosStore *_store,
const rgw_zone_id& _source_zone,
}
}
- int send_request() override {
+ int send_request(const DoutPrefixProvider *dpp) override {
req = new RGWAsyncStatRemoteObj(this, stack->create_completion_notifier(), store, source_zone,
src_bucket, key, pmtime, psize, petag, pattrs, pheaders);
async_rados->queue(req);
};
class RGWAsyncRemoveObj : public RGWAsyncRadosRequest {
+ const DoutPrefixProvider *dpp;
rgw::sal::RGWRadosStore *store;
rgw_zone_id source_zone;
rgw_zone_set zones_trace;
protected:
- int _send_request() override;
+ int _send_request(const DoutPrefixProvider *dpp) override;
public:
- RGWAsyncRemoveObj(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RGWRadosStore *_store,
+ RGWAsyncRemoveObj(const DoutPrefixProvider *_dpp, RGWCoroutine *caller, RGWAioCompletionNotifier *cn,
+ rgw::sal::RGWRadosStore *_store,
const rgw_zone_id& _source_zone,
RGWBucketInfo& _bucket_info,
const rgw_obj_key& _key,
bool _delete_marker,
bool _if_older,
real_time& _timestamp,
- rgw_zone_set* _zones_trace) : RGWAsyncRadosRequest(caller, cn), store(_store),
+ rgw_zone_set* _zones_trace) : RGWAsyncRadosRequest(caller, cn), dpp(_dpp), store(_store),
source_zone(_source_zone),
bucket_info(_bucket_info),
key(_key),
};
class RGWRemoveObjCR : public RGWSimpleCoroutine {
+ const DoutPrefixProvider *dpp;
CephContext *cct;
RGWAsyncRadosProcessor *async_rados;
rgw::sal::RGWRadosStore *store;
rgw_zone_set *zones_trace;
public:
- RGWRemoveObjCR(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RGWRadosStore *_store,
+ RGWRemoveObjCR(const DoutPrefixProvider *_dpp, RGWAsyncRadosProcessor *_async_rados, rgw::sal::RGWRadosStore *_store,
const rgw_zone_id& _source_zone,
RGWBucketInfo& _bucket_info,
const rgw_obj_key& _key,
string *_owner_display_name,
bool _delete_marker,
real_time *_timestamp,
- rgw_zone_set *_zones_trace) : RGWSimpleCoroutine(_store->ctx()), cct(_store->ctx()),
+ rgw_zone_set *_zones_trace) : RGWSimpleCoroutine(_store->ctx()), dpp(_dpp), cct(_store->ctx()),
async_rados(_async_rados), store(_store),
source_zone(_source_zone),
bucket_info(_bucket_info),
}
}
- int send_request() override {
- req = new RGWAsyncRemoveObj(this, stack->create_completion_notifier(), store, source_zone, bucket_info,
+ int send_request(const DoutPrefixProvider *dpp) override {
+ req = new RGWAsyncRemoveObj(dpp, this, stack->create_completion_notifier(), store, source_zone, bucket_info,
key, owner, owner_display_name, versioned, versioned_epoch,
delete_marker, del_if_older, timestamp, zones_trace);
async_rados->queue(req);
interval(_interval), caller(_caller)
{}
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
bool is_locked() const {
return locked;
};
class RGWRadosTimelogAddCR : public RGWSimpleCoroutine {
+ const DoutPrefixProvider *dpp;
rgw::sal::RGWRadosStore *store;
list<cls_log_entry> entries;
boost::intrusive_ptr<RGWAioCompletionNotifier> cn;
public:
- RGWRadosTimelogAddCR(rgw::sal::RGWRadosStore *_store, const string& _oid,
+ RGWRadosTimelogAddCR(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *_store, const string& _oid,
const cls_log_entry& entry);
- int send_request() override;
+ int send_request(const DoutPrefixProvider *dpp) override;
int request_complete() override;
};
class RGWRadosTimelogTrimCR : public RGWSimpleCoroutine {
+ const DoutPrefixProvider *dpp;
rgw::sal::RGWRadosStore *store;
boost::intrusive_ptr<RGWAioCompletionNotifier> cn;
protected:
std::string to_marker;
public:
- RGWRadosTimelogTrimCR(rgw::sal::RGWRadosStore *store, const std::string& oid,
+ RGWRadosTimelogTrimCR(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store, const std::string& oid,
const real_time& start_time, const real_time& end_time,
const std::string& from_marker,
const std::string& to_marker);
- int send_request() override;
+ int send_request(const DoutPrefixProvider *dpp) override;
int request_complete() override;
};
public:
static constexpr const char* max_marker = "99999999";
- RGWSyncLogTrimCR(rgw::sal::RGWRadosStore *store, const std::string& oid,
+ RGWSyncLogTrimCR(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store, const std::string& oid,
const std::string& to_marker, std::string *last_trim_marker);
int request_complete() override;
};
class RGWAsyncStatObj : public RGWAsyncRadosRequest {
+ const DoutPrefixProvider *dpp;
rgw::sal::RGWRadosStore *store;
RGWBucketInfo bucket_info;
rgw_obj obj;
uint64_t *pepoch;
RGWObjVersionTracker *objv_tracker;
protected:
- int _send_request() override;
+ int _send_request(const DoutPrefixProvider *dpp) override;
public:
- RGWAsyncStatObj(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RGWRadosStore *store,
+ RGWAsyncStatObj(const DoutPrefixProvider *dpp, RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RGWRadosStore *store,
const RGWBucketInfo& _bucket_info, const rgw_obj& obj, uint64_t *psize = nullptr,
real_time *pmtime = nullptr, uint64_t *pepoch = nullptr,
RGWObjVersionTracker *objv_tracker = nullptr)
- : RGWAsyncRadosRequest(caller, cn), store(store), obj(obj), psize(psize),
+ : RGWAsyncRadosRequest(caller, cn), dpp(dpp), store(store), obj(obj), psize(psize),
pmtime(pmtime), pepoch(pepoch), objv_tracker(objv_tracker) {}
};
class RGWStatObjCR : public RGWSimpleCoroutine {
+ const DoutPrefixProvider *dpp;
rgw::sal::RGWRadosStore *store;
RGWAsyncRadosProcessor *async_rados;
RGWBucketInfo bucket_info;
RGWObjVersionTracker *objv_tracker;
RGWAsyncStatObj *req = nullptr;
public:
- RGWStatObjCR(RGWAsyncRadosProcessor *async_rados, rgw::sal::RGWRadosStore *store,
+ RGWStatObjCR(const DoutPrefixProvider *dpp, RGWAsyncRadosProcessor *async_rados, rgw::sal::RGWRadosStore *store,
const RGWBucketInfo& _bucket_info, const rgw_obj& obj, uint64_t *psize = nullptr,
real_time* pmtime = nullptr, uint64_t *pepoch = nullptr,
RGWObjVersionTracker *objv_tracker = nullptr);
}
void request_cleanup() override;
- int send_request() override;
+ int send_request(const DoutPrefixProvider *dpp) override;
int request_complete() override;
};
bufferlist& request, uint64_t timeout_ms,
bufferlist *response);
- int send_request() override;
+ int send_request(const DoutPrefixProvider *dpp) override;
int request_complete() override;
};
}
}
-int RGWStreamReadHTTPResourceCRF::init()
+int RGWStreamReadHTTPResourceCRF::init(const DoutPrefixProvider *dpp)
{
env->stack->init_new_io(req);
}
}
-void RGWStreamWriteHTTPResourceCRF::send_ready(const rgw_rest_obj& rest_obj)
+void RGWStreamWriteHTTPResourceCRF::send_ready(const DoutPrefixProvider *dpp, const rgw_rest_obj& rest_obj)
{
req->set_send_length(rest_obj.content_len);
for (auto h : rest_obj.attrs) {
in_crf(_in_crf), out_crf(_out_crf) {}
RGWStreamSpliceCR::~RGWStreamSpliceCR() { }
-int RGWStreamSpliceCR::operate() {
+int RGWStreamSpliceCR::operate(const DoutPrefixProvider *dpp) {
reenter(this) {
{
- int ret = in_crf->init();
+ int ret = in_crf->init(dpp);
if (ret < 0) {
return set_cr_error(ret);
}
if (ret < 0) {
return set_cr_error(ret);
}
- out_crf->send_ready(in_crf->get_rest_obj());
+ out_crf->send_ready(dpp, in_crf->get_rest_obj());
ret = out_crf->send();
if (ret < 0) {
return set_cr_error(ret);
request_cleanup();
}
- int send_request() override {
+ int send_request(const DoutPrefixProvider *dpp) override {
auto op = boost::intrusive_ptr<RGWRESTReadResource>(
new RGWRESTReadResource(conn, path, params, &extra_headers, http_manager));
init_new_io(op.get());
- int ret = op->aio_read();
+ int ret = op->aio_read(dpp);
if (ret < 0) {
log_error() << "failed to send http operation: " << op->to_str()
<< " ret=" << ret << std::endl;
request_cleanup();
}
- int send_request() override {
+ int send_request(const DoutPrefixProvider *dpp) override {
auto op = boost::intrusive_ptr<RGWRESTSendResource>(
new RGWRESTSendResource(conn, method, path, params, &headers, http_manager));
init_new_io(op.get());
- int ret = op->aio_send(input_bl);
+ int ret = op->aio_send(dpp, input_bl);
if (ret < 0) {
- lsubdout(cct, rgw, 0) << "ERROR: failed to send request" << dendl;
+ ldpp_subdout(dpp, rgw, 0) << "ERROR: failed to send request" << dendl;
op->put();
return ret;
}
request_cleanup();
}
- int send_request() override {
+ int send_request(const DoutPrefixProvider *dpp) override {
auto op = boost::intrusive_ptr<RGWRESTDeleteResource>(
new RGWRESTDeleteResource(conn, path, params, nullptr, http_manager));
bufferlist bl;
- int ret = op->aio_send(bl);
+ int ret = op->aio_send(dpp, bl);
if (ret < 0) {
- lsubdout(cct, rgw, 0) << "ERROR: failed to send DELETE request" << dendl;
+ ldpp_subdout(dpp, rgw, 0) << "ERROR: failed to send DELETE request" << dendl;
op->put();
return ret;
}
boost::asio::coroutine read_state;
public:
- virtual int init() = 0;
+ virtual int init(const DoutPrefixProvider *dpp) = 0;
virtual int read(bufferlist *data, uint64_t max, bool *need_retry) = 0; /* reentrant */
virtual int decode_rest_obj(map<string, string>& headers, bufferlist& extra_data) = 0;
virtual bool has_attrs() = 0;
public:
virtual int init() = 0;
- virtual void send_ready(const rgw_rest_obj& rest_obj) = 0;
+ virtual void send_ready(const DoutPrefixProvider *dpp, const rgw_rest_obj& rest_obj) = 0;
virtual int send() = 0;
virtual int write(bufferlist& data, bool *need_retry) = 0; /* reentrant */
virtual int drain_writes(bool *need_retry) = 0; /* reentrant */
}
~RGWStreamReadHTTPResourceCRF();
- int init() override;
+ int init(const DoutPrefixProvider *dpp) override;
int read(bufferlist *data, uint64_t max, bool *need_retry) override; /* reentrant */
int decode_rest_obj(map<string, string>& headers, bufferlist& extra_data) override;
bool has_attrs() override;
int init() override {
return 0;
}
- void send_ready(const rgw_rest_obj& rest_obj) override;
+ void send_ready(const DoutPrefixProvider *dpp, const rgw_rest_obj& rest_obj) override;
int send() override;
int write(bufferlist& data, bool *need_retry) override; /* reentrant */
void write_drain_notify(uint64_t pending_size);
std::shared_ptr<RGWStreamWriteHTTPResourceCRF>& _out_crf);
~RGWStreamSpliceCR();
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
};
#define dout_subsys ceph_subsys_rgw
template<>
-int RGWUserCreateCR::Request::_send_request()
+int RGWUserCreateCR::Request::_send_request(const DoutPrefixProvider *dpp)
{
CephContext *cct = store->ctx();
}
RGWNullFlusher flusher;
- return RGWUserAdminOp_User::create(store, op_state, flusher, null_yield);
+ return RGWUserAdminOp_User::create(dpp, store, op_state, flusher, null_yield);
}
template<>
-int RGWGetUserInfoCR::Request::_send_request()
+int RGWGetUserInfoCR::Request::_send_request(const DoutPrefixProvider *dpp)
{
- return store->ctl()->user->get_info_by_uid(params.user, result.get(), null_yield);
+ return store->ctl()->user->get_info_by_uid(dpp, params.user, result.get(), null_yield);
}
template<>
-int RGWGetBucketInfoCR::Request::_send_request()
+int RGWGetBucketInfoCR::Request::_send_request(const DoutPrefixProvider *dpp)
{
return store->getRados()->get_bucket_info(store->svc(), params.tenant, params.bucket_name,
- result->bucket_info, &result->mtime, null_yield, &result->attrs);
+ result->bucket_info, &result->mtime, null_yield, dpp, &result->attrs);
}
template<>
-int RGWBucketCreateLocalCR::Request::_send_request()
+int RGWBucketCreateLocalCR::Request::_send_request(const DoutPrefixProvider *dpp)
{
CephContext *cct = store->ctx();
auto& zone_svc = store->svc()->zone;
if (!placement_rule.empty() &&
!zone_svc->get_zone_params().valid_placement(placement_rule)) {
- ldout(cct, 0) << "placement target (" << placement_rule << ")"
+ ldpp_dout(dpp, 0) << "placement target (" << placement_rule << ")"
<< " doesn't exist in the placement targets of zonegroup"
<< " (" << zone_svc->get_zonegroup().api_name << ")" << dendl;
return -ERR_INVALID_LOCATION_CONSTRAINT;
map<string, bufferlist> bucket_attrs;
int ret = store->getRados()->get_bucket_info(store->svc(), user.tenant, bucket_name,
- bucket_info, nullptr, null_yield, &bucket_attrs);
+ bucket_info, nullptr, null_yield, dpp, &bucket_attrs);
if (ret < 0 && ret != -ENOENT)
return ret;
bool bucket_exists = (ret != -ENOENT);
bucket_owner.set_id(user);
bucket_owner.set_name(user_info->display_name);
if (bucket_exists) {
- ret = rgw_op_get_bucket_policy_from_attr(cct, store, bucket_info,
+ ret = rgw_op_get_bucket_policy_from_attr(dpp, cct, store, bucket_info,
bucket_attrs, &old_policy, null_yield);
if (ret >= 0) {
if (old_policy.get_owner().get_id().compare(user) != 0) {
rgw_bucket bucket;
bucket.tenant = user.tenant;
bucket.name = bucket_name;
- ret = zone_svc->select_bucket_placement(*user_info, zonegroup_id,
+ ret = zone_svc->select_bucket_placement(dpp, *user_info, zonegroup_id,
placement_rule,
&selected_placement_rule, nullptr, null_yield);
if (selected_placement_rule != bucket_info.placement_rule) {
- ldout(cct, 0) << "bucket already exists on a different placement rule: "
+ ldpp_dout(dpp, 0) << "bucket already exists on a different placement rule: "
<< " selected_rule= " << selected_placement_rule
<< " existing_rule= " << bucket_info.placement_rule << dendl;
return -EEXIST;
placement_rule, bucket_info.swift_ver_location,
pquota_info, attrs,
info, nullptr, &ep_objv, creation_time,
- pmaster_bucket, pmaster_num_shards, null_yield, true);
+ pmaster_bucket, pmaster_num_shards, null_yield, dpp, true);
if (ret && ret != -EEXIST)
if (existed) {
if (info.owner != user) {
- ldout(cct, 20) << "NOTICE: bucket already exists under a different user (bucket=" << bucket << " user=" << user << " bucket_owner=" << info.owner << dendl;
+ ldpp_dout(dpp, 20) << "NOTICE: bucket already exists under a different user (bucket=" << bucket << " user=" << user << " bucket_owner=" << info.owner << dendl;
return -EEXIST;
}
bucket = info.bucket;
}
- ret = store->ctl()->bucket->link_bucket(user, bucket, info.creation_time, null_yield, false);
+ ret = store->ctl()->bucket->link_bucket(user, bucket, info.creation_time, null_yield, dpp, false);
if (ret && !existed && ret != -EEXIST) {
/* if it exists (or previously existed), don't remove it! */
- int r = store->ctl()->bucket->unlink_bucket(user, bucket, null_yield);
+ int r = store->ctl()->bucket->unlink_bucket(user, bucket, null_yield, dpp);
if (r < 0) {
- ldout(cct, 0) << "WARNING: failed to unlink bucket: ret=" << r << dendl;
+ ldpp_dout(dpp, 0) << "WARNING: failed to unlink bucket: ret=" << r << dendl;
}
} else if (ret == -EEXIST || (ret == 0 && existed)) {
ret = -ERR_BUCKET_EXISTS;
}
if (ret < 0) {
- ldout(cct, 0) << "ERROR: bucket creation (bucket=" << bucket << ") return ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: bucket creation (bucket=" << bucket << ") return ret=" << ret << dendl;
}
return ret;
}
template<>
-int RGWObjectSimplePutCR::Request::_send_request()
+int RGWObjectSimplePutCR::Request::_send_request(const DoutPrefixProvider *dpp)
{
RGWDataAccess::ObjectRef obj;
ret = obj->put(params.data, params.attrs, dpp, null_yield);
if (ret < 0) {
- lderr(cct) << "ERROR: put object returned error: " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: put object returned error: " << cpp_strerror(-ret) << dendl;
}
return 0;
}
template<>
-int RGWBucketLifecycleConfigCR::Request::_send_request()
+int RGWBucketLifecycleConfigCR::Request::_send_request(const DoutPrefixProvider *dpp)
{
CephContext *cct = store->ctx();
}
template<>
-int RGWBucketGetSyncPolicyHandlerCR::Request::_send_request()
+int RGWBucketGetSyncPolicyHandlerCR::Request::_send_request(const DoutPrefixProvider *dpp)
{
- CephContext *cct = store->ctx();
-
int r = store->ctl()->bucket->get_sync_policy_handler(params.zone,
params.bucket,
&result->policy_handler,
- null_yield);
+ null_yield,
+ dpp);
if (r < 0) {
- lderr(cct) << "ERROR: " << __func__ << "(): get_sync_policy_handler() returned " << r << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: " << __func__ << "(): get_sync_policy_handler() returned " << r << dendl;
return r;
}
RGWGetObj_BlockDecrypt::~RGWGetObj_BlockDecrypt() {
}
-int RGWGetObj_BlockDecrypt::read_manifest(bufferlist& manifest_bl) {
+int RGWGetObj_BlockDecrypt::read_manifest(const DoutPrefixProvider *dpp, bufferlist& manifest_bl) {
parts_len.clear();
RGWObjManifest manifest;
if (manifest_bl.length()) {
try {
decode(manifest, miter);
} catch (buffer::error& err) {
- ldout(cct, 0) << "ERROR: couldn't decode manifest" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: couldn't decode manifest" << dendl;
return -EIO;
}
RGWObjManifest::obj_iterator mi;
- for (mi = manifest.obj_begin(); mi != manifest.obj_end(); ++mi) {
+ for (mi = manifest.obj_begin(dpp); mi != manifest.obj_end(dpp); ++mi) {
if (mi.get_cur_stripe() == 0) {
parts_len.push_back(0);
}
}
if (cct->_conf->subsys.should_gather<ceph_subsys_rgw, 20>()) {
for (size_t i = 0; i<parts_len.size(); i++) {
- ldout(cct, 20) << "Manifest part " << i << ", size=" << parts_len[i] << dendl;
+ ldpp_dout(dpp, 20) << "Manifest part " << i << ", size=" << parts_len[i] << dendl;
}
}
}
get_crypt_attribute(s->info.env, parts, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM);
if (! req_sse_ca.empty()) {
if (req_sse_ca != "AES256") {
- ldout(s->cct, 5) << "ERROR: Invalid value for header "
+ ldpp_dout(s, 5) << "ERROR: Invalid value for header "
<< "x-amz-server-side-encryption-customer-algorithm"
<< dendl;
s->err.message = "The requested encryption algorithm is not valid, must be AES256.";
}
if (s->cct->_conf->rgw_crypt_require_ssl &&
!rgw_transport_is_secure(s->cct, *s->info.env)) {
- ldout(s->cct, 5) << "ERROR: Insecure request, rgw_crypt_require_ssl is set" << dendl;
+ ldpp_dout(s, 5) << "ERROR: Insecure request, rgw_crypt_require_ssl is set" << dendl;
return -ERR_INVALID_REQUEST;
}
key_bin = from_base64(
get_crypt_attribute(s->info.env, parts, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY) );
} catch (...) {
- ldout(s->cct, 5) << "ERROR: rgw_s3_prepare_encrypt invalid encryption "
+ ldpp_dout(s, 5) << "ERROR: rgw_s3_prepare_encrypt invalid encryption "
<< "key which contains character that is not base64 encoded."
<< dendl;
s->err.message = "Requests specifying Server Side Encryption with Customer "
}
if (key_bin.size() != AES_256_CBC::AES_256_KEYSIZE) {
- ldout(s->cct, 5) << "ERROR: invalid encryption key size" << dendl;
+ ldpp_dout(s, 5) << "ERROR: invalid encryption key size" << dendl;
s->err.message = "Requests specifying Server Side Encryption with Customer "
"provided keys must provide an appropriate secret key.";
return -EINVAL;
try {
keymd5_bin = from_base64(keymd5);
} catch (...) {
- ldout(s->cct, 5) << "ERROR: rgw_s3_prepare_encrypt invalid encryption key "
+ ldpp_dout(s, 5) << "ERROR: rgw_s3_prepare_encrypt invalid encryption key "
<< "md5 which contains character that is not base64 encoded."
<< dendl;
s->err.message = "Requests specifying Server Side Encryption with Customer "
}
if (keymd5_bin.size() != CEPH_CRYPTO_MD5_DIGESTSIZE) {
- ldout(s->cct, 5) << "ERROR: Invalid key md5 size" << dendl;
+ ldpp_dout(s, 5) << "ERROR: Invalid key md5 size" << dendl;
s->err.message = "Requests specifying Server Side Encryption with Customer "
"provided keys must provide an appropriate secret key md5.";
return -EINVAL;
key_hash.Final(key_hash_res);
if (memcmp(key_hash_res, keymd5_bin.c_str(), CEPH_CRYPTO_MD5_DIGESTSIZE) != 0) {
- ldout(s->cct, 5) << "ERROR: Invalid key md5 hash" << dendl;
+ ldpp_dout(s, 5) << "ERROR: Invalid key md5 hash" << dendl;
s->err.message = "The calculated MD5 hash of the key did not match the hash that was provided.";
return -EINVAL;
}
std::string_view customer_key =
get_crypt_attribute(s->info.env, parts, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY);
if (!customer_key.empty()) {
- ldout(s->cct, 5) << "ERROR: SSE-C encryption request is missing the header "
+ ldpp_dout(s, 5) << "ERROR: SSE-C encryption request is missing the header "
<< "x-amz-server-side-encryption-customer-algorithm"
<< dendl;
s->err.message = "Requests specifying Server Side Encryption with Customer "
std::string_view customer_key_md5 =
get_crypt_attribute(s->info.env, parts, X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY_MD5);
if (!customer_key_md5.empty()) {
- ldout(s->cct, 5) << "ERROR: SSE-C encryption request is missing the header "
+ ldpp_dout(s, 5) << "ERROR: SSE-C encryption request is missing the header "
<< "x-amz-server-side-encryption-customer-algorithm"
<< dendl;
s->err.message = "Requests specifying Server Side Encryption with Customer "
if (s->cct->_conf->rgw_crypt_require_ssl &&
!rgw_transport_is_secure(s->cct, *s->info.env)) {
- ldout(s->cct, 5) << "ERROR: insecure request, rgw_crypt_require_ssl is set" << dendl;
+ ldpp_dout(s, 5) << "ERROR: insecure request, rgw_crypt_require_ssl is set" << dendl;
return -ERR_INVALID_REQUEST;
}
std::string_view key_id =
get_crypt_attribute(s->info.env, parts, X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID);
if (key_id.empty()) {
- ldout(s->cct, 5) << "ERROR: not provide a valid key id" << dendl;
+ ldpp_dout(s, 5) << "ERROR: not provide a valid key id" << dendl;
s->err.message = "Server Side Encryption with KMS managed key requires "
"HTTP header x-amz-server-side-encryption-aws-kms-key-id";
return -ERR_INVALID_ACCESS_KEY;
std::string actual_key;
res = make_actual_key_from_kms(s->cct, attrs, actual_key);
if (res != 0) {
- ldout(s->cct, 5) << "ERROR: failed to retrieve actual key from key_id: " << key_id << dendl;
+ ldpp_dout(s, 5) << "ERROR: failed to retrieve actual key from key_id: " << key_id << dendl;
s->err.message = "Failed to retrieve the actual key, kms-keyid: " + std::string(key_id);
return res;
}
if (actual_key.size() != AES_256_KEYSIZE) {
- ldout(s->cct, 5) << "ERROR: key obtained from key_id:" <<
+ ldpp_dout(s, 5) << "ERROR: key obtained from key_id:" <<
key_id << " is not 256 bit size" << dendl;
s->err.message = "KMS provided an invalid key for the given kms-keyid.";
return -ERR_INVALID_ACCESS_KEY;
} else if (req_sse == "AES256") {
/* if a default encryption key was provided, we will use it for SSE-S3 */
} else {
- ldout(s->cct, 5) << "ERROR: Invalid value for header x-amz-server-side-encryption"
+ ldpp_dout(s, 5) << "ERROR: Invalid value for header x-amz-server-side-encryption"
<< dendl;
s->err.message = "Server Side Encryption with KMS managed key requires "
"HTTP header x-amz-server-side-encryption : aws:kms or AES256";
get_crypt_attribute(s->info.env, parts,
X_AMZ_SERVER_SIDE_ENCRYPTION_AWS_KMS_KEY_ID);
if (!key_id.empty()) {
- ldout(s->cct, 5) << "ERROR: SSE-KMS encryption request is missing the header "
+ ldpp_dout(s, 5) << "ERROR: SSE-KMS encryption request is missing the header "
<< "x-amz-server-side-encryption"
<< dendl;
s->err.message = "Server Side Encryption with KMS managed key requires "
try {
master_encryption_key = from_base64(s->cct->_conf->rgw_crypt_default_encryption_key);
} catch (...) {
- ldout(s->cct, 5) << "ERROR: rgw_s3_prepare_encrypt invalid default encryption key "
+ ldpp_dout(s, 5) << "ERROR: rgw_s3_prepare_encrypt invalid default encryption key "
<< "which contains character that is not base64 encoded."
<< dendl;
s->err.message = "Requests specifying Server Side Encryption with Customer "
}
if (master_encryption_key.size() != 256 / 8) {
- ldout(s->cct, 0) << "ERROR: failed to decode 'rgw crypt default encryption key' to 256 bit string" << dendl;
+ ldpp_dout(s, 0) << "ERROR: failed to decode 'rgw crypt default encryption key' to 256 bit string" << dendl;
/* not an error to return; missing encryption does not inhibit processing */
return 0;
}
{
int res = 0;
std::string stored_mode = get_str_attribute(attrs, RGW_ATTR_CRYPT_MODE);
- ldout(s->cct, 15) << "Encryption mode: " << stored_mode << dendl;
+ ldpp_dout(s, 15) << "Encryption mode: " << stored_mode << dendl;
const char *req_sse = s->info.env->get("HTTP_X_AMZ_SERVER_SIDE_ENCRYPTION", NULL);
if (nullptr != req_sse && (s->op == OP_GET || s->op == OP_HEAD)) {
if (stored_mode == "SSE-C-AES256") {
if (s->cct->_conf->rgw_crypt_require_ssl &&
!rgw_transport_is_secure(s->cct, *s->info.env)) {
- ldout(s->cct, 5) << "ERROR: Insecure request, rgw_crypt_require_ssl is set" << dendl;
+ ldpp_dout(s, 5) << "ERROR: Insecure request, rgw_crypt_require_ssl is set" << dendl;
return -ERR_INVALID_REQUEST;
}
const char *req_cust_alg =
s->info.env->get("HTTP_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_ALGORITHM", NULL);
if (nullptr == req_cust_alg) {
- ldout(s->cct, 5) << "ERROR: Request for SSE-C encrypted object missing "
+ ldpp_dout(s, 5) << "ERROR: Request for SSE-C encrypted object missing "
<< "x-amz-server-side-encryption-customer-algorithm"
<< dendl;
s->err.message = "Requests specifying Server Side Encryption with Customer "
"provided keys must provide a valid encryption algorithm.";
return -EINVAL;
} else if (strcmp(req_cust_alg, "AES256") != 0) {
- ldout(s->cct, 5) << "ERROR: The requested encryption algorithm is not valid, must be AES256." << dendl;
+ ldpp_dout(s, 5) << "ERROR: The requested encryption algorithm is not valid, must be AES256." << dendl;
s->err.message = "The requested encryption algorithm is not valid, must be AES256.";
return -ERR_INVALID_ENCRYPTION_ALGORITHM;
}
try {
key_bin = from_base64(s->info.env->get("HTTP_X_AMZ_SERVER_SIDE_ENCRYPTION_CUSTOMER_KEY", ""));
} catch (...) {
- ldout(s->cct, 5) << "ERROR: rgw_s3_prepare_decrypt invalid encryption key "
+ ldpp_dout(s, 5) << "ERROR: rgw_s3_prepare_decrypt invalid encryption key "
<< "which contains character that is not base64 encoded."
<< dendl;
s->err.message = "Requests specifying Server Side Encryption with Customer "
}
if (key_bin.size() != AES_256_CBC::AES_256_KEYSIZE) {
- ldout(s->cct, 5) << "ERROR: Invalid encryption key size" << dendl;
+ ldpp_dout(s, 5) << "ERROR: Invalid encryption key size" << dendl;
s->err.message = "Requests specifying Server Side Encryption with Customer "
"provided keys must provide an appropriate secret key.";
return -EINVAL;
try {
keymd5_bin = from_base64(keymd5);
} catch (...) {
- ldout(s->cct, 5) << "ERROR: rgw_s3_prepare_decrypt invalid encryption key md5 "
+ ldpp_dout(s, 5) << "ERROR: rgw_s3_prepare_decrypt invalid encryption key md5 "
<< "which contains character that is not base64 encoded."
<< dendl;
s->err.message = "Requests specifying Server Side Encryption with Customer "
if (keymd5_bin.size() != CEPH_CRYPTO_MD5_DIGESTSIZE) {
- ldout(s->cct, 5) << "ERROR: Invalid key md5 size " << dendl;
+ ldpp_dout(s, 5) << "ERROR: Invalid key md5 size " << dendl;
s->err.message = "Requests specifying Server Side Encryption with Customer "
"provided keys must provide an appropriate secret key md5.";
return -EINVAL;
if (stored_mode == "SSE-KMS") {
if (s->cct->_conf->rgw_crypt_require_ssl &&
!rgw_transport_is_secure(s->cct, *s->info.env)) {
- ldout(s->cct, 5) << "ERROR: Insecure request, rgw_crypt_require_ssl is set" << dendl;
+ ldpp_dout(s, 5) << "ERROR: Insecure request, rgw_crypt_require_ssl is set" << dendl;
return -ERR_INVALID_REQUEST;
}
/* try to retrieve actual key */
std::string actual_key;
res = reconstitute_actual_key_from_kms(s->cct, attrs, actual_key);
if (res != 0) {
- ldout(s->cct, 10) << "ERROR: failed to retrieve actual key from key_id: " << key_id << dendl;
+ ldpp_dout(s, 10) << "ERROR: failed to retrieve actual key from key_id: " << key_id << dendl;
s->err.message = "Failed to retrieve the actual key, kms-keyid: " + key_id;
return res;
}
if (actual_key.size() != AES_256_KEYSIZE) {
- ldout(s->cct, 0) << "ERROR: key obtained from key_id:" <<
+ ldpp_dout(s, 0) << "ERROR: key obtained from key_id:" <<
key_id << " is not 256 bit size" << dendl;
s->err.message = "KMS provided an invalid key for the given kms-keyid.";
return -ERR_INVALID_ACCESS_KEY;
try {
master_encryption_key = from_base64(std::string(s->cct->_conf->rgw_crypt_default_encryption_key));
} catch (...) {
- ldout(s->cct, 5) << "ERROR: rgw_s3_prepare_decrypt invalid default encryption key "
+ ldpp_dout(s, 5) << "ERROR: rgw_s3_prepare_decrypt invalid default encryption key "
<< "which contains character that is not base64 encoded."
<< dendl;
s->err.message = "The default encryption key is not valid base64.";
}
if (master_encryption_key.size() != 256 / 8) {
- ldout(s->cct, 0) << "ERROR: failed to decode 'rgw crypt default encryption key' to 256 bit string" << dendl;
+ ldpp_dout(s, 0) << "ERROR: failed to decode 'rgw crypt default encryption key' to 256 bit string" << dendl;
return -EIO;
}
std::string attr_key_selector = get_str_attribute(attrs, RGW_ATTR_CRYPT_KEYSEL);
if (attr_key_selector.size() != AES_256_CBC::AES_256_KEYSIZE) {
- ldout(s->cct, 0) << "ERROR: missing or invalid " RGW_ATTR_CRYPT_KEYSEL << dendl;
+ ldpp_dout(s, 0) << "ERROR: missing or invalid " RGW_ATTR_CRYPT_KEYSEL << dendl;
return -EIO;
}
uint8_t actual_key[AES_256_KEYSIZE];
off_t bl_len) override;
virtual int flush() override;
- int read_manifest(bufferlist& manifest_bl);
+ int read_manifest(const DoutPrefixProvider *dpp, bufferlist& manifest_bl);
}; /* RGWGetObj_BlockDecrypt */
return false;
}
using CR = RGWSimpleRadosReadCR<rgw_data_sync_marker>;
- spawn(new CR(env->async_rados, env->svc->sysobj,
+ spawn(new CR(env->dpp, env->async_rados, env->svc->sysobj,
rgw_raw_obj(env->svc->zone->get_zone_params().log_pool, RGWDataSyncStatusManager::shard_obj_name(sc->source_zone, shard_id)),
&markers[shard_id]),
false);
rgw_data_sync_status *_status)
: RGWCoroutine(_sc->cct), sc(_sc), sync_env(sc->env), sync_status(_status)
{}
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
};
-int RGWReadDataSyncStatusCoroutine::operate()
+int RGWReadDataSyncStatusCoroutine::operate(const DoutPrefixProvider *dpp)
{
reenter(this) {
// read sync info
using ReadInfoCR = RGWSimpleRadosReadCR<rgw_data_sync_info>;
yield {
bool empty_on_enoent = false; // fail on ENOENT
- call(new ReadInfoCR(sync_env->async_rados, sync_env->svc->sysobj,
+ call(new ReadInfoCR(dpp, sync_env->async_rados, sync_env->svc->sysobj,
rgw_raw_obj(sync_env->svc->zone->get_zone_params().log_pool, RGWDataSyncStatusManager::sync_status_oid(sc->source_zone)),
&sync_status->sync_info, empty_on_enoent));
}
if (retcode < 0) {
- ldout(sync_env->cct, 4) << "failed to read sync status info with "
+ ldpp_dout(dpp, 4) << "failed to read sync status info with "
<< cpp_strerror(retcode) << dendl;
return set_cr_error(retcode);
}
yield call(new ReadMarkersCR(sc, sync_status->sync_info.num_shards,
sync_status->sync_markers));
if (retcode < 0) {
- ldout(sync_env->cct, 4) << "failed to read sync status markers with "
+ ldpp_dout(dpp, 4) << "failed to read sync status markers with "
<< cpp_strerror(retcode) << dendl;
return set_cr_error(retcode);
}
}
}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
yield {
char buf[16];
init_new_io(http_op);
- int ret = http_op->aio_read();
+ int ret = http_op->aio_read(dpp);
if (ret < 0) {
- ldout(sync_env->cct, 0) << "ERROR: failed to read from " << p << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to read from " << p << dendl;
log_error() << "failed to send http operation: " << http_op->to_str() << " ret=" << ret << std::endl;
return set_cr_error(ret);
}
}
}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
yield {
char buf[16];
if (sync_env->counters) {
timer.emplace(sync_env->counters, sync_counters::l_poll);
}
- int ret = http_op->aio_read();
+ int ret = http_op->aio_read(dpp);
if (ret < 0) {
- ldout(sync_env->cct, 0) << "ERROR: failed to read from " << p << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to read from " << p << dendl;
log_error() << "failed to send http operation: " << http_op->to_str() << " ret=" << ret << std::endl;
if (sync_env->counters) {
sync_env->counters->inc(sync_counters::l_poll_err);
: RGWSimpleCoroutine(sc->cct), sc(sc), sync_env(sc->env), http_op(NULL),
shard_id(_shard_id), marker(_marker), max_entries(_max_entries), result(_result) {}
- int send_request() override {
+ int send_request(const DoutPrefixProvider *dpp) override {
RGWRESTConn *conn = sc->conn;
char buf[32];
http_op = new RGWRESTReadResource(conn, p, pairs, NULL, sync_env->http_manager);
init_new_io(http_op);
- int ret = http_op->aio_read();
+ int ret = http_op->aio_read(dpp);
if (ret < 0) {
- ldout(sync_env->cct, 0) << "ERROR: failed to read from " << p << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to read from " << p << dendl;
log_error() << "failed to send http operation: " << http_op->to_str() << " ret=" << ret << std::endl;
http_op->put();
return ret;
int ret = http_op->wait(result, null_yield);
http_op->put();
if (ret < 0 && ret != -ENOENT) {
- ldout(sync_env->cct, 0) << "ERROR: failed to list remote datalog shard, ret=" << ret << dendl;
+ ldpp_dout(sync_env->dpp, 0) << "ERROR: failed to list remote datalog shard, ret=" << ret << dendl;
return ret;
}
return 0;
}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
int ret;
reenter(this) {
using LockCR = RGWSimpleRadosLockCR;
return set_cr_error(retcode);
}
using WriteInfoCR = RGWSimpleRadosWriteCR<rgw_data_sync_info>;
- yield call(new WriteInfoCR(sync_env->async_rados, sync_env->svc->sysobj,
+ yield call(new WriteInfoCR(dpp, sync_env->async_rados, sync_env->svc->sysobj,
rgw_raw_obj{pool, sync_status_oid},
status->sync_info));
if (retcode < 0) {
marker.timestamp = info.last_update;
const auto& oid = RGWDataSyncStatusManager::shard_obj_name(sc->source_zone, i);
using WriteMarkerCR = RGWSimpleRadosWriteCR<rgw_data_sync_marker>;
- spawn(new WriteMarkerCR(sync_env->async_rados, sync_env->svc->sysobj,
+ spawn(new WriteMarkerCR(dpp, sync_env->async_rados, sync_env->svc->sysobj,
rgw_raw_obj{pool, oid}, marker), true);
}
}
}
status->sync_info.state = rgw_data_sync_info::StateBuildingFullSyncMaps;
- yield call(new WriteInfoCR(sync_env->async_rados, sync_env->svc->sysobj,
+ yield call(new WriteInfoCR(dpp, sync_env->async_rados, sync_env->svc->sysobj,
rgw_raw_obj{pool, sync_status_oid},
status->sync_info));
if (retcode < 0) {
{
}
-int RGWRemoteDataLog::read_log_info(rgw_datalog_info *log_info)
+int RGWRemoteDataLog::read_log_info(const DoutPrefixProvider *dpp, rgw_datalog_info *log_info)
{
rgw_http_param_pair pairs[] = { { "type", "data" },
{ NULL, NULL } };
- int ret = sc.conn->get_json_resource("/admin/log", pairs, null_yield, *log_info);
+ int ret = sc.conn->get_json_resource(dpp, "/admin/log", pairs, null_yield, *log_info);
if (ret < 0) {
ldpp_dout(dpp, 0) << "ERROR: failed to fetch datalog info" << dendl;
return ret;
return 0;
}
-int RGWRemoteDataLog::read_source_log_shards_info(map<int, RGWDataChangesLogInfo> *shards_info)
+int RGWRemoteDataLog::read_source_log_shards_info(const DoutPrefixProvider *dpp, map<int, RGWDataChangesLogInfo> *shards_info)
{
rgw_datalog_info log_info;
- int ret = read_log_info(&log_info);
+ int ret = read_log_info(dpp, &log_info);
if (ret < 0) {
return ret;
}
- return run(new RGWReadRemoteDataLogInfoCR(&sc, log_info.num_shards, shards_info));
+ return run(dpp, new RGWReadRemoteDataLogInfoCR(&sc, log_info.num_shards, shards_info));
}
-int RGWRemoteDataLog::read_source_log_shards_next(map<int, string> shard_markers, map<int, rgw_datalog_shard_data> *result)
+int RGWRemoteDataLog::read_source_log_shards_next(const DoutPrefixProvider *dpp, map<int, string> shard_markers, map<int, rgw_datalog_shard_data> *result)
{
- return run(new RGWListRemoteDataLogCR(&sc, shard_markers, 1, result));
+ return run(dpp, new RGWListRemoteDataLogCR(&sc, shard_markers, 1, result));
}
int RGWRemoteDataLog::init(const rgw_zone_id& _source_zone, RGWRESTConn *_conn, RGWSyncErrorLogger *_error_logger,
stop();
}
-int RGWRemoteDataLog::read_sync_status(rgw_data_sync_status *sync_status)
+int RGWRemoteDataLog::read_sync_status(const DoutPrefixProvider *dpp, rgw_data_sync_status *sync_status)
{
// cannot run concurrently with run_sync(), so run in a separate manager
RGWCoroutinesManager crs(cct, cr_registry);
RGWDataSyncCtx sc_local = sc;
sc_local.env = &sync_env_local;
- ret = crs.run(new RGWReadDataSyncStatusCoroutine(&sc_local, sync_status));
+ ret = crs.run(dpp, new RGWReadDataSyncStatusCoroutine(&sc_local, sync_status));
http_manager.stop();
return ret;
}
-int RGWRemoteDataLog::read_recovering_shards(const int num_shards, set<int>& recovering_shards)
+int RGWRemoteDataLog::read_recovering_shards(const DoutPrefixProvider *dpp, const int num_shards, set<int>& recovering_shards)
{
// cannot run concurrently with run_sync(), so run in a separate manager
RGWCoroutinesManager crs(cct, cr_registry);
omapkeys.resize(num_shards);
uint64_t max_entries{1};
- ret = crs.run(new RGWReadDataSyncRecoveringShardsCR(&sc_local, max_entries, num_shards, omapkeys));
+ ret = crs.run(dpp, new RGWReadDataSyncRecoveringShardsCR(&sc_local, max_entries, num_shards, omapkeys));
http_manager.stop();
if (ret == 0) {
return ret;
}
-int RGWRemoteDataLog::init_sync_status(int num_shards)
+int RGWRemoteDataLog::init_sync_status(const DoutPrefixProvider *dpp, int num_shards)
{
rgw_data_sync_status sync_status;
sync_status.sync_info.num_shards = num_shards;
auto instance_id = ceph::util::generate_random_number<uint64_t>();
RGWDataSyncCtx sc_local = sc;
sc_local.env = &sync_env_local;
- ret = crs.run(new RGWInitDataSyncStatusCoroutine(&sc_local, num_shards, instance_id, tn, &sync_status));
+ ret = crs.run(dpp, new RGWInitDataSyncStatusCoroutine(&sc_local, num_shards, instance_id, tn, &sync_status));
http_manager.stop();
return ret;
}
delete entries_index;
}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
entries_index = new RGWShardedOmapCRManager(sync_env->async_rados, store, this, num_shards,
sync_env->svc->zone->get_zone_params().log_pool,
entrypoint, pairs, &result));
}
if (retcode < 0) {
- ldout(sync_env->cct, 0) << "ERROR: failed to fetch metadata for section bucket.instance" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to fetch metadata for section bucket.instance" << dendl;
return set_cr_error(retcode);
}
for (iter = result.keys.begin(); iter != result.keys.end(); ++iter) {
- ldout(sync_env->cct, 20) << "list metadata: section=bucket.instance key=" << *iter << dendl;
+ ldpp_dout(dpp, 20) << "list metadata: section=bucket.instance key=" << *iter << dendl;
key = *iter;
yield {
int shard_id = (int)iter->first;
rgw_data_sync_marker& marker = iter->second;
marker.total_entries = entries_index->get_total_entries(shard_id);
- spawn(new RGWSimpleRadosWriteCR<rgw_data_sync_marker>(sync_env->async_rados, sync_env->svc->sysobj,
+ spawn(new RGWSimpleRadosWriteCR<rgw_data_sync_marker>(dpp, sync_env->async_rados, sync_env->svc->sysobj,
rgw_raw_obj(sync_env->svc->zone->get_zone_params().log_pool, RGWDataSyncStatusManager::shard_obj_name(sc->source_zone, shard_id)),
marker),
true);
}
} else {
- yield call(sync_env->error_logger->log_error_cr(sc->conn->get_remote_id(), "data.init", "",
+ yield call(sync_env->error_logger->log_error_cr(dpp, sc->conn->get_remote_id(), "data.init", "",
EIO, string("failed to build bucket instances map")));
}
while (collect(&ret, NULL)) {
if (ret < 0) {
- yield call(sync_env->error_logger->log_error_cr(sc->conn->get_remote_id(), "data.init", "",
+ yield call(sync_env->error_logger->log_error_cr(dpp, sc->conn->get_remote_id(), "data.init", "",
-ret, string("failed to store sync status: ") + cpp_strerror(-ret)));
req_ret = ret;
}
tn->log(20, SSTR("updating marker marker_oid=" << marker_oid << " marker=" << new_marker));
- return new RGWSimpleRadosWriteCR<rgw_data_sync_marker>(sync_env->async_rados, sync_env->svc->sysobj,
+ return new RGWSimpleRadosWriteCR<rgw_data_sync_marker>(sync_env->dpp, sync_env->async_rados, sync_env->svc->sysobj,
rgw_raw_obj(sync_env->svc->zone->get_zone_params().log_pool, marker_oid),
sync_marker);
}
SSTR(bucket_shard_str{_sync_pair.dest_bs} << "<-" << bucket_shard_str{_sync_pair.source_bs} ))) {
}
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
};
struct all_bucket_info {
~RGWRunBucketsSyncBySourceCR() override {
}
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
};
class RGWRunBucketSourcesSyncCR : public RGWCoroutine {
const RGWSyncTraceNodeRef& _tn_parent,
ceph::real_time* progress);
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
void handle_complete_stack(uint64_t stack_id) {
auto iter = shard_progress.find(stack_id);
tn = sync_env->sync_tracer->add_node(_tn_parent, "entry", obligation.key);
}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
if (state->obligation) {
// this is already syncing in another DataSyncSingleEntryCR
if (sync_status < 0) {
// write actual sync failures for 'radosgw-admin sync error list'
if (sync_status != -EBUSY && sync_status != -EAGAIN) {
- yield call(sync_env->error_logger->log_error_cr(sc->conn->get_remote_id(), "data", complete->key,
+ yield call(sync_env->error_logger->log_error_cr(dpp, sc->conn->get_remote_id(), "data", complete->key,
-sync_status, string("failed to sync bucket instance: ") + cpp_strerror(-sync_status)));
if (retcode < 0) {
tn->log(0, SSTR("ERROR: failed to log sync failure: retcode=" << retcode));
modified_shards.insert(keys.begin(), keys.end());
}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
int r;
while (true) {
switch (sync_marker.state) {
sync_marker.state = rgw_data_sync_marker::IncrementalSync;
sync_marker.marker = sync_marker.next_step_marker;
sync_marker.next_step_marker.clear();
- call(new RGWSimpleRadosWriteCR<rgw_data_sync_marker>(sync_env->async_rados, sync_env->svc->sysobj,
+ call(new RGWSimpleRadosWriteCR<rgw_data_sync_marker>(sync_env->dpp, sync_env->async_rados, sync_env->svc->sysobj,
rgw_raw_obj(pool, status_oid),
sync_marker));
}
}
RGWCoroutine *alloc_finisher_cr() override {
- return new RGWSimpleRadosReadCR<rgw_data_sync_marker>(sync_env->async_rados, sync_env->svc->sysobj,
+ return new RGWSimpleRadosReadCR<rgw_data_sync_marker>(sync_env->dpp, sync_env->async_rados, sync_env->svc->sysobj,
rgw_raw_obj(sync_env->svc->zone->get_zone_params().log_pool, RGWDataSyncStatusManager::shard_obj_name(sc->source_zone, shard_id)),
&sync_marker);
}
}
}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
/* read sync status */
}
RGWCoroutine *set_sync_info_cr() {
- return new RGWSimpleRadosWriteCR<rgw_data_sync_info>(sync_env->async_rados, sync_env->svc->sysobj,
+ return new RGWSimpleRadosWriteCR<rgw_data_sync_info>(sync_env->dpp, sync_env->async_rados, sync_env->svc->sysobj,
rgw_raw_obj(sync_env->svc->zone->get_zone_params().log_pool, RGWDataSyncStatusManager::sync_status_oid(sc->source_zone)),
sync_status.sync_info);
}
int operate() override {
auto user_ctl = sync_env->store->getRados()->ctl.user;
- ret = user_ctl->get_info_by_uid(uid, &info->user_info, null_yield);
+ ret = user_ctl->get_info_by_uid(sync_env->dpp, uid, &info->user_info, null_yield);
if (ret < 0) {
return ret;
}
map<string, bufferlist> uattrs;
- ret = user_ctl->get_attrs_by_uid(uid, &uattrs, null_yield);
+ ret = user_ctl->get_attrs_by_uid(sync_env->dpp, uid, &uattrs, null_yield);
if (ret == 0) {
ret = RGWUserPermHandler::policy_from_attrs(sync_env->cct, uattrs, &info->user_acl);
}
}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
#define MAX_RACE_RETRIES_OBJ_FETCH 10
key, dest_key, versioned_epoch,
true,
std::static_pointer_cast<RGWFetchObjFilter>(filter),
- zones_trace, sync_env->counters, sync_env->dpp));
+ zones_trace, sync_env->counters, dpp));
}
if (retcode < 0) {
if (*need_retry) {
real_time& mtime, bool versioned, uint64_t versioned_epoch, rgw_zone_set *zones_trace)
{
auto sync_env = sc->env;
- return new RGWRemoveObjCR(sync_env->async_rados, sync_env->store, sc->source_zone,
+ return new RGWRemoveObjCR(sync_env->dpp, sync_env->async_rados, sync_env->store, sc->source_zone,
sync_pipe.dest_bucket_info, key, versioned, versioned_epoch,
NULL, NULL, false, &mtime, zones_trace);
}
rgw_bucket_entry_owner& owner, bool versioned, uint64_t versioned_epoch, rgw_zone_set *zones_trace)
{
auto sync_env = sc->env;
- return new RGWRemoveObjCR(sync_env->async_rados, sync_env->store, sc->source_zone,
+ return new RGWRemoveObjCR(sync_env->dpp, sync_env->async_rados, sync_env->store, sc->source_zone,
sync_pipe.dest_bucket_info, key, versioned, versioned_epoch,
&owner.id, &owner.display_name, true, &mtime, zones_trace);
}
(sync_pipe.dest_bucket_info.flags & BUCKET_VERSIONS_SUSPENDED)) {
ldout(sc->cct, 0) << "SYNC_ARCHIVE: sync_object: enabling object versioning for archive bucket" << dendl;
sync_pipe.dest_bucket_info.flags = (sync_pipe.dest_bucket_info.flags & ~BUCKET_VERSIONS_SUSPENDED) | BUCKET_VERSIONED;
- int op_ret = sync_env->store->getRados()->put_bucket_instance_info(sync_pipe.dest_bucket_info, false, real_time(), NULL);
+ int op_ret = sync_env->store->getRados()->put_bucket_instance_info(sync_pipe.dest_bucket_info, false, real_time(), NULL, sync_env->dpp);
if (op_ret < 0) {
- ldout(sc->cct, 0) << "SYNC_ARCHIVE: sync_object: error versioning archive bucket" << dendl;
+ ldpp_dout(sync_env->dpp, 0) << "SYNC_ARCHIVE: sync_object: error versioning archive bucket" << dendl;
return NULL;
}
}
ldout(sc->cct, 0) << "SYNC_ARCHIVE: create_delete_marker: b=" << sync_pipe.info.source_bs.bucket << " k=" << key << " mtime=" << mtime
<< " versioned=" << versioned << " versioned_epoch=" << versioned_epoch << dendl;
auto sync_env = sc->env;
- return new RGWRemoveObjCR(sync_env->async_rados, sync_env->store, sc->source_zone,
+ return new RGWRemoveObjCR(sync_env->dpp, sync_env->async_rados, sync_env->store, sc->source_zone,
sync_pipe.dest_bucket_info, key, versioned, versioned_epoch,
&owner.id, &owner.display_name, true, &mtime, zones_trace);
}
data_sync_cr->wakeup(shard_id, keys);
}
-int RGWRemoteDataLog::run_sync(int num_shards)
+int RGWRemoteDataLog::run_sync(const DoutPrefixProvider *dpp, int num_shards)
{
lock.lock();
data_sync_cr = new RGWDataSyncControlCR(&sc, num_shards, tn);
data_sync_cr->get(); // run() will drop a ref, so take another
lock.unlock();
- int r = run(data_sync_cr);
+ int r = run(dpp, data_sync_cr);
lock.lock();
data_sync_cr->put();
return store->ctx();
}
-int RGWDataSyncStatusManager::init()
+int RGWDataSyncStatusManager::init(const DoutPrefixProvider *dpp)
{
RGWZone *zone_def;
}
rgw_datalog_info datalog_info;
- r = source_log.read_log_info(&datalog_info);
+ r = source_log.read_log_info(dpp, &datalog_info);
if (r < 0) {
ldpp_dout(this, 5) << "ERROR: master.read_log_info() returned r=" << r << dendl;
finalize();
: RGWCoroutine(_sc->cct), sc(_sc), sync_env(_sc->env),
instance_key(bs.get_key()), info(_info) {}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
yield {
rgw_http_param_pair pairs[] = { { "type" , "bucket-index" },
status(_status), objv_tracker(objv_tracker)
{}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
/* fetch current position in logs */
yield call(new RGWReadRemoteBucketIndexLogInfoCR(sc, sync_pair.source_bs, &info));
if (write_status) {
map<string, bufferlist> attrs;
status.encode_all_attrs(attrs);
- call(new RGWSimpleRadosWriteAttrsCR(sync_env->async_rados, sync_env->svc->sysobj, obj, attrs, &objv_tracker));
+ call(new RGWSimpleRadosWriteAttrsCR(dpp, sync_env->async_rados, sync_env->svc->sysobj, obj, attrs, &objv_tracker));
} else {
call(new RGWRadosRemoveCR(store, obj, &objv_tracker));
}
oid(RGWBucketPipeSyncStatusManager::status_oid(sc->source_zone, sync_pair)),
status(_status), objv_tracker(objv_tracker)
{}
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
};
-int RGWReadBucketPipeSyncStatusCoroutine::operate()
+int RGWReadBucketPipeSyncStatusCoroutine::operate(const DoutPrefixProvider *dpp)
{
reenter(this) {
- yield call(new RGWSimpleRadosReadAttrsCR(sync_env->async_rados, sync_env->svc->sysobj,
+ yield call(new RGWSimpleRadosReadAttrsCR(dpp, sync_env->async_rados, sync_env->svc->sysobj,
rgw_raw_obj(sync_env->svc->zone->get_zone_params().log_pool, oid),
&attrs, true, objv_tracker));
if (retcode == -ENOENT) {
return set_cr_done();
}
if (retcode < 0) {
- ldout(sync_env->cct, 0) << "ERROR: failed to call fetch bucket shard info oid=" << oid << " ret=" << retcode << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to call fetch bucket shard info oid=" << oid << " ret=" << retcode << dendl;
return set_cr_error(retcode);
}
status->decode_from_attrs(sync_env->cct, attrs);
error_oid = RGWDataSyncStatusManager::shard_obj_name(sc->source_zone, shard_id) + ".retry";
}
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
};
-int RGWReadRecoveringBucketShardsCoroutine::operate()
+int RGWReadRecoveringBucketShardsCoroutine::operate(const DoutPrefixProvider *dpp)
{
reenter(this){
//read recovering bucket shards
}
if (retcode < 0) {
- ldout(sync_env->cct, 0) << "failed to read recovering bucket shards with "
+ ldpp_dout(dpp, 0) << "failed to read recovering bucket shards with "
<< cpp_strerror(retcode) << dendl;
return set_cr_error(retcode);
}
status_oid = RGWDataSyncStatusManager::shard_obj_name(sc->source_zone, shard_id);
}
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
};
-int RGWReadPendingBucketShardsCoroutine::operate()
+int RGWReadPendingBucketShardsCoroutine::operate(const DoutPrefixProvider *dpp)
{
reenter(this){
//read sync status marker
using CR = RGWSimpleRadosReadCR<rgw_data_sync_marker>;
- yield call(new CR(sync_env->async_rados, sync_env->svc->sysobj,
+ yield call(new CR(dpp, sync_env->async_rados, sync_env->svc->sysobj,
rgw_raw_obj(sync_env->svc->zone->get_zone_params().log_pool, status_oid),
sync_marker));
if (retcode < 0) {
- ldout(sync_env->cct,0) << "failed to read sync status marker with "
+ ldpp_dout(dpp, 0) << "failed to read sync status marker with "
<< cpp_strerror(retcode) << dendl;
return set_cr_error(retcode);
}
}
if (retcode < 0) {
- ldout(sync_env->cct,0) << "failed to read remote data log info with "
+ ldpp_dout(dpp, 0) << "failed to read remote data log info with "
<< cpp_strerror(retcode) << dendl;
return set_cr_error(retcode);
}
return 0;
}
-int RGWRemoteDataLog::read_shard_status(int shard_id, set<string>& pending_buckets, set<string>& recovering_buckets, rgw_data_sync_marker *sync_marker, const int max_entries)
+int RGWRemoteDataLog::read_shard_status(const DoutPrefixProvider *dpp, int shard_id, set<string>& pending_buckets, set<string>& recovering_buckets, rgw_data_sync_marker *sync_marker, const int max_entries)
{
// cannot run concurrently with run_sync(), so run in a separate manager
RGWCoroutinesManager crs(store->ctx(), store->getRados()->get_cr_registry());
RGWCoroutinesStack* pending_stack = new RGWCoroutinesStack(store->ctx(), &crs);
pending_stack->call(new RGWReadPendingBucketShardsCoroutine(&sc_local, shard_id, pending_buckets, sync_marker, max_entries));
stacks.push_back(pending_stack);
- ret = crs.run(stacks);
+ ret = crs.run(dpp, stacks);
http_manager.stop();
return ret;
}
instance_key(bs.get_key()), marker_position(_marker_position),
result(_result) {}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
yield {
rgw_http_param_pair pairs[] = { { "rgwx-bucket-instance", instance_key.c_str() },
: RGWCoroutine(_sc->cct), sc(_sc), sync_env(_sc->env),
instance_key(bs.get_key()), marker(_marker), result(_result) {}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
if (sync_env->counters) {
timer.emplace(sync_env->counters, sync_counters::l_poll);
sync_marker.encode_attr(attrs);
tn->log(20, SSTR("updating marker marker_oid=" << marker_oid << " marker=" << new_marker));
- return new RGWSimpleRadosWriteAttrsCR(sync_env->async_rados, sync_env->svc->sysobj,
+ return new RGWSimpleRadosWriteAttrsCR(sync_env->dpp, sync_env->async_rados, sync_env->svc->sysobj,
rgw_raw_obj(sync_env->svc->zone->get_zone_params().log_pool, marker_oid),
attrs, &objv_tracker);
}
sync_marker(sync_marker), stable_timestamp(stable_timestamp),
objv_tracker(objv_tracker)
{}
- int operate() {
+ int operate(const DoutPrefixProvider *dpp) {
reenter(this) {
sync_marker.encode_attr(attrs);
- yield call(new RGWSimpleRadosWriteAttrsCR(sync_env->async_rados, sync_env->svc->sysobj,
+ yield call(new RGWSimpleRadosWriteAttrsCR(sync_env->dpp, sync_env->async_rados, sync_env->svc->sysobj,
obj, attrs, &objv_tracker));
if (retcode < 0) {
return set_cr_error(retcode);
zones_trace.insert(sync_env->svc->zone->get_zone().id, _sync_pipe.info.dest_bs.get_key());
}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
/* skip entries that are not complete */
if (op_state != CLS_RGW_STATE_COMPLETE) {
}
}
if (!error_ss.str().empty()) {
- yield call(sync_env->error_logger->log_error_cr(sc->conn->get_remote_id(), "data", error_ss.str(), -retcode, string("failed to sync object") + cpp_strerror(-sync_status)));
+ yield call(sync_env->error_logger->log_error_cr(dpp, sc->conn->get_remote_id(), "data", error_ss.str(), -retcode, string("failed to sync object") + cpp_strerror(-sync_status)));
}
done:
if (sync_status == 0) {
prefix_handler.set_rules(sync_pipe.get_rules());
}
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
};
-int RGWBucketShardFullSyncCR::operate()
+int RGWBucketShardFullSyncCR::operate(const DoutPrefixProvider *dpp)
{
reenter(this) {
list_marker = sync_info.full_marker.position;
sync_info.state = rgw_bucket_shard_sync_info::StateIncrementalSync;
map<string, bufferlist> attrs;
sync_info.encode_state_attr(attrs);
- call(new RGWSimpleRadosWriteAttrsCR(sync_env->async_rados, sync_env->svc->sysobj,
+ call(new RGWSimpleRadosWriteAttrsCR(dpp, sync_env->async_rados, sync_env->svc->sysobj,
rgw_raw_obj(sync_env->svc->zone->get_zone_params().log_pool, status_oid),
attrs));
}
return boost::starts_with(key.name, iter->first);
}
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
};
-int RGWBucketShardIncrementalSyncCR::operate()
+int RGWBucketShardIncrementalSyncCR::operate(const DoutPrefixProvider *dpp)
{
int ret;
reenter(this) {
for (; entries_iter != entries_end; ++entries_iter) {
auto e = *entries_iter;
if (e.op == RGWModifyOp::CLS_RGW_OP_SYNCSTOP) {
- ldout(sync_env->cct, 20) << "syncstop on " << e.timestamp << dendl;
+ ldpp_dout(dpp, 20) << "syncstop on " << e.timestamp << dendl;
syncstopped = true;
entries_end = std::next(entries_iter); // stop after this entry
break;
sync_info.inc_marker.position = cur_id;
if (entry->op == RGWModifyOp::CLS_RGW_OP_SYNCSTOP || entry->op == RGWModifyOp::CLS_RGW_OP_RESYNC) {
- ldout(sync_env->cct, 20) << "detected syncstop or resync on " << entries_iter->timestamp << ", skipping entry" << dendl;
+ ldpp_dout(dpp, 20) << "detected syncstop or resync on " << entries_iter->timestamp << ", skipping entry" << dendl;
marker_tracker.try_update_high_marker(cur_id, 0, entry->timestamp);
continue;
}
const rgw_bucket& _source_bucket) : sync_env(_sync_env),
source_bucket(_source_bucket) {}
int operate() override {
- int r = sync_env->svc->bucket_sync->get_bucket_sync_hints(source_bucket,
+ int r = sync_env->svc->bucket_sync->get_bucket_sync_hints(sync_env->dpp,
+ source_bucket,
nullptr,
&targets,
null_yield);
if (r < 0) {
- ldout(sync_env->cct, 0) << "ERROR: " << __func__ << "(): failed to fetch bucket sync hints for bucket=" << source_bucket << dendl;
+ ldpp_dout(sync_env->dpp, 0) << "ERROR: " << __func__ << "(): failed to fetch bucket sync hints for bucket=" << source_bucket << dendl;
return r;
}
<< ":source_zone=" << source_zone.value_or(rgw_zone_id("*")).id))) {
}
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
};
std::ostream& operator<<(std::ostream& out, std::optional<rgw_bucket_shard>& bs) {
}
}
-int RGWRunBucketSourcesSyncCR::operate()
+int RGWRunBucketSourcesSyncCR::operate(const DoutPrefixProvider *dpp)
{
reenter(this) {
yield call(new RGWGetBucketPeersCR(sync_env, target_bucket, sc->source_zone, source_bucket, &pipes, tn));
return set_cr_error(retcode);
}
- ldpp_dout(sync_env->dpp, 20) << __func__ << "(): requested source_bs=" << source_bs << " target_bs=" << target_bs << dendl;
+ ldpp_dout(dpp, 20) << __func__ << "(): requested source_bs=" << source_bs << " target_bs=" << target_bs << dendl;
if (pipes.empty()) {
- ldpp_dout(sync_env->dpp, 20) << __func__ << "(): no relevant sync pipes found" << dendl;
+ ldpp_dout(dpp, 20) << __func__ << "(): no relevant sync pipes found" << dendl;
return set_cr_done();
}
for (siter = pipes.begin(); siter != pipes.end(); ++siter) {
{
- ldpp_dout(sync_env->dpp, 20) << __func__ << "(): sync pipe=" << *siter << dendl;
+ ldpp_dout(dpp, 20) << __func__ << "(): sync pipe=" << *siter << dendl;
source_num_shards = siter->source.get_bucket_info().layout.current_index.layout.normal.num_shards;
target_num_shards = siter->target.get_bucket_info().layout.current_index.layout.normal.num_shards;
}
}
- ldpp_dout(sync_env->dpp, 20) << __func__ << "(): num shards=" << num_shards << " cur_shard=" << cur_shard << dendl;
+ ldpp_dout(dpp, 20) << __func__ << "(): num shards=" << num_shards << " cur_shard=" << cur_shard << dendl;
for (; num_shards > 0; --num_shards, ++cur_shard) {
/*
sync_pair.dest_bs.shard_id = -1;
}
- ldpp_dout(sync_env->dpp, 20) << __func__ << "(): sync_pair=" << sync_pair << dendl;
+ ldpp_dout(dpp, 20) << __func__ << "(): sync_pair=" << sync_pair << dendl;
cur_progress = (progress ? &shard_progress[prealloc_stack_id()] : nullptr);
SSTR(bucket))) {
}
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
};
-int RGWSyncGetBucketInfoCR::operate()
+int RGWSyncGetBucketInfoCR::operate(const DoutPrefixProvider *dpp)
{
reenter(this) {
- yield call(new RGWGetBucketInstanceInfoCR(sync_env->async_rados, sync_env->store, bucket, pbucket_info, pattrs));
+ yield call(new RGWGetBucketInstanceInfoCR(sync_env->async_rados, sync_env->store, bucket, pbucket_info, pattrs, dpp));
if (retcode == -ENOENT) {
/* bucket instance info has not been synced in yet, fetch it now */
yield {
tn->log(10, SSTR("no local info for bucket:" << ": fetching metadata"));
string raw_key = string("bucket.instance:") + bucket.get_key();
- meta_sync_env.init(sync_env->dpp, cct, sync_env->store, sync_env->svc->zone->get_master_conn(), sync_env->async_rados,
+ meta_sync_env.init(dpp, cct, sync_env->store, sync_env->svc->zone->get_master_conn(), sync_env->async_rados,
sync_env->http_manager, sync_env->error_logger, sync_env->sync_tracer);
call(new RGWMetaSyncSingleEntryCR(&meta_sync_env, raw_key,
return set_cr_error(retcode);
}
- yield call(new RGWGetBucketInstanceInfoCR(sync_env->async_rados, sync_env->store, bucket, pbucket_info, pattrs));
+ yield call(new RGWGetBucketInstanceInfoCR(sync_env->async_rados, sync_env->store, bucket, pbucket_info, pattrs, dpp));
}
if (retcode < 0) {
tn->log(0, SSTR("ERROR: failed to retrieve bucket info for bucket=" << bucket_str{bucket}));
get_policy_params.bucket = bucket;
}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
for (i = 0; i < 2; ++i) {
yield call(new RGWBucketGetSyncPolicyHandlerCR(sync_env->async_rados,
sync_env->store,
get_policy_params,
- policy));
+ policy,
+ dpp));
if (retcode < 0 &&
retcode != -ENOENT) {
return set_cr_error(retcode);
};
-int RGWGetBucketPeersCR::operate()
+int RGWGetBucketPeersCR::operate(const DoutPrefixProvider *dpp)
{
reenter(this) {
if (pipes) {
for (hiter = get_hint_targets_action->targets.begin();
hiter != get_hint_targets_action->targets.end();
++hiter) {
- ldpp_dout(sync_env->dpp, 20) << "Got sync hint for bucket=" << *source_bucket << ": " << hiter->get_key() << dendl;
+ ldpp_dout(dpp, 20) << "Got sync hint for bucket=" << *source_bucket << ": " << hiter->get_key() << dendl;
target_policy = make_shared<rgw_bucket_get_sync_policy_result>();
yield call(new RGWSyncGetBucketSyncPolicyHandlerCR(sync_env,
return 0;
}
-int RGWRunBucketsSyncBySourceCR::operate()
+int RGWRunBucketsSyncBySourceCR::operate(const DoutPrefixProvider *dpp)
{
reenter(this) {
return set_cr_done();
return 0;
}
-int RGWRunBucketSyncCoroutine::operate()
+int RGWRunBucketSyncCoroutine::operate(const DoutPrefixProvider *dpp)
{
reenter(this) {
yield call(new RGWReadBucketPipeSyncStatusCoroutine(sc, sync_pair, &sync_status, &objv_tracker));
return new RGWRunBucketSyncCoroutine(&sc, nullptr, sync_pairs[num], sync_env->sync_tracer->root_node, nullptr);
}
-int RGWBucketPipeSyncStatusManager::init()
+int RGWBucketPipeSyncStatusManager::init(const DoutPrefixProvider *dpp)
{
int ret = http_manager.start();
if (ret < 0) {
rgw_sync_pipe_info_set pipes;
- ret = cr_mgr.run(new RGWGetBucketPeersCR(&sync_env,
+ ret = cr_mgr.run(dpp, new RGWGetBucketPeersCR(&sync_env,
dest_bucket,
source_zone,
source_bucket,
return 0;
}
-int RGWBucketPipeSyncStatusManager::init_sync_status()
+int RGWBucketPipeSyncStatusManager::init_sync_status(const DoutPrefixProvider *dpp)
{
list<RGWCoroutinesStack *> stacks;
// pass an empty objv tracker to each so that the version gets incremented
stacks.push_back(stack);
}
- return cr_mgr.run(stacks);
+ return cr_mgr.run(dpp, stacks);
}
-int RGWBucketPipeSyncStatusManager::read_sync_status()
+int RGWBucketPipeSyncStatusManager::read_sync_status(const DoutPrefixProvider *dpp)
{
list<RGWCoroutinesStack *> stacks;
stacks.push_back(stack);
}
- int ret = cr_mgr.run(stacks);
+ int ret = cr_mgr.run(dpp, stacks);
if (ret < 0) {
ldpp_dout(this, 0) << "ERROR: failed to read sync status for "
<< bucket_str{dest_bucket} << dendl;
return 0;
}
-int RGWBucketPipeSyncStatusManager::run()
+int RGWBucketPipeSyncStatusManager::run(const DoutPrefixProvider *dpp)
{
list<RGWCoroutinesStack *> stacks;
stacks.push_back(stack);
}
- int ret = cr_mgr.run(stacks);
+ int ret = cr_mgr.run(dpp, stacks);
if (ret < 0) {
ldpp_dout(this, 0) << "ERROR: failed to read sync status for "
<< bucket_str{dest_bucket} << dendl;
return prefix + ":" + obj->get_name() + ":" + obj->get_instance();
}
-int rgw_read_remote_bilog_info(RGWRESTConn* conn,
+int rgw_read_remote_bilog_info(const DoutPrefixProvider *dpp,
+ RGWRESTConn* conn,
const rgw_bucket& bucket,
BucketIndexShardsManager& markers,
optional_yield y)
{ nullptr, nullptr }
};
rgw_bucket_index_marker_info result;
- int r = conn->get_json_resource("/admin/log/", params, y, result);
+ int r = conn->get_json_resource(dpp, "/admin/log/", params, y, result);
if (r < 0) {
- lderr(conn->get_ctx()) << "failed to fetch remote log markers: " << cpp_strerror(r) << dendl;
+ ldpp_dout(dpp, -1) << "failed to fetch remote log markers: " << cpp_strerror(r) << dendl;
return r;
}
r = markers.from_string(result.max_marker, -1);
if (!psource_bucket_info) {
auto& bucket_ctl = store->getRados()->ctl.bucket;
- int ret = bucket_ctl->read_bucket_info(source_bucket, &source_bucket_info, null_yield);
+ int ret = bucket_ctl->read_bucket_info(source_bucket, &source_bucket_info, null_yield, dpp);
if (ret < 0) {
ldpp_dout(dpp, 0) << "ERROR: failed to get bucket instance info: bucket=" << source_bucket << ": " << cpp_strerror(-ret) << dendl;
return ret;
sc.init(&env, nullptr, *pipe.source.zone);
RGWCoroutinesManager crs(store->ctx(), store->getRados()->get_cr_registry());
- return crs.run(new RGWCollectBucketSyncStatusCR(store, &sc,
+ return crs.run(dpp, new RGWCollectBucketSyncStatusCR(store, &sc,
*psource_bucket_info,
dest_bucket_info,
status));
PerfCounters* _counters);
void finish();
- int read_log_info(rgw_datalog_info *log_info);
- int read_source_log_shards_info(map<int, RGWDataChangesLogInfo> *shards_info);
- int read_source_log_shards_next(map<int, string> shard_markers, map<int, rgw_datalog_shard_data> *result);
- int read_sync_status(rgw_data_sync_status *sync_status);
- int read_recovering_shards(const int num_shards, set<int>& recovering_shards);
- int read_shard_status(int shard_id, set<string>& lagging_buckets,set<string>& recovering_buckets, rgw_data_sync_marker* sync_marker, const int max_entries);
- int init_sync_status(int num_shards);
- int run_sync(int num_shards);
+ int read_log_info(const DoutPrefixProvider *dpp, rgw_datalog_info *log_info);
+ int read_source_log_shards_info(const DoutPrefixProvider *dpp, map<int, RGWDataChangesLogInfo> *shards_info);
+ int read_source_log_shards_next(const DoutPrefixProvider *dpp, map<int, string> shard_markers, map<int, rgw_datalog_shard_data> *result);
+ int read_sync_status(const DoutPrefixProvider *dpp, rgw_data_sync_status *sync_status);
+ int read_recovering_shards(const DoutPrefixProvider *dpp, const int num_shards, set<int>& recovering_shards);
+ int read_shard_status(const DoutPrefixProvider *dpp, int shard_id, set<string>& lagging_buckets,set<string>& recovering_buckets, rgw_data_sync_marker* sync_marker, const int max_entries);
+ int init_sync_status(const DoutPrefixProvider *dpp, int num_shards);
+ int run_sync(const DoutPrefixProvider *dpp, int num_shards);
void wakeup(int shard_id, set<string>& keys);
};
~RGWDataSyncStatusManager() {
finalize();
}
- int init();
+ int init(const DoutPrefixProvider *dpp);
void finalize();
static string shard_obj_name(const rgw_zone_id& source_zone, int shard_id);
static string sync_status_oid(const rgw_zone_id& source_zone);
- int read_sync_status(rgw_data_sync_status *sync_status) {
- return source_log.read_sync_status(sync_status);
+ int read_sync_status(const DoutPrefixProvider *dpp, rgw_data_sync_status *sync_status) {
+ return source_log.read_sync_status(dpp, sync_status);
}
- int read_recovering_shards(const int num_shards, set<int>& recovering_shards) {
- return source_log.read_recovering_shards(num_shards, recovering_shards);
+ int read_recovering_shards(const DoutPrefixProvider *dpp, const int num_shards, set<int>& recovering_shards) {
+ return source_log.read_recovering_shards(dpp, num_shards, recovering_shards);
}
- int read_shard_status(int shard_id, set<string>& lagging_buckets, set<string>& recovering_buckets, rgw_data_sync_marker *sync_marker, const int max_entries) {
- return source_log.read_shard_status(shard_id, lagging_buckets, recovering_buckets,sync_marker, max_entries);
+ int read_shard_status(const DoutPrefixProvider *dpp, int shard_id, set<string>& lagging_buckets, set<string>& recovering_buckets, rgw_data_sync_marker *sync_marker, const int max_entries) {
+ return source_log.read_shard_status(dpp, shard_id, lagging_buckets, recovering_buckets,sync_marker, max_entries);
}
- int init_sync_status() { return source_log.init_sync_status(num_shards); }
+ int init_sync_status(const DoutPrefixProvider *dpp) { return source_log.init_sync_status(dpp, num_shards); }
- int read_log_info(rgw_datalog_info *log_info) {
- return source_log.read_log_info(log_info);
+ int read_log_info(const DoutPrefixProvider *dpp, rgw_datalog_info *log_info) {
+ return source_log.read_log_info(dpp, log_info);
}
- int read_source_log_shards_info(map<int, RGWDataChangesLogInfo> *shards_info) {
- return source_log.read_source_log_shards_info(shards_info);
+ int read_source_log_shards_info(const DoutPrefixProvider *dpp, map<int, RGWDataChangesLogInfo> *shards_info) {
+ return source_log.read_source_log_shards_info(dpp, shards_info);
}
- int read_source_log_shards_next(map<int, string> shard_markers, map<int, rgw_datalog_shard_data> *result) {
- return source_log.read_source_log_shards_next(shard_markers, result);
+ int read_source_log_shards_next(const DoutPrefixProvider *dpp, map<int, string> shard_markers, map<int, rgw_datalog_shard_data> *result) {
+ return source_log.read_source_log_shards_next(dpp, shard_markers, result);
}
- int run() { return source_log.run_sync(num_shards); }
+ int run(const DoutPrefixProvider *dpp) { return source_log.run_sync(dpp, num_shards); }
void wakeup(int shard_id, set<string>& keys) { return source_log.wakeup(shard_id, keys); }
void stop() {
class BucketIndexShardsManager;
-int rgw_read_remote_bilog_info(RGWRESTConn* conn,
+int rgw_read_remote_bilog_info(const DoutPrefixProvider *dpp,
+ RGWRESTConn* conn,
const rgw_bucket& bucket,
BucketIndexShardsManager& markers,
optional_yield y);
const rgw_bucket& dest_bucket);
~RGWBucketPipeSyncStatusManager();
- int init();
+ int init(const DoutPrefixProvider *dpp);
map<int, rgw_bucket_shard_sync_info>& get_sync_status() { return sync_status; }
- int init_sync_status();
+ int init_sync_status(const DoutPrefixProvider *dpp);
static string status_oid(const rgw_zone_id& source_zone, const rgw_bucket_sync_pair_info& bs);
static string obj_status_oid(const rgw_bucket_sync_pipe& sync_pipe,
unsigned get_subsys() const override;
std::ostream& gen_prefix(std::ostream& out) const override;
- int read_sync_status();
- int run();
+ int read_sync_status(const DoutPrefixProvider *dpp);
+ int run(const DoutPrefixProvider *dpp);
};
/// read the sync status of all bucket shards from the given source zone
}
}
~RGWDataChangesOmap() override = default;
+
void prepare(ceph::real_time ut, const std::string& key,
ceph::buffer::list&& entry, entries& out) override {
if (!std::holds_alternative<centries>(out)) {
cls_log_add_prepare_entry(e, utime_t(ut), {}, key, entry);
std::get<centries>(out).push_back(std::move(e));
}
- int push(int index, entries&& items) override {
+ int push(const DoutPrefixProvider *dpp, int index, entries&& items) override {
lr::ObjectWriteOperation op;
cls_log_add(op, std::get<centries>(items), true);
- auto r = rgw_rados_operate(ioctx, oids[index], &op, null_yield);
+ auto r = rgw_rados_operate(dpp, ioctx, oids[index], &op, null_yield);
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__
<< ": failed to push to " << oids[index] << cpp_strerror(-r)
<< dendl;
}
return r;
}
- int push(int index, ceph::real_time now,
+ int push(const DoutPrefixProvider *dpp, int index, ceph::real_time now,
const std::string& key,
ceph::buffer::list&& bl) override {
lr::ObjectWriteOperation op;
cls_log_add(op, utime_t(now), {}, key, bl);
- auto r = rgw_rados_operate(ioctx, oids[index], &op, null_yield);
+ auto r = rgw_rados_operate(dpp, ioctx, oids[index], &op, null_yield);
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__
<< ": failed to push to " << oids[index]
<< cpp_strerror(-r) << dendl;
}
return r;
}
- int list(int index, int max_entries,
+ int list(const DoutPrefixProvider *dpp, int index, int max_entries,
std::vector<rgw_data_change_log_entry>& entries,
std::optional<std::string_view> marker,
std::string* out_marker, bool* truncated) override {
lr::ObjectReadOperation op;
cls_log_list(op, {}, {}, std::string(marker.value_or("")),
max_entries, log_entries, out_marker, truncated);
- auto r = rgw_rados_operate(ioctx, oids[index], &op, nullptr, null_yield);
+ auto r = rgw_rados_operate(dpp, ioctx, oids[index], &op, nullptr, null_yield);
if (r == -ENOENT) {
*truncated = false;
return 0;
}
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__
<< ": failed to list " << oids[index]
<< cpp_strerror(-r) << dendl;
return r;
try {
decode(log_entry.entry, liter);
} catch (ceph::buffer::error& err) {
- lderr(cct) << __PRETTY_FUNCTION__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__
<< ": failed to decode data changes log entry: "
<< err.what() << dendl;
return -EIO;
}
return 0;
}
- int get_info(int index, RGWDataChangesLogInfo *info) override {
+ int get_info(const DoutPrefixProvider *dpp, int index, RGWDataChangesLogInfo *info) override {
cls_log_header header;
lr::ObjectReadOperation op;
cls_log_info(op, &header);
- auto r = rgw_rados_operate(ioctx, oids[index], &op, nullptr, null_yield);
+ auto r = rgw_rados_operate(dpp, ioctx, oids[index], &op, nullptr, null_yield);
if (r == -ENOENT) r = 0;
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__
<< ": failed to get info from " << oids[index]
<< cpp_strerror(-r) << dendl;
} else {
}
return r;
}
- int trim(int index, std::string_view marker) override {
+ int trim(const DoutPrefixProvider *dpp, int index, std::string_view marker) override {
lr::ObjectWriteOperation op;
cls_log_trim(op, {}, {}, {}, std::string(marker));
- auto r = rgw_rados_operate(ioctx, oids[index], &op, null_yield);
+ auto r = rgw_rados_operate(dpp, ioctx, oids[index], &op, null_yield);
if (r == -ENOENT) r = -ENODATA;
if (r < 0 && r != -ENODATA) {
- lderr(cct) << __PRETTY_FUNCTION__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__
<< ": failed to get info from " << oids[index]
<< cpp_strerror(-r) << dendl;
}
return r;
}
- int trim(int index, std::string_view marker,
+ int trim(const DoutPrefixProvider *dpp, int index, std::string_view marker,
lr::AioCompletion* c) override {
lr::ObjectWriteOperation op;
cls_log_trim(op, {}, {}, {}, std::string(marker));
std::string_view max_marker() const override {
return "99999999"sv;
}
- int is_empty() override {
+ int is_empty(const DoutPrefixProvider *dpp) override {
for (auto shard = 0u; shard < oids.size(); ++shard) {
std::list<cls_log_entry> log_entries;
lr::ObjectReadOperation op;
std::string out_marker;
bool truncated;
cls_log_list(op, {}, {}, {}, 1, log_entries, &out_marker, &truncated);
- auto r = rgw_rados_operate(ioctx, oids[shard], &op, nullptr, null_yield);
+ auto r = rgw_rados_operate(dpp, ioctx, oids[shard], &op, nullptr, null_yield);
if (r == -ENOENT) {
continue;
}
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__
<< ": failed to list " << oids[shard]
<< cpp_strerror(-r) << dendl;
return r;
}
std::get<centries>(out).push_back(std::move(entry));
}
- int push(int index, entries&& items) override {
- auto r = fifos[index].push(std::get<centries>(items), null_yield);
+ int push(const DoutPrefixProvider *dpp, int index, entries&& items) override {
+ auto r = fifos[index].push(dpp, std::get<centries>(items), null_yield);
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__
<< ": unable to push to FIFO: " << get_oid(index)
<< ": " << cpp_strerror(-r) << dendl;
}
return r;
}
- int push(int index, ceph::real_time,
+ int push(const DoutPrefixProvider *dpp, int index, ceph::real_time,
const std::string&,
ceph::buffer::list&& bl) override {
- auto r = fifos[index].push(std::move(bl), null_yield);
+ auto r = fifos[index].push(dpp, std::move(bl), null_yield);
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__
<< ": unable to push to FIFO: " << get_oid(index)
<< ": " << cpp_strerror(-r) << dendl;
}
return r;
}
- int list(int index, int max_entries,
+ int list(const DoutPrefixProvider *dpp, int index, int max_entries,
std::vector<rgw_data_change_log_entry>& entries,
std::optional<std::string_view> marker,
std::string* out_marker, bool* truncated) override {
std::vector<rgw::cls::fifo::list_entry> log_entries;
bool more = false;
- auto r = fifos[index].list(max_entries, marker, &log_entries, &more,
+ auto r = fifos[index].list(dpp, max_entries, marker, &log_entries, &more,
null_yield);
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__
<< ": unable to list FIFO: " << get_oid(index)
<< ": " << cpp_strerror(-r) << dendl;
return r;
try {
decode(log_entry.entry, liter);
} catch (const buffer::error& err) {
- lderr(cct) << __PRETTY_FUNCTION__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__
<< ": failed to decode data changes log entry: "
<< err.what() << dendl;
return -EIO;
}
return 0;
}
- int get_info(int index, RGWDataChangesLogInfo *info) override {
+ int get_info(const DoutPrefixProvider *dpp, int index, RGWDataChangesLogInfo *info) override {
auto& fifo = fifos[index];
- auto r = fifo.read_meta(null_yield);
+ auto r = fifo.read_meta(dpp, null_yield);
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__
<< ": unable to get FIFO metadata: " << get_oid(index)
<< ": " << cpp_strerror(-r) << dendl;
return r;
}
rados::cls::fifo::info m;
- fifo.meta(m, null_yield);
+ fifo.meta(dpp, m, null_yield);
auto p = m.head_part_num;
if (p < 0) {
info->marker = ""s;
return 0;
}
rgw::cls::fifo::part_info h;
- r = fifo.get_part_info(p, &h, null_yield);
+ r = fifo.get_part_info(dpp, p, &h, null_yield);
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__
<< ": unable to get part info: " << get_oid(index) << "/" << p
<< ": " << cpp_strerror(-r) << dendl;
return r;
info->last_update = h.max_time;
return 0;
}
- int trim(int index, std::string_view marker) override {
- auto r = fifos[index].trim(marker, false, null_yield);
+ int trim(const DoutPrefixProvider *dpp, int index, std::string_view marker) override {
+ auto r = fifos[index].trim(dpp, marker, false, null_yield);
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__
<< ": unable to trim FIFO: " << get_oid(index)
<< ": " << cpp_strerror(-r) << dendl;
}
return r;
}
- int trim(int index, std::string_view marker,
+ int trim(const DoutPrefixProvider *dpp, int index, std::string_view marker,
librados::AioCompletion* c) override {
int r = 0;
if (marker == rgw::cls::fifo::marker(0, 0).to_string()) {
rgw_complete_aio_completion(c, -ENODATA);
} else {
- fifos[index].trim(marker, false, c, null_yield);
+ fifos[index].trim(dpp, marker, false, c, null_yield);
}
return r;
}
rgw::cls::fifo::marker::max().to_string();
return std::string_view(mm);
}
- int is_empty() override {
+ int is_empty(const DoutPrefixProvider *dpp) override {
std::vector<rgw::cls::fifo::list_entry> log_entries;
bool more = false;
for (auto shard = 0u; shard < fifos.size(); ++shard) {
- auto r = fifos[shard].list(1, {}, &log_entries, &more,
+ auto r = fifos[shard].list(dpp, 1, {}, &log_entries, &more,
null_yield);
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__
<< ": unable to list FIFO: " << get_oid(shard)
<< ": " << cpp_strerror(-r) << dendl;
return r;
}
-int RGWDataChangesLog::start(const RGWZone* _zone,
+int RGWDataChangesLog::start(const DoutPrefixProvider *dpp,
+ const RGWZone* _zone,
const RGWZoneParams& zoneparams,
librados::Rados* lr)
{
// Should be guaranteed by `set_enum_allowed`
ceph_assert(defbacking);
auto log_pool = zoneparams.log_pool;
- auto r = rgw_init_ioctx(lr, log_pool, ioctx, true, false);
+ auto r = rgw_init_ioctx(dpp, lr, log_pool, ioctx, true, false);
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__
<< ": Failed to initialized ioctx, r=" << r
<< ", pool=" << log_pool << dendl;
return -r;
}
auto besr = logback_generations::init<DataLogBackends>(
- ioctx, metadata_log_oid(), [this](uint64_t gen_id, int shard) {
+ dpp, ioctx, metadata_log_oid(), [this](uint64_t gen_id, int shard) {
return get_oid(gen_id, shard);
},
num_shards, *defbacking, null_yield, *this);
if (!besr) {
- lderr(cct) << __PRETTY_FUNCTION__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__
<< ": Error initializing backends: "
<< besr.error().message() << dendl;
return ceph::from_error_code(besr.error());
return static_cast<int>(r);
}
-int RGWDataChangesLog::renew_entries()
+int RGWDataChangesLog::renew_entries(const DoutPrefixProvider *dpp)
{
if (!zone->log_data)
return 0;
auto now = real_clock::now();
- auto ret = be->push(index, std::move(entries));
+ auto ret = be->push(dpp, index, std::move(entries));
if (ret < 0) {
/* we don't really need to have a special handling for failed cases here,
* as this is just an optimization. */
- lderr(cct) << "ERROR: svc.cls->timelog.add() returned " << ret << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: svc.cls->timelog.add() returned " << ret << dendl;
return ret;
}
return choose_oid(bs);
}
-bool RGWDataChangesLog::filter_bucket(const rgw_bucket& bucket,
+bool RGWDataChangesLog::filter_bucket(const DoutPrefixProvider *dpp,
+ const rgw_bucket& bucket,
optional_yield y) const
{
if (!bucket_filter) {
return true;
}
- return bucket_filter(bucket, y);
+ return bucket_filter(bucket, y, dpp);
}
std::string RGWDataChangesLog::get_oid(uint64_t gen_id, int i) const {
fmt::format("{}.{}", prefix, i));
}
-int RGWDataChangesLog::add_entry(const RGWBucketInfo& bucket_info, int shard_id) {
+int RGWDataChangesLog::add_entry(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, int shard_id) {
auto& bucket = bucket_info.bucket;
- if (!filter_bucket(bucket, null_yield)) {
+ if (!filter_bucket(dpp, bucket, null_yield)) {
return 0;
}
std::unique_lock sl(status->lock);
- ldout(cct, 20) << "RGWDataChangesLog::add_entry() bucket.name=" << bucket.name
+ ldpp_dout(dpp, 20) << "RGWDataChangesLog::add_entry() bucket.name=" << bucket.name
<< " shard_id=" << shard_id << " now=" << now
<< " cur_expiration=" << status->cur_expiration << dendl;
change.timestamp = now;
encode(change, bl);
- ldout(cct, 20) << "RGWDataChangesLog::add_entry() sending update with now=" << now << " cur_expiration=" << expiration << dendl;
+ ldpp_dout(dpp, 20) << "RGWDataChangesLog::add_entry() sending update with now=" << now << " cur_expiration=" << expiration << dendl;
auto be = bes->head();
- ret = be->push(index, now, change.key, std::move(bl));
+ ret = be->push(dpp, index, now, change.key, std::move(bl));
now = real_clock::now();
return ret;
}
-int DataLogBackends::list(int shard, int max_entries,
+int DataLogBackends::list(const DoutPrefixProvider *dpp, int shard, int max_entries,
std::vector<rgw_data_change_log_entry>& entries,
std::optional<std::string_view> marker,
std::string* out_marker, bool* truncated)
auto be = i->second;
l.unlock();
gen_id = be->gen_id;
- auto r = be->list(shard, max_entries, gentries,
+ auto r = be->list(dpp, shard, max_entries, gentries,
gen_id == start_id ? start_cursor : std::string{},
&out_cursor, truncated);
if (r < 0)
return 0;
}
-int RGWDataChangesLog::list_entries(int shard, int max_entries,
+int RGWDataChangesLog::list_entries(const DoutPrefixProvider *dpp, int shard, int max_entries,
std::vector<rgw_data_change_log_entry>& entries,
std::optional<std::string_view> marker,
std::string* out_marker, bool* truncated)
{
assert(shard < num_shards);
- return bes->list(shard, max_entries, entries, marker, out_marker, truncated);
+ return bes->list(dpp, shard, max_entries, entries, marker, out_marker, truncated);
}
-int RGWDataChangesLog::list_entries(int max_entries,
+int RGWDataChangesLog::list_entries(const DoutPrefixProvider *dpp, int max_entries,
std::vector<rgw_data_change_log_entry>& entries,
LogMarker& marker, bool *ptruncated)
{
entries.clear();
for (; marker.shard < num_shards && int(entries.size()) < max_entries;
marker.shard++, marker.marker.reset()) {
- int ret = list_entries(marker.shard, max_entries - entries.size(),
+ int ret = list_entries(dpp, marker.shard, max_entries - entries.size(),
entries, marker.marker, NULL, &truncated);
if (ret == -ENOENT) {
continue;
return 0;
}
-int RGWDataChangesLog::get_info(int shard_id, RGWDataChangesLogInfo *info)
+int RGWDataChangesLog::get_info(const DoutPrefixProvider *dpp, int shard_id, RGWDataChangesLogInfo *info)
{
assert(shard_id < num_shards);
auto be = bes->head();
- auto r = be->get_info(shard_id, info);
+ auto r = be->get_info(dpp, shard_id, info);
if (!info->marker.empty()) {
info->marker = gencursor(be->gen_id, info->marker);
}
return r;
}
-int DataLogBackends::trim_entries(int shard_id, std::string_view marker)
+int DataLogBackends::trim_entries(const DoutPrefixProvider *dpp, int shard_id, std::string_view marker)
{
auto [target_gen, cursor] = cursorgen(marker);
std::unique_lock l(m);
be = upper_bound(be->gen_id)->second) {
l.unlock();
auto c = be->gen_id == target_gen ? cursor : be->max_marker();
- r = be->trim(shard_id, c);
+ r = be->trim(dpp, shard_id, c);
if (r == -ENOENT)
r = -ENODATA;
if (r == -ENODATA && be->gen_id < target_gen)
return r;
}
-int RGWDataChangesLog::trim_entries(int shard_id, std::string_view marker)
+int RGWDataChangesLog::trim_entries(const DoutPrefixProvider *dpp, int shard_id, std::string_view marker)
{
assert(shard_id < num_shards);
- return bes->trim_entries(shard_id, marker);
+ return bes->trim_entries(dpp, shard_id, marker);
}
class GenTrim : public rgw::cls::fifo::Completion<GenTrim> {
const uint64_t tail_gen;
boost::intrusive_ptr<RGWDataChangesBE> be;
- GenTrim(DataLogBackends* bes, int shard_id, uint64_t target_gen,
+ GenTrim(const DoutPrefixProvider *dpp, DataLogBackends* bes, int shard_id, uint64_t target_gen,
std::string cursor, uint64_t head_gen, uint64_t tail_gen,
boost::intrusive_ptr<RGWDataChangesBE> be,
lr::AioCompletion* super)
- : Completion(super), bes(bes), shard_id(shard_id), target_gen(target_gen),
+ : Completion(dpp, super), bes(bes), shard_id(shard_id), target_gen(target_gen),
cursor(std::move(cursor)), head_gen(head_gen), tail_gen(tail_gen),
be(std::move(be)) {}
- void handle(Ptr&& p, int r) {
+ void handle(const DoutPrefixProvider *dpp, Ptr&& p, int r) {
auto gen_id = be->gen_id;
be.reset();
if (r == -ENOENT)
be = i->second;
}
auto c = be->gen_id == target_gen ? cursor : be->max_marker();
- be->trim(shard_id, c, call(std::move(p)));
+ be->trim(dpp, shard_id, c, call(std::move(p)));
}
};
-void DataLogBackends::trim_entries(int shard_id, std::string_view marker,
+void DataLogBackends::trim_entries(const DoutPrefixProvider *dpp, int shard_id, std::string_view marker,
librados::AioCompletion* c)
{
auto [target_gen, cursor] = cursorgen(marker);
}
auto be = begin()->second;
l.unlock();
- auto gt = std::make_unique<GenTrim>(this, shard_id, target_gen,
+ auto gt = std::make_unique<GenTrim>(dpp, this, shard_id, target_gen,
std::string(cursor), head_gen, tail_gen,
be, c);
auto cc = be->gen_id == target_gen ? cursor : be->max_marker();
- be->trim(shard_id, cc, GenTrim::call(std::move(gt)));
+ be->trim(dpp, shard_id, cc, GenTrim::call(std::move(gt)));
}
-int DataLogBackends::trim_generations(std::optional<uint64_t>& through) {
+int DataLogBackends::trim_generations(const DoutPrefixProvider *dpp, std::optional<uint64_t>& through) {
if (size() != 1) {
std::vector<mapped_type> candidates;
{
std::optional<uint64_t> highest;
for (auto& be : candidates) {
- auto r = be->is_empty();
+ auto r = be->is_empty(dpp);
if (r < 0) {
return r;
} else if (r == 1) {
if (!highest) {
return 0;
}
- auto ec = empty_to(*highest, null_yield);
+ auto ec = empty_to(dpp, *highest, null_yield);
if (ec) {
return ceph::from_error_code(ec);
}
}
- return ceph::from_error_code(remove_empty(null_yield));
+ return ceph::from_error_code(remove_empty(dpp, null_yield));
}
-int RGWDataChangesLog::trim_entries(int shard_id, std::string_view marker,
+int RGWDataChangesLog::trim_entries(const DoutPrefixProvider *dpp, int shard_id, std::string_view marker,
librados::AioCompletion* c)
{
assert(shard_id < num_shards);
- bes->trim_entries(shard_id, marker, c);
+ bes->trim_entries(dpp, shard_id, marker, c);
return 0;
}
static constexpr auto runs_per_prune = 150;
auto run = 0;
for (;;) {
- dout(2) << "RGWDataChangesLog::ChangesRenewThread: start" << dendl;
- int r = renew_entries();
+ const DoutPrefix dp(cct, dout_subsys, "rgw data changes log: ");
+ ldpp_dout(&dp, 2) << "RGWDataChangesLog::ChangesRenewThread: start" << dendl;
+ int r = renew_entries(&dp);
if (r < 0) {
- dout(0) << "ERROR: RGWDataChangesLog::renew_entries returned error r=" << r << dendl;
+ ldpp_dout(&dp, 0) << "ERROR: RGWDataChangesLog::renew_entries returned error r=" << r << dendl;
}
if (going_down())
if (run == runs_per_prune) {
std::optional<uint64_t> through;
- dout(2) << "RGWDataChangesLog::ChangesRenewThread: pruning old generations" << dendl;
- trim_generations(through);
+ ldpp_dout(&dp, 2) << "RGWDataChangesLog::ChangesRenewThread: pruning old generations" << dendl;
+ trim_generations(&dp, through);
if (r < 0) {
derr << "RGWDataChangesLog::ChangesRenewThread: failed pruning r="
<< r << dendl;
} else if (through) {
- dout(2) << "RGWDataChangesLog::ChangesRenewThread: pruned generations "
+ ldpp_dout(&dp, 2) << "RGWDataChangesLog::ChangesRenewThread: pruned generations "
<< "through " << *through << "." << dendl;
} else {
- dout(2) << "RGWDataChangesLog::ChangesRenewThread: nothing to prune."
+ ldpp_dout(&dp, 2) << "RGWDataChangesLog::ChangesRenewThread: nothing to prune."
<< dendl;
}
run = 0;
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
}
-int RGWDataChangesLog::change_format(log_type type, optional_yield y) {
- return ceph::from_error_code(bes->new_backing(type, y));
+int RGWDataChangesLog::change_format(const DoutPrefixProvider *dpp, log_type type, optional_yield y) {
+ return ceph::from_error_code(bes->new_backing(dpp, type, y));
}
-int RGWDataChangesLog::trim_generations(std::optional<uint64_t>& through) {
- return bes->trim_generations(through);
+int RGWDataChangesLog::trim_generations(const DoutPrefixProvider *dpp, std::optional<uint64_t>& through) {
+ return bes->trim_generations(dpp, through);
}
--i;
return i->second;
}
- int list(int shard, int max_entries,
+ int list(const DoutPrefixProvider *dpp, int shard, int max_entries,
std::vector<rgw_data_change_log_entry>& entries,
std::optional<std::string_view> marker,
std::string* out_marker, bool* truncated);
- int trim_entries(int shard_id, std::string_view marker);
- void trim_entries(int shard_id, std::string_view marker,
+ int trim_entries(const DoutPrefixProvider *dpp, int shard_id, std::string_view marker);
+ void trim_entries(const DoutPrefixProvider *dpp, int shard_id, std::string_view marker,
librados::AioCompletion* c);
void set_zero(RGWDataChangesBE* be) {
emplace(0, be);
bs::error_code handle_new_gens(entries_t e) noexcept override;
bs::error_code handle_empty_to(uint64_t new_tail) noexcept override;
- int trim_generations(std::optional<uint64_t>& through);
+ int trim_generations(const DoutPrefixProvider *dpp, std::optional<uint64_t>& through);
};
class RGWDataChangesLog {
void renew_stop();
std::thread renew_thread;
- std::function<bool(const rgw_bucket& bucket, optional_yield y)> bucket_filter;
+ std::function<bool(const rgw_bucket& bucket, optional_yield y, const DoutPrefixProvider *dpp)> bucket_filter;
int choose_oid(const rgw_bucket_shard& bs);
bool going_down() const;
- bool filter_bucket(const rgw_bucket& bucket, optional_yield y) const;
- int renew_entries();
+ bool filter_bucket(const DoutPrefixProvider *dpp, const rgw_bucket& bucket, optional_yield y) const;
+ int renew_entries(const DoutPrefixProvider *dpp);
public:
RGWDataChangesLog(CephContext* cct);
~RGWDataChangesLog();
- int start(const RGWZone* _zone, const RGWZoneParams& zoneparams,
+ int start(const DoutPrefixProvider *dpp, const RGWZone* _zone, const RGWZoneParams& zoneparams,
librados::Rados* lr);
- int add_entry(const RGWBucketInfo& bucket_info, int shard_id);
+ int add_entry(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, int shard_id);
int get_log_shard_id(rgw_bucket& bucket, int shard_id);
- int list_entries(int shard, int max_entries,
+ int list_entries(const DoutPrefixProvider *dpp, int shard, int max_entries,
std::vector<rgw_data_change_log_entry>& entries,
std::optional<std::string_view> marker,
std::string* out_marker, bool* truncated);
- int trim_entries(int shard_id, std::string_view marker);
- int trim_entries(int shard_id, std::string_view marker,
+ int trim_entries(const DoutPrefixProvider *dpp, int shard_id, std::string_view marker);
+ int trim_entries(const DoutPrefixProvider *dpp, int shard_id, std::string_view marker,
librados::AioCompletion* c); // :(
- int get_info(int shard_id, RGWDataChangesLogInfo *info);
+ int get_info(const DoutPrefixProvider *dpp, int shard_id, RGWDataChangesLogInfo *info);
using LogMarker = RGWDataChangesLogMarker;
- int list_entries(int max_entries,
+ int list_entries(const DoutPrefixProvider *dpp, int max_entries,
std::vector<rgw_data_change_log_entry>& entries,
LogMarker& marker, bool* ptruncated);
std::string get_oid(uint64_t gen_id, int shard_id) const;
- int change_format(log_type type, optional_yield y);
- int trim_generations(std::optional<uint64_t>& through);
+ int change_format(const DoutPrefixProvider *dpp, log_type type, optional_yield y);
+ int trim_generations(const DoutPrefixProvider *dpp, std::optional<uint64_t>& through);
};
class RGWDataChangesBE : public boost::intrusive_ref_counter<RGWDataChangesBE> {
const std::string& key,
ceph::buffer::list&& entry,
entries& out) = 0;
- virtual int push(int index, entries&& items) = 0;
- virtual int push(int index, ceph::real_time now,
+ virtual int push(const DoutPrefixProvider *dpp, int index, entries&& items) = 0;
+ virtual int push(const DoutPrefixProvider *dpp, int index, ceph::real_time now,
const std::string& key,
ceph::buffer::list&& bl) = 0;
- virtual int list(int shard, int max_entries,
+ virtual int list(const DoutPrefixProvider *dpp, int shard, int max_entries,
std::vector<rgw_data_change_log_entry>& entries,
std::optional<std::string_view> marker,
std::string* out_marker, bool* truncated) = 0;
- virtual int get_info(int index, RGWDataChangesLogInfo *info) = 0;
- virtual int trim(int index, std::string_view marker) = 0;
- virtual int trim(int index, std::string_view marker,
+ virtual int get_info(const DoutPrefixProvider *dpp, int index, RGWDataChangesLogInfo *info) = 0;
+ virtual int trim(const DoutPrefixProvider *dpp, int index, std::string_view marker) = 0;
+ virtual int trim(const DoutPrefixProvider *dpp, int index, std::string_view marker,
librados::AioCompletion* c) = 0;
virtual std::string_view max_marker() const = 0;
// 1 on empty, 0 on non-empty, negative on error.
- virtual int is_empty() = 0;
+ virtual int is_empty(const DoutPrefixProvider *dpp) = 0;
};
o.push_back(p);
}
-void RGWObjManifest::obj_iterator::seek(uint64_t o)
-{
- ofs = o;
- if (manifest->explicit_objs) {
- explicit_iter = manifest->objs.upper_bound(ofs);
- if (explicit_iter != manifest->objs.begin()) {
- --explicit_iter;
- }
- if (ofs < manifest->obj_size) {
- update_explicit_pos();
- } else {
- ofs = manifest->obj_size;
- }
- update_location();
- return;
- }
- if (o < manifest->get_head_size()) {
- rule_iter = manifest->rules.begin();
- stripe_ofs = 0;
- stripe_size = manifest->get_head_size();
- if (rule_iter != manifest->rules.end()) {
- cur_part_id = rule_iter->second.start_part_num;
- cur_override_prefix = rule_iter->second.override_prefix;
- }
- update_location();
- return;
- }
-
- rule_iter = manifest->rules.upper_bound(ofs);
- next_rule_iter = rule_iter;
- if (rule_iter != manifest->rules.begin()) {
- --rule_iter;
- }
-
- if (rule_iter == manifest->rules.end()) {
- update_location();
- return;
- }
-
- RGWObjManifestRule& rule = rule_iter->second;
-
- if (rule.part_size > 0) {
- cur_part_id = rule.start_part_num + (ofs - rule.start_ofs) / rule.part_size;
- } else {
- cur_part_id = rule.start_part_num;
- }
- part_ofs = rule.start_ofs + (cur_part_id - rule.start_part_num) * rule.part_size;
-
- if (rule.stripe_max_size > 0) {
- cur_stripe = (ofs - part_ofs) / rule.stripe_max_size;
-
- stripe_ofs = part_ofs + cur_stripe * rule.stripe_max_size;
- if (!cur_part_id && manifest->get_head_size() > 0) {
- cur_stripe++;
- }
- } else {
- cur_stripe = 0;
- stripe_ofs = part_ofs;
- }
-
- if (!rule.part_size) {
- stripe_size = rule.stripe_max_size;
- stripe_size = std::min(manifest->get_obj_size() - stripe_ofs, stripe_size);
- } else {
- uint64_t next = std::min(stripe_ofs + rule.stripe_max_size, part_ofs + rule.part_size);
- stripe_size = next - stripe_ofs;
- }
-
- cur_override_prefix = rule.override_prefix;
-
- update_location();
-}
-
-void RGWObjManifest::obj_iterator::update_location()
-{
- if (manifest->explicit_objs) {
- if (manifest->empty()) {
- location = rgw_obj_select{};
- } else {
- location = explicit_iter->second.loc;
- }
- return;
- }
-
- if (ofs < manifest->get_head_size()) {
- location = manifest->get_obj();
- location.set_placement_rule(manifest->get_head_placement_rule());
- return;
- }
-
- manifest->get_implicit_location(cur_part_id, cur_stripe, ofs, &cur_override_prefix, &location);
-}
-
-void RGWObjManifest::obj_iterator::update_explicit_pos()
-{
- ofs = explicit_iter->first;
- stripe_ofs = ofs;
-
- map<uint64_t, RGWObjManifestPart>::iterator next_iter = explicit_iter;
- ++next_iter;
- if (next_iter != manifest->objs.end()) {
- stripe_size = next_iter->first - ofs;
- } else {
- stripe_size = manifest->obj_size - ofs;
- }
-}
-
void RGWObjManifest::generate_test_instances(std::list<RGWObjManifest*>& o)
{
RGWObjManifest *m = new RGWObjManifest;
o.push_back(new RGWObjManifest);
}
-void RGWObjManifest::get_implicit_location(uint64_t cur_part_id, uint64_t cur_stripe, uint64_t ofs, string *override_prefix, rgw_obj_select *location)
-{
- rgw_obj loc;
-
- string& oid = loc.key.name;
- string& ns = loc.key.ns;
-
- if (!override_prefix || override_prefix->empty()) {
- oid = prefix;
- } else {
- oid = *override_prefix;
- }
-
- if (!cur_part_id) {
- if (ofs < max_head_size) {
- location->set_placement_rule(head_placement_rule);
- *location = obj;
- return;
- } else {
- char buf[16];
- snprintf(buf, sizeof(buf), "%d", (int)cur_stripe);
- oid += buf;
- ns = shadow_ns;
- }
- } else {
- char buf[32];
- if (cur_stripe == 0) {
- snprintf(buf, sizeof(buf), ".%d", (int)cur_part_id);
- oid += buf;
- ns= RGW_OBJ_NS_MULTIPART;
- } else {
- snprintf(buf, sizeof(buf), ".%d_%d", (int)cur_part_id, (int)cur_stripe);
- oid += buf;
- ns = shadow_ns;
- }
- }
-
- if (!tail_placement.bucket.name.empty()) {
- loc.bucket = tail_placement.bucket;
- } else {
- loc.bucket = obj.bucket;
- }
-
- // Always overwrite instance with tail_instance
- // to get the right shadow object location
- loc.key.set_instance(tail_instance);
-
- location->set_placement_rule(tail_placement.placement_rule);
- *location = loc;
-}
-
-
void rgw_log_entry::generate_test_instances(list<rgw_log_entry*>& o)
{
namespace rgw::putobj {
-int create_etag_verifier(CephContext* cct, DataProcessor* filter,
+int create_etag_verifier(const DoutPrefixProvider *dpp,
+ CephContext* cct, DataProcessor* filter,
const bufferlist& manifest_bl,
const std::optional<RGWCompressionInfo>& compression,
etag_verifier_ptr& verifier)
auto miter = manifest_bl.cbegin();
decode(manifest, miter);
} catch (buffer::error& err) {
- ldout(cct, 0) << "ERROR: couldn't decode manifest" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: couldn't decode manifest" << dendl;
return -EIO;
}
RGWObjManifestRule rule;
bool found = manifest.get_rule(0, &rule);
if (!found) {
- lderr(cct) << "ERROR: manifest->get_rule() could not find rule" << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: manifest->get_rule() could not find rule" << dendl;
return -EIO;
}
* MPU part. These part ETags then become the input for the MPU object
* Etag.
*/
- for (auto mi = manifest.obj_begin(); mi != manifest.obj_end(); ++mi) {
+ for (auto mi = manifest.obj_begin(dpp); mi != manifest.obj_end(dpp); ++mi) {
if (cur_part_ofs == mi.get_part_ofs())
continue;
cur_part_ofs = mi.get_part_ofs();
- ldout(cct, 20) << "MPU Part offset:" << cur_part_ofs << dendl;
+ ldpp_dout(dpp, 20) << "MPU Part offset:" << cur_part_ofs << dendl;
part_ofs.push_back(cur_part_ofs);
}
};
block = std::lower_bound(block, blocks.end(), ofs, less);
if (block == blocks.end() || block->new_ofs != ofs) {
- ldout(cct, 4) << "no match for compressed offset " << ofs
+ ldpp_dout(dpp, 4) << "no match for compressed offset " << ofs
<< ", disabling etag verification" << dendl;
return -EIO;
}
ofs = block->old_ofs;
- ldout(cct, 20) << "MPU Part uncompressed offset:" << ofs << dendl;
+ ldpp_dout(dpp, 20) << "MPU Part uncompressed offset:" << ofs << dendl;
}
}
);
using etag_verifier_ptr = ceph::static_ptr<ETagVerifier, max_etag_verifier_size>;
-int create_etag_verifier(CephContext* cct, DataProcessor* next,
+int create_etag_verifier(const DoutPrefixProvider *dpp,
+ CephContext* cct, DataProcessor* next,
const bufferlist& manifest_bl,
const std::optional<RGWCompressionInfo>& compression,
etag_verifier_ptr& verifier);
cs_info.blocks = std::move(compressor->get_compression_blocks());
encode(cs_info, tmp);
attrs[RGW_ATTR_COMPRESSION] = tmp;
- ldout(state->cct, 20) << "storing " << RGW_ATTR_COMPRESSION
+ ldpp_dout(this, 20) << "storing " << RGW_ATTR_COMPRESSION
<< " with type=" << cs_info.compression_type
<< ", orig_size=" << cs_info.orig_size
<< ", blocks=" << cs_info.blocks.size() << dendl;
attrbl.append(val.c_str(), val.size() + 1);
}
- op_ret = rgw_get_request_metadata(state->cct, state->info, attrs);
+ op_ret = rgw_get_request_metadata(this, state->cct, state->info, attrs);
if (op_ret < 0) {
goto done;
}
sec_key, "/");
ceph_assert(new_fs);
- rc = new_fs->authorize(rgwlib.get_store());
+ const DoutPrefix dp(rgwlib.get_store()->ctx(), dout_subsys, "rgw mount: ");
+ rc = new_fs->authorize(&dp, rgwlib.get_store());
if (rc != 0) {
delete new_fs;
return -EINVAL;
sec_key, root);
ceph_assert(new_fs);
- rc = new_fs->authorize(rgwlib.get_store());
+ const DoutPrefix dp(rgwlib.get_store()->ctx(), dout_subsys, "rgw mount2: ");
+ rc = new_fs->authorize(&dp, rgwlib.get_store());
if (rc != 0) {
delete new_fs;
return -EINVAL;
(void) fh_lru.unref(fh, cohort::lru::FLAG_NONE);
}
- int authorize(rgw::sal::RGWRadosStore* store) {
- int ret = store->ctl()->user->get_info_by_access_key(key.id, &user, null_yield);
+ int authorize(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore* store) {
+ int ret = store->ctl()->user->get_info_by_access_key(dpp, key.id, &user, null_yield);
if (ret == 0) {
RGWAccessKey* k = user.get_key(key.id);
if (!k || (k->key != key.key))
}
if (token.valid() && (ldh->auth(token.id, token.key) == 0)) {
/* try to store user if it doesn't already exist */
- if (store->ctl()->user->get_info_by_uid(rgw_user(token.id), &user, null_yield) < 0) {
- int ret = store->ctl()->user->store_info(user, null_yield,
+ if (store->ctl()->user->get_info_by_uid(dpp, rgw_user(token.id), &user, null_yield) < 0) {
+ int ret = store->ctl()->user->store_info(dpp, user, null_yield,
RGWUserCtl::PutParams()
.set_exclusive(true));
if (ret < 0) {
RGWUserInfo* get_user() { return &user; }
- void update_user() {
+ void update_user(const DoutPrefixProvider *dpp) {
RGWUserInfo _user = user;
auto user_ctl = rgwlib.get_store()->ctl()->user;
- int ret = user_ctl->get_info_by_access_key(key.id, &user, null_yield);
+ int ret = user_ctl->get_info_by_access_key(dpp, key.id, &user, null_yield);
if (ret != 0)
user = _user;
}
#include "rgw_sal_rados.h"
#define dout_context g_ceph_context
-#define dout_subsys ceph_subsys_rgw
namespace rgw::dmclock {
class SyncScheduler;
}
}; /* RGWFCGXFrontend */
-class RGWLoadGenFrontend : public RGWProcessFrontend {
+class RGWLoadGenFrontend : public RGWProcessFrontend, public DoutPrefixProvider {
public:
RGWLoadGenFrontend(RGWProcessEnv& pe, RGWFrontendConfig *_conf)
: RGWProcessFrontend(pe, _conf) {}
+ CephContext *get_cct() const {
+ return env.store->ctx();
+ }
+
+ unsigned get_subsys() const
+ {
+ return ceph_subsys_rgw;
+ }
+
+ std::ostream& gen_prefix(std::ostream& out) const
+ {
+ return out << "rgw loadgen frontend: ";
+ }
+
int init() override {
int num_threads;
conf->get_val("num_threads", g_conf()->rgw_thread_pool_size, &num_threads);
rgw_user uid(uid_str);
RGWUserInfo user_info;
- int ret = env.store->ctl()->user->get_info_by_uid(uid, &user_info, null_yield);
+ int ret = env.store->ctl()->user->get_info_by_uid(this, uid, &user_info, null_yield);
if (ret < 0) {
derr << "ERROR: failed reading user info: uid=" << uid << " ret="
<< ret << dendl;
op.create(false);
const uint64_t queue_size = cct->_conf->rgw_gc_max_queue_size, num_deferred_entries = cct->_conf->rgw_gc_max_deferred;
gc_log_init2(op, queue_size, num_deferred_entries);
- store->gc_operate(obj_names[i], &op);
+ store->gc_operate(this, obj_names[i], &op);
}
}
ldpp_dout(this, 20) << "RGWGC::send_chain - on object name: " << obj_names[i] << "tag is: " << tag << dendl;
- auto ret = store->gc_operate(obj_names[i], &op);
+ auto ret = store->gc_operate(this, obj_names[i], &op);
if (ret != -ECANCELED && ret != -EPERM) {
return ret;
}
ObjectWriteOperation set_entry_op;
cls_rgw_gc_set_entry(set_entry_op, cct->_conf->rgw_gc_obj_min_wait, info);
- return store->gc_operate(obj_names[i], &set_entry_op);
+ return store->gc_operate(this, obj_names[i], &set_entry_op);
}
struct defer_chain_state {
ObjectWriteOperation op;
cls_rgw_gc_queue_remove_entries(op, num_entries);
- return store->gc_operate(obj_names[index], &op);
+ return store->gc_operate(this, obj_names[index], &op);
}
int RGWGC::list(int *index, string& marker, uint32_t max, bool expired_only, std::list<cls_rgw_gc_obj_info>& result, bool *truncated, bool& processing_queue)
if (obj.pool != last_pool) {
delete ctx;
ctx = new IoCtx;
- ret = rgw_init_ioctx(store->get_rados_handle(), obj.pool, *ctx);
+ ret = rgw_init_ioctx(this, store->get_rados_handle(), obj.pool, *ctx);
if (ret < 0) {
if (transitioned_objects_cache[index]) {
goto done;
::encode_json("tail_instance", tail_instance, f);
::encode_json("tail_placement", tail_placement, f);
- f->dump_object("begin_iter", begin_iter);
- f->dump_object("end_iter", end_iter);
+ // nullptr being passed into iterators since there
+ // is no cct and we aren't doing anything with these
+ // iterators that would write do the log
+ f->dump_object("begin_iter", obj_begin(nullptr));
+ f->dump_object("end_iter", obj_end(nullptr));
}
void rgw_log_entry::dump(Formatter *f) const
return (timediff >= cmp);
}
-static bool pass_object_lock_check(rgw::sal::RGWStore* store, rgw::sal::RGWObject* obj, RGWObjectCtx& ctx)
+static bool pass_object_lock_check(rgw::sal::RGWStore* store, rgw::sal::RGWObject* obj, RGWObjectCtx& ctx, const DoutPrefixProvider *dpp)
{
if (!obj->get_bucket()->get_info().obj_lock_enabled()) {
return true;
}
std::unique_ptr<rgw::sal::RGWObject::ReadOp> read_op = obj->get_read_op(&ctx);
- int ret = read_op->prepare(null_yield);
+ int ret = read_op->prepare(null_yield, dpp);
if (ret < 0) {
if (ret == -ENOENT) {
return true;
try {
decode(retention, iter->second);
} catch (buffer::error& err) {
- ldout(store->ctx(), 0) << "ERROR: failed to decode RGWObjectRetention"
+ ldpp_dout(dpp, 0) << "ERROR: failed to decode RGWObjectRetention"
<< dendl;
return false;
}
try {
decode(obj_legal_hold, iter->second);
} catch (buffer::error& err) {
- ldout(store->ctx(), 0) << "ERROR: failed to decode RGWObjectLegalHold"
+ ldpp_dout(dpp, 0) << "ERROR: failed to decode RGWObjectLegalHold"
<< dendl;
return false;
}
list_params.prefix = prefix;
}
- int init() {
- return fetch();
+ int init(const DoutPrefixProvider *dpp) {
+ return fetch(dpp);
}
- int fetch() {
- int ret = bucket->list(list_params, 1000, list_results, null_yield);
+ int fetch(const DoutPrefixProvider *dpp) {
+ int ret = bucket->list(dpp, list_params, 1000, list_results, null_yield);
if (ret < 0) {
return ret;
}
std::this_thread::sleep_for(std::chrono::milliseconds(delay_ms));
}
- bool get_obj(rgw_bucket_dir_entry **obj,
+ bool get_obj(const DoutPrefixProvider *dpp, rgw_bucket_dir_entry **obj,
std::function<void(void)> fetch_barrier
= []() { /* nada */}) {
if (obj_iter == list_results.objs.end()) {
} else {
fetch_barrier();
list_params.marker = pre_obj.key;
- int ret = fetch();
+ int ret = fetch(dpp);
if (ret < 0) {
ldout(store->ctx(), 0) << "ERROR: list_op returned ret=" << ret
<< dendl;
}; /* lc_op_ctx */
-static int remove_expired_obj(lc_op_ctx& oc, bool remove_indeed)
+static int remove_expired_obj(const DoutPrefixProvider *dpp, lc_op_ctx& oc, bool remove_indeed)
{
auto& store = oc.store;
auto& bucket_info = oc.bucket->get_info();
ACLOwner bucket_owner;
bucket_owner.set_id(bucket_info.owner);
- return obj->delete_object(&oc.rctx, obj_owner, bucket_owner, meta.mtime, false, 0,
+ return obj->delete_object(dpp, &oc.rctx, obj_owner, bucket_owner, meta.mtime, false, 0,
version_id, null_yield);
} /* remove_expired_obj */
public:
virtual ~LCOpAction() {}
- virtual bool check(lc_op_ctx& oc, ceph::real_time *exp_time) {
+ virtual bool check(lc_op_ctx& oc, ceph::real_time *exp_time, const DoutPrefixProvider *dpp) {
return false;
}
class LCOpFilter {
public:
virtual ~LCOpFilter() {}
- virtual bool check(lc_op_ctx& oc) {
+ virtual bool check(const DoutPrefixProvider *dpp, lc_op_ctx& oc) {
return false;
}
}; /* LCOpFilter */
return;
}
RGWObjectCtx rctx(store);
- int ret = abort_multipart_upload(store, cct, &rctx, target->get_info(), mp_obj);
+ int ret = abort_multipart_upload(this, store, cct, &rctx, target->get_info(), mp_obj);
if (ret == 0) {
if (perfcounter) {
perfcounter->inc(l_rgw_lc_abort_mpu, 1);
params.prefix = prefix_iter->first;
do {
results.objs.clear();
- ret = target->list(params, 1000, results, null_yield);
+ ret = target->list(this, params, 1000, results, null_yield);
if (ret < 0) {
if (ret == (-ENOENT))
return 0;
return 0;
}
-static int read_obj_tags(rgw::sal::RGWObject* obj, RGWObjectCtx& ctx, bufferlist& tags_bl)
+static int read_obj_tags(const DoutPrefixProvider *dpp, rgw::sal::RGWObject* obj, RGWObjectCtx& ctx, bufferlist& tags_bl)
{
std::unique_ptr<rgw::sal::RGWObject::ReadOp> rop = obj->get_read_op(&ctx);
- return rop->get_attr(RGW_ATTR_TAGS, tags_bl, null_yield);
+ return rop->get_attr(dpp, RGW_ATTR_TAGS, tags_bl, null_yield);
}
static bool is_valid_op(const lc_op& op)
return tag_count == rule_action.obj_tags->count();
}
-static int check_tags(lc_op_ctx& oc, bool *skip)
+static int check_tags(const DoutPrefixProvider *dpp, lc_op_ctx& oc, bool *skip)
{
auto& op = oc.op;
*skip = true;
bufferlist tags_bl;
- int ret = read_obj_tags(oc.obj.get(), oc.rctx, tags_bl);
+ int ret = read_obj_tags(dpp, oc.obj.get(), oc.rctx, tags_bl);
if (ret < 0) {
if (ret != -ENODATA) {
ldout(oc.cct, 5) << "ERROR: read_obj_tags returned r="
class LCOpFilter_Tags : public LCOpFilter {
public:
- bool check(lc_op_ctx& oc) override {
+ bool check(const DoutPrefixProvider *dpp, lc_op_ctx& oc) override {
auto& o = oc.o;
if (o.is_delete_marker()) {
bool skip;
- int ret = check_tags(oc, &skip);
+ int ret = check_tags(dpp, oc, &skip);
if (ret < 0) {
if (ret == -ENOENT) {
return false;
public:
LCOpAction_CurrentExpiration(op_env& env) {}
- bool check(lc_op_ctx& oc, ceph::real_time *exp_time) override {
+ bool check(lc_op_ctx& oc, ceph::real_time *exp_time, const DoutPrefixProvider *dpp) override {
auto& o = oc.o;
if (!o.is_current()) {
- ldout(oc.cct, 20) << __func__ << "(): key=" << o.key
+ ldpp_dout(dpp, 20) << __func__ << "(): key=" << o.key
<< ": not current, skipping "
<< oc.wq->thr_name() << dendl;
return false;
std::string nkn;
if (oc.next_key_name) nkn = *oc.next_key_name;
if (oc.next_has_same_name(o.key.name)) {
- ldout(oc.cct, 7) << __func__ << "(): dm-check SAME: key=" << o.key
+ ldpp_dout(dpp, 7) << __func__ << "(): dm-check SAME: key=" << o.key
<< " next_key_name: %%" << nkn << "%% "
<< oc.wq->thr_name() << dendl;
return false;
} else {
- ldout(oc.cct, 7) << __func__ << "(): dm-check DELE: key=" << o.key
+ ldpp_dout(dpp, 7) << __func__ << "(): dm-check DELE: key=" << o.key
<< " next_key_name: %%" << nkn << "%% "
<< oc.wq->thr_name() << dendl;
*exp_time = real_clock::now();
auto& op = oc.op;
if (op.expiration <= 0) {
if (op.expiration_date == boost::none) {
- ldout(oc.cct, 20) << __func__ << "(): key=" << o.key
+ ldpp_dout(dpp, 20) << __func__ << "(): key=" << o.key
<< ": no expiration set in rule, skipping "
<< oc.wq->thr_name() << dendl;
return false;
is_expired = obj_has_expired(oc.cct, mtime, op.expiration, exp_time);
}
- ldout(oc.cct, 20) << __func__ << "(): key=" << o.key << ": is_expired="
+ ldpp_dout(dpp, 20) << __func__ << "(): key=" << o.key << ": is_expired="
<< (int)is_expired << " "
<< oc.wq->thr_name() << dendl;
return is_expired;
auto& o = oc.o;
int r;
if (o.is_delete_marker()) {
- r = remove_expired_obj(oc, true);
+ r = remove_expired_obj(oc.dpp, oc, true);
if (r < 0) {
ldout(oc.cct, 0) << "ERROR: current is-dm remove_expired_obj "
<< oc.bucket << ":" << o.key
<< " " << oc.wq->thr_name() << dendl;
} else {
/* ! o.is_delete_marker() */
- r = remove_expired_obj(oc, !oc.bucket->versioned());
+ r = remove_expired_obj(oc.dpp, oc, !oc.bucket->versioned());
if (r < 0) {
ldout(oc.cct, 0) << "ERROR: remove_expired_obj "
<< oc.bucket << ":" << o.key
LCOpAction_NonCurrentExpiration(op_env& env)
{}
- bool check(lc_op_ctx& oc, ceph::real_time *exp_time) override {
+ bool check(lc_op_ctx& oc, ceph::real_time *exp_time, const DoutPrefixProvider *dpp) override {
auto& o = oc.o;
if (o.is_current()) {
- ldout(oc.cct, 20) << __func__ << "(): key=" << o.key
+ ldpp_dout(dpp, 20) << __func__ << "(): key=" << o.key
<< ": current version, skipping "
<< oc.wq->thr_name() << dendl;
return false;
bool is_expired = obj_has_expired(oc.cct, oc.effective_mtime, expiration,
exp_time);
- ldout(oc.cct, 20) << __func__ << "(): key=" << o.key << ": is_expired="
+ ldpp_dout(dpp, 20) << __func__ << "(): key=" << o.key << ": is_expired="
<< is_expired << " "
<< oc.wq->thr_name() << dendl;
return is_expired &&
- pass_object_lock_check(oc.store, oc.obj.get(), oc.rctx);
+ pass_object_lock_check(oc.store, oc.obj.get(), oc.rctx, dpp);
}
int process(lc_op_ctx& oc) {
auto& o = oc.o;
- int r = remove_expired_obj(oc, true);
+ int r = remove_expired_obj(oc.dpp, oc, true);
if (r < 0) {
ldout(oc.cct, 0) << "ERROR: remove_expired_obj (non-current expiration) "
<< oc.bucket << ":" << o.key
public:
LCOpAction_DMExpiration(op_env& env) {}
- bool check(lc_op_ctx& oc, ceph::real_time *exp_time) override {
+ bool check(lc_op_ctx& oc, ceph::real_time *exp_time, const DoutPrefixProvider *dpp) override {
auto& o = oc.o;
if (!o.is_delete_marker()) {
- ldout(oc.cct, 20) << __func__ << "(): key=" << o.key
+ ldpp_dout(dpp, 20) << __func__ << "(): key=" << o.key
<< ": not a delete marker, skipping "
<< oc.wq->thr_name() << dendl;
return false;
}
if (oc.next_has_same_name(o.key.name)) {
- ldout(oc.cct, 20) << __func__ << "(): key=" << o.key
+ ldpp_dout(dpp, 20) << __func__ << "(): key=" << o.key
<< ": next is same object, skipping "
<< oc.wq->thr_name() << dendl;
return false;
int process(lc_op_ctx& oc) {
auto& o = oc.o;
- int r = remove_expired_obj(oc, true);
+ int r = remove_expired_obj(oc.dpp, oc, true);
if (r < 0) {
ldout(oc.cct, 0) << "ERROR: remove_expired_obj (delete marker expiration) "
<< oc.bucket << ":" << o.key
LCOpAction_Transition(const transition_action& _transition)
: transition(_transition) {}
- bool check(lc_op_ctx& oc, ceph::real_time *exp_time) override {
+ bool check(lc_op_ctx& oc, ceph::real_time *exp_time, const DoutPrefixProvider *dpp) override {
auto& o = oc.o;
if (o.is_delete_marker()) {
bool is_expired;
if (transition.days < 0) {
if (transition.date == boost::none) {
- ldout(oc.cct, 20) << __func__ << "(): key=" << o.key
+ ldpp_dout(dpp, 20) << __func__ << "(): key=" << o.key
<< ": no transition day/date set in rule, skipping "
<< oc.wq->thr_name() << dendl;
return false;
for (auto& a : actions) {
real_time action_exp;
- if (a->check(ctx, &action_exp)) {
+ if (a->check(ctx, &action_exp, dpp)) {
if (action_exp > exp) {
exp = action_exp;
selected = &a;
bool cont = false;
for (auto& f : filters) {
- if (f->check(ctx)) {
+ if (f->check(dpp, ctx)) {
cont = true;
break;
}
string bucket_tenant = result[0];
string bucket_name = result[1];
string bucket_marker = result[2];
- int ret = store->get_bucket(nullptr, bucket_tenant, bucket_name, &bucket, null_yield);
+ int ret = store->get_bucket(this, nullptr, bucket_tenant, bucket_name, &bucket, null_yield);
if (ret < 0) {
ldpp_dout(this, 0) << "LC:get_bucket for " << bucket_name
<< " failed" << dendl;
return ret;
}
- ret = bucket->get_bucket_info(null_yield);
+ ret = bucket->get_bucket_info(this, null_yield);
if (ret < 0) {
ldpp_dout(this, 0) << "LC:get_bucket_info for " << bucket_name
<< " failed" << dendl;
LCObjsLister ol(store, bucket.get());
ol.set_prefix(prefix_iter->first);
- ret = ol.init();
+ ret = ol.init(this);
if (ret < 0) {
if (ret == (-ENOENT))
return 0;
LCOpRule orule(oenv);
orule.build(); // why can't ctor do it?
rgw_bucket_dir_entry* o{nullptr};
- for (; ol.get_obj(&o /* , fetch_barrier */); ol.next()) {
+ for (; ol.get_obj(this, &o /* , fetch_barrier */); ol.next()) {
orule.update();
std::tuple<LCOpRule, rgw_bucket_dir_entry> t1 = {orule, *o};
worker->workpool->enqueue(WorkItem{t1});
<< dendl;
do {
- int ret = lock->try_lock(lock_duration, null_yield);
+ int ret = lock->try_lock(this, lock_duration, null_yield);
if (ret == -EBUSY || ret == -EEXIST) {
/* already locked by another lc processor */
ldpp_dout(this, 0) << "RGWLC::bucket_lc_post() failed to acquire lock on "
utime_t time(max_lock_secs, 0);
- int ret = lock->try_lock(time, null_yield);
+ int ret = lock->try_lock(this, time, null_yield);
if (ret == -EBUSY || ret == -EEXIST) {
/* already locked by another lc processor */
ldpp_dout(this, 0) << "RGWLC::process() failed to acquire lock on "
}
template<typename F>
-static int guard_lc_modify(rgw::sal::RGWRadosStore* store,
+static int guard_lc_modify(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore* store,
rgw::sal::Lifecycle* sal_lc,
const rgw_bucket& bucket, const string& cookie,
const F& f) {
int ret;
do {
- ret = lock->try_lock(time, null_yield);
+ ret = lock->try_lock(dpp, time, null_yield);
if (ret == -EBUSY || ret == -EEXIST) {
- ldout(cct, 0) << "RGWLC::RGWPutLC() failed to acquire lock on "
+ ldpp_dout(dpp, 0) << "RGWLC::RGWPutLC() failed to acquire lock on "
<< oid << ", sleep 5, try again" << dendl;
sleep(5); // XXX: return retryable error
continue;
}
if (ret < 0) {
- ldout(cct, 0) << "RGWLC::RGWPutLC() failed to acquire lock on "
+ ldpp_dout(dpp, 0) << "RGWLC::RGWPutLC() failed to acquire lock on "
<< oid << ", ret=" << ret << dendl;
break;
}
ret = f(sal_lc, oid, entry);
if (ret < 0) {
- ldout(cct, 0) << "RGWLC::RGWPutLC() failed to set entry on "
+ ldpp_dout(dpp, 0) << "RGWLC::RGWPutLC() failed to set entry on "
<< oid << ", ret=" << ret << dendl;
}
break;
int ret =
store->ctl()->bucket->set_bucket_instance_attrs(
- bucket_info, attrs, &bucket_info.objv_tracker, null_yield);
+ bucket_info, attrs, &bucket_info.objv_tracker, null_yield, this);
if (ret < 0)
return ret;
rgw_bucket& bucket = bucket_info.bucket;
- ret = guard_lc_modify(store, sal_lc.get(), bucket, cookie,
+ ret = guard_lc_modify(this, store, sal_lc.get(), bucket, cookie,
[&](rgw::sal::Lifecycle* sal_lc, const string& oid,
const rgw::sal::Lifecycle::LCEntry& entry) {
return sal_lc->set_entry(oid, entry);
attrs.erase(RGW_ATTR_LC);
int ret =
store->ctl()->bucket->set_bucket_instance_attrs(
- bucket_info, attrs, &bucket_info.objv_tracker, null_yield);
+ bucket_info, attrs, &bucket_info.objv_tracker, null_yield, this);
rgw_bucket& bucket = bucket_info.bucket;
if (ret < 0) {
- ldout(cct, 0) << "RGWLC::RGWDeleteLC() failed to set attrs on bucket="
+ ldpp_dout(this, 0) << "RGWLC::RGWDeleteLC() failed to set attrs on bucket="
<< bucket.name << " returned err=" << ret << dendl;
return ret;
}
- ret = guard_lc_modify(store, sal_lc.get(), bucket, cookie,
+ ret = guard_lc_modify(this, store, sal_lc.get(), bucket, cookie,
[&](rgw::sal::Lifecycle* sal_lc, const string& oid,
const rgw::sal::Lifecycle::LCEntry& entry) {
return sal_lc->rm_entry(oid, entry);
namespace rgw::lc {
-int fix_lc_shard_entry(rgw::sal::RGWRadosStore* store,
+int fix_lc_shard_entry(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore* store,
rgw::sal::Lifecycle* sal_lc,
const RGWBucketInfo& bucket_info,
const map<std::string,bufferlist>& battrs)
// We are not dropping the old marker here as that would be caught by the next LC process update
int ret = sal_lc->get_entry(lc_oid, shard_name, entry);
if (ret == 0) {
- ldout(store->ctx(), 5) << "Entry already exists, nothing to do" << dendl;
+ ldpp_dout(dpp, 5) << "Entry already exists, nothing to do" << dendl;
return ret; // entry is already existing correctly set to marker
}
- ldout(store->ctx(), 5) << "lc_get_entry errored ret code=" << ret << dendl;
+ ldpp_dout(dpp, 5) << "lc_get_entry errored ret code=" << ret << dendl;
if (ret == -ENOENT) {
- ldout(store->ctx(), 1) << "No entry for bucket=" << bucket_info.bucket.name
+ ldpp_dout(dpp, 1) << "No entry for bucket=" << bucket_info.bucket.name
<< " creating " << dendl;
// TODO: we have too many ppl making cookies like this!
char cookie_buf[COOKIE_LEN + 1];
gen_rand_alphanumeric(store->ctx(), cookie_buf, sizeof(cookie_buf) - 1);
std::string cookie = cookie_buf;
- ret = guard_lc_modify(
+ ret = guard_lc_modify(dpp,
store, sal_lc, bucket_info.bucket, cookie,
[&lc_oid](rgw::sal::Lifecycle* slc,
const string& oid,
namespace rgw::lc {
-int fix_lc_shard_entry(rgw::sal::RGWRadosStore *store,
+int fix_lc_shard_entry(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store,
rgw::sal::Lifecycle* sal_lc,
const RGWBucketInfo& bucket_info,
const map<std::string,bufferlist>& battrs);
#include "services/svc_zone_utils.h"
#include "include/ceph_assert.h"
+#define dout_subsys ceph_subsys_rgw
+
class OpsLogSocket;
namespace rgw {
class RGWLibFrontend;
- class RGWLib {
+ class RGWLib : public DoutPrefixProvider {
RGWFrontendConfig* fec;
RGWLibFrontend* fe;
OpsLogSocket* olog;
rgw::LDAPHelper* get_ldh() { return ldh; }
+ CephContext *get_cct() const override { return cct.get(); }
+ unsigned get_subsys() const { return dout_subsys; }
+ std::ostream& gen_prefix(std::ostream& out) const { return out << "lib rgw: "; }
+
int init();
int init(vector<const char *>& args);
int stop();
} /* enqueue_req */
/* "regular" requests */
- void handle_request(RGWRequest* req) override; // async handler, deletes req
+ void handle_request(const DoutPrefixProvider *dpp, RGWRequest* req) override; // async handler, deletes req
int process_request(RGWLibRequest* req);
int process_request(RGWLibRequest* req, RGWLibIO* io);
void set_access_key(RGWAccessKey& key) { access_key = key; }
date_str = rgw_to_asctime(tm);
}
-int RGWLoadGenRequestEnv::sign(RGWAccessKey& access_key)
+int RGWLoadGenRequestEnv::sign(const DoutPrefixProvider *dpp, RGWAccessKey& access_key)
{
meta_map_t meta_map;
map<string, string> sub_resources;
string canonical_header;
string digest;
- rgw_create_s3_canonical_header(request_method.c_str(),
+ rgw_create_s3_canonical_header(dpp,
+ request_method.c_str(),
nullptr, /* const char *content_md5 */
content_type.c_str(),
date_str.c_str(),
}
void set_date(utime_t& tm);
- int sign(RGWAccessKey& access_key);
+ int sign(const DoutPrefixProvider *dpp, RGWAccessKey& access_key);
};
/* XXX does RGWLoadGenIO actually want to perform stream/HTTP I/O,
req_wq.queue(req);
} /* RGWLoadGenProcess::gen_request */
-void RGWLoadGenProcess::handle_request(RGWRequest* r)
+void RGWLoadGenProcess::handle_request(const DoutPrefixProvider *dpp, RGWRequest* r)
{
RGWLoadGenRequest* req = static_cast<RGWLoadGenRequest*>(r);
env.request_method = req->method;
env.uri = req->resource;
env.set_date(tm);
- env.sign(access_key);
+ env.sign(dpp, access_key);
RGWLoadGenIO real_client_io(&env);
RGWRestfulIO client_io(cct, &real_client_io);
}
/* usage logger */
-class UsageLogger {
+class UsageLogger : public DoutPrefixProvider {
CephContext *cct;
RGWRados *store;
map<rgw_user_bucket, RGWUsageBatch> usage_map;
num_entries = 0;
lock.unlock();
- store->log_usage(old_map);
+ store->log_usage(this, old_map);
}
+
+ CephContext *get_cct() const override { return cct; }
+ unsigned get_subsys() const override { return dout_subsys; }
+ std::ostream& gen_prefix(std::ostream& out) const override { return out << "rgw UsageLogger: "; }
};
static UsageLogger *usage_logger = NULL;
if (!s->is_err())
data.successful_ops = 1;
- ldout(s->cct, 30) << "log_usage: bucket_name=" << bucket_name
+ ldpp_dout(s, 30) << "log_usage: bucket_name=" << bucket_name
<< " tenant=" << s->bucket_tenant
<< ", bytes_sent=" << bytes_sent << ", bytes_received="
<< bytes_received << ", success=" << data.successful_ops << dendl;
return 0;
if (s->bucket_name.empty()) {
- ldout(s->cct, 5) << "nothing to log for operation" << dendl;
+ ldpp_dout(s, 5) << "nothing to log for operation" << dendl;
return -EINVAL;
}
if (s->err.ret == -ERR_NO_SUCH_BUCKET || rgw::sal::RGWBucket::empty(s->bucket.get())) {
if (!s->cct->_conf->rgw_log_nonexistent_bucket) {
- ldout(s->cct, 5) << "bucket " << s->bucket_name << " doesn't exist, not logging" << dendl;
+ ldpp_dout(s, 5) << "bucket " << s->bucket_name << " doesn't exist, not logging" << dendl;
return 0;
}
bucket_id = "";
entry.bucket = rgw_make_bucket_entry_name(s->bucket_tenant, s->bucket_name);
if (check_utf8(entry.bucket.c_str(), entry.bucket.size()) != 0) {
- ldout(s->cct, 5) << "not logging op on bucket with non-utf8 name" << dendl;
+ ldpp_dout(s, 5) << "not logging op on bucket with non-utf8 name" << dendl;
return 0;
}
rgw_raw_obj obj(store->svc.zone->get_zone_params().log_pool, oid);
- ret = store->append_async(obj, bl.length(), bl);
+ ret = store->append_async(s, obj, bl.length(), bl);
if (ret == -ENOENT) {
- ret = store->create_pool(store->svc.zone->get_zone_params().log_pool);
+ ret = store->create_pool(s, store->svc.zone->get_zone_params().log_pool);
if (ret < 0)
goto done;
// retry
- ret = store->append_async(obj, bl.length(), bl);
+ ret = store->append_async(s, obj, bl.length(), bl);
}
}
}
done:
if (ret < 0)
- ldout(s->cct, 0) << "ERROR: failed to log entry" << dendl;
+ ldpp_dout(s, 0) << "ERROR: failed to log entry" << dendl;
return ret;
}
namespace {
/// Return the shard type, and a bool to see whether it has entries.
-std::pair<shard_check, bool>
-probe_shard(librados::IoCtx& ioctx, const std::string& oid,
+shard_check
+probe_shard(const DoutPrefixProvider *dpp, librados::IoCtx& ioctx, const std::string& oid,
bool& fifo_unsupported, optional_yield y)
{
- auto cct = static_cast<CephContext*>(ioctx.cct());
- bool omap = false;
- {
- librados::ObjectReadOperation op;
- cls_log_header header;
- cls_log_info(op, &header);
- auto r = rgw_rados_operate(ioctx, oid, &op, nullptr, y);
- if (r == -ENOENT) {
- return { shard_check::dne, {} };
- }
-
- if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
- << " error probing for omap: r=" << r
- << ", oid=" << oid << dendl;
- return { shard_check::corrupt, {} };
- }
- if (header != cls_log_header{})
- omap = true;
- }
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ << " probing oid=" << oid
+ << dendl;
if (!fifo_unsupported) {
std::unique_ptr<rgw::cls::fifo::FIFO> fifo;
- auto r = rgw::cls::fifo::FIFO::open(ioctx, oid,
+ auto r = rgw::cls::fifo::FIFO::open(dpp, ioctx, oid,
&fifo, y,
std::nullopt, true);
- if (r < 0 && !(r == -ENOENT || r == -ENODATA || r == -EPERM)) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
- << " error probing for fifo: r=" << r
- << ", oid=" << oid << dendl;
- return { shard_check::corrupt, {} };
- }
- if (fifo && omap) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
- << " fifo and omap found: oid=" << oid << dendl;
- return { shard_check::corrupt, {} };
- }
- if (fifo) {
- bool more = false;
- std::vector<rgw::cls::fifo::list_entry> entries;
- r = fifo->list(1, nullopt, &entries, &more, y);
- if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
- << ": unable to list entries: r=" << r
- << ", oid=" << oid << dendl;
- return { shard_check::corrupt, {} };
- }
- return { shard_check::fifo, !entries.empty() };
- }
- if (r == -EPERM) {
- // Returned by OSD id CLS module not loaded.
+ switch (r) {
+ case 0:
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ << ": oid=" << oid << " is FIFO"
+ << dendl;
+ return shard_check::fifo;
+
+ case -ENODATA:
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ << ": oid=" << oid << " is empty and therefore OMAP"
+ << dendl;
+ return shard_check::omap;
+
+ case -ENOENT:
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ << ": oid=" << oid << " does not exist"
+ << dendl;
+ return shard_check::dne;
+
+ case -EPERM:
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ << ": FIFO is unsupported, marking."
+ << dendl;
fifo_unsupported = true;
+ return shard_check::omap;
+
+ default:
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ << ": error probing: r=" << r
+ << ", oid=" << oid << dendl;
+ return shard_check::corrupt;
}
+ } else {
+ // Since FIFO is unsupported, OMAP is the only alternative
+ return shard_check::omap;
}
- if (omap) {
- std::list<cls_log_entry> entries;
- std::string out_marker;
- bool truncated = false;
- librados::ObjectReadOperation op;
- cls_log_list(op, {}, {}, {}, 1, entries,
- &out_marker, &truncated);
- auto r = rgw_rados_operate(ioctx, oid, &op, nullptr, y);
- if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
- << ": failed to list: r=" << r << ", oid=" << oid << dendl;
- return { shard_check::corrupt, {} };
- }
- return { shard_check::omap, !entries.empty() };
- }
-
- // An object exists, but has never had FIFO or cls_log entries written
- // to it. Likely just the marker Omap.
- return { shard_check::dne, {} };
}
tl::expected<log_type, bs::error_code>
-handle_dne(librados::IoCtx& ioctx,
+handle_dne(const DoutPrefixProvider *dpp, librados::IoCtx& ioctx,
log_type def,
std::string oid,
bool fifo_unsupported,
optional_yield y)
{
- auto cct = static_cast<CephContext*>(ioctx.cct());
if (def == log_type::fifo) {
if (fifo_unsupported) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " WARNING: FIFO set as default but not supported by OSD. "
<< "Falling back to OMAP." << dendl;
return log_type::omap;
}
std::unique_ptr<rgw::cls::fifo::FIFO> fifo;
- auto r = rgw::cls::fifo::FIFO::create(ioctx, oid,
+ auto r = rgw::cls::fifo::FIFO::create(dpp, ioctx, oid,
&fifo, y,
std::nullopt);
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " error creating FIFO: r=" << r
<< ", oid=" << oid << dendl;
return tl::unexpected(bs::error_code(-r, bs::system_category()));
}
tl::expected<log_type, bs::error_code>
-log_backing_type(librados::IoCtx& ioctx,
+log_backing_type(const DoutPrefixProvider *dpp,
+ librados::IoCtx& ioctx,
log_type def,
int shards,
const fu2::unique_function<std::string(int) const>& get_oid,
optional_yield y)
{
- auto cct = static_cast<CephContext*>(ioctx.cct());
auto check = shard_check::dne;
bool fifo_unsupported = false;
for (int i = 0; i < shards; ++i) {
- auto [c, e] = probe_shard(ioctx, get_oid(i), fifo_unsupported, y);
+ auto c = probe_shard(dpp, ioctx, get_oid(i), fifo_unsupported, y);
if (c == shard_check::corrupt)
return tl::unexpected(bs::error_code(EIO, bs::system_category()));
if (c == shard_check::dne) continue;
}
if (check != c) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " clashing types: check=" << check
<< ", c=" << c << dendl;
return tl::unexpected(bs::error_code(EIO, bs::system_category()));
}
}
if (check == shard_check::corrupt) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< " should be unreachable!" << dendl;
return tl::unexpected(bs::error_code(EIO, bs::system_category()));
}
if (check == shard_check::dne)
- return handle_dne(ioctx,
+ return handle_dne(dpp, ioctx,
def,
get_oid(0),
fifo_unsupported,
return (check == shard_check::fifo ? log_type::fifo : log_type::omap);
}
-bs::error_code log_remove(librados::IoCtx& ioctx,
+bs::error_code log_remove(const DoutPrefixProvider *dpp,
+ librados::IoCtx& ioctx,
int shards,
const fu2::unique_function<std::string(int) const>& get_oid,
bool leave_zero,
optional_yield y)
{
bs::error_code ec;
- auto cct = static_cast<CephContext*>(ioctx.cct());
for (int i = 0; i < shards; ++i) {
auto oid = get_oid(i);
rados::cls::fifo::info info;
uint32_t part_header_size = 0, part_entry_overhead = 0;
- auto r = rgw::cls::fifo::get_meta(ioctx, oid, nullopt, &info,
+ auto r = rgw::cls::fifo::get_meta(dpp, ioctx, oid, nullopt, &info,
&part_header_size, &part_entry_overhead,
0, y, true);
if (r == -ENOENT) continue;
librados::ObjectWriteOperation op;
op.remove();
auto part_oid = info.part_oid(j);
- auto subr = rgw_rados_operate(ioctx, part_oid, &op, null_yield);
+ auto subr = rgw_rados_operate(dpp, ioctx, part_oid, &op, null_yield);
if (subr < 0 && subr != -ENOENT) {
if (!ec)
ec = bs::error_code(-subr, bs::system_category());
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< ": failed removing FIFO part: part_oid=" << part_oid
<< ", subr=" << subr << dendl;
}
if (r < 0 && r != -ENODATA) {
if (!ec)
ec = bs::error_code(-r, bs::system_category());
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< ": failed checking FIFO part: oid=" << oid
<< ", r=" << r << dendl;
}
} else {
op.remove();
}
- r = rgw_rados_operate(ioctx, oid, &op, null_yield);
+ r = rgw_rados_operate(dpp, ioctx, oid, &op, null_yield);
if (r < 0 && r != -ENOENT) {
if (!ec)
ec = bs::error_code(-r, bs::system_category());
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< ": failed removing shard: oid=" << oid
<< ", r=" << r << dendl;
}
}
}
-bs::error_code logback_generations::setup(log_type def,
+bs::error_code logback_generations::setup(const DoutPrefixProvider *dpp,
+ log_type def,
optional_yield y) noexcept
{
try {
- auto cct = static_cast<CephContext*>(ioctx.cct());
// First, read.
- auto res = read(y);
+ auto cct = static_cast<CephContext*>(ioctx.cct());
+ auto res = read(dpp, y);
if (!res && res.error() != bs::errc::no_such_file_or_directory) {
return res.error();
}
// Are we the first? Then create generation 0 and the generations
// metadata.
librados::ObjectWriteOperation op;
- auto type = log_backing_type(ioctx, def, shards,
+ auto type = log_backing_type(dpp, ioctx, def, shards,
[this](int shard) {
return this->get_oid(0, shard);
}, y);
lock.unlock();
op.write_full(bl);
- auto r = rgw_rados_operate(ioctx, oid, &op, y);
+ auto r = rgw_rados_operate(dpp, ioctx, oid, &op, y);
if (r < 0 && r != -EEXIST) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< ": failed writing oid=" << oid
<< ", r=" << r << dendl;
bs::system_error(-r, bs::system_category());
}
// Did someone race us? Then re-read.
if (r != 0) {
- res = read(y);
+ res = read(dpp, y);
if (!res)
return res.error();
if (res->first.empty())
// generation zero, incremented, then erased generation zero,
// don't leave generation zero lying around.
if (l.gen_id != 0) {
- auto ec = log_remove(ioctx, shards,
+ auto ec = log_remove(dpp, ioctx, shards,
[this](int shard) {
return this->get_oid(0, shard);
}, true, y);
m.unlock();
auto ec = watch();
if (ec) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< ": failed to re-establish watch, unsafe to continue: oid="
<< oid << ", ec=" << ec.message() << dendl;
}
}
}
-bs::error_code logback_generations::update(optional_yield y) noexcept
+bs::error_code logback_generations::update(const DoutPrefixProvider *dpp, optional_yield y) noexcept
{
try {
- auto cct = static_cast<CephContext*>(ioctx.cct());
- auto res = read(y);
+ auto res = read(dpp, y);
if (!res) {
return res.error();
}
// Check consistency and prepare update
if (es.empty()) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< ": INCONSISTENCY! Read empty update." << dendl;
return bs::error_code(EFAULT, bs::system_category());
}
assert(cur_lowest != entries_.cend());
auto new_lowest = lowest_nomempty(es);
if (new_lowest == es.cend()) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< ": INCONSISTENCY! Read update with no active head." << dendl;
return bs::error_code(EFAULT, bs::system_category());
}
if (new_lowest->first < cur_lowest->first) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< ": INCONSISTENCY! Tail moved wrong way." << dendl;
return bs::error_code(EFAULT, bs::system_category());
}
entries_t new_entries;
if ((es.end() - 1)->first < (entries_.end() - 1)->first) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< ": INCONSISTENCY! Head moved wrong way." << dendl;
return bs::error_code(EFAULT, bs::system_category());
}
return {};
}
-auto logback_generations::read(optional_yield y) noexcept ->
+auto logback_generations::read(const DoutPrefixProvider *dpp, optional_yield y) noexcept ->
tl::expected<std::pair<entries_t, obj_version>, bs::error_code>
{
try {
- auto cct = static_cast<CephContext*>(ioctx.cct());
librados::ObjectReadOperation op;
std::unique_lock l(m);
cls_version_check(op, version, VER_COND_GE);
cls_version_read(op, &v2);
cb::list bl;
op.read(0, 0, &bl, nullptr);
- auto r = rgw_rados_operate(ioctx, oid, &op, nullptr, y);
+ auto r = rgw_rados_operate(dpp, ioctx, oid, &op, nullptr, y);
if (r < 0) {
if (r == -ENOENT) {
- ldout(cct, 5) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, 5) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< ": oid=" << oid
<< " not found" << dendl;
} else {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< ": failed reading oid=" << oid
<< ", r=" << r << dendl;
}
}
}
-bs::error_code logback_generations::write(entries_t&& e,
+bs::error_code logback_generations::write(const DoutPrefixProvider *dpp, entries_t&& e,
std::unique_lock<std::mutex>&& l_,
optional_yield y) noexcept
{
ceph_assert(l.mutex() == &m &&
l.owns_lock());
try {
- auto cct = static_cast<CephContext*>(ioctx.cct());
librados::ObjectWriteOperation op;
cls_version_check(op, version, VER_COND_GE);
cb::list bl;
encode(e, bl);
op.write_full(bl);
cls_version_inc(op);
- auto r = rgw_rados_operate(ioctx, oid, &op, y);
+ auto r = rgw_rados_operate(dpp, ioctx, oid, &op, y);
if (r == 0) {
entries_ = std::move(e);
version.inc();
}
l.unlock();
if (r < 0 && r != -ECANCELED) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< ": failed reading oid=" << oid
<< ", r=" << r << dendl;
return { -r, bs::system_category() };
}
if (r == -ECANCELED) {
- auto ec = update(y);
+ auto ec = update(dpp, y);
if (ec) {
return ec;
} else {
return {};
}
-bs::error_code logback_generations::new_backing(log_type type,
+bs::error_code logback_generations::new_backing(const DoutPrefixProvider *dpp,
+ log_type type,
optional_yield y) noexcept {
- auto cct = static_cast<CephContext*>(ioctx.cct());
static constexpr auto max_tries = 10;
try {
- auto ec = update(y);
+ auto ec = update(dpp, y);
if (ec) return ec;
auto tries = 0;
entries_t new_entries;
new_entries.emplace(newgenid, newgen);
auto es = entries_;
es.emplace(newgenid, std::move(newgen));
- ec = write(std::move(es), std::move(l), y);
+ ec = write(dpp, std::move(es), std::move(l), y);
++tries;
} while (ec == bs::errc::operation_canceled &&
tries < max_tries);
if (tries >= max_tries) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< ": exhausted retry attempts." << dendl;
return ec;
}
if (ec) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< ": write failed with ec=" << ec.message() << dendl;
return ec;
}
cb::list bl, rbl;
- auto r = rgw_rados_notify(ioctx, oid, bl, 10'000, &rbl, y);
+ auto r = rgw_rados_notify(dpp, ioctx, oid, bl, 10'000, &rbl, y);
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< ": notify failed with r=" << r << dendl;
return { -r, bs::system_category() };
}
return {};
}
-bs::error_code logback_generations::empty_to(uint64_t gen_id,
+bs::error_code logback_generations::empty_to(const DoutPrefixProvider *dpp,
+ uint64_t gen_id,
optional_yield y) noexcept {
- auto cct = static_cast<CephContext*>(ioctx.cct());
static constexpr auto max_tries = 10;
try {
- auto ec = update(y);
+ auto ec = update(dpp, y);
if (ec) return ec;
auto tries = 0;
uint64_t newtail = 0;
{
auto last = entries_.end() - 1;
if (gen_id >= last->first) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< ": Attempt to trim beyond the possible." << dendl;
return bs::error_code(EINVAL, bs::system_category());
}
newtail = i->first;
i->second.pruned = ceph::real_clock::now();
}
- ec = write(std::move(es), std::move(l), y);
+ ec = write(dpp, std::move(es), std::move(l), y);
++tries;
} while (ec == bs::errc::operation_canceled &&
tries < max_tries);
if (tries >= max_tries) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< ": exhausted retry attempts." << dendl;
return ec;
}
if (ec) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< ": write failed with ec=" << ec.message() << dendl;
return ec;
}
cb::list bl, rbl;
- auto r = rgw_rados_notify(ioctx, oid, bl, 10'000, &rbl, y);
+ auto r = rgw_rados_notify(dpp, ioctx, oid, bl, 10'000, &rbl, y);
if (r < 0) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< ": notify failed with r=" << r << dendl;
return { -r, bs::system_category() };
}
return {};
}
-bs::error_code logback_generations::remove_empty(optional_yield y) noexcept {
- auto cct = static_cast<CephContext*>(ioctx.cct());
+bs::error_code logback_generations::remove_empty(const DoutPrefixProvider *dpp, optional_yield y) noexcept {
static constexpr auto max_tries = 10;
try {
- auto ec = update(y);
+ auto ec = update(dpp, y);
if (ec) return ec;
auto tries = 0;
entries_t new_entries;
auto es2 = entries_;
for (const auto& [gen_id, e] : es) {
ceph_assert(e.pruned);
- auto ec = log_remove(ioctx, shards,
- [this, gen_id](int shard) {
+ auto ec = log_remove(dpp, ioctx, shards,
+ [this, gen_id = gen_id](int shard) {
return this->get_oid(gen_id, shard);
}, (gen_id == 0), y);
if (ec) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
- << ": Error pruning: gen_id=" << gen_id
- << " ec=" << ec.message() << dendl;
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ << ": Error pruning: gen_id=" << gen_id
+ << " ec=" << ec.message() << dendl;
}
if (auto i = es2.find(gen_id); i != es2.end()) {
es2.erase(i);
}
l.lock();
es.clear();
- ec = write(std::move(es2), std::move(l), y);
+ ec = write(dpp, std::move(es2), std::move(l), y);
++tries;
} while (ec == bs::errc::operation_canceled &&
tries < max_tries);
if (tries >= max_tries) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< ": exhausted retry attempts." << dendl;
return ec;
}
if (ec) {
- lderr(cct) << __PRETTY_FUNCTION__ << ":" << __LINE__
+ ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
<< ": write failed with ec=" << ec.message() << dendl;
return ec;
}
bufferlist& bl)
{
auto cct = static_cast<CephContext*>(ioctx.cct());
+ const DoutPrefix dp(cct, dout_subsys, "logback generations handle_notify: ");
if (notifier_id != my_id) {
- auto ec = update(null_yield);
+ auto ec = update(&dp, null_yield);
if (ec) {
lderr(cct)
<< __PRETTY_FUNCTION__ << ":" << __LINE__
/// Look over the shards in a log and determine the type.
tl::expected<log_type, bs::error_code>
-log_backing_type(librados::IoCtx& ioctx,
+log_backing_type(const DoutPrefixProvider *dpp,
+ librados::IoCtx& ioctx,
log_type def,
int shards, //< Total number of shards
/// A function taking a shard number and
}
};
WRITE_CLASS_ENCODER(logback_generation)
+inline std::ostream& operator <<(std::ostream& m, const logback_generation& g) {
+ return m << "[" << g.gen_id << "," << g.type << ","
+ << (g.pruned ? "PRUNED" : "NOT PRUNED") << "]";
+}
class logback_generations : public librados::WatchCtx2 {
public:
entries_t entries_;
tl::expected<std::pair<entries_t, obj_version>, bs::error_code>
- read(optional_yield y) noexcept;
- bs::error_code write(entries_t&& e, std::unique_lock<std::mutex>&& l_,
+ read(const DoutPrefixProvider *dpp, optional_yield y) noexcept;
+ bs::error_code write(const DoutPrefixProvider *dpp, entries_t&& e, std::unique_lock<std::mutex>&& l_,
optional_yield y) noexcept;
- bs::error_code setup(log_type def, optional_yield y) noexcept;
+ bs::error_code setup(const DoutPrefixProvider *dpp, log_type def, optional_yield y) noexcept;
bs::error_code watch() noexcept;
template<typename T, typename... Args>
static tl::expected<std::unique_ptr<T>, bs::error_code>
- init(librados::IoCtx& ioctx_, std::string oid_,
+ init(const DoutPrefixProvider *dpp, librados::IoCtx& ioctx_, std::string oid_,
fu2::unique_function<std::string(uint64_t, int) const>&& get_oid_,
int shards_, log_type def, optional_yield y,
Args&& ...args) noexcept {
shards_, std::forward<Args>(args)...);
std::unique_ptr<T> lg(lgp);
lgp = nullptr;
- auto ec = lg->setup(def, y);
+ auto ec = lg->setup(dpp, def, y);
if (ec)
return tl::unexpected(ec);
// Obnoxiousness for C++ Compiler in Bionic Beaver
}
}
- bs::error_code update(optional_yield y) noexcept;
+ bs::error_code update(const DoutPrefixProvider *dpp, optional_yield y) noexcept;
entries_t entries() const {
return entries_;
}
- bs::error_code new_backing(log_type type, optional_yield y) noexcept;
+ bs::error_code new_backing(const DoutPrefixProvider *dpp, log_type type, optional_yield y) noexcept;
- bs::error_code empty_to(uint64_t gen_id, optional_yield y) noexcept;
+ bs::error_code empty_to(const DoutPrefixProvider *dpp, uint64_t gen_id, optional_yield y) noexcept;
- bs::error_code remove_empty(optional_yield y) noexcept;
+ bs::error_code remove_empty(const DoutPrefixProvider *dpp, optional_yield y) noexcept;
// Callbacks, to be defined by descendant.
std::mutex m;
std::unique_ptr<rgw::cls::fifo::FIFO> fifo;
- int lazy_init(optional_yield y) {
+ int lazy_init(const DoutPrefixProvider *dpp, optional_yield y) {
std::unique_lock l(m);
if (fifo) return 0;
- auto r = rgw::cls::fifo::FIFO::create(ioctx, oid, &fifo, y);
+ auto r = rgw::cls::fifo::FIFO::create(dpp, ioctx, oid, &fifo, y);
if (r) {
fifo.reset();
}
LazyFIFO(librados::IoCtx& ioctx, std::string oid)
: ioctx(ioctx), oid(std::move(oid)) {}
- int read_meta(optional_yield y) {
- auto r = lazy_init(y);
+ int read_meta(const DoutPrefixProvider *dpp, optional_yield y) {
+ auto r = lazy_init(dpp, y);
if (r < 0) return r;
- return fifo->read_meta(y);
+ return fifo->read_meta(dpp, y);
}
- int meta(rados::cls::fifo::info& info, optional_yield y) {
- auto r = lazy_init(y);
+ int meta(const DoutPrefixProvider *dpp, rados::cls::fifo::info& info, optional_yield y) {
+ auto r = lazy_init(dpp, y);
if (r < 0) return r;
info = fifo->meta();
return 0;
}
- int get_part_layout_info(std::uint32_t& part_header_size,
+ int get_part_layout_info(const DoutPrefixProvider *dpp,
+ std::uint32_t& part_header_size,
std::uint32_t& part_entry_overhead,
optional_yield y) {
- auto r = lazy_init(y);
+ auto r = lazy_init(dpp, y);
if (r < 0) return r;
std::tie(part_header_size, part_entry_overhead)
= fifo->get_part_layout_info();
return 0;
}
- int push(const ceph::buffer::list& bl,
+ int push(const DoutPrefixProvider *dpp,
+ const ceph::buffer::list& bl,
optional_yield y) {
- auto r = lazy_init(y);
+ auto r = lazy_init(dpp, y);
if (r < 0) return r;
- return fifo->push(bl, y);
+ return fifo->push(dpp, bl, y);
}
- int push(ceph::buffer::list& bl,
+ int push(const DoutPrefixProvider *dpp,
+ ceph::buffer::list& bl,
librados::AioCompletion* c,
optional_yield y) {
- auto r = lazy_init(y);
+ auto r = lazy_init(dpp, y);
if (r < 0) return r;
- fifo->push(bl, c);
+ fifo->push(dpp, bl, c);
return 0;
}
- int push(const std::vector<ceph::buffer::list>& data_bufs,
+ int push(const DoutPrefixProvider *dpp,
+ const std::vector<ceph::buffer::list>& data_bufs,
optional_yield y) {
- auto r = lazy_init(y);
+ auto r = lazy_init(dpp, y);
if (r < 0) return r;
- return fifo->push(data_bufs, y);
+ return fifo->push(dpp, data_bufs, y);
}
- int push(const std::vector<ceph::buffer::list>& data_bufs,
+ int push(const DoutPrefixProvider *dpp,
+ const std::vector<ceph::buffer::list>& data_bufs,
librados::AioCompletion* c,
optional_yield y) {
- auto r = lazy_init(y);
+ auto r = lazy_init(dpp, y);
if (r < 0) return r;
- fifo->push(data_bufs, c);
+ fifo->push(dpp, data_bufs, c);
return 0;
}
- int list(int max_entries, std::optional<std::string_view> markstr,
+ int list(const DoutPrefixProvider *dpp,
+ int max_entries, std::optional<std::string_view> markstr,
std::vector<rgw::cls::fifo::list_entry>* out,
bool* more, optional_yield y) {
- auto r = lazy_init(y);
+ auto r = lazy_init(dpp, y);
if (r < 0) return r;
- return fifo->list(max_entries, markstr, out, more, y);
+ return fifo->list(dpp, max_entries, markstr, out, more, y);
}
- int list(int max_entries, std::optional<std::string_view> markstr,
+ int list(const DoutPrefixProvider *dpp, int max_entries, std::optional<std::string_view> markstr,
std::vector<rgw::cls::fifo::list_entry>* out, bool* more,
librados::AioCompletion* c, optional_yield y) {
- auto r = lazy_init(y);
+ auto r = lazy_init(dpp, y);
if (r < 0) return r;
- fifo->list(max_entries, markstr, out, more, c);
+ fifo->list(dpp, max_entries, markstr, out, more, c);
return 0;
}
- int trim(std::string_view markstr, bool exclusive, optional_yield y) {
- auto r = lazy_init(y);
+ int trim(const DoutPrefixProvider *dpp, std::string_view markstr, bool exclusive, optional_yield y) {
+ auto r = lazy_init(dpp, y);
if (r < 0) return r;
- return fifo->trim(markstr, exclusive, y);
+ return fifo->trim(dpp, markstr, exclusive, y);
}
- int trim(std::string_view markstr, bool exclusive, librados::AioCompletion* c,
+ int trim(const DoutPrefixProvider *dpp, std::string_view markstr, bool exclusive, librados::AioCompletion* c,
optional_yield y) {
- auto r = lazy_init(y);
+ auto r = lazy_init(dpp, y);
if (r < 0) return r;
- fifo->trim(markstr, exclusive, c);
+ fifo->trim(dpp, markstr, exclusive, c);
return 0;
}
- int get_part_info(int64_t part_num, rados::cls::fifo::part_header* header,
+ int get_part_info(const DoutPrefixProvider *dpp, int64_t part_num, rados::cls::fifo::part_header* header,
optional_yield y) {
- auto r = lazy_init(y);
+ auto r = lazy_init(dpp, y);
if (r < 0) return r;
- return fifo->get_part_info(part_num, header, y);
+ return fifo->get_part_info(dpp, part_num, header, y);
}
- int get_part_info(int64_t part_num, rados::cls::fifo::part_header* header,
+ int get_part_info(const DoutPrefixProvider *dpp, int64_t part_num, rados::cls::fifo::part_header* header,
librados::AioCompletion* c, optional_yield y) {
- auto r = lazy_init(y);
+ auto r = lazy_init(dpp, y);
if (r < 0) return r;
fifo->get_part_info(part_num, header, c);
return 0;
}
- int get_head_info(fu2::unique_function<
+ int get_head_info(const DoutPrefixProvider *dpp, fu2::unique_function<
void(int r, rados::cls::fifo::part_header&&)>&& f,
librados::AioCompletion* c,
optional_yield y) {
- auto r = lazy_init(y);
+ auto r = lazy_init(dpp, y);
if (r < 0) return r;
- fifo->get_head_info(std::move(f), c);
+ fifo->get_head_info(dpp, std::move(f), c);
return 0;
}
};
return 0;
}
-int write_script(rgw::sal::RGWRadosStore* store, const std::string& tenant, optional_yield y, context ctx, const std::string& script)
+int write_script(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore* store, const std::string& tenant, optional_yield y, context ctx, const std::string& script)
{
RGWSysObjectCtx obj_ctx(store->svc()->sysobj->init_obj_ctx());
RGWObjVersionTracker objv_tracker;
ceph::encode(script, bl);
const auto rc = rgw_put_system_obj(
+ dpp,
obj_ctx,
obj.pool,
obj.oid,
return 0;
}
-int delete_script(rgw::sal::RGWRadosStore* store, const std::string& tenant, optional_yield y, context ctx)
+int delete_script(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore* store, const std::string& tenant, optional_yield y, context ctx)
{
RGWObjVersionTracker objv_tracker;
rgw_raw_obj obj(store->svc()->zone->get_zone_params().log_pool, script_oid(ctx, tenant));
const auto rc = rgw_delete_system_obj(
+ dpp,
store->svc()->sysobj,
obj.pool,
obj.oid,
namespace bp = boost::process;
-int add_package(rgw::sal::RGWRadosStore* store, optional_yield y, const std::string& package_name, bool allow_compilation) {
+int add_package(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore* store, optional_yield y, const std::string& package_name, bool allow_compilation) {
// verify that luarocks can load this oackage
const auto p = bp::search_path("luarocks");
if (p.empty()) {
std::map<std::string, bufferlist> new_package{{package_name, empty_bl}};
librados::ObjectWriteOperation op;
op.omap_set(new_package);
- ret = rgw_rados_operate(*(store->getRados()->get_lc_pool_ctx()),
+ ret = rgw_rados_operate(dpp, *(store->getRados()->get_lc_pool_ctx()),
PACKAGE_LIST_OBJECT_NAME, &op, y);
if (ret < 0) {
return 0;
}
-int remove_package(rgw::sal::RGWRadosStore* store, optional_yield y, const std::string& package_name) {
+int remove_package(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore* store, optional_yield y, const std::string& package_name) {
librados::ObjectWriteOperation op;
op.omap_rm_keys(std::set<std::string>({package_name}));
- const auto ret = rgw_rados_operate(*(store->getRados()->get_lc_pool_ctx()),
+ const auto ret = rgw_rados_operate(dpp, *(store->getRados()->get_lc_pool_ctx()),
PACKAGE_LIST_OBJECT_NAME, &op, y);
if (ret < 0) {
return 0;
}
-int list_packages(rgw::sal::RGWRadosStore* store, optional_yield y, packages_t& packages) {
+int list_packages(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore* store, optional_yield y, packages_t& packages) {
constexpr auto max_chunk = 1024U;
std::string start_after;
bool more = true;
librados::ObjectReadOperation op;
packages_t packages_chunk;
op.omap_get_keys2(start_after, max_chunk, &packages_chunk, &more, &rval);
- const auto ret = rgw_rados_operate(*(store->getRados()->get_lc_pool_ctx()),
+ const auto ret = rgw_rados_operate(dpp, *(store->getRados()->get_lc_pool_ctx()),
PACKAGE_LIST_OBJECT_NAME, &op, nullptr, y);
if (ret < 0) {
return 0;
}
-int install_packages(rgw::sal::RGWRadosStore* store, optional_yield y, packages_t& failed_packages, std::string& output) {
+int install_packages(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore* store, optional_yield y, packages_t& failed_packages, std::string& output) {
// luarocks directory cleanup
boost::system::error_code ec;
const auto& luarocks_path = store->get_luarocks_path();
}
packages_t packages;
- auto ret = list_packages(store, y, packages);
+ auto ret = list_packages(dpp, store, y, packages);
if (ret == -ENOENT) {
// allowlist is empty
return 0;
bool verify(const std::string& script, std::string& err_msg);
// store a lua script in a context
-int write_script(rgw::sal::RGWRadosStore* store, const std::string& tenant, optional_yield y, context ctx, const std::string& script);
+int write_script(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore* store, const std::string& tenant, optional_yield y, context ctx, const std::string& script);
// read the stored lua script from a context
int read_script(rgw::sal::RGWRadosStore* store, const std::string& tenant, optional_yield y, context ctx, std::string& script);
// delete the stored lua script from a context
-int delete_script(rgw::sal::RGWRadosStore* store, const std::string& tenant, optional_yield y, context ctx);
+int delete_script(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore* store, const std::string& tenant, optional_yield y, context ctx);
#ifdef WITH_RADOSGW_LUA_PACKAGES
#include <set>
using packages_t = std::set<std::string>;
// add a lua package to the allowlist
-int add_package(rgw::sal::RGWRadosStore* store, optional_yield y, const std::string& package_name, bool allow_compilation);
+int add_package(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore* store, optional_yield y, const std::string& package_name, bool allow_compilation);
// remove a lua package from the allowlist
-int remove_package(rgw::sal::RGWRadosStore* store, optional_yield y, const std::string& package_name);
+int remove_package(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore* store, optional_yield y, const std::string& package_name);
// list lua packages in the allowlist
-int list_packages(rgw::sal::RGWRadosStore* store, optional_yield y, packages_t& packages);
+int list_packages(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore* store, optional_yield y, packages_t& packages);
// install all packages from the allowlist
// return the list of packages that failed to install and the output of the install command
-int install_packages(rgw::sal::RGWRadosStore* store, optional_yield y, packages_t& failed_packages, std::string& output);
+int install_packages(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore* store, optional_yield y, packages_t& failed_packages, std::string& output);
#endif
}
const auto rc = rgw_log_op(store->getRados(), rest, s, op_name, olog);
lua_pushinteger(L, rc);
} else {
- ldout(s->cct, 1) << "Lua ERROR: missing rados store, cannot use ops log" << dendl;
+ ldpp_dout(s, 1) << "Lua ERROR: missing rados store, cannot use ops log" << dendl;
lua_pushinteger(L, -EINVAL);
}
// execute the lua script
if (luaL_dostring(L, script.c_str()) != LUA_OK) {
const std::string err(lua_tostring(L, -1));
- ldout(s->cct, 1) << "Lua ERROR: " << err << dendl;
+ ldpp_dout(s, 1) << "Lua ERROR: " << err << dendl;
return -1;
}
} catch (const std::runtime_error& e) {
- ldout(s->cct, 1) << "Lua ERROR: " << e.what() << dendl;
+ ldpp_dout(s, 1) << "Lua ERROR: " << e.what() << dendl;
return -1;
}
FCGX_Init();
#endif
+ const DoutPrefix dp(cct.get(), dout_subsys, "rgw main: ");
rgw::sal::RGWRadosStore *store =
- RGWStoreManager::get_storage(g_ceph_context,
+ RGWStoreManager::get_storage(&dp, g_ceph_context,
g_conf()->rgw_enable_gc_threads,
g_conf()->rgw_enable_lc_threads,
g_conf()->rgw_enable_quota_threads,
#ifdef WITH_RADOSGW_LUA_PACKAGES
rgw::lua::packages_t failed_packages;
std::string output;
- r = rgw::lua::install_packages(store, null_yield, failed_packages, output);
+ r = rgw::lua::install_packages(&dp, store, null_yield, failed_packages, output);
if (r < 0) {
dout(1) << "ERROR: failed to install lua packages from allowlist" << dendl;
}
// add a watcher to respond to realm configuration changes
- RGWPeriodPusher pusher(store, null_yield);
+ RGWPeriodPusher pusher(&dp, store, null_yield);
RGWFrontendPauser pauser(fes, implicit_tenant_context, &pusher);
auto reloader = std::make_unique<RGWRealmReloader>(store,
service_map_meta, &pauser);
- RGWRealmWatcher realm_watcher(g_ceph_context, store->svc()->zone->get_realm());
+ RGWRealmWatcher realm_watcher(&dp, g_ceph_context, store->svc()->zone->get_realm());
realm_watcher.add_watcher(RGWRealmNotify::Reload, *reloader);
realm_watcher.add_watcher(RGWRealmNotify::ZonesNeedPeriod, pusher);
oid = prefix + buf;
}
- int add_entry(const string& hash_key, const string& section, const string& key, bufferlist& bl);
+ int add_entry(const DoutPrefixProvider *dpp, const string& hash_key, const string& section, const string& key, bufferlist& bl);
int get_shard_id(const string& hash_key, int *shard_id);
- int store_entries_in_shard(list<cls_log_entry>& entries, int shard_id, librados::AioCompletion *completion);
+ int store_entries_in_shard(const DoutPrefixProvider *dpp, list<cls_log_entry>& entries, int shard_id, librados::AioCompletion *completion);
struct LogListCtx {
int cur_shard;
const real_time& end_time, const string& marker,
void **handle);
void complete_list_entries(void *handle);
- int list_entries(void *handle,
+ int list_entries(const DoutPrefixProvider *dpp,
+ void *handle,
int max_entries,
list<cls_log_entry>& entries,
string *out_marker,
bool *truncated);
- int trim(int shard_id, const real_time& from_time, const real_time& end_time, const string& start_marker, const string& end_marker);
- int get_info(int shard_id, RGWMetadataLogInfo *info);
- int get_info_async(int shard_id, RGWMetadataLogInfoCompletion *completion);
- int lock_exclusive(int shard_id, timespan duration, string&zone_id, string& owner_id);
- int unlock(int shard_id, string& zone_id, string& owner_id);
+ int trim(const DoutPrefixProvider *dpp, int shard_id, const real_time& from_time, const real_time& end_time, const string& start_marker, const string& end_marker);
+ int get_info(const DoutPrefixProvider *dpp, int shard_id, RGWMetadataLogInfo *info);
+ int get_info_async(const DoutPrefixProvider *dpp, int shard_id, RGWMetadataLogInfoCompletion *completion);
+ int lock_exclusive(const DoutPrefixProvider *dpp, int shard_id, timespan duration, string&zone_id, string& owner_id);
+ int unlock(const DoutPrefixProvider *dpp, int shard_id, string& zone_id, string& owner_id);
int update_shards(list<int>& shards);
}
-int RGWMetadataLog::add_entry(const string& hash_key, const string& section, const string& key, bufferlist& bl) {
+int RGWMetadataLog::add_entry(const DoutPrefixProvider *dpp, const string& hash_key, const string& section, const string& key, bufferlist& bl) {
if (!svc.zone->need_to_log_metadata())
return 0;
rgw_shard_name(prefix, cct->_conf->rgw_md_log_max_shards, hash_key, oid, &shard_id);
mark_modified(shard_id);
real_time now = real_clock::now();
- return svc.cls->timelog.add(oid, now, section, key, bl, null_yield);
+ return svc.cls->timelog.add(dpp, oid, now, section, key, bl, null_yield);
}
int RGWMetadataLog::get_shard_id(const string& hash_key, int *shard_id)
return 0;
}
-int RGWMetadataLog::store_entries_in_shard(list<cls_log_entry>& entries, int shard_id, librados::AioCompletion *completion)
+int RGWMetadataLog::store_entries_in_shard(const DoutPrefixProvider *dpp, list<cls_log_entry>& entries, int shard_id, librados::AioCompletion *completion)
{
string oid;
mark_modified(shard_id);
rgw_shard_name(prefix, shard_id, oid);
- return svc.cls->timelog.add(oid, entries, completion, false, null_yield);
+ return svc.cls->timelog.add(dpp, oid, entries, completion, false, null_yield);
}
void RGWMetadataLog::init_list_entries(int shard_id, const real_time& from_time, const real_time& end_time,
delete ctx;
}
-int RGWMetadataLog::list_entries(void *handle,
+int RGWMetadataLog::list_entries(const DoutPrefixProvider *dpp, void *handle,
int max_entries,
list<cls_log_entry>& entries,
string *last_marker,
}
std::string next_marker;
- int ret = svc.cls->timelog.list(ctx->cur_oid, ctx->from_time, ctx->end_time,
+ int ret = svc.cls->timelog.list(dpp, ctx->cur_oid, ctx->from_time, ctx->end_time,
max_entries, entries, ctx->marker,
&next_marker, truncated, null_yield);
if ((ret < 0) && (ret != -ENOENT))
return 0;
}
-int RGWMetadataLog::get_info(int shard_id, RGWMetadataLogInfo *info)
+int RGWMetadataLog::get_info(const DoutPrefixProvider *dpp, int shard_id, RGWMetadataLogInfo *info)
{
string oid;
get_shard_oid(shard_id, oid);
cls_log_header header;
- int ret = svc.cls->timelog.info(oid, &header, null_yield);
+ int ret = svc.cls->timelog.info(dpp, oid, &header, null_yield);
if ((ret < 0) && (ret != -ENOENT))
return ret;
completion->release();
}
-int RGWMetadataLog::get_info_async(int shard_id, RGWMetadataLogInfoCompletion *completion)
+int RGWMetadataLog::get_info_async(const DoutPrefixProvider *dpp, int shard_id, RGWMetadataLogInfoCompletion *completion)
{
string oid;
get_shard_oid(shard_id, oid);
completion->get(); // hold a ref until the completion fires
- return svc.cls->timelog.info_async(completion->get_io_obj(), oid,
+ return svc.cls->timelog.info_async(dpp, completion->get_io_obj(), oid,
&completion->get_header(),
completion->get_completion());
}
-int RGWMetadataLog::trim(int shard_id, const real_time& from_time, const real_time& end_time,
+int RGWMetadataLog::trim(const DoutPrefixProvider *dpp, int shard_id, const real_time& from_time, const real_time& end_time,
const string& start_marker, const string& end_marker)
{
string oid;
get_shard_oid(shard_id, oid);
- return svc.cls->timelog.trim(oid, from_time, end_time, start_marker,
+ return svc.cls->timelog.trim(dpp, oid, from_time, end_time, start_marker,
end_marker, nullptr, null_yield);
}
-int RGWMetadataLog::lock_exclusive(int shard_id, timespan duration, string& zone_id, string& owner_id) {
+int RGWMetadataLog::lock_exclusive(const DoutPrefixProvider *dpp, int shard_id, timespan duration, string& zone_id, string& owner_id) {
string oid;
get_shard_oid(shard_id, oid);
- return svc.cls->lock.lock_exclusive(svc.zone->get_zone_params().log_pool, oid, duration, zone_id, owner_id);
+ return svc.cls->lock.lock_exclusive(dpp, svc.zone->get_zone_params().log_pool, oid, duration, zone_id, owner_id);
}
-int RGWMetadataLog::unlock(int shard_id, string& zone_id, string& owner_id) {
+int RGWMetadataLog::unlock(const DoutPrefixProvider *dpp, int shard_id, string& zone_id, string& owner_id) {
string oid;
get_shard_oid(shard_id, oid);
- return svc.cls->lock.unlock(svc.zone->get_zone_params().log_pool, oid, zone_id, owner_id);
+ return svc.cls->lock.unlock(dpp, svc.zone->get_zone_params().log_pool, oid, zone_id, owner_id);
}
void RGWMetadataLog::mark_modified(int shard_id)
return new RGWMetadataObject;
}
- int get(string& entry, RGWMetadataObject **obj, optional_yield y) override {
+ int get(string& entry, RGWMetadataObject **obj, optional_yield y, const DoutPrefixProvider *dpp) override {
return -ENOTSUP;
}
int put(string& entry, RGWMetadataObject *obj, RGWObjVersionTracker& objv_tracker,
- optional_yield y, RGWMDLogSyncType type, bool from_remote_zone) override {
+ optional_yield y, const DoutPrefixProvider *dpp, RGWMDLogSyncType type, bool from_remote_zone) override {
return -ENOTSUP;
}
- int remove(string& entry, RGWObjVersionTracker& objv_tracker, optional_yield y) override {
+ int remove(string& entry, RGWObjVersionTracker& objv_tracker, optional_yield y, const DoutPrefixProvider *dpp) override {
return -ENOTSUP;
}
const ceph::real_time& mtime,
RGWObjVersionTracker *objv_tracker,
optional_yield y,
+ const DoutPrefixProvider *dpp,
RGWMDLogStatus op_type,
std::function<int()> f) {
return -ENOTSUP;
}
- int list_keys_init(const string& marker, void **phandle) override {
+ int list_keys_init(const DoutPrefixProvider *dpp, const string& marker, void **phandle) override {
iter_data *data = new iter_data;
list<string> sections;
mgr->get_sections(sections);
RGWMetadataHandlerPut_SObj::~RGWMetadataHandlerPut_SObj() {
}
-int RGWMetadataHandlerPut_SObj::put_pre()
+int RGWMetadataHandlerPut_SObj::put_pre(const DoutPrefixProvider *dpp)
{
- int ret = get(&old_obj);
+ int ret = get(&old_obj, dpp);
if (ret < 0 && ret != -ENOENT) {
return ret;
}
return 0;
}
-int RGWMetadataHandlerPut_SObj::put()
+int RGWMetadataHandlerPut_SObj::put(const DoutPrefixProvider *dpp)
{
- int ret = put_check();
+ int ret = put_check(dpp);
if (ret != 0) {
return ret;
}
- return put_checked();
+ return put_checked(dpp);
}
-int RGWMetadataHandlerPut_SObj::put_checked()
+int RGWMetadataHandlerPut_SObj::put_checked(const DoutPrefixProvider *dpp)
{
RGWSI_MBSObj_PutParams params(obj->get_pattrs(), obj->get_mtime());
encode_obj(¶ms.bl);
- int ret = op->put(entry, params, &objv_tracker, y);
+ int ret = op->put(entry, params, &objv_tracker, y, dpp);
if (ret < 0) {
return ret;
}
return 0;
}
-int RGWMetadataHandler_GenericMetaBE::do_put_operate(Put *put_op)
+int RGWMetadataHandler_GenericMetaBE::do_put_operate(Put *put_op, const DoutPrefixProvider *dpp)
{
- int r = put_op->put_pre();
+ int r = put_op->put_pre(dpp);
if (r != 0) { /* r can also be STATUS_NO_APPLY */
return r;
}
- r = put_op->put();
+ r = put_op->put(dpp);
if (r != 0) {
return r;
}
- r = put_op->put_post();
+ r = put_op->put_post(dpp);
if (r != 0) { /* e.g., -error or STATUS_APPLIED */
return r;
}
return 0;
}
-int RGWMetadataHandler_GenericMetaBE::get(string& entry, RGWMetadataObject **obj, optional_yield y)
+int RGWMetadataHandler_GenericMetaBE::get(string& entry, RGWMetadataObject **obj, optional_yield y, const DoutPrefixProvider *dpp)
{
return be_handler->call([&](RGWSI_MetaBackend_Handler::Op *op) {
- return do_get(op, entry, obj, y);
+ return do_get(op, entry, obj, y, dpp);
});
}
int RGWMetadataHandler_GenericMetaBE::put(string& entry, RGWMetadataObject *obj, RGWObjVersionTracker& objv_tracker,
- optional_yield y, RGWMDLogSyncType type, bool from_remote_zone)
+ optional_yield y, const DoutPrefixProvider *dpp, RGWMDLogSyncType type, bool from_remote_zone)
{
return be_handler->call([&](RGWSI_MetaBackend_Handler::Op *op) {
- return do_put(op, entry, obj, objv_tracker, y, type, from_remote_zone);
+ return do_put(op, entry, obj, objv_tracker, y, dpp, type, from_remote_zone);
});
}
-int RGWMetadataHandler_GenericMetaBE::remove(string& entry, RGWObjVersionTracker& objv_tracker, optional_yield y)
+int RGWMetadataHandler_GenericMetaBE::remove(string& entry, RGWObjVersionTracker& objv_tracker, optional_yield y, const DoutPrefixProvider *dpp)
{
return be_handler->call([&](RGWSI_MetaBackend_Handler::Op *op) {
- return do_remove(op, entry, objv_tracker, y);
+ return do_remove(op, entry, objv_tracker, y, dpp);
});
}
const ceph::real_time& mtime,
RGWObjVersionTracker *objv_tracker,
optional_yield y,
+ const DoutPrefixProvider *dpp,
RGWMDLogStatus op_type,
std::function<int()> f)
{
params,
objv_tracker,
y,
- f);
+ f,
+ dpp);
});
}
});
}
-int RGWMetadataHandler_GenericMetaBE::list_keys_init(const string& marker, void **phandle)
+int RGWMetadataHandler_GenericMetaBE::list_keys_init(const DoutPrefixProvider *dpp, const string& marker, void **phandle)
{
auto op = std::make_unique<RGWSI_MetaBackend_Handler::Op_ManagedCtx>(be_handler);
- int ret = op->list_init(marker);
+ int ret = op->list_init(dpp, marker);
if (ret < 0) {
return ret;
}
}
-int RGWMetadataManager::get(string& metadata_key, Formatter *f, optional_yield y)
+int RGWMetadataManager::get(string& metadata_key, Formatter *f, optional_yield y, const DoutPrefixProvider *dpp)
{
RGWMetadataHandler *handler;
string entry;
RGWMetadataObject *obj;
- ret = handler->get(entry, &obj, y);
+ ret = handler->get(entry, &obj, y, dpp);
if (ret < 0) {
return ret;
}
int RGWMetadataManager::put(string& metadata_key, bufferlist& bl,
optional_yield y,
+ const DoutPrefixProvider *dpp,
RGWMDLogSyncType sync_type,
bool from_remote_zone,
obj_version *existing_version)
return -EINVAL;
}
- ret = handler->put(entry, obj, objv_tracker, y, sync_type, from_remote_zone);
+ ret = handler->put(entry, obj, objv_tracker, y, dpp, sync_type, from_remote_zone);
if (existing_version) {
*existing_version = objv_tracker.read_version;
}
return ret;
}
-int RGWMetadataManager::remove(string& metadata_key, optional_yield y)
+int RGWMetadataManager::remove(string& metadata_key, optional_yield y, const DoutPrefixProvider *dpp)
{
RGWMetadataHandler *handler;
string entry;
}
RGWMetadataObject *obj;
- ret = handler->get(entry, &obj, y);
+ ret = handler->get(entry, &obj, y, dpp);
if (ret < 0) {
return ret;
}
objv_tracker.read_version = obj->get_version();
delete obj;
- return handler->remove(entry, objv_tracker, y);
+ return handler->remove(entry, objv_tracker, y, dpp);
}
int RGWMetadataManager::mutate(const string& metadata_key,
const ceph::real_time& mtime,
RGWObjVersionTracker *objv_tracker,
optional_yield y,
+ const DoutPrefixProvider *dpp,
RGWMDLogStatus op_type,
std::function<int()> f)
{
return ret;
}
- return handler->mutate(entry, mtime, objv_tracker, y, op_type, f);
+ return handler->mutate(entry, mtime, objv_tracker, y, dpp, op_type, f);
}
int RGWMetadataManager::get_shard_id(const string& section, const string& entry, int *shard_id)
RGWMetadataHandler *handler;
};
-int RGWMetadataManager::list_keys_init(const string& section, void **handle)
+int RGWMetadataManager::list_keys_init(const DoutPrefixProvider *dpp, const string& section, void **handle)
{
- return list_keys_init(section, string(), handle);
+ return list_keys_init(dpp, section, string(), handle);
}
-int RGWMetadataManager::list_keys_init(const string& section,
+int RGWMetadataManager::list_keys_init(const DoutPrefixProvider *dpp, const string& section,
const string& marker, void **handle)
{
string entry;
list_keys_handle *h = new list_keys_handle;
h->handler = handler;
- ret = handler->list_keys_init(marker, &h->handle);
+ ret = handler->list_keys_init(dpp, marker, &h->handle);
if (ret < 0) {
delete h;
return ret;
virtual RGWMetadataObject *get_meta_obj(JSONObj *jo, const obj_version& objv, const ceph::real_time& mtime) = 0;
- virtual int get(string& entry, RGWMetadataObject **obj, optional_yield) = 0;
+ virtual int get(string& entry, RGWMetadataObject **obj, optional_yield, const DoutPrefixProvider *dpp) = 0;
virtual int put(string& entry,
RGWMetadataObject *obj,
RGWObjVersionTracker& objv_tracker,
- optional_yield, RGWMDLogSyncType type,
+ optional_yield,
+ const DoutPrefixProvider *dpp,
+ RGWMDLogSyncType type,
bool from_remote_zone) = 0;
- virtual int remove(string& entry, RGWObjVersionTracker& objv_tracker, optional_yield) = 0;
+ virtual int remove(string& entry, RGWObjVersionTracker& objv_tracker, optional_yield, const DoutPrefixProvider *dpp) = 0;
virtual int mutate(const string& entry,
const ceph::real_time& mtime,
RGWObjVersionTracker *objv_tracker,
optional_yield y,
+ const DoutPrefixProvider *dpp,
RGWMDLogStatus op_type,
std::function<int()> f) = 0;
- virtual int list_keys_init(const string& marker, void **phandle) = 0;
+ virtual int list_keys_init(const DoutPrefixProvider *dpp, const string& marker, void **phandle) = 0;
virtual int list_keys_next(void *handle, int max, list<string>& keys, bool *truncated) = 0;
virtual void list_keys_complete(void *handle) = 0;
protected:
RGWSI_MetaBackend_Handler *be_handler;
- virtual int do_get(RGWSI_MetaBackend_Handler::Op *op, string& entry, RGWMetadataObject **obj, optional_yield y) = 0;
+ virtual int do_get(RGWSI_MetaBackend_Handler::Op *op, string& entry, RGWMetadataObject **obj, optional_yield y, const DoutPrefixProvider *dpp) = 0;
virtual int do_put(RGWSI_MetaBackend_Handler::Op *op, string& entry, RGWMetadataObject *obj,
RGWObjVersionTracker& objv_tracker, optional_yield y,
- RGWMDLogSyncType type, bool from_remote_zone) = 0;
- virtual int do_put_operate(Put *put_op);
- virtual int do_remove(RGWSI_MetaBackend_Handler::Op *op, string& entry, RGWObjVersionTracker& objv_tracker, optional_yield y) = 0;
+ const DoutPrefixProvider *dpp, RGWMDLogSyncType type,
+ bool from_remote_zone) = 0;
+ virtual int do_put_operate(Put *put_op, const DoutPrefixProvider *dpp);
+ virtual int do_remove(RGWSI_MetaBackend_Handler::Op *op, string& entry, RGWObjVersionTracker& objv_tracker, optional_yield y, const DoutPrefixProvider *dpp) = 0;
public:
RGWMetadataHandler_GenericMetaBE() {}
optional_yield y;
bool from_remote_zone{false};
- int get(RGWMetadataObject **obj) {
- return handler->do_get(op, entry, obj, y);
+ int get(RGWMetadataObject **obj, const DoutPrefixProvider *dpp) {
+ return handler->do_get(op, entry, obj, y, dpp);
}
public:
Put(RGWMetadataHandler_GenericMetaBE *_handler, RGWSI_MetaBackend_Handler::Op *_op,
virtual ~Put() {}
- virtual int put_pre() {
+ virtual int put_pre(const DoutPrefixProvider *dpp) {
return 0;
}
- virtual int put() {
+ virtual int put(const DoutPrefixProvider *dpp) {
return 0;
}
- virtual int put_post() {
+ virtual int put_post(const DoutPrefixProvider *dpp) {
return 0;
}
virtual int finalize() {
}
};
- int get(string& entry, RGWMetadataObject **obj, optional_yield) override;
- int put(string& entry, RGWMetadataObject *obj, RGWObjVersionTracker& objv_tracker, optional_yield, RGWMDLogSyncType type, bool from_remote_zone) override;
- int remove(string& entry, RGWObjVersionTracker& objv_tracker, optional_yield) override;
+ int get(string& entry, RGWMetadataObject **obj, optional_yield, const DoutPrefixProvider *dpp) override;
+ int put(string& entry, RGWMetadataObject *obj, RGWObjVersionTracker& objv_tracker, optional_yield, const DoutPrefixProvider *dpp, RGWMDLogSyncType type, bool from_remote_zone) override;
+ int remove(string& entry, RGWObjVersionTracker& objv_tracker, optional_yield, const DoutPrefixProvider *dpp) override;
int mutate(const string& entry,
const ceph::real_time& mtime,
RGWObjVersionTracker *objv_tracker,
optional_yield y,
+ const DoutPrefixProvider *dpp,
RGWMDLogStatus op_type,
std::function<int()> f) override;
int get_shard_id(const string& entry, int *shard_id) override;
- int list_keys_init(const std::string& marker, void **phandle) override;
+ int list_keys_init(const DoutPrefixProvider *dpp, const std::string& marker, void **phandle) override;
int list_keys_next(void *handle, int max, std::list<string>& keys, bool *truncated) override;
void list_keys_complete(void *handle) override;
RGWMetadataHandler *get_handler(const string& type);
- int get(string& metadata_key, Formatter *f, optional_yield y);
+ int get(string& metadata_key, Formatter *f, optional_yield y, const DoutPrefixProvider *dpp);
int put(string& metadata_key, bufferlist& bl, optional_yield y,
+ const DoutPrefixProvider *dpp,
RGWMDLogSyncType sync_mode,
bool from_remote_zone,
obj_version *existing_version = NULL);
- int remove(string& metadata_key, optional_yield y);
+ int remove(string& metadata_key, optional_yield y, const DoutPrefixProvider *dpp);
int mutate(const string& metadata_key,
const ceph::real_time& mtime,
RGWObjVersionTracker *objv_tracker,
optional_yield y,
+ const DoutPrefixProvider *dpp,
RGWMDLogStatus op_type,
std::function<int()> f);
- int list_keys_init(const string& section, void **phandle);
- int list_keys_init(const string& section, const string& marker, void **phandle);
+ int list_keys_init(const DoutPrefixProvider *dpp, const string& section, void **phandle);
+ int list_keys_init(const DoutPrefixProvider *dpp, const string& section, const string& marker, void **phandle);
int list_keys_next(void *handle, int max, list<string>& keys, bool *truncated);
void list_keys_complete(void *handle);
RGWMDLogSyncType type, bool from_remote_zone);
~RGWMetadataHandlerPut_SObj();
- int put_pre() override;
- int put() override;
- virtual int put_check() {
+ int put_pre(const DoutPrefixProvider *dpp) override;
+ int put(const DoutPrefixProvider *dpp) override;
+ virtual int put_check(const DoutPrefixProvider *dpp) {
return 0;
}
- virtual int put_checked();
+ virtual int put_checked(const DoutPrefixProvider *dpp);
virtual void encode_obj(bufferlist *bl) {}
};
(strncmp(uid, MULTIPART_UPLOAD_ID_PREFIX_LEGACY, sizeof(MULTIPART_UPLOAD_ID_PREFIX_LEGACY) - 1) == 0);
}
-int list_multipart_parts(rgw::sal::RGWRadosStore *store, RGWBucketInfo& bucket_info,
+int list_multipart_parts(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *store, RGWBucketInfo& bucket_info,
CephContext *cct,
const string& upload_id,
const string& meta_oid, int num_parts,
snprintf(buf, sizeof(buf), "%08d", marker);
p.append(buf);
- ret = sysobj.omap().get_vals(p, num_parts + 1, &parts_map,
+ ret = sysobj.omap().get_vals(dpp, p, num_parts + 1, &parts_map,
nullptr, null_yield);
} else {
- ret = sysobj.omap().get_all(&parts_map, null_yield);
+ ret = sysobj.omap().get_all(dpp, &parts_map, null_yield);
}
if (ret < 0) {
return ret;
try {
decode(info, bli);
} catch (buffer::error& err) {
- ldout(cct, 0) << "ERROR: could not part info, caught buffer::error" <<
+ ldpp_dout(dpp, 0) << "ERROR: could not part info, caught buffer::error" <<
dendl;
return -EIO;
}
* where one gateway doesn't support correctly sorted omap
* keys for multipart upload just assume data is unsorted.
*/
- return list_multipart_parts(store, bucket_info, cct, upload_id,
+ return list_multipart_parts(dpp, store, bucket_info, cct, upload_id,
meta_oid, num_parts, marker, parts,
next_marker, truncated, true);
}
return 0;
}
-int list_multipart_parts(rgw::sal::RGWRadosStore *store, struct req_state *s,
+int list_multipart_parts(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store, struct req_state *s,
const string& upload_id,
const string& meta_oid, int num_parts,
int marker, map<uint32_t, RGWUploadPartInfo>& parts,
int *next_marker, bool *truncated,
bool assume_unsorted)
{
- return list_multipart_parts(store, s->bucket->get_info(), s->cct, upload_id,
+ return list_multipart_parts(dpp, store, s->bucket->get_info(), s->cct, upload_id,
meta_oid, num_parts, marker, parts,
next_marker, truncated, assume_unsorted);
}
-int abort_multipart_upload(rgw::sal::RGWRadosStore *store, CephContext *cct,
+int abort_multipart_upload(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store, CephContext *cct,
RGWObjectCtx *obj_ctx, RGWBucketInfo& bucket_info,
RGWMPObj& mp_obj)
{
uint64_t parts_accounted_size = 0;
do {
- ret = list_multipart_parts(store, bucket_info, cct,
+ ret = list_multipart_parts(dpp, store, bucket_info, cct,
mp_obj.get_upload_id(), mp_obj.get_meta(),
1000, marker, obj_parts, &marker, &truncated);
if (ret < 0) {
- ldout(cct, 20) << __func__ << ": list_multipart_parts returned " <<
+ ldpp_dout(dpp, 20) << __func__ << ": list_multipart_parts returned " <<
ret << dendl;
return (ret == -ENOENT) ? -ERR_NO_SUCH_UPLOAD : ret;
}
string oid = mp_obj.get_part(obj_iter->second.num);
obj.init_ns(bucket_info.bucket, oid, RGW_OBJ_NS_MULTIPART);
obj.index_hash_source = mp_obj.get_key();
- ret = store->getRados()->delete_obj(*obj_ctx, bucket_info, obj, 0);
+ ret = store->getRados()->delete_obj(dpp, *obj_ctx, bucket_info, obj, 0);
if (ret < 0 && ret != -ENOENT)
return ret;
} else {
- store->getRados()->update_gc_chain(meta_obj, obj_part.manifest, &chain);
- RGWObjManifest::obj_iterator oiter = obj_part.manifest.obj_begin();
- if (oiter != obj_part.manifest.obj_end()) {
+ store->getRados()->update_gc_chain(dpp, meta_obj, obj_part.manifest, &chain);
+ RGWObjManifest::obj_iterator oiter = obj_part.manifest.obj_begin(dpp);
+ if (oiter != obj_part.manifest.obj_end(dpp)) {
rgw_obj head;
rgw_raw_obj raw_head = oiter.get_location().get_raw_obj(store);
RGWSI_Tier_RADOS::raw_obj_to_obj(bucket_info.bucket, raw_head, &head);
/* use upload id as tag and do it synchronously */
ret = store->getRados()->send_chain_to_gc(chain, mp_obj.get_upload_id());
if (ret < 0) {
- ldout(cct, 5) << __func__ << ": gc->send_chain() returned " << ret << dendl;
+ ldpp_dout(dpp, 5) << __func__ << ": gc->send_chain() returned " << ret << dendl;
if (ret == -ENOENT) {
return -ERR_NO_SUCH_UPLOAD;
}
//Delete objects inline if send chain to gc fails
- store->getRados()->delete_objs_inline(chain, mp_obj.get_upload_id());
+ store->getRados()->delete_objs_inline(dpp, chain, mp_obj.get_upload_id());
}
RGWRados::Object del_target(store->getRados(), bucket_info, *obj_ctx, meta_obj);
del_op.params.parts_accounted_size = parts_accounted_size;
// and also remove the metadata obj
- ret = del_op.delete_obj(null_yield);
+ ret = del_op.delete_obj(null_yield, dpp);
if (ret < 0) {
- ldout(cct, 20) << __func__ << ": del_op.delete_obj returned " <<
+ ldpp_dout(dpp, 20) << __func__ << ": del_op.delete_obj returned " <<
ret << dendl;
}
return (ret == -ENOENT) ? -ERR_NO_SUCH_UPLOAD : ret;
}
-int list_bucket_multiparts(rgw::sal::RGWRadosStore *store, RGWBucketInfo& bucket_info,
+int list_bucket_multiparts(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store, RGWBucketInfo& bucket_info,
const string& prefix, const string& marker,
const string& delim,
const int& max_uploads,
list_op.params.ns = RGW_OBJ_NS_MULTIPART;
list_op.params.filter = &mp_filter;
- return(list_op.list_objects(max_uploads, objs, common_prefixes, is_truncated, null_yield));
+ return(list_op.list_objects(dpp, max_uploads, objs, common_prefixes, is_truncated, null_yield));
}
-int abort_bucket_multiparts(rgw::sal::RGWRadosStore *store, CephContext *cct, RGWBucketInfo& bucket_info,
- string& prefix, string& delim)
+int abort_bucket_multiparts(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store, CephContext *cct,
+ RGWBucketInfo& bucket_info, string& prefix, string& delim)
{
constexpr int max = 1000;
int ret, num_deleted = 0;
bool is_truncated;
do {
- ret = list_bucket_multiparts(store, bucket_info, prefix, marker, delim,
+ ret = list_bucket_multiparts(dpp, store, bucket_info, prefix, marker, delim,
max, &objs, nullptr, &is_truncated);
if (ret < 0) {
- ldout(store->ctx(), 0) << __func__ <<
+ ldpp_dout(dpp, 0) << __func__ <<
" ERROR : calling list_bucket_multiparts; ret=" << ret <<
"; bucket=\"" << bucket_info.bucket << "\"; prefix=\"" <<
prefix << "\"; delim=\"" << delim << "\"" << dendl;
return ret;
}
- ldout(store->ctx(), 20) << __func__ <<
+ ldpp_dout(dpp, 20) << __func__ <<
" INFO: aborting and cleaning up multipart upload(s); bucket=\"" <<
bucket_info.bucket << "\"; objs.size()=" << objs.size() <<
"; is_truncated=" << is_truncated << dendl;
rgw_obj_key key(obj.key);
if (!mp.from_meta(key.name))
continue;
- ret = abort_multipart_upload(store, cct, &obj_ctx, bucket_info, mp);
+ ret = abort_multipart_upload(dpp, store, cct, &obj_ctx, bucket_info, mp);
if (ret < 0) {
// we're doing a best-effort; if something cannot be found,
// log it and keep moving forward
if (ret != -ENOENT && ret != -ERR_NO_SUCH_UPLOAD) {
- ldout(store->ctx(), 0) << __func__ <<
+ ldpp_dout(dpp, 0) << __func__ <<
" ERROR : failed to abort and clean-up multipart upload \"" <<
key.get_oid() << "\"" << dendl;
return ret;
} else {
- ldout(store->ctx(), 10) << __func__ <<
+ ldpp_dout(dpp, 10) << __func__ <<
" NOTE : unable to find part(s) of "
"aborted multipart upload of \"" << key.get_oid() <<
"\" for cleaning up" << dendl;
num_deleted++;
}
if (num_deleted) {
- ldout(store->ctx(), 0) << __func__ <<
+ ldpp_dout(dpp, 0) << __func__ <<
" WARNING : aborted " << num_deleted <<
" incomplete multipart uploads" << dendl;
}
#include "rgw_xml.h"
#include "rgw_obj_manifest.h"
#include "rgw_compression_types.h"
+#include "common/dout.h"
namespace rgw { namespace sal {
class RGWRadosStore;
extern bool is_v2_upload_id(const string& upload_id);
-extern int list_multipart_parts(rgw::sal::RGWRadosStore *store, RGWBucketInfo& bucket_info,
+extern int list_multipart_parts(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store, RGWBucketInfo& bucket_info,
CephContext *cct,
const string& upload_id,
const string& meta_oid, int num_parts,
int *next_marker, bool *truncated,
bool assume_unsorted = false);
-extern int list_multipart_parts(rgw::sal::RGWRadosStore *store, struct req_state *s,
+extern int list_multipart_parts(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store, struct req_state *s,
const string& upload_id,
const string& meta_oid, int num_parts,
int marker, map<uint32_t, RGWUploadPartInfo>& parts,
int *next_marker, bool *truncated,
bool assume_unsorted = false);
-extern int abort_multipart_upload(rgw::sal::RGWRadosStore *store, CephContext *cct, RGWObjectCtx *obj_ctx,
+extern int abort_multipart_upload(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *store, CephContext *cct, RGWObjectCtx *obj_ctx,
RGWBucketInfo& bucket_info, RGWMPObj& mp_obj);
-extern int list_bucket_multiparts(rgw::sal::RGWRadosStore *store, RGWBucketInfo& bucket_info,
+extern int list_bucket_multiparts(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store, RGWBucketInfo& bucket_info,
const string& prefix,
const string& marker,
const string& delim,
vector<rgw_bucket_dir_entry> *objs,
map<string, bool> *common_prefixes, bool *is_truncated);
-extern int abort_bucket_multiparts(rgw::sal::RGWRadosStore *store, CephContext *cct, RGWBucketInfo& bucket_info,
+extern int abort_bucket_multiparts(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *store, CephContext *cct, RGWBucketInfo& bucket_info,
string& prefix, string& delim);
#endif
return boost::context::protected_fixedsize_stack{128*1024};
}
-class Manager {
+class Manager : public DoutPrefixProvider {
const size_t max_queue_size;
const uint32_t queues_update_period_ms;
const uint32_t queues_update_retry_ms;
const std::string Q_LIST_OBJECT_NAME = "queues_list_object";
+ CephContext *get_cct() const override { return cct; }
+ unsigned get_subsys() const override { return dout_subsys; }
+ std::ostream& gen_prefix(std::ostream& out) const override { return out << "rgw notify: "; }
+
// read the list of queues from the queue list object
int read_queue_list(queues_t& queues, optional_yield y) {
constexpr auto max_chunk = 1024U;
librados::ObjectReadOperation op;
queues_t queues_chunk;
op.omap_get_keys2(start_after, max_chunk, &queues_chunk, &more, &rval);
- const auto ret = rgw_rados_operate(rados_ioctx, Q_LIST_OBJECT_NAME, &op, nullptr, y);
+ const auto ret = rgw_rados_operate(this, rados_ioctx, Q_LIST_OBJECT_NAME, &op, nullptr, y);
if (ret == -ENOENT) {
// queue list object was not created - nothing to do
return 0;
}
if (ret < 0) {
// TODO: do we need to check on rval as well as ret?
- ldout(cct, 1) << "ERROR: failed to read queue list. error: " << ret << dendl;
+ ldpp_dout(this, 1) << "ERROR: failed to read queue list. error: " << ret << dendl;
return ret;
}
queues.merge(queues_chunk);
try {
decode(event_entry, iter);
} catch (buffer::error& err) {
- ldout(cct, 5) << "WARNING: failed to decode entry. error: " << err.what() << dendl;
+ ldpp_dout(this, 5) << "WARNING: failed to decode entry. error: " << err.what() << dendl;
return false;
}
try {
// TODO move endpoint creation to queue level
const auto push_endpoint = RGWPubSubEndpoint::create(event_entry.push_endpoint, event_entry.arn_topic,
- RGWHTTPArgs(event_entry.push_endpoint_args),
+ RGWHTTPArgs(event_entry.push_endpoint_args, this),
cct);
- ldout(cct, 20) << "INFO: push endpoint created: " << event_entry.push_endpoint <<
+ ldpp_dout(this, 20) << "INFO: push endpoint created: " << event_entry.push_endpoint <<
" for entry: " << entry.marker << dendl;
const auto ret = push_endpoint->send_to_completion_async(cct, event_entry.event, optional_yield(io_context, yield));
if (ret < 0) {
- ldout(cct, 5) << "WARNING: push entry: " << entry.marker << " to endpoint: " << event_entry.push_endpoint
+ ldpp_dout(this, 5) << "WARNING: push entry: " << entry.marker << " to endpoint: " << event_entry.push_endpoint
<< " failed. error: " << ret << " (will retry)" << dendl;
return false;
} else {
- ldout(cct, 20) << "INFO: push entry: " << entry.marker << " to endpoint: " << event_entry.push_endpoint
+ ldpp_dout(this, 20) << "INFO: push entry: " << entry.marker << " to endpoint: " << event_entry.push_endpoint
<< " ok" << dendl;
if (perfcounter) perfcounter->inc(l_rgw_pubsub_push_ok);
return true;
}
} catch (const RGWPubSubEndpoint::configuration_error& e) {
- ldout(cct, 5) << "WARNING: failed to create push endpoint: "
+ ldpp_dout(this, 5) << "WARNING: failed to create push endpoint: "
<< event_entry.push_endpoint << " for entry: " << entry.marker << ". error: " << e.what() << " (will retry) " << dendl;
return false;
}
// clean stale reservation from queue
void cleanup_queue(const std::string& queue_name, spawn::yield_context yield) {
while (true) {
- ldout(cct, 20) << "INFO: trying to perform stale reservation cleanup for queue: " << queue_name << dendl;
+ ldpp_dout(this, 20) << "INFO: trying to perform stale reservation cleanup for queue: " << queue_name << dendl;
const auto now = ceph::coarse_real_time::clock::now();
const auto stale_time = now - std::chrono::seconds(stale_reservations_period_s);
librados::ObjectWriteOperation op;
"" /*no tag*/);
cls_2pc_queue_expire_reservations(op, stale_time);
// check ownership and do reservation cleanup in one batch
- auto ret = rgw_rados_operate(rados_ioctx, queue_name, &op, optional_yield(io_context, yield));
+ auto ret = rgw_rados_operate(this, rados_ioctx, queue_name, &op, optional_yield(io_context, yield));
if (ret == -ENOENT) {
// queue was deleted
- ldout(cct, 5) << "INFO: queue: "
+ ldpp_dout(this, 5) << "INFO: queue: "
<< queue_name << ". was removed. cleanup will stop" << dendl;
return;
}
if (ret == -EBUSY) {
- ldout(cct, 5) << "WARNING: queue: " << queue_name << " ownership moved to another daemon. processing will stop" << dendl;
+ ldpp_dout(this, 5) << "WARNING: queue: " << queue_name << " ownership moved to another daemon. processing will stop" << dendl;
return;
}
if (ret < 0) {
- ldout(cct, 5) << "WARNING: failed to cleanup stale reservation from queue and/or lock queue: " << queue_name
+ ldpp_dout(this, 5) << "WARNING: failed to cleanup stale reservation from queue and/or lock queue: " << queue_name
<< ". error: " << ret << dendl;
}
Timer timer(io_context);
"" /*no tag*/);
cls_2pc_queue_list_entries(op, start_marker, max_elements, &obl, &rval);
// check ownership and list entries in one batch
- auto ret = rgw_rados_operate(rados_ioctx, queue_name, &op, nullptr, optional_yield(io_context, yield));
+ auto ret = rgw_rados_operate(this, rados_ioctx, queue_name, &op, nullptr, optional_yield(io_context, yield));
if (ret == -ENOENT) {
// queue was deleted
- ldout(cct, 5) << "INFO: queue: "
+ ldpp_dout(this, 5) << "INFO: queue: "
<< queue_name << ". was removed. processing will stop" << dendl;
return;
}
if (ret == -EBUSY) {
- ldout(cct, 5) << "WARNING: queue: " << queue_name << " ownership moved to another daemon. processing will stop" << dendl;
+ ldpp_dout(this, 5) << "WARNING: queue: " << queue_name << " ownership moved to another daemon. processing will stop" << dendl;
return;
}
if (ret < 0) {
- ldout(cct, 5) << "WARNING: failed to get list of entries in queue and/or lock queue: "
+ ldpp_dout(this, 5) << "WARNING: failed to get list of entries in queue and/or lock queue: "
<< queue_name << ". error: " << ret << " (will retry)" << dendl;
continue;
}
ret = cls_2pc_queue_list_entries_result(obl, entries, &truncated, end_marker);
if (ret < 0) {
- ldout(cct, 5) << "WARNING: failed to parse list of entries in queue: "
+ ldpp_dout(this, 5) << "WARNING: failed to parse list of entries in queue: "
<< queue_name << ". error: " << ret << " (will retry)" << dendl;
continue;
}
continue;
}
// log when queue is not idle
- ldout(cct, 20) << "INFO: found: " << total_entries << " entries in: " << queue_name <<
+ ldpp_dout(this, 20) << "INFO: found: " << total_entries << " entries in: " << queue_name <<
". end marker is: " << end_marker << dendl;
is_idle = false;
spawn::spawn(yield, [this, &queue_name, entry_idx, total_entries, &end_marker, &remove_entries, &has_error, &waiter, entry](spawn::yield_context yield) {
const auto token = waiter.make_token();
if (process_entry(entry, yield)) {
- ldout(cct, 20) << "INFO: processing of entry: " <<
+ ldpp_dout(this, 20) << "INFO: processing of entry: " <<
entry.marker << " (" << entry_idx << "/" << total_entries << ") from: " << queue_name << " ok" << dendl;
remove_entries = true;
} else {
if (set_min_marker(end_marker, entry.marker) < 0) {
- ldout(cct, 1) << "ERROR: cannot determin minimum between malformed markers: " << end_marker << ", " << entry.marker << dendl;
+ ldpp_dout(this, 1) << "ERROR: cannot determin minimum between malformed markers: " << end_marker << ", " << entry.marker << dendl;
} else {
- ldout(cct, 20) << "INFO: new end marker for removal: " << end_marker << " from: " << queue_name << dendl;
+ ldpp_dout(this, 20) << "INFO: new end marker for removal: " << end_marker << " from: " << queue_name << dendl;
}
has_error = true;
- ldout(cct, 20) << "INFO: processing of entry: " <<
+ ldpp_dout(this, 20) << "INFO: processing of entry: " <<
entry.marker << " (" << entry_idx << "/" << total_entries << ") from: " << queue_name << " failed" << dendl;
}
}, make_stack_allocator());
"" /*no tag*/);
cls_2pc_queue_remove_entries(op, end_marker);
// check ownership and deleted entries in one batch
- const auto ret = rgw_rados_operate(rados_ioctx, queue_name, &op, optional_yield(io_context, yield));
+ const auto ret = rgw_rados_operate(this, rados_ioctx, queue_name, &op, optional_yield(io_context, yield));
if (ret == -ENOENT) {
// queue was deleted
- ldout(cct, 5) << "INFO: queue: "
+ ldpp_dout(this, 5) << "INFO: queue: "
<< queue_name << ". was removed. processing will stop" << dendl;
return;
}
if (ret == -EBUSY) {
- ldout(cct, 5) << "WARNING: queue: " << queue_name << " ownership moved to another daemon. processing will stop" << dendl;
+ ldpp_dout(this, 5) << "WARNING: queue: " << queue_name << " ownership moved to another daemon. processing will stop" << dendl;
return;
}
if (ret < 0) {
- ldout(cct, 1) << "ERROR: failed to remove entries and/or lock queue up to: " << end_marker << " from queue: "
+ ldpp_dout(this, 1) << "ERROR: failed to remove entries and/or lock queue up to: " << end_marker << " from queue: "
<< queue_name << ". error: " << ret << dendl;
} else {
- ldout(cct, 20) << "INFO: removed entries up to: " << end_marker << " from queue: "
+ ldpp_dout(this, 20) << "INFO: removed entries up to: " << end_marker << " from queue: "
<< queue_name << dendl;
}
}
std::chrono::milliseconds(duration_jitter(rnd_gen));
timer.expires_from_now(duration);
const auto tp = ceph::coarse_real_time::clock::to_time_t(ceph::coarse_real_time::clock::now() + duration);
- ldout(cct, 20) << "INFO: next queues processing will happen at: " << std::ctime(&tp) << dendl;
+ ldpp_dout(this, 20) << "INFO: next queues processing will happen at: " << std::ctime(&tp) << dendl;
boost::system::error_code ec;
timer.async_wait(yield[ec]);
failover_time,
LOCK_FLAG_MAY_RENEW);
- ret = rgw_rados_operate(rados_ioctx, queue_name, &op, optional_yield(io_context, yield));
+ ret = rgw_rados_operate(this, rados_ioctx, queue_name, &op, optional_yield(io_context, yield));
if (ret == -EBUSY) {
// lock is already taken by another RGW
- ldout(cct, 20) << "INFO: queue: " << queue_name << " owned (locked) by another daemon" << dendl;
+ ldpp_dout(this, 20) << "INFO: queue: " << queue_name << " owned (locked) by another daemon" << dendl;
// if queue was owned by this RGW, processing should be stopped, queue would be deleted from list afterwards
continue;
}
if (ret == -ENOENT) {
// queue is deleted - processing will stop the next time we try to read from the queue
- ldout(cct, 10) << "INFO: queue: " << queue_name << " should not be locked - already deleted" << dendl;
+ ldpp_dout(this, 10) << "INFO: queue: " << queue_name << " should not be locked - already deleted" << dendl;
continue;
}
if (ret < 0) {
// failed to lock for another reason, continue to process other queues
- ldout(cct, 1) << "ERROR: failed to lock queue: " << queue_name << ". error: " << ret << dendl;
+ ldpp_dout(this, 1) << "ERROR: failed to lock queue: " << queue_name << ". error: " << ret << dendl;
has_error = true;
continue;
}
// add queue to list of owned queues
if (owned_queues.insert(queue_name).second) {
- ldout(cct, 10) << "INFO: queue: " << queue_name << " now owned (locked) by this daemon" << dendl;
+ ldpp_dout(this, 10) << "INFO: queue: " << queue_name << " now owned (locked) by this daemon" << dendl;
// start processing this queue
spawn::spawn(io_context, [this, &queue_gc, &queue_gc_lock, queue_name](spawn::yield_context yield) {
process_queue(queue_name, yield);
// mark it for deletion
std::lock_guard lock_guard(queue_gc_lock);
queue_gc.push_back(queue_name);
- ldout(cct, 10) << "INFO: queue: " << queue_name << " marked for removal" << dendl;
+ ldpp_dout(this, 10) << "INFO: queue: " << queue_name << " marked for removal" << dendl;
}, make_stack_allocator());
} else {
- ldout(cct, 20) << "INFO: queue: " << queue_name << " ownership (lock) renewed" << dendl;
+ ldpp_dout(this, 20) << "INFO: queue: " << queue_name << " ownership (lock) renewed" << dendl;
}
}
// erase all queue that were deleted
std::lock_guard lock_guard(queue_gc_lock);
std::for_each(queue_gc.begin(), queue_gc.end(), [this, &owned_queues](const std::string& queue_name) {
owned_queues.erase(queue_name);
- ldout(cct, 20) << "INFO: queue: " << queue_name << " removed" << dendl;
+ ldpp_dout(this, 20) << "INFO: queue: " << queue_name << " removed" << dendl;
});
queue_gc.clear();
}
(WORKER_THREAD_NAME+std::to_string(worker_id)).c_str());
ceph_assert(rc == 0);
}
- ldout(cct, 10) << "Started notification manager with: " << worker_count << " workers" << dendl;
+ ldpp_dout(this, 10) << "Started notification manager with: " << worker_count << " workers" << dendl;
}
int add_persistent_topic(const std::string& topic_name, optional_yield y) {
if (topic_name == Q_LIST_OBJECT_NAME) {
- ldout(cct, 1) << "ERROR: topic name cannot be: " << Q_LIST_OBJECT_NAME << " (conflict with queue list object name)" << dendl;
+ ldpp_dout(this, 1) << "ERROR: topic name cannot be: " << Q_LIST_OBJECT_NAME << " (conflict with queue list object name)" << dendl;
return -EINVAL;
}
librados::ObjectWriteOperation op;
op.create(true);
cls_2pc_queue_init(op, topic_name, max_queue_size);
- auto ret = rgw_rados_operate(rados_ioctx, topic_name, &op, y);
+ auto ret = rgw_rados_operate(this, rados_ioctx, topic_name, &op, y);
if (ret == -EEXIST) {
// queue already exists - nothing to do
- ldout(cct, 20) << "INFO: queue for topic: " << topic_name << " already exists. nothing to do" << dendl;
+ ldpp_dout(this, 20) << "INFO: queue for topic: " << topic_name << " already exists. nothing to do" << dendl;
return 0;
}
if (ret < 0) {
// failed to create queue
- ldout(cct, 1) << "ERROR: failed to create queue for topic: " << topic_name << ". error: " << ret << dendl;
+ ldpp_dout(this, 1) << "ERROR: failed to create queue for topic: " << topic_name << ". error: " << ret << dendl;
return ret;
}
bufferlist empty_bl;
std::map<std::string, bufferlist> new_topic{{topic_name, empty_bl}};
op.omap_set(new_topic);
- ret = rgw_rados_operate(rados_ioctx, Q_LIST_OBJECT_NAME, &op, y);
+ ret = rgw_rados_operate(this, rados_ioctx, Q_LIST_OBJECT_NAME, &op, y);
if (ret < 0) {
- ldout(cct, 1) << "ERROR: failed to add queue: " << topic_name << " to queue list. error: " << ret << dendl;
+ ldpp_dout(this, 1) << "ERROR: failed to add queue: " << topic_name << " to queue list. error: " << ret << dendl;
return ret;
}
- ldout(cct, 20) << "INFO: queue: " << topic_name << " added to queue list" << dendl;
+ ldpp_dout(this, 20) << "INFO: queue: " << topic_name << " added to queue list" << dendl;
return 0;
}
int remove_persistent_topic(const std::string& topic_name, optional_yield y) {
librados::ObjectWriteOperation op;
op.remove();
- auto ret = rgw_rados_operate(rados_ioctx, topic_name, &op, y);
+ auto ret = rgw_rados_operate(this, rados_ioctx, topic_name, &op, y);
if (ret == -ENOENT) {
// queue already removed - nothing to do
- ldout(cct, 20) << "INFO: queue for topic: " << topic_name << " already removed. nothing to do" << dendl;
+ ldpp_dout(this, 20) << "INFO: queue for topic: " << topic_name << " already removed. nothing to do" << dendl;
return 0;
}
if (ret < 0) {
// failed to remove queue
- ldout(cct, 1) << "ERROR: failed to remove queue for topic: " << topic_name << ". error: " << ret << dendl;
+ ldpp_dout(this, 1) << "ERROR: failed to remove queue for topic: " << topic_name << ". error: " << ret << dendl;
return ret;
}
std::set<std::string> topic_to_remove{{topic_name}};
op.omap_rm_keys(topic_to_remove);
- ret = rgw_rados_operate(rados_ioctx, Q_LIST_OBJECT_NAME, &op, y);
+ ret = rgw_rados_operate(this, rados_ioctx, Q_LIST_OBJECT_NAME, &op, y);
if (ret < 0) {
- ldout(cct, 1) << "ERROR: failed to remove queue: " << topic_name << " from queue list. error: " << ret << dendl;
+ ldpp_dout(this, 1) << "ERROR: failed to remove queue: " << topic_name << " from queue list. error: " << ret << dendl;
return ret;
}
- ldout(cct, 20) << "INFO: queue: " << topic_name << " removed from queue list" << dendl;
+ ldpp_dout(this, 20) << "INFO: queue: " << topic_name << " removed from queue list" << dendl;
return 0;
}
};
constexpr uint32_t STALE_RESERVATIONS_PERIOD_S = 120; // cleanup reservations that are more than 2 minutes old
constexpr uint32_t RESERVATIONS_CLEANUP_PERIOD_S = 30; // reservation cleanup every 30 seconds
-bool init(CephContext* cct, rgw::sal::RGWRadosStore* store) {
+bool init(CephContext* cct, rgw::sal::RGWRadosStore* store, const DoutPrefixProvider *dpp) {
if (s_manager) {
return false;
}
if (!src_obj->get_bucket()) {
src_obj->set_bucket(s->bucket.get());
}
- if (src_obj->get_obj_attrs(s->obj_ctx, s->yield) < 0) {
+ if (src_obj->get_obj_attrs(s->obj_ctx, s->yield, s) < 0) {
return nullptr;
}
}
return true;
}
-int publish_reserve(EventType event_type,
+int publish_reserve(const DoutPrefixProvider *dpp, EventType event_type,
reservation_t& res,
const RGWObjTags* req_tags)
{
// notification does not apply to req_state
continue;
}
- ldout(res.s->cct, 20) << "INFO: notification: '" << topic_filter.s3_id <<
+ ldpp_dout(dpp, 20) << "INFO: notification: '" << topic_filter.s3_id <<
"' on topic: '" << topic_cfg.dest.arn_topic <<
"' and bucket: '" << res.s->bucket->get_name() <<
"' (unique topic: '" << topic_cfg.name <<
int rval;
const auto& queue_name = topic_cfg.dest.arn_topic;
cls_2pc_queue_reserve(op, res.size, 1, &obl, &rval);
- auto ret = rgw_rados_operate(res.store->getRados()->get_notif_pool_ctx(),
+ auto ret = rgw_rados_operate(dpp, res.store->getRados()->get_notif_pool_ctx(),
queue_name, &op, res.s->yield, librados::OPERATION_RETURNVEC);
if (ret < 0) {
- ldout(res.s->cct, 1) << "ERROR: failed to reserve notification on queue: " << queue_name
+ ldpp_dout(dpp, 1) << "ERROR: failed to reserve notification on queue: " << queue_name
<< ". error: " << ret << dendl;
// if no space is left in queue we ask client to slow down
return (ret == -ENOSPC) ? -ERR_RATE_LIMITED : ret;
}
ret = cls_2pc_queue_reserve_result(obl, res_id);
if (ret < 0) {
- ldout(res.s->cct, 1) << "ERROR: failed to parse reservation id. error: " << ret << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to parse reservation id. error: " << ret << dendl;
return ret;
}
}
const ceph::real_time& mtime,
const std::string& etag,
EventType event_type,
- reservation_t& res)
+ reservation_t& res,
+ const DoutPrefixProvider *dpp)
{
for (auto& topic : res.topics) {
if (topic.cfg.dest.persistent && topic.res_id == cls_2pc_reservation::NO_ID) {
const auto& queue_name = topic.cfg.dest.arn_topic;
if (bl.length() > res.size) {
// try to make a larger reservation, fail only if this is not possible
- ldout(res.s->cct, 5) << "WARNING: committed size: " << bl.length() << " exceeded reserved size: " << res.size <<
+ ldpp_dout(dpp, 5) << "WARNING: committed size: " << bl.length() << " exceeded reserved size: " << res.size <<
" . trying to make a larger reservation on queue:" << queue_name << dendl;
// first cancel the existing reservation
librados::ObjectWriteOperation op;
cls_2pc_queue_abort(op, topic.res_id);
- auto ret = rgw_rados_operate(res.store->getRados()->get_notif_pool_ctx(),
+ auto ret = rgw_rados_operate(dpp, res.store->getRados()->get_notif_pool_ctx(),
topic.cfg.dest.arn_topic, &op,
res.s->yield);
if (ret < 0) {
- ldout(res.s->cct, 1) << "ERROR: failed to abort reservation: " << topic.res_id <<
+ ldpp_dout(dpp, 1) << "ERROR: failed to abort reservation: " << topic.res_id <<
" when trying to make a larger reservation on queue: " << queue_name
<< ". error: " << ret << dendl;
return ret;
bufferlist obl;
int rval;
cls_2pc_queue_reserve(op, bl.length(), 1, &obl, &rval);
- ret = rgw_rados_operate(res.store->getRados()->get_notif_pool_ctx(),
+ ret = rgw_rados_operate(dpp, res.store->getRados()->get_notif_pool_ctx(),
queue_name, &op, res.s->yield, librados::OPERATION_RETURNVEC);
if (ret < 0) {
- ldout(res.s->cct, 1) << "ERROR: failed to reserve extra space on queue: " << queue_name
+ ldpp_dout(dpp, 1) << "ERROR: failed to reserve extra space on queue: " << queue_name
<< ". error: " << ret << dendl;
return (ret == -ENOSPC) ? -ERR_RATE_LIMITED : ret;
}
ret = cls_2pc_queue_reserve_result(obl, topic.res_id);
if (ret < 0) {
- ldout(res.s->cct, 1) << "ERROR: failed to parse reservation id for extra space. error: " << ret << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to parse reservation id for extra space. error: " << ret << dendl;
return ret;
}
}
std::vector<bufferlist> bl_data_vec{std::move(bl)};
librados::ObjectWriteOperation op;
cls_2pc_queue_commit(op, bl_data_vec, topic.res_id);
- const auto ret = rgw_rados_operate(res.store->getRados()->get_notif_pool_ctx(),
+ const auto ret = rgw_rados_operate(dpp, res.store->getRados()->get_notif_pool_ctx(),
queue_name, &op,
res.s->yield);
topic.res_id = cls_2pc_reservation::NO_ID;
if (ret < 0) {
- ldout(res.s->cct, 1) << "ERROR: failed to commit reservation to queue: " << queue_name
+ ldpp_dout(dpp, 1) << "ERROR: failed to commit reservation to queue: " << queue_name
<< ". error: " << ret << dendl;
return ret;
}
// TODO add endpoint LRU cache
const auto push_endpoint = RGWPubSubEndpoint::create(topic.cfg.dest.push_endpoint,
topic.cfg.dest.arn_topic,
- RGWHTTPArgs(topic.cfg.dest.push_endpoint_args),
+ RGWHTTPArgs(topic.cfg.dest.push_endpoint_args, dpp),
res.s->cct);
- ldout(res.s->cct, 20) << "INFO: push endpoint created: " << topic.cfg.dest.push_endpoint << dendl;
+ ldpp_dout(dpp, 20) << "INFO: push endpoint created: " << topic.cfg.dest.push_endpoint << dendl;
const auto ret = push_endpoint->send_to_completion_async(res.s->cct, event_entry.event, res.s->yield);
if (ret < 0) {
- ldout(res.s->cct, 1) << "ERROR: push to endpoint " << topic.cfg.dest.push_endpoint << " failed. error: " << ret << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: push to endpoint " << topic.cfg.dest.push_endpoint << " failed. error: " << ret << dendl;
if (perfcounter) perfcounter->inc(l_rgw_pubsub_push_failed);
return ret;
}
if (perfcounter) perfcounter->inc(l_rgw_pubsub_push_ok);
} catch (const RGWPubSubEndpoint::configuration_error& e) {
- ldout(res.s->cct, 1) << "ERROR: failed to create push endpoint: "
+ ldpp_dout(dpp, 1) << "ERROR: failed to create push endpoint: "
<< topic.cfg.dest.push_endpoint << ". error: " << e.what() << dendl;
if (perfcounter) perfcounter->inc(l_rgw_pubsub_push_failed);
return -EINVAL;
return 0;
}
-int publish_abort(reservation_t& res) {
+int publish_abort(const DoutPrefixProvider *dpp, reservation_t& res) {
for (auto& topic : res.topics) {
if (!topic.cfg.dest.persistent || topic.res_id == cls_2pc_reservation::NO_ID) {
// nothing to abort or already committed/aborted
const auto& queue_name = topic.cfg.dest.arn_topic;
librados::ObjectWriteOperation op;
cls_2pc_queue_abort(op, topic.res_id);
- const auto ret = rgw_rados_operate(res.store->getRados()->get_notif_pool_ctx(),
+ const auto ret = rgw_rados_operate(dpp, res.store->getRados()->get_notif_pool_ctx(),
queue_name, &op,
res.s->yield);
if (ret < 0) {
- ldout(res.s->cct, 1) << "ERROR: failed to abort reservation: " << topic.res_id <<
+ ldpp_dout(dpp, 1) << "ERROR: failed to abort reservation: " << topic.res_id <<
" from queue: " << queue_name << ". error: " << ret << dendl;
return ret;
}
}
reservation_t::~reservation_t() {
- publish_abort(*this);
+ publish_abort(dpp, *this);
}
}
// initialize the notification manager
// notification manager is dequeing the 2-phase-commit queues
// and send the notifications to the endpoints
-bool init(CephContext* cct, rgw::sal::RGWRadosStore* store);
+bool init(CephContext* cct, rgw::sal::RGWRadosStore* store, const DoutPrefixProvider *dpp);
// shutdown the notification manager
void shutdown();
cls_2pc_reservation::id_t res_id;
};
+ const DoutPrefixProvider *dpp;
std::vector<topic_t> topics;
rgw::sal::RGWRadosStore* const store;
const req_state* const s;
size_t size;
rgw::sal::RGWObject* const object;
- reservation_t(rgw::sal::RGWRadosStore* _store, const req_state* _s, rgw::sal::RGWObject* _object) :
- store(_store), s(_s), object(_object) {}
+ reservation_t(const DoutPrefixProvider *_dpp, rgw::sal::RGWRadosStore* _store, const req_state* _s, rgw::sal::RGWObject* _object) :
+ dpp(_dpp), store(_store), s(_s), object(_object) {}
// dtor doing resource leak guarding
// aborting the reservation if not already committed or aborted
};
// create a reservation on the 2-phase-commit queue
-int publish_reserve(EventType event_type,
+int publish_reserve(const DoutPrefixProvider *dpp,
+ EventType event_type,
reservation_t& reservation,
const RGWObjTags* req_tags);
const ceph::real_time& mtime,
const std::string& etag,
EventType event_type,
- reservation_t& reservation);
+ reservation_t& reservation,
+ const DoutPrefixProvider *dpp);
// cancel the reservation
-int publish_abort(reservation_t& reservation);
+int publish_abort(const DoutPrefixProvider *dpp, reservation_t& reservation);
}
#include "services/svc_zone.h"
#include "services/svc_tier_rados.h"
+#include "rgw_rados.h" // RGW_OBJ_NS_SHADOW and RGW_OBJ_NS_MULTIPART
#define dout_context g_ceph_context
#define dout_subsys ceph_subsys_rgw
manifest->get_implicit_location(cur_part_id, cur_stripe, ofs, NULL, &cur_obj);
- manifest->update_iterators();
-
return 0;
}
-const RGWObjManifest::obj_iterator& RGWObjManifest::obj_begin()
-{
- return begin_iter;
-}
-
-const RGWObjManifest::obj_iterator& RGWObjManifest::obj_end()
-{
- return end_iter;
-}
-
-RGWObjManifest::obj_iterator RGWObjManifest::obj_find(uint64_t ofs)
-{
- if (ofs > obj_size) {
- ofs = obj_size;
- }
- RGWObjManifest::obj_iterator iter(this);
- iter.seek(ofs);
- return iter;
-}
-
-int RGWObjManifest::append(RGWObjManifest& m, const RGWZoneGroup& zonegroup,
+int RGWObjManifest::append(const DoutPrefixProvider *dpp, RGWObjManifest& m, const RGWZoneGroup& zonegroup,
const RGWZoneParams& zone_params)
{
if (explicit_objs || m.explicit_objs) {
- return append_explicit(m, zonegroup, zone_params);
+ return append_explicit(dpp, m, zonegroup, zone_params);
}
if (rules.empty()) {
map<uint64_t, RGWObjManifestRule>::iterator miter = m.rules.begin();
if (miter == m.rules.end()) {
- return append_explicit(m, zonegroup, zone_params);
+ return append_explicit(dpp, m, zonegroup, zone_params);
}
for (; miter != m.rules.end(); ++miter) {
return 0;
}
-int RGWObjManifest::append(RGWObjManifest& m, RGWSI_Zone *zone_svc)
+int RGWObjManifest::append(const DoutPrefixProvider *dpp, RGWObjManifest& m, RGWSI_Zone *zone_svc)
{
- return append(m, zone_svc->get_zonegroup(), zone_svc->get_zone_params());
+ return append(dpp, m, zone_svc->get_zonegroup(), zone_svc->get_zone_params());
}
void RGWObjManifest::append_rules(RGWObjManifest& m, map<uint64_t, RGWObjManifestRule>::iterator& miter,
}
}
-void RGWObjManifest::convert_to_explicit(const RGWZoneGroup& zonegroup, const RGWZoneParams& zone_params)
+void RGWObjManifest::convert_to_explicit(const DoutPrefixProvider *dpp, const RGWZoneGroup& zonegroup, const RGWZoneParams& zone_params)
{
if (explicit_objs) {
return;
}
- obj_iterator iter = obj_begin();
+ obj_iterator iter = obj_begin(dpp);
- while (iter != obj_end()) {
+ while (iter != obj_end(dpp)) {
RGWObjManifestPart& part = objs[iter.get_stripe_ofs()];
const rgw_obj_select& os = iter.get_location();
const rgw_raw_obj& raw_loc = os.get_raw_obj(zonegroup, zone_params);
prefix.clear();
}
-int RGWObjManifest::append_explicit(RGWObjManifest& m, const RGWZoneGroup& zonegroup, const RGWZoneParams& zone_params)
+int RGWObjManifest::append_explicit(const DoutPrefixProvider *dpp, RGWObjManifest& m, const RGWZoneGroup& zonegroup, const RGWZoneParams& zone_params)
{
if (!explicit_objs) {
- convert_to_explicit(zonegroup, zone_params);
+ convert_to_explicit(dpp, zonegroup, zone_params);
}
if (!m.explicit_objs) {
- m.convert_to_explicit(zonegroup, zone_params);
+ m.convert_to_explicit(dpp, zonegroup, zone_params);
}
map<uint64_t, RGWObjManifestPart>::iterator iter;
uint64_t base = obj_size;
/* are we still pointing at the head? */
if (ofs < head_size) {
rule_iter = manifest->rules.begin();
- RGWObjManifestRule *rule = &rule_iter->second;
+ const RGWObjManifestRule *rule = &rule_iter->second;
ofs = std::min(head_size, obj_size);
stripe_ofs = ofs;
cur_stripe = 1;
return;
}
- RGWObjManifestRule *rule = &rule_iter->second;
+ const RGWObjManifestRule *rule = &rule_iter->second;
stripe_ofs += rule->stripe_max_size;
cur_stripe++;
- dout(20) << "RGWObjManifest::operator++(): rule->part_size=" << rule->part_size << " rules.size()=" << manifest->rules.size() << dendl;
+ ldpp_dout(dpp, 20) << "RGWObjManifest::operator++(): rule->part_size=" << rule->part_size << " rules.size()=" << manifest->rules.size() << dendl;
if (rule->part_size > 0) {
/* multi part, multi stripes object */
- dout(20) << "RGWObjManifest::operator++(): stripe_ofs=" << stripe_ofs << " part_ofs=" << part_ofs << " rule->part_size=" << rule->part_size << dendl;
+ ldpp_dout(dpp, 20) << "RGWObjManifest::operator++(): stripe_ofs=" << stripe_ofs << " part_ofs=" << part_ofs << " rule->part_size=" << rule->part_size << dendl;
if (stripe_ofs >= part_ofs + rule->part_size) {
/* moved to the next part */
stripe_size = 0;
}
- dout(20) << "RGWObjManifest::operator++(): result: ofs=" << ofs << " stripe_ofs=" << stripe_ofs << " part_ofs=" << part_ofs << " rule->part_size=" << rule->part_size << dendl;
+ ldpp_dout(dpp, 20) << "RGWObjManifest::operator++(): result: ofs=" << ofs << " stripe_ofs=" << stripe_ofs << " part_ofs=" << part_ofs << " rule->part_size=" << rule->part_size << dendl;
update_location();
}
// Normal object which not generated through copy operation
manifest->set_tail_instance(_obj.key.instance);
- manifest->update_iterators();
-
return 0;
}
+void RGWObjManifest::obj_iterator::seek(uint64_t o)
+{
+ ofs = o;
+ if (manifest->explicit_objs) {
+ explicit_iter = manifest->objs.upper_bound(ofs);
+ if (explicit_iter != manifest->objs.begin()) {
+ --explicit_iter;
+ }
+ if (ofs < manifest->obj_size) {
+ update_explicit_pos();
+ } else {
+ ofs = manifest->obj_size;
+ }
+ update_location();
+ return;
+ }
+ if (o < manifest->get_head_size()) {
+ rule_iter = manifest->rules.begin();
+ stripe_ofs = 0;
+ stripe_size = manifest->get_head_size();
+ if (rule_iter != manifest->rules.end()) {
+ cur_part_id = rule_iter->second.start_part_num;
+ cur_override_prefix = rule_iter->second.override_prefix;
+ }
+ update_location();
+ return;
+ }
+
+ rule_iter = manifest->rules.upper_bound(ofs);
+ next_rule_iter = rule_iter;
+ if (rule_iter != manifest->rules.begin()) {
+ --rule_iter;
+ }
+
+ if (rule_iter == manifest->rules.end()) {
+ update_location();
+ return;
+ }
+
+ const RGWObjManifestRule& rule = rule_iter->second;
+
+ if (rule.part_size > 0) {
+ cur_part_id = rule.start_part_num + (ofs - rule.start_ofs) / rule.part_size;
+ } else {
+ cur_part_id = rule.start_part_num;
+ }
+ part_ofs = rule.start_ofs + (cur_part_id - rule.start_part_num) * rule.part_size;
+
+ if (rule.stripe_max_size > 0) {
+ cur_stripe = (ofs - part_ofs) / rule.stripe_max_size;
+
+ stripe_ofs = part_ofs + cur_stripe * rule.stripe_max_size;
+ if (!cur_part_id && manifest->get_head_size() > 0) {
+ cur_stripe++;
+ }
+ } else {
+ cur_stripe = 0;
+ stripe_ofs = part_ofs;
+ }
+
+ if (!rule.part_size) {
+ stripe_size = rule.stripe_max_size;
+ stripe_size = std::min(manifest->get_obj_size() - stripe_ofs, stripe_size);
+ } else {
+ uint64_t next = std::min(stripe_ofs + rule.stripe_max_size, part_ofs + rule.part_size);
+ stripe_size = next - stripe_ofs;
+ }
+
+ cur_override_prefix = rule.override_prefix;
+
+ update_location();
+}
+
+void RGWObjManifest::obj_iterator::update_location()
+{
+ if (manifest->explicit_objs) {
+ if (manifest->empty()) {
+ location = rgw_obj_select{};
+ } else {
+ location = explicit_iter->second.loc;
+ }
+ return;
+ }
+
+ if (ofs < manifest->get_head_size()) {
+ location = manifest->get_obj();
+ location.set_placement_rule(manifest->get_head_placement_rule());
+ return;
+ }
+
+ manifest->get_implicit_location(cur_part_id, cur_stripe, ofs, &cur_override_prefix, &location);
+}
+
+void RGWObjManifest::obj_iterator::update_explicit_pos()
+{
+ ofs = explicit_iter->first;
+ stripe_ofs = ofs;
+
+ auto next_iter = explicit_iter;
+ ++next_iter;
+ if (next_iter != manifest->objs.end()) {
+ stripe_size = next_iter->first - ofs;
+ } else {
+ stripe_size = manifest->obj_size - ofs;
+ }
+}
+
+void RGWObjManifest::get_implicit_location(uint64_t cur_part_id, uint64_t cur_stripe,
+ uint64_t ofs, string *override_prefix, rgw_obj_select *location) const
+{
+ rgw_obj loc;
+
+ string& oid = loc.key.name;
+ string& ns = loc.key.ns;
+
+ if (!override_prefix || override_prefix->empty()) {
+ oid = prefix;
+ } else {
+ oid = *override_prefix;
+ }
+
+ if (!cur_part_id) {
+ if (ofs < max_head_size) {
+ location->set_placement_rule(head_placement_rule);
+ *location = obj;
+ return;
+ } else {
+ char buf[16];
+ snprintf(buf, sizeof(buf), "%d", (int)cur_stripe);
+ oid += buf;
+ ns = RGW_OBJ_NS_SHADOW;
+ }
+ } else {
+ char buf[32];
+ if (cur_stripe == 0) {
+ snprintf(buf, sizeof(buf), ".%d", (int)cur_part_id);
+ oid += buf;
+ ns= RGW_OBJ_NS_MULTIPART;
+ } else {
+ snprintf(buf, sizeof(buf), ".%d_%d", (int)cur_part_id, (int)cur_stripe);
+ oid += buf;
+ ns = RGW_OBJ_NS_SHADOW;
+ }
+ }
+
+ if (!tail_placement.bucket.name.empty()) {
+ loc.bucket = tail_placement.bucket;
+ } else {
+ loc.bucket = obj.bucket;
+ }
+
+ // Always overwrite instance with tail_instance
+ // to get the right shadow object location
+ loc.key.set_instance(tail_instance);
+
+ location->set_placement_rule(tail_placement.placement_rule);
+ *location = loc;
+}
string tail_instance; /* tail object's instance */
- void convert_to_explicit(const RGWZoneGroup& zonegroup, const RGWZoneParams& zone_params);
- int append_explicit(RGWObjManifest& m, const RGWZoneGroup& zonegroup, const RGWZoneParams& zone_params);
+ void convert_to_explicit(const DoutPrefixProvider *dpp, const RGWZoneGroup& zonegroup, const RGWZoneParams& zone_params);
+ int append_explicit(const DoutPrefixProvider *dpp, RGWObjManifest& m, const RGWZoneGroup& zonegroup, const RGWZoneParams& zone_params);
void append_rules(RGWObjManifest& m, map<uint64_t, RGWObjManifestRule>::iterator& iter, string *override_prefix);
- void update_iterators() {
- begin_iter.seek(0);
- end_iter.seek(obj_size);
- }
public:
- RGWObjManifest() : begin_iter(this), end_iter(this) {}
+ RGWObjManifest() = default;
RGWObjManifest(const RGWObjManifest& rhs) {
*this = rhs;
}
tail_placement = rhs.tail_placement;
rules = rhs.rules;
tail_instance = rhs.tail_instance;
-
- begin_iter.set_manifest(this);
- end_iter.set_manifest(this);
-
- begin_iter.seek(rhs.begin_iter.get_ofs());
- end_iter.seek(rhs.end_iter.get_ofs());
-
return *this;
}
set_obj_size(_size);
}
- void get_implicit_location(uint64_t cur_part_id, uint64_t cur_stripe, uint64_t ofs, string *override_prefix, rgw_obj_select *location);
+ void get_implicit_location(uint64_t cur_part_id, uint64_t cur_stripe, uint64_t ofs,
+ string *override_prefix, rgw_obj_select *location) const;
void set_trivial_rule(uint64_t tail_ofs, uint64_t stripe_max_size) {
RGWObjManifestRule rule(0, tail_ofs, 0, stripe_max_size);
decode(tail_placement.placement_rule, bl);
}
- update_iterators();
DECODE_FINISH(bl);
}
void dump(Formatter *f) const;
static void generate_test_instances(list<RGWObjManifest*>& o);
- int append(RGWObjManifest& m, const RGWZoneGroup& zonegroup,
+ int append(const DoutPrefixProvider *dpp, RGWObjManifest& m, const RGWZoneGroup& zonegroup,
const RGWZoneParams& zone_params);
- int append(RGWObjManifest& m, RGWSI_Zone *zone_svc);
+ int append(const DoutPrefixProvider *dpp, RGWObjManifest& m, RGWSI_Zone *zone_svc);
bool get_rule(uint64_t ofs, RGWObjManifestRule *rule);
- bool empty() {
+ bool empty() const {
if (explicit_objs)
return objs.empty();
return rules.empty();
}
- bool has_explicit_objs() {
+ bool has_explicit_objs() const {
return explicit_objs;
}
- bool has_tail() {
+ bool has_tail() const {
if (explicit_objs) {
if (objs.size() == 1) {
- map<uint64_t, RGWObjManifestPart>::iterator iter = objs.begin();
- rgw_obj& o = iter->second.loc;
+ auto iter = objs.begin();
+ const rgw_obj& o = iter->second.loc;
return !(obj == o);
}
return (objs.size() >= 2);
}
}
- const rgw_obj& get_obj() {
+ const rgw_obj& get_obj() const {
return obj;
}
tail_placement.bucket = _b;
}
- const rgw_bucket_placement& get_tail_placement() {
+ const rgw_bucket_placement& get_tail_placement() const {
return tail_placement;
}
- const rgw_placement_rule& get_head_placement_rule() {
+ const rgw_placement_rule& get_head_placement_rule() const {
return head_placement_rule;
}
prefix = _p;
}
- const string& get_prefix() {
+ const string& get_prefix() const {
return prefix;
}
tail_instance = _ti;
}
- const string& get_tail_instance() {
+ const string& get_tail_instance() const {
return tail_instance;
}
void set_obj_size(uint64_t s) {
obj_size = s;
-
- update_iterators();
}
- uint64_t get_obj_size() {
+ uint64_t get_obj_size() const {
return obj_size;
}
- uint64_t get_head_size() {
+ uint64_t get_head_size() const {
return head_size;
}
- uint64_t get_max_head_size() {
+ uint64_t get_max_head_size() const {
return max_head_size;
}
class obj_iterator {
- RGWObjManifest *manifest = nullptr;
+ const DoutPrefixProvider *dpp;
+ const RGWObjManifest *manifest = nullptr;
uint64_t part_ofs = 0; /* where current part starts */
uint64_t stripe_ofs = 0; /* where current stripe starts */
uint64_t ofs = 0; /* current position within the object */
rgw_obj_select location;
- map<uint64_t, RGWObjManifestRule>::iterator rule_iter;
- map<uint64_t, RGWObjManifestRule>::iterator next_rule_iter;
-
- map<uint64_t, RGWObjManifestPart>::iterator explicit_iter;
+ map<uint64_t, RGWObjManifestRule>::const_iterator rule_iter;
+ map<uint64_t, RGWObjManifestRule>::const_iterator next_rule_iter;
+ map<uint64_t, RGWObjManifestPart>::const_iterator explicit_iter;
void update_explicit_pos();
-
- protected:
-
- void set_manifest(RGWObjManifest *m) {
- manifest = m;
- }
-
public:
obj_iterator() = default;
- explicit obj_iterator(RGWObjManifest *_m)
- : obj_iterator(_m, 0)
+ explicit obj_iterator(const DoutPrefixProvider *_dpp, const RGWObjManifest *_m)
+ : obj_iterator(_dpp, _m, 0)
{}
- obj_iterator(RGWObjManifest *_m, uint64_t _ofs) : manifest(_m) {
+ obj_iterator(const DoutPrefixProvider *_dpp, const RGWObjManifest *_m, uint64_t _ofs) : dpp(_dpp), manifest(_m) {
seek(_ofs);
}
void seek(uint64_t ofs);
void update_location();
- friend class RGWObjManifest;
void dump(Formatter *f) const;
}; // class obj_iterator
- const obj_iterator& obj_begin();
- const obj_iterator& obj_end();
- obj_iterator obj_find(uint64_t ofs);
-
- obj_iterator begin_iter;
- obj_iterator end_iter;
+ obj_iterator obj_begin(const DoutPrefixProvider *dpp) const { return obj_iterator{dpp, this}; }
+ obj_iterator obj_end(const DoutPrefixProvider *dpp) const { return obj_iterator{dpp, this, obj_size}; }
+ obj_iterator obj_find(const DoutPrefixProvider *dpp, uint64_t ofs) const {
+ return obj_iterator{dpp, this, std::min(ofs, obj_size)};
+ }
/*
* simple object generator. Using a simple single rule manifest.
common_init_finish(g_ceph_context);
- store = RGWStoreManager::get_storage(g_ceph_context, false, false, false, false, false);
+ const DoutPrefix dp(cct.get(), dout_subsys, "rgw object expirer: ");
+ store = RGWStoreManager::get_storage(&dp, g_ceph_context, false, false, false, false, false);
if (!store) {
std::cerr << "couldn't init storage provider" << std::endl;
return EIO;
return 0;
}
-int RGWObjExpStore::objexp_hint_add(const ceph::real_time& delete_at,
+int RGWObjExpStore::objexp_hint_add(const DoutPrefixProvider *dpp,
+ const ceph::real_time& delete_at,
const string& tenant_name,
const string& bucket_name,
const string& bucket_id,
string shard_name = objexp_hint_get_shardname(objexp_key_shard(obj_key, cct->_conf->rgw_objexp_hints_num_shards));
auto obj = rados_svc->obj(rgw_raw_obj(zone_svc->get_zone_params().log_pool, shard_name));
- int r = obj.open();
+ int r = obj.open(dpp);
if (r < 0) {
- ldout(cct, 0) << "ERROR: " << __func__ << "(): failed to open obj=" << obj << " (r=" << r << ")" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: " << __func__ << "(): failed to open obj=" << obj << " (r=" << r << ")" << dendl;
return r;
}
- return obj.operate(&op, null_yield);
+ return obj.operate(dpp, &op, null_yield);
}
-int RGWObjExpStore::objexp_hint_list(const string& oid,
+int RGWObjExpStore::objexp_hint_list(const DoutPrefixProvider *dpp,
+ const string& oid,
const ceph::real_time& start_time,
const ceph::real_time& end_time,
const int max_entries,
out_marker, truncated);
auto obj = rados_svc->obj(rgw_raw_obj(zone_svc->get_zone_params().log_pool, oid));
- int r = obj.open();
+ int r = obj.open(dpp);
if (r < 0) {
- ldout(cct, 0) << "ERROR: " << __func__ << "(): failed to open obj=" << obj << " (r=" << r << ")" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: " << __func__ << "(): failed to open obj=" << obj << " (r=" << r << ")" << dendl;
return r;
}
bufferlist obl;
- int ret = obj.operate(&op, &obl, null_yield);
+ int ret = obj.operate(dpp, &op, &obl, null_yield);
if ((ret < 0 ) && (ret != -ENOENT)) {
return ret;
return 0;
}
-static int cls_timeindex_trim_repeat(rgw_rados_ref ref,
+static int cls_timeindex_trim_repeat(const DoutPrefixProvider *dpp,
+ rgw_rados_ref ref,
const string& oid,
const utime_t& from_time,
const utime_t& to_time,
do {
librados::ObjectWriteOperation op;
cls_timeindex_trim(op, from_time, to_time, from_marker, to_marker);
- int r = rgw_rados_operate(ref.pool.ioctx(), oid, &op, null_yield);
+ int r = rgw_rados_operate(dpp, ref.pool.ioctx(), oid, &op, null_yield);
if (r == -ENODATA)
done = true;
else if (r < 0)
return 0;
}
-int RGWObjExpStore::objexp_hint_trim(const string& oid,
+int RGWObjExpStore::objexp_hint_trim(const DoutPrefixProvider *dpp,
+ const string& oid,
const ceph::real_time& start_time,
const ceph::real_time& end_time,
const string& from_marker,
const string& to_marker)
{
auto obj = rados_svc->obj(rgw_raw_obj(zone_svc->get_zone_params().log_pool, oid));
- int r = obj.open();
+ int r = obj.open(dpp);
if (r < 0) {
- ldout(cct, 0) << "ERROR: " << __func__ << "(): failed to open obj=" << obj << " (r=" << r << ")" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: " << __func__ << "(): failed to open obj=" << obj << " (r=" << r << ")" << dendl;
return r;
}
auto& ref = obj.get_ref();
- int ret = cls_timeindex_trim_repeat(ref, oid, utime_t(start_time), utime_t(end_time),
+ int ret = cls_timeindex_trim_repeat(dpp, ref, oid, utime_t(start_time), utime_t(end_time),
from_marker, to_marker);
if ((ret < 0 ) && (ret != -ENOENT)) {
return ret;
}
-int RGWObjectExpirer::garbage_single_object(objexp_hint_entry& hint)
+int RGWObjectExpirer::garbage_single_object(const DoutPrefixProvider *dpp, objexp_hint_entry& hint)
{
RGWBucketInfo bucket_info;
int ret = init_bucket_info(hint.tenant, hint.bucket_name,
hint.bucket_id, bucket_info);
if (-ENOENT == ret) {
- ldout(store->ctx(), 15) << "NOTICE: cannot find bucket = " \
+ ldpp_dout(dpp, 15) << "NOTICE: cannot find bucket = " \
<< hint.bucket_name << ". The object must be already removed" << dendl;
return -ERR_PRECONDITION_FAILED;
} else if (ret < 0) {
- ldout(store->ctx(), 1) << "ERROR: could not init bucket = " \
+ ldpp_dout(dpp, 1) << "ERROR: could not init bucket = " \
<< hint.bucket_name << "due to ret = " << ret << dendl;
return ret;
}
rgw_obj obj(bucket_info.bucket, key);
store->getRados()->set_atomic(&rctx, obj);
- ret = store->getRados()->delete_obj(rctx, bucket_info, obj,
+ ret = store->getRados()->delete_obj(dpp, rctx, bucket_info, obj,
bucket_info.versioning_status(), 0, hint.exp_time);
return ret;
}
-void RGWObjectExpirer::garbage_chunk(list<cls_timeindex_entry>& entries, /* in */
+void RGWObjectExpirer::garbage_chunk(const DoutPrefixProvider *dpp,
+ list<cls_timeindex_entry>& entries, /* in */
bool& need_trim) /* out */
{
need_trim = false;
++iter)
{
objexp_hint_entry hint;
- ldout(store->ctx(), 15) << "got removal hint for: " << iter->key_ts.sec() \
+ ldpp_dout(dpp, 15) << "got removal hint for: " << iter->key_ts.sec() \
<< " - " << iter->key_ext << dendl;
int ret = objexp_hint_parse(store->getRados()->ctx(), *iter, &hint);
if (ret < 0) {
- ldout(store->ctx(), 1) << "cannot parse removal hint for " << hint.obj_key << dendl;
+ ldpp_dout(dpp, 1) << "cannot parse removal hint for " << hint.obj_key << dendl;
continue;
}
/* PRECOND_FAILED simply means that our hint is not valid.
* We can silently ignore that and move forward. */
- ret = garbage_single_object(hint);
+ ret = garbage_single_object(dpp, hint);
if (ret == -ERR_PRECONDITION_FAILED) {
- ldout(store->ctx(), 15) << "not actual hint for object: " << hint.obj_key << dendl;
+ ldpp_dout(dpp, 15) << "not actual hint for object: " << hint.obj_key << dendl;
} else if (ret < 0) {
- ldout(store->ctx(), 1) << "cannot remove expired object: " << hint.obj_key << dendl;
+ ldpp_dout(dpp, 1) << "cannot remove expired object: " << hint.obj_key << dendl;
}
need_trim = true;
return;
}
-void RGWObjectExpirer::trim_chunk(const string& shard,
+void RGWObjectExpirer::trim_chunk(const DoutPrefixProvider *dpp,
+ const string& shard,
const utime_t& from,
const utime_t& to,
const string& from_marker,
const string& to_marker)
{
- ldout(store->ctx(), 20) << "trying to trim removal hints to=" << to
+ ldpp_dout(dpp, 20) << "trying to trim removal hints to=" << to
<< ", to_marker=" << to_marker << dendl;
real_time rt_from = from.to_real_time();
real_time rt_to = to.to_real_time();
- int ret = exp_store.objexp_hint_trim(shard, rt_from, rt_to,
+ int ret = exp_store.objexp_hint_trim(dpp, shard, rt_from, rt_to,
from_marker, to_marker);
if (ret < 0) {
- ldout(store->ctx(), 0) << "ERROR during trim: " << ret << dendl;
+ ldpp_dout(dpp, 0) << "ERROR during trim: " << ret << dendl;
}
return;
}
-bool RGWObjectExpirer::process_single_shard(const string& shard,
+bool RGWObjectExpirer::process_single_shard(const DoutPrefixProvider *dpp,
+ const string& shard,
const utime_t& last_run,
const utime_t& round_start)
{
int ret = l.lock_exclusive(&store->getRados()->objexp_pool_ctx, shard);
if (ret == -EBUSY) { /* already locked by another processor */
- dout(5) << __func__ << "(): failed to acquire lock on " << shard << dendl;
+ ldpp_dout(dpp, 5) << __func__ << "(): failed to acquire lock on " << shard << dendl;
return false;
}
real_time rt_start = round_start.to_real_time();
list<cls_timeindex_entry> entries;
- ret = exp_store.objexp_hint_list(shard, rt_last, rt_start,
+ ret = exp_store.objexp_hint_list(dpp, shard, rt_last, rt_start,
num_entries, marker, entries,
&out_marker, &truncated);
if (ret < 0) {
- ldout(cct, 10) << "cannot get removal hints from shard: " << shard
+ ldpp_dout(dpp, 10) << "cannot get removal hints from shard: " << shard
<< dendl;
continue;
}
bool need_trim;
- garbage_chunk(entries, need_trim);
+ garbage_chunk(dpp, entries, need_trim);
if (need_trim) {
- trim_chunk(shard, last_run, round_start, marker, out_marker);
+ trim_chunk(dpp, shard, last_run, round_start, marker, out_marker);
}
utime_t now = ceph_clock_now();
}
/* Returns true if all shards have been processed successfully. */
-bool RGWObjectExpirer::inspect_all_shards(const utime_t& last_run,
+bool RGWObjectExpirer::inspect_all_shards(const DoutPrefixProvider *dpp,
+ const utime_t& last_run,
const utime_t& round_start)
{
CephContext * const cct = store->ctx();
string shard;
objexp_get_shard(i, &shard);
- ldout(store->ctx(), 20) << "processing shard = " << shard << dendl;
+ ldpp_dout(dpp, 20) << "processing shard = " << shard << dendl;
- if (! process_single_shard(shard, last_run, round_start)) {
+ if (! process_single_shard(dpp, shard, last_run, round_start)) {
all_done = false;
}
}
do {
utime_t start = ceph_clock_now();
ldout(cct, 2) << "object expiration: start" << dendl;
- if (oe->inspect_all_shards(last_run, start)) {
+ if (oe->inspect_all_shards(this, last_run, start)) {
/* All shards have been processed properly. Next time we can start
* from this moment. */
last_run = start;
cond.notify_all();
}
+CephContext *RGWObjectExpirer::OEWorker::get_cct() const
+{
+ return cct;
+}
+
+unsigned RGWObjectExpirer::OEWorker::get_subsys() const
+{
+ return dout_subsys;
+}
+
+std::ostream& RGWObjectExpirer::OEWorker::gen_prefix(std::ostream& out) const
+{
+ return out << "rgw object expirer Worker thread: ";
+}
rados_svc(_rados_svc),
zone_svc(_zone_svc) {}
- int objexp_hint_add(const ceph::real_time& delete_at,
+ int objexp_hint_add(const DoutPrefixProvider *dpp,
+ const ceph::real_time& delete_at,
const string& tenant_name,
const string& bucket_name,
const string& bucket_id,
const rgw_obj_index_key& obj_key);
- int objexp_hint_list(const string& oid,
+ int objexp_hint_list(const DoutPrefixProvider *dpp,
+ const string& oid,
const ceph::real_time& start_time,
const ceph::real_time& end_time,
const int max_entries,
string *out_marker, /* out */
bool *truncated); /* out */
- int objexp_hint_trim(const string& oid,
+ int objexp_hint_trim(const DoutPrefixProvider *dpp,
+ const string& oid,
const ceph::real_time& start_time,
const ceph::real_time& end_time,
const string& from_marker,
const std::string& bucket_id,
RGWBucketInfo& bucket_info);
- class OEWorker : public Thread {
+ class OEWorker : public Thread, public DoutPrefixProvider {
CephContext *cct;
RGWObjectExpirer *oe;
ceph::mutex lock = ceph::make_mutex("OEWorker");
void *entry() override;
void stop();
+
+ CephContext *get_cct() const override;
+ unsigned get_subsys() const;
+ std::ostream& gen_prefix(std::ostream& out) const;
};
OEWorker *worker{nullptr};
stop_processor();
}
- int hint_add(const ceph::real_time& delete_at,
+ int hint_add(const DoutPrefixProvider *dpp,
+ const ceph::real_time& delete_at,
const string& tenant_name,
const string& bucket_name,
const string& bucket_id,
const rgw_obj_index_key& obj_key) {
- return exp_store.objexp_hint_add(delete_at, tenant_name, bucket_name,
+ return exp_store.objexp_hint_add(dpp, delete_at, tenant_name, bucket_name,
bucket_id, obj_key);
}
- int garbage_single_object(objexp_hint_entry& hint);
+ int garbage_single_object(const DoutPrefixProvider *dpp, objexp_hint_entry& hint);
- void garbage_chunk(std::list<cls_timeindex_entry>& entries, /* in */
+ void garbage_chunk(const DoutPrefixProvider *dpp,
+ std::list<cls_timeindex_entry>& entries, /* in */
bool& need_trim); /* out */
- void trim_chunk(const std::string& shard,
+ void trim_chunk(const DoutPrefixProvider *dpp,
+ const std::string& shard,
const utime_t& from,
const utime_t& to,
const string& from_marker,
const string& to_marker);
- bool process_single_shard(const std::string& shard,
+ bool process_single_shard(const DoutPrefixProvider *dpp,
+ const std::string& shard,
const utime_t& last_run,
const utime_t& round_start);
- bool inspect_all_shards(const utime_t& last_run,
+ bool inspect_all_shards(const DoutPrefixProvider *dpp,
+ const utime_t& last_run,
const utime_t& round_start);
bool going_down();
const string RGWOIDCProvider::oidc_url_oid_prefix = "oidc_url.";
const string RGWOIDCProvider::oidc_arn_prefix = "arn:aws:iam::";
-int RGWOIDCProvider::store_url(const string& url, bool exclusive,
+int RGWOIDCProvider::store_url(const DoutPrefixProvider *dpp, const string& url, bool exclusive,
optional_yield y)
{
using ceph::encode;
bufferlist bl;
encode(*this, bl);
auto obj_ctx = svc->sysobj->init_obj_ctx();
- return rgw_put_system_obj(obj_ctx, svc->zone->get_zone_params().oidc_pool, oid,
+ return rgw_put_system_obj(dpp, obj_ctx, svc->zone->get_zone_params().oidc_pool, oid,
bl, exclusive, NULL, real_time(), y);
}
return 0;
}
-int RGWOIDCProvider::create(bool exclusive, optional_yield y)
+int RGWOIDCProvider::create(const DoutPrefixProvider *dpp, bool exclusive, optional_yield y)
{
int ret;
string idp_url = url_remove_prefix(provider_url);
/* check to see the name is not used */
- ret = read_url(idp_url, tenant);
+ ret = read_url(dpp, idp_url, tenant);
if (exclusive && ret == 0) {
- ldout(cct, 0) << "ERROR: url " << provider_url << " already in use"
+ ldpp_dout(dpp, 0) << "ERROR: url " << provider_url << " already in use"
<< id << dendl;
return -EEXIST;
} else if ( ret < 0 && ret != -ENOENT) {
- ldout(cct, 0) << "failed reading provider url " << provider_url << ": "
+ ldpp_dout(dpp, 0) << "failed reading provider url " << provider_url << ": "
<< cpp_strerror(-ret) << dendl;
return ret;
}
auto svc = ctl->svc;
auto& pool = svc->zone->get_zone_params().oidc_pool;
- ret = store_url(idp_url, exclusive, y);
+ ret = store_url(dpp, idp_url, exclusive, y);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: storing role info in pool: " << pool.name << ": "
+ ldpp_dout(dpp, 0) << "ERROR: storing role info in pool: " << pool.name << ": "
<< provider_url << ": " << cpp_strerror(-ret) << dendl;
return ret;
}
return 0;
}
-int RGWOIDCProvider::delete_obj(optional_yield y)
+int RGWOIDCProvider::delete_obj(const DoutPrefixProvider *dpp, optional_yield y)
{
auto svc = ctl->svc;
auto& pool = svc->zone->get_zone_params().oidc_pool;
string url, tenant;
auto ret = get_tenant_url_from_arn(tenant, url);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: failed to parse arn" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to parse arn" << dendl;
return -EINVAL;
}
if (this->tenant != tenant) {
- ldout(cct, 0) << "ERROR: tenant in arn doesn't match that of user " << this->tenant << ", "
+ ldpp_dout(dpp, 0) << "ERROR: tenant in arn doesn't match that of user " << this->tenant << ", "
<< tenant << ": " << dendl;
return -EINVAL;
}
// Delete url
string oid = tenant + get_url_oid_prefix() + url;
- ret = rgw_delete_system_obj(svc->sysobj, pool, oid, NULL, y);
+ ret = rgw_delete_system_obj(dpp, svc->sysobj, pool, oid, NULL, y);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: deleting oidc url from pool: " << pool.name << ": "
+ ldpp_dout(dpp, 0) << "ERROR: deleting oidc url from pool: " << pool.name << ": "
<< provider_url << ": " << cpp_strerror(-ret) << dendl;
}
return ret;
}
-int RGWOIDCProvider::get()
+int RGWOIDCProvider::get(const DoutPrefixProvider *dpp)
{
string url, tenant;
auto ret = get_tenant_url_from_arn(tenant, url);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: failed to parse arn" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to parse arn" << dendl;
return -EINVAL;
}
if (this->tenant != tenant) {
- ldout(cct, 0) << "ERROR: tenant in arn doesn't match that of user " << this->tenant << ", "
+ ldpp_dout(dpp, 0) << "ERROR: tenant in arn doesn't match that of user " << this->tenant << ", "
<< tenant << ": " << dendl;
return -EINVAL;
}
- ret = read_url(url, tenant);
+ ret = read_url(dpp, url, tenant);
if (ret < 0) {
return ret;
}
JSONDecoder::decode_json("OpenIDConnectProviderArn", arn, obj);
}
-int RGWOIDCProvider::read_url(const string& url, const string& tenant)
+int RGWOIDCProvider::read_url(const DoutPrefixProvider *dpp, const string& url, const string& tenant)
{
auto svc = ctl->svc;
auto& pool = svc->zone->get_zone_params().oidc_pool;
bufferlist bl;
auto obj_ctx = svc->sysobj->init_obj_ctx();
- int ret = rgw_get_system_obj(obj_ctx, pool, oid, bl, NULL, NULL, null_yield);
+ int ret = rgw_get_system_obj(obj_ctx, pool, oid, bl, NULL, NULL, null_yield, dpp);
if (ret < 0) {
return ret;
}
auto iter = bl.cbegin();
decode(*this, iter);
} catch (buffer::error& err) {
- ldout(cct, 0) << "ERROR: failed to decode oidc provider info from pool: " << pool.name <<
+ ldpp_dout(dpp, 0) << "ERROR: failed to decode oidc provider info from pool: " << pool.name <<
": " << url << dendl;
return -EIO;
}
return true;
}
-int RGWOIDCProvider::get_providers(RGWRados *store,
+int RGWOIDCProvider::get_providers(const DoutPrefixProvider *dpp, RGWRados *store,
const string& tenant,
vector<RGWOIDCProvider>& providers)
{
RGWListRawObjsCtx ctx;
do {
list<string> oids;
- int r = store->list_raw_objects(pool, prefix, 1000, ctx, oids, &is_truncated);
+ int r = store->list_raw_objects(dpp, pool, prefix, 1000, ctx, oids, &is_truncated);
if (r < 0) {
- ldout(ctl->cct, 0) << "ERROR: listing filtered objects failed: " << pool.name << ": "
+ ldpp_dout(dpp, 0) << "ERROR: listing filtered objects failed: " << pool.name << ": "
<< prefix << ": " << cpp_strerror(-r) << dendl;
return r;
}
bufferlist bl;
auto obj_ctx = svc->sysobj->init_obj_ctx();
- int ret = rgw_get_system_obj(obj_ctx, pool, iter, bl, NULL, NULL, null_yield);
+ int ret = rgw_get_system_obj(obj_ctx, pool, iter, bl, NULL, NULL, null_yield, dpp);
if (ret < 0) {
return ret;
}
auto iter = bl.cbegin();
decode(provider, iter);
} catch (buffer::error& err) {
- ldout(ctl->cct, 0) << "ERROR: failed to decode oidc provider info from pool: " << pool.name <<
+ ldpp_dout(dpp, 0) << "ERROR: failed to decode oidc provider info from pool: " << pool.name <<
": " << iter << dendl;
return -EIO;
}
vector<string> thumbprints;
int get_tenant_url_from_arn(string& tenant, string& url);
- int store_url(const string& url, bool exclusive, optional_yield y);
- int read_url(const string& url, const string& tenant);
+ int store_url(const DoutPrefixProvider *dpp, const string& url, bool exclusive, optional_yield y);
+ int read_url(const DoutPrefixProvider *dpp, const string& url, const string& tenant);
bool validate_input();
public:
const vector<string>& get_client_ids() const { return client_ids;}
const vector<string>& get_thumbprints() const { return thumbprints; }
- int create(bool exclusive, optional_yield y);
- int delete_obj(optional_yield y);
- int get();
+ int create(const DoutPrefixProvider *dpp, bool exclusive, optional_yield y);
+ int delete_obj(const DoutPrefixProvider *dpp, optional_yield y);
+ int get(const DoutPrefixProvider *dpp);
void dump(Formatter *f) const;
void dump_all(Formatter *f) const;
void decode_json(JSONObj *obj);
static const string& get_url_oid_prefix();
- static int get_providers(RGWRados *store,
+ static int get_providers(const DoutPrefixProvider *dpp, RGWRados *store,
const string& tenant,
vector<RGWOIDCProvider>& providers);
};
return r;
}
-static int decode_policy(CephContext *cct,
+static int decode_policy(const DoutPrefixProvider *dpp,
+ CephContext *cct,
bufferlist& bl,
RGWAccessControlPolicy *policy)
{
try {
policy->decode(iter);
} catch (buffer::error& err) {
- ldout(cct, 0) << "ERROR: could not decode policy, caught buffer::error" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: could not decode policy, caught buffer::error" << dendl;
return -EIO;
}
if (cct->_conf->subsys.should_gather<ceph_subsys_rgw, 15>()) {
- ldout(cct, 15) << __func__ << " Read AccessControlPolicy";
+ ldpp_dout(dpp, 15) << __func__ << " Read AccessControlPolicy";
RGWAccessControlPolicy_S3 *s3policy = static_cast<RGWAccessControlPolicy_S3 *>(policy);
s3policy->to_xml(*_dout);
*_dout << dendl;
}
-static int get_user_policy_from_attr(CephContext * const cct,
+static int get_user_policy_from_attr(const DoutPrefixProvider *dpp,
+ CephContext * const cct,
rgw::sal::RGWRadosStore * const store,
map<string, bufferlist>& attrs,
RGWAccessControlPolicy& policy /* out */)
{
auto aiter = attrs.find(RGW_ATTR_ACL);
if (aiter != attrs.end()) {
- int ret = decode_policy(cct, aiter->second, &policy);
+ int ret = decode_policy(dpp, cct, aiter->second, &policy);
if (ret < 0) {
return ret;
}
* object: name of the object to get the ACL for.
* Returns: 0 on success, -ERR# otherwise.
*/
-int rgw_op_get_bucket_policy_from_attr(CephContext *cct,
+int rgw_op_get_bucket_policy_from_attr(const DoutPrefixProvider *dpp,
+ CephContext *cct,
rgw::sal::RGWStore *store,
RGWBucketInfo& bucket_info,
map<string, bufferlist>& bucket_attrs,
map<string, bufferlist>::iterator aiter = bucket_attrs.find(RGW_ATTR_ACL);
if (aiter != bucket_attrs.end()) {
- int ret = decode_policy(cct, aiter->second, policy);
+ int ret = decode_policy(dpp, cct, aiter->second, policy);
if (ret < 0)
return ret;
} else {
- ldout(cct, 0) << "WARNING: couldn't find acl header for bucket, generating default" << dendl;
+ ldpp_dout(dpp, 0) << "WARNING: couldn't find acl header for bucket, generating default" << dendl;
std::unique_ptr<rgw::sal::RGWUser> user = store->get_user(bucket_info.owner);
/* object exists, but policy is broken */
- int r = user->load_by_id(y);
+ int r = user->load_by_id(dpp, y);
if (r < 0)
return r;
return 0;
}
-static int get_obj_policy_from_attr(CephContext *cct,
+static int get_obj_policy_from_attr(const DoutPrefixProvider *dpp,
+ CephContext *cct,
rgw::sal::RGWStore *store,
RGWObjectCtx& obj_ctx,
RGWBucketInfo& bucket_info,
std::unique_ptr<rgw::sal::RGWObject::ReadOp> rop = obj->get_read_op(&obj_ctx);
- ret = rop->get_attr(RGW_ATTR_ACL, bl, y);
+ ret = rop->get_attr(dpp, RGW_ATTR_ACL, bl, y);
if (ret >= 0) {
- ret = decode_policy(cct, bl, policy);
+ ret = decode_policy(dpp, cct, bl, policy);
if (ret < 0)
return ret;
} else if (ret == -ENODATA) {
/* object exists, but policy is broken */
- ldout(cct, 0) << "WARNING: couldn't find acl header for object, generating default" << dendl;
+ ldpp_dout(dpp, 0) << "WARNING: couldn't find acl header for object, generating default" << dendl;
std::unique_ptr<rgw::sal::RGWUser> user = store->get_user(bucket_info.owner);
- ret = user->load_by_id(y);
+ ret = user->load_by_id(dpp, y);
if (ret < 0)
return ret;
if (storage_class) {
bufferlist scbl;
- int r = rop->get_attr(RGW_ATTR_STORAGE_CLASS, scbl, y);
+ int r = rop->get_attr(dpp, RGW_ATTR_STORAGE_CLASS, scbl, y);
if (r >= 0) {
*storage_class = scbl.to_str();
} else {
return policies;
}
-static int get_obj_head(struct req_state *s,
+static int get_obj_head(const DoutPrefixProvider *dpp,
+ struct req_state *s,
rgw::sal::RGWObject* obj,
bufferlist *pbl)
{
std::unique_ptr<rgw::sal::RGWObject::ReadOp> read_op = obj->get_read_op(s->obj_ctx);
obj->set_prefetch_data(s->obj_ctx);
- int ret = read_op->prepare(s->yield);
+ int ret = read_op->prepare(s->yield, dpp);
if (ret < 0) {
return ret;
}
return 0;
}
- ret = read_op->read(0, s->cct->_conf->rgw_max_chunk_size, *pbl, s->yield);
+ ret = read_op->read(0, s->cct->_conf->rgw_max_chunk_size, *pbl, s->yield, dpp);
return 0;
}
};
WRITE_CLASS_ENCODER(multipart_upload_info)
-static int get_multipart_info(struct req_state *s,
+static int get_multipart_info(const DoutPrefixProvider *dpp, struct req_state *s,
rgw::sal::RGWObject* obj,
multipart_upload_info *upload_info)
{
bufferlist headbl;
bufferlist *pheadbl = (upload_info ? &headbl : nullptr);
- int op_ret = get_obj_head(s, obj, pheadbl);
+ int op_ret = get_obj_head(dpp, s, obj, pheadbl);
if (op_ret < 0) {
if (op_ret == -ENOENT) {
return -ERR_NO_SUCH_UPLOAD;
return 0;
}
-static int get_multipart_info(struct req_state *s,
+static int get_multipart_info(const DoutPrefixProvider *dpp, struct req_state *s,
const string& meta_oid,
multipart_upload_info *upload_info)
{
meta_obj = s->bucket->get_object(rgw_obj_key(meta_oid, string(), mp_ns));
meta_obj->set_in_extra_data(true);
- return get_multipart_info(s, meta_obj.get(), upload_info);
+ return get_multipart_info(dpp, s, meta_obj.get(), upload_info);
}
-static int read_bucket_policy(rgw::sal::RGWStore *store,
+static int read_bucket_policy(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWStore *store,
struct req_state *s,
RGWBucketInfo& bucket_info,
map<string, bufferlist>& bucket_attrs,
optional_yield y)
{
if (!s->system_request && bucket_info.flags & BUCKET_SUSPENDED) {
- ldpp_dout(s, 0) << "NOTICE: bucket " << bucket_info.bucket.name
+ ldpp_dout(dpp, 0) << "NOTICE: bucket " << bucket_info.bucket.name
<< " is suspended" << dendl;
return -ERR_USER_SUSPENDED;
}
return 0;
}
- int ret = rgw_op_get_bucket_policy_from_attr(s->cct, store, bucket_info, bucket_attrs, policy, y);
+ int ret = rgw_op_get_bucket_policy_from_attr(dpp, s->cct, store, bucket_info, bucket_attrs, policy, y);
if (ret == -ENOENT) {
ret = -ERR_NO_SUCH_BUCKET;
}
return ret;
}
-static int read_obj_policy(rgw::sal::RGWStore *store,
+static int read_obj_policy(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWStore *store,
struct req_state *s,
RGWBucketInfo& bucket_info,
map<string, bufferlist>& bucket_attrs,
rgw_obj obj;
if (!s->system_request && bucket_info.flags & BUCKET_SUSPENDED) {
- ldpp_dout(s, 0) << "NOTICE: bucket " << bucket_info.bucket.name
+ ldpp_dout(dpp, 0) << "NOTICE: bucket " << bucket_info.bucket.name
<< " is suspended" << dendl;
return -ERR_USER_SUSPENDED;
}
policy = get_iam_policy_from_attr(s->cct, bucket_attrs, bucket->get_tenant());
RGWObjectCtx *obj_ctx = static_cast<RGWObjectCtx *>(s->obj_ctx);
- int ret = get_obj_policy_from_attr(s->cct, store, *obj_ctx,
+ int ret = get_obj_policy_from_attr(dpp, s->cct, store, *obj_ctx,
bucket_info, bucket_attrs, acl, storage_class, object, s->yield);
if (ret == -ENOENT) {
/* object does not exist checking the bucket's ACL to make sure
that we send a proper error code */
RGWAccessControlPolicy bucket_policy(s->cct);
- ret = rgw_op_get_bucket_policy_from_attr(s->cct, store, bucket_info, bucket_attrs, &bucket_policy, y);
+ ret = rgw_op_get_bucket_policy_from_attr(dpp, s->cct, store, bucket_info, bucket_attrs, &bucket_policy, y);
if (ret < 0) {
return ret;
}
* only_bucket: If true, reads the user and bucket ACLs rather than the object ACL.
* Returns: 0 on success, -ERR# otherwise.
*/
-int rgw_build_bucket_policies(rgw::sal::RGWRadosStore* store, struct req_state* s, optional_yield y)
+int rgw_build_bucket_policies(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore* store, struct req_state* s, optional_yield y)
{
int ret = 0;
auto obj_ctx = store->svc()->sysobj->init_obj_ctx();
/* check if copy source is within the current domain */
if (!s->src_bucket_name.empty()) {
std::unique_ptr<rgw::sal::RGWBucket> src_bucket;
- ret = store->get_bucket(nullptr, s->src_tenant_name, s->src_bucket_name, &src_bucket, y);
+ ret = store->get_bucket(dpp, nullptr, s->src_tenant_name, s->src_bucket_name, &src_bucket, y);
if (ret == 0) {
- ret = src_bucket->load_by_name(s->src_tenant_name, s->src_bucket_name,
+ ret = src_bucket->load_by_name(dpp, s->src_tenant_name, s->src_bucket_name,
s->bucket_instance_id, &obj_ctx, s->yield);
}
if (ret == 0) {
if (!s->bucket_name.empty()) {
s->bucket_exists = true;
- ret = store->get_bucket(s->user.get(), rgw_bucket(rgw_bucket_key(s->bucket_tenant, s->bucket_name, s->bucket_instance_id)), &s->bucket, y);
+ ret = store->get_bucket(dpp, s->user.get(), rgw_bucket(rgw_bucket_key(s->bucket_tenant, s->bucket_name, s->bucket_instance_id)), &s->bucket, y);
if (ret < 0) {
if (ret != -ENOENT) {
string bucket_log;
bucket_log = rgw_make_bucket_entry_name(s->bucket_tenant, s->bucket_name);
- ldpp_dout(s, 0) << "NOTICE: couldn't get bucket from bucket_name (name="
+ ldpp_dout(dpp, 0) << "NOTICE: couldn't get bucket from bucket_name (name="
<< bucket_log << ")" << dendl;
return ret;
}
s->bucket_exists = false;
return -ERR_NO_SUCH_BUCKET;
}
-
+ if (!rgw::sal::RGWObject::empty(s->object.get())) {
+ s->object->set_bucket(s->bucket.get());
+ }
+
s->bucket_mtime = s->bucket->get_modification_time();
s->bucket_attrs = s->bucket->get_attrs();
- ret = read_bucket_policy(store, s, s->bucket->get_info(),
+ ret = read_bucket_policy(dpp, store, s, s->bucket->get_info(),
s->bucket->get_attrs(),
s->bucket_acl.get(), s->bucket->get_key(), y);
acct_acl_user = {
}
if (!store->get_zonegroup().equals(s->bucket->get_info().zonegroup)) {
- ldpp_dout(s, 0) << "NOTICE: request for data in a different zonegroup ("
+ ldpp_dout(dpp, 0) << "NOTICE: request for data in a different zonegroup ("
<< s->bucket->get_info().zonegroup << " != "
<< store->get_zonegroup().get_id() << ")" << dendl;
/* we now need to make sure that the operation actually requires copy source, that is
s->dest_placement.inherit_from(s->bucket->get_placement_rule());
if (!store->svc()->zone->get_zone_params().valid_placement(s->dest_placement)) {
- ldpp_dout(s, 0) << "NOTICE: invalid dest placement: " << s->dest_placement.to_str() << dendl;
+ ldpp_dout(dpp, 0) << "NOTICE: invalid dest placement: " << s->dest_placement.to_str() << dendl;
return -EINVAL;
}
/* handle user ACL only for those APIs which support it */
if (s->user_acl) {
map<string, bufferlist> uattrs;
- ret = store->ctl()->user->get_attrs_by_uid(acct_acl_user.uid, &uattrs, s->yield);
+ ret = store->ctl()->user->get_attrs_by_uid(dpp, acct_acl_user.uid, &uattrs, s->yield);
if (!ret) {
- ret = get_user_policy_from_attr(s->cct, store, uattrs, *s->user_acl);
+ ret = get_user_policy_from_attr(dpp, s->cct, store, uattrs, *s->user_acl);
}
if (-ENOENT == ret) {
/* In already existing clusters users won't have ACL. In such case
acct_acl_user.display_name);
ret = 0;
} else if (ret < 0) {
- ldpp_dout(s, 0) << "NOTICE: couldn't get user attrs for handling ACL "
+ ldpp_dout(dpp, 0) << "NOTICE: couldn't get user attrs for handling ACL "
"(user_id=" << s->user->get_id() << ", ret=" << ret << ")" << dendl;
return ret;
}
if (! s->user->get_id().empty() && s->auth.identity->get_identity_type() != TYPE_ROLE) {
try {
map<string, bufferlist> uattrs;
- if (ret = store->ctl()->user->get_attrs_by_uid(s->user->get_id(), &uattrs, s->yield); ! ret) {
+ if (ret = store->ctl()->user->get_attrs_by_uid(dpp, s->user->get_id(), &uattrs, s->yield); ! ret) {
auto user_policies = get_iam_user_policy_from_attr(s->cct, store, uattrs, s->user->get_tenant());
s->iam_user_policies.insert(s->iam_user_policies.end(),
std::make_move_iterator(user_policies.begin()),
else ret = -EACCES;
}
} catch (const std::exception& e) {
- lderr(s->cct) << "Error reading IAM User Policy: " << e.what() << dendl;
+ ldpp_dout(dpp, -1) << "Error reading IAM User Policy: " << e.what() << dendl;
ret = -EACCES;
}
}
// Really this is a can't happen condition. We parse the policy
// when it's given to us, so perhaps we should abort or otherwise
// raise bloody murder.
- ldpp_dout(s, 0) << "Error reading IAM Policy: " << e.what() << dendl;
+ ldpp_dout(dpp, 0) << "Error reading IAM Policy: " << e.what() << dendl;
ret = -EACCES;
}
bool success = store->svc()->zone->get_redirect_zone_endpoint(&s->redirect_zone_endpoint);
if (success) {
- ldpp_dout(s, 20) << "redirect_zone_endpoint=" << s->redirect_zone_endpoint << dendl;
+ ldpp_dout(dpp, 20) << "redirect_zone_endpoint=" << s->redirect_zone_endpoint << dendl;
}
return ret;
* only_bucket: If true, reads the bucket ACL rather than the object ACL.
* Returns: 0 on success, -ERR# otherwise.
*/
-int rgw_build_object_policies(rgw::sal::RGWRadosStore *store, struct req_state *s,
+int rgw_build_object_policies(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *store, struct req_state *s,
bool prefetch_data, optional_yield y)
{
int ret = 0;
if (prefetch_data) {
s->object->set_prefetch_data(s->obj_ctx);
}
- ret = read_obj_policy(store, s, s->bucket->get_info(), s->bucket_attrs,
+ ret = read_obj_policy(dpp, store, s, s->bucket->get_info(), s->bucket_attrs,
s->object_acl.get(), nullptr, s->iam_policy, s->bucket.get(),
s->object.get(), y);
}
return 0;
}
-static int rgw_iam_add_existing_objtags(rgw::sal::RGWRadosStore* store, struct req_state* s, std::uint64_t action) {
+static int rgw_iam_add_existing_objtags(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore* store, struct req_state* s, std::uint64_t action) {
s->object->set_atomic(s->obj_ctx);
- int op_ret = s->object->get_obj_attrs(s->obj_ctx, s->yield);
+ int op_ret = s->object->get_obj_attrs(s->obj_ctx, s->yield, dpp);
if (op_ret < 0)
return op_ret;
rgw::sal::RGWAttrs attrs = s->object->get_attrs();
// general, they should just return op_ret.
namespace {
template<typename F>
-int retry_raced_bucket_write(rgw::sal::RGWBucket* b, const F& f) {
+int retry_raced_bucket_write(const DoutPrefixProvider *dpp, rgw::sal::RGWBucket* b, const F& f) {
auto r = f();
for (auto i = 0u; i < 15u && r == -ECANCELED; ++i) {
- r = b->try_refresh_info(nullptr);
+ r = b->try_refresh_info(dpp, nullptr);
if (r >= 0) {
r = f();
}
action = rgw::IAM::s3GetObjectVersion;
}
if (s->iam_policy && s->iam_policy->has_partial_conditional(S3_EXISTING_OBJTAG))
- rgw_iam_add_existing_objtags(store, s, action);
+ rgw_iam_add_existing_objtags(this, store, s, action);
if (! s->iam_user_policies.empty()) {
for (auto& user_policy : s->iam_user_policies) {
if (user_policy.has_partial_conditional(S3_EXISTING_OBJTAG))
- rgw_iam_add_existing_objtags(store, s, action);
+ rgw_iam_add_existing_objtags(this, store, s, action);
}
}
}
// TODO since we are parsing the bl now anyway, we probably change
// the send_response function to accept RGWObjTag instead of a bl
if (s->iam_policy && s->iam_policy->has_partial_conditional(S3_EXISTING_OBJTAG)){
- rgw_iam_add_existing_objtags(store, s, iam_action);
+ rgw_iam_add_existing_objtags(this, store, s, iam_action);
}
if (! s->iam_user_policies.empty()) {
for (auto& user_policy : s->iam_user_policies) {
if (user_policy.has_partial_conditional(S3_EXISTING_OBJTAG)) {
- rgw_iam_add_existing_objtags(store, s, iam_action);
+ rgw_iam_add_existing_objtags(this, store, s, iam_action);
}
}
}
s->object->set_atomic(s->obj_ctx);
- op_ret = s->object->get_obj_attrs(s->obj_ctx, y);
+ op_ret = s->object->get_obj_attrs(s->obj_ctx, y, this);
if (op_ret < 0) {
ldpp_dout(this, 0) << "ERROR: failed to get obj attrs, obj=" << s->object
<< " ret=" << op_ret << dendl;
rgw::IAM::s3PutObjectVersionTagging;
if(s->iam_policy && s->iam_policy->has_partial_conditional(S3_EXISTING_OBJTAG)){
- rgw_iam_add_existing_objtags(store, s, iam_action);
+ rgw_iam_add_existing_objtags(this, store, s, iam_action);
}
if (! s->iam_user_policies.empty()) {
for (auto& user_policy : s->iam_user_policies) {
if (user_policy.has_partial_conditional(S3_EXISTING_OBJTAG)) {
- rgw_iam_add_existing_objtags(store, s, iam_action);
+ rgw_iam_add_existing_objtags(this, store, s, iam_action);
}
}
}
}
s->object->set_atomic(s->obj_ctx);
- op_ret = s->object->modify_obj_attrs(s->obj_ctx, RGW_ATTR_TAGS, tags_bl, y);
+ op_ret = s->object->modify_obj_attrs(s->obj_ctx, RGW_ATTR_TAGS, tags_bl, y, this);
if (op_ret == -ECANCELED){
op_ret = -ERR_TAG_CONFLICT;
}
rgw::IAM::s3DeleteObjectVersionTagging;
if (s->iam_policy && s->iam_policy->has_partial_conditional(S3_EXISTING_OBJTAG)){
- rgw_iam_add_existing_objtags(store, s, iam_action);
+ rgw_iam_add_existing_objtags(this, store, s, iam_action);
}
if (! s->iam_user_policies.empty()) {
for (auto& user_policy : s->iam_user_policies) {
if (user_policy.has_partial_conditional(S3_EXISTING_OBJTAG)) {
- rgw_iam_add_existing_objtags(store, s, iam_action);
+ rgw_iam_add_existing_objtags(this, store, s, iam_action);
}
}
}
if (rgw::sal::RGWObject::empty(s->object.get()))
return;
- op_ret = s->object->delete_obj_attrs(s->obj_ctx, RGW_ATTR_TAGS, y);
+ op_ret = s->object->delete_obj_attrs(this, s->obj_ctx, RGW_ATTR_TAGS, y);
}
int RGWGetBucketTags::verify_permission(optional_yield y)
void RGWPutBucketTags::execute(optional_yield y)
{
- op_ret = get_params(y);
+ op_ret = get_params(this, y);
if (op_ret < 0)
return;
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, in_data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(this, s->user.get(), nullptr, in_data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl;
}
- op_ret = retry_raced_bucket_write(s->bucket.get(), [this, y] {
+ op_ret = retry_raced_bucket_write(this, s->bucket.get(), [this, y] {
rgw::sal::RGWAttrs attrs = s->bucket->get_attrs();
attrs[RGW_ATTR_TAGS] = tags_bl;
- return s->bucket->set_instance_attrs(attrs, y);
+ return s->bucket->set_instance_attrs(this, attrs, y);
});
}
void RGWDeleteBucketTags::execute(optional_yield y)
{
bufferlist in_data;
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, in_data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(this, s->user.get(), nullptr, in_data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
}
- op_ret = retry_raced_bucket_write(s->bucket.get(), [this, y] {
+ op_ret = retry_raced_bucket_write(this, s->bucket.get(), [this, y] {
rgw::sal::RGWAttrs attrs = s->bucket->get_attrs();
attrs.erase(RGW_ATTR_TAGS);
- op_ret = s->bucket->set_instance_attrs(attrs, y);
+ op_ret = s->bucket->set_instance_attrs(this, attrs, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "RGWDeleteBucketTags() failed to remove RGW_ATTR_TAGS on bucket="
<< s->bucket->get_name()
if (op_ret < 0)
return;
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, in_data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(this, s->user.get(), nullptr, in_data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
}
- op_ret = retry_raced_bucket_write(s->bucket.get(), [this] {
+ op_ret = retry_raced_bucket_write(this, s->bucket.get(), [this] {
auto sync_policy = (s->bucket->get_info().sync_policy ? *s->bucket->get_info().sync_policy : rgw_sync_policy_info());
for (auto& group : sync_policy_groups) {
s->bucket->get_info().set_sync_policy(std::move(sync_policy));
- int ret = s->bucket->put_instance_info(false, real_time());
+ int ret = s->bucket->put_instance_info(this, false, real_time());
if (ret < 0) {
ldpp_dout(this, 0) << "ERROR: put_bucket_instance_info (bucket=" << s->bucket << ") returned ret=" << ret << dendl;
return ret;
void RGWDeleteBucketReplication::execute(optional_yield y)
{
bufferlist in_data;
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, in_data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(this, s->user.get(), nullptr, in_data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
}
- op_ret = retry_raced_bucket_write(s->bucket.get(), [this] {
+ op_ret = retry_raced_bucket_write(this, s->bucket.get(), [this] {
if (!s->bucket->get_info().sync_policy) {
return 0;
}
s->bucket->get_info().set_sync_policy(std::move(sync_policy));
- int ret = s->bucket->put_instance_info(false, real_time());
+ int ret = s->bucket->put_instance_info(this, false, real_time());
if (ret < 0) {
ldpp_dout(this, 0) << "ERROR: put_bucket_instance_info (bucket=" << s->bucket << ") returned ret=" << ret << dendl;
return ret;
if (s->user->get_id() == s->bucket_owner.get_id()) {
user = s->user.get();
} else {
- int r = owner_user.load_by_id(s->yield);
+ int r = owner_user.load_by_id(this, s->yield);
if (r < 0)
return r;
user = &owner_user;
read_op->params.if_match = ent.meta.etag.c_str();
}
- op_ret = read_op->prepare(s->yield);
+ op_ret = read_op->prepare(s->yield, this);
if (op_ret < 0)
return op_ret;
op_ret = part->range_to_ofs(ent.meta.accounted_size, cur_ofs, cur_end);
}
}
- op_ret = rgw_policy_from_attrset(s->cct, part->get_attrs(), &obj_policy);
+ op_ret = rgw_policy_from_attrset(s, s->cct, part->get_attrs(), &obj_policy);
if (op_ret < 0)
return op_ret;
perfcounter->inc(l_rgw_get_b, cur_end - cur_ofs);
filter->fixup_range(cur_ofs, cur_end);
- op_ret = read_op->iterate(cur_ofs, cur_end, filter, s->yield);
+ op_ret = read_op->iterate(this, cur_ofs, cur_end, filter, s->yield);
if (op_ret >= 0)
op_ret = filter->flush();
return op_ret;
}
-static int iterate_user_manifest_parts(CephContext * const cct,
+static int iterate_user_manifest_parts(const DoutPrefixProvider *dpp,
+ CephContext * const cct,
rgw::sal::RGWStore* const store,
const off_t ofs,
const off_t end,
MD5 etag_sum;
do {
static constexpr auto MAX_LIST_OBJS = 100u;
- int r = bucket->list(params, MAX_LIST_OBJS, results, y);
+ int r = bucket->list(dpp, params, MAX_LIST_OBJS, results, y);
if (r < 0) {
return r;
}
if (bucket_name.compare(s->bucket->get_name()) != 0) {
map<string, bufferlist> bucket_attrs;
- r = store->get_bucket(s->user.get(), s->user->get_tenant(), bucket_name, &ubucket, y);
+ r = store->get_bucket(this, s->user.get(), s->user->get_tenant(), bucket_name, &ubucket, y);
if (r < 0) {
ldpp_dout(this, 0) << "could not get bucket info for bucket="
<< bucket_name << dendl;
return r;
}
bucket_acl = &_bucket_acl;
- r = read_bucket_policy(store, s, ubucket->get_info(), bucket_attrs, bucket_acl, ubucket->get_key(), y);
+ r = read_bucket_policy(this, store, s, ubucket->get_info(), bucket_attrs, bucket_acl, ubucket->get_key(), y);
if (r < 0) {
ldpp_dout(this, 0) << "failed to read bucket policy" << dendl;
return r;
* - total length (of the parts we are going to send to client),
* - overall DLO's content size,
* - md5 sum of overall DLO's content (for etag of Swift API). */
- r = iterate_user_manifest_parts(s->cct, store, ofs, end,
+ r = iterate_user_manifest_parts(this, s->cct, store, ofs, end,
pbucket, obj_prefix, bucket_acl, *bucket_policy,
nullptr, &s->obj_size, &lo_etag,
nullptr /* cb */, nullptr /* cb arg */, y);
return r;
}
- r = iterate_user_manifest_parts(s->cct, store, ofs, end,
+ r = iterate_user_manifest_parts(this, s->cct, store, ofs, end,
pbucket, obj_prefix, bucket_acl, *bucket_policy,
&total_len, nullptr, nullptr,
nullptr, nullptr, y);
return 0;
}
- r = iterate_user_manifest_parts(s->cct, store, ofs, end,
+ r = iterate_user_manifest_parts(this, s->cct, store, ofs, end,
pbucket, obj_prefix, bucket_acl, *bucket_policy,
nullptr, nullptr, nullptr,
get_obj_user_manifest_iterate_cb, (void *)this, y);
std::unique_ptr<rgw::sal::RGWBucket> tmp_bucket;
auto obj_ctx = store->svc()->sysobj->init_obj_ctx();
- int r = store->get_bucket(s->user.get(), s->user->get_tenant(), bucket_name, &tmp_bucket, y);
+ int r = store->get_bucket(this, s->user.get(), s->user->get_tenant(), bucket_name, &tmp_bucket, y);
if (r < 0) {
ldpp_dout(this, 0) << "could not get bucket info for bucket="
<< bucket_name << dendl;
}
bucket = tmp_bucket.get();
bucket_acl = &_bucket_acl;
- r = read_bucket_policy(store, s, tmp_bucket->get_info(), tmp_bucket->get_attrs(), bucket_acl,
+ r = read_bucket_policy(this, store, s, tmp_bucket->get_info(), tmp_bucket->get_attrs(), bucket_acl,
tmp_bucket->get_key(), y);
if (r < 0) {
ldpp_dout(this, 0) << "failed to read bucket ACL for bucket "
bufferlist::const_iterator iter{&tags->second};
s->tagset.decode(iter);
} catch (buffer::error& err) {
- ldout(s->cct, 0)
+ ldpp_dout(s, 0)
<< "ERROR: caught buffer::error, couldn't decode TagSet" << dendl;
}
}
read_op->params.if_nomatch = if_nomatch;
read_op->params.lastmod = &lastmod;
- op_ret = read_op->prepare(s->yield);
+ op_ret = read_op->prepare(s->yield, this);
if (op_ret < 0)
goto done_err;
version_id = s->object->get_instance();
op_ret = rgw_compression_info_from_attrset(attrs, need_decompress, cs_info);
if (op_ret < 0) {
- ldpp_dout(s, 0) << "ERROR: failed to decode compression info, cannot decompress" << dendl;
+ ldpp_dout(this, 0) << "ERROR: failed to decode compression info, cannot decompress" << dendl;
goto done_err;
}
if (need_decompress) {
ofs_x = ofs;
end_x = end;
filter->fixup_range(ofs_x, end_x);
- op_ret = read_op->iterate(ofs_x, end_x, filter, s->yield);
+ op_ret = read_op->iterate(this, ofs_x, end_x, filter, s->yield);
if (op_ret >= 0)
op_ret = filter->flush();
}
if (supports_account_metadata()) {
- op_ret = store->ctl()->user->get_attrs_by_uid(s->user->get_id(), &attrs, s->yield);
+ op_ret = store->ctl()->user->get_attrs_by_uid(this, s->user->get_id(), &attrs, s->yield);
if (op_ret < 0) {
goto send_end;
}
read_count = max_buckets;
}
- op_ret = s->user->list_buckets(marker, end_marker, read_count, should_get_stats(), buckets, y);
+ op_ret = s->user->list_buckets(this, marker, end_marker, read_count, should_get_stats(), buckets, y);
if (op_ret < 0) {
/* hmm.. something wrong here.. the user was authenticated, so it
RGWUsageIter usage_iter;
while (s->bucket && is_truncated) {
- op_ret = s->bucket->read_usage(start_epoch, end_epoch, max_entries, &is_truncated,
+ op_ret = s->bucket->read_usage(this, start_epoch, end_epoch, max_entries, &is_truncated,
usage_iter, usage);
if (op_ret == -ENOENT) {
op_ret = 0;
}
}
- op_ret = rgw_user_sync_all_stats(store, s->user->get_id(), y);
+ op_ret = rgw_user_sync_all_stats(this, store, s->user->get_id(), y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "ERROR: failed to sync user stats" << dendl;
return;
}
- op_ret = rgw_user_get_all_buckets_stats(store, s->user->get_id(), buckets_usage, y);
+ op_ret = rgw_user_get_all_buckets_stats(this, store, s->user->get_id(), buckets_usage, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "ERROR: failed to get user's buckets stats" << dendl;
return;
}
- op_ret = store->ctl()->user->read_stats(s->user->get_id(), &stats, y);
+ op_ret = store->ctl()->user->read_stats(this, s->user->get_id(), &stats, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "ERROR: can't read user header" << dendl;
return;
do {
lastmarker = nullptr;
- op_ret = rgw_read_user_buckets(store, s->user->get_id(), buckets, marker,
+ op_ret = rgw_read_user_buckets(this, store, s->user->get_id(), buckets, marker,
string(), max_buckets, true, y);
if (op_ret < 0) {
/* hmm.. something wrong here.. the user was authenticated, so it
}
if (!lastmarker) {
- lderr(s->cct) << "ERROR: rgw_read_user_buckets, stasis at marker="
+ ldpp_dout(this, -1) << "ERROR: rgw_read_user_buckets, stasis at marker="
<< marker << " uid=" << s->user->get_id() << dendl;
break;
}
}
}
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, in_data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(this, s->user.get(), nullptr, in_data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
bool modified = mfa_set_status;
- op_ret = retry_raced_bucket_write(s->bucket.get(), [&] {
+ op_ret = retry_raced_bucket_write(this, s->bucket.get(), [&] {
if (mfa_set_status) {
if (mfa_status) {
s->bucket->get_info().flags |= BUCKET_MFA_ENABLED;
return op_ret;
}
s->bucket->set_attrs(rgw::sal::RGWAttrs(s->bucket_attrs));
- return s->bucket->put_instance_info(false, real_time());
+ return s->bucket->put_instance_info(this, false, real_time());
});
if (!modified) {
if (op_ret < 0)
return;
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, in_data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(this, s->user.get(), nullptr, in_data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << " forward_request_to_master returned ret=" << op_ret << dendl;
return;
}
- op_ret = retry_raced_bucket_write(s->bucket.get(), [this] {
+ op_ret = retry_raced_bucket_write(this, s->bucket.get(), [this] {
s->bucket->get_info().has_website = true;
s->bucket->get_info().website_conf = website_conf;
- op_ret = s->bucket->put_instance_info(false, real_time());
+ op_ret = s->bucket->put_instance_info(this, false, real_time());
return op_ret;
});
{
bufferlist in_data;
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, in_data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(this, s->user.get(), nullptr, in_data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "NOTICE: forward_to_master failed on bucket=" << s->bucket->get_name()
<< "returned err=" << op_ret << dendl;
return;
}
- op_ret = retry_raced_bucket_write(s->bucket.get(), [this] {
+ op_ret = retry_raced_bucket_write(this, s->bucket.get(), [this] {
s->bucket->get_info().has_website = false;
s->bucket->get_info().website_conf = RGWBucketWebsiteConf();
- op_ret = s->bucket->put_instance_info(false, real_time());
+ op_ret = s->bucket->put_instance_info(this, false, real_time());
return op_ret;
});
if (op_ret < 0) {
return;
}
- op_ret = store->get_bucket(s->user.get(), s->bucket->get_key(), &bucket, y);
+ op_ret = store->get_bucket(this, s->user.get(), s->bucket->get_key(), &bucket, y);
if (op_ret) {
return;
}
- op_ret = bucket->update_container_stats();
+ op_ret = bucket->update_container_stats(s);
}
int RGWListBucket::verify_permission(optional_yield y)
}
if (need_container_stats()) {
- op_ret = s->bucket->update_container_stats();
+ op_ret = s->bucket->update_container_stats(s);
}
rgw::sal::RGWBucket::ListParams params;
rgw::sal::RGWBucket::ListResults results;
- op_ret = s->bucket->list(params, max, results, y);
+ op_ret = s->bucket->list(this, params, max, results, y);
if (op_ret >= 0) {
next_marker = results.next_marker;
is_truncated = results.is_truncated;
if (s->user->get_max_buckets()) {
rgw::sal::RGWBucketList buckets;
string marker;
- op_ret = rgw_read_user_buckets(store, s->user->get_id(), buckets,
+ op_ret = rgw_read_user_buckets(this, store, s->user->get_id(), buckets,
marker, string(), s->user->get_max_buckets(),
false, y);
if (op_ret < 0) {
/* we need to make sure we read bucket info, it's not read before for this
* specific request */
- op_ret = store->get_bucket(s->user.get(), s->bucket_tenant, s->bucket_name, &s->bucket, y);
+ op_ret = store->get_bucket(this, s->user.get(), s->bucket_tenant, s->bucket_name, &s->bucket, y);
if (op_ret < 0 && op_ret != -ENOENT)
return;
s->bucket_exists = (op_ret != -ENOENT);
if (need_metadata_upload()) {
/* It's supposed that following functions WILL NOT change any special
* attributes (like RGW_ATTR_ACL) if they are already present in attrs. */
- op_ret = rgw_get_request_metadata(s->cct, s->info, attrs, false);
+ op_ret = rgw_get_request_metadata(this, s->cct, s->info, attrs, false);
if (op_ret < 0) {
return;
}
/* We're replacing bucket with the newly created one */
ldpp_dout(this, 10) << "user=" << s->user << " bucket=" << tmp_bucket << dendl;
- op_ret = store->create_bucket(*s->user, tmp_bucket, zonegroup_id,
+ op_ret = store->create_bucket(this, *s->user, tmp_bucket, zonegroup_id,
placement_rule,
info.swift_ver_location,
pquota_info, policy, attrs, info, ep_objv,
}
op_ret = store->ctl()->bucket->link_bucket(s->user->get_id(), s->bucket->get_key(),
- s->bucket->get_creation_time(), y, false);
+ s->bucket->get_creation_time(), y, s, false);
if (op_ret && !existed && op_ret != -EEXIST) {
/* if it exists (or previously existed), don't remove it! */
- op_ret = store->ctl()->bucket->unlink_bucket(s->user->get_id(), s->bucket->get_key(), y);
+ op_ret = store->ctl()->bucket->unlink_bucket(s->user->get_id(), s->bucket->get_key(), y, this);
if (op_ret < 0) {
ldpp_dout(this, 0) << "WARNING: failed to unlink bucket: ret=" << op_ret
<< dendl;
do {
map<string, bufferlist> battrs;
- op_ret = s->bucket->get_bucket_info(y);
+ op_ret = s->bucket->get_bucket_info(this, y);
if (op_ret < 0) {
return;
} else if (!s->bucket->is_owner(s->user.get())) {
attrs.clear();
- op_ret = rgw_get_request_metadata(s->cct, s->info, attrs, false);
+ op_ret = rgw_get_request_metadata(this, s->cct, s->info, attrs, false);
if (op_ret < 0) {
return;
}
/* This will also set the quota on the bucket. */
op_ret = store->ctl()->bucket->set_bucket_instance_attrs(s->bucket->get_info(), attrs,
&s->bucket->get_info().objv_tracker,
- y);
+ y, this);
} while (op_ret == -ECANCELED && tries++ < 20);
/* Restore the proper return code. */
}
}
- op_ret = s->bucket->sync_user_stats(y);
+ op_ret = s->bucket->sync_user_stats(this, y);
if ( op_ret < 0) {
ldpp_dout(this, 1) << "WARNING: failed to sync user stats before bucket delete: op_ret= " << op_ret << dendl;
}
- op_ret = s->bucket->check_empty(y);
+ op_ret = s->bucket->check_empty(this, y);
if (op_ret < 0) {
return;
}
bufferlist in_data;
- op_ret = store->forward_request_to_master(s->user.get(), &ot.read_version, in_data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(this, s->user.get(), &ot.read_version, in_data, nullptr, s->info, y);
if (op_ret < 0) {
if (op_ret == -ENOENT) {
/* adjust error, we want to return with NoSuchBucket and not
}
}
- op_ret = s->bucket->remove_bucket(false, prefix, delimiter, false, nullptr,
- y);
+ op_ret = s->bucket->remove_bucket(this, false, prefix, delimiter, false, nullptr, y);
if (op_ret < 0 && op_ret == -ECANCELED) {
// lost a race, either with mdlog sync or another delete bucket operation.
// in either case, we've already called ctl.bucket->unlink_bucket()
}
}
std::unique_ptr<rgw::sal::RGWBucket> bucket;
- ret = store->get_bucket(s->user.get(), copy_source_tenant_name, copy_source_bucket_name,
+ ret = store->get_bucket(this, s->user.get(), copy_source_tenant_name, copy_source_bucket_name,
&bucket, y);
if (ret < 0) {
ldpp_dout(this, 5) << __func__ << "(): get_bucket() returned ret=" << ret << dendl;
return ret;
}
- ret = bucket->get_bucket_info(y);
+ ret = bucket->get_bucket_info(this, y);
if (ret < 0) {
ldpp_dout(this, 5) << __func__ << "(): get_bucket_info() returned ret=" << ret << dendl;
return ret;
cs_object->set_prefetch_data(s->obj_ctx);
/* check source object permissions */
- if (read_obj_policy(store, s, copy_source_bucket_info, cs_attrs, &cs_acl, nullptr,
+ if (read_obj_policy(this, store, s, copy_source_bucket_info, cs_attrs, &cs_acl, nullptr,
policy, cs_bucket.get(), cs_object.get(), y, true) < 0) {
return -EACCES;
}
std::unique_ptr<rgw::sal::RGWObject> obj = bucket->get_object(rgw_obj_key(copy_source_object_name, copy_source_version_id));
std::unique_ptr<rgw::sal::RGWObject::ReadOp> read_op(obj->get_read_op(s->obj_ctx));
- ret = read_op->prepare(s->yield);
+ ret = read_op->prepare(s->yield, this);
if (ret < 0)
return ret;
bool need_decompress;
op_ret = rgw_compression_info_from_attrset(obj->get_attrs(), need_decompress, cs_info);
if (op_ret < 0) {
- ldpp_dout(s, 0) << "ERROR: failed to decode compression info" << dendl;
+ ldpp_dout(this, 0) << "ERROR: failed to decode compression info" << dendl;
return -EIO;
}
return ret;
filter->fixup_range(new_ofs, new_end);
- ret = read_op->iterate(new_ofs, new_end, filter, s->yield);
+ ret = read_op->iterate(this, new_ofs, new_end, filter, s->yield);
if (ret >= 0)
ret = filter->flush();
}
// make reservation for notification if needed
- rgw::notify::reservation_t res(store, s, s->object.get());
+ rgw::notify::reservation_t res(this, store, s, s->object.get());
const auto event_type = rgw::notify::ObjectCreatedPut;
- op_ret = rgw::notify::publish_reserve(event_type, res, obj_tags.get());
+ op_ret = rgw::notify::publish_reserve(this, event_type, res, obj_tags.get());
if (op_ret < 0) {
return;
}
if (multipart) {
RGWMPObj mp(s->object->get_name(), multipart_upload_id);
- op_ret = get_multipart_info(s, mp.get_meta(), &upload_info);
+ op_ret = get_multipart_info(this, s, mp.get_meta(), &upload_info);
if (op_ret < 0) {
if (op_ret != -ENOENT) {
ldpp_dout(this, 0) << "ERROR: get_multipart_info returned " << op_ret << ": " << cpp_strerror(-op_ret) << dendl;
rgw::sal::RGWRadosBucket bucket(store, copy_source_bucket_info);
RGWObjState *astate;
- op_ret = obj.get_obj_state(&obj_ctx, bucket, &astate, s->yield);
+ op_ret = obj.get_obj_state(this, &obj_ctx, bucket, &astate, s->yield);
if (op_ret < 0) {
ldpp_dout(this, 0) << "ERROR: get copy source obj state returned with error" << op_ret << dendl;
return;
emplace_attr(RGW_ATTR_ETAG, std::move(bl));
populate_with_generic_attrs(s, attrs);
- op_ret = rgw_get_request_metadata(s->cct, s->info, attrs);
+ op_ret = rgw_get_request_metadata(this, s->cct, s->info, attrs);
if (op_ret < 0) {
return;
}
}
// send request to notification manager
- const auto ret = rgw::notify::publish_commit(s->object.get(), s->obj_size, mtime, etag, event_type, res);
+ const auto ret = rgw::notify::publish_commit(s->object.get(), s->obj_size, mtime, etag, event_type, res, this);
if (ret < 0) {
ldpp_dout(this, 1) << "ERROR: publishing notification failed, with error: " << ret << dendl;
// too late to rollback operation, hence op_ret is not set here
}
// make reservation for notification if needed
- rgw::notify::reservation_t res(store, s, s->object.get());
+ rgw::notify::reservation_t res(this, store, s, s->object.get());
const auto event_type = rgw::notify::ObjectCreatedPost;
- op_ret = rgw::notify::publish_reserve(event_type, res, nullptr);
+ op_ret = rgw::notify::publish_reserve(this, event_type, res, nullptr);
if (op_ret < 0) {
return;
}
} while (is_next_file_to_upload());
// send request to notification manager
- const auto ret = rgw::notify::publish_commit(s->object.get(), ofs, ceph::real_clock::now(), etag, event_type, res);
+ const auto ret = rgw::notify::publish_commit(s->object.get(), ofs, ceph::real_clock::now(), etag, event_type, res, this);
if (ret < 0) {
ldpp_dout(this, 1) << "ERROR: publishing notification failed, with error: " << ret << dendl;
// too late to rollback operation, hence op_ret is not set here
return op_ret;
}
- op_ret = store->ctl()->user->get_attrs_by_uid(s->user->get_id(), &orig_attrs,
+ op_ret = store->ctl()->user->get_attrs_by_uid(this, s->user->get_id(), &orig_attrs,
s->yield,
&acct_op_tracker);
if (op_ret < 0) {
attrs.emplace(RGW_ATTR_ACL, std::move(acl_bl));
}
- op_ret = rgw_get_request_metadata(s->cct, s->info, attrs, false);
+ op_ret = rgw_get_request_metadata(this, s->cct, s->info, attrs, false);
if (op_ret < 0) {
return op_ret;
}
{
/* Params have been extracted earlier. See init_processing(). */
RGWUserInfo new_uinfo;
- op_ret = store->ctl()->user->get_info_by_uid(s->user->get_id(), &new_uinfo, s->yield,
+ op_ret = store->ctl()->user->get_info_by_uid(this, s->user->get_id(), &new_uinfo, s->yield,
RGWUserCtl::GetParams()
.set_objv_tracker(&acct_op_tracker));
if (op_ret < 0) {
/* We are passing here the current (old) user info to allow the function
* optimize-out some operations. */
- op_ret = store->ctl()->user->store_info(new_uinfo, s->yield,
+ op_ret = store->ctl()->user->store_info(this, new_uinfo, s->yield,
RGWUserCtl::PutParams()
.set_old_info(&s->user->get_info())
.set_objv_tracker(&acct_op_tracker)
return;
}
- op_ret = rgw_get_request_metadata(s->cct, s->info, attrs, false);
+ op_ret = rgw_get_request_metadata(this, s->cct, s->info, attrs, false);
if (op_ret < 0) {
return;
}
return;
}
- op_ret = retry_raced_bucket_write(s->bucket.get(), [this] {
+ op_ret = retry_raced_bucket_write(this, s->bucket.get(), [this] {
/* Encode special metadata first as we're using std::map::emplace under
* the hood. This method will add the new items only if the map doesn't
* contain such keys yet. */
/* Setting attributes also stores the provided bucket info. Due
* to this fact, the new quota settings can be serialized with
* the same call. */
- op_ret = s->bucket->set_instance_attrs(attrs, s->yield);
+ op_ret = s->bucket->set_instance_attrs(this, attrs, s->yield);
return op_ret;
});
}
return;
}
- op_ret = rgw_get_request_metadata(s->cct, s->info, attrs);
+ op_ret = rgw_get_request_metadata(this, s->cct, s->info, attrs);
if (op_ret < 0) {
return;
}
/* check if obj exists, read orig attrs */
- op_ret = s->object->get_obj_attrs(s->obj_ctx, s->yield, &target_obj);
+ op_ret = s->object->get_obj_attrs(s->obj_ctx, s->yield, s, &target_obj);
if (op_ret < 0) {
return;
}
}
}
- op_ret = s->object->set_obj_attrs(s->obj_ctx, &attrs, &rmattrs, s->yield, &target_obj);
+ op_ret = s->object->set_obj_attrs(this, s->obj_ctx, &attrs, &rmattrs, s->yield, &target_obj);
}
int RGWDeleteObj::handle_slo_manifest(bufferlist& bl, optional_yield y)
bool check_obj_lock = s->object->have_instance() && s->bucket->get_info().obj_lock_enabled();
if (!rgw::sal::RGWObject::empty(s->object.get())) {
- op_ret = s->object->get_obj_attrs(s->obj_ctx, s->yield);
+ op_ret = s->object->get_obj_attrs(s->obj_ctx, s->yield, this);
if (op_ret < 0) {
if (need_object_expiration() || multipart_delete) {
return;
}
// make reservation for notification if needed
- rgw::notify::reservation_t res(store, s, s->object.get());
+ rgw::notify::reservation_t res(this, store, s, s->object.get());
const auto versioned_object = s->bucket->versioning_enabled();
const auto event_type = versioned_object && s->object->get_instance().empty() ?
rgw::notify::ObjectRemovedDeleteMarkerCreated : rgw::notify::ObjectRemovedDelete;
- op_ret = rgw::notify::publish_reserve(event_type, res, nullptr);
+ op_ret = rgw::notify::publish_reserve(this, event_type, res, nullptr);
if (op_ret < 0) {
return;
}
return;
}
- op_ret = s->object->delete_object(obj_ctx, s->owner, s->bucket_owner, unmod_since,
+ op_ret = s->object->delete_object(this, obj_ctx, s->owner, s->bucket_owner, unmod_since,
s->system_request, epoch, version_id, s->yield);
if (op_ret >= 0) {
delete_marker = s->object->get_delete_marker();
const auto obj_state = obj_ctx->get_state(s->object->get_obj());
// send request to notification manager
- const auto ret = rgw::notify::publish_commit(s->object.get(), obj_state->size, obj_state->mtime, attrs[RGW_ATTR_ETAG].to_str(), event_type, res);
+ const auto ret = rgw::notify::publish_commit(s->object.get(), obj_state->size, obj_state->mtime, attrs[RGW_ATTR_ETAG].to_str(), event_type, res, this);
if (ret < 0) {
ldpp_dout(this, 1) << "ERROR: publishing notification failed, with error: " << ret << dendl;
// too late to rollback operation, hence op_ret is not set here
bool RGWCopyObj::parse_copy_location(const std::string_view& url_src,
string& bucket_name,
- rgw_obj_key& key)
+ rgw_obj_key& key,
+ req_state* s)
{
std::string_view name_str;
std::string_view params_str;
if (! params_str.empty()) {
RGWHTTPArgs args;
args.set(std::string(params_str));
- args.parse();
+ args.parse(s);
key.instance = args.get("versionId", NULL);
}
return op_ret;
}
- op_ret = src_bucket->load_by_name(src_tenant_name, src_bucket_name, s->bucket_instance_id,
+ op_ret = src_bucket->load_by_name(this, src_tenant_name, src_bucket_name, s->bucket_instance_id,
s->sysobj_ctx, s->yield);
if (op_ret < 0) {
if (op_ret == -ENOENT) {
rgw_placement_rule src_placement;
/* check source object permissions */
- op_ret = read_obj_policy(store, s, src_bucket->get_info(), src_bucket->get_attrs(), &src_acl, &src_placement.storage_class,
+ op_ret = read_obj_policy(this, store, s, src_bucket->get_info(), src_bucket->get_attrs(), &src_acl, &src_placement.storage_class,
src_policy, src_bucket.get(), src_object.get(), y);
if (op_ret < 0) {
return op_ret;
}
return op_ret;
}
- op_ret = dest_bucket->load_by_name(dest_tenant_name, dest_bucket_name, std::string(),
+ op_ret = dest_bucket->load_by_name(this, dest_tenant_name, dest_bucket_name, std::string(),
s->sysobj_ctx, s->yield);
if (op_ret < 0) {
if (op_ret == -ENOENT) {
dest_object->set_atomic(s->obj_ctx);
/* check dest bucket permissions */
- op_ret = read_bucket_policy(store, s, dest_bucket->get_info(),
+ op_ret = read_bucket_policy(this, store, s, dest_bucket->get_info(),
dest_bucket->get_attrs(),
&dest_bucket_policy, dest_bucket->get_key(), y);
if (op_ret < 0) {
dest_policy.encode(aclbl);
emplace_attr(RGW_ATTR_ACL, std::move(aclbl));
- op_ret = rgw_get_request_metadata(s->cct, s->info, attrs);
+ op_ret = rgw_get_request_metadata(this, s->cct, s->info, attrs);
if (op_ret < 0) {
return op_ret;
}
}
// make reservation for notification if needed
- rgw::notify::reservation_t res(store, s, s->object.get());
+ rgw::notify::reservation_t res(this, store, s, s->object.get());
const auto event_type = rgw::notify::ObjectCreatedCopy;
- op_ret = rgw::notify::publish_reserve(event_type, res, nullptr);
+ op_ret = rgw::notify::publish_reserve(this, event_type, res, nullptr);
if (op_ret < 0) {
return;
}
if (!s->system_request) { // no quota enforcement for system requests
// get src object size (cached in obj_ctx from verify_permission())
RGWObjState* astate = nullptr;
- op_ret = src_object->get_obj_state(s->obj_ctx, *src_bucket, &astate,
+ op_ret = src_object->get_obj_state(this, s->obj_ctx, *src_bucket, &astate,
s->yield, true);
if (op_ret < 0) {
return;
s->yield);
// send request to notification manager
- const auto ret = rgw::notify::publish_commit(s->object.get(), s->obj_size, mtime, etag, event_type, res);
+ const auto ret = rgw::notify::publish_commit(s->object.get(), s->obj_size, mtime, etag, event_type, res, this);
if (ret < 0) {
ldpp_dout(this, 1) << "ERROR: publishing notification failed, with error: " << ret << dendl;
// too late to rollback operation, hence op_ret is not set here
rgw::IAM::s3GetObjectVersionAcl;
if (s->iam_policy && s->iam_policy->has_partial_conditional(S3_EXISTING_OBJTAG)){
- rgw_iam_add_existing_objtags(store, s, iam_action);
+ rgw_iam_add_existing_objtags(this, store, s, iam_action);
}
if (! s->iam_user_policies.empty()) {
for (auto& user_policy : s->iam_user_policies) {
if (user_policy.has_partial_conditional(S3_EXISTING_OBJTAG)) {
- rgw_iam_add_existing_objtags(store, s, iam_action);
+ rgw_iam_add_existing_objtags(this, store, s, iam_action);
}
}
}
rgw_add_grant_to_iam_environment(s->env, s);
if (!rgw::sal::RGWObject::empty(s->object.get())) {
auto iam_action = s->object->get_instance().empty() ? rgw::IAM::s3PutObjectAcl : rgw::IAM::s3PutObjectVersionAcl;
- op_ret = rgw_iam_add_existing_objtags(store, s, iam_action);
+ op_ret = rgw_iam_add_existing_objtags(this, store, s, iam_action);
perm = verify_object_permission(this, s, iam_action);
} else {
perm = verify_bucket_permission(this, s, rgw::IAM::s3PutBucketAcl);
if (s->canned_acl.empty()) {
in_data.append(data);
}
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, in_data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(this, s->user.get(), nullptr, in_data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
*_dout << dendl;
}
- op_ret = policy->rebuild(store->ctl()->user, &owner, new_policy, s->err.message);
+ op_ret = policy->rebuild(this, store->ctl()->user, &owner, new_policy, s->err.message);
if (op_ret < 0)
return;
if (s->bucket_access_conf &&
s->bucket_access_conf->block_public_acls() &&
- new_policy.is_public()) {
+ new_policy.is_public(this)) {
op_ret = -EACCES;
return;
}
if (!rgw::sal::RGWObject::empty(s->object.get())) {
s->object->set_atomic(s->obj_ctx);
//if instance is empty, we should modify the latest object
- op_ret = s->object->modify_obj_attrs(s->obj_ctx, RGW_ATTR_ACL, bl, s->yield);
+ op_ret = s->object->modify_obj_attrs(s->obj_ctx, RGW_ATTR_ACL, bl, s->yield, this);
} else {
map<string,bufferlist> attrs = s->bucket_attrs;
attrs[RGW_ATTR_ACL] = bl;
op_ret = store->ctl()->bucket->set_bucket_instance_attrs(s->bucket->get_info(), attrs,
&s->bucket->get_info().objv_tracker,
- s->yield);
+ s->yield, this);
}
if (op_ret == -ECANCELED) {
op_ret = 0; /* lost a race, but it's ok because acls are immutable */
ldpp_dout(this, 15) << "New LifecycleConfiguration:" << ss.str() << dendl;
}
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(this, s->user.get(), nullptr, data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
void RGWDeleteLC::execute(optional_yield y)
{
bufferlist data;
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(this, s->user.get(), nullptr, data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
if (op_ret < 0)
return;
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, in_data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(this, s->user.get(), nullptr, in_data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
}
- op_ret = retry_raced_bucket_write(s->bucket.get(), [this] {
+ op_ret = retry_raced_bucket_write(this, s->bucket.get(), [this] {
rgw::sal::RGWAttrs attrs(s->bucket_attrs);
attrs[RGW_ATTR_CORS] = cors_bl;
- return s->bucket->set_instance_attrs(attrs, s->yield);
+ return s->bucket->set_instance_attrs(this, attrs, s->yield);
});
}
void RGWDeleteCORS::execute(optional_yield y)
{
bufferlist data;
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(this, s->user.get(), nullptr, data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
}
- op_ret = retry_raced_bucket_write(s->bucket.get(), [this] {
+ op_ret = retry_raced_bucket_write(this, s->bucket.get(), [this] {
op_ret = read_bucket_cors();
if (op_ret < 0)
return op_ret;
rgw::sal::RGWAttrs attrs(s->bucket_attrs);
attrs.erase(RGW_ATTR_CORS);
- op_ret = s->bucket->set_instance_attrs(attrs, s->yield);
+ op_ret = s->bucket->set_instance_attrs(this, attrs, s->yield);
if (op_ret < 0) {
ldpp_dout(this, 0) << "RGWLC::RGWDeleteCORS() failed to set attrs on bucket=" << s->bucket->get_name()
<< " returned err=" << op_ret << dendl;
void RGWSetRequestPayment::execute(optional_yield y)
{
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, in_data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(this, s->user.get(), nullptr, in_data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
return;
s->bucket->get_info().requester_pays = requester_pays;
- op_ret = s->bucket->put_instance_info(false, real_time());
+ op_ret = s->bucket->put_instance_info(this, false, real_time());
if (op_ret < 0) {
ldpp_dout(this, 0) << "NOTICE: put_bucket_info on bucket=" << s->bucket->get_name()
<< " returned err=" << op_ret << dendl;
if (op_ret != 0)
return;
- op_ret = rgw_get_request_metadata(s->cct, s->info, attrs);
+ op_ret = rgw_get_request_metadata(this, s->cct, s->info, attrs);
if (op_ret < 0) {
return;
}
// make reservation for notification if needed
- rgw::notify::reservation_t res(store, s, s->object.get());
+ rgw::notify::reservation_t res(this, store, s, s->object.get());
const auto event_type = rgw::notify::ObjectCreatedPost;
- op_ret = rgw::notify::publish_reserve(event_type, res, nullptr);
+ op_ret = rgw::notify::publish_reserve(this, event_type, res, nullptr);
if (op_ret < 0) {
return;
}
op_ret = obj_op->prepare(s->yield);
- op_ret = obj_op->write_meta(bl.length(), 0, s->yield);
+ op_ret = obj_op->write_meta(this, bl.length(), 0, s->yield);
} while (op_ret == -EEXIST);
// send request to notification manager
- const auto ret = rgw::notify::publish_commit(s->object.get(), s->obj_size, ceph::real_clock::now(), attrs[RGW_ATTR_ETAG].to_str(), event_type, res);
+ const auto ret = rgw::notify::publish_commit(s->object.get(), s->obj_size, ceph::real_clock::now(), attrs[RGW_ATTR_ETAG].to_str(), event_type, res, this);
if (ret < 0) {
ldpp_dout(this, 1) << "ERROR: publishing notification failed, with error: " << ret << dendl;
// too late to rollback operation, hence op_ret is not set here
mp.init(s->object->get_name(), upload_id);
// make reservation for notification if needed
- rgw::notify::reservation_t res(store, s, s->object.get());
+ rgw::notify::reservation_t res(this, store, s, s->object.get());
const auto event_type = rgw::notify::ObjectCreatedCompleteMultipartUpload;
- op_ret = rgw::notify::publish_reserve(event_type, res, nullptr);
+ op_ret = rgw::notify::publish_reserve(this, event_type, res, nullptr);
if (op_ret < 0) {
return;
}
s->cct->_conf.get_val<int64_t>("rgw_mp_lock_max_time");
utime_t dur(max_lock_secs_mp, 0);
- serializer = meta_obj->get_serializer("RGWCompleteMultipart");
- op_ret = serializer->try_lock(dur, y);
+ serializer = meta_obj->get_serializer(this, "RGWCompleteMultipart");
+ op_ret = serializer->try_lock(this, dur, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "failed to acquire lock" << dendl;
op_ret = -ERR_INTERNAL_ERROR;
return;
}
- op_ret = meta_obj->get_obj_attrs(s->obj_ctx, s->yield);
+ op_ret = meta_obj->get_obj_attrs(s->obj_ctx, s->yield, this);
if (op_ret < 0) {
ldpp_dout(this, 0) << "ERROR: failed to get obj attrs, obj=" << meta_obj
<< " ret=" << op_ret << dendl;
attrs = meta_obj->get_attrs();
do {
- op_ret = list_multipart_parts(store, s, upload_id, meta_oid, max_parts,
+ op_ret = list_multipart_parts(this, store, s, upload_id, meta_oid, max_parts,
marker, obj_parts, &marker, &truncated);
if (op_ret == -ENOENT) {
op_ret = -ERR_NO_SUCH_UPLOAD;
op_ret = -ERR_INVALID_PART;
return;
} else {
- manifest.append(obj_part.manifest, store->svc()->zone);
+ manifest.append(this, obj_part.manifest, store->svc()->zone);
}
bool part_compressed = (obj_part.cs_info.compression_type != "none");
accounted_size += obj_part.accounted_size;
}
} while (truncated);
+
hash.Final((unsigned char *)final_etag);
buf_to_hex((unsigned char *)final_etag, sizeof(final_etag), final_etag_str);
obj_op->params.completeMultipart = true;
obj_op->params.olh_epoch = olh_epoch;
obj_op->params.attrs = &attrs;
+
op_ret = obj_op->prepare(s->yield);
- if (op_ret < 0)
+ if (op_ret < 0) {
return;
+ }
- op_ret = obj_op->write_meta(ofs, accounted_size, s->yield);
- if (op_ret < 0)
+ op_ret = obj_op->write_meta(this, ofs, accounted_size, s->yield);
+ if (op_ret < 0) {
return;
+ }
- // remove the upload obj
+ // remove the upload meta object
string version_id;
- int r = meta_obj->delete_object(s->obj_ctx, ACLOwner(), ACLOwner(), ceph::real_time(), false, 0, version_id, null_yield);
+
+ // remove the upload meta object ; the meta object is not versioned
+ // when the bucket is, as that would add an unneeded delete marker
+ int r = meta_obj->delete_object(this, s->obj_ctx, ACLOwner(), ACLOwner(), ceph::real_time(), false, 0,
+ version_id, null_yield, true /* prevent versioning*/ );
if (r >= 0) {
/* serializer's exclusive lock is released */
serializer->clear_locked();
}
// send request to notification manager
- const auto ret = rgw::notify::publish_commit(s->object.get(), ofs, ceph::real_clock::now(), final_etag_str, event_type, res);
+ const auto ret = rgw::notify::publish_commit(s->object.get(), ofs, ceph::real_clock::now(), final_etag_str, event_type, res, this);
if (ret < 0) {
ldpp_dout(this, 1) << "ERROR: publishing notification failed, with error: " << ret << dendl;
// too late to rollback operation, hence op_ret is not set here
}
-}
+} // RGWCompleteMultipart::execute
void RGWCompleteMultipart::complete()
{
mp.init(s->object->get_name(), upload_id);
meta_oid = mp.get_meta();
- op_ret = get_multipart_info(s, meta_oid, nullptr);
+ op_ret = get_multipart_info(this, s, meta_oid, nullptr);
if (op_ret < 0)
return;
RGWObjectCtx *obj_ctx = static_cast<RGWObjectCtx *>(s->obj_ctx);
- op_ret = abort_multipart_upload(store, s->cct, obj_ctx, s->bucket->get_info(), mp);
+ op_ret = abort_multipart_upload(this, store, s->cct, obj_ctx, s->bucket->get_info(), mp);
}
int RGWListMultipart::verify_permission(optional_yield y)
mp.init(s->object->get_name(), upload_id);
meta_oid = mp.get_meta();
- op_ret = get_multipart_info(s, meta_oid, nullptr);
+ op_ret = get_multipart_info(this, s, meta_oid, nullptr);
if (op_ret < 0)
return;
- op_ret = list_multipart_parts(store, s, upload_id, meta_oid, max_parts,
+ op_ret = list_multipart_parts(this, store, s, upload_id, meta_oid, max_parts,
marker, parts, NULL, &truncated);
}
}
marker_meta = marker.get_meta();
- op_ret = list_bucket_multiparts(store, s->bucket->get_info(), prefix, marker_meta, delimiter,
+ op_ret = list_bucket_multiparts(this, store, s->bucket->get_info(), prefix, marker_meta, delimiter,
max_uploads, &objs, &common_prefixes, &is_truncated);
if (op_ret < 0) {
return;
// verify_object_lock
bool check_obj_lock = obj->have_instance() && bucket->get_info().obj_lock_enabled();
if (check_obj_lock) {
- int get_attrs_response = obj->get_obj_attrs(s->obj_ctx, s->yield);
+ int get_attrs_response = obj->get_obj_attrs(s->obj_ctx, s->yield, this);
if (get_attrs_response < 0) {
if (get_attrs_response == -ENOENT) {
// object maybe delete_marker, skip check_obj_lock
}
// make reservation for notification if needed
const auto versioned_object = s->bucket->versioning_enabled();
- rgw::notify::reservation_t res(store, s, obj.get());
+ rgw::notify::reservation_t res(this, store, s, obj.get());
const auto event_type = versioned_object && obj->get_instance().empty() ?
rgw::notify::ObjectRemovedDeleteMarkerCreated : rgw::notify::ObjectRemovedDelete;
- op_ret = rgw::notify::publish_reserve(event_type, res, nullptr);
+ op_ret = rgw::notify::publish_reserve(this, event_type, res, nullptr);
if (op_ret < 0) {
send_partial_response(*iter, false, "", op_ret);
continue;
obj->set_atomic(obj_ctx);
- op_ret = obj->delete_object(obj_ctx, s->owner, s->bucket_owner, ceph::real_time(),
+ op_ret = obj->delete_object(this, obj_ctx, s->owner, s->bucket_owner, ceph::real_time(),
false, 0, version_id, s->yield);
if (op_ret == -ENOENT) {
op_ret = 0;
const auto etag = obj_state->get_attr(RGW_ATTR_ETAG, etag_bl) ? etag_bl.to_str() : "";
// send request to notification manager
- const auto ret = rgw::notify::publish_commit(obj.get(), obj_state->size, obj_state->mtime, etag, event_type, res);
+ const auto ret = rgw::notify::publish_commit(obj.get(), obj_state->size, obj_state->mtime, etag, event_type, res, this);
if (ret < 0) {
ldpp_dout(this, 1) << "ERROR: publishing notification failed, with error: " << ret << dendl;
// too late to rollback operation, hence op_ret is not set here
optional_yield y)
{
RGWAccessControlPolicy bacl(store->ctx());
- int ret = read_bucket_policy(store, s, binfo, battrs, &bacl, binfo.bucket, y);
+ int ret = read_bucket_policy(dpp, store, s, binfo, battrs, &bacl, binfo.bucket, y);
if (ret < 0) {
return false;
}
ACLOwner bowner;
RGWObjVersionTracker ot;
- int ret = store->get_bucket(s->user.get(), s->user->get_tenant(), path.bucket_name, &bucket, y);
+ int ret = store->get_bucket(dpp, s->user.get(), s->user->get_tenant(), path.bucket_name, &bucket, y);
if (ret < 0) {
goto binfo_fail;
}
- ret = bucket->get_bucket_info(s->yield);
+ ret = bucket->get_bucket_info(dpp, s->yield);
if (ret < 0) {
goto binfo_fail;
}
std::unique_ptr<rgw::sal::RGWObject> obj = bucket->get_object(path.obj_key);
obj->set_atomic(s->obj_ctx);
- ret = obj->delete_object(s->obj_ctx, bowner, bucket_owner, ceph::real_time(), false, 0, version_id, s->yield);
+ ret = obj->delete_object(dpp, s->obj_ctx, bowner, bucket_owner, ceph::real_time(), false, 0,
+ version_id, s->yield);
if (ret < 0) {
goto delop_fail;
}
} else {
- ret = bucket->remove_bucket(false, string(), string(), true, &s->info, s->yield);
+ ret = bucket->remove_bucket(dpp, false, string(), string(), true, &s->info, s->yield);
if (ret < 0) {
goto delop_fail;
}
binfo_fail:
if (-ENOENT == ret) {
- ldpp_dout(s, 20) << "cannot find bucket = " << path.bucket_name << dendl;
+ ldpp_dout(dpp, 20) << "cannot find bucket = " << path.bucket_name << dendl;
num_unfound++;
} else {
- ldpp_dout(s, 20) << "cannot get bucket info, ret = " << ret << dendl;
+ ldpp_dout(dpp, 20) << "cannot get bucket info, ret = " << ret << dendl;
fail_desc_t failed_item = {
.err = ret,
return false;
auth_fail:
- ldpp_dout(s, 20) << "wrong auth for " << path << dendl;
+ ldpp_dout(dpp, 20) << "wrong auth for " << path << dendl;
{
fail_desc_t failed_item = {
.err = ret,
delop_fail:
if (-ENOENT == ret) {
- ldpp_dout(s, 20) << "cannot find entry " << path << dendl;
+ ldpp_dout(dpp, 20) << "cannot find entry " << path << dendl;
num_unfound++;
} else {
fail_desc_t failed_item = {
bool RGWBulkDelete::Deleter::delete_chunk(const std::list<acct_path_t>& paths, optional_yield y)
{
- ldpp_dout(s, 20) << "in delete_chunk" << dendl;
+ ldpp_dout(dpp, 20) << "in delete_chunk" << dendl;
for (auto path : paths) {
- ldpp_dout(s, 20) << "bulk deleting path: " << path << dendl;
+ ldpp_dout(dpp, 20) << "bulk deleting path: " << path << dendl;
delete_single(path, y);
}
if (s->user->get_max_buckets() > 0) {
rgw::sal::RGWBucketList buckets;
std::string marker;
- op_ret = rgw_read_user_buckets(store, s->user->get_user(), buckets,
+ op_ret = rgw_read_user_buckets(this, store, s->user->get_user(), buckets,
marker, std::string(), s->user->get_max_buckets(),
false, y);
if (op_ret < 0) {
placement_rule.storage_class = s->info.storage_class;
forward_req_info(s->cct, info, bucket_name);
- op_ret = store->create_bucket(*s->user, new_bucket,
+ op_ret = store->create_bucket(this, *s->user, new_bucket,
store->get_zonegroup().get_id(),
placement_rule, swift_ver_location,
pquota_info, policy, attrs,
op_ret = store->ctl()->bucket->link_bucket(s->user->get_id(), new_bucket,
out_info.creation_time,
- s->yield, false);
+ s->yield, s, false);
if (op_ret && !existed && op_ret != -EEXIST) {
/* if it exists (or previously existed), don't remove it! */
- op_ret = store->ctl()->bucket->unlink_bucket(s->user->get_id(), new_bucket, s->yield);
+ op_ret = store->ctl()->bucket->unlink_bucket(s->user->get_id(), new_bucket, s->yield, this);
if (op_ret < 0) {
ldpp_dout(this, 0) << "WARNING: failed to unlink bucket: ret=" << op_ret << dendl;
}
optional_yield y)
{
RGWAccessControlPolicy bacl(store->ctx());
- op_ret = read_bucket_policy(store, s, binfo, battrs, &bacl, binfo.bucket, y);
+ op_ret = read_bucket_policy(this, store, s, binfo, battrs, &bacl, binfo.bucket, y);
if (op_ret < 0) {
ldpp_dout(this, 20) << "cannot read_policy() for bucket" << dendl;
return false;
std::unique_ptr<rgw::sal::RGWBucket> bucket;
ACLOwner bowner;
- op_ret = store->get_bucket(s->user.get(), rgw_bucket(rgw_bucket_key(s->user->get_tenant(), bucket_name)), &bucket, y);
+ op_ret = store->get_bucket(this, s->user.get(), rgw_bucket(rgw_bucket_key(s->user->get_tenant(), bucket_name)), &bucket, y);
if (op_ret == -ENOENT) {
ldpp_dout(this, 20) << "non existent directory=" << bucket_name << dendl;
} else if (op_ret < 0) {
s->object->set_atomic(s->obj_ctx);
- op_ret = s->object->get_obj_attrs(s->obj_ctx, s->yield);
+ op_ret = s->object->get_obj_attrs(s->obj_ctx, s->yield, this);
if (op_ret < 0) {
ldpp_dout(this, 0) << "ERROR: failed to get obj attrs, obj=" << s->object
<< " ret=" << op_ret << dendl;
s->object->set_atomic(s->obj_ctx);
- op_ret = s->object->set_obj_attrs(s->obj_ctx, nullptr, &attrs, y);
+ op_ret = s->object->set_obj_attrs(this, s->obj_ctx, nullptr, &attrs, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "ERROR: failed to delete obj attrs, obj=" << s->object
<< " ret=" << op_ret << dendl;
if (!rgw::sal::RGWObject::empty(s->object.get())) {
rgw::sal::RGWAttrs a(attrs);
- op_ret = s->object->set_obj_attrs(s->obj_ctx, &a, nullptr, y);
+ op_ret = s->object->set_obj_attrs(this, s->obj_ctx, &a, nullptr, y);
} else {
for (auto& iter : attrs) {
s->bucket_attrs[iter.first] = std::move(iter.second);
}
op_ret = store->ctl()->bucket->set_bucket_instance_attrs(
s->bucket->get_info(), attrs, &s->bucket->get_info().objv_tracker,
- s->yield);
+ s->yield, this);
}
} /* RGWSetAttrs::execute() */
std::unique_ptr<rgw::sal::RGWObject::ReadOp> stat_op(s->object->get_read_op(s->obj_ctx));
- op_ret = stat_op->prepare(y);
+ op_ret = stat_op->prepare(y, this);
if (op_ret < 0) {
return;
}
head_obj = stat_op->result.head_obj;
- op_ret = stat_op->get_manifest(&manifest, y);
+ op_ret = stat_op->get_manifest(this, &manifest, y);
}
s->bucket->get_info().mdsearch_config = mdsearch_config;
- op_ret = s->bucket->put_instance_info(false, real_time());
+ op_ret = s->bucket->put_instance_info(this, false, real_time());
if (op_ret < 0) {
ldpp_dout(this, 0) << "NOTICE: put_bucket_info on bucket=" << s->bucket->get_name()
<< " returned err=" << op_ret << dendl;
{
s->bucket->get_info().mdsearch_config.clear();
- op_ret = s->bucket->put_instance_info(false, real_time());
+ op_ret = s->bucket->put_instance_info(this, false, real_time());
if (op_ret < 0) {
ldpp_dout(this, 0) << "NOTICE: put_bucket_info on bucket=" << s->bucket->get_name()
<< " returned err=" << op_ret << dendl;
return 0;
}
-int RGWHandler::do_init_permissions(optional_yield y)
+int RGWHandler::do_init_permissions(const DoutPrefixProvider *dpp, optional_yield y)
{
- int ret = rgw_build_bucket_policies(store, s, y);
+ int ret = rgw_build_bucket_policies(dpp, store, s, y);
if (ret < 0) {
- ldpp_dout(s, 10) << "init_permissions on " << s->bucket
+ ldpp_dout(dpp, 10) << "init_permissions on " << s->bucket
<< " failed, ret=" << ret << dendl;
return ret==-ENODATA ? -EACCES : ret;
}
/* already read bucket info */
return 0;
}
- int ret = rgw_build_object_policies(store, s, op->prefetch_data(), y);
+ int ret = rgw_build_object_policies(op, store, s, op->prefetch_data(), y);
if (ret < 0) {
ldpp_dout(op, 10) << "read_permissions on " << s->bucket << ":"
return;
}
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(this, s->user.get(), nullptr, data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 20) << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
return;
}
- op_ret = retry_raced_bucket_write(s->bucket.get(), [&p, this, &attrs] {
+ op_ret = retry_raced_bucket_write(this, s->bucket.get(), [&p, this, &attrs] {
attrs[RGW_ATTR_IAM_POLICY].clear();
attrs[RGW_ATTR_IAM_POLICY].append(p.text);
- op_ret = s->bucket->set_instance_attrs(attrs, s->yield);
+ op_ret = s->bucket->set_instance_attrs(this, attrs, s->yield);
return op_ret;
});
} catch (rgw::IAM::PolicyParseException& e) {
void RGWDeleteBucketPolicy::execute(optional_yield y)
{
- op_ret = retry_raced_bucket_write(s->bucket.get(), [this] {
+ op_ret = retry_raced_bucket_write(this, s->bucket.get(), [this] {
rgw::sal::RGWAttrs attrs(s->bucket_attrs);
attrs.erase(RGW_ATTR_IAM_POLICY);
- op_ret = s->bucket->set_instance_attrs(attrs, s->yield);
+ op_ret = s->bucket->set_instance_attrs(this, attrs, s->yield);
return op_ret;
});
}
try {
RGWXMLDecoder::decode_xml("ObjectLockConfiguration", obj_lock, &parser, true);
} catch (RGWXMLDecoder::err& err) {
- ldout(s->cct, 5) << "unexpected xml:" << err << dendl;
+ ldpp_dout(this, 5) << "unexpected xml:" << err << dendl;
op_ret = -ERR_MALFORMED_XML;
return;
}
return;
}
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(this, s->user.get(), nullptr, data, nullptr, s->info, y);
if (op_ret < 0) {
- ldout(s->cct, 20) << __func__ << "forward_request_to_master returned ret=" << op_ret << dendl;
+ ldpp_dout(this, 20) << __func__ << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
}
- op_ret = retry_raced_bucket_write(s->bucket.get(), [this] {
+ op_ret = retry_raced_bucket_write(this, s->bucket.get(), [this] {
s->bucket->get_info().obj_lock = obj_lock;
- op_ret = s->bucket->put_instance_info(false, real_time());
+ op_ret = s->bucket->put_instance_info(this, false, real_time());
return op_ret;
});
return;
obj_retention.encode(bl);
//check old retention
- op_ret = s->object->get_obj_attrs(s->obj_ctx, s->yield);
+ op_ret = s->object->get_obj_attrs(s->obj_ctx, s->yield, this);
if (op_ret < 0) {
ldpp_dout(this, 0) << "ERROR: get obj attr error"<< dendl;
return;
}
}
- op_ret = s->object->modify_obj_attrs(s->obj_ctx, RGW_ATTR_OBJECT_RETENTION, bl, s->yield);
+ op_ret = s->object->modify_obj_attrs(s->obj_ctx, RGW_ATTR_OBJECT_RETENTION, bl, s->yield, this);
return;
}
op_ret = -ERR_INVALID_REQUEST;
return;
}
- op_ret = s->object->get_obj_attrs(s->obj_ctx, s->yield);
+ op_ret = s->object->get_obj_attrs(s->obj_ctx, s->yield, this);
if (op_ret < 0) {
ldpp_dout(this, 0) << "ERROR: failed to get obj attrs, obj=" << s->object
<< " ret=" << op_ret << dendl;
try {
obj_retention.decode(iter);
} catch (const buffer::error& e) {
- ldout(s->cct, 0) << __func__ << "decode object retention config failed" << dendl;
+ ldpp_dout(this, 0) << __func__ << "decode object retention config failed" << dendl;
op_ret = -EIO;
return;
}
try {
RGWXMLDecoder::decode_xml("LegalHold", obj_legal_hold, &parser, true);
} catch (RGWXMLDecoder::err &err) {
- ldout(s->cct, 5) << "unexpected xml:" << err << dendl;
+ ldpp_dout(this, 5) << "unexpected xml:" << err << dendl;
op_ret = -ERR_MALFORMED_XML;
return;
}
bufferlist bl;
obj_legal_hold.encode(bl);
//if instance is empty, we should modify the latest object
- op_ret = s->object->modify_obj_attrs(s->obj_ctx, RGW_ATTR_OBJECT_LEGAL_HOLD, bl, s->yield);
+ op_ret = s->object->modify_obj_attrs(s->obj_ctx, RGW_ATTR_OBJECT_LEGAL_HOLD, bl, s->yield, this);
return;
}
return;
}
map<string, bufferlist> attrs;
- op_ret = s->object->get_obj_attrs(s->obj_ctx, s->yield);
+ op_ret = s->object->get_obj_attrs(s->obj_ctx, s->yield, this);
if (op_ret < 0) {
ldpp_dout(this, 0) << "ERROR: failed to get obj attrs, obj=" << s->object
<< " ret=" << op_ret << dendl;
try {
obj_legal_hold.decode(iter);
} catch (const buffer::error& e) {
- ldout(s->cct, 0) << __func__ << "decode object legal hold config failed" << dendl;
+ ldpp_dout(this, 0) << __func__ << "decode object legal hold config failed" << dendl;
op_ret = -EIO;
return;
}
void RGWGetBucketPolicyStatus::execute(optional_yield y)
{
- isPublic = (s->iam_policy && rgw::IAM::is_public(*s->iam_policy)) || s->bucket_acl->is_public();
+ isPublic = (s->iam_policy && rgw::IAM::is_public(*s->iam_policy)) || s->bucket_acl->is_public(this);
}
int RGWPutBucketPublicAccessBlock::verify_permission(optional_yield y)
return;
}
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(this, s->user.get(), nullptr, data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
bufferlist bl;
access_conf.encode(bl);
- op_ret = retry_raced_bucket_write(s->bucket.get(), [this, &bl] {
+ op_ret = retry_raced_bucket_write(this, s->bucket.get(), [this, &bl] {
rgw::sal::RGWAttrs attrs(s->bucket_attrs);
attrs[RGW_ATTR_PUBLIC_ACCESS] = bl;
- return s->bucket->set_instance_attrs(attrs, s->yield);
+ return s->bucket->set_instance_attrs(this, attrs, s->yield);
});
}
void RGWDeleteBucketPublicAccessBlock::execute(optional_yield y)
{
- op_ret = retry_raced_bucket_write(s->bucket.get(), [this] {
+ op_ret = retry_raced_bucket_write(this, s->bucket.get(), [this] {
rgw::sal::RGWAttrs attrs(s->bucket_attrs);
attrs.erase(RGW_ATTR_PUBLIC_ACCESS);
- op_ret = s->bucket->set_instance_attrs(attrs, s->yield);
+ op_ret = s->bucket->set_instance_attrs(this, attrs, s->yield);
return op_ret;
});
}
}
}
-int rgw_op_get_bucket_policy_from_attr(CephContext *cct,
+int rgw_op_get_bucket_policy_from_attr(const DoutPrefixProvider *dpp,
+ CephContext *cct,
rgw::sal::RGWStore *store,
RGWBucketInfo& bucket_info,
map<string, bufferlist>& bucket_attrs,
rgw::sal::RGWRadosStore* store{nullptr};
struct req_state *s{nullptr};
- int do_init_permissions(optional_yield y);
+ int do_init_permissions(const DoutPrefixProvider *dpp, optional_yield y);
int do_read_permissions(RGWOp* op, bool only_bucket, optional_yield y);
public:
void execute(optional_yield y) override;
virtual void send_response() override = 0;
- virtual int get_params(optional_yield y) = 0;
+ virtual int get_params(const DoutPrefixProvider *dpp, optional_yield y) = 0;
const char* name() const override { return "put_bucket_tags"; }
virtual uint32_t op_mask() override { return RGW_OP_TYPE_WRITE; }
RGWOpType get_type() override { return RGW_OP_PUT_BUCKET_TAGGING; }
static bool parse_copy_location(const std::string_view& src,
string& bucket_name,
- rgw_obj_key& object);
+ rgw_obj_key& object,
+ struct req_state *s);
void emplace_attr(std::string&& key, buffer::list&& bl) {
attrs.emplace(std::move(key), std::move(bl));
uint32_t op_mask() override { return RGW_OP_TYPE_READ; }
};
-extern int rgw_build_bucket_policies(rgw::sal::RGWRadosStore* store, struct req_state* s, optional_yield y);
-extern int rgw_build_object_policies(rgw::sal::RGWRadosStore *store, struct req_state *s,
+extern int rgw_build_bucket_policies(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore* store, struct req_state* s, optional_yield y);
+extern int rgw_build_object_policies(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *store, struct req_state *s,
bool prefetch_data, optional_yield y);
extern void rgw_build_iam_environment(rgw::sal::RGWRadosStore* store,
struct req_state* s);
string err;
*olh_epoch = strict_strtol(epoch_str.c_str(), 10, &err);
if (!err.empty()) {
- lsubdout(s->cct, rgw, 0) << "failed to parse versioned-epoch param"
+ ldpp_subdout(s, rgw, 0) << "failed to parse versioned-epoch param"
<< dendl;
return -EINVAL;
}
* On failure returns a negative error code.
*
*/
-inline int rgw_get_request_metadata(CephContext* const cct,
+inline int rgw_get_request_metadata(const DoutPrefixProvider *dpp,
+ CephContext* const cct,
struct req_info& info,
std::map<std::string, ceph::bufferlist>& attrs,
const bool allow_empty_attrs = true)
std::string& xattr = kv.second;
if (blocklisted_headers.count(name) == 1) {
- lsubdout(cct, rgw, 10) << "skipping x>> " << name << dendl;
+ ldpp_subdout(dpp, rgw, 10) << "skipping x>> " << name << dendl;
continue;
} else if (allow_empty_attrs || !xattr.empty()) {
- lsubdout(cct, rgw, 10) << "x>> " << name << ":" << xattr << dendl;
+ ldpp_subdout(dpp, rgw, 10) << "x>> " << name << ":" << xattr << dendl;
format_xattr(xattr);
std::string attr_name(RGW_ATTR_PREFIX);
return 0;
}
-int RGWOrphanStore::init()
+int RGWOrphanStore::init(const DoutPrefixProvider *dpp)
{
const rgw_pool& log_pool = store->svc()->zone->get_zone_params().log_pool;
- int r = rgw_init_ioctx(store->getRados()->get_rados_handle(), log_pool, ioctx);
+ int r = rgw_init_ioctx(dpp, store->getRados()->get_rados_handle(), log_pool, ioctx);
if (r < 0) {
cerr << "ERROR: failed to open log pool (" << log_pool << " ret=" << r << std::endl;
return r;
return 0;
}
-int RGWOrphanStore::store_entries(const string& oid, const map<string, bufferlist>& entries)
+int RGWOrphanStore::store_entries(const DoutPrefixProvider *dpp, const string& oid, const map<string, bufferlist>& entries)
{
librados::ObjectWriteOperation op;
op.omap_set(entries);
cout << "storing " << entries.size() << " entries at " << oid << std::endl;
- ldout(store->ctx(), 20) << "storing " << entries.size() << " entries at " << oid << ": " << dendl;
+ ldpp_dout(dpp, 20) << "storing " << entries.size() << " entries at " << oid << ": " << dendl;
for (map<string, bufferlist>::const_iterator iter = entries.begin(); iter != entries.end(); ++iter) {
- ldout(store->ctx(), 20) << " > " << iter->first << dendl;
+ ldpp_dout(dpp, 20) << " > " << iter->first << dendl;
}
- int ret = rgw_rados_operate(ioctx, oid, &op, null_yield);
+ int ret = rgw_rados_operate(dpp, ioctx, oid, &op, null_yield);
if (ret < 0) {
- lderr(store->ctx()) << "ERROR: " << __func__ << "(" << oid << ") returned ret=" << ret << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: " << __func__ << "(" << oid << ") returned ret=" << ret << dendl;
}
return 0;
return 0;
}
-int RGWOrphanSearch::init(const string& job_name, RGWOrphanSearchInfo *info, bool _detailed_mode)
+int RGWOrphanSearch::init(const DoutPrefixProvider *dpp, const string& job_name, RGWOrphanSearchInfo *info, bool _detailed_mode)
{
- int r = orphan_store.init();
+ int r = orphan_store.init(dpp);
if (r < 0) {
return r;
}
RGWOrphanSearchState state;
r = orphan_store.read_job(job_name, state);
if (r < 0 && r != -ENOENT) {
- lderr(store->ctx()) << "ERROR: failed to read state ret=" << r << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: failed to read state ret=" << r << dendl;
return r;
}
r = save_state();
if (r < 0) {
- lderr(store->ctx()) << "ERROR: failed to write state ret=" << r << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: failed to write state ret=" << r << dendl;
return r;
}
} else {
- lderr(store->ctx()) << "ERROR: job not found" << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: job not found" << dendl;
return r;
}
return 0;
}
-int RGWOrphanSearch::log_oids(map<int, string>& log_shards, map<int, list<string> >& oids)
+int RGWOrphanSearch::log_oids(const DoutPrefixProvider *dpp, map<int, string>& log_shards, map<int, list<string> >& oids)
{
map<int, list<string> >::iterator miter = oids.begin();
map<string, bufferlist> entries;
#define MAX_OMAP_SET_ENTRIES 100
for (int j = 0; cur != end && j != MAX_OMAP_SET_ENTRIES; ++cur, ++j) {
- ldout(store->ctx(), 20) << "adding obj: " << *cur << dendl;
+ ldpp_dout(dpp, 20) << "adding obj: " << *cur << dendl;
entries[*cur] = bufferlist();
}
- int ret = orphan_store.store_entries(cur_info.oid, entries);
+ int ret = orphan_store.store_entries(dpp, cur_info.oid, entries);
if (ret < 0) {
return ret;
}
return 0;
}
-int RGWOrphanSearch::build_all_oids_index()
+int RGWOrphanSearch::build_all_oids_index(const DoutPrefixProvider *dpp)
{
librados::IoCtx ioctx;
- int ret = rgw_init_ioctx(store->getRados()->get_rados_handle(), search_info.pool, ioctx);
+ int ret = rgw_init_ioctx(dpp, store->getRados()->get_rados_handle(), search_info.pool, ioctx);
if (ret < 0) {
- lderr(store->ctx()) << __func__ << ": rgw_init_ioctx() returned ret=" << ret << dendl;
+ ldpp_dout(dpp, -1) << __func__ << ": rgw_init_ioctx() returned ret=" << ret << dendl;
return ret;
}
++total;
if (++count >= COUNT_BEFORE_FLUSH) {
ldout(store->ctx(), 1) << "iterated through " << total << " objects" << dendl;
- ret = log_oids(all_objs_index, oids);
+ ret = log_oids(dpp, all_objs_index, oids);
if (ret < 0) {
cerr << __func__ << ": ERROR: log_oids() returned ret=" << ret << std::endl;
return ret;
oids.clear();
}
}
- ret = log_oids(all_objs_index, oids);
+ ret = log_oids(dpp, all_objs_index, oids);
if (ret < 0) {
cerr << __func__ << ": ERROR: log_oids() returned ret=" << ret << std::endl;
return ret;
return 0;
}
-int RGWOrphanSearch::build_buckets_instance_index()
+int RGWOrphanSearch::build_buckets_instance_index(const DoutPrefixProvider *dpp)
{
void *handle;
int max = 1000;
string section = "bucket.instance";
- int ret = store->ctl()->meta.mgr->list_keys_init(section, &handle);
+ int ret = store->ctl()->meta.mgr->list_keys_init(dpp, section, &handle);
if (ret < 0) {
- lderr(store->ctx()) << "ERROR: can't get key: " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: can't get key: " << cpp_strerror(-ret) << dendl;
return ret;
}
list<string> keys;
ret = store->ctl()->meta.mgr->list_keys_next(handle, max, keys, &truncated);
if (ret < 0) {
- lderr(store->ctx()) << "ERROR: lists_keys_next(): " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: lists_keys_next(): " << cpp_strerror(-ret) << dendl;
return ret;
}
for (list<string>::iterator iter = keys.begin(); iter != keys.end(); ++iter) {
++total;
- ldout(store->ctx(), 10) << "bucket_instance=" << *iter << " total=" << total << dendl;
+ ldpp_dout(dpp, 10) << "bucket_instance=" << *iter << " total=" << total << dendl;
int shard = orphan_shard(*iter);
instances[shard].push_back(*iter);
if (++count >= COUNT_BEFORE_FLUSH) {
- ret = log_oids(buckets_instance_index, instances);
+ ret = log_oids(dpp, buckets_instance_index, instances);
if (ret < 0) {
- lderr(store->ctx()) << __func__ << ": ERROR: log_oids() returned ret=" << ret << dendl;
+ ldpp_dout(dpp, -1) << __func__ << ": ERROR: log_oids() returned ret=" << ret << dendl;
return ret;
}
count = 0;
} while (truncated);
- ret = log_oids(buckets_instance_index, instances);
+ ret = log_oids(dpp, buckets_instance_index, instances);
if (ret < 0) {
- lderr(store->ctx()) << __func__ << ": ERROR: log_oids() returned ret=" << ret << dendl;
+ ldpp_dout(dpp, -1) << __func__ << ": ERROR: log_oids() returned ret=" << ret << dendl;
return ret;
}
store->ctl()->meta.mgr->list_keys_complete(handle);
return 0;
}
-int RGWOrphanSearch::handle_stat_result(map<int, list<string> >& oids, RGWRados::Object::Stat::Result& result)
+int RGWOrphanSearch::handle_stat_result(const DoutPrefixProvider *dpp, map<int, list<string> >& oids, RGWRados::Object::Stat::Result& result)
{
set<string> obj_oids;
rgw_bucket& bucket = result.obj.bucket;
if (!detailed_mode &&
manifest.get_obj_size() <= manifest.get_head_size()) {
- ldout(store->ctx(), 5) << "skipping object as it fits in a head" << dendl;
+ ldpp_dout(dpp, 5) << "skipping object as it fits in a head" << dendl;
return 0;
}
RGWObjManifest::obj_iterator miter;
- for (miter = manifest.obj_begin(); miter != manifest.obj_end(); ++miter) {
+ for (miter = manifest.obj_begin(dpp); miter != manifest.obj_end(dpp); ++miter) {
const rgw_raw_obj& loc = miter.get_location().get_raw_obj(store);
string s = loc.oid;
obj_oids.insert(obj_fingerprint(s));
}
for (set<string>::iterator iter = obj_oids.begin(); iter != obj_oids.end(); ++iter) {
- ldout(store->ctx(), 20) << __func__ << ": oid for obj=" << result.obj << ": " << *iter << dendl;
+ ldpp_dout(dpp, 20) << __func__ << ": oid for obj=" << result.obj << ": " << *iter << dendl;
int shard = orphan_shard(*iter);
oids[shard].push_back(*iter);
return 0;
}
-int RGWOrphanSearch::pop_and_handle_stat_op(map<int, list<string> >& oids, std::deque<RGWRados::Object::Stat>& ops)
+int RGWOrphanSearch::pop_and_handle_stat_op(const DoutPrefixProvider *dpp, map<int, list<string> >& oids, std::deque<RGWRados::Object::Stat>& ops)
{
RGWRados::Object::Stat& front_op = ops.front();
int ret = front_op.wait();
if (ret < 0) {
if (ret != -ENOENT) {
- lderr(store->ctx()) << "ERROR: stat_async() returned error: " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: stat_async() returned error: " << cpp_strerror(-ret) << dendl;
}
goto done;
}
- ret = handle_stat_result(oids, front_op.result);
+ ret = handle_stat_result(dpp, oids, front_op.result);
if (ret < 0) {
- lderr(store->ctx()) << "ERROR: handle_stat_response() returned error: " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: handle_stat_response() returned error: " << cpp_strerror(-ret) << dendl;
}
done:
ops.pop_front();
return ret;
}
-int RGWOrphanSearch::build_linked_oids_for_bucket(const string& bucket_instance_id, map<int, list<string> >& oids)
+int RGWOrphanSearch::build_linked_oids_for_bucket(const DoutPrefixProvider *dpp, const string& bucket_instance_id, map<int, list<string> >& oids)
{
RGWObjectCtx obj_ctx(store);
auto sysobj_ctx = store->svc()->sysobj->init_obj_ctx();
int ret = rgw_bucket_parse_bucket_key(store->ctx(), bucket_instance_id,
&orphan_bucket, &shard_id);
if (ret < 0) {
- ldout(store->ctx(),0) << __func__ << " failed to parse bucket instance: "
+ ldpp_dout(dpp, 0) << __func__ << " failed to parse bucket instance: "
<< bucket_instance_id << " skipping" << dendl;
return ret;
}
RGWBucketInfo cur_bucket_info;
ret = store->getRados()->get_bucket_info(store->svc(), orphan_bucket.tenant,
- orphan_bucket.name, cur_bucket_info, nullptr, null_yield);
+ orphan_bucket.name, cur_bucket_info, nullptr, null_yield, dpp);
if (ret < 0) {
if (ret == -ENOENT) {
/* probably raced with bucket removal */
return 0;
}
- lderr(store->ctx()) << __func__ << ": ERROR: RGWRados::get_bucket_instance_info() returned ret=" << ret << dendl;
+ ldpp_dout(dpp, -1) << __func__ << ": ERROR: RGWRados::get_bucket_instance_info() returned ret=" << ret << dendl;
return ret;
}
if (cur_bucket_info.bucket.bucket_id != orphan_bucket.bucket_id) {
- ldout(store->ctx(), 0) << __func__ << ": Skipping stale bucket instance: "
+ ldpp_dout(dpp, 0) << __func__ << ": Skipping stale bucket instance: "
<< orphan_bucket.name << ": "
<< orphan_bucket.bucket_id << dendl;
return 0;
}
if (cur_bucket_info.reshard_status == cls_rgw_reshard_status::IN_PROGRESS) {
- ldout(store->ctx(), 0) << __func__ << ": reshard in progress. Skipping "
+ ldpp_dout(dpp, 0) << __func__ << ": reshard in progress. Skipping "
<< orphan_bucket.name << ": "
<< orphan_bucket.bucket_id << dendl;
return 0;
}
RGWBucketInfo bucket_info;
- ret = store->getRados()->get_bucket_instance_info(sysobj_ctx, bucket_instance_id, bucket_info, nullptr, nullptr, null_yield);
+ ret = store->getRados()->get_bucket_instance_info(sysobj_ctx, bucket_instance_id, bucket_info, nullptr, nullptr, null_yield, dpp);
if (ret < 0) {
if (ret == -ENOENT) {
/* probably raced with bucket removal */
return 0;
}
- lderr(store->ctx()) << __func__ << ": ERROR: RGWRados::get_bucket_instance_info() returned ret=" << ret << dendl;
+ ldpp_dout(dpp, -1) << __func__ << ": ERROR: RGWRados::get_bucket_instance_info() returned ret=" << ret << dendl;
return ret;
}
- ldout(store->ctx(), 10) << "building linked oids for bucket instance: " << bucket_instance_id << dendl;
+ ldpp_dout(dpp, 10) << "building linked oids for bucket instance: " << bucket_instance_id << dendl;
RGWRados::Bucket target(store->getRados(), bucket_info);
RGWRados::Bucket::List list_op(&target);
do {
vector<rgw_bucket_dir_entry> result;
- ret = list_op.list_objects(max_list_bucket_entries,
+ ret = list_op.list_objects(dpp, max_list_bucket_entries,
&result, nullptr, &truncated, null_yield);
if (ret < 0) {
cerr << "ERROR: store->list_objects(): " << cpp_strerror(-ret) << std::endl;
for (vector<rgw_bucket_dir_entry>::iterator iter = result.begin(); iter != result.end(); ++iter) {
rgw_bucket_dir_entry& entry = *iter;
if (entry.key.instance.empty()) {
- ldout(store->ctx(), 20) << "obj entry: " << entry.key.name << dendl;
+ ldpp_dout(dpp, 20) << "obj entry: " << entry.key.name << dendl;
} else {
- ldout(store->ctx(), 20) << "obj entry: " << entry.key.name << " [" << entry.key.instance << "]" << dendl;
+ ldpp_dout(dpp, 20) << "obj entry: " << entry.key.name << " [" << entry.key.instance << "]" << dendl;
}
- ldout(store->ctx(), 20) << __func__ << ": entry.key.name=" << entry.key.name << " entry.key.instance=" << entry.key.instance << dendl;
+ ldpp_dout(dpp, 20) << __func__ << ": entry.key.name=" << entry.key.name << " entry.key.instance=" << entry.key.instance << dendl;
if (!detailed_mode &&
entry.meta.accounted_size <= (uint64_t)store->ctx()->_conf->rgw_max_chunk_size) {
- ldout(store->ctx(),5) << __func__ << "skipping stat as the object " << entry.key.name
+ ldpp_dout(dpp, 5) << __func__ << "skipping stat as the object " << entry.key.name
<< "fits in a head" << dendl;
continue;
}
RGWRados::Object::Stat& op = stat_ops.back();
- ret = op.stat_async();
+ ret = op.stat_async(dpp);
if (ret < 0) {
- lderr(store->ctx()) << "ERROR: stat_async() returned error: " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: stat_async() returned error: " << cpp_strerror(-ret) << dendl;
return ret;
}
if (stat_ops.size() >= max_concurrent_ios) {
- ret = pop_and_handle_stat_op(oids, stat_ops);
+ ret = pop_and_handle_stat_op(dpp, oids, stat_ops);
if (ret < 0) {
if (ret != -ENOENT) {
- lderr(store->ctx()) << "ERROR: stat_async() returned error: " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: stat_async() returned error: " << cpp_strerror(-ret) << dendl;
}
}
}
if (oids.size() >= COUNT_BEFORE_FLUSH) {
- ret = log_oids(linked_objs_index, oids);
+ ret = log_oids(dpp, linked_objs_index, oids);
if (ret < 0) {
cerr << __func__ << ": ERROR: log_oids() returned ret=" << ret << std::endl;
return ret;
} while (truncated);
while (!stat_ops.empty()) {
- ret = pop_and_handle_stat_op(oids, stat_ops);
+ ret = pop_and_handle_stat_op(dpp, oids, stat_ops);
if (ret < 0) {
if (ret != -ENOENT) {
- lderr(store->ctx()) << "ERROR: stat_async() returned error: " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: stat_async() returned error: " << cpp_strerror(-ret) << dendl;
}
}
}
return 0;
}
-int RGWOrphanSearch::build_linked_oids_index()
+int RGWOrphanSearch::build_linked_oids_index(const DoutPrefixProvider *dpp)
{
map<int, list<string> > oids;
map<int, string>::iterator iter = buckets_instance_index.find(search_stage.shard);
for (; iter != buckets_instance_index.end(); ++iter) {
- ldout(store->ctx(), 0) << "building linked oids index: " << iter->first << "/" << buckets_instance_index.size() << dendl;
+ ldpp_dout(dpp, 0) << "building linked oids index: " << iter->first << "/" << buckets_instance_index.size() << dendl;
bool truncated;
string oid = iter->second;
}
if (ret < 0) {
- lderr(store->ctx()) << __func__ << ": ERROR: read_entries() oid=" << oid << " returned ret=" << ret << dendl;
+ ldpp_dout(dpp, -1) << __func__ << ": ERROR: read_entries() oid=" << oid << " returned ret=" << ret << dendl;
return ret;
}
}
for (map<string, bufferlist>::iterator eiter = entries.begin(); eiter != entries.end(); ++eiter) {
- ldout(store->ctx(), 20) << " indexed entry: " << eiter->first << dendl;
- ret = build_linked_oids_for_bucket(eiter->first, oids);
+ ldpp_dout(dpp, 20) << " indexed entry: " << eiter->first << dendl;
+ ret = build_linked_oids_for_bucket(dpp, eiter->first, oids);
if (ret < 0) {
- lderr(store->ctx()) << __func__ << ": ERROR: build_linked_oids_for_bucket() indexed entry=" << eiter->first
+ ldpp_dout(dpp, -1) << __func__ << ": ERROR: build_linked_oids_for_bucket() indexed entry=" << eiter->first
<< " returned ret=" << ret << dendl;
return ret;
}
search_stage.marker.clear();
}
- int ret = log_oids(linked_objs_index, oids);
+ int ret = log_oids(dpp, linked_objs_index, oids);
if (ret < 0) {
cerr << __func__ << ": ERROR: log_oids() returned ret=" << ret << std::endl;
return ret;
return get_next(key, pbl, done);
}
-int RGWOrphanSearch::compare_oid_indexes()
+int RGWOrphanSearch::compare_oid_indexes(const DoutPrefixProvider *dpp)
{
ceph_assert(linked_objs_index.size() == all_objs_index.size());
librados::IoCtx data_ioctx;
- int ret = rgw_init_ioctx(store->getRados()->get_rados_handle(), search_info.pool, data_ioctx);
+ int ret = rgw_init_ioctx(dpp, store->getRados()->get_rados_handle(), search_info.pool, data_ioctx);
if (ret < 0) {
- lderr(store->ctx()) << __func__ << ": rgw_init_ioctx() returned ret=" << ret << dendl;
+ ldpp_dout(dpp, -1) << __func__ << ": rgw_init_ioctx() returned ret=" << ret << dendl;
return ret;
}
}
if (cur_linked == key_fp) {
- ldout(store->ctx(), 20) << "linked: " << key << dendl;
+ ldpp_dout(dpp, 20) << "linked: " << key << dendl;
continue;
}
r = data_ioctx.stat(key, NULL, &mtime);
if (r < 0) {
if (r != -ENOENT) {
- lderr(store->ctx()) << "ERROR: ioctx.stat(" << key << ") returned ret=" << r << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: ioctx.stat(" << key << ") returned ret=" << r << dendl;
}
continue;
}
if (stale_secs && (uint64_t)mtime >= time_threshold) {
- ldout(store->ctx(), 20) << "skipping: " << key << " (mtime=" << mtime << " threshold=" << time_threshold << ")" << dendl;
+ ldpp_dout(dpp, 20) << "skipping: " << key << " (mtime=" << mtime << " threshold=" << time_threshold << ")" << dendl;
continue;
}
- ldout(store->ctx(), 20) << "leaked: " << key << dendl;
+ ldpp_dout(dpp, 20) << "leaked: " << key << dendl;
cout << "leaked: " << key << std::endl;
} while (!done);
}
return 0;
}
-int RGWOrphanSearch::run()
+int RGWOrphanSearch::run(const DoutPrefixProvider *dpp)
{
int r;
switch (search_stage.stage) {
case ORPHAN_SEARCH_STAGE_INIT:
- ldout(store->ctx(), 0) << __func__ << "(): initializing state" << dendl;
+ ldpp_dout(dpp, 0) << __func__ << "(): initializing state" << dendl;
search_stage = RGWOrphanSearchStage(ORPHAN_SEARCH_STAGE_LSPOOL);
r = save_state();
if (r < 0) {
- lderr(store->ctx()) << __func__ << ": ERROR: failed to save state, ret=" << r << dendl;
+ ldpp_dout(dpp, -1) << __func__ << ": ERROR: failed to save state, ret=" << r << dendl;
return r;
}
// fall through
case ORPHAN_SEARCH_STAGE_LSPOOL:
- ldout(store->ctx(), 0) << __func__ << "(): building index of all objects in pool" << dendl;
- r = build_all_oids_index();
+ ldpp_dout(dpp, 0) << __func__ << "(): building index of all objects in pool" << dendl;
+ r = build_all_oids_index(dpp);
if (r < 0) {
- lderr(store->ctx()) << __func__ << ": ERROR: build_all_objs_index returned ret=" << r << dendl;
+ ldpp_dout(dpp, -1) << __func__ << ": ERROR: build_all_objs_index returned ret=" << r << dendl;
return r;
}
search_stage = RGWOrphanSearchStage(ORPHAN_SEARCH_STAGE_LSBUCKETS);
r = save_state();
if (r < 0) {
- lderr(store->ctx()) << __func__ << ": ERROR: failed to save state, ret=" << r << dendl;
+ ldpp_dout(dpp, -1) << __func__ << ": ERROR: failed to save state, ret=" << r << dendl;
return r;
}
// fall through
case ORPHAN_SEARCH_STAGE_LSBUCKETS:
- ldout(store->ctx(), 0) << __func__ << "(): building index of all bucket indexes" << dendl;
- r = build_buckets_instance_index();
+ ldpp_dout(dpp, 0) << __func__ << "(): building index of all bucket indexes" << dendl;
+ r = build_buckets_instance_index(dpp);
if (r < 0) {
- lderr(store->ctx()) << __func__ << ": ERROR: build_all_objs_index returned ret=" << r << dendl;
+ ldpp_dout(dpp, -1) << __func__ << ": ERROR: build_all_objs_index returned ret=" << r << dendl;
return r;
}
search_stage = RGWOrphanSearchStage(ORPHAN_SEARCH_STAGE_ITERATE_BI);
r = save_state();
if (r < 0) {
- lderr(store->ctx()) << __func__ << ": ERROR: failed to save state, ret=" << r << dendl;
+ ldpp_dout(dpp, -1) << __func__ << ": ERROR: failed to save state, ret=" << r << dendl;
return r;
}
// fall through
case ORPHAN_SEARCH_STAGE_ITERATE_BI:
- ldout(store->ctx(), 0) << __func__ << "(): building index of all linked objects" << dendl;
- r = build_linked_oids_index();
+ ldpp_dout(dpp, 0) << __func__ << "(): building index of all linked objects" << dendl;
+ r = build_linked_oids_index(dpp);
if (r < 0) {
- lderr(store->ctx()) << __func__ << ": ERROR: build_all_objs_index returned ret=" << r << dendl;
+ ldpp_dout(dpp, -1) << __func__ << ": ERROR: build_all_objs_index returned ret=" << r << dendl;
return r;
}
search_stage = RGWOrphanSearchStage(ORPHAN_SEARCH_STAGE_COMPARE);
r = save_state();
if (r < 0) {
- lderr(store->ctx()) << __func__ << ": ERROR: failed to save state, ret=" << r << dendl;
+ ldpp_dout(dpp, -1) << __func__ << ": ERROR: failed to save state, ret=" << r << dendl;
return r;
}
// fall through
case ORPHAN_SEARCH_STAGE_COMPARE:
- r = compare_oid_indexes();
+ r = compare_oid_indexes(dpp);
if (r < 0) {
- lderr(store->ctx()) << __func__ << ": ERROR: build_all_objs_index returned ret=" << r << dendl;
+ ldpp_dout(dpp, -1) << __func__ << ": ERROR: build_all_objs_index returned ret=" << r << dendl;
return r;
}
}
-int RGWRadosList::handle_stat_result(RGWRados::Object::Stat::Result& result,
+int RGWRadosList::handle_stat_result(const DoutPrefixProvider *dpp,
+ RGWRados::Object::Stat::Result& result,
std::string& bucket_name,
rgw_obj_key& obj_key,
std::set<string>& obj_oids)
rgw_bucket& bucket = result.obj.bucket;
- ldout(store->ctx(), 20) << "RGWRadosList::" << __func__ <<
+ ldpp_dout(dpp, 20) << "RGWRadosList::" << __func__ <<
" bucket=" << bucket <<
", has_manifest=" << result.manifest.has_value() <<
dendl;
// iterator to store result of dlo/slo attribute find
decltype(result.attrs)::iterator attr_it = result.attrs.end();
const std::string oid = bucket.marker + "_" + result.obj.get_oid();
- ldout(store->ctx(), 20) << "radoslist processing object=\"" <<
+ ldpp_dout(dpp, 20) << "radoslist processing object=\"" <<
oid << "\"" << dendl;
if (visited_oids.find(oid) != visited_oids.end()) {
// apparently we hit a loop; don't continue with this oid
- ldout(store->ctx(), 15) <<
+ ldpp_dout(dpp, 15) <<
"radoslist stopped loop at already visited object=\"" <<
oid << "\"" << dendl;
return 0;
obj_oids.insert(oid);
visited_oids.insert(oid); // prevent dlo loops
- ldout(store->ctx(), 15) << "radoslist added to visited list DLO=\"" <<
+ ldpp_dout(dpp, 15) << "radoslist added to visited list DLO=\"" <<
oid << "\"" << dendl;
char* prefix_path_c = attr_it->second.c_str();
const std::string prefix = prefix_path.substr(sep_pos + 1);
add_bucket_prefix(bucket_name, prefix);
- ldout(store->ctx(), 25) << "radoslist DLO oid=\"" << oid <<
+ ldpp_dout(dpp, 25) << "radoslist DLO oid=\"" << oid <<
"\" added bucket=\"" << bucket_name << "\" prefix=\"" <<
prefix << "\" to process list" << dendl;
} else if ((attr_it = result.attrs.find(RGW_ATTR_SLO_MANIFEST)) !=
obj_oids.insert(oid);
visited_oids.insert(oid); // prevent slo loops
- ldout(store->ctx(), 15) << "radoslist added to visited list SLO=\"" <<
+ ldpp_dout(dpp, 15) << "radoslist added to visited list SLO=\"" <<
oid << "\"" << dendl;
RGWSLOInfo slo_info;
try {
::decode(slo_info, bliter);
} catch (buffer::error& err) {
- ldout(store->ctx(), 0) <<
+ ldpp_dout(dpp, 0) <<
"ERROR: failed to decode slo manifest for " << oid << dendl;
return -EIO;
}
const rgw_obj_key obj_key(obj_name);
add_bucket_filter(bucket_name, obj_key);
- ldout(store->ctx(), 25) << "radoslist SLO oid=\"" << oid <<
+ ldpp_dout(dpp, 25) << "radoslist SLO oid=\"" << oid <<
"\" added bucket=\"" << bucket_name << "\" obj_key=\"" <<
obj_key << "\" to process list" << dendl;
}
// manifest AND empty objects have no manifest, but they're
// realized as empty rados objects
if (0 == manifest.get_max_head_size() ||
- manifest.obj_begin() == manifest.obj_end()) {
+ manifest.obj_begin(dpp) == manifest.obj_end(dpp)) {
obj_oids.insert(oid);
// first_insert = true;
}
RGWObjManifest::obj_iterator miter;
- for (miter = manifest.obj_begin(); miter != manifest.obj_end(); ++miter) {
+ for (miter = manifest.obj_begin(dpp); miter != manifest.obj_end(dpp); ++miter) {
const rgw_raw_obj& loc =
miter.get_location().get_raw_obj(store);
string s = loc.oid;
} // RGWRadosList::handle_stat_result
int RGWRadosList::pop_and_handle_stat_op(
+ const DoutPrefixProvider *dpp,
RGWObjectCtx& obj_ctx,
std::deque<RGWRados::Object::Stat>& ops)
{
int ret = front_op.wait();
if (ret < 0) {
if (ret != -ENOENT) {
- lderr(store->ctx()) << "ERROR: stat_async() returned error: " <<
+ ldpp_dout(dpp, -1) << "ERROR: stat_async() returned error: " <<
cpp_strerror(-ret) << dendl;
}
goto done;
}
- ret = handle_stat_result(front_op.result, bucket_name, obj_key, obj_oids);
+ ret = handle_stat_result(dpp, front_op.result, bucket_name, obj_key, obj_oids);
if (ret < 0) {
- lderr(store->ctx()) << "ERROR: handle_stat_result() returned error: " <<
+ ldpp_dout(dpp, -1) << "ERROR: handle_stat_result() returned error: " <<
cpp_strerror(-ret) << dendl;
}
int RGWRadosList::process_bucket(
+ const DoutPrefixProvider *dpp,
const std::string& bucket_instance_id,
const std::string& prefix,
const std::set<rgw_obj_key>& entries_filter)
{
- ldout(store->ctx(), 10) << "RGWRadosList::" << __func__ <<
+ ldpp_dout(dpp, 10) << "RGWRadosList::" << __func__ <<
" bucket_instance_id=" << bucket_instance_id <<
", prefix=" << prefix <<
", entries_filter.size=" << entries_filter.size() << dendl;
bucket_info,
nullptr,
nullptr,
- null_yield);
+ null_yield,
+ dpp);
if (ret < 0) {
if (ret == -ENOENT) {
// probably raced with bucket removal
return 0;
}
- lderr(store->ctx()) << __func__ <<
+ ldpp_dout(dpp, -1) << __func__ <<
": ERROR: RGWRados::get_bucket_instance_info() returned ret=" <<
ret << dendl;
return ret;
std::vector<rgw_bucket_dir_entry> result;
constexpr int64_t LIST_OBJS_MAX_ENTRIES = 100;
- ret = list_op.list_objects(LIST_OBJS_MAX_ENTRIES, &result,
+ ret = list_op.list_objects(dpp, LIST_OBJS_MAX_ENTRIES, &result,
NULL, &truncated, null_yield);
if (ret == -ENOENT) {
// race with bucket delete?
rgw_bucket_dir_entry& entry = *iter;
if (entry.key.instance.empty()) {
- ldout(store->ctx(), 20) << "obj entry: " << entry.key.name << dendl;
+ ldpp_dout(dpp, 20) << "obj entry: " << entry.key.name << dendl;
} else {
- ldout(store->ctx(), 20) << "obj entry: " << entry.key.name <<
+ ldpp_dout(dpp, 20) << "obj entry: " << entry.key.name <<
" [" << entry.key.instance << "]" << dendl;
}
- ldout(store->ctx(), 20) << __func__ << ": entry.key.name=" <<
+ ldpp_dout(dpp, 20) << __func__ << ": entry.key.name=" <<
entry.key.name << " entry.key.instance=" << entry.key.instance <<
dendl;
stat_ops.push_back(RGWRados::Object::Stat(&op_target));
RGWRados::Object::Stat& op = stat_ops.back();
- ret = op.stat_async();
+ ret = op.stat_async(dpp);
if (ret < 0) {
- lderr(store->ctx()) << "ERROR: stat_async() returned error: " <<
+ ldpp_dout(dpp, -1) << "ERROR: stat_async() returned error: " <<
cpp_strerror(-ret) << dendl;
return ret;
}
if (stat_ops.size() >= max_concurrent_ios) {
- ret = pop_and_handle_stat_op(obj_ctx, stat_ops);
+ ret = pop_and_handle_stat_op(dpp, obj_ctx, stat_ops);
if (ret < 0) {
if (ret != -ENOENT) {
- lderr(store->ctx()) <<
+ ldpp_dout(dpp, -1) <<
"ERROR: pop_and_handle_stat_op() returned error: " <<
cpp_strerror(-ret) << dendl;
}
} while (truncated);
while (!stat_ops.empty()) {
- ret = pop_and_handle_stat_op(obj_ctx, stat_ops);
+ ret = pop_and_handle_stat_op(dpp, obj_ctx, stat_ops);
if (ret < 0) {
if (ret != -ENOENT) {
- lderr(store->ctx()) << "ERROR: stat_async() returned error: " <<
+ ldpp_dout(dpp, -1) << "ERROR: stat_async() returned error: " <<
cpp_strerror(-ret) << dendl;
}
}
}
-int RGWRadosList::run()
+int RGWRadosList::run(const DoutPrefixProvider *dpp)
{
int ret;
void* handle = nullptr;
- ret = store->ctl()->meta.mgr->list_keys_init("bucket", &handle);
+ ret = store->ctl()->meta.mgr->list_keys_init(dpp, "bucket", &handle);
if (ret < 0) {
- lderr(store->ctx()) << "RGWRadosList::" << __func__ <<
+ ldpp_dout(dpp, -1) << "RGWRadosList::" << __func__ <<
" ERROR: list_keys_init returned " <<
cpp_strerror(-ret) << dendl;
return ret;
buckets, &truncated);
for (std::string& bucket_id : buckets) {
- ret = run(bucket_id);
+ ret = run(dpp, bucket_id);
if (ret == -ENOENT) {
continue;
} else if (ret < 0) {
} // RGWRadosList::run()
-int RGWRadosList::run(const std::string& start_bucket_name)
+int RGWRadosList::run(const DoutPrefixProvider *dpp, const std::string& start_bucket_name)
{
RGWSysObjectCtx sys_obj_ctx = store->svc()->sysobj->init_obj_ctx();
RGWObjectCtx obj_ctx(store);
bucket_name,
bucket_info,
nullptr,
- null_yield);
+ null_yield,
+ dpp);
if (ret == -ENOENT) {
std::cerr << "WARNING: bucket " << bucket_name <<
" does not exist; could it have been deleted very recently?" <<
static const std::string empty_prefix;
auto do_process_bucket =
- [&bucket_id, this]
+ [dpp, &bucket_id, this]
(const std::string& prefix,
const std::set<rgw_obj_key>& entries_filter) -> int {
- int ret = process_bucket(bucket_id, prefix, entries_filter);
+ int ret = process_bucket(dpp, bucket_id, prefix, entries_filter);
if (ret == -ENOENT) {
// bucket deletion race?
return 0;
} if (ret < 0) {
- lderr(store->ctx()) << "RGWRadosList::" << __func__ <<
+ ldpp_dout(dpp, -1) << "RGWRadosList::" << __func__ <<
": ERROR: process_bucket(); bucket_id=" <<
bucket_id << " returned ret=" << ret << dendl;
}
start_bucket_name,
bucket_info,
nullptr,
- null_yield);
+ null_yield,
+ dpp);
if (ret == -ENOENT) {
// bucket deletion race?
return 0;
} else if (ret < 0) {
- lderr(store->ctx()) << "RGWRadosList::" << __func__ <<
+ ldpp_dout(dpp, -1) << "RGWRadosList::" << __func__ <<
": ERROR: get_bucket_info returned ret=" << ret << dendl;
return ret;
}
- ret = do_incomplete_multipart(store, bucket_info);
+ ret = do_incomplete_multipart(dpp, store, bucket_info);
if (ret < 0) {
- lderr(store->ctx()) << "RGWRadosList::" << __func__ <<
+ ldpp_dout(dpp, -1) << "RGWRadosList::" << __func__ <<
": ERROR: do_incomplete_multipart returned ret=" << ret << dendl;
return ret;
}
int RGWRadosList::do_incomplete_multipart(
+ const DoutPrefixProvider *dpp,
rgw::sal::RGWRadosStore* store,
RGWBucketInfo& bucket_info)
{
do {
std::vector<rgw_bucket_dir_entry> objs;
std::map<string, bool> common_prefixes;
- ret = list_op.list_objects(max_uploads, &objs, &common_prefixes,
+ ret = list_op.list_objects(dpp, max_uploads, &objs, &common_prefixes,
&is_listing_truncated, null_yield);
if (ret == -ENOENT) {
// could bucket have been removed while this is running?
- ldout(store->ctx(), 20) << "RGWRadosList::" << __func__ <<
+ ldpp_dout(dpp, 5) << "RGWRadosList::" << __func__ <<
": WARNING: call to list_objects of multipart namespace got ENOENT; "
"assuming bucket removal race" << dendl;
break;
} else if (ret < 0) {
- lderr(store->ctx()) << "RGWRadosList::" << __func__ <<
+ ldpp_dout(dpp, -1) << "RGWRadosList::" << __func__ <<
": ERROR: list_objects op returned ret=" << ret << dendl;
return ret;
}
}
entry.obj = obj;
uploads.push_back(entry);
- ldout(store->ctx(), 20) << "RGWRadosList::" << __func__ <<
+ ldpp_dout(dpp, 20) << "RGWRadosList::" << __func__ <<
" processing incomplete multipart entry " <<
entry << dendl;
}
// now process the uploads vector
- int parts_marker = 0;
- bool is_parts_truncated = false;
- do {
- map<uint32_t, RGWUploadPartInfo> parts;
-
- for (const auto& upload : uploads) {
- const RGWMPObj& mp = upload.mp;
- ret = list_multipart_parts(store, bucket_info, store->ctx(),
+ for (const auto& upload : uploads) {
+ const RGWMPObj& mp = upload.mp;
+ int parts_marker = 0;
+ bool is_parts_truncated = false;
+
+
+ do { // while (is_parts_truncated);
+ std::map<uint32_t, RGWUploadPartInfo> parts;
+ ret = list_multipart_parts(dpp, store, bucket_info, store->ctx(),
mp.get_upload_id(), mp.get_meta(),
- max_parts,
- parts_marker, parts, NULL, &is_parts_truncated);
+ max_parts, parts_marker,
+ parts, &parts_marker,
+ &is_parts_truncated);
if (ret == -ENOENT) {
- continue;
+ ldpp_dout(dpp, 5) << "RGWRadosList::" << __func__ <<
+ ": WARNING: list_multipart_parts returned ret=-ENOENT "
+ "for " << mp.get_upload_id() << ", moving on" << dendl;
+ break;
} else if (ret < 0) {
- lderr(store->ctx()) << "RGWRadosList::" << __func__ <<
- ": ERROR: list_multipart_parts returned ret=" << ret << dendl;
+ ldpp_dout(dpp, -1) << "RGWRadosList::" << __func__ <<
+ ": ERROR: list_multipart_parts returned ret=" << ret <<
+ dendl;
return ret;
}
for (auto& p : parts) {
RGWObjManifest& manifest = p.second.manifest;
- for (auto obj_it = manifest.obj_begin();
- obj_it != manifest.obj_end();
+ for (auto obj_it = manifest.obj_begin(dpp);
+ obj_it != manifest.obj_end(dpp);
++obj_it) {
const rgw_raw_obj& loc =
obj_it.get_location().get_raw_obj(store);
std::cout << loc.oid << std::endl;
- }
- }
- }
- } while (is_parts_truncated);
+ } // for (auto obj_it
+ } // for (auto& p
+ } while (is_parts_truncated);
+ } // for (const auto& upload
} // if objs not empty
} while (is_listing_truncated);
librados::IoCtx& get_ioctx() { return ioctx; }
- int init();
+ int init(const DoutPrefixProvider *dpp);
int read_job(const string& job_name, RGWOrphanSearchState& state);
int write_job(const string& job_name, const RGWOrphanSearchState& state);
int list_jobs(map<string,RGWOrphanSearchState> &job_list);
- int store_entries(const string& oid, const map<string, bufferlist>& entries);
+ int store_entries(const DoutPrefixProvider *dpp, const string& oid, const map<string, bufferlist>& entries);
int read_entries(const string& oid, const string& marker, map<string, bufferlist> *entries, bool *truncated);
};
list<string>::iterator end;
};
- int log_oids(map<int, string>& log_shards, map<int, list<string> >& oids);
+ int log_oids(const DoutPrefixProvider *dpp, map<int, string>& log_shards, map<int, list<string> >& oids);
#define RGW_ORPHANSEARCH_HASH_PRIME 7877
int orphan_shard(const string& str) {
return ceph_str_hash_linux(str.c_str(), str.size()) % RGW_ORPHANSEARCH_HASH_PRIME % search_info.num_shards;
}
- int handle_stat_result(map<int, list<string> >& oids, RGWRados::Object::Stat::Result& result);
- int pop_and_handle_stat_op(map<int, list<string> >& oids, std::deque<RGWRados::Object::Stat>& ops);
+ int handle_stat_result(const DoutPrefixProvider *dpp, map<int, list<string> >& oids, RGWRados::Object::Stat::Result& result);
+ int pop_and_handle_stat_op(const DoutPrefixProvider *dpp, map<int, list<string> >& oids, std::deque<RGWRados::Object::Stat>& ops);
int remove_index(map<int, string>& index);
return orphan_store.write_job(search_info.job_name, state);
}
- int init(const string& job_name, RGWOrphanSearchInfo *info, bool _detailed_mode=false);
+ int init(const DoutPrefixProvider *dpp, const string& job_name, RGWOrphanSearchInfo *info, bool _detailed_mode=false);
int create(const string& job_name, int num_shards);
- int build_all_oids_index();
- int build_buckets_instance_index();
- int build_linked_oids_for_bucket(const string& bucket_instance_id, map<int, list<string> >& oids);
- int build_linked_oids_index();
- int compare_oid_indexes();
+ int build_all_oids_index(const DoutPrefixProvider *dpp);
+ int build_buckets_instance_index(const DoutPrefixProvider *dpp);
+ int build_linked_oids_for_bucket(const DoutPrefixProvider *dpp, const string& bucket_instance_id, map<int, list<string> >& oids);
+ int build_linked_oids_index(const DoutPrefixProvider *dpp);
+ int compare_oid_indexes(const DoutPrefixProvider *dpp);
- int run();
+ int run(const DoutPrefixProvider *dpp);
int finish();
};
bool include_rgw_obj_name;
std::string field_separator;
- int handle_stat_result(RGWRados::Object::Stat::Result& result,
+ int handle_stat_result(const DoutPrefixProvider *dpp,
+ RGWRados::Object::Stat::Result& result,
std::string& bucket_name,
rgw_obj_key& obj_key,
std::set<string>& obj_oids);
- int pop_and_handle_stat_op(RGWObjectCtx& obj_ctx,
+ int pop_and_handle_stat_op(const DoutPrefixProvider *dpp,
+ RGWObjectCtx& obj_ctx,
std::deque<RGWRados::Object::Stat>& ops);
public:
include_rgw_obj_name(false)
{}
- int process_bucket(const std::string& bucket_instance_id,
+ int process_bucket(const DoutPrefixProvider *dpp,
+ const std::string& bucket_instance_id,
const std::string& prefix,
const std::set<rgw_obj_key>& entries_filter);
- int do_incomplete_multipart(rgw::sal::RGWRadosStore* store,
+ int do_incomplete_multipart(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore* store,
RGWBucketInfo& bucket_info);
int build_linked_oids_index();
- int run(const std::string& bucket_id);
- int run();
+ int run(const DoutPrefixProvider *dpp, const std::string& bucket_id);
+ int run(const DoutPrefixProvider *dpp);
// if there's a non-empty field separator, that means we'll display
// bucket and object names
}
s->info.args.set(p);
- s->info.args.parse();
+ s->info.args.parse(s);
if (*req_name != '/')
return 0;
return new RGWOTPMetadataObject(std::move(devices), objv, mtime);
}
- int do_get(RGWSI_MetaBackend_Handler::Op *op, string& entry, RGWMetadataObject **obj, optional_yield y) override {
+ int do_get(RGWSI_MetaBackend_Handler::Op *op, string& entry, RGWMetadataObject **obj, optional_yield y, const DoutPrefixProvider *dpp) override {
RGWObjVersionTracker objv_tracker;
std::unique_ptr<RGWOTPMetadataObject> mdo(new RGWOTPMetadataObject);
&mdo->get_devs(),
&mdo->get_mtime(),
&objv_tracker,
- y);
+ y,
+ dpp);
if (ret < 0) {
return ret;
}
int do_put(RGWSI_MetaBackend_Handler::Op *op, string& entry,
RGWMetadataObject *_obj, RGWObjVersionTracker& objv_tracker,
optional_yield y,
+ const DoutPrefixProvider *dpp,
RGWMDLogSyncType type, bool from_remote_zone) override {
RGWOTPMetadataObject *obj = static_cast<RGWOTPMetadataObject *>(_obj);
RGWSI_OTP_BE_Ctx be_ctx(op->ctx());
- int ret = svc.otp->store_all(be_ctx,
+ int ret = svc.otp->store_all(dpp, be_ctx,
entry,
obj->devices,
obj->mtime,
}
int do_remove(RGWSI_MetaBackend_Handler::Op *op, string& entry, RGWObjVersionTracker& objv_tracker,
- optional_yield y) override {
+ optional_yield y, const DoutPrefixProvider *dpp) override {
RGWSI_MBOTP_RemoveParams params;
RGWSI_OTP_BE_Ctx be_ctx(op->ctx());
- return svc.otp->remove_all(be_ctx,
+ return svc.otp->remove_all(dpp, be_ctx,
entry,
&objv_tracker,
y);
int RGWOTPCtl::read_all(const rgw_user& uid,
RGWOTPInfo *info,
optional_yield y,
+ const DoutPrefixProvider *dpp,
const GetParams& params)
{
info->uid = uid;
return meta_handler->call([&](RGWSI_OTP_BE_Ctx& ctx) {
- return svc.otp->read_all(ctx, uid, &info->devices, params.mtime, params.objv_tracker, y);
+ return svc.otp->read_all(ctx, uid, &info->devices, params.mtime, params.objv_tracker, y, dpp);
});
}
-int RGWOTPCtl::store_all(const RGWOTPInfo& info,
+int RGWOTPCtl::store_all(const DoutPrefixProvider *dpp,
+ const RGWOTPInfo& info,
optional_yield y,
const PutParams& params)
{
return meta_handler->call([&](RGWSI_OTP_BE_Ctx& ctx) {
- return svc.otp->store_all(ctx, info.uid, info.devices, params.mtime, params.objv_tracker, y);
+ return svc.otp->store_all(dpp, ctx, info.uid, info.devices, params.mtime, params.objv_tracker, y);
});
}
-int RGWOTPCtl::remove_all(const rgw_user& uid,
+int RGWOTPCtl::remove_all(const DoutPrefixProvider *dpp,
+ const rgw_user& uid,
optional_yield y,
const RemoveParams& params)
{
return meta_handler->call([&](RGWSI_OTP_BE_Ctx& ctx) {
- return svc.otp->remove_all(ctx, uid, params.objv_tracker, y);
+ return svc.otp->remove_all(dpp, ctx, uid, params.objv_tracker, y);
});
}
};
int read_all(const rgw_user& uid, RGWOTPInfo *info, optional_yield y,
+ const DoutPrefixProvider *dpp,
const GetParams& params = {});
- int store_all(const RGWOTPInfo& info, optional_yield y,
+ int store_all(const DoutPrefixProvider *dpp,
+ const RGWOTPInfo& info, optional_yield y,
const PutParams& params = {});
- int remove_all(const rgw_user& user, optional_yield y,
+ int remove_all(const DoutPrefixProvider *dpp,
+ const rgw_user& user, optional_yield y,
const RemoveParams& params = {});
};
~Impl();
Cursor get_current() const { return current_cursor; }
- Cursor attach(RGWPeriod&& period, optional_yield y);
+ Cursor attach(const DoutPrefixProvider *dpp, RGWPeriod&& period, optional_yield y);
Cursor insert(RGWPeriod&& period);
Cursor lookup(epoch_t realm_epoch);
histories.clear_and_dispose(std::default_delete<History>{});
}
-Cursor RGWPeriodHistory::Impl::attach(RGWPeriod&& period, optional_yield y)
+Cursor RGWPeriodHistory::Impl::attach(const DoutPrefixProvider *dpp, RGWPeriod&& period, optional_yield y)
{
if (current_history == histories.end()) {
return Cursor{-EINVAL};
}
if (predecessor_id.empty()) {
- lderr(cct) << "reached a period with an empty predecessor id" << dendl;
+ ldpp_dout(dpp, -1) << "reached a period with an empty predecessor id" << dendl;
return Cursor{-EINVAL};
}
// pull the period outside of the lock
- int r = puller->pull(predecessor_id, period, y);
+ int r = puller->pull(dpp, predecessor_id, period, y);
if (r < 0) {
return Cursor{r};
}
{
return impl->get_current();
}
-Cursor RGWPeriodHistory::attach(RGWPeriod&& period, optional_yield y)
+Cursor RGWPeriodHistory::attach(const DoutPrefixProvider *dpp, RGWPeriod&& period, optional_yield y)
{
- return impl->attach(std::move(period), y);
+ return impl->attach(dpp, std::move(period), y);
}
Cursor RGWPeriodHistory::insert(RGWPeriod&& period)
{
#include "include/ceph_assert.h"
#include "include/types.h"
#include "common/async/yield_context.h"
+#include "common/dout.h"
namespace bi = boost::intrusive;
public:
virtual ~Puller() = default;
- virtual int pull(const std::string& period_id, RGWPeriod& period,
+ virtual int pull(const DoutPrefixProvider *dpp, const std::string& period_id, RGWPeriod& period,
optional_yield y) = 0;
};
/// current_period and the given period, reading predecessor periods or
/// fetching them from the master as necessary. returns a cursor at the
/// given period that can be used to traverse the current_history
- Cursor attach(RGWPeriod&& period, optional_yield y);
+ Cursor attach(const DoutPrefixProvider *dpp, RGWPeriod&& period, optional_yield y);
/// insert the given period into an existing history, or create a new
/// unconnected history. similar to attach(), but it doesn't try to fetch
namespace {
// pull the given period over the connection
-int pull_period(RGWRESTConn* conn, const std::string& period_id,
+int pull_period(const DoutPrefixProvider *dpp, RGWRESTConn* conn, const std::string& period_id,
const std::string& realm_id, RGWPeriod& period,
optional_yield y)
{
bufferlist data;
#define MAX_REST_RESPONSE (128 * 1024)
- int r = conn->forward(user, info, nullptr, MAX_REST_RESPONSE, nullptr, &data, y);
+ int r = conn->forward(dpp, user, info, nullptr, MAX_REST_RESPONSE, nullptr, &data, y);
if (r < 0) {
return r;
}
} // anonymous namespace
-int RGWPeriodPuller::pull(const std::string& period_id, RGWPeriod& period,
+int RGWPeriodPuller::pull(const DoutPrefixProvider *dpp, const std::string& period_id, RGWPeriod& period,
optional_yield y)
{
// try to read the period from rados
period.set_id(period_id);
period.set_epoch(0);
- int r = period.init(cct, svc.sysobj, y);
+ int r = period.init(dpp, cct, svc.sysobj, y);
if (r < 0) {
if (svc.zone->is_meta_master()) {
// can't pull if we're the master
- ldout(cct, 1) << "metadata master failed to read period "
+ ldpp_dout(dpp, 1) << "metadata master failed to read period "
<< period_id << " from local storage: " << cpp_strerror(r) << dendl;
return r;
}
- ldout(cct, 14) << "pulling period " << period_id
+ ldpp_dout(dpp, 14) << "pulling period " << period_id
<< " from master" << dendl;
// request the period from the master zone
- r = pull_period(svc.zone->get_master_conn(), period_id,
+ r = pull_period(dpp, svc.zone->get_master_conn(), period_id,
svc.zone->get_realm().get_id(), period, y);
if (r < 0) {
- lderr(cct) << "failed to pull period " << period_id << dendl;
+ ldpp_dout(dpp, -1) << "failed to pull period " << period_id << dendl;
return r;
}
// write the period to rados
- r = period.store_info(true, y);
+ r = period.store_info(dpp, true, y);
if (r == -EEXIST) {
r = 0;
} else if (r < 0) {
- lderr(cct) << "failed to store period " << period_id << dendl;
+ ldpp_dout(dpp, -1) << "failed to store period " << period_id << dendl;
return r;
}
// update latest epoch
- r = period.update_latest_epoch(period.get_epoch(), y);
+ r = period.update_latest_epoch(dpp, period.get_epoch(), y);
if (r == -EEXIST) {
// already have this epoch (or a more recent one)
return 0;
}
if (r < 0) {
- lderr(cct) << "failed to update latest_epoch for period "
+ ldpp_dout(dpp, -1) << "failed to update latest_epoch for period "
<< period_id << dendl;
return r;
}
// reflect period objects if this is the latest version
if (svc.zone->get_realm().get_current_period() == period_id) {
- r = period.reflect(y);
+ r = period.reflect(dpp, y);
if (r < 0) {
return r;
}
}
- ldout(cct, 14) << "period " << period_id
+ ldpp_dout(dpp, 14) << "period " << period_id
<< " pulled and written to local storage" << dendl;
} else {
- ldout(cct, 14) << "found period " << period_id
+ ldpp_dout(dpp, 14) << "found period " << period_id
<< " in local storage" << dendl;
}
return 0;
public:
explicit RGWPeriodPuller(RGWSI_Zone *zone_svc, RGWSI_SysObj *sysobj_svc);
- int pull(const std::string& period_id, RGWPeriod& period, optional_yield y) override;
+ int pull(const DoutPrefixProvider *dpp, const std::string& period_id, RGWPeriod& period, optional_yield y) override;
};
#endif // CEPH_RGW_PERIOD_PULLER_H
counter(0)
{}
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
};
-int PushAndRetryCR::operate()
+int PushAndRetryCR::operate(const DoutPrefixProvider *dpp)
{
reenter(this) {
for (;;) {
yield {
- ldout(cct, 10) << "pushing period " << period.get_id()
+ ldpp_dout(dpp, 10) << "pushing period " << period.get_id()
<< " to " << zone << dendl;
// initialize the http params
rgw_http_param_pair params[] = {
// stop on success
if (get_ret_status() == 0) {
- ldout(cct, 10) << "push to " << zone << " succeeded" << dendl;
+ ldpp_dout(dpp, 10) << "push to " << zone << " succeeded" << dendl;
return set_cr_done();
}
utime_t dur;
dur.set_from_double(timeout);
- ldout(cct, 10) << "waiting " << dur << "s for retry.." << dendl;
+ ldpp_dout(dpp, 10) << "waiting " << dur << "s for retry.." << dendl;
wait(dur);
timeout *= 2;
conns(std::move(conns))
{}
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
};
-int PushAllCR::operate()
+int PushAllCR::operate(const DoutPrefixProvider *dpp)
{
reenter(this) {
// spawn a coroutine to push the period over each connection
yield {
- ldout(cct, 4) << "sending " << conns.size() << " periods" << dendl;
+ ldpp_dout(dpp, 4) << "sending " << conns.size() << " periods" << dendl;
for (auto& c : conns)
spawn(new PushAndRetryCR(cct, c.first, &c.second, http, period), false);
}
}
/// A background thread to run the PushAllCR coroutine and exit.
-class RGWPeriodPusher::CRThread {
+class RGWPeriodPusher::CRThread : public DoutPrefixProvider {
+ CephContext* cct;
RGWCoroutinesManager coroutines;
RGWHTTPManager http;
boost::intrusive_ptr<PushAllCR> push_all;
public:
CRThread(CephContext* cct, RGWPeriod&& period,
std::map<std::string, RGWRESTConn>&& conns)
- : coroutines(cct, NULL),
+ : cct(cct), coroutines(cct, NULL),
http(cct, coroutines.get_completion_mgr()),
push_all(new PushAllCR(cct, &http, std::move(period), std::move(conns)))
{
http.start();
// must spawn the CR thread after start
- thread = std::thread([this] { coroutines.run(push_all.get()); });
+ thread = std::thread([this] { coroutines.run(this, push_all.get()); });
}
~CRThread()
{
if (thread.joinable())
thread.join();
}
+
+ CephContext *get_cct() const override { return cct; }
+ unsigned get_subsys() const override { return dout_subsys; }
+ std::ostream& gen_prefix(std::ostream& out) const override { return out << "rgw period pusher CR thread: "; }
};
-RGWPeriodPusher::RGWPeriodPusher(rgw::sal::RGWRadosStore* store,
+RGWPeriodPusher::RGWPeriodPusher(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore* store,
optional_yield y)
: cct(store->ctx()), store(store)
{
// always send out the current period on startup
RGWPeriod period;
- int r = period.init(cct, store->svc()->sysobj, realm_id, y, realm.get_name());
+ int r = period.init(dpp, cct, store->svc()->sysobj, realm_id, y, realm.get_name());
if (r < 0) {
- lderr(cct) << "failed to load period for realm " << realm_id << dendl;
+ ldpp_dout(dpp, -1) << "failed to load period for realm " << realm_id << dendl;
return;
}
class RGWPeriodPusher final : public RGWRealmWatcher::Watcher,
public RGWRealmReloader::Pauser {
public:
- explicit RGWPeriodPusher(rgw::sal::RGWRadosStore* store, optional_yield y);
+ explicit RGWPeriodPusher(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore* store, optional_yield y);
~RGWPeriodPusher() override;
/// respond to realm notifications by pushing new periods to other zones
void RGWProcess::RGWWQ::_process(RGWRequest *req, ThreadPool::TPHandle &) {
perfcounter->inc(l_rgw_qactive);
- process->handle_request(req);
+ process->handle_request(this, req);
process->req_throttle.put(1);
perfcounter->inc(l_rgw_qactive, -1);
}
abort_early(s, nullptr, init_error, nullptr, yield);
goto done;
}
- dout(10) << "handler=" << typeid(*handler).name() << dendl;
+ ldpp_dout(s, 10) << "handler=" << typeid(*handler).name() << dendl;
should_log = mgr->get_logging();
goto done;
}
req->op = op;
- dout(10) << "op=" << typeid(*op).name() << dendl;
+ ldpp_dout(op, 10) << "op=" << typeid(*op).name() << dendl;
s->op_type = op->get_type();
int sock_fd;
std::string uri_prefix;
- struct RGWWQ : public ThreadPool::WorkQueue<RGWRequest> {
+ struct RGWWQ : public DoutPrefixProvider, public ThreadPool::WorkQueue<RGWRequest> {
RGWProcess* process;
RGWWQ(RGWProcess* p, ceph::timespan timeout, ceph::timespan suicide_timeout,
ThreadPool* tp)
void _clear() override {
ceph_assert(process->m_req_queue.empty());
}
+
+ CephContext *get_cct() const override { return process->cct; }
+ unsigned get_subsys() const { return ceph_subsys_rgw; }
+ std::ostream& gen_prefix(std::ostream& out) const { return out << "rgw request work queue: ";}
+
} req_wq;
public:
virtual ~RGWProcess() = default;
virtual void run() = 0;
- virtual void handle_request(RGWRequest *req) = 0;
+ virtual void handle_request(const DoutPrefixProvider *dpp, RGWRequest *req) = 0;
void pause() {
m_tp.pause();
}
void run() override;
- void handle_request(RGWRequest* req) override;
+ void handle_request(const DoutPrefixProvider *dpp, RGWRequest* req) override;
};
class RGWProcessControlThread : public Thread {
RGWProcess(cct, pe, num_threads, _conf) {}
void run() override;
void checkpoint();
- void handle_request(RGWRequest* req) override;
+ void handle_request(const DoutPrefixProvider *dpp, RGWRequest* req) override;
void gen_request(const string& method, const string& resource,
int content_length, std::atomic<bool>* fail_flag);
get_meta_obj(&meta_obj);
}
-int RGWPubSub::remove(const rgw_raw_obj& obj,
+int RGWPubSub::remove(const DoutPrefixProvider *dpp,
+ const rgw_raw_obj& obj,
RGWObjVersionTracker *objv_tracker,
optional_yield y)
{
- int ret = rgw_delete_system_obj(store->svc()->sysobj, obj.pool, obj.oid, objv_tracker, y);
+ int ret = rgw_delete_system_obj(dpp, store->svc()->sysobj, obj.pool, obj.oid, objv_tracker, y);
if (ret < 0) {
return ret;
}
return 0;
}
-int RGWPubSub::write_topics(const rgw_pubsub_topics& topics,
+int RGWPubSub::write_topics(const DoutPrefixProvider *dpp, const rgw_pubsub_topics& topics,
RGWObjVersionTracker *objv_tracker, optional_yield y)
{
- int ret = write(meta_obj, topics, objv_tracker, y);
+ int ret = write(dpp, meta_obj, topics, objv_tracker, y);
if (ret < 0 && ret != -ENOENT) {
- ldout(store->ctx(), 1) << "ERROR: failed to write topics info: ret=" << ret << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to write topics info: ret=" << ret << dendl;
return ret;
}
return 0;
return 0;
}
-int RGWPubSub::Bucket::write_topics(const rgw_pubsub_bucket_topics& topics,
+int RGWPubSub::Bucket::write_topics(const DoutPrefixProvider *dpp, const rgw_pubsub_bucket_topics& topics,
RGWObjVersionTracker *objv_tracker,
optional_yield y)
{
- int ret = ps->write(bucket_meta_obj, topics, objv_tracker, y);
+ int ret = ps->write(dpp, bucket_meta_obj, topics, objv_tracker, y);
if (ret < 0) {
ldout(ps->store->ctx(), 1) << "ERROR: failed to write bucket topics info: ret=" << ret << dendl;
return ret;
return 0;
}
-int RGWPubSub::Bucket::create_notification(const string& topic_name, const rgw::notify::EventTypeList& events, optional_yield y) {
- return create_notification(topic_name, events, std::nullopt, "", y);
+int RGWPubSub::Bucket::create_notification(const DoutPrefixProvider *dpp, const string& topic_name, const rgw::notify::EventTypeList& events, optional_yield y) {
+ return create_notification(dpp, topic_name, events, std::nullopt, "", y);
}
-int RGWPubSub::Bucket::create_notification(const string& topic_name,const rgw::notify::EventTypeList& events, OptionalFilter s3_filter, const std::string& notif_name, optional_yield y) {
+int RGWPubSub::Bucket::create_notification(const DoutPrefixProvider *dpp, const string& topic_name,const rgw::notify::EventTypeList& events, OptionalFilter s3_filter, const std::string& notif_name, optional_yield y) {
rgw_pubsub_topic_subs topic_info;
- rgw::sal::RGWRadosStore *store = ps->store;
int ret = ps->get_topic(topic_name, &topic_info);
if (ret < 0) {
- ldout(store->ctx(), 1) << "ERROR: failed to read topic '" << topic_name << "' info: ret=" << ret << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to read topic '" << topic_name << "' info: ret=" << ret << dendl;
return ret;
}
- ldout(store->ctx(), 20) << "successfully read topic '" << topic_name << "' info" << dendl;
+ ldpp_dout(dpp, 20) << "successfully read topic '" << topic_name << "' info" << dendl;
RGWObjVersionTracker objv_tracker;
rgw_pubsub_bucket_topics bucket_topics;
ret = read_topics(&bucket_topics, &objv_tracker);
if (ret < 0) {
- ldout(store->ctx(), 1) << "ERROR: failed to read topics from bucket '" <<
+ ldpp_dout(dpp, 1) << "ERROR: failed to read topics from bucket '" <<
bucket.name << "': ret=" << ret << dendl;
return ret;
}
- ldout(store->ctx(), 20) << "successfully read " << bucket_topics.topics.size() << " topics from bucket '" <<
+ ldpp_dout(dpp, 20) << "successfully read " << bucket_topics.topics.size() << " topics from bucket '" <<
bucket.name << "'" << dendl;
auto& topic_filter = bucket_topics.topics[topic_name];
topic_filter.s3_filter = *s3_filter;
}
- ret = write_topics(bucket_topics, &objv_tracker, y);
+ ret = write_topics(dpp, bucket_topics, &objv_tracker, y);
if (ret < 0) {
- ldout(store->ctx(), 1) << "ERROR: failed to write topics to bucket '" << bucket.name << "': ret=" << ret << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to write topics to bucket '" << bucket.name << "': ret=" << ret << dendl;
return ret;
}
- ldout(store->ctx(), 20) << "successfully wrote " << bucket_topics.topics.size() << " topics to bucket '" << bucket.name << "'" << dendl;
+ ldpp_dout(dpp, 20) << "successfully wrote " << bucket_topics.topics.size() << " topics to bucket '" << bucket.name << "'" << dendl;
return 0;
}
-int RGWPubSub::Bucket::remove_notification(const string& topic_name, optional_yield y)
+int RGWPubSub::Bucket::remove_notification(const DoutPrefixProvider *dpp, const string& topic_name, optional_yield y)
{
rgw_pubsub_topic_subs topic_info;
- rgw::sal::RGWRadosStore *store = ps->store;
int ret = ps->get_topic(topic_name, &topic_info);
if (ret < 0) {
- ldout(store->ctx(), 1) << "ERROR: failed to read topic info: ret=" << ret << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to read topic info: ret=" << ret << dendl;
return ret;
}
ret = read_topics(&bucket_topics, &objv_tracker);
if (ret < 0) {
- ldout(store->ctx(), 1) << "ERROR: failed to read bucket topics info: ret=" << ret << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to read bucket topics info: ret=" << ret << dendl;
return ret;
}
bucket_topics.topics.erase(topic_name);
- ret = write_topics(bucket_topics, &objv_tracker, y);
+ ret = write_topics(dpp, bucket_topics, &objv_tracker, y);
if (ret < 0) {
- ldout(store->ctx(), 1) << "ERROR: failed to write topics info: ret=" << ret << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to write topics info: ret=" << ret << dendl;
return ret;
}
return 0;
}
-int RGWPubSub::Bucket::remove_notifications(optional_yield y)
+int RGWPubSub::Bucket::remove_notifications(const DoutPrefixProvider *dpp, optional_yield y)
{
// get all topics on a bucket
rgw_pubsub_bucket_topics bucket_topics;
auto ret = get_topics(&bucket_topics);
if (ret < 0 && ret != -ENOENT) {
- ldout(ps->store->ctx(), 1) << "ERROR: failed to get list of topics from bucket '" << bucket.name << "', ret=" << ret << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to get list of topics from bucket '" << bucket.name << "', ret=" << ret << dendl;
return ret ;
}
// remove all auto-genrated topics
for (const auto& topic : bucket_topics.topics) {
const auto& topic_name = topic.first;
- ret = ps->remove_topic(topic_name, y);
+ ret = ps->remove_topic(dpp, topic_name, y);
if (ret < 0 && ret != -ENOENT) {
- ldout(ps->store->ctx(), 5) << "WARNING: failed to remove auto-generated topic '" << topic_name << "', ret=" << ret << dendl;
+ ldpp_dout(dpp, 5) << "WARNING: failed to remove auto-generated topic '" << topic_name << "', ret=" << ret << dendl;
}
}
// delete all notification of on a bucket
- ret = ps->remove(bucket_meta_obj, nullptr, y);
+ ret = ps->remove(dpp, bucket_meta_obj, nullptr, y);
if (ret < 0 && ret != -ENOENT) {
- ldout(ps->store->ctx(), 1) << "ERROR: failed to remove bucket topics: ret=" << ret << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to remove bucket topics: ret=" << ret << dendl;
return ret;
}
return 0;
}
-int RGWPubSub::create_topic(const string& name, optional_yield y) {
- return create_topic(name, rgw_pubsub_sub_dest(), "", "", y);
+int RGWPubSub::create_topic(const DoutPrefixProvider *dpp, const string& name, optional_yield y) {
+ return create_topic(dpp, name, rgw_pubsub_sub_dest(), "", "", y);
}
-int RGWPubSub::create_topic(const string& name, const rgw_pubsub_sub_dest& dest, const std::string& arn, const std::string& opaque_data, optional_yield y) {
+int RGWPubSub::create_topic(const DoutPrefixProvider *dpp, const string& name, const rgw_pubsub_sub_dest& dest, const std::string& arn, const std::string& opaque_data, optional_yield y) {
RGWObjVersionTracker objv_tracker;
rgw_pubsub_topics topics;
int ret = read_topics(&topics, &objv_tracker);
if (ret < 0 && ret != -ENOENT) {
// its not an error if not topics exist, we create one
- ldout(store->ctx(), 1) << "ERROR: failed to read topics info: ret=" << ret << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to read topics info: ret=" << ret << dendl;
return ret;
}
new_topic.topic.arn = arn;
new_topic.topic.opaque_data = opaque_data;
- ret = write_topics(topics, &objv_tracker, y);
+ ret = write_topics(dpp, topics, &objv_tracker, y);
if (ret < 0) {
- ldout(store->ctx(), 1) << "ERROR: failed to write topics info: ret=" << ret << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to write topics info: ret=" << ret << dendl;
return ret;
}
return 0;
}
-int RGWPubSub::remove_topic(const string& name, optional_yield y)
+int RGWPubSub::remove_topic(const DoutPrefixProvider *dpp, const string& name, optional_yield y)
{
RGWObjVersionTracker objv_tracker;
rgw_pubsub_topics topics;
int ret = read_topics(&topics, &objv_tracker);
if (ret < 0 && ret != -ENOENT) {
- ldout(store->ctx(), 1) << "ERROR: failed to read topics info: ret=" << ret << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to read topics info: ret=" << ret << dendl;
return ret;
} else if (ret == -ENOENT) {
// its not an error if no topics exist, just a no-op
- ldout(store->ctx(), 10) << "WARNING: failed to read topics info, deletion is a no-op: ret=" << ret << dendl;
+ ldpp_dout(dpp, 10) << "WARNING: failed to read topics info, deletion is a no-op: ret=" << ret << dendl;
return 0;
}
topics.topics.erase(name);
- ret = write_topics(topics, &objv_tracker, y);
+ ret = write_topics(dpp, topics, &objv_tracker, y);
if (ret < 0) {
- ldout(store->ctx(), 1) << "ERROR: failed to remove topics info: ret=" << ret << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to remove topics info: ret=" << ret << dendl;
return ret;
}
return 0;
}
-int RGWPubSub::Sub::write_sub(const rgw_pubsub_sub_config& sub_conf,
+int RGWPubSub::Sub::write_sub(const DoutPrefixProvider *dpp,
+ const rgw_pubsub_sub_config& sub_conf,
RGWObjVersionTracker *objv_tracker,
optional_yield y)
{
- int ret = ps->write(sub_meta_obj, sub_conf, objv_tracker, y);
+ int ret = ps->write(dpp, sub_meta_obj, sub_conf, objv_tracker, y);
if (ret < 0) {
- ldout(ps->store->ctx(), 1) << "ERROR: failed to write subscription info: ret=" << ret << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to write subscription info: ret=" << ret << dendl;
return ret;
}
return 0;
}
-int RGWPubSub::Sub::remove_sub(RGWObjVersionTracker *objv_tracker,
+int RGWPubSub::Sub::remove_sub(const DoutPrefixProvider *dpp, RGWObjVersionTracker *objv_tracker,
optional_yield y)
{
- int ret = ps->remove(sub_meta_obj, objv_tracker, y);
+ int ret = ps->remove(dpp, sub_meta_obj, objv_tracker, y);
if (ret < 0) {
- ldout(ps->store->ctx(), 1) << "ERROR: failed to remove subscription info: ret=" << ret << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to remove subscription info: ret=" << ret << dendl;
return ret;
}
return read_sub(result, nullptr);
}
-int RGWPubSub::Sub::subscribe(const string& topic, const rgw_pubsub_sub_dest& dest, optional_yield y, const std::string& s3_id)
+int RGWPubSub::Sub::subscribe(const DoutPrefixProvider *dpp, const string& topic, const rgw_pubsub_sub_dest& dest, optional_yield y, const std::string& s3_id)
{
RGWObjVersionTracker objv_tracker;
rgw_pubsub_topics topics;
- rgw::sal::RGWRadosStore *store = ps->store;
int ret = ps->read_topics(&topics, &objv_tracker);
if (ret < 0) {
- ldout(store->ctx(), 1) << "ERROR: failed to read topics info: ret=" << ret << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to read topics info: ret=" << ret << dendl;
return ret != -ENOENT ? ret : -EINVAL;
}
auto iter = topics.topics.find(topic);
if (iter == topics.topics.end()) {
- ldout(store->ctx(), 1) << "ERROR: cannot add subscription to topic: topic not found" << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: cannot add subscription to topic: topic not found" << dendl;
return -EINVAL;
}
t.subs.insert(sub);
- ret = ps->write_topics(topics, &objv_tracker, y);
+ ret = ps->write_topics(dpp, topics, &objv_tracker, y);
if (ret < 0) {
- ldout(store->ctx(), 1) << "ERROR: failed to write topics info: ret=" << ret << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to write topics info: ret=" << ret << dendl;
return ret;
}
- ret = write_sub(sub_conf, nullptr, y);
+ ret = write_sub(dpp, sub_conf, nullptr, y);
if (ret < 0) {
- ldout(store->ctx(), 1) << "ERROR: failed to write subscription info: ret=" << ret << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to write subscription info: ret=" << ret << dendl;
return ret;
}
return 0;
}
-int RGWPubSub::Sub::unsubscribe(const string& _topic, optional_yield y)
+int RGWPubSub::Sub::unsubscribe(const DoutPrefixProvider *dpp, const string& _topic, optional_yield y)
{
string topic = _topic;
RGWObjVersionTracker sobjv_tracker;
- rgw::sal::RGWRadosStore *store = ps->store;
if (topic.empty()) {
rgw_pubsub_sub_config sub_conf;
int ret = read_sub(&sub_conf, &sobjv_tracker);
if (ret < 0) {
- ldout(store->ctx(), 1) << "ERROR: failed to read subscription info: ret=" << ret << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to read subscription info: ret=" << ret << dendl;
return ret;
}
topic = sub_conf.topic;
int ret = ps->read_topics(&topics, &objv_tracker);
if (ret < 0) {
// not an error - could be that topic was already deleted
- ldout(store->ctx(), 10) << "WARNING: failed to read topics info: ret=" << ret << dendl;
+ ldpp_dout(dpp, 10) << "WARNING: failed to read topics info: ret=" << ret << dendl;
} else {
auto iter = topics.topics.find(topic);
if (iter != topics.topics.end()) {
t.subs.erase(sub);
- ret = ps->write_topics(topics, &objv_tracker, y);
+ ret = ps->write_topics(dpp, topics, &objv_tracker, y);
if (ret < 0) {
- ldout(store->ctx(), 1) << "ERROR: failed to write topics info: ret=" << ret << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to write topics info: ret=" << ret << dendl;
return ret;
}
}
}
- ret = remove_sub(&sobjv_tracker, y);
+ ret = remove_sub(dpp, &sobjv_tracker, y);
if (ret < 0) {
- ldout(store->ctx(), 1) << "ERROR: failed to delete subscription info: ret=" << ret << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to delete subscription info: ret=" << ret << dendl;
return ret;
}
return 0;
}
template<typename EventType>
-int RGWPubSub::SubWithEvents<EventType>::list_events(const string& marker, int max_events)
+int RGWPubSub::SubWithEvents<EventType>::list_events(const DoutPrefixProvider *dpp, const string& marker, int max_events)
{
RGWRados *store = ps->store->getRados();
rgw_pubsub_sub_config sub_conf;
int ret = get_conf(&sub_conf);
if (ret < 0) {
- ldout(store->ctx(), 1) << "ERROR: failed to read sub config: ret=" << ret << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to read sub config: ret=" << ret << dendl;
return ret;
}
return 0;
}
if (ret < 0) {
- ldout(store->ctx(), 1) << "ERROR: failed to read bucket info for events bucket: bucket=" << sub_conf.dest.bucket_name << " ret=" << ret << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to read bucket info for events bucket: bucket=" << sub_conf.dest.bucket_name << " ret=" << ret << dendl;
return ret;
}
std::vector<rgw_bucket_dir_entry> objs;
- ret = list_op.list_objects(max_events, &objs, nullptr, &list.is_truncated, null_yield);
+ ret = list_op.list_objects(dpp, max_events, &objs, nullptr, &list.is_truncated, null_yield);
if (ret < 0) {
- ldout(store->ctx(), 1) << "ERROR: failed to list bucket: bucket=" << sub_conf.dest.bucket_name << " ret=" << ret << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to list bucket: bucket=" << sub_conf.dest.bucket_name << " ret=" << ret << dendl;
return ret;
}
if (list.is_truncated) {
try {
bl.decode_base64(bl64);
} catch (buffer::error& err) {
- ldout(store->ctx(), 1) << "ERROR: failed to event (not a valid base64)" << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to event (not a valid base64)" << dendl;
continue;
}
EventType event;
try {
decode(event, iter);
} catch (buffer::error& err) {
- ldout(store->ctx(), 1) << "ERROR: failed to decode event" << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to decode event" << dendl;
continue;
};
}
template<typename EventType>
-int RGWPubSub::SubWithEvents<EventType>::remove_event(const string& event_id)
+int RGWPubSub::SubWithEvents<EventType>::remove_event(const DoutPrefixProvider *dpp, const string& event_id)
{
rgw::sal::RGWRadosStore *store = ps->store;
rgw_pubsub_sub_config sub_conf;
int ret = get_conf(&sub_conf);
if (ret < 0) {
- ldout(store->ctx(), 1) << "ERROR: failed to read sub config: ret=" << ret << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to read sub config: ret=" << ret << dendl;
return ret;
}
string tenant;
ret = store->getRados()->get_bucket_info(store->svc(), tenant, sub_conf.dest.bucket_name, bucket_info, nullptr, null_yield, nullptr);
if (ret < 0) {
- ldout(store->ctx(), 1) << "ERROR: failed to read bucket info for events bucket: bucket=" << sub_conf.dest.bucket_name << " ret=" << ret << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to read bucket info for events bucket: bucket=" << sub_conf.dest.bucket_name << " ret=" << ret << dendl;
return ret;
}
del_op.params.bucket_owner = bucket_info.owner;
del_op.params.versioning_status = bucket_info.versioning_status();
- ret = del_op.delete_obj(null_yield);
+ ret = del_op.delete_obj(null_yield, dpp);
if (ret < 0) {
- ldout(store->ctx(), 1) << "ERROR: failed to remove event (obj=" << obj << "): ret=" << ret << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to remove event (obj=" << obj << "): ret=" << ret << dendl;
}
return 0;
}
int read(const rgw_raw_obj& obj, T* data, RGWObjVersionTracker* objv_tracker);
template <class T>
- int write(const rgw_raw_obj& obj, const T& info,
+ int write(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, const T& info,
RGWObjVersionTracker* obj_tracker, optional_yield y);
- int remove(const rgw_raw_obj& obj, RGWObjVersionTracker* objv_tracker,
+ int remove(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, RGWObjVersionTracker* objv_tracker,
optional_yield y);
int read_topics(rgw_pubsub_topics *result, RGWObjVersionTracker* objv_tracker);
- int write_topics(const rgw_pubsub_topics& topics,
+ int write_topics(const DoutPrefixProvider *dpp, const rgw_pubsub_topics& topics,
RGWObjVersionTracker* objv_tracker, optional_yield y);
public:
// set the list of topics associated with a bucket
// use version tacker to enforce atomicity between read/write
// return 0 on success, error code otherwise
- int write_topics(const rgw_pubsub_bucket_topics& topics,
+ int write_topics(const DoutPrefixProvider *dpp, const rgw_pubsub_bucket_topics& topics,
RGWObjVersionTracker* objv_tracker, optional_yield y);
public:
Bucket(RGWPubSub *_ps, const rgw_bucket& _bucket) : ps(_ps), bucket(_bucket) {
// for S3 compliant notifications the version with: s3_filter and notif_name should be used
// return -ENOENT if the topic does not exists
// return 0 on success, error code otherwise
- int create_notification(const string& topic_name, const rgw::notify::EventTypeList& events, optional_yield y);
- int create_notification(const string& topic_name, const rgw::notify::EventTypeList& events, OptionalFilter s3_filter, const std::string& notif_name, optional_yield y);
+ int create_notification(const DoutPrefixProvider *dpp, const string& topic_name, const rgw::notify::EventTypeList& events, optional_yield y);
+ int create_notification(const DoutPrefixProvider *dpp, const string& topic_name, const rgw::notify::EventTypeList& events, OptionalFilter s3_filter, const std::string& notif_name, optional_yield y);
// remove a topic and filter from bucket
// if the topic does not exists on the bucket it is a no-op (considered success)
// return -ENOENT if the topic does not exists
// return 0 on success, error code otherwise
- int remove_notification(const string& topic_name, optional_yield y);
+ int remove_notification(const DoutPrefixProvider *dpp, const string& topic_name, optional_yield y);
// remove all notifications (and autogenerated topics) associated with the bucket
// return 0 on success or if no topic was associated with the bucket, error code otherwise
- int remove_notifications(optional_yield y);
+ int remove_notifications(const DoutPrefixProvider *dpp, optional_yield y);
};
// base class for subscription
rgw_raw_obj sub_meta_obj;
int read_sub(rgw_pubsub_sub_config *result, RGWObjVersionTracker* objv_tracker);
- int write_sub(const rgw_pubsub_sub_config& sub_conf,
+ int write_sub(const DoutPrefixProvider *dpp, const rgw_pubsub_sub_config& sub_conf,
RGWObjVersionTracker* objv_tracker, optional_yield y);
- int remove_sub(RGWObjVersionTracker* objv_tracker, optional_yield y);
+ int remove_sub(const DoutPrefixProvider *dpp, RGWObjVersionTracker* objv_tracker, optional_yield y);
public:
Sub(RGWPubSub *_ps, const std::string& _sub) : ps(_ps), sub(_sub) {
ps->get_sub_meta_obj(sub, &sub_meta_obj);
virtual ~Sub() = default;
- int subscribe(const string& topic_name, const rgw_pubsub_sub_dest& dest, optional_yield y,
+ int subscribe(const DoutPrefixProvider *dpp, const string& topic_name, const rgw_pubsub_sub_dest& dest, optional_yield y,
const std::string& s3_id="");
- int unsubscribe(const string& topic_name, optional_yield y);
+ int unsubscribe(const DoutPrefixProvider *dpp, const string& topic_name, optional_yield y);
int get_conf(rgw_pubsub_sub_config* result);
static const int DEFAULT_MAX_EVENTS = 100;
// followint virtual methods should only be called in derived
- virtual int list_events(const string& marker, int max_events) {ceph_assert(false);}
- virtual int remove_event(const string& event_id) {ceph_assert(false);}
+ virtual int list_events(const DoutPrefixProvider *dpp, const string& marker, int max_events) {ceph_assert(false);}
+ virtual int remove_event(const DoutPrefixProvider *dpp, const string& event_id) {ceph_assert(false);}
virtual void dump(Formatter* f) const {ceph_assert(false);}
};
virtual ~SubWithEvents() = default;
- int list_events(const string& marker, int max_events) override;
- int remove_event(const string& event_id) override;
+ int list_events(const DoutPrefixProvider *dpp, const string& marker, int max_events) override;
+ int remove_event(const DoutPrefixProvider *dpp, const string& event_id) override;
void dump(Formatter* f) const override;
};
// create a topic with a name only
// if the topic already exists it is a no-op (considered success)
// return 0 on success, error code otherwise
- int create_topic(const string& name, optional_yield y);
+ int create_topic(const DoutPrefixProvider *dpp, const string& name, optional_yield y);
// create a topic with push destination information and ARN
// if the topic already exists the destination and ARN values may be updated (considered succsess)
// return 0 on success, error code otherwise
- int create_topic(const string& name, const rgw_pubsub_sub_dest& dest, const std::string& arn, const std::string& opaque_data, optional_yield y);
+ int create_topic(const DoutPrefixProvider *dpp, const string& name, const rgw_pubsub_sub_dest& dest, const std::string& arn, const std::string& opaque_data, optional_yield y);
// remove a topic according to its name
// if the topic does not exists it is a no-op (considered success)
// return 0 on success, error code otherwise
- int remove_topic(const string& name, optional_yield y);
+ int remove_topic(const DoutPrefixProvider *dpp, const string& name, optional_yield y);
};
}
template <class T>
-int RGWPubSub::write(const rgw_raw_obj& obj, const T& info,
+int RGWPubSub::write(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, const T& info,
RGWObjVersionTracker* objv_tracker, optional_yield y)
{
bufferlist bl;
encode(info, bl);
- int ret = rgw_put_system_obj(obj_ctx, obj.pool, obj.oid,
+ int ret = rgw_put_system_obj(dpp, obj_ctx, obj.pool, obj.oid,
bl, false, objv_tracker,
real_time(), y);
if (ret < 0) {
}
// send message to endpoint
- int send_request() override {
+ int send_request(const DoutPrefixProvider *dpp) override {
init_new_io(this);
const auto rc = sync_env->http_manager->add_request(this);
if (rc < 0) {
topic(_topic), conn(_conn), message(_message) {}
// send message to endpoint, without waiting for reply
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
const auto rc = amqp::publish(conn, topic, message);
if (rc < 0) {
topic(_topic), conn(_conn), message(_message) {}
// send message to endpoint, waiting for reply
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
yield {
init_new_io(this);
topic(_topic), conn(_conn), message(_message) {}
// send message to endpoint, without waiting for reply
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
const auto rc = kafka::publish(conn, topic, message);
if (rc < 0) {
topic(_topic), conn(_conn), message(_message) {}
// send message to endpoint, waiting for reply
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
yield {
init_new_io(this);
int RadosWriter::set_stripe_obj(const rgw_raw_obj& raw_obj)
{
stripe_obj = store->svc()->rados->obj(raw_obj);
- return stripe_obj.open();
+ return stripe_obj.open(dpp);
}
int RadosWriter::process(bufferlist&& bl, uint64_t offset)
continue;
}
- int r = store->delete_raw_obj(obj);
+ int r = store->delete_raw_obj(dpp, obj);
if (r < 0 && r != -ENOENT) {
ldpp_dout(dpp, 0) << "WARNING: failed to remove obj (" << obj << "), leaked" << dendl;
}
if (need_to_remove_head) {
std::string version_id;
ldpp_dout(dpp, 5) << "NOTE: we are going to process the head obj (" << *raw_head << ")" << dendl;
- int r = head_obj->delete_object(&obj_ctx, ACLOwner(), bucket->get_acl_owner(), ceph::real_time(),
+ int r = head_obj->delete_object(dpp, &obj_ctx, ACLOwner(), bucket->get_acl_owner(), ceph::real_time(),
false, 0, version_id, null_yield);
if (r < 0 && r != -ENOENT) {
ldpp_dout(dpp, 0) << "WARNING: failed to remove obj (" << *raw_head << "), leaked" << dendl;
rgw_raw_obj stripe_obj = manifest_gen.get_cur_obj(store);
uint64_t chunk_size = 0;
- r = store->get_raw_chunk_size(stripe_obj, &chunk_size);
+ r = store->get_raw_chunk_size(dpp, stripe_obj, &chunk_size);
if (r < 0) {
return r;
}
uint64_t chunk_size = 0;
uint64_t alignment;
- int r = head_obj->get_max_chunk_size(bucket->get_placement_rule(),
+ int r = head_obj->get_max_chunk_size(dpp, bucket->get_placement_rule(),
&max_head_chunk_size, &alignment);
if (r < 0) {
return r;
if (bucket->get_placement_rule() != tail_placement_rule) {
if (!head_obj->placement_rules_match(bucket->get_placement_rule(), tail_placement_rule)) {
same_pool = false;
- r = head_obj->get_max_chunk_size(tail_placement_rule, &chunk_size);
+ r = head_obj->get_max_chunk_size(dpp, tail_placement_rule, &chunk_size);
if (r < 0) {
return r;
}
return r;
}
- r = obj_op->write_meta(actual_size, accounted_size, y);
+ r = obj_op->write_meta(dpp, actual_size, accounted_size, y);
if (r < 0) {
return r;
}
uint64_t stripe_size;
uint64_t alignment;
- int r = target_obj->get_max_chunk_size(tail_placement_rule, &chunk_size, &alignment);
+ int r = target_obj->get_max_chunk_size(dpp, tail_placement_rule, &chunk_size, &alignment);
if (r < 0) {
ldpp_dout(dpp, 0) << "ERROR: unexpected: get_max_chunk_size(): placement_rule=" << tail_placement_rule.to_str() << " obj=" << target_obj << " returned r=" << r << dendl;
return r;
return r;
}
- r = obj_op->write_meta(actual_size, accounted_size, y);
+ r = obj_op->write_meta(dpp, actual_size, accounted_size, y);
if (r < 0)
return r;
bucket->get_object(rgw_obj_key(mp.get_meta(), std::string(), RGW_OBJ_NS_MULTIPART));
meta_obj->set_in_extra_data(true);
- r = meta_obj->omap_set_val_by_key(p, bl, true, null_yield);
+ r = meta_obj->omap_set_val_by_key(dpp, p, bl, true, null_yield);
if (r < 0) {
return r == -ENOENT ? -ERR_NO_SUCH_UPLOAD : r;
}
int AppendObjectProcessor::prepare(optional_yield y)
{
RGWObjState *astate;
- int r = head_obj->get_obj_state(&obj_ctx, *bucket, &astate, y);
+ int r = head_obj->get_obj_state(dpp, &obj_ctx, *bucket, &astate, y);
if (r < 0) {
return r;
}
rgw_raw_obj stripe_obj = manifest_gen.get_cur_obj(store);
uint64_t chunk_size = 0;
- r = store->get_raw_chunk_size(stripe_obj, &chunk_size);
+ r = store->get_raw_chunk_size(dpp, stripe_obj, &chunk_size);
if (r < 0) {
return r;
}
//For Append obj, disable versioning
obj_op->params.versioning_disabled = true;
if (cur_manifest) {
- cur_manifest->append(manifest, store->svc()->zone);
+ cur_manifest->append(dpp, manifest, store->svc()->zone);
obj_op->params.manifest = cur_manifest;
} else {
obj_op->params.manifest = &manifest;
if (r < 0) {
return r;
}
- r = obj_op->write_meta(actual_size + cur_size, accounted_size + *cur_accounted_size, y);
+ r = obj_op->write_meta(dpp, actual_size + cur_size, accounted_size + *cur_accounted_size, y);
if (r < 0) {
return r;
}
}
};
- virtual int fetch_stats_from_storage(const rgw_user& user, const rgw_bucket& bucket, RGWStorageStats& stats, optional_yield y) = 0;
+ virtual int fetch_stats_from_storage(const rgw_user& user, const rgw_bucket& bucket, RGWStorageStats& stats, optional_yield y, const DoutPrefixProvider *dpp) = 0;
virtual bool map_find(const rgw_user& user, const rgw_bucket& bucket, RGWQuotaCacheStats& qs) = 0;
async_refcount->put_wait(); /* wait for all pending async requests to complete */
}
- int get_stats(const rgw_user& user, const rgw_bucket& bucket, RGWStorageStats& stats, RGWQuotaInfo& quota, optional_yield y);
+ int get_stats(const rgw_user& user, const rgw_bucket& bucket, RGWStorageStats& stats, RGWQuotaInfo& quota, optional_yield y, const DoutPrefixProvider *dpp);
void adjust_stats(const rgw_user& user, rgw_bucket& bucket, int objs_delta, uint64_t added_bytes, uint64_t removed_bytes);
virtual bool can_use_cached_stats(RGWQuotaInfo& quota, RGWStorageStats& stats);
}
template<class T>
-int RGWQuotaCache<T>::get_stats(const rgw_user& user, const rgw_bucket& bucket, RGWStorageStats& stats, RGWQuotaInfo& quota, optional_yield y) {
+int RGWQuotaCache<T>::get_stats(const rgw_user& user, const rgw_bucket& bucket, RGWStorageStats& stats, RGWQuotaInfo& quota, optional_yield y, const DoutPrefixProvider *dpp) {
RGWQuotaCacheStats qs;
utime_t now = ceph_clock_now();
if (map_find(user, bucket, qs)) {
}
}
- int ret = fetch_stats_from_storage(user, bucket, stats, y);
+ int ret = fetch_stats_from_storage(user, bucket, stats, y, dpp);
if (ret < 0 && ret != -ENOENT)
return ret;
auto obj_ctx = store->svc()->sysobj->init_obj_ctx();
- int r = store->getRados()->get_bucket_instance_info(obj_ctx, bucket, bucket_info, NULL, NULL, null_yield);
+ const DoutPrefix dp(store->ctx(), dout_subsys, "rgw bucket async refresh handler: ");
+ int r = store->getRados()->get_bucket_instance_info(obj_ctx, bucket, bucket_info, NULL, NULL, null_yield, &dp);
if (r < 0) {
- ldout(store->ctx(), 0) << "could not get bucket info for bucket=" << bucket << " r=" << r << dendl;
+ ldpp_dout(&dp, 0) << "could not get bucket info for bucket=" << bucket << " r=" << r << dendl;
return r;
}
- ldout(store->ctx(), 20) << "initiating async quota refresh for bucket=" << bucket << dendl;
+ ldpp_dout(&dp, 20) << "initiating async quota refresh for bucket=" << bucket << dendl;
- r = store->getRados()->get_bucket_stats_async(bucket_info, RGW_NO_SHARD, this);
+ r = store->getRados()->get_bucket_stats_async(&dp, bucket_info, RGW_NO_SHARD, this);
if (r < 0) {
- ldout(store->ctx(), 0) << "could not get bucket info for bucket=" << bucket.name << dendl;
+ ldpp_dout(&dp, 0) << "could not get bucket info for bucket=" << bucket.name << dendl;
/* get_bucket_stats_async() dropped our reference already */
return r;
stats_map.add(bucket, qs);
}
- int fetch_stats_from_storage(const rgw_user& user, const rgw_bucket& bucket, RGWStorageStats& stats, optional_yield y) override;
+ int fetch_stats_from_storage(const rgw_user& user, const rgw_bucket& bucket, RGWStorageStats& stats, optional_yield y, const DoutPrefixProvider *dpp) override;
public:
explicit RGWBucketStatsCache(rgw::sal::RGWRadosStore *_store) : RGWQuotaCache<rgw_bucket>(_store, _store->ctx()->_conf->rgw_bucket_quota_cache_size) {
}
};
-int RGWBucketStatsCache::fetch_stats_from_storage(const rgw_user& user, const rgw_bucket& bucket, RGWStorageStats& stats, optional_yield y)
+int RGWBucketStatsCache::fetch_stats_from_storage(const rgw_user& user, const rgw_bucket& bucket, RGWStorageStats& stats, optional_yield y, const DoutPrefixProvider *dpp)
{
RGWBucketInfo bucket_info;
RGWSysObjectCtx obj_ctx = store->svc()->sysobj->init_obj_ctx();
- int r = store->getRados()->get_bucket_instance_info(obj_ctx, bucket, bucket_info, NULL, NULL, y);
+ int r = store->getRados()->get_bucket_instance_info(obj_ctx, bucket, bucket_info, NULL, NULL, y, dpp);
if (r < 0) {
- ldout(store->ctx(), 0) << "could not get bucket info for bucket=" << bucket << " r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "could not get bucket info for bucket=" << bucket << " r=" << r << dendl;
return r;
}
string master_ver;
map<RGWObjCategory, RGWStorageStats> bucket_stats;
- r = store->getRados()->get_bucket_stats(bucket_info, RGW_NO_SHARD, &bucket_ver,
+ r = store->getRados()->get_bucket_stats(dpp, bucket_info, RGW_NO_SHARD, &bucket_ver,
&master_ver, bucket_stats, nullptr);
if (r < 0) {
- ldout(store->ctx(), 0) << "could not get bucket stats for bucket="
+ ldpp_dout(dpp, 0) << "could not get bucket stats for bucket="
<< bucket.name << dendl;
return r;
}
class UserAsyncRefreshHandler : public RGWQuotaCache<rgw_user>::AsyncRefreshHandler,
public RGWGetUserStats_CB {
+ const DoutPrefixProvider *dpp;
rgw_bucket bucket;
public:
- UserAsyncRefreshHandler(rgw::sal::RGWRadosStore *_store, RGWQuotaCache<rgw_user> *_cache,
+ UserAsyncRefreshHandler(const DoutPrefixProvider *_dpp, rgw::sal::RGWRadosStore *_store, RGWQuotaCache<rgw_user> *_cache,
const rgw_user& _user, const rgw_bucket& _bucket) :
RGWQuotaCache<rgw_user>::AsyncRefreshHandler(_store, _cache),
RGWGetUserStats_CB(_user),
+ dpp(_dpp),
bucket(_bucket) {}
void drop_reference() override { put(); }
int UserAsyncRefreshHandler::init_fetch()
{
- ldout(store->ctx(), 20) << "initiating async quota refresh for user=" << user << dendl;
- int r = store->ctl()->user->read_stats_async(user, this);
+ ldpp_dout(dpp, 20) << "initiating async quota refresh for user=" << user << dendl;
+ int r = store->ctl()->user->read_stats_async(dpp, user, this);
if (r < 0) {
- ldout(store->ctx(), 0) << "could not get bucket info for user=" << user << dendl;
+ ldpp_dout(dpp, 0) << "could not get bucket info for user=" << user << dendl;
/* get_bucket_stats_async() dropped our reference already */
return r;
}
class RGWUserStatsCache : public RGWQuotaCache<rgw_user> {
+ const DoutPrefixProvider *dpp;
std::atomic<bool> down_flag = { false };
ceph::shared_mutex mutex = ceph::make_shared_mutex("RGWUserStatsCache");
map<rgw_bucket, rgw_user> modified_buckets;
rgw_bucket bucket = iter->first;
rgw_user& user = iter->second;
ldout(cct, 20) << "BucketsSyncThread: sync user=" << user << " bucket=" << bucket << dendl;
- int r = stats->sync_bucket(user, bucket, null_yield);
+ const DoutPrefix dp(cct, dout_subsys, "rgw bucket sync thread: ");
+ int r = stats->sync_bucket(user, bucket, null_yield, &dp);
if (r < 0) {
ldout(cct, 0) << "WARNING: sync_bucket() returned r=" << r << dendl;
}
void *entry() override {
ldout(cct, 20) << "UserSyncThread: start" << dendl;
do {
- int ret = stats->sync_all_users(null_yield);
+ const DoutPrefix dp(cct, dout_subsys, "rgw user sync thread: ");
+ int ret = stats->sync_all_users(&dp, null_yield);
if (ret < 0) {
ldout(cct, 5) << "ERROR: sync_all_users() returned ret=" << ret << dendl;
}
stats_map.add(user, qs);
}
- int fetch_stats_from_storage(const rgw_user& user, const rgw_bucket& bucket, RGWStorageStats& stats, optional_yield y) override;
- int sync_bucket(const rgw_user& rgw_user, rgw_bucket& bucket, optional_yield y);
- int sync_user(const rgw_user& user, optional_yield y);
- int sync_all_users(optional_yield y);
+ int fetch_stats_from_storage(const rgw_user& user, const rgw_bucket& bucket, RGWStorageStats& stats, optional_yield y, const DoutPrefixProvider *dpp) override;
+ int sync_bucket(const rgw_user& rgw_user, rgw_bucket& bucket, optional_yield y, const DoutPrefixProvider *dpp);
+ int sync_user(const DoutPrefixProvider *dpp, const rgw_user& user, optional_yield y);
+ int sync_all_users(const DoutPrefixProvider *dpp, optional_yield y);
void data_modified(const rgw_user& user, rgw_bucket& bucket) override;
}
public:
- RGWUserStatsCache(rgw::sal::RGWRadosStore *_store, bool quota_threads)
- : RGWQuotaCache<rgw_user>(_store, _store->ctx()->_conf->rgw_bucket_quota_cache_size)
+ RGWUserStatsCache(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *_store, bool quota_threads)
+ : RGWQuotaCache<rgw_user>(_store, _store->ctx()->_conf->rgw_bucket_quota_cache_size), dpp(dpp)
{
if (quota_threads) {
buckets_sync_thread = new BucketsSyncThread(store->ctx(), this);
}
AsyncRefreshHandler *allocate_refresh_handler(const rgw_user& user, const rgw_bucket& bucket) override {
- return new UserAsyncRefreshHandler(store, this, user, bucket);
+ return new UserAsyncRefreshHandler(dpp, store, this, user, bucket);
}
bool can_use_cached_stats(RGWQuotaInfo& quota, RGWStorageStats& stats) override {
int RGWUserStatsCache::fetch_stats_from_storage(const rgw_user& user,
const rgw_bucket& bucket,
RGWStorageStats& stats,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
- int r = store->ctl()->user->read_stats(user, &stats, y);
+ int r = store->ctl()->user->read_stats(dpp, user, &stats, y);
if (r < 0) {
ldout(store->ctx(), 0) << "could not get user stats for user=" << user << dendl;
return r;
return 0;
}
-int RGWUserStatsCache::sync_bucket(const rgw_user& user, rgw_bucket& bucket, optional_yield y)
+int RGWUserStatsCache::sync_bucket(const rgw_user& user, rgw_bucket& bucket, optional_yield y, const DoutPrefixProvider *dpp)
{
RGWBucketInfo bucket_info;
- int r = store->ctl()->bucket->read_bucket_instance_info(bucket, &bucket_info, y);
+ int r = store->ctl()->bucket->read_bucket_instance_info(bucket, &bucket_info, y, dpp);
if (r < 0) {
ldout(store->ctx(), 0) << "could not get bucket info for bucket=" << bucket << " r=" << r << dendl;
return r;
}
RGWBucketEnt ent;
- r = store->ctl()->bucket->sync_user_stats(user, bucket_info, y, &ent);
+ r = store->ctl()->bucket->sync_user_stats(dpp, user, bucket_info, y, &ent);
if (r < 0) {
ldout(store->ctx(), 0) << "ERROR: sync_user_stats() for user=" << user << ", bucket=" << bucket << " returned " << r << dendl;
return r;
}
- return store->getRados()->check_bucket_shards(bucket_info, bucket, ent.count);
+ return store->getRados()->check_bucket_shards(bucket_info, bucket, ent.count, dpp);
}
-int RGWUserStatsCache::sync_user(const rgw_user& user, optional_yield y)
+int RGWUserStatsCache::sync_user(const DoutPrefixProvider *dpp, const rgw_user& user, optional_yield y)
{
string user_str = user.to_str();
RGWStorageStats stats;
ceph::real_time last_stats_sync;
ceph::real_time last_stats_update;
- int ret = store->ctl()->user->read_stats(rgw_user(user_str), &stats, y, &last_stats_sync, &last_stats_update);
+ int ret = store->ctl()->user->read_stats(dpp, rgw_user(user_str), &stats, y, &last_stats_sync, &last_stats_update);
if (ret < 0) {
ldout(store->ctx(), 5) << "ERROR: can't read user header: ret=" << ret << dendl;
return ret;
// check if enough time passed since last full sync
/* FIXME: missing check? */
- ret = rgw_user_sync_all_stats(store, user, y);
+ ret = rgw_user_sync_all_stats(dpp, store, user, y);
if (ret < 0) {
ldout(store->ctx(), 0) << "ERROR: failed user stats sync, ret=" << ret << dendl;
return ret;
return 0;
}
-int RGWUserStatsCache::sync_all_users(optional_yield y)
+int RGWUserStatsCache::sync_all_users(const DoutPrefixProvider *dpp, optional_yield y)
{
string key = "user";
void *handle;
- int ret = store->ctl()->meta.mgr->list_keys_init(key, &handle);
+ int ret = store->ctl()->meta.mgr->list_keys_init(dpp, key, &handle);
if (ret < 0) {
- ldout(store->ctx(), 10) << "ERROR: can't get key: ret=" << ret << dendl;
+ ldpp_dout(dpp, 10) << "ERROR: can't get key: ret=" << ret << dendl;
return ret;
}
list<string> keys;
ret = store->ctl()->meta.mgr->list_keys_next(handle, max, keys, &truncated);
if (ret < 0) {
- ldout(store->ctx(), 0) << "ERROR: lists_keys_next(): ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: lists_keys_next(): ret=" << ret << dendl;
goto done;
}
for (list<string>::iterator iter = keys.begin();
iter != keys.end() && !going_down();
++iter) {
rgw_user user(*iter);
- ldout(store->ctx(), 20) << "RGWUserStatsCache: sync user=" << user << dendl;
- int ret = sync_user(user, y);
+ ldpp_dout(dpp, 20) << "RGWUserStatsCache: sync user=" << user << dendl;
+ int ret = sync_user(dpp, user, y);
if (ret < 0) {
- ldout(store->ctx(), 5) << "ERROR: sync_user() failed, user=" << user << " ret=" << ret << dendl;
+ ldpp_dout(dpp, 5) << "ERROR: sync_user() failed, user=" << user << " ret=" << ret << dendl;
/* continuing to next user */
continue;
return 0;
}
public:
- RGWQuotaHandlerImpl(rgw::sal::RGWRadosStore *_store, bool quota_threads) : store(_store),
+ RGWQuotaHandlerImpl(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *_store, bool quota_threads) : store(_store),
bucket_stats_cache(_store),
- user_stats_cache(_store, quota_threads) {}
+ user_stats_cache(dpp, _store, quota_threads) {}
int check_quota(const rgw_user& user,
rgw_bucket& bucket,
* fetch that info and not rely on cached data
*/
+ const DoutPrefix dp(store->ctx(), dout_subsys, "rgw quota handler: ");
if (bucket_quota.enabled) {
RGWStorageStats bucket_stats;
int ret = bucket_stats_cache.get_stats(user, bucket, bucket_stats,
- bucket_quota, y);
+ bucket_quota, y, &dp);
if (ret < 0) {
return ret;
}
if (user_quota.enabled) {
RGWStorageStats user_stats;
int ret = user_stats_cache.get_stats(user, bucket, user_stats,
- user_quota, y);
+ user_quota, y, &dp);
if (ret < 0) {
return ret;
}
};
-RGWQuotaHandler *RGWQuotaHandler::generate_handler(rgw::sal::RGWRadosStore *store, bool quota_threads)
+RGWQuotaHandler *RGWQuotaHandler::generate_handler(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *store, bool quota_threads)
{
- return new RGWQuotaHandlerImpl(store, quota_threads);
+ return new RGWQuotaHandlerImpl(dpp, store, quota_threads);
}
void RGWQuotaHandler::free_handler(RGWQuotaHandler *handler)
virtual void update_stats(const rgw_user& bucket_owner, rgw_bucket& bucket, int obj_delta, uint64_t added_bytes, uint64_t removed_bytes) = 0;
- static RGWQuotaHandler *generate_handler(rgw::sal::RGWRadosStore *store, bool quota_threads);
+ static RGWQuotaHandler *generate_handler(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *store, bool quota_threads);
static void free_handler(RGWQuotaHandler *handler);
};
http_manager.start();
}
- int notify_all(map<rgw_zone_id, RGWRESTConn *>& conn_map, set<int>& shards) {
+ int notify_all(const DoutPrefixProvider *dpp, map<rgw_zone_id, RGWRESTConn *>& conn_map, set<int>& shards) {
rgw_http_param_pair pairs[] = { { "type", "metadata" },
{ "notify", NULL },
{ NULL, NULL } };
stacks.push_back(stack);
}
- return run(stacks);
+ return run(dpp, stacks);
}
};
http_manager.start();
}
- int notify_all(map<rgw_zone_id, RGWRESTConn *>& conn_map,
+ int notify_all(const DoutPrefixProvider *dpp, map<rgw_zone_id, RGWRESTConn *>& conn_map,
bc::flat_map<int, bc::flat_set<string> >& shards) {
rgw_http_param_pair pairs[] = { { "type", "data" },
{ "notify", NULL },
stacks.push_back(stack);
}
- return run(stacks);
+ return run(dpp, stacks);
}
};
do {
auto start = ceph::real_clock::now();
- int r = processor->process();
+ int r = processor->process(this);
if (r < 0) {
- dout(0) << "ERROR: processor->process() returned error r=" << r << dendl;
+ ldpp_dout(this, 0) << "ERROR: processor->process() returned error r=" << r << dendl;
}
if (processor->going_down())
RGWMetaNotifier(RGWRados *_store, RGWMetadataLog* log)
: RGWRadosThread(_store, "meta-notifier"), notify_mgr(_store), log(log) {}
- int process() override;
+ int process(const DoutPrefixProvider *dpp) override;
};
-int RGWMetaNotifier::process()
+int RGWMetaNotifier::process(const DoutPrefixProvider *dpp)
{
set<int> shards;
}
for (set<int>::iterator iter = shards.begin(); iter != shards.end(); ++iter) {
- ldout(cct, 20) << __func__ << "(): notifying mdlog change, shard_id=" << *iter << dendl;
+ ldpp_dout(dpp, 20) << __func__ << "(): notifying mdlog change, shard_id=" << *iter << dendl;
}
- notify_mgr.notify_all(store->svc.zone->get_zone_conn_map(), shards);
+ notify_mgr.notify_all(dpp, store->svc.zone->get_zone_conn_map(), shards);
return 0;
}
public:
RGWDataNotifier(RGWRados *_store) : RGWRadosThread(_store, "data-notifier"), notify_mgr(_store) {}
- int process() override;
+ int process(const DoutPrefixProvider *dpp) override;
};
-int RGWDataNotifier::process()
+int RGWDataNotifier::process(const DoutPrefixProvider *dpp)
{
auto data_log = store->svc.datalog_rados;
if (!data_log) {
}
for (const auto& [shard_id, keys] : shards) {
- ldout(cct, 20) << __func__ << "(): notifying datalog change, shard_id="
+ ldpp_dout(dpp, 20) << __func__ << "(): notifying datalog change, shard_id="
<< shard_id << ": " << keys << dendl;
}
- notify_mgr.notify_all(store->svc.zone->get_zone_data_notify_to_map(), shards);
+ notify_mgr.notify_all(dpp, store->svc.zone->get_zone_data_notify_to_map(), shards);
return 0;
}
RGWSyncProcessorThread(RGWRados *_store, const string& thread_name = "radosgw") : RGWRadosThread(_store, thread_name) {}
RGWSyncProcessorThread(RGWRados *_store) : RGWRadosThread(_store) {}
~RGWSyncProcessorThread() override {}
- int init() override = 0 ;
- int process() override = 0;
+ int init(const DoutPrefixProvider *dpp) override = 0 ;
+ int process(const DoutPrefixProvider *dpp) override = 0;
};
class RGWMetaSyncProcessorThread : public RGWSyncProcessorThread
}
RGWMetaSyncStatusManager* get_manager() { return &sync; }
- int init() override {
- int ret = sync.init();
+ int init(const DoutPrefixProvider *dpp) override {
+ int ret = sync.init(dpp);
if (ret < 0) {
- ldout(store->ctx(), 0) << "ERROR: sync.init() returned " << ret << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: sync.init() returned " << ret << dendl;
return ret;
}
return 0;
}
- int process() override {
- sync.run(null_yield);
+ int process(const DoutPrefixProvider *dpp) override {
+ sync.run(dpp, null_yield);
return 0;
}
};
}
RGWDataSyncStatusManager* get_manager() { return &sync; }
- int init() override {
+ int init(const DoutPrefixProvider *dpp) override {
return 0;
}
- int process() override {
+ int process(const DoutPrefixProvider *dpp) override {
while (!initialized) {
if (going_down()) {
return 0;
}
- int ret = sync.init();
+ int ret = sync.init(dpp);
if (ret >= 0) {
initialized = true;
break;
/* we'll be back! */
return 0;
}
- sync.run();
+ sync.run(dpp);
return 0;
}
};
trim_interval(interval, 0)
{}
- int init() override {
+ int init(const DoutPrefixProvider *dpp) override {
return http.start();
}
- int process() override {
+ int process(const DoutPrefixProvider *dpp) override {
list<RGWCoroutinesStack*> stacks;
auto meta = new RGWCoroutinesStack(store->ctx(), &crs);
meta->call(create_meta_log_trim_cr(this, store, &http,
if (store->svc()->zone->sync_module_exports_data()) {
auto data = new RGWCoroutinesStack(store->ctx(), &crs);
- data->call(create_data_log_trim_cr(store, &http,
+ data->call(create_data_log_trim_cr(this, store, &http,
cct->_conf->rgw_data_log_num_shards,
trim_interval));
stacks.push_back(data);
stacks.push_back(bucket);
}
- crs.run(stacks);
+ crs.run(dpp, stacks);
return 0;
}
return thread->second->get_manager();
}
-int RGWRados::get_required_alignment(const rgw_pool& pool, uint64_t *alignment)
+int RGWRados::get_required_alignment(const DoutPrefixProvider *dpp, const rgw_pool& pool, uint64_t *alignment)
{
IoCtx ioctx;
- int r = open_pool_ctx(pool, ioctx, false);
+ int r = open_pool_ctx(dpp, pool, ioctx, false);
if (r < 0) {
ldout(cct, 0) << "ERROR: open_pool_ctx() returned " << r << dendl;
return r;
*max_size = size - (size % alignment);
}
-int RGWRados::get_max_chunk_size(const rgw_pool& pool, uint64_t *max_chunk_size, uint64_t *palignment)
+int RGWRados::get_max_chunk_size(const rgw_pool& pool, uint64_t *max_chunk_size, const DoutPrefixProvider *dpp, uint64_t *palignment)
{
uint64_t alignment;
- int r = get_required_alignment(pool, &alignment);
+ int r = get_required_alignment(dpp, pool, &alignment);
if (r < 0) {
return r;
}
get_max_aligned_size(config_chunk_size, alignment, max_chunk_size);
- ldout(cct, 20) << "max_chunk_size=" << *max_chunk_size << dendl;
+ ldpp_dout(dpp, 20) << "max_chunk_size=" << *max_chunk_size << dendl;
return 0;
}
int RGWRados::get_max_chunk_size(const rgw_placement_rule& placement_rule, const rgw_obj& obj,
- uint64_t *max_chunk_size, uint64_t *palignment)
+ uint64_t *max_chunk_size, const DoutPrefixProvider *dpp, uint64_t *palignment)
{
rgw_pool pool;
if (!get_obj_data_pool(placement_rule, obj, &pool)) {
- ldout(cct, 0) << "ERROR: failed to get data pool for object " << obj << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to get data pool for object " << obj << dendl;
return -EIO;
}
- return get_max_chunk_size(pool, max_chunk_size, palignment);
+ return get_max_chunk_size(pool, max_chunk_size, dpp, palignment);
}
class RGWIndexCompletionManager;
}
};
-class RGWIndexCompletionThread : public RGWRadosThread {
+class RGWIndexCompletionThread : public RGWRadosThread, public DoutPrefixProvider {
RGWRados *store;
uint64_t interval_msec() override {
RGWIndexCompletionThread(RGWRados *_store)
: RGWRadosThread(_store, "index-complete"), store(_store) {}
- int process() override;
+ int process(const DoutPrefixProvider *dpp) override;
void add_completion(complete_op_data *completion) {
{
signal();
}
+
+ CephContext *get_cct() const override { return store->ctx(); }
+ unsigned get_subsys() const { return dout_subsys; }
+ std::ostream& gen_prefix(std::ostream& out) const { return out << "rgw index completion thread: "; }
};
-int RGWIndexCompletionThread::process()
+int RGWIndexCompletionThread::process(const DoutPrefixProvider *dpp)
{
list<complete_op_data *> comps;
if (going_down()) {
continue;
}
- ldout(store->ctx(), 20) << __func__ << "(): handling completion for key=" << c->key << dendl;
+ ldpp_dout(this, 20) << __func__ << "(): handling completion for key=" << c->key << dendl;
RGWRados::BucketShard bs(store);
RGWBucketInfo bucket_info;
- int r = bs.init(c->obj.bucket, c->obj, &bucket_info);
+ int r = bs.init(c->obj.bucket, c->obj, &bucket_info, this);
if (r < 0) {
- ldout(cct, 0) << "ERROR: " << __func__ << "(): failed to initialize BucketShard, obj=" << c->obj << " r=" << r << dendl;
+ ldpp_dout(this, 0) << "ERROR: " << __func__ << "(): failed to initialize BucketShard, obj=" << c->obj << " r=" << r << dendl;
/* not much to do */
continue;
}
- r = store->guard_reshard(&bs, c->obj, bucket_info,
+ r = store->guard_reshard(this, &bs, c->obj, bucket_info,
[&](RGWRados::BucketShard *bs) -> int {
librados::ObjectWriteOperation o;
cls_rgw_guard_bucket_resharding(o, -ERR_BUSY_RESHARDING);
cls_rgw_bucket_complete_op(o, c->op, c->tag, c->ver, c->key, c->dir_meta, &c->remove_objs,
c->log_op, c->bilog_op, &c->zones_trace);
- return bs->bucket_obj.operate(&o, null_yield);
+ return bs->bucket_obj.operate(this, &o, null_yield);
});
if (r < 0) {
- ldout(cct, 0) << "ERROR: " << __func__ << "(): bucket index completion failed, obj=" << c->obj << " r=" << r << dendl;
+ ldpp_dout(this, 0) << "ERROR: " << __func__ << "(): bucket index completion failed, obj=" << c->obj << " r=" << r << dendl;
/* ignoring error, can't do anything about it */
continue;
}
- r = store->svc.datalog_rados->add_entry(bucket_info, bs.shard_id);
+ r = store->svc.datalog_rados->add_entry(this, bucket_info, bs.shard_id);
if (r < 0) {
- lderr(store->ctx()) << "ERROR: failed writing data log" << dendl;
+ ldpp_dout(this, -1) << "ERROR: failed writing data log" << dendl;
}
}
complete_op_data **result);
bool handle_completion(completion_t cb, complete_op_data *arg);
- int start() {
+ int start(const DoutPrefixProvider *dpp) {
completion_thread = new RGWIndexCompletionThread(store);
- int ret = completion_thread->init();
+ int ret = completion_thread->init(dpp);
if (ret < 0) {
return ret;
}
* Initialize the RADOS instance and prepare to do other ops
* Returns 0 on success, -ERR# on failure.
*/
-int RGWRados::init_complete()
+int RGWRados::init_complete(const DoutPrefixProvider *dpp)
{
int ret;
*/
sync_module = svc.sync_modules->get_sync_module();
- ret = open_root_pool_ctx();
+ ret = open_root_pool_ctx(dpp);
if (ret < 0)
return ret;
- ret = open_gc_pool_ctx();
+ ret = open_gc_pool_ctx(dpp);
if (ret < 0)
return ret;
- ret = open_lc_pool_ctx();
+ ret = open_lc_pool_ctx(dpp);
if (ret < 0)
return ret;
- ret = open_objexp_pool_ctx();
+ ret = open_objexp_pool_ctx(dpp);
if (ret < 0)
return ret;
- ret = open_reshard_pool_ctx();
+ ret = open_reshard_pool_ctx(dpp);
if (ret < 0)
return ret;
- ret = open_notif_pool_ctx();
+ ret = open_notif_pool_ctx(dpp);
if (ret < 0)
return ret;
for (const auto &pt: zonegroup.placement_targets) {
if (zone_params.placement_pools.find(pt.second.name)
== zone_params.placement_pools.end()){
- ldout(cct, 0) << "WARNING: This zone does not contain the placement target "
+ ldpp_dout(dpp, 0) << "WARNING: This zone does not contain the placement target "
<< pt.second.name << " present in zonegroup" << dendl;
}
}
auto async_processor = svc.rados->get_async_processor();
std::lock_guard l{meta_sync_thread_lock};
meta_sync_processor_thread = new RGWMetaSyncProcessorThread(this->store, async_processor);
- ret = meta_sync_processor_thread->init();
+ ret = meta_sync_processor_thread->init(dpp);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: failed to initialize meta sync thread" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to initialize meta sync thread" << dendl;
return ret;
}
meta_sync_processor_thread->start();
bucket_trim.emplace(this->store, config);
ret = bucket_trim->init();
if (ret < 0) {
- ldout(cct, 0) << "ERROR: failed to start bucket trim manager" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to start bucket trim manager" << dendl;
return ret;
}
svc.datalog_rados->set_observer(&*bucket_trim);
std::lock_guard dl{data_sync_thread_lock};
for (auto source_zone : svc.zone->get_data_sync_source_zones()) {
- ldout(cct, 5) << "starting data sync thread for zone " << source_zone->name << dendl;
+ ldpp_dout(dpp, 5) << "starting data sync thread for zone " << source_zone->name << dendl;
auto *thread = new RGWDataSyncProcessorThread(this->store, svc.rados->get_async_processor(), source_zone);
- ret = thread->init();
+ ret = thread->init(dpp);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: failed to initialize data sync thread" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to initialize data sync thread" << dendl;
return ret;
}
thread->start();
auto interval = cct->_conf->rgw_sync_log_trim_interval;
if (interval > 0) {
sync_log_trimmer = new RGWSyncLogTrimThread(this->store, &*bucket_trim, interval);
- ret = sync_log_trimmer->init();
+ ret = sync_log_trimmer->init(dpp);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: failed to initialize sync log trim thread" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to initialize sync log trim thread" << dendl;
return ret;
}
sync_log_trimmer->start();
if (use_lc_thread)
lc->start_processor();
- quota_handler = RGWQuotaHandler::generate_handler(this->store, quota_threads);
+ quota_handler = RGWQuotaHandler::generate_handler(dpp, this->store, quota_threads);
bucket_index_max_shards = (cct->_conf->rgw_override_bucket_index_max_shards ? cct->_conf->rgw_override_bucket_index_max_shards :
zone.bucket_index_max_shards);
if (bucket_index_max_shards > get_max_bucket_shards()) {
bucket_index_max_shards = get_max_bucket_shards();
- ldout(cct, 1) << __func__ << " bucket index max shards is too large, reset to value: "
+ ldpp_dout(dpp, 1) << __func__ << " bucket index max shards is too large, reset to value: "
<< get_max_bucket_shards() << dendl;
}
- ldout(cct, 20) << __func__ << " bucket index max shards: " << bucket_index_max_shards << dendl;
+ ldpp_dout(dpp, 20) << __func__ << " bucket index max shards: " << bucket_index_max_shards << dendl;
bool need_tombstone_cache = !svc.zone->get_zone_data_notify_to_map().empty(); /* have zones syncing from us */
}
index_completion_manager = new RGWIndexCompletionManager(this);
- ret = index_completion_manager->start();
+ ret = index_completion_manager->start(dpp);
if (ret < 0) {
return ret;
}
- ret = rgw::notify::init(cct, store);
+ ret = rgw::notify::init(cct, store, dpp);
if (ret < 0 ) {
- ldout(cct, 1) << "ERROR: failed to initialize notification manager" << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to initialize notification manager" << dendl;
}
return ret;
}
-int RGWRados::init_svc(bool raw)
+int RGWRados::init_svc(bool raw, const DoutPrefixProvider *dpp)
{
if (raw) {
- return svc.init_raw(cct, use_cache, null_yield);
+ return svc.init_raw(cct, use_cache, null_yield, dpp);
}
- return svc.init(cct, use_cache, run_sync_thread, null_yield);
+ return svc.init(cct, use_cache, run_sync_thread, null_yield, dpp);
}
-int RGWRados::init_ctl()
+int RGWRados::init_ctl(const DoutPrefixProvider *dpp)
{
- return ctl.init(&svc);
+ return ctl.init(&svc, dpp);
}
/**
* Initialize the RADOS instance and prepare to do other ops
* Returns 0 on success, -ERR# on failure.
*/
-int RGWRados::initialize()
+int RGWRados::initialize(const DoutPrefixProvider *dpp)
{
int ret;
cct->_conf.get_val<double>("rgw_inject_notify_timeout_probability");
max_notify_retries = cct->_conf.get_val<uint64_t>("rgw_max_notify_retries");
- ret = init_svc(false);
+ ret = init_svc(false, dpp);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: failed to init services (ret=" << cpp_strerror(-ret) << ")" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to init services (ret=" << cpp_strerror(-ret) << ")" << dendl;
return ret;
}
- ret = init_ctl();
+ ret = init_ctl(dpp);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: failed to init ctls (ret=" << cpp_strerror(-ret) << ")" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to init ctls (ret=" << cpp_strerror(-ret) << ")" << dendl;
return ret;
}
if (ret < 0)
return ret;
- return init_complete();
+ return init_complete(dpp);
}
/**
* Open the pool used as root for this gateway
* Returns: 0 on success, -ERR# otherwise.
*/
-int RGWRados::open_root_pool_ctx()
+int RGWRados::open_root_pool_ctx(const DoutPrefixProvider *dpp)
{
- return rgw_init_ioctx(get_rados_handle(), svc.zone->get_zone_params().domain_root, root_pool_ctx, true, true);
+ return rgw_init_ioctx(dpp, get_rados_handle(), svc.zone->get_zone_params().domain_root, root_pool_ctx, true, true);
}
-int RGWRados::open_gc_pool_ctx()
+int RGWRados::open_gc_pool_ctx(const DoutPrefixProvider *dpp)
{
- return rgw_init_ioctx(get_rados_handle(), svc.zone->get_zone_params().gc_pool, gc_pool_ctx, true, true);
+ return rgw_init_ioctx(dpp, get_rados_handle(), svc.zone->get_zone_params().gc_pool, gc_pool_ctx, true, true);
}
-int RGWRados::open_lc_pool_ctx()
+int RGWRados::open_lc_pool_ctx(const DoutPrefixProvider *dpp)
{
- return rgw_init_ioctx(get_rados_handle(), svc.zone->get_zone_params().lc_pool, lc_pool_ctx, true, true);
+ return rgw_init_ioctx(dpp, get_rados_handle(), svc.zone->get_zone_params().lc_pool, lc_pool_ctx, true, true);
}
-int RGWRados::open_objexp_pool_ctx()
+int RGWRados::open_objexp_pool_ctx(const DoutPrefixProvider *dpp)
{
- return rgw_init_ioctx(get_rados_handle(), svc.zone->get_zone_params().log_pool, objexp_pool_ctx, true, true);
+ return rgw_init_ioctx(dpp, get_rados_handle(), svc.zone->get_zone_params().log_pool, objexp_pool_ctx, true, true);
}
-int RGWRados::open_reshard_pool_ctx()
+int RGWRados::open_reshard_pool_ctx(const DoutPrefixProvider *dpp)
{
- return rgw_init_ioctx(get_rados_handle(), svc.zone->get_zone_params().reshard_pool, reshard_pool_ctx, true, true);
+ return rgw_init_ioctx(dpp, get_rados_handle(), svc.zone->get_zone_params().reshard_pool, reshard_pool_ctx, true, true);
}
-int RGWRados::open_notif_pool_ctx()
+int RGWRados::open_notif_pool_ctx(const DoutPrefixProvider *dpp)
{
- return rgw_init_ioctx(get_rados_handle(), svc.zone->get_zone_params().notif_pool, notif_pool_ctx, true, true);
+ return rgw_init_ioctx(dpp, get_rados_handle(), svc.zone->get_zone_params().notif_pool, notif_pool_ctx, true, true);
}
-int RGWRados::open_pool_ctx(const rgw_pool& pool, librados::IoCtx& io_ctx,
+int RGWRados::open_pool_ctx(const DoutPrefixProvider *dpp, const rgw_pool& pool, librados::IoCtx& io_ctx,
bool mostly_omap)
{
constexpr bool create = true; // create the pool if it doesn't exist
- return rgw_init_ioctx(get_rados_handle(), pool, io_ctx, create, mostly_omap);
+ return rgw_init_ioctx(dpp, get_rados_handle(), pool, io_ctx, create, mostly_omap);
}
/**** logs ****/
librados::NObjectIterator obit;
};
-int RGWRados::log_list_init(const string& prefix, RGWAccessHandle *handle)
+int RGWRados::log_list_init(const DoutPrefixProvider *dpp, const string& prefix, RGWAccessHandle *handle)
{
log_list_state *state = new log_list_state;
- int r = rgw_init_ioctx(get_rados_handle(), svc.zone->get_zone_params().log_pool, state->io_ctx);
+ int r = rgw_init_ioctx(dpp, get_rados_handle(), svc.zone->get_zone_params().log_pool, state->io_ctx);
if (r < 0) {
delete state;
return r;
return 0;
}
-int RGWRados::log_remove(const string& name)
+int RGWRados::log_remove(const DoutPrefixProvider *dpp, const string& name)
{
librados::IoCtx io_ctx;
- int r = rgw_init_ioctx(get_rados_handle(), svc.zone->get_zone_params().log_pool, io_ctx);
+ int r = rgw_init_ioctx(dpp, get_rados_handle(), svc.zone->get_zone_params().log_pool, io_ctx);
if (r < 0)
return r;
return io_ctx.remove(name);
log_show_state() : pos(0), eof(false) {}
};
-int RGWRados::log_show_init(const string& name, RGWAccessHandle *handle)
+int RGWRados::log_show_init(const DoutPrefixProvider *dpp, const string& name, RGWAccessHandle *handle)
{
log_show_state *state = new log_show_state;
- int r = rgw_init_ioctx(get_rados_handle(), svc.zone->get_zone_params().log_pool, state->io_ctx);
+ int r = rgw_init_ioctx(dpp, get_rados_handle(), svc.zone->get_zone_params().log_pool, state->io_ctx);
if (r < 0) {
delete state;
return r;
hash = buf;
}
-int RGWRados::log_usage(map<rgw_user_bucket, RGWUsageBatch>& usage_info)
+int RGWRados::log_usage(const DoutPrefixProvider *dpp, map<rgw_user_bucket, RGWUsageBatch>& usage_info)
{
uint32_t index = 0;
RGWUsageBatch& info = iter->second;
if (ub.user.empty()) {
- ldout(cct, 0) << "WARNING: RGWRados::log_usage(): user name empty (bucket=" << ub.bucket << "), skipping" << dendl;
+ ldpp_dout(dpp, 0) << "WARNING: RGWRados::log_usage(): user name empty (bucket=" << ub.bucket << "), skipping" << dendl;
continue;
}
map<string, rgw_usage_log_info>::iterator liter;
for (liter = log_objs.begin(); liter != log_objs.end(); ++liter) {
- int r = cls_obj_usage_log_add(liter->first, liter->second);
+ int r = cls_obj_usage_log_add(dpp, liter->first, liter->second);
if (r < 0)
return r;
}
return 0;
}
-int RGWRados::read_usage(const rgw_user& user, const string& bucket_name, uint64_t start_epoch, uint64_t end_epoch,
+int RGWRados::read_usage(const DoutPrefixProvider *dpp, const rgw_user& user, const string& bucket_name, uint64_t start_epoch, uint64_t end_epoch,
uint32_t max_entries, bool *is_truncated, RGWUsageIter& usage_iter, map<rgw_user_bucket,
rgw_usage_log_entry>& usage)
{
map<rgw_user_bucket, rgw_usage_log_entry> ret_usage;
map<rgw_user_bucket, rgw_usage_log_entry>::iterator iter;
- int ret = cls_obj_usage_log_read(hash, user_str, bucket_name, start_epoch, end_epoch, num,
+ int ret = cls_obj_usage_log_read(dpp, hash, user_str, bucket_name, start_epoch, end_epoch, num,
usage_iter.read_iter, ret_usage, is_truncated);
if (ret == -ENOENT)
goto next;
return 0;
}
-int RGWRados::trim_usage(const rgw_user& user, const string& bucket_name, uint64_t start_epoch, uint64_t end_epoch)
+int RGWRados::trim_usage(const DoutPrefixProvider *dpp, const rgw_user& user, const string& bucket_name, uint64_t start_epoch, uint64_t end_epoch)
{
uint32_t index = 0;
string hash, first_hash;
hash = first_hash;
do {
- int ret = cls_obj_usage_log_trim(hash, user_str, bucket_name, start_epoch, end_epoch);
+ int ret = cls_obj_usage_log_trim(dpp, hash, user_str, bucket_name, start_epoch, end_epoch);
if (ret < 0 && ret != -ENOENT)
return ret;
}
-int RGWRados::clear_usage()
+int RGWRados::clear_usage(const DoutPrefixProvider *dpp)
{
auto max_shards = cct->_conf->rgw_usage_max_shards;
int ret=0;
for (unsigned i=0; i < max_shards; i++){
string oid = RGW_USAGE_OBJ_PREFIX + to_string(i);
- ret = cls_obj_usage_log_clear(oid);
+ ret = cls_obj_usage_log_clear(dpp, oid);
if (ret < 0){
- ldout(cct,0) << "usage clear on oid="<< oid << "failed with ret=" << ret << dendl;
+ ldpp_dout(dpp,0) << "usage clear on oid="<< oid << "failed with ret=" << ret << dendl;
return ret;
}
}
return 0;
}
-int rgw_policy_from_attrset(CephContext *cct, map<string, bufferlist>& attrset, RGWAccessControlPolicy *policy)
+int rgw_policy_from_attrset(const DoutPrefixProvider *dpp, CephContext *cct, map<string, bufferlist>& attrset, RGWAccessControlPolicy *policy)
{
map<string, bufferlist>::iterator aiter = attrset.find(RGW_ATTR_ACL);
if (aiter == attrset.end())
try {
policy->decode(iter);
} catch (buffer::error& err) {
- ldout(cct, 0) << "ERROR: could not decode policy, caught buffer::error" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: could not decode policy, caught buffer::error" << dendl;
return -EIO;
}
if (cct->_conf->subsys.should_gather<ceph_subsys_rgw, 15>()) {
RGWAccessControlPolicy_S3 *s3policy = static_cast<RGWAccessControlPolicy_S3 *>(policy);
- ldout(cct, 15) << __func__ << " Read AccessControlPolicy";
+ ldpp_dout(dpp, 15) << __func__ << " Read AccessControlPolicy";
s3policy->to_xml(*_dout);
*_dout << dendl;
}
}
-int RGWRados::Bucket::update_bucket_id(const string& new_bucket_id)
+int RGWRados::Bucket::update_bucket_id(const string& new_bucket_id, const DoutPrefixProvider *dpp)
{
rgw_bucket bucket = bucket_info.bucket;
bucket.update_bucket_id(new_bucket_id);
auto obj_ctx = store->svc.sysobj->init_obj_ctx();
bucket_info.objv_tracker.clear();
- int ret = store->get_bucket_instance_info(obj_ctx, bucket, bucket_info, nullptr, nullptr, null_yield);
+ int ret = store->get_bucket_instance_info(obj_ctx, bucket, bucket_info, nullptr, nullptr, null_yield, dpp);
if (ret < 0) {
return ret;
}
* max, then truncated.
*/
int RGWRados::Bucket::List::list_objects_ordered(
+ const DoutPrefixProvider *dpp,
int64_t max_p,
vector<rgw_bucket_dir_entry> *result,
map<string, bool> *common_prefixes,
rgw_obj_index_key prev_marker;
for (uint16_t attempt = 1; /* empty */; ++attempt) {
- ldout(cct, 20) << "RGWRados::Bucket::List::" << __func__ <<
+ ldpp_dout(dpp, 20) << "RGWRados::Bucket::List::" << __func__ <<
" starting attempt " << attempt << dendl;
if (attempt > 1 && !(prev_marker < cur_marker)) {
// we've failed to make forward progress
- ldout(cct, 0) << "RGWRados::Bucket::List::" << __func__ <<
+ ldpp_dout(dpp, 0) << "RGWRados::Bucket::List::" << __func__ <<
": ERROR marker failed to make forward progress; attempt=" << attempt <<
", prev_marker=" << prev_marker <<
", cur_marker=" << cur_marker << dendl;
ent_map_t ent_map;
ent_map.reserve(read_ahead);
- int r = store->cls_bucket_list_ordered(target->get_bucket_info(),
+ int r = store->cls_bucket_list_ordered(dpp,
+ target->get_bucket_info(),
shard_id,
cur_marker,
cur_prefix,
rgw_obj_index_key index_key = entry.key;
rgw_obj_key obj(index_key);
- ldout(cct, 20) << "RGWRados::Bucket::List::" << __func__ <<
+ ldpp_dout(dpp, 20) << "RGWRados::Bucket::List::" << __func__ <<
" considering entry " << entry.key << dendl;
/* note that parse_raw_oid() here will not set the correct
*/
bool valid = rgw_obj_key::parse_raw_oid(index_key.name, &obj);
if (!valid) {
- ldout(cct, 0) << "ERROR: could not parse object name: " <<
+ ldpp_dout(dpp, 0) << "ERROR: could not parse object name: " <<
obj.name << dendl;
continue;
}
// after the prefix
if (delim_pos !=
int(obj.name.length() - params.delim.length())) {
- ldout(cct, 0) <<
+ ldpp_dout(dpp, 0) <<
"WARNING: found delimiter in place other than the end of "
"the prefix; obj.name=" << obj.name <<
", prefix=" << params.prefix << dendl;
goto done;
}
- ldout(cct, 20) << "RGWRados::Bucket::List::" << __func__ <<
+ ldpp_dout(dpp, 20) << "RGWRados::Bucket::List::" << __func__ <<
" adding entry " << entry.key << " to result" << dendl;
result->emplace_back(std::move(entry));
cur_marker.name.substr(0, marker_delim_pos);
skip_after_delim.append(after_delim_s);
- ldout(cct, 20) << "skip_after_delim=" << skip_after_delim << dendl;
+ ldpp_dout(dpp, 20) << "skip_after_delim=" << skip_after_delim << dendl;
if (skip_after_delim > cur_marker.name) {
cur_marker = skip_after_delim;
- ldout(cct, 20) << "setting cur_marker="
+ ldpp_dout(dpp, 20) << "setting cur_marker="
<< cur_marker.name
<< "[" << cur_marker.instance << "]"
<< dendl;
}
} // if older osd didn't do delimiter filtering
- ldout(cct, 20) << "RGWRados::Bucket::List::" << __func__ <<
+ ldpp_dout(dpp, 20) << "RGWRados::Bucket::List::" << __func__ <<
" INFO end of outer loop, truncated=" << truncated <<
", count=" << count << ", attempt=" << attempt << dendl;
* is_truncated: if number of objects in the bucket is bigger than max, then
* truncated.
*/
-int RGWRados::Bucket::List::list_objects_unordered(int64_t max_p,
+int RGWRados::Bucket::List::list_objects_unordered(const DoutPrefixProvider *dpp,
+ int64_t max_p,
vector<rgw_bucket_dir_entry> *result,
map<string, bool> *common_prefixes,
bool *is_truncated,
optional_yield y)
{
RGWRados *store = target->get_store();
- CephContext *cct = store->ctx();
int shard_id = target->get_shard_id();
int count = 0;
std::vector<rgw_bucket_dir_entry> ent_list;
ent_list.reserve(read_ahead);
- int r = store->cls_bucket_list_unordered(target->get_bucket_info(),
+ int r = store->cls_bucket_list_unordered(dpp,
+ target->get_bucket_info(),
shard_id,
cur_marker,
cur_prefix,
*/
bool valid = rgw_obj_key::parse_raw_oid(index_key.name, &obj);
if (!valid) {
- ldout(cct, 0) << "ERROR: could not parse object name: " <<
+ ldpp_dout(dpp, 0) << "ERROR: could not parse object name: " <<
obj.name << dendl;
continue;
}
* create a rados pool, associated meta info
* returns 0 on success, -ERR# otherwise.
*/
-int RGWRados::create_pool(const rgw_pool& pool)
+int RGWRados::create_pool(const DoutPrefixProvider *dpp, const rgw_pool& pool)
{
librados::IoCtx io_ctx;
constexpr bool create = true;
- return rgw_init_ioctx(get_rados_handle(), pool, io_ctx, create);
+ return rgw_init_ioctx(dpp, get_rados_handle(), pool, io_ctx, create);
}
void RGWRados::create_bucket_id(string *bucket_id)
rgw_bucket *pmaster_bucket,
uint32_t *pmaster_num_shards,
optional_yield y,
+ const DoutPrefixProvider *dpp,
bool exclusive)
{
#define MAX_CREATE_RETRIES 20 /* need to bound retries */
for (int i = 0; i < MAX_CREATE_RETRIES; i++) {
int ret = 0;
- ret = svc.zone->select_bucket_placement(owner, zonegroup_id, placement_rule,
+ ret = svc.zone->select_bucket_placement(dpp, owner, zonegroup_id, placement_rule,
&selected_placement_rule, &rule_info, y);
if (ret < 0)
return ret;
info.quota = *pquota_info;
}
- int r = svc.bi->init_index(info);
+ int r = svc.bi->init_index(dpp, info);
if (r < 0) {
return r;
}
- ret = put_linked_bucket_info(info, exclusive, ceph::real_time(), pep_objv, &attrs, true);
+ ret = put_linked_bucket_info(info, exclusive, ceph::real_time(), pep_objv, &attrs, true, dpp);
if (ret == -ECANCELED) {
ret = -EEXIST;
}
if (r == -ENOENT) {
continue;
}
- ldout(cct, 0) << "get_bucket_info returned " << r << dendl;
+ ldpp_dout(dpp, 0) << "get_bucket_info returned " << r << dendl;
return r;
}
/* only remove it if it's a different bucket instance */
if (orig_info.bucket.bucket_id != bucket.bucket_id) {
- int r = svc.bi->clean_index(info);
+ int r = svc.bi->clean_index(dpp, info);
if (r < 0) {
- ldout(cct, 0) << "WARNING: could not remove bucket index (r=" << r << ")" << dendl;
+ ldpp_dout(dpp, 0) << "WARNING: could not remove bucket index (r=" << r << ")" << dendl;
}
- r = ctl.bucket->remove_bucket_instance_info(info.bucket, info, null_yield);
+ r = ctl.bucket->remove_bucket_instance_info(info.bucket, info, null_yield, dpp);
if (r < 0) {
- ldout(cct, 0) << "WARNING: " << __func__ << "(): failed to remove bucket instance info: bucket instance=" << info.bucket.get_key() << ": r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "WARNING: " << __func__ << "(): failed to remove bucket instance info: bucket instance=" << info.bucket.get_key() << ": r=" << r << dendl;
/* continue anyway */
}
}
}
/* this is highly unlikely */
- ldout(cct, 0) << "ERROR: could not create bucket, continuously raced with bucket creation and removal" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: could not create bucket, continuously raced with bucket creation and removal" << dendl;
return -ENOENT;
}
return get_obj_data_pool(placement_rule, obj, &raw_obj->pool);
}
-int RGWRados::get_obj_head_ioctx(const RGWBucketInfo& bucket_info, const rgw_obj& obj, librados::IoCtx *ioctx)
+int RGWRados::get_obj_head_ioctx(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw_obj& obj, librados::IoCtx *ioctx)
{
string oid, key;
get_obj_bucket_and_oid_loc(obj, oid, key);
rgw_pool pool;
if (!get_obj_data_pool(bucket_info.placement_rule, obj, &pool)) {
- ldout(cct, 0) << "ERROR: cannot get data pool for obj=" << obj << ", probably misconfiguration" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: cannot get data pool for obj=" << obj << ", probably misconfiguration" << dendl;
return -EIO;
}
- int r = open_pool_ctx(pool, *ioctx, false);
+ int r = open_pool_ctx(dpp, pool, *ioctx, false);
if (r < 0) {
return r;
}
return 0;
}
-int RGWRados::get_obj_head_ref(const RGWBucketInfo& bucket_info, const rgw_obj& obj, rgw_rados_ref *ref)
+int RGWRados::get_obj_head_ref(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw_obj& obj, rgw_rados_ref *ref)
{
get_obj_bucket_and_oid_loc(obj, ref->obj.oid, ref->obj.loc);
rgw_pool pool;
if (!get_obj_data_pool(bucket_info.placement_rule, obj, &pool)) {
- ldout(cct, 0) << "ERROR: cannot get data pool for obj=" << obj << ", probably misconfiguration" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: cannot get data pool for obj=" << obj << ", probably misconfiguration" << dendl;
return -EIO;
}
ref->pool = svc.rados->pool(pool);
- int r = ref->pool.open(RGWSI_RADOS::OpenParams()
+ int r = ref->pool.open(dpp, RGWSI_RADOS::OpenParams()
.set_mostly_omap(false));
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed opening data pool (pool=" << pool << "); r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed opening data pool (pool=" << pool << "); r=" << r << dendl;
return r;
}
return 0;
}
-int RGWRados::get_raw_obj_ref(const rgw_raw_obj& obj, rgw_rados_ref *ref)
+int RGWRados::get_raw_obj_ref(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, rgw_rados_ref *ref)
{
ref->obj = obj;
ref->obj.pool = svc.zone->get_zone_params().domain_root;
}
ref->pool = svc.rados->pool(obj.pool);
- int r = ref->pool.open(RGWSI_RADOS::OpenParams()
+ int r = ref->pool.open(dpp, RGWSI_RADOS::OpenParams()
.set_mostly_omap(false));
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed opening pool (pool=" << obj.pool << "); r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed opening pool (pool=" << obj.pool << "); r=" << r << dendl;
return r;
}
return 0;
}
-int RGWRados::get_system_obj_ref(const rgw_raw_obj& obj, rgw_rados_ref *ref)
+int RGWRados::get_system_obj_ref(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, rgw_rados_ref *ref)
{
- return get_raw_obj_ref(obj, ref);
+ return get_raw_obj_ref(dpp, obj, ref);
}
/*
* fixes an issue where head objects were supposed to have a locator created, but ended
* up without one
*/
-int RGWRados::fix_head_obj_locator(const RGWBucketInfo& bucket_info, bool copy_obj, bool remove_bad, rgw_obj_key& key)
+int RGWRados::fix_head_obj_locator(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, bool copy_obj, bool remove_bad, rgw_obj_key& key)
{
const rgw_bucket& bucket = bucket_info.bucket;
string oid;
get_obj_bucket_and_oid_loc(obj, oid, locator);
if (locator.empty()) {
- ldout(cct, 20) << "object does not have a locator, nothing to fix" << dendl;
+ ldpp_dout(dpp, 20) << "object does not have a locator, nothing to fix" << dendl;
return 0;
}
librados::IoCtx ioctx;
- int ret = get_obj_head_ioctx(bucket_info, obj, &ioctx);
+ int ret = get_obj_head_ioctx(dpp, bucket_info, obj, &ioctx);
if (ret < 0) {
cerr << "ERROR: get_obj_head_ioctx() returned ret=" << ret << std::endl;
return ret;
#define HEAD_SIZE 512 * 1024
op.read(0, HEAD_SIZE, &data, NULL);
- ret = rgw_rados_operate(ioctx, oid, &op, &data, null_yield);
+ ret = rgw_rados_operate(dpp, ioctx, oid, &op, &data, null_yield);
if (ret < 0) {
- lderr(cct) << "ERROR: rgw_rados_operate(oid=" << oid << ") returned ret=" << ret << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: rgw_rados_operate(oid=" << oid << ") returned ret=" << ret << dendl;
return ret;
}
if (size > HEAD_SIZE) {
- lderr(cct) << "ERROR: returned object size (" << size << ") > HEAD_SIZE (" << HEAD_SIZE << ")" << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: returned object size (" << size << ") > HEAD_SIZE (" << HEAD_SIZE << ")" << dendl;
return -EIO;
}
if (size != data.length()) {
- lderr(cct) << "ERROR: returned object size (" << size << ") != data.length() (" << data.length() << ")" << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: returned object size (" << size << ") != data.length() (" << data.length() << ")" << dendl;
return -EIO;
}
wop.write(0, data);
ioctx.locator_set_key(locator);
- rgw_rados_operate(ioctx, oid, &wop, null_yield);
+ rgw_rados_operate(dpp, ioctx, oid, &wop, null_yield);
}
if (remove_bad) {
ret = ioctx.remove(oid);
if (ret < 0) {
- lderr(cct) << "ERROR: failed to remove original bad object" << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: failed to remove original bad object" << dendl;
return ret;
}
}
return 0;
}
-int RGWRados::move_rados_obj(librados::IoCtx& src_ioctx,
+int RGWRados::move_rados_obj(const DoutPrefixProvider *dpp,
+ librados::IoCtx& src_ioctx,
const string& src_oid, const string& src_locator,
librados::IoCtx& dst_ioctx,
const string& dst_oid, const string& dst_locator)
mtime = real_clock::from_timespec(mtime_ts);
}
rop.read(ofs, chunk_size, &data, NULL);
- ret = rgw_rados_operate(src_ioctx, src_oid, &rop, &data, null_yield);
+ ret = rgw_rados_operate(dpp, src_ioctx, src_oid, &rop, &data, null_yield);
if (ret < 0) {
goto done_err;
}
mtime = real_clock::from_timespec(mtime_ts);
}
wop.write(ofs, data);
- ret = rgw_rados_operate(dst_ioctx, dst_oid, &wop, null_yield);
+ ret = rgw_rados_operate(dpp, dst_ioctx, dst_oid, &wop, null_yield);
if (ret < 0) {
goto done_err;
}
} while (!done);
if (ofs != size) {
- lderr(cct) << "ERROR: " << __func__ << ": copying " << src_oid << " -> " << dst_oid
+ ldpp_dout(dpp, -1) << "ERROR: " << __func__ << ": copying " << src_oid << " -> " << dst_oid
<< ": expected " << size << " bytes to copy, ended up with " << ofs << dendl;
ret = -EIO;
goto done_err;
done_err:
// TODO: clean up dst_oid if we created it
- lderr(cct) << "ERROR: failed to copy " << src_oid << " -> " << dst_oid << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: failed to copy " << src_oid << " -> " << dst_oid << dendl;
return ret;
}
* fixes an issue where head objects were supposed to have a locator created, but ended
* up without one
*/
-int RGWRados::fix_tail_obj_locator(const RGWBucketInfo& bucket_info, rgw_obj_key& key, bool fix, bool *need_fix, optional_yield y)
+int RGWRados::fix_tail_obj_locator(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, rgw_obj_key& key, bool fix, bool *need_fix, optional_yield y)
{
const rgw_bucket& bucket = bucket_info.bucket;
rgw_obj obj(bucket, key);
}
rgw_rados_ref ref;
- int r = get_obj_head_ref(bucket_info, obj, &ref);
+ int r = get_obj_head_ref(dpp, bucket_info, obj, &ref);
if (r < 0) {
return r;
}
RGWObjState *astate = NULL;
RGWObjectCtx rctx(this->store);
- r = get_obj_state(&rctx, bucket_info, obj, &astate, false, y);
+ r = get_obj_state(dpp, &rctx, bucket_info, obj, &astate, false, y);
if (r < 0)
return r;
if (astate->manifest) {
RGWObjManifest::obj_iterator miter;
RGWObjManifest& manifest = *astate->manifest;
- for (miter = manifest.obj_begin(); miter != manifest.obj_end(); ++miter) {
+ for (miter = manifest.obj_begin(dpp); miter != manifest.obj_end(dpp); ++miter) {
rgw_raw_obj raw_loc = miter.get_location().get_raw_obj(store);
rgw_obj loc;
string oid;
get_obj_bucket_and_oid_loc(loc, oid, locator);
ref.pool.ioctx().locator_set_key(locator);
- ldout(cct, 20) << __func__ << ": key=" << key << " oid=" << oid << " locator=" << locator << dendl;
+ ldpp_dout(dpp, 20) << __func__ << ": key=" << key << " oid=" << oid << " locator=" << locator << dendl;
r = ioctx.stat(oid, NULL, NULL);
if (r != -ENOENT) {
/* cannot find a broken part */
continue;
}
- ldout(cct, 20) << __func__ << ": found bad object part: " << loc << dendl;
+ ldpp_dout(dpp, 20) << __func__ << ": found bad object part: " << loc << dendl;
if (need_fix) {
*need_fix = true;
}
if (fix) {
- r = move_rados_obj(src_ioctx, oid, bad_loc, ioctx, oid, locator);
+ r = move_rados_obj(dpp, src_ioctx, oid, bad_loc, ioctx, oid, locator);
if (r < 0) {
- lderr(cct) << "ERROR: copy_rados_obj() on oid=" << oid << " returned r=" << r << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: copy_rados_obj() on oid=" << oid << " returned r=" << r << dendl;
}
}
}
int RGWRados::BucketShard::init(const rgw_bucket& _bucket,
const rgw_obj& obj,
- RGWBucketInfo* bucket_info_out)
+ RGWBucketInfo* bucket_info_out,
+ const DoutPrefixProvider *dpp)
{
bucket = _bucket;
RGWBucketInfo* bucket_info_p =
bucket_info_out ? bucket_info_out : &bucket_info;
- int ret = store->get_bucket_instance_info(obj_ctx, bucket, *bucket_info_p, NULL, NULL, null_yield);
+ int ret = store->get_bucket_instance_info(obj_ctx, bucket, *bucket_info_p, NULL, NULL, null_yield, dpp);
if (ret < 0) {
return ret;
}
string oid;
- ret = store->svc.bi_rados->open_bucket_index_shard(*bucket_info_p, obj.get_hash_object(), &bucket_obj, &shard_id);
+ ret = store->svc.bi_rados->open_bucket_index_shard(dpp, *bucket_info_p, obj.get_hash_object(), &bucket_obj, &shard_id);
if (ret < 0) {
- ldout(store->ctx(), 0) << "ERROR: open_bucket_index_shard() returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: open_bucket_index_shard() returned ret=" << ret << dendl;
return ret;
}
- ldout(store->ctx(), 20) << " bucket index object: " << bucket_obj.get_raw_obj() << dendl;
+ ldpp_dout(dpp, 20) << " bucket index object: " << bucket_obj.get_raw_obj() << dendl;
return 0;
}
int RGWRados::BucketShard::init(const rgw_bucket& _bucket,
int sid, const rgw::bucket_index_layout_generation& idx_layout,
- RGWBucketInfo* bucket_info_out)
+ RGWBucketInfo* bucket_info_out,
+ const DoutPrefixProvider *dpp)
{
bucket = _bucket;
shard_id = sid;
RGWBucketInfo bucket_info;
RGWBucketInfo* bucket_info_p =
bucket_info_out ? bucket_info_out : &bucket_info;
- int ret = store->get_bucket_instance_info(obj_ctx, bucket, *bucket_info_p, NULL, NULL, null_yield);
+ int ret = store->get_bucket_instance_info(obj_ctx, bucket, *bucket_info_p, NULL, NULL, null_yield, dpp);
if (ret < 0) {
return ret;
}
string oid;
- ret = store->svc.bi_rados->open_bucket_index_shard(*bucket_info_p, shard_id, idx_layout, &bucket_obj);
+ ret = store->svc.bi_rados->open_bucket_index_shard(dpp, *bucket_info_p, shard_id, idx_layout, &bucket_obj);
if (ret < 0) {
- ldout(store->ctx(), 0) << "ERROR: open_bucket_index_shard() returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: open_bucket_index_shard() returned ret=" << ret << dendl;
return ret;
}
- ldout(store->ctx(), 20) << " bucket index oid: " << bucket_obj.get_raw_obj() << dendl;
+ ldpp_dout(dpp, 20) << " bucket index oid: " << bucket_obj.get_raw_obj() << dendl;
return 0;
}
-int RGWRados::BucketShard::init(const RGWBucketInfo& bucket_info,
+int RGWRados::BucketShard::init(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info,
const rgw_obj& obj)
{
bucket = bucket_info.bucket;
- int ret = store->svc.bi_rados->open_bucket_index_shard(bucket_info,
+ int ret = store->svc.bi_rados->open_bucket_index_shard(dpp, bucket_info,
obj.get_hash_object(),
&bucket_obj,
&shard_id);
if (ret < 0) {
- ldout(store->ctx(), 0) << "ERROR: open_bucket_index_shard() returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: open_bucket_index_shard() returned ret=" << ret << dendl;
return ret;
}
- ldout(store->ctx(), 20) << " bucket index object: " << bucket_obj << dendl;
+ ldpp_dout(dpp, 20) << " bucket index object: " << bucket_obj << dendl;
return 0;
}
-int RGWRados::BucketShard::init(const RGWBucketInfo& bucket_info, const rgw::bucket_index_layout_generation& idx_layout, int sid)
+int RGWRados::BucketShard::init(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw::bucket_index_layout_generation& idx_layout, int sid)
{
bucket = bucket_info.bucket;
shard_id = sid;
- int ret = store->svc.bi_rados->open_bucket_index_shard(bucket_info, shard_id, idx_layout, &bucket_obj);
+ int ret = store->svc.bi_rados->open_bucket_index_shard(dpp, bucket_info, shard_id, idx_layout, &bucket_obj);
if (ret < 0) {
- ldout(store->ctx(), 0) << "ERROR: open_bucket_index_shard() returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: open_bucket_index_shard() returned ret=" << ret << dendl;
return ret;
}
- ldout(store->ctx(), 20) << " bucket index object: " << bucket_obj << dendl;
+ ldpp_dout(dpp, 20) << " bucket index object: " << bucket_obj << dendl;
return 0;
}
/* Execute @handler on last item in bucket listing for bucket specified
* in @bucket_info. @obj_prefix and @obj_delim narrow down the listing
* to objects matching these criterias. */
-int RGWRados::on_last_entry_in_listing(RGWBucketInfo& bucket_info,
+int RGWRados::on_last_entry_in_listing(const DoutPrefixProvider *dpp,
+ RGWBucketInfo& bucket_info,
const std::string& obj_prefix,
const std::string& obj_delim,
std::function<int(const rgw_bucket_dir_entry&)> handler)
list_op.params.prefix = obj_prefix;
list_op.params.delim = obj_delim;
- ldout(cct, 20) << "iterating listing for bucket=" << bucket_info.bucket.name
+ ldpp_dout(dpp, 20) << "iterating listing for bucket=" << bucket_info.bucket.name
<< ", obj_prefix=" << obj_prefix
<< ", obj_delim=" << obj_delim
<< dendl;
static constexpr int MAX_LIST_OBJS = 100;
std::vector<rgw_bucket_dir_entry> entries(MAX_LIST_OBJS);
- int ret = list_op.list_objects(MAX_LIST_OBJS, &entries, nullptr,
+ int ret = list_op.list_objects(dpp, MAX_LIST_OBJS, &entries, nullptr,
&is_truncated, null_yield);
if (ret < 0) {
return ret;
obj->set_atomic(&obj_ctx);
RGWObjState * state = nullptr;
- int r = get_obj_state(&obj_ctx, bucket->get_info(), obj->get_obj(), &state, false, y);
+ int r = get_obj_state(dpp, &obj_ctx, bucket->get_info(), obj->get_obj(), &state, false, y);
if (r < 0) {
return r;
}
r = get_bucket_info(&svc, bucket->get_tenant(), bucket->get_info().swift_ver_location, dest_bucket_info, NULL, null_yield, NULL);
if (r < 0) {
- ldout(cct, 10) << "failed to read dest bucket info: r=" << r << dendl;
+ ldpp_dout(dpp, 10) << "failed to read dest bucket info: r=" << r << dendl;
if (r == -ENOENT) {
return -ERR_PRECONDITION_FAILED;
}
}
/* Need to remove the archived copy. */
- ret = delete_obj(obj_ctx, archive_binfo, archive_obj.get_obj(),
+ ret = delete_obj(dpp, obj_ctx, archive_binfo, archive_obj.get_obj(),
archive_binfo.versioning_status());
return ret;
const auto prefix = boost::str(boost::format("%03x%s") % obj_name.size()
% obj_name);
- return on_last_entry_in_listing(archive_binfo, prefix, std::string(),
+ return on_last_entry_in_listing(dpp, archive_binfo, prefix, std::string(),
handler);
}
-int RGWRados::Object::Write::_do_write_meta(uint64_t size, uint64_t accounted_size,
+int RGWRados::Object::Write::_do_write_meta(const DoutPrefixProvider *dpp,
+ uint64_t size, uint64_t accounted_size,
map<string, bufferlist>& attrs,
bool assume_noent, bool modify_tail,
void *_index_op, optional_yield y)
#endif
RGWObjState *state;
- int r = target->get_state(&state, false, y, assume_noent);
+ int r = target->get_state(dpp, &state, false, y, assume_noent);
if (r < 0)
return r;
rgw_obj& obj = target->get_obj();
if (obj.get_oid().empty()) {
- ldout(store->ctx(), 0) << "ERROR: " << __func__ << "(): cannot write object with empty name" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: " << __func__ << "(): cannot write object with empty name" << dendl;
return -EIO;
}
rgw_rados_ref ref;
- r = store->get_obj_head_ref(target->get_bucket_info(), obj, &ref);
+ r = store->get_obj_head_ref(dpp, target->get_bucket_info(), obj, &ref);
if (r < 0)
return r;
if (!ptag && !index_op->get_optag()->empty()) {
ptag = index_op->get_optag();
}
- r = target->prepare_atomic_modification(op, reset_obj, ptag, meta.if_match, meta.if_nomatch, false, modify_tail, y);
+ r = target->prepare_atomic_modification(dpp, op, reset_obj, ptag, meta.if_match, meta.if_nomatch, false, modify_tail, y);
if (r < 0)
return r;
if (!index_op->is_prepared()) {
tracepoint(rgw_rados, prepare_enter, req_id.c_str());
- r = index_op->prepare(CLS_RGW_OP_ADD, &state->write_tag, y);
+ r = index_op->prepare(dpp, CLS_RGW_OP_ADD, &state->write_tag, y);
tracepoint(rgw_rados, prepare_exit, req_id.c_str());
if (r < 0)
return r;
auto& ioctx = ref.pool.ioctx();
tracepoint(rgw_rados, operate_enter, req_id.c_str());
- r = rgw_rados_operate(ref.pool.ioctx(), ref.obj.oid, &op, null_yield);
+ r = rgw_rados_operate(dpp, ref.pool.ioctx(), ref.obj.oid, &op, null_yield);
tracepoint(rgw_rados, operate_exit, req_id.c_str());
if (r < 0) { /* we can expect to get -ECANCELED if object was replaced under,
or -ENOENT if was removed, or -EEXIST if it did not exist
epoch = ioctx.get_last_version();
poolid = ioctx.get_id();
- r = target->complete_atomic_modification();
+ r = target->complete_atomic_modification(dpp);
if (r < 0) {
- ldout(store->ctx(), 0) << "ERROR: complete_atomic_modification returned r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: complete_atomic_modification returned r=" << r << dendl;
}
tracepoint(rgw_rados, complete_enter, req_id.c_str());
- r = index_op->complete(poolid, epoch, size, accounted_size,
+ r = index_op->complete(dpp, poolid, epoch, size, accounted_size,
meta.set_mtime, etag, content_type,
storage_class, &acl_bl,
meta.category, meta.remove_objs, meta.user_data, meta.appendable);
state = NULL;
if (versioned_op && meta.olh_epoch) {
- r = store->set_olh(target->get_ctx(), target->get_bucket_info(), obj, false, NULL, *meta.olh_epoch, real_time(), false, y, meta.zones_trace);
+ r = store->set_olh(dpp, target->get_ctx(), target->get_bucket_info(), obj, false, NULL, *meta.olh_epoch, real_time(), false, y, meta.zones_trace);
if (r < 0) {
return r;
}
rgw_obj_index_key obj_key;
obj.key.get_index_key(&obj_key);
- r = store->obj_expirer->hint_add(meta.delete_at, obj.bucket.tenant, obj.bucket.name,
+ r = store->obj_expirer->hint_add(dpp, meta.delete_at, obj.bucket.tenant, obj.bucket.name,
obj.bucket.bucket_id, obj_key);
if (r < 0) {
- ldout(store->ctx(), 0) << "ERROR: objexp_hint_add() returned r=" << r << ", object will not get removed" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: objexp_hint_add() returned r=" << r << ", object will not get removed" << dendl;
/* ignoring error, nothing we can do at this point */
}
}
return 0;
done_cancel:
- int ret = index_op->cancel();
+ int ret = index_op->cancel(dpp);
if (ret < 0) {
- ldout(store->ctx(), 0) << "ERROR: index_op.cancel()() returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: index_op.cancel()() returned ret=" << ret << dendl;
}
meta.canceled = true;
return r;
}
-int RGWRados::Object::Write::write_meta(uint64_t size, uint64_t accounted_size,
+int RGWRados::Object::Write::write_meta(const DoutPrefixProvider *dpp, uint64_t size, uint64_t accounted_size,
map<string, bufferlist>& attrs, optional_yield y)
{
RGWBucketInfo& bucket_info = target->get_bucket_info();
bool assume_noent = (meta.if_match == NULL && meta.if_nomatch == NULL);
int r;
if (assume_noent) {
- r = _do_write_meta(size, accounted_size, attrs, assume_noent, meta.modify_tail, (void *)&index_op, y);
+ r = _do_write_meta(dpp, size, accounted_size, attrs, assume_noent, meta.modify_tail, (void *)&index_op, y);
if (r == -EEXIST) {
assume_noent = false;
}
}
if (!assume_noent) {
- r = _do_write_meta(size, accounted_size, attrs, assume_noent, meta.modify_tail, (void *)&index_op, y);
+ r = _do_write_meta(dpp, size, accounted_size, attrs, assume_noent, meta.modify_tail, (void *)&index_op, y);
}
return r;
}
class RGWRadosPutObj : public RGWHTTPStreamRWRequest::ReceiveCB
{
+ const DoutPrefixProvider *dpp;
CephContext* cct;
rgw_obj obj;
rgw::putobj::DataProcessor *filter;
uint64_t lofs{0}; /* logical ofs */
std::function<int(map<string, bufferlist>&)> attrs_handler;
public:
- RGWRadosPutObj(CephContext* cct,
+ RGWRadosPutObj(const DoutPrefixProvider *dpp,
+ CephContext* cct,
CompressorRef& plugin,
boost::optional<RGWPutObj_Compress>& compressor,
rgw::putobj::ObjectProcessor *p,
void (*_progress_cb)(off_t, void *),
void *_progress_data,
std::function<int(map<string, bufferlist>&)> _attrs_handler) :
+ dpp(dpp),
cct(cct),
filter(p),
compressor(compressor),
if (extra_data_bl.length()) {
JSONParser jp;
if (!jp.parse(extra_data_bl.c_str(), extra_data_bl.length())) {
- ldout(cct, 0) << "failed to parse response extra data. len=" << extra_data_bl.length() << " data=" << extra_data_bl.c_str() << dendl;
+ ldpp_dout(dpp, 0) << "failed to parse response extra data. len=" << extra_data_bl.length() << " data=" << extra_data_bl.c_str() << dendl;
return -EIO;
}
bool compressed = false;
int r = rgw_compression_info_from_attr(bl, compressed, info);
if (r < 0) {
- ldout(cct, 4) << "failed to decode compression info, "
+ ldpp_dout(dpp, 4) << "failed to decode compression info, "
"disabling etag verification" << dendl;
try_etag_verify = false;
} else if (compressed) {
* to know the sequence in which the filters must be applied.
*/
if (try_etag_verify && src_attrs.find(RGW_ATTR_CRYPT_MODE) == src_attrs.end()) {
- ret = rgw::putobj::create_etag_verifier(cct, filter, manifest_bl,
+ ret = rgw::putobj::create_etag_verifier(dpp, cct, filter, manifest_bl,
compression_info,
etag_verifier);
if (ret < 0) {
- ldout(cct, 4) << "failed to initial etag verifier, "
+ ldpp_dout(dpp, 4) << "failed to initial etag verifier, "
"disabling etag verification" << dendl;
} else {
filter = etag_verifier.get();
}
};
-int RGWRados::stat_remote_obj(RGWObjectCtx& obj_ctx,
+int RGWRados::stat_remote_obj(const DoutPrefixProvider *dpp,
+ RGWObjectCtx& obj_ctx,
const rgw_user& user_id,
req_info *info,
const rgw_zone_id& source_zone,
constexpr bool rgwx_stat = true;
constexpr bool sync_manifest = true;
constexpr bool skip_decrypt = true;
- int ret = conn->get_obj(user_id, info, src_obj, pmod, unmod_ptr,
+ int ret = conn->get_obj(dpp, user_id, info, src_obj, pmod, unmod_ptr,
dest_mtime_weight.zone_short_id, dest_mtime_weight.pg_ver,
prepend_meta, get_op, rgwx_stat,
sync_manifest, skip_decrypt,
} else {
map<string, RGWRESTConn *>::iterator iter = zonegroup_conn_map.find(src_bucket->get_info().zonegroup);
if (iter == zonegroup_conn_map.end()) {
- ldout(cct, 0) << "could not find zonegroup connection to zonegroup: " << source_zone << dendl;
+ ldpp_dout(dpp, 0) << "could not find zonegroup connection to zonegroup: " << source_zone << dendl;
return -ENOENT;
}
conn = iter->second;
} else {
auto iter = zone_conn_map.find(source_zone);
if (iter == zone_conn_map.end()) {
- ldout(cct, 0) << "could not find zone connection to zone: " << source_zone << dendl;
+ ldpp_dout(dpp, 0) << "could not find zone connection to zone: " << source_zone << dendl;
return -ENOENT;
}
conn = iter->second;
std::optional<rgw_user> override_owner;
- RGWRadosPutObj cb(cct, plugin, compressor, &processor, progress_cb, progress_data,
+ RGWRadosPutObj cb(dpp, cct, plugin, compressor, &processor, progress_cb, progress_data,
[&](map<string, bufferlist>& obj_attrs) {
const rgw_placement_rule *ptail_rule;
&override_owner,
&ptail_rule);
if (ret < 0) {
- ldout(cct, 5) << "Aborting fetch: source object filter returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 5) << "Aborting fetch: source object filter returned ret=" << ret << dendl;
return ret;
}
if (compression_type != "none") {
plugin = Compressor::create(cct, compression_type);
if (!plugin) {
- ldout(cct, 1) << "Cannot load plugin for compression type "
+ ldpp_dout(dpp, 1) << "Cannot load plugin for compression type "
<< compression_type << dendl;
}
}
if (copy_if_newer) {
/* need to get mtime for destination */
- ret = get_obj_state(&obj_ctx, dest_bucket->get_info(), dest_obj->get_obj(), &dest_state, false, null_yield);
+ ret = get_obj_state(dpp, &obj_ctx, dest_bucket->get_info(), dest_obj->get_obj(), &dest_state, false, null_yield);
if (ret < 0)
goto set_err_state;
static constexpr bool rgwx_stat = false;
static constexpr bool sync_manifest = true;
static constexpr bool skip_decrypt = true;
- ret = conn->get_obj(user_id, info, src_obj, pmod, unmod_ptr,
+ ret = conn->get_obj(dpp, user_id, info, src_obj, pmod, unmod_ptr,
dest_mtime_weight.zone_short_id, dest_mtime_weight.pg_ver,
prepend_meta, get_op, rgwx_stat,
sync_manifest, skip_decrypt,
}
if (cb.get_data_len() != expected_size) {
ret = -EIO;
- ldout(cct, 0) << "ERROR: object truncated during fetching, expected "
+ ldpp_dout(dpp, 0) << "ERROR: object truncated during fetching, expected "
<< expected_size << " bytes but received " << cb.get_data_len() << dendl;
goto set_err_state;
}
auto& obj_attrs = cb.get_attrs();
RGWUserInfo owner_info;
- if (ctl.user->get_info_by_uid(*override_owner, &owner_info, null_yield) < 0) {
- ldout(cct, 10) << "owner info does not exist" << dendl;
+ if (ctl.user->get_info_by_uid(dpp, *override_owner, &owner_info, null_yield) < 0) {
+ ldpp_dout(dpp, 10) << "owner info does not exist" << dendl;
return -EINVAL;
}
auto aiter = obj_attrs.find(RGW_ATTR_ACL);
if (aiter == obj_attrs.end()) {
- ldout(cct, 0) << "WARNING: " << __func__ << "(): object doesn't have ACL attribute, setting default ACLs" << dendl;
+ ldpp_dout(dpp, 0) << "WARNING: " << __func__ << "(): object doesn't have ACL attribute, setting default ACLs" << dendl;
acl.create_default(owner_info.user_id, owner_info.display_name);
} else {
auto iter = aiter->second.cbegin();
try {
acl.decode(iter);
} catch (buffer::error& err) {
- ldout(cct, 0) << "ERROR: " << __func__ << "(): could not decode policy, caught buffer::error" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: " << __func__ << "(): could not decode policy, caught buffer::error" << dendl;
return -EIO;
}
}
try {
decode(delete_at, iter->second);
} catch (buffer::error& err) {
- ldout(cct, 0) << "ERROR: failed to decode delete_at field in intra zone copy" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to decode delete_at field in intra zone copy" << dendl;
}
}
}
try {
decode(pg_ver, iter);
} catch (buffer::error& err) {
- ldout(ctx(), 0) << "ERROR: failed to decode pg ver attribute, ignoring" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to decode pg ver attribute, ignoring" << dendl;
/* non critical error */
}
}
if (verifier_etag != trimmed_etag) {
ret = -EIO;
- ldout(cct, 0) << "ERROR: source and destination objects don't match. Expected etag:"
+ ldpp_dout(dpp, 0) << "ERROR: source and destination objects don't match. Expected etag:"
<< trimmed_etag << " Computed etag:" << verifier_etag << dendl;
goto set_err_state;
}
}
if (copy_if_newer && canceled) {
- ldout(cct, 20) << "raced with another write of obj: " << dest_obj << dendl;
+ ldpp_dout(dpp, 20) << "raced with another write of obj: " << dest_obj << dendl;
obj_ctx.invalidate(dest_obj->get_obj()); /* object was overwritten */
- ret = get_obj_state(&obj_ctx, dest_bucket->get_info(), dest_obj->get_obj(), &dest_state, false, null_yield);
+ ret = get_obj_state(dpp, &obj_ctx, dest_bucket->get_info(), dest_obj->get_obj(), &dest_state, false, null_yield);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: " << __func__ << ": get_err_state() returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: " << __func__ << ": get_err_state() returned ret=" << ret << dendl;
goto set_err_state;
}
dest_mtime_weight.init(dest_state);
dest_mtime_weight.high_precision = high_precision_time;
if (!dest_state->exists ||
dest_mtime_weight < set_mtime_weight) {
- ldout(cct, 20) << "retrying writing object mtime=" << set_mtime << " dest_state->mtime=" << dest_state->mtime << " dest_state->exists=" << dest_state->exists << dendl;
+ ldpp_dout(dpp, 20) << "retrying writing object mtime=" << set_mtime << " dest_state->mtime=" << dest_state->mtime << " dest_state->exists=" << dest_state->exists << dendl;
continue;
} else {
- ldout(cct, 20) << "not retrying writing object mtime=" << set_mtime << " dest_state->mtime=" << dest_state->mtime << " dest_state->exists=" << dest_state->exists << dendl;
+ ldpp_dout(dpp, 20) << "not retrying writing object mtime=" << set_mtime << " dest_state->mtime=" << dest_state->mtime << " dest_state->exists=" << dest_state->exists << dendl;
}
}
break;
}
if (i == MAX_COMPLETE_RETRY) {
- ldout(cct, 0) << "ERROR: retried object completion too many times, something is wrong!" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: retried object completion too many times, something is wrong!" << dendl;
ret = -EIO;
goto set_err_state;
}
// for OP_LINK_OLH to call set_olh() with a real olh_epoch
if (olh_epoch && *olh_epoch > 0) {
constexpr bool log_data_change = true;
- ret = set_olh(obj_ctx, dest_bucket->get_info(), dest_obj->get_obj(), false, nullptr,
+ ret = set_olh(dpp, obj_ctx, dest_bucket->get_info(), dest_obj->get_obj(), false, nullptr,
*olh_epoch, real_time(), false, null_yield, zones_trace, log_data_change);
} else {
// we already have the latest copy
}
-int RGWRados::copy_obj_to_remote_dest(RGWObjState *astate,
+int RGWRados::copy_obj_to_remote_dest(const DoutPrefixProvider *dpp,
+ RGWObjState *astate,
map<string, bufferlist>& src_attrs,
RGWRados::Object::Read& read_op,
const rgw_user& user_id,
auto rest_master_conn = svc.zone->get_master_conn();
- int ret = rest_master_conn->put_obj_async(user_id, dest_obj, astate->size, src_attrs, true, &out_stream_req);
+ int ret = rest_master_conn->put_obj_async(dpp, user_id, dest_obj, astate->size, src_attrs, true, &out_stream_req);
if (ret < 0) {
return ret;
}
- ret = read_op.iterate(0, astate->size - 1, out_stream_req->get_out_cb(), null_yield);
+ ret = read_op.iterate(dpp, 0, astate->size - 1, out_stream_req->get_out_cb(), null_yield);
if (ret < 0) {
delete out_stream_req;
return ret;
read_op.params.lastmod = src_mtime;
read_op.params.obj_size = &obj_size;
- ret = read_op.prepare(y);
+ ret = read_op.prepare(y, dpp);
if (ret < 0) {
return ret;
}
RGWObjManifest manifest;
RGWObjState *astate = NULL;
- ret = get_obj_state(&obj_ctx, src_bucket->get_info(), src_obj->get_obj(), &astate, y);
+ ret = get_obj_state(dpp, &obj_ctx, src_bucket->get_info(), src_obj->get_obj(), &astate, y);
if (ret < 0) {
return ret;
}
if (remote_dest) {
/* dest is in a different zonegroup, copy it there */
- return copy_obj_to_remote_dest(astate, attrs, read_op, user_id, dest_obj, mtime);
+ return copy_obj_to_remote_dest(dpp, astate, attrs, read_op, user_id, dest_obj, mtime);
}
uint64_t max_chunk_size;
- ret = get_max_chunk_size(dest_bucket->get_placement_rule(), dest_obj->get_obj(), &max_chunk_size);
+ ret = get_max_chunk_size(dest_bucket->get_placement_rule(), dest_obj->get_obj(), &max_chunk_size, dpp);
if (ret < 0) {
ldpp_dout(dpp, 0) << "ERROR: failed to get max_chunk_size() for bucket " << dest_obj->get_bucket() << dendl;
return ret;
mtime, real_time(), attrs, olh_epoch, delete_at, petag, dpp, y);
}
- RGWObjManifest::obj_iterator miter = astate->manifest->obj_begin();
+ RGWObjManifest::obj_iterator miter = astate->manifest->obj_begin(dpp);
if (copy_first) { // we need to copy first chunk, not increase refcount
++miter;
}
rgw_rados_ref ref;
- ret = get_raw_obj_ref(miter.get_location().get_raw_obj(store), &ref);
+ ret = get_raw_obj_ref(dpp, miter.get_location().get_raw_obj(store), &ref);
if (ret < 0) {
return ret;
}
manifest.set_tail_placement(tail_placement.placement_rule, src_obj->get_bucket()->get_key());
}
string ref_tag;
- for (; miter != astate->manifest->obj_end(); ++miter) {
+ for (; miter != astate->manifest->obj_end(dpp); ++miter) {
ObjectWriteOperation op;
ref_tag = tag + '\0';
cls_refcount_get(op, ref_tag, true);
auto& ioctx = ref.pool.ioctx();
ioctx.locator_set_key(loc.loc);
- ret = rgw_rados_operate(ioctx, loc.oid, &op, null_yield);
+ ret = rgw_rados_operate(dpp, ioctx, loc.oid, &op, null_yield);
if (ret < 0) {
goto done_ret;
}
}
if (copy_first) {
- ret = read_op.read(0, max_chunk_size, first_chunk, y);
+ ret = read_op.read(0, max_chunk_size, first_chunk, y, dpp);
if (ret < 0) {
goto done_ret;
}
write_op.meta.delete_at = delete_at;
write_op.meta.modify_tail = !copy_itself;
- ret = write_op.write_meta(obj_size, astate->accounted_size, attrs, y);
+ ret = write_op.write_meta(dpp, obj_size, astate->accounted_size, attrs, y);
if (ret < 0) {
goto done_ret;
}
ref.pool.ioctx().locator_set_key(riter->loc);
- int r = rgw_rados_operate(ref.pool.ioctx(), riter->oid, &op, null_yield);
+ int r = rgw_rados_operate(dpp, ref.pool.ioctx(), riter->oid, &op, null_yield);
if (r < 0) {
ldpp_dout(dpp, 0) << "ERROR: cleanup after error failed to drop reference on obj=" << *riter << dendl;
}
do {
bufferlist bl;
- ret = read_op.read(ofs, end, bl, y);
+ ret = read_op.read(ofs, end, bl, y, dpp);
if (ret < 0) {
ldpp_dout(dpp, 0) << "ERROR: fail to read object data, ret = " << ret << dendl;
return ret;
read_op.params.lastmod = &read_mtime;
read_op.params.obj_size = &obj_size;
- int ret = read_op.prepare(y);
+ int ret = read_op.prepare(y, dpp);
if (ret < 0) {
return ret;
}
return 0;
}
-int RGWRados::check_bucket_empty(RGWBucketInfo& bucket_info, optional_yield y)
+int RGWRados::check_bucket_empty(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info, optional_yield y)
{
constexpr uint NUM_ENTRIES = 1000u;
std::vector<rgw_bucket_dir_entry> ent_list;
ent_list.reserve(NUM_ENTRIES);
- int r = cls_bucket_list_unordered(bucket_info,
+ int r = cls_bucket_list_unordered(dpp,
+ bucket_info,
RGW_NO_SHARD,
marker,
prefix,
* bucket: the name of the bucket to delete
* Returns 0 on success, -ERR# otherwise.
*/
-int RGWRados::delete_bucket(RGWBucketInfo& bucket_info, RGWObjVersionTracker& objv_tracker, optional_yield y, bool check_empty)
+int RGWRados::delete_bucket(RGWBucketInfo& bucket_info, RGWObjVersionTracker& objv_tracker, optional_yield y, const DoutPrefixProvider *dpp, bool check_empty)
{
const rgw_bucket& bucket = bucket_info.bucket;
RGWSI_RADOS::Pool index_pool;
map<int, string> bucket_objs;
- int r = svc.bi_rados->open_bucket_index(bucket_info, std::nullopt, &index_pool, &bucket_objs, nullptr);
+ int r = svc.bi_rados->open_bucket_index(dpp, bucket_info, std::nullopt, &index_pool, &bucket_objs, nullptr);
if (r < 0)
return r;
if (check_empty) {
- r = check_bucket_empty(bucket_info, y);
+ r = check_bucket_empty(dpp, bucket_info, y);
if (r < 0) {
return r;
}
r = ctl.bucket->read_bucket_entrypoint_info(bucket_info.bucket,
&ep,
null_yield,
+ dpp,
RGWBucketCtl::Bucket::GetParams()
.set_objv_tracker(&objv_tracker));
if (r < 0 ||
(!bucket_info.bucket.bucket_id.empty() &&
ep.bucket.bucket_id != bucket_info.bucket.bucket_id)) {
if (r != -ENOENT) {
- ldout(cct, 0) << "ERROR: read_bucket_entrypoint_info() bucket=" << bucket_info.bucket << " returned error: r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: read_bucket_entrypoint_info() bucket=" << bucket_info.bucket << " returned error: r=" << r << dendl;
/* we have no idea what caused the error, will not try to remove it */
}
/*
}
if (remove_ep) {
- r = ctl.bucket->remove_bucket_entrypoint_info(bucket_info.bucket, null_yield,
+ r = ctl.bucket->remove_bucket_entrypoint_info(bucket_info.bucket, null_yield, dpp,
RGWBucketCtl::Bucket::RemoveParams()
.set_objv_tracker(&objv_tracker));
if (r < 0)
/* if the bucket is not synced we can remove the meta file */
if (!svc.zone->is_syncing_bucket_meta(bucket)) {
RGWObjVersionTracker objv_tracker;
- r = ctl.bucket->remove_bucket_instance_info(bucket, bucket_info, null_yield);
+ r = ctl.bucket->remove_bucket_instance_info(bucket, bucket_info, null_yield, dpp);
if (r < 0) {
return r;
}
return 0;
}
-int RGWRados::set_bucket_owner(rgw_bucket& bucket, ACLOwner& owner)
+int RGWRados::set_bucket_owner(rgw_bucket& bucket, ACLOwner& owner, const DoutPrefixProvider *dpp)
{
RGWBucketInfo info;
map<string, bufferlist> attrs;
auto obj_ctx = svc.sysobj->init_obj_ctx();
if (bucket.bucket_id.empty()) {
- r = get_bucket_info(&svc, bucket.tenant, bucket.name, info, NULL, null_yield, &attrs);
+ r = get_bucket_info(&svc, bucket.tenant, bucket.name, info, NULL, null_yield, dpp, &attrs);
} else {
- r = get_bucket_instance_info(obj_ctx, bucket, info, nullptr, &attrs, null_yield);
+ r = get_bucket_instance_info(obj_ctx, bucket, info, nullptr, &attrs, null_yield, dpp);
}
if (r < 0) {
- ldout(cct, 0) << "NOTICE: get_bucket_info on bucket=" << bucket.name << " returned err=" << r << dendl;
+ ldpp_dout(dpp, 0) << "NOTICE: get_bucket_info on bucket=" << bucket.name << " returned err=" << r << dendl;
return r;
}
info.owner = owner.get_id();
- r = put_bucket_instance_info(info, false, real_time(), &attrs);
+ r = put_bucket_instance_info(info, false, real_time(), &attrs, dpp);
if (r < 0) {
- ldout(cct, 0) << "NOTICE: put_bucket_info on bucket=" << bucket.name << " returned err=" << r << dendl;
+ ldpp_dout(dpp, 0) << "NOTICE: put_bucket_info on bucket=" << bucket.name << " returned err=" << r << dendl;
return r;
}
}
-int RGWRados::set_buckets_enabled(vector<rgw_bucket>& buckets, bool enabled)
+int RGWRados::set_buckets_enabled(vector<rgw_bucket>& buckets, bool enabled, const DoutPrefixProvider *dpp)
{
int ret = 0;
for (iter = buckets.begin(); iter != buckets.end(); ++iter) {
rgw_bucket& bucket = *iter;
- if (enabled)
- ldout(cct, 20) << "enabling bucket name=" << bucket.name << dendl;
- else
- ldout(cct, 20) << "disabling bucket name=" << bucket.name << dendl;
+ if (enabled) {
+ ldpp_dout(dpp, 20) << "enabling bucket name=" << bucket.name << dendl;
+ } else {
+ ldpp_dout(dpp, 20) << "disabling bucket name=" << bucket.name << dendl;
+ }
RGWBucketInfo info;
map<string, bufferlist> attrs;
- int r = get_bucket_info(&svc, bucket.tenant, bucket.name, info, NULL, null_yield, &attrs);
+ int r = get_bucket_info(&svc, bucket.tenant, bucket.name, info, NULL, null_yield, dpp, &attrs);
if (r < 0) {
- ldout(cct, 0) << "NOTICE: get_bucket_info on bucket=" << bucket.name << " returned err=" << r << ", skipping bucket" << dendl;
+ ldpp_dout(dpp, 0) << "NOTICE: get_bucket_info on bucket=" << bucket.name << " returned err=" << r << ", skipping bucket" << dendl;
ret = r;
continue;
}
info.flags |= BUCKET_SUSPENDED;
}
- r = put_bucket_instance_info(info, false, real_time(), &attrs);
+ r = put_bucket_instance_info(info, false, real_time(), &attrs, dpp);
if (r < 0) {
- ldout(cct, 0) << "NOTICE: put_bucket_info on bucket=" << bucket.name << " returned err=" << r << ", skipping bucket" << dendl;
+ ldpp_dout(dpp, 0) << "NOTICE: put_bucket_info on bucket=" << bucket.name << " returned err=" << r << ", skipping bucket" << dendl;
ret = r;
continue;
}
return ret;
}
-int RGWRados::bucket_suspended(rgw_bucket& bucket, bool *suspended)
+int RGWRados::bucket_suspended(const DoutPrefixProvider *dpp, rgw_bucket& bucket, bool *suspended)
{
RGWBucketInfo bucket_info;
- int ret = get_bucket_info(&svc, bucket.tenant, bucket.name, bucket_info, NULL, null_yield);
+ int ret = get_bucket_info(&svc, bucket.tenant, bucket.name, bucket_info, NULL, null_yield, dpp);
if (ret < 0) {
return ret;
}
return 0;
}
-int RGWRados::Object::complete_atomic_modification()
+int RGWRados::Object::complete_atomic_modification(const DoutPrefixProvider *dpp)
{
if ((!state->manifest)|| state->keep_tail)
return 0;
cls_rgw_obj_chain chain;
- store->update_gc_chain(obj, *state->manifest, &chain);
+ store->update_gc_chain(dpp, obj, *state->manifest, &chain);
if (chain.empty()) {
return 0;
auto ret = store->gc->send_chain(chain, tag); // do it synchronously
if (ret < 0) {
//Delete objects inline if send chain to gc fails
- store->delete_objs_inline(chain, tag);
+ store->delete_objs_inline(dpp, chain, tag);
}
return 0;
}
-void RGWRados::update_gc_chain(rgw_obj& head_obj, RGWObjManifest& manifest, cls_rgw_obj_chain *chain)
+void RGWRados::update_gc_chain(const DoutPrefixProvider *dpp, rgw_obj& head_obj, RGWObjManifest& manifest, cls_rgw_obj_chain *chain)
{
RGWObjManifest::obj_iterator iter;
rgw_raw_obj raw_head;
obj_to_raw(manifest.get_head_placement_rule(), head_obj, &raw_head);
- for (iter = manifest.obj_begin(); iter != manifest.obj_end(); ++iter) {
+ for (iter = manifest.obj_begin(dpp); iter != manifest.obj_end(dpp); ++iter) {
const rgw_raw_obj& mobj = iter.get_location().get_raw_obj(store);
if (mobj == raw_head)
continue;
return gc->send_chain(chain, tag);
}
-void RGWRados::delete_objs_inline(cls_rgw_obj_chain& chain, const string& tag)
+void RGWRados::delete_objs_inline(const DoutPrefixProvider *dpp, cls_rgw_obj_chain& chain, const string& tag)
{
string last_pool;
std::unique_ptr<IoCtx> ctx(new IoCtx);
cls_rgw_obj& obj = *liter;
if (obj.pool != last_pool) {
ctx.reset(new IoCtx);
- ret = rgw_init_ioctx(get_rados_handle(), obj.pool, *ctx);
+ ret = rgw_init_ioctx(dpp, get_rados_handle(), obj.pool, *ctx);
if (ret < 0) {
last_pool = "";
- ldout(cct, 0) << "ERROR: failed to create ioctx pool=" <<
+ ldpp_dout(dpp, 0) << "ERROR: failed to create ioctx pool=" <<
obj.pool << dendl;
continue;
}
}
ctx->locator_set_key(obj.loc);
const string& oid = obj.key.name; /* just stored raw oid there */
- ldout(cct, 5) << "delete_objs_inline: removing " << obj.pool <<
+ ldpp_dout(dpp, 5) << "delete_objs_inline: removing " << obj.pool <<
":" << obj.key.name << dendl;
ObjectWriteOperation op;
cls_refcount_put(op, tag, true);
ret = ctx->operate(oid, &op);
if (ret < 0) {
- ldout(cct, 5) << "delete_objs_inline: refcount put returned error " << ret << dendl;
+ ldpp_dout(dpp, 5) << "delete_objs_inline: refcount put returned error " << ret << dendl;
}
}
}
}
}
-int RGWRados::bucket_check_index(RGWBucketInfo& bucket_info,
+int RGWRados::bucket_check_index(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info,
map<RGWObjCategory, RGWStorageStats> *existing_stats,
map<RGWObjCategory, RGWStorageStats> *calculated_stats)
{
map<int, string> oids;
map<int, struct rgw_cls_check_index_ret> bucket_objs_ret;
- int ret = svc.bi_rados->open_bucket_index(bucket_info, std::nullopt, &index_pool, &oids, nullptr);
+ int ret = svc.bi_rados->open_bucket_index(dpp, bucket_info, std::nullopt, &index_pool, &oids, nullptr);
if (ret < 0) {
return ret;
}
return 0;
}
-int RGWRados::bucket_rebuild_index(RGWBucketInfo& bucket_info)
+int RGWRados::bucket_rebuild_index(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info)
{
RGWSI_RADOS::Pool index_pool;
map<int, string> bucket_objs;
- int r = svc.bi_rados->open_bucket_index(bucket_info, std::nullopt, &index_pool, &bucket_objs, nullptr);
+ int r = svc.bi_rados->open_bucket_index(dpp, bucket_info, std::nullopt, &index_pool, &bucket_objs, nullptr);
if (r < 0) {
return r;
}
return CLSRGWIssueBucketRebuild(index_pool.ioctx(), bucket_objs, cct->_conf->rgw_bucket_index_max_aio)();
}
-int RGWRados::bucket_set_reshard(const RGWBucketInfo& bucket_info, const cls_rgw_bucket_instance_entry& entry)
+int RGWRados::bucket_set_reshard(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const cls_rgw_bucket_instance_entry& entry)
{
RGWSI_RADOS::Pool index_pool;
map<int, string> bucket_objs;
- int r = svc.bi_rados->open_bucket_index(bucket_info, std::nullopt, &index_pool, &bucket_objs, nullptr);
+ int r = svc.bi_rados->open_bucket_index(dpp, bucket_info, std::nullopt, &index_pool, &bucket_objs, nullptr);
if (r < 0) {
return r;
}
return CLSRGWIssueSetBucketResharding(index_pool.ioctx(), bucket_objs, entry, cct->_conf->rgw_bucket_index_max_aio)();
}
-int RGWRados::defer_gc(void *ctx, const RGWBucketInfo& bucket_info, const rgw_obj& obj, optional_yield y)
+int RGWRados::defer_gc(const DoutPrefixProvider *dpp, void *ctx, const RGWBucketInfo& bucket_info, const rgw_obj& obj, optional_yield y)
{
RGWObjectCtx *rctx = static_cast<RGWObjectCtx *>(ctx);
std::string oid, key;
RGWObjState *state = NULL;
- int r = get_obj_state(rctx, bucket_info, obj, &state, false, y);
+ int r = get_obj_state(dpp, rctx, bucket_info, obj, &state, false, y);
if (r < 0)
return r;
if (!state->is_atomic) {
- ldout(cct, 20) << "state for obj=" << obj << " is not atomic, not deferring gc operation" << dendl;
+ ldpp_dout(dpp, 20) << "state for obj=" << obj << " is not atomic, not deferring gc operation" << dendl;
return -EINVAL;
}
} else if (state->obj_tag.length() > 0) {
tag = state->obj_tag.c_str();
} else {
- ldout(cct, 20) << "state->obj_tag is empty, not deferring gc operation" << dendl;
+ ldpp_dout(dpp, 20) << "state->obj_tag is empty, not deferring gc operation" << dendl;
return -EINVAL;
}
- ldout(cct, 0) << "defer chain tag=" << tag << dendl;
+ ldpp_dout(dpp, 0) << "defer chain tag=" << tag << dendl;
cls_rgw_obj_chain chain;
- update_gc_chain(state->obj, *state->manifest, &chain);
+ update_gc_chain(dpp, state->obj, *state->manifest, &chain);
return gc->async_defer_chain(tag, chain);
}
* obj: name of the object to delete
* Returns: 0 on success, -ERR# otherwise.
*/
-int RGWRados::Object::Delete::delete_obj(optional_yield y)
+int RGWRados::Object::Delete::delete_obj(optional_yield y, const DoutPrefixProvider *dpp)
{
RGWRados *store = target->get_store();
rgw_obj& src_obj = target->get_obj();
meta.mtime = params.mtime;
}
- int r = store->set_olh(target->get_ctx(), target->get_bucket_info(), marker, true, &meta, params.olh_epoch, params.unmod_since, params.high_precision_time, y, params.zones_trace);
+ int r = store->set_olh(dpp, target->get_ctx(), target->get_bucket_info(), marker, true, &meta, params.olh_epoch, params.unmod_since, params.high_precision_time, y, params.zones_trace);
if (r < 0) {
return r;
}
} else {
rgw_bucket_dir_entry dirent;
- int r = store->bi_get_instance(target->get_bucket_info(), obj, &dirent);
+ int r = store->bi_get_instance(dpp, target->get_bucket_info(), obj, &dirent);
if (r < 0) {
return r;
}
result.delete_marker = dirent.is_delete_marker();
- r = store->unlink_obj_instance(target->get_ctx(), target->get_bucket_info(), obj, params.olh_epoch, y, params.zones_trace);
+ r = store->unlink_obj_instance(dpp, target->get_ctx(), target->get_bucket_info(), obj, params.olh_epoch, y, params.zones_trace);
if (r < 0) {
return r;
}
}
BucketShard *bs;
- int r = target->get_bucket_shard(&bs);
+ int r = target->get_bucket_shard(&bs, dpp);
if (r < 0) {
- ldout(store->ctx(), 5) << "failed to get BucketShard object: r=" << r << dendl;
+ ldpp_dout(dpp, 5) << "failed to get BucketShard object: r=" << r << dendl;
return r;
}
- r = store->svc.datalog_rados->add_entry(target->bucket_info, bs->shard_id);
+ r = store->svc.datalog_rados->add_entry(dpp, target->bucket_info, bs->shard_id);
if (r < 0) {
- lderr(store->ctx()) << "ERROR: failed writing data log" << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: failed writing data log" << dendl;
return r;
}
}
rgw_rados_ref ref;
- int r = store->get_obj_head_ref(target->get_bucket_info(), obj, &ref);
+ int r = store->get_obj_head_ref(dpp, target->get_bucket_info(), obj, &ref);
if (r < 0) {
return r;
}
RGWObjState *state;
- r = target->get_state(&state, false, y);
+ r = target->get_state(dpp, &state, false, y);
if (r < 0)
return r;
unmod.tv_nsec = 0;
}
- ldout(store->ctx(), 10) << "If-UnModified-Since: " << params.unmod_since << " Last-Modified: " << ctime << dendl;
+ ldpp_dout(dpp, 10) << "If-UnModified-Since: " << params.unmod_since << " Last-Modified: " << ctime << dendl;
if (ctime > unmod) {
return -ERR_PRECONDITION_FAILED;
}
auto iter = bl.cbegin();
decode(delete_at, iter);
} catch (buffer::error& err) {
- ldout(store->ctx(), 0) << "ERROR: couldn't decode RGW_ATTR_DELETE_AT" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: couldn't decode RGW_ATTR_DELETE_AT" << dendl;
return -EIO;
}
return -ENOENT;
}
- r = target->prepare_atomic_modification(op, false, NULL, NULL, NULL, true, false, y);
+ r = target->prepare_atomic_modification(dpp, op, false, NULL, NULL, NULL, true, false, y);
if (r < 0)
return r;
index_op.set_zones_trace(params.zones_trace);
index_op.set_bilog_flags(params.bilog_flags);
- r = index_op.prepare(CLS_RGW_OP_DEL, &state->write_tag, y);
+ r = index_op.prepare(dpp, CLS_RGW_OP_DEL, &state->write_tag, y);
if (r < 0)
return r;
store->remove_rgw_head_obj(op);
auto& ioctx = ref.pool.ioctx();
- r = rgw_rados_operate(ioctx, ref.obj.oid, &op, null_yield);
+ r = rgw_rados_operate(dpp, ioctx, ref.obj.oid, &op, null_yield);
/* raced with another operation, object state is indeterminate */
const bool need_invalidate = (r == -ECANCELED);
tombstone_entry entry{*state};
obj_tombstone_cache->add(obj, entry);
}
- r = index_op.complete_del(poolid, ioctx.get_last_version(), state->mtime, params.remove_objs);
+ r = index_op.complete_del(dpp, poolid, ioctx.get_last_version(), state->mtime, params.remove_objs);
- int ret = target->complete_atomic_modification();
+ int ret = target->complete_atomic_modification(dpp);
if (ret < 0) {
- ldout(store->ctx(), 0) << "ERROR: complete_atomic_modification returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: complete_atomic_modification returned ret=" << ret << dendl;
}
/* other than that, no need to propagate error */
} else {
- int ret = index_op.cancel();
+ int ret = index_op.cancel(dpp);
if (ret < 0) {
- ldout(store->ctx(), 0) << "ERROR: index_op.cancel() returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: index_op.cancel() returned ret=" << ret << dendl;
}
}
return 0;
}
-int RGWRados::delete_obj(RGWObjectCtx& obj_ctx,
+int RGWRados::delete_obj(const DoutPrefixProvider *dpp,
+ RGWObjectCtx& obj_ctx,
const RGWBucketInfo& bucket_info,
const rgw_obj& obj,
- int versioning_status,
+ int versioning_status, // versioning flags in enum RGWBucketFlags
uint16_t bilog_flags,
const real_time& expiration_time,
rgw_zone_set *zones_trace)
del_op.params.expiration_time = expiration_time;
del_op.params.zones_trace = zones_trace;
- return del_op.delete_obj(null_yield);
+ return del_op.delete_obj(null_yield, dpp);
}
-int RGWRados::delete_raw_obj(const rgw_raw_obj& obj)
+int RGWRados::delete_raw_obj(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj)
{
rgw_rados_ref ref;
- int r = get_raw_obj_ref(obj, &ref);
+ int r = get_raw_obj_ref(dpp, obj, &ref);
if (r < 0) {
return r;
}
ObjectWriteOperation op;
op.remove();
- r = rgw_rados_operate(ref.pool.ioctx(), ref.obj.oid, &op, null_yield);
+ r = rgw_rados_operate(dpp, ref.pool.ioctx(), ref.obj.oid, &op, null_yield);
if (r < 0)
return r;
return 0;
}
-int RGWRados::delete_obj_index(const rgw_obj& obj, ceph::real_time mtime)
+int RGWRados::delete_obj_index(const rgw_obj& obj, ceph::real_time mtime, const DoutPrefixProvider *dpp)
{
std::string oid, key;
get_obj_bucket_and_oid_loc(obj, oid, key);
auto obj_ctx = svc.sysobj->init_obj_ctx();
RGWBucketInfo bucket_info;
- int ret = get_bucket_instance_info(obj_ctx, obj.bucket, bucket_info, NULL, NULL, null_yield);
+ int ret = get_bucket_instance_info(obj_ctx, obj.bucket, bucket_info, NULL, NULL, null_yield, dpp);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: " << __func__ << "() get_bucket_instance_info(bucket=" << obj.bucket << ") returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: " << __func__ << "() get_bucket_instance_info(bucket=" << obj.bucket << ") returned ret=" << ret << dendl;
return ret;
}
RGWRados::Bucket bop(this, bucket_info);
RGWRados::Bucket::UpdateIndex index_op(&bop, obj);
- return index_op.complete_del(-1 /* pool */, 0, mtime, NULL);
+ return index_op.complete_del(dpp, -1 /* pool */, 0, mtime, NULL);
}
-static void generate_fake_tag(rgw::sal::RGWStore* store, map<string, bufferlist>& attrset, RGWObjManifest& manifest, bufferlist& manifest_bl, bufferlist& tag_bl)
+static void generate_fake_tag(const DoutPrefixProvider *dpp, rgw::sal::RGWStore* store, map<string, bufferlist>& attrset, RGWObjManifest& manifest, bufferlist& manifest_bl, bufferlist& tag_bl)
{
string tag;
- RGWObjManifest::obj_iterator mi = manifest.obj_begin();
- if (mi != manifest.obj_end()) {
+ RGWObjManifest::obj_iterator mi = manifest.obj_begin(dpp);
+ if (mi != manifest.obj_end(dpp)) {
if (manifest.has_tail()) // first object usually points at the head, let's skip to a more unique part
++mi;
tag = mi.get_location().get_raw_obj(store).oid;
return (iter != attrs.end());
}
-int RGWRados::get_olh_target_state(RGWObjectCtx& obj_ctx, const RGWBucketInfo& bucket_info, const rgw_obj& obj,
+int RGWRados::get_olh_target_state(const DoutPrefixProvider *dpp, RGWObjectCtx& obj_ctx, const RGWBucketInfo& bucket_info, const rgw_obj& obj,
RGWObjState *olh_state, RGWObjState **target_state, optional_yield y)
{
ceph_assert(olh_state->is_olh);
rgw_obj target;
- int r = RGWRados::follow_olh(bucket_info, obj_ctx, olh_state, obj, &target); /* might return -EAGAIN */
+ int r = RGWRados::follow_olh(dpp, bucket_info, obj_ctx, olh_state, obj, &target); /* might return -EAGAIN */
if (r < 0) {
return r;
}
- r = get_obj_state(&obj_ctx, bucket_info, target, target_state, false, y);
+ r = get_obj_state(dpp, &obj_ctx, bucket_info, target, target_state, false, y);
if (r < 0) {
return r;
}
return 0;
}
-int RGWRados::get_obj_state_impl(RGWObjectCtx *rctx, const RGWBucketInfo& bucket_info, const rgw_obj& obj,
+int RGWRados::get_obj_state_impl(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx, const RGWBucketInfo& bucket_info, const rgw_obj& obj,
RGWObjState **state, bool follow_olh, optional_yield y, bool assume_noent)
{
if (obj.empty()) {
bool need_follow_olh = follow_olh && obj.key.instance.empty();
RGWObjState *s = rctx->get_state(obj);
- ldout(cct, 20) << "get_obj_state: rctx=" << (void *)rctx << " obj=" << obj << " state=" << (void *)s << " s->prefetch_data=" << s->prefetch_data << dendl;
+ ldpp_dout(dpp, 20) << "get_obj_state: rctx=" << (void *)rctx << " obj=" << obj << " state=" << (void *)s << " s->prefetch_data=" << s->prefetch_data << dendl;
*state = s;
if (s->has_attrs) {
if (s->is_olh && need_follow_olh) {
- return get_olh_target_state(*rctx, bucket_info, obj, s, state, y);
+ return get_olh_target_state(dpp, *rctx, bucket_info, obj, s, state, y);
}
return 0;
}
int r = -ENOENT;
if (!assume_noent) {
- r = RGWRados::raw_obj_stat(raw_obj, &s->size, &s->mtime, &s->epoch, &s->attrset, (s->prefetch_data ? &s->data : NULL), NULL, y);
+ r = RGWRados::raw_obj_stat(dpp, raw_obj, &s->size, &s->mtime, &s->epoch, &s->attrset, (s->prefetch_data ? &s->data : NULL), NULL, y);
}
if (r == -ENOENT) {
s->mtime = entry.mtime;
s->zone_short_id = entry.zone_short_id;
s->pg_ver = entry.pg_ver;
- ldout(cct, 20) << __func__ << "(): found obj in tombstone cache: obj=" << obj
+ ldpp_dout(dpp, 20) << __func__ << "(): found obj in tombstone cache: obj=" << obj
<< " mtime=" << s->mtime << " pgv=" << s->pg_ver << dendl;
} else {
s->mtime = real_time();
decode(info, p);
s->accounted_size = info.orig_size;
} catch (buffer::error&) {
- dout(0) << "ERROR: could not decode compression info for object: " << obj << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: could not decode compression info for object: " << obj << dendl;
return -EIO;
}
}
if (!compressed)
s->accounted_size = s->size;
} catch (buffer::error& err) {
- ldout(cct, 0) << "ERROR: couldn't decode manifest" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: couldn't decode manifest" << dendl;
return -EIO;
}
- ldout(cct, 10) << "manifest: total_size = " << s->manifest->get_obj_size() << dendl;
+ ldpp_dout(dpp, 10) << "manifest: total_size = " << s->manifest->get_obj_size() << dendl;
if (cct->_conf->subsys.should_gather<ceph_subsys_rgw, 20>() && \
s->manifest->has_explicit_objs()) {
RGWObjManifest::obj_iterator mi;
- for (mi = s->manifest->obj_begin(); mi != s->manifest->obj_end(); ++mi) {
- ldout(cct, 20) << "manifest: ofs=" << mi.get_ofs() << " loc=" << mi.get_location().get_raw_obj(store) << dendl;
+ for (mi = s->manifest->obj_begin(dpp); mi != s->manifest->obj_end(dpp); ++mi) {
+ ldpp_dout(dpp, 20) << "manifest: ofs=" << mi.get_ofs() << " loc=" << mi.get_location().get_raw_obj(store) << dendl;
}
}
* Uh oh, something's wrong, object with manifest should have tag. Let's
* create one out of the manifest, would be unique
*/
- generate_fake_tag(store, s->attrset, *s->manifest, manifest_bl, s->obj_tag);
+ generate_fake_tag(dpp, store, s->attrset, *s->manifest, manifest_bl, s->obj_tag);
s->fake_tag = true;
}
}
try {
decode(s->pg_ver, pgbl);
} catch (buffer::error& err) {
- ldout(cct, 0) << "ERROR: couldn't decode pg ver attr for object " << s->obj << ", non-critical error, ignoring" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: couldn't decode pg ver attr for object " << s->obj << ", non-critical error, ignoring" << dendl;
}
}
}
try {
decode(s->zone_short_id, zbl);
} catch (buffer::error& err) {
- ldout(cct, 0) << "ERROR: couldn't decode zone short id attr for object " << s->obj << ", non-critical error, ignoring" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: couldn't decode zone short id attr for object " << s->obj << ", non-critical error, ignoring" << dendl;
}
}
}
- if (s->obj_tag.length())
- ldout(cct, 20) << "get_obj_state: setting s->obj_tag to " << s->obj_tag.c_str() << dendl;
- else
- ldout(cct, 20) << "get_obj_state: s->obj_tag was set empty" << dendl;
+ if (s->obj_tag.length()) {
+ ldpp_dout(dpp, 20) << "get_obj_state: setting s->obj_tag to " << s->obj_tag.c_str() << dendl;
+ } else {
+ ldpp_dout(dpp, 20) << "get_obj_state: s->obj_tag was set empty" << dendl;
+ }
/* an object might not be olh yet, but could have olh id tag, so we should set it anyway if
* it exist, and not only if is_olh() returns true
if (is_olh(s->attrset)) {
s->is_olh = true;
- ldout(cct, 20) << __func__ << ": setting s->olh_tag to " << string(s->olh_tag.c_str(), s->olh_tag.length()) << dendl;
+ ldpp_dout(dpp, 20) << __func__ << ": setting s->olh_tag to " << string(s->olh_tag.c_str(), s->olh_tag.length()) << dendl;
if (need_follow_olh) {
- return get_olh_target_state(*rctx, bucket_info, obj, s, state, y);
+ return get_olh_target_state(dpp, *rctx, bucket_info, obj, s, state, y);
} else if (obj.key.have_null_instance() && !s->manifest) {
// read null version, and the head object only have olh info
s->exists = false;
return 0;
}
-int RGWRados::get_obj_state(RGWObjectCtx *rctx, const RGWBucketInfo& bucket_info, const rgw_obj& obj, RGWObjState **state,
+int RGWRados::get_obj_state(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx, const RGWBucketInfo& bucket_info, const rgw_obj& obj, RGWObjState **state,
bool follow_olh, optional_yield y, bool assume_noent)
{
int ret;
do {
- ret = get_obj_state_impl(rctx, bucket_info, obj, state, follow_olh, y, assume_noent);
+ ret = get_obj_state_impl(dpp, rctx, bucket_info, obj, state, follow_olh, y, assume_noent);
} while (ret == -EAGAIN);
return ret;
}
-int RGWRados::Object::get_manifest(RGWObjManifest **pmanifest, optional_yield y)
+int RGWRados::Object::get_manifest(const DoutPrefixProvider *dpp, RGWObjManifest **pmanifest, optional_yield y)
{
RGWObjState *astate;
- int r = get_state(&astate, true, y);
+ int r = get_state(dpp, &astate, true, y);
if (r < 0) {
return r;
}
return 0;
}
-int RGWRados::Object::Read::get_attr(const char *name, bufferlist& dest, optional_yield y)
+int RGWRados::Object::Read::get_attr(const DoutPrefixProvider *dpp, const char *name, bufferlist& dest, optional_yield y)
{
RGWObjState *state;
- int r = source->get_state(&state, true, y);
+ int r = source->get_state(dpp, &state, true, y);
if (r < 0)
return r;
if (!state->exists)
return 0;
}
-int RGWRados::Object::Stat::stat_async()
+int RGWRados::Object::Stat::stat_async(const DoutPrefixProvider *dpp)
{
RGWObjectCtx& ctx = source->get_ctx();
rgw_obj& obj = source->get_obj();
string loc;
get_obj_bucket_and_oid_loc(obj, oid, loc);
- int r = store->get_obj_head_ioctx(source->get_bucket_info(), obj, &state.io_ctx);
+ int r = store->get_obj_head_ioctx(dpp, source->get_bucket_info(), obj, &state.io_ctx);
if (r < 0) {
return r;
}
state.io_ctx.locator_set_key(loc);
r = state.io_ctx.aio_operate(oid, state.completion, &op, NULL);
if (r < 0) {
- ldout(store->ctx(), 5) << __func__
+ ldpp_dout(dpp, 5) << __func__
<< ": ERROR: aio_operate() returned ret=" << r
<< dendl;
return r;
return 0;
}
-int RGWRados::append_atomic_test(RGWObjectCtx *rctx,
+int RGWRados::append_atomic_test(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx,
const RGWBucketInfo& bucket_info, const rgw_obj& obj,
ObjectOperation& op, RGWObjState **pstate, optional_yield y)
{
if (!rctx)
return 0;
- int r = get_obj_state(rctx, bucket_info, obj, pstate, false, y);
+ int r = get_obj_state(dpp, rctx, bucket_info, obj, pstate, false, y);
if (r < 0)
return r;
- return append_atomic_test(*pstate, op);
+ return append_atomic_test(dpp, *pstate, op);
}
-int RGWRados::append_atomic_test(const RGWObjState* state,
+int RGWRados::append_atomic_test(const DoutPrefixProvider *dpp,
+ const RGWObjState* state,
librados::ObjectOperation& op)
{
if (!state->is_atomic) {
- ldout(cct, 20) << "state for obj=" << state->obj << " is not atomic, not appending atomic test" << dendl;
+ ldpp_dout(dpp, 20) << "state for obj=" << state->obj << " is not atomic, not appending atomic test" << dendl;
return 0;
}
if (state->obj_tag.length() > 0 && !state->fake_tag) {// check for backward compatibility
op.cmpxattr(RGW_ATTR_ID_TAG, LIBRADOS_CMPXATTR_OP_EQ, state->obj_tag);
} else {
- ldout(cct, 20) << "state->obj_tag is empty, not appending atomic test" << dendl;
+ ldpp_dout(dpp, 20) << "state->obj_tag is empty, not appending atomic test" << dendl;
}
return 0;
}
-int RGWRados::Object::get_state(RGWObjState **pstate, bool follow_olh, optional_yield y, bool assume_noent)
+int RGWRados::Object::get_state(const DoutPrefixProvider *dpp, RGWObjState **pstate, bool follow_olh, optional_yield y, bool assume_noent)
{
- return store->get_obj_state(&ctx, bucket_info, obj, pstate, follow_olh, y, assume_noent);
+ return store->get_obj_state(dpp, &ctx, bucket_info, obj, pstate, follow_olh, y, assume_noent);
}
void RGWRados::Object::invalidate_state()
ctx.invalidate(obj);
}
-int RGWRados::Object::prepare_atomic_modification(ObjectWriteOperation& op, bool reset_obj, const string *ptag,
+int RGWRados::Object::prepare_atomic_modification(const DoutPrefixProvider *dpp,
+ ObjectWriteOperation& op, bool reset_obj, const string *ptag,
const char *if_match, const char *if_nomatch, bool removal_op,
bool modify_tail, optional_yield y)
{
- int r = get_state(&state, false, y);
+ int r = get_state(dpp, &state, false, y);
if (r < 0)
return r;
(!state->fake_tag);
if (!state->is_atomic) {
- ldout(store->ctx(), 20) << "prepare_atomic_modification: state is not atomic. state=" << (void *)state << dendl;
+ ldpp_dout(dpp, 20) << "prepare_atomic_modification: state is not atomic. state=" << (void *)state << dendl;
if (reset_obj) {
op.create(false);
bufferlist bl;
bl.append(state->write_tag.c_str(), state->write_tag.size() + 1);
- ldout(store->ctx(), 10) << "setting object write_tag=" << state->write_tag << dendl;
+ ldpp_dout(dpp, 10) << "setting object write_tag=" << state->write_tag << dendl;
op.setxattr(RGW_ATTR_ID_TAG, bl);
if (modify_tail) {
* bl: the contents of the attr
* Returns: 0 on success, -ERR# otherwise.
*/
-int RGWRados::set_attr(void *ctx, const RGWBucketInfo& bucket_info, rgw_obj& obj, const char *name, bufferlist& bl)
+int RGWRados::set_attr(const DoutPrefixProvider *dpp, void *ctx, const RGWBucketInfo& bucket_info, rgw_obj& obj, const char *name, bufferlist& bl)
{
map<string, bufferlist> attrs;
attrs[name] = bl;
- return set_attrs(ctx, bucket_info, obj, attrs, NULL, null_yield);
+ return set_attrs(dpp, ctx, bucket_info, obj, attrs, NULL, null_yield);
}
-int RGWRados::set_attrs(void *ctx, const RGWBucketInfo& bucket_info, rgw_obj& src_obj,
+int RGWRados::set_attrs(const DoutPrefixProvider *dpp, void *ctx, const RGWBucketInfo& bucket_info, rgw_obj& src_obj,
map<string, bufferlist>& attrs,
map<string, bufferlist>* rmattrs,
optional_yield y)
}
rgw_rados_ref ref;
- int r = get_obj_head_ref(bucket_info, obj, &ref);
+ int r = get_obj_head_ref(dpp, bucket_info, obj, &ref);
if (r < 0) {
return r;
}
ObjectWriteOperation op;
RGWObjState *state = NULL;
- r = append_atomic_test(rctx, bucket_info, obj, op, &state, y);
+ r = append_atomic_test(dpp, rctx, bucket_info, obj, op, &state, y);
if (r < 0)
return r;
rgw_obj_index_key obj_key;
obj.key.get_index_key(&obj_key);
- obj_expirer->hint_add(ts, bucket.tenant, bucket.name, bucket.bucket_id, obj_key);
+ obj_expirer->hint_add(dpp, ts, bucket.tenant, bucket.name, bucket.bucket_id, obj_key);
} catch (buffer::error& err) {
- ldout(cct, 0) << "ERROR: failed to decode " RGW_ATTR_DELETE_AT << " attr" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to decode " RGW_ATTR_DELETE_AT << " attr" << dendl;
}
}
}
string tag;
append_rand_alpha(cct, tag, tag, 32);
state->write_tag = tag;
- r = index_op.prepare(CLS_RGW_OP_ADD, &state->write_tag, y);
+ r = index_op.prepare(dpp, CLS_RGW_OP_ADD, &state->write_tag, y);
if (r < 0)
return r;
struct timespec mtime_ts = real_clock::to_timespec(mtime);
op.mtime2(&mtime_ts);
auto& ioctx = ref.pool.ioctx();
- r = rgw_rados_operate(ioctx, ref.obj.oid, &op, null_yield);
+ r = rgw_rados_operate(dpp, ioctx, ref.obj.oid, &op, null_yield);
if (state) {
if (r >= 0) {
bufferlist acl_bl = attrs[RGW_ATTR_ACL];
}
uint64_t epoch = ioctx.get_last_version();
int64_t poolid = ioctx.get_id();
- r = index_op.complete(poolid, epoch, state->size, state->accounted_size,
+ r = index_op.complete(dpp, poolid, epoch, state->size, state->accounted_size,
mtime, etag, content_type, storage_class, &acl_bl,
RGWObjCategory::Main, NULL);
} else {
- int ret = index_op.cancel();
+ int ret = index_op.cancel(dpp);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: complete_update_index_cancel() returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: complete_update_index_cancel() returned ret=" << ret << dendl;
}
}
}
return 0;
}
-int RGWRados::Object::Read::prepare(optional_yield y)
+int RGWRados::Object::Read::prepare(optional_yield y, const DoutPrefixProvider *dpp)
{
RGWRados *store = source->get_store();
CephContext *cct = store->ctx();
map<string, bufferlist>::iterator iter;
RGWObjState *astate;
- int r = source->get_state(&astate, true, y);
+ int r = source->get_state(dpp, &astate, true, y);
if (r < 0)
return r;
state.cur_pool = state.head_obj.pool;
state.cur_ioctx = &state.io_ctxs[state.cur_pool];
- r = store->get_obj_head_ioctx(bucket_info, state.obj, state.cur_ioctx);
+ r = store->get_obj_head_ioctx(dpp, bucket_info, state.obj, state.cur_ioctx);
if (r < 0) {
return r;
}
*params.attrs = astate->attrset;
if (cct->_conf->subsys.should_gather<ceph_subsys_rgw, 20>()) {
for (iter = params.attrs->begin(); iter != params.attrs->end(); ++iter) {
- ldout(cct, 20) << "Read xattr: " << iter->first << dendl;
+ ldpp_dout(dpp, 20) << "Read xattr rgw_rados: " << iter->first << dendl;
}
}
}
if (conds.mod_ptr && !conds.if_nomatch) {
dest_weight.init(*conds.mod_ptr, conds.mod_zone_id, conds.mod_pg_ver);
- ldout(cct, 10) << "If-Modified-Since: " << dest_weight << " Last-Modified: " << src_weight << dendl;
+ ldpp_dout(dpp, 10) << "If-Modified-Since: " << dest_weight << " Last-Modified: " << src_weight << dendl;
if (!(dest_weight < src_weight)) {
return -ERR_NOT_MODIFIED;
}
if (conds.unmod_ptr && !conds.if_match) {
dest_weight.init(*conds.unmod_ptr, conds.mod_zone_id, conds.mod_pg_ver);
- ldout(cct, 10) << "If-UnModified-Since: " << dest_weight << " Last-Modified: " << src_weight << dendl;
+ ldpp_dout(dpp, 10) << "If-UnModified-Since: " << dest_weight << " Last-Modified: " << src_weight << dendl;
if (dest_weight < src_weight) {
return -ERR_PRECONDITION_FAILED;
}
}
}
if (conds.if_match || conds.if_nomatch) {
- r = get_attr(RGW_ATTR_ETAG, etag, y);
+ r = get_attr(dpp, RGW_ATTR_ETAG, etag, y);
if (r < 0)
return r;
if (conds.if_match) {
string if_match_str = rgw_string_unquote(conds.if_match);
- ldout(cct, 10) << "ETag: " << string(etag.c_str(), etag.length()) << " " << " If-Match: " << if_match_str << dendl;
+ ldpp_dout(dpp, 10) << "ETag: " << string(etag.c_str(), etag.length()) << " " << " If-Match: " << if_match_str << dendl;
if (if_match_str.compare(0, etag.length(), etag.c_str(), etag.length()) != 0) {
return -ERR_PRECONDITION_FAILED;
}
if (conds.if_nomatch) {
string if_nomatch_str = rgw_string_unquote(conds.if_nomatch);
- ldout(cct, 10) << "ETag: " << string(etag.c_str(), etag.length()) << " " << " If-NoMatch: " << if_nomatch_str << dendl;
+ ldpp_dout(dpp, 10) << "ETag: " << string(etag.c_str(), etag.length()) << " " << " If-NoMatch: " << if_nomatch_str << dendl;
if (if_nomatch_str.compare(0, etag.length(), etag.c_str(), etag.length()) == 0) {
return -ERR_NOT_MODIFIED;
}
return 0;
}
-int RGWRados::Bucket::UpdateIndex::guard_reshard(BucketShard **pbs, std::function<int(BucketShard *)> call)
+int RGWRados::Bucket::UpdateIndex::guard_reshard(const DoutPrefixProvider *dpp, BucketShard **pbs, std::function<int(BucketShard *)> call)
{
RGWRados *store = target->get_store();
BucketShard *bs;
#define NUM_RESHARD_RETRIES 10
for (int i = 0; i < NUM_RESHARD_RETRIES; ++i) {
- int ret = get_bucket_shard(&bs);
+ int ret = get_bucket_shard(&bs, dpp);
if (ret < 0) {
- ldout(store->ctx(), 5) << "failed to get BucketShard object: ret=" << ret << dendl;
+ ldpp_dout(dpp, 5) << "failed to get BucketShard object: ret=" << ret << dendl;
return ret;
}
r = call(bs);
if (r != -ERR_BUSY_RESHARDING) {
break;
}
- ldout(store->ctx(), 0) << "NOTICE: resharding operation on bucket index detected, blocking" << dendl;
+ ldpp_dout(dpp, 0) << "NOTICE: resharding operation on bucket index detected, blocking" << dendl;
string new_bucket_id;
r = store->block_while_resharding(bs, &new_bucket_id,
- target->bucket_info, null_yield);
+ target->bucket_info, null_yield, dpp);
if (r == -ERR_BUSY_RESHARDING) {
continue;
}
if (r < 0) {
return r;
}
- ldout(store->ctx(), 20) << "reshard completion identified, new_bucket_id=" << new_bucket_id << dendl;
+ ldpp_dout(dpp, 20) << "reshard completion identified, new_bucket_id=" << new_bucket_id << dendl;
i = 0; /* resharding is finished, make sure we can retry */
- r = target->update_bucket_id(new_bucket_id);
+ r = target->update_bucket_id(new_bucket_id, dpp);
if (r < 0) {
- ldout(store->ctx(), 0) << "ERROR: update_bucket_id() new_bucket_id=" << new_bucket_id << " returned r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: update_bucket_id() new_bucket_id=" << new_bucket_id << " returned r=" << r << dendl;
return r;
}
invalidate_bs();
return 0;
}
-int RGWRados::Bucket::UpdateIndex::prepare(RGWModifyOp op, const string *write_tag, optional_yield y)
+int RGWRados::Bucket::UpdateIndex::prepare(const DoutPrefixProvider *dpp, RGWModifyOp op, const string *write_tag, optional_yield y)
{
if (blind) {
return 0;
}
}
- int r = guard_reshard(nullptr, [&](BucketShard *bs) -> int {
- return store->cls_obj_prepare_op(*bs, op, optag, obj, bilog_flags, y, zones_trace);
+ int r = guard_reshard(dpp, nullptr, [&](BucketShard *bs) -> int {
+ return store->cls_obj_prepare_op(dpp, *bs, op, optag, obj, bilog_flags, y, zones_trace);
});
if (r < 0) {
return 0;
}
-int RGWRados::Bucket::UpdateIndex::complete(int64_t poolid, uint64_t epoch,
+int RGWRados::Bucket::UpdateIndex::complete(const DoutPrefixProvider *dpp, int64_t poolid, uint64_t epoch,
uint64_t size, uint64_t accounted_size,
ceph::real_time& ut, const string& etag,
const string& content_type, const string& storage_class,
RGWRados *store = target->get_store();
BucketShard *bs;
- int ret = get_bucket_shard(&bs);
+ int ret = get_bucket_shard(&bs, dpp);
if (ret < 0) {
- ldout(store->ctx(), 5) << "failed to get BucketShard object: ret=" << ret << dendl;
+ ldpp_dout(dpp, 5) << "failed to get BucketShard object: ret=" << ret << dendl;
return ret;
}
if (acl_bl && acl_bl->length()) {
int ret = store->decode_policy(*acl_bl, &owner);
if (ret < 0) {
- ldout(store->ctx(), 0) << "WARNING: could not decode policy ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "WARNING: could not decode policy ret=" << ret << dendl;
}
}
ent.meta.owner = owner.get_id().to_str();
ret = store->cls_obj_complete_add(*bs, obj, optag, poolid, epoch, ent, category, remove_objs, bilog_flags, zones_trace);
- int r = store->svc.datalog_rados->add_entry(target->bucket_info, bs->shard_id);
+ int r = store->svc.datalog_rados->add_entry(dpp, target->bucket_info, bs->shard_id);
if (r < 0) {
- lderr(store->ctx()) << "ERROR: failed writing data log" << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: failed writing data log" << dendl;
}
return ret;
}
-int RGWRados::Bucket::UpdateIndex::complete_del(int64_t poolid, uint64_t epoch,
+int RGWRados::Bucket::UpdateIndex::complete_del(const DoutPrefixProvider *dpp,
+ int64_t poolid, uint64_t epoch,
real_time& removed_mtime,
list<rgw_obj_index_key> *remove_objs)
{
RGWRados *store = target->get_store();
BucketShard *bs;
- int ret = get_bucket_shard(&bs);
+ int ret = get_bucket_shard(&bs, dpp);
if (ret < 0) {
- ldout(store->ctx(), 5) << "failed to get BucketShard object: ret=" << ret << dendl;
+ ldpp_dout(dpp, 5) << "failed to get BucketShard object: ret=" << ret << dendl;
return ret;
}
ret = store->cls_obj_complete_del(*bs, optag, poolid, epoch, obj, removed_mtime, remove_objs, bilog_flags, zones_trace);
- int r = store->svc.datalog_rados->add_entry(target->bucket_info, bs->shard_id);
+ int r = store->svc.datalog_rados->add_entry(dpp, target->bucket_info, bs->shard_id);
if (r < 0) {
- lderr(store->ctx()) << "ERROR: failed writing data log" << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: failed writing data log" << dendl;
}
return ret;
}
-int RGWRados::Bucket::UpdateIndex::cancel()
+int RGWRados::Bucket::UpdateIndex::cancel(const DoutPrefixProvider *dpp)
{
if (blind) {
return 0;
RGWRados *store = target->get_store();
BucketShard *bs;
- int ret = guard_reshard(&bs, [&](BucketShard *bs) -> int {
+ int ret = guard_reshard(dpp, &bs, [&](BucketShard *bs) -> int {
return store->cls_obj_complete_cancel(*bs, optag, obj, bilog_flags, zones_trace);
});
* for following the specific bucket shard log. Otherwise they end up staying behind, and users
* have no way to tell that they're all caught up
*/
- int r = store->svc.datalog_rados->add_entry(target->bucket_info, bs->shard_id);
+ int r = store->svc.datalog_rados->add_entry(dpp, target->bucket_info, bs->shard_id);
if (r < 0) {
- lderr(store->ctx()) << "ERROR: failed writing data log" << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: failed writing data log" << dendl;
}
return ret;
}
-int RGWRados::Object::Read::read(int64_t ofs, int64_t end, bufferlist& bl, optional_yield y)
+int RGWRados::Object::Read::read(int64_t ofs, int64_t end, bufferlist& bl, optional_yield y, const DoutPrefixProvider *dpp)
{
RGWRados *store = source->get_store();
- CephContext *cct = store->ctx();
rgw_raw_obj read_obj;
uint64_t read_ofs = ofs;
uint64_t max_chunk_size;
RGWObjState *astate;
- int r = source->get_state(&astate, true, y);
+ int r = source->get_state(dpp, &astate, true, y);
if (r < 0)
return r;
if (astate->manifest && astate->manifest->has_tail()) {
/* now get the relevant object part */
- RGWObjManifest::obj_iterator iter = astate->manifest->obj_find(ofs);
+ RGWObjManifest::obj_iterator iter = astate->manifest->obj_find(dpp, ofs);
uint64_t stripe_ofs = iter.get_stripe_ofs();
read_obj = iter.get_location().get_raw_obj(store->store);
read_obj = state.head_obj;
}
- r = store->get_max_chunk_size(read_obj.pool, &max_chunk_size);
+ r = store->get_max_chunk_size(read_obj.pool, &max_chunk_size, dpp);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to get max_chunk_size() for pool " << read_obj.pool << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to get max_chunk_size() for pool " << read_obj.pool << dendl;
return r;
}
if (reading_from_head) {
/* only when reading from the head object do we need to do the atomic test */
- r = store->append_atomic_test(&source->get_ctx(), source->get_bucket_info(), state.obj, op, &astate, y);
+ r = store->append_atomic_test(dpp, &source->get_ctx(), source->get_bucket_info(), state.obj, op, &astate, y);
if (r < 0)
return r;
}
}
- ldout(cct, 20) << "rados->read obj-ofs=" << ofs << " read_ofs=" << read_ofs << " read_len=" << read_len << dendl;
+ ldpp_dout(dpp, 20) << "rados->read obj-ofs=" << ofs << " read_ofs=" << read_ofs << " read_len=" << read_len << dendl;
op.read(read_ofs, read_len, pbl, NULL);
if (state.cur_pool != read_obj.pool) {
auto iter = state.io_ctxs.find(read_obj.pool);
if (iter == state.io_ctxs.end()) {
state.cur_ioctx = &state.io_ctxs[read_obj.pool];
- r = store->open_pool_ctx(read_obj.pool, *state.cur_ioctx, false);
+ r = store->open_pool_ctx(dpp, read_obj.pool, *state.cur_ioctx, false);
if (r < 0) {
- ldout(cct, 20) << "ERROR: failed to open pool context for pool=" << read_obj.pool << " r=" << r << dendl;
+ ldpp_dout(dpp, 20) << "ERROR: failed to open pool context for pool=" << read_obj.pool << " r=" << r << dendl;
return r;
}
} else {
state.cur_ioctx->locator_set_key(read_obj.loc);
r = state.cur_ioctx->operate(read_obj.oid, &op, NULL);
- ldout(cct, 20) << "rados->read r=" << r << " bl.length=" << bl.length() << dendl;
+ ldpp_dout(dpp, 20) << "rados->read r=" << r << " bl.length=" << bl.length() << dendl;
if (r < 0) {
return r;
}
};
-static int _get_obj_iterate_cb(const rgw_raw_obj& read_obj, off_t obj_ofs,
+static int _get_obj_iterate_cb(const DoutPrefixProvider *dpp,
+ const rgw_raw_obj& read_obj, off_t obj_ofs,
off_t read_ofs, off_t len, bool is_head_obj,
RGWObjState *astate, void *arg)
{
struct get_obj_data *d = (struct get_obj_data *)arg;
- return d->store->get_obj_iterate_cb(read_obj, obj_ofs, read_ofs, len,
+ return d->store->get_obj_iterate_cb(dpp, read_obj, obj_ofs, read_ofs, len,
is_head_obj, astate, arg);
}
-int RGWRados::get_obj_iterate_cb(const rgw_raw_obj& read_obj, off_t obj_ofs,
+int RGWRados::get_obj_iterate_cb(const DoutPrefixProvider *dpp,
+ const rgw_raw_obj& read_obj, off_t obj_ofs,
off_t read_ofs, off_t len, bool is_head_obj,
RGWObjState *astate, void *arg)
{
if (is_head_obj) {
/* only when reading from the head object do we need to do the atomic test */
- int r = append_atomic_test(astate, op);
+ int r = append_atomic_test(dpp, astate, op);
if (r < 0)
return r;
}
auto obj = d->store->svc.rados->obj(read_obj);
- int r = obj.open();
+ int r = obj.open(dpp);
if (r < 0) {
- ldout(cct, 4) << "failed to open rados context for " << read_obj << dendl;
+ ldpp_dout(dpp, 4) << "failed to open rados context for " << read_obj << dendl;
return r;
}
- ldout(cct, 20) << "rados->get_obj_iterate_cb oid=" << read_obj.oid << " obj-ofs=" << obj_ofs << " read_ofs=" << read_ofs << " len=" << len << dendl;
+ ldpp_dout(dpp, 20) << "rados->get_obj_iterate_cb oid=" << read_obj.oid << " obj-ofs=" << obj_ofs << " read_ofs=" << read_ofs << " len=" << len << dendl;
op.read(read_ofs, len, nullptr, nullptr);
const uint64_t cost = len;
return d->flush(std::move(completed));
}
-int RGWRados::Object::Read::iterate(int64_t ofs, int64_t end, RGWGetDataCB *cb,
+int RGWRados::Object::Read::iterate(const DoutPrefixProvider *dpp, int64_t ofs, int64_t end, RGWGetDataCB *cb,
optional_yield y)
{
RGWRados *store = source->get_store();
auto aio = rgw::make_throttle(window_size, y);
get_obj_data data(store, cb, &*aio, ofs, y);
- int r = store->iterate_obj(obj_ctx, source->get_bucket_info(), state.obj,
+ int r = store->iterate_obj(dpp, obj_ctx, source->get_bucket_info(), state.obj,
ofs, end, chunk_size, _get_obj_iterate_cb, &data, y);
if (r < 0) {
- ldout(cct, 0) << "iterate_obj() failed with " << r << dendl;
+ ldpp_dout(dpp, 0) << "iterate_obj() failed with " << r << dendl;
data.cancel(); // drain completions without writing back to client
return r;
}
return data.drain();
}
-int RGWRados::iterate_obj(RGWObjectCtx& obj_ctx,
+int RGWRados::iterate_obj(const DoutPrefixProvider *dpp, RGWObjectCtx& obj_ctx,
const RGWBucketInfo& bucket_info, const rgw_obj& obj,
off_t ofs, off_t end, uint64_t max_chunk_size,
iterate_obj_cb cb, void *arg, optional_yield y)
obj_to_raw(bucket_info.placement_rule, obj, &head_obj);
- int r = get_obj_state(&obj_ctx, bucket_info, obj, &astate, false, y);
+ int r = get_obj_state(dpp, &obj_ctx, bucket_info, obj, &astate, false, y);
if (r < 0) {
return r;
}
if (astate->manifest) {
/* now get the relevant object stripe */
- RGWObjManifest::obj_iterator iter = astate->manifest->obj_find(ofs);
+ RGWObjManifest::obj_iterator iter = astate->manifest->obj_find(dpp, ofs);
- RGWObjManifest::obj_iterator obj_end = astate->manifest->obj_end();
+ RGWObjManifest::obj_iterator obj_end = astate->manifest->obj_end(dpp);
for (; iter != obj_end && ofs <= end; ++iter) {
off_t stripe_ofs = iter.get_stripe_ofs();
}
reading_from_head = (read_obj == head_obj);
- r = cb(read_obj, ofs, read_ofs, read_len, reading_from_head, astate, arg);
+ r = cb(dpp, read_obj, ofs, read_ofs, read_len, reading_from_head, astate, arg);
if (r < 0) {
return r;
}
read_obj = head_obj;
uint64_t read_len = std::min(len, max_chunk_size);
- r = cb(read_obj, ofs, ofs, read_len, reading_from_head, astate, arg);
+ r = cb(dpp, read_obj, ofs, ofs, read_len, reading_from_head, astate, arg);
if (r < 0) {
return r;
}
return 0;
}
-int RGWRados::obj_operate(const RGWBucketInfo& bucket_info, const rgw_obj& obj, ObjectWriteOperation *op)
+int RGWRados::obj_operate(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw_obj& obj, ObjectWriteOperation *op)
{
rgw_rados_ref ref;
- int r = get_obj_head_ref(bucket_info, obj, &ref);
+ int r = get_obj_head_ref(dpp, bucket_info, obj, &ref);
if (r < 0) {
return r;
}
- return rgw_rados_operate(ref.pool.ioctx(), ref.obj.oid, op, null_yield);
+ return rgw_rados_operate(dpp, ref.pool.ioctx(), ref.obj.oid, op, null_yield);
}
-int RGWRados::obj_operate(const RGWBucketInfo& bucket_info, const rgw_obj& obj, ObjectReadOperation *op)
+int RGWRados::obj_operate(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw_obj& obj, ObjectReadOperation *op)
{
rgw_rados_ref ref;
- int r = get_obj_head_ref(bucket_info, obj, &ref);
+ int r = get_obj_head_ref(dpp, bucket_info, obj, &ref);
if (r < 0) {
return r;
}
bufferlist outbl;
- return rgw_rados_operate(ref.pool.ioctx(), ref.obj.oid, op, &outbl, null_yield);
+ return rgw_rados_operate(dpp, ref.pool.ioctx(), ref.obj.oid, op, &outbl, null_yield);
}
-int RGWRados::olh_init_modification_impl(const RGWBucketInfo& bucket_info, RGWObjState& state, const rgw_obj& olh_obj, string *op_tag)
+int RGWRados::olh_init_modification_impl(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, RGWObjState& state, const rgw_obj& olh_obj, string *op_tag)
{
ObjectWriteOperation op;
*/
if (has_tag) {
/* guard against racing writes */
- bucket_index_guard_olh_op(state, op);
+ bucket_index_guard_olh_op(dpp, state, op);
}
if (!has_tag) {
op.setxattr(attr_name.c_str(), bl);
- int ret = obj_operate(bucket_info, olh_obj, &op);
+ int ret = obj_operate(dpp, bucket_info, olh_obj, &op);
if (ret < 0) {
return ret;
}
return 0;
}
-int RGWRados::olh_init_modification(const RGWBucketInfo& bucket_info, RGWObjState& state, const rgw_obj& obj, string *op_tag)
+int RGWRados::olh_init_modification(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, RGWObjState& state, const rgw_obj& obj, string *op_tag)
{
int ret;
- ret = olh_init_modification_impl(bucket_info, state, obj, op_tag);
+ ret = olh_init_modification_impl(dpp, bucket_info, state, obj, op_tag);
if (ret == -EEXIST) {
ret = -ECANCELED;
}
return ret;
}
-int RGWRados::guard_reshard(BucketShard *bs,
+int RGWRados::guard_reshard(const DoutPrefixProvider *dpp,
+ BucketShard *bs,
const rgw_obj& obj_instance,
const RGWBucketInfo& bucket_info,
std::function<int(BucketShard *)> call)
int r;
for (int i = 0; i < NUM_RESHARD_RETRIES; ++i) {
- r = bs->init(pobj->bucket, *pobj, nullptr /* no RGWBucketInfo */);
+ r = bs->init(pobj->bucket, *pobj, nullptr /* no RGWBucketInfo */, dpp);
if (r < 0) {
- ldout(cct, 5) << "bs.init() returned ret=" << r << dendl;
+ ldpp_dout(dpp, 5) << "bs.init() returned ret=" << r << dendl;
return r;
}
r = call(bs);
if (r != -ERR_BUSY_RESHARDING) {
break;
}
- ldout(cct, 0) << "NOTICE: resharding operation on bucket index detected, blocking" << dendl;
+ ldpp_dout(dpp, 0) << "NOTICE: resharding operation on bucket index detected, blocking" << dendl;
string new_bucket_id;
- r = block_while_resharding(bs, &new_bucket_id, bucket_info, null_yield);
+ r = block_while_resharding(bs, &new_bucket_id, bucket_info, null_yield, dpp);
if (r == -ERR_BUSY_RESHARDING) {
continue;
}
if (r < 0) {
return r;
}
- ldout(cct, 20) << "reshard completion identified, new_bucket_id=" << new_bucket_id << dendl;
+ ldpp_dout(dpp, 20) << "reshard completion identified, new_bucket_id=" << new_bucket_id << dendl;
i = 0; /* resharding is finished, make sure we can retry */
obj = *pobj;
int RGWRados::block_while_resharding(RGWRados::BucketShard *bs,
string *new_bucket_id,
const RGWBucketInfo& bucket_info,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
int ret = 0;
cls_rgw_bucket_instance_entry entry;
// new_bucket_id and returns 0, otherwise it returns a negative
// error code
auto fetch_new_bucket_id =
- [this, &bucket_info](const std::string& log_tag,
+ [this, &bucket_info, dpp](const std::string& log_tag,
std::string* new_bucket_id) -> int {
RGWBucketInfo fresh_bucket_info = bucket_info;
- int ret = try_refresh_bucket_info(fresh_bucket_info, nullptr);
+ int ret = try_refresh_bucket_info(fresh_bucket_info, nullptr, dpp);
if (ret < 0) {
- ldout(cct, 0) << __func__ <<
+ ldpp_dout(dpp, 0) << __func__ <<
" ERROR: failed to refresh bucket info after reshard at " <<
log_tag << ": " << cpp_strerror(-ret) << dendl;
return ret;
if (ret == -ENOENT) {
return fetch_new_bucket_id("get_bucket_resharding_failed", new_bucket_id);
} else if (ret < 0) {
- ldout(cct, 0) << __func__ <<
+ ldpp_dout(dpp, 0) << __func__ <<
" ERROR: failed to get bucket resharding : " << cpp_strerror(-ret) <<
dendl;
return ret;
new_bucket_id);
}
- ldout(cct, 20) << "NOTICE: reshard still in progress; " <<
+ ldpp_dout(dpp, 20) << "NOTICE: reshard still in progress; " <<
(i < num_retries ? "retrying" : "too many retries") << dendl;
if (i == num_retries) {
RGWBucketReshardLock reshard_lock(this->store, bucket_info, true);
ret = reshard_lock.lock();
if (ret < 0) {
- ldout(cct, 20) << __func__ <<
+ ldpp_dout(dpp, 20) << __func__ <<
" INFO: failed to take reshard lock for bucket " <<
bucket_id << "; expected if resharding underway" << dendl;
} else {
- ldout(cct, 10) << __func__ <<
+ ldpp_dout(dpp, 10) << __func__ <<
" INFO: was able to take reshard lock for bucket " <<
bucket_id << dendl;
- ret = RGWBucketReshard::clear_resharding(this->store, bucket_info);
+ ret = RGWBucketReshard::clear_resharding(dpp, this->store, bucket_info);
if (ret < 0) {
reshard_lock.unlock();
- ldout(cct, 0) << __func__ <<
+ ldpp_dout(dpp, 0) << __func__ <<
" ERROR: failed to clear resharding flags for bucket " <<
bucket_id << dendl;
} else {
reshard_lock.unlock();
- ldout(cct, 5) << __func__ <<
+ ldpp_dout(dpp, 5) << __func__ <<
" INFO: apparently successfully cleared resharding flags for "
"bucket " << bucket_id << dendl;
continue; // if we apparently succeed immediately test again
ret = reshard_wait->wait(y);
if (ret < 0) {
- ldout(cct, 0) << __func__ <<
+ ldpp_dout(dpp, 0) << __func__ <<
" ERROR: bucket is still resharding, please retry" << dendl;
return ret;
}
} // for loop
- ldout(cct, 0) << __func__ <<
+ ldpp_dout(dpp, 0) << __func__ <<
" ERROR: bucket is still resharding, please retry" << dendl;
return -ERR_BUSY_RESHARDING;
}
-int RGWRados::bucket_index_link_olh(const RGWBucketInfo& bucket_info, RGWObjState& olh_state, const rgw_obj& obj_instance,
+int RGWRados::bucket_index_link_olh(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, RGWObjState& olh_state, const rgw_obj& obj_instance,
bool delete_marker,
const string& op_tag,
struct rgw_bucket_dir_entry_meta *meta,
rgw_zone_set *_zones_trace, bool log_data_change)
{
rgw_rados_ref ref;
- int r = get_obj_head_ref(bucket_info, obj_instance, &ref);
+ int r = get_obj_head_ref(dpp, bucket_info, obj_instance, &ref);
if (r < 0) {
return r;
}
BucketShard bs(this);
- r = guard_reshard(&bs, obj_instance, bucket_info,
+ r = guard_reshard(dpp, &bs, obj_instance, bucket_info,
[&](BucketShard *bs) -> int {
cls_rgw_obj_key key(obj_instance.key.get_index_key_name(), obj_instance.key.instance);
auto& ref = bs->bucket_obj.get_ref();
delete_marker, op_tag, meta, olh_epoch,
unmod_since, high_precision_time,
svc.zone->get_zone().log_data, zones_trace);
- return rgw_rados_operate(ref.pool.ioctx(), ref.obj.oid, &op, null_yield);
+ return rgw_rados_operate(dpp, ref.pool.ioctx(), ref.obj.oid, &op, null_yield);
});
if (r < 0) {
- ldout(cct, 20) << "rgw_rados_operate() after cls_rgw_bucket_link_olh() returned r=" << r << dendl;
+ ldpp_dout(dpp, 20) << "rgw_rados_operate() after cls_rgw_bucket_link_olh() returned r=" << r << dendl;
return r;
}
- r = svc.datalog_rados->add_entry(bucket_info, bs.shard_id);
+ r = svc.datalog_rados->add_entry(dpp, bucket_info, bs.shard_id);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed writing data log" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed writing data log" << dendl;
}
return 0;
}
-void RGWRados::bucket_index_guard_olh_op(RGWObjState& olh_state, ObjectOperation& op)
+void RGWRados::bucket_index_guard_olh_op(const DoutPrefixProvider *dpp, RGWObjState& olh_state, ObjectOperation& op)
{
- ldout(cct, 20) << __func__ << "(): olh_state.olh_tag=" << string(olh_state.olh_tag.c_str(), olh_state.olh_tag.length()) << dendl;
+ ldpp_dout(dpp, 20) << __func__ << "(): olh_state.olh_tag=" << string(olh_state.olh_tag.c_str(), olh_state.olh_tag.length()) << dendl;
op.cmpxattr(RGW_ATTR_OLH_ID_TAG, CEPH_OSD_CMPXATTR_OP_EQ, olh_state.olh_tag);
}
-int RGWRados::bucket_index_unlink_instance(const RGWBucketInfo& bucket_info, const rgw_obj& obj_instance,
+int RGWRados::bucket_index_unlink_instance(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw_obj& obj_instance,
const string& op_tag, const string& olh_tag, uint64_t olh_epoch, rgw_zone_set *_zones_trace)
{
rgw_rados_ref ref;
- int r = get_obj_head_ref(bucket_info, obj_instance, &ref);
+ int r = get_obj_head_ref(dpp, bucket_info, obj_instance, &ref);
if (r < 0) {
return r;
}
BucketShard bs(this);
cls_rgw_obj_key key(obj_instance.key.get_index_key_name(), obj_instance.key.instance);
- r = guard_reshard(&bs, obj_instance, bucket_info,
+ r = guard_reshard(dpp, &bs, obj_instance, bucket_info,
[&](BucketShard *bs) -> int {
auto& ref = bs->bucket_obj.get_ref();
librados::ObjectWriteOperation op;
cls_rgw_guard_bucket_resharding(op, -ERR_BUSY_RESHARDING);
cls_rgw_bucket_unlink_instance(op, key, op_tag,
olh_tag, olh_epoch, svc.zone->get_zone().log_data, zones_trace);
- return rgw_rados_operate(ref.pool.ioctx(), ref.obj.oid, &op, null_yield);
+ return rgw_rados_operate(dpp, ref.pool.ioctx(), ref.obj.oid, &op, null_yield);
});
if (r < 0) {
- ldout(cct, 20) << "rgw_rados_operate() after cls_rgw_bucket_link_instance() returned r=" << r << dendl;
+ ldpp_dout(dpp, 20) << "rgw_rados_operate() after cls_rgw_bucket_link_instance() returned r=" << r << dendl;
return r;
}
return 0;
}
-int RGWRados::bucket_index_read_olh_log(const RGWBucketInfo& bucket_info, RGWObjState& state,
+int RGWRados::bucket_index_read_olh_log(const DoutPrefixProvider *dpp,
+ const RGWBucketInfo& bucket_info, RGWObjState& state,
const rgw_obj& obj_instance, uint64_t ver_marker,
map<uint64_t, vector<rgw_bucket_olh_log_entry> > *log,
bool *is_truncated)
{
rgw_rados_ref ref;
- int r = get_obj_head_ref(bucket_info, obj_instance, &ref);
+ int r = get_obj_head_ref(dpp, bucket_info, obj_instance, &ref);
if (r < 0) {
return r;
}
BucketShard bs(this);
int ret =
- bs.init(obj_instance.bucket, obj_instance, nullptr /* no RGWBucketInfo */);
+ bs.init(obj_instance.bucket, obj_instance, nullptr /* no RGWBucketInfo */, dpp);
if (ret < 0) {
- ldout(cct, 5) << "bs.init() returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 5) << "bs.init() returned ret=" << ret << dendl;
return ret;
}
cls_rgw_obj_key key(obj_instance.key.get_index_key_name(), string());
- ret = guard_reshard(&bs, obj_instance, bucket_info,
+ ret = guard_reshard(dpp, &bs, obj_instance, bucket_info,
[&](BucketShard *bs) -> int {
auto& ref = bs->bucket_obj.get_ref();
ObjectReadOperation op;
int op_ret = 0;
cls_rgw_get_olh_log(op, key, ver_marker, olh_tag, log_ret, op_ret);
bufferlist outbl;
- int r = rgw_rados_operate(ref.pool.ioctx(), ref.obj.oid, &op, &outbl, null_yield);
+ int r = rgw_rados_operate(dpp, ref.pool.ioctx(), ref.obj.oid, &op, &outbl, null_yield);
if (r < 0) {
return r;
}
return r;
});
if (ret < 0) {
- ldout(cct, 20) << "cls_rgw_get_olh_log() returned r=" << r << dendl;
+ ldpp_dout(dpp, 20) << "cls_rgw_get_olh_log() returned r=" << r << dendl;
return ret;
}
// the attributes from another zone, causing link_olh() to fail endlessly due to
// olh_tag mismatch. this attempts to detect this case and reconstruct the OLH
// attributes from the bucket index. see http://tracker.ceph.com/issues/37792
-int RGWRados::repair_olh(RGWObjState* state, const RGWBucketInfo& bucket_info,
+int RGWRados::repair_olh(const DoutPrefixProvider *dpp, RGWObjState* state, const RGWBucketInfo& bucket_info,
const rgw_obj& obj)
{
// fetch the current olh entry from the bucket index
rgw_bucket_olh_entry olh;
- int r = bi_get_olh(bucket_info, obj, &olh);
+ int r = bi_get_olh(dpp, bucket_info, obj, &olh);
if (r < 0) {
- ldout(cct, 0) << "repair_olh failed to read olh entry for " << obj << dendl;
+ ldpp_dout(dpp, 0) << "repair_olh failed to read olh entry for " << obj << dendl;
return r;
}
if (olh.tag == rgw_bl_str(state->olh_tag)) { // mismatch already resolved?
return 0;
}
- ldout(cct, 4) << "repair_olh setting olh_tag=" << olh.tag
+ ldpp_dout(dpp, 4) << "repair_olh setting olh_tag=" << olh.tag
<< " key=" << olh.key << " delete_marker=" << olh.delete_marker << dendl;
// rewrite OLH_ID_TAG and OLH_INFO from current olh
ObjectWriteOperation op;
// assert this is the same olh tag we think we're fixing
- bucket_index_guard_olh_op(*state, op);
+ bucket_index_guard_olh_op(dpp, *state, op);
// preserve existing mtime
struct timespec mtime_ts = ceph::real_clock::to_timespec(state->mtime);
op.mtime2(&mtime_ts);
op.setxattr(RGW_ATTR_OLH_INFO, bl);
}
rgw_rados_ref ref;
- r = get_obj_head_ref(bucket_info, obj, &ref);
+ r = get_obj_head_ref(dpp, bucket_info, obj, &ref);
if (r < 0) {
return r;
}
- r = rgw_rados_operate(ref.pool.ioctx(), ref.obj.oid, &op, null_yield);
+ r = rgw_rados_operate(dpp, ref.pool.ioctx(), ref.obj.oid, &op, null_yield);
if (r < 0) {
- ldout(cct, 0) << "repair_olh failed to write olh attributes with "
+ ldpp_dout(dpp, 0) << "repair_olh failed to write olh attributes with "
<< cpp_strerror(r) << dendl;
return r;
}
return 0;
}
-int RGWRados::bucket_index_trim_olh_log(const RGWBucketInfo& bucket_info, RGWObjState& state, const rgw_obj& obj_instance, uint64_t ver)
+int RGWRados::bucket_index_trim_olh_log(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, RGWObjState& state, const rgw_obj& obj_instance, uint64_t ver)
{
rgw_rados_ref ref;
- int r = get_obj_head_ref(bucket_info, obj_instance, &ref);
+ int r = get_obj_head_ref(dpp, bucket_info, obj_instance, &ref);
if (r < 0) {
return r;
}
BucketShard bs(this);
int ret =
- bs.init(obj_instance.bucket, obj_instance, nullptr /* no RGWBucketInfo */);
+ bs.init(obj_instance.bucket, obj_instance, nullptr /* no RGWBucketInfo */, dpp);
if (ret < 0) {
- ldout(cct, 5) << "bs.init() returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 5) << "bs.init() returned ret=" << ret << dendl;
return ret;
}
cls_rgw_obj_key key(obj_instance.key.get_index_key_name(), string());
- ret = guard_reshard(&bs, obj_instance, bucket_info,
+ ret = guard_reshard(dpp, &bs, obj_instance, bucket_info,
[&](BucketShard *pbs) -> int {
ObjectWriteOperation op;
cls_rgw_guard_bucket_resharding(op, -ERR_BUSY_RESHARDING);
cls_rgw_trim_olh_log(op, key, ver, olh_tag);
- return pbs->bucket_obj.operate(&op, null_yield);
+ return pbs->bucket_obj.operate(dpp, &op, null_yield);
});
if (ret < 0) {
- ldout(cct, 20) << "cls_rgw_trim_olh_log() returned r=" << ret << dendl;
+ ldpp_dout(dpp, 20) << "cls_rgw_trim_olh_log() returned r=" << ret << dendl;
return ret;
}
return 0;
}
-int RGWRados::bucket_index_clear_olh(const RGWBucketInfo& bucket_info, RGWObjState& state, const rgw_obj& obj_instance)
+int RGWRados::bucket_index_clear_olh(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, RGWObjState& state, const rgw_obj& obj_instance)
{
rgw_rados_ref ref;
- int r = get_obj_head_ref(bucket_info, obj_instance, &ref);
+ int r = get_obj_head_ref(dpp, bucket_info, obj_instance, &ref);
if (r < 0) {
return r;
}
cls_rgw_obj_key key(obj_instance.key.get_index_key_name(), string());
- int ret = guard_reshard(&bs, obj_instance, bucket_info,
+ int ret = guard_reshard(dpp, &bs, obj_instance, bucket_info,
[&](BucketShard *pbs) -> int {
ObjectWriteOperation op;
auto& ref = pbs->bucket_obj.get_ref();
cls_rgw_guard_bucket_resharding(op, -ERR_BUSY_RESHARDING);
cls_rgw_clear_olh(op, key, olh_tag);
- return rgw_rados_operate(ref.pool.ioctx(), ref.obj.oid, &op, null_yield);
+ return rgw_rados_operate(dpp, ref.pool.ioctx(), ref.obj.oid, &op, null_yield);
});
if (ret < 0) {
- ldout(cct, 5) << "rgw_rados_operate() after cls_rgw_clear_olh() returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 5) << "rgw_rados_operate() after cls_rgw_clear_olh() returned ret=" << ret << dendl;
return ret;
}
}
}
-int RGWRados::apply_olh_log(RGWObjectCtx& obj_ctx, RGWObjState& state, const RGWBucketInfo& bucket_info, const rgw_obj& obj,
+int RGWRados::apply_olh_log(const DoutPrefixProvider *dpp, RGWObjectCtx& obj_ctx, RGWObjState& state, const RGWBucketInfo& bucket_info, const rgw_obj& obj,
bufferlist& olh_tag, map<uint64_t, vector<rgw_bucket_olh_log_entry> >& log,
uint64_t *plast_ver, rgw_zone_set* zones_trace)
{
for (; viter != iter->second.end(); ++viter) {
rgw_bucket_olh_log_entry& entry = *viter;
- ldout(cct, 20) << "olh_log_entry: epoch=" << iter->first << " op=" << (int)entry.op
+ ldpp_dout(dpp, 20) << "olh_log_entry: epoch=" << iter->first << " op=" << (int)entry.op
<< " key=" << entry.key.name << "[" << entry.key.instance << "] "
<< (entry.delete_marker ? "(delete)" : "") << dendl;
switch (entry.op) {
// only overwrite a link of the same epoch if its key sorts before
if (link_epoch < iter->first || key.instance.empty() ||
key.instance > entry.key.instance) {
- ldout(cct, 20) << "apply_olh_log applying key=" << entry.key << " epoch=" << iter->first << " delete_marker=" << entry.delete_marker
+ ldpp_dout(dpp, 20) << "apply_olh_log applying key=" << entry.key << " epoch=" << iter->first << " delete_marker=" << entry.delete_marker
<< " over current=" << key << " epoch=" << link_epoch << " delete_marker=" << delete_marker << dendl;
need_to_link = true;
need_to_remove = false;
key = entry.key;
delete_marker = entry.delete_marker;
} else {
- ldout(cct, 20) << "apply_olh skipping key=" << entry.key<< " epoch=" << iter->first << " delete_marker=" << entry.delete_marker
+ ldpp_dout(dpp, 20) << "apply_olh skipping key=" << entry.key<< " epoch=" << iter->first << " delete_marker=" << entry.delete_marker
<< " before current=" << key << " epoch=" << link_epoch << " delete_marker=" << delete_marker << dendl;
}
break;
need_to_link = false;
break;
default:
- ldout(cct, 0) << "ERROR: apply_olh_log: invalid op: " << (int)entry.op << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: apply_olh_log: invalid op: " << (int)entry.op << dendl;
return -EIO;
}
string attr_name = RGW_ATTR_OLH_PENDING_PREFIX;
}
rgw_rados_ref ref;
- int r = get_obj_head_ref(bucket_info, obj, &ref);
+ int r = get_obj_head_ref(dpp, bucket_info, obj, &ref);
if (r < 0) {
return r;
}
liter != remove_instances.end(); ++liter) {
cls_rgw_obj_key& key = *liter;
rgw_obj obj_instance(bucket, key);
- int ret = delete_obj(obj_ctx, bucket_info, obj_instance, 0, RGW_BILOG_FLAG_VERSIONED_OP, ceph::real_time(), zones_trace);
+ int ret = delete_obj(dpp, obj_ctx, bucket_info, obj_instance, 0, RGW_BILOG_FLAG_VERSIONED_OP, ceph::real_time(), zones_trace);
if (ret < 0 && ret != -ENOENT) {
- ldout(cct, 0) << "ERROR: delete_obj() returned " << ret << " obj_instance=" << obj_instance << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: delete_obj() returned " << ret << " obj_instance=" << obj_instance << dendl;
return ret;
}
}
/* update olh object */
- r = rgw_rados_operate(ref.pool.ioctx(), ref.obj.oid, &op, null_yield);
+ r = rgw_rados_operate(dpp, ref.pool.ioctx(), ref.obj.oid, &op, null_yield);
if (r == -ECANCELED) {
r = 0;
}
if (r < 0) {
- ldout(cct, 0) << "ERROR: could not apply olh update, r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: could not apply olh update, r=" << r << dendl;
return r;
}
- r = bucket_index_trim_olh_log(bucket_info, state, obj, last_ver);
+ r = bucket_index_trim_olh_log(dpp, bucket_info, state, obj, last_ver);
if (r < 0) {
- ldout(cct, 0) << "ERROR: could not trim olh log, r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: could not trim olh log, r=" << r << dendl;
return r;
}
cls_obj_check_prefix_exist(rm_op, RGW_ATTR_OLH_PENDING_PREFIX, true); /* fail if found one of these, pending modification */
rm_op.remove();
- r = rgw_rados_operate(ref.pool.ioctx(), ref.obj.oid, &rm_op, null_yield);
+ r = rgw_rados_operate(dpp, ref.pool.ioctx(), ref.obj.oid, &rm_op, null_yield);
if (r == -ECANCELED) {
return 0; /* someone else won this race */
} else {
/*
* only clear if was successful, otherwise we might clobber pending operations on this object
*/
- r = bucket_index_clear_olh(bucket_info, state, obj);
+ r = bucket_index_clear_olh(dpp, bucket_info, state, obj);
if (r < 0) {
- ldout(cct, 0) << "ERROR: could not clear bucket index olh entries r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: could not clear bucket index olh entries r=" << r << dendl;
return r;
}
}
/*
* read olh log and apply it
*/
-int RGWRados::update_olh(RGWObjectCtx& obj_ctx, RGWObjState *state, const RGWBucketInfo& bucket_info, const rgw_obj& obj, rgw_zone_set *zones_trace)
+int RGWRados::update_olh(const DoutPrefixProvider *dpp, RGWObjectCtx& obj_ctx, RGWObjState *state, const RGWBucketInfo& bucket_info, const rgw_obj& obj, rgw_zone_set *zones_trace)
{
map<uint64_t, vector<rgw_bucket_olh_log_entry> > log;
bool is_truncated;
uint64_t ver_marker = 0;
do {
- int ret = bucket_index_read_olh_log(bucket_info, *state, obj, ver_marker, &log, &is_truncated);
+ int ret = bucket_index_read_olh_log(dpp, bucket_info, *state, obj, ver_marker, &log, &is_truncated);
if (ret < 0) {
return ret;
}
- ret = apply_olh_log(obj_ctx, *state, bucket_info, obj, state->olh_tag, log, &ver_marker, zones_trace);
+ ret = apply_olh_log(dpp, obj_ctx, *state, bucket_info, obj, state->olh_tag, log, &ver_marker, zones_trace);
if (ret < 0) {
return ret;
}
return 0;
}
-int RGWRados::set_olh(RGWObjectCtx& obj_ctx, const RGWBucketInfo& bucket_info, const rgw_obj& target_obj, bool delete_marker, rgw_bucket_dir_entry_meta *meta,
+int RGWRados::set_olh(const DoutPrefixProvider *dpp, RGWObjectCtx& obj_ctx, const RGWBucketInfo& bucket_info, const rgw_obj& target_obj, bool delete_marker, rgw_bucket_dir_entry_meta *meta,
uint64_t olh_epoch, real_time unmod_since, bool high_precision_time,
optional_yield y, rgw_zone_set *zones_trace, bool log_data_change)
{
obj_ctx.invalidate(olh_obj);
}
- ret = get_obj_state(&obj_ctx, bucket_info, olh_obj, &state, false, y); /* don't follow olh */
+ ret = get_obj_state(dpp, &obj_ctx, bucket_info, olh_obj, &state, false, y); /* don't follow olh */
if (ret < 0) {
return ret;
}
- ret = olh_init_modification(bucket_info, *state, olh_obj, &op_tag);
+ ret = olh_init_modification(dpp, bucket_info, *state, olh_obj, &op_tag);
if (ret < 0) {
- ldout(cct, 20) << "olh_init_modification() target_obj=" << target_obj << " delete_marker=" << (int)delete_marker << " returned " << ret << dendl;
+ ldpp_dout(dpp, 20) << "olh_init_modification() target_obj=" << target_obj << " delete_marker=" << (int)delete_marker << " returned " << ret << dendl;
if (ret == -ECANCELED) {
continue;
}
return ret;
}
- ret = bucket_index_link_olh(bucket_info, *state, target_obj, delete_marker,
+ ret = bucket_index_link_olh(dpp, bucket_info, *state, target_obj, delete_marker,
op_tag, meta, olh_epoch, unmod_since, high_precision_time,
zones_trace, log_data_change);
if (ret < 0) {
- ldout(cct, 20) << "bucket_index_link_olh() target_obj=" << target_obj << " delete_marker=" << (int)delete_marker << " returned " << ret << dendl;
+ ldpp_dout(dpp, 20) << "bucket_index_link_olh() target_obj=" << target_obj << " delete_marker=" << (int)delete_marker << " returned " << ret << dendl;
if (ret == -ECANCELED) {
// the bucket index rejected the link_olh() due to olh tag mismatch;
// attempt to reconstruct olh head attributes based on the bucket index
- int r2 = repair_olh(state, bucket_info, olh_obj);
+ int r2 = repair_olh(dpp, state, bucket_info, olh_obj);
if (r2 < 0 && r2 != -ECANCELED) {
return r2;
}
}
if (i == MAX_ECANCELED_RETRY) {
- ldout(cct, 0) << "ERROR: exceeded max ECANCELED retries, aborting (EIO)" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: exceeded max ECANCELED retries, aborting (EIO)" << dendl;
return -EIO;
}
- ret = update_olh(obj_ctx, state, bucket_info, olh_obj);
+ ret = update_olh(dpp, obj_ctx, state, bucket_info, olh_obj);
if (ret == -ECANCELED) { /* already did what we needed, no need to retry, raced with another user */
ret = 0;
}
if (ret < 0) {
- ldout(cct, 20) << "update_olh() target_obj=" << target_obj << " returned " << ret << dendl;
+ ldpp_dout(dpp, 20) << "update_olh() target_obj=" << target_obj << " returned " << ret << dendl;
return ret;
}
return 0;
}
-int RGWRados::unlink_obj_instance(RGWObjectCtx& obj_ctx, RGWBucketInfo& bucket_info, const rgw_obj& target_obj,
+int RGWRados::unlink_obj_instance(const DoutPrefixProvider *dpp, RGWObjectCtx& obj_ctx, RGWBucketInfo& bucket_info, const rgw_obj& target_obj,
uint64_t olh_epoch, optional_yield y, rgw_zone_set *zones_trace)
{
string op_tag;
obj_ctx.invalidate(olh_obj);
}
- ret = get_obj_state(&obj_ctx, bucket_info, olh_obj, &state, false, y); /* don't follow olh */
+ ret = get_obj_state(dpp, &obj_ctx, bucket_info, olh_obj, &state, false, y); /* don't follow olh */
if (ret < 0)
return ret;
- ret = olh_init_modification(bucket_info, *state, olh_obj, &op_tag);
+ ret = olh_init_modification(dpp, bucket_info, *state, olh_obj, &op_tag);
if (ret < 0) {
- ldout(cct, 20) << "olh_init_modification() target_obj=" << target_obj << " returned " << ret << dendl;
+ ldpp_dout(dpp, 20) << "olh_init_modification() target_obj=" << target_obj << " returned " << ret << dendl;
if (ret == -ECANCELED) {
continue;
}
string olh_tag(state->olh_tag.c_str(), state->olh_tag.length());
- ret = bucket_index_unlink_instance(bucket_info, target_obj, op_tag, olh_tag, olh_epoch, zones_trace);
+ ret = bucket_index_unlink_instance(dpp, bucket_info, target_obj, op_tag, olh_tag, olh_epoch, zones_trace);
if (ret < 0) {
- ldout(cct, 20) << "bucket_index_unlink_instance() target_obj=" << target_obj << " returned " << ret << dendl;
+ ldpp_dout(dpp, 20) << "bucket_index_unlink_instance() target_obj=" << target_obj << " returned " << ret << dendl;
if (ret == -ECANCELED) {
continue;
}
}
if (i == MAX_ECANCELED_RETRY) {
- ldout(cct, 0) << "ERROR: exceeded max ECANCELED retries, aborting (EIO)" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: exceeded max ECANCELED retries, aborting (EIO)" << dendl;
return -EIO;
}
- ret = update_olh(obj_ctx, state, bucket_info, olh_obj, zones_trace);
+ ret = update_olh(dpp, obj_ctx, state, bucket_info, olh_obj, zones_trace);
if (ret == -ECANCELED) { /* already did what we needed, no need to retry, raced with another user */
return 0;
}
if (ret < 0) {
- ldout(cct, 20) << "update_olh() target_obj=" << target_obj << " returned " << ret << dendl;
+ ldpp_dout(dpp, 20) << "update_olh() target_obj=" << target_obj << " returned " << ret << dendl;
return ret;
}
gen_rand_obj_instance_name(&target_obj->key);
}
-int RGWRados::get_olh(const RGWBucketInfo& bucket_info, const rgw_obj& obj, RGWOLHInfo *olh)
+int RGWRados::get_olh(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw_obj& obj, RGWOLHInfo *olh)
{
map<string, bufferlist> attrset;
ObjectReadOperation op;
op.getxattrs(&attrset, NULL);
- int r = obj_operate(bucket_info, obj, &op);
+ int r = obj_operate(dpp, bucket_info, obj, &op);
if (r < 0) {
return r;
}
}
}
-int RGWRados::remove_olh_pending_entries(const RGWBucketInfo& bucket_info, RGWObjState& state, const rgw_obj& olh_obj, map<string, bufferlist>& pending_attrs)
+int RGWRados::remove_olh_pending_entries(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, RGWObjState& state, const rgw_obj& olh_obj, map<string, bufferlist>& pending_attrs)
{
rgw_rados_ref ref;
- int r = get_obj_head_ref(bucket_info, olh_obj, &ref);
+ int r = get_obj_head_ref(dpp, bucket_info, olh_obj, &ref);
if (r < 0) {
return r;
}
auto i = pending_attrs.begin();
while (i != pending_attrs.end()) {
ObjectWriteOperation op;
- bucket_index_guard_olh_op(state, op);
+ bucket_index_guard_olh_op(dpp, state, op);
for (int n = 0; n < max_entries && i != pending_attrs.end(); ++n, ++i) {
op.rmxattr(i->first.c_str());
}
- r = rgw_rados_operate(ref.pool.ioctx(), ref.obj.oid, &op, null_yield);
+ r = rgw_rados_operate(dpp, ref.pool.ioctx(), ref.obj.oid, &op, null_yield);
if (r == -ENOENT || r == -ECANCELED) {
/* raced with some other change, shouldn't sweat about it */
return 0;
}
if (r < 0) {
- ldout(cct, 0) << "ERROR: could not apply olh update, r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: could not apply olh update, r=" << r << dendl;
return r;
}
}
return 0;
}
-int RGWRados::follow_olh(const RGWBucketInfo& bucket_info, RGWObjectCtx& obj_ctx, RGWObjState *state, const rgw_obj& olh_obj, rgw_obj *target)
+int RGWRados::follow_olh(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, RGWObjectCtx& obj_ctx, RGWObjState *state, const rgw_obj& olh_obj, rgw_obj *target)
{
map<string, bufferlist> pending_entries;
rgw_filter_attrset(state->attrset, RGW_ATTR_OLH_PENDING_PREFIX, &pending_entries);
check_pending_olh_entries(pending_entries, &rm_pending_entries);
if (!rm_pending_entries.empty()) {
- int ret = remove_olh_pending_entries(bucket_info, *state, olh_obj, rm_pending_entries);
+ int ret = remove_olh_pending_entries(dpp, bucket_info, *state, olh_obj, rm_pending_entries);
if (ret < 0) {
- ldout(cct, 20) << "ERROR: rm_pending_entries returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 20) << "ERROR: rm_pending_entries returned ret=" << ret << dendl;
return ret;
}
}
if (!pending_entries.empty()) {
- ldout(cct, 20) << __func__ << "(): found pending entries, need to update_olh() on bucket=" << olh_obj.bucket << dendl;
+ ldpp_dout(dpp, 20) << __func__ << "(): found pending entries, need to update_olh() on bucket=" << olh_obj.bucket << dendl;
- int ret = update_olh(obj_ctx, state, bucket_info, olh_obj);
+ int ret = update_olh(dpp, obj_ctx, state, bucket_info, olh_obj);
if (ret < 0) {
return ret;
}
return 0;
}
-int RGWRados::raw_obj_stat(rgw_raw_obj& obj, uint64_t *psize, real_time *pmtime, uint64_t *epoch,
+int RGWRados::raw_obj_stat(const DoutPrefixProvider *dpp,
+ rgw_raw_obj& obj, uint64_t *psize, real_time *pmtime, uint64_t *epoch,
map<string, bufferlist> *attrs, bufferlist *first_chunk,
RGWObjVersionTracker *objv_tracker, optional_yield y)
{
rgw_rados_ref ref;
- int r = get_raw_obj_ref(obj, &ref);
+ int r = get_raw_obj_ref(dpp, obj, &ref);
if (r < 0) {
return r;
}
op.read(0, cct->_conf->rgw_max_chunk_size, first_chunk, NULL);
}
bufferlist outbl;
- r = rgw_rados_operate(ref.pool.ioctx(), ref.obj.oid, &op, &outbl, null_yield);
+ r = rgw_rados_operate(dpp, ref.pool.ioctx(), ref.obj.oid, &op, &outbl, null_yield);
if (epoch) {
*epoch = ref.pool.ioctx().get_last_version();
return 0;
}
-int RGWRados::get_bucket_stats(RGWBucketInfo& bucket_info, int shard_id, string *bucket_ver, string *master_ver,
+int RGWRados::get_bucket_stats(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info, int shard_id, string *bucket_ver, string *master_ver,
map<RGWObjCategory, RGWStorageStats>& stats, string *max_marker, bool *syncstopped)
{
vector<rgw_bucket_dir_header> headers;
map<int, string> bucket_instance_ids;
- int r = cls_bucket_head(bucket_info, shard_id, headers, &bucket_instance_ids);
+ int r = cls_bucket_head(dpp, bucket_info, shard_id, headers, &bucket_instance_ids);
if (r < 0) {
return r;
}
}
};
-int RGWRados::get_bucket_stats_async(RGWBucketInfo& bucket_info, int shard_id, RGWGetBucketStats_CB *ctx)
+int RGWRados::get_bucket_stats_async(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info, int shard_id, RGWGetBucketStats_CB *ctx)
{
int num_aio = 0;
RGWGetBucketStatsContext *get_ctx = new RGWGetBucketStatsContext(ctx, bucket_info.layout.current_index.layout.normal.num_shards ? : 1);
ceph_assert(get_ctx);
- int r = cls_bucket_head_async(bucket_info, shard_id, get_ctx, &num_aio);
+ int r = cls_bucket_head_async(dpp, bucket_info, shard_id, get_ctx, &num_aio);
if (r < 0) {
ctx->put();
if (num_aio) {
RGWBucketInfo& info,
real_time *pmtime,
map<string, bufferlist> *pattrs,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
rgw_bucket bucket;
rgw_bucket_parse_bucket_key(cct, meta_key, &bucket, nullptr);
- return get_bucket_instance_info(obj_ctx, bucket, info, pmtime, pattrs, y);
+ return get_bucket_instance_info(obj_ctx, bucket, info, pmtime, pattrs, y, dpp);
}
int RGWRados::get_bucket_instance_info(RGWSysObjectCtx& obj_ctx, const rgw_bucket& bucket, RGWBucketInfo& info,
- real_time *pmtime, map<string, bufferlist> *pattrs, optional_yield y)
+ real_time *pmtime, map<string, bufferlist> *pattrs, optional_yield y,
+ const DoutPrefixProvider *dpp)
{
RGWSI_MetaBackend_CtxParams bectx_params = RGWSI_MetaBackend_CtxParams_SObj(&obj_ctx);
return ctl.bucket->read_bucket_instance_info(bucket, &info,
y,
+ dpp,
RGWBucketCtl::BucketInstance::GetParams()
.set_mtime(pmtime)
.set_attrs(pattrs)
const string& tenant, const string& bucket_name,
RGWBucketInfo& info,
real_time *pmtime,
- optional_yield y, map<string, bufferlist> *pattrs)
+ optional_yield y,
+ const DoutPrefixProvider *dpp, map<string, bufferlist> *pattrs)
{
auto obj_ctx = svc->sysobj->init_obj_ctx();
RGWSI_MetaBackend_CtxParams bectx_params = RGWSI_MetaBackend_CtxParams_SObj(&obj_ctx);
rgw_bucket bucket;
bucket.tenant = tenant;
bucket.name = bucket_name;
- return ctl.bucket->read_bucket_info(bucket, &info, y,
+ return ctl.bucket->read_bucket_info(bucket, &info, y, dpp,
RGWBucketCtl::BucketInstance::GetParams()
.set_mtime(pmtime)
.set_attrs(pattrs)
int RGWRados::try_refresh_bucket_info(RGWBucketInfo& info,
ceph::real_time *pmtime,
+ const DoutPrefixProvider *dpp,
map<string, bufferlist> *pattrs)
{
rgw_bucket bucket = info.bucket;
auto rv = info.objv_tracker.read_version;
- return ctl.bucket->read_bucket_info(bucket, &info, null_yield,
+ return ctl.bucket->read_bucket_info(bucket, &info, null_yield, dpp,
RGWBucketCtl::BucketInstance::GetParams()
.set_mtime(pmtime)
.set_attrs(pattrs)
}
int RGWRados::put_bucket_instance_info(RGWBucketInfo& info, bool exclusive,
- real_time mtime, map<string, bufferlist> *pattrs)
+ real_time mtime, map<string, bufferlist> *pattrs,
+ const DoutPrefixProvider *dpp)
{
- return ctl.bucket->store_bucket_instance_info(info.bucket, info, null_yield,
+ return ctl.bucket->store_bucket_instance_info(info.bucket, info, null_yield, dpp,
RGWBucketCtl::BucketInstance::PutParams()
.set_exclusive(exclusive)
.set_mtime(mtime)
}
int RGWRados::put_linked_bucket_info(RGWBucketInfo& info, bool exclusive, real_time mtime, obj_version *pep_objv,
- map<string, bufferlist> *pattrs, bool create_entry_point)
+ map<string, bufferlist> *pattrs, bool create_entry_point,
+ const DoutPrefixProvider *dpp)
{
bool create_head = !info.has_instance_obj || create_entry_point;
- int ret = put_bucket_instance_info(info, exclusive, mtime, pattrs);
+ int ret = put_bucket_instance_info(info, exclusive, mtime, pattrs, dpp);
if (ret < 0) {
return ret;
}
*pep_objv = ot.write_version;
}
}
- ret = ctl.bucket->store_bucket_entrypoint_info(info.bucket, entry_point, null_yield, RGWBucketCtl::Bucket::PutParams()
+ ret = ctl.bucket->store_bucket_entrypoint_info(info.bucket, entry_point, null_yield, dpp, RGWBucketCtl::Bucket::PutParams()
.set_exclusive(exclusive)
.set_objv_tracker(&ot)
.set_mtime(mtime));
return 0;
}
-int RGWRados::update_containers_stats(map<string, RGWBucketEnt>& m)
+int RGWRados::update_containers_stats(map<string, RGWBucketEnt>& m, const DoutPrefixProvider *dpp)
{
auto obj_ctx = svc.sysobj->init_obj_ctx();
vector<rgw_bucket_dir_header> headers;
RGWBucketInfo bucket_info;
- int ret = get_bucket_instance_info(obj_ctx, bucket, bucket_info, NULL, NULL, null_yield);
+ int ret = get_bucket_instance_info(obj_ctx, bucket, bucket_info, NULL, NULL, null_yield, dpp);
if (ret < 0) {
return ret;
}
- int r = cls_bucket_head(bucket_info, RGW_NO_SHARD, headers);
+ int r = cls_bucket_head(dpp, bucket_info, RGW_NO_SHARD, headers);
if (r < 0)
return r;
return m.size();
}
-int RGWRados::append_async(rgw_raw_obj& obj, size_t size, bufferlist& bl)
+int RGWRados::append_async(const DoutPrefixProvider *dpp, rgw_raw_obj& obj, size_t size, bufferlist& bl)
{
rgw_rados_ref ref;
- int r = get_raw_obj_ref(obj, &ref);
+ int r = get_raw_obj_ref(dpp, obj, &ref);
if (r < 0) {
return r;
}
return r;
}
-int RGWRados::pool_iterate_begin(const rgw_pool& pool, RGWPoolIterCtx& ctx)
+int RGWRados::pool_iterate_begin(const DoutPrefixProvider *dpp, const rgw_pool& pool, RGWPoolIterCtx& ctx)
{
librados::IoCtx& io_ctx = ctx.io_ctx;
librados::NObjectIterator& iter = ctx.iter;
- int r = open_pool_ctx(pool, io_ctx, false);
+ int r = open_pool_ctx(dpp, pool, io_ctx, false);
if (r < 0)
return r;
return 0;
}
-int RGWRados::pool_iterate_begin(const rgw_pool& pool, const string& cursor, RGWPoolIterCtx& ctx)
+int RGWRados::pool_iterate_begin(const DoutPrefixProvider *dpp, const rgw_pool& pool, const string& cursor, RGWPoolIterCtx& ctx)
{
librados::IoCtx& io_ctx = ctx.io_ctx;
librados::NObjectIterator& iter = ctx.iter;
- int r = open_pool_ctx(pool, io_ctx, false);
+ int r = open_pool_ctx(dpp, pool, io_ctx, false);
if (r < 0)
return r;
librados::ObjectCursor oc;
if (!oc.from_str(cursor)) {
- ldout(cct, 10) << "failed to parse cursor: " << cursor << dendl;
+ ldpp_dout(dpp, 10) << "failed to parse cursor: " << cursor << dendl;
return -EINVAL;
}
return 0;
} catch (const std::system_error& e) {
r = -e.code().value();
- ldout(cct, 10) << "nobjects_begin threw " << e.what()
+ ldpp_dout(dpp, 10) << "nobjects_begin threw " << e.what()
<< ", returning " << r << dendl;
return r;
} catch (const std::exception& e) {
- ldout(cct, 10) << "nobjects_begin threw " << e.what()
+ ldpp_dout(dpp, 10) << "nobjects_begin threw " << e.what()
<< ", returning -5" << dendl;
return -EIO;
}
}
}
-int RGWRados::list_raw_objects_init(const rgw_pool& pool, const string& marker, RGWListRawObjsCtx *ctx)
+int RGWRados::list_raw_objects_init(const DoutPrefixProvider *dpp, const rgw_pool& pool, const string& marker, RGWListRawObjsCtx *ctx)
{
if (!ctx->initialized) {
- int r = pool_iterate_begin(pool, marker, ctx->iter_ctx);
+ int r = pool_iterate_begin(dpp, pool, marker, ctx->iter_ctx);
if (r < 0) {
- ldout(cct, 10) << "failed to list objects pool_iterate_begin() returned r=" << r << dendl;
+ ldpp_dout(dpp, 10) << "failed to list objects pool_iterate_begin() returned r=" << r << dendl;
return r;
}
ctx->initialized = true;
return 0;
}
-int RGWRados::list_raw_objects_next(const string& prefix_filter, int max,
+int RGWRados::list_raw_objects_next(const DoutPrefixProvider *dpp, const string& prefix_filter, int max,
RGWListRawObjsCtx& ctx, list<string>& oids,
bool *is_truncated)
{
int r = pool_iterate(ctx.iter_ctx, max, objs, is_truncated, &filter);
if (r < 0) {
if(r != -ENOENT)
- ldout(cct, 10) << "failed to list objects pool_iterate returned r=" << r << dendl;
+ ldpp_dout(dpp, 10) << "failed to list objects pool_iterate returned r=" << r << dendl;
return r;
}
return oids.size();
}
-int RGWRados::list_raw_objects(const rgw_pool& pool, const string& prefix_filter,
+int RGWRados::list_raw_objects(const DoutPrefixProvider *dpp, const rgw_pool& pool, const string& prefix_filter,
int max, RGWListRawObjsCtx& ctx, list<string>& oids,
bool *is_truncated)
{
if (!ctx.initialized) {
- int r = list_raw_objects_init(pool, string(), &ctx);
+ int r = list_raw_objects_init(dpp, pool, string(), &ctx);
if (r < 0) {
return r;
}
}
- return list_raw_objects_next(prefix_filter, max, ctx, oids, is_truncated);
+ return list_raw_objects_next(dpp, prefix_filter, max, ctx, oids, is_truncated);
}
string RGWRados::list_raw_objs_get_cursor(RGWListRawObjsCtx& ctx)
return pool_iterate_get_cursor(ctx.iter_ctx);
}
-int RGWRados::bi_get_instance(const RGWBucketInfo& bucket_info, const rgw_obj& obj,
+int RGWRados::bi_get_instance(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw_obj& obj,
rgw_bucket_dir_entry *dirent)
{
rgw_cls_bi_entry bi_entry;
- int r = bi_get(bucket_info, obj, BIIndexType::Instance, &bi_entry);
+ int r = bi_get(dpp, bucket_info, obj, BIIndexType::Instance, &bi_entry);
if (r < 0 && r != -ENOENT) {
- ldout(cct, 0) << "ERROR: bi_get() returned r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: bi_get() returned r=" << r << dendl;
}
if (r < 0) {
return r;
try {
decode(*dirent, iter);
} catch (buffer::error& err) {
- ldout(cct, 0) << "ERROR: failed to decode bi_entry()" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to decode bi_entry()" << dendl;
return -EIO;
}
return 0;
}
-int RGWRados::bi_get_olh(const RGWBucketInfo& bucket_info, const rgw_obj& obj,
+int RGWRados::bi_get_olh(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw_obj& obj,
rgw_bucket_olh_entry *olh)
{
rgw_cls_bi_entry bi_entry;
- int r = bi_get(bucket_info, obj, BIIndexType::OLH, &bi_entry);
+ int r = bi_get(dpp, bucket_info, obj, BIIndexType::OLH, &bi_entry);
if (r < 0 && r != -ENOENT) {
- ldout(cct, 0) << "ERROR: bi_get() returned r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: bi_get() returned r=" << r << dendl;
}
if (r < 0) {
return r;
try {
decode(*olh, iter);
} catch (buffer::error& err) {
- ldout(cct, 0) << "ERROR: failed to decode bi_entry()" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to decode bi_entry()" << dendl;
return -EIO;
}
return 0;
}
-int RGWRados::bi_get(const RGWBucketInfo& bucket_info, const rgw_obj& obj,
+int RGWRados::bi_get(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw_obj& obj,
BIIndexType index_type, rgw_cls_bi_entry *entry)
{
BucketShard bs(this);
- int ret = bs.init(bucket_info, obj);
+ int ret = bs.init(dpp, bucket_info, obj);
if (ret < 0) {
- ldout(cct, 5) << "bs.init() returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 5) << "bs.init() returned ret=" << ret << dendl;
return ret;
}
return 0;
}
-int RGWRados::bi_put(rgw_bucket& bucket, rgw_obj& obj, rgw_cls_bi_entry& entry)
+int RGWRados::bi_put(const DoutPrefixProvider *dpp, rgw_bucket& bucket, rgw_obj& obj, rgw_cls_bi_entry& entry)
{
BucketShard bs(this);
- int ret = bs.init(bucket, obj, nullptr /* no RGWBucketInfo */);
+ int ret = bs.init(bucket, obj, nullptr /* no RGWBucketInfo */, dpp);
if (ret < 0) {
- ldout(cct, 5) << "bs.init() returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 5) << "bs.init() returned ret=" << ret << dendl;
return ret;
}
return bi_put(bs, entry);
}
-int RGWRados::bi_list(rgw_bucket& bucket, const string& obj_name, const string& marker, uint32_t max, list<rgw_cls_bi_entry> *entries, bool *is_truncated)
+int RGWRados::bi_list(const DoutPrefixProvider *dpp, rgw_bucket& bucket, const string& obj_name, const string& marker, uint32_t max, list<rgw_cls_bi_entry> *entries, bool *is_truncated)
{
rgw_obj obj(bucket, obj_name);
BucketShard bs(this);
- int ret = bs.init(bucket, obj, nullptr /* no RGWBucketInfo */);
+ int ret = bs.init(bucket, obj, nullptr /* no RGWBucketInfo */, dpp);
if (ret < 0) {
- ldout(cct, 5) << "bs.init() returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 5) << "bs.init() returned ret=" << ret << dendl;
return ret;
}
return 0;
}
-int RGWRados::bi_list(const RGWBucketInfo& bucket_info, int shard_id, const string& filter_obj, const string& marker, uint32_t max, list<rgw_cls_bi_entry> *entries, bool *is_truncated)
+int RGWRados::bi_list(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, int shard_id, const string& filter_obj, const string& marker, uint32_t max, list<rgw_cls_bi_entry> *entries, bool *is_truncated)
{
BucketShard bs(this);
- int ret = bs.init(bucket_info.bucket, shard_id, bucket_info.layout.current_index, nullptr /* no RGWBucketInfo */);
+ int ret = bs.init(bucket_info.bucket, shard_id, bucket_info.layout.current_index, nullptr /* no RGWBucketInfo */, dpp);
if (ret < 0) {
- ldout(cct, 5) << "bs.init() returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 5) << "bs.init() returned ret=" << ret << dendl;
return ret;
}
return bi_list(bs, filter_obj, marker, max, entries, is_truncated);
}
-int RGWRados::gc_operate(string& oid, librados::ObjectWriteOperation *op)
+int RGWRados::gc_operate(const DoutPrefixProvider *dpp, string& oid, librados::ObjectWriteOperation *op)
{
- return rgw_rados_operate(gc_pool_ctx, oid, op, null_yield);
+ return rgw_rados_operate(dpp, gc_pool_ctx, oid, op, null_yield);
}
int RGWRados::gc_aio_operate(const string& oid, librados::AioCompletion *c,
return gc_pool_ctx.aio_operate(oid, c, op);
}
-int RGWRados::gc_operate(string& oid, librados::ObjectReadOperation *op, bufferlist *pbl)
+int RGWRados::gc_operate(const DoutPrefixProvider *dpp, string& oid, librados::ObjectReadOperation *op, bufferlist *pbl)
{
- return rgw_rados_operate(gc_pool_ctx, oid, op, pbl, null_yield);
+ return rgw_rados_operate(dpp, gc_pool_ctx, oid, op, pbl, null_yield);
}
int RGWRados::list_gc_objs(int *index, string& marker, uint32_t max, bool expired_only, std::list<cls_rgw_gc_obj_info>& result, bool *truncated, bool& processing_queue)
return ret;
}
-bool RGWRados::process_expire_objects()
+bool RGWRados::process_expire_objects(const DoutPrefixProvider *dpp)
{
- return obj_expirer->inspect_all_shards(utime_t(), ceph_clock_now());
+ return obj_expirer->inspect_all_shards(dpp, utime_t(), ceph_clock_now());
}
-int RGWRados::cls_obj_prepare_op(BucketShard& bs, RGWModifyOp op, string& tag,
+int RGWRados::cls_obj_prepare_op(const DoutPrefixProvider *dpp, BucketShard& bs, RGWModifyOp op, string& tag,
rgw_obj& obj, uint16_t bilog_flags, optional_yield y, rgw_zone_set *_zones_trace)
{
rgw_zone_set zones_trace;
cls_rgw_obj_key key(obj.key.get_index_key_name(), obj.key.instance);
cls_rgw_guard_bucket_resharding(o, -ERR_BUSY_RESHARDING);
cls_rgw_bucket_prepare_op(o, op, tag, key, obj.key.get_loc(), svc.zone->get_zone().log_data, bilog_flags, zones_trace);
- return bs.bucket_obj.operate(&o, y);
+ return bs.bucket_obj.operate(dpp, &o, y);
}
int RGWRados::cls_obj_complete_op(BucketShard& bs, const rgw_obj& obj, RGWModifyOp op, string& tag,
zones_trace);
}
-int RGWRados::cls_obj_set_bucket_tag_timeout(RGWBucketInfo& bucket_info, uint64_t timeout)
+int RGWRados::cls_obj_set_bucket_tag_timeout(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info, uint64_t timeout)
{
RGWSI_RADOS::Pool index_pool;
map<int, string> bucket_objs;
- int r = svc.bi_rados->open_bucket_index(bucket_info, std::nullopt, &index_pool, &bucket_objs, nullptr);
+ int r = svc.bi_rados->open_bucket_index(dpp, bucket_info, std::nullopt, &index_pool, &bucket_objs, nullptr);
if (r < 0)
return r;
}
-int RGWRados::cls_bucket_list_ordered(RGWBucketInfo& bucket_info,
+int RGWRados::cls_bucket_list_ordered(const DoutPrefixProvider *dpp,
+ RGWBucketInfo& bucket_info,
const int shard_id,
const rgw_obj_index_key& start_after,
const string& prefix,
* few results, perhaps due to filtering or to a series of
* namespaced entries */
- ldout(cct, 10) << "RGWRados::" << __func__ << ": " << bucket_info.bucket <<
+ ldpp_dout(dpp, 10) << "RGWRados::" << __func__ << ": " << bucket_info.bucket <<
" start_after=\"" << start_after.name <<
"[" << start_after.instance <<
"]\", prefix=\"" << prefix <<
// value - list result for the corresponding oid (shard), it is filled by
// the AIO callback
map<int, string> shard_oids;
- int r = svc.bi_rados->open_bucket_index(bucket_info, shard_id,
+ int r = svc.bi_rados->open_bucket_index(dpp, bucket_info, shard_id,
&index_pool, &shard_oids,
nullptr);
if (r < 0) {
num_entries_per_shard = num_entries;
}
- ldout(cct, 10) << "RGWRados::" << __func__ <<
+ ldpp_dout(dpp, 10) << "RGWRados::" << __func__ <<
" request from each of " << shard_count <<
" shard(s) for " << num_entries_per_shard << " entries to get " <<
num_entries << " total entries" << dendl;
const string& name = tracker.entry_name();
rgw_bucket_dir_entry& dirent = tracker.dir_entry();
- ldout(cct, 20) << "RGWRados::" << __func__ << " currently processing " <<
+ ldpp_dout(dpp, 20) << "RGWRados::" << __func__ << " currently processing " <<
dirent.key << " from shard " << tracker.shard_idx << dendl;
const bool force_check =
* well. */
librados::IoCtx sub_ctx;
sub_ctx.dup(ioctx);
- r = check_disk_state(sub_ctx, bucket_info, dirent, dirent,
+ r = check_disk_state(dpp, sub_ctx, bucket_info, dirent, dirent,
updates[tracker.oid_name], y);
if (r < 0 && r != -ENOENT) {
return r;
}
if (r >= 0) {
- ldout(cct, 10) << "RGWRados::" << __func__ << ": got " <<
+ ldpp_dout(dpp, 10) << "RGWRados::" << __func__ << ": got " <<
dirent.key.name << "[" << dirent.key.instance << "]" << dendl;
m[name] = std::move(dirent);
last_entry_visited = &(m[name]);
++count;
} else {
- ldout(cct, 10) << "RGWRados::" << __func__ << ": skipping " <<
+ ldpp_dout(dpp, 10) << "RGWRados::" << __func__ << ": skipping " <<
dirent.key.name << "[" << dirent.key.instance << "]" << dendl;
last_entry_visited = &tracker.dir_entry();
}
}
}
- ldout(cct, 20) << "RGWRados::" << __func__ <<
+ ldpp_dout(dpp, 20) << "RGWRados::" << __func__ <<
": returning, count=" << count << ", is_truncated=" << *is_truncated <<
dendl;
if (*is_truncated && count < num_entries) {
- ldout(cct, 10) << "RGWRados::" << __func__ <<
+ ldpp_dout(dpp, 10) << "RGWRados::" << __func__ <<
": INFO requested " << num_entries << " entries but returning " <<
count << ", which is truncated" << dendl;
}
if (last_entry_visited != nullptr && last_entry) {
*last_entry = last_entry_visited->key;
- ldout(cct, 20) << "RGWRados::" << __func__ <<
+ ldpp_dout(dpp, 20) << "RGWRados::" << __func__ <<
": returning, last_entry=" << *last_entry << dendl;
} else {
- ldout(cct, 20) << "RGWRados::" << __func__ <<
+ ldpp_dout(dpp, 20) << "RGWRados::" << __func__ <<
": returning, last_entry NOT SET" << dendl;
}
}
-int RGWRados::cls_bucket_list_unordered(RGWBucketInfo& bucket_info,
+int RGWRados::cls_bucket_list_unordered(const DoutPrefixProvider *dpp,
+ RGWBucketInfo& bucket_info,
int shard_id,
const rgw_obj_index_key& start_after,
const string& prefix,
rgw_obj_index_key *last_entry,
optional_yield y,
check_filter_t force_check_filter) {
- ldout(cct, 10) << "cls_bucket_list_unordered " << bucket_info.bucket <<
+ ldpp_dout(dpp, 10) << "cls_bucket_list_unordered " << bucket_info.bucket <<
" start_after " << start_after.name << "[" << start_after.instance <<
"] num_entries " << num_entries << dendl;
RGWSI_RADOS::Pool index_pool;
map<int, string> oids;
- int r = svc.bi_rados->open_bucket_index(bucket_info, shard_id, &index_pool, &oids, nullptr);
+ int r = svc.bi_rados->open_bucket_index(dpp, bucket_info, shard_id, &index_pool, &oids, nullptr);
if (r < 0)
return r;
rgw_obj_key obj_key;
bool parsed = rgw_obj_key::parse_raw_oid(key, &obj_key);
if (!parsed) {
- ldout(cct, 0) <<
+ ldpp_dout(dpp, 0) <<
"ERROR: RGWRados::cls_bucket_list_unordered received an invalid "
"start marker: '" << start_after << "'" << dendl;
return -EINVAL;
cls_rgw_bucket_list_op(op, marker, prefix, empty_delimiter,
num_entries,
list_versions, &result);
- r = rgw_rados_operate(ioctx, oid, &op, nullptr, null_yield);
+ r = rgw_rados_operate(dpp, ioctx, oid, &op, nullptr, null_yield);
if (r < 0)
return r;
* and if the tags are old we need to do cleanup as well. */
librados::IoCtx sub_ctx;
sub_ctx.dup(ioctx);
- r = check_disk_state(sub_ctx, bucket_info, dirent, dirent, updates[oid], y);
+ r = check_disk_state(dpp, sub_ctx, bucket_info, dirent, dirent, updates[oid], y);
if (r < 0 && r != -ENOENT) {
return r;
}
// at this point either r >=0 or r == -ENOENT
if (r >= 0) { // i.e., if r != -ENOENT
- ldout(cct, 10) << "RGWRados::cls_bucket_list_unordered: got " <<
+ ldpp_dout(dpp, 10) << "RGWRados::cls_bucket_list_unordered: got " <<
dirent.key.name << "[" << dirent.key.instance << "]" << dendl;
if (count < num_entries) {
} // RGWRados::cls_bucket_list_unordered
-int RGWRados::cls_obj_usage_log_add(const string& oid,
+int RGWRados::cls_obj_usage_log_add(const DoutPrefixProvider *dpp, const string& oid,
rgw_usage_log_info& info)
{
rgw_raw_obj obj(svc.zone->get_zone_params().usage_log_pool, oid);
rgw_rados_ref ref;
- int r = get_raw_obj_ref(obj, &ref);
+ int r = get_raw_obj_ref(dpp, obj, &ref);
if (r < 0) {
return r;
}
ObjectWriteOperation op;
cls_rgw_usage_log_add(op, info);
- r = rgw_rados_operate(ref.pool.ioctx(), ref.obj.oid, &op, null_yield);
+ r = rgw_rados_operate(dpp, ref.pool.ioctx(), ref.obj.oid, &op, null_yield);
return r;
}
-int RGWRados::cls_obj_usage_log_read(const string& oid, const string& user, const string& bucket,
+int RGWRados::cls_obj_usage_log_read(const DoutPrefixProvider *dpp, const string& oid, const string& user, const string& bucket,
uint64_t start_epoch, uint64_t end_epoch, uint32_t max_entries,
string& read_iter, map<rgw_user_bucket, rgw_usage_log_entry>& usage,
bool *is_truncated)
rgw_raw_obj obj(svc.zone->get_zone_params().usage_log_pool, oid);
rgw_rados_ref ref;
- int r = get_raw_obj_ref(obj, &ref);
+ int r = get_raw_obj_ref(dpp, obj, &ref);
if (r < 0) {
return r;
}
return r;
}
-static int cls_rgw_usage_log_trim_repeat(rgw_rados_ref ref, const string& user, const string& bucket, uint64_t start_epoch, uint64_t end_epoch)
+static int cls_rgw_usage_log_trim_repeat(const DoutPrefixProvider *dpp, rgw_rados_ref ref, const string& user, const string& bucket, uint64_t start_epoch, uint64_t end_epoch)
{
bool done = false;
do {
librados::ObjectWriteOperation op;
cls_rgw_usage_log_trim(op, user, bucket, start_epoch, end_epoch);
- int r = rgw_rados_operate(ref.pool.ioctx(), ref.obj.oid, &op, null_yield);
+ int r = rgw_rados_operate(dpp, ref.pool.ioctx(), ref.obj.oid, &op, null_yield);
if (r == -ENODATA)
done = true;
else if (r < 0)
return 0;
}
-int RGWRados::cls_obj_usage_log_trim(const string& oid, const string& user, const string& bucket,
+int RGWRados::cls_obj_usage_log_trim(const DoutPrefixProvider *dpp, const string& oid, const string& user, const string& bucket,
uint64_t start_epoch, uint64_t end_epoch)
{
rgw_raw_obj obj(svc.zone->get_zone_params().usage_log_pool, oid);
rgw_rados_ref ref;
- int r = get_raw_obj_ref(obj, &ref);
+ int r = get_raw_obj_ref(dpp, obj, &ref);
if (r < 0) {
return r;
}
- r = cls_rgw_usage_log_trim_repeat(ref, user, bucket, start_epoch, end_epoch);
+ r = cls_rgw_usage_log_trim_repeat(dpp, ref, user, bucket, start_epoch, end_epoch);
return r;
}
-int RGWRados::cls_obj_usage_log_clear(string& oid)
+int RGWRados::cls_obj_usage_log_clear(const DoutPrefixProvider *dpp, string& oid)
{
rgw_raw_obj obj(svc.zone->get_zone_params().usage_log_pool, oid);
rgw_rados_ref ref;
- int r = get_raw_obj_ref(obj, &ref);
+ int r = get_raw_obj_ref(dpp, obj, &ref);
if (r < 0) {
return r;
}
librados::ObjectWriteOperation op;
cls_rgw_usage_log_clear(op);
- r = rgw_rados_operate(ref.pool.ioctx(), ref.obj.oid, &op, null_yield);
+ r = rgw_rados_operate(dpp, ref.pool.ioctx(), ref.obj.oid, &op, null_yield);
return r;
}
-int RGWRados::remove_objs_from_index(RGWBucketInfo& bucket_info, list<rgw_obj_index_key>& oid_list)
+int RGWRados::remove_objs_from_index(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info, list<rgw_obj_index_key>& oid_list)
{
RGWSI_RADOS::Pool index_pool;
string dir_oid;
uint8_t suggest_flag = (svc.zone->get_zone().log_data ? CEPH_RGW_DIR_SUGGEST_LOG_OP : 0);
- int r = svc.bi_rados->open_bucket_index(bucket_info, &index_pool, &dir_oid);
+ int r = svc.bi_rados->open_bucket_index(dpp, bucket_info, &index_pool, &dir_oid);
if (r < 0)
return r;
for (auto iter = oid_list.begin(); iter != oid_list.end(); ++iter) {
rgw_bucket_dir_entry entry;
entry.key = *iter;
- dout(2) << "RGWRados::remove_objs_from_index bucket=" << bucket_info.bucket << " obj=" << entry.key.name << ":" << entry.key.instance << dendl;
+ ldpp_dout(dpp, 2) << "RGWRados::remove_objs_from_index bucket=" << bucket_info.bucket << " obj=" << entry.key.name << ":" << entry.key.instance << dendl;
entry.ver.epoch = (uint64_t)-1; // ULLONG_MAX, needed to that objclass doesn't skip out request
updates.append(CEPH_RGW_REMOVE | suggest_flag);
encode(entry, updates);
return r;
}
-int RGWRados::check_disk_state(librados::IoCtx io_ctx,
+int RGWRados::check_disk_state(const DoutPrefixProvider *dpp,
+ librados::IoCtx io_ctx,
const RGWBucketInfo& bucket_info,
rgw_bucket_dir_entry& list_state,
rgw_bucket_dir_entry& object,
get_obj_bucket_and_oid_loc(obj, oid, loc);
if (loc != list_state.locator) {
- ldout(cct, 0) << "WARNING: generated locator (" << loc << ") is different from listed locator (" << list_state.locator << ")" << dendl;
+ ldpp_dout(dpp, 0) << "WARNING: generated locator (" << loc << ") is different from listed locator (" << list_state.locator << ")" << dendl;
}
io_ctx.locator_set_key(list_state.locator);
RGWObjState *astate = NULL;
RGWObjectCtx rctx(this->store);
- int r = get_obj_state(&rctx, bucket_info, obj, &astate, false, y);
+ int r = get_obj_state(dpp, &rctx, bucket_info, obj, &astate, false, y);
if (r < 0)
return r;
if (iter != astate->attrset.end()) {
r = decode_policy(iter->second, &owner);
if (r < 0) {
- dout(0) << "WARNING: could not decode policy for object: " << obj << dendl;
+ ldpp_dout(dpp, 0) << "WARNING: could not decode policy for object: " << obj << dendl;
}
}
if (astate->manifest) {
RGWObjManifest::obj_iterator miter;
RGWObjManifest& manifest = *astate->manifest;
- for (miter = manifest.obj_begin(); miter != manifest.obj_end(); ++miter) {
+ for (miter = manifest.obj_begin(dpp); miter != manifest.obj_end(dpp); ++miter) {
const rgw_raw_obj& raw_loc = miter.get_location().get_raw_obj(store);
rgw_obj loc;
RGWSI_Tier_RADOS::raw_obj_to_obj(manifest.get_obj().bucket, raw_loc, &loc);
if (loc.key.ns == RGW_OBJ_NS_MULTIPART) {
- dout(10) << "check_disk_state(): removing manifest part from index: " << loc << dendl;
- r = delete_obj_index(loc, astate->mtime);
+ ldpp_dout(dpp, 0) << "check_disk_state(): removing manifest part from index: " << loc << dendl;
+ r = delete_obj_index(loc, astate->mtime, dpp);
if (r < 0) {
- dout(0) << "WARNING: delete_obj_index() returned r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "WARNING: delete_obj_index() returned r=" << r << dendl;
}
}
}
return 0;
}
-int RGWRados::cls_bucket_head(const RGWBucketInfo& bucket_info, int shard_id, vector<rgw_bucket_dir_header>& headers, map<int, string> *bucket_instance_ids)
+int RGWRados::cls_bucket_head(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, int shard_id, vector<rgw_bucket_dir_header>& headers, map<int, string> *bucket_instance_ids)
{
RGWSI_RADOS::Pool index_pool;
map<int, string> oids;
map<int, struct rgw_cls_list_ret> list_results;
- int r = svc.bi_rados->open_bucket_index(bucket_info, shard_id, &index_pool, &oids, bucket_instance_ids);
+ int r = svc.bi_rados->open_bucket_index(dpp, bucket_info, shard_id, &index_pool, &oids, bucket_instance_ids);
if (r < 0) {
- ldout(cct, 20) << "cls_bucket_head: open_bucket_index() returned "
+ ldpp_dout(dpp, 20) << "cls_bucket_head: open_bucket_index() returned "
<< r << dendl;
return r;
}
r = CLSRGWIssueGetDirHeader(index_pool.ioctx(), oids, list_results, cct->_conf->rgw_bucket_index_max_aio)();
if (r < 0) {
- ldout(cct, 20) << "cls_bucket_head: CLSRGWIssueGetDirHeader() returned "
+ ldpp_dout(dpp, 20) << "cls_bucket_head: CLSRGWIssueGetDirHeader() returned "
<< r << dendl;
return r;
}
return 0;
}
-int RGWRados::cls_bucket_head_async(const RGWBucketInfo& bucket_info, int shard_id, RGWGetDirHeader_CB *ctx, int *num_aio)
+int RGWRados::cls_bucket_head_async(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, int shard_id, RGWGetDirHeader_CB *ctx, int *num_aio)
{
RGWSI_RADOS::Pool index_pool;
map<int, string> bucket_objs;
- int r = svc.bi_rados->open_bucket_index(bucket_info, shard_id, &index_pool, &bucket_objs, nullptr);
+ int r = svc.bi_rados->open_bucket_index(dpp, bucket_info, shard_id, &index_pool, &bucket_objs, nullptr);
if (r < 0)
return r;
int RGWRados::check_bucket_shards(const RGWBucketInfo& bucket_info,
const rgw_bucket& bucket,
- uint64_t num_objs)
+ uint64_t num_objs,
+ const DoutPrefixProvider *dpp)
{
if (! cct->_conf.get_val<bool>("rgw_dynamic_resharding")) {
return 0;
return 0;
}
- ldout(cct, 1) << "RGWRados::" << __func__ << " bucket " << bucket.name <<
+ ldpp_dout(dpp, 1) << "RGWRados::" << __func__ << " bucket " << bucket.name <<
" needs resharding; current num shards " << bucket_info.layout.current_index.layout.normal.num_shards <<
"; new num shards " << final_num_shards << " (suggested " <<
suggested_num_shards << ")" << dendl;
- return add_bucket_to_reshard(bucket_info, final_num_shards);
+ return add_bucket_to_reshard(dpp, bucket_info, final_num_shards);
}
-int RGWRados::add_bucket_to_reshard(const RGWBucketInfo& bucket_info, uint32_t new_num_shards)
+int RGWRados::add_bucket_to_reshard(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, uint32_t new_num_shards)
{
- RGWReshard reshard(this->store);
+ RGWReshard reshard(this->store, dpp);
uint32_t num_source_shards = (bucket_info.layout.current_index.layout.normal.num_shards > 0 ? bucket_info.layout.current_index.layout.normal.num_shards : 1);
new_num_shards = std::min(new_num_shards, get_max_bucket_shards());
if (new_num_shards <= num_source_shards) {
- ldout(cct, 20) << "not resharding bucket name=" << bucket_info.bucket.name << ", orig_num=" << num_source_shards << ", new_num_shards=" << new_num_shards << dendl;
+ ldpp_dout(dpp, 20) << "not resharding bucket name=" << bucket_info.bucket.name << ", orig_num=" << num_source_shards << ", new_num_shards=" << new_num_shards << dendl;
return 0;
}
entry.old_num_shards = num_source_shards;
entry.new_num_shards = new_num_shards;
- return reshard.add(entry);
+ return reshard.add(dpp, entry);
}
int RGWRados::check_quota(const rgw_user& bucket_owner, rgw_bucket& bucket,
return &rados;
}
-int RGWRados::delete_raw_obj_aio(const rgw_raw_obj& obj, list<librados::AioCompletion *>& handles)
+int RGWRados::delete_raw_obj_aio(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, list<librados::AioCompletion *>& handles)
{
rgw_rados_ref ref;
- int ret = get_raw_obj_ref(obj, &ref);
+ int ret = get_raw_obj_ref(dpp, obj, &ref);
if (ret < 0) {
- lderr(cct) << "ERROR: failed to get obj ref with ret=" << ret << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: failed to get obj ref with ret=" << ret << dendl;
return ret;
}
AioCompletion *c = librados::Rados::aio_create_completion(nullptr, nullptr);
ret = ref.pool.ioctx().aio_operate(ref.obj.oid, c, &op);
if (ret < 0) {
- lderr(cct) << "ERROR: AioOperate failed with ret=" << ret << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: AioOperate failed with ret=" << ret << dendl;
c->release();
return ret;
}
return 0;
}
-int RGWRados::delete_obj_aio(const rgw_obj& obj,
+int RGWRados::delete_obj_aio(const DoutPrefixProvider *dpp, const rgw_obj& obj,
RGWBucketInfo& bucket_info, RGWObjState *astate,
list<librados::AioCompletion *>& handles, bool keep_index_consistent,
optional_yield y)
{
rgw_rados_ref ref;
- int ret = get_obj_head_ref(bucket_info, obj, &ref);
+ int ret = get_obj_head_ref(dpp, bucket_info, obj, &ref);
if (ret < 0) {
- lderr(cct) << "ERROR: failed to get obj ref with ret=" << ret << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: failed to get obj ref with ret=" << ret << dendl;
return ret;
}
RGWRados::Bucket bop(this, bucket_info);
RGWRados::Bucket::UpdateIndex index_op(&bop, obj);
- ret = index_op.prepare(CLS_RGW_OP_DEL, &astate->write_tag, y);
+ ret = index_op.prepare(dpp, CLS_RGW_OP_DEL, &astate->write_tag, y);
if (ret < 0) {
- lderr(cct) << "ERROR: failed to prepare index op with ret=" << ret << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: failed to prepare index op with ret=" << ret << dendl;
return ret;
}
}
AioCompletion *c = librados::Rados::aio_create_completion(nullptr, nullptr);
ret = ref.pool.ioctx().aio_operate(ref.obj.oid, c, &op);
if (ret < 0) {
- lderr(cct) << "ERROR: AioOperate failed with ret=" << ret << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: AioOperate failed with ret=" << ret << dendl;
c->release();
return ret;
}
handles.push_back(c);
if (keep_index_consistent) {
- ret = delete_obj_index(obj, astate->mtime);
+ ret = delete_obj_index(obj, astate->mtime, dpp);
if (ret < 0) {
- lderr(cct) << "ERROR: failed to delete obj index with ret=" << ret << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: failed to delete obj index with ret=" << ret << dendl;
return ret;
}
}
}
}
-int rgw_policy_from_attrset(CephContext *cct, map<string, bufferlist>& attrset, RGWAccessControlPolicy *policy);
+int rgw_policy_from_attrset(const DoutPrefixProvider *dpp, CephContext *cct, map<string, bufferlist>& attrset, RGWAccessControlPolicy *policy);
struct RGWOLHInfo {
rgw_obj target;
friend class rgw::sal::RGWRadosStore;
/** Open the pool used as root for this gateway */
- int open_root_pool_ctx();
- int open_gc_pool_ctx();
- int open_lc_pool_ctx();
- int open_objexp_pool_ctx();
- int open_reshard_pool_ctx();
- int open_notif_pool_ctx();
-
- int open_pool_ctx(const rgw_pool& pool, librados::IoCtx& io_ctx,
+ int open_root_pool_ctx(const DoutPrefixProvider *dpp);
+ int open_gc_pool_ctx(const DoutPrefixProvider *dpp);
+ int open_lc_pool_ctx(const DoutPrefixProvider *dpp);
+ int open_objexp_pool_ctx(const DoutPrefixProvider *dpp);
+ int open_reshard_pool_ctx(const DoutPrefixProvider *dpp);
+ int open_notif_pool_ctx(const DoutPrefixProvider *dpp);
+
+ int open_pool_ctx(const DoutPrefixProvider *dpp, const rgw_pool& pool, librados::IoCtx& io_ctx,
bool mostly_omap);
std::atomic<int64_t> max_req_id = { 0 };
// This field represents the number of bucket index object shards
uint32_t bucket_index_max_shards;
- int get_obj_head_ref(const RGWBucketInfo& bucket_info, const rgw_obj& obj, rgw_rados_ref *ref);
- int get_system_obj_ref(const rgw_raw_obj& obj, rgw_rados_ref *ref);
+ int get_obj_head_ref(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw_obj& obj, rgw_rados_ref *ref);
+ int get_system_obj_ref(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, rgw_rados_ref *ref);
uint64_t max_bucket_id;
- int get_olh_target_state(RGWObjectCtx& rctx, const RGWBucketInfo& bucket_info, const rgw_obj& obj,
+ int get_olh_target_state(const DoutPrefixProvider *dpp, RGWObjectCtx& rctx, const RGWBucketInfo& bucket_info, const rgw_obj& obj,
RGWObjState *olh_state, RGWObjState **target_state, optional_yield y);
- int get_obj_state_impl(RGWObjectCtx *rctx, const RGWBucketInfo& bucket_info, const rgw_obj& obj, RGWObjState **state,
+ int get_obj_state_impl(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx, const RGWBucketInfo& bucket_info, const rgw_obj& obj, RGWObjState **state,
bool follow_olh, optional_yield y, bool assume_noent = false);
- int append_atomic_test(RGWObjectCtx *rctx, const RGWBucketInfo& bucket_info, const rgw_obj& obj,
+ int append_atomic_test(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx, const RGWBucketInfo& bucket_info, const rgw_obj& obj,
librados::ObjectOperation& op, RGWObjState **state, optional_yield y);
- int append_atomic_test(const RGWObjState* astate, librados::ObjectOperation& op);
+ int append_atomic_test(const DoutPrefixProvider *dpp, const RGWObjState* astate, librados::ObjectOperation& op);
int update_placement_map();
int store_bucket_info(RGWBucketInfo& info, map<string, bufferlist> *pattrs, RGWObjVersionTracker *objv_tracker, bool exclusive);
bool use_cache{false};
- int get_obj_head_ioctx(const RGWBucketInfo& bucket_info, const rgw_obj& obj, librados::IoCtx *ioctx);
+ int get_obj_head_ioctx(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw_obj& obj, librados::IoCtx *ioctx);
public:
RGWRados(): timer(NULL),
gc(NULL), lc(NULL), obj_expirer(NULL), use_gc_thread(false), use_lc_thread(false), quota_threads(false),
return sync_tracer;
}
- int get_required_alignment(const rgw_pool& pool, uint64_t *alignment);
+ int get_required_alignment(const DoutPrefixProvider *dpp, const rgw_pool& pool, uint64_t *alignment);
void get_max_aligned_size(uint64_t size, uint64_t alignment, uint64_t *max_size);
- int get_max_chunk_size(const rgw_pool& pool, uint64_t *max_chunk_size, uint64_t *palignment = nullptr);
- int get_max_chunk_size(const rgw_placement_rule& placement_rule, const rgw_obj& obj, uint64_t *max_chunk_size, uint64_t *palignment = nullptr);
+ int get_max_chunk_size(const rgw_pool& pool, uint64_t *max_chunk_size, const DoutPrefixProvider *dpp, uint64_t *palignment = nullptr);
+ int get_max_chunk_size(const rgw_placement_rule& placement_rule, const rgw_obj& obj, uint64_t *max_chunk_size, const DoutPrefixProvider *dpp, uint64_t *palignment = nullptr);
uint32_t get_max_bucket_shards() {
return RGWSI_BucketIndex_RADOS::shards_max();
}
- int get_raw_obj_ref(const rgw_raw_obj& obj, rgw_rados_ref *ref);
+ int get_raw_obj_ref(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, rgw_rados_ref *ref);
- int list_raw_objects_init(const rgw_pool& pool, const string& marker, RGWListRawObjsCtx *ctx);
- int list_raw_objects_next(const string& prefix_filter, int max,
+ int list_raw_objects_init(const DoutPrefixProvider *dpp, const rgw_pool& pool, const string& marker, RGWListRawObjsCtx *ctx);
+ int list_raw_objects_next(const DoutPrefixProvider *dpp, const string& prefix_filter, int max,
RGWListRawObjsCtx& ctx, list<string>& oids,
bool *is_truncated);
- int list_raw_objects(const rgw_pool& pool, const string& prefix_filter, int max,
+ int list_raw_objects(const DoutPrefixProvider *dpp, const rgw_pool& pool, const string& prefix_filter, int max,
RGWListRawObjsCtx& ctx, list<string>& oids,
bool *is_truncated);
string list_raw_objs_get_cursor(RGWListRawObjsCtx& ctx);
CephContext *ctx() { return cct; }
/** do all necessary setup of the storage device */
- int initialize(CephContext *_cct) {
+ int initialize(CephContext *_cct, const DoutPrefixProvider *dpp) {
set_context(_cct);
- return initialize();
+ return initialize(dpp);
}
/** Initialize the RADOS instance and prepare to do other ops */
- int init_svc(bool raw);
- int init_ctl();
+ int init_svc(bool raw, const DoutPrefixProvider *dpp);
+ int init_ctl(const DoutPrefixProvider *dpp);
int init_rados();
- int init_complete();
- int initialize();
+ int init_complete(const DoutPrefixProvider *dpp);
+ int initialize(const DoutPrefixProvider *dpp);
void finalize();
int register_to_service_map(const string& daemon_type, const map<string, string>& meta);
int update_service_map(std::map<std::string, std::string>&& status);
/// list logs
- int log_list_init(const string& prefix, RGWAccessHandle *handle);
+ int log_list_init(const DoutPrefixProvider *dpp, const string& prefix, RGWAccessHandle *handle);
int log_list_next(RGWAccessHandle handle, string *name);
/// remove log
- int log_remove(const string& name);
+ int log_remove(const DoutPrefixProvider *dpp, const string& name);
/// show log
- int log_show_init(const string& name, RGWAccessHandle *handle);
+ int log_show_init(const DoutPrefixProvider *dpp, const string& name, RGWAccessHandle *handle);
int log_show_next(RGWAccessHandle handle, rgw_log_entry *entry);
// log bandwidth info
- int log_usage(map<rgw_user_bucket, RGWUsageBatch>& usage_info);
- int read_usage(const rgw_user& user, const string& bucket_name, uint64_t start_epoch, uint64_t end_epoch,
+ int log_usage(const DoutPrefixProvider *dpp, map<rgw_user_bucket, RGWUsageBatch>& usage_info);
+ int read_usage(const DoutPrefixProvider *dpp, const rgw_user& user, const string& bucket_name, uint64_t start_epoch, uint64_t end_epoch,
uint32_t max_entries, bool *is_truncated, RGWUsageIter& read_iter, map<rgw_user_bucket,
rgw_usage_log_entry>& usage);
- int trim_usage(const rgw_user& user, const string& bucket_name, uint64_t start_epoch, uint64_t end_epoch);
- int clear_usage();
+ int trim_usage(const DoutPrefixProvider *dpp, const rgw_user& user, const string& bucket_name, uint64_t start_epoch, uint64_t end_epoch);
+ int clear_usage(const DoutPrefixProvider *dpp);
- int create_pool(const rgw_pool& pool);
+ int create_pool(const DoutPrefixProvider *dpp, const rgw_pool& pool);
void create_bucket_id(string *bucket_id);
rgw_bucket *master_bucket,
uint32_t *master_num_shards,
optional_yield y,
+ const DoutPrefixProvider *dpp,
bool exclusive = true);
RGWCoroutinesManagerRegistry *get_cr_registry() { return cr_registry; }
RGWSI_RADOS::Obj bucket_obj;
explicit BucketShard(RGWRados *_store) : store(_store), shard_id(-1) {}
- int init(const rgw_bucket& _bucket, const rgw_obj& obj, RGWBucketInfo* out);
- int init(const rgw_bucket& _bucket, int sid, const rgw::bucket_index_layout_generation& idx_layout, RGWBucketInfo* out);
- int init(const RGWBucketInfo& bucket_info, const rgw_obj& obj);
- int init(const RGWBucketInfo& bucket_info, const rgw::bucket_index_layout_generation& idx_layout, int sid);
+ int init(const rgw_bucket& _bucket, const rgw_obj& obj, RGWBucketInfo* out, const DoutPrefixProvider *dpp);
+ int init(const rgw_bucket& _bucket, int sid, const rgw::bucket_index_layout_generation& idx_layout, RGWBucketInfo* out, const DoutPrefixProvider *dpp);
+ int init(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw_obj& obj);
+ int init(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw::bucket_index_layout_generation& idx_layout, int sid);
};
class Object {
bool bs_initialized;
protected:
- int get_state(RGWObjState **pstate, bool follow_olh, optional_yield y, bool assume_noent = false);
+ int get_state(const DoutPrefixProvider *dpp, RGWObjState **pstate, bool follow_olh, optional_yield y, bool assume_noent = false);
void invalidate_state();
- int prepare_atomic_modification(librados::ObjectWriteOperation& op, bool reset_obj, const string *ptag,
+ int prepare_atomic_modification(const DoutPrefixProvider *dpp, librados::ObjectWriteOperation& op, bool reset_obj, const string *ptag,
const char *ifmatch, const char *ifnomatch, bool removal_op, bool modify_tail, optional_yield y);
- int complete_atomic_modification();
+ int complete_atomic_modification(const DoutPrefixProvider *dpp);
public:
Object(RGWRados *_store, const RGWBucketInfo& _bucket_info, RGWObjectCtx& _ctx, const rgw_obj& _obj) : store(_store), bucket_info(_bucket_info),
rgw_obj& get_obj() { return obj; }
RGWObjectCtx& get_ctx() { return ctx; }
RGWBucketInfo& get_bucket_info() { return bucket_info; }
- int get_manifest(RGWObjManifest **pmanifest, optional_yield y);
+ int get_manifest(const DoutPrefixProvider *dpp, RGWObjManifest **pmanifest, optional_yield y);
- int get_bucket_shard(BucketShard **pbs) {
+ int get_bucket_shard(BucketShard **pbs, const DoutPrefixProvider *dpp) {
if (!bs_initialized) {
int r =
- bs.init(bucket_info.bucket, obj, nullptr /* no RGWBucketInfo */);
+ bs.init(bucket_info.bucket, obj, nullptr /* no RGWBucketInfo */, dpp);
if (r < 0) {
return r;
}
explicit Read(RGWRados::Object *_source) : source(_source) {}
- int prepare(optional_yield y);
+ int prepare(optional_yield y, const DoutPrefixProvider *dpp);
static int range_to_ofs(uint64_t obj_size, int64_t &ofs, int64_t &end);
- int read(int64_t ofs, int64_t end, bufferlist& bl, optional_yield y);
- int iterate(int64_t ofs, int64_t end, RGWGetDataCB *cb, optional_yield y);
- int get_attr(const char *name, bufferlist& dest, optional_yield y);
+ int read(int64_t ofs, int64_t end, bufferlist& bl, optional_yield y, const DoutPrefixProvider *dpp);
+ int iterate(const DoutPrefixProvider *dpp, int64_t ofs, int64_t end, RGWGetDataCB *cb, optional_yield y);
+ int get_attr(const DoutPrefixProvider *dpp, const char *name, bufferlist& dest, optional_yield y);
};
struct Write {
explicit Write(RGWRados::Object *_target) : target(_target) {}
- int _do_write_meta(uint64_t size, uint64_t accounted_size,
+ int _do_write_meta(const DoutPrefixProvider *dpp,
+ uint64_t size, uint64_t accounted_size,
map<std::string, bufferlist>& attrs,
bool modify_tail, bool assume_noent,
void *index_op, optional_yield y);
- int write_meta(uint64_t size, uint64_t accounted_size,
+ int write_meta(const DoutPrefixProvider *dpp, uint64_t size, uint64_t accounted_size,
map<std::string, bufferlist>& attrs, optional_yield y);
int write_data(const char *data, uint64_t ofs, uint64_t len, bool exclusive);
const req_state* get_req_state() {
struct DeleteParams {
rgw_user bucket_owner;
- int versioning_status;
- ACLOwner obj_owner; /* needed for creation of deletion marker */
+ int versioning_status; // versioning flags in enum RGWBucketFlags
+ ACLOwner obj_owner; // needed for creation of deletion marker
uint64_t olh_epoch;
string marker_version_id;
uint32_t bilog_flags;
explicit Delete(RGWRados::Object *_target) : target(_target) {}
- int delete_obj(optional_yield y);
+ int delete_obj(optional_yield y, const DoutPrefixProvider *dpp);
};
struct Stat {
explicit Stat(RGWRados::Object *_source) : source(_source) {}
- int stat_async();
+ int stat_async(const DoutPrefixProvider *dpp);
int wait();
int stat();
private:
rgw_bucket& get_bucket() { return bucket; }
RGWBucketInfo& get_bucket_info() { return bucket_info; }
- int update_bucket_id(const string& new_bucket_id);
+ int update_bucket_id(const string& new_bucket_id, const DoutPrefixProvider *dpp);
int get_shard_id() { return shard_id; }
void set_shard_id(int id) {
bool prepared{false};
rgw_zone_set *zones_trace{nullptr};
- int init_bs() {
+ int init_bs(const DoutPrefixProvider *dpp) {
int r =
- bs.init(target->get_bucket(), obj, nullptr /* no RGWBucketInfo */);
+ bs.init(target->get_bucket(), obj, nullptr /* no RGWBucketInfo */, dpp);
if (r < 0) {
return r;
}
bs_initialized = false;
}
- int guard_reshard(BucketShard **pbs, std::function<int(BucketShard *)> call);
+ int guard_reshard(const DoutPrefixProvider *dpp, BucketShard **pbs, std::function<int(BucketShard *)> call);
public:
UpdateIndex(RGWRados::Bucket *_target, const rgw_obj& _obj) : target(_target), obj(_obj),
blind = (target->get_bucket_info().layout.current_index.layout.type == rgw::BucketIndexType::Indexless);
}
- int get_bucket_shard(BucketShard **pbs) {
+ int get_bucket_shard(BucketShard **pbs, const DoutPrefixProvider *dpp) {
if (!bs_initialized) {
- int r = init_bs();
+ int r = init_bs(dpp);
if (r < 0) {
return r;
}
zones_trace = _zones_trace;
}
- int prepare(RGWModifyOp, const string *write_tag, optional_yield y);
- int complete(int64_t poolid, uint64_t epoch, uint64_t size,
+ int prepare(const DoutPrefixProvider *dpp, RGWModifyOp, const string *write_tag, optional_yield y);
+ int complete(const DoutPrefixProvider *dpp, int64_t poolid, uint64_t epoch, uint64_t size,
uint64_t accounted_size, ceph::real_time& ut,
const string& etag, const string& content_type,
const string& storage_class,
bufferlist *acl_bl, RGWObjCategory category,
list<rgw_obj_index_key> *remove_objs, const string *user_data = nullptr, bool appendable = false);
- int complete_del(int64_t poolid, uint64_t epoch,
+ int complete_del(const DoutPrefixProvider *dpp,
+ int64_t poolid, uint64_t epoch,
ceph::real_time& removed_mtime, /* mtime of removed object */
list<rgw_obj_index_key> *remove_objs);
- int cancel();
+ int cancel(const DoutPrefixProvider *dpp);
const string *get_optag() { return &optag; }
RGWRados::Bucket *target;
rgw_obj_key next_marker;
- int list_objects_ordered(int64_t max,
+ int list_objects_ordered(const DoutPrefixProvider *dpp,
+ int64_t max,
vector<rgw_bucket_dir_entry> *result,
map<string, bool> *common_prefixes,
bool *is_truncated,
optional_yield y);
- int list_objects_unordered(int64_t max,
+ int list_objects_unordered(const DoutPrefixProvider *dpp,
+ int64_t max,
vector<rgw_bucket_dir_entry> *result,
map<string, bool> *common_prefixes,
bool *is_truncated,
explicit List(RGWRados::Bucket *_target) : target(_target) {}
- int list_objects(int64_t max,
+ int list_objects(const DoutPrefixProvider *dpp, int64_t max,
vector<rgw_bucket_dir_entry> *result,
map<string, bool> *common_prefixes,
bool *is_truncated,
optional_yield y) {
if (params.allow_unordered) {
- return list_objects_unordered(max, result, common_prefixes,
+ return list_objects_unordered(dpp, max, result, common_prefixes,
is_truncated, y);
} else {
- return list_objects_ordered(max, result, common_prefixes,
+ return list_objects_ordered(dpp, max, result, common_prefixes,
is_truncated, y);
}
}
}; // class List
}; // class Bucket
- int on_last_entry_in_listing(RGWBucketInfo& bucket_info,
+ int on_last_entry_in_listing(const DoutPrefixProvider *dpp,
+ RGWBucketInfo& bucket_info,
const std::string& obj_prefix,
const std::string& obj_delim,
std::function<int(const rgw_bucket_dir_entry&)> handler);
rgw::sal::RGWObject* obj, /* in */
bool& restored, /* out */
const DoutPrefixProvider *dpp); /* in/out */
- int copy_obj_to_remote_dest(RGWObjState *astate,
+ int copy_obj_to_remote_dest(const DoutPrefixProvider *dpp,
+ RGWObjState *astate,
map<string, bufferlist>& src_attrs,
RGWRados::Object::Read& read_op,
const rgw_user& user_id,
int rewrite_obj(RGWBucketInfo& dest_bucket_info, rgw::sal::RGWObject* obj, const DoutPrefixProvider *dpp, optional_yield y);
- int stat_remote_obj(RGWObjectCtx& obj_ctx,
+ int stat_remote_obj(const DoutPrefixProvider *dpp,
+ RGWObjectCtx& obj_ctx,
const rgw_user& user_id,
req_info *info,
const rgw_zone_id& source_zone,
const DoutPrefixProvider *dpp,
optional_yield y);
- int check_bucket_empty(RGWBucketInfo& bucket_info, optional_yield y);
+ int check_bucket_empty(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info, optional_yield y);
/**
* Delete a bucket.
* bucket: the name of the bucket to delete
* Returns 0 on success, -ERR# otherwise.
*/
- int delete_bucket(RGWBucketInfo& bucket_info, RGWObjVersionTracker& objv_tracker, optional_yield y, bool check_empty = true);
+ int delete_bucket(RGWBucketInfo& bucket_info, RGWObjVersionTracker& objv_tracker, optional_yield y, const DoutPrefixProvider *dpp, bool check_empty = true);
void wakeup_meta_sync_shards(set<int>& shard_ids);
void wakeup_data_sync_shards(const rgw_zone_id& source_zone, map<int, set<string> >& shard_ids);
RGWMetaSyncStatusManager* get_meta_sync_manager();
RGWDataSyncStatusManager* get_data_sync_manager(const rgw_zone_id& source_zone);
- int set_bucket_owner(rgw_bucket& bucket, ACLOwner& owner);
- int set_buckets_enabled(std::vector<rgw_bucket>& buckets, bool enabled);
- int bucket_suspended(rgw_bucket& bucket, bool *suspended);
+ int set_bucket_owner(rgw_bucket& bucket, ACLOwner& owner, const DoutPrefixProvider *dpp);
+ int set_buckets_enabled(std::vector<rgw_bucket>& buckets, bool enabled, const DoutPrefixProvider *dpp);
+ int bucket_suspended(const DoutPrefixProvider *dpp, rgw_bucket& bucket, bool *suspended);
/** Delete an object.*/
- int delete_obj(RGWObjectCtx& obj_ctx,
+ int delete_obj(const DoutPrefixProvider *dpp,
+ RGWObjectCtx& obj_ctx,
const RGWBucketInfo& bucket_owner,
const rgw_obj& src_obj,
- int versioning_status,
+ int versioning_status, // versioning flags in enum RGWBucketFlags
uint16_t bilog_flags = 0,
const ceph::real_time& expiration_time = ceph::real_time(),
rgw_zone_set *zones_trace = nullptr);
- int delete_raw_obj(const rgw_raw_obj& obj);
+ int delete_raw_obj(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj);
/** Remove an object from the bucket index */
- int delete_obj_index(const rgw_obj& obj, ceph::real_time mtime);
+ int delete_obj_index(const rgw_obj& obj, ceph::real_time mtime, const DoutPrefixProvider *dpp);
/**
* Set an attr on an object.
* bl: the contents of the attr
* Returns: 0 on success, -ERR# otherwise.
*/
- int set_attr(void *ctx, const RGWBucketInfo& bucket_info, rgw_obj& obj, const char *name, bufferlist& bl);
+ int set_attr(const DoutPrefixProvider *dpp, void *ctx, const RGWBucketInfo& bucket_info, rgw_obj& obj, const char *name, bufferlist& bl);
- int set_attrs(void *ctx, const RGWBucketInfo& bucket_info, rgw_obj& obj,
+ int set_attrs(const DoutPrefixProvider *dpp, void *ctx, const RGWBucketInfo& bucket_info, rgw_obj& obj,
map<string, bufferlist>& attrs,
map<string, bufferlist>* rmattrs,
optional_yield y);
- int get_obj_state(RGWObjectCtx *rctx, const RGWBucketInfo& bucket_info, const rgw_obj& obj, RGWObjState **state,
+ int get_obj_state(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx, const RGWBucketInfo& bucket_info, const rgw_obj& obj, RGWObjState **state,
bool follow_olh, optional_yield y, bool assume_noent = false);
- int get_obj_state(RGWObjectCtx *rctx, const RGWBucketInfo& bucket_info, const rgw_obj& obj, RGWObjState **state, optional_yield y) {
- return get_obj_state(rctx, bucket_info, obj, state, true, y);
+ int get_obj_state(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx, const RGWBucketInfo& bucket_info, const rgw_obj& obj, RGWObjState **state, optional_yield y) {
+ return get_obj_state(dpp, rctx, bucket_info, obj, state, true, y);
}
- using iterate_obj_cb = int (*)(const rgw_raw_obj&, off_t, off_t,
+ using iterate_obj_cb = int (*)(const DoutPrefixProvider*, const rgw_raw_obj&, off_t, off_t,
off_t, bool, RGWObjState*, void*);
- int iterate_obj(RGWObjectCtx& ctx, const RGWBucketInfo& bucket_info,
+ int iterate_obj(const DoutPrefixProvider *dpp, RGWObjectCtx& ctx, const RGWBucketInfo& bucket_info,
const rgw_obj& obj, off_t ofs, off_t end,
uint64_t max_chunk_size, iterate_obj_cb cb, void *arg,
optional_yield y);
- int get_obj_iterate_cb(const rgw_raw_obj& read_obj, off_t obj_ofs,
+ int get_obj_iterate_cb(const DoutPrefixProvider *dpp,
+ const rgw_raw_obj& read_obj, off_t obj_ofs,
off_t read_ofs, off_t len, bool is_head_obj,
RGWObjState *astate, void *arg);
* a simple object read without keeping state
*/
- int raw_obj_stat(rgw_raw_obj& obj, uint64_t *psize, ceph::real_time *pmtime, uint64_t *epoch,
+ int raw_obj_stat(const DoutPrefixProvider *dpp,
+ rgw_raw_obj& obj, uint64_t *psize, ceph::real_time *pmtime, uint64_t *epoch,
map<string, bufferlist> *attrs, bufferlist *first_chunk,
RGWObjVersionTracker *objv_tracker, optional_yield y);
- int obj_operate(const RGWBucketInfo& bucket_info, const rgw_obj& obj, librados::ObjectWriteOperation *op);
- int obj_operate(const RGWBucketInfo& bucket_info, const rgw_obj& obj, librados::ObjectReadOperation *op);
+ int obj_operate(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw_obj& obj, librados::ObjectWriteOperation *op);
+ int obj_operate(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw_obj& obj, librados::ObjectReadOperation *op);
- int guard_reshard(BucketShard *bs,
+ int guard_reshard(const DoutPrefixProvider *dpp,
+ BucketShard *bs,
const rgw_obj& obj_instance,
const RGWBucketInfo& bucket_info,
std::function<int(BucketShard *)> call);
int block_while_resharding(RGWRados::BucketShard *bs,
string *new_bucket_id,
const RGWBucketInfo& bucket_info,
- optional_yield y);
-
- void bucket_index_guard_olh_op(RGWObjState& olh_state, librados::ObjectOperation& op);
- int olh_init_modification(const RGWBucketInfo& bucket_info, RGWObjState& state, const rgw_obj& olh_obj, string *op_tag);
- int olh_init_modification_impl(const RGWBucketInfo& bucket_info, RGWObjState& state, const rgw_obj& olh_obj, string *op_tag);
- int bucket_index_link_olh(const RGWBucketInfo& bucket_info, RGWObjState& olh_state,
+ optional_yield y,
+ const DoutPrefixProvider *dpp);
+
+ void bucket_index_guard_olh_op(const DoutPrefixProvider *dpp, RGWObjState& olh_state, librados::ObjectOperation& op);
+ int olh_init_modification(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, RGWObjState& state, const rgw_obj& olh_obj, string *op_tag);
+ int olh_init_modification_impl(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, RGWObjState& state, const rgw_obj& olh_obj, string *op_tag);
+ int bucket_index_link_olh(const DoutPrefixProvider *dpp,
+ const RGWBucketInfo& bucket_info, RGWObjState& olh_state,
const rgw_obj& obj_instance, bool delete_marker,
const string& op_tag, struct rgw_bucket_dir_entry_meta *meta,
uint64_t olh_epoch,
ceph::real_time unmod_since, bool high_precision_time,
rgw_zone_set *zones_trace = nullptr,
bool log_data_change = false);
- int bucket_index_unlink_instance(const RGWBucketInfo& bucket_info, const rgw_obj& obj_instance, const string& op_tag, const string& olh_tag, uint64_t olh_epoch, rgw_zone_set *zones_trace = nullptr);
- int bucket_index_read_olh_log(const RGWBucketInfo& bucket_info, RGWObjState& state, const rgw_obj& obj_instance, uint64_t ver_marker,
+ int bucket_index_unlink_instance(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw_obj& obj_instance, const string& op_tag, const string& olh_tag, uint64_t olh_epoch, rgw_zone_set *zones_trace = nullptr);
+ int bucket_index_read_olh_log(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, RGWObjState& state, const rgw_obj& obj_instance, uint64_t ver_marker,
map<uint64_t, vector<rgw_bucket_olh_log_entry> > *log, bool *is_truncated);
- int bucket_index_trim_olh_log(const RGWBucketInfo& bucket_info, RGWObjState& obj_state, const rgw_obj& obj_instance, uint64_t ver);
- int bucket_index_clear_olh(const RGWBucketInfo& bucket_info, RGWObjState& state, const rgw_obj& obj_instance);
- int apply_olh_log(RGWObjectCtx& ctx, RGWObjState& obj_state, const RGWBucketInfo& bucket_info, const rgw_obj& obj,
+ int bucket_index_trim_olh_log(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, RGWObjState& obj_state, const rgw_obj& obj_instance, uint64_t ver);
+ int bucket_index_clear_olh(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, RGWObjState& state, const rgw_obj& obj_instance);
+ int apply_olh_log(const DoutPrefixProvider *dpp, RGWObjectCtx& ctx, RGWObjState& obj_state, const RGWBucketInfo& bucket_info, const rgw_obj& obj,
bufferlist& obj_tag, map<uint64_t, vector<rgw_bucket_olh_log_entry> >& log,
uint64_t *plast_ver, rgw_zone_set *zones_trace = nullptr);
- int update_olh(RGWObjectCtx& obj_ctx, RGWObjState *state, const RGWBucketInfo& bucket_info, const rgw_obj& obj, rgw_zone_set *zones_trace = nullptr);
- int set_olh(RGWObjectCtx& obj_ctx, const RGWBucketInfo& bucket_info, const rgw_obj& target_obj, bool delete_marker, rgw_bucket_dir_entry_meta *meta,
+ int update_olh(const DoutPrefixProvider *dpp, RGWObjectCtx& obj_ctx, RGWObjState *state, const RGWBucketInfo& bucket_info, const rgw_obj& obj, rgw_zone_set *zones_trace = nullptr);
+ int set_olh(const DoutPrefixProvider *dpp, RGWObjectCtx& obj_ctx, const RGWBucketInfo& bucket_info, const rgw_obj& target_obj, bool delete_marker, rgw_bucket_dir_entry_meta *meta,
uint64_t olh_epoch, ceph::real_time unmod_since, bool high_precision_time,
optional_yield y, rgw_zone_set *zones_trace = nullptr, bool log_data_change = false);
- int repair_olh(RGWObjState* state, const RGWBucketInfo& bucket_info,
+ int repair_olh(const DoutPrefixProvider *dpp, RGWObjState* state, const RGWBucketInfo& bucket_info,
const rgw_obj& obj);
- int unlink_obj_instance(RGWObjectCtx& obj_ctx, RGWBucketInfo& bucket_info, const rgw_obj& target_obj,
+ int unlink_obj_instance(const DoutPrefixProvider *dpp, RGWObjectCtx& obj_ctx, RGWBucketInfo& bucket_info, const rgw_obj& target_obj,
uint64_t olh_epoch, optional_yield y, rgw_zone_set *zones_trace = nullptr);
void check_pending_olh_entries(map<string, bufferlist>& pending_entries, map<string, bufferlist> *rm_pending_entries);
- int remove_olh_pending_entries(const RGWBucketInfo& bucket_info, RGWObjState& state, const rgw_obj& olh_obj, map<string, bufferlist>& pending_attrs);
- int follow_olh(const RGWBucketInfo& bucket_info, RGWObjectCtx& ctx, RGWObjState *state, const rgw_obj& olh_obj, rgw_obj *target);
- int get_olh(const RGWBucketInfo& bucket_info, const rgw_obj& obj, RGWOLHInfo *olh);
+ int remove_olh_pending_entries(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, RGWObjState& state, const rgw_obj& olh_obj, map<string, bufferlist>& pending_attrs);
+ int follow_olh(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, RGWObjectCtx& ctx, RGWObjState *state, const rgw_obj& olh_obj, rgw_obj *target);
+ int get_olh(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw_obj& obj, RGWOLHInfo *olh);
void gen_rand_obj_instance_name(rgw_obj_key *target_key);
void gen_rand_obj_instance_name(rgw_obj *target);
- int update_containers_stats(map<string, RGWBucketEnt>& m);
- int append_async(rgw_raw_obj& obj, size_t size, bufferlist& bl);
+ int update_containers_stats(map<string, RGWBucketEnt>& m, const DoutPrefixProvider *dpp);
+ int append_async(const DoutPrefixProvider *dpp, rgw_raw_obj& obj, size_t size, bufferlist& bl);
public:
void set_atomic(void *ctx, rgw_obj& obj) {
rctx->set_prefetch_data(obj);
}
int decode_policy(bufferlist& bl, ACLOwner *owner);
- int get_bucket_stats(RGWBucketInfo& bucket_info, int shard_id, string *bucket_ver, string *master_ver,
+ int get_bucket_stats(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info, int shard_id, string *bucket_ver, string *master_ver,
map<RGWObjCategory, RGWStorageStats>& stats, string *max_marker, bool* syncstopped = NULL);
- int get_bucket_stats_async(RGWBucketInfo& bucket_info, int shard_id, RGWGetBucketStats_CB *cb);
+ int get_bucket_stats_async(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info, int shard_id, RGWGetBucketStats_CB *cb);
- int put_bucket_instance_info(RGWBucketInfo& info, bool exclusive, ceph::real_time mtime, map<string, bufferlist> *pattrs);
+ int put_bucket_instance_info(RGWBucketInfo& info, bool exclusive, ceph::real_time mtime, map<string, bufferlist> *pattrs, const DoutPrefixProvider *dpp);
/* xxx dang obj_ctx -> svc */
- int get_bucket_instance_info(RGWSysObjectCtx& obj_ctx, const string& meta_key, RGWBucketInfo& info, ceph::real_time *pmtime, map<string, bufferlist> *pattrs, optional_yield y);
- int get_bucket_instance_info(RGWSysObjectCtx& obj_ctx, const rgw_bucket& bucket, RGWBucketInfo& info, ceph::real_time *pmtime, map<string, bufferlist> *pattrs, optional_yield y);
+ int get_bucket_instance_info(RGWSysObjectCtx& obj_ctx, const string& meta_key, RGWBucketInfo& info, ceph::real_time *pmtime, map<string, bufferlist> *pattrs, optional_yield y, const DoutPrefixProvider *dpp);
+ int get_bucket_instance_info(RGWSysObjectCtx& obj_ctx, const rgw_bucket& bucket, RGWBucketInfo& info, ceph::real_time *pmtime, map<string, bufferlist> *pattrs, optional_yield y, const DoutPrefixProvider *dpp);
static void make_bucket_entry_name(const string& tenant_name, const string& bucket_name, string& bucket_entry);
int get_bucket_info(RGWServices *svc,
const string& tenant_name, const string& bucket_name,
RGWBucketInfo& info,
- ceph::real_time *pmtime, optional_yield y, map<string, bufferlist> *pattrs = NULL);
+ ceph::real_time *pmtime, optional_yield y,
+ const DoutPrefixProvider *dpp, map<string, bufferlist> *pattrs = NULL);
// Returns 0 on successful refresh. Returns error code if there was
// an error or the version stored on the OSD is the same as that
//
int try_refresh_bucket_info(RGWBucketInfo& info,
ceph::real_time *pmtime,
+ const DoutPrefixProvider *dpp,
map<string, bufferlist> *pattrs = nullptr);
int put_linked_bucket_info(RGWBucketInfo& info, bool exclusive, ceph::real_time mtime, obj_version *pep_objv,
- map<string, bufferlist> *pattrs, bool create_entry_point);
+ map<string, bufferlist> *pattrs, bool create_entry_point,
+ const DoutPrefixProvider *dpp);
- int cls_obj_prepare_op(BucketShard& bs, RGWModifyOp op, string& tag, rgw_obj& obj, uint16_t bilog_flags, optional_yield y, rgw_zone_set *zones_trace = nullptr);
+ int cls_obj_prepare_op(const DoutPrefixProvider *dpp, BucketShard& bs, RGWModifyOp op, string& tag, rgw_obj& obj, uint16_t bilog_flags, optional_yield y, rgw_zone_set *zones_trace = nullptr);
int cls_obj_complete_op(BucketShard& bs, const rgw_obj& obj, RGWModifyOp op, string& tag, int64_t pool, uint64_t epoch,
rgw_bucket_dir_entry& ent, RGWObjCategory category, list<rgw_obj_index_key> *remove_objs, uint16_t bilog_flags, rgw_zone_set *zones_trace = nullptr);
int cls_obj_complete_add(BucketShard& bs, const rgw_obj& obj, string& tag, int64_t pool, uint64_t epoch, rgw_bucket_dir_entry& ent,
int cls_obj_complete_del(BucketShard& bs, string& tag, int64_t pool, uint64_t epoch, rgw_obj& obj,
ceph::real_time& removed_mtime, list<rgw_obj_index_key> *remove_objs, uint16_t bilog_flags, rgw_zone_set *zones_trace = nullptr);
int cls_obj_complete_cancel(BucketShard& bs, string& tag, rgw_obj& obj, uint16_t bilog_flags, rgw_zone_set *zones_trace = nullptr);
- int cls_obj_set_bucket_tag_timeout(RGWBucketInfo& bucket_info, uint64_t timeout);
+ int cls_obj_set_bucket_tag_timeout(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info, uint64_t timeout);
using ent_map_t =
boost::container::flat_map<std::string, rgw_bucket_dir_entry>;
using check_filter_t = bool (*)(const std::string&);
- int cls_bucket_list_ordered(RGWBucketInfo& bucket_info,
+ int cls_bucket_list_ordered(const DoutPrefixProvider *dpp,
+ RGWBucketInfo& bucket_info,
const int shard_id,
const rgw_obj_index_key& start_after,
const string& prefix,
rgw_obj_index_key *last_entry,
optional_yield y,
check_filter_t force_check_filter = nullptr);
- int cls_bucket_list_unordered(RGWBucketInfo& bucket_info,
+ int cls_bucket_list_unordered(const DoutPrefixProvider *dpp,
+ RGWBucketInfo& bucket_info,
int shard_id,
const rgw_obj_index_key& start_after,
const string& prefix,
rgw_obj_index_key *last_entry,
optional_yield y,
check_filter_t = nullptr);
- int cls_bucket_head(const RGWBucketInfo& bucket_info, int shard_id, vector<rgw_bucket_dir_header>& headers, map<int, string> *bucket_instance_ids = NULL);
- int cls_bucket_head_async(const RGWBucketInfo& bucket_info, int shard_id, RGWGetDirHeader_CB *ctx, int *num_aio);
+ int cls_bucket_head(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, int shard_id, vector<rgw_bucket_dir_header>& headers, map<int, string> *bucket_instance_ids = NULL);
+ int cls_bucket_head_async(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, int shard_id, RGWGetDirHeader_CB *ctx, int *num_aio);
- int bi_get_instance(const RGWBucketInfo& bucket_info, const rgw_obj& obj, rgw_bucket_dir_entry *dirent);
- int bi_get_olh(const RGWBucketInfo& bucket_info, const rgw_obj& obj, rgw_bucket_olh_entry *olh);
- int bi_get(const RGWBucketInfo& bucket_info, const rgw_obj& obj, BIIndexType index_type, rgw_cls_bi_entry *entry);
+ int bi_get_instance(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw_obj& obj, rgw_bucket_dir_entry *dirent);
+ int bi_get_olh(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw_obj& obj, rgw_bucket_olh_entry *olh);
+ int bi_get(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw_obj& obj, BIIndexType index_type, rgw_cls_bi_entry *entry);
void bi_put(librados::ObjectWriteOperation& op, BucketShard& bs, rgw_cls_bi_entry& entry);
int bi_put(BucketShard& bs, rgw_cls_bi_entry& entry);
- int bi_put(rgw_bucket& bucket, rgw_obj& obj, rgw_cls_bi_entry& entry);
- int bi_list(const RGWBucketInfo& bucket_info, int shard_id, const string& filter_obj, const string& marker, uint32_t max, list<rgw_cls_bi_entry> *entries, bool *is_truncated);
+ int bi_put(const DoutPrefixProvider *dpp, rgw_bucket& bucket, rgw_obj& obj, rgw_cls_bi_entry& entry);
+ int bi_list(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, int shard_id, const string& filter_obj, const string& marker, uint32_t max, list<rgw_cls_bi_entry> *entries, bool *is_truncated);
int bi_list(BucketShard& bs, const string& filter_obj, const string& marker, uint32_t max, list<rgw_cls_bi_entry> *entries, bool *is_truncated);
- int bi_list(rgw_bucket& bucket, const string& obj_name, const string& marker, uint32_t max,
+ int bi_list(const DoutPrefixProvider *dpp, rgw_bucket& bucket, const string& obj_name, const string& marker, uint32_t max,
list<rgw_cls_bi_entry> *entries, bool *is_truncated);
int bi_remove(BucketShard& bs);
- int cls_obj_usage_log_add(const string& oid, rgw_usage_log_info& info);
- int cls_obj_usage_log_read(const string& oid, const string& user, const string& bucket, uint64_t start_epoch,
+ int cls_obj_usage_log_add(const DoutPrefixProvider *dpp, const string& oid, rgw_usage_log_info& info);
+ int cls_obj_usage_log_read(const DoutPrefixProvider *dpp, const string& oid, const string& user, const string& bucket, uint64_t start_epoch,
uint64_t end_epoch, uint32_t max_entries, string& read_iter, map<rgw_user_bucket,
rgw_usage_log_entry>& usage, bool *is_truncated);
- int cls_obj_usage_log_trim(const string& oid, const string& user, const string& bucket, uint64_t start_epoch,
+ int cls_obj_usage_log_trim(const DoutPrefixProvider *dpp, const string& oid, const string& user, const string& bucket, uint64_t start_epoch,
uint64_t end_epoch);
- int cls_obj_usage_log_clear(string& oid);
+ int cls_obj_usage_log_clear(const DoutPrefixProvider *dpp, string& oid);
int get_target_shard_id(const rgw::bucket_index_normal_layout& layout, const string& obj_key, int *shard_id);
int lock_exclusive(const rgw_pool& pool, const string& oid, ceph::timespan& duration, rgw_zone_id& zone_id, string& owner_id);
int unlock(const rgw_pool& pool, const string& oid, rgw_zone_id& zone_id, string& owner_id);
- void update_gc_chain(rgw_obj& head_obj, RGWObjManifest& manifest, cls_rgw_obj_chain *chain);
+ void update_gc_chain(const DoutPrefixProvider *dpp, rgw_obj& head_obj, RGWObjManifest& manifest, cls_rgw_obj_chain *chain);
int send_chain_to_gc(cls_rgw_obj_chain& chain, const string& tag);
- void delete_objs_inline(cls_rgw_obj_chain& chain, const string& tag);
- int gc_operate(string& oid, librados::ObjectWriteOperation *op);
+ void delete_objs_inline(const DoutPrefixProvider *dpp, cls_rgw_obj_chain& chain, const string& tag);
+ int gc_operate(const DoutPrefixProvider *dpp, string& oid, librados::ObjectWriteOperation *op);
int gc_aio_operate(const std::string& oid, librados::AioCompletion *c,
librados::ObjectWriteOperation *op);
- int gc_operate(string& oid, librados::ObjectReadOperation *op, bufferlist *pbl);
+ int gc_operate(const DoutPrefixProvider *dpp, string& oid, librados::ObjectReadOperation *op, bufferlist *pbl);
int list_gc_objs(int *index, string& marker, uint32_t max, bool expired_only, std::list<cls_rgw_gc_obj_info>& result, bool *truncated, bool& processing_queue);
int process_gc(bool expired_only);
- bool process_expire_objects();
- int defer_gc(void *ctx, const RGWBucketInfo& bucket_info, const rgw_obj& obj, optional_yield y);
+ bool process_expire_objects(const DoutPrefixProvider *dpp);
+ int defer_gc(const DoutPrefixProvider *dpp, void *ctx, const RGWBucketInfo& bucket_info, const rgw_obj& obj, optional_yield y);
int process_lc();
int list_lc_progress(string& marker, uint32_t max_entries,
vector<rgw::sal::Lifecycle::LCEntry>& progress_map, int& index);
- int bucket_check_index(RGWBucketInfo& bucket_info,
+ int bucket_check_index(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info,
map<RGWObjCategory, RGWStorageStats> *existing_stats,
map<RGWObjCategory, RGWStorageStats> *calculated_stats);
- int bucket_rebuild_index(RGWBucketInfo& bucket_info);
- int bucket_set_reshard(const RGWBucketInfo& bucket_info, const cls_rgw_bucket_instance_entry& entry);
- int remove_objs_from_index(RGWBucketInfo& bucket_info, list<rgw_obj_index_key>& oid_list);
- int move_rados_obj(librados::IoCtx& src_ioctx,
+ int bucket_rebuild_index(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info);
+ int bucket_set_reshard(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const cls_rgw_bucket_instance_entry& entry);
+ int remove_objs_from_index(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info, list<rgw_obj_index_key>& oid_list);
+ int move_rados_obj(const DoutPrefixProvider *dpp,
+ librados::IoCtx& src_ioctx,
const string& src_oid, const string& src_locator,
librados::IoCtx& dst_ioctx,
const string& dst_oid, const string& dst_locator);
- int fix_head_obj_locator(const RGWBucketInfo& bucket_info, bool copy_obj, bool remove_bad, rgw_obj_key& key);
- int fix_tail_obj_locator(const RGWBucketInfo& bucket_info, rgw_obj_key& key, bool fix, bool *need_fix, optional_yield y);
+ int fix_head_obj_locator(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, bool copy_obj, bool remove_bad, rgw_obj_key& key);
+ int fix_tail_obj_locator(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, rgw_obj_key& key, bool fix, bool *need_fix, optional_yield y);
int check_quota(const rgw_user& bucket_owner, rgw_bucket& bucket,
RGWQuotaInfo& user_quota, RGWQuotaInfo& bucket_quota, uint64_t obj_size,
optional_yield y, bool check_size_only = false);
int check_bucket_shards(const RGWBucketInfo& bucket_info, const rgw_bucket& bucket,
- uint64_t num_objs);
+ uint64_t num_objs, const DoutPrefixProvider *dpp);
- int add_bucket_to_reshard(const RGWBucketInfo& bucket_info, uint32_t new_num_shards);
+ int add_bucket_to_reshard(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, uint32_t new_num_shards);
uint64_t instance_id();
librados::Rados* get_rados_handle();
- int delete_raw_obj_aio(const rgw_raw_obj& obj, list<librados::AioCompletion *>& handles);
- int delete_obj_aio(const rgw_obj& obj, RGWBucketInfo& info, RGWObjState *astate,
+ int delete_raw_obj_aio(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, list<librados::AioCompletion *>& handles);
+ int delete_obj_aio(const DoutPrefixProvider *dpp, const rgw_obj& obj, RGWBucketInfo& info, RGWObjState *astate,
list<librados::AioCompletion *>& handles, bool keep_index_consistent,
optional_yield y);
* and -errno on other failures. (-ENOENT is not a failure, and it
* will encode that info as a suggested update.)
*/
- int check_disk_state(librados::IoCtx io_ctx,
+ int check_disk_state(const DoutPrefixProvider *dpp,
+ librados::IoCtx io_ctx,
const RGWBucketInfo& bucket_info,
rgw_bucket_dir_entry& list_state,
rgw_bucket_dir_entry& object,
* ctx: context object to use for the iteration
* Returns: 0 on success, -ERR# otherwise.
*/
- int pool_iterate_begin(const rgw_pool& pool, RGWPoolIterCtx& ctx);
+ int pool_iterate_begin(const DoutPrefixProvider *dpp, const rgw_pool& pool, RGWPoolIterCtx& ctx);
/**
* Init pool iteration
* ctx: context object to use for the iteration
* Returns: 0 on success, -ERR# otherwise.
*/
- int pool_iterate_begin(const rgw_pool& pool, const string& cursor, RGWPoolIterCtx& ctx);
+ int pool_iterate_begin(const DoutPrefixProvider *dpp, const rgw_pool& pool, const string& cursor, RGWPoolIterCtx& ctx);
/**
* Get pool iteration position
void RGWRealmReloader::reload()
{
CephContext *const cct = store->ctx();
- ldout(cct, 1) << "Pausing frontends for realm update..." << dendl;
+ const DoutPrefix dp(cct, dout_subsys, "rgw realm reloader: ");
+ ldpp_dout(&dp, 1) << "Pausing frontends for realm update..." << dendl;
frontends->pause();
- ldout(cct, 1) << "Frontends paused" << dendl;
+ ldpp_dout(&dp, 1) << "Frontends paused" << dendl;
// TODO: make RGWRados responsible for rgw_log_usage lifetime
rgw_log_usage_finalize();
RGWStoreManager::close_storage(store);
store = nullptr;
- ldout(cct, 1) << "Store closed" << dendl;
+ ldpp_dout(&dp, 1) << "Store closed" << dendl;
{
// allow a new notify to reschedule us. it's important that we do this
// before we start loading the new realm, or we could miss some updates
reload_scheduled = nullptr;
}
+
while (!store) {
// recreate and initialize a new store
store =
- RGWStoreManager::get_storage(cct,
+ RGWStoreManager::get_storage(&dp, cct,
cct->_conf->rgw_enable_gc_threads,
cct->_conf->rgw_enable_lc_threads,
cct->_conf->rgw_enable_quota_threads,
cct->_conf.get_val<bool>("rgw_dynamic_resharding"),
cct->_conf->rgw_cache_enabled);
- ldout(cct, 1) << "Creating new store" << dendl;
+ ldpp_dout(&dp, 1) << "Creating new store" << dendl;
rgw::sal::RGWRadosStore* store_cleanup = nullptr;
{
// sleep until we get another notification, and retry until we get
// a working configuration
if (store == nullptr) {
- lderr(cct) << "Failed to reinitialize RGWRados after a realm "
+ ldpp_dout(&dp, -1) << "Failed to reinitialize RGWRados after a realm "
"configuration update. Waiting for a new update." << dendl;
// sleep until another event is scheduled
}
if (store_cleanup) {
- ldout(cct, 4) << "Got another notification, restarting RGWRados "
+ ldpp_dout(&dp, 4) << "Got another notification, restarting RGWRados "
"initialization." << dendl;
RGWStoreManager::close_storage(store_cleanup);
int r = store->getRados()->register_to_service_map("rgw", service_map_meta);
if (r < 0) {
- lderr(cct) << "ERROR: failed to register to service map: " << cpp_strerror(-r) << dendl;
+ ldpp_dout(&dp, -1) << "ERROR: failed to register to service map: " << cpp_strerror(-r) << dendl;
/* ignore error */
}
- ldout(cct, 1) << "Finishing initialization of new store" << dendl;
+ ldpp_dout(&dp, 1) << "Finishing initialization of new store" << dendl;
// finish initializing the new store
- ldout(cct, 1) << " - REST subsystem init" << dendl;
+ ldpp_dout(&dp, 1) << " - REST subsystem init" << dendl;
rgw_rest_init(cct, store->svc()->zone->get_zonegroup());
- ldout(cct, 1) << " - usage subsystem init" << dendl;
+ ldpp_dout(&dp, 1) << " - usage subsystem init" << dendl;
rgw_log_usage_init(cct, store->getRados());
- ldout(cct, 1) << "Resuming frontends with new realm configuration." << dendl;
+ ldpp_dout(&dp, 1) << "Resuming frontends with new realm configuration." << dendl;
frontends->resume(store);
}
#define dout_prefix (*_dout << "rgw realm watcher: ")
-RGWRealmWatcher::RGWRealmWatcher(CephContext* cct, const RGWRealm& realm)
+RGWRealmWatcher::RGWRealmWatcher(const DoutPrefixProvider *dpp, CephContext* cct, const RGWRealm& realm)
: cct(cct)
{
// no default realm, nothing to watch
if (realm.get_id().empty()) {
- ldout(cct, 4) << "No realm, disabling dynamic reconfiguration." << dendl;
+ ldpp_dout(dpp, 4) << "No realm, disabling dynamic reconfiguration." << dendl;
return;
}
// establish the watch on RGWRealm
- int r = watch_start(realm);
+ int r = watch_start(dpp, realm);
if (r < 0) {
- lderr(cct) << "Failed to establish a watch on RGWRealm, "
+ ldpp_dout(dpp, -1) << "Failed to establish a watch on RGWRealm, "
"disabling dynamic reconfiguration." << dendl;
return;
}
watch_restart();
}
-int RGWRealmWatcher::watch_start(const RGWRealm& realm)
+int RGWRealmWatcher::watch_start(const DoutPrefixProvider *dpp, const RGWRealm& realm)
{
// initialize a Rados client
int r = rados.init_with_context(cct);
if (r < 0) {
- lderr(cct) << "Rados client initialization failed with "
+ ldpp_dout(dpp, -1) << "Rados client initialization failed with "
<< cpp_strerror(-r) << dendl;
return r;
}
r = rados.connect();
if (r < 0) {
- lderr(cct) << "Rados client connection failed with "
+ ldpp_dout(dpp, -1) << "Rados client connection failed with "
<< cpp_strerror(-r) << dendl;
return r;
}
// open an IoCtx for the realm's pool
rgw_pool pool(realm.get_pool(cct));
- r = rgw_init_ioctx(&rados, pool, pool_ctx);
+ r = rgw_init_ioctx(dpp, &rados, pool, pool_ctx);
if (r < 0) {
- lderr(cct) << "Failed to open pool " << pool
+ ldpp_dout(dpp, -1) << "Failed to open pool " << pool
<< " with " << cpp_strerror(-r) << dendl;
rados.shutdown();
return r;
auto oid = realm.get_control_oid();
r = pool_ctx.watch2(oid, &watch_handle, this);
if (r < 0) {
- lderr(cct) << "Failed to watch " << oid
+ ldpp_dout(dpp, -1) << "Failed to watch " << oid
<< " with " << cpp_strerror(-r) << dendl;
pool_ctx.close();
rados.shutdown();
return r;
}
- ldout(cct, 10) << "Watching " << oid << dendl;
+ ldpp_dout(dpp, 10) << "Watching " << oid << dendl;
std::swap(watch_oid, oid);
return 0;
}
bufferlist::const_iterator& p) = 0;
};
- RGWRealmWatcher(CephContext* cct, const RGWRealm& realm);
+ RGWRealmWatcher(const DoutPrefixProvider *dpp, CephContext* cct, const RGWRealm& realm);
~RGWRealmWatcher() override;
/// register a watcher for the given notification type
uint64_t watch_handle = 0;
std::string watch_oid;
- int watch_start(const RGWRealm& realm);
+ int watch_start(const DoutPrefixProvider *dpp, const RGWRealm& realm);
int watch_restart();
void watch_stop();
}
public:
- BucketReshardShard(rgw::sal::RGWRadosStore *_store, const RGWBucketInfo& _bucket_info,
+ BucketReshardShard(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *_store, const RGWBucketInfo& _bucket_info,
int _num_shard, const rgw::bucket_index_layout_generation& _idx_layout,
deque<librados::AioCompletion *>& _completions) :
store(_store), bucket_info(_bucket_info), idx_layout(_idx_layout), bs(store->getRados()),
{
num_shard = (idx_layout.layout.normal.num_shards > 0 ? _num_shard : -1);
- bs.init(bucket_info.bucket, num_shard, idx_layout, nullptr /* no RGWBucketInfo */);
+ bs.init(bucket_info.bucket, num_shard, idx_layout, nullptr /* no RGWBucketInfo */, dpp);
max_aio_completions =
store->ctx()->_conf.get_val<uint64_t>("rgw_reshard_max_aio");
vector<BucketReshardShard *> target_shards;
public:
- BucketReshardManager(rgw::sal::RGWRadosStore *_store,
+ BucketReshardManager(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *_store,
const RGWBucketInfo& _target_bucket_info,
int _num_target_shards) :
store(_store), target_bucket_info(_target_bucket_info),
const auto& idx_layout = target_bucket_info.layout.current_index;
target_shards.resize(num_target_shards);
for (int i = 0; i < num_target_shards; ++i) {
- target_shards[i] = new BucketReshardShard(store, target_bucket_info, i, idx_layout, completions);
+ target_shards[i] = new BucketReshardShard(dpp, store, target_bucket_info, i, idx_layout, completions);
}
}
outer_reshard_lock(_outer_reshard_lock)
{ }
-int RGWBucketReshard::set_resharding_status(rgw::sal::RGWRadosStore* store,
+int RGWBucketReshard::set_resharding_status(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore* store,
const RGWBucketInfo& bucket_info,
const string& new_instance_id,
int32_t num_shards,
cls_rgw_reshard_status status)
{
if (new_instance_id.empty()) {
- ldout(store->ctx(), 0) << __func__ << " missing new bucket instance id" << dendl;
+ ldpp_dout(dpp, 0) << __func__ << " missing new bucket instance id" << dendl;
return -EINVAL;
}
cls_rgw_bucket_instance_entry instance_entry;
instance_entry.set_status(new_instance_id, num_shards, status);
- int ret = store->getRados()->bucket_set_reshard(bucket_info, instance_entry);
+ int ret = store->getRados()->bucket_set_reshard(dpp, bucket_info, instance_entry);
if (ret < 0) {
- ldout(store->ctx(), 0) << "RGWReshard::" << __func__ << " ERROR: error setting bucket resharding flag on bucket index: "
+ ldpp_dout(dpp, 0) << "RGWReshard::" << __func__ << " ERROR: error setting bucket resharding flag on bucket index: "
<< cpp_strerror(-ret) << dendl;
return ret;
}
}
// reshard lock assumes lock is held
-int RGWBucketReshard::clear_resharding(rgw::sal::RGWRadosStore* store,
+int RGWBucketReshard::clear_resharding(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore* store,
const RGWBucketInfo& bucket_info)
{
- int ret = clear_index_shard_reshard_status(store, bucket_info);
+ int ret = clear_index_shard_reshard_status(dpp, store, bucket_info);
if (ret < 0) {
- ldout(store->ctx(), 0) << "RGWBucketReshard::" << __func__ <<
+ ldpp_dout(dpp, 0) << "RGWBucketReshard::" << __func__ <<
" ERROR: error clearing reshard status from index shard " <<
cpp_strerror(-ret) << dendl;
return ret;
}
cls_rgw_bucket_instance_entry instance_entry;
- ret = store->getRados()->bucket_set_reshard(bucket_info, instance_entry);
+ ret = store->getRados()->bucket_set_reshard(dpp, bucket_info, instance_entry);
if (ret < 0) {
- ldout(store->ctx(), 0) << "RGWReshard::" << __func__ <<
+ ldpp_dout(dpp, 0) << "RGWReshard::" << __func__ <<
" ERROR: error setting bucket resharding flag on bucket index: " <<
cpp_strerror(-ret) << dendl;
return ret;
return 0;
}
-int RGWBucketReshard::clear_index_shard_reshard_status(rgw::sal::RGWRadosStore* store,
+int RGWBucketReshard::clear_index_shard_reshard_status(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore* store,
const RGWBucketInfo& bucket_info)
{
uint32_t num_shards = bucket_info.layout.current_index.layout.normal.num_shards;
if (num_shards < std::numeric_limits<uint32_t>::max()) {
- int ret = set_resharding_status(store, bucket_info,
+ int ret = set_resharding_status(dpp, store, bucket_info,
bucket_info.bucket.bucket_id,
(num_shards < 1 ? 1 : num_shards),
cls_rgw_reshard_status::NOT_RESHARDING);
if (ret < 0) {
- ldout(store->ctx(), 0) << "RGWBucketReshard::" << __func__ <<
+ ldpp_dout(dpp, 0) << "RGWBucketReshard::" << __func__ <<
" ERROR: error clearing reshard status from index shard " <<
cpp_strerror(-ret) << dendl;
return ret;
int new_num_shards,
const RGWBucketInfo& bucket_info,
map<string, bufferlist>& attrs,
- RGWBucketInfo& new_bucket_info)
+ RGWBucketInfo& new_bucket_info,
+ const DoutPrefixProvider *dpp)
{
new_bucket_info = bucket_info;
new_bucket_info.new_bucket_instance_id.clear();
new_bucket_info.reshard_status = cls_rgw_reshard_status::NOT_RESHARDING;
- int ret = store->svc()->bi->init_index(new_bucket_info);
+ int ret = store->svc()->bi->init_index(dpp, new_bucket_info);
if (ret < 0) {
cerr << "ERROR: failed to init new bucket indexes: " << cpp_strerror(-ret) << std::endl;
return ret;
}
- ret = store->getRados()->put_bucket_instance_info(new_bucket_info, true, real_time(), &attrs);
+ ret = store->getRados()->put_bucket_instance_info(new_bucket_info, true, real_time(), &attrs, dpp);
if (ret < 0) {
cerr << "ERROR: failed to store new bucket instance info: " << cpp_strerror(-ret) << std::endl;
return ret;
}
int RGWBucketReshard::create_new_bucket_instance(int new_num_shards,
- RGWBucketInfo& new_bucket_info)
+ RGWBucketInfo& new_bucket_info,
+ const DoutPrefixProvider *dpp)
{
return ::create_new_bucket_instance(store, new_num_shards,
- bucket_info, bucket_attrs, new_bucket_info);
+ bucket_info, bucket_attrs, new_bucket_info, dpp);
}
-int RGWBucketReshard::cancel()
+int RGWBucketReshard::cancel(const DoutPrefixProvider *dpp)
{
int ret = reshard_lock.lock();
if (ret < 0) {
return ret;
}
- ret = clear_resharding();
+ ret = clear_resharding(dpp);
reshard_lock.unlock();
return ret;
class BucketInfoReshardUpdate
{
+ const DoutPrefixProvider *dpp;
rgw::sal::RGWRadosStore *store;
RGWBucketInfo& bucket_info;
std::map<string, bufferlist> bucket_attrs;
bool in_progress{false};
- int set_status(cls_rgw_reshard_status s) {
+ int set_status(cls_rgw_reshard_status s, const DoutPrefixProvider *dpp) {
bucket_info.reshard_status = s;
- int ret = store->getRados()->put_bucket_instance_info(bucket_info, false, real_time(), &bucket_attrs);
+ int ret = store->getRados()->put_bucket_instance_info(bucket_info, false, real_time(), &bucket_attrs, dpp);
if (ret < 0) {
- ldout(store->ctx(), 0) << "ERROR: failed to write bucket info, ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to write bucket info, ret=" << ret << dendl;
return ret;
}
return 0;
}
public:
- BucketInfoReshardUpdate(rgw::sal::RGWRadosStore *_store,
+ BucketInfoReshardUpdate(const DoutPrefixProvider *_dpp,
+ rgw::sal::RGWRadosStore *_store,
RGWBucketInfo& _bucket_info,
map<string, bufferlist>& _bucket_attrs,
const string& new_bucket_id) :
+ dpp(_dpp),
store(_store),
bucket_info(_bucket_info),
bucket_attrs(_bucket_attrs)
if (in_progress) {
// resharding must not have ended correctly, clean up
int ret =
- RGWBucketReshard::clear_index_shard_reshard_status(store, bucket_info);
+ RGWBucketReshard::clear_index_shard_reshard_status(dpp, store, bucket_info);
if (ret < 0) {
- lderr(store->ctx()) << "Error: " << __func__ <<
+ ldpp_dout(dpp, -1) << "Error: " << __func__ <<
" clear_index_shard_status returned " << ret << dendl;
}
bucket_info.new_bucket_instance_id.clear();
// clears new_bucket_instance as well
- set_status(cls_rgw_reshard_status::NOT_RESHARDING);
+ set_status(cls_rgw_reshard_status::NOT_RESHARDING, dpp);
}
}
int start() {
- int ret = set_status(cls_rgw_reshard_status::IN_PROGRESS);
+ int ret = set_status(cls_rgw_reshard_status::IN_PROGRESS, dpp);
if (ret < 0) {
return ret;
}
}
int complete() {
- int ret = set_status(cls_rgw_reshard_status::DONE);
+ int ret = set_status(cls_rgw_reshard_status::DONE, dpp);
if (ret < 0) {
return ret;
}
int max_entries,
bool verbose,
ostream *out,
- Formatter *formatter)
+ Formatter *formatter,
+ const DoutPrefixProvider *dpp)
{
if (out) {
const rgw_bucket& bucket = bucket_info.bucket;
list<rgw_cls_bi_entry> entries;
if (max_entries < 0) {
- ldout(store->ctx(), 0) << __func__ <<
+ ldpp_dout(dpp, 0) << __func__ <<
": can't reshard, negative max_entries" << dendl;
return -EINVAL;
}
// NB: destructor cleans up sharding state if reshard does not
// complete successfully
- BucketInfoReshardUpdate bucket_info_updater(store, bucket_info, bucket_attrs, new_bucket_info.bucket.bucket_id);
+ BucketInfoReshardUpdate bucket_info_updater(dpp, store, bucket_info, bucket_attrs, new_bucket_info.bucket.bucket_id);
int ret = bucket_info_updater.start();
if (ret < 0) {
- ldout(store->ctx(), 0) << __func__ << ": failed to update bucket info ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << __func__ << ": failed to update bucket info ret=" << ret << dendl;
return ret;
}
int num_target_shards = (new_bucket_info.layout.current_index.layout.normal.num_shards > 0 ? new_bucket_info.layout.current_index.layout.normal.num_shards : 1);
- BucketReshardManager target_shards_mgr(store, new_bucket_info, num_target_shards);
+ BucketReshardManager target_shards_mgr(dpp, store, new_bucket_info, num_target_shards);
bool verbose_json_out = verbose && (formatter != nullptr) && (out != nullptr);
marker.clear();
while (is_truncated) {
entries.clear();
- ret = store->getRados()->bi_list(bucket_info, i, string(), marker, max_entries, &entries, &is_truncated);
+ ret = store->getRados()->bi_list(dpp, bucket_info, i, string(), marker, max_entries, &entries, &is_truncated);
if (ret < 0 && ret != -ENOENT) {
derr << "ERROR: bi_list(): " << cpp_strerror(-ret) << dendl;
return ret;
}
int ret = store->getRados()->get_target_shard_id(new_bucket_info.layout.current_index.layout.normal, obj.get_hash_object(), &target_shard_id);
if (ret < 0) {
- lderr(store->ctx()) << "ERROR: get_target_shard_id() returned ret=" << ret << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: get_target_shard_id() returned ret=" << ret << dendl;
return ret;
}
}
ret = reshard_lock.renew(now);
if (ret < 0) {
- lderr(store->ctx()) << "Error renewing bucket lock: " << ret << dendl;
+ ldpp_dout(dpp, -1) << "Error renewing bucket lock: " << ret << dendl;
return ret;
}
}
ret = target_shards_mgr.finish();
if (ret < 0) {
- lderr(store->ctx()) << "ERROR: failed to reshard" << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: failed to reshard" << dendl;
return -EIO;
}
- ret = store->ctl()->bucket->link_bucket(new_bucket_info.owner, new_bucket_info.bucket, bucket_info.creation_time, null_yield);
+ ret = store->ctl()->bucket->link_bucket(new_bucket_info.owner, new_bucket_info.bucket, bucket_info.creation_time, null_yield, dpp);
if (ret < 0) {
- lderr(store->ctx()) << "failed to link new bucket instance (bucket_id=" << new_bucket_info.bucket.bucket_id << ": " << cpp_strerror(-ret) << ")" << dendl;
+ ldpp_dout(dpp, -1) << "failed to link new bucket instance (bucket_id=" << new_bucket_info.bucket.bucket_id << ": " << cpp_strerror(-ret) << ")" << dendl;
return ret;
}
ret = bucket_info_updater.complete();
if (ret < 0) {
- ldout(store->ctx(), 0) << __func__ << ": failed to update bucket info ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << __func__ << ": failed to update bucket info ret=" << ret << dendl;
/* don't error out, reshard process succeeded */
}
// NB: some error clean-up is done by ~BucketInfoReshardUpdate
} // RGWBucketReshard::do_reshard
-int RGWBucketReshard::get_status(list<cls_rgw_bucket_instance_entry> *status)
+int RGWBucketReshard::get_status(const DoutPrefixProvider *dpp, list<cls_rgw_bucket_instance_entry> *status)
{
- return store->svc()->bi_rados->get_reshard_status(bucket_info, status);
+ return store->svc()->bi_rados->get_reshard_status(dpp, bucket_info, status);
}
int RGWBucketReshard::execute(int num_shards, int max_op_entries,
+ const DoutPrefixProvider *dpp,
bool verbose, ostream *out, Formatter *formatter,
RGWReshard* reshard_log)
{
}
RGWBucketInfo new_bucket_info;
- ret = create_new_bucket_instance(num_shards, new_bucket_info);
+ ret = create_new_bucket_instance(num_shards, new_bucket_info, dpp);
if (ret < 0) {
// shard state is uncertain, but this will attempt to remove them anyway
goto error_out;
}
if (reshard_log) {
- ret = reshard_log->update(bucket_info, new_bucket_info);
+ ret = reshard_log->update(dpp, bucket_info, new_bucket_info);
if (ret < 0) {
goto error_out;
}
// set resharding status of current bucket_info & shards with
// information about planned resharding
- ret = set_resharding_status(new_bucket_info.bucket.bucket_id,
+ ret = set_resharding_status(dpp, new_bucket_info.bucket.bucket_id,
num_shards, cls_rgw_reshard_status::IN_PROGRESS);
if (ret < 0) {
goto error_out;
ret = do_reshard(num_shards,
new_bucket_info,
max_op_entries,
- verbose, out, formatter);
+ verbose, out, formatter, dpp);
if (ret < 0) {
goto error_out;
}
// best effort and don't report out an error; the lock isn't needed
// at this point since all we're using a best effor to to remove old
// shard objects
- ret = store->svc()->bi->clean_index(bucket_info);
+ ret = store->svc()->bi->clean_index(dpp, bucket_info);
if (ret < 0) {
- lderr(store->ctx()) << "Error: " << __func__ <<
+ ldpp_dout(dpp, -1) << "Error: " << __func__ <<
" failed to clean up old shards; " <<
"RGWRados::clean_bucket_index returned " << ret << dendl;
}
ret = store->ctl()->bucket->remove_bucket_instance_info(bucket_info.bucket,
- bucket_info, null_yield);
+ bucket_info, null_yield, dpp);
if (ret < 0) {
- lderr(store->ctx()) << "Error: " << __func__ <<
+ ldpp_dout(dpp, -1) << "Error: " << __func__ <<
" failed to clean old bucket info object \"" <<
bucket_info.bucket.get_key() <<
"\"created after successful resharding with error " << ret << dendl;
}
- ldout(store->ctx(), 1) << __func__ <<
+ ldpp_dout(dpp, 1) << __func__ <<
" INFO: reshard of bucket \"" << bucket_info.bucket.name << "\" from \"" <<
bucket_info.bucket.get_key() << "\" to \"" <<
new_bucket_info.bucket.get_key() << "\" completed successfully" << dendl;
// since the real problem is the issue that led to this error code
// path, we won't touch ret and instead use another variable to
// temporarily error codes
- int ret2 = store->svc()->bi->clean_index(new_bucket_info);
+ int ret2 = store->svc()->bi->clean_index(dpp, new_bucket_info);
if (ret2 < 0) {
- lderr(store->ctx()) << "Error: " << __func__ <<
+ ldpp_dout(dpp, -1) << "Error: " << __func__ <<
" failed to clean up shards from failed incomplete resharding; " <<
"RGWRados::clean_bucket_index returned " << ret2 << dendl;
}
ret2 = store->ctl()->bucket->remove_bucket_instance_info(new_bucket_info.bucket,
new_bucket_info,
- null_yield);
+ null_yield, dpp);
if (ret2 < 0) {
- lderr(store->ctx()) << "Error: " << __func__ <<
+ ldpp_dout(dpp, -1) << "Error: " << __func__ <<
" failed to clean bucket info object \"" <<
new_bucket_info.bucket.get_key() <<
"\"created during incomplete resharding with error " << ret2 << dendl;
get_logshard_oid(int(sid), oid);
}
-int RGWReshard::add(cls_rgw_reshard_entry& entry)
+int RGWReshard::add(const DoutPrefixProvider *dpp, cls_rgw_reshard_entry& entry)
{
if (!store->svc()->zone->can_reshard()) {
- ldout(store->ctx(), 20) << __func__ << " Resharding is disabled" << dendl;
+ ldpp_dout(dpp, 20) << __func__ << " Resharding is disabled" << dendl;
return 0;
}
librados::ObjectWriteOperation op;
cls_rgw_reshard_add(op, entry);
- int ret = rgw_rados_operate(store->getRados()->reshard_pool_ctx, logshard_oid, &op, null_yield);
+ int ret = rgw_rados_operate(dpp, store->getRados()->reshard_pool_ctx, logshard_oid, &op, null_yield);
if (ret < 0) {
- lderr(store->ctx()) << "ERROR: failed to add entry to reshard log, oid=" << logshard_oid << " tenant=" << entry.tenant << " bucket=" << entry.bucket_name << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: failed to add entry to reshard log, oid=" << logshard_oid << " tenant=" << entry.tenant << " bucket=" << entry.bucket_name << dendl;
return ret;
}
return 0;
}
-int RGWReshard::update(const RGWBucketInfo& bucket_info, const RGWBucketInfo& new_bucket_info)
+int RGWReshard::update(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const RGWBucketInfo& new_bucket_info)
{
cls_rgw_reshard_entry entry;
entry.bucket_name = bucket_info.bucket.name;
entry.new_instance_id = new_bucket_info.bucket.name + ":" + new_bucket_info.bucket.bucket_id;
- ret = add(entry);
+ ret = add(dpp, entry);
if (ret < 0) {
- ldout(store->ctx(), 0) << __func__ << ":Error in updating entry bucket " << entry.bucket_name << ": " <<
+ ldpp_dout(dpp, 0) << __func__ << ":Error in updating entry bucket " << entry.bucket_name << ": " <<
cpp_strerror(-ret) << dendl;
}
return 0;
}
-int RGWReshard::remove(cls_rgw_reshard_entry& entry)
+int RGWReshard::remove(const DoutPrefixProvider *dpp, cls_rgw_reshard_entry& entry)
{
string logshard_oid;
librados::ObjectWriteOperation op;
cls_rgw_reshard_remove(op, entry);
- int ret = rgw_rados_operate(store->getRados()->reshard_pool_ctx, logshard_oid, &op, null_yield);
+ int ret = rgw_rados_operate(dpp, store->getRados()->reshard_pool_ctx, logshard_oid, &op, null_yield);
if (ret < 0) {
- lderr(store->ctx()) << "ERROR: failed to remove entry from reshard log, oid=" << logshard_oid << " tenant=" << entry.tenant << " bucket=" << entry.bucket_name << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: failed to remove entry from reshard log, oid=" << logshard_oid << " tenant=" << entry.tenant << " bucket=" << entry.bucket_name << dendl;
return ret;
}
}
}
-int RGWReshard::process_single_logshard(int logshard_num)
+int RGWReshard::process_single_logshard(int logshard_num, const DoutPrefixProvider *dpp)
{
string marker;
bool truncated = true;
- CephContext *cct = store->ctx();
constexpr uint32_t max_entries = 1000;
string logshard_oid;
int ret = logshard_lock.lock();
if (ret < 0) {
- ldout(store->ctx(), 5) << __func__ << "(): failed to acquire lock on " <<
+ ldpp_dout(dpp, 5) << __func__ << "(): failed to acquire lock on " <<
logshard_oid << ", ret = " << ret <<dendl;
return ret;
}
std::list<cls_rgw_reshard_entry> entries;
ret = list(logshard_num, marker, max_entries, entries, &truncated);
if (ret < 0) {
- ldout(cct, 10) << "cannot list all reshards in logshard oid=" <<
+ ldpp_dout(dpp, 10) << "cannot list all reshards in logshard oid=" <<
logshard_oid << dendl;
continue;
}
for(auto& entry: entries) { // logshard entries
if(entry.new_instance_id.empty()) {
- ldout(store->ctx(), 20) << __func__ << " resharding " <<
+ ldpp_dout(dpp, 20) << __func__ << " resharding " <<
entry.bucket_name << dendl;
rgw_bucket bucket;
ret = store->getRados()->get_bucket_info(store->svc(),
entry.tenant, entry.bucket_name,
bucket_info, nullptr,
- null_yield, &attrs);
+ null_yield, dpp, &attrs);
if (ret < 0 || bucket_info.bucket.bucket_id != entry.bucket_id) {
if (ret < 0) {
- ldout(cct, 0) << __func__ <<
+ ldpp_dout(dpp, 0) << __func__ <<
": Error in get_bucket_info for bucket " << entry.bucket_name <<
": " << cpp_strerror(-ret) << dendl;
if (ret != -ENOENT) {
return ret;
}
} else {
- ldout(cct,0) << __func__ <<
+ ldpp_dout(dpp, 0) << __func__ <<
": Bucket: " << entry.bucket_name <<
" already resharded by someone, skipping " << dendl;
}
// we've encountered a reshard queue entry for an apparently
// non-existent bucket; let's try to recover by cleaning up
- ldout(cct, 0) << __func__ <<
+ ldpp_dout(dpp, 0) << __func__ <<
": removing reshard queue entry for a resharded or non-existent bucket" <<
entry.bucket_name << dendl;
- ret = remove(entry);
+ ret = remove(dpp, entry);
if (ret < 0) {
- ldout(cct, 0) << __func__ <<
+ ldpp_dout(dpp, 0) << __func__ <<
": Error removing non-existent bucket " <<
entry.bucket_name << " from resharding queue: " <<
cpp_strerror(-ret) << dendl;
}
RGWBucketReshard br(store, bucket_info, attrs, nullptr);
- ret = br.execute(entry.new_num_shards, max_entries, false, nullptr,
+ ret = br.execute(entry.new_num_shards, max_entries, dpp, false, nullptr,
nullptr, this);
if (ret < 0) {
- ldout(store->ctx(), 0) << __func__ <<
+ ldpp_dout(dpp, 0) << __func__ <<
": Error during resharding bucket " << entry.bucket_name << ":" <<
cpp_strerror(-ret)<< dendl;
return ret;
}
- ldout(store->ctx(), 20) << __func__ <<
+ ldpp_dout(dpp, 20) << __func__ <<
" removing reshard queue entry for bucket " << entry.bucket_name <<
dendl;
- ret = remove(entry);
+ ret = remove(dpp, entry);
if (ret < 0) {
- ldout(cct, 0) << __func__ << ": Error removing bucket " <<
+ ldpp_dout(dpp, 0) << __func__ << ": Error removing bucket " <<
entry.bucket_name << " from resharding queue: " <<
cpp_strerror(-ret) << dendl;
return ret;
*logshard = objname + buf;
}
-int RGWReshard::process_all_logshards()
+int RGWReshard::process_all_logshards(const DoutPrefixProvider *dpp)
{
if (!store->svc()->zone->can_reshard()) {
- ldout(store->ctx(), 20) << __func__ << " Resharding is disabled" << dendl;
+ ldpp_dout(dpp, 20) << __func__ << " Resharding is disabled" << dendl;
return 0;
}
int ret = 0;
string logshard;
get_logshard_oid(i, &logshard);
- ldout(store->ctx(), 20) << "processing logshard = " << logshard << dendl;
+ ldpp_dout(dpp, 20) << "processing logshard = " << logshard << dendl;
- ret = process_single_logshard(i);
+ ret = process_single_logshard(i, dpp);
- ldout(store->ctx(), 20) << "finish processing logshard = " << logshard << " , ret = " << ret << dendl;
+ ldpp_dout(dpp, 20) << "finish processing logshard = " << logshard << " , ret = " << ret << dendl;
}
return 0;
void *RGWReshard::ReshardWorker::entry() {
do {
utime_t start = ceph_clock_now();
- reshard->process_all_logshards();
+ reshard->process_all_logshards(this);
if (reshard->going_down())
break;
std::lock_guard l{lock};
cond.notify_all();
}
+
+CephContext *RGWReshard::ReshardWorker::get_cct() const
+{
+ return cct;
+}
+
+unsigned RGWReshard::ReshardWorker::get_subsys() const
+{
+ return dout_subsys;
+}
+
+std::ostream& RGWReshard::ReshardWorker::gen_prefix(std::ostream& out) const
+{
+ return out << "rgw reshard worker thread: ";
+}
static const std::initializer_list<uint16_t> reshard_primes;
int create_new_bucket_instance(int new_num_shards,
- RGWBucketInfo& new_bucket_info);
+ RGWBucketInfo& new_bucket_info,
+ const DoutPrefixProvider *dpp);
int do_reshard(int num_shards,
RGWBucketInfo& new_bucket_info,
int max_entries,
bool verbose,
ostream *os,
- Formatter *formatter);
+ Formatter *formatter,
+ const DoutPrefixProvider *dpp);
public:
// pass nullptr for the final parameter if no outer reshard lock to
const std::map<string, bufferlist>& _bucket_attrs,
RGWBucketReshardLock* _outer_reshard_lock);
int execute(int num_shards, int max_op_entries,
+ const DoutPrefixProvider *dpp,
bool verbose = false, ostream *out = nullptr,
Formatter *formatter = nullptr,
RGWReshard *reshard_log = nullptr);
- int get_status(std::list<cls_rgw_bucket_instance_entry> *status);
- int cancel();
- static int clear_resharding(rgw::sal::RGWRadosStore* store,
+ int get_status(const DoutPrefixProvider *dpp, std::list<cls_rgw_bucket_instance_entry> *status);
+ int cancel(const DoutPrefixProvider *dpp);
+ static int clear_resharding(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore* store,
const RGWBucketInfo& bucket_info);
- int clear_resharding() {
- return clear_resharding(store, bucket_info);
+ int clear_resharding(const DoutPrefixProvider *dpp) {
+ return clear_resharding(dpp, store, bucket_info);
}
- static int clear_index_shard_reshard_status(rgw::sal::RGWRadosStore* store,
+ static int clear_index_shard_reshard_status(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore* store,
const RGWBucketInfo& bucket_info);
- int clear_index_shard_reshard_status() {
- return clear_index_shard_reshard_status(store, bucket_info);
+ int clear_index_shard_reshard_status(const DoutPrefixProvider *dpp) {
+ return clear_index_shard_reshard_status(dpp, store, bucket_info);
}
- static int set_resharding_status(rgw::sal::RGWRadosStore* store,
+ static int set_resharding_status(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore* store,
const RGWBucketInfo& bucket_info,
const string& new_instance_id,
int32_t num_shards,
cls_rgw_reshard_status status);
- int set_resharding_status(const string& new_instance_id,
+ int set_resharding_status(const DoutPrefixProvider *dpp, const string& new_instance_id,
int32_t num_shards,
cls_rgw_reshard_status status) {
- return set_resharding_status(store, bucket_info,
+ return set_resharding_status(dpp, store, bucket_info,
new_instance_id, num_shards, status);
}
void get_logshard_oid(int shard_num, string *shard);
protected:
- class ReshardWorker : public Thread {
+ class ReshardWorker : public Thread, public DoutPrefixProvider {
CephContext *cct;
RGWReshard *reshard;
ceph::mutex lock = ceph::make_mutex("ReshardWorker");
ReshardWorker(CephContext * const _cct,
RGWReshard * const _reshard)
: cct(_cct),
- reshard(_reshard) {
- }
+ reshard(_reshard) {}
void *entry() override;
void stop();
+
+ CephContext *get_cct() const override;
+ unsigned get_subsys() const;
+ std::ostream& gen_prefix(std::ostream& out) const;
};
ReshardWorker *worker = nullptr;
public:
RGWReshard(rgw::sal::RGWRadosStore* _store, bool _verbose = false, ostream *_out = nullptr, Formatter *_formatter = nullptr);
- int add(cls_rgw_reshard_entry& entry);
- int update(const RGWBucketInfo& bucket_info, const RGWBucketInfo& new_bucket_info);
+ int add(const DoutPrefixProvider *dpp, cls_rgw_reshard_entry& entry);
+ int update(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const RGWBucketInfo& new_bucket_info);
int get(cls_rgw_reshard_entry& entry);
- int remove(cls_rgw_reshard_entry& entry);
+ int remove(const DoutPrefixProvider *dpp, cls_rgw_reshard_entry& entry);
int list(int logshard_num, string& marker, uint32_t max, std::list<cls_rgw_reshard_entry>& entries, bool *is_truncated);
int clear_bucket_resharding(const string& bucket_instance_oid, cls_rgw_reshard_entry& entry);
/* reshard thread */
- int process_single_logshard(int logshard_num);
- int process_all_logshards();
+ int process_single_logshard(int logshard_num, const DoutPrefixProvider *dpp);
+ int process_all_logshards(const DoutPrefixProvider *dpp);
bool going_down();
void start_processor();
void stop_processor();
try {
RESTFUL_IO(s)->send_status(status, status_name);
} catch (rgw::io::Exception& e) {
- ldout(s->cct, 0) << "ERROR: s->cio->send_status() returned err="
+ ldpp_dout(s, 0) << "ERROR: s->cio->send_status() returned err="
<< e.what() << dendl;
}
}
try {
RESTFUL_IO(s)->send_header(name, val);
} catch (rgw::io::Exception& e) {
- ldout(s->cct, 0) << "ERROR: s->cio->send_header() returned err="
+ ldpp_dout(s, 0) << "ERROR: s->cio->send_header() returned err="
<< e.what() << dendl;
}
}
try {
RESTFUL_IO(s)->send_content_length(len);
} catch (rgw::io::Exception& e) {
- ldout(s->cct, 0) << "ERROR: s->cio->send_content_length() returned err="
+ ldpp_dout(s, 0) << "ERROR: s->cio->send_content_length() returned err="
<< e.what() << dendl;
}
dump_header(s, "Accept-Ranges", "bytes");
try {
RESTFUL_IO(s)->send_chunked_transfer_encoding();
} catch (rgw::io::Exception& e) {
- ldout(s->cct, 0) << "ERROR: RESTFUL_IO(s)->send_chunked_transfer_encoding()"
+ ldpp_dout(s, 0) << "ERROR: RESTFUL_IO(s)->send_chunked_transfer_encoding()"
<< " returned err=" << e.what() << dendl;
}
}
try {
RESTFUL_IO(s)->complete_header();
} catch (rgw::io::Exception& e) {
- ldout(s->cct, 0) << "ERROR: RESTFUL_IO(s)->complete_header() returned err="
+ ldpp_dout(s, 0) << "ERROR: RESTFUL_IO(s)->complete_header() returned err="
<< e.what() << dendl;
}
if (op != NULL) {
int new_err_no;
new_err_no = op->error_handler(err_no, &error_content, y);
- ldout(s->cct, 1) << "op->ERRORHANDLER: err_no=" << err_no
+ ldpp_dout(s, 1) << "op->ERRORHANDLER: err_no=" << err_no
<< " new_err_no=" << new_err_no << dendl;
err_no = new_err_no;
} else if (handler != NULL) {
int new_err_no;
new_err_no = handler->error_handler(err_no, &error_content, y);
- ldout(s->cct, 1) << "handler->ERRORHANDLER: err_no=" << err_no
+ ldpp_dout(s, 1) << "handler->ERRORHANDLER: err_no=" << err_no
<< " new_err_no=" << new_err_no << dendl;
err_no = new_err_no;
}
try {
RESTFUL_IO(s)->send_100_continue();
} catch (rgw::io::Exception& e) {
- ldout(s->cct, 0) << "ERROR: RESTFUL_IO(s)->send_100_continue() returned err="
+ ldpp_dout(s, 0) << "ERROR: RESTFUL_IO(s)->send_100_continue() returned err="
<< e.what() << dendl;
}
}
{
int ret = 0;
ret = torrent.get_params();
- ldout(s->cct, 5) << "NOTICE: open produce torrent file " << dendl;
+ ldpp_dout(s, 5) << "NOTICE: open produce torrent file " << dendl;
if (ret < 0)
{
return ret;
}
if (s->cct->_conf->subsys.should_gather<ceph_subsys_rgw, 20>()) {
- ldout(s->cct, 20) << "request content_type_str="
+ ldpp_dout(s, 20) << "request content_type_str="
<< req_content_type_str << dendl;
- ldout(s->cct, 20) << "request content_type params:" << dendl;
+ ldpp_dout(s, 20) << "request content_type params:" << dendl;
for (const auto& pair : params) {
- ldout(s->cct, 20) << " " << pair.first << " -> " << pair.second
+ ldpp_dout(s, 20) << " " << pair.first << " -> " << pair.second
<< dendl;
}
}
{
const auto max_size = s->cct->_conf->rgw_max_put_param_size;
std::tie(op_ret, data) = rgw_rest_read_all_input(s, max_size, false);
- ldout(s->cct, 0) << "RGWPutACLs_ObjStore::get_params read data is: " << data.c_str() << dendl;
+ ldpp_dout(s, 0) << "RGWPutACLs_ObjStore::get_params read data is: " << data.c_str() << dendl;
return op_ret;
}
string err;
marker = strict_strtol(marker_str.c_str(), 10, &err);
if (!err.empty()) {
- ldout(s->cct, 20) << "bad marker: " << marker << dendl;
+ ldpp_dout(s, 20) << "bad marker: " << marker << dendl;
op_ret = -EINVAL;
return op_ret;
}
if (! s->user->get_id().empty() && s->auth.identity->get_identity_type() != TYPE_ROLE) {
try {
map<string, bufferlist> uattrs;
- if (auto ret = store->ctl()->user->get_attrs_by_uid(s->user->get_id(), &uattrs, y); ! ret) {
+ if (auto ret = store->ctl()->user->get_attrs_by_uid(s, s->user->get_id(), &uattrs, y); ! ret) {
auto user_policies = get_iam_user_policy_from_attr(s->cct, store, uattrs, s->user->get_tenant());
s->iam_user_policies.insert(s->iam_user_policies.end(),
std::make_move_iterator(user_policies.begin()),
}
} catch (const std::exception& e) {
- lderr(s->cct) << "Error reading IAM User Policy: " << e.what() << dendl;
+ ldpp_dout(op, -1) << "Error reading IAM User Policy: " << e.what() << dendl;
}
}
rgw_build_iam_environment(store, s);
return 0;
}
- return do_init_permissions(y);
+ return do_init_permissions(op, y);
}
int RGWHandler_REST::read_permissions(RGWOp* op_obj, optional_yield y)
if (api_s3website_priority_rawpos != apis.end()) {
api_priority_s3website = apis.size() - std::distance(apis.begin(), api_s3website_priority_rawpos);
}
- ldout(s->cct, 10) << "rgw api priority: s3=" << api_priority_s3 << " s3website=" << api_priority_s3website << dendl;
+ ldpp_dout(s, 10) << "rgw api priority: s3=" << api_priority_s3 << " s3website=" << api_priority_s3website << dendl;
bool s3website_enabled = api_priority_s3website >= 0;
if (info.host.size()) {
info.host = info.host.substr(0, pos);
}
}
- ldout(s->cct, 10) << "host=" << info.host << dendl;
+ ldpp_dout(s, 10) << "host=" << info.host << dendl;
string domain;
string subdomain;
bool in_hosted_domain_s3website = false;
}
}
- ldout(s->cct, 20)
+ ldpp_dout(s, 20)
<< "subdomain=" << subdomain
<< " domain=" << domain
<< " in_hosted_domain=" << in_hosted_domain
bool found;
int r = rgw_resolver->resolve_cname(info.host, cname, &found);
if (r < 0) {
- ldout(s->cct, 0)
+ ldpp_dout(s, 0)
<< "WARNING: rgw_resolver->resolve_cname() returned r=" << r
<< dendl;
}
if (found) {
- ldout(s->cct, 5) << "resolved host cname " << info.host << " -> "
+ ldpp_dout(s, 5) << "resolved host cname " << info.host << " -> "
<< cname << dendl;
in_hosted_domain =
rgw_find_host_in_domains(cname, &domain, &subdomain, hostnames_set);
}
}
- ldout(s->cct, 20)
+ ldpp_dout(s, 20)
<< "subdomain=" << subdomain
<< " domain=" << domain
<< " in_hosted_domain=" << in_hosted_domain
s->info.domain = domain;
}
- ldout(s->cct, 20)
+ ldpp_dout(s, 20)
<< "final domain/bucket"
<< " subdomain=" << subdomain
<< " domain=" << domain
string err;
s->content_length = strict_strtoll(s->length, 10, &err);
if (!err.empty()) {
- ldout(s->cct, 10) << "bad content length, aborting" << dendl;
+ ldpp_dout(s, 10) << "bad content length, aborting" << dendl;
return -EINVAL;
}
}
}
if (s->content_length < 0) {
- ldout(s->cct, 10) << "negative content length, aborting" << dendl;
+ ldpp_dout(s, 10) << "negative content length, aborting" << dendl;
return -EINVAL;
}
}
s->op = op_from_method(info.method);
- info.init_meta_info(&s->has_bad_meta);
+ info.init_meta_info(s, &s->has_bad_meta);
return 0;
}
op_state.set_bucket_name(bucket);
op_state.set_fetch_stats(fetch_stats);
- op_ret = RGWBucketAdminOp::info(store, op_state, flusher, y);
+ op_ret = RGWBucketAdminOp::info(store, op_state, flusher, y, this);
}
class RGWOp_Get_Policy : public RGWRESTOp {
op_state.set_bucket_name(bucket);
op_state.set_object(object);
- op_ret = RGWBucketAdminOp::get_policy(store, op_state, flusher);
+ op_ret = RGWBucketAdminOp::get_policy(store, op_state, flusher, this);
}
class RGWOp_Check_Bucket_Index : public RGWRESTOp {
op_state.set_fix_index(fix_index);
op_state.set_check_objects(check_objects);
- op_ret = RGWBucketAdminOp::check_index(store, op_state, flusher, s->yield);
+ op_ret = RGWBucketAdminOp::check_index(store, op_state, flusher, s->yield, s);
}
class RGWOp_Bucket_Link : public RGWRESTOp {
op_state.set_new_bucket_name(new_bucket_name);
bufferlist data;
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(s, s->user.get(), nullptr, data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
}
- op_ret = RGWBucketAdminOp::link(store, op_state);
+ op_ret = RGWBucketAdminOp::link(store, op_state, s);
}
class RGWOp_Bucket_Unlink : public RGWRESTOp {
op_state.set_bucket_name(bucket);
bufferlist data;
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(s, s->user.get(), nullptr, data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
}
- op_ret = RGWBucketAdminOp::unlink(store, op_state);
+ op_ret = RGWBucketAdminOp::unlink(store, op_state, s);
}
class RGWOp_Bucket_Remove : public RGWRESTOp {
RESTArgs::get_string(s, "bucket", bucket_name, &bucket_name);
RESTArgs::get_bool(s, "purge-objects", false, &delete_children);
- op_ret = store->get_bucket(nullptr, string(), bucket_name, &bucket, y);
+ op_ret = store->get_bucket(s, nullptr, string(), bucket_name, &bucket, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "get_bucket returned ret=" << op_ret << dendl;
return;
}
- op_ret = bucket->remove_bucket(delete_children, string(), string(), true, &s->info, s->yield);
+ op_ret = bucket->remove_bucket(s, delete_children, string(), string(), true, &s->info, s->yield);
}
class RGWOp_Set_Bucket_Quota : public RGWRESTOp {
if (use_http_params) {
RGWBucketInfo bucket_info;
map<string, bufferlist> attrs;
- op_ret = store->getRados()->get_bucket_info(store->svc(), uid.tenant, bucket, bucket_info, NULL, s->yield, &attrs);
+ op_ret = store->getRados()->get_bucket_info(store->svc(), uid.tenant, bucket, bucket_info, NULL, s->yield, s, &attrs);
if (op_ret < 0) {
return;
}
op_state.set_bucket_name(bucket);
op_state.set_quota(quota);
- op_ret = RGWBucketAdminOp::set_quota(store, op_state);
+ op_ret = RGWBucketAdminOp::set_quota(store, op_state, s);
}
class RGWOp_Sync_Bucket : public RGWRESTOp {
op_state.set_tenant(tenant);
op_state.set_sync_bucket(sync_bucket);
- op_ret = RGWBucketAdminOp::sync_bucket(store, op_state);
+ op_ret = RGWBucketAdminOp::sync_bucket(store, op_state, s);
}
class RGWOp_Object_Remove: public RGWRESTOp {
op_state.set_bucket_name(bucket);
op_state.set_object(object);
- op_ret = RGWBucketAdminOp::remove_object(store, op_state);
+ op_ret = RGWBucketAdminOp::remove_object(store, op_state, s);
}
date_str = buffer;
}
-int RGWRESTSimpleRequest::execute(RGWAccessKey& key, const char *_method, const char *resource, optional_yield y)
+int RGWRESTSimpleRequest::execute(const DoutPrefixProvider *dpp, RGWAccessKey& key, const char *_method, const char *resource, optional_yield y)
{
method = _method;
string new_url = url;
meta_map_t meta_map;
map<string, string> sub_resources;
- rgw_create_s3_canonical_header(method.c_str(), NULL, NULL, date_str.c_str(),
+ rgw_create_s3_canonical_header(dpp, method.c_str(), NULL, NULL, date_str.c_str(),
meta_map, meta_map, url.c_str(), sub_resources,
canonical_header);
string auth_hdr = "AWS " + key.id + ":" + digest;
- ldout(cct, 15) << "generated auth header: " << auth_hdr << dendl;
+ ldpp_dout(dpp, 15) << "generated auth header: " << auth_hdr << dendl;
headers.push_back(pair<string, string>("AUTHORIZATION", auth_hdr));
int r = process(y);
out_headers.clear();
}
-static int sign_request(CephContext *cct, RGWAccessKey& key, RGWEnv& env, req_info& info)
+static int sign_request(const DoutPrefixProvider *dpp, CephContext *cct, RGWAccessKey& key, RGWEnv& env, req_info& info)
{
/* don't sign if no key is provided */
if (key.key.empty()) {
}
string canonical_header;
- if (!rgw_create_s3_canonical_header(info, NULL, canonical_header, false)) {
- ldout(cct, 0) << "failed to create canonical s3 header" << dendl;
+ if (!rgw_create_s3_canonical_header(dpp, info, NULL, canonical_header, false)) {
+ ldpp_dout(dpp, 0) << "failed to create canonical s3 header" << dendl;
return -EINVAL;
}
- ldout(cct, 10) << "generated canonical header: " << canonical_header << dendl;
+ ldpp_dout(dpp, 10) << "generated canonical header: " << canonical_header << dendl;
string digest;
try {
}
string auth_hdr = "AWS " + key.id + ":" + digest;
- ldout(cct, 15) << "generated auth header: " << auth_hdr << dendl;
+ ldpp_dout(dpp, 15) << "generated auth header: " << auth_hdr << dendl;
env.set("AUTHORIZATION", auth_hdr);
return 0;
}
-int RGWRESTSimpleRequest::forward_request(RGWAccessKey& key, req_info& info, size_t max_response, bufferlist *inbl, bufferlist *outbl, optional_yield y)
+int RGWRESTSimpleRequest::forward_request(const DoutPrefixProvider *dpp, RGWAccessKey& key, req_info& info, size_t max_response, bufferlist *inbl, bufferlist *outbl, optional_yield y)
{
string date_str;
if (content_md5) {
new_env.set("HTTP_CONTENT_MD5", content_md5);
}
- int ret = sign_request(cct, key, new_env, new_info);
+ int ret = sign_request(dpp, cct, key, new_env, new_info);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: failed to sign request" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to sign request" << dendl;
return ret;
}
}
}
-int RGWRESTGenerateHTTPHeaders::set_obj_attrs(map<string, bufferlist>& rgw_attrs)
+int RGWRESTGenerateHTTPHeaders::set_obj_attrs(const DoutPrefixProvider *dpp, map<string, bufferlist>& rgw_attrs)
{
map<string, string> new_attrs;
}
RGWAccessControlPolicy policy;
- int ret = rgw_policy_from_attrset(cct, rgw_attrs, &policy);
+ int ret = rgw_policy_from_attrset(dpp, cct, rgw_attrs, &policy);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: couldn't get policy ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: couldn't get policy ret=" << ret << dendl;
return ret;
}
add_grants_headers(grants_by_type, *new_env, new_info->x_meta_map);
}
-int RGWRESTGenerateHTTPHeaders::sign(RGWAccessKey& key)
+int RGWRESTGenerateHTTPHeaders::sign(const DoutPrefixProvider *dpp, RGWAccessKey& key)
{
- int ret = sign_request(cct, key, *new_env, *new_info);
+ int ret = sign_request(dpp, cct, key, *new_env, *new_info);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: failed to sign request" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to sign request" << dendl;
return ret;
}
url = headers_gen.get_url();
}
-int RGWRESTStreamS3PutObj::send_ready(RGWAccessKey& key, map<string, bufferlist>& rgw_attrs, bool send)
+int RGWRESTStreamS3PutObj::send_ready(const DoutPrefixProvider *dpp, RGWAccessKey& key, map<string, bufferlist>& rgw_attrs, bool send)
{
- headers_gen.set_obj_attrs(rgw_attrs);
+ headers_gen.set_obj_attrs(dpp, rgw_attrs);
- return send_ready(key, send);
+ return send_ready(dpp, key, send);
}
-int RGWRESTStreamS3PutObj::send_ready(RGWAccessKey& key, const map<string, string>& http_attrs,
+int RGWRESTStreamS3PutObj::send_ready(const DoutPrefixProvider *dpp, RGWAccessKey& key, const map<string, string>& http_attrs,
RGWAccessControlPolicy& policy, bool send)
{
headers_gen.set_http_attrs(http_attrs);
headers_gen.set_policy(policy);
- return send_ready(key, send);
+ return send_ready(dpp, key, send);
}
-int RGWRESTStreamS3PutObj::send_ready(RGWAccessKey& key, bool send)
+int RGWRESTStreamS3PutObj::send_ready(const DoutPrefixProvider *dpp, RGWAccessKey& key, bool send)
{
- headers_gen.sign(key);
+ headers_gen.sign(dpp, key);
for (const auto& kv: new_env.get_map()) {
headers.emplace_back(kv);
return 0;
}
-int RGWRESTStreamS3PutObj::put_obj_init(RGWAccessKey& key, rgw::sal::RGWObject* obj, uint64_t obj_size, map<string, bufferlist>& attrs, bool send)
+int RGWRESTStreamS3PutObj::put_obj_init(const DoutPrefixProvider *dpp, RGWAccessKey& key, rgw::sal::RGWObject* obj, uint64_t obj_size, map<string, bufferlist>& attrs, bool send)
{
send_init(obj);
- return send_ready(key, attrs, send);
+ return send_ready(dpp, key, attrs, send);
}
void set_str_from_headers(map<string, string>& out_headers, const string& header_name, string& str)
*resource = urlsafe_bucket + "/" + urlsafe_object;
}
-int RGWRESTStreamRWRequest::send_request(RGWAccessKey& key, map<string, string>& extra_headers, const rgw_obj& obj, RGWHTTPManager *mgr)
+int RGWRESTStreamRWRequest::send_request(const DoutPrefixProvider *dpp, RGWAccessKey& key, map<string, string>& extra_headers, const rgw_obj& obj, RGWHTTPManager *mgr)
{
string resource;
send_prepare_convert(obj, &resource);
- return send_request(&key, extra_headers, resource, mgr);
+ return send_request(dpp, &key, extra_headers, resource, mgr);
}
-int RGWRESTStreamRWRequest::send_prepare(RGWAccessKey& key, map<string, string>& extra_headers, const rgw_obj& obj)
+int RGWRESTStreamRWRequest::send_prepare(const DoutPrefixProvider *dpp, RGWAccessKey& key, map<string, string>& extra_headers, const rgw_obj& obj)
{
string resource;
send_prepare_convert(obj, &resource);
- return do_send_prepare(&key, extra_headers, resource);
+ return do_send_prepare(dpp, &key, extra_headers, resource);
}
-int RGWRESTStreamRWRequest::send_prepare(RGWAccessKey *key, map<string, string>& extra_headers, const string& resource,
+int RGWRESTStreamRWRequest::send_prepare(const DoutPrefixProvider *dpp, RGWAccessKey *key, map<string, string>& extra_headers, const string& resource,
bufferlist *send_data)
{
string new_resource;
//do not encode slash
url_encode(resource, new_resource, false);
- return do_send_prepare(key, extra_headers, new_resource, send_data);
+ return do_send_prepare(dpp, key, extra_headers, new_resource, send_data);
}
-int RGWRESTStreamRWRequest::do_send_prepare(RGWAccessKey *key, map<string, string>& extra_headers, const string& resource,
+int RGWRESTStreamRWRequest::do_send_prepare(const DoutPrefixProvider *dpp, RGWAccessKey *key, map<string, string>& extra_headers, const string& resource,
bufferlist *send_data)
{
string new_url = url;
new_info.init_meta_info(nullptr);
#endif
- int ret = headers_gen.sign(*key);
+ int ret = headers_gen.sign(dpp, *key);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: failed to sign request" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to sign request" << dendl;
return ret;
}
}
return 0;
}
-int RGWRESTStreamRWRequest::send_request(RGWAccessKey *key, map<string, string>& extra_headers, const string& resource,
+int RGWRESTStreamRWRequest::send_request(const DoutPrefixProvider *dpp, RGWAccessKey *key, map<string, string>& extra_headers, const string& resource,
RGWHTTPManager *mgr, bufferlist *send_data)
{
- int ret = send_prepare(key, extra_headers, resource, send_data);
+ int ret = send_prepare(dpp, key, extra_headers, resource, send_data);
if (ret < 0) {
return ret;
}
RGWRESTSimpleRequest(CephContext *_cct, const string& _method, const string& _url,
param_vec_t *_headers, param_vec_t *_params) : RGWHTTPSimpleRequest(_cct, _method, _url, _headers, _params) {}
- int execute(RGWAccessKey& key, const char *method, const char *resource, optional_yield y);
- int forward_request(RGWAccessKey& key, req_info& info, size_t max_response, bufferlist *inbl, bufferlist *outbl, optional_yield y);
+ int execute(const DoutPrefixProvider *dpp, RGWAccessKey& key, const char *method, const char *resource, optional_yield y);
+ int forward_request(const DoutPrefixProvider *dpp, RGWAccessKey& key, req_info& info, size_t max_response, bufferlist *inbl, bufferlist *outbl, optional_yield y);
};
class RGWWriteDrainCB {
RGWRESTGenerateHTTPHeaders(CephContext *_cct, RGWEnv *_env, req_info *_info) : cct(_cct), new_env(_env), new_info(_info) {}
void init(const string& method, const string& url, const string& resource, const param_vec_t& params);
void set_extra_headers(const map<string, string>& extra_headers);
- int set_obj_attrs(map<string, bufferlist>& rgw_attrs);
+ int set_obj_attrs(const DoutPrefixProvider *dpp, map<string, bufferlist>& rgw_attrs);
void set_http_attrs(const map<string, string>& http_attrs);
void set_policy(RGWAccessControlPolicy& policy);
- int sign(RGWAccessKey& key);
+ int sign(const DoutPrefixProvider *dpp, RGWAccessKey& key);
const string& get_url() { return url; }
};
}
virtual ~RGWRESTStreamRWRequest() override {}
- int send_prepare(RGWAccessKey *key, map<string, string>& extra_headers, const string& resource, bufferlist *send_data = nullptr /* optional input data */);
- int send_prepare(RGWAccessKey& key, map<string, string>& extra_headers, const rgw_obj& obj);
+ int send_prepare(const DoutPrefixProvider *dpp, RGWAccessKey *key, map<string, string>& extra_headers, const string& resource, bufferlist *send_data = nullptr /* optional input data */);
+ int send_prepare(const DoutPrefixProvider *dpp, RGWAccessKey& key, map<string, string>& extra_headers, const rgw_obj& obj);
int send(RGWHTTPManager *mgr);
- int send_request(RGWAccessKey& key, map<string, string>& extra_headers, const rgw_obj& obj, RGWHTTPManager *mgr);
- int send_request(RGWAccessKey *key, map<string, string>& extra_headers, const string& resource, RGWHTTPManager *mgr, bufferlist *send_data = nullptr /* optional input data */);
+ int send_request(const DoutPrefixProvider *dpp, RGWAccessKey& key, map<string, string>& extra_headers, const rgw_obj& obj, RGWHTTPManager *mgr);
+ int send_request(const DoutPrefixProvider *dpp, RGWAccessKey *key, map<string, string>& extra_headers, const string& resource, RGWHTTPManager *mgr, bufferlist *send_data = nullptr /* optional input data */);
int complete_request(optional_yield y,
string *etag = nullptr,
void add_params(param_vec_t *params);
private:
- int do_send_prepare(RGWAccessKey *key, map<string, string>& extra_headers, const string& resource, bufferlist *send_data = nullptr /* optional input data */);
+ int do_send_prepare(const DoutPrefixProvider *dpp, RGWAccessKey *key, map<string, string>& extra_headers, const string& resource, bufferlist *send_data = nullptr /* optional input data */);
};
class RGWRESTStreamReadRequest : public RGWRESTStreamRWRequest {
~RGWRESTStreamS3PutObj() override;
void send_init(rgw::sal::RGWObject* obj);
- int send_ready(RGWAccessKey& key, map<string, bufferlist>& rgw_attrs, bool send);
- int send_ready(RGWAccessKey& key, const map<string, string>& http_attrs,
+ int send_ready(const DoutPrefixProvider *dpp, RGWAccessKey& key, map<string, bufferlist>& rgw_attrs, bool send);
+ int send_ready(const DoutPrefixProvider *dpp, RGWAccessKey& key, const map<string, string>& http_attrs,
RGWAccessControlPolicy& policy, bool send);
- int send_ready(RGWAccessKey& key, bool send);
+ int send_ready(const DoutPrefixProvider *dpp, RGWAccessKey& key, bool send);
- int put_obj_init(RGWAccessKey& key, rgw::sal::RGWObject* obj, uint64_t obj_size, map<string, bufferlist>& attrs, bool send);
+ int put_obj_init(const DoutPrefixProvider *dpp, RGWAccessKey& key, rgw::sal::RGWObject* obj, uint64_t obj_size, map<string, bufferlist>& attrs, bool send);
RGWGetDataCB *get_out_cb() { return out_cb; }
};
#define dout_subsys ceph_subsys_rgw
void RGWOp_ZoneGroupMap_Get::execute(optional_yield y) {
- op_ret = zonegroup_map.read(g_ceph_context, store->svc()->sysobj, y);
+ op_ret = zonegroup_map.read(this, g_ceph_context, store->svc()->sysobj, y);
if (op_ret < 0) {
- dout(5) << "failed to read zone_group map" << dendl;
+ ldpp_dout(this, 5) << "failed to read zone_group map" << dendl;
}
}
populate_zonegroup(params, zonegroup);
}
-int RGWRESTConn::forward(const rgw_user& uid, req_info& info, obj_version *objv, size_t max_response, bufferlist *inbl, bufferlist *outbl, optional_yield y)
+int RGWRESTConn::forward(const DoutPrefixProvider *dpp, const rgw_user& uid, req_info& info, obj_version *objv, size_t max_response, bufferlist *inbl, bufferlist *outbl, optional_yield y)
{
string url;
int ret = get_url(url);
params.push_back(param_pair_t(RGW_SYS_PARAM_PREFIX "ver", buf));
}
RGWRESTSimpleRequest req(cct, info.method, url, NULL, ¶ms);
- return req.forward_request(key, info, max_response, inbl, outbl, y);
+ return req.forward_request(dpp, key, info, max_response, inbl, outbl, y);
}
class StreamObjData : public RGWGetDataCB {
return 0;
}
-int RGWRESTConn::put_obj_async(const rgw_user& uid, rgw::sal::RGWObject* obj, uint64_t obj_size,
+int RGWRESTConn::put_obj_async(const DoutPrefixProvider *dpp,
+ const rgw_user& uid, rgw::sal::RGWObject* obj, uint64_t obj_size,
map<string, bufferlist>& attrs, bool send,
RGWRESTStreamS3PutObj **req)
{
param_vec_t params;
populate_params(params, &uid, self_zone_group);
RGWRESTStreamS3PutObj *wr = new RGWRESTStreamS3PutObj(cct, "PUT", url, NULL, ¶ms, host_style);
- ret = wr->put_obj_init(key, obj, obj_size, attrs, send);
+ ret = wr->put_obj_init(dpp, key, obj, obj_size, attrs, send);
if (ret < 0) {
delete wr;
return ret;
}
-int RGWRESTConn::get_obj(const rgw_user& uid, req_info *info /* optional */, const rgw::sal::RGWObject* obj,
+int RGWRESTConn::get_obj(const DoutPrefixProvider *dpp, const rgw_user& uid, req_info *info /* optional */, const rgw::sal::RGWObject* obj,
const real_time *mod_ptr, const real_time *unmod_ptr,
uint32_t mod_zone_id, uint64_t mod_pg_ver,
bool prepend_metadata, bool get_op, bool rgwx_stat,
params.sync_manifest = sync_manifest;
params.skip_decrypt = skip_decrypt;
params.cb = cb;
- return get_obj(obj, params, send, req);
+ return get_obj(dpp, obj, params, send, req);
}
-int RGWRESTConn::get_obj(const rgw::sal::RGWObject* obj, const get_obj_params& in_params, bool send, RGWRESTStreamRWRequest **req)
+int RGWRESTConn::get_obj(const DoutPrefixProvider *dpp, const rgw::sal::RGWObject* obj, const get_obj_params& in_params, bool send, RGWRESTStreamRWRequest **req)
{
string url;
int ret = get_url(url);
set_header(buf, extra_headers, "RANGE");
}
- int r = (*req)->send_prepare(key, extra_headers, obj->get_obj());
+ int r = (*req)->send_prepare(dpp, key, extra_headers, obj->get_obj());
if (r < 0) {
goto done_err;
}
return ret;
}
-int RGWRESTConn::get_resource(const string& resource,
+int RGWRESTConn::get_resource(const DoutPrefixProvider *dpp,
+ const string& resource,
param_vec_t *extra_params,
map<string, string> *extra_headers,
bufferlist& bl,
headers.insert(extra_headers->begin(), extra_headers->end());
}
- ret = req.send_request(&key, headers, resource, mgr, send_data);
+ ret = req.send_request(dpp, &key, headers, resource, mgr, send_data);
if (ret < 0) {
- ldout(cct, 5) << __func__ << ": send_request() resource=" << resource << " returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 5) << __func__ << ": send_request() resource=" << resource << " returned ret=" << ret << dendl;
return ret;
}
req.set_params(¶ms);
}
-int RGWRESTReadResource::read(optional_yield y)
+int RGWRESTReadResource::read(const DoutPrefixProvider *dpp, optional_yield y)
{
- int ret = req.send_request(&conn->get_key(), headers, resource, mgr);
+ int ret = req.send_request(dpp, &conn->get_key(), headers, resource, mgr);
if (ret < 0) {
- ldout(cct, 5) << __func__ << ": send_request() resource=" << resource << " returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 5) << __func__ << ": send_request() resource=" << resource << " returned ret=" << ret << dendl;
return ret;
}
return req.complete_request(y);
}
-int RGWRESTReadResource::aio_read()
+int RGWRESTReadResource::aio_read(const DoutPrefixProvider *dpp)
{
- int ret = req.send_request(&conn->get_key(), headers, resource, mgr);
+ int ret = req.send_request(dpp, &conn->get_key(), headers, resource, mgr);
if (ret < 0) {
- ldout(cct, 5) << __func__ << ": send_request() resource=" << resource << " returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 5) << __func__ << ": send_request() resource=" << resource << " returned ret=" << ret << dendl;
return ret;
}
req.set_params(¶ms);
}
-int RGWRESTSendResource::send(bufferlist& outbl, optional_yield y)
+int RGWRESTSendResource::send(const DoutPrefixProvider *dpp, bufferlist& outbl, optional_yield y)
{
req.set_send_length(outbl.length());
req.set_outbl(outbl);
- int ret = req.send_request(&conn->get_key(), headers, resource, mgr);
+ int ret = req.send_request(dpp, &conn->get_key(), headers, resource, mgr);
if (ret < 0) {
- ldout(cct, 5) << __func__ << ": send_request() resource=" << resource << " returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 5) << __func__ << ": send_request() resource=" << resource << " returned ret=" << ret << dendl;
return ret;
}
return req.complete_request(y);
}
-int RGWRESTSendResource::aio_send(bufferlist& outbl)
+int RGWRESTSendResource::aio_send(const DoutPrefixProvider *dpp, bufferlist& outbl)
{
req.set_send_length(outbl.length());
req.set_outbl(outbl);
- int ret = req.send_request(&conn->get_key(), headers, resource, mgr);
+ int ret = req.send_request(dpp, &conn->get_key(), headers, resource, mgr);
if (ret < 0) {
- ldout(cct, 5) << __func__ << ": send_request() resource=" << resource << " returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 5) << __func__ << ": send_request() resource=" << resource << " returned ret=" << ret << dendl;
return ret;
}
virtual void populate_params(param_vec_t& params, const rgw_user *uid, const string& zonegroup);
/* sync request */
- int forward(const rgw_user& uid, req_info& info, obj_version *objv, size_t max_response, bufferlist *inbl, bufferlist *outbl, optional_yield y);
+ int forward(const DoutPrefixProvider *dpp, const rgw_user& uid, req_info& info, obj_version *objv, size_t max_response, bufferlist *inbl, bufferlist *outbl, optional_yield y);
/* async requests */
int put_obj_send_init(rgw::sal::RGWObject* obj, const rgw_http_param_pair *extra_params, RGWRESTStreamS3PutObj **req);
- int put_obj_async(const rgw_user& uid, rgw::sal::RGWObject* obj, uint64_t obj_size,
+ int put_obj_async(const DoutPrefixProvider *dpp, const rgw_user& uid, rgw::sal::RGWObject* obj, uint64_t obj_size,
map<string, bufferlist>& attrs, bool send, RGWRESTStreamS3PutObj **req);
int complete_request(RGWRESTStreamS3PutObj *req, string& etag,
ceph::real_time *mtime, optional_yield y);
uint64_t range_end{0};
};
- int get_obj(const rgw::sal::RGWObject* obj, const get_obj_params& params, bool send, RGWRESTStreamRWRequest **req);
+ int get_obj(const DoutPrefixProvider *dpp, const rgw::sal::RGWObject* obj, const get_obj_params& params, bool send, RGWRESTStreamRWRequest **req);
- int get_obj(const rgw_user& uid, req_info *info /* optional */, const rgw::sal::RGWObject* obj,
+ int get_obj(const DoutPrefixProvider *dpp, const rgw_user& uid, req_info *info /* optional */, const rgw::sal::RGWObject* obj,
const ceph::real_time *mod_ptr, const ceph::real_time *unmod_ptr,
uint32_t mod_zone_id, uint64_t mod_pg_ver,
bool prepend_metadata, bool get_op, bool rgwx_stat, bool sync_manifest,
map<string, string> *pheaders,
optional_yield y);
- int get_resource(const string& resource,
+ int get_resource(const DoutPrefixProvider *dpp,
+ const string& resource,
param_vec_t *extra_params,
map<string, string>* extra_headers,
bufferlist& bl,
optional_yield y);
template <class T>
- int get_json_resource(const string& resource, param_vec_t *params,
+ int get_json_resource(const DoutPrefixProvider *dpp, const string& resource, param_vec_t *params,
bufferlist *in_data, optional_yield y, T& t);
template <class T>
- int get_json_resource(const string& resource, param_vec_t *params,
+ int get_json_resource(const DoutPrefixProvider *dpp, const string& resource, param_vec_t *params,
optional_yield y, T& t);
template <class T>
- int get_json_resource(const string& resource, const rgw_http_param_pair *pp,
+ int get_json_resource(const DoutPrefixProvider *dpp, const string& resource, const rgw_http_param_pair *pp,
optional_yield y, T& t);
private:
template<class T>
-int RGWRESTConn::get_json_resource(const string& resource, param_vec_t *params,
+int RGWRESTConn::get_json_resource(const DoutPrefixProvider *dpp, const string& resource, param_vec_t *params,
bufferlist *in_data, optional_yield y, T& t)
{
bufferlist bl;
- int ret = get_resource(resource, params, nullptr, bl, in_data, nullptr, y);
+ int ret = get_resource(dpp, resource, params, nullptr, bl, in_data, nullptr, y);
if (ret < 0) {
return ret;
}
}
template<class T>
-int RGWRESTConn::get_json_resource(const string& resource, param_vec_t *params,
+int RGWRESTConn::get_json_resource(const DoutPrefixProvider *dpp, const string& resource, param_vec_t *params,
optional_yield y, T& t)
{
- return get_json_resource(resource, params, nullptr, y, t);
+ return get_json_resource(dpp, resource, params, nullptr, y, t);
}
template<class T>
-int RGWRESTConn::get_json_resource(const string& resource, const rgw_http_param_pair *pp,
+int RGWRESTConn::get_json_resource(const DoutPrefixProvider *dpp, const string& resource, const rgw_http_param_pair *pp,
optional_yield y, T& t)
{
param_vec_t params = make_param_list(pp);
- return get_json_resource(resource, ¶ms, y, t);
+ return get_json_resource(dpp, resource, ¶ms, y, t);
}
class RGWStreamIntoBufferlist : public RGWHTTPStreamRWRequest::ReceiveCB {
template <class T>
int decode_resource(T *dest);
- int read(optional_yield y);
+ int read(const DoutPrefixProvider *dpp, optional_yield y);
- int aio_read();
+ int aio_read(const DoutPrefixProvider *dpp);
string to_str() {
return req.to_str();
int wait(T *dest, optional_yield y);
template <class T>
- int fetch(T *dest, optional_yield y);
+ int fetch(const DoutPrefixProvider *dpp, T *dest, optional_yield y);
};
}
template <class T>
-int RGWRESTReadResource::fetch(T *dest, optional_yield y)
+int RGWRESTReadResource::fetch(const DoutPrefixProvider *dpp, T *dest, optional_yield y)
{
- int ret = read(y);
+ int ret = read(dpp, y);
if (ret < 0) {
return ret;
}
return req.get_io_user_info();
}
- int send(bufferlist& bl, optional_yield y);
+ int send(const DoutPrefixProvider *dpp, bufferlist& bl, optional_yield y);
- int aio_send(bufferlist& bl);
+ int aio_send(const DoutPrefixProvider *dpp, bufferlist& bl);
string to_str() {
return req.to_str();
void RGWHandler_REST_IAM::rgw_iam_parse_input()
{
if (post_body.size() > 0) {
- ldout(s->cct, 10) << "Content of POST: " << post_body << dendl;
+ ldpp_dout(s, 10) << "Content of POST: " << post_body << dendl;
if (post_body.find("Action") != string::npos) {
boost::char_separator<char> sep("&");
s->dialect = "iam";
if (int ret = RGWHandler_REST_IAM::init_from_header(s, RGW_FORMAT_XML, true); ret < 0) {
- ldout(s->cct, 10) << "init_from_header returned err=" << ret << dendl;
+ ldpp_dout(s, 10) << "init_from_header returned err=" << ret << dendl;
return ret;
}
}
s->info.args.set(p);
- s->info.args.parse();
+ s->info.args.parse(s);
/* must be called after the args parsing */
if (int ret = allocate_formatter(s, default_formatter, configurable_format); ret < 0)
if (s->info.args.exists("start-time") ||
s->info.args.exists("end-time")) {
- dout(5) << "start-time and end-time are no longer accepted" << dendl;
+ ldpp_dout(this, 5) << "start-time and end-time are no longer accepted" << dendl;
op_ret = -EINVAL;
return;
}
shard_id = (unsigned)strict_strtol(shard.c_str(), 10, &err);
if (!err.empty()) {
- dout(5) << "Error parsing shard_id " << shard << dendl;
+ ldpp_dout(this, 5) << "Error parsing shard_id " << shard << dendl;
op_ret = -EINVAL;
return;
}
if (!max_entries_str.empty()) {
max_entries = (unsigned)strict_strtol(max_entries_str.c_str(), 10, &err);
if (!err.empty()) {
- dout(5) << "Error parsing max-entries " << max_entries_str << dendl;
+ ldpp_dout(this, 5) << "Error parsing max-entries " << max_entries_str << dendl;
op_ret = -EINVAL;
return;
}
}
if (period.empty()) {
- ldout(s->cct, 5) << "Missing period id trying to use current" << dendl;
+ ldpp_dout(this, 5) << "Missing period id trying to use current" << dendl;
period = store->svc()->zone->get_current_period_id();
if (period.empty()) {
- ldout(s->cct, 5) << "Missing period id" << dendl;
+ ldpp_dout(this, 5) << "Missing period id" << dendl;
op_ret = -EINVAL;
return;
}
meta_log.init_list_entries(shard_id, {}, {}, marker, &handle);
- op_ret = meta_log.list_entries(handle, max_entries, entries,
+ op_ret = meta_log.list_entries(this, handle, max_entries, entries,
&last_marker, &truncated);
meta_log.complete_list_entries(handle);
void RGWOp_MDLog_Info::execute(optional_yield y) {
num_objects = s->cct->_conf->rgw_md_log_max_shards;
- period = store->svc()->mdlog->read_oldest_log_period(y);
+ period = store->svc()->mdlog->read_oldest_log_period(y, s);
op_ret = period.get_error();
}
unsigned shard_id = (unsigned)strict_strtol(shard.c_str(), 10, &err);
if (!err.empty()) {
- dout(5) << "Error parsing shard_id " << shard << dendl;
+ ldpp_dout(this, 5) << "Error parsing shard_id " << shard << dendl;
op_ret = -EINVAL;
return;
}
if (period.empty()) {
- ldout(s->cct, 5) << "Missing period id trying to use current" << dendl;
+ ldpp_dout(this, 5) << "Missing period id trying to use current" << dendl;
period = store->svc()->zone->get_current_period_id();
if (period.empty()) {
- ldout(s->cct, 5) << "Missing period id" << dendl;
+ ldpp_dout(this, 5) << "Missing period id" << dendl;
op_ret = -EINVAL;
return;
}
}
RGWMetadataLog meta_log{s->cct, store->svc()->zone, store->svc()->cls, period};
- op_ret = meta_log.get_info(shard_id, &info);
+ op_ret = meta_log.get_info(this, shard_id, &info);
}
void RGWOp_MDLog_ShardInfo::send_response() {
if (s->info.args.exists("start-time") ||
s->info.args.exists("end-time")) {
- dout(5) << "start-time and end-time are no longer accepted" << dendl;
+ ldpp_dout(this, 5) << "start-time and end-time are no longer accepted" << dendl;
op_ret = -EINVAL;
}
if (s->info.args.exists("start-marker")) {
- dout(5) << "start-marker is no longer accepted" << dendl;
+ ldpp_dout(this, 5) << "start-marker is no longer accepted" << dendl;
op_ret = -EINVAL;
}
if (!s->info.args.exists("marker")) {
marker = s->info.args.get("end-marker");
} else {
- dout(5) << "end-marker and marker cannot both be provided" << dendl;
+ ldpp_dout(this, 5) << "end-marker and marker cannot both be provided" << dendl;
op_ret = -EINVAL;
}
}
shard_id = (unsigned)strict_strtol(shard.c_str(), 10, &err);
if (!err.empty()) {
- dout(5) << "Error parsing shard_id " << shard << dendl;
+ ldpp_dout(this, 5) << "Error parsing shard_id " << shard << dendl;
op_ret = -EINVAL;
return;
}
}
if (period.empty()) {
- ldout(s->cct, 5) << "Missing period id trying to use current" << dendl;
+ ldpp_dout(this, 5) << "Missing period id trying to use current" << dendl;
period = store->svc()->zone->get_current_period_id();
if (period.empty()) {
- ldout(s->cct, 5) << "Missing period id" << dendl;
+ ldpp_dout(this, 5) << "Missing period id" << dendl;
op_ret = -EINVAL;
return;
}
}
RGWMetadataLog meta_log{s->cct, store->svc()->zone, store->svc()->cls, period};
- op_ret = meta_log.trim(shard_id, {}, {}, {}, marker);
+ op_ret = meta_log.trim(this, shard_id, {}, {}, {}, marker);
}
void RGWOp_MDLog_Lock::execute(optional_yield y) {
zone_id = s->info.args.get("zone-id");
if (period.empty()) {
- ldout(s->cct, 5) << "Missing period id trying to use current" << dendl;
+ ldpp_dout(this, 5) << "Missing period id trying to use current" << dendl;
period = store->svc()->zone->get_current_period_id();
}
(duration_str.empty()) ||
locker_id.empty() ||
zone_id.empty()) {
- dout(5) << "Error invalid parameter list" << dendl;
+ ldpp_dout(this, 5) << "Error invalid parameter list" << dendl;
op_ret = -EINVAL;
return;
}
string err;
shard_id = (unsigned)strict_strtol(shard_id_str.c_str(), 10, &err);
if (!err.empty()) {
- dout(5) << "Error parsing shard_id param " << shard_id_str << dendl;
+ ldpp_dout(this, 5) << "Error parsing shard_id param " << shard_id_str << dendl;
op_ret = -EINVAL;
return;
}
unsigned dur;
dur = (unsigned)strict_strtol(duration_str.c_str(), 10, &err);
if (!err.empty() || dur <= 0) {
- dout(5) << "invalid length param " << duration_str << dendl;
+ ldpp_dout(this, 5) << "invalid length param " << duration_str << dendl;
op_ret = -EINVAL;
return;
}
- op_ret = meta_log.lock_exclusive(shard_id, make_timespan(dur), zone_id,
+ op_ret = meta_log.lock_exclusive(s, shard_id, make_timespan(dur), zone_id,
locker_id);
if (op_ret == -EBUSY)
op_ret = -ERR_LOCKED;
zone_id = s->info.args.get("zone-id");
if (period.empty()) {
- ldout(s->cct, 5) << "Missing period id trying to use current" << dendl;
+ ldpp_dout(this, 5) << "Missing period id trying to use current" << dendl;
period = store->svc()->zone->get_current_period_id();
}
shard_id_str.empty() ||
locker_id.empty() ||
zone_id.empty()) {
- dout(5) << "Error invalid parameter list" << dendl;
+ ldpp_dout(this, 5) << "Error invalid parameter list" << dendl;
op_ret = -EINVAL;
return;
}
string err;
shard_id = (unsigned)strict_strtol(shard_id_str.c_str(), 10, &err);
if (!err.empty()) {
- dout(5) << "Error parsing shard_id param " << shard_id_str << dendl;
+ ldpp_dout(this, 5) << "Error parsing shard_id param " << shard_id_str << dendl;
op_ret = -EINVAL;
return;
}
RGWMetadataLog meta_log{s->cct, store->svc()->zone, store->svc()->cls, period};
- op_ret = meta_log.unlock(shard_id, zone_id, locker_id);
+ op_ret = meta_log.unlock(s, shard_id, zone_id, locker_id);
}
void RGWOp_MDLog_Notify::execute(optional_yield y) {
}
char* buf = data.c_str();
- ldout(s->cct, 20) << __func__ << "(): read data: " << buf << dendl;
+ ldpp_dout(this, 20) << __func__ << "(): read data: " << buf << dendl;
JSONParser p;
r = p.parse(buf, data.length());
if (r < 0) {
- ldout(s->cct, 0) << "ERROR: failed to parse JSON" << dendl;
+ ldpp_dout(this, 0) << "ERROR: failed to parse JSON" << dendl;
op_ret = r;
return;
}
try {
decode_json_obj(updated_shards, &p);
} catch (JSONDecoder::err& err) {
- ldout(s->cct, 0) << "ERROR: failed to decode JSON" << dendl;
+ ldpp_dout(this, 0) << "ERROR: failed to decode JSON" << dendl;
op_ret = -EINVAL;
return;
}
if (store->ctx()->_conf->subsys.should_gather<ceph_subsys_rgw, 20>()) {
for (set<int>::iterator iter = updated_shards.begin(); iter != updated_shards.end(); ++iter) {
- ldout(s->cct, 20) << __func__ << "(): updated shard=" << *iter << dendl;
+ ldpp_dout(this, 20) << __func__ << "(): updated shard=" << *iter << dendl;
}
}
unsigned max_entries;
if (bucket_name.empty() && bucket_instance.empty()) {
- dout(5) << "ERROR: neither bucket nor bucket instance specified" << dendl;
+ ldpp_dout(this, 5) << "ERROR: neither bucket nor bucket instance specified" << dendl;
op_ret = -EINVAL;
return;
}
if (!bucket_instance.empty()) {
rgw_bucket b(rgw_bucket_key(tenant_name, bn, bucket_instance));
- op_ret = store->getRados()->get_bucket_instance_info(*s->sysobj_ctx, b, bucket_info, NULL, NULL, s->yield);
+ op_ret = store->getRados()->get_bucket_instance_info(*s->sysobj_ctx, b, bucket_info, NULL, NULL, s->yield, this);
if (op_ret < 0) {
- ldpp_dout(s, 5) << "could not get bucket instance info for bucket instance id=" << bucket_instance << dendl;
+ ldpp_dout(this, 5) << "could not get bucket instance info for bucket instance id=" << bucket_instance << dendl;
return;
}
} else { /* !bucket_name.empty() */
op_ret = store->getRados()->get_bucket_info(store->svc(), tenant_name, bucket_name, bucket_info, NULL, s->yield, NULL);
if (op_ret < 0) {
- ldpp_dout(s, 5) << "could not get bucket info for bucket=" << bucket_name << dendl;
+ ldpp_dout(this, 5) << "could not get bucket info for bucket=" << bucket_name << dendl;
return;
}
}
send_response();
do {
list<rgw_bi_log_entry> entries;
- int ret = store->svc()->bilog_rados->log_list(bucket_info, shard_id,
+ int ret = store->svc()->bilog_rados->log_list(s, bucket_info, shard_id,
marker, max_entries - count,
entries, &truncated);
if (ret < 0) {
- ldpp_dout(s, 5) << "ERROR: list_bi_log_entries()" << dendl;
+ ldpp_dout(this, 5) << "ERROR: list_bi_log_entries()" << dendl;
return;
}
RGWBucketInfo bucket_info;
if (bucket_name.empty() && bucket_instance.empty()) {
- ldpp_dout(s, 5) << "ERROR: neither bucket nor bucket instance specified" << dendl;
+ ldpp_dout(this, 5) << "ERROR: neither bucket nor bucket instance specified" << dendl;
op_ret = -EINVAL;
return;
}
if (!bucket_instance.empty()) {
rgw_bucket b(rgw_bucket_key(tenant_name, bn, bucket_instance));
- op_ret = store->getRados()->get_bucket_instance_info(*s->sysobj_ctx, b, bucket_info, NULL, NULL, s->yield);
+ op_ret = store->getRados()->get_bucket_instance_info(*s->sysobj_ctx, b, bucket_info, NULL, NULL, s->yield, this);
if (op_ret < 0) {
- ldpp_dout(s, 5) << "could not get bucket instance info for bucket instance id=" << bucket_instance << dendl;
+ ldpp_dout(this, 5) << "could not get bucket instance info for bucket instance id=" << bucket_instance << dendl;
return;
}
} else { /* !bucket_name.empty() */
op_ret = store->getRados()->get_bucket_info(store->svc(), tenant_name, bucket_name, bucket_info, NULL, s->yield, NULL);
if (op_ret < 0) {
- ldpp_dout(s, 5) << "could not get bucket info for bucket=" << bucket_name << dendl;
+ ldpp_dout(this, 5) << "could not get bucket info for bucket=" << bucket_name << dendl;
return;
}
}
map<RGWObjCategory, RGWStorageStats> stats;
- int ret = store->getRados()->get_bucket_stats(bucket_info, shard_id, &bucket_ver, &master_ver, stats, &max_marker, &syncstopped);
+ int ret = store->getRados()->get_bucket_stats(s, bucket_info, shard_id, &bucket_ver, &master_ver, stats, &max_marker, &syncstopped);
if (ret < 0 && ret != -ENOENT) {
op_ret = ret;
return;
op_ret = 0;
if ((bucket_name.empty() && bucket_instance.empty()) ||
end_marker.empty()) {
- ldpp_dout(s, 5) << "ERROR: one of bucket and bucket instance, and also end-marker is mandatory" << dendl;
+ ldpp_dout(this, 5) << "ERROR: one of bucket and bucket instance, and also end-marker is mandatory" << dendl;
op_ret = -EINVAL;
return;
}
if (!bucket_instance.empty()) {
rgw_bucket b(rgw_bucket_key(tenant_name, bn, bucket_instance));
- op_ret = store->getRados()->get_bucket_instance_info(*s->sysobj_ctx, b, bucket_info, NULL, NULL, s->yield);
+ op_ret = store->getRados()->get_bucket_instance_info(*s->sysobj_ctx, b, bucket_info, NULL, NULL, s->yield, this);
if (op_ret < 0) {
- ldpp_dout(s, 5) << "could not get bucket instance info for bucket instance id=" << bucket_instance << dendl;
+ ldpp_dout(this, 5) << "could not get bucket instance info for bucket instance id=" << bucket_instance << dendl;
return;
}
} else { /* !bucket_name.empty() */
op_ret = store->getRados()->get_bucket_info(store->svc(), tenant_name, bucket_name, bucket_info, NULL, s->yield, NULL);
if (op_ret < 0) {
- ldpp_dout(s, 5) << "could not get bucket info for bucket=" << bucket_name << dendl;
+ ldpp_dout(this, 5) << "could not get bucket info for bucket=" << bucket_name << dendl;
return;
}
}
- op_ret = store->svc()->bilog_rados->log_trim(bucket_info, shard_id, start_marker, end_marker);
+ op_ret = store->svc()->bilog_rados->log_trim(s, bucket_info, shard_id, start_marker, end_marker);
if (op_ret < 0) {
- ldpp_dout(s, 5) << "ERROR: trim_bi_log_entries() " << dendl;
+ ldpp_dout(this, 5) << "ERROR: trim_bi_log_entries() " << dendl;
}
return;
}
if (s->info.args.exists("start-time") ||
s->info.args.exists("end-time")) {
- dout(5) << "start-time and end-time are no longer accepted" << dendl;
+ ldpp_dout(this, 5) << "start-time and end-time are no longer accepted" << dendl;
op_ret = -EINVAL;
}
shard_id = (unsigned)strict_strtol(shard.c_str(), 10, &err);
if (!err.empty()) {
- dout(5) << "Error parsing shard_id " << shard << dendl;
+ ldpp_dout(this, 5) << "Error parsing shard_id " << shard << dendl;
op_ret = -EINVAL;
return;
}
if (!max_entries_str.empty()) {
max_entries = (unsigned)strict_strtol(max_entries_str.c_str(), 10, &err);
if (!err.empty()) {
- dout(5) << "Error parsing max-entries " << max_entries_str << dendl;
+ ldpp_dout(this, 5) << "Error parsing max-entries " << max_entries_str << dendl;
op_ret = -EINVAL;
return;
}
// Note that last_marker is updated to be the marker of the last
// entry listed
- op_ret = store->svc()->datalog_rados->list_entries(shard_id,
+ op_ret = store->svc()->datalog_rados->list_entries(this, shard_id,
max_entries, entries,
marker, &last_marker,
&truncated);
unsigned shard_id = (unsigned)strict_strtol(shard.c_str(), 10, &err);
if (!err.empty()) {
- dout(5) << "Error parsing shard_id " << shard << dendl;
+ ldpp_dout(this, 5) << "Error parsing shard_id " << shard << dendl;
op_ret = -EINVAL;
return;
}
- op_ret = store->svc()->datalog_rados->get_info(shard_id, &info);
+ op_ret = store->svc()->datalog_rados->get_info(this, shard_id, &info);
}
void RGWOp_DATALog_ShardInfo::send_response() {
}
char* buf = data.c_str();
- ldout(s->cct, 20) << __func__ << "(): read data: " << buf << dendl;
+ ldpp_dout(this, 20) << __func__ << "(): read data: " << buf << dendl;
JSONParser p;
r = p.parse(buf, data.length());
if (r < 0) {
- ldout(s->cct, 0) << "ERROR: failed to parse JSON" << dendl;
+ ldpp_dout(this, 0) << "ERROR: failed to parse JSON" << dendl;
op_ret = r;
return;
}
try {
decode_json_obj(updated_shards, &p);
} catch (JSONDecoder::err& err) {
- ldout(s->cct, 0) << "ERROR: failed to decode JSON" << dendl;
+ ldpp_dout(this, 0) << "ERROR: failed to decode JSON" << dendl;
op_ret = -EINVAL;
return;
}
if (store->ctx()->_conf->subsys.should_gather<ceph_subsys_rgw, 20>()) {
for (map<int, set<string> >::iterator iter = updated_shards.begin(); iter != updated_shards.end(); ++iter) {
- ldout(s->cct, 20) << __func__ << "(): updated shard=" << iter->first << dendl;
+ ldpp_dout(this, 20) << __func__ << "(): updated shard=" << iter->first << dendl;
set<string>& keys = iter->second;
for (set<string>::iterator kiter = keys.begin(); kiter != keys.end(); ++kiter) {
- ldout(s->cct, 20) << __func__ << "(): modified key=" << *kiter << dendl;
+ ldpp_dout(this, 20) << __func__ << "(): modified key=" << *kiter << dendl;
}
}
}
if (s->info.args.exists("start-time") ||
s->info.args.exists("end-time")) {
- dout(5) << "start-time and end-time are no longer accepted" << dendl;
+ ldpp_dout(this, 5) << "start-time and end-time are no longer accepted" << dendl;
op_ret = -EINVAL;
}
if (s->info.args.exists("start-marker")) {
- dout(5) << "start-marker is no longer accepted" << dendl;
+ ldpp_dout(this, 5) << "start-marker is no longer accepted" << dendl;
op_ret = -EINVAL;
}
if (!s->info.args.exists("marker")) {
marker = s->info.args.get("end-marker");
} else {
- dout(5) << "end-marker and marker cannot both be provided" << dendl;
+ ldpp_dout(this, 5) << "end-marker and marker cannot both be provided" << dendl;
op_ret = -EINVAL;
}
}
shard_id = (unsigned)strict_strtol(shard.c_str(), 10, &err);
if (!err.empty()) {
- dout(5) << "Error parsing shard_id " << shard << dendl;
+ ldpp_dout(this, 5) << "Error parsing shard_id " << shard << dendl;
op_ret = -EINVAL;
return;
}
return;
}
- op_ret = store->svc()->datalog_rados->trim_entries(shard_id, marker);
+ op_ret = store->svc()->datalog_rados->trim_entries(this, shard_id, marker);
}
// not in header to avoid pulling in rgw_sync.h
{
auto sync = store->getRados()->get_meta_sync_manager();
if (sync == nullptr) {
- ldout(s->cct, 1) << "no sync manager" << dendl;
+ ldpp_dout(this, 1) << "no sync manager" << dendl;
op_ret = -ENOENT;
return;
}
- op_ret = sync->read_sync_status(&status);
+ op_ret = sync->read_sync_status(this, &status);
}
void RGWOp_MDLog_Status::send_response()
key = source_key;
}
if (key.empty()) {
- ldpp_dout(s, 4) << "no 'bucket' provided" << dendl;
+ ldpp_dout(this, 4) << "no 'bucket' provided" << dendl;
op_ret = -EINVAL;
return;
}
int shard_id{-1}; // unused
op_ret = rgw_bucket_parse_bucket_key(s->cct, key, &bucket, &shard_id);
if (op_ret < 0) {
- ldpp_dout(s, 4) << "invalid 'bucket' provided" << dendl;
+ ldpp_dout(this, 4) << "invalid 'bucket' provided" << dendl;
op_ret = -EINVAL;
return;
}
// read the bucket instance info for num_shards
auto ctx = store->svc()->sysobj->init_obj_ctx();
RGWBucketInfo info;
- op_ret = store->getRados()->get_bucket_instance_info(ctx, bucket, info, nullptr, nullptr, s->yield);
+ op_ret = store->getRados()->get_bucket_instance_info(ctx, bucket, info, nullptr, nullptr, s->yield, this);
if (op_ret < 0) {
- ldpp_dout(s, 4) << "failed to read bucket info: " << cpp_strerror(op_ret) << dendl;
+ ldpp_dout(this, 4) << "failed to read bucket info: " << cpp_strerror(op_ret) << dendl;
return;
}
} else {
op_ret = rgw_bucket_parse_bucket_key(s->cct, source_key, &source_bucket, nullptr);
if (op_ret < 0) {
- ldpp_dout(s, 4) << "invalid 'source-bucket' provided (key=" << source_key << ")" << dendl;
+ ldpp_dout(this, 4) << "invalid 'source-bucket' provided (key=" << source_key << ")" << dendl;
return;
}
}
pipe.dest.zone = local_zone_id;
pipe.dest.bucket = info.bucket;
- ldout(s->cct, 20) << "RGWOp_BILog_Status::execute(optional_yield y): getting sync status for pipe=" << pipe << dendl;
+ ldpp_dout(this, 20) << "RGWOp_BILog_Status::execute(optional_yield y): getting sync status for pipe=" << pipe << dendl;
op_ret = rgw_bucket_sync_status(this, store, pipe, info, nullptr, &status);
if (op_ret < 0) {
- lderr(s->cct) << "ERROR: rgw_bucket_sync_status() on pipe=" << pipe << " returned ret=" << op_ret << dendl;
+ ldpp_dout(this, -1) << "ERROR: rgw_bucket_sync_status() on pipe=" << pipe << " returned ret=" << op_ret << dendl;
}
return;
}
rgw_zone_id source_zone_id(source_zone);
RGWBucketSyncPolicyHandlerRef source_handler;
- op_ret = store->ctl()->bucket->get_sync_policy_handler(source_zone_id, source_bucket, &source_handler, y);
+ op_ret = store->ctl()->bucket->get_sync_policy_handler(source_zone_id, source_bucket, &source_handler, y, s);
if (op_ret < 0) {
- lderr(s->cct) << "could not get bucket sync policy handler (r=" << op_ret << ")" << dendl;
+ ldpp_dout(this, -1) << "could not get bucket sync policy handler (r=" << op_ret << ")" << dendl;
return;
}
for (auto& entry : local_dests) {
auto pipe = entry.second;
- ldout(s->cct, 20) << "RGWOp_BILog_Status::execute(optional_yield y): getting sync status for pipe=" << pipe << dendl;
+ ldpp_dout(this, 20) << "RGWOp_BILog_Status::execute(optional_yield y): getting sync status for pipe=" << pipe << dendl;
RGWBucketInfo *pinfo = &info;
std::optional<RGWBucketInfo> opt_dest_info;
if (!pipe.dest.bucket) {
/* Uh oh, something went wrong */
- ldout(s->cct, 20) << "ERROR: RGWOp_BILog_Status::execute(optional_yield y): BUG: pipe.dest.bucket was not initialized" << pipe << dendl;
+ ldpp_dout(this, 20) << "ERROR: RGWOp_BILog_Status::execute(optional_yield y): BUG: pipe.dest.bucket was not initialized" << pipe << dendl;
op_ret = -EIO;
return;
}
op_ret = store->ctl()->bucket->read_bucket_info(*pipe.dest.bucket,
pinfo,
s->yield,
+ s,
RGWBucketCtl::BucketInstance::GetParams(),
nullptr);
if (op_ret < 0) {
- ldpp_dout(s, 4) << "failed to read target bucket info (bucket=: " << cpp_strerror(op_ret) << dendl;
+ ldpp_dout(this, 4) << "failed to read target bucket info (bucket=: " << cpp_strerror(op_ret) << dendl;
return;
}
int r = rgw_bucket_sync_status(this, store, pipe, *pinfo, &info, ¤t_status);
if (r < 0) {
- lderr(s->cct) << "ERROR: rgw_bucket_sync_status() on pipe=" << pipe << " returned ret=" << r << dendl;
+ ldpp_dout(this, -1) << "ERROR: rgw_bucket_sync_status() on pipe=" << pipe << " returned ret=" << r << dendl;
op_ret = r;
return;
}
if (current_status.size() !=
status.size()) {
op_ret = -EINVAL;
- lderr(s->cct) << "ERROR: different number of shards for sync status of buckets syncing from the same source: status.size()= " << status.size() << " current_status.size()=" << current_status.size() << dendl;
+ ldpp_dout(this, -1) << "ERROR: different number of shards for sync status of buckets syncing from the same source: status.size()= " << status.size() << " current_status.size()=" << current_status.size() << dendl;
return;
}
auto m = status.begin();
const auto source_zone = s->info.args.get("source-zone");
auto sync = store->getRados()->get_data_sync_manager(source_zone);
if (sync == nullptr) {
- ldout(s->cct, 1) << "no sync manager for source-zone " << source_zone << dendl;
+ ldpp_dout(this, 1) << "no sync manager for source-zone " << source_zone << dendl;
op_ret = -ENOENT;
return;
}
- op_ret = sync->read_sync_status(&status);
+ op_ret = sync->read_sync_status(this, &status);
}
void RGWOp_DATALog_Status::send_response()
auto meta_mgr = store->ctl()->meta.mgr;
/* Get keys */
- op_ret = meta_mgr->get(metadata_key, s->formatter, s->yield);
+ op_ret = meta_mgr->get(metadata_key, s->formatter, s->yield, s);
if (op_ret < 0) {
- dout(5) << "ERROR: can't get key: " << cpp_strerror(op_ret) << dendl;
+ ldpp_dout(s, 5) << "ERROR: can't get key: " << cpp_strerror(op_ret) << dendl;
return;
}
void RGWOp_Metadata_List::execute(optional_yield y) {
string marker;
- ldout(s->cct, 16) << __func__
+ ldpp_dout(this, 16) << __func__
<< " raw marker " << s->info.args.get("marker")
<< dendl;
if (!marker.empty()) {
marker = rgw::from_base64(marker);
}
- ldout(s->cct, 16) << __func__
+ ldpp_dout(this, 16) << __func__
<< " marker " << marker << dendl;
} catch (...) {
marker = std::string("");
string err;
max_entries = (unsigned)strict_strtol(max_entries_str.c_str(), 10, &err);
if (!err.empty()) {
- dout(5) << "Error parsing max-entries " << max_entries_str << dendl;
+ ldpp_dout(this, 5) << "Error parsing max-entries " << max_entries_str << dendl;
op_ret = -EINVAL;
return;
}
marker = "3:bf885d8f:root::sorry_janefonda_665:head";
*/
- op_ret = store->ctl()->meta.mgr->list_keys_init(metadata_key, marker, &handle);
+ op_ret = store->ctl()->meta.mgr->list_keys_init(s, metadata_key, marker, &handle);
if (op_ret < 0) {
- dout(5) << "ERROR: can't get key: " << cpp_strerror(op_ret) << dendl;
+ ldpp_dout(this, 5) << "ERROR: can't get key: " << cpp_strerror(op_ret) << dendl;
return;
}
left = (max_entries_specified ? max_entries - count : max);
op_ret = meta_mgr->list_keys_next(handle, left, keys, &truncated);
if (op_ret < 0) {
- dout(5) << "ERROR: lists_keys_next(): " << cpp_strerror(op_ret)
+ ldpp_dout(this, 5) << "ERROR: lists_keys_next(): " << cpp_strerror(op_ret)
<< dendl;
return;
}
}
read_len = recv_body(s, data, cl);
if (cl != (size_t)read_len) {
- dout(10) << "recv_body incomplete" << dendl;
+ ldpp_dout(this, 10) << "recv_body incomplete" << dendl;
}
if (read_len < 0) {
free(data);
}
}
- op_ret = store->ctl()->meta.mgr->put(metadata_key, bl, s->yield, sync_type,
+ op_ret = store->ctl()->meta.mgr->put(metadata_key, bl, s->yield, s, sync_type,
false, &ondisk_version);
if (op_ret < 0) {
- dout(5) << "ERROR: can't put key: " << cpp_strerror(op_ret) << dendl;
+ ldpp_dout(s, 5) << "ERROR: can't put key: " << cpp_strerror(op_ret) << dendl;
return;
}
// translate internal codes into return header
string metadata_key;
frame_metadata_key(s, metadata_key);
- op_ret = store->ctl()->meta.mgr->remove(metadata_key, s->yield);
+ op_ret = store->ctl()->meta.mgr->remove(metadata_key, s->yield, s);
if (op_ret < 0) {
- dout(5) << "ERROR: can't remove key: " << cpp_strerror(op_ret) << dendl;
+ ldpp_dout(s, 5) << "ERROR: can't remove key: " << cpp_strerror(op_ret) << dendl;
return;
}
op_ret = 0;
provider_arn = s->info.args.get("OpenIDConnectProviderArn");
if (provider_arn.empty()) {
- ldout(s->cct, 20) << "ERROR: Provider ARN is empty"<< dendl;
+ ldpp_dout(this, 20) << "ERROR: Provider ARN is empty"<< dendl;
return -EINVAL;
}
}
if (provider_url.empty() || thumbprints.empty()) {
- ldout(s->cct, 20) << "ERROR: one of url or thumbprints is empty" << dendl;
+ ldpp_dout(this, 20) << "ERROR: one of url or thumbprints is empty" << dendl;
return -EINVAL;
}
RGWOIDCProvider provider(s->cct, store->getRados()->pctl, provider_url,
s->user->get_tenant(), client_ids, thumbprints);
- op_ret = provider.create(true, y);
+ op_ret = provider.create(s, true, y);
if (op_ret == 0) {
s->formatter->open_object_section("CreateOpenIDConnectProviderResponse");
void RGWDeleteOIDCProvider::execute(optional_yield y)
{
RGWOIDCProvider provider(s->cct, store->getRados()->pctl, provider_arn, s->user->get_tenant());
- op_ret = provider.delete_obj(y);
+ op_ret = provider.delete_obj(s, y);
if (op_ret < 0 && op_ret != -ENOENT && op_ret != -EINVAL) {
op_ret = ERR_INTERNAL_ERROR;
void RGWGetOIDCProvider::execute(optional_yield y)
{
RGWOIDCProvider provider(s->cct, store->getRados()->pctl, provider_arn, s->user->get_tenant());
- op_ret = provider.get();
+ op_ret = provider.get(s);
if (op_ret < 0 && op_ret != -ENOENT && op_ret != -EINVAL) {
op_ret = ERR_INTERNAL_ERROR;
void RGWListOIDCProviders::execute(optional_yield y)
{
vector<RGWOIDCProvider> result;
- op_ret = RGWOIDCProvider::get_providers(store->getRados(), s->user->get_tenant(), result);
+ op_ret = RGWOIDCProvider::get_providers(s, store->getRados(), s->user->get_tenant(), result);
if (op_ret == 0) {
s->formatter->open_array_section("ListOpenIDConnectProvidersResponse");
for (const auto& it : result) {
s->formatter->open_object_section("Arn");
auto& arn = it.get_arn();
- ldout(s->cct, 0) << "ARN: " << arn << dendl;
+ ldpp_dout(s, 0) << "ARN: " << arn << dendl;
s->formatter->dump_string("Arn", arn);
s->formatter->close_section();
}
int get_params() override {
topic_name = s->info.args.get("Name");
if (topic_name.empty()) {
- ldout(s->cct, 1) << "CreateTopic Action 'Name' argument is missing" << dendl;
+ ldpp_dout(this, 1) << "CreateTopic Action 'Name' argument is missing" << dendl;
return -EINVAL;
}
if (!dest.push_endpoint.empty() && dest.persistent) {
const auto ret = rgw::notify::add_persistent_topic(topic_name, s->yield);
if (ret < 0) {
- ldout(s->cct, 1) << "CreateTopic Action failed to create queue for persistent topics. error:" << ret << dendl;
+ ldpp_dout(this, 1) << "CreateTopic Action failed to create queue for persistent topics. error:" << ret << dendl;
return ret;
}
}
const auto topic_arn = rgw::ARN::parse((s->info.args.get("TopicArn")));
if (!topic_arn || topic_arn->resource.empty()) {
- ldout(s->cct, 1) << "GetTopic Action 'TopicArn' argument is missing or invalid" << dendl;
+ ldpp_dout(this, 1) << "GetTopic Action 'TopicArn' argument is missing or invalid" << dendl;
return -EINVAL;
}
const auto topic_arn = rgw::ARN::parse((s->info.args.get("TopicArn")));
if (!topic_arn || topic_arn->resource.empty()) {
- ldout(s->cct, 1) << "GetTopicAttribute Action 'TopicArn' argument is missing or invalid" << dendl;
+ ldpp_dout(this, 1) << "GetTopicAttribute Action 'TopicArn' argument is missing or invalid" << dendl;
return -EINVAL;
}
const auto topic_arn = rgw::ARN::parse((s->info.args.get("TopicArn")));
if (!topic_arn || topic_arn->resource.empty()) {
- ldout(s->cct, 1) << "DeleteTopic Action 'TopicArn' argument is missing or invalid" << dendl;
+ ldpp_dout(this, 1) << "DeleteTopic Action 'TopicArn' argument is missing or invalid" << dendl;
return -EINVAL;
}
return 0;
}
if (ret < 0) {
- ldout(s->cct, 1) << "DeleteTopic Action failed to remove queue for persistent topics. error:" << ret << dendl;
+ ldpp_dout(this, 1) << "DeleteTopic Action failed to remove queue for persistent topics. error:" << ret << dendl;
return ret;
}
void RGWHandler_REST_PSTopic_AWS::rgw_topic_parse_input() {
if (post_body.size() > 0) {
- ldout(s->cct, 10) << "Content of POST: " << post_body << dendl;
+ ldpp_dout(s, 10) << "Content of POST: " << post_body << dendl;
if (post_body.find("Action") != string::npos) {
const boost::char_separator<char> sep("&");
std::tie(r, data) = rgw_rest_read_all_input(s, max_size, false);
if (r < 0) {
- ldout(s->cct, 1) << "failed to read XML payload" << dendl;
+ ldpp_dout(this, 1) << "failed to read XML payload" << dendl;
return r;
}
if (data.length() == 0) {
- ldout(s->cct, 1) << "XML payload missing" << dendl;
+ ldpp_dout(this, 1) << "XML payload missing" << dendl;
return -EINVAL;
}
RGWXMLDecoder::XMLParser parser;
if (!parser.init()){
- ldout(s->cct, 1) << "failed to initialize XML parser" << dendl;
+ ldpp_dout(this, 1) << "failed to initialize XML parser" << dendl;
return -EINVAL;
}
if (!parser.parse(data.c_str(), data.length(), 1)) {
- ldout(s->cct, 1) << "failed to parse XML payload" << dendl;
+ ldpp_dout(this, 1) << "failed to parse XML payload" << dendl;
return -ERR_MALFORMED_XML;
}
try {
// NotificationConfigurations is mandatory
RGWXMLDecoder::decode_xml("NotificationConfiguration", configurations, &parser, true);
} catch (RGWXMLDecoder::err& err) {
- ldout(s->cct, 1) << "failed to parse XML payload. error: " << err << dendl;
+ ldpp_dout(this, 1) << "failed to parse XML payload. error: " << err << dendl;
return -ERR_MALFORMED_XML;
}
return 0;
bool exists;
const auto no_value = s->info.args.get("notification", &exists);
if (!exists) {
- ldout(s->cct, 1) << "missing required param 'notification'" << dendl;
+ ldpp_dout(this, 1) << "missing required param 'notification'" << dendl;
return -EINVAL;
}
if (no_value.length() > 0) {
- ldout(s->cct, 1) << "param 'notification' should not have any value" << dendl;
+ ldpp_dout(this, 1) << "param 'notification' should not have any value" << dendl;
return -EINVAL;
}
if (s->bucket_name.empty()) {
- ldout(s->cct, 1) << "request must be on a bucket" << dendl;
+ ldpp_dout(this, 1) << "request must be on a bucket" << dendl;
return -EINVAL;
}
bucket_name = s->bucket_name;
for (const auto& c : configurations.list) {
const auto& notif_name = c.id;
if (notif_name.empty()) {
- ldout(s->cct, 1) << "missing notification id" << dendl;
+ ldpp_dout(this, 1) << "missing notification id" << dendl;
op_ret = -EINVAL;
return;
}
if (c.topic_arn.empty()) {
- ldout(s->cct, 1) << "missing topic ARN in notification: '" << notif_name << "'" << dendl;
+ ldpp_dout(this, 1) << "missing topic ARN in notification: '" << notif_name << "'" << dendl;
op_ret = -EINVAL;
return;
}
const auto arn = rgw::ARN::parse(c.topic_arn);
if (!arn || arn->resource.empty()) {
- ldout(s->cct, 1) << "topic ARN has invalid format: '" << c.topic_arn << "' in notification: '" << notif_name << "'" << dendl;
+ ldpp_dout(this, 1) << "topic ARN has invalid format: '" << c.topic_arn << "' in notification: '" << notif_name << "'" << dendl;
op_ret = -EINVAL;
return;
}
if (std::find(c.events.begin(), c.events.end(), rgw::notify::UnknownEvent) != c.events.end()) {
- ldout(s->cct, 1) << "unknown event type in notification: '" << notif_name << "'" << dendl;
+ ldpp_dout(this, 1) << "unknown event type in notification: '" << notif_name << "'" << dendl;
op_ret = -EINVAL;
return;
}
rgw_pubsub_topic topic_info;
op_ret = ps->get_topic(topic_name, &topic_info);
if (op_ret < 0) {
- ldout(s->cct, 1) << "failed to get topic '" << topic_name << "', ret=" << op_ret << dendl;
+ ldpp_dout(this, 1) << "failed to get topic '" << topic_name << "', ret=" << op_ret << dendl;
return;
}
// make sure that full topic configuration match
// generate the internal topic. destination is stored here for the "push-only" case
// when no subscription exists
// ARN is cached to make the "GET" method faster
- op_ret = ps->create_topic(unique_topic_name, topic_info.dest, topic_info.arn, topic_info.opaque_data, y);
+ op_ret = ps->create_topic(this, unique_topic_name, topic_info.dest, topic_info.arn, topic_info.opaque_data, y);
if (op_ret < 0) {
- ldout(s->cct, 1) << "failed to auto-generate unique topic '" << unique_topic_name <<
+ ldpp_dout(this, 1) << "failed to auto-generate unique topic '" << unique_topic_name <<
"', ret=" << op_ret << dendl;
return;
}
- ldout(s->cct, 20) << "successfully auto-generated unique topic '" << unique_topic_name << "'" << dendl;
+ ldpp_dout(this, 20) << "successfully auto-generated unique topic '" << unique_topic_name << "'" << dendl;
// generate the notification
rgw::notify::EventTypeList events;
- op_ret = b->create_notification(unique_topic_name, c.events, std::make_optional(c.filter), notif_name, y);
+ op_ret = b->create_notification(this, unique_topic_name, c.events, std::make_optional(c.filter), notif_name, y);
if (op_ret < 0) {
- ldout(s->cct, 1) << "failed to auto-generate notification for unique topic '" << unique_topic_name <<
+ ldpp_dout(this, 1) << "failed to auto-generate notification for unique topic '" << unique_topic_name <<
"', ret=" << op_ret << dendl;
// rollback generated topic (ignore return value)
- ps->remove_topic(unique_topic_name, y);
+ ps->remove_topic(this, unique_topic_name, y);
return;
}
- ldout(s->cct, 20) << "successfully auto-generated notification for unique topic '" << unique_topic_name << "'" << dendl;
+ ldpp_dout(this, 20) << "successfully auto-generated notification for unique topic '" << unique_topic_name << "'" << dendl;
if (!push_only) {
// generate the subscription with destination information from the original topic
dest.bucket_name = data_bucket_prefix + s->owner.get_id().to_str() + "-" + unique_topic_name;
dest.oid_prefix = data_oid_prefix + notif_name + "/";
auto sub = ps->get_sub(notif_name);
- op_ret = sub->subscribe(unique_topic_name, dest, y, notif_name);
+ op_ret = sub->subscribe(this, unique_topic_name, dest, y, notif_name);
if (op_ret < 0) {
- ldout(s->cct, 1) << "failed to auto-generate subscription '" << notif_name << "', ret=" << op_ret << dendl;
+ ldpp_dout(this, 1) << "failed to auto-generate subscription '" << notif_name << "', ret=" << op_ret << dendl;
// rollback generated notification (ignore return value)
- b->remove_notification(unique_topic_name, y);
+ b->remove_notification(this, unique_topic_name, y);
// rollback generated topic (ignore return value)
- ps->remove_topic(unique_topic_name, y);
+ ps->remove_topic(this, unique_topic_name, y);
return;
}
- ldout(s->cct, 20) << "successfully auto-generated subscription '" << notif_name << "'" << dendl;
+ ldpp_dout(this, 20) << "successfully auto-generated subscription '" << notif_name << "'" << dendl;
}
}
}
bool exists;
notif_name = s->info.args.get("notification", &exists);
if (!exists) {
- ldout(s->cct, 1) << "missing required param 'notification'" << dendl;
+ ldpp_dout(this, 1) << "missing required param 'notification'" << dendl;
return -EINVAL;
}
if (s->bucket_name.empty()) {
- ldout(s->cct, 1) << "request must be on a bucket" << dendl;
+ ldpp_dout(this, 1) << "request must be on a bucket" << dendl;
return -EINVAL;
}
bucket_name = s->bucket_name;
}
void remove_notification_by_topic(const std::string& topic_name, const RGWPubSub::BucketRef& b, optional_yield y) {
- op_ret = b->remove_notification(topic_name, y);
+ op_ret = b->remove_notification(this, topic_name, y);
if (op_ret < 0) {
- ldout(s->cct, 1) << "failed to remove notification of topic '" << topic_name << "', ret=" << op_ret << dendl;
+ ldpp_dout(this, 1) << "failed to remove notification of topic '" << topic_name << "', ret=" << op_ret << dendl;
}
- op_ret = ps->remove_topic(topic_name, y);
+ op_ret = ps->remove_topic(this, topic_name, y);
if (op_ret < 0) {
- ldout(s->cct, 1) << "failed to remove auto-generated topic '" << topic_name << "', ret=" << op_ret << dendl;
+ ldpp_dout(this, 1) << "failed to remove auto-generated topic '" << topic_name << "', ret=" << op_ret << dendl;
}
}
rgw_pubsub_bucket_topics bucket_topics;
op_ret = b->get_topics(&bucket_topics);
if (op_ret < 0) {
- ldout(s->cct, 1) << "failed to get list of topics from bucket '" << bucket_info.bucket.name << "', ret=" << op_ret << dendl;
+ ldpp_dout(this, 1) << "failed to get list of topics from bucket '" << bucket_info.bucket.name << "', ret=" << op_ret << dendl;
return;
}
// remove the auto generated subscription according to notification name (if exist)
const auto unique_topic_name = unique_topic->get().topic.name;
auto sub = ps->get_sub(notif_name);
- op_ret = sub->unsubscribe(unique_topic_name, y);
+ op_ret = sub->unsubscribe(this, unique_topic_name, y);
if (op_ret < 0 && op_ret != -ENOENT) {
- ldout(s->cct, 1) << "failed to remove auto-generated subscription '" << notif_name << "', ret=" << op_ret << dendl;
+ ldpp_dout(this, 1) << "failed to remove auto-generated subscription '" << notif_name << "', ret=" << op_ret << dendl;
return;
}
remove_notification_by_topic(unique_topic_name, b, y);
return;
}
// notification to be removed is not found - considered success
- ldout(s->cct, 20) << "notification '" << notif_name << "' already removed" << dendl;
+ ldpp_dout(this, 20) << "notification '" << notif_name << "' already removed" << dendl;
return;
}
rgw_pubsub_sub_config sub_conf;
op_ret = sub->get_conf(&sub_conf);
if (op_ret < 0) {
- ldout(s->cct, 1) << "failed to get subscription '" << topic_sub_name << "' info, ret=" << op_ret << dendl;
+ ldpp_dout(this, 1) << "failed to get subscription '" << topic_sub_name << "' info, ret=" << op_ret << dendl;
return;
}
if (!sub_conf.s3_id.empty()) {
// S3 notification, has autogenerated subscription
const auto& sub_topic_name = sub_conf.topic;
- op_ret = sub->unsubscribe(sub_topic_name, y);
+ op_ret = sub->unsubscribe(this, sub_topic_name, y);
if (op_ret < 0) {
- ldout(s->cct, 1) << "failed to remove auto-generated subscription '" << topic_sub_name << "', ret=" << op_ret << dendl;
+ ldpp_dout(this, 1) << "failed to remove auto-generated subscription '" << topic_sub_name << "', ret=" << op_ret << dendl;
return;
}
}
bool exists;
notif_name = s->info.args.get("notification", &exists);
if (!exists) {
- ldout(s->cct, 1) << "missing required param 'notification'" << dendl;
+ ldpp_dout(this, 1) << "missing required param 'notification'" << dendl;
return -EINVAL;
}
if (s->bucket_name.empty()) {
- ldout(s->cct, 1) << "request must be on a bucket" << dendl;
+ ldpp_dout(this, 1) << "request must be on a bucket" << dendl;
return -EINVAL;
}
bucket_name = s->bucket_name;
rgw_pubsub_bucket_topics bucket_topics;
op_ret = b->get_topics(&bucket_topics);
if (op_ret < 0) {
- ldout(s->cct, 1) << "failed to get list of topics from bucket '" << bucket_info.bucket.name << "', ret=" << op_ret << dendl;
+ ldpp_dout(this, 1) << "failed to get list of topics from bucket '" << bucket_info.bucket.name << "', ret=" << op_ret << dendl;
return;
}
if (!notif_name.empty()) {
return;
}
op_ret = -ENOENT;
- ldout(s->cct, 1) << "failed to get notification info for '" << notif_name << "', ret=" << op_ret << dendl;
+ ldpp_dout(this, 1) << "failed to get notification info for '" << notif_name << "', ret=" << op_ret << dendl;
return;
}
// loop through all topics of the bucket
}
ps.emplace(store, s->owner.get_id().tenant);
- op_ret = ps->create_topic(topic_name, dest, topic_arn, opaque_data, y);
+ op_ret = ps->create_topic(this, topic_name, dest, topic_arn, opaque_data, y);
if (op_ret < 0) {
- ldout(s->cct, 1) << "failed to create topic '" << topic_name << "', ret=" << op_ret << dendl;
+ ldpp_dout(this, 1) << "failed to create topic '" << topic_name << "', ret=" << op_ret << dendl;
return;
}
- ldout(s->cct, 20) << "successfully created topic '" << topic_name << "'" << dendl;
+ ldpp_dout(this, 20) << "successfully created topic '" << topic_name << "'" << dendl;
}
void RGWPSListTopicsOp::execute(optional_yield y) {
// if there are no topics it is not considered an error
op_ret = op_ret == -ENOENT ? 0 : op_ret;
if (op_ret < 0) {
- ldout(s->cct, 1) << "failed to get topics, ret=" << op_ret << dendl;
+ ldpp_dout(this, 1) << "failed to get topics, ret=" << op_ret << dendl;
return;
}
if (topics_has_endpoint_secret(result) && !rgw_transport_is_secure(s->cct, *(s->info.env))) {
- ldout(s->cct, 1) << "topics contain secret and cannot be sent over insecure transport" << dendl;
+ ldpp_dout(this, 1) << "topics contain secret and cannot be sent over insecure transport" << dendl;
op_ret = -EPERM;
return;
}
- ldout(s->cct, 20) << "successfully got topics" << dendl;
+ ldpp_dout(this, 20) << "successfully got topics" << dendl;
}
void RGWPSGetTopicOp::execute(optional_yield y) {
ps.emplace(store, s->owner.get_id().tenant);
op_ret = ps->get_topic(topic_name, &result);
if (topic_has_endpoint_secret(result) && !rgw_transport_is_secure(s->cct, *(s->info.env))) {
- ldout(s->cct, 1) << "topic '" << topic_name << "' contain secret and cannot be sent over insecure transport" << dendl;
+ ldpp_dout(this, 1) << "topic '" << topic_name << "' contain secret and cannot be sent over insecure transport" << dendl;
op_ret = -EPERM;
return;
}
if (op_ret < 0) {
- ldout(s->cct, 1) << "failed to get topic '" << topic_name << "', ret=" << op_ret << dendl;
+ ldpp_dout(this, 1) << "failed to get topic '" << topic_name << "', ret=" << op_ret << dendl;
return;
}
- ldout(s->cct, 1) << "successfully got topic '" << topic_name << "'" << dendl;
+ ldpp_dout(this, 1) << "successfully got topic '" << topic_name << "'" << dendl;
}
void RGWPSDeleteTopicOp::execute(optional_yield y) {
return;
}
ps.emplace(store, s->owner.get_id().tenant);
- op_ret = ps->remove_topic(topic_name, y);
+ op_ret = ps->remove_topic(this, topic_name, y);
if (op_ret < 0) {
- ldout(s->cct, 1) << "failed to remove topic '" << topic_name << ", ret=" << op_ret << dendl;
+ ldpp_dout(this, 1) << "failed to remove topic '" << topic_name << ", ret=" << op_ret << dendl;
return;
}
- ldout(s->cct, 1) << "successfully removed topic '" << topic_name << "'" << dendl;
+ ldpp_dout(this, 1) << "successfully removed topic '" << topic_name << "'" << dendl;
}
void RGWPSCreateSubOp::execute(optional_yield y) {
}
ps.emplace(store, s->owner.get_id().tenant);
auto sub = ps->get_sub(sub_name);
- op_ret = sub->subscribe(topic_name, dest, y);
+ op_ret = sub->subscribe(this, topic_name, dest, y);
if (op_ret < 0) {
- ldout(s->cct, 1) << "failed to create subscription '" << sub_name << "', ret=" << op_ret << dendl;
+ ldpp_dout(this, 1) << "failed to create subscription '" << sub_name << "', ret=" << op_ret << dendl;
return;
}
- ldout(s->cct, 20) << "successfully created subscription '" << sub_name << "'" << dendl;
+ ldpp_dout(this, 20) << "successfully created subscription '" << sub_name << "'" << dendl;
}
void RGWPSGetSubOp::execute(optional_yield y) {
auto sub = ps->get_sub(sub_name);
op_ret = sub->get_conf(&result);
if (subscription_has_endpoint_secret(result) && !rgw_transport_is_secure(s->cct, *(s->info.env))) {
- ldout(s->cct, 1) << "subscription '" << sub_name << "' contain secret and cannot be sent over insecure transport" << dendl;
+ ldpp_dout(this, 1) << "subscription '" << sub_name << "' contain secret and cannot be sent over insecure transport" << dendl;
op_ret = -EPERM;
return;
}
if (op_ret < 0) {
- ldout(s->cct, 1) << "failed to get subscription '" << sub_name << "', ret=" << op_ret << dendl;
+ ldpp_dout(this, 1) << "failed to get subscription '" << sub_name << "', ret=" << op_ret << dendl;
return;
}
- ldout(s->cct, 20) << "successfully got subscription '" << sub_name << "'" << dendl;
+ ldpp_dout(this, 20) << "successfully got subscription '" << sub_name << "'" << dendl;
}
void RGWPSDeleteSubOp::execute(optional_yield y) {
}
ps.emplace(store, s->owner.get_id().tenant);
auto sub = ps->get_sub(sub_name);
- op_ret = sub->unsubscribe(topic_name, y);
+ op_ret = sub->unsubscribe(this, topic_name, y);
if (op_ret < 0) {
- ldout(s->cct, 1) << "failed to remove subscription '" << sub_name << "', ret=" << op_ret << dendl;
+ ldpp_dout(this, 1) << "failed to remove subscription '" << sub_name << "', ret=" << op_ret << dendl;
return;
}
- ldout(s->cct, 20) << "successfully removed subscription '" << sub_name << "'" << dendl;
+ ldpp_dout(this, 20) << "successfully removed subscription '" << sub_name << "'" << dendl;
}
void RGWPSAckSubEventOp::execute(optional_yield y) {
}
ps.emplace(store, s->owner.get_id().tenant);
auto sub = ps->get_sub_with_events(sub_name);
- op_ret = sub->remove_event(event_id);
+ op_ret = sub->remove_event(s, event_id);
if (op_ret < 0) {
- ldout(s->cct, 1) << "failed to ack event on subscription '" << sub_name << "', ret=" << op_ret << dendl;
+ ldpp_dout(this, 1) << "failed to ack event on subscription '" << sub_name << "', ret=" << op_ret << dendl;
return;
}
- ldout(s->cct, 20) << "successfully acked event on subscription '" << sub_name << "'" << dendl;
+ ldpp_dout(this, 20) << "successfully acked event on subscription '" << sub_name << "'" << dendl;
}
void RGWPSPullSubEventsOp::execute(optional_yield y) {
sub = ps->get_sub_with_events(sub_name);
if (!sub) {
op_ret = -ENOENT;
- ldout(s->cct, 1) << "failed to get subscription '" << sub_name << "' for events, ret=" << op_ret << dendl;
+ ldpp_dout(this, 1) << "failed to get subscription '" << sub_name << "' for events, ret=" << op_ret << dendl;
return;
}
- op_ret = sub->list_events(marker, max_entries);
+ op_ret = sub->list_events(s, marker, max_entries);
if (op_ret < 0) {
- ldout(s->cct, 1) << "failed to get events from subscription '" << sub_name << "', ret=" << op_ret << dendl;
+ ldpp_dout(this, 1) << "failed to get events from subscription '" << sub_name << "', ret=" << op_ret << dendl;
return;
}
- ldout(s->cct, 20) << "successfully got events from subscription '" << sub_name << "'" << dendl;
+ ldpp_dout(this, 20) << "successfully got events from subscription '" << sub_name << "'" << dendl;
}
ret = store->getRados()->get_bucket_info(store->svc(), id.tenant, bucket_name,
bucket_info, nullptr, y, nullptr);
if (ret < 0) {
- ldout(s->cct, 1) << "failed to get bucket info, cannot verify ownership" << dendl;
+ ldpp_dout(this, 1) << "failed to get bucket info, cannot verify ownership" << dendl;
return ret;
}
if (bucket_info.owner != id) {
- ldout(s->cct, 1) << "user doesn't own bucket, not allowed to create notification" << dendl;
+ ldpp_dout(this, 1) << "user doesn't own bucket, not allowed to create notification" << dendl;
return -EPERM;
}
return 0;
}
if (bucket_info.owner != s->owner.get_id()) {
- ldout(s->cct, 1) << "user doesn't own bucket, cannot remove notification" << dendl;
+ ldpp_dout(this, 1) << "user doesn't own bucket, cannot remove notification" << dendl;
return -EPERM;
}
return 0;
}
if (bucket_info.owner != s->owner.get_id()) {
- ldout(s->cct, 1) << "user doesn't own bucket, cannot get notification list" << dendl;
+ ldpp_dout(this, 1) << "user doesn't own bucket, cannot get notification list" << dendl;
return -EPERM;
}
if (op_ret < 0) {
if (!s->err.message.empty()) {
- ldout(s->cct, 4) << "Request failed with " << op_ret
+ ldpp_dout(this, 4) << "Request failed with " << op_ret
<< ": " << s->err.message << dendl;
}
end_header(s);
period.set_id(period_id);
period.set_epoch(epoch);
- op_ret = period.init(store->ctx(), store->svc()->sysobj, realm_id, y, realm_name);
+ op_ret = period.init(this, store->ctx(), store->svc()->sysobj, realm_id, y, realm_name);
if (op_ret < 0)
- ldout(store->ctx(), 5) << "failed to read period" << dendl;
+ ldpp_dout(this, 5) << "failed to read period" << dendl;
}
// POST /admin/realm/period
auto cct = store->ctx();
// initialize the period without reading from rados
- period.init(cct, store->svc()->sysobj, y, false);
+ period.init(this, cct, store->svc()->sysobj, y, false);
// decode the period from input
const auto max_size = cct->_conf->rgw_max_put_param_size;
bool empty;
op_ret = rgw_rest_get_json_input(cct, s, period, max_size, &empty);
if (op_ret < 0) {
- lderr(cct) << "failed to decode period" << dendl;
+ ldpp_dout(this, -1) << "failed to decode period" << dendl;
return;
}
// period that we haven't restarted with yet. we also don't want to modify
// the objects in use by RGWRados
RGWRealm realm(period.get_realm());
- op_ret = realm.init(cct, store->svc()->sysobj, y);
+ op_ret = realm.init(this, cct, store->svc()->sysobj, y);
if (op_ret < 0) {
- lderr(cct) << "failed to read current realm: "
+ ldpp_dout(this, -1) << "failed to read current realm: "
<< cpp_strerror(-op_ret) << dendl;
return;
}
RGWPeriod current_period;
- op_ret = current_period.init(cct, store->svc()->sysobj, realm.get_id(), y);
+ op_ret = current_period.init(this, cct, store->svc()->sysobj, realm.get_id(), y);
if (op_ret < 0) {
- lderr(cct) << "failed to read current period: "
+ ldpp_dout(this, -1) << "failed to read current period: "
<< cpp_strerror(-op_ret) << dendl;
return;
}
// if period id is empty, handle as 'period commit'
if (period.get_id().empty()) {
- op_ret = period.commit(store, realm, current_period, error_stream, y);
+ op_ret = period.commit(this, store, realm, current_period, error_stream, y);
if (op_ret < 0) {
- lderr(cct) << "master zone failed to commit period" << dendl;
+ ldpp_dout(this, -1) << "master zone failed to commit period" << dendl;
}
return;
}
// if it's not period commit, nobody is allowed to push to the master zone
if (period.get_master_zone() == store->svc()->zone->get_zone_params().get_id()) {
- ldout(cct, 10) << "master zone rejecting period id="
+ ldpp_dout(this, 10) << "master zone rejecting period id="
<< period.get_id() << " epoch=" << period.get_epoch() << dendl;
op_ret = -EINVAL; // XXX: error code
return;
}
// write the period to rados
- op_ret = period.store_info(false, y);
+ op_ret = period.store_info(this, false, y);
if (op_ret < 0) {
- lderr(cct) << "failed to store period " << period.get_id() << dendl;
+ ldpp_dout(this, -1) << "failed to store period " << period.get_id() << dendl;
return;
}
// set as latest epoch
- op_ret = period.update_latest_epoch(period.get_epoch(), y);
+ op_ret = period.update_latest_epoch(this, period.get_epoch(), y);
if (op_ret == -EEXIST) {
// already have this epoch (or a more recent one)
- ldout(cct, 4) << "already have epoch >= " << period.get_epoch()
+ ldpp_dout(this, 4) << "already have epoch >= " << period.get_epoch()
<< " for period " << period.get_id() << dendl;
op_ret = 0;
return;
}
if (op_ret < 0) {
- lderr(cct) << "failed to set latest epoch" << dendl;
+ ldpp_dout(this, -1) << "failed to set latest epoch" << dendl;
return;
}
auto current_epoch = current_period.get_realm_epoch();
// discard periods in the past
if (period.get_realm_epoch() < current_epoch) {
- ldout(cct, 10) << "discarding period " << period.get_id()
+ ldpp_dout(this, 10) << "discarding period " << period.get_id()
<< " with realm epoch " << period.get_realm_epoch()
<< " older than current epoch " << current_epoch << dendl;
// return success to ack that we have this period
}
// discard periods too far in the future
if (period.get_realm_epoch() > current_epoch + PERIOD_HISTORY_FETCH_MAX) {
- lderr(cct) << "discarding period " << period.get_id()
+ ldpp_dout(this, -1) << "discarding period " << period.get_id()
<< " with realm epoch " << period.get_realm_epoch() << " too far in "
"the future from current epoch " << current_epoch << dendl;
op_ret = -ENOENT; // XXX: error code
return;
}
// attach a copy of the period into the period history
- auto cursor = period_history->attach(RGWPeriod{period}, y);
+ auto cursor = period_history->attach(this, RGWPeriod{period}, y);
if (!cursor) {
// we're missing some history between the new period and current_period
op_ret = cursor.get_error();
- lderr(cct) << "failed to collect the periods between current period "
+ ldpp_dout(this, -1) << "failed to collect the periods between current period "
<< current_period.get_id() << " (realm epoch " << current_epoch
<< ") and the new period " << period.get_id()
<< " (realm epoch " << period.get_realm_epoch()
}
if (cursor.has_next()) {
// don't switch if we have a newer period in our history
- ldout(cct, 4) << "attached period " << period.get_id()
+ ldpp_dout(this, 4) << "attached period " << period.get_id()
<< " to history, but the history contains newer periods" << dendl;
return;
}
// set as current period
- op_ret = realm.set_current_period(period, y);
+ op_ret = realm.set_current_period(this, period, y);
if (op_ret < 0) {
- lderr(cct) << "failed to update realm's current period" << dendl;
+ ldpp_dout(this, -1) << "failed to update realm's current period" << dendl;
return;
}
- ldout(cct, 4) << "period " << period.get_id()
+ ldpp_dout(this, 4) << "period " << period.get_id()
<< " is newer than current period " << current_period.get_id()
<< ", updating realm's current period and notifying zone" << dendl;
- realm.notify_new_period(period, y);
+ realm.notify_new_period(this, period, y);
return;
}
// reflect the period into our local objects
- op_ret = period.reflect(y);
+ op_ret = period.reflect(this, y);
if (op_ret < 0) {
- lderr(cct) << "failed to update local objects: "
+ ldpp_dout(this, -1) << "failed to update local objects: "
<< cpp_strerror(-op_ret) << dendl;
return;
}
- ldout(cct, 4) << "period epoch " << period.get_epoch()
+ ldpp_dout(this, 4) << "period epoch " << period.get_epoch()
<< " is newer than current epoch " << current_period.get_epoch()
<< ", updating period's latest epoch and notifying zone" << dendl;
- realm.notify_new_period(period, y);
+ realm.notify_new_period(this, period, y);
// update the period history
period_history->insert(RGWPeriod{period});
}
// read realm
realm.reset(new RGWRealm(id, name));
- op_ret = realm->init(g_ceph_context, store->svc()->sysobj, y);
+ op_ret = realm->init(this, g_ceph_context, store->svc()->sysobj, y);
if (op_ret < 0)
- lderr(store->ctx()) << "failed to read realm id=" << id
+ ldpp_dout(this, -1) << "failed to read realm id=" << id
<< " name=" << name << dendl;
}
{
// read default realm
RGWRealm realm(store->ctx(), store->svc()->sysobj);
- [[maybe_unused]] int ret = realm.read_default_id(default_id, y);
+ [[maybe_unused]] int ret = realm.read_default_id(this, default_id, y);
}
- op_ret = store->svc()->zone->list_realms(realms);
+ op_ret = store->svc()->zone->list_realms(this, realms);
if (op_ret < 0)
- lderr(store->ctx()) << "failed to list realms" << dendl;
+ ldpp_dout(this, -1) << "failed to list realms" << dendl;
}
void RGWOp_Realm_List::send_response()
string role_name = s->info.args.get("RoleName");
RGWRole role(s->cct, store->getRados()->pctl, role_name, s->user->get_tenant());
- if (op_ret = role.get(y); op_ret < 0) {
+ if (op_ret = role.get(s, y); op_ret < 0) {
if (op_ret == -ENOENT) {
op_ret = -ERR_NO_ROLE_FOUND;
}
max_session_duration = s->info.args.get("MaxSessionDuration");
if (role_name.empty() || trust_policy.empty()) {
- ldout(s->cct, 20) << "ERROR: one of role name or assume role policy document is empty"
+ ldpp_dout(this, 20) << "ERROR: one of role name or assume role policy document is empty"
<< dendl;
return -EINVAL;
}
const rgw::IAM::Policy p(s->cct, s->user->get_tenant(), bl);
}
catch (rgw::IAM::PolicyParseException& e) {
- ldout(s->cct, 20) << "failed to parse policy: " << e.what() << dendl;
+ ldpp_dout(this, 20) << "failed to parse policy: " << e.what() << dendl;
return -ERR_MALFORMED_DOC;
}
}
RGWRole role(s->cct, store->getRados()->pctl, role_name, role_path, trust_policy,
s->user->get_tenant(), max_session_duration);
- op_ret = role.create(true, y);
+ op_ret = role.create(s, true, y);
if (op_ret == -EEXIST) {
op_ret = -ERR_ROLE_EXISTS;
role_name = s->info.args.get("RoleName");
if (role_name.empty()) {
- ldout(s->cct, 20) << "ERROR: Role name is empty"<< dendl;
+ ldpp_dout(this, 20) << "ERROR: Role name is empty"<< dendl;
return -EINVAL;
}
return;
}
- op_ret = _role.delete_obj(y);
+ op_ret = _role.delete_obj(s, y);
if (op_ret == -ENOENT) {
op_ret = -ERR_NO_ROLE_FOUND;
role_name = s->info.args.get("RoleName");
if (role_name.empty()) {
- ldout(s->cct, 20) << "ERROR: Role name is empty"<< dendl;
+ ldpp_dout(this, 20) << "ERROR: Role name is empty"<< dendl;
return -EINVAL;
}
return;
}
RGWRole role(s->cct, store->getRados()->pctl, role_name, s->user->get_tenant());
- op_ret = role.get(y);
+ op_ret = role.get(s, y);
if (op_ret == -ENOENT) {
op_ret = -ERR_NO_ROLE_FOUND;
trust_policy = s->info.args.get("PolicyDocument");
if (role_name.empty() || trust_policy.empty()) {
- ldout(s->cct, 20) << "ERROR: One of role name or trust policy is empty"<< dendl;
+ ldpp_dout(this, 20) << "ERROR: One of role name or trust policy is empty"<< dendl;
return -EINVAL;
}
JSONParser p;
if (!p.parse(trust_policy.c_str(), trust_policy.length())) {
- ldout(s->cct, 20) << "ERROR: failed to parse assume role policy doc" << dendl;
+ ldpp_dout(this, 20) << "ERROR: failed to parse assume role policy doc" << dendl;
return -ERR_MALFORMED_DOC;
}
}
_role.update_trust_policy(trust_policy);
- op_ret = _role.update(y);
+ op_ret = _role.update(this, y);
s->formatter->open_object_section("UpdateAssumeRolePolicyResponse");
s->formatter->open_object_section("ResponseMetadata");
return;
}
vector<RGWRole> result;
- op_ret = RGWRole::get_roles_by_path_prefix(store->getRados(), s->cct, path_prefix, s->user->get_tenant(), result, y);
+ op_ret = RGWRole::get_roles_by_path_prefix(s, store->getRados(), s->cct, path_prefix, s->user->get_tenant(), result, y);
if (op_ret == 0) {
s->formatter->open_array_section("ListRolesResponse");
perm_policy = s->info.args.get("PolicyDocument");
if (role_name.empty() || policy_name.empty() || perm_policy.empty()) {
- ldout(s->cct, 20) << "ERROR: One of role name, policy name or perm policy is empty"<< dendl;
+ ldpp_dout(this, 20) << "ERROR: One of role name, policy name or perm policy is empty"<< dendl;
return -EINVAL;
}
bufferlist bl = bufferlist::static_from_string(perm_policy);
const rgw::IAM::Policy p(s->cct, s->user->get_tenant(), bl);
}
catch (rgw::IAM::PolicyParseException& e) {
- ldout(s->cct, 20) << "failed to parse policy: " << e.what() << dendl;
+ ldpp_dout(this, 20) << "failed to parse policy: " << e.what() << dendl;
return -ERR_MALFORMED_DOC;
}
return 0;
}
_role.set_perm_policy(policy_name, perm_policy);
- op_ret = _role.update(y);
+ op_ret = _role.update(this, y);
if (op_ret == 0) {
s->formatter->open_object_section("PutRolePolicyResponse");
policy_name = s->info.args.get("PolicyName");
if (role_name.empty() || policy_name.empty()) {
- ldout(s->cct, 20) << "ERROR: One of role name or policy name is empty"<< dendl;
+ ldpp_dout(this, 20) << "ERROR: One of role name or policy name is empty"<< dendl;
return -EINVAL;
}
return 0;
role_name = s->info.args.get("RoleName");
if (role_name.empty()) {
- ldout(s->cct, 20) << "ERROR: Role name is empty"<< dendl;
+ ldpp_dout(this, 20) << "ERROR: Role name is empty"<< dendl;
return -EINVAL;
}
return 0;
policy_name = s->info.args.get("PolicyName");
if (role_name.empty() || policy_name.empty()) {
- ldout(s->cct, 20) << "ERROR: One of role name or policy name is empty"<< dendl;
+ ldpp_dout(this, 20) << "ERROR: One of role name or policy name is empty"<< dendl;
return -EINVAL;
}
return 0;
}
if (op_ret == 0) {
- op_ret = _role.update(y);
+ op_ret = _role.update(this, y);
}
s->formatter->open_object_section("DeleteRolePoliciesResponse");
if (block_crypt != nullptr) {
auto f = std::make_unique<RGWGetObj_BlockDecrypt>(s->cct, cb, std::move(block_crypt));
if (manifest_bl != nullptr) {
- res = f->read_manifest(*manifest_bl);
+ res = f->read_manifest(this, *manifest_bl);
if (res == 0) {
*filter = std::move(f);
}
try {
tagset.decode(iter);
} catch (buffer::error& err) {
- ldout(s->cct,0) << "ERROR: caught buffer::error, couldn't decode TagSet" << dendl;
+ ldpp_dout(this,0) << "ERROR: caught buffer::error, couldn't decode TagSet" << dendl;
op_ret= -EIO;
return;
}
}
}
-int RGWPutBucketTags_ObjStore_S3::get_params(optional_yield y)
+int RGWPutBucketTags_ObjStore_S3::get_params(const DoutPrefixProvider *dpp, optional_yield y)
{
RGWXMLParser parser;
RGWXMLDecoder::decode_xml("Tagging", tagging, &parser);
} catch (RGWXMLDecoder::err& err) {
- ldout(s->cct, 5) << "Malformed tagging request: " << err << dendl;
+ ldpp_dout(dpp, 5) << "Malformed tagging request: " << err << dendl;
return -ERR_MALFORMED_XML;
}
return r;
obj_tags.encode(tags_bl);
- ldout(s->cct, 20) << "Read " << obj_tags.count() << "tags" << dendl;
+ ldpp_dout(dpp, 20) << "Read " << obj_tags.count() << "tags" << dendl;
// forward bucket tags requests to meta master zone
if (!store->svc()->zone->is_meta_master()) {
bool enabled;
int r = rule.to_sync_policy_pipe(s, store, &pipe, &enabled);
if (r < 0) {
- ldout(s->cct, 5) << "NOTICE: failed to convert replication configuration into sync policy pipe (rule.id=" << rule.id << "): " << cpp_strerror(-r) << dendl;
+ ldpp_dout(s, 5) << "NOTICE: failed to convert replication configuration into sync policy pipe (rule.id=" << rule.id << "): " << cpp_strerror(-r) << dendl;
return r;
}
RGWXMLDecoder::decode_xml("ReplicationConfiguration", conf, &parser);
} catch (RGWXMLDecoder::err& err) {
- ldout(s->cct, 5) << "Malformed tagging request: " << err << dendl;
+ ldpp_dout(this, 5) << "Malformed tagging request: " << err << dendl;
return -ERR_MALFORMED_XML;
}
string err;
shard_id = strict_strtol(shard_id_str, 10, &err);
if (!err.empty()) {
- ldout(s->cct, 5) << "bad shard id specified: " << shard_id_str << dendl;
+ ldpp_dout(this, 5) << "bad shard id specified: " << shard_id_str << dendl;
return -EINVAL;
}
} else {
if (website_conf.is_redirect_all && website_conf.redirect_all.hostname.empty()) {
s->err.message = "A host name must be provided to redirect all requests (e.g. \"example.com\").";
- ldout(s->cct, 5) << s->err.message << dendl;
+ ldpp_dout(this, 5) << s->err.message << dendl;
return -EINVAL;
} else if (!website_conf.is_redirect_all && !website_conf.is_set_index_doc) {
s->err.message = "A value for IndexDocument Suffix must be provided if RedirectAllRequestsTo is empty";
- ldout(s->cct, 5) << s->err.message << dendl;
+ ldpp_dout(this, 5) << s->err.message << dendl;
return -EINVAL;
} else if (!website_conf.is_redirect_all && website_conf.is_set_index_doc &&
website_conf.index_doc_suffix.empty()) {
s->err.message = "The IndexDocument Suffix is not well formed";
- ldout(s->cct, 5) << s->err.message << dendl;
+ ldpp_dout(this, 5) << s->err.message << dendl;
return -EINVAL;
}
if (!s->canned_acl.empty())
return -ERR_INVALID_REQUEST;
- return s3policy.create_from_headers(store->ctl()->user, s->info.env, owner);
+ return s3policy.create_from_headers(s, store->ctl()->user, s->info.env, owner);
}
return s3policy.create_canned(owner, s->bucket_owner, s->canned_acl);
read_op.params.attrs = &attrs;
- return read_op.prepare(s->yield);
+ return read_op.prepare(s->yield, s);
}
static inline void set_attr(map<string, bufferlist>& attrs, const char* key, const std::string& value)
//RGWGetObj_BlockDecrypt* f = new RGWGetObj_BlockDecrypt(s->cct, cb, std::move(block_crypt));
if (f != nullptr) {
if (manifest_bl != nullptr) {
- res = f->read_manifest(*manifest_bl);
+ res = f->read_manifest(this, *manifest_bl);
if (res == 0) {
*filter = std::move(f);
}
int RGWPutCORS_ObjStore_S3::get_params(optional_yield y)
{
- RGWCORSXMLParser_S3 parser(s->cct);
+ RGWCORSXMLParser_S3 parser(this, s->cct);
RGWCORSConfiguration_S3 *cors_config;
const auto max_size = s->cct->_conf->rgw_max_put_param_size;
::encode_json("head", head_obj, &f);
::encode_json("manifest", *manifest, &f);
f.open_array_section("data_location");
- for (auto miter = manifest->obj_begin(); miter != manifest->obj_end(); ++miter) {
+ for (auto miter = manifest->obj_begin(this); miter != manifest->obj_end(this); ++miter) {
f.open_object_section("obj");
rgw_raw_obj raw_loc = miter.get_location().get_raw_obj(store);
uint64_t ofs = miter.get_ofs();
}
s->info.args.set(p);
- s->info.args.parse();
+ s->info.args.parse(s);
/* must be called after the args parsing */
int ret = allocate_formatter(s, default_formatter, configurable_format);
return -EACCES;
}
- int ret = store->svc()->cls->mfa.check_mfa(user->user_id, serial, pin, y);
+ int ret = store->svc()->cls->mfa.check_mfa(dpp, user->user_id, serial, pin, y);
if (ret < 0) {
ldpp_dout(dpp, 20) << "NOTICE: failed to check MFA, serial=" << serial << dendl;
return -EACCES;
s->bucket_tenant = s->auth.identity->get_role_tenant();
}
- dout(10) << "s->object=" << s->object
+ ldpp_dout(s, 10) << "s->object=" << s->object
<< " s->bucket=" << rgw_make_bucket_entry_name(s->bucket_tenant, s->bucket_name) << dendl;
int ret;
ret = RGWCopyObj::parse_copy_location(copy_source,
s->init_state.src_bucket,
- key);
+ key,
+ s);
if (!ret) {
ldpp_dout(s, 0) << "failed to parse copy location" << dendl;
return -EINVAL; // XXX why not -ERR_INVALID_BUCKET_NAME or -ERR_BAD_URL?
obj_ctx.set_prefetch_data(obj);
RGWObjState* state = nullptr;
- if (store->getRados()->get_obj_state(&obj_ctx, s->bucket->get_info(), obj, &state, false, s->yield) < 0) {
+ if (store->getRados()->get_obj_state(s, &obj_ctx, s->bucket->get_info(), obj, &state, false, s->yield) < 0) {
return false;
}
if (! state->exists) {
if (!(s->prot_flags & RGW_REST_WEBSITE))
return 0;
- int ret = store->get_bucket(nullptr, s->bucket_tenant, s->bucket_name, &s->bucket, y);
+ int ret = store->get_bucket(s, nullptr, s->bucket_tenant, s->bucket_name, &s->bucket, y);
if (ret < 0) {
// TODO-FUTURE: if the bucket does not exist, maybe expose it here?
return -ERR_NO_SUCH_BUCKET;
return get_obj_op(false);
}
-int RGWHandler_REST_S3Website::serve_errordoc(int http_ret, const string& errordoc_key, optional_yield y) {
+int RGWHandler_REST_S3Website::serve_errordoc(const DoutPrefixProvider *dpp, int http_ret, const string& errordoc_key, optional_yield y) {
int ret = 0;
s->formatter->reset(); /* Try to throw it all away */
On success, it will return zero, and no further content should be sent to the socket
On failure, we need the double-error handler
*/
- new_err_no = RGWHandler_REST_S3Website::serve_errordoc(http_error_code, s->bucket->get_info().website_conf.error_doc, y);
+ new_err_no = RGWHandler_REST_S3Website::serve_errordoc(s, http_error_code, s->bucket->get_info().website_conf.error_doc, y);
if (new_err_no != -1) {
err_no = new_err_no;
}
client_signature,
date,
session_token,
- using_qs);
+ using_qs,
+ s);
if (ret < 0) {
throw ret;
}
std::move(canonical_qs),
std::move(*canonical_headers),
signed_hdrs,
- exp_payload_hash);
+ exp_payload_hash,
+ s);
auto string_to_sign = \
rgw::auth::s3::get_v4_string_to_sign(s->cct,
AWS4_HMAC_SHA256_STR,
date,
credential_scope,
- std::move(canonical_req_hash));
+ std::move(canonical_req_hash),
+ s);
const auto sig_factory = std::bind(rgw::auth::s3::get_v4_signature,
credential_scope,
std::placeholders::_1,
std::placeholders::_2,
- std::placeholders::_3);
+ std::placeholders::_3,
+ s);
/* Requests authenticated with the Query Parameters are treated as unsigned.
* From "Authenticating Requests: Using Query Parameters (AWS Signature
case RGW_OP_GET_OBJ://s3select its post-method(payload contain the query) , the request is get-object
break;
default:
- dout(10) << "ERROR: AWS4 completion for this operation NOT IMPLEMENTED" << dendl;
+ ldpp_dout(s, 10) << "ERROR: AWS4 completion for this operation NOT IMPLEMENTED" << dendl;
throw -ERR_NOT_IMPLEMENTED;
}
/* IMHO "streamed" doesn't fit too good here. I would prefer to call
* it "chunked" but let's be coherent with Amazon's terminology. */
- dout(10) << "body content detected in multiple chunks" << dendl;
+ ldpp_dout(s, 10) << "body content detected in multiple chunks" << dendl;
/* payload in multiple chunks */
case RGW_OP_PUT_OBJ:
break;
default:
- dout(10) << "ERROR: AWS4 completion for this operation NOT IMPLEMENTED (streaming mode)" << dendl;
+ ldpp_dout(s, 10) << "ERROR: AWS4 completion for this operation NOT IMPLEMENTED (streaming mode)" << dendl;
throw -ERR_NOT_IMPLEMENTED;
}
- dout(10) << "aws4 seed signature ok... delaying v4 auth" << dendl;
+ ldpp_dout(s, 10) << "aws4 seed signature ok... delaying v4 auth" << dendl;
/* In the case of streamed payload client sets the x-amz-content-sha256
* to "STREAMING-AWS4-HMAC-SHA256-PAYLOAD" but uses "UNSIGNED-PAYLOAD"
/* Let's canonize the HTTP headers that are covered by the AWS auth v2. */
std::string string_to_sign;
utime_t header_time;
- if (! rgw_create_s3_canonical_header(s->info, &header_time, string_to_sign,
+ if (! rgw_create_s3_canonical_header(s, s->info, &header_time, string_to_sign,
qsr)) {
ldpp_dout(s, 10) << "failed to create the canonized auth header\n"
<< rgw::crypt_sanitize::auth{s,string_to_sign} << dendl;
/* grab access key id */
const size_t pos = credential.find("/");
const std::string_view access_key_id = credential.substr(0, pos);
- dout(10) << "access key id = " << access_key_id << dendl;
+ ldpp_dout(s, 10) << "access key id = " << access_key_id << dendl;
/* grab credential scope */
const std::string_view credential_scope = credential.substr(pos + 1);
- dout(10) << "credential scope = " << credential_scope << dendl;
+ ldpp_dout(s, 10) << "credential scope = " << credential_scope << dendl;
const auto sig_factory = std::bind(rgw::auth::s3::get_v4_signature,
credential_scope,
std::placeholders::_1,
std::placeholders::_2,
- std::placeholders::_3);
+ std::placeholders::_3,
+ s);
return {
access_key_id,
RGWUserInfo user_info;
/* TODO(rzarzynski): we need to have string-view taking variant. */
const std::string access_key_id(_access_key_id);
- if (rgw_get_user_info_by_access_key(ctl->user, access_key_id, user_info, y) < 0) {
+ if (rgw_get_user_info_by_access_key(dpp, ctl->user, access_key_id, user_info, y) < 0) {
ldpp_dout(dpp, 5) << "error reading user info, uid=" << access_key_id
<< " can't authenticate" << dendl;
return result_t::deny(-ERR_INVALID_ACCESS_KEY);
auto iter = dec_output.cbegin();
decode(token, iter);
} catch (const buffer::error& e) {
- ldout(cct, 0) << "ERROR: decode SessionToken failed: " << error << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: decode SessionToken failed: " << error << dendl;
return -EINVAL;
}
}
rgw::auth::RoleApplier::Role r;
if (! token.roleId.empty()) {
RGWRole role(s->cct, ctl, token.roleId);
- if (role.get_by_id(y) < 0) {
+ if (role.get_by_id(dpp, y) < 0) {
return result_t::deny(-EPERM);
}
r.id = token.roleId;
if (! token.user.empty() && token.acct_type != TYPE_ROLE) {
// get user info
- int ret = rgw_get_user_info_by_uid(ctl->user, token.user, user_info, y, NULL);
+ int ret = rgw_get_user_info_by_uid(dpp, ctl->user, token.user, user_info, y, NULL);
if (ret < 0) {
ldpp_dout(dpp, 5) << "ERROR: failed reading user info: uid=" << token.user << dendl;
return result_t::reject(-EPERM);
int max_size = 4096;
std::tie(ret, data) = rgw_rest_read_all_input(s, max_size, false);
if (ret != 0) {
- ldout(s->cct, 10) << "s3-select query: failed to retrieve query; ret = " << ret << dendl;
+ ldpp_dout(this, 10) << "s3-select query: failed to retrieve query; ret = " << ret << dendl;
return ret;
}
m_s3select_query = data.to_str();
if (m_s3select_query.length() > 0) {
- ldout(s->cct, 10) << "s3-select query: " << m_s3select_query << dendl;
+ ldpp_dout(this, 10) << "s3-select query: " << m_s3select_query << dendl;
}
else {
- ldout(s->cct, 10) << "s3-select query: failed to retrieve query;" << dendl;
+ ldpp_dout(this, 10) << "s3-select query: failed to retrieve query;" << dendl;
return -1;
}
if (s3select_syntax->get_error_description().empty() == false) {
m_result.append(s3select_syntax->get_error_description());
- ldout(s->cct, 10) << "s3-select query: failed to prase query; {" << s3select_syntax->get_error_description() << "}"<< dendl;
+ ldpp_dout(this, 10) << "s3-select query: failed to prase query; {" << s3select_syntax->get_error_description() << "}"<< dendl;
status = -1;
}
else {
extract_by_tag("QuoteEscapeCharacter", m_escape_char);
extract_by_tag("CompressionType", m_compression_type);
if (m_compression_type.length()>0 && m_compression_type.compare("NONE") != 0) {
- ldout(s->cct, 10) << "RGW supports currently only NONE option for compression type" << dendl;
+ ldpp_dout(this, 10) << "RGW supports currently only NONE option for compression type" << dendl;
return -1;
}
class RGWPutBucketTags_ObjStore_S3 : public RGWPutBucketTags_ObjStore
{
public:
- int get_params(optional_yield y) override;
+ int get_params(const DoutPrefixProvider *dpp, optional_yield y) override;
void send_response() override;
};
RGWOp *op_copy() override { return NULL; }
RGWOp *op_options() override { return NULL; }
- int serve_errordoc(int http_ret, const string &errordoc_key, optional_yield y);
+ int serve_errordoc(const DoutPrefixProvider *dpp, int http_ret, const string &errordoc_key, optional_yield y);
public:
using RGWHandler_REST_S3::RGWHandler_REST_S3;
~RGWHandler_REST_S3Website() override = default;
}
boost::optional<RGWOIDCProvider>
-WebTokenEngine::get_provider(const string& role_arn, const string& iss) const
+WebTokenEngine::get_provider(const DoutPrefixProvider *dpp, const string& role_arn, const string& iss) const
{
string tenant = get_role_tenant(role_arn);
auto provider_arn = rgw::ARN(idp_url, "oidc-provider", tenant);
string p_arn = provider_arn.to_string();
RGWOIDCProvider provider(cct, ctl, p_arn, tenant);
- auto ret = provider.get();
+ auto ret = provider.get(dpp);
if (ret < 0) {
return boost::none;
}
t.client_id = decoded.get_payload_claim("clientId").as_string();
}
string role_arn = s->info.args.get("RoleArn");
- auto provider = get_provider(role_arn, t.iss);
+ auto provider = get_provider(dpp, role_arn, t.iss);
if (! provider) {
ldpp_dout(dpp, 0) << "Couldn't get oidc provider info using input iss" << t.iss << dendl;
throw -EACCES;
if (t) {
string role_session = s->info.args.get("RoleSessionName");
if (role_session.empty()) {
- ldout(s->cct, 0) << "Role Session Name is empty " << dendl;
+ ldpp_dout(dpp, 0) << "Role Session Name is empty " << dendl;
return result_t::deny(-EACCES);
}
string role_arn = s->info.args.get("RoleArn");
sts = std::move(_sts);
string rArn = s->info.args.get("RoleArn");
- const auto& [ret, role] = sts.getRoleInfo(rArn, y);
+ const auto& [ret, role] = sts.getRoleInfo(s, rArn, y);
if (ret < 0) {
- ldout(s->cct, 0) << "failed to get role info using role arn: " << rArn << dendl;
+ ldpp_dout(this, 0) << "failed to get role info using role arn: " << rArn << dendl;
return ret;
}
string policy = role.get_assume_role_policy();
// If yes, then return 0, else -EPERM
auto p_res = p.eval_principal(s->env, *s->auth.identity);
if (p_res == rgw::IAM::Effect::Deny) {
- ldout(s->cct, 0) << "evaluating principal returned deny" << dendl;
+ ldpp_dout(this, 0) << "evaluating principal returned deny" << dendl;
return -EPERM;
}
auto c_res = p.eval_conditions(s->env);
if (c_res == rgw::IAM::Effect::Deny) {
- ldout(s->cct, 0) << "evaluating condition returned deny" << dendl;
+ ldpp_dout(this, 0) << "evaluating condition returned deny" << dendl;
return -EPERM;
}
} catch (rgw::IAM::PolicyParseException& e) {
- ldout(s->cct, 0) << "failed to parse policy: " << e.what() << dendl;
+ ldpp_dout(this, 0) << "failed to parse policy: " << e.what() << dendl;
return -EPERM;
}
s,
rgw::ARN(partition, service, "", s->user->get_tenant(), ""),
rgw::IAM::stsGetSessionToken)) {
- ldout(s->cct, 0) << "User does not have permssion to perform GetSessionToken" << dendl;
+ ldpp_dout(this, 0) << "User does not have permssion to perform GetSessionToken" << dendl;
return -EACCES;
}
string err;
uint64_t duration_in_secs = strict_strtoll(duration.c_str(), 10, &err);
if (!err.empty()) {
- ldout(s->cct, 0) << "Invalid value of input duration: " << duration << dendl;
+ ldpp_dout(this, 0) << "Invalid value of input duration: " << duration << dendl;
return -EINVAL;
}
if (duration_in_secs < STS::GetSessionTokenRequest::getMinDuration() ||
duration_in_secs > s->cct->_conf->rgw_sts_max_session_duration) {
- ldout(s->cct, 0) << "Invalid duration in secs: " << duration_in_secs << dendl;
+ ldpp_dout(this, 0) << "Invalid duration in secs: " << duration_in_secs << dendl;
return -EINVAL;
}
}
aud = s->info.args.get("aud");
if (roleArn.empty() || roleSessionName.empty() || sub.empty() || aud.empty()) {
- ldout(s->cct, 0) << "ERROR: one of role arn or role session name or token is empty" << dendl;
+ ldpp_dout(this, 0) << "ERROR: one of role arn or role session name or token is empty" << dendl;
return -EINVAL;
}
const rgw::IAM::Policy p(s->cct, s->user->get_tenant(), bl);
}
catch (rgw::IAM::PolicyParseException& e) {
- ldout(s->cct, 20) << "failed to parse policy: " << e.what() << "policy" << policy << dendl;
+ ldpp_dout(this, 20) << "failed to parse policy: " << e.what() << "policy" << policy << dendl;
return -ERR_MALFORMED_DOC;
}
}
tokenCode = s->info.args.get("TokenCode");
if (roleArn.empty() || roleSessionName.empty()) {
- ldout(s->cct, 0) << "ERROR: one of role arn or role session name is empty" << dendl;
+ ldpp_dout(this, 0) << "ERROR: one of role arn or role session name is empty" << dendl;
return -EINVAL;
}
const rgw::IAM::Policy p(s->cct, s->user->get_tenant(), bl);
}
catch (rgw::IAM::PolicyParseException& e) {
- ldout(s->cct, 0) << "failed to parse policy: " << e.what() << "policy" << policy << dendl;
+ ldpp_dout(this, 0) << "failed to parse policy: " << e.what() << "policy" << policy << dendl;
return -ERR_MALFORMED_DOC;
}
}
STS::AssumeRoleRequest req(s->cct, duration, externalId, policy, roleArn,
roleSessionName, serialNumber, tokenCode);
- STS::AssumeRoleResponse response = sts.assumeRole(req, y);
+ STS::AssumeRoleResponse response = sts.assumeRole(s, req, y);
op_ret = std::move(response.retCode);
//Dump the output
if (op_ret == 0) {
void RGWHandler_REST_STS::rgw_sts_parse_input()
{
if (post_body.size() > 0) {
- ldout(s->cct, 10) << "Content of POST: " << post_body << dendl;
+ ldpp_dout(s, 10) << "Content of POST: " << post_body << dendl;
if (post_body.find("Action") != string::npos) {
boost::char_separator<char> sep("&");
s->dialect = "sts";
if (int ret = RGWHandler_REST_STS::init_from_header(s, RGW_FORMAT_XML, true); ret < 0) {
- ldout(s->cct, 10) << "init_from_header returned err=" << ret << dendl;
+ ldpp_dout(s, 10) << "init_from_header returned err=" << ret << dendl;
return ret;
}
}
s->info.args.set(p);
- s->info.args.parse();
+ s->info.args.parse(s);
/* must be called after the args parsing */
if (int ret = allocate_formatter(s, default_formatter, configurable_format); ret < 0)
bool is_cert_valid(const vector<string>& thumbprints, const string& cert) const;
- boost::optional<RGWOIDCProvider> get_provider(const string& role_arn, const string& iss) const;
+ boost::optional<RGWOIDCProvider> get_provider(const DoutPrefixProvider *dpp, const string& role_arn, const string& iss) const;
std::string get_role_tenant(const string& role_arn) const;
void RGWStatAccount_ObjStore_SWIFT::execute(optional_yield y)
{
RGWStatAccount_ObjStore::execute(y);
- op_ret = store->ctl()->user->get_attrs_by_uid(s->user->get_id(), &attrs, s->yield);
+ op_ret = store->ctl()->user->get_attrs_by_uid(s, s->user->get_id(), &attrs, s->yield);
}
void RGWStatAccount_ObjStore_SWIFT::send_response()
if (read_list || write_list) {
RGWAccessControlPolicy_SWIFT swift_policy(s->cct);
- const auto r = swift_policy.create(store->ctl()->user,
+ const auto r = swift_policy.create(s, store->ctl()->user,
s->user->get_id(),
s->user->get_display_name(),
read_list,
RGWCORSConfiguration_SWIFT *swift_cors = new RGWCORSConfiguration_SWIFT;
int r = swift_cors->create_update(allow_origins, allow_headers, expose_headers, max_age);
if (r < 0) {
- dout(0) << "Error creating/updating the cors configuration" << dendl;
+ ldpp_dout(s, 0) << "Error creating/updating the cors configuration" << dendl;
delete swift_cors;
return r;
}
map<string, bufferlist> bucket_attrs;
r = store->getRados()->get_bucket_info(store->svc(), s->user->get_id().tenant,
bucket_name, bucket_info, nullptr,
- s->yield, &bucket_attrs);
+ s->yield, s, &bucket_attrs);
if (r < 0) {
ldpp_dout(this, 0) << "could not get bucket info for bucket="
<< bucket_name << dendl;
read_op.params.attrs = &attrs;
read_op.params.obj_size = &size_bytes;
- r = read_op.prepare(s->yield);
+ r = read_op.prepare(s->yield, s);
if (r < 0) {
return r;
}
const char * const acl_attr = s->info.env->get("HTTP_X_ACCOUNT_ACCESS_CONTROL");
if (acl_attr) {
RGWAccessControlPolicy_SWIFTAcct swift_acct_policy(s->cct);
- const bool r = swift_acct_policy.create(store->ctl()->user,
+ const bool r = swift_acct_policy.create(s, store->ctl()->user,
s->user->get_id(),
s->user->get_display_name(),
string(acl_attr));
if (uid.tenant.empty()) {
const rgw_user tenanted_uid(uid.id, uid.id);
- if (user_ctl->get_info_by_uid(tenanted_uid, &uinfo, s->yield) >= 0) {
+ if (user_ctl->get_info_by_uid(s, tenanted_uid, &uinfo, s->yield) >= 0) {
/* Succeeded. */
bucket_tenant = uinfo.user_id.tenant;
found = true;
}
}
- if (!found && user_ctl->get_info_by_uid(uid, &uinfo, s->yield) < 0) {
+ if (!found && user_ctl->get_info_by_uid(s, uid, &uinfo, s->yield) < 0) {
throw -EPERM;
} else {
bucket_tenant = uinfo.user_id.tenant;
RGWBucketInfo bucket_info;
int ret = store->getRados()->get_bucket_info(store->svc(),
bucket_tenant, bucket_name,
- bucket_info, nullptr, s->yield);
+ bucket_info, nullptr, s->yield, s);
if (ret < 0) {
throw ret;
}
ldpp_dout(this, 20) << "temp url user (bucket owner): " << bucket_info.owner
<< dendl;
- if (user_ctl->get_info_by_uid(bucket_info.owner, &owner_info, s->yield) < 0) {
+ if (user_ctl->get_info_by_uid(s, bucket_info.owner, &owner_info, s->yield) < 0) {
throw -EPERM;
}
}
obj.set_prefetch_data(&obj_ctx);
RGWObjState* state = nullptr;
- if (obj.get_obj_state(&obj_ctx, *s->bucket, &state, s->yield, false)) {
+ if (obj.get_obj_state(s, &obj_ctx, *s->bucket, &state, s->yield, false)) {
return false;
}
obj.set_prefetch_data(&obj_ctx);
RGWObjState* state = nullptr;
- if (obj.get_obj_state(&obj_ctx, *s->bucket, &state, s->yield, false)) {
+ if (obj.get_obj_state(s, &obj_ctx, *s->bucket, &state, s->yield, false)) {
return false;
}
s->object = store->get_object(rgw_obj_key());
}
- dout(10) << "s->object=" <<
+ ldpp_dout(s, 10) << "s->object=" <<
(!s->object->empty() ? s->object->get_key() : rgw_obj_key("<NULL>"))
<< " s->bucket="
<< rgw_make_bucket_entry_name(s->bucket_tenant, s->bucket_name)
}
s->info.args.set(p);
- s->info.args.parse();
+ s->info.args.parse(s);
/* Skip the leading slash of URL hierarchy. */
if (req_name[0] != '/') {
next_tok(req, first, '/');
- dout(10) << "ver=" << ver << " first=" << first << " req=" << req << dendl;
+ ldpp_dout(s, 10) << "ver=" << ver << " first=" << first << " req=" << req << dendl;
if (first.size() == 0)
return 0;
std::string copy_source = s->info.env->get("HTTP_X_COPY_FROM", "");
if (! copy_source.empty()) {
rgw_obj_key key;
- bool result = RGWCopyObj::parse_copy_location(copy_source, t->src_bucket, key);
+ bool result = RGWCopyObj::parse_copy_location(copy_source, t->src_bucket, key, s);
if (!result)
return -ERR_BAD_URL;
s->src_object = store->get_object(key);
rgw_obj_key dest_obj_key;
bool result =
RGWCopyObj::parse_copy_location(req_dest, dest_bucket_name,
- dest_obj_key);
+ dest_obj_key, s);
if (!result)
return -ERR_BAD_URL;
}
}
- op_ret = RGWUsage::show(store->getRados(), uid, bucket_name, start, end, show_entries, show_summary, &categories, flusher);
+ op_ret = RGWUsage::show(this, store->getRados(), uid, bucket_name, start, end, show_entries, show_summary, &categories, flusher);
}
class RGWOp_Usage_Delete : public RGWRESTOp {
}
}
- op_ret = RGWUsage::trim(store->getRados(), uid, bucket_name, start, end);
+ op_ret = RGWUsage::trim(this, store->getRados(), uid, bucket_name, start, end);
}
RGWOp *RGWHandler_Usage::op_get()
op_state.max_entries = max_entries;
op_state.marker = marker;
- op_ret = RGWUserAdminOp_User::list(store, op_state, flusher);
+ op_ret = RGWUserAdminOp_User::list(this, store, op_state, flusher);
}
class RGWOp_User_Info : public RGWRESTOp {
op_state.set_fetch_stats(fetch_stats);
op_state.set_sync_stats(sync_stats);
- op_ret = RGWUserAdminOp_User::info(store, op_state, flusher, y);
+ op_ret = RGWUserAdminOp_User::info(s, store, op_state, flusher, y);
}
class RGWOp_User_Create : public RGWRESTOp {
RESTArgs::get_string(s, "placement-tags", placement_tags_str, &placement_tags_str);
if (!s->user->get_info().system && system) {
- ldout(s->cct, 0) << "cannot set system flag by non-system user" << dendl;
+ ldpp_dout(this, 0) << "cannot set system flag by non-system user" << dendl;
op_ret = -EINVAL;
return;
}
uint32_t op_mask;
int ret = rgw_parse_op_type_list(op_mask_str, &op_mask);
if (ret < 0) {
- ldout(s->cct, 0) << "failed to parse op_mask: " << ret << dendl;
+ ldpp_dout(this, 0) << "failed to parse op_mask: " << ret << dendl;
op_ret = -EINVAL;
return;
}
rgw_placement_rule target_rule;
target_rule.from_str(default_placement_str);
if (!store->svc()->zone->get_zone_params().valid_placement(target_rule)) {
- ldout(s->cct, 0) << "NOTICE: invalid dest placement: " << target_rule.to_str() << dendl;
+ ldpp_dout(this, 0) << "NOTICE: invalid dest placement: " << target_rule.to_str() << dendl;
op_ret = -EINVAL;
return;
}
}
bufferlist data;
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(s, s->user.get(), nullptr, data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
}
- op_ret = RGWUserAdminOp_User::create(store, op_state, flusher, y);
+ op_ret = RGWUserAdminOp_User::create(s, store, op_state, flusher, y);
}
class RGWOp_User_Modify : public RGWRESTOp {
RESTArgs::get_string(s, "placement-tags", placement_tags_str, &placement_tags_str);
if (!s->user->get_info().system && system) {
- ldout(s->cct, 0) << "cannot set system flag by non-system user" << dendl;
+ ldpp_dout(this, 0) << "cannot set system flag by non-system user" << dendl;
op_ret = -EINVAL;
return;
}
if (!op_mask_str.empty()) {
uint32_t op_mask;
if (rgw_parse_op_type_list(op_mask_str, &op_mask) < 0) {
- ldout(s->cct, 0) << "failed to parse op_mask" << dendl;
+ ldpp_dout(this, 0) << "failed to parse op_mask" << dendl;
op_ret = -EINVAL;
return;
}
uint32_t op_mask;
int ret = rgw_parse_op_type_list(op_mask_str, &op_mask);
if (ret < 0) {
- ldout(s->cct, 0) << "failed to parse op_mask: " << ret << dendl;
+ ldpp_dout(this, 0) << "failed to parse op_mask: " << ret << dendl;
op_ret = -EINVAL;
return;
}
rgw_placement_rule target_rule;
target_rule.from_str(default_placement_str);
if (!store->svc()->zone->get_zone_params().valid_placement(target_rule)) {
- ldout(s->cct, 0) << "NOTICE: invalid dest placement: " << target_rule.to_str() << dendl;
+ ldpp_dout(this, 0) << "NOTICE: invalid dest placement: " << target_rule.to_str() << dendl;
op_ret = -EINVAL;
return;
}
}
bufferlist data;
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(s, s->user.get(), nullptr, data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
}
- op_ret = RGWUserAdminOp_User::modify(store, op_state, flusher, y);
+ op_ret = RGWUserAdminOp_User::modify(s, store, op_state, flusher, y);
}
class RGWOp_User_Remove : public RGWRESTOp {
op_state.set_purge_data(purge_data);
bufferlist data;
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(s, s->user.get(), nullptr, data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
}
- op_ret = RGWUserAdminOp_User::remove(store, op_state, flusher, s->yield);
+ op_ret = RGWUserAdminOp_User::remove(s, store, op_state, flusher, s->yield);
}
class RGWOp_Subuser_Create : public RGWRESTOp {
op_state.set_key_type(key_type);
bufferlist data;
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(s, s->user.get(), nullptr, data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
}
- op_ret = RGWUserAdminOp_Subuser::create(store, op_state, flusher, y);
+ op_ret = RGWUserAdminOp_Subuser::create(s, store, op_state, flusher, y);
}
class RGWOp_Subuser_Modify : public RGWRESTOp {
op_state.set_key_type(key_type);
bufferlist data;
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(s, s->user.get(), nullptr, data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
}
- op_ret = RGWUserAdminOp_Subuser::modify(store, op_state, flusher, y);
+ op_ret = RGWUserAdminOp_Subuser::modify(s, store, op_state, flusher, y);
}
class RGWOp_Subuser_Remove : public RGWRESTOp {
op_state.set_purge_keys();
bufferlist data;
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(s, s->user.get(), nullptr, data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
}
- op_ret = RGWUserAdminOp_Subuser::remove(store, op_state, flusher, y);
+ op_ret = RGWUserAdminOp_Subuser::remove(s, store, op_state, flusher, y);
}
class RGWOp_Key_Create : public RGWRESTOp {
op_state.set_key_type(key_type);
}
- op_ret = RGWUserAdminOp_Key::create(store, op_state, flusher, y);
+ op_ret = RGWUserAdminOp_Key::create(s, store, op_state, flusher, y);
}
class RGWOp_Key_Remove : public RGWRESTOp {
op_state.set_key_type(key_type);
}
- op_ret = RGWUserAdminOp_Key::remove(store, op_state, flusher, y);
+ op_ret = RGWUserAdminOp_Key::remove(s, store, op_state, flusher, y);
}
class RGWOp_Caps_Add : public RGWRESTOp {
op_state.set_caps(caps);
bufferlist data;
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(s, s->user.get(), nullptr, data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
}
- op_ret = RGWUserAdminOp_Caps::add(store, op_state, flusher, y);
+ op_ret = RGWUserAdminOp_Caps::add(s, store, op_state, flusher, y);
}
class RGWOp_Caps_Remove : public RGWRESTOp {
op_state.set_caps(caps);
bufferlist data;
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(s, s->user.get(), nullptr, data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "forward_request_to_master returned ret=" << op_ret << dendl;
return;
}
- op_ret = RGWUserAdminOp_Caps::remove(store, op_state, flusher, y);
+ op_ret = RGWUserAdminOp_Caps::remove(s, store, op_state, flusher, y);
}
struct UserQuotas {
op_state.set_user_id(uid);
RGWUser user;
- op_ret = user.init(store, op_state, y);
+ op_ret = user.init(s, store, op_state, y);
if (op_ret < 0)
return;
bool set_user = set_all || (quota_type == "user");
if (!(set_all || set_bucket || set_user)) {
- ldout(store->ctx(), 20) << "invalid quota type" << dendl;
+ ldpp_dout(this, 20) << "invalid quota type" << dendl;
op_ret = -EINVAL;
return;
}
}
if (use_http_params && set_all) {
- ldout(store->ctx(), 20) << "quota type was not specified, can't set all quotas via http headers" << dendl;
+ ldpp_dout(this, 20) << "quota type was not specified, can't set all quotas via http headers" << dendl;
op_ret = -EINVAL;
return;
}
op_state.set_user_id(uid);
RGWUser user;
- op_ret = user.init(store, op_state, y);
+ op_ret = user.init(s, store, op_state, y);
if (op_ret < 0) {
- ldout(store->ctx(), 20) << "failed initializing user info: " << op_ret << dendl;
+ ldpp_dout(this, 20) << "failed initializing user info: " << op_ret << dendl;
return;
}
UserQuotas quotas;
if ((op_ret = rgw_rest_get_json_input(store->ctx(), s, quotas, QUOTA_INPUT_MAX_LEN, NULL)) < 0) {
- ldout(store->ctx(), 20) << "failed to retrieve input" << dendl;
+ ldpp_dout(this, 20) << "failed to retrieve input" << dendl;
return;
}
bool empty;
op_ret = rgw_rest_get_json_input(store->ctx(), s, quota, QUOTA_INPUT_MAX_LEN, &empty);
if (op_ret < 0) {
- ldout(store->ctx(), 20) << "failed to retrieve input" << dendl;
+ ldpp_dout(this, 20) << "failed to retrieve input" << dendl;
if (!empty)
return;
string err_msg;
op_ret = user.info(info, &err_msg);
if (op_ret < 0) {
- ldout(store->ctx(), 20) << "failed to get user info: " << op_ret << dendl;
+ ldpp_dout(this, 20) << "failed to get user info: " << op_ret << dendl;
return;
}
RGWQuotaInfo *old_quota;
}
string err;
- op_ret = user.modify(op_state, y, &err);
+ op_ret = user.modify(s, op_state, y, &err);
if (op_ret < 0) {
- ldout(store->ctx(), 20) << "failed updating user info: " << op_ret << ": " << err << dendl;
+ ldpp_dout(this, 20) << "failed updating user info: " << op_ret << ": " << err << dendl;
return;
}
}
bool RGWRestUserPolicy::validate_input()
{
if (policy_name.length() > MAX_POLICY_NAME_LEN) {
- ldout(s->cct, 0) << "ERROR: Invalid policy name length " << dendl;
+ ldpp_dout(this, 0) << "ERROR: Invalid policy name length " << dendl;
return false;
}
std::regex regex_policy_name("[A-Za-z0-9:=,.@-]+");
if (! std::regex_match(policy_name, regex_policy_name)) {
- ldout(s->cct, 0) << "ERROR: Invalid chars in policy name " << dendl;
+ ldpp_dout(this, 0) << "ERROR: Invalid chars in policy name " << dendl;
return false;
}
policy = url_decode(s->info.args.get("PolicyDocument"), true);
if (policy_name.empty() || user_name.empty() || policy.empty()) {
- ldout(s->cct, 20) << "ERROR: one of policy name, user name or policy document is empty"
+ ldpp_dout(this, 20) << "ERROR: one of policy name, user name or policy document is empty"
<< dendl;
return -EINVAL;
}
RGWUserInfo info;
rgw_user user_id(user_name);
- op_ret = store->ctl()->user->get_info_by_uid(user_id, &info, s->yield);
+ op_ret = store->ctl()->user->get_info_by_uid(s, user_id, &info, s->yield);
if (op_ret < 0) {
op_ret = -ERR_NO_SUCH_ENTITY;
return;
}
map<string, bufferlist> uattrs;
- op_ret = store->ctl()->user->get_attrs_by_uid(user_id, &uattrs, s->yield);
+ op_ret = store->ctl()->user->get_attrs_by_uid(s, user_id, &uattrs, s->yield);
if (op_ret == -ENOENT) {
op_ret = -ERR_NO_SUCH_ENTITY;
return;
}
ceph::bufferlist in_data;
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, in_data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(this, s->user.get(), nullptr, in_data, nullptr, s->info, y);
if (op_ret < 0) {
ldpp_dout(this, 0) << "ERROR: forward_request_to_master returned ret=" << op_ret << dendl;
return;
uattrs[RGW_ATTR_USER_POLICY] = in_bl;
RGWObjVersionTracker objv_tracker;
- op_ret = store->ctl()->user->store_info(info, s->yield,
+ op_ret = store->ctl()->user->store_info(s, info, s->yield,
RGWUserCtl::PutParams()
.set_objv_tracker(&objv_tracker)
.set_attrs(&uattrs));
op_ret = -ERR_INTERNAL_ERROR;
}
} catch (rgw::IAM::PolicyParseException& e) {
- ldout(s->cct, 20) << "failed to parse policy: " << e.what() << dendl;
+ ldpp_dout(this, 20) << "failed to parse policy: " << e.what() << dendl;
op_ret = -ERR_MALFORMED_DOC;
}
user_name = s->info.args.get("UserName");
if (policy_name.empty() || user_name.empty()) {
- ldout(s->cct, 20) << "ERROR: one of policy name or user name is empty"
+ ldpp_dout(this, 20) << "ERROR: one of policy name or user name is empty"
<< dendl;
return -EINVAL;
}
rgw_user user_id(user_name);
map<string, bufferlist> uattrs;
- op_ret = store->ctl()->user->get_attrs_by_uid(user_id, &uattrs, s->yield);
+ op_ret = store->ctl()->user->get_attrs_by_uid(s, user_id, &uattrs, s->yield);
if (op_ret == -ENOENT) {
- ldout(s->cct, 0) << "ERROR: attrs not found for user" << user_name << dendl;
+ ldpp_dout(this, 0) << "ERROR: attrs not found for user" << user_name << dendl;
op_ret = -ERR_NO_SUCH_ENTITY;
return;
}
policy = policies[policy_name];
dump(s->formatter);
} else {
- ldout(s->cct, 0) << "ERROR: policy not found" << policy << dendl;
+ ldpp_dout(this, 0) << "ERROR: policy not found" << policy << dendl;
op_ret = -ERR_NO_SUCH_ENTITY;
return;
}
} else {
- ldout(s->cct, 0) << "ERROR: RGW_ATTR_USER_POLICY not found" << dendl;
+ ldpp_dout(this, 0) << "ERROR: RGW_ATTR_USER_POLICY not found" << dendl;
op_ret = -ERR_NO_SUCH_ENTITY;
return;
}
user_name = s->info.args.get("UserName");
if (user_name.empty()) {
- ldout(s->cct, 20) << "ERROR: user name is empty" << dendl;
+ ldpp_dout(this, 20) << "ERROR: user name is empty" << dendl;
return -EINVAL;
}
rgw_user user_id(user_name);
map<string, bufferlist> uattrs;
- op_ret = store->ctl()->user->get_attrs_by_uid(user_id, &uattrs, s->yield);
+ op_ret = store->ctl()->user->get_attrs_by_uid(s, user_id, &uattrs, s->yield);
if (op_ret == -ENOENT) {
- ldout(s->cct, 0) << "ERROR: attrs not found for user" << user_name << dendl;
+ ldpp_dout(this, 0) << "ERROR: attrs not found for user" << user_name << dendl;
op_ret = -ERR_NO_SUCH_ENTITY;
return;
}
s->formatter->close_section();
s->formatter->close_section();
} else {
- ldout(s->cct, 0) << "ERROR: RGW_ATTR_USER_POLICY not found" << dendl;
+ ldpp_dout(this, 0) << "ERROR: RGW_ATTR_USER_POLICY not found" << dendl;
op_ret = -ERR_NO_SUCH_ENTITY;
return;
}
user_name = s->info.args.get("UserName");
if (policy_name.empty() || user_name.empty()) {
- ldout(s->cct, 20) << "ERROR: One of policy name or user name is empty"<< dendl;
+ ldpp_dout(this, 20) << "ERROR: One of policy name or user name is empty"<< dendl;
return -EINVAL;
}
RGWUserInfo info;
map<string, bufferlist> uattrs;
rgw_user user_id(user_name);
- op_ret = store->ctl()->user->get_info_by_uid(user_id, &info, s->yield,
+ op_ret = store->ctl()->user->get_info_by_uid(s, user_id, &info, s->yield,
RGWUserCtl::GetParams()
.set_attrs(&uattrs));
if (op_ret < 0) {
}
ceph::bufferlist in_data;
- op_ret = store->forward_request_to_master(s->user.get(), nullptr, in_data, nullptr, s->info, y);
+ op_ret = store->forward_request_to_master(this, s->user.get(), nullptr, in_data, nullptr, s->info, y);
if (op_ret < 0) {
// a policy might've been uploaded to this site when there was no sync
// req. in earlier releases, proceed deletion
uattrs[RGW_ATTR_USER_POLICY] = in_bl;
RGWObjVersionTracker objv_tracker;
- op_ret = store->ctl()->user->store_info(info, s->yield,
+ op_ret = store->ctl()->user->store_info(s, info, s->yield,
RGWUserCtl::PutParams()
.set_old_info(&info)
.set_objv_tracker(&objv_tracker)
const string RGWRole::role_path_oid_prefix = "role_paths.";
const string RGWRole::role_arn_prefix = "arn:aws:iam::";
-int RGWRole::store_info(bool exclusive, optional_yield y)
+int RGWRole::store_info(const DoutPrefixProvider *dpp, bool exclusive, optional_yield y)
{
using ceph::encode;
string oid = get_info_oid_prefix() + id;
auto svc = ctl->svc;
auto obj_ctx = ctl->svc->sysobj->init_obj_ctx();
- return rgw_put_system_obj(obj_ctx, svc->zone->get_zone_params().roles_pool, oid,
+ return rgw_put_system_obj(dpp, obj_ctx, svc->zone->get_zone_params().roles_pool, oid,
bl, exclusive, NULL, real_time(), y, NULL);
}
-int RGWRole::store_name(bool exclusive, optional_yield y)
+int RGWRole::store_name(const DoutPrefixProvider *dpp, bool exclusive, optional_yield y)
{
RGWNameToId nameToId;
nameToId.obj_id = id;
auto svc = ctl->svc;
auto obj_ctx = svc->sysobj->init_obj_ctx();
- return rgw_put_system_obj(obj_ctx, svc->zone->get_zone_params().roles_pool, oid,
+ return rgw_put_system_obj(dpp, obj_ctx, svc->zone->get_zone_params().roles_pool, oid,
bl, exclusive, NULL, real_time(), y, NULL);
}
-int RGWRole::store_path(bool exclusive, optional_yield y)
+int RGWRole::store_path(const DoutPrefixProvider *dpp, bool exclusive, optional_yield y)
{
string oid = tenant + get_path_oid_prefix() + path + get_info_oid_prefix() + id;
bufferlist bl;
auto obj_ctx = svc->sysobj->init_obj_ctx();
- return rgw_put_system_obj(obj_ctx, svc->zone->get_zone_params().roles_pool, oid,
+ return rgw_put_system_obj(dpp, obj_ctx, svc->zone->get_zone_params().roles_pool, oid,
bl, exclusive, NULL, real_time(), y, NULL);
}
-int RGWRole::create(bool exclusive, optional_yield y)
+int RGWRole::create(const DoutPrefixProvider *dpp, bool exclusive, optional_yield y)
{
int ret;
}
/* check to see the name is not used */
- ret = read_id(name, tenant, id, y);
+ ret = read_id(dpp, name, tenant, id, y);
if (exclusive && ret == 0) {
- ldout(cct, 0) << "ERROR: name " << name << " already in use for role id "
+ ldpp_dout(dpp, 0) << "ERROR: name " << name << " already in use for role id "
<< id << dendl;
return -EEXIST;
} else if ( ret < 0 && ret != -ENOENT) {
- ldout(cct, 0) << "failed reading role id " << id << ": "
+ ldpp_dout(dpp, 0) << "failed reading role id " << id << ": "
<< cpp_strerror(-ret) << dendl;
return ret;
}
auto svc = ctl->svc;
auto& pool = svc->zone->get_zone_params().roles_pool;
- ret = store_info(exclusive, y);
+ ret = store_info(dpp, exclusive, y);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: storing role info in pool: " << pool.name << ": "
+ ldpp_dout(dpp, 0) << "ERROR: storing role info in pool: " << pool.name << ": "
<< id << ": " << cpp_strerror(-ret) << dendl;
return ret;
}
- ret = store_name(exclusive, y);
+ ret = store_name(dpp, exclusive, y);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: storing role name in pool: " << pool.name << ": "
+ ldpp_dout(dpp, 0) << "ERROR: storing role name in pool: " << pool.name << ": "
<< name << ": " << cpp_strerror(-ret) << dendl;
//Delete the role info that was stored in the previous call
string oid = get_info_oid_prefix() + id;
- int info_ret = rgw_delete_system_obj(svc->sysobj, pool, oid, NULL, y);
+ int info_ret = rgw_delete_system_obj(dpp, svc->sysobj, pool, oid, NULL, y);
if (info_ret < 0) {
- ldout(cct, 0) << "ERROR: cleanup of role id from pool: " << pool.name << ": "
+ ldpp_dout(dpp, 0) << "ERROR: cleanup of role id from pool: " << pool.name << ": "
<< id << ": " << cpp_strerror(-info_ret) << dendl;
}
return ret;
}
- ret = store_path(exclusive, y);
+ ret = store_path(dpp, exclusive, y);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: storing role path in pool: " << pool.name << ": "
+ ldpp_dout(dpp, 0) << "ERROR: storing role path in pool: " << pool.name << ": "
<< path << ": " << cpp_strerror(-ret) << dendl;
//Delete the role info that was stored in the previous call
string oid = get_info_oid_prefix() + id;
- int info_ret = rgw_delete_system_obj(svc->sysobj, pool, oid, NULL, y);
+ int info_ret = rgw_delete_system_obj(dpp, svc->sysobj, pool, oid, NULL, y);
if (info_ret < 0) {
- ldout(cct, 0) << "ERROR: cleanup of role id from pool: " << pool.name << ": "
+ ldpp_dout(dpp, 0) << "ERROR: cleanup of role id from pool: " << pool.name << ": "
<< id << ": " << cpp_strerror(-info_ret) << dendl;
}
//Delete role name that was stored in previous call
oid = tenant + get_names_oid_prefix() + name;
- int name_ret = rgw_delete_system_obj(svc->sysobj, pool, oid, NULL, y);
+ int name_ret = rgw_delete_system_obj(dpp, svc->sysobj, pool, oid, NULL, y);
if (name_ret < 0) {
- ldout(cct, 0) << "ERROR: cleanup of role name from pool: " << pool.name << ": "
+ ldpp_dout(dpp, 0) << "ERROR: cleanup of role name from pool: " << pool.name << ": "
<< name << ": " << cpp_strerror(-name_ret) << dendl;
}
return ret;
return 0;
}
-int RGWRole::delete_obj(optional_yield y)
+int RGWRole::delete_obj(const DoutPrefixProvider *dpp, optional_yield y)
{
auto svc = ctl->svc;
auto& pool = svc->zone->get_zone_params().roles_pool;
- int ret = read_name(y);
+ int ret = read_name(dpp, y);
if (ret < 0) {
return ret;
}
- ret = read_info(y);
+ ret = read_info(dpp, y);
if (ret < 0) {
return ret;
}
// Delete id
string oid = get_info_oid_prefix() + id;
- ret = rgw_delete_system_obj(svc->sysobj, pool, oid, NULL, y);
+ ret = rgw_delete_system_obj(dpp, svc->sysobj, pool, oid, NULL, y);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: deleting role id from pool: " << pool.name << ": "
+ ldpp_dout(dpp, 0) << "ERROR: deleting role id from pool: " << pool.name << ": "
<< id << ": " << cpp_strerror(-ret) << dendl;
}
// Delete name
oid = tenant + get_names_oid_prefix() + name;
- ret = rgw_delete_system_obj(svc->sysobj, pool, oid, NULL, y);
+ ret = rgw_delete_system_obj(dpp, svc->sysobj, pool, oid, NULL, y);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: deleting role name from pool: " << pool.name << ": "
+ ldpp_dout(dpp, 0) << "ERROR: deleting role name from pool: " << pool.name << ": "
<< name << ": " << cpp_strerror(-ret) << dendl;
}
// Delete path
oid = tenant + get_path_oid_prefix() + path + get_info_oid_prefix() + id;
- ret = rgw_delete_system_obj(svc->sysobj, pool, oid, NULL, y);
+ ret = rgw_delete_system_obj(dpp, svc->sysobj, pool, oid, NULL, y);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: deleting role path from pool: " << pool.name << ": "
+ ldpp_dout(dpp, 0) << "ERROR: deleting role path from pool: " << pool.name << ": "
<< path << ": " << cpp_strerror(-ret) << dendl;
}
return ret;
}
-int RGWRole::get(optional_yield y)
+int RGWRole::get(const DoutPrefixProvider *dpp, optional_yield y)
{
- int ret = read_name(y);
+ int ret = read_name(dpp, y);
if (ret < 0) {
return ret;
}
- ret = read_info(y);
+ ret = read_info(dpp, y);
if (ret < 0) {
return ret;
}
return 0;
}
-int RGWRole::get_by_id(optional_yield y)
+int RGWRole::get_by_id(const DoutPrefixProvider *dpp, optional_yield y)
{
- int ret = read_info(y);
+ int ret = read_info(dpp, y);
if (ret < 0) {
return ret;
}
return 0;
}
-int RGWRole::update(optional_yield y)
+int RGWRole::update(const DoutPrefixProvider *dpp, optional_yield y)
{
auto& pool = ctl->svc->zone->get_zone_params().roles_pool;
- int ret = store_info(false, y);
+ int ret = store_info(dpp, false, y);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: storing info in pool: " << pool.name << ": "
+ ldpp_dout(dpp, 0) << "ERROR: storing info in pool: " << pool.name << ": "
<< id << ": " << cpp_strerror(-ret) << dendl;
return ret;
}
JSONDecoder::decode_json("assume_role_policy_document", trust_policy, obj);
}
-int RGWRole::read_id(const string& role_name, const string& tenant, string& role_id, optional_yield y)
+int RGWRole::read_id(const DoutPrefixProvider *dpp, const string& role_name, const string& tenant, string& role_id, optional_yield y)
{
auto svc = ctl->svc;
auto& pool = svc->zone->get_zone_params().roles_pool;
bufferlist bl;
auto obj_ctx = svc->sysobj->init_obj_ctx();
- int ret = rgw_get_system_obj(obj_ctx, pool, oid, bl, NULL, NULL, y);
+ int ret = rgw_get_system_obj(obj_ctx, pool, oid, bl, NULL, NULL, y, dpp);
if (ret < 0) {
return ret;
}
using ceph::decode;
decode(nameToId, iter);
} catch (buffer::error& err) {
- ldout(cct, 0) << "ERROR: failed to decode role from pool: " << pool.name << ": "
+ ldpp_dout(dpp, 0) << "ERROR: failed to decode role from pool: " << pool.name << ": "
<< role_name << dendl;
return -EIO;
}
return 0;
}
-int RGWRole::read_info(optional_yield y)
+int RGWRole::read_info(const DoutPrefixProvider *dpp, optional_yield y)
{
auto svc = ctl->svc;
auto& pool = svc->zone->get_zone_params().roles_pool;
bufferlist bl;
auto obj_ctx = svc->sysobj->init_obj_ctx();
- int ret = rgw_get_system_obj(obj_ctx, pool, oid, bl, NULL, NULL, y);
+ int ret = rgw_get_system_obj(obj_ctx, pool, oid, bl, NULL, NULL, y, dpp);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: failed reading role info from pool: " << pool.name <<
+ ldpp_dout(dpp, 0) << "ERROR: failed reading role info from pool: " << pool.name <<
": " << id << ": " << cpp_strerror(-ret) << dendl;
return ret;
}
auto iter = bl.cbegin();
decode(*this, iter);
} catch (buffer::error& err) {
- ldout(cct, 0) << "ERROR: failed to decode role info from pool: " << pool.name <<
+ ldpp_dout(dpp, 0) << "ERROR: failed to decode role info from pool: " << pool.name <<
": " << id << dendl;
return -EIO;
}
return 0;
}
-int RGWRole::read_name(optional_yield y)
+int RGWRole::read_name(const DoutPrefixProvider *dpp, optional_yield y)
{
auto svc = ctl->svc;
auto& pool = svc->zone->get_zone_params().roles_pool;
bufferlist bl;
auto obj_ctx = svc->sysobj->init_obj_ctx();
- int ret = rgw_get_system_obj(obj_ctx, pool, oid, bl, NULL, NULL, y);
+ int ret = rgw_get_system_obj(obj_ctx, pool, oid, bl, NULL, NULL, y, dpp);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: failed reading role name from pool: " << pool.name << ": "
+ ldpp_dout(dpp, 0) << "ERROR: failed reading role name from pool: " << pool.name << ": "
<< name << ": " << cpp_strerror(-ret) << dendl;
return ret;
}
auto iter = bl.cbegin();
decode(nameToId, iter);
} catch (buffer::error& err) {
- ldout(cct, 0) << "ERROR: failed to decode role name from pool: " << pool.name << ": "
+ ldpp_dout(dpp, 0) << "ERROR: failed to decode role name from pool: " << pool.name << ": "
<< name << dendl;
return -EIO;
}
this->trust_policy = trust_policy;
}
-int RGWRole::get_roles_by_path_prefix(RGWRados *store,
+int RGWRole::get_roles_by_path_prefix(const DoutPrefixProvider *dpp,
+ RGWRados *store,
CephContext *cct,
const string& path_prefix,
const string& tenant,
RGWListRawObjsCtx ctx;
do {
list<string> oids;
- int r = store->list_raw_objects(pool, prefix, 1000, ctx, oids, &is_truncated);
+ int r = store->list_raw_objects(dpp, pool, prefix, 1000, ctx, oids, &is_truncated);
if (r < 0) {
- ldout(cct, 0) << "ERROR: listing filtered objects failed: " << pool.name << ": "
+ ldpp_dout(dpp, 0) << "ERROR: listing filtered objects failed: " << pool.name << ": "
<< prefix << ": " << cpp_strerror(-r) << dendl;
return r;
}
RGWRole role(cct, store->pctl);
role.set_id(id);
- int ret = role.read_info(y);
+ int ret = role.read_info(dpp, y);
if (ret < 0) {
return ret;
}
string tenant;
uint64_t max_session_duration;
- int store_info(bool exclusive, optional_yield y);
- int store_name(bool exclusive, optional_yield y);
- int store_path(bool exclusive, optional_yield y);
- int read_id(const string& role_name, const string& tenant, string& role_id, optional_yield y);
- int read_name(optional_yield y);
- int read_info(optional_yield y);
+ int store_info(const DoutPrefixProvider *dpp, bool exclusive, optional_yield y);
+ int store_name(const DoutPrefixProvider *dpp, bool exclusive, optional_yield y);
+ int store_path(const DoutPrefixProvider *dpp, bool exclusive, optional_yield y);
+ int read_id(const DoutPrefixProvider *dpp, const string& role_name, const string& tenant, string& role_id, optional_yield y);
+ int read_name(const DoutPrefixProvider *dpp, optional_yield y);
+ int read_info(const DoutPrefixProvider *dpp, optional_yield y);
bool validate_input();
void extract_name_tenant(const std::string& str);
void set_id(const string& id) { this->id = id; }
- int create(bool exclusive, optional_yield y);
- int delete_obj(optional_yield y);
- int get(optional_yield y);
- int get_by_id(optional_yield y);
- int update(optional_yield y);
+ int create(const DoutPrefixProvider *dpp, bool exclusive, optional_yield y);
+ int delete_obj(const DoutPrefixProvider *dpp, optional_yield y);
+ int get(const DoutPrefixProvider *dpp, optional_yield y);
+ int get_by_id(const DoutPrefixProvider *dpp, optional_yield y);
+ int update(const DoutPrefixProvider *dpp, optional_yield y);
void update_trust_policy(string& trust_policy);
void set_perm_policy(const string& policy_name, const string& perm_policy);
vector<string> get_role_policy_names();
static const string& get_names_oid_prefix();
static const string& get_info_oid_prefix();
static const string& get_path_oid_prefix();
- static int get_roles_by_path_prefix(RGWRados *store,
+ static int get_roles_by_path_prefix(const DoutPrefixProvider *dpp,
+ RGWRados *store,
CephContext *cct,
const string& path_prefix,
const string& tenant,
using RGWAttrs = std::map<std::string, ceph::buffer::list>;
-class RGWStore : public DoutPrefixProvider {
+class RGWStore {
public:
RGWStore() {}
virtual ~RGWStore() = default;
virtual std::unique_ptr<RGWUser> get_user(const rgw_user& u) = 0;
virtual std::unique_ptr<RGWObject> get_object(const rgw_obj_key& k) = 0;
- virtual int get_bucket(RGWUser* u, const rgw_bucket& b, std::unique_ptr<RGWBucket>* bucket, optional_yield y) = 0;
+ virtual int get_bucket(const DoutPrefixProvider *dpp, RGWUser* u, const rgw_bucket& b, std::unique_ptr<RGWBucket>* bucket, optional_yield y) = 0;
virtual int get_bucket(RGWUser* u, const RGWBucketInfo& i, std::unique_ptr<RGWBucket>* bucket) = 0;
- virtual int get_bucket(RGWUser* u, const std::string& tenant, const std::string& name, std::unique_ptr<RGWBucket>* bucket, optional_yield y) = 0;
- virtual int create_bucket(RGWUser& u, const rgw_bucket& b,
+ virtual int get_bucket(const DoutPrefixProvider *dpp, RGWUser* u, const std::string& tenant, const std::string& name, std::unique_ptr<RGWBucket>* bucket, optional_yield y) = 0;
+ virtual int create_bucket(const DoutPrefixProvider *dpp,
+ RGWUser& u, const rgw_bucket& b,
const std::string& zonegroup_id,
rgw_placement_rule& placement_rule,
std::string& swift_ver_location,
optional_yield y) = 0;
virtual RGWBucketList* list_buckets(void) = 0;
virtual bool is_meta_master() = 0;
- virtual int forward_request_to_master(RGWUser* user, obj_version *objv,
+ virtual int forward_request_to_master(const DoutPrefixProvider *dpp, RGWUser* user, obj_version *objv,
bufferlist& in_data, JSONParser *jp, req_info& info,
optional_yield y) = 0;
- virtual int defer_gc(RGWObjectCtx *rctx, RGWBucket* bucket, RGWObject* obj,
+ virtual int defer_gc(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx, RGWBucket* bucket, RGWObject* obj,
optional_yield y) = 0;
virtual const RGWZoneGroup& get_zonegroup() = 0;
virtual int get_zonegroup(const string& id, RGWZoneGroup& zonegroup) = 0;
virtual int cluster_stat(RGWClusterStat& stats) = 0;
virtual std::unique_ptr<Lifecycle> get_lifecycle(void) = 0;
virtual RGWLC* get_rgwlc(void) = 0;
- virtual int delete_raw_obj(const rgw_raw_obj& obj) = 0;
+ virtual int delete_raw_obj(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj) = 0;
virtual void get_raw_obj(const rgw_placement_rule& placement_rule, const rgw_obj& obj, rgw_raw_obj* raw_obj) = 0;
- virtual int get_raw_chunk_size(const rgw_raw_obj& obj, uint64_t* chunk_size) = 0;
+ virtual int get_raw_chunk_size(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, uint64_t* chunk_size) = 0;
virtual void finalize(void)=0;
RGWUser(const RGWUserInfo& _i) : info(_i) {}
virtual ~RGWUser() = default;
- virtual int list_buckets(const std::string& marker, const std::string& end_marker,
+ virtual int list_buckets(const DoutPrefixProvider *dpp,
+ const std::string& marker, const std::string& end_marker,
uint64_t max, bool need_stats, RGWBucketList& buckets,
optional_yield y) = 0;
virtual RGWBucket* create_bucket(rgw_bucket& bucket, ceph::real_time creation_time) = 0;
static bool empty(RGWUser* u) { return (!u || u->info.user_id.id.empty()); }
/* Placeholders */
- virtual int load_by_id(optional_yield y) = 0;
+ virtual int load_by_id(const DoutPrefixProvider *dpp, optional_yield y) = 0;
/* dang temporary; will be removed when User is complete */
rgw_user& get_user() { return info.user_id; }
}
virtual ~RGWBucket() = default;
- virtual int load_by_name(const std::string& tenant, const std::string& bucket_name, const std::string bucket_instance_id, RGWSysObjectCtx *rctx, optional_yield y) = 0;
+ virtual int load_by_name(const DoutPrefixProvider *dpp, const std::string& tenant, const std::string& bucket_name, const std::string bucket_instance_id, RGWSysObjectCtx *rctx, optional_yield y) = 0;
virtual std::unique_ptr<RGWObject> get_object(const rgw_obj_key& key) = 0;
- virtual int list(ListParams&, int, ListResults&, optional_yield y) = 0;
+ virtual int list(const DoutPrefixProvider *dpp, ListParams&, int, ListResults&, optional_yield y) = 0;
virtual RGWObject* create_object(const rgw_obj_key& key /* Attributes */) = 0;
virtual RGWAttrs& get_attrs(void) { return attrs; }
virtual int set_attrs(RGWAttrs a) { attrs = a; return 0; }
- virtual int remove_bucket(bool delete_children, std::string prefix, std::string delimiter, bool forward_to_master, req_info* req_info, optional_yield y) = 0;
+ virtual int remove_bucket(const DoutPrefixProvider *dpp, bool delete_children, std::string prefix, std::string delimiter, bool forward_to_master, req_info* req_info, optional_yield y) = 0;
virtual RGWAccessControlPolicy& get_acl(void) = 0;
- virtual int set_acl(RGWAccessControlPolicy& acl, optional_yield y) = 0;
- virtual int get_bucket_info(optional_yield y) = 0;
- virtual int get_bucket_stats(RGWBucketInfo& bucket_info, int shard_id,
+ virtual int set_acl(const DoutPrefixProvider *dpp, RGWAccessControlPolicy& acl, optional_yield y) = 0;
+ virtual int get_bucket_info(const DoutPrefixProvider *dpp, optional_yield y) = 0;
+ virtual int get_bucket_stats(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info, int shard_id,
std::string *bucket_ver, std::string *master_ver,
std::map<RGWObjCategory, RGWStorageStats>& stats,
std::string *max_marker = nullptr,
bool *syncstopped = nullptr) = 0;
- virtual int read_bucket_stats(optional_yield y) = 0;
- virtual int sync_user_stats(optional_yield y) = 0;
- virtual int update_container_stats(void) = 0;
- virtual int check_bucket_shards(void) = 0;
- virtual int link(RGWUser* new_user, optional_yield y) = 0;
+ virtual int read_bucket_stats(const DoutPrefixProvider *dpp, optional_yield y) = 0;
+ virtual int sync_user_stats(const DoutPrefixProvider *dpp, optional_yield y) = 0;
+ virtual int update_container_stats(const DoutPrefixProvider *dpp) = 0;
+ virtual int check_bucket_shards(const DoutPrefixProvider *dpp) = 0;
+ virtual int link(const DoutPrefixProvider *dpp, RGWUser* new_user, optional_yield y) = 0;
virtual int unlink(RGWUser* new_user, optional_yield y) = 0;
- virtual int chown(RGWUser* new_user, RGWUser* old_user, optional_yield y) = 0;
- virtual int put_instance_info(bool exclusive, ceph::real_time mtime) = 0;
+ virtual int chown(RGWUser* new_user, RGWUser* old_user, optional_yield y, const DoutPrefixProvider *dpp) = 0;
+ virtual int put_instance_info(const DoutPrefixProvider *dpp, bool exclusive, ceph::real_time mtime) = 0;
virtual bool is_owner(RGWUser* user) = 0;
virtual RGWUser* get_owner(void) { return owner; };
virtual ACLOwner get_acl_owner(void) { return ACLOwner(info.owner); };
- virtual int check_empty(optional_yield y) = 0;
+ virtual int check_empty(const DoutPrefixProvider *dpp, optional_yield y) = 0;
virtual int check_quota(RGWQuotaInfo& user_quota, RGWQuotaInfo& bucket_quota, uint64_t obj_size, optional_yield y, bool check_size_only = false) = 0;
- virtual int set_instance_attrs(RGWAttrs& attrs, optional_yield y) = 0;
- virtual int try_refresh_info(ceph::real_time *pmtime) = 0;
- virtual int read_usage(uint64_t start_epoch, uint64_t end_epoch, uint32_t max_entries,
+ virtual int set_instance_attrs(const DoutPrefixProvider *dpp, RGWAttrs& attrs, optional_yield y) = 0;
+ virtual int try_refresh_info(const DoutPrefixProvider *dpp, ceph::real_time *pmtime) = 0;
+ virtual int read_usage(const DoutPrefixProvider *dpp, uint64_t start_epoch, uint64_t end_epoch, uint32_t max_entries,
bool *is_truncated, RGWUsageIter& usage_iter,
map<rgw_user_bucket, rgw_usage_log_entry>& usage) = 0;
virtual ~ReadOp() = default;
- virtual int prepare(optional_yield y) = 0;
- virtual int read(int64_t ofs, int64_t end, bufferlist& bl, optional_yield y) = 0;
- virtual int iterate(int64_t ofs, int64_t end, RGWGetDataCB *cb, optional_yield y) = 0;
- virtual int get_manifest(RGWObjManifest **pmanifest, optional_yield y) = 0;
- virtual int get_attr(const char *name, bufferlist& dest, optional_yield y) = 0;
+ virtual int prepare(optional_yield y, const DoutPrefixProvider *dpp) = 0;
+ virtual int read(int64_t ofs, int64_t end, bufferlist& bl, optional_yield y, const DoutPrefixProvider *dpp) = 0;
+ virtual int iterate(const DoutPrefixProvider *dpp, int64_t ofs, int64_t end, RGWGetDataCB *cb, optional_yield y) = 0;
+ virtual int get_manifest(const DoutPrefixProvider *dpp, RGWObjManifest **pmanifest, optional_yield y) = 0;
+ virtual int get_attr(const DoutPrefixProvider *dpp, const char *name, bufferlist& dest, optional_yield y) = 0;
};
struct WriteOp {
virtual ~WriteOp() = default;
virtual int prepare(optional_yield y) = 0;
- virtual int write_meta(uint64_t size, uint64_t accounted_size, optional_yield y) = 0;
+ virtual int write_meta(const DoutPrefixProvider *dpp, uint64_t size, uint64_t accounted_size, optional_yield y) = 0;
//virtual int write_data(const char *data, uint64_t ofs, uint64_t len, bool exclusive) = 0;
};
virtual int read(off_t offset, off_t length, std::iostream& stream) = 0;
virtual int write(off_t offset, off_t length, std::iostream& stream) = 0;
- virtual int delete_object(RGWObjectCtx* obj_ctx, ACLOwner obj_owner,
+ virtual int delete_object(const DoutPrefixProvider *dpp, RGWObjectCtx* obj_ctx, ACLOwner obj_owner,
ACLOwner bucket_owner, ceph::real_time unmod_since,
bool high_precision_time, uint64_t epoch,
- std::string& version_id, optional_yield y) = 0;
+ std::string& version_id,
+ optional_yield y,
+ bool prevent_versioning = false) = 0;
virtual int copy_object(RGWObjectCtx& obj_ctx, RGWUser* user,
req_info *info, const rgw_zone_id& source_zone,
rgw::sal::RGWObject* dest_object, rgw::sal::RGWBucket* dest_bucket,
bool empty() const { return key.empty(); }
const std::string &get_name() const { return key.name; }
- virtual int get_obj_state(RGWObjectCtx *rctx, RGWBucket& bucket, RGWObjState **state, optional_yield y, bool follow_olh = false) = 0;
- virtual int set_obj_attrs(RGWObjectCtx* rctx, RGWAttrs* setattrs, RGWAttrs* delattrs, optional_yield y, rgw_obj* target_obj = NULL) = 0;
- virtual int get_obj_attrs(RGWObjectCtx *rctx, optional_yield y, rgw_obj* target_obj = NULL) = 0;
- virtual int modify_obj_attrs(RGWObjectCtx *rctx, const char *attr_name, bufferlist& attr_val, optional_yield y) = 0;
- virtual int delete_obj_attrs(RGWObjectCtx *rctx, const char *attr_name, optional_yield y) = 0;
+ virtual int get_obj_state(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx, RGWBucket& bucket, RGWObjState **state, optional_yield y, bool follow_olh = false) = 0;
+ virtual int set_obj_attrs(const DoutPrefixProvider *dpp, RGWObjectCtx* rctx, RGWAttrs* setattrs, RGWAttrs* delattrs, optional_yield y, rgw_obj* target_obj = NULL) = 0;
+ virtual int get_obj_attrs(RGWObjectCtx *rctx, optional_yield y, const DoutPrefixProvider *dpp, rgw_obj* target_obj = NULL) = 0;
+ virtual int modify_obj_attrs(RGWObjectCtx *rctx, const char *attr_name, bufferlist& attr_val, optional_yield y, const DoutPrefixProvider *dpp) = 0;
+ virtual int delete_obj_attrs(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx, const char *attr_name, optional_yield y) = 0;
virtual int copy_obj_data(RGWObjectCtx& rctx, RGWBucket* dest_bucket, RGWObject* dest_obj, uint16_t olh_epoch, std::string* petag, const DoutPrefixProvider *dpp, optional_yield y) = 0;
virtual bool is_expired() = 0;
virtual void gen_rand_obj_instance_name() = 0;
virtual void raw_obj_to_obj(const rgw_raw_obj& raw_obj) = 0;
virtual void get_raw_obj(rgw_raw_obj* raw_obj) = 0;
- virtual MPSerializer* get_serializer(const std::string& lock_name) = 0;
+ virtual MPSerializer* get_serializer(const DoutPrefixProvider *dpp, const std::string& lock_name) = 0;
virtual int transition(RGWObjectCtx& rctx,
RGWBucket* bucket,
const rgw_placement_rule& placement_rule,
uint64_t olh_epoch,
const DoutPrefixProvider *dpp,
optional_yield y) = 0;
- virtual int get_max_chunk_size(rgw_placement_rule placement_rule,
+ virtual int get_max_chunk_size(const DoutPrefixProvider *dpp,
+ rgw_placement_rule placement_rule,
uint64_t* max_chunk_size,
uint64_t* alignment = nullptr) = 0;
virtual void get_max_aligned_size(uint64_t size, uint64_t alignment, uint64_t *max_size) = 0;
virtual std::unique_ptr<WriteOp> get_write_op(RGWObjectCtx*) = 0;
/* OMAP */
- virtual int omap_get_vals_by_keys(const std::string& oid,
+ virtual int omap_get_vals_by_keys(const DoutPrefixProvider *dpp, const std::string& oid,
const std::set<std::string>& keys,
RGWAttrs *vals) = 0;
- virtual int omap_set_val_by_key(const std::string& key, bufferlist& val,
+ virtual int omap_set_val_by_key(const DoutPrefixProvider *dpp, const std::string& key, bufferlist& val,
bool must_exist, optional_yield y) = 0;
static bool empty(RGWObject* o) { return (!o || o->empty()); }
Serializer() = default;
virtual ~Serializer() = default;
- virtual int try_lock(utime_t dur, optional_yield y) = 0;
+ virtual int try_lock(const DoutPrefixProvider *dpp, utime_t dur, optional_yield y) = 0;
virtual int unlock() = 0;
};
namespace rgw::sal {
-int RGWRadosUser::list_buckets(const string& marker, const string& end_marker,
+int RGWRadosUser::list_buckets(const DoutPrefixProvider *dpp, const string& marker, const string& end_marker,
uint64_t max, bool need_stats, RGWBucketList &buckets,
optional_yield y)
{
int ret;
buckets.clear();
- ret = store->ctl()->user->list_buckets(info.user_id, marker, end_marker, max,
+ ret = store->ctl()->user->list_buckets(dpp, info.user_id, marker, end_marker, max,
need_stats, &ulist, &is_truncated, y);
if (ret < 0)
return ret;
return NULL;
}
-int RGWRadosUser::load_by_id(optional_yield y)
+int RGWRadosUser::load_by_id(const DoutPrefixProvider *dpp, optional_yield y)
{
- return store->ctl()->user->get_info_by_uid(info.user_id, &info, y);
+ return store->ctl()->user->get_info_by_uid(dpp, info.user_id, &info, y);
}
std::unique_ptr<RGWObject> RGWRadosStore::get_object(const rgw_obj_key& k)
return nullptr;
}
-int RGWRadosBucket::remove_bucket(bool delete_children, std::string prefix, std::string delimiter, bool forward_to_master, req_info* req_info, optional_yield y)
+int RGWRadosBucket::remove_bucket(const DoutPrefixProvider *dpp,
+ bool delete_children,
+ std::string prefix,
+ std::string delimiter,
+ bool forward_to_master,
+ req_info* req_info, optional_yield y)
{
int ret;
// Refresh info
- ret = get_bucket_info(y);
+ ret = get_bucket_info(dpp, y);
if (ret < 0)
return ret;
ListResults results;
- bool is_truncated = false;
do {
results.objs.clear();
- ret = list(params, 1000, results, y);
- if (ret < 0)
- return ret;
+ ret = list(dpp, params, 1000, results, y);
+ if (ret < 0)
+ return ret;
if (!results.objs.empty() && !delete_children) {
- lderr(store->ctx()) << "ERROR: could not remove non-empty bucket " << info.bucket.name <<
+ ldpp_dout(dpp, -1) << "ERROR: could not remove non-empty bucket " << info.bucket.name <<
dendl;
return -ENOTEMPTY;
}
for (const auto& obj : results.objs) {
rgw_obj_key key(obj.key);
/* xxx dang */
- ret = rgw_remove_object(store, info, info.bucket, key);
+ ret = rgw_remove_object(dpp, store, info, info.bucket, key);
if (ret < 0 && ret != -ENOENT) {
return ret;
}
}
- } while(is_truncated);
+ } while(results.is_truncated);
/* If there's a prefix, then we are aborting multiparts as well */
if (!prefix.empty()) {
- ret = abort_bucket_multiparts(store, store->ctx(), info, prefix, delimiter);
+ ret = abort_bucket_multiparts(dpp, store, store->ctx(), info, prefix, delimiter);
if (ret < 0) {
return ret;
}
}
- ret = store->ctl()->bucket->sync_user_stats(info.owner, info, y);
+ ret = store->ctl()->bucket->sync_user_stats(dpp, info.owner, info, y);
if (ret < 0) {
ldout(store->ctx(), 1) << "WARNING: failed sync user stats before bucket delete. ret=" << ret << dendl;
}
// if we deleted children above we will force delete, as any that
// remain is detrius from a prior bug
- ret = store->getRados()->delete_bucket(info, ot, y, !delete_children);
+ ret = store->getRados()->delete_bucket(info, ot, y, dpp, !delete_children);
if (ret < 0) {
- lderr(store->ctx()) << "ERROR: could not remove bucket " <<
+ ldpp_dout(dpp, -1) << "ERROR: could not remove bucket " <<
info.bucket.name << dendl;
return ret;
}
// they should be removed (note that any pending notifications on the bucket are still going to be sent)
RGWPubSub ps(store, info.owner.tenant);
RGWPubSub::Bucket ps_bucket(&ps, info.bucket);
- const auto ps_ret = ps_bucket.remove_notifications(y);
+ const auto ps_ret = ps_bucket.remove_notifications(dpp, y);
if (ps_ret < 0 && ps_ret != -ENOENT) {
lderr(store->ctx()) << "ERROR: unable to remove notifications from bucket. ret=" << ps_ret << dendl;
}
- ret = store->ctl()->bucket->unlink_bucket(info.owner, info.bucket, y, false);
+ ret = store->ctl()->bucket->unlink_bucket(info.owner, info.bucket, y, dpp, false);
if (ret < 0) {
- lderr(store->ctx()) << "ERROR: unable to remove user bucket information" << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: unable to remove user bucket information" << dendl;
}
if (forward_to_master) {
bufferlist in_data;
- ret = store->forward_request_to_master(owner, &ot.read_version, in_data, nullptr, *req_info, y);
+ ret = store->forward_request_to_master(dpp, owner, &ot.read_version, in_data, nullptr, *req_info, y);
if (ret < 0) {
if (ret == -ENOENT) {
/* adjust error, we want to return with NoSuchBucket and not
return ret;
}
-int RGWRadosBucket::get_bucket_info(optional_yield y)
+int RGWRadosBucket::get_bucket_info(const DoutPrefixProvider *dpp, optional_yield y)
{
auto obj_ctx = store->svc()->sysobj->init_obj_ctx();
RGWSI_MetaBackend_CtxParams bectx_params = RGWSI_MetaBackend_CtxParams_SObj(&obj_ctx);
RGWObjVersionTracker ep_ot;
- int ret = store->ctl()->bucket->read_bucket_info(info.bucket, &info, y,
+ int ret = store->ctl()->bucket->read_bucket_info(info.bucket, &info, y, dpp,
RGWBucketCtl::BucketInstance::GetParams()
.set_mtime(&mtime)
.set_attrs(&attrs)
return ret;
}
-int RGWRadosBucket::load_by_name(const std::string& tenant, const std::string& bucket_name, const std::string bucket_instance_id, RGWSysObjectCtx *rctx, optional_yield y)
+int RGWRadosBucket::load_by_name(const DoutPrefixProvider *dpp, const std::string& tenant, const std::string& bucket_name, const std::string bucket_instance_id, RGWSysObjectCtx *rctx, optional_yield y)
{
info.bucket.tenant = tenant;
info.bucket.name = bucket_name;
ent.bucket = info.bucket;
if (bucket_instance_id.empty()) {
- return get_bucket_info(y);
+ return get_bucket_info(dpp, y);
}
- return store->getRados()->get_bucket_instance_info(*rctx, info.bucket, info, NULL, &attrs, y);
+ return store->getRados()->get_bucket_instance_info(*rctx, info.bucket, info, NULL, &attrs, y, dpp);
}
-int RGWRadosBucket::get_bucket_stats(RGWBucketInfo& bucket_info, int shard_id,
+int RGWRadosBucket::get_bucket_stats(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info, int shard_id,
std::string *bucket_ver, std::string *master_ver,
std::map<RGWObjCategory, RGWStorageStats>& stats,
std::string *max_marker, bool *syncstopped)
{
- return store->getRados()->get_bucket_stats(bucket_info, shard_id, bucket_ver, master_ver, stats, max_marker, syncstopped);
+ return store->getRados()->get_bucket_stats(dpp, bucket_info, shard_id, bucket_ver, master_ver, stats, max_marker, syncstopped);
}
-int RGWRadosBucket::read_bucket_stats(optional_yield y)
+int RGWRadosBucket::read_bucket_stats(const DoutPrefixProvider *dpp, optional_yield y)
{
- int ret = store->ctl()->bucket->read_bucket_stats(info.bucket, &ent, y);
+ int ret = store->ctl()->bucket->read_bucket_stats(info.bucket, &ent, y, dpp);
info.placement_rule = ent.placement_rule;
return ret;
}
-int RGWRadosBucket::sync_user_stats(optional_yield y)
+int RGWRadosBucket::sync_user_stats(const DoutPrefixProvider *dpp, optional_yield y)
{
- return store->ctl()->bucket->sync_user_stats(owner->get_id(), info, y);
+ return store->ctl()->bucket->sync_user_stats(dpp, owner->get_id(), info, y);
}
-int RGWRadosBucket::update_container_stats(void)
+int RGWRadosBucket::update_container_stats(const DoutPrefixProvider *dpp)
{
int ret;
map<std::string, RGWBucketEnt> m;
m[info.bucket.name] = ent;
- ret = store->getRados()->update_containers_stats(m);
+ ret = store->getRados()->update_containers_stats(m, dpp);
if (!ret)
return -EEXIST;
if (ret < 0)
return 0;
}
-int RGWRadosBucket::check_bucket_shards(void)
+int RGWRadosBucket::check_bucket_shards(const DoutPrefixProvider *dpp)
{
- return store->getRados()->check_bucket_shards(info, info.bucket, get_count());
+ return store->getRados()->check_bucket_shards(info, info.bucket, get_count(), dpp);
}
-int RGWRadosBucket::link(RGWUser* new_user, optional_yield y)
+int RGWRadosBucket::link(const DoutPrefixProvider *dpp, RGWUser* new_user, optional_yield y)
{
RGWBucketEntryPoint ep;
ep.bucket = info.bucket;
rgw_ep_info ep_data{ep, ep_attrs};
return store->ctl()->bucket->link_bucket(new_user->get_user(), info.bucket,
- ceph::real_time(), y, true, &ep_data);
+ ceph::real_time(), y, dpp, true, &ep_data);
}
int RGWRadosBucket::unlink(RGWUser* new_user, optional_yield y)
return -1;
}
-int RGWRadosBucket::chown(RGWUser* new_user, RGWUser* old_user, optional_yield y)
+int RGWRadosBucket::chown(RGWUser* new_user, RGWUser* old_user, optional_yield y, const DoutPrefixProvider *dpp)
{
string obj_marker;
return store->ctl()->bucket->chown(store, info, new_user->get_user(),
- old_user->get_display_name(), obj_marker, y);
+ old_user->get_display_name(), obj_marker, y, dpp);
}
-int RGWRadosBucket::put_instance_info(bool exclusive, ceph::real_time _mtime)
+int RGWRadosBucket::put_instance_info(const DoutPrefixProvider *dpp, bool exclusive, ceph::real_time _mtime)
{
mtime = _mtime;
- return store->getRados()->put_bucket_instance_info(info, exclusive, mtime, &attrs);
+ return store->getRados()->put_bucket_instance_info(info, exclusive, mtime, &attrs, dpp);
}
/* Make sure to call get_bucket_info() if you need it first */
return (info.owner.compare(user->get_user()) == 0);
}
-int RGWRadosBucket::check_empty(optional_yield y)
+int RGWRadosBucket::check_empty(const DoutPrefixProvider *dpp, optional_yield y)
{
- return store->getRados()->check_bucket_empty(info, y);
+ return store->getRados()->check_bucket_empty(dpp, info, y);
}
int RGWRadosBucket::check_quota(RGWQuotaInfo& user_quota, RGWQuotaInfo& bucket_quota, uint64_t obj_size,
user_quota, bucket_quota, obj_size, y, check_size_only);
}
-int RGWRadosBucket::set_instance_attrs(RGWAttrs& attrs, optional_yield y)
+int RGWRadosBucket::set_instance_attrs(const DoutPrefixProvider *dpp, RGWAttrs& attrs, optional_yield y)
{
return store->ctl()->bucket->set_bucket_instance_attrs(get_info(),
- attrs, &get_info().objv_tracker, y);
+ attrs, &get_info().objv_tracker, y, dpp);
}
-int RGWRadosBucket::try_refresh_info(ceph::real_time *pmtime)
+int RGWRadosBucket::try_refresh_info(const DoutPrefixProvider *dpp, ceph::real_time *pmtime)
{
- return store->getRados()->try_refresh_bucket_info(info, pmtime, &attrs);
+ return store->getRados()->try_refresh_bucket_info(info, pmtime, dpp, &attrs);
}
-int RGWRadosBucket::read_usage(uint64_t start_epoch, uint64_t end_epoch,
+int RGWRadosBucket::read_usage(const DoutPrefixProvider *dpp, uint64_t start_epoch, uint64_t end_epoch,
uint32_t max_entries, bool *is_truncated,
RGWUsageIter& usage_iter,
map<rgw_user_bucket, rgw_usage_log_entry>& usage)
{
- return store->getRados()->read_usage(owner->get_id(), get_name(), start_epoch,
+ return store->getRados()->read_usage(dpp, owner->get_id(), get_name(), start_epoch,
end_epoch, max_entries, is_truncated,
usage_iter, usage);
}
-int RGWRadosBucket::set_acl(RGWAccessControlPolicy &acl, optional_yield y)
+int RGWRadosBucket::set_acl(const DoutPrefixProvider *dpp, RGWAccessControlPolicy &acl, optional_yield y)
{
bufferlist aclbl;
acls = acl;
acl.encode(aclbl);
- return store->ctl()->bucket->set_acl(acl.get_owner(), info.bucket, info, aclbl, y);
+ return store->ctl()->bucket->set_acl(acl.get_owner(), info.bucket, info, aclbl, y, dpp);
}
std::unique_ptr<RGWObject> RGWRadosBucket::get_object(const rgw_obj_key& k)
return std::unique_ptr<RGWObject>(new RGWRadosObject(this->store, k, this));
}
-int RGWRadosBucket::list(ListParams& params, int max, ListResults& results, optional_yield y)
+int RGWRadosBucket::list(const DoutPrefixProvider *dpp, ListParams& params, int max, ListResults& results, optional_yield y)
{
RGWRados::Bucket target(store->getRados(), get_info());
if (params.shard_id >= 0) {
list_op.params.list_versions = params.list_versions;
list_op.params.allow_unordered = params.allow_unordered;
- int ret = list_op.list_objects(max, &results.objs, &results.common_prefixes, &results.is_truncated, y);
+ int ret = list_op.list_objects(dpp, max, &results.objs, &results.common_prefixes, &results.is_truncated, y);
if (ret >= 0) {
results.next_marker = list_op.get_next_marker();
}
return 0;
}
-int RGWRadosObject::get_obj_state(RGWObjectCtx *rctx, RGWBucket& bucket, RGWObjState **state, optional_yield y, bool follow_olh)
+int RGWRadosObject::get_obj_state(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx, RGWBucket& bucket, RGWObjState **state, optional_yield y, bool follow_olh)
{
rgw_obj obj(bucket.get_key(), key.name);
- return store->getRados()->get_obj_state(rctx, bucket.get_info(), obj, state, follow_olh, y);
+ return store->getRados()->get_obj_state(dpp, rctx, bucket.get_info(), obj, state, follow_olh, y);
}
-int RGWRadosObject::read_attrs(RGWRados::Object::Read &read_op, optional_yield y, rgw_obj *target_obj)
+int RGWRadosObject::read_attrs(RGWRados::Object::Read &read_op, optional_yield y, const DoutPrefixProvider *dpp, rgw_obj *target_obj)
{
read_op.params.attrs = &attrs;
read_op.params.target_obj = target_obj;
read_op.params.obj_size = &obj_size;
read_op.params.lastmod = &mtime;
- return read_op.prepare(y);
+ return read_op.prepare(y, dpp);
}
-int RGWRadosObject::set_obj_attrs(RGWObjectCtx* rctx, RGWAttrs* setattrs, RGWAttrs* delattrs, optional_yield y, rgw_obj* target_obj)
+int RGWRadosObject::set_obj_attrs(const DoutPrefixProvider *dpp, RGWObjectCtx* rctx, RGWAttrs* setattrs, RGWAttrs* delattrs, optional_yield y, rgw_obj* target_obj)
{
RGWAttrs empty;
rgw_obj target = get_obj();
if (!target_obj)
target_obj = ⌖
- return store->getRados()->set_attrs(rctx,
+ return store->getRados()->set_attrs(dpp, rctx,
bucket->get_info(),
*target_obj,
setattrs ? *setattrs : empty,
y);
}
-int RGWRadosObject::get_obj_attrs(RGWObjectCtx *rctx, optional_yield y, rgw_obj* target_obj)
+int RGWRadosObject::get_obj_attrs(RGWObjectCtx *rctx, optional_yield y, const DoutPrefixProvider *dpp, rgw_obj* target_obj)
{
RGWRados::Object op_target(store->getRados(), bucket->get_info(), *rctx, get_obj());
RGWRados::Object::Read read_op(&op_target);
- return read_attrs(read_op, y, target_obj);
+ return read_attrs(read_op, y, dpp, target_obj);
}
-int RGWRadosObject::modify_obj_attrs(RGWObjectCtx *rctx, const char *attr_name, bufferlist& attr_val, optional_yield y)
+int RGWRadosObject::modify_obj_attrs(RGWObjectCtx *rctx, const char *attr_name, bufferlist& attr_val, optional_yield y, const DoutPrefixProvider *dpp)
{
rgw_obj target = get_obj();
- int r = get_obj_attrs(rctx, y, &target);
+ int r = get_obj_attrs(rctx, y, dpp, &target);
if (r < 0) {
return r;
}
set_atomic(rctx);
attrs[attr_name] = attr_val;
- return set_obj_attrs(rctx, &attrs, nullptr, y, &target);
+ return set_obj_attrs(dpp, rctx, &attrs, nullptr, y, &target);
}
-int RGWRadosObject::delete_obj_attrs(RGWObjectCtx *rctx, const char *attr_name, optional_yield y)
+int RGWRadosObject::delete_obj_attrs(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx, const char *attr_name, optional_yield y)
{
RGWAttrs rmattr;
bufferlist bl;
set_atomic(rctx);
rmattr[attr_name] = bl;
- return set_obj_attrs(rctx, nullptr, &rmattr, y);
+ return set_obj_attrs(dpp, rctx, nullptr, &rmattr, y);
}
int RGWRadosObject::copy_obj_data(RGWObjectCtx& rctx, RGWBucket* dest_bucket,
RGWRados::Object op_target(store->getRados(), dest_bucket->get_info(), rctx, get_obj());
RGWRados::Object::Read read_op(&op_target);
- int ret = read_attrs(read_op, y);
+ int ret = read_attrs(read_op, y, dpp);
if (ret < 0)
return ret;
store->getRados()->obj_to_raw((bucket->get_info()).placement_rule, get_obj(), raw_obj);
}
-int RGWRadosObject::omap_get_vals_by_keys(const std::string& oid,
+int RGWRadosObject::omap_get_vals_by_keys(const DoutPrefixProvider *dpp,
+ const std::string& oid,
const std::set<std::string>& keys,
RGWAttrs *vals)
{
rgw_obj obj = get_obj();
store->getRados()->obj_to_raw(bucket->get_placement_rule(), obj, &head_obj);
- ret = store->get_obj_head_ioctx(bucket->get_info(), obj, &cur_ioctx);
+ ret = store->get_obj_head_ioctx(dpp, bucket->get_info(), obj, &cur_ioctx);
if (ret < 0) {
return ret;
}
return cur_ioctx.omap_get_vals_by_keys(oid, keys, vals);
}
-int RGWRadosObject::omap_set_val_by_key(const std::string& key, bufferlist& val,
+int RGWRadosObject::omap_set_val_by_key(const DoutPrefixProvider *dpp, const std::string& key, bufferlist& val,
bool must_exist, optional_yield y)
{
rgw_raw_obj raw_meta_obj;
auto obj_ctx = store->svc()->sysobj->init_obj_ctx();
auto sysobj = obj_ctx.get_obj(raw_meta_obj);
- return sysobj.omap().set_must_exist(must_exist).set(key, val, y);
+ return sysobj.omap().set_must_exist(must_exist).set(dpp, key, val, y);
}
-MPSerializer* RGWRadosObject::get_serializer(const std::string& lock_name)
+MPSerializer* RGWRadosObject::get_serializer(const DoutPrefixProvider *dpp, const std::string& lock_name)
{
- return new MPRadosSerializer(store, this, lock_name);
+ return new MPRadosSerializer(dpp, store, this, lock_name);
}
int RGWRadosObject::transition(RGWObjectCtx& rctx,
return store->getRados()->transition_obj(rctx, bucket, *this, placement_rule, mtime, olh_epoch, dpp, y);
}
-int RGWRadosObject::get_max_chunk_size(rgw_placement_rule placement_rule, uint64_t *max_chunk_size, uint64_t *alignment)
+int RGWRadosObject::get_max_chunk_size(const DoutPrefixProvider *dpp, rgw_placement_rule placement_rule, uint64_t *max_chunk_size, uint64_t *alignment)
{
- return store->getRados()->get_max_chunk_size(placement_rule, get_obj(), max_chunk_size, alignment);
+ return store->getRados()->get_max_chunk_size(placement_rule, get_obj(), max_chunk_size, dpp, alignment);
}
void RGWRadosObject::get_max_aligned_size(uint64_t size, uint64_t alignment,
parent_op(&op_target)
{ }
-int RGWRadosObject::RadosReadOp::prepare(optional_yield y)
+int RGWRadosObject::RadosReadOp::prepare(optional_yield y, const DoutPrefixProvider *dpp)
{
uint64_t obj_size;
parent_op.params.obj_size = &obj_size;
parent_op.params.attrs = &source->get_attrs();
- int ret = parent_op.prepare(y);
+ int ret = parent_op.prepare(y, dpp);
if (ret < 0)
return ret;
return ret;
}
-int RGWRadosObject::RadosReadOp::read(int64_t ofs, int64_t end, bufferlist& bl, optional_yield y)
+int RGWRadosObject::RadosReadOp::read(int64_t ofs, int64_t end, bufferlist& bl, optional_yield y, const DoutPrefixProvider *dpp)
{
- return parent_op.read(ofs, end, bl, y);
+ return parent_op.read(ofs, end, bl, y, dpp);
}
-int RGWRadosObject::RadosReadOp::get_manifest(RGWObjManifest **pmanifest,
+int RGWRadosObject::RadosReadOp::get_manifest(const DoutPrefixProvider *dpp, RGWObjManifest **pmanifest,
optional_yield y)
{
- return op_target.get_manifest(pmanifest, y);
+ return op_target.get_manifest(dpp, pmanifest, y);
}
-int RGWRadosObject::RadosReadOp::get_attr(const char *name, bufferlist& dest, optional_yield y)
+int RGWRadosObject::RadosReadOp::get_attr(const DoutPrefixProvider *dpp, const char *name, bufferlist& dest, optional_yield y)
{
- return parent_op.get_attr(name, dest, y);
+ return parent_op.get_attr(dpp, name, dest, y);
}
-int RGWRadosObject::delete_object(RGWObjectCtx* obj_ctx, ACLOwner obj_owner, ACLOwner bucket_owner, ceph::real_time unmod_since, bool high_precision_time, uint64_t epoch, string& version_id, optional_yield y)
+int RGWRadosObject::delete_object(const DoutPrefixProvider *dpp,
+ RGWObjectCtx* obj_ctx,
+ ACLOwner obj_owner,
+ ACLOwner bucket_owner,
+ ceph::real_time unmod_since,
+ bool high_precision_time,
+ uint64_t epoch,
+ std::string& version_id,
+ optional_yield y,
+ bool prevent_versioning)
{
int ret = 0;
RGWRados::Object del_target(store->getRados(), bucket->get_info(), *obj_ctx, get_obj());
del_op.params.olh_epoch = epoch;
del_op.params.marker_version_id = version_id;
del_op.params.bucket_owner = bucket_owner.get_id();
- del_op.params.versioning_status = bucket->get_info().versioning_status();
+ del_op.params.versioning_status =
+ prevent_versioning ? 0 : bucket->get_info().versioning_status();
del_op.params.obj_owner = obj_owner;
del_op.params.unmod_since = unmod_since;
del_op.params.high_precision_time = high_precision_time;
- ret = del_op.delete_obj(y);
+ ret = del_op.delete_obj(y, dpp);
if (ret >= 0) {
delete_marker = del_op.result.delete_marker;
version_id = del_op.result.version_id;
y);
}
-int RGWRadosObject::RadosReadOp::iterate(int64_t ofs, int64_t end, RGWGetDataCB *cb, optional_yield y)
+int RGWRadosObject::RadosReadOp::iterate(const DoutPrefixProvider *dpp, int64_t ofs, int64_t end, RGWGetDataCB *cb, optional_yield y)
{
- return parent_op.iterate(ofs, end, cb, y);
+ return parent_op.iterate(dpp, ofs, end, cb, y);
}
std::unique_ptr<RGWObject::WriteOp> RGWRadosObject::get_write_op(RGWObjectCtx* ctx)
return 0;
}
-int RGWRadosObject::RadosWriteOp::write_meta(uint64_t size, uint64_t accounted_size, optional_yield y)
+int RGWRadosObject::RadosWriteOp::write_meta(const DoutPrefixProvider *dpp, uint64_t size, uint64_t accounted_size, optional_yield y)
{
- int ret = parent_op.write_meta(size, accounted_size, *params.attrs, y);
+ int ret = parent_op.write_meta(dpp, size, accounted_size, *params.attrs, y);
params.canceled = parent_op.meta.canceled;
return ret;
y);
}
-int RGWRadosStore::get_bucket(RGWUser* u, const rgw_bucket& b, std::unique_ptr<RGWBucket>* bucket, optional_yield y)
+int RGWRadosStore::get_bucket(const DoutPrefixProvider *dpp, RGWUser* u, const rgw_bucket& b, std::unique_ptr<RGWBucket>* bucket, optional_yield y)
{
int ret;
RGWBucket* bp;
bp = new RGWRadosBucket(this, b, u);
- ret = bp->get_bucket_info(y);
+ ret = bp->get_bucket_info(dpp, y);
if (ret < 0) {
delete bp;
return ret;
return 0;
}
-int RGWRadosStore::get_bucket(RGWUser* u, const std::string& tenant, const std::string&name, std::unique_ptr<RGWBucket>* bucket, optional_yield y)
+int RGWRadosStore::get_bucket(const DoutPrefixProvider *dpp, RGWUser* u, const std::string& tenant, const std::string&name, std::unique_ptr<RGWBucket>* bucket, optional_yield y)
{
rgw_bucket b;
b.tenant = tenant;
b.name = name;
- return get_bucket(u, b, bucket, y);
+ return get_bucket(dpp, u, b, bucket, y);
}
-static int decode_policy(CephContext *cct,
+static int decode_policy(const DoutPrefixProvider *dpp,
+ CephContext *cct,
bufferlist& bl,
RGWAccessControlPolicy *policy)
{
try {
policy->decode(iter);
} catch (buffer::error& err) {
- ldout(cct, 0) << "ERROR: could not decode policy, caught buffer::error" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: could not decode policy, caught buffer::error" << dendl;
return -EIO;
}
if (cct->_conf->subsys.should_gather<ceph_subsys_rgw, 15>()) {
- ldout(cct, 15) << __func__ << " Read AccessControlPolicy";
+ ldpp_dout(dpp, 15) << __func__ << " Read AccessControlPolicy";
RGWAccessControlPolicy_S3 *s3policy = static_cast<RGWAccessControlPolicy_S3 *>(policy);
s3policy->to_xml(*_dout);
*_dout << dendl;
return 0;
}
-static int rgw_op_get_bucket_policy_from_attr(RGWRadosStore *store,
+static int rgw_op_get_bucket_policy_from_attr(const DoutPrefixProvider *dpp, RGWRadosStore *store,
RGWUser& user,
RGWAttrs& bucket_attrs,
RGWAccessControlPolicy *policy,
auto aiter = bucket_attrs.find(RGW_ATTR_ACL);
if (aiter != bucket_attrs.end()) {
- int ret = decode_policy(store->ctx(), aiter->second, policy);
+ int ret = decode_policy(dpp, store->ctx(), aiter->second, policy);
if (ret < 0)
return ret;
} else {
ldout(store->ctx(), 0) << "WARNING: couldn't find acl header for bucket, generating default" << dendl;
/* object exists, but policy is broken */
- int r = user.load_by_id(y);
+ int r = user.load_by_id(dpp, y);
if (r < 0)
return r;
return svc()->zone->is_meta_master();
}
-int RGWRadosStore::forward_request_to_master(RGWUser* user, obj_version *objv,
+int RGWRadosStore::forward_request_to_master(const DoutPrefixProvider *dpp,
+ RGWUser* user, obj_version *objv,
bufferlist& in_data,
JSONParser *jp, req_info& info,
optional_yield y)
ldout(ctx(), 0) << "rest connection is invalid" << dendl;
return -EINVAL;
}
- ldout(ctx(), 0) << "sending request to master zonegroup" << dendl;
+ ldpp_dout(dpp, 0) << "sending request to master zonegroup" << dendl;
bufferlist response;
string uid_str = user->get_id().to_str();
#define MAX_REST_RESPONSE (128 * 1024) // we expect a very small response
- int ret = svc()->zone->get_master_conn()->forward(rgw_user(uid_str), info,
+ int ret = svc()->zone->get_master_conn()->forward(dpp, rgw_user(uid_str), info,
objv, MAX_REST_RESPONSE,
&in_data, &response, y);
if (ret < 0)
return ret;
- ldout(ctx(), 20) << "response: " << response.c_str() << dendl;
+ ldpp_dout(dpp, 20) << "response: " << response.c_str() << dendl;
if (jp && !jp->parse(response.c_str(), response.length())) {
ldout(ctx(), 0) << "failed parsing response from master zonegroup" << dendl;
return -EINVAL;
return 0;
}
-int RGWRadosStore::defer_gc(RGWObjectCtx *rctx, RGWBucket* bucket, RGWObject* obj, optional_yield y)
+int RGWRadosStore::defer_gc(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx, RGWBucket* bucket, RGWObject* obj, optional_yield y)
{
- return rados->defer_gc(rctx, bucket->get_info(), obj->get_obj(), y);
+ return rados->defer_gc(dpp, rctx, bucket->get_info(), obj->get_obj(), y);
}
const RGWZoneGroup& RGWRadosStore::get_zonegroup()
return ret;
}
-int RGWRadosStore::create_bucket(RGWUser& u, const rgw_bucket& b,
+int RGWRadosStore::create_bucket(const DoutPrefixProvider *dpp,
+ RGWUser& u, const rgw_bucket& b,
const string& zonegroup_id,
rgw_placement_rule& placement_rule,
string& swift_ver_location,
obj_version objv, *pobjv = NULL;
/* If it exists, look it up; otherwise create it */
- ret = get_bucket(&u, b, &bucket, y);
+ ret = get_bucket(dpp, &u, b, &bucket, y);
if (ret < 0 && ret != -ENOENT)
return ret;
placement_rule.inherit_from(bucket->get_info().placement_rule);
// don't allow changes to the acl policy
- int r = rgw_op_get_bucket_policy_from_attr(this, u, bucket->get_attrs(),
+ int r = rgw_op_get_bucket_policy_from_attr(dpp, this, u, bucket->get_attrs(),
&old_policy, y);
if (r >= 0 && old_policy != policy) {
bucket_out->swap(bucket);
if (!svc()->zone->is_meta_master()) {
JSONParser jp;
- ret = forward_request_to_master(&u, NULL, in_data, &jp, req_info, y);
+ ret = forward_request_to_master(dpp, &u, NULL, in_data, &jp, req_info, y);
if (ret < 0) {
return ret;
}
JSONDecoder::decode_json("entry_point_object_ver", ep_objv, &jp);
JSONDecoder::decode_json("object_ver", objv, &jp);
JSONDecoder::decode_json("bucket_info", master_info, &jp);
- ldpp_dout(this, 20) << "parsed: objv.tag=" << objv.tag << " objv.ver=" << objv.ver << dendl;
+ ldpp_dout(dpp, 20) << "parsed: objv.tag=" << objv.tag << " objv.ver=" << objv.ver << dendl;
std::time_t ctime = ceph::real_clock::to_time_t(master_info.creation_time);
- ldpp_dout(this, 20) << "got creation time: << " << std::put_time(std::localtime(&ctime), "%F %T") << dendl;
+ ldpp_dout(dpp, 20) << "got creation time: << " << std::put_time(std::localtime(&ctime), "%F %T") << dendl;
pmaster_bucket= &master_info.bucket;
creation_time = master_info.creation_time;
pmaster_num_shards = &master_info.layout.current_index.layout.normal.num_shards;
if (*existed) {
rgw_placement_rule selected_placement_rule;
- ret = svc()->zone->select_bucket_placement(u.get_info(),
+ ret = svc()->zone->select_bucket_placement(dpp, u.get_info(),
zid, placement_rule,
&selected_placement_rule, nullptr, y);
if (selected_placement_rule != info.placement_rule) {
zid, placement_rule, swift_ver_location,
pquota_info, attrs,
info, pobjv, &ep_objv, creation_time,
- pmaster_bucket, pmaster_num_shards, y, exclusive);
+ pmaster_bucket, pmaster_num_shards, y, dpp, exclusive);
if (ret == -EEXIST) {
*existed = true;
ret = 0;
return std::unique_ptr<Lifecycle>(new RadosLifecycle(this));
}
-int RGWRadosStore::delete_raw_obj(const rgw_raw_obj& obj)
+int RGWRadosStore::delete_raw_obj(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj)
{
- return rados->delete_raw_obj(obj);
+ return rados->delete_raw_obj(dpp, obj);
}
void RGWRadosStore::get_raw_obj(const rgw_placement_rule& placement_rule, const rgw_obj& obj, rgw_raw_obj* raw_obj)
rados->obj_to_raw(placement_rule, obj, raw_obj);
}
-int RGWRadosStore::get_raw_chunk_size(const rgw_raw_obj& obj, uint64_t* chunk_size)
+int RGWRadosStore::get_raw_chunk_size(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, uint64_t* chunk_size)
{
- return rados->get_max_chunk_size(obj.pool, chunk_size);
+ return rados->get_max_chunk_size(obj.pool, chunk_size, dpp);
}
-MPRadosSerializer::MPRadosSerializer(RGWRadosStore* store, RGWRadosObject* obj, const std::string& lock_name) :
+MPRadosSerializer::MPRadosSerializer(const DoutPrefixProvider *dpp, RGWRadosStore* store, RGWRadosObject* obj, const std::string& lock_name) :
lock(lock_name)
{
rgw_pool meta_pool;
oid = raw_obj.oid;
store->getRados()->get_obj_data_pool(obj->get_bucket()->get_placement_rule(),
obj->get_obj(), &meta_pool);
- store->getRados()->open_pool_ctx(meta_pool, ioctx, true);
+ store->getRados()->open_pool_ctx(dpp, meta_pool, ioctx, true);
}
-int MPRadosSerializer::try_lock(utime_t dur, optional_yield y)
+int MPRadosSerializer::try_lock(const DoutPrefixProvider *dpp, utime_t dur, optional_yield y)
{
op.assert_exists();
lock.set_duration(dur);
lock.lock_exclusive(&op);
- int ret = rgw_rados_operate(ioctx, oid, &op, y);
+ int ret = rgw_rados_operate(dpp, ioctx, oid, &op, y);
if (! ret) {
locked = true;
}
lock.set_cookie(cookie);
}
-int LCRadosSerializer::try_lock(utime_t dur, optional_yield y)
+int LCRadosSerializer::try_lock(const DoutPrefixProvider *dpp, utime_t dur, optional_yield y)
{
lock.set_duration(dur);
return lock.lock_exclusive(ioctx, oid);
} // namespace rgw::sal
-rgw::sal::RGWRadosStore *RGWStoreManager::init_storage_provider(CephContext *cct, bool use_gc_thread, bool use_lc_thread, bool quota_threads, bool run_sync_thread, bool run_reshard_thread, bool use_cache)
+rgw::sal::RGWRadosStore *RGWStoreManager::init_storage_provider(const DoutPrefixProvider *dpp, CephContext *cct, bool use_gc_thread, bool use_lc_thread, bool quota_threads, bool run_sync_thread, bool run_reshard_thread, bool use_cache)
{
RGWRados *rados = new RGWRados;
rgw::sal::RGWRadosStore *store = new rgw::sal::RGWRadosStore();
.set_run_quota_threads(quota_threads)
.set_run_sync_thread(run_sync_thread)
.set_run_reshard_thread(run_reshard_thread)
- .initialize(cct) < 0) {
+ .initialize(cct, dpp) < 0) {
delete store;
return NULL;
}
return store;
}
-rgw::sal::RGWRadosStore *RGWStoreManager::init_raw_storage_provider(CephContext *cct)
+rgw::sal::RGWRadosStore *RGWStoreManager::init_raw_storage_provider(const DoutPrefixProvider *dpp, CephContext *cct)
{
RGWRados *rados = new RGWRados;
rgw::sal::RGWRadosStore *store = new rgw::sal::RGWRadosStore();
rados->set_context(cct);
- int ret = rados->init_svc(true);
+ int ret = rados->init_svc(true, dpp);
if (ret < 0) {
ldout(cct, 0) << "ERROR: failed to init services (ret=" << cpp_strerror(-ret) << ")" << dendl;
delete store;
return store;
}
-int rgw::sal::RGWRadosStore::get_obj_head_ioctx(const RGWBucketInfo& bucket_info, const rgw_obj& obj, librados::IoCtx *ioctx)
+int rgw::sal::RGWRadosStore::get_obj_head_ioctx(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw_obj& obj, librados::IoCtx *ioctx)
{
- return rados->get_obj_head_ioctx(bucket_info, obj, ioctx);
+ return rados->get_obj_head_ioctx(dpp, bucket_info, obj, ioctx);
}
void RGWStoreManager::close_storage(rgw::sal::RGWRadosStore *store)
RGWRadosUser(RGWRadosStore *_st) : store(_st) { }
RGWRadosUser() {}
- int list_buckets(const std::string& marker, const std::string& end_marker,
+ int list_buckets(const DoutPrefixProvider *dpp, const std::string& marker, const std::string& end_marker,
uint64_t max, bool need_stats, RGWBucketList& buckets,
optional_yield y) override;
RGWBucket* create_bucket(rgw_bucket& bucket, ceph::real_time creation_time);
/* Placeholders */
- virtual int load_by_id(optional_yield y);
+ virtual int load_by_id(const DoutPrefixProvider *dpp, optional_yield y);
friend class RGWRadosBucket;
};
public:
RadosReadOp(RGWRadosObject *_source, RGWObjectCtx *_rctx);
- virtual int prepare(optional_yield y) override;
- virtual int read(int64_t ofs, int64_t end, bufferlist& bl, optional_yield y) override;
- virtual int iterate(int64_t ofs, int64_t end, RGWGetDataCB *cb, optional_yield y) override;
- virtual int get_manifest(RGWObjManifest **pmanifest, optional_yield y) override;
- virtual int get_attr(const char *name, bufferlist& dest, optional_yield y) override;
+ virtual int prepare(optional_yield y, const DoutPrefixProvider *dpp) override;
+ virtual int read(int64_t ofs, int64_t end, bufferlist& bl, optional_yield y, const DoutPrefixProvider *dpp) override;
+ virtual int iterate(const DoutPrefixProvider *dpp, int64_t ofs, int64_t end, RGWGetDataCB *cb, optional_yield y) override;
+ virtual int get_manifest(const DoutPrefixProvider *dpp, RGWObjManifest **pmanifest, optional_yield y) override;
+ virtual int get_attr(const DoutPrefixProvider *dpp, const char *name, bufferlist& dest, optional_yield y) override;
};
struct RadosWriteOp : public WriteOp {
RadosWriteOp(RGWRadosObject* _source, RGWObjectCtx* _rctx);
virtual int prepare(optional_yield y) override;
- virtual int write_meta(uint64_t size, uint64_t accounted_size, optional_yield y) override;
+ virtual int write_meta(const DoutPrefixProvider *dpp, uint64_t size, uint64_t accounted_size, optional_yield y) override;
//virtual int write_data(const char *data, uint64_t ofs, uint64_t len, bool exclusive) override;
};
int read(off_t offset, off_t length, std::iostream& stream) { return length; }
int write(off_t offset, off_t length, std::iostream& stream) { return length; }
- virtual int delete_object(RGWObjectCtx* obj_ctx, ACLOwner obj_owner,
+ virtual int delete_object(const DoutPrefixProvider *dpp, RGWObjectCtx* obj_ctx, ACLOwner obj_owner,
ACLOwner bucket_owner, ceph::real_time unmod_since,
bool high_precision_time, uint64_t epoch,
- std::string& version_id,optional_yield y) override;
+ std::string& version_id,
+ optional_yield y,
+ bool prevent_versioning) override;
virtual int copy_object(RGWObjectCtx& obj_ctx, RGWUser* user,
req_info *info, const rgw_zone_id& source_zone,
rgw::sal::RGWObject* dest_object, rgw::sal::RGWBucket* dest_bucket,
virtual void set_atomic(RGWObjectCtx *rctx) const;
virtual void set_prefetch_data(RGWObjectCtx *rctx);
- virtual int get_obj_state(RGWObjectCtx *rctx, RGWBucket& bucket, RGWObjState **state, optional_yield y, bool follow_olh = true) override;
- virtual int set_obj_attrs(RGWObjectCtx* rctx, RGWAttrs* setattrs, RGWAttrs* delattrs, optional_yield y, rgw_obj* target_obj = NULL) override;
- virtual int get_obj_attrs(RGWObjectCtx *rctx, optional_yield y, rgw_obj* target_obj = NULL) override;
- virtual int modify_obj_attrs(RGWObjectCtx *rctx, const char *attr_name, bufferlist& attr_val, optional_yield y) override;
- virtual int delete_obj_attrs(RGWObjectCtx *rctx, const char *attr_name, optional_yield y) override;
+ virtual int get_obj_state(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx, RGWBucket& bucket, RGWObjState **state, optional_yield y, bool follow_olh = true) override;
+ virtual int set_obj_attrs(const DoutPrefixProvider *dpp, RGWObjectCtx* rctx, RGWAttrs* setattrs, RGWAttrs* delattrs, optional_yield y, rgw_obj* target_obj = NULL) override;
+ virtual int get_obj_attrs(RGWObjectCtx *rctx, optional_yield y, const DoutPrefixProvider *dpp, rgw_obj* target_obj = NULL) override;
+ virtual int modify_obj_attrs(RGWObjectCtx *rctx, const char *attr_name, bufferlist& attr_val, optional_yield y, const DoutPrefixProvider *dpp) override;
+ virtual int delete_obj_attrs(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx, const char *attr_name, optional_yield y) override;
virtual int copy_obj_data(RGWObjectCtx& rctx, RGWBucket* dest_bucket, RGWObject* dest_obj, uint16_t olh_epoch, std::string* petag, const DoutPrefixProvider *dpp, optional_yield y) override;
virtual bool is_expired() override;
virtual void gen_rand_obj_instance_name() override;
virtual std::unique_ptr<RGWObject> clone() {
return std::unique_ptr<RGWObject>(new RGWRadosObject(*this));
}
- virtual MPSerializer* get_serializer(const std::string& lock_name) override;
+ virtual MPSerializer* get_serializer(const DoutPrefixProvider *dpp, const std::string& lock_name) override;
virtual int transition(RGWObjectCtx& rctx,
RGWBucket* bucket,
const rgw_placement_rule& placement_rule,
uint64_t olh_epoch,
const DoutPrefixProvider *dpp,
optional_yield y) override;
- virtual int get_max_chunk_size(rgw_placement_rule placement_rule,
+ virtual int get_max_chunk_size(const DoutPrefixProvider *dpp,
+ rgw_placement_rule placement_rule,
uint64_t *max_chunk_size,
uint64_t *alignment = nullptr) override;
virtual void get_max_aligned_size(uint64_t size, uint64_t alignment, uint64_t *max_size) override;
virtual std::unique_ptr<WriteOp> get_write_op(RGWObjectCtx *) override;
/* OMAP */
- virtual int omap_get_vals_by_keys(const std::string& oid,
+ virtual int omap_get_vals_by_keys(const DoutPrefixProvider *dpp, const std::string& oid,
const std::set<std::string>& keys,
RGWAttrs *vals) override;
- virtual int omap_set_val_by_key(const std::string& key, bufferlist& val,
+ virtual int omap_set_val_by_key(const DoutPrefixProvider *dpp, const std::string& key, bufferlist& val,
bool must_exist, optional_yield y) override;
private:
- int read_attrs(RGWRados::Object::Read &read_op, optional_yield y, rgw_obj *target_obj = nullptr);
+ int read_attrs(RGWRados::Object::Read &read_op, optional_yield y, const DoutPrefixProvider *dpp, rgw_obj *target_obj = nullptr);
};
class RGWRadosBucket : public RGWBucket {
~RGWRadosBucket() { }
- virtual int load_by_name(const std::string& tenant, const std::string& bucket_name, const std::string bucket_instance_id, RGWSysObjectCtx *rctx, optional_yield y) override;
+ virtual int load_by_name(const DoutPrefixProvider *dpp, const std::string& tenant, const std::string& bucket_name, const std::string bucket_instance_id, RGWSysObjectCtx *rctx, optional_yield y) override;
virtual std::unique_ptr<RGWObject> get_object(const rgw_obj_key& k) override;
RGWBucketList* list(void) { return new RGWBucketList(); }
- virtual int list(ListParams&, int, ListResults&, optional_yield y) override;
+ virtual int list(const DoutPrefixProvider *dpp, ListParams&, int, ListResults&, optional_yield y) override;
RGWObject* create_object(const rgw_obj_key& key /* Attributes */) override;
- virtual int remove_bucket(bool delete_children, std::string prefix, std::string delimiter, bool forward_to_master, req_info* req_info, optional_yield y) override;
+ virtual int remove_bucket(const DoutPrefixProvider *dpp, bool delete_children, std::string prefix, std::string delimiter, bool forward_to_master, req_info* req_info, optional_yield y) override;
RGWAccessControlPolicy& get_acl(void) { return acls; }
- virtual int set_acl(RGWAccessControlPolicy& acl, optional_yield y) override;
- virtual int get_bucket_info(optional_yield y) override;
- virtual int get_bucket_stats(RGWBucketInfo& bucket_info, int shard_id,
+ virtual int set_acl(const DoutPrefixProvider *dpp, RGWAccessControlPolicy& acl, optional_yield y) override;
+ virtual int get_bucket_info(const DoutPrefixProvider *dpp, optional_yield y) override;
+ virtual int get_bucket_stats(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info, int shard_id,
std::string *bucket_ver, std::string *master_ver,
std::map<RGWObjCategory, RGWStorageStats>& stats,
std::string *max_marker = nullptr,
bool *syncstopped = nullptr) override;
- virtual int read_bucket_stats(optional_yield y) override;
- virtual int sync_user_stats(optional_yield y) override;
- virtual int update_container_stats(void) override;
- virtual int check_bucket_shards(void) override;
- virtual int link(RGWUser* new_user, optional_yield y) override;
+ virtual int read_bucket_stats(const DoutPrefixProvider *dpp, optional_yield y) override;
+ virtual int sync_user_stats(const DoutPrefixProvider *dpp, optional_yield y) override;
+ virtual int update_container_stats(const DoutPrefixProvider *dpp) override;
+ virtual int check_bucket_shards(const DoutPrefixProvider *dpp) override;
+ virtual int link(const DoutPrefixProvider *dpp, RGWUser* new_user, optional_yield y) override;
virtual int unlink(RGWUser* new_user, optional_yield y) override;
- virtual int chown(RGWUser* new_user, RGWUser* old_user, optional_yield y) override;
- virtual int put_instance_info(bool exclusive, ceph::real_time mtime) override;
+ virtual int chown(RGWUser* new_user, RGWUser* old_user, optional_yield y, const DoutPrefixProvider *dpp) override;
+ virtual int put_instance_info(const DoutPrefixProvider *dpp, bool exclusive, ceph::real_time mtime) override;
virtual bool is_owner(RGWUser* user) override;
- virtual int check_empty(optional_yield y) override;
+ virtual int check_empty(const DoutPrefixProvider *dpp, optional_yield y) override;
virtual int check_quota(RGWQuotaInfo& user_quota, RGWQuotaInfo& bucket_quota, uint64_t obj_size, optional_yield y, bool check_size_only = false) override;
- virtual int set_instance_attrs(RGWAttrs& attrs, optional_yield y) override;
- virtual int try_refresh_info(ceph::real_time *pmtime) override;
- virtual int read_usage(uint64_t start_epoch, uint64_t end_epoch, uint32_t max_entries,
+ virtual int set_instance_attrs(const DoutPrefixProvider *dpp, RGWAttrs& attrs, optional_yield y) override;
+ virtual int try_refresh_info(const DoutPrefixProvider *dpp, ceph::real_time *pmtime) override;
+ virtual int read_usage(const DoutPrefixProvider *dpp, uint64_t start_epoch, uint64_t end_epoch, uint32_t max_entries,
bool *is_truncated, RGWUsageIter& usage_iter,
map<rgw_user_bucket, rgw_usage_log_entry>& usage) override;
virtual std::unique_ptr<RGWBucket> clone() {
virtual std::unique_ptr<RGWUser> get_user(const rgw_user& u);
virtual std::unique_ptr<RGWObject> get_object(const rgw_obj_key& k) override;
- virtual int get_bucket(RGWUser* u, const rgw_bucket& b, std::unique_ptr<RGWBucket>* bucket, optional_yield y) override;
+ virtual int get_bucket(const DoutPrefixProvider *dpp, RGWUser* u, const rgw_bucket& b, std::unique_ptr<RGWBucket>* bucket, optional_yield y) override;
virtual int get_bucket(RGWUser* u, const RGWBucketInfo& i, std::unique_ptr<RGWBucket>* bucket) override;
- virtual int get_bucket(RGWUser* u, const std::string& tenant, const std::string&name, std::unique_ptr<RGWBucket>* bucket, optional_yield y) override;
- virtual int create_bucket(RGWUser& u, const rgw_bucket& b,
+ virtual int get_bucket(const DoutPrefixProvider *dpp, RGWUser* u, const std::string& tenant, const std::string&name, std::unique_ptr<RGWBucket>* bucket, optional_yield y) override;
+ virtual int create_bucket(const DoutPrefixProvider *dpp,
+ RGWUser& u, const rgw_bucket& b,
const std::string& zonegroup_id,
rgw_placement_rule& placement_rule,
std::string& swift_ver_location,
optional_yield y);
virtual RGWBucketList* list_buckets(void) { return new RGWBucketList(); }
virtual bool is_meta_master() override;
- virtual int forward_request_to_master(RGWUser* user, obj_version *objv,
+ virtual int forward_request_to_master(const DoutPrefixProvider *dpp, RGWUser* user, obj_version *objv,
bufferlist& in_data, JSONParser *jp, req_info& info,
optional_yield y) override;
- virtual int defer_gc(RGWObjectCtx *rctx, RGWBucket* bucket, RGWObject* obj,
+ virtual int defer_gc(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx, RGWBucket* bucket, RGWObject* obj,
optional_yield y) override;
virtual const RGWZoneGroup& get_zonegroup() override;
virtual int get_zonegroup(const string& id, RGWZoneGroup& zonegroup) override;
virtual int cluster_stat(RGWClusterStat& stats) override;
virtual std::unique_ptr<Lifecycle> get_lifecycle(void) override;
virtual RGWLC* get_rgwlc(void) { return rados->get_lc(); }
- virtual int delete_raw_obj(const rgw_raw_obj& obj) override;
+ virtual int delete_raw_obj(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj) override;
virtual void get_raw_obj(const rgw_placement_rule& placement_rule, const rgw_obj& obj, rgw_raw_obj* raw_obj) override;
- virtual int get_raw_chunk_size(const rgw_raw_obj& obj, uint64_t* chunk_size) override;
+ virtual int get_raw_chunk_size(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, uint64_t* chunk_size) override;
void setRados(RGWRados * st) { rados = st; }
RGWRados *getRados(void) { return rados; }
virtual CephContext *ctx(void) { return rados->ctx(); }
- int get_obj_head_ioctx(const RGWBucketInfo& bucket_info, const rgw_obj& obj,
+ int get_obj_head_ioctx(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw_obj& obj,
librados::IoCtx *ioctx);
- // implements DoutPrefixProvider
- std::ostream& gen_prefix(std::ostream& out) const { return out << "RGWRadosStore "; }
- CephContext* get_cct() const override { return rados->ctx(); }
- unsigned get_subsys() const override { return ceph_subsys_rgw; }
-
const std::string& get_luarocks_path() const override {
return luarocks_path;
}
librados::ObjectWriteOperation op;
public:
- MPRadosSerializer(RGWRadosStore* store, RGWRadosObject* obj, const std::string& lock_name);
+ MPRadosSerializer(const DoutPrefixProvider *dpp, RGWRadosStore* store, RGWRadosObject* obj, const std::string& lock_name);
- virtual int try_lock(utime_t dur, optional_yield y) override;
+ virtual int try_lock(const DoutPrefixProvider *dpp, utime_t dur, optional_yield y) override;
int unlock() {
return lock.unlock(&ioctx, oid);
}
public:
LCRadosSerializer(RGWRadosStore* store, const std::string& oid, const std::string& lock_name, const std::string& cookie);
- virtual int try_lock(utime_t dur, optional_yield y) override;
+ virtual int try_lock(const DoutPrefixProvider *dpp, utime_t dur, optional_yield y) override;
int unlock() {
return lock.unlock(ioctx, oid);
}
class RGWStoreManager {
public:
RGWStoreManager() {}
- static rgw::sal::RGWRadosStore *get_storage(CephContext *cct, bool use_gc_thread, bool use_lc_thread, bool quota_threads,
+ static rgw::sal::RGWRadosStore *get_storage(const DoutPrefixProvider *dpp, CephContext *cct, bool use_gc_thread, bool use_lc_thread, bool quota_threads,
bool run_sync_thread, bool run_reshard_thread, bool use_cache = true) {
- rgw::sal::RGWRadosStore *store = init_storage_provider(cct, use_gc_thread, use_lc_thread,
+ rgw::sal::RGWRadosStore *store = init_storage_provider(dpp, cct, use_gc_thread, use_lc_thread,
quota_threads, run_sync_thread, run_reshard_thread, use_cache);
return store;
}
- static rgw::sal::RGWRadosStore *get_raw_storage(CephContext *cct) {
- rgw::sal::RGWRadosStore *rados = init_raw_storage_provider(cct);
+ static rgw::sal::RGWRadosStore *get_raw_storage(const DoutPrefixProvider *dpp, CephContext *cct) {
+ rgw::sal::RGWRadosStore *rados = init_raw_storage_provider(dpp, cct);
return rados;
}
- static rgw::sal::RGWRadosStore *init_storage_provider(CephContext *cct, bool use_gc_thread, bool use_lc_thread, bool quota_threads, bool run_sync_thread, bool run_reshard_thread, bool use_metadata_cache);
- static rgw::sal::RGWRadosStore *init_raw_storage_provider(CephContext *cct);
+ static rgw::sal::RGWRadosStore *init_storage_provider(const DoutPrefixProvider *dpp, CephContext *cct, bool use_gc_thread, bool use_lc_thread, bool quota_threads, bool run_sync_thread, bool run_reshard_thread, bool use_metadata_cache);
+ static rgw::sal::RGWRadosStore *init_raw_storage_provider(const DoutPrefixProvider *dpp, CephContext *cct);
static void close_storage(rgw::sal::RGWRadosStore *store);
};
bool have_cache,
bool raw,
bool run_sync,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
finisher = std::make_unique<RGWSI_Finisher>(cct);
bucket_sobj = std::make_unique<RGWSI_Bucket_SObj>(cct);
user_rados = std::make_unique<RGWSI_User_RADOS>(cct);
if (have_cache) {
- sysobj_cache = std::make_unique<RGWSI_SysObj_Cache>(cct);
+ sysobj_cache = std::make_unique<RGWSI_SysObj_Cache>(dpp, cct);
}
vector<RGWSI_MetaBackend *> meta_bes{meta_be_sobj.get(), meta_be_otp.get()};
can_shutdown = true;
- int r = finisher->start(y);
+ int r = finisher->start(y, dpp);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to start finisher service (" << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to start finisher service (" << cpp_strerror(-r) << dendl;
return r;
}
if (!raw) {
- r = notify->start(y);
+ r = notify->start(y, dpp);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to start notify service (" << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to start notify service (" << cpp_strerror(-r) << dendl;
return r;
}
}
- r = rados->start(y);
+ r = rados->start(y, dpp);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to start rados service (" << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to start rados service (" << cpp_strerror(-r) << dendl;
return r;
}
if (!raw) {
- r = zone->start(y);
+ r = zone->start(y, dpp);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to start zone service (" << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to start zone service (" << cpp_strerror(-r) << dendl;
return r;
}
- r = datalog_rados->start(&zone->get_zone(),
+ r = datalog_rados->start(dpp, &zone->get_zone(),
zone->get_zone_params(),
rados->get_rados_handle());
if (r < 0) {
return r;
}
- r = mdlog->start(y);
+ r = mdlog->start(y, dpp);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to start mdlog service (" << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to start mdlog service (" << cpp_strerror(-r) << dendl;
return r;
}
- r = sync_modules->start(y);
+ r = sync_modules->start(y, dpp);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to start sync modules service (" << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to start sync modules service (" << cpp_strerror(-r) << dendl;
return r;
}
}
- r = cls->start(y);
+ r = cls->start(y, dpp);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to start cls service (" << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to start cls service (" << cpp_strerror(-r) << dendl;
return r;
}
- r = config_key_rados->start(y);
+ r = config_key_rados->start(y, dpp);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to start config_key service (" << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to start config_key service (" << cpp_strerror(-r) << dendl;
return r;
}
- r = zone_utils->start(y);
+ r = zone_utils->start(y, dpp);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to start zone_utils service (" << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to start zone_utils service (" << cpp_strerror(-r) << dendl;
return r;
}
- r = quota->start(y);
+ r = quota->start(y, dpp);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to start quota service (" << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to start quota service (" << cpp_strerror(-r) << dendl;
return r;
}
- r = sysobj_core->start(y);
+ r = sysobj_core->start(y, dpp);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to start sysobj_core service (" << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to start sysobj_core service (" << cpp_strerror(-r) << dendl;
return r;
}
if (have_cache) {
- r = sysobj_cache->start(y);
+ r = sysobj_cache->start(y, dpp);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to start sysobj_cache service (" << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to start sysobj_cache service (" << cpp_strerror(-r) << dendl;
return r;
}
}
- r = sysobj->start(y);
+ r = sysobj->start(y, dpp);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to start sysobj service (" << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to start sysobj service (" << cpp_strerror(-r) << dendl;
return r;
}
if (!raw) {
- r = meta_be_sobj->start(y);
+ r = meta_be_sobj->start(y, dpp);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to start meta_be_sobj service (" << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to start meta_be_sobj service (" << cpp_strerror(-r) << dendl;
return r;
}
- r = meta->start(y);
+ r = meta->start(y, dpp);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to start meta service (" << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to start meta service (" << cpp_strerror(-r) << dendl;
return r;
}
- r = bucket_sobj->start(y);
+ r = bucket_sobj->start(y, dpp);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to start bucket service (" << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to start bucket service (" << cpp_strerror(-r) << dendl;
return r;
}
- r = bucket_sync_sobj->start(y);
+ r = bucket_sync_sobj->start(y, dpp);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to start bucket_sync service (" << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to start bucket_sync service (" << cpp_strerror(-r) << dendl;
return r;
}
- r = user_rados->start(y);
+ r = user_rados->start(y, dpp);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to start user_rados service (" << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to start user_rados service (" << cpp_strerror(-r) << dendl;
return r;
}
- r = otp->start(y);
+ r = otp->start(y, dpp);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to start otp service (" << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to start otp service (" << cpp_strerror(-r) << dendl;
return r;
}
}
}
-int RGWServices::do_init(CephContext *_cct, bool have_cache, bool raw, bool run_sync, optional_yield y)
+int RGWServices::do_init(CephContext *_cct, bool have_cache, bool raw, bool run_sync, optional_yield y, const DoutPrefixProvider *dpp)
{
cct = _cct;
- int r = _svc.init(cct, have_cache, raw, run_sync, y);
+ int r = _svc.init(cct, have_cache, raw, run_sync, y, dpp);
if (r < 0) {
return r;
}
return 0;
}
-int RGWServiceInstance::start(optional_yield y)
+int RGWServiceInstance::start(optional_yield y, const DoutPrefixProvider *dpp)
{
if (start_state != StateInit) {
return 0;
start_state = StateStarting;; /* setting started prior to do_start() on purpose so that circular
references can call start() on each other */
- int r = do_start(y);
+ int r = do_start(y, dpp);
if (r < 0) {
return r;
}
RGWCtlDef::_meta::~_meta() {}
-int RGWCtlDef::init(RGWServices& svc)
+int RGWCtlDef::init(RGWServices& svc, const DoutPrefixProvider *dpp)
{
meta.mgr.reset(new RGWMetadataManager(svc.meta));
bucket->init(user.get(),
(RGWBucketMetadataHandler *)bucket_meta_handler,
(RGWBucketInstanceMetadataHandler *)bi_meta_handler,
- svc.datalog_rados);
+ svc.datalog_rados,
+ dpp);
otp->init((RGWOTPMetadataHandler *)meta.otp.get());
return 0;
}
-int RGWCtl::init(RGWServices *_svc)
+int RGWCtl::init(RGWServices *_svc, const DoutPrefixProvider *dpp)
{
svc = _svc;
cct = svc->cct;
- int r = _ctl.init(*svc);
+ int r = _ctl.init(*svc, dpp);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to start init ctls (" << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to start init ctls (" << cpp_strerror(-r) << dendl;
return r;
}
} start_state{StateInit};
virtual void shutdown() {}
- virtual int do_start(optional_yield) {
+ virtual int do_start(optional_yield, const DoutPrefixProvider *dpp) {
return 0;
}
public:
RGWServiceInstance(CephContext *_cct) : cct(_cct) {}
virtual ~RGWServiceInstance() {}
- int start(optional_yield y);
+ int start(optional_yield y, const DoutPrefixProvider *dpp);
bool is_started() {
return (start_state == StateStarted);
}
RGWServices_Def();
~RGWServices_Def();
- int init(CephContext *cct, bool have_cache, bool raw_storage, bool run_sync, optional_yield y);
+ int init(CephContext *cct, bool have_cache, bool raw_storage, bool run_sync, optional_yield y, const DoutPrefixProvider *dpp);
void shutdown();
};
RGWSI_SysObj_Core *core{nullptr};
RGWSI_User *user{nullptr};
- int do_init(CephContext *cct, bool have_cache, bool raw_storage, bool run_sync, optional_yield y);
+ int do_init(CephContext *cct, bool have_cache, bool raw_storage, bool run_sync, optional_yield y, const DoutPrefixProvider *dpp);
- int init(CephContext *cct, bool have_cache, bool run_sync, optional_yield y) {
- return do_init(cct, have_cache, false, run_sync, y);
+ int init(CephContext *cct, bool have_cache, bool run_sync, optional_yield y, const DoutPrefixProvider *dpp) {
+ return do_init(cct, have_cache, false, run_sync, y, dpp);
}
- int init_raw(CephContext *cct, bool have_cache, optional_yield y) {
- return do_init(cct, have_cache, true, false, y);
+ int init_raw(CephContext *cct, bool have_cache, optional_yield y, const DoutPrefixProvider *dpp) {
+ return do_init(cct, have_cache, true, false, y, dpp);
}
void shutdown() {
_svc.shutdown();
RGWCtlDef();
~RGWCtlDef();
- int init(RGWServices& svc);
+ int init(RGWServices& svc, const DoutPrefixProvider *dpp);
};
struct RGWCtl {
RGWBucketCtl *bucket{nullptr};
RGWOTPCtl *otp{nullptr};
- int init(RGWServices *_svc);
+ int init(RGWServices *_svc, const DoutPrefixProvider *dpp);
};
#endif
return AssumeRoleRequestBase::validate_input();
}
-std::tuple<int, RGWRole> STSService::getRoleInfo(const string& arn,
+std::tuple<int, RGWRole> STSService::getRoleInfo(const DoutPrefixProvider *dpp,
+ const string& arn,
optional_yield y)
{
if (auto r_arn = rgw::ARN::parse(arn); r_arn) {
auto pos = r_arn->resource.find_last_of('/');
string roleName = r_arn->resource.substr(pos + 1);
RGWRole role(cct, store->getRados()->pctl, roleName, r_arn->account);
- if (int ret = role.get(y); ret < 0) {
+ if (int ret = role.get(dpp, y); ret < 0) {
if (ret == -ENOENT) {
- ldout(cct, 0) << "Role doesn't exist: " << roleName << dendl;
+ ldpp_dout(dpp, 0) << "Role doesn't exist: " << roleName << dendl;
ret = -ERR_NO_ROLE_FOUND;
}
return make_tuple(ret, this->role);
}
string r_path = role.get_path();
if (path != r_path) {
- ldout(cct, 0) << "Invalid Role ARN: Path in ARN does not match with the role path: " << path << " " << r_path << dendl;
+ ldpp_dout(dpp, 0) << "Invalid Role ARN: Path in ARN does not match with the role path: " << path << " " << r_path << dendl;
return make_tuple(-EACCES, this->role);
}
this->role = std::move(role);
return make_tuple(0, this->role);
}
} else {
- ldout(cct, 0) << "Invalid role arn: " << arn << dendl;
+ ldpp_dout(dpp, 0) << "Invalid role arn: " << arn << dendl;
return make_tuple(-EINVAL, this->role);
}
}
-int STSService::storeARN(string& arn, optional_yield y)
+int STSService::storeARN(const DoutPrefixProvider *dpp, string& arn, optional_yield y)
{
int ret = 0;
RGWUserInfo info;
- if (ret = rgw_get_user_info_by_uid(store->ctl()->user, user_id, info, y); ret < 0) {
+ if (ret = rgw_get_user_info_by_uid(dpp, store->ctl()->user, user_id, info, y); ret < 0) {
return -ERR_NO_SUCH_ENTITY;
}
info.assumed_role_arn = arn;
RGWObjVersionTracker objv_tracker;
- if (ret = rgw_store_user_info(store->ctl()->user, info, &info, &objv_tracker, real_time(),
+ if (ret = rgw_store_user_info(dpp, store->ctl()->user, info, &info, &objv_tracker, real_time(),
false, y); ret < 0) {
return -ERR_INTERNAL_ERROR;
}
return response;
}
-AssumeRoleResponse STSService::assumeRole(AssumeRoleRequest& req,
+AssumeRoleResponse STSService::assumeRole(const DoutPrefixProvider *dpp,
+ AssumeRoleRequest& req,
optional_yield y)
{
AssumeRoleResponse response;
//Get the role info which is being assumed
boost::optional<rgw::ARN> r_arn = rgw::ARN::parse(req.getRoleARN());
if (r_arn == boost::none) {
- ldout(cct, 0) << "Error in parsing role arn: " << req.getRoleARN() << dendl;
+ ldpp_dout(dpp, 0) << "Error in parsing role arn: " << req.getRoleARN() << dendl;
response.retCode = -EINVAL;
return response;
}
//Save ARN with the user
string arn = response.user.getARN();
- response.retCode = storeARN(arn, y);
+ response.retCode = storeARN(dpp, arn, y);
if (response.retCode < 0) {
return response;
}
rgw_user user_id;
RGWRole role;
rgw::auth::Identity* identity;
- int storeARN(string& arn, optional_yield y);
+ int storeARN(const DoutPrefixProvider *dpp, string& arn, optional_yield y);
public:
STSService() = default;
STSService(CephContext* cct, rgw::sal::RGWRadosStore *store, rgw_user user_id,
rgw::auth::Identity* identity)
: cct(cct), store(store), user_id(user_id), identity(identity) {}
- std::tuple<int, RGWRole> getRoleInfo(const string& arn, optional_yield y);
- AssumeRoleResponse assumeRole(AssumeRoleRequest& req, optional_yield y);
+ std::tuple<int, RGWRole> getRoleInfo(const DoutPrefixProvider *dpp, const string& arn, optional_yield y);
+ AssumeRoleResponse assumeRole(const DoutPrefixProvider *dpp, AssumeRoleRequest& req, optional_yield y);
GetSessionTokenResponse getSessionToken(GetSessionTokenRequest& req);
AssumeRoleWithWebIdentityResponse assumeRoleWithWebIdentity(AssumeRoleWithWebIdentityRequest& req);
};
if (uid.tenant.empty()) {
const rgw_user tenanted_uid(uid.id, uid.id);
- if (ctl->user->get_info_by_uid(tenanted_uid, &uinfo, s->yield) >= 0) {
+ if (ctl->user->get_info_by_uid(dpp, tenanted_uid, &uinfo, s->yield) >= 0) {
/* Succeeded. */
bucket_tenant = uinfo.user_id.tenant;
found = true;
}
}
- if (!found && ctl->user->get_info_by_uid(uid, &uinfo, s->yield) < 0) {
+ if (!found && ctl->user->get_info_by_uid(dpp, uid, &uinfo, s->yield) < 0) {
throw -EPERM;
} else {
bucket_tenant = uinfo.user_id.tenant;
/* Need to get user info of bucket owner. */
RGWBucketInfo bucket_info;
RGWSI_MetaBackend_CtxParams bectx_params = RGWSI_MetaBackend_CtxParams_SObj(s->sysobj_ctx);
- int ret = ctl->bucket->read_bucket_info(b, &bucket_info, y, RGWBucketCtl::BucketInstance::GetParams().set_bectx_params(bectx_params));
+ int ret = ctl->bucket->read_bucket_info(b, &bucket_info, y, dpp, RGWBucketCtl::BucketInstance::GetParams().set_bectx_params(bectx_params));
if (ret < 0) {
throw ret;
}
ldpp_dout(dpp, 20) << "temp url user (bucket owner): " << bucket_info.owner
<< dendl;
- if (ctl->user->get_info_by_uid(bucket_info.owner, &owner_info, s->yield) < 0) {
+ if (ctl->user->get_info_by_uid(dpp, bucket_info.owner, &owner_info, s->yield) < 0) {
throw -EPERM;
}
}
ldpp_dout(dpp, 10) << "swift user=" << swift_user << dendl;
RGWUserInfo tmp_uinfo;
- ret = ctl->user->get_info_by_swift(swift_user, &tmp_uinfo, s->yield);
+ ret = ctl->user->get_info_by_swift(dpp, swift_user, &tmp_uinfo, s->yield);
if (ret < 0) {
ldpp_dout(dpp, 0) << "NOTICE: couldn't map swift user" << dendl;
throw ret;
}
RGWUserInfo user_info;
- ret = ctl->user->get_info_by_swift(swift_user, &user_info, s->yield);
+ ret = ctl->user->get_info_by_swift(dpp, swift_user, &user_info, s->yield);
if (ret < 0) {
throw ret;
}
user_str = user;
- if ((ret = store->ctl()->user->get_info_by_swift(user_str, &info, s->yield)) < 0)
+ if ((ret = store->ctl()->user->get_info_by_swift(s, user_str, &info, s->yield)) < 0)
{
ret = -EACCES;
goto done;
return string(buf);
}
-RGWCoroutine *RGWSyncErrorLogger::log_error_cr(const string& source_zone, const string& section, const string& name, uint32_t error_code, const string& message) {
+RGWCoroutine *RGWSyncErrorLogger::log_error_cr(const DoutPrefixProvider *dpp, const string& source_zone, const string& section, const string& name, uint32_t error_code, const string& message) {
cls_log_entry entry;
rgw_sync_error_info info(source_zone, error_code, message);
uint32_t shard_id = ++counter % num_shards;
- return new RGWRadosTimelogAddCR(store, oids[shard_id], entry);
+ return new RGWRadosTimelogAddCR(dpp, store, oids[shard_id], entry);
}
void RGWSyncBackoff::update_wait_time()
op->wait(utime_t(cur_wait, 0));
}
-int RGWBackoffControlCR::operate() {
+int RGWBackoffControlCR::operate(const DoutPrefixProvider *dpp) {
reenter(this) {
// retry the operation until it succeeds
while (true) {
JSONDecoder::decode_json("entries", entries, obj);
};
-int RGWShardCollectCR::operate() {
+int RGWShardCollectCR::operate(const DoutPrefixProvider *dpp) {
reenter(this) {
while (spawn_next()) {
current_running++;
delete error_logger;
}
-int RGWRemoteMetaLog::read_log_info(rgw_mdlog_info *log_info)
+int RGWRemoteMetaLog::read_log_info(const DoutPrefixProvider *dpp, rgw_mdlog_info *log_info)
{
rgw_http_param_pair pairs[] = { { "type", "metadata" },
{ NULL, NULL } };
- int ret = conn->get_json_resource("/admin/log", pairs, null_yield, *log_info);
+ int ret = conn->get_json_resource(dpp, "/admin/log", pairs, null_yield, *log_info);
if (ret < 0) {
ldpp_dout(dpp, 0) << "ERROR: failed to fetch mdlog info" << dendl;
return ret;
return 0;
}
-int RGWRemoteMetaLog::read_master_log_shards_info(const string &master_period, map<int, RGWMetadataLogInfo> *shards_info)
+int RGWRemoteMetaLog::read_master_log_shards_info(const DoutPrefixProvider *dpp, const string &master_period, map<int, RGWMetadataLogInfo> *shards_info)
{
if (store->svc()->zone->is_meta_master()) {
return 0;
}
rgw_mdlog_info log_info;
- int ret = read_log_info(&log_info);
+ int ret = read_log_info(dpp, &log_info);
if (ret < 0) {
return ret;
}
- return run(new RGWReadRemoteMDLogInfoCR(&sync_env, master_period, log_info.num_shards, shards_info));
+ return run(dpp, new RGWReadRemoteMDLogInfoCR(&sync_env, master_period, log_info.num_shards, shards_info));
}
-int RGWRemoteMetaLog::read_master_log_shards_next(const string& period, map<int, string> shard_markers, map<int, rgw_mdlog_shard_data> *result)
+int RGWRemoteMetaLog::read_master_log_shards_next(const DoutPrefixProvider *dpp, const string& period, map<int, string> shard_markers, map<int, rgw_mdlog_shard_data> *result)
{
if (store->svc()->zone->is_meta_master()) {
return 0;
}
- return run(new RGWListRemoteMDLogCR(&sync_env, period, shard_markers, 1, result));
+ return run(dpp, new RGWListRemoteMDLogCR(&sync_env, period, shard_markers, 1, result));
}
int RGWRemoteMetaLog::init()
#define CLONE_MAX_ENTRIES 100
-int RGWMetaSyncStatusManager::init()
+int RGWMetaSyncStatusManager::init(const DoutPrefixProvider *dpp)
{
if (store->svc()->zone->is_meta_master()) {
return 0;
}
if (!store->svc()->zone->get_master_conn()) {
- lderr(store->ctx()) << "no REST connection to master zone" << dendl;
+ ldpp_dout(dpp, -1) << "no REST connection to master zone" << dendl;
return -EIO;
}
- int r = rgw_init_ioctx(store->getRados()->get_rados_handle(), store->svc()->zone->get_zone_params().log_pool, ioctx, true);
+ int r = rgw_init_ioctx(dpp, store->getRados()->get_rados_handle(), store->svc()->zone->get_zone_params().log_pool, ioctx, true);
if (r < 0) {
- lderr(store->ctx()) << "ERROR: failed to open log pool (" << store->svc()->zone->get_zone_params().log_pool << " ret=" << r << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: failed to open log pool (" << store->svc()->zone->get_zone_params().log_pool << " ret=" << r << dendl;
return r;
}
r = master_log.init();
if (r < 0) {
- lderr(store->ctx()) << "ERROR: failed to init remote log, r=" << r << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: failed to init remote log, r=" << r << dendl;
return r;
}
RGWMetaSyncEnv& sync_env = master_log.get_sync_env();
rgw_meta_sync_status sync_status;
- r = read_sync_status(&sync_status);
+ r = read_sync_status(dpp, &sync_status);
if (r < 0 && r != -ENOENT) {
- lderr(store->ctx()) << "ERROR: failed to read sync status, r=" << r << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: failed to read sync status, r=" << r << dendl;
return r;
}
}
class RGWAsyncReadMDLogEntries : public RGWAsyncRadosRequest {
+ const DoutPrefixProvider *dpp;
rgw::sal::RGWRadosStore *store;
RGWMetadataLog *mdlog;
int shard_id;
int max_entries;
protected:
- int _send_request() override {
+ int _send_request(const DoutPrefixProvider *dpp) override {
real_time from_time;
real_time end_time;
mdlog->init_list_entries(shard_id, from_time, end_time, marker, &handle);
- int ret = mdlog->list_entries(handle, max_entries, entries, &marker, &truncated);
+ int ret = mdlog->list_entries(dpp, handle, max_entries, entries, &marker, &truncated);
mdlog->complete_list_entries(handle);
list<cls_log_entry> entries;
bool truncated;
- RGWAsyncReadMDLogEntries(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RGWRadosStore *_store,
+ RGWAsyncReadMDLogEntries(const DoutPrefixProvider *_dpp, RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RGWRadosStore *_store,
RGWMetadataLog* mdlog, int _shard_id,
std::string _marker, int _max_entries)
- : RGWAsyncRadosRequest(caller, cn), store(_store), mdlog(mdlog),
+ : RGWAsyncRadosRequest(caller, cn), dpp(_dpp), store(_store), mdlog(mdlog),
shard_id(_shard_id), max_entries(_max_entries), marker(std::move(_marker)) {}
};
}
}
- int send_request() override {
+ int send_request(const DoutPrefixProvider *dpp) override {
marker = *pmarker;
- req = new RGWAsyncReadMDLogEntries(this, stack->create_completion_notifier(),
+ req = new RGWAsyncReadMDLogEntries(dpp, this, stack->create_completion_notifier(),
sync_env->store, mdlog, shard_id, marker,
max_entries);
sync_env->async_rados->queue(req);
: RGWCoroutine(env->store->ctx()), env(env), http_op(NULL),
period(period), shard_id(_shard_id), shard_info(_shard_info) {}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
auto store = env->store;
RGWRESTConn *conn = store->svc()->zone->get_master_conn();
reenter(this) {
init_new_io(http_op);
- int ret = http_op->aio_read();
+ int ret = http_op->aio_read(dpp);
if (ret < 0) {
ldpp_dout(env->dpp, 0) << "ERROR: failed to read from " << p << dendl;
log_error() << "failed to send http operation: " << http_op->to_str() << " ret=" << ret << std::endl;
: RGWSimpleCoroutine(env->store->ctx()), sync_env(env), http_op(NULL),
period(period), shard_id(_shard_id), marker(_marker), max_entries(_max_entries), result(_result) {}
- int send_request() override {
+ int send_request(const DoutPrefixProvider *dpp) override {
RGWRESTConn *conn = sync_env->conn;
char buf[32];
http_op = new RGWRESTReadResource(conn, p, pairs, NULL, sync_env->http_manager);
init_new_io(http_op);
- int ret = http_op->aio_read();
+ int ret = http_op->aio_read(dpp);
if (ret < 0) {
- ldpp_dout(sync_env->dpp, 0) << "ERROR: failed to read from " << p << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to read from " << p << dendl;
log_error() << "failed to send http operation: " << http_op->to_str() << " ret=" << ret << std::endl;
http_op->put();
return ret;
}
}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
int ret;
reenter(this) {
yield {
}
while (!lease_cr->is_locked()) {
if (lease_cr->is_done()) {
- ldpp_dout(sync_env->dpp, 5) << "lease cr failed, done early " << dendl;
+ ldpp_dout(dpp, 5) << "lease cr failed, done early " << dendl;
set_status("lease lock failed, early abort");
return set_cr_error(lease_cr->get_ret_status());
}
yield {
set_status("writing sync status");
rgw::sal::RGWRadosStore *store = sync_env->store;
- call(new RGWSimpleRadosWriteCR<rgw_meta_sync_info>(sync_env->async_rados, store->svc()->sysobj,
+ call(new RGWSimpleRadosWriteCR<rgw_meta_sync_info>(dpp, sync_env->async_rados, store->svc()->sysobj,
rgw_raw_obj(store->svc()->zone->get_zone_params().log_pool, sync_env->status_oid()),
status));
}
if (retcode < 0) {
set_status("failed to write sync status");
- ldpp_dout(sync_env->dpp, 0) << "ERROR: failed to write sync status, retcode=" << retcode << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to write sync status, retcode=" << retcode << dendl;
yield lease_cr->go_down();
return set_cr_error(retcode);
}
marker.next_step_marker = info.marker;
marker.timestamp = info.last_update;
rgw::sal::RGWRadosStore *store = sync_env->store;
- spawn(new RGWSimpleRadosWriteCR<rgw_meta_sync_marker>(sync_env->async_rados,
+ spawn(new RGWSimpleRadosWriteCR<rgw_meta_sync_marker>(dpp,
+ sync_env->async_rados,
store->svc()->sysobj,
rgw_raw_obj(store->svc()->zone->get_zone_params().log_pool, sync_env->shard_obj_name(i)),
marker), true);
set_status("changing sync state: build full sync maps");
status.state = rgw_meta_sync_info::StateBuildingFullSyncMaps;
rgw::sal::RGWRadosStore *store = sync_env->store;
- call(new RGWSimpleRadosWriteCR<rgw_meta_sync_info>(sync_env->async_rados, store->svc()->sysobj,
+ call(new RGWSimpleRadosWriteCR<rgw_meta_sync_info>(dpp, sync_env->async_rados, store->svc()->sysobj,
rgw_raw_obj(store->svc()->zone->get_zone_params().log_pool, sync_env->status_oid()),
status));
}
using CR = RGWSimpleRadosReadCR<rgw_meta_sync_marker>;
rgw_raw_obj obj{env->store->svc()->zone->get_zone_params().log_pool,
env->shard_obj_name(shard_id)};
- spawn(new CR(env->async_rados, env->store->svc()->sysobj, obj, &markers[shard_id]), false);
+ spawn(new CR(env->dpp, env->async_rados, env->store->svc()->sysobj, obj, &markers[shard_id]), false);
shard_id++;
return true;
}
rgw_meta_sync_status *_status)
: RGWCoroutine(_sync_env->cct), sync_env(_sync_env), sync_status(_status)
{}
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
};
-int RGWReadSyncStatusCoroutine::operate()
+int RGWReadSyncStatusCoroutine::operate(const DoutPrefixProvider *dpp)
{
reenter(this) {
// read sync info
bool empty_on_enoent = false; // fail on ENOENT
rgw_raw_obj obj{sync_env->store->svc()->zone->get_zone_params().log_pool,
sync_env->status_oid()};
- call(new ReadInfoCR(sync_env->async_rados, sync_env->store->svc()->sysobj, obj,
+ call(new ReadInfoCR(dpp, sync_env->async_rados, sync_env->store->svc()->sysobj, obj,
&sync_status->sync_info, empty_on_enoent));
}
if (retcode < 0) {
- ldpp_dout(sync_env->dpp, 4) << "failed to read sync status info with "
+ ldpp_dout(dpp, 4) << "failed to read sync status info with "
<< cpp_strerror(retcode) << dendl;
return set_cr_error(retcode);
}
yield call(new ReadMarkersCR(sync_env, sync_status->sync_info.num_shards,
sync_status->sync_markers));
if (retcode < 0) {
- ldpp_dout(sync_env->dpp, 4) << "failed to read sync status markers with "
+ ldpp_dout(dpp, 4) << "failed to read sync status markers with "
<< cpp_strerror(retcode) << dendl;
return set_cr_error(retcode);
}
std::back_inserter(sections));
}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
RGWRESTConn *conn = sync_env->conn;
reenter(this) {
}
while (!lease_cr->is_locked()) {
if (lease_cr->is_done()) {
- ldpp_dout(sync_env->dpp, 5) << "lease cr failed, done early " << dendl;
+ ldpp_dout(dpp, 5) << "lease cr failed, done early " << dendl;
set_status("failed acquiring lock");
return set_cr_error(lease_cr->get_ret_status());
}
"/admin/metadata", NULL, §ions));
}
if (get_ret_status() < 0) {
- ldpp_dout(sync_env->dpp, 0) << "ERROR: failed to fetch metadata sections" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to fetch metadata sections" << dendl;
yield entries_index->finish();
yield lease_cr->go_down();
drain_all();
int shard_id = (int)iter->first;
rgw_meta_sync_marker& marker = iter->second;
marker.total_entries = entries_index->get_total_entries(shard_id);
- spawn(new RGWSimpleRadosWriteCR<rgw_meta_sync_marker>(sync_env->async_rados, sync_env->store->svc()->sysobj,
+ spawn(new RGWSimpleRadosWriteCR<rgw_meta_sync_marker>(dpp, sync_env->async_rados, sync_env->store->svc()->sysobj,
rgw_raw_obj(sync_env->store->svc()->zone->get_zone_params().log_pool, sync_env->shard_obj_name(shard_id)),
marker), true);
}
section + ":" + key);
}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
RGWRESTConn *conn = sync_env->conn;
reenter(this) {
yield {
init_new_io(http_op);
- int ret = http_op->aio_read();
+ int ret = http_op->aio_read(dpp);
if (ret < 0) {
- ldpp_dout(sync_env->dpp, 0) << "ERROR: failed to fetch mdlog data" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to fetch mdlog data" << dendl;
log_error() << "failed to send http operation: " << http_op->to_str() << " ret=" << ret << std::endl;
http_op->put();
return set_cr_error(ret);
rgw::sal::RGWRadosStore *store;
string raw_key;
bufferlist bl;
+ const DoutPrefixProvider *dpp;
protected:
- int _send_request() override {
- int ret = store->ctl()->meta.mgr->put(raw_key, bl, null_yield, RGWMDLogSyncType::APPLY_ALWAYS, true);
+ int _send_request(const DoutPrefixProvider *dpp) override {
+ int ret = store->ctl()->meta.mgr->put(raw_key, bl, null_yield, dpp, RGWMDLogSyncType::APPLY_ALWAYS, true);
if (ret < 0) {
- ldout(store->ctx(), 0) << "ERROR: can't store key: " << raw_key << " ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: can't store key: " << raw_key << " ret=" << ret << dendl;
return ret;
}
return 0;
public:
RGWAsyncMetaStoreEntry(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RGWRadosStore *_store,
const string& _raw_key,
- bufferlist& _bl) : RGWAsyncRadosRequest(caller, cn), store(_store),
- raw_key(_raw_key), bl(_bl) {}
+ bufferlist& _bl,
+ const DoutPrefixProvider *dpp) : RGWAsyncRadosRequest(caller, cn), store(_store),
+ raw_key(_raw_key), bl(_bl), dpp(dpp) {}
};
}
}
- int send_request() override {
+ int send_request(const DoutPrefixProvider *dpp) override {
req = new RGWAsyncMetaStoreEntry(this, stack->create_completion_notifier(),
- sync_env->store, raw_key, bl);
+ sync_env->store, raw_key, bl, dpp);
sync_env->async_rados->queue(req);
return 0;
}
class RGWAsyncMetaRemoveEntry : public RGWAsyncRadosRequest {
rgw::sal::RGWRadosStore *store;
string raw_key;
+ const DoutPrefixProvider *dpp;
protected:
- int _send_request() override {
- int ret = store->ctl()->meta.mgr->remove(raw_key, null_yield);
+ int _send_request(const DoutPrefixProvider *dpp) override {
+ int ret = store->ctl()->meta.mgr->remove(raw_key, null_yield, dpp);
if (ret < 0) {
- ldout(store->ctx(), 0) << "ERROR: can't remove key: " << raw_key << " ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: can't remove key: " << raw_key << " ret=" << ret << dendl;
return ret;
}
return 0;
}
public:
RGWAsyncMetaRemoveEntry(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RGWRadosStore *_store,
- const string& _raw_key) : RGWAsyncRadosRequest(caller, cn), store(_store),
- raw_key(_raw_key) {}
+ const string& _raw_key, const DoutPrefixProvider *dpp) : RGWAsyncRadosRequest(caller, cn), store(_store),
+ raw_key(_raw_key), dpp(dpp) {}
};
}
}
- int send_request() override {
+ int send_request(const DoutPrefixProvider *dpp) override {
req = new RGWAsyncMetaRemoveEntry(this, stack->create_completion_notifier(),
- sync_env->store, raw_key);
+ sync_env->store, raw_key, dpp);
sync_env->async_rados->queue(req);
return 0;
}
#define META_SYNC_UPDATE_MARKER_WINDOW 10
-int RGWLastCallerWinsCR::operate() {
+int RGWLastCallerWinsCR::operate(const DoutPrefixProvider *dpp) {
RGWCoroutine *call_cr;
reenter(this) {
while (cr) {
ldpp_dout(sync_env->dpp, 20) << __func__ << "(): updating marker marker_oid=" << marker_oid << " marker=" << new_marker << " realm_epoch=" << sync_marker.realm_epoch << dendl;
tn->log(20, SSTR("new marker=" << new_marker));
rgw::sal::RGWRadosStore *store = sync_env->store;
- return new RGWSimpleRadosWriteCR<rgw_meta_sync_marker>(sync_env->async_rados,
+ return new RGWSimpleRadosWriteCR<rgw_meta_sync_marker>(sync_env->dpp, sync_env->async_rados,
store->svc()->sysobj,
rgw_raw_obj(store->svc()->zone->get_zone_params().log_pool, marker_oid),
sync_marker);
tn = sync_env->sync_tracer->add_node(_tn_parent, "entry", raw_key);
}
-int RGWMetaSyncSingleEntryCR::operate() {
+int RGWMetaSyncSingleEntryCR::operate(const DoutPrefixProvider *dpp) {
reenter(this) {
#define NUM_TRANSIENT_ERROR_RETRIES 10
}
if ((sync_status == -EAGAIN || sync_status == -ECANCELED) && (tries < NUM_TRANSIENT_ERROR_RETRIES - 1)) {
- ldpp_dout(sync_env->dpp, 20) << *this << ": failed to fetch remote metadata: " << section << ":" << key << ", will retry" << dendl;
+ ldpp_dout(dpp, 20) << *this << ": failed to fetch remote metadata: " << section << ":" << key << ", will retry" << dendl;
continue;
}
if (sync_status < 0) {
tn->log(10, SSTR("failed to send read remote metadata entry: section=" << section << " key=" << key << " status=" << sync_status));
log_error() << "failed to send read remote metadata entry: section=" << section << " key=" << key << " status=" << sync_status << std::endl;
- yield call(sync_env->error_logger->log_error_cr(sync_env->conn->get_remote_id(), section, key, -sync_status,
+ yield call(sync_env->error_logger->log_error_cr(dpp, sync_env->conn->get_remote_id(), section, key, -sync_status,
string("failed to read remote metadata entry: ") + cpp_strerror(-sync_status)));
return set_cr_error(sync_status);
}
yield call(new RGWMetaRemoveEntryCR(sync_env, raw_key));
}
if ((retcode == -EAGAIN || retcode == -ECANCELED) && (tries < NUM_TRANSIENT_ERROR_RETRIES - 1)) {
- ldpp_dout(sync_env->dpp, 20) << *this << ": failed to store metadata: " << section << ":" << key << ", got retcode=" << retcode << dendl;
+ ldpp_dout(dpp, 20) << *this << ": failed to store metadata: " << section << ":" << key << ", got retcode=" << retcode << dendl;
continue;
}
break;
}
}
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
int state_init();
int state_read_shard_status();
int state_read_shard_status_complete();
- int state_send_rest_request();
+ int state_send_rest_request(const DoutPrefixProvider *dpp);
int state_receive_rest_response();
int state_store_mdlog_entries();
int state_store_mdlog_entries_complete();
marker_tracker = mt;
}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
int r;
while (true) {
switch (sync_marker.state) {
case rgw_meta_sync_marker::FullSync:
r = full_sync();
if (r < 0) {
- ldpp_dout(sync_env->dpp, 10) << "sync: full_sync: shard_id=" << shard_id << " r=" << r << dendl;
+ ldpp_dout(dpp, 10) << "sync: full_sync: shard_id=" << shard_id << " r=" << r << dendl;
return set_cr_error(r);
}
return 0;
case rgw_meta_sync_marker::IncrementalSync:
r = incremental_sync();
if (r < 0) {
- ldpp_dout(sync_env->dpp, 10) << "sync: incremental_sync: shard_id=" << shard_id << " r=" << r << dendl;
+ ldpp_dout(dpp, 10) << "sync: incremental_sync: shard_id=" << shard_id << " r=" << r << dendl;
return set_cr_error(r);
}
return 0;
ldpp_dout(sync_env->dpp, 4) << *this << ": saving marker pos=" << temp_marker->marker << " realm_epoch=" << realm_epoch << dendl;
using WriteMarkerCR = RGWSimpleRadosWriteCR<rgw_meta_sync_marker>;
- yield call(new WriteMarkerCR(sync_env->async_rados, sync_env->store->svc()->sysobj,
+ yield call(new WriteMarkerCR(sync_env->dpp, sync_env->async_rados, sync_env->store->svc()->sysobj,
rgw_raw_obj(pool, sync_env->shard_obj_name(shard_id)),
*temp_marker));
}
RGWCoroutine *alloc_finisher_cr() override {
rgw::sal::RGWRadosStore *store = sync_env->store;
- return new RGWSimpleRadosReadCR<rgw_meta_sync_marker>(sync_env->async_rados, store->svc()->sysobj,
+ return new RGWSimpleRadosReadCR<rgw_meta_sync_marker>(sync_env->dpp, sync_env->async_rados, store->svc()->sysobj,
rgw_raw_obj(pool, sync_env->shard_obj_name(shard_id)),
&sync_marker);
}
~RGWMetaSyncCR() {
}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
// loop through one period at a time
tn->log(1, "start");
if (cursor == sync_env->store->svc()->mdlog->get_period_history()->get_current()) {
next = RGWPeriodHistory::Cursor{};
if (cursor) {
- ldpp_dout(sync_env->dpp, 10) << "RGWMetaSyncCR on current period="
+ ldpp_dout(dpp, 10) << "RGWMetaSyncCR on current period="
<< cursor.get_period().get_id() << dendl;
} else {
- ldpp_dout(sync_env->dpp, 10) << "RGWMetaSyncCR with no period" << dendl;
+ ldpp_dout(dpp, 10) << "RGWMetaSyncCR with no period" << dendl;
}
} else {
next = cursor;
next.next();
- ldpp_dout(sync_env->dpp, 10) << "RGWMetaSyncCR on period="
+ ldpp_dout(dpp, 10) << "RGWMetaSyncCR on period="
<< cursor.get_period().get_id() << ", next="
<< next.get_period().get_id() << dendl;
}
period_marker = next.get_period().get_sync_status()[shard_id];
if (period_marker.empty()) {
// no metadata changes have occurred on this shard, skip it
- ldpp_dout(sync_env->dpp, 10) << "RGWMetaSyncCR: skipping shard " << shard_id
+ ldpp_dout(dpp, 10) << "RGWMetaSyncCR: skipping shard " << shard_id
<< " with empty period marker" << dendl;
continue;
}
// write the updated sync info
sync_status.sync_info.period = cursor.get_period().get_id();
sync_status.sync_info.realm_epoch = cursor.get_epoch();
- yield call(new RGWSimpleRadosWriteCR<rgw_meta_sync_info>(sync_env->async_rados,
+ yield call(new RGWSimpleRadosWriteCR<rgw_meta_sync_info>(dpp, sync_env->async_rados,
sync_env->store->svc()->sysobj,
rgw_raw_obj(pool, sync_env->status_oid()),
sync_status.sync_info));
env->sync_tracer = store->getRados()->get_sync_tracer();
}
-int RGWRemoteMetaLog::read_sync_status(rgw_meta_sync_status *sync_status)
+int RGWRemoteMetaLog::read_sync_status(const DoutPrefixProvider *dpp, rgw_meta_sync_status *sync_status)
{
if (store->svc()->zone->is_meta_master()) {
return 0;
RGWMetaSyncEnv sync_env_local = sync_env;
sync_env_local.http_manager = &http_manager;
tn->log(20, "read sync status");
- ret = crs.run(new RGWReadSyncStatusCoroutine(&sync_env_local, sync_status));
+ ret = crs.run(dpp, new RGWReadSyncStatusCoroutine(&sync_env_local, sync_status));
http_manager.stop();
return ret;
}
-int RGWRemoteMetaLog::init_sync_status()
+int RGWRemoteMetaLog::init_sync_status(const DoutPrefixProvider *dpp)
{
if (store->svc()->zone->is_meta_master()) {
return 0;
}
rgw_mdlog_info mdlog_info;
- int r = read_log_info(&mdlog_info);
+ int r = read_log_info(dpp, &mdlog_info);
if (r < 0) {
- lderr(store->ctx()) << "ERROR: fail to fetch master log info (r=" << r << ")" << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: fail to fetch master log info (r=" << r << ")" << dendl;
return r;
}
sync_info.realm_epoch = cursor.get_epoch();
}
- return run(new RGWInitSyncStatusCoroutine(&sync_env, sync_info));
+ return run(dpp, new RGWInitSyncStatusCoroutine(&sync_env, sync_info));
}
-int RGWRemoteMetaLog::store_sync_info(const rgw_meta_sync_info& sync_info)
+int RGWRemoteMetaLog::store_sync_info(const DoutPrefixProvider *dpp, const rgw_meta_sync_info& sync_info)
{
tn->log(20, "store sync info");
- return run(new RGWSimpleRadosWriteCR<rgw_meta_sync_info>(async_rados, store->svc()->sysobj,
+ return run(dpp, new RGWSimpleRadosWriteCR<rgw_meta_sync_info>(dpp, async_rados, store->svc()->sysobj,
rgw_raw_obj(store->svc()->zone->get_zone_params().log_pool, sync_env.status_oid()),
sync_info));
}
// return a cursor to the period at our sync position
-static RGWPeriodHistory::Cursor get_period_at(rgw::sal::RGWRadosStore* store,
+static RGWPeriodHistory::Cursor get_period_at(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore* store,
const rgw_meta_sync_info& info,
optional_yield y)
{
// verify that the period ids match
auto& existing = cursor.get_period().get_id();
if (existing != info.period) {
- lderr(store->ctx()) << "ERROR: sync status period=" << info.period
+ ldpp_dout(dpp, -1) << "ERROR: sync status period=" << info.period
<< " does not match period=" << existing
<< " in history at realm epoch=" << info.realm_epoch << dendl;
return RGWPeriodHistory::Cursor{-EEXIST};
// read the period from rados or pull it from the master
RGWPeriod period;
- int r = store->svc()->mdlog->pull_period(info.period, period, y);
+ int r = store->svc()->mdlog->pull_period(dpp, info.period, period, y);
if (r < 0) {
- lderr(store->ctx()) << "ERROR: failed to read period id "
+ ldpp_dout(dpp, -1) << "ERROR: failed to read period id "
<< info.period << ": " << cpp_strerror(r) << dendl;
return RGWPeriodHistory::Cursor{r};
}
// attach the period to our history
- cursor = store->svc()->mdlog->get_period_history()->attach(std::move(period), y);
+ cursor = store->svc()->mdlog->get_period_history()->attach(dpp, std::move(period), y);
if (!cursor) {
r = cursor.get_error();
- lderr(store->ctx()) << "ERROR: failed to read period history back to "
+ ldpp_dout(dpp, -1) << "ERROR: failed to read period history back to "
<< info.period << ": " << cpp_strerror(r) << dendl;
}
return cursor;
}
-int RGWRemoteMetaLog::run_sync(optional_yield y)
+int RGWRemoteMetaLog::run_sync(const DoutPrefixProvider *dpp, optional_yield y)
{
if (store->svc()->zone->is_meta_master()) {
return 0;
ldpp_dout(dpp, 1) << __func__ << "(): going down" << dendl;
return 0;
}
- r = read_log_info(&mdlog_info);
+ r = read_log_info(dpp, &mdlog_info);
if (r == -EIO || r == -ENOENT) {
// keep retrying if master isn't alive or hasn't initialized the log
ldpp_dout(dpp, 10) << __func__ << "(): waiting for master.." << dendl;
}
backoff.reset();
if (r < 0) {
- lderr(store->ctx()) << "ERROR: fail to fetch master log info (r=" << r << ")" << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: fail to fetch master log info (r=" << r << ")" << dendl;
return r;
}
break;
ldpp_dout(dpp, 1) << __func__ << "(): going down" << dendl;
return 0;
}
- r = run(new RGWReadSyncStatusCoroutine(&sync_env, &sync_status));
+ r = run(dpp, new RGWReadSyncStatusCoroutine(&sync_env, &sync_status));
if (r < 0 && r != -ENOENT) {
ldpp_dout(dpp, 0) << "ERROR: failed to fetch sync status r=" << r << dendl;
return r;
sync_status.sync_info.period = cursor.get_period().get_id();
sync_status.sync_info.realm_epoch = cursor.get_epoch();
}
- r = run(new RGWInitSyncStatusCoroutine(&sync_env, sync_status.sync_info));
+ r = run(dpp, new RGWInitSyncStatusCoroutine(&sync_env, sync_status.sync_info));
if (r == -EBUSY) {
backoff.backoff_sleep();
continue;
auto num_shards = sync_status.sync_info.num_shards;
if (num_shards != mdlog_info.num_shards) {
- lderr(store->ctx()) << "ERROR: can't sync, mismatch between num shards, master num_shards=" << mdlog_info.num_shards << " local num_shards=" << num_shards << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: can't sync, mismatch between num shards, master num_shards=" << mdlog_info.num_shards << " local num_shards=" << num_shards << dendl;
return -EINVAL;
}
RGWPeriodHistory::Cursor cursor;
do {
- r = run(new RGWReadSyncStatusCoroutine(&sync_env, &sync_status));
+ r = run(dpp, new RGWReadSyncStatusCoroutine(&sync_env, &sync_status));
if (r < 0 && r != -ENOENT) {
tn->log(0, SSTR("ERROR: failed to fetch sync status r=" << r));
return r;
switch ((rgw_meta_sync_info::SyncState)sync_status.sync_info.state) {
case rgw_meta_sync_info::StateBuildingFullSyncMaps:
tn->log(20, "building full sync maps");
- r = run(new RGWFetchAllMetaCR(&sync_env, num_shards, sync_status.sync_markers, tn));
+ r = run(dpp, new RGWFetchAllMetaCR(&sync_env, num_shards, sync_status.sync_markers, tn));
if (r == -EBUSY || r == -EAGAIN) {
backoff.backoff_sleep();
continue;
}
sync_status.sync_info.state = rgw_meta_sync_info::StateSync;
- r = store_sync_info(sync_status.sync_info);
+ r = store_sync_info(dpp, sync_status.sync_info);
if (r < 0) {
tn->log(0, SSTR("ERROR: failed to update sync status (r=" << r << ")"));
return r;
case rgw_meta_sync_info::StateSync:
tn->log(20, "sync");
// find our position in the period history (if any)
- cursor = get_period_at(store, sync_status.sync_info, y);
+ cursor = get_period_at(dpp, store, sync_status.sync_info, y);
r = cursor.get_error();
if (r < 0) {
return r;
}
meta_sync_cr = new RGWMetaSyncCR(&sync_env, cursor, sync_status, tn);
- r = run(meta_sync_cr);
+ r = run(dpp, meta_sync_cr);
if (r < 0) {
tn->log(0, "ERROR: failed to fetch all metadata keys");
return r;
meta_sync_cr->wakeup(shard_id);
}
-int RGWCloneMetaLogCoroutine::operate()
+int RGWCloneMetaLogCoroutine::operate(const DoutPrefixProvider *dpp)
{
reenter(this) {
do {
yield {
- ldpp_dout(sync_env->dpp, 20) << __func__ << ": shard_id=" << shard_id << ": init request" << dendl;
+ ldpp_dout(dpp, 20) << __func__ << ": shard_id=" << shard_id << ": init request" << dendl;
return state_init();
}
yield {
- ldpp_dout(sync_env->dpp, 20) << __func__ << ": shard_id=" << shard_id << ": reading shard status" << dendl;
+ ldpp_dout(dpp, 20) << __func__ << ": shard_id=" << shard_id << ": reading shard status" << dendl;
return state_read_shard_status();
}
yield {
- ldpp_dout(sync_env->dpp, 20) << __func__ << ": shard_id=" << shard_id << ": reading shard status complete" << dendl;
+ ldpp_dout(dpp, 20) << __func__ << ": shard_id=" << shard_id << ": reading shard status complete" << dendl;
return state_read_shard_status_complete();
}
yield {
- ldpp_dout(sync_env->dpp, 20) << __func__ << ": shard_id=" << shard_id << ": sending rest request" << dendl;
- return state_send_rest_request();
+ ldpp_dout(dpp, 20) << __func__ << ": shard_id=" << shard_id << ": sending rest request" << dendl;
+ return state_send_rest_request(dpp);
}
yield {
- ldpp_dout(sync_env->dpp, 20) << __func__ << ": shard_id=" << shard_id << ": receiving rest response" << dendl;
+ ldpp_dout(dpp, 20) << __func__ << ": shard_id=" << shard_id << ": receiving rest response" << dendl;
return state_receive_rest_response();
}
yield {
- ldpp_dout(sync_env->dpp, 20) << __func__ << ": shard_id=" << shard_id << ": storing mdlog entries" << dendl;
+ ldpp_dout(dpp, 20) << __func__ << ": shard_id=" << shard_id << ": storing mdlog entries" << dendl;
return state_store_mdlog_entries();
}
} while (truncated);
yield {
- ldpp_dout(sync_env->dpp, 20) << __func__ << ": shard_id=" << shard_id << ": storing mdlog entries complete" << dendl;
+ ldpp_dout(dpp, 20) << __func__ << ": shard_id=" << shard_id << ": storing mdlog entries complete" << dendl;
return state_store_mdlog_entries_complete();
}
}
io_complete();
}), add_ref);
- int ret = mdlog->get_info_async(shard_id, completion.get());
+ int ret = mdlog->get_info_async(sync_env->dpp, shard_id, completion.get());
if (ret < 0) {
ldpp_dout(sync_env->dpp, 0) << "ERROR: mdlog->get_info_async() returned ret=" << ret << dendl;
return set_cr_error(ret);
return 0;
}
-int RGWCloneMetaLogCoroutine::state_send_rest_request()
+int RGWCloneMetaLogCoroutine::state_send_rest_request(const DoutPrefixProvider *dpp)
{
RGWRESTConn *conn = sync_env->conn;
init_new_io(http_op);
- int ret = http_op->aio_read();
+ int ret = http_op->aio_read(dpp);
if (ret < 0) {
- ldpp_dout(sync_env->dpp, 0) << "ERROR: failed to fetch mdlog data" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to fetch mdlog data" << dendl;
log_error() << "failed to send http operation: " << http_op->to_str() << " ret=" << ret << std::endl;
http_op->put();
http_op = NULL;
RGWAioCompletionNotifier *cn = stack->create_completion_notifier();
- int ret = mdlog->store_entries_in_shard(dest_entries, shard_id, cn->completion());
+ int ret = mdlog->store_entries_in_shard(sync_env->dpp, dest_entries, shard_id, cn->completion());
if (ret < 0) {
cn->put();
ldpp_dout(sync_env->dpp, 10) << "failed to store md log entries shard_id=" << shard_id << " ret=" << ret << dendl;
std::atomic<int64_t> counter = { 0 };
public:
RGWSyncErrorLogger(rgw::sal::RGWRadosStore *_store, const string &oid_prefix, int _num_shards);
- RGWCoroutine *log_error_cr(const string& source_zone, const string& section, const string& name, uint32_t error_code, const string& message);
+ RGWCoroutine *log_error_cr(const DoutPrefixProvider *dpp, const string& source_zone, const string& section, const string& name, uint32_t error_code, const string& message);
static string get_shard_oid(const string& oid_prefix, int shard_id);
};
virtual RGWCoroutine *alloc_cr() = 0;
virtual RGWCoroutine *alloc_finisher_cr() { return NULL; }
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
};
struct RGWMetaSyncEnv {
RGWMetaSyncEnv sync_env;
void init_sync_env(RGWMetaSyncEnv *env);
- int store_sync_info(const rgw_meta_sync_info& sync_info);
+ int store_sync_info(const DoutPrefixProvider *dpp, const rgw_meta_sync_info& sync_info);
std::atomic<bool> going_down = { false };
int init();
void finish();
- int read_log_info(rgw_mdlog_info *log_info);
- int read_master_log_shards_info(const string& master_period, map<int, RGWMetadataLogInfo> *shards_info);
- int read_master_log_shards_next(const string& period, map<int, string> shard_markers, map<int, rgw_mdlog_shard_data> *result);
- int read_sync_status(rgw_meta_sync_status *sync_status);
- int init_sync_status();
- int run_sync(optional_yield y);
+ int read_log_info(const DoutPrefixProvider *dpp, rgw_mdlog_info *log_info);
+ int read_master_log_shards_info(const DoutPrefixProvider *dpp, const string& master_period, map<int, RGWMetadataLogInfo> *shards_info);
+ int read_master_log_shards_next(const DoutPrefixProvider *dpp, const string& period, map<int, string> shard_markers, map<int, rgw_mdlog_shard_data> *result);
+ int read_sync_status(const DoutPrefixProvider *dpp, rgw_meta_sync_status *sync_status);
+ int init_sync_status(const DoutPrefixProvider *dpp);
+ int run_sync(const DoutPrefixProvider *dpp, optional_yield y);
void wakeup(int shard_id);
RGWMetaSyncStatusManager(rgw::sal::RGWRadosStore *_store, RGWAsyncRadosProcessor *async_rados)
: store(_store), master_log(this, store, async_rados, this)
{}
- int init();
+ int init(const DoutPrefixProvider *dpp);
- int read_sync_status(rgw_meta_sync_status *sync_status) {
- return master_log.read_sync_status(sync_status);
+ int read_sync_status(const DoutPrefixProvider *dpp, rgw_meta_sync_status *sync_status) {
+ return master_log.read_sync_status(dpp, sync_status);
}
- int init_sync_status() { return master_log.init_sync_status(); }
- int read_log_info(rgw_mdlog_info *log_info) {
- return master_log.read_log_info(log_info);
+ int init_sync_status(const DoutPrefixProvider *dpp) { return master_log.init_sync_status(dpp); }
+ int read_log_info(const DoutPrefixProvider *dpp, rgw_mdlog_info *log_info) {
+ return master_log.read_log_info(dpp, log_info);
}
- int read_master_log_shards_info(const string& master_period, map<int, RGWMetadataLogInfo> *shards_info) {
- return master_log.read_master_log_shards_info(master_period, shards_info);
+ int read_master_log_shards_info(const DoutPrefixProvider *dpp, const string& master_period, map<int, RGWMetadataLogInfo> *shards_info) {
+ return master_log.read_master_log_shards_info(dpp, master_period, shards_info);
}
- int read_master_log_shards_next(const string& period, map<int, string> shard_markers, map<int, rgw_mdlog_shard_data> *result) {
- return master_log.read_master_log_shards_next(period, shard_markers, result);
+ int read_master_log_shards_next(const DoutPrefixProvider *dpp, const string& period, map<int, string> shard_markers, map<int, rgw_mdlog_shard_data> *result) {
+ return master_log.read_master_log_shards_next(dpp, period, shard_markers, result);
}
- int run(optional_yield y) { return master_log.run_sync(y); }
+ int run(const DoutPrefixProvider *dpp, optional_yield y) { return master_log.run_sync(dpp, y); }
// implements DoutPrefixProvider
}
}
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
void call_cr(RGWCoroutine *_cr) override {
if (cr) {
const RGWMDLogStatus& _op_status,
RGWMetaSyncShardMarkerTrack *_marker_tracker, const RGWSyncTraceNodeRef& _tn_parent);
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
};
class RGWShardCollectCR : public RGWCoroutine {
status(0) {}
virtual bool spawn_next() = 0;
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
};
// factory functions for meta sync coroutines needed in mdlog trimming
return 0;
}
-int source_bilog_markers(RGWSI_Zone* zone_svc,
+int source_bilog_markers(const DoutPrefixProvider *dpp,
+ RGWSI_Zone* zone_svc,
const rgw_sync_bucket_pipe& pipe,
BucketIndexShardsManager& remote_markers,
optional_yield y)
return -EINVAL;
}
- return rgw_read_remote_bilog_info(conn->second, *pipe.source.bucket,
+ return rgw_read_remote_bilog_info(dpp, conn->second, *pipe.source.bucket,
remote_markers, y);
}
// fetch remote markers
spawn::spawn(ioctx, [&] (spawn::yield_context yield) {
auto y = optional_yield{ioctx, yield};
- int r = source_bilog_markers(store->svc()->zone, entry.pipe,
+ int r = source_bilog_markers(dpp, store->svc()->zone, entry.pipe,
entry.remote_markers, y);
if (r < 0) {
ldpp_dout(dpp, 0) << "failed to fetch remote bilog markers: "
auto obj_ctx = store->svc()->sysobj->init_obj_ctx();
int r = store->getRados()->get_bucket_instance_info(
obj_ctx, *entry.pipe.source.bucket, entry.source_bucket_info,
- nullptr, nullptr, y);
+ nullptr, nullptr, y, dpp);
if (r < 0) {
ldpp_dout(dpp, 0) << "failed to read source bucket info: "
<< cpp_strerror(r) << dendl;
key(key), timestamp(timestamp)
{}
- int send_request() override {
+ int send_request(const DoutPrefixProvider *dpp) override {
librados::ObjectWriteOperation op;
int r = rgw_error_repo_write(op, key, timestamp);
if (r < 0) {
return r;
}
- r = obj.open();
+ r = obj.open(dpp);
if (r < 0) {
return r;
}
key(key), timestamp(timestamp)
{}
- int send_request() override {
+ int send_request(const DoutPrefixProvider *dpp) override {
librados::ObjectWriteOperation op;
int r = rgw_error_repo_remove(op, key, timestamp);
if (r < 0) {
return r;
}
- r = obj.open();
+ r = obj.open(dpp);
if (r < 0) {
return r;
}
src_bucket(_src_bucket), key(_key) {
}
-int RGWCallStatRemoteObjCR::operate() {
+int RGWCallStatRemoteObjCR::operate(const DoutPrefixProvider *dpp) {
reenter(this) {
yield {
call(new RGWStatRemoteObjCR(sync_env->async_rados, sync_env->store,
src_bucket, key, &mtime, &size, &etag, &attrs, &headers));
}
if (retcode < 0) {
- ldout(sync_env->cct, 10) << "RGWStatRemoteObjCR() returned " << retcode << dendl;
+ ldpp_dout(dpp, 10) << "RGWStatRemoteObjCR() returned " << retcode << dendl;
return set_cr_error(retcode);
}
- ldout(sync_env->cct, 20) << "stat of remote obj: z=" << sc->source_zone
+ ldpp_dout(dpp, 20) << "stat of remote obj: z=" << sc->source_zone
<< " b=" << src_bucket << " k=" << key
<< " size=" << size << " mtime=" << mtime << dendl;
yield {
}
}
if (retcode < 0) {
- ldout(sync_env->cct, 10) << "RGWStatRemoteObjCR() callback returned " << retcode << dendl;
+ ldpp_dout(dpp, 10) << "RGWStatRemoteObjCR() callback returned " << retcode << dendl;
return set_cr_error(retcode);
}
return set_cr_done();
~RGWCallStatRemoteObjCR() override {}
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
virtual RGWStatRemoteObjCBCR *allocate_callback() {
return nullptr;
src_properties(_src_properties) {
}
- int init() override {
+ int init(const DoutPrefixProvider *dpp) override {
/* init input connection */
}
RGWRESTStreamRWRequest *in_req;
- int ret = conn->get_obj(src_obj, req_params, false /* send */, &in_req);
+ int ret = conn->get_obj(dpp, src_obj, req_params, false /* send */, &in_req);
if (ret < 0) {
- ldout(sc->cct, 0) << "ERROR: " << __func__ << "(): conn->get_obj() returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: " << __func__ << "(): conn->get_obj() returned ret=" << ret << dendl;
return ret;
}
set_req(in_req);
- return RGWStreamReadHTTPResourceCRF::init();
+ return RGWStreamReadHTTPResourceCRF::init(dpp);
}
int decode_rest_obj(map<string, string>& headers, bufferlist& extra_data) override {
}
}
- void send_ready(const rgw_rest_obj& rest_obj) override {
+ void send_ready(const DoutPrefixProvider *dpp, const rgw_rest_obj& rest_obj) override {
RGWRESTStreamS3PutObj *r = static_cast<RGWRESTStreamS3PutObj *>(req);
map<string, string> new_attrs;
RGWAccessControlPolicy policy;
- r->send_ready(target->conn->get_key(), new_attrs, policy, false);
+ r->send_ready(dpp, target->conn->get_key(), new_attrs, policy, false);
}
void handle_headers(const map<string, string>& headers) {
dest_obj(_dest_obj),
src_properties(_src_properties) {}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
/* init input */
in_crf.reset(new RGWRESTStreamGetCRF(cct, get_env(), this, sc,
part_info(_part_info),
petag(_petag) {}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
/* init input */
in_crf.reset(new RGWRESTStreamGetCRF(cct, get_env(), this, sc,
dest_obj(_dest_obj),
upload_id(_upload_id) {}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
yield {
}
if (retcode < 0) {
- ldout(sc->cct, 0) << "ERROR: failed to abort multipart upload for dest object=" << dest_obj << " (retcode=" << retcode << ")" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to abort multipart upload for dest object=" << dest_obj << " (retcode=" << retcode << ")" << dendl;
return set_cr_error(retcode);
}
attrs(_attrs),
upload_id(_upload_id) {}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
yield {
}
if (retcode < 0) {
- ldout(sc->cct, 0) << "ERROR: failed to initialize multipart upload for dest object=" << dest_obj << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to initialize multipart upload for dest object=" << dest_obj << dendl;
return set_cr_error(retcode);
}
{
}
}
- ldout(sc->cct, 20) << "init multipart result: bucket=" << result.bucket << " key=" << result.key << " upload_id=" << result.upload_id << dendl;
+ ldpp_dout(dpp, 20) << "init multipart result: bucket=" << result.bucket << " key=" << result.key << " upload_id=" << result.upload_id << dendl;
*upload_id = result.upload_id;
upload_id(_upload_id),
req_enc(_parts) {}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
yield {
}
if (retcode < 0) {
- ldout(sc->cct, 0) << "ERROR: failed to initialize multipart upload for dest object=" << dest_obj << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to initialize multipart upload for dest object=" << dest_obj << dendl;
return set_cr_error(retcode);
}
{
}
}
- ldout(sc->cct, 20) << "complete multipart result: location=" << result.location << " bucket=" << result.bucket << " key=" << result.key << " etag=" << result.etag << dendl;
+ ldpp_dout(dpp, 20) << "complete multipart result: location=" << result.location << " bucket=" << result.bucket << " key=" << result.key << " etag=" << result.etag << dendl;
return set_cr_done();
}
status_obj(_status_obj),
upload_id(_upload_id) {}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
yield call(new RGWAWSAbortMultipartCR(sc, dest_conn, dest_obj, upload_id));
if (retcode < 0) {
- ldout(sc->cct, 0) << "ERROR: failed to abort multipart upload dest obj=" << dest_obj << " upload_id=" << upload_id << " retcode=" << retcode << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to abort multipart upload dest obj=" << dest_obj << " upload_id=" << upload_id << " retcode=" << retcode << dendl;
/* ignore error, best effort */
}
yield call(new RGWRadosRemoveCR(sc->env->store, status_obj));
if (retcode < 0) {
- ldout(sc->cct, 0) << "ERROR: failed to remove sync status obj obj=" << status_obj << " retcode=" << retcode << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to remove sync status obj obj=" << status_obj << " retcode=" << retcode << dendl;
/* ignore error, best effort */
}
return set_cr_done();
}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
- yield call(new RGWSimpleRadosReadCR<rgw_sync_aws_multipart_upload_info>(sync_env->async_rados, sync_env->svc->sysobj,
+ yield call(new RGWSimpleRadosReadCR<rgw_sync_aws_multipart_upload_info>(dpp, sync_env->async_rados, sync_env->svc->sysobj,
status_obj, &status, false));
if (retcode < 0 && retcode != -ENOENT) {
- ldout(sc->cct, 0) << "ERROR: failed to read sync status of object " << src_obj << " retcode=" << retcode << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to read sync status of object " << src_obj << " retcode=" << retcode << dendl;
return retcode;
}
}
if (retcode < 0) {
- ldout(sc->cct, 0) << "ERROR: failed to sync obj=" << src_obj << ", sync via multipart upload, upload_id=" << status.upload_id << " part number " << status.cur_part << " (error: " << cpp_strerror(-retcode) << ")" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to sync obj=" << src_obj << ", sync via multipart upload, upload_id=" << status.upload_id << " part number " << status.cur_part << " (error: " << cpp_strerror(-retcode) << ")" << dendl;
ret_err = retcode;
yield call(new RGWAWSStreamAbortMultipartUploadCR(sc, target->conn.get(), dest_obj, status_obj, status.upload_id));
return set_cr_error(ret_err);
}
- yield call(new RGWSimpleRadosWriteCR<rgw_sync_aws_multipart_upload_info>(sync_env->async_rados, sync_env->svc->sysobj, status_obj, status));
+ yield call(new RGWSimpleRadosWriteCR<rgw_sync_aws_multipart_upload_info>(dpp, sync_env->async_rados, sync_env->svc->sysobj, status_obj, status));
if (retcode < 0) {
- ldout(sc->cct, 0) << "ERROR: failed to store multipart upload state, retcode=" << retcode << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to store multipart upload state, retcode=" << retcode << dendl;
/* continue with upload anyway */
}
ldout(sc->cct, 20) << "sync of object=" << src_obj << " via multipart upload, finished sending part #" << status.cur_part << " etag=" << pcur_part_info->etag << dendl;
yield call(new RGWAWSCompleteMultipartCR(sc, target->conn.get(), dest_obj, status.upload_id, status.parts));
if (retcode < 0) {
- ldout(sc->cct, 0) << "ERROR: failed to complete multipart upload of obj=" << src_obj << " (error: " << cpp_strerror(-retcode) << ")" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to complete multipart upload of obj=" << src_obj << " (error: " << cpp_strerror(-retcode) << ")" << dendl;
ret_err = retcode;
yield call(new RGWAWSStreamAbortMultipartUploadCR(sc, target->conn.get(), dest_obj, status_obj, status.upload_id));
return set_cr_error(ret_err);
/* remove status obj */
yield call(new RGWRadosRemoveCR(sync_env->store, status_obj));
if (retcode < 0) {
- ldout(sc->cct, 0) << "ERROR: failed to abort multipart upload obj=" << src_obj << " upload_id=" << status.upload_id << " part number " << status.cur_part << " (" << cpp_strerror(-retcode) << ")" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to abort multipart upload obj=" << src_obj << " upload_id=" << status.upload_id << " part number " << status.cur_part << " (" << cpp_strerror(-retcode) << ")" << dendl;
/* ignore error, best effort */
}
return set_cr_done();
~RGWAWSHandleRemoteObjCBCR(){
}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
ret = decode_attr(attrs, RGW_ATTR_PG_VER, &src_pg_ver, (uint64_t)0);
if (ret < 0) {
src_pg_ver = 0; /* all or nothing */
}
}
- ldout(sc->cct, 4) << "AWS: download begin: z=" << sc->source_zone
+ ldpp_dout(dpp, 4) << "AWS: download begin: z=" << sc->source_zone
<< " b=" << src_bucket << " k=" << key << " size=" << size
<< " mtime=" << mtime << " etag=" << etag
<< " zone_short_id=" << src_zone_short_id << " pg_ver=" << src_pg_ver
AWSSyncInstanceEnv& _instance) : RGWCoroutine(_sc->cct), sc(_sc),
sync_pipe(_sync_pipe), key(_key),
mtime(_mtime), instance(_instance) {}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
ldout(sc->cct, 0) << ": remove remote obj: z=" << sc->source_zone
<< " b=" <<sync_pipe.info.source_bs.bucket << " k=" << key << " mtime=" << mtime << dendl;
ElasticConfigRef _conf) : RGWCoroutine(_sc->cct),
sc(_sc), sync_env(_sc->env),
conf(_conf) {}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
- ldout(sync_env->cct, 5) << conf->id << ": get elasticsearch info for zone: " << sc->source_zone << dendl;
+ ldpp_dout(dpp, 5) << conf->id << ": get elasticsearch info for zone: " << sc->source_zone << dendl;
yield call(new RGWReadRESTResourceCR<ESInfo> (sync_env->cct,
conf->conn.get(),
sync_env->http_manager,
&(conf->default_headers),
&(conf->es_info)));
if (retcode < 0) {
- ldout(sync_env->cct, 5) << conf->id << ": get elasticsearch failed: " << retcode << dendl;
+ ldpp_dout(dpp, 5) << conf->id << ": get elasticsearch failed: " << retcode << dendl;
return set_cr_error(retcode);
}
- ldout(sync_env->cct, 5) << conf->id << ": got elastic version=" << conf->es_info.get_version_str() << dendl;
+ ldpp_dout(dpp, 5) << conf->id << ": got elastic version=" << conf->es_info.get_version_str() << dendl;
return set_cr_done();
}
return 0;
ElasticConfigRef _conf) : RGWCoroutine(_sc->cct),
sc(_sc), sync_env(_sc->env),
conf(_conf) {}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
- ldout(sc->cct, 5) << conf->id << ": put elasticsearch index for zone: " << sc->source_zone << dendl;
+ ldpp_dout(dpp, 5) << conf->id << ": put elasticsearch index for zone: " << sc->source_zone << dendl;
yield {
string path = conf->get_index_path();
std::unique_ptr<es_index_config_base> index_conf;
if (conf->es_info.version >= ES_V5) {
- ldout(sc->cct, 0) << "elasticsearch: index mapping: version >= 5" << dendl;
+ ldpp_dout(dpp, 0) << "elasticsearch: index mapping: version >= 5" << dendl;
index_conf.reset(new es_index_config<es_type_v5>(settings, conf->es_info.version));
} else {
- ldout(sc->cct, 0) << "elasticsearch: index mapping: version < 5" << dendl;
+ ldpp_dout(dpp, 0) << "elasticsearch: index mapping: version < 5" << dendl;
index_conf.reset(new es_index_config<es_type_v2>(settings, conf->es_info.version));
}
call(new RGWPutRESTResourceCR<es_index_config_base, int, _err_response> (sc->cct,
if (err_response.error.type != "index_already_exists_exception" &&
err_response.error.type != "resource_already_exists_exception") {
- ldout(sync_env->cct, 0) << "elasticsearch: failed to initialize index: response.type=" << err_response.error.type << " response.reason=" << err_response.error.reason << dendl;
+ ldpp_dout(dpp, 0) << "elasticsearch: failed to initialize index: response.type=" << err_response.error.type << " response.reason=" << err_response.error.reason << dendl;
return set_cr_error(retcode);
}
- ldout(sync_env->cct, 0) << "elasticsearch: index already exists, assuming external initialization" << dendl;
+ ldpp_dout(dpp, 0) << "elasticsearch: index already exists, assuming external initialization" << dendl;
}
return set_cr_done();
}
ElasticConfigRef _conf) : RGWCoroutine(_sc->cct),
sc(_sc), sync_env(_sc->env),
conf(_conf) {}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
yield call(new RGWElasticGetESInfoCBCR(sc, conf));
ElasticConfigRef _conf, uint64_t _versioned_epoch) : RGWStatRemoteObjCBCR(_sc, _sync_pipe.info.source_bs.bucket, _key),
sync_pipe(_sync_pipe), conf(_conf),
versioned_epoch(_versioned_epoch) {}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
- ldout(sync_env->cct, 10) << ": stat of remote obj: z=" << sc->source_zone
+ ldpp_dout(dpp, 10) << ": stat of remote obj: z=" << sc->source_zone
<< " b=" << sync_pipe.info.source_bs.bucket << " k=" << key
<< " size=" << size << " mtime=" << mtime << dendl;
ElasticConfigRef _conf) : RGWCoroutine(_sc->cct), sc(_sc), sync_env(_sc->env),
sync_pipe(_sync_pipe), key(_key),
mtime(_mtime), conf(_conf) {}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
- ldout(sync_env->cct, 10) << ": remove remote obj: z=" << sc->source_zone
+ ldpp_dout(dpp, 10) << ": remove remote obj: z=" << sc->source_zone
<< " b=" << sync_pipe.info.source_bs.bucket << " k=" << key << " mtime=" << mtime << dendl;
yield {
string path = conf->get_obj_path(sync_pipe.dest_bucket_info, key);
bool valid = es_query.compile(&err);
if (!valid) {
- ldout(s->cct, 10) << "invalid query, failed generating request json" << dendl;
+ ldpp_dout(this, 10) << "invalid query, failed generating request json" << dendl;
op_ret = -EINVAL;
return;
}
if (marker > 0) {
params.push_back(param_pair_t("from", marker_str.c_str()));
}
- ldout(s->cct, 20) << "sending request to elasticsearch, payload=" << string(in.c_str(), in.length()) << dendl;
+ ldpp_dout(this, 20) << "sending request to elasticsearch, payload=" << string(in.c_str(), in.length()) << dendl;
auto& extra_headers = es_module->get_request_headers();
- op_ret = conn->get_resource(resource, ¶ms, &extra_headers,
+ op_ret = conn->get_resource(s, resource, ¶ms, &extra_headers,
out, &in, nullptr, y);
if (op_ret < 0) {
- ldout(s->cct, 0) << "ERROR: failed to fetch resource (r=" << resource << ", ret=" << op_ret << ")" << dendl;
+ ldpp_dout(this, 0) << "ERROR: failed to fetch resource (r=" << resource << ", ret=" << op_ret << ")" << dendl;
return;
}
- ldout(s->cct, 20) << "response: " << string(out.c_str(), out.length()) << dendl;
+ ldpp_dout(this, 20) << "response: " << string(out.c_str(), out.length()) << dendl;
JSONParser jparser;
if (!jparser.parse(out.c_str(), out.length())) {
- ldout(s->cct, 0) << "ERROR: failed to parse elasticsearch response" << dendl;
+ ldpp_dout(this, 0) << "ERROR: failed to parse elasticsearch response" << dendl;
op_ret = -EINVAL;
return;
}
try {
decode_json_obj(response, &jparser);
} catch (const JSONDecoder::err& e) {
- ldout(s->cct, 0) << "ERROR: failed to decode JSON input: " << e.what() << dendl;
+ ldpp_dout(this, 0) << "ERROR: failed to decode JSON input: " << e.what() << dendl;
op_ret = -EINVAL;
return;
}
RGWHandler_REST *handler = new RGWHandler_REST_MDSearch_S3(auth_registry);
- ldout(s->cct, 20) << __func__ << " handler=" << typeid(*handler).name()
+ ldpp_dout(s, 20) << __func__ << " handler=" << typeid(*handler).name()
<< dendl;
return handler;
}
public:
RGWLogStatRemoteObjCBCR(RGWDataSyncCtx *_sc,
rgw_bucket& _src_bucket, rgw_obj_key& _key) : RGWStatRemoteObjCBCR(_sc, _src_bucket, _key) {}
- int operate() override {
- ldout(sync_env->cct, 0) << "SYNC_LOG: stat of remote obj: z=" << sc->source_zone
+ int operate(const DoutPrefixProvider *dpp) override {
+ ldpp_dout(dpp, 0) << "SYNC_LOG: stat of remote obj: z=" << sc->source_zone
<< " b=" << src_bucket << " k=" << key << " size=" << size << " mtime=" << mtime
<< " attrs=" << attrs << dendl;
return set_cr_done();
// utility function to convert the args list from string format
// (ampresend separated with equal sign) to prased structure
-RGWHTTPArgs string_to_args(const std::string& str_args) {
+RGWHTTPArgs string_to_args(const std::string& str_args, const DoutPrefixProvider *dpp) {
RGWHTTPArgs args;
args.set(str_args);
- args.parse();
+ args.parse(dpp);
return args;
}
std::string arn_topic;
RGWPubSubEndpoint::Ptr push_endpoint;
- void from_user_conf(CephContext *cct, const rgw_pubsub_sub_config& uc) {
+ void from_user_conf(CephContext *cct, const rgw_pubsub_sub_config& uc, const DoutPrefixProvider *dpp) {
name = uc.name;
topic = uc.topic;
push_endpoint_name = uc.dest.push_endpoint;
if (!push_endpoint_name.empty()) {
push_endpoint_args = uc.dest.push_endpoint_args;
try {
- push_endpoint = RGWPubSubEndpoint::create(push_endpoint_name, arn_topic, string_to_args(push_endpoint_args), cct);
- ldout(cct, 20) << "push endpoint created: " << push_endpoint->to_str() << dendl;
+ push_endpoint = RGWPubSubEndpoint::create(push_endpoint_name, arn_topic, string_to_args(push_endpoint_args, dpp), cct);
+ ldpp_dout(dpp, 20) << "push endpoint created: " << push_endpoint->to_str() << dendl;
} catch (const RGWPubSubEndpoint::configuration_error& e) {
- ldout(cct, 1) << "ERROR: failed to create push endpoint: "
+ ldpp_dout(dpp, 1) << "ERROR: failed to create push endpoint: "
<< push_endpoint_name << " due to: " << e.what() << dendl;
}
}
return true;
}
- int operate_wrapper() override {
+ int operate_wrapper(const DoutPrefixProvider *dpp) override {
reenter(&wrapper_state) {
while (!is_done()) {
- ldout(cct, 20) << __func__ << "(): operate_wrapper() -> operate()" << dendl;
- operate_ret = operate();
+ ldpp_dout(dpp, 20) << __func__ << "(): operate_wrapper() -> operate()" << dendl;
+ operate_ret = operate(dpp);
if (operate_ret < 0) {
- ldout(cct, 20) << *this << ": operate() returned r=" << operate_ret << dendl;
+ ldpp_dout(dpp, 20) << *this << ": operate() returned r=" << operate_ret << dendl;
}
if (!is_done()) {
yield;
}
}
- ldout(cct, 20) << __func__ << "(): RGWSingletonCR: operate_wrapper() done, need to wake up " << waiters.size() << " waiters" << dendl;
+ ldpp_dout(dpp, 20) << __func__ << "(): RGWSingletonCR: operate_wrapper() done, need to wake up " << waiters.size() << " waiters" << dendl;
/* we're done, can't yield anymore */
WaiterInfoRef waiter;
retention_days = conf->events_retention_days;
}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
rule.init_simple_days_rule("Pubsub Expiration", "" /* all objects in bucket */, retention_days);
try {
old_config.decode(iter);
} catch (const buffer::error& e) {
- ldpp_dout(sync_env->dpp, 0) << __func__ << "(): decode life cycle config failed" << dendl;
+ ldpp_dout(dpp, 0) << __func__ << "(): decode life cycle config failed" << dendl;
}
}
if (old_rule.get_prefix().empty() &&
old_rule.get_expiration().get_days() == retention_days &&
old_rule.is_enabled()) {
- ldpp_dout(sync_env->dpp, 20) << "no need to set lifecycle rule on bucket, existing rule matches config" << dendl;
+ ldpp_dout(dpp, 20) << "no need to set lifecycle rule on bucket, existing rule matches config" << dendl;
return set_cr_done();
}
}
yield call(new RGWBucketLifecycleConfigCR(sync_env->async_rados,
sync_env->store,
lc_config,
- sync_env->dpp));
+ dpp));
if (retcode < 0) {
- ldpp_dout(sync_env->dpp, 1) << "ERROR: failed to set lifecycle on bucket: ret=" << retcode << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to set lifecycle on bucket: ret=" << retcode << dendl;
return set_cr_error(retcode);
}
sub_conf(sub->sub_conf) {
}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
get_bucket_info.tenant = conf->user.tenant;
get_bucket_info.bucket_name = sub_conf->data_bucket_name;
yield call(new RGWGetBucketInfoCR(sync_env->async_rados,
sync_env->store,
get_bucket_info,
- sub->get_bucket_info_result));
+ sub->get_bucket_info_result,
+ dpp));
if (retcode < 0 && retcode != -ENOENT) {
- ldpp_dout(sync_env->dpp, 1) << "ERROR: failed to geting bucket info: " << "tenant="
+ ldpp_dout(dpp, 1) << "ERROR: failed to geting bucket info: " << "tenant="
<< get_bucket_info.tenant << " name=" << get_bucket_info.bucket_name << ": ret=" << retcode << dendl;
}
if (retcode == 0) {
int ret = sub->data_access->get_bucket(result->bucket_info, result->attrs, &sub->bucket);
if (ret < 0) {
- ldpp_dout(sync_env->dpp, 1) << "ERROR: data_access.get_bucket() bucket=" << result->bucket_info.bucket << " failed, ret=" << ret << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: data_access.get_bucket() bucket=" << result->bucket_info.bucket << " failed, ret=" << ret << dendl;
return set_cr_error(ret);
}
}
sub->get_bucket_info_result->bucket_info,
sub->get_bucket_info_result->attrs));
if (retcode < 0) {
- ldpp_dout(sync_env->dpp, 1) << "ERROR: failed to init lifecycle on bucket (bucket=" << sub_conf->data_bucket_name << ") ret=" << retcode << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to init lifecycle on bucket (bucket=" << sub_conf->data_bucket_name << ") ret=" << retcode << dendl;
return set_cr_error(retcode);
}
create_bucket.user_info = sub->env->data_user_info;
create_bucket.bucket_name = sub_conf->data_bucket_name;
- ldpp_dout(sync_env->dpp, 20) << "pubsub: bucket create: using user info: " << json_str("obj", *sub->env->data_user_info, true) << dendl;
+ ldpp_dout(dpp, 20) << "pubsub: bucket create: using user info: " << json_str("obj", *sub->env->data_user_info, true) << dendl;
yield call(new RGWBucketCreateLocalCR(sync_env->async_rados,
sync_env->store,
create_bucket,
- sync_env->dpp));
+ dpp));
if (retcode < 0) {
- ldpp_dout(sync_env->dpp, 1) << "ERROR: failed to create bucket: " << "tenant="
+ ldpp_dout(dpp, 1) << "ERROR: failed to create bucket: " << "tenant="
<< get_bucket_info.tenant << " name=" << get_bucket_info.bucket_name << ": ret=" << retcode << dendl;
return set_cr_error(retcode);
}
}
/* failed twice on -ENOENT, unexpected */
- ldpp_dout(sync_env->dpp, 1) << "ERROR: failed to create bucket " << "tenant=" << get_bucket_info.tenant
+ ldpp_dout(dpp, 1) << "ERROR: failed to create bucket " << "tenant=" << get_bucket_info.tenant
<< " name=" << get_bucket_info.bucket_name << dendl;
return set_cr_error(-EIO);
}
oid_prefix(sub->sub_conf->data_oid_prefix) {
}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
rgw_object_simple_put_params put_obj;
reenter(this) {
yield call(new RGWObjectSimplePutCR(sync_env->async_rados,
sync_env->store,
put_obj,
- sync_env->dpp));
+ dpp));
if (retcode < 0) {
- ldpp_dout(sync_env->dpp, 10) << "failed to store event: " << put_obj.bucket << "/" << put_obj.key << " ret=" << retcode << dendl;
+ ldpp_dout(dpp, 10) << "failed to store event: " << put_obj.bucket << "/" << put_obj.key << " ret=" << retcode << dendl;
return set_cr_error(retcode);
} else {
- ldpp_dout(sync_env->dpp, 20) << "event stored: " << put_obj.bucket << "/" << put_obj.key << dendl;
+ ldpp_dout(dpp, 20) << "event stored: " << put_obj.bucket << "/" << put_obj.key << dendl;
}
return set_cr_done();
sub_conf(_sub->sub_conf) {
}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
ceph_assert(sub_conf->push_endpoint);
yield call(sub_conf->push_endpoint->send_to_completion_async(*event.get(), sync_env));
if (retcode < 0) {
- ldout(sync_env->cct, 10) << "failed to push event: " << event->id <<
+ ldpp_dout(dpp, 10) << "failed to push event: " << event->id <<
" to endpoint: " << sub_conf->push_endpoint_name << " ret=" << retcode << dendl;
return set_cr_error(retcode);
}
- ldout(sync_env->cct, 20) << "event: " << event->id <<
+ ldpp_dout(dpp, 20) << "event: " << event->id <<
" pushed to endpoint: " << sub_conf->push_endpoint_name << dendl;
return set_cr_done();
}
env(_env),
sub_conf(std::make_shared<PSSubConfig>()),
data_access(std::make_shared<RGWDataAccess>(sync_env->store)) {
- sub_conf->from_user_conf(sync_env->cct, user_sub_conf);
+ sub_conf->from_user_conf(sync_env->cct, user_sub_conf, sync_env->dpp);
}
virtual ~PSSubscription() {
if (init_cr) {
}
~GetSubCR() { }
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
if (owner.empty()) {
- ldout(sync_env->cct, 1) << "ERROR: missing user info when getting subscription: " << sub_name << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: missing user info when getting subscription: " << sub_name << dendl;
mgr->remove_get_sub(owner, sub_name);
return set_cr_error(-EINVAL);
} else {
rgw_raw_obj obj;
ps.get_sub_meta_obj(sub_name, &obj);
bool empty_on_enoent = false;
- call(new ReadInfoCR(sync_env->async_rados, sync_env->store->svc()->sysobj,
+ call(new ReadInfoCR(dpp, sync_env->async_rados, sync_env->store->svc()->sysobj,
obj,
&user_sub_conf, empty_on_enoent));
}
yield (*ref)->call_init_cr(this);
if (retcode < 0) {
- ldout(sync_env->cct, 1) << "ERROR: failed to init subscription when getting subscription: " << sub_name << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to init subscription when getting subscription: " << sub_name << dendl;
mgr->remove_get_sub(owner, sub_name);
return set_cr_error(retcode);
}
PSEnvRef& _env) : RGWCoroutine(_sc->cct),
sc(_sc), sync_env(_sc->env),
env(_env), conf(env->conf) {}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
- ldpp_dout(sync_env->dpp, 1) << ": init pubsub config zone=" << sc->source_zone << dendl;
+ ldpp_dout(dpp, 1) << ": init pubsub config zone=" << sc->source_zone << dendl;
/* nothing to do here right now */
create_user.user = conf->user;
create_user.max_buckets = 0; /* unlimited */
create_user.display_name = "pubsub";
create_user.generate_key = false;
- yield call(new RGWUserCreateCR(sync_env->async_rados, sync_env->store, create_user, sync_env->dpp));
+ yield call(new RGWUserCreateCR(sync_env->async_rados, sync_env->store, create_user, dpp));
if (retcode < 0 && retcode != -ERR_USER_EXIST) {
- ldpp_dout(sync_env->dpp, 1) << "ERROR: failed to create rgw user: ret=" << retcode << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to create rgw user: ret=" << retcode << dendl;
return set_cr_error(retcode);
}
get_user_info.user = conf->user;
- yield call(new RGWGetUserInfoCR(sync_env->async_rados, sync_env->store, get_user_info, env->data_user_info));
+ yield call(new RGWGetUserInfoCR(sync_env->async_rados, sync_env->store, get_user_info, env->data_user_info, dpp));
if (retcode < 0) {
- ldpp_dout(sync_env->dpp, 1) << "ERROR: failed to create rgw user: ret=" << retcode << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to create rgw user: ret=" << retcode << dendl;
return set_cr_error(retcode);
}
- ldpp_dout(sync_env->dpp, 20) << "pubsub: get user info cr returned: " << json_str("obj", *env->data_user_info, true) << dendl;
+ ldpp_dout(dpp, 20) << "pubsub: get user info cr returned: " << json_str("obj", *env->data_user_info, true) << dendl;
return set_cr_done();
topics(_topics) {
*topics = std::make_shared<vector<PSTopicConfigRef> >();
}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
ps.get_bucket_meta_obj(bucket, &bucket_obj);
ps.get_meta_obj(&user_obj);
using ReadInfoCR = RGWSimpleRadosReadCR<rgw_pubsub_bucket_topics>;
yield {
bool empty_on_enoent = true;
- call(new ReadInfoCR(sync_env->async_rados, sync_env->store->svc()->sysobj,
+ call(new ReadInfoCR(dpp, sync_env->async_rados, sync_env->store->svc()->sysobj,
bucket_obj,
&bucket_topics, empty_on_enoent));
}
return set_cr_error(retcode);
}
- ldout(sync_env->cct, 20) << "RGWPSFindBucketTopicsCR(): found " << bucket_topics.topics.size() << " topics for bucket " << bucket << dendl;
+ ldpp_dout(dpp, 20) << "RGWPSFindBucketTopicsCR(): found " << bucket_topics.topics.size() << " topics for bucket " << bucket << dendl;
if (!bucket_topics.topics.empty()) {
using ReadUserTopicsInfoCR = RGWSimpleRadosReadCR<rgw_pubsub_topics>;
yield {
bool empty_on_enoent = true;
- call(new ReadUserTopicsInfoCR(sync_env->async_rados, sync_env->store->svc()->sysobj,
+ call(new ReadUserTopicsInfoCR(dpp, sync_env->async_rados, sync_env->store->svc()->sysobj,
user_obj,
&user_topics, empty_on_enoent));
}
has_subscriptions(false),
event_handled(false) {}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
- ldout(sc->cct, 20) << ": handle event: obj: z=" << sc->source_zone
+ ldpp_dout(dpp, 20) << ": handle event: obj: z=" << sc->source_zone
<< " event=" << json_str("event", *event, false)
<< " owner=" << owner << dendl;
- ldout(sc->cct, 20) << "pubsub: " << topics->size() << " topics found for path" << dendl;
+ ldpp_dout(dpp, 20) << "pubsub: " << topics->size() << " topics found for path" << dendl;
// outside caller should check that
ceph_assert(!topics->empty());
// loop over all topics related to the bucket/object
for (titer = topics->begin(); titer != topics->end(); ++titer) {
- ldout(sc->cct, 20) << ": notification for " << event->source << ": topic=" <<
+ ldpp_dout(dpp, 20) << ": notification for " << event->source << ": topic=" <<
(*titer)->name << ", has " << (*titer)->subs.size() << " subscriptions" << dendl;
// loop over all subscriptions of the topic
for (siter = (*titer)->subs.begin(); siter != (*titer)->subs.end(); ++siter) {
- ldout(sc->cct, 20) << ": subscription: " << *siter << dendl;
+ ldpp_dout(dpp, 20) << ": subscription: " << *siter << dendl;
has_subscriptions = true;
// try to read subscription configuration
yield PSManager::call_get_subscription_cr(sc, env->manager, this, owner, *siter, &sub);
if (retcode < 0) {
if (perfcounter) perfcounter->inc(l_rgw_pubsub_missing_conf);
- ldout(sc->cct, 1) << "ERROR: failed to find subscription config for subscription=" << *siter
+ ldpp_dout(dpp, 1) << "ERROR: failed to find subscription config for subscription=" << *siter
<< " ret=" << retcode << dendl;
if (retcode == -ENOENT) {
// missing subscription info should be reflected back as invalid argument
}
if (sub->sub_conf->s3_id.empty()) {
// subscription was not made by S3 compatible API
- ldout(sc->cct, 20) << "storing event for subscription=" << *siter << " owner=" << owner << " ret=" << retcode << dendl;
+ ldpp_dout(dpp, 20) << "storing event for subscription=" << *siter << " owner=" << owner << " ret=" << retcode << dendl;
yield call(PSSubscription::store_event_cr(sc, sub, event));
if (retcode < 0) {
if (perfcounter) perfcounter->inc(l_rgw_pubsub_store_fail);
- ldout(sc->cct, 1) << "ERROR: failed to store event for subscription=" << *siter << " ret=" << retcode << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to store event for subscription=" << *siter << " ret=" << retcode << dendl;
} else {
if (perfcounter) perfcounter->inc(l_rgw_pubsub_store_ok);
event_handled = true;
}
if (sub->sub_conf->push_endpoint) {
- ldout(sc->cct, 20) << "push event for subscription=" << *siter << " owner=" << owner << " ret=" << retcode << dendl;
+ ldpp_dout(dpp, 20) << "push event for subscription=" << *siter << " owner=" << owner << " ret=" << retcode << dendl;
yield call(PSSubscription::push_event_cr(sc, sub, event));
if (retcode < 0) {
if (perfcounter) perfcounter->inc(l_rgw_pubsub_push_failed);
- ldout(sc->cct, 1) << "ERROR: failed to push event for subscription=" << *siter << " ret=" << retcode << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to push event for subscription=" << *siter << " ret=" << retcode << dendl;
} else {
if (perfcounter) perfcounter->inc(l_rgw_pubsub_push_ok);
event_handled = true;
}
} else {
// subscription was made by S3 compatible API
- ldout(sc->cct, 20) << "storing s3 event for subscription=" << *siter << " owner=" << owner << " ret=" << retcode << dendl;
+ ldpp_dout(dpp, 20) << "storing s3 event for subscription=" << *siter << " owner=" << owner << " ret=" << retcode << dendl;
s3_event->configurationId = sub->sub_conf->s3_id;
s3_event->opaque_data = (*titer)->opaque_data;
yield call(PSSubscription::store_event_cr(sc, sub, s3_event));
if (retcode < 0) {
if (perfcounter) perfcounter->inc(l_rgw_pubsub_store_fail);
- ldout(sc->cct, 1) << "ERROR: failed to store s3 event for subscription=" << *siter << " ret=" << retcode << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to store s3 event for subscription=" << *siter << " ret=" << retcode << dendl;
} else {
if (perfcounter) perfcounter->inc(l_rgw_pubsub_store_ok);
event_handled = true;
}
if (sub->sub_conf->push_endpoint) {
- ldout(sc->cct, 20) << "push s3 event for subscription=" << *siter << " owner=" << owner << " ret=" << retcode << dendl;
+ ldpp_dout(dpp, 20) << "push s3 event for subscription=" << *siter << " owner=" << owner << " ret=" << retcode << dendl;
yield call(PSSubscription::push_event_cr(sc, sub, s3_event));
if (retcode < 0) {
if (perfcounter) perfcounter->inc(l_rgw_pubsub_push_failed);
- ldout(sc->cct, 1) << "ERROR: failed to push s3 event for subscription=" << *siter << " ret=" << retcode << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: failed to push s3 event for subscription=" << *siter << " ret=" << retcode << dendl;
} else {
if (perfcounter) perfcounter->inc(l_rgw_pubsub_push_ok);
event_handled = true;
versioned_epoch(_versioned_epoch),
topics(_topics) {
}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
- ldout(sc->cct, 20) << ": stat of remote obj: z=" << sc->source_zone
+ ldpp_dout(dpp, 20) << ": stat of remote obj: z=" << sc->source_zone
<< " b=" << sync_pipe.info.source_bs.bucket << " k=" << key << " size=" << size << " mtime=" << mtime
<< " attrs=" << attrs << dendl;
{
~RGWPSHandleObjCreateCR() override {}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
yield call(new RGWPSFindBucketTopicsCR(sc, env, sync_pipe.dest_bucket_info.owner,
sync_pipe.info.source_bs.bucket, key,
rgw::notify::ObjectCreated,
&topics));
if (retcode < 0) {
- ldout(sc->cct, 1) << "ERROR: RGWPSFindBucketTopicsCR returned ret=" << retcode << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: RGWPSFindBucketTopicsCR returned ret=" << retcode << dendl;
return set_cr_error(retcode);
}
if (topics->empty()) {
- ldout(sc->cct, 20) << "no topics found for " << sync_pipe.info.source_bs.bucket << "/" << key << dendl;
+ ldpp_dout(dpp, 20) << "no topics found for " << sync_pipe.info.source_bs.bucket << "/" << key << dendl;
return set_cr_done();
}
yield call(new RGWPSHandleRemoteObjCR(sc, sync_pipe, key, env, versioned_epoch, topics));
bucket(_sync_pipe.dest_bucket_info.bucket),
key(_key),
mtime(_mtime), event_type(_event_type) {}
- int operate() override {
+ int operate(const DoutPrefixProvider *dpp) override {
reenter(this) {
- ldout(sc->cct, 20) << ": remove remote obj: z=" << sc->source_zone
+ ldpp_dout(dpp, 20) << ": remove remote obj: z=" << sc->source_zone
<< " b=" << bucket << " k=" << key << " mtime=" << mtime << dendl;
yield call(new RGWPSFindBucketTopicsCR(sc, env, owner, bucket, key, event_type, &topics));
if (retcode < 0) {
- ldout(sc->cct, 1) << "ERROR: RGWPSFindBucketTopicsCR returned ret=" << retcode << dendl;
+ ldpp_dout(dpp, 1) << "ERROR: RGWPSFindBucketTopicsCR returned ret=" << retcode << dendl;
return set_cr_error(retcode);
}
if (topics->empty()) {
- ldout(sc->cct, 20) << "no topics found for " << bucket << "/" << key << dendl;
+ ldpp_dout(dpp, 20) << "no topics found for " << bucket << "/" << key << dendl;
return set_cr_done();
}
// at this point we don't know whether we need the ceph event or S3 event
bool exists;
topic_name = s->info.args.get("topic", &exists);
if (!exists) {
- ldout(s->cct, 1) << "missing required param 'topic'" << dendl;
+ ldpp_dout(this, 1) << "missing required param 'topic'" << dendl;
return -EINVAL;
}
event_id = s->info.args.get("event-id", &exists);
if (!exists) {
- ldout(s->cct, 1) << "missing required param 'event-id'" << dendl;
+ ldpp_dout(this, 1) << "missing required param 'event-id'" << dendl;
return -EINVAL;
}
return 0;
const int ret = s->info.args.get_int("max-entries", &max_entries,
RGWPubSub::Sub::DEFAULT_MAX_EVENTS);
if (ret < 0) {
- ldout(s->cct, 1) << "failed to parse 'max-entries' param" << dendl;
+ ldpp_dout(this, 1) << "failed to parse 'max-entries' param" << dendl;
return -EINVAL;
}
return 0;
bool exists;
topic_name = s->info.args.get("topic", &exists);
if (!exists) {
- ldout(s->cct, 1) << "missing required param 'topic'" << dendl;
+ ldpp_dout(this, 1) << "missing required param 'topic'" << dendl;
return -EINVAL;
}
}
rgw::notify::from_string_list(events_str, events);
if (std::find(events.begin(), events.end(), rgw::notify::UnknownEvent) != events.end()) {
- ldout(s->cct, 1) << "invalid event type in list: " << events_str << dendl;
+ ldpp_dout(this, 1) << "invalid event type in list: " << events_str << dendl;
return -EINVAL;
}
return notif_bucket_path(s->object->get_name(), bucket_name);
ps.emplace(store, s->owner.get_id().tenant);
auto b = ps->get_bucket(bucket_info.bucket);
- op_ret = b->create_notification(topic_name, events, y);
+ op_ret = b->create_notification(this, topic_name, events, y);
if (op_ret < 0) {
- ldout(s->cct, 1) << "failed to create notification for topic '" << topic_name << "', ret=" << op_ret << dendl;
+ ldpp_dout(this, 1) << "failed to create notification for topic '" << topic_name << "', ret=" << op_ret << dendl;
return;
}
- ldout(s->cct, 20) << "successfully created notification for topic '" << topic_name << "'" << dendl;
+ ldpp_dout(this, 20) << "successfully created notification for topic '" << topic_name << "'" << dendl;
}
// command: DELETE /notifications/bucket/<bucket>?topic=<topic-name>
bool exists;
topic_name = s->info.args.get("topic", &exists);
if (!exists) {
- ldout(s->cct, 1) << "missing required param 'topic'" << dendl;
+ ldpp_dout(this, 1) << "missing required param 'topic'" << dendl;
return -EINVAL;
}
return notif_bucket_path(s->object->get_name(), bucket_name);
ps.emplace(store, s->owner.get_id().tenant);
auto b = ps->get_bucket(bucket_info.bucket);
- op_ret = b->remove_notification(topic_name, y);
+ op_ret = b->remove_notification(this, topic_name, y);
if (op_ret < 0) {
- ldout(s->cct, 1) << "failed to remove notification from topic '" << topic_name << "', ret=" << op_ret << dendl;
+ ldpp_dout(s, 1) << "failed to remove notification from topic '" << topic_name << "', ret=" << op_ret << dendl;
return;
}
- ldout(s->cct, 20) << "successfully removed notification from topic '" << topic_name << "'" << dendl;
+ ldpp_dout(this, 20) << "successfully removed notification from topic '" << topic_name << "'" << dendl;
}
// command: GET /notifications/bucket/<bucket>
auto b = ps->get_bucket(bucket_info.bucket);
op_ret = b->get_topics(&result);
if (op_ret < 0) {
- ldout(s->cct, 1) << "failed to get topics, ret=" << op_ret << dendl;
+ ldpp_dout(this, 1) << "failed to get topics, ret=" << op_ret << dendl;
return;
}
}
}
}
- ldout(s->cct, 20) << __func__ << " handler=" << (handler ? typeid(*handler).name() : "<null>") << dendl;
+ ldpp_dout(s, 20) << __func__ << " handler=" << (handler ? typeid(*handler).name() : "<null>") << dendl;
return handler;
}
#define dout_context g_ceph_context
-#define dout_subsys ceph_subsys_rgw_sync
RGWSyncTraceNode::RGWSyncTraceNode(CephContext *_cct, uint64_t _handle,
const RGWSyncTraceNodeRef& _parent,
RGWSyncTraceServiceMapThread(RGWRados *_store, RGWSyncTraceManager *_manager)
: RGWRadosThread(_store, "sync-trace"), store(_store), manager(_manager) {}
- int process() override;
+ int process(const DoutPrefixProvider *dpp) override;
};
-int RGWSyncTraceServiceMapThread::process()
+int RGWSyncTraceServiceMapThread::process(const DoutPrefixProvider *dpp)
{
map<string, string> status;
status["current_sync"] = manager->get_active_names();
static std::map<std::string, std::string>* ext_mime_map;
-int rgw_init_ioctx(librados::Rados *rados, const rgw_pool& pool,
+int rgw_init_ioctx(const DoutPrefixProvider *dpp,
+ librados::Rados *rados, const rgw_pool& pool,
librados::IoCtx& ioctx, bool create,
bool mostly_omap)
{
if (r == -ENOENT && create) {
r = rados->pool_create(pool.name.c_str());
if (r == -ERANGE) {
- dout(0)
+ ldpp_dout(dpp, 0)
<< __func__
<< " ERROR: librados::Rados::pool_create returned " << cpp_strerror(-r)
<< " (this can be due to a pool or placement group misconfiguration, e.g."
stringify(bias) + "\"}",
inbl, NULL, NULL);
if (r < 0) {
- dout(10) << __func__ << " warning: failed to set pg_autoscale_bias on "
+ ldpp_dout(dpp, 10) << __func__ << " warning: failed to set pg_autoscale_bias on "
<< pool.name << dendl;
}
// set pg_num_min
stringify(min) + "\"}",
inbl, NULL, NULL);
if (r < 0) {
- dout(10) << __func__ << " warning: failed to set pg_num_min on "
+ ldpp_dout(dpp, 10) << __func__ << " warning: failed to set pg_num_min on "
<< pool.name << dendl;
}
// set recovery_priority
stringify(p) + "\"}",
inbl, NULL, NULL);
if (r < 0) {
- dout(10) << __func__ << " warning: failed to set recovery_priority on "
+ ldpp_dout(dpp, 10) << __func__ << " warning: failed to set recovery_priority on "
<< pool.name << dendl;
}
}
return 0;
}
-int rgw_put_system_obj(RGWSysObjectCtx& obj_ctx, const rgw_pool& pool, const string& oid, bufferlist& data, bool exclusive,
+int rgw_put_system_obj(const DoutPrefixProvider *dpp,
+ RGWSysObjectCtx& obj_ctx, const rgw_pool& pool, const string& oid, bufferlist& data, bool exclusive,
RGWObjVersionTracker *objv_tracker, real_time set_mtime, optional_yield y, map<string, bufferlist> *pattrs)
{
map<string,bufferlist> no_attrs;
.set_exclusive(exclusive)
.set_mtime(set_mtime)
.set_attrs(*pattrs)
- .write(data, y);
+ .write(dpp, data, y);
return ret;
}
int rgw_get_system_obj(RGWSysObjectCtx& obj_ctx, const rgw_pool& pool, const string& key, bufferlist& bl,
- RGWObjVersionTracker *objv_tracker, real_time *pmtime, optional_yield y, map<string, bufferlist> *pattrs,
+ RGWObjVersionTracker *objv_tracker, real_time *pmtime, optional_yield y, const DoutPrefixProvider *dpp, map<string, bufferlist> *pattrs,
rgw_cache_entry_info *cache_info,
boost::optional<obj_version> refresh_version)
{
int ret = rop.set_attrs(pattrs)
.set_last_mod(pmtime)
.set_objv_tracker(objv_tracker)
- .stat(y);
+ .stat(y, dpp);
if (ret < 0)
return ret;
ret = rop.set_cache_info(cache_info)
.set_refresh_version(refresh_version)
- .read(&bl, y);
+ .read(dpp, &bl, y);
if (ret == -ECANCELED) {
/* raced, restart */
if (!original_readv.empty()) {
return 0;
}
-int rgw_delete_system_obj(RGWSI_SysObj *sysobj_svc, const rgw_pool& pool, const string& oid,
+int rgw_delete_system_obj(const DoutPrefixProvider *dpp,
+ RGWSI_SysObj *sysobj_svc, const rgw_pool& pool, const string& oid,
RGWObjVersionTracker *objv_tracker, optional_yield y)
{
auto obj_ctx = sysobj_svc->init_obj_ctx();
rgw_raw_obj obj(pool, oid);
return sysobj.wop()
.set_objv_tracker(objv_tracker)
- .remove(y);
+ .remove(dpp, y);
}
thread_local bool is_asio_thread = false;
-int rgw_rados_operate(librados::IoCtx& ioctx, const std::string& oid,
+int rgw_rados_operate(const DoutPrefixProvider *dpp, librados::IoCtx& ioctx, const std::string& oid,
librados::ObjectReadOperation *op, bufferlist* pbl,
optional_yield y, int flags)
{
}
// work on asio threads should be asynchronous, so warn when they block
if (is_asio_thread) {
- dout(20) << "WARNING: blocking librados call" << dendl;
+ ldpp_dout(dpp, 20) << "WARNING: blocking librados call" << dendl;
}
return ioctx.operate(oid, op, nullptr, flags);
}
-int rgw_rados_operate(librados::IoCtx& ioctx, const std::string& oid,
+int rgw_rados_operate(const DoutPrefixProvider *dpp, librados::IoCtx& ioctx, const std::string& oid,
librados::ObjectWriteOperation *op, optional_yield y,
int flags)
{
return -ec.value();
}
if (is_asio_thread) {
- dout(20) << "WARNING: blocking librados call" << dendl;
+ ldpp_dout(dpp, 20) << "WARNING: blocking librados call" << dendl;
}
return ioctx.operate(oid, op, flags);
}
-int rgw_rados_notify(librados::IoCtx& ioctx, const std::string& oid,
+int rgw_rados_notify(const DoutPrefixProvider *dpp, librados::IoCtx& ioctx, const std::string& oid,
bufferlist& bl, uint64_t timeout_ms, bufferlist* pbl,
optional_yield y)
{
return -ec.value();
}
if (is_asio_thread) {
- dout(20) << "WARNING: blocking librados call" << dendl;
+ ldpp_dout(dpp, 20) << "WARNING: blocking librados call" << dendl;
}
return ioctx.notify2(oid, bl, timeout_ms, pbl);
}
return 0;
}
-int RGWDataAccess::Bucket::init(optional_yield y)
+int RGWDataAccess::Bucket::init(const DoutPrefixProvider *dpp, optional_yield y)
{
int ret = sd->store->getRados()->get_bucket_info(sd->store->svc(),
tenant, name,
bucket_info,
&mtime,
y,
+ dpp,
&attrs);
if (ret < 0) {
return ret;
struct obj_version;
-int rgw_init_ioctx(librados::Rados *rados, const rgw_pool& pool,
+int rgw_init_ioctx(const DoutPrefixProvider *dpp,
+ librados::Rados *rados, const rgw_pool& pool,
librados::IoCtx& ioctx,
bool create = false,
bool mostly_omap = false);
int rgw_parse_list_of_flags(struct rgw_name_to_flag *mapping,
const string& str, uint32_t *perm);
-int rgw_put_system_obj(RGWSysObjectCtx& obj_ctx, const rgw_pool& pool, const string& oid, bufferlist& data, bool exclusive,
+int rgw_put_system_obj(const DoutPrefixProvider *dpp, RGWSysObjectCtx& obj_ctx, const rgw_pool& pool, const string& oid, bufferlist& data, bool exclusive,
RGWObjVersionTracker *objv_tracker, real_time set_mtime, optional_yield y, map<string, bufferlist> *pattrs = NULL);
int rgw_get_system_obj(RGWSysObjectCtx& obj_ctx, const rgw_pool& pool, const string& key, bufferlist& bl,
- RGWObjVersionTracker *objv_tracker, real_time *pmtime, optional_yield y, map<string, bufferlist> *pattrs = NULL,
+ RGWObjVersionTracker *objv_tracker, real_time *pmtime, optional_yield y, const DoutPrefixProvider *dpp, map<string, bufferlist> *pattrs = NULL,
rgw_cache_entry_info *cache_info = NULL,
boost::optional<obj_version> refresh_version = boost::none);
-int rgw_delete_system_obj(RGWSI_SysObj *sysobj_svc, const rgw_pool& pool, const string& oid,
+int rgw_delete_system_obj(const DoutPrefixProvider *dpp,
+ RGWSI_SysObj *sysobj_svc, const rgw_pool& pool, const string& oid,
RGWObjVersionTracker *objv_tracker, optional_yield y);
const char *rgw_find_mime_by_ext(string& ext);
extern thread_local bool is_asio_thread;
/// perform the rados operation, using the yield context when given
-int rgw_rados_operate(librados::IoCtx& ioctx, const std::string& oid,
+int rgw_rados_operate(const DoutPrefixProvider *dpp, librados::IoCtx& ioctx, const std::string& oid,
librados::ObjectReadOperation *op, bufferlist* pbl,
optional_yield y, int flags = 0);
-int rgw_rados_operate(librados::IoCtx& ioctx, const std::string& oid,
+int rgw_rados_operate(const DoutPrefixProvider *dpp, librados::IoCtx& ioctx, const std::string& oid,
librados::ObjectWriteOperation *op, optional_yield y,
int flags = 0);
-int rgw_rados_notify(librados::IoCtx& ioctx, const std::string& oid,
+int rgw_rados_notify(const DoutPrefixProvider *dpp, librados::IoCtx& ioctx, const std::string& oid,
bufferlist& bl, uint64_t timeout_ms, bufferlist* pbl,
optional_yield y);
name(_name),
bucket_id(_bucket_id) {}
Bucket(RGWDataAccess *_sd) : sd(_sd) {}
- int init(optional_yield y);
+ int init(const DoutPrefixProvider *dpp, optional_yield y);
int init(const RGWBucketInfo& _bucket_info, const map<string, bufferlist>& _attrs);
public:
int get_object(const rgw_obj_key& key,
friend class Bucket;
};
- int get_bucket(const string& tenant,
+ int get_bucket(const DoutPrefixProvider *dpp,
+ const string& tenant,
const string name,
const string bucket_id,
BucketRef *bucket,
optional_yield y) {
bucket->reset(new Bucket(this, tenant, name, bucket_id));
- return (*bucket)->init(y);
+ return (*bucket)->init(dpp, y);
}
int get_bucket(const RGWBucketInfo& bucket_info,
string oid, key;
get_obj_bucket_and_oid_loc(obj, oid, key);
- ldout(s->cct, 20) << "NOTICE: head obj oid= " << oid << dendl;
+ ldpp_dout(s, 20) << "NOTICE: head obj oid= " << oid << dendl;
const set<string> obj_key{RGW_OBJ_TORRENT};
map<string, bufferlist> m;
- const int r = object->omap_get_vals_by_keys(oid, obj_key, &m);
+ const int r = object->omap_get_vals_by_keys(s, oid, obj_key, &m);
if (r < 0) {
- ldout(s->cct, 0) << "ERROR: omap_get_vals_by_keys failed: " << r << dendl;
+ ldpp_dout(s, 0) << "ERROR: omap_get_vals_by_keys failed: " << r << dendl;
return r;
}
if (m.size() != 1) {
- ldout(s->cct, 0) << "ERROR: omap key " RGW_OBJ_TORRENT " not found" << dendl;
+ ldpp_dout(s, 0) << "ERROR: omap key " RGW_OBJ_TORRENT " not found" << dendl;
return -EINVAL;
}
bl.append(std::move(m.begin()->second));
ret = save_torrent_file(y);
if (0 != ret)
{
- ldout(s->cct, 0) << "ERROR: failed to save_torrent_file() ret= "<< ret << dendl;
+ ldpp_dout(s, 0) << "ERROR: failed to save_torrent_file() ret= "<< ret << dendl;
return ret;
}
if (announce_list.empty())
{
- ldout(s->cct, 5) << "NOTICE: announce_list is empty " << dendl;
+ ldpp_dout(s, 5) << "NOTICE: announce_list is empty " << dendl;
return;
}
auto obj_ctx = store->svc()->sysobj->init_obj_ctx();
auto sysobj = obj_ctx.get_obj(raw_obj);
- op_ret = sysobj.omap().set(key, bl, y);
+ op_ret = sysobj.omap().set(s, key, bl, y);
if (op_ret < 0)
{
- ldout(s->cct, 0) << "ERROR: failed to omap_set() op_ret = " << op_ret << dendl;
+ ldpp_dout(s, 0) << "ERROR: failed to omap_set() op_ret = " << op_ret << dendl;
return op_ret;
}
stop();
}
- int start() {
- int r = store->getRados()->get_raw_obj_ref(obj, &ref);
+ int start(const DoutPrefixProvider *dpp) {
+ int r = store->getRados()->get_raw_obj_ref(dpp, obj, &ref);
if (r < 0) {
return r;
}
}
}
if (r < 0) {
- lderr(store->ctx()) << "Failed to watch " << ref.obj
+ ldpp_dout(dpp, -1) << "Failed to watch " << ref.obj
<< " with " << cpp_strerror(-r) << dendl;
ref.pool.ioctx().close();
return r;
}
- ldout(store->ctx(), 10) << "Watching " << ref.obj.oid << dendl;
+ ldpp_dout(dpp, 10) << "Watching " << ref.obj.oid << dendl;
return 0;
}
/// concurrent requests
class BucketTrimShardCollectCR : public RGWShardCollectCR {
static constexpr int MAX_CONCURRENT_SHARDS = 16;
+ const DoutPrefixProvider *dpp;
rgw::sal::RGWRadosStore *const store;
const RGWBucketInfo& bucket_info;
const std::vector<std::string>& markers; //< shard markers to trim
size_t i{0}; //< index of current shard marker
public:
- BucketTrimShardCollectCR(rgw::sal::RGWRadosStore *store, const RGWBucketInfo& bucket_info,
+ BucketTrimShardCollectCR(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store, const RGWBucketInfo& bucket_info,
const std::vector<std::string>& markers)
: RGWShardCollectCR(store->ctx(), MAX_CONCURRENT_SHARDS),
- store(store), bucket_info(bucket_info), markers(markers)
+ dpp(dpp), store(store), bucket_info(bucket_info), markers(markers)
{}
bool spawn_next() override;
};
// skip empty markers
if (!marker.empty()) {
- ldout(cct, 10) << "trimming bilog shard " << shard_id
+ ldpp_dout(dpp, 10) << "trimming bilog shard " << shard_id
<< " of " << bucket_info.bucket << " at marker " << marker << dendl;
- spawn(new RGWRadosBILogTrimCR(store, bucket_info, shard_id,
+ spawn(new RGWRadosBILogTrimCR(dpp, store, bucket_info, shard_id,
std::string{}, marker),
false);
return true;
RGWBucketInfo _bucket_info;
const RGWBucketInfo *pbucket_info; //< pointer to bucket instance info to locate bucket indices
int child_ret = 0;
+ const DoutPrefixProvider *dpp;
using StatusShards = std::vector<rgw_bucket_shard_sync_info>;
std::vector<StatusShards> peer_status; //< sync status for each peer
public:
BucketTrimInstanceCR(rgw::sal::RGWRadosStore *store, RGWHTTPManager *http,
BucketTrimObserver *observer,
- const std::string& bucket_instance)
+ const std::string& bucket_instance,
+ const DoutPrefixProvider *dpp)
: RGWCoroutine(store->ctx()), store(store),
http(http), observer(observer),
bucket_instance(bucket_instance),
- zone_id(store->svc()->zone->get_zone().id) {
+ zone_id(store->svc()->zone->get_zone().id),
+ dpp(dpp) {
rgw_bucket_parse_bucket_key(cct, bucket_instance, &bucket, nullptr);
source_policy = make_shared<rgw_bucket_get_sync_policy_result>();
}
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
};
-int BucketTrimInstanceCR::operate()
+int BucketTrimInstanceCR::operate(const DoutPrefixProvider *dpp)
{
reenter(this) {
- ldout(cct, 4) << "starting trim on bucket=" << bucket_instance << dendl;
+ ldpp_dout(dpp, 4) << "starting trim on bucket=" << bucket_instance << dendl;
get_policy_params.zone = zone_id;
get_policy_params.bucket = bucket;
yield call(new RGWBucketGetSyncPolicyHandlerCR(store->svc()->rados->get_async_processor(),
store,
get_policy_params,
- source_policy));
+ source_policy,
+ dpp));
if (retcode < 0) {
if (retcode != -ENOENT) {
- ldout(cct, 0) << "ERROR: failed to fetch policy handler for bucket=" << bucket << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to fetch policy handler for bucket=" << bucket << dendl;
}
return set_cr_error(retcode);
auto ziter = zone_conn_map.find(zid);
if (ziter == zone_conn_map.end()) {
- ldout(cct, 0) << "WARNING: no connection to zone " << zid << ", can't trim bucket: " << bucket << dendl;
+ ldpp_dout(dpp, 0) << "WARNING: no connection to zone " << zid << ", can't trim bucket: " << bucket << dendl;
return set_cr_error(-ECANCELED);
}
using StatusCR = RGWReadRESTResourceCR<StatusShards>;
retcode = take_min_status(cct, peer_status.begin(), peer_status.end(),
&min_markers);
if (retcode < 0) {
- ldout(cct, 4) << "failed to correlate bucket sync status from peers" << dendl;
+ ldpp_dout(dpp, 4) << "failed to correlate bucket sync status from peers" << dendl;
return set_cr_error(retcode);
}
// trim shards with a ShardCollectCR
- ldout(cct, 10) << "trimming bilogs for bucket=" << pbucket_info->bucket
+ ldpp_dout(dpp, 10) << "trimming bilogs for bucket=" << pbucket_info->bucket
<< " markers=" << min_markers << ", shards=" << min_markers.size() << dendl;
set_status("trimming bilog shards");
- yield call(new BucketTrimShardCollectCR(store, *pbucket_info, min_markers));
+ yield call(new BucketTrimShardCollectCR(dpp, store, *pbucket_info, min_markers));
// ENODATA just means there were no keys to trim
if (retcode == -ENODATA) {
retcode = 0;
}
if (retcode < 0) {
- ldout(cct, 4) << "failed to trim bilog shards: "
+ ldpp_dout(dpp, 4) << "failed to trim bilog shards: "
<< cpp_strerror(retcode) << dendl;
return set_cr_error(retcode);
}
BucketTrimObserver *const observer;
std::vector<std::string>::const_iterator bucket;
std::vector<std::string>::const_iterator end;
+ const DoutPrefixProvider *dpp;
public:
BucketTrimInstanceCollectCR(rgw::sal::RGWRadosStore *store, RGWHTTPManager *http,
BucketTrimObserver *observer,
const std::vector<std::string>& buckets,
- int max_concurrent)
+ int max_concurrent,
+ const DoutPrefixProvider *dpp)
: RGWShardCollectCR(store->ctx(), max_concurrent),
store(store), http(http), observer(observer),
- bucket(buckets.begin()), end(buckets.end())
+ bucket(buckets.begin()), end(buckets.end()),
+ dpp(dpp)
{}
bool spawn_next() override;
};
if (bucket == end) {
return false;
}
- spawn(new BucketTrimInstanceCR(store, http, observer, *bucket), false);
+ spawn(new BucketTrimInstanceCR(store, http, observer, *bucket, dpp), false);
++bucket;
return true;
}
const std::string start_marker;
MetadataListCallback callback;
- int _send_request() override;
+ int _send_request(const DoutPrefixProvider *dpp) override;
public:
AsyncMetadataList(CephContext *cct, RGWCoroutine *caller,
RGWAioCompletionNotifier *cn, RGWMetadataManager *mgr,
{}
};
-int AsyncMetadataList::_send_request()
+int AsyncMetadataList::_send_request(const DoutPrefixProvider *dpp)
{
void* handle = nullptr;
std::list<std::string> keys;
std::string marker;
// start a listing at the given marker
- int r = mgr->list_keys_init(section, start_marker, &handle);
+ int r = mgr->list_keys_init(dpp, section, start_marker, &handle);
if (r == -EINVAL) {
// restart with empty marker below
} else if (r < 0) {
- ldout(cct, 10) << "failed to init metadata listing: "
+ ldpp_dout(dpp, 10) << "failed to init metadata listing: "
<< cpp_strerror(r) << dendl;
return r;
} else {
- ldout(cct, 20) << "starting metadata listing at " << start_marker << dendl;
+ ldpp_dout(dpp, 20) << "starting metadata listing at " << start_marker << dendl;
// release the handle when scope exits
auto g = make_scope_guard([=] { mgr->list_keys_complete(handle); });
// get the next key and marker
r = mgr->list_keys_next(handle, 1, keys, &truncated);
if (r < 0) {
- ldout(cct, 10) << "failed to list metadata: "
+ ldpp_dout(dpp, 10) << "failed to list metadata: "
<< cpp_strerror(r) << dendl;
return r;
}
// restart the listing from the beginning (empty marker)
handle = nullptr;
- r = mgr->list_keys_init(section, "", &handle);
+ r = mgr->list_keys_init(dpp, section, "", &handle);
if (r < 0) {
- ldout(cct, 10) << "failed to restart metadata listing: "
+ ldpp_dout(dpp, 10) << "failed to restart metadata listing: "
<< cpp_strerror(r) << dendl;
return r;
}
- ldout(cct, 20) << "restarting metadata listing" << dendl;
+ ldpp_dout(dpp, 20) << "restarting metadata listing" << dendl;
// release the handle when scope exits
auto g = make_scope_guard([=] { mgr->list_keys_complete(handle); });
// get the next key and marker
r = mgr->list_keys_next(handle, 1, keys, &truncated);
if (r < 0) {
- ldout(cct, 10) << "failed to list metadata: "
+ ldpp_dout(dpp, 10) << "failed to list metadata: "
<< cpp_strerror(r) << dendl;
return r;
}
request_cleanup();
}
- int send_request() override {
+ int send_request(const DoutPrefixProvider *dpp) override {
req = new AsyncMetadataList(cct, this, stack->create_completion_notifier(),
mgr, section, start_marker, callback);
async_rados->queue(req);
BucketTrimStatus status;
RGWObjVersionTracker objv; //< version tracker for trim status object
std::string last_cold_marker; //< position for next trim marker
+ const DoutPrefixProvider *dpp;
static const std::string section; //< metadata section for bucket instances
public:
BucketTrimCR(rgw::sal::RGWRadosStore *store, RGWHTTPManager *http,
const BucketTrimConfig& config, BucketTrimObserver *observer,
- const rgw_raw_obj& obj)
+ const rgw_raw_obj& obj, const DoutPrefixProvider *dpp)
: RGWCoroutine(store->ctx()), store(store), http(http), config(config),
- observer(observer), obj(obj), counter(config.counter_size)
+ observer(observer), obj(obj), counter(config.counter_size), dpp(dpp)
{}
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
};
const std::string BucketTrimCR::section{"bucket.instance"};
-int BucketTrimCR::operate()
+int BucketTrimCR::operate(const DoutPrefixProvider *dpp)
{
reenter(this) {
start_time = ceph::mono_clock::now();
if (config.buckets_per_interval) {
// query watch/notify for hot buckets
- ldout(cct, 10) << "fetching active bucket counters" << dendl;
+ ldpp_dout(dpp, 10) << "fetching active bucket counters" << dendl;
set_status("fetching active bucket counters");
yield {
// request the top bucket counters from each peer gateway
¬ify_replies));
}
if (retcode < 0) {
- ldout(cct, 10) << "failed to fetch peer bucket counters" << dendl;
+ ldpp_dout(dpp, 10) << "failed to fetch peer bucket counters" << dendl;
return set_cr_error(retcode);
}
// read BucketTrimStatus for marker position
set_status("reading trim status");
using ReadStatus = RGWSimpleRadosReadCR<BucketTrimStatus>;
- yield call(new ReadStatus(store->svc()->rados->get_async_processor(), store->svc()->sysobj, obj,
+ yield call(new ReadStatus(dpp, store->svc()->rados->get_async_processor(), store->svc()->sysobj, obj,
&status, true, &objv));
if (retcode < 0) {
- ldout(cct, 10) << "failed to read bilog trim status: "
+ ldpp_dout(dpp, 10) << "failed to read bilog trim status: "
<< cpp_strerror(retcode) << dendl;
return set_cr_error(retcode);
}
if (status.marker == "MAX") {
status.marker.clear(); // restart at the beginning
}
- ldout(cct, 10) << "listing cold buckets from marker="
+ ldpp_dout(dpp, 10) << "listing cold buckets from marker="
<< status.marker << dendl;
set_status("listing cold buckets for trim");
// trim bucket instances with limited concurrency
set_status("trimming buckets");
- ldout(cct, 4) << "collected " << buckets.size() << " buckets for trim" << dendl;
+ ldpp_dout(dpp, 4) << "collected " << buckets.size() << " buckets for trim" << dendl;
yield call(new BucketTrimInstanceCollectCR(store, http, observer, buckets,
- config.concurrent_buckets));
+ config.concurrent_buckets, dpp));
// ignore errors from individual buckets
// write updated trim status
if (!last_cold_marker.empty() && status.marker != last_cold_marker) {
set_status("writing updated trim status");
status.marker = std::move(last_cold_marker);
- ldout(cct, 20) << "writing bucket trim marker=" << status.marker << dendl;
+ ldpp_dout(dpp, 20) << "writing bucket trim marker=" << status.marker << dendl;
using WriteStatus = RGWSimpleRadosWriteCR<BucketTrimStatus>;
- yield call(new WriteStatus(store->svc()->rados->get_async_processor(), store->svc()->sysobj, obj,
+ yield call(new WriteStatus(dpp, store->svc()->rados->get_async_processor(), store->svc()->sysobj, obj,
status, &objv));
if (retcode < 0) {
- ldout(cct, 4) << "failed to write updated trim status: "
+ ldpp_dout(dpp, 4) << "failed to write updated trim status: "
<< cpp_strerror(retcode) << dendl;
return set_cr_error(retcode);
}
return set_cr_error(retcode);
}
- ldout(cct, 4) << "bucket index log processing completed in "
+ ldpp_dout(dpp, 4) << "bucket index log processing completed in "
<< ceph::mono_clock::now() - start_time << dendl;
return set_cr_done();
}
const rgw_raw_obj& obj;
const std::string name{"trim"}; //< lock name
const std::string cookie;
+ const DoutPrefixProvider *dpp;
public:
BucketTrimPollCR(rgw::sal::RGWRadosStore *store, RGWHTTPManager *http,
const BucketTrimConfig& config,
- BucketTrimObserver *observer, const rgw_raw_obj& obj)
+ BucketTrimObserver *observer, const rgw_raw_obj& obj,
+ const DoutPrefixProvider *dpp)
: RGWCoroutine(store->ctx()), store(store), http(http),
config(config), observer(observer), obj(obj),
- cookie(RGWSimpleRadosLockCR::gen_random_cookie(cct))
- {}
+ cookie(RGWSimpleRadosLockCR::gen_random_cookie(cct)),
+ dpp(dpp) {}
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
};
-int BucketTrimPollCR::operate()
+int BucketTrimPollCR::operate(const DoutPrefixProvider *dpp)
{
reenter(this) {
for (;;) {
}
set_status("trimming");
- yield call(new BucketTrimCR(store, http, config, observer, obj));
+ yield call(new BucketTrimCR(store, http, config, observer, obj, dpp));
if (retcode < 0) {
// on errors, unlock so other gateways can try
set_status("unlocking");
int BucketTrimManager::init()
{
- return impl->watcher.start();
+ return impl->watcher.start(this);
}
void BucketTrimManager::on_bucket_changed(const std::string_view& bucket)
RGWCoroutine* BucketTrimManager::create_bucket_trim_cr(RGWHTTPManager *http)
{
return new BucketTrimPollCR(impl->store, http, impl->config,
- impl.get(), impl->status_obj);
+ impl.get(), impl->status_obj, this);
}
RGWCoroutine* BucketTrimManager::create_admin_bucket_trim_cr(RGWHTTPManager *http)
{
// return the trim coroutine without any polling
return new BucketTrimCR(impl->store, http, impl->config,
- impl.get(), impl->status_obj);
+ impl.get(), impl->status_obj, this);
+}
+
+CephContext* BucketTrimManager::get_cct() const
+{
+ return impl->store->ctx();
+}
+
+unsigned BucketTrimManager::get_subsys() const
+{
+ return dout_subsys;
+}
+
+std::ostream& BucketTrimManager::gen_prefix(std::ostream& out) const
+{
+ return out << "rgw bucket trim manager: ";
}
} // namespace rgw
#include "include/common_fwd.h"
#include "include/encoding.h"
#include "common/ceph_time.h"
+#include "common/dout.h"
class RGWCoroutine;
class RGWHTTPManager;
/// input: the frequency of entries read from the data changes log, and a global
/// listing of the bucket.instance metadata. This allows us to trim active
/// buckets quickly, while also ensuring that all buckets will eventually trim
-class BucketTrimManager : public BucketChangeObserver {
+class BucketTrimManager : public BucketChangeObserver, public DoutPrefixProvider {
class Impl;
std::unique_ptr<Impl> impl;
public:
/// create a coroutine to trim buckets directly via radosgw-admin
RGWCoroutine* create_admin_bucket_trim_cr(RGWHTTPManager *http);
+
+ CephContext *get_cct() const override;
+ unsigned get_subsys() const;
+ std::ostream& gen_prefix(std::ostream& out) const;
};
/// provides persistent storage for the trim manager's current position in the
namespace {
class DatalogTrimImplCR : public RGWSimpleCoroutine {
+ const DoutPrefixProvider *dpp;
rgw::sal::RGWRadosStore *store;
boost::intrusive_ptr<RGWAioCompletionNotifier> cn;
int shard;
std::string* last_trim_marker;
public:
- DatalogTrimImplCR(rgw::sal::RGWRadosStore* store, int shard,
+ DatalogTrimImplCR(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore* store, int shard,
const std::string& marker, std::string* last_trim_marker)
- : RGWSimpleCoroutine(store->ctx()), store(store), shard(shard),
+ : RGWSimpleCoroutine(store->ctx()), dpp(dpp), store(store), shard(shard),
marker(marker), last_trim_marker(last_trim_marker) {
set_description() << "Datalog trim shard=" << shard
<< " marker=" << marker;
}
- int send_request() override {
+ int send_request(const DoutPrefixProvider *dpp) override {
set_status() << "sending request";
cn = stack->create_completion_notifier();
- return store->svc()->datalog_rados->trim_entries(shard, marker,
+ return store->svc()->datalog_rados->trim_entries(dpp, shard, marker,
cn->completion());
}
int request_complete() override {
int r = cn->completion()->get_return_value();
- ldout(cct, 20) << __PRETTY_FUNCTION__ << "(): trim of shard=" << shard
+ ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << "(): trim of shard=" << shard
<< " marker=" << marker << " returned r=" << r << dendl;
set_status() << "request complete; ret=" << r;
class DataLogTrimCR : public RGWCoroutine {
using TrimCR = DatalogTrimImplCR;
+ const DoutPrefixProvider *dpp;
rgw::sal::RGWRadosStore *store;
RGWHTTPManager *http;
const int num_shards;
int ret{0};
public:
- DataLogTrimCR(rgw::sal::RGWRadosStore *store, RGWHTTPManager *http,
+ DataLogTrimCR(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *store, RGWHTTPManager *http,
int num_shards, std::vector<std::string>& last_trim)
- : RGWCoroutine(store->ctx()), store(store), http(http),
+ : RGWCoroutine(store->ctx()), dpp(dpp), store(store), http(http),
num_shards(num_shards),
zone_id(store->svc()->zone->get_zone().id),
peer_status(store->svc()->zone->get_zone_data_notify_to_map().size()),
last_trim(last_trim)
{}
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
};
-int DataLogTrimCR::operate()
+int DataLogTrimCR::operate(const DoutPrefixProvider *dpp)
{
reenter(this) {
- ldout(cct, 10) << "fetching sync status for zone " << zone_id << dendl;
+ ldpp_dout(dpp, 10) << "fetching sync status for zone " << zone_id << dendl;
set_status("fetching sync status");
yield {
// query data sync status from each sync peer
auto p = peer_status.begin();
for (auto& c : store->svc()->zone->get_zone_data_notify_to_map()) {
- ldout(cct, 20) << "query sync status from " << c.first << dendl;
+ ldpp_dout(dpp, 20) << "query sync status from " << c.first << dendl;
using StatusCR = RGWReadRESTResourceCR<rgw_data_sync_status>;
spawn(new StatusCR(cct, c.second, http, "/admin/log/", params, &*p),
false);
drain_all();
if (ret < 0) {
- ldout(cct, 4) << "failed to fetch sync status from all peers" << dendl;
+ ldpp_dout(dpp, 4) << "failed to fetch sync status from all peers" << dendl;
return set_cr_error(ret);
}
- ldout(cct, 10) << "trimming log shards" << dendl;
+ ldpp_dout(dpp, 10) << "trimming log shards" << dendl;
set_status("trimming log shards");
yield {
// determine the minimum marker for each shard
if (m <= last_trim[i]) {
continue;
}
- ldout(cct, 10) << "trimming log shard " << i
+ ldpp_dout(dpp, 10) << "trimming log shard " << i
<< " at marker=" << m
<< " last_trim=" << last_trim[i] << dendl;
- spawn(new TrimCR(store, i, m, &last_trim[i]),
+ spawn(new TrimCR(dpp, store, i, m, &last_trim[i]),
true);
}
}
return 0;
}
-RGWCoroutine* create_admin_data_log_trim_cr(rgw::sal::RGWRadosStore *store,
+RGWCoroutine* create_admin_data_log_trim_cr(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *store,
RGWHTTPManager *http,
int num_shards,
std::vector<std::string>& markers)
{
- return new DataLogTrimCR(store, http, num_shards, markers);
+ return new DataLogTrimCR(dpp, store, http, num_shards, markers);
}
class DataLogTrimPollCR : public RGWCoroutine {
+ const DoutPrefixProvider *dpp;
rgw::sal::RGWRadosStore *store;
RGWHTTPManager *http;
const int num_shards;
std::vector<std::string> last_trim; //< last trimmed marker per shard
public:
- DataLogTrimPollCR(rgw::sal::RGWRadosStore *store, RGWHTTPManager *http,
+ DataLogTrimPollCR(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *store, RGWHTTPManager *http,
int num_shards, utime_t interval)
- : RGWCoroutine(store->ctx()), store(store), http(http),
+ : RGWCoroutine(store->ctx()), dpp(dpp), store(store), http(http),
num_shards(num_shards), interval(interval),
lock_oid(store->svc()->datalog_rados->get_oid(0, 0)),
lock_cookie(RGWSimpleRadosLockCR::gen_random_cookie(cct)),
last_trim(num_shards)
{}
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
};
-int DataLogTrimPollCR::operate()
+int DataLogTrimPollCR::operate(const DoutPrefixProvider *dpp)
{
reenter(this) {
for (;;) {
interval.sec()));
if (retcode < 0) {
// if the lock is already held, go back to sleep and try again later
- ldout(cct, 4) << "failed to lock " << lock_oid << ", trying again in "
+ ldpp_dout(dpp, 4) << "failed to lock " << lock_oid << ", trying again in "
<< interval.sec() << "s" << dendl;
continue;
}
set_status("trimming");
- yield call(new DataLogTrimCR(store, http, num_shards, last_trim));
+ yield call(new DataLogTrimCR(dpp, store, http, num_shards, last_trim));
// note that the lock is not released. this is intentional, as it avoids
// duplicating this work in other gateways
return 0;
}
-RGWCoroutine* create_data_log_trim_cr(rgw::sal::RGWRadosStore *store,
+RGWCoroutine* create_data_log_trim_cr(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *store,
RGWHTTPManager *http,
int num_shards, utime_t interval)
{
- return new DataLogTrimPollCR(store, http, num_shards, interval);
+ return new DataLogTrimPollCR(dpp, store, http, num_shards, interval);
}
#include <string>
#include <vector>
+#include "common/dout.h"
+
class RGWCoroutine;
class RGWRados;
class RGWHTTPManager;
} }
// DataLogTrimCR factory function
-extern RGWCoroutine* create_data_log_trim_cr(rgw::sal::RGWRadosStore *store,
+extern RGWCoroutine* create_data_log_trim_cr(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *store,
RGWHTTPManager *http,
int num_shards, utime_t interval);
// factory function for datalog trim via radosgw-admin
-RGWCoroutine* create_admin_data_log_trim_cr(rgw::sal::RGWRadosStore *store,
+RGWCoroutine* create_admin_data_log_trim_cr(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *store,
RGWHTTPManager *http,
int num_shards,
std::vector<std::string>& markers);
RGWSI_Zone *zone;
RGWSI_MDLog *mdlog;
} svc;
+ const DoutPrefixProvider *dpp;
rgw::sal::RGWRadosStore *const store;
RGWMetadataManager *const metadata;
RGWObjVersionTracker objv;
epoch_t *last_trim_epoch; //< update last trim on success
public:
- PurgePeriodLogsCR(rgw::sal::RGWRadosStore *store, epoch_t realm_epoch, epoch_t *last_trim)
- : RGWCoroutine(store->ctx()), store(store), metadata(store->ctl()->meta.mgr),
+ PurgePeriodLogsCR(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *store, epoch_t realm_epoch, epoch_t *last_trim)
+ : RGWCoroutine(store->ctx()), dpp(dpp), store(store), metadata(store->ctl()->meta.mgr),
realm_epoch(realm_epoch), last_trim_epoch(last_trim) {
svc.zone = store->svc()->zone;
svc.mdlog = store->svc()->mdlog;
}
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
};
-int PurgePeriodLogsCR::operate()
+int PurgePeriodLogsCR::operate(const DoutPrefixProvider *dpp)
{
reenter(this) {
// read our current oldest log period
- yield call(svc.mdlog->read_oldest_log_period_cr(&cursor, &objv));
+ yield call(svc.mdlog->read_oldest_log_period_cr(dpp, &cursor, &objv));
if (retcode < 0) {
return set_cr_error(retcode);
}
ceph_assert(cursor);
- ldout(cct, 20) << "oldest log realm_epoch=" << cursor.get_epoch()
+ ldpp_dout(dpp, 20) << "oldest log realm_epoch=" << cursor.get_epoch()
<< " period=" << cursor.get_period().get_id() << dendl;
// trim -up to- the given realm_epoch
while (cursor.get_epoch() < realm_epoch) {
- ldout(cct, 4) << "purging log shards for realm_epoch=" << cursor.get_epoch()
+ ldpp_dout(dpp, 4) << "purging log shards for realm_epoch=" << cursor.get_epoch()
<< " period=" << cursor.get_period().get_id() << dendl;
yield {
const auto mdlog = svc.mdlog->get_log(cursor.get_period().get_id());
call(new PurgeLogShardsCR(store, mdlog, pool, num_shards));
}
if (retcode < 0) {
- ldout(cct, 1) << "failed to remove log shards: "
+ ldpp_dout(dpp, 1) << "failed to remove log shards: "
<< cpp_strerror(retcode) << dendl;
return set_cr_error(retcode);
}
- ldout(cct, 10) << "removed log shards for realm_epoch=" << cursor.get_epoch()
+ ldpp_dout(dpp, 10) << "removed log shards for realm_epoch=" << cursor.get_epoch()
<< " period=" << cursor.get_period().get_id() << dendl;
// update our mdlog history
- yield call(svc.mdlog->trim_log_period_cr(cursor, &objv));
+ yield call(svc.mdlog->trim_log_period_cr(dpp, cursor, &objv));
if (retcode == -ENOENT) {
// must have raced to update mdlog history. return success and allow the
// winner to continue purging
- ldout(cct, 10) << "already removed log shards for realm_epoch=" << cursor.get_epoch()
+ ldpp_dout(dpp, 10) << "already removed log shards for realm_epoch=" << cursor.get_epoch()
<< " period=" << cursor.get_period().get_id() << dendl;
return set_cr_done();
} else if (retcode < 0) {
- ldout(cct, 1) << "failed to remove log shards for realm_epoch="
+ ldpp_dout(dpp, 1) << "failed to remove log shards for realm_epoch="
<< cursor.get_epoch() << " period=" << cursor.get_period().get_id()
<< " with: " << cpp_strerror(retcode) << dendl;
return set_cr_error(retcode);
if (stable <= last_trim) {
// already trimmed
- ldout(cct, 20) << "skipping log shard " << shard_id
+ ldpp_dout(env.dpp, 20) << "skipping log shard " << shard_id
<< " at marker=" << stable
<< " last_trim=" << last_trim
<< " realm_epoch=" << sync_status.sync_info.realm_epoch << dendl;
mdlog->get_shard_oid(shard_id, oid);
- ldout(cct, 10) << "trimming log shard " << shard_id
+ ldpp_dout(env.dpp, 10) << "trimming log shard " << shard_id
<< " at marker=" << stable
<< " last_trim=" << last_trim
<< " realm_epoch=" << sync_status.sync_info.realm_epoch << dendl;
- spawn(new RGWSyncLogTrimCR(env.store, oid, stable, &last_trim), false);
+ spawn(new RGWSyncLogTrimCR(env.dpp, env.store, oid, stable, &last_trim), false);
shard_id++;
return true;
}
: RGWCoroutine(env.store->ctx()), env(env)
{}
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
};
-int MetaMasterTrimCR::operate()
+int MetaMasterTrimCR::operate(const DoutPrefixProvider *dpp)
{
reenter(this) {
// TODO: detect this and fail before we spawn the trim thread?
if (env.connections.empty()) {
- ldout(cct, 4) << "no peers, exiting" << dendl;
+ ldpp_dout(dpp, 4) << "no peers, exiting" << dendl;
return set_cr_done();
}
- ldout(cct, 10) << "fetching sync status for zone " << env.zone << dendl;
+ ldpp_dout(dpp, 10) << "fetching sync status for zone " << env.zone << dendl;
// query mdlog sync status from peers
yield call(new MetaMasterStatusCollectCR(env));
// must get a successful reply from all peers to consider trimming
if (ret < 0) {
- ldout(cct, 4) << "failed to fetch sync status from all peers" << dendl;
+ ldpp_dout(dpp, 4) << "failed to fetch sync status from all peers" << dendl;
return set_cr_error(ret);
}
ret = take_min_status(env.store->ctx(), env.peer_status.begin(),
env.peer_status.end(), &min_status);
if (ret < 0) {
- ldout(cct, 4) << "failed to calculate min sync status from peers" << dendl;
+ ldpp_dout(dpp, 4) << "failed to calculate min sync status from peers" << dendl;
return set_cr_error(ret);
}
yield {
auto store = env.store;
auto epoch = min_status.sync_info.realm_epoch;
- ldout(cct, 4) << "realm epoch min=" << epoch
+ ldpp_dout(dpp, 4) << "realm epoch min=" << epoch
<< " current=" << env.current.get_epoch()<< dendl;
if (epoch > env.last_trim_epoch + 1) {
// delete any prior mdlog periods
- spawn(new PurgePeriodLogsCR(store, epoch, &env.last_trim_epoch), true);
+ spawn(new PurgePeriodLogsCR(dpp, store, epoch, &env.last_trim_epoch), true);
} else {
- ldout(cct, 10) << "mdlogs already purged up to realm_epoch "
+ ldpp_dout(dpp, 10) << "mdlogs already purged up to realm_epoch "
<< env.last_trim_epoch << dendl;
}
period_id(period_id), shard_id(shard_id), last_trim(last_trim)
{}
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
};
-int MetaPeerTrimShardCR::operate()
+int MetaPeerTrimShardCR::operate(const DoutPrefixProvider *dpp)
{
reenter(this) {
// query master's first mdlog entry for this shard
yield call(create_list_remote_mdlog_shard_cr(&env, period_id, shard_id,
"", 1, &result));
if (retcode < 0) {
- ldpp_dout(env.dpp, 5) << "failed to read first entry from master's mdlog shard "
+ ldpp_dout(dpp, 5) << "failed to read first entry from master's mdlog shard "
<< shard_id << " for period " << period_id
<< ": " << cpp_strerror(retcode) << dendl;
return set_cr_error(retcode);
// this empty reply. query the mdlog shard info to read its max timestamp,
// then retry the listing to make sure it's still empty before trimming to
// that
- ldpp_dout(env.dpp, 10) << "empty master mdlog shard " << shard_id
+ ldpp_dout(dpp, 10) << "empty master mdlog shard " << shard_id
<< ", reading last timestamp from shard info" << dendl;
// read the mdlog shard info for the last timestamp
yield call(create_read_remote_mdlog_shard_info_cr(&env, period_id, shard_id, &info));
if (retcode < 0) {
- ldpp_dout(env.dpp, 5) << "failed to read info from master's mdlog shard "
+ ldpp_dout(dpp, 5) << "failed to read info from master's mdlog shard "
<< shard_id << " for period " << period_id
<< ": " << cpp_strerror(retcode) << dendl;
return set_cr_error(retcode);
if (ceph::real_clock::is_zero(info.last_update)) {
return set_cr_done(); // nothing to trim
}
- ldpp_dout(env.dpp, 10) << "got mdlog shard info with last update="
+ ldpp_dout(dpp, 10) << "got mdlog shard info with last update="
<< info.last_update << dendl;
// re-read the master's first mdlog entry to make sure it hasn't changed
yield call(create_list_remote_mdlog_shard_cr(&env, period_id, shard_id,
"", 1, &result));
if (retcode < 0) {
- ldpp_dout(env.dpp, 5) << "failed to read first entry from master's mdlog shard "
+ ldpp_dout(dpp, 5) << "failed to read first entry from master's mdlog shard "
<< shard_id << " for period " << period_id
<< ": " << cpp_strerror(retcode) << dendl;
return set_cr_error(retcode);
}
if (stable <= *last_trim) {
- ldpp_dout(env.dpp, 10) << "skipping log shard " << shard_id
+ ldpp_dout(dpp, 10) << "skipping log shard " << shard_id
<< " at timestamp=" << stable
<< " last_trim=" << *last_trim << dendl;
return set_cr_done();
}
- ldpp_dout(env.dpp, 10) << "trimming log shard " << shard_id
+ ldpp_dout(dpp, 10) << "trimming log shard " << shard_id
<< " at timestamp=" << stable
<< " last_trim=" << *last_trim << dendl;
yield {
std::string oid;
mdlog->get_shard_oid(shard_id, oid);
- call(new RGWRadosTimelogTrimCR(env.store, oid, real_time{}, stable, "", ""));
+ call(new RGWRadosTimelogTrimCR(dpp, env.store, oid, real_time{}, stable, "", ""));
}
if (retcode < 0 && retcode != -ENODATA) {
- ldpp_dout(env.dpp, 1) << "failed to trim mdlog shard " << shard_id
+ ldpp_dout(dpp, 1) << "failed to trim mdlog shard " << shard_id
<< ": " << cpp_strerror(retcode) << dendl;
return set_cr_error(retcode);
}
public:
explicit MetaPeerTrimCR(PeerTrimEnv& env) : RGWCoroutine(env.store->ctx()), env(env) {}
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
};
-int MetaPeerTrimCR::operate()
+int MetaPeerTrimCR::operate(const DoutPrefixProvider *dpp)
{
reenter(this) {
- ldout(cct, 10) << "fetching master mdlog info" << dendl;
+ ldpp_dout(dpp, 10) << "fetching master mdlog info" << dendl;
yield {
// query mdlog_info from master for oldest_log_period
rgw_http_param_pair params[] = {
"/admin/log/", params, &mdlog_info));
}
if (retcode < 0) {
- ldout(cct, 4) << "failed to read mdlog info from master" << dendl;
+ ldpp_dout(dpp, 4) << "failed to read mdlog info from master" << dendl;
return set_cr_error(retcode);
}
// use master's shard count instead
if (mdlog_info.realm_epoch > env.last_trim_epoch + 1) {
// delete any prior mdlog periods
- yield call(new PurgePeriodLogsCR(env.store, mdlog_info.realm_epoch,
+ yield call(new PurgePeriodLogsCR(dpp, env.store, mdlog_info.realm_epoch,
&env.last_trim_epoch));
} else {
- ldout(cct, 10) << "mdlogs already purged through realm_epoch "
+ ldpp_dout(dpp, 10) << "mdlogs already purged through realm_epoch "
<< env.last_trim_epoch << dendl;
}
cookie(RGWSimpleRadosLockCR::gen_random_cookie(cct))
{}
- int operate() override;
+ int operate(const DoutPrefixProvider *dpp) override;
};
-int MetaTrimPollCR::operate()
+int MetaTrimPollCR::operate(const DoutPrefixProvider *dpp)
{
reenter(this) {
for (;;) {
formatter->close_section(); // categories
}
-int RGWUsage::show(RGWRados *store, const rgw_user& uid, const string& bucket_name, uint64_t start_epoch,
+int RGWUsage::show(const DoutPrefixProvider *dpp, RGWRados *store, const rgw_user& uid, const string& bucket_name, uint64_t start_epoch,
uint64_t end_epoch, bool show_log_entries, bool show_log_sum, map<string, bool> *categories,
RGWFormatterFlusher& flusher)
{
bool user_section_open = false;
map<string, rgw_usage_log_entry> summary_map;
while (is_truncated) {
- int ret = store->read_usage(uid, bucket_name, start_epoch, end_epoch, max_entries,
+ int ret = store->read_usage(dpp, uid, bucket_name, start_epoch, end_epoch, max_entries,
&is_truncated, usage_iter, usage);
if (ret == -ENOENT) {
return 0;
}
-int RGWUsage::trim(RGWRados *store, const rgw_user& uid, const string& bucket_name, uint64_t start_epoch,
+int RGWUsage::trim(const DoutPrefixProvider *dpp, RGWRados *store, const rgw_user& uid, const string& bucket_name, uint64_t start_epoch,
uint64_t end_epoch)
{
- return store->trim_usage(uid, bucket_name, start_epoch, end_epoch);
+ return store->trim_usage(dpp, uid, bucket_name, start_epoch, end_epoch);
}
-int RGWUsage::clear(RGWRados *store)
+int RGWUsage::clear(const DoutPrefixProvider *dpp, RGWRados *store)
{
- return store->clear_usage();
+ return store->clear_usage(dpp);
}
#include <map>
#include "common/Formatter.h"
+#include "common/dout.h"
#include "rgw_formats.h"
#include "rgw_user.h"
class RGWUsage
{
public:
- static int show(RGWRados *store, const rgw_user& uid, const string& bucket_name, uint64_t start_epoch,
+ static int show(const DoutPrefixProvider *dpp, RGWRados *store, const rgw_user& uid, const string& bucket_name, uint64_t start_epoch,
uint64_t end_epoch, bool show_log_entries, bool show_log_sum,
std::map<std::string, bool> *categories, RGWFormatterFlusher& flusher);
- static int trim(RGWRados *store, const rgw_user& uid, const string& bucket_name, uint64_t start_epoch,
+ static int trim(const DoutPrefixProvider *dpp, RGWRados *store, const rgw_user& uid, const string& bucket_name, uint64_t start_epoch,
uint64_t end_epoch);
- static int clear(RGWRados *store);
+ static int clear(const DoutPrefixProvider *dpp, RGWRados *store);
};
info.access_keys.clear();
}
-int rgw_user_sync_all_stats(rgw::sal::RGWRadosStore *store,
+int rgw_user_sync_all_stats(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *store,
const rgw_user& user_id, optional_yield y)
{
rgw::sal::RGWBucketList user_buckets;
int ret;
do {
- ret = user.list_buckets(marker, string(), max_entries, false, user_buckets, y);
+ ret = user.list_buckets(dpp, marker, string(), max_entries, false, user_buckets, y);
if (ret < 0) {
- ldout(cct, 0) << "failed to read user buckets: ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "failed to read user buckets: ret=" << ret << dendl;
return ret;
}
auto& buckets = user_buckets.get_buckets();
auto& bucket = i->second;
- ret = bucket->get_bucket_info(y);
+ ret = bucket->get_bucket_info(dpp, y);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: could not read bucket info: bucket=" << bucket << " ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: could not read bucket info: bucket=" << bucket << " ret=" << ret << dendl;
continue;
}
- ret = bucket->sync_user_stats(y);
+ ret = bucket->sync_user_stats(dpp, y);
if (ret < 0) {
ldout(cct, 0) << "ERROR: could not sync bucket stats: ret=" << ret << dendl;
return ret;
}
- ret = bucket->check_bucket_shards();
+ ret = bucket->check_bucket_shards(dpp);
if (ret < 0) {
- ldout(cct, 0) << "ERROR in check_bucket_shards: " << cpp_strerror(-ret)<< dendl;
+ ldpp_dout(dpp, 0) << "ERROR in check_bucket_shards: " << cpp_strerror(-ret)<< dendl;
}
}
} while (user_buckets.is_truncated());
- ret = store->ctl()->user->complete_flush_stats(user.get_user(), y);
+ ret = store->ctl()->user->complete_flush_stats(dpp, user.get_user(), y);
if (ret < 0) {
cerr << "ERROR: failed to complete syncing user stats: ret=" << ret << std::endl;
return ret;
return 0;
}
-int rgw_user_get_all_buckets_stats(rgw::sal::RGWRadosStore *store,
+int rgw_user_get_all_buckets_stats(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store,
const rgw_user& user_id,
map<string, cls_user_bucket_entry>& buckets_usage_map,
optional_yield y)
do {
rgw::sal::RGWBucketList buckets;
- ret = rgw_read_user_buckets(store, user_id, buckets, marker,
+ ret = rgw_read_user_buckets(dpp, store, user_id, buckets, marker,
string(), max_entries, false, y);
if (ret < 0) {
- ldout(cct, 0) << "failed to read user buckets: ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "failed to read user buckets: ret=" << ret << dendl;
return ret;
}
auto& m = buckets.get_buckets();
marker = i.first;
auto& bucket_ent = i.second;
- ret = bucket_ent->read_bucket_stats(y);
+ ret = bucket_ent->read_bucket_stats(dpp, y);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: could not get bucket stats: ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: could not get bucket stats: ret=" << ret << dendl;
return ret;
}
cls_user_bucket_entry entry;
* Save the given user information to storage.
* Returns: 0 on success, -ERR# on failure.
*/
-int rgw_store_user_info(RGWUserCtl *user_ctl,
+int rgw_store_user_info(const DoutPrefixProvider *dpp,
+ RGWUserCtl *user_ctl,
RGWUserInfo& info,
RGWUserInfo *old_info,
RGWObjVersionTracker *objv_tracker,
optional_yield y,
map<string, bufferlist> *pattrs)
{
- return user_ctl->store_info(info, y,
+ return user_ctl->store_info(dpp, info, y,
RGWUserCtl::PutParams()
.set_old_info(old_info)
.set_objv_tracker(objv_tracker)
* Given a uid, finds the user info associated with it.
* returns: 0 on success, -ERR# on failure (including nonexistence)
*/
-int rgw_get_user_info_by_uid(RGWUserCtl *user_ctl,
+int rgw_get_user_info_by_uid(const DoutPrefixProvider *dpp,
+ RGWUserCtl *user_ctl,
const rgw_user& uid,
RGWUserInfo& info,
optional_yield y,
rgw_cache_entry_info * const cache_info,
map<string, bufferlist> * const pattrs)
{
- return user_ctl->get_info_by_uid(uid, &info, y,
+ return user_ctl->get_info_by_uid(dpp, uid, &info, y,
RGWUserCtl::GetParams()
.set_objv_tracker(objv_tracker)
.set_mtime(pmtime)
* Given an email, finds the user info associated with it.
* returns: 0 on success, -ERR# on failure (including nonexistence)
*/
-int rgw_get_user_info_by_email(RGWUserCtl *user_ctl, string& email,
+int rgw_get_user_info_by_email(const DoutPrefixProvider *dpp,
+ RGWUserCtl *user_ctl, string& email,
RGWUserInfo& info, optional_yield y,
RGWObjVersionTracker *objv_tracker,
real_time *pmtime)
{
- return user_ctl->get_info_by_email(email, &info, y,
+ return user_ctl->get_info_by_email(dpp, email, &info, y,
RGWUserCtl::GetParams()
.set_objv_tracker(objv_tracker)
.set_mtime(pmtime));
* Given an swift username, finds the user_info associated with it.
* returns: 0 on success, -ERR# on failure (including nonexistence)
*/
-int rgw_get_user_info_by_swift(RGWUserCtl *user_ctl,
+int rgw_get_user_info_by_swift(const DoutPrefixProvider *dpp,
+ RGWUserCtl *user_ctl,
const string& swift_name,
RGWUserInfo& info, /* out */
optional_yield y,
RGWObjVersionTracker * const objv_tracker,
real_time * const pmtime)
{
- return user_ctl->get_info_by_swift(swift_name, &info, y,
+ return user_ctl->get_info_by_swift(dpp, swift_name, &info, y,
RGWUserCtl::GetParams()
.set_objv_tracker(objv_tracker)
.set_mtime(pmtime));
* Given an access key, finds the user info associated with it.
* returns: 0 on success, -ERR# on failure (including nonexistence)
*/
-extern int rgw_get_user_info_by_access_key(RGWUserCtl *user_ctl,
+extern int rgw_get_user_info_by_access_key(const DoutPrefixProvider *dpp,
+ RGWUserCtl *user_ctl,
const std::string& access_key,
RGWUserInfo& info,
optional_yield y,
RGWObjVersionTracker* objv_tracker,
real_time *pmtime)
{
- return user_ctl->get_info_by_access_key(access_key, &info, y,
+ return user_ctl->get_info_by_access_key(dpp, access_key, &info, y,
RGWUserCtl::GetParams()
.set_objv_tracker(objv_tracker)
.set_mtime(pmtime));
}
// Generate a new random key
-int RGWAccessKeyPool::generate_key(RGWUserAdminOpState& op_state,
+int RGWAccessKeyPool::generate_key(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state,
optional_yield y, std::string *err_msg)
{
std::string id;
if (!id.empty()) {
switch (key_type) {
case KEY_TYPE_SWIFT:
- if (rgw_get_user_info_by_swift(user_ctl, id, duplicate_check, y) >= 0) {
+ if (rgw_get_user_info_by_swift(dpp, user_ctl, id, duplicate_check, y) >= 0) {
set_err_msg(err_msg, "existing swift key in RGW system:" + id);
return -ERR_KEY_EXIST;
}
break;
case KEY_TYPE_S3:
- if (rgw_get_user_info_by_access_key(user_ctl, id, duplicate_check, y) >= 0) {
+ if (rgw_get_user_info_by_access_key(dpp, user_ctl, id, duplicate_check, y) >= 0) {
set_err_msg(err_msg, "existing S3 key in RGW system:" + id);
return -ERR_KEY_EXIST;
}
if (!validate_access_key(id))
continue;
- } while (!rgw_get_user_info_by_access_key(user_ctl, id, duplicate_check, y));
+ } while (!rgw_get_user_info_by_access_key(dpp, user_ctl, id, duplicate_check, y));
}
if (key_type == KEY_TYPE_SWIFT) {
}
// check that the access key doesn't exist
- if (rgw_get_user_info_by_swift(user_ctl, id, duplicate_check, y) >= 0) {
+ if (rgw_get_user_info_by_swift(dpp, user_ctl, id, duplicate_check, y) >= 0) {
set_err_msg(err_msg, "cannot create existing swift key");
return -ERR_KEY_EXIST;
}
return 0;
}
-int RGWAccessKeyPool::execute_add(RGWUserAdminOpState& op_state,
+int RGWAccessKeyPool::execute_add(const DoutPrefixProvider *dpp,
+ RGWUserAdminOpState& op_state,
std::string *err_msg, bool defer_user_update,
optional_yield y)
{
switch (key_op) {
case GENERATE_KEY:
- ret = generate_key(op_state, y, &subprocess_msg);
+ ret = generate_key(dpp, op_state, y, &subprocess_msg);
break;
case MODIFY_KEY:
ret = modify_key(op_state, &subprocess_msg);
// store the updated info
if (!defer_user_update)
- ret = user->update(op_state, err_msg, y);
+ ret = user->update(dpp, op_state, err_msg, y);
if (ret < 0)
return ret;
return 0;
}
-int RGWAccessKeyPool::add(RGWUserAdminOpState& op_state, optional_yield y,
+int RGWAccessKeyPool::add(const DoutPrefixProvider *dpp,
+ RGWUserAdminOpState& op_state, optional_yield y,
std::string *err_msg)
{
- return add(op_state, err_msg, false, y);
+ return add(dpp, op_state, err_msg, false, y);
}
-int RGWAccessKeyPool::add(RGWUserAdminOpState& op_state, std::string *err_msg,
+int RGWAccessKeyPool::add(const DoutPrefixProvider *dpp,
+ RGWUserAdminOpState& op_state, std::string *err_msg,
bool defer_user_update, optional_yield y)
{
int ret;
return ret;
}
- ret = execute_add(op_state, &subprocess_msg, defer_user_update, y);
+ ret = execute_add(dpp, op_state, &subprocess_msg, defer_user_update, y);
if (ret < 0) {
set_err_msg(err_msg, "unable to add access key, " + subprocess_msg);
return ret;
return 0;
}
-int RGWAccessKeyPool::execute_remove(RGWUserAdminOpState& op_state,
+int RGWAccessKeyPool::execute_remove(const DoutPrefixProvider *dpp,
+ RGWUserAdminOpState& op_state,
std::string *err_msg,
bool defer_user_update,
optional_yield y)
keys_map->erase(kiter);
if (!defer_user_update)
- ret = user->update(op_state, err_msg, y);
+ ret = user->update(dpp, op_state, err_msg, y);
if (ret < 0)
return ret;
return 0;
}
-int RGWAccessKeyPool::remove(RGWUserAdminOpState& op_state, optional_yield y,
+int RGWAccessKeyPool::remove(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, optional_yield y,
std::string *err_msg)
{
- return remove(op_state, err_msg, false, y);
+ return remove(dpp, op_state, err_msg, false, y);
}
-int RGWAccessKeyPool::remove(RGWUserAdminOpState& op_state,
+int RGWAccessKeyPool::remove(const DoutPrefixProvider *dpp,
+ RGWUserAdminOpState& op_state,
std::string *err_msg, bool defer_user_update,
optional_yield y)
{
return ret;
}
- ret = execute_remove(op_state, &subprocess_msg, defer_user_update, y);
+ ret = execute_remove(dpp, op_state, &subprocess_msg, defer_user_update, y);
if (ret < 0) {
set_err_msg(err_msg, "unable to remove access key, " + subprocess_msg);
return ret;
}
// remove all keys associated with a subuser
-int RGWAccessKeyPool::remove_subuser_keys(RGWUserAdminOpState& op_state,
+int RGWAccessKeyPool::remove_subuser_keys(const DoutPrefixProvider *dpp,
+ RGWUserAdminOpState& op_state,
std::string *err_msg,
bool defer_user_update,
optional_yield y)
}
if (!defer_user_update)
- ret = user->update(op_state, err_msg, y);
+ ret = user->update(dpp, op_state, err_msg, y);
if (ret < 0)
return ret;
return 0;
}
-int RGWSubUserPool::execute_add(RGWUserAdminOpState& op_state,
+int RGWSubUserPool::execute_add(const DoutPrefixProvider *dpp,
+ RGWUserAdminOpState& op_state,
std::string *err_msg, bool defer_user_update,
optional_yield y)
{
// assumes key should be created
if (op_state.has_key_op()) {
- ret = user->keys.add(op_state, &subprocess_msg, true, y);
+ ret = user->keys.add(dpp, op_state, &subprocess_msg, true, y);
if (ret < 0) {
set_err_msg(err_msg, "unable to create subuser key, " + subprocess_msg);
return ret;
// attempt to save the subuser
if (!defer_user_update)
- ret = user->update(op_state, err_msg, y);
+ ret = user->update(dpp, op_state, err_msg, y);
if (ret < 0)
return ret;
return 0;
}
-int RGWSubUserPool::add(RGWUserAdminOpState& op_state, optional_yield y,
+int RGWSubUserPool::add(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, optional_yield y,
std::string *err_msg)
{
- return add(op_state, err_msg, false, y);
+ return add(dpp, op_state, err_msg, false, y);
}
-int RGWSubUserPool::add(RGWUserAdminOpState& op_state, std::string *err_msg, bool defer_user_update, optional_yield y)
+int RGWSubUserPool::add(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, std::string *err_msg, bool defer_user_update, optional_yield y)
{
std::string subprocess_msg;
int ret;
op_state.set_gen_secret();
}
- ret = execute_add(op_state, &subprocess_msg, defer_user_update, y);
+ ret = execute_add(dpp, op_state, &subprocess_msg, defer_user_update, y);
if (ret < 0) {
set_err_msg(err_msg, "unable to create subuser, " + subprocess_msg);
return ret;
return 0;
}
-int RGWSubUserPool::execute_remove(RGWUserAdminOpState& op_state,
+int RGWSubUserPool::execute_remove(const DoutPrefixProvider *dpp,
+ RGWUserAdminOpState& op_state,
std::string *err_msg, bool defer_user_update,
optional_yield y)
{
}
// always purge all associate keys
- user->keys.remove_subuser_keys(op_state, &subprocess_msg, true, y);
+ user->keys.remove_subuser_keys(dpp, op_state, &subprocess_msg, true, y);
// remove the subuser from the user info
subuser_map->erase(siter);
// attempt to save the subuser
if (!defer_user_update)
- ret = user->update(op_state, err_msg, y);
+ ret = user->update(dpp, op_state, err_msg, y);
if (ret < 0)
return ret;
return 0;
}
-int RGWSubUserPool::remove(RGWUserAdminOpState& op_state, optional_yield y,
+int RGWSubUserPool::remove(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, optional_yield y,
std::string *err_msg)
{
- return remove(op_state, err_msg, false, y);
+ return remove(dpp, op_state, err_msg, false, y);
}
-int RGWSubUserPool::remove(RGWUserAdminOpState& op_state, std::string *err_msg,
+int RGWSubUserPool::remove(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, std::string *err_msg,
bool defer_user_update, optional_yield y)
{
std::string subprocess_msg;
return ret;
}
- ret = execute_remove(op_state, &subprocess_msg, defer_user_update, y);
+ ret = execute_remove(dpp, op_state, &subprocess_msg, defer_user_update, y);
if (ret < 0) {
set_err_msg(err_msg, "unable to remove subuser, " + subprocess_msg);
return ret;
return 0;
}
-int RGWSubUserPool::execute_modify(RGWUserAdminOpState& op_state, std::string *err_msg, bool defer_user_update, optional_yield y)
+int RGWSubUserPool::execute_modify(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, std::string *err_msg, bool defer_user_update, optional_yield y)
{
int ret = 0;
std::string subprocess_msg;
subuser = siter->second;
if (op_state.has_key_op()) {
- ret = user->keys.add(op_state, &subprocess_msg, true, y);
+ ret = user->keys.add(dpp, op_state, &subprocess_msg, true, y);
if (ret < 0) {
set_err_msg(err_msg, "unable to create subuser keys, " + subprocess_msg);
return ret;
// attempt to save the subuser
if (!defer_user_update)
- ret = user->update(op_state, err_msg, y);
+ ret = user->update(dpp, op_state, err_msg, y);
if (ret < 0)
return ret;
return 0;
}
-int RGWSubUserPool::modify(RGWUserAdminOpState& op_state, optional_yield y, std::string *err_msg)
+int RGWSubUserPool::modify(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, optional_yield y, std::string *err_msg)
{
- return RGWSubUserPool::modify(op_state, y, err_msg, false);
+ return RGWSubUserPool::modify(dpp, op_state, y, err_msg, false);
}
-int RGWSubUserPool::modify(RGWUserAdminOpState& op_state, optional_yield y, std::string *err_msg, bool defer_user_update)
+int RGWSubUserPool::modify(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, optional_yield y, std::string *err_msg, bool defer_user_update)
{
std::string subprocess_msg;
int ret;
return ret;
}
- ret = execute_modify(op_state, &subprocess_msg, defer_user_update, y);
+ ret = execute_modify(dpp, op_state, &subprocess_msg, defer_user_update, y);
if (ret < 0) {
set_err_msg(err_msg, "unable to modify subuser, " + subprocess_msg);
return ret;
return 0;
}
-int RGWUserCapPool::add(RGWUserAdminOpState& op_state, optional_yield y,
+int RGWUserCapPool::add(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, optional_yield y,
std::string *err_msg)
{
- return add(op_state, err_msg, false, y);
+ return add(dpp, op_state, err_msg, false, y);
}
-int RGWUserCapPool::add(RGWUserAdminOpState& op_state, std::string *err_msg,
+int RGWUserCapPool::add(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, std::string *err_msg,
bool defer_save, optional_yield y)
{
int ret = 0;
}
if (!defer_save)
- ret = user->update(op_state, err_msg, y);
+ ret = user->update(dpp, op_state, err_msg, y);
if (ret < 0)
return ret;
return 0;
}
-int RGWUserCapPool::remove(RGWUserAdminOpState& op_state, optional_yield y,
+int RGWUserCapPool::remove(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, optional_yield y,
std::string *err_msg)
{
- return remove(op_state, err_msg, false, y);
+ return remove(dpp, op_state, err_msg, false, y);
}
-int RGWUserCapPool::remove(RGWUserAdminOpState& op_state, std::string *err_msg,
+int RGWUserCapPool::remove(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, std::string *err_msg,
bool defer_save, optional_yield y)
{
int ret = 0;
}
if (!defer_save)
- ret = user->update(op_state, err_msg, y);
+ ret = user->update(dpp, op_state, err_msg, y);
if (ret < 0)
return ret;
init_default();
}
-int RGWUser::init(rgw::sal::RGWRadosStore *storage,
+int RGWUser::init(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *storage,
RGWUserAdminOpState& op_state, optional_yield y)
{
init_default();
if (ret < 0)
return ret;
- ret = init(op_state, y);
+ ret = init(dpp, op_state, y);
if (ret < 0)
return ret;
return 0;
}
-int RGWUser::init(RGWUserAdminOpState& op_state, optional_yield y)
+int RGWUser::init(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, optional_yield y)
{
bool found = false;
std::string swift_user;
}
if (!user_id.empty() && (user_id.compare(RGW_USER_ANON_ID) != 0)) {
- found = (rgw_get_user_info_by_uid(user_ctl, user_id, user_info, y, &op_state.objv) >= 0);
+ found = (rgw_get_user_info_by_uid(dpp, user_ctl, user_id, user_info, y, &op_state.objv) >= 0);
op_state.found_by_uid = found;
}
if (store->ctx()->_conf.get_val<bool>("rgw_user_unique_email")) {
if (!user_email.empty() && !found) {
- found = (rgw_get_user_info_by_email(user_ctl, user_email, user_info, y, &op_state.objv) >= 0);
+ found = (rgw_get_user_info_by_email(dpp, user_ctl, user_email, user_info, y, &op_state.objv) >= 0);
op_state.found_by_email = found;
}
}
if (!swift_user.empty() && !found) {
- found = (rgw_get_user_info_by_swift(user_ctl, swift_user, user_info, y, &op_state.objv) >= 0);
+ found = (rgw_get_user_info_by_swift(dpp, user_ctl, swift_user, user_info, y, &op_state.objv) >= 0);
op_state.found_by_key = found;
}
if (!access_key.empty() && !found) {
- found = (rgw_get_user_info_by_access_key(user_ctl, access_key, user_info, y, &op_state.objv) >= 0);
+ found = (rgw_get_user_info_by_access_key(dpp, user_ctl, access_key, user_info, y, &op_state.objv) >= 0);
op_state.found_by_key = found;
}
return 0;
}
-int RGWUser::update(RGWUserAdminOpState& op_state, std::string *err_msg,
+int RGWUser::update(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, std::string *err_msg,
optional_yield y)
{
int ret;
RGWUserInfo *pold_info = (is_populated() ? &old_info : nullptr);
- ret = rgw_store_user_info(user_ctl, user_info, pold_info, &op_state.objv,
+ ret = rgw_store_user_info(dpp, user_ctl, user_info, pold_info, &op_state.objv,
real_time(), false, y);
if (ret < 0) {
set_err_msg(err_msg, "unable to store user info");
}
}
-int RGWUser::execute_rename(RGWUserAdminOpState& op_state, std::string *err_msg, optional_yield y)
+int RGWUser::execute_rename(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, std::string *err_msg, optional_yield y)
{
int ret;
bool populated = op_state.is_populated();
}
if (!populated) {
- ret = init(op_state, y);
+ ret = init(dpp, op_state, y);
if (ret < 0) {
set_err_msg(err_msg, "unable to retrieve user info");
return ret;
RGWObjVersionTracker objv;
const bool exclusive = !op_state.get_overwrite_new_user(); // overwrite if requested
- ret = user_ctl->store_info(stub_user_info, y,
+ ret = user_ctl->store_info(dpp, stub_user_info, y,
RGWUserCtl::PutParams()
.set_objv_tracker(&objv)
.set_exclusive(exclusive));
rgw::sal::RGWBucketList buckets;
do {
- ret = old_user.list_buckets(marker, "", max_buckets, false, buckets, y);
+ ret = old_user.list_buckets(dpp, marker, "", max_buckets, false, buckets, y);
if (ret < 0) {
set_err_msg(err_msg, "unable to list user buckets");
return ret;
auto& bucket = it->second;
marker = it->first;
- ret = bucket->get_bucket_info(y);
+ ret = bucket->get_bucket_info(dpp, y);
if (ret < 0) {
set_err_msg(err_msg, "failed to fetch bucket info for bucket=" + bucket->get_name());
return ret;
}
- ret = bucket->set_acl(policy_instance, y);
+ ret = bucket->set_acl(dpp, policy_instance, y);
if (ret < 0) {
set_err_msg(err_msg, "failed to set acl on bucket " + bucket->get_name());
return ret;
}
- ret = bucket->link(&new_user, y);
+ ret = bucket->link(dpp, &new_user, y);
if (ret < 0) {
set_err_msg(err_msg, "failed to link bucket " + bucket->get_name());
return ret;
}
- ret = bucket->chown(&new_user, &old_user, y);
+ ret = bucket->chown(&new_user, &old_user, y, dpp);
if (ret < 0) {
set_err_msg(err_msg, "failed to run bucket chown" + cpp_strerror(-ret));
return ret;
rename_swift_keys(new_user.get_user(), user_info.swift_keys);
- return update(op_state, err_msg, y);
+ return update(dpp, op_state, err_msg, y);
}
-int RGWUser::execute_add(RGWUserAdminOpState& op_state, std::string *err_msg,
+int RGWUser::execute_add(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, std::string *err_msg,
optional_yield y)
{
std::string subprocess_msg;
// see if we need to add an access key
if (op_state.has_key_op()) {
- ret = keys.add(op_state, &subprocess_msg, defer_user_update, y);
+ ret = keys.add(dpp, op_state, &subprocess_msg, defer_user_update, y);
if (ret < 0) {
set_err_msg(err_msg, "unable to create access key, " + subprocess_msg);
return ret;
// see if we need to add some caps
if (op_state.has_caps_op()) {
- ret = caps.add(op_state, &subprocess_msg, defer_user_update, y);
+ ret = caps.add(dpp, op_state, &subprocess_msg, defer_user_update, y);
if (ret < 0) {
set_err_msg(err_msg, "unable to add user capabilities, " + subprocess_msg);
return ret;
}
}
- ret = update(op_state, err_msg, y);
+ ret = update(dpp, op_state, err_msg, y);
if (ret < 0)
return ret;
}
-int RGWUser::add(RGWUserAdminOpState& op_state, optional_yield y, std::string *err_msg)
+int RGWUser::add(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, optional_yield y, std::string *err_msg)
{
std::string subprocess_msg;
int ret;
return ret;
}
- ret = execute_add(op_state, &subprocess_msg, y);
+ ret = execute_add(dpp, op_state, &subprocess_msg, y);
if (ret < 0) {
set_err_msg(err_msg, "unable to create user, " + subprocess_msg);
return ret;
return 0;
}
-int RGWUser::rename(RGWUserAdminOpState& op_state, optional_yield y, std::string *err_msg)
+int RGWUser::rename(RGWUserAdminOpState& op_state, optional_yield y, const DoutPrefixProvider *dpp, std::string *err_msg)
{
std::string subprocess_msg;
int ret;
return ret;
}
- ret = execute_rename(op_state, &subprocess_msg, y);
+ ret = execute_rename(dpp, op_state, &subprocess_msg, y);
if (ret < 0) {
set_err_msg(err_msg, "unable to rename user, " + subprocess_msg);
return ret;
return 0;
}
-int RGWUser::execute_remove(RGWUserAdminOpState& op_state, std::string *err_msg, optional_yield y)
+int RGWUser::execute_remove(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, std::string *err_msg, optional_yield y)
{
int ret;
CephContext *cct = store->ctx();
size_t max_buckets = cct->_conf->rgw_list_buckets_max_chunk;
do {
- ret = rgw_read_user_buckets(store, uid, buckets, marker, string(),
+ ret = rgw_read_user_buckets(dpp, store, uid, buckets, marker, string(),
max_buckets, false, y);
if (ret < 0) {
set_err_msg(err_msg, "unable to read user bucket info");
std::string prefix, delimiter;
for (auto it = m.begin(); it != m.end(); ++it) {
- ret = it->second->remove_bucket(true, prefix, delimiter, false, nullptr, y);
+ ret = it->second->remove_bucket(dpp, true, prefix, delimiter, false, nullptr, y);
if (ret < 0) {
set_err_msg(err_msg, "unable to delete user data");
return ret;
} while (buckets.is_truncated());
- ret = user_ctl->remove_info(user_info, y, RGWUserCtl::RemoveParams()
+ ret = user_ctl->remove_info(dpp, user_info, y, RGWUserCtl::RemoveParams()
.set_objv_tracker(&op_state.objv));
if (ret < 0) {
set_err_msg(err_msg, "unable to remove user from RADOS");
return 0;
}
-int RGWUser::remove(RGWUserAdminOpState& op_state, optional_yield y, std::string *err_msg)
+int RGWUser::remove(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, optional_yield y, std::string *err_msg)
{
std::string subprocess_msg;
int ret;
return ret;
}
- ret = execute_remove(op_state, &subprocess_msg, y);
+ ret = execute_remove(dpp, op_state, &subprocess_msg, y);
if (ret < 0) {
set_err_msg(err_msg, "unable to remove user, " + subprocess_msg);
return ret;
return 0;
}
-int RGWUser::execute_modify(RGWUserAdminOpState& op_state, std::string *err_msg, optional_yield y)
+int RGWUser::execute_modify(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, std::string *err_msg, optional_yield y)
{
bool populated = op_state.is_populated();
int ret = 0;
// if the user hasn't already been populated...attempt to
if (!populated) {
- ret = init(op_state, y);
+ ret = init(dpp, op_state, y);
if (ret < 0) {
set_err_msg(err_msg, "unable to retrieve user info");
return ret;
if (!op_email.empty()) {
// make sure we are not adding a duplicate email
if (old_email != op_email) {
- ret = rgw_get_user_info_by_email(user_ctl, op_email, duplicate_check,y );
+ ret = rgw_get_user_info_by_email(dpp, user_ctl, op_email, duplicate_check,y );
if (ret >= 0 && duplicate_check.user_id.compare(user_id) != 0) {
set_err_msg(err_msg, "cannot add duplicate email");
return -ERR_EMAIL_EXIST;
}
user_info.user_email = op_email;
} else if (op_email.empty() && op_state.user_email_specified) {
- ldout(store->ctx(), 10) << "removing email index: " << user_info.user_email << dendl;
+ ldpp_dout(dpp, 10) << "removing email index: " << user_info.user_email << dendl;
/* will be physically removed later when calling update() */
user_info.user_email.clear();
}
CephContext *cct = store->ctx();
size_t max_buckets = cct->_conf->rgw_list_buckets_max_chunk;
do {
- ret = rgw_read_user_buckets(store, user_id, buckets, marker, string(),
+ ret = rgw_read_user_buckets(dpp, store, user_id, buckets, marker, string(),
max_buckets, false, y);
if (ret < 0) {
set_err_msg(err_msg, "could not get buckets for uid: " + user_id.to_str());
marker = iter->first;
}
- ret = store->getRados()->set_buckets_enabled(bucket_names, !suspended);
+ ret = store->getRados()->set_buckets_enabled(bucket_names, !suspended, dpp);
if (ret < 0) {
set_err_msg(err_msg, "failed to modify bucket");
return ret;
// if we're supposed to modify keys, do so
if (op_state.has_key_op()) {
- ret = keys.add(op_state, &subprocess_msg, true, y);
+ ret = keys.add(dpp, op_state, &subprocess_msg, true, y);
if (ret < 0) {
set_err_msg(err_msg, "unable to create or modify keys, " + subprocess_msg);
return ret;
}
}
- ret = update(op_state, err_msg, y);
+ ret = update(dpp, op_state, err_msg, y);
if (ret < 0)
return ret;
return 0;
}
-int RGWUser::modify(RGWUserAdminOpState& op_state, optional_yield y, std::string *err_msg)
+int RGWUser::modify(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, optional_yield y, std::string *err_msg)
{
std::string subprocess_msg;
int ret;
return ret;
}
- ret = execute_modify(op_state, &subprocess_msg, y);
+ ret = execute_modify(dpp, op_state, &subprocess_msg, y);
if (ret < 0) {
set_err_msg(err_msg, "unable to modify user, " + subprocess_msg);
return ret;
return 0;
}
-int RGWUser::info(RGWUserAdminOpState& op_state, RGWUserInfo& fetched_info,
+int RGWUser::info(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, RGWUserInfo& fetched_info,
optional_yield y, std::string *err_msg)
{
- int ret = init(op_state, y);
+ int ret = init(dpp, op_state, y);
if (ret < 0) {
set_err_msg(err_msg, "unable to fetch user info");
return ret;
return 0;
}
-int RGWUser::list(RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher)
+int RGWUser::list(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher)
{
Formatter *formatter = flusher.get_formatter();
void *handle = nullptr;
auto meta_mgr = store->ctl()->meta.mgr;
- int ret = meta_mgr->list_keys_init(metadata_key, op_state.marker, &handle);
+ int ret = meta_mgr->list_keys_init(dpp, metadata_key, op_state.marker, &handle);
if (ret < 0) {
return ret;
}
return 0;
}
-int RGWUserAdminOp_User::list(rgw::sal::RGWRadosStore *store, RGWUserAdminOpState& op_state,
+int RGWUserAdminOp_User::list(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *store, RGWUserAdminOpState& op_state,
RGWFormatterFlusher& flusher)
{
RGWUser user;
if (ret < 0)
return ret;
- ret = user.list(op_state, flusher);
+ ret = user.list(dpp, op_state, flusher);
if (ret < 0)
return ret;
return 0;
}
-int RGWUserAdminOp_User::info(rgw::sal::RGWRadosStore *store, RGWUserAdminOpState& op_state,
+int RGWUserAdminOp_User::info(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store, RGWUserAdminOpState& op_state,
RGWFormatterFlusher& flusher,
optional_yield y)
{
RGWUserInfo info;
RGWUser user;
- int ret = user.init(store, op_state, y);
+ int ret = user.init(dpp, store, op_state, y);
if (ret < 0)
return ret;
return ret;
if (op_state.sync_stats) {
- ret = rgw_user_sync_all_stats(store, info.user_id, y);
+ ret = rgw_user_sync_all_stats(dpp, store, info.user_id, y);
if (ret < 0) {
return ret;
}
RGWStorageStats stats;
RGWStorageStats *arg_stats = NULL;
if (op_state.fetch_stats) {
- int ret = store->ctl()->user->read_stats(info.user_id, &stats, y);
+ int ret = store->ctl()->user->read_stats(dpp, info.user_id, &stats, y);
if (ret < 0 && ret != -ENOENT) {
return ret;
}
return 0;
}
-int RGWUserAdminOp_User::create(rgw::sal::RGWRadosStore *store,
+int RGWUserAdminOp_User::create(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store,
RGWUserAdminOpState& op_state,
RGWFormatterFlusher& flusher, optional_yield y)
{
RGWUserInfo info;
RGWUser user;
- int ret = user.init(store, op_state, y);
+ int ret = user.init(dpp, store, op_state, y);
if (ret < 0)
return ret;
Formatter *formatter = flusher.get_formatter();
- ret = user.add(op_state, y, NULL);
+ ret = user.add(dpp, op_state, y, NULL);
if (ret < 0) {
if (ret == -EEXIST)
ret = -ERR_USER_EXIST;
return 0;
}
-int RGWUserAdminOp_User::modify(rgw::sal::RGWRadosStore *store,
+int RGWUserAdminOp_User::modify(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store,
RGWUserAdminOpState& op_state,
RGWFormatterFlusher& flusher, optional_yield y)
{
RGWUserInfo info;
RGWUser user;
- int ret = user.init(store, op_state, y);
+ int ret = user.init(dpp, store, op_state, y);
if (ret < 0)
return ret;
Formatter *formatter = flusher.get_formatter();
- ret = user.modify(op_state, y, NULL);
+ ret = user.modify(dpp, op_state, y, NULL);
if (ret < 0) {
if (ret == -ENOENT)
ret = -ERR_NO_SUCH_USER;
return 0;
}
-int RGWUserAdminOp_User::remove(rgw::sal::RGWRadosStore *store, RGWUserAdminOpState& op_state,
+int RGWUserAdminOp_User::remove(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *store, RGWUserAdminOpState& op_state,
RGWFormatterFlusher& flusher, optional_yield y)
{
RGWUserInfo info;
RGWUser user;
- int ret = user.init(store, op_state, y);
+ int ret = user.init(dpp, store, op_state, y);
if (ret < 0)
return ret;
- ret = user.remove(op_state, y, NULL);
+ ret = user.remove(dpp, op_state, y, NULL);
if (ret == -ENOENT)
ret = -ERR_NO_SUCH_USER;
return ret;
}
-int RGWUserAdminOp_Subuser::create(rgw::sal::RGWRadosStore *store,
+int RGWUserAdminOp_Subuser::create(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store,
RGWUserAdminOpState& op_state,
RGWFormatterFlusher& flusher,
optional_yield y)
{
RGWUserInfo info;
RGWUser user;
- int ret = user.init(store, op_state, y);
+ int ret = user.init(dpp, store, op_state, y);
if (ret < 0)
return ret;
Formatter *formatter = flusher.get_formatter();
- ret = user.subusers.add(op_state, y, NULL);
+ ret = user.subusers.add(dpp, op_state, y, NULL);
if (ret < 0)
return ret;
return 0;
}
-int RGWUserAdminOp_Subuser::modify(rgw::sal::RGWRadosStore *store, RGWUserAdminOpState& op_state,
+int RGWUserAdminOp_Subuser::modify(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store, RGWUserAdminOpState& op_state,
RGWFormatterFlusher& flusher, optional_yield y)
{
RGWUserInfo info;
RGWUser user;
- int ret = user.init(store, op_state, y);
+ int ret = user.init(dpp, store, op_state, y);
if (ret < 0)
return ret;
Formatter *formatter = flusher.get_formatter();
- ret = user.subusers.modify(op_state, y, NULL);
+ ret = user.subusers.modify(dpp, op_state, y, NULL);
if (ret < 0)
return ret;
return 0;
}
-int RGWUserAdminOp_Subuser::remove(rgw::sal::RGWRadosStore *store,
+int RGWUserAdminOp_Subuser::remove(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store,
RGWUserAdminOpState& op_state,
RGWFormatterFlusher& flusher,
optional_yield y)
{
RGWUserInfo info;
RGWUser user;
- int ret = user.init(store, op_state, y);
+ int ret = user.init(dpp, store, op_state, y);
if (ret < 0)
return ret;
if (!op_state.has_existing_user())
return -ERR_NO_SUCH_USER;
- ret = user.subusers.remove(op_state, y, NULL);
+ ret = user.subusers.remove(dpp, op_state, y, NULL);
if (ret < 0)
return ret;
return 0;
}
-int RGWUserAdminOp_Key::create(rgw::sal::RGWRadosStore *store, RGWUserAdminOpState& op_state,
+int RGWUserAdminOp_Key::create(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store, RGWUserAdminOpState& op_state,
RGWFormatterFlusher& flusher,
optional_yield y)
{
RGWUserInfo info;
RGWUser user;
- int ret = user.init(store, op_state, y);
+ int ret = user.init(dpp, store, op_state, y);
if (ret < 0)
return ret;
Formatter *formatter = flusher.get_formatter();
- ret = user.keys.add(op_state, y, NULL);
+ ret = user.keys.add(dpp, op_state, y, NULL);
if (ret < 0)
return ret;
return 0;
}
-int RGWUserAdminOp_Key::remove(rgw::sal::RGWRadosStore *store,
+int RGWUserAdminOp_Key::remove(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store,
RGWUserAdminOpState& op_state,
RGWFormatterFlusher& flusher,
optional_yield y)
{
RGWUserInfo info;
RGWUser user;
- int ret = user.init(store, op_state, y);
+ int ret = user.init(dpp, store, op_state, y);
if (ret < 0)
return ret;
return -ERR_NO_SUCH_USER;
- ret = user.keys.remove(op_state, y, NULL);
+ ret = user.keys.remove(dpp, op_state, y, NULL);
if (ret < 0)
return ret;
return 0;
}
-int RGWUserAdminOp_Caps::add(rgw::sal::RGWRadosStore *store,
+int RGWUserAdminOp_Caps::add(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store,
RGWUserAdminOpState& op_state,
RGWFormatterFlusher& flusher, optional_yield y)
{
RGWUserInfo info;
RGWUser user;
- int ret = user.init(store, op_state, y);
+ int ret = user.init(dpp, store, op_state, y);
if (ret < 0)
return ret;
Formatter *formatter = flusher.get_formatter();
- ret = user.caps.add(op_state, y, NULL);
+ ret = user.caps.add(dpp, op_state, y, NULL);
if (ret < 0)
return ret;
}
-int RGWUserAdminOp_Caps::remove(rgw::sal::RGWRadosStore *store,
+int RGWUserAdminOp_Caps::remove(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store,
RGWUserAdminOpState& op_state,
RGWFormatterFlusher& flusher, optional_yield y)
{
RGWUserInfo info;
RGWUser user;
- int ret = user.init(store, op_state, y);
+ int ret = user.init(dpp, store, op_state, y);
if (ret < 0)
return ret;
Formatter *formatter = flusher.get_formatter();
- ret = user.caps.remove(op_state, y, NULL);
+ ret = user.caps.remove(dpp, op_state, y, NULL);
if (ret < 0)
return ret;
string get_type() override { return "user"; }
- int do_get(RGWSI_MetaBackend_Handler::Op *op, string& entry, RGWMetadataObject **obj, optional_yield y) override {
+ int do_get(RGWSI_MetaBackend_Handler::Op *op, string& entry, RGWMetadataObject **obj, optional_yield y, const DoutPrefixProvider *dpp) override {
RGWUserCompleteInfo uci;
RGWObjVersionTracker objv_tracker;
real_time mtime;
int ret = svc.user->read_user_info(op->ctx(), user, &uci.info, &objv_tracker,
&mtime, nullptr, &uci.attrs,
- y);
+ y, dpp);
if (ret < 0) {
return ret;
}
int do_put(RGWSI_MetaBackend_Handler::Op *op, string& entry,
RGWMetadataObject *obj,
RGWObjVersionTracker& objv_tracker,
- optional_yield y,
+ optional_yield y, const DoutPrefixProvider *dpp,
RGWMDLogSyncType type, bool from_remote_zone) override;
int do_remove(RGWSI_MetaBackend_Handler::Op *op, string& entry, RGWObjVersionTracker& objv_tracker,
- optional_yield y) override {
+ optional_yield y, const DoutPrefixProvider *dpp) override {
RGWUserInfo info;
rgw_user user = RGWSI_User::user_from_meta_key(entry);
int ret = svc.user->read_user_info(op->ctx(), user, &info, nullptr,
nullptr, nullptr, nullptr,
- y);
+ y, dpp);
if (ret < 0) {
return ret;
}
return svc.user->remove_user_info(op->ctx(), info, &objv_tracker,
- y);
+ y, dpp);
}
};
uobj = static_cast<RGWUserMetadataObject *>(obj);
}
- int put_checked() override;
+ int put_checked(const DoutPrefixProvider *dpp) override;
};
int RGWUserMetadataHandler::do_put(RGWSI_MetaBackend_Handler::Op *op, string& entry,
RGWMetadataObject *obj,
RGWObjVersionTracker& objv_tracker,
- optional_yield y,
+ optional_yield y, const DoutPrefixProvider *dpp,
RGWMDLogSyncType type, bool from_remote_zone)
{
RGWMetadataHandlerPut_User put_op(this, op, entry, obj, objv_tracker, y, type, from_remote_zone);
- return do_put_operate(&put_op);
+ return do_put_operate(&put_op, dpp);
}
-int RGWMetadataHandlerPut_User::put_checked()
+int RGWMetadataHandlerPut_User::put_checked(const DoutPrefixProvider *dpp)
{
RGWUserMetadataObject *orig_obj = static_cast<RGWUserMetadataObject *>(old_obj);
RGWUserCompleteInfo& uci = uobj->get_uci();
int ret = uhandler->svc.user->store_user_info(op->ctx(), uci.info, pold_info,
&objv_tracker, mtime,
- false, pattrs, y);
+ false, pattrs, y, dpp);
if (ret < 0) {
return ret;
}
}
};
-int RGWUserCtl::get_info_by_uid(const rgw_user& uid,
+int RGWUserCtl::get_info_by_uid(const DoutPrefixProvider *dpp,
+ const rgw_user& uid,
RGWUserInfo *info,
optional_yield y,
const GetParams& params)
params.mtime,
params.cache_info,
params.attrs,
- y);
+ y,
+ dpp);
});
}
-int RGWUserCtl::get_info_by_email(const string& email,
+int RGWUserCtl::get_info_by_email(const DoutPrefixProvider *dpp,
+ const string& email,
RGWUserInfo *info,
optional_yield y,
const GetParams& params)
info,
params.objv_tracker,
params.mtime,
- y);
+ y,
+ dpp);
});
}
-int RGWUserCtl::get_info_by_swift(const string& swift_name,
+int RGWUserCtl::get_info_by_swift(const DoutPrefixProvider *dpp,
+ const string& swift_name,
RGWUserInfo *info,
optional_yield y,
const GetParams& params)
info,
params.objv_tracker,
params.mtime,
- y);
+ y,
+ dpp);
});
}
-int RGWUserCtl::get_info_by_access_key(const string& access_key,
+int RGWUserCtl::get_info_by_access_key(const DoutPrefixProvider *dpp,
+ const string& access_key,
RGWUserInfo *info,
optional_yield y,
const GetParams& params)
info,
params.objv_tracker,
params.mtime,
- y);
+ y,
+ dpp);
});
}
-int RGWUserCtl::get_attrs_by_uid(const rgw_user& user_id,
+int RGWUserCtl::get_attrs_by_uid(const DoutPrefixProvider *dpp,
+ const rgw_user& user_id,
map<string, bufferlist> *pattrs,
optional_yield y,
RGWObjVersionTracker *objv_tracker)
{
RGWUserInfo user_info;
- return get_info_by_uid(user_id, &user_info, y, RGWUserCtl::GetParams()
+ return get_info_by_uid(dpp, user_id, &user_info, y, RGWUserCtl::GetParams()
.set_attrs(pattrs)
.set_objv_tracker(objv_tracker));
}
-int RGWUserCtl::store_info(const RGWUserInfo& info, optional_yield y,
+int RGWUserCtl::store_info(const DoutPrefixProvider *dpp,
+ const RGWUserInfo& info, optional_yield y,
const PutParams& params)
{
string key = RGWSI_User::get_meta_key(info.user_id);
params.mtime,
params.exclusive,
params.attrs,
- y);
+ y,
+ dpp);
});
}
-int RGWUserCtl::remove_info(const RGWUserInfo& info, optional_yield y,
+int RGWUserCtl::remove_info(const DoutPrefixProvider *dpp,
+ const RGWUserInfo& info, optional_yield y,
const RemoveParams& params)
{
return be_handler->call([&](RGWSI_MetaBackend_Handler::Op *op) {
return svc.user->remove_user_info(op->ctx(), info,
params.objv_tracker,
- y);
+ y, dpp);
});
}
-int RGWUserCtl::add_bucket(const rgw_user& user,
+int RGWUserCtl::add_bucket(const DoutPrefixProvider *dpp,
+ const rgw_user& user,
const rgw_bucket& bucket,
ceph::real_time creation_time,
optional_yield y)
{
return be_handler->call([&](RGWSI_MetaBackend_Handler::Op *op) {
- return svc.user->add_bucket(op->ctx(), user, bucket, creation_time, y);
+ return svc.user->add_bucket(dpp, op->ctx(), user, bucket, creation_time, y);
});
}
-int RGWUserCtl::remove_bucket(const rgw_user& user,
+int RGWUserCtl::remove_bucket(const DoutPrefixProvider *dpp,
+ const rgw_user& user,
const rgw_bucket& bucket,
optional_yield y)
{
return be_handler->call([&](RGWSI_MetaBackend_Handler::Op *op) {
- return svc.user->remove_bucket(op->ctx(), user, bucket, y);
+ return svc.user->remove_bucket(dpp, op->ctx(), user, bucket, y);
});
}
-int RGWUserCtl::list_buckets(const rgw_user& user,
+int RGWUserCtl::list_buckets(const DoutPrefixProvider *dpp,
+ const rgw_user& user,
const string& marker,
const string& end_marker,
uint64_t max,
}
return be_handler->call([&](RGWSI_MetaBackend_Handler::Op *op) {
- int ret = svc.user->list_buckets(op->ctx(), user, marker, end_marker,
+ int ret = svc.user->list_buckets(dpp, op->ctx(), user, marker, end_marker,
max, buckets, is_truncated, y);
if (ret < 0) {
return ret;
}
if (need_stats) {
map<string, RGWBucketEnt>& m = buckets->get_buckets();
- ret = ctl.bucket->read_buckets_stats(m, y);
+ ret = ctl.bucket->read_buckets_stats(m, y, dpp);
if (ret < 0 && ret != -ENOENT) {
- ldout(svc.user->ctx(), 0) << "ERROR: could not get stats for buckets" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: could not get stats for buckets" << dendl;
return ret;
}
}
});
}
-int RGWUserCtl::flush_bucket_stats(const rgw_user& user,
+int RGWUserCtl::flush_bucket_stats(const DoutPrefixProvider *dpp,
+ const rgw_user& user,
const RGWBucketEnt& ent,
optional_yield y)
{
return be_handler->call([&](RGWSI_MetaBackend_Handler::Op *op) {
- return svc.user->flush_bucket_stats(op->ctx(), user, ent, y);
+ return svc.user->flush_bucket_stats(dpp, op->ctx(), user, ent, y);
});
}
-int RGWUserCtl::complete_flush_stats(const rgw_user& user, optional_yield y)
+int RGWUserCtl::complete_flush_stats(const DoutPrefixProvider *dpp, const rgw_user& user, optional_yield y)
{
return be_handler->call([&](RGWSI_MetaBackend_Handler::Op *op) {
- return svc.user->complete_flush_stats(op->ctx(), user, y);
+ return svc.user->complete_flush_stats(dpp, op->ctx(), user, y);
});
}
-int RGWUserCtl::reset_stats(const rgw_user& user, optional_yield y)
+int RGWUserCtl::reset_stats(const DoutPrefixProvider *dpp, const rgw_user& user, optional_yield y)
{
return be_handler->call([&](RGWSI_MetaBackend_Handler::Op *op) {
- return svc.user->reset_bucket_stats(op->ctx(), user, y);
+ return svc.user->reset_bucket_stats(dpp, op->ctx(), user, y);
});
}
-int RGWUserCtl::read_stats(const rgw_user& user, RGWStorageStats *stats,
+int RGWUserCtl::read_stats(const DoutPrefixProvider *dpp,
+ const rgw_user& user, RGWStorageStats *stats,
optional_yield y,
ceph::real_time *last_stats_sync,
ceph::real_time *last_stats_update)
{
return be_handler->call([&](RGWSI_MetaBackend_Handler::Op *op) {
- return svc.user->read_stats(op->ctx(), user, stats,
+ return svc.user->read_stats(dpp, op->ctx(), user, stats,
last_stats_sync, last_stats_update, y);
});
}
-int RGWUserCtl::read_stats_async(const rgw_user& user, RGWGetUserStats_CB *cb)
+int RGWUserCtl::read_stats_async(const DoutPrefixProvider *dpp, const rgw_user& user, RGWGetUserStats_CB *cb)
{
return be_handler->call([&](RGWSI_MetaBackend_Handler::Op *op) {
- return svc.user->read_stats_async(op->ctx(), user, cb);
+ return svc.user->read_stats_async(dpp, op->ctx(), user, cb);
});
}
};
WRITE_CLASS_ENCODER(RGWUID)
-extern int rgw_user_sync_all_stats(rgw::sal::RGWRadosStore *store, const rgw_user& user_id, optional_yield y);
-extern int rgw_user_get_all_buckets_stats(
+extern int rgw_user_sync_all_stats(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *store, const rgw_user& user_id, optional_yield y);
+extern int rgw_user_get_all_buckets_stats(const DoutPrefixProvider *dpp,
rgw::sal::RGWRadosStore *store,const rgw_user& user_id,
map<string, cls_user_bucket_entry>& buckets_usage_map, optional_yield y);
* Save the given user information to storage.
* Returns: 0 on success, -ERR# on failure.
*/
-extern int rgw_store_user_info(RGWUserCtl *user_ctl,
+extern int rgw_store_user_info(const DoutPrefixProvider *dpp,
+ RGWUserCtl *user_ctl,
RGWUserInfo& info,
RGWUserInfo *old_info,
RGWObjVersionTracker *objv_tracker,
* Given an user_id, finds the user info associated with it.
* returns: 0 on success, -ERR# on failure (including nonexistence)
*/
-extern int rgw_get_user_info_by_uid(RGWUserCtl *user_ctl,
+extern int rgw_get_user_info_by_uid(const DoutPrefixProvider *dpp,
+ RGWUserCtl *user_ctl,
const rgw_user& user_id,
RGWUserInfo& info,
optional_yield y,
* Given an email, finds the user info associated with it.
* returns: 0 on success, -ERR# on failure (including nonexistence)
*/
-extern int rgw_get_user_info_by_email(RGWUserCtl *user_ctl,
+extern int rgw_get_user_info_by_email(const DoutPrefixProvider *dpp,
+ RGWUserCtl *user_ctl,
string& email, RGWUserInfo& info,
optional_yield y,
RGWObjVersionTracker *objv_tracker = NULL,
* Given an swift username, finds the user info associated with it.
* returns: 0 on success, -ERR# on failure (including nonexistence)
*/
-extern int rgw_get_user_info_by_swift(RGWUserCtl *user_ctl,
+extern int rgw_get_user_info_by_swift(const DoutPrefixProvider *dpp,
+ RGWUserCtl *user_ctl,
const string& swift_name,
RGWUserInfo& info, /* out */
optional_yield y,
* Given an access key, finds the user info associated with it.
* returns: 0 on success, -ERR# on failure (including nonexistence)
*/
-extern int rgw_get_user_info_by_access_key(RGWUserCtl *user_ctl,
+extern int rgw_get_user_info_by_access_key(const DoutPrefixProvider *dpp,
+ RGWUserCtl *user_ctl,
const std::string& access_key,
RGWUserInfo& info,
optional_yield y,
private:
int create_key(RGWUserAdminOpState& op_state, std::string *err_msg = NULL);
- int generate_key(RGWUserAdminOpState& op_state, optional_yield y,
+ int generate_key(const DoutPrefixProvider *dpp,
+ RGWUserAdminOpState& op_state, optional_yield y,
std::string *err_msg = NULL);
int modify_key(RGWUserAdminOpState& op_state, std::string *err_msg = NULL);
int check_op(RGWUserAdminOpState& op_state, std::string *err_msg = NULL);
/* API Contract Fulfilment */
- int execute_add(RGWUserAdminOpState& op_state, std::string *err_msg,
+ int execute_add(const DoutPrefixProvider *dpp,
+ RGWUserAdminOpState& op_state, std::string *err_msg,
bool defer_save, optional_yield y);
- int execute_remove(RGWUserAdminOpState& op_state, std::string *err_msg,
+ int execute_remove(const DoutPrefixProvider *dpp,
+ RGWUserAdminOpState& op_state, std::string *err_msg,
bool defer_save, optional_yield y);
- int remove_subuser_keys(RGWUserAdminOpState& op_state, std::string *err_msg,
+ int remove_subuser_keys(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, std::string *err_msg,
bool defer_save, optional_yield y);
- int add(RGWUserAdminOpState& op_state, std::string *err_msg, bool defer_save,
+ int add(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, std::string *err_msg, bool defer_save,
optional_yield y);
- int remove(RGWUserAdminOpState& op_state, std::string *err_msg,
+ int remove(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, std::string *err_msg,
bool defer_save, optional_yield y);
public:
explicit RGWAccessKeyPool(RGWUser* usr);
int init(RGWUserAdminOpState& op_state);
/* API Contracted Methods */
- int add(RGWUserAdminOpState& op_state, optional_yield y,
+ int add(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, optional_yield y,
std::string *err_msg = NULL);
- int remove(RGWUserAdminOpState& op_state, optional_yield y,
+ int remove(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, optional_yield y,
std::string *err_msg = NULL);
friend class RGWUser;
int check_op(RGWUserAdminOpState& op_state, std::string *err_msg = NULL);
/* API Contract Fulfillment */
- int execute_add(RGWUserAdminOpState& op_state, std::string *err_msg, bool defer_save, optional_yield y);
- int execute_remove(RGWUserAdminOpState& op_state, std::string *err_msg, bool defer_save, optional_yield y);
- int execute_modify(RGWUserAdminOpState& op_state, std::string *err_msg, bool defer_save, optional_yield y);
+ int execute_add(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, std::string *err_msg, bool defer_save, optional_yield y);
+ int execute_remove(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, std::string *err_msg, bool defer_save, optional_yield y);
+ int execute_modify(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, std::string *err_msg, bool defer_save, optional_yield y);
- int add(RGWUserAdminOpState& op_state, std::string *err_msg, bool defer_save,
+ int add(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, std::string *err_msg, bool defer_save,
optional_yield y);
- int remove(RGWUserAdminOpState& op_state, std::string *err_msg, bool defer_save, optional_yield y);
- int modify(RGWUserAdminOpState& op_state, optional_yield y, std::string *err_msg, bool defer_save);
+ int remove(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, std::string *err_msg, bool defer_save, optional_yield y);
+ int modify(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, optional_yield y, std::string *err_msg, bool defer_save);
public:
explicit RGWSubUserPool(RGWUser *user);
int init(RGWUserAdminOpState& op_state);
/* API contracted methods */
- int add(RGWUserAdminOpState& op_state, optional_yield y,
+ int add(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, optional_yield y,
std::string *err_msg = NULL);
- int remove(RGWUserAdminOpState& op_state, optional_yield y, std::string *err_msg = NULL);
- int modify(RGWUserAdminOpState& op_state, optional_yield y, std::string *err_msg = NULL);
+ int remove(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, optional_yield y, std::string *err_msg = NULL);
+ int modify(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, optional_yield y, std::string *err_msg = NULL);
friend class RGWUser;
};
RGWUser *user{nullptr};
private:
- int add(RGWUserAdminOpState& op_state, std::string *err_msg, bool defer_save,
+ int add(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, std::string *err_msg, bool defer_save,
optional_yield y);
- int remove(RGWUserAdminOpState& op_state, std::string *err_msg, bool defer_save,
+ int remove(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, std::string *err_msg, bool defer_save,
optional_yield y);
public:
int init(RGWUserAdminOpState& op_state);
/* API contracted methods */
- int add(RGWUserAdminOpState& op_state, optional_yield y,
+ int add(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, optional_yield y,
std::string *err_msg = NULL);
- int remove(RGWUserAdminOpState& op_state, optional_yield y, std::string *err_msg = NULL);
+ int remove(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, optional_yield y, std::string *err_msg = NULL);
friend class RGWUser;
};
bool is_populated() { return info_stored; }
int check_op(RGWUserAdminOpState& req, std::string *err_msg);
- int update(RGWUserAdminOpState& op_state, std::string *err_msg, optional_yield y);
+ int update(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, std::string *err_msg, optional_yield y);
void clear_members();
void init_default();
/* API Contract Fulfillment */
- int execute_add(RGWUserAdminOpState& op_state, std::string *err_msg,
+ int execute_add(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, std::string *err_msg,
optional_yield y);
- int execute_remove(RGWUserAdminOpState& op_state,
+ int execute_remove(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state,
std::string *err_msg, optional_yield y);
- int execute_modify(RGWUserAdminOpState& op_state, std::string *err_msg, optional_yield y);
- int execute_rename(RGWUserAdminOpState& op_state, std::string *err_msg, optional_yield y);
+ int execute_modify(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, std::string *err_msg, optional_yield y);
+ int execute_rename(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, std::string *err_msg, optional_yield y);
public:
RGWUser();
- int init(rgw::sal::RGWRadosStore *storage, RGWUserAdminOpState& op_state,
+ int init(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *storage, RGWUserAdminOpState& op_state,
optional_yield y);
int init_storage(rgw::sal::RGWRadosStore *storage);
- int init(RGWUserAdminOpState& op_state, optional_yield y);
+ int init(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, optional_yield y);
int init_members(RGWUserAdminOpState& op_state);
rgw::sal::RGWRadosStore *get_store() { return store; }
RGWSubUserPool subusers;
/* API Contracted Methods */
- int add(RGWUserAdminOpState& op_state, optional_yield y, std::string *err_msg = NULL);
+ int add(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, optional_yield y, std::string *err_msg = NULL);
- int remove(RGWUserAdminOpState& op_state, optional_yield y, std::string *err_msg = NULL);
+ int remove(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, optional_yield y, std::string *err_msg = NULL);
- int rename(RGWUserAdminOpState& op_state, optional_yield y, std::string *err_msg = NULL);
+ int rename(RGWUserAdminOpState& op_state, optional_yield y, const DoutPrefixProvider *dpp, std::string *err_msg = NULL);
/* remove an already populated RGWUser */
int remove(std::string *err_msg = NULL);
- int modify(RGWUserAdminOpState& op_state, optional_yield y, std::string *err_msg = NULL);
+ int modify(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, optional_yield y, std::string *err_msg = NULL);
/* retrieve info from an existing user in the RGW system */
- int info(RGWUserAdminOpState& op_state, RGWUserInfo& fetched_info, optional_yield y,
+ int info(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, RGWUserInfo& fetched_info, optional_yield y,
std::string *err_msg = NULL);
/* info from an already populated RGWUser */
int info (RGWUserInfo& fetched_info, std::string *err_msg = NULL);
/* list the existing users */
- int list(RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher);
+ int list(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher);
friend class RGWAccessKeyPool;
friend class RGWSubUserPool;
class RGWUserAdminOp_User
{
public:
- static int list(rgw::sal::RGWRadosStore *store,
+ static int list(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *store,
RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher);
- static int info(rgw::sal::RGWRadosStore *store,
+ static int info(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store,
RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher,
optional_yield y);
- static int create(rgw::sal::RGWRadosStore *store,
+ static int create(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store,
RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher,
optional_yield y);
- static int modify(rgw::sal::RGWRadosStore *store,
+ static int modify(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *store,
RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y);
- static int remove(rgw::sal::RGWRadosStore *store,
+ static int remove(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *store,
RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y);
};
class RGWUserAdminOp_Subuser
{
public:
- static int create(rgw::sal::RGWRadosStore *store,
+ static int create(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store,
RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher,
optional_yield y);
- static int modify(rgw::sal::RGWRadosStore *store,
+ static int modify(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store,
RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher,
optional_yield y);
- static int remove(rgw::sal::RGWRadosStore *store,
+ static int remove(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store,
RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher,
optional_yield y);
};
class RGWUserAdminOp_Key
{
public:
- static int create(rgw::sal::RGWRadosStore *store,
+ static int create(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *store,
RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher,
optional_yield y);
- static int remove(rgw::sal::RGWRadosStore *store,
+ static int remove(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store,
RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher,
optional_yield y);
};
class RGWUserAdminOp_Caps
{
public:
- static int add(rgw::sal::RGWRadosStore *store,
+ static int add(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store,
RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher,
optional_yield y);
- static int remove(rgw::sal::RGWRadosStore *store,
+ static int remove(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store,
RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher,
optional_yield y);
};
}
};
- int get_info_by_uid(const rgw_user& uid, RGWUserInfo *info,
+ int get_info_by_uid(const DoutPrefixProvider *dpp,
+ const rgw_user& uid, RGWUserInfo *info,
optional_yield y, const GetParams& params = {});
- int get_info_by_email(const string& email, RGWUserInfo *info,
+ int get_info_by_email(const DoutPrefixProvider *dpp,
+ const string& email, RGWUserInfo *info,
optional_yield y, const GetParams& params = {});
- int get_info_by_swift(const string& swift_name, RGWUserInfo *info,
+ int get_info_by_swift(const DoutPrefixProvider *dpp,
+ const string& swift_name, RGWUserInfo *info,
optional_yield y, const GetParams& params = {});
- int get_info_by_access_key(const string& access_key, RGWUserInfo *info,
+ int get_info_by_access_key(const DoutPrefixProvider *dpp,
+ const string& access_key, RGWUserInfo *info,
optional_yield y, const GetParams& params = {});
- int get_attrs_by_uid(const rgw_user& user_id,
+ int get_attrs_by_uid(const DoutPrefixProvider *dpp,
+ const rgw_user& user_id,
map<string, bufferlist> *attrs,
optional_yield y,
RGWObjVersionTracker *objv_tracker = nullptr);
- int store_info(const RGWUserInfo& info, optional_yield y,
+ int store_info(const DoutPrefixProvider *dpp,
+ const RGWUserInfo& info, optional_yield y,
const PutParams& params = {});
- int remove_info(const RGWUserInfo& info, optional_yield y,
+ int remove_info(const DoutPrefixProvider *dpp,
+ const RGWUserInfo& info, optional_yield y,
const RemoveParams& params = {});
- int add_bucket(const rgw_user& user,
+ int add_bucket(const DoutPrefixProvider *dpp,
+ const rgw_user& user,
const rgw_bucket& bucket,
ceph::real_time creation_time,
optional_yield y);
- int remove_bucket(const rgw_user& user,
+ int remove_bucket(const DoutPrefixProvider *dpp,
+ const rgw_user& user,
const rgw_bucket& bucket, optional_yield y);
- int list_buckets(const rgw_user& user,
+ int list_buckets(const DoutPrefixProvider *dpp,
+ const rgw_user& user,
const string& marker,
const string& end_marker,
uint64_t max,
optional_yield y,
uint64_t default_max = 1000);
- int flush_bucket_stats(const rgw_user& user,
+ int flush_bucket_stats(const DoutPrefixProvider *dpp,
+ const rgw_user& user,
const RGWBucketEnt& ent,
optional_yield y);
- int complete_flush_stats(const rgw_user& user, optional_yield y);
- int reset_stats(const rgw_user& user, optional_yield y);
- int read_stats(const rgw_user& user, RGWStorageStats *stats,
+ int complete_flush_stats(const DoutPrefixProvider *dpp, const rgw_user& user, optional_yield y);
+ int reset_stats(const DoutPrefixProvider *dpp, const rgw_user& user, optional_yield y);
+ int read_stats(const DoutPrefixProvider *dpp,
+ const rgw_user& user, RGWStorageStats *stats,
optional_yield y,
ceph::real_time *last_stats_sync = nullptr, /* last time a full stats sync completed */
ceph::real_time *last_stats_update = nullptr); /* last time a stats update was done */
- int read_stats_async(const rgw_user& user, RGWGetUserStats_CB *ctx);
+ int read_stats_async(const DoutPrefixProvider *dpp, const rgw_user& user, RGWGetUserStats_CB *ctx);
};
class RGWUserMetaHandlerAllocator {
#include "common/ceph_mutex.h"
#include "include/common_fwd.h"
+#define dout_subsys ceph_subsys_rgw
+
class RGWRados;
class RGWRadosThread {
- class Worker : public Thread {
+ class Worker : public Thread, public DoutPrefixProvider {
CephContext *cct;
RGWRadosThread *processor;
ceph::mutex lock = ceph::make_mutex("RGWRadosThread::Worker");
std::lock_guard l{lock};
cond.notify_all();
}
+
+ CephContext *get_cct() const { return cct; }
+ unsigned get_subsys() const { return dout_subsys; }
+ std::ostream& gen_prefix(std::ostream& out) const { return out << "rgw rados thread: "; }
+
};
Worker *worker;
stop();
}
- virtual int init() { return 0; }
- virtual int process() = 0;
+ virtual int init(const DoutPrefixProvider *dpp) { return 0; }
+ virtual int process(const DoutPrefixProvider *dpp) = 0;
bool going_down() { return down_flag; }
return rgw_pool(cct_->_conf->rgw_zonegroup_root_pool);
}
-int RGWZoneGroup::create_default(optional_yield y, bool old_format)
+int RGWZoneGroup::create_default(const DoutPrefixProvider *dpp, optional_yield y, bool old_format)
{
name = default_zonegroup_name;
api_name = default_zonegroup_name;
RGWZoneParams zone_params(default_zone_name);
- int r = zone_params.init(cct, sysobj_svc, y, false);
+ int r = zone_params.init(dpp, cct, sysobj_svc, y, false);
if (r < 0) {
- ldout(cct, 0) << "create_default: error initializing zone params: " << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "create_default: error initializing zone params: " << cpp_strerror(-r) << dendl;
return r;
}
- r = zone_params.create_default(y);
+ r = zone_params.create_default(dpp, y);
if (r < 0 && r != -EEXIST) {
- ldout(cct, 0) << "create_default: error in create_default zone params: " << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "create_default: error in create_default zone params: " << cpp_strerror(-r) << dendl;
return r;
} else if (r == -EEXIST) {
- ldout(cct, 10) << "zone_params::create_default() returned -EEXIST, we raced with another default zone_params creation" << dendl;
+ ldpp_dout(dpp, 10) << "zone_params::create_default() returned -EEXIST, we raced with another default zone_params creation" << dendl;
zone_params.clear_id();
- r = zone_params.init(cct, sysobj_svc, y);
+ r = zone_params.init(dpp, cct, sysobj_svc, y);
if (r < 0) {
- ldout(cct, 0) << "create_default: error in init existing zone params: " << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "create_default: error in init existing zone params: " << cpp_strerror(-r) << dendl;
return r;
}
- ldout(cct, 20) << "zone_params::create_default() " << zone_params.get_name() << " id " << zone_params.get_id()
+ ldpp_dout(dpp, 20) << "zone_params::create_default() " << zone_params.get_name() << " id " << zone_params.get_id()
<< dendl;
}
default_zone.id = zone_params.get_id();
master_zone = default_zone.id;
- r = create(y);
+ r = create(dpp, y);
if (r < 0 && r != -EEXIST) {
- ldout(cct, 0) << "error storing zone group info: " << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "error storing zone group info: " << cpp_strerror(-r) << dendl;
return r;
}
if (r == -EEXIST) {
- ldout(cct, 10) << "create_default() returned -EEXIST, we raced with another zonegroup creation" << dendl;
+ ldpp_dout(dpp, 10) << "create_default() returned -EEXIST, we raced with another zonegroup creation" << dendl;
id.clear();
- r = init(cct, sysobj_svc, y);
+ r = init(dpp, cct, sysobj_svc, y);
if (r < 0) {
return r;
}
name = id;
}
- post_process_params(y);
+ post_process_params(dpp, y);
return 0;
}
return (id == other_zonegroup);
}
-int RGWZoneGroup::add_zone(const RGWZoneParams& zone_params, bool *is_master, bool *read_only,
+int RGWZoneGroup::add_zone(const DoutPrefixProvider *dpp,
+ const RGWZoneParams& zone_params, bool *is_master, bool *read_only,
const list<string>& endpoints, const string *ptier_type,
bool *psync_from_all, list<string>& sync_from, list<string>& sync_from_rm,
string *predirect_zone, std::optional<int> bucket_index_max_shards,
if (!zones.count(zone_id)) {
for (const auto& zone : zones) {
if (zone.second.name == zone_name) {
- ldout(cct, 0) << "ERROR: found existing zone name " << zone_name
+ ldpp_dout(dpp, 0) << "ERROR: found existing zone name " << zone_name
<< " (" << zone.first << ") in zonegroup " << get_name() << dendl;
return -EEXIST;
}
if (is_master) {
if (*is_master) {
if (!master_zone.empty() && master_zone != zone_id) {
- ldout(cct, 0) << "NOTICE: overriding master zone: " << master_zone << dendl;
+ ldpp_dout(dpp, 0) << "NOTICE: overriding master zone: " << master_zone << dendl;
}
master_zone = zone_id;
} else if (master_zone == zone_id) {
if (ptier_type) {
zone.tier_type = *ptier_type;
if (!sync_mgr->get_module(*ptier_type, nullptr)) {
- ldout(cct, 0) << "ERROR: could not found sync module: " << *ptier_type
+ ldpp_dout(dpp, 0) << "ERROR: could not found sync module: " << *ptier_type
<< ", valid sync modules: "
<< sync_mgr->get_registered_module_names()
<< dendl;
zone.sync_from.erase(rm);
}
- post_process_params(y);
+ post_process_params(dpp, y);
- return update(y);
+ return update(dpp,y);
}
-int RGWZoneGroup::rename_zone(const RGWZoneParams& zone_params,
+int RGWZoneGroup::rename_zone(const DoutPrefixProvider *dpp,
+ const RGWZoneParams& zone_params,
optional_yield y)
{
RGWZone& zone = zones[zone_params.get_id()];
zone.name = zone_params.get_name();
- return update(y);
+ return update(dpp, y);
}
-void RGWZoneGroup::post_process_params(optional_yield y)
+void RGWZoneGroup::post_process_params(const DoutPrefixProvider *dpp, optional_yield y)
{
bool log_data = zones.size() > 1;
zone.log_data = log_data;
RGWZoneParams zone_params(zone.id, zone.name);
- int ret = zone_params.init(cct, sysobj_svc, y);
+ int ret = zone_params.init(dpp, cct, sysobj_svc, y);
if (ret < 0) {
- ldout(cct, 0) << "WARNING: could not read zone params for zone id=" << zone.id << " name=" << zone.name << dendl;
+ ldpp_dout(dpp, 0) << "WARNING: could not read zone params for zone id=" << zone.id << " name=" << zone.name << dendl;
continue;
}
}
}
-int RGWZoneGroup::remove_zone(const std::string& zone_id, optional_yield y)
+int RGWZoneGroup::remove_zone(const DoutPrefixProvider *dpp, const std::string& zone_id, optional_yield y)
{
auto iter = zones.find(zone_id);
if (iter == zones.end()) {
- ldout(cct, 0) << "zone id " << zone_id << " is not a part of zonegroup "
+ ldpp_dout(dpp, 0) << "zone id " << zone_id << " is not a part of zonegroup "
<< name << dendl;
return -ENOENT;
}
zones.erase(iter);
- post_process_params(y);
+ post_process_params(dpp, y);
- return update(y);
+ return update(dpp, y);
}
-int RGWZoneGroup::read_default_id(string& default_id, optional_yield y,
+int RGWZoneGroup::read_default_id(const DoutPrefixProvider *dpp, string& default_id, optional_yield y,
bool old_format)
{
if (realm_id.empty()) {
/* try using default realm */
RGWRealm realm;
- int ret = realm.init(cct, sysobj_svc, y);
+ int ret = realm.init(dpp, cct, sysobj_svc, y);
// no default realm exist
if (ret < 0) {
- return read_id(default_zonegroup_name, default_id, y);
+ return read_id(dpp, default_zonegroup_name, default_id, y);
}
realm_id = realm.get_id();
}
- return RGWSystemMetaObj::read_default_id(default_id, y, old_format);
+ return RGWSystemMetaObj::read_default_id(dpp, default_id, y, old_format);
}
-int RGWZoneGroup::set_as_default(optional_yield y, bool exclusive)
+int RGWZoneGroup::set_as_default(const DoutPrefixProvider *dpp, optional_yield y, bool exclusive)
{
if (realm_id.empty()) {
/* try using default realm */
RGWRealm realm;
- int ret = realm.init(cct, sysobj_svc, y);
+ int ret = realm.init(dpp, cct, sysobj_svc, y);
if (ret < 0) {
- ldout(cct, 10) << "could not read realm id: " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 10) << "could not read realm id: " << cpp_strerror(-ret) << dendl;
return -EINVAL;
}
realm_id = realm.get_id();
}
- return RGWSystemMetaObj::set_as_default(y, exclusive);
+ return RGWSystemMetaObj::set_as_default(dpp, y, exclusive);
}
void RGWSystemMetaObj::reinit_instance(CephContext *_cct, RGWSI_SysObj *_sysobj_svc)
zone_svc = _sysobj_svc->get_zone_svc();
}
-int RGWSystemMetaObj::init(CephContext *_cct, RGWSI_SysObj *_sysobj_svc,
+int RGWSystemMetaObj::init(const DoutPrefixProvider *dpp, CephContext *_cct, RGWSI_SysObj *_sysobj_svc,
optional_yield y,
bool setup_obj, bool old_format)
{
name = get_predefined_name(cct);
}
if (name.empty()) {
- r = use_default(y, old_format);
+ r = use_default(dpp, y, old_format);
if (r < 0) {
return r;
}
} else if (!old_format) {
- r = read_id(name, id, y);
+ r = read_id(dpp, name, id, y);
if (r < 0) {
if (r != -ENOENT) {
- ldout(cct, 0) << "error in read_id for object name: " << name << " : " << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "error in read_id for object name: " << name << " : " << cpp_strerror(-r) << dendl;
}
return r;
}
}
}
- return read_info(id, y, old_format);
+ return read_info(dpp, id, y, old_format);
}
-int RGWSystemMetaObj::read_default(RGWDefaultSystemMetaObjInfo& default_info,
+int RGWSystemMetaObj::read_default(const DoutPrefixProvider *dpp,
+ RGWDefaultSystemMetaObjInfo& default_info,
const string& oid, optional_yield y)
{
using ceph::decode;
auto obj_ctx = sysobj_svc->init_obj_ctx();
auto sysobj = sysobj_svc->get_obj(obj_ctx, rgw_raw_obj(pool, oid));
- int ret = sysobj.rop().read(&bl, y);
+ int ret = sysobj.rop().read(dpp, &bl, y);
if (ret < 0)
return ret;
auto iter = bl.cbegin();
decode(default_info, iter);
} catch (buffer::error& err) {
- ldout(cct, 0) << "error decoding data from " << pool << ":" << oid << dendl;
+ ldpp_dout(dpp, 0) << "error decoding data from " << pool << ":" << oid << dendl;
return -EIO;
}
return 0;
}
-int RGWSystemMetaObj::read_default_id(string& default_id, optional_yield y,
+int RGWSystemMetaObj::read_default_id(const DoutPrefixProvider *dpp, string& default_id, optional_yield y,
bool old_format)
{
RGWDefaultSystemMetaObjInfo default_info;
- int ret = read_default(default_info, get_default_oid(old_format), y);
+ int ret = read_default(dpp, default_info, get_default_oid(old_format), y);
if (ret < 0) {
return ret;
}
return 0;
}
-int RGWSystemMetaObj::use_default(optional_yield y, bool old_format)
+int RGWSystemMetaObj::use_default(const DoutPrefixProvider *dpp, optional_yield y, bool old_format)
{
- return read_default_id(id, y, old_format);
+ return read_default_id(dpp, id, y, old_format);
}
-int RGWSystemMetaObj::set_as_default(optional_yield y, bool exclusive)
+int RGWSystemMetaObj::set_as_default(const DoutPrefixProvider *dpp, optional_yield y, bool exclusive)
{
using ceph::encode;
string oid = get_default_oid();
auto sysobj = sysobj_svc->get_obj(obj_ctx, rgw_raw_obj(pool, oid));
int ret = sysobj.wop()
.set_exclusive(exclusive)
- .write(bl, y);
+ .write(dpp, bl, y);
if (ret < 0)
return ret;
return 0;
}
-int RGWSystemMetaObj::read_id(const string& obj_name, string& object_id,
+int RGWSystemMetaObj::read_id(const DoutPrefixProvider *dpp, const string& obj_name, string& object_id,
optional_yield y)
{
using ceph::decode;
auto obj_ctx = sysobj_svc->init_obj_ctx();
auto sysobj = sysobj_svc->get_obj(obj_ctx, rgw_raw_obj(pool, oid));
- int ret = sysobj.rop().read(&bl, y);
+ int ret = sysobj.rop().read(dpp, &bl, y);
if (ret < 0) {
return ret;
}
auto iter = bl.cbegin();
decode(nameToId, iter);
} catch (buffer::error& err) {
- ldout(cct, 0) << "ERROR: failed to decode obj from " << pool << ":" << oid << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to decode obj from " << pool << ":" << oid << dendl;
return -EIO;
}
object_id = nameToId.obj_id;
return 0;
}
-int RGWSystemMetaObj::delete_obj(optional_yield y, bool old_format)
+int RGWSystemMetaObj::delete_obj(const DoutPrefixProvider *dpp, optional_yield y, bool old_format)
{
rgw_pool pool(get_pool(cct));
/* check to see if obj is the default */
RGWDefaultSystemMetaObjInfo default_info;
- int ret = read_default(default_info, get_default_oid(old_format), y);
+ int ret = read_default(dpp, default_info, get_default_oid(old_format), y);
if (ret < 0 && ret != -ENOENT)
return ret;
if (default_info.default_id == id || (old_format && default_info.default_id == name)) {
string oid = get_default_oid(old_format);
rgw_raw_obj default_named_obj(pool, oid);
auto sysobj = sysobj_svc->get_obj(obj_ctx, default_named_obj);
- ret = sysobj.wop().remove(y);
+ ret = sysobj.wop().remove(dpp, y);
if (ret < 0) {
- ldout(cct, 0) << "Error delete default obj name " << name << ": " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "Error delete default obj name " << name << ": " << cpp_strerror(-ret) << dendl;
return ret;
}
}
string oid = get_names_oid_prefix() + name;
rgw_raw_obj object_name(pool, oid);
auto sysobj = sysobj_svc->get_obj(obj_ctx, object_name);
- ret = sysobj.wop().remove(y);
+ ret = sysobj.wop().remove(dpp, y);
if (ret < 0) {
- ldout(cct, 0) << "Error delete obj name " << name << ": " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "Error delete obj name " << name << ": " << cpp_strerror(-ret) << dendl;
return ret;
}
}
rgw_raw_obj object_id(pool, oid);
auto sysobj = sysobj_svc->get_obj(obj_ctx, object_id);
- ret = sysobj.wop().remove(y);
+ ret = sysobj.wop().remove(dpp, y);
if (ret < 0) {
- ldout(cct, 0) << "Error delete object id " << id << ": " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "Error delete object id " << id << ": " << cpp_strerror(-ret) << dendl;
}
return ret;
}
-int RGWSystemMetaObj::store_name(bool exclusive, optional_yield y)
+int RGWSystemMetaObj::store_name(const DoutPrefixProvider *dpp, bool exclusive, optional_yield y)
{
rgw_pool pool(get_pool(cct));
string oid = get_names_oid_prefix() + name;
auto sysobj = sysobj_svc->get_obj(obj_ctx, rgw_raw_obj(pool, oid));
return sysobj.wop()
.set_exclusive(exclusive)
- .write(bl, y);
+ .write(dpp, bl, y);
}
-int RGWSystemMetaObj::rename(const string& new_name, optional_yield y)
+int RGWSystemMetaObj::rename(const DoutPrefixProvider *dpp, const string& new_name, optional_yield y)
{
string new_id;
- int ret = read_id(new_name, new_id, y);
+ int ret = read_id(dpp, new_name, new_id, y);
if (!ret) {
return -EEXIST;
}
if (ret < 0 && ret != -ENOENT) {
- ldout(cct, 0) << "Error read_id " << new_name << ": " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "Error read_id " << new_name << ": " << cpp_strerror(-ret) << dendl;
return ret;
}
string old_name = name;
name = new_name;
- ret = update(y);
+ ret = update(dpp, y);
if (ret < 0) {
- ldout(cct, 0) << "Error storing new obj info " << new_name << ": " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "Error storing new obj info " << new_name << ": " << cpp_strerror(-ret) << dendl;
return ret;
}
- ret = store_name(true, y);
+ ret = store_name(dpp, true, y);
if (ret < 0) {
- ldout(cct, 0) << "Error storing new name " << new_name << ": " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "Error storing new name " << new_name << ": " << cpp_strerror(-ret) << dendl;
return ret;
}
/* delete old name */
rgw_raw_obj old_name_obj(pool, oid);
auto obj_ctx = sysobj_svc->init_obj_ctx();
auto sysobj = sysobj_svc->get_obj(obj_ctx, old_name_obj);
- ret = sysobj.wop().remove(y);
+ ret = sysobj.wop().remove(dpp, y);
if (ret < 0) {
- ldout(cct, 0) << "Error delete old obj name " << old_name << ": " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "Error delete old obj name " << old_name << ": " << cpp_strerror(-ret) << dendl;
return ret;
}
return ret;
}
-int RGWSystemMetaObj::read_info(const string& obj_id, optional_yield y,
+int RGWSystemMetaObj::read_info(const DoutPrefixProvider *dpp, const string& obj_id, optional_yield y,
bool old_format)
{
rgw_pool pool(get_pool(cct));
auto obj_ctx = sysobj_svc->init_obj_ctx();
auto sysobj = sysobj_svc->get_obj(obj_ctx, rgw_raw_obj{pool, oid});
- int ret = sysobj.rop().read(&bl, y);
+ int ret = sysobj.rop().read(dpp, &bl, y);
if (ret < 0) {
- ldout(cct, 0) << "failed reading obj info from " << pool << ":" << oid << ": " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "failed reading obj info from " << pool << ":" << oid << ": " << cpp_strerror(-ret) << dendl;
return ret;
}
using ceph::decode;
auto iter = bl.cbegin();
decode(*this, iter);
} catch (buffer::error& err) {
- ldout(cct, 0) << "ERROR: failed to decode obj from " << pool << ":" << oid << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to decode obj from " << pool << ":" << oid << dendl;
return -EIO;
}
return 0;
}
-int RGWSystemMetaObj::read(optional_yield y)
+int RGWSystemMetaObj::read(const DoutPrefixProvider *dpp, optional_yield y)
{
- int ret = read_id(name, id, y);
+ int ret = read_id(dpp, name, id, y);
if (ret < 0) {
return ret;
}
- return read_info(id, y);
+ return read_info(dpp, id, y);
}
-int RGWSystemMetaObj::create(optional_yield y, bool exclusive)
+int RGWSystemMetaObj::create(const DoutPrefixProvider *dpp, optional_yield y, bool exclusive)
{
int ret;
/* check to see the name is not used */
- ret = read_id(name, id, y);
+ ret = read_id(dpp, name, id, y);
if (exclusive && ret == 0) {
- ldout(cct, 10) << "ERROR: name " << name << " already in use for obj id " << id << dendl;
+ ldpp_dout(dpp, 10) << "ERROR: name " << name << " already in use for obj id " << id << dendl;
return -EEXIST;
} else if ( ret < 0 && ret != -ENOENT) {
- ldout(cct, 0) << "failed reading obj id " << id << ": " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "failed reading obj id " << id << ": " << cpp_strerror(-ret) << dendl;
return ret;
}
id = uuid_str;
}
- ret = store_info(exclusive, y);
+ ret = store_info(dpp, exclusive, y);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: storing info for " << id << ": " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: storing info for " << id << ": " << cpp_strerror(-ret) << dendl;
return ret;
}
- return store_name(exclusive, y);
+ return store_name(dpp, exclusive, y);
}
-int RGWSystemMetaObj::store_info(bool exclusive, optional_yield y)
+int RGWSystemMetaObj::store_info(const DoutPrefixProvider *dpp, bool exclusive, optional_yield y)
{
rgw_pool pool(get_pool(cct));
auto sysobj = sysobj_svc->get_obj(obj_ctx, rgw_raw_obj{pool, oid});
return sysobj.wop()
.set_exclusive(exclusive)
- .write(bl, y);
+ .write(dpp, bl, y);
}
-int RGWSystemMetaObj::write(bool exclusive, optional_yield y)
+int RGWSystemMetaObj::write(const DoutPrefixProvider *dpp, bool exclusive, optional_yield y)
{
- int ret = store_info(exclusive, y);
+ int ret = store_info(dpp, exclusive, y);
if (ret < 0) {
- ldout(cct, 20) << __func__ << "(): store_info() returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 20) << __func__ << "(): store_info() returned ret=" << ret << dendl;
return ret;
}
- ret = store_name(exclusive, y);
+ ret = store_name(dpp, exclusive, y);
if (ret < 0) {
- ldout(cct, 20) << __func__ << "(): store_name() returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 20) << __func__ << "(): store_name() returned ret=" << ret << dendl;
return ret;
}
return 0;
return cct->_conf->rgw_realm;
}
-int RGWRealm::create(optional_yield y, bool exclusive)
+int RGWRealm::create(const DoutPrefixProvider *dpp, optional_yield y, bool exclusive)
{
- int ret = RGWSystemMetaObj::create(y, exclusive);
+ int ret = RGWSystemMetaObj::create(dpp, y, exclusive);
if (ret < 0) {
- ldout(cct, 0) << "ERROR creating new realm object " << name << ": " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR creating new realm object " << name << ": " << cpp_strerror(-ret) << dendl;
return ret;
}
// create the control object for watch/notify
- ret = create_control(exclusive, y);
+ ret = create_control(dpp, exclusive, y);
if (ret < 0) {
- ldout(cct, 0) << "ERROR creating control for new realm " << name << ": " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR creating control for new realm " << name << ": " << cpp_strerror(-ret) << dendl;
return ret;
}
RGWPeriod period;
if (current_period.empty()) {
/* create new period for the realm */
- ret = period.init(cct, sysobj_svc, id, y, name, false);
+ ret = period.init(dpp, cct, sysobj_svc, id, y, name, false);
if (ret < 0 ) {
return ret;
}
- ret = period.create(y, true);
+ ret = period.create(dpp, y, true);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: creating new period for realm " << name << ": " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: creating new period for realm " << name << ": " << cpp_strerror(-ret) << dendl;
return ret;
}
} else {
period = RGWPeriod(current_period, 0);
- int ret = period.init(cct, sysobj_svc, id, y, name);
+ int ret = period.init(dpp, cct, sysobj_svc, id, y, name);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: failed to init period " << current_period << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to init period " << current_period << dendl;
return ret;
}
}
- ret = set_current_period(period, y);
+ ret = set_current_period(dpp, period, y);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: failed set current period " << current_period << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed set current period " << current_period << dendl;
return ret;
}
// try to set as default. may race with another create, so pass exclusive=true
// so we don't override an existing default
- ret = set_as_default(y, true);
+ ret = set_as_default(dpp, y, true);
if (ret < 0 && ret != -EEXIST) {
- ldout(cct, 0) << "WARNING: failed to set realm as default realm, ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "WARNING: failed to set realm as default realm, ret=" << ret << dendl;
}
return 0;
}
-int RGWRealm::delete_obj(optional_yield y)
+int RGWRealm::delete_obj(const DoutPrefixProvider *dpp, optional_yield y)
{
- int ret = RGWSystemMetaObj::delete_obj(y);
+ int ret = RGWSystemMetaObj::delete_obj(dpp, y);
if (ret < 0) {
return ret;
}
- return delete_control(y);
+ return delete_control(dpp, y);
}
-int RGWRealm::create_control(bool exclusive, optional_yield y)
+int RGWRealm::create_control(const DoutPrefixProvider *dpp, bool exclusive, optional_yield y)
{
auto pool = rgw_pool{get_pool(cct)};
auto oid = get_control_oid();
auto sysobj = sysobj_svc->get_obj(obj_ctx, rgw_raw_obj{pool, oid});
return sysobj.wop()
.set_exclusive(exclusive)
- .write(bl, y);
+ .write(dpp, bl, y);
}
-int RGWRealm::delete_control(optional_yield y)
+int RGWRealm::delete_control(const DoutPrefixProvider *dpp, optional_yield y)
{
auto pool = rgw_pool{get_pool(cct)};
auto obj = rgw_raw_obj{pool, get_control_oid()};
auto obj_ctx = sysobj_svc->init_obj_ctx();
auto sysobj = sysobj_svc->get_obj(obj_ctx, obj);
- return sysobj.wop().remove(y);
+ return sysobj.wop().remove(dpp, y);
}
rgw_pool RGWRealm::get_pool(CephContext *cct) const
return realm_info_oid_prefix;
}
-int RGWRealm::set_current_period(RGWPeriod& period, optional_yield y)
+int RGWRealm::set_current_period(const DoutPrefixProvider *dpp, RGWPeriod& period, optional_yield y)
{
// update realm epoch to match the period's
if (epoch > period.get_realm_epoch()) {
- ldout(cct, 0) << "ERROR: set_current_period with old realm epoch "
+ ldpp_dout(dpp, 0) << "ERROR: set_current_period with old realm epoch "
<< period.get_realm_epoch() << ", current epoch=" << epoch << dendl;
return -EINVAL;
}
if (epoch == period.get_realm_epoch() && current_period != period.get_id()) {
- ldout(cct, 0) << "ERROR: set_current_period with same realm epoch "
+ ldpp_dout(dpp, 0) << "ERROR: set_current_period with same realm epoch "
<< period.get_realm_epoch() << ", but different period id "
<< period.get_id() << " != " << current_period << dendl;
return -EINVAL;
epoch = period.get_realm_epoch();
current_period = period.get_id();
- int ret = update(y);
+ int ret = update(dpp, y);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: period update: " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: period update: " << cpp_strerror(-ret) << dendl;
return ret;
}
- ret = period.reflect(y);
+ ret = period.reflect(dpp, y);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: period.reflect(): " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: period.reflect(): " << cpp_strerror(-ret) << dendl;
return ret;
}
return get_info_oid_prefix() + id + ".control";
}
-int RGWRealm::notify_zone(bufferlist& bl, optional_yield y)
+int RGWRealm::notify_zone(const DoutPrefixProvider *dpp, bufferlist& bl, optional_yield y)
{
rgw_pool pool{get_pool(cct)};
auto obj_ctx = sysobj_svc->init_obj_ctx();
auto sysobj = sysobj_svc->get_obj(obj_ctx, rgw_raw_obj{pool, get_control_oid()});
- int ret = sysobj.wn().notify(bl, 0, nullptr, y);
+ int ret = sysobj.wn().notify(dpp, bl, 0, nullptr, y);
if (ret < 0) {
return ret;
}
return 0;
}
-int RGWRealm::notify_new_period(const RGWPeriod& period, optional_yield y)
+int RGWRealm::notify_new_period(const DoutPrefixProvider *dpp, const RGWPeriod& period, optional_yield y)
{
bufferlist bl;
using ceph::encode;
// reload the gateway with the new period
encode(RGWRealmNotify::Reload, bl);
- return notify_zone(bl, y);
+ return notify_zone(dpp, bl, y);
}
std::string RGWPeriodConfig::get_oid(const std::string& realm_id)
return {pool_name};
}
-int RGWPeriodConfig::read(RGWSI_SysObj *sysobj_svc, const std::string& realm_id,
+int RGWPeriodConfig::read(const DoutPrefixProvider *dpp, RGWSI_SysObj *sysobj_svc, const std::string& realm_id,
optional_yield y)
{
const auto& pool = get_pool(sysobj_svc->ctx());
auto obj_ctx = sysobj_svc->init_obj_ctx();
auto sysobj = sysobj_svc->get_obj(obj_ctx, rgw_raw_obj{pool, oid});
- int ret = sysobj.rop().read(&bl, y);
+ int ret = sysobj.rop().read(dpp, &bl, y);
if (ret < 0) {
return ret;
}
return 0;
}
-int RGWPeriodConfig::write(RGWSI_SysObj *sysobj_svc,
+int RGWPeriodConfig::write(const DoutPrefixProvider *dpp,
+ RGWSI_SysObj *sysobj_svc,
const std::string& realm_id, optional_yield y)
{
const auto& pool = get_pool(sysobj_svc->ctx());
auto sysobj = sysobj_svc->get_obj(obj_ctx, rgw_raw_obj{pool, oid});
return sysobj.wop()
.set_exclusive(false)
- .write(bl, y);
+ .write(dpp, bl, y);
}
-int RGWPeriod::init(CephContext *_cct, RGWSI_SysObj *_sysobj_svc,
+int RGWPeriod::init(const DoutPrefixProvider *dpp, CephContext *_cct, RGWSI_SysObj *_sysobj_svc,
const string& period_realm_id, optional_yield y,
const string& period_realm_name, bool setup_obj)
{
if (!setup_obj)
return 0;
- return init(_cct, _sysobj_svc, y, setup_obj);
+ return init(dpp, _cct, _sysobj_svc, y, setup_obj);
}
-int RGWPeriod::init(CephContext *_cct, RGWSI_SysObj *_sysobj_svc,
+int RGWPeriod::init(const DoutPrefixProvider *dpp,
+ CephContext *_cct, RGWSI_SysObj *_sysobj_svc,
optional_yield y, bool setup_obj)
{
cct = _cct;
if (id.empty()) {
RGWRealm realm(realm_id, realm_name);
- int ret = realm.init(cct, sysobj_svc, y);
+ int ret = realm.init(dpp, cct, sysobj_svc, y);
if (ret < 0) {
- ldout(cct, 0) << "RGWPeriod::init failed to init realm " << realm_name << " id " << realm_id << " : " <<
+ ldpp_dout(dpp, 0) << "RGWPeriod::init failed to init realm " << realm_name << " id " << realm_id << " : " <<
cpp_strerror(-ret) << dendl;
return ret;
}
}
if (!epoch) {
- int ret = use_latest_epoch(y);
+ int ret = use_latest_epoch(dpp, y);
if (ret < 0) {
- ldout(cct, 0) << "failed to use_latest_epoch period id " << id << " realm " << realm_name << " id " << realm_id
+ ldpp_dout(dpp, 0) << "failed to use_latest_epoch period id " << id << " realm " << realm_name << " id " << realm_id
<< " : " << cpp_strerror(-ret) << dendl;
return ret;
}
}
- return read_info(y);
+ return read_info(dpp, y);
}
return oss.str();
}
-int RGWPeriod::read_latest_epoch(RGWPeriodLatestEpochInfo& info,
+int RGWPeriod::read_latest_epoch(const DoutPrefixProvider *dpp,
+ RGWPeriodLatestEpochInfo& info,
optional_yield y,
RGWObjVersionTracker *objv)
{
bufferlist bl;
auto obj_ctx = sysobj_svc->init_obj_ctx();
auto sysobj = sysobj_svc->get_obj(obj_ctx, rgw_raw_obj{pool, oid});
- int ret = sysobj.rop().read(&bl, y);
+ int ret = sysobj.rop().read(dpp, &bl, y);
if (ret < 0) {
- ldout(cct, 1) << "error read_lastest_epoch " << pool << ":" << oid << dendl;
+ ldpp_dout(dpp, 1) << "error read_lastest_epoch " << pool << ":" << oid << dendl;
return ret;
}
try {
using ceph::decode;
decode(info, iter);
} catch (buffer::error& err) {
- ldout(cct, 0) << "error decoding data from " << pool << ":" << oid << dendl;
+ ldpp_dout(dpp, 0) << "error decoding data from " << pool << ":" << oid << dendl;
return -EIO;
}
return 0;
}
-int RGWPeriod::get_latest_epoch(epoch_t& latest_epoch, optional_yield y)
+int RGWPeriod::get_latest_epoch(const DoutPrefixProvider *dpp, epoch_t& latest_epoch, optional_yield y)
{
RGWPeriodLatestEpochInfo info;
- int ret = read_latest_epoch(info, y);
+ int ret = read_latest_epoch(dpp, info, y);
if (ret < 0) {
return ret;
}
return 0;
}
-int RGWPeriod::use_latest_epoch(optional_yield y)
+int RGWPeriod::use_latest_epoch(const DoutPrefixProvider *dpp, optional_yield y)
{
RGWPeriodLatestEpochInfo info;
- int ret = read_latest_epoch(info, y);
+ int ret = read_latest_epoch(dpp, info, y);
if (ret < 0) {
return ret;
}
return 0;
}
-int RGWPeriod::set_latest_epoch(optional_yield y,
+int RGWPeriod::set_latest_epoch(const DoutPrefixProvider *dpp,
+ optional_yield y,
epoch_t epoch, bool exclusive,
RGWObjVersionTracker *objv)
{
auto sysobj = sysobj_svc->get_obj(obj_ctx, rgw_raw_obj(pool, oid));
return sysobj.wop()
.set_exclusive(exclusive)
- .write(bl, y);
+ .write(dpp, bl, y);
}
-int RGWPeriod::update_latest_epoch(epoch_t epoch, optional_yield y)
+int RGWPeriod::update_latest_epoch(const DoutPrefixProvider *dpp, epoch_t epoch, optional_yield y)
{
static constexpr int MAX_RETRIES = 20;
bool exclusive = false;
// read existing epoch
- int r = read_latest_epoch(info, y, &objv);
+ int r = read_latest_epoch(dpp, info, y, &objv);
if (r == -ENOENT) {
// use an exclusive create to set the epoch atomically
exclusive = true;
- ldout(cct, 20) << "creating initial latest_epoch=" << epoch
+ ldpp_dout(dpp, 20) << "creating initial latest_epoch=" << epoch
<< " for period=" << id << dendl;
} else if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to read latest_epoch" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to read latest_epoch" << dendl;
return r;
} else if (epoch <= info.epoch) {
r = -EEXIST; // fail with EEXIST if epoch is not newer
- ldout(cct, 10) << "found existing latest_epoch " << info.epoch
+ ldpp_dout(dpp, 10) << "found existing latest_epoch " << info.epoch
<< " >= given epoch " << epoch << ", returning r=" << r << dendl;
return r;
} else {
- ldout(cct, 20) << "updating latest_epoch from " << info.epoch
+ ldpp_dout(dpp, 20) << "updating latest_epoch from " << info.epoch
<< " -> " << epoch << " on period=" << id << dendl;
}
- r = set_latest_epoch(y, epoch, exclusive, &objv);
+ r = set_latest_epoch(dpp, y, epoch, exclusive, &objv);
if (r == -EEXIST) {
continue; // exclusive create raced with another update, retry
} else if (r == -ECANCELED) {
continue; // write raced with a conflicting version, retry
}
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to write latest_epoch" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to write latest_epoch" << dendl;
return r;
}
return 0; // return success
return -ECANCELED; // fail after max retries
}
-int RGWPeriod::delete_obj(optional_yield y)
+int RGWPeriod::delete_obj(const DoutPrefixProvider *dpp, optional_yield y)
{
rgw_pool pool(get_pool(cct));
rgw_raw_obj oid{pool, p.get_period_oid()};
auto obj_ctx = sysobj_svc->init_obj_ctx();
auto sysobj = sysobj_svc->get_obj(obj_ctx, oid);
- int ret = sysobj.wop().remove(y);
+ int ret = sysobj.wop().remove(dpp, y);
if (ret < 0) {
- ldout(cct, 0) << "WARNING: failed to delete period object " << oid
+ ldpp_dout(dpp, 0) << "WARNING: failed to delete period object " << oid
<< ": " << cpp_strerror(-ret) << dendl;
}
}
rgw_raw_obj oid{pool, get_period_oid_prefix() + get_latest_epoch_oid()};
auto obj_ctx = sysobj_svc->init_obj_ctx();
auto sysobj = sysobj_svc->get_obj(obj_ctx, oid);
- int ret = sysobj.wop().remove(y);
+ int ret = sysobj.wop().remove(dpp, y);
if (ret < 0) {
- ldout(cct, 0) << "WARNING: failed to delete period object " << oid
+ ldpp_dout(dpp, 0) << "WARNING: failed to delete period object " << oid
<< ": " << cpp_strerror(-ret) << dendl;
}
return ret;
}
-int RGWPeriod::read_info(optional_yield y)
+int RGWPeriod::read_info(const DoutPrefixProvider *dpp, optional_yield y)
{
rgw_pool pool(get_pool(cct));
auto obj_ctx = sysobj_svc->init_obj_ctx();
auto sysobj = sysobj_svc->get_obj(obj_ctx, rgw_raw_obj{pool, get_period_oid()});
- int ret = sysobj.rop().read(&bl, y);
+ int ret = sysobj.rop().read(dpp, &bl, y);
if (ret < 0) {
- ldout(cct, 0) << "failed reading obj info from " << pool << ":" << get_period_oid() << ": " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "failed reading obj info from " << pool << ":" << get_period_oid() << ": " << cpp_strerror(-ret) << dendl;
return ret;
}
auto iter = bl.cbegin();
decode(*this, iter);
} catch (buffer::error& err) {
- ldout(cct, 0) << "ERROR: failed to decode obj from " << pool << ":" << get_period_oid() << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to decode obj from " << pool << ":" << get_period_oid() << dendl;
return -EIO;
}
return 0;
}
-int RGWPeriod::create(optional_yield y, bool exclusive)
+int RGWPeriod::create(const DoutPrefixProvider *dpp, optional_yield y, bool exclusive)
{
int ret;
period_map.id = id;
- ret = store_info(exclusive, y);
+ ret = store_info(dpp, exclusive, y);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: storing info for " << id << ": " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: storing info for " << id << ": " << cpp_strerror(-ret) << dendl;
return ret;
}
- ret = set_latest_epoch(y, epoch);
+ ret = set_latest_epoch(dpp, y, epoch);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: setting latest epoch " << id << ": " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: setting latest epoch " << id << ": " << cpp_strerror(-ret) << dendl;
}
return ret;
}
-int RGWPeriod::store_info(bool exclusive, optional_yield y)
+int RGWPeriod::store_info(const DoutPrefixProvider *dpp, bool exclusive, optional_yield y)
{
rgw_pool pool(get_pool(cct));
auto sysobj = sysobj_svc->get_obj(obj_ctx, rgw_raw_obj(pool, oid));
return sysobj.wop()
.set_exclusive(exclusive)
- .write(bl, y);
+ .write(dpp, bl, y);
}
rgw_pool RGWPeriod::get_pool(CephContext *cct) const
return rgw_pool(cct->_conf->rgw_period_root_pool);
}
-int RGWPeriod::add_zonegroup(const RGWZoneGroup& zonegroup, optional_yield y)
+int RGWPeriod::add_zonegroup(const DoutPrefixProvider *dpp, const RGWZoneGroup& zonegroup, optional_yield y)
{
if (zonegroup.realm_id != realm_id) {
return 0;
}
int ret = period_map.update(zonegroup, cct);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: updating period map: " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: updating period map: " << cpp_strerror(-ret) << dendl;
return ret;
}
- return store_info(false, y);
+ return store_info(dpp, false, y);
}
-int RGWPeriod::update(optional_yield y)
+int RGWPeriod::update(const DoutPrefixProvider *dpp, optional_yield y)
{
auto zone_svc = sysobj_svc->get_zone_svc();
- ldout(cct, 20) << __func__ << " realm " << realm_id << " period " << get_id() << dendl;
+ ldpp_dout(dpp, 20) << __func__ << " realm " << realm_id << " period " << get_id() << dendl;
list<string> zonegroups;
- int ret = zone_svc->list_zonegroups(zonegroups);
+ int ret = zone_svc->list_zonegroups(dpp, zonegroups);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: failed to list zonegroups: " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to list zonegroups: " << cpp_strerror(-ret) << dendl;
return ret;
}
for (auto& iter : zonegroups) {
RGWZoneGroup zg(string(), iter);
- ret = zg.init(cct, sysobj_svc, y);
+ ret = zg.init(dpp, cct, sysobj_svc, y);
if (ret < 0) {
- ldout(cct, 0) << "WARNING: zg.init() failed: " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "WARNING: zg.init() failed: " << cpp_strerror(-ret) << dendl;
continue;
}
if (zg.realm_id != realm_id) {
- ldout(cct, 20) << "skipping zonegroup " << zg.get_name() << " zone realm id " << zg.realm_id << ", not on our realm " << realm_id << dendl;
+ ldpp_dout(dpp, 20) << "skipping zonegroup " << zg.get_name() << " zone realm id " << zg.realm_id << ", not on our realm " << realm_id << dendl;
continue;
}
if (zg.master_zone.empty()) {
- ldout(cct, 0) << "ERROR: zonegroup " << zg.get_name() << " should have a master zone " << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: zonegroup " << zg.get_name() << " should have a master zone " << dendl;
return -EINVAL;
}
if (zg.zones.find(zg.master_zone) == zg.zones.end()) {
- ldout(cct,0) << "ERROR: zonegroup " << zg.get_name()
+ ldpp_dout(dpp, 0) << "ERROR: zonegroup " << zg.get_name()
<< " has a non existent master zone "<< dendl;
return -EINVAL;
}
}
}
- ret = period_config.read(sysobj_svc, realm_id, y);
+ ret = period_config.read(dpp, sysobj_svc, realm_id, y);
if (ret < 0 && ret != -ENOENT) {
- ldout(cct, 0) << "ERROR: failed to read period config: "
+ ldpp_dout(dpp, 0) << "ERROR: failed to read period config: "
<< cpp_strerror(ret) << dendl;
return ret;
}
return 0;
}
-int RGWPeriod::reflect(optional_yield y)
+int RGWPeriod::reflect(const DoutPrefixProvider *dpp, optional_yield y)
{
for (auto& iter : period_map.zonegroups) {
RGWZoneGroup& zg = iter.second;
zg.reinit_instance(cct, sysobj_svc);
- int r = zg.write(false, y);
+ int r = zg.write(dpp, false, y);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to store zonegroup info for zonegroup=" << iter.first << ": " << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to store zonegroup info for zonegroup=" << iter.first << ": " << cpp_strerror(-r) << dendl;
return r;
}
if (zg.is_master_zonegroup()) {
// set master as default if no default exists
- r = zg.set_as_default(y, true);
+ r = zg.set_as_default(dpp, y, true);
if (r == 0) {
- ldout(cct, 1) << "Set the period's master zonegroup " << zg.get_id()
+ ldpp_dout(dpp, 1) << "Set the period's master zonegroup " << zg.get_id()
<< " as the default" << dendl;
}
}
}
- int r = period_config.write(sysobj_svc, realm_id, y);
+ int r = period_config.write(dpp, sysobj_svc, realm_id, y);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to store period config: "
+ ldpp_dout(dpp, 0) << "ERROR: failed to store period config: "
<< cpp_strerror(-r) << dendl;
return r;
}
realm_epoch++;
}
-static int read_sync_status(rgw::sal::RGWRadosStore *store, rgw_meta_sync_status *sync_status)
+static int read_sync_status(const DoutPrefixProvider *dpp, rgw::sal::RGWRadosStore *store, rgw_meta_sync_status *sync_status)
{
// initialize a sync status manager to read the status
RGWMetaSyncStatusManager mgr(store, store->svc()->rados->get_async_processor());
- int r = mgr.init();
+ int r = mgr.init(dpp);
if (r < 0) {
return r;
}
- r = mgr.read_sync_status(sync_status);
+ r = mgr.read_sync_status(dpp, sync_status);
mgr.stop();
return r;
}
-int RGWPeriod::update_sync_status(rgw::sal::RGWRadosStore *store, /* for now */
+int RGWPeriod::update_sync_status(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store, /* for now */
const RGWPeriod ¤t_period,
std::ostream& error_stream,
bool force_if_stale)
{
rgw_meta_sync_status status;
- int r = read_sync_status(store, &status);
+ int r = read_sync_status(dpp, store, &status);
if (r < 0) {
- ldout(cct, 0) << "period failed to read sync status: "
+ ldpp_dout(dpp, 0) << "period failed to read sync status: "
<< cpp_strerror(-r) << dendl;
return r;
}
return 0;
}
-int RGWPeriod::commit(rgw::sal::RGWRadosStore *store,
+int RGWPeriod::commit(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store,
RGWRealm& realm, const RGWPeriod& current_period,
std::ostream& error_stream, optional_yield y,
bool force_if_stale)
{
auto zone_svc = sysobj_svc->get_zone_svc();
- ldout(cct, 20) << __func__ << " realm " << realm.get_id() << " period " << current_period.get_id() << dendl;
+ ldpp_dout(dpp, 20) << __func__ << " realm " << realm.get_id() << " period " << current_period.get_id() << dendl;
// gateway must be in the master zone to commit
if (master_zone != zone_svc->get_zone_params().get_id()) {
error_stream << "Cannot commit period on zone "
// did the master zone change?
if (master_zone != current_period.get_master_zone()) {
// store the current metadata sync status in the period
- int r = update_sync_status(store, current_period, error_stream, force_if_stale);
+ int r = update_sync_status(dpp, store, current_period, error_stream, force_if_stale);
if (r < 0) {
- ldout(cct, 0) << "failed to update metadata sync status: "
+ ldpp_dout(dpp, 0) << "failed to update metadata sync status: "
<< cpp_strerror(-r) << dendl;
return r;
}
// create an object with a new period id
- r = create(y, true);
+ r = create(dpp, y, true);
if (r < 0) {
- ldout(cct, 0) << "failed to create new period: " << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "failed to create new period: " << cpp_strerror(-r) << dendl;
return r;
}
// set as current period
- r = realm.set_current_period(*this, y);
+ r = realm.set_current_period(dpp, *this, y);
if (r < 0) {
- ldout(cct, 0) << "failed to update realm's current period: "
+ ldpp_dout(dpp, 0) << "failed to update realm's current period: "
<< cpp_strerror(-r) << dendl;
return r;
}
- ldout(cct, 4) << "Promoted to master zone and committed new period "
+ ldpp_dout(dpp, 4) << "Promoted to master zone and committed new period "
<< id << dendl;
- realm.notify_new_period(*this, y);
+ realm.notify_new_period(dpp, *this, y);
return 0;
}
// period must be based on current epoch
set_predecessor(current_period.get_predecessor());
realm_epoch = current_period.get_realm_epoch();
// write the period to rados
- int r = store_info(false, y);
+ int r = store_info(dpp, false, y);
if (r < 0) {
- ldout(cct, 0) << "failed to store period: " << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "failed to store period: " << cpp_strerror(-r) << dendl;
return r;
}
// set as latest epoch
- r = update_latest_epoch(epoch, y);
+ r = update_latest_epoch(dpp, epoch, y);
if (r == -EEXIST) {
// already have this epoch (or a more recent one)
return 0;
}
if (r < 0) {
- ldout(cct, 0) << "failed to set latest epoch: " << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "failed to set latest epoch: " << cpp_strerror(-r) << dendl;
return r;
}
- r = reflect(y);
+ r = reflect(dpp, y);
if (r < 0) {
- ldout(cct, 0) << "failed to update local objects: " << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "failed to update local objects: " << cpp_strerror(-r) << dendl;
return r;
}
- ldout(cct, 4) << "Committed new epoch " << epoch
+ ldpp_dout(dpp, 4) << "Committed new epoch " << epoch
<< " for period " << id << dendl;
- realm.notify_new_period(*this, y);
+ realm.notify_new_period(dpp, *this, y);
return 0;
}
-int RGWZoneParams::create_default(optional_yield y, bool old_format)
+int RGWZoneParams::create_default(const DoutPrefixProvider *dpp, optional_yield y, bool old_format)
{
name = default_zone_name;
- int r = create(y);
+ int r = create(dpp, y);
if (r < 0) {
return r;
}
namespace {
-int get_zones_pool_set(CephContext* cct,
+int get_zones_pool_set(const DoutPrefixProvider *dpp,
+ CephContext* cct,
RGWSI_SysObj* sysobj_svc,
const list<string>& zones,
const string& my_zone_id,
{
for(auto const& iter : zones) {
RGWZoneParams zone(iter);
- int r = zone.init(cct, sysobj_svc, y);
+ int r = zone.init(dpp, cct, sysobj_svc, y);
if (r < 0) {
- ldout(cct, 0) << "Error: init zone " << iter << ":" << cpp_strerror(-r) << dendl;
+ ldpp_dout(dpp, 0) << "Error: init zone " << iter << ":" << cpp_strerror(-r) << dendl;
return r;
}
if (zone.get_id() != my_zone_id) {
}
}
-int RGWZoneParams::fix_pool_names(optional_yield y)
+int RGWZoneParams::fix_pool_names(const DoutPrefixProvider *dpp, optional_yield y)
{
list<string> zones;
- int r = zone_svc->list_zones(zones);
+ int r = zone_svc->list_zones(dpp, zones);
if (r < 0) {
- ldout(cct, 10) << "WARNING: store->list_zones() returned r=" << r << dendl;
+ ldpp_dout(dpp, 10) << "WARNING: store->list_zones() returned r=" << r << dendl;
}
set<rgw_pool> pools;
- r = get_zones_pool_set(cct, sysobj_svc, zones, id, pools, y);
+ r = get_zones_pool_set(dpp, cct, sysobj_svc, zones, id, pools, y);
if (r < 0) {
- ldout(cct, 0) << "Error: get_zones_pool_names" << r << dendl;
+ ldpp_dout(dpp, 0) << "Error: get_zones_pool_names" << r << dendl;
return r;
}
return 0;
}
-int RGWZoneParams::create(optional_yield y, bool exclusive)
+int RGWZoneParams::create(const DoutPrefixProvider *dpp, optional_yield y, bool exclusive)
{
/* check for old pools config */
rgw_raw_obj obj(domain_root, avail_pools);
auto obj_ctx = sysobj_svc->init_obj_ctx();
auto sysobj = sysobj_svc->get_obj(obj_ctx, obj);
- int r = sysobj.rop().stat(y);
+ int r = sysobj.rop().stat(y, dpp);
if (r < 0) {
- ldout(cct, 10) << "couldn't find old data placement pools config, setting up new ones for the zone" << dendl;
+ ldpp_dout(dpp, 10) << "couldn't find old data placement pools config, setting up new ones for the zone" << dendl;
/* a new system, let's set new placement info */
RGWZonePlacementInfo default_placement;
default_placement.index_pool = name + "." + default_bucket_index_pool_suffix;
placement_pools["default-placement"] = default_placement;
}
- r = fix_pool_names(y);
+ r = fix_pool_names(dpp, y);
if (r < 0) {
- ldout(cct, 0) << "ERROR: fix_pool_names returned r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: fix_pool_names returned r=" << r << dendl;
return r;
}
- r = RGWSystemMetaObj::create(y, exclusive);
+ r = RGWSystemMetaObj::create(dpp, y, exclusive);
if (r < 0) {
return r;
}
// try to set as default. may race with another create, so pass exclusive=true
// so we don't override an existing default
- r = set_as_default(y, true);
+ r = set_as_default(dpp, y, true);
if (r < 0 && r != -EEXIST) {
- ldout(cct, 10) << "WARNING: failed to set zone as default, r=" << r << dendl;
+ ldpp_dout(dpp, 10) << "WARNING: failed to set zone as default, r=" << r << dendl;
}
return 0;
return cct->_conf->rgw_zone;
}
-int RGWZoneParams::init(CephContext *cct, RGWSI_SysObj *sysobj_svc,
+int RGWZoneParams::init(const DoutPrefixProvider *dpp,
+ CephContext *cct, RGWSI_SysObj *sysobj_svc,
optional_yield y, bool setup_obj, bool old_format)
{
if (name.empty()) {
name = cct->_conf->rgw_zone;
}
- return RGWSystemMetaObj::init(cct, sysobj_svc, y, setup_obj, old_format);
+ return RGWSystemMetaObj::init(dpp, cct, sysobj_svc, y, setup_obj, old_format);
}
-int RGWZoneParams::read_default_id(string& default_id, optional_yield y,
+int RGWZoneParams::read_default_id(const DoutPrefixProvider *dpp, string& default_id, optional_yield y,
bool old_format)
{
if (realm_id.empty()) {
/* try using default realm */
RGWRealm realm;
- int ret = realm.init(cct, sysobj_svc, y);
+ int ret = realm.init(dpp, cct, sysobj_svc, y);
//no default realm exist
if (ret < 0) {
- return read_id(default_zone_name, default_id, y);
+ return read_id(dpp, default_zone_name, default_id, y);
}
realm_id = realm.get_id();
}
- return RGWSystemMetaObj::read_default_id(default_id, y, old_format);
+ return RGWSystemMetaObj::read_default_id(dpp, default_id, y, old_format);
}
-int RGWZoneParams::set_as_default(optional_yield y, bool exclusive)
+int RGWZoneParams::set_as_default(const DoutPrefixProvider *dpp, optional_yield y, bool exclusive)
{
if (realm_id.empty()) {
/* try using default realm */
RGWRealm realm;
- int ret = realm.init(cct, sysobj_svc, y);
+ int ret = realm.init(dpp, cct, sysobj_svc, y);
if (ret < 0) {
- ldout(cct, 10) << "could not read realm id: " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 10) << "could not read realm id: " << cpp_strerror(-ret) << dendl;
return -EINVAL;
}
realm_id = realm.get_id();
}
- return RGWSystemMetaObj::set_as_default(y, exclusive);
+ return RGWSystemMetaObj::set_as_default(dpp, y, exclusive);
}
const string& RGWZoneParams::get_compression_type(const rgw_placement_rule& placement_rule) const
return i->second;
}
-int RGWZoneGroupMap::read(CephContext *cct, RGWSI_SysObj *sysobj_svc, optional_yield y)
+int RGWZoneGroupMap::read(const DoutPrefixProvider *dpp, CephContext *cct, RGWSI_SysObj *sysobj_svc, optional_yield y)
{
RGWPeriod period;
- int ret = period.init(cct, sysobj_svc, y);
+ int ret = period.init(dpp, cct, sysobj_svc, y);
if (ret < 0) {
cerr << "failed to read current period info: " << cpp_strerror(ret);
return ret;
RGWSI_SysObj *sysobj_svc{nullptr};
RGWSI_Zone *zone_svc{nullptr};
- int store_name(bool exclusive, optional_yield y);
- int store_info(bool exclusive, optional_yield y);
- int read_info(const std::string& obj_id, optional_yield y, bool old_format = false);
- int read_id(const std::string& obj_name, std::string& obj_id, optional_yield y);
- int read_default(RGWDefaultSystemMetaObjInfo& default_info,
+ int store_name(const DoutPrefixProvider *dpp, bool exclusive, optional_yield y);
+ int store_info(const DoutPrefixProvider *dpp, bool exclusive, optional_yield y);
+ int read_info(const DoutPrefixProvider *dpp, const std::string& obj_id, optional_yield y, bool old_format = false);
+ int read_id(const DoutPrefixProvider *dpp, const std::string& obj_name, std::string& obj_id, optional_yield y);
+ int read_default(const DoutPrefixProvider *dpp,
+ RGWDefaultSystemMetaObjInfo& default_info,
const std::string& oid,
optional_yield y);
/* read and use default id */
- int use_default(optional_yield y, bool old_format = false);
+ int use_default(const DoutPrefixProvider *dpp, optional_yield y, bool old_format = false);
public:
RGWSystemMetaObj() {}
}
void reinit_instance(CephContext *_cct, RGWSI_SysObj *_sysobj_svc);
- int init(CephContext *_cct, RGWSI_SysObj *_sysobj_svc,
+ int init(const DoutPrefixProvider *dpp, CephContext *_cct, RGWSI_SysObj *_sysobj_svc,
optional_yield y,
bool setup_obj = true, bool old_format = false);
- virtual int read_default_id(std::string& default_id, optional_yield y,
+ virtual int read_default_id(const DoutPrefixProvider *dpp, std::string& default_id, optional_yield y,
bool old_format = false);
- virtual int set_as_default(optional_yield y, bool exclusive = false);
+ virtual int set_as_default(const DoutPrefixProvider *dpp, optional_yield y, bool exclusive = false);
int delete_default();
- virtual int create(optional_yield y, bool exclusive = true);
- int delete_obj(optional_yield y, bool old_format = false);
- int rename(const std::string& new_name, optional_yield y);
- int update(optional_yield y) { return store_info(false, y);}
- int update_name(optional_yield y) { return store_name(false, y);}
- int read(optional_yield y);
- int write(bool exclusive, optional_yield y);
+ virtual int create(const DoutPrefixProvider *dpp, optional_yield y, bool exclusive = true);
+ int delete_obj(const DoutPrefixProvider *dpp, optional_yield y, bool old_format = false);
+ int rename(const DoutPrefixProvider *dpp, const std::string& new_name, optional_yield y);
+ int update(const DoutPrefixProvider *dpp, optional_yield y) { return store_info(dpp, false, y);}
+ int update_name(const DoutPrefixProvider *dpp, optional_yield y) { return store_name(dpp, false, y);}
+ int read(const DoutPrefixProvider *dpp, optional_yield y);
+ int write(const DoutPrefixProvider *dpp, bool exclusive, optional_yield y);
virtual rgw_pool get_pool(CephContext *cct) const = 0;
virtual const std::string get_default_oid(bool old_format = false) const = 0;
const std::string& get_info_oid_prefix(bool old_format = false) const override;
const std::string& get_predefined_name(CephContext *cct) const override;
- int init(CephContext *_cct, RGWSI_SysObj *_sysobj_svc, optional_yield y,
+ int init(const DoutPrefixProvider *dpp,
+ CephContext *_cct, RGWSI_SysObj *_sysobj_svc, optional_yield y,
bool setup_obj = true, bool old_format = false);
using RGWSystemMetaObj::init;
- int read_default_id(std::string& default_id, optional_yield y, bool old_format = false) override;
- int set_as_default(optional_yield y, bool exclusive = false) override;
- int create_default(optional_yield y, bool old_format = false);
- int create(optional_yield y, bool exclusive = true) override;
- int fix_pool_names(optional_yield y);
+ int read_default_id(const DoutPrefixProvider *dpp, std::string& default_id, optional_yield y, bool old_format = false) override;
+ int set_as_default(const DoutPrefixProvider *dpp, optional_yield y, bool exclusive = false) override;
+ int create_default(const DoutPrefixProvider *dpp, optional_yield y, bool old_format = false);
+ int create(const DoutPrefixProvider *dpp, optional_yield y, bool exclusive = true) override;
+ int fix_pool_names(const DoutPrefixProvider *dpp, optional_yield y);
const string& get_compression_type(const rgw_placement_rule& placement_rule) const;
realm_id(_realm_id) {}
bool is_master_zonegroup() const { return is_master;}
- void update_master(bool _is_master, optional_yield y) {
+ void update_master(const DoutPrefixProvider *dpp, bool _is_master, optional_yield y) {
is_master = _is_master;
- post_process_params(y);
+ post_process_params(dpp, y);
}
- void post_process_params(optional_yield y);
+ void post_process_params(const DoutPrefixProvider *dpp, optional_yield y);
void encode(bufferlist& bl) const override {
ENCODE_START(5, 1, bl);
DECODE_FINISH(bl);
}
- int read_default_id(std::string& default_id, optional_yield y, bool old_format = false) override;
- int set_as_default(optional_yield y, bool exclusive = false) override;
- int create_default(optional_yield y, bool old_format = false);
+ int read_default_id(const DoutPrefixProvider *dpp, std::string& default_id, optional_yield y, bool old_format = false) override;
+ int set_as_default(const DoutPrefixProvider *dpp, optional_yield y, bool exclusive = false) override;
+ int create_default(const DoutPrefixProvider *dpp, optional_yield y, bool old_format = false);
int equals(const std::string& other_zonegroup) const;
- int add_zone(const RGWZoneParams& zone_params, bool *is_master, bool *read_only,
+ int add_zone(const DoutPrefixProvider *dpp,
+ const RGWZoneParams& zone_params, bool *is_master, bool *read_only,
const list<std::string>& endpoints, const std::string *ptier_type,
bool *psync_from_all, list<std::string>& sync_from,
list<std::string>& sync_from_rm, std::string *predirect_zone,
std::optional<int> bucket_index_max_shards, RGWSyncModulesManager *sync_mgr,
optional_yield y);
- int remove_zone(const std::string& zone_id, optional_yield y);
- int rename_zone(const RGWZoneParams& zone_params, optional_yield y);
+ int remove_zone(const DoutPrefixProvider *dpp, const std::string& zone_id, optional_yield y);
+ int rename_zone(const DoutPrefixProvider *dpp, const RGWZoneParams& zone_params, optional_yield y);
rgw_pool get_pool(CephContext *cct) const override;
const std::string get_default_oid(bool old_region_format = false) const override;
const std::string& get_info_oid_prefix(bool old_region_format = false) const override;
// the period config must be stored in a local object outside of the period,
// so that it can be used in a default configuration where no realm/period
// exists
- int read(RGWSI_SysObj *sysobj_svc, const std::string& realm_id, optional_yield y);
- int write(RGWSI_SysObj *sysobj_svc, const std::string& realm_id, optional_yield y);
+ int read(const DoutPrefixProvider *dpp, RGWSI_SysObj *sysobj_svc, const std::string& realm_id, optional_yield y);
+ int write(const DoutPrefixProvider *dpp, RGWSI_SysObj *sysobj_svc, const std::string& realm_id, optional_yield y);
static std::string get_oid(const std::string& realm_id);
static rgw_pool get_pool(CephContext *cct);
RGWQuotaInfo user_quota;
/* construct the map */
- int read(CephContext *cct, RGWSI_SysObj *sysobj_svc, optional_yield y);
+ int read(const DoutPrefixProvider *dpp, CephContext *cct, RGWSI_SysObj *sysobj_svc, optional_yield y);
void encode(bufferlist& bl) const;
void decode(bufferlist::const_iterator& bl);
std::string current_period;
epoch_t epoch{0}; //< realm epoch, incremented for each new period
- int create_control(bool exclusive, optional_yield y);
- int delete_control(optional_yield y);
+ int create_control(const DoutPrefixProvider *dpp, bool exclusive, optional_yield y);
+ int delete_control(const DoutPrefixProvider *dpp, optional_yield y);
public:
RGWRealm() {}
RGWRealm(const std::string& _id, const std::string& _name = "") : RGWSystemMetaObj(_id, _name) {}
DECODE_FINISH(bl);
}
- int create(optional_yield y, bool exclusive = true) override;
- int delete_obj(optional_yield y);
+ int create(const DoutPrefixProvider *dpp, optional_yield y, bool exclusive = true) override;
+ int delete_obj(const DoutPrefixProvider *dpp, optional_yield y);
rgw_pool get_pool(CephContext *cct) const override;
const std::string get_default_oid(bool old_format = false) const override;
const std::string& get_names_oid_prefix() const override;
const std::string& get_current_period() const {
return current_period;
}
- int set_current_period(RGWPeriod& period, optional_yield y);
+ int set_current_period(const DoutPrefixProvider *dpp, RGWPeriod& period, optional_yield y);
void clear_current_period_and_epoch() {
current_period.clear();
epoch = 0;
std::string get_control_oid() const;
/// send a notify on the realm control object
- int notify_zone(bufferlist& bl, optional_yield y);
+ int notify_zone(const DoutPrefixProvider *dpp, bufferlist& bl, optional_yield y);
/// notify the zone of a new period
- int notify_new_period(const RGWPeriod& period, optional_yield y);
+ int notify_new_period(const DoutPrefixProvider *dpp, const RGWPeriod& period, optional_yield y);
};
WRITE_CLASS_ENCODER(RGWRealm)
CephContext *cct{nullptr};
RGWSI_SysObj *sysobj_svc{nullptr};
- int read_info(optional_yield y);
- int read_latest_epoch(RGWPeriodLatestEpochInfo& epoch_info,
+ int read_info(const DoutPrefixProvider *dpp, optional_yield y);
+ int read_latest_epoch(const DoutPrefixProvider *dpp,
+ RGWPeriodLatestEpochInfo& epoch_info,
optional_yield y,
RGWObjVersionTracker *objv = nullptr);
- int use_latest_epoch(optional_yield y);
+ int use_latest_epoch(const DoutPrefixProvider *dpp, optional_yield y);
int use_current_period();
const std::string get_period_oid() const;
const std::string get_period_oid_prefix() const;
// gather the metadata sync status for each shard; only for use on master zone
- int update_sync_status(rgw::sal::RGWRadosStore *store,
+ int update_sync_status(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store,
const RGWPeriod ¤t_period,
std::ostream& error_stream, bool force_if_stale);
realm_id = _realm_id;
}
- int reflect(optional_yield y);
+ int reflect(const DoutPrefixProvider *dpp, optional_yield y);
int get_zonegroup(RGWZoneGroup& zonegroup,
const std::string& zonegroup_id) const;
return false;
}
- int get_latest_epoch(epoch_t& epoch, optional_yield y);
- int set_latest_epoch(optional_yield y,
+ int get_latest_epoch(const DoutPrefixProvider *dpp, epoch_t& epoch, optional_yield y);
+ int set_latest_epoch(const DoutPrefixProvider *dpp, optional_yield y,
epoch_t epoch, bool exclusive = false,
RGWObjVersionTracker *objv = nullptr);
// update latest_epoch if the given epoch is higher, else return -EEXIST
- int update_latest_epoch(epoch_t epoch, optional_yield y);
+ int update_latest_epoch(const DoutPrefixProvider *dpp, epoch_t epoch, optional_yield y);
- int init(CephContext *_cct, RGWSI_SysObj *_sysobj_svc, const std::string &period_realm_id, optional_yield y,
+ int init(const DoutPrefixProvider *dpp, CephContext *_cct, RGWSI_SysObj *_sysobj_svc, const std::string &period_realm_id, optional_yield y,
const std::string &period_realm_name = "", bool setup_obj = true);
- int init(CephContext *_cct, RGWSI_SysObj *_sysobj_svc, optional_yield y, bool setup_obj = true);
+ int init(const DoutPrefixProvider *dpp, CephContext *_cct, RGWSI_SysObj *_sysobj_svc, optional_yield y, bool setup_obj = true);
- int create(optional_yield y, bool exclusive = true);
- int delete_obj(optional_yield y);
- int store_info(bool exclusive, optional_yield y);
- int add_zonegroup(const RGWZoneGroup& zonegroup, optional_yield y);
+ int create(const DoutPrefixProvider *dpp, optional_yield y, bool exclusive = true);
+ int delete_obj(const DoutPrefixProvider *dpp, optional_yield y);
+ int store_info(const DoutPrefixProvider *dpp, bool exclusive, optional_yield y);
+ int add_zonegroup(const DoutPrefixProvider *dpp, const RGWZoneGroup& zonegroup, optional_yield y);
void fork();
- int update(optional_yield y);
+ int update(const DoutPrefixProvider *dpp, optional_yield y);
// commit a staging period; only for use on master zone
- int commit(rgw::sal::RGWRadosStore *store,
+ int commit(const DoutPrefixProvider *dpp,
+ rgw::sal::RGWRadosStore *store,
RGWRealm& realm, const RGWPeriod ¤t_period,
std::ostream& error_stream, optional_yield y,
bool force_if_stale = false);
RGWSI_BucketIndex(CephContext *cct) : RGWServiceInstance(cct) {}
virtual ~RGWSI_BucketIndex() {}
- virtual int init_index(RGWBucketInfo& bucket_info) = 0;
- virtual int clean_index(RGWBucketInfo& bucket_info) = 0;
+ virtual int init_index(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info) = 0;
+ virtual int clean_index(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info) = 0;
- virtual int read_stats(const RGWBucketInfo& bucket_info,
+ virtual int read_stats(const DoutPrefixProvider *dpp,
+ const RGWBucketInfo& bucket_info,
RGWBucketEnt *stats,
optional_yield y) = 0;
- virtual int handle_overwrite(const RGWBucketInfo& info,
+ virtual int handle_overwrite(const DoutPrefixProvider *dpp,
+ const RGWBucketInfo& info,
const RGWBucketInfo& orig_info) = 0;
};
svc.datalog_rados = datalog_rados_svc;
}
-int RGWSI_BucketIndex_RADOS::open_pool(const rgw_pool& pool,
+int RGWSI_BucketIndex_RADOS::open_pool(const DoutPrefixProvider *dpp,
+ const rgw_pool& pool,
RGWSI_RADOS::Pool *index_pool,
bool mostly_omap)
{
*index_pool = svc.rados->pool(pool);
- return index_pool->open(RGWSI_RADOS::OpenParams()
+ return index_pool->open(dpp, RGWSI_RADOS::OpenParams()
.set_mostly_omap(mostly_omap));
}
-int RGWSI_BucketIndex_RADOS::open_bucket_index_pool(const RGWBucketInfo& bucket_info,
+int RGWSI_BucketIndex_RADOS::open_bucket_index_pool(const DoutPrefixProvider *dpp,
+ const RGWBucketInfo& bucket_info,
RGWSI_RADOS::Pool *index_pool)
{
const rgw_pool& explicit_pool = bucket_info.bucket.explicit_placement.index_pool;
if (!explicit_pool.empty()) {
- return open_pool(explicit_pool, index_pool, false);
+ return open_pool(dpp, explicit_pool, index_pool, false);
}
auto& zonegroup = svc.zone->get_zonegroup();
}
auto iter = zone_params.placement_pools.find(rule->name);
if (iter == zone_params.placement_pools.end()) {
- ldout(cct, 0) << "could not find placement rule " << *rule << " within zonegroup " << dendl;
+ ldpp_dout(dpp, 0) << "could not find placement rule " << *rule << " within zonegroup " << dendl;
return -EINVAL;
}
- int r = open_pool(iter->second.index_pool, index_pool, true);
+ int r = open_pool(dpp, iter->second.index_pool, index_pool, true);
if (r < 0)
return r;
return 0;
}
-int RGWSI_BucketIndex_RADOS::open_bucket_index_base(const RGWBucketInfo& bucket_info,
+int RGWSI_BucketIndex_RADOS::open_bucket_index_base(const DoutPrefixProvider *dpp,
+ const RGWBucketInfo& bucket_info,
RGWSI_RADOS::Pool *index_pool,
string *bucket_oid_base)
{
const rgw_bucket& bucket = bucket_info.bucket;
- int r = open_bucket_index_pool(bucket_info, index_pool);
+ int r = open_bucket_index_pool(dpp, bucket_info, index_pool);
if (r < 0)
return r;
if (bucket.bucket_id.empty()) {
- ldout(cct, 0) << "ERROR: empty bucket_id for bucket operation" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: empty bucket_id for bucket operation" << dendl;
return -EIO;
}
}
-int RGWSI_BucketIndex_RADOS::open_bucket_index(const RGWBucketInfo& bucket_info,
+int RGWSI_BucketIndex_RADOS::open_bucket_index(const DoutPrefixProvider *dpp,
+ const RGWBucketInfo& bucket_info,
RGWSI_RADOS::Pool *index_pool,
string *bucket_oid)
{
const rgw_bucket& bucket = bucket_info.bucket;
- int r = open_bucket_index_pool(bucket_info, index_pool);
+ int r = open_bucket_index_pool(dpp, bucket_info, index_pool);
if (r < 0) {
- ldout(cct, 20) << __func__ << ": open_bucket_index_pool() returned "
+ ldpp_dout(dpp, 20) << __func__ << ": open_bucket_index_pool() returned "
<< r << dendl;
return r;
}
if (bucket.bucket_id.empty()) {
- ldout(cct, 0) << "ERROR: empty bucket id for bucket operation" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: empty bucket id for bucket operation" << dendl;
return -EIO;
}
}
}
-int RGWSI_BucketIndex_RADOS::open_bucket_index(const RGWBucketInfo& bucket_info,
+int RGWSI_BucketIndex_RADOS::open_bucket_index(const DoutPrefixProvider *dpp,
+ const RGWBucketInfo& bucket_info,
std::optional<int> _shard_id,
RGWSI_RADOS::Pool *index_pool,
map<int, string> *bucket_objs,
{
int shard_id = _shard_id.value_or(-1);
string bucket_oid_base;
- int ret = open_bucket_index_base(bucket_info, index_pool, &bucket_oid_base);
+ int ret = open_bucket_index_base(dpp, bucket_info, index_pool, &bucket_oid_base);
if (ret < 0) {
- ldout(cct, 20) << __func__ << ": open_bucket_index_pool() returned "
+ ldpp_dout(dpp, 20) << __func__ << ": open_bucket_index_pool() returned "
<< ret << dendl;
return ret;
}
return r;
}
-int RGWSI_BucketIndex_RADOS::open_bucket_index_shard(const RGWBucketInfo& bucket_info,
+int RGWSI_BucketIndex_RADOS::open_bucket_index_shard(const DoutPrefixProvider *dpp,
+ const RGWBucketInfo& bucket_info,
const string& obj_key,
RGWSI_RADOS::Obj *bucket_obj,
int *shard_id)
RGWSI_RADOS::Pool pool;
- int ret = open_bucket_index_base(bucket_info, &pool, &bucket_oid_base);
+ int ret = open_bucket_index_base(dpp, bucket_info, &pool, &bucket_oid_base);
if (ret < 0) {
- ldout(cct, 20) << __func__ << ": open_bucket_index_pool() returned "
+ ldpp_dout(dpp, 20) << __func__ << ": open_bucket_index_pool() returned "
<< ret << dendl;
return ret;
}
ret = get_bucket_index_object(bucket_oid_base, obj_key, bucket_info.layout.current_index.layout.normal.num_shards,
bucket_info.layout.current_index.layout.normal.hash_type, &oid, shard_id);
if (ret < 0) {
- ldout(cct, 10) << "get_bucket_index_object() returned ret=" << ret << dendl;
+ ldpp_dout(dpp, 10) << "get_bucket_index_object() returned ret=" << ret << dendl;
return ret;
}
return 0;
}
-int RGWSI_BucketIndex_RADOS::open_bucket_index_shard(const RGWBucketInfo& bucket_info,
+int RGWSI_BucketIndex_RADOS::open_bucket_index_shard(const DoutPrefixProvider *dpp,
+ const RGWBucketInfo& bucket_info,
int shard_id,
const rgw::bucket_index_layout_generation& idx_layout,
RGWSI_RADOS::Obj *bucket_obj)
{
RGWSI_RADOS::Pool index_pool;
string bucket_oid_base;
- int ret = open_bucket_index_base(bucket_info, &index_pool, &bucket_oid_base);
+ int ret = open_bucket_index_base(dpp, bucket_info, &index_pool, &bucket_oid_base);
if (ret < 0) {
- ldout(cct, 20) << __func__ << ": open_bucket_index_pool() returned "
+ ldpp_dout(dpp, 20) << __func__ << ": open_bucket_index_pool() returned "
<< ret << dendl;
return ret;
}
return 0;
}
-int RGWSI_BucketIndex_RADOS::cls_bucket_head(const RGWBucketInfo& bucket_info,
+int RGWSI_BucketIndex_RADOS::cls_bucket_head(const DoutPrefixProvider *dpp,
+ const RGWBucketInfo& bucket_info,
int shard_id,
vector<rgw_bucket_dir_header> *headers,
map<int, string> *bucket_instance_ids,
{
RGWSI_RADOS::Pool index_pool;
map<int, string> oids;
- int r = open_bucket_index(bucket_info, shard_id, &index_pool, &oids, bucket_instance_ids);
+ int r = open_bucket_index(dpp, bucket_info, shard_id, &index_pool, &oids, bucket_instance_ids);
if (r < 0)
return r;
}
-int RGWSI_BucketIndex_RADOS::init_index(RGWBucketInfo& bucket_info)
+int RGWSI_BucketIndex_RADOS::init_index(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info)
{
RGWSI_RADOS::Pool index_pool;
string dir_oid = dir_oid_prefix;
- int r = open_bucket_index_pool(bucket_info, &index_pool);
+ int r = open_bucket_index_pool(dpp, bucket_info, &index_pool);
if (r < 0) {
return r;
}
cct->_conf->rgw_bucket_index_max_aio)();
}
-int RGWSI_BucketIndex_RADOS::clean_index(RGWBucketInfo& bucket_info)
+int RGWSI_BucketIndex_RADOS::clean_index(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info)
{
RGWSI_RADOS::Pool index_pool;
std::string dir_oid = dir_oid_prefix;
- int r = open_bucket_index_pool(bucket_info, &index_pool);
+ int r = open_bucket_index_pool(dpp, bucket_info, &index_pool);
if (r < 0) {
return r;
}
cct->_conf->rgw_bucket_index_max_aio)();
}
-int RGWSI_BucketIndex_RADOS::read_stats(const RGWBucketInfo& bucket_info,
+int RGWSI_BucketIndex_RADOS::read_stats(const DoutPrefixProvider *dpp,
+ const RGWBucketInfo& bucket_info,
RGWBucketEnt *result,
optional_yield y)
{
vector<rgw_bucket_dir_header> headers;
result->bucket = bucket_info.bucket;
- int r = cls_bucket_head(bucket_info, RGW_NO_SHARD, &headers, nullptr, y);
+ int r = cls_bucket_head(dpp, bucket_info, RGW_NO_SHARD, &headers, nullptr, y);
if (r < 0) {
return r;
}
return 0;
}
-int RGWSI_BucketIndex_RADOS::get_reshard_status(const RGWBucketInfo& bucket_info, list<cls_rgw_bucket_instance_entry> *status)
+int RGWSI_BucketIndex_RADOS::get_reshard_status(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, list<cls_rgw_bucket_instance_entry> *status)
{
map<int, string> bucket_objs;
RGWSI_RADOS::Pool index_pool;
- int r = open_bucket_index(bucket_info,
+ int r = open_bucket_index(dpp, bucket_info,
std::nullopt,
&index_pool,
&bucket_objs,
int ret = cls_rgw_get_bucket_resharding(index_pool.ioctx(), i.second, &entry);
if (ret < 0 && ret != -ENOENT) {
- lderr(cct) << "ERROR: " << __func__ << ": cls_rgw_get_bucket_resharding() returned ret=" << ret << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: " << __func__ << ": cls_rgw_get_bucket_resharding() returned ret=" << ret << dendl;
return ret;
}
return 0;
}
-int RGWSI_BucketIndex_RADOS::handle_overwrite(const RGWBucketInfo& info,
+int RGWSI_BucketIndex_RADOS::handle_overwrite(const DoutPrefixProvider *dpp,
+ const RGWBucketInfo& info,
const RGWBucketInfo& orig_info)
{
bool new_sync_enabled = info.datasync_flag_enabled();
int ret;
if (!new_sync_enabled) {
- ret = svc.bilog->log_stop(info, -1);
+ ret = svc.bilog->log_stop(dpp, info, -1);
} else {
- ret = svc.bilog->log_start(info, -1);
+ ret = svc.bilog->log_start(dpp, info, -1);
}
if (ret < 0) {
- lderr(cct) << "ERROR: failed writing bilog (bucket=" << info.bucket << "); ret=" << ret << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: failed writing bilog (bucket=" << info.bucket << "); ret=" << ret << dendl;
return ret;
}
for (int i = 0; i < shards_num; ++i, ++shard_id) {
- ret = svc.datalog_rados->add_entry(info, shard_id);
+ ret = svc.datalog_rados->add_entry(dpp, info, shard_id);
if (ret < 0) {
- lderr(cct) << "ERROR: failed writing data log (info.bucket=" << info.bucket << ", shard_id=" << shard_id << ")" << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: failed writing data log (info.bucket=" << info.bucket << ", shard_id=" << shard_id << ")" << dendl;
return ret;
}
}
{
friend class RGWSI_BILog_RADOS;
- int open_pool(const rgw_pool& pool,
+ int open_pool(const DoutPrefixProvider *dpp,
+ const rgw_pool& pool,
RGWSI_RADOS::Pool *index_pool,
bool mostly_omap);
- int open_bucket_index_pool(const RGWBucketInfo& bucket_info,
+ int open_bucket_index_pool(const DoutPrefixProvider *dpp,
+ const RGWBucketInfo& bucket_info,
RGWSI_RADOS::Pool *index_pool);
- int open_bucket_index_base(const RGWBucketInfo& bucket_info,
+ int open_bucket_index_base(const DoutPrefixProvider *dpp,
+ const RGWBucketInfo& bucket_info,
RGWSI_RADOS::Pool *index_pool,
string *bucket_oid_base);
uint32_t num_shards, rgw::BucketHashType hash_type,
string *bucket_obj, int *shard_id);
- int cls_bucket_head(const RGWBucketInfo& bucket_info,
+ int cls_bucket_head(const DoutPrefixProvider *dpp,
+ const RGWBucketInfo& bucket_info,
int shard_id,
vector<rgw_bucket_dir_header> *headers,
map<int, string> *bucket_instance_ids,
return rgw_shards_mod(sid2, num_shards);
}
- int init_index(RGWBucketInfo& bucket_info);
- int clean_index(RGWBucketInfo& bucket_info);
+ int init_index(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info);
+ int clean_index(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info);
/* RADOS specific */
- int read_stats(const RGWBucketInfo& bucket_info,
+ int read_stats(const DoutPrefixProvider *dpp,
+ const RGWBucketInfo& bucket_info,
RGWBucketEnt *stats,
optional_yield y) override;
- int get_reshard_status(const RGWBucketInfo& bucket_info,
+ int get_reshard_status(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info,
std::list<cls_rgw_bucket_instance_entry> *status);
- int handle_overwrite(const RGWBucketInfo& info,
+ int handle_overwrite(const DoutPrefixProvider *dpp, const RGWBucketInfo& info,
const RGWBucketInfo& orig_info) override;
- int open_bucket_index_shard(const RGWBucketInfo& bucket_info,
+ int open_bucket_index_shard(const DoutPrefixProvider *dpp,
+ const RGWBucketInfo& bucket_info,
const string& obj_key,
RGWSI_RADOS::Obj *bucket_obj,
int *shard_id);
- int open_bucket_index_shard(const RGWBucketInfo& bucket_info,
+ int open_bucket_index_shard(const DoutPrefixProvider *dpp,
+ const RGWBucketInfo& bucket_info,
int shard_id,
const rgw::bucket_index_layout_generation& idx_layout,
RGWSI_RADOS::Obj *bucket_obj);
- int open_bucket_index(const RGWBucketInfo& bucket_info,
+ int open_bucket_index(const DoutPrefixProvider *dpp,
+ const RGWBucketInfo& bucket_info,
RGWSI_RADOS::Pool *index_pool,
string *bucket_oid);
- int open_bucket_index(const RGWBucketInfo& bucket_info,
+ int open_bucket_index(const DoutPrefixProvider *dpp,
+ const RGWBucketInfo& bucket_info,
std::optional<int> shard_id,
RGWSI_RADOS::Pool *index_pool,
map<int, string> *bucket_objs,
svc.bi = bi_rados_svc;
}
-int RGWSI_BILog_RADOS::log_trim(const RGWBucketInfo& bucket_info, int shard_id, string& start_marker, string& end_marker)
+int RGWSI_BILog_RADOS::log_trim(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, int shard_id, string& start_marker, string& end_marker)
{
RGWSI_RADOS::Pool index_pool;
map<int, string> bucket_objs;
BucketIndexShardsManager start_marker_mgr;
BucketIndexShardsManager end_marker_mgr;
- int r = svc.bi->open_bucket_index(bucket_info, shard_id, &index_pool, &bucket_objs, nullptr);
+ int r = svc.bi->open_bucket_index(dpp, bucket_info, shard_id, &index_pool, &bucket_objs, nullptr);
if (r < 0) {
return r;
}
cct->_conf->rgw_bucket_index_max_aio)();
}
-int RGWSI_BILog_RADOS::log_start(const RGWBucketInfo& bucket_info, int shard_id)
+int RGWSI_BILog_RADOS::log_start(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, int shard_id)
{
RGWSI_RADOS::Pool index_pool;
map<int, string> bucket_objs;
- int r = svc.bi->open_bucket_index(bucket_info, shard_id, &index_pool, &bucket_objs, nullptr);
+ int r = svc.bi->open_bucket_index(dpp, bucket_info, shard_id, &index_pool, &bucket_objs, nullptr);
if (r < 0)
return r;
return CLSRGWIssueResyncBucketBILog(index_pool.ioctx(), bucket_objs, cct->_conf->rgw_bucket_index_max_aio)();
}
-int RGWSI_BILog_RADOS::log_stop(const RGWBucketInfo& bucket_info, int shard_id)
+int RGWSI_BILog_RADOS::log_stop(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, int shard_id)
{
RGWSI_RADOS::Pool index_pool;
map<int, string> bucket_objs;
- int r = svc.bi->open_bucket_index(bucket_info, shard_id, &index_pool, &bucket_objs, nullptr);
+ int r = svc.bi->open_bucket_index(dpp, bucket_info, shard_id, &index_pool, &bucket_objs, nullptr);
if (r < 0)
return r;
}
}
-int RGWSI_BILog_RADOS::log_list(const RGWBucketInfo& bucket_info, int shard_id, string& marker, uint32_t max,
+int RGWSI_BILog_RADOS::log_list(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, int shard_id, string& marker, uint32_t max,
std::list<rgw_bi_log_entry>& result, bool *truncated)
{
- ldout(cct, 20) << __func__ << ": " << bucket_info.bucket << " marker " << marker << " shard_id=" << shard_id << " max " << max << dendl;
+ ldpp_dout(dpp, 20) << __func__ << ": " << bucket_info.bucket << " marker " << marker << " shard_id=" << shard_id << " max " << max << dendl;
result.clear();
RGWSI_RADOS::Pool index_pool;
map<int, string> oids;
map<int, cls_rgw_bi_log_list_ret> bi_log_lists;
- int r = svc.bi->open_bucket_index(bucket_info, shard_id, &index_pool, &oids, nullptr);
+ int r = svc.bi->open_bucket_index(dpp, bucket_info, shard_id, &index_pool, &oids, nullptr);
if (r < 0)
return r;
return 0;
}
-int RGWSI_BILog_RADOS::get_log_status(const RGWBucketInfo& bucket_info,
+int RGWSI_BILog_RADOS::get_log_status(const DoutPrefixProvider *dpp,
+ const RGWBucketInfo& bucket_info,
int shard_id,
map<int, string> *markers,
optional_yield y)
{
vector<rgw_bucket_dir_header> headers;
map<int, string> bucket_instance_ids;
- int r = svc.bi->cls_bucket_head(bucket_info, shard_id, &headers, &bucket_instance_ids, y);
+ int r = svc.bi->cls_bucket_head(dpp, bucket_info, shard_id, &headers, &bucket_instance_ids, y);
if (r < 0)
return r;
void init(RGWSI_BucketIndex_RADOS *bi_rados_svc);
- int log_start(const RGWBucketInfo& bucket_info, int shard_id);
- int log_stop(const RGWBucketInfo& bucket_info, int shard_id);
+ int log_start(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, int shard_id);
+ int log_stop(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, int shard_id);
- int log_trim(const RGWBucketInfo& bucket_info,
+ int log_trim(const DoutPrefixProvider *dpp,
+ const RGWBucketInfo& bucket_info,
int shard_id,
std::string& start_marker,
std::string& end_marker);
- int log_list(const RGWBucketInfo& bucket_info,
+ int log_list(const DoutPrefixProvider *dpp,
+ const RGWBucketInfo& bucket_info,
int shard_id,
std::string& marker,
uint32_t max,
std::list<rgw_bi_log_entry>& result,
bool *truncated);
- int get_log_status(const RGWBucketInfo& bucket_info,
+ int get_log_status(const DoutPrefixProvider *dpp,
+ const RGWBucketInfo& bucket_info,
int shard_id,
map<int, string> *markers,
optional_yield y);
real_time *pmtime,
map<string, bufferlist> *pattrs,
optional_yield y,
+ const DoutPrefixProvider *dpp,
rgw_cache_entry_info *cache_info = nullptr,
boost::optional<obj_version> refresh_version = boost::none) = 0;
real_time mtime,
map<string, bufferlist> *pattrs,
RGWObjVersionTracker *objv_tracker,
- optional_yield y) = 0;
+ optional_yield y,
+ const DoutPrefixProvider *dpp) = 0;
virtual int remove_bucket_entrypoint_info(RGWSI_Bucket_EP_Ctx& ctx,
const string& key,
RGWObjVersionTracker *objv_tracker,
- optional_yield y) = 0;
+ optional_yield y,
+ const DoutPrefixProvider *dpp) = 0;
virtual int read_bucket_instance_info(RGWSI_Bucket_BI_Ctx& ctx,
const string& key,
real_time *pmtime,
map<string, bufferlist> *pattrs,
optional_yield y,
+ const DoutPrefixProvider *dpp,
rgw_cache_entry_info *cache_info = nullptr,
boost::optional<obj_version> refresh_version = boost::none) = 0;
real_time *pmtime,
map<string, bufferlist> *pattrs,
boost::optional<obj_version> refresh_version,
- optional_yield y) = 0;
+ optional_yield y,
+ const DoutPrefixProvider *dpp) = 0;
virtual int store_bucket_instance_info(RGWSI_Bucket_BI_Ctx& ctx,
const string& key,
bool exclusive,
real_time mtime,
map<string, bufferlist> *pattrs,
- optional_yield y) = 0;
+ optional_yield y,
+ const DoutPrefixProvider *dpp) = 0;
virtual int remove_bucket_instance_info(RGWSI_Bucket_BI_Ctx& ctx,
const string& key,
const RGWBucketInfo& bucket_info,
RGWObjVersionTracker *objv_tracker,
- optional_yield y) = 0;
+ optional_yield y,
+ const DoutPrefixProvider *dpp) = 0;
virtual int read_bucket_stats(RGWSI_Bucket_X_Ctx& ctx,
const rgw_bucket& bucket,
RGWBucketEnt *ent,
- optional_yield y) = 0;
+ optional_yield y,
+ const DoutPrefixProvider *dpp) = 0;
virtual int read_buckets_stats(RGWSI_Bucket_X_Ctx& ctx,
map<string, RGWBucketEnt>& m,
- optional_yield y) = 0;
+ optional_yield y,
+ const DoutPrefixProvider *dpp) = 0;
};
svc.bucket_sync = _bucket_sync_svc;
}
-int RGWSI_Bucket_SObj::do_start(optional_yield)
+int RGWSI_Bucket_SObj::do_start(optional_yield, const DoutPrefixProvider *dpp)
{
binfo_cache.reset(new RGWChainedCacheImpl<bucket_info_cache_entry>);
binfo_cache->init(svc.cache);
int r = svc.meta->create_be_handler(RGWSI_MetaBackend::Type::MDBE_SOBJ, &ep_handler);
if (r < 0) {
- ldout(ctx(), 0) << "ERROR: failed to create be handler: r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to create be handler: r=" << r << dendl;
return r;
}
r = svc.meta->create_be_handler(RGWSI_MetaBackend::Type::MDBE_SOBJ, &bi_handler);
if (r < 0) {
- ldout(ctx(), 0) << "ERROR: failed to create be handler: r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to create be handler: r=" << r << dendl;
return r;
}
real_time *pmtime,
map<string, bufferlist> *pattrs,
optional_yield y,
+ const DoutPrefixProvider *dpp,
rgw_cache_entry_info *cache_info,
boost::optional<obj_version> refresh_version)
{
auto params = RGWSI_MBSObj_GetParams(&bl, pattrs, pmtime).set_cache_info(cache_info)
.set_refresh_version(refresh_version);
- int ret = svc.meta_be->get_entry(ctx.get(), key, params, objv_tracker, y);
+ int ret = svc.meta_be->get_entry(ctx.get(), key, params, objv_tracker, y, dpp);
if (ret < 0) {
return ret;
}
try {
decode(*entry_point, iter);
} catch (buffer::error& err) {
- ldout(cct, 0) << "ERROR: could not decode buffer info, caught buffer::error" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: could not decode buffer info, caught buffer::error" << dendl;
return -EIO;
}
return 0;
real_time mtime,
map<string, bufferlist> *pattrs,
RGWObjVersionTracker *objv_tracker,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
bufferlist bl;
encode(info, bl);
RGWSI_MBSObj_PutParams params(bl, pattrs, mtime, exclusive);
- int ret = svc.meta_be->put(ctx.get(), key, params, objv_tracker, y);
+ int ret = svc.meta_be->put(ctx.get(), key, params, objv_tracker, y, dpp);
if (ret < 0) {
return ret;
}
int RGWSI_Bucket_SObj::remove_bucket_entrypoint_info(RGWSI_Bucket_EP_Ctx& ctx,
const string& key,
RGWObjVersionTracker *objv_tracker,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
RGWSI_MBSObj_RemoveParams params;
- return svc.meta_be->remove(ctx.get(), key, params, objv_tracker, y);
+ return svc.meta_be->remove(ctx.get(), key, params, objv_tracker, y, dpp);
}
int RGWSI_Bucket_SObj::read_bucket_instance_info(RGWSI_Bucket_BI_Ctx& ctx,
RGWBucketInfo *info,
real_time *pmtime, map<string, bufferlist> *pattrs,
optional_yield y,
+ const DoutPrefixProvider *dpp,
rgw_cache_entry_info *cache_info,
boost::optional<obj_version> refresh_version)
{
if (auto e = binfo_cache->find(cache_key)) {
if (refresh_version &&
e->info.objv_tracker.read_version.compare(&(*refresh_version))) {
- lderr(cct) << "WARNING: The bucket info cache is inconsistent. This is "
+ ldpp_dout(dpp, -1) << "WARNING: The bucket info cache is inconsistent. This is "
<< "a failure that should be debugged. I am a nice machine, "
<< "so I will try to recover." << dendl;
binfo_cache->invalidate(key);
int ret = do_read_bucket_instance_info(ctx, key,
&e.info, &e.mtime, &e.attrs,
- &ci, refresh_version, y);
+ &ci, refresh_version, y, dpp);
*info = e.info;
if (ret < 0) {
if (ret != -ENOENT) {
- lderr(cct) << "ERROR: do_read_bucket_instance_info failed: " << ret << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: do_read_bucket_instance_info failed: " << ret << dendl;
} else {
- ldout(cct, 20) << "do_read_bucket_instance_info, bucket instance not found (key=" << key << ")" << dendl;
+ ldpp_dout(dpp, 20) << "do_read_bucket_instance_info, bucket instance not found (key=" << key << ")" << dendl;
}
return ret;
}
}
/* chain to only bucket instance and *not* bucket entrypoint */
- if (!binfo_cache->put(svc.cache, cache_key, &e, {&ci})) {
- ldout(cct, 20) << "couldn't put binfo cache entry, might have raced with data changes" << dendl;
+ if (!binfo_cache->put(dpp, svc.cache, cache_key, &e, {&ci})) {
+ ldpp_dout(dpp, 20) << "couldn't put binfo cache entry, might have raced with data changes" << dendl;
}
if (refresh_version &&
refresh_version->compare(&info->objv_tracker.read_version)) {
- lderr(cct) << "WARNING: The OSD has the same version I have. Something may "
+ ldpp_dout(dpp, -1) << "WARNING: The OSD has the same version I have. Something may "
<< "have gone squirrelly. An administrator may have forced a "
<< "change; otherwise there is a problem somewhere." << dendl;
}
real_time *pmtime, map<string, bufferlist> *pattrs,
rgw_cache_entry_info *cache_info,
boost::optional<obj_version> refresh_version,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
bufferlist bl;
RGWObjVersionTracker ot;
auto params = RGWSI_MBSObj_GetParams(&bl, pattrs, pmtime).set_cache_info(cache_info)
.set_refresh_version(refresh_version);
- int ret = svc.meta_be->get_entry(ctx.get(), key, params, &ot, y);
+ int ret = svc.meta_be->get_entry(ctx.get(), key, params, &ot, y, dpp);
if (ret < 0) {
return ret;
}
try {
decode(*info, iter);
} catch (buffer::error& err) {
- ldout(cct, 0) << "ERROR: could not decode buffer info, caught buffer::error" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: could not decode buffer info, caught buffer::error" << dendl;
return -EIO;
}
info->objv_tracker = ot;
real_time *pmtime,
map<string, bufferlist> *pattrs,
boost::optional<obj_version> refresh_version,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
rgw_cache_entry_info cache_info;
info,
pmtime, pattrs,
y,
+ dpp,
&cache_info, refresh_version);
}
int ret = read_bucket_entrypoint_info(ctx.ep, bucket_entry,
&entry_point, &ot, &ep_mtime, pattrs,
y,
+ dpp,
&entry_cache_info, refresh_version);
if (ret < 0) {
/* only init these fields */
if (entry_point.has_bucket_info) {
*info = entry_point.old_bucket_info;
info->bucket.tenant = bucket.tenant;
- ldout(cct, 20) << "rgw_get_bucket_info: old bucket info, bucket=" << info->bucket << " owner " << info->owner << dendl;
+ ldpp_dout(dpp, 20) << "rgw_get_bucket_info: old bucket info, bucket=" << info->bucket << " owner " << info->owner << dendl;
return 0;
}
pattrs->clear();
}
- ldout(cct, 20) << "rgw_get_bucket_info: bucket instance: " << entry_point.bucket << dendl;
+ ldpp_dout(dpp, 20) << "rgw_get_bucket_info: bucket instance: " << entry_point.bucket << dendl;
/* read bucket instance info */
ret = read_bucket_instance_info(ctx.bi, get_bi_meta_key(entry_point.bucket),
&e.info, &e.mtime, &e.attrs,
y,
+ dpp,
&cache_info, refresh_version);
*info = e.info;
if (ret < 0) {
- lderr(cct) << "ERROR: read_bucket_instance_from_oid failed: " << ret << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: read_bucket_instance_from_oid failed: " << ret << dendl;
info->bucket = bucket;
// XXX and why return anything in case of an error anyway?
return ret;
*pattrs = e.attrs;
/* chain to both bucket entry point and bucket instance */
- if (!binfo_cache->put(svc.cache, cache_key, &e, {&entry_cache_info, &cache_info})) {
- ldout(cct, 20) << "couldn't put binfo cache entry, might have raced with data changes" << dendl;
+ if (!binfo_cache->put(dpp, svc.cache, cache_key, &e, {&entry_cache_info, &cache_info})) {
+ ldpp_dout(dpp, 20) << "couldn't put binfo cache entry, might have raced with data changes" << dendl;
}
if (refresh_version &&
refresh_version->compare(&info->objv_tracker.read_version)) {
- lderr(cct) << "WARNING: The OSD has the same version I have. Something may "
+ ldpp_dout(dpp, -1) << "WARNING: The OSD has the same version I have. Something may "
<< "have gone squirrelly. An administrator may have forced a "
<< "change; otherwise there is a problem somewhere." << dendl;
}
bool exclusive,
real_time mtime,
map<string, bufferlist> *pattrs,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
bufferlist bl;
encode(info, bl);
&shared_bucket_info,
nullptr, nullptr,
y,
+ dpp,
nullptr, boost::none);
if (r < 0) {
if (r != -ENOENT) {
- ldout(cct, 0) << "ERROR: " << __func__ << "(): read_bucket_instance_info() of key=" << key << " returned r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: " << __func__ << "(): read_bucket_instance_info() of key=" << key << " returned r=" << r << dendl;
return r;
}
} else {
}
if (orig_info && *orig_info && !exclusive) {
- int r = svc.bi->handle_overwrite(info, *(orig_info.value()));
+ int r = svc.bi->handle_overwrite(dpp, info, *(orig_info.value()));
if (r < 0) {
- ldout(cct, 0) << "ERROR: " << __func__ << "(): svc.bi->handle_overwrite() of key=" << key << " returned r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: " << __func__ << "(): svc.bi->handle_overwrite() of key=" << key << " returned r=" << r << dendl;
return r;
}
}
RGWSI_MBSObj_PutParams params(bl, pattrs, mtime, exclusive);
- int ret = svc.meta_be->put(ctx.get(), key, params, &info.objv_tracker, y);
+ int ret = svc.meta_be->put(ctx.get(), key, params, &info.objv_tracker, y, dpp);
if (ret >= 0) {
- int r = svc.bucket_sync->handle_bi_update(info,
+ int r = svc.bucket_sync->handle_bi_update(dpp, info,
orig_info.value_or(nullptr),
y);
if (r < 0) {
const string& key,
const RGWBucketInfo& info,
RGWObjVersionTracker *objv_tracker,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
RGWSI_MBSObj_RemoveParams params;
- int ret = svc.meta_be->remove_entry(ctx.get(), key, params, objv_tracker, y);
+ int ret = svc.meta_be->remove_entry(dpp, ctx.get(), key, params, objv_tracker, y);
if (ret < 0 &&
ret != -ENOENT) {
return ret;
}
- int r = svc.bucket_sync->handle_bi_removal(info, y);
+ int r = svc.bucket_sync->handle_bi_removal(dpp, info, y);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to update bucket instance sync index: r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to update bucket instance sync index: r=" << r << dendl;
/* returning success as index is just keeping hints, so will keep extra hints,
* but bucket removal succeeded
*/
int RGWSI_Bucket_SObj::read_bucket_stats(const RGWBucketInfo& bucket_info,
RGWBucketEnt *ent,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
ent->count = 0;
ent->size = 0;
vector<rgw_bucket_dir_header> headers;
- int r = svc.bi->read_stats(bucket_info, ent, y);
+ int r = svc.bi->read_stats(dpp, bucket_info, ent, y);
if (r < 0) {
- ldout(cct, 0) << "ERROR: " << __func__ << "(): read_stats returned r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: " << __func__ << "(): read_stats returned r=" << r << dendl;
return r;
}
int RGWSI_Bucket_SObj::read_bucket_stats(RGWSI_Bucket_X_Ctx& ctx,
const rgw_bucket& bucket,
RGWBucketEnt *ent,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
RGWBucketInfo bucket_info;
- int ret = read_bucket_info(ctx, bucket, &bucket_info, nullptr, nullptr, boost::none, y);
+ int ret = read_bucket_info(ctx, bucket, &bucket_info, nullptr, nullptr, boost::none, y, dpp);
if (ret < 0) {
return ret;
}
- return read_bucket_stats(bucket_info, ent, y);
+ return read_bucket_stats(bucket_info, ent, y, dpp);
}
int RGWSI_Bucket_SObj::read_buckets_stats(RGWSI_Bucket_X_Ctx& ctx,
map<string, RGWBucketEnt>& m,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
map<string, RGWBucketEnt>::iterator iter;
for (iter = m.begin(); iter != m.end(); ++iter) {
RGWBucketEnt& ent = iter->second;
- int r = read_bucket_stats(ctx, ent.bucket, &ent, y);
+ int r = read_bucket_stats(ctx, ent.bucket, &ent, y, dpp);
if (r < 0) {
- ldout(cct, 0) << "ERROR: " << __func__ << "(): read_bucket_stats returned r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: " << __func__ << "(): read_bucket_stats returned r=" << r << dendl;
return r;
}
}
RGWSI_BucketInstance_BE_Handler bi_be_handler;
std::unique_ptr<RGWSI_MetaBackend::Module> bi_be_module;
- int do_start(optional_yield) override;
+ int do_start(optional_yield, const DoutPrefixProvider *dpp) override;
int do_read_bucket_instance_info(RGWSI_Bucket_BI_Ctx& ctx,
const string& key,
map<string, bufferlist> *pattrs,
rgw_cache_entry_info *cache_info,
boost::optional<obj_version> refresh_version,
- optional_yield y);
+ optional_yield y,
+ const DoutPrefixProvider *dpp);
int read_bucket_stats(const RGWBucketInfo& bucket_info,
RGWBucketEnt *ent,
- optional_yield y);
+ optional_yield y,
+ const DoutPrefixProvider *dpp);
public:
struct Svc {
real_time *pmtime,
map<string, bufferlist> *pattrs,
optional_yield y,
+ const DoutPrefixProvider *dpp,
rgw_cache_entry_info *cache_info = nullptr,
boost::optional<obj_version> refresh_version = boost::none) override;
real_time mtime,
map<string, bufferlist> *pattrs,
RGWObjVersionTracker *objv_tracker,
- optional_yield y) override;
+ optional_yield y,
+ const DoutPrefixProvider *dpp) override;
int remove_bucket_entrypoint_info(RGWSI_Bucket_EP_Ctx& ctx,
const string& key,
RGWObjVersionTracker *objv_tracker,
- optional_yield y) override;
+ optional_yield y,
+ const DoutPrefixProvider *dpp) override;
int read_bucket_instance_info(RGWSI_Bucket_BI_Ctx& ctx,
const string& key,
real_time *pmtime,
map<string, bufferlist> *pattrs,
optional_yield y,
+ const DoutPrefixProvider *dpp,
rgw_cache_entry_info *cache_info = nullptr,
boost::optional<obj_version> refresh_version = boost::none) override;
real_time *pmtime,
map<string, bufferlist> *pattrs,
boost::optional<obj_version> refresh_version,
- optional_yield y) override;
+ optional_yield y,
+ const DoutPrefixProvider *dpp) override;
int store_bucket_instance_info(RGWSI_Bucket_BI_Ctx& ctx,
const string& key,
bool exclusive,
real_time mtime,
map<string, bufferlist> *pattrs,
- optional_yield y) override;
+ optional_yield y,
+ const DoutPrefixProvider *dpp) override;
int remove_bucket_instance_info(RGWSI_Bucket_BI_Ctx& ctx,
const string& key,
const RGWBucketInfo& bucket_info,
RGWObjVersionTracker *objv_tracker,
- optional_yield y) override;
+ optional_yield y,
+ const DoutPrefixProvider *dpp) override;
int read_bucket_stats(RGWSI_Bucket_X_Ctx& ctx,
const rgw_bucket& bucket,
RGWBucketEnt *ent,
- optional_yield y) override;
+ optional_yield y,
+ const DoutPrefixProvider *dpp) override;
int read_buckets_stats(RGWSI_Bucket_X_Ctx& ctx,
map<string, RGWBucketEnt>& m,
- optional_yield y) override;
+ optional_yield y,
+ const DoutPrefixProvider *dpp) override;
};
std::optional<rgw_zone_id> zone,
std::optional<rgw_bucket> bucket,
RGWBucketSyncPolicyHandlerRef *handler,
- optional_yield y) = 0;
+ optional_yield y,
+ const DoutPrefixProvider *dpp) = 0;
- virtual int handle_bi_update(RGWBucketInfo& bucket_info,
+ virtual int handle_bi_update(const DoutPrefixProvider *dpp,
+ RGWBucketInfo& bucket_info,
RGWBucketInfo *orig_bucket_info,
optional_yield y) = 0;
- virtual int handle_bi_removal(const RGWBucketInfo& bucket_info,
+ virtual int handle_bi_removal(const DoutPrefixProvider *dpp,
+ const RGWBucketInfo& bucket_info,
optional_yield y) = 0;
- virtual int get_bucket_sync_hints(const rgw_bucket& bucket,
+ virtual int get_bucket_sync_hints(const DoutPrefixProvider *dpp,
+ const rgw_bucket& bucket,
std::set<rgw_bucket> *sources,
std::set<rgw_bucket> *dests,
optional_yield y) = 0;
rgw_raw_obj get_dests_obj(const rgw_bucket& bucket) const;
template <typename C1, typename C2>
- int update_hints(const RGWBucketInfo& bucket_info,
+ int update_hints(const DoutPrefixProvider *dpp,
+ const RGWBucketInfo& bucket_info,
C1& added_dests,
C2& removed_dests,
C1& added_sources,
hint_index_mgr.reset(new RGWSI_Bucket_Sync_SObj_HintIndexManager(svc.zone, svc.sysobj));
}
-int RGWSI_Bucket_Sync_SObj::do_start(optional_yield)
+int RGWSI_Bucket_Sync_SObj::do_start(optional_yield, const DoutPrefixProvider *dpp)
{
sync_policy_cache.reset(new RGWChainedCacheImpl<bucket_sync_policy_cache_entry>);
sync_policy_cache->init(svc.cache);
const std::set<rgw_zone_id>& zones,
const std::set<rgw_bucket>& buckets,
std::set<rgw_sync_bucket_entity> *hint_entities,
- optional_yield y)
+ optional_yield y, const DoutPrefixProvider *dpp)
{
vector<rgw_bucket> hint_buckets;
RGWBucketInfo hint_bucket_info;
int ret = svc.bucket_sobj->read_bucket_info(ctx, b, &hint_bucket_info,
nullptr, nullptr, boost::none,
- y);
+ y, dpp);
if (ret < 0) {
- ldout(cct, 20) << "could not init bucket info for hint bucket=" << b << " ... skipping" << dendl;
+ ldpp_dout(dpp, 20) << "could not init bucket info for hint bucket=" << b << " ... skipping" << dendl;
continue;
}
RGWBucketSyncPolicyHandlerRef& handler,
RGWBucketSyncPolicyHandlerRef& zone_policy_handler,
std::map<optional_zone_bucket, RGWBucketSyncPolicyHandlerRef>& temp_map,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
set<rgw_zone_id> source_zones;
set<rgw_zone_id> target_zones;
std::set<rgw_sync_bucket_entity> hint_entities;
- get_hint_entities(ctx, source_zones, handler->get_source_hints(), &hint_entities, y);
- get_hint_entities(ctx, target_zones, handler->get_target_hints(), &hint_entities, y);
+ get_hint_entities(ctx, source_zones, handler->get_source_hints(), &hint_entities, y, dpp);
+ get_hint_entities(ctx, target_zones, handler->get_target_hints(), &hint_entities, y, dpp);
std::set<rgw_sync_bucket_pipe> resolved_sources;
std::set<rgw_sync_bucket_pipe> resolved_dests;
if (iter != temp_map.end()) {
hint_bucket_handler = iter->second;
} else {
- int r = do_get_policy_handler(ctx, zid, hint_bucket, temp_map, &hint_bucket_handler, y);
+ int r = do_get_policy_handler(ctx, zid, hint_bucket, temp_map, &hint_bucket_handler, y, dpp);
if (r < 0) {
- ldout(cct, 20) << "could not get bucket sync policy handler for hint bucket=" << hint_bucket << " ... skipping" << dendl;
+ ldpp_dout(dpp, 20) << "could not get bucket sync policy handler for hint bucket=" << hint_bucket << " ... skipping" << dendl;
continue;
}
}
std::optional<rgw_bucket> _bucket,
std::map<optional_zone_bucket, RGWBucketSyncPolicyHandlerRef>& temp_map,
RGWBucketSyncPolicyHandlerRef *handler,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
if (!_bucket) {
*handler = svc.zone->get_sync_policy_handler(zone);
nullptr,
&attrs,
y,
+ dpp,
&cache_info);
if (r < 0) {
if (r != -ENOENT) {
- ldout(cct, 0) << "ERROR: svc.bucket->read_bucket_instance_info(key=" << bucket_key << ") returned r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: svc.bucket->read_bucket_instance_info(key=" << bucket_key << ") returned r=" << r << dendl;
}
return r;
}
auto zone_policy_handler = svc.zone->get_sync_policy_handler(zone);
if (!zone_policy_handler) {
- ldout(cct, 20) << "ERROR: could not find policy handler for zone=" << zone << dendl;
+ ldpp_dout(dpp, 20) << "ERROR: could not find policy handler for zone=" << zone << dendl;
return -ENOENT;
}
e.handler.reset(zone_policy_handler->alloc_child(bucket_info, std::move(attrs)));
- r = e.handler->init(y);
+ r = e.handler->init(dpp, y);
if (r < 0) {
- ldout(cct, 20) << "ERROR: failed to init bucket sync policy handler: r=" << r << dendl;
+ ldpp_dout(dpp, 20) << "ERROR: failed to init bucket sync policy handler: r=" << r << dendl;
return r;
}
r = resolve_policy_hints(ctx, self_entity,
e.handler,
zone_policy_handler,
- temp_map, y);
+ temp_map, y, dpp);
if (r < 0) {
- ldout(cct, 20) << "ERROR: failed to resolve policy hints: bucket_key=" << bucket_key << ", r=" << r << dendl;
+ ldpp_dout(dpp, 20) << "ERROR: failed to resolve policy hints: bucket_key=" << bucket_key << ", r=" << r << dendl;
return r;
}
- if (!sync_policy_cache->put(svc.cache, cache_key, &e, {&cache_info})) {
- ldout(cct, 20) << "couldn't put bucket_sync_policy cache entry, might have raced with data changes" << dendl;
+ if (!sync_policy_cache->put(dpp, svc.cache, cache_key, &e, {&cache_info})) {
+ ldpp_dout(dpp, 20) << "couldn't put bucket_sync_policy cache entry, might have raced with data changes" << dendl;
}
*handler = e.handler;
std::optional<rgw_zone_id> zone,
std::optional<rgw_bucket> _bucket,
RGWBucketSyncPolicyHandlerRef *handler,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
std::map<optional_zone_bucket, RGWBucketSyncPolicyHandlerRef> temp_map;
- return do_get_policy_handler(ctx, zone, _bucket, temp_map, handler, y);
+ return do_get_policy_handler(ctx, zone, _bucket, temp_map, handler, y, dpp);
}
static bool diff_sets(std::set<rgw_bucket>& orig_set,
}
template <typename C1, typename C2>
- int update(const rgw_bucket& entity,
+ int update(const DoutPrefixProvider *dpp,
+ const rgw_bucket& entity,
const RGWBucketInfo& info_source,
C1 *add,
C2 *remove,
C2 *remove,
single_instance_info *instance);
- int read(optional_yield y);
- int flush(optional_yield y);
+ int read(const DoutPrefixProvider *dpp, optional_yield y);
+ int flush(const DoutPrefixProvider *dpp, optional_yield y);
void invalidate() {
has_data = false;
WRITE_CLASS_ENCODER(RGWSI_BS_SObj_HintIndexObj::info_map)
template <typename C1, typename C2>
-int RGWSI_BS_SObj_HintIndexObj::update(const rgw_bucket& entity,
+int RGWSI_BS_SObj_HintIndexObj::update(const DoutPrefixProvider *dpp,
+ const rgw_bucket& entity,
const RGWBucketInfo& info_source,
C1 *add,
C2 *remove,
for (int i = 0; i < MAX_RETRIES; ++i) {
if (!has_data) {
- r = read(y);
+ r = read(dpp, y);
if (r < 0) {
- ldout(cct, 0) << "ERROR: cannot update hint index: failed to read: r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: cannot update hint index: failed to read: r=" << r << dendl;
return r;
}
}
info.instances.erase(entity);
}
- r = flush(y);
+ r = flush(dpp, y);
if (r >= 0) {
return 0;
}
if (r != -ECANCELED) {
- ldout(cct, 0) << "ERROR: failed to flush hint index: obj=" << obj << " r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to flush hint index: obj=" << obj << " r=" << r << dendl;
return r;
}
invalidate();
}
- ldout(cct, 0) << "ERROR: failed to flush hint index: too many retries (obj=" << obj << "), likely a bug" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to flush hint index: too many retries (obj=" << obj << "), likely a bug" << dendl;
return -EIO;
}
}
}
-int RGWSI_BS_SObj_HintIndexObj::read(optional_yield y) {
+int RGWSI_BS_SObj_HintIndexObj::read(const DoutPrefixProvider *dpp, optional_yield y) {
RGWObjVersionTracker _ot;
bufferlist bl;
int r = sysobj.rop()
.set_objv_tracker(&_ot) /* forcing read of current version */
- .read(&bl, y);
+ .read(dpp, &bl, y);
if (r < 0 && r != -ENOENT) {
- ldout(cct, 0) << "ERROR: failed reading data (obj=" << obj << "), r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed reading data (obj=" << obj << "), r=" << r << dendl;
return r;
}
decode(info, iter);
has_data = true;
} catch (buffer::error& err) {
- ldout(cct, 0) << "ERROR: " << __func__ << "(): failed to decode entries, ignoring" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: " << __func__ << "(): failed to decode entries, ignoring" << dendl;
info.clear();
}
} else {
return 0;
}
-int RGWSI_BS_SObj_HintIndexObj::flush(optional_yield y) {
+int RGWSI_BS_SObj_HintIndexObj::flush(const DoutPrefixProvider *dpp, optional_yield y) {
int r;
if (!info.empty()) {
r = sysobj.wop()
.set_objv_tracker(&ot) /* forcing read of current version */
- .write(bl, y);
+ .write(dpp, bl, y);
} else { /* remove */
r = sysobj.wop()
.set_objv_tracker(&ot)
- .remove(y);
+ .remove(dpp, y);
}
if (r < 0) {
}
template <typename C1, typename C2>
-int RGWSI_Bucket_Sync_SObj_HintIndexManager::update_hints(const RGWBucketInfo& bucket_info,
+int RGWSI_Bucket_Sync_SObj_HintIndexManager::update_hints(const DoutPrefixProvider *dpp,
+ const RGWBucketInfo& bucket_info,
C1& added_dests,
C2& removed_dests,
C1& added_sources,
/* update our dests */
RGWSI_BS_SObj_HintIndexObj index(svc.sysobj,
get_dests_obj(bucket_info.bucket));
- int r = index.update(bucket_info.bucket,
+ int r = index.update(dpp, bucket_info.bucket,
bucket_info,
&added_dests,
&removed_dests,
y);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to update targets index for bucket=" << bucket_info.bucket << " r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to update targets index for bucket=" << bucket_info.bucket << " r=" << r << dendl;
return r;
}
for (auto& dest_bucket : added_dests) {
RGWSI_BS_SObj_HintIndexObj dep_index(svc.sysobj,
get_sources_obj(dest_bucket));
- int r = dep_index.update(dest_bucket,
+ int r = dep_index.update(dpp, dest_bucket,
bucket_info,
&self_entity,
static_cast<C2 *>(nullptr),
y);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to update targets index for bucket=" << dest_bucket << " r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to update targets index for bucket=" << dest_bucket << " r=" << r << dendl;
return r;
}
}
for (auto& dest_bucket : removed_dests) {
RGWSI_BS_SObj_HintIndexObj dep_index(svc.sysobj,
get_sources_obj(dest_bucket));
- int r = dep_index.update(dest_bucket,
+ int r = dep_index.update(dpp, dest_bucket,
bucket_info,
static_cast<C1 *>(nullptr),
&self_entity,
y);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to update targets index for bucket=" << dest_bucket << " r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to update targets index for bucket=" << dest_bucket << " r=" << r << dendl;
return r;
}
}
RGWSI_BS_SObj_HintIndexObj index(svc.sysobj,
get_sources_obj(bucket_info.bucket));
/* update our sources */
- int r = index.update(bucket_info.bucket,
+ int r = index.update(dpp, bucket_info.bucket,
bucket_info,
&added_sources,
&removed_sources,
y);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to update targets index for bucket=" << bucket_info.bucket << " r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to update targets index for bucket=" << bucket_info.bucket << " r=" << r << dendl;
return r;
}
for (auto& source_bucket : added_sources) {
RGWSI_BS_SObj_HintIndexObj dep_index(svc.sysobj,
get_dests_obj(source_bucket));
- int r = dep_index.update(source_bucket,
+ int r = dep_index.update(dpp, source_bucket,
bucket_info,
&self_entity,
static_cast<C2 *>(nullptr),
y);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to update targets index for bucket=" << source_bucket << " r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to update targets index for bucket=" << source_bucket << " r=" << r << dendl;
return r;
}
}
for (auto& source_bucket : removed_sources) {
RGWSI_BS_SObj_HintIndexObj dep_index(svc.sysobj,
get_dests_obj(source_bucket));
- int r = dep_index.update(source_bucket,
+ int r = dep_index.update(dpp, source_bucket,
bucket_info,
static_cast<C1 *>(nullptr),
&self_entity,
y);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to update targets index for bucket=" << source_bucket << " r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to update targets index for bucket=" << source_bucket << " r=" << r << dendl;
return r;
}
}
return 0;
}
-int RGWSI_Bucket_Sync_SObj::handle_bi_removal(const RGWBucketInfo& bucket_info,
+int RGWSI_Bucket_Sync_SObj::handle_bi_removal(const DoutPrefixProvider *dpp,
+ const RGWBucketInfo& bucket_info,
optional_yield y)
{
std::set<rgw_bucket> sources_set;
std::vector<rgw_bucket> added_sources;
std::vector<rgw_bucket> added_dests;
- return hint_index_mgr->update_hints(bucket_info,
+ return hint_index_mgr->update_hints(dpp, bucket_info,
added_dests,
removed_dests,
added_sources,
y);
}
-int RGWSI_Bucket_Sync_SObj::handle_bi_update(RGWBucketInfo& bucket_info,
+int RGWSI_Bucket_Sync_SObj::handle_bi_update(const DoutPrefixProvider *dpp,
+ RGWBucketInfo& bucket_info,
RGWBucketInfo *orig_bucket_info,
optional_yield y)
{
std::vector<rgw_bucket> removed_sources;
std::vector<rgw_bucket> added_sources;
bool found = diff_sets(orig_sources, sources, &added_sources, &removed_sources);
- ldout(cct, 20) << __func__ << "(): bucket=" << bucket_info.bucket << ": orig_sources=" << orig_sources << " new_sources=" << sources << dendl;
- ldout(cct, 20) << __func__ << "(): bucket=" << bucket_info.bucket << ": potential sources added=" << added_sources << " removed=" << removed_sources << dendl;
+ ldpp_dout(dpp, 20) << __func__ << "(): bucket=" << bucket_info.bucket << ": orig_sources=" << orig_sources << " new_sources=" << sources << dendl;
+ ldpp_dout(dpp, 20) << __func__ << "(): bucket=" << bucket_info.bucket << ": potential sources added=" << added_sources << " removed=" << removed_sources << dendl;
std::vector<rgw_bucket> removed_dests;
std::vector<rgw_bucket> added_dests;
found = found || diff_sets(orig_dests, dests, &added_dests, &removed_dests);
- ldout(cct, 20) << __func__ << "(): bucket=" << bucket_info.bucket << ": orig_dests=" << orig_dests << " new_dests=" << dests << dendl;
- ldout(cct, 20) << __func__ << "(): bucket=" << bucket_info.bucket << ": potential dests added=" << added_dests << " removed=" << removed_dests << dendl;
+ ldpp_dout(dpp, 20) << __func__ << "(): bucket=" << bucket_info.bucket << ": orig_dests=" << orig_dests << " new_dests=" << dests << dendl;
+ ldpp_dout(dpp, 20) << __func__ << "(): bucket=" << bucket_info.bucket << ": potential dests added=" << added_dests << " removed=" << removed_dests << dendl;
if (!found) {
return 0;
}
- return hint_index_mgr->update_hints(bucket_info,
+ return hint_index_mgr->update_hints(dpp, bucket_info,
dests, /* set all dests, not just the ones that were added */
removed_dests,
sources, /* set all sources, not just that the ones that were added */
y);
}
-int RGWSI_Bucket_Sync_SObj::get_bucket_sync_hints(const rgw_bucket& bucket,
+int RGWSI_Bucket_Sync_SObj::get_bucket_sync_hints(const DoutPrefixProvider *dpp,
+ const rgw_bucket& bucket,
std::set<rgw_bucket> *sources,
std::set<rgw_bucket> *dests,
optional_yield y)
if (sources) {
RGWSI_BS_SObj_HintIndexObj index(svc.sysobj,
hint_index_mgr->get_sources_obj(bucket));
- int r = index.read(y);
+ int r = index.read(dpp, y);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to update sources index for bucket=" << bucket << " r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to update sources index for bucket=" << bucket << " r=" << r << dendl;
return r;
}
if (dests) {
RGWSI_BS_SObj_HintIndexObj index(svc.sysobj,
hint_index_mgr->get_dests_obj(bucket));
- int r = index.read(y);
+ int r = index.read(dpp, y);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to read targets index for bucket=" << bucket << " r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to read targets index for bucket=" << bucket << " r=" << r << dendl;
return r;
}
std::unique_ptr<RGWSI_Bucket_Sync_SObj_HintIndexManager> hint_index_mgr;
- int do_start(optional_yield) override;
+ int do_start(optional_yield, const DoutPrefixProvider *dpp) override;
struct optional_zone_bucket {
optional<rgw_zone_id> zone;
const std::set<rgw_zone_id>& zone_names,
const std::set<rgw_bucket>& buckets,
std::set<rgw_sync_bucket_entity> *hint_entities,
- optional_yield y);
+ optional_yield y, const DoutPrefixProvider *);
int resolve_policy_hints(RGWSI_Bucket_X_Ctx& ctx,
rgw_sync_bucket_entity& self_entity,
RGWBucketSyncPolicyHandlerRef& handler,
RGWBucketSyncPolicyHandlerRef& zone_policy_handler,
std::map<optional_zone_bucket, RGWBucketSyncPolicyHandlerRef>& temp_map,
- optional_yield y);
+ optional_yield y,
+ const DoutPrefixProvider *dpp);
int do_get_policy_handler(RGWSI_Bucket_X_Ctx& ctx,
std::optional<rgw_zone_id> zone,
std::optional<rgw_bucket> _bucket,
std::map<optional_zone_bucket, RGWBucketSyncPolicyHandlerRef>& temp_map,
RGWBucketSyncPolicyHandlerRef *handler,
- optional_yield y);
+ optional_yield y,
+ const DoutPrefixProvider *dpp);
public:
struct Svc {
RGWSI_Zone *zone{nullptr};
std::optional<rgw_zone_id> zone,
std::optional<rgw_bucket> bucket,
RGWBucketSyncPolicyHandlerRef *handler,
- optional_yield y);
+ optional_yield y,
+ const DoutPrefixProvider *dpp);
- int handle_bi_update(RGWBucketInfo& bucket_info,
+ int handle_bi_update(const DoutPrefixProvider *dpp,
+ RGWBucketInfo& bucket_info,
RGWBucketInfo *orig_bucket_info,
optional_yield y) override;
- int handle_bi_removal(const RGWBucketInfo& bucket_info,
+ int handle_bi_removal(const DoutPrefixProvider *dpp,
+ const RGWBucketInfo& bucket_info,
optional_yield y) override;
- int get_bucket_sync_hints(const rgw_bucket& bucket,
+ int get_bucket_sync_hints(const DoutPrefixProvider *dpp,
+ const rgw_bucket& bucket,
std::set<rgw_bucket> *sources,
std::set<rgw_bucket> *dests,
optional_yield y) override;
static string log_lock_name = "rgw_log_lock";
-int RGWSI_Cls::do_start(optional_yield y)
+int RGWSI_Cls::do_start(optional_yield y, const DoutPrefixProvider *dpp)
{
- int r = mfa.do_start(y);
+ int r = mfa.do_start(y, dpp);
if (r < 0) {
- ldout(cct, 0) << "ERROR: failed to start mfa service" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to start mfa service" << dendl;
return r;
}
return 0;
}
-int RGWSI_Cls::MFA::get_mfa_obj(const rgw_user& user, std::optional<RGWSI_RADOS::Obj> *obj)
+int RGWSI_Cls::MFA::get_mfa_obj(const DoutPrefixProvider *dpp, const rgw_user& user, std::optional<RGWSI_RADOS::Obj> *obj)
{
string oid = get_mfa_oid(user);
rgw_raw_obj o(zone_svc->get_zone_params().otp_pool, oid);
obj->emplace(rados_svc->obj(o));
- int r = (*obj)->open();
+ int r = (*obj)->open(dpp);
if (r < 0) {
- ldout(cct, 4) << "failed to open rados context for " << o << dendl;
+ ldpp_dout(dpp, 4) << "failed to open rados context for " << o << dendl;
return r;
}
return 0;
}
-int RGWSI_Cls::MFA::get_mfa_ref(const rgw_user& user, rgw_rados_ref *ref)
+int RGWSI_Cls::MFA::get_mfa_ref(const DoutPrefixProvider *dpp, const rgw_user& user, rgw_rados_ref *ref)
{
std::optional<RGWSI_RADOS::Obj> obj;
- int r = get_mfa_obj(user, &obj);
+ int r = get_mfa_obj(dpp, user, &obj);
if (r < 0) {
return r;
}
return 0;
}
-int RGWSI_Cls::MFA::check_mfa(const rgw_user& user, const string& otp_id, const string& pin, optional_yield y)
+int RGWSI_Cls::MFA::check_mfa(const DoutPrefixProvider *dpp, const rgw_user& user, const string& otp_id, const string& pin, optional_yield y)
{
rgw_rados_ref ref;
- int r = get_mfa_ref(user, &ref);
+ int r = get_mfa_ref(dpp, user, &ref);
if (r < 0) {
return r;
}
if (r < 0)
return r;
- ldout(cct, 20) << "OTP check, otp_id=" << otp_id << " result=" << (int)result.result << dendl;
+ ldpp_dout(dpp, 20) << "OTP check, otp_id=" << otp_id << " result=" << (int)result.result << dendl;
return (result.result == rados::cls::otp::OTP_CHECK_SUCCESS ? 0 : -EACCES);
}
op->mtime2(&mtime_ts);
}
-int RGWSI_Cls::MFA::create_mfa(const rgw_user& user, const rados::cls::otp::otp_info_t& config,
+int RGWSI_Cls::MFA::create_mfa(const DoutPrefixProvider *dpp, const rgw_user& user, const rados::cls::otp::otp_info_t& config,
RGWObjVersionTracker *objv_tracker, const ceph::real_time& mtime, optional_yield y)
{
std::optional<RGWSI_RADOS::Obj> obj;
- int r = get_mfa_obj(user, &obj);
+ int r = get_mfa_obj(dpp, user, &obj);
if (r < 0) {
return r;
}
librados::ObjectWriteOperation op;
prepare_mfa_write(&op, objv_tracker, mtime);
rados::cls::otp::OTP::create(&op, config);
- r = obj->operate(&op, y);
+ r = obj->operate(dpp, &op, y);
if (r < 0) {
- ldout(cct, 20) << "OTP create, otp_id=" << config.id << " result=" << (int)r << dendl;
+ ldpp_dout(dpp, 20) << "OTP create, otp_id=" << config.id << " result=" << (int)r << dendl;
return r;
}
return 0;
}
-int RGWSI_Cls::MFA::remove_mfa(const rgw_user& user, const string& id,
+int RGWSI_Cls::MFA::remove_mfa(const DoutPrefixProvider *dpp,
+ const rgw_user& user, const string& id,
RGWObjVersionTracker *objv_tracker,
const ceph::real_time& mtime,
optional_yield y)
{
std::optional<RGWSI_RADOS::Obj> obj;
- int r = get_mfa_obj(user, &obj);
+ int r = get_mfa_obj(dpp, user, &obj);
if (r < 0) {
return r;
}
librados::ObjectWriteOperation op;
prepare_mfa_write(&op, objv_tracker, mtime);
rados::cls::otp::OTP::remove(&op, id);
- r = obj->operate(&op, y);
+ r = obj->operate(dpp, &op, y);
if (r < 0) {
- ldout(cct, 20) << "OTP remove, otp_id=" << id << " result=" << (int)r << dendl;
+ ldpp_dout(dpp, 20) << "OTP remove, otp_id=" << id << " result=" << (int)r << dendl;
return r;
}
return 0;
}
-int RGWSI_Cls::MFA::get_mfa(const rgw_user& user, const string& id, rados::cls::otp::otp_info_t *result,
+int RGWSI_Cls::MFA::get_mfa(const DoutPrefixProvider *dpp, const rgw_user& user, const string& id, rados::cls::otp::otp_info_t *result,
optional_yield y)
{
rgw_rados_ref ref;
- int r = get_mfa_ref(user, &ref);
+ int r = get_mfa_ref(dpp, user, &ref);
if (r < 0) {
return r;
}
return 0;
}
-int RGWSI_Cls::MFA::list_mfa(const rgw_user& user, list<rados::cls::otp::otp_info_t> *result,
+int RGWSI_Cls::MFA::list_mfa(const DoutPrefixProvider *dpp, const rgw_user& user, list<rados::cls::otp::otp_info_t> *result,
optional_yield y)
{
rgw_rados_ref ref;
- int r = get_mfa_ref(user, &ref);
+ int r = get_mfa_ref(dpp, user, &ref);
if (r < 0) {
return r;
}
return 0;
}
-int RGWSI_Cls::MFA::otp_get_current_time(const rgw_user& user, ceph::real_time *result,
+int RGWSI_Cls::MFA::otp_get_current_time(const DoutPrefixProvider *dpp, const rgw_user& user, ceph::real_time *result,
optional_yield y)
{
rgw_rados_ref ref;
- int r = get_mfa_ref(user, &ref);
+ int r = get_mfa_ref(dpp, user, &ref);
if (r < 0) {
return r;
}
return 0;
}
-int RGWSI_Cls::MFA::set_mfa(const string& oid, const list<rados::cls::otp::otp_info_t>& entries,
+int RGWSI_Cls::MFA::set_mfa(const DoutPrefixProvider *dpp, const string& oid, const list<rados::cls::otp::otp_info_t>& entries,
bool reset_obj, RGWObjVersionTracker *objv_tracker,
const real_time& mtime,
optional_yield y)
{
rgw_raw_obj o(zone_svc->get_zone_params().otp_pool, oid);
auto obj = rados_svc->obj(o);
- int r = obj.open();
+ int r = obj.open(dpp);
if (r < 0) {
- ldout(cct, 4) << "failed to open rados context for " << o << dendl;
+ ldpp_dout(dpp, 4) << "failed to open rados context for " << o << dendl;
return r;
}
librados::ObjectWriteOperation op;
}
prepare_mfa_write(&op, objv_tracker, mtime);
rados::cls::otp::OTP::set(&op, entries);
- r = obj.operate(&op, y);
+ r = obj.operate(dpp, &op, y);
if (r < 0) {
- ldout(cct, 20) << "OTP set entries.size()=" << entries.size() << " result=" << (int)r << dendl;
+ ldpp_dout(dpp, 20) << "OTP set entries.size()=" << entries.size() << " result=" << (int)r << dendl;
return r;
}
return 0;
}
-int RGWSI_Cls::MFA::list_mfa(const string& oid, list<rados::cls::otp::otp_info_t> *result,
+int RGWSI_Cls::MFA::list_mfa(const DoutPrefixProvider *dpp, const string& oid, list<rados::cls::otp::otp_info_t> *result,
RGWObjVersionTracker *objv_tracker, ceph::real_time *pmtime,
optional_yield y)
{
rgw_raw_obj o(zone_svc->get_zone_params().otp_pool, oid);
auto obj = rados_svc->obj(o);
- int r = obj.open();
+ int r = obj.open(dpp);
if (r < 0) {
- ldout(cct, 4) << "failed to open rados context for " << o << dendl;
+ ldpp_dout(dpp, 4) << "failed to open rados context for " << o << dendl;
return r;
}
auto& ref = obj.get_ref();
cls_log_add_prepare_entry(entry, utime_t(ut), section, key, bl);
}
-int RGWSI_Cls::TimeLog::init_obj(const string& oid, RGWSI_RADOS::Obj& obj)
+int RGWSI_Cls::TimeLog::init_obj(const DoutPrefixProvider *dpp, const string& oid, RGWSI_RADOS::Obj& obj)
{
rgw_raw_obj o(zone_svc->get_zone_params().log_pool, oid);
obj = rados_svc->obj(o);
- return obj.open();
+ return obj.open(dpp);
}
-int RGWSI_Cls::TimeLog::add(const string& oid,
+int RGWSI_Cls::TimeLog::add(const DoutPrefixProvider *dpp,
+ const string& oid,
const real_time& ut,
const string& section,
const string& key,
{
RGWSI_RADOS::Obj obj;
- int r = init_obj(oid, obj);
+ int r = init_obj(dpp, oid, obj);
if (r < 0) {
return r;
}
utime_t t(ut);
cls_log_add(op, t, section, key, bl);
- return obj.operate(&op, y);
+ return obj.operate(dpp, &op, y);
}
-int RGWSI_Cls::TimeLog::add(const string& oid,
+int RGWSI_Cls::TimeLog::add(const DoutPrefixProvider *dpp,
+ const string& oid,
std::list<cls_log_entry>& entries,
librados::AioCompletion *completion,
bool monotonic_inc,
{
RGWSI_RADOS::Obj obj;
- int r = init_obj(oid, obj);
+ int r = init_obj(dpp, oid, obj);
if (r < 0) {
return r;
}
cls_log_add(op, entries, monotonic_inc);
if (!completion) {
- r = obj.operate(&op, y);
+ r = obj.operate(dpp, &op, y);
} else {
r = obj.aio_operate(completion, &op);
}
return r;
}
-int RGWSI_Cls::TimeLog::list(const string& oid,
+int RGWSI_Cls::TimeLog::list(const DoutPrefixProvider *dpp,
+ const string& oid,
const real_time& start_time,
const real_time& end_time,
int max_entries, std::list<cls_log_entry>& entries,
{
RGWSI_RADOS::Obj obj;
- int r = init_obj(oid, obj);
+ int r = init_obj(dpp, oid, obj);
if (r < 0) {
return r;
}
bufferlist obl;
- int ret = obj.operate(&op, &obl, y);
+ int ret = obj.operate(dpp, &op, &obl, y);
if (ret < 0)
return ret;
return 0;
}
-int RGWSI_Cls::TimeLog::info(const string& oid,
+int RGWSI_Cls::TimeLog::info(const DoutPrefixProvider *dpp,
+ const string& oid,
cls_log_header *header,
optional_yield y)
{
RGWSI_RADOS::Obj obj;
- int r = init_obj(oid, obj);
+ int r = init_obj(dpp, oid, obj);
if (r < 0) {
return r;
}
bufferlist obl;
- int ret = obj.operate(&op, &obl, y);
+ int ret = obj.operate(dpp, &op, &obl, y);
if (ret < 0)
return ret;
return 0;
}
-int RGWSI_Cls::TimeLog::info_async(RGWSI_RADOS::Obj& obj,
+int RGWSI_Cls::TimeLog::info_async(const DoutPrefixProvider *dpp,
+ RGWSI_RADOS::Obj& obj,
const string& oid,
cls_log_header *header,
librados::AioCompletion *completion)
{
- int r = init_obj(oid, obj);
+ int r = init_obj(dpp, oid, obj);
if (r < 0) {
return r;
}
return 0;
}
-int RGWSI_Cls::TimeLog::trim(const string& oid,
+int RGWSI_Cls::TimeLog::trim(const DoutPrefixProvider *dpp,
+ const string& oid,
const real_time& start_time,
const real_time& end_time,
const string& from_marker,
{
RGWSI_RADOS::Obj obj;
- int r = init_obj(oid, obj);
+ int r = init_obj(dpp, oid, obj);
if (r < 0) {
return r;
}
cls_log_trim(op, st, et, from_marker, to_marker);
if (!completion) {
- r = obj.operate(&op, y);
+ r = obj.operate(dpp, &op, y);
} else {
r = obj.aio_operate(completion, &op);
}
return r;
}
-int RGWSI_Cls::Lock::lock_exclusive(const rgw_pool& pool,
+int RGWSI_Cls::Lock::lock_exclusive(const DoutPrefixProvider *dpp,
+ const rgw_pool& pool,
const string& oid,
timespan& duration,
string& zone_id,
std::optional<string> lock_name)
{
auto p = rados_svc->pool(pool);
- int r = p.open();
+ int r = p.open(dpp);
if (r < 0) {
return r;
}
return l.lock_exclusive(&p.ioctx(), oid);
}
-int RGWSI_Cls::Lock::unlock(const rgw_pool& pool,
+int RGWSI_Cls::Lock::unlock(const DoutPrefixProvider *dpp,
+ const rgw_pool& pool,
const string& oid,
string& zone_id,
string& owner_id,
std::optional<string> lock_name)
{
auto p = rados_svc->pool(pool);
- int r = p.open();
+ int r = p.open(dpp);
if (r < 0) {
return r;
}
public:
class MFA : public ClsSubService {
- int get_mfa_obj(const rgw_user& user, std::optional<RGWSI_RADOS::Obj> *obj);
- int get_mfa_ref(const rgw_user& user, rgw_rados_ref *ref);
+ int get_mfa_obj(const DoutPrefixProvider *dpp, const rgw_user& user, std::optional<RGWSI_RADOS::Obj> *obj);
+ int get_mfa_ref(const DoutPrefixProvider *dpp, const rgw_user& user, rgw_rados_ref *ref);
void prepare_mfa_write(librados::ObjectWriteOperation *op,
RGWObjVersionTracker *objv_tracker,
return string("user:") + user.to_str();
}
- int check_mfa(const rgw_user& user, const string& otp_id, const string& pin, optional_yield y);
- int create_mfa(const rgw_user& user, const rados::cls::otp::otp_info_t& config,
+ int check_mfa(const DoutPrefixProvider *dpp, const rgw_user& user, const string& otp_id, const string& pin, optional_yield y);
+ int create_mfa(const DoutPrefixProvider *dpp, const rgw_user& user, const rados::cls::otp::otp_info_t& config,
RGWObjVersionTracker *objv_tracker, const ceph::real_time& mtime, optional_yield y);
- int remove_mfa(const rgw_user& user, const string& id,
+ int remove_mfa(const DoutPrefixProvider *dpp,
+ const rgw_user& user, const string& id,
RGWObjVersionTracker *objv_tracker,
const ceph::real_time& mtime,
optional_yield y);
- int get_mfa(const rgw_user& user, const string& id, rados::cls::otp::otp_info_t *result, optional_yield y);
- int list_mfa(const rgw_user& user, list<rados::cls::otp::otp_info_t> *result, optional_yield y);
- int otp_get_current_time(const rgw_user& user, ceph::real_time *result, optional_yield y);
- int set_mfa(const string& oid, const list<rados::cls::otp::otp_info_t>& entries,
+ int get_mfa(const DoutPrefixProvider *dpp, const rgw_user& user, const string& id, rados::cls::otp::otp_info_t *result, optional_yield y);
+ int list_mfa(const DoutPrefixProvider *dpp, const rgw_user& user, list<rados::cls::otp::otp_info_t> *result, optional_yield y);
+ int otp_get_current_time(const DoutPrefixProvider *dpp, const rgw_user& user, ceph::real_time *result, optional_yield y);
+ int set_mfa(const DoutPrefixProvider *dpp, const string& oid, const list<rados::cls::otp::otp_info_t>& entries,
bool reset_obj, RGWObjVersionTracker *objv_tracker,
const real_time& mtime, optional_yield y);
- int list_mfa(const string& oid, list<rados::cls::otp::otp_info_t> *result,
+ int list_mfa(const DoutPrefixProvider *dpp, const string& oid, list<rados::cls::otp::otp_info_t> *result,
RGWObjVersionTracker *objv_tracker, ceph::real_time *pmtime, optional_yield y);
} mfa;
class TimeLog : public ClsSubService {
- int init_obj(const string& oid, RGWSI_RADOS::Obj& obj);
+ int init_obj(const DoutPrefixProvider *dpp, const string& oid, RGWSI_RADOS::Obj& obj);
public:
TimeLog(CephContext *cct): ClsSubService(cct) {}
const string& section,
const string& key,
bufferlist& bl);
- int add(const string& oid,
+ int add(const DoutPrefixProvider *dpp,
+ const string& oid,
const real_time& ut,
const string& section,
const string& key,
bufferlist& bl,
optional_yield y);
- int add(const string& oid,
+ int add(const DoutPrefixProvider *dpp,
+ const string& oid,
std::list<cls_log_entry>& entries,
librados::AioCompletion *completion,
bool monotonic_inc,
optional_yield y);
- int list(const string& oid,
+ int list(const DoutPrefixProvider *dpp,
+ const string& oid,
const real_time& start_time,
const real_time& end_time,
int max_entries, list<cls_log_entry>& entries,
string *out_marker,
bool *truncated,
optional_yield y);
- int info(const string& oid,
+ int info(const DoutPrefixProvider *dpp,
+ const string& oid,
cls_log_header *header,
optional_yield y);
- int info_async(RGWSI_RADOS::Obj& obj,
+ int info_async(const DoutPrefixProvider *dpp,
+ RGWSI_RADOS::Obj& obj,
const string& oid,
cls_log_header *header,
librados::AioCompletion *completion);
- int trim(const string& oid,
+ int trim(const DoutPrefixProvider *dpp,
+ const string& oid,
const real_time& start_time,
const real_time& end_time,
const string& from_marker,
int init_obj(const string& oid, RGWSI_RADOS::Obj& obj);
public:
Lock(CephContext *cct): ClsSubService(cct) {}
- int lock_exclusive(const rgw_pool& pool,
+ int lock_exclusive(const DoutPrefixProvider *dpp,
+ const rgw_pool& pool,
const string& oid,
timespan& duration,
string& zone_id,
string& owner_id,
std::optional<string> lock_name = std::nullopt);
- int unlock(const rgw_pool& pool,
+ int unlock(const DoutPrefixProvider *dpp,
+ const rgw_pool& pool,
const string& oid,
string& zone_id,
string& owner_id,
lock.init(this, zone_svc, rados_svc);
}
- int do_start(optional_yield) override;
+ int do_start(optional_yield, const DoutPrefixProvider *dpp) override;
};
#include "svc_rados.h"
#include "svc_config_key_rados.h"
-int RGWSI_ConfigKey_RADOS::do_start(optional_yield)
+int RGWSI_ConfigKey_RADOS::do_start(optional_yield, const DoutPrefixProvider *dpp)
{
maybe_insecure_mon_conn = !svc.rados->check_secure_mon_conn();
bool maybe_insecure_mon_conn{false};
std::atomic_flag warned_insecure = ATOMIC_FLAG_INIT;
- int do_start(optional_yield) override;
+ int do_start(optional_yield, const DoutPrefixProvider *dpp) override;
void warn_if_insecure();
#include "svc_finisher.h"
-int RGWSI_Finisher::do_start(optional_yield)
+int RGWSI_Finisher::do_start(optional_yield, const DoutPrefixProvider *dpp)
{
finisher = new Finisher(cct);
finisher->start();
protected:
void init() {}
- int do_start(optional_yield y) override;
+ int do_start(optional_yield y, const DoutPrefixProvider *dpp) override;
public:
RGWSI_Finisher(CephContext *cct): RGWServiceInstance(cct) {}
return 0;
}
-int RGWSI_MDLog::do_start(optional_yield y)
+int RGWSI_MDLog::do_start(optional_yield y, const DoutPrefixProvider *dpp)
{
auto& current_period = svc.zone->get_current_period();
if (run_sync &&
svc.zone->need_to_sync()) {
// initialize the log period history
- svc.mdlog->init_oldest_log_period(y);
+ svc.mdlog->init_oldest_log_period(y, dpp);
}
return 0;
}
int RGWSI_MDLog::read_history(RGWMetadataLogHistory *state,
RGWObjVersionTracker *objv_tracker,
- optional_yield y) const
+ optional_yield y,
+ const DoutPrefixProvider *dpp) const
{
auto obj_ctx = svc.sysobj->init_obj_ctx();
auto& pool = svc.zone->get_zone_params().log_pool;
const auto& oid = RGWMetadataLogHistory::oid;
bufferlist bl;
- int ret = rgw_get_system_obj(obj_ctx, pool, oid, bl, objv_tracker, nullptr, y);
+ int ret = rgw_get_system_obj(obj_ctx, pool, oid, bl, objv_tracker, nullptr, y, dpp);
if (ret < 0) {
return ret;
}
/* bad history object, remove it */
rgw_raw_obj obj(pool, oid);
auto sysobj = obj_ctx.get_obj(obj);
- ret = sysobj.wop().remove(y);
+ ret = sysobj.wop().remove(dpp, y);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: meta history is empty, but cannot remove it (" << cpp_strerror(-ret) << ")" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: meta history is empty, but cannot remove it (" << cpp_strerror(-ret) << ")" << dendl;
return ret;
}
return -ENOENT;
auto p = bl.cbegin();
state->decode(p);
} catch (buffer::error& e) {
- ldout(cct, 1) << "failed to decode the mdlog history: "
+ ldpp_dout(dpp, 1) << "failed to decode the mdlog history: "
<< e.what() << dendl;
return -EIO;
}
return 0;
}
-int RGWSI_MDLog::write_history(const RGWMetadataLogHistory& state,
+int RGWSI_MDLog::write_history(const DoutPrefixProvider *dpp,
+ const RGWMetadataLogHistory& state,
RGWObjVersionTracker *objv_tracker,
optional_yield y, bool exclusive)
{
auto& pool = svc.zone->get_zone_params().log_pool;
const auto& oid = RGWMetadataLogHistory::oid;
auto obj_ctx = svc.sysobj->init_obj_ctx();
- return rgw_put_system_obj(obj_ctx, pool, oid, bl,
+ return rgw_put_system_obj(dpp, obj_ctx, pool, oid, bl,
exclusive, objv_tracker, real_time{}, y);
}
/// read the mdlog history and use it to initialize the given cursor
class ReadHistoryCR : public RGWCoroutine {
+ const DoutPrefixProvider *dpp;
Svc svc;
Cursor *cursor;
RGWObjVersionTracker *objv_tracker;
RGWAsyncRadosProcessor *async_processor;
public:
- ReadHistoryCR(const Svc& svc,
+ ReadHistoryCR(const DoutPrefixProvider *dpp,
+ const Svc& svc,
Cursor *cursor,
RGWObjVersionTracker *objv_tracker)
- : RGWCoroutine(svc.zone->ctx()), svc(svc),
+ : RGWCoroutine(svc.zone->ctx()), dpp(dpp), svc(svc),
cursor(cursor),
objv_tracker(objv_tracker),
async_processor(svc.rados->get_async_processor())
{}
- int operate() {
+ int operate(const DoutPrefixProvider *dpp) {
reenter(this) {
yield {
rgw_raw_obj obj{svc.zone->get_zone_params().log_pool,
constexpr bool empty_on_enoent = false;
using ReadCR = RGWSimpleRadosReadCR<RGWMetadataLogHistory>;
- call(new ReadCR(async_processor, svc.sysobj, obj,
+ call(new ReadCR(dpp, async_processor, svc.sysobj, obj,
&state, empty_on_enoent, objv_tracker));
}
if (retcode < 0) {
- ldout(cct, 1) << "failed to read mdlog history: "
+ ldpp_dout(dpp, 1) << "failed to read mdlog history: "
<< cpp_strerror(retcode) << dendl;
return set_cr_error(retcode);
}
return set_cr_error(cursor->get_error());
}
- ldout(cct, 10) << "read mdlog history with oldest period id="
+ ldpp_dout(dpp, 10) << "read mdlog history with oldest period id="
<< state.oldest_period_id << " realm_epoch="
<< state.oldest_realm_epoch << dendl;
return set_cr_done();
/// write the given cursor to the mdlog history
class WriteHistoryCR : public RGWCoroutine {
+ const DoutPrefixProvider *dpp;
Svc svc;
Cursor cursor;
RGWObjVersionTracker *objv;
RGWAsyncRadosProcessor *async_processor;
public:
- WriteHistoryCR(Svc& svc,
+ WriteHistoryCR(const DoutPrefixProvider *dpp,
+ Svc& svc,
const Cursor& cursor,
RGWObjVersionTracker *objv)
- : RGWCoroutine(svc.zone->ctx()), svc(svc),
+ : RGWCoroutine(svc.zone->ctx()), dpp(dpp), svc(svc),
cursor(cursor), objv(objv),
async_processor(svc.rados->get_async_processor())
{}
- int operate() {
+ int operate(const DoutPrefixProvider *dpp) {
reenter(this) {
state.oldest_period_id = cursor.get_period().get_id();
state.oldest_realm_epoch = cursor.get_epoch();
RGWMetadataLogHistory::oid};
using WriteCR = RGWSimpleRadosWriteCR<RGWMetadataLogHistory>;
- call(new WriteCR(async_processor, svc.sysobj, obj, state, objv));
+ call(new WriteCR(dpp, async_processor, svc.sysobj, obj, state, objv));
}
if (retcode < 0) {
- ldout(cct, 1) << "failed to write mdlog history: "
+ ldpp_dout(dpp, 1) << "failed to write mdlog history: "
<< cpp_strerror(retcode) << dendl;
return set_cr_error(retcode);
}
- ldout(cct, 10) << "wrote mdlog history with oldest period id="
+ ldpp_dout(dpp, 10) << "wrote mdlog history with oldest period id="
<< state.oldest_period_id << " realm_epoch="
<< state.oldest_realm_epoch << dendl;
return set_cr_done();
/// update the mdlog history to reflect trimmed logs
class TrimHistoryCR : public RGWCoroutine {
+ const DoutPrefixProvider *dpp;
Svc svc;
const Cursor cursor; //< cursor to trimmed period
RGWObjVersionTracker *objv; //< to prevent racing updates
Cursor existing; //< existing cursor read from disk
public:
- TrimHistoryCR(const Svc& svc, Cursor cursor, RGWObjVersionTracker *objv)
- : RGWCoroutine(svc.zone->ctx()), svc(svc),
+ TrimHistoryCR(const DoutPrefixProvider *dpp, const Svc& svc, Cursor cursor, RGWObjVersionTracker *objv)
+ : RGWCoroutine(svc.zone->ctx()), dpp(dpp), svc(svc),
cursor(cursor), objv(objv), next(cursor) {
next.next(); // advance past cursor
}
- int operate() {
+ int operate(const DoutPrefixProvider *dpp) {
reenter(this) {
// read an existing history, and write the new history if it's newer
- yield call(new ReadHistoryCR(svc, &existing, objv));
+ yield call(new ReadHistoryCR(dpp, svc, &existing, objv));
if (retcode < 0) {
return set_cr_error(retcode);
}
// reject older trims with ECANCELED
if (cursor.get_epoch() < existing.get_epoch()) {
- ldout(cct, 4) << "found oldest log epoch=" << existing.get_epoch()
+ ldpp_dout(dpp, 4) << "found oldest log epoch=" << existing.get_epoch()
<< ", rejecting trim at epoch=" << cursor.get_epoch() << dendl;
return set_cr_error(-ECANCELED);
}
// overwrite with updated history
- yield call(new WriteHistoryCR(svc, next, objv));
+ yield call(new WriteHistoryCR(dpp, svc, next, objv));
if (retcode < 0) {
return set_cr_error(retcode);
}
// traverse all the way back to the beginning of the period history, and
// return a cursor to the first period in a fully attached history
-Cursor RGWSI_MDLog::find_oldest_period(optional_yield y)
+Cursor RGWSI_MDLog::find_oldest_period(const DoutPrefixProvider *dpp, optional_yield y)
{
auto cursor = period_history->get_current();
auto& predecessor = cursor.get_period().get_predecessor();
if (predecessor.empty()) {
// this is the first period, so our logs must start here
- ldout(cct, 10) << "find_oldest_period returning first "
+ ldpp_dout(dpp, 10) << "find_oldest_period returning first "
"period " << cursor.get_period().get_id() << dendl;
return cursor;
}
// pull the predecessor and add it to our history
RGWPeriod period;
- int r = period_puller->pull(predecessor, period, y);
+ int r = period_puller->pull(dpp, predecessor, period, y);
if (r < 0) {
return cursor;
}
if (!prev) {
return prev;
}
- ldout(cct, 20) << "find_oldest_period advancing to "
+ ldpp_dout(dpp, 20) << "find_oldest_period advancing to "
"predecessor period " << predecessor << dendl;
ceph_assert(cursor.has_prev());
}
cursor.prev();
}
- ldout(cct, 10) << "find_oldest_period returning empty cursor" << dendl;
+ ldpp_dout(dpp, 10) << "find_oldest_period returning empty cursor" << dendl;
return cursor;
}
-Cursor RGWSI_MDLog::init_oldest_log_period(optional_yield y)
+Cursor RGWSI_MDLog::init_oldest_log_period(optional_yield y, const DoutPrefixProvider *dpp)
{
// read the mdlog history
RGWMetadataLogHistory state;
RGWObjVersionTracker objv;
- int ret = read_history(&state, &objv, y);
+ int ret = read_history(&state, &objv, y, dpp);
if (ret == -ENOENT) {
// initialize the mdlog history and write it
- ldout(cct, 10) << "initializing mdlog history" << dendl;
- auto cursor = find_oldest_period(y);
+ ldpp_dout(dpp, 10) << "initializing mdlog history" << dendl;
+ auto cursor = find_oldest_period(dpp, y);
if (!cursor) {
return cursor;
}
state.oldest_period_id = cursor.get_period().get_id();
constexpr bool exclusive = true; // don't overwrite
- int ret = write_history(state, &objv, y, exclusive);
+ int ret = write_history(dpp, state, &objv, y, exclusive);
if (ret < 0 && ret != -EEXIST) {
- ldout(cct, 1) << "failed to write mdlog history: "
+ ldpp_dout(dpp, 1) << "failed to write mdlog history: "
<< cpp_strerror(ret) << dendl;
return Cursor{ret};
}
return cursor;
} else if (ret < 0) {
- ldout(cct, 1) << "failed to read mdlog history: "
+ ldpp_dout(dpp, 1) << "failed to read mdlog history: "
<< cpp_strerror(ret) << dendl;
return Cursor{ret};
}
if (cursor) {
return cursor;
} else {
- cursor = find_oldest_period(y);
+ cursor = find_oldest_period(dpp, y);
state.oldest_realm_epoch = cursor.get_epoch();
state.oldest_period_id = cursor.get_period().get_id();
- ldout(cct, 10) << "rewriting mdlog history" << dendl;
- ret = write_history(state, &objv, y);
+ ldpp_dout(dpp, 10) << "rewriting mdlog history" << dendl;
+ ret = write_history(dpp, state, &objv, y);
if (ret < 0 && ret != -ECANCELED) {
- ldout(cct, 1) << "failed to write mdlog history: "
+ ldpp_dout(dpp, 1) << "failed to write mdlog history: "
<< cpp_strerror(ret) << dendl;
return Cursor{ret};
}
// pull the oldest period by id
RGWPeriod period;
- ret = period_puller->pull(state.oldest_period_id, period, y);
+ ret = period_puller->pull(dpp, state.oldest_period_id, period, y);
if (ret < 0) {
- ldout(cct, 1) << "failed to read period id=" << state.oldest_period_id
+ ldpp_dout(dpp, 1) << "failed to read period id=" << state.oldest_period_id
<< " for mdlog history: " << cpp_strerror(ret) << dendl;
return Cursor{ret};
}
// verify its realm_epoch
if (period.get_realm_epoch() != state.oldest_realm_epoch) {
- ldout(cct, 1) << "inconsistent mdlog history: read period id="
+ ldpp_dout(dpp, 1) << "inconsistent mdlog history: read period id="
<< period.get_id() << " with realm_epoch=" << period.get_realm_epoch()
<< ", expected realm_epoch=" << state.oldest_realm_epoch << dendl;
return Cursor{-EINVAL};
}
// attach the period to our history
- return period_history->attach(std::move(period), y);
+ return period_history->attach(dpp, std::move(period), y);
}
-Cursor RGWSI_MDLog::read_oldest_log_period(optional_yield y) const
+Cursor RGWSI_MDLog::read_oldest_log_period(optional_yield y, const DoutPrefixProvider *dpp) const
{
RGWMetadataLogHistory state;
- int ret = read_history(&state, nullptr, y);
+ int ret = read_history(&state, nullptr, y, dpp);
if (ret < 0) {
- ldout(cct, 1) << "failed to read mdlog history: "
+ ldpp_dout(dpp, 1) << "failed to read mdlog history: "
<< cpp_strerror(ret) << dendl;
return Cursor{ret};
}
- ldout(cct, 10) << "read mdlog history with oldest period id="
+ ldpp_dout(dpp, 10) << "read mdlog history with oldest period id="
<< state.oldest_period_id << " realm_epoch="
<< state.oldest_realm_epoch << dendl;
return period_history->lookup(state.oldest_realm_epoch);
}
-RGWCoroutine* RGWSI_MDLog::read_oldest_log_period_cr(Cursor *period,
- RGWObjVersionTracker *objv) const
+RGWCoroutine* RGWSI_MDLog::read_oldest_log_period_cr(const DoutPrefixProvider *dpp,
+ Cursor *period, RGWObjVersionTracker *objv) const
{
- return new mdlog::ReadHistoryCR(svc, period, objv);
+ return new mdlog::ReadHistoryCR(dpp, svc, period, objv);
}
-RGWCoroutine* RGWSI_MDLog::trim_log_period_cr(Cursor period,
- RGWObjVersionTracker *objv) const
+RGWCoroutine* RGWSI_MDLog::trim_log_period_cr(const DoutPrefixProvider *dpp,
+ Cursor period, RGWObjVersionTracker *objv) const
{
- return new mdlog::TrimHistoryCR(svc, period, objv);
+ return new mdlog::TrimHistoryCR(dpp, svc, period, objv);
}
RGWMetadataLog* RGWSI_MDLog::get_log(const std::string& period)
return &insert.first->second;
}
-int RGWSI_MDLog::add_entry(const string& hash_key, const string& section, const string& key, bufferlist& bl)
+int RGWSI_MDLog::add_entry(const DoutPrefixProvider *dpp, const string& hash_key, const string& section, const string& key, bufferlist& bl)
{
ceph_assert(current_log); // must have called init()
- return current_log->add_entry(hash_key, section, key, bl);
+ return current_log->add_entry(dpp, hash_key, section, key, bl);
}
int RGWSI_MDLog::get_shard_id(const string& hash_key, int *shard_id)
return current_log->get_shard_id(hash_key, shard_id);
}
-int RGWSI_MDLog::pull_period(const std::string& period_id, RGWPeriod& period,
+int RGWSI_MDLog::pull_period(const DoutPrefixProvider *dpp, const std::string& period_id, RGWPeriod& period,
optional_yield y)
{
- return period_puller->pull(period_id, period, y);
+ return period_puller->pull(dpp, period_id, period, y);
}
RGWSI_SysObj *_sysobj_svc,
RGWSI_Cls *_cls_svc);
- int do_start(optional_yield y) override;
+ int do_start(optional_yield y, const DoutPrefixProvider *dpp) override;
// traverse all the way back to the beginning of the period history, and
// return a cursor to the first period in a fully attached history
- RGWPeriodHistory::Cursor find_oldest_period(optional_yield y);
+ RGWPeriodHistory::Cursor find_oldest_period(const DoutPrefixProvider *dpp, optional_yield y);
/// initialize the oldest log period if it doesn't exist, and attach it to
/// our current history
- RGWPeriodHistory::Cursor init_oldest_log_period(optional_yield y);
+ RGWPeriodHistory::Cursor init_oldest_log_period(optional_yield y, const DoutPrefixProvider *dpp);
/// read the oldest log period, and return a cursor to it in our existing
/// period history
- RGWPeriodHistory::Cursor read_oldest_log_period(optional_yield y) const;
+ RGWPeriodHistory::Cursor read_oldest_log_period(optional_yield y, const DoutPrefixProvider *dpp) const;
/// read the oldest log period asynchronously and write its result to the
/// given cursor pointer
- RGWCoroutine* read_oldest_log_period_cr(RGWPeriodHistory::Cursor *period,
+ RGWCoroutine* read_oldest_log_period_cr(const DoutPrefixProvider *dpp,
+ RGWPeriodHistory::Cursor *period,
RGWObjVersionTracker *objv) const;
/// try to advance the oldest log period when the given period is trimmed,
/// using a rados lock to provide atomicity
- RGWCoroutine* trim_log_period_cr(RGWPeriodHistory::Cursor period,
+ RGWCoroutine* trim_log_period_cr(const DoutPrefixProvider *dpp,
+ RGWPeriodHistory::Cursor period,
RGWObjVersionTracker *objv) const;
- int read_history(RGWMetadataLogHistory *state, RGWObjVersionTracker *objv_tracker,optional_yield y) const;
- int write_history(const RGWMetadataLogHistory& state,
+ int read_history(RGWMetadataLogHistory *state, RGWObjVersionTracker *objv_tracker,optional_yield y, const DoutPrefixProvider *dpp) const;
+ int write_history(const DoutPrefixProvider *dpp,
+ const RGWMetadataLogHistory& state,
RGWObjVersionTracker *objv_tracker,
optional_yield y, bool exclusive = false);
- int add_entry(const string& hash_key, const string& section, const string& key, bufferlist& bl);
+ int add_entry(const DoutPrefixProvider *dpp, const string& hash_key, const string& section, const string& key, bufferlist& bl);
int get_shard_id(const string& hash_key, int *shard_id);
return period_history.get();
}
- int pull_period(const std::string& period_id, RGWPeriod& period, optional_yield y);
+ int pull_period(const DoutPrefixProvider *dpp, const std::string& period_id, RGWPeriod& period, optional_yield y);
/// find or create the metadata log for the given period
RGWMetadataLog* get_log(const std::string& period);
RGWSI_MetaBackend::GetParams::~GetParams() {} // ...
RGWSI_MetaBackend::RemoveParams::~RemoveParams() {} // ...
-int RGWSI_MetaBackend::pre_modify(RGWSI_MetaBackend::Context *ctx,
+int RGWSI_MetaBackend::pre_modify(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *ctx,
const string& key,
RGWMetadataLogData& log_data,
RGWObjVersionTracker *objv_tracker,
return 0;
}
-int RGWSI_MetaBackend::post_modify(RGWSI_MetaBackend::Context *ctx,
+int RGWSI_MetaBackend::post_modify(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *ctx,
const string& key,
RGWMetadataLogData& log_data,
RGWObjVersionTracker *objv_tracker, int ret,
const string& key,
const real_time& mtime,
RGWObjVersionTracker *objv_tracker,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
real_time orig_mtime;
int ret = call_with_get_params(&orig_mtime, [&](GetParams& params) {
- return get_entry(ctx, key, params, objv_tracker, y);
+ return get_entry(ctx, key, params, objv_tracker, y, dpp);
});
if (ret < 0 && ret != -ENOENT) {
return ret;
RGWMDLogStatus op_type,
optional_yield y,
std::function<int()> f,
- bool generic_prepare)
+ bool generic_prepare,
+ const DoutPrefixProvider *dpp)
{
int ret;
if (generic_prepare) {
- ret = prepare_mutate(ctx, key, mtime, objv_tracker, y);
+ ret = prepare_mutate(ctx, key, mtime, objv_tracker, y, dpp);
if (ret < 0 ||
ret == STATUS_NO_APPLY) {
return ret;
}
RGWMetadataLogData log_data;
- ret = pre_modify(ctx, key, log_data, objv_tracker, op_type, y);
+ ret = pre_modify(dpp, ctx, key, log_data, objv_tracker, op_type, y);
if (ret < 0) {
return ret;
}
/* cascading ret into post_modify() */
- ret = post_modify(ctx, key, log_data, objv_tracker, ret, y);
+ ret = post_modify(dpp, ctx, key, log_data, objv_tracker, ret, y);
if (ret < 0)
return ret;
const string& key,
GetParams& params,
RGWObjVersionTracker *objv_tracker,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
- return get_entry(ctx, key, params, objv_tracker, y);
+ return get_entry(ctx, key, params, objv_tracker, y, dpp);
}
int RGWSI_MetaBackend::put(Context *ctx,
const string& key,
PutParams& params,
RGWObjVersionTracker *objv_tracker,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
std::function<int()> f = [&]() {
- return put_entry(ctx, key, params, objv_tracker, y);
+ return put_entry(dpp, ctx, key, params, objv_tracker, y);
};
return do_mutate(ctx, key, params.mtime, objv_tracker,
MDLOG_STATUS_WRITE,
y,
f,
- false);
+ false,
+ dpp);
}
int RGWSI_MetaBackend::remove(Context *ctx,
const string& key,
RemoveParams& params,
RGWObjVersionTracker *objv_tracker,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
std::function<int()> f = [&]() {
- return remove_entry(ctx, key, params, objv_tracker, y);
+ return remove_entry(dpp, ctx, key, params, objv_tracker, y);
};
return do_mutate(ctx, key, params.mtime, objv_tracker,
MDLOG_STATUS_REMOVE,
y,
f,
- false);
+ false,
+ dpp);
}
int RGWSI_MetaBackend::mutate(Context *ctx,
MutateParams& params,
RGWObjVersionTracker *objv_tracker,
optional_yield y,
- std::function<int()> f)
+ std::function<int()> f,
+ const DoutPrefixProvider *dpp)
{
return do_mutate(ctx, key, params.mtime, objv_tracker,
params.op_type, y,
f,
- false);
+ false,
+ dpp);
}
int RGWSI_MetaBackend_Handler::call(std::optional<RGWSI_MetaBackend_CtxParams> bectx_params,
const std::string& key,
const ceph::real_time& mtime,
RGWObjVersionTracker *objv_tracker,
- optional_yield y);
+ optional_yield y,
+ const DoutPrefixProvider *dpp);
virtual int do_mutate(Context *ctx,
const std::string& key,
RGWMDLogStatus op_type,
optional_yield y,
std::function<int()> f,
- bool generic_prepare);
+ bool generic_prepare,
+ const DoutPrefixProvider *dpp);
- virtual int pre_modify(Context *ctx,
+ virtual int pre_modify(const DoutPrefixProvider *dpp,
+ Context *ctx,
const std::string& key,
RGWMetadataLogData& log_data,
RGWObjVersionTracker *objv_tracker,
RGWMDLogStatus op_type,
optional_yield y);
- virtual int post_modify(Context *ctx,
+ virtual int post_modify(const DoutPrefixProvider *dpp,
+ Context *ctx,
const std::string& key,
RGWMetadataLogData& log_data,
RGWObjVersionTracker *objv_tracker, int ret,
const std::string& key,
RGWSI_MetaBackend::GetParams& params,
RGWObjVersionTracker *objv_tracker,
- optional_yield y) = 0;
- virtual int put_entry(RGWSI_MetaBackend::Context *ctx,
+ optional_yield y,
+ const DoutPrefixProvider *dpp) = 0;
+ virtual int put_entry(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *ctx,
const std::string& key,
RGWSI_MetaBackend::PutParams& params,
RGWObjVersionTracker *objv_tracker,
optional_yield y) = 0;
- virtual int remove_entry(Context *ctx,
+ virtual int remove_entry(const DoutPrefixProvider *dpp,
+ Context *ctx,
const std::string& key,
RGWSI_MetaBackend::RemoveParams& params,
RGWObjVersionTracker *objv_tracker,
optional_yield y) = 0;
- virtual int list_init(RGWSI_MetaBackend::Context *ctx, const string& marker) = 0;
+ virtual int list_init(const DoutPrefixProvider *dpp, RGWSI_MetaBackend::Context *ctx, const string& marker) = 0;
virtual int list_next(RGWSI_MetaBackend::Context *ctx,
int max, list<string> *keys,
bool *truncated) = 0;
const std::string& key,
GetParams ¶ms,
RGWObjVersionTracker *objv_tracker,
- optional_yield y);
+ optional_yield y,
+ const DoutPrefixProvider *dpp);
virtual int put(Context *ctx,
const std::string& key,
PutParams& params,
RGWObjVersionTracker *objv_tracker,
- optional_yield y);
+ optional_yield y,
+ const DoutPrefixProvider *dpp);
virtual int remove(Context *ctx,
const std::string& key,
RemoveParams& params,
RGWObjVersionTracker *objv_tracker,
- optional_yield y);
+ optional_yield y,
+ const DoutPrefixProvider *dpp);
virtual int mutate(Context *ctx,
const std::string& key,
MutateParams& params,
RGWObjVersionTracker *objv_tracker,
optional_yield y,
- std::function<int()> f);
+ std::function<int()> f,
+ const DoutPrefixProvider *dpp);
};
class RGWSI_MetaBackend_Handler {
int get(const std::string& key,
RGWSI_MetaBackend::GetParams ¶ms,
RGWObjVersionTracker *objv_tracker,
- optional_yield y) {
- return be->get(be_ctx, key, params, objv_tracker, y);
+ optional_yield y, const DoutPrefixProvider *dpp) {
+ return be->get(be_ctx, key, params, objv_tracker, y, dpp);
}
int put(const std::string& key,
RGWSI_MetaBackend::PutParams& params,
RGWObjVersionTracker *objv_tracker,
- optional_yield y) {
- return be->put(be_ctx, key, params, objv_tracker, y);
+ optional_yield y, const DoutPrefixProvider *dpp) {
+ return be->put(be_ctx, key, params, objv_tracker, y, dpp);
}
int remove(const std::string& key,
RGWSI_MetaBackend::RemoveParams& params,
RGWObjVersionTracker *objv_tracker,
- optional_yield y) {
- return be->remove(be_ctx, key, params, objv_tracker, y);
+ optional_yield y, const DoutPrefixProvider *dpp) {
+ return be->remove(be_ctx, key, params, objv_tracker, y, dpp);
}
int mutate(const std::string& key,
RGWSI_MetaBackend::MutateParams& params,
RGWObjVersionTracker *objv_tracker,
optional_yield y,
- std::function<int()> f) {
- return be->mutate(be_ctx, key, params, objv_tracker, y, f);
+ std::function<int()> f,
+ const DoutPrefixProvider *dpp) {
+ return be->mutate(be_ctx, key, params, objv_tracker, y, f, dpp);
}
- int list_init(const string& marker) {
- return be->list_init(be_ctx, marker);
+ int list_init(const DoutPrefixProvider *dpp, const string& marker) {
+ return be->list_init(dpp, be_ctx, marker);
}
int list_next(int max, list<string> *keys,
bool *truncated) {
const string& key,
RGWSI_MetaBackend::GetParams& _params,
RGWObjVersionTracker *objv_tracker,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
RGWSI_MBOTP_GetParams& params = static_cast<RGWSI_MBOTP_GetParams&>(_params);
- int r = cls_svc->mfa.list_mfa(key, params.pdevices, objv_tracker, params.pmtime, y);
+ int r = cls_svc->mfa.list_mfa(dpp, key, params.pdevices, objv_tracker, params.pmtime, y);
if (r < 0) {
return r;
}
return 0;
}
-int RGWSI_MetaBackend_OTP::put_entry(RGWSI_MetaBackend::Context *_ctx,
+int RGWSI_MetaBackend_OTP::put_entry(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *_ctx,
const string& key,
RGWSI_MetaBackend::PutParams& _params,
RGWObjVersionTracker *objv_tracker,
{
RGWSI_MBOTP_PutParams& params = static_cast<RGWSI_MBOTP_PutParams&>(_params);
- return cls_svc->mfa.set_mfa(key, params.devices, true, objv_tracker, params.mtime, y);
+ return cls_svc->mfa.set_mfa(dpp, key, params.devices, true, objv_tracker, params.mtime, y);
}
const string& key,
RGWSI_MetaBackend::GetParams& _params,
RGWObjVersionTracker *objv_tracker,
- optional_yield y);
- int put_entry(RGWSI_MetaBackend::Context *ctx,
+ optional_yield y,
+ const DoutPrefixProvider *dpp);
+ int put_entry(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *ctx,
const string& key,
RGWSI_MetaBackend::PutParams& _params,
RGWObjVersionTracker *objv_tracker,
return new Context_SObj(sysobj_svc);
}
-int RGWSI_MetaBackend_SObj::pre_modify(RGWSI_MetaBackend::Context *_ctx,
+int RGWSI_MetaBackend_SObj::pre_modify(const DoutPrefixProvider *dpp, RGWSI_MetaBackend::Context *_ctx,
const string& key,
RGWMetadataLogData& log_data,
RGWObjVersionTracker *objv_tracker,
optional_yield y)
{
auto ctx = static_cast<Context_SObj *>(_ctx);
- int ret = RGWSI_MetaBackend::pre_modify(ctx, key, log_data,
+ int ret = RGWSI_MetaBackend::pre_modify(dpp, ctx, key, log_data,
objv_tracker, op_type,
y);
if (ret < 0) {
bufferlist logbl;
encode(log_data, logbl);
- ret = mdlog_svc->add_entry(ctx->module->get_hash_key(key), ctx->module->get_section(), key, logbl);
+ ret = mdlog_svc->add_entry(dpp, ctx->module->get_hash_key(key), ctx->module->get_section(), key, logbl);
if (ret < 0)
return ret;
return 0;
}
-int RGWSI_MetaBackend_SObj::post_modify(RGWSI_MetaBackend::Context *_ctx,
+int RGWSI_MetaBackend_SObj::post_modify(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *_ctx,
const string& key,
RGWMetadataLogData& log_data,
RGWObjVersionTracker *objv_tracker, int ret,
bufferlist logbl;
encode(log_data, logbl);
- int r = mdlog_svc->add_entry(ctx->module->get_hash_key(key), ctx->module->get_section(), key, logbl);
+ int r = mdlog_svc->add_entry(dpp, ctx->module->get_hash_key(key), ctx->module->get_section(), key, logbl);
if (ret < 0)
return ret;
if (r < 0)
return r;
- return RGWSI_MetaBackend::post_modify(ctx, key, log_data, objv_tracker, ret, y);
+ return RGWSI_MetaBackend::post_modify(dpp, ctx, key, log_data, objv_tracker, ret, y);
}
int RGWSI_MetaBackend_SObj::get_shard_id(RGWSI_MetaBackend::Context *_ctx,
const string& key,
GetParams& _params,
RGWObjVersionTracker *objv_tracker,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
RGWSI_MetaBackend_SObj::Context_SObj *ctx = static_cast<RGWSI_MetaBackend_SObj::Context_SObj *>(_ctx);
RGWSI_MBSObj_GetParams& params = static_cast<RGWSI_MBSObj_GetParams&>(_params);
return rgw_get_system_obj(*ctx->obj_ctx, pool, oid, *params.pbl,
objv_tracker, params.pmtime,
- y,
+ y, dpp,
params.pattrs, params.cache_info,
params.refresh_version);
}
-int RGWSI_MetaBackend_SObj::put_entry(RGWSI_MetaBackend::Context *_ctx,
+int RGWSI_MetaBackend_SObj::put_entry(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *_ctx,
const string& key,
PutParams& _params,
RGWObjVersionTracker *objv_tracker,
string oid;
ctx->module->get_pool_and_oid(key, &pool, &oid);
- return rgw_put_system_obj(*ctx->obj_ctx, pool, oid, params.bl, params.exclusive,
+ return rgw_put_system_obj(dpp, *ctx->obj_ctx, pool, oid, params.bl, params.exclusive,
objv_tracker, params.mtime, y, params.pattrs);
}
-int RGWSI_MetaBackend_SObj::remove_entry(RGWSI_MetaBackend::Context *_ctx,
+int RGWSI_MetaBackend_SObj::remove_entry(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *_ctx,
const string& key,
RemoveParams& params,
RGWObjVersionTracker *objv_tracker,
auto sysobj = ctx->obj_ctx->get_obj(k);
return sysobj.wop()
.set_objv_tracker(objv_tracker)
- .remove(y);
+ .remove(dpp, y);
}
-int RGWSI_MetaBackend_SObj::list_init(RGWSI_MetaBackend::Context *_ctx,
+int RGWSI_MetaBackend_SObj::list_init(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *_ctx,
const string& marker)
{
RGWSI_MetaBackend_SObj::Context_SObj *ctx = static_cast<RGWSI_MetaBackend_SObj::Context_SObj *>(_ctx);
ctx->list.op.emplace(ctx->list.pool->op());
string prefix = ctx->module->get_oid_prefix();
- ctx->list.op->init(marker, prefix);
+ ctx->list.op->init(dpp, marker, prefix);
return 0;
}
int call_with_get_params(ceph::real_time *pmtime, std::function<int(RGWSI_MetaBackend::GetParams&)> cb) override;
- int pre_modify(RGWSI_MetaBackend::Context *ctx,
+ int pre_modify(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *ctx,
const string& key,
RGWMetadataLogData& log_data,
RGWObjVersionTracker *objv_tracker,
RGWMDLogStatus op_type,
optional_yield y);
- int post_modify(RGWSI_MetaBackend::Context *ctx,
+ int post_modify(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *ctx,
const string& key,
RGWMetadataLogData& log_data,
RGWObjVersionTracker *objv_tracker, int ret,
const string& key,
RGWSI_MetaBackend::GetParams& params,
RGWObjVersionTracker *objv_tracker,
- optional_yield y) override;
- int put_entry(RGWSI_MetaBackend::Context *ctx,
+ optional_yield y,
+ const DoutPrefixProvider *dpp) override;
+ int put_entry(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *ctx,
const string& key,
RGWSI_MetaBackend::PutParams& params,
RGWObjVersionTracker *objv_tracker,
optional_yield y) override;
- int remove_entry(RGWSI_MetaBackend::Context *ctx,
+ int remove_entry(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *ctx,
const string& key,
RGWSI_MetaBackend::RemoveParams& params,
RGWObjVersionTracker *objv_tracker,
optional_yield y) override;
- int list_init(RGWSI_MetaBackend::Context *_ctx, const string& marker) override;
+ int list_init(const DoutPrefixProvider *dpp, RGWSI_MetaBackend::Context *_ctx, const string& marker) override;
int list_next(RGWSI_MetaBackend::Context *_ctx,
int max, list<string> *keys,
bool *truncated) override;
static string notify_oid_prefix = "notify";
-class RGWWatcher : public librados::WatchCtx2 {
+class RGWWatcher : public DoutPrefixProvider , public librados::WatchCtx2 {
CephContext *cct;
RGWSI_Notify *svc;
int index;
watcher->reinit();
}
};
+
+ CephContext *get_cct() const { return cct; }
+ unsigned get_subsys() const { return dout_subsys; }
+ std::ostream& gen_prefix(std::ostream& out) const { return out << "rgw watcher librados: "; }
+
public:
RGWWatcher(CephContext *_cct, RGWSI_Notify *s, int i, RGWSI_RADOS::Obj& o) : cct(_cct), svc(s), index(i), obj(o), watch_handle(0) {}
void handle_notify(uint64_t notify_id,
uint64_t cookie,
uint64_t notifier_id,
bufferlist& bl) override {
- ldout(cct, 10) << "RGWWatcher::handle_notify() "
+ ldpp_dout(this, 10) << "RGWWatcher::handle_notify() "
<< " notify_id " << notify_id
<< " cookie " << cookie
<< " notifier " << notifier_id
(svc->inject_notify_timeout_probability > 0 &&
(svc->inject_notify_timeout_probability >
ceph::util::generate_random_number(0.0, 1.0)))) {
- ldout(cct, 0)
+ ldpp_dout(this, 0)
<< "RGWWatcher::handle_notify() dropping notification! "
<< "If this isn't what you want, set "
<< "rgw_inject_notify_timeout_probability to zero!" << dendl;
return;
}
- svc->watch_cb(notify_id, cookie, notifier_id, bl);
+ svc->watch_cb(this, notify_id, cookie, notifier_id, bl);
bufferlist reply_bl; // empty reply payload
obj.notify_ack(notify_id, cookie, reply_bl);
return notify_objs[i];
}
-int RGWSI_Notify::init_watch(optional_yield y)
+int RGWSI_Notify::init_watch(const DoutPrefixProvider *dpp, optional_yield y)
{
num_watchers = cct->_conf->rgw_num_control_oids;
notify_objs[i] = rados_svc->handle().obj({control_pool, notify_oid});
auto& notify_obj = notify_objs[i];
- int r = notify_obj.open();
+ int r = notify_obj.open(dpp);
if (r < 0) {
- ldout(cct, 0) << "ERROR: notify_obj.open() returned r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: notify_obj.open() returned r=" << r << dendl;
return r;
}
librados::ObjectWriteOperation op;
op.create(false);
- r = notify_obj.operate(&op, y);
+ r = notify_obj.operate(dpp, &op, y);
if (r < 0 && r != -EEXIST) {
- ldout(cct, 0) << "ERROR: notify_obj.operate() returned r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: notify_obj.operate() returned r=" << r << dendl;
return r;
}
r = watcher->register_watch_async();
if (r < 0) {
- ldout(cct, 0) << "WARNING: register_watch_aio() returned " << r << dendl;
+ ldpp_dout(dpp, 0) << "WARNING: register_watch_aio() returned " << r << dendl;
error = r;
continue;
}
for (int i = 0; i < num_watchers; ++i) {
int r = watchers[i]->register_watch_finish();
if (r < 0) {
- ldout(cct, 0) << "WARNING: async watch returned " << r << dendl;
+ ldpp_dout(dpp, 0) << "WARNING: async watch returned " << r << dendl;
error = r;
}
}
delete[] watchers;
}
-int RGWSI_Notify::do_start(optional_yield y)
+int RGWSI_Notify::do_start(optional_yield y, const DoutPrefixProvider *dpp)
{
- int r = zone_svc->start(y);
+ int r = zone_svc->start(y, dpp);
if (r < 0) {
return r;
}
assert(zone_svc->is_started()); /* otherwise there's an ordering problem */
- r = rados_svc->start(y);
+ r = rados_svc->start(y, dpp);
if (r < 0) {
return r;
}
- r = finisher_svc->start(y);
+ r = finisher_svc->start(y, dpp);
if (r < 0) {
return r;
}
control_pool = zone_svc->get_zone_params().control_pool;
- int ret = init_watch(y);
+ int ret = init_watch(dpp, y);
if (ret < 0) {
lderr(cct) << "ERROR: failed to initialize watch: " << cpp_strerror(-ret) << dendl;
return ret;
}
}
-int RGWSI_Notify::watch_cb(uint64_t notify_id,
+int RGWSI_Notify::watch_cb(const DoutPrefixProvider *dpp,
+ uint64_t notify_id,
uint64_t cookie,
uint64_t notifier_id,
bufferlist& bl)
{
std::shared_lock l{watchers_lock};
if (cb) {
- return cb->watch_cb(notify_id, cookie, notifier_id, bl);
+ return cb->watch_cb(dpp, notify_id, cookie, notifier_id, bl);
}
return 0;
}
}
}
-int RGWSI_Notify::distribute(const string& key, bufferlist& bl,
+int RGWSI_Notify::distribute(const DoutPrefixProvider *dpp, const string& key, bufferlist& bl,
optional_yield y)
{
/* The RGW uses the control pool to store the watch notify objects.
if (num_watchers > 0) {
RGWSI_RADOS::Obj notify_obj = pick_control_obj(key);
- ldout(cct, 10) << "distributing notification oid=" << notify_obj.get_ref().obj
+ ldpp_dout(dpp, 10) << "distributing notification oid=" << notify_obj.get_ref().obj
<< " bl.length()=" << bl.length() << dendl;
- return robust_notify(notify_obj, bl, y);
+ return robust_notify(dpp, notify_obj, bl, y);
}
return 0;
}
-int RGWSI_Notify::robust_notify(RGWSI_RADOS::Obj& notify_obj, bufferlist& bl,
+int RGWSI_Notify::robust_notify(const DoutPrefixProvider *dpp,
+ RGWSI_RADOS::Obj& notify_obj, bufferlist& bl,
optional_yield y)
{
// The reply of every machine that acks goes in here.
bufferlist rbl;
// First, try to send, without being fancy about it.
- auto r = notify_obj.notify(bl, 0, &rbl, y);
+ auto r = notify_obj.notify(dpp, bl, 0, &rbl, y);
// If that doesn't work, get serious.
if (r < 0) {
- ldout(cct, 1) << "robust_notify: If at first you don't succeed: "
+ ldpp_dout(dpp, 1) << "robust_notify: If at first you don't succeed: "
<< cpp_strerror(-r) << dendl;
std::pair<uint64_t, uint64_t> id;
decode(id, p);
acks.insert(id);
- ldout(cct, 20) << "robust_notify: acked by " << id << dendl;
+ ldpp_dout(dpp, 20) << "robust_notify: acked by " << id << dendl;
uint32_t blen;
decode(blen, p);
p += blen;
}
} catch (const buffer::error& e) {
- ldout(cct, 0) << "robust_notify: notify response parse failed: "
+ ldpp_dout(dpp, 0) << "robust_notify: notify response parse failed: "
<< e.what() << dendl;
acks.clear(); // Throw away junk on failed parse.
}
rbl.clear();
// Reset the timeouts, we're only concerned with new ones.
timeouts.clear();
- r = notify_obj.notify(bl, 0, &rbl, y);
+ r = notify_obj.notify(dpp, bl, 0, &rbl, y);
if (r < 0) {
- ldout(cct, 1) << "robust_notify: retry " << tries << " failed: "
+ ldpp_dout(dpp, 1) << "robust_notify: retry " << tries << " failed: "
<< cpp_strerror(-r) << dendl;
p = rbl.begin();
try {
decode(id, p);
auto ir = acks.insert(id);
if (ir.second) {
- ldout(cct, 20) << "robust_notify: acked by " << id << dendl;
+ ldpp_dout(dpp, 20) << "robust_notify: acked by " << id << dendl;
}
uint32_t blen;
decode(blen, p);
decode(id, p);
// Only track timeouts from hosts that haven't acked previously.
if (acks.find(id) != acks.cend()) {
- ldout(cct, 20) << "robust_notify: " << id << " timed out."
+ ldpp_dout(dpp, 20) << "robust_notify: " << id << " timed out."
<< dendl;
timeouts.insert(id);
}
}
} catch (const buffer::error& e) {
- ldout(cct, 0) << "robust_notify: notify response parse failed: "
+ ldpp_dout(dpp, 0) << "robust_notify: notify response parse failed: "
<< e.what() << dendl;
continue;
}
bool finalized{false};
- int init_watch(optional_yield y);
+ int init_watch(const DoutPrefixProvider *dpp, optional_yield y);
void finalize_watch();
void init(RGWSI_Zone *_zone_svc,
rados_svc = _rados_svc;
finisher_svc = _finisher_svc;
}
- int do_start(optional_yield) override;
+ int do_start(optional_yield, const DoutPrefixProvider *dpp) override;
void shutdown() override;
int unwatch(RGWSI_RADOS::Obj& obj, uint64_t watch_handle);
void add_watcher(int i);
void remove_watcher(int i);
- int watch_cb(uint64_t notify_id,
+ int watch_cb(const DoutPrefixProvider *dpp,
+ uint64_t notify_id,
uint64_t cookie,
uint64_t notifier_id,
bufferlist& bl);
void _set_enabled(bool status);
void set_enabled(bool status);
- int robust_notify(RGWSI_RADOS::Obj& notify_obj, bufferlist& bl,
+ int robust_notify(const DoutPrefixProvider *dpp,
+ RGWSI_RADOS::Obj& notify_obj, bufferlist& bl,
optional_yield y);
void schedule_context(Context *c);
class CB {
public:
virtual ~CB() {}
- virtual int watch_cb(uint64_t notify_id,
+ virtual int watch_cb(const DoutPrefixProvider *dpp,
+ uint64_t notify_id,
uint64_t cookie,
uint64_t notifier_id,
bufferlist& bl) = 0;
virtual void set_enabled(bool status) = 0;
};
- int distribute(const string& key, bufferlist& bl, optional_yield y);
+ int distribute(const DoutPrefixProvider *dpp, const string& key, bufferlist& bl, optional_yield y);
void register_watch_cb(CB *cb);
};
svc.meta_be = _meta_be_svc;
}
-int RGWSI_OTP::do_start(optional_yield)
+int RGWSI_OTP::do_start(optional_yield, const DoutPrefixProvider *dpp)
{
/* create first backend handler for bucket entrypoints */
otp_devices_list_t *devices,
real_time *pmtime,
RGWObjVersionTracker *objv_tracker,
- optional_yield y)
+ optional_yield y, const DoutPrefixProvider *dpp)
{
RGWSI_MBOTP_GetParams params;
params.pdevices = devices;
params.pmtime = pmtime;
- int ret = svc.meta_be->get_entry(ctx.get(), key, params, objv_tracker, y);
+ int ret = svc.meta_be->get_entry(ctx.get(), key, params, objv_tracker, y, dpp);
if (ret < 0) {
return ret;
}
otp_devices_list_t *devices,
real_time *pmtime,
RGWObjVersionTracker *objv_tracker,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
return read_all(ctx,
uid.to_str(),
devices,
pmtime,
objv_tracker,
- y);
+ y,
+ dpp);
}
-int RGWSI_OTP::store_all(RGWSI_OTP_BE_Ctx& ctx,
+int RGWSI_OTP::store_all(const DoutPrefixProvider *dpp,
+ RGWSI_OTP_BE_Ctx& ctx,
const string& key,
const otp_devices_list_t& devices,
real_time mtime,
params.mtime = mtime;
params.devices = devices;
- int ret = svc.meta_be->put_entry(ctx.get(), key, params, objv_tracker, y);
+ int ret = svc.meta_be->put_entry(dpp, ctx.get(), key, params, objv_tracker, y);
if (ret < 0) {
return ret;
}
return 0;
}
-int RGWSI_OTP::store_all(RGWSI_OTP_BE_Ctx& ctx,
+int RGWSI_OTP::store_all(const DoutPrefixProvider *dpp,
+ RGWSI_OTP_BE_Ctx& ctx,
const rgw_user& uid,
const otp_devices_list_t& devices,
real_time mtime,
RGWObjVersionTracker *objv_tracker,
optional_yield y)
{
- return store_all(ctx,
+ return store_all(dpp, ctx,
uid.to_str(),
devices,
mtime,
y);
}
-int RGWSI_OTP::remove_all(RGWSI_OTP_BE_Ctx& ctx,
+int RGWSI_OTP::remove_all(const DoutPrefixProvider *dpp,
+ RGWSI_OTP_BE_Ctx& ctx,
const string& key,
RGWObjVersionTracker *objv_tracker,
optional_yield y)
{
RGWSI_MBOTP_RemoveParams params;
- int ret = svc.meta_be->remove_entry(ctx.get(), key, params, objv_tracker, y);
+ int ret = svc.meta_be->remove_entry(dpp, ctx.get(), key, params, objv_tracker, y);
if (ret < 0) {
return ret;
}
return 0;
}
-int RGWSI_OTP::remove_all(RGWSI_OTP_BE_Ctx& ctx,
+int RGWSI_OTP::remove_all(const DoutPrefixProvider *dpp,
+ RGWSI_OTP_BE_Ctx& ctx,
const rgw_user& uid,
RGWObjVersionTracker *objv_tracker,
optional_yield y)
{
- return remove_all(ctx,
+ return remove_all(dpp,ctx,
uid.to_str(),
objv_tracker,
y);
RGWSI_OTP_BE_Handler be_handler;
std::unique_ptr<RGWSI_MetaBackend::Module> be_module;
- int do_start(optional_yield) override;
+ int do_start(optional_yield, const DoutPrefixProvider *dpp) override;
public:
struct Svc {
otp_devices_list_t *devices,
real_time *pmtime,
RGWObjVersionTracker *objv_tracker,
- optional_yield y);
+ optional_yield y,
+ const DoutPrefixProvider *dpp);
int read_all(RGWSI_OTP_BE_Ctx& ctx,
const rgw_user& uid,
otp_devices_list_t *devices,
real_time *pmtime,
RGWObjVersionTracker *objv_tracker,
- optional_yield y);
- int store_all(RGWSI_OTP_BE_Ctx& ctx,
+ optional_yield y,
+ const DoutPrefixProvider *dpp);
+ int store_all(const DoutPrefixProvider *dpp,
+ RGWSI_OTP_BE_Ctx& ctx,
const string& key,
const otp_devices_list_t& devices,
real_time mtime,
RGWObjVersionTracker *objv_tracker,
optional_yield y);
- int store_all(RGWSI_OTP_BE_Ctx& ctx,
+ int store_all(const DoutPrefixProvider *dpp,
+ RGWSI_OTP_BE_Ctx& ctx,
const rgw_user& uid,
const otp_devices_list_t& devices,
real_time mtime,
RGWObjVersionTracker *objv_tracker,
optional_yield y);
- int remove_all(RGWSI_OTP_BE_Ctx& ctx,
+ int remove_all(const DoutPrefixProvider *dpp,
+ RGWSI_OTP_BE_Ctx& ctx,
const string& key,
RGWObjVersionTracker *objv_tracker,
optional_yield y);
- int remove_all(RGWSI_OTP_BE_Ctx& ctx,
+ int remove_all(const DoutPrefixProvider *dpp,
+ RGWSI_OTP_BE_Ctx& ctx,
const rgw_user& uid,
RGWObjVersionTracker *objv_tracker,
optional_yield y);
{
}
-int RGWSI_RADOS::do_start(optional_yield)
+int RGWSI_RADOS::do_start(optional_yield, const DoutPrefixProvider *dpp)
{
int ret = rados.init_with_context(cct);
if (ret < 0) {
return get_rados_handle()->get_instance_id();
}
-int RGWSI_RADOS::open_pool_ctx(const rgw_pool& pool, librados::IoCtx& io_ctx,
+int RGWSI_RADOS::open_pool_ctx(const DoutPrefixProvider *dpp, const rgw_pool& pool, librados::IoCtx& io_ctx,
const OpenParams& params)
{
- return rgw_init_ioctx(get_rados_handle(), pool, io_ctx,
+ return rgw_init_ioctx(dpp, get_rados_handle(), pool, io_ctx,
params.create,
params.mostly_omap);
}
ref.obj = obj;
}
-int RGWSI_RADOS::Obj::open()
+int RGWSI_RADOS::Obj::open(const DoutPrefixProvider *dpp)
{
- int r = ref.pool.open();
+ int r = ref.pool.open(dpp);
if (r < 0) {
return r;
}
return 0;
}
-int RGWSI_RADOS::Obj::operate(librados::ObjectWriteOperation *op,
+int RGWSI_RADOS::Obj::operate(const DoutPrefixProvider *dpp, librados::ObjectWriteOperation *op,
optional_yield y, int flags)
{
- return rgw_rados_operate(ref.pool.ioctx(), ref.obj.oid, op, y, flags);
+ return rgw_rados_operate(dpp, ref.pool.ioctx(), ref.obj.oid, op, y, flags);
}
-int RGWSI_RADOS::Obj::operate(librados::ObjectReadOperation *op,
+int RGWSI_RADOS::Obj::operate(const DoutPrefixProvider *dpp, librados::ObjectReadOperation *op,
bufferlist *pbl, optional_yield y, int flags)
{
- return rgw_rados_operate(ref.pool.ioctx(), ref.obj.oid, op, pbl, y, flags);
+ return rgw_rados_operate(dpp, ref.pool.ioctx(), ref.obj.oid, op, pbl, y, flags);
}
int RGWSI_RADOS::Obj::aio_operate(librados::AioCompletion *c, librados::ObjectWriteOperation *op)
return ref.pool.ioctx().unwatch2(handle);
}
-int RGWSI_RADOS::Obj::notify(bufferlist& bl, uint64_t timeout_ms,
+int RGWSI_RADOS::Obj::notify(const DoutPrefixProvider *dpp, bufferlist& bl, uint64_t timeout_ms,
bufferlist *pbl, optional_yield y)
{
- return rgw_rados_notify(ref.pool.ioctx(), ref.obj.oid, bl, timeout_ms, pbl, y);
+ return rgw_rados_notify(dpp, ref.pool.ioctx(), ref.obj.oid, bl, timeout_ms, pbl, y);
}
void RGWSI_RADOS::Obj::notify_ack(uint64_t notify_id,
return 0;
}
-int RGWSI_RADOS::Pool::open(const OpenParams& params)
+int RGWSI_RADOS::Pool::open(const DoutPrefixProvider *dpp, const OpenParams& params)
{
- return rados_svc->open_pool_ctx(pool, state.ioctx, params);
+ return rados_svc->open_pool_ctx(dpp, pool, state.ioctx, params);
}
-int RGWSI_RADOS::Pool::List::init(const string& marker, RGWAccessListFilter *filter)
+int RGWSI_RADOS::Pool::List::init(const DoutPrefixProvider *dpp, const string& marker, RGWAccessListFilter *filter)
{
if (ctx.initialized) {
return -EINVAL;
return -EINVAL;
}
- int r = pool->rados_svc->open_pool_ctx(pool->pool, ctx.ioctx);
+ int r = pool->rados_svc->open_pool_ctx(dpp, pool->pool, ctx.ioctx);
if (r < 0) {
return r;
}
librados::ObjectCursor oc;
if (!oc.from_str(marker)) {
- ldout(pool->rados_svc->cct, 10) << "failed to parse cursor: " << marker << dendl;
+ ldpp_dout(dpp, 10) << "failed to parse cursor: " << marker << dendl;
return -EINVAL;
}
librados::Rados rados;
std::unique_ptr<RGWAsyncRadosProcessor> async_processor;
- int do_start(optional_yield) override;
+ int do_start(optional_yield, const DoutPrefixProvider *dpp) override;
public:
struct OpenParams {
};
private:
- int open_pool_ctx(const rgw_pool& pool, librados::IoCtx& io_ctx,
+ int open_pool_ctx(const DoutPrefixProvider *dpp, const rgw_pool& pool, librados::IoCtx& io_ctx,
const OpenParams& params = {});
int pool_iterate(librados::IoCtx& ioctx,
librados::NObjectIterator& iter,
int create();
int create(const std::vector<rgw_pool>& pools, std::vector<int> *retcodes);
int lookup();
- int open(const OpenParams& params = {});
+ int open(const DoutPrefixProvider *dpp, const OpenParams& params = {});
const rgw_pool& get_pool() {
return pool;
List() {}
List(Pool *_pool) : pool(_pool) {}
- int init(const string& marker, RGWAccessListFilter *filter = nullptr);
+ int init(const DoutPrefixProvider *dpp, const string& marker, RGWAccessListFilter *filter = nullptr);
int get_next(int max,
std::vector<string> *oids,
bool *is_truncated);
public:
Obj() {}
- int open();
+ int open(const DoutPrefixProvider *dpp);
- int operate(librados::ObjectWriteOperation *op, optional_yield y,
+ int operate(const DoutPrefixProvider *dpp, librados::ObjectWriteOperation *op, optional_yield y,
int flags = 0);
- int operate(librados::ObjectReadOperation *op, bufferlist *pbl,
+ int operate(const DoutPrefixProvider *dpp, librados::ObjectReadOperation *op, bufferlist *pbl,
optional_yield y, int flags = 0);
int aio_operate(librados::AioCompletion *c, librados::ObjectWriteOperation *op);
int aio_operate(librados::AioCompletion *c, librados::ObjectReadOperation *op,
int watch(uint64_t *handle, librados::WatchCtx2 *ctx);
int aio_watch(librados::AioCompletion *c, uint64_t *handle, librados::WatchCtx2 *ctx);
int unwatch(uint64_t handle);
- int notify(bufferlist& bl, uint64_t timeout_ms,
+ int notify(const DoutPrefixProvider *dpp, bufferlist& bl, uint64_t timeout_ms,
bufferlist *pbl, optional_yield y);
void notify_ack(uint64_t notify_id,
uint64_t cookie,
rgw_register_sync_modules(sync_modules_manager);
}
-int RGWSI_SyncModules::do_start(optional_yield)
+int RGWSI_SyncModules::do_start(optional_yield, const DoutPrefixProvider *dpp)
{
auto& zone_public_config = svc.zone->get_zone();
return ret;
}
- ldout(cct, 20) << "started sync module instance, tier type = " << zone_public_config.tier_type << dendl;
+ ldpp_dout(dpp, 20) << "started sync module instance, tier type = " << zone_public_config.tier_type << dendl;
return 0;
}
}
void init(RGWSI_Zone *zone_svc);
- int do_start(optional_yield) override;
+ int do_start(optional_yield, const DoutPrefixProvider *dpp) override;
RGWSyncModuleInstanceRef& get_sync_module() { return sync_module; }
};
state.emplace<RGWSI_SysObj_Core::GetObjState>();
}
-int RGWSI_SysObj::Obj::ROp::stat(optional_yield y)
+int RGWSI_SysObj::Obj::ROp::stat(optional_yield y, const DoutPrefixProvider *dpp)
{
RGWSI_SysObj_Core *svc = source.core_svc;
rgw_raw_obj& obj = source.obj;
return svc->stat(source.get_ctx(), *state, obj,
attrs, raw_attrs,
lastmod, obj_size,
- objv_tracker, y);
+ objv_tracker, y, dpp);
}
-int RGWSI_SysObj::Obj::ROp::read(int64_t ofs, int64_t end, bufferlist *bl,
+int RGWSI_SysObj::Obj::ROp::read(const DoutPrefixProvider *dpp,
+ int64_t ofs, int64_t end, bufferlist *bl,
optional_yield y)
{
RGWSI_SysObj_Core *svc = source.core_svc;
rgw_raw_obj& obj = source.get_obj();
- return svc->read(source.get_ctx(), *state,
+ return svc->read(dpp, source.get_ctx(), *state,
objv_tracker,
obj, bl, ofs, end,
attrs,
refresh_version, y);
}
-int RGWSI_SysObj::Obj::ROp::get_attr(const char *name, bufferlist *dest,
+int RGWSI_SysObj::Obj::ROp::get_attr(const DoutPrefixProvider *dpp,
+ const char *name, bufferlist *dest,
optional_yield y)
{
RGWSI_SysObj_Core *svc = source.core_svc;
rgw_raw_obj& obj = source.get_obj();
- return svc->get_attr(obj, name, dest, y);
+ return svc->get_attr(dpp, obj, name, dest, y);
}
-int RGWSI_SysObj::Obj::WOp::remove(optional_yield y)
+int RGWSI_SysObj::Obj::WOp::remove(const DoutPrefixProvider *dpp, optional_yield y)
{
RGWSI_SysObj_Core *svc = source.core_svc;
rgw_raw_obj& obj = source.get_obj();
- return svc->remove(source.get_ctx(),
+ return svc->remove(dpp, source.get_ctx(),
objv_tracker,
obj, y);
}
-int RGWSI_SysObj::Obj::WOp::write(bufferlist& bl, optional_yield y)
+int RGWSI_SysObj::Obj::WOp::write(const DoutPrefixProvider *dpp, bufferlist& bl, optional_yield y)
{
RGWSI_SysObj_Core *svc = source.core_svc;
rgw_raw_obj& obj = source.get_obj();
- return svc->write(obj, pmtime, attrs, exclusive,
+ return svc->write(dpp, obj, pmtime, attrs, exclusive,
bl, objv_tracker, mtime, y);
}
-int RGWSI_SysObj::Obj::WOp::write_data(bufferlist& bl, optional_yield y)
+int RGWSI_SysObj::Obj::WOp::write_data(const DoutPrefixProvider *dpp, bufferlist& bl, optional_yield y)
{
RGWSI_SysObj_Core *svc = source.core_svc;
rgw_raw_obj& obj = source.get_obj();
- return svc->write_data(obj, bl, exclusive, objv_tracker, y);
+ return svc->write_data(dpp, obj, bl, exclusive, objv_tracker, y);
}
-int RGWSI_SysObj::Obj::WOp::write_attrs(optional_yield y)
+int RGWSI_SysObj::Obj::WOp::write_attrs(const DoutPrefixProvider *dpp, optional_yield y)
{
RGWSI_SysObj_Core *svc = source.core_svc;
rgw_raw_obj& obj = source.get_obj();
- return svc->set_attrs(obj, attrs, nullptr, objv_tracker, y);
+ return svc->set_attrs(dpp, obj, attrs, nullptr, objv_tracker, y);
}
-int RGWSI_SysObj::Obj::WOp::write_attr(const char *name, bufferlist& bl,
+int RGWSI_SysObj::Obj::WOp::write_attr(const DoutPrefixProvider *dpp, const char *name, bufferlist& bl,
optional_yield y)
{
RGWSI_SysObj_Core *svc = source.core_svc;
map<string, bufferlist> m;
m[name] = bl;
- return svc->set_attrs(obj, m, nullptr, objv_tracker, y);
+ return svc->set_attrs(dpp, obj, m, nullptr, objv_tracker, y);
}
-int RGWSI_SysObj::Pool::list_prefixed_objs(const string& prefix, std::function<void(const string&)> cb)
+int RGWSI_SysObj::Pool::list_prefixed_objs(const DoutPrefixProvider *dpp, const string& prefix, std::function<void(const string&)> cb)
{
- return core_svc->pool_list_prefixed_objs(pool, prefix, cb);
+ return core_svc->pool_list_prefixed_objs(dpp, pool, prefix, cb);
}
-int RGWSI_SysObj::Pool::Op::init(const string& marker, const string& prefix)
+int RGWSI_SysObj::Pool::Op::init(const DoutPrefixProvider *dpp, const string& marker, const string& prefix)
{
- return source.core_svc->pool_list_objects_init(source.pool, marker, prefix, &ctx);
+ return source.core_svc->pool_list_objects_init(dpp, source.pool, marker, prefix, &ctx);
}
int RGWSI_SysObj::Pool::Op::get_next(int max, vector<string> *oids, bool *is_truncated)
return source.core_svc->pool_list_objects_get_marker(ctx, marker);
}
-int RGWSI_SysObj::Obj::OmapOp::get_all(std::map<string, bufferlist> *m,
+int RGWSI_SysObj::Obj::OmapOp::get_all(const DoutPrefixProvider *dpp, std::map<string, bufferlist> *m,
optional_yield y)
{
RGWSI_SysObj_Core *svc = source.core_svc;
rgw_raw_obj& obj = source.obj;
- return svc->omap_get_all(obj, m, y);
+ return svc->omap_get_all(dpp, obj, m, y);
}
-int RGWSI_SysObj::Obj::OmapOp::get_vals(const string& marker, uint64_t count,
+int RGWSI_SysObj::Obj::OmapOp::get_vals(const DoutPrefixProvider *dpp,
+ const string& marker, uint64_t count,
std::map<string, bufferlist> *m,
bool *pmore, optional_yield y)
{
RGWSI_SysObj_Core *svc = source.core_svc;
rgw_raw_obj& obj = source.obj;
- return svc->omap_get_vals(obj, marker, count, m, pmore, y);
+ return svc->omap_get_vals(dpp, obj, marker, count, m, pmore, y);
}
-int RGWSI_SysObj::Obj::OmapOp::set(const std::string& key, bufferlist& bl,
+int RGWSI_SysObj::Obj::OmapOp::set(const DoutPrefixProvider *dpp, const std::string& key, bufferlist& bl,
optional_yield y)
{
RGWSI_SysObj_Core *svc = source.core_svc;
rgw_raw_obj& obj = source.obj;
- return svc->omap_set(obj, key, bl, must_exist, y);
+ return svc->omap_set(dpp, obj, key, bl, must_exist, y);
}
-int RGWSI_SysObj::Obj::OmapOp::set(const map<std::string, bufferlist>& m,
+int RGWSI_SysObj::Obj::OmapOp::set(const DoutPrefixProvider *dpp, const map<std::string, bufferlist>& m,
optional_yield y)
{
RGWSI_SysObj_Core *svc = source.core_svc;
rgw_raw_obj& obj = source.obj;
- return svc->omap_set(obj, m, must_exist, y);
+ return svc->omap_set(dpp, obj, m, must_exist, y);
}
-int RGWSI_SysObj::Obj::OmapOp::del(const std::string& key, optional_yield y)
+int RGWSI_SysObj::Obj::OmapOp::del(const DoutPrefixProvider *dpp, const std::string& key, optional_yield y)
{
RGWSI_SysObj_Core *svc = source.core_svc;
rgw_raw_obj& obj = source.obj;
- return svc->omap_del(obj, key, y);
+ return svc->omap_del(dpp, obj, key, y);
}
-int RGWSI_SysObj::Obj::WNOp::notify(bufferlist& bl, uint64_t timeout_ms,
+int RGWSI_SysObj::Obj::WNOp::notify(const DoutPrefixProvider *dpp, bufferlist& bl, uint64_t timeout_ms,
bufferlist *pbl, optional_yield y)
{
RGWSI_SysObj_Core *svc = source.core_svc;
rgw_raw_obj& obj = source.obj;
- return svc->notify(obj, bl, timeout_ms, pbl, y);
+ return svc->notify(dpp, obj, bl, timeout_ms, pbl, y);
}
RGWSI_Zone *RGWSI_SysObj::get_zone_svc()
ROp(Obj& _source);
- int stat(optional_yield y);
- int read(int64_t ofs, int64_t end, bufferlist *pbl, optional_yield y);
- int read(bufferlist *pbl, optional_yield y) {
- return read(0, -1, pbl, y);
+ int stat(optional_yield y, const DoutPrefixProvider *dpp);
+ int read(const DoutPrefixProvider *dpp, int64_t ofs, int64_t end, bufferlist *pbl, optional_yield y);
+ int read(const DoutPrefixProvider *dpp, bufferlist *pbl, optional_yield y) {
+ return read(dpp, 0, -1, pbl, y);
}
- int get_attr(const char *name, bufferlist *dest, optional_yield y);
+ int get_attr(const DoutPrefixProvider *dpp, const char *name, bufferlist *dest, optional_yield y);
};
struct WOp {
WOp(Obj& _source) : source(_source) {}
- int remove(optional_yield y);
- int write(bufferlist& bl, optional_yield y);
+ int remove(const DoutPrefixProvider *dpp, optional_yield y);
+ int write(const DoutPrefixProvider *dpp, bufferlist& bl, optional_yield y);
- int write_data(bufferlist& bl, optional_yield y); /* write data only */
- int write_attrs(optional_yield y); /* write attrs only */
- int write_attr(const char *name, bufferlist& bl,
+ int write_data(const DoutPrefixProvider *dpp, bufferlist& bl, optional_yield y); /* write data only */
+ int write_attrs(const DoutPrefixProvider *dpp, optional_yield y); /* write attrs only */
+ int write_attr(const DoutPrefixProvider *dpp, const char *name, bufferlist& bl,
optional_yield y); /* write attrs only */
};
OmapOp(Obj& _source) : source(_source) {}
- int get_all(std::map<string, bufferlist> *m, optional_yield y);
- int get_vals(const string& marker, uint64_t count,
+ int get_all(const DoutPrefixProvider *dpp, std::map<string, bufferlist> *m, optional_yield y);
+ int get_vals(const DoutPrefixProvider *dpp, const string& marker, uint64_t count,
std::map<string, bufferlist> *m,
bool *pmore, optional_yield y);
- int set(const std::string& key, bufferlist& bl, optional_yield y);
- int set(const map<std::string, bufferlist>& m, optional_yield y);
- int del(const std::string& key, optional_yield y);
+ int set(const DoutPrefixProvider *dpp, const std::string& key, bufferlist& bl, optional_yield y);
+ int set(const DoutPrefixProvider *dpp, const map<std::string, bufferlist>& m, optional_yield y);
+ int del(const DoutPrefixProvider *dpp, const std::string& key, optional_yield y);
};
struct WNOp {
WNOp(Obj& _source) : source(_source) {}
- int notify(bufferlist& bl, uint64_t timeout_ms, bufferlist *pbl,
+ int notify(const DoutPrefixProvider *dpp, bufferlist& bl, uint64_t timeout_ms, bufferlist *pbl,
optional_yield y);
};
ROp rop() {
Op(Pool& _source) : source(_source) {}
- int init(const std::string& marker, const std::string& prefix);
+ int init(const DoutPrefixProvider *dpp, const std::string& marker, const std::string& prefix);
int get_next(int max, std::vector<string> *oids, bool *is_truncated);
int get_marker(string *marker);
};
- int list_prefixed_objs(const std::string& prefix, std::function<void(const string&)> cb);
+ int list_prefixed_objs(const DoutPrefixProvider *dpp, const std::string& prefix, std::function<void(const string&)> cb);
template <typename Container>
- int list_prefixed_objs(const string& prefix,
+ int list_prefixed_objs(const DoutPrefixProvider *dpp, const string& prefix,
Container *result) {
- return list_prefixed_objs(prefix, [&](const string& val) {
+ return list_prefixed_objs(dpp, prefix, [&](const string& val) {
result->push_back(val);
});
}
RGWSI_SysObj_Cache *svc;
public:
RGWSI_SysObj_Cache_CB(RGWSI_SysObj_Cache *_svc) : svc(_svc) {}
- int watch_cb(uint64_t notify_id,
+ int watch_cb(const DoutPrefixProvider *dpp,
+ uint64_t notify_id,
uint64_t cookie,
uint64_t notifier_id,
bufferlist& bl) {
- return svc->watch_cb(notify_id, cookie, notifier_id, bl);
+ return svc->watch_cb(dpp, notify_id, cookie, notifier_id, bl);
}
void set_enabled(bool status) {
}
};
-int RGWSI_SysObj_Cache::do_start(optional_yield y)
+int RGWSI_SysObj_Cache::do_start(optional_yield y, const DoutPrefixProvider *dpp)
{
int r = asocket.start();
if (r < 0) {
return r;
}
- r = RGWSI_SysObj_Core::do_start(y);
+ r = RGWSI_SysObj_Core::do_start(y, dpp);
if (r < 0) {
return r;
}
- r = notify_svc->start(y);
+ r = notify_svc->start(y, dpp);
if (r < 0) {
return r;
}
}
-int RGWSI_SysObj_Cache::remove(RGWSysObjectCtxBase& obj_ctx,
+int RGWSI_SysObj_Cache::remove(const DoutPrefixProvider *dpp,
+ RGWSysObjectCtxBase& obj_ctx,
RGWObjVersionTracker *objv_tracker,
const rgw_raw_obj& obj,
optional_yield y)
normalize_pool_and_obj(obj.pool, obj.oid, pool, oid);
string name = normal_name(pool, oid);
- cache.remove(name);
+ cache.remove(dpp, name);
ObjectCacheInfo info;
- int r = distribute_cache(name, obj, info, REMOVE_OBJ, y);
+ int r = distribute_cache(dpp, name, obj, info, REMOVE_OBJ, y);
if (r < 0) {
- ldout(cct, 0) << "ERROR: " << __func__ << "(): failed to distribute cache: r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: " << __func__ << "(): failed to distribute cache: r=" << r << dendl;
}
- return RGWSI_SysObj_Core::remove(obj_ctx, objv_tracker, obj, y);
+ return RGWSI_SysObj_Core::remove(dpp, obj_ctx, objv_tracker, obj, y);
}
-int RGWSI_SysObj_Cache::read(RGWSysObjectCtxBase& obj_ctx,
+int RGWSI_SysObj_Cache::read(const DoutPrefixProvider *dpp,
+ RGWSysObjectCtxBase& obj_ctx,
RGWSI_SysObj_Obj_GetObjState& read_state,
RGWObjVersionTracker *objv_tracker,
const rgw_raw_obj& obj,
rgw_pool pool;
string oid;
if (ofs != 0) {
- return RGWSI_SysObj_Core::read(obj_ctx, read_state, objv_tracker,
+ return RGWSI_SysObj_Core::read(dpp, obj_ctx, read_state, objv_tracker,
obj, obl, ofs, end, attrs, raw_attrs,
cache_info, refresh_version, y);
}
if (attrs)
flags |= CACHE_FLAG_XATTRS;
- int r = cache.get(name, info, flags, cache_info);
+ int r = cache.get(dpp, name, info, flags, cache_info);
if (r == 0 &&
(!refresh_version || !info.version.compare(&(*refresh_version)))) {
if (info.status < 0)
return -ENOENT;
map<string, bufferlist> unfiltered_attrset;
- r = RGWSI_SysObj_Core::read(obj_ctx, read_state, objv_tracker,
+ r = RGWSI_SysObj_Core::read(dpp, obj_ctx, read_state, objv_tracker,
obj, obl, ofs, end,
(attrs ? &unfiltered_attrset : nullptr),
true, /* cache unfiltered attrs */
if (r < 0) {
if (r == -ENOENT) { // only update ENOENT, we'd rather retry other errors
info.status = r;
- cache.put(name, info, cache_info);
+ cache.put(dpp, name, info, cache_info);
}
return r;
}
rgw_filter_attrset(info.xattrs, RGW_ATTR_PREFIX, attrs);
}
}
- cache.put(name, info, cache_info);
+ cache.put(dpp, name, info, cache_info);
return r;
}
-int RGWSI_SysObj_Cache::get_attr(const rgw_raw_obj& obj,
+int RGWSI_SysObj_Cache::get_attr(const DoutPrefixProvider *dpp,
+ const rgw_raw_obj& obj,
const char *attr_name,
bufferlist *dest,
optional_yield y)
uint32_t flags = CACHE_FLAG_XATTRS;
- int r = cache.get(name, info, flags, nullptr);
+ int r = cache.get(dpp, name, info, flags, nullptr);
if (r == 0) {
if (info.status < 0)
return info.status;
return -ENOENT;
}
/* don't try to cache this one */
- return RGWSI_SysObj_Core::get_attr(obj, attr_name, dest, y);
+ return RGWSI_SysObj_Core::get_attr(dpp, obj, attr_name, dest, y);
}
-int RGWSI_SysObj_Cache::set_attrs(const rgw_raw_obj& obj,
+int RGWSI_SysObj_Cache::set_attrs(const DoutPrefixProvider *dpp,
+ const rgw_raw_obj& obj,
map<string, bufferlist>& attrs,
map<string, bufferlist> *rmattrs,
RGWObjVersionTracker *objv_tracker,
}
info.status = 0;
info.flags = CACHE_FLAG_MODIFY_XATTRS;
- int ret = RGWSI_SysObj_Core::set_attrs(obj, attrs, rmattrs, objv_tracker, y);
+ int ret = RGWSI_SysObj_Core::set_attrs(dpp, obj, attrs, rmattrs, objv_tracker, y);
string name = normal_name(pool, oid);
if (ret >= 0) {
if (objv_tracker && objv_tracker->read_version.ver) {
info.version = objv_tracker->read_version;
info.flags |= CACHE_FLAG_OBJV;
}
- cache.put(name, info, NULL);
- int r = distribute_cache(name, obj, info, UPDATE_OBJ, y);
+ cache.put(dpp, name, info, NULL);
+ int r = distribute_cache(dpp, name, obj, info, UPDATE_OBJ, y);
if (r < 0)
- ldout(cct, 0) << "ERROR: failed to distribute cache for " << obj << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to distribute cache for " << obj << dendl;
} else {
- cache.remove(name);
+ cache.remove(dpp, name);
}
return ret;
}
-int RGWSI_SysObj_Cache::write(const rgw_raw_obj& obj,
+int RGWSI_SysObj_Cache::write(const DoutPrefixProvider *dpp,
+ const rgw_raw_obj& obj,
real_time *pmtime,
map<std::string, bufferlist>& attrs,
bool exclusive,
info.data = data;
info.flags = CACHE_FLAG_XATTRS | CACHE_FLAG_DATA | CACHE_FLAG_META;
ceph::real_time result_mtime;
- int ret = RGWSI_SysObj_Core::write(obj, &result_mtime, attrs,
+ int ret = RGWSI_SysObj_Core::write(dpp, obj, &result_mtime, attrs,
exclusive, data,
objv_tracker, set_mtime, y);
if (pmtime) {
info.meta.size = data.length();
string name = normal_name(pool, oid);
if (ret >= 0) {
- cache.put(name, info, NULL);
- int r = distribute_cache(name, obj, info, UPDATE_OBJ, y);
+ cache.put(dpp, name, info, NULL);
+ int r = distribute_cache(dpp, name, obj, info, UPDATE_OBJ, y);
if (r < 0)
- ldout(cct, 0) << "ERROR: failed to distribute cache for " << obj << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to distribute cache for " << obj << dendl;
} else {
- cache.remove(name);
+ cache.remove(dpp, name);
}
return ret;
}
-int RGWSI_SysObj_Cache::write_data(const rgw_raw_obj& obj,
+int RGWSI_SysObj_Cache::write_data(const DoutPrefixProvider *dpp,
+ const rgw_raw_obj& obj,
const bufferlist& data,
bool exclusive,
RGWObjVersionTracker *objv_tracker,
info.status = 0;
info.flags = CACHE_FLAG_DATA;
- int ret = RGWSI_SysObj_Core::write_data(obj, data, exclusive, objv_tracker, y);
+ int ret = RGWSI_SysObj_Core::write_data(dpp, obj, data, exclusive, objv_tracker, y);
string name = normal_name(pool, oid);
if (ret >= 0) {
if (objv_tracker && objv_tracker->read_version.ver) {
info.version = objv_tracker->read_version;
info.flags |= CACHE_FLAG_OBJV;
}
- cache.put(name, info, NULL);
- int r = distribute_cache(name, obj, info, UPDATE_OBJ, y);
+ cache.put(dpp, name, info, NULL);
+ int r = distribute_cache(dpp, name, obj, info, UPDATE_OBJ, y);
if (r < 0)
- ldout(cct, 0) << "ERROR: failed to distribute cache for " << obj << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to distribute cache for " << obj << dendl;
} else {
- cache.remove(name);
+ cache.remove(dpp, name);
}
return ret;
}
-int RGWSI_SysObj_Cache::raw_stat(const rgw_raw_obj& obj, uint64_t *psize, real_time *pmtime, uint64_t *pepoch,
+int RGWSI_SysObj_Cache::raw_stat(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, uint64_t *psize, real_time *pmtime, uint64_t *pepoch,
map<string, bufferlist> *attrs, bufferlist *first_chunk,
RGWObjVersionTracker *objv_tracker,
optional_yield y)
uint32_t flags = CACHE_FLAG_META | CACHE_FLAG_XATTRS;
if (objv_tracker)
flags |= CACHE_FLAG_OBJV;
- int r = cache.get(name, info, flags, NULL);
+ int r = cache.get(dpp, name, info, flags, NULL);
if (r == 0) {
if (info.status < 0)
return info.status;
if (r == -ENODATA) {
return -ENOENT;
}
- r = RGWSI_SysObj_Core::raw_stat(obj, &size, &mtime, &epoch, &info.xattrs,
+ r = RGWSI_SysObj_Core::raw_stat(dpp, obj, &size, &mtime, &epoch, &info.xattrs,
first_chunk, objv_tracker, y);
if (r < 0) {
if (r == -ENOENT) {
info.status = r;
- cache.put(name, info, NULL);
+ cache.put(dpp, name, info, NULL);
}
return r;
}
info.flags |= CACHE_FLAG_OBJV;
info.version = objv_tracker->read_version;
}
- cache.put(name, info, NULL);
+ cache.put(dpp, name, info, NULL);
done:
if (psize)
*psize = size;
return 0;
}
-int RGWSI_SysObj_Cache::distribute_cache(const string& normal_name,
+int RGWSI_SysObj_Cache::distribute_cache(const DoutPrefixProvider *dpp,
+ const string& normal_name,
const rgw_raw_obj& obj,
ObjectCacheInfo& obj_info, int op,
optional_yield y)
info.obj = obj;
bufferlist bl;
encode(info, bl);
- return notify_svc->distribute(normal_name, bl, y);
+ return notify_svc->distribute(dpp, normal_name, bl, y);
}
-int RGWSI_SysObj_Cache::watch_cb(uint64_t notify_id,
+int RGWSI_SysObj_Cache::watch_cb(const DoutPrefixProvider *dpp,
+ uint64_t notify_id,
uint64_t cookie,
uint64_t notifier_id,
bufferlist& bl)
switch (info.op) {
case UPDATE_OBJ:
- cache.put(name, info.obj_info, NULL);
+ cache.put(dpp, name, info.obj_info, NULL);
break;
case REMOVE_OBJ:
- cache.remove(name);
+ cache.remove(dpp, name);
break;
default:
ldout(cct, 0) << "WARNING: got unknown notification op: " << info.op << dendl;
cache.set_enabled(status);
}
-bool RGWSI_SysObj_Cache::chain_cache_entry(std::initializer_list<rgw_cache_entry_info *> cache_info_entries,
+bool RGWSI_SysObj_Cache::chain_cache_entry(const DoutPrefixProvider *dpp,
+ std::initializer_list<rgw_cache_entry_info *> cache_info_entries,
RGWChainedCache::Entry *chained_entry)
{
- return cache.chain_cache_entry(cache_info_entries, chained_entry);
+ return cache.chain_cache_entry(dpp, cache_info_entries, chained_entry);
}
void RGWSI_SysObj_Cache::register_chained_cache(RGWChainedCache *cc)
return -ENOSYS;
}
-RGWSI_SysObj_Cache::ASocketHandler::ASocketHandler(RGWSI_SysObj_Cache *_svc) : svc(_svc)
+RGWSI_SysObj_Cache::ASocketHandler::ASocketHandler(const DoutPrefixProvider *_dpp, RGWSI_SysObj_Cache *_svc) : dpp(_dpp), svc(_svc)
{
hook.reset(new RGWSI_SysObj_Cache_ASocketHook(_svc));
}
int RGWSI_SysObj_Cache::ASocketHandler::call_inspect(const std::string& target, Formatter* f)
{
- if (const auto entry = svc->cache.get(target)) {
+ if (const auto entry = svc->cache.get(dpp, target)) {
f->open_object_section("cache_entry");
f->dump_string("name", target.c_str());
entry->dump(f);
int RGWSI_SysObj_Cache::ASocketHandler::call_erase(const std::string& target)
{
- return svc->cache.remove(target);
+ return svc->cache.remove(dpp, target);
}
int RGWSI_SysObj_Cache::ASocketHandler::call_zap()
notify_svc = _notify_svc;
}
- int do_start(optional_yield) override;
+ int do_start(optional_yield, const DoutPrefixProvider *dpp) override;
void shutdown() override;
- int raw_stat(const rgw_raw_obj& obj, uint64_t *psize, real_time *pmtime, uint64_t *epoch,
+ int raw_stat(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, uint64_t *psize, real_time *pmtime, uint64_t *epoch,
map<string, bufferlist> *attrs, bufferlist *first_chunk,
RGWObjVersionTracker *objv_tracker,
optional_yield y) override;
- int read(RGWSysObjectCtxBase& obj_ctx,
+ int read(const DoutPrefixProvider *dpp,
+ RGWSysObjectCtxBase& obj_ctx,
RGWSI_SysObj_Obj_GetObjState& read_state,
RGWObjVersionTracker *objv_tracker,
const rgw_raw_obj& obj,
boost::optional<obj_version>,
optional_yield y) override;
- int get_attr(const rgw_raw_obj& obj, const char *name, bufferlist *dest,
+ int get_attr(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, const char *name, bufferlist *dest,
optional_yield y) override;
- int set_attrs(const rgw_raw_obj& obj,
+ int set_attrs(const DoutPrefixProvider *dpp,
+ const rgw_raw_obj& obj,
map<string, bufferlist>& attrs,
map<string, bufferlist> *rmattrs,
RGWObjVersionTracker *objv_tracker,
optional_yield y);
- int remove(RGWSysObjectCtxBase& obj_ctx,
+ int remove(const DoutPrefixProvider *dpp,
+ RGWSysObjectCtxBase& obj_ctx,
RGWObjVersionTracker *objv_tracker,
const rgw_raw_obj& obj,
optional_yield y) override;
- int write(const rgw_raw_obj& obj,
+ int write(const DoutPrefixProvider *dpp,
+ const rgw_raw_obj& obj,
real_time *pmtime,
map<std::string, bufferlist>& attrs,
bool exclusive,
real_time set_mtime,
optional_yield y) override;
- int write_data(const rgw_raw_obj& obj,
+ int write_data(const DoutPrefixProvider *dpp,
+ const rgw_raw_obj& obj,
const bufferlist& bl,
bool exclusive,
RGWObjVersionTracker *objv_tracker,
optional_yield y);
- int distribute_cache(const string& normal_name, const rgw_raw_obj& obj,
+ int distribute_cache(const DoutPrefixProvider *dpp, const string& normal_name, const rgw_raw_obj& obj,
ObjectCacheInfo& obj_info, int op,
optional_yield y);
- int watch_cb(uint64_t notify_id,
+ int watch_cb(const DoutPrefixProvider *dpp,
+ uint64_t notify_id,
uint64_t cookie,
uint64_t notifier_id,
bufferlist& bl);
void set_enabled(bool status);
public:
- RGWSI_SysObj_Cache(CephContext *cct) : RGWSI_SysObj_Core(cct), asocket(this) {
+ RGWSI_SysObj_Cache(const DoutPrefixProvider *dpp, CephContext *cct) : RGWSI_SysObj_Core(cct), asocket(dpp, this) {
cache.set_ctx(cct);
}
- bool chain_cache_entry(std::initializer_list<rgw_cache_entry_info *> cache_info_entries,
+ bool chain_cache_entry(const DoutPrefixProvider *dpp,
+ std::initializer_list<rgw_cache_entry_info *> cache_info_entries,
RGWChainedCache::Entry *chained_entry);
void register_chained_cache(RGWChainedCache *cc);
void unregister_chained_cache(RGWChainedCache *cc);
class ASocketHandler {
+ const DoutPrefixProvider *dpp;
RGWSI_SysObj_Cache *svc;
std::unique_ptr<RGWSI_SysObj_Cache_ASocketHook> hook;
public:
- ASocketHandler(RGWSI_SysObj_Cache *_svc);
+ ASocketHandler(const DoutPrefixProvider *dpp, RGWSI_SysObj_Cache *_svc);
~ASocketHandler();
int start();
return iter->second.first;
}
- bool put(RGWSI_SysObj_Cache *svc, const string& key, T *entry,
+ bool put(const DoutPrefixProvider *dpp, RGWSI_SysObj_Cache *svc, const string& key, T *entry,
std::initializer_list<rgw_cache_entry_info *> cache_info_entries) {
if (!svc) {
return false;
Entry chain_entry(this, key, entry);
/* we need the svc cache to call us under its lock to maintain lock ordering */
- return svc->chain_cache_entry(cache_info_entries, &chain_entry);
+ return svc->chain_cache_entry(dpp, cache_info_entries, &chain_entry);
}
void chain_cb(const string& key, void *data) override {
#define dout_subsys ceph_subsys_rgw
-int RGWSI_SysObj_Core_GetObjState::get_rados_obj(RGWSI_RADOS *rados_svc,
+int RGWSI_SysObj_Core_GetObjState::get_rados_obj(const DoutPrefixProvider *dpp,
+ RGWSI_RADOS *rados_svc,
RGWSI_Zone *zone_svc,
const rgw_raw_obj& obj,
RGWSI_RADOS::Obj **pobj)
{
if (!has_rados_obj) {
if (obj.oid.empty()) {
- ldout(rados_svc->ctx(), 0) << "ERROR: obj.oid is empty" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: obj.oid is empty" << dendl;
return -EINVAL;
}
rados_obj = rados_svc->obj(obj);
- int r = rados_obj.open();
+ int r = rados_obj.open(dpp);
if (r < 0) {
return r;
}
return 0;
}
-int RGWSI_SysObj_Core::get_rados_obj(RGWSI_Zone *zone_svc,
+int RGWSI_SysObj_Core::get_rados_obj(const DoutPrefixProvider *dpp,
+ RGWSI_Zone *zone_svc,
const rgw_raw_obj& obj,
RGWSI_RADOS::Obj *pobj)
{
if (obj.oid.empty()) {
- ldout(rados_svc->ctx(), 0) << "ERROR: obj.oid is empty" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: obj.oid is empty" << dendl;
return -EINVAL;
}
*pobj = rados_svc->obj(obj);
- int r = pobj->open();
+ int r = pobj->open(dpp);
if (r < 0) {
return r;
}
const rgw_raw_obj& obj,
RGWSysObjState **state,
RGWObjVersionTracker *objv_tracker,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
if (obj.empty()) {
return -EINVAL;
}
RGWSysObjState *s = rctx->get_state(obj);
- ldout(cct, 20) << "get_system_obj_state: rctx=" << (void *)rctx << " obj=" << obj << " state=" << (void *)s << " s->prefetch_data=" << s->prefetch_data << dendl;
+ ldpp_dout(dpp, 20) << "get_system_obj_state: rctx=" << (void *)rctx << " obj=" << obj << " state=" << (void *)s << " s->prefetch_data=" << s->prefetch_data << dendl;
*state = s;
if (s->has_attrs) {
return 0;
s->obj = obj;
- int r = raw_stat(obj, &s->size, &s->mtime, &s->epoch, &s->attrset,
+ int r = raw_stat(dpp, obj, &s->size, &s->mtime, &s->epoch, &s->attrset,
(s->prefetch_data ? &s->data : nullptr), objv_tracker, y);
if (r == -ENOENT) {
s->exists = false;
s->has_attrs = true;
s->obj_tag = s->attrset[RGW_ATTR_ID_TAG];
- if (s->obj_tag.length())
- ldout(cct, 20) << "get_system_obj_state: setting s->obj_tag to "
- << s->obj_tag.c_str() << dendl;
- else
- ldout(cct, 20) << "get_system_obj_state: s->obj_tag was set empty" << dendl;
+ if (s->obj_tag.length()) {
+ ldpp_dout(dpp, 20) << "get_system_obj_state: setting s->obj_tag to " << s->obj_tag.c_str() << dendl;
+ } else {
+ ldpp_dout(dpp, 20) << "get_system_obj_state: s->obj_tag was set empty" << dendl;
+ }
return 0;
}
const rgw_raw_obj& obj,
RGWSysObjState **state,
RGWObjVersionTracker *objv_tracker,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
int ret;
do {
- ret = get_system_obj_state_impl(rctx, obj, state, objv_tracker, y);
+ ret = get_system_obj_state_impl(rctx, obj, state, objv_tracker, y, dpp);
} while (ret == -EAGAIN);
return ret;
}
-int RGWSI_SysObj_Core::raw_stat(const rgw_raw_obj& obj, uint64_t *psize, real_time *pmtime, uint64_t *epoch,
+int RGWSI_SysObj_Core::raw_stat(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, uint64_t *psize, real_time *pmtime, uint64_t *epoch,
map<string, bufferlist> *attrs, bufferlist *first_chunk,
RGWObjVersionTracker *objv_tracker,
optional_yield y)
{
RGWSI_RADOS::Obj rados_obj;
- int r = get_rados_obj(zone_svc, obj, &rados_obj);
+ int r = get_rados_obj(dpp, zone_svc, obj, &rados_obj);
if (r < 0) {
return r;
}
op.read(0, cct->_conf->rgw_max_chunk_size, first_chunk, nullptr);
}
bufferlist outbl;
- r = rados_obj.operate(&op, &outbl, y);
+ r = rados_obj.operate(dpp, &op, &outbl, y);
if (epoch) {
*epoch = rados_obj.get_last_version();
real_time *lastmod,
uint64_t *obj_size,
RGWObjVersionTracker *objv_tracker,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
RGWSysObjState *astate = nullptr;
- int r = get_system_obj_state(&obj_ctx, obj, &astate, objv_tracker, y);
+ int r = get_system_obj_state(&obj_ctx, obj, &astate, objv_tracker, y, dpp);
if (r < 0)
return r;
if (cct->_conf->subsys.should_gather<ceph_subsys_rgw, 20>()) {
map<string, bufferlist>::iterator iter;
for (iter = attrs->begin(); iter != attrs->end(); ++iter) {
- ldout(cct, 20) << "Read xattr: " << iter->first << dendl;
+ ldpp_dout(dpp, 20) << "Read xattr: " << iter->first << dendl;
}
}
}
return 0;
}
-int RGWSI_SysObj_Core::read(RGWSysObjectCtxBase& obj_ctx,
+int RGWSI_SysObj_Core::read(const DoutPrefixProvider *dpp,
+ RGWSysObjectCtxBase& obj_ctx,
RGWSI_SysObj_Obj_GetObjState& _read_state,
RGWObjVersionTracker *objv_tracker,
const rgw_raw_obj& obj,
objv_tracker->prepare_op_for_read(&op);
}
- ldout(cct, 20) << "rados->read ofs=" << ofs << " len=" << len << dendl;
+ ldpp_dout(dpp, 20) << "rados->read ofs=" << ofs << " len=" << len << dendl;
op.read(ofs, len, bl, nullptr);
map<string, bufferlist> unfiltered_attrset;
}
RGWSI_RADOS::Obj rados_obj;
- int r = get_rados_obj(zone_svc, obj, &rados_obj);
+ int r = get_rados_obj(dpp, zone_svc, obj, &rados_obj);
if (r < 0) {
- ldout(cct, 20) << "get_rados_obj() on obj=" << obj << " returned " << r << dendl;
+ ldpp_dout(dpp, 20) << "get_rados_obj() on obj=" << obj << " returned " << r << dendl;
return r;
}
- r = rados_obj.operate(&op, nullptr, y);
+ r = rados_obj.operate(dpp, &op, nullptr, y);
if (r < 0) {
- ldout(cct, 20) << "rados_obj.operate() r=" << r << " bl.length=" << bl->length() << dendl;
+ ldpp_dout(dpp, 20) << "rados_obj.operate() r=" << r << " bl.length=" << bl->length() << dendl;
return r;
}
- ldout(cct, 20) << "rados_obj.operate() r=" << r << " bl.length=" << bl->length() << dendl;
+ ldpp_dout(dpp, 20) << "rados_obj.operate() r=" << r << " bl.length=" << bl->length() << dendl;
uint64_t op_ver = rados_obj.get_last_version();
if (read_state.last_ver > 0 &&
read_state.last_ver != op_ver) {
- ldout(cct, 5) << "raced with an object write, abort" << dendl;
+ ldpp_dout(dpp, 5) << "raced with an object write, abort" << dendl;
return -ECANCELED;
}
* dest: bufferlist to store the result in
* Returns: 0 on success, -ERR# otherwise.
*/
-int RGWSI_SysObj_Core::get_attr(const rgw_raw_obj& obj,
+int RGWSI_SysObj_Core::get_attr(const DoutPrefixProvider *dpp,
+ const rgw_raw_obj& obj,
const char *name,
bufferlist *dest,
optional_yield y)
{
RGWSI_RADOS::Obj rados_obj;
- int r = get_rados_obj(zone_svc, obj, &rados_obj);
+ int r = get_rados_obj(dpp, zone_svc, obj, &rados_obj);
if (r < 0) {
- ldout(cct, 20) << "get_rados_obj() on obj=" << obj << " returned " << r << dendl;
+ ldpp_dout(dpp, 20) << "get_rados_obj() on obj=" << obj << " returned " << r << dendl;
return r;
}
int rval;
op.getxattr(name, dest, &rval);
- r = rados_obj.operate(&op, nullptr, y);
+ r = rados_obj.operate(dpp, &op, nullptr, y);
if (r < 0)
return r;
return 0;
}
-int RGWSI_SysObj_Core::set_attrs(const rgw_raw_obj& obj,
+int RGWSI_SysObj_Core::set_attrs(const DoutPrefixProvider *dpp,
+ const rgw_raw_obj& obj,
map<string, bufferlist>& attrs,
map<string, bufferlist> *rmattrs,
RGWObjVersionTracker *objv_tracker,
optional_yield y)
{
RGWSI_RADOS::Obj rados_obj;
- int r = get_rados_obj(zone_svc, obj, &rados_obj);
+ int r = get_rados_obj(dpp, zone_svc, obj, &rados_obj);
if (r < 0) {
- ldout(cct, 20) << "get_rados_obj() on obj=" << obj << " returned " << r << dendl;
+ ldpp_dout(dpp, 20) << "get_rados_obj() on obj=" << obj << " returned " << r << dendl;
return r;
}
bufferlist bl;
- r = rados_obj.operate(&op, y);
+ r = rados_obj.operate(dpp, &op, y);
if (r < 0)
return r;
return 0;
}
-int RGWSI_SysObj_Core::omap_get_vals(const rgw_raw_obj& obj,
+int RGWSI_SysObj_Core::omap_get_vals(const DoutPrefixProvider *dpp,
+ const rgw_raw_obj& obj,
const string& marker,
uint64_t count,
std::map<string, bufferlist> *m,
optional_yield y)
{
RGWSI_RADOS::Obj rados_obj;
- int r = get_rados_obj(zone_svc, obj, &rados_obj);
+ int r = get_rados_obj(dpp, zone_svc, obj, &rados_obj);
if (r < 0) {
- ldout(cct, 20) << "get_rados_obj() on obj=" << obj << " returned " << r << dendl;
+ ldpp_dout(dpp, 20) << "get_rados_obj() on obj=" << obj << " returned " << r << dendl;
return r;
}
int rval;
op.omap_get_vals2(start_after, count, &t, &more, &rval);
- r = rados_obj.operate(&op, nullptr, y);
+ r = rados_obj.operate(dpp, &op, nullptr, y);
if (r < 0) {
return r;
}
return 0;
}
-int RGWSI_SysObj_Core::omap_get_all(const rgw_raw_obj& obj,
+int RGWSI_SysObj_Core::omap_get_all(const DoutPrefixProvider *dpp,
+ const rgw_raw_obj& obj,
std::map<string, bufferlist> *m,
optional_yield y)
{
RGWSI_RADOS::Obj rados_obj;
- int r = get_rados_obj(zone_svc, obj, &rados_obj);
+ int r = get_rados_obj(dpp, zone_svc, obj, &rados_obj);
if (r < 0) {
- ldout(cct, 20) << "get_rados_obj() on obj=" << obj << " returned " << r << dendl;
+ ldpp_dout(dpp, 20) << "get_rados_obj() on obj=" << obj << " returned " << r << dendl;
return r;
}
int rval;
op.omap_get_vals2(start_after, count, &t, &more, &rval);
- r = rados_obj.operate(&op, nullptr, y);
+ r = rados_obj.operate(dpp, &op, nullptr, y);
if (r < 0) {
return r;
}
return 0;
}
-int RGWSI_SysObj_Core::omap_set(const rgw_raw_obj& obj, const std::string& key,
+int RGWSI_SysObj_Core::omap_set(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, const std::string& key,
bufferlist& bl, bool must_exist,
optional_yield y)
{
RGWSI_RADOS::Obj rados_obj;
- int r = get_rados_obj(zone_svc, obj, &rados_obj);
+ int r = get_rados_obj(dpp, zone_svc, obj, &rados_obj);
if (r < 0) {
- ldout(cct, 20) << "get_rados_obj() on obj=" << obj << " returned " << r << dendl;
+ ldpp_dout(dpp, 20) << "get_rados_obj() on obj=" << obj << " returned " << r << dendl;
return r;
}
- ldout(cct, 15) << "omap_set obj=" << obj << " key=" << key << dendl;
+ ldpp_dout(dpp, 15) << "omap_set obj=" << obj << " key=" << key << dendl;
map<string, bufferlist> m;
m[key] = bl;
if (must_exist)
op.assert_exists();
op.omap_set(m);
- r = rados_obj.operate(&op, y);
+ r = rados_obj.operate(dpp, &op, y);
return r;
}
-int RGWSI_SysObj_Core::omap_set(const rgw_raw_obj& obj,
+int RGWSI_SysObj_Core::omap_set(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj,
const std::map<std::string, bufferlist>& m,
bool must_exist, optional_yield y)
{
RGWSI_RADOS::Obj rados_obj;
- int r = get_rados_obj(zone_svc, obj, &rados_obj);
+ int r = get_rados_obj(dpp, zone_svc, obj, &rados_obj);
if (r < 0) {
- ldout(cct, 20) << "get_rados_obj() on obj=" << obj << " returned " << r << dendl;
+ ldpp_dout(dpp, 20) << "get_rados_obj() on obj=" << obj << " returned " << r << dendl;
return r;
}
if (must_exist)
op.assert_exists();
op.omap_set(m);
- r = rados_obj.operate(&op, y);
+ r = rados_obj.operate(dpp, &op, y);
return r;
}
-int RGWSI_SysObj_Core::omap_del(const rgw_raw_obj& obj, const std::string& key,
+int RGWSI_SysObj_Core::omap_del(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, const std::string& key,
optional_yield y)
{
RGWSI_RADOS::Obj rados_obj;
- int r = get_rados_obj(zone_svc, obj, &rados_obj);
+ int r = get_rados_obj(dpp, zone_svc, obj, &rados_obj);
if (r < 0) {
- ldout(cct, 20) << "get_rados_obj() on obj=" << obj << " returned " << r << dendl;
+ ldpp_dout(dpp, 20) << "get_rados_obj() on obj=" << obj << " returned " << r << dendl;
return r;
}
op.omap_rm_keys(k);
- r = rados_obj.operate(&op, y);
+ r = rados_obj.operate(dpp, &op, y);
return r;
}
-int RGWSI_SysObj_Core::notify(const rgw_raw_obj& obj, bufferlist& bl,
+int RGWSI_SysObj_Core::notify(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, bufferlist& bl,
uint64_t timeout_ms, bufferlist *pbl,
optional_yield y)
{
RGWSI_RADOS::Obj rados_obj;
- int r = get_rados_obj(zone_svc, obj, &rados_obj);
+ int r = get_rados_obj(dpp, zone_svc, obj, &rados_obj);
if (r < 0) {
- ldout(cct, 20) << "get_rados_obj() on obj=" << obj << " returned " << r << dendl;
+ ldpp_dout(dpp, 20) << "get_rados_obj() on obj=" << obj << " returned " << r << dendl;
return r;
}
- r = rados_obj.notify(bl, timeout_ms, pbl, y);
+ r = rados_obj.notify(dpp, bl, timeout_ms, pbl, y);
return r;
}
-int RGWSI_SysObj_Core::remove(RGWSysObjectCtxBase& obj_ctx,
+int RGWSI_SysObj_Core::remove(const DoutPrefixProvider *dpp,
+ RGWSysObjectCtxBase& obj_ctx,
RGWObjVersionTracker *objv_tracker,
const rgw_raw_obj& obj,
optional_yield y)
{
RGWSI_RADOS::Obj rados_obj;
- int r = get_rados_obj(zone_svc, obj, &rados_obj);
+ int r = get_rados_obj(dpp, zone_svc, obj, &rados_obj);
if (r < 0) {
- ldout(cct, 20) << "get_rados_obj() on obj=" << obj << " returned " << r << dendl;
+ ldpp_dout(dpp, 20) << "get_rados_obj() on obj=" << obj << " returned " << r << dendl;
return r;
}
}
op.remove();
- r = rados_obj.operate(&op, y);
+ r = rados_obj.operate(dpp, &op, y);
if (r < 0)
return r;
return 0;
}
-int RGWSI_SysObj_Core::write(const rgw_raw_obj& obj,
+int RGWSI_SysObj_Core::write(const DoutPrefixProvider *dpp,
+ const rgw_raw_obj& obj,
real_time *pmtime,
map<std::string, bufferlist>& attrs,
bool exclusive,
optional_yield y)
{
RGWSI_RADOS::Obj rados_obj;
- int r = get_rados_obj(zone_svc, obj, &rados_obj);
+ int r = get_rados_obj(dpp, zone_svc, obj, &rados_obj);
if (r < 0) {
- ldout(cct, 20) << "get_rados_obj() on obj=" << obj << " returned " << r << dendl;
+ ldpp_dout(dpp, 20) << "get_rados_obj() on obj=" << obj << " returned " << r << dendl;
return r;
}
op.setxattr(name.c_str(), bl);
}
- r = rados_obj.operate(&op, y);
+ r = rados_obj.operate(dpp, &op, y);
if (r < 0) {
return r;
}
}
-int RGWSI_SysObj_Core::write_data(const rgw_raw_obj& obj,
+int RGWSI_SysObj_Core::write_data(const DoutPrefixProvider *dpp,
+ const rgw_raw_obj& obj,
const bufferlist& bl,
bool exclusive,
RGWObjVersionTracker *objv_tracker,
optional_yield y)
{
RGWSI_RADOS::Obj rados_obj;
- int r = get_rados_obj(zone_svc, obj, &rados_obj);
+ int r = get_rados_obj(dpp, zone_svc, obj, &rados_obj);
if (r < 0) {
- ldout(cct, 20) << "get_rados_obj() on obj=" << obj << " returned " << r << dendl;
+ ldpp_dout(dpp, 20) << "get_rados_obj() on obj=" << obj << " returned " << r << dendl;
return r;
}
objv_tracker->prepare_op_for_write(&op);
}
op.write_full(bl);
- r = rados_obj.operate(&op, y);
+ r = rados_obj.operate(dpp, &op, y);
if (r < 0)
return r;
return 0;
}
-int RGWSI_SysObj_Core::pool_list_prefixed_objs(const rgw_pool& pool, const string& prefix,
+int RGWSI_SysObj_Core::pool_list_prefixed_objs(const DoutPrefixProvider *dpp,
+ const rgw_pool& pool, const string& prefix,
std::function<void(const string&)> cb)
{
bool is_truncated;
RGWAccessListFilterPrefix filter(prefix);
- int r = op.init(string(), &filter);
+ int r = op.init(dpp, string(), &filter);
if (r < 0) {
return r;
}
return 0;
}
-int RGWSI_SysObj_Core::pool_list_objects_init(const rgw_pool& pool,
+int RGWSI_SysObj_Core::pool_list_objects_init(const DoutPrefixProvider *dpp,
+ const rgw_pool& pool,
const string& marker,
const string& prefix,
RGWSI_SysObj::Pool::ListCtx *_ctx)
ctx.pool = rados_svc->pool(pool);
ctx.op = ctx.pool.op();
- int r = ctx.op.init(marker, &ctx.filter);
+ int r = ctx.op.init(dpp, marker, &ctx.filter);
if (r < 0) {
- ldout(cct, 10) << "failed to list objects pool_iterate_begin() returned r=" << r << dendl;
+ ldpp_dout(dpp, 10) << "failed to list objects pool_iterate_begin() returned r=" << r << dendl;
return r;
}
return 0;
rados_svc = _rados_svc;
zone_svc = _zone_svc;
}
- int get_rados_obj(RGWSI_Zone *zone_svc, const rgw_raw_obj& obj, RGWSI_RADOS::Obj *pobj);
+ int get_rados_obj(const DoutPrefixProvider *dpp, RGWSI_Zone *zone_svc, const rgw_raw_obj& obj, RGWSI_RADOS::Obj *pobj);
- virtual int raw_stat(const rgw_raw_obj& obj, uint64_t *psize, real_time *pmtime, uint64_t *epoch,
+ virtual int raw_stat(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, uint64_t *psize,
+ real_time *pmtime, uint64_t *epoch,
map<string, bufferlist> *attrs, bufferlist *first_chunk,
RGWObjVersionTracker *objv_tracker,
optional_yield y);
- virtual int read(RGWSysObjectCtxBase& obj_ctx,
+ virtual int read(const DoutPrefixProvider *dpp,
+ RGWSysObjectCtxBase& obj_ctx,
RGWSI_SysObj_Obj_GetObjState& read_state,
RGWObjVersionTracker *objv_tracker,
const rgw_raw_obj& obj,
boost::optional<obj_version>,
optional_yield y);
- virtual int remove(RGWSysObjectCtxBase& obj_ctx,
+ virtual int remove(const DoutPrefixProvider *dpp,
+ RGWSysObjectCtxBase& obj_ctx,
RGWObjVersionTracker *objv_tracker,
const rgw_raw_obj& obj,
optional_yield y);
- virtual int write(const rgw_raw_obj& obj,
+ virtual int write(const DoutPrefixProvider *dpp,
+ const rgw_raw_obj& obj,
real_time *pmtime,
map<std::string, bufferlist>& attrs,
bool exclusive,
real_time set_mtime,
optional_yield y);
- virtual int write_data(const rgw_raw_obj& obj,
+ virtual int write_data(const DoutPrefixProvider *dpp,
+ const rgw_raw_obj& obj,
const bufferlist& bl,
bool exclusive,
RGWObjVersionTracker *objv_tracker,
optional_yield y);
- virtual int get_attr(const rgw_raw_obj& obj, const char *name, bufferlist *dest,
+ virtual int get_attr(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj,
+ const char *name, bufferlist *dest,
optional_yield y);
- virtual int set_attrs(const rgw_raw_obj& obj,
+ virtual int set_attrs(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj,
map<string, bufferlist>& attrs,
map<string, bufferlist> *rmattrs,
RGWObjVersionTracker *objv_tracker,
optional_yield y);
- virtual int omap_get_all(const rgw_raw_obj& obj, std::map<string, bufferlist> *m,
+ virtual int omap_get_all(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, std::map<string, bufferlist> *m,
optional_yield y);
- virtual int omap_get_vals(const rgw_raw_obj& obj,
+ virtual int omap_get_vals(const DoutPrefixProvider *dpp,
+ const rgw_raw_obj& obj,
const string& marker,
uint64_t count,
std::map<string, bufferlist> *m,
bool *pmore,
optional_yield y);
- virtual int omap_set(const rgw_raw_obj& obj, const std::string& key,
+ virtual int omap_set(const DoutPrefixProvider *dpp,
+ const rgw_raw_obj& obj, const std::string& key,
bufferlist& bl, bool must_exist,
optional_yield y);
- virtual int omap_set(const rgw_raw_obj& obj,
+ virtual int omap_set(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj,
const map<std::string, bufferlist>& m, bool must_exist,
optional_yield y);
- virtual int omap_del(const rgw_raw_obj& obj, const std::string& key,
+ virtual int omap_del(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, const std::string& key,
optional_yield y);
- virtual int notify(const rgw_raw_obj& obj, bufferlist& bl,
+ virtual int notify(const DoutPrefixProvider *dpp,
+ const rgw_raw_obj& obj, bufferlist& bl,
uint64_t timeout_ms, bufferlist *pbl,
optional_yield y);
- virtual int pool_list_prefixed_objs(const rgw_pool& pool,
+ virtual int pool_list_prefixed_objs(const DoutPrefixProvider *dpp,
+ const rgw_pool& pool,
const string& prefix,
std::function<void(const string&)> cb);
- virtual int pool_list_objects_init(const rgw_pool& pool,
+ virtual int pool_list_objects_init(const DoutPrefixProvider *dpp,
+ const rgw_pool& pool,
const std::string& marker,
const std::string& prefix,
RGWSI_SysObj::Pool::ListCtx *ctx);
int get_system_obj_state_impl(RGWSysObjectCtxBase *rctx,
const rgw_raw_obj& obj, RGWSysObjState **state,
RGWObjVersionTracker *objv_tracker,
- optional_yield y);
+ optional_yield y,
+ const DoutPrefixProvider *dpp);
int get_system_obj_state(RGWSysObjectCtxBase *rctx, const rgw_raw_obj& obj,
RGWSysObjState **state,
RGWObjVersionTracker *objv_tracker,
- optional_yield y);
+ optional_yield y,
+ const DoutPrefixProvider *dpp);
int stat(RGWSysObjectCtxBase& obj_ctx,
RGWSI_SysObj_Obj_GetObjState& state,
real_time *lastmod,
uint64_t *obj_size,
RGWObjVersionTracker *objv_tracker,
- optional_yield y);
+ optional_yield y,
+ const DoutPrefixProvider *dpp);
public:
RGWSI_SysObj_Core(CephContext *cct): RGWServiceInstance(cct) {}
RGWSI_SysObj_Core_GetObjState() {}
- int get_rados_obj(RGWSI_RADOS *rados_svc,
+ int get_rados_obj(const DoutPrefixProvider *dpp,
+ RGWSI_RADOS *rados_svc,
RGWSI_Zone *zone_svc,
const rgw_raw_obj& obj,
RGWSI_RADOS::Obj **pobj);
real_time * const pmtime,
rgw_cache_entry_info * const cache_info,
map<string, bufferlist> * const pattrs,
- optional_yield y) = 0;
+ optional_yield y,
+ const DoutPrefixProvider *dpp) = 0;
virtual int store_user_info(RGWSI_MetaBackend::Context *ctx,
const RGWUserInfo& info,
const real_time& mtime,
bool exclusive,
map<string, bufferlist> *attrs,
- optional_yield y) = 0;
+ optional_yield y,
+ const DoutPrefixProvider *dpp) = 0;
virtual int remove_user_info(RGWSI_MetaBackend::Context *ctx,
const RGWUserInfo& info,
RGWObjVersionTracker *objv_tracker,
- optional_yield y) = 0;
+ optional_yield y,
+ const DoutPrefixProvider *dpp) = 0;
virtual int get_user_info_by_email(RGWSI_MetaBackend::Context *ctx,
const string& email, RGWUserInfo *info,
RGWObjVersionTracker *objv_tracker,
real_time *pmtime,
- optional_yield y) = 0;
+ optional_yield y,
+ const DoutPrefixProvider *dpp) = 0;
virtual int get_user_info_by_swift(RGWSI_MetaBackend::Context *ctx,
const string& swift_name,
RGWUserInfo *info, /* out */
RGWObjVersionTracker * const objv_tracker,
real_time * const pmtime,
- optional_yield y) = 0;
+ optional_yield y,
+ const DoutPrefixProvider *dpp) = 0;
virtual int get_user_info_by_access_key(RGWSI_MetaBackend::Context *ctx,
const std::string& access_key,
RGWUserInfo *info,
RGWObjVersionTracker* objv_tracker,
real_time *pmtime,
- optional_yield y) = 0;
+ optional_yield y,
+ const DoutPrefixProvider *dpp) = 0;
- virtual int add_bucket(RGWSI_MetaBackend::Context *ctx,
+ virtual int add_bucket(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *ctx,
const rgw_user& user,
const rgw_bucket& bucket,
ceph::real_time creation_time,
optional_yield y) = 0;
- virtual int remove_bucket(RGWSI_MetaBackend::Context *ctx,
+ virtual int remove_bucket(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *ctx,
const rgw_user& user,
const rgw_bucket& _bucket, optional_yield) = 0;
- virtual int list_buckets(RGWSI_MetaBackend::Context *ctx,
+ virtual int list_buckets(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *ctx,
const rgw_user& user,
const string& marker,
const string& end_marker,
bool *is_truncated,
optional_yield y) = 0;
- virtual int flush_bucket_stats(RGWSI_MetaBackend::Context *ctx,
+ virtual int flush_bucket_stats(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *ctx,
const rgw_user& user,
const RGWBucketEnt& ent, optional_yield y) = 0;
- virtual int complete_flush_stats(RGWSI_MetaBackend::Context *ctx,
+ virtual int complete_flush_stats(const DoutPrefixProvider *dpp, RGWSI_MetaBackend::Context *ctx,
const rgw_user& user, optional_yield y) = 0;
- virtual int reset_bucket_stats(RGWSI_MetaBackend::Context *ctx,
+ virtual int reset_bucket_stats(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *ctx,
const rgw_user& user,
optional_yield y) = 0;
- virtual int read_stats(RGWSI_MetaBackend::Context *ctx,
+ virtual int read_stats(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *ctx,
const rgw_user& user, RGWStorageStats *stats,
ceph::real_time *last_stats_sync, /* last time a full stats sync completed */
ceph::real_time *last_stats_update,
optional_yield y) = 0; /* last time a stats update was done */
- virtual int read_stats_async(RGWSI_MetaBackend::Context *ctx,
+ virtual int read_stats_async(const DoutPrefixProvider *dpp, RGWSI_MetaBackend::Context *ctx,
const rgw_user& user, RGWGetUserStats_CB *cb) = 0;
};
svc.sync_modules = _sync_modules_svc;
}
-int RGWSI_User_RADOS::do_start(optional_yield)
+int RGWSI_User_RADOS::do_start(optional_yield, const DoutPrefixProvider *dpp)
{
uinfo_cache.reset(new RGWChainedCacheImpl<user_info_cache_entry>);
uinfo_cache->init(svc.cache);
int r = svc.meta->create_be_handler(RGWSI_MetaBackend::Type::MDBE_SOBJ, &be_handler);
if (r < 0) {
- ldout(ctx(), 0) << "ERROR: failed to create be handler: r=" << r << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to create be handler: r=" << r << dendl;
return r;
}
real_time * const pmtime,
rgw_cache_entry_info * const cache_info,
map<string, bufferlist> * const pattrs,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
if(user.id == RGW_USER_ANON_ID) {
- ldout(svc.meta_be->ctx(), 20) << "RGWSI_User_RADOS::read_user_info(): anonymous user" << dendl;
+ ldpp_dout(dpp, 20) << "RGWSI_User_RADOS::read_user_info(): anonymous user" << dendl;
return -ENOENT;
}
bufferlist bl;
RGWSI_MBSObj_GetParams params(&bl, pattrs, pmtime);
params.set_cache_info(cache_info);
- int ret = svc.meta_be->get_entry(ctx, get_meta_key(user), params, objv_tracker, y);
+ int ret = svc.meta_be->get_entry(ctx, get_meta_key(user), params, objv_tracker, y, dpp);
if (ret < 0) {
return ret;
}
try {
decode(user_id, iter);
if (user_id.user_id != user) {
- lderr(svc.meta_be->ctx()) << "ERROR: rgw_get_user_info_by_uid(): user id mismatch: " << user_id.user_id << " != " << user << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: rgw_get_user_info_by_uid(): user id mismatch: " << user_id.user_id << " != " << user << dendl;
return -EIO;
}
if (!iter.end()) {
decode(*info, iter);
}
} catch (buffer::error& err) {
- ldout(svc.meta_be->ctx(), 0) << "ERROR: failed to decode user info, caught buffer::error" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to decode user info, caught buffer::error" << dendl;
return -EIO;
}
ui.user_id = info.user_id;
}
- int prepare() {
+ int prepare(const DoutPrefixProvider *dpp) {
if (objv_tracker) {
ot = *objv_tracker;
}
auto& k = iter->second;
/* check if swift mapping exists */
RGWUserInfo inf;
- int r = svc.user->get_user_info_by_swift(ctx, k.id, &inf, nullptr, nullptr, y);
+ int r = svc.user->get_user_info_by_swift(ctx, k.id, &inf, nullptr, nullptr, y, dpp);
if (r >= 0 && inf.user_id != info.user_id &&
(!old_info || inf.user_id != old_info->user_id)) {
- ldout(svc.meta_be->ctx(), 0) << "WARNING: can't store user info, swift id (" << k.id
+ ldpp_dout(dpp, 0) << "WARNING: can't store user info, swift id (" << k.id
<< ") already mapped to another user (" << info.user_id << ")" << dendl;
return -EEXIST;
}
continue;
auto& k = iter->second;
RGWUserInfo inf;
- int r = svc.user->get_user_info_by_access_key(ctx, k.id, &inf, nullptr, nullptr, y);
+ int r = svc.user->get_user_info_by_access_key(ctx, k.id, &inf, nullptr, nullptr, y, dpp);
if (r >= 0 && inf.user_id != info.user_id &&
(!old_info || inf.user_id != old_info->user_id)) {
- ldout(svc.meta_be->ctx(), 0) << "WARNING: can't store user info, access key already mapped to another user" << dendl;
+ ldpp_dout(dpp, 0) << "WARNING: can't store user info, access key already mapped to another user" << dendl;
return -EEXIST;
}
}
return 0;
}
- int put() {
+ int put(const DoutPrefixProvider *dpp) {
bufferlist data_bl;
encode(ui, data_bl);
encode(info, data_bl);
RGWSI_MBSObj_PutParams params(data_bl, pattrs, mtime, exclusive);
- int ret = svc.meta_be->put(ctx, RGWSI_User::get_meta_key(info.user_id), params, &ot, y);
+ int ret = svc.meta_be->put(ctx, RGWSI_User::get_meta_key(info.user_id), params, &ot, y, dpp);
if (ret < 0)
return ret;
return 0;
}
- int complete() {
+ int complete(const DoutPrefixProvider *dpp) {
int ret;
bufferlist link_bl;
if (!info.user_email.empty()) {
if (!old_info ||
old_info->user_email.compare(info.user_email) != 0) { /* only if new index changed */
- ret = rgw_put_system_obj(obj_ctx, svc.zone->get_zone_params().user_email_pool, info.user_email,
+ ret = rgw_put_system_obj(dpp, obj_ctx, svc.zone->get_zone_params().user_email_pool, info.user_email,
link_bl, exclusive, NULL, real_time(), y);
if (ret < 0)
return ret;
if (old_info && old_info->access_keys.count(iter->first) != 0 && !renamed)
continue;
- ret = rgw_put_system_obj(obj_ctx, svc.zone->get_zone_params().user_keys_pool, k.id,
+ ret = rgw_put_system_obj(dpp, obj_ctx, svc.zone->get_zone_params().user_keys_pool, k.id,
link_bl, exclusive, NULL, real_time(), y);
if (ret < 0)
return ret;
if (old_info && old_info->swift_keys.count(siter->first) != 0 && !renamed)
continue;
- ret = rgw_put_system_obj(obj_ctx, svc.zone->get_zone_params().user_swift_pool, k.id,
+ ret = rgw_put_system_obj(dpp, obj_ctx, svc.zone->get_zone_params().user_swift_pool, k.id,
link_bl, exclusive, NULL, real_time(), y);
if (ret < 0)
return ret;
}
if (old_info) {
- ret = remove_old_indexes(*old_info, info, y);
+ ret = remove_old_indexes(*old_info, info, y, dpp);
if (ret < 0) {
return ret;
}
return 0;
}
- int remove_old_indexes(const RGWUserInfo& old_info, const RGWUserInfo& new_info, optional_yield y) {
+ int remove_old_indexes(const RGWUserInfo& old_info, const RGWUserInfo& new_info, optional_yield y, const DoutPrefixProvider *dpp) {
int ret;
if (!old_info.user_id.empty() &&
old_info.user_id != new_info.user_id) {
if (old_info.user_id.tenant != new_info.user_id.tenant) {
- ldout(svc.user->ctx(), 0) << "ERROR: tenant mismatch: " << old_info.user_id.tenant << " != " << new_info.user_id.tenant << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: tenant mismatch: " << old_info.user_id.tenant << " != " << new_info.user_id.tenant << dendl;
return -EINVAL;
}
- ret = svc.user->remove_uid_index(ctx, old_info, nullptr, y);
+ ret = svc.user->remove_uid_index(ctx, old_info, nullptr, y, dpp);
if (ret < 0 && ret != -ENOENT) {
set_err_msg("ERROR: could not remove index for uid " + old_info.user_id.to_str());
return ret;
if (!old_info.user_email.empty() &&
old_info.user_email != new_info.user_email) {
- ret = svc.user->remove_email_index(ctx, old_info.user_email, y);
+ ret = svc.user->remove_email_index(dpp, ctx, old_info.user_email, y);
if (ret < 0 && ret != -ENOENT) {
set_err_msg("ERROR: could not remove index for email " + old_info.user_email);
return ret;
for ([[maybe_unused]] const auto& [name, access_key] : old_info.access_keys) {
if (!new_info.access_keys.count(access_key.id)) {
- ret = svc.user->remove_key_index(ctx, access_key, y);
+ ret = svc.user->remove_key_index(dpp, ctx, access_key, y);
if (ret < 0 && ret != -ENOENT) {
set_err_msg("ERROR: could not remove index for key " + access_key.id);
return ret;
const auto& swift_key = old_iter->second;
auto new_iter = new_info.swift_keys.find(swift_key.id);
if (new_iter == new_info.swift_keys.end()) {
- ret = svc.user->remove_swift_name_index(ctx, swift_key.id, y);
+ ret = svc.user->remove_swift_name_index(dpp, ctx, swift_key.id, y);
if (ret < 0 && ret != -ENOENT) {
set_err_msg("ERROR: could not remove index for swift_name " + swift_key.id);
return ret;
const real_time& mtime,
bool exclusive,
map<string, bufferlist> *attrs,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
PutOperation op(svc, ctx,
info, old_info,
attrs,
y);
- int r = op.prepare();
+ int r = op.prepare(dpp);
if (r < 0) {
return r;
}
- r = op.put();
+ r = op.put(dpp);
if (r < 0) {
return r;
}
- r = op.complete();
+ r = op.complete(dpp);
if (r < 0) {
return r;
}
return 0;
}
-int RGWSI_User_RADOS::remove_key_index(RGWSI_MetaBackend::Context *_ctx,
+int RGWSI_User_RADOS::remove_key_index(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *_ctx,
const RGWAccessKey& access_key,
optional_yield y)
{
RGWSI_MetaBackend_SObj::Context_SObj *ctx = static_cast<RGWSI_MetaBackend_SObj::Context_SObj *>(_ctx);
rgw_raw_obj obj(svc.zone->get_zone_params().user_keys_pool, access_key.id);
auto sysobj = ctx->obj_ctx->get_obj(obj);
- return sysobj.wop().remove(y);
+ return sysobj.wop().remove(dpp, y);
}
-int RGWSI_User_RADOS::remove_email_index(RGWSI_MetaBackend::Context *_ctx,
+int RGWSI_User_RADOS::remove_email_index(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *_ctx,
const string& email,
optional_yield y)
{
RGWSI_MetaBackend_SObj::Context_SObj *ctx = static_cast<RGWSI_MetaBackend_SObj::Context_SObj *>(_ctx);
rgw_raw_obj obj(svc.zone->get_zone_params().user_email_pool, email);
auto sysobj = ctx->obj_ctx->get_obj(obj);
- return sysobj.wop().remove(y);
+ return sysobj.wop().remove(dpp, y);
}
-int RGWSI_User_RADOS::remove_swift_name_index(RGWSI_MetaBackend::Context *_ctx, const string& swift_name,
+int RGWSI_User_RADOS::remove_swift_name_index(const DoutPrefixProvider *dpp, RGWSI_MetaBackend::Context *_ctx, const string& swift_name,
optional_yield y)
{
RGWSI_MetaBackend_SObj::Context_SObj *ctx = static_cast<RGWSI_MetaBackend_SObj::Context_SObj *>(_ctx);
rgw_raw_obj obj(svc.zone->get_zone_params().user_swift_pool, swift_name);
auto sysobj = ctx->obj_ctx->get_obj(obj);
- return sysobj.wop().remove(y);
+ return sysobj.wop().remove(dpp, y);
}
/**
int RGWSI_User_RADOS::remove_user_info(RGWSI_MetaBackend::Context *_ctx,
const RGWUserInfo& info,
RGWObjVersionTracker *objv_tracker,
- optional_yield y)
+ optional_yield y,
+ const DoutPrefixProvider *dpp)
{
int ret;
- auto cct = svc.meta_be->ctx();
-
auto kiter = info.access_keys.begin();
for (; kiter != info.access_keys.end(); ++kiter) {
- ldout(cct, 10) << "removing key index: " << kiter->first << dendl;
- ret = remove_key_index(_ctx, kiter->second, y);
+ ldpp_dout(dpp, 10) << "removing key index: " << kiter->first << dendl;
+ ret = remove_key_index(dpp, _ctx, kiter->second, y);
if (ret < 0 && ret != -ENOENT) {
- ldout(cct, 0) << "ERROR: could not remove " << kiter->first << " (access key object), should be fixed (err=" << ret << ")" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: could not remove " << kiter->first << " (access key object), should be fixed (err=" << ret << ")" << dendl;
return ret;
}
}
auto siter = info.swift_keys.begin();
for (; siter != info.swift_keys.end(); ++siter) {
auto& k = siter->second;
- ldout(cct, 10) << "removing swift subuser index: " << k.id << dendl;
+ ldpp_dout(dpp, 10) << "removing swift subuser index: " << k.id << dendl;
/* check if swift mapping exists */
- ret = remove_swift_name_index(_ctx, k.id, y);
+ ret = remove_swift_name_index(dpp, _ctx, k.id, y);
if (ret < 0 && ret != -ENOENT) {
- ldout(cct, 0) << "ERROR: could not remove " << k.id << " (swift name object), should be fixed (err=" << ret << ")" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: could not remove " << k.id << " (swift name object), should be fixed (err=" << ret << ")" << dendl;
return ret;
}
}
- ldout(cct, 10) << "removing email index: " << info.user_email << dendl;
- ret = remove_email_index(_ctx, info.user_email, y);
+ ldpp_dout(dpp, 10) << "removing email index: " << info.user_email << dendl;
+ ret = remove_email_index(dpp, _ctx, info.user_email, y);
if (ret < 0 && ret != -ENOENT) {
- ldout(cct, 0) << "ERROR: could not remove email index object for "
+ ldpp_dout(dpp, 0) << "ERROR: could not remove email index object for "
<< info.user_email << ", should be fixed (err=" << ret << ")" << dendl;
return ret;
}
rgw_raw_obj uid_bucks = get_buckets_obj(info.user_id);
- ldout(cct, 10) << "removing user buckets index" << dendl;
+ ldpp_dout(dpp, 10) << "removing user buckets index" << dendl;
RGWSI_MetaBackend_SObj::Context_SObj *ctx = static_cast<RGWSI_MetaBackend_SObj::Context_SObj *>(_ctx);
auto sysobj = ctx->obj_ctx->get_obj(uid_bucks);
- ret = sysobj.wop().remove(y);
+ ret = sysobj.wop().remove(dpp, y);
if (ret < 0 && ret != -ENOENT) {
- ldout(cct, 0) << "ERROR: could not remove " << info.user_id << ":" << uid_bucks << ", should be fixed (err=" << ret << ")" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: could not remove " << info.user_id << ":" << uid_bucks << ", should be fixed (err=" << ret << ")" << dendl;
return ret;
}
- ret = remove_uid_index(ctx, info, objv_tracker, y);
+ ret = remove_uid_index(ctx, info, objv_tracker, y, dpp);
if (ret < 0 && ret != -ENOENT) {
return ret;
}
}
int RGWSI_User_RADOS::remove_uid_index(RGWSI_MetaBackend::Context *ctx, const RGWUserInfo& user_info, RGWObjVersionTracker *objv_tracker,
- optional_yield y)
+ optional_yield y, const DoutPrefixProvider *dpp)
{
- ldout(cct, 10) << "removing user index: " << user_info.user_id << dendl;
+ ldpp_dout(dpp, 10) << "removing user index: " << user_info.user_id << dendl;
RGWSI_MBSObj_RemoveParams params;
- int ret = svc.meta_be->remove(ctx, get_meta_key(user_info.user_id), params, objv_tracker, y);
+ int ret = svc.meta_be->remove(ctx, get_meta_key(user_info.user_id), params, objv_tracker, y, dpp);
if (ret < 0 && ret != -ENOENT && ret != -ECANCELED) {
string key;
user_info.user_id.to_str(key);
rgw_raw_obj uid_obj(svc.zone->get_zone_params().user_uid_pool, key);
- ldout(cct, 0) << "ERROR: could not remove " << user_info.user_id << ":" << uid_obj << ", should be fixed (err=" << ret << ")" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: could not remove " << user_info.user_id << ":" << uid_obj << ", should be fixed (err=" << ret << ")" << dendl;
return ret;
}
const rgw_pool& pool,
RGWUserInfo *info,
RGWObjVersionTracker * const objv_tracker,
- real_time * const pmtime, optional_yield y)
+ real_time * const pmtime, optional_yield y, const DoutPrefixProvider *dpp)
{
RGWSI_MetaBackend_SObj::Context_SObj *ctx = static_cast<RGWSI_MetaBackend_SObj::Context_SObj *>(_ctx);
bufferlist bl;
RGWUID uid;
- int ret = rgw_get_system_obj(*ctx->obj_ctx, pool, key, bl, nullptr, &e.mtime, y);
+ int ret = rgw_get_system_obj(*ctx->obj_ctx, pool, key, bl, nullptr, &e.mtime, y, dpp);
if (ret < 0)
return ret;
int ret = read_user_info(ctx, uid.user_id,
&e.info, &e.objv_tracker, nullptr, &cache_info, nullptr,
- y);
+ y, dpp);
if (ret < 0) {
return ret;
}
} catch (buffer::error& err) {
- ldout(svc.meta_be->ctx(), 0) << "ERROR: failed to decode user info, caught buffer::error" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: failed to decode user info, caught buffer::error" << dendl;
return -EIO;
}
- uinfo_cache->put(svc.cache, cache_key, &e, { &cache_info });
+ uinfo_cache->put(dpp, svc.cache, cache_key, &e, { &cache_info });
*info = e.info;
if (objv_tracker)
int RGWSI_User_RADOS::get_user_info_by_email(RGWSI_MetaBackend::Context *ctx,
const string& email, RGWUserInfo *info,
RGWObjVersionTracker *objv_tracker,
- real_time *pmtime, optional_yield y)
+ real_time *pmtime, optional_yield y,
+ const DoutPrefixProvider *dpp)
{
return get_user_info_from_index(ctx, email, svc.zone->get_zone_params().user_email_pool,
- info, objv_tracker, pmtime, y);
+ info, objv_tracker, pmtime, y, dpp);
}
/**
const string& swift_name,
RGWUserInfo *info, /* out */
RGWObjVersionTracker * const objv_tracker,
- real_time * const pmtime, optional_yield y)
+ real_time * const pmtime, optional_yield y,
+ const DoutPrefixProvider *dpp)
{
return get_user_info_from_index(ctx,
swift_name,
svc.zone->get_zone_params().user_swift_pool,
- info, objv_tracker, pmtime, y);
+ info, objv_tracker, pmtime, y, dpp);
}
/**
const std::string& access_key,
RGWUserInfo *info,
RGWObjVersionTracker* objv_tracker,
- real_time *pmtime, optional_yield y)
+ real_time *pmtime, optional_yield y,
+ const DoutPrefixProvider *dpp)
{
return get_user_info_from_index(ctx,
access_key,
svc.zone->get_zone_params().user_keys_pool,
- info, objv_tracker, pmtime, y);
+ info, objv_tracker, pmtime, y, dpp);
}
-int RGWSI_User_RADOS::cls_user_update_buckets(rgw_raw_obj& obj, list<cls_user_bucket_entry>& entries, bool add, optional_yield y)
+int RGWSI_User_RADOS::cls_user_update_buckets(const DoutPrefixProvider *dpp, rgw_raw_obj& obj, list<cls_user_bucket_entry>& entries, bool add, optional_yield y)
{
auto rados_obj = svc.rados->obj(obj);
- int r = rados_obj.open();
+ int r = rados_obj.open(dpp);
if (r < 0) {
return r;
}
librados::ObjectWriteOperation op;
cls_user_set_buckets(op, entries, add);
- r = rados_obj.operate(&op, y);
+ r = rados_obj.operate(dpp, &op, y);
if (r < 0) {
return r;
}
return 0;
}
-int RGWSI_User_RADOS::cls_user_add_bucket(rgw_raw_obj& obj, const cls_user_bucket_entry& entry, optional_yield y)
+int RGWSI_User_RADOS::cls_user_add_bucket(const DoutPrefixProvider *dpp, rgw_raw_obj& obj, const cls_user_bucket_entry& entry, optional_yield y)
{
list<cls_user_bucket_entry> l;
l.push_back(entry);
- return cls_user_update_buckets(obj, l, true, y);
+ return cls_user_update_buckets(dpp, obj, l, true, y);
}
-int RGWSI_User_RADOS::cls_user_remove_bucket(rgw_raw_obj& obj, const cls_user_bucket& bucket, optional_yield y)
+int RGWSI_User_RADOS::cls_user_remove_bucket(const DoutPrefixProvider *dpp, rgw_raw_obj& obj, const cls_user_bucket& bucket, optional_yield y)
{
auto rados_obj = svc.rados->obj(obj);
- int r = rados_obj.open();
+ int r = rados_obj.open(dpp);
if (r < 0) {
return r;
}
librados::ObjectWriteOperation op;
::cls_user_remove_bucket(op, bucket);
- r = rados_obj.operate(&op, y);
+ r = rados_obj.operate(dpp, &op, y);
if (r < 0)
return r;
return 0;
}
-int RGWSI_User_RADOS::add_bucket(RGWSI_MetaBackend::Context *ctx,
+int RGWSI_User_RADOS::add_bucket(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *ctx,
const rgw_user& user,
const rgw_bucket& bucket,
ceph::real_time creation_time,
new_bucket.creation_time = creation_time;
rgw_raw_obj obj = get_buckets_obj(user);
- ret = cls_user_add_bucket(obj, new_bucket, y);
+ ret = cls_user_add_bucket(dpp, obj, new_bucket, y);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: error adding bucket to user: ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: error adding bucket to user: ret=" << ret << dendl;
return ret;
}
}
-int RGWSI_User_RADOS::remove_bucket(RGWSI_MetaBackend::Context *ctx,
+int RGWSI_User_RADOS::remove_bucket(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *ctx,
const rgw_user& user,
const rgw_bucket& _bucket,
optional_yield y)
cls_user_bucket bucket;
bucket.name = _bucket.name;
rgw_raw_obj obj = get_buckets_obj(user);
- int ret = cls_user_remove_bucket(obj, bucket, y);
+ int ret = cls_user_remove_bucket(dpp, obj, bucket, y);
if (ret < 0) {
- ldout(cct, 0) << "ERROR: error removing bucket from user: ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: error removing bucket from user: ret=" << ret << dendl;
}
return 0;
}
-int RGWSI_User_RADOS::cls_user_flush_bucket_stats(rgw_raw_obj& user_obj,
+int RGWSI_User_RADOS::cls_user_flush_bucket_stats(const DoutPrefixProvider *dpp,
+ rgw_raw_obj& user_obj,
const RGWBucketEnt& ent, optional_yield y)
{
cls_user_bucket_entry entry;
list<cls_user_bucket_entry> entries;
entries.push_back(entry);
- int r = cls_user_update_buckets(user_obj, entries, false, y);
+ int r = cls_user_update_buckets(dpp, user_obj, entries, false, y);
if (r < 0) {
- ldout(cct, 20) << "cls_user_update_buckets() returned " << r << dendl;
+ ldpp_dout(dpp, 20) << "cls_user_update_buckets() returned " << r << dendl;
return r;
}
return 0;
}
-int RGWSI_User_RADOS::cls_user_list_buckets(rgw_raw_obj& obj,
+int RGWSI_User_RADOS::cls_user_list_buckets(const DoutPrefixProvider *dpp,
+ rgw_raw_obj& obj,
const string& in_marker,
const string& end_marker,
const int max_entries,
optional_yield y)
{
auto rados_obj = svc.rados->obj(obj);
- int r = rados_obj.open();
+ int r = rados_obj.open(dpp);
if (r < 0) {
return r;
}
cls_user_bucket_list(op, in_marker, end_marker, max_entries, entries, out_marker, truncated, &rc);
bufferlist ibl;
- r = rados_obj.operate(&op, &ibl, y);
+ r = rados_obj.operate(dpp, &op, &ibl, y);
if (r < 0)
return r;
if (rc < 0)
return 0;
}
-int RGWSI_User_RADOS::list_buckets(RGWSI_MetaBackend::Context *ctx,
+int RGWSI_User_RADOS::list_buckets(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *ctx,
const rgw_user& user,
const string& marker,
const string& end_marker,
buckets->clear();
if (user.id == RGW_USER_ANON_ID) {
- ldout(cct, 20) << "RGWSI_User_RADOS::list_buckets(): anonymous user" << dendl;
+ ldpp_dout(dpp, 20) << "RGWSI_User_RADOS::list_buckets(): anonymous user" << dendl;
*is_truncated = false;
return 0;
}
do {
std::list<cls_user_bucket_entry> entries;
- ret = cls_user_list_buckets(obj, m, end_marker, max - total, entries, &m, &truncated, y);
+ ret = cls_user_list_buckets(dpp, obj, m, end_marker, max - total, entries, &m, &truncated, y);
if (ret == -ENOENT) {
ret = 0;
}
return 0;
}
-int RGWSI_User_RADOS::flush_bucket_stats(RGWSI_MetaBackend::Context *ctx,
+int RGWSI_User_RADOS::flush_bucket_stats(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *ctx,
const rgw_user& user,
const RGWBucketEnt& ent,
optional_yield y)
{
rgw_raw_obj obj = get_buckets_obj(user);
- return cls_user_flush_bucket_stats(obj, ent, y);
+ return cls_user_flush_bucket_stats(dpp, obj, ent, y);
}
-int RGWSI_User_RADOS::reset_bucket_stats(RGWSI_MetaBackend::Context *ctx,
+int RGWSI_User_RADOS::reset_bucket_stats(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *ctx,
const rgw_user& user,
optional_yield y)
{
- return cls_user_reset_stats(user, y);
+ return cls_user_reset_stats(dpp, user, y);
}
-int RGWSI_User_RADOS::cls_user_reset_stats(const rgw_user& user, optional_yield y)
+int RGWSI_User_RADOS::cls_user_reset_stats(const DoutPrefixProvider *dpp, const rgw_user& user, optional_yield y)
{
rgw_raw_obj obj = get_buckets_obj(user);
auto rados_obj = svc.rados->obj(obj);
- int rval, r = rados_obj.open();
+ int rval, r = rados_obj.open(dpp);
if (r < 0) {
return r;
}
encode(call, in);
op.exec("user", "reset_user_stats2", in, &out, &rval);
- r = rados_obj.operate(&op, y, librados::OPERATION_RETURNVEC);
+ r = rados_obj.operate(dpp, &op, y, librados::OPERATION_RETURNVEC);
if (r < 0) {
return r;
}
return rval;
}
-int RGWSI_User_RADOS::complete_flush_stats(RGWSI_MetaBackend::Context *ctx,
+int RGWSI_User_RADOS::complete_flush_stats(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *ctx,
const rgw_user& user, optional_yield y)
{
rgw_raw_obj obj = get_buckets_obj(user);
auto rados_obj = svc.rados->obj(obj);
- int r = rados_obj.open();
+ int r = rados_obj.open(dpp);
if (r < 0) {
return r;
}
librados::ObjectWriteOperation op;
::cls_user_complete_stats_sync(op);
- return rados_obj.operate(&op, y);
+ return rados_obj.operate(dpp, &op, y);
}
-int RGWSI_User_RADOS::cls_user_get_header(const rgw_user& user, cls_user_header *header,
+int RGWSI_User_RADOS::cls_user_get_header(const DoutPrefixProvider *dpp,
+ const rgw_user& user, cls_user_header *header,
optional_yield y)
{
rgw_raw_obj obj = get_buckets_obj(user);
auto rados_obj = svc.rados->obj(obj);
- int r = rados_obj.open();
+ int r = rados_obj.open(dpp);
if (r < 0) {
return r;
}
bufferlist ibl;
librados::ObjectReadOperation op;
::cls_user_get_header(op, header, &rc);
- return rados_obj.operate(&op, &ibl, y);
+ return rados_obj.operate(dpp, &op, &ibl, y);
}
-int RGWSI_User_RADOS::cls_user_get_header_async(const string& user_str, RGWGetUserHeader_CB *cb)
+int RGWSI_User_RADOS::cls_user_get_header_async(const DoutPrefixProvider *dpp, const string& user_str, RGWGetUserHeader_CB *cb)
{
rgw_raw_obj obj = get_buckets_obj(rgw_user(user_str));
auto rados_obj = svc.rados->obj(obj);
- int r = rados_obj.open();
+ int r = rados_obj.open(dpp);
if (r < 0) {
return r;
}
return 0;
}
-int RGWSI_User_RADOS::read_stats(RGWSI_MetaBackend::Context *ctx,
+int RGWSI_User_RADOS::read_stats(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *ctx,
const rgw_user& user, RGWStorageStats *stats,
ceph::real_time *last_stats_sync,
ceph::real_time *last_stats_update,
string user_str = user.to_str();
cls_user_header header;
- int r = cls_user_get_header(rgw_user(user_str), &header, y);
+ int r = cls_user_get_header(dpp, rgw_user(user_str), &header, y);
if (r < 0)
return r;
}
};
-int RGWSI_User_RADOS::read_stats_async(RGWSI_MetaBackend::Context *ctx,
+int RGWSI_User_RADOS::read_stats_async(const DoutPrefixProvider *dpp, RGWSI_MetaBackend::Context *ctx,
const rgw_user& user, RGWGetUserStats_CB *_cb)
{
string user_str = user.to_str();
RGWGetUserStatsContext *cb = new RGWGetUserStatsContext(_cb);
- int r = cls_user_get_header_async(user_str, cb);
+ int r = cls_user_get_header_async(dpp, user_str, cb);
if (r < 0) {
_cb->put();
delete cb;
RGWUserInfo *info,
RGWObjVersionTracker * const objv_tracker,
real_time * const pmtime,
- optional_yield y);
+ optional_yield y,
+ const DoutPrefixProvider *dpp);
int remove_uid_index(RGWSI_MetaBackend::Context *ctx, const RGWUserInfo& user_info, RGWObjVersionTracker *objv_tracker,
- optional_yield y);
+ optional_yield y, const DoutPrefixProvider *dpp);
- int remove_key_index(RGWSI_MetaBackend::Context *ctx, const RGWAccessKey& access_key, optional_yield y);
- int remove_email_index(RGWSI_MetaBackend::Context *ctx, const string& email, optional_yield y);
- int remove_swift_name_index(RGWSI_MetaBackend::Context *ctx, const string& swift_name, optional_yield y);
+ int remove_key_index(const DoutPrefixProvider *dpp, RGWSI_MetaBackend::Context *ctx, const RGWAccessKey& access_key, optional_yield y);
+ int remove_email_index(const DoutPrefixProvider *dpp, RGWSI_MetaBackend::Context *ctx, const string& email, optional_yield y);
+ int remove_swift_name_index(const DoutPrefixProvider *dpp, RGWSI_MetaBackend::Context *ctx, const string& swift_name, optional_yield y);
/* admin management */
- int cls_user_update_buckets(rgw_raw_obj& obj, list<cls_user_bucket_entry>& entries, bool add, optional_yield y);
- int cls_user_add_bucket(rgw_raw_obj& obj, const cls_user_bucket_entry& entry, optional_yield y);
- int cls_user_remove_bucket(rgw_raw_obj& obj, const cls_user_bucket& bucket, optional_yield y);
+ int cls_user_update_buckets(const DoutPrefixProvider *dpp, rgw_raw_obj& obj, list<cls_user_bucket_entry>& entries, bool add, optional_yield y);
+ int cls_user_add_bucket(const DoutPrefixProvider *dpp, rgw_raw_obj& obj, const cls_user_bucket_entry& entry, optional_yield y);
+ int cls_user_remove_bucket(const DoutPrefixProvider *dpp, rgw_raw_obj& obj, const cls_user_bucket& bucket, optional_yield y);
/* quota stats */
- int cls_user_flush_bucket_stats(rgw_raw_obj& user_obj,
+ int cls_user_flush_bucket_stats(const DoutPrefixProvider *dpp, rgw_raw_obj& user_obj,
const RGWBucketEnt& ent, optional_yield y);
- int cls_user_list_buckets(rgw_raw_obj& obj,
+ int cls_user_list_buckets(const DoutPrefixProvider *dpp,
+ rgw_raw_obj& obj,
const string& in_marker,
const string& end_marker,
const int max_entries,
bool * const truncated,
optional_yield y);
- int cls_user_reset_stats(const rgw_user& user, optional_yield y);
- int cls_user_get_header(const rgw_user& user, cls_user_header *header, optional_yield y);
- int cls_user_get_header_async(const string& user, RGWGetUserHeader_CB *cb);
+ int cls_user_reset_stats(const DoutPrefixProvider *dpp, const rgw_user& user, optional_yield y);
+ int cls_user_get_header(const DoutPrefixProvider *dpp, const rgw_user& user, cls_user_header *header, optional_yield y);
+ int cls_user_get_header_async(const DoutPrefixProvider *dpp, const string& user, RGWGetUserHeader_CB *cb);
- int do_start(optional_yield) override;
+ int do_start(optional_yield, const DoutPrefixProvider *dpp) override;
public:
struct Svc {
RGWSI_User_RADOS *user{nullptr};
real_time * const pmtime,
rgw_cache_entry_info * const cache_info,
map<string, bufferlist> * const pattrs,
- optional_yield y) override;
+ optional_yield y,
+ const DoutPrefixProvider *dpp) override;
int store_user_info(RGWSI_MetaBackend::Context *ctx,
const RGWUserInfo& info,
const real_time& mtime,
bool exclusive,
map<string, bufferlist> *attrs,
- optional_yield y) override;
+ optional_yield y,
+ const DoutPrefixProvider *dpp) override;
int remove_user_info(RGWSI_MetaBackend::Context *ctx,
const RGWUserInfo& info,
RGWObjVersionTracker *objv_tracker,
- optional_yield y) override;
+ optional_yield y,
+ const DoutPrefixProvider *dpp) override;
int get_user_info_by_email(RGWSI_MetaBackend::Context *ctx,
const string& email, RGWUserInfo *info,
RGWObjVersionTracker *objv_tracker,
real_time *pmtime,
- optional_yield y) override;
+ optional_yield y,
+ const DoutPrefixProvider *dpp) override;
int get_user_info_by_swift(RGWSI_MetaBackend::Context *ctx,
const string& swift_name,
RGWUserInfo *info, /* out */
RGWObjVersionTracker * const objv_tracker,
real_time * const pmtime,
- optional_yield y) override;
+ optional_yield y,
+ const DoutPrefixProvider *dpp) override;
int get_user_info_by_access_key(RGWSI_MetaBackend::Context *ctx,
const std::string& access_key,
RGWUserInfo *info,
RGWObjVersionTracker* objv_tracker,
real_time *pmtime,
- optional_yield y) override;
+ optional_yield y,
+ const DoutPrefixProvider *dpp) override;
/* user buckets directory */
- int add_bucket(RGWSI_MetaBackend::Context *ctx,
+ int add_bucket(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *ctx,
const rgw_user& user,
const rgw_bucket& bucket,
ceph::real_time creation_time,
optional_yield y) override;
- int remove_bucket(RGWSI_MetaBackend::Context *ctx,
+ int remove_bucket(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *ctx,
const rgw_user& user,
const rgw_bucket& _bucket,
optional_yield y) override;
- int list_buckets(RGWSI_MetaBackend::Context *ctx,
+ int list_buckets(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *ctx,
const rgw_user& user,
const string& marker,
const string& end_marker,
optional_yield y) override;
/* quota related */
- int flush_bucket_stats(RGWSI_MetaBackend::Context *ctx,
+ int flush_bucket_stats(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *ctx,
const rgw_user& user,
const RGWBucketEnt& ent, optional_yield y) override;
- int complete_flush_stats(RGWSI_MetaBackend::Context *ctx,
+ int complete_flush_stats(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *ctx,
const rgw_user& user, optional_yield y) override;
- int reset_bucket_stats(RGWSI_MetaBackend::Context *ctx,
+ int reset_bucket_stats(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *ctx,
const rgw_user& user,
optional_yield y) override;
- int read_stats(RGWSI_MetaBackend::Context *ctx,
+ int read_stats(const DoutPrefixProvider *dpp,
+ RGWSI_MetaBackend::Context *ctx,
const rgw_user& user, RGWStorageStats *stats,
ceph::real_time *last_stats_sync, /* last time a full stats sync completed */
ceph::real_time *last_stats_update,
optional_yield y) override; /* last time a stats update was done */
- int read_stats_async(RGWSI_MetaBackend::Context *ctx,
+ int read_stats_async(const DoutPrefixProvider *dpp, RGWSI_MetaBackend::Context *ctx,
const rgw_user& user, RGWGetUserStats_CB *cb) override;
};
sync_modules_svc->get_manager()->supports_data_export(source_zone.tier_type);
}
-int RGWSI_Zone::do_start(optional_yield y)
+int RGWSI_Zone::do_start(optional_yield y, const DoutPrefixProvider *dpp)
{
- int ret = sysobj_svc->start(y);
+ int ret = sysobj_svc->start(y, dpp);
if (ret < 0) {
return ret;
}
assert(sysobj_svc->is_started()); /* if not then there's ordering issue */
- ret = rados_svc->start(y);
+ ret = rados_svc->start(y, dpp);
if (ret < 0) {
return ret;
}
- ret = realm->init(cct, sysobj_svc, y);
+ ret = realm->init(dpp, cct, sysobj_svc, y);
if (ret < 0 && ret != -ENOENT) {
- ldout(cct, 0) << "failed reading realm info: ret "<< ret << " " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "failed reading realm info: ret "<< ret << " " << cpp_strerror(-ret) << dendl;
return ret;
} else if (ret != -ENOENT) {
- ldout(cct, 20) << "realm " << realm->get_name() << " " << realm->get_id() << dendl;
- ret = current_period->init(cct, sysobj_svc, realm->get_id(), y,
+ ldpp_dout(dpp, 20) << "realm " << realm->get_name() << " " << realm->get_id() << dendl;
+ ret = current_period->init(dpp, cct, sysobj_svc, realm->get_id(), y,
realm->get_name());
if (ret < 0 && ret != -ENOENT) {
- ldout(cct, 0) << "failed reading current period info: " << " " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "failed reading current period info: " << " " << cpp_strerror(-ret) << dendl;
return ret;
}
- ldout(cct, 20) << "current period " << current_period->get_id() << dendl;
+ ldpp_dout(dpp, 20) << "current period " << current_period->get_id() << dendl;
}
- ret = replace_region_with_zonegroup(y);
+ ret = replace_region_with_zonegroup(dpp, y);
if (ret < 0) {
- lderr(cct) << "failed converting region to zonegroup : ret "<< ret << " " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, -1) << "failed converting region to zonegroup : ret "<< ret << " " << cpp_strerror(-ret) << dendl;
return ret;
}
- ret = convert_regionmap(y);
+ ret = convert_regionmap(dpp, y);
if (ret < 0) {
- lderr(cct) << "failed converting regionmap: " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, -1) << "failed converting regionmap: " << cpp_strerror(-ret) << dendl;
return ret;
}
bool zg_initialized = false;
if (!current_period->get_id().empty()) {
- ret = init_zg_from_period(&zg_initialized, y);
+ ret = init_zg_from_period(dpp, &zg_initialized, y);
if (ret < 0) {
return ret;
}
bool creating_defaults = false;
bool using_local = (!zg_initialized);
if (using_local) {
- ldout(cct, 10) << " cannot find current period zonegroup using local zonegroup" << dendl;
- ret = init_zg_from_local(&creating_defaults, y);
+ ldpp_dout(dpp, 10) << " cannot find current period zonegroup using local zonegroup" << dendl;
+ ret = init_zg_from_local(dpp, &creating_defaults, y);
if (ret < 0) {
return ret;
}
// read period_config into current_period
auto& period_config = current_period->get_config();
- ret = period_config.read(sysobj_svc, zonegroup->realm_id, y);
+ ret = period_config.read(dpp, sysobj_svc, zonegroup->realm_id, y);
if (ret < 0 && ret != -ENOENT) {
- ldout(cct, 0) << "ERROR: failed to read period config: "
+ ldpp_dout(dpp, 0) << "ERROR: failed to read period config: "
<< cpp_strerror(ret) << dendl;
return ret;
}
}
- ldout(cct, 10) << "Cannot find current period zone using local zone" << dendl;
+ ldpp_dout(dpp, 10) << "Cannot find current period zone using local zone" << dendl;
if (creating_defaults && cct->_conf->rgw_zone.empty()) {
- ldout(cct, 10) << " Using default name "<< default_zone_name << dendl;
+ ldpp_dout(dpp, 10) << " Using default name "<< default_zone_name << dendl;
zone_params->set_name(default_zone_name);
}
- ret = zone_params->init(cct, sysobj_svc, y);
+ ret = zone_params->init(dpp, cct, sysobj_svc, y);
if (ret < 0 && ret != -ENOENT) {
- lderr(cct) << "failed reading zone info: ret "<< ret << " " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, -1) << "failed reading zone info: ret "<< ret << " " << cpp_strerror(-ret) << dendl;
return ret;
}
auto zone_iter = zonegroup->zones.find(zone_params->get_id());
if (zone_iter == zonegroup->zones.end()) {
if (using_local) {
- lderr(cct) << "Cannot find zone id=" << zone_params->get_id() << " (name=" << zone_params->get_name() << ")" << dendl;
+ ldpp_dout(dpp, -1) << "Cannot find zone id=" << zone_params->get_id() << " (name=" << zone_params->get_name() << ")" << dendl;
return -EINVAL;
}
- ldout(cct, 1) << "Cannot find zone id=" << zone_params->get_id() << " (name=" << zone_params->get_name() << "), switching to local zonegroup configuration" << dendl;
- ret = init_zg_from_local(&creating_defaults, y);
+ ldpp_dout(dpp, 1) << "Cannot find zone id=" << zone_params->get_id() << " (name=" << zone_params->get_name() << "), switching to local zonegroup configuration" << dendl;
+ ret = init_zg_from_local(dpp, &creating_defaults, y);
if (ret < 0) {
return ret;
}
}
if (zone_iter != zonegroup->zones.end()) {
*zone_public_config = zone_iter->second;
- ldout(cct, 20) << "zone " << zone_params->get_name() << " found" << dendl;
+ ldpp_dout(dpp, 20) << "zone " << zone_params->get_name() << " found" << dendl;
} else {
- lderr(cct) << "Cannot find zone id=" << zone_params->get_id() << " (name=" << zone_params->get_name() << ")" << dendl;
+ ldpp_dout(dpp, -1) << "Cannot find zone id=" << zone_params->get_id() << " (name=" << zone_params->get_name() << ")" << dendl;
return -EINVAL;
}
for (auto ziter : zonegroup->zones) {
auto zone_handler = std::make_shared<RGWBucketSyncPolicyHandler>(this, sync_modules_svc, bucket_sync_svc, ziter.second.id);
- ret = zone_handler->init(y);
+ ret = zone_handler->init(dpp, y);
if (ret < 0) {
- lderr(cct) << "ERROR: could not initialize zone policy handler for zone=" << ziter.second.name << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: could not initialize zone policy handler for zone=" << ziter.second.name << dendl;
return ret;
}
sync_policy_handlers[ziter.second.id] = zone_handler;
&target_zones,
false); /* relaxed: also get all zones that we allow to sync to/from */
- ret = sync_modules_svc->start(y);
+ ret = sync_modules_svc->start(y, dpp);
if (ret < 0) {
return ret;
}
auto sync_modules = sync_modules_svc->get_manager();
RGWSyncModuleRef sm;
if (!sync_modules->get_module(zone_public_config->tier_type, &sm)) {
- lderr(cct) << "ERROR: tier type not found: " << zone_public_config->tier_type << dendl;
+ ldpp_dout(dpp, -1) << "ERROR: tier type not found: " << zone_public_config->tier_type << dendl;
return -EINVAL;
}
}
if (zone_by_id.find(zone_id()) == zone_by_id.end()) {
- ldout(cct, 0) << "WARNING: could not find zone config in zonegroup for local zone (" << zone_id() << "), will use defaults" << dendl;
+ ldpp_dout(dpp, 0) << "WARNING: could not find zone config in zonegroup for local zone (" << zone_id() << "), will use defaults" << dendl;
}
for (const auto& ziter : zonegroup->zones) {
continue;
}
if (z.endpoints.empty()) {
- ldout(cct, 0) << "WARNING: can't generate connection for zone " << z.id << " id " << z.name << ": no endpoints defined" << dendl;
+ ldpp_dout(dpp, 0) << "WARNING: can't generate connection for zone " << z.id << " id " << z.name << ": no endpoints defined" << dendl;
continue;
}
- ldout(cct, 20) << "generating connection object for zone " << z.name << " id " << z.id << dendl;
+ ldpp_dout(dpp, 20) << "generating connection object for zone " << z.name << " id " << z.id << dendl;
RGWRESTConn *conn = new RGWRESTConn(cct, this, z.id, z.endpoints);
zone_conn_map[id] = conn;
zone_data_notify_to_map[id] = conn;
}
} else {
- ldout(cct, 20) << "NOTICE: not syncing to/from zone " << z.name << " id " << z.id << dendl;
+ ldpp_dout(dpp, 20) << "NOTICE: not syncing to/from zone " << z.name << " id " << z.id << dendl;
}
}
- ldout(cct, 20) << "started zone id=" << zone_params->get_id() << " (name=" << zone_params->get_name() <<
+ ldpp_dout(dpp, 20) << "started zone id=" << zone_params->get_id() << " (name=" << zone_params->get_name() <<
") with tier type = " << zone_public_config->tier_type << dendl;
return 0;
}
}
-int RGWSI_Zone::list_regions(list<string>& regions)
+int RGWSI_Zone::list_regions(const DoutPrefixProvider *dpp, list<string>& regions)
{
RGWZoneGroup zonegroup;
RGWSI_SysObj::Pool syspool = sysobj_svc->get_pool(zonegroup.get_pool(cct));
- return syspool.list_prefixed_objs(region_info_oid_prefix, ®ions);
+ return syspool.list_prefixed_objs(dpp, region_info_oid_prefix, ®ions);
}
-int RGWSI_Zone::list_zonegroups(list<string>& zonegroups)
+int RGWSI_Zone::list_zonegroups(const DoutPrefixProvider *dpp, list<string>& zonegroups)
{
RGWZoneGroup zonegroup;
RGWSI_SysObj::Pool syspool = sysobj_svc->get_pool(zonegroup.get_pool(cct));
- return syspool.list_prefixed_objs(zonegroup_names_oid_prefix, &zonegroups);
+ return syspool.list_prefixed_objs(dpp, zonegroup_names_oid_prefix, &zonegroups);
}
-int RGWSI_Zone::list_zones(list<string>& zones)
+int RGWSI_Zone::list_zones(const DoutPrefixProvider *dpp, list<string>& zones)
{
RGWZoneParams zoneparams;
RGWSI_SysObj::Pool syspool = sysobj_svc->get_pool(zoneparams.get_pool(cct));
- return syspool.list_prefixed_objs(zone_names_oid_prefix, &zones);
+ return syspool.list_prefixed_objs(dpp, zone_names_oid_prefix, &zones);
}
-int RGWSI_Zone::list_realms(list<string>& realms)
+int RGWSI_Zone::list_realms(const DoutPrefixProvider *dpp, list<string>& realms)
{
RGWRealm realm(cct, sysobj_svc);
RGWSI_SysObj::Pool syspool = sysobj_svc->get_pool(realm.get_pool(cct));
- return syspool.list_prefixed_objs(realm_names_oid_prefix, &realms);
+ return syspool.list_prefixed_objs(dpp, realm_names_oid_prefix, &realms);
}
-int RGWSI_Zone::list_periods(list<string>& periods)
+int RGWSI_Zone::list_periods(const DoutPrefixProvider *dpp, list<string>& periods)
{
RGWPeriod period;
list<string> raw_periods;
RGWSI_SysObj::Pool syspool = sysobj_svc->get_pool(period.get_pool(cct));
- int ret = syspool.list_prefixed_objs(period.get_info_oid_prefix(), &raw_periods);
+ int ret = syspool.list_prefixed_objs(dpp, period.get_info_oid_prefix(), &raw_periods);
if (ret < 0) {
return ret;
}
}
-int RGWSI_Zone::list_periods(const string& current_period, list<string>& periods, optional_yield y)
+int RGWSI_Zone::list_periods(const DoutPrefixProvider *dpp, const string& current_period, list<string>& periods, optional_yield y)
{
int ret = 0;
string period_id = current_period;
while(!period_id.empty()) {
RGWPeriod period(period_id);
- ret = period.init(cct, sysobj_svc, y);
+ ret = period.init(dpp, cct, sysobj_svc, y);
if (ret < 0) {
return ret;
}
* backward compatability
* Returns 0 on success, -ERR# on failure.
*/
-int RGWSI_Zone::replace_region_with_zonegroup(optional_yield y)
+int RGWSI_Zone::replace_region_with_zonegroup(const DoutPrefixProvider *dpp, optional_yield y)
{
/* copy default region */
/* convert default region to default zonegroup */
RGWSysObjectCtx obj_ctx = sysobj_svc->init_obj_ctx();
RGWSysObj sysobj = sysobj_svc->get_obj(obj_ctx, rgw_raw_obj(pool, oid));
- int ret = sysobj.rop().read(&bl, y);
+ int ret = sysobj.rop().read(dpp, &bl, y);
if (ret < 0 && ret != -ENOENT) {
- ldout(cct, 0) << __func__ << " failed to read converted: ret "<< ret << " " << cpp_strerror(-ret)
+ ldpp_dout(dpp, 0) << __func__ << " failed to read converted: ret "<< ret << " " << cpp_strerror(-ret)
<< dendl;
return ret;
} else if (ret != -ENOENT) {
- ldout(cct, 20) << "System already converted " << dendl;
+ ldpp_dout(dpp, 20) << "System already converted " << dendl;
return 0;
}
string default_region;
- ret = default_zonegroup.init(cct, sysobj_svc, y, false, true);
+ ret = default_zonegroup.init(dpp, cct, sysobj_svc, y, false, true);
if (ret < 0) {
- ldout(cct, 0) << __func__ << " failed init default region: ret "<< ret << " " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << __func__ << " failed init default region: ret "<< ret << " " << cpp_strerror(-ret) << dendl;
return ret;
}
- ret = default_zonegroup.read_default_id(default_region, y, true);
+ ret = default_zonegroup.read_default_id(dpp, default_region, y, true);
if (ret < 0 && ret != -ENOENT) {
- ldout(cct, 0) << __func__ << " failed reading old default region: ret "<< ret << " " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << __func__ << " failed reading old default region: ret "<< ret << " " << cpp_strerror(-ret) << dendl;
return ret;
}
/* convert regions to zonegroups */
list<string> regions;
- ret = list_regions(regions);
+ ret = list_regions(dpp, regions);
if (ret < 0 && ret != -ENOENT) {
- ldout(cct, 0) << __func__ << " failed to list regions: ret "<< ret << " " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << __func__ << " failed to list regions: ret "<< ret << " " << cpp_strerror(-ret) << dendl;
return ret;
} else if (ret == -ENOENT || regions.empty()) {
RGWZoneParams zoneparams(default_zone_name);
- int ret = zoneparams.init(cct, sysobj_svc, y);
+ int ret = zoneparams.init(dpp, cct, sysobj_svc, y);
if (ret < 0 && ret != -ENOENT) {
- ldout(cct, 0) << __func__ << ": error initializing default zone params: " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << __func__ << ": error initializing default zone params: " << cpp_strerror(-ret) << dendl;
return ret;
}
/* update master zone */
RGWZoneGroup default_zg(default_zonegroup_name);
- ret = default_zg.init(cct, sysobj_svc, y);
+ ret = default_zg.init(dpp, cct, sysobj_svc, y);
if (ret < 0 && ret != -ENOENT) {
- ldout(cct, 0) << __func__ << ": error in initializing default zonegroup: " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << __func__ << ": error in initializing default zonegroup: " << cpp_strerror(-ret) << dendl;
return ret;
}
if (ret != -ENOENT && default_zg.master_zone.empty()) {
default_zg.master_zone = zoneparams.get_id();
- return default_zg.update(y);
+ return default_zg.update(dpp, y);
}
return 0;
}
for (list<string>::iterator iter = regions.begin(); iter != regions.end(); ++iter) {
if (*iter != default_zonegroup_name){
RGWZoneGroup region(*iter);
- int ret = region.init(cct, sysobj_svc, y, true, true);
+ int ret = region.init(dpp, cct, sysobj_svc, y, true, true);
if (ret < 0) {
- ldout(cct, 0) << __func__ << " failed init region "<< *iter << ": " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << __func__ << " failed init region "<< *iter << ": " << cpp_strerror(-ret) << dendl;
return ret;
}
if (region.is_master_zonegroup()) {
buf_to_hex(md5, CEPH_CRYPTO_MD5_DIGESTSIZE, md5_str);
string new_realm_id(md5_str);
RGWRealm new_realm(new_realm_id,new_realm_name);
- ret = new_realm.init(cct, sysobj_svc, y, false);
+ ret = new_realm.init(dpp, cct, sysobj_svc, y, false);
if (ret < 0) {
- ldout(cct, 0) << __func__ << " Error initing new realm: " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << __func__ << " Error initing new realm: " << cpp_strerror(-ret) << dendl;
return ret;
}
- ret = new_realm.create(y);
+ ret = new_realm.create(dpp, y);
if (ret < 0 && ret != -EEXIST) {
- ldout(cct, 0) << __func__ << " Error creating new realm: " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << __func__ << " Error creating new realm: " << cpp_strerror(-ret) << dendl;
return ret;
}
- ret = new_realm.set_as_default(y);
+ ret = new_realm.set_as_default(dpp, y);
if (ret < 0) {
- ldout(cct, 0) << __func__ << " Error setting realm as default: " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << __func__ << " Error setting realm as default: " << cpp_strerror(-ret) << dendl;
return ret;
}
- ret = realm->init(cct, sysobj_svc, y);
+ ret = realm->init(dpp, cct, sysobj_svc, y);
if (ret < 0) {
- ldout(cct, 0) << __func__ << " Error initing realm: " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << __func__ << " Error initing realm: " << cpp_strerror(-ret) << dendl;
return ret;
}
- ret = current_period->init(cct, sysobj_svc, realm->get_id(), y,
+ ret = current_period->init(dpp, cct, sysobj_svc, realm->get_id(), y,
realm->get_name());
if (ret < 0) {
- ldout(cct, 0) << __func__ << " Error initing current period: " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << __func__ << " Error initing current period: " << cpp_strerror(-ret) << dendl;
return ret;
}
}
/* create zonegroups */
for (iter = regions.begin(); iter != regions.end(); ++iter)
{
- ldout(cct, 0) << __func__ << " Converting " << *iter << dendl;
+ ldpp_dout(dpp, 0) << __func__ << " Converting " << *iter << dendl;
/* check to see if we don't have already a zonegroup with this name */
RGWZoneGroup new_zonegroup(*iter);
- ret = new_zonegroup.init(cct , sysobj_svc, y);
+ ret = new_zonegroup.init(dpp, cct , sysobj_svc, y);
if (ret == 0 && new_zonegroup.get_id() != *iter) {
- ldout(cct, 0) << __func__ << " zonegroup "<< *iter << " already exists id " << new_zonegroup.get_id () <<
+ ldpp_dout(dpp, 0) << __func__ << " zonegroup "<< *iter << " already exists id " << new_zonegroup.get_id () <<
" skipping conversion " << dendl;
continue;
}
RGWZoneGroup zonegroup(*iter);
zonegroup.set_id(*iter);
- int ret = zonegroup.init(cct, sysobj_svc, y, true, true);
+ int ret = zonegroup.init(dpp, cct, sysobj_svc, y, true, true);
if (ret < 0) {
- ldout(cct, 0) << __func__ << " failed init zonegroup: ret "<< ret << " " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << __func__ << " failed init zonegroup: ret "<< ret << " " << cpp_strerror(-ret) << dendl;
return ret;
}
zonegroup.realm_id = realm->get_id();
/* fix default region master zone */
if (*iter == default_zonegroup_name && zonegroup.master_zone.empty()) {
- ldout(cct, 0) << __func__ << " Setting default zone as master for default region" << dendl;
+ ldpp_dout(dpp, 0) << __func__ << " Setting default zone as master for default region" << dendl;
zonegroup.master_zone = default_zone_name;
}
- ret = zonegroup.update(y);
+ ret = zonegroup.update(dpp, y);
if (ret < 0 && ret != -EEXIST) {
- ldout(cct, 0) << __func__ << " failed to update zonegroup " << *iter << ": ret "<< ret << " " << cpp_strerror(-ret)
+ ldpp_dout(dpp, 0) << __func__ << " failed to update zonegroup " << *iter << ": ret "<< ret << " " << cpp_strerror(-ret)
<< dendl;
return ret;
}
- ret = zonegroup.update_name(y);
+ ret = zonegroup.update_name(dpp, y);
if (ret < 0 && ret != -EEXIST) {
- ldout(cct, 0) << __func__ << " failed to update_name for zonegroup " << *iter << ": ret "<< ret << " " << cpp_strerror(-ret)
+ ldpp_dout(dpp, 0) << __func__ << " failed to update_name for zonegroup " << *iter << ": ret "<< ret << " " << cpp_strerror(-ret)
<< dendl;
return ret;
}
if (zonegroup.get_name() == default_region) {
- ret = zonegroup.set_as_default(y);
+ ret = zonegroup.set_as_default(dpp, y);
if (ret < 0) {
- ldout(cct, 0) << __func__ << " failed to set_as_default " << *iter << ": ret "<< ret << " " << cpp_strerror(-ret)
+ ldpp_dout(dpp, 0) << __func__ << " failed to set_as_default " << *iter << ": ret "<< ret << " " << cpp_strerror(-ret)
<< dendl;
return ret;
}
}
for (auto iter = zonegroup.zones.begin(); iter != zonegroup.zones.end();
++iter) {
- ldout(cct, 0) << __func__ << " Converting zone" << iter->first << dendl;
+ ldpp_dout(dpp, 0) << __func__ << " Converting zone" << iter->first << dendl;
RGWZoneParams zoneparams(iter->first, iter->second.name);
zoneparams.set_id(iter->first.id);
zoneparams.realm_id = realm->get_id();
- ret = zoneparams.init(cct, sysobj_svc, y);
+ ret = zoneparams.init(dpp, cct, sysobj_svc, y);
if (ret < 0 && ret != -ENOENT) {
- ldout(cct, 0) << __func__ << " failed to init zoneparams " << iter->first << ": " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << __func__ << " failed to init zoneparams " << iter->first << ": " << cpp_strerror(-ret) << dendl;
return ret;
} else if (ret == -ENOENT) {
- ldout(cct, 0) << __func__ << " zone is part of another cluster " << iter->first << " skipping " << dendl;
+ ldpp_dout(dpp, 0) << __func__ << " zone is part of another cluster " << iter->first << " skipping " << dendl;
continue;
}
zonegroup.realm_id = realm->get_id();
- ret = zoneparams.update(y);
+ ret = zoneparams.update(dpp, y);
if (ret < 0 && ret != -EEXIST) {
- ldout(cct, 0) << __func__ << " failed to update zoneparams " << iter->first << ": " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << __func__ << " failed to update zoneparams " << iter->first << ": " << cpp_strerror(-ret) << dendl;
return ret;
}
- ret = zoneparams.update_name(y);
+ ret = zoneparams.update_name(dpp, y);
if (ret < 0 && ret != -EEXIST) {
- ldout(cct, 0) << __func__ << " failed to init zoneparams " << iter->first << ": " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << __func__ << " failed to init zoneparams " << iter->first << ": " << cpp_strerror(-ret) << dendl;
return ret;
}
}
if (!current_period->get_id().empty()) {
- ret = current_period->add_zonegroup(zonegroup, y);
+ ret = current_period->add_zonegroup(dpp, zonegroup, y);
if (ret < 0) {
- ldout(cct, 0) << __func__ << " failed to add zonegroup to current_period: " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << __func__ << " failed to add zonegroup to current_period: " << cpp_strerror(-ret) << dendl;
return ret;
}
}
}
if (!current_period->get_id().empty()) {
- ret = current_period->update(y);
+ ret = current_period->update(dpp, y);
if (ret < 0) {
- ldout(cct, 0) << __func__ << " failed to update new period: " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << __func__ << " failed to update new period: " << cpp_strerror(-ret) << dendl;
return ret;
}
- ret = current_period->store_info(false, y);
+ ret = current_period->store_info(dpp, false, y);
if (ret < 0) {
- ldout(cct, 0) << __func__ << " failed to store new period: " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << __func__ << " failed to store new period: " << cpp_strerror(-ret) << dendl;
return ret;
}
- ret = current_period->reflect(y);
+ ret = current_period->reflect(dpp, y);
if (ret < 0) {
- ldout(cct, 0) << __func__ << " failed to update local objects: " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << __func__ << " failed to update local objects: " << cpp_strerror(-ret) << dendl;
return ret;
}
}
for (auto const& iter : regions) {
RGWZoneGroup zonegroup(iter);
- int ret = zonegroup.init(cct, sysobj_svc, y, true, true);
+ int ret = zonegroup.init(dpp, cct, sysobj_svc, y, true, true);
if (ret < 0) {
- ldout(cct, 0) << __func__ << " failed init zonegroup" << iter << ": ret "<< ret << " " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << __func__ << " failed init zonegroup" << iter << ": ret "<< ret << " " << cpp_strerror(-ret) << dendl;
return ret;
}
- ret = zonegroup.delete_obj(y, true);
+ ret = zonegroup.delete_obj(dpp, y, true);
if (ret < 0 && ret != -ENOENT) {
- ldout(cct, 0) << __func__ << " failed to delete region " << iter << ": ret "<< ret << " " << cpp_strerror(-ret)
+ ldpp_dout(dpp, 0) << __func__ << " failed to delete region " << iter << ": ret "<< ret << " " << cpp_strerror(-ret)
<< dendl;
return ret;
}
/* mark as converted */
ret = sysobj.wop()
.set_exclusive(true)
- .write(bl, y);
+ .write(dpp, bl, y);
if (ret < 0 ) {
- ldout(cct, 0) << __func__ << " failed to mark cluster as converted: ret "<< ret << " " << cpp_strerror(-ret)
+ ldpp_dout(dpp, 0) << __func__ << " failed to mark cluster as converted: ret "<< ret << " " << cpp_strerror(-ret)
<< dendl;
return ret;
}
zonegroup_conn_map[zonegroup.get_id()] = new_connection;
}
-int RGWSI_Zone::init_zg_from_period(bool *initialized, optional_yield y)
+int RGWSI_Zone::init_zg_from_period(const DoutPrefixProvider *dpp, bool *initialized, optional_yield y)
{
*initialized = false;
return 0;
}
- int ret = zonegroup->init(cct, sysobj_svc, y);
- ldout(cct, 20) << "period zonegroup init ret " << ret << dendl;
+ int ret = zonegroup->init(dpp, cct, sysobj_svc, y);
+ ldpp_dout(dpp, 20) << "period zonegroup init ret " << ret << dendl;
if (ret == -ENOENT) {
return 0;
}
if (ret < 0) {
- ldout(cct, 0) << "failed reading zonegroup info: " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "failed reading zonegroup info: " << cpp_strerror(-ret) << dendl;
return ret;
}
- ldout(cct, 20) << "period zonegroup name " << zonegroup->get_name() << dendl;
+ ldpp_dout(dpp, 20) << "period zonegroup name " << zonegroup->get_name() << dendl;
map<string, RGWZoneGroup>::const_iterator iter =
current_period->get_map().zonegroups.find(zonegroup->get_id());
if (iter != current_period->get_map().zonegroups.end()) {
- ldout(cct, 20) << "using current period zonegroup " << zonegroup->get_name() << dendl;
+ ldpp_dout(dpp, 20) << "using current period zonegroup " << zonegroup->get_name() << dendl;
*zonegroup = iter->second;
- ret = zonegroup->init(cct, sysobj_svc, y, false);
+ ret = zonegroup->init(dpp, cct, sysobj_svc, y, false);
if (ret < 0) {
- ldout(cct, 0) << "failed init zonegroup: " << " " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "failed init zonegroup: " << " " << cpp_strerror(-ret) << dendl;
return ret;
}
- ret = zone_params->init(cct, sysobj_svc, y);
+ ret = zone_params->init(dpp, cct, sysobj_svc, y);
if (ret < 0 && ret != -ENOENT) {
- ldout(cct, 0) << "failed reading zone params info: " << " " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "failed reading zone params info: " << " " << cpp_strerror(-ret) << dendl;
return ret;
} if (ret ==-ENOENT && zonegroup->get_name() == default_zonegroup_name) {
- ldout(cct, 10) << " Using default name "<< default_zone_name << dendl;
+ ldpp_dout(dpp, 10) << " Using default name "<< default_zone_name << dendl;
zone_params->set_name(default_zone_name);
- ret = zone_params->init(cct, sysobj_svc, y);
+ ret = zone_params->init(dpp, cct, sysobj_svc, y);
if (ret < 0 && ret != -ENOENT) {
- ldout(cct, 0) << "failed reading zone params info: " << " " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "failed reading zone params info: " << " " << cpp_strerror(-ret) << dendl;
return ret;
}
}
// fix missing master zone for a single zone zonegroup
if (zg.master_zone.empty() && zg.zones.size() == 1) {
master = zg.zones.begin();
- ldout(cct, 0) << "zonegroup " << zg.get_name() << " missing master_zone, setting zone " <<
+ ldpp_dout(dpp, 0) << "zonegroup " << zg.get_name() << " missing master_zone, setting zone " <<
master->second.name << " id:" << master->second.id << " as master" << dendl;
if (zonegroup->get_id() == zg.get_id()) {
zonegroup->master_zone = master->second.id;
- ret = zonegroup->update(y);
+ ret = zonegroup->update(dpp, y);
if (ret < 0) {
- ldout(cct, 0) << "error updating zonegroup : " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "error updating zonegroup : " << cpp_strerror(-ret) << dendl;
return ret;
}
} else {
RGWZoneGroup fixed_zg(zg.get_id(),zg.get_name());
- ret = fixed_zg.init(cct, sysobj_svc, y);
+ ret = fixed_zg.init(dpp, cct, sysobj_svc, y);
if (ret < 0) {
- ldout(cct, 0) << "error initializing zonegroup : " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "error initializing zonegroup : " << cpp_strerror(-ret) << dendl;
return ret;
}
fixed_zg.master_zone = master->second.id;
- ret = fixed_zg.update(y);
+ ret = fixed_zg.update(dpp, y);
if (ret < 0) {
- ldout(cct, 0) << "error initializing zonegroup : " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "error initializing zonegroup : " << cpp_strerror(-ret) << dendl;
return ret;
}
}
} else {
- ldout(cct, 0) << "zonegroup " << zg.get_name() << " missing zone for master_zone=" <<
+ ldpp_dout(dpp, 0) << "zonegroup " << zg.get_name() << " missing zone for master_zone=" <<
zg.master_zone << dendl;
return -EINVAL;
}
return 0;
}
-int RGWSI_Zone::init_zg_from_local(bool *creating_defaults, optional_yield y)
+int RGWSI_Zone::init_zg_from_local(const DoutPrefixProvider *dpp, bool *creating_defaults, optional_yield y)
{
- int ret = zonegroup->init(cct, sysobj_svc, y);
+ int ret = zonegroup->init(dpp, cct, sysobj_svc, y);
if ( (ret < 0 && ret != -ENOENT) || (ret == -ENOENT && !cct->_conf->rgw_zonegroup.empty())) {
- ldout(cct, 0) << "failed reading zonegroup info: ret "<< ret << " " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "failed reading zonegroup info: ret "<< ret << " " << cpp_strerror(-ret) << dendl;
return ret;
} else if (ret == -ENOENT) {
*creating_defaults = true;
- ldout(cct, 10) << "Creating default zonegroup " << dendl;
- ret = zonegroup->create_default(y);
+ ldpp_dout(dpp, 10) << "Creating default zonegroup " << dendl;
+ ret = zonegroup->create_default(dpp, y);
if (ret < 0) {
- ldout(cct, 0) << "failure in zonegroup create_default: ret "<< ret << " " << cpp_strerror(-ret)
+ ldpp_dout(dpp, 0) << "failure in zonegroup create_default: ret "<< ret << " " << cpp_strerror(-ret)
<< dendl;
return ret;
}
- ret = zonegroup->init(cct, sysobj_svc, y);
+ ret = zonegroup->init(dpp, cct, sysobj_svc, y);
if (ret < 0) {
- ldout(cct, 0) << "failure in zonegroup create_default: ret "<< ret << " " << cpp_strerror(-ret)
+ ldpp_dout(dpp, 0) << "failure in zonegroup create_default: ret "<< ret << " " << cpp_strerror(-ret)
<< dendl;
return ret;
}
}
- ldout(cct, 20) << "zonegroup " << zonegroup->get_name() << dendl;
+ ldpp_dout(dpp, 20) << "zonegroup " << zonegroup->get_name() << dendl;
if (zonegroup->is_master_zonegroup()) {
// use endpoints from the zonegroup's master zone
auto master = zonegroup->zones.find(zonegroup->master_zone);
// fix missing master zone for a single zone zonegroup
if (zonegroup->master_zone.empty() && zonegroup->zones.size() == 1) {
master = zonegroup->zones.begin();
- ldout(cct, 0) << "zonegroup " << zonegroup->get_name() << " missing master_zone, setting zone " <<
+ ldpp_dout(dpp, 0) << "zonegroup " << zonegroup->get_name() << " missing master_zone, setting zone " <<
master->second.name << " id:" << master->second.id << " as master" << dendl;
zonegroup->master_zone = master->second.id;
- ret = zonegroup->update(y);
+ ret = zonegroup->update(dpp, y);
if (ret < 0) {
- ldout(cct, 0) << "error initializing zonegroup : " << cpp_strerror(-ret) << dendl;
+ ldpp_dout(dpp, 0) << "error initializing zonegroup : " << cpp_strerror(-ret) << dendl;
return ret;
}
} else {
- ldout(cct, 0) << "zonegroup " << zonegroup->get_name() << " missing zone for "
+ ldpp_dout(dpp, 0) << "zonegroup " << zonegroup->get_name() << " missing zone for "
"master_zone=" << zonegroup->master_zone << dendl;
return -EINVAL;
}
return 0;
}
-int RGWSI_Zone::convert_regionmap(optional_yield y)
+int RGWSI_Zone::convert_regionmap(const DoutPrefixProvider *dpp, optional_yield y)
{
RGWZoneGroupMap zonegroupmap;
RGWSysObjectCtx obj_ctx = sysobj_svc->init_obj_ctx();
RGWSysObj sysobj = sysobj_svc->get_obj(obj_ctx, rgw_raw_obj(pool, oid));
- int ret = sysobj.rop().read(&bl, y);
+ int ret = sysobj.rop().read(dpp, &bl, y);
if (ret < 0 && ret != -ENOENT) {
return ret;
} else if (ret == -ENOENT) {
auto iter = bl.cbegin();
decode(zonegroupmap, iter);
} catch (buffer::error& err) {
- ldout(cct, 0) << "error decoding regionmap from " << pool << ":" << oid << dendl;
+ ldpp_dout(dpp, 0) << "error decoding regionmap from " << pool << ":" << oid << dendl;
return -EIO;
}
for (map<string, RGWZoneGroup>::iterator iter = zonegroupmap.zonegroups.begin();
iter != zonegroupmap.zonegroups.end(); ++iter) {
RGWZoneGroup& zonegroup = iter->second;
- ret = zonegroup.init(cct, sysobj_svc, y, false);
- ret = zonegroup.update(y);
+ ret = zonegroup.init(dpp, cct, sysobj_svc, y, false);
+ ret = zonegroup.update(dpp, y);
if (ret < 0 && ret != -ENOENT) {
- ldout(cct, 0) << "Error could not update zonegroup " << zonegroup.get_name() << ": " <<
+ ldpp_dout(dpp, 0) << "Error could not update zonegroup " << zonegroup.get_name() << ": " <<
cpp_strerror(-ret) << dendl;
return ret;
} else if (ret == -ENOENT) {
- ret = zonegroup.create(y);
+ ret = zonegroup.create(dpp, y);
if (ret < 0) {
- ldout(cct, 0) << "Error could not create " << zonegroup.get_name() << ": " <<
+ ldpp_dout(dpp, 0) << "Error could not create " << zonegroup.get_name() << ": " <<
cpp_strerror(-ret) << dendl;
return ret;
}
current_period->set_bucket_quota(zonegroupmap.bucket_quota);
// remove the region_map so we don't try to convert again
- ret = sysobj.wop().remove(y);
+ ret = sysobj.wop().remove(dpp, y);
if (ret < 0) {
- ldout(cct, 0) << "Error could not remove " << sysobj.get_obj()
+ ldpp_dout(dpp, 0) << "Error could not remove " << sysobj.get_obj()
<< " after upgrading to zonegroup map: " << cpp_strerror(ret) << dendl;
return ret;
}
}
-int RGWSI_Zone::select_new_bucket_location(const RGWUserInfo& user_info, const string& zonegroup_id,
+int RGWSI_Zone::select_new_bucket_location(const DoutPrefixProvider *dpp, const RGWUserInfo& user_info, const string& zonegroup_id,
const rgw_placement_rule& request_rule,
rgw_placement_rule *pselected_rule_name, RGWZonePlacementInfo *rule_info,
optional_yield y)
RGWZoneGroup zonegroup;
int ret = get_zonegroup(zonegroup_id, zonegroup);
if (ret < 0) {
- ldout(cct, 0) << "could not find zonegroup " << zonegroup_id << " in current period" << dendl;
+ ldpp_dout(dpp, 0) << "could not find zonegroup " << zonegroup_id << " in current period" << dendl;
return ret;
}
used_rule = &request_rule;
titer = zonegroup.placement_targets.find(request_rule.name);
if (titer == zonegroup.placement_targets.end()) {
- ldout(cct, 0) << "could not find requested placement id " << request_rule
+ ldpp_dout(dpp, 0) << "could not find requested placement id " << request_rule
<< " within zonegroup " << dendl;
return -ERR_INVALID_LOCATION_CONSTRAINT;
}
used_rule = &user_info.default_placement;
titer = zonegroup.placement_targets.find(user_info.default_placement.name);
if (titer == zonegroup.placement_targets.end()) {
- ldout(cct, 0) << "could not find user default placement id " << user_info.default_placement
+ ldpp_dout(dpp, 0) << "could not find user default placement id " << user_info.default_placement
<< " within zonegroup " << dendl;
return -ERR_INVALID_LOCATION_CONSTRAINT;
}
} else {
if (zonegroup.default_placement.name.empty()) { // zonegroup default rule as fallback, it should not be empty.
- ldout(cct, 0) << "misconfiguration, zonegroup default placement id should not be empty." << dendl;
+ ldpp_dout(dpp, 0) << "misconfiguration, zonegroup default placement id should not be empty." << dendl;
return -ERR_ZONEGROUP_DEFAULT_PLACEMENT_MISCONFIGURATION;
} else {
used_rule = &zonegroup.default_placement;
titer = zonegroup.placement_targets.find(zonegroup.default_placement.name);
if (titer == zonegroup.placement_targets.end()) {
- ldout(cct, 0) << "could not find zonegroup default placement id " << zonegroup.default_placement
+ ldpp_dout(dpp, 0) << "could not find zonegroup default placement id " << zonegroup.default_placement
<< " within zonegroup " << dendl;
return -ERR_INVALID_LOCATION_CONSTRAINT;
}
/* now check tag for the rule, whether user is permitted to use rule */
const auto& target_rule = titer->second;
if (!target_rule.user_permitted(user_info.placement_tags)) {
- ldout(cct, 0) << "user not permitted to use placement rule " << titer->first << dendl;
+ ldpp_dout(dpp, 0) << "user not permitted to use placement rule " << titer->first << dendl;
return -EPERM;
}
*pselected_rule_name = rule;
}
- return select_bucket_location_by_rule(rule, rule_info, y);
+ return select_bucket_location_by_rule(dpp, rule, rule_info, y);
}
-int RGWSI_Zone::select_bucket_location_by_rule(const rgw_placement_rule& location_rule, RGWZonePlacementInfo *rule_info, optional_yield y)
+int RGWSI_Zone::select_bucket_location_by_rule(const DoutPrefixProvider *dpp, const rgw_placement_rule& location_rule, RGWZonePlacementInfo *rule_info, optional_yield y)
{
if (location_rule.name.empty()) {
/* we can only reach here if we're trying to set a bucket location from a bucket
* created on a different zone, using a legacy / default pool configuration
*/
if (rule_info) {
- return select_legacy_bucket_placement(rule_info, y);
+ return select_legacy_bucket_placement(dpp, rule_info, y);
}
return 0;
auto piter = zone_params->placement_pools.find(location_rule.name);
if (piter == zone_params->placement_pools.end()) {
/* couldn't find, means we cannot really place data for this bucket in this zone */
- ldout(cct, 0) << "ERROR: This zone does not contain placement rule "
+ ldpp_dout(dpp, 0) << "ERROR: This zone does not contain placement rule "
<< location_rule << " present in the zonegroup!" << dendl;
return -EINVAL;
}
auto storage_class = location_rule.get_storage_class();
if (!piter->second.storage_class_exists(storage_class)) {
- ldout(cct, 5) << "requested storage class does not exist: " << storage_class << dendl;
+ ldpp_dout(dpp, 5) << "requested storage class does not exist: " << storage_class << dendl;
return -EINVAL;
}
return 0;
}
-int RGWSI_Zone::select_bucket_placement(const RGWUserInfo& user_info, const string& zonegroup_id,
+int RGWSI_Zone::select_bucket_placement(const DoutPrefixProvider *dpp, const RGWUserInfo& user_info, const string& zonegroup_id,
const rgw_placement_rule& placement_rule,
rgw_placement_rule *pselected_rule, RGWZonePlacementInfo *rule_info,
optional_yield y)
{
if (!zone_params->placement_pools.empty()) {
- return select_new_bucket_location(user_info, zonegroup_id, placement_rule,
+ return select_new_bucket_location(dpp, user_info, zonegroup_id, placement_rule,
pselected_rule, rule_info, y);
}
}
if (rule_info) {
- return select_legacy_bucket_placement(rule_info, y);
+ return select_legacy_bucket_placement(dpp, rule_info, y);
}
return 0;
}
-int RGWSI_Zone::select_legacy_bucket_placement(RGWZonePlacementInfo *rule_info,
+int RGWSI_Zone::select_legacy_bucket_placement(const DoutPrefixProvider *dpp, RGWZonePlacementInfo *rule_info,
optional_yield y)
{
bufferlist map_bl;
auto obj_ctx = sysobj_svc->init_obj_ctx();
auto sysobj = obj_ctx.get_obj(obj);
- int ret = sysobj.rop().read(&map_bl, y);
+ int ret = sysobj.rop().read(dpp, &map_bl, y);
if (ret < 0) {
goto read_omap;
}
auto iter = map_bl.cbegin();
decode(m, iter);
} catch (buffer::error& err) {
- ldout(cct, 0) << "ERROR: couldn't decode avail_pools" << dendl;
+ ldpp_dout(dpp, 0) << "ERROR: couldn't decode avail_pools" << dendl;
}
read_omap:
if (m.empty()) {
- ret = sysobj.omap().get_all(&m, y);
+ ret = sysobj.omap().get_all(dpp, &m, y);
write_map = true;
}
ret = rados_svc->pool().create(pools, &retcodes);
if (ret < 0)
return ret;
- ret = sysobj.omap().set(s, bl, y);
+ ret = sysobj.omap().set(dpp, s, bl, y);
if (ret < 0)
return ret;
m[s] = bl;
if (write_map) {
bufferlist new_bl;
encode(m, new_bl);
- ret = sysobj.wop().write(new_bl, y);
+ ret = sysobj.wop().write(dpp, new_bl, y);
if (ret < 0) {
- ldout(cct, 0) << "WARNING: could not save avail pools map info ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "WARNING: could not save avail pools map info ret=" << ret << dendl;
}
}
return 0;
}
-int RGWSI_Zone::update_placement_map(optional_yield y)
+int RGWSI_Zone::update_placement_map(const DoutPrefixProvider *dpp, optional_yield y)
{
bufferlist header;
map<string, bufferlist> m;
auto obj_ctx = sysobj_svc->init_obj_ctx();
auto sysobj = obj_ctx.get_obj(obj);
- int ret = sysobj.omap().get_all(&m, y);
+ int ret = sysobj.omap().get_all(dpp, &m, y);
if (ret < 0)
return ret;
bufferlist new_bl;
encode(m, new_bl);
- ret = sysobj.wop().write(new_bl, y);
+ ret = sysobj.wop().write(dpp, new_bl, y);
if (ret < 0) {
- ldout(cct, 0) << "WARNING: could not save avail pools map info ret=" << ret << dendl;
+ ldpp_dout(dpp, 0) << "WARNING: could not save avail pools map info ret=" << ret << dendl;
}
return ret;
}
-int RGWSI_Zone::add_bucket_placement(const rgw_pool& new_pool, optional_yield y)
+int RGWSI_Zone::add_bucket_placement(const DoutPrefixProvider *dpp, const rgw_pool& new_pool, optional_yield y)
{
int ret = rados_svc->pool(new_pool).lookup();
if (ret < 0) { // DNE, or something
auto sysobj = obj_ctx.get_obj(obj);
bufferlist empty_bl;
- ret = sysobj.omap().set(new_pool.to_str(), empty_bl, y);
+ ret = sysobj.omap().set(dpp, new_pool.to_str(), empty_bl, y);
// don't care about return value
- update_placement_map(y);
+ update_placement_map(dpp, y);
return ret;
}
-int RGWSI_Zone::remove_bucket_placement(const rgw_pool& old_pool, optional_yield y)
+int RGWSI_Zone::remove_bucket_placement(const DoutPrefixProvider *dpp, const rgw_pool& old_pool, optional_yield y)
{
rgw_raw_obj obj(zone_params->domain_root, avail_pools);
auto obj_ctx = sysobj_svc->init_obj_ctx();
auto sysobj = obj_ctx.get_obj(obj);
- int ret = sysobj.omap().del(old_pool.to_str(), y);
+ int ret = sysobj.omap().del(dpp, old_pool.to_str(), y);
// don't care about return value
- update_placement_map(y);
+ update_placement_map(dpp, y);
return ret;
}
-int RGWSI_Zone::list_placement_set(set<rgw_pool>& names, optional_yield y)
+int RGWSI_Zone::list_placement_set(const DoutPrefixProvider *dpp, set<rgw_pool>& names, optional_yield y)
{
bufferlist header;
map<string, bufferlist> m;
rgw_raw_obj obj(zone_params->domain_root, avail_pools);
auto obj_ctx = sysobj_svc->init_obj_ctx();
auto sysobj = obj_ctx.get_obj(obj);
- int ret = sysobj.omap().get_all(&m, y);
+ int ret = sysobj.omap().get_all(dpp, &m, y);
if (ret < 0)
return ret;
RGWSI_RADOS *_rados_svc,
RGWSI_SyncModules *_sync_modules_svc,
RGWSI_Bucket_Sync *_bucket_sync_svc);
- int do_start(optional_yield y) override;
+ int do_start(optional_yield y, const DoutPrefixProvider *dpp) override;
void shutdown() override;
- int replace_region_with_zonegroup(optional_yield y);
- int init_zg_from_period(bool *initialized, optional_yield y);
- int init_zg_from_local(bool *creating_defaults, optional_yield y);
- int convert_regionmap(optional_yield y);
+ int replace_region_with_zonegroup(const DoutPrefixProvider *dpp, optional_yield y);
+ int init_zg_from_period(const DoutPrefixProvider *dpp, bool *initialized, optional_yield y);
+ int init_zg_from_local(const DoutPrefixProvider *dpp, bool *creating_defaults, optional_yield y);
+ int convert_regionmap(const DoutPrefixProvider *dpp, optional_yield y);
- int update_placement_map(optional_yield y);
+ int update_placement_map(const DoutPrefixProvider *dpp, optional_yield y);
public:
RGWSI_Zone(CephContext *cct);
~RGWSI_Zone();
RGWRESTConn *get_zone_conn_by_name(const string& name);
bool find_zone_id_by_name(const string& name, rgw_zone_id *id);
- int select_bucket_placement(const RGWUserInfo& user_info, const string& zonegroup_id,
+ int select_bucket_placement(const DoutPrefixProvider *dpp, const RGWUserInfo& user_info, const string& zonegroup_id,
const rgw_placement_rule& rule,
rgw_placement_rule *pselected_rule, RGWZonePlacementInfo *rule_info, optional_yield y);
- int select_legacy_bucket_placement(RGWZonePlacementInfo *rule_info, optional_yield y);
- int select_new_bucket_location(const RGWUserInfo& user_info, const string& zonegroup_id,
+ int select_legacy_bucket_placement(const DoutPrefixProvider *dpp, RGWZonePlacementInfo *rule_info, optional_yield y);
+ int select_new_bucket_location(const DoutPrefixProvider *dpp, const RGWUserInfo& user_info, const string& zonegroup_id,
const rgw_placement_rule& rule,
rgw_placement_rule *pselected_rule_name, RGWZonePlacementInfo *rule_info,
optional_yield y);
- int select_bucket_location_by_rule(const rgw_placement_rule& location_rule, RGWZonePlacementInfo *rule_info, optional_yield y);
+ int select_bucket_location_by_rule(const DoutPrefixProvider *dpp, const rgw_placement_rule& location_rule, RGWZonePlacementInfo *rule_info, optional_yield y);
- int add_bucket_placement(const rgw_pool& new_pool, optional_yield y);
- int remove_bucket_placement(const rgw_pool& old_pool, optional_yield y);
- int list_placement_set(set<rgw_pool>& names, optional_yield y);
+ int add_bucket_placement(const DoutPrefixProvider *dpp, const rgw_pool& new_pool, optional_yield y);
+ int remove_bucket_placement(const DoutPrefixProvider *dpp, const rgw_pool& old_pool, optional_yield y);
+ int list_placement_set(const DoutPrefixProvider *dpp, set<rgw_pool>& names, optional_yield y);
bool is_meta_master() const;
bool can_reshard() const;
bool is_syncing_bucket_meta(const rgw_bucket& bucket);
- int list_zonegroups(list<string>& zonegroups);
- int list_regions(list<string>& regions);
- int list_zones(list<string>& zones);
- int list_realms(list<string>& realms);
- int list_periods(list<string>& periods);
- int list_periods(const string& current_period, list<string>& periods, optional_yield y);
+ int list_zonegroups(const DoutPrefixProvider *dpp, list<string>& zonegroups);
+ int list_regions(const DoutPrefixProvider *dpp, list<string>& regions);
+ int list_zones(const DoutPrefixProvider *dpp, list<string>& zones);
+ int list_realms(const DoutPrefixProvider *dpp, list<string>& realms);
+ int list_periods(const DoutPrefixProvider *dpp, list<string>& periods);
+ int list_periods(const DoutPrefixProvider *dpp, const string& current_period, list<string>& periods, optional_yield y);
};
#include "rgw/rgw_zone.h"
-int RGWSI_ZoneUtils::do_start(optional_yield)
+int RGWSI_ZoneUtils::do_start(optional_yield, const DoutPrefixProvider *dpp)
{
init_unique_trans_id_deps();
zone_svc = _zone_svc;
}
- int do_start(optional_yield) override;
+ int do_start(optional_yield, const DoutPrefixProvider *dpp) override;
void init_unique_trans_id_deps();
add_definitions(-DROCKSDB_SCHED_GETCPU_PRESENT)
endif()
+check_cxx_symbol_exists(getauxval auvx.h HAVE_AUXV_GETAUXVAL)
+if(HAVE_AUXV_GETAUXVAL)
+ add_definitions(-DROCKSDB_AUXV_GETAUXVAL_PRESENT)
+endif()
+
include_directories(${PROJECT_SOURCE_DIR})
include_directories(${PROJECT_SOURCE_DIR}/include)
include_directories(SYSTEM ${PROJECT_SOURCE_DIR}/third-party/gtest-1.8.1/fused-src)
fi
fi
+ if ! test $ROCKSDB_DISABLE_AUXV_GETAUXVAL; then
+ # Test whether getauxval is supported
+ $CXX $CFLAGS -x c++ - -o /dev/null 2>/dev/null <<EOF
+ #include <sys/auxv.h>
+ int main() {
+ uint64_t auxv = getauxval(AT_HWCAP);
+ (void)auxv;
+ }
+EOF
+ if [ "$?" = 0 ]; then
+ COMMON_FLAGS="$COMMON_FLAGS -DROCKSDB_AUXV_GETAUXVAL_PRESENT"
+ fi
+ fi
+
if ! test $ROCKSDB_DISABLE_ALIGNED_NEW; then
# Test whether c++17 aligned-new is supported
$CXX $PLATFORM_CXXFLAGS -faligned-new -x c++ - -o /dev/null 2>/dev/null <<EOF
#include "util/crc32c_ppc_constants.h"
#if __linux__
+#ifdef ROCKSDB_AUXV_GETAUXVAL_PRESENT
#include <sys/auxv.h>
+#endif
#ifndef PPC_FEATURE2_VEC_CRYPTO
#define PPC_FEATURE2_VEC_CRYPTO 0x02000000
#endif
+#if defined(__linux__) && defined(HAVE_ARM64_CRC)
+bool pmull_runtime_flag = false;
+#endif
+
namespace ROCKSDB_NAMESPACE {
namespace crc32c {
static int arch_ppc_probe(void) {
arch_ppc_crc32 = 0;
-#if defined(__powerpc64__)
+#if defined(__powerpc64__) && defined(ROCKSDB_AUXV_GETAUXVAL_PRESENT)
if (getauxval(AT_HWCAP2) & PPC_FEATURE2_VEC_CRYPTO) arch_ppc_crc32 = 1;
#endif /* __powerpc64__ */
if (crc32c_runtime_check()) {
has_fast_crc = true;
arch = "Arm64";
+ pmull_runtime_flag = crc32c_pmull_runtime_check();
} else {
has_fast_crc = false;
arch = "Arm64";
return isAltiVec() ? ExtendPPCImpl : ExtendImpl<Slow_CRC32>;
#elif defined(__linux__) && defined(HAVE_ARM64_CRC)
if(crc32c_runtime_check()) {
+ pmull_runtime_flag = crc32c_pmull_runtime_check();
return ExtendARMImpl;
} else {
return ExtendImpl<Slow_CRC32>;
#if defined(__linux__) && defined(HAVE_ARM64_CRC)
#include <asm/hwcap.h>
+#ifdef ROCKSDB_AUXV_GETAUXVAL_PRESENT
#include <sys/auxv.h>
+#endif
#ifndef HWCAP_CRC32
#define HWCAP_CRC32 (1 << 7)
#endif
+#ifndef HWCAP_PMULL
+#define HWCAP_PMULL (1 << 4)
+#endif
#ifdef HAVE_ARM64_CRYPTO
/* unfolding to compute 8 * 3 = 24 bytes parallelly */
} while (0)
#endif
+extern bool pmull_runtime_flag;
+
uint32_t crc32c_runtime_check(void) {
+#ifdef ROCKSDB_AUXV_GETAUXVAL_PRESENT
uint64_t auxv = getauxval(AT_HWCAP);
return (auxv & HWCAP_CRC32) != 0;
+#else
+ return 0;
+#endif
}
+bool crc32c_pmull_runtime_check(void) {
+#ifdef ROCKSDB_AUXV_GETAUXVAL_PRESENT
+ uint64_t auxv = getauxval(AT_HWCAP);
+ return (auxv & HWCAP_PMULL) != 0;
+#else
+ return false;
+#endif
+}
+
+#ifdef ROCKSDB_UBSAN_RUN
+#if defined(__clang__)
+__attribute__((__no_sanitize__("alignment")))
+#elif defined(__GNUC__)
+__attribute__((__no_sanitize_undefined__))
+#endif
+#endif
uint32_t crc32c_arm64(uint32_t crc, unsigned char const *data,
unsigned len) {
const uint8_t *buf8;
int length = (int)len;
crc ^= 0xffffffff;
+ /*
+ * Pmull runtime check here.
+ * Raspberry Pi supports crc32 but doesn't support pmull.
+ * Skip Crc32c Parallel computation if no crypto extension available.
+ */
+ if (pmull_runtime_flag) {
+/* Macro (HAVE_ARM64_CRYPTO) is used for compiling check */
#ifdef HAVE_ARM64_CRYPTO
/* Crc32c Parallel computation
* Algorithm comes from Intel whitepaper:
* One Block: 42(BLK_LENGTH) * 8(step length: crc32c_u64) bytes
*/
#define BLK_LENGTH 42
- while (length >= 1024) {
- uint64_t t0, t1;
- uint32_t crc0 = 0, crc1 = 0, crc2 = 0;
-
- /* Parallel Param:
- * k0 = CRC32(x ^ (42 * 8 * 8 * 2 - 1));
- * k1 = CRC32(x ^ (42 * 8 * 8 - 1));
- */
- uint32_t k0 = 0xe417f38a, k1 = 0x8f158014;
-
- /* Prefetch data for following block to avoid cache miss */
- PREF1KL1((uint8_t *)buf64, 1024);
-
- /* First 8 byte for better pipelining */
- crc0 = crc32c_u64(crc, *buf64++);
-
- /* 3 blocks crc32c parallel computation
- * Macro unfolding to compute parallelly
- * 168 * 6 = 1008 (bytes)
- */
- CRC32C7X24BYTES(0);
- CRC32C7X24BYTES(1);
- CRC32C7X24BYTES(2);
- CRC32C7X24BYTES(3);
- CRC32C7X24BYTES(4);
- CRC32C7X24BYTES(5);
- buf64 += (BLK_LENGTH * 3);
-
- /* Last 8 bytes */
- crc = crc32c_u64(crc2, *buf64++);
-
- t0 = (uint64_t)vmull_p64(crc0, k0);
- t1 = (uint64_t)vmull_p64(crc1, k1);
-
- /* Merge (crc0, crc1, crc2) -> crc */
- crc1 = crc32c_u64(0, t1);
- crc ^= crc1;
- crc0 = crc32c_u64(0, t0);
- crc ^= crc0;
-
- length -= 1024;
- }
-
- if (length == 0) return crc ^ (0xffffffffU);
+ while (length >= 1024) {
+ uint64_t t0, t1;
+ uint32_t crc0 = 0, crc1 = 0, crc2 = 0;
+
+ /* Parallel Param:
+ * k0 = CRC32(x ^ (42 * 8 * 8 * 2 - 1));
+ * k1 = CRC32(x ^ (42 * 8 * 8 - 1));
+ */
+ uint32_t k0 = 0xe417f38a, k1 = 0x8f158014;
+
+ /* Prefetch data for following block to avoid cache miss */
+ PREF1KL1((uint8_t *)buf64, 1024);
+
+ /* First 8 byte for better pipelining */
+ crc0 = crc32c_u64(crc, *buf64++);
+
+ /* 3 blocks crc32c parallel computation
+ * Macro unfolding to compute parallelly
+ * 168 * 6 = 1008 (bytes)
+ */
+ CRC32C7X24BYTES(0);
+ CRC32C7X24BYTES(1);
+ CRC32C7X24BYTES(2);
+ CRC32C7X24BYTES(3);
+ CRC32C7X24BYTES(4);
+ CRC32C7X24BYTES(5);
+ buf64 += (BLK_LENGTH * 3);
+
+ /* Last 8 bytes */
+ crc = crc32c_u64(crc2, *buf64++);
+
+ t0 = (uint64_t)vmull_p64(crc0, k0);
+ t1 = (uint64_t)vmull_p64(crc1, k1);
+
+ /* Merge (crc0, crc1, crc2) -> crc */
+ crc1 = crc32c_u64(0, t1);
+ crc ^= crc1;
+ crc0 = crc32c_u64(0, t0);
+ crc ^= crc0;
+
+ length -= 1024;
+ }
+
+ if (length == 0) return crc ^ (0xffffffffU);
#endif
+ } // if Pmull runtime check here
+
buf8 = (const uint8_t *)buf64;
while (length >= 8) {
crc = crc32c_u64(crc, *(const uint64_t *)buf8);
extern uint32_t crc32c_arm64(uint32_t crc, unsigned char const *data, unsigned len);
extern uint32_t crc32c_runtime_check(void);
+extern bool crc32c_pmull_runtime_check(void);
#ifdef __ARM_FEATURE_CRYPTO
#define HAVE_ARM64_CRYPTO
uint64_t num_objs = 35;
for (uint64_t i = 0; i < num_objs; i++) {
- string obj = str_int("obj", i);
+ string obj = str_int(i % 4 ? "obj" : "об'єкт", i);
string tag = str_int("tag", i);
string loc = str_int("loc", i);
index_prepare(ioctx, bucket_oid, CLS_RGW_OP_ADD, tag, obj, loc,
ret = cls_rgw_bi_list(ioctx, bucket_oid, name, marker, num_objs + 10, &entries,
&is_truncated);
ASSERT_EQ(ret, 0);
- if (cct->_conf->osd_max_omap_entries_per_request < num_objs) {
- ASSERT_EQ(entries.size(), cct->_conf->osd_max_omap_entries_per_request);
+ if (is_truncated) {
+ ASSERT_LT(entries.size(), num_objs);
} else {
ASSERT_EQ(entries.size(), num_objs);
}
&is_truncated);
ASSERT_EQ(ret, 0);
if (is_truncated) {
- ASSERT_EQ(entries.size(),
- std::min(max, cct->_conf->osd_max_omap_entries_per_request));
+ ASSERT_LT(entries.size(), num_objs - num_entries);
} else {
ASSERT_EQ(entries.size(), num_objs - num_entries);
}
&is_truncated);
ASSERT_EQ(ret, 0);
if (is_truncated) {
- ASSERT_EQ(entries.size(), cct->_conf->osd_max_omap_entries_per_request);
+ ASSERT_LT(entries.size(), num_objs - num_entries);
} else {
ASSERT_EQ(entries.size(), num_objs - num_entries);
}
fd = ceph_open(cmount, c_path, O_RDONLY, 0666);
ASSERT_LT(0, fd);
-
ASSERT_EQ(0, ceph_close(cmount, fd));
+
+ // cleanup
+ ASSERT_EQ(0, ceph_unlink(cmount, c_path));
+ ASSERT_EQ(0, ceph_rmdir(cmount, c_dir));
+
ceph_shutdown(cmount);
}
ASSERT_EQ(ceph_closedir(cmount, ls_dir), 0);
+ // cleanup
+ for(i = 0; i < r; ++i) {
+ sprintf(bazstr, "dir_ls%d/dirf%d", mypid, i);
+ ASSERT_EQ(0, ceph_unlink(cmount, bazstr));
+ }
+ ASSERT_EQ(0, ceph_rmdir(cmount, foostr));
+
ceph_shutdown(cmount);
}
ceph_shutdown(cmount);
}
+TEST(LibCephFS, LookupInoMDSDir) {
+ struct ceph_mount_info *cmount;
+ ASSERT_EQ(ceph_create(&cmount, NULL), 0);
+ ASSERT_EQ(ceph_conf_read_file(cmount, NULL), 0);
+ ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL));
+ ASSERT_EQ(ceph_mount(cmount, NULL), 0);
+
+ Inode *inode;
+ auto ino = inodeno_t(0x100); /* rank 0 ~mdsdir */
+ ASSERT_EQ(-ESTALE, ceph_ll_lookup_inode(cmount, ino, &inode));
+ ino = inodeno_t(0x600); /* rank 0 first stray dir */
+ ASSERT_EQ(-ESTALE, ceph_ll_lookup_inode(cmount, ino, &inode));
+
+ ceph_shutdown(cmount);
+}
+
TEST(LibCephFS, LookupVino) {
struct ceph_mount_info *cmount;
ASSERT_EQ(ceph_create(&cmount, NULL), 0);
ceph_shutdown(cmount);
}
+
+TEST(LibCephFS, Openat) {
+ pid_t mypid = getpid();
+ struct ceph_mount_info *cmount;
+ ASSERT_EQ(0, ceph_create(&cmount, NULL));
+ ASSERT_EQ(0, ceph_conf_read_file(cmount, NULL));
+ ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL));
+ ASSERT_EQ(0, ceph_mount(cmount, "/"));
+
+ char c_rel_dir[64];
+ char c_dir[128];
+ sprintf(c_rel_dir, "open_test_%d", mypid);
+ sprintf(c_dir, "/%s", c_rel_dir);
+ ASSERT_EQ(0, ceph_mkdir(cmount, c_dir, 0777));
+
+ int root_fd = ceph_open(cmount, "/", O_DIRECTORY | O_RDONLY, 0);
+ ASSERT_LE(0, root_fd);
+
+ int dir_fd = ceph_openat(cmount, root_fd, c_rel_dir, O_DIRECTORY | O_RDONLY, 0);
+ ASSERT_LE(0, dir_fd);
+
+ struct ceph_statx stx;
+ ASSERT_EQ(ceph_statxat(cmount, root_fd, c_rel_dir, &stx, 0, 0), 0);
+ ASSERT_EQ(stx.stx_mode & S_IFMT, S_IFDIR);
+
+ char c_rel_path[64];
+ char c_path[256];
+ sprintf(c_rel_path, "created_file_%d", mypid);
+ sprintf(c_path, "%s/created_file_%d", c_dir, mypid);
+ int file_fd = ceph_openat(cmount, dir_fd, c_rel_path, O_RDONLY | O_CREAT, 0666);
+ ASSERT_LE(0, file_fd);
+
+ ASSERT_EQ(ceph_statxat(cmount, dir_fd, c_rel_path, &stx, 0, 0), 0);
+ ASSERT_EQ(stx.stx_mode & S_IFMT, S_IFREG);
+
+ ASSERT_EQ(0, ceph_close(cmount, file_fd));
+ ASSERT_EQ(0, ceph_close(cmount, dir_fd));
+ ASSERT_EQ(0, ceph_close(cmount, root_fd));
+
+ ASSERT_EQ(0, ceph_unlink(cmount, c_path));
+ ASSERT_EQ(0, ceph_rmdir(cmount, c_dir));
+
+ ceph_shutdown(cmount);
+}
+
+TEST(LibCephFS, Statxat) {
+ struct ceph_mount_info *cmount;
+ ASSERT_EQ(ceph_create(&cmount, NULL), 0);
+ ASSERT_EQ(ceph_conf_read_file(cmount, NULL), 0);
+ ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL));
+ ASSERT_EQ(ceph_mount(cmount, NULL), 0);
+
+ char dir_name[64];
+ char rel_file_name_1[128];
+ char rel_file_name_2[256];
+
+ char dir_path[512];
+ char file_path[1024];
+
+ // relative paths for *at() calls
+ sprintf(dir_name, "dir0_%d", getpid());
+ sprintf(rel_file_name_1, "file_%d", getpid());
+ sprintf(rel_file_name_2, "%s/%s", dir_name, rel_file_name_1);
+
+ sprintf(dir_path, "/%s", dir_name);
+ sprintf(file_path, "%s/%s", dir_path, rel_file_name_1);
+
+ ASSERT_EQ(0, ceph_mkdir(cmount, dir_path, 0755));
+ int fd = ceph_open(cmount, file_path, O_WRONLY|O_CREAT, 0666);
+ ASSERT_LE(0, fd);
+ ASSERT_EQ(0, ceph_close(cmount, fd));
+
+ struct ceph_statx stx;
+
+ // test relative to root
+ fd = ceph_open(cmount, "/", O_DIRECTORY | O_RDONLY, 0);
+ ASSERT_LE(0, fd);
+ ASSERT_EQ(ceph_statxat(cmount, fd, dir_name, &stx, 0, 0), 0);
+ ASSERT_EQ(stx.stx_mode & S_IFMT, S_IFDIR);
+ ASSERT_EQ(ceph_statxat(cmount, fd, rel_file_name_2, &stx, 0, 0), 0);
+ ASSERT_EQ(stx.stx_mode & S_IFMT, S_IFREG);
+ ASSERT_EQ(0, ceph_close(cmount, fd));
+
+ // test relative to dir
+ fd = ceph_open(cmount, dir_path, O_DIRECTORY | O_RDONLY, 0);
+ ASSERT_LE(0, fd);
+ ASSERT_EQ(ceph_statxat(cmount, fd, rel_file_name_1, &stx, 0, 0), 0);
+ ASSERT_EQ(stx.stx_mode & S_IFMT, S_IFREG);
+
+ // delete the dirtree, recreate and verify
+ ASSERT_EQ(0, ceph_unlink(cmount, file_path));
+ ASSERT_EQ(0, ceph_rmdir(cmount, dir_path));
+ ASSERT_EQ(0, ceph_mkdir(cmount, dir_path, 0755));
+ int fd1 = ceph_open(cmount, file_path, O_WRONLY|O_CREAT, 0666);
+ ASSERT_LE(0, fd1);
+ ASSERT_EQ(0, ceph_close(cmount, fd1));
+ ASSERT_EQ(ceph_statxat(cmount, fd, rel_file_name_1, &stx, 0, 0), -ENOENT);
+ ASSERT_EQ(0, ceph_close(cmount, fd));
+
+ ASSERT_EQ(0, ceph_unlink(cmount, file_path));
+ ASSERT_EQ(0, ceph_rmdir(cmount, dir_path));
+
+ ceph_shutdown(cmount);
+}
+
+TEST(LibCephFS, StatxatATFDCWD) {
+ struct ceph_mount_info *cmount;
+ ASSERT_EQ(ceph_create(&cmount, NULL), 0);
+ ASSERT_EQ(ceph_conf_read_file(cmount, NULL), 0);
+ ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL));
+ ASSERT_EQ(ceph_mount(cmount, NULL), 0);
+
+ char dir_name[64];
+ char rel_file_name_1[128];
+
+ char dir_path[512];
+ char file_path[1024];
+
+ // relative paths for *at() calls
+ sprintf(dir_name, "dir0_%d", getpid());
+ sprintf(rel_file_name_1, "file_%d", getpid());
+
+ sprintf(dir_path, "/%s", dir_name);
+ sprintf(file_path, "%s/%s", dir_path, rel_file_name_1);
+
+ ASSERT_EQ(0, ceph_mkdir(cmount, dir_path, 0755));
+ int fd = ceph_open(cmount, file_path, O_WRONLY|O_CREAT, 0666);
+ ASSERT_LE(0, fd);
+ ASSERT_EQ(0, ceph_close(cmount, fd));
+
+ struct ceph_statx stx;
+ // chdir and test with CEPHFS_AT_FDCWD
+ ASSERT_EQ(0, ceph_chdir(cmount, dir_path));
+ ASSERT_EQ(ceph_statxat(cmount, CEPHFS_AT_FDCWD, rel_file_name_1, &stx, 0, 0), 0);
+ ASSERT_EQ(stx.stx_mode & S_IFMT, S_IFREG);
+
+ ASSERT_EQ(0, ceph_unlink(cmount, file_path));
+ ASSERT_EQ(0, ceph_rmdir(cmount, dir_path));
+
+ ceph_shutdown(cmount);
+}
+
+TEST(LibCephFS, Fdopendir) {
+ pid_t mypid = getpid();
+
+ struct ceph_mount_info *cmount;
+ ASSERT_EQ(ceph_create(&cmount, NULL), 0);
+ ASSERT_EQ(ceph_conf_read_file(cmount, NULL), 0);
+ ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL));
+ ASSERT_EQ(ceph_mount(cmount, "/"), 0);
+
+ char foostr[256];
+ sprintf(foostr, "/dir_ls%d", mypid);
+ ASSERT_EQ(ceph_mkdir(cmount, foostr, 0777), 0);
+
+ char bazstr[512];
+ sprintf(bazstr, "%s/elif", foostr);
+ int fd = ceph_open(cmount, bazstr, O_CREAT|O_RDONLY, 0666);
+ ASSERT_LE(0, fd);
+ ASSERT_EQ(0, ceph_close(cmount, fd));
+
+ fd = ceph_open(cmount, foostr, O_DIRECTORY | O_RDONLY, 0);
+ ASSERT_LE(0, fd);
+ struct ceph_dir_result *ls_dir = NULL;
+ ASSERT_EQ(ceph_fdopendir(cmount, fd, &ls_dir), 0);
+
+ // not guaranteed to get . and .. first, but its a safe assumption in this case
+ struct dirent *result = ceph_readdir(cmount, ls_dir);
+ ASSERT_TRUE(result != NULL);
+ ASSERT_STREQ(result->d_name, ".");
+ result = ceph_readdir(cmount, ls_dir);
+ ASSERT_TRUE(result != NULL);
+ ASSERT_STREQ(result->d_name, "..");
+ result = ceph_readdir(cmount, ls_dir);
+ ASSERT_TRUE(result != NULL);
+ ASSERT_STREQ(result->d_name, "elif");
+
+ ASSERT_TRUE(ceph_readdir(cmount, ls_dir) == NULL);
+
+ ASSERT_EQ(0, ceph_close(cmount, fd));
+ ASSERT_EQ(0, ceph_closedir(cmount, ls_dir));
+ ASSERT_EQ(0, ceph_unlink(cmount, bazstr));
+ ASSERT_EQ(0, ceph_rmdir(cmount, foostr));
+ ceph_shutdown(cmount);
+}
+
+TEST(LibCephFS, FdopendirATFDCWD) {
+ pid_t mypid = getpid();
+
+ struct ceph_mount_info *cmount;
+ ASSERT_EQ(ceph_create(&cmount, NULL), 0);
+ ASSERT_EQ(ceph_conf_read_file(cmount, NULL), 0);
+ ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL));
+ ASSERT_EQ(ceph_mount(cmount, "/"), 0);
+
+ char foostr[256];
+ sprintf(foostr, "/dir_ls%d", mypid);
+ ASSERT_EQ(ceph_mkdir(cmount, foostr, 0777), 0);
+
+ char bazstr[512];
+ sprintf(bazstr, "%s/elif", foostr);
+ int fd = ceph_open(cmount, bazstr, O_CREAT|O_RDONLY, 0666);
+ ASSERT_LE(0, fd);
+ ASSERT_EQ(0, ceph_close(cmount, fd));
+
+ ASSERT_EQ(0, ceph_chdir(cmount, foostr));
+ struct ceph_dir_result *ls_dir = NULL;
+ ASSERT_EQ(ceph_fdopendir(cmount, CEPHFS_AT_FDCWD, &ls_dir), 0);
+
+ // not guaranteed to get . and .. first, but its a safe assumption in this case
+ struct dirent *result = ceph_readdir(cmount, ls_dir);
+ ASSERT_TRUE(result != NULL);
+ ASSERT_STREQ(result->d_name, ".");
+ result = ceph_readdir(cmount, ls_dir);
+ ASSERT_TRUE(result != NULL);
+ ASSERT_STREQ(result->d_name, "..");
+ result = ceph_readdir(cmount, ls_dir);
+ ASSERT_TRUE(result != NULL);
+ ASSERT_STREQ(result->d_name, "elif");
+
+ ASSERT_TRUE(ceph_readdir(cmount, ls_dir) == NULL);
+
+ ASSERT_EQ(0, ceph_closedir(cmount, ls_dir));
+ ASSERT_EQ(0, ceph_unlink(cmount, bazstr));
+ ASSERT_EQ(0, ceph_rmdir(cmount, foostr));
+ ceph_shutdown(cmount);
+}
+
+TEST(LibCephFS, FdopendirReaddirTestWithDelete) {
+ pid_t mypid = getpid();
+
+ struct ceph_mount_info *cmount;
+ ASSERT_EQ(ceph_create(&cmount, NULL), 0);
+ ASSERT_EQ(ceph_conf_read_file(cmount, NULL), 0);
+ ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL));
+ ASSERT_EQ(ceph_mount(cmount, "/"), 0);
+
+ char foostr[256];
+ sprintf(foostr, "/dir_ls%d", mypid);
+ ASSERT_EQ(ceph_mkdir(cmount, foostr, 0777), 0);
+
+ char bazstr[512];
+ sprintf(bazstr, "%s/elif", foostr);
+ int fd = ceph_open(cmount, bazstr, O_CREAT|O_RDONLY, 0666);
+ ASSERT_LE(0, fd);
+ ASSERT_EQ(0, ceph_close(cmount, fd));
+
+ fd = ceph_open(cmount, foostr, O_DIRECTORY | O_RDONLY, 0);
+ ASSERT_LE(0, fd);
+ struct ceph_dir_result *ls_dir = NULL;
+ ASSERT_EQ(ceph_fdopendir(cmount, fd, &ls_dir), 0);
+
+ ASSERT_EQ(0, ceph_unlink(cmount, bazstr));
+ ASSERT_EQ(0, ceph_rmdir(cmount, foostr));
+
+ // not guaranteed to get . and .. first, but its a safe assumption
+ // in this case. also, note that we may or may not get other
+ // entries.
+ struct dirent *result = ceph_readdir(cmount, ls_dir);
+ ASSERT_TRUE(result != NULL);
+ ASSERT_STREQ(result->d_name, ".");
+ result = ceph_readdir(cmount, ls_dir);
+ ASSERT_TRUE(result != NULL);
+ ASSERT_STREQ(result->d_name, "..");
+
+ ASSERT_EQ(0, ceph_close(cmount, fd));
+ ASSERT_EQ(0, ceph_closedir(cmount, ls_dir));
+ ceph_shutdown(cmount);
+}
+
+TEST(LibCephFS, FdopendirOnNonDir) {
+ pid_t mypid = getpid();
+
+ struct ceph_mount_info *cmount;
+ ASSERT_EQ(ceph_create(&cmount, NULL), 0);
+ ASSERT_EQ(ceph_conf_read_file(cmount, NULL), 0);
+ ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL));
+ ASSERT_EQ(ceph_mount(cmount, "/"), 0);
+
+ char foostr[256];
+ sprintf(foostr, "/dir_ls%d", mypid);
+ ASSERT_EQ(ceph_mkdir(cmount, foostr, 0777), 0);
+
+ char bazstr[512];
+ sprintf(bazstr, "%s/file", foostr);
+ int fd = ceph_open(cmount, bazstr, O_CREAT|O_RDONLY, 0666);
+ ASSERT_LE(0, fd);
+
+ struct ceph_dir_result *ls_dir = NULL;
+ ASSERT_EQ(ceph_fdopendir(cmount, fd, &ls_dir), -ENOTDIR);
+ ASSERT_EQ(0, ceph_close(cmount, fd));
+
+ ASSERT_EQ(0, ceph_unlink(cmount, bazstr));
+ ASSERT_EQ(0, ceph_rmdir(cmount, foostr));
+
+ ceph_shutdown(cmount);
+}
+
+TEST(LibCephFS, Mkdirat) {
+ pid_t mypid = getpid();
+
+ struct ceph_mount_info *cmount;
+ ASSERT_EQ(ceph_create(&cmount, NULL), 0);
+ ASSERT_EQ(ceph_conf_read_file(cmount, NULL), 0);
+ ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL));
+ ASSERT_EQ(ceph_mount(cmount, "/"), 0);
+
+ char dir_name[128];
+ char dir_path1[256];
+ sprintf(dir_name, "dir_%d", mypid);
+ sprintf(dir_path1, "/%s", dir_name);
+
+ char dir_path2[512];
+ char rel_dir_path2[512];
+ sprintf(dir_path2, "%s/dir_%d", dir_path1, mypid);
+ sprintf(rel_dir_path2, "%s/dir_%d", dir_name, mypid);
+
+ int fd = ceph_open(cmount, "/", O_DIRECTORY | O_RDONLY, 0);
+ ASSERT_LE(0, fd);
+
+ ASSERT_EQ(0, ceph_mkdirat(cmount, fd, dir_name, 0777));
+ ASSERT_EQ(0, ceph_mkdirat(cmount, fd, rel_dir_path2, 0666));
+
+ ASSERT_EQ(0, ceph_close(cmount, fd));
+ ASSERT_EQ(0, ceph_rmdir(cmount, dir_path2));
+ ASSERT_EQ(0, ceph_rmdir(cmount, dir_path1));
+ ceph_shutdown(cmount);
+}
+
+TEST(LibCephFS, MkdiratATFDCWD) {
+ pid_t mypid = getpid();
+
+ struct ceph_mount_info *cmount;
+ ASSERT_EQ(ceph_create(&cmount, NULL), 0);
+ ASSERT_EQ(ceph_conf_read_file(cmount, NULL), 0);
+ ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL));
+ ASSERT_EQ(ceph_mount(cmount, "/"), 0);
+
+ char dir_name[128];
+ char dir_path1[256];
+ sprintf(dir_name, "dir_%d", mypid);
+ sprintf(dir_path1, "/%s", dir_name);
+
+ char dir_path2[512];
+ sprintf(dir_path2, "%s/dir_%d", dir_path1, mypid);
+
+ ASSERT_EQ(0, ceph_mkdirat(cmount, CEPHFS_AT_FDCWD, dir_name, 0777));
+
+ ASSERT_EQ(0, ceph_chdir(cmount, dir_path1));
+ ASSERT_EQ(0, ceph_mkdirat(cmount, CEPHFS_AT_FDCWD, dir_name, 0666));
+
+ ASSERT_EQ(0, ceph_rmdir(cmount, dir_path2));
+ ASSERT_EQ(0, ceph_rmdir(cmount, dir_path1));
+ ceph_shutdown(cmount);
+}
+
+TEST(LibCephFS, Readlinkat) {
+ pid_t mypid = getpid();
+
+ struct ceph_mount_info *cmount;
+ ASSERT_EQ(ceph_create(&cmount, NULL), 0);
+ ASSERT_EQ(ceph_conf_read_file(cmount, NULL), 0);
+ ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL));
+ ASSERT_EQ(ceph_mount(cmount, "/"), 0);
+
+ char dir_name[128];
+ char dir_path[256];
+ sprintf(dir_name, "dir_%d", mypid);
+ sprintf(dir_path, "/%s", dir_name);
+ ASSERT_EQ(ceph_mkdir(cmount, dir_path, 0777), 0);
+
+ char file_path[512];
+ char rel_file_path[512];
+ sprintf(rel_file_path, "%s/elif", dir_name);
+ sprintf(file_path, "%s/elif", dir_path);
+ int fd = ceph_open(cmount, file_path, O_CREAT|O_RDONLY, 0666);
+ ASSERT_LE(0, fd);
+ ASSERT_EQ(0, ceph_close(cmount, fd));
+
+ char link_path[128];
+ char rel_link_path[64];
+ sprintf(rel_link_path, "linkfile_%d", mypid);
+ sprintf(link_path, "/%s", rel_link_path);
+ ASSERT_EQ(0, ceph_symlink(cmount, rel_file_path, link_path));
+
+ fd = ceph_open(cmount, "/", O_DIRECTORY | O_RDONLY, 0);
+ ASSERT_LE(0, fd);
+ size_t target_len = strlen(rel_file_path);
+ char target[target_len+1];
+ ASSERT_EQ(target_len, ceph_readlinkat(cmount, fd, rel_link_path, target, target_len));
+ target[target_len] = '\0';
+ ASSERT_EQ(0, memcmp(target, rel_file_path, target_len));
+
+ ASSERT_EQ(0, ceph_close(cmount, fd));
+ ASSERT_EQ(0, ceph_unlink(cmount, link_path));
+ ASSERT_EQ(0, ceph_unlink(cmount, file_path));
+ ASSERT_EQ(0, ceph_rmdir(cmount, dir_path));
+ ceph_shutdown(cmount);
+}
+
+TEST(LibCephFS, ReadlinkatATFDCWD) {
+ pid_t mypid = getpid();
+
+ struct ceph_mount_info *cmount;
+ ASSERT_EQ(ceph_create(&cmount, NULL), 0);
+ ASSERT_EQ(ceph_conf_read_file(cmount, NULL), 0);
+ ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL));
+ ASSERT_EQ(ceph_mount(cmount, "/"), 0);
+
+ char dir_name[128];
+ char dir_path[256];
+ sprintf(dir_name, "dir_%d", mypid);
+ sprintf(dir_path, "/%s", dir_name);
+ ASSERT_EQ(ceph_mkdir(cmount, dir_path, 0777), 0);
+
+ char file_path[512];
+ char rel_file_path[512] = "./elif";
+ sprintf(file_path, "%s/elif", dir_path);
+ int fd = ceph_open(cmount, file_path, O_CREAT|O_RDONLY, 0666);
+ ASSERT_LE(0, fd);
+ ASSERT_EQ(0, ceph_close(cmount, fd));
+
+ char link_path[PATH_MAX];
+ char rel_link_path[1024];
+ sprintf(rel_link_path, "./linkfile_%d", mypid);
+ sprintf(link_path, "%s/%s", dir_path, rel_link_path);
+ ASSERT_EQ(0, ceph_symlink(cmount, rel_file_path, link_path));
+
+ ASSERT_EQ(0, ceph_chdir(cmount, dir_path));
+ size_t target_len = strlen(rel_file_path);
+ char target[target_len+1];
+ ASSERT_EQ(target_len, ceph_readlinkat(cmount, CEPHFS_AT_FDCWD, rel_link_path, target, target_len));
+ target[target_len] = '\0';
+ ASSERT_EQ(0, memcmp(target, rel_file_path, target_len));
+
+ ASSERT_EQ(0, ceph_unlink(cmount, link_path));
+ ASSERT_EQ(0, ceph_unlink(cmount, file_path));
+ ASSERT_EQ(0, ceph_rmdir(cmount, dir_path));
+ ceph_shutdown(cmount);
+}
+
+TEST(LibCephFS, Symlinkat) {
+ pid_t mypid = getpid();
+
+ struct ceph_mount_info *cmount;
+ ASSERT_EQ(ceph_create(&cmount, NULL), 0);
+ ASSERT_EQ(ceph_conf_read_file(cmount, NULL), 0);
+ ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL));
+ ASSERT_EQ(ceph_mount(cmount, "/"), 0);
+
+ char dir_name[128];
+ char dir_path[256];
+ sprintf(dir_name, "dir_%d", mypid);
+ sprintf(dir_path, "/%s", dir_name);
+ ASSERT_EQ(ceph_mkdir(cmount, dir_path, 0777), 0);
+
+ char file_path[512];
+ char rel_file_path[512];
+ sprintf(rel_file_path, "%s/elif", dir_name);
+ sprintf(file_path, "%s/elif", dir_path);
+
+ int fd = ceph_open(cmount, file_path, O_CREAT|O_RDONLY, 0666);
+ ASSERT_LE(0, fd);
+ ASSERT_EQ(0, ceph_close(cmount, fd));
+
+ char link_path[128];
+ char rel_link_path[64];
+ sprintf(rel_link_path, "linkfile_%d", mypid);
+ sprintf(link_path, "/%s", rel_link_path);
+
+ fd = ceph_open(cmount, "/", O_DIRECTORY | O_RDONLY, 0);
+ ASSERT_LE(0, fd);
+ ASSERT_EQ(0, ceph_symlinkat(cmount, rel_file_path, fd, rel_link_path));
+
+ size_t target_len = strlen(rel_file_path);
+ char target[target_len+1];
+ ASSERT_EQ(target_len, ceph_readlinkat(cmount, fd, rel_link_path, target, target_len));
+ target[target_len] = '\0';
+ ASSERT_EQ(0, memcmp(target, rel_file_path, target_len));
+
+ ASSERT_EQ(0, ceph_close(cmount, fd));
+ ASSERT_EQ(0, ceph_unlink(cmount, link_path));
+ ASSERT_EQ(0, ceph_unlink(cmount, file_path));
+ ASSERT_EQ(0, ceph_rmdir(cmount, dir_path));
+ ceph_shutdown(cmount);
+}
+
+TEST(LibCephFS, SymlinkatATFDCWD) {
+ pid_t mypid = getpid();
+
+ struct ceph_mount_info *cmount;
+ ASSERT_EQ(ceph_create(&cmount, NULL), 0);
+ ASSERT_EQ(ceph_conf_read_file(cmount, NULL), 0);
+ ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL));
+ ASSERT_EQ(ceph_mount(cmount, "/"), 0);
+
+ char dir_name[128];
+ char dir_path[256];
+ sprintf(dir_name, "dir_%d", mypid);
+ sprintf(dir_path, "/%s", dir_name);
+ ASSERT_EQ(ceph_mkdir(cmount, dir_path, 0777), 0);
+
+ char file_path[512];
+ char rel_file_path[512] = "./elif";
+ sprintf(file_path, "%s/elif", dir_path);
+ int fd = ceph_open(cmount, file_path, O_CREAT|O_RDONLY, 0666);
+ ASSERT_LE(0, fd);
+ ASSERT_EQ(0, ceph_close(cmount, fd));
+
+ char link_path[PATH_MAX];
+ char rel_link_path[1024];
+ sprintf(rel_link_path, "./linkfile_%d", mypid);
+ sprintf(link_path, "%s/%s", dir_path, rel_link_path);
+ ASSERT_EQ(0, ceph_chdir(cmount, dir_path));
+ ASSERT_EQ(0, ceph_symlinkat(cmount, rel_file_path, CEPHFS_AT_FDCWD, rel_link_path));
+
+ size_t target_len = strlen(rel_file_path);
+ char target[target_len+1];
+ ASSERT_EQ(target_len, ceph_readlinkat(cmount, CEPHFS_AT_FDCWD, rel_link_path, target, target_len));
+ target[target_len] = '\0';
+ ASSERT_EQ(0, memcmp(target, rel_file_path, target_len));
+
+ ASSERT_EQ(0, ceph_unlink(cmount, link_path));
+ ASSERT_EQ(0, ceph_unlink(cmount, file_path));
+ ASSERT_EQ(0, ceph_rmdir(cmount, dir_path));
+ ceph_shutdown(cmount);
+}
+
+TEST(LibCephFS, Unlinkat) {
+ pid_t mypid = getpid();
+
+ struct ceph_mount_info *cmount;
+ ASSERT_EQ(ceph_create(&cmount, NULL), 0);
+ ASSERT_EQ(ceph_conf_read_file(cmount, NULL), 0);
+ ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL));
+ ASSERT_EQ(ceph_mount(cmount, "/"), 0);
+
+ char dir_name[128];
+ char dir_path[256];
+ sprintf(dir_name, "dir_%d", mypid);
+ sprintf(dir_path, "/%s", dir_name);
+ ASSERT_EQ(ceph_mkdir(cmount, dir_path, 0777), 0);
+
+ char file_path[512];
+ char rel_file_path[512] = "elif";
+ sprintf(file_path, "%s/elif", dir_path);
+
+ int fd = ceph_open(cmount, file_path, O_CREAT|O_RDONLY, 0666);
+ ASSERT_LE(0, fd);
+ ASSERT_EQ(0, ceph_close(cmount, fd));
+
+ fd = ceph_open(cmount, dir_path, O_DIRECTORY | O_RDONLY, 0);
+ ASSERT_LE(0, fd);
+ ASSERT_EQ(-ENOTDIR, ceph_unlinkat(cmount, fd, rel_file_path, AT_REMOVEDIR));
+ ASSERT_EQ(0, ceph_unlinkat(cmount, fd, rel_file_path, 0));
+ ASSERT_EQ(0, ceph_close(cmount, fd));
+
+ fd = ceph_open(cmount, "/", O_DIRECTORY | O_RDONLY, 0);
+ ASSERT_EQ(-EISDIR, ceph_unlinkat(cmount, fd, dir_name, 0));
+ ASSERT_EQ(0, ceph_unlinkat(cmount, fd, dir_name, AT_REMOVEDIR));
+ ASSERT_LE(0, fd);
+
+ ceph_shutdown(cmount);
+}
+
+TEST(LibCephFS, UnlinkatATFDCWD) {
+ pid_t mypid = getpid();
+
+ struct ceph_mount_info *cmount;
+ ASSERT_EQ(ceph_create(&cmount, NULL), 0);
+ ASSERT_EQ(ceph_conf_read_file(cmount, NULL), 0);
+ ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL));
+ ASSERT_EQ(ceph_mount(cmount, "/"), 0);
+
+ char dir_name[128];
+ char dir_path[256];
+ sprintf(dir_name, "dir_%d", mypid);
+ sprintf(dir_path, "/%s", dir_name);
+ ASSERT_EQ(ceph_mkdir(cmount, dir_path, 0777), 0);
+
+ char file_path[512];
+ char rel_file_path[512] = "elif";
+ sprintf(file_path, "%s/elif", dir_path);
+
+ int fd = ceph_open(cmount, file_path, O_CREAT|O_RDONLY, 0666);
+ ASSERT_LE(0, fd);
+ ASSERT_EQ(0, ceph_close(cmount, fd));
+
+ ASSERT_EQ(0, ceph_chdir(cmount, dir_path));
+ ASSERT_EQ(-ENOTDIR, ceph_unlinkat(cmount, CEPHFS_AT_FDCWD, rel_file_path, AT_REMOVEDIR));
+ ASSERT_EQ(0, ceph_unlinkat(cmount, CEPHFS_AT_FDCWD, rel_file_path, 0));
+
+ ASSERT_EQ(0, ceph_chdir(cmount, "/"));
+ ASSERT_EQ(-EISDIR, ceph_unlinkat(cmount, CEPHFS_AT_FDCWD, dir_name, 0));
+ ASSERT_EQ(0, ceph_unlinkat(cmount, CEPHFS_AT_FDCWD, dir_name, AT_REMOVEDIR));
+
+ ceph_shutdown(cmount);
+}
+
+TEST(LibCephFS, Chownat) {
+ pid_t mypid = getpid();
+
+ struct ceph_mount_info *cmount;
+ ASSERT_EQ(ceph_create(&cmount, NULL), 0);
+ ASSERT_EQ(ceph_conf_read_file(cmount, NULL), 0);
+ ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL));
+ ASSERT_EQ(ceph_mount(cmount, "/"), 0);
+
+ char dir_name[128];
+ char dir_path[256];
+ sprintf(dir_name, "dir_%d", mypid);
+ sprintf(dir_path, "/%s", dir_name);
+ ASSERT_EQ(ceph_mkdir(cmount, dir_path, 0777), 0);
+
+ char file_path[512];
+ char rel_file_path[512] = "elif";
+ sprintf(file_path, "%s/elif", dir_path);
+ int fd = ceph_open(cmount, file_path, O_CREAT|O_RDWR, 0666);
+ ASSERT_LE(0, fd);
+
+ // set perms to readable and writeable only by owner
+ ASSERT_EQ(ceph_fchmod(cmount, fd, 0600), 0);
+ ceph_close(cmount, fd);
+
+ fd = ceph_open(cmount, dir_path, O_DIRECTORY | O_RDONLY, 0);
+ // change ownership to nobody -- we assume nobody exists and id is always 65534
+ ASSERT_EQ(ceph_conf_set(cmount, "client_permissions", "0"), 0);
+ ASSERT_EQ(ceph_chownat(cmount, fd, rel_file_path, 65534, 65534, 0), 0);
+ ASSERT_EQ(ceph_conf_set(cmount, "client_permissions", "1"), 0);
+ ceph_close(cmount, fd);
+
+ fd = ceph_open(cmount, file_path, O_RDWR, 0);
+ ASSERT_EQ(fd, -EACCES);
+
+ ASSERT_EQ(ceph_conf_set(cmount, "client_permissions", "0"), 0);
+ ASSERT_EQ(0, ceph_unlink(cmount, file_path));
+ ASSERT_EQ(ceph_conf_set(cmount, "client_permissions", "1"), 0);
+ ASSERT_EQ(0, ceph_rmdir(cmount, dir_path));
+ ceph_shutdown(cmount);
+}
+
+TEST(LibCephFS, ChownatATFDCWD) {
+ pid_t mypid = getpid();
+
+ struct ceph_mount_info *cmount;
+ ASSERT_EQ(ceph_create(&cmount, NULL), 0);
+ ASSERT_EQ(ceph_conf_read_file(cmount, NULL), 0);
+ ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL));
+ ASSERT_EQ(ceph_mount(cmount, "/"), 0);
+
+ char dir_name[128];
+ char dir_path[256];
+ sprintf(dir_name, "dir_%d", mypid);
+ sprintf(dir_path, "/%s", dir_name);
+ ASSERT_EQ(ceph_mkdir(cmount, dir_path, 0777), 0);
+
+ char file_path[512];
+ char rel_file_path[512] = "elif";
+ sprintf(file_path, "%s/elif", dir_path);
+ int fd = ceph_open(cmount, file_path, O_CREAT|O_RDWR, 0666);
+ ASSERT_LE(0, fd);
+
+ // set perms to readable and writeable only by owner
+ ASSERT_EQ(ceph_fchmod(cmount, fd, 0600), 0);
+ ceph_close(cmount, fd);
+
+ ASSERT_EQ(0, ceph_chdir(cmount, dir_path));
+ // change ownership to nobody -- we assume nobody exists and id is always 65534
+ ASSERT_EQ(ceph_conf_set(cmount, "client_permissions", "0"), 0);
+ ASSERT_EQ(ceph_chownat(cmount, CEPHFS_AT_FDCWD, rel_file_path, 65534, 65534, 0), 0);
+ ASSERT_EQ(ceph_conf_set(cmount, "client_permissions", "1"), 0);
+
+ fd = ceph_open(cmount, file_path, O_RDWR, 0);
+ ASSERT_EQ(fd, -EACCES);
+
+ ASSERT_EQ(ceph_conf_set(cmount, "client_permissions", "0"), 0);
+ ASSERT_EQ(0, ceph_unlink(cmount, file_path));
+ ASSERT_EQ(ceph_conf_set(cmount, "client_permissions", "1"), 0);
+ ASSERT_EQ(0, ceph_rmdir(cmount, dir_path));
+ ceph_shutdown(cmount);
+}
+
+TEST(LibCephFS, Chmodat) {
+ pid_t mypid = getpid();
+
+ struct ceph_mount_info *cmount;
+ ASSERT_EQ(ceph_create(&cmount, NULL), 0);
+ ASSERT_EQ(ceph_conf_read_file(cmount, NULL), 0);
+ ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL));
+ ASSERT_EQ(ceph_mount(cmount, "/"), 0);
+
+ char dir_name[128];
+ char dir_path[256];
+ sprintf(dir_name, "dir_%d", mypid);
+ sprintf(dir_path, "/%s", dir_name);
+ ASSERT_EQ(ceph_mkdir(cmount, dir_path, 0777), 0);
+
+ char file_path[512];
+ char rel_file_path[512] = "elif";
+ sprintf(file_path, "%s/elif", dir_path);
+ int fd = ceph_open(cmount, file_path, O_CREAT|O_RDWR, 0666);
+ ASSERT_LE(0, fd);
+ const char *bytes = "foobarbaz";
+ ASSERT_EQ(ceph_write(cmount, fd, bytes, strlen(bytes), 0), (int)strlen(bytes));
+ ASSERT_EQ(0, ceph_close(cmount, fd));
+
+ fd = ceph_open(cmount, dir_path, O_DIRECTORY | O_RDONLY, 0);
+
+ // set perms to read but can't write
+ ASSERT_EQ(ceph_chmodat(cmount, fd, rel_file_path, 0400, 0), 0);
+ ASSERT_EQ(ceph_open(cmount, file_path, O_RDWR, 0), -EACCES);
+
+ // reset back to writeable
+ ASSERT_EQ(ceph_chmodat(cmount, fd, rel_file_path, 0600, 0), 0);
+ int fd2 = ceph_open(cmount, file_path, O_RDWR, 0);
+ ASSERT_LE(0, fd2);
+
+ ASSERT_EQ(0, ceph_close(cmount, fd2));
+ ASSERT_EQ(0, ceph_close(cmount, fd));
+
+ ASSERT_EQ(0, ceph_unlink(cmount, file_path));
+ ASSERT_EQ(0, ceph_rmdir(cmount, dir_path));
+ ceph_shutdown(cmount);
+}
+
+TEST(LibCephFS, ChmodatATFDCWD) {
+ pid_t mypid = getpid();
+
+ struct ceph_mount_info *cmount;
+ ASSERT_EQ(ceph_create(&cmount, NULL), 0);
+ ASSERT_EQ(ceph_conf_read_file(cmount, NULL), 0);
+ ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL));
+ ASSERT_EQ(ceph_mount(cmount, "/"), 0);
+
+ char dir_name[128];
+ char dir_path[256];
+ sprintf(dir_name, "dir_%d", mypid);
+ sprintf(dir_path, "/%s", dir_name);
+ ASSERT_EQ(ceph_mkdir(cmount, dir_path, 0777), 0);
+
+ char file_path[512];
+ char rel_file_path[512] = "elif";
+ sprintf(file_path, "%s/elif", dir_path);
+ int fd = ceph_open(cmount, file_path, O_CREAT|O_RDWR, 0666);
+ ASSERT_LE(0, fd);
+ const char *bytes = "foobarbaz";
+ ASSERT_EQ(ceph_write(cmount, fd, bytes, strlen(bytes), 0), (int)strlen(bytes));
+ ASSERT_EQ(0, ceph_close(cmount, fd));
+
+ // set perms to read but can't write
+ ASSERT_EQ(0, ceph_chdir(cmount, dir_path));
+ ASSERT_EQ(ceph_chmodat(cmount, CEPHFS_AT_FDCWD, rel_file_path, 0400, 0), 0);
+ ASSERT_EQ(ceph_open(cmount, file_path, O_RDWR, 0), -EACCES);
+
+ // reset back to writeable
+ ASSERT_EQ(ceph_chmodat(cmount, CEPHFS_AT_FDCWD, rel_file_path, 0600, 0), 0);
+ int fd2 = ceph_open(cmount, file_path, O_RDWR, 0);
+ ASSERT_LE(0, fd2);
+ ASSERT_EQ(0, ceph_close(cmount, fd2));
+
+ ASSERT_EQ(0, ceph_unlink(cmount, file_path));
+ ASSERT_EQ(0, ceph_rmdir(cmount, dir_path));
+ ceph_shutdown(cmount);
+}
+
+TEST(LibCephFS, Utimensat) {
+ pid_t mypid = getpid();
+
+ struct ceph_mount_info *cmount;
+ ASSERT_EQ(ceph_create(&cmount, NULL), 0);
+ ASSERT_EQ(ceph_conf_read_file(cmount, NULL), 0);
+ ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL));
+ ASSERT_EQ(ceph_mount(cmount, NULL), 0);
+
+ char dir_name[128];
+ char dir_path[256];
+ sprintf(dir_name, "dir_%d", mypid);
+ sprintf(dir_path, "/%s", dir_name);
+ ASSERT_EQ(ceph_mkdir(cmount, dir_path, 0777), 0);
+
+ char file_path[512];
+ char rel_file_path[512] = "elif";
+ sprintf(file_path, "%s/elif", dir_path);
+ int fd = ceph_open(cmount, file_path, O_CREAT|O_RDWR, 0666);
+ ASSERT_LE(0, fd);
+
+ struct timespec times[2];
+ get_current_time_timespec(times);
+
+ fd = ceph_open(cmount, dir_path, O_DIRECTORY | O_RDONLY, 0);
+ ASSERT_LE(0, fd);
+ EXPECT_EQ(0, ceph_utimensat(cmount, fd, rel_file_path, times, 0));
+ ceph_close(cmount, fd);
+
+ struct ceph_statx stx;
+ ASSERT_EQ(ceph_statx(cmount, file_path, &stx,
+ CEPH_STATX_MTIME|CEPH_STATX_ATIME, 0), 0);
+ ASSERT_EQ(utime_t(stx.stx_atime), utime_t(times[0]));
+ ASSERT_EQ(utime_t(stx.stx_mtime), utime_t(times[1]));
+
+ ASSERT_EQ(0, ceph_unlink(cmount, file_path));
+ ASSERT_EQ(0, ceph_rmdir(cmount, dir_path));
+ ceph_shutdown(cmount);
+}
+
+TEST(LibCephFS, UtimensatATFDCWD) {
+ pid_t mypid = getpid();
+
+ struct ceph_mount_info *cmount;
+ ASSERT_EQ(ceph_create(&cmount, NULL), 0);
+ ASSERT_EQ(ceph_conf_read_file(cmount, NULL), 0);
+ ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL));
+ ASSERT_EQ(ceph_mount(cmount, NULL), 0);
+
+ char dir_name[128];
+ char dir_path[256];
+ sprintf(dir_name, "dir_%d", mypid);
+ sprintf(dir_path, "/%s", dir_name);
+ ASSERT_EQ(ceph_mkdir(cmount, dir_path, 0777), 0);
+
+ char file_path[512];
+ char rel_file_path[512] = "elif";
+ sprintf(file_path, "%s/elif", dir_path);
+ int fd = ceph_open(cmount, file_path, O_CREAT|O_RDWR, 0666);
+ ASSERT_LE(0, fd);
+
+ struct timespec times[2];
+ get_current_time_timespec(times);
+
+ ASSERT_EQ(0, ceph_chdir(cmount, dir_path));
+ EXPECT_EQ(0, ceph_utimensat(cmount, CEPHFS_AT_FDCWD, rel_file_path, times, 0));
+
+ struct ceph_statx stx;
+ ASSERT_EQ(ceph_statx(cmount, file_path, &stx,
+ CEPH_STATX_MTIME|CEPH_STATX_ATIME, 0), 0);
+ ASSERT_EQ(utime_t(stx.stx_atime), utime_t(times[0]));
+ ASSERT_EQ(utime_t(stx.stx_mtime), utime_t(times[1]));
+
+ ASSERT_EQ(0, ceph_unlink(cmount, file_path));
+ ASSERT_EQ(0, ceph_rmdir(cmount, dir_path));
+ ceph_shutdown(cmount);
+}
+
+TEST(LibCephFS, SetMountTimeoutPostMount) {
+ struct ceph_mount_info *cmount;
+ ASSERT_EQ(ceph_create(&cmount, NULL), 0);
+ ASSERT_EQ(ceph_conf_read_file(cmount, NULL), 0);
+ ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL));
+ ASSERT_EQ(ceph_mount(cmount, NULL), 0);
+
+ ASSERT_EQ(-EINVAL, ceph_set_mount_timeout(cmount, 5));
+ ceph_shutdown(cmount);
+}
+
+TEST(LibCephFS, SetMountTimeout) {
+ struct ceph_mount_info *cmount;
+ ASSERT_EQ(ceph_create(&cmount, NULL), 0);
+ ASSERT_EQ(ceph_conf_read_file(cmount, NULL), 0);
+ ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL));
+ ASSERT_EQ(0, ceph_set_mount_timeout(cmount, 5));
+ ASSERT_EQ(ceph_mount(cmount, NULL), 0);
+ ceph_shutdown(cmount);
+}
+
+TEST(LibCephFS, LookupMdsPrivateInos) {
+ struct ceph_mount_info *cmount;
+ ASSERT_EQ(ceph_create(&cmount, NULL), 0);
+ ASSERT_EQ(ceph_conf_read_file(cmount, NULL), 0);
+ ASSERT_EQ(0, ceph_conf_parse_env(cmount, NULL));
+ ASSERT_EQ(ceph_mount(cmount, NULL), 0);
+
+ Inode *inode;
+ for (int ino = 0; ino < MDS_INO_SYSTEM_BASE; ino++) {
+ if (MDS_IS_PRIVATE_INO(ino)) {
+ ASSERT_EQ(-ESTALE, ceph_ll_lookup_inode(cmount, ino, &inode));
+ } else if (ino == CEPH_INO_ROOT || ino == CEPH_INO_GLOBAL_SNAPREALM) {
+ ASSERT_EQ(0, ceph_ll_lookup_inode(cmount, ino, &inode));
+ } else if (ino == CEPH_INO_LOST_AND_FOUND) {
+ // the ino 3 will only exists after the recovery tool ran, so
+ // it may return -ESTALE with a fresh fs cluster
+ int r = ceph_ll_lookup_inode(cmount, ino, &inode);
+ ASSERT_TRUE(r == -ESTALE || r == 0);
+ } else {
+ // currently the ino 0 and 4~99 is not useded yet.
+ ASSERT_EQ(-ESTALE, ceph_ll_lookup_inode(cmount, ino, &inode));
+ }
+ }
+}
});
}
- int retry = 5;
+ int retry = 15;
while (retry) {
rados_t cluster;
sleep(2);
retry--;
}
- ASSERT_NE(0, retry);
{
std::scoped_lock<std::mutex> l(lock);
for (int i = 0; i < nthreads; ++i)
threads[i].join();
+ ASSERT_NE(0, retry);
ASSERT_EQ(setrlimit(RLIMIT_NOFILE, &rold), 0);
}
TEST_F(TestMockMigrationHttpClient, OpenResolveFail) {
MockTestImageCtx mock_test_image_ctx(*m_image_ctx);
- MockHttpClient http_client(&mock_test_image_ctx, "http://invalid.ceph.com");
+ MockHttpClient http_client(&mock_test_image_ctx, "http://foo.example");
C_SaferCond ctx;
http_client.open(&ctx);
void expect_unlink_peer(MockTestImageCtx &mock_image_ctx,
MockUnlinkPeerRequest &mock_unlink_peer_request,
uint64_t snap_id, const std::string &peer_uuid,
- int r) {
+ bool is_linked, int r) {
EXPECT_CALL(mock_unlink_peer_request, send())
- .WillOnce(Invoke([&mock_image_ctx, &mock_unlink_peer_request, snap_id,
- peer_uuid, r]() {
+ .WillOnce(Invoke([&mock_image_ctx, &mock_unlink_peer_request,
+ snap_id, peer_uuid, is_linked, r]() {
ASSERT_EQ(mock_unlink_peer_request.mirror_peer_uuid,
peer_uuid);
ASSERT_EQ(mock_unlink_peer_request.snap_id, snap_id);
boost::get<cls::rbd::MirrorSnapshotNamespace>(
&it->second.snap_namespace);
ASSERT_NE(nullptr, info);
- ASSERT_NE(0, info->mirror_peer_uuids.erase(
- peer_uuid));
+ ASSERT_EQ(is_linked, info->mirror_peer_uuids.erase(
+ peer_uuid));
if (info->mirror_peer_uuids.empty()) {
mock_image_ctx.snap_info.erase(it);
}
auto it = mock_image_ctx.snap_info.rbegin();
auto snap_id = it->first;
expect_unlink_peer(mock_image_ctx, mock_unlink_peer_request, snap_id, "uuid",
- 0);
+ true, 0);
+ C_SaferCond ctx;
+ auto req = new MockCreatePrimaryRequest(&mock_image_ctx, "gid", CEPH_NOSNAP,
+ 0U, 0U, nullptr, &ctx);
+ req->send();
+ ASSERT_EQ(0, ctx.wait());
+}
+
+TEST_F(TestMockMirrorSnapshotCreatePrimaryRequest, SuccessUnlinkNoPeer) {
+ REQUIRE_FORMAT_V2();
+
+ librbd::ImageCtx *ictx;
+ ASSERT_EQ(0, open_image(m_image_name, &ictx));
+ ictx->config.set_val("conf_rbd_mirroring_max_mirroring_snapshots", "3");
+
+ MockTestImageCtx mock_image_ctx(*ictx);
+ cls::rbd::MirrorSnapshotNamespace ns{
+ cls::rbd::MIRROR_SNAPSHOT_STATE_PRIMARY, {}, "", CEPH_NOSNAP};
+ snap_create(mock_image_ctx, ns, "mirror_snap");
+
+ InSequence seq;
+
+ expect_clone_md_ctx(mock_image_ctx);
+ MockUtils mock_utils;
+ expect_can_create_primary_snapshot(mock_utils, false, false, true);
+ expect_get_mirror_peers(mock_image_ctx,
+ {{"uuid", cls::rbd::MIRROR_PEER_DIRECTION_TX, "ceph",
+ "mirror", "mirror uuid"}}, 0);
+ expect_create_snapshot(mock_image_ctx, 0);
+ MockUnlinkPeerRequest mock_unlink_peer_request;
+ auto it = mock_image_ctx.snap_info.rbegin();
+ auto snap_id = it->first;
+ std::list<string> peer_uuids = {"uuid"};
+ expect_unlink_peer(mock_image_ctx, mock_unlink_peer_request, snap_id, "uuid",
+ false, 0);
+
+ C_SaferCond ctx;
+ auto req = new MockCreatePrimaryRequest(&mock_image_ctx, "gid", CEPH_NOSNAP,
+ 0U, 0U, nullptr, &ctx);
+ req->send();
+ ASSERT_EQ(0, ctx.wait());
+}
+
+TEST_F(TestMockMirrorSnapshotCreatePrimaryRequest, SuccessUnlinkMultiplePeers) {
+ REQUIRE_FORMAT_V2();
+
+ librbd::ImageCtx *ictx;
+ ASSERT_EQ(0, open_image(m_image_name, &ictx));
+ ictx->config.set_val("conf_rbd_mirroring_max_mirroring_snapshots", "3");
+
+ MockTestImageCtx mock_image_ctx(*ictx);
+ for (int i = 0; i < 3; i++) {
+ cls::rbd::MirrorSnapshotNamespace ns{
+ cls::rbd::MIRROR_SNAPSHOT_STATE_PRIMARY, {"uuid1", "uuid2"}, "",
+ CEPH_NOSNAP};
+ snap_create(mock_image_ctx, ns, "mirror_snap");
+ }
+
+ InSequence seq;
+
+ expect_clone_md_ctx(mock_image_ctx);
+ MockUtils mock_utils;
+ expect_can_create_primary_snapshot(mock_utils, false, false, true);
+ expect_get_mirror_peers(mock_image_ctx,
+ {{"uuid1", cls::rbd::MIRROR_PEER_DIRECTION_TX, "ceph",
+ "mirror", "mirror uuid"},
+ {"uuid2", cls::rbd::MIRROR_PEER_DIRECTION_TX, "ceph",
+ "mirror", "mirror uuid"}}, 0);
+ expect_create_snapshot(mock_image_ctx, 0);
+ MockUnlinkPeerRequest mock_unlink_peer_request;
+ auto it = mock_image_ctx.snap_info.rbegin();
+ auto snap_id = it->first;
+ expect_unlink_peer(mock_image_ctx, mock_unlink_peer_request, snap_id, "uuid1",
+ true, 0);
+ expect_unlink_peer(mock_image_ctx, mock_unlink_peer_request, snap_id, "uuid2",
+ true, 0);
C_SaferCond ctx;
auto req = new MockCreatePrimaryRequest(&mock_image_ctx, "gid", CEPH_NOSNAP,
0U, 0U, nullptr, &ctx);
ASSERT_EQ(0, m_rbd.mirror_peer_site_add(m_ioctx, &peer_uuid,
RBD_MIRROR_PEER_DIRECTION_RX_TX,
"cluster", "client"));
+ // The mirroring was enabled when no peer was configured. Therefore, the
+ // initial snapshot has no peers linked and will be removed after the
+ // creation of a new mirror snapshot.
ASSERT_EQ(0, image.mirror_image_create_snapshot(&snap_id));
vector<librbd::snap_info_t> snaps;
ASSERT_EQ(0, image.snap_list(snaps));
- ASSERT_EQ(2U, snaps.size());
- ASSERT_EQ(snaps[1].id, snap_id);
+ ASSERT_EQ(1U, snaps.size());
+ ASSERT_EQ(snaps[0].id, snap_id);
+ ASSERT_EQ(0, image.mirror_image_create_snapshot(&snap_id));
ASSERT_EQ(0, image.mirror_image_create_snapshot(&snap_id));
ASSERT_EQ(0, image.mirror_image_create_snapshot(&snap_id));
snaps.clear();
assert(not image.is_exclusive_lock_owner())
assert(list(image.list_snaps()) == [])
- print("update_features")
- assert((image.features() & RBD_FEATURE_OBJECT_MAP) != 0)
- image.update_features(RBD_FEATURE_OBJECT_MAP, False)
- assert(not image.is_exclusive_lock_owner())
- assert((image.features() & RBD_FEATURE_OBJECT_MAP) == 0)
- image.update_features(RBD_FEATURE_OBJECT_MAP, True)
- assert(not image.is_exclusive_lock_owner())
- assert((image.features() & RBD_FEATURE_OBJECT_MAP) != 0)
- assert((image.flags() & RBD_FLAG_OBJECT_MAP_INVALID) != 0)
-
print("rebuild object map")
image.rebuild_object_map()
assert(not image.is_exclusive_lock_owner())
assert((image.flags() & RBD_FLAG_OBJECT_MAP_INVALID) == 0)
+ if 'RBD_DISABLE_UPDATE_FEATURES' not in os.environ:
+ print("update_features")
+ assert((image.features() & RBD_FEATURE_OBJECT_MAP) != 0)
+ image.update_features(RBD_FEATURE_OBJECT_MAP, False)
+ assert(not image.is_exclusive_lock_owner())
+ assert((image.features() & RBD_FEATURE_OBJECT_MAP) == 0)
+ image.update_features(RBD_FEATURE_OBJECT_MAP, True)
+ assert(not image.is_exclusive_lock_owner())
+ assert((image.features() & RBD_FEATURE_OBJECT_MAP) != 0)
+ assert((image.flags() & RBD_FLAG_OBJECT_MAP_INVALID) != 0)
+
print("write")
data = os.urandom(512)
image.write(data, 0)
ASSERT_EQ(alloc->get_free(), (uint64_t) 0);
}
+TEST_P(AllocTest, test_init_add_free)
+{
+ int64_t block_size = 1024;
+ int64_t capacity = 4 * 1024 * block_size;
+
+ {
+ init_alloc(capacity, block_size);
+
+ auto free = alloc->get_free();
+ alloc->init_add_free(block_size, 0);
+ ASSERT_EQ(free, alloc->get_free());
+
+ alloc->init_rm_free(block_size, 0);
+ ASSERT_EQ(free, alloc->get_free());
+ }
+}
+
TEST_P(AllocTest, test_alloc_min_alloc)
{
int64_t block_size = 1024;
EXPECT_EQ(got, 0x630000);
}
+TEST_P(AllocTest, test_alloc_50656_best_fit)
+{
+ uint64_t block = 0x1000;
+ uint64_t size = 0x3b9e400000;
+
+ init_alloc(size, block);
+
+ // too few free extents - causes best fit mode for avls
+ for (size_t i = 0; i < 0x10; i++) {
+ alloc->init_add_free(i * 2 * 0x100000, 0x100000);
+ }
+
+ alloc->init_add_free(0x1e1bd13000, 0x404000);
+
+ PExtentVector extents;
+ auto need = 0x400000;
+ auto got = alloc->allocate(need, 0x10000, 0, (int64_t)0, &extents);
+ EXPECT_GT(got, 0);
+ EXPECT_EQ(got, 0x400000);
+}
+
+TEST_P(AllocTest, test_alloc_50656_first_fit)
+{
+ uint64_t block = 0x1000;
+ uint64_t size = 0x3b9e400000;
+
+ init_alloc(size, block);
+
+ for (size_t i = 0; i < 0x10000; i += 2) {
+ alloc->init_add_free(i * 0x100000, 0x100000);
+ }
+
+ alloc->init_add_free(0x1e1bd13000, 0x404000);
+
+ PExtentVector extents;
+ auto need = 0x400000;
+ auto got = alloc->allocate(need, 0x10000, 0, (int64_t)0, &extents);
+ EXPECT_GT(got, 0);
+ EXPECT_EQ(got, 0x400000);
+}
+
INSTANTIATE_TEST_SUITE_P(
Allocator,
AllocTest,
continue;
}
+ string alloc_type = "bitmap";
sp = strstr(s, "BitmapAllocator");
+ if (!sp) {
+ alloc_type = "avl";
+ sp = strstr(s, "AvlAllocator");
+ }
+ if (!sp) {
+ alloc_type = "hybrid";
+ sp = strstr(s, "HybridAllocator");
+ }
+ if (!sp) {
+ alloc_type = "stupid";
+ sp = strstr(s, "StupidAllocator");
+ }
if (sp) {
// 2019-05-30 03:23:43.460 7f889a5edf00 10 fbmap_alloc 0x5642ed36e900 BitmapAllocator 0x15940000000/100000
std::cout << s << std::endl;
std::cerr << "error: invalid init: " << s << std::endl;
return -1;
}
- alloc.reset(Allocator::create(g_ceph_context, string("bitmap"), total,
+ alloc.reset(Allocator::create(g_ceph_context, alloc_type, total,
alloc_unit));
owned_by_app.insert(0, total);
}
+TEST_P(StoreTestSpecificAUSize, BluestoreBrokenZombieRepairTest) {
+ if (string(GetParam()) != "bluestore")
+ return;
+
+ SetVal(g_conf(), "bluestore_fsck_on_mount", "false");
+ SetVal(g_conf(), "bluestore_fsck_on_umount", "false");
+
+ StartDeferred(0x10000);
+
+ BlueStore* bstore = dynamic_cast<BlueStore*> (store.get());
+
+ int r;
+
+ cerr << "initializing" << std::endl;
+ {
+ const size_t col_count = 16;
+ const size_t obj_count = 1024;
+ ObjectStore::CollectionHandle ch[col_count];
+ ghobject_t hoid[col_count][obj_count];
+
+ unique_ptr<coll_t> cid[col_count];
+
+ for (size_t i = 0; i < col_count; i++) {
+ cid[i].reset(new coll_t(spg_t(pg_t(0, i), shard_id_t::NO_SHARD)));
+ ch[i] = store->create_new_collection(*cid[i]);
+ for (size_t j = 0; j < obj_count; j++) {
+ hoid[i][j] = make_object(stringify(j).c_str(), i);
+ }
+ }
+
+ for (size_t i = 0; i < col_count; i++) {
+ ObjectStore::Transaction t;
+ t.create_collection(*cid[i], 0);
+ r = queue_transaction(store, ch[i], std::move(t));
+ ASSERT_EQ(r, 0);
+ }
+ cerr << "onode preparing" << std::endl;
+ bufferlist bl;
+ string s(0x1000, 'a');
+ bl.append(s);
+
+ for (size_t i = 0; i < col_count; i++) {
+ for (size_t j = 0; j < obj_count; j++) {
+ ObjectStore::Transaction t;
+ t.write(*cid[i], hoid[i][j], bl.length(), bl.length(), bl);
+ r = queue_transaction(store, ch[i], std::move(t));
+ ASSERT_EQ(r, 0);
+ }
+ }
+ cerr << "Zombie spanning blob injection" << std::endl;
+
+ sleep(5);
+
+ for (size_t i = 0; i < col_count; i++) {
+ for (size_t j = 0; j < obj_count; j++) {
+ bstore->inject_zombie_spanning_blob(*cid[i], hoid[i][j], 12345);
+ }
+ }
+
+ cerr << "fscking/fixing" << std::endl;
+ bstore->umount();
+ ASSERT_EQ(bstore->fsck(false), col_count * obj_count);
+ ASSERT_LE(bstore->quick_fix(), 0);
+ ASSERT_EQ(bstore->fsck(false), 0);
+ }
+
+ cerr << "Completing" << std::endl;
+ bstore->mount();
+}
+
TEST_P(StoreTest, BluestoreRepairGlobalStats) {
if (string(GetParam()) != "bluestore")
return;
-add_ceph_test(test_ceph_daemon.py ${CMAKE_CURRENT_SOURCE_DIR}/test_ceph_daemon.py)
-add_ceph_test(test_ceph_argparse.py ${CMAKE_CURRENT_SOURCE_DIR}/test_ceph_argparse.py)
+add_ceph_test(test_ceph_daemon.py
+ ${Python3_EXECUTABLE} -m nose ${CMAKE_CURRENT_SOURCE_DIR}/test_ceph_daemon.py)
+add_ceph_test(test_ceph_argparse.py
+ ${Python3_EXECUTABLE} -m nose ${CMAKE_CURRENT_SOURCE_DIR}/test_ceph_argparse.py)
#!/usr/bin/env python3
-# -*- mode:python; tab-width:4; indent-tabs-mode:t; coding:utf-8 -*-
+# -*- mode:python; tab-width:4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim: ts=4 sw=4 smarttab expandtab fileencoding=utf-8
#
# Ceph - scalable distributed file system
# version 2.1 of the License, or (at your option) any later version.
#
-from nose.tools import eq_ as eq
-from nose.tools import *
+from nose.tools import assert_equal, assert_raises, \
+ assert_not_in, assert_in, \
+ assert_regexp_matches, \
+ nottest
from unittest import TestCase
from ceph_argparse import validate_command, parse_json_funcsigs, validate, \
import re
import string
import sys
-import json
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
+
def get_command_descriptions(what):
CEPH_BIN = os.environ['CEPH_BIN']
if CEPH_BIN == "":
CEPH_BIN = "."
return os.popen(CEPH_BIN + "/get_command_descriptions " + "--" + what).read()
+
def test_parse_json_funcsigs():
commands = get_command_descriptions("all")
cmd_json = parse_json_funcsigs(commands, 'cli')
commands = get_command_descriptions("pull585")
assert_raises(TypeError, parse_json_funcsigs, commands, 'cli')
+
sigdict = parse_json_funcsigs(get_command_descriptions("all"), 'cli')
self.assert_valid_command(['pg', 'getmap'])
def test_dump(self):
- self.assert_valid_command(['pg', 'dump'])
- self.assert_valid_command(['pg', 'dump',
- 'all',
- 'summary',
- 'sum',
- 'delta',
- 'pools',
- 'osds',
- 'pgs',
- 'pgs_brief'])
- assert_equal({}, validate_command(sigdict, ['pg', 'dump', 'invalid']))
+ valid_commands = {
+ 'pg dump': {'prefix': 'pg dump'},
+ 'pg dump all summary sum delta pools osds pgs pgs_brief':
+ {'prefix': 'pg dump',
+ 'dumpcontents':
+ 'all summary sum delta pools osds pgs pgs_brief'.split()
+ },
+ 'pg dump --dumpcontents summary,sum':
+ {'prefix': 'pg dump',
+ 'dumpcontents': 'summary,sum'.split(',')
+ }
+ }
+ for command, expected_result in valid_commands.items():
+ actual_result = validate_command(sigdict, command.split())
+ expected_result['target'] = ('mon-mgr', '')
+ assert_equal(expected_result, actual_result)
+ invalid_commands = ['pg dump invalid']
+ for command in invalid_commands:
+ actual_result = validate_command(sigdict, command.split())
+ assert_equal({}, actual_result)
def test_dump_json(self):
self.assert_valid_command(['pg', 'dump_json'])
def test_get_or_create_key(self):
self.check_1_or_more_string_args('auth', 'get-or-create-key')
+ prefix = 'auth get-or-create-key'
+ entity = 'client.test'
+ caps = ['mon',
+ 'allow r',
+ 'osd',
+ 'allow rw pool=nfs-ganesha namespace=test, allow rw tag cephfs data=user_test_fs',
+ 'mds',
+ 'allow rw path=/']
+ cmd = prefix.split() + [entity] + caps
+ assert_equal(
+ {
+ 'prefix': prefix,
+ 'entity': entity,
+ 'caps': caps
+ }, validate_command(sigdict, cmd))
def test_get_or_create(self):
self.check_1_or_more_string_args('auth', 'get-or-create')
def test_compact(self):
self.assert_valid_command(['compact'])
- def test_scrub(self):
- self.assert_valid_command(['scrub'])
-
def test_fsid(self):
self.assert_valid_command(['fsid'])
def test_osd_tree(self):
self.check_0_or_1_natural_arg('osd', 'tree')
+ cmd = 'osd tree down,out'
+ assert_equal(
+ {
+ 'prefix': 'osd tree',
+ 'states': ['down', 'out']
+ }, validate_command(sigdict, cmd.split()))
def test_osd_ls(self):
self.check_0_or_1_natural_arg('osd', 'ls')
'toomany']))
def test_tier_cache_mode(self):
- for mode in ('none', 'writeback', 'forward', 'readonly', 'readforward', 'readproxy'):
+ for mode in ('none', 'writeback', 'readonly', 'readproxy'):
self.assert_valid_command(['osd', 'tier', 'cache-mode',
'poolname', mode])
assert_equal({}, validate_command(sigdict, ['osd', 'tier',
self.sig = parse_funcsig(self.prefix + self.args_dict)
+ @nottest
def arg_kwarg_test(self, prefix, args, sig, arg_type=0):
"""
Runs validate in different arg/kargs ways.
a_type = arg_type
if a_type == self.MIXED:
a_type = random.choice((self.ARGS,
- self.KWARGS,
- self.KWARGS_EQ))
+ self.KWARGS,
+ self.KWARGS_EQ))
if a_type == self.ARGS:
final_args.append(v)
elif a_type == self.KWARGS:
# remove directory
cephfs.rmdir("/dir-1")
+
+@with_setup(setup_test)
+def test_set_mount_timeout_post_mount():
+ assert_raises(libcephfs.LibCephFSStateError, cephfs.set_mount_timeout, 5)
+
+@with_setup(setup_test)
+def test_set_mount_timeout():
+ cephfs.unmount()
+ cephfs.set_mount_timeout(5)
+ cephfs.mount()
+
+@with_setup(setup_test)
+def test_set_mount_timeout_lt0():
+ cephfs.unmount()
+ assert_raises(libcephfs.InvalidValue, cephfs.set_mount_timeout, -5)
+ cephfs.mount()
#include "include/scope_guard.h"
#include "include/types.h"
#include "include/rados/librados.hpp"
+#include "common/ceph_context.h"
#include "cls/fifo/cls_fifo_ops.h"
#include "test/librados/test_cxx.h"
namespace fifo = rados::cls::fifo;
namespace RCf = rgw::cls::fifo;
+auto cct = new CephContext(CEPH_ENTITY_TYPE_CLIENT);
+const DoutPrefix dp(cct, 1, "test legacy cls fifo: ");
+
namespace {
-int fifo_create(R::IoCtx& ioctx,
+int fifo_create(const DoutPrefixProvider *dpp, R::IoCtx& ioctx,
const std::string& oid,
std::string_view id,
optional_yield y,
R::ObjectWriteOperation op;
RCf::create_meta(&op, id, objv, oid_prefix, exclusive, max_part_size,
max_entry_size);
- return rgw_rados_operate(ioctx, oid, &op, y);
+ return rgw_rados_operate(dpp, ioctx, oid, &op, y);
}
}
TEST_F(LegacyClsFIFO, TestCreate)
{
- auto r = fifo_create(ioctx, fifo_id, ""s, null_yield);
+ auto r = fifo_create(&dp, ioctx, fifo_id, ""s, null_yield);
EXPECT_EQ(-EINVAL, r);
- r = fifo_create(ioctx, fifo_id, fifo_id, null_yield, std::nullopt,
+ r = fifo_create(&dp, ioctx, fifo_id, fifo_id, null_yield, std::nullopt,
std::nullopt, false, 0);
EXPECT_EQ(-EINVAL, r);
- r = fifo_create(ioctx, fifo_id, {}, null_yield,
+ r = fifo_create(&dp, ioctx, fifo_id, {}, null_yield,
std::nullopt, std::nullopt,
false, RCf::default_max_part_size, 0);
EXPECT_EQ(-EINVAL, r);
- r = fifo_create(ioctx, fifo_id, fifo_id, null_yield);
+ r = fifo_create(&dp, ioctx, fifo_id, fifo_id, null_yield);
EXPECT_EQ(0, r);
std::uint64_t size;
ioctx.stat(fifo_id, &size, nullptr);
EXPECT_GT(size, 0);
/* test idempotency */
- r = fifo_create(ioctx, fifo_id, fifo_id, null_yield);
+ r = fifo_create(&dp, ioctx, fifo_id, fifo_id, null_yield);
EXPECT_EQ(0, r);
- r = fifo_create(ioctx, fifo_id, {}, null_yield, std::nullopt,
+ r = fifo_create(&dp, ioctx, fifo_id, {}, null_yield, std::nullopt,
std::nullopt, false);
EXPECT_EQ(-EINVAL, r);
- r = fifo_create(ioctx, fifo_id, {}, null_yield, std::nullopt,
+ r = fifo_create(&dp, ioctx, fifo_id, {}, null_yield, std::nullopt,
"myprefix"sv, false);
EXPECT_EQ(-EINVAL, r);
- r = fifo_create(ioctx, fifo_id, "foo"sv, null_yield,
+ r = fifo_create(&dp, ioctx, fifo_id, "foo"sv, null_yield,
std::nullopt, std::nullopt, false);
EXPECT_EQ(-EEXIST, r);
}
TEST_F(LegacyClsFIFO, TestGetInfo)
{
- auto r = fifo_create(ioctx, fifo_id, fifo_id, null_yield);
+ auto r = fifo_create(&dp, ioctx, fifo_id, fifo_id, null_yield);
fifo::info info;
std::uint32_t part_header_size;
std::uint32_t part_entry_overhead;
- r = RCf::get_meta(ioctx, fifo_id, std::nullopt, &info, &part_header_size,
+ r = RCf::get_meta(&dp, ioctx, fifo_id, std::nullopt, &info, &part_header_size,
&part_entry_overhead, 0, null_yield);
EXPECT_EQ(0, r);
EXPECT_GT(part_header_size, 0);
EXPECT_GT(part_entry_overhead, 0);
EXPECT_FALSE(info.version.instance.empty());
- r = RCf::get_meta(ioctx, fifo_id, info.version, &info, &part_header_size,
+ r = RCf::get_meta(&dp, ioctx, fifo_id, info.version, &info, &part_header_size,
&part_entry_overhead, 0, null_yield);
EXPECT_EQ(0, r);
fifo::objv objv;
objv.instance = "foo";
objv.ver = 12;
- r = RCf::get_meta(ioctx, fifo_id, objv, &info, &part_header_size,
+ r = RCf::get_meta(&dp, ioctx, fifo_id, objv, &info, &part_header_size,
&part_entry_overhead, 0, null_yield);
EXPECT_EQ(-ECANCELED, r);
}
TEST_F(LegacyFIFO, TestOpenDefault)
{
std::unique_ptr<RCf::FIFO> fifo;
- auto r = RCf::FIFO::create(ioctx, fifo_id, &fifo, null_yield);
+ auto r = RCf::FIFO::create(&dp, ioctx, fifo_id, &fifo, null_yield);
ASSERT_EQ(0, r);
// force reading from backend
- r = fifo->read_meta(null_yield);
+ r = fifo->read_meta(&dp, null_yield);
EXPECT_EQ(0, r);
auto info = fifo->meta();
EXPECT_EQ(info.id, fifo_id);
/* first successful create */
std::unique_ptr<RCf::FIFO> f;
- auto r = RCf::FIFO::create(ioctx, fifo_id, &f, null_yield, objv, oid_prefix,
+ auto r = RCf::FIFO::create(&dp, ioctx, fifo_id, &f, null_yield, objv, oid_prefix,
false, max_part_size, max_entry_size);
ASSERT_EQ(0, r);
/* force reading from backend */
- r = f->read_meta(null_yield);
+ r = f->read_meta(&dp, null_yield);
auto info = f->meta();
EXPECT_EQ(info.id, fifo_id);
EXPECT_EQ(info.params.max_part_size, max_part_size);
TEST_F(LegacyFIFO, TestPushListTrim)
{
std::unique_ptr<RCf::FIFO> f;
- auto r = RCf::FIFO::create(ioctx, fifo_id, &f, null_yield);
+ auto r = RCf::FIFO::create(&dp, ioctx, fifo_id, &f, null_yield);
ASSERT_EQ(0, r);
static constexpr auto max_entries = 10u;
for (uint32_t i = 0; i < max_entries; ++i) {
cb::list bl;
encode(i, bl);
- r = f->push(bl, null_yield);
+ r = f->push(&dp, bl, null_yield);
ASSERT_EQ(0, r);
}
bool more = false;
for (auto i = 0u; i < max_entries; ++i) {
- r = f->list(1, marker, &result, &more, null_yield);
+ r = f->list(&dp, 1, marker, &result, &more, null_yield);
ASSERT_EQ(0, r);
bool expected_more = (i != (max_entries - 1));
/* get all entries at once */
std::string markers[max_entries];
std::uint32_t min_entry = 0;
- r = f->list(max_entries * 10, std::nullopt, &result, &more, null_yield);
+ r = f->list(&dp, max_entries * 10, std::nullopt, &result, &more, null_yield);
ASSERT_EQ(0, r);
ASSERT_FALSE(more);
}
/* trim one entry */
- r = f->trim(markers[min_entry], false, null_yield);
+ r = f->trim(&dp, markers[min_entry], false, null_yield);
ASSERT_EQ(0, r);
++min_entry;
- r = f->list(max_entries * 10, std::nullopt, &result, &more, null_yield);
+ r = f->list(&dp, max_entries * 10, std::nullopt, &result, &more, null_yield);
ASSERT_EQ(0, r);
ASSERT_FALSE(more);
ASSERT_EQ(max_entries - min_entry, result.size());
static constexpr auto max_entry_size = 128ull;
std::unique_ptr<RCf::FIFO> f;
- auto r = RCf::FIFO::create(ioctx, fifo_id, &f, null_yield, std::nullopt,
+ auto r = RCf::FIFO::create(&dp, ioctx, fifo_id, &f, null_yield, std::nullopt,
std::nullopt, false, max_part_size, max_entry_size);
ASSERT_EQ(0, r);
cb::list bl;
bl.append(buf, sizeof(buf));
- r = f->push(bl, null_yield);
+ r = f->push(&dp, bl, null_yield);
EXPECT_EQ(-E2BIG, r);
}
static constexpr auto max_part_size = 2048ull;
static constexpr auto max_entry_size = 128ull;
std::unique_ptr<RCf::FIFO> f;
- auto r = RCf::FIFO::create(ioctx, fifo_id, &f, null_yield, std::nullopt,
+ auto r = RCf::FIFO::create(&dp, ioctx, fifo_id, &f, null_yield, std::nullopt,
std::nullopt, false, max_part_size,
max_entry_size);
ASSERT_EQ(0, r);
cb::list bl;
*(int *)buf = i;
bl.append(buf, sizeof(buf));
- r = f->push(bl, null_yield);
+ r = f->push(&dp, bl, null_yield);
ASSERT_EQ(0, r);
}
/* list all at once */
std::vector<RCf::list_entry> result;
bool more = false;
- r = f->list(max_entries, std::nullopt, &result, &more, null_yield);
+ r = f->list(&dp, max_entries, std::nullopt, &result, &more, null_yield);
ASSERT_EQ(0, r);
EXPECT_EQ(false, more);
ASSERT_EQ(max_entries, result.size());
/* get entries one by one */
for (auto i = 0u; i < max_entries; ++i) {
- r = f->list(1, marker, &result, &more, null_yield);
+ r = f->list(&dp, 1, marker, &result, &more, null_yield);
ASSERT_EQ(0, r);
ASSERT_EQ(result.size(), 1);
const bool expected_more = (i != (max_entries - 1));
marker.reset();
for (auto i = 0u; i < max_entries; ++i) {
/* read single entry */
- r = f->list(1, marker, &result, &more, null_yield);
+ r = f->list(&dp, 1, marker, &result, &more, null_yield);
ASSERT_EQ(0, r);
ASSERT_EQ(result.size(), 1);
const bool expected_more = (i != (max_entries - 1));
ASSERT_EQ(expected_more, more);
marker = result.front().marker;
- r = f->trim(*marker, false, null_yield);
+ r = f->trim(&dp, *marker, false, null_yield);
ASSERT_EQ(0, r);
/* check tail */
ASSERT_EQ(info.tail_part_num, i / entries_per_part);
/* try to read all again, see how many entries left */
- r = f->list(max_entries, marker, &result, &more, null_yield);
+ r = f->list(&dp, max_entries, marker, &result, &more, null_yield);
ASSERT_EQ(max_entries - i - 1, result.size());
ASSERT_EQ(false, more);
}
RCf::part_info partinfo;
/* check old tails are removed */
for (auto i = 0; i < info.tail_part_num; ++i) {
- r = f->get_part_info(i, &partinfo, null_yield);
+ r = f->get_part_info(&dp, i, &partinfo, null_yield);
ASSERT_EQ(-ENOENT, r);
}
/* check current tail exists */
- r = f->get_part_info(info.tail_part_num, &partinfo, null_yield);
+ r = f->get_part_info(&dp, info.tail_part_num, &partinfo, null_yield);
ASSERT_EQ(0, r);
}
static constexpr auto max_entry_size = 128ull;
std::unique_ptr<RCf::FIFO> f;
- auto r = RCf::FIFO::create(ioctx, fifo_id, &f, null_yield, std::nullopt,
+ auto r = RCf::FIFO::create(&dp, ioctx, fifo_id, &f, null_yield, std::nullopt,
std::nullopt, false, max_part_size,
max_entry_size);
ASSERT_EQ(0, r);
(max_entry_size + part_entry_overhead));
const auto max_entries = entries_per_part * 4 + 1;
std::unique_ptr<RCf::FIFO> f2;
- r = RCf::FIFO::open(ioctx, fifo_id, &f2, null_yield);
+ r = RCf::FIFO::open(&dp, ioctx, fifo_id, &f2, null_yield);
std::vector fifos{&f, &f2};
for (auto i = 0u; i < max_entries; ++i) {
*(int *)buf = i;
bl.append(buf, sizeof(buf));
auto& f = *fifos[i % fifos.size()];
- r = f->push(bl, null_yield);
+ r = f->push(&dp, bl, null_yield);
ASSERT_EQ(0, r);
}
/* list all by both */
std::vector<RCf::list_entry> result;
bool more = false;
- r = f2->list(max_entries, std::nullopt, &result, &more, null_yield);
+ r = f2->list(&dp, max_entries, std::nullopt, &result, &more, null_yield);
ASSERT_EQ(0, r);
ASSERT_EQ(false, more);
ASSERT_EQ(max_entries, result.size());
- r = f2->list(max_entries, std::nullopt, &result, &more, null_yield);
+ r = f2->list(&dp, max_entries, std::nullopt, &result, &more, null_yield);
ASSERT_EQ(0, r);
ASSERT_EQ(false, more);
ASSERT_EQ(max_entries, result.size());
static constexpr auto max_part_size = 2048ull;
static constexpr auto max_entry_size = 128ull;
std::unique_ptr<RCf::FIFO> f1;
- auto r = RCf::FIFO::create(ioctx, fifo_id, &f1, null_yield, std::nullopt,
+ auto r = RCf::FIFO::create(&dp, ioctx, fifo_id, &f1, null_yield, std::nullopt,
std::nullopt, false, max_part_size,
max_entry_size);
ASSERT_EQ(0, r);
const auto max_entries = entries_per_part * 4 + 1;
std::unique_ptr<RCf::FIFO> f2;
- r = RCf::FIFO::open(ioctx, fifo_id, &f2, null_yield);
+ r = RCf::FIFO::open(&dp, ioctx, fifo_id, &f2, null_yield);
ASSERT_EQ(0, r);
/* push one entry to f2 and the rest to f1 */
*(int *)buf = i;
bl.append(buf, sizeof(buf));
auto& f = (i < 1 ? f2 : f1);
- r = f->push(bl, null_yield);
+ r = f->push(&dp, bl, null_yield);
ASSERT_EQ(0, r);
}
std::string marker;
std::vector<RCf::list_entry> result;
bool more = false;
- r = f1->list(num, std::nullopt, &result, &more, null_yield);
+ r = f1->list(&dp, num, std::nullopt, &result, &more, null_yield);
ASSERT_EQ(0, r);
ASSERT_EQ(true, more);
ASSERT_EQ(num, result.size());
auto& entry = result[num - 1];
marker = entry.marker;
- r = f1->trim(marker, false, null_yield);
+ r = f1->trim(&dp, marker, false, null_yield);
/* list what's left by fifo2 */
const auto left = max_entries - num;
- f2->list(left, marker, &result, &more, null_yield);
+ f2->list(&dp, left, marker, &result, &more, null_yield);
ASSERT_EQ(left, result.size());
ASSERT_EQ(false, more);
static constexpr auto max_entry_size = 128ull;
std::unique_ptr<RCf::FIFO> f;
- auto r = RCf::FIFO::create(ioctx, fifo_id, &f, null_yield, std::nullopt,
+ auto r = RCf::FIFO::create(&dp, ioctx, fifo_id, &f, null_yield, std::nullopt,
std::nullopt, false, max_part_size,
max_entry_size);
ASSERT_EQ(0, r);
}
ASSERT_EQ(max_entries, bufs.size());
- r = f->push(bufs, null_yield);
+ r = f->push(&dp, bufs, null_yield);
ASSERT_EQ(0, r);
/* list all */
std::vector<RCf::list_entry> result;
bool more = false;
- r = f->list(max_entries, std::nullopt, &result, &more, null_yield);
+ r = f->list(&dp, max_entries, std::nullopt, &result, &more, null_yield);
ASSERT_EQ(0, r);
ASSERT_EQ(false, more);
ASSERT_EQ(max_entries, result.size());
static constexpr auto max_part_size = 2048ull;
static constexpr auto max_entry_size = 128ull;
std::unique_ptr<RCf::FIFO> f;
- auto r = RCf::FIFO::create(ioctx, fifo_id, &f, null_yield, std::nullopt,
+ auto r = RCf::FIFO::create(&dp, ioctx, fifo_id, &f, null_yield, std::nullopt,
std::nullopt, false, max_part_size,
max_entry_size);
ASSERT_EQ(0, r);
}
ASSERT_EQ(max_entries, bufs.size());
- r = f->push(bufs, null_yield);
+ r = f->push(&dp, bufs, null_yield);
ASSERT_EQ(0, r);
auto info = f->meta();
/* list all at once */
std::vector<RCf::list_entry> result;
bool more = false;
- r = f->list(max_entries, std::nullopt, &result, &more, null_yield);
+ r = f->list(&dp, max_entries, std::nullopt, &result, &more, null_yield);
ASSERT_EQ(0, r);
ASSERT_EQ(false, more);
ASSERT_EQ(max_entries, result.size());
marker.reset();
for (auto i = 0u; i < max_entries; ++i) {
/* read single entry */
- r = f->list(1, marker, &result, &more, null_yield);
+ r = f->list(&dp, 1, marker, &result, &more, null_yield);
ASSERT_EQ(0, r);
ASSERT_EQ(result.size(), 1);
const bool expected_more = (i != (max_entries - 1));
marker = result.front().marker;
std::unique_ptr<R::AioCompletion> c(rados.aio_create_completion(nullptr,
nullptr));
- f->trim(*marker, false, c.get());
+ f->trim(&dp, *marker, false, c.get());
c->wait_for_complete();
r = c->get_return_value();
ASSERT_EQ(0, r);
ASSERT_EQ(info.tail_part_num, i / entries_per_part);
/* try to read all again, see how many entries left */
- r = f->list(max_entries, marker, &result, &more, null_yield);
+ r = f->list(&dp, max_entries, marker, &result, &more, null_yield);
ASSERT_EQ(max_entries - i - 1, result.size());
ASSERT_EQ(false, more);
}
RCf::part_info partinfo;
/* check old tails are removed */
for (auto i = 0; i < info.tail_part_num; ++i) {
- r = f->get_part_info(i, &partinfo, null_yield);
+ r = f->get_part_info(&dp, i, &partinfo, null_yield);
ASSERT_EQ(-ENOENT, r);
}
/* check current tail exists */
- r = f->get_part_info(info.tail_part_num, &partinfo, null_yield);
+ r = f->get_part_info(&dp, info.tail_part_num, &partinfo, null_yield);
ASSERT_EQ(0, r);
}
TEST_F(LegacyFIFO, TestTrimExclusive) {
std::unique_ptr<RCf::FIFO> f;
- auto r = RCf::FIFO::create(ioctx, fifo_id, &f, null_yield);
+ auto r = RCf::FIFO::create(&dp, ioctx, fifo_id, &f, null_yield);
ASSERT_EQ(0, r);
std::vector<RCf::list_entry> result;
bool more = false;
for (uint32_t i = 0; i < max_entries; ++i) {
cb::list bl;
encode(i, bl);
- f->push(bl, null_yield);
+ f->push(&dp, bl, null_yield);
}
- f->list(1, std::nullopt, &result, &more, null_yield);
+ f->list(&dp, 1, std::nullopt, &result, &more, null_yield);
auto [val, marker] = decode_entry<std::uint32_t>(result.front());
ASSERT_EQ(0, val);
- f->trim(marker, true, null_yield);
+ f->trim(&dp, marker, true, null_yield);
result.clear();
- f->list(max_entries, std::nullopt, &result, &more, null_yield);
+ f->list(&dp, max_entries, std::nullopt, &result, &more, null_yield);
std::tie(val, marker) = decode_entry<std::uint32_t>(result.front());
ASSERT_EQ(0, val);
- f->trim(result[4].marker, true, null_yield);
+ f->trim(&dp, result[4].marker, true, null_yield);
result.clear();
- f->list(max_entries, std::nullopt, &result, &more, null_yield);
+ f->list(&dp, max_entries, std::nullopt, &result, &more, null_yield);
std::tie(val, marker) = decode_entry<std::uint32_t>(result.front());
ASSERT_EQ(4, val);
- f->trim(result.back().marker, true, null_yield);
+ f->trim(&dp, result.back().marker, true, null_yield);
result.clear();
- f->list(max_entries, std::nullopt, &result, &more, null_yield);
+ f->list(&dp, max_entries, std::nullopt, &result, &more, null_yield);
std::tie(val, marker) = decode_entry<std::uint32_t>(result.front());
ASSERT_EQ(result.size(), 1);
ASSERT_EQ(max_entries - 1, val);
TEST_F(AioLegacyFIFO, TestPushListTrim)
{
std::unique_ptr<RCf::FIFO> f;
- auto r = RCf::FIFO::create(ioctx, fifo_id, &f, null_yield);
+ auto r = RCf::FIFO::create(&dp, ioctx, fifo_id, &f, null_yield);
ASSERT_EQ(0, r);
static constexpr auto max_entries = 10u;
for (uint32_t i = 0; i < max_entries; ++i) {
cb::list bl;
encode(i, bl);
auto c = R::Rados::aio_create_completion();
- f->push(bl, c);
+ f->push(&dp, bl, c);
c->wait_for_complete();
r = c->get_return_value();
c->release();
bool more = false;
for (auto i = 0u; i < max_entries; ++i) {
auto c = R::Rados::aio_create_completion();
- f->list(1, marker, &result, &more, c);
+ f->list(&dp, 1, marker, &result, &more, c);
c->wait_for_complete();
r = c->get_return_value();
c->release();
std::string markers[max_entries];
std::uint32_t min_entry = 0;
auto c = R::Rados::aio_create_completion();
- f->list(max_entries * 10, std::nullopt, &result, &more, c);
+ f->list(&dp, max_entries * 10, std::nullopt, &result, &more, c);
c->wait_for_complete();
r = c->get_return_value();
c->release();
/* trim one entry */
c = R::Rados::aio_create_completion();
- f->trim(markers[min_entry], false, c);
+ f->trim(&dp, markers[min_entry], false, c);
c->wait_for_complete();
r = c->get_return_value();
c->release();
++min_entry;
c = R::Rados::aio_create_completion();
- f->list(max_entries * 10, std::nullopt, &result, &more, c);
+ f->list(&dp, max_entries * 10, std::nullopt, &result, &more, c);
c->wait_for_complete();
r = c->get_return_value();
c->release();
static constexpr auto max_entry_size = 128ull;
std::unique_ptr<RCf::FIFO> f;
- auto r = RCf::FIFO::create(ioctx, fifo_id, &f, null_yield, std::nullopt,
+ auto r = RCf::FIFO::create(&dp, ioctx, fifo_id, &f, null_yield, std::nullopt,
std::nullopt, false, max_part_size, max_entry_size);
ASSERT_EQ(0, r);
bl.append(buf, sizeof(buf));
auto c = R::Rados::aio_create_completion();
- f->push(bl, c);
+ f->push(&dp, bl, c);
c->wait_for_complete();
r = c->get_return_value();
ASSERT_EQ(-E2BIG, r);
c->release();
c = R::Rados::aio_create_completion();
- f->push(std::vector<cb::list>{}, c);
+ f->push(&dp, std::vector<cb::list>{}, c);
c->wait_for_complete();
r = c->get_return_value();
c->release();
static constexpr auto max_part_size = 2048ull;
static constexpr auto max_entry_size = 128ull;
std::unique_ptr<RCf::FIFO> f;
- auto r = RCf::FIFO::create(ioctx, fifo_id, &f, null_yield, std::nullopt,
+ auto r = RCf::FIFO::create(&dp, ioctx, fifo_id, &f, null_yield, std::nullopt,
std::nullopt, false, max_part_size,
max_entry_size);
ASSERT_EQ(0, r);
{
auto c = R::Rados::aio_create_completion();
- f->get_head_info([&](int r, RCf::part_info&& p) {
+ f->get_head_info(&dp, [&](int r, RCf::part_info&& p) {
ASSERT_TRUE(p.tag.empty());
ASSERT_EQ(0, p.magic);
ASSERT_EQ(0, p.min_ofs);
*(int *)buf = i;
bl.append(buf, sizeof(buf));
auto c = R::Rados::aio_create_completion();
- f->push(bl, c);
+ f->push(&dp, bl, c);
c->wait_for_complete();
r = c->get_return_value();
c->release();
std::vector<RCf::list_entry> result;
bool more = false;
auto c = R::Rados::aio_create_completion();
- f->list(max_entries, std::nullopt, &result, &more, c);
+ f->list(&dp, max_entries, std::nullopt, &result, &more, c);
c->wait_for_complete();
r = c->get_return_value();
c->release();
for (auto i = 0u; i < max_entries; ++i) {
c = R::Rados::aio_create_completion();
- f->list(1, marker, &result, &more, c);
+ f->list(&dp, 1, marker, &result, &more, c);
c->wait_for_complete();
r = c->get_return_value();
c->release();
for (auto i = 0u; i < max_entries; ++i) {
/* read single entry */
c = R::Rados::aio_create_completion();
- f->list(1, marker, &result, &more, c);
+ f->list(&dp, 1, marker, &result, &more, c);
c->wait_for_complete();
r = c->get_return_value();
c->release();
marker = result.front().marker;
c = R::Rados::aio_create_completion();
- f->trim(*marker, false, c);
+ f->trim(&dp, *marker, false, c);
c->wait_for_complete();
r = c->get_return_value();
c->release();
/* try to read all again, see how many entries left */
c = R::Rados::aio_create_completion();
- f->list(max_entries, marker, &result, &more, c);
+ f->list(&dp, max_entries, marker, &result, &more, c);
c->wait_for_complete();
r = c->get_return_value();
c->release();
ASSERT_EQ(0, r);
c = R::Rados::aio_create_completion();
- f->get_head_info([&](int r, RCf::part_info&& p) {
+ f->get_head_info(&dp, [&](int r, RCf::part_info&& p) {
ASSERT_EQ(next_ofs, p.next_ofs);
}, c);
c->wait_for_complete();
static constexpr auto max_entry_size = 128ull;
std::unique_ptr<RCf::FIFO> f;
- auto r = RCf::FIFO::create(ioctx, fifo_id, &f, null_yield, std::nullopt,
+ auto r = RCf::FIFO::create(&dp, ioctx, fifo_id, &f, null_yield, std::nullopt,
std::nullopt, false, max_part_size,
max_entry_size);
ASSERT_EQ(0, r);
(max_entry_size + part_entry_overhead));
const auto max_entries = entries_per_part * 4 + 1;
std::unique_ptr<RCf::FIFO> f2;
- r = RCf::FIFO::open(ioctx, fifo_id, &f2, null_yield);
+ r = RCf::FIFO::open(&dp, ioctx, fifo_id, &f2, null_yield);
std::vector fifos{&f, &f2};
for (auto i = 0u; i < max_entries; ++i) {
bl.append(buf, sizeof(buf));
auto& f = *fifos[i % fifos.size()];
auto c = R::Rados::aio_create_completion();
- f->push(bl, c);
+ f->push(&dp, bl, c);
c->wait_for_complete();
r = c->get_return_value();
c->release();
std::vector<RCf::list_entry> result;
bool more = false;
auto c = R::Rados::aio_create_completion();
- f2->list(max_entries, std::nullopt, &result, &more, c);
+ f2->list(&dp, max_entries, std::nullopt, &result, &more, c);
c->wait_for_complete();
r = c->get_return_value();
c->release();
ASSERT_EQ(max_entries, result.size());
c = R::Rados::aio_create_completion();
- f2->list(max_entries, std::nullopt, &result, &more, c);
+ f2->list(&dp, max_entries, std::nullopt, &result, &more, c);
c->wait_for_complete();
r = c->get_return_value();
c->release();
static constexpr auto max_part_size = 2048ull;
static constexpr auto max_entry_size = 128ull;
std::unique_ptr<RCf::FIFO> f1;
- auto r = RCf::FIFO::create(ioctx, fifo_id, &f1, null_yield, std::nullopt,
+ auto r = RCf::FIFO::create(&dp, ioctx, fifo_id, &f1, null_yield, std::nullopt,
std::nullopt, false, max_part_size,
max_entry_size);
ASSERT_EQ(0, r);
const auto max_entries = entries_per_part * 4 + 1;
std::unique_ptr<RCf::FIFO> f2;
- r = RCf::FIFO::open(ioctx, fifo_id, &f2, null_yield);
+ r = RCf::FIFO::open(&dp, ioctx, fifo_id, &f2, null_yield);
ASSERT_EQ(0, r);
/* push one entry to f2 and the rest to f1 */
bl.append(buf, sizeof(buf));
auto& f = (i < 1 ? f2 : f1);
auto c = R::Rados::aio_create_completion();
- f->push(bl, c);
+ f->push(&dp, bl, c);
c->wait_for_complete();
r = c->get_return_value();
c->release();
std::vector<RCf::list_entry> result;
bool more = false;
auto c = R::Rados::aio_create_completion();
- f1->list(num, std::nullopt, &result, &more, c);
+ f1->list(&dp, num, std::nullopt, &result, &more, c);
c->wait_for_complete();
r = c->get_return_value();
c->release();
auto& entry = result[num - 1];
marker = entry.marker;
c = R::Rados::aio_create_completion();
- f1->trim(marker, false, c);
+ f1->trim(&dp, marker, false, c);
c->wait_for_complete();
r = c->get_return_value();
c->release();
const auto left = max_entries - num;
c = R::Rados::aio_create_completion();
- f2->list(left, marker, &result, &more, c);
+ f2->list(&dp, left, marker, &result, &more, c);
c->wait_for_complete();
r = c->get_return_value();
c->release();
static constexpr auto max_entry_size = 128ull;
std::unique_ptr<RCf::FIFO> f;
- auto r = RCf::FIFO::create(ioctx, fifo_id, &f, null_yield, std::nullopt,
+ auto r = RCf::FIFO::create(&dp, ioctx, fifo_id, &f, null_yield, std::nullopt,
std::nullopt, false, max_part_size,
max_entry_size);
ASSERT_EQ(0, r);
ASSERT_EQ(max_entries, bufs.size());
auto c = R::Rados::aio_create_completion();
- f->push(bufs, c);
+ f->push(&dp, bufs, c);
c->wait_for_complete();
r = c->get_return_value();
c->release();
std::vector<RCf::list_entry> result;
bool more = false;
c = R::Rados::aio_create_completion();
- f->list(max_entries, std::nullopt, &result, &more, c);
+ f->list(&dp, max_entries, std::nullopt, &result, &more, c);
c->wait_for_complete();
r = c->get_return_value();
c->release();
TEST_F(LegacyFIFO, TrimAll)
{
std::unique_ptr<RCf::FIFO> f;
- auto r = RCf::FIFO::create(ioctx, fifo_id, &f, null_yield);
+ auto r = RCf::FIFO::create(&dp, ioctx, fifo_id, &f, null_yield);
ASSERT_EQ(0, r);
static constexpr auto max_entries = 10u;
for (uint32_t i = 0; i < max_entries; ++i) {
cb::list bl;
encode(i, bl);
- r = f->push(bl, null_yield);
+ r = f->push(&dp, bl, null_yield);
ASSERT_EQ(0, r);
}
/* trim one entry */
- r = f->trim(RCf::marker::max().to_string(), false, null_yield);
+ r = f->trim(&dp, RCf::marker::max().to_string(), false, null_yield);
ASSERT_EQ(-ENODATA, r);
std::vector<RCf::list_entry> result;
bool more;
- r = f->list(1, std::nullopt, &result, &more, null_yield);
+ r = f->list(&dp, 1, std::nullopt, &result, &more, null_yield);
ASSERT_EQ(0, r);
ASSERT_TRUE(result.empty());
}
TEST_F(LegacyFIFO, AioTrimAll)
{
std::unique_ptr<RCf::FIFO> f;
- auto r = RCf::FIFO::create(ioctx, fifo_id, &f, null_yield);
+ auto r = RCf::FIFO::create(&dp, ioctx, fifo_id, &f, null_yield);
ASSERT_EQ(0, r);
static constexpr auto max_entries = 10u;
for (uint32_t i = 0; i < max_entries; ++i) {
cb::list bl;
encode(i, bl);
- r = f->push(bl, null_yield);
+ r = f->push(&dp, bl, null_yield);
ASSERT_EQ(0, r);
}
auto c = R::Rados::aio_create_completion();
- f->trim(RCf::marker::max().to_string(), false, c);
+ f->trim(&dp, RCf::marker::max().to_string(), false, c);
c->wait_for_complete();
r = c->get_return_value();
c->release();
std::vector<RCf::list_entry> result;
bool more;
- r = f->list(1, std::nullopt, &result, &more, null_yield);
+ r = f->list(&dp, 1, std::nullopt, &result, &more, null_yield);
ASSERT_EQ(0, r);
ASSERT_TRUE(result.empty());
}
namespace fifo = rados::cls::fifo;
namespace RCf = rgw::cls::fifo;
+auto cct = new CephContext(CEPH_ENTITY_TYPE_CLIENT);
+const DoutPrefix dp(cct, 1, "test log backing: ");
+
class LogBacking : public testing::Test {
protected:
static constexpr int SHARDS = 3;
cb::list bl;
encode(i, bl);
cls_log_add(op, ceph_clock_now(), {}, "meow", bl);
- auto r = rgw_rados_operate(ioctx, get_oid(0, i), &op, null_yield);
+ auto r = rgw_rados_operate(&dp, ioctx, get_oid(0, i), &op, null_yield);
ASSERT_GE(r, 0);
}
}
cb::list bl;
encode(i, bl);
cls_log_add(op, ceph_clock_now(), {}, "meow", bl);
- auto r = rgw_rados_operate(ioctx, get_oid(0, i), &op, null_yield);
+ auto r = rgw_rados_operate(&dp, ioctx, get_oid(0, i), &op, null_yield);
ASSERT_GE(r, 0);
}
std::list<cls_log_entry> entries;
bool truncated = false;
cls_log_list(op, {}, {}, {}, 1, entries, &to_marker, &truncated);
- auto r = rgw_rados_operate(ioctx, oid, &op, nullptr, null_yield);
+ auto r = rgw_rados_operate(&dp, ioctx, oid, &op, nullptr, null_yield);
ASSERT_GE(r, 0);
ASSERT_FALSE(entries.empty());
}
{
lr::ObjectWriteOperation op;
cls_log_trim(op, {}, {}, {}, to_marker);
- auto r = rgw_rados_operate(ioctx, oid, &op, null_yield);
+ auto r = rgw_rados_operate(&dp, ioctx, oid, &op, null_yield);
ASSERT_GE(r, 0);
}
{
std::list<cls_log_entry> entries;
bool truncated = false;
cls_log_list(op, {}, {}, {}, 1, entries, &to_marker, &truncated);
- auto r = rgw_rados_operate(ioctx, oid, &op, nullptr, null_yield);
+ auto r = rgw_rados_operate(&dp, ioctx, oid, &op, nullptr, null_yield);
ASSERT_GE(r, 0);
ASSERT_TRUE(entries.empty());
}
{
for (int i = 0; i < SHARDS; ++i) {
std::unique_ptr<RCf::FIFO> fifo;
- auto r = RCf::FIFO::create(ioctx, get_oid(0, i), &fifo, null_yield);
+ auto r = RCf::FIFO::create(&dp, ioctx, get_oid(0, i), &fifo, null_yield);
ASSERT_EQ(0, r);
ASSERT_TRUE(fifo);
}
{
using ceph::encode;
std::unique_ptr<RCf::FIFO> fifo;
- auto r = RCf::FIFO::open(ioctx, get_oid(0, i), &fifo, null_yield);
+ auto r = RCf::FIFO::open(&dp, ioctx, get_oid(0, i), &fifo, null_yield);
ASSERT_GE(0, r);
ASSERT_TRUE(fifo);
cb::list bl;
encode(i, bl);
- r = fifo->push(bl, null_yield);
+ r = fifo->push(&dp, bl, null_yield);
ASSERT_GE(0, r);
}
TEST_F(LogBacking, TestOmap)
{
make_omap();
- auto stat = log_backing_type(ioctx, log_type::fifo, SHARDS,
+ auto stat = log_backing_type(&dp, ioctx, log_type::fifo, SHARDS,
[this](int shard){ return get_oid(0, shard); },
null_yield);
ASSERT_EQ(log_type::omap, *stat);
TEST_F(LogBacking, TestOmapEmpty)
{
- auto stat = log_backing_type(ioctx, log_type::omap, SHARDS,
+ auto stat = log_backing_type(&dp, ioctx, log_type::omap, SHARDS,
[this](int shard){ return get_oid(0, shard); },
null_yield);
ASSERT_EQ(log_type::omap, *stat);
TEST_F(LogBacking, TestFIFO)
{
make_fifo();
- auto stat = log_backing_type(ioctx, log_type::fifo, SHARDS,
+ auto stat = log_backing_type(&dp, ioctx, log_type::fifo, SHARDS,
[this](int shard){ return get_oid(0, shard); },
null_yield);
ASSERT_EQ(log_type::fifo, *stat);
TEST_F(LogBacking, TestFIFOEmpty)
{
- auto stat = log_backing_type(ioctx, log_type::fifo, SHARDS,
+ auto stat = log_backing_type(&dp, ioctx, log_type::fifo, SHARDS,
[this](int shard){ return get_oid(0, shard); },
null_yield);
ASSERT_EQ(log_type::fifo, *stat);
TEST_F(LogBacking, GenerationSingle)
{
auto lgr = logback_generations::init<generations>(
- ioctx, "foobar", [this](uint64_t gen_id, int shard) {
+ &dp, ioctx, "foobar", [this](uint64_t gen_id, int shard) {
return get_oid(gen_id, shard);
}, SHARDS, log_type::fifo, null_yield);
ASSERT_TRUE(lgr);
ASSERT_EQ(log_type::fifo, lg->got_entries[0].type);
ASSERT_FALSE(lg->got_entries[0].pruned);
- auto ec = lg->empty_to(0, null_yield);
+ auto ec = lg->empty_to(&dp, 0, null_yield);
ASSERT_TRUE(ec);
-
lg.reset();
lg = *logback_generations::init<generations>(
- ioctx, "foobar", [this](uint64_t gen_id, int shard) {
+ &dp, ioctx, "foobar", [this](uint64_t gen_id, int shard) {
return get_oid(gen_id, shard);
}, SHARDS, log_type::fifo, null_yield);
lg->got_entries.clear();
- ec = lg->new_backing(log_type::omap, null_yield);
+ ec = lg->new_backing(&dp, log_type::omap, null_yield);
ASSERT_FALSE(ec);
ASSERT_EQ(1, lg->got_entries.size());
lg.reset();
lg = *logback_generations::init<generations>(
- ioctx, "foobar", [this](uint64_t gen_id, int shard) {
+ &dp, ioctx, "foobar", [this](uint64_t gen_id, int shard) {
return get_oid(gen_id, shard);
}, SHARDS, log_type::fifo, null_yield);
ASSERT_EQ(log_type::omap, lg->got_entries[1].type);
ASSERT_FALSE(lg->got_entries[1].pruned);
- ec = lg->empty_to(0, null_yield);
+ ec = lg->empty_to(&dp, 0, null_yield);
ASSERT_FALSE(ec);
ASSERT_EQ(0, *lg->tail);
lg.reset();
lg = *logback_generations::init<generations>(
- ioctx, "foobar", [this](uint64_t gen_id, int shard) {
+ &dp, ioctx, "foobar", [this](uint64_t gen_id, int shard) {
return get_oid(gen_id, shard);
}, SHARDS, log_type::fifo, null_yield);
ASSERT_EQ(1, lg->got_entries[1].gen_id);
ASSERT_EQ(log_type::omap, lg->got_entries[1].type);
ASSERT_FALSE(lg->got_entries[1].pruned);
-
- ec = lg->remove_empty(null_yield);
- ASSERT_FALSE(ec);
-
- auto entries = lg->entries();
- ASSERT_EQ(1, entries.size());
-
- ASSERT_EQ(1, entries[1].gen_id);
- ASSERT_EQ(log_type::omap, entries[1].type);
- ASSERT_FALSE(entries[1].pruned);
-
- lg.reset();
}
TEST_F(LogBacking, GenerationWN)
{
auto lg1 = *logback_generations::init<generations>(
- ioctx, "foobar", [this](uint64_t gen_id, int shard) {
+ &dp, ioctx, "foobar", [this](uint64_t gen_id, int shard) {
return get_oid(gen_id, shard);
}, SHARDS, log_type::fifo, null_yield);
- auto ec = lg1->new_backing(log_type::omap, null_yield);
+ auto ec = lg1->new_backing(&dp, log_type::omap, null_yield);
ASSERT_FALSE(ec);
ASSERT_EQ(1, lg1->got_entries.size());
lg1->got_entries.clear();
auto lg2 = *logback_generations::init<generations>(
- ioctx2, "foobar", [this](uint64_t gen_id, int shard) {
+ &dp, ioctx2, "foobar", [this](uint64_t gen_id, int shard) {
return get_oid(gen_id, shard);
}, SHARDS, log_type::fifo, null_yield);
lg2->got_entries.clear();
- ec = lg1->new_backing(log_type::fifo, null_yield);
+ ec = lg1->new_backing(&dp, log_type::fifo, null_yield);
ASSERT_FALSE(ec);
ASSERT_EQ(1, lg1->got_entries.size());
lg1->got_entries.clear();
lg2->got_entries.clear();
- ec = lg2->empty_to(1, null_yield);
+ ec = lg2->empty_to(&dp, 1, null_yield);
ASSERT_FALSE(ec);
ASSERT_EQ(1, *lg1->tail);
class TestRGWUser : public sal::RGWUser {
public:
- virtual int list_buckets(const string&, const string&, uint64_t, bool, sal::RGWBucketList&, optional_yield y) override {
+ virtual int list_buckets(const DoutPrefixProvider *dpp, const string&, const string&, uint64_t, bool, sal::RGWBucketList&, optional_yield y) override {
return 0;
}
return nullptr;
}
- virtual int load_by_id(optional_yield y) override {
+ virtual int load_by_id(const DoutPrefixProvider *dpp, optional_yield y) override {
return 0;
}
using namespace std;
+auto cct = new CephContext(CEPH_ENTITY_TYPE_CLIENT);
+const DoutPrefix dp(cct, 1, "test rgw manifest: ");
+
struct OldObjManifestPart {
old_rgw_obj loc; /* the object where the data is located */
uint64_t loc_ofs; /* the offset at that object where the data is located */
list<rgw_obj>::iterator liter;
RGWObjManifest::obj_iterator iter;
- for (iter = manifest.obj_begin(), liter = objs.begin();
- iter != manifest.obj_end() && liter != objs.end();
+ for (iter = manifest.obj_begin(&dp), liter = objs.begin();
+ iter != manifest.obj_end(&dp) && liter != objs.end();
++iter, ++liter) {
ASSERT_TRUE(env.get_raw(*liter) == env.get_raw(iter.get_location()));
}
- ASSERT_TRUE(iter == manifest.obj_end());
+ ASSERT_TRUE(iter == manifest.obj_end(&dp));
ASSERT_TRUE(liter == objs.end());
rgw_raw_obj raw_head;
- iter = manifest.obj_find(100 * 1024);
+ iter = manifest.obj_find(&dp, 100 * 1024);
ASSERT_TRUE(env.get_raw(iter.get_location()) == env.get_raw(head));
ASSERT_EQ((int)iter.get_stripe_size(), obj_size);
}
rgw_obj_select last_obj;
RGWObjManifest::obj_iterator iter;
- for (iter = manifest.obj_begin(), liter = objs.begin();
- iter != manifest.obj_end() && liter != objs.end();
+ for (iter = manifest.obj_begin(&dp), liter = objs.begin();
+ iter != manifest.obj_end(&dp) && liter != objs.end();
++iter, ++liter) {
cout << "*liter=" << *liter << " iter.get_location()=" << env.get_raw(iter.get_location()) << std::endl;
ASSERT_TRUE(env.get_raw(*liter) == env.get_raw(iter.get_location()));
last_obj = iter.get_location();
}
- ASSERT_TRUE(iter == manifest.obj_end());
+ ASSERT_TRUE(iter == manifest.obj_end(&dp));
ASSERT_TRUE(liter == objs.end());
- iter = manifest.obj_find(100 * 1024);
+ iter = manifest.obj_find(&dp, 100 * 1024);
ASSERT_TRUE(env.get_raw(iter.get_location()) == env.get_raw(head));
ASSERT_EQ((int)iter.get_stripe_size(), head_size);
uint64_t ofs = 20 * 1024 * 1024 + head_size;
- iter = manifest.obj_find(ofs + 100);
+ iter = manifest.obj_find(&dp, ofs + 100);
ASSERT_TRUE(env.get_raw(iter.get_location()) == env.get_raw(last_obj));
ASSERT_EQ(iter.get_stripe_ofs(), ofs);
RGWObjManifest m;
for (int i = 0; i < num_parts; i++) {
- m.append(pm[i], env.zonegroup, env.zone_params);
+ m.append(&dp, pm[i], env.zonegroup, env.zone_params);
}
RGWObjManifest::obj_iterator iter;
- for (iter = m.obj_begin(); iter != m.obj_end(); ++iter) {
- RGWObjManifest::obj_iterator fiter = m.obj_find(iter.get_ofs());
+ for (iter = m.obj_begin(&dp); iter != m.obj_end(&dp); ++iter) {
+ RGWObjManifest::obj_iterator fiter = m.obj_find(&dp, iter.get_ofs());
ASSERT_TRUE(env.get_raw(fiter.get_location()) == env.get_raw(iter.get_location()));
}
RGWObjManifest::obj_iterator iter;
auto liter = old_objs.begin();
- for (iter = manifest.obj_begin();
- iter != manifest.obj_end() && liter != old_objs.end();
+ for (iter = manifest.obj_begin(&dp);
+ iter != manifest.obj_end(&dp) && liter != old_objs.end();
++iter, ++liter) {
rgw_pool old_pool(liter->bucket.data_pool);
string old_oid;
}
ASSERT_TRUE(liter == old_objs.end());
- ASSERT_TRUE(iter == manifest.obj_end());
+ ASSERT_TRUE(iter == manifest.obj_end(&dp));
}
// mock puller that throws an exception if it's called
struct ErrorPuller : public RGWPeriodHistory::Puller {
- int pull(const std::string& id, RGWPeriod& period, optional_yield) override {
+ int pull(const DoutPrefixProvider *dpp, const std::string& id, RGWPeriod& period, optional_yield) override {
throw std::runtime_error("unexpected call to pull");
}
};
public:
explicit RecordingPuller(int error) : error(error) {}
Ids ids;
- int pull(const std::string& id, RGWPeriod& period, optional_yield) override {
+ int pull(const DoutPrefixProvider *dpp, const std::string& id, RGWPeriod& period, optional_yield) override {
ids.push_back(id);
return error;
}
// mock puller that returns a fake period by parsing the period id
struct NumericPuller : public RGWPeriodHistory::Puller {
- int pull(const std::string& id, RGWPeriod& period, optional_yield) override {
+ int pull(const DoutPrefixProvider *dpp, const std::string& id, RGWPeriod& period, optional_yield) override {
// relies on numeric period ids to divine the realm_epoch
auto realm_epoch = boost::lexical_cast<epoch_t>(id);
auto predecessor = boost::lexical_cast<std::string>(realm_epoch-1);
{
RecordingPuller puller{-EFAULT};
RGWPeriodHistory history(g_ceph_context, &puller, current_period);
+ const DoutPrefix dp(g_ceph_context, 1, "test rgw period history: ");
// create a disjoint history at 1 and verify that periods are requested
// backwards from current_period
- auto c1 = history.attach(make_period("1", 1, ""), null_yield);
+ auto c1 = history.attach(&dp, make_period("1", 1, ""), null_yield);
ASSERT_FALSE(c1);
ASSERT_EQ(-EFAULT, c1.get_error());
ASSERT_EQ(Ids{"4"}, puller.ids);
auto c4 = history.insert(make_period("4", 4, "3"));
ASSERT_TRUE(c4);
- c1 = history.attach(make_period("1", 1, ""), null_yield);
+ c1 = history.attach(&dp, make_period("1", 1, ""), null_yield);
ASSERT_FALSE(c1);
ASSERT_EQ(-EFAULT, c1.get_error());
ASSERT_EQ(Ids({"4", "3"}), puller.ids);
auto c3 = history.insert(make_period("3", 3, "2"));
ASSERT_TRUE(c3);
- c1 = history.attach(make_period("1", 1, ""), null_yield);
+ c1 = history.attach(&dp, make_period("1", 1, ""), null_yield);
ASSERT_FALSE(c1);
ASSERT_EQ(-EFAULT, c1.get_error());
ASSERT_EQ(Ids({"4", "3", "2"}), puller.ids);
auto c2 = history.insert(make_period("2", 2, "1"));
ASSERT_TRUE(c2);
- c1 = history.attach(make_period("1", 1, ""), null_yield);
+ c1 = history.attach(&dp, make_period("1", 1, ""), null_yield);
ASSERT_TRUE(c1);
ASSERT_EQ(Ids({"4", "3", "2"}), puller.ids);
}
{
RecordingPuller puller{-EFAULT};
RGWPeriodHistory history(g_ceph_context, &puller, current_period);
+ const DoutPrefix dp(g_ceph_context, 1, "test rgw period history: ");
// create a disjoint history at 9 and verify that periods are requested
// backwards down to current_period
- auto c9 = history.attach(make_period("9", 9, "8"), null_yield);
+ auto c9 = history.attach(&dp, make_period("9", 9, "8"), null_yield);
ASSERT_FALSE(c9);
ASSERT_EQ(-EFAULT, c9.get_error());
ASSERT_EQ(Ids{"8"}, puller.ids);
- auto c8 = history.attach(make_period("8", 8, "7"), null_yield);
+ auto c8 = history.attach(&dp, make_period("8", 8, "7"), null_yield);
ASSERT_FALSE(c8);
ASSERT_EQ(-EFAULT, c8.get_error());
ASSERT_EQ(Ids({"8", "7"}), puller.ids);
- auto c7 = history.attach(make_period("7", 7, "6"), null_yield);
+ auto c7 = history.attach(&dp, make_period("7", 7, "6"), null_yield);
ASSERT_FALSE(c7);
ASSERT_EQ(-EFAULT, c7.get_error());
ASSERT_EQ(Ids({"8", "7", "6"}), puller.ids);
- auto c6 = history.attach(make_period("6", 6, "5"), null_yield);
+ auto c6 = history.attach(&dp, make_period("6", 6, "5"), null_yield);
ASSERT_TRUE(c6);
ASSERT_EQ(Ids({"8", "7", "6"}), puller.ids);
}
{
NumericPuller puller;
RGWPeriodHistory history(g_ceph_context, &puller, current_period);
+ const DoutPrefix dp(g_ceph_context, 1, "test rgw period history: ");
- auto c1 = history.attach(make_period("1", 1, ""), null_yield);
+ auto c1 = history.attach(&dp, make_period("1", 1, ""), null_yield);
ASSERT_TRUE(c1);
// verify that we pulled and merged all periods from 1-5
{
NumericPuller puller;
RGWPeriodHistory history(g_ceph_context, &puller, current_period);
+ const DoutPrefix dp(g_ceph_context, 1, "test rgw period history: ");
- auto c9 = history.attach(make_period("9", 9, "8"), null_yield);
+ auto c9 = history.attach(&dp, make_period("9", 9, "8"), null_yield);
ASSERT_TRUE(c9);
// verify that we pulled and merged all periods from 5-9
void SetUp() override {
rados.emplace(g_ceph_context);
- ASSERT_EQ(0, rados->start(null_yield));
+ const NoDoutPrefix no_dpp(g_ceph_context, 1);
+ ASSERT_EQ(0, rados->start(null_yield, &no_dpp));
int r = rados->pool({poolname}).create();
if (r == -EEXIST)
r = 0;
protected:
RGWSI_RADOS::Obj make_obj(const std::string& oid) {
auto obj = RadosEnv::rados->obj({{RadosEnv::poolname}, oid});
- ceph_assert_always(0 == obj.open());
+ const NoDoutPrefix no_dpp(g_ceph_context, 1);
+ ceph_assert_always(0 == obj.open(&no_dpp));
return obj;
}
};
RGWCORSRule *xml_to_cors_rule(string s){
RGWCORSConfiguration_S3 *cors_config;
- RGWCORSXMLParser_S3 parser(g_ceph_context);
+ const DoutPrefix dp(g_ceph_context, 1, "test cors: ");
+ RGWCORSXMLParser_S3 parser(&dp, g_ceph_context);
const string *data = g_test->get_response_data();
if (!parser.init()) {
return NULL;
TEST(mempool, check_shard_select)
{
- const size_t samples = 100;
+ const size_t samples = mempool::num_shards * 100;
std::atomic_int shards[mempool::num_shards] = {0};
std::vector<std::thread> workers;
for (size_t i = 0; i < samples; i++) {
}
workers.clear();
- double EX = (double)samples / (double)mempool::num_shards;
- double VarX = 0;
+ size_t missed = 0;
for (size_t i = 0; i < mempool::num_shards; i++) {
- VarX += (EX - shards[i]) * (EX - shards[i]);
+ if (shards[i] == 0) {
+ missed++;
+ }
}
- //random gives VarX below 200
- //when half slots are 0, we get ~300
- //when all samples go into one slot, we get ~9000
- EXPECT_LT(VarX, 200);
+
+ // If more than half of the shards did not get anything,
+ // the distribution is bad enough to deserve a failure.
+ EXPECT_LT(missed, mempool::num_shards / 2);
}
#include "common/ceph_argparse.h"
#include <fstream>
#include "include/util.h"
+#include "include/ceph_fs.h"
#include "mds/CDentry.h"
#include "mds/CInode.h"
// be ignoring dirfrags that exist
inode_data.damage_flags |= (DAMAGE_STATS | DAMAGE_RSTATS | DAMAGE_FRAGTREE);
- if (inono == MDS_INO_ROOT || MDS_INO_IS_MDSDIR(inono)) {
+ if (inono == CEPH_INO_ROOT || MDS_INO_IS_MDSDIR(inono)) {
sr_t srnode;
srnode.seq = 1;
encode(srnode, inode_data.snap_blob);
int MetadataDriver::init_roots(int64_t data_pool_id)
{
int r = 0;
- r = inject_unlinked_inode(MDS_INO_ROOT, S_IFDIR|0755, data_pool_id);
+ r = inject_unlinked_inode(CEPH_INO_ROOT, S_IFDIR|0755, data_pool_id);
if (r != 0) {
return r;
}
int MetadataDriver::check_roots(bool *result)
{
int r;
- r = root_exists(MDS_INO_ROOT, result);
+ r = root_exists(CEPH_INO_ROOT, result);
if (r != 0) {
return r;
}
return (ino >= inodeno_t((1ull << 40)))
|| (MDS_INO_IS_STRAY(ino))
|| (MDS_INO_IS_MDSDIR(ino))
- || ino == MDS_INO_ROOT
- || ino == MDS_INO_CEPH;
+ || ino == CEPH_INO_ROOT
+ || ino == CEPH_INO_CEPH;
}
int DataScan::scan_links()
FS_TOP_SUPPORTED_VER = 1
ITEMS_PAD_LEN = 1
-ITEMS_PAD = " " * ITEMS_PAD_LEN
+ITEMS_PAD = " " * ITEMS_PAD_LEN
DEFAULT_REFRESH_INTERVAL = 1
# min refresh interval allowed
MIN_REFRESH_INTERVAL = 0.5
# metadata provided by mgr/stats
-FS_TOP_MAIN_WINDOW_COL_CLIENT_ID = "CLIENT_ID"
-FS_TOP_MAIN_WINDOW_COL_MNT_ROOT = "MOUNT_ROOT"
-FS_TOP_MAIN_WINDOW_COL_MNTPT_HOST_ADDR = "MOUNT_POINT@HOST/ADDR"
+FS_TOP_MAIN_WINDOW_COL_CLIENT_ID = "client_id"
+FS_TOP_MAIN_WINDOW_COL_MNT_ROOT = "mount_root"
+FS_TOP_MAIN_WINDOW_COL_MNTPT_HOST_ADDR = "mount_point@host/addr"
MAIN_WINDOW_TOP_LINE_ITEMS_START = [ITEMS_PAD,
FS_TOP_MAIN_WINDOW_COL_CLIENT_ID,
self.refresh_interval_secs = args.delay
self.exit_ev = Event()
+ def refresh_window_size(self):
+ self.height, self.width = self.stdscr.getmaxyx()
+
def handle_signal(self, signum, _):
self.exit_ev.set()
raise FSTopException('Cannot handle unknown metrics from \'ceph fs perf stats\': '
f'{missing}')
- def setup_curses(self):
- self.stdscr = curses.initscr()
-
- # coordinate constants for windowing -- (height, width, y, x)
- # NOTE: requires initscr() call before accessing COLS, LINES.
- HEADER_WINDOW_COORD = (2, curses.COLS - 1, 0, 0)
- TOPLINE_WINDOW_COORD = (1, curses.COLS - 1, 3, 0)
- MAIN_WINDOW_COORD = (curses.LINES - 4, curses.COLS - 1, 4, 0)
-
- self.header = curses.newwin(*HEADER_WINDOW_COORD)
- self.topl = curses.newwin(*TOPLINE_WINDOW_COORD)
- self.mainw = curses.newwin(*MAIN_WINDOW_COORD)
- curses.wrapper(self.display)
+ def setup_curses(self, win):
+ self.stdscr = win
+ curses.use_default_colors()
+ curses.start_color()
+ try:
+ curses.curs_set(0)
+ except curses.error:
+ # If the terminal do not support the visibility
+ # requested it will raise an exception
+ pass
+ self.run_display()
def verify_perf_stats_support(self):
mon_cmd = {'prefix': 'mgr module ls', 'format': 'json'}
raise FSTopException(f'error in \'perf stats\' query: {out}')
return json.loads(buf.decode('utf-8'))
+ def items(self, item):
+ if item == "CAP_HIT":
+ return "chit"
+ if item == "READ_LATENCY":
+ return "rlat"
+ if item == "WRITE_LATENCY":
+ return "wlat"
+ if item == "METADATA_LATENCY":
+ return "mlat"
+ if item == "DENTRY_LEASE":
+ return "dlease"
+ if item == "OPENED_FILES":
+ return "ofiles"
+ if item == "PINNED_ICAPS":
+ return "oicaps"
+ if item == "OPENED_INODES":
+ return "oinodes"
+ else:
+ # return empty string for none type
+ return ''
+
def mtype(self, typ):
if typ == MetricType.METRIC_TYPE_PERCENTAGE:
return "(%)"
return ''
def refresh_top_line_and_build_coord(self):
+ if self.topl is None:
+ return
+
xp = 0
x_coord_map = {}
xp += nlen
for item, typ in MAIN_WINDOW_TOP_LINE_METRICS.items():
- it = f'{item}{self.mtype(typ)}'
+ it = f'{self.items(item)}{self.mtype(typ)}'
heading.append(it)
nlen = len(it) + len(ITEMS_PAD)
x_coord_map[item] = (xp, nlen)
nlen = len(item) + len(ITEMS_PAD)
x_coord_map[item] = (xp, nlen)
xp += nlen
- self.topl.addstr(0, 0, ITEMS_PAD.join(heading), curses.A_STANDOUT | curses.A_BOLD)
+ title = ITEMS_PAD.join(heading)
+ hlen = min(self.width - 2, len(title))
+ self.topl.addnstr(0, 0, title, hlen, curses.A_STANDOUT | curses.A_BOLD)
+ self.topl.refresh()
return x_coord_map
@staticmethod
return True
def refresh_client(self, client_id, metrics, counters, client_meta, x_coord_map, y_coord):
- for item in MAIN_WINDOW_TOP_LINE_ITEMS_END:
- coord = x_coord_map[item]
- if item == FS_TOP_MAIN_WINDOW_COL_MNTPT_HOST_ADDR:
- if FSTop.has_metrics(client_meta, [CLIENT_METADATA_MOUNT_POINT_KEY,
- CLIENT_METADATA_HOSTNAME_KEY,
- CLIENT_METADATA_IP_KEY]):
- self.mainw.addstr(y_coord, coord[0],
- f'{client_meta[CLIENT_METADATA_MOUNT_POINT_KEY]}@'
- f'{client_meta[CLIENT_METADATA_HOSTNAME_KEY]}/'
- f'{client_meta[CLIENT_METADATA_IP_KEY]}')
- else:
- self.mainw.addstr(y_coord, coord[0], "N/A")
+ remaining_hlen = self.width - 1
for item in MAIN_WINDOW_TOP_LINE_ITEMS_START:
coord = x_coord_map[item]
hlen = coord[1] - len(ITEMS_PAD)
+ hlen = min(hlen, remaining_hlen)
+ if remaining_hlen < coord[1]:
+ remaining_hlen = 0
+ else:
+ remaining_hlen -= coord[1]
if item == FS_TOP_MAIN_WINDOW_COL_CLIENT_ID:
- self.mainw.addstr(y_coord, coord[0],
- wrap(client_id.split('.')[1], hlen))
+ self.mainw.addnstr(y_coord, coord[0],
+ wrap(client_id.split('.')[1], hlen),
+ hlen)
elif item == FS_TOP_MAIN_WINDOW_COL_MNT_ROOT:
if FSTop.has_metric(client_meta, CLIENT_METADATA_MOUNT_ROOT_KEY):
- self.mainw.addstr(y_coord, coord[0],
- wrap(client_meta[CLIENT_METADATA_MOUNT_ROOT_KEY], hlen))
+ self.mainw.addnstr(y_coord, coord[0],
+ wrap(client_meta[CLIENT_METADATA_MOUNT_ROOT_KEY], hlen),
+ hlen)
else:
- self.mainw.addstr(y_coord, coord[0], "N/A")
+ self.mainw.addnstr(y_coord, coord[0], "N/A", hlen)
+
+ if remaining_hlen == 0:
+ return
+
cidx = 0
for item in counters:
coord = x_coord_map[item]
+ hlen = coord[1] - len(ITEMS_PAD)
+ hlen = min(hlen, remaining_hlen)
+ if remaining_hlen < coord[1]:
+ remaining_hlen = 0
+ else:
+ remaining_hlen -= coord[1]
m = metrics[cidx]
typ = MAIN_WINDOW_TOP_LINE_METRICS[MGR_STATS_COUNTERS[cidx]]
if item.lower() in client_meta.get(CLIENT_METADATA_VALID_METRICS_KEY, []):
if typ == MetricType.METRIC_TYPE_PERCENTAGE:
- self.mainw.addstr(y_coord, coord[0], f'{calc_perc(m)}')
+ self.mainw.addnstr(y_coord, coord[0], f'{calc_perc(m)}', hlen)
elif typ == MetricType.METRIC_TYPE_LATENCY:
- self.mainw.addstr(y_coord, coord[0], f'{calc_lat(m)}')
+ self.mainw.addnstr(y_coord, coord[0], f'{calc_lat(m)}', hlen)
else:
# display 0th element from metric tuple
- self.mainw.addstr(y_coord, coord[0], f'{m[0]}')
+ self.mainw.addnstr(y_coord, coord[0], f'{m[0]}', hlen)
else:
- self.mainw.addstr(y_coord, coord[0], "N/A")
+ self.mainw.addnstr(y_coord, coord[0], "N/A", hlen)
cidx += 1
+ if remaining_hlen == 0:
+ return
+
+ for item in MAIN_WINDOW_TOP_LINE_ITEMS_END:
+ coord = x_coord_map[item]
+ hlen = coord[1] - len(ITEMS_PAD)
+ # always place the FS_TOP_MAIN_WINDOW_COL_MNTPT_HOST_ADDR in the
+ # last, it will be a very long string to display
+ if item == FS_TOP_MAIN_WINDOW_COL_MNTPT_HOST_ADDR:
+ if FSTop.has_metrics(client_meta, [CLIENT_METADATA_MOUNT_POINT_KEY,
+ CLIENT_METADATA_HOSTNAME_KEY,
+ CLIENT_METADATA_IP_KEY]):
+ self.mainw.addnstr(y_coord, coord[0],
+ f'{client_meta[CLIENT_METADATA_MOUNT_POINT_KEY]}@'
+ f'{client_meta[CLIENT_METADATA_HOSTNAME_KEY]}/'
+ f'{client_meta[CLIENT_METADATA_IP_KEY]}',
+ remaining_hlen)
+ else:
+ self.mainw.addnstr(y_coord, coord[0], "N/A", remaining_hlen)
+ hlen = min(hlen, remaining_hlen)
+ if remaining_hlen < coord[1]:
+ remaining_hlen = 0
+ else:
+ remaining_hlen -= coord[1]
+ if remaining_hlen == 0:
+ return
+
def refresh_clients(self, x_coord_map, stats_json):
counters = [m.upper() for m in stats_json[GLOBAL_COUNTERS_KEY]]
y_coord = 0
y_coord += 1
def refresh_main_window(self, x_coord_map, stats_json):
+ if self.mainw is None:
+ return
self.refresh_clients(x_coord_map, stats_json)
+ self.mainw.refresh()
def refresh_header(self, stats_json):
+ hlen = self.width - 2
if not stats_json['version'] == FS_TOP_SUPPORTED_VER:
- self.header.addstr(0, 0, 'perf stats version mismatch!')
+ self.header.addnstr(0, 0, 'perf stats version mismatch!', hlen)
return False
client_metadata = stats_json[CLIENT_METADATA_KEY]
num_clients = len(client_metadata)
"kernel_version" in metadata])
num_libs = num_clients - (num_mounts + num_kclients)
now = datetime.now().ctime()
- self.header.addstr(0, 0,
- FS_TOP_VERSION_HEADER_FMT.format(prog_name=FS_TOP_PROG_STR, now=now),
- curses.A_STANDOUT | curses.A_BOLD)
- self.header.addstr(1, 0, FS_TOP_CLIENT_HEADER_FMT.format(num_clients=num_clients,
- num_mounts=num_mounts,
- num_kclients=num_kclients,
- num_libs=num_libs))
+ self.header.addnstr(0, 0,
+ FS_TOP_VERSION_HEADER_FMT.format(prog_name=FS_TOP_PROG_STR, now=now),
+ hlen, curses.A_STANDOUT | curses.A_BOLD)
+ self.header.addnstr(1, 0, FS_TOP_CLIENT_HEADER_FMT.format(num_clients=num_clients,
+ num_mounts=num_mounts,
+ num_kclients=num_kclients,
+ num_libs=num_libs), hlen)
+ self.header.refresh()
return True
- def display(self, _):
- x_coord_map = self.refresh_top_line_and_build_coord()
- self.topl.refresh()
+ def run_display(self):
while not self.exit_ev.is_set():
+ # use stdscr.clear() instead of clearing each window
+ # to avoid screen blinking.
+ self.stdscr.clear()
+ self.refresh_window_size()
+ if self.width <= 2 or self.width <= 2:
+ self.exit_ev.wait(timeout=self.refresh_interval_secs)
+ continue
+
+ # coordinate constants for windowing -- (height, width, y, x)
+ # NOTE: requires initscr() call before accessing COLS, LINES.
+ try:
+ HEADER_WINDOW_COORD = (2, self.width - 1, 0, 0)
+ self.header = curses.newwin(*HEADER_WINDOW_COORD)
+ if self.height >= 3:
+ TOPLINE_WINDOW_COORD = (1, self.width - 1, 3, 0)
+ self.topl = curses.newwin(*TOPLINE_WINDOW_COORD)
+ else:
+ self.topl = None
+ if self.height >= 5:
+ MAIN_WINDOW_COORD = (self.height - 4, self.width - 1, 4, 0)
+ self.mainw = curses.newwin(*MAIN_WINDOW_COORD)
+ else:
+ self.mainw = None
+ except curses.error:
+ # this may happen when creating the sub windows the
+ # terminal window size changed, just retry it
+ continue
+
stats_json = self.perf_stats_query()
- self.header.clear()
- self.mainw.clear()
- if self.refresh_header(stats_json):
- self.refresh_main_window(x_coord_map, stats_json)
- self.header.refresh()
- self.mainw.refresh()
- self.exit_ev.wait(timeout=self.refresh_interval_secs)
+ try:
+ if self.refresh_header(stats_json):
+ x_coord_map = self.refresh_top_line_and_build_coord()
+ self.refresh_main_window(x_coord_map, stats_json)
+ self.exit_ev.wait(timeout=self.refresh_interval_secs)
+ except curses.error:
+ # this may happen when addstr the terminal window
+ # size changed, just retry it
+ pass
if __name__ == '__main__':
ft.selftest()
sys.stdout.write("selftest ok\n")
else:
- ft.setup_curses()
+ curses.wrapper(ft.setup_curses)
except FSTopException as fst:
err = True
sys.stderr.write(f'{fst.get_error_msg()}\n')
m_cluster.reset();
}
+void FSMirror::reopen_logs() {
+ std::scoped_lock locker(m_lock);
+
+ if (m_cluster) {
+ reinterpret_cast<CephContext *>(m_cluster->cct())->reopen_logs();
+ }
+ for (auto &[peer, replayer] : m_peer_replayers) {
+ replayer->reopen_logs();
+ }
+}
+
void FSMirror::init(Context *on_finish) {
dout(20) << dendl;
std::scoped_lock locker(m_lock);
int r = connect(g_ceph_context->_conf->name.to_str(),
- g_ceph_context->_conf->cluster, &m_cluster);
+ g_ceph_context->_conf->cluster, &m_cluster, "", "", m_args);
if (r < 0) {
m_init_failed = true;
on_finish->complete(r);
// admin socket helpers
void mirror_status(Formatter *f);
+ void reopen_logs();
+
private:
bool is_blocklisted(const std::scoped_lock<ceph::mutex> &locker) const {
bool blocklisted = false;
void Mirror::shutdown() {
dout(20) << dendl;
-
- std::unique_lock locker(m_lock);
m_stopping = true;
m_cond.notify_all();
}
+void Mirror::reopen_logs() {
+ for (auto &[filesystem, mirror_action] : m_mirror_actions) {
+ mirror_action.fs_mirror->reopen_logs();
+ }
+ g_ceph_context->reopen_logs();
+}
+
void Mirror::handle_signal(int signum) {
dout(10) << ": signal=" << signum << dendl;
- ceph_assert(signum == SIGTERM || signum == SIGINT);
- shutdown();
+
+ std::scoped_lock locker(m_lock);
+ switch (signum) {
+ case SIGHUP:
+ reopen_logs();
+ break;
+ case SIGINT:
+ case SIGTERM:
+ shutdown();
+ break;
+ default:
+ ceph_abort_msgf("unexpected signal %d", signum);
+ }
}
void Mirror::handle_enable_mirroring(const Filesystem &filesystem,
void schedule_mirror_update_task();
void update_fs_mirrors();
+
+ void reopen_logs();
};
} // namespace mirror
#include <algorithm>
#include <sys/time.h>
#include <sys/file.h>
+#include <boost/scope_exit.hpp>
#include "common/admin_socket.h"
#include "common/ceph_context.h"
PeerReplayer *peer_replayer;
};
+// helper to open a directory relative to a file descriptor
+int opendirat(MountRef mnt, int dirfd, const std::string &relpath, int flags,
+ ceph_dir_result **dirp) {
+ int r = ceph_openat(mnt, dirfd, relpath.c_str(), flags, 0);
+ if (r < 0) {
+ return r;
+ }
+
+ int fd = r;
+ r = ceph_fdopendir(mnt, fd, dirp);
+ ceph_close(mnt, fd);
+ return r;
+}
+
} // anonymous namespace
class PeerReplayerAdminSocketHook : public AdminSocketHook {
int PeerReplayer::init() {
dout(20) << ": initial dir list=[" << m_directories << "]" << dendl;
- for (auto &dir_path : m_directories) {
- m_snap_sync_stats.emplace(dir_path, SnapSyncStat());
+ for (auto &dir_root : m_directories) {
+ m_snap_sync_stats.emplace(dir_root, SnapSyncStat());
}
auto &remote_client = m_peer.remote.client_name;
m_remote_cluster.reset();
}
-void PeerReplayer::add_directory(string_view dir_path) {
- dout(20) << ": dir_path=" << dir_path << dendl;
+void PeerReplayer::add_directory(string_view dir_root) {
+ dout(20) << ": dir_root=" << dir_root << dendl;
std::scoped_lock locker(m_lock);
- m_directories.emplace_back(dir_path);
- m_snap_sync_stats.emplace(dir_path, SnapSyncStat());
+ m_directories.emplace_back(dir_root);
+ m_snap_sync_stats.emplace(dir_root, SnapSyncStat());
m_cond.notify_all();
}
-void PeerReplayer::remove_directory(string_view dir_path) {
- dout(20) << ": dir_path=" << dir_path << dendl;
- auto _dir_path = std::string(dir_path);
+void PeerReplayer::remove_directory(string_view dir_root) {
+ dout(20) << ": dir_root=" << dir_root << dendl;
+ auto _dir_root = std::string(dir_root);
std::scoped_lock locker(m_lock);
- auto it = std::find(m_directories.begin(), m_directories.end(), _dir_path);
+ auto it = std::find(m_directories.begin(), m_directories.end(), _dir_root);
if (it != m_directories.end()) {
m_directories.erase(it);
}
- auto it1 = m_registered.find(_dir_path);
+ auto it1 = m_registered.find(_dir_root);
if (it1 == m_registered.end()) {
- m_snap_sync_stats.erase(_dir_path);
+ m_snap_sync_stats.erase(_dir_root);
} else {
it1->second.replayer->cancel();
}
"cephfs_mirror_retry_failed_directories_interval");
boost::optional<std::string> candidate;
- for (auto &dir_path : m_directories) {
- auto &sync_stat = m_snap_sync_stats.at(dir_path);
+ for (auto &dir_root : m_directories) {
+ auto &sync_stat = m_snap_sync_stats.at(dir_root);
if (sync_stat.failed) {
std::chrono::duration<double> d = now - *sync_stat.last_failed;
if (d.count() < retry_timo) {
continue;
}
}
- if (!m_registered.count(dir_path)) {
- candidate = dir_path;
+ if (!m_registered.count(dir_root)) {
+ candidate = dir_root;
break;
}
}
return candidate;
}
-int PeerReplayer::register_directory(const std::string &dir_path,
+int PeerReplayer::register_directory(const std::string &dir_root,
SnapshotReplayerThread *replayer) {
- dout(20) << ": dir_path=" << dir_path << dendl;
- ceph_assert(m_registered.find(dir_path) == m_registered.end());
+ dout(20) << ": dir_root=" << dir_root << dendl;
+ ceph_assert(m_registered.find(dir_root) == m_registered.end());
DirRegistry registry;
- int r = try_lock_directory(dir_path, replayer, ®istry);
+ int r = try_lock_directory(dir_root, replayer, ®istry);
if (r < 0) {
return r;
}
- dout(5) << ": dir_path=" << dir_path << " registered with replayer="
+ dout(5) << ": dir_root=" << dir_root << " registered with replayer="
<< replayer << dendl;
- m_registered.emplace(dir_path, std::move(registry));
+ m_registered.emplace(dir_root, std::move(registry));
return 0;
}
-void PeerReplayer::unregister_directory(const std::string &dir_path) {
- dout(20) << ": dir_path=" << dir_path << dendl;
+void PeerReplayer::unregister_directory(const std::string &dir_root) {
+ dout(20) << ": dir_root=" << dir_root << dendl;
- auto it = m_registered.find(dir_path);
+ auto it = m_registered.find(dir_root);
ceph_assert(it != m_registered.end());
unlock_directory(it->first, it->second);
m_registered.erase(it);
- if (std::find(m_directories.begin(), m_directories.end(), dir_path) == m_directories.end()) {
- m_snap_sync_stats.erase(dir_path);
+ if (std::find(m_directories.begin(), m_directories.end(), dir_root) == m_directories.end()) {
+ m_snap_sync_stats.erase(dir_root);
}
}
-int PeerReplayer::try_lock_directory(const std::string &dir_path,
+int PeerReplayer::try_lock_directory(const std::string &dir_root,
SnapshotReplayerThread *replayer, DirRegistry *registry) {
- dout(20) << ": dir_path=" << dir_path << dendl;
+ dout(20) << ": dir_root=" << dir_root << dendl;
- int r = ceph_open(m_remote_mount, dir_path.c_str(), O_RDONLY | O_DIRECTORY, 0);
+ int r = ceph_open(m_remote_mount, dir_root.c_str(), O_RDONLY | O_DIRECTORY, 0);
if (r < 0 && r != -ENOENT) {
- derr << ": failed to open remote dir_path=" << dir_path << ": " << cpp_strerror(r)
+ derr << ": failed to open remote dir_root=" << dir_root << ": " << cpp_strerror(r)
<< dendl;
return r;
}
if (r == -ENOENT) {
- // we snap under dir_path, so mode does not matter much
- r = ceph_mkdirs(m_remote_mount, dir_path.c_str(), 0755);
+ // we snap under dir_root, so mode does not matter much
+ r = ceph_mkdirs(m_remote_mount, dir_root.c_str(), 0755);
if (r < 0) {
- derr << ": failed to create remote directory=" << dir_path << ": " << cpp_strerror(r)
+ derr << ": failed to create remote directory=" << dir_root << ": " << cpp_strerror(r)
<< dendl;
return r;
}
- r = ceph_open(m_remote_mount, dir_path.c_str(), O_RDONLY | O_DIRECTORY, 0);
+ r = ceph_open(m_remote_mount, dir_root.c_str(), O_RDONLY | O_DIRECTORY, 0);
if (r < 0) {
- derr << ": failed to open remote dir_path=" << dir_path << ": " << cpp_strerror(r)
+ derr << ": failed to open remote dir_root=" << dir_root << ": " << cpp_strerror(r)
<< dendl;
return r;
}
r = ceph_flock(m_remote_mount, fd, LOCK_EX | LOCK_NB, (uint64_t)replayer->get_thread_id());
if (r != 0) {
if (r == -EWOULDBLOCK) {
- dout(5) << ": dir_path=" << dir_path << " is locked by cephfs-mirror, "
+ dout(5) << ": dir_root=" << dir_root << " is locked by cephfs-mirror, "
<< "will retry again" << dendl;
} else {
- derr << ": failed to lock dir_path=" << dir_path << ": " << cpp_strerror(r)
+ derr << ": failed to lock dir_root=" << dir_root << ": " << cpp_strerror(r)
<< dendl;
}
if (ceph_close(m_remote_mount, fd) < 0) {
- derr << ": failed to close (cleanup) remote dir_path=" << dir_path << ": "
+ derr << ": failed to close (cleanup) remote dir_root=" << dir_root << ": "
<< cpp_strerror(r) << dendl;
}
return r;
}
- dout(10) << ": dir_path=" << dir_path << " locked" << dendl;
+ dout(10) << ": dir_root=" << dir_root << " locked" << dendl;
registry->fd = fd;
registry->replayer = replayer;
return 0;
}
-void PeerReplayer::unlock_directory(const std::string &dir_path, const DirRegistry ®istry) {
- dout(20) << ": dir_path=" << dir_path << dendl;
+void PeerReplayer::unlock_directory(const std::string &dir_root, const DirRegistry ®istry) {
+ dout(20) << ": dir_root=" << dir_root << dendl;
int r = ceph_flock(m_remote_mount, registry.fd, LOCK_UN,
(uint64_t)registry.replayer->get_thread_id());
if (r < 0) {
- derr << ": failed to unlock remote dir_path=" << dir_path << ": " << cpp_strerror(r)
+ derr << ": failed to unlock remote dir_root=" << dir_root << ": " << cpp_strerror(r)
<< dendl;
return;
}
r = ceph_close(m_remote_mount, registry.fd);
if (r < 0) {
- derr << ": failed to close remote dir_path=" << dir_path << ": " << cpp_strerror(r)
+ derr << ": failed to close remote dir_root=" << dir_root << ": " << cpp_strerror(r)
<< dendl;
}
- dout(10) << ": dir_path=" << dir_path << " unlocked" << dendl;
+ dout(10) << ": dir_root=" << dir_root << " unlocked" << dendl;
}
-int PeerReplayer::build_snap_map(const std::string &dir_path,
+int PeerReplayer::build_snap_map(const std::string &dir_root,
std::map<uint64_t, std::string> *snap_map, bool is_remote) {
- auto snap_dir = snapshot_dir_path(m_cct, dir_path);
- dout(20) << ": dir_path=" << dir_path << ", snap_dir=" << snap_dir
+ auto snap_dir = snapshot_dir_path(m_cct, dir_root);
+ dout(20) << ": dir_root=" << dir_root << ", snap_dir=" << snap_dir
<< ", is_remote=" << is_remote << dendl;
auto lr_str = is_remote ? "remote" : "local";
while (entry != NULL) {
auto d_name = std::string(entry->d_name);
dout(20) << ": entry=" << d_name << dendl;
- if (d_name != "." && d_name != "..") {
+ if (d_name != "." && d_name != ".." && d_name.rfind("_", 0) != 0) {
snaps.emplace(d_name);
}
return rv;
}
-int PeerReplayer::propagate_snap_deletes(const std::string &dir_path,
+int PeerReplayer::propagate_snap_deletes(const std::string &dir_root,
const std::set<std::string> &snaps) {
- dout(5) << ": dir_path=" << dir_path << ", deleted snapshots=" << snaps << dendl;
+ dout(5) << ": dir_root=" << dir_root << ", deleted snapshots=" << snaps << dendl;
for (auto &snap : snaps) {
- dout(20) << ": deleting dir_path=" << dir_path << ", snapshot=" << snap
+ dout(20) << ": deleting dir_root=" << dir_root << ", snapshot=" << snap
<< dendl;
- int r = ceph_rmsnap(m_remote_mount, dir_path.c_str(), snap.c_str());
+ int r = ceph_rmsnap(m_remote_mount, dir_root.c_str(), snap.c_str());
if (r < 0) {
- derr << ": failed to delete remote snap dir_path=" << dir_path
+ derr << ": failed to delete remote snap dir_root=" << dir_root
<< ", snapshot=" << snaps << ": " << cpp_strerror(r) << dendl;
return r;
}
- inc_deleted_snap(dir_path);
+ inc_deleted_snap(dir_root);
}
return 0;
}
int PeerReplayer::propagate_snap_renames(
- const std::string &dir_path,
+ const std::string &dir_root,
const std::set<std::pair<std::string,std::string>> &snaps) {
- dout(10) << ": dir_path=" << dir_path << ", renamed snapshots=" << snaps << dendl;
+ dout(10) << ": dir_root=" << dir_root << ", renamed snapshots=" << snaps << dendl;
for (auto &snapp : snaps) {
- auto from = snapshot_path(m_cct, dir_path, snapp.first);
- auto to = snapshot_path(m_cct, dir_path, snapp.second);
- dout(20) << ": renaming dir_path=" << dir_path << ", snapshot from="
+ auto from = snapshot_path(m_cct, dir_root, snapp.first);
+ auto to = snapshot_path(m_cct, dir_root, snapp.second);
+ dout(20) << ": renaming dir_root=" << dir_root << ", snapshot from="
<< from << ", to=" << to << dendl;
int r = ceph_rename(m_remote_mount, from.c_str(), to.c_str());
if (r < 0) {
- derr << ": failed to rename remote snap dir_path=" << dir_path
+ derr << ": failed to rename remote snap dir_root=" << dir_root
<< ", snapshot from =" << from << ", to=" << to << ": "
<< cpp_strerror(r) << dendl;
return r;
}
- inc_renamed_snap(dir_path);
+ inc_renamed_snap(dir_root);
}
return 0;
}
-int PeerReplayer::remote_mkdir(const std::string &local_path,
- const std::string &remote_path,
- const struct ceph_statx &stx) {
- dout(10) << ": local_path=" << local_path << ", remote_path=" << remote_path
- << dendl;
+int PeerReplayer::remote_mkdir(const std::string &epath, const struct ceph_statx &stx,
+ const FHandles &fh) {
+ dout(10) << ": remote epath=" << epath << dendl;
- int r = ceph_mkdir(m_remote_mount, remote_path.c_str(), stx.stx_mode & ~S_IFDIR);
+ int r = ceph_mkdirat(m_remote_mount, fh.r_fd_dir_root, epath.c_str(), stx.stx_mode & ~S_IFDIR);
if (r < 0 && r != -EEXIST) {
- derr << ": failed to create remote directory=" << remote_path << ": " << cpp_strerror(r)
+ derr << ": failed to create remote directory=" << epath << ": " << cpp_strerror(r)
<< dendl;
return r;
}
- r = ceph_lchown(m_remote_mount, remote_path.c_str(), stx.stx_uid, stx.stx_gid);
+ r = ceph_chownat(m_remote_mount, fh.r_fd_dir_root, epath.c_str(), stx.stx_uid, stx.stx_gid,
+ AT_SYMLINK_NOFOLLOW);
if (r < 0) {
- derr << ": failed to chown remote directory=" << remote_path << ": " << cpp_strerror(r)
+ derr << ": failed to chown remote directory=" << epath << ": " << cpp_strerror(r)
<< dendl;
return r;
}
- struct timeval times[] = {{stx.stx_atime.tv_sec, stx.stx_atime.tv_nsec / 1000},
- {stx.stx_mtime.tv_sec, stx.stx_mtime.tv_nsec / 1000}};
- r = ceph_lutimes(m_remote_mount, remote_path.c_str(), times);
+ r = ceph_chmodat(m_remote_mount, fh.r_fd_dir_root, epath.c_str(), stx.stx_mode & ~S_IFMT,
+ AT_SYMLINK_NOFOLLOW);
if (r < 0) {
- derr << ": failed to change [am]time on remote directory=" << remote_path << ": "
+ derr << ": failed to chmod remote directory=" << epath << ": " << cpp_strerror(r)
+ << dendl;
+ return r;
+ }
+
+ struct timespec times[] = {{stx.stx_atime.tv_sec, stx.stx_atime.tv_nsec},
+ {stx.stx_mtime.tv_sec, stx.stx_mtime.tv_nsec}};
+ r = ceph_utimensat(m_remote_mount, fh.r_fd_dir_root, epath.c_str(), times, AT_SYMLINK_NOFOLLOW);
+ if (r < 0) {
+ derr << ": failed to change [am]time on remote directory=" << epath << ": "
<< cpp_strerror(r) << dendl;
return r;
}
#define NR_IOVECS 8 // # iovecs
#define IOVEC_SIZE (8 * 1024 * 1024) // buffer size for each iovec
-int PeerReplayer::remote_copy(const std::string &dir_path,
- const std::string &local_path,
- const std::string &remote_path,
- const struct ceph_statx &stx) {
- dout(10) << ": dir_path=" << dir_path << ", local_path=" << local_path
- << ", remote_path=" << remote_path << dendl;
+int PeerReplayer::copy_to_remote(const std::string &dir_root, const std::string &epath,
+ const struct ceph_statx &stx, const FHandles &fh) {
+ dout(10) << ": dir_root=" << dir_root << ", epath=" << epath << dendl;
int l_fd;
int r_fd;
void *ptr;
struct iovec iov[NR_IOVECS];
- int r = ceph_open(m_local_mount, local_path.c_str(), O_RDONLY, 0);
+ int r = ceph_openat(m_local_mount, fh.c_fd, epath.c_str(), O_RDONLY | O_NOFOLLOW, 0);
if (r < 0) {
- derr << ": failed to open local file path=" << local_path << ": "
+ derr << ": failed to open local file path=" << epath << ": "
<< cpp_strerror(r) << dendl;
return r;
}
l_fd = r;
- r = ceph_open(m_remote_mount, remote_path.c_str(),
- O_CREAT | O_TRUNC | O_WRONLY, stx.stx_mode);
+ r = ceph_openat(m_remote_mount, fh.r_fd_dir_root, epath.c_str(),
+ O_CREAT | O_TRUNC | O_WRONLY | O_NOFOLLOW, stx.stx_mode);
if (r < 0) {
- derr << ": failed to create remote file path=" << remote_path << ": "
+ derr << ": failed to create remote file path=" << epath << ": "
<< cpp_strerror(r) << dendl;
goto close_local_fd;
}
}
while (true) {
- if (should_backoff(dir_path, &r)) {
+ if (should_backoff(dir_root, &r)) {
dout(0) << ": backing off r=" << r << dendl;
break;
}
r = ceph_preadv(m_local_mount, l_fd, iov, NR_IOVECS, -1);
if (r < 0) {
- derr << ": failed to read local file path=" << local_path << ": "
+ derr << ": failed to read local file path=" << epath << ": "
<< cpp_strerror(r) << dendl;
break;
}
r = ceph_pwritev(m_remote_mount, r_fd, iov, iovs, -1);
if (r < 0) {
- derr << ": failed to write remote file path=" << remote_path << ": "
+ derr << ": failed to write remote file path=" << epath << ": "
<< cpp_strerror(r) << dendl;
break;
}
if (r == 0) {
r = ceph_fsync(m_remote_mount, r_fd, 0);
if (r < 0) {
- derr << ": failed to sync data for dir_path=" << remote_path << ": "
+ derr << ": failed to sync data for file path=" << epath << ": "
<< cpp_strerror(r) << dendl;
}
}
close_remote_fd:
if (ceph_close(m_remote_mount, r_fd) < 0) {
- derr << ": failed to close remote fd path=" << remote_path << ": " << cpp_strerror(r)
+ derr << ": failed to close remote fd path=" << epath << ": " << cpp_strerror(r)
<< dendl;
return -EINVAL;
}
close_local_fd:
if (ceph_close(m_local_mount, l_fd) < 0) {
- derr << ": failed to close local fd path=" << local_path << ": " << cpp_strerror(r)
+ derr << ": failed to close local fd path=" << epath << ": " << cpp_strerror(r)
<< dendl;
return -EINVAL;
}
return r == 0 ? 0 : r;
}
-int PeerReplayer::remote_file_op(const std::string &dir_path,
- const std::string &local_path,
- const std::string &remote_path,
- const struct ceph_statx &stx) {
- dout(10) << ": dir_path=" << dir_path << ", local_path=" << local_path
- << ", remote_path=" << remote_path << dendl;
+int PeerReplayer::remote_file_op(const std::string &dir_root, const std::string &epath,
+ const struct ceph_statx &stx, const FHandles &fh,
+ bool need_data_sync, bool need_attr_sync) {
+ dout(10) << ": dir_root=" << dir_root << ", epath=" << epath << ", need_data_sync=" << need_data_sync
+ << ", need_attr_sync=" << need_attr_sync << dendl;
int r;
- if (S_ISREG(stx.stx_mode)) {
- r = remote_copy(dir_path, local_path, remote_path, stx);
+ if (need_data_sync) {
+ if (S_ISREG(stx.stx_mode)) {
+ r = copy_to_remote(dir_root, epath, stx, fh);
+ if (r < 0) {
+ derr << ": failed to copy path=" << epath << ": " << cpp_strerror(r) << dendl;
+ return r;
+ }
+ } else if (S_ISLNK(stx.stx_mode)) {
+ // free the remote link before relinking
+ r = ceph_unlinkat(m_remote_mount, fh.r_fd_dir_root, epath.c_str(), 0);
+ if (r < 0 && r != -ENOENT) {
+ derr << ": failed to remove remote symlink=" << epath << dendl;
+ return r;
+ }
+ char *target = (char *)alloca(stx.stx_size+1);
+ r = ceph_readlinkat(m_local_mount, fh.c_fd, epath.c_str(), target, stx.stx_size);
+ if (r < 0) {
+ derr << ": failed to readlink local path=" << epath << ": " << cpp_strerror(r)
+ << dendl;
+ return r;
+ }
+
+ target[stx.stx_size] = '\0';
+ r = ceph_symlinkat(m_remote_mount, target, fh.r_fd_dir_root, epath.c_str());
+ if (r < 0 && r != EEXIST) {
+ derr << ": failed to symlink remote path=" << epath << " to target=" << target
+ << ": " << cpp_strerror(r) << dendl;
+ return r;
+ }
+ } else {
+ dout(5) << ": skipping entry=" << epath << ": unsupported mode=" << stx.stx_mode
+ << dendl;
+ return 0;
+ }
+ }
+
+ if (need_attr_sync) {
+ r = ceph_chownat(m_remote_mount, fh.r_fd_dir_root, epath.c_str(), stx.stx_uid, stx.stx_gid,
+ AT_SYMLINK_NOFOLLOW);
if (r < 0) {
- derr << ": failed to copy path=" << local_path << ": " << cpp_strerror(r)
+ derr << ": failed to chown remote directory=" << epath << ": " << cpp_strerror(r)
<< dendl;
return r;
}
- } else if (S_ISLNK(stx.stx_mode)) {
- char *target = (char *)alloca(stx.stx_size+1);
- r = ceph_readlink(m_local_mount, local_path.c_str(), target, stx.stx_size);
+
+ r = ceph_chmodat(m_remote_mount, fh.r_fd_dir_root, epath.c_str(), stx.stx_mode & ~S_IFMT,
+ AT_SYMLINK_NOFOLLOW);
if (r < 0) {
- derr << ": failed to readlink local path=" << local_path << ": " << cpp_strerror(r)
+ derr << ": failed to chmod remote directory=" << epath << ": " << cpp_strerror(r)
<< dendl;
return r;
}
- target[stx.stx_size] = '\0';
- r = ceph_symlink(m_remote_mount, target, remote_path.c_str());
- if (r < 0 && r != EEXIST) {
- derr << ": failed to symlink remote path=" << remote_path << " to target=" << target
- << ": " << cpp_strerror(r) << dendl;
+ struct timespec times[] = {{stx.stx_atime.tv_sec, stx.stx_atime.tv_nsec},
+ {stx.stx_mtime.tv_sec, stx.stx_mtime.tv_nsec}};
+ r = ceph_utimensat(m_remote_mount, fh.r_fd_dir_root, epath.c_str(), times, AT_SYMLINK_NOFOLLOW);
+ if (r < 0) {
+ derr << ": failed to change [am]time on remote directory=" << epath << ": "
+ << cpp_strerror(r) << dendl;
return r;
}
- } else {
- dout(5) << ": skipping entry=" << local_path << ": unsupported mode=" << stx.stx_mode
- << dendl;
- return 0;
- }
-
- r = ceph_lchown(m_remote_mount, remote_path.c_str(), stx.stx_uid, stx.stx_gid);
- if (r < 0) {
- derr << ": failed to chown remote directory=" << remote_path << ": "
- << cpp_strerror(r) << dendl;
- return r;
- }
-
- struct timeval times[] = {{stx.stx_atime.tv_sec, stx.stx_atime.tv_nsec / 1000},
- {stx.stx_mtime.tv_sec, stx.stx_mtime.tv_nsec / 1000}};
- r = ceph_lutimes(m_remote_mount, remote_path.c_str(), times);
- if (r < 0) {
- derr << ": failed to change [am]time on remote directory=" << remote_path << ": "
- << cpp_strerror(r) << dendl;
- return r;
}
return 0;
}
-int PeerReplayer::cleanup_remote_dir(const std::string &dir_path) {
- dout(20) << ": dir_path=" << dir_path << dendl;
+int PeerReplayer::cleanup_remote_dir(const std::string &dir_root,
+ const std::string &epath, const FHandles &fh) {
+ dout(20) << ": dir_root=" << dir_root << ", epath=" << epath
+ << dendl;
- std::stack<SyncEntry> rm_stack;
- ceph_dir_result *tdirp;
- int r = ceph_opendir(m_remote_mount, dir_path.c_str(), &tdirp);
+ struct ceph_statx tstx;
+ int r = ceph_statxat(m_remote_mount, fh.r_fd_dir_root, epath.c_str(), &tstx,
+ CEPH_STATX_MODE | CEPH_STATX_UID | CEPH_STATX_GID |
+ CEPH_STATX_SIZE | CEPH_STATX_ATIME | CEPH_STATX_MTIME,
+ AT_NO_ATTR_SYNC | AT_SYMLINK_NOFOLLOW);
if (r < 0) {
- derr << ": failed to open remote directory=" << dir_path << ": "
+ derr << ": failed to stat remote directory=" << epath << ": "
<< cpp_strerror(r) << dendl;
return r;
}
- struct ceph_statx tstx;
- r = ceph_statx(m_remote_mount, dir_path.c_str(), &tstx,
- CEPH_STATX_MODE | CEPH_STATX_UID | CEPH_STATX_GID |
- CEPH_STATX_SIZE | CEPH_STATX_ATIME | CEPH_STATX_MTIME,
- AT_NO_ATTR_SYNC | AT_SYMLINK_NOFOLLOW);
+ ceph_dir_result *tdirp;
+ r = opendirat(m_remote_mount, fh.r_fd_dir_root, epath, AT_SYMLINK_NOFOLLOW,
+ &tdirp);
if (r < 0) {
- derr << ": failed to stat remote directory=" << dir_path << ": "
+ derr << ": failed to open remote directory=" << epath << ": "
<< cpp_strerror(r) << dendl;
return r;
}
- rm_stack.emplace(SyncEntry(dir_path, tdirp, tstx));
+ std::stack<SyncEntry> rm_stack;
+ rm_stack.emplace(SyncEntry(epath, tdirp, tstx));
while (!rm_stack.empty()) {
- if (should_backoff(dir_path, &r)) {
+ if (should_backoff(dir_root, &r)) {
dout(0) << ": backing off r=" << r << dendl;
break;
}
}
if (r == 0) {
- if (rm_stack.size() > 1) {
- r = ceph_rmdir(m_remote_mount, entry.epath.c_str());
- if (r < 0) {
- derr << ": failed to remove remote directory=" << entry.epath << ": "
- << cpp_strerror(r) << dendl;
- break;
- }
+ r = ceph_unlinkat(m_remote_mount, fh.r_fd_dir_root, entry.epath.c_str(), AT_REMOVEDIR);
+ if (r < 0) {
+ derr << ": failed to remove remote directory=" << entry.epath << ": "
+ << cpp_strerror(r) << dendl;
+ break;
}
dout(10) << ": done for remote directory=" << entry.epath << dendl;
auto epath = entry_path(entry.epath, e_name);
if (S_ISDIR(stx.stx_mode)) {
ceph_dir_result *dirp;
- r = ceph_opendir(m_remote_mount, epath.c_str(), &dirp);
+ r = opendirat(m_remote_mount, fh.r_fd_dir_root, epath, AT_SYMLINK_NOFOLLOW,
+ &dirp);
if (r < 0) {
derr << ": failed to open remote directory=" << epath << ": "
<< cpp_strerror(r) << dendl;
rm_stack.emplace(SyncEntry(epath, stx));
}
} else {
- r = ceph_unlink(m_remote_mount, entry.epath.c_str());
+ r = ceph_unlinkat(m_remote_mount, fh.r_fd_dir_root, entry.epath.c_str(), 0);
if (r < 0) {
derr << ": failed to remove remote directory=" << entry.epath << ": "
<< cpp_strerror(r) << dendl;
return r;
}
-int PeerReplayer::do_synchronize(const std::string &dir_path, const std::string &snap_name) {
- dout(20) << ": dir_path=" << dir_path << ", snap_name=" << snap_name << dendl;
+int PeerReplayer::should_sync_entry(const std::string &epath, const struct ceph_statx &cstx,
+ const FHandles &fh, bool *need_data_sync, bool *need_attr_sync) {
+ dout(10) << ": epath=" << epath << dendl;
+
+ *need_data_sync = false;
+ *need_attr_sync = false;
+ struct ceph_statx pstx;
+ int r = ceph_statxat(fh.p_mnt, fh.p_fd, epath.c_str(), &pstx,
+ CEPH_STATX_MODE | CEPH_STATX_UID | CEPH_STATX_GID |
+ CEPH_STATX_SIZE | CEPH_STATX_CTIME | CEPH_STATX_MTIME,
+ AT_NO_ATTR_SYNC | AT_SYMLINK_NOFOLLOW);
+ if (r < 0 && r != -ENOENT && r != -ENOTDIR) {
+ derr << ": failed to stat prev entry= " << epath << ": " << cpp_strerror(r)
+ << dendl;
+ return r;
+ }
- auto snap_path = snapshot_path(m_cct, dir_path, snap_name);
- std::stack<SyncEntry> sync_stack;
+ if (r < 0) {
+ // inode does not exist in prev snapshot or file type has changed
+ // (file was S_IFREG earlier, S_IFDIR now).
+ dout(5) << ": entry=" << epath << ", r=" << r << dendl;
+ *need_data_sync = true;
+ *need_attr_sync = true;
+ return 0;
+ }
- ceph_dir_result *tdirp;
- int r = ceph_opendir(m_local_mount, snap_path.c_str(), &tdirp);
+ dout(10) << ": local cur statx: mode=" << cstx.stx_mode << ", uid=" << cstx.stx_uid
+ << ", gid=" << cstx.stx_gid << ", size=" << cstx.stx_size << ", ctime="
+ << cstx.stx_ctime << ", mtime=" << cstx.stx_mtime << dendl;
+ dout(10) << ": local prev statx: mode=" << pstx.stx_mode << ", uid=" << pstx.stx_uid
+ << ", gid=" << pstx.stx_gid << ", size=" << pstx.stx_size << ", ctime="
+ << pstx.stx_ctime << ", mtime=" << pstx.stx_mtime << dendl;
+ if ((cstx.stx_mode & S_IFMT) != (pstx.stx_mode & S_IFMT)) {
+ dout(5) << ": entry=" << epath << " has mode mismatch" << dendl;
+ *need_data_sync = true;
+ *need_attr_sync = true;
+ } else {
+ *need_data_sync = (cstx.stx_size != pstx.stx_size) || (cstx.stx_mtime != pstx.stx_mtime);
+ *need_attr_sync = (cstx.stx_ctime != pstx.stx_ctime);
+ }
+
+ return 0;
+}
+
+int PeerReplayer::propagate_deleted_entries(const std::string &dir_root,
+ const std::string &epath, const FHandles &fh) {
+ dout(10) << ": dir_root=" << dir_root << ", epath=" << epath << dendl;
+
+ ceph_dir_result *dirp;
+ int r = opendirat(fh.p_mnt, fh.p_fd, epath, AT_SYMLINK_NOFOLLOW, &dirp);
if (r < 0) {
- derr << ": failed to open local directory=" << snap_path << ": "
- << cpp_strerror(r) << dendl;
+ if (r == -ELOOP) {
+ dout(5) << ": epath=" << epath << " is a symbolic link -- mode sync"
+ << " done when traversing parent" << dendl;
+ return 0;
+ }
+ if (r == -ENOTDIR) {
+ dout(5) << ": epath=" << epath << " is not a directory -- mode sync"
+ << " done when traversing parent" << dendl;
+ return 0;
+ }
+ if (r == -ENOENT) {
+ dout(5) << ": epath=" << epath << " missing in previous-snap/remote dir-root"
+ << dendl;
+ }
+ return r;
+ }
+
+ struct dirent *dire = (struct dirent *)alloca(512 * sizeof(struct dirent));
+ while (true) {
+ if (should_backoff(dir_root, &r)) {
+ dout(0) << ": backing off r=" << r << dendl;
+ break;
+ }
+
+ int len = ceph_getdents(fh.p_mnt, dirp, (char *)dire, 512);
+ if (len < 0) {
+ derr << ": failed to read directory entries: " << cpp_strerror(len) << dendl;
+ r = len;
+ // flip errno to signal that we got an err (possible the
+ // snapshot getting deleted in midst).
+ if (r == -ENOENT) {
+ r = -EINVAL;
+ }
+ break;
+ }
+ if (len == 0) {
+ dout(10) << ": reached EOD" << dendl;
+ break;
+ }
+ int nr = len / sizeof(struct dirent);
+ for (int i = 0; i < nr; ++i) {
+ if (should_backoff(dir_root, &r)) {
+ dout(0) << ": backing off r=" << r << dendl;
+ break;
+ }
+ std::string d_name = std::string(dire[i].d_name);
+ if (d_name == "." || d_name == "..") {
+ continue;
+ }
+
+ struct ceph_statx pstx;
+ auto dpath = entry_path(epath, d_name);
+ r = ceph_statxat(fh.p_mnt, fh.p_fd, dpath.c_str(), &pstx,
+ CEPH_STATX_MODE, AT_NO_ATTR_SYNC | AT_SYMLINK_NOFOLLOW);
+ if (r < 0) {
+ derr << ": failed to stat (prev) directory=" << dpath << ": "
+ << cpp_strerror(r) << dendl;
+ // flip errno to signal that we got an err (possible the
+ // snapshot getting deleted in midst).
+ if (r == -ENOENT) {
+ r = -EINVAL;
+ }
+ return r;
+ }
+
+ struct ceph_statx cstx;
+ r = ceph_statxat(m_local_mount, fh.c_fd, dpath.c_str(), &cstx,
+ CEPH_STATX_MODE, AT_NO_ATTR_SYNC | AT_SYMLINK_NOFOLLOW);
+ if (r < 0 && r != -ENOENT) {
+ derr << ": failed to stat local (cur) directory=" << dpath << ": "
+ << cpp_strerror(r) << dendl;
+ return r;
+ }
+
+ bool purge_remote = true;
+ if (r == 0) {
+ // directory entry present in both snapshots -- check inode
+ // type
+ if ((pstx.stx_mode & S_IFMT) == (cstx.stx_mode & S_IFMT)) {
+ dout(5) << ": mode matches for entry=" << d_name << dendl;
+ purge_remote = false;
+ } else {
+ dout(5) << ": mode mismatch for entry=" << d_name << dendl;
+ }
+ } else {
+ dout(5) << ": entry=" << d_name << " missing in current snapshot" << dendl;
+ }
+
+ if (purge_remote) {
+ dout(5) << ": purging remote entry=" << dpath << dendl;
+ if (S_ISDIR(pstx.stx_mode)) {
+ r = cleanup_remote_dir(dir_root, dpath, fh);
+ } else {
+ r = ceph_unlinkat(m_remote_mount, fh.r_fd_dir_root, dpath.c_str(), 0);
+ }
+
+ if (r < 0 && r != -ENOENT) {
+ derr << ": failed to cleanup remote entry=" << d_name << ": "
+ << cpp_strerror(r) << dendl;
+ return r;
+ }
+ }
+ }
+ }
+
+ ceph_closedir(fh.p_mnt, dirp);
+ return r;
+}
+
+int PeerReplayer::open_dir(MountRef mnt, const std::string &dir_path,
+ boost::optional<uint64_t> snap_id) {
+ dout(20) << ": dir_path=" << dir_path << dendl;
+ if (snap_id) {
+ dout(20) << ": expected snapshot id=" << *snap_id << dendl;
+ }
+
+ int fd = ceph_open(mnt, dir_path.c_str(), O_DIRECTORY | O_RDONLY, 0);
+ if (fd < 0) {
+ derr << ": cannot open dir_path=" << dir_path << ": " << cpp_strerror(fd)
+ << dendl;
+ return fd;
+ }
+
+ if (!snap_id) {
+ return fd;
+ }
+
+ snap_info info;
+ int r = ceph_get_snap_info(mnt, dir_path.c_str(), &info);
+ if (r < 0) {
+ derr << ": failed to fetch snap_info for path=" << dir_path
+ << ": " << cpp_strerror(r) << dendl;
+ ceph_close(mnt, fd);
+ return r;
+ }
+
+ if (info.id != *snap_id) {
+ dout(5) << ": got mismatching snapshot id for path=" << dir_path << " (" << info.id
+ << " vs " << *snap_id << ") -- possible recreate" << dendl;
+ ceph_close(mnt, fd);
+ return -EINVAL;
+ }
+
+ return fd;
+}
+
+int PeerReplayer::pre_sync_check_and_open_handles(
+ const std::string &dir_root,
+ const Snapshot ¤t, boost::optional<Snapshot> prev,
+ FHandles *fh) {
+ dout(20) << ": dir_root=" << dir_root << ", current=" << current << dendl;
+ if (prev) {
+ dout(20) << ": prev=" << prev << dendl;
+ }
+
+ auto cur_snap_path = snapshot_path(m_cct, dir_root, current.first);
+ auto fd = open_dir(m_local_mount, cur_snap_path, current.second);
+ if (fd < 0) {
+ return fd;
+ }
+
+ // current snapshot file descriptor
+ fh->c_fd = fd;
+
+ MountRef mnt;
+ if (prev) {
+ mnt = m_local_mount;
+ auto prev_snap_path = snapshot_path(m_cct, dir_root, (*prev).first);
+ fd = open_dir(mnt, prev_snap_path, (*prev).second);
+ } else {
+ mnt = m_remote_mount;
+ fd = open_dir(mnt, dir_root, boost::none);
+ }
+
+ if (fd < 0) {
+ if (!prev || fd != -ENOENT) {
+ ceph_close(m_local_mount, fh->c_fd);
+ return fd;
+ }
+
+ // ENOENT of previous snap
+ dout(5) << ": previous snapshot=" << *prev << " missing" << dendl;
+ mnt = m_remote_mount;
+ fd = open_dir(mnt, dir_root, boost::none);
+ if (fd < 0) {
+ ceph_close(m_local_mount, fh->c_fd);
+ return fd;
+ }
+ }
+
+ // "previous" snapshot or dir_root file descriptor
+ fh->p_fd = fd;
+ fh->p_mnt = mnt;
+
+ {
+ std::scoped_lock locker(m_lock);
+ auto it = m_registered.find(dir_root);
+ ceph_assert(it != m_registered.end());
+ fh->r_fd_dir_root = it->second.fd;
+ }
+
+ dout(5) << ": using " << ((fh->p_mnt == m_local_mount) ? "local (previous) snapshot" : "remote dir_root")
+ << " for incremental transfer" << dendl;
+ return 0;
+}
+
+void PeerReplayer::post_sync_close_handles(const FHandles &fh) {
+ dout(20) << dendl;
+
+ // @FHandles.r_fd_dir_root is closed in @unregister_directory since
+ // its used to acquire an exclusive lock on remote dir_root.
+ ceph_close(m_local_mount, fh.c_fd);
+ ceph_close(fh.p_mnt, fh.p_fd);
+}
+
+int PeerReplayer::do_synchronize(const std::string &dir_root, const Snapshot ¤t,
+ boost::optional<Snapshot> prev) {
+ dout(20) << ": dir_root=" << dir_root << ", current=" << current << dendl;
+ if (prev) {
+ dout(20) << ": incremental sync check from prev=" << prev << dendl;
+ }
+
+ FHandles fh;
+ int r = pre_sync_check_and_open_handles(dir_root, current, prev, &fh);
+ if (r < 0) {
+ dout(5) << ": cannot proceeed with sync: " << cpp_strerror(r) << dendl;
+ return r;
+ }
+
+ BOOST_SCOPE_EXIT_ALL( (this)(&fh) ) {
+ post_sync_close_handles(fh);
+ };
+
+ // record that we are going to "dirty" the data under this
+ // directory root
+ auto snap_id_str{stringify(current.second)};
+ r = ceph_fsetxattr(m_remote_mount, fh.r_fd_dir_root, "ceph.mirror.dirty_snap_id",
+ snap_id_str.c_str(), snap_id_str.size(), 0);
+ if (r < 0) {
+ derr << ": error setting \"ceph.mirror.dirty_snap_id\" on dir_root=" << dir_root
+ << ": " << cpp_strerror(r) << dendl;
return r;
}
struct ceph_statx tstx;
- r = ceph_statx(m_local_mount, snap_path.c_str(), &tstx,
- CEPH_STATX_MODE | CEPH_STATX_UID | CEPH_STATX_GID |
- CEPH_STATX_SIZE | CEPH_STATX_ATIME | CEPH_STATX_MTIME,
- AT_NO_ATTR_SYNC | AT_SYMLINK_NOFOLLOW);
+ r = ceph_fstatx(m_local_mount, fh.c_fd, &tstx,
+ CEPH_STATX_MODE | CEPH_STATX_UID | CEPH_STATX_GID |
+ CEPH_STATX_SIZE | CEPH_STATX_ATIME | CEPH_STATX_MTIME,
+ AT_NO_ATTR_SYNC | AT_SYMLINK_NOFOLLOW);
if (r < 0) {
- derr << ": failed to stat local directory=" << snap_path << ": "
- << cpp_strerror(r) << dendl;
+ derr << ": failed to stat snap=" << current.first << ": " << cpp_strerror(r)
+ << dendl;
+ return r;
+ }
+
+ ceph_dir_result *tdirp;
+ r = ceph_fdopendir(m_local_mount, fh.c_fd, &tdirp);
+ if (r < 0) {
+ derr << ": failed to open local snap=" << current.first << ": " << cpp_strerror(r)
+ << dendl;
return r;
}
- sync_stack.emplace(SyncEntry("/", tdirp, tstx));
+ std::stack<SyncEntry> sync_stack;
+ sync_stack.emplace(SyncEntry(".", tdirp, tstx));
while (!sync_stack.empty()) {
- if (should_backoff(dir_path, &r)) {
+ if (should_backoff(dir_root, &r)) {
dout(0) << ": backing off r=" << r << dendl;
break;
}
auto &entry = sync_stack.top();
dout(20) << ": top of stack path=" << entry.epath << dendl;
if (entry.is_directory()) {
+ // entry is a directory -- propagate deletes for missing entries
+ // (and changed inode types) to the remote filesystem.
+ if (!entry.needs_remote_sync()) {
+ r = propagate_deleted_entries(dir_root, entry.epath, fh);
+ if (r < 0 && r != -ENOENT) {
+ derr << ": failed to propagate missing dirs: " << cpp_strerror(r) << dendl;
+ break;
+ }
+ entry.set_remote_synced();
+ }
+
struct ceph_statx stx;
struct dirent de;
while (true) {
}
auto epath = entry_path(entry.epath, e_name);
- auto l_path = entry_path(snap_path, epath);
- auto r_path = entry_path(dir_path, epath);
if (S_ISDIR(stx.stx_mode)) {
- r = remote_mkdir(l_path, r_path, stx);
+ r = remote_mkdir(epath, stx, fh);
if (r < 0) {
break;
}
ceph_dir_result *dirp;
- r = ceph_opendir(m_local_mount, l_path.c_str(), &dirp);
+ r = opendirat(m_local_mount, fh.c_fd, epath, AT_SYMLINK_NOFOLLOW, &dirp);
if (r < 0) {
- derr << ": failed to open local directory=" << l_path << ": "
+ derr << ": failed to open local directory=" << epath << ": "
<< cpp_strerror(r) << dendl;
break;
}
sync_stack.emplace(SyncEntry(epath, stx));
}
} else {
- auto l_path = entry_path(snap_path, entry.epath);
- auto r_path = entry_path(dir_path, entry.epath);
- r = remote_file_op(dir_path, l_path, r_path, entry.stx);
+ bool need_data_sync = true;
+ bool need_attr_sync = true;
+ r = should_sync_entry(entry.epath, entry.stx, fh,
+ &need_data_sync, &need_attr_sync);
if (r < 0) {
break;
}
- dout(10) << ": done for file=" << entry.epath << dendl;
+
+ dout(5) << ": entry=" << entry.epath << ", data_sync=" << need_data_sync
+ << ", attr_sync=" << need_attr_sync << dendl;
+ if (need_data_sync || need_attr_sync) {
+ r = remote_file_op(dir_root, entry.epath, entry.stx, fh, need_data_sync,
+ need_attr_sync);
+ if (r < 0) {
+ break;
+ }
+ }
+ dout(10) << ": done for epath=" << entry.epath << dendl;
sync_stack.pop();
}
}
return r;
}
-int PeerReplayer::synchronize(const std::string &dir_path, uint64_t snap_id,
- const std::string &snap_name) {
- dout(20) << ": dir_path=" << dir_path << ", snap_id=" << snap_id
- << ", snap_name=" << snap_name << dendl;
+int PeerReplayer::synchronize(const std::string &dir_root, const Snapshot ¤t,
+ boost::optional<Snapshot> prev) {
+ dout(20) << ": dir_root=" << dir_root << ", current=" << current << dendl;
+ if (prev) {
+ dout(20) << ": prev=" << prev << dendl;
+ }
- auto snap_path = snapshot_path(m_cct, dir_path, snap_name);
+ int r = ceph_getxattr(m_remote_mount, dir_root.c_str(), "ceph.mirror.dirty_snap_id", nullptr, 0);
+ if (r < 0 && r != -ENODATA) {
+ derr << ": failed to fetch primary_snap_id length from dir_root=" << dir_root
+ << ": " << cpp_strerror(r) << dendl;
+ return r;
+ }
- int r = cleanup_remote_dir(dir_path);
+ // no xattr, can't determine which snap the data belongs to!
if (r < 0) {
- derr << ": failed to cleanup remote directory=" << dir_path << dendl;
- return r;
+ dout(5) << ": missing \"ceph.mirror.dirty_snap_id\" xattr on remote -- using"
+ << " incremental sync with remote scan" << dendl;
+ r = do_synchronize(dir_root, current, boost::none);
+ } else {
+ size_t xlen = r;
+ char *val = (char *)alloca(xlen+1);
+ r = ceph_getxattr(m_remote_mount, dir_root.c_str(), "ceph.mirror.dirty_snap_id", (void*)val, xlen);
+ if (r < 0) {
+ derr << ": failed to fetch \"dirty_snap_id\" for dir_root: " << dir_root
+ << ": " << cpp_strerror(r) << dendl;
+ return r;
+ }
+
+ val[xlen] = '\0';
+ uint64_t dirty_snap_id = atoll(val);
+
+ dout(20) << ": dirty_snap_id: " << dirty_snap_id << " vs (" << current.second
+ << "," << (prev ? stringify((*prev).second) : "~") << ")" << dendl;
+ if (prev && (dirty_snap_id == (*prev).second || dirty_snap_id == current.second)) {
+ dout(5) << ": match -- using incremental sync with local scan" << dendl;
+ r = do_synchronize(dir_root, current, prev);
+ } else {
+ dout(5) << ": mismatch -- using incremental sync with remote scan" << dendl;
+ r = do_synchronize(dir_root, current, boost::none);
+ }
}
- r = do_synchronize(dir_path, snap_name);
+ // snap sync failed -- bail out!
if (r < 0) {
- derr << ": failed to synchronize dir_path=" << dir_path << ", snapshot="
- << snap_path << dendl;
return r;
}
- auto snap_id_str{stringify(snap_id)};
- snap_metadata snap_meta[] = {{PRIMARY_SNAP_ID_KEY.c_str(), snap_id_str.c_str()}};
- r = ceph_mksnap(m_remote_mount, dir_path.c_str(), snap_name.c_str(), 0755,
- snap_meta, 1);
+ auto cur_snap_id_str{stringify(current.second)};
+ snap_metadata snap_meta[] = {{PRIMARY_SNAP_ID_KEY.c_str(), cur_snap_id_str.c_str()}};
+ r = ceph_mksnap(m_remote_mount, dir_root.c_str(), current.first.c_str(), 0755,
+ snap_meta, sizeof(snap_meta)/sizeof(snap_metadata));
if (r < 0) {
- derr << ": failed to snap remote directory dir_path=" << dir_path
+ derr << ": failed to snap remote directory dir_root=" << dir_root
<< ": " << cpp_strerror(r) << dendl;
}
return r;
}
-int PeerReplayer::do_sync_snaps(const std::string &dir_path) {
- dout(20) << ": dir_path=" << dir_path << dendl;
+int PeerReplayer::do_sync_snaps(const std::string &dir_root) {
+ dout(20) << ": dir_root=" << dir_root << dendl;
std::map<uint64_t, std::string> local_snap_map;
std::map<uint64_t, std::string> remote_snap_map;
- int r = build_snap_map(dir_path, &local_snap_map);
+ int r = build_snap_map(dir_root, &local_snap_map);
if (r < 0) {
derr << ": failed to build local snap map" << dendl;
return r;
}
- r = build_snap_map(dir_path, &remote_snap_map, true);
+ r = build_snap_map(dir_root, &remote_snap_map, true);
if (r < 0) {
derr << ": failed to build remote snap map" << dendl;
return r;
}
}
- r = propagate_snap_deletes(dir_path, snaps_deleted);
+ r = propagate_snap_deletes(dir_root, snaps_deleted);
if (r < 0) {
derr << ": failed to propgate deleted snapshots" << dendl;
return r;
}
- r = propagate_snap_renames(dir_path, snaps_renamed);
+ r = propagate_snap_renames(dir_root, snaps_renamed);
if (r < 0) {
derr << ": failed to propgate renamed snapshots" << dendl;
return r;
// start mirroring snapshots from the last snap-id synchronized
uint64_t last_snap_id = 0;
+ std::string last_snap_name;
if (!remote_snap_map.empty()) {
auto last = remote_snap_map.rbegin();
last_snap_id = last->first;
- set_last_synced_snap(dir_path, last_snap_id, last->second);
+ last_snap_name = last->second;
+ set_last_synced_snap(dir_root, last_snap_id, last_snap_name);
}
dout(5) << ": last snap-id transferred=" << last_snap_id << dendl;
auto snaps_per_cycle = g_ceph_context->_conf.get_val<uint64_t>(
"cephfs_mirror_max_snapshot_sync_per_cycle");
- dout(10) << ": synzhronizing from snap-id=" << it->first << dendl;
+ dout(10) << ": synchronizing from snap-id=" << it->first << dendl;
for (; it != local_snap_map.end(); ++it) {
- set_current_syncing_snap(dir_path, it->first, it->second);
+ set_current_syncing_snap(dir_root, it->first, it->second);
auto start = clock::now();
- r = synchronize(dir_path, it->first, it->second);
+ boost::optional<Snapshot> prev = boost::none;
+ if (last_snap_id != 0) {
+ prev = std::make_pair(last_snap_name, last_snap_id);
+ }
+ r = synchronize(dir_root, std::make_pair(it->second, it->first), prev);
if (r < 0) {
- derr << ": failed to synchronize dir_path=" << dir_path
+ derr << ": failed to synchronize dir_root=" << dir_root
<< ", snapshot=" << it->second << dendl;
- clear_current_syncing_snap(dir_path);
+ clear_current_syncing_snap(dir_root);
return r;
}
std::chrono::duration<double> duration = clock::now() - start;
- set_last_synced_stat(dir_path, it->first, it->second, duration.count());
+ set_last_synced_stat(dir_root, it->first, it->second, duration.count());
if (--snaps_per_cycle == 0) {
break;
}
+
+ last_snap_name = it->second;
+ last_snap_id = it->first;
}
return 0;
}
-void PeerReplayer::sync_snaps(const std::string &dir_path,
+void PeerReplayer::sync_snaps(const std::string &dir_root,
std::unique_lock<ceph::mutex> &locker) {
- dout(20) << ": dir_path=" << dir_path << dendl;
+ dout(20) << ": dir_root=" << dir_root << dendl;
locker.unlock();
- int r = do_sync_snaps(dir_path);
+ int r = do_sync_snaps(dir_root);
if (r < 0) {
- derr << ": failed to sync snapshots for dir_path=" << dir_path << dendl;
+ derr << ": failed to sync snapshots for dir_root=" << dir_root << dendl;
}
locker.lock();
if (r < 0) {
- _inc_failed_count(dir_path);
+ _inc_failed_count(dir_root);
} else {
- _reset_failed_count(dir_path);
+ _reset_failed_count(dir_root);
}
}
std::chrono::duration<double> timo = now - last_directory_scan;
if (timo.count() >= scan_interval && m_directories.size()) {
dout(20) << ": trying to pick from " << m_directories.size() << " directories" << dendl;
- auto dir_path = pick_directory();
- if (dir_path) {
- dout(5) << ": picked dir_path=" << *dir_path << dendl;
- int r = register_directory(*dir_path, replayer);
+ auto dir_root = pick_directory();
+ if (dir_root) {
+ dout(5) << ": picked dir_root=" << *dir_root << dendl;
+ int r = register_directory(*dir_root, replayer);
if (r == 0) {
- sync_snaps(*dir_path, locker);
- unregister_directory(*dir_path);
+ sync_snaps(*dir_root, locker);
+ unregister_directory(*dir_root);
}
}
void PeerReplayer::peer_status(Formatter *f) {
std::scoped_lock locker(m_lock);
f->open_object_section("stats");
- for (auto &[dir_path, sync_stat] : m_snap_sync_stats) {
- f->open_object_section(dir_path);
+ for (auto &[dir_root, sync_stat] : m_snap_sync_stats) {
+ f->open_object_section(dir_root);
if (sync_stat.failed) {
f->dump_string("state", "failed");
} else if (!sync_stat.current_syncing_snap) {
f->dump_unsigned("snaps_synced", sync_stat.synced_snap_count);
f->dump_unsigned("snaps_deleted", sync_stat.deleted_snap_count);
f->dump_unsigned("snaps_renamed", sync_stat.renamed_snap_count);
- f->close_section(); // dir_path
+ f->close_section(); // dir_root
}
f->close_section(); // stats
}
+void PeerReplayer::reopen_logs() {
+ std::scoped_lock locker(m_lock);
+
+ if (m_remote_cluster) {
+ reinterpret_cast<CephContext *>(m_remote_cluster->cct())->reopen_logs();
+ }
+}
+
} // namespace mirror
} // namespace cephfs
void shutdown();
// add a directory to mirror queue
- void add_directory(string_view dir_path);
+ void add_directory(string_view dir_root);
// remove a directory from queue
- void remove_directory(string_view dir_path);
+ void remove_directory(string_view dir_root);
// admin socket helpers
void peer_status(Formatter *f);
+ // reopen logs
+ void reopen_logs();
+
private:
inline static const std::string PRIMARY_SNAP_ID_KEY = "primary_snap_id";
inline static const std::string SERVICE_DAEMON_FAILED_DIR_COUNT_KEY = "failure_count";
inline static const std::string SERVICE_DAEMON_RECOVERED_DIR_COUNT_KEY = "recovery_count";
+ using Snapshot = std::pair<std::string, uint64_t>;
+
+ // file descriptor "triplet" for synchronizing a snapshot
+ // w/ an added MountRef for accessing "previous" snapshot.
+ struct FHandles {
+ // open file descriptor on the snap directory for snapshot
+ // currently being synchronized. Always use this fd with
+ // @m_local_mount.
+ int c_fd;
+
+ // open file descriptor on the "previous" snapshot or on
+ // dir_root on remote filesystem (based on if the snapshot
+ // can be used for incremental transfer). Always use this
+ // fd with p_mnt which either points to @m_local_mount (
+ // for local incremental comparison) or @m_remote_mount (
+ // for remote incremental comparison).
+ int p_fd;
+ MountRef p_mnt;
+
+ // open file descriptor on dir_root on remote filesystem.
+ // Always use this fd with @m_remote_mount.
+ int r_fd_dir_root;
+ };
+
bool is_stopping() {
return m_stopping;
}
std::string epath;
ceph_dir_result *dirp; // valid for directories
struct ceph_statx stx;
+ // set by incremental sync _after_ ensuring missing entries
+ // in the currently synced snapshot have been propagated to
+ // the remote filesystem.
+ bool remote_synced = false;
SyncEntry(std::string_view path,
const struct ceph_statx &stx)
bool is_directory() const {
return S_ISDIR(stx.stx_mode);
}
+
+ bool needs_remote_sync() const {
+ return remote_synced;
+ }
+ void set_remote_synced() {
+ remote_synced = true;
+ }
};
using clock = ceph::coarse_mono_clock;
boost::optional<double> last_sync_duration;
};
- void _inc_failed_count(const std::string &dir_path) {
+ void _inc_failed_count(const std::string &dir_root) {
auto max_failures = g_ceph_context->_conf.get_val<uint64_t>(
"cephfs_mirror_max_consecutive_failures_per_directory");
- auto &sync_stat = m_snap_sync_stats.at(dir_path);
+ auto &sync_stat = m_snap_sync_stats.at(dir_root);
sync_stat.last_failed = clock::now();
if (++sync_stat.nr_failures >= max_failures && !sync_stat.failed) {
sync_stat.failed = true;
m_service_daemon_stats.failed_dir_count);
}
}
- void _reset_failed_count(const std::string &dir_path) {
- auto &sync_stat = m_snap_sync_stats.at(dir_path);
+ void _reset_failed_count(const std::string &dir_root) {
+ auto &sync_stat = m_snap_sync_stats.at(dir_root);
if (sync_stat.failed) {
++m_service_daemon_stats.recovered_dir_count;
m_service_daemon->add_or_update_peer_attribute(m_filesystem.fscid, m_peer,
sync_stat.last_failed = boost::none;
}
- void _set_last_synced_snap(const std::string &dir_path, uint64_t snap_id,
+ void _set_last_synced_snap(const std::string &dir_root, uint64_t snap_id,
const std::string &snap_name) {
- auto &sync_stat = m_snap_sync_stats.at(dir_path);
+ auto &sync_stat = m_snap_sync_stats.at(dir_root);
sync_stat.last_synced_snap = std::make_pair(snap_id, snap_name);
sync_stat.current_syncing_snap = boost::none;
}
- void set_last_synced_snap(const std::string &dir_path, uint64_t snap_id,
+ void set_last_synced_snap(const std::string &dir_root, uint64_t snap_id,
const std::string &snap_name) {
std::scoped_lock locker(m_lock);
- _set_last_synced_snap(dir_path, snap_id, snap_name);
+ _set_last_synced_snap(dir_root, snap_id, snap_name);
}
- void set_current_syncing_snap(const std::string &dir_path, uint64_t snap_id,
+ void set_current_syncing_snap(const std::string &dir_root, uint64_t snap_id,
const std::string &snap_name) {
std::scoped_lock locker(m_lock);
- auto &sync_stat = m_snap_sync_stats.at(dir_path);
+ auto &sync_stat = m_snap_sync_stats.at(dir_root);
sync_stat.current_syncing_snap = std::make_pair(snap_id, snap_name);
}
- void clear_current_syncing_snap(const std::string &dir_path) {
+ void clear_current_syncing_snap(const std::string &dir_root) {
std::scoped_lock locker(m_lock);
- auto &sync_stat = m_snap_sync_stats.at(dir_path);
+ auto &sync_stat = m_snap_sync_stats.at(dir_root);
sync_stat.current_syncing_snap = boost::none;
}
- void inc_deleted_snap(const std::string &dir_path) {
+ void inc_deleted_snap(const std::string &dir_root) {
std::scoped_lock locker(m_lock);
- auto &sync_stat = m_snap_sync_stats.at(dir_path);
+ auto &sync_stat = m_snap_sync_stats.at(dir_root);
++sync_stat.deleted_snap_count;
}
- void inc_renamed_snap(const std::string &dir_path) {
+ void inc_renamed_snap(const std::string &dir_root) {
std::scoped_lock locker(m_lock);
- auto &sync_stat = m_snap_sync_stats.at(dir_path);
+ auto &sync_stat = m_snap_sync_stats.at(dir_root);
++sync_stat.renamed_snap_count;
}
- void set_last_synced_stat(const std::string &dir_path, uint64_t snap_id,
+ void set_last_synced_stat(const std::string &dir_root, uint64_t snap_id,
const std::string &snap_name, double duration) {
std::scoped_lock locker(m_lock);
- _set_last_synced_snap(dir_path, snap_id, snap_name);
- auto &sync_stat = m_snap_sync_stats.at(dir_path);
+ _set_last_synced_snap(dir_root, snap_id, snap_name);
+ auto &sync_stat = m_snap_sync_stats.at(dir_root);
sync_stat.last_synced = clock::now();
sync_stat.last_sync_duration = duration;
++sync_stat.synced_snap_count;
}
- bool should_backoff(const std::string &dir_path, int *retval) {
+ bool should_backoff(const std::string &dir_root, int *retval) {
if (m_fs_mirror->is_blocklisted()) {
*retval = -EBLOCKLISTED;
return true;
*retval = -EINPROGRESS;
return true;
}
- auto &dr = m_registered.at(dir_path);
+ auto &dr = m_registered.at(dir_root);
if (dr.replayer->is_canceled()) {
*retval = -ECANCELED;
return true;
void run(SnapshotReplayerThread *replayer);
boost::optional<std::string> pick_directory();
- int register_directory(const std::string &dir_path, SnapshotReplayerThread *replayer);
- void unregister_directory(const std::string &dir_path);
- int try_lock_directory(const std::string &dir_path, SnapshotReplayerThread *replayer,
+ int register_directory(const std::string &dir_root, SnapshotReplayerThread *replayer);
+ void unregister_directory(const std::string &dir_root);
+ int try_lock_directory(const std::string &dir_root, SnapshotReplayerThread *replayer,
DirRegistry *registry);
- void unlock_directory(const std::string &dir_path, const DirRegistry ®istry);
- void sync_snaps(const std::string &dir_path, std::unique_lock<ceph::mutex> &locker);
+ void unlock_directory(const std::string &dir_root, const DirRegistry ®istry);
+ void sync_snaps(const std::string &dir_root, std::unique_lock<ceph::mutex> &locker);
- int do_sync_snaps(const std::string &dir_path);
- int build_snap_map(const std::string &dir_path, std::map<uint64_t, std::string> *snap_map,
+
+ int build_snap_map(const std::string &dir_root, std::map<uint64_t, std::string> *snap_map,
bool is_remote=false);
- int propagate_snap_deletes(const std::string &dir_name, const std::set<std::string> &snaps);
- int propagate_snap_renames(const std::string &dir_name,
+
+ int propagate_snap_deletes(const std::string &dir_root, const std::set<std::string> &snaps);
+ int propagate_snap_renames(const std::string &dir_root,
const std::set<std::pair<std::string,std::string>> &snaps);
- int synchronize(const std::string &dir_path, uint64_t snap_id, const std::string &snap_name);
- int do_synchronize(const std::string &path, const std::string &snap_name);
-
- int cleanup_remote_dir(const std::string &dir_path);
- int remote_mkdir(const std::string &local_path, const std::string &remote_path,
- const struct ceph_statx &stx);
- int remote_file_op(const std::string &dir_path,
- const std::string &local_path,
- const std::string &remote_path, const struct ceph_statx &stx);
- int remote_copy(const std::string &dir_path,
- const std::string &local_path,
- const std::string &remote_path,
- const struct ceph_statx &local_stx);
+ int propagate_deleted_entries(const std::string &dir_root, const std::string &epath,
+ const FHandles &fh);
+ int cleanup_remote_dir(const std::string &dir_root, const std::string &epath,
+ const FHandles &fh);
+
+ int should_sync_entry(const std::string &epath, const struct ceph_statx &cstx,
+ const FHandles &fh, bool *need_data_sync, bool *need_attr_sync);
+
+ int open_dir(MountRef mnt, const std::string &dir_path, boost::optional<uint64_t> snap_id);
+ int pre_sync_check_and_open_handles(const std::string &dir_root, const Snapshot ¤t,
+ boost::optional<Snapshot> prev, FHandles *fh);
+ void post_sync_close_handles(const FHandles &fh);
+
+ int do_synchronize(const std::string &dir_root, const Snapshot ¤t,
+ boost::optional<Snapshot> prev);
+
+ int synchronize(const std::string &dir_root, const Snapshot ¤t,
+ boost::optional<Snapshot> prev);
+ int do_sync_snaps(const std::string &dir_root);
+
+ int remote_mkdir(const std::string &epath, const struct ceph_statx &stx, const FHandles &fh);
+ int remote_file_op(const std::string &dir_root, const std::string &epath, const struct ceph_statx &stx,
+ const FHandles &fh, bool need_data_sync, bool need_attr_sync);
+ int copy_to_remote(const std::string &dir_root, const std::string &epath, const struct ceph_statx &stx,
+ const FHandles &fh);
};
} // namespace mirror
namespace mirror {
int connect(std::string_view client_name, std::string_view cluster_name,
- RadosRef *cluster, std::string_view mon_host, std::string_view cephx_key) {
+ RadosRef *cluster, std::string_view mon_host, std::string_view cephx_key,
+ std::vector<const char *> args) {
dout(20) << ": connecting to cluster=" << cluster_name << ", client=" << client_name
<< ", mon_host=" << mon_host << dendl;
CephContext *cct = common_preinit(iparams, CODE_ENVIRONMENT_LIBRARY,
CINIT_FLAG_UNPRIVILEGED_DAEMON_DEFAULTS);
- cct->_conf->cluster = cluster_name;
+ if (mon_host.empty()) {
+ cct->_conf->cluster = cluster_name;
+ }
int r = cct->_conf.parse_config_files(nullptr, nullptr, 0);
if (r < 0 && r != -ENOENT) {
cct->_conf.parse_env(cct->get_module_type());
- std::vector<const char*> args;
- r = cct->_conf.parse_argv(args);
- if (r < 0) {
- derr << ": could not parse environment: " << cpp_strerror(r) << dendl;
- cct->put();
- return r;
+ if (!args.empty()) {
+ r = cct->_conf.parse_argv(args);
+ if (r < 0) {
+ derr << ": could not parse command line args: " << cpp_strerror(r) << dendl;
+ cct->put();
+ return r;
+ }
}
cct->_conf.parse_env(cct->get_module_type());
}
}
+ dout(10) << ": using mon addr=" << cct->_conf.get_val<std::string>("mon_host") << dendl;
+
cluster->reset(new librados::Rados());
r = (*cluster)->init_with_context(cct);
return r;
}
+ // mount timeout applies for local and remote mounts.
+ auto mount_timeout = g_ceph_context->_conf.get_val<std::chrono::seconds>
+ ("cephfs_mirror_mount_timeout").count();
+ r = ceph_set_mount_timeout(cmi, mount_timeout);
+ if (r < 0) {
+ derr << ": mount error: " << cpp_strerror(r) << dendl;
+ return r;
+ }
+
r = ceph_init(cmi);
if (r < 0) {
derr << ": mount error: " << cpp_strerror(r) << dendl;
namespace mirror {
int connect(std::string_view client_name, std::string_view cluster_name,
- RadosRef *cluster, std::string_view mon_host={}, std::string_view cephx_key={});
+ RadosRef *cluster, std::string_view mon_host={}, std::string_view cephx_key={},
+ std::vector<const char *> args={});
int mount(RadosRef cluster, const Filesystem &filesystem, bool cross_check_fscid,
MountRef *mount);
void usage() {
std::cout << "usage: cephfs-mirror [options...]" << std::endl;
std::cout << "options:\n";
- std::cout << " --log-file=<logfile> file to log debug output\n";
+ std::cout << " --mon-host monaddress[:port] connect to specified monitor\n";
+ std::cout << " --keyring=<path> path to keyring for local cluster\n";
+ std::cout << " --log-file=<logfile> file to log debug output\n";
std::cout << " --debug-cephfs-mirror=<log-level>/<memory-level> set cephfs-mirror debug level\n";
generic_server_usage();
}
}
init_async_signal_handler();
+ register_async_signal_handler(SIGHUP, handle_signal);
register_async_signal_handler_oneshot(SIGINT, handle_signal);
register_async_signal_handler_oneshot(SIGTERM, handle_signal);
msgr->wait();
delete msgr;
+ unregister_async_signal_handler(SIGHUP, handle_signal);
unregister_async_signal_handler(SIGINT, handle_signal);
unregister_async_signal_handler(SIGTERM, handle_signal);
shutdown_async_signal_handler();
std::string source_spec;
if (vm.count("source-spec") && vm.count("source-spec-path")) {
- std::cerr << "rbd: cannot specify both source-image-spec and "
- << "source-spec/source-spec-file" << std::endl;
+ std::cerr << "rbd: cannot specify both source-spec and source-spec-path"
+ << std::endl;
return -EINVAL;
} else if (vm.count("source-spec-path")) {
std::string source_spec_path = vm["source-spec-path"].as<std::string>();
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
-#include "common/ceph_json.h"
#include "common/errno.h"
#include "common/Formatter.h"
#include "tools/rbd/ArgumentTypes.h"
const std::string IMAGE_CACHE_STATE = ".librbd/image_cache_state";
-struct ImageCacheState {
- bool present = false;
- bool clean = false;
- int size = 0;
- std::string host;
- std::string path;
-};
-
-bool image_cache_parse(const std::string& s, ImageCacheState &cache_state) {
- JSONParser p;
- JSONFormattable f;
- bool success = p.parse(s.c_str(), s.size());
- if (success) {
- decode_json_obj(f, &p);
- if ((success = f.exists("present"))) {
- cache_state.present = (bool)f["present"];
- }
- if (success && (success = f.exists("clean"))) {
- cache_state.present = (bool)f["clean"];
- }
- if (success && (success = f.exists("pwl_size"))) {
- cache_state.size = (int)f["pwl_size"];
- }
- if (success && (success = f.exists("pwl_host"))) {
- cache_state.host = (std::string)f["pwl_host"];
- }
- if (success && (success = f.exists("pwl_path"))) {
- cache_state.path = (std::string)f["pwl_path"];
- }
- }
- return success;
-}
-
} // anonymous namespace
static int do_show_status(librados::IoCtx& io_ctx, const std::string &image_name,
}
}
- ImageCacheState cache_state;
+ std::string image_cache_str;
if (features & RBD_FEATURE_DIRTY_CACHE) {
- std::string image_cache_str;
r = image.metadata_get(IMAGE_CACHE_STATE, &image_cache_str);
if (r < 0) {
- std::cerr << "rbd: getting image cache status failed: " << cpp_strerror(r)
+ std::cerr << "rbd: getting image cache state failed: " << cpp_strerror(r)
<< std::endl;
- } else {
- r = image_cache_parse(image_cache_str, cache_state);
- if (r < 0) {
- std::cerr << "rbd: image cache metadata is corrupted: " << cpp_strerror(r)
- << std::endl;
- }
+ // not fatal
}
}
f->dump_string("state_description", migration_status.state_description);
f->close_section(); // migration
}
- if (cache_state.present) {
- f->open_object_section("image_cache_state");
- f->dump_bool("clean", cache_state.clean);
- f->dump_int("size", cache_state.size);
- f->dump_string("host", cache_state.host);
- f->dump_string("path", cache_state.path);
- f->close_section(); // image_cache_state
+ if (!image_cache_str.empty()) {
+ f->dump_string("image_cache_state", image_cache_str);
}
} else {
if (watchers.size()) {
std::cout << std::endl;
}
- if (cache_state.present) {
- std::cout << "Image cache state:" << std::endl;
- std::cout << "\tclean: " << (cache_state.clean ? "true" : "false")
- << std::endl
- << "\tsize: " << byte_u_t(cache_state.size) << std::endl
- << "\thost: " << cache_state.host << std::endl
- << "\tpath: " << cache_state.path << std::endl;
+ if (!image_cache_str.empty()) {
+ std::cout << "Image cache state: " << image_cache_str << std::endl;
}
}
"value range: 0.0-1.0");
}
-int execute_purge (const po::variables_map &vm,
- const std::vector<std::string> &ceph_global_init_args) {
+int execute_purge(const po::variables_map &vm,
+ const std::vector<std::string> &ceph_global_init_args) {
std::string pool_name;
std::string namespace_name;
size_t arg_index = 0;
r = rbd.trash_purge_with_progress(io_ctx, expire_ts, threshold, pc);
if (r < 0) {
pc.fail();
- } else {
- pc.finish();
+ if (r == -ENOTEMPTY || r == -EBUSY || r == -EMLINK || r == -EUCLEAN) {
+ std::cerr << "rbd: some expired images could not be removed"
+ << std::endl
+ << "Ensure that they are closed/unmapped, do not have "
+ << "snapshots (including trashed snapshots with linked "
+ << "clones), are not in a group and were moved to the "
+ << "trash successfully."
+ << std::endl;
+ }
+ return r;
}
+ pc.finish();
return 0;
}
int m_error_code = 0;
std::string m_error_description;
- C_UpdateWatchCtx* m_update_watch_ctx;
+ C_UpdateWatchCtx* m_update_watch_ctx = nullptr;
uint64_t m_local_update_watcher_handle = 0;
uint64_t m_remote_update_watcher_handle = 0;
bool m_image_updated = false;
ceph_adm mgr module enable test_orchestrator
ceph_adm orch set backend test_orchestrator
ceph_adm test_orchestrator load_data -i $CEPH_ROOT/src/pybind/mgr/test_orchestrator/dummy_data.json
- prun ceph_adm nfs cluster create cephfs $cluster_id
+ prun ceph_adm nfs cluster create $cluster_id
prun ceph_adm nfs export create cephfs "a" $cluster_id "/cephfs"
for name in a b c d e f g h i j k l m n o p
# Ganesha Daemons
if [ $GANESHA_DAEMON_NUM -gt 0 ]; then
pseudo_path="/cephfs"
+ ceph_adm mgr module enable nfs
if [ "$cephadm" -gt 0 ]; then
cluster_id="vstart"
- prun ceph_adm nfs cluster create cephfs $cluster_id
+ prun ceph_adm nfs cluster create $cluster_id
prun ceph_adm nfs export create cephfs "a" $cluster_id $pseudo_path
port="2049"
else
local akey='0555b35654ad1656d804'
local skey='h7GhxuBLTrlhVUyxSPUKUV8r/2EI4ngqJxD7iBdBYLhwluN30JaT3Q=='
debug echo "setting up user testid"
- $CEPH_BIN/radosgw-admin user create --uid testid --access-key $akey --secret $skey --display-name 'M. Tester' --email tester@ceph.com -c $conf_fn > /dev/null
+ $CEPH_BIN/radosgw-admin user create --uid testid --access-key $akey --secret $skey --display-name 'M. Tester' --email tester@ceph.com --system -c $conf_fn > /dev/null
# Create S3-test users
# See: https://github.com/ceph/s3-tests
fi
fi
# Start server
+ if [ "$cephadm" -gt 0 ]; then
+ ceph_adm orch apply rgw rgwTest
+ return
+ fi
+
RGWDEBUG=""
if [ "$debug" -ne 0 ]; then
RGWDEBUG="--debug-rgw=20 --debug-ms=1"
depsDirs="$lz4Dir;$curlDir;$sslDir;$boostDir;$zlibDir;$backtraceDir;$snappyDir"
depsDirs+=";$winLibDir"
+# Cmake recommends using CMAKE_PREFIX_PATH instead of link_directories.
+# Still, some library dependencies may not include the full path (e.g. Boost
+# sets the "-lz" flag through INTERFACE_LINK_LIBRARIES), which is why
+# we have to ensure that the linker will be able to locate them.
+linkDirs="$zlibDir/lib"
+
lz4Lib="${lz4Dir}/lib/dll/liblz4-1.dll"
lz4Include="${lz4Dir}/lib"
curlLib="${curlDir}/lib/libcurl.dll.a"
rm -rf $binDir
fi
+mkdir -p $BUILD_DIR
+cd $BUILD_DIR
+
if [[ ! -f ${depsToolsetDir}/completed ]]; then
- echo "Preparing dependencies: $DEPS_DIR"
+ echo "Preparing dependencies: $DEPS_DIR. Log: ${BUILD_DIR}/build_deps.log"
NUM_WORKERS=$NUM_WORKERS DEPS_DIR=$DEPS_DIR OS="$OS"\
- "$SCRIPT_DIR/win32_deps_build.sh"
+ "$SCRIPT_DIR/win32_deps_build.sh" | tee "${BUILD_DIR}/build_deps.log"
fi
-mkdir -p $BUILD_DIR
-cd $BUILD_DIR
-
# Due to distribution specific mingw settings, the mingw.cmake file
# must be built prior to running cmake.
MINGW_CMAKE_FILE="$BUILD_DIR/mingw32.cmake"
# symbols. Until we fix the dependencies (which are either unspecified
# or circular), we'll have to stick to static linking.
cmake -D CMAKE_PREFIX_PATH=$depsDirs \
+ -D MINGW_LINK_DIRECTORIES="$linkDirs" \
-D CMAKE_TOOLCHAIN_FILE="$MINGW_CMAKE_FILE" \
+ -D WITH_LIBCEPHSQLITE=OFF \
-D WITH_RDMA=OFF -D WITH_OPENLDAP=OFF \
-D WITH_GSSAPI=OFF -D WITH_XFS=OFF \
-D WITH_FUSE=OFF -D WITH_DOKAN=ON \
curlDir="${depsToolsetDir}/curl"
# For now, we'll keep the version number within the file path when not using git.
-boostUrl="https://dl.bintray.com/boostorg/release/1.73.0/source/boost_1_73_0.tar.gz"
-boostSrcDir="${depsSrcDir}/boost_1_73_0"
+boostUrl="https://boostorg.jfrog.io/artifactory/main/release/1.75.0/source/boost_1_75_0.tar.gz"
+boostSrcDir="${depsSrcDir}/boost_1_75_0"
boostDir="${depsToolsetDir}/boost"
zlibDir="${depsToolsetDir}/zlib"
zlibSrcDir="${depsSrcDir}/zlib"
mkdir -p $depsToolsetDir
mkdir -p $depsSrcDir
+echo "Installing required packages."
case "$OS" in
ubuntu)
sudo apt-get update
MINGW_CMAKE_FILE="$DEPS_DIR/mingw.cmake"
source "$SCRIPT_DIR/mingw_conf.sh"
+echo "Building zlib."
cd $depsSrcDir
if [[ ! -d $zlibSrcDir ]]; then
git clone https://github.com/madler/zlib
SHARED_MODE=1 \
-f win32/Makefile.gcc install
+echo "Building lz4."
cd $depsToolsetDir
if [[ ! -d $lz4Dir ]]; then
git clone https://github.com/lz4/lz4
WINDRES=${MINGW_WINDRES} \
TARGET_OS=Windows_NT
+echo "Building OpenSSL."
cd $depsSrcDir
if [[ ! -d $sslSrcDir ]]; then
git clone https://github.com/openssl/openssl
_make
_make install
+echo "Building libcurl."
cd $depsSrcDir
if [[ ! -d $curlSrcDir ]]; then
git clone https://github.com/curl/curl
_make install
+echo "Building boost."
cd $depsSrcDir
if [[ ! -d $boostSrcDir ]]; then
+ echo "Downloading boost."
wget -qO- $boostUrl | tar xz
fi
export PTW32_INCLUDE=${PTW32Include}
export PTW32_LIB=${PTW32Lib}
+echo "Patching boost."
# Fix getting Windows page size
# TODO: send this upstream and maybe use a fork until it merges.
# Meanwhile, we might consider moving those to ceph/cmake/modules/BuildBoost.cmake.
#endif
EOL
-# Use pthread if requested
-patch -N boost/asio/detail/thread.hpp <<EOL
---- boost/asio/detail/thread.hpp 2019-10-11 16:26:11.191094656 +0300
-+++ boost/asio/detail/thread.hpp.new 2019-10-11 16:26:03.310542438 +0300
-@@ -19,6 +19,8 @@
-
- #if !defined(BOOST_ASIO_HAS_THREADS)
- # include <boost/asio/detail/null_thread.hpp>
-+#elif defined(BOOST_ASIO_HAS_PTHREADS)
-+# include <boost/asio/detail/posix_thread.hpp>
- #elif defined(BOOST_ASIO_WINDOWS)
- # if defined(UNDER_CE)
- # include <boost/asio/detail/wince_thread.hpp>
-@@ -27,8 +29,6 @@
- # else
- # include <boost/asio/detail/win_thread.hpp>
- # endif
--#elif defined(BOOST_ASIO_HAS_PTHREADS)
--# include <boost/asio/detail/posix_thread.hpp>
- #elif defined(BOOST_ASIO_HAS_STD_THREAD)
- # include <boost/asio/detail/std_thread.hpp>
- #else
-@@ -41,6 +41,8 @@
-
- #if !defined(BOOST_ASIO_HAS_THREADS)
- typedef null_thread thread;
-+#elif defined(BOOST_ASIO_HAS_PTHREADS)
-+typedef posix_thread thread;
- #elif defined(BOOST_ASIO_WINDOWS)
- # if defined(UNDER_CE)
- typedef wince_thread thread;
-@@ -49,8 +51,6 @@
- # else
- typedef win_thread thread;
- # endif
--#elif defined(BOOST_ASIO_HAS_PTHREADS)
--typedef posix_thread thread;
- #elif defined(BOOST_ASIO_HAS_STD_THREAD)
- typedef std_thread thread;
- #endif
-EOL
-
-# Unix socket support for Windows is currently disabled by Boost.
-# https://github.com/huangqinjin/asio/commit/d27a8ad1870
-patch -N boost/asio/detail/socket_types.hpp <<EOL
---- boost/asio/detail/socket_types.hpp 2019-11-29 16:50:58.647125797 +0000
-+++ boost/asio/detail/socket_types.hpp.new 2020-01-13 11:45:05.015104678 +0000
-@@ -200,6 +200,8 @@
- typedef ipv6_mreq in6_mreq_type;
- typedef sockaddr_in6 sockaddr_in6_type;
- typedef sockaddr_storage sockaddr_storage_type;
-+struct sockaddr_un_type { u_short sun_family;
-+ char sun_path[108]; }; /* copy from afunix.h */
- typedef addrinfo addrinfo_type;
- # endif
- typedef ::linger linger_type;
-EOL
-patch -N boost/asio/detail/config.hpp <<EOL
---- boost/asio/detail/config.hpp 2019-11-29 16:50:58.691126211 +0000
-+++ boost/asio/detail/config.hpp.new 2020-01-13 13:09:17.966771750 +0000
-@@ -1142,13 +1142,9 @@
- // UNIX domain sockets.
- #if !defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
- # if !defined(BOOST_ASIO_DISABLE_LOCAL_SOCKETS)
--# if !defined(BOOST_ASIO_WINDOWS) \\
-- && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \\
-- && !defined(__CYGWIN__)
-+# if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- # define BOOST_ASIO_HAS_LOCAL_SOCKETS 1
--# endif // !defined(BOOST_ASIO_WINDOWS)
-- // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-- // && !defined(__CYGWIN__)
-+# endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- # endif // !defined(BOOST_ASIO_DISABLE_LOCAL_SOCKETS)
- #endif // !defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
-EOL
-
-# TODO: drop this when switching to Boost>=1.75, it's unreleased as of 1.74.
-patch -N boost/process/detail/windows/handle_workaround.hpp <<EOL
---- boost/process/detail/windows/handle_workaround.hpp
-+++ boost/process/detail/windows/handle_workaround.hpp.new
-@@ -198,20 +198,20 @@ typedef struct _OBJECT_TYPE_INFORMATION_ {
-
-
- /*
--__kernel_entry NTSTATUS NtQuerySystemInformation(
-+NTSTATUS NtQuerySystemInformation(
- IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
- OUT PVOID SystemInformation,
- IN ULONG SystemInformationLength,
- OUT PULONG ReturnLength
- );
- */
--typedef ::boost::winapi::NTSTATUS_ (__kernel_entry *nt_system_query_information_p )(
-+typedef ::boost::winapi::NTSTATUS_ (*nt_system_query_information_p )(
- SYSTEM_INFORMATION_CLASS_,
- void *,
- ::boost::winapi::ULONG_,
- ::boost::winapi::PULONG_);
- /*
--__kernel_entry NTSYSCALLAPI NTSTATUS NtQueryObject(
-+NTSYSCALLAPI NTSTATUS NtQueryObject(
- HANDLE Handle,
- OBJECT_INFORMATION_CLASS ObjectInformationClass,
- PVOID ObjectInformation,
-@@ -220,7 +220,7 @@ __kernel_entry NTSYSCALLAPI NTSTATUS NtQueryObject(
- );
- */
-
--typedef ::boost::winapi::NTSTATUS_ (__kernel_entry *nt_query_object_p )(
-+typedef ::boost::winapi::NTSTATUS_ (*nt_query_object_p )(
- ::boost::winapi::HANDLE_,
- OBJECT_INFORMATION_CLASS_,
- void *,
-EOL
-
./bootstrap.sh
./b2 install --user-config=user-config.jam toolset=gcc-mingw32 \
-sZLIB_INCLUDE=$zlibDir/include -sZLIB_LIBRARY_PATH=$zlibDir/lib \
--without-python --without-mpi --without-log --without-wave
+echo "Building libbacktrace."
cd $depsSrcDir
if [[ ! -d $backtraceSrcDir ]]; then
git clone https://github.com/ianlancetaylor/libbacktrace
_make LDFLAGS="-no-undefined"
_make install
+echo "Building snappy."
cd $depsSrcDir
if [[ ! -d $snappySrcDir ]]; then
git clone https://github.com/google/snappy
_make
_make install
+echo "Generating mswsock.lib."
# mswsock.lib is not provided by mingw, so we'll have to generate
# it.
mkdir -p $winLibDir
$MINGW_DLLTOOL -d $winLibDir/mswsock.def \
-l $winLibDir/libmswsock.a
+echo "Fetching libwnbd."
cd $depsSrcDir
if [[ ! -d $wnbdSrcDir ]]; then
git clone $wnbdUrl
-D libwnbd.dll \
-l $wnbdLibDir/libwnbd.a
+echo "Fetching dokany."
cd $depsSrcDir
if [[ ! -d $dokanSrcDir ]]; then
git clone $dokanUrl
# sys/public.h without the "sys" prefix.
cp $dokanSrcDir/sys/public.h $dokanSrcDir/dokan
+echo "Finished building Ceph dependencies."
touch $depsToolsetDir/completed